godown 3.13.0 → 3.13.1

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.
Files changed (42) hide show
  1. package/build/godown+lit.iife.js +2 -2
  2. package/build/godown+lit.iife.js.map +1 -1
  3. package/build/godown+lit.js +2 -2
  4. package/build/godown+lit.js.map +1 -1
  5. package/build/godown+lit.umd.js +2 -2
  6. package/build/godown+lit.umd.js.map +1 -1
  7. package/build/godown.iife.js +4 -4
  8. package/build/godown.iife.js.map +1 -1
  9. package/build/godown.js +3 -3
  10. package/build/godown.js.map +1 -1
  11. package/build/godown.umd.js +5 -5
  12. package/build/godown.umd.js.map +1 -1
  13. package/internal/global-style.js +1 -1
  14. package/internal/global-style.js.map +1 -1
  15. package/internal/popover.js +1 -1
  16. package/internal/popover.js.map +1 -1
  17. package/package.json +1 -1
  18. package/src/internal/global-style.ts +2 -2
  19. package/src/internal/popover.ts +8 -8
  20. package/src/web-components/alert/component.ts +5 -13
  21. package/src/web-components/button/component.ts +6 -12
  22. package/src/web-components/card/component.ts +1 -2
  23. package/src/web-components/input/component.ts +4 -4
  24. package/src/web-components/select/component.ts +1 -0
  25. package/src/web-components/tabs/component.ts +1 -1
  26. package/web-components/alert/component.d.ts.map +1 -1
  27. package/web-components/alert/component.js +1 -1
  28. package/web-components/alert/component.js.map +1 -1
  29. package/web-components/button/component.d.ts.map +1 -1
  30. package/web-components/button/component.js +1 -1
  31. package/web-components/button/component.js.map +1 -1
  32. package/web-components/card/component.d.ts.map +1 -1
  33. package/web-components/card/component.js +1 -1
  34. package/web-components/card/component.js.map +1 -1
  35. package/web-components/input/component.js +1 -1
  36. package/web-components/input/component.js.map +1 -1
  37. package/web-components/select/component.d.ts.map +1 -1
  38. package/web-components/select/component.js +1 -1
  39. package/web-components/select/component.js.map +1 -1
  40. package/web-components/tabs/component.js +1 -1
  41. package/web-components/tabs/component.js.map +1 -1
  42. package/web-types.json +1 -1
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license MIT
3
- * @version 3.13.0
3
+ * @version 3.13.1
4
4
  */
5
5
  function t(t,e,s,o){var r,a=arguments.length,l=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,s):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,e,s,o);else for(var h=t.length-1;h>=0;h--)(r=t[h])&&(l=(a<3?r(l):a>3?r(e,s,l):r(e,s))||l);return a>3&&l&&Object.defineProperty(e,s,l),l}"function"==typeof SuppressedError&&SuppressedError;const e=t=>null==t,s=t=>"string"==typeof t,o=t=>null!==t&&"object"==typeof t,{isArray:r}=Array,a=(t,...e)=>{const s={};for(const o in t)e.includes(o)||(s[o]=t[o]);return s},l=t=>(t=>{var e;return(null===(e=t.match(/[A-Z][^A-Z_-\s]*|[^A-Z_-\s]+/g))||void 0===e?void 0:e.map((t=>t.toLowerCase())))||[]})(t).join("-");
