@3r1s_s/erisui 1.0.26 → 1.0.28

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%;--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;--slider-track: var(--app-200);--pill-shape-path: path("M75.4754 46.660315C109.9553 12.189895 165.8592 12.189895 200.33975 46.660315C234.8203 81.1408 234.8203 137.0447 200.33975 171.5246L171.5246 200.33975C137.0447 234.8203 81.1408 234.8203 46.660315 200.33975C12.189895 165.8592 12.189895 109.9553 46.660315 75.4754L75.4754 46.660315Z");--sunny-shape-path: path("M183.313585 39.432575C190.263775 39.89116 193.71716 40.1249 196.513135 41.350945C200.62562 43.13062 203.821955 46.462845 205.60163 50.44533C206.79919 53.239605 207.033515 56.68286 207.51055 63.433955L208.57031 79.228175C208.760525 82.017055 208.85605 83.399355 209.14076 84.700895C209.571135 86.587505 210.276035 88.461425 211.337685 90.135825C212.06705 91.304395 212.990635 92.36422 214.803745 94.438305L225.19081 106.494025C229.781305 111.6999 232.03098 114.299965 233.14343 117.176955C234.76362 121.33147 234.76362 126.03149 233.14343 130.185955C232.03098 133.063 229.781305 135.66306 225.19081 140.877935L214.803745 152.924655C212.990635 155.00874 212.06705 156.078565 211.337685 157.217135C210.276035 158.891535 209.571135 160.765455 209.14076 162.653065C208.856635 163.963605 208.76111 165.345905 208.572895 168.134785L207.511135 183.929005C207.0341 190.6801 206.799775 194.133355 205.602215 196.91763C203.82254 201.06619 200.626105 204.261525 196.51372 206.0422C194.186395 207.23976 190.73301 207.474085 183.78282 207.95112L168.61585 209.01088C165.80707 209.200095 164.44467 209.29562 163.13413 209.58081C161.22652 210.021705 159.3826 210.726605 157.7082 211.788255C156.55963 212.51762 155.509805 213.441205 153.40572 215.225815L141.348935 225.63138C136.144125 230.215375 133.54406 232.46405 130.71807 233.577565C126.553985 235.19769 121.88751 235.19769 117.73856 233.577565C114.91257 232.46405 112.192405 230.215375 106.98763 225.63138L94.640845 215.225815C92.827735 213.441205 91.75791 212.51762 90.58934 211.788255C88.915015 210.726605 87.08002 210.021705 85.18276 209.58081C83.86222 209.29562 82.50092 209.200095 79.69104 209.01088L63.89682 207.51055C57.145725 207.033515 53.69247 206.79919 50.912875 205.60163C46.80039 203.821955 43.605055 200.62562 41.82438 196.513135C40.609335 193.71716 40.374945 190.263775 39.89136 183.313585L38.8366 168.134785C38.647385 165.345905 38.55086 163.963605 38.25667 162.653065C37.815775 160.765455 37.119875 158.891535 36.069225 157.217135C35.34986 156.078565 34.426275 155.00874 32.613165 152.924655L22.2261 140.877935C17.635605 135.66306 15.38693 133.063 14.27348 130.185955C12.65329 126.03149 12.65329 121.33147 14.27348 117.176955C15.38693 114.29562 17.635605 111.045555 22.2261 106.494025L32.613165 94.438305C34.426275 92.36422 35.34986 91.304395 36.069225 90.135825C37.119875 88.461425 37.815775 86.587505 38.25667 84.700895C38.55086 83.399355 38.647385 82.017055 38.8366 79.228175L39.89136 63.433955C40.334945 56.68286 40.568685 53.239605 41.819895 50.912875C43.59057 46.80039 46.802795 43.605055 50.91528 41.82438C53.699555 40.609335 57.14691 40.374945 63.903905 39.89136L79.698125 38.8366C82.506005 38.647385 83.869305 38.55086 85.189385 38.25667C87.087455 37.815775 88.921375 37.119875 90.595775 36.069225C91.764345 35.34986 92.83417 34.426275 94.808255 32.613165L106.994975 22.2261C112.19985 17.635605 114.879915 15.38693 117.645905 14.27348C121.80142 12.65329 126.49144 12.65329 130.646005 14.27348C133.477095 15.38693 136.07716 17.635605 141.343935 22.2261L153.398755 32.613165C154.776055 34.426275 156.06698 35.34986 157.20655 36.069225C158.88095 37.119875 160.75552 37.815775 162.64313 38.25667C163.95467 38.55086 165.33797 38.647385 168.12485 38.8366L183.313585 39.432575Z")}: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}@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}}
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;--slider-track: var(--app-200);--pill-shape-path: path("M75.4754 46.660315C109.9553 12.189895 165.8592 12.189895 200.33975 46.660315C234.8203 81.1408 234.8203 137.0447 200.33975 171.5246L171.5246 200.33975C137.0447 234.8203 81.1408 234.8203 46.660315 200.33975C12.189895 165.8592 12.189895 109.9553 46.660315 75.4754L75.4754 46.660315Z");--sunny-shape-path: path("M183.313585 39.432575C190.263775 39.89116 193.71716 40.1249 196.513135 41.350945C200.62562 43.13062 203.821955 46.462845 205.60163 50.44533C206.79919 53.239605 207.033515 56.68286 207.51055 63.433955L208.57031 79.228175C208.760525 82.017055 208.85605 83.399355 209.14076 84.700895C209.571135 86.587505 210.276035 88.461425 211.337685 90.135825C212.06705 91.304395 212.990635 92.36422 214.803745 94.438305L225.19081 106.494025C229.781305 111.6999 232.03098 114.299965 233.14343 117.176955C234.76362 121.33147 234.76362 126.03149 233.14343 130.185955C232.03098 133.063 229.781305 135.66306 225.19081 140.877935L214.803745 152.924655C212.990635 155.00874 212.06705 156.078565 211.337685 157.217135C210.276035 158.891535 209.571135 160.765455 209.14076 162.653065C208.856635 163.963605 208.76111 165.345905 208.572895 168.134785L207.511135 183.929005C207.0341 190.6801 206.799775 194.133355 205.602215 196.91763C203.82254 201.06619 200.626105 204.261525 196.51372 206.0422C194.186395 207.23976 190.73301 207.474085 183.78282 207.95112L168.61585 209.01088C165.80707 209.200095 164.44467 209.29562 163.13413 209.58081C161.22652 210.021705 159.3826 210.726605 157.7082 211.788255C156.55963 212.51762 155.509805 213.441205 153.40572 215.225815L141.348935 225.63138C136.144125 230.215375 133.54406 232.46405 130.71807 233.577565C126.553985 235.19769 121.88751 235.19769 117.73856 233.577565C114.91257 232.46405 112.192405 230.215375 106.98763 225.63138L94.640845 215.225815C92.827735 213.441205 91.75791 212.51762 90.58934 211.788255C88.915015 210.726605 87.08002 210.021705 85.18276 209.58081C83.86222 209.29562 82.50092 209.200095 79.69104 209.01088L63.89682 207.51055C57.145725 207.033515 53.69247 206.79919 50.912875 205.60163C46.80039 203.821955 43.605055 200.62562 41.82438 196.513135C40.609335 193.71716 40.374945 190.263775 39.89136 183.313585L38.8366 168.134785C38.647385 165.345905 38.55086 163.963605 38.25667 162.653065C37.815775 160.765455 37.119875 158.891535 36.069225 157.217135C35.34986 156.078565 34.426275 155.00874 32.613165 152.924655L22.2261 140.877935C17.635605 135.66306 15.38693 133.063 14.27348 130.185955C12.65329 126.03149 12.65329 121.33147 14.27348 117.176955C15.38693 114.29562 17.635605 111.045555 22.2261 106.494025L32.613165 94.438305C34.426275 92.36422 35.34986 91.304395 36.069225 90.135825C37.119875 88.461425 37.815775 86.587505 38.25667 84.700895C38.55086 83.399355 38.647385 82.017055 38.8366 79.228175L39.89136 63.433955C40.334945 56.68286 40.568685 53.239605 41.819895 50.912875C43.59057 46.80039 46.802795 43.605055 50.91528 41.82438C53.699555 40.609335 57.14691 40.374945 63.903905 39.89136L79.698125 38.8366C82.506005 38.647385 83.869305 38.55086 85.189385 38.25667C87.087455 37.815775 88.921375 37.119875 90.595775 36.069225C91.764345 35.34986 92.83417 34.426275 94.808255 32.613165L106.994975 22.2261C112.19985 17.635605 114.879915 15.38693 117.645905 14.27348C121.80142 12.65329 126.49144 12.65329 130.646005 14.27348C133.477095 15.38693 136.07716 17.635605 141.343935 22.2261L153.398755 32.613165C154.776055 34.426275 156.06698 35.34986 157.20655 36.069225C158.88095 37.119875 160.75552 37.815775 162.64313 38.25667C163.95467 38.55086 165.33797 38.647385 168.12485 38.8366L183.313585 39.432575Z")}: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) 0;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}@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
@@ -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 a=this.getAttribute("name").trim().split(/\s+/);let o="";a.length===1?o=a[0][0]||"":o=(a[0][0]||"")+(a[a.length-1][0]||""),this.initials.textContent=o.toUpperCase()}}}customElements.define("eui-avatar",m);const u=(()=>{let s={};return{register(t,e){s[t]=e},get(t){return s[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),o=a.firstElementChild;if(o&&o.style){const r=this.getAttribute("width"),l=this.getAttribute("height");r&&o.setAttribute("width",r),l&&o.setAttribute("height",l),o.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=`
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 s={};return{register(t,e){s[t]=e},get(t){return s[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;
@@ -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,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",I);const v="",f=(()=>{const s=[];function t(n,d){const h=[],g=n.replace(/:([^/]+)/g,(y,k)=>(h.push(k),"([^/]+)")).replace(/\//g,"\\/"),b=new RegExp(`^${v}${g}$`);s.push({regex:b,paramNames:h,renderFn:d})}function e(n){for(const{regex:d,paramNames:h,renderFn:g}of s){const b=n.match(d);if(b){const y={};return h.forEach((k,Q)=>{y[k]=decodeURIComponent(b[Q+1])}),{renderFn:g,params:y}}}return null}function i(n,d=!0){n.startsWith(v)||(n=v+(n.startsWith("/")?"":"/")+n);const h=n.split(/[?#]/)[0];if(h===window.location.pathname&&n.includes("#")){d&&history.pushState({},"",n);const b="#"+n.split("#")[1];a(b);return}const g=e(h);if(g)if(d&&history.pushState({},"",n),g.renderFn(g.params),window.dispatchEvent(new CustomEvent("route-changed",{detail:{path:n}})),n.includes("#")){const b="#"+n.split("#")[1];setTimeout(()=>a(b),100)}else{const b=document.getElementById("main");b&&b.scrollTo(0,0)}else o?(d&&history.pushState({},"",n),o()):console.warn(`No route found for ${h}`)}function a(n){if(n)try{const d=document.querySelector(n);d&&d.scrollIntoView({behavior:"smooth"})}catch{console.warn("Invalid hash:",n)}}let o=null;function r(n){o=n}function l(){history.back()}function c(){return window.location.pathname.replace(v,"")||"/"}return window.addEventListener("popstate",()=>{const n=window.location.pathname+window.location.search+window.location.hash;i(n,!1)}),window.addEventListener("click",n=>{if(n.button!==0||n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)return;const d=n.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(n.preventDefault(),h.startsWith("#")){history.pushState({},"",h),a(h);return}i(h)}}),{add:t,navigate:i,back:l,location:c,setNotFound:r}})();async function F(s){try{const t=document.getElementById("main");t.classList.add("fade-out"),await new Promise(i=>setTimeout(i,200));const e=await fetch(`/src/pages/${s}.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&&f.navigate(t)};setupEventListeners(){this.addEventListener("pointerdown",t=>{const e=document.createElement("span"),i=t.currentTarget,a=i.getBoundingClientRect(),o=Math.max(i.offsetWidth,i.offsetHeight),r=o/2;e.classList.add("ripple"),e.style.width=`${o}px`,e.style.height=`${o}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")||"",o=this.getAttribute("badge"),r=this.shadowRoot.querySelector(".badge");if(o)if(r)r.textContent=o;else{const n=document.createElement("span");n.className="badge",n.textContent=o,this.shadowRoot.appendChild(n)}else r&&r.remove();const l=this.shadowRoot.querySelector("slot[name='icon']");if(l)if(e||i){let n='<eui-avatar size="24"';i&&(n+=` name="${i}"`),n+=">",e&&(n+=`<img src="${e}" alt="${i||"Avatar"}" />`),n+="</eui-avatar>",l.innerHTML=n}else{const n=l.querySelector("eui-icon");t&&n?n.getAttribute("name")!==t&&n.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=`
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",I);const v="",f=(()=>{const s=[];function t(o,d){const h=[],g=o.replace(/:([^/]+)/g,(y,k)=>(h.push(k),"([^/]+)")).replace(/\//g,"\\/"),b=new RegExp(`^${v}${g}$`);s.push({regex:b,paramNames:h,renderFn:d})}function e(o){for(const{regex:d,paramNames:h,renderFn:g}of s){const b=o.match(d);if(b){const y={};return h.forEach((k,Q)=>{y[k]=decodeURIComponent(b[Q+1])}),{renderFn:g,params:y}}}return null}function i(o,d=!0){o.startsWith(v)||(o=v+(o.startsWith("/")?"":"/")+o);const h=o.split(/[?#]/)[0];if(h===window.location.pathname&&o.includes("#")){d&&history.pushState({},"",o);const b="#"+o.split("#")[1];a(b);return}const g=e(h);if(g)if(d&&history.pushState({},"",o),g.renderFn(g.params),window.dispatchEvent(new CustomEvent("route-changed",{detail:{path:o}})),o.includes("#")){const b="#"+o.split("#")[1];setTimeout(()=>a(b),100)}else{const b=document.getElementById("main");b&&b.scrollTo(0,0)}else n?(d&&history.pushState({},"",o),n()):console.warn(`No route found for ${h}`)}function a(o){if(o)try{const d=document.querySelector(o);d&&d.scrollIntoView({behavior:"smooth"})}catch{console.warn("Invalid hash:",o)}}let n=null;function r(o){n=o}function l(){history.back()}function c(){return window.location.pathname.replace(v,"")||"/"}return window.addEventListener("popstate",()=>{const o=window.location.pathname+window.location.search+window.location.hash;i(o,!1)}),window.addEventListener("click",o=>{if(o.button!==0||o.metaKey||o.altKey||o.ctrlKey||o.shiftKey)return;const d=o.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(o.preventDefault(),h.startsWith("#")){history.pushState({},"",h),a(h);return}i(h)}}),{add:t,navigate:i,back:l,location:c,setNotFound:r}})();async function F(s){try{const t=document.getElementById("main");t.classList.add("fade-out"),await new Promise(i=>setTimeout(i,200));const e=await fetch(`/src/pages/${s}.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&&f.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 o=document.createElement("span");o.className="badge",o.textContent=n,this.shadowRoot.appendChild(o)}else r&&r.remove();const l=this.shadowRoot.querySelector("slot[name='icon']");if(l)if(e||i){let o='<eui-avatar size="24"';i&&(o+=` name="${i}"`),o+=">",e&&(o+=`<img src="${e}" alt="${i||"Avatar"}" />`),o+="</eui-avatar>",l.innerHTML=o}else{const o=l.querySelector("eui-icon");t&&o?o.getAttribute("name")!==t&&o.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;
@@ -640,7 +640,7 @@
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 a=this.shadowRoot.querySelector("h1"),o=this.shadowRoot.querySelector("p"),r=this.shadowRoot.querySelector(".img");t==="title"&&(a.textContent=i),t==="subtitle"&&(o.textContent=i),t==="img"&&(r.style.backgroundImage=i?`url(${i})`:"")}}customElements.define("eui-header",B);class N 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",B);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
646
  display: inline-block;
@@ -830,7 +830,7 @@
830
830
  <${e}>
831
831
  <slot></slot>
832
832
  </${e}>
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 o=document.createElement("span"),r=a.currentTarget,l=r.getBoundingClientRect(),c=Math.max(r.offsetWidth,r.offsetHeight),n=c/2;o.classList.add("ripple"),o.style.width=`${c}px`,o.style.height=`${c}px`,o.style.left=`${a.clientX-l.left-n}px`,o.style.top=`${a.clientY-l.top-n}px`,i.appendChild(o),o.addEventListener("animationend",()=>{o.remove()})})}}customElements.define("eui-button",O);class U 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),o=c/2;n.classList.add("ripple"),n.style.width=`${c}px`,n.style.height=`${c}px`,n.style.left=`${a.clientX-l.left-o}px`,n.style.top=`${a.clientY-l.top-o}px`,i.appendChild(n),n.addEventListener("animationend",()=>{n.remove()})})}}customElements.define("eui-button",O);class U 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=`
834
834
  <style>
835
835
  :host {
836
836
  display: block;
@@ -888,7 +888,7 @@
888
888
  <span class="anchor-hash">#</span>
889
889
  </a>
890
890
  `:""}
