const Z=[],H=new WeakSet,M=navigator.userAgent.includes("Chrome");navigator.userAgent.includes("Firefox");navigator.userAgent.includes("Safari");navigator.userAgent.includes("Windows");const Q=navigator.userAgent.includes("Macintosh");navigator.userAgent.includes("Linux");navigator.userAgent.includes("Android");const J=/iPad|iPhone|iPod/.test(navigator.userAgent);function kt(){return window==null?void 0:window.matchMedia("(prefers-color-scheme: dark)").matches}async function tt(t){await new Promise(n=>setTimeout(n,t))}function xt(){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 v(t,n){try{return typeof t=="string"?(n??document).querySelector(t):t}catch{return null}}function c(t,n){try{return typeof t=="string"?(n??document).querySelectorAll(t):t??Z}catch{return Z}}function u(t,n){return(t==null?void 0:t.classList.contains(n))??!1}function g(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 h(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;n input[type=password]) > i, a");for(let n=0;ni.name).join(", "):"",e.readOnly=!0,a(e,"keydown",Mt,!1),L(e))}function W(t,n){if((n==null?void 0:n.key)==="Enter"){const i=q(t);if(!C(i,"color"))return;i.click();return}const e=O(t);C(e,"text")&&(e.readOnly=!0,e.value=t.value,a(e,"keydown",Dt,!1),L(e))}function et(t){if(z(t),t.hasAttribute("rows"))return;const n=nt();t.style.blockSize="auto",t.style.blockSize=`${t.scrollHeight-n}px`}function Kt(){Pt(),qt(),Ot(),$t(),zt(),Nt(),Rt()}function X(t){const n=t.target;!g(n,"input")&&!g(n,"select")||(n.type==="range"?(n.focus(),ot(n)):it())}function Wt(t){if(!window.matchMedia("(pointer: coarse)").matches)return;t.target.blur()}function it(){const t=document.body,n=c(".slider > input[type=range]");n.length?T(t,"input",X,!1):D(t,"input",X,!1);for(let e=0;e1&&(y=Math.abs(o[1]-o[0]),d=o[1]>o[0]?o[0]:o[1],k=100-d-y,m>x&&(x=f[1]||0,m=f[0])),requestAnimationFrame(()=>n.style.cssText=`--_start: ${d}%; --_end: ${k}%; --_value1: '${x}'; --_value2: '${m}';`)}function jt(){it()}const l={light:"",dark:""};function I(){var t;return(t=document==null?void 0:document.body)!=null&&t.classList.contains("dark")?"dark":"light"}function Bt(){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),s=getComputedStyle(e),r=["--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 o=0,f=r.length;o{const s=r=>{let o="";for(let f=0,y=Object.keys(r),d=y.length;f{const n=v(".field > input",t);n?n.focus():t.focus()},90)}function lt(t,n,e){_&&clearTimeout(_),_=setTimeout(()=>{T(document.body,"click",ut),g(document.activeElement,"input")||$();const i=u(n,"active"),s=(e==null?void 0:e.target)===t,r=!!t.closest("menu");if(!i&&r||i&&s){p(n,"active");return}p(c("menu.active"),"active"),h(n,"active"),Xt(n)},90)}let w;function Yt(t){const n=t.currentTarget;p(n,"active"),w&&clearTimeout(w)}function Gt(t,n){$();const e=c(".snackbar.active");for(let i=0;i{p(t,"active")},n??6e3))}function Qt(t){const n=E(t);n&&p(c(":scope > .page",n),"active"),h(t,"active")}function Jt(t){ft(t)}function tn(t){(t==null?void 0:t.key)===" "&&ft(t)}function ft(t){const n=t instanceof MouseEvent,e=t.currentTarget,i=e.getBoundingClientRect(),s=Math.max(i.width,i.height),r=s/2,o=n?t.clientX-i.left-r:i.width/2-r,f=n?t.clientY-i.top-r:i.height/2-r,y=document.createElement("div");y.className="ripple-js";const d=document.createElement("div");d.style.inlineSize=d.style.blockSize=`${s}px`,d.style.left=`${o}px`,d.style.top=`${f}px`,a(d,"animationend",()=>{y.remove()}),y.appendChild(d),e.appendChild(y)}function nn(){const t=c(".slow-ripple, .ripple, .fast-ripple");for(let n=0;n{if(!t.hasAttribute("value")&&!t.hasAttribute("max")){const n=u(t,"circle")?"50":"100";t.style.setProperty("--_value",n),t.setAttribute("value",n),t.setAttribute("max","100"),t.classList.add("indeterminate")}else t.style.setProperty("--_value",String(t.value))})}function pt(){if(M&&!Q&&!J)return;const t=document.body,n=c("progress");n.length?T(t,"input",Y,!1):D(t,"input",Y,!1);for(let e=0;eawait gt(),180)}async function j(t,n,e,i){if(!n&&(n=v(t.getAttribute("data-ui")),!n)){t.classList.toggle("active");return}if(Tt(t),g(n,"dialog")){requestAnimationFrame(()=>st(t,n));return}if(g(n,"menu")){requestAnimationFrame(()=>lt(t,n,i));return}if(u(n,"snackbar")){requestAnimationFrame(()=>Gt(n,e));return}if(u(n,"page")){requestAnimationFrame(()=>Qt(n));return}if(u(n,"active")){p(t,"active"),p(n,"active");return}h(n,"active")}function en(t){j(t.currentTarget,null,null,t)}function on(t){t.key==="Enter"&&j(t.currentTarget,null,null,t)}function yt(){b.ui||P||!b.MutationObserver||(P=new MutationObserver(G),P.observe(document.body,{childList:!0,subtree:!0}),G())}function rn(){const t=c("[data-ui]");for(let n=0,e=t.length;n