@3r1s_s/erisui 1.0.14 → 1.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/erisui.css CHANGED
@@ -1 +1 @@
1
- :root{-webkit-touch-callout:none;-webkit-user-callout:none;-webkit-user-drag:none;-webkit-user-modify:none;-webkit-highlight:none;-webkit-tap-highlight-color:transparent}:root{--app-text: #F2F3F6;--app-link: #549fff;--app-100: #131318;--app-200: #202027;--app-300: #2c2c34;--app-400: #35353b;--app-500: #40404a;--app-600: #4b4b55;--app-700: #575761;--app-800: #62626e;--app-900: #6e6e7b;--banner-color: #182233;--nav-width: 75px;--nav-expanded-width: 250px;--titlebar-height: 65px;--content-width: 100%;--app-accent: #6366f1;--app-accent-50: #7376ff;--app-accent-100: #6366f1;--app-accent-200: #4b4ecf;--app-blue: #3679f0;--app-red: #ee4d3c;--app-green: #4dca9a;--app-yellow: #fffc5c;--app-pink: #ff5bff;--app-purple: #895bff;--app-orange: #ff9b5b;--app-white: #fff;--app-dark-blue: #1e4d9e;--app-dark-red: #c33f33;--app-dark-green: #2c7e4b;--app-dark-yellow: #c7b200;--app-dark-pink: #c95bff;--app-dark-purple: #5f5bff;--app-dark-orange: #c86f33;--transition-function: cubic-bezier(.4, 0, .2, 1);--specular-highlight: -.5px -.5px 1px #ffffff52 inset, 1px 1px .5px #ffffff52 inset, 0 4px 24px #0000003d}:root{--card-blue: #A8C7FA;--card-cyan: #80CFFF;--card-red: #ffadb5;--card-pink: #FFADE4;--card-green: #6CD58B;--card-yellow: #fff7c1;--card-purple: #D9BAFD;--card-orange: #FFB683}.light{--app-text: #1F1F1F;--app-link: #1868f2;--app-100: #fefefe;--app-200: #F0F4FA;--app-300: #dde3f0;--app-400: #C6CFD7;--app-500: #AEB9C3;--app-600: #99A3AE;--app-700: #7F8C98;--app-800: #66717C;--app-900: #4B5563;--banner-color: #d3e3fd}body{margin:0;padding:0;background-color:var(--app-100);color:var(--app-text);overflow:hidden}a{color:var(--app-link);text-decoration:none}a:hover{text-decoration:underline}h1,h2,h3,h4,h5,h6{margin:0}button{color:inherit;font-family:inherit}#app{position:fixed;top:0;left:0;width:100%;height:100%;background-color:var(--app-200)}.app-wrapper{margin-left:var(--nav-width);display:flex;flex-direction:column;padding:var(--titlebar-height) .5rem .5rem 0rem;box-sizing:border-box;height:100%;overflow-y:auto;background-color:var(--app-200);transition:margin-left .2s cubic-bezier(.2,0,0,1)}eui-app-nav.expanded+.app-wrapper{margin-left:var(--nav-expanded-width)}#main{width:100%;height:100%;padding:1.5rem;box-sizing:border-box;gap:1.5rem;display:flex;overflow-y:auto;scrollbar-color:var(--app-300) var(--app-100)}.main-wrapper{width:100%;height:100%;border-radius:2rem;background-color:var(--app-100);overflow:hidden}.content{width:var(--content-width);margin:0 auto}.content-header h1{font-size:2.375rem}.content-sidebar{display:flex;flex-direction:column;gap:.5rem}.content-sidebar-inner{width:300px;margin:0 auto;border-radius:12px;background-color:var(--app-200);height:100%}@keyframes ripple{to{transform:scale(4);opacity:0;filter:blur(10px)}}#main{opacity:1;transform:translateY(0);transition:transform .3s cubic-bezier(.2,0,0,1),opacity .3s cubic-bezier(.2,0,0,1)}#main.fade-out{opacity:0;transform:translateY(1rem);transition:none}@media(max-width:768px){.app-wrapper{margin-left:0;padding:0;padding-top:var(--titlebar-height)}.main-wrapper{border-radius:2rem 2rem 0 0}eui-app-nav.expanded+.app-wrapper{margin-left:0}eui-app-nav{width:0;overflow:hidden}eui-app-nav.expanded{width:var(--nav-expanded-width);border-radius:0 2rem 2rem 0}}
1
+ :root{-webkit-touch-callout:none;-webkit-user-callout:none;-webkit-user-drag:none;-webkit-user-modify:none;-webkit-highlight:none;-webkit-tap-highlight-color:transparent}:root{--app-text: #F2F3F6;--app-link: #549fff;--app-100: #131318;--app-200: #202027;--app-300: #2c2c34;--app-400: #35353b;--app-500: #40404a;--app-600: #4b4b55;--app-700: #575761;--app-800: #62626e;--app-900: #6e6e7b;--banner-color: #182233;--nav-width: 75px;--nav-expanded-width: 250px;--titlebar-height: 65px;--content-width: 100%;--tab-bar-height: 0px;--app-accent: #6366f1;--app-accent-50: #7376ff;--app-accent-100: #6366f1;--app-accent-200: #4b4ecf;--app-blue: #3679f0;--app-red: #ee4d3c;--app-green: #4dca9a;--app-yellow: #fffc5c;--app-pink: #ff5bff;--app-purple: #895bff;--app-orange: #ff9b5b;--app-white: #fff;--app-dark-blue: #1e4d9e;--app-dark-red: #c33f33;--app-dark-green: #2c7e4b;--app-dark-yellow: #c7b200;--app-dark-pink: #c95bff;--app-dark-purple: #5f5bff;--app-dark-orange: #c86f33;--transition-function: cubic-bezier(.4, 0, .2, 1);--specular-highlight: -.5px -.5px 1px #ffffff52 inset, 1px 1px .5px #ffffff52 inset, 0 4px 24px #0000003d}:root{--card-blue: #A8C7FA;--card-cyan: #80CFFF;--card-red: #ffadb5;--card-pink: #FFADE4;--card-green: #6CD58B;--card-yellow: #fff7c1;--card-purple: #D9BAFD;--card-orange: #FFB683}.light{--app-text: #1F1F1F;--app-link: #1868f2;--app-100: #fefefe;--app-200: #F0F4FA;--app-300: #dde3f0;--app-400: #C6CFD7;--app-500: #AEB9C3;--app-600: #99A3AE;--app-700: #7F8C98;--app-800: #66717C;--app-900: #4B5563;--banner-color: #d3e3fd}body{margin:0;padding:0;background-color:var(--app-100);color:var(--app-text);overflow:hidden}a{color:var(--app-link);text-decoration:none}a:hover{text-decoration:underline}h1,h2,h3,h4,h5,h6{margin:0}button{color:inherit;font-family:inherit}#app{position:fixed;top:0;left:0;width:100%;height:100%;background-color:var(--app-200)}.app-wrapper{margin-left:var(--nav-width);display:flex;flex-direction:column;padding:var(--titlebar-height) .5rem calc(var(--tab-bar-height) + .5rem) .5rem;box-sizing:border-box;height:100%;overflow-y:auto;background-color:var(--app-200);transition:margin-left .2s cubic-bezier(.2,0,0,1)}eui-app-nav.expanded+.app-wrapper{margin-left:var(--nav-expanded-width)}#main{width:100%;height:100%;padding:1.5rem;box-sizing:border-box;gap:1.5rem;display:flex;overflow-y:auto;scrollbar-color:var(--app-300) var(--app-100)}.main-wrapper{width:100%;height:100%;border-radius:2rem;background-color:var(--app-100);overflow:hidden}.content{width:var(--content-width);margin:0 auto}.content-header h1{font-size:2.375rem}.content-sidebar{display:flex;flex-direction:column;gap:.5rem}.content-sidebar-inner{width:300px;margin:0 auto;border-radius:12px;background-color:var(--app-200);height:100%}@keyframes ripple{to{transform:scale(4);opacity:0;filter:blur(10px)}}#main{opacity:1;transform:translateY(0);transition:transform .3s cubic-bezier(.2,0,0,1),opacity .3s cubic-bezier(.2,0,0,1)}#main.fade-out{opacity:0;transform:translateY(1rem);transition:none}@media(max-width:768px){.app-wrapper{margin-left:0;padding:var(--titlebar-height) 0 var(--tab-bar-height) 0}.main-wrapper{border-radius:0}eui-app-nav.expanded+.app-wrapper{margin-left:0}eui-app-nav{width:0;overflow:hidden}eui-app-nav.expanded{width:var(--nav-expanded-width);border-radius:0 2rem 2rem 0}}
package/dist/erisui.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(h,g){typeof exports=="object"&&typeof module<"u"?g(exports):typeof define=="function"&&define.amd?define(["exports"],g):(h=typeof globalThis<"u"?globalThis:h||self,g(h.eui={}))})(this,(function(h){"use strict";var G=Object.defineProperty;var Q=(h,g,p)=>g in h?G(h,g,{enumerable:!0,configurable:!0,writable:!0,value:p}):h[g]=p;var C=(h,g,p)=>Q(h,typeof g!="symbol"?g+"":g,p);class g extends HTMLElement{static get observedAttributes(){return["size","border-radius","name","color"]}constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=`
1
+ (function(p,m){typeof exports=="object"&&typeof module<"u"?m(exports):typeof define=="function"&&define.amd?define(["exports"],m):(p=typeof globalThis<"u"?globalThis:p||self,m(p.eui={}))})(this,(function(p){"use strict";class m extends HTMLElement{static get observedAttributes(){return["size","border-radius","name","color"]}constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=`
2
2
  <style>
3
3
  :host {
4
4
  aspect-ratio: 1 / 1;
@@ -43,7 +43,7 @@
43
43
  <slot></slot>
44
44
  <span id="initials"></span>
45
45
  </div>
46
- `}connectedCallback(){this.avatar=this.shadowRoot.querySelector(".avatar"),this.initials=this.shadowRoot.querySelector("#initials");const t=this.shadowRoot.querySelector("slot"),e=t&&t.assignedNodes().length>0;if(e){const i=t.assignedNodes()[0];i&&i.tagName==="IMG"&&(this.initials.style.display="none",this.avatar.style.backgroundColor="transparent")}else this.hasAttribute("color")&&(this.avatar.style.backgroundColor=this.getAttribute("color"));if(this.hasAttribute("color")&&(this.avatar.style.backgroundColor=this.getAttribute("color")),this.hasAttribute("size")){const i=this.getAttribute("size");this.avatar.style.width=i+"px",this.avatar.style.height=i+"px",this.initials.style.fontSize=i/2+"px"}if(this.hasAttribute("border-radius")&&(this.avatar.style.borderRadius=this.getAttribute("border-radius")+"px"),this.hasAttribute("name")&&(this.avatar.title=this.getAttribute("name")),!e&&this.hasAttribute("name")){const r=this.getAttribute("name").trim().split(/\s+/);let s="";r.length===1?s=r[0][0]||"":s=(r[0][0]||"")+(r[r.length-1][0]||""),this.initials.textContent=s.toUpperCase()}}}customElements.define("eui-avatar",g);const p=(()=>{let o={};return{register(t,e){o[t]=e},get(t){return o[t]||""}}})();p.register("menu",'<svg width="24" height="24" viewBox="0 0 24 24" focusable="false"><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z" fill="currentColor"></path></svg>'),p.register("home",'<svg width="22" height="21" viewBox="0 0 22 21" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M11.5258 0.204649C11.2291 -0.0682165 10.7709 -0.0682161 10.4742 0.204649L0.249923 9.68588C-0.266994 10.1612 0.0714693 11.0197 0.775759 11.0197L3.48971 11.0197V18.6923C3.48971 19.542 4.18295 20.2308 5.03811 20.2308H16.9619C17.8171 20.2308 18.5103 19.542 18.5103 18.6923V11.0197L21.2242 11.0197C21.9285 11.0197 22.267 10.1612 21.7501 9.68588L11.5258 0.204649Z" fill="currentColor"/></svg>'),p.register("kit",'<svg width="26" height="28" viewBox="0 0 26 28" xmlns="http://www.w3.org/2000/svg"><path d="m13.118 14.831c0.433 0 1.257-0.024 1.795-0.344l9.151-4.057c0.869-0.59 1.051-1.255 1.067-1.773 0.02-0.662-0.313-1.634-1.181-2.15l-8.515-3.921c-0.537-0.309-2.096-0.552-2.529-0.552-0.444 0-1.958 0.42-2.496 0.73l-8.643 4.034c-0.85 0.602-1.022 1.284-0.951 1.942 0.098 0.887 0.206 0.857 0.889 1.503l9.577 4.212c0.537 0.32 1.391 0.376 1.836 0.376zm-0.12 5.467c0.403 0 1.443-0.068 1.928-0.345l8.858-3.991c0.497-0.3 1.448-1.117 1.382-1.952-0.091-1.138-0.598-1.7-0.948-1.906l-9.22 3.888c-0.454 0.261-1.417 0.478-1.916 0.478-0.542 0-1.539-0.228-1.766-0.362l-9.395-4.012c-0.462 0.022-1.174 0.911-1.201 1.642-0.03 0.761 0.7 1.62 1.135 1.839l9.408 4.384c0.485 0.278 1.322 0.337 1.735 0.337zm0.09 5.344c0.403 0 1.296-0.053 1.781-0.342l9.147-4.299c0.485-0.289 1.129-0.789 1.053-1.879-0.056-0.794-0.071-1.123-0.918-1.765l-9.203 4.113c-0.228 0.134-0.948 0.39-1.853 0.39-0.939 0-1.603-0.224-1.831-0.359l-9.451-4.017c-0.979 0.247-1.005 1.45-1.005 1.947 0 0.455 0.403 1.279 0.9 1.568l9.465 4.262c0.486 0.29 1.502 0.381 1.915 0.381z" fill="currentColor"></path></svg>'),p.register("settings",'<svg width="20" height="21" viewBox="0 0 20 21" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M0.644169 15.2044C0.751639 15.4175 0.866389 15.627 0.988219 15.8323C1.34503 16.445 1.76284 17.0223 2.23048 17.545C2.3967 17.7307 2.65856 17.7968 2.89375 17.7126L5.25826 16.8621C5.96645 16.608 6.74841 17.07 6.87902 17.8018L7.32018 20.2764C7.36418 20.5227 7.55119 20.7167 7.79454 20.7688C8.86201 20.9976 9.95753 21.057 11.0418 20.9452C11.427 20.9061 11.8095 20.8457 12.1863 20.7643C12.375 20.7232 12.5303 20.5969 12.6121 20.4275C12.6441 20.37 12.6671 20.3068 12.6794 20.2397L13.132 17.7739C13.1978 17.4162 13.4191 17.1252 13.7102 16.9498C13.7478 16.9275 13.7867 16.9072 13.8264 16.8889C14.1041 16.7654 14.426 16.7408 14.7301 16.8496L17.0889 17.6938C17.2068 17.7362 17.3318 17.7406 17.4482 17.7107C17.5805 17.6872 17.7044 17.6208 17.7983 17.5172C18.2857 16.9783 18.7189 16.3833 19.0875 15.7497C19.4503 15.1137 19.748 14.4403 19.9703 13.7471C20.0128 13.6142 20.0083 13.4742 19.9629 13.3481C19.9307 13.2315 19.8646 13.1245 19.7685 13.043L17.8596 11.4179C17.6114 11.2067 17.4714 10.912 17.4409 10.6065C17.4371 10.563 17.4355 10.5194 17.4361 10.4758C17.444 10.1379 17.5847 9.80337 17.8591 9.56905L19.7638 7.94348C19.8146 7.90007 19.857 7.84958 19.8904 7.7944C19.9978 7.63842 20.0299 7.43844 19.9706 7.25291C19.8534 6.88733 19.7151 6.52704 19.5572 6.17466C19.1114 5.17572 18.5115 4.2528 17.7787 3.43934C17.612 3.25429 17.3509 3.18886 17.1161 3.27382L14.7569 4.12827C14.0592 4.38082 13.2679 3.93321 13.1344 3.19155L12.6871 0.714256C12.6423 0.468053 12.4542 0.273849 12.2106 0.22246C11.5182 0.0764882 10.803 0.00250031 10.088 0.000608251C9.88769 -0.0015584 9.68739 0.002064 9.48735 0.0114648C8.92415 0.0369819 8.36389 0.107332 7.81778 0.222459C7.78135 0.230146 7.74615 0.241028 7.71249 0.2548C7.5098 0.328781 7.35888 0.505679 7.31996 0.723547L6.8788 3.19817C6.81394 3.56157 6.58834 3.85866 6.29097 4.03446C5.98991 4.2061 5.61923 4.25412 5.27153 4.12827L2.91237 3.27382C2.70694 3.1995 2.48138 3.24016 2.31657 3.37545C2.2857 3.39886 2.25676 3.42543 2.23026 3.45505C1.81793 3.91588 1.44433 4.4192 1.11714 4.95183C1.05788 5.04799 1.00019 5.14513 0.944072 5.24319C0.878302 5.35619 0.814661 5.4704 0.753186 5.58577C0.464267 6.12611 0.222113 6.69081 0.0338354 7.26739C0.0213426 7.30567 0.0127871 7.34455 0.00802709 7.38352C-0.0257478 7.59364 0.0518458 7.809 0.218337 7.94974L2.13633 9.56992C2.41146 9.80242 2.55518 10.1364 2.56469 10.4743C2.56917 10.8294 2.42529 11.1857 2.13611 11.4301L0.218115 13.0503C0.0484589 13.1937 -0.0289685 13.4145 0.00982709 13.6284C0.0147983 13.6634 0.0228404 13.6982 0.0340542 13.7326C0.198098 14.235 0.403035 14.7283 0.644169 15.2044ZM10 14.5C12.2091 14.5 14 12.7091 14 10.5C14 8.29086 12.2091 6.5 10 6.5C7.79086 6.5 6 8.29086 6 10.5C6 12.7091 7.79086 14.5 10 14.5Z" fill="currentColor"></path></svg>'),p.register("home",'<svg width="22" height="21" viewBox="0 0 22 21" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M11.5258 0.204649C11.2291 -0.0682165 10.7709 -0.0682161 10.4742 0.204649L0.249923 9.68588C-0.266994 10.1612 0.0714693 11.0197 0.775759 11.0197L3.48971 11.0197V18.6923C3.48971 19.542 4.18295 20.2308 5.03811 20.2308H16.9619C17.8171 20.2308 18.5103 19.542 18.5103 18.6923V11.0197L21.2242 11.0197C21.9285 11.0197 22.267 10.1612 21.7501 9.68588L11.5258 0.204649Z" fill="currentColor"/></svg>'),p.register("copy",'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M2 11C2 11.7956 2.31607 12.5587 2.87868 13.1213C3.44129 13.6839 4.20435 14 5 14H11C11.7956 14 12.5587 13.6839 13.1213 13.1213C13.6839 12.5587 14 11.7956 14 11V8H11.75C10.7554 8 9.80161 7.60491 9.09835 6.90165C8.39509 6.19839 8 5.24456 8 4.25V2H5C4.20435 2 3.44129 2.31607 2.87868 2.87868C2.31607 3.44129 2 4.20435 2 5V11Z" fill="currentColor"/><path d="M13.7975 6.49965C13.6881 6.25457 13.5357 6.03105 13.3475 5.83965L10.16 2.65965C9.96921 2.4688 9.74565 2.31384 9.5 2.20215V4.24965C9.5 4.54512 9.5582 4.8377 9.67127 5.11069C9.78434 5.38367 9.95008 5.63171 10.159 5.84064C10.3679 6.04957 10.616 6.2153 10.889 6.32838C11.1619 6.44145 11.4545 6.49965 11.75 6.49965H13.7975Z" fill="currentColor"/></svg>'),p.register("arrow",'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path d="M9.3 5.3a1 1 0 0 0 0 1.4l5.29 5.3-5.3 5.3a1 1 0 1 0 1.42 1.4l6-6a1 1 0 0 0 0-1.4l-6-6a1 1 0 0 0-1.42 0Z"></path></svg>'),p.register("back",'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2" style="transform: rotate(180deg)"><path d="M9.3 5.3a1 1 0 0 0 0 1.4l5.29 5.3-5.3 5.3a1 1 0 1 0 1.42 1.4l6-6a1 1 0 0 0 0-1.4l-6-6a1 1 0 0 0-1.42 0Z"></path></svg>'),p.register("check",'<svg width="12" height="10" viewBox="0 0 12 10" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3.86368 9.12226C3.82463 9.16131 3.76131 9.16131 3.72226 9.12226L0.146522 5.54652C-0.0487403 5.35126 -0.0487401 5.03468 0.146522 4.83942L0.839416 4.14652C1.03468 3.95126 1.35126 3.95126 1.54652 4.14652L3.72226 6.32226C3.76131 6.36131 3.82463 6.36131 3.86368 6.32226L10.0394 0.146522C10.2347 -0.0487398 10.5513 -0.0487399 10.7465 0.146522L11.4394 0.839416C11.6347 1.03468 11.6347 1.35126 11.4394 1.54652L3.86368 9.12226Z" fill="currentColor"/></svg>');class M extends HTMLElement{static get observedAttributes(){return["name","width","height"]}constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.render()}attributeChangedCallback(){this.render()}render(){const t=this.getAttribute("name"),e=p.get(t);if(!e){this.shadowRoot.innerHTML='<span style="color:red;">?</span>';return}const i=document.createElement("template");i.innerHTML=e.trim();const r=i.content.cloneNode(!0),s=r.firstElementChild;if(s&&s.style){const n=this.getAttribute("width"),c=this.getAttribute("height");n&&s.setAttribute("width",n),c&&s.setAttribute("height",c),s.style.display="block"}this.shadowRoot.innerHTML="",this.shadowRoot.appendChild(r)}}customElements.define("eui-icon",M);class z extends HTMLElement{static get observedAttributes(){return["label","value","id","type","filled"]}constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=`
46
+ `}connectedCallback(){this.avatar=this.shadowRoot.querySelector(".avatar"),this.initials=this.shadowRoot.querySelector("#initials");const t=this.shadowRoot.querySelector("slot"),e=t&&t.assignedNodes().length>0;if(e){const i=t.assignedNodes()[0];i&&i.tagName==="IMG"&&(this.initials.style.display="none",this.avatar.style.backgroundColor="transparent")}else this.hasAttribute("color")&&(this.avatar.style.backgroundColor=this.getAttribute("color"));if(this.hasAttribute("color")&&(this.avatar.style.backgroundColor=this.getAttribute("color")),this.hasAttribute("size")){const i=this.getAttribute("size");this.avatar.style.width=i+"px",this.avatar.style.height=i+"px",this.initials.style.fontSize=i/2+"px"}if(this.hasAttribute("border-radius")&&(this.avatar.style.borderRadius=this.getAttribute("border-radius")+"px"),this.hasAttribute("name")&&(this.avatar.title=this.getAttribute("name")),!e&&this.hasAttribute("name")){const a=this.getAttribute("name").trim().split(/\s+/);let n="";a.length===1?n=a[0][0]||"":n=(a[0][0]||"")+(a[a.length-1][0]||""),this.initials.textContent=n.toUpperCase()}}}customElements.define("eui-avatar",m);const u=(()=>{let o={};return{register(t,e){o[t]=e},get(t){return o[t]||""}}})();u.register("menu",'<svg width="24" height="24" viewBox="0 0 24 24" focusable="false"><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z" fill="currentColor"></path></svg>'),u.register("home",'<svg width="22" height="21" viewBox="0 0 22 21" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M11.5258 0.204649C11.2291 -0.0682165 10.7709 -0.0682161 10.4742 0.204649L0.249923 9.68588C-0.266994 10.1612 0.0714693 11.0197 0.775759 11.0197L3.48971 11.0197V18.6923C3.48971 19.542 4.18295 20.2308 5.03811 20.2308H16.9619C17.8171 20.2308 18.5103 19.542 18.5103 18.6923V11.0197L21.2242 11.0197C21.9285 11.0197 22.267 10.1612 21.7501 9.68588L11.5258 0.204649Z" fill="currentColor"/></svg>'),u.register("kit",'<svg width="26" height="28" viewBox="0 0 26 28" xmlns="http://www.w3.org/2000/svg"><path d="m13.118 14.831c0.433 0 1.257-0.024 1.795-0.344l9.151-4.057c0.869-0.59 1.051-1.255 1.067-1.773 0.02-0.662-0.313-1.634-1.181-2.15l-8.515-3.921c-0.537-0.309-2.096-0.552-2.529-0.552-0.444 0-1.958 0.42-2.496 0.73l-8.643 4.034c-0.85 0.602-1.022 1.284-0.951 1.942 0.098 0.887 0.206 0.857 0.889 1.503l9.577 4.212c0.537 0.32 1.391 0.376 1.836 0.376zm-0.12 5.467c0.403 0 1.443-0.068 1.928-0.345l8.858-3.991c0.497-0.3 1.448-1.117 1.382-1.952-0.091-1.138-0.598-1.7-0.948-1.906l-9.22 3.888c-0.454 0.261-1.417 0.478-1.916 0.478-0.542 0-1.539-0.228-1.766-0.362l-9.395-4.012c-0.462 0.022-1.174 0.911-1.201 1.642-0.03 0.761 0.7 1.62 1.135 1.839l9.408 4.384c0.485 0.278 1.322 0.337 1.735 0.337zm0.09 5.344c0.403 0 1.296-0.053 1.781-0.342l9.147-4.299c0.485-0.289 1.129-0.789 1.053-1.879-0.056-0.794-0.071-1.123-0.918-1.765l-9.203 4.113c-0.228 0.134-0.948 0.39-1.853 0.39-0.939 0-1.603-0.224-1.831-0.359l-9.451-4.017c-0.979 0.247-1.005 1.45-1.005 1.947 0 0.455 0.403 1.279 0.9 1.568l9.465 4.262c0.486 0.29 1.502 0.381 1.915 0.381z" fill="currentColor"></path></svg>'),u.register("settings",'<svg width="20" height="21" viewBox="0 0 20 21" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M0.644169 15.2044C0.751639 15.4175 0.866389 15.627 0.988219 15.8323C1.34503 16.445 1.76284 17.0223 2.23048 17.545C2.3967 17.7307 2.65856 17.7968 2.89375 17.7126L5.25826 16.8621C5.96645 16.608 6.74841 17.07 6.87902 17.8018L7.32018 20.2764C7.36418 20.5227 7.55119 20.7167 7.79454 20.7688C8.86201 20.9976 9.95753 21.057 11.0418 20.9452C11.427 20.9061 11.8095 20.8457 12.1863 20.7643C12.375 20.7232 12.5303 20.5969 12.6121 20.4275C12.6441 20.37 12.6671 20.3068 12.6794 20.2397L13.132 17.7739C13.1978 17.4162 13.4191 17.1252 13.7102 16.9498C13.7478 16.9275 13.7867 16.9072 13.8264 16.8889C14.1041 16.7654 14.426 16.7408 14.7301 16.8496L17.0889 17.6938C17.2068 17.7362 17.3318 17.7406 17.4482 17.7107C17.5805 17.6872 17.7044 17.6208 17.7983 17.5172C18.2857 16.9783 18.7189 16.3833 19.0875 15.7497C19.4503 15.1137 19.748 14.4403 19.9703 13.7471C20.0128 13.6142 20.0083 13.4742 19.9629 13.3481C19.9307 13.2315 19.8646 13.1245 19.7685 13.043L17.8596 11.4179C17.6114 11.2067 17.4714 10.912 17.4409 10.6065C17.4371 10.563 17.4355 10.5194 17.4361 10.4758C17.444 10.1379 17.5847 9.80337 17.8591 9.56905L19.7638 7.94348C19.8146 7.90007 19.857 7.84958 19.8904 7.7944C19.9978 7.63842 20.0299 7.43844 19.9706 7.25291C19.8534 6.88733 19.7151 6.52704 19.5572 6.17466C19.1114 5.17572 18.5115 4.2528 17.7787 3.43934C17.612 3.25429 17.3509 3.18886 17.1161 3.27382L14.7569 4.12827C14.0592 4.38082 13.2679 3.93321 13.1344 3.19155L12.6871 0.714256C12.6423 0.468053 12.4542 0.273849 12.2106 0.22246C11.5182 0.0764882 10.803 0.00250031 10.088 0.000608251C9.88769 -0.0015584 9.68739 0.002064 9.48735 0.0114648C8.92415 0.0369819 8.36389 0.107332 7.81778 0.222459C7.78135 0.230146 7.74615 0.241028 7.71249 0.2548C7.5098 0.328781 7.35888 0.505679 7.31996 0.723547L6.8788 3.19817C6.81394 3.56157 6.58834 3.85866 6.29097 4.03446C5.98991 4.2061 5.61923 4.25412 5.27153 4.12827L2.91237 3.27382C2.70694 3.1995 2.48138 3.24016 2.31657 3.37545C2.2857 3.39886 2.25676 3.42543 2.23026 3.45505C1.81793 3.91588 1.44433 4.4192 1.11714 4.95183C1.05788 5.04799 1.00019 5.14513 0.944072 5.24319C0.878302 5.35619 0.814661 5.4704 0.753186 5.58577C0.464267 6.12611 0.222113 6.69081 0.0338354 7.26739C0.0213426 7.30567 0.0127871 7.34455 0.00802709 7.38352C-0.0257478 7.59364 0.0518458 7.809 0.218337 7.94974L2.13633 9.56992C2.41146 9.80242 2.55518 10.1364 2.56469 10.4743C2.56917 10.8294 2.42529 11.1857 2.13611 11.4301L0.218115 13.0503C0.0484589 13.1937 -0.0289685 13.4145 0.00982709 13.6284C0.0147983 13.6634 0.0228404 13.6982 0.0340542 13.7326C0.198098 14.235 0.403035 14.7283 0.644169 15.2044ZM10 14.5C12.2091 14.5 14 12.7091 14 10.5C14 8.29086 12.2091 6.5 10 6.5C7.79086 6.5 6 8.29086 6 10.5C6 12.7091 7.79086 14.5 10 14.5Z" fill="currentColor"></path></svg>'),u.register("home",'<svg width="22" height="21" viewBox="0 0 22 21" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M11.5258 0.204649C11.2291 -0.0682165 10.7709 -0.0682161 10.4742 0.204649L0.249923 9.68588C-0.266994 10.1612 0.0714693 11.0197 0.775759 11.0197L3.48971 11.0197V18.6923C3.48971 19.542 4.18295 20.2308 5.03811 20.2308H16.9619C17.8171 20.2308 18.5103 19.542 18.5103 18.6923V11.0197L21.2242 11.0197C21.9285 11.0197 22.267 10.1612 21.7501 9.68588L11.5258 0.204649Z" fill="currentColor"/></svg>'),u.register("copy",'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M2 11C2 11.7956 2.31607 12.5587 2.87868 13.1213C3.44129 13.6839 4.20435 14 5 14H11C11.7956 14 12.5587 13.6839 13.1213 13.1213C13.6839 12.5587 14 11.7956 14 11V8H11.75C10.7554 8 9.80161 7.60491 9.09835 6.90165C8.39509 6.19839 8 5.24456 8 4.25V2H5C4.20435 2 3.44129 2.31607 2.87868 2.87868C2.31607 3.44129 2 4.20435 2 5V11Z" fill="currentColor"/><path d="M13.7975 6.49965C13.6881 6.25457 13.5357 6.03105 13.3475 5.83965L10.16 2.65965C9.96921 2.4688 9.74565 2.31384 9.5 2.20215V4.24965C9.5 4.54512 9.5582 4.8377 9.67127 5.11069C9.78434 5.38367 9.95008 5.63171 10.159 5.84064C10.3679 6.04957 10.616 6.2153 10.889 6.32838C11.1619 6.44145 11.4545 6.49965 11.75 6.49965H13.7975Z" fill="currentColor"/></svg>'),u.register("arrow",'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path d="M9.3 5.3a1 1 0 0 0 0 1.4l5.29 5.3-5.3 5.3a1 1 0 1 0 1.42 1.4l6-6a1 1 0 0 0 0-1.4l-6-6a1 1 0 0 0-1.42 0Z"></path></svg>'),u.register("back",'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2" style="transform: rotate(180deg)"><path d="M9.3 5.3a1 1 0 0 0 0 1.4l5.29 5.3-5.3 5.3a1 1 0 1 0 1.42 1.4l6-6a1 1 0 0 0 0-1.4l-6-6a1 1 0 0 0-1.42 0Z"></path></svg>'),u.register("check",'<svg width="12" height="10" viewBox="0 0 12 10" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3.86368 9.12226C3.82463 9.16131 3.76131 9.16131 3.72226 9.12226L0.146522 5.54652C-0.0487403 5.35126 -0.0487401 5.03468 0.146522 4.83942L0.839416 4.14652C1.03468 3.95126 1.35126 3.95126 1.54652 4.14652L3.72226 6.32226C3.76131 6.36131 3.82463 6.36131 3.86368 6.32226L10.0394 0.146522C10.2347 -0.0487398 10.5513 -0.0487399 10.7465 0.146522L11.4394 0.839416C11.6347 1.03468 11.6347 1.35126 11.4394 1.54652L3.86368 9.12226Z" fill="currentColor"/></svg>');class A extends HTMLElement{static get observedAttributes(){return["name","width","height"]}constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.render()}attributeChangedCallback(){this.render()}render(){const t=this.getAttribute("name"),e=u.get(t);if(!e){this.shadowRoot.innerHTML='<span style="color:red;">?</span>';return}const i=document.createElement("template");i.innerHTML=e.trim();const a=i.content.cloneNode(!0),n=a.firstElementChild;if(n&&n.style){const r=this.getAttribute("width"),l=this.getAttribute("height");r&&n.setAttribute("width",r),l&&n.setAttribute("height",l),n.style.display="block"}this.shadowRoot.innerHTML="",this.shadowRoot.appendChild(a)}}customElements.define("eui-icon",A);class L extends HTMLElement{static get observedAttributes(){return["label","value","id","type","filled"]}constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=`
47
47
  <style>
48
48
  .form {
49
49
  display: flex;
@@ -143,7 +143,7 @@
143
143
  <input class="form-input" placeholder=" ">
144
144
  <label></label>
145
145
  </div>
146
- `}connectedCallback(){this.form=this.shadowRoot.querySelector(".form"),this.inputEl=this.shadowRoot.querySelector(".form-input"),this.labelEl=this.shadowRoot.querySelector("label"),this.hasAttribute("value")&&(this.inputEl.value=this.getAttribute("value")),this.hasAttribute("id")&&(this.inputEl.id=this.getAttribute("id")),this.hasAttribute("label")&&(this.labelEl.textContent=this.getAttribute("label")),this.hasAttribute("type")&&(this.inputEl.type=this.getAttribute("type")),this.hasAttribute("filled")&&this.form.classList.add("filled"),this.inputEl.addEventListener("input",()=>{this.setAttribute("value",this.inputEl.value)})}attributeChangedCallback(t,e,i){if(!(!this.inputEl||!this.labelEl))switch(t){case"value":this.inputEl.value!==i&&(this.inputEl.value=i);break;case"id":this.inputEl.id=i;break;case"label":this.labelEl.textContent=i;break}}get value(){return this.inputEl.value}set value(t){this.setAttribute("value",t)}}customElements.define("eui-input",z);class T extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=`
146
+ `}connectedCallback(){this.form=this.shadowRoot.querySelector(".form"),this.inputEl=this.shadowRoot.querySelector(".form-input"),this.labelEl=this.shadowRoot.querySelector("label"),this.hasAttribute("value")&&(this.inputEl.value=this.getAttribute("value")),this.hasAttribute("id")&&(this.inputEl.id=this.getAttribute("id")),this.hasAttribute("label")&&(this.labelEl.textContent=this.getAttribute("label")),this.hasAttribute("type")&&(this.inputEl.type=this.getAttribute("type")),this.hasAttribute("filled")&&this.form.classList.add("filled"),this.inputEl.addEventListener("input",t=>{this.setAttribute("value",this.inputEl.value),this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))}),this.inputEl.addEventListener("change",t=>{this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))})}attributeChangedCallback(t,e,i){if(!(!this.inputEl||!this.labelEl))switch(t){case"value":this.inputEl.value!==i&&(this.inputEl.value=i);break;case"id":this.inputEl.id=i;break;case"label":this.labelEl.textContent=i;break}}get value(){return this.inputEl.value}set value(t){this.setAttribute("value",t)}}customElements.define("eui-input",L);class S extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=`
147
147
  <style>
148
148
  .loader {
149
149
  width: 24px;
@@ -188,7 +188,7 @@
188
188
  <span class="loader animate">
189
189
  <svg viewBox="0 0 16 16"><circle class="loader-icon" cx="8px" cy="8px" r="7px"></circle></svg>
190
190
  </span>
191
- `}}customElements.define("eui-loader",T);class $ extends HTMLElement{static get observedAttributes(){return["value","intermediate","id"]}constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=`
191
+ `}}customElements.define("eui-loader",S);class M extends HTMLElement{static get observedAttributes(){return["value","intermediate","id"]}constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=`
192
192
  <style>
193
193
  .progressbar {
194
194
  width: 100%;
@@ -232,7 +232,7 @@
232
232
  <div class="progressbar">
233
233
  <span class="progress"></span>
234
234
  </div>
235
- `}set value(t){this.setAttribute("value",t)}attributeChangedCallback(){this.connectedCallback()}connectedCallback(){const t=this.shadowRoot.querySelector(".progress");this.hasAttribute("id")&&(this.progress.id=this.getAttribute("id")),this.hasAttribute("intermediate")&&t.classList.add("intermediate"),this.hasAttribute("value")&&(t.style.width=this.getAttribute("value")+"%")}}customElements.define("eui-progressbar",$);const v={is:{iPhone:/iPhone/.test(navigator.userAgent),iPad:/iPad/.test(navigator.userAgent),iOS:/iPhone|iPad|iPod/.test(navigator.userAgent),android:/Android/.test(navigator.userAgent),mobile:/Mobi|Android/i.test(navigator.userAgent)},prefers:{language:navigator.language||navigator.userLanguage,reducedMotion:window.matchMedia("(prefers-reduced-motion: reduce)").matches,reducedTransparency:window.matchMedia("(prefers-reduced-transparency: reduce)").matches},supports:{share:typeof navigator.share=="function",directDownload:"download"in document.createElement("a"),haptics:"vibrate"in navigator||"Vibrate"in window||typeof window.navigator.vibrate=="function"},userAgent:navigator.userAgent},R=Object.freeze(Object.defineProperty({__proto__:null,device:v},Symbol.toStringTag,{value:"Module"}));function H(){try{const o=document.createElement("label");o.ariaHidden="true",o.style.display="none";const t=document.createElement("input");t.type="checkbox",t.setAttribute("switch",""),o.appendChild(t),document.head.appendChild(o),o.click(),document.head.removeChild(o)}catch{}}function x(o){v.supports.haptics?navigator.vibrate(o||50):v.is.iPhone&&H()}const _=Object.freeze(Object.defineProperty({__proto__:null,haptic:x},Symbol.toStringTag,{value:"Module"})),E=(()=>{let o={},t;try{o=JSON.parse(localStorage.getItem(t)||"{}")}catch(e){console.error(e)}return{get(e){return o[e]},set(e,i){o[e]=i,localStorage.setItem(t,JSON.stringify(o))},delete(e){delete o[e],localStorage.setItem(t,JSON.stringify(o))},all(){return o},clear(){o={},localStorage.setItem(t,JSON.stringify(o))},name(e){t=e;try{o=JSON.parse(localStorage.getItem(t)||"{}")}catch(i){console.error(i)}},settings:{get(e){return o&&o.settings&&o.settings[e]},set(e,i){o.settings||(o.settings={}),o.settings[e]=i,localStorage.setItem(t,JSON.stringify(o))},delete(e){o.settings&&(delete o.settings[e],localStorage.setItem(t,JSON.stringify(o)))},all(){return o.settings||{}},clear(){o.settings&&(o.settings={},localStorage.setItem(t,JSON.stringify(o)))}}}})(),A=E.settings,F=Object.freeze(Object.defineProperty({__proto__:null,settings:A,storage:E},Symbol.toStringTag,{value:"Module"}));class I extends HTMLElement{static get observedAttributes(){return["selected"]}constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=`
235
+ `}set value(t){this.setAttribute("value",t)}attributeChangedCallback(){this.connectedCallback()}connectedCallback(){const t=this.shadowRoot.querySelector(".progress");this.hasAttribute("id")&&(this.progress.id=this.getAttribute("id")),this.hasAttribute("intermediate")&&t.classList.add("intermediate"),this.hasAttribute("value")&&(t.style.width=this.getAttribute("value")+"%")}}customElements.define("eui-progressbar",M);const v={is:{iPhone:/iPhone/.test(navigator.userAgent),iPad:/iPad/.test(navigator.userAgent),iOS:/iPhone|iPad|iPod/.test(navigator.userAgent),android:/Android/.test(navigator.userAgent),mobile:/Mobi|Android/i.test(navigator.userAgent)},prefers:{language:navigator.language||navigator.userLanguage,reducedMotion:window.matchMedia("(prefers-reduced-motion: reduce)").matches,reducedTransparency:window.matchMedia("(prefers-reduced-transparency: reduce)").matches},supports:{share:typeof navigator.share=="function",directDownload:"download"in document.createElement("a"),haptics:"vibrate"in navigator||"Vibrate"in window||typeof window.navigator.vibrate=="function"},userAgent:navigator.userAgent},z=Object.freeze(Object.defineProperty({__proto__:null,device:v},Symbol.toStringTag,{value:"Module"}));function T(){try{const o=document.createElement("label");o.ariaHidden="true",o.style.display="none";const t=document.createElement("input");t.type="checkbox",t.setAttribute("switch",""),o.appendChild(t),document.head.appendChild(o),o.click(),document.head.removeChild(o)}catch{}}function x(o){v.supports.haptics?navigator.vibrate(o||50):v.is.iPhone&&T()}const $=Object.freeze(Object.defineProperty({__proto__:null,haptic:x},Symbol.toStringTag,{value:"Module"})),C=(()=>{let o={},t;try{o=JSON.parse(localStorage.getItem(t)||"{}")}catch(e){console.error(e)}return{get(e){return o[e]},set(e,i){o[e]=i,localStorage.setItem(t,JSON.stringify(o))},delete(e){delete o[e],localStorage.setItem(t,JSON.stringify(o))},all(){return o},clear(){o={},localStorage.setItem(t,JSON.stringify(o))},name(e){t=e;try{o=JSON.parse(localStorage.getItem(t)||"{}")}catch(i){console.error(i)}},settings:{get(e){return o&&o.settings&&o.settings[e]},set(e,i){o.settings||(o.settings={}),o.settings[e]=i,localStorage.setItem(t,JSON.stringify(o))},delete(e){o.settings&&(delete o.settings[e],localStorage.setItem(t,JSON.stringify(o)))},all(){return o.settings||{}},clear(){o.settings&&(o.settings={},localStorage.setItem(t,JSON.stringify(o)))}}}})(),R=C.settings,H=Object.freeze(Object.defineProperty({__proto__:null,settings:R,storage:C},Symbol.toStringTag,{value:"Module"}));class _ extends HTMLElement{static get observedAttributes(){return["selected"]}constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=`
236
236
  <style>
237
237
  .switch {
238
238
  background-color: var(--app-200);
@@ -301,7 +301,7 @@
301
301
  <input type="checkbox" role="switch">
302
302
  <span class="handle"></span>
303
303
  </div>
304
- `}connectedCallback(){this.inputEl=this.shadowRoot.querySelector("input"),this.switchEl=this.shadowRoot.querySelector(".switch"),this.updateFromAttribute(),this.switchEl.addEventListener("click",()=>this.toggle())}toggle(){this.selected=!this.selected,x()}updateFromAttribute(){const t=this.hasAttribute("selected");this.inputEl.checked=t,this.switchEl.classList.toggle("selected",t)}attributeChangedCallback(t,e,i){t==="selected"&&this.inputEl&&this.updateFromAttribute()}get selected(){return this.hasAttribute("selected")}set selected(t){t?this.setAttribute("selected",""):this.removeAttribute("selected")}}customElements.define("eui-switch",I);class j extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.shadowRoot.innerHTML=`
304
+ `}connectedCallback(){this.inputEl=this.shadowRoot.querySelector("input"),this.switchEl=this.shadowRoot.querySelector(".switch"),this.updateFromAttribute(),this.switchEl.addEventListener("click",()=>this.toggle())}toggle(){this.selected=!this.selected,x(),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}updateFromAttribute(){const t=this.hasAttribute("selected");this.inputEl.checked=t,this.switchEl.classList.toggle("selected",t)}attributeChangedCallback(t,e,i){t==="selected"&&this.inputEl&&this.updateFromAttribute()}get selected(){return this.hasAttribute("selected")}set selected(t){t?this.setAttribute("selected",""):this.removeAttribute("selected")}}customElements.define("eui-switch",_);class F extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.shadowRoot.innerHTML=`
305
305
  <style>
306
306
  :host {
307
307
  display: inline-flex;
@@ -346,7 +346,7 @@
346
346
  }
347
347
  </style>
348
348
  <slot></slot>
349
- `,this.addEventListener("pointerdown",t=>{const e=document.createElement("span"),i=t.currentTarget,r=Math.max(i.offsetWidth,i.offsetHeight);e.classList.add("ripple"),e.style.left=t.clientX-i.getBoundingClientRect().left-r/2+"px",e.style.top=t.clientY-i.getBoundingClientRect().top-r/2+"px",e.style.width=r+"px",e.style.height=r+"px",this.shadowRoot.appendChild(e),setTimeout(()=>{e.remove()},600)})}}customElements.define("eui-chip",j);const f="",w=(()=>{const o=[];function t(a,l){const u=[],b=a.replace(/:([^/]+)/g,(y,k)=>(u.push(k),"([^/]+)")).replace(/\//g,"\\/"),m=new RegExp(`^${f}${b}$`);o.push({regex:m,paramNames:u,renderFn:l})}function e(a){for(const{regex:l,paramNames:u,renderFn:b}of o){const m=a.match(l);if(m){const y={};return u.forEach((k,Y)=>{y[k]=decodeURIComponent(m[Y+1])}),{renderFn:b,params:y}}}return null}function i(a,l=!0){a.startsWith(f)||(a=f+(a.startsWith("/")?"":"/")+a);const u=a.split(/[?#]/)[0];if(u===window.location.pathname&&a.includes("#")){l&&history.pushState({},"",a);const m="#"+a.split("#")[1];r(m);return}const b=e(u);if(b)if(l&&history.pushState({},"",a),b.renderFn(b.params),window.dispatchEvent(new CustomEvent("route-changed",{detail:{path:a}})),a.includes("#")){const m="#"+a.split("#")[1];setTimeout(()=>r(m),100)}else{const m=document.getElementById("main");m&&m.scrollTo(0,0)}else s?(l&&history.pushState({},"",a),s()):console.warn(`No route found for ${u}`)}function r(a){if(a)try{const l=document.querySelector(a);l&&l.scrollIntoView({behavior:"smooth"})}catch{console.warn("Invalid hash:",a)}}let s=null;function n(a){s=a}function c(){history.back()}function d(){return window.location.pathname.replace(f,"")||"/"}return window.addEventListener("popstate",()=>{const a=window.location.pathname+window.location.search+window.location.hash;i(a,!1)}),window.addEventListener("click",a=>{if(a.button!==0||a.metaKey||a.altKey||a.ctrlKey||a.shiftKey)return;const l=a.target.closest("a");if(!l||l.hasAttribute("download")||l.getAttribute("target")==="_blank")return;const u=l.getAttribute("href");if(!(!u||u.startsWith("http")&&!u.startsWith(window.location.origin))){if(a.preventDefault(),u.startsWith("#")){history.pushState({},"",u),r(u);return}i(u)}}),{add:t,navigate:i,back:c,location:d,setNotFound:n}})();async function q(o){try{const t=document.getElementById("main");t.classList.add("fade-out"),await new Promise(i=>setTimeout(i,200));const e=await fetch(`/src/pages/${o}.html`).then(i=>i.text());t.innerHTML=e,t.classList.remove("fade-out"),t.classList.add("fade-in"),window.location.hash?setTimeout(()=>{try{const i=document.querySelector(window.location.hash);i&&i.scrollIntoView({behavior:"smooth"})}catch{}},100):t&&t.scrollTo(0,0),setTimeout(()=>{t.classList.remove("fade-in")},200)}catch(t){console.error("Page load failed:",t)}}class B extends HTMLElement{constructor(){super();C(this,"handleClick",()=>{const e=this.getAttribute("path");e&&w.navigate(e)});this.attachShadow({mode:"open"})}static get observedAttributes(){return["path","icon","label","badge","active","avatar-src","avatar-name"]}connectedCallback(){this.hasRendered||(this.render(),this.setupEventListeners(),this.hasRendered=!0),this.updateContent(),this.addEventListener("click",this.handleClick)}disconnectedCallback(){this.removeEventListener("click",this.handleClick)}attributeChangedCallback(e,i,r){if(i!==r&&this.hasRendered){if(e==="active")return;this.updateContent()}}setupEventListeners(){this.addEventListener("pointerdown",e=>{const i=document.createElement("span"),r=e.currentTarget,s=r.getBoundingClientRect(),n=Math.max(r.offsetWidth,r.offsetHeight),c=n/2;i.classList.add("ripple"),i.style.width=`${n}px`,i.style.height=`${n}px`,i.style.left=`${e.clientX-s.left-c}px`,i.style.top=`${e.clientY-s.top-c}px`,this.shadowRoot.appendChild(i),i.addEventListener("animationend",()=>{i.remove()})})}updateContent(){const e=this.getAttribute("icon"),i=this.getAttribute("avatar-src"),r=this.getAttribute("avatar-name"),s=this.getAttribute("label")||"",n=this.getAttribute("badge"),c=this.shadowRoot.querySelector(".badge");if(n)if(c)c.textContent=n;else{const l=document.createElement("span");l.className="badge",l.textContent=n,this.shadowRoot.appendChild(l)}else c&&c.remove();const d=this.shadowRoot.querySelector("slot[name='icon']");if(d)if(i||r){let l='<eui-avatar size="24"';r&&(l+=` name="${r}"`),l+=">",i&&(l+=`<img src="${i}" alt="${r||"Avatar"}" />`),l+="</eui-avatar>",d.innerHTML=l}else{const l=d.querySelector("eui-icon");e&&l?l.getAttribute("name")!==e&&l.setAttribute("name",e):e?d.innerHTML=`<eui-icon width="24" height="24" name="${e}"></eui-icon>`:d.innerHTML=""}const a=this.shadowRoot.querySelector(".label");a&&(a.textContent=s)}render(){this.shadowRoot.innerHTML=`
349
+ `,this.addEventListener("pointerdown",t=>{const e=document.createElement("span"),i=t.currentTarget,a=Math.max(i.offsetWidth,i.offsetHeight);e.classList.add("ripple"),e.style.left=t.clientX-i.getBoundingClientRect().left-a/2+"px",e.style.top=t.clientY-i.getBoundingClientRect().top-a/2+"px",e.style.width=a+"px",e.style.height=a+"px",this.shadowRoot.appendChild(e),setTimeout(()=>{e.remove()},600)})}}customElements.define("eui-chip",F);const f="",w=(()=>{const o=[];function t(s,d){const h=[],b=s.replace(/:([^/]+)/g,(y,k)=>(h.push(k),"([^/]+)")).replace(/\//g,"\\/"),g=new RegExp(`^${f}${b}$`);o.push({regex:g,paramNames:h,renderFn:d})}function e(s){for(const{regex:d,paramNames:h,renderFn:b}of o){const g=s.match(d);if(g){const y={};return h.forEach((k,K)=>{y[k]=decodeURIComponent(g[K+1])}),{renderFn:b,params:y}}}return null}function i(s,d=!0){s.startsWith(f)||(s=f+(s.startsWith("/")?"":"/")+s);const h=s.split(/[?#]/)[0];if(h===window.location.pathname&&s.includes("#")){d&&history.pushState({},"",s);const g="#"+s.split("#")[1];a(g);return}const b=e(h);if(b)if(d&&history.pushState({},"",s),b.renderFn(b.params),window.dispatchEvent(new CustomEvent("route-changed",{detail:{path:s}})),s.includes("#")){const g="#"+s.split("#")[1];setTimeout(()=>a(g),100)}else{const g=document.getElementById("main");g&&g.scrollTo(0,0)}else n?(d&&history.pushState({},"",s),n()):console.warn(`No route found for ${h}`)}function a(s){if(s)try{const d=document.querySelector(s);d&&d.scrollIntoView({behavior:"smooth"})}catch{console.warn("Invalid hash:",s)}}let n=null;function r(s){n=s}function l(){history.back()}function c(){return window.location.pathname.replace(f,"")||"/"}return window.addEventListener("popstate",()=>{const s=window.location.pathname+window.location.search+window.location.hash;i(s,!1)}),window.addEventListener("click",s=>{if(s.button!==0||s.metaKey||s.altKey||s.ctrlKey||s.shiftKey)return;const d=s.target.closest("a");if(!d||d.hasAttribute("download")||d.getAttribute("target")==="_blank")return;const h=d.getAttribute("href");if(!(!h||h.startsWith("http")&&!h.startsWith(window.location.origin))){if(s.preventDefault(),h.startsWith("#")){history.pushState({},"",h),a(h);return}i(h)}}),{add:t,navigate:i,back:l,location:c,setNotFound:r}})();async function I(o){try{const t=document.getElementById("main");t.classList.add("fade-out"),await new Promise(i=>setTimeout(i,200));const e=await fetch(`/src/pages/${o}.html`).then(i=>i.text());t.innerHTML=e,t.classList.remove("fade-out"),t.classList.add("fade-in"),window.location.hash?setTimeout(()=>{try{const i=document.querySelector(window.location.hash);i&&i.scrollIntoView({behavior:"smooth"})}catch{}},100):t&&t.scrollTo(0,0),setTimeout(()=>{t.classList.remove("fade-in")},200)}catch(t){console.error("Page load failed:",t)}}class j extends HTMLElement{static get observedAttributes(){return["path","icon","label","badge","active","avatar-src","avatar-name"]}constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.hasRendered||(this.render(),this.setupEventListeners(),this.hasRendered=!0),this.updateContent(),this.addEventListener("click",this.handleClick)}disconnectedCallback(){this.removeEventListener("click",this.handleClick)}attributeChangedCallback(t,e,i){if(e!==i&&this.hasRendered){if(t==="active")return;this.updateContent()}}handleClick=()=>{const t=this.getAttribute("path");t&&w.navigate(t)};setupEventListeners(){this.addEventListener("pointerdown",t=>{const e=document.createElement("span"),i=t.currentTarget,a=i.getBoundingClientRect(),n=Math.max(i.offsetWidth,i.offsetHeight),r=n/2;e.classList.add("ripple"),e.style.width=`${n}px`,e.style.height=`${n}px`,e.style.left=`${t.clientX-a.left-r}px`,e.style.top=`${t.clientY-a.top-r}px`,this.shadowRoot.appendChild(e),e.addEventListener("animationend",()=>{e.remove()})})}updateContent(){const t=this.getAttribute("icon"),e=this.getAttribute("avatar-src"),i=this.getAttribute("avatar-name"),a=this.getAttribute("label")||"",n=this.getAttribute("badge"),r=this.shadowRoot.querySelector(".badge");if(n)if(r)r.textContent=n;else{const s=document.createElement("span");s.className="badge",s.textContent=n,this.shadowRoot.appendChild(s)}else r&&r.remove();const l=this.shadowRoot.querySelector("slot[name='icon']");if(l)if(e||i){let s='<eui-avatar size="24"';i&&(s+=` name="${i}"`),s+=">",e&&(s+=`<img src="${e}" alt="${i||"Avatar"}" />`),s+="</eui-avatar>",l.innerHTML=s}else{const s=l.querySelector("eui-icon");t&&s?s.getAttribute("name")!==t&&s.setAttribute("name",t):t?l.innerHTML=`<eui-icon width="24" height="24" name="${t}"></eui-icon>`:l.innerHTML=""}const c=this.shadowRoot.querySelector(".label");c&&(c.textContent=a)}render(){this.shadowRoot.innerHTML=`
350
350
  <style>
351
351
  :host {
352
352
  position: relative;
@@ -451,7 +451,7 @@
451
451
  </slot>
452
452
  </div>
453
453
  <span class="label"></span>
454
- `}}customElements.define("eui-nav-item",B);class N extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.updateActiveState(),window.addEventListener("popstate",()=>this.updateActiveState()),window.addEventListener("route-changed",()=>this.updateActiveState()),window.addEventListener("toggle-nav",()=>this.classList.toggle("expanded"))}render(){this.shadowRoot.innerHTML=`
454
+ `}}customElements.define("eui-nav-item",j);class B extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.updateActiveState(),window.addEventListener("popstate",()=>this.updateActiveState()),window.addEventListener("route-changed",()=>this.updateActiveState()),window.addEventListener("toggle-nav",()=>this.classList.toggle("expanded"))}render(){this.shadowRoot.innerHTML=`
455
455
  <style>
456
456
  :host {
457
457
  position: fixed;
@@ -551,10 +551,10 @@
551
551
  <div class="app-nav-container">
552
552
  <a href="#content" id="skip_navigation_link">Skip To Content</a>
553
553
  <div class="nav-items">
554
- ${this.navItems.map(t=>{var r,s;if(t.type==="divider")return'<div style="height: 1px; background: var(--app-300); margin: 0.5rem 0;"></div>';const e=((r=t.avatar)==null?void 0:r.src)||"",i=((s=t.avatar)==null?void 0:s.name)||"";return`<eui-nav-item path="${t.path}" icon="${t.icon}" avatar-src="${e}" avatar-name="${i}" label="${t.label}"></eui-nav-item>`}).join("")}
554
+ ${this.navItems.map(t=>{if(t.type==="divider")return'<div style="height: 1px; background: var(--app-300); margin: 0.5rem 0;"></div>';const e=t.avatar?.src||"",i=t.avatar?.name||"";return`<eui-nav-item path="${t.path}" icon="${t.icon}" avatar-src="${e}" avatar-name="${i}" label="${t.label}"></eui-nav-item>`}).join("")}
555
555
  </div>
556
556
  </div>
557
- `}set navItems(t){this._navItems=t,this.render(),this.updateActiveState()}get navItems(){return this._navItems||[]}updateActiveState(t){t||(t=w.location()),t.startsWith("/")||(t="/"+t),this.shadowRoot.querySelectorAll("eui-nav-item").forEach(i=>{i.getAttribute("path")===t?i.setAttribute("active",""):i.removeAttribute("active")})}}customElements.define("eui-app-nav",N);class O extends HTMLElement{static get observedAttributes(){return["type","title","subtitle","img"]}constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=`
557
+ `}set navItems(t){this._navItems=t,this.render(),this.updateActiveState()}get navItems(){return this._navItems||[]}updateActiveState(t){t||(t=w.location()),t.startsWith("/")||(t="/"+t),this.shadowRoot.querySelectorAll("eui-nav-item").forEach(i=>{i.getAttribute("path")===t?i.setAttribute("active",""):i.removeAttribute("active")})}}customElements.define("eui-app-nav",B);class q extends HTMLElement{static get observedAttributes(){return["type","title","subtitle","img"]}constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=`
558
558
  <style>
559
559
  :host {
560
560
  border-radius: 24px;
@@ -640,10 +640,11 @@
640
640
  <p></p>
641
641
  </div>
642
642
  </div>
643
- `}connectedCallback(){this.hd=this.shadowRoot.querySelector(".header"),this.hasAttribute("type")&&this.hd.classList.add(this.getAttribute("type"))}attributeChangedCallback(t,e,i){const r=this.shadowRoot.querySelector("h1"),s=this.shadowRoot.querySelector("p"),n=this.shadowRoot.querySelector(".img");t==="title"&&(r.textContent=i),t==="subtitle"&&(s.textContent=i),t==="img"&&(n.style.backgroundImage=i?`url(${i})`:"")}}customElements.define("eui-header",O);class P extends HTMLElement{static get observedAttributes(){return["selected"]}constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=`
643
+ `}connectedCallback(){this.hd=this.shadowRoot.querySelector(".header"),this.hasAttribute("type")&&this.hd.classList.add(this.getAttribute("type"))}attributeChangedCallback(t,e,i){const a=this.shadowRoot.querySelector("h1"),n=this.shadowRoot.querySelector("p"),r=this.shadowRoot.querySelector(".img");t==="title"&&(a.textContent=i),t==="subtitle"&&(n.textContent=i),t==="img"&&(r.style.backgroundImage=i?`url(${i})`:"")}}customElements.define("eui-header",q);class N extends HTMLElement{static get observedAttributes(){return["selected"]}constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=`
644
644
  <style>
645
645
  :host {
646
- display: block;
646
+ display: inline-block;
647
+ vertical-align: bottom;
647
648
  position: relative;
648
649
  cursor: pointer;
649
650
  width: 24px;
@@ -723,7 +724,7 @@
723
724
  <rect class="mark long"></rect>
724
725
  </svg>
725
726
  </div>
726
- `}connectedCallback(){this.inputEl=this.shadowRoot.querySelector("input"),this.checkEl=this.shadowRoot.querySelector(".checkbox"),this.updateFromAttribute(),this.checkEl.addEventListener("click",()=>this.toggle())}toggle(){this.selected=!this.selected,x();const t=this.selected,e=this.dataset.setting;e&&A.set(e,t)}updateFromAttribute(){const t=this.hasAttribute("selected");this.inputEl.checked=t,this.checkEl.classList.toggle("selected",t)}attributeChangedCallback(t,e,i){t==="selected"&&this.inputEl&&this.updateFromAttribute()}get selected(){return this.hasAttribute("selected")}set selected(t){t?this.setAttribute("selected",""):this.removeAttribute("selected")}}customElements.define("eui-checkbox",P);class L extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.render()}render(){const t=this.getAttribute("href"),e=t?"a":"button";this.shadowRoot.innerHTML=`
727
+ `}connectedCallback(){this.inputEl=this.shadowRoot.querySelector("input"),this.checkEl=this.shadowRoot.querySelector(".checkbox"),this.updateFromAttribute(),this.checkEl.addEventListener("click",()=>this.toggle())}toggle(){this.selected=!this.selected,x(),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}updateFromAttribute(){const t=this.hasAttribute("selected");this.inputEl.checked=t,this.checkEl.classList.toggle("selected",t)}attributeChangedCallback(t,e,i){t==="selected"&&this.inputEl&&this.updateFromAttribute()}get selected(){return this.hasAttribute("selected")}set selected(t){t?this.setAttribute("selected",""):this.removeAttribute("selected")}}customElements.define("eui-checkbox",N);class O extends HTMLElement{static observedAttributes=["type","width","height","border-radius","icon","link","href"];constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.render()}render(){const t=this.getAttribute("href"),e=t?"a":"button";this.shadowRoot.innerHTML=`
727
728
  <style>
728
729
  button, a {
729
730
  display: flex;
@@ -829,7 +830,7 @@
829
830
  <${e}>
830
831
  <slot></slot>
831
832
  </${e}>
832
- `;const i=this.shadowRoot.querySelector(e);t&&i.setAttribute("href",t),this.hasAttribute("type")&&i.classList.add(this.getAttribute("type")),this.hasAttribute("icon")&&i.classList.add("icon"),this.hasAttribute("width")&&(i.style.width=this.getAttribute("width")+"px"),this.hasAttribute("height")&&(i.style.height=this.getAttribute("height")+"px"),this.hasAttribute("border-radius")&&(i.style.borderRadius=this.getAttribute("border-radius")+"px"),i.addEventListener("pointerdown",r=>{const s=document.createElement("span"),n=r.currentTarget,c=n.getBoundingClientRect(),d=Math.max(n.offsetWidth,n.offsetHeight),a=d/2;s.classList.add("ripple"),s.style.width=`${d}px`,s.style.height=`${d}px`,s.style.left=`${r.clientX-c.left-a}px`,s.style.top=`${r.clientY-c.top-a}px`,i.appendChild(s),s.addEventListener("animationend",()=>{s.remove()})})}}C(L,"observedAttributes",["type","width","height","border-radius","icon","link","href"]),customElements.define("eui-button",L);class V extends HTMLElement{static get observedAttributes(){return["type","anchor"]}constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.render(),this.hd=this.shadowRoot.querySelector(".hd"),this.hasAttribute("type")&&this.hd.classList.add(this.getAttribute("type"))}render(){this.shadowRoot.innerHTML=`
833
+ `;const i=this.shadowRoot.querySelector(e);t&&i.setAttribute("href",t),this.hasAttribute("type")&&i.classList.add(this.getAttribute("type")),this.hasAttribute("icon")&&i.classList.add("icon"),this.hasAttribute("width")&&(i.style.width=this.getAttribute("width")+"px"),this.hasAttribute("height")&&(i.style.height=this.getAttribute("height")+"px"),this.hasAttribute("border-radius")&&(i.style.borderRadius=this.getAttribute("border-radius")+"px"),i.addEventListener("pointerdown",a=>{const n=document.createElement("span"),r=a.currentTarget,l=r.getBoundingClientRect(),c=Math.max(r.offsetWidth,r.offsetHeight),s=c/2;n.classList.add("ripple"),n.style.width=`${c}px`,n.style.height=`${c}px`,n.style.left=`${a.clientX-l.left-s}px`,n.style.top=`${a.clientY-l.top-s}px`,i.appendChild(n),n.addEventListener("animationend",()=>{n.remove()})})}}customElements.define("eui-button",O);class P extends HTMLElement{static get observedAttributes(){return["type","anchor"]}constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.render(),this.hd=this.shadowRoot.querySelector(".hd"),this.hasAttribute("type")&&this.hd.classList.add(this.getAttribute("type"))}render(){this.shadowRoot.innerHTML=`
833
834
  <style>
834
835
  :host {
835
836
  display: block;
@@ -887,7 +888,7 @@
887
888
  <span class="anchor-hash">#</span>
888
889
  </a>
889
890
  `:""}
890
- `}}customElements.define("eui-heading",V);function D(o){const i=Date.now()-o,r=Math.floor(i/1e3),s=Math.floor(r/60),n=Math.floor(s/60),c=Math.floor(n/24),d=Math.floor(c/30),a=Math.floor(d/12);return a>0?`${a}y`:d>0?`${d}mo`:c>0?`${c}d`:n>0?`${n}h`:s>0?`${s}m`:`${r}s`}function U(o){const i=Date.now()-o,r=Math.floor(i/1e3),s=Math.floor(r/60),n=Math.floor(s/60),c=Math.floor(n/24),d=Math.floor(c/30),a=Math.floor(d/12);return a>0?`${a} year${a>1?"s":""} ago`:d>0?`${d} month${d>1?"s":""} ago`:c>0?`${c} day${c>1?"s":""} ago`:n>0?`${n} hour${n>1?"s":""} ago`:s>0?`${s} minute${s>1?"s":""} ago`:`${r} second${r>1?"s":""} ago`}function Z(o){return o.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;").replace(/`/g,"&#96;").replace(/'/g,"&#39;")}function S(o){const t=document.createElement("input");t.value=o,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}const X=Object.freeze(Object.defineProperty({__proto__:null,copystr:S,joinedAgo:U,sanitize:Z,timeAgo:D},Symbol.toStringTag,{value:"Module"}));class W extends HTMLElement{static get observedAttributes(){return["copy","id","type","language"]}constructor(){super(),this.attachShadow({mode:"open"}),this._boundCopy=this._onCopy.bind(this),this._isRendered=!1}connectedCallback(){this._isRendered||(this.render(),this._isRendered=!0)}attributeChangedCallback(t,e,i){this._isRendered&&e!==i&&this.render()}render(){const t=this.hasAttribute("copy"),e=this.getAttribute("language")||"text";this.shadowRoot.innerHTML=`
891
+ `}}customElements.define("eui-heading",P);function V(o){const i=Date.now()-o,a=Math.floor(i/1e3),n=Math.floor(a/60),r=Math.floor(n/60),l=Math.floor(r/24),c=Math.floor(l/30),s=Math.floor(c/12);return s>0?`${s}y`:c>0?`${c}mo`:l>0?`${l}d`:r>0?`${r}h`:n>0?`${n}m`:`${a}s`}function D(o){const i=Date.now()-o,a=Math.floor(i/1e3),n=Math.floor(a/60),r=Math.floor(n/60),l=Math.floor(r/24),c=Math.floor(l/30),s=Math.floor(c/12);return s>0?`${s} year${s>1?"s":""} ago`:c>0?`${c} month${c>1?"s":""} ago`:l>0?`${l} day${l>1?"s":""} ago`:r>0?`${r} hour${r>1?"s":""} ago`:n>0?`${n} minute${n>1?"s":""} ago`:`${a} second${a>1?"s":""} ago`}function U(o){return o.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;").replace(/`/g,"&#96;").replace(/'/g,"&#39;")}function E(o){const t=document.createElement("input");t.value=o,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}const Z=Object.freeze(Object.defineProperty({__proto__:null,copystr:E,joinedAgo:D,sanitize:U,timeAgo:V},Symbol.toStringTag,{value:"Module"}));class X extends HTMLElement{static get observedAttributes(){return["copy","id","type","language"]}constructor(){super(),this.attachShadow({mode:"open"}),this._boundCopy=this._onCopy.bind(this),this._isRendered=!1}connectedCallback(){this._isRendered||(this.render(),this._isRendered=!0)}attributeChangedCallback(t,e,i){this._isRendered&&e!==i&&this.render()}render(){const t=this.hasAttribute("copy"),e=this.getAttribute("language")||"text";this.shadowRoot.innerHTML=`
891
892
  <style>
892
893
  :host {
893
894
  position: relative;
@@ -940,8 +941,8 @@
940
941
 
941
942
  <pre class="${t?"g":""}"><code></code></pre>
942
943
  `,this.copyBtn=this.shadowRoot.querySelector(".copy"),this.codeEl=this.shadowRoot.querySelector("code");const i=this._getFormattedText();this.codeEl.innerHTML=this._highlight(i,e),t?this.copyBtn.addEventListener("click",this._boundCopy):this.copyBtn.style.display="none"}_getFormattedText(){let e=(this.querySelector("code")||this).innerHTML||"";e=this._unescapeHtml(e),e=e.replace(/^\s*\n/,"").replace(/\n\s*$/,"");const i=e.split(`
943
- `),r=i.filter(n=>n.trim()).map(n=>n.match(/^\s*/)[0].length),s=r.length?Math.min(...r):0;return i.map(n=>n.slice(s)).join(`
944
- `)}_unescapeHtml(t){const e=document.createElement("textarea");return e.innerHTML=t,e.value}_highlight(t,e){t=t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");const i={};let r=0;function s(n,c){const d=`__TOKEN_${c}_${r++}__`;return i[d]=`<span class="token ${c}">${n}</span>`,d}return["javascript","js","json","bash","sh","css"].includes(e)?(t=t.replace(/("(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/g,n=>s(n,"string")),e==="bash"||e==="sh"?t=t.replace(/(#.*$)/gm,n=>s(n,"comment")):e==="css"?t=t.replace(/(\/\*[\s\S]*?\*\/)/g,n=>s(n,"comment")):t=t.replace(/(\/\/.*$|\/\*[\s\S]*?\*\/)/gm,n=>s(n,"comment"))):["html","xml"].includes(e)&&(t=t.replace(/(&lt;!--[\s\S]*?--&gt;)/g,n=>s(n,"comment")),t=t.replace(/(&lt;\/?[a-z0-9:-]+)/gi,n=>s(n,"tag"))),e==="javascript"||e==="js"||e==="json"?(t=t.replace(/\b(const|let|var|if|else|for|while|return|function|class|import|export|from|default|switch|case|break|continue|new|this|async|await)\b/g,'<span class="token keyword">$1</span>'),t=t.replace(/\b(true|false|null|undefined)\b/g,'<span class="token boolean">$1</span>'),t=t.replace(/\b([a-zA-Z0-9_]+)\s*(?=\()/g,'<span class="token function">$1</span>')):e==="bash"||e==="sh"?(t=t.replace(/\b(npm|npx|node|git|cd|ls|mkdir|rm|mv|cp|echo|cat|sudo|docker|brew|grep|curl|wget|chmod|chown|touch)\b/g,'<span class="token keyword">$1</span>'),t=t.replace(/\b(install|run|build|start|test|dev|init|clone|pull|push|commit|add|checkout|branch|merge)\b/g,'<span class="token function">$1</span>'),t=t.replace(/(\s-+[a-zA-Z0-9-]+)/g,'<span class="token attr-name">$1</span>'),t=t.replace(/(\$[A-Z0-9_]+)/g,'<span class="token number">$1</span>')):e==="html"||e==="xml"?(t=t.replace(/\s([a-z0-9:-]+)=/gi,(n,c)=>" "+s(c,"attr-name")+"="),t=t.replace(/(".*?")/g,n=>s(n,"attr-value")),t=t.replace(/&gt;/g,'<span class="token tag">&gt;</span>')):e==="css"&&(t=t.replace(/([a-z-]+)(?=:)/g,'<span class="token keyword">$1</span>')),Object.keys(i).reverse().forEach(n=>{t=t.replace(n,i[n])}),t}_onCopy(){S(this._getFormattedText());const t=this.copyBtn.querySelector("eui-icon");if(t){const e=t.getAttribute("name");t.setAttribute("name","check"),setTimeout(()=>t.setAttribute("name",e),2e3)}}disconnectedCallback(){this.copyBtn&&this.copyBtn.removeEventListener("click",this._boundCopy)}}customElements.define("eui-code",W);class J extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.render(),this.setupEventListeners()}static get observedAttributes(){return["name"]}attributeChangedCallback(t,e,i){t==="name"&&(this.render(),this.setupEventListeners())}setupEventListeners(){const t=this.shadowRoot.querySelector("#nav-toggle");t&&t.addEventListener("click",()=>{window.dispatchEvent(new CustomEvent("toggle-nav"))})}render(){const t=this.getAttribute("name")||"Title";this.shadowRoot.innerHTML=`
944
+ `),a=i.filter(r=>r.trim()).map(r=>r.match(/^\s*/)[0].length),n=a.length?Math.min(...a):0;return i.map(r=>r.slice(n)).join(`
945
+ `)}_unescapeHtml(t){const e=document.createElement("textarea");return e.innerHTML=t,e.value}_highlight(t,e){t=t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");const i={};let a=0;function n(r,l){const c=`__TOKEN_${l}_${a++}__`;return i[c]=`<span class="token ${l}">${r}</span>`,c}return["javascript","js","json","bash","sh","css"].includes(e)?(t=t.replace(/("(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/g,r=>n(r,"string")),e==="bash"||e==="sh"?t=t.replace(/(#.*$)/gm,r=>n(r,"comment")):e==="css"?t=t.replace(/(\/\*[\s\S]*?\*\/)/g,r=>n(r,"comment")):t=t.replace(/(\/\/.*$|\/\*[\s\S]*?\*\/)/gm,r=>n(r,"comment"))):["html","xml"].includes(e)&&(t=t.replace(/(&lt;!--[\s\S]*?--&gt;)/g,r=>n(r,"comment")),t=t.replace(/(&lt;\/?[a-z0-9:-]+)/gi,r=>n(r,"tag"))),e==="javascript"||e==="js"||e==="json"?(t=t.replace(/\b(const|let|var|if|else|for|while|return|function|class|import|export|from|default|switch|case|break|continue|new|this|async|await)\b/g,'<span class="token keyword">$1</span>'),t=t.replace(/\b(true|false|null|undefined)\b/g,'<span class="token boolean">$1</span>'),t=t.replace(/\b([a-zA-Z0-9_]+)\s*(?=\()/g,'<span class="token function">$1</span>')):e==="bash"||e==="sh"?(t=t.replace(/\b(npm|npx|node|git|cd|ls|mkdir|rm|mv|cp|echo|cat|sudo|docker|brew|grep|curl|wget|chmod|chown|touch)\b/g,'<span class="token keyword">$1</span>'),t=t.replace(/\b(install|run|build|start|test|dev|init|clone|pull|push|commit|add|checkout|branch|merge)\b/g,'<span class="token function">$1</span>'),t=t.replace(/(\s-+[a-zA-Z0-9-]+)/g,'<span class="token attr-name">$1</span>'),t=t.replace(/(\$[A-Z0-9_]+)/g,'<span class="token number">$1</span>')):e==="html"||e==="xml"?(t=t.replace(/\s([a-z0-9:-]+)=/gi,(r,l)=>" "+n(l,"attr-name")+"="),t=t.replace(/(".*?")/g,r=>n(r,"attr-value")),t=t.replace(/&gt;/g,'<span class="token tag">&gt;</span>')):e==="css"&&(t=t.replace(/([a-z-]+)(?=:)/g,'<span class="token keyword">$1</span>')),Object.keys(i).reverse().forEach(r=>{t=t.replace(r,i[r])}),t}_onCopy(){E(this._getFormattedText());const t=this.copyBtn.querySelector("eui-icon");if(t){const e=t.getAttribute("name");t.setAttribute("name","check"),setTimeout(()=>t.setAttribute("name",e),2e3)}}disconnectedCallback(){this.copyBtn&&this.copyBtn.removeEventListener("click",this._boundCopy)}}customElements.define("eui-code",X);class W extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.render(),this.setupEventListeners()}static get observedAttributes(){return["name"]}attributeChangedCallback(t,e,i){t==="name"&&(this.render(),this.setupEventListeners())}setupEventListeners(){const t=this.shadowRoot.querySelector("#nav-toggle");t&&t.addEventListener("click",()=>{window.dispatchEvent(new CustomEvent("toggle-nav"))})}render(){const t=this.getAttribute("name")||"Title";this.shadowRoot.innerHTML=`
945
946
  <style>
946
947
  :host {
947
948
  display: block;
@@ -1033,7 +1034,7 @@
1033
1034
  <slot></slot>
1034
1035
  </div>
1035
1036
  </div>
1036
- `}}customElements.define("eui-app-titlebar",J);class K extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this._handleMouseDown=this._addRipple.bind(this)}connectedCallback(){this.render(),this.setupEventListeners()}static get observedAttributes(){return["elevated","interactive","ripple"]}attributeChangedCallback(t,e,i){e!==i&&t==="ripple"&&this.setupEventListeners()}setupEventListeners(){this.removeEventListener("mousedown",this._handleMouseDown),this.hasAttribute("ripple")&&this.addEventListener("mousedown",this._handleMouseDown)}_addRipple(t){const e=this.getBoundingClientRect(),i=document.createElement("span"),r=Math.max(e.width,e.height),s=r/2;i.style.width=i.style.height=`${r}px`,i.style.left=`${t.clientX-e.left-s}px`,i.style.top=`${t.clientY-e.top-s}px`,i.classList.add("ripple"),this.shadowRoot.querySelector(".surface").appendChild(i),i.addEventListener("animationend",()=>{i.remove()})}render(){this.shadowRoot.innerHTML=`
1037
+ `}}customElements.define("eui-app-titlebar",W);class J extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this._handleMouseDown=this._addRipple.bind(this)}connectedCallback(){this.render(),this.setupEventListeners()}static get observedAttributes(){return["elevated","interactive","ripple"]}attributeChangedCallback(t,e,i){e!==i&&t==="ripple"&&this.setupEventListeners()}setupEventListeners(){this.removeEventListener("mousedown",this._handleMouseDown),this.hasAttribute("ripple")&&this.addEventListener("mousedown",this._handleMouseDown)}_addRipple(t){const e=this.getBoundingClientRect(),i=document.createElement("span"),a=Math.max(e.width,e.height),n=a/2;i.style.width=i.style.height=`${a}px`,i.style.left=`${t.clientX-e.left-n}px`,i.style.top=`${t.clientY-e.top-n}px`,i.classList.add("ripple"),this.shadowRoot.querySelector(".surface").appendChild(i),i.addEventListener("animationend",()=>{i.remove()})}render(){this.shadowRoot.innerHTML=`
1037
1038
  <style>
1038
1039
  :host {
1039
1040
  display: block;
@@ -1094,4 +1095,4 @@
1094
1095
  <div class="surface">
1095
1096
  <slot></slot>
1096
1097
  </div>
1097
- `}}customElements.define("eui-surface",K),typeof window<"u"&&console.log("ErisUI loaded successfully"),h.device=R,h.haptics=_,h.icons=p,h.loadPage=q,h.router=w,h.storage=F,h.utils=X,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})}));
1098
+ `}}customElements.define("eui-surface",J),typeof window<"u"&&console.log("ErisUI loaded successfully"),p.device=z,p.haptics=$,p.icons=u,p.loadPage=I,p.router=w,p.storage=H,p.utils=Z,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})}));
package/dist/erisui.mjs CHANGED
@@ -1,7 +1,4 @@
1
- var S = Object.defineProperty;
2
- var z = (o, t, e) => t in o ? S(o, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[t] = e;
3
- var v = (o, t, e) => z(o, typeof t != "symbol" ? t + "" : t, e);
4
- class M extends HTMLElement {
1
+ class E extends HTMLElement {
5
2
  static get observedAttributes() {
6
3
  return ["size", "border-radius", "name", "color"];
7
4
  }
@@ -66,13 +63,13 @@ class M extends HTMLElement {
66
63
  this.avatar.style.width = i + "px", this.avatar.style.height = i + "px", this.initials.style.fontSize = i / 2 + "px";
67
64
  }
68
65
  if (this.hasAttribute("border-radius") && (this.avatar.style.borderRadius = this.getAttribute("border-radius") + "px"), this.hasAttribute("name") && (this.avatar.title = this.getAttribute("name")), !e && this.hasAttribute("name")) {
69
- const n = this.getAttribute("name").trim().split(/\s+/);
70
- let s = "";
71
- n.length === 1 ? s = n[0][0] || "" : s = (n[0][0] || "") + (n[n.length - 1][0] || ""), this.initials.textContent = s.toUpperCase();
66
+ const a = this.getAttribute("name").trim().split(/\s+/);
67
+ let n = "";
68
+ a.length === 1 ? n = a[0][0] || "" : n = (a[0][0] || "") + (a[a.length - 1][0] || ""), this.initials.textContent = n.toUpperCase();
72
69
  }
73
70
  }
74
71
  }
75
- customElements.define("eui-avatar", M);
72
+ customElements.define("eui-avatar", E);
76
73
  const u = /* @__PURE__ */ (() => {
77
74
  let o = {};
78
75
  return {
@@ -93,7 +90,7 @@ u.register("copy", '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="1
93
90
  u.register("arrow", '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path d="M9.3 5.3a1 1 0 0 0 0 1.4l5.29 5.3-5.3 5.3a1 1 0 1 0 1.42 1.4l6-6a1 1 0 0 0 0-1.4l-6-6a1 1 0 0 0-1.42 0Z"></path></svg>');
94
91
  u.register("back", '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2" style="transform: rotate(180deg)"><path d="M9.3 5.3a1 1 0 0 0 0 1.4l5.29 5.3-5.3 5.3a1 1 0 1 0 1.42 1.4l6-6a1 1 0 0 0 0-1.4l-6-6a1 1 0 0 0-1.42 0Z"></path></svg>');
95
92
  u.register("check", '<svg width="12" height="10" viewBox="0 0 12 10" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3.86368 9.12226C3.82463 9.16131 3.76131 9.16131 3.72226 9.12226L0.146522 5.54652C-0.0487403 5.35126 -0.0487401 5.03468 0.146522 4.83942L0.839416 4.14652C1.03468 3.95126 1.35126 3.95126 1.54652 4.14652L3.72226 6.32226C3.76131 6.36131 3.82463 6.36131 3.86368 6.32226L10.0394 0.146522C10.2347 -0.0487398 10.5513 -0.0487399 10.7465 0.146522L11.4394 0.839416C11.6347 1.03468 11.6347 1.35126 11.4394 1.54652L3.86368 9.12226Z" fill="currentColor"/></svg>');
96
- class T extends HTMLElement {
93
+ class A extends HTMLElement {
97
94
  static get observedAttributes() {
98
95
  return ["name", "width", "height"];
99
96
  }
@@ -114,16 +111,16 @@ class T extends HTMLElement {
114
111
  }
115
112
  const i = document.createElement("template");
116
113
  i.innerHTML = e.trim();
117
- const n = i.content.cloneNode(!0), s = n.firstElementChild;
118
- if (s && s.style) {
119
- const r = this.getAttribute("width"), c = this.getAttribute("height");
120
- r && s.setAttribute("width", r), c && s.setAttribute("height", c), s.style.display = "block";
114
+ const a = i.content.cloneNode(!0), n = a.firstElementChild;
115
+ if (n && n.style) {
116
+ const r = this.getAttribute("width"), l = this.getAttribute("height");
117
+ r && n.setAttribute("width", r), l && n.setAttribute("height", l), n.style.display = "block";
121
118
  }
122
- this.shadowRoot.innerHTML = "", this.shadowRoot.appendChild(n);
119
+ this.shadowRoot.innerHTML = "", this.shadowRoot.appendChild(a);
123
120
  }
124
121
  }
125
- customElements.define("eui-icon", T);
126
- class $ extends HTMLElement {
122
+ customElements.define("eui-icon", A);
123
+ class L extends HTMLElement {
127
124
  static get observedAttributes() {
128
125
  return ["label", "value", "id", "type", "filled"];
129
126
  }
@@ -231,8 +228,10 @@ class $ extends HTMLElement {
231
228
  `;
232
229
  }
233
230
  connectedCallback() {
234
- this.form = this.shadowRoot.querySelector(".form"), this.inputEl = this.shadowRoot.querySelector(".form-input"), this.labelEl = this.shadowRoot.querySelector("label"), this.hasAttribute("value") && (this.inputEl.value = this.getAttribute("value")), this.hasAttribute("id") && (this.inputEl.id = this.getAttribute("id")), this.hasAttribute("label") && (this.labelEl.textContent = this.getAttribute("label")), this.hasAttribute("type") && (this.inputEl.type = this.getAttribute("type")), this.hasAttribute("filled") && this.form.classList.add("filled"), this.inputEl.addEventListener("input", () => {
235
- this.setAttribute("value", this.inputEl.value);
231
+ this.form = this.shadowRoot.querySelector(".form"), this.inputEl = this.shadowRoot.querySelector(".form-input"), this.labelEl = this.shadowRoot.querySelector("label"), this.hasAttribute("value") && (this.inputEl.value = this.getAttribute("value")), this.hasAttribute("id") && (this.inputEl.id = this.getAttribute("id")), this.hasAttribute("label") && (this.labelEl.textContent = this.getAttribute("label")), this.hasAttribute("type") && (this.inputEl.type = this.getAttribute("type")), this.hasAttribute("filled") && this.form.classList.add("filled"), this.inputEl.addEventListener("input", (t) => {
232
+ this.setAttribute("value", this.inputEl.value), this.dispatchEvent(new Event("input", { bubbles: !0, composed: !0 }));
233
+ }), this.inputEl.addEventListener("change", (t) => {
234
+ this.dispatchEvent(new Event("change", { bubbles: !0, composed: !0 }));
236
235
  });
237
236
  }
238
237
  attributeChangedCallback(t, e, i) {
@@ -256,8 +255,8 @@ class $ extends HTMLElement {
256
255
  this.setAttribute("value", t);
257
256
  }
258
257
  }
259
- customElements.define("eui-input", $);
260
- class R extends HTMLElement {
258
+ customElements.define("eui-input", L);
259
+ class S extends HTMLElement {
261
260
  constructor() {
262
261
  super(), this.attachShadow({ mode: "open" }), this.shadowRoot.innerHTML = `
263
262
  <style>
@@ -307,8 +306,8 @@ class R extends HTMLElement {
307
306
  `;
308
307
  }
309
308
  }
310
- customElements.define("eui-loader", R);
311
- class H extends HTMLElement {
309
+ customElements.define("eui-loader", S);
310
+ class z extends HTMLElement {
312
311
  static get observedAttributes() {
313
312
  return ["value", "intermediate", "id"];
314
313
  }
@@ -370,8 +369,8 @@ class H extends HTMLElement {
370
369
  this.hasAttribute("id") && (this.progress.id = this.getAttribute("id")), this.hasAttribute("intermediate") && t.classList.add("intermediate"), this.hasAttribute("value") && (t.style.width = this.getAttribute("value") + "%");
371
370
  }
372
371
  }
373
- customElements.define("eui-progressbar", H);
374
- const x = {
372
+ customElements.define("eui-progressbar", z);
373
+ const v = {
375
374
  is: {
376
375
  iPhone: /iPhone/.test(navigator.userAgent),
377
376
  iPad: /iPad/.test(navigator.userAgent),
@@ -391,11 +390,11 @@ const x = {
391
390
  haptics: "vibrate" in navigator || "Vibrate" in window || typeof window.navigator.vibrate == "function"
392
391
  },
393
392
  userAgent: navigator.userAgent
394
- }, J = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
393
+ }, U = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
395
394
  __proto__: null,
396
- device: x
395
+ device: v
397
396
  }, Symbol.toStringTag, { value: "Module" }));
398
- function _() {
397
+ function M() {
399
398
  try {
400
399
  const o = document.createElement("label");
401
400
  o.ariaHidden = "true", o.style.display = "none";
@@ -404,13 +403,13 @@ function _() {
404
403
  } catch {
405
404
  }
406
405
  }
407
- function w(o) {
408
- x.supports.haptics ? navigator.vibrate(o || 50) : x.is.iPhone && _();
406
+ function x(o) {
407
+ v.supports.haptics ? navigator.vibrate(o || 50) : v.is.iPhone && M();
409
408
  }
410
- const K = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
409
+ const Z = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
411
410
  __proto__: null,
412
- haptic: w
413
- }, Symbol.toStringTag, { value: "Module" })), y = (() => {
411
+ haptic: x
412
+ }, Symbol.toStringTag, { value: "Module" })), w = (() => {
414
413
  let o = {}, t;
415
414
  try {
416
415
  o = JSON.parse(localStorage.getItem(t) || "{}");
@@ -459,12 +458,12 @@ const K = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
459
458
  }
460
459
  }
461
460
  };
462
- })(), k = y.settings, Y = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
461
+ })(), T = w.settings, X = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
463
462
  __proto__: null,
464
- settings: k,
465
- storage: y
463
+ settings: T,
464
+ storage: w
466
465
  }, Symbol.toStringTag, { value: "Module" }));
467
- class F extends HTMLElement {
466
+ class $ extends HTMLElement {
468
467
  static get observedAttributes() {
469
468
  return ["selected"];
470
469
  }
@@ -544,7 +543,7 @@ class F extends HTMLElement {
544
543
  this.inputEl = this.shadowRoot.querySelector("input"), this.switchEl = this.shadowRoot.querySelector(".switch"), this.updateFromAttribute(), this.switchEl.addEventListener("click", () => this.toggle());
545
544
  }
546
545
  toggle() {
547
- this.selected = !this.selected, w();
546
+ this.selected = !this.selected, x(), this.dispatchEvent(new Event("change", { bubbles: !0, composed: !0 }));
548
547
  }
549
548
  updateFromAttribute() {
550
549
  const t = this.hasAttribute("selected");
@@ -560,8 +559,8 @@ class F extends HTMLElement {
560
559
  t ? this.setAttribute("selected", "") : this.removeAttribute("selected");
561
560
  }
562
561
  }
563
- customElements.define("eui-switch", F);
564
- class I extends HTMLElement {
562
+ customElements.define("eui-switch", $);
563
+ class R extends HTMLElement {
565
564
  constructor() {
566
565
  super(), this.attachShadow({ mode: "open" });
567
566
  }
@@ -612,89 +611,89 @@ class I extends HTMLElement {
612
611
  </style>
613
612
  <slot></slot>
614
613
  `, this.addEventListener("pointerdown", (t) => {
615
- const e = document.createElement("span"), i = t.currentTarget, n = Math.max(i.offsetWidth, i.offsetHeight);
616
- e.classList.add("ripple"), e.style.left = t.clientX - i.getBoundingClientRect().left - n / 2 + "px", e.style.top = t.clientY - i.getBoundingClientRect().top - n / 2 + "px", e.style.width = n + "px", e.style.height = n + "px", this.shadowRoot.appendChild(e), setTimeout(() => {
614
+ const e = document.createElement("span"), i = t.currentTarget, a = Math.max(i.offsetWidth, i.offsetHeight);
615
+ e.classList.add("ripple"), e.style.left = t.clientX - i.getBoundingClientRect().left - a / 2 + "px", e.style.top = t.clientY - i.getBoundingClientRect().top - a / 2 + "px", e.style.width = a + "px", e.style.height = a + "px", this.shadowRoot.appendChild(e), setTimeout(() => {
617
616
  e.remove();
618
617
  }, 600);
619
618
  });
620
619
  }
621
620
  }
622
- customElements.define("eui-chip", I);
623
- const m = "", C = (() => {
621
+ customElements.define("eui-chip", R);
622
+ const b = "", y = (() => {
624
623
  const o = [];
625
- function t(a, l) {
626
- const h = [], g = a.replace(/:([^/]+)/g, (b, f) => (h.push(f), "([^/]+)")).replace(/\//g, "\\/"), p = new RegExp(`^${m}${g}$`);
627
- o.push({ regex: p, paramNames: h, renderFn: l });
624
+ function t(s, d) {
625
+ const h = [], g = s.replace(/:([^/]+)/g, (m, f) => (h.push(f), "([^/]+)")).replace(/\//g, "\\/"), p = new RegExp(`^${b}${g}$`);
626
+ o.push({ regex: p, paramNames: h, renderFn: d });
628
627
  }
629
- function e(a) {
630
- for (const { regex: l, paramNames: h, renderFn: g } of o) {
631
- const p = a.match(l);
628
+ function e(s) {
629
+ for (const { regex: d, paramNames: h, renderFn: g } of o) {
630
+ const p = s.match(d);
632
631
  if (p) {
633
- const b = {};
634
- return h.forEach((f, L) => {
635
- b[f] = decodeURIComponent(p[L + 1]);
636
- }), { renderFn: g, params: b };
632
+ const m = {};
633
+ return h.forEach((f, C) => {
634
+ m[f] = decodeURIComponent(p[C + 1]);
635
+ }), { renderFn: g, params: m };
637
636
  }
638
637
  }
639
638
  return null;
640
639
  }
641
- function i(a, l = !0) {
642
- a.startsWith(m) || (a = m + (a.startsWith("/") ? "" : "/") + a);
643
- const h = a.split(/[?#]/)[0];
644
- if (h === window.location.pathname && a.includes("#")) {
645
- l && history.pushState({}, "", a);
646
- const p = "#" + a.split("#")[1];
647
- n(p);
640
+ function i(s, d = !0) {
641
+ s.startsWith(b) || (s = b + (s.startsWith("/") ? "" : "/") + s);
642
+ const h = s.split(/[?#]/)[0];
643
+ if (h === window.location.pathname && s.includes("#")) {
644
+ d && history.pushState({}, "", s);
645
+ const p = "#" + s.split("#")[1];
646
+ a(p);
648
647
  return;
649
648
  }
650
649
  const g = e(h);
651
650
  if (g)
652
- if (l && history.pushState({}, "", a), g.renderFn(g.params), window.dispatchEvent(new CustomEvent("route-changed", { detail: { path: a } })), a.includes("#")) {
653
- const p = "#" + a.split("#")[1];
654
- setTimeout(() => n(p), 100);
651
+ if (d && history.pushState({}, "", s), g.renderFn(g.params), window.dispatchEvent(new CustomEvent("route-changed", { detail: { path: s } })), s.includes("#")) {
652
+ const p = "#" + s.split("#")[1];
653
+ setTimeout(() => a(p), 100);
655
654
  } else {
656
655
  const p = document.getElementById("main");
657
656
  p && p.scrollTo(0, 0);
658
657
  }
659
- else s ? (l && history.pushState({}, "", a), s()) : console.warn(`No route found for ${h}`);
658
+ else n ? (d && history.pushState({}, "", s), n()) : console.warn(`No route found for ${h}`);
660
659
  }
661
- function n(a) {
662
- if (a)
660
+ function a(s) {
661
+ if (s)
663
662
  try {
664
- const l = document.querySelector(a);
665
- l && l.scrollIntoView({ behavior: "smooth" });
663
+ const d = document.querySelector(s);
664
+ d && d.scrollIntoView({ behavior: "smooth" });
666
665
  } catch {
667
- console.warn("Invalid hash:", a);
666
+ console.warn("Invalid hash:", s);
668
667
  }
669
668
  }
670
- let s = null;
671
- function r(a) {
672
- s = a;
669
+ let n = null;
670
+ function r(s) {
671
+ n = s;
673
672
  }
674
- function c() {
673
+ function l() {
675
674
  history.back();
676
675
  }
677
- function d() {
678
- return window.location.pathname.replace(m, "") || "/";
676
+ function c() {
677
+ return window.location.pathname.replace(b, "") || "/";
679
678
  }
680
679
  return window.addEventListener("popstate", () => {
681
- const a = window.location.pathname + window.location.search + window.location.hash;
682
- i(a, !1);
683
- }), window.addEventListener("click", (a) => {
684
- if (a.button !== 0 || a.metaKey || a.altKey || a.ctrlKey || a.shiftKey) return;
685
- const l = a.target.closest("a");
686
- if (!l || l.hasAttribute("download") || l.getAttribute("target") === "_blank") return;
687
- const h = l.getAttribute("href");
680
+ const s = window.location.pathname + window.location.search + window.location.hash;
681
+ i(s, !1);
682
+ }), window.addEventListener("click", (s) => {
683
+ if (s.button !== 0 || s.metaKey || s.altKey || s.ctrlKey || s.shiftKey) return;
684
+ const d = s.target.closest("a");
685
+ if (!d || d.hasAttribute("download") || d.getAttribute("target") === "_blank") return;
686
+ const h = d.getAttribute("href");
688
687
  if (!(!h || h.startsWith("http") && !h.startsWith(window.location.origin))) {
689
- if (a.preventDefault(), h.startsWith("#")) {
690
- history.pushState({}, "", h), n(h);
688
+ if (s.preventDefault(), h.startsWith("#")) {
689
+ history.pushState({}, "", h), a(h);
691
690
  return;
692
691
  }
693
692
  i(h);
694
693
  }
695
- }), { add: t, navigate: i, back: c, location: d, setNotFound: r };
694
+ }), { add: t, navigate: i, back: l, location: c, setNotFound: r };
696
695
  })();
697
- async function G(o) {
696
+ async function W(o) {
698
697
  try {
699
698
  const t = document.getElementById("main");
700
699
  t.classList.add("fade-out"), await new Promise((i) => setTimeout(i, 200));
@@ -712,60 +711,59 @@ async function G(o) {
712
711
  console.error("Page load failed:", t);
713
712
  }
714
713
  }
715
- class j extends HTMLElement {
716
- constructor() {
717
- super();
718
- v(this, "handleClick", () => {
719
- const e = this.getAttribute("path");
720
- e && C.navigate(e);
721
- });
722
- this.attachShadow({ mode: "open" });
723
- }
714
+ class H extends HTMLElement {
724
715
  static get observedAttributes() {
725
716
  return ["path", "icon", "label", "badge", "active", "avatar-src", "avatar-name"];
726
717
  }
718
+ constructor() {
719
+ super(), this.attachShadow({ mode: "open" });
720
+ }
727
721
  connectedCallback() {
728
722
  this.hasRendered || (this.render(), this.setupEventListeners(), this.hasRendered = !0), this.updateContent(), this.addEventListener("click", this.handleClick);
729
723
  }
730
724
  disconnectedCallback() {
731
725
  this.removeEventListener("click", this.handleClick);
732
726
  }
733
- attributeChangedCallback(e, i, n) {
734
- if (i !== n && this.hasRendered) {
735
- if (e === "active")
727
+ attributeChangedCallback(t, e, i) {
728
+ if (e !== i && this.hasRendered) {
729
+ if (t === "active")
736
730
  return;
737
731
  this.updateContent();
738
732
  }
739
733
  }
734
+ handleClick = () => {
735
+ const t = this.getAttribute("path");
736
+ t && y.navigate(t);
737
+ };
740
738
  setupEventListeners() {
741
- this.addEventListener("pointerdown", (e) => {
742
- const i = document.createElement("span"), n = e.currentTarget, s = n.getBoundingClientRect(), r = Math.max(n.offsetWidth, n.offsetHeight), c = r / 2;
743
- i.classList.add("ripple"), i.style.width = `${r}px`, i.style.height = `${r}px`, i.style.left = `${e.clientX - s.left - c}px`, i.style.top = `${e.clientY - s.top - c}px`, this.shadowRoot.appendChild(i), i.addEventListener("animationend", () => {
744
- i.remove();
739
+ this.addEventListener("pointerdown", (t) => {
740
+ const e = document.createElement("span"), i = t.currentTarget, a = i.getBoundingClientRect(), n = Math.max(i.offsetWidth, i.offsetHeight), r = n / 2;
741
+ e.classList.add("ripple"), e.style.width = `${n}px`, e.style.height = `${n}px`, e.style.left = `${t.clientX - a.left - r}px`, e.style.top = `${t.clientY - a.top - r}px`, this.shadowRoot.appendChild(e), e.addEventListener("animationend", () => {
742
+ e.remove();
745
743
  });
746
744
  });
747
745
  }
748
746
  updateContent() {
749
- const e = this.getAttribute("icon"), i = this.getAttribute("avatar-src"), n = this.getAttribute("avatar-name"), s = this.getAttribute("label") || "", r = this.getAttribute("badge"), c = this.shadowRoot.querySelector(".badge");
750
- if (r)
751
- if (c)
752
- c.textContent = r;
747
+ const t = this.getAttribute("icon"), e = this.getAttribute("avatar-src"), i = this.getAttribute("avatar-name"), a = this.getAttribute("label") || "", n = this.getAttribute("badge"), r = this.shadowRoot.querySelector(".badge");
748
+ if (n)
749
+ if (r)
750
+ r.textContent = n;
753
751
  else {
754
- const l = document.createElement("span");
755
- l.className = "badge", l.textContent = r, this.shadowRoot.appendChild(l);
752
+ const s = document.createElement("span");
753
+ s.className = "badge", s.textContent = n, this.shadowRoot.appendChild(s);
756
754
  }
757
- else c && c.remove();
758
- const d = this.shadowRoot.querySelector("slot[name='icon']");
759
- if (d)
760
- if (i || n) {
761
- let l = '<eui-avatar size="24"';
762
- n && (l += ` name="${n}"`), l += ">", i && (l += `<img src="${i}" alt="${n || "Avatar"}" />`), l += "</eui-avatar>", d.innerHTML = l;
755
+ else r && r.remove();
756
+ const l = this.shadowRoot.querySelector("slot[name='icon']");
757
+ if (l)
758
+ if (e || i) {
759
+ let s = '<eui-avatar size="24"';
760
+ i && (s += ` name="${i}"`), s += ">", e && (s += `<img src="${e}" alt="${i || "Avatar"}" />`), s += "</eui-avatar>", l.innerHTML = s;
763
761
  } else {
764
- const l = d.querySelector("eui-icon");
765
- e && l ? l.getAttribute("name") !== e && l.setAttribute("name", e) : e ? d.innerHTML = `<eui-icon width="24" height="24" name="${e}"></eui-icon>` : d.innerHTML = "";
762
+ const s = l.querySelector("eui-icon");
763
+ t && s ? s.getAttribute("name") !== t && s.setAttribute("name", t) : t ? l.innerHTML = `<eui-icon width="24" height="24" name="${t}"></eui-icon>` : l.innerHTML = "";
766
764
  }
767
- const a = this.shadowRoot.querySelector(".label");
768
- a && (a.textContent = s);
765
+ const c = this.shadowRoot.querySelector(".label");
766
+ c && (c.textContent = a);
769
767
  }
770
768
  render() {
771
769
  this.shadowRoot.innerHTML = `
@@ -876,8 +874,8 @@ class j extends HTMLElement {
876
874
  `;
877
875
  }
878
876
  }
879
- customElements.define("eui-nav-item", j);
880
- class q extends HTMLElement {
877
+ customElements.define("eui-nav-item", H);
878
+ class _ extends HTMLElement {
881
879
  constructor() {
882
880
  super(), this.attachShadow({ mode: "open" });
883
881
  }
@@ -986,10 +984,9 @@ class q extends HTMLElement {
986
984
  <a href="#content" id="skip_navigation_link">Skip To Content</a>
987
985
  <div class="nav-items">
988
986
  ${this.navItems.map((t) => {
989
- var n, s;
990
987
  if (t.type === "divider")
991
988
  return '<div style="height: 1px; background: var(--app-300); margin: 0.5rem 0;"></div>';
992
- const e = ((n = t.avatar) == null ? void 0 : n.src) || "", i = ((s = t.avatar) == null ? void 0 : s.name) || "";
989
+ const e = t.avatar?.src || "", i = t.avatar?.name || "";
993
990
  return `<eui-nav-item path="${t.path}" icon="${t.icon}" avatar-src="${e}" avatar-name="${i}" label="${t.label}"></eui-nav-item>`;
994
991
  }).join("")}
995
992
  </div>
@@ -1003,13 +1000,13 @@ class q extends HTMLElement {
1003
1000
  return this._navItems || [];
1004
1001
  }
1005
1002
  updateActiveState(t) {
1006
- t || (t = C.location()), t.startsWith("/") || (t = "/" + t), this.shadowRoot.querySelectorAll("eui-nav-item").forEach((i) => {
1003
+ t || (t = y.location()), t.startsWith("/") || (t = "/" + t), this.shadowRoot.querySelectorAll("eui-nav-item").forEach((i) => {
1007
1004
  i.getAttribute("path") === t ? i.setAttribute("active", "") : i.removeAttribute("active");
1008
1005
  });
1009
1006
  }
1010
1007
  }
1011
- customElements.define("eui-app-nav", q);
1012
- class B extends HTMLElement {
1008
+ customElements.define("eui-app-nav", _);
1009
+ class F extends HTMLElement {
1013
1010
  static get observedAttributes() {
1014
1011
  return ["type", "title", "subtitle", "img"];
1015
1012
  }
@@ -1106,12 +1103,12 @@ class B extends HTMLElement {
1106
1103
  this.hd = this.shadowRoot.querySelector(".header"), this.hasAttribute("type") && this.hd.classList.add(this.getAttribute("type"));
1107
1104
  }
1108
1105
  attributeChangedCallback(t, e, i) {
1109
- const n = this.shadowRoot.querySelector("h1"), s = this.shadowRoot.querySelector("p"), r = this.shadowRoot.querySelector(".img");
1110
- t === "title" && (n.textContent = i), t === "subtitle" && (s.textContent = i), t === "img" && (r.style.backgroundImage = i ? `url(${i})` : "");
1106
+ const a = this.shadowRoot.querySelector("h1"), n = this.shadowRoot.querySelector("p"), r = this.shadowRoot.querySelector(".img");
1107
+ t === "title" && (a.textContent = i), t === "subtitle" && (n.textContent = i), t === "img" && (r.style.backgroundImage = i ? `url(${i})` : "");
1111
1108
  }
1112
1109
  }
1113
- customElements.define("eui-header", B);
1114
- class N extends HTMLElement {
1110
+ customElements.define("eui-header", F);
1111
+ class I extends HTMLElement {
1115
1112
  static get observedAttributes() {
1116
1113
  return ["selected"];
1117
1114
  }
@@ -1119,7 +1116,8 @@ class N extends HTMLElement {
1119
1116
  super(), this.attachShadow({ mode: "open" }), this.shadowRoot.innerHTML = `
1120
1117
  <style>
1121
1118
  :host {
1122
- display: block;
1119
+ display: inline-block;
1120
+ vertical-align: bottom;
1123
1121
  position: relative;
1124
1122
  cursor: pointer;
1125
1123
  width: 24px;
@@ -1205,9 +1203,7 @@ class N extends HTMLElement {
1205
1203
  this.inputEl = this.shadowRoot.querySelector("input"), this.checkEl = this.shadowRoot.querySelector(".checkbox"), this.updateFromAttribute(), this.checkEl.addEventListener("click", () => this.toggle());
1206
1204
  }
1207
1205
  toggle() {
1208
- this.selected = !this.selected, w();
1209
- const t = this.selected, e = this.dataset.setting;
1210
- e && k.set(e, t);
1206
+ this.selected = !this.selected, x(), this.dispatchEvent(new Event("change", { bubbles: !0, composed: !0 }));
1211
1207
  }
1212
1208
  updateFromAttribute() {
1213
1209
  const t = this.hasAttribute("selected");
@@ -1223,8 +1219,9 @@ class N extends HTMLElement {
1223
1219
  t ? this.setAttribute("selected", "") : this.removeAttribute("selected");
1224
1220
  }
1225
1221
  }
1226
- customElements.define("eui-checkbox", N);
1227
- class E extends HTMLElement {
1222
+ customElements.define("eui-checkbox", I);
1223
+ class j extends HTMLElement {
1224
+ static observedAttributes = ["type", "width", "height", "border-radius", "icon", "link", "href"];
1228
1225
  constructor() {
1229
1226
  super(), this.attachShadow({ mode: "open" });
1230
1227
  }
@@ -1341,17 +1338,16 @@ class E extends HTMLElement {
1341
1338
  </${e}>
1342
1339
  `;
1343
1340
  const i = this.shadowRoot.querySelector(e);
1344
- t && i.setAttribute("href", t), this.hasAttribute("type") && i.classList.add(this.getAttribute("type")), this.hasAttribute("icon") && i.classList.add("icon"), this.hasAttribute("width") && (i.style.width = this.getAttribute("width") + "px"), this.hasAttribute("height") && (i.style.height = this.getAttribute("height") + "px"), this.hasAttribute("border-radius") && (i.style.borderRadius = this.getAttribute("border-radius") + "px"), i.addEventListener("pointerdown", (n) => {
1345
- const s = document.createElement("span"), r = n.currentTarget, c = r.getBoundingClientRect(), d = Math.max(r.offsetWidth, r.offsetHeight), a = d / 2;
1346
- s.classList.add("ripple"), s.style.width = `${d}px`, s.style.height = `${d}px`, s.style.left = `${n.clientX - c.left - a}px`, s.style.top = `${n.clientY - c.top - a}px`, i.appendChild(s), s.addEventListener("animationend", () => {
1347
- s.remove();
1341
+ t && i.setAttribute("href", t), this.hasAttribute("type") && i.classList.add(this.getAttribute("type")), this.hasAttribute("icon") && i.classList.add("icon"), this.hasAttribute("width") && (i.style.width = this.getAttribute("width") + "px"), this.hasAttribute("height") && (i.style.height = this.getAttribute("height") + "px"), this.hasAttribute("border-radius") && (i.style.borderRadius = this.getAttribute("border-radius") + "px"), i.addEventListener("pointerdown", (a) => {
1342
+ const n = document.createElement("span"), r = a.currentTarget, l = r.getBoundingClientRect(), c = Math.max(r.offsetWidth, r.offsetHeight), s = c / 2;
1343
+ n.classList.add("ripple"), n.style.width = `${c}px`, n.style.height = `${c}px`, n.style.left = `${a.clientX - l.left - s}px`, n.style.top = `${a.clientY - l.top - s}px`, i.appendChild(n), n.addEventListener("animationend", () => {
1344
+ n.remove();
1348
1345
  });
1349
1346
  });
1350
1347
  }
1351
1348
  }
1352
- v(E, "observedAttributes", ["type", "width", "height", "border-radius", "icon", "link", "href"]);
1353
- customElements.define("eui-button", E);
1354
- class O extends HTMLElement {
1349
+ customElements.define("eui-button", j);
1350
+ class B extends HTMLElement {
1355
1351
  static get observedAttributes() {
1356
1352
  return ["type", "anchor"];
1357
1353
  }
@@ -1423,30 +1419,30 @@ class O extends HTMLElement {
1423
1419
  `;
1424
1420
  }
1425
1421
  }
1426
- customElements.define("eui-heading", O);
1427
- function P(o) {
1428
- const i = Date.now() - o, n = Math.floor(i / 1e3), s = Math.floor(n / 60), r = Math.floor(s / 60), c = Math.floor(r / 24), d = Math.floor(c / 30), a = Math.floor(d / 12);
1429
- return a > 0 ? `${a}y` : d > 0 ? `${d}mo` : c > 0 ? `${c}d` : r > 0 ? `${r}h` : s > 0 ? `${s}m` : `${n}s`;
1422
+ customElements.define("eui-heading", B);
1423
+ function q(o) {
1424
+ const i = Date.now() - o, a = Math.floor(i / 1e3), n = Math.floor(a / 60), r = Math.floor(n / 60), l = Math.floor(r / 24), c = Math.floor(l / 30), s = Math.floor(c / 12);
1425
+ return s > 0 ? `${s}y` : c > 0 ? `${c}mo` : l > 0 ? `${l}d` : r > 0 ? `${r}h` : n > 0 ? `${n}m` : `${a}s`;
1430
1426
  }
1431
- function V(o) {
1432
- const i = Date.now() - o, n = Math.floor(i / 1e3), s = Math.floor(n / 60), r = Math.floor(s / 60), c = Math.floor(r / 24), d = Math.floor(c / 30), a = Math.floor(d / 12);
1433
- return a > 0 ? `${a} year${a > 1 ? "s" : ""} ago` : d > 0 ? `${d} month${d > 1 ? "s" : ""} ago` : c > 0 ? `${c} day${c > 1 ? "s" : ""} ago` : r > 0 ? `${r} hour${r > 1 ? "s" : ""} ago` : s > 0 ? `${s} minute${s > 1 ? "s" : ""} ago` : `${n} second${n > 1 ? "s" : ""} ago`;
1427
+ function N(o) {
1428
+ const i = Date.now() - o, a = Math.floor(i / 1e3), n = Math.floor(a / 60), r = Math.floor(n / 60), l = Math.floor(r / 24), c = Math.floor(l / 30), s = Math.floor(c / 12);
1429
+ return s > 0 ? `${s} year${s > 1 ? "s" : ""} ago` : c > 0 ? `${c} month${c > 1 ? "s" : ""} ago` : l > 0 ? `${l} day${l > 1 ? "s" : ""} ago` : r > 0 ? `${r} hour${r > 1 ? "s" : ""} ago` : n > 0 ? `${n} minute${n > 1 ? "s" : ""} ago` : `${a} second${a > 1 ? "s" : ""} ago`;
1434
1430
  }
1435
- function D(o) {
1431
+ function O(o) {
1436
1432
  return o.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;").replace(/`/g, "&#96;").replace(/'/g, "&#39;");
1437
1433
  }
1438
- function A(o) {
1434
+ function k(o) {
1439
1435
  const t = document.createElement("input");
1440
1436
  t.value = o, document.body.appendChild(t), t.select(), document.execCommand("copy"), document.body.removeChild(t);
1441
1437
  }
1442
- const Q = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1438
+ const J = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1443
1439
  __proto__: null,
1444
- copystr: A,
1445
- joinedAgo: V,
1446
- sanitize: D,
1447
- timeAgo: P
1440
+ copystr: k,
1441
+ joinedAgo: N,
1442
+ sanitize: O,
1443
+ timeAgo: q
1448
1444
  }, Symbol.toStringTag, { value: "Module" }));
1449
- class U extends HTMLElement {
1445
+ class P extends HTMLElement {
1450
1446
  static get observedAttributes() {
1451
1447
  return ["copy", "id", "type", "language"];
1452
1448
  }
@@ -1521,8 +1517,8 @@ class U extends HTMLElement {
1521
1517
  let e = (this.querySelector("code") || this).innerHTML || "";
1522
1518
  e = this._unescapeHtml(e), e = e.replace(/^\s*\n/, "").replace(/\n\s*$/, "");
1523
1519
  const i = e.split(`
1524
- `), n = i.filter((r) => r.trim()).map((r) => r.match(/^\s*/)[0].length), s = n.length ? Math.min(...n) : 0;
1525
- return i.map((r) => r.slice(s)).join(`
1520
+ `), a = i.filter((r) => r.trim()).map((r) => r.match(/^\s*/)[0].length), n = a.length ? Math.min(...a) : 0;
1521
+ return i.map((r) => r.slice(n)).join(`
1526
1522
  `);
1527
1523
  }
1528
1524
  _unescapeHtml(t) {
@@ -1532,17 +1528,17 @@ class U extends HTMLElement {
1532
1528
  _highlight(t, e) {
1533
1529
  t = t.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
1534
1530
  const i = {};
1535
- let n = 0;
1536
- function s(r, c) {
1537
- const d = `__TOKEN_${c}_${n++}__`;
1538
- return i[d] = `<span class="token ${c}">${r}</span>`, d;
1531
+ let a = 0;
1532
+ function n(r, l) {
1533
+ const c = `__TOKEN_${l}_${a++}__`;
1534
+ return i[c] = `<span class="token ${l}">${r}</span>`, c;
1539
1535
  }
1540
- return ["javascript", "js", "json", "bash", "sh", "css"].includes(e) ? (t = t.replace(/("(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/g, (r) => s(r, "string")), e === "bash" || e === "sh" ? t = t.replace(/(#.*$)/gm, (r) => s(r, "comment")) : e === "css" ? t = t.replace(/(\/\*[\s\S]*?\*\/)/g, (r) => s(r, "comment")) : t = t.replace(/(\/\/.*$|\/\*[\s\S]*?\*\/)/gm, (r) => s(r, "comment"))) : ["html", "xml"].includes(e) && (t = t.replace(/(&lt;!--[\s\S]*?--&gt;)/g, (r) => s(r, "comment")), t = t.replace(/(&lt;\/?[a-z0-9:-]+)/gi, (r) => s(r, "tag"))), e === "javascript" || e === "js" || e === "json" ? (t = t.replace(/\b(const|let|var|if|else|for|while|return|function|class|import|export|from|default|switch|case|break|continue|new|this|async|await)\b/g, '<span class="token keyword">$1</span>'), t = t.replace(/\b(true|false|null|undefined)\b/g, '<span class="token boolean">$1</span>'), t = t.replace(/\b([a-zA-Z0-9_]+)\s*(?=\()/g, '<span class="token function">$1</span>')) : e === "bash" || e === "sh" ? (t = t.replace(/\b(npm|npx|node|git|cd|ls|mkdir|rm|mv|cp|echo|cat|sudo|docker|brew|grep|curl|wget|chmod|chown|touch)\b/g, '<span class="token keyword">$1</span>'), t = t.replace(/\b(install|run|build|start|test|dev|init|clone|pull|push|commit|add|checkout|branch|merge)\b/g, '<span class="token function">$1</span>'), t = t.replace(/(\s-+[a-zA-Z0-9-]+)/g, '<span class="token attr-name">$1</span>'), t = t.replace(/(\$[A-Z0-9_]+)/g, '<span class="token number">$1</span>')) : e === "html" || e === "xml" ? (t = t.replace(/\s([a-z0-9:-]+)=/gi, (r, c) => " " + s(c, "attr-name") + "="), t = t.replace(/(".*?")/g, (r) => s(r, "attr-value")), t = t.replace(/&gt;/g, '<span class="token tag">&gt;</span>')) : e === "css" && (t = t.replace(/([a-z-]+)(?=:)/g, '<span class="token keyword">$1</span>')), Object.keys(i).reverse().forEach((r) => {
1536
+ return ["javascript", "js", "json", "bash", "sh", "css"].includes(e) ? (t = t.replace(/("(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/g, (r) => n(r, "string")), e === "bash" || e === "sh" ? t = t.replace(/(#.*$)/gm, (r) => n(r, "comment")) : e === "css" ? t = t.replace(/(\/\*[\s\S]*?\*\/)/g, (r) => n(r, "comment")) : t = t.replace(/(\/\/.*$|\/\*[\s\S]*?\*\/)/gm, (r) => n(r, "comment"))) : ["html", "xml"].includes(e) && (t = t.replace(/(&lt;!--[\s\S]*?--&gt;)/g, (r) => n(r, "comment")), t = t.replace(/(&lt;\/?[a-z0-9:-]+)/gi, (r) => n(r, "tag"))), e === "javascript" || e === "js" || e === "json" ? (t = t.replace(/\b(const|let|var|if|else|for|while|return|function|class|import|export|from|default|switch|case|break|continue|new|this|async|await)\b/g, '<span class="token keyword">$1</span>'), t = t.replace(/\b(true|false|null|undefined)\b/g, '<span class="token boolean">$1</span>'), t = t.replace(/\b([a-zA-Z0-9_]+)\s*(?=\()/g, '<span class="token function">$1</span>')) : e === "bash" || e === "sh" ? (t = t.replace(/\b(npm|npx|node|git|cd|ls|mkdir|rm|mv|cp|echo|cat|sudo|docker|brew|grep|curl|wget|chmod|chown|touch)\b/g, '<span class="token keyword">$1</span>'), t = t.replace(/\b(install|run|build|start|test|dev|init|clone|pull|push|commit|add|checkout|branch|merge)\b/g, '<span class="token function">$1</span>'), t = t.replace(/(\s-+[a-zA-Z0-9-]+)/g, '<span class="token attr-name">$1</span>'), t = t.replace(/(\$[A-Z0-9_]+)/g, '<span class="token number">$1</span>')) : e === "html" || e === "xml" ? (t = t.replace(/\s([a-z0-9:-]+)=/gi, (r, l) => " " + n(l, "attr-name") + "="), t = t.replace(/(".*?")/g, (r) => n(r, "attr-value")), t = t.replace(/&gt;/g, '<span class="token tag">&gt;</span>')) : e === "css" && (t = t.replace(/([a-z-]+)(?=:)/g, '<span class="token keyword">$1</span>')), Object.keys(i).reverse().forEach((r) => {
1541
1537
  t = t.replace(r, i[r]);
1542
1538
  }), t;
1543
1539
  }
1544
1540
  _onCopy() {
1545
- A(this._getFormattedText());
1541
+ k(this._getFormattedText());
1546
1542
  const t = this.copyBtn.querySelector("eui-icon");
1547
1543
  if (t) {
1548
1544
  const e = t.getAttribute("name");
@@ -1553,8 +1549,8 @@ class U extends HTMLElement {
1553
1549
  this.copyBtn && this.copyBtn.removeEventListener("click", this._boundCopy);
1554
1550
  }
1555
1551
  }
1556
- customElements.define("eui-code", U);
1557
- class Z extends HTMLElement {
1552
+ customElements.define("eui-code", P);
1553
+ class V extends HTMLElement {
1558
1554
  constructor() {
1559
1555
  super(), this.attachShadow({ mode: "open" });
1560
1556
  }
@@ -1670,8 +1666,8 @@ class Z extends HTMLElement {
1670
1666
  `;
1671
1667
  }
1672
1668
  }
1673
- customElements.define("eui-app-titlebar", Z);
1674
- class X extends HTMLElement {
1669
+ customElements.define("eui-app-titlebar", V);
1670
+ class D extends HTMLElement {
1675
1671
  constructor() {
1676
1672
  super(), this.attachShadow({ mode: "open" }), this._handleMouseDown = this._addRipple.bind(this);
1677
1673
  }
@@ -1688,8 +1684,8 @@ class X extends HTMLElement {
1688
1684
  this.removeEventListener("mousedown", this._handleMouseDown), this.hasAttribute("ripple") && this.addEventListener("mousedown", this._handleMouseDown);
1689
1685
  }
1690
1686
  _addRipple(t) {
1691
- const e = this.getBoundingClientRect(), i = document.createElement("span"), n = Math.max(e.width, e.height), s = n / 2;
1692
- i.style.width = i.style.height = `${n}px`, i.style.left = `${t.clientX - e.left - s}px`, i.style.top = `${t.clientY - e.top - s}px`, i.classList.add("ripple"), this.shadowRoot.querySelector(".surface").appendChild(i), i.addEventListener("animationend", () => {
1687
+ const e = this.getBoundingClientRect(), i = document.createElement("span"), a = Math.max(e.width, e.height), n = a / 2;
1688
+ i.style.width = i.style.height = `${a}px`, i.style.left = `${t.clientX - e.left - n}px`, i.style.top = `${t.clientY - e.top - n}px`, i.classList.add("ripple"), this.shadowRoot.querySelector(".surface").appendChild(i), i.addEventListener("animationend", () => {
1693
1689
  i.remove();
1694
1690
  });
1695
1691
  }
@@ -1758,14 +1754,14 @@ class X extends HTMLElement {
1758
1754
  `;
1759
1755
  }
1760
1756
  }
1761
- customElements.define("eui-surface", X);
1757
+ customElements.define("eui-surface", D);
1762
1758
  typeof window < "u" && console.log("ErisUI loaded successfully");
1763
1759
  export {
1764
- J as device,
1765
- K as haptics,
1760
+ U as device,
1761
+ Z as haptics,
1766
1762
  u as icons,
1767
- G as loadPage,
1768
- C as router,
1769
- Y as storage,
1770
- Q as utils
1763
+ W as loadPage,
1764
+ y as router,
1765
+ X as storage,
1766
+ J as utils
1771
1767
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@3r1s_s/erisui",
3
- "version": "1.0.14",
3
+ "version": "1.0.15",
4
4
  "description": "an awesome ui library for web apps",
5
5
  "type": "module",
6
6
  "files": [