const V=[];function E(){return window.matchMedia("(pointer: coarse)").matches}function ut(){return window.matchMedia("(prefers-color-scheme: dark)").matches}async function W(t){await new Promise(n=>setTimeout(n,t))}function lt(){return"fxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const n=Math.random()*16|0;return(t==="x"?n:n&3|8).toString(16)})}function x(t,n){try{return typeof t=="string"?(n??document).querySelector(t):t}catch{return null}}function s(t,n){try{return typeof t=="string"?(n??document).querySelectorAll(t):t??V}catch{return V}}function a(t,n){return(t==null?void 0:t.classList.contains(n))??!1}function p(t,n){var e;return((e=t==null?void 0:t.tagName)==null?void 0:e.toLowerCase())===n}function C(t,n){var e;return((e=t==null?void 0:t.type)==null?void 0:e.toLowerCase())===n}function y(t,n){if(t instanceof NodeList)for(let e=0;e label");for(let n=0;n input:not([type=file], [type=color], [type=range])");for(let n=0;n select");for(let n=0;n input[type=file]");for(let n=0;n input[type=color]");for(let n=0;n textarea");for(let n=0;ni.name).join(", "):"",e.readOnly=!0,o(e,"keydown",kt,!1),w(e))}function B(t,n){if((n==null?void 0:n.key)==="Enter"){const i=O(t);if(!C(i,"color"))return;i.click();return}const e=N(t);C(e,"text")&&(e.readOnly=!0,e.value=t.value,o(e,"keydown",xt,!1),w(e))}function Q(t){G(t);const n=b(t);n.removeAttribute("style"),a(n,"min")&&n.style.setProperty("---size",`${Math.max(t.scrollHeight,n.offsetHeight)}px`)}function St(){Tt(),Ct(),wt(),Lt(),At(),Et()}function H(t){const n=t.target;!p(n,"input")&&!p(n,"select")||(n.type==="range"?(n.focus(),Y(n)):X())}function Dt(t){if(!E())return;const n=t.target,e=b(n);a(e,"vertical")&&document.body.classList.add("no-scroll")}function Mt(t){if(!E())return;const n=t.target,e=b(n);a(e,"vertical")&&document.body.classList.remove("no-scroll")}function X(){const t=document.body,n=s(".slider > input[type=range]");n.length?o(t,"input",H,!1):F(t,"input",H,!1);for(let e=0;e1&&(g=Math.abs(r[1]-r[0]),h=r[1]>r[0]?r[0]:r[1],L=100-h-g,m>k&&(k=d[1]||0,m=d[0])),n.style.setProperty("---start",`${h}%`),n.style.setProperty("---end",`${L}%`),n.style.setProperty("---value1",`'${k}'`),n.style.setProperty("---value2",`'${m}'`)}function It(){X()}const l={light:"",dark:""};function I(){var t;return(t=document==null?void 0:document.body)!=null&&t.classList.contains("dark")?"dark":"light"}function Pt(){if(l.light&&l.dark)return l;const t=document.body,n=document.createElement("body");n.className="light",t.appendChild(n);const e=document.createElement("body");e.className="dark",t.appendChild(e);const i=getComputedStyle(n),u=getComputedStyle(e),c=["--primary","--on-primary","--primary-container","--on-primary-container","--secondary","--on-secondary","--secondary-container","--on-secondary-container","--tertiary","--on-tertiary","--tertiary-container","--on-tertiary-container","--error","--on-error","--error-container","--on-error-container","--background","--on-background","--surface","--on-surface","--surface-variant","--on-surface-variant","--outline","--outline-variant","--shadow","--scrim","--inverse-surface","--inverse-on-surface","--inverse-primary","--surface-dim","--surface-bright","--surface-container-lowest","--surface-container-low","--surface-container","--surface-container-high","--surface-container-highest"];for(let r=0,d=c.length;r{const c=r=>{let d="";for(let g=0,h=Object.keys(r),L=h.length;g{const n=x(".field > input",t);n?n.focus():t.focus()},90)}function ot(t,n,e){S&&clearTimeout(S),S=setTimeout(()=>{o(document.body,"click",it),p(document.activeElement,"input")||_();const i=a(n,"active"),u=(e==null?void 0:e.target)===t,c=!!t.closest("menu");if(!i&&c||i&&u){f(n,"active");return}f(s("menu.active"),"active"),y(n,"active"),_t(n)},90)}let T;function $t(t){const n=t.currentTarget;f(n,"active"),T&&clearTimeout(T)}function qt(t,n){_();const e=s(".snackbar.active");for(let i=0;i{f(t,"active")},n??6e3))}function zt(t){const n=b(t);n&&f(s(".page",n),"active"),y(t,"active")}let D,M;function Z(){D&&clearTimeout(D),D=setTimeout(async()=>await P(),180)}async function K(t,n,e,i){if(!(!n&&(n=x(t.getAttribute("data-ui")),!n))){if(gt(t),p(n,"dialog")){await et(t,n);return}if(p(n,"menu")){ot(t,n,i);return}if(a(n,"snackbar")){qt(n,e);return}if(a(n,"page")){zt(n);return}if(a(n,"active")){f(t,"active"),f(n,"active");return}y(n,"active")}}function Bt(t){K(t.currentTarget,null,null,t)}function Kt(t){t.key==="Enter"&&K(t.currentTarget,null,null,t)}function rt(){M||(M=new MutationObserver(Z),M.observe(document.body,{childList:!0,subtree:!0}),Z())}function Rt(){const t=s("[data-ui]");for(let n=0,e=t.length;n