const V=[];function S(){return window.matchMedia("(pointer: coarse)").matches}function lt(){return window.matchMedia("(prefers-color-scheme: dark)").matches}async function W(t){await new Promise(n=>setTimeout(n,t))}function ft(){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 h(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 u(t,n){return(t==null?void 0:t.classList.contains(n))??!1}function y(t,n){var e;return((e=t==null?void 0:t.tagName)==null?void 0:e.toLowerCase())===n}function T(t,n){var e;return((e=t==null?void 0:t.type)==null?void 0:e.toLowerCase())===n}function g(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),L(e))}function q(t,n){if((n==null?void 0:n.key)==="Enter"){const i=O(t);if(!T(i,"color"))return;i.click();return}const e=$(t);T(e,"text")&&(e.readOnly=!0,e.value=t.value,o(e,"keydown",mt,!1),L(e))}function Y(t){X(t);const n=v(t);n.removeAttribute("style"),u(n,"min")&&n.style.setProperty("---size",`${Math.min(192,Math.max(t.scrollHeight,n.offsetHeight))}px`)}function Mt(){Tt(),Lt(),At(),Et(),St(),Dt(),It()}function H(t){const n=t.target;!y(n,"input")&&!y(n,"select")||(n.type==="range"?(n.focus(),Q(n)):G())}function Pt(t){if(!S())return;const n=t.target,e=v(n);u(e,"vertical")&&document.body.classList.add("no-scroll")}function Ft(t){if(!S())return;const n=t.target,e=v(n);u(e,"vertical")&&document.body.classList.remove("no-scroll")}function G(){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&&(f=Math.abs(r[1]-r[0]),b=r[1]>r[0]?r[0]:r[1],A=100-b-f,m>k&&(k=l[1]||0,m=l[0])),n.style.setProperty("---start",`${b}%`),n.style.setProperty("---end",`${A}%`),n.style.setProperty("---value1",`'${k}'`),n.style.setProperty("---value2",`'${m}'`)}function $t(){G()}const d={light:"",dark:""};function P(){var t;return(t=document==null?void 0:document.body)!=null&&t.classList.contains("dark")?"dark":"light"}function _t(){if(d.light&&d.dark)return d;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),a=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,l=c.length;r{const c=r=>{let l="";for(let f=0,b=Object.keys(r),A=b.length;f{const n=h(".field > input",t);n?n.focus():t.focus()},90)}function ot(t,n,e){D&&clearTimeout(D),D=setTimeout(()=>{o(document.body,"click",it),y(document.activeElement,"input")||_();const i=u(n,"active"),a=(e==null?void 0:e.target)===t,c=!!t.closest("menu");if(!i&&c||i&&a){p(n,"active");return}p(s("menu.active"),"active"),g(n,"active"),Bt(n)},90)}let w;function jt(t){const n=t.currentTarget;p(n,"active"),w&&clearTimeout(w)}function Kt(t,n){_();const e=s(".snackbar.active");for(let i=0;i{p(t,"active")},n??6e3))}function Ut(t){const n=v(t);n&&p(s(":scope > .page",n),"active"),g(t,"active")}function Vt(t){Ht(t)}function Ht(t){const n=t.currentTarget,e=n.getBoundingClientRect(),i=Math.max(e.width,e.height),a=i/2,c=t.clientX-e.left-a,r=t.clientY-e.top-a,l=document.createElement("div");l.className="ripple-js";const f=document.createElement("div");f.style.inlineSize=f.style.blockSize=`${i}px`,f.style.left=`${c}px`,f.style.top=`${r}px`,f.addEventListener("animationend",()=>{l.remove()}),l.appendChild(f),n.appendChild(l)}function Zt(){const t=s(".slow-ripple, .ripple, .fast-ripple");for(let n=0;nawait ct(),180)}async function B(t,n,e,i){if(!(!n&&(n=h(t.getAttribute("data-ui")),!n))){if(ht(t),y(n,"dialog")){await et(t,n);return}if(y(n,"menu")){ot(t,n,i);return}if(u(n,"snackbar")){Kt(n,e);return}if(u(n,"page")){Ut(n);return}if(u(n,"active")){p(t,"active"),p(n,"active");return}g(n,"active")}}function Wt(t){B(t.currentTarget,null,null,t)}function Xt(t){t.key==="Enter"&&B(t.currentTarget,null,null,t)}function rt(){C.ui||M||(M=new MutationObserver(Z),M.observe(document.body,{childList:!0,subtree:!0}),Z())}function Yt(){const t=s("[data-ui]");for(let n=0,e=t.length;n