891
- `}}customElements.define("eui-heading",U);function P(s){const i=Date.now()-s,a=Math.floor(i/1e3),o=Math.floor(a/60),r=Math.floor(o/60),l=Math.floor(r/24),c=Math.floor(l/30),n=Math.floor(c/12);return n>0?`${n}y`:c>0?`${c}mo`:l>0?`${l}d`:r>0?`${r}h`:o>0?`${o}m`:`${a}s`}function D(s){const i=Date.now()-s,a=Math.floor(i/1e3),o=Math.floor(a/60),r=Math.floor(o/60),l=Math.floor(r/24),c=Math.floor(l/30),n=Math.floor(c/12);return n>0?`${n} year${n>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`:o>0?`${o} minute${o>1?"s":""} ago`:`${a} second${a>1?"s":""} ago`}function X(s){return s.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;").replace(/`/g,"&#96;").replace(/'/g,"&#39;")}function C(s){const t=document.createElement("input");t.value=s,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}const W=Object.freeze(Object.defineProperty({__proto__:null,copystr:C,joinedAgo:D,sanitize:X,timeAgo:P},Symbol.toStringTag,{value:"Module"}));class Z 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",U);function P(s){const i=Date.now()-s,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),o=Math.floor(c/12);return o>0?`${o}y`:c>0?`${c}mo`:l>0?`${l}d`:r>0?`${r}h`:n>0?`${n}m`:`${a}s`}function D(s){const i=Date.now()-s,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),o=Math.floor(c/12);return o>0?`${o} year${o>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 X(s){return s.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;").replace(/`/g,"&#96;").replace(/'/g,"&#39;")}function C(s){const t=document.createElement("input");t.value=s,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}const W=Object.freeze(Object.defineProperty({__proto__:null,copystr:C,joinedAgo:D,sanitize:X,timeAgo:P},Symbol.toStringTag,{value:"Module"}));class Z 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=`
892
892
  <style>
893
893
  :host {
894
894
  position: relative;
@@ -941,8 +941,8 @@
941
941
 
942
942
  <pre class="${t?"g":""}"><code></code></pre>
943
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(`
944
- `),a=i.filter(r=>r.trim()).map(r=>r.match(/^\s*/)[0].length),o=a.length?Math.min(...a):0;return i.map(r=>r.slice(o)).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 o(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=>o(r,"string")),e==="bash"||e==="sh"?t=t.replace(/(#.*$)/gm,r=>o(r,"comment")):e==="css"?t=t.replace(/(\/\*[\s\S]*?\*\/)/g,r=>o(r,"comment")):t=t.replace(/(\/\/.*$|\/\*[\s\S]*?\*\/)/gm,r=>o(r,"comment"))):["html","xml"].includes(e)&&(t=t.replace(/(&lt;!--[\s\S]*?--&gt;)/g,r=>o(r,"comment")),t=t.replace(/(&lt;\/?[a-z0-9:-]+)/gi,r=>o(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)=>" "+o(l,"attr-name")+"="),t=t.replace(/(".*?")/g,r=>o(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(){C(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",Z);class V 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(){C(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",Z);class V 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=`
946
946
  <style>
