const A=[];function W(t){if(t.key==="Escape"){const n=t.currentTarget;Q(n,n)}}function G(t,n){f(bt(t.id),"active"),f(t,"active"),f(n,"active"),t.close(),A.pop();const e=A[A.length-1];e?e.focus():E()&&document.body.classList.remove("no-scroll")}async function st(t,n,e,i){!y(i,"button")&&!c(i,"button")&&!c(i,"chip")&&p(i,"active"),p(n,"active"),p(t,"active"),e?t.showModal():t.show(),await J(90),e||r(t,"keydown",W,!1),A.push(t),t.focus(),E()&&document.body.classList.add("no-scroll")}function ut(t){const n=t.currentTarget,e=N(n);y(e,"dialog")&&G(e,n)}async function Q(t,n){_();let e=O(n);const i=c(n,"active")||n.open,u=c(n,"modal");u||P(n,"keydown",W,!1),c(e,"overlay")||(e=vt({class:"overlay"}),ht(e,n),await J(90)),u||r(e,"click",ut,!1),i?G(n,e):st(n,e,u,t)}let S;function X(t){P(document.body,"click",X);const n=t.target,e=s("menu.active");for(let i=0;i{const n=x(".field > input",t);n?n.focus():t.focus()},90)}function Y(t,n,e){S&&clearTimeout(S),S=setTimeout(()=>{r(document.body,"click",X),y(document.activeElement,"input")||_();const i=c(n,"active"),u=(e==null?void 0:e.target)===t,a=!!t.closest("menu");if(!i&&a||i&&u){f(n,"active");return}f(s("menu.active"),"active"),p(n,"active"),lt(n)},90)}function ft(t){const n=b(t);n&&f(s(".page",n),"active"),p(t,"active")}let T;function dt(t){const n=t.currentTarget;f(n,"active"),T&&clearTimeout(T)}function pt(t,n){_();const e=s(".snackbar.active");for(let i=0;i{f(t,"active")},n??6e3))}const V=[];function E(){return window.matchMedia("(pointer: coarse)").matches}function yt(){return window.matchMedia("(prefers-color-scheme: dark)").matches}async function J(t){await new Promisen=>setTimeout(n,t))}function gt(){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 c(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 C(t,n){var e;return((e=t==null?void 0:t.type)==null?void 0:e.toLowerCase())===n}function p(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,r(e,"keydown",Lt,!1),L(e))}function R(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,r(e,"keydown",wt,!1),L(e))}function tt(t){const n=b(t);n.removeAttribute("style"),c(n,"min")&&n.style.setProperty("---size",`${Math.max(t.scrollHeight,n.offsetHeight)}px`)}function Pt(){Et(),St(),Dt(),Mt(),It(),Ft()}function H(t){const n=t.target;!y(n,"input")&&!y(n,"select")||(n.type==="range"?(n.focus(),et(n)):nt())}function Ot(t){if(!E())return;const n=t.target,e=b(n);c(e,"vertical")&&document.body.classList.add("no-scroll")}function Nt(t){if(!E())return;const n=t.target,e=b(n);c(e,"vertical")&&document.body.classList.remove("no-scroll")}function nt(){const t=document.body,n=s(".slider > input[type=range]");n.length?r(t,"input",H,!1):P(t,"input",H,!1);for(let e=0;e1&&(g=Math.abs(o[1]-o[0]),h=o[1]>o[0]?o[0]:o[1],w=100-h-g,m>k&&(k=d[1]||0,m=d[0])),n.style.setProperty("---start",`${h}%`),n.style.setProperty("---end",`${w}%`),n.style.setProperty("---value1",`'${k}'`),n.style.setProperty("---value2",`'${m}'`)}function _t(){nt()}const l={light:"",dark:""};function I(){var t;return(t=document==null?void 0:document.body)!=null&&t.classList.contains("dark")?"dark":"light"}function $t(){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=getComputedStylen,u=getComputedStyle(e),a=["--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,d=a.length;o{const a=o=>{let d="";for(let g=0,h=Object.keys(o),w=h.length;gawait F(),180)}function zt(t){$(t.currentTarget,null,null,t)}function rt(){M||(M=new MutationObserver(Z),M.observe(document.body,{childList:!0,subtree:!0}),Z())}function Bt(){const t=s("[data-ui]");for(let n=0,e=t.length;n