6
6
  /**
@@ -54,5 +54,5 @@ const U=globalThis,j=U.trustedTypes,V=j?j.createPolicy("lit-html",{createHTML:t=
54
54
  * @license
55
55
  * Copyright 2017 Google LLC
56
56
  * SPDX-License-Identifier: BSD-3-Clause
57
- */var s,o},zt=6;let Dt=class i{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};const Ut=(t,e)=>(t?t+(e?" "+e:""):e)||"",jt=(...t)=>t.reduce(((t,e)=>{if(!e)return t;if(r(e))return Ut(t,jt(...e));if(o(e)){for(const s in e)e[s]&&(t=Ut(t,s));return t}return Ut(t,e)}),"");function Vt(t,o){(t=>e(t)||!1===t)(o)?this.removeAttribute(t):!0===o?this.setAttribute(t,""):s(o)||(t=>"number"==typeof t)(o)&&!Number.isNaN(o)?this.setAttribute(t,String(o)):this[t]=o}const Ht=(t=>(...e)=>({_$litDirective$:t,values:e}))(class AttrDirective extends Dt{render(t,e){}update(t,[e,s=Vt]){if(e&&t.type===zt)for(const o in e)s.call(t.element,o,e[o]);return ht}}),Lt=((t,e)=>s=>t({...e,...s}))(Ht,{width:"1em",height:"1em",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}),Gt=(t,e)=>at`<slot name="${t||dt}">${e||dt}</slot>`,Ft=(t,e)=>{if(!t)return dt;const o=s(t)?t:xt(t);return o?at`<style media="${dt}">${o}</style>`:dt},Wt=t=>(e,...o)=>{const r=lt(e,o),a=s(t)?t:t.join(" "),l=t=>at`<svg viewBox="${a}" ${Lt(t)}>${r}</svg>`;return l.body=r,l.viewBox=a,l};function*qt(t,e,s){for(let s=0;s<t;s++)yield e(s)}function Yt(t,e=this){if(!e||!t)return[];const s=new Set;e instanceof Element&&e.shadowRoot&&Yt(t,e.shadowRoot).forEach((t=>s.add(t))),e.querySelectorAll(t).forEach((t=>s.add(t)));for(const o of e.children)Yt(t,o).forEach((t=>s.add(t)));return Array.from(s)}function Xt(t,e=this){if(!e||!t)return null;let s;if(e instanceof Element&&e.shadowRoot&&(s=Xt(t,e.shadowRoot),s))return s;if(s=e.querySelector(t),s)return s;for(const o of e.children)if(s=Xt(t,o),s)return s;return null}class Events{constructor(){this.inner=new Map}add(t,e,s,o){if(!t||!s)return;const r=this.inner.get(e)||new Map,a=r.get(t)||new Set;return a.add(s),r.set(t,a),this.inner.set(e,r),t.addEventListener(e,s,o),s}remove(t,e,s,o){if(!t||!s)return;const r=this.inner.get(e);if(r){const o=r.get(t);o&&(o.delete(s),o.size||(r.delete(t),r.size||this.inner.delete(e)))}t.removeEventListener(e,s,o)}removeAll(){this.inner.forEach(((t,e)=>{t.forEach(((t,s)=>{t.forEach((t=>{s.removeEventListener(e,t)}))})),t.clear()})),this.inner.clear()}}class Observers{constructor(){this.inner=new Map}add(t,e,s,o){const[r,a]=((t,e,s)=>{let o,r;switch(t){case MutationObserver:case ResizeObserver:o=new t(e),r=t=>o.observe(t,s);break;case IntersectionObserver:o=new t(e,s),r=t=>o.observe(t);break;case PerformanceObserver:o=new t(e),r=()=>o.observe(s)}return[o,r]})(e,s,o);if(r)return this.inner.set(r,(this.inner.get(r)||new Set).add(t)),a(t),r}remove(t,e){t.disconnect();const s=this.inner.get(t);"unobserve"in t?(e?(t.unobserve(e),s?.delete(e)):(s?.forEach((e=>{t.unobserve(e)})),s?.clear()),s&&!s.size&&this.inner.delete(t)):s&&this.inner.delete(t)}removeAll(){this.inner.forEach(((t,e)=>{this.remove(e)}))}}class Ranger{constructor(t,e,s){this.max=Math.max(t,e),this.min=Math.min(t,e),this.diff=this.max-this.min,this.step=s}random(){return this.normalize(Math.random()*this.diff+this.min)}present(t){return this.normalize(t*this.diff)}normalize(t){return t=this.restrict(t),this.step?this.min+Math.round((t-this.min)/this.step)*this.step:t}restrict(t){return this.max<=t?this.max:this.min>=t?this.min:t}}const Zt=(t,e,s)=>t.startsWith(e)&&t.endsWith(s);class RouteTree{constructor(){this.matchType=RouteTree.MatchTypes.strict,this.children=[]}insert(t,e,s=0){if(e||(e=RouteTree.split(t)),e.length===s)return void(this.pattern=t);const o=e[s];let r=this.findStrict(o);r||(r=new RouteTree,r.part=o,r.matchType=RouteTree.dynamic(o).matchType,this.children.push(r),this.sorted=!1),r.insert(t,e,s+1)}search(t,e=0){if(s(t)&&(t=RouteTree.split(t)),this.sorted||this.sort(),t.length===e||RouteTree.dynamic(this.part).matchType===RouteTree.MatchTypes.multi)return this.pattern?this:null;const o=t[e],r=this.filterWide(o);for(const s of r){const o=s.search(t,e+1);if(null!==o)return o}return null}findStrict(t){return this.children.find((e=>e.part===t))||null}filterWide(t){return this.children.filter((e=>e.part===t||e.matchType))}sort(){const{children:t}=this;if(t.length){t.sort(((t,e)=>t.matchType-e.matchType));for(const e of t)e.sort()}this.sorted=!0}static parseParams(t,e){const s=RouteTree.split(t),o=RouteTree.split(e),r={};for(let t=0;t<o.length;t++){const e=o[t],{key:a,matchType:l}=RouteTree.dynamic(e);if(l===RouteTree.MatchTypes.single)r[a]=s[t];else if(l===RouteTree.MatchTypes.multi){r[a]=s.slice(t).join("/");break}}return r}static dynamic(t){if(t){if(Zt(t,"{","}")||Zt(t,"[","]")){t=t.slice(1,-1);const e=RouteTree.dynamic(t);return e.matchType||=RouteTree.MatchTypes.single,e}if(t.startsWith(":"))return{key:t.slice(1),matchType:RouteTree.MatchTypes.single};if(t.startsWith("*"))return{key:t.slice(1),matchType:RouteTree.MatchTypes.multi};if(t.startsWith("..."))return{key:t.slice(3),matchType:RouteTree.MatchTypes.multi}}return{key:t,matchType:RouteTree.MatchTypes.strict}}static split(t){return t.split("/").filter((t=>t))}}RouteTree.MatchTypes={strict:0,single:1,multi:2};class Timeouts{constructor(){this.inner=new Set}add(t){if(void 0!==t)return t=+t,this.inner.has(t)&&clearTimeout(t),this.inner.add(t),t}remove(t){void 0!==t&&(t=+t,clearTimeout(t),this.inner.delete(t))}removeAll(){this.inner.forEach(clearTimeout),this.inner.clear()}}const Kt=(t,{attribute:e})=>!0===e||void 0===e?String(t).toLowerCase():!1!==e&&"symbol"!=typeof t?e:void 0,Qt=/^[\s\S]*{[\s\S]*}$/;class GodownElement extends yt{static define(t=this.elementTagName,e){this.isDefined()||this.godownConfig.define(t,this,e)}static isDefined(){return!!this.getDefined()}static getDefined(){return this.godownConfig.get(this.elementTagName)}static finalize(){super.finalize(),this.elementAttributes=new Map;for(const[t,e]of this.elementProperties.entries()){const s=Kt(t,e);s&&this.elementAttributes.set(s,t)}}get observedRecord(){const t={};for(const[e,s]of this.constructor.elementAttributes.entries())t[e]=this[s];return t}get _slot(){return this.shadowRoot?this.shadowRoot.querySelector("slot:not([name])"):null}get _slotAll(){return this.shadowRoot?[...this.shadowRoot.querySelectorAll("slot")]:[]}get _slottedAll(){return[...this.querySelectorAll("[slot]")]}get _slottedNames(){return this._slottedAll.map((t=>t.getAttribute("slot"))).filter((t=>t))}getBoundingClientRect(){let t;return this.contents&&(t=this.contentsRoot||this.shadowRoot?.firstElementChild)&&t!==this?t.getBoundingClientRect():super.getBoundingClientRect()}getClientRects(){let t;return this.contents&&(t=this.contentsRoot||this.shadowRoot?.firstElementChild)&&t!==this?t.getClientRects():super.getClientRects()}get stylex(){return this.__stylex.css}set stylex(t){t=t.trim(),Qt.test(t)||(t=`:host{${t}}`),this.shadowRoot?(this.__stylex.index&&this.shadowRoot.adoptedStyleSheets.splice(this.__stylex.index,1),this.__stylex.css=t,this.__stylex.index=this.adoptStyles(t)):this.__stylex.lazy=t}constructor(t){super(),this.events=new Events,this.observers=new Observers,this.timeouts=new Timeouts,this.__stylex={},this.assign={...GodownElement.godownConfig?.assign||{},...t}}connectedCallback(){super.connectedCallback(),this.assign&&(Object.assign(this,this.assign),this.assign=null);const{lazy:t}=this.__stylex;t&&(this.adoptStyles(t),this.__stylex.lazy="")}disconnectedCallback(){this.events.removeAll(),this.observers.removeAll(),this.timeouts.removeAll()}mount(t){this.firstUpdated(t)}unmount(){this.disconnectedCallback()}remount(t){this.unmount(),this.connectedCallback(),this.mount(t)}deepQuerySelector(t){return Xt.call(this,t)}deepQuerySelectorAll(t){return Yt.call(this,t)}adoptStyles(...t){if(!this.shadowRoot||!t.length)return;const e=this.shadowRoot.adoptedStyleSheets,s=new CSSStyleSheet;return t.forEach((t=>s.insertRule(t.toString()))),e.push(s),e.length-1}dispatchCustomEvent(t,e,s){this.dispatchEvent(new CustomEvent(t,{detail:e,composed:!0,...s}))}}GodownElement.godownConfig=new class GodownConfig{constructor(t){this.assign=null,this.prefix="godown",this.suffix="",this.components=new Map,this.registry=customElements,t&&Object.assign(this,t)}tag(t){return l(this.prefix+"-"+t+"-"+this.suffix)}define(t,e,s){this.registry.define(t,e,s),this.components.set(t,e)}get(t){return this.registry.get(t)}getName(t){const{getName:e}=this.registry;return e?e(t):[...this.components.entries()].find((([,e])=>e===t))?.[0]||null}whenDefined(t){return this.registry.whenDefined(t)}upgrade(t){this.registry.upgrade(t)}},t([Tt({type:Boolean,reflect:!0})],GodownElement.prototype,"contents",void 0),t([Tt({reflect:!0})],GodownElement.prototype,"stylex",null);const Jt=f`*,:host{box-sizing:border-box}i{font-style:normal}a{color:currentColor;text-decoration:none}span{white-space:nowrap}svg{-webkit-user-select:none;user-select:none}input{background:none;border:0;color:currentColor;font-size:100%;outline:0;padding:0}dd,dl{margin:0}dialog,ul{margin:0;padding:0}dialog{border:0;outline:0}[popover]{border:0;margin:0;padding:0}@supports not selector(:popover-open){[popover]{display:none}}`;class GlobalStyle extends GodownElement{}const te=((t,e)=>((t,e)=>((t,e)=>{if(!t||!e)return t;let s=0;for(;s<t.length&&e(t.slice(s,s+1));)s+=1;return t.slice(s)})(((t,e)=>{if(!t||!e)return t;let s=t.length;for(;s>0&&e(t.slice(s-1,s));)s-=1;return t.slice(0,s)})(t,e),e))(t,(t=>t===e)))(GlobalStyle.godownConfig.prefix,"-");function ee(t,e=1){return function(t){return v(`--${t}`)}(te+"-".repeat(e)+t)}const ie={background:ee("background",2),foreground:ee("foreground",2),backgroundClip:ee("background-clip",2),primaryBackground:ee("primary",2),primaryForeground:ee("primary-foreground",2),muted:ee("muted",2),active:ee("active",2),passive:ee("passive",2),input:ee("input",2),radius:ee("radius",2),ringWidth:ee("ring-width",2),ringColor:ee("ring-color",2)};GlobalStyle.styles=[Jt,v(((t,e,s)=>{const o=[...bt(e)];return((t,{truecase:e,falsecase:s})=>{const o="@supports";let r="";return e&&(r+=`${o}(${t}){${e}}`),s&&(r+=`${o} not (${t}){${s}}`),r})("color:light-dark(#fff,#000)",{truecase:xt([[t,kt(o.map((([t,[e,s]])=>[t,`light-dark(${e},${s})`])))]]),falsecase:xt([[t,kt(o.map((([t,e])=>[t,e[s]])))]])})})(":host",[[ie.background,["hsl(0 0% 96%)","hsl(0 0% 4%)"]],[ie.foreground,["hsl(0 0% 4%)","hsl(0 0% 96%)"]],[ie.muted,["hsl(0 0% 88%)","hsl(0 0% 18%)"]]],1)),v(xt({":host":kt([[ie.primaryBackground,St(ie.foreground)],[ie.primaryForeground,St(ie.background)],[ie.active,St(ie.primaryBackground)],[ie.passive,St(ie.muted)],[ie.backgroundClip,`linear-gradient(to bottom, ${St(ie.foreground)}, ${St(ie.muted)})`],[ie.ringColor,St(ie.passive)],[ie.ringWidth,".075em"]])})),f`:host([contents]){display:contents}[part=root]{height:100%;width:100%}:host([contents]) [part=root]{height:inherit;width:inherit}:where(:host([contents]) [part=root]){all:inherit;display:revert}`,f`:host{${ie.radius}:0.2em;border-radius:var(${ie.radius});border-style:none;outline-style:none}`];const se=({width:t,color:e,inset:s})=>`outline-style:solid;outline-color:${e};outline-width:${t};${s?`outline-offset:calc(-1 * ${t});`:""}`,oe=({width:t,color:e,inset:s})=>`box-shadow:${s?"inset":""} 0 0 0 ${t} ${e};`,re={outline:(t,e)=>se({width:t,color:e,inset:!1}),"outline-inset":(t,e)=>se({width:t,color:e,inset:!0}),"box-shadow":(t,e)=>oe({width:t,color:e,inset:!1}),shadow:(t,e)=>oe({width:t,color:e,inset:!1}),"box-shadow-inset":(t,e)=>oe({width:t,color:e,inset:!0}),"shadow-inset":(t,e)=>oe({width:t,color:e,inset:!0}),border:(t,e)=>(({width:t,color:e})=>`border-style:solid;border-color:${e};border-width:${t};`)({width:t,color:e})};class RingBuilder{constructor({selector:t=":host",width:e=St(ie.ringWidth),color:s=St(ie.ringColor),type:o}={}){if(o&&o in re){const r=re[o](e,s);this.css=`${t}{${r}}`}else this.css=""}get styleSheet(){return v(this.css).styleSheet}}const ne="ring-type";let ae=class Alert extends GlobalStyle{constructor(){super(),this.ringType="border",new StyleController(this,(()=>new RingBuilder({type:this.ringType}).css))}render(){return at`<div part="root" ${Ht(this.observedRecord)}> <div>${Gt("prefix")}</div> <div part="content"> <strong part="title">${Gt("title",this.title)}</strong> ${Gt("",this.content)} </div> <div>${Gt("suffix")}</div> </div>`}static alert(t,e){const s=new this;return Object.assign(s,e),t.appendChild(s),s}};t([Tt({attribute:ne})],ae.prototype,"ringType",void 0),t([Tt()],ae.prototype,"title",void 0),t([Tt()],ae.prototype,"content",void 0),ae=t([At("alert"),Ct(f`:host{background:var(${ie.background});color:var(${ie.foreground})}:host,:where(:host([contents]) [part=root]){display:block}[part=root]{align-items:center;grid-template-columns:auto 1fr auto;grid-template-rows:auto 1fr;padding:.75em}[part=content],[part=root]{display:grid}`)],ae);var le=ae;le.define();let he=class Avatar extends GlobalStyle{constructor(){super(...arguments),this.name="",this.round=!1}render(){return at`<div part="root" ${Ht(a(this.observedRecord,"src"))}> ${this._renderAvatar()} </div>`}_renderAvatar(){return this.src?at`<img part="image" src="${this.src}" alt="${this.name}" @error=${this._handleError}/>`:this.name?at`<span part="name">${this.formatName()}</span>`:Gt()}formatName(){return this.name}_handleError(){this.src=void 0}};t([Tt()],he.prototype,"src",void 0),t([Tt()],he.prototype,"name",void 0),t([Tt({type:Boolean})],he.prototype,"round",void 0),he=t([At("avatar"),Ct(f`:host{background:var(${ie.passive});color:var(${ie.foreground});height:2em;overflow:hidden;vertical-align:bottom;width:2em}:host,[part=root]{display:inline-flex}:host([contents]) [part=root]{display:inline-flex;height:inherit;width:inherit}:host([round]){border-radius:50%}[part=image]{height:100%;object-fit:cover;width:100%}[part=root]{align-items:center;border-radius:inherit;justify-content:center;position:relative}`)],he);var de=he;de.define();const ce="button",pe=ee(ce);let ue=class Button extends GlobalStyle{constructor(){super(...arguments),this.plain=!1,this.disabled=!1,this.active=!1,this.round=!1}render(){return at`<div part="root" ${Ht(this.observedRecord)}> ${Gt("",this.content)} <span part="modal-root"></span> </div>`}focus(){this.disabled||(this.active=!0,super.focus())}blur(){this.active=!1,super.blur()}connectedCallback(){super.connectedCallback(),this.events.add(this,"click",this._handelClick)}_handelClick(t){if(this.disabled)return t.stopPropagation(),void t.preventDefault();this.plain||this._handleModal(t)}_handleModal(t){const e=document.createElement("i"),{width:s,height:o}=this.getBoundingClientRect(),{x:r,y:a}=this._root.getBoundingClientRect(),l=2*Math.sqrt(o**2+s**2)+"px";e.style.height=l,e.style.width=l,e.style.left=t.x-r+"px",e.style.top=t.y-a+"px",this._modalRoot.appendChild(e),e.animate([{transform:"scale(0) translate(-50%, -50%)",opacity:.1},{transform:"scale(1) translate(-50%, -50%)",offset:.8},{opacity:0}],{duration:800,iterations:1}),e.addEventListener("animationend",(()=>e.remove()),{once:!0})}};t([Tt({type:Boolean,reflect:!0})],ue.prototype,"plain",void 0),t([Tt({type:Boolean,reflect:!0})],ue.prototype,"disabled",void 0),t([Tt({type:Boolean,reflect:!0})],ue.prototype,"active",void 0),t([Tt({type:Boolean,reflect:!0})],ue.prototype,"round",void 0),t([Tt()],ue.prototype,"content",void 0),t([It("modal-root")],ue.prototype,"_modalRoot",void 0),t([It("root")],ue.prototype,"_root",void 0),ue=t([At(ce),Ct(f`:host(:not([disabled]):active){transform:scale(var(${pe}--focus-scale))}:host([round]){border-radius:calc(infinity*1px)}:host([disabled]){cursor:not-allowed;filter:brightness(.85)}:host([plain]){${pe}--gradients:unset;${pe}--focus-scale:unset}`,f`:host{${pe}--modal-animation-duration:1.5s;${pe}--focus-scale:.97;${pe}--deg:45deg;background:var(${ie.primaryBackground});border-style:none;border-width:var(${ie.ringWidth});color:var(${ie.primaryForeground});cursor:pointer;display:block;overflow:hidden;text-align:center;width:-moz-fit-content;width:fit-content}[part=root]:not([contents]){height:100%;width:100%}[part=root]{display:grid;padding:.25em .75em;place-content:center;position:relative;-webkit-user-select:none;user-select:none}i{background:currentColor;border-radius:50%;height:100%;inset:0;opacity:0;pointer-events:none;position:absolute;transform-origin:0 0;visibility:visible;width:100%}`)],ue);var ve=ue;let fe=class Badge extends ve{constructor(){super(...arguments),this.plain=!0,this.round=!0}};fe=t([At("badge"),Ct(f`:host{font-size:.75em}[part=root]{padding:0 .5em}`)],fe);var me=fe;me.define();const ge="breath",ye=ee(ge),$e=/[\s,]+/;let be=class Breath extends GlobalStyle{render(){const t=this.getTexts();return at`<div part="root" ${Ht(this.observedRecord)}> ${[t.map(this._renderText),Ft(this._computeStyle(t.length))]} </div>`}_renderText(t){return at`<span class="rel"> <span class="nocolor">${t}</span> <span class="colorful">${t}</span> </span>`}getTexts(){return Array.isArray(this.content)?this.content:(this.content||this.textContent).split($e).filter((t=>t))}_computeStyle(t){const e=50/t,s=this.duration||1e3*(2*t+2);let o="";for(let e=1;e<=t;e++)o+=`.rel:nth-child(${e}) .colorful{animation-delay:${-s/t*(t-e+1)}ms;background:var(${ye}--${e},var(${ye}--${(e-1)%3+1}));}`;return`.colorful{animation-duration:${s}ms;}@keyframes colorfulN{0%,${3*e}%{opacity:0;}${e}%,${2*e}%{opacity:1;}}${o}`}};t([Tt()],be.prototype,"content",void 0),t([Tt({type:Number})],be.prototype,"duration",void 0),be=t([At(ge),Ct(f`:host{${ye}--deg:60deg;${ye}--1-1:#dd3c3c;${ye}--1-2:#f5993d;${ye}--2-1:#26d944;${ye}--2-2:#29a3a3;${ye}--3-1:#8c30e8;${ye}--3-2:#0d80f2;${ye}--1:linear-gradient(var(${ye}--deg),var(${ye}--1-1),var(${ye}--1-2));${ye}--2:linear-gradient(var(${ye}--deg),var(${ye}--2-1),var(${ye}--2-2));${ye}--3:linear-gradient(var(${ye}--deg),var(${ye}--3-1),var(${ye}--3-2))}`,f`:host{align-items:center;direction:ltr;font-size:2em;margin:auto;width:-moz-fit-content;width:fit-content}:host,:host([contents]) [part=root]{display:flex}[part=root]{display:contents}::selection{background:none}.rel{font-size:inherit;font-weight:800;letter-spacing:-.05em;position:relative}`,f`.colorful,.nocolor{animation-iteration-count:infinite;-webkit-background-clip:text!important;background-clip:text!important;box-sizing:border-box;color:transparent;display:inline-block;padding:0 .05em}.colorful{animation-name:colorfulN;opacity:0}.nocolor{background:var(${ie.backgroundClip});position:absolute;top:0}`)],be);var _e=be;_e.define(),ve.define();const we="card",xe=ee(we);let ke=class Card extends GlobalStyle{constructor(){super(),this.ringType="border",this.footer=!1,this.header=!1,new StyleController(this,(()=>new RingBuilder({type:this.ringType}).css))}render(){return at`<div part="root" ${Ht(this.observedRecord)}> ${[this.header?Gt("header"):"",Gt(),this.footer?Gt("footer"):""]} </div>`}};t([Tt({attribute:ne})],ke.prototype,"ringType",void 0),t([Tt({type:Boolean})],ke.prototype,"footer",void 0),t([Tt({type:Boolean})],ke.prototype,"header",void 0),ke=t([At(we),Ct(f`:host{${xe}--padding:.75em;background:var(${ie.background});color:var(${ie.foreground});display:block;flex-shrink:0}slot{display:block;padding:var(${xe}--padding)}[part=root]{border-radius:inherit}[name=footer]{padding-top:0}[name=header]{padding-bottom:0}`)],ke);var Se=ke;Se.define();const Ce=Wt("0 0 256 256")`<path fill="currentColor" d="M165.66 202.34a8 8 0 0 1-11.32 11.32l-80-80a8 8 0 0 1 0-11.32l80-80a8 8 0 0 1 11.32 11.32L91.31 128Z">`,Ae=Wt("0 0 256 256")`<path fill="currentColor" d="m181.66 133.66l-80 80a8 8 0 0 1-11.32-11.32L164.69 128L90.34 53.66a8 8 0 0 1 11.32-11.32l80 80a8 8 0 0 1 0 11.32">`;function Re(t){return t.getBoundingClientRect().width}let Ee=class Carousel extends GlobalStyle{constructor(){super(...arguments),this.index=0,this.autoChange=0}render(){return at`<div part="root" ${Ht(this.observedRecord)}> <i part="prev" @click="${this.prev}"> ${Ce()} </i> <div part="move-root">${Gt()}</div> <i part="next" @click="${this.next}"> ${Ae()} </i> </div>`}connectedCallback(){super.connectedCallback(),this.children.length&&(this.__cloneFirst?.remove(),this.__cloneLast?.remove(),this.__cloneLast=this.firstElementChild.cloneNode(!0),this.__cloneFirst=this.lastElementChild.cloneNode(!0),this.appendChild(this.__cloneLast),this.insertBefore(this.__cloneFirst,this.firstElementChild)),this.observers.add(this,ResizeObserver,(()=>{this._offset=this._computeOffset(),this._doTranslateX(`${this._offset}px`,!0)}))}async firstUpdated(){await this.updateComplete,this.show(this.index,!0)}attributeChangedCallback(t,e,s){super.attributeChangedCallback(t,e,s),"index"===t&&this.isConnected&&this.show(this.index)}show(t,e){t=this.normalizeIndex(t),this.index=t,this._offset=this._computeOffset(),this._doTranslateX(`${this._offset}px`,e),this.dispatchCustomEvent("change",t),this.timeouts.remove(this.intervalID),this.autoChange>0&&(this.intervalID=this.timeouts.add(setInterval((()=>{this.next()}),this.autoChange)))}next(){this.index===this.childElementCount-3?(this._doTranslateX("0",!0),this.show(0)):this.show(this.index+1)}prev(){0===this.index?(this._doTranslateX(`-${this.childElementCount-1}00%`,!0),this.show(this.children.length-3)):this.show(this.index-1)}_doTranslateX(t,e){this._moveRoot.style.transform=`translateX(${t})`,this._moveRoot.style.transition=e?"none":""}_computeOffset(){let t=0;for(let e=0;e<=this.index;e++)t-=Re(this.children[e]);return t+=(Re(this)-Re(this.children[this.index+1]))/2,t}normalizeIndex(t){return t<0?0:t>this.children.length-3?this.children.length-3:t}};t([Tt({type:Number})],Ee.prototype,"index",void 0),t([Tt({type:Number})],Ee.prototype,"autoChange",void 0),t([It("move-root")],Ee.prototype,"_moveRoot",void 0),Ee=t([At("carousel"),Ct(f`:host{display:block;transition:.3s}[part=root]{direction:ltr;overflow:hidden}[part=move-root],[part=root]{display:flex;height:100%;position:relative;transition:inherit;width:100%}[part=next],[part=prev]{align-items:center;display:flex;height:100%;justify-content:center;position:absolute;-webkit-user-select:none;user-select:none;width:1.5em;z-index:1}[part=prev]{left:0}[part=next]{right:0}slot::slotted(*){flex-shrink:0!important}`)],Ee);var Te=Ee;Te.define();const Me="chip",Ne=ee(Me);let Pe=class Chip extends GlobalStyle{constructor(){super(...arguments),this.position="top-right",this.value=0,this.dot=!1,this.max=99}formatValue(t){return t>this.max?this.max+"+":t+""}render(){return at`<div part="root" ${Ht(this.observedRecord)}> ${Gt()} ${this.value||this.dot?at`<div part="chip">${this.dot?"":this.formatValue(this.value)}</div>`:""} </div>`}};t([Tt()],Pe.prototype,"position",void 0),t([Tt({type:Number})],Pe.prototype,"value",void 0),t([Tt({type:Boolean})],Pe.prototype,"dot",void 0),t([Tt({type:Number})],Pe.prototype,"max",void 0),Pe=t([At(Me),Ct(f`:host{${Ne}--offset:0%;${Ne}--offset-x:var(${Ne}--offset);${Ne}--offset-y:var(${Ne}--offset)}:host,:host([contents]) [part=root]{display:inline-block}[part=root]{position:relative}[part=chip]{background:var(${ie.primaryBackground});border-radius:calc(infinity*1px);color:var(${ie.primaryForeground});font-size:75%;padding:0 .5em;position:absolute;transform:translate(-50%,-50%);-webkit-user-select:none;user-select:none}[part=chip]:empty{border-radius:50%;font-size:100%;height:.5em;padding:0;width:.5em}[position^=top] [part=chip]{top:calc(var(${Ne}--offset-y))}[position$=right] [part=chip]{left:calc(100% - var(${Ne}--offset-x))}[position^=bottom] [part=chip]{top:calc(100% - var(${Ne}--offset-y))}[position$=left] [part=chip]{left:calc(var(${Ne}--offset-x))}`)],Pe);var Oe=Pe;Oe.define();const Be=Wt("0 0 256 256")`<path fill="currentColor" d="m213.66 101.66l-80 80a8 8 0 0 1-11.32 0l-80-80a8 8 0 0 1 11.32-11.32L128 164.69l74.34-74.35a8 8 0 0 1 11.32 11.32">`,Ie="details",ze=ee(Ie);let De=class Details extends GlobalStyle{constructor(){super(...arguments),this.open=!1,this.float=!1,this.fill=!1,this.summary=""}render(){return at`<dl part="root" ${Ht(this.observedRecord)}> <dt part="title" @click="${()=>this.toggle()}"> <span part="summary">${Gt("summary",this.summary)}</span> <span part="icon">${Gt("icon",Be())}</span> </dt> <dd part="details" @click=${this.fill?()=>this.toggle():null}> <div style="min-height: 0;">${Gt()}</div> </dd> </dl>`}updated(t){const e=t.get("open");void 0!==e&&this.dispatchCustomEvent("change",e)}toggle(t){this.open=t??!this.open}close(){this.open=!1}show(){this.open=!0}};t([Tt({type:Boolean,reflect:!0})],De.prototype,"open",void 0),t([Tt({type:Boolean})],De.prototype,"float",void 0),t([Tt({type:Boolean})],De.prototype,"fill",void 0),t([Tt()],De.prototype,"summary",void 0),De=t([At(Ie),Ct(f`:host{${ze}--icon-deg-open:0deg;${ze}--icon-deg-close:90deg;display:block;transition:.3s}[part=root]{position:relative}[part=title]{align-items:center;direction:ltr;grid-template-columns:auto auto;height:100%;justify-content:space-between}[part=details],[part=title]{display:grid;overflow:hidden;transition:inherit}[part=details]{grid-template-rows:0fr}:host([open]) [part=details]{grid-template-rows:1fr}[float] [part=details]{position:absolute;top:100%;width:100%}[part]{transition:inherit;transition-property:transform,grid-template-rows}[part=icon]{-webkit-backface-visibility:hidden;backface-visibility:hidden;display:flex;transform:rotate(var(${ze}--icon-deg-close))}:host([open]) [part=icon]{transform:rotate(var(${ze}--icon-deg-open))}`)],De);var Ue=De;Ue.define();const je="dialog",Ve=ee(je);let He=class Dialog extends GlobalStyle{constructor(){super(...arguments),this.open=!1,this.modal=!1,this.__modalInvoke=!1}render(){return at`<div part="root" @click=${this.show}> ${Gt("trigger")} </div> <dialog part="dialog" role="dialog"> ${Gt("dialog")}${Gt()} </dialog>`}showModal(){this.modal=!0,this.__modalInvoke=!0,this.show()}show(){this.open=!0}close(){this.open=!1}toggle(t){this.open=t??!this.open}updated(t){t.has("open")&&(this.open?(this.modal?this._dialog.showModal():this._dialog.show(),this.__submitEvent=this.events.add(this,"submit",this._handelSubmit),this.__keydownEvent=this.events.add(document,"keydown",this._handleKeydown.bind(this))):(this.__modalInvoke&&(this.modal=!1,this.__modalInvoke=!1),this._dialog.close(),this.events.remove(this,"submit",this.__submitEvent),this.events.remove(document,"keydown",this.__keydownEvent)))}_handleKeydown(t){"Escape"===t.key&&(t.preventDefault(),this.close())}_handelSubmit(t){"dialog"===t.target.method&&(t.preventDefault(),this.close())}};t([Tt({type:Boolean,reflect:!0})],He.prototype,"open",void 0),t([Tt({type:Boolean,reflect:!0})],He.prototype,"modal",void 0),t([It("dialog")],He.prototype,"_dialog",void 0),He=t([At(je),Ct(f`:host{${Ve}--background-modal:#000;${Ve}--opacity-modal:0.2;background:none;display:block;width:-moz-fit-content;width:fit-content}dialog{background:none;left:50%;position:relative;position:fixed;top:50%;transform:translate(-50%,-50%);z-index:1}::backdrop{background:var(${Ve}--background-modal);opacity:var(${Ve}--opacity-modal)}`)],He);var Le=He;Le.define();let Ge=class Divider extends GlobalStyle{constructor(){super(...arguments),this.vertical=!1}render(){return at`<div part="root"></div>`}};t([Tt({type:Boolean,reflect:!0})],Ge.prototype,"vertical",void 0),Ge=t([At("divider"),Ct(f`:host{background:currentColor;color:var(${ie.passive});display:block;height:.05em;width:100%}:host([vertical]){height:100%;width:.05em}`)],Ge);var Fe=Ge;Fe.define();let We=class Dragbox extends GlobalStyle{constructor(){super(...arguments),this.__drag=!1}get _offsetParent(){return this.offsetParent??document.body}render(){return at`<div part="root" ${Ht(this.observedRecord)} @mousedown="${this._handleDragStart}"> ${Gt()} </div>`}firstUpdated(){this.reset()}_handleDragStart(t){this.__x=t.x,this.__y=t.y;const e=this._offsetParent.getBoundingClientRect(),s=this.getBoundingClientRect();this.__t=s.top-e.top,this.__l=s.left-e.left,this.__drag=!0,this.__handleMouseMove=this.events.add(document,"mousemove",this._handleDrag.bind(this)),this.__handleMouseLeave=this.events.add(document,"mouseleave",this._handleDragEnd.bind(this)),this.__handleMouseUp=this.events.add(document,"mouseup",this._handleDragEnd.bind(this))}_handleDragEnd(){this.__drag=!1,this.events.remove(document,"mousemove",this.__handleMouseMove),this.events.remove(document,"mouseleave",this.__handleMouseLeave),this.events.remove(document,"mouseup",this.__handleMouseUp)}_handleDrag(t){if(!this.__drag)return;const{__x:e,__y:s,__l:o,__t:r,style:a}=this,{height:l,width:h}=this._offsetParent.getBoundingClientRect(),{width:d,height:c}=this.getBoundingClientRect(),p=t.x-(e-o),u=t.y-(s-r);a.left=p<0?"0":p<h-d?`${p}px`:h-d+"px",a.top=u<0?"0":u<l-c?`${u}px`:l-c+"px"}reset(){const{x:t,y:e,style:s,offsetWidth:o,offsetHeight:r,offsetLeft:a,offsetTop:l}=this,{height:h,width:d}=this._offsetParent.getBoundingClientRect();s.left=t||"0",s.top=e||"0",a>d-o&&(s.left=d-o+"px"),l>h-r&&(s.top=h-r+"px")}};t([Tt()],We.prototype,"x",void 0),t([Tt()],We.prototype,"y",void 0),We=t([At("dragbox"),Ct(f`:host{display:block;position:absolute}:host(:active){-webkit-user-select:none;user-select:none}`)],We);var qe=We;qe.define();let Ye=class Flex extends GlobalStyle{constructor(){super(...arguments),this.vertical=!1}render(){return at`<div part="root" ${Ht(this.observedRecord)}> ${[Gt(),Ft(xt({":host":{gap:this.gap,"flex-flow":this.flexFlow,"flex-direction":this.vertical&&"column","align-items":this.items,"justify-content":this.content}}))]} </div>`}};t([Tt({attribute:"flex-flow"})],Ye.prototype,"flexFlow",void 0),t([Tt()],Ye.prototype,"gap",void 0),t([Tt()],Ye.prototype,"content",void 0),t([Tt()],Ye.prototype,"items",void 0),t([Tt({type:Boolean})],Ye.prototype,"vertical",void 0),Ye=t([At("flex"),Ct(f`:host,:host([contents]) [part=root]{display:flex}[part=root]{display:contents}`)],Ye);var Xe,Ze=Ye;Ze.define();let Ke=Xe=class Form extends GlobalStyle{constructor(){super(...arguments),this.name="",this.nameValue=this.namevalue}get value(){return Xe.buildValue(this._slot.assignedElements())}render(){return Gt()}reset(){this.deepQuerySelectorAll("*").forEach((t=>{t.tagName!==this.tagName&&t.reset&&t.reset()}))}namevalue(){return[this.name,this.value]}static buildValue(t){const e={};for(const s of t)if("FORM"===s.tagName)Object.assign(e,Object.fromEntries(new FormData(s).entries()));else if(s.namevalue){const[t,o]=s.namevalue();t&&(e[t]=o)}else if(s.name&&void 0!==s.value)e[s.name]=s.value;else if(s.shadowRoot)for(const t of s.shadowRoot.querySelectorAll("slot"))Object.assign(e,this.buildValue(t.assignedElements()));return e}};t([Tt()],Ke.prototype,"name",void 0),Ke=Xe=t([At("form"),Ct(f`:host{display:block}`)],Ke);var Qe=Ke;Qe.define();const Je=t=>{return e=t,Number.isNaN(+e)?t:`repeat(${t},1fr)`;var e};let ti=class Grid extends GlobalStyle{render(){return at`<div part="root" ${Ht(this.observedRecord)}> ${[Gt(),Ft(xt({":host":{gap:this.gap,"grid-template-columns":Je(this.columns),"grid-template-rows":Je(this.rows),"place-content":this.content,"place-items":this.items}}))]} </div>`}};t([Tt()],ti.prototype,"gap",void 0),t([Tt()],ti.prototype,"columns",void 0),t([Tt()],ti.prototype,"rows",void 0),t([Tt()],ti.prototype,"content",void 0),t([Tt()],ti.prototype,"items",void 0),ti=t([At("grid"),Ct(f`:host,:host([contents]) [part=root]{display:grid}[part=root]{display:contents}`)],ti);var ei,ii=ti;ii.define();let si=ei=class Router extends GlobalStyle{constructor(){super(...arguments),this.__fieldRouteTree=new RouteTree,this.__slottedRouteTree=new RouteTree,this.__cacheRecord=new Map,this.component=null,this.pathname=location.pathname,this.default=Gt(),this.type="united",this.cache=!1,this.handlePopstate=this.events.add(window,"popstate",(()=>{this.pathname=location.pathname}))}get params(){return this.path?RouteTree.parseParams(this.pathname,this.path):{}}set routes(t){this.__routes=t,this.collectFieldRoutes(t)}get routes(){return this.__routes}clear(){this.__cacheRecord.clear()}render(){let t;if(this.cache&&(t=this.__cacheRecord.get(this.pathname))&&(this.component=t.component,this.path=t.path,this.pathname=t.pathname),!t)switch(this.type){case"field":this.component=this.fieldComponent();break;case"slotted":this.component=this.slottedComponent();break;default:this.component=this.fieldComponent()??this.slottedComponent()}return this.component??this.default}connectedCallback(){super.connectedCallback(),ei.routerInstances.add(this),"field"!==this.type&&(this.observers.add(this,MutationObserver,this.collectSlottedRoutes,{attributes:!0,attributeFilter:["slot"],subtree:!0}),this.collectSlottedRoutes())}disconnectedCallback(){super.disconnectedCallback(),ei.routerInstances.delete(this)}useRouter(){return{pathname:this.pathname,params:this.params,path:this.path,component:this.component}}updated(t){if(t.has("pathname")||t.has("path")){const t=this.useRouter();!this.__cacheRecord.has(this.pathname)&&this.path&&this.__cacheRecord.set(this.pathname,t),this.dispatchCustomEvent("change",t)}}fieldComponent(t){if(t||=this.__fieldRouteTree.search(this.pathname)?.pattern,this.path=t,!t)return null;const e=this.routes.find((e=>e.path===t));return e?"render"in e?e.render?.(a(this.useRouter(),"component"))||null:e.component:null}slottedComponent(t){const e=this._slottedNames;return t||=this.__slottedRouteTree.search(this.pathname)?.pattern,this.path=t,t?(this.path=e.find((e=>e===t)),this.path?Gt(this.path):null):null}collectSlottedRoutes(){this.__slottedRouteTree=new RouteTree,this.clear(),this._slottedNames.forEach((t=>{this.__slottedRouteTree.insert(t)}))}collectFieldRoutes(t){this.__fieldRouteTree=new RouteTree,this.clear(),t.forEach((({path:t})=>{this.__fieldRouteTree.insert(t)}))}static updateAll(){this.routerInstances.forEach((t=>{t.handlePopstate()}))}search(t){return this.__fieldRouteTree.search(t)||this.__slottedRouteTree.search(t)}};si.routerInstances=new Set,t([Mt()],si.prototype,"component",void 0),t([Mt()],si.prototype,"path",void 0),t([Tt()],si.prototype,"pathname",void 0),t([Mt()],si.prototype,"default",void 0),t([Tt()],si.prototype,"type",void 0),t([Tt({type:Boolean})],si.prototype,"cache",void 0),t([Mt()],si.prototype,"routes",null),si=ei=t([At("router"),Ct(f`:host{display:contents}`)],si);var oi=si;const ri="auto";let ni=class Link extends GlobalStyle{constructor(){super(...arguments),this.type=ri,this.suppress=!1,this.replace=!1,this.target="_self",this.state={},this.handleState=()=>{switch(this.type){case ri:case"push":if(!this.replace){history.pushState(this.state,"",this.href);break}case"replace":history.replaceState(this.state,"",this.href)}}}get pathname(){return new URL(this.href,location.href).pathname}_handleClick(t){const{state:e,type:s,href:o,pathname:r,suppress:a}=this;if(!o)return;if(this.dispatchCustomEvent("navigate",{...this.observedRecord,pathname:r,state:e}),o.startsWith("#")||"normal"===s)return;this.handleState();const l=[...oi.routerInstances];a||s===ri&&!l.some((t=>t.search(location.pathname)))||(t.preventDefault(),oi.routerInstances.forEach((t=>{t.handlePopstate()})))}render(){return at`<a part="root" ${Ht(this.observedRecord)} href="${this.href||dt}" target="${this.target}" @click=${this._handleClick}> ${Gt()} </a>`}};t([Tt()],ni.prototype,"type",void 0),t([Tt({type:Boolean})],ni.prototype,"suppress",void 0),t([Tt({type:Boolean})],ni.prototype,"replace",void 0),t([Tt()],ni.prototype,"href",void 0),t([Tt()],ni.prototype,"target",void 0),ni=t([At("link"),Ct(f`:host{cursor:default;display:inline-block}:host([href]){cursor:pointer}a{display:contents}`)],ni);var ai=ni;let li=class Heading extends ai{constructor(){super(...arguments),this.as="h1",this.anchor="#",this.side="left"}render(){const t=this.href||(this.id?"#"+this.id:void 0);return at`<a part="root" href="${t||dt}"> ${this.wrapHeading(Gt(),t?at`<i part="${jt("anchor",this.side)}">${this.anchor}</i>`:"")} </a>`}wrapHeading(...t){switch(this.as){case"h2":return at`<h2>${t}</h2>`;case"h3":return at`<h3>${t}</h3>`;case"h4":return at`<h4>${t}</h4>`;case"h5":return at`<h5>${t}</h5>`;case"h6":return at`<h6>${t}</h6>`;default:return at`<h1>${t}</h1>`}}};t([Tt()],li.prototype,"as",void 0),t([Tt()],li.prototype,"anchor",void 0),t([Tt()],li.prototype,"side",void 0),li=t([At("heading"),Ct(f`:host{display:block;text-align:start}[part~=anchor]{min-width:1.25em;position:absolute;right:100%;text-align:center}[part~=left][part~=anchor]{right:100%}[part~=right][part~=anchor]{left:100%}h1,h2,h3,h4,h5,h6{position:relative;width:-moz-fit-content;width:fit-content}`)],li);var hi=li;hi.define();const di=Wt("0 0 256 256")`<path fill="currentColor" d="M53.92 34.62a8 8 0 1 0-11.84 10.76l19.24 21.17C25 88.84 9.38 123.2 8.69 124.76a8 8 0 0 0 0 6.5c.35.79 8.82 19.57 27.65 38.4C61.43 194.74 93.12 208 128 208a127.1 127.1 0 0 0 52.07-10.83l22 24.21a8 8 0 1 0 11.84-10.76Zm47.33 75.84l41.67 45.85a32 32 0 0 1-41.67-45.85M128 192c-30.78 0-57.67-11.19-79.93-33.25A133.2 133.2 0 0 1 25 128c4.69-8.79 19.66-33.39 47.35-49.38l18 19.75a48 48 0 0 0 63.66 70l14.73 16.2A112 112 0 0 1 128 192m6-95.43a8 8 0 0 1 3-15.72a48.16 48.16 0 0 1 38.77 42.64a8 8 0 0 1-7.22 8.71a6 6 0 0 1-.75 0a8 8 0 0 1-8-7.26A32.09 32.09 0 0 0 134 96.57m113.28 34.69c-.42.94-10.55 23.37-33.36 43.8a8 8 0 1 1-10.67-11.92a132.8 132.8 0 0 0 27.8-35.14a133.2 133.2 0 0 0-23.12-30.77C185.67 75.19 158.78 64 128 64a118.4 118.4 0 0 0-19.36 1.57A8 8 0 1 1 106 49.79A134 134 0 0 1 128 48c34.88 0 66.57 13.26 91.66 38.35c18.83 18.83 27.3 37.62 27.65 38.41a8 8 0 0 1 0 6.5Z">`,ci=f`:host([disabled]){cursor:not-allowed;filter:brightness(.85)}input:disabled{cursor:inherit}input::-ms-clear,input::-ms-reveal{display:none}`;let pi=class SuperInput extends GlobalStyle{constructor(){super(...arguments),this.autofocus=!1,this.ringType="border",this.disabled=!1,this.compositing=!1,this.makeId=Math.random().toString(36).slice(1),this.nameValue=this.namevalue}get observedRecord(){return a(super.observedRecord,"default","value")}set defaultValue(t){this.default=t}get defaultValue(){return this.default}namevalue(){return[this.name,this.value]}reset(){this.value=this.default,this._input.value=this.default}_handleInput(t){t.stopPropagation(),this.compositing||(this.value=t.target.value?.trim(),this.dispatchCustomEvent("input",this.value,{bubbles:!0}))}_handleChange(t){this.dispatchCustomEvent("change",this.value)}connectedCallback(){super.connectedCallback(),this._connectedInit()}_connectedInit(){this.default??=this.value||"",this.value??=this.default}_compositionInit(){this._input&&(this.events.add(this._input,"compositionstart",(()=>this.compositing=!0)),this.events.add(this._input,"compositionend",(t=>{this.compositing=!1,this._handleInput(t)})))}focus(t){this._input?.focus(t)}firstUpdated(){this._compositionInit()}_renderPrefix(){return at`<i part="prefix">${Gt("prefix")}</i>`}_renderSuffix(){return at`<i part="suffix">${Gt("suffix")}</i>`}};t([Tt()],pi.prototype,"autocomplete",void 0),t([Tt({attribute:ne})],pi.prototype,"ringType",void 0),t([Tt({type:Boolean,reflect:!0})],pi.prototype,"disabled",void 0),t([Tt({reflect:!0})],pi.prototype,"placeholder",void 0),t([Tt({reflect:!0})],pi.prototype,"name",void 0),t([Tt()],pi.prototype,"value",void 0),t([Tt()],pi.prototype,"default",void 0),t([It("input")],pi.prototype,"_input",void 0),pi=t([Ct(ci)],pi);let ui=class Input extends pi{constructor(){super(),this.type="text",this.variant="default",new StyleController(this,(()=>new RingBuilder({type:this.ringType}).css+("outline"===this.variant?`:host{${ie.ringColor}:currentColor}`:"")))}render(){return at`<label part="root" ${Ht(this.observedRecord)}> ${[this._renderPrefix(),at`<input part="input" type="${this.type}" .value="${this.value}" ?autofocus="${this.autofocus}" ?disabled="${this.disabled}" autocapitalize="${this.autocapitalize||dt}" autocomplete="${this.autocomplete||dt}" placeholder="${this.placeholder||dt}" @input="${this._handleInput}" @change="${this._handleChange}"/>`,this._renderSuffix()]} </label>`}_renderSuffix(){const t="password";return this.type===t?at`<i part="suffix" @mousedown="${()=>this._changeInputType("text")}" @mouseup="${()=>this._changeInputType(t)}" @mouseleave="${()=>this._changeInputType(t)}"> ${Gt("suffix",di())} </i>`:super._renderSuffix()}_changeInputType(t){this._input&&(this._input.type=t)}};t([Tt({reflect:!0})],ui.prototype,"type",void 0),t([Tt()],ui.prototype,"variant",void 0),t([It("input")],ui.prototype,"_input",void 0),ui=t([At("input"),Ct(f`:host{display:block;${ie.input}-space:0.2em;${ie.input}-icon-color:grey}:host(:active),:host(:focus-within){${ie.ringColor}:currentColor;${ie.input}-icon-color:currentColor}[part=root]{align-items:center;border-radius:inherit;display:flex;padding:.4em .5em;position:relative}[part=input]{flex-grow:1;height:100%;width:100%}[part=prefix],[part=suffix]{align-items:center;color:var(${ie.input}-icon-color);display:flex;height:100%;justify-content:center}[part=suffix] slot svg{margin-inline-start:var(${ie.input}-space)}[part=prefix] slot svg{margin-inline-end:var(${ie.input}-space)}`)],ui);var vi=ui;vi.define();let fi=class Layout extends GlobalStyle{constructor(){super(...arguments),this.sticky=!1}render(){return at`<div part="root" ${Ht(this.observedRecord)}> <header part="header">${Gt("header")}</header> <main part="main">${Gt()}</main> <footer part="footer">${Gt("footer")}</footer> </div>`}};t([Tt({type:Boolean})],fi.prototype,"sticky",void 0),fi=t([At("layout"),Ct(f`:host{flex-direction:column;grid-template-rows:auto 1fr auto;height:100%;min-height:100%;width:100%}:host,:host([contents]) [part=root]{display:flex}[part=root]{display:contents}[part=main]{flex:1;width:100%}[part=footer],[part=header]{flex-shrink:0;width:100%}[sticky] header{position:sticky;top:0}`)],fi);var mi=fi;function gi(t){let e,s=function(...o){return e=t.apply(this,o),s=()=>e,e};return s}mi.define(),ai.define();const yi="popover",$i=()=>Object.hasOwn(HTMLElement.prototype,yi),bi=t=>t.getAttribute(yi),_i=t=>{t.style.display="none"},wi=gi((t=>$i()?(t=>{null!==bi(t)?t.hidePopover():_i(t)})(t):_i(t)));function xi(t){if(t.style.display="block",this&&"manual"!==bi(t)){const e="click",s=o=>{this.contains(o.target)||(t.dispatchEvent(new Event("toggle",{bubbles:!0,composed:!0,newState:"closed"})),wi(t),document.removeEventListener(e,s))};document.addEventListener(e,s)}}function ki(t){null!==bi(t)?t.showPopover():xi.call(this,t)}const Si=gi((function(t){return $i()?ki.call(this,t):xi.call(this,t)})),Ci="popover",Ai=Ci;let Ri=class Popover extends GlobalStyle{constructor(){super(),this.anchorName=`--${Ci}-${Math.random().toString(36).slice(2)}`,this.open=!1,this.action="show",this.span="span",this.position="bottom",new StyleController(this,(()=>xt({"[part=root],slot:not([name])::slotted(*)":{"anchor-name":this.anchorName},"[part=popover]":{"position-anchor":this.anchorName,"position-area":this.resolveArea()}})))}render(){return at`<div part="root"> <div part="trigger" @click=${this._handleClick}> ${Gt()} </div> <div part="popover" popover="manual"> ${Gt("popover")} </div> </div>`}_handleClick(){const{action:t}=this;switch(t){case"show":case"hide":case"toggle":this[t]()}}show(){this.toggle(!0)}hide(){this.toggle(!1)}toggle(t){this.open=t??!this.open}updated(t){t.has("open")&&this._openChange()}_openChange(){const{open:t}=this;if(t){Si.call(this,this._popover);const t=e=>{this.contains(e.target)||(this.events.remove(document,"click",t),this.open=!1)};this.events.add(document,"click",t)}else wi(this._popover);this.dispatchCustomEvent("toggle",t)}resolveArea(){const t=this.position.split("-"),e="spread"===this.span?`span-${t[0]}`:t[0];return t.length<2?`${e} center`:`${e} ${"isolated"===this.span?t[1]:`span-${t[1]}`}`}};t([Tt({type:Boolean,reflect:!0})],Ri.prototype,"open",void 0),t([Tt()],Ri.prototype,"action",void 0),t([Tt()],Ri.prototype,"span",void 0),t([Tt()],Ri.prototype,"position",void 0),t([It(Ci)],Ri.prototype,"_popover",void 0),Ri=t([At(Ai),Ct(f`:host{display:inline-block}[part=trigger]{display:contents}[part=root]{display:inherit}[part=popover]{inset:unset;overflow:visible;position:absolute;z-index:1;position-try-fallbacks:flip-block}`)],Ri),Ri.define();var Ei=Ri;let Ti=class Progress extends GlobalStyle{constructor(){super(...arguments),this.max=1,this.min=0}render(){let t,s=20;if(!e(this.value)){const e=new Ranger(this.min,this.max);s=(+this.value-this.min)/e.diff*100,t="static"}return at`<div part="root" ${Ht(this.observedRecord)} class="${t}"> <i part="value" style="width:${s}%;"></i> </div>`}};t([Tt({type:Number})],Ti.prototype,"max",void 0),t([Tt({type:Number})],Ti.prototype,"min",void 0),t([Tt({type:Number})],Ti.prototype,"value",void 0),Ti=t([At("progress"),Ct(f`:host{background:var(${ie.passive});border-radius:.25em;color:var(${ie.active});height:.5em;width:100%}:host,[part=root]{display:block}[part=root]{border-radius:inherit;overflow:hidden;position:relative;z-index:1}[part=value]{animation:progress 1.8s ease-in-out infinite alternate;background:currentColor;border-radius:inherit;height:100%;left:0;position:absolute;top:0;transition:all .3s;z-index:2}@keyframes progress{0%{left:0}to{left:80%}}.static [part=value]{animation:none}`)],Ti);var Mi=Ti;Mi.define();const Ni="range",Pi=ee(Ni);let Oi=class Range extends pi{constructor(){super(...arguments),this.min=0,this.max=100,this.vertical=!1,this.__focusStack=[]}get range(){return Array.isArray(this.value)}get rangeValue(){return this.range?this.value:[this.value]}padValue(t,e=0){const{rangeValue:s}=this,o=t-s.length;return o>0?new Array(o).fill(e).concat(s):s}attributeChangedCallback(t,e,s){super.attributeChangedCallback(t,e,s),"max"!==t&&"min"!==t&&"step"!==t||(this._ranger=new Ranger(this.min,this.max,this.step))}get observedRecord(){return a(super.observedRecord,ne)}render(){const t=this.padValue(2),e=Math.min(...t),s=Math.max(...t),o=this._ranger.diff;return at`<div part="root" ${Ht(this.observedRecord)} @mousedown="${this.disabled?null:this._handleMousedownRoot}" style="${kt([["--from",(e-this.min)/o*100+"%"],["--to",(s-this.min)/o*100+"%"],...t.map(((t,e)=>[`--handle-${e}`,(t-this.min)/o*100+"%"]))])}"> <div part="track"></div> ${qt(this.rangeValue.length,(t=>this._renderHandle(t)))} </div>`}_renderHandle(t){const{disabled:e,range:s,rangeValue:o}=this,r=!s||s&&t===o.length-1&&1===o.length;return at`<i tabindex="0" part="${jt("handle",`handle-${t}`)}" @mousedown="${e?null:this.createMouseDown(t)}" style="${kt({"z-index":this.__focusStack.indexOf(t)+1,"--handle":`var(--${r?"to":`handle-${t}`})`})}"></i>`}focusHandle(t){this.lastFocus=t;const e=this.__focusStack.indexOf(t);-1!==e&&this.__focusStack.splice(e,1),this.__focusStack.push(t);const s=this._handles.item(t);s?.focus(),this.__keydownEvent||(this.__keydownEvent=this.events.add(document,"keydown",this.createKeydownEvent(t)))}blurHandle(){this.lastFocus=void 0,this.__keydownEvent=this.events.remove(document,"keydown",this.__keydownEvent)}createKeydownEvent(t){return e=>{const{rangeValue:s,step:o}=this;s.length<2&&(t=0);const r=s[t];"ArrowLeft"===e.key||"ArrowDown"===e.key?(e.preventDefault(),this.createSetValue(t)(r-o)):"ArrowRight"!==e.key&&"ArrowUp"!==e.key||(e.preventDefault(),this.createSetValue(t)(r+o))}}createMouseDown(t){return e=>{this.focusHandle(t),this.createMousedownListener(this.createSetValue(t))(e)}}createSetValue(t){return e=>{const s=this._ranger.normalize(e);let o=s;this.range&&(o=[...this.value],o[t]=s),this.value=o,this.dispatchCustomEvent("change",this.value)}}_computeValue({clientX:t,clientY:e}){const{top:s,left:o,height:r,width:a}=this._root.getBoundingClientRect();return this._ranger.present(this.vertical?(e-s)/r:(t-o)/a)}_handleMousedownRoot(t){const e=this._computeValue(t),s=this.range?this.rangeValue.reduce(((t,s,o)=>Math.abs(e-s)<Math.abs(e-this.rangeValue[t])?o:t),0):0,o=this.createSetValue(s);o(e),this.createMousedownListener(o)(t),this.focusHandle(s)}createMousedownListener(t){return e=>{e.preventDefault(),e.stopPropagation();const s=this.createMousemoveListener(t);this.events.add(document,"mousemove",s);const o=()=>{this.events.remove(document,"mousemove",s),this.events.remove(document,"mouseup",o)};this.events.add(document,"mouseup",o)}}createMousemoveListener(t){return e=>{const s=this._computeValue(e);s===this._ranger.restrict(s)&&t?.call(this,s)}}_connectedInit(){this._ranger=new Ranger(this.min,this.max,this.step);const t=this._ranger.diff;this.step||=t/100,e(this.value)&&(e(this.default)?this.value=Math.round(t/2/this.step)*this.step:this.value=this.default),this.default??=this.value}reset(){this.value=this.default}sort(){return this.value=this.toSorted()}toSorted(){return this.range?[...this.value].sort(((t,e)=>t-e)):this.value}};t([Tt({type:Number})],Oi.prototype,"min",void 0),t([Tt({type:Number})],Oi.prototype,"max",void 0),t([Tt({type:Number})],Oi.prototype,"step",void 0),t([Tt({type:Boolean,reflect:!0})],Oi.prototype,"vertical",void 0),t([Tt({type:Array})],Oi.prototype,"value",void 0),t([Tt({type:Array})],Oi.prototype,"default",void 0),t([It("root")],Oi.prototype,"_root",void 0),t([Bt("[part=handle]")],Oi.prototype,"_handles",void 0),t([Mt()],Oi.prototype,"lastFocus",void 0),Oi=t([At(Ni),Ct(f`:host{${Pi}--track-width:.5em;${Pi}--handle-scale:1;${Pi}--track-background:var(${ie.active});background:var(${ie.passive});display:block;height:var(${Pi}--track-width);width:100%}:host([contents]) [part=root]{width:inherit}:host([vertical]){height:100%;width:-moz-fit-content;width:fit-content}[part=root]{position:relative;--from:0%;--to:50%}[part=root],[part=track]{border-radius:inherit;min-height:inherit}[part=track]{background:var(${Pi}--track-background);height:100%;justify-content:space-between;left:min(var(--from),var(--to));pointer-events:none;width:max(calc(var(--to) - var(--from)),calc(var(--from) - var(--to)))}[part=track],[part~=handle]{display:flex;position:absolute}[part~=handle]{align-items:center;background:var(${ie.background});border:.1em solid;border-radius:50%;height:1em;justify-content:center;outline:0;transform:scale(var(${Pi}--handle-scale)) translate(-50%,-25%);transform-origin:0 25%;-webkit-user-select:none;user-select:none;width:1em}`,f`[vertical]{height:inherit;width:var(${Pi}--track-width)}[vertical] i{transform:translate(-25%,-50%)}[vertical] [part=track]{height:max(calc(var(--to) - var(--from)),calc(var(--from) - var(--to)));left:0;top:min(var(--from),var(--to));width:100%}`,f`[part~=handle]{left:var(--handle);top:0}[vertical] [part~=handle]{left:0;top:var(--handle)}`)],Oi);var Bi=Oi;Bi.define();const Ii="rotate",zi=ee(Ii);let Di=class Rotate extends GlobalStyle{render(){return at`<div part="root"> <div part="slot" @mousemove="${this._handleRotate}"> ${Gt()} </div> <i @mouseleave="${this.reset}"></i> </div>`}reset(){this._root.style.removeProperty("transform"),this._root.style.removeProperty("transition")}_handleRotate(t){const{rotateX:e,rotateY:s}=this._computeOffset(t);this._root.style.setProperty("transform",`rotateX(${e}rad) rotateY(${s}rad)`),this._root.style.setProperty("transition","0s")}_computeOffset(t){const{left:e,top:s,width:o,height:r}=this._root.getBoundingClientRect(),{clientX:a,clientY:l}=t;return{rotateX:-(l-s-r/2)/r/2,rotateY:(a-e-o/2)/o/2}}};t([It("root")],Di.prototype,"_root",void 0),Di=t([At(Ii),Ct(f`:host{display:block;transition:all .5s ease-in-out;width:-moz-fit-content;width:fit-content;${zi}--offset:.5em}div{position:relative;transition:inherit;transition-property:transform}i{box-sizing:content-box;height:100%;margin:calc(var(${zi}--offset)*-1);padding:var(${zi}--offset);position:absolute;top:0;width:100%}[part=slot]{z-index:2}`)],Di);var Ui=Di;Ui.define(),oi.define();const ji=gi((()=>CSS.supports("position-area:top")));function Vi(t,e){if(t){const s="selected";e?t.setAttribute(s,""):t.removeAttribute(s)}}let Hi=class Select extends vi{constructor(){super(...arguments),this.multiple=!1,this.noEdit=!1,this.values=[],this.optionsVisible=!1}render(){const t=this.noEdit||this.disabled;return at`<label part="root" ${Ht(this.observedRecord)}> ${[this._renderPrefix(),this.noEdit?at`<input style="position: absolute;inset: 0;opacity: 0;"/>`:"",at`<input part="input" .value="${this.text}" ?autofocus="${this.autofocus}" ?disabled="${t}" autocapitalize="${this.autocapitalize||dt}" autocomplete="${this.autocomplete||dt}" placeholder="${this.placeholder||dt}" @input="${t?null:this._handleInput}" @change="${t?null:this._handleChange}"/>`,this._renderSuffix()]} <div part="popover" popover="${ji()?"manual":dt}"> ${Gt()} </div> </label>`}_renderSuffix(){return at`<i part="suffix">${Gt("suffix",Be())}</i>`}firstUpdated(){this.events.add(this._slot,"click",(t=>{const{target:e}=t;if("OPTION"!==e.tagName)return;const{label:s,value:o}=e,r=this.select(o,s);this.multiple||(Vi(this.lastChecked,0),this.hideOptions()),Vi(e,r),this.lastChecked=e}))}_connectedInit(){this.default=this.value??="",this.defaultText=this.text??="",this.events.add(this,"focus",this.showOptions)}reset(){this.value=this.default,this.text=this.defaultText}select(t,e){e||=t;let s=0;const o=this.values.findIndex((e=>e.value===t));return o>-1?this.values.splice(o,1):(this.values.push({value:t,label:e}),s=1),this.checkValues(),this.value=this.values.map((t=>t.value)).join(","),this.text=this.values.map((t=>t.label)).join(", "),this.dispatchCustomEvent("select",this.value),s}checkValues(){!this.multiple&&this.values.length>1&&(this.values.splice(0,this.values.length-1),this.requestUpdate())}showOptions(){if(this.optionsVisible)return;Si(this._popover);const t=e=>{this.contains(e.target)||(this.hideOptions(),this.events.remove(document,"click",t))};this.events.add(document,"click",t),this.optionsVisible=!0}hideOptions(){this.optionsVisible&&(wi(this._popover),this.optionsVisible=!1)}focus(t){super.focus(),this._input.focus(t),this.showOptions()}blur(){super.blur(),this._input.blur(),wi(this._popover)}};t([Tt()],Hi.prototype,"text",void 0),t([Tt({type:Boolean})],Hi.prototype,"multiple",void 0),t([Tt({type:Boolean})],Hi.prototype,"noEdit",void 0),t([Tt({type:Array})],Hi.prototype,"values",void 0),t([It("popover")],Hi.prototype,"_popover",void 0),Hi=t([At("select"),Ct(f`[part=root]{position:relative;anchor-name:--select}label{display:contents}[part=popover]{background:none;border:0;width:100%;position-anchor:--select;position-area:bottom center;position-try-fallbacks:flip-block}[part=input]{text-overflow:ellipsis}@supports not (position-area:top){[part=popover]{display:none;left:0;position:absolute;top:100%}}`)],Hi);var Li=Hi;Li.define();const Gi="skeleton",Fi=ee(Gi);let Wi=class Skeleton extends GlobalStyle{constructor(){super(...arguments),this.loading=!0}render(){return this.loading?at`<div part="root">${Gt("loading")}</div>`:Gt()}};t([Mt()],Wi.prototype,"loading",void 0),Wi=t([At(Gi),Ct(f`:host{${Fi}--from:var(${ie.background});${Fi}--to:var(${ie.passive});${Fi}--deg:95deg;${Fi}--duration:2s;animation:_ var(${Fi}--duration) ease-in-out infinite none running;background-color:transparent;background-image:linear-gradient(var(${Fi}--deg),var(${Fi}--from) 36%,var(${Fi}--to) 50%,var(${Fi}--from) 64%);background-size:200% 100%;flex-shrink:0;height:2em;overflow:hidden;width:100%}@keyframes _{0%{background-position:150%}to{background-position:-50%}}[part=root]{display:contents}:host,:host([contents]) [part=root]{display:block}`)],Wi);var qi=Wi;qi.define();const Yi="split",Xi=ee(Yi);let Zi=class Split extends pi{constructor(){super(),this.len=6,this.index=-1,this.current=-1,this.currentValue=[],new StyleController(this,(()=>new RingBuilder({selector:"[part=input-box]",type:this.ringType}).css))}get observedRecord(){return a(super.observedRecord,ne)}render(){return at`<div part="root" ${Ht(this.observedRecord)}> ${qt(this.len,(t=>at`<span part="input-box" ring-type="${this.ringType}" class="${jt({focus:this.current===t})}" @click="${this.disabled?null:()=>this.focusAt(t)}"> ${this.currentValue[t]} </span>`))} <input part="input" @blur=${this.blur} @input="${this._handleInput}" @change="${this._handleChange}" .value="${this.value.padStart(this.len," ")}"/> </div>`}connectedCallback(){super.connectedCallback(),this.reset()}_handleInput(t){t.stopPropagation(),this.compositing||(this.fillInput(t.data),this.value=this.currentValue.join(""),this.dispatchCustomEvent("input",this.value,{bubbles:!0}))}fillInput(t){if(null===t){if(null!==this.currentValue[this.current])this.currentValue[this.current]=null;else{this.currentValue[this.current-1]=null;const t=this.currentValue.findLastIndex((t=>null!==t));this.current=this.current-1<0?t<0?0:t:this.current-1}return}const e=t.length>1;if(this.currentValue[this.current]=t[0],this.current+1>=this.len?(this.current=this.currentValue.indexOf(null),-1===this.current&&this.blur()):this.current+=1,e){const e=t.slice(1);e&&this.fillInput(e)}}focus(){this.focusAt(this.current),super.focus()}focusAt(t){this.current=t,this._input.focus()}blur(){this._input.blur(),this.current=-1,super.blur()}reset(){this.current=-1,this.value=this.default,this.currentValue=this.value.split("").concat(Array(this.len-this.value.length).fill(null)),this.index>-1&&(this.current=this.index)}};t([Tt({type:Number})],Zi.prototype,"len",void 0),t([Tt({type:Number})],Zi.prototype,"index",void 0),t([Mt()],Zi.prototype,"current",void 0),t([Mt()],Zi.prototype,"currentValue",void 0),Zi=t([At(Yi),Ct(f`:host{border-radius:.1em;display:block;width:-moz-fit-content;width:fit-content;${Xi}--size:2em;${Xi}--gap:.25em}[part=root]{display:flex;gap:var(${Xi}--gap);justify-content:space-between;position:relative}[part=input-box],[part=root]{border-radius:inherit;vertical-align:top}[part=input-box]{align-items:center;display:inline-flex;height:var(${Xi}--size);justify-content:center;width:var(${Xi}--size)}[part=input]{background:none;height:100%;opacity:0;position:absolute;width:100%;z-index:-1}.focus,[part=input-box]:active{${ie.ringColor}:var(${ie.active})}`)],Zi);var Ki=Zi;Ki.define();const Qi="switch",Ji=ee(Qi);let ts=class Switch extends pi{constructor(){super(...arguments),this.default=!1,this.value=!1}set checked(t){this.value=t}get checked(){return this.value}get observedRecord(){return a(super.observedRecord,ne)}render(){return at`<div part="root" ${Ht(this.observedRecord)} class="round"> <input part="input" type="checkbox" ?disabled="${this.disabled}" ?checked="${this.value}" @change="${this._handleChange}"/> <span part="handle"></span> </div>`}reset(){this.value=this.default,this._input.checked=this.value}_connectedInit(){this.default?this.value=!0:this.value&&(this.value=!0,this.default=!0)}_handleChange(){const{checked:t}=this._input;this.value=t,this.dispatchCustomEvent("change",this.value)}};t([Tt({type:Boolean})],ts.prototype,"default",void 0),t([Tt({type:Boolean,attribute:"checked",reflect:!0})],ts.prototype,"value",void 0),ts=t([At(Qi),Ct(f`:host,:host([contents]) [part=root]{display:inline-block}:host{${Ji}-width:3em;${Ji}-height:calc(var(${Ji}-width)/2);${Ji}-handle-size:1.25em;${Ji}-handle-space:calc(var(${Ji}-width)/4 - var(${Ji}-handle-size)/2);background:var(${ie.passive});border-radius:calc(var(${Ji}-height)/2);height:var(${Ji}-height);transition:.2s ease-in-out;transition-property:background,left;vertical-align:bottom;width:var(${Ji}-width)}:host([checked]){background:var(${ie.active})}[part=root]{position:relative}[part=handle],[part=root]{align-items:center;display:flex;transition:inherit}[part=handle]{background:var(${ie.background});border-radius:100%;height:var(${Ji}-handle-size);justify-content:center;left:0;pointer-events:none;position:absolute;top:50%;transform:translateY(-50%) translateX(var(${Ji}-handle-space));width:var(${Ji}-handle-size)}:host([checked]) [part=handle]{left:50%}[part=input]{height:100%;opacity:0;width:100%}`)],ts);var es=ts;es.define();let is=class Text extends GlobalStyle{constructor(){super(...arguments),this.underline="none",this.nowrap=!1,this.italic=!1,this.truncate=!1,this.clip=!1}render(){return at`<p part="root">${Gt()}</p>`}};t([Tt({converter:{fromAttribute:t=>""===t||t,toAttribute:t=>!1===t?null:!0===t?"":t},reflect:!0})],is.prototype,"underline",void 0),t([Tt({type:Boolean,reflect:!0})],is.prototype,"nowrap",void 0),t([Tt({type:Boolean,reflect:!0})],is.prototype,"italic",void 0),t([Tt({type:Boolean,reflect:!0})],is.prototype,"truncate",void 0),t([Tt({type:Boolean,reflect:!0})],is.prototype,"clip",void 0),is=t([At("text"),Ct(f`:host([clip]){background:var(${ie.backgroundClip});color:transparent;display:inline-block;-webkit-text-fill-color:transparent;background-clip:text;-webkit-background-clip:text}:host([nowrap]){white-space:nowrap}:host([italic]){font-style:italic}:host([truncate]),:host([truncate]) ::slotted(*){max-width:100%;overflow:hidden;text-overflow:ellipsis}:host([strikethrough]){text-decoration:line-through}:host(:active[underline=active]),:host(:focus[underline=focus]),:host(:hover[underline=hover]),:host([underline=""]),:host([underline=always]){text-decoration:underline}`)],is);var ss=is;ss.define();const os="tabs",rs=ee(os),ns="hover";let as=class Tabs extends GlobalStyle{constructor(){super(),this.ringType="border",this.beginning="selected",this.indicator="background",this.index=0,new StyleController(this,(()=>new RingBuilder({type:this.ringType}).css))}render(){return at`<ul part="root" ${Ht(this.observedRecord)} @mouseleave="${this._handleMouseLeave}"> ${this.tabs?.map(((t,e)=>at`<li part="${jt("item",this.index===e&&"selected")}" @mouseenter=${()=>{this.move(this.previousIndex,e),this.previousIndex=e}} @click=${()=>this.select(e)}> ${Gt(t,t)} <div part="indicator"></div> </li>`))} </ul>`}connectedCallback(){super.connectedCallback(),this.previousIndex="selected"===this.beginning?this.index:-1}_handleMouseLeave(){const t=this._items[this.previousIndex];t&&t.part.remove(ns),this.previousIndex="selected"===this.beginning?this.index:-1}move(t,e){if(t===e)return;const{_items:s,_indicators:o}=this,r=s[e];if(!r)return;r.part.add(ns);const a=s[t];if(!a)return;if(a.part.remove(ns),"none"===this.beginning)return;const l=o[e],h=o[t];if(!l||!h)return;const{x:d,y:c,width:p}=h.getBoundingClientRect(),{x:u,y:v}=l.getBoundingClientRect(),f=d-u,m=c-v,{style:g}=l,{style:$}=h;g.transform=`translate3d(${f}px,${m}px,0)`,g.width=`${p}px`,g.transition=$.transition="none",l.getBoundingClientRect(),g.width=g.transform=g.transition=$.transition=""}select(t){const{index:e,previousIndex:s}=this;this.move(s,t),t!==e&&(this.previousIndex=t,this.index=t,this.dispatchCustomEvent("select",t))}};t([Tt({attribute:ne})],as.prototype,"ringType",void 0),t([Tt()],as.prototype,"beginning",void 0),t([Tt()],as.prototype,"indicator",void 0),t([Tt({type:Array})],as.prototype,"tabs",void 0),t([Tt({type:Number})],as.prototype,"index",void 0),t([Bt("[part~=item]")],as.prototype,"_items",void 0),t([Bt("[part=indicator]")],as.prototype,"_indicators",void 0),as=t([At(os),Ct(f`:host{${rs}--indicator-background:var(${ie.passive});${rs}--selected-background:var(${ie.passive});cursor:default;display:flex;transition:.2s ease-in-out}[part=root]{border-radius:inherit;display:flex;flex-direction:inherit;gap:.25em;overflow-x:clip;padding:.25em;position:relative;transition:inherit;transition-property:width,transform,opacity;z-index:1}[part~=item]{display:block;padding:0 .25em;position:relative;white-space:nowrap}[part=indicator],[part~=item],[part~=item]:after{border-radius:inherit;transition:inherit;transition-property:inherit;width:100%}[part=indicator],[part~=item]:after{background:var(${rs}--indicator-background);height:100%;inset:0;position:absolute}[part=indicator]{opacity:0;z-index:-1}[part~=item]:after{z-index:-2}[indicator=underline] [part=indicator],[indicator=underline] [part~=item]:after{border-radius:.075em;height:.15em;margin-top:.15em;top:100%}[part~=selected]:after{background:var(${rs}--selected-background);content:""}[part~=hover] [part=indicator]{opacity:1}`)],as);var ls=as;function hs(t,e=2){return t.toString().padStart(e,"0").split("")}ls.define();let ds=class Time extends ss{constructor(){super(...arguments),this.escape="%",this.format="YYYY-MM-DD hh:mm:ss",this.time=new Date}render(){return at`<p part="root">${function(t,e=new Date,s="%"){var o;if(!t)return t;if(isNaN(e.getTime()))return;const r=`${s}${s}`,a=[];t=t.replace(new RegExp(`${s}([ZYMDhmsS${s}])`,"g"),((t,e)=>(a.push(e),r)));const l=e.getTimezoneOffset()/-60,h={Z:[l>=0?"+"+l.toString():l.toString()],Y:e.getFullYear().toString().split(""),M:hs(e.getMonth()+1),D:hs(e.getDate()),h:hs(e.getHours()),m:hs(e.getMinutes()),s:hs(e.getSeconds()),S:hs(e.getMilliseconds(),3)},d=[];for(const e of t.split("").reverse()){const t=null===(o=h[e])||void 0===o?void 0:o.pop();t?d.push(t):d.push(e)}return d.reverse().join("").replace(new RegExp(r,"g"),(()=>a.shift()))}(this.format,this.time,this.escape)}</p>`}updated(t){t.has("timeout")&&this.timeout&&(this.timeouts.remove(this.timeoutId),this.timeoutId=this.timeouts.add(setInterval((()=>{this.dispatchCustomEvent("time",this.time),this.time=new Date(this.time.getTime()+(this.gap||this.timeout))}),Math.abs(this.timeout))))}};t([Tt()],ds.prototype,"escape",void 0),t([Tt()],ds.prototype,"format",void 0),t([Tt({type:Object})],ds.prototype,"time",void 0),t([Tt({type:Number})],ds.prototype,"timeout",void 0),t([Tt({type:Number})],ds.prototype,"gap",void 0),ds=t([At("time")],ds);var cs=ds;cs.define();let ps=class Tooltip extends Ri{constructor(){super(...arguments),this.delay=300}render(){return at`<div part="root"> <div part="trigger" @click=${this.hide}> ${Gt()} </div> <div part="popover" popover="manual"> ${Gt("tip",this.tip)} </div> </div>`}connectedCallback(){super.connectedCallback(),this.events.add(this,"mouseenter",(()=>{clearTimeout(this._leaveTimeout),this._hoverTimeout=setTimeout((()=>{this.show()}),this.delay)})),this.events.add(this,"mouseleave",(()=>{clearTimeout(this._hoverTimeout),this._leaveTimeout=setTimeout((()=>{this.hide()}),this.delay)}))}};t([Tt()],ps.prototype,"tip",void 0),t([Tt({type:Number})],ps.prototype,"delay",void 0),ps=t([At("tooltip")],ps);var us=ps;us.define();const vs="typewriter",fs=ee(vs);let ms=class Typewriter extends GlobalStyle{constructor(){super(...arguments),this.content="",this.ended=!1,this.max=100,this.min=50,this.delay=0,this.index=0,this.contentInternal=""}get len(){return this.content.length}render(){return at`<div part="root" ${Ht(this.observedRecord)}> ${Gt()} ${this.contentInternal} <i part="cursor" ?hidden="${this.ended}"></i> </div>`}connectedCallback(){super.connectedCallback(),this._ranger=new Ranger(this.min,this.max)}firstUpdated(){this.content||=this._slot?.assignedNodes()[0]?.textContent.trim()||"",!this.ended&&this.len&&this.write()}updated(t){t.has("index")&&this.dispatchCustomEvent(this.index===this.len?"done":"write",this.contentInternal)}write(t=this.index){this.contentInternal=this.content.slice(0,t+1);const e=this.delay||this._ranger.random();this.timeoutID=this.timeouts.add(setTimeout((()=>{const e=t+1;e<=this.len&&(this.index=e,this.write())}),e))}stop(){clearTimeout(this.timeoutID)}end(){this.ended=!0}};t([Tt()],ms.prototype,"content",void 0),t([Tt({type:Boolean})],ms.prototype,"ended",void 0),t([Tt({type:Number})],ms.prototype,"max",void 0),t([Tt({type:Number})],ms.prototype,"min",void 0),t([Tt({type:Number})],ms.prototype,"delay",void 0),t([Tt({type:Number})],ms.prototype,"index",void 0),t([Mt()],ms.prototype,"contentInternal",void 0),t([Pt("i")],ms.prototype,"_i",void 0),ms=t([At(vs),Ct(f`:host{${fs}--cursor-width:.05em}:host,:host([contents]) [part=root]{display:inline-block}i{animation:s 1.5s steps(1) infinite;border-right:var(${fs}--cursor-width) solid;margin-left:.02em}@keyframes s{0%{border-color:currentColor}50%{border-color:transparent}}slot{display:none}`)],ms);var gs=ms;gs.define();export{le as Alert,de as Avatar,me as Badge,_e as Breath,ve as Button,Se as Card,Te as Carousel,Oe as Chip,Ue as Details,Le as Dialog,Fe as Divider,qe as Dragbox,Ze as Flex,Qe as Form,ii as Grid,hi as Heading,vi as Input,mi as Layout,ai as Link,Ei as Popover,Mi as Progress,Bi as Range,Ui as Rotate,oi as Router,Li as Select,qi as Skeleton,Ki as Split,es as Switch,ls as Tabs,ss as Text,cs as Time,us as Tooltip,gs as Typewriter};
57
+ */var s,o},zt=6;let Dt=class i{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};const Ut=(t,e)=>(t?t+(e?" "+e:""):e)||"",jt=(...t)=>t.reduce(((t,e)=>{if(!e)return t;if(r(e))return Ut(t,jt(...e));if(o(e)){for(const s in e)e[s]&&(t=Ut(t,s));return t}return Ut(t,e)}),"");function Vt(t,o){(t=>e(t)||!1===t)(o)?this.removeAttribute(t):!0===o?this.setAttribute(t,""):s(o)||(t=>"number"==typeof t)(o)&&!Number.isNaN(o)?this.setAttribute(t,String(o)):this[t]=o}const Ht=(t=>(...e)=>({_$litDirective$:t,values:e}))(class AttrDirective extends Dt{render(t,e){}update(t,[e,s=Vt]){if(e&&t.type===zt)for(const o in e)s.call(t.element,o,e[o]);return ht}}),Lt=((t,e)=>s=>t({...e,...s}))(Ht,{width:"1em",height:"1em",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}),Gt=(t,e)=>at`<slot name="${t||dt}">${e||dt}</slot>`,Ft=(t,e)=>{if(!t)return dt;const o=s(t)?t:xt(t);return o?at`<style media="${dt}">${o}</style>`:dt},Wt=t=>(e,...o)=>{const r=lt(e,o),a=s(t)?t:t.join(" "),l=t=>at`<svg viewBox="${a}" ${Lt(t)}>${r}</svg>`;return l.body=r,l.viewBox=a,l};function*qt(t,e,s){for(let s=0;s<t;s++)yield e(s)}function Yt(t,e=this){if(!e||!t)return[];const s=new Set;e instanceof Element&&e.shadowRoot&&Yt(t,e.shadowRoot).forEach((t=>s.add(t))),e.querySelectorAll(t).forEach((t=>s.add(t)));for(const o of e.children)Yt(t,o).forEach((t=>s.add(t)));return Array.from(s)}function Xt(t,e=this){if(!e||!t)return null;let s;if(e instanceof Element&&e.shadowRoot&&(s=Xt(t,e.shadowRoot),s))return s;if(s=e.querySelector(t),s)return s;for(const o of e.children)if(s=Xt(t,o),s)return s;return null}class Events{constructor(){this.inner=new Map}add(t,e,s,o){if(!t||!s)return;const r=this.inner.get(e)||new Map,a=r.get(t)||new Set;return a.add(s),r.set(t,a),this.inner.set(e,r),t.addEventListener(e,s,o),s}remove(t,e,s,o){if(!t||!s)return;const r=this.inner.get(e);if(r){const o=r.get(t);o&&(o.delete(s),o.size||(r.delete(t),r.size||this.inner.delete(e)))}t.removeEventListener(e,s,o)}removeAll(){this.inner.forEach(((t,e)=>{t.forEach(((t,s)=>{t.forEach((t=>{s.removeEventListener(e,t)}))})),t.clear()})),this.inner.clear()}}class Observers{constructor(){this.inner=new Map}add(t,e,s,o){const[r,a]=((t,e,s)=>{let o,r;switch(t){case MutationObserver:case ResizeObserver:o=new t(e),r=t=>o.observe(t,s);break;case IntersectionObserver:o=new t(e,s),r=t=>o.observe(t);break;case PerformanceObserver:o=new t(e),r=()=>o.observe(s)}return[o,r]})(e,s,o);if(r)return this.inner.set(r,(this.inner.get(r)||new Set).add(t)),a(t),r}remove(t,e){t.disconnect();const s=this.inner.get(t);"unobserve"in t?(e?(t.unobserve(e),s?.delete(e)):(s?.forEach((e=>{t.unobserve(e)})),s?.clear()),s&&!s.size&&this.inner.delete(t)):s&&this.inner.delete(t)}removeAll(){this.inner.forEach(((t,e)=>{this.remove(e)}))}}class Ranger{constructor(t,e,s){this.max=Math.max(t,e),this.min=Math.min(t,e),this.diff=this.max-this.min,this.step=s}random(){return this.normalize(Math.random()*this.diff+this.min)}present(t){return this.normalize(t*this.diff)}normalize(t){return t=this.restrict(t),this.step?this.min+Math.round((t-this.min)/this.step)*this.step:t}restrict(t){return this.max<=t?this.max:this.min>=t?this.min:t}}const Zt=(t,e,s)=>t.startsWith(e)&&t.endsWith(s);class RouteTree{constructor(){this.matchType=RouteTree.MatchTypes.strict,this.children=[]}insert(t,e,s=0){if(e||(e=RouteTree.split(t)),e.length===s)return void(this.pattern=t);const o=e[s];let r=this.findStrict(o);r||(r=new RouteTree,r.part=o,r.matchType=RouteTree.dynamic(o).matchType,this.children.push(r),this.sorted=!1),r.insert(t,e,s+1)}search(t,e=0){if(s(t)&&(t=RouteTree.split(t)),this.sorted||this.sort(),t.length===e||RouteTree.dynamic(this.part).matchType===RouteTree.MatchTypes.multi)return this.pattern?this:null;const o=t[e],r=this.filterWide(o);for(const s of r){const o=s.search(t,e+1);if(null!==o)return o}return null}findStrict(t){return this.children.find((e=>e.part===t))||null}filterWide(t){return this.children.filter((e=>e.part===t||e.matchType))}sort(){const{children:t}=this;if(t.length){t.sort(((t,e)=>t.matchType-e.matchType));for(const e of t)e.sort()}this.sorted=!0}static parseParams(t,e){const s=RouteTree.split(t),o=RouteTree.split(e),r={};for(let t=0;t<o.length;t++){const e=o[t],{key:a,matchType:l}=RouteTree.dynamic(e);if(l===RouteTree.MatchTypes.single)r[a]=s[t];else if(l===RouteTree.MatchTypes.multi){r[a]=s.slice(t).join("/");break}}return r}static dynamic(t){if(t){if(Zt(t,"{","}")||Zt(t,"[","]")){t=t.slice(1,-1);const e=RouteTree.dynamic(t);return e.matchType||=RouteTree.MatchTypes.single,e}if(t.startsWith(":"))return{key:t.slice(1),matchType:RouteTree.MatchTypes.single};if(t.startsWith("*"))return{key:t.slice(1),matchType:RouteTree.MatchTypes.multi};if(t.startsWith("..."))return{key:t.slice(3),matchType:RouteTree.MatchTypes.multi}}return{key:t,matchType:RouteTree.MatchTypes.strict}}static split(t){return t.split("/").filter((t=>t))}}RouteTree.MatchTypes={strict:0,single:1,multi:2};class Timeouts{constructor(){this.inner=new Set}add(t){if(void 0!==t)return t=+t,this.inner.has(t)&&clearTimeout(t),this.inner.add(t),t}remove(t){void 0!==t&&(t=+t,clearTimeout(t),this.inner.delete(t))}removeAll(){this.inner.forEach(clearTimeout),this.inner.clear()}}const Kt=(t,{attribute:e})=>!0===e||void 0===e?String(t).toLowerCase():!1!==e&&"symbol"!=typeof t?e:void 0,Qt=/^[\s\S]*{[\s\S]*}$/;class GodownElement extends yt{static define(t=this.elementTagName,e){this.isDefined()||this.godownConfig.define(t,this,e)}static isDefined(){return!!this.getDefined()}static getDefined(){return this.godownConfig.get(this.elementTagName)}static finalize(){super.finalize(),this.elementAttributes=new Map;for(const[t,e]of this.elementProperties.entries()){const s=Kt(t,e);s&&this.elementAttributes.set(s,t)}}get observedRecord(){const t={};for(const[e,s]of this.constructor.elementAttributes.entries())t[e]=this[s];return t}get _slot(){return this.shadowRoot?this.shadowRoot.querySelector("slot:not([name])"):null}get _slotAll(){return this.shadowRoot?[...this.shadowRoot.querySelectorAll("slot")]:[]}get _slottedAll(){return[...this.querySelectorAll("[slot]")]}get _slottedNames(){return this._slottedAll.map((t=>t.getAttribute("slot"))).filter((t=>t))}getBoundingClientRect(){let t;return this.contents&&(t=this.contentsRoot||this.shadowRoot?.firstElementChild)&&t!==this?t.getBoundingClientRect():super.getBoundingClientRect()}getClientRects(){let t;return this.contents&&(t=this.contentsRoot||this.shadowRoot?.firstElementChild)&&t!==this?t.getClientRects():super.getClientRects()}get stylex(){return this.__stylex.css}set stylex(t){t=t.trim(),Qt.test(t)||(t=`:host{${t}}`),this.shadowRoot?(this.__stylex.index&&this.shadowRoot.adoptedStyleSheets.splice(this.__stylex.index,1),this.__stylex.css=t,this.__stylex.index=this.adoptStyles(t)):this.__stylex.lazy=t}constructor(t){super(),this.events=new Events,this.observers=new Observers,this.timeouts=new Timeouts,this.__stylex={},this.assign={...GodownElement.godownConfig?.assign||{},...t}}connectedCallback(){super.connectedCallback(),this.assign&&(Object.assign(this,this.assign),this.assign=null);const{lazy:t}=this.__stylex;t&&(this.adoptStyles(t),this.__stylex.lazy="")}disconnectedCallback(){this.events.removeAll(),this.observers.removeAll(),this.timeouts.removeAll()}mount(t){this.firstUpdated(t)}unmount(){this.disconnectedCallback()}remount(t){this.unmount(),this.connectedCallback(),this.mount(t)}deepQuerySelector(t){return Xt.call(this,t)}deepQuerySelectorAll(t){return Yt.call(this,t)}adoptStyles(...t){if(!this.shadowRoot||!t.length)return;const e=this.shadowRoot.adoptedStyleSheets,s=new CSSStyleSheet;return t.forEach((t=>s.insertRule(t.toString()))),e.push(s),e.length-1}dispatchCustomEvent(t,e,s){this.dispatchEvent(new CustomEvent(t,{detail:e,composed:!0,...s}))}}GodownElement.godownConfig=new class GodownConfig{constructor(t){this.assign=null,this.prefix="godown",this.suffix="",this.components=new Map,this.registry=customElements,t&&Object.assign(this,t)}tag(t){return l(this.prefix+"-"+t+"-"+this.suffix)}define(t,e,s){this.registry.define(t,e,s),this.components.set(t,e)}get(t){return this.registry.get(t)}getName(t){const{getName:e}=this.registry;return e?e(t):[...this.components.entries()].find((([,e])=>e===t))?.[0]||null}whenDefined(t){return this.registry.whenDefined(t)}upgrade(t){this.registry.upgrade(t)}},t([Tt({type:Boolean,reflect:!0})],GodownElement.prototype,"contents",void 0),t([Tt({reflect:!0})],GodownElement.prototype,"stylex",null);const Jt=f`*,:host{box-sizing:border-box}i{font-style:normal}a{color:currentColor;text-decoration:none}span{white-space:nowrap}svg{-webkit-user-select:none;user-select:none}input{background:none;border:0;color:currentColor;font-size:100%;outline:0;padding:0}dd,dl{margin:0}dialog,ul{margin:0;padding:0}dialog{border:0;outline:0}[popover]{border:0;margin:0;padding:0}@supports not selector(:popover-open){[popover]{display:none}}`;class GlobalStyle extends GodownElement{}const te=((t,e)=>((t,e)=>((t,e)=>{if(!t||!e)return t;let s=0;for(;s<t.length&&e(t.slice(s,s+1));)s+=1;return t.slice(s)})(((t,e)=>{if(!t||!e)return t;let s=t.length;for(;s>0&&e(t.slice(s-1,s));)s-=1;return t.slice(0,s)})(t,e),e))(t,(t=>t===e)))(GlobalStyle.godownConfig.prefix,"-");function ee(t,e=1){return function(t){return v(`--${t}`)}(te+"-".repeat(e)+t)}const ie={background:ee("background",2),foreground:ee("foreground",2),backgroundClip:ee("background-clip",2),primaryBackground:ee("primary",2),primaryForeground:ee("primary-foreground",2),muted:ee("muted",2),active:ee("active",2),passive:ee("passive",2),input:ee("input",2),radius:ee("radius",2),ringWidth:ee("ring-width",2),ringColor:ee("ring-color",2)};GlobalStyle.styles=[Jt,v(((t,e,s)=>{const o=[...bt(e)];return((t,{truecase:e,falsecase:s})=>{const o="@supports";let r="";return e&&(r+=`${o}(${t}){${e}}`),s&&(r+=`${o} not (${t}){${s}}`),r})("color:light-dark(#fff,#000)",{truecase:xt([[t,kt(o.map((([t,[e,s]])=>[t,`light-dark(${e},${s})`])))]]),falsecase:xt([[t,kt(o.map((([t,e])=>[t,e[s]])))]])})})(":host",[[ie.background,["hsl(0 0% 96%)","hsl(0 0% 4%)"]],[ie.foreground,["hsl(0 0% 4%)","hsl(0 0% 96%)"]],[ie.muted,["hsl(0 0% 88%)","hsl(0 0% 18%)"]]],1)),v(xt({":host":kt([[ie.primaryBackground,St(ie.foreground)],[ie.primaryForeground,St(ie.background)],[ie.active,St(ie.primaryBackground)],[ie.passive,St(ie.muted)],[ie.backgroundClip,`linear-gradient(to bottom, ${St(ie.foreground)}, ${St(ie.muted)})`],[ie.ringColor,St(ie.passive)],[ie.ringWidth,".1em"],[ie.radius,".25em"]])})),f`:host([contents]){display:contents}[part=root]{height:100%;width:100%}:host([contents]) [part=root]{height:inherit;width:inherit}:where(:host([contents]) [part=root]){all:inherit;display:revert}`,f`:host{border-radius:var(${ie.radius});border-style:none;outline-style:none}`];const se=({width:t,color:e,inset:s})=>`outline-style:solid;outline-color:${e};outline-width:${t};${s?`outline-offset:calc(-1 * ${t});`:""}`,oe=({width:t,color:e,inset:s})=>`box-shadow:${s?"inset":""} 0 0 0 ${t} ${e};`,re={outline:(t,e)=>se({width:t,color:e,inset:!1}),"outline-inset":(t,e)=>se({width:t,color:e,inset:!0}),"box-shadow":(t,e)=>oe({width:t,color:e,inset:!1}),shadow:(t,e)=>oe({width:t,color:e,inset:!1}),"box-shadow-inset":(t,e)=>oe({width:t,color:e,inset:!0}),"shadow-inset":(t,e)=>oe({width:t,color:e,inset:!0}),border:(t,e)=>(({width:t,color:e})=>`border-style:solid;border-color:${e};border-width:${t};`)({width:t,color:e})};class RingBuilder{constructor({selector:t=":host",width:e=St(ie.ringWidth),color:s=St(ie.ringColor),type:o}={}){if(o&&o in re){const r=re[o](e,s);this.css=`${t}{${r}}`}else this.css=""}get styleSheet(){return v(this.css).styleSheet}}const ne="ring-type";let ae=class Alert extends GlobalStyle{constructor(){super(),this.ringType="border",new StyleController(this,(()=>new RingBuilder({type:this.ringType}).css))}render(){return at`<div part="root"> <div>${Gt("prefix")}</div> <div part="content"> <b part="title">${Gt("title",this.title)}</b> ${Gt("",this.content)} </div> <div>${Gt("suffix")}</div> </div>`}static alert(t,e){const s=new this;return Object.assign(s,e),t.appendChild(s),s}};t([Tt({attribute:ne})],ae.prototype,"ringType",void 0),t([Tt()],ae.prototype,"title",void 0),t([Tt()],ae.prototype,"content",void 0),ae=t([At("alert"),Ct(f`:host{background:var(${ie.background});color:var(${ie.foreground})}:host,:where(:host([contents]) [part=root]),b{display:block}[part=root]{display:grid;grid-template-columns:auto 1fr auto;padding:1em}`)],ae);var le=ae;le.define();let he=class Avatar extends GlobalStyle{constructor(){super(...arguments),this.name="",this.round=!1}render(){return at`<div part="root" ${Ht(a(this.observedRecord,"src"))}> ${this._renderAvatar()} </div>`}_renderAvatar(){return this.src?at`<img part="image" src="${this.src}" alt="${this.name}" @error=${this._handleError}/>`:this.name?at`<span part="name">${this.formatName()}</span>`:Gt()}formatName(){return this.name}_handleError(){this.src=void 0}};t([Tt()],he.prototype,"src",void 0),t([Tt()],he.prototype,"name",void 0),t([Tt({type:Boolean})],he.prototype,"round",void 0),he=t([At("avatar"),Ct(f`:host{background:var(${ie.passive});color:var(${ie.foreground});height:2em;overflow:hidden;vertical-align:bottom;width:2em}:host,[part=root]{display:inline-flex}:host([contents]) [part=root]{display:inline-flex;height:inherit;width:inherit}:host([round]){border-radius:50%}[part=image]{height:100%;object-fit:cover;width:100%}[part=root]{align-items:center;border-radius:inherit;justify-content:center;position:relative}`)],he);var de=he;de.define();const ce="button",pe=ee(ce);let ue=class Button extends GlobalStyle{constructor(){super(...arguments),this.plain=!1,this.disabled=!1,this.active=!1,this.round=!1}render(){return at`<div part="root" ${Ht(this.observedRecord)}> ${Gt("",this.content)} <span part="modal-root"></span> </div>`}focus(){this.disabled||(this.active=!0,super.focus())}blur(){this.active=!1,super.blur()}connectedCallback(){super.connectedCallback(),this.events.add(this,"click",this._handelClick)}_handelClick(t){if(this.disabled)return t.stopPropagation(),void t.preventDefault();this.plain||this._handleModal(t)}_handleModal(t){const e=document.createElement("i"),{width:s,height:o}=this.getBoundingClientRect(),{x:r,y:a}=this._root.getBoundingClientRect(),l=2*Math.sqrt(o**2+s**2)+"px";e.style.height=l,e.style.width=l,e.style.left=t.x-r+"px",e.style.top=t.y-a+"px",this._modalRoot.appendChild(e),e.animate([{transform:"scale(0) translate(-50%, -50%)",opacity:.1},{transform:"scale(1) translate(-50%, -50%)",offset:.8},{opacity:0}],{duration:800,iterations:1}),e.addEventListener("animationend",(()=>e.remove()),{once:!0})}};t([Tt({type:Boolean,reflect:!0})],ue.prototype,"plain",void 0),t([Tt({type:Boolean,reflect:!0})],ue.prototype,"disabled",void 0),t([Tt({type:Boolean,reflect:!0})],ue.prototype,"active",void 0),t([Tt({type:Boolean,reflect:!0})],ue.prototype,"round",void 0),t([Tt()],ue.prototype,"content",void 0),t([It("modal-root")],ue.prototype,"_modalRoot",void 0),t([It("root")],ue.prototype,"_root",void 0),ue=t([At(ce),Ct(f`:host(:not([disabled]):active){transform:scale(var(${pe}--focus-scale))}:host([round]){border-radius:calc(infinity*1px)}:host([disabled]){cursor:not-allowed;filter:brightness(.85)}:host([plain]){${pe}--gradients:unset;${pe}--focus-scale:unset}`,f`:host{${pe}--modal-animation-duration:1.5s;${pe}--focus-scale:.97;${pe}--deg:45deg;background:var(${ie.primaryBackground});color:var(${ie.primaryForeground});cursor:pointer;display:inline-block;overflow:hidden;text-align:center}[part=root]{align-items:center;display:inline-flex;justify-content:center;padding-block:.25em;padding-inline:1em;position:relative;-webkit-user-select:none;user-select:none}i{background:currentColor;border-radius:50%;height:100%;inset:0;opacity:0;pointer-events:none;position:absolute;transform-origin:0 0;visibility:visible;width:100%}`)],ue);var ve=ue;let fe=class Badge extends ve{constructor(){super(...arguments),this.plain=!0,this.round=!0}};fe=t([At("badge"),Ct(f`:host{font-size:.75em}[part=root]{padding:0 .5em}`)],fe);var me=fe;me.define();const ge="breath",ye=ee(ge),$e=/[\s,]+/;let be=class Breath extends GlobalStyle{render(){const t=this.getTexts();return at`<div part="root" ${Ht(this.observedRecord)}> ${[t.map(this._renderText),Ft(this._computeStyle(t.length))]} </div>`}_renderText(t){return at`<span class="rel"> <span class="nocolor">${t}</span> <span class="colorful">${t}</span> </span>`}getTexts(){return Array.isArray(this.content)?this.content:(this.content||this.textContent).split($e).filter((t=>t))}_computeStyle(t){const e=50/t,s=this.duration||1e3*(2*t+2);let o="";for(let e=1;e<=t;e++)o+=`.rel:nth-child(${e}) .colorful{animation-delay:${-s/t*(t-e+1)}ms;background:var(${ye}--${e},var(${ye}--${(e-1)%3+1}));}`;return`.colorful{animation-duration:${s}ms;}@keyframes colorfulN{0%,${3*e}%{opacity:0;}${e}%,${2*e}%{opacity:1;}}${o}`}};t([Tt()],be.prototype,"content",void 0),t([Tt({type:Number})],be.prototype,"duration",void 0),be=t([At(ge),Ct(f`:host{${ye}--deg:60deg;${ye}--1-1:#dd3c3c;${ye}--1-2:#f5993d;${ye}--2-1:#26d944;${ye}--2-2:#29a3a3;${ye}--3-1:#8c30e8;${ye}--3-2:#0d80f2;${ye}--1:linear-gradient(var(${ye}--deg),var(${ye}--1-1),var(${ye}--1-2));${ye}--2:linear-gradient(var(${ye}--deg),var(${ye}--2-1),var(${ye}--2-2));${ye}--3:linear-gradient(var(${ye}--deg),var(${ye}--3-1),var(${ye}--3-2))}`,f`:host{align-items:center;direction:ltr;font-size:2em;margin:auto;width:-moz-fit-content;width:fit-content}:host,:host([contents]) [part=root]{display:flex}[part=root]{display:contents}::selection{background:none}.rel{font-size:inherit;font-weight:800;letter-spacing:-.05em;position:relative}`,f`.colorful,.nocolor{animation-iteration-count:infinite;-webkit-background-clip:text!important;background-clip:text!important;box-sizing:border-box;color:transparent;display:inline-block;padding:0 .05em}.colorful{animation-name:colorfulN;opacity:0}.nocolor{background:var(${ie.backgroundClip});position:absolute;top:0}`)],be);var _e=be;_e.define(),ve.define();const we="card";ee(we);let xe=class Card extends GlobalStyle{constructor(){super(),this.ringType="border",this.footer=!1,this.header=!1,new StyleController(this,(()=>new RingBuilder({type:this.ringType}).css))}render(){return at`<div part="root" ${Ht(this.observedRecord)}> ${[this.header?Gt("header"):"",Gt(),this.footer?Gt("footer"):""]} </div>`}};t([Tt({attribute:ne})],xe.prototype,"ringType",void 0),t([Tt({type:Boolean})],xe.prototype,"footer",void 0),t([Tt({type:Boolean})],xe.prototype,"header",void 0),xe=t([At(we),Ct(f`:host{background:var(${ie.background});color:var(${ie.foreground});display:block;flex-shrink:0}slot{display:block;padding:1em}[part=root]{border-radius:inherit}[name=footer]{padding-top:0}[name=header]{padding-bottom:0}`)],xe);var ke=xe;ke.define();const Se=Wt("0 0 256 256")`<path fill="currentColor" d="M165.66 202.34a8 8 0 0 1-11.32 11.32l-80-80a8 8 0 0 1 0-11.32l80-80a8 8 0 0 1 11.32 11.32L91.31 128Z">`,Ce=Wt("0 0 256 256")`<path fill="currentColor" d="m181.66 133.66l-80 80a8 8 0 0 1-11.32-11.32L164.69 128L90.34 53.66a8 8 0 0 1 11.32-11.32l80 80a8 8 0 0 1 0 11.32">`;function Ae(t){return t.getBoundingClientRect().width}let Re=class Carousel extends GlobalStyle{constructor(){super(...arguments),this.index=0,this.autoChange=0}render(){return at`<div part="root" ${Ht(this.observedRecord)}> <i part="prev" @click="${this.prev}"> ${Se()} </i> <div part="move-root">${Gt()}</div> <i part="next" @click="${this.next}"> ${Ce()} </i> </div>`}connectedCallback(){super.connectedCallback(),this.children.length&&(this.__cloneFirst?.remove(),this.__cloneLast?.remove(),this.__cloneLast=this.firstElementChild.cloneNode(!0),this.__cloneFirst=this.lastElementChild.cloneNode(!0),this.appendChild(this.__cloneLast),this.insertBefore(this.__cloneFirst,this.firstElementChild)),this.observers.add(this,ResizeObserver,(()=>{this._offset=this._computeOffset(),this._doTranslateX(`${this._offset}px`,!0)}))}async firstUpdated(){await this.updateComplete,this.show(this.index,!0)}attributeChangedCallback(t,e,s){super.attributeChangedCallback(t,e,s),"index"===t&&this.isConnected&&this.show(this.index)}show(t,e){t=this.normalizeIndex(t),this.index=t,this._offset=this._computeOffset(),this._doTranslateX(`${this._offset}px`,e),this.dispatchCustomEvent("change",t),this.timeouts.remove(this.intervalID),this.autoChange>0&&(this.intervalID=this.timeouts.add(setInterval((()=>{this.next()}),this.autoChange)))}next(){this.index===this.childElementCount-3?(this._doTranslateX("0",!0),this.show(0)):this.show(this.index+1)}prev(){0===this.index?(this._doTranslateX(`-${this.childElementCount-1}00%`,!0),this.show(this.children.length-3)):this.show(this.index-1)}_doTranslateX(t,e){this._moveRoot.style.transform=`translateX(${t})`,this._moveRoot.style.transition=e?"none":""}_computeOffset(){let t=0;for(let e=0;e<=this.index;e++)t-=Ae(this.children[e]);return t+=(Ae(this)-Ae(this.children[this.index+1]))/2,t}normalizeIndex(t){return t<0?0:t>this.children.length-3?this.children.length-3:t}};t([Tt({type:Number})],Re.prototype,"index",void 0),t([Tt({type:Number})],Re.prototype,"autoChange",void 0),t([It("move-root")],Re.prototype,"_moveRoot",void 0),Re=t([At("carousel"),Ct(f`:host{display:block;transition:.3s}[part=root]{direction:ltr;overflow:hidden}[part=move-root],[part=root]{display:flex;height:100%;position:relative;transition:inherit;width:100%}[part=next],[part=prev]{align-items:center;display:flex;height:100%;justify-content:center;position:absolute;-webkit-user-select:none;user-select:none;width:1.5em;z-index:1}[part=prev]{left:0}[part=next]{right:0}slot::slotted(*){flex-shrink:0!important}`)],Re);var Ee=Re;Ee.define();const Te="chip",Me=ee(Te);let Ne=class Chip extends GlobalStyle{constructor(){super(...arguments),this.position="top-right",this.value=0,this.dot=!1,this.max=99}formatValue(t){return t>this.max?this.max+"+":t+""}render(){return at`<div part="root" ${Ht(this.observedRecord)}> ${Gt()} ${this.value||this.dot?at`<div part="chip">${this.dot?"":this.formatValue(this.value)}</div>`:""} </div>`}};t([Tt()],Ne.prototype,"position",void 0),t([Tt({type:Number})],Ne.prototype,"value",void 0),t([Tt({type:Boolean})],Ne.prototype,"dot",void 0),t([Tt({type:Number})],Ne.prototype,"max",void 0),Ne=t([At(Te),Ct(f`:host{${Me}--offset:0%;${Me}--offset-x:var(${Me}--offset);${Me}--offset-y:var(${Me}--offset)}:host,:host([contents]) [part=root]{display:inline-block}[part=root]{position:relative}[part=chip]{background:var(${ie.primaryBackground});border-radius:calc(infinity*1px);color:var(${ie.primaryForeground});font-size:75%;padding:0 .5em;position:absolute;transform:translate(-50%,-50%);-webkit-user-select:none;user-select:none}[part=chip]:empty{border-radius:50%;font-size:100%;height:.5em;padding:0;width:.5em}[position^=top] [part=chip]{top:calc(var(${Me}--offset-y))}[position$=right] [part=chip]{left:calc(100% - var(${Me}--offset-x))}[position^=bottom] [part=chip]{top:calc(100% - var(${Me}--offset-y))}[position$=left] [part=chip]{left:calc(var(${Me}--offset-x))}`)],Ne);var Pe=Ne;Pe.define();const Oe=Wt("0 0 256 256")`<path fill="currentColor" d="m213.66 101.66l-80 80a8 8 0 0 1-11.32 0l-80-80a8 8 0 0 1 11.32-11.32L128 164.69l74.34-74.35a8 8 0 0 1 11.32 11.32">`,Be="details",Ie=ee(Be);let ze=class Details extends GlobalStyle{constructor(){super(...arguments),this.open=!1,this.float=!1,this.fill=!1,this.summary=""}render(){return at`<dl part="root" ${Ht(this.observedRecord)}> <dt part="title" @click="${()=>this.toggle()}"> <span part="summary">${Gt("summary",this.summary)}</span> <span part="icon">${Gt("icon",Oe())}</span> </dt> <dd part="details" @click=${this.fill?()=>this.toggle():null}> <div style="min-height: 0;">${Gt()}</div> </dd> </dl>`}updated(t){const e=t.get("open");void 0!==e&&this.dispatchCustomEvent("change",e)}toggle(t){this.open=t??!this.open}close(){this.open=!1}show(){this.open=!0}};t([Tt({type:Boolean,reflect:!0})],ze.prototype,"open",void 0),t([Tt({type:Boolean})],ze.prototype,"float",void 0),t([Tt({type:Boolean})],ze.prototype,"fill",void 0),t([Tt()],ze.prototype,"summary",void 0),ze=t([At(Be),Ct(f`:host{${Ie}--icon-deg-open:0deg;${Ie}--icon-deg-close:90deg;display:block;transition:.3s}[part=root]{position:relative}[part=title]{align-items:center;direction:ltr;grid-template-columns:auto auto;height:100%;justify-content:space-between}[part=details],[part=title]{display:grid;overflow:hidden;transition:inherit}[part=details]{grid-template-rows:0fr}:host([open]) [part=details]{grid-template-rows:1fr}[float] [part=details]{position:absolute;top:100%;width:100%}[part]{transition:inherit;transition-property:transform,grid-template-rows}[part=icon]{-webkit-backface-visibility:hidden;backface-visibility:hidden;display:flex;transform:rotate(var(${Ie}--icon-deg-close))}:host([open]) [part=icon]{transform:rotate(var(${Ie}--icon-deg-open))}`)],ze);var De=ze;De.define();const Ue="dialog",je=ee(Ue);let Ve=class Dialog extends GlobalStyle{constructor(){super(...arguments),this.open=!1,this.modal=!1,this.__modalInvoke=!1}render(){return at`<div part="root" @click=${this.show}> ${Gt("trigger")} </div> <dialog part="dialog" role="dialog"> ${Gt("dialog")}${Gt()} </dialog>`}showModal(){this.modal=!0,this.__modalInvoke=!0,this.show()}show(){this.open=!0}close(){this.open=!1}toggle(t){this.open=t??!this.open}updated(t){t.has("open")&&(this.open?(this.modal?this._dialog.showModal():this._dialog.show(),this.__submitEvent=this.events.add(this,"submit",this._handelSubmit),this.__keydownEvent=this.events.add(document,"keydown",this._handleKeydown.bind(this))):(this.__modalInvoke&&(this.modal=!1,this.__modalInvoke=!1),this._dialog.close(),this.events.remove(this,"submit",this.__submitEvent),this.events.remove(document,"keydown",this.__keydownEvent)))}_handleKeydown(t){"Escape"===t.key&&(t.preventDefault(),this.close())}_handelSubmit(t){"dialog"===t.target.method&&(t.preventDefault(),this.close())}};t([Tt({type:Boolean,reflect:!0})],Ve.prototype,"open",void 0),t([Tt({type:Boolean,reflect:!0})],Ve.prototype,"modal",void 0),t([It("dialog")],Ve.prototype,"_dialog",void 0),Ve=t([At(Ue),Ct(f`:host{${je}--background-modal:#000;${je}--opacity-modal:0.2;background:none;display:block;width:-moz-fit-content;width:fit-content}dialog{background:none;left:50%;position:relative;position:fixed;top:50%;transform:translate(-50%,-50%);z-index:1}::backdrop{background:var(${je}--background-modal);opacity:var(${je}--opacity-modal)}`)],Ve);var He=Ve;He.define();let Le=class Divider extends GlobalStyle{constructor(){super(...arguments),this.vertical=!1}render(){return at`<div part="root"></div>`}};t([Tt({type:Boolean,reflect:!0})],Le.prototype,"vertical",void 0),Le=t([At("divider"),Ct(f`:host{background:currentColor;color:var(${ie.passive});display:block;height:.05em;width:100%}:host([vertical]){height:100%;width:.05em}`)],Le);var Ge=Le;Ge.define();let Fe=class Dragbox extends GlobalStyle{constructor(){super(...arguments),this.__drag=!1}get _offsetParent(){return this.offsetParent??document.body}render(){return at`<div part="root" ${Ht(this.observedRecord)} @mousedown="${this._handleDragStart}"> ${Gt()} </div>`}firstUpdated(){this.reset()}_handleDragStart(t){this.__x=t.x,this.__y=t.y;const e=this._offsetParent.getBoundingClientRect(),s=this.getBoundingClientRect();this.__t=s.top-e.top,this.__l=s.left-e.left,this.__drag=!0,this.__handleMouseMove=this.events.add(document,"mousemove",this._handleDrag.bind(this)),this.__handleMouseLeave=this.events.add(document,"mouseleave",this._handleDragEnd.bind(this)),this.__handleMouseUp=this.events.add(document,"mouseup",this._handleDragEnd.bind(this))}_handleDragEnd(){this.__drag=!1,this.events.remove(document,"mousemove",this.__handleMouseMove),this.events.remove(document,"mouseleave",this.__handleMouseLeave),this.events.remove(document,"mouseup",this.__handleMouseUp)}_handleDrag(t){if(!this.__drag)return;const{__x:e,__y:s,__l:o,__t:r,style:a}=this,{height:l,width:h}=this._offsetParent.getBoundingClientRect(),{width:d,height:c}=this.getBoundingClientRect(),p=t.x-(e-o),u=t.y-(s-r);a.left=p<0?"0":p<h-d?`${p}px`:h-d+"px",a.top=u<0?"0":u<l-c?`${u}px`:l-c+"px"}reset(){const{x:t,y:e,style:s,offsetWidth:o,offsetHeight:r,offsetLeft:a,offsetTop:l}=this,{height:h,width:d}=this._offsetParent.getBoundingClientRect();s.left=t||"0",s.top=e||"0",a>d-o&&(s.left=d-o+"px"),l>h-r&&(s.top=h-r+"px")}};t([Tt()],Fe.prototype,"x",void 0),t([Tt()],Fe.prototype,"y",void 0),Fe=t([At("dragbox"),Ct(f`:host{display:block;position:absolute}:host(:active){-webkit-user-select:none;user-select:none}`)],Fe);var We=Fe;We.define();let qe=class Flex extends GlobalStyle{constructor(){super(...arguments),this.vertical=!1}render(){return at`<div part="root" ${Ht(this.observedRecord)}> ${[Gt(),Ft(xt({":host":{gap:this.gap,"flex-flow":this.flexFlow,"flex-direction":this.vertical&&"column","align-items":this.items,"justify-content":this.content}}))]} </div>`}};t([Tt({attribute:"flex-flow"})],qe.prototype,"flexFlow",void 0),t([Tt()],qe.prototype,"gap",void 0),t([Tt()],qe.prototype,"content",void 0),t([Tt()],qe.prototype,"items",void 0),t([Tt({type:Boolean})],qe.prototype,"vertical",void 0),qe=t([At("flex"),Ct(f`:host,:host([contents]) [part=root]{display:flex}[part=root]{display:contents}`)],qe);var Ye,Xe=qe;Xe.define();let Ze=Ye=class Form extends GlobalStyle{constructor(){super(...arguments),this.name="",this.nameValue=this.namevalue}get value(){return Ye.buildValue(this._slot.assignedElements())}render(){return Gt()}reset(){this.deepQuerySelectorAll("*").forEach((t=>{t.tagName!==this.tagName&&t.reset&&t.reset()}))}namevalue(){return[this.name,this.value]}static buildValue(t){const e={};for(const s of t)if("FORM"===s.tagName)Object.assign(e,Object.fromEntries(new FormData(s).entries()));else if(s.namevalue){const[t,o]=s.namevalue();t&&(e[t]=o)}else if(s.name&&void 0!==s.value)e[s.name]=s.value;else if(s.shadowRoot)for(const t of s.shadowRoot.querySelectorAll("slot"))Object.assign(e,this.buildValue(t.assignedElements()));return e}};t([Tt()],Ze.prototype,"name",void 0),Ze=Ye=t([At("form"),Ct(f`:host{display:block}`)],Ze);var Ke=Ze;Ke.define();const Qe=t=>{return e=t,Number.isNaN(+e)?t:`repeat(${t},1fr)`;var e};let Je=class Grid extends GlobalStyle{render(){return at`<div part="root" ${Ht(this.observedRecord)}> ${[Gt(),Ft(xt({":host":{gap:this.gap,"grid-template-columns":Qe(this.columns),"grid-template-rows":Qe(this.rows),"place-content":this.content,"place-items":this.items}}))]} </div>`}};t([Tt()],Je.prototype,"gap",void 0),t([Tt()],Je.prototype,"columns",void 0),t([Tt()],Je.prototype,"rows",void 0),t([Tt()],Je.prototype,"content",void 0),t([Tt()],Je.prototype,"items",void 0),Je=t([At("grid"),Ct(f`:host,:host([contents]) [part=root]{display:grid}[part=root]{display:contents}`)],Je);var ti,ei=Je;ei.define();let ii=ti=class Router extends GlobalStyle{constructor(){super(...arguments),this.__fieldRouteTree=new RouteTree,this.__slottedRouteTree=new RouteTree,this.__cacheRecord=new Map,this.component=null,this.pathname=location.pathname,this.default=Gt(),this.type="united",this.cache=!1,this.handlePopstate=this.events.add(window,"popstate",(()=>{this.pathname=location.pathname}))}get params(){return this.path?RouteTree.parseParams(this.pathname,this.path):{}}set routes(t){this.__routes=t,this.collectFieldRoutes(t)}get routes(){return this.__routes}clear(){this.__cacheRecord.clear()}render(){let t;if(this.cache&&(t=this.__cacheRecord.get(this.pathname))&&(this.component=t.component,this.path=t.path,this.pathname=t.pathname),!t)switch(this.type){case"field":this.component=this.fieldComponent();break;case"slotted":this.component=this.slottedComponent();break;default:this.component=this.fieldComponent()??this.slottedComponent()}return this.component??this.default}connectedCallback(){super.connectedCallback(),ti.routerInstances.add(this),"field"!==this.type&&(this.observers.add(this,MutationObserver,this.collectSlottedRoutes,{attributes:!0,attributeFilter:["slot"],subtree:!0}),this.collectSlottedRoutes())}disconnectedCallback(){super.disconnectedCallback(),ti.routerInstances.delete(this)}useRouter(){return{pathname:this.pathname,params:this.params,path:this.path,component:this.component}}updated(t){if(t.has("pathname")||t.has("path")){const t=this.useRouter();!this.__cacheRecord.has(this.pathname)&&this.path&&this.__cacheRecord.set(this.pathname,t),this.dispatchCustomEvent("change",t)}}fieldComponent(t){if(t||=this.__fieldRouteTree.search(this.pathname)?.pattern,this.path=t,!t)return null;const e=this.routes.find((e=>e.path===t));return e?"render"in e?e.render?.(a(this.useRouter(),"component"))||null:e.component:null}slottedComponent(t){const e=this._slottedNames;return t||=this.__slottedRouteTree.search(this.pathname)?.pattern,this.path=t,t?(this.path=e.find((e=>e===t)),this.path?Gt(this.path):null):null}collectSlottedRoutes(){this.__slottedRouteTree=new RouteTree,this.clear(),this._slottedNames.forEach((t=>{this.__slottedRouteTree.insert(t)}))}collectFieldRoutes(t){this.__fieldRouteTree=new RouteTree,this.clear(),t.forEach((({path:t})=>{this.__fieldRouteTree.insert(t)}))}static updateAll(){this.routerInstances.forEach((t=>{t.handlePopstate()}))}search(t){return this.__fieldRouteTree.search(t)||this.__slottedRouteTree.search(t)}};ii.routerInstances=new Set,t([Mt()],ii.prototype,"component",void 0),t([Mt()],ii.prototype,"path",void 0),t([Tt()],ii.prototype,"pathname",void 0),t([Mt()],ii.prototype,"default",void 0),t([Tt()],ii.prototype,"type",void 0),t([Tt({type:Boolean})],ii.prototype,"cache",void 0),t([Mt()],ii.prototype,"routes",null),ii=ti=t([At("router"),Ct(f`:host{display:contents}`)],ii);var si=ii;const oi="auto";let ri=class Link extends GlobalStyle{constructor(){super(...arguments),this.type=oi,this.suppress=!1,this.replace=!1,this.target="_self",this.state={},this.handleState=()=>{switch(this.type){case oi:case"push":if(!this.replace){history.pushState(this.state,"",this.href);break}case"replace":history.replaceState(this.state,"",this.href)}}}get pathname(){return new URL(this.href,location.href).pathname}_handleClick(t){const{state:e,type:s,href:o,pathname:r,suppress:a}=this;if(!o)return;if(this.dispatchCustomEvent("navigate",{...this.observedRecord,pathname:r,state:e}),o.startsWith("#")||"normal"===s)return;this.handleState();const l=[...si.routerInstances];a||s===oi&&!l.some((t=>t.search(location.pathname)))||(t.preventDefault(),si.routerInstances.forEach((t=>{t.handlePopstate()})))}render(){return at`<a part="root" ${Ht(this.observedRecord)} href="${this.href||dt}" target="${this.target}" @click=${this._handleClick}> ${Gt()} </a>`}};t([Tt()],ri.prototype,"type",void 0),t([Tt({type:Boolean})],ri.prototype,"suppress",void 0),t([Tt({type:Boolean})],ri.prototype,"replace",void 0),t([Tt()],ri.prototype,"href",void 0),t([Tt()],ri.prototype,"target",void 0),ri=t([At("link"),Ct(f`:host{cursor:default;display:inline-block}:host([href]){cursor:pointer}a{display:contents}`)],ri);var ni=ri;let ai=class Heading extends ni{constructor(){super(...arguments),this.as="h1",this.anchor="#",this.side="left"}render(){const t=this.href||(this.id?"#"+this.id:void 0);return at`<a part="root" href="${t||dt}"> ${this.wrapHeading(Gt(),t?at`<i part="${jt("anchor",this.side)}">${this.anchor}</i>`:"")} </a>`}wrapHeading(...t){switch(this.as){case"h2":return at`<h2>${t}</h2>`;case"h3":return at`<h3>${t}</h3>`;case"h4":return at`<h4>${t}</h4>`;case"h5":return at`<h5>${t}</h5>`;case"h6":return at`<h6>${t}</h6>`;default:return at`<h1>${t}</h1>`}}};t([Tt()],ai.prototype,"as",void 0),t([Tt()],ai.prototype,"anchor",void 0),t([Tt()],ai.prototype,"side",void 0),ai=t([At("heading"),Ct(f`:host{display:block;text-align:start}[part~=anchor]{min-width:1.25em;position:absolute;right:100%;text-align:center}[part~=left][part~=anchor]{right:100%}[part~=right][part~=anchor]{left:100%}h1,h2,h3,h4,h5,h6{position:relative;width:-moz-fit-content;width:fit-content}`)],ai);var li=ai;li.define();const hi=Wt("0 0 256 256")`<path fill="currentColor" d="M53.92 34.62a8 8 0 1 0-11.84 10.76l19.24 21.17C25 88.84 9.38 123.2 8.69 124.76a8 8 0 0 0 0 6.5c.35.79 8.82 19.57 27.65 38.4C61.43 194.74 93.12 208 128 208a127.1 127.1 0 0 0 52.07-10.83l22 24.21a8 8 0 1 0 11.84-10.76Zm47.33 75.84l41.67 45.85a32 32 0 0 1-41.67-45.85M128 192c-30.78 0-57.67-11.19-79.93-33.25A133.2 133.2 0 0 1 25 128c4.69-8.79 19.66-33.39 47.35-49.38l18 19.75a48 48 0 0 0 63.66 70l14.73 16.2A112 112 0 0 1 128 192m6-95.43a8 8 0 0 1 3-15.72a48.16 48.16 0 0 1 38.77 42.64a8 8 0 0 1-7.22 8.71a6 6 0 0 1-.75 0a8 8 0 0 1-8-7.26A32.09 32.09 0 0 0 134 96.57m113.28 34.69c-.42.94-10.55 23.37-33.36 43.8a8 8 0 1 1-10.67-11.92a132.8 132.8 0 0 0 27.8-35.14a133.2 133.2 0 0 0-23.12-30.77C185.67 75.19 158.78 64 128 64a118.4 118.4 0 0 0-19.36 1.57A8 8 0 1 1 106 49.79A134 134 0 0 1 128 48c34.88 0 66.57 13.26 91.66 38.35c18.83 18.83 27.3 37.62 27.65 38.41a8 8 0 0 1 0 6.5Z">`,di=f`:host([disabled]){cursor:not-allowed;filter:brightness(.85)}input:disabled{cursor:inherit}input::-ms-clear,input::-ms-reveal{display:none}`;let ci=class SuperInput extends GlobalStyle{constructor(){super(...arguments),this.autofocus=!1,this.ringType="border",this.disabled=!1,this.compositing=!1,this.makeId=Math.random().toString(36).slice(1),this.nameValue=this.namevalue}get observedRecord(){return a(super.observedRecord,"default","value")}set defaultValue(t){this.default=t}get defaultValue(){return this.default}namevalue(){return[this.name,this.value]}reset(){this.value=this.default,this._input.value=this.default}_handleInput(t){t.stopPropagation(),this.compositing||(this.value=t.target.value?.trim(),this.dispatchCustomEvent("input",this.value,{bubbles:!0}))}_handleChange(t){this.dispatchCustomEvent("change",this.value)}connectedCallback(){super.connectedCallback(),this._connectedInit()}_connectedInit(){this.default??=this.value||"",this.value??=this.default}_compositionInit(){this._input&&(this.events.add(this._input,"compositionstart",(()=>this.compositing=!0)),this.events.add(this._input,"compositionend",(t=>{this.compositing=!1,this._handleInput(t)})))}focus(t){this._input?.focus(t)}firstUpdated(){this._compositionInit()}_renderPrefix(){return at`<i part="prefix">${Gt("prefix")}</i>`}_renderSuffix(){return at`<i part="suffix">${Gt("suffix")}</i>`}};t([Tt()],ci.prototype,"autocomplete",void 0),t([Tt({attribute:ne})],ci.prototype,"ringType",void 0),t([Tt({type:Boolean,reflect:!0})],ci.prototype,"disabled",void 0),t([Tt({reflect:!0})],ci.prototype,"placeholder",void 0),t([Tt({reflect:!0})],ci.prototype,"name",void 0),t([Tt()],ci.prototype,"value",void 0),t([Tt()],ci.prototype,"default",void 0),t([It("input")],ci.prototype,"_input",void 0),ci=t([Ct(di)],ci);let pi=class Input extends ci{constructor(){super(),this.type="text",this.variant="default",new StyleController(this,(()=>new RingBuilder({type:this.ringType}).css+("outline"===this.variant?`:host{${ie.ringColor}:currentColor}`:"")))}render(){return at`<label part="root" ${Ht(this.observedRecord)}> ${[this._renderPrefix(),at`<input part="input" type="${this.type}" .value="${this.value}" ?autofocus="${this.autofocus}" ?disabled="${this.disabled}" autocapitalize="${this.autocapitalize||dt}" autocomplete="${this.autocomplete||dt}" placeholder="${this.placeholder||dt}" @input="${this._handleInput}" @change="${this._handleChange}"/>`,this._renderSuffix()]} </label>`}_renderSuffix(){const t="password";return this.type===t?at`<i part="suffix" @mousedown="${()=>this._changeInputType("text")}" @mouseup="${()=>this._changeInputType(t)}" @mouseleave="${()=>this._changeInputType(t)}"> ${Gt("suffix",hi())} </i>`:super._renderSuffix()}_changeInputType(t){this._input&&(this._input.type=t)}};t([Tt({reflect:!0})],pi.prototype,"type",void 0),t([Tt()],pi.prototype,"variant",void 0),t([It("input")],pi.prototype,"_input",void 0),pi=t([At("input"),Ct(f`:host{display:block;${ie.input}-icon-color:grey}:host(:active),:host(:focus-within){${ie.ringColor}:currentColor;${ie.input}-icon-color:currentColor}[part=root]{align-items:center;border-radius:inherit;display:flex;padding-block:.5em;padding-inline:.75em;position:relative}[part=input]{flex-grow:1;height:100%;width:100%}[part=prefix],[part=suffix]{align-items:center;color:var(${ie.input}-icon-color);display:flex;height:100%;justify-content:center}[part=suffix] slot svg{margin-inline-start:.25em}[part=prefix] slot svg{margin-inline-end:.25em}`)],pi);var ui=pi;ui.define();let vi=class Layout extends GlobalStyle{constructor(){super(...arguments),this.sticky=!1}render(){return at`<div part="root" ${Ht(this.observedRecord)}> <header part="header">${Gt("header")}</header> <main part="main">${Gt()}</main> <footer part="footer">${Gt("footer")}</footer> </div>`}};t([Tt({type:Boolean})],vi.prototype,"sticky",void 0),vi=t([At("layout"),Ct(f`:host{flex-direction:column;grid-template-rows:auto 1fr auto;height:100%;min-height:100%;width:100%}:host,:host([contents]) [part=root]{display:flex}[part=root]{display:contents}[part=main]{flex:1;width:100%}[part=footer],[part=header]{flex-shrink:0;width:100%}[sticky] header{position:sticky;top:0}`)],vi);var fi=vi;function mi(t){let e,s=function(...o){return e=t.apply(this,o),s=()=>e,e};return s}fi.define(),ni.define();const gi="popover",yi=()=>Object.hasOwn(HTMLElement.prototype,gi),$i=t=>t.getAttribute(gi),bi=t=>{t.style.display="none"},_i=mi((t=>yi()?(t=>{null!==$i(t)?t.hidePopover():bi(t)})(t):bi(t))),wi=t=>{if(t.style.display="block","manual"!==$i(t)){const e="click",s=o=>{t.contains(o.target)||(t.dispatchEvent(new Event("toggle",{bubbles:!0,composed:!0,newState:"closed"})),_i(t),document.removeEventListener(e,s))};document.addEventListener(e,s)}},xi=mi((function(t){return yi()?(t=>{null!==$i(t)?t.showPopover():wi.call(void 0,t)})(t):wi(t)})),ki="popover",Si=ki;let Ci=class Popover extends GlobalStyle{constructor(){super(),this.anchorName=`--${ki}-${Math.random().toString(36).slice(2)}`,this.open=!1,this.action="show",this.span="span",this.position="bottom",new StyleController(this,(()=>xt({"[part=root],slot:not([name])::slotted(*)":{"anchor-name":this.anchorName},"[part=popover]":{"position-anchor":this.anchorName,"position-area":this.resolveArea()}})))}render(){return at`<div part="root"> <div part="trigger" @click=${this._handleClick}> ${Gt()} </div> <div part="popover" popover="manual"> ${Gt("popover")} </div> </div>`}_handleClick(){const{action:t}=this;switch(t){case"show":case"hide":case"toggle":this[t]()}}show(){this.toggle(!0)}hide(){this.toggle(!1)}toggle(t){this.open=t??!this.open}updated(t){t.has("open")&&this._openChange()}_openChange(){const{open:t}=this;if(t){xi.call(this,this._popover);const t=e=>{this.contains(e.target)||(this.events.remove(document,"click",t),this.open=!1)};this.events.add(document,"click",t)}else _i(this._popover);this.dispatchCustomEvent("toggle",t)}resolveArea(){const t=this.position.split("-"),e="spread"===this.span?`span-${t[0]}`:t[0];return t.length<2?`${e} center`:`${e} ${"isolated"===this.span?t[1]:`span-${t[1]}`}`}};t([Tt({type:Boolean,reflect:!0})],Ci.prototype,"open",void 0),t([Tt()],Ci.prototype,"action",void 0),t([Tt()],Ci.prototype,"span",void 0),t([Tt()],Ci.prototype,"position",void 0),t([It(ki)],Ci.prototype,"_popover",void 0),Ci=t([At(Si),Ct(f`:host{display:inline-block}[part=trigger]{display:contents}[part=root]{display:inherit}[part=popover]{inset:unset;overflow:visible;position:absolute;z-index:1;position-try-fallbacks:flip-block}`)],Ci),Ci.define();var Ai=Ci;let Ri=class Progress extends GlobalStyle{constructor(){super(...arguments),this.max=1,this.min=0}render(){let t,s=20;if(!e(this.value)){const e=new Ranger(this.min,this.max);s=(+this.value-this.min)/e.diff*100,t="static"}return at`<div part="root" ${Ht(this.observedRecord)} class="${t}"> <i part="value" style="width:${s}%;"></i> </div>`}};t([Tt({type:Number})],Ri.prototype,"max",void 0),t([Tt({type:Number})],Ri.prototype,"min",void 0),t([Tt({type:Number})],Ri.prototype,"value",void 0),Ri=t([At("progress"),Ct(f`:host{background:var(${ie.passive});border-radius:.25em;color:var(${ie.active});height:.5em;width:100%}:host,[part=root]{display:block}[part=root]{border-radius:inherit;overflow:hidden;position:relative;z-index:1}[part=value]{animation:progress 1.8s ease-in-out infinite alternate;background:currentColor;border-radius:inherit;height:100%;left:0;position:absolute;top:0;transition:all .3s;z-index:2}@keyframes progress{0%{left:0}to{left:80%}}.static [part=value]{animation:none}`)],Ri);var Ei=Ri;Ei.define();const Ti="range",Mi=ee(Ti);let Ni=class Range extends ci{constructor(){super(...arguments),this.min=0,this.max=100,this.vertical=!1,this.__focusStack=[]}get range(){return Array.isArray(this.value)}get rangeValue(){return this.range?this.value:[this.value]}padValue(t,e=0){const{rangeValue:s}=this,o=t-s.length;return o>0?new Array(o).fill(e).concat(s):s}attributeChangedCallback(t,e,s){super.attributeChangedCallback(t,e,s),"max"!==t&&"min"!==t&&"step"!==t||(this._ranger=new Ranger(this.min,this.max,this.step))}get observedRecord(){return a(super.observedRecord,ne)}render(){const t=this.padValue(2),e=Math.min(...t),s=Math.max(...t),o=this._ranger.diff;return at`<div part="root" ${Ht(this.observedRecord)} @mousedown="${this.disabled?null:this._handleMousedownRoot}" style="${kt([["--from",(e-this.min)/o*100+"%"],["--to",(s-this.min)/o*100+"%"],...t.map(((t,e)=>[`--handle-${e}`,(t-this.min)/o*100+"%"]))])}"> <div part="track"></div> ${qt(this.rangeValue.length,(t=>this._renderHandle(t)))} </div>`}_renderHandle(t){const{disabled:e,range:s,rangeValue:o}=this,r=!s||s&&t===o.length-1&&1===o.length;return at`<i tabindex="0" part="${jt("handle",`handle-${t}`)}" @mousedown="${e?null:this.createMouseDown(t)}" style="${kt({"z-index":this.__focusStack.indexOf(t)+1,"--handle":`var(--${r?"to":`handle-${t}`})`})}"></i>`}focusHandle(t){this.lastFocus=t;const e=this.__focusStack.indexOf(t);-1!==e&&this.__focusStack.splice(e,1),this.__focusStack.push(t);const s=this._handles.item(t);s?.focus(),this.__keydownEvent||(this.__keydownEvent=this.events.add(document,"keydown",this.createKeydownEvent(t)))}blurHandle(){this.lastFocus=void 0,this.__keydownEvent=this.events.remove(document,"keydown",this.__keydownEvent)}createKeydownEvent(t){return e=>{const{rangeValue:s,step:o}=this;s.length<2&&(t=0);const r=s[t];"ArrowLeft"===e.key||"ArrowDown"===e.key?(e.preventDefault(),this.createSetValue(t)(r-o)):"ArrowRight"!==e.key&&"ArrowUp"!==e.key||(e.preventDefault(),this.createSetValue(t)(r+o))}}createMouseDown(t){return e=>{this.focusHandle(t),this.createMousedownListener(this.createSetValue(t))(e)}}createSetValue(t){return e=>{const s=this._ranger.normalize(e);let o=s;this.range&&(o=[...this.value],o[t]=s),this.value=o,this.dispatchCustomEvent("change",this.value)}}_computeValue({clientX:t,clientY:e}){const{top:s,left:o,height:r,width:a}=this._root.getBoundingClientRect();return this._ranger.present(this.vertical?(e-s)/r:(t-o)/a)}_handleMousedownRoot(t){const e=this._computeValue(t),s=this.range?this.rangeValue.reduce(((t,s,o)=>Math.abs(e-s)<Math.abs(e-this.rangeValue[t])?o:t),0):0,o=this.createSetValue(s);o(e),this.createMousedownListener(o)(t),this.focusHandle(s)}createMousedownListener(t){return e=>{e.preventDefault(),e.stopPropagation();const s=this.createMousemoveListener(t);this.events.add(document,"mousemove",s);const o=()=>{this.events.remove(document,"mousemove",s),this.events.remove(document,"mouseup",o)};this.events.add(document,"mouseup",o)}}createMousemoveListener(t){return e=>{const s=this._computeValue(e);s===this._ranger.restrict(s)&&t?.call(this,s)}}_connectedInit(){this._ranger=new Ranger(this.min,this.max,this.step);const t=this._ranger.diff;this.step||=t/100,e(this.value)&&(e(this.default)?this.value=Math.round(t/2/this.step)*this.step:this.value=this.default),this.default??=this.value}reset(){this.value=this.default}sort(){return this.value=this.toSorted()}toSorted(){return this.range?[...this.value].sort(((t,e)=>t-e)):this.value}};t([Tt({type:Number})],Ni.prototype,"min",void 0),t([Tt({type:Number})],Ni.prototype,"max",void 0),t([Tt({type:Number})],Ni.prototype,"step",void 0),t([Tt({type:Boolean,reflect:!0})],Ni.prototype,"vertical",void 0),t([Tt({type:Array})],Ni.prototype,"value",void 0),t([Tt({type:Array})],Ni.prototype,"default",void 0),t([It("root")],Ni.prototype,"_root",void 0),t([Bt("[part=handle]")],Ni.prototype,"_handles",void 0),t([Mt()],Ni.prototype,"lastFocus",void 0),Ni=t([At(Ti),Ct(f`:host{${Mi}--track-width:.5em;${Mi}--handle-scale:1;${Mi}--track-background:var(${ie.active});background:var(${ie.passive});display:block;height:var(${Mi}--track-width);width:100%}:host([contents]) [part=root]{width:inherit}:host([vertical]){height:100%;width:-moz-fit-content;width:fit-content}[part=root]{position:relative;--from:0%;--to:50%}[part=root],[part=track]{border-radius:inherit;min-height:inherit}[part=track]{background:var(${Mi}--track-background);height:100%;justify-content:space-between;left:min(var(--from),var(--to));pointer-events:none;width:max(calc(var(--to) - var(--from)),calc(var(--from) - var(--to)))}[part=track],[part~=handle]{display:flex;position:absolute}[part~=handle]{align-items:center;background:var(${ie.background});border:.1em solid;border-radius:50%;height:1em;justify-content:center;outline:0;transform:scale(var(${Mi}--handle-scale)) translate(-50%,-25%);transform-origin:0 25%;-webkit-user-select:none;user-select:none;width:1em}`,f`[vertical]{height:inherit;width:var(${Mi}--track-width)}[vertical] i{transform:translate(-25%,-50%)}[vertical] [part=track]{height:max(calc(var(--to) - var(--from)),calc(var(--from) - var(--to)));left:0;top:min(var(--from),var(--to));width:100%}`,f`[part~=handle]{left:var(--handle);top:0}[vertical] [part~=handle]{left:0;top:var(--handle)}`)],Ni);var Pi=Ni;Pi.define();const Oi="rotate",Bi=ee(Oi);let Ii=class Rotate extends GlobalStyle{render(){return at`<div part="root"> <div part="slot" @mousemove="${this._handleRotate}"> ${Gt()} </div> <i @mouseleave="${this.reset}"></i> </div>`}reset(){this._root.style.removeProperty("transform"),this._root.style.removeProperty("transition")}_handleRotate(t){const{rotateX:e,rotateY:s}=this._computeOffset(t);this._root.style.setProperty("transform",`rotateX(${e}rad) rotateY(${s}rad)`),this._root.style.setProperty("transition","0s")}_computeOffset(t){const{left:e,top:s,width:o,height:r}=this._root.getBoundingClientRect(),{clientX:a,clientY:l}=t;return{rotateX:-(l-s-r/2)/r/2,rotateY:(a-e-o/2)/o/2}}};t([It("root")],Ii.prototype,"_root",void 0),Ii=t([At(Oi),Ct(f`:host{display:block;transition:all .5s ease-in-out;width:-moz-fit-content;width:fit-content;${Bi}--offset:.5em}div{position:relative;transition:inherit;transition-property:transform}i{box-sizing:content-box;height:100%;margin:calc(var(${Bi}--offset)*-1);padding:var(${Bi}--offset);position:absolute;top:0;width:100%}[part=slot]{z-index:2}`)],Ii);var zi=Ii;zi.define(),si.define();const Di=mi((()=>CSS.supports("position-area:top")));function Ui(t,e){if(t){const s="selected";e?t.setAttribute(s,""):t.removeAttribute(s)}}let ji=class Select extends ui{constructor(){super(...arguments),this.multiple=!1,this.noEdit=!1,this.values=[],this.optionsVisible=!1}render(){const t=this.noEdit||this.disabled;return at`<label part="root" ${Ht(this.observedRecord)}> ${[this._renderPrefix(),this.noEdit?at`<input style="position: absolute;inset: 0;opacity: 0;"/>`:"",at`<input part="input" .value="${this.text}" ?autofocus="${this.autofocus}" ?disabled="${t}" autocapitalize="${this.autocapitalize||dt}" autocomplete="${this.autocomplete||dt}" placeholder="${this.placeholder||dt}" @input="${t?null:this._handleInput}" @change="${t?null:this._handleChange}"/>`,this._renderSuffix()]} <div part="popover" popover="${Di()?"manual":dt}"> ${Gt()} </div> </label>`}_renderSuffix(){return at`<i part="suffix">${Gt("suffix",Oe())}</i>`}firstUpdated(){this.events.add(this._slot,"click",(t=>{const{target:e}=t;if("OPTION"!==e.tagName)return;t.preventDefault();const{label:s,value:o}=e,r=this.select(o,s);this.multiple||(Ui(this.lastChecked,0),this.hideOptions()),Ui(e,r),this.lastChecked=e}))}_connectedInit(){this.default=this.value??="",this.defaultText=this.text??="",this.events.add(this,"focus",this.showOptions)}reset(){this.value=this.default,this.text=this.defaultText}select(t,e){e||=t;let s=0;const o=this.values.findIndex((e=>e.value===t));return o>-1?this.values.splice(o,1):(this.values.push({value:t,label:e}),s=1),this.checkValues(),this.value=this.values.map((t=>t.value)).join(","),this.text=this.values.map((t=>t.label)).join(", "),this.dispatchCustomEvent("select",this.value),s}checkValues(){!this.multiple&&this.values.length>1&&(this.values.splice(0,this.values.length-1),this.requestUpdate())}showOptions(){if(this.optionsVisible)return;xi(this._popover);const t=e=>{this.contains(e.target)||(this.hideOptions(),this.events.remove(document,"click",t))};this.events.add(document,"click",t),this.optionsVisible=!0}hideOptions(){this.optionsVisible&&(_i(this._popover),this.optionsVisible=!1)}focus(t){super.focus(),this._input.focus(t),this.showOptions()}blur(){super.blur(),this._input.blur(),_i(this._popover)}};t([Tt()],ji.prototype,"text",void 0),t([Tt({type:Boolean})],ji.prototype,"multiple",void 0),t([Tt({type:Boolean})],ji.prototype,"noEdit",void 0),t([Tt({type:Array})],ji.prototype,"values",void 0),t([It("popover")],ji.prototype,"_popover",void 0),ji=t([At("select"),Ct(f`[part=root]{position:relative;anchor-name:--select}label{display:contents}[part=popover]{background:none;border:0;width:100%;position-anchor:--select;position-area:bottom center;position-try-fallbacks:flip-block}[part=input]{text-overflow:ellipsis}@supports not (position-area:top){[part=popover]{display:none;left:0;position:absolute;top:100%}}`)],ji);var Vi=ji;Vi.define();const Hi="skeleton",Li=ee(Hi);let Gi=class Skeleton extends GlobalStyle{constructor(){super(...arguments),this.loading=!0}render(){return this.loading?at`<div part="root">${Gt("loading")}</div>`:Gt()}};t([Mt()],Gi.prototype,"loading",void 0),Gi=t([At(Hi),Ct(f`:host{${Li}--from:var(${ie.background});${Li}--to:var(${ie.passive});${Li}--deg:95deg;${Li}--duration:2s;animation:_ var(${Li}--duration) ease-in-out infinite none running;background-color:transparent;background-image:linear-gradient(var(${Li}--deg),var(${Li}--from) 36%,var(${Li}--to) 50%,var(${Li}--from) 64%);background-size:200% 100%;flex-shrink:0;height:2em;overflow:hidden;width:100%}@keyframes _{0%{background-position:150%}to{background-position:-50%}}[part=root]{display:contents}:host,:host([contents]) [part=root]{display:block}`)],Gi);var Fi=Gi;Fi.define();const Wi="split",qi=ee(Wi);let Yi=class Split extends ci{constructor(){super(),this.len=6,this.index=-1,this.current=-1,this.currentValue=[],new StyleController(this,(()=>new RingBuilder({selector:"[part=input-box]",type:this.ringType}).css))}get observedRecord(){return a(super.observedRecord,ne)}render(){return at`<div part="root" ${Ht(this.observedRecord)}> ${qt(this.len,(t=>at`<span part="input-box" ring-type="${this.ringType}" class="${jt({focus:this.current===t})}" @click="${this.disabled?null:()=>this.focusAt(t)}"> ${this.currentValue[t]} </span>`))} <input part="input" @blur=${this.blur} @input="${this._handleInput}" @change="${this._handleChange}" .value="${this.value.padStart(this.len," ")}"/> </div>`}connectedCallback(){super.connectedCallback(),this.reset()}_handleInput(t){t.stopPropagation(),this.compositing||(this.fillInput(t.data),this.value=this.currentValue.join(""),this.dispatchCustomEvent("input",this.value,{bubbles:!0}))}fillInput(t){if(null===t){if(null!==this.currentValue[this.current])this.currentValue[this.current]=null;else{this.currentValue[this.current-1]=null;const t=this.currentValue.findLastIndex((t=>null!==t));this.current=this.current-1<0?t<0?0:t:this.current-1}return}const e=t.length>1;if(this.currentValue[this.current]=t[0],this.current+1>=this.len?(this.current=this.currentValue.indexOf(null),-1===this.current&&this.blur()):this.current+=1,e){const e=t.slice(1);e&&this.fillInput(e)}}focus(){this.focusAt(this.current),super.focus()}focusAt(t){this.current=t,this._input.focus()}blur(){this._input.blur(),this.current=-1,super.blur()}reset(){this.current=-1,this.value=this.default,this.currentValue=this.value.split("").concat(Array(this.len-this.value.length).fill(null)),this.index>-1&&(this.current=this.index)}};t([Tt({type:Number})],Yi.prototype,"len",void 0),t([Tt({type:Number})],Yi.prototype,"index",void 0),t([Mt()],Yi.prototype,"current",void 0),t([Mt()],Yi.prototype,"currentValue",void 0),Yi=t([At(Wi),Ct(f`:host{border-radius:.1em;display:block;width:-moz-fit-content;width:fit-content;${qi}--size:2em;${qi}--gap:.25em}[part=root]{display:flex;gap:var(${qi}--gap);justify-content:space-between;position:relative}[part=input-box],[part=root]{border-radius:inherit;vertical-align:top}[part=input-box]{align-items:center;display:inline-flex;height:var(${qi}--size);justify-content:center;width:var(${qi}--size)}[part=input]{background:none;height:100%;opacity:0;position:absolute;width:100%;z-index:-1}.focus,[part=input-box]:active{${ie.ringColor}:var(${ie.active})}`)],Yi);var Xi=Yi;Xi.define();const Zi="switch",Ki=ee(Zi);let Qi=class Switch extends ci{constructor(){super(...arguments),this.default=!1,this.value=!1}set checked(t){this.value=t}get checked(){return this.value}get observedRecord(){return a(super.observedRecord,ne)}render(){return at`<div part="root" ${Ht(this.observedRecord)} class="round"> <input part="input" type="checkbox" ?disabled="${this.disabled}" ?checked="${this.value}" @change="${this._handleChange}"/> <span part="handle"></span> </div>`}reset(){this.value=this.default,this._input.checked=this.value}_connectedInit(){this.default?this.value=!0:this.value&&(this.value=!0,this.default=!0)}_handleChange(){const{checked:t}=this._input;this.value=t,this.dispatchCustomEvent("change",this.value)}};t([Tt({type:Boolean})],Qi.prototype,"default",void 0),t([Tt({type:Boolean,attribute:"checked",reflect:!0})],Qi.prototype,"value",void 0),Qi=t([At(Zi),Ct(f`:host,:host([contents]) [part=root]{display:inline-block}:host{${Ki}-width:3em;${Ki}-height:calc(var(${Ki}-width)/2);${Ki}-handle-size:1.25em;${Ki}-handle-space:calc(var(${Ki}-width)/4 - var(${Ki}-handle-size)/2);background:var(${ie.passive});border-radius:calc(var(${Ki}-height)/2);height:var(${Ki}-height);transition:.2s ease-in-out;transition-property:background,left;vertical-align:bottom;width:var(${Ki}-width)}:host([checked]){background:var(${ie.active})}[part=root]{position:relative}[part=handle],[part=root]{align-items:center;display:flex;transition:inherit}[part=handle]{background:var(${ie.background});border-radius:100%;height:var(${Ki}-handle-size);justify-content:center;left:0;pointer-events:none;position:absolute;top:50%;transform:translateY(-50%) translateX(var(${Ki}-handle-space));width:var(${Ki}-handle-size)}:host([checked]) [part=handle]{left:50%}[part=input]{height:100%;opacity:0;width:100%}`)],Qi);var Ji=Qi;Ji.define();let ts=class Text extends GlobalStyle{constructor(){super(...arguments),this.underline="none",this.nowrap=!1,this.italic=!1,this.truncate=!1,this.clip=!1}render(){return at`<p part="root">${Gt()}</p>`}};t([Tt({converter:{fromAttribute:t=>""===t||t,toAttribute:t=>!1===t?null:!0===t?"":t},reflect:!0})],ts.prototype,"underline",void 0),t([Tt({type:Boolean,reflect:!0})],ts.prototype,"nowrap",void 0),t([Tt({type:Boolean,reflect:!0})],ts.prototype,"italic",void 0),t([Tt({type:Boolean,reflect:!0})],ts.prototype,"truncate",void 0),t([Tt({type:Boolean,reflect:!0})],ts.prototype,"clip",void 0),ts=t([At("text"),Ct(f`:host([clip]){background:var(${ie.backgroundClip});color:transparent;display:inline-block;-webkit-text-fill-color:transparent;background-clip:text;-webkit-background-clip:text}:host([nowrap]){white-space:nowrap}:host([italic]){font-style:italic}:host([truncate]),:host([truncate]) ::slotted(*){max-width:100%;overflow:hidden;text-overflow:ellipsis}:host([strikethrough]){text-decoration:line-through}:host(:active[underline=active]),:host(:focus[underline=focus]),:host(:hover[underline=hover]),:host([underline=""]),:host([underline=always]){text-decoration:underline}`)],ts);var es=ts;es.define();const is="tabs",ss=ee(is),os="hover";let rs=class Tabs extends GlobalStyle{constructor(){super(),this.ringType="border",this.beginning="selected",this.indicator="background",this.index=0,new StyleController(this,(()=>new RingBuilder({type:this.ringType}).css))}render(){return at`<ul part="root" ${Ht(this.observedRecord)} @mouseleave="${this._handleMouseLeave}"> ${this.tabs?.map(((t,e)=>at`<li part="${jt("item",this.index===e&&"selected")}" @mouseenter=${()=>{this.move(this.previousIndex,e),this.previousIndex=e}} @click=${()=>this.select(e)}> ${Gt(t,t)} <div part="indicator"></div> </li>`))} </ul>`}connectedCallback(){super.connectedCallback(),this.previousIndex="selected"===this.beginning?this.index:-1}_handleMouseLeave(){const t=this._items[this.previousIndex];t&&t.part.remove(os),this.previousIndex="selected"===this.beginning?this.index:-1}move(t,e){if(t===e)return;const{_items:s,_indicators:o}=this,r=s[e];if(!r)return;r.part.add(os);const a=s[t];if(!a)return;if(a.part.remove(os),"none"===this.beginning)return;const l=o[e],h=o[t];if(!l||!h)return;const{x:d,y:c,width:p}=h.getBoundingClientRect(),{x:u,y:v}=l.getBoundingClientRect(),f=d-u,m=c-v,{style:g}=l,{style:$}=h;g.transform=`translate3d(${f}px,${m}px,0)`,g.width=`${p}px`,g.transition=$.transition="none",l.getBoundingClientRect(),g.width=g.transform=g.transition=$.transition=""}select(t){const{index:e,previousIndex:s}=this;this.move(s,t),t!==e&&(this.previousIndex=t,this.index=t,this.dispatchCustomEvent("select",t))}};t([Tt({attribute:ne})],rs.prototype,"ringType",void 0),t([Tt()],rs.prototype,"beginning",void 0),t([Tt()],rs.prototype,"indicator",void 0),t([Tt({type:Array})],rs.prototype,"tabs",void 0),t([Tt({type:Number})],rs.prototype,"index",void 0),t([Bt("[part~=item]")],rs.prototype,"_items",void 0),t([Bt("[part=indicator]")],rs.prototype,"_indicators",void 0),rs=t([At(is),Ct(f`:host{${ss}--indicator-background:var(${ie.passive});${ss}--selected-background:var(${ie.passive});cursor:default;display:flex;transition:.2s ease-in-out}[part=root]{border-radius:inherit;display:flex;flex-direction:inherit;gap:.25em;overflow-x:clip;padding:.25em;position:relative;transition:inherit;transition-property:width,transform,opacity;z-index:1}[part~=item]{display:block;position:relative;text-align:center;white-space:nowrap}[part=indicator],[part~=item],[part~=item]:after{border-radius:inherit;transition:inherit;transition-property:inherit;width:100%}[part=indicator],[part~=item]:after{background:var(${ss}--indicator-background);height:100%;inset:0;position:absolute}[part=indicator]{opacity:0;z-index:-1}[part~=item]:after{z-index:-2}[indicator=underline] [part=indicator],[indicator=underline] [part~=item]:after{border-radius:.075em;height:.15em;margin-top:.15em;top:100%}[part~=selected]:after{background:var(${ss}--selected-background);content:""}[part~=hover] [part=indicator]{opacity:1}`)],rs);var ns=rs;function as(t,e=2){return t.toString().padStart(e,"0").split("")}ns.define();let ls=class Time extends es{constructor(){super(...arguments),this.escape="%",this.format="YYYY-MM-DD hh:mm:ss",this.time=new Date}render(){return at`<p part="root">${function(t,e=new Date,s="%"){var o;if(!t)return t;if(isNaN(e.getTime()))return;const r=`${s}${s}`,a=[];t=t.replace(new RegExp(`${s}([ZYMDhmsS${s}])`,"g"),((t,e)=>(a.push(e),r)));const l=e.getTimezoneOffset()/-60,h={Z:[l>=0?"+"+l.toString():l.toString()],Y:e.getFullYear().toString().split(""),M:as(e.getMonth()+1),D:as(e.getDate()),h:as(e.getHours()),m:as(e.getMinutes()),s:as(e.getSeconds()),S:as(e.getMilliseconds(),3)},d=[];for(const e of t.split("").reverse()){const t=null===(o=h[e])||void 0===o?void 0:o.pop();t?d.push(t):d.push(e)}return d.reverse().join("").replace(new RegExp(r,"g"),(()=>a.shift()))}(this.format,this.time,this.escape)}</p>`}updated(t){t.has("timeout")&&this.timeout&&(this.timeouts.remove(this.timeoutId),this.timeoutId=this.timeouts.add(setInterval((()=>{this.dispatchCustomEvent("time",this.time),this.time=new Date(this.time.getTime()+(this.gap||this.timeout))}),Math.abs(this.timeout))))}};t([Tt()],ls.prototype,"escape",void 0),t([Tt()],ls.prototype,"format",void 0),t([Tt({type:Object})],ls.prototype,"time",void 0),t([Tt({type:Number})],ls.prototype,"timeout",void 0),t([Tt({type:Number})],ls.prototype,"gap",void 0),ls=t([At("time")],ls);var hs=ls;hs.define();let ds=class Tooltip extends Ci{constructor(){super(...arguments),this.delay=300}render(){return at`<div part="root"> <div part="trigger" @click=${this.hide}> ${Gt()} </div> <div part="popover" popover="manual"> ${Gt("tip",this.tip)} </div> </div>`}connectedCallback(){super.connectedCallback(),this.events.add(this,"mouseenter",(()=>{clearTimeout(this._leaveTimeout),this._hoverTimeout=setTimeout((()=>{this.show()}),this.delay)})),this.events.add(this,"mouseleave",(()=>{clearTimeout(this._hoverTimeout),this._leaveTimeout=setTimeout((()=>{this.hide()}),this.delay)}))}};t([Tt()],ds.prototype,"tip",void 0),t([Tt({type:Number})],ds.prototype,"delay",void 0),ds=t([At("tooltip")],ds);var cs=ds;cs.define();const ps="typewriter",us=ee(ps);let vs=class Typewriter extends GlobalStyle{constructor(){super(...arguments),this.content="",this.ended=!1,this.max=100,this.min=50,this.delay=0,this.index=0,this.contentInternal=""}get len(){return this.content.length}render(){return at`<div part="root" ${Ht(this.observedRecord)}> ${Gt()} ${this.contentInternal} <i part="cursor" ?hidden="${this.ended}"></i> </div>`}connectedCallback(){super.connectedCallback(),this._ranger=new Ranger(this.min,this.max)}firstUpdated(){this.content||=this._slot?.assignedNodes()[0]?.textContent.trim()||"",!this.ended&&this.len&&this.write()}updated(t){t.has("index")&&this.dispatchCustomEvent(this.index===this.len?"done":"write",this.contentInternal)}write(t=this.index){this.contentInternal=this.content.slice(0,t+1);const e=this.delay||this._ranger.random();this.timeoutID=this.timeouts.add(setTimeout((()=>{const e=t+1;e<=this.len&&(this.index=e,this.write())}),e))}stop(){clearTimeout(this.timeoutID)}end(){this.ended=!0}};t([Tt()],vs.prototype,"content",void 0),t([Tt({type:Boolean})],vs.prototype,"ended",void 0),t([Tt({type:Number})],vs.prototype,"max",void 0),t([Tt({type:Number})],vs.prototype,"min",void 0),t([Tt({type:Number})],vs.prototype,"delay",void 0),t([Tt({type:Number})],vs.prototype,"index",void 0),t([Mt()],vs.prototype,"contentInternal",void 0),t([Pt("i")],vs.prototype,"_i",void 0),vs=t([At(ps),Ct(f`:host{${us}--cursor-width:.05em}:host,:host([contents]) [part=root]{display:inline-block}i{animation:s 1.5s steps(1) infinite;border-right:var(${us}--cursor-width) solid;margin-left:.02em}@keyframes s{0%{border-color:currentColor}50%{border-color:transparent}}slot{display:none}`)],vs);var fs=vs;fs.define();export{le as Alert,de as Avatar,me as Badge,_e as Breath,ve as Button,ke as Card,Ee as Carousel,Pe as Chip,De as Details,He as Dialog,Ge as Divider,We as Dragbox,Xe as Flex,Ke as Form,ei as Grid,li as Heading,ui as Input,fi as Layout,ni as Link,Ai as Popover,Ei as Progress,Pi as Range,zi as Rotate,si as Router,Vi as Select,Fi as Skeleton,Xi as Split,Ji as Switch,ns as Tabs,es as Text,hs as Time,cs as Tooltip,fs as Typewriter};
58
58
  //# sourceMappingURL=godown+lit.js.map