947
947
  :host {
948
948
  display: block;
@@ -1034,7 +1034,7 @@
1034
1034
  <slot></slot>
1035
1035
  </div>
1036
1036
  </div>
1037
- `}}customElements.define("eui-app-titlebar",V);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),o=a/2;i.style.width=i.style.height=`${a}px`,i.style.left=`${t.clientX-e.left-o}px`,i.style.top=`${t.clientY-e.top-o}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",V);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=`
1038
1038
  <style>
1039
1039
  :host {
1040
1040
  display: block;
@@ -1281,7 +1281,7 @@
1281
1281
  <div class="slider-thumb"></div>
1282
1282
  <input type="range">
1283
1283
  </div>
1284
- `}connectedCallback(){this.inputEl=this.shadowRoot.querySelector("input"),this.labelEl=this.shadowRoot.querySelector(".label"),this.valueEl=this.shadowRoot.querySelector(".value-badge"),this.trackFillEl=this.shadowRoot.querySelector(".track-fill"),this.sliderThumbEl=this.shadowRoot.querySelector(".slider-thumb"),this.containerEl=this.shadowRoot.querySelector(".slider-container"),this.inputEl.min=this.getAttribute("min")||0,this.inputEl.max=this.getAttribute("max")||100,this.inputEl.step=this.getAttribute("step")||1,this.inputEl.value=this.getAttribute("value")||50,this.hasAttribute("label")&&(this.labelEl.textContent=this.getAttribute("label")),this.hasAttribute("disabled")&&(this.inputEl.disabled=!0),this.hasAttribute("thickness")&&this.style.setProperty("--track-thickness",this.getAttribute("thickness")),this.updateUI(),this.inputEl.addEventListener("input",()=>{this.updateValue(this.inputEl.value),this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))}),this.inputEl.addEventListener("change",()=>{this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}),this.inputEl.addEventListener("mousedown",()=>this.sliderThumbEl.classList.add("active")),this.inputEl.addEventListener("touchstart",()=>this.sliderThumbEl.classList.add("active"),{passive:!0}),this.onUp=()=>this.sliderThumbEl.classList.remove("active"),window.addEventListener("mouseup",this.onUp),window.addEventListener("touchend",this.onUp),this.resizeObserver=new ResizeObserver(()=>this.updateDimensions()),this.resizeObserver.observe(this.containerEl),this.updateDimensions()}disconnectedCallback(){this.resizeObserver&&this.resizeObserver.disconnect(),window.removeEventListener("mouseup",this.onUp),window.removeEventListener("touchend",this.onUp)}updateDimensions(){!this.inputEl||!this.containerEl||(this.hasAttribute("vertical")?this.inputEl.style.width=`${this.containerEl.offsetHeight}px`:this.inputEl.style.width="")}updateValue(t){this.setAttribute("value",t),this.updateUI()}updateUI(){if(!this.inputEl)return;const t=parseFloat(this.inputEl.min),e=parseFloat(this.inputEl.max),i=parseFloat(this.inputEl.value),a=(i-t)/(e-t)*100;this.containerEl.style.setProperty("--progress",`${a}%`);const o=a/100*20;this.containerEl.style.setProperty("--thumb-offset",`${o}px`),this.valueEl.textContent=i}attributeChangedCallback(t,e,i){this.inputEl&&(t==="value"&&i!==this.inputEl.value?(this.inputEl.value=i,this.updateUI()):["min","max","step"].includes(t)?(this.inputEl[t]=i,this.updateUI()):t==="label"?this.labelEl.textContent=i:t==="vertical"?this.updateDimensions():t==="disabled"?this.inputEl.disabled=i!==null:t==="thickness"&&(i?this.style.setProperty("--track-thickness",i):this.style.removeProperty("--track-thickness")))}get value(){return parseFloat(this.inputEl.value)}set value(t){this.setAttribute("value",t)}}customElements.define("eui-slider",Y);class K extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.render()}set tabItems(t){this._tabItems=t,this.render()}get tabItems(){return this._tabItems||[]}render(){this.shadowRoot.innerHTML=`
1284
+ `}connectedCallback(){this.inputEl=this.shadowRoot.querySelector("input"),this.labelEl=this.shadowRoot.querySelector(".label"),this.valueEl=this.shadowRoot.querySelector(".value-badge"),this.trackFillEl=this.shadowRoot.querySelector(".track-fill"),this.sliderThumbEl=this.shadowRoot.querySelector(".slider-thumb"),this.containerEl=this.shadowRoot.querySelector(".slider-container"),this.inputEl.min=this.getAttribute("min")||0,this.inputEl.max=this.getAttribute("max")||100,this.inputEl.step=this.getAttribute("step")||1,this.inputEl.value=this.getAttribute("value")||50,this.hasAttribute("label")&&(this.labelEl.textContent=this.getAttribute("label")),this.hasAttribute("disabled")&&(this.inputEl.disabled=!0),this.hasAttribute("thickness")&&this.style.setProperty("--track-thickness",this.getAttribute("thickness")),this.updateUI(),this.inputEl.addEventListener("input",()=>{this.updateValue(this.inputEl.value),this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))}),this.inputEl.addEventListener("change",()=>{this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}),this.inputEl.addEventListener("mousedown",()=>this.sliderThumbEl.classList.add("active")),this.inputEl.addEventListener("touchstart",()=>this.sliderThumbEl.classList.add("active"),{passive:!0}),this.onUp=()=>this.sliderThumbEl.classList.remove("active"),window.addEventListener("mouseup",this.onUp),window.addEventListener("touchend",this.onUp),this.resizeObserver=new ResizeObserver(()=>this.updateDimensions()),this.resizeObserver.observe(this.containerEl),this.updateDimensions()}disconnectedCallback(){this.resizeObserver&&this.resizeObserver.disconnect(),window.removeEventListener("mouseup",this.onUp),window.removeEventListener("touchend",this.onUp)}updateDimensions(){!this.inputEl||!this.containerEl||(this.hasAttribute("vertical")?this.inputEl.style.width=`${this.containerEl.offsetHeight}px`:this.inputEl.style.width="")}updateValue(t){this.setAttribute("value",t),this.updateUI()}updateUI(){if(!this.inputEl)return;const t=parseFloat(this.inputEl.min),e=parseFloat(this.inputEl.max),i=parseFloat(this.inputEl.value),a=(i-t)/(e-t)*100;this.containerEl.style.setProperty("--progress",`${a}%`);const n=a/100*20;this.containerEl.style.setProperty("--thumb-offset",`${n}px`),this.valueEl.textContent=i}attributeChangedCallback(t,e,i){this.inputEl&&(t==="value"&&i!==this.inputEl.value?(this.inputEl.value=i,this.updateUI()):["min","max","step"].includes(t)?(this.inputEl[t]=i,this.updateUI()):t==="label"?this.labelEl.textContent=i:t==="vertical"?this.updateDimensions():t==="disabled"?this.inputEl.disabled=i!==null:t==="thickness"&&(i?this.style.setProperty("--track-thickness",i):this.style.removeProperty("--track-thickness")))}get value(){return parseFloat(this.inputEl.value)}set value(t){this.setAttribute("value",t)}}customElements.define("eui-slider",Y);class K extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.render()}set tabItems(t){this._tabItems=t,this.render()}get tabItems(){return this._tabItems||[]}badge(t,e){const i=this.tabItems.findIndex(n=>n.path===t);i>-1&&(this.tabItems[i].badge=e);const a=this.shadowRoot.querySelector(`eui-tab-item[path="${t}"]`);a&&(e?a.setAttribute("badge",e):a.removeAttribute("badge"))}render(){this.shadowRoot.innerHTML=`
1285
1285
  <style>
1286
1286
  :host {
1287
1287
  position: fixed;
@@ -1292,7 +1292,6 @@
1292
1292
  z-index: 100;
1293
1293
  background-color: var(--app-200);
1294
1294
  padding-bottom: env(safe-area-inset-bottom);
1295
- box-sizing: border-box;
1296
1295
  }
1297
1296
 
1298
1297
  .inner {
@@ -1312,7 +1311,7 @@
1312
1311
  ${this.tabItems.map(t=>{const e=t.avatar?.src||"",i=t.avatar?.name||"";return`<eui-tab-item path="${t.path}" icon="${t.icon}" avatar-src="${e}" avatar-name="${i}" label="${t.label}" badge="${t.badge||""}"></eui-tab-item>`}).join("")}
1313
1312
  </slot>
1314
1313
  </div>
1315
- `}}customElements.define("eui-tab-bar",K);class G 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.updateActiveState(),this.addEventListener("click",this.handleClick),this._onRouteSubstitute=()=>this.updateActiveState(),window.addEventListener("popstate",this._onRouteSubstitute),window.addEventListener("route-changed",this._onRouteSubstitute)}disconnectedCallback(){this.removeEventListener("click",this.handleClick),window.removeEventListener("popstate",this._onRouteSubstitute),window.removeEventListener("route-changed",this._onRouteSubstitute)}attributeChangedCallback(t,e,i){if(e!==i&&this.hasRendered){if(t==="active")return;this.updateContent(),t==="path"&&this.updateActiveState()}}handleClick=()=>{const t=this.getAttribute("path");t&&f.navigate(t)};updateActiveState(){let t=f.location(),e=this.getAttribute("path");t.startsWith("/")||(t="/"+t),e&&!e.startsWith("/")&&(e="/"+e),e&&t===e?this.setAttribute("active",""):this.removeAttribute("active")}setupEventListeners(){this.addEventListener("pointerdown",t=>{const e=document.createElement("span"),i=t.currentTarget,a=i.getBoundingClientRect(),o=Math.max(i.offsetWidth,i.offsetHeight),r=o/2;e.classList.add("ripple"),e.style.width=`${o}px`,e.style.height=`${o}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")||"",o=this.getAttribute("badge"),r=this.shadowRoot.querySelector(".badge");if(o)if(r)r.textContent=o;else{const n=document.createElement("span");n.className="badge",n.textContent=o,this.shadowRoot.appendChild(n)}else r&&r.remove();const l=this.shadowRoot.querySelector("slot[name='icon']");if(l)if(e||i){let n='<eui-avatar size="24"';i&&(n+=` name="${i}"`),n+=">",e&&(n+=`<img src="${e}" alt="${i||"Avatar"}" />`),n+="</eui-avatar>",l.innerHTML=n}else t?l.innerHTML=`<eui-icon width="20" height="20" name="${t}"></eui-icon>`:l.innerHTML="";const c=this.shadowRoot.querySelector(".label");c&&(c.textContent=a)}render(){this.shadowRoot.innerHTML=`
1314
+ `}}customElements.define("eui-tab-bar",K);class G 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.updateActiveState(),this.addEventListener("click",this.handleClick),this._onRouteSubstitute=()=>this.updateActiveState(),window.addEventListener("popstate",this._onRouteSubstitute),window.addEventListener("route-changed",this._onRouteSubstitute)}disconnectedCallback(){this.removeEventListener("click",this.handleClick),window.removeEventListener("popstate",this._onRouteSubstitute),window.removeEventListener("route-changed",this._onRouteSubstitute)}attributeChangedCallback(t,e,i){if(e!==i&&this.hasRendered){if(t==="active")return;this.updateContent(),t==="path"&&this.updateActiveState()}}handleClick=()=>{const t=this.getAttribute("path");t&&f.navigate(t)};updateActiveState(){let t=f.location(),e=this.getAttribute("path");t.startsWith("/")||(t="/"+t),e&&!e.startsWith("/")&&(e="/"+e),e&&t===e?this.setAttribute("active",""):this.removeAttribute("active")}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 o=document.createElement("span");o.className="badge",o.textContent=n,this.shadowRoot.appendChild(o)}else r&&r.remove();const l=this.shadowRoot.querySelector("slot[name='icon']");if(l)if(e||i){let o='<eui-avatar size="24"';i&&(o+=` name="${i}"`),o+=">",e&&(o+=`<img src="${e}" alt="${i||"Avatar"}" />`),o+="</eui-avatar>",l.innerHTML=o}else t?l.innerHTML=`<eui-icon width="20" height="20" name="${t}"></eui-icon>`:l.innerHTML="";const c=this.shadowRoot.querySelector(".label");c&&(c.textContent=a)}render(){this.shadowRoot.innerHTML=`
1316
1315
  <style>
1317
1316
  :host {
1318
1317
  position: relative;
@@ -1375,7 +1374,6 @@
1375
1374
  justify-content: center;
1376
1375
  font-size: 10px;
1377
1376
  font-weight: 700;
1378
- box-shadow: 0 2px 4px rgba(0,0,0,0.2);
1379
1377
  pointer-events: none;
1380
1378
  z-index: 2;
1381
1379
  }
package/dist/erisui.mjs CHANGED
@@ -64,8 +64,8 @@ class C extends HTMLElement {
64
64
  }
65
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")) {
66
66
  const a = this.getAttribute("name").trim().split(/\s+/);
67
- let o = "";
68
- a.length === 1 ? o = a[0][0] || "" : o = (a[0][0] || "") + (a[a.length - 1][0] || ""), this.initials.textContent = o.toUpperCase();
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();
69
69
  }
70
70
  }
71
71
  }
@@ -111,10 +111,10 @@ class A extends HTMLElement {
111
111
  }
112
112
  const i = document.createElement("template");
113
113
  i.innerHTML = e.trim();
114
- const a = i.content.cloneNode(!0), o = a.firstElementChild;
115
- if (o && o.style) {
114
+ const a = i.content.cloneNode(!0), n = a.firstElementChild;
115
+ if (n && n.style) {
116
116
  const r = this.getAttribute("width"), l = this.getAttribute("height");
117
- r && o.setAttribute("width", r), l && o.setAttribute("height", l), o.style.display = "block";
117
+ r && n.setAttribute("width", r), l && n.setAttribute("height", l), n.style.display = "block";
118
118
  }
119
119
  this.shadowRoot.innerHTML = "", this.shadowRoot.appendChild(a);
120
120
  }
@@ -633,13 +633,13 @@ class $ extends HTMLElement {
633
633
  customElements.define("eui-chip", $);
634
634
  const g = "", m = (() => {
635
635
  const s = [];
636
- function t(n, d) {
637
- const h = [], b = n.replace(/:([^/]+)/g, (f, v) => (h.push(v), "([^/]+)")).replace(/\//g, "\\/"), p = new RegExp(`^${g}${b}$`);
636
+ function t(o, d) {
637
+ const h = [], b = o.replace(/:([^/]+)/g, (f, v) => (h.push(v), "([^/]+)")).replace(/\//g, "\\/"), p = new RegExp(`^${g}${b}$`);
638
638
  s.push({ regex: p, paramNames: h, renderFn: d });
639
639
  }
640
- function e(n) {
640
+ function e(o) {
641
641
  for (const { regex: d, paramNames: h, renderFn: b } of s) {
642
- const p = n.match(d);
642
+ const p = o.match(d);
643
643
  if (p) {
644
644
  const f = {};
645
645
  return h.forEach((v, E) => {
@@ -649,38 +649,38 @@ const g = "", m = (() => {
649
649
  }
650
650
  return null;
651
651
  }
652
- function i(n, d = !0) {
653
- n.startsWith(g) || (n = g + (n.startsWith("/") ? "" : "/") + n);
654
- const h = n.split(/[?#]/)[0];
655
- if (h === window.location.pathname && n.includes("#")) {
656
- d && history.pushState({}, "", n);
657
- const p = "#" + n.split("#")[1];
652
+ function i(o, d = !0) {
653
+ o.startsWith(g) || (o = g + (o.startsWith("/") ? "" : "/") + o);
654
+ const h = o.split(/[?#]/)[0];
655
+ if (h === window.location.pathname && o.includes("#")) {
656
+ d && history.pushState({}, "", o);
657
+ const p = "#" + o.split("#")[1];
658
658
  a(p);
659
659
  return;
660
660
  }
661
661
  const b = e(h);
662
662
  if (b)
663
- if (d && history.pushState({}, "", n), b.renderFn(b.params), window.dispatchEvent(new CustomEvent("route-changed", { detail: { path: n } })), n.includes("#")) {
664
- const p = "#" + n.split("#")[1];
663
+ if (d && history.pushState({}, "", o), b.renderFn(b.params), window.dispatchEvent(new CustomEvent("route-changed", { detail: { path: o } })), o.includes("#")) {
664
+ const p = "#" + o.split("#")[1];
665
665
  setTimeout(() => a(p), 100);
666
666
  } else {
667
667
  const p = document.getElementById("main");
668
668
  p && p.scrollTo(0, 0);
669
669
  }
670
- else o ? (d && history.pushState({}, "", n), o()) : console.warn(`No route found for ${h}`);
670
+ else n ? (d && history.pushState({}, "", o), n()) : console.warn(`No route found for ${h}`);
671
671
  }
672
- function a(n) {
673
- if (n)
672
+ function a(o) {
673
+ if (o)
674
674
  try {
675
- const d = document.querySelector(n);
675
+ const d = document.querySelector(o);
676
676
  d && d.scrollIntoView({ behavior: "smooth" });
677
677
  } catch {
678
- console.warn("Invalid hash:", n);
678
+ console.warn("Invalid hash:", o);
679
679
  }
680
680
  }
681
- let o = null;
682
- function r(n) {
683
- o = n;
681
+ let n = null;
682
+ function r(o) {
683
+ n = o;
684
684
  }
685
685
  function l() {
686
686
  history.back();
@@ -689,15 +689,15 @@ const g = "", m = (() => {
689
689
  return window.location.pathname.replace(g, "") || "/";
690
690
  }
691
691
  return window.addEventListener("popstate", () => {
692
- const n = window.location.pathname + window.location.search + window.location.hash;
693
- i(n, !1);
694
- }), window.addEventListener("click", (n) => {
695
- if (n.button !== 0 || n.metaKey || n.altKey || n.ctrlKey || n.shiftKey) return;
696
- const d = n.target.closest("a");
692
+ const o = window.location.pathname + window.location.search + window.location.hash;
693
+ i(o, !1);
694
+ }), window.addEventListener("click", (o) => {
695
+ if (o.button !== 0 || o.metaKey || o.altKey || o.ctrlKey || o.shiftKey) return;
696
+ const d = o.target.closest("a");
697
697
  if (!d || d.hasAttribute("download") || d.getAttribute("target") === "_blank") return;
698
698
  const h = d.getAttribute("href");
699
699
  if (!(!h || h.startsWith("http") && !h.startsWith(window.location.origin))) {
700
- if (n.preventDefault(), h.startsWith("#")) {
700
+ if (o.preventDefault(), h.startsWith("#")) {
701
701
  history.pushState({}, "", h), a(h);
702
702
  return;
703
703
  }
@@ -749,30 +749,30 @@ class H extends HTMLElement {
749
749
  };
750
750
  setupEventListeners() {
751
751
  this.addEventListener("pointerdown", (t) => {
752
- const e = document.createElement("span"), i = t.currentTarget, a = i.getBoundingClientRect(), o = Math.max(i.offsetWidth, i.offsetHeight), r = o / 2;
753
- e.classList.add("ripple"), e.style.width = `${o}px`, e.style.height = `${o}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", () => {
752
+ const e = document.createElement("span"), i = t.currentTarget, a = i.getBoundingClientRect(), n = Math.max(i.offsetWidth, i.offsetHeight), r = n / 2;
753
+ 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", () => {
754
754
  e.remove();
755
755
  });
756
756
  });
757
757
  }
758
758
  updateContent() {
759
- const t = this.getAttribute("icon"), e = this.getAttribute("avatar-src"), i = this.getAttribute("avatar-name"), a = this.getAttribute("label") || "", o = this.getAttribute("badge"), r = this.shadowRoot.querySelector(".badge");
760
- if (o)
759
+ 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");
760
+ if (n)
761
761
  if (r)
762
- r.textContent = o;
762
+ r.textContent = n;
763
763
  else {
764
- const n = document.createElement("span");
765
- n.className = "badge", n.textContent = o, this.shadowRoot.appendChild(n);
764
+ const o = document.createElement("span");
765
+ o.className = "badge", o.textContent = n, this.shadowRoot.appendChild(o);
766
766
  }
767
767
  else r && r.remove();
768
768
  const l = this.shadowRoot.querySelector("slot[name='icon']");
769
769
  if (l)
770
770
  if (e || i) {
771
- let n = '<eui-avatar size="24"';
772
- i && (n += ` name="${i}"`), n += ">", e && (n += `<img src="${e}" alt="${i || "Avatar"}" />`), n += "</eui-avatar>", l.innerHTML = n;
771
+ let o = '<eui-avatar size="24"';
772
+ i && (o += ` name="${i}"`), o += ">", e && (o += `<img src="${e}" alt="${i || "Avatar"}" />`), o += "</eui-avatar>", l.innerHTML = o;
773
773
  } else {
774
- const n = l.querySelector("eui-icon");
775
- t && n ? n.getAttribute("name") !== t && n.setAttribute("name", t) : t ? l.innerHTML = `<eui-icon width="24" height="24" name="${t}"></eui-icon>` : l.innerHTML = "";
774
+ const o = l.querySelector("eui-icon");
775
+ t && o ? o.getAttribute("name") !== t && o.setAttribute("name", t) : t ? l.innerHTML = `<eui-icon width="24" height="24" name="${t}"></eui-icon>` : l.innerHTML = "";
776
776
  }
777
777
  const c = this.shadowRoot.querySelector(".label");
778
778
  c && (c.textContent = a);
@@ -1115,8 +1115,8 @@ class I extends HTMLElement {
1115
1115
  this.hd = this.shadowRoot.querySelector(".header"), this.hasAttribute("type") && this.hd.classList.add(this.getAttribute("type"));
1116
1116
  }
1117
1117
  attributeChangedCallback(t, e, i) {
1118
- const a = this.shadowRoot.querySelector("h1"), o = this.shadowRoot.querySelector("p"), r = this.shadowRoot.querySelector(".img");
1119
- t === "title" && (a.textContent = i), t === "subtitle" && (o.textContent = i), t === "img" && (r.style.backgroundImage = i ? `url(${i})` : "");
1118
+ const a = this.shadowRoot.querySelector("h1"), n = this.shadowRoot.querySelector("p"), r = this.shadowRoot.querySelector(".img");
1119
+ t === "title" && (a.textContent = i), t === "subtitle" && (n.textContent = i), t === "img" && (r.style.backgroundImage = i ? `url(${i})` : "");
1120
1120
  }
1121
1121
  }
1122
1122
  customElements.define("eui-header", I);
@@ -1351,9 +1351,9 @@ class j extends HTMLElement {
1351
1351
  `;
1352
1352
  const i = this.shadowRoot.querySelector(e);
1353
1353
  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) => {
1354
- const o = document.createElement("span"), r = a.currentTarget, l = r.getBoundingClientRect(), c = Math.max(r.offsetWidth, r.offsetHeight), n = c / 2;
1355
- o.classList.add("ripple"), o.style.width = `${c}px`, o.style.height = `${c}px`, o.style.left = `${a.clientX - l.left - n}px`, o.style.top = `${a.clientY - l.top - n}px`, i.appendChild(o), o.addEventListener("animationend", () => {
1356
- o.remove();
1354
+ const n = document.createElement("span"), r = a.currentTarget, l = r.getBoundingClientRect(), c = Math.max(r.offsetWidth, r.offsetHeight), o = c / 2;
1355
+ n.classList.add("ripple"), n.style.width = `${c}px`, n.style.height = `${c}px`, n.style.left = `${a.clientX - l.left - o}px`, n.style.top = `${a.clientY - l.top - o}px`, i.appendChild(n), n.addEventListener("animationend", () => {
1356
+ n.remove();
1357
1357
  });
1358
1358
  });
1359
1359
  }
@@ -1433,12 +1433,12 @@ class q extends HTMLElement {
1433
1433
  }
1434
1434
  customElements.define("eui-heading", q);
1435
1435
  function B(s) {
1436
- const i = Date.now() - s, a = Math.floor(i / 1e3), o = Math.floor(a / 60), r = Math.floor(o / 60), l = Math.floor(r / 24), c = Math.floor(l / 30), n = Math.floor(c / 12);
1437
- return n > 0 ? `${n}y` : c > 0 ? `${c}mo` : l > 0 ? `${l}d` : r > 0 ? `${r}h` : o > 0 ? `${o}m` : `${a}s`;
1436
+ const i = Date.now() - s, 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), o = Math.floor(c / 12);
1437
+ return o > 0 ? `${o}y` : c > 0 ? `${c}mo` : l > 0 ? `${l}d` : r > 0 ? `${r}h` : n > 0 ? `${n}m` : `${a}s`;
1438
1438
  }
1439
1439
  function N(s) {
1440
- const i = Date.now() - s, a = Math.floor(i / 1e3), o = Math.floor(a / 60), r = Math.floor(o / 60), l = Math.floor(r / 24), c = Math.floor(l / 30), n = Math.floor(c / 12);
1441
- return n > 0 ? `${n} year${n > 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` : o > 0 ? `${o} minute${o > 1 ? "s" : ""} ago` : `${a} second${a > 1 ? "s" : ""} ago`;
1440
+ const i = Date.now() - s, 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), o = Math.floor(c / 12);
1441
+ return o > 0 ? `${o} year${o > 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`;
1442
1442
  }
1443
1443
  function O(s) {
1444
1444
  return s.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;").replace(/`/g, "&#96;").replace(/'/g, "&#39;");
@@ -1529,8 +1529,8 @@ class U extends HTMLElement {
1529
1529
  let e = (this.querySelector("code") || this).innerHTML || "";
1530
1530
  e = this._unescapeHtml(e), e = e.replace(/^\s*\n/, "").replace(/\n\s*$/, "");
1531
1531
  const i = e.split(`
1532
- `), a = i.filter((r) => r.trim()).map((r) => r.match(/^\s*/)[0].length), o = a.length ? Math.min(...a) : 0;
1533
- return i.map((r) => r.slice(o)).join(`
1532
+ `), a = i.filter((r) => r.trim()).map((r) => r.match(/^\s*/)[0].length), n = a.length ? Math.min(...a) : 0;
1533
+ return i.map((r) => r.slice(n)).join(`
1534
1534
  `);
1535
1535
  }
1536
1536
  _unescapeHtml(t) {
@@ -1541,11 +1541,11 @@ class U extends HTMLElement {
1541
1541
  t = t.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
1542
1542
  const i = {};
1543
1543
  let a = 0;
1544
- function o(r, l) {
1544
+ function n(r, l) {
1545
1545
  const c = `__TOKEN_${l}_${a++}__`;
1546
1546
  return i[c] = `<span class="token ${l}">${r}</span>`, c;
1547
1547
  }
1548
- return ["javascript", "js", "json", "bash", "sh", "css"].includes(e) ? (t = t.replace(/("(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/g, (r) => o(r, "string")), e === "bash" || e === "sh" ? t = t.replace(/(#.*$)/gm, (r) => o(r, "comment")) : e === "css" ? t = t.replace(/(\/\*[\s\S]*?\*\/)/g, (r) => o(r, "comment")) : t = t.replace(/(\/\/.*$|\/\*[\s\S]*?\*\/)/gm, (r) => o(r, "comment"))) : ["html", "xml"].includes(e) && (t = t.replace(/(&lt;!--[\s\S]*?--&gt;)/g, (r) => o(r, "comment")), t = t.replace(/(&lt;\/?[a-z0-9:-]+)/gi, (r) => o(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) => " " + o(l, "attr-name") + "="), t = t.replace(/(".*?")/g, (r) => o(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) => {
1548
+ 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) => {
1549
1549
  t = t.replace(r, i[r]);
1550
1550
  }), t;
1551
1551
  }
@@ -1696,8 +1696,8 @@ class D extends HTMLElement {
1696
1696
  this.removeEventListener("mousedown", this._handleMouseDown), this.hasAttribute("ripple") && this.addEventListener("mousedown", this._handleMouseDown);
1697
1697
  }
1698
1698
  _addRipple(t) {
1699
- const e = this.getBoundingClientRect(), i = document.createElement("span"), a = Math.max(e.width, e.height), o = a / 2;
1700
- i.style.width = i.style.height = `${a}px`, i.style.left = `${t.clientX - e.left - o}px`, i.style.top = `${t.clientY - e.top - o}px`, i.classList.add("ripple"), this.shadowRoot.querySelector(".surface").appendChild(i), i.addEventListener("animationend", () => {
1699
+ const e = this.getBoundingClientRect(), i = document.createElement("span"), a = Math.max(e.width, e.height), n = a / 2;
1700
+ 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", () => {
1701
1701
  i.remove();
1702
1702
  });
1703
1703
  }
@@ -1980,8 +1980,8 @@ class X extends HTMLElement {
1980
1980
  if (!this.inputEl) return;
1981
1981
  const t = parseFloat(this.inputEl.min), e = parseFloat(this.inputEl.max), i = parseFloat(this.inputEl.value), a = (i - t) / (e - t) * 100;
1982
1982
  this.containerEl.style.setProperty("--progress", `${a}%`);
1983
- const o = a / 100 * 20;
1984
- this.containerEl.style.setProperty("--thumb-offset", `${o}px`), this.valueEl.textContent = i;
1983
+ const n = a / 100 * 20;
1984
+ this.containerEl.style.setProperty("--thumb-offset", `${n}px`), this.valueEl.textContent = i;
1985
1985
  }
1986
1986
  attributeChangedCallback(t, e, i) {
1987
1987
  this.inputEl && (t === "value" && i !== this.inputEl.value ? (this.inputEl.value = i, this.updateUI()) : ["min", "max", "step"].includes(t) ? (this.inputEl[t] = i, this.updateUI()) : t === "label" ? this.labelEl.textContent = i : t === "vertical" ? this.updateDimensions() : t === "disabled" ? this.inputEl.disabled = i !== null : t === "thickness" && (i ? this.style.setProperty("--track-thickness", i) : this.style.removeProperty("--track-thickness")));
@@ -2007,6 +2007,12 @@ class W extends HTMLElement {
2007
2007
  get tabItems() {
2008
2008
  return this._tabItems || [];
2009
2009
  }
2010
+ badge(t, e) {
2011
+ const i = this.tabItems.findIndex((n) => n.path === t);
2012
+ i > -1 && (this.tabItems[i].badge = e);
2013
+ const a = this.shadowRoot.querySelector(`eui-tab-item[path="${t}"]`);
2014
+ a && (e ? a.setAttribute("badge", e) : a.removeAttribute("badge"));
2015
+ }
2010
2016
  render() {
2011
2017
  this.shadowRoot.innerHTML = `
2012
2018
  <style>
@@ -2019,7 +2025,6 @@ class W extends HTMLElement {
2019
2025
  z-index: 100;
2020
2026
  background-color: var(--app-200);
2021
2027
  padding-bottom: env(safe-area-inset-bottom);
2022
- box-sizing: border-box;
2023
2028
  }
2024
2029
 
2025
2030
  .inner {
@@ -2075,27 +2080,27 @@ class Z extends HTMLElement {
2075
2080
  }
2076
2081
  setupEventListeners() {
2077
2082
  this.addEventListener("pointerdown", (t) => {
2078
- const e = document.createElement("span"), i = t.currentTarget, a = i.getBoundingClientRect(), o = Math.max(i.offsetWidth, i.offsetHeight), r = o / 2;
2079
- e.classList.add("ripple"), e.style.width = `${o}px`, e.style.height = `${o}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", () => {
2083
+ const e = document.createElement("span"), i = t.currentTarget, a = i.getBoundingClientRect(), n = Math.max(i.offsetWidth, i.offsetHeight), r = n / 2;
2084
+ 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", () => {
2080
2085
  e.remove();
2081
2086
  });
2082
2087
  });
2083
2088
  }
2084
2089
  updateContent() {
2085
- const t = this.getAttribute("icon"), e = this.getAttribute("avatar-src"), i = this.getAttribute("avatar-name"), a = this.getAttribute("label") || "", o = this.getAttribute("badge"), r = this.shadowRoot.querySelector(".badge");
2086
- if (o)
2090
+ 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");
2091
+ if (n)
2087
2092
  if (r)
2088
- r.textContent = o;
2093
+ r.textContent = n;
2089
2094
  else {
2090
- const n = document.createElement("span");
2091
- n.className = "badge", n.textContent = o, this.shadowRoot.appendChild(n);
2095
+ const o = document.createElement("span");
2096
+ o.className = "badge", o.textContent = n, this.shadowRoot.appendChild(o);
2092
2097
  }
2093
2098
  else r && r.remove();
2094
2099
  const l = this.shadowRoot.querySelector("slot[name='icon']");
2095
2100
  if (l)
2096
2101
  if (e || i) {
2097
- let n = '<eui-avatar size="24"';
2098
- i && (n += ` name="${i}"`), n += ">", e && (n += `<img src="${e}" alt="${i || "Avatar"}" />`), n += "</eui-avatar>", l.innerHTML = n;
2102
+ let o = '<eui-avatar size="24"';
2103
+ i && (o += ` name="${i}"`), o += ">", e && (o += `<img src="${e}" alt="${i || "Avatar"}" />`), o += "</eui-avatar>", l.innerHTML = o;
2099
2104
  } else t ? l.innerHTML = `<eui-icon width="20" height="20" name="${t}"></eui-icon>` : l.innerHTML = "";
2100
2105
  const c = this.shadowRoot.querySelector(".label");
2101
2106
  c && (c.textContent = a);
@@ -2164,7 +2169,6 @@ class Z extends HTMLElement {
2164
2169
  justify-content: center;
2165
2170
  font-size: 10px;
2166
2171
  font-weight: 700;
2167
- box-shadow: 0 2px 4px rgba(0,0,0,0.2);
2168
2172
  pointer-events: none;
2169
2173
  z-index: 2;
2170
2174
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@3r1s_s/erisui",
3
- "version": "1.0.26",
3
+ "version": "1.0.28",
4
4
  "description": "an awesome ui library for web apps",
5
5
  "type": "module",
6
6
  "files": [