@tresjs/nuxt 5.6.0 → 5.6.2
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.
- package/README.md +2 -2
- package/dist/client/200.html +1 -1
- package/dist/client/404.html +1 -1
- package/dist/client/_fonts/1cwtVayhkKKATR7F_ifhlQLogUTUbHS3xHnU9ql-K1E-DWpYxga2f4LiCc8DpuBparypbURpDoHLJZL70LNKpyA.woff +0 -0
- package/dist/client/_fonts/1t1o-xriyUEfyi3551RvZXkeBb1yMROn-DpwlBHbUyA-utAKgmWBi6Vt_IPJvcyHPnljVvdxOiFM6n__0tfkQSc.woff +0 -0
- package/dist/client/_fonts/6as6zwPDr4AaXgjh0fSZYjxbWsOay8Xo2wIW8wivSqM-GLxEA1jOTFF_mz6N5QDAS5HX5IKAuyRV7ip0xuGqZts.woff +0 -0
- package/dist/client/_fonts/A1b3lhnteG6A7hTTkt2_9BARIhvgP5_grFnBy1201I8-RUOSq4N6qr47E24eXXu_zYnBS249hPEstArZaEnGEjc.woff +0 -0
- package/dist/client/_fonts/Bo1YvO13V3DbVwJcDOML4fx8wU8CkuqdVBmtg4dB56s-_tXBJUSBLGtGY0T2mljhSbG78q0wL0Pbgza1LnD1mD0.woff +0 -0
- package/dist/client/_fonts/Jtqhy44WKYEjGWTSusP5YJfJv7Wf74QqgkBOI9u_77s-Rl_Bht5SvmaotE20bkavBEAJEEGEa0hcz3d_8yOeXmw.woff +0 -0
- package/dist/client/_fonts/Jz2_acfD_oqut-QwcF37YvFRf5BjWGsFyb8HNT_yWCs-16G9G3z7MFIXvLaOHqfBk5LoEVcoAKUaoZTf8EsRj_Q.woff +0 -0
- package/dist/client/_fonts/QIrMHah7Q1jbm8j1K8rPyKqZTsIPEZ8UIejniG1MbLU-sOiNtzAq0wpowaFSHvWTY8O1KrCuVKEA4lxYl5FhWm0.woff +0 -0
- package/dist/client/_fonts/Qen6kKXoOl3R3jgb-RCpynJeEkuDL6QxKNQxFRactqY-cbUcT37MIzmxspnwnOT_NKvWS8Fd4n9eqT4cZAr_cWA.woff +0 -0
- package/dist/client/_fonts/RUUN-23UGP8yTJV6xaMhEeTm2TLDCA206NGUBPDCQyk-xkhXnPxF1UcF1sQuTpcjj6vj81p3pox8F65G5ndYOYs.woff +0 -0
- package/dist/client/_fonts/Sx4paOH32Zv8AIpZAPtF0G99REJepweLEMn1YSLEyww-kZsFPR68sptaXp7G043hHsKlOqtAEMPwLiwewQEpyCI.woff +0 -0
- package/dist/client/_fonts/V9otYbqKY6bnAlb13bTgTWF7NySzNH6pCzj9fGafB1U-D2xfuJOCDqiNhmjU7kbzE4UPwPhtfnH_s8DBF6x-1bQ.woff +0 -0
- package/dist/client/_fonts/ZHaz3DhCHNWhsElqYfuM71rfBBDgjuU2sd34vaYJwQg-71NZaZSGjxzAGjCMnCc2zS5rS_EGA0xHKPGCggWuXik.woff +0 -0
- package/dist/client/_fonts/ppPcyD9u3AAh0XAJnxi7vJUfx53qxORStdLloFeDOew-yg9zZpRrZit_sUTwUa9zS6y6ilu4ghjvIE_Mw6kE5D8.woff +0 -0
- package/dist/client/_fonts/uTGoASwNPxQoErpawYG8LxDAzXETHa_cYibPEm5a0js-FzPMEutgGN9BPdA0CHFmlTc89SYCuPok1t3usEo_5Vw.woff +0 -0
- package/dist/client/_fonts/xABEtoIcny8jhofy6UFK1Tk-8odgLeyL877XbYc_iJ4-9WK3T2NJVBmfih4tLVEAPl0yZmQgEQeQx0LOQ3IWZfg.woff +0 -0
- package/dist/client/_nuxt/BQyPNsYX.js +1 -0
- package/dist/client/_nuxt/{CPZxO2bC.js → BlN6kb1r.js} +1 -1
- package/dist/client/_nuxt/C6jYPYvv.js +39 -0
- package/dist/client/_nuxt/{Xp19LDlO.js → DZFeHypn.js} +1 -1
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/e7595305-ff7f-4220-8078-1c77fb602ec4.json +1 -0
- package/dist/client/_nuxt/entry.Ce7ekRZm.css +1 -0
- package/dist/client/_nuxt/error-404.BWteb0cn.css +1 -0
- package/dist/client/_nuxt/error-500.C3soCwlJ.css +1 -0
- package/dist/client/_nuxt/{index.BoTOVuDd.css → index.CvXw7hkt.css} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/package.json +21 -21
- package/dist/client/_fonts/1ZTlEDqU4DtwDJiND8f6qaugUpa0RIDvQl-v7iM6l54-2IIYX0aNjjEURwJNawIOc3sV0QzpbwUrCv8wl3ZGgFA.woff +0 -0
- package/dist/client/_fonts/1ZTlEDqU4DtwDJiND8f6qaugUpa0RIDvQl-v7iM6l54-4kZc4IwOXqryLeYzsaTvEKd54SPfeeGKPyDAZei18kw.woff +0 -0
- package/dist/client/_fonts/1ZTlEDqU4DtwDJiND8f6qaugUpa0RIDvQl-v7iM6l54-58cSYcLODugk4Zu8CLxpuYS2k7VDFVf3QmxNZaoRmsA.woff +0 -0
- package/dist/client/_fonts/1ZTlEDqU4DtwDJiND8f6qaugUpa0RIDvQl-v7iM6l54-6KAoyxR_H06JoWqdqVS0-kmvTJ84w1VV-vpL07MkGFo.woff +0 -0
- package/dist/client/_fonts/1ZTlEDqU4DtwDJiND8f6qaugUpa0RIDvQl-v7iM6l54-95xU6TxNKBk9BlTCnCXSPdOT6_wTWI5ElydsjdmPSnU.woff +0 -0
- package/dist/client/_fonts/1ZTlEDqU4DtwDJiND8f6qaugUpa0RIDvQl-v7iM6l54-D6hedAgqRfOCLZzaShnyeAvlEnMzk4Wm7g9WDKWFHIc.woff +0 -0
- package/dist/client/_fonts/1ZTlEDqU4DtwDJiND8f6qaugUpa0RIDvQl-v7iM6l54-ReiF7Vl5j3fA_MaPuQPt4ANBQ5qTkjFYFTlL1W3ym1w.woff +0 -0
- package/dist/client/_fonts/1ZTlEDqU4DtwDJiND8f6qaugUpa0RIDvQl-v7iM6l54-RvZUU2X45U7WIDI083h9MozPZMSPdvOCkgsORsWvPOw.woff +0 -0
- package/dist/client/_fonts/1ZTlEDqU4DtwDJiND8f6qaugUpa0RIDvQl-v7iM6l54-Xm4_FXczHI3lFXIOP0_6c3KUSxdYYchdqMgpvIrX39I.woff +0 -0
- package/dist/client/_fonts/1ZTlEDqU4DtwDJiND8f6qaugUpa0RIDvQl-v7iM6l54-_9ZFq_1MEu2U8U7grtD7YMgvO0dPbqjpniegoQ7pnKc.woff +0 -0
- package/dist/client/_fonts/1ZTlEDqU4DtwDJiND8f6qaugUpa0RIDvQl-v7iM6l54-nLq_HMAmNe2gpAE1XdFZGjhZQSqHqGVFpXfVWZwq6po.woff +0 -0
- package/dist/client/_fonts/1ZTlEDqU4DtwDJiND8f6qaugUpa0RIDvQl-v7iM6l54-pl70zjWQWfT4d7_kSlnNHuvef2z_GjzK_6F7FVYzc6A.woff +0 -0
- package/dist/client/_fonts/1ZTlEDqU4DtwDJiND8f6qaugUpa0RIDvQl-v7iM6l54-qGxUO574Xoa2FaIMnapeY8IHMsgG5kkPG1Zpkm11GyM.woff +0 -0
- package/dist/client/_fonts/1ZTlEDqU4DtwDJiND8f6qaugUpa0RIDvQl-v7iM6l54-r3lJlSMiVuC84W6n8Dn1sHABtGx6Db34Oi_ViOFfm5c.woff +0 -0
- package/dist/client/_fonts/1ZTlEDqU4DtwDJiND8f6qaugUpa0RIDvQl-v7iM6l54-voFTEiyP2w7LVYxASRo153A_4ZJ3yULXeMD1FUqp1Vg.woff +0 -0
- package/dist/client/_fonts/1ZTlEDqU4DtwDJiND8f6qaugUpa0RIDvQl-v7iM6l54-wPsHUB6eI7bs1LLb7jUybHwKvpU3v1hqhDVoMxO5dUU.woff +0 -0
- package/dist/client/_nuxt/BbH313iv.js +0 -1
- package/dist/client/_nuxt/DnLreTGP.js +0 -32
- package/dist/client/_nuxt/builds/meta/9c70f7bc-920b-4fec-91e2-f83e2d5da766.json +0 -1
- package/dist/client/_nuxt/entry.BPSyFWKM.css +0 -1
- package/dist/client/_nuxt/error-404.BkcOqmZ2.css +0 -1
- package/dist/client/_nuxt/error-500.DjFAyAVV.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as ri,f as In,g as Xn,h as cd,j as F,k as da,r as T,l as Ie,m as Pi,n as Ht,p as to,q as vt,s as tt,v as o,x as xt,y as qi,z as Yn,A as Er,B as Or,C as fl,D as pd,E as hl,F as gr,G as ml,H as Ne,I as rt,J as P,K as Te,L as We,M as wt,N as M,O as Q,P as _,o as y,w,Q as L,R as se,S as fd,T as ca,U as hd,V as xr,W as ds,X as md,Y as gd,Z as cs,$ as ro,b as E,a0 as Ri,a1 as Ut,a2 as ye,a3 as R,a4 as oe,a5 as le,a6 as Di,a7 as ci,a8 as $i,c as V,a9 as ve,aa as Xe,ab as pa,ac as yd,ad as vd,ae as Dr,af as Tn,ag as gl,ah as bd,ai as Et,aj as fa,ak as Ei,al as pi,am as fi,an as xd,ao as yl,ap as wd,aq as _d,ar as vl,as as bl,at as Cd,au as Ad,av as Li,aw as Sd,d as ue,t as ee,ax as Hi,ay as Me,az as Md,aA as Re,aB as zr,aC as Pt,aD as Ae,aE as I,aF as ct,aG as de,aH as Je,aI as zt,aJ as hi,aK as He,aL as mi,a as D,aM as ii,aN as Bd,aO as Pn,aP as ha,aQ as kd,aR as xl,aS as qd,aT as Fd,_ as wl,aU as ma,aV as _l,aW as gi,aX as ga,aY as Cl,aZ as Ed,a_ as Od,a$ as io,b0 as Qe,b1 as zd,b2 as Al,b3 as Sl,b4 as Id,b5 as Td,b6 as Pd,b7 as Rd,b8 as ps}from"#entry";function Dd(i,e=Number.NEGATIVE_INFINITY,t=Number.POSITIVE_INFINITY){return Math.min(t,Math.max(e,i))}function sn(i,e){let t=i;const r=e.toString(),n=r.indexOf("."),s=n>=0?r.length-n:0;if(s>0){const a=10**s;t=Math.round(t*a)/a}return t}function $d(i,e,t,r){e=Number(e),t=Number(t);const n=(i-(Number.isNaN(e)?0:e))%r;let s=sn(Math.abs(n)*2>=r?i+Math.sign(n)*(r-Math.abs(n)):i-n,r);return Number.isNaN(e)?!Number.isNaN(t)&&s>t&&(s=Math.floor(sn(t/r,r))*r):s<e?s=e:!Number.isNaN(t)&&s>t&&(s=e+Math.floor(sn((t-e)/r,r))*r),s=sn(s,r),s}function no(i,e){return ri(i)?!1:Array.isArray(i)?i.some(t=>In(t,e)):In(i,e)}const Ld=["INPUT","TEXTAREA"];function so(i,e,t,r={}){if(!e||r.enableIgnoredElement&&Ld.includes(e.nodeName))return null;const{arrowKeyOptions:n="both",attributeName:s="[data-reka-collection-item]",itemsArray:a=[],loop:l=!0,dir:u="ltr",preventScroll:d=!0,focus:c=!1}=r,[p,f,m,h,g,v]=[i.key==="ArrowRight",i.key==="ArrowLeft",i.key==="ArrowUp",i.key==="ArrowDown",i.key==="Home",i.key==="End"],b=m||h,C=p||f;if(!g&&!v&&(!b&&!C||n==="vertical"&&C||n==="horizontal"&&b))return null;const x=t?Array.from(t.querySelectorAll(s)):a;if(!x.length)return null;d&&i.preventDefault();let A=null;return C||b?A=Ml(x,e,{goForward:b?h:u==="ltr"?p:f,loop:l}):g?A=x.at(0)||null:v&&(A=x.at(-1)||null),c&&A?.focus(),A}function Ml(i,e,t,r=i.includes(e)?i.length:i.length+1){if(--r===0)return null;const n=i.indexOf(e);let s;if(n===-1?s=t.goForward?0:i.length-1:s=t.goForward?n+1:n-1,!t.loop&&(s<0||s>=i.length))return null;const a=(s+i.length)%i.length,l=i[a];return l?l.hasAttribute("disabled")&&l.getAttribute("disabled")!=="false"?Ml(i,l,t,r):l:null}const Hd=Xn(()=>{const i=T(new Map),e=T(),t=F(()=>{for(const a of i.value.values())if(a)return!0;return!1}),r=da({scrollBody:T(!0)});let n=null;const s=()=>{document.body.style.paddingRight="",document.body.style.marginRight="",document.body.style.pointerEvents="",document.documentElement.style.removeProperty("--scrollbar-width"),document.body.style.overflow=e.value??"",to&&n?.(),e.value=void 0};return Ie(t,(a,l)=>{if(!Pi)return;if(!a){l&&s();return}e.value===void 0&&(e.value=document.body.style.overflow);const u=window.innerWidth-document.documentElement.clientWidth,d={padding:u,margin:0},c=r.scrollBody?.value?typeof r.scrollBody.value=="object"?Ht({padding:r.scrollBody.value.padding===!0?u:r.scrollBody.value.padding,margin:r.scrollBody.value.margin===!0?u:r.scrollBody.value.margin},d):d:{padding:0,margin:0};u>0&&(document.body.style.paddingRight=typeof c.padding=="number"?`${c.padding}px`:String(c.padding),document.body.style.marginRight=typeof c.margin=="number"?`${c.margin}px`:String(c.margin),document.documentElement.style.setProperty("--scrollbar-width",`${u}px`),document.body.style.overflow="hidden"),to&&(n=vt(document,"touchmove",p=>Nd(p),{passive:!1})),tt(()=>{t.value&&(document.body.style.pointerEvents="none",document.body.style.overflow="hidden")})},{immediate:!0,flush:"sync"}),i});function ya(i){const e=Math.random().toString(36).substring(2,7),t=Hd();t.value.set(e,i??!1);const r=F({get:()=>t.value.get(e)??!1,set:n=>t.value.set(e,n)});return cd(()=>{t.value.delete(e)}),r}function Bl(i){const e=window.getComputedStyle(i);if(e.overflowX==="scroll"||e.overflowY==="scroll"||e.overflowX==="auto"&&i.clientWidth<i.scrollWidth||e.overflowY==="auto"&&i.clientHeight<i.scrollHeight)return!0;{const t=i.parentNode;return!(t instanceof Element)||t.tagName==="BODY"?!1:Bl(t)}}function Nd(i){const e=i||window.event,t=e.target;return t instanceof Element&&Bl(t)?!1:e.touches.length>1?!0:(e.preventDefault&&e.cancelable&&e.preventDefault(),!1)}function kl(i){const e=T(!1);function t(){e.value=!0}function r(n){tt(()=>{e.value=!1,i?.(n)})}return{isComposing:e,handleCompositionStart:t,handleCompositionEnd:r}}function Jn(i){const e=da({dir:T("ltr")});return F(()=>i?.value||e.dir?.value||"ltr")}function Vd(i){const e=F(()=>o(i)),t=F(()=>new Intl.Collator("en",{usage:"search",...e.value}));return{startsWith:(a,l)=>l.length===0?!0:(a=a.normalize("NFC"),l=l.normalize("NFC"),t.value.compare(a.slice(0,l.length),l)===0),endsWith:(a,l)=>l.length===0?!0:(a=a.normalize("NFC"),l=l.normalize("NFC"),t.value.compare(a.slice(-l.length),l)===0),contains:(a,l)=>{if(l.length===0)return!0;a=a.normalize("NFC"),l=l.normalize("NFC");let u=0;const d=l.length;for(;u+d<=a.length;u++){const c=a.slice(u,u+d);if(t.value.compare(l,c)===0)return!0}return!1}}}let fs=0;function ql(){xt(i=>{if(!Pi)return;const e=document.querySelectorAll("[data-reka-focus-guard]");document.body.insertAdjacentElement("afterbegin",e[0]??ao()),document.body.insertAdjacentElement("beforeend",e[1]??ao()),fs++,i(()=>{fs===1&&document.querySelectorAll("[data-reka-focus-guard]").forEach(t=>t.remove()),fs--})})}function ao(){const i=document.createElement("span");return i.setAttribute("data-reka-focus-guard",""),i.tabIndex=0,i.style.outline="none",i.style.opacity="0",i.style.position="fixed",i.style.pointerEvents="none",i}function Fl(i){return F(()=>qi(i)?!!Yn(i)?.closest("form"):!0)}function ot(i,e){const t=Er(i),r=e?Or(e):{};return F(()=>({...t.value,...r}))}function El(i,e){const t=fl(!1,300);pd(()=>{t.value=!1});const r=T(null),n=hl();function s(){r.value=null,t.value=!1}function a(l,u){if(!u)return;const d=l.currentTarget,c={x:l.clientX,y:l.clientY},p=Ud(c,d.getBoundingClientRect()),f=jd(c,p,1),m=Wd(u.getBoundingClientRect()),h=Kd([...f,...m]);r.value=h,t.value=!0}return xt(l=>{if(i.value&&e.value){const u=c=>a(c,e.value),d=c=>a(c,i.value);i.value.addEventListener("pointerleave",u),e.value.addEventListener("pointerleave",d),l(()=>{i.value?.removeEventListener("pointerleave",u),e.value?.removeEventListener("pointerleave",d)})}}),xt(l=>{if(r.value){const u=d=>{if(!r.value||!(d.target instanceof Element))return;const c=d.target,p={x:d.clientX,y:d.clientY},f=i.value?.contains(c)||e.value?.contains(c),m=!Gd(p,r.value),h=!!c.closest("[data-grace-area-trigger]");f?s():(m||h)&&(s(),n.trigger())};i.value?.ownerDocument.addEventListener("pointermove",u),l(()=>i.value?.ownerDocument.removeEventListener("pointermove",u))}}),{isPointerInTransit:t,onPointerExit:n.on}}function Ud(i,e){const t=Math.abs(e.top-i.y),r=Math.abs(e.bottom-i.y),n=Math.abs(e.right-i.x),s=Math.abs(e.left-i.x);switch(Math.min(t,r,n,s)){case s:return"left";case n:return"right";case t:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function jd(i,e,t=5){const r=[];switch(e){case"top":r.push({x:i.x-t,y:i.y+t},{x:i.x+t,y:i.y+t});break;case"bottom":r.push({x:i.x-t,y:i.y-t},{x:i.x+t,y:i.y-t});break;case"left":r.push({x:i.x+t,y:i.y-t},{x:i.x+t,y:i.y+t});break;case"right":r.push({x:i.x-t,y:i.y-t},{x:i.x-t,y:i.y+t});break}return r}function Wd(i){const{top:e,right:t,bottom:r,left:n}=i;return[{x:n,y:e},{x:t,y:e},{x:t,y:r},{x:n,y:r}]}function Gd(i,e){const{x:t,y:r}=i;let n=!1;for(let s=0,a=e.length-1;s<e.length;a=s++){const l=e[s].x,u=e[s].y,d=e[a].x,c=e[a].y;u>r!=c>r&&t<(d-l)*(r-u)/(c-u)+l&&(n=!n)}return n}function Kd(i){const e=i.slice();return e.sort((t,r)=>t.x<r.x?-1:t.x>r.x?1:t.y<r.y?-1:t.y>r.y?1:0),Xd(e)}function Xd(i){if(i.length<=1)return i.slice();const e=[];for(let r=0;r<i.length;r++){const n=i[r];for(;e.length>=2;){const s=e.at(-1),a=e[e.length-2];if((s.x-a.x)*(n.y-a.y)>=(s.y-a.y)*(n.x-a.x))e.pop();else break}e.push(n)}e.pop();const t=[];for(let r=i.length-1;r>=0;r--){const n=i[r];for(;t.length>=2;){const s=t.at(-1),a=t[t.length-2];if((s.x-a.x)*(n.y-a.y)>=(s.y-a.y)*(n.x-a.x))t.pop();else break}t.push(n)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}var Yd=function(i){if(typeof document>"u")return null;var e=Array.isArray(i)?i[0]:i;return e.ownerDocument.body},$r=new WeakMap,an=new WeakMap,on={},hs=0,Ol=function(i){return i&&(i.host||Ol(i.parentNode))},Jd=function(i,e){return e.map(function(t){if(i.contains(t))return t;var r=Ol(t);return r&&i.contains(r)?r:(console.error("aria-hidden",t,"in not contained inside",i,". Doing nothing"),null)}).filter(function(t){return!!t})},Zd=function(i,e,t,r){var n=Jd(e,Array.isArray(i)?i:[i]);on[t]||(on[t]=new WeakMap);var s=on[t],a=[],l=new Set,u=new Set(n),d=function(p){!p||l.has(p)||(l.add(p),d(p.parentNode))};n.forEach(d);var c=function(p){!p||u.has(p)||Array.prototype.forEach.call(p.children,function(f){if(l.has(f))c(f);else try{var m=f.getAttribute(r),h=m!==null&&m!=="false",g=($r.get(f)||0)+1,v=(s.get(f)||0)+1;$r.set(f,g),s.set(f,v),a.push(f),g===1&&h&&an.set(f,!0),v===1&&f.setAttribute(t,"true"),h||f.setAttribute(r,"true")}catch(b){console.error("aria-hidden: cannot operate on ",f,b)}})};return c(e),l.clear(),hs++,function(){a.forEach(function(p){var f=$r.get(p)-1,m=s.get(p)-1;$r.set(p,f),s.set(p,m),f||(an.has(p)||p.removeAttribute(r),an.delete(p)),m||p.removeAttribute(t)}),hs--,hs||($r=new WeakMap,$r=new WeakMap,an=new WeakMap,on={})}},Qd=function(i,e,t){t===void 0&&(t="data-aria-hidden");var r=Array.from(Array.isArray(i)?i:[i]),n=Yd(i);return n?(r.push.apply(r,Array.from(n.querySelectorAll("[aria-live], script"))),Zd(r,n,t,"aria-hidden")):function(){return null}};function va(i){let e;Ie(()=>Yn(i),t=>{let r=!1;try{r=!!t?.closest("[popover]:not(:popover-open)")}catch{}t&&!r?e=Qd(t):e&&e()}),gr(()=>{e&&e()})}function ft(i,e="reka"){let t;return t=ml?.(),e?`${e}-${t}`:t}function ec(){return{ALT:"Alt",ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",BACKSPACE:"Backspace",CAPS_LOCK:"CapsLock",CONTROL:"Control",DELETE:"Delete",END:"End",ENTER:"Enter",ESCAPE:"Escape",F1:"F1",F10:"F10",F11:"F11",F12:"F12",F2:"F2",F3:"F3",F4:"F4",F5:"F5",F6:"F6",F7:"F7",F8:"F8",F9:"F9",HOME:"Home",META:"Meta",PAGE_DOWN:"PageDown",PAGE_UP:"PageUp",SHIFT:"Shift",SPACE:" ",TAB:"Tab",CTRL:"Control",ASTERISK:"*",SPACE_CODE:"Space"}}function tc(i){const e=da({locale:T("en")});return F(()=>i?.value||e.locale?.value||"en")}function rc(i){const e=T(),t=F(()=>e.value?.width??0),r=F(()=>e.value?.height??0);return Ne(()=>{const n=Yn(i);if(n){e.value={width:n.offsetWidth,height:n.offsetHeight};const s=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const l=a[0];let u,d;if("borderBoxSize"in l){const c=l.borderBoxSize,p=Array.isArray(c)?c[0]:c;u=p.inlineSize,d=p.blockSize}else u=n.offsetWidth,d=n.offsetHeight;e.value={width:u,height:d}});return s.observe(n,{box:"border-box"}),()=>s.unobserve(n)}else e.value=void 0}),{width:t,height:r}}function ic(i){const e=fl("",1e3);return{search:e,handleTypeaheadSearch:(n,s)=>{e.value=e.value+n;{const a=rt(),l=s.map(f=>({...f,textValue:f.value?.textValue??f.ref.textContent?.trim()??""})),u=l.find(f=>f.ref===a),d=l.map(f=>f.textValue),c=sc(d,e.value,u?.textValue),p=l.find(f=>f.textValue===c);return p&&p.ref.focus(),p?.ref}},resetTypeahead:()=>{e.value=""}}}function nc(i,e){return i.map((t,r)=>i[(e+r)%i.length])}function sc(i,e,t){const n=e.length>1&&Array.from(e).every(d=>d===e[0])?e[0]:e,s=t?i.indexOf(t):-1;let a=nc(i,Math.max(s,0));n.length===1&&(a=a.filter(d=>d!==t));const u=a.find(d=>d.toLowerCase().startsWith(n.toLowerCase()));return u!==t?u:void 0}const[jt,ac]=Te("DialogRoot");var oc=P({inheritAttrs:!1,__name:"DialogRoot",props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1,default:!1},modal:{type:Boolean,required:!1,default:!0}},emits:["update:open"],setup(i,{emit:e}){const t=i,n=We(t,"open",e,{defaultValue:t.defaultOpen,passive:t.open===void 0}),s=T(),a=T(),{modal:l}=wt(t);return ac({open:n,modal:l,openModal:()=>{n.value=!0},onOpenChange:u=>{n.value=u},onOpenToggle:()=>{n.value=!n.value},contentId:"",titleId:"",descriptionId:"",triggerElement:s,contentElement:a}),(u,d)=>M(u.$slots,"default",{open:o(n),close:()=>n.value=!1})}}),ba=oc,lc=P({__name:"DialogClose",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(i){const e=i;Q();const t=jt();return(r,n)=>(y(),_(o(se),L(e,{type:r.as==="button"?"button":void 0,onClick:n[0]||(n[0]=s=>o(t).onOpenChange(!1))}),{default:w(()=>[M(r.$slots,"default")]),_:3},16,["type"]))}}),zl=lc;const uc=fd(()=>T([]));function dc(){const i=uc();return{add(e){const t=i.value[0];e!==t&&t?.pause(),i.value=oo(i.value,e),i.value.unshift(e)},remove(e){i.value=oo(i.value,e),i.value[0]?.resume()}}}function oo(i,e){const t=[...i],r=t.indexOf(e);return r!==-1&&t.splice(r,1),t}var cc=P({__name:"FocusScope",props:{loop:{type:Boolean,required:!1,default:!1},trapped:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["mountAutoFocus","unmountAutoFocus"],setup(i,{emit:e}){const t=i,r=e,{currentRef:n,currentElement:s}=Q(),a=T(null),l=dc(),u=ca({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});xt(c=>{if(!Pi)return;const p=s.value;if(!t.trapped)return;function f(v){if(u.paused||!p)return;const b=v.target;p.contains(b)?a.value=b:xr(a.value,{select:!0})}function m(v){if(u.paused||!p)return;const b=v.relatedTarget;b!==null&&(p.contains(b)||xr(a.value,{select:!0}))}function h(v){const b=a.value;if(b===null||!v.some(A=>A.removedNodes.length>0))return;p.contains(b)||xr(p)}document.addEventListener("focusin",f),document.addEventListener("focusout",m);const g=new MutationObserver(h);p&&g.observe(p,{childList:!0,subtree:!0}),c(()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",m),g.disconnect()})}),xt(async c=>{const p=s.value;if(await tt(),!p)return;l.add(u);const f=rt();if(!p.contains(f)){const h=new CustomEvent(ds,ro);p.addEventListener(ds,g=>r("mountAutoFocus",g)),p.dispatchEvent(h),h.defaultPrevented||(md(gd(p),{select:!0}),rt()===f&&xr(p))}c(()=>{p.removeEventListener(ds,v=>r("mountAutoFocus",v));const h=new CustomEvent(cs,ro),g=v=>{r("unmountAutoFocus",v)};p.addEventListener(cs,g),p.dispatchEvent(h),p.setAttribute("data-focus-scope-unmounting",""),setTimeout(()=>{h.defaultPrevented||xr(f??document.body,{select:!0}),p.removeEventListener(cs,g),l.remove(u),p.removeAttribute("data-focus-scope-unmounting")},0)})});function d(c){if(!t.loop&&!t.trapped||u.paused)return;const p=c.key==="Tab"&&!c.altKey&&!c.ctrlKey&&!c.metaKey,f=rt();if(p&&f){const m=c.currentTarget,[h,g]=hd(m);h&&g?!c.shiftKey&&f===g?(c.preventDefault(),t.loop&&xr(h,{select:!0})):c.shiftKey&&f===h&&(c.preventDefault(),t.loop&&xr(g,{select:!0})):f===m&&c.preventDefault()}}return(c,p)=>(y(),_(o(se),{ref_key:"currentRef",ref:n,tabindex:"-1","as-child":c.asChild,as:c.as,onKeydown:d},{default:w(()=>[M(c.$slots,"default")]),_:3},8,["as-child","as"]))}}),xa=cc;const pc="menu.itemSelect",Ws=["Enter"," "],fc=["ArrowDown","PageUp","Home"],Il=["ArrowUp","PageDown","End"],hc=[...fc,...Il],mc={ltr:[...Ws,"ArrowRight"],rtl:[...Ws,"ArrowLeft"]},gc={ltr:["ArrowLeft"],rtl:["ArrowRight"]};function wa(i){return i?"open":"closed"}function Rn(i){return i==="indeterminate"}function _a(i){return Rn(i)?"indeterminate":i?"checked":"unchecked"}function yc(i){const e=rt();for(const t of i)if(t===e||(t.focus(),rt()!==e))return}function vc(i,e){const{x:t,y:r}=i;let n=!1;for(let s=0,a=e.length-1;s<e.length;a=s++){const l=e[s].x,u=e[s].y,d=e[a].x,c=e[a].y;u>r!=c>r&&t<(d-l)*(r-u)/(c-u)+l&&(n=!n)}return n}function bc(i,e){if(!e)return!1;const t={x:i.clientX,y:i.clientY};return vc(t,e)}function ui(i){return i.pointerType==="mouse"}var xc=P({__name:"DialogContentImpl",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(i,{emit:e}){const t=i,r=e,n=jt(),{forwardRef:s,currentElement:a}=Q();return n.titleId||=ft(void 0,"reka-dialog-title"),n.descriptionId||=ft(void 0,"reka-dialog-description"),Ne(()=>{n.contentElement=a,rt()!==document.body&&(n.triggerElement.value=rt())}),(l,u)=>(y(),_(o(xa),{"as-child":"",loop:"",trapped:t.trapFocus,onMountAutoFocus:u[5]||(u[5]=d=>r("openAutoFocus",d)),onUnmountAutoFocus:u[6]||(u[6]=d=>r("closeAutoFocus",d))},{default:w(()=>[E(o(Ri),L({id:o(n).contentId,ref:o(s),as:l.as,"as-child":l.asChild,"disable-outside-pointer-events":l.disableOutsidePointerEvents,role:"dialog","aria-describedby":o(n).descriptionId,"aria-labelledby":o(n).titleId,"data-state":o(wa)(o(n).open.value)},l.$attrs,{onDismiss:u[0]||(u[0]=d=>o(n).onOpenChange(!1)),onEscapeKeyDown:u[1]||(u[1]=d=>r("escapeKeyDown",d)),onFocusOutside:u[2]||(u[2]=d=>r("focusOutside",d)),onInteractOutside:u[3]||(u[3]=d=>r("interactOutside",d)),onPointerDownOutside:u[4]||(u[4]=d=>r("pointerDownOutside",d))}),{default:w(()=>[M(l.$slots,"default")]),_:3},16,["id","as","as-child","disable-outside-pointer-events","aria-describedby","aria-labelledby","data-state"])]),_:3},8,["trapped"]))}}),Tl=xc,wc=P({__name:"DialogContentModal",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(i,{emit:e}){const t=i,r=e,n=jt(),s=Or(r),{forwardRef:a,currentElement:l}=Q();return va(l),(u,d)=>(y(),_(Tl,L({...t,...o(s)},{ref:o(a),"trap-focus":o(n).open.value,"disable-outside-pointer-events":!0,onCloseAutoFocus:d[0]||(d[0]=c=>{c.defaultPrevented||(c.preventDefault(),o(n).triggerElement.value?.focus())}),onPointerDownOutside:d[1]||(d[1]=c=>{const p=c.detail.originalEvent,f=p.button===0&&p.ctrlKey===!0;(p.button===2||f)&&c.preventDefault()}),onFocusOutside:d[2]||(d[2]=c=>{c.preventDefault()})}),{default:w(()=>[M(u.$slots,"default")]),_:3},16,["trap-focus"]))}}),_c=wc,Cc=P({__name:"DialogContentNonModal",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(i,{emit:e}){const t=i,n=Or(e);Q();const s=jt(),a=T(!1),l=T(!1);return(u,d)=>(y(),_(Tl,L({...t,...o(n)},{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:d[0]||(d[0]=c=>{c.defaultPrevented||(a.value||o(s).triggerElement.value?.focus(),c.preventDefault()),a.value=!1,l.value=!1}),onInteractOutside:d[1]||(d[1]=c=>{c.defaultPrevented||(a.value=!0,c.detail.originalEvent.type==="pointerdown"&&(l.value=!0));const p=c.target;o(s).triggerElement.value?.contains(p)&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&l.value&&c.preventDefault()})}),{default:w(()=>[M(u.$slots,"default")]),_:3},16))}}),Ac=Cc,Sc=P({__name:"DialogContent",props:{forceMount:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(i,{emit:e}){const t=i,r=e,n=jt(),s=Or(r),{forwardRef:a}=Q();return(l,u)=>(y(),_(o(Ut),{present:l.forceMount||o(n).open.value},{default:w(()=>[o(n).modal.value?(y(),_(_c,L({key:0,ref:o(a)},{...t,...o(s),...l.$attrs}),{default:w(()=>[M(l.$slots,"default")]),_:3},16)):(y(),_(Ac,L({key:1,ref:o(a)},{...t,...o(s),...l.$attrs}),{default:w(()=>[M(l.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),Ca=Sc,Mc=P({__name:"DialogDescription",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"p"}},setup(i){const e=i;Q();const t=jt();return(r,n)=>(y(),_(o(se),L(e,{id:o(t).descriptionId}),{default:w(()=>[M(r.$slots,"default")]),_:3},16,["id"]))}}),Zt=Mc,Bc=P({__name:"DialogOverlayImpl",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(i){const e=jt();return ya(!0),Q(),(t,r)=>(y(),_(o(se),{as:t.as,"as-child":t.asChild,"data-state":o(e).open.value?"open":"closed",style:{"pointer-events":"auto"},onPointerdown:r[0]||(r[0]=ye(()=>{},["left","self","prevent"]))},{default:w(()=>[M(t.$slots,"default")]),_:3},8,["as","as-child","data-state"]))}}),kc=Bc,qc=P({__name:"DialogOverlay",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(i){const e=jt(),{forwardRef:t}=Q();return(r,n)=>o(e)?.modal.value?(y(),_(o(Ut),{key:0,present:r.forceMount||o(e).open.value},{default:w(()=>[E(kc,L(r.$attrs,{ref:o(t),as:r.as,"as-child":r.asChild}),{default:w(()=>[M(r.$slots,"default")]),_:3},16,["as","as-child"])]),_:3},8,["present"])):R("v-if",!0)}}),Dn=qc,Fc=P({__name:"DialogPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(i){const e=i;return(t,r)=>(y(),_(o(Di),oe(le(e)),{default:w(()=>[M(t.$slots,"default")]),_:3},16))}}),Aa=Fc,Ec=P({__name:"DialogTitle",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"h2"}},setup(i){const e=i,t=jt();return Q(),(r,n)=>(y(),_(o(se),L(e,{id:o(t).titleId}),{default:w(()=>[M(r.$slots,"default")]),_:3},16,["id"]))}}),Qt=Ec,Oc=P({__name:"DialogTrigger",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(i){const e=i,t=jt(),{forwardRef:r,currentElement:n}=Q();return t.contentId||=ft(void 0,"reka-dialog-content"),Ne(()=>{t.triggerElement.value=n.value}),(s,a)=>(y(),_(o(se),L(e,{ref:o(r),type:s.as==="button"?"button":void 0,"aria-haspopup":"dialog","aria-expanded":o(t).open.value||!1,"aria-controls":o(t).open.value?o(t).contentId:void 0,"data-state":o(t).open.value?"open":"closed",onClick:o(t).onOpenToggle}),{default:w(()=>[M(s.$slots,"default")]),_:3},16,["type","aria-expanded","aria-controls","data-state","onClick"]))}}),Sa=Oc,zc=P({inheritAttrs:!1,__name:"VisuallyHiddenInputBubble",props:{name:{type:String,required:!0},value:{type:null,required:!0},checked:{type:Boolean,required:!1,default:void 0},required:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},feature:{type:String,required:!1,default:"fully-hidden"}},setup(i){const e=i,{primitiveElement:t,currentElement:r}=ci(),n=F(()=>e.checked??e.value);return Ie(n,(s,a)=>{if(!r.value)return;const l=r.value,u=window.HTMLInputElement.prototype,c=Object.getOwnPropertyDescriptor(u,"value").set;if(c&&s!==a){const p=new Event("input",{bubbles:!0}),f=new Event("change",{bubbles:!0});c.call(l,s),l.dispatchEvent(p),l.dispatchEvent(f)}}),(s,a)=>(y(),_($i,L({ref_key:"primitiveElement",ref:t},{...e,...s.$attrs},{as:"input"}),null,16))}}),lo=zc,Ic=P({inheritAttrs:!1,__name:"VisuallyHiddenInput",props:{name:{type:String,required:!0},value:{type:null,required:!0},checked:{type:Boolean,required:!1,default:void 0},required:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},feature:{type:String,required:!1,default:"fully-hidden"}},setup(i){const e=i,t=F(()=>typeof e.value=="object"&&Array.isArray(e.value)&&e.value.length===0&&e.required),r=F(()=>typeof e.value=="string"||typeof e.value=="number"||typeof e.value=="boolean"||e.value===null||e.value===void 0?[{name:e.name,value:e.value}]:typeof e.value=="object"&&Array.isArray(e.value)?e.value.flatMap((n,s)=>typeof n=="object"?Object.entries(n).map(([a,l])=>({name:`${e.name}[${s}][${a}]`,value:l})):{name:`${e.name}[${s}]`,value:n}):e.value!==null&&typeof e.value=="object"&&!Array.isArray(e.value)?Object.entries(e.value).map(([n,s])=>({name:`${e.name}[${n}]`,value:s})):[]);return(n,s)=>(y(),V(ve,null,[R(" We render single input if it's required "),t.value?(y(),_(lo,L({key:n.name},{...e,...n.$attrs},{name:n.name,value:n.value}),null,16,["name","value"])):(y(!0),V(ve,{key:1},Xe(r.value,a=>(y(),_(lo,L({key:a.name},{ref_for:!0},{...e,...n.$attrs},{name:a.name,value:a.value}),null,16,["name","value"]))),128))],2112))}}),Pl=Ic;const Tc="rovingFocusGroup.onEntryFocus",Pc={bubbles:!1,cancelable:!0},Rc={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Dc(i,e){return e!=="rtl"?i:i==="ArrowLeft"?"ArrowRight":i==="ArrowRight"?"ArrowLeft":i}function $c(i,e,t){const r=Dc(i.key,t);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Rc[r]}function Rl(i,e=!1){const t=rt();for(const r of i)if(r===t||(r.focus({preventScroll:e}),rt()!==t))return}function Lc(i,e){return i.map((t,r)=>i[(e+r)%i.length])}const[Dl,Hc]=Te("PopperRoot");var Nc=P({inheritAttrs:!1,__name:"PopperRoot",setup(i){const e=T();return Hc({anchor:e,onAnchorChange:t=>e.value=t}),(t,r)=>M(t.$slots,"default")}}),Ni=Nc,Vc=P({__name:"PopperAnchor",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(i){const e=i,{forwardRef:t,currentElement:r}=Q(),n=Dl();return pa(()=>{n.onAnchorChange(e.reference??r.value)}),(s,a)=>(y(),_(o(se),{ref:o(t),as:s.as,"as-child":s.asChild},{default:w(()=>[M(s.$slots,"default")]),_:3},8,["as","as-child"]))}}),Vi=Vc;const Uc={key:0,d:"M0 0L6 6L12 0"},jc={key:1,d:"M0 0L4.58579 4.58579C5.36683 5.36683 6.63316 5.36684 7.41421 4.58579L12 0"};var Wc=P({__name:"Arrow",props:{width:{type:Number,required:!1,default:10},height:{type:Number,required:!1,default:5},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(i){const e=i;return Q(),(t,r)=>(y(),_(o(se),L(e,{width:t.width,height:t.height,viewBox:t.asChild?void 0:"0 0 12 6",preserveAspectRatio:t.asChild?void 0:"none"}),{default:w(()=>[M(t.$slots,"default",{},()=>[t.rounded?(y(),V("path",jc)):(y(),V("path",Uc))])]),_:3},16,["width","height","viewBox","preserveAspectRatio"]))}}),Gc=Wc;function Kc(i){return i!==null}function Xc(i){return{name:"transformOrigin",options:i,fn(e){const{placement:t,rects:r,middlewareData:n}=e,a=n.arrow?.centerOffset!==0,l=a?0:i.arrowWidth,u=a?0:i.arrowHeight,[d,c]=Gs(t),p={start:"0%",center:"50%",end:"100%"}[c],f=(n.arrow?.x??0)+l/2,m=(n.arrow?.y??0)+u/2;let h="",g="";return d==="bottom"?(h=a?p:`${f}px`,g=`${-u}px`):d==="top"?(h=a?p:`${f}px`,g=`${r.floating.height+u}px`):d==="right"?(h=`${-u}px`,g=a?p:`${m}px`):d==="left"&&(h=`${r.floating.width+u}px`,g=a?p:`${m}px`),{data:{x:h,y:g}}}}}function Gs(i){const[e,t="center"]=i.split("-");return[e,t]}const Yc=["top","right","bottom","left"],cr=Math.min,dt=Math.max,$n=Math.round,ln=Math.floor,$t=i=>({x:i,y:i}),Jc={left:"right",right:"left",bottom:"top",top:"bottom"},Zc={start:"end",end:"start"};function Ks(i,e,t){return dt(i,cr(e,t))}function rr(i,e){return typeof i=="function"?i(e):i}function ir(i){return i.split("-")[0]}function yi(i){return i.split("-")[1]}function Ma(i){return i==="x"?"y":"x"}function Ba(i){return i==="y"?"height":"width"}const Qc=new Set(["top","bottom"]);function Dt(i){return Qc.has(ir(i))?"y":"x"}function ka(i){return Ma(Dt(i))}function ep(i,e,t){t===void 0&&(t=!1);const r=yi(i),n=ka(i),s=Ba(n);let a=n==="x"?r===(t?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(a=Ln(a)),[a,Ln(a)]}function tp(i){const e=Ln(i);return[Xs(i),e,Xs(e)]}function Xs(i){return i.replace(/start|end/g,e=>Zc[e])}const uo=["left","right"],co=["right","left"],rp=["top","bottom"],ip=["bottom","top"];function np(i,e,t){switch(i){case"top":case"bottom":return t?e?co:uo:e?uo:co;case"left":case"right":return e?rp:ip;default:return[]}}function sp(i,e,t,r){const n=yi(i);let s=np(ir(i),t==="start",r);return n&&(s=s.map(a=>a+"-"+n),e&&(s=s.concat(s.map(Xs)))),s}function Ln(i){return i.replace(/left|right|bottom|top/g,e=>Jc[e])}function ap(i){return{top:0,right:0,bottom:0,left:0,...i}}function $l(i){return typeof i!="number"?ap(i):{top:i,right:i,bottom:i,left:i}}function Hn(i){const{x:e,y:t,width:r,height:n}=i;return{width:r,height:n,top:t,left:e,right:e+r,bottom:t+n,x:e,y:t}}function po(i,e,t){let{reference:r,floating:n}=i;const s=Dt(e),a=ka(e),l=Ba(a),u=ir(e),d=s==="y",c=r.x+r.width/2-n.width/2,p=r.y+r.height/2-n.height/2,f=r[l]/2-n[l]/2;let m;switch(u){case"top":m={x:c,y:r.y-n.height};break;case"bottom":m={x:c,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:p};break;case"left":m={x:r.x-n.width,y:p};break;default:m={x:r.x,y:r.y}}switch(yi(e)){case"start":m[a]-=f*(t&&d?-1:1);break;case"end":m[a]+=f*(t&&d?-1:1);break}return m}async function op(i,e){var t;e===void 0&&(e={});const{x:r,y:n,platform:s,rects:a,elements:l,strategy:u}=i,{boundary:d="clippingAncestors",rootBoundary:c="viewport",elementContext:p="floating",altBoundary:f=!1,padding:m=0}=rr(e,i),h=$l(m),v=l[f?p==="floating"?"reference":"floating":p],b=Hn(await s.getClippingRect({element:(t=await(s.isElement==null?void 0:s.isElement(v)))==null||t?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:d,rootBoundary:c,strategy:u})),C=p==="floating"?{x:r,y:n,width:a.floating.width,height:a.floating.height}:a.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),A=await(s.isElement==null?void 0:s.isElement(x))?await(s.getScale==null?void 0:s.getScale(x))||{x:1,y:1}:{x:1,y:1},q=Hn(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:C,offsetParent:x,strategy:u}):C);return{top:(b.top-q.top+h.top)/A.y,bottom:(q.bottom-b.bottom+h.bottom)/A.y,left:(b.left-q.left+h.left)/A.x,right:(q.right-b.right+h.right)/A.x}}const lp=async(i,e,t)=>{const{placement:r="bottom",strategy:n="absolute",middleware:s=[],platform:a}=t,l=s.filter(Boolean),u=await(a.isRTL==null?void 0:a.isRTL(e));let d=await a.getElementRects({reference:i,floating:e,strategy:n}),{x:c,y:p}=po(d,r,u),f=r,m={},h=0;for(let v=0;v<l.length;v++){var g;const{name:b,fn:C}=l[v],{x,y:A,data:q,reset:S}=await C({x:c,y:p,initialPlacement:r,placement:f,strategy:n,middlewareData:m,rects:d,platform:{...a,detectOverflow:(g=a.detectOverflow)!=null?g:op},elements:{reference:i,floating:e}});c=x??c,p=A??p,m={...m,[b]:{...m[b],...q}},S&&h<=50&&(h++,typeof S=="object"&&(S.placement&&(f=S.placement),S.rects&&(d=S.rects===!0?await a.getElementRects({reference:i,floating:e,strategy:n}):S.rects),{x:c,y:p}=po(d,f,u)),v=-1)}return{x:c,y:p,placement:f,strategy:n,middlewareData:m}},up=i=>({name:"arrow",options:i,async fn(e){const{x:t,y:r,placement:n,rects:s,platform:a,elements:l,middlewareData:u}=e,{element:d,padding:c=0}=rr(i,e)||{};if(d==null)return{};const p=$l(c),f={x:t,y:r},m=ka(n),h=Ba(m),g=await a.getDimensions(d),v=m==="y",b=v?"top":"left",C=v?"bottom":"right",x=v?"clientHeight":"clientWidth",A=s.reference[h]+s.reference[m]-f[m]-s.floating[h],q=f[m]-s.reference[m],S=await(a.getOffsetParent==null?void 0:a.getOffsetParent(d));let B=S?S[x]:0;(!B||!await(a.isElement==null?void 0:a.isElement(S)))&&(B=l.floating[x]||s.floating[h]);const k=A/2-q/2,N=B/2-g[h]/2-1,z=cr(p[b],N),j=cr(p[C],N),W=z,J=B-g[h]-j,ie=B/2-g[h]/2+k,O=Ks(W,ie,J),U=!u.arrow&&yi(n)!=null&&ie!==O&&s.reference[h]/2-(ie<W?z:j)-g[h]/2<0,re=U?ie<W?ie-W:ie-J:0;return{[m]:f[m]+re,data:{[m]:O,centerOffset:ie-O-re,...U&&{alignmentOffset:re}},reset:U}}}),dp=function(i){return i===void 0&&(i={}),{name:"flip",options:i,async fn(e){var t,r;const{placement:n,middlewareData:s,rects:a,initialPlacement:l,platform:u,elements:d}=e,{mainAxis:c=!0,crossAxis:p=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...v}=rr(i,e);if((t=s.arrow)!=null&&t.alignmentOffset)return{};const b=ir(n),C=Dt(l),x=ir(l)===l,A=await(u.isRTL==null?void 0:u.isRTL(d.floating)),q=f||(x||!g?[Ln(l)]:tp(l)),S=h!=="none";!f&&S&&q.push(...sp(l,g,h,A));const B=[l,...q],k=await u.detectOverflow(e,v),N=[];let z=((r=s.flip)==null?void 0:r.overflows)||[];if(c&&N.push(k[b]),p){const ie=ep(n,a,A);N.push(k[ie[0]],k[ie[1]])}if(z=[...z,{placement:n,overflows:N}],!N.every(ie=>ie<=0)){var j,W;const ie=(((j=s.flip)==null?void 0:j.index)||0)+1,O=B[ie];if(O&&(!(p==="alignment"?C!==Dt(O):!1)||z.every(X=>Dt(X.placement)===C?X.overflows[0]>0:!0)))return{data:{index:ie,overflows:z},reset:{placement:O}};let U=(W=z.filter(re=>re.overflows[0]<=0).sort((re,X)=>re.overflows[1]-X.overflows[1])[0])==null?void 0:W.placement;if(!U)switch(m){case"bestFit":{var J;const re=(J=z.filter(X=>{if(S){const ce=Dt(X.placement);return ce===C||ce==="y"}return!0}).map(X=>[X.placement,X.overflows.filter(ce=>ce>0).reduce((ce,te)=>ce+te,0)]).sort((X,ce)=>X[1]-ce[1])[0])==null?void 0:J[0];re&&(U=re);break}case"initialPlacement":U=l;break}if(n!==U)return{reset:{placement:U}}}return{}}}};function fo(i,e){return{top:i.top-e.height,right:i.right-e.width,bottom:i.bottom-e.height,left:i.left-e.width}}function ho(i){return Yc.some(e=>i[e]>=0)}const cp=function(i){return i===void 0&&(i={}),{name:"hide",options:i,async fn(e){const{rects:t,platform:r}=e,{strategy:n="referenceHidden",...s}=rr(i,e);switch(n){case"referenceHidden":{const a=await r.detectOverflow(e,{...s,elementContext:"reference"}),l=fo(a,t.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:ho(l)}}}case"escaped":{const a=await r.detectOverflow(e,{...s,altBoundary:!0}),l=fo(a,t.floating);return{data:{escapedOffsets:l,escaped:ho(l)}}}default:return{}}}}},Ll=new Set(["left","top"]);async function pp(i,e){const{placement:t,platform:r,elements:n}=i,s=await(r.isRTL==null?void 0:r.isRTL(n.floating)),a=ir(t),l=yi(t),u=Dt(t)==="y",d=Ll.has(a)?-1:1,c=s&&u?-1:1,p=rr(e,i);let{mainAxis:f,crossAxis:m,alignmentAxis:h}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return l&&typeof h=="number"&&(m=l==="end"?h*-1:h),u?{x:m*c,y:f*d}:{x:f*d,y:m*c}}const fp=function(i){return i===void 0&&(i=0),{name:"offset",options:i,async fn(e){var t,r;const{x:n,y:s,placement:a,middlewareData:l}=e,u=await pp(e,i);return a===((t=l.offset)==null?void 0:t.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:n+u.x,y:s+u.y,data:{...u,placement:a}}}}},hp=function(i){return i===void 0&&(i={}),{name:"shift",options:i,async fn(e){const{x:t,y:r,placement:n,platform:s}=e,{mainAxis:a=!0,crossAxis:l=!1,limiter:u={fn:b=>{let{x:C,y:x}=b;return{x:C,y:x}}},...d}=rr(i,e),c={x:t,y:r},p=await s.detectOverflow(e,d),f=Dt(ir(n)),m=Ma(f);let h=c[m],g=c[f];if(a){const b=m==="y"?"top":"left",C=m==="y"?"bottom":"right",x=h+p[b],A=h-p[C];h=Ks(x,h,A)}if(l){const b=f==="y"?"top":"left",C=f==="y"?"bottom":"right",x=g+p[b],A=g-p[C];g=Ks(x,g,A)}const v=u.fn({...e,[m]:h,[f]:g});return{...v,data:{x:v.x-t,y:v.y-r,enabled:{[m]:a,[f]:l}}}}}},mp=function(i){return i===void 0&&(i={}),{options:i,fn(e){const{x:t,y:r,placement:n,rects:s,middlewareData:a}=e,{offset:l=0,mainAxis:u=!0,crossAxis:d=!0}=rr(i,e),c={x:t,y:r},p=Dt(n),f=Ma(p);let m=c[f],h=c[p];const g=rr(l,e),v=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(u){const x=f==="y"?"height":"width",A=s.reference[f]-s.floating[x]+v.mainAxis,q=s.reference[f]+s.reference[x]-v.mainAxis;m<A?m=A:m>q&&(m=q)}if(d){var b,C;const x=f==="y"?"width":"height",A=Ll.has(ir(n)),q=s.reference[p]-s.floating[x]+(A&&((b=a.offset)==null?void 0:b[p])||0)+(A?0:v.crossAxis),S=s.reference[p]+s.reference[x]+(A?0:((C=a.offset)==null?void 0:C[p])||0)-(A?v.crossAxis:0);h<q?h=q:h>S&&(h=S)}return{[f]:m,[p]:h}}}},gp=function(i){return i===void 0&&(i={}),{name:"size",options:i,async fn(e){var t,r;const{placement:n,rects:s,platform:a,elements:l}=e,{apply:u=()=>{},...d}=rr(i,e),c=await a.detectOverflow(e,d),p=ir(n),f=yi(n),m=Dt(n)==="y",{width:h,height:g}=s.floating;let v,b;p==="top"||p==="bottom"?(v=p,b=f===(await(a.isRTL==null?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(b=p,v=f==="end"?"top":"bottom");const C=g-c.top-c.bottom,x=h-c.left-c.right,A=cr(g-c[v],C),q=cr(h-c[b],x),S=!e.middlewareData.shift;let B=A,k=q;if((t=e.middlewareData.shift)!=null&&t.enabled.x&&(k=x),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(B=C),S&&!f){const z=dt(c.left,0),j=dt(c.right,0),W=dt(c.top,0),J=dt(c.bottom,0);m?k=h-2*(z!==0||j!==0?z+j:dt(c.left,c.right)):B=g-2*(W!==0||J!==0?W+J:dt(c.top,c.bottom))}await u({...e,availableWidth:k,availableHeight:B});const N=await a.getDimensions(l.floating);return h!==N.width||g!==N.height?{reset:{rects:!0}}:{}}}};function Zn(){return typeof window<"u"}function Ir(i){return qa(i)?(i.nodeName||"").toLowerCase():"#document"}function pt(i){var e;return(i==null||(e=i.ownerDocument)==null?void 0:e.defaultView)||window}function Wt(i){var e;return(e=(qa(i)?i.ownerDocument:i.document)||window.document)==null?void 0:e.documentElement}function qa(i){return Zn()?i instanceof Node||i instanceof pt(i).Node:!1}function It(i){return Zn()?i instanceof Element||i instanceof pt(i).Element:!1}function Nt(i){return Zn()?i instanceof HTMLElement||i instanceof pt(i).HTMLElement:!1}function mo(i){return!Zn()||typeof ShadowRoot>"u"?!1:i instanceof ShadowRoot||i instanceof pt(i).ShadowRoot}const yp=new Set(["inline","contents"]);function Ui(i){const{overflow:e,overflowX:t,overflowY:r,display:n}=Tt(i);return/auto|scroll|overlay|hidden|clip/.test(e+r+t)&&!yp.has(n)}const vp=new Set(["table","td","th"]);function bp(i){return vp.has(Ir(i))}const xp=[":popover-open",":modal"];function Qn(i){return xp.some(e=>{try{return i.matches(e)}catch{return!1}})}const wp=["transform","translate","scale","rotate","perspective"],_p=["transform","translate","scale","rotate","perspective","filter"],Cp=["paint","layout","strict","content"];function Fa(i){const e=Ea(),t=It(i)?Tt(i):i;return wp.some(r=>t[r]?t[r]!=="none":!1)||(t.containerType?t.containerType!=="normal":!1)||!e&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!e&&(t.filter?t.filter!=="none":!1)||_p.some(r=>(t.willChange||"").includes(r))||Cp.some(r=>(t.contain||"").includes(r))}function Ap(i){let e=pr(i);for(;Nt(e)&&!di(e);){if(Fa(e))return e;if(Qn(e))return null;e=pr(e)}return null}function Ea(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Sp=new Set(["html","body","#document"]);function di(i){return Sp.has(Ir(i))}function Tt(i){return pt(i).getComputedStyle(i)}function es(i){return It(i)?{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}:{scrollLeft:i.scrollX,scrollTop:i.scrollY}}function pr(i){if(Ir(i)==="html")return i;const e=i.assignedSlot||i.parentNode||mo(i)&&i.host||Wt(i);return mo(e)?e.host:e}function Hl(i){const e=pr(i);return di(e)?i.ownerDocument?i.ownerDocument.body:i.body:Nt(e)&&Ui(e)?e:Hl(e)}function Oi(i,e,t){var r;e===void 0&&(e=[]),t===void 0&&(t=!0);const n=Hl(i),s=n===((r=i.ownerDocument)==null?void 0:r.body),a=pt(n);if(s){const l=Ys(a);return e.concat(a,a.visualViewport||[],Ui(n)?n:[],l&&t?Oi(l):[])}return e.concat(n,Oi(n,[],t))}function Ys(i){return i.parent&&Object.getPrototypeOf(i.parent)?i.frameElement:null}function Nl(i){const e=Tt(i);let t=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const n=Nt(i),s=n?i.offsetWidth:t,a=n?i.offsetHeight:r,l=$n(t)!==s||$n(r)!==a;return l&&(t=s,r=a),{width:t,height:r,$:l}}function Oa(i){return It(i)?i:i.contextElement}function ni(i){const e=Oa(i);if(!Nt(e))return $t(1);const t=e.getBoundingClientRect(),{width:r,height:n,$:s}=Nl(e);let a=(s?$n(t.width):t.width)/r,l=(s?$n(t.height):t.height)/n;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const Mp=$t(0);function Vl(i){const e=pt(i);return!Ea()||!e.visualViewport?Mp:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Bp(i,e,t){return e===void 0&&(e=!1),!t||e&&t!==pt(i)?!1:e}function qr(i,e,t,r){e===void 0&&(e=!1),t===void 0&&(t=!1);const n=i.getBoundingClientRect(),s=Oa(i);let a=$t(1);e&&(r?It(r)&&(a=ni(r)):a=ni(i));const l=Bp(s,t,r)?Vl(s):$t(0);let u=(n.left+l.x)/a.x,d=(n.top+l.y)/a.y,c=n.width/a.x,p=n.height/a.y;if(s){const f=pt(s),m=r&&It(r)?pt(r):r;let h=f,g=Ys(h);for(;g&&r&&m!==h;){const v=ni(g),b=g.getBoundingClientRect(),C=Tt(g),x=b.left+(g.clientLeft+parseFloat(C.paddingLeft))*v.x,A=b.top+(g.clientTop+parseFloat(C.paddingTop))*v.y;u*=v.x,d*=v.y,c*=v.x,p*=v.y,u+=x,d+=A,h=pt(g),g=Ys(h)}}return Hn({width:c,height:p,x:u,y:d})}function ts(i,e){const t=es(i).scrollLeft;return e?e.left+t:qr(Wt(i)).left+t}function Ul(i,e){const t=i.getBoundingClientRect(),r=t.left+e.scrollLeft-ts(i,t),n=t.top+e.scrollTop;return{x:r,y:n}}function kp(i){let{elements:e,rect:t,offsetParent:r,strategy:n}=i;const s=n==="fixed",a=Wt(r),l=e?Qn(e.floating):!1;if(r===a||l&&s)return t;let u={scrollLeft:0,scrollTop:0},d=$t(1);const c=$t(0),p=Nt(r);if((p||!p&&!s)&&((Ir(r)!=="body"||Ui(a))&&(u=es(r)),Nt(r))){const m=qr(r);d=ni(r),c.x=m.x+r.clientLeft,c.y=m.y+r.clientTop}const f=a&&!p&&!s?Ul(a,u):$t(0);return{width:t.width*d.x,height:t.height*d.y,x:t.x*d.x-u.scrollLeft*d.x+c.x+f.x,y:t.y*d.y-u.scrollTop*d.y+c.y+f.y}}function qp(i){return Array.from(i.getClientRects())}function Fp(i){const e=Wt(i),t=es(i),r=i.ownerDocument.body,n=dt(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),s=dt(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let a=-t.scrollLeft+ts(i);const l=-t.scrollTop;return Tt(r).direction==="rtl"&&(a+=dt(e.clientWidth,r.clientWidth)-n),{width:n,height:s,x:a,y:l}}const go=25;function Ep(i,e){const t=pt(i),r=Wt(i),n=t.visualViewport;let s=r.clientWidth,a=r.clientHeight,l=0,u=0;if(n){s=n.width,a=n.height;const c=Ea();(!c||c&&e==="fixed")&&(l=n.offsetLeft,u=n.offsetTop)}const d=ts(r);if(d<=0){const c=r.ownerDocument,p=c.body,f=getComputedStyle(p),m=c.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,h=Math.abs(r.clientWidth-p.clientWidth-m);h<=go&&(s-=h)}else d<=go&&(s+=d);return{width:s,height:a,x:l,y:u}}const Op=new Set(["absolute","fixed"]);function zp(i,e){const t=qr(i,!0,e==="fixed"),r=t.top+i.clientTop,n=t.left+i.clientLeft,s=Nt(i)?ni(i):$t(1),a=i.clientWidth*s.x,l=i.clientHeight*s.y,u=n*s.x,d=r*s.y;return{width:a,height:l,x:u,y:d}}function yo(i,e,t){let r;if(e==="viewport")r=Ep(i,t);else if(e==="document")r=Fp(Wt(i));else if(It(e))r=zp(e,t);else{const n=Vl(i);r={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return Hn(r)}function jl(i,e){const t=pr(i);return t===e||!It(t)||di(t)?!1:Tt(t).position==="fixed"||jl(t,e)}function Ip(i,e){const t=e.get(i);if(t)return t;let r=Oi(i,[],!1).filter(l=>It(l)&&Ir(l)!=="body"),n=null;const s=Tt(i).position==="fixed";let a=s?pr(i):i;for(;It(a)&&!di(a);){const l=Tt(a),u=Fa(a);!u&&l.position==="fixed"&&(n=null),(s?!u&&!n:!u&&l.position==="static"&&!!n&&Op.has(n.position)||Ui(a)&&!u&&jl(i,a))?r=r.filter(c=>c!==a):n=l,a=pr(a)}return e.set(i,r),r}function Tp(i){let{element:e,boundary:t,rootBoundary:r,strategy:n}=i;const a=[...t==="clippingAncestors"?Qn(e)?[]:Ip(e,this._c):[].concat(t),r],l=a[0],u=a.reduce((d,c)=>{const p=yo(e,c,n);return d.top=dt(p.top,d.top),d.right=cr(p.right,d.right),d.bottom=cr(p.bottom,d.bottom),d.left=dt(p.left,d.left),d},yo(e,l,n));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function Pp(i){const{width:e,height:t}=Nl(i);return{width:e,height:t}}function Rp(i,e,t){const r=Nt(e),n=Wt(e),s=t==="fixed",a=qr(i,!0,s,e);let l={scrollLeft:0,scrollTop:0};const u=$t(0);function d(){u.x=ts(n)}if(r||!r&&!s)if((Ir(e)!=="body"||Ui(n))&&(l=es(e)),r){const m=qr(e,!0,s,e);u.x=m.x+e.clientLeft,u.y=m.y+e.clientTop}else n&&d();s&&!r&&n&&d();const c=n&&!r&&!s?Ul(n,l):$t(0),p=a.left+l.scrollLeft-u.x-c.x,f=a.top+l.scrollTop-u.y-c.y;return{x:p,y:f,width:a.width,height:a.height}}function ms(i){return Tt(i).position==="static"}function vo(i,e){if(!Nt(i)||Tt(i).position==="fixed")return null;if(e)return e(i);let t=i.offsetParent;return Wt(i)===t&&(t=t.ownerDocument.body),t}function Wl(i,e){const t=pt(i);if(Qn(i))return t;if(!Nt(i)){let n=pr(i);for(;n&&!di(n);){if(It(n)&&!ms(n))return n;n=pr(n)}return t}let r=vo(i,e);for(;r&&bp(r)&&ms(r);)r=vo(r,e);return r&&di(r)&&ms(r)&&!Fa(r)?t:r||Ap(i)||t}const Dp=async function(i){const e=this.getOffsetParent||Wl,t=this.getDimensions,r=await t(i.floating);return{reference:Rp(i.reference,await e(i.floating),i.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function $p(i){return Tt(i).direction==="rtl"}const Lp={convertOffsetParentRelativeRectToViewportRelativeRect:kp,getDocumentElement:Wt,getClippingRect:Tp,getOffsetParent:Wl,getElementRects:Dp,getClientRects:qp,getDimensions:Pp,getScale:ni,isElement:It,isRTL:$p};function Gl(i,e){return i.x===e.x&&i.y===e.y&&i.width===e.width&&i.height===e.height}function Hp(i,e){let t=null,r;const n=Wt(i);function s(){var l;clearTimeout(r),(l=t)==null||l.disconnect(),t=null}function a(l,u){l===void 0&&(l=!1),u===void 0&&(u=1),s();const d=i.getBoundingClientRect(),{left:c,top:p,width:f,height:m}=d;if(l||e(),!f||!m)return;const h=ln(p),g=ln(n.clientWidth-(c+f)),v=ln(n.clientHeight-(p+m)),b=ln(c),x={rootMargin:-h+"px "+-g+"px "+-v+"px "+-b+"px",threshold:dt(0,cr(1,u))||1};let A=!0;function q(S){const B=S[0].intersectionRatio;if(B!==u){if(!A)return a();B?a(!1,B):r=setTimeout(()=>{a(!1,1e-7)},1e3)}B===1&&!Gl(d,i.getBoundingClientRect())&&a(),A=!1}try{t=new IntersectionObserver(q,{...x,root:n.ownerDocument})}catch{t=new IntersectionObserver(q,x)}t.observe(i)}return a(!0),s}function Np(i,e,t,r){r===void 0&&(r={});const{ancestorScroll:n=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,d=Oa(i),c=n||s?[...d?Oi(d):[],...Oi(e)]:[];c.forEach(b=>{n&&b.addEventListener("scroll",t,{passive:!0}),s&&b.addEventListener("resize",t)});const p=d&&l?Hp(d,t):null;let f=-1,m=null;a&&(m=new ResizeObserver(b=>{let[C]=b;C&&C.target===d&&m&&(m.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var x;(x=m)==null||x.observe(e)})),t()}),d&&!u&&m.observe(d),m.observe(e));let h,g=u?qr(i):null;u&&v();function v(){const b=qr(i);g&&!Gl(g,b)&&t(),g=b,h=requestAnimationFrame(v)}return t(),()=>{var b;c.forEach(C=>{n&&C.removeEventListener("scroll",t),s&&C.removeEventListener("resize",t)}),p?.(),(b=m)==null||b.disconnect(),m=null,u&&cancelAnimationFrame(h)}}const Vp=fp,Up=hp,bo=dp,jp=gp,Wp=cp,Gp=up,Kp=mp,Xp=(i,e,t)=>{const r=new Map,n={platform:Lp,...t},s={...n.platform,_c:r};return lp(i,e,{...n,platform:s})};function Yp(i){return i!=null&&typeof i=="object"&&"$el"in i}function Js(i){if(Yp(i)){const e=i.$el;return qa(e)&&Ir(e)==="#comment"?null:e}return i}function Qr(i){return typeof i=="function"?i():o(i)}function Jp(i){return{name:"arrow",options:i,fn(e){const t=Js(Qr(i.element));return t==null?{}:Gp({element:t,padding:i.padding}).fn(e)}}}function Kl(i){return typeof window>"u"?1:(i.ownerDocument.defaultView||window).devicePixelRatio||1}function xo(i,e){const t=Kl(i);return Math.round(e*t)/t}function Zp(i,e,t){t===void 0&&(t={});const r=t.whileElementsMounted,n=F(()=>{var B;return(B=Qr(t.open))!=null?B:!0}),s=F(()=>Qr(t.middleware)),a=F(()=>{var B;return(B=Qr(t.placement))!=null?B:"bottom"}),l=F(()=>{var B;return(B=Qr(t.strategy))!=null?B:"absolute"}),u=F(()=>{var B;return(B=Qr(t.transform))!=null?B:!0}),d=F(()=>Js(i.value)),c=F(()=>Js(e.value)),p=T(0),f=T(0),m=T(l.value),h=T(a.value),g=Tn({}),v=T(!1),b=F(()=>{const B={position:m.value,left:"0",top:"0"};if(!c.value)return B;const k=xo(c.value,p.value),N=xo(c.value,f.value);return u.value?{...B,transform:"translate("+k+"px, "+N+"px)",...Kl(c.value)>=1.5&&{willChange:"transform"}}:{position:m.value,left:k+"px",top:N+"px"}});let C;function x(){if(d.value==null||c.value==null)return;const B=n.value;Xp(d.value,c.value,{middleware:s.value,placement:a.value,strategy:l.value}).then(k=>{p.value=k.x,f.value=k.y,m.value=k.strategy,h.value=k.placement,g.value=k.middlewareData,v.value=B!==!1})}function A(){typeof C=="function"&&(C(),C=void 0)}function q(){if(A(),r===void 0){x();return}if(d.value!=null&&c.value!=null){C=r(d.value,c.value,x);return}}function S(){n.value||(v.value=!1)}return Ie([s,a,l,n],x,{flush:"sync"}),Ie([d,c],q,{flush:"sync"}),Ie(n,S,{flush:"sync"}),yd()&&vd(A),{x:Dr(p),y:Dr(f),strategy:Dr(m),placement:Dr(h),middlewareData:Dr(g),isPositioned:Dr(v),floatingStyles:b,update:x}}const Xl={side:"bottom",sideOffset:0,sideFlip:!0,align:"center",alignOffset:0,alignFlip:!0,arrowPadding:0,hideShiftedArrow:!0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:"partial",hideWhenDetached:!1,positionStrategy:"fixed",updatePositionStrategy:"optimized",prioritizePosition:!1},[Qp,ef]=Te("PopperContent");var tf=P({inheritAttrs:!1,__name:"PopperContent",props:gl({side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},{...Xl}),emits:["placed"],setup(i,{emit:e}){const t=i,r=e,n=Dl(),{forwardRef:s,currentElement:a}=Q(),l=T(),u=T(),{width:d,height:c}=rc(u),p=F(()=>t.side+(t.align!=="center"?`-${t.align}`:"")),f=F(()=>typeof t.collisionPadding=="number"?t.collisionPadding:{top:0,right:0,bottom:0,left:0,...t.collisionPadding}),m=F(()=>Array.isArray(t.collisionBoundary)?t.collisionBoundary:[t.collisionBoundary]),h=F(()=>({padding:f.value,boundary:m.value.filter(Kc),altBoundary:m.value.length>0})),g=F(()=>({mainAxis:t.sideFlip,crossAxis:t.alignFlip})),v=bd(()=>[Vp({mainAxis:t.sideOffset+c.value,alignmentAxis:t.alignOffset}),t.prioritizePosition&&t.avoidCollisions&&bo({...h.value,...g.value}),t.avoidCollisions&&Up({mainAxis:!0,crossAxis:!!t.prioritizePosition,limiter:t.sticky==="partial"?Kp():void 0,...h.value}),!t.prioritizePosition&&t.avoidCollisions&&bo({...h.value,...g.value}),jp({...h.value,apply:({elements:W,rects:J,availableWidth:ie,availableHeight:O})=>{const{width:U,height:re}=J.reference,X=W.floating.style;X.setProperty("--reka-popper-available-width",`${ie}px`),X.setProperty("--reka-popper-available-height",`${O}px`),X.setProperty("--reka-popper-anchor-width",`${U}px`),X.setProperty("--reka-popper-anchor-height",`${re}px`)}}),u.value&&Jp({element:u.value,padding:t.arrowPadding}),Xc({arrowWidth:d.value,arrowHeight:c.value}),t.hideWhenDetached&&Wp({strategy:"referenceHidden",...h.value})]),b=F(()=>t.reference??n.anchor.value),{floatingStyles:C,placement:x,isPositioned:A,middlewareData:q}=Zp(b,l,{strategy:t.positionStrategy,placement:p,whileElementsMounted:(...W)=>Np(...W,{layoutShift:!t.disableUpdateOnLayoutShift,animationFrame:t.updatePositionStrategy==="always"}),middleware:v}),S=F(()=>Gs(x.value)[0]),B=F(()=>Gs(x.value)[1]);pa(()=>{A.value&&r("placed")});const k=F(()=>{const W=q.value.arrow?.centerOffset!==0;return t.hideShiftedArrow&&W}),N=T("");xt(()=>{a.value&&(N.value=window.getComputedStyle(a.value).zIndex)});const z=F(()=>q.value.arrow?.x??0),j=F(()=>q.value.arrow?.y??0);return ef({placedSide:S,onArrowChange:W=>u.value=W,arrowX:z,arrowY:j,shouldHideArrow:k}),(W,J)=>(y(),V("div",{ref_key:"floatingRef",ref:l,"data-reka-popper-content-wrapper":"",style:Et({...o(C),transform:o(A)?o(C).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:N.value,"--reka-popper-transform-origin":[o(q).transformOrigin?.x,o(q).transformOrigin?.y].join(" "),...o(q).hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}})},[E(o(se),L({ref:o(s)},W.$attrs,{"as-child":t.asChild,as:W.as,"data-side":S.value,"data-align":B.value,style:{animation:o(A)?void 0:"none"}}),{default:w(()=>[M(W.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4))}}),rs=tf;const rf={top:"bottom",right:"left",bottom:"top",left:"right"};var nf=P({inheritAttrs:!1,__name:"PopperArrow",props:{width:{type:Number,required:!1},height:{type:Number,required:!1},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(i){const{forwardRef:e}=Q(),t=Qp(),r=F(()=>rf[t.placedSide.value]);return(n,s)=>(y(),V("span",{ref:a=>{o(t).onArrowChange(a??void 0)},style:Et({position:"absolute",left:o(t).arrowX?.value?`${o(t).arrowX?.value}px`:void 0,top:o(t).arrowY?.value?`${o(t).arrowY?.value}px`:void 0,[r.value]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o(t).placedSide.value],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o(t).placedSide.value],visibility:o(t).shouldHideArrow.value?"hidden":void 0})},[E(Gc,L(n.$attrs,{ref:o(e),style:{display:"block"},as:n.as,"as-child":n.asChild,rounded:n.rounded,width:n.width,height:n.height}),{default:w(()=>[M(n.$slots,"default")]),_:3},16,["as","as-child","rounded","width","height"])],4))}}),is=nf;const[sf,af]=Te("RovingFocusGroup");var of=P({__name:"RovingFocusGroup",props:{orientation:{type:String,required:!1,default:void 0},dir:{type:String,required:!1},loop:{type:Boolean,required:!1,default:!1},currentTabStopId:{type:[String,null],required:!1},defaultCurrentTabStopId:{type:String,required:!1},preventScrollOnEntryFocus:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["entryFocus","update:currentTabStopId"],setup(i,{expose:e,emit:t}){const r=i,n=t,{loop:s,orientation:a,dir:l}=wt(r),u=Jn(l),d=We(r,"currentTabStopId",n,{defaultValue:r.defaultCurrentTabStopId,passive:r.currentTabStopId===void 0}),c=T(!1),p=T(!1),f=T(0),{getItems:m,CollectionSlot:h}=fa({isProvider:!0});function g(b){const C=!p.value;if(b.currentTarget&&b.target===b.currentTarget&&C&&!c.value){const x=new CustomEvent(Tc,Pc);if(b.currentTarget.dispatchEvent(x),n("entryFocus",x),!x.defaultPrevented){const A=m().map(N=>N.ref).filter(N=>N.dataset.disabled!==""),q=A.find(N=>N.getAttribute("data-active")===""),S=A.find(N=>N.getAttribute("data-highlighted")===""),B=A.find(N=>N.id===d.value),k=[q,S,B,...A].filter(Boolean);Rl(k,r.preventScrollOnEntryFocus)}}p.value=!1}function v(){setTimeout(()=>{p.value=!1},1)}return e({getItems:m}),af({loop:s,dir:u,orientation:a,currentTabStopId:d,onItemFocus:b=>{d.value=b},onItemShiftTab:()=>{c.value=!0},onFocusableItemAdd:()=>{f.value++},onFocusableItemRemove:()=>{f.value--}}),(b,C)=>(y(),_(o(h),null,{default:w(()=>[E(o(se),{tabindex:c.value||f.value===0?-1:0,"data-orientation":o(a),as:b.as,"as-child":b.asChild,dir:o(u),style:{outline:"none"},onMousedown:C[0]||(C[0]=x=>p.value=!0),onMouseup:v,onFocus:g,onBlur:C[1]||(C[1]=x=>c.value=!1)},{default:w(()=>[M(b.$slots,"default")]),_:3},8,["tabindex","data-orientation","as","as-child","dir"])]),_:3}))}}),Yl=of,lf=P({__name:"RovingFocusItem",props:{tabStopId:{type:String,required:!1},focusable:{type:Boolean,required:!1,default:!0},active:{type:Boolean,required:!1},allowShiftKey:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(i){const e=i,t=sf(),r=ft(),n=F(()=>e.tabStopId||r),s=F(()=>t.currentTabStopId.value===n.value),{getItems:a,CollectionItem:l}=fa();Ne(()=>{e.focusable&&t.onFocusableItemAdd()}),gr(()=>{e.focusable&&t.onFocusableItemRemove()});function u(d){if(d.key==="Tab"&&d.shiftKey){t.onItemShiftTab();return}if(d.target!==d.currentTarget)return;const c=$c(d,t.orientation.value,t.dir.value);if(c!==void 0){if(d.metaKey||d.ctrlKey||d.altKey||!e.allowShiftKey&&d.shiftKey)return;d.preventDefault();let p=[...a().map(f=>f.ref).filter(f=>f.dataset.disabled!=="")];if(c==="last")p.reverse();else if(c==="prev"||c==="next"){c==="prev"&&p.reverse();const f=p.indexOf(d.currentTarget);p=t.loop.value?Lc(p,f+1):p.slice(f+1)}tt(()=>Rl(p))}}return(d,c)=>(y(),_(o(l),null,{default:w(()=>[E(o(se),{tabindex:s.value?0:-1,"data-orientation":o(t).orientation.value,"data-active":d.active?"":void 0,"data-disabled":d.focusable?void 0:"",as:d.as,"as-child":d.asChild,onMousedown:c[0]||(c[0]=p=>{d.focusable?o(t).onItemFocus(n.value):p.preventDefault()}),onFocus:c[1]||(c[1]=p=>o(t).onItemFocus(n.value)),onKeydown:u},{default:w(()=>[M(d.$slots,"default")]),_:3},8,["tabindex","data-orientation","data-active","data-disabled","as","as-child"])]),_:3}))}}),Jl=lf;const[uf]=Te("CheckboxGroupRoot");function za(i){return i==="indeterminate"}function Zl(i){return za(i)?"indeterminate":i?"checked":"unchecked"}const[df,cf]=Te("CheckboxRoot");var pf=P({inheritAttrs:!1,__name:"CheckboxRoot",props:{defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1,default:void 0},disabled:{type:Boolean,required:!1},value:{type:null,required:!1,default:"on"},id:{type:String,required:!1},trueValue:{type:null,required:!1,default:()=>!0},falseValue:{type:null,required:!1,default:()=>!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue"],setup(i,{emit:e}){const t=i,r=e,{forwardRef:n,currentElement:s}=Q(),a=uf(null),l=We(t,"modelValue",r,{defaultValue:t.defaultValue??t.falseValue,passive:t.modelValue===void 0}),u=F(()=>a?.disabled.value||t.disabled),d=F(()=>In(l.value,t.trueValue)),c=F(()=>ri(a?.modelValue.value)?l.value==="indeterminate"?"indeterminate":d.value:no(a.modelValue.value,t.value));function p(){if(ri(a?.modelValue.value))l.value==="indeterminate"?l.value=t.trueValue:l.value=d.value?t.falseValue:t.trueValue;else{const h=[...a.modelValue.value||[]];if(no(h,t.value)){const g=h.findIndex(v=>In(v,t.value));h.splice(g,1)}else h.push(t.value);a.modelValue.value=h}}const f=Fl(s),m=F(()=>t.id&&s.value?document.querySelector(`[for="${t.id}"]`)?.innerText:void 0);return cf({disabled:u,state:c}),(h,g)=>(y(),_(pi(o(a)?.rovingFocus.value?o(Jl):o(se)),L(h.$attrs,{id:h.id,ref:o(n),role:"checkbox","as-child":h.asChild,as:h.as,type:h.as==="button"?"button":void 0,"aria-checked":o(za)(c.value)?"mixed":c.value,"aria-required":h.required,"aria-label":h.$attrs["aria-label"]||m.value,"data-state":o(Zl)(c.value),"data-disabled":u.value?"":void 0,disabled:u.value,focusable:o(a)?.rovingFocus.value?!u.value:void 0,onKeydown:Ei(ye(()=>{},["prevent"]),["enter"]),onClick:p}),{default:w(()=>[M(h.$slots,"default",{modelValue:o(l),state:c.value}),o(f)&&h.name&&!o(a)?(y(),_(o(Pl),{key:0,type:"checkbox",checked:!!c.value,name:h.name,value:h.value,disabled:u.value,required:h.required},null,8,["checked","name","value","disabled","required"])):R("v-if",!0)]),_:3},16,["id","as-child","as","type","aria-checked","aria-required","aria-label","data-state","data-disabled","disabled","focusable","onKeydown"]))}}),ff=pf,hf=P({__name:"CheckboxIndicator",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(i){const{forwardRef:e}=Q(),t=df();return(r,n)=>(y(),_(o(Ut),{present:r.forceMount||o(za)(o(t).state.value)||o(t).state.value===!0},{default:w(()=>[E(o(se),L({ref:o(e),"data-state":o(Zl)(o(t).state.value),"data-disabled":o(t).disabled.value?"":void 0,style:{pointerEvents:"none"},"as-child":r.asChild,as:r.as},r.$attrs),{default:w(()=>[M(r.$slots,"default")]),_:3},16,["data-state","data-disabled","as-child","as"])]),_:3},8,["present"]))}}),mf=hf,gf=P({__name:"MenuAnchor",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(i){const e=i;return(t,r)=>(y(),_(o(Vi),oe(le(e)),{default:w(()=>[M(t.$slots,"default")]),_:3},16))}}),Ql=gf,yf=P({__name:"MenuArrow",props:{width:{type:Number,required:!1},height:{type:Number,required:!1},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(i){const e=i;return(t,r)=>(y(),_(o(is),oe(le(e)),{default:w(()=>[M(t.$slots,"default")]),_:3},16))}}),vf=yf;function bf(){const i=T(!1);return Ne(()=>{vt("keydown",()=>{i.value=!0},{capture:!0,passive:!0}),vt(["pointerdown","pointermove"],()=>{i.value=!1},{capture:!0,passive:!0})}),i}const xf=Xn(bf),[Tr,eu]=Te(["MenuRoot","MenuSub"],"MenuContext"),[vi,wf]=Te("MenuRoot");var _f=P({__name:"MenuRoot",props:{open:{type:Boolean,required:!1,default:!1},dir:{type:String,required:!1},modal:{type:Boolean,required:!1,default:!0}},emits:["update:open"],setup(i,{emit:e}){const t=i,r=e,{modal:n,dir:s}=wt(t),a=Jn(s),l=We(t,"open",r),u=T(),d=xf();return eu({open:l,onOpenChange:c=>{l.value=c},content:u,onContentChange:c=>{u.value=c}}),wf({onClose:()=>{l.value=!1},isUsingKeyboardRef:d,dir:a,modal:n}),(c,p)=>(y(),_(o(Ni),null,{default:w(()=>[M(c.$slots,"default")]),_:3}))}}),Cf=_f;const[ji,Af]=Te("MenuContent");var Sf=P({__name:"MenuContentImpl",props:gl({loop:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},disableOutsideScroll:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},{...Xl}),emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus","dismiss"],setup(i,{emit:e}){const t=i,r=e,n=Tr(),s=vi(),{trapFocus:a,disableOutsidePointerEvents:l,loop:u}=wt(t);ql(),ya(l.value);const d=T(""),c=T(0),p=T(0),f=T(null),m=T("right"),h=T(0),g=T(null),v=T(),{forwardRef:b,currentElement:C}=Q(),{handleTypeaheadSearch:x}=ic(),A=T();function q(O){const U=so(O,A.value||rt(),C.value,{loop:u.value,arrowKeyOptions:"vertical",dir:s?.dir.value,focus:!1,attributeName:"[data-reka-collection-item]:not([data-disabled])"});U&&(A.value=U,U.scrollIntoView({block:"nearest"}))}function S(){A.value&&A.value.click()}const B=T(),k=T();Ie(A,O=>{k.value&&(O===void 0||O!==k.value.trigger.value)&&(k.value.onOpenChange(!1),k.value=void 0)}),Ie(C,O=>{n.onContentChange(O)}),gr(()=>{window.clearTimeout(c.value)});function N(O){return m.value===f.value?.side&&bc(O,f.value?.area)}async function z(O){r("openAutoFocus",O),!O.defaultPrevented&&(O.preventDefault(),C.value?.focus({preventScroll:!0}))}function j(O){if(O.defaultPrevented)return;const U=O.target,re=U.closest("[data-reka-menu-content]")===O.currentTarget,X=["input","textarea"].includes(U.tagName.toLowerCase()),ce=O.ctrlKey||O.altKey||O.metaKey,te=O.key.length===1,fe=so(O,rt(),C.value,{loop:u.value,arrowKeyOptions:"vertical",dir:s?.dir.value,focus:!0,attributeName:"[data-reka-collection-item]:not([data-disabled])"});if(fe)return fe?.focus();if(O.code==="Space")return;const _t=v.value?.getItems()??[];if(re&&(O.key==="Tab"&&O.preventDefault(),!ce&&te&&!X&&x(O.key,_t)),O.target!==C.value||!hc.includes(O.key))return;O.preventDefault();const Qi=[..._t.map(ls=>ls.ref)];Il.includes(O.key)&&Qi.reverse(),yc(Qi)}function W(O){O?.currentTarget?.contains?.(O.target)||(window.clearTimeout(c.value),d.value="")}function J(O){if(!ui(O))return;const U=O.target,re=h.value!==O.clientX;if(O?.currentTarget?.contains(U)&&re){const X=O.clientX>h.value?"right":"left";m.value=X,h.value=O.clientX}}function ie(O){ui(O)&&B.value&&B.value.focus()}return Af({onItemEnter:O=>!!N(O),onItemLeave:O=>N(O)?!0:(["INPUT","TEXTAREA"].includes(rt()?.tagName||"")||C.value?.focus(),g.value=null,!1),onTriggerLeave:O=>!!N(O),searchRef:d,highlightedElement:A,onKeydownNavigation:q,onKeydownEnter:S,filterElement:B,onFilterElementChange:O=>{B.value=O},activeSubmenuContext:k,pointerGraceTimerRef:p,onPointerGraceIntentChange:O=>{f.value=O}}),(O,U)=>(y(),_(o(xa),{"as-child":"",trapped:o(a),onMountAutoFocus:z,onUnmountAutoFocus:U[7]||(U[7]=re=>r("closeAutoFocus",re))},{default:w(()=>[E(o(Ri),{"as-child":"","disable-outside-pointer-events":o(l),onEscapeKeyDown:U[2]||(U[2]=re=>r("escapeKeyDown",re)),onPointerDownOutside:U[3]||(U[3]=re=>r("pointerDownOutside",re)),onFocusOutside:U[4]||(U[4]=re=>r("focusOutside",re)),onInteractOutside:U[5]||(U[5]=re=>r("interactOutside",re)),onDismiss:U[6]||(U[6]=re=>r("dismiss"))},{default:w(()=>[E(o(Yl),{ref_key:"rovingFocusGroupRef",ref:v,"current-tab-stop-id":g.value,"onUpdate:currentTabStopId":U[0]||(U[0]=re=>g.value=re),"as-child":"",orientation:"vertical",dir:o(s).dir.value,loop:o(u),onEntryFocus:U[1]||(U[1]=re=>{r("entryFocus",re),o(s).isUsingKeyboardRef.value||re.preventDefault()})},{default:w(()=>[E(o(rs),{ref:o(b),role:"menu",as:O.as,"as-child":O.asChild,"aria-orientation":"vertical","data-reka-menu-content":"","data-state":o(wa)(o(n).open.value),dir:o(s).dir.value,side:O.side,"side-offset":O.sideOffset,align:O.align,"align-offset":O.alignOffset,"avoid-collisions":O.avoidCollisions,"collision-boundary":O.collisionBoundary,"collision-padding":O.collisionPadding,"arrow-padding":O.arrowPadding,"prioritize-position":O.prioritizePosition,"position-strategy":O.positionStrategy,"update-position-strategy":O.updatePositionStrategy,sticky:O.sticky,"hide-when-detached":O.hideWhenDetached,reference:O.reference,onKeydown:j,onBlur:W,onPointermove:J,onPointerenter:ie},{default:w(()=>[M(O.$slots,"default")]),_:3},8,["as","as-child","data-state","dir","side","side-offset","align","align-offset","avoid-collisions","collision-boundary","collision-padding","arrow-padding","prioritize-position","position-strategy","update-position-strategy","sticky","hide-when-detached","reference"])]),_:3},8,["current-tab-stop-id","dir","loop"])]),_:3},8,["disable-outside-pointer-events"])]),_:3},8,["trapped"]))}}),Ia=Sf,Mf=P({inheritAttrs:!1,__name:"MenuItemImpl",props:{disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(i){const e=i,t=ji(),{forwardRef:r,currentElement:n}=Q(),{CollectionItem:s}=fa(),a=T(!1),l=F(()=>a.value||n.value!=null&&t.highlightedElement.value===n.value);async function u(c){if(!(c.defaultPrevented||!ui(c))){if(e.disabled)t.onItemLeave(c);else if(!t.onItemEnter(c)){const f=c.currentTarget;t.highlightedElement.value=f,["INPUT","TEXTAREA"].includes(rt()?.tagName||"")||f.focus({preventScroll:!0})}}}async function d(c){if(await tt(),c.defaultPrevented||!ui(c)||t.highlightedElement.value!==n.value)return;!t.onItemLeave(c)&&t.highlightedElement.value===n.value&&(t.highlightedElement.value=void 0)}return(c,p)=>(y(),_(o(s),{value:{textValue:c.textValue}},{default:w(()=>[E(o(se),L({ref:o(r),role:"menuitem",tabindex:"-1"},c.$attrs,{as:c.as,"as-child":c.asChild,"aria-disabled":c.disabled||void 0,"data-disabled":c.disabled?"":void 0,"data-highlighted":l.value?"":void 0,onPointermove:u,onPointerleave:d,onFocus:p[0]||(p[0]=async f=>{await tt(),!(f.defaultPrevented||c.disabled)&&(a.value=!0,o(t).highlightedElement.value=f.currentTarget)}),onBlur:p[1]||(p[1]=async f=>{await tt(),!f.defaultPrevented&&(a.value=!1)})}),{default:w(()=>[M(c.$slots,"default")]),_:3},16,["as","as-child","aria-disabled","data-disabled","data-highlighted"])]),_:3},8,["value"]))}}),tu=Mf,Bf=P({__name:"MenuItem",props:{disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select"],setup(i,{emit:e}){const t=i,r=e,{forwardRef:n,currentElement:s}=Q(),a=vi(),l=ji(),u=T(!1);async function d(){const c=s.value;if(!t.disabled&&c){const p=new CustomEvent(pc,{bubbles:!0,cancelable:!0});r("select",p),await tt(),p.defaultPrevented?u.value=!1:a.onClose()}}return(c,p)=>(y(),_(tu,L(t,{ref:o(n),onClick:d,onPointerdown:p[0]||(p[0]=()=>{u.value=!0}),onPointerup:p[1]||(p[1]=async f=>{await tt(),!f.defaultPrevented&&(u.value||f.currentTarget?.click())}),onKeydown:p[2]||(p[2]=async f=>{const m=o(l).searchRef.value!=="";c.disabled||m&&f.key===" "||o(Ws).includes(f.key)&&(f.currentTarget?.click(),f.preventDefault())})}),{default:w(()=>[M(c.$slots,"default")]),_:3},16))}}),Ta=Bf;const[kf,ru]=Te(["MenuCheckboxItem","MenuRadioItem"],"MenuItemIndicatorContext");var qf=P({__name:"MenuItemIndicator",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(i){const e=kf({modelValue:T(!1)});return(t,r)=>(y(),_(o(Ut),{present:t.forceMount||o(Rn)(o(e).modelValue.value)||o(e).modelValue.value===!0},{default:w(()=>[E(o(se),{as:t.as,"as-child":t.asChild,"data-state":o(_a)(o(e).modelValue.value)},{default:w(()=>[M(t.$slots,"default")]),_:3},8,["as","as-child","data-state"])]),_:3},8,["present"]))}}),Ff=qf,Ef=P({__name:"MenuCheckboxItem",props:{modelValue:{type:[Boolean,String],required:!1,default:!1},disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select","update:modelValue"],setup(i,{emit:e}){const t=i,r=e,n=fi(t,["modelValue"]),s=Er(n),a=We(t,"modelValue",r);return ru({modelValue:a}),(l,u)=>(y(),_(Ta,L({role:"menuitemcheckbox"},o(s),{"aria-checked":o(Rn)(o(a))?"mixed":o(a),"data-state":o(_a)(o(a)),onSelect:u[0]||(u[0]=async d=>{r("select",d),o(Rn)(o(a))?a.value=!0:a.value=!o(a)})}),{default:w(()=>[M(l.$slots,"default",{modelValue:o(a)})]),_:3},16,["aria-checked","data-state"]))}}),Of=Ef,zf=P({__name:"MenuRootContentModal",props:{loop:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(i,{emit:e}){const t=i,r=e,n=ot(t,r),s=Tr(),{forwardRef:a,currentElement:l}=Q();return va(l),(u,d)=>(y(),_(Ia,L(o(n),{ref:o(a),"trap-focus":o(s).open.value,"disable-outside-pointer-events":o(s).open.value,"disable-outside-scroll":!0,onDismiss:d[0]||(d[0]=c=>o(s).onOpenChange(!1)),onFocusOutside:d[1]||(d[1]=ye(c=>r("focusOutside",c),["prevent"]))}),{default:w(()=>[M(u.$slots,"default")]),_:3},16,["trap-focus","disable-outside-pointer-events"]))}}),If=zf,Tf=P({__name:"MenuRootContentNonModal",props:{loop:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(i,{emit:e}){const n=ot(i,e),s=Tr();return(a,l)=>(y(),_(Ia,L(o(n),{"trap-focus":!1,"disable-outside-pointer-events":!1,"disable-outside-scroll":!1,onDismiss:l[0]||(l[0]=u=>o(s).onOpenChange(!1))}),{default:w(()=>[M(a.$slots,"default")]),_:3},16))}}),Pf=Tf,Rf=P({__name:"MenuContent",props:{forceMount:{type:Boolean,required:!1},loop:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(i,{emit:e}){const n=ot(i,e),s=Tr(),a=vi();return(l,u)=>(y(),_(o(Ut),{present:l.forceMount||o(s).open.value},{default:w(()=>[o(a).modal.value?(y(),_(If,oe(L({key:0},{...l.$attrs,...o(n)})),{default:w(()=>[M(l.$slots,"default")]),_:3},16)):(y(),_(Pf,oe(L({key:1},{...l.$attrs,...o(n)})),{default:w(()=>[M(l.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),Df=Rf;const[$f,Lf]=Te("MenuGroup");var Hf=P({__name:"MenuGroup",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(i){const e=i,t=ft(void 0,"reka-menu-group");return Lf({id:t}),(r,n)=>(y(),_(o(se),L({role:"group"},e,{"aria-labelledby":o(t)}),{default:w(()=>[M(r.$slots,"default")]),_:3},16,["aria-labelledby"]))}}),iu=Hf,Nf=P({__name:"MenuLabel",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},setup(i){const e=i,t=$f({id:""});return(r,n)=>(y(),_(o(se),L(e,{id:o(t).id||void 0}),{default:w(()=>[M(r.$slots,"default")]),_:3},16,["id"]))}}),Vf=Nf,Uf=P({__name:"MenuPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(i){const e=i;return(t,r)=>(y(),_(o(Di),oe(le(e)),{default:w(()=>[M(t.$slots,"default")]),_:3},16))}}),jf=Uf;const[Wf,Gf]=Te("MenuRadioGroup");var Kf=P({__name:"MenuRadioGroup",props:{modelValue:{type:null,required:!1,default:""},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["update:modelValue"],setup(i,{emit:e}){const t=i,r=e,n=fi(t,["modelValue"]),s=Er(n),a=We(t,"modelValue",r);return Gf({modelValue:a,onValueChange:l=>{a.value=l}}),(l,u)=>(y(),_(iu,oe(le(o(s))),{default:w(()=>[M(l.$slots,"default",{modelValue:o(a)})]),_:3},16))}}),Xf=Kf,Yf=P({__name:"MenuRadioItem",props:{value:{type:null,required:!0},disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select"],setup(i,{emit:e}){const t=i,r=e,n=fi(t,["value"]),s=Er(n),{value:a}=wt(t),l=Wf(),u=F(()=>l.modelValue.value===a?.value);return ru({modelValue:u}),(d,c)=>(y(),_(Ta,L({role:"menuitemradio"},o(s),{"aria-checked":u.value,"data-state":o(_a)(u.value),onSelect:c[0]||(c[0]=async p=>{r("select",p),o(l).onValueChange(o(a))})}),{default:w(()=>[M(d.$slots,"default")]),_:3},16,["aria-checked","data-state"]))}}),Jf=Yf,Zf=P({__name:"MenuSeparator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(i){const e=i;return(t,r)=>(y(),_(o(se),L(e,{role:"separator","aria-orientation":"horizontal"}),{default:w(()=>[M(t.$slots,"default")]),_:3},16))}}),Qf=Zf;const[Pa,eh]=Te("MenuSub");var th=P({__name:"MenuSub",props:{open:{type:Boolean,required:!1,default:void 0}},emits:["update:open"],setup(i,{emit:e}){const t=i,n=We(t,"open",e,{defaultValue:!1,passive:t.open===void 0}),s=Tr(),a=T(),l=T();return xt(u=>{s?.open.value===!1&&(n.value=!1),u(()=>n.value=!1)}),eu({open:n,onOpenChange:u=>{n.value=u},content:l,onContentChange:u=>{l.value=u}}),eh({triggerId:"",contentId:"",trigger:a,onTriggerChange:u=>{a.value=u}}),(u,d)=>(y(),_(o(Ni),null,{default:w(()=>[M(u.$slots,"default")]),_:3}))}}),rh=th,ih=P({__name:"MenuSubContent",props:{forceMount:{type:Boolean,required:!1},loop:{type:Boolean,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1,default:!0},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(i,{emit:e}){const n=ot(i,e),s=Tr(),a=vi(),l=Pa(),u=ji(),{forwardRef:d,currentElement:c}=Q();return l.contentId||=ft(void 0,"reka-menu-sub-content"),(p,f)=>(y(),_(o(Ut),{present:p.forceMount||o(s).open.value},{default:w(()=>[E(Ia,L(o(n),{id:o(l).contentId,ref:o(d),"aria-labelledby":o(l).triggerId,align:"start",side:o(a).dir.value==="rtl"?"left":"right","disable-outside-pointer-events":!1,"disable-outside-scroll":!1,"trap-focus":!1,onOpenAutoFocus:f[0]||(f[0]=ye(m=>{o(a).isUsingKeyboardRef.value&&o(c)?.focus()},["prevent"])),onCloseAutoFocus:f[1]||(f[1]=ye(()=>{},["prevent"])),onFocusOutside:f[2]||(f[2]=m=>{if(m.defaultPrevented)return;const h=o(u).filterElement.value?.contains(m.target);m.target!==o(l).trigger.value&&!h&&o(s).onOpenChange(!1)}),onEscapeKeyDown:f[3]||(f[3]=m=>{o(a).onClose(),m.preventDefault()}),onKeydown:f[4]||(f[4]=m=>{const h=m.currentTarget?.contains(m.target),g=o(gc)[o(a).dir.value].includes(m.key);h&&g&&(o(s).onOpenChange(!1),o(u).filterElement.value?(o(u).filterElement.value.focus(),o(u).highlightedElement.value=o(l).trigger.value,o(l).trigger.value?.scrollIntoView({block:"nearest"})):o(l).trigger.value?.focus(),m.preventDefault())})}),{default:w(()=>[M(p.$slots,"default")]),_:3},16,["id","aria-labelledby","side"])]),_:3},8,["present"]))}}),nh=ih,sh=P({__name:"MenuSubTrigger",props:{disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(i){const e=i,t=Tr(),r=vi(),n=Pa(),s=ji();Ie(t.open,p=>{p?s.activeSubmenuContext.value={onOpenChange:t.onOpenChange,trigger:n.trigger}:s.activeSubmenuContext.value?.trigger.value===n.trigger.value&&(s.activeSubmenuContext.value=void 0)});const a=T(null);n.triggerId||=ft(void 0,"reka-menu-sub-trigger");function l(){a.value&&window.clearTimeout(a.value),a.value=null}gr(()=>{l()});function u(p){!ui(p)||s.onItemEnter(p)||!e.disabled&&!t.open.value&&!a.value&&(s.onPointerGraceIntentChange(null),a.value=window.setTimeout(()=>{t.onOpenChange(!0),l()},100))}async function d(p){if(!ui(p))return;l();const f=t.content.value?.getBoundingClientRect();if(f?.width){const m=t.content.value?.dataset.side,h=m==="right",g=h?-5:5,v=f[h?"left":"right"],b=f[h?"right":"left"];s.onPointerGraceIntentChange({area:[{x:p.clientX+g,y:p.clientY},{x:v,y:f.top},{x:b,y:f.top},{x:b,y:f.bottom},{x:v,y:f.bottom}],side:m}),window.clearTimeout(s.pointerGraceTimerRef.value),s.pointerGraceTimerRef.value=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(p))return;s.onPointerGraceIntentChange(null)}}async function c(p){const f=s.searchRef.value!=="";e.disabled||f&&p.key===" "||mc[r.dir.value].includes(p.key)&&(t.onOpenChange(!0),await tt(),t.content.value?.focus(),p.preventDefault())}return(p,f)=>(y(),_(Ql,{"as-child":""},{default:w(()=>[E(tu,L(e,{id:o(n).triggerId,ref:m=>{m&&o(n)?.onTriggerChange(m?.$el)},"aria-haspopup":"menu","aria-expanded":o(t).open.value,"aria-controls":o(n).contentId,"data-state":o(wa)(o(t).open.value),onClick:f[0]||(f[0]=async m=>{e.disabled||m.defaultPrevented||(m.currentTarget?.focus(),o(t).open.value||o(t).onOpenChange(!0))}),onPointermove:u,onPointerleave:d,onKeydown:c}),{default:w(()=>[M(p.$slots,"default")]),_:3},16,["id","aria-expanded","aria-controls","data-state"])]),_:3}))}}),ah=sh;const[Pr,oh]=Te("PopoverRoot");var lh=P({__name:"PopoverRoot",props:{defaultOpen:{type:Boolean,required:!1,default:!1},open:{type:Boolean,required:!1,default:void 0},modal:{type:Boolean,required:!1,default:!1}},emits:["update:open"],setup(i,{emit:e}){const t=i,r=e,{modal:n}=wt(t),s=We(t,"open",r,{defaultValue:t.defaultOpen,passive:t.open===void 0}),a=T(),l=T(!1);return oh({contentId:"",triggerId:"",modal:n,open:s,onOpenChange:u=>{s.value=u},onOpenToggle:()=>{s.value=!s.value},triggerElement:a,hasCustomAnchor:l}),(u,d)=>(y(),_(o(Ni),null,{default:w(()=>[M(u.$slots,"default",{open:o(s),close:()=>s.value=!1})]),_:3}))}}),uh=lh,dh=P({__name:"PopoverAnchor",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(i){const e=i;Q();const t=Pr();return xd(()=>{t.hasCustomAnchor.value=!0}),gr(()=>{t.hasCustomAnchor.value=!1}),(r,n)=>(y(),_(o(Vi),oe(le(e)),{default:w(()=>[M(r.$slots,"default")]),_:3},16))}}),ch=dh,ph=P({__name:"PopoverArrow",props:{width:{type:Number,required:!1,default:10},height:{type:Number,required:!1,default:5},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(i){const e=i;return Q(),(t,r)=>(y(),_(o(is),oe(le(e)),{default:w(()=>[M(t.$slots,"default")]),_:3},16))}}),fh=ph,hh=P({__name:"PopoverClose",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(i){const e=i;Q();const t=Pr();return(r,n)=>(y(),_(o(se),{type:r.as==="button"?"button":void 0,as:r.as,"as-child":e.asChild,onClick:n[0]||(n[0]=s=>o(t).onOpenChange(!1))},{default:w(()=>[M(r.$slots,"default")]),_:3},8,["type","as","as-child"]))}}),mh=hh,gh=P({__name:"PopoverContentImpl",props:{trapFocus:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(i,{emit:e}){const t=i,r=e,n=Er(fi(t,"trapFocus","disableOutsidePointerEvents")),{forwardRef:s}=Q(),a=Pr();return ql(),(l,u)=>(y(),_(o(xa),{"as-child":"",loop:"",trapped:l.trapFocus,onMountAutoFocus:u[5]||(u[5]=d=>r("openAutoFocus",d)),onUnmountAutoFocus:u[6]||(u[6]=d=>r("closeAutoFocus",d))},{default:w(()=>[E(o(Ri),{"as-child":"","disable-outside-pointer-events":l.disableOutsidePointerEvents,onPointerDownOutside:u[0]||(u[0]=d=>r("pointerDownOutside",d)),onInteractOutside:u[1]||(u[1]=d=>r("interactOutside",d)),onEscapeKeyDown:u[2]||(u[2]=d=>r("escapeKeyDown",d)),onFocusOutside:u[3]||(u[3]=d=>r("focusOutside",d)),onDismiss:u[4]||(u[4]=d=>o(a).onOpenChange(!1))},{default:w(()=>[E(o(rs),L(o(n),{id:o(a).contentId,ref:o(s),"data-state":o(a).open.value?"open":"closed","aria-labelledby":o(a).triggerId,style:{"--reka-popover-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-popover-content-available-width":"var(--reka-popper-available-width)","--reka-popover-content-available-height":"var(--reka-popper-available-height)","--reka-popover-trigger-width":"var(--reka-popper-anchor-width)","--reka-popover-trigger-height":"var(--reka-popper-anchor-height)"},role:"dialog"}),{default:w(()=>[M(l.$slots,"default")]),_:3},16,["id","data-state","aria-labelledby"])]),_:3},8,["disable-outside-pointer-events"])]),_:3},8,["trapped"]))}}),nu=gh,yh=P({__name:"PopoverContentModal",props:{side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(i,{emit:e}){const t=i,r=e,n=Pr(),s=T(!1);ya(!0);const a=ot(t,r),{forwardRef:l,currentElement:u}=Q();return va(u),(d,c)=>(y(),_(nu,L(o(a),{ref:o(l),"trap-focus":o(n).open.value,"disable-outside-pointer-events":"",onCloseAutoFocus:c[0]||(c[0]=ye(p=>{r("closeAutoFocus",p),s.value||o(n).triggerElement.value?.focus()},["prevent"])),onPointerDownOutside:c[1]||(c[1]=p=>{r("pointerDownOutside",p);const f=p.detail.originalEvent,m=f.button===0&&f.ctrlKey===!0,h=f.button===2||m;s.value=h}),onFocusOutside:c[2]||(c[2]=ye(()=>{},["prevent"]))}),{default:w(()=>[M(d.$slots,"default")]),_:3},16,["trap-focus"]))}}),vh=yh,bh=P({__name:"PopoverContentNonModal",props:{side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(i,{emit:e}){const t=i,r=e,n=Pr(),s=T(!1),a=T(!1),l=ot(t,r);return(u,d)=>(y(),_(nu,L(o(l),{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:d[0]||(d[0]=c=>{r("closeAutoFocus",c),c.defaultPrevented||(s.value||o(n).triggerElement.value?.focus(),c.preventDefault()),s.value=!1,a.value=!1}),onInteractOutside:d[1]||(d[1]=async c=>{r("interactOutside",c),c.defaultPrevented||(s.value=!0,c.detail.originalEvent.type==="pointerdown"&&(a.value=!0));const p=c.target;o(n).triggerElement.value?.contains(p)&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&a.value&&c.preventDefault()})}),{default:w(()=>[M(u.$slots,"default")]),_:3},16))}}),xh=bh,wh=P({__name:"PopoverContent",props:{forceMount:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(i,{emit:e}){const t=i,r=e,n=Pr(),s=ot(t,r),{forwardRef:a}=Q();return n.contentId||=ft(void 0,"reka-popover-content"),(l,u)=>(y(),_(o(Ut),{present:l.forceMount||o(n).open.value},{default:w(()=>[o(n).modal.value?(y(),_(vh,L({key:0},o(s),{ref:o(a)}),{default:w(()=>[M(l.$slots,"default")]),_:3},16)):(y(),_(xh,L({key:1},o(s),{ref:o(a)}),{default:w(()=>[M(l.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),_h=wh,Ch=P({__name:"PopoverPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(i){const e=i;return(t,r)=>(y(),_(o(Di),oe(le(e)),{default:w(()=>[M(t.$slots,"default")]),_:3},16))}}),Ah=Ch,Sh=P({__name:"PopoverTrigger",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(i){const e=i,t=Pr(),{forwardRef:r,currentElement:n}=Q();return t.triggerId||=ft(void 0,"reka-popover-trigger"),Ne(()=>{t.triggerElement.value=n.value}),(s,a)=>(y(),_(pi(o(t).hasCustomAnchor.value?o(se):o(Vi)),{"as-child":""},{default:w(()=>[E(o(se),{id:o(t).triggerId,ref:o(r),type:s.as==="button"?"button":void 0,"aria-haspopup":"dialog","aria-expanded":o(t).open.value,"aria-controls":o(t).contentId,"data-state":o(t).open.value?"open":"closed",as:s.as,"as-child":e.asChild,onClick:o(t).onOpenToggle},{default:w(()=>[M(s.$slots,"default")]),_:3},8,["id","type","aria-expanded","aria-controls","data-state","as","as-child","onClick"])]),_:3}))}}),Mh=Sh,Bh=P({__name:"DropdownMenuArrow",props:{width:{type:Number,required:!1,default:10},height:{type:Number,required:!1,default:5},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(i){const e=i;return Q(),(t,r)=>(y(),_(o(vf),oe(le(e)),{default:w(()=>[M(t.$slots,"default")]),_:3},16))}}),su=Bh,kh=P({__name:"DropdownMenuCheckboxItem",props:{modelValue:{type:[Boolean,String],required:!1},disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select","update:modelValue"],setup(i,{emit:e}){const t=i,n=Or(e);return Q(),(s,a)=>(y(),_(o(Of),oe(le({...t,...o(n)})),{default:w(()=>[M(s.$slots,"default")]),_:3},16))}}),qh=kh;const[au,Fh]=Te("DropdownMenuRoot");var Eh=P({__name:"DropdownMenuRoot",props:{defaultOpen:{type:Boolean,required:!1},open:{type:Boolean,required:!1,default:void 0},dir:{type:String,required:!1},modal:{type:Boolean,required:!1,default:!0}},emits:["update:open"],setup(i,{emit:e}){const t=i,r=e;Q();const n=We(t,"open",r,{defaultValue:t.defaultOpen,passive:t.open===void 0}),s=T(),{modal:a,dir:l}=wt(t),u=Jn(l);return Fh({open:n,onOpenChange:d=>{n.value=d},onOpenToggle:()=>{n.value=!n.value},triggerId:"",triggerElement:s,contentId:"",modal:a,dir:u}),(d,c)=>(y(),_(o(Cf),{open:o(n),"onUpdate:open":c[0]||(c[0]=p=>yl(n)?n.value=p:null),dir:o(u),modal:o(a)},{default:w(()=>[M(d.$slots,"default",{open:o(n)})]),_:3},8,["open","dir","modal"]))}}),ou=Eh,Oh=P({__name:"DropdownMenuContent",props:{forceMount:{type:Boolean,required:!1},loop:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(i,{emit:e}){const n=ot(i,e);Q();const s=au(),a=T(!1);function l(u){u.defaultPrevented||(a.value||setTimeout(()=>{s.triggerElement.value?.focus()},0),a.value=!1,u.preventDefault())}return s.contentId||=ft(void 0,"reka-dropdown-menu-content"),(u,d)=>(y(),_(o(Df),L(o(n),{id:o(s).contentId,"aria-labelledby":o(s)?.triggerId,style:{"--reka-dropdown-menu-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-dropdown-menu-content-available-width":"var(--reka-popper-available-width)","--reka-dropdown-menu-content-available-height":"var(--reka-popper-available-height)","--reka-dropdown-menu-trigger-width":"var(--reka-popper-anchor-width)","--reka-dropdown-menu-trigger-height":"var(--reka-popper-anchor-height)"},onCloseAutoFocus:l,onInteractOutside:d[0]||(d[0]=c=>{if(c.defaultPrevented)return;const p=c.detail.originalEvent,f=p.button===0&&p.ctrlKey===!0,m=p.button===2||f;(!o(s).modal.value||m)&&(a.value=!0),o(s).triggerElement.value?.contains(c.target)&&c.preventDefault()})}),{default:w(()=>[M(u.$slots,"default")]),_:3},16,["id","aria-labelledby"]))}}),zh=Oh,Ih=P({__name:"DropdownMenuFilter",props:{modelValue:{type:String,required:!1},autoFocus:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"input"}},emits:["update:modelValue"],setup(i,{emit:e}){const t=i,n=We(t,"modelValue",e,{defaultValue:"",passive:t.modelValue===void 0}),s=vi(),a=ji(),l=Pa(null);Ie(n,b=>{a.searchRef.value=b??""},{immediate:!0});const{primitiveElement:u,currentElement:d}=ci(),c=F(()=>t.disabled||!1),p=T();wd(()=>p.value=a.highlightedElement.value?.id),Ne(()=>{a.onFilterElementChange(d.value),setTimeout(()=>{t.autoFocus&&(!l||s.isUsingKeyboardRef.value)&&d.value?.focus()},1)}),gr(()=>{a.onFilterElementChange(void 0),a.searchRef.value=""});const{isComposing:f,handleCompositionStart:m,handleCompositionEnd:h}=kl(b=>{const C=b.target;C&&(n.value=C.value,a.searchRef.value=C.value)});function g(b){if(c.value||f.value)return;const C=b.target;n.value=C.value,a.searchRef.value=C.value}function v(b){if(!c.value){if(f.value){b.stopPropagation();return}["ArrowDown","ArrowUp","Home","End"].includes(b.key)?(b.preventDefault(),a.onKeydownNavigation(b)):b.key==="Enter"?(b.preventDefault(),a.onKeydownEnter(b)):b.key==="Escape"&&n.value&&(b.stopPropagation(),n.value="",a.searchRef.value="")}}return(b,C)=>(y(),_(o(se),{ref_key:"primitiveElement",ref:u,as:b.as,"as-child":b.asChild,value:o(n),disabled:c.value?"":void 0,"data-disabled":c.value?"":void 0,"aria-disabled":c.value?!0:void 0,"aria-activedescendant":p.value,type:"text",role:"searchbox",onInput:g,onKeydown:v,onCompositionstart:o(m),onCompositionend:o(h)},{default:w(()=>[M(b.$slots,"default",{modelValue:o(n)})]),_:3},8,["as","as-child","value","disabled","data-disabled","aria-disabled","aria-activedescendant","onCompositionstart","onCompositionend"]))}}),Th=Ih,Ph=P({__name:"DropdownMenuGroup",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(i){const e=i;return Q(),(t,r)=>(y(),_(o(iu),oe(le(e)),{default:w(()=>[M(t.$slots,"default")]),_:3},16))}}),Rh=Ph,Dh=P({__name:"DropdownMenuItem",props:{disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select"],setup(i,{emit:e}){const t=i,n=Or(e);return Q(),(s,a)=>(y(),_(o(Ta),oe(le({...t,...o(n)})),{default:w(()=>[M(s.$slots,"default")]),_:3},16))}}),$h=Dh,Lh=P({__name:"DropdownMenuItemIndicator",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(i){const e=i;return Q(),(t,r)=>(y(),_(o(Ff),oe(le(e)),{default:w(()=>[M(t.$slots,"default")]),_:3},16))}}),Hh=Lh,Nh=P({__name:"DropdownMenuLabel",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(i){const e=i;return Q(),(t,r)=>(y(),_(o(Vf),oe(le(e)),{default:w(()=>[M(t.$slots,"default")]),_:3},16))}}),Vh=Nh,Uh=P({__name:"DropdownMenuPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(i){const e=i;return(t,r)=>(y(),_(o(jf),oe(le(e)),{default:w(()=>[M(t.$slots,"default")]),_:3},16))}}),jh=Uh,Wh=P({__name:"DropdownMenuRadioGroup",props:{modelValue:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["update:modelValue"],setup(i,{emit:e}){const t=i,n=Or(e);return Q(),(s,a)=>(y(),_(o(Xf),oe(le({...t,...o(n)})),{default:w(()=>[M(s.$slots,"default")]),_:3},16))}}),Gh=Wh,Kh=P({__name:"DropdownMenuRadioItem",props:{value:{type:null,required:!0},disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select"],setup(i,{emit:e}){const n=ot(i,e);return Q(),(s,a)=>(y(),_(o(Jf),oe(le(o(n))),{default:w(()=>[M(s.$slots,"default")]),_:3},16))}}),Xh=Kh,Yh=P({__name:"DropdownMenuSeparator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(i){const e=i;return Q(),(t,r)=>(y(),_(o(Qf),oe(le(e)),{default:w(()=>[M(t.$slots,"default")]),_:3},16))}}),Jh=Yh,Zh=P({__name:"DropdownMenuSub",props:{defaultOpen:{type:Boolean,required:!1},open:{type:Boolean,required:!1,default:void 0}},emits:["update:open"],setup(i,{emit:e}){const t=i,n=We(t,"open",e,{passive:t.open===void 0,defaultValue:t.defaultOpen??!1});return Q(),(s,a)=>(y(),_(o(rh),{open:o(n),"onUpdate:open":a[0]||(a[0]=l=>yl(n)?n.value=l:null)},{default:w(()=>[M(s.$slots,"default",{open:o(n)})]),_:3},8,["open"]))}}),Qh=Zh,em=P({__name:"DropdownMenuSubContent",props:{forceMount:{type:Boolean,required:!1},loop:{type:Boolean,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(i,{emit:e}){const n=ot(i,e);return Q(),(s,a)=>(y(),_(o(nh),L(o(n),{style:{"--reka-dropdown-menu-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-dropdown-menu-content-available-width":"var(--reka-popper-available-width)","--reka-dropdown-menu-content-available-height":"var(--reka-popper-available-height)","--reka-dropdown-menu-trigger-width":"var(--reka-popper-anchor-width)","--reka-dropdown-menu-trigger-height":"var(--reka-popper-anchor-height)"}}),{default:w(()=>[M(s.$slots,"default")]),_:3},16))}}),tm=em,rm=P({__name:"DropdownMenuSubTrigger",props:{disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(i){const e=i;return Q(),(t,r)=>(y(),_(o(ah),oe(le(e)),{default:w(()=>[M(t.$slots,"default")]),_:3},16))}}),im=rm,nm=P({__name:"DropdownMenuTrigger",props:{disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(i){const e=i,t=au(),{forwardRef:r,currentElement:n}=Q();return Ne(()=>{t.triggerElement=n}),t.triggerId||=ft(void 0,"reka-dropdown-menu-trigger"),(s,a)=>(y(),_(o(Ql),{"as-child":""},{default:w(()=>[E(o(se),{id:o(t).triggerId,ref:o(r),type:s.as==="button"?"button":void 0,"as-child":e.asChild,as:s.as,"aria-haspopup":"menu","aria-expanded":o(t).open.value,"aria-controls":o(t).open.value?o(t).contentId:void 0,"data-disabled":s.disabled?"":void 0,disabled:s.disabled,"data-state":o(t).open.value?"open":"closed",onClick:a[0]||(a[0]=async l=>{!s.disabled&&l.button===0&&l.ctrlKey===!1&&(o(t)?.onOpenToggle(),await tt(),o(t).open.value&&l.preventDefault())}),onKeydown:a[1]||(a[1]=Ei(l=>{s.disabled||(["Enter"," "].includes(l.key)&&o(t).onOpenToggle(),l.key==="ArrowDown"&&o(t).onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())},["enter","space","arrow-down"]))},{default:w(()=>[M(s.$slots,"default")]),_:3},8,["id","type","as-child","as","aria-expanded","aria-controls","data-disabled","disabled","data-state"])]),_:3}))}}),lu=nm,sm=P({__name:"HoverCardArrow",props:{width:{type:Number,required:!1,default:10},height:{type:Number,required:!1,default:5},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(i){const e=i;return Q(),(t,r)=>(y(),_(o(is),oe(le(e)),{default:w(()=>[M(t.$slots,"default")]),_:3},16))}}),am=sm;const[Ra,om]=Te("HoverCardRoot");var lm=P({__name:"HoverCardRoot",props:{defaultOpen:{type:Boolean,required:!1,default:!1},open:{type:Boolean,required:!1,default:void 0},openDelay:{type:Number,required:!1,default:700},closeDelay:{type:Number,required:!1,default:300}},emits:["update:open"],setup(i,{emit:e}){const t=i,r=e,{openDelay:n,closeDelay:s}=wt(t);Q();const a=We(t,"open",r,{defaultValue:t.defaultOpen,passive:t.open===void 0}),l=T(0),u=T(0),d=T(!1),c=T(!1),p=T(!1),f=T();function m(){clearTimeout(u.value),l.value=window.setTimeout(()=>a.value=!0,n.value)}function h(){clearTimeout(l.value),!d.value&&!c.value&&(u.value=window.setTimeout(()=>a.value=!1,s.value))}function g(){a.value=!1}return om({open:a,onOpenChange(v){a.value=v},onOpen:m,onClose:h,onDismiss:g,hasSelectionRef:d,isPointerDownOnContentRef:c,isPointerInTransitRef:p,triggerElement:f}),(v,b)=>(y(),_(o(Ni),null,{default:w(()=>[M(v.$slots,"default",{open:o(a)})]),_:3}))}}),um=lm;function Zs(i){return e=>e.pointerType==="touch"?void 0:i()}function dm(i){const e=[],t=document.createTreeWalker(i,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;t.nextNode();)e.push(t.currentNode);return e}var cm=P({__name:"HoverCardContentImpl",props:{side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside"],setup(i,{emit:e}){const t=i,r=e,n=Er(t),{forwardRef:s,currentElement:a}=Q(),l=Ra(),{isPointerInTransit:u,onPointerExit:d}=El(l.triggerElement,a);_d(l.isPointerInTransitRef,u,{direction:"rtl"}),d(()=>{l.onClose()});const c=T(!1);let p;xt(m=>{if(c.value){const h=document.body;p=h.style.userSelect||h.style.webkitUserSelect,h.style.userSelect="none",h.style.webkitUserSelect="none",m(()=>{h.style.userSelect=p,h.style.webkitUserSelect=p})}});function f(){c.value=!1,l.isPointerDownOnContentRef.value=!1,tt(()=>{document.getSelection()?.toString()!==""&&(l.hasSelectionRef.value=!0)})}return Ne(()=>{a.value&&(document.addEventListener("pointerup",f),dm(a.value).forEach(h=>h.setAttribute("tabindex","-1"))),vt(window,"scroll",m=>{m.target?.contains(l.triggerElement.value)&&l.onDismiss()},{capture:!0})}),gr(()=>{document.removeEventListener("pointerup",f),l.hasSelectionRef.value=!1,l.isPointerDownOnContentRef.value=!1}),(m,h)=>(y(),_(o(Ri),{"as-child":"","disable-outside-pointer-events":!1,onEscapeKeyDown:h[1]||(h[1]=g=>r("escapeKeyDown",g)),onPointerDownOutside:h[2]||(h[2]=g=>r("pointerDownOutside",g)),onFocusOutside:h[3]||(h[3]=ye(g=>r("focusOutside",g),["prevent"])),onDismiss:o(l).onDismiss},{default:w(()=>[E(o(rs),L({...o(n),...m.$attrs},{ref:o(s),"data-state":o(l).open.value?"open":"closed",style:{userSelect:c.value?"text":void 0,WebkitUserSelect:c.value?"text":void 0,"--reka-hover-card-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-hover-card-content-available-width":"var(--reka-popper-available-width)","--reka-hover-card-content-available-height":"var(--reka-popper-available-height)","--reka-hover-card-trigger-width":"var(--reka-popper-anchor-width)","--reka-hover-card-trigger-height":"var(--reka-popper-anchor-height)"},onPointerdown:h[0]||(h[0]=g=>{g.currentTarget.contains(g.target)&&(c.value=!0),o(l).hasSelectionRef.value=!1,o(l).isPointerDownOnContentRef.value=!0})}),{default:w(()=>[M(m.$slots,"default")]),_:3},16,["data-state","style"])]),_:3},8,["onDismiss"]))}}),pm=cm,fm=P({__name:"HoverCardContent",props:{forceMount:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside"],setup(i,{emit:e}){const n=ot(i,e),{forwardRef:s}=Q(),a=Ra();return(l,u)=>(y(),_(o(Ut),{present:l.forceMount||o(a).open.value},{default:w(()=>[E(pm,L(o(n),{ref:o(s),onPointerenter:u[0]||(u[0]=d=>o(Zs)(o(a).onOpen)(d))}),{default:w(()=>[M(l.$slots,"default")]),_:3},16)]),_:3},8,["present"]))}}),hm=fm,mm=P({__name:"HoverCardPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(i){const e=i;return(t,r)=>(y(),_(o(Di),oe(le(e)),{default:w(()=>[M(t.$slots,"default")]),_:3},16))}}),gm=mm,ym=P({__name:"HoverCardTrigger",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"a"}},setup(i){const{forwardRef:e,currentElement:t}=Q(),r=Ra();r.triggerElement=t;function n(){setTimeout(()=>{!r.isPointerInTransitRef.value&&!r.open.value&&r.onClose()},0)}return(s,a)=>(y(),_(o(Vi),{"as-child":"",reference:s.reference},{default:w(()=>[E(o(se),{ref:o(e),"as-child":s.asChild,as:s.as,"data-state":o(r).open.value?"open":"closed","data-grace-area-trigger":"",onPointerenter:a[0]||(a[0]=l=>o(Zs)(o(r).onOpen)(l)),onPointerleave:a[1]||(a[1]=l=>o(Zs)(n)(l)),onFocus:a[2]||(a[2]=l=>o(r).onOpen()),onBlur:a[3]||(a[3]=l=>o(r).onClose())},{default:w(()=>[M(s.$slots,"default")]),_:3},8,["as-child","as","data-state"])]),_:3},8,["reference"]))}}),vm=ym,bm=P({__name:"Label",props:{for:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"label"}},setup(i){const e=i;return Q(),(t,r)=>(y(),_(o(se),L(e,{onMousedown:r[0]||(r[0]=n=>{!n.defaultPrevented&&n.detail>1&&n.preventDefault()})}),{default:w(()=>[M(t.$slots,"default")]),_:3},16))}}),wo=bm;let gs=new Map,Qs=!1;try{Qs=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let Nn=!1;try{Nn=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const uu={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};class du{format(e){let t="";if(!Qs&&this.options.signDisplay!=null?t=wm(this.numberFormatter,this.options.signDisplay,e):t=this.numberFormatter.format(e),this.options.style==="unit"&&!Nn){var r;let{unit:n,unitDisplay:s="short",locale:a}=this.resolvedOptions();if(!n)return t;let l=(r=uu[n])===null||r===void 0?void 0:r[s];t+=l[a]||l.default}return t}formatToParts(e){return this.numberFormatter.formatToParts(e)}formatRange(e,t){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(e,t);if(t<e)throw new RangeError("End date must be >= start date");return`${this.format(e)} – ${this.format(t)}`}formatRangeToParts(e,t){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(e,t);if(t<e)throw new RangeError("End date must be >= start date");let r=this.numberFormatter.formatToParts(e),n=this.numberFormatter.formatToParts(t);return[...r.map(s=>({...s,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...n.map(s=>({...s,source:"endRange"}))]}resolvedOptions(){let e=this.numberFormatter.resolvedOptions();return!Qs&&this.options.signDisplay!=null&&(e={...e,signDisplay:this.options.signDisplay}),!Nn&&this.options.style==="unit"&&(e={...e,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),e}constructor(e,t={}){this.numberFormatter=xm(e,t),this.options=t}}function xm(i,e={}){let{numberingSystem:t}=e;if(t&&i.includes("-nu-")&&(i.includes("-u-")||(i+="-u-"),i+=`-nu-${t}`),e.style==="unit"&&!Nn){var r;let{unit:a,unitDisplay:l="short"}=e;if(!a)throw new Error('unit option must be provided with style: "unit"');if(!(!((r=uu[a])===null||r===void 0)&&r[l]))throw new Error(`Unsupported unit ${a} with unitDisplay = ${l}`);e={...e,style:"decimal"}}let n=i+(e?Object.entries(e).sort((a,l)=>a[0]<l[0]?-1:1).join():"");if(gs.has(n))return gs.get(n);let s=new Intl.NumberFormat(i,e);return gs.set(n,s),s}function wm(i,e,t){if(e==="auto")return i.format(t);if(e==="never")return i.format(Math.abs(t));{let r=!1;if(e==="always"?r=t>0||Object.is(t,0):e==="exceptZero"&&(Object.is(t,-0)||Object.is(t,0)?t=Math.abs(t):r=t>0),r){let n=i.format(-t),s=i.format(t),a=n.replace(s,"").replace(/\u200e|\u061C/,"");return[...a].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),n.replace(s,"!!!").replace(a,"+").replace("!!!",s)}else return i.format(t)}}const _m=new RegExp("^.*\\(.*\\).*$"),Cm=["latn","arab","hanidec","deva","beng","fullwide"];class cu{parse(e){return ys(this.locale,this.options,e).parse(e)}isValidPartialNumber(e,t,r){return ys(this.locale,this.options,e).isValidPartialNumber(e,t,r)}getNumberingSystem(e){return ys(this.locale,this.options,e).options.numberingSystem}constructor(e,t={}){this.locale=e,this.options=t}}const _o=new Map;function ys(i,e,t){let r=Co(i,e);if(!i.includes("-nu-")&&!r.isValidPartialNumber(t)){for(let n of Cm)if(n!==r.options.numberingSystem){let s=Co(i+(i.includes("-u-")?"-nu-":"-u-nu-")+n,e);if(s.isValidPartialNumber(t))return s}}return r}function Co(i,e){let t=i+(e?Object.entries(e).sort((n,s)=>n[0]<s[0]?-1:1).join():""),r=_o.get(t);return r||(r=new Am(i,e),_o.set(t,r)),r}class Am{parse(e){let t=this.sanitize(e);if(this.symbols.group&&(t=Lr(t,this.symbols.group,"")),this.symbols.decimal&&(t=t.replace(this.symbols.decimal,".")),this.symbols.minusSign&&(t=t.replace(this.symbols.minusSign,"-")),t=t.replace(this.symbols.numeral,this.symbols.index),this.options.style==="percent"){let a=t.indexOf("-");t=t.replace("-",""),t=t.replace("+","");let l=t.indexOf(".");l===-1&&(l=t.length),t=t.replace(".",""),l-2===0?t=`0.${t}`:l-2===-1?t=`0.0${t}`:l-2===-2?t="0.00":t=`${t.slice(0,l-2)}.${t.slice(l-2)}`,a>-1&&(t=`-${t}`)}let r=t?+t:NaN;if(isNaN(r))return NaN;if(this.options.style==="percent"){var n,s;let a={...this.options,style:"decimal",minimumFractionDigits:Math.min(((n=this.options.minimumFractionDigits)!==null&&n!==void 0?n:0)+2,20),maximumFractionDigits:Math.min(((s=this.options.maximumFractionDigits)!==null&&s!==void 0?s:0)+2,20)};return new cu(this.locale,a).parse(new du(this.locale,a).format(r))}return this.options.currencySign==="accounting"&&_m.test(e)&&(r=-1*r),r}sanitize(e){return e=e.replace(this.symbols.literals,""),this.symbols.minusSign&&(e=e.replace("-",this.symbols.minusSign)),this.options.numberingSystem==="arab"&&(this.symbols.decimal&&(e=e.replace(",",this.symbols.decimal),e=e.replace("،",this.symbols.decimal)),this.symbols.group&&(e=Lr(e,".",this.symbols.group))),this.symbols.group==="’"&&e.includes("'")&&(e=Lr(e,"'",this.symbols.group)),this.options.locale==="fr-FR"&&this.symbols.group&&(e=Lr(e," ",this.symbols.group),e=Lr(e,/\u00A0/g,this.symbols.group)),e}isValidPartialNumber(e,t=-1/0,r=1/0){return e=this.sanitize(e),this.symbols.minusSign&&e.startsWith(this.symbols.minusSign)&&t<0?e=e.slice(this.symbols.minusSign.length):this.symbols.plusSign&&e.startsWith(this.symbols.plusSign)&&r>0&&(e=e.slice(this.symbols.plusSign.length)),this.symbols.group&&e.startsWith(this.symbols.group)||this.symbols.decimal&&e.indexOf(this.symbols.decimal)>-1&&this.options.maximumFractionDigits===0?!1:(this.symbols.group&&(e=Lr(e,this.symbols.group,"")),e=e.replace(this.symbols.numeral,""),this.symbols.decimal&&(e=e.replace(this.symbols.decimal,"")),e.length===0)}constructor(e,t={}){this.locale=e,t.roundingIncrement!==1&&t.roundingIncrement!=null&&(t.maximumFractionDigits==null&&t.minimumFractionDigits==null?(t.maximumFractionDigits=0,t.minimumFractionDigits=0):t.maximumFractionDigits==null?t.maximumFractionDigits=t.minimumFractionDigits:t.minimumFractionDigits==null&&(t.minimumFractionDigits=t.maximumFractionDigits)),this.formatter=new Intl.NumberFormat(e,t),this.options=this.formatter.resolvedOptions(),this.symbols=Mm(e,this.formatter,this.options,t);var r,n;this.options.style==="percent"&&(((r=this.options.minimumFractionDigits)!==null&&r!==void 0?r:0)>18||((n=this.options.maximumFractionDigits)!==null&&n!==void 0?n:0)>18)&&console.warn("NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.")}}const Ao=new Set(["decimal","fraction","integer","minusSign","plusSign","group"]),Sm=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function Mm(i,e,t,r){var n,s,a,l;let u=new Intl.NumberFormat(i,{...t,minimumSignificantDigits:1,maximumSignificantDigits:21,roundingIncrement:1,roundingPriority:"auto",roundingMode:"halfExpand"}),d=u.formatToParts(-10000.111),c=u.formatToParts(10000.111),p=Sm.map(z=>u.formatToParts(z));var f;let m=(f=(n=d.find(z=>z.type==="minusSign"))===null||n===void 0?void 0:n.value)!==null&&f!==void 0?f:"-",h=(s=c.find(z=>z.type==="plusSign"))===null||s===void 0?void 0:s.value;!h&&(r?.signDisplay==="exceptZero"||r?.signDisplay==="always")&&(h="+");let v=(a=new Intl.NumberFormat(i,{...t,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001).find(z=>z.type==="decimal"))===null||a===void 0?void 0:a.value,b=(l=d.find(z=>z.type==="group"))===null||l===void 0?void 0:l.value,C=d.filter(z=>!Ao.has(z.type)).map(z=>So(z.value)),x=p.flatMap(z=>z.filter(j=>!Ao.has(j.type)).map(j=>So(j.value))),A=[...new Set([...C,...x])].sort((z,j)=>j.length-z.length),q=A.length===0?new RegExp("[\\p{White_Space}]","gu"):new RegExp(`${A.join("|")}|[\\p{White_Space}]`,"gu"),S=[...new Intl.NumberFormat(t.locale,{useGrouping:!1}).format(9876543210)].reverse(),B=new Map(S.map((z,j)=>[z,j])),k=new RegExp(`[${S.join("")}]`,"g");return{minusSign:m,plusSign:h,decimal:v,group:b,literals:q,numeral:k,index:z=>String(B.get(z))}}function Lr(i,e,t){return i.replaceAll?i.replaceAll(e,t):i.split(e).join(t)}function So(i){return i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function pu(i){const{disabled:e}=i,t=T(),r=hl(),n=()=>window.clearTimeout(t.value),s=f=>{n(),!e.value&&(r.trigger(),t.value=window.setTimeout(()=>{s(60)},f))},a=()=>{s(400)},l=()=>{n()},u=T(!1),d=F(()=>Yn(i.target)),c=f=>{f.button!==0||u.value||(f.preventDefault(),u.value=!0,a())},p=()=>{u.value=!1,l()};return Pi&&(vt(d||window,"pointerdown",c),vt(window,"pointerup",p),vt(window,"pointercancel",p)),{isPressed:u,onTrigger:r.on}}function Mo(i,e=T({})){return vl(()=>new du(i.value,e.value))}function Bm(i,e=T({})){return vl(()=>new cu(i.value,e.value))}function Bo(i,e,t){let r=i==="+"?e+t:e-t;if(e%1!==0||t%1!==0){const n=e.toString().split("."),s=t.toString().split("."),a=n[1]&&n[1].length||0,l=s[1]&&s[1].length||0,u=10**Math.max(a,l);e=Math.round(e*u),t=Math.round(t*u),r=i==="+"?e+t:e-t,r/=u}return r}const[Da,km]=Te("NumberFieldRoot");var qm=P({inheritAttrs:!1,__name:"NumberFieldRoot",props:{defaultValue:{type:Number,required:!1,default:void 0},modelValue:{type:[Number,null],required:!1},min:{type:Number,required:!1},max:{type:Number,required:!1},step:{type:Number,required:!1,default:1},stepSnapping:{type:Boolean,required:!1,default:!0},focusOnChange:{type:Boolean,required:!1,default:!0},formatOptions:{type:null,required:!1},locale:{type:String,required:!1},disabled:{type:Boolean,required:!1},readonly:{type:Boolean,required:!1},disableWheelChange:{type:Boolean,required:!1},invertWheelChange:{type:Boolean,required:!1},id:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue"],setup(i,{emit:e}){const t=i,r=e,{disabled:n,readonly:s,disableWheelChange:a,invertWheelChange:l,min:u,max:d,step:c,stepSnapping:p,formatOptions:f,id:m,locale:h}=wt(t),g=We(t,"modelValue",r,{defaultValue:t.defaultValue,passive:t.modelValue===void 0}),{primitiveElement:v,currentElement:b}=ci(),C=tc(h),x=Fl(b),A=T(),q=F(()=>!ri(g.value)&&(X(g.value)===u.value||u.value&&!isNaN(g.value)?Bo("-",g.value,c.value)<u.value:!1)),S=F(()=>!ri(g.value)&&(X(g.value)===d.value||d.value&&!isNaN(g.value)?Bo("+",g.value,c.value)>d.value:!1));function B(te,fe=1){if(t.focusOnChange&&A.value?.focus(),t.disabled||t.readonly)return;const _t=W.parse(A.value?.value??"");isNaN(_t)?g.value=u.value??0:te==="increase"?g.value=X(_t+(c.value??1)*fe):g.value=X(_t-(c.value??1)*fe)}function k(te=1){B("increase",te)}function N(te=1){B("decrease",te)}function z(te){te==="min"&&u.value!==void 0?g.value=X(u.value):te==="max"&&d.value!==void 0&&(g.value=X(d.value))}const j=Mo(C,f),W=Bm(C,f),J=F(()=>j.resolvedOptions().maximumFractionDigits>0?"decimal":"numeric"),ie=Mo(C,f),O=F(()=>ri(g.value)||isNaN(g.value)?"":ie.format(g.value));function U(te){return W.isValidPartialNumber(te,u.value,d.value)}function re(te){A.value&&(A.value.value=te)}function X(te){let fe;return c.value===void 0||isNaN(c.value)||!p.value?fe=Dd(te,u.value,d.value):fe=$d(te,u.value,d.value,c.value),fe=W.parse(j.format(fe)),fe}function ce(te){const fe=W.parse(te);return g.value=isNaN(fe)?void 0:X(fe),te.length?(isNaN(fe),re(O.value)):re(te)}return km({modelValue:g,handleDecrease:N,handleIncrease:k,handleMinMaxValue:z,inputMode:J,inputEl:A,onInputElement:te=>A.value=te,textValue:O,readonly:s,validate:U,applyInputValue:ce,disabled:n,disableWheelChange:a,invertWheelChange:l,max:d,min:u,isDecreaseDisabled:q,isIncreaseDisabled:S,id:m}),(te,fe)=>(y(),_(o(se),L(te.$attrs,{ref_key:"primitiveElement",ref:v,role:"group",as:te.as,"as-child":te.asChild,"data-disabled":o(n)?"":void 0,"data-readonly":o(s)?"":void 0}),{default:w(()=>[M(te.$slots,"default",{modelValue:o(g),textValue:O.value,readonly:o(s)}),o(x)&&te.name?(y(),_(o(Pl),{key:0,type:"text",value:o(g),name:te.name,disabled:o(n),readonly:o(s),required:te.required},null,8,["value","name","disabled","readonly","required"])):R("v-if",!0)]),_:3},16,["as","as-child","data-disabled","data-readonly"]))}}),Fm=qm,Em=P({__name:"NumberFieldDecrement",props:{disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(i){const e=i,t=Da(),r=F(()=>t.disabled?.value||t.readonly.value||e.disabled||t.isDecreaseDisabled.value),{primitiveElement:n,currentElement:s}=ci(),{isPressed:a,onTrigger:l}=pu({target:s,disabled:r});return l(()=>{t.handleDecrease()}),(u,d)=>(y(),_(o(se),L(e,{ref_key:"primitiveElement",ref:n,tabindex:"-1","aria-label":"Decrease",type:u.as==="button"?"button":void 0,style:{userSelect:o(a)?"none":void 0},disabled:r.value?"":void 0,"data-disabled":r.value?"":void 0,"data-pressed":o(a)?"true":void 0,onContextmenu:d[0]||(d[0]=ye(()=>{},["prevent"]))}),{default:w(()=>[M(u.$slots,"default")]),_:3},16,["type","style","disabled","data-disabled","data-pressed"]))}}),Om=Em,zm=P({__name:"NumberFieldIncrement",props:{disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(i){const e=i,t=Da(),r=F(()=>t.disabled?.value||t.readonly.value||e.disabled||t.isIncreaseDisabled.value),{primitiveElement:n,currentElement:s}=ci(),{isPressed:a,onTrigger:l}=pu({target:s,disabled:r});return l(()=>{t.handleIncrease()}),(u,d)=>(y(),_(o(se),L(e,{ref_key:"primitiveElement",ref:n,tabindex:"-1","aria-label":"Increase",type:u.as==="button"?"button":void 0,style:{userSelect:o(a)?"none":void 0},disabled:r.value?"":void 0,"data-disabled":r.value?"":void 0,"data-pressed":o(a)?"true":void 0,onContextmenu:d[0]||(d[0]=ye(()=>{},["prevent"]))}),{default:w(()=>[M(u.$slots,"default")]),_:3},16,["type","style","disabled","data-disabled","data-pressed"]))}}),Im=zm,Tm=P({__name:"NumberFieldInput",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"input"}},setup(i){const e=i,{primitiveElement:t,currentElement:r}=ci(),n=Da(),s=ec(),{isComposing:a,handleCompositionStart:l,handleCompositionEnd:u}=kl();function d(m){if(!(a.value||m.isComposing))switch(m.key){case s.ARROW_UP:m.preventDefault(),n.handleIncrease();break;case s.ARROW_DOWN:m.preventDefault(),n.handleDecrease();break;case s.PAGE_UP:m.preventDefault(),n.handleIncrease(10);break;case s.PAGE_DOWN:m.preventDefault(),n.handleDecrease(10);break;case s.HOME:m.preventDefault(),n.handleMinMaxValue("min");break;case s.END:m.preventDefault(),n.handleMinMaxValue("max");break;case s.ENTER:n.applyInputValue(m.target?.value);break}}function c(m){n.disableWheelChange.value||m.target===rt()&&(Math.abs(m.deltaY)<=Math.abs(m.deltaX)||(m.preventDefault(),m.deltaY>0?n.invertWheelChange.value?n.handleDecrease():n.handleIncrease():m.deltaY<0&&(n.invertWheelChange.value?n.handleIncrease():n.handleDecrease())))}Ne(()=>{n.onInputElement(r.value)});const p=T(n.textValue.value);Ie(()=>n.textValue.value,()=>{p.value=n.textValue.value},{immediate:!0,deep:!0});function f(){requestAnimationFrame(()=>{p.value=n.textValue.value})}return(m,h)=>(y(),_(o(se),L(e,{id:o(n).id.value,ref_key:"primitiveElement",ref:t,value:p.value,role:"spinbutton",type:"text",tabindex:"0",inputmode:o(n).inputMode.value,disabled:o(n).disabled.value?"":void 0,"data-disabled":o(n).disabled.value?"":void 0,readonly:o(n).readonly.value?"":void 0,"data-readonly":o(n).readonly.value?"":void 0,autocomplete:"off",autocorrect:"off",spellcheck:"false","aria-roledescription":"Number field","aria-valuenow":o(n).modelValue.value,"aria-valuemin":o(n).min.value,"aria-valuemax":o(n).max.value,onKeydown:d,onWheel:c,onBeforeinput:h[0]||(h[0]=g=>{if(g.isComposing)return;const v=g.target;let b=v.value.slice(0,v.selectionStart??void 0)+(g.data??"")+v.value.slice(v.selectionEnd??void 0);o(n).validate(b)||g.preventDefault()}),onInput:h[1]||(h[1]=g=>{const v=g.target;p.value=v.value}),onChange:f,onBlur:h[2]||(h[2]=g=>o(n).applyInputValue(g.target?.value)),onCompositionstart:o(l),onCompositionend:o(u)}),{default:w(()=>[M(m.$slots,"default")]),_:3},16,["id","value","inputmode","disabled","data-disabled","readonly","data-readonly","aria-valuenow","aria-valuemin","aria-valuemax","onCompositionstart","onCompositionend"]))}}),Pm=Tm,Rm=P({__name:"BaseSeparator",props:{orientation:{type:String,required:!1,default:"horizontal"},decorative:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(i){const e=i,t=["horizontal","vertical"];function r(l){return t.includes(l)}const n=F(()=>r(e.orientation)?e.orientation:"horizontal"),s=F(()=>n.value==="vertical"?e.orientation:void 0),a=F(()=>e.decorative?{role:"none"}:{"aria-orientation":s.value,role:"separator"});return(l,u)=>(y(),_(o(se),L({as:l.as,"as-child":l.asChild,"data-orientation":n.value},a.value),{default:w(()=>[M(l.$slots,"default")]),_:3},16,["as","as-child","data-orientation"]))}}),Dm=Rm,$m=P({__name:"Separator",props:{orientation:{type:String,required:!1,default:"horizontal"},decorative:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(i){const e=i;return(t,r)=>(y(),_(Dm,oe(le(e)),{default:w(()=>[M(t.$slots,"default")]),_:3},16))}}),Lm=$m;const[ns,Hm]=Te("TabsRoot");var Nm=P({__name:"TabsRoot",props:{defaultValue:{type:null,required:!1},orientation:{type:String,required:!1,default:"horizontal"},dir:{type:String,required:!1},activationMode:{type:String,required:!1,default:"automatic"},modelValue:{type:null,required:!1},unmountOnHide:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["update:modelValue"],setup(i,{emit:e}){const t=i,r=e,{orientation:n,unmountOnHide:s,dir:a}=wt(t),l=Jn(a);Q();const u=We(t,"modelValue",r,{defaultValue:t.defaultValue,passive:t.modelValue===void 0}),d=T(),c=Tn(new Set);return Hm({modelValue:u,changeModelValue:p=>{u.value=p},orientation:n,dir:l,unmountOnHide:s,activationMode:t.activationMode,baseId:ft(void 0,"reka-tabs"),tabsList:d,contentIds:c,registerContent:p=>{c.value=new Set([...c.value,p])},unregisterContent:p=>{const f=new Set(c.value);f.delete(p),c.value=f}}),(p,f)=>(y(),_(o(se),{dir:o(l),"data-orientation":o(n),"as-child":p.asChild,as:p.as},{default:w(()=>[M(p.$slots,"default",{modelValue:o(u)})]),_:3},8,["dir","data-orientation","as-child","as"]))}}),Vm=Nm;function fu(i,e){return`${i}-trigger-${e}`}function hu(i,e){return`${i}-content-${e}`}var Um=P({__name:"TabsContent",props:{value:{type:[String,Number],required:!0},forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(i){const e=i,{forwardRef:t}=Q(),r=ns(),n=F(()=>fu(r.baseId,e.value)),s=F(()=>hu(r.baseId,e.value)),a=F(()=>e.value===r.modelValue.value),l=T(a.value);return Ne(()=>{r.registerContent(e.value),requestAnimationFrame(()=>{l.value=!1})}),bl(()=>{r.unregisterContent(e.value)}),(u,d)=>(y(),_(o(Ut),{present:u.forceMount||a.value,"force-mount":""},{default:w(({present:c})=>[E(o(se),{id:s.value,ref:o(t),"as-child":u.asChild,as:u.as,role:"tabpanel","data-state":a.value?"active":"inactive","data-orientation":o(r).orientation.value,"aria-labelledby":n.value,hidden:!c,tabindex:"0",style:Et({animationDuration:l.value?"0s":void 0})},{default:w(()=>[!o(r).unmountOnHide.value||c?M(u.$slots,"default",{key:0}):R("v-if",!0)]),_:2},1032,["id","as-child","as","data-state","data-orientation","aria-labelledby","hidden","style"])]),_:3},8,["present"]))}}),jm=Um,Wm=P({__name:"TabsIndicator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(i,{expose:e}){const t=i,r=ns();e({updateIndicatorStyle:l}),Q();const n=Ad(),s=T({size:null,position:null}),a=T([]);Ie(()=>[r.modelValue.value,r?.dir.value],()=>{l()},{immediate:!0,flush:"post"}),pa(()=>{a.value=Array.from(r.tabsList.value?.querySelectorAll('[role="tab"]')||[])}),Cd(F(()=>[r.tabsList.value,...a.value]),l);function l(){const u=r.tabsList.value?.querySelector('[role="tab"][data-state="active"]');u&&(r.orientation.value==="horizontal"?s.value={size:u.offsetWidth,position:u.offsetLeft}:s.value={size:u.offsetHeight,position:u.offsetTop})}return(u,d)=>o(n)&&typeof s.value.size=="number"?(y(),_(o(se),L({key:0},t,{style:{"--reka-tabs-indicator-size":`${s.value.size}px`,"--reka-tabs-indicator-position":`${s.value.position}px`}}),{default:w(()=>[M(u.$slots,"default")]),_:3},16,["style"])):R("v-if",!0)}}),Gm=Wm,Km=P({__name:"TabsList",props:{loop:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(i){const e=i,{loop:t}=wt(e),{forwardRef:r,currentElement:n}=Q(),s=ns();return s.tabsList=n,(a,l)=>(y(),_(o(Yl),{"as-child":"",orientation:o(s).orientation.value,dir:o(s).dir.value,loop:o(t)},{default:w(()=>[E(o(se),{ref:o(r),role:"tablist","as-child":a.asChild,as:a.as,"aria-orientation":o(s).orientation.value},{default:w(()=>[M(a.$slots,"default")]),_:3},8,["as-child","as","aria-orientation"])]),_:3},8,["orientation","dir","loop"]))}}),Xm=Km,Ym=P({__name:"TabsTrigger",props:{value:{type:[String,Number],required:!0},disabled:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(i){const e=i,{forwardRef:t}=Q(),r=ns(),n=F(()=>fu(r.baseId,e.value)),s=F(()=>r.contentIds.value.has(e.value)?hu(r.baseId,e.value):void 0),a=F(()=>e.value===r.modelValue.value);return(l,u)=>(y(),_(o(Jl),{"as-child":"",focusable:!l.disabled,active:a.value},{default:w(()=>[E(o(se),{id:n.value,ref:o(t),role:"tab",type:l.as==="button"?"button":void 0,as:l.as,"as-child":l.asChild,"aria-selected":a.value?"true":"false","aria-controls":s.value,"data-state":a.value?"active":"inactive",disabled:l.disabled,"data-disabled":l.disabled?"":void 0,"data-orientation":o(r).orientation.value,onMousedown:u[0]||(u[0]=ye(d=>{!l.disabled&&d.ctrlKey===!1?o(r).changeModelValue(l.value):d.preventDefault()},["left"])),onKeydown:u[1]||(u[1]=Ei(d=>o(r).changeModelValue(l.value),["enter","space"])),onFocus:u[2]||(u[2]=()=>{const d=o(r).activationMode!=="manual";!a.value&&!l.disabled&&d&&o(r).changeModelValue(l.value)})},{default:w(()=>[M(l.$slots,"default")]),_:3},8,["id","type","as","as-child","aria-selected","aria-controls","data-state","disabled","data-disabled","data-orientation"])]),_:3},8,["focusable","active"]))}}),Jm=Ym,Zm=P({__name:"TooltipArrow",props:{width:{type:Number,required:!1,default:10},height:{type:Number,required:!1,default:5},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(i){const e=i;return Q(),(t,r)=>(y(),_(o(is),oe(le(e)),{default:w(()=>[M(t.$slots,"default")]),_:3},16))}}),Qm=Zm;const mu="tooltip.open",[ss,eg]=Te("TooltipRoot");var tg=P({__name:"TooltipRoot",props:{defaultOpen:{type:Boolean,required:!1,default:!1},open:{type:Boolean,required:!1,default:void 0},delayDuration:{type:Number,required:!1,default:void 0},disableHoverableContent:{type:Boolean,required:!1,default:void 0},disableClosingTrigger:{type:Boolean,required:!1,default:void 0},disabled:{type:Boolean,required:!1,default:void 0},ignoreNonKeyboardFocus:{type:Boolean,required:!1,default:void 0}},emits:["update:open"],setup(i,{emit:e}){const t=i,r=e;Q();const n=Li(),s=F(()=>t.disableHoverableContent??n.disableHoverableContent.value),a=F(()=>t.disableClosingTrigger??n.disableClosingTrigger.value),l=F(()=>t.disabled??n.disabled.value),u=F(()=>t.delayDuration??n.delayDuration.value),d=F(()=>t.ignoreNonKeyboardFocus??n.ignoreNonKeyboardFocus.value),c=We(t,"open",r,{defaultValue:t.defaultOpen,passive:t.open===void 0});Ie(c,x=>{n.onClose&&(x?(n.onOpen(),document.dispatchEvent(new CustomEvent(mu))):n.onClose())});const p=T(!1),f=T(),m=F(()=>c.value?p.value?"delayed-open":"instant-open":"closed"),{start:h,stop:g}=Sd(()=>{p.value=!0,c.value=!0},u,{immediate:!1});function v(){g(),p.value=!1,c.value=!0}function b(){g(),c.value=!1}function C(){h()}return eg({contentId:"",open:c,stateAttribute:m,trigger:f,onTriggerChange(x){f.value=x},onTriggerEnter(){n.isOpenDelayed.value?C():v()},onTriggerLeave(){s.value?b():g()},onOpen:v,onClose:b,disableHoverableContent:s,disableClosingTrigger:a,disabled:l,ignoreNonKeyboardFocus:d}),(x,A)=>(y(),_(o(Ni),null,{default:w(()=>[M(x.$slots,"default",{open:o(c)})]),_:3}))}}),rg=tg,ig=P({__name:"TooltipContentImpl",props:{ariaLabel:{type:String,required:!1},asChild:{type:Boolean,required:!1,default:void 0},as:{type:null,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},avoidCollisions:{type:Boolean,required:!1,default:void 0},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1,default:void 0},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1}},emits:["escapeKeyDown","pointerDownOutside"],setup(i,{emit:e}){const t=i,r=e,n=ss(),s=Li(),{forwardRef:a,currentElement:l}=Q(),u=F(()=>t.ariaLabel||l.value?.textContent),d=F(()=>{const{ariaLabel:c,...p}=t;return Ht(p,s.content.value??{},{side:"top",sideOffset:0,align:"center",avoidCollisions:!0,collisionBoundary:[],collisionPadding:0,arrowPadding:0,sticky:"partial",hideWhenDetached:!1})});return Ne(()=>{vt(window,"scroll",c=>{c.target?.contains(n.trigger.value)&&n.onClose()},{capture:!0}),vt(window,mu,n.onClose)}),(c,p)=>(y(),_(o(Ri),{"as-child":"","disable-outside-pointer-events":!1,onEscapeKeyDown:p[0]||(p[0]=f=>r("escapeKeyDown",f)),onPointerDownOutside:p[1]||(p[1]=f=>{o(n).disableClosingTrigger.value&&o(n).trigger.value?.contains(f.target)&&f.preventDefault(),r("pointerDownOutside",f)}),onFocusOutside:p[2]||(p[2]=ye(()=>{},["prevent"])),onDismiss:p[3]||(p[3]=f=>o(n).onClose())},{default:w(()=>[E(o(rs),L({ref:o(a),"data-state":o(n).stateAttribute.value},{...c.$attrs,...d.value},{style:{"--reka-tooltip-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-tooltip-content-available-width":"var(--reka-popper-available-width)","--reka-tooltip-content-available-height":"var(--reka-popper-available-height)","--reka-tooltip-trigger-width":"var(--reka-popper-anchor-width)","--reka-tooltip-trigger-height":"var(--reka-popper-anchor-height)"}}),{default:w(()=>[M(c.$slots,"default"),E(o($i),{id:o(n).contentId,role:"tooltip"},{default:w(()=>[ue(ee(u.value),1)]),_:1},8,["id"])]),_:3},16,["data-state"])]),_:3}))}}),gu=ig,ng=P({__name:"TooltipContentHoverable",props:{ariaLabel:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1}},setup(i){const t=Er(i),{forwardRef:r,currentElement:n}=Q(),{trigger:s,onClose:a}=ss(),l=Li(),{isPointerInTransit:u,onPointerExit:d}=El(s,n);return l.isPointerInTransitRef=u,d(()=>{a()}),(c,p)=>(y(),_(gu,L({ref:o(r)},o(t)),{default:w(()=>[M(c.$slots,"default")]),_:3},16))}}),sg=ng,ag=P({__name:"TooltipContent",props:{forceMount:{type:Boolean,required:!1},ariaLabel:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1}},emits:["escapeKeyDown","pointerDownOutside"],setup(i,{emit:e}){const t=i,r=e,n=ss(),s=ot(t,r),{forwardRef:a}=Q();return(l,u)=>(y(),_(o(Ut),{present:l.forceMount||o(n).open.value},{default:w(()=>[(y(),_(pi(o(n).disableHoverableContent.value?gu:sg),L({ref:o(a)},o(s)),{default:w(()=>[M(l.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),og=ag,lg=P({__name:"TooltipPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(i){const e=i;return(t,r)=>(y(),_(o(Di),oe(le(e)),{default:w(()=>[M(t.$slots,"default")]),_:3},16))}}),ug=lg,dg=P({__name:"TooltipTrigger",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(i){const e=i,t=ss(),r=Li();t.contentId||=ft(void 0,"reka-tooltip-content");const{forwardRef:n,currentElement:s}=Q(),a=T(!1),l=T(!1),u=F(()=>t.disabled.value?{}:{click:g,focus:m,pointermove:p,pointerleave:f,pointerdown:c,blur:h});Ne(()=>{t.onTriggerChange(s.value)});function d(){setTimeout(()=>{a.value=!1},1)}function c(){t.open&&!t.disableClosingTrigger.value&&t.onClose(),a.value=!0,document.addEventListener("pointerup",d,{once:!0})}function p(v){v.pointerType!=="touch"&&!l.value&&!r.isPointerInTransitRef.value&&(t.onTriggerEnter(),l.value=!0)}function f(){t.onTriggerLeave(),l.value=!1}function m(v){a.value||t.ignoreNonKeyboardFocus.value&&!v.target.matches?.(":focus-visible")||t.onOpen()}function h(){t.onClose()}function g(){t.disableClosingTrigger.value||t.onClose()}return(v,b)=>(y(),_(o(Vi),{"as-child":"",reference:v.reference},{default:w(()=>[E(o(se),L({ref:o(n),"aria-describedby":o(t).open.value?o(t).contentId:void 0,"data-state":o(t).stateAttribute.value,as:v.as,"as-child":e.asChild,"data-grace-area-trigger":""},Hi(u.value)),{default:w(()=>[M(v.$slots,"default")]),_:3},16,["aria-describedby","data-state","as","as-child"])]),_:3},8,["reference"]))}}),cg=dg;function pg(){const e=Me().ui?.prefix;return t=>!e||!t?t:t.split(/\s+/).filter(Boolean).map(r=>`${e}:${r}`).join(" ")}const fg=()=>Md("color-mode").value,hg=Object.assign({inheritAttrs:!1},{__name:"UColorModeButton",props:{color:{type:null,required:!1,default:"neutral"},variant:{type:null,required:!1,default:"ghost"},label:{type:String,required:!1},activeColor:{type:null,required:!1},activeVariant:{type:null,required:!1},size:{type:null,required:!1},square:{type:Boolean,required:!1},block:{type:Boolean,required:!1},loadingAuto:{type:Boolean,required:!1},onClick:{type:[Function,Array],required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1},icon:{type:null,required:!1},avatar:{type:Object,required:!1},leading:{type:Boolean,required:!1},leadingIcon:{type:null,required:!1},trailing:{type:Boolean,required:!1},trailingIcon:{type:null,required:!1},loading:{type:Boolean,required:!1},loadingIcon:{type:null,required:!1},as:{type:null,required:!1},type:{type:null,required:!1},disabled:{type:Boolean,required:!1},exactActiveClass:{type:String,required:!1},viewTransition:{type:Boolean,required:!1}},setup(i){const t=Re("button",i),{t:r}=zr(),n=fg(),s=Me(),a=pg(),l=Pt(fi(t,"icon")),u=F({get(){return n.value==="dark"},set(d){n.preference=d?"dark":"light"}});return(d,c)=>(y(),_(ct,L({...o(l),"aria-label":u.value?o(r)("colorMode.switchToLight"):o(r)("colorMode.switchToDark"),...d.$attrs},{onClick:c[0]||(c[0]=p=>u.value=!u.value)}),{leading:w(({ui:p})=>[E(Ae,{class:I(p.leadingIcon({class:[o(t).ui?.leadingIcon,o(a)("hidden dark:inline-block")]})),name:o(s).ui.icons.dark},null,8,["class","name"]),E(Ae,{class:I(p.leadingIcon({class:[o(t).ui?.leadingIcon,o(a)("dark:hidden")]})),name:o(s).ui.icons.light},null,8,["class","name"])]),_:1},16))}}),un={meta:"",ctrl:"",alt:"",win:"⊞",command:"⌘",shift:"⇧",control:"⌃",option:"⌥",enter:"↵",delete:"⌦",backspace:"⌫",escape:"Esc",tab:"⇥",capslock:"⇪",arrowup:"↑",arrowright:"→",arrowdown:"↓",arrowleft:"←",pageup:"⇞",pagedown:"⇟",home:"↖",end:"↘"},mg=()=>{const i=F(()=>navigator&&navigator.userAgent&&navigator.userAgent.match(/Macintosh;/)),e=ca({meta:" ",alt:" ",ctrl:" "});Ne(()=>{e.meta=i.value?un.command:"Ctrl",e.ctrl=i.value?un.control:"Ctrl",e.alt=i.value?un.option:"Alt"});function t(r){if(r)return["meta","alt","ctrl"].includes(r)?e[r]:un[r]||r}return{macOS:i,getKbdKey:t}},gg=Xn(mg),yg={base:"inline-flex items-center justify-center px-1 rounded-sm font-medium font-sans uppercase",variants:{color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},variant:{solid:"",outline:"",soft:"",subtle:""},size:{sm:"h-4 min-w-[16px] text-[10px]",md:"h-5 min-w-[20px] text-[11px]",lg:"h-6 min-w-[24px] text-[12px]"}},compoundVariants:[{color:"primary",variant:"solid",class:"text-inverted bg-primary"},{color:"secondary",variant:"solid",class:"text-inverted bg-secondary"},{color:"success",variant:"solid",class:"text-inverted bg-success"},{color:"info",variant:"solid",class:"text-inverted bg-info"},{color:"warning",variant:"solid",class:"text-inverted bg-warning"},{color:"error",variant:"solid",class:"text-inverted bg-error"},{color:"primary",variant:"outline",class:"ring ring-inset ring-primary/50 text-primary"},{color:"secondary",variant:"outline",class:"ring ring-inset ring-secondary/50 text-secondary"},{color:"success",variant:"outline",class:"ring ring-inset ring-success/50 text-success"},{color:"info",variant:"outline",class:"ring ring-inset ring-info/50 text-info"},{color:"warning",variant:"outline",class:"ring ring-inset ring-warning/50 text-warning"},{color:"error",variant:"outline",class:"ring ring-inset ring-error/50 text-error"},{color:"primary",variant:"soft",class:"text-primary bg-primary/10"},{color:"secondary",variant:"soft",class:"text-secondary bg-secondary/10"},{color:"success",variant:"soft",class:"text-success bg-success/10"},{color:"info",variant:"soft",class:"text-info bg-info/10"},{color:"warning",variant:"soft",class:"text-warning bg-warning/10"},{color:"error",variant:"soft",class:"text-error bg-error/10"},{color:"primary",variant:"subtle",class:"text-primary ring ring-inset ring-primary/25 bg-primary/10"},{color:"secondary",variant:"subtle",class:"text-secondary ring ring-inset ring-secondary/25 bg-secondary/10"},{color:"success",variant:"subtle",class:"text-success ring ring-inset ring-success/25 bg-success/10"},{color:"info",variant:"subtle",class:"text-info ring ring-inset ring-info/25 bg-info/10"},{color:"warning",variant:"subtle",class:"text-warning ring ring-inset ring-warning/25 bg-warning/10"},{color:"error",variant:"subtle",class:"text-error ring ring-inset ring-error/25 bg-error/10"},{color:"neutral",variant:"solid",class:"text-inverted bg-inverted"},{color:"neutral",variant:"outline",class:"ring ring-inset ring-accented text-default bg-default"},{color:"neutral",variant:"soft",class:"text-default bg-elevated"},{color:"neutral",variant:"subtle",class:"ring ring-inset ring-accented text-default bg-elevated"}],defaultVariants:{variant:"outline",color:"neutral",size:"md"}},yu={__name:"UKbd",props:{as:{type:null,required:!1,default:"kbd"},value:{type:null,required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1}},setup(i){const t=Re("kbd",i),{getKbdKey:r}=gg(),n=Me(),s=F(()=>de({extend:de(yg),...n.ui?.kbd||{}}));return(a,l)=>(y(),_(o(se),{as:o(t).as,class:I(s.value({class:[o(t).ui?.base,o(t).class],color:o(t).color,variant:o(t).variant,size:o(t).size}))},{default:w(()=>[M(a.$slots,"default",{},()=>[ue(ee(o(r)(o(t).value)),1)])]),_:3},8,["as","class"]))}},vg={slots:{content:"flex items-center gap-1 bg-default text-highlighted shadow-sm rounded-sm ring ring-default h-6 px-2.5 py-1 text-xs select-none data-[state=delayed-open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] origin-(--reka-tooltip-content-transform-origin) pointer-events-auto",arrow:"fill-bg stroke-default",text:"truncate",kbds:"hidden lg:inline-flex items-center shrink-0 gap-0.5 not-first-of-type:before:content-['·'] not-first-of-type:before:me-0.5",kbdsSize:"sm"}},bg={__name:"UTooltip",props:{text:{type:String,required:!1},kbds:{type:Array,required:!1},content:{type:Object,required:!1},arrow:{type:[Boolean,Object],required:!1},portal:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},reference:{type:null,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1},defaultOpen:{type:Boolean,required:!1},open:{type:Boolean,required:!1},delayDuration:{type:Number,required:!1},disableHoverableContent:{type:Boolean,required:!1},disableClosingTrigger:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},ignoreNonKeyboardFocus:{type:Boolean,required:!1}},emits:["update:open"],setup(i,{emit:e}){const t=i,r=e,n=Je(),s=Re("tooltip",t),a=Me(),l=Li(),u=Pt(zt(s,"defaultOpen","open","delayDuration","disableHoverableContent","disableClosingTrigger","ignoreNonKeyboardFocus"),r),d=hi(He(()=>s.portal)),c=He(()=>Ht(s.content,l.content.value,{side:"bottom",sideOffset:8,collisionPadding:8})),p=He(()=>Ht(s.arrow,{rounded:!0})),f=F(()=>de({extend:de(vg),...a.ui?.tooltip||{}})({side:c.value.side}));return(m,h)=>(y(),_(o(rg),L(o(u),{disabled:!(o(s).text||o(s).kbds?.length||n.content)||o(s).disabled}),{default:w(({open:g})=>[n.default||o(s).reference?(y(),_(o(cg),L({key:0},m.$attrs,{"as-child":"",reference:o(s).reference,class:o(s).class}),{default:w(()=>[M(m.$slots,"default",{open:g})]),_:2},1040,["reference","class"])):R("",!0),E(o(ug),oe(le(o(d))),{default:w(()=>[E(o(mi),null,{default:w(()=>[E(o(og),L(c.value,{"data-slot":"content",class:f.value.content({class:[!n.default&&o(s).class,o(s).ui?.content]})}),{default:w(()=>[M(m.$slots,"content",{ui:f.value},()=>[o(s).text?(y(),V("span",{key:0,"data-slot":"text",class:I(f.value.text({class:o(s).ui?.text}))},ee(o(s).text),3)):R("",!0),o(s).kbds?.length?(y(),V("span",{key:1,"data-slot":"kbds",class:I(f.value.kbds({class:o(s).ui?.kbds}))},[(y(!0),V(ve,null,Xe(o(s).kbds,(v,b)=>(y(),_(yu,L({key:b,size:o(s).ui?.kbdsSize||f.value.kbdsSize()},{ref_for:!0},typeof v=="string"?{value:v}:v),null,16,["size"]))),128))],2)):R("",!0)]),o(s).arrow?(y(),_(o(Qm),L({key:0},p.value,{"data-slot":"arrow",class:f.value.arrow({class:o(s).ui?.arrow})}),null,16,["class"])):R("",!0)]),_:3},16,["class"])]),_:3})]),_:3},16)]),_:3},16,["disabled"]))}},xg={base:"w-full max-w-(--ui-container) mx-auto px-4 sm:px-6 lg:px-8"},wg={__name:"UContainer",props:{as:{type:null,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1}},setup(i){const t=Re("container",i),r=Me(),n=F(()=>de({extend:de(xg),...r.ui?.container||{}}));return(s,a)=>(y(),_(o(se),{as:o(t).as,class:I(n.value({class:[o(t).ui?.base,o(t).class]}))},{default:w(()=>[M(s.$slots,"default")]),_:3},8,["as","class"]))}};function as(i,e={}){const t=i.detail.originalEvent,r=t.target;if(!r?.isConnected){i.preventDefault();return}e.scrollable&&(t.offsetX>r.clientWidth||t.offsetY>r.clientHeight)&&i.preventDefault()}const _g={slots:{overlay:"fixed inset-0 bg-elevated/75",content:"fixed bg-default divide-y divide-default sm:ring ring-default sm:shadow-lg flex flex-col focus:outline-none",header:"flex items-center gap-1.5 p-4 sm:px-6 min-h-(--ui-header-height)",wrapper:"",body:"flex-1 overflow-y-auto p-4 sm:p-6",footer:"flex items-center gap-1.5 p-4 sm:px-6",title:"text-highlighted font-semibold",description:"mt-1 text-muted text-sm",close:"absolute top-4 end-4"},variants:{side:{top:{content:""},right:{content:"max-w-md"},bottom:{content:""},left:{content:"max-w-md"}},inset:{true:{content:"rounded-lg"}},transition:{true:{overlay:"data-[state=open]:animate-[fade-in_200ms_ease-out] data-[state=closed]:animate-[fade-out_200ms_ease-in]"}}},compoundVariants:[{side:"top",inset:!0,class:{content:"max-h-[calc(100%-2rem)] inset-x-4 top-4"}},{side:"top",inset:!1,class:{content:"max-h-full inset-x-0 top-0"}},{side:"right",inset:!0,class:{content:"w-[calc(100%-2rem)] inset-y-4 right-4"}},{side:"right",inset:!1,class:{content:"w-full inset-y-0 right-0"}},{side:"bottom",inset:!0,class:{content:"max-h-[calc(100%-2rem)] inset-x-4 bottom-4"}},{side:"bottom",inset:!1,class:{content:"max-h-full inset-x-0 bottom-0"}},{side:"left",inset:!0,class:{content:"w-[calc(100%-2rem)] inset-y-4 left-4"}},{side:"left",inset:!1,class:{content:"w-full inset-y-0 left-0"}},{transition:!0,side:"top",class:{content:"data-[state=open]:animate-[slide-in-from-top_200ms_ease-in-out] data-[state=closed]:animate-[slide-out-to-top_200ms_ease-in-out]"}},{transition:!0,side:"right",class:{content:"data-[state=open]:animate-[slide-in-from-right_200ms_ease-in-out] data-[state=closed]:animate-[slide-out-to-right_200ms_ease-in-out]"}},{transition:!0,side:"bottom",class:{content:"data-[state=open]:animate-[slide-in-from-bottom_200ms_ease-in-out] data-[state=closed]:animate-[slide-out-to-bottom_200ms_ease-in-out]"}},{transition:!0,side:"left",class:{content:"data-[state=open]:animate-[slide-in-from-left_200ms_ease-in-out] data-[state=closed]:animate-[slide-out-to-left_200ms_ease-in-out]"}}]},Cg={__name:"USlideover",props:{title:{type:String,required:!1},description:{type:String,required:!1},content:{type:Object,required:!1},overlay:{type:Boolean,required:!1,default:!0},transition:{type:Boolean,required:!1,default:!0},side:{type:null,required:!1,default:"right"},inset:{type:Boolean,required:!1},portal:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},close:{type:[Boolean,Object],required:!1,default:!0},closeIcon:{type:null,required:!1},dismissible:{type:Boolean,required:!1,default:!0},class:{type:null,required:!1},ui:{type:Object,required:!1},open:{type:Boolean,required:!1},defaultOpen:{type:Boolean,required:!1},modal:{type:Boolean,required:!1,default:!0}},emits:["after:leave","after:enter","close:prevent","update:open"],setup(i,{emit:e}){const t=i,r=e,n=Je(),s=Re("slideover",t),{t:a}=zr(),l=Me(),u=Pt(zt(s,"open","defaultOpen","modal"),r),d=hi(He(()=>s.portal)),c=He(()=>s.content),p=F(()=>s.dismissible?{pointerDownOutside:as}:["interactOutside","escapeKeyDown"].reduce((h,g)=>(h[g]=v=>{v.preventDefault(),r("close:prevent")},h),{})),f=F(()=>de({extend:de(_g),...l.ui?.slideover||{}})({transition:s.transition,side:s.side,inset:s.inset}));return(m,h)=>(y(),_(o(ba),oe(le(o(u))),{default:w(({open:g,close:v})=>[n.default?(y(),_(o(Sa),{key:0,"as-child":"",class:I(o(s).class)},{default:w(()=>[M(m.$slots,"default",{open:g})]),_:2},1032,["class"])):R("",!0),E(o(Aa),oe(le(o(d))),{default:w(()=>[E(o(mi),null,{default:w(()=>[o(s).overlay?(y(),_(o(Dn),{key:0,"data-slot":"overlay",class:I(f.value.overlay({class:o(s).ui?.overlay}))},null,8,["class"])):R("",!0),E(o(Ca),L({"data-side":o(s).side,"data-slot":"content",class:f.value.content({class:[!n.default&&o(s).class,o(s).ui?.content]})},c.value,{onAfterEnter:h[0]||(h[0]=b=>r("after:enter")),onAfterLeave:h[1]||(h[1]=b=>r("after:leave"))},Hi(p.value)),{default:w(()=>[!o(s).title&&!n.title||!o(s).description&&!n.description||n.content?(y(),_(o($i),{key:0},{default:w(()=>[!o(s).title&&!n.title?(y(),_(o(Qt),{key:0})):n.content?(y(),_(o(Qt),{key:1},{default:w(()=>[M(m.$slots,"title",{},()=>[ue(ee(o(s).title),1)])]),_:3})):R("",!0),!o(s).description&&!n.description?(y(),_(o(Zt),{key:2})):n.content?(y(),_(o(Zt),{key:3},{default:w(()=>[M(m.$slots,"description",{},()=>[ue(ee(o(s).description),1)])]),_:3})):R("",!0)]),_:3})):R("",!0),M(m.$slots,"content",{close:v},()=>[n.header||o(s).title||n.title||o(s).description||n.description||o(s).close||n.close?(y(),V("div",{key:0,"data-slot":"header",class:I(f.value.header({class:o(s).ui?.header}))},[M(m.$slots,"header",{close:v},()=>[o(s).title||n.title||o(s).description||n.description?(y(),V("div",{key:0,"data-slot":"wrapper",class:I(f.value.wrapper({class:o(s).ui?.wrapper}))},[o(s).title||n.title?(y(),_(o(Qt),{key:0,"data-slot":"title",class:I(f.value.title({class:o(s).ui?.title}))},{default:w(()=>[M(m.$slots,"title",{},()=>[ue(ee(o(s).title),1)])]),_:3},8,["class"])):R("",!0),o(s).description||n.description?(y(),_(o(Zt),{key:1,"data-slot":"description",class:I(f.value.description({class:o(s).ui?.description}))},{default:w(()=>[M(m.$slots,"description",{},()=>[ue(ee(o(s).description),1)])]),_:3},8,["class"])):R("",!0)],2)):R("",!0),M(m.$slots,"actions"),o(s).close||n.close?(y(),_(o(zl),{key:1,"as-child":""},{default:w(()=>[M(m.$slots,"close",{ui:f.value},()=>[o(s).close?(y(),_(ct,L({key:0,icon:o(s).closeIcon||o(l).ui.icons.close,color:"neutral",variant:"ghost","aria-label":o(a)("slideover.close")},typeof o(s).close=="object"?o(s).close:{},{"data-slot":"close",class:f.value.close({class:o(s).ui?.close})}),null,16,["icon","aria-label","class"])):R("",!0)])]),_:2},1024)):R("",!0)])],2)):R("",!0),D("div",{"data-slot":"body",class:I(f.value.body({class:o(s).ui?.body}))},[M(m.$slots,"body",{close:v})],2),n.footer?(y(),V("div",{key:1,"data-slot":"footer",class:I(f.value.footer({class:o(s).ui?.footer}))},[M(m.$slots,"footer",{close:v})],2)):R("",!0)])]),_:2},1040,["data-side","class"])]),_:2},1024)]),_:2},1040)]),_:3},16))}},Ag={slots:{overlay:"fixed inset-0",content:"bg-default divide-y divide-default flex flex-col focus:outline-none",header:"flex items-center gap-1.5 p-4 sm:px-6 min-h-(--ui-header-height)",wrapper:"",body:"flex-1 p-4 sm:p-6",footer:"flex items-center gap-1.5 p-4 sm:px-6",title:"text-highlighted font-semibold",description:"mt-1 text-muted text-sm",close:"absolute top-4 end-4"},variants:{transition:{true:{overlay:"data-[state=open]:animate-[fade-in_200ms_ease-out] data-[state=closed]:animate-[fade-out_200ms_ease-in]",content:"data-[state=open]:animate-[scale-in_200ms_ease-out] data-[state=closed]:animate-[scale-out_200ms_ease-in]"}},fullscreen:{true:{content:"inset-0"},false:{content:"w-[calc(100vw-2rem)] max-w-lg rounded-lg shadow-lg ring ring-default"}},overlay:{true:{overlay:"bg-elevated/75"}},scrollable:{true:{overlay:"overflow-y-auto",content:"relative"},false:{content:"fixed",body:"overflow-y-auto"}}},compoundVariants:[{scrollable:!0,fullscreen:!1,class:{overlay:"grid place-items-center p-4 sm:py-8"}},{scrollable:!1,fullscreen:!1,class:{content:"top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 max-h-[calc(100dvh-2rem)] sm:max-h-[calc(100dvh-4rem)] overflow-hidden"}}]},Sg={__name:"UModal",props:{title:{type:String,required:!1},description:{type:String,required:!1},content:{type:Object,required:!1},overlay:{type:Boolean,required:!1,default:!0},scrollable:{type:Boolean,required:!1},transition:{type:Boolean,required:!1,default:!0},fullscreen:{type:Boolean,required:!1},portal:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},close:{type:[Boolean,Object],required:!1,default:!0},closeIcon:{type:null,required:!1},dismissible:{type:Boolean,required:!1,default:!0},class:{type:null,required:!1},ui:{type:Object,required:!1},open:{type:Boolean,required:!1},defaultOpen:{type:Boolean,required:!1},modal:{type:Boolean,required:!1,default:!0}},emits:["after:leave","after:enter","close:prevent","update:open"],setup(i,{emit:e}){const t=i,r=e,n=Je(),s=Re("modal",t),{t:a}=zr(),l=Me(),u=Pt(zt(s,"open","defaultOpen","modal"),r),d=hi(He(()=>s.portal)),c=He(()=>s.content),p=F(()=>s.dismissible?{pointerDownOutside:g=>as(g,{scrollable:s.scrollable})}:["interactOutside","escapeKeyDown"].reduce((v,b)=>(v[b]=C=>{C.preventDefault(),r("close:prevent")},v),{})),[f,m]=ii(),h=F(()=>de({extend:de(Ag),...l.ui?.modal||{}})({transition:s.transition,fullscreen:s.fullscreen,overlay:s.overlay,scrollable:s.scrollable}));return(g,v)=>(y(),_(o(ba),oe(le(o(u))),{default:w(({open:b,close:C})=>[E(o(f),null,{default:w(()=>[E(o(Ca),L({"data-slot":"content",class:h.value.content({class:[!n.default&&o(s).class,o(s).ui?.content]})},c.value,{onAfterEnter:v[0]||(v[0]=x=>r("after:enter")),onAfterLeave:v[1]||(v[1]=x=>r("after:leave"))},Hi(p.value)),{default:w(()=>[!o(s).title&&!n.title||!o(s).description&&!n.description||n.content?(y(),_(o($i),{key:0},{default:w(()=>[!o(s).title&&!n.title?(y(),_(o(Qt),{key:0})):n.content?(y(),_(o(Qt),{key:1},{default:w(()=>[M(g.$slots,"title",{},()=>[ue(ee(o(s).title),1)])]),_:3})):R("",!0),!o(s).description&&!n.description?(y(),_(o(Zt),{key:2})):n.content?(y(),_(o(Zt),{key:3},{default:w(()=>[M(g.$slots,"description",{},()=>[ue(ee(o(s).description),1)])]),_:3})):R("",!0)]),_:3})):R("",!0),M(g.$slots,"content",{close:C},()=>[n.header||o(s).title||n.title||o(s).description||n.description||o(s).close||n.close?(y(),V("div",{key:0,"data-slot":"header",class:I(h.value.header({class:o(s).ui?.header}))},[M(g.$slots,"header",{close:C},()=>[o(s).title||n.title||o(s).description||n.description?(y(),V("div",{key:0,"data-slot":"wrapper",class:I(h.value.wrapper({class:o(s).ui?.wrapper}))},[o(s).title||n.title?(y(),_(o(Qt),{key:0,"data-slot":"title",class:I(h.value.title({class:o(s).ui?.title}))},{default:w(()=>[M(g.$slots,"title",{},()=>[ue(ee(o(s).title),1)])]),_:3},8,["class"])):R("",!0),o(s).description||n.description?(y(),_(o(Zt),{key:1,"data-slot":"description",class:I(h.value.description({class:o(s).ui?.description}))},{default:w(()=>[M(g.$slots,"description",{},()=>[ue(ee(o(s).description),1)])]),_:3},8,["class"])):R("",!0)],2)):R("",!0),M(g.$slots,"actions"),o(s).close||n.close?(y(),_(o(zl),{key:1,"as-child":""},{default:w(()=>[M(g.$slots,"close",{ui:h.value},()=>[o(s).close?(y(),_(ct,L({key:0,icon:o(s).closeIcon||o(l).ui.icons.close,color:"neutral",variant:"ghost","aria-label":o(a)("modal.close")},typeof o(s).close=="object"?o(s).close:{},{"data-slot":"close",class:h.value.close({class:o(s).ui?.close})}),null,16,["icon","aria-label","class"])):R("",!0)])]),_:2},1024)):R("",!0)])],2)):R("",!0),n.body?(y(),V("div",{key:1,"data-slot":"body",class:I(h.value.body({class:o(s).ui?.body}))},[M(g.$slots,"body",{close:C})],2)):R("",!0),n.footer?(y(),V("div",{key:2,"data-slot":"footer",class:I(h.value.footer({class:o(s).ui?.footer}))},[M(g.$slots,"footer",{close:C})],2)):R("",!0)])]),_:2},1040,["class"])]),_:2},1024),n.default?(y(),_(o(Sa),{key:0,"as-child":"",class:I(o(s).class)},{default:w(()=>[M(g.$slots,"default",{open:b})]),_:2},1032,["class"])):R("",!0),E(o(Aa),oe(le(o(d))),{default:w(()=>[E(o(mi),null,{default:w(()=>[o(s).scrollable?(y(),_(o(Dn),{key:0,"data-slot":"overlay",class:I(h.value.overlay({class:o(s).ui?.overlay}))},{default:w(()=>[E(o(m))]),_:1},8,["class"])):(y(),V(ve,{key:1},[o(s).overlay?(y(),_(o(Dn),{key:0,"data-slot":"overlay",class:I(h.value.overlay({class:o(s).ui?.overlay}))},null,8,["class"])):R("",!0),E(o(m))],64))]),_:1})]),_:1},16)]),_:3},16))}};(function(){var i;try{if(typeof document<"u"){var e=document.createElement("style");e.nonce=(i=document.head.querySelector("meta[property=csp-nonce]"))==null?void 0:i.content,e.appendChild(document.createTextNode('[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32,.72,0,1);animation-duration:.5s;animation-timing-function:cubic-bezier(.32,.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform, 100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform, 100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform, 100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform, 100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top],[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height, 0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left],[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height, 0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(.32,.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32,.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true]):after{content:"";position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]:after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]:after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]:after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]:after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not([data-state=closed]){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:hover,[data-vaul-handle]:active{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover: hover) and (pointer: fine){[data-vaul-drawer]{-webkit-user-select:none;user-select:none}}@media (pointer: fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{0%{transform:translate3d(0,var(--initial-transform, 100%),0)}to{transform:translateZ(0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform, 100%),0)}}@keyframes slideFromTop{0%{transform:translate3d(0,calc(var(--initial-transform, 100%) * -1),0)}to{transform:translateZ(0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform, 100%) * -1),0)}}@keyframes slideFromLeft{0%{transform:translate3d(calc(var(--initial-transform, 100%) * -1),0,0)}to{transform:translateZ(0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform, 100%) * -1),0,0)}}@keyframes slideFromRight{0%{transform:translate3d(var(--initial-transform, 100%),0,0)}to{transform:translateZ(0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform, 100%),0,0)}}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();const Mg=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Bg=i=>typeof i<"u";function kg(i){return JSON.parse(JSON.stringify(i))}function ko(i,e,t,r={}){var n,s,a;const{clone:l=!1,passive:u=!1,eventName:d,deep:c=!1,defaultValue:p,shouldEmit:f}=r,m=Bd(),h=t||m?.emit||((n=m?.$emit)==null?void 0:n.bind(m))||((a=(s=m?.proxy)==null?void 0:s.$emit)==null?void 0:a.bind(m?.proxy));let g=d;e||(e="modelValue"),g=g||`update:${e.toString()}`;const v=x=>l?typeof l=="function"?l(x):kg(x):x,b=()=>Bg(i[e])?v(i[e]):p,C=x=>{f?f(x)&&h(g,x):h(g,x)};if(u){const x=b(),A=T(x);let q=!1;return Ie(()=>i[e],S=>{q||(q=!0,A.value=v(S),tt(()=>q=!1))}),Ie(A,S=>{!q&&(S!==i[e]||c)&&C(S)},{deep:c}),A}else return F({get(){return b()},set(x){C(x)}})}const[Wi,qg]=Te("DrawerRoot"),vu=new WeakMap;function Le(i,e,t=!1){if(!i||!(i instanceof HTMLElement)||!e)return;const r={};Object.entries(e).forEach(([n,s])=>{if(n.startsWith("--")){i.style.setProperty(n,s);return}r[n]=i.style[n],i.style[n]=s}),!t&&vu.set(i,r)}function Fg(i,e){if(!i||!(i instanceof HTMLElement))return;const t=vu.get(i);t&&Object.entries(t).forEach(([r,n])=>{i.style[r]=n})}function dn(i,e){const t=window.getComputedStyle(i),r=t.transform||t.webkitTransform||t.mozTransform;let n=r.match(/^matrix3d\((.+)\)$/);return n?Number.parseFloat(n[1].split(", ")[Ee(e)?13:12]):(n=r.match(/^matrix\((.+)\)$/),n?Number.parseFloat(n[1].split(", ")[Ee(e)?5:4]):null)}function Eg(i){return 8*(Math.log(i+1)-2)}function Ee(i){switch(i){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return i}}function vs(i,e){if(!i)return()=>{};const t=i.style.cssText;return Object.assign(i.style,e),()=>{i.style.cssText=t}}function Og(...i){return(...e)=>{for(const t of i)typeof t=="function"&&t(...e)}}const be={DURATION:.5,EASE:[.32,.72,0,1]},bu=.4,zg=.25,Ig=100,xu=8,cn=16,wu=26,qo="vaul-dragging";function Tg({activeSnapPoint:i,snapPoints:e,drawerRef:t,overlayRef:r,fadeFromIndex:n,onSnapPointChange:s,direction:a}){const l=T(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);function u(){l.value={innerWidth:window.innerWidth,innerHeight:window.innerHeight}}Ne(()=>{typeof window<"u"&&window.addEventListener("resize",u)}),bl(()=>{typeof window<"u"&&window.removeEventListener("resize",u)});const d=F(()=>(e.value&&i.value===e.value[e.value.length-1])??null),c=F(()=>e.value&&e.value.length>0&&(n?.value||n?.value===0)&&!Number.isNaN(n?.value)&&e.value[n?.value??-1]===i.value||!e.value),p=F(()=>{var C;return((C=e.value)==null?void 0:C.findIndex(x=>x===i.value))??null}),f=F(()=>{var C;return((C=e.value)==null?void 0:C.map(x=>{const A=typeof x=="string";let q=0;if(A&&(q=Number.parseInt(x,10)),Ee(a.value)){const B=A?q:l.value?x*l.value.innerHeight:0;return l.value?a.value==="bottom"?l.value.innerHeight-B:-l.value.innerHeight+B:B}const S=A?q:l.value?x*l.value.innerWidth:0;return l.value?a.value==="right"?l.value.innerWidth-S:-l.value.innerWidth+S:S}))??[]}),m=F(()=>{var C;return p.value!==null?(C=f.value)==null?void 0:C[p.value]:null}),h=C=>{var x,A,q,S;const B=((x=f.value)==null?void 0:x.findIndex(k=>k===C))??null;tt(()=>{var k;s(B,f.value),Le((k=t.value)==null?void 0:k.$el,{transition:`transform ${be.DURATION}s cubic-bezier(${be.EASE.join(",")})`,transform:Ee(a.value)?`translate3d(0, ${C}px, 0)`:`translate3d(${C}px, 0, 0)`})}),f.value&&B!==f.value.length-1&&B!==n?.value?Le((A=r.value)==null?void 0:A.$el,{transition:`opacity ${be.DURATION}s cubic-bezier(${be.EASE.join(",")})`,opacity:"0"}):Le((q=r.value)==null?void 0:q.$el,{transition:`opacity ${be.DURATION}s cubic-bezier(${be.EASE.join(",")})`,opacity:"1"}),i.value=B!==null?((S=e.value)==null?void 0:S[B])??null:null};Ie([i,f,e],()=>{var C;if(i.value){const x=((C=e.value)==null?void 0:C.findIndex(A=>A===i.value))??-1;f.value&&x!==-1&&typeof f.value[x]=="number"&&h(f.value[x])}},{immediate:!0});function g({draggedDistance:C,closeDrawer:x,velocity:A,dismissible:q}){var S,B,k;if(n.value===void 0)return;const N=a.value==="bottom"||a.value==="right"?(m.value??0)-C:(m.value??0)+C,z=p.value===n.value-1,j=p.value===0,W=C>0;if(z&&Le((S=r.value)==null?void 0:S.$el,{transition:`opacity ${be.DURATION}s cubic-bezier(${be.EASE.join(",")})`}),A>2&&!W){q?x():h(f.value[0]);return}if(A>2&&W&&f&&e.value){h(f.value[e.value.length-1]);return}const J=(B=f.value)==null?void 0:B.reduce((O,U)=>typeof O!="number"||typeof U!="number"?O:Math.abs(U-N)<Math.abs(O-N)?U:O),ie=Ee(a.value)?window.innerHeight:window.innerWidth;if(A>bu&&Math.abs(C)<ie*.4){const O=W?1:-1;if(O>0&&d){h(f.value[(((k=e.value)==null?void 0:k.length)??0)-1]);return}if(j&&O<0&&q&&x(),p.value===null)return;h(f.value[p.value+O]);return}h(J)}function v({draggedDistance:C}){var x;if(m.value===null)return;const A=a.value==="bottom"||a.value==="right"?m.value-C:m.value+C;(a.value==="bottom"||a.value==="right")&&A<f.value[f.value.length-1]||(a.value==="top"||a.value==="left")&&A>f.value[f.value.length-1]||Le((x=t.value)==null?void 0:x.$el,{transform:Ee(a.value)?`translate3d(0, ${A}px, 0)`:`translate3d(${A}px, 0, 0)`})}function b(C,x){if(!e.value||typeof p.value!="number"||!f.value||n.value===void 0)return null;const A=p.value===n.value-1;if(p.value>=n.value&&x)return 0;if(A&&!x)return 1;if(!c.value&&!A)return null;const q=A?p.value+1:p.value-1,S=A?f.value[q]-f.value[q-1]:f.value[q+1]-f.value[q],B=C/Math.abs(S);return A?1-B:B}return{isLastSnapPoint:d,shouldFade:c,getPercentageDragged:b,activeSnapPointIndex:p,onRelease:g,onDrag:v,snapPointsOffset:f}}function Fo(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}let _i=null;function Pg(i){const{isOpen:e,modal:t,nested:r,hasBeenOpened:n,preventScrollRestoration:s,noBodyStyles:a}=i,l=T(typeof window<"u"?window.location.href:""),u=T(0);function d(){if(Fo()&&_i===null&&e.value&&!a.value){_i={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height};const{scrollX:p,innerHeight:f}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-u.value}px`,left:`${-p}px`,right:"0px",height:"auto"}),setTimeout(()=>{requestAnimationFrame(()=>{const m=f-window.innerHeight;m&&u.value>=f&&(document.body.style.top=`-${u.value+m}px`)})},300)}}function c(){if(Fo()&&_i!==null&&!a.value){const p=-Number.parseInt(document.body.style.top,10),f=-Number.parseInt(document.body.style.left,10);Object.assign(document.body.style,_i),window.requestAnimationFrame(()=>{if(s.value&&l.value!==window.location.href){l.value=window.location.href;return}window.scrollTo(f,p)}),_i=null}}return Ne(()=>{function p(){u.value=window.scrollY}p(),window.addEventListener("scroll",p),gr(()=>{window.removeEventListener("scroll",p)})}),Ie([e,n,l],()=>{r.value||!n.value||(e.value?(window.matchMedia("(display-mode: standalone)").matches||d(),t.value||setTimeout(()=>{c()},500)):c())}),{restorePositionSetting:c}}function Rg(i,e){return i&&i.value?i:e}function Dg(i){const{emitDrag:e,emitRelease:t,emitClose:r,emitOpenChange:n,open:s,dismissible:a,nested:l,modal:u,shouldScaleBackground:d,setBackgroundColorOnScale:c,scrollLockTimeout:p,closeThreshold:f,activeSnapPoint:m,fadeFromIndex:h,direction:g,noBodyStyles:v,handleOnly:b,preventScrollRestoration:C}=i,x=T(s.value??!1),A=T(!1),q=T(!1),S=T(!1),B=T(null),k=T(null),N=T(null),z=T(null),j=T(null),W=T(!1),J=T(null),ie=T(0),O=T(!1),U=T(null),re=F(()=>{var ne;return((ne=U.value)==null?void 0:ne.$el.getBoundingClientRect().height)||0}),X=Rg(i.snapPoints,T(void 0)),ce=F(()=>{var ne;return X&&(((ne=X.value)==null?void 0:ne.length)??0)>0}),te=T(null),{activeSnapPointIndex:fe,onRelease:_t,snapPointsOffset:Qi,onDrag:ls,shouldFade:Ka,getPercentageDragged:rd}=Tg({snapPoints:X,activeSnapPoint:m,drawerRef:U,fadeFromIndex:h,overlayRef:B,onSnapPointChange:id,direction:g});function id(ne,_e){X.value&&ne===_e.length-1&&(k.value=new Date)}Pg({isOpen:x,modal:u,nested:l,hasBeenOpened:A,noBodyStyles:v,preventScrollRestoration:C});function en(){return(window.innerWidth-wu)/window.innerWidth}function Xa(ne,_e){var Pe;if(!ne)return!1;let ge=ne;const Ve=(Pe=window.getSelection())==null?void 0:Pe.toString(),Ze=U.value?dn(U.value.$el,g.value):null,Ct=new Date;if(ge.hasAttribute("data-vaul-no-drag")||ge.closest("[data-vaul-no-drag]"))return!1;if(g.value==="right"||g.value==="left")return!0;if(k.value&&Ct.getTime()-k.value.getTime()<500)return!1;if(Ze!==null&&(g.value==="bottom"?Ze>0:Ze<0))return!0;if(Ve&&Ve.length>0)return!1;if(j.value&&Ct.getTime()-j.value.getTime()<p.value&&Ze===0||_e)return j.value=Ct,!1;for(;ge;){if(ge.scrollHeight>ge.clientHeight){if(ge.scrollTop!==0)return j.value=new Date,!1;if(ge.getAttribute("role")==="dialog")return!0}ge=ge.parentNode}return!0}function nd(ne){!a.value&&!X.value||U.value&&!U.value.$el.contains(ne.target)||(q.value=!0,N.value=new Date,ne.target.setPointerCapture(ne.pointerId),ie.value=Ee(g.value)?ne.clientY:ne.clientX)}function sd(ne){var _e,Pe,ge,Ve,Ze,Ct;if(U.value&&q.value){const Rr=g.value==="bottom"||g.value==="right"?1:-1,tn=(ie.value-(Ee(g.value)?ne.clientY:ne.clientX))*Rr,rn=tn>0,Ja=X.value&&!a.value&&!rn;if(Ja&&fe.value===0)return;const us=Math.abs(tn),Za=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");let vr=us/re.value;const Qa=rd(us,rn);if(Qa!==null&&(vr=Qa),Ja&&vr>=1||!W.value&&!Xa(ne.target,rn))return;if((_e=U?.value)==null||_e.$el.classList.add(qo),W.value=!0,Le((Pe=U.value)==null?void 0:Pe.$el,{transition:"none"}),Le((ge=B.value)==null?void 0:ge.$el,{transition:"none"}),X.value&&ls({draggedDistance:tn}),rn&&!X.value){const br=Eg(tn),nn=Math.min(br*-1,0)*Rr;Le((Ve=U.value)==null?void 0:Ve.$el,{transform:Ee(g.value)?`translate3d(0, ${nn}px, 0)`:`translate3d(${nn}px, 0, 0)`});return}const dd=1-vr;if((Ka.value||h.value&&fe.value===h.value-1)&&(e(vr),Le((Ze=B.value)==null?void 0:Ze.$el,{opacity:`${dd}`,transition:"none"},!0)),Za&&B.value&&d.value){const br=Math.min(en()+vr*(1-en()),1),nn=8-vr*8,eo=Math.max(0,14-vr*14);Le(Za,{borderRadius:`${nn}px`,transform:Ee(g.value)?`scale(${br}) translate3d(0, ${eo}px, 0)`:`scale(${br}) translate3d(${eo}px, 0, 0)`,transition:"none"},!0)}if(!X.value){const br=us*Rr;Le((Ct=U.value)==null?void 0:Ct.$el,{transform:Ee(g.value)?`translate3d(0, ${br}px, 0)`:`translate3d(${br}px, 0, 0)`})}}}function Ya(){var ne;if(!U.value)return;const _e=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]"),Pe=dn(U.value.$el,g.value);Le(U.value.$el,{transform:"translate3d(0, 0, 0)",transition:`transform ${be.DURATION}s cubic-bezier(${be.EASE.join(",")})`}),Le((ne=B.value)==null?void 0:ne.$el,{transition:`opacity ${be.DURATION}s cubic-bezier(${be.EASE.join(",")})`,opacity:"1"}),d.value&&Pe&&Pe>0&&x.value&&Le(_e,{borderRadius:`${xu}px`,overflow:"hidden",...Ee(g.value)?{transform:`scale(${en()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${en()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${be.DURATION}s`,transitionTimingFunction:`cubic-bezier(${be.EASE.join(",")})`},!0)}function wi(ne){U.value&&(r(),ne||(x.value=!1),window.setTimeout(()=>{X.value&&(m.value=X.value[0])},be.DURATION*1e3))}xt(()=>{if(!x.value&&d.value&&Mg){const ne=setTimeout(()=>{Fg(document.body)},200);return()=>clearTimeout(ne)}}),Ie(s,()=>{x.value=s.value,s.value||wi()});function ad(ne){if(!q.value||!U.value)return;U.value.$el.classList.remove(qo),W.value=!1,q.value=!1,z.value=new Date;const _e=dn(U.value.$el,g.value);if(!Xa(ne.target,!1)||!_e||Number.isNaN(_e)||N.value===null)return;const Pe=z.value.getTime()-N.value.getTime(),ge=ie.value-(Ee(g.value)?ne.clientY:ne.clientX),Ve=Math.abs(ge)/Pe;if(Ve>.05&&(S.value=!0,window.setTimeout(()=>{S.value=!1},200)),X.value){const Ct=g.value==="bottom"||g.value==="right"?1:-1;_t({draggedDistance:ge*Ct,closeDrawer:wi,velocity:Ve,dismissible:a.value}),t(!0);return}if(g.value==="bottom"||g.value==="right"?ge>0:ge<0){Ya(),t(!0);return}if(Ve>bu){wi(),t(!1);return}const Ze=Math.min(U.value.$el.getBoundingClientRect().height??0,window.innerHeight);if(_e>=Ze*f.value){wi(),t(!1);return}t(!0),Ya()}Ie(x,ne=>{ne&&(k.value=new Date),n(ne)},{immediate:!0});function od(ne){var _e,Pe;const ge=ne?(window.innerWidth-cn)/window.innerWidth:1,Ve=ne?-16:0;J.value&&window.clearTimeout(J.value),Le((_e=U.value)==null?void 0:_e.$el,{transition:`transform ${be.DURATION}s cubic-bezier(${be.EASE.join(",")})`,transform:`scale(${ge}) translate3d(0, ${Ve}px, 0)`}),!ne&&(Pe=U.value)!=null&&Pe.$el&&(J.value=window.setTimeout(()=>{var Ze,Ct;const Rr=dn((Ze=U.value)==null?void 0:Ze.$el,g.value);Le((Ct=U.value)==null?void 0:Ct.$el,{transition:"none",transform:Ee(g.value)?`translate3d(0, ${Rr}px, 0)`:`translate3d(${Rr}px, 0, 0)`})},500))}function ld(ne){var _e;if(ne<0)return;const Pe=Ee(g.value)?window.innerHeight:window.innerWidth,ge=(Pe-cn)/Pe,Ve=ge+ne*(1-ge),Ze=-16+ne*cn;Le((_e=U.value)==null?void 0:_e.$el,{transform:Ee(g.value)?`scale(${Ve}) translate3d(0, ${Ze}px, 0)`:`scale(${Ve}) translate3d(${Ze}px, 0, 0)`,transition:"none"})}function ud(ne){var _e;const Pe=Ee(g.value)?window.innerHeight:window.innerWidth,ge=ne?(Pe-cn)/Pe:1,Ve=ne?-16:0;ne&&Le((_e=U.value)==null?void 0:_e.$el,{transition:`transform ${be.DURATION}s cubic-bezier(${be.EASE.join(",")})`,transform:Ee(g.value)?`scale(${ge}) translate3d(0, ${Ve}px, 0)`:`scale(${ge}) translate3d(${Ve}px, 0, 0)`})}return{open:s,isOpen:x,modal:u,keyboardIsOpen:O,hasBeenOpened:A,drawerRef:U,drawerHeightRef:re,overlayRef:B,handleRef:te,isDragging:q,dragStartTime:N,isAllowedToDrag:W,snapPoints:X,activeSnapPoint:m,hasSnapPoints:ce,pointerStart:ie,dismissible:a,snapPointsOffset:Qi,direction:g,shouldFade:Ka,fadeFromIndex:h,shouldScaleBackground:d,setBackgroundColorOnScale:c,onPress:nd,onDrag:sd,onRelease:ad,closeDrawer:wi,onNestedDrag:ld,onNestedRelease:ud,onNestedOpenChange:od,emitClose:r,emitDrag:e,emitRelease:t,emitOpenChange:n,nested:l,handleOnly:b,noBodyStyles:v}}const _u=P({__name:"DrawerRoot",props:{activeSnapPoint:{default:void 0},closeThreshold:{default:zg},shouldScaleBackground:{type:Boolean,default:void 0},setBackgroundColorOnScale:{type:Boolean,default:!0},scrollLockTimeout:{default:Ig},fixed:{type:Boolean,default:void 0},dismissible:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:void 0},nested:{type:Boolean,default:!1},direction:{default:"bottom"},noBodyStyles:{type:Boolean},handleOnly:{type:Boolean,default:!1},preventScrollRestoration:{type:Boolean},snapPoints:{default:void 0},fadeFromIndex:{default:void 0}},emits:["drag","release","close","update:open","update:activeSnapPoint","animationEnd"],setup(i,{expose:e,emit:t}){const r=i,n=t;Je();const s=F(()=>r.fadeFromIndex??(r.snapPoints&&r.snapPoints.length-1)),a=ko(r,"open",n,{defaultValue:r.defaultOpen,passive:r.open===void 0}),l=ko(r,"activeSnapPoint",n,{passive:r.activeSnapPoint===void 0}),u={emitDrag:h=>n("drag",h),emitRelease:h=>n("release",h),emitClose:()=>n("close"),emitOpenChange:h=>{n("update:open",h),setTimeout(()=>{n("animationEnd",h)},be.DURATION*1e3)}},{closeDrawer:d,hasBeenOpened:c,modal:p,isOpen:f}=qg(Dg({...u,...wt(r),activeSnapPoint:l,fadeFromIndex:s,open:a}));function m(h){if(a.value!==void 0){u.emitOpenChange(h);return}f.value=h,h?c.value=!0:d()}return e({open:f}),(h,g)=>(y(),_(o(ba),{open:o(f),modal:o(p),"onUpdate:open":m},{default:w(()=>[M(h.$slots,"default",{open:o(f)})]),_:3},8,["open","modal"]))}}),$g=P({__name:"DrawerRootNested",props:{activeSnapPoint:{},closeThreshold:{},shouldScaleBackground:{type:Boolean},setBackgroundColorOnScale:{type:Boolean},scrollLockTimeout:{},fixed:{type:Boolean},dismissible:{type:Boolean},modal:{type:Boolean},open:{type:Boolean},defaultOpen:{type:Boolean},nested:{type:Boolean},direction:{},noBodyStyles:{type:Boolean},handleOnly:{type:Boolean},preventScrollRestoration:{type:Boolean},snapPoints:{},fadeFromIndex:{}},emits:["drag","release","close","update:open","update:activeSnapPoint","animationEnd"],setup(i,{emit:e}){const t=i,r=e,{onNestedDrag:n,onNestedOpenChange:s,onNestedRelease:a}=Wi();function l(){s(!1)}function u(p){n(p)}function d(p){p&&s(p),r("update:open",p)}const c=ot(t,r);return(p,f)=>(y(),_(_u,L(o(c),{nested:"",onClose:l,onDrag:u,onRelease:o(a),"onUpdate:open":d}),{default:w(()=>[M(p.$slots,"default")]),_:3},16,["onRelease"]))}}),Lg=P({__name:"DrawerOverlay",setup(i){const{overlayRef:e,hasSnapPoints:t,isOpen:r,shouldFade:n}=Wi();return(s,a)=>(y(),_(o(Dn),{ref_key:"overlayRef",ref:e,"data-vaul-overlay":"","data-vaul-snap-points":o(r)&&o(t)?"true":"false","data-vaul-snap-points-overlay":o(r)&&o(n)?"true":"false"},null,8,["data-vaul-snap-points","data-vaul-snap-points-overlay"]))}}),Hg=()=>()=>{};function Ng(){const{direction:i,isOpen:e,shouldScaleBackground:t,setBackgroundColorOnScale:r,noBodyStyles:n}=Wi(),s=T(null),a=T(document.body.style.backgroundColor);function l(){return(window.innerWidth-wu)/window.innerWidth}xt(u=>{if(e.value&&t.value){s.value&&clearTimeout(s.value);const d=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!d)return;Og(r.value&&!n.value?vs(document.body,{background:"black"}):Hg,vs(d,{transformOrigin:Ee(i.value)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${be.DURATION}s`,transitionTimingFunction:`cubic-bezier(${be.EASE.join(",")})`}));const c=vs(d,{borderRadius:`${xu}px`,overflow:"hidden",...Ee(i.value)?{transform:`scale(${l()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${l()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});u(()=>{c(),s.value=window.setTimeout(()=>{a.value?document.body.style.background=a.value:document.body.style.removeProperty("background")},be.DURATION*1e3)})}},{flush:"pre"})}const Vg=P({__name:"DrawerContent",setup(i){const{open:e,isOpen:t,snapPointsOffset:r,hasSnapPoints:n,drawerRef:s,onPress:a,onDrag:l,onRelease:u,modal:d,emitOpenChange:c,dismissible:p,keyboardIsOpen:f,closeDrawer:m,direction:h,handleOnly:g}=Wi();Ng();const v=T(!1),b=F(()=>r.value&&r.value.length>0?`${r.value[0]}px`:"0");function C(q){if(!d.value||q.defaultPrevented){q.preventDefault();return}f.value&&(f.value=!1),p.value?c(!1):q.preventDefault()}function x(q){g.value||a(q)}function A(q){g.value||l(q)}return xt(()=>{n.value&&window.requestAnimationFrame(()=>{v.value=!0})}),(q,S)=>(y(),_(o(Ca),{ref_key:"drawerRef",ref:s,"data-vaul-drawer":"","data-vaul-drawer-direction":o(h),"data-vaul-delayed-snap-points":v.value?"true":"false","data-vaul-snap-points":o(t)&&o(n)?"true":"false",style:Et({"--snap-point-height":b.value}),onPointerdown:x,onPointermove:A,onPointerup:o(u),onPointerDownOutside:C,onOpenAutoFocus:S[0]||(S[0]=ye(()=>{},["prevent"])),onEscapeKeyDown:S[1]||(S[1]=B=>{o(p)||B.preventDefault()})},{default:w(()=>[M(q.$slots,"default")]),_:3},8,["data-vaul-drawer-direction","data-vaul-delayed-snap-points","data-vaul-snap-points","style","onPointerup"]))}}),Ug=["data-vaul-drawer-visible"],jg={"data-vaul-handle-hitarea":"","aria-hidden":"true"},Wg=250,Gg=120,Kg=P({__name:"DrawerHandle",props:{preventCycle:{type:Boolean,default:!1}},setup(i){const e=i,{onPress:t,onDrag:r,handleRef:n,handleOnly:s,isOpen:a,snapPoints:l,activeSnapPoint:u,isDragging:d,dismissible:c,closeDrawer:p}=Wi(),f=T(null),m=T(!1);function h(){if(m.value){b();return}window.setTimeout(()=>{g()},Gg)}function g(){if(d.value||e.preventCycle||m.value){b();return}if(b(),!l.value||l.value.length===0){c.value||p();return}const A=u.value===l.value[l.value.length-1];if(A&&c.value){p();return}const q=l.value.findIndex(B=>B===u.value);if(q===-1)return;const S=A?0:q+1;u.value=l.value[S]}function v(){f.value=window.setTimeout(()=>{m.value=!0},Wg)}function b(){f.value&&window.clearTimeout(f.value),m.value=!1}function C(A){s.value&&t(A),v()}function x(A){s.value&&r(A)}return(A,q)=>(y(),V("div",{ref_key:"handleRef",ref:n,"data-vaul-drawer-visible":o(a)?"true":"false","data-vaul-handle":"","aria-hidden":"true",onClick:h,onPointercancel:b,onPointerdown:C,onPointermove:x},[D("span",jg,[M(A.$slots,"default")])],40,Ug))}}),Xg={slots:{overlay:"fixed inset-0 bg-elevated/75",content:"fixed bg-default ring ring-default flex focus:outline-none",handle:["shrink-0 !bg-accented","transition-opacity"],container:"w-full flex flex-col gap-4 p-4 overflow-y-auto",header:"",title:"text-highlighted font-semibold",description:"mt-1 text-muted text-sm",body:"flex-1",footer:"flex flex-col gap-1.5"},variants:{direction:{top:{content:"mb-24 flex-col-reverse",handle:"mb-4"},right:{content:"flex-row rtl:flex-row-reverse",handle:"!ml-4"},bottom:{content:"mt-24 flex-col",handle:"mt-4"},left:{content:"flex-row-reverse rtl:flex-row",handle:"!mr-4"}},inset:{true:{content:"rounded-lg after:hidden overflow-hidden [--initial-transform:calc(100%+1.5rem)]"}},snapPoints:{true:""}},compoundVariants:[{direction:["top","bottom"],class:{content:"h-auto max-h-[96%]",handle:"!w-12 !h-1.5 mx-auto"}},{direction:["top","bottom"],snapPoints:!0,class:{content:"h-full"}},{direction:["right","left"],class:{content:"w-auto max-w-[calc(100%-2rem)]",handle:"!h-12 !w-1.5 mt-auto mb-auto"}},{direction:["right","left"],snapPoints:!0,class:{content:"w-full"}},{direction:"top",inset:!0,class:{content:"inset-x-4 top-4"}},{direction:"top",inset:!1,class:{content:"inset-x-0 top-0 rounded-b-lg"}},{direction:"bottom",inset:!0,class:{content:"inset-x-4 bottom-4"}},{direction:"bottom",inset:!1,class:{content:"inset-x-0 bottom-0 rounded-t-lg"}},{direction:"left",inset:!0,class:{content:"inset-y-4 left-4"}},{direction:"left",inset:!1,class:{content:"inset-y-0 left-0 rounded-r-lg"}},{direction:"right",inset:!0,class:{content:"inset-y-4 right-4"}},{direction:"right",inset:!1,class:{content:"inset-y-0 right-0 rounded-l-lg"}}]},Yg={__name:"UDrawer",props:{as:{type:null,required:!1},title:{type:String,required:!1},description:{type:String,required:!1},inset:{type:Boolean,required:!1},content:{type:Object,required:!1},overlay:{type:Boolean,required:!1,default:!0},handle:{type:Boolean,required:!1,default:!0},portal:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},nested:{type:Boolean,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1},activeSnapPoint:{type:[Number,String,null],required:!1},closeThreshold:{type:Number,required:!1},shouldScaleBackground:{type:Boolean,required:!1},setBackgroundColorOnScale:{type:Boolean,required:!1},scrollLockTimeout:{type:Number,required:!1},fixed:{type:Boolean,required:!1},dismissible:{type:Boolean,required:!1,default:!0},modal:{type:Boolean,required:!1,default:!0},open:{type:Boolean,required:!1},defaultOpen:{type:Boolean,required:!1},direction:{type:String,required:!1,default:"bottom"},noBodyStyles:{type:Boolean,required:!1},handleOnly:{type:Boolean,required:!1},preventScrollRestoration:{type:Boolean,required:!1},snapPoints:{type:Array,required:!1}},emits:["close:prevent","drag","release","close","update:open","update:activeSnapPoint","animationEnd"],setup(i,{emit:e}){const t=i,r=e,n=Je(),s=Re("drawer",t),a=Me(),l=Pt(zt(s,"activeSnapPoint","closeThreshold","shouldScaleBackground","setBackgroundColorOnScale","scrollLockTimeout","fixed","dismissible","modal","open","defaultOpen","nested","direction","noBodyStyles","handleOnly","preventScrollRestoration","snapPoints"),r),u=hi(He(()=>s.portal)),d=He(()=>s.content),c=F(()=>s.dismissible?{pointerDownOutside:as}:["interactOutside","escapeKeyDown"].reduce((m,h)=>(m[h]=g=>{g.preventDefault(),r("close:prevent")},m),{})),p=F(()=>de({extend:de(Xg),...a.ui?.drawer||{}})({direction:s.direction,inset:s.inset,snapPoints:s.snapPoints&&s.snapPoints.length>0}));return(f,m)=>(y(),_(pi(o(s).nested?o($g):o(_u)),oe(le(o(l))),{default:w(()=>[n.default?(y(),_(o(Sa),{key:0,"as-child":"",class:I(o(s).class)},{default:w(()=>[M(f.$slots,"default")]),_:3},8,["class"])):R("",!0),E(o(Aa),oe(le(o(u))),{default:w(()=>[E(o(mi),null,{default:w(()=>[o(s).overlay?(y(),_(o(Lg),{key:0,"data-slot":"overlay",class:I(p.value.overlay({class:o(s).ui?.overlay}))},null,8,["class"])):R("",!0),E(o(Vg),L({"data-slot":"content",class:p.value.content({class:[!n.default&&o(s).class,o(s).ui?.content]})},d.value,Hi(c.value)),{default:w(()=>[o(s).handle?(y(),_(o(Kg),{key:0,"data-slot":"handle",class:I(p.value.handle({class:o(s).ui?.handle}))},null,8,["class"])):R("",!0),!o(s).title&&!n.title||!o(s).description&&!n.description||n.content?(y(),_(o($i),{key:1},{default:w(()=>[!o(s).title&&!n.title?(y(),_(o(Qt),{key:0})):n.content?(y(),_(o(Qt),{key:1},{default:w(()=>[M(f.$slots,"title",{},()=>[ue(ee(o(s).title),1)])]),_:3})):R("",!0),!o(s).description&&!n.description?(y(),_(o(Zt),{key:2})):n.content?(y(),_(o(Zt),{key:3},{default:w(()=>[M(f.$slots,"description",{},()=>[ue(ee(o(s).description),1)])]),_:3})):R("",!0)]),_:3})):R("",!0),M(f.$slots,"content",{},()=>[D("div",{"data-slot":"container",class:I(p.value.container({class:o(s).ui?.container}))},[n.header||o(s).title||n.title||o(s).description||n.description?(y(),V("div",{key:0,"data-slot":"header",class:I(p.value.header({class:o(s).ui?.header}))},[M(f.$slots,"header",{},()=>[o(s).title||n.title?(y(),_(o(Qt),{key:0,"data-slot":"title",class:I(p.value.title({class:o(s).ui?.title}))},{default:w(()=>[M(f.$slots,"title",{},()=>[ue(ee(o(s).title),1)])]),_:3},8,["class"])):R("",!0),o(s).description||n.description?(y(),_(o(Zt),{key:1,"data-slot":"description",class:I(p.value.description({class:o(s).ui?.description}))},{default:w(()=>[M(f.$slots,"description",{},()=>[ue(ee(o(s).description),1)])]),_:3},8,["class"])):R("",!0)])],2)):R("",!0),n.body?(y(),V("div",{key:1,"data-slot":"body",class:I(p.value.body({class:o(s).ui?.body}))},[M(f.$slots,"body")],2)):R("",!0),n.footer?(y(),V("div",{key:2,"data-slot":"footer",class:I(p.value.footer({class:o(s).ui?.footer}))},[M(f.$slots,"footer")],2)):R("",!0)],2)])]),_:3},16,["class"])]),_:3})]),_:3},16)]),_:3},16))}},Jg={slots:{root:"bg-default/75 backdrop-blur border-b border-default h-(--ui-header-height) sticky top-0 z-50",container:"flex items-center justify-between gap-3 h-full",left:"lg:flex-1 flex items-center gap-1.5",center:"hidden lg:flex",right:"flex items-center justify-end lg:flex-1 gap-1.5",title:"shrink-0 font-bold text-xl text-highlighted flex items-end gap-1.5",toggle:"lg:hidden",content:"lg:hidden",overlay:"lg:hidden",header:"px-4 sm:px-6 h-(--ui-header-height) shrink-0 flex items-center justify-between gap-3",body:"p-4 sm:p-6 overflow-y-auto"},variants:{toggleSide:{left:{toggle:"-ms-1.5"},right:{toggle:"-me-1.5"}}}},Zg=Object.assign({inheritAttrs:!1},{__name:"UHeader",props:Pn({as:{type:null,required:!1,default:"header"},title:{type:String,required:!1,default:"Nuxt UI"},to:{type:String,required:!1,default:"/"},mode:{type:null,required:!1,default:"modal"},menu:{type:null,required:!1},toggle:{type:[Boolean,Object],required:!1,default:!0},toggleSide:{type:String,required:!1,default:"right"},autoClose:{type:Boolean,required:!1,default:!0},class:{type:null,required:!1},ui:{type:Object,required:!1}},{open:{type:Boolean,default:!1},openModifiers:{}}),emits:["update:open"],setup(i){const e=i,t=Je(),r=Re("header",e),n=ha(i,"open",{type:Boolean,default:!1}),s=kd(),{t:a}=zr(),l=Me(),[u,d]=ii(),[c,p]=ii(),[f,m]=ii(),h=F(()=>(t.title&&qd(t.title())||r.title||"Nuxt UI").trim());Ie(()=>s.fullPath,()=>{r.autoClose&&(n.value=!1)});const g=F(()=>de({extend:de(Jg),...l.ui?.header||{}})()),v=F(()=>({slideover:Cg,modal:Sg,drawer:Yg})[r.mode]),b=He(()=>Ht(r.menu,{},r.mode==="modal"?{fullscreen:!0,transition:!1}:{}));function C(){n.value=!n.value}return(x,A)=>(y(),V(ve,null,[E(o(f),null,{default:w(()=>[M(x.$slots,"toggle",{open:n.value,toggle:C,ui:g.value},()=>[o(r).toggle?(y(),_(ct,L({key:0,color:"neutral",variant:"ghost","aria-label":n.value?o(a)("header.close"):o(a)("header.open"),icon:n.value?o(l).ui.icons.close:o(l).ui.icons.menu},typeof o(r).toggle=="object"?o(r).toggle:{},{"data-slot":"toggle",class:g.value.toggle({class:o(r).ui?.toggle,toggleSide:o(r).toggleSide}),onClick:C}),null,16,["aria-label","icon","class"])):R("",!0)])]),_:3}),E(o(u),null,{default:w(()=>[D("div",{"data-slot":"left",class:I(g.value.left({class:o(r).ui?.left}))},[o(r).toggleSide==="left"?(y(),_(o(m),{key:0})):R("",!0),M(x.$slots,"left",{},()=>[E(xl,{to:o(r).to,"aria-label":h.value,"data-slot":"title",class:I(g.value.title({class:o(r).ui?.title}))},{default:w(()=>[M(x.$slots,"title",{},()=>[ue(ee(o(r).title),1)])]),_:3},8,["to","aria-label","class"])])],2)]),_:3}),E(o(c),null,{default:w(()=>[D("div",{"data-slot":"right",class:I(g.value.right({class:o(r).ui?.right}))},[M(x.$slots,"right"),o(r).toggleSide==="right"?(y(),_(o(m),{key:0})):R("",!0)],2)]),_:3}),E(o(se),L({as:o(r).as},x.$attrs,{"data-slot":"root",class:g.value.root({class:[o(r).ui?.root,o(r).class]})}),{default:w(()=>[M(x.$slots,"top"),E(wg,{"data-slot":"container",class:I(g.value.container({class:o(r).ui?.container}))},{default:w(()=>[E(o(d)),D("div",{"data-slot":"center",class:I(g.value.center({class:o(r).ui?.center}))},[M(x.$slots,"default")],2),E(o(p))]),_:3},8,["class"]),M(x.$slots,"bottom")]),_:3},16,["as","class"]),E(o(v),L({open:n.value,"onUpdate:open":A[0]||(A[0]=q=>n.value=q),title:o(a)("header.title"),description:o(a)("header.description")},b.value,{ui:{overlay:g.value.overlay({class:o(r).ui?.overlay}),content:g.value.content({class:o(r).ui?.content})}}),{content:w(q=>[M(x.$slots,"content",oe(le(q)),()=>[o(r).mode!=="drawer"?(y(),V("div",{key:0,"data-slot":"header",class:I(g.value.header({class:o(r).ui?.header}))},[E(o(d)),E(o(p))],2)):R("",!0),D("div",{"data-slot":"body",class:I(g.value.body({class:o(r).ui?.body}))},[M(x.$slots,"body")],2)])]),_:3},16,["open","title","description","ui"])],64))}}),Qg=Fd("/logo.svg"),ey={};function ty(i,e){const t=hg,r=ct,n=bg,s=Zg;return y(),_(s,null,{title:w(()=>[...e[0]||(e[0]=[D("div",{class:"flex items-center"},[D("img",{src:Qg,alt:"Tres.js",class:"h-3 mr-4"}),D("a",{class:"font-bold text-dark font-sans text-sm",href:"/",title:"Home"},[ue("Tres"),D("span",{class:"text-primary-400"},"DevTools")])],-1)])]),right:w(()=>[E(t),E(n,{text:"Open on GitHub",kbds:["meta","G"]},{default:w(()=>[E(r,{color:"neutral",variant:"ghost",size:"xs",to:"https://github.com/nuxt/ui",target:"_blank",icon:"i-simple-icons-github","aria-label":"GitHub"})]),_:1})]),_:1})}const ry=Object.assign(wl(ey,[["render",ty]]),{__name:"TheHeader"}),iy={slots:{base:"font-medium inline-flex items-center",label:"truncate",leadingIcon:"shrink-0",leadingAvatar:"shrink-0",leadingAvatarSize:"",trailingIcon:"shrink-0"},variants:{fieldGroup:{horizontal:"not-only:first:rounded-e-none not-only:last:rounded-s-none not-last:not-first:rounded-none focus-visible:z-[1]",vertical:"not-only:first:rounded-b-none not-only:last:rounded-t-none not-last:not-first:rounded-none focus-visible:z-[1]"},color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},variant:{solid:"",outline:"",soft:"",subtle:""},size:{xs:{base:"text-[8px]/3 px-1 py-0.5 gap-1 rounded-sm",leadingIcon:"size-3",leadingAvatarSize:"3xs",trailingIcon:"size-3"},sm:{base:"text-[10px]/3 px-1.5 py-1 gap-1 rounded-sm",leadingIcon:"size-3",leadingAvatarSize:"3xs",trailingIcon:"size-3"},md:{base:"text-xs px-2 py-1 gap-1 rounded-md",leadingIcon:"size-4",leadingAvatarSize:"3xs",trailingIcon:"size-4"},lg:{base:"text-sm px-2 py-1 gap-1.5 rounded-md",leadingIcon:"size-5",leadingAvatarSize:"2xs",trailingIcon:"size-5"},xl:{base:"text-base px-2.5 py-1 gap-1.5 rounded-md",leadingIcon:"size-6",leadingAvatarSize:"2xs",trailingIcon:"size-6"}},square:{true:""}},compoundVariants:[{color:"primary",variant:"solid",class:"bg-primary text-inverted"},{color:"secondary",variant:"solid",class:"bg-secondary text-inverted"},{color:"success",variant:"solid",class:"bg-success text-inverted"},{color:"info",variant:"solid",class:"bg-info text-inverted"},{color:"warning",variant:"solid",class:"bg-warning text-inverted"},{color:"error",variant:"solid",class:"bg-error text-inverted"},{color:"primary",variant:"outline",class:"text-primary ring ring-inset ring-primary/50"},{color:"secondary",variant:"outline",class:"text-secondary ring ring-inset ring-secondary/50"},{color:"success",variant:"outline",class:"text-success ring ring-inset ring-success/50"},{color:"info",variant:"outline",class:"text-info ring ring-inset ring-info/50"},{color:"warning",variant:"outline",class:"text-warning ring ring-inset ring-warning/50"},{color:"error",variant:"outline",class:"text-error ring ring-inset ring-error/50"},{color:"primary",variant:"soft",class:"bg-primary/10 text-primary"},{color:"secondary",variant:"soft",class:"bg-secondary/10 text-secondary"},{color:"success",variant:"soft",class:"bg-success/10 text-success"},{color:"info",variant:"soft",class:"bg-info/10 text-info"},{color:"warning",variant:"soft",class:"bg-warning/10 text-warning"},{color:"error",variant:"soft",class:"bg-error/10 text-error"},{color:"primary",variant:"subtle",class:"bg-primary/10 text-primary ring ring-inset ring-primary/25"},{color:"secondary",variant:"subtle",class:"bg-secondary/10 text-secondary ring ring-inset ring-secondary/25"},{color:"success",variant:"subtle",class:"bg-success/10 text-success ring ring-inset ring-success/25"},{color:"info",variant:"subtle",class:"bg-info/10 text-info ring ring-inset ring-info/25"},{color:"warning",variant:"subtle",class:"bg-warning/10 text-warning ring ring-inset ring-warning/25"},{color:"error",variant:"subtle",class:"bg-error/10 text-error ring ring-inset ring-error/25"},{color:"neutral",variant:"solid",class:"text-inverted bg-inverted"},{color:"neutral",variant:"outline",class:"ring ring-inset ring-accented text-default bg-default"},{color:"neutral",variant:"soft",class:"text-default bg-elevated"},{color:"neutral",variant:"subtle",class:"ring ring-inset ring-accented text-default bg-elevated"},{size:"xs",square:!0,class:"p-0.5"},{size:"sm",square:!0,class:"p-1"},{size:"md",square:!0,class:"p-1"},{size:"lg",square:!0,class:"p-1"},{size:"xl",square:!0,class:"p-1"}],defaultVariants:{color:"primary",variant:"solid",size:"md"}},yr={__name:"UBadge",props:{as:{type:null,required:!1,default:"span"},label:{type:[String,Number],required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},square:{type:Boolean,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1},icon:{type:null,required:!1},avatar:{type:Object,required:!1},leading:{type:Boolean,required:!1},leadingIcon:{type:null,required:!1},trailing:{type:Boolean,required:!1},trailingIcon:{type:null,required:!1}},setup(i){const e=i,t=Je(),r=Re("badge",e),n=Me(),{orientation:s,size:a}=ma(e),{isLeading:l,isTrailing:u,leadingIconName:d,trailingIconName:c}=_l(r),p=F(()=>de({extend:de(iy),...n.ui?.badge||{}})({color:r.color,variant:r.variant,size:a.value??r.size,square:r.square||!t.default&&!r.label,fieldGroup:s.value}));return(f,m)=>(y(),_(o(se),{as:o(r).as,"data-slot":"base",class:I(p.value.base({class:[o(r).ui?.base,o(r).class]}))},{default:w(()=>[M(f.$slots,"leading",{ui:p.value},()=>[o(l)&&o(d)?(y(),_(Ae,{key:0,name:o(d),"data-slot":"leadingIcon",class:I(p.value.leadingIcon({class:o(r).ui?.leadingIcon}))},null,8,["name","class"])):o(r).avatar?(y(),_(gi,L({key:1,size:o(r).ui?.leadingAvatarSize||p.value.leadingAvatarSize()},o(r).avatar,{"data-slot":"leadingAvatar",class:p.value.leadingAvatar({class:o(r).ui?.leadingAvatar})}),null,16,["size","class"])):R("",!0)]),M(f.$slots,"default",{ui:p.value},()=>[o(r).label!==void 0&&o(r).label!==null?(y(),V("span",{key:0,"data-slot":"label",class:I(p.value.label({class:o(r).ui?.label}))},ee(o(r).label),3)):R("",!0)]),M(f.$slots,"trailing",{ui:p.value},()=>[o(u)&&o(c)?(y(),_(Ae,{key:0,name:o(c),"data-slot":"trailingIcon",class:I(p.value.trailingIcon({class:o(r).ui?.trailingIcon}))},null,8,["name","class"])):R("",!0)])]),_:3},8,["as","class"]))}},ny={class:"font-mono text-xs"},sy={key:1,class:"mr-1 w-4 h-4"},ay={class:"flex items-center gap-2 flex-1 min-w-0"},oy={class:"text-neutral-700 dark:text-neutral-200 font-medium"},ly=P({__name:"TreeGraph",props:{item:{},level:{default:0}},emits:["select-object"],setup(i,{emit:e}){const t=i,r=e,n=T(t.item.defaultExpanded??!1),s=()=>{n.value=!n.value},a=()=>{r("select-object",t.item.value)},l=F(()=>t.item.children&&t.item.children.length>0),u=F(()=>({paddingLeft:`${t.level*16}px`}));return(d,c)=>{const p=Ae,f=yr,m=Cu;return y(),V("div",ny,[D("div",{style:Et(o(u)),class:"flex items-center py-1 hover:bg-neutral-50 dark:hover:bg-neutral-800 group cursor-pointer",onClick:a},[o(l)?(y(),V("div",{key:0,class:"mr-1 w-4 h-4 flex items-center justify-center",onClick:ye(s,["stop"])},[E(p,{name:o(n)?"i-tabler:caret-down-filled":"i-tabler:caret-right-filled",class:"w-3 h-3 text-neutral-400 dark:text-neutral-500"},null,8,["name"])])):(y(),V("div",sy)),D("div",ay,[E(p,{name:i.item.icon,class:"w-4 h-4 text-neutral-600 dark:text-neutral-400 flex-shrink-0"},null,8,["name"]),D("span",oy,ee(i.item.label),1),i.item.name?(y(),_(f,{key:0,color:"primary",size:"sm",variant:"soft"},{default:w(()=>[ue(ee(i.item.name),1)]),_:1})):R("",!0),i.item.memorySize>0?(y(),_(f,{key:1,color:"warning",size:"sm",variant:"soft"},{default:w(()=>[ue(ee(i.item.memorySize)+" KB ",1)]),_:1})):R("",!0)])],4),o(l)&&o(n)?(y(!0),V(ve,{key:0},Xe(i.item.children,h=>(y(),_(m,{key:h.key,item:h,level:i.level+1,onSelectObject:c[0]||(c[0]=g=>r("select-object",g))},null,8,["item","level"]))),128)):R("",!0)])}}}),Cu=Object.assign(ly,{__name:"TreeGraph"}),uy={slots:{root:"relative overflow-hidden w-full rounded-lg p-4 flex gap-2.5",wrapper:"min-w-0 flex-1 flex flex-col",title:"text-sm font-medium",description:"text-sm opacity-90",icon:"shrink-0 size-5",avatar:"shrink-0",avatarSize:"2xl",actions:"flex flex-wrap gap-1.5 shrink-0",close:"p-0"},variants:{color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},variant:{solid:"",outline:"",soft:"",subtle:""},orientation:{horizontal:{root:"items-center",actions:"items-center"},vertical:{root:"items-start",actions:"items-start mt-2.5"}},title:{true:{description:"mt-1"}}},compoundVariants:[{color:"primary",variant:"solid",class:{root:"bg-primary text-inverted"}},{color:"secondary",variant:"solid",class:{root:"bg-secondary text-inverted"}},{color:"success",variant:"solid",class:{root:"bg-success text-inverted"}},{color:"info",variant:"solid",class:{root:"bg-info text-inverted"}},{color:"warning",variant:"solid",class:{root:"bg-warning text-inverted"}},{color:"error",variant:"solid",class:{root:"bg-error text-inverted"}},{color:"primary",variant:"outline",class:{root:"text-primary ring ring-inset ring-primary/25"}},{color:"secondary",variant:"outline",class:{root:"text-secondary ring ring-inset ring-secondary/25"}},{color:"success",variant:"outline",class:{root:"text-success ring ring-inset ring-success/25"}},{color:"info",variant:"outline",class:{root:"text-info ring ring-inset ring-info/25"}},{color:"warning",variant:"outline",class:{root:"text-warning ring ring-inset ring-warning/25"}},{color:"error",variant:"outline",class:{root:"text-error ring ring-inset ring-error/25"}},{color:"primary",variant:"soft",class:{root:"bg-primary/10 text-primary"}},{color:"secondary",variant:"soft",class:{root:"bg-secondary/10 text-secondary"}},{color:"success",variant:"soft",class:{root:"bg-success/10 text-success"}},{color:"info",variant:"soft",class:{root:"bg-info/10 text-info"}},{color:"warning",variant:"soft",class:{root:"bg-warning/10 text-warning"}},{color:"error",variant:"soft",class:{root:"bg-error/10 text-error"}},{color:"primary",variant:"subtle",class:{root:"bg-primary/10 text-primary ring ring-inset ring-primary/25"}},{color:"secondary",variant:"subtle",class:{root:"bg-secondary/10 text-secondary ring ring-inset ring-secondary/25"}},{color:"success",variant:"subtle",class:{root:"bg-success/10 text-success ring ring-inset ring-success/25"}},{color:"info",variant:"subtle",class:{root:"bg-info/10 text-info ring ring-inset ring-info/25"}},{color:"warning",variant:"subtle",class:{root:"bg-warning/10 text-warning ring ring-inset ring-warning/25"}},{color:"error",variant:"subtle",class:{root:"bg-error/10 text-error ring ring-inset ring-error/25"}},{color:"neutral",variant:"solid",class:{root:"text-inverted bg-inverted"}},{color:"neutral",variant:"outline",class:{root:"text-highlighted bg-default ring ring-inset ring-default"}},{color:"neutral",variant:"soft",class:{root:"text-highlighted bg-elevated/50"}},{color:"neutral",variant:"subtle",class:{root:"text-highlighted bg-elevated/50 ring ring-inset ring-accented"}}],defaultVariants:{color:"primary",variant:"solid"}},Au={__name:"UAlert",props:{as:{type:null,required:!1},title:{type:String,required:!1},description:{type:String,required:!1},icon:{type:null,required:!1},avatar:{type:Object,required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},orientation:{type:null,required:!1,default:"vertical"},actions:{type:Array,required:!1},close:{type:[Boolean,Object],required:!1},closeIcon:{type:null,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1}},emits:["update:open"],setup(i,{emit:e}){const t=i,r=e,n=Je(),s=Re("alert",t),{t:a}=zr(),l=Me(),u=F(()=>de({extend:de(uy),...l.ui?.alert||{}})({color:s.color,variant:s.variant,orientation:s.orientation,title:!!s.title||!!n.title}));return(d,c)=>(y(),_(o(se),{as:o(s).as,"data-orientation":o(s).orientation,"data-slot":"root",class:I(u.value.root({class:[o(s).ui?.root,o(s).class]}))},{default:w(()=>[M(d.$slots,"leading",{ui:u.value},()=>[o(s).avatar?(y(),_(gi,L({key:0,size:o(s).ui?.avatarSize||u.value.avatarSize()},o(s).avatar,{"data-slot":"avatar",class:u.value.avatar({class:o(s).ui?.avatar})}),null,16,["size","class"])):o(s).icon?(y(),_(Ae,{key:1,name:o(s).icon,"data-slot":"icon",class:I(u.value.icon({class:o(s).ui?.icon}))},null,8,["name","class"])):R("",!0)]),D("div",{"data-slot":"wrapper",class:I(u.value.wrapper({class:o(s).ui?.wrapper}))},[o(s).title||n.title?(y(),V("div",{key:0,"data-slot":"title",class:I(u.value.title({class:o(s).ui?.title}))},[M(d.$slots,"title",{},()=>[ue(ee(o(s).title),1)])],2)):R("",!0),o(s).description||n.description?(y(),V("div",{key:1,"data-slot":"description",class:I(u.value.description({class:o(s).ui?.description}))},[M(d.$slots,"description",{},()=>[ue(ee(o(s).description),1)])],2)):R("",!0),o(s).orientation==="vertical"&&(o(s).actions?.length||n.actions)?(y(),V("div",{key:2,"data-slot":"actions",class:I(u.value.actions({class:o(s).ui?.actions}))},[M(d.$slots,"actions",{},()=>[(y(!0),V(ve,null,Xe(o(s).actions,(p,f)=>(y(),_(ct,L({key:f,size:"xs"},{ref_for:!0},p),null,16))),128))])],2)):R("",!0)],2),o(s).orientation==="horizontal"&&(o(s).actions?.length||n.actions)||o(s).close?(y(),V("div",{key:0,"data-slot":"actions",class:I(u.value.actions({class:o(s).ui?.actions,orientation:"horizontal"}))},[o(s).orientation==="horizontal"&&(o(s).actions?.length||n.actions)?M(d.$slots,"actions",{key:0},()=>[(y(!0),V(ve,null,Xe(o(s).actions,(p,f)=>(y(),_(ct,L({key:f,size:"xs"},{ref_for:!0},p),null,16))),128))]):R("",!0),M(d.$slots,"close",{ui:u.value},()=>[o(s).close?(y(),_(ct,L({key:0,icon:o(s).closeIcon||o(l).ui.icons.close,color:"neutral",variant:"link","aria-label":o(a)("alert.close")},typeof o(s).close=="object"?o(s).close:{},{"data-slot":"close",class:u.value.close({class:o(s).ui?.close}),onClick:c[0]||(c[0]=p=>r("update:open",!1))}),null,16,["icon","aria-label","class"])):R("",!0)])],2)):R("",!0)]),_:3},8,["as","data-orientation","class"]))}},dy={slots:{root:"relative inline-flex items-center",base:["w-full rounded-md border-0 placeholder:text-dimmed focus:outline-none disabled:cursor-not-allowed disabled:opacity-75","transition-colors"],increment:"absolute flex items-center",decrement:"absolute flex items-center"},variants:{fieldGroup:{horizontal:{root:"group has-focus-visible:z-[1]",base:"group-not-only:group-first:rounded-e-none group-not-only:group-last:rounded-s-none group-not-last:group-not-first:rounded-none"},vertical:{root:"group has-focus-visible:z-[1]",base:"group-not-only:group-first:rounded-b-none group-not-only:group-last:rounded-t-none group-not-last:group-not-first:rounded-none"}},color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},size:{xs:"px-2 py-1 text-sm/4 gap-1",sm:"px-2.5 py-1.5 text-sm/4 gap-1.5",md:"px-2.5 py-1.5 text-base/5 gap-1.5",lg:"px-3 py-2 text-base/5 gap-2",xl:"px-3 py-2 text-base gap-2"},variant:{outline:"text-highlighted bg-default ring ring-inset ring-accented",soft:"text-highlighted bg-elevated/50 hover:bg-elevated focus:bg-elevated disabled:bg-elevated/50",subtle:"text-highlighted bg-elevated ring ring-inset ring-accented",ghost:"text-highlighted bg-transparent hover:bg-elevated focus:bg-elevated disabled:bg-transparent dark:disabled:bg-transparent",none:"text-highlighted bg-transparent"},disabled:{true:{increment:"opacity-75 cursor-not-allowed",decrement:"opacity-75 cursor-not-allowed"}},orientation:{horizontal:{base:"text-center",increment:"inset-y-0 end-0 pe-1",decrement:"inset-y-0 start-0 ps-1"},vertical:{increment:"top-0 end-0 pe-1 [&>button]:py-0 scale-80",decrement:"bottom-0 end-0 pe-1 [&>button]:py-0 scale-80"}},highlight:{true:""},fixed:{false:""},increment:{false:""},decrement:{false:""}},compoundVariants:[{color:"primary",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary"},{color:"secondary",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-secondary"},{color:"success",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-success"},{color:"info",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-info"},{color:"warning",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-warning"},{color:"error",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-error"},{color:"primary",highlight:!0,class:"ring ring-inset ring-primary"},{color:"secondary",highlight:!0,class:"ring ring-inset ring-secondary"},{color:"success",highlight:!0,class:"ring ring-inset ring-success"},{color:"info",highlight:!0,class:"ring ring-inset ring-info"},{color:"warning",highlight:!0,class:"ring ring-inset ring-warning"},{color:"error",highlight:!0,class:"ring ring-inset ring-error"},{color:"neutral",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-inverted"},{color:"neutral",highlight:!0,class:"ring ring-inset ring-inverted"},{orientation:"horizontal",decrement:!1,class:"text-start"},{decrement:!0,size:"xs",class:"ps-7"},{decrement:!0,size:"sm",class:"ps-8"},{decrement:!0,size:"md",class:"ps-9"},{decrement:!0,size:"lg",class:"ps-10"},{decrement:!0,size:"xl",class:"ps-11"},{increment:!0,size:"xs",class:"pe-7"},{increment:!0,size:"sm",class:"pe-8"},{increment:!0,size:"md",class:"pe-9"},{increment:!0,size:"lg",class:"pe-10"},{increment:!0,size:"xl",class:"pe-11"},{fixed:!1,size:"xs",class:"md:text-xs"},{fixed:!1,size:"sm",class:"md:text-xs"},{fixed:!1,size:"md",class:"md:text-sm"},{fixed:!1,size:"lg",class:"md:text-sm"}],defaultVariants:{size:"md",color:"primary",variant:"outline"}},Su=Object.assign({inheritAttrs:!1},{__name:"UInputNumber",props:{as:{type:null,required:!1},placeholder:{type:String,required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},highlight:{type:Boolean,required:!1},fixed:{type:Boolean,required:!1},orientation:{type:null,required:!1,default:"horizontal"},increment:{type:[Boolean,Object],required:!1,default:!0},incrementIcon:{type:null,required:!1},incrementDisabled:{type:Boolean,required:!1},decrement:{type:[Boolean,Object],required:!1,default:!0},decrementIcon:{type:null,required:!1},decrementDisabled:{type:Boolean,required:!1},autofocus:{type:Boolean,required:!1},autofocusDelay:{type:Number,required:!1},defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1},modelModifiers:{type:null,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1},min:{type:Number,required:!1},max:{type:Number,required:!1},step:{type:Number,required:!1},stepSnapping:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},required:{type:Boolean,required:!1},id:{type:String,required:!1},name:{type:String,required:!1},formatOptions:{type:null,required:!1},disableWheelChange:{type:Boolean,required:!1},invertWheelChange:{type:Boolean,required:!1},readonly:{type:Boolean,required:!1},focusOnChange:{type:Boolean,required:!1},locale:{type:String,required:!1}},emits:["update:modelValue","blur","change"],setup(i,{expose:e,emit:t}){const r=i,n=t,s=Re("inputNumber",r),a=We(s,"modelValue",n,{defaultValue:s.defaultValue}),{t:l}=zr(),u=Me(),d=Pt(zt(s,"as","stepSnapping","formatOptions","disableWheelChange","invertWheelChange","required","readonly","focusOnChange","locale"),n),{emitFormBlur:c,emitFormFocus:p,emitFormChange:f,emitFormInput:m,id:h,color:g,size:v,name:b,highlight:C,disabled:x,ariaAttrs:A}=ga(r),{orientation:q,size:S}=ma(r),B=F(()=>S.value||v.value),k=F(()=>de({extend:de(dy),...u.ui?.inputNumber||{}})({color:g.value??s.color,variant:s.variant,size:B.value??s.size,highlight:C.value??s.highlight,fixed:s.fixed,orientation:s.orientation,fieldGroup:q.value,increment:s.orientation==="vertical"?!!s.increment||!!s.decrement:!!s.increment,decrement:s.orientation==="vertical"?!1:!!s.decrement})),N=F(()=>s.incrementIcon||(s.orientation==="horizontal"?u.ui.icons.plus:u.ui.icons.chevronUp)),z=F(()=>s.decrementIcon||(s.orientation==="horizontal"?u.ui.icons.minus:u.ui.icons.chevronDown)),j=Cl("inputRef");function W(O){s.modelModifiers?.optional&&(a.value=O=O??void 0);const U=new Event("change",{target:{value:O}});n("change",U),f(),m()}function J(O){c(),n("blur",O)}function ie(){s.autofocus&&j.value?.$el?.focus()}return Ne(()=>{setTimeout(()=>{ie()},s.autofocusDelay)}),e({inputRef:He(()=>j.value?.$el)}),(O,U)=>(y(),_(o(Fm),L(o(d),{id:o(h),"default-value":o(s).defaultValue,"model-value":o(a),min:o(s).min,max:o(s).max,step:o(s).step,"data-slot":"root",class:k.value.root({class:[o(s).ui?.root,o(s).class]}),name:o(b),disabled:o(x),"onUpdate:modelValue":U[0]||(U[0]=re=>W(re))}),{default:w(()=>[E(o(Pm),L({...O.$attrs,...o(A)},{ref_key:"inputRef",ref:j,placeholder:o(s).placeholder,required:o(s).required,"data-slot":"base",class:k.value.base({class:o(s).ui?.base}),onBlur:J,onFocus:o(p)}),null,16,["placeholder","required","class","onFocus"]),o(s).increment?(y(),V("div",{key:0,"data-slot":"increment",class:I(k.value.increment({class:o(s).ui?.increment}))},[E(o(Im),{"as-child":"",disabled:o(x)||o(s).incrementDisabled},{default:w(()=>[M(O.$slots,"increment",{},()=>[E(ct,L({icon:N.value,color:o(g),size:B.value,variant:"link","aria-label":o(l)("inputNumber.increment")},typeof o(s).increment=="object"?o(s).increment:void 0),null,16,["icon","color","size","aria-label"])])]),_:3},8,["disabled"])],2)):R("",!0),o(s).decrement?(y(),V("div",{key:1,"data-slot":"decrement",class:I(k.value.decrement({class:o(s).ui?.decrement}))},[E(o(Om),{"as-child":"",disabled:o(x)||o(s).decrementDisabled},{default:w(()=>[M(O.$slots,"decrement",{},()=>[E(ct,L({icon:z.value,color:o(g),size:B.value,variant:"link","aria-label":o(l)("inputNumber.decrement")},typeof o(s).decrement=="object"?o(s).decrement:void 0),null,16,["icon","color","size","aria-label"])])]),_:3},8,["disabled"])],2)):R("",!0)]),_:3},16,["id","default-value","model-value","min","max","step","class","name","disabled"]))}}),cy=P({__name:"EditableNumber",props:{modelValue:{}},emits:["update:modelValue"],setup(i,{emit:e}){const t=i,r=e,n=T(!1),s=T(0),a=T(),l=F(()=>Number(t.modelValue).toFixed(2)),u=()=>{n.value=!0,s.value=t.modelValue},d=()=>{r("update:modelValue",s.value),n.value=!1},c=()=>{s.value=t.modelValue,n.value=!1};return(p,f)=>{const m=yr,h=Su;return n.value?(y(),_(h,{key:1,ref_key:"inputRef",ref:a,modelValue:s.value,"onUpdate:modelValue":f[0]||(f[0]=g=>s.value=g),step:.01,variant:"soft",size:"xs",orientation:"vertical","format-options":{minimumFractionDigits:0,maximumFractionDigits:2},class:"w-20 font-mono",onBlur:d,onKeyup:[Ei(d,["enter"]),Ei(c,["escape"])]},null,8,["modelValue"])):(y(),_(m,{key:0,variant:"soft",color:"neutral",size:"sm",class:"font-mono cursor-pointer hover:bg-neutral-200 dark:hover:bg-neutral-700",onClick:u},{default:w(()=>[ue(ee(l.value),1)]),_:1}))}}}),py=Object.assign(cy,{__name:"EditableNumber"}),Z=255,yt=100,dr=125,si=150;var K,qt,et,Vn;(function(i){i.HEX="HEX",i.RGB="RGB",i.HWB="HWB",i.HSL="HSL",i.CIELab="CIELab",i.LCH="LCH",i.CMYK="CMYK"})(K||(K={})),(function(i){i.ANALOGOUS="ANALOGOUS",i.COMPLEMENTARY="COMPLEMENTARY",i.SPLIT_COMPLEMENTARY="SPLIT_COMPLEMENTARY",i.TRIADIC="TRIADIC",i.TETRADIC="TETRADIC",i.SQUARE="SQUARE"})(qt||(qt={})),(function(i){i.ADDITIVE="ADDITIVE",i.SUBTRACTIVE="SUBTRACTIVE"})(et||(et={})),(function(i){i.black="#000000",i.silver="#C0C0C0",i.gray="#808080",i.white="#FFFFFF",i.maroon="#800000",i.red="#FF0000",i.purple="#800080",i.fuchsia="#FF00FF",i.green="#008000",i.lime="#00FF00",i.olive="#808000",i.yellow="#FFFF00",i.navy="#000080",i.blue="#0000FF",i.teal="#008080",i.aqua="#00FFFF",i.orange="#FFA500",i.aliceblue="#F0F8FF",i.antiquewhite="#FAEBD7",i.aquamarine="#7FFFD4",i.azure="#F0FFFF",i.beige="#F5F5DC",i.bisque="#FFE4C4",i.blanchedalmond="#FFEBCD",i.blueviolet="#8A2BE2",i.brown="#A52A2A",i.burlywood="#DEB887",i.cadetblue="#5F9EA0",i.chartreuse="#7FFF00",i.chocolate="#D2691E",i.coral="#FF7F50",i.cornflowerblue="#6495ED",i.cornsilk="#FFF8DC",i.crimson="#DC143C",i.cyan="#00FFFF",i.darkblue="#00008B",i.darkcyan="#008B8B",i.darkgoldenrod="#B8860B",i.darkgray="#A9A9A9",i.darkgreen="#006400",i.darkgrey="#A9A9A9",i.darkkhaki="#BDB76B",i.darkmagenta="#8B008B",i.darkolivegreen="#556B2F",i.darkorange="#FF8C00",i.darkorchid="#9932CC",i.darkred="#8B0000",i.darksalmon="#E9967A",i.darkseagreen="#8FBC8F",i.darkslateblue="#483D8B",i.darkslategray="#2F4F4F",i.darkslategrey="#2F4F4F",i.darkturquoise="#00CED1",i.darkviolet="#9400D3",i.deeppink="#FF1493",i.deepskyblue="#00BFFF",i.dimgray="#696969",i.dimgrey="#696969",i.dodgerblue="#1E90FF",i.firebrick="#B22222",i.floralwhite="#FFFAF0",i.forestgreen="#228B22",i.gainsboro="#DCDCDC",i.ghostwhite="#F8F8FF",i.gold="#FFD700",i.goldenrod="#DAA520",i.greenyellow="#ADFF2F",i.grey="#808080",i.honeydew="#F0FFF0",i.hotpink="#FF69B4",i.indianred="#CD5C5C",i.indigo="#4B0082",i.ivory="#FFFFF0",i.khaki="#F0E68C",i.lavender="#E6E6FA",i.lavenderblush="#FFF0F5",i.lawngreen="#7CFC00",i.lemonchiffon="#FFFACD",i.lightblue="#ADD8E6",i.lightcoral="#F08080",i.lightcyan="#E0FFFF",i.lightgoldenrodyellow="#FAFAD2",i.lightgray="#D3D3D3",i.lightgreen="#90EE90",i.lightgrey="#D3D3D3",i.lightpink="#FFB6C1",i.lightsalmon="#FFA07A",i.lightseagreen="#20B2AA",i.lightskyblue="#87CEFA",i.lightslategray="#778899",i.lightslategrey="#778899",i.lightsteelblue="#B0C4DE",i.lightyellow="#FFFFE0",i.limegreen="#32CD32",i.linen="#FAF0E6",i.magenta="#FF00FF",i.mediumaquamarine="#66CDAA",i.mediumblue="#0000CD",i.mediumorchid="#BA55D3",i.mediumpurple="#9370DB",i.mediumseagreen="#3CB371",i.mediumslateblue="#7B68EE",i.mediumspringgreen="#00FA9A",i.mediumturquoise="#48D1CC",i.mediumvioletred="#C71585",i.midnightblue="#191970",i.mintcream="#F5FFFA",i.mistyrose="#FFE4E1",i.moccasin="#FFE4B5",i.navajowhite="#FFDEAD",i.oldlace="#FDF5E6",i.olivedrab="#6B8E23",i.orangered="#FF4500",i.orchid="#DA70D6",i.palegoldenrod="#EEE8AA",i.palegreen="#98FB98",i.paleturquoise="#AFEEEE",i.palevioletred="#DB7093",i.papayawhip="#FFEFD5",i.peachpuff="#FFDAB9",i.peru="#CD853F",i.pink="#FFC0CB",i.plum="#DDA0DD",i.powderblue="#B0E0E6",i.rosybrown="#BC8F8F",i.royalblue="#4169E1",i.saddlebrown="#8B4513",i.salmon="#FA8072",i.sandybrown="#F4A460",i.seagreen="#2E8B57",i.seashell="#FFF5EE",i.sienna="#A0522D",i.skyblue="#87CEEB",i.slateblue="#6A5ACD",i.slategray="#708090",i.slategrey="#708090",i.snow="#FFFAFA",i.springgreen="#00FF7F",i.steelblue="#4682B4",i.tan="#D2B48C",i.thistle="#D8BFD8",i.tomato="#FF6347",i.turquoise="#40E0D0",i.violet="#EE82EE",i.wheat="#F5DEB3",i.whitesmoke="#F5F5F5",i.yellowgreen="#9ACD32",i.rebeccapurple="#663399"})(Vn||(Vn={}));const Mu=Object.keys(Vn),fy={HEX:["R","G","B","A"],RGB:["R","G","B","A"],HSL:["H","S","L","A"],HWB:["H","W","B","A"],CIELab:["L","a","b","A"],LCH:["L","C","H","A"],CMYK:["C","M","Y","K","A"]},ea={ABGR:K.RGB,ABHW:K.HWB,ACHL:K.LCH,ACKMY:K.CMYK,AHLS:K.HSL,ALAB:K.CIELab,BGR:K.RGB,BHW:K.HWB,CHL:K.LCH,CKMY:K.CMYK,HLS:K.HSL,LAB:K.CIELab};var Fi;(function(i){i.NUMBER="number",i.BOOLEAN="boolean"})(Fi||(Fi={}));const at={[K.HEX]:/^#(?:(?<r>[a-f\d])(?<g>[a-f\d])(?<b>[a-f\d])(?<a>[a-f\d])?|(?<rr>[a-f\d]{2})(?<gg>[a-f\d]{2})(?<bb>[a-f\d]{2})(?<aa>[a-f\d]{2})?)$/i,[K.RGB]:/^rgba?\s*\(\s*(?:(?<r_legacy>(?:\d*\.)?\d+%?)\s*,\s*(?<g_legacy>(?:\d*\.)?\d+%?)\s*,\s*(?<b_legacy>(?:\d*\.)?\d+%?)(?:\s*,\s*(?<a_legacy>(?:\d*\.)?\d+))?|(?<r>(?:\d*\.)?\d+%?)\s+(?<g>(?:\d*\.)?\d+%?)\s+(?<b>(?:\d*\.)?\d+%?)(?:\s*\/\s*(?<a>(?:\d*\.)?\d+%?))?|from\s+(?<from>(?:\w+|\w+\(\s*[^())]+\s*\)|\w+\(from\s+\w+\(.*\)\s*\)|#[a-fA-F\d]+))\s+(?<relative_r>(?:[rgb]|(?:\d*\.)?\d+|calc\([rgb()/*\-+\d.\s]+\)))\s+(?<relative_g>(?:[rgb]|(?:\d*\.)?\d+|calc\([rgb()/*\-+\d.\s]+\)))\s+(?<relative_b>(?:[rgb]|(?:\d*\.)?\d+|calc\([rgb()/*\-+\d.\s]+\)))(?:\s*\/\s*(?<relative_a>(?:(?:\d*\.)?\d+%?|calc\([()/*\-+\d.\s\w]*(?:alpha)?[()/*\-+\d.\s\w]*\)|alpha)))?)\s*\)$/,[K.HWB]:/^hwb\s*\(\s*(?:(?<h>(?:\d*\.)?\d+(?:deg|grad|rad|turn)?)\s+(?<w>(?:\d*\.)?\d+)%\s+(?<b>(?:\d*\.)?\d+)%(?:\s*\/\s*(?<a>(?:\d*\.)?\d+%?))?|from\s+(?<from>(?:\w+|\w+\(\s*[^())]+\s*\)|\w+\(from\s+\w+\(.*\)\s*\)|#[a-fA-F\d]+))\s+(?<relative_h>(?:[hwb]|(?:\d*\.)?\d+|calc\([hwb()/*\-+\d.\s]+\)))\s+(?<relative_w>(?:[hwb]|(?:\d*\.)?\d+|calc\([hwb()/*\-+\d.\s]+\)))%?\s+(?<relative_b>(?:[hwb]|(?:\d*\.)?\d+|calc\([hwb()/*\-+\d.\s]+\)))%?(?:\s*\/\s*(?<relative_a>(?:(?:\d*\.)?\d+%?|calc\([()/*\-+\d.\s\w]*(?:alpha)?[()/*\-+\d.\s\w]*\)|alpha)))?)\s*\)$/,[K.HSL]:/^hsla?\s*\(\s*(?:(?<h_legacy>-?(?:\d*\.)?\d+(?:deg|grad|rad|turn)?)\s*,\s*(?<s_legacy>(?:\d*\.)?\d+)%\s*,\s*(?<l_legacy>(?:\d*\.)?\d+)%(?:\s*,\s*(?<a_legacy>(?:\d*\.)?\d+))?|(?<h>-?(?:\d*\.)?\d+(?:deg|grad|rad|turn)?)\s+(?<s>(?:\d*\.)?\d+)%?\s+(?<l>(?:\d*\.)?\d+)%?(?:\s*\/\s*(?<a>(?:\d*\.)?\d+%?))?|from\s+(?<from>(?:\w+|\w+\(\s*[^())]+\s*\)|\w+\(from\s+\w+\(.*\)\s*\)|#[a-fA-F\d]+))\s+(?<relative_h>(?:[hsl]|(?:\d*\.)?\d+|calc\([hsl()/*\-+\d.\s]+\)))\s+(?<relative_s>(?:[hsl]|(?:\d*\.)?\d+|calc\([hsl()/*\-+\d.\s]+\)))%?\s+(?<relative_l>(?:[hsl]|(?:\d*\.)?\d+|calc\([hsl()/*\-+\d.\s]+\)))%?(?:\s*\/\s*(?<relative_a>(?:(?:\d*\.)?\d+%?|calc\([()/*\-+\d.\s\w]*(?:alpha)?[()/*\-+\d.\s\w]*\)|alpha)))?)\s*\)$/,[K.CIELab]:/^lab\s*\(\s*(?:(?<L>(?:\d*\.)?\d+%?)\s+(?<a>-?(?:\d*\.)?\d+%?)\s+(?<b>-?(?:\d*\.)?\d+%?)(?:\s*\/\s*(?<A>(?:\d*\.)?\d+%?))?|from\s+(?<from>(?:\w+|\w+\(\s*[^())]+\s*\)|\w+\(from\s+\w+\(.*\)\s*\)|#[a-fA-F\d]+))\s+(?<relative_L>(?:[lab]|(?:\d*\.)?\d+|calc\([lab()/*\-+\d.\s]+\)))\s+(?<relative_a>(?:[lab]|(?:\d*\.)?\d+|calc\([lab()/*\-+\d.\s]+\)))\s+(?<relative_b>(?:[lab]|(?:\d*\.)?\d+|calc\([lab()/*\-+\d.\s]+\)))(?:\s*\/\s*(?<relative_A>(?:(?:\d*\.)?\d+%?|calc\([()/*\-+\d.\s\w]*(?:alpha)?[()/*\-+\d.\s\w]*\)|alpha)))?)\s*\)$/,[K.LCH]:/^lch\s*\(\s*(?:(?<l>(?:\d*\.)?\d+%?)\s+(?<c>-?(?:\d*\.)?\d+%?)\s+(?<h>-?(?:\d*\.)?\d+(?:deg|grad|rad|turn)?)(?:\s*\/\s*(?<a>(?:\d*\.)?\d+%?))?|from\s+(?<from>(?:\w+|\w+\(\s*[^())]+\s*\)|\w+\(from\s+\w+\(.*\)\s*\)|#[a-fA-F\d]+))\s+(?<relative_l>(?:[lch]|(?:\d*\.)?\d+|calc\([lch()/*\-+\d.\s]+\)))\s+(?<relative_c>(?:[lch]|(?:\d*\.)?\d+|calc\([lch()/*\-+\d.\s]+\)))\s+(?<relative_h>(?:[lch]|(?:\d*\.)?\d+|calc\([lch()/*\-+\d.\s]+\)))(?:\s*\/\s*(?<relative_a>(?:(?:\d*\.)?\d+%?|calc\([()/*\-+\d.\s\w]*(?:alpha)?[()/*\-+\d.\s\w]*\)|alpha)))?)\s*\)$/,[K.CMYK]:/^(?:device-cmyk|cmyk)\s*\(\s*(?:(?<c_legacy>(?:\d*\.)?\d+%?)\s*,\s*(?<m_legacy>(?:\d*\.)?\d+%?)\s*,\s*(?<y_legacy>(?:\d*\.)?\d+%?)\s*,\s*(?<k_legacy>(?:\d*\.)?\d+%?)(?:\s*,\s*(?<a_legacy>(?:\d*\.)?\d+))?|(?<c>(?:\d*\.)?\d+%?)\s+(?<m>(?:\d*\.)?\d+%?)\s+(?<y>(?:\d*\.)?\d+%?)\s+(?<k>(?:\d*\.)?\d+%?)(?:\s*\/\s*(?<a>(?:\d*\.)?\d+%?))?)\s*\)$/},ht={REGEXP:/^calc\(\s*(?<operation>[\d./*+-\w\s]+)\s*\)$/,SCOPED:/\(\s*([^()]+)\s*\)/g,DIVISION:/\s*(?<left>(?:(?:\d*\.)?\d+|\w+))\s*\/\s*(?<right>(?:(?:\d*\.)?\d+|\w+))\s*/,MULTIPLICATION:/\s*(?<left>(?:(?:\d*\.)?\d+|\w+))\s*\*\s*(?<right>(?:(?:\d*\.)?\d+|\w+))\s*/,SUM:/\s*(?<left>(?:(?:\d*\.)?\d+|\w+))\s*\+\s*(?<right>(?:(?:\d*\.)?\d+|\w+))\s*/,REST:/\s*(?<left>(?:(?:\d*\.)?\d+|\w+))\s*-\s*(?<right>(?:(?:\d*\.)?\d+|\w+))\s*/},Bu=/^(?<number>-?(?:\d*\.)?\d+)(?<units>(?:deg|grad|rad|turn)?)$/,Se=/^(-?\d+(?:\.\d+)?|-?\.\d+)%$/,ta=/^0x([a-f\d]{1,2})$/i,hy=/\{(\d+)\}/g,my=/,( +|\d+)/g,gy=/ +/,yy="The provided string color doesn't have a correct format",vy="The provided color object doesn't have the proper keys or format",by="is not a valid operation for a relative color";var Ue,Oe,zi;(function(i){i.NONE="none",i.DEGREES="deg",i.GRADIANS="grad",i.RADIANS="rad",i.TURNS="turn"})(Ue||(Ue={})),(function(i){i.NONE="none",i.PERCENT="percent"})(Oe||(Oe={})),(function(i){i.DEVICE_CMYK="device-cmyk",i.CMYK="cmyk"})(zi||(zi={}));const Rt={decimals:6,legacyCSS:!1,spacesAfterCommas:!1,anglesUnit:Ue.NONE,rgbUnit:Oe.NONE,labUnit:Oe.NONE,lchUnit:Oe.NONE,cmykUnit:Oe.PERCENT,alphaUnit:Oe.NONE,cmykFunction:zi.DEVICE_CMYK},xe=(i,e)=>Object.prototype.hasOwnProperty.call(i,e),bi=i=>+`${i}`.replace(Se,"$1"),st=i=>Se.test(`${i}`)?bi(i):Math.min(+i,100),pn=i=>(i.length===1&&(i+=i),parseInt(i,16)),fn=i=>{const e=H(i,0).toString(16).toUpperCase();return e.length===1?`0x0${e}`:`0x${e}`},Br=(i,e=!1)=>!e&&Se.test(i)?Math.min(Z*bi(i)/100,Z):ta.test(i)?(i.length===3&&(i+=i.slice(-1)),e?H(i)/Z:H(i)):Math.min(+i,e?1:Z),Un=i=>Se.test(i)?ae(dr*bi(i)/100,-125,dr):ae(+i,-125,dr),ku=i=>Se.test(i)?ae(si*bi(i)/100,-150,si):ae(+i,-150,si),ur=i=>Math.min(Se.test(i)?bi(i)/100:+i,1),qu=i=>[...i].sort().join("").toUpperCase(),H=(i,e=6)=>{const t=Math.pow(10,e);return Math.round(+i*t)/t},ae=(i,e,t)=>Math.max(e,Math.min(i,t)),Fu=i=>180*i/Math.PI,Eu=i=>i*Math.PI/180,zn=360,bt=i=>{if(typeof i=="string"){const e=i.match(Bu).groups,t=+e.number;switch(e.units){case Ue.RADIANS:i=H(Fu(t));break;case Ue.TURNS:i=H(t*zn);break;case Ue.GRADIANS:i=H(.9*t);break;case Ue.DEGREES:default:i=t}}return(i>360||i<0)&&(i-=Math.floor(i/zn)*zn),i},me=i=>(typeof i=="string"&&(i=Se.test(i)?bi(i)/100:+i),isNaN(+i)||i>1?1:H(i)),Ou=(i,e)=>{let t;switch(e){case Ue.RADIANS:t=H(Eu(i));break;case Ue.TURNS:t=H(i/zn);break;case Ue.GRADIANS:t=H(10/9*i);break;case Ue.DEGREES:case Ue.NONE:default:t=i}return t},bs=i=>`${i}`in et,zu=[[.4360747,.3850649,.1430804],[.2225045,.7168786,.0606169],[.0139322,.0971045,.7141733]],xy=[[3.1338561,-1.6168667,-.4906146],[-.9787684,1.9161415,.033454],[.0719453,-.2289914,1.4052427]],ai=zu.map((i=>i.reduce(((e,t)=>e+t),0))),xs=(i,e,t)=>(t<0&&(t+=6),t>=6&&(t-=6),H(t<1?((e-i)*t+i)*Z:t<3?e*Z:t<4?((e-i)*(4-t)+i)*Z:i*Z)),wy=i=>i<=.04045?i/12.92:((i+.055)/1.055)**2.4,_y=i=>i<=.0031308?12.92*i:1.055*i**(1/2.4)-.055,Iu=(i,e,t,r)=>{const n=[0,0,0],s=[i,e,t];return r.forEach(((a,l)=>{a.forEach(((u,d)=>{n[l]+=u*s[d]}))})),n},he=(i,e,t)=>{e/=100;const r=(t/=100)<=.5?t*(e+1):t+e-t*e,n=2*t-r;return{R:xs(n,r,(i/=60)+2),G:xs(n,r,i),B:xs(n,r,i-2)}},fr=(i,e,t,r=1)=>{i/=Z,e/=Z,t/=Z,r=Math.min(r,1);const n=Math.max(i,e,t),s=Math.min(i,e,t),a=n-s;let l=0,u=0;const d=(n+s)/2;if(a!==0){switch(n){case i:l=(e-t)/a%6;break;case e:l=(t-i)/a+2;break;case t:l=(i-e)/a+4}l=H(60*l),l<0&&(l+=360),u=a/(1-Math.abs(2*d-1))}return{H:l,S:H(100*u),L:H(100*d),A:r}},hr=(i,e,t)=>{const r=[i/Z,e/Z,t/Z].map(wy),n=Iu(r[0],r[1],r[2],zu),s=((a,l,u)=>{const d=f=>f>.008856451679035631?Math.cbrt(f):f/.12841854934601665+.13793103448275862,c=d(a/ai[0]),p=d(l/ai[1]);return[116*p-16,500*(c-p),200*(p-d(u/ai[2]))]})(n[0],n[1],n[2]);return{L:s[0],a:s[1],b:s[2]}},Ii=(i,e,t)=>{const r=((s,a,l)=>{const u=f=>f>.20689655172413793?f**3:.12841854934601665*(f-.13793103448275862),d=(s+16)/116,c=a/500,p=l/200;return[ai[0]*u(d+c),ai[1]*u(d),ai[2]*u(d-p)]})(i,e,t),n=Iu(r[0],r[1],r[2],xy).map(_y);return{R:ae(n[0]*Z,0,Z),G:ae(n[1]*Z,0,Z),B:ae(n[2]*Z,0,Z)}},Tu=(i,e,t)=>{const r=Math.sqrt(e**2+t**2),n=Fu(Math.atan2(t,e));return{L:i,C:r,H:bt(n)}},Pu=(i,e,t)=>{const r=Eu(t);return{L:i,a:e*Math.cos(r),b:e*Math.sin(r)}},mr=(i,e,t)=>{const r=hr(i,e,t);return Tu(r.L,r.a,r.b)},jn=(i,e,t)=>{const r=Pu(i,e,t);return Ii(r.L,r.a,r.b)},Fr=(i,e,t,r=1)=>({H:fr(i,e,t,r).H,W:H(Math.min(i,e,t)/Z*100),B:H(100*(1-Math.max(i,e,t)/Z)),A:r}),Wn=(i,e,t)=>{const r=1-(t/=100)-(e/=100),n=r*(1-Math.abs(i/60%2-1));let s=0,a=0,l=0;return i<60?(s=r,a=n,l=0):i>=60&&i<120?(s=n,a=r,l=0):i>=120&&i<180?(s=0,a=r,l=n):i>=180&&i<240?(s=0,a=n,l=r):i>=240&&i<300?(s=n,a=0,l=r):i>=300&&(s=r,a=0,l=n),s+=e,a+=e,l+=e,{R:ae(s*Z,0,Z),G:ae(a*Z,0,Z),B:ae(l*Z,0,Z)}},$a=(i,e,t,r)=>({R:H(Z*(1-i)*(r=1-r)),G:H(Z*(1-e)*r),B:H(Z*(1-t)*r)}),Ru=(i,e,t)=>{i/=Z,e/=Z,t/=Z;const r=1-Math.max(i,e,t),n=1-r,s=n&&(n-e)/n,a=n&&(n-t)/n;return{C:H(100*(n&&(n-i)/n)),M:H(100*s),Y:H(100*a),K:H(100*r)}},Eo=(i,e)=>{if(i<0&&(i+=360),i>360&&(i-=360),i===360||i===0)return i;const t=[[0,120],[120,180],[180,240],[240,360]],r=[[0,60],[60,120],[120,240],[240,360]],n=e?r:t;let s=0,a=0,l=0,u=0;return(e?t:r).find(((d,c)=>i>=d[0]&&i<d[1]&&(s=d[0],a=d[1],l=n[c][0],u=n[c][1],!0))),l+(u-l)/(a-s)*(i-s)};class Du{get rgb(){return this._rgb}}class Cy extends Du{constructor(e){super();const t=e.match(at.HEX).groups;this._r=t.r??t.rr,this._g=t.g??t.gg,this._b=t.b??t.bb,this._a=t.a??t.aa;const r={R:pn(this._r),G:pn(this._g),B:pn(this._b)};this._a!==void 0&&(r.A=pn(this._a)/Z),this._rgb=r}}class ze{constructor(e,t,r){this._operations=new Map([[ht.DIVISION,this._division],[ht.MULTIPLICATION,this._multiplication],[ht.SUM,this._sum],[ht.REST,this._rest]]),this._colorIndex=e;let n=t,s=0;if(Number.isNaN(+t))if(t in r)this._result=r[t];else if(ht.REGEXP.test(n))ht.REGEXP.lastIndex=0,this._result=this._getCalcValue(n,r);else{for(;ht.SCOPED.test(n)&&s<100;){if(ht.SCOPED.lastIndex=0,n=n.replace(ht.SCOPED,((a,l)=>this._calculate(l,r).toString())),ht.REGEXP.test(n)){ht.REGEXP.lastIndex=0;break}s++}this._result=this._getCalcValue(n,r)}else this._result=+t}_division(e,t){return e/t}_multiplication(e,t){return e*t}_sum(e,t){return e+t}_rest(e,t){return e-t}_getCalcValue(e,t){const r=e.match(ht.REGEXP).groups.operation,n=this._calculate(r,t);if(Number.isNaN(n))throw new Error(`Invalid value for ${this._colorIndex}. ${r} ${by}`);return n}_calculate(e,t){return this._operations.forEach(((r,n)=>{let s=0;for(;n.test(e)&&s<100;)e=e.replace(n,((a,l,u)=>r(t[l]??+l,t[u]??+u).toString())),s++})),+e}get result(){return this._result}}class os extends Du{get hasPercentageAlpha(){return Se.test(this._a)}}class ra extends os{constructor(e,t){super();const r=e.match(at.RGB).groups,{r_legacy:n,g_legacy:s,b_legacy:a,a_legacy:l,r:u,g:d,b:c,a:p,from:f,relative_r:m,relative_g:h,relative_b:g,relative_a:v}=r;if(f){const b=t(f),C={r:b.R,g:b.G,b:b.B,alpha:b.A??1},x=new ze("r",m,C).result,A=new ze("g",h,C).result,q=new ze("b",g,C).result,S={R:Math.min(x,Z),G:Math.min(A,Z),B:Math.min(q,Z)};if(v){const B=new ze("alpha",v,C).result;S.A=Math.min(B,1)}this._rgb=S}else{this._r=n??u,this._g=s??d,this._b=a??c,this._a=l??p;const b={R:Math.min(Br(this._r),Z),G:Math.min(Br(this._g),Z),B:Math.min(Br(this._b),Z)};this._a!==void 0&&(b.A=me(this._a)),this._rgb=b}}get hasPercentageValues(){return Se.test(this._r)&&Se.test(this._g)&&Se.test(this._b)}static test(e){return at.RGB.test(e)}}class La extends os{get angleUnit(){if(this._h){const e=this._h.match(Bu).groups.units;return e===""?Ue.NONE:e}return Ue.NONE}}class ia extends La{constructor(e,t){super();const r=e.match(at.HSL).groups,{h_legacy:n,s_legacy:s,l_legacy:a,a_legacy:l,h:u,s:d,l:c,a:p,from:f,relative_h:m,relative_s:h,relative_l:g,relative_a:v}=r;if(f){const b=t(f),C=fr(b.R,b.G,b.B,b.A),x={h:C.H,s:C.S,l:C.L,alpha:C.A},A=new ze("h",m,x).result,q=new ze("s",h,x).result,S=new ze("l",g,x).result,B=he(ae(A,0,360),ae(q,0,yt),ae(S,0,yt));if(v){const k=new ze("alpha",v,x).result;B.A=ae(k,0,1)}this._rgb=B}else{this._h=n??u,this._s=s??d,this._l=a??c,this._a=l??p;const b=he(bt(this._h),st(this._s),st(this._l));this._a!==void 0&&(b.A=me(this._a)),this._rgb=b}}static test(e){return at.HSL.test(e)}}class na extends La{constructor(e,t){super();const r=e.match(at.HWB).groups,{h:n,w:s,b:a,a:l,from:u,relative_h:d,relative_w:c,relative_b:p,relative_a:f}=r;if(u){const m=t(u),h=Fr(m.R,m.G,m.B,m.A),g={h:h.H,w:h.W,b:h.B,alpha:h.A},v=new ze("h",d,g).result,b=new ze("w",c,g).result,C=new ze("b",p,g).result,x=Wn(ae(v,0,360),ae(b,0,yt),ae(C,0,yt));if(f){const A=new ze("alpha",f,g).result;x.A=ae(A,0,1)}this._rgb=x}else{this._h=n,this._w=s,this._b=a,this._a=l;const m=Wn(bt(this._h),st(this._w),st(this._b));this._a!==void 0&&(m.A=me(this._a)),this._rgb=m}}static test(e){return at.HWB.test(e)}}class sa extends os{constructor(e,t){super();const r=e.match(at.CIELab).groups,{L:n,a:s,b:a,A:l,from:u,relative_L:d,relative_a:c,relative_b:p,relative_A:f}=r;if(u){const m=t(u),h=hr(m.R,m.G,m.B),g={l:h.L,a:h.a,b:h.b,alpha:m.A??1},v=new ze("l",d,g).result,b=new ze("a",c,g).result,C=new ze("b",p,g).result,x=Ii(ae(v,0,yt),ae(b,-125,dr),ae(C,-125,dr));if(f){const A=new ze("alpha",f,g).result;x.A=ae(A,0,1)}this._rgb=x}else{this._L=n,this._A=s,this._B=a,this._a=l;const m=Ii(st(this._L),Un(this._A),Un(this._B));this._a!==void 0&&(m.A=me(this._a)),this._rgb=m}}get hasPercentageValues(){return Se.test(this._L)&&Se.test(this._A)&&Se.test(this._B)}static test(e){return at.CIELab.test(e)}}class aa extends La{constructor(e,t){super();const r=e.match(at.LCH).groups,{l:n,c:s,h:a,a:l,from:u,relative_l:d,relative_c:c,relative_h:p,relative_a:f}=r;if(u){const m=t(u),h=mr(m.R,m.G,m.B),g={l:h.L,c:h.C,h:h.H,alpha:m.A??1},v=new ze("l",d,g).result,b=new ze("c",c,g).result,C=new ze("h",p,g).result,x=jn(ae(v,0,yt),ae(b,-150,si),bt(C));if(f){const A=new ze("alpha",f,g).result;x.A=ae(A,0,1)}this._rgb=x}else{this._l=n,this._c=s,this._h=a,this._a=l;const m=jn(st(this._l),ku(this._c),bt(this._h));this._a!==void 0&&(m.A=me(this._a)),this._rgb=m}}get hasPercentageValues(){return Se.test(this._l)&&Se.test(this._c)}static test(e){return at.LCH.test(e)}}class oa extends os{constructor(e){super();const t=e.match(at.CMYK).groups;this._c=t.c_legacy??t.c,this._m=t.m_legacy??t.m,this._y=t.y_legacy??t.y,this._k=t.k_legacy??t.k,this._a=t.a_legacy??t.a;const r=$a(ur(this._c),ur(this._m),ur(this._y),ur(this._k));this._a!==void 0&&(r.A=me(this._a)),this._rgb=r}get hasPercentageValues(){return Se.test(this._c)&&Se.test(this._m)&&Se.test(this._y)&&Se.test(this._k)}static test(e){return at.CMYK.test(e)}}const $e=i=>typeof i=="string"?(e=>{let t;if(Object.keys(K).some((r=>{if(at[r].test(e))return t=r,!0})),!t&&~Mu.indexOf(e)&&(t=K.HEX),!t)throw new Error(yy);return t})(i):(e=>{let t,r=!1;const n=qu(Object.keys(e));if(ea[n]&&(t=ea[n]),t&&t===K.RGB){const s=Object.entries(e).some((l=>!ta.test(`${l[1]}`))),a=Object.entries(e).some((l=>!(Se.test(`${l[1]}`)||!ta.test(`${l[1]}`)&&!isNaN(+l[1])&&+l[1]<=Z)));s&&a&&(r=!0),s||(t=K.HEX)}if(!t||r)throw new Error(vy);return t})(i),Ay={[K.HEX](i){const e=~Mu.indexOf(i)?Vn[i]:i;return new Cy(e).rgb},[K.RGB]:i=>new ra(i,je).rgb,[K.HSL]:i=>new ia(i,je).rgb,[K.HWB]:i=>new na(i,je).rgb,[K.CIELab]:i=>new sa(i,je).rgb,[K.LCH]:i=>new aa(i,je).rgb,[K.CMYK]:i=>new oa(i).rgb},Sy={[K.HEX](i){const e={R:Br(`${i.R}`),G:Br(`${i.G}`),B:Br(`${i.B}`)};return xe(i,"A")&&(e.A=Math.min(Br(`${i.A}`,!0),1)),e},[K.RGB](i){return this.HEX(i)},[K.HSL](i){const e=st(`${i.S}`),t=st(`${i.L}`),r=he(bt(i.H),e,t);return xe(i,"A")&&(r.A=me(i.A)),r},[K.HWB](i){const e=st(`${i.W}`),t=st(`${i.B}`),r=Wn(bt(i.H),e,t);return xe(i,"A")&&(r.A=me(i.A)),r},[K.CIELab](i){const e=st(`${i.L}`),t=Un(`${i.a}`),r=Un(`${i.b}`),n=Ii(e,t,r);return xe(i,"A")&&(n.A=me(i.A)),n},[K.LCH](i){const e=st(`${i.L}`),t=ku(`${i.C}`),r=bt(`${i.H}`),n=jn(e,t,r);return xe(i,"A")&&(n.A=me(i.A)),n},[K.CMYK](i){const e=ur(`${i.C}`),t=ur(`${i.M}`),r=ur(`${i.Y}`),n=ur(`${i.K}`),s=$a(e,t,r,n);return xe(i,"A")&&(s.A=me(i.A)),s}},je=(i,e=$e(i))=>typeof i=="string"?Ay[e](i):Sy[e](i),we=(i,...e)=>{const t=[],r=[],n=[],s=[],a=[],l=[],u=[],d=Object.values(Ue),c=Object.values(Oe),p=Object.values(zi),f={legacyCSS:0,spacesAfterCommas:0,cmykFunction:0};for(const m of e)if(typeof m=="string"){if(t.push(m),m.includes(",")){f.legacyCSS++;const h=m.match(my);new Set(h).size===1&&gy.test(h[0].slice(1))&&f.spacesAfterCommas++}if(ia.test(m)){const h=new ia(m,je);r.push(h.angleUnit),u.push(h.hasPercentageAlpha);continue}if(na.test(m)){const h=new na(m,je);r.push(h.angleUnit),u.push(h.hasPercentageAlpha);continue}if(ra.test(m)){const h=new ra(m,je);n.push(h.hasPercentageValues),u.push(h.hasPercentageAlpha);continue}if(sa.test(m)){const h=new sa(m,je);s.push(h.hasPercentageValues),u.push(h.hasPercentageAlpha);continue}if(aa.test(m)){const h=new aa(m,je);r.push(h.angleUnit),a.push(h.hasPercentageValues),u.push(h.hasPercentageAlpha);continue}if(oa.test(m)){const h=new oa(m);l.push(h.hasPercentageValues),m.startsWith("cmyk")&&f.cmykFunction++,u.push(h.hasPercentageAlpha)}}return{decimals:typeof i.decimals===Fi.NUMBER?i.decimals:Rt.decimals,legacyCSS:typeof i.legacyCSS===Fi.BOOLEAN?i.legacyCSS:!!(t.length&&f.legacyCSS===t.length)||Rt.legacyCSS,spacesAfterCommas:typeof i.spacesAfterCommas===Fi.BOOLEAN?i.spacesAfterCommas:!!(t.length&&f.spacesAfterCommas===t.length)||Rt.spacesAfterCommas,anglesUnit:i.anglesUnit&&d.includes(i.anglesUnit)?i.anglesUnit:new Set(r).size===1?r[0]:Rt.anglesUnit,rgbUnit:i.rgbUnit&&c.includes(i.rgbUnit)?i.rgbUnit:new Set(n).size===1&&n[0]?Oe.PERCENT:Rt.rgbUnit,labUnit:i.labUnit&&c.includes(i.labUnit)?i.labUnit:new Set(s).size===1&&s[0]?Oe.PERCENT:Rt.labUnit,lchUnit:i.lchUnit&&c.includes(i.lchUnit)?i.lchUnit:new Set(a).size===1&&a[0]?Oe.PERCENT:Rt.lchUnit,cmykUnit:i.cmykUnit&&c.includes(i.cmykUnit)?i.cmykUnit:new Set(l).size!==1||l[0]?Rt.cmykUnit:Oe.NONE,alphaUnit:i.alphaUnit&&c.includes(i.alphaUnit)?i.alphaUnit:new Set(u).size===1&&u[0]?Oe.PERCENT:Rt.alphaUnit,cmykFunction:i.cmykFunction&&p.includes(i.cmykFunction)?i.cmykFunction:l.length&&l.length===f.cmykFunction?zi.CMYK:Rt.cmykFunction}},la=(i,e)=>({H:H(i.H,e),S:H(i.S,e),L:H(i.L,e)}),ws=i=>i?", ":",",wr=(i,e)=>{const t=qu(Object.keys(i));return fy[ea[t]].reduce(((r,n,s)=>{const a=i[n];return a!==void 0&&r.push(e(a,s)),r}),[])},_r=(i,e)=>i.replace(hy,((t,r)=>`${e[+r-1]}`)),ki=(i,e,t=!1)=>{const{alphaUnit:r,legacyCSS:n,decimals:s}=e;return r!==Oe.PERCENT||n&&!t?H(i,s):`${H(100*i,s)}%`},Oo=i=>{const{anglesUnit:e,decimals:t}=i;return(r,n)=>n===0&&e!==Ue.NONE?`${H(Ou(r,e),t)}${e}`:n===3?ki(r,i):H(r,t)},Y={[K.HEX]:i=>{const e=wr(i,(r=>(n=>{let s=H(n,0).toString(16).toUpperCase();return s.length===1&&(s=`0${s}`),s})(H(r)))),t=e.length===4?"#{1}{2}{3}{4}":"#{1}{2}{3}";return _r(t,e)},[K.RGB]:(i,e)=>{const{decimals:t,legacyCSS:r,spacesAfterCommas:n,rgbUnit:s}=e,a=ws(n),l=wr(i,((d,c)=>s===Oe.PERCENT&&c<3?`${((p,f)=>H(p/Z*100,f))(d,t)}%`:c===3?ki(d,e):H(d,t))),u=r?l.length===4?`rgba({1}${a}{2}${a}{3}${a}{4})`:`rgb({1}${a}{2}${a}{3})`:l.length===4?"rgb({1} {2} {3} / {4})":"rgb({1} {2} {3})";return _r(u,l)},[K.HSL]:(i,e)=>{const{legacyCSS:t,spacesAfterCommas:r}=e,n=ws(r),s=Oo(e),a=wr(i,s),l=t?a.length===4?`hsla({1}${n}{2}%${n}{3}%${n}{4})`:`hsl({1}${n}{2}%${n}{3}%)`:a.length===4?"hsl({1} {2}% {3}% / {4})":"hsl({1} {2}% {3}%)";return _r(l,a)},[K.HWB]:(i,e)=>{const t=Oo(e),r=wr(i,t),n=r.length===4?"hwb({1} {2}% {3}% / {4})":"hwb({1} {2}% {3}%)";return _r(n,r)},[K.CIELab]:(i,e)=>{const{decimals:t,labUnit:r}=e,n=wr(i,((a,l)=>{if(l===0){const u=H(st(a),t);return r===Oe.PERCENT?`${u}%`:`${u}`}return l<3?r===Oe.PERCENT?`${((u,d)=>H(u/dr*100,d))(a,t)}%`:H(a,t):ki(a,e,!0)})),s=n.length===4?"lab({1} {2} {3} / {4})":"lab({1} {2} {3})";return _r(s,n)},[K.LCH]:(i,e)=>{const{decimals:t,lchUnit:r,anglesUnit:n}=e,s=wr(i,((l,u)=>{if(u===0){const d=H(st(l),t);return r===Oe.PERCENT?`${d}%`:`${d}`}return u===1?r===Oe.PERCENT?`${((d,c)=>H(d/si*100,c))(l,t)}%`:H(l,t):u===2?n!==Ue.NONE?`${H(Ou(l,n),t)}${n}`:H(l,t):ki(l,e,!0)})),a=s.length===4?"lch({1} {2} {3} / {4})":"lch({1} {2} {3})";return _r(a,s)},[K.CMYK]:(i,e)=>{const{decimals:t,legacyCSS:r,spacesAfterCommas:n,cmykUnit:s,cmykFunction:a}=e,l=ws(n),u=wr(i,((c,p)=>s===Oe.PERCENT&&p<4?`${H(c,t)}%`:p===4?ki(c,e):H(c/100,t))),d=r?u.length===5?`${a}({1}${l}{2}${l}{3}${l}{4}${l}{5})`:`${a}({1}${l}{2}${l}{3}${l}{4})`:u.length===5?`${a}({1} {2} {3} {4} / {5})`:`${a}({1} {2} {3} {4})`;return _r(d,u)}},xi=(i,e,t)=>e.reduce(((r,n)=>[...r,{...i,H:t===et.ADDITIVE?bt(i.H+n):bt(Eo(Eo(i.H,!1)+n,!0))}]),[{...i}]),My=(i,e)=>xi(i,[30,-30],e),By=(i,e)=>xi(i,[180],e),ky=(i,e)=>xi(i,[150,-150],e),qy=(i,e)=>xi(i,[120,-120],e),Fy=(i,e)=>xi(i,[60,-120,180],e),Ey=(i,e)=>xi(i,[90,-90,180],e),G={[K.HEX]:i=>({R:fn(i.R),G:fn(i.G),B:fn(i.B)}),HEXA(i){const e=G.HEX(i);return e.A=xe(i,"A")?fn(i.A*Z):"0xFF",e},[K.RGB](i,e){const t=Oy(i,e);return xe(t,"A")&&delete t.A,t},RGBA(i,e){const t=G.RGB(i,e);return t.A=xe(i,"A")?H(i.A):1,t},[K.HSL](i,e){const t=fr(i.R,i.G,i.B);return delete t.A,la(t,e)},HSLA(i,e){const t=G.HSL(i,e);return t.A=xe(i,"A")?H(i.A,e):1,t},[K.HWB](i,e){const t=Fr(i.R,i.G,i.B);return delete t.A,((r,n)=>({H:H(r.H,n),W:H(r.W,n),B:H(r.B,n)}))(t,e)},HWBA(i,e){const t=G.HWB(i,e);return t.A=xe(i,"A")?H(i.A,e):1,t},[K.CIELab]:(i,e)=>((t,r)=>({L:H(t.L,r),a:H(t.a,r),b:H(t.b,r)}))(hr(i.R,i.G,i.B),e),CIELabA(i,e){const t=G.CIELab(i,e);return t.A=xe(i,"A")?H(i.A,e):1,t},[K.LCH]:(i,e)=>((t,r)=>({L:H(t.L,r),C:H(t.C,r),H:H(t.H,r)}))(mr(i.R,i.G,i.B),e),LCHA(i,e){const t=G.LCH(i,e);return t.A=xe(i,"A")?H(i.A,e):1,t},[K.CMYK]:(i,e)=>((t,r)=>({C:H(t.C,r),M:H(t.M,r),Y:H(t.Y,r),K:H(t.K,r)}))(Ru(i.R,i.G,i.B),e),CMYKA(i,e){const t=G.CMYK(i,e);return t.A=xe(i,"A")?H(i.A,e):1,t}},hn=(i,e,t,r)=>{const n=$e(i),s=typeof i=="string",a=je(i,n),l=typeof i=="string"&&xe(a,"A")||typeof i!="string"&&xe(i,"A"),u=fr(a.R,a.G,a.B,a.A);l||delete u.A;const d=t?u.L/(e+1):(100-u.L)/(e+1),c=Array(e).fill(null).map(((p,f)=>({...u,L:u.L+d*(f+1)*(1-2*+t)})));switch(n){case K.HEX:default:return c.map((p=>{const f=he(p.H,p.S,p.L);return l&&(f.A=p.A),s?l?Y.HEX({...f,A:H(f.A*Z)}):Y.HEX(f):l?G.HEXA(f):G.HEX(f)}));case K.RGB:return c.map((p=>{const f=he(p.H,p.S,p.L);return l&&(f.A=p.A),s?Y.RGB(f,r):l?G.RGBA(f,r.decimals):G.RGB(f,r.decimals)}));case K.HSL:return c.map((p=>s?Y.HSL(p,r):l?G.HSLA({...he(p.H,p.S,p.L),A:p.A},r.decimals):G.HSL(he(p.H,p.S,p.L),r.decimals)));case K.HWB:return c.map((p=>{const f=he(p.H,p.S,p.L);l&&(f.A=p.A);const m=l?G.HWBA(f,r.decimals):G.HWB(f,r.decimals);return s?Y.HWB(m,r):m}));case K.CIELab:return c.map((p=>{const f=he(p.H,p.S,p.L);l&&(f.A=p.A);const m=l?G.CIELabA(f,r.decimals):G.CIELab(f,r.decimals);return s?Y.CIELab(m,r):m}));case K.LCH:return c.map((p=>{const f=he(p.H,p.S,p.L),m=mr(f.R,f.G,f.B);return l&&(m.A=p.A),s?Y.LCH(m,r):l?G.LCHA({...f,A:p.A},r.decimals):G.LCH(f,r.decimals)}))}},Hr={buildHarmony(i,e,t,r){const n=$e(i),s=je(i,n),a=fr(s.R,s.G,s.B,s.A),l=typeof i=="string"&&xe(s,"A")||typeof i!="string"&&xe(i,"A"),u=typeof i=="string";switch(n){case K.HEX:default:return l?this.HEXA(la(a,0),e,t,u):this.HEX(la(a,0),e,t,u);case K.HSL:return l?this.HSLA(a,e,t,u,r):this.HSL(a,e,t,u,r);case K.HWB:return l?this.HWBA(a,e,t,u,r):this.HWB(a,e,t,u,r);case K.RGB:return l?this.RGBA(a,e,t,u,r):this.RGB(a,e,t,u,r);case K.CIELab:return l?this.CIELabA(a,e,t,u,r):this.CIELab(a,e,t,u,r);case K.LCH:return l?this.LCHA(a,e,t,u,r):this.LCH(a,e,t,u,r)}},[K.HEX]:(i,e,t,r)=>e(i,t).map((n=>r?Y.HEX(he(n.H,n.S,n.L)):G.HEX(he(n.H,n.S,n.L)))),HEXA:(i,e,t,r)=>e(i,t).map((n=>r?Y.HEX({...he(n.H,n.S,n.L),A:me(n.A)*Z}):G.HEXA({...he(n.H,n.S,n.L),A:me(n.A)}))),[K.RGB]:(i,e,t,r,n)=>e(i,t).map((s=>r?Y.RGB(he(s.H,s.S,s.L),n):G.RGB(he(s.H,s.S,s.L),n.decimals))),RGBA:(i,e,t,r,n)=>e(i,t).map((s=>r?Y.RGB({...he(s.H,s.S,s.L),A:me(s.A)},n):G.RGBA({...he(s.H,s.S,s.L),A:me(s.A)},n.decimals))),[K.HSL]:(i,e,t,r,n)=>e(i,t).map((s=>r?Y.HSL({H:s.H,S:s.S,L:s.L},n):G.HSL(he(s.H,s.S,s.L),n.decimals))),HSLA:(i,e,t,r,n)=>e(i,t).map((s=>r?Y.HSL({...s,A:me(s.A)},n):G.HSLA({...he(s.H,s.S,s.L),A:me(s.A)},n.decimals))),[K.HWB]:(i,e,t,r,n)=>e(i,t).map((s=>{const a=he(s.H,s.S,s.L),l=Fr(a.R,a.G,a.B);return r?Y.HWB({H:l.H,W:l.W,B:l.B},n):G.HWB(a,n.decimals)})),HWBA:(i,e,t,r,n)=>e(i,t).map((s=>{const a=he(s.H,s.S,s.L),l=Fr(a.R,a.G,a.B);return r?Y.HWB({...l,A:me(s.A)},n):G.HWBA({...a,A:me(s.A)},n.decimals)})),[K.CIELab]:(i,e,t,r,n)=>e(i,t).map((s=>{const a=he(s.H,s.S,s.L);return r?Y.CIELab(hr(a.R,a.G,a.B),n):G.CIELab(a,n.decimals)})),CIELabA:(i,e,t,r,n)=>e(i,t).map((s=>{const a=he(s.H,s.S,s.L);return r?Y.CIELab({...hr(a.R,a.G,a.B),A:me(s.A)},n):G.CIELabA({...a,A:me(s.A)},n.decimals)})),[K.LCH]:(i,e,t,r,n)=>e(i,t).map((s=>{const a=he(s.H,s.S,s.L);return r?Y.LCH(mr(a.R,a.G,a.B),n):G.LCH(a,n.decimals)})),LCHA:(i,e,t,r,n)=>e(i,t).map((s=>{const a=he(s.H,s.S,s.L);return r?Y.LCH({...mr(a.R,a.G,a.B),A:me(s.A)},n):G.LCHA({...a,A:me(s.A)},n.decimals)}))},ti={mix(i,e){const t=i.map((a=>{const l=$e(a);return je(a,l)})),r=e===et.SUBTRACTIVE?t.map((a=>{const l=((u,d,c)=>{const p=Math.min(u,d,c),f=Math.min(Z-u,Z-d,Z-c),m=u-p,h=d-p,g=c-p,v=Math.min(m,h),b=m-v,C=(h+v)/2,x=(g+h-v)/2,A=Math.max(b,C,x)/Math.max(m,h,g),q=isNaN(A)||A===1/0||A<=0?1:A;return{R:b/q+f,Y:C/q+f,B:x/q+f}})(a.R,a.G,a.B);return xe(a,"A")&&(l.A=a.A),l})):null;function n(a){const l=e===et.ADDITIVE?{R:0,G:0,B:0,A:0}:{R:0,Y:0,B:0,A:0};return a.reduce(((u,d)=>{const c=xe(d,"A")?d.A:1,p={R:Math.min(u.R+d.R*c,Z),B:Math.min(u.B+d.B*c,Z),A:1-(1-c)*(1-u.A)},f="G"in u?u.G:u.Y,m="G"in d?d.G:d.Y;return{...p,...e===et.ADDITIVE?{G:Math.min(f+m*c,Z)}:{Y:Math.min(f+m*c,Z)}}}),l)}let s;if(e===et.ADDITIVE)s=n(t);else{const a=n(r);s=((l,u,d)=>{const c=Math.min(l,u,d),p=Math.min(Z-l,Z-u,Z-d),f=l-c,m=u-c,h=d-c,g=Math.min(m,h),v=f+m-g,b=m+g,C=2*(h-g),x=Math.max(v,b,C)/Math.max(f,m,h),A=isNaN(x)||x===1/0||x<=0?1:x;return{R:v/A+p,G:b/A+p,B:C/A+p}})(a.R,a.Y,a.B),s.A=a.A}return{R:H(s.R),G:H(s.G),B:H(s.B),A:ae(s.A,0,1)}},[K.HEX](i,e,t){const r=this.mix(i,e);return delete r.A,t?Y.HEX(r):G.HEX(r)},HEXA(i,e,t){const r=this.mix(i,e);return r.A=t?me(r.A)*Z:me(r.A),t?Y.HEX(r):G.HEXA(r)},[K.RGB](i,e,t,r){const n=this.mix(i,e);return delete n.A,t?Y.RGB(n,r):G.RGB(n,r.decimals)},RGBA(i,e,t,r){const n=this.mix(i,e);return t?Y.RGB(n,r):G.RGBA(n,r.decimals)},[K.HSL](i,e,t,r){const n=this.mix(i,e),s=fr(n.R,n.G,n.B);return delete n.A,delete s.A,t?Y.HSL(s,r):G.HSL(n,r.decimals)},HSLA(i,e,t,r){const n=this.mix(i,e),s=fr(n.R,n.G,n.B,n.A);return t?Y.HSL(s,r):G.HSLA(n,r.decimals)},[K.HWB](i,e,t,r){const n=this.mix(i,e),s=Fr(n.R,n.G,n.B);return delete n.A,delete s.A,t?Y.HWB(s,r):G.HWB(n,r.decimals)},HWBA(i,e,t,r){const n=this.mix(i,e),s=Fr(n.R,n.G,n.B,n.A);return t?Y.HWB(s,r):G.HWBA(n,r.decimals)},[K.CIELab](i,e,t,r){const n=this.mix(i,e),s=hr(n.R,n.G,n.B);return delete n.A,t?Y.CIELab(s,r):G.CIELab(n,r.decimals)},CIELabA(i,e,t,r){const n=this.mix(i,e),s=hr(n.R,n.G,n.B);return xe(n,"A")&&(s.A=n.A),t?Y.CIELab(s,r):G.CIELabA(n,r.decimals)},[K.LCH](i,e,t,r){const n=this.mix(i,e),s=mr(n.R,n.G,n.B);return delete n.A,t?Y.LCH(s,r):G.LCH(n,r.decimals)},LCHA(i,e,t,r){const n=this.mix(i,e),s=mr(n.R,n.G,n.B);return xe(n,"A")&&(s.A=n.A),t?Y.LCH(s,r):G.LCHA(n,r.decimals)}},Oy=(i,e)=>({R:H(i.R,e),G:H(i.G,e),B:H(i.B,e),...xe(i,"A")?{A:H(i.A,e)}:{}}),it=(i,e,t,r)=>r(je(i,e),t),Gn=(i,e,t,r,n)=>(t<1&&(t=5),((a,l,u)=>{const d=u-1,c=(l.R-a.R)/d,p=(l.G-a.G)/d,f=(l.B-a.B)/d,m=me(a.A),h=(me(l.A)-m)/d;return Array(u).fill(null).map(((g,v)=>v===0?a:v===d?l:{R:H(a.R+c*v),G:H(a.G+p*v),B:H(a.B+f*v),A:H(m+h*v)}))})(je(i),je(e),t).map((a=>n(a,r))));function Be(i){const{from:e,to:t,thirdParameter:r,fourthParameter:n,translateFunction:s,cssFunction:a}=i,l=typeof r=="number"?Gn(e,t,r,n?.decimals,s):Gn(e,t,5,r?.decimals,s);return a?l.map((u=>a(u,we((typeof r=="number"?n:r)??{},e,t)))):l}function ke(i){const{colors:e,secondParameter:t,thirdParameter:r,colorMixerFunction:n,css:s}=i,a=we((typeof t=="string"?r:t)??{},...e);return n(e,typeof t=="string"?t:et.ADDITIVE,s,a)}const _s=(i,e,t,r)=>({[qt.ANALOGOUS]:Hr.buildHarmony(e,My,t,r),[qt.COMPLEMENTARY]:Hr.buildHarmony(e,By,t,r),[qt.SPLIT_COMPLEMENTARY]:Hr.buildHarmony(e,ky,t,r),[qt.TRIADIC]:Hr.buildHarmony(e,qy,t,r),[qt.TETRADIC]:Hr.buildHarmony(e,Fy,t,r),[qt.SQUARE]:Hr.buildHarmony(e,Ey,t,r)})[i],qe=Object.fromEntries(Object.entries(ti).map((i=>{const[e,t]=i;return[e,t.bind(ti)]})));class Ce{constructor(e,t={}){this._options=we(t,e),this.rgb=je(e),this.update("rgb")}update(...e){e.includes("rgb")||this.updateRGB(),e.includes("hsl")||this.updateHSL(),e.includes("hwb")||this.updateHWB(),e.includes("lab")||this.updateLAB(),e.includes("lch")||this.updateLCH(),e.includes("cmyk")||this.updateCMYK()}updateRGB(){this.rgb={...he(this.hsl.H,this.hsl.S,this.hsl.L),A:this.hsl.A}}updateHSL(){this.hsl=fr(this.rgb.R,this.rgb.G,this.rgb.B,this.rgb.A)}updateHWB(){this.hwb=Fr(this.rgb.R,this.rgb.G,this.rgb.B,this.rgb.A)}updateLAB(){this.lab={...hr(this.rgb.R,this.rgb.G,this.rgb.B),A:this.rgb.A}}updateLCH(){this.lch={...mr(this.rgb.R,this.rgb.G,this.rgb.B),A:this.rgb.A}}updateCMYK(){this.cmyk=Ru(this.rgb.R,this.rgb.G,this.rgb.B)}updateRGBFromHWB(){this.rgb={...Wn(this.hwb.H,this.hwb.W,this.hwb.B),A:this.rgb.A}}updateRGBFromLCH(){this.rgb={...jn(this.lch.L,this.lch.C,this.lch.H),A:this.rgb.A}}updateRGBFromCMYK(){this.rgb={...$a(this.cmyk.C,this.cmyk.M,this.cmyk.Y,this.cmyk.K),A:this.rgb.A}}updateRGBFromLAB(){this.rgb={...Ii(this.lab.L,this.lab.a,this.lab.b),A:this.rgb.A}}updateLCHFromLAB(){this.lch={...Tu(this.lab.L,this.lab.a,this.lab.b),A:this.lab.A}}updateLABromLCH(){this.lab={...Pu(this.lch.L,this.lch.C,this.lch.H),A:this.lch.A}}setOptions(e={}){return this._options={...this._options,...e},this}setR(e){this.rgb.R=ae(e,0,Z),this.update("rgb")}setG(e){return this.rgb.G=ae(e,0,Z),this.update("rgb"),this}setB(e){return this.rgb.B=ae(e,0,Z),this.update("rgb"),this}setH(e){return this.hsl.H=bt(e),this.update("hsl"),this}setS(e){return this.hsl.S=ae(e,0,yt),this.update("hsl"),this}setL(e){return this.hsl.L=ae(e,0,yt),this.update("hsl"),this}setWhiteness(e){return this.hwb.W=ae(e,0,yt),this.updateRGBFromHWB(),this.update("rgb","hwb"),this}setBlackness(e){return this.hwb.B=ae(e,0,yt),this.updateRGBFromHWB(),this.update("rgb","hwb"),this}setCIEL(e){return this.lab.L=ae(e,0,yt),this.updateRGBFromLAB(),this.updateLCHFromLAB(),this.update("rgb","lab","lch"),this}setCIEa(e){return this.lab.a=ae(e,-125,dr),this.updateRGBFromLAB(),this.updateLCHFromLAB(),this.update("rgb","lab","lch"),this}setCIEb(e){return this.lab.b=ae(e,-125,dr),this.updateRGBFromLAB(),this.updateLCHFromLAB(),this.update("rgb","lab","lch"),this}setLCHL(e){return this.lch.L=ae(e,0,yt),this.updateRGBFromLCH(),this.updateLABromLCH(),this.update("rgb","lab","lch"),this}setLCHC(e){return this.lch.C=ae(e,0,si),this.updateRGBFromLCH(),this.updateLABromLCH(),this.update("rgb","lab","lch"),this}setLCHH(e){return this.lch.H=bt(e),this.updateRGBFromLCH(),this.updateLABromLCH(),this.update("rgb","lab","lch"),this}setA(e){const t=ae(e,0,1);return this.rgb.A=t,this.hsl.A=t,this.hwb.A=t,this.lab.A=t,this.lch.A=t,this.cmyk.A=t,this}setC(e){return this.cmyk.C=ae(e,0,100),this.updateRGBFromCMYK(),this.update("cmyk"),this}setM(e){return this.cmyk.M=ae(e,0,100),this.updateRGBFromCMYK(),this.update("cmyk"),this}setY(e){return this.cmyk.Y=ae(e,0,100),this.updateRGBFromCMYK(),this.update("cmyk"),this}setK(e){return this.cmyk.K=ae(e,0,100),this.updateRGBFromCMYK(),this.update("cmyk"),this}get options(){return this._options}get R(){return H(this.rgb.R,this.options.decimals)}get G(){return H(this.rgb.G,this.options.decimals)}get B(){return H(this.rgb.B,this.options.decimals)}get H(){return H(this.hsl.H,this.options.decimals)}get S(){return H(this.hsl.S,this.options.decimals)}get L(){return H(this.hsl.L,this.options.decimals)}get Whiteness(){return H(this.hwb.W,this.options.decimals)}get Blackness(){return H(this.hwb.B,this.options.decimals)}get CIEL(){return H(this.lab.L,this.options.decimals)}get CIEa(){return H(this.lab.a,this.options.decimals)}get CIEb(){return H(this.lab.b,this.options.decimals)}get LCHL(){return H(this.lch.L,this.options.decimals)}get LCHC(){return H(this.lch.C,this.options.decimals)}get LCHH(){return H(this.lch.H,this.options.decimals)}get A(){return H(this.hsl.A,this.options.decimals)}get C(){return H(this.cmyk.C,this.options.decimals)}get M(){return H(this.cmyk.M,this.options.decimals)}get Y(){return H(this.cmyk.Y,this.options.decimals)}get K(){return H(this.cmyk.K,this.options.decimals)}get HEXObject(){return G.HEX(this.rgb)}get HEXAObject(){return G.HEXA(this.rgb)}get RGBObject(){return{R:this.R,G:this.G,B:this.B}}get RGBAObject(){return{...this.RGBObject,A:this.A}}get HSLObject(){return{H:this.H,S:this.S,L:this.L}}get HSLAObject(){return{...this.HSLObject,A:this.A}}get HWBObject(){return{H:this.H,W:this.Whiteness,B:this.Blackness}}get HWBAObject(){return{...this.HWBObject,A:this.A}}get CIELabObject(){return{L:this.CIEL,a:this.CIEa,b:this.CIEb}}get CIELabAObject(){return{...this.CIELabObject,A:this.A}}get LCHObject(){return{L:this.LCHL,C:this.LCHC,H:this.LCHH}}get LCHAObject(){return{...this.LCHObject,A:this.A}}get CMYKObject(){return{C:this.C,M:this.M,Y:this.Y,K:this.K}}get CMYKAObject(){return{...this.CMYKObject,A:this.A}}get HEX(){return Y.HEX({R:this.R,G:this.G,B:this.B})}get HEXA(){return Y.HEX({R:this.R,G:this.G,B:this.B,A:this.A*Z})}get RGB(){return Y.RGB({R:this.R,G:this.G,B:this.B},this.options)}get RGBA(){return Y.RGB({R:this.R,G:this.G,B:this.B,A:this.A},this.options)}get HSL(){return Y.HSL({H:this.H,S:this.S,L:this.L},this.options)}get HSLA(){return Y.HSL({H:this.H,S:this.S,L:this.L,A:this.A},this.options)}get HWB(){return Y.HWB({H:this.H,W:this.Whiteness,B:this.Blackness},this.options)}get HWBA(){return Y.HWB({H:this.H,W:this.Whiteness,B:this.Blackness,A:this.A},this.options)}get CIELab(){return Y.CIELab({L:this.CIEL,a:this.CIEa,b:this.CIEb},this.options)}get CIELabA(){return Y.CIELab({L:this.CIEL,a:this.CIEa,b:this.CIEb,A:this.A},this.options)}get LCH(){return Y.LCH({L:this.LCHL,C:this.LCHC,H:this.LCHH},this.options)}get LCHA(){return Y.LCH({L:this.LCHL,C:this.LCHC,H:this.LCHH,A:this.A},this.options)}get CMYK(){return Y.CMYK({C:this.C,M:this.M,Y:this.Y,K:this.K},this.options)}get CMYKA(){return Y.CMYK({C:this.C,M:this.M,Y:this.Y,K:this.K,A:this.A},this.options)}static toHEXObject(e){const t=$e(e);return it(e,t,0,G.HEX)}static toHEX(e){return Y.HEX(Ce.toHEXObject(e))}static toHEXAObject(e){const t=$e(e);return it(e,t,0,G.HEXA)}static toHEXA(e){return Y.HEX(Ce.toHEXAObject(e))}static toRGBObject(e,t={}){const r=$e(e);return it(e,r,t.decimals,G.RGB)}static toRGB(e,t={}){const r=Ce.toRGBObject(e,t),n=we(t,e);return Y.RGB(r,n)}static toRGBAObject(e,t={}){const r=$e(e);return it(e,r,t.decimals,G.RGBA)}static toRGBA(e,t={}){const r=Ce.toRGBAObject(e,t),n=we(t,e);return Y.RGB(r,n)}static toHSLObject(e,t={}){const r=$e(e);return it(e,r,t.decimals,G.HSL)}static toHSL(e,t={}){const r=Ce.toHSLObject(e,t),n=we(t,e);return Y.HSL(r,n)}static toHSLAObject(e,t={}){const r=$e(e);return it(e,r,t.decimals,G.HSLA)}static toHSLA(e,t={}){const r=Ce.toHSLAObject(e,t),n=we(t,e);return Y.HSL(r,n)}static toHWBObject(e,t={}){const r=$e(e);return it(e,r,t.decimals,G.HWB)}static toHWB(e,t={}){const r=Ce.toHWBObject(e,t),n=we(t,e);return Y.HWB(r,n)}static toHWBAObject(e,t={}){const r=$e(e);return it(e,r,t.decimals,G.HWBA)}static toHWBA(e,t={}){const r=Ce.toHWBAObject(e,t),n=we(t,e);return Y.HWB(r,n)}static toCIELabObject(e,t={}){const r=$e(e);return it(e,r,t.decimals,G.CIELab)}static toCIELab(e,t={}){const r=Ce.toCIELabObject(e,t),n=we(t,e);return Y.CIELab(r,n)}static toCIELabAObject(e,t={}){const r=$e(e);return it(e,r,t.decimals,G.CIELabA)}static toCIELabA(e,t={}){const r=Ce.toCIELabAObject(e,t),n=we(t,e);return Y.CIELab(r,n)}static toLCHObject(e,t={}){const r=$e(e);return it(e,r,t.decimals,G.LCH)}static toLCH(e,t={}){const r=Ce.toLCHObject(e,t),n=we(t,e);return Y.LCH(r,n)}static toLCHAObject(e,t={}){const r=$e(e);return it(e,r,t.decimals,G.LCHA)}static toLCHA(e,t={}){const r=Ce.toLCHAObject(e,t),n=we(t,e);return Y.LCH(r,n)}static toCMYKObject(e,t={}){const r=$e(e);return it(e,r,t.decimals,G.CMYK)}static toCMYK(e,t={}){const r=Ce.toCMYKObject(e,t),n=we(t,e);return Y.CMYK(r,n)}static toCMYKAObject(e,t={}){const r=$e(e);return it(e,r,t.decimals,G.CMYKA)}static toCMYKA(e,t={}){const r=Ce.toCMYKAObject(e,t),n=we(t,e);return Y.CMYK(r,n)}static getBlendHEXObject(e,t,r=5){return Gn(e,t,r,0,G.HEX)}static getBlendHEX(e,t,r=5){return Ce.getBlendHEXObject(e,t,r).map((n=>Y.HEX(n)))}static getBlendHEXAObject(e,t,r=5){return Gn(e,t,r,0,G.HEXA)}static getBlendHEXA(e,t,r=5){return Ce.getBlendHEXAObject(e,t,r).map((n=>Y.HEX(n)))}static getBlendRGBObject(e,t,r,n){return Be({from:e,to:t,thirdParameter:r,fourthParameter:n,translateFunction:G.RGB})}static getBlendRGB(e,t,r,n){return Be({from:e,to:t,thirdParameter:r,fourthParameter:n,translateFunction:G.RGB,cssFunction:Y.RGB})}static getBlendRGBAObject(e,t,r,n){return Be({from:e,to:t,thirdParameter:r,fourthParameter:n,translateFunction:G.RGBA})}static getBlendRGBA(e,t,r,n){return Be({from:e,to:t,thirdParameter:r,fourthParameter:n,translateFunction:G.RGBA,cssFunction:Y.RGB})}static getBlendHSLObject(e,t,r,n){return Be({from:e,to:t,thirdParameter:r,fourthParameter:n,translateFunction:G.HSL})}static getBlendHSL(e,t,r,n){return Be({from:e,to:t,thirdParameter:r,fourthParameter:n,translateFunction:G.HSL,cssFunction:Y.HSL})}static getBlendHSLAObject(e,t,r,n){return Be({from:e,to:t,thirdParameter:r,fourthParameter:n,translateFunction:G.HSLA})}static getBlendHSLA(e,t,r,n){return Be({from:e,to:t,thirdParameter:r,fourthParameter:n,translateFunction:G.HSLA,cssFunction:Y.HSL})}static getBlendHWBObject(e,t,r,n){return Be({from:e,to:t,thirdParameter:r,fourthParameter:n,translateFunction:G.HWB})}static getBlendHWB(e,t,r,n){return Be({from:e,to:t,thirdParameter:r,fourthParameter:n,translateFunction:G.HWB,cssFunction:Y.HWB})}static getBlendHWBAObject(e,t,r,n){return Be({from:e,to:t,thirdParameter:r,fourthParameter:n,translateFunction:G.HWBA})}static getBlendHWBA(e,t,r,n){return Be({from:e,to:t,thirdParameter:r,fourthParameter:n,translateFunction:G.HWBA,cssFunction:Y.HWB})}static getBlendCIELabObject(e,t,r,n){return Be({from:e,to:t,thirdParameter:r,fourthParameter:n,translateFunction:G.CIELab})}static getBlendCIELab(e,t,r,n){return Be({from:e,to:t,thirdParameter:r,fourthParameter:n,translateFunction:G.CIELab,cssFunction:Y.CIELab})}static getBlendCIELabAObject(e,t,r,n){return Be({from:e,to:t,thirdParameter:r,fourthParameter:n,translateFunction:G.CIELabA})}static getBlendCIELabA(e,t,r,n){return Be({from:e,to:t,thirdParameter:r,fourthParameter:n,translateFunction:G.CIELabA,cssFunction:Y.CIELab})}static getBlendLCHObject(e,t,r,n){return Be({from:e,to:t,thirdParameter:r,fourthParameter:n,translateFunction:G.LCH})}static getBlendLCH(e,t,r,n){return Be({from:e,to:t,thirdParameter:r,fourthParameter:n,translateFunction:G.LCH,cssFunction:Y.LCH})}static getBlendLCHAObject(e,t,r,n){return Be({from:e,to:t,thirdParameter:r,fourthParameter:n,translateFunction:G.LCHA})}static getBlendLCHA(e,t,r,n){return Be({from:e,to:t,thirdParameter:r,fourthParameter:n,translateFunction:G.LCHA,cssFunction:Y.LCH})}static getMixHEXObject(e,t=et.ADDITIVE){return ti.HEX(e,t,!1)}static getMixHEX(e,t=et.ADDITIVE){return ti.HEX(e,t,!0)}static getMixHEXAObject(e,t=et.ADDITIVE){return ti.HEXA(e,t,!1)}static getMixHEXA(e,t=et.ADDITIVE){return ti.HEXA(e,t,!0)}static getMixRGBObject(e,t,r){return ke({colors:e,secondParameter:t,thirdParameter:r,colorMixerFunction:qe.RGB,css:!1})}static getMixRGB(e,t,r){return ke({colors:e,secondParameter:t,thirdParameter:r,colorMixerFunction:qe.RGB,css:!0})}static getMixRGBAObject(e,t,r){return ke({colors:e,secondParameter:t,thirdParameter:r,colorMixerFunction:qe.RGBA,css:!1})}static getMixRGBA(e,t,r){return ke({colors:e,secondParameter:t,thirdParameter:r,colorMixerFunction:qe.RGBA,css:!0})}static getMixHSLObject(e,t,r){return ke({colors:e,secondParameter:t,thirdParameter:r,colorMixerFunction:qe.HSL,css:!1})}static getMixHSL(e,t,r){return ke({colors:e,secondParameter:t,thirdParameter:r,colorMixerFunction:qe.HSL,css:!0})}static getMixHSLAObject(e,t,r){return ke({colors:e,secondParameter:t,thirdParameter:r,colorMixerFunction:qe.HSLA,css:!1})}static getMixHSLA(e,t,r){return ke({colors:e,secondParameter:t,thirdParameter:r,colorMixerFunction:qe.HSLA,css:!0})}static getMixHWBObject(e,t,r){return ke({colors:e,secondParameter:t,thirdParameter:r,colorMixerFunction:qe.HWB,css:!1})}static getMixHWB(e,t,r){return ke({colors:e,secondParameter:t,thirdParameter:r,colorMixerFunction:qe.HWB,css:!0})}static getMixHWBAObject(e,t,r){return ke({colors:e,secondParameter:t,thirdParameter:r,colorMixerFunction:qe.HWBA,css:!1})}static getMixHWBA(e,t,r){return ke({colors:e,secondParameter:t,thirdParameter:r,colorMixerFunction:qe.HWBA,css:!0})}static getMixCIELabObject(e,t,r){return ke({colors:e,secondParameter:t,thirdParameter:r,colorMixerFunction:qe.CIELab,css:!1})}static getMixCIELab(e,t,r){return ke({colors:e,secondParameter:t,thirdParameter:r,colorMixerFunction:qe.CIELab,css:!0})}static getMixCIELabAObject(e,t,r){return ke({colors:e,secondParameter:t,thirdParameter:r,colorMixerFunction:qe.CIELabA,css:!1})}static getMixCIELabA(e,t,r){return ke({colors:e,secondParameter:t,thirdParameter:r,colorMixerFunction:qe.CIELabA,css:!0})}static getMixLCHObject(e,t,r){return ke({colors:e,secondParameter:t,thirdParameter:r,colorMixerFunction:qe.LCH,css:!1})}static getMixLCH(e,t,r){return ke({colors:e,secondParameter:t,thirdParameter:r,colorMixerFunction:qe.LCH,css:!0})}static getMixLCHAObject(e,t,r){return ke({colors:e,secondParameter:t,thirdParameter:r,colorMixerFunction:qe.LCHA,css:!1})}static getMixLCHA(e,t,r){return ke({colors:e,secondParameter:t,thirdParameter:r,colorMixerFunction:qe.LCHA,css:!0})}static getShades(e,t,r){return typeof t=="number"?hn(e,t,!0,we(r||{},e)):hn(e,5,!0,we(t||{},e))}static getTints(e,t,r){return typeof t=="number"?hn(e,t,!1,we(r||{},e)):hn(e,5,!1,we(t||{},e))}static getHarmony(e,t,r,n){return`${t}`in qt?_s(t,e,bs(r)?r:et.ADDITIVE,we(bs(r)?n||{}:r||{},e)):bs(t)?_s(qt.COMPLEMENTARY,e,t,we(r||{},e)):_s(qt.COMPLEMENTARY,e,et.ADDITIVE,we(t||{},e))}}const zy={slots:{root:"data-[disabled]:opacity-75",picker:"flex gap-4",selector:"rounded-md touch-none",selectorBackground:"w-full h-full relative rounded-md",selectorThumb:"-translate-y-1/2 -translate-x-1/2 absolute size-4 ring-2 ring-white rounded-full cursor-pointer data-[disabled]:cursor-not-allowed",track:"w-[8px] relative rounded-md touch-none",trackThumb:"absolute transform -translate-y-1/2 -translate-x-[4px] rtl:translate-x-[4px] size-4 rounded-full ring-2 ring-white cursor-pointer data-[disabled]:cursor-not-allowed"},variants:{size:{xs:{selector:"w-38 h-38",track:"h-38"},sm:{selector:"w-40 h-40",track:"h-40"},md:{selector:"w-42 h-42",track:"h-42"},lg:{selector:"w-44 h-44",track:"h-44"},xl:{selector:"w-46 h-46",track:"h-46"}}},compoundVariants:[],defaultVariants:{size:"md"}},Iy=["data-disabled"],Ty=["data-disabled"];function Py(i){const e=i.S*(i.L<50?i.L:100-i.L),t=i.L+e/100;return{h:i.H,s:i.L===0?i.S:2*e/t,v:t}}function zo(i){const e=(200-i.s)*i.v/100;return{H:i.h,S:e===0||e===200?0:Math.round(i.s*i.v/(e<=100?e:200-e)),L:e/2}}const Ry={__name:"UColorPicker",props:Pn({as:{type:null,required:!1},throttle:{type:Number,required:!1,default:50},disabled:{type:Boolean,required:!1},defaultValue:{type:String,required:!1,default:"#FFFFFF"},format:{type:String,required:!1,default:"hex"},size:{type:null,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1}},{modelValue:{type:String},modelModifiers:{}}),emits:["update:modelValue"],setup(i){const t=Re("colorPicker",i),r=ha(i,"modelValue",{type:String}),n=Me(),s=F(()=>de({extend:de(zy),...n.ui?.colorPicker||{}})({size:t.size})),a=F({get(){try{const B=new Ce(r.value||t.defaultValue);return Py(B.HSLObject)}catch{return{h:0,s:0,v:100}}},set(B){const k=new Ce(zo(B),{labUnit:"percent",cmykUnit:"percent",cmykFunction:"cmyk"});switch(t.format){case"rgb":r.value=k.RGB;break;case"hsl":r.value=k.HSL;break;case"cmyk":r.value=k.CMYK;break;case"lab":r.value=k.CIELab;break;default:r.value=k.HEX}}});function l(B,k,N="both",z={x:0,y:0},j){const W=T(z),J=T(),ie=io(B),O=io(k);function U(ce){if(qi(j))return ce.preventDefault();const te=qi(k);J.value={x:ce.clientX-(te?ce.clientX-O.left.value+te.scrollLeft:ie.left.value),y:ce.clientY-(te?ce.clientY-O.top.value+te.scrollTop:ie.top.value)},re(ce)}function re(ce){if(!J.value)return;const te=qi(k);let{x:fe,y:_t}=W.value;te&&(N==="x"||N==="both")&&(fe=Math.min(Math.max(0,(ce.clientX-J.value.x)/te.scrollWidth*100),100)),te&&(N==="y"||N==="both")&&(_t=Math.min(Math.max(0,(ce.clientY-J.value.y)/te.scrollHeight*100),100)),W.value={x:fe,y:_t}}function X(){J.value&&(J.value=void 0)}return Pi&&(vt(k,"pointerdown",U),vt(window,"pointermove",re),vt(window,"pointerup",X)),{position:W}}function u(B,k="left"){return k==="right"?B*100/360:B/100*360}function d(B){return 100-B}const c=T(null),p=T(null),f=T(null),m=T(null),h=F(()=>t.disabled),{position:g}=l(p,c,"both",{x:a.value.s,y:d(a.value.v)},h),{position:v}=l(m,f,"y",{x:0,y:u(a.value.h,"right")},h),{pause:b,resume:C}=Ed(a,B=>{g.value={x:B.s,y:d(B.v)},v.value={x:0,y:u(B.h,"right")}});Od([g,v],()=>{b(),a.value={h:u(v.value.y),s:g.value.x,v:d(g.value.y)},tt(C)},{throttle:()=>t.throttle});const x=F(()=>new Ce(zo({h:u(v.value.y),s:100,v:100})).HEX),A=F(()=>({backgroundColor:x.value})),q=F(()=>({backgroundColor:new Ce(r.value||t.defaultValue).HEX,left:`${g.value.x}%`,top:`${g.value.y}%`})),S=F(()=>({backgroundColor:x.value,top:`${v.value.y}%`}));return(B,k)=>(y(),_(o(se),{as:o(t).as,"data-slot":"root",class:I(s.value.root({class:[o(t).ui?.root,o(t).class]})),"data-disabled":h.value?!0:void 0},{default:w(()=>[D("div",{"data-slot":"picker",class:I(s.value.picker({class:o(t).ui?.picker}))},[D("div",{ref_key:"selectorRef",ref:c,"data-slot":"selector",class:I(s.value.selector({class:o(t).ui?.selector})),style:Et(A.value)},[D("div",{"data-slot":"selectorBackground",class:I(s.value.selectorBackground({class:o(t).ui?.selectorBackground})),"data-color-picker-background":""},[D("div",{ref_key:"selectorThumbRef",ref:p,"data-slot":"selectorThumb",class:I(s.value.selectorThumb({class:o(t).ui?.selectorThumb})),style:Et(q.value),"data-disabled":h.value?!0:void 0},null,14,Iy)],2)],6),D("div",{ref_key:"trackRef",ref:f,"data-slot":"track",class:I(s.value.track({class:o(t).ui?.track})),"data-color-picker-track":""},[D("div",{ref_key:"trackThumbRef",ref:m,"data-slot":"trackThumb",class:I(s.value.trackThumb({class:o(t).ui?.trackThumb})),style:Et(S.value),"data-disabled":h.value?!0:void 0},null,14,Ty)],2)],2)]),_:1},8,["as","class","data-disabled"]))}},Dy=wl(Ry,[["__scopeId","data-v-01917d4d"]]),mt={Root:ou,Trigger:lu,Portal:jh,Content:zh,Arrow:su,Item:$h,Group:Rh,Separator:Jh,CheckboxItem:qh,ItemIndicator:Hh,Label:Vh,RadioGroup:Gh,RadioItem:Xh,Sub:Qh,SubContent:tm,SubTrigger:im,Filter:Th},$y={Root:um,Trigger:vm,Portal:gm,Content:hm,Arrow:am},Ly={Root:uh,Trigger:Mh,Portal:Ah,Content:_h,Arrow:fh,Close:mh,Anchor:ch},Hy={slots:{content:"bg-default shadow-lg rounded-md ring ring-default data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] origin-(--reka-popover-content-transform-origin) focus:outline-none pointer-events-auto",arrow:"fill-bg stroke-default"}},Ny={__name:"UPopover",props:{mode:{type:null,required:!1,default:"click"},content:{type:Object,required:!1},arrow:{type:[Boolean,Object],required:!1},portal:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},reference:{type:null,required:!1},dismissible:{type:Boolean,required:!1,default:!0},class:{type:null,required:!1},ui:{type:null,required:!1},defaultOpen:{type:Boolean,required:!1},open:{type:Boolean,required:!1},modal:{type:Boolean,required:!1},openDelay:{type:Number,required:!1,default:0},closeDelay:{type:Number,required:!1,default:0}},emits:["close:prevent","update:open"],setup(i,{emit:e}){const t=i,r=e,n=Je(),s=Re("popover",t),a=Me(),l=s.mode==="hover"?zt(s,"defaultOpen","open","openDelay","closeDelay"):zt(s,"defaultOpen","open","modal"),u=Pt(l,r),d=hi(He(()=>s.portal)),c=He(()=>Ht(s.content,{side:"bottom",sideOffset:8,collisionPadding:8})),p=F(()=>s.dismissible?{pointerDownOutside:as}:["interactOutside","escapeKeyDown"].reduce((v,b)=>(v[b]=C=>{C.preventDefault(),r("close:prevent")},v),{})),f=He(()=>Ht(s.arrow,{rounded:!0})),m=F(()=>de({extend:de(Hy),...a.ui?.popover||{}})({side:c.value.side})),h=F(()=>s.mode==="hover"?$y:Ly);return(g,v)=>(y(),_(o(h).Root,oe(le(o(u))),{default:w(({open:b,close:C})=>[n.default||o(s).reference?(y(),_(o(h).Trigger,{key:0,"as-child":"",reference:o(s).reference,class:I(o(s).class)},{default:w(()=>[M(g.$slots,"default",{open:b})]),_:2},1032,["reference","class"])):R("",!0),"Anchor"in h.value&&n.anchor?(y(),_(o(h).Anchor,{key:1,"as-child":""},{default:w(()=>[M(g.$slots,"anchor",oe(le(C?{close:C}:{})))]),_:2},1024)):R("",!0),E(o(h).Portal,oe(le(o(d))),{default:w(()=>[E(o(mi),null,{default:w(()=>[E(o(h).Content,L(c.value,{"data-slot":"content",class:m.value.content({class:[!n.default&&o(s).class,o(s).ui?.content]})},Hi(p.value)),{default:w(()=>[M(g.$slots,"content",oe(le(C?{close:C}:{}))),o(s).arrow?(y(),_(o(h).Arrow,L({key:0},f.value,{"data-slot":"arrow",class:m.value.arrow({class:o(s).ui?.arrow})}),null,16,["class"])):R("",!0)]),_:2},1040,["class"])]),_:2},1024)]),_:2},1040)]),_:3},16))}},Vy=P({__name:"EditableColor",props:{modelValue:{}},emits:["update:modelValue"],setup(i,{emit:e}){const t=i,r=e,n=T(t.modelValue),s=()=>{r("update:modelValue",n.value)};return(a,l)=>{const u=ct,d=Dy,c=Ny;return y(),_(c,{onBlur:s},{content:w(()=>[E(d,{modelValue:n.value,"onUpdate:modelValue":[l[0]||(l[0]=p=>n.value=p),s],class:"p-2"},null,8,["modelValue"])]),default:w(()=>[E(u,{label:n.value,color:"neutral",size:"xs",variant:"soft"},{leading:w(()=>[D("span",{style:Et({backgroundColor:n.value}),class:"size-3 rounded-full"},null,4)]),_:1},8,["label"])]),_:1})}}}),Uy=Object.assign(Vy,{__name:"EditableColor"});function jy(){const{contains:i,startsWith:e}=Vd({sensitivity:"base"});function t(a,l){return i(a,l)?i(l,a)?0:e(a,l)?1:2:null}function r(a,l,u){if(typeof a!="object"||a===null)return t(String(a),l);let d=null;for(const c of u){const p=Qe(a,c);if(p==null)continue;const f=Array.isArray(p)?p.map(String):[String(p)];for(const m of f){const h=t(m,l);if(h!==null&&(d===null||h<d)&&(d=h),d===0)return 0}}return d}function n(a,l,u){if(!l)return a;const d=[];for(const c of a){const p=r(c,l,u);p!==null&&d.push({item:c,score:p})}return d.sort((c,p)=>c.score-p.score),d.map(({item:c})=>c)}function s(a,l,u){return l?a.map(d=>{const c=[];for(const p of d){if(p==null)continue;if(u.isStructural?.(p)){c.push({item:p,score:-1});continue}const f=r(p,l,u.fields);f!==null&&c.push({item:p,score:f})}return c.sort((p,f)=>p.score-f.score),c.map(({item:p})=>p)}).filter(d=>d.some(c=>!u.isStructural?.(c))):a}return{score:t,scoreItem:r,filter:n,filterGroups:s}}const Wy={slots:{root:"relative inline-flex items-center",base:["w-full rounded-md border-0 appearance-none placeholder:text-dimmed focus:outline-none disabled:cursor-not-allowed disabled:opacity-75","transition-colors"],leading:"absolute inset-y-0 start-0 flex items-center",leadingIcon:"shrink-0 text-dimmed",leadingAvatar:"shrink-0",leadingAvatarSize:"",trailing:"absolute inset-y-0 end-0 flex items-center",trailingIcon:"shrink-0 text-dimmed"},variants:{fieldGroup:{horizontal:{root:"group has-focus-visible:z-[1]",base:"group-not-only:group-first:rounded-e-none group-not-only:group-last:rounded-s-none group-not-last:group-not-first:rounded-none"},vertical:{root:"group has-focus-visible:z-[1]",base:"group-not-only:group-first:rounded-b-none group-not-only:group-last:rounded-t-none group-not-last:group-not-first:rounded-none"}},size:{xs:{base:"px-2 py-1 text-sm/4 gap-1",leading:"ps-2",trailing:"pe-2",leadingIcon:"size-4",leadingAvatarSize:"3xs",trailingIcon:"size-4"},sm:{base:"px-2.5 py-1.5 text-sm/4 gap-1.5",leading:"ps-2.5",trailing:"pe-2.5",leadingIcon:"size-4",leadingAvatarSize:"3xs",trailingIcon:"size-4"},md:{base:"px-2.5 py-1.5 text-base/5 gap-1.5",leading:"ps-2.5",trailing:"pe-2.5",leadingIcon:"size-5",leadingAvatarSize:"2xs",trailingIcon:"size-5"},lg:{base:"px-3 py-2 text-base/5 gap-2",leading:"ps-3",trailing:"pe-3",leadingIcon:"size-5",leadingAvatarSize:"2xs",trailingIcon:"size-5"},xl:{base:"px-3 py-2 text-base gap-2",leading:"ps-3",trailing:"pe-3",leadingIcon:"size-6",leadingAvatarSize:"xs",trailingIcon:"size-6"}},variant:{outline:"text-highlighted bg-default ring ring-inset ring-accented",soft:"text-highlighted bg-elevated/50 hover:bg-elevated focus:bg-elevated disabled:bg-elevated/50",subtle:"text-highlighted bg-elevated ring ring-inset ring-accented",ghost:"text-highlighted bg-transparent hover:bg-elevated focus:bg-elevated disabled:bg-transparent dark:disabled:bg-transparent",none:"text-highlighted bg-transparent"},color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},leading:{true:""},trailing:{true:""},loading:{true:""},highlight:{true:""},fixed:{false:""},type:{file:"file:me-1.5 file:font-medium file:text-muted file:outline-none"}},compoundVariants:[{color:"primary",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary"},{color:"secondary",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-secondary"},{color:"success",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-success"},{color:"info",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-info"},{color:"warning",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-warning"},{color:"error",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-error"},{color:"primary",highlight:!0,class:"ring ring-inset ring-primary"},{color:"secondary",highlight:!0,class:"ring ring-inset ring-secondary"},{color:"success",highlight:!0,class:"ring ring-inset ring-success"},{color:"info",highlight:!0,class:"ring ring-inset ring-info"},{color:"warning",highlight:!0,class:"ring ring-inset ring-warning"},{color:"error",highlight:!0,class:"ring ring-inset ring-error"},{color:"neutral",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-inverted"},{color:"neutral",highlight:!0,class:"ring ring-inset ring-inverted"},{leading:!0,size:"xs",class:"ps-7"},{leading:!0,size:"sm",class:"ps-8"},{leading:!0,size:"md",class:"ps-9"},{leading:!0,size:"lg",class:"ps-10"},{leading:!0,size:"xl",class:"ps-11"},{trailing:!0,size:"xs",class:"pe-7"},{trailing:!0,size:"sm",class:"pe-8"},{trailing:!0,size:"md",class:"pe-9"},{trailing:!0,size:"lg",class:"pe-10"},{trailing:!0,size:"xl",class:"pe-11"},{loading:!0,leading:!0,class:{leadingIcon:"animate-spin"}},{loading:!0,leading:!1,trailing:!0,class:{trailingIcon:"animate-spin"}},{fixed:!1,size:"xs",class:"md:text-xs"},{fixed:!1,size:"sm",class:"md:text-xs"},{fixed:!1,size:"md",class:"md:text-sm"},{fixed:!1,size:"lg",class:"md:text-sm"}],defaultVariants:{size:"md",color:"primary",variant:"outline"}},Gy=["id","type","value","name","placeholder","disabled","required","autocomplete"],$u=Object.assign({inheritAttrs:!1},{__name:"UInput",props:{as:{type:null,required:!1},id:{type:String,required:!1},name:{type:String,required:!1},type:{type:null,required:!1,default:"text"},placeholder:{type:String,required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},required:{type:Boolean,required:!1},autocomplete:{type:[String,Object],required:!1,default:"off"},autofocus:{type:Boolean,required:!1},autofocusDelay:{type:Number,required:!1,default:0},disabled:{type:Boolean,required:!1},highlight:{type:Boolean,required:!1},fixed:{type:Boolean,required:!1},modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},modelModifiers:{type:null,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1},icon:{type:null,required:!1},avatar:{type:Object,required:!1},leading:{type:Boolean,required:!1},leadingIcon:{type:null,required:!1},trailing:{type:Boolean,required:!1},trailingIcon:{type:null,required:!1},loading:{type:Boolean,required:!1},loadingIcon:{type:null,required:!1}},emits:["update:modelValue","blur","change"],setup(i,{expose:e,emit:t}){const r=i,n=t,s=Je(),a=Re("input",r),l=We(a,"modelValue",n,{defaultValue:a.defaultValue}),u=Me(),{emitFormBlur:d,emitFormInput:c,emitFormChange:p,size:f,color:m,id:h,name:g,highlight:v,disabled:b,emitFormFocus:C,ariaAttrs:x}=ga(r,{deferInputValidation:!0}),{orientation:A,size:q}=ma(r),{isLeading:S,isTrailing:B,leadingIconName:k,trailingIconName:N}=_l(a),z=F(()=>q.value||f.value),j=F(()=>de({extend:de(Wy),...u.ui?.input||{}})({type:a.type,color:m.value??a.color,variant:a.variant,size:z?.value??a.size,loading:a.loading,highlight:v.value??a.highlight,fixed:a.fixed,leading:S.value||!!a.avatar||!!s.leading,trailing:B.value||!!s.trailing,fieldGroup:A.value})),W=Cl("inputRef");function J(X){a.modelModifiers?.trim&&(typeof X=="string"||X===null||X===void 0)&&(X=X?.trim()??null),(a.modelModifiers?.number||a.type==="number")&&(X=zd(X)),a.modelModifiers?.nullable&&(X||=null),a.modelModifiers?.optional&&!a.modelModifiers?.nullable&&X!==null&&(X||=void 0),l.value=X,c()}function ie(X){a.modelModifiers?.lazy||J(X.target.value)}function O(X){const ce=X.target.value;a.modelModifiers?.lazy&&J(ce),a.modelModifiers?.trim&&(X.target.value=ce.trim()),p(),n("change",X)}function U(X){d(),n("blur",X)}function re(){a.autofocus&&W.value?.focus()}return Ne(()=>{setTimeout(()=>{re()},a.autofocusDelay)}),e({inputRef:W}),(X,ce)=>(y(),_(o(se),{as:o(a).as,"data-slot":"root",class:I(j.value.root({class:[o(a).ui?.root,o(a).class]}))},{default:w(()=>[D("input",L({id:o(h),ref_key:"inputRef",ref:W,type:o(a).type,value:o(l),name:o(g),placeholder:o(a).placeholder,"data-slot":"base",class:j.value.base({class:o(a).ui?.base}),disabled:o(b),required:o(a).required,autocomplete:o(a).autocomplete},{...X.$attrs,...o(x)},{onInput:ie,onBlur:U,onChange:O,onFocus:ce[0]||(ce[0]=(...te)=>o(C)&&o(C)(...te))}),null,16,Gy),M(X.$slots,"default",{ui:j.value}),o(S)||o(a).avatar||s.leading?(y(),V("span",{key:0,"data-slot":"leading",class:I(j.value.leading({class:o(a).ui?.leading}))},[M(X.$slots,"leading",{ui:j.value},()=>[o(S)&&o(k)?(y(),_(Ae,{key:0,name:o(k),"data-slot":"leadingIcon",class:I(j.value.leadingIcon({class:o(a).ui?.leadingIcon}))},null,8,["name","class"])):o(a).avatar?(y(),_(gi,L({key:1,size:o(a).ui?.leadingAvatarSize||j.value.leadingAvatarSize()},o(a).avatar,{"data-slot":"leadingAvatar",class:j.value.leadingAvatar({class:o(a).ui?.leadingAvatar})}),null,16,["size","class"])):R("",!0)])],2)):R("",!0),o(B)||s.trailing?(y(),V("span",{key:1,"data-slot":"trailing",class:I(j.value.trailing({class:o(a).ui?.trailing}))},[M(X.$slots,"trailing",{ui:j.value},()=>[o(N)?(y(),_(Ae,{key:0,name:o(N),"data-slot":"trailingIcon",class:I(j.value.trailingIcon({class:o(a).ui?.trailingIcon}))},null,8,["name","class"])):R("",!0)])],2)):R("",!0)]),_:3},8,["as","class"]))}}),Lu={__name:"UDropdownMenuContent",props:{items:{type:null,required:!1},portal:{type:[Boolean,String],required:!1,skipCheck:!0},sub:{type:Boolean,required:!1},labelKey:{type:null,required:!0},descriptionKey:{type:null,required:!0},checkedIcon:{type:null,required:!1},loadingIcon:{type:null,required:!1},externalIcon:{type:[Boolean,String],required:!1,skipCheck:!0},size:{type:null,required:!1},filter:{type:[Boolean,Object],required:!1},filterFields:{type:Array,required:!1},ignoreFilter:{type:Boolean,required:!1},searchTerm:{type:String,required:!1},class:{type:null,required:!1},ui:{type:null,required:!0},uiOverride:{type:null,required:!1},loop:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1}},emits:["update:searchTerm","escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(i,{emit:e}){const t=i,r=e,n=Je(),{t:s,dir:a}=zr(),l=Me(),{filterGroups:u}=jy(),d=T(""),c=F({get:()=>t.searchTerm??d.value,set:S=>{d.value=S,r("update:searchTerm",S)}}),p=He(()=>Ht(t.filter,{placeholder:s("dropdownMenu.search"),variant:"none"})),f=hi(He(()=>t.portal)),m=ot(fi(t,"sub","items","portal","labelKey","descriptionKey","checkedIcon","loadingIcon","externalIcon","size","filter","filterFields","ignoreFilter","searchTerm","class","ui","uiOverride"),r),h=()=>Sl(n,["default"]),[g,v]=ii(),b=F(()=>a.value==="rtl"?l.ui.icons.chevronLeft:l.ui.icons.chevronRight),C=F(()=>t.items?.length?Pd(t.items)?t.items:[t.items]:[]),x=S=>!!S.type&&["label","separator"].includes(S.type),A=F(()=>{if(!t.filter||t.ignoreFilter||!c.value)return C.value;const S=Array.isArray(t.filterFields)&&t.filterFields.length?t.filterFields:[t.labelKey];return u(C.value,c.value,{fields:S,isStructural:x})}),q=F(()=>A.value.some(S=>S.some(B=>!x(B))));return(S,B)=>(y(),V(ve,null,[E(o(g),null,{default:w(({item:k,active:N,index:z})=>[M(S.$slots,k.slot||"item",{item:k,index:z,ui:i.ui},()=>[M(S.$slots,k.slot?`${k.slot}-leading`:"item-leading",{item:k,active:N,index:z,ui:i.ui},()=>[k.loading?(y(),_(Ae,{key:0,name:i.loadingIcon||o(l).ui.icons.loading,"data-slot":"itemLeadingIcon",class:I(i.ui.itemLeadingIcon({class:[i.uiOverride?.itemLeadingIcon,k.ui?.itemLeadingIcon],color:k?.color,loading:!0}))},null,8,["name","class"])):k.icon?(y(),_(Ae,{key:1,name:k.icon,"data-slot":"itemLeadingIcon",class:I(i.ui.itemLeadingIcon({class:[i.uiOverride?.itemLeadingIcon,k.ui?.itemLeadingIcon],color:k?.color,active:N}))},null,8,["name","class"])):k.avatar?(y(),_(gi,L({key:2,size:k.ui?.itemLeadingAvatarSize||i.uiOverride?.itemLeadingAvatarSize||i.ui.itemLeadingAvatarSize()},k.avatar,{"data-slot":"itemLeadingAvatar",class:i.ui.itemLeadingAvatar({class:[i.uiOverride?.itemLeadingAvatar,k.ui?.itemLeadingAvatar],active:N})}),null,16,["size","class"])):R("",!0)]),o(Qe)(k,t.labelKey)||n[k.slot?`${k.slot}-label`:"item-label"]||o(Qe)(k,t.descriptionKey)||n[k.slot?`${k.slot}-description`:"item-description"]?(y(),V("span",{key:0,"data-slot":"itemWrapper",class:I(i.ui.itemWrapper({class:[i.uiOverride?.itemWrapper,k.ui?.itemWrapper]}))},[D("span",{"data-slot":"itemLabel",class:I(i.ui.itemLabel({class:[i.uiOverride?.itemLabel,k.ui?.itemLabel],active:N}))},[M(S.$slots,k.slot?`${k.slot}-label`:"item-label",{item:k,active:N,index:z},()=>[ue(ee(o(Qe)(k,t.labelKey)),1)]),k.target==="_blank"&&i.externalIcon!==!1?(y(),_(Ae,{key:0,name:typeof i.externalIcon=="string"?i.externalIcon:o(l).ui.icons.external,"data-slot":"itemLabelExternalIcon",class:I(i.ui.itemLabelExternalIcon({class:[i.uiOverride?.itemLabelExternalIcon,k.ui?.itemLabelExternalIcon],color:k?.color,active:N}))},null,8,["name","class"])):R("",!0)],2),o(Qe)(k,t.descriptionKey)||n[k.slot?`${k.slot}-description`:"item-description"]?(y(),V("span",{key:0,"data-slot":"itemDescription",class:I(i.ui.itemDescription({class:[i.uiOverride?.itemDescription,k.ui?.itemDescription]}))},[M(S.$slots,k.slot?`${k.slot}-description`:"item-description",{item:k,active:N,index:z},()=>[ue(ee(o(Qe)(k,t.descriptionKey)),1)])],2)):R("",!0)],2)):R("",!0),D("span",{"data-slot":"itemTrailing",class:I(i.ui.itemTrailing({class:[i.uiOverride?.itemTrailing,k.ui?.itemTrailing]}))},[M(S.$slots,k.slot?`${k.slot}-trailing`:"item-trailing",{item:k,active:N,index:z,ui:i.ui},()=>[k.children?.length?(y(),_(Ae,{key:0,name:b.value,"data-slot":"itemTrailingIcon",class:I(i.ui.itemTrailingIcon({class:[i.uiOverride?.itemTrailingIcon,k.ui?.itemTrailingIcon],color:k?.color,active:N}))},null,8,["name","class"])):k.kbds?.length?(y(),V("span",{key:1,"data-slot":"itemTrailingKbds",class:I(i.ui.itemTrailingKbds({class:[i.uiOverride?.itemTrailingKbds,k.ui?.itemTrailingKbds]}))},[(y(!0),V(ve,null,Xe(k.kbds,(j,W)=>(y(),_(yu,L({key:W,size:k.ui?.itemTrailingKbdsSize||i.uiOverride?.itemTrailingKbdsSize||i.ui.itemTrailingKbdsSize()},{ref_for:!0},typeof j=="string"?{value:j}:j),null,16,["size"]))),128))],2)):R("",!0)]),E(o(mt).ItemIndicator,{"as-child":""},{default:w(()=>[E(Ae,{name:i.checkedIcon||o(l).ui.icons.check,"data-slot":"itemTrailingIcon",class:I(i.ui.itemTrailingIcon({class:[i.uiOverride?.itemTrailingIcon,k.ui?.itemTrailingIcon],color:k?.color}))},null,8,["name","class"])]),_:2},1024)],2)])]),_:3}),E(o(mt).Portal,oe(le(o(f))),{default:w(()=>[E(o(mi),null,{default:w(()=>[(y(),_(pi(i.sub?o(mt).SubContent:o(mt).Content),L({"data-slot":"content",class:i.ui.content({class:[i.uiOverride?.content,t.class]})},o(m)),{default:w(()=>[i.filter?(y(),_(o(mt).Filter,{key:0,modelValue:c.value,"onUpdate:modelValue":B[1]||(B[1]=k=>c.value=k),"as-child":""},{default:w(()=>[E($u,L({autofocus:"",autocomplete:"off",size:i.size},p.value,{"data-slot":"input",class:i.ui.input({class:i.uiOverride?.input}),onChange:B[0]||(B[0]=ye(()=>{},["stop"]))}),null,16,["size","class"])]),_:1},8,["modelValue"])):R("",!0),M(S.$slots,"content-top",{sub:i.sub??!1}),!c.value||q.value?(y(),V("div",{key:1,role:"presentation","data-slot":"viewport",class:I(i.ui.viewport({class:i.uiOverride?.viewport}))},[(y(!0),V(ve,null,Xe(A.value,(k,N)=>(y(),_(o(mt).Group,{key:`group-${N}`,"data-slot":"group",class:I(i.ui.group({class:i.uiOverride?.group}))},{default:w(()=>[(y(!0),V(ve,null,Xe(k,(z,j)=>(y(),V(ve,{key:`group-${N}-${j}`},[z.type==="label"?(y(),_(o(mt).Label,{key:0,"data-slot":"label",class:I(i.ui.label({class:[i.uiOverride?.label,z.ui?.label,z.class]}))},{default:w(()=>[E(o(v),{item:z,index:j},null,8,["item","index"])]),_:2},1032,["class"])):z.type==="separator"?(y(),_(o(mt).Separator,{key:1,"data-slot":"separator",class:I(i.ui.separator({class:[i.uiOverride?.separator,z.ui?.separator,z.class]}))},null,8,["class"])):z?.children?.length?(y(),_(o(mt).Sub,{key:2,open:z.open,"default-open":z.defaultOpen},{default:w(()=>[E(o(mt).SubTrigger,{as:"button",type:"button",disabled:z.disabled,"text-value":o(Qe)(z,t.labelKey),"data-slot":"item",class:I(i.ui.item({class:[i.uiOverride?.item,z.ui?.item,z.class],color:z?.color}))},{default:w(()=>[E(o(v),{item:z,index:j},null,8,["item","index"])]),_:2},1032,["disabled","text-value","class"]),E(Lu,L({sub:"",class:z.ui?.content,ui:i.ui,"ui-override":i.uiOverride,portal:i.portal,items:z.children,align:"start","align-offset":-4,"side-offset":3,"label-key":i.labelKey,"description-key":i.descriptionKey,"checked-icon":i.checkedIcon,"loading-icon":i.loadingIcon,"external-icon":i.externalIcon,size:i.size,filter:z.filter,"filter-fields":z.filterFields||i.filterFields,"ignore-filter":z.ignoreFilter??i.ignoreFilter},{ref_for:!0},z.content),Al({_:2},[Xe(h(),(W,J)=>({name:J,fn:w(ie=>[M(S.$slots,J,L({ref_for:!0},ie))])}))]),1040,["class","ui","ui-override","portal","items","label-key","description-key","checked-icon","loading-icon","external-icon","size","filter","filter-fields","ignore-filter"])]),_:2},1032,["open","default-open"])):z.type==="checkbox"?(y(),_(o(mt).CheckboxItem,{key:3,"model-value":z.checked,disabled:z.disabled,"text-value":o(Qe)(z,t.labelKey),"data-slot":"item",class:I(i.ui.item({class:[i.uiOverride?.item,z.ui?.item,z.class],color:z?.color})),"onUpdate:modelValue":z.onUpdateChecked,onSelect:z.onSelect},{default:w(()=>[E(o(v),{item:z,index:j},null,8,["item","index"])]),_:2},1032,["model-value","disabled","text-value","class","onUpdate:modelValue","onSelect"])):(y(),_(xl,L({key:4,ref_for:!0},o(Id)(z),{custom:""}),{default:w(({active:W,...J})=>[E(o(mt).Item,{"as-child":"",disabled:z.disabled,"text-value":o(Qe)(z,t.labelKey),onSelect:z.onSelect},{default:w(()=>[E(Td,L({ref_for:!0},J,{"data-slot":"item",class:i.ui.item({class:[i.uiOverride?.item,z.ui?.item,z.class],color:z?.color,active:W})}),{default:w(()=>[E(o(v),{item:z,active:W,index:j},null,8,["item","active","index"])]),_:2},1040,["class"])]),_:2},1032,["disabled","text-value","onSelect"])]),_:2},1040))],64))),128))]),_:2},1032,["class"]))),128))],2)):R("",!0),c.value&&!q.value?(y(),V("div",{key:2,"data-slot":"empty",class:I(i.ui.empty({class:i.uiOverride?.empty}))},[M(S.$slots,"empty",{searchTerm:c.value},()=>[ue(ee(o(s)("dropdownMenu.noMatch",{searchTerm:c.value})),1)])],2)):R("",!0),M(S.$slots,"default"),M(S.$slots,"content-bottom",{sub:i.sub??!1})]),_:3},16,["class"]))]),_:3})]),_:3},16)],64))}},Ky={slots:{content:"min-w-32 max-h-(--reka-dropdown-menu-content-available-height) bg-default shadow-lg rounded-md ring ring-default overflow-hidden data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] origin-(--reka-dropdown-menu-content-transform-origin) flex flex-col",input:"border-b border-default",empty:"text-center text-muted",viewport:"relative divide-y divide-default scroll-py-1 overflow-y-auto flex-1",arrow:"fill-bg stroke-default",group:"p-1 isolate",label:"w-full flex items-center font-semibold text-highlighted",separator:"-mx-1 my-1 h-px bg-border",item:"group relative w-full flex items-start select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-md data-disabled:cursor-not-allowed data-disabled:opacity-75",itemLeadingIcon:"shrink-0",itemLeadingAvatar:"shrink-0",itemLeadingAvatarSize:"",itemTrailing:"ms-auto inline-flex gap-1.5 items-center",itemTrailingIcon:"shrink-0",itemTrailingKbds:"hidden lg:inline-flex items-center shrink-0",itemTrailingKbdsSize:"",itemWrapper:"flex-1 flex flex-col text-start min-w-0",itemLabel:"truncate",itemDescription:"truncate text-muted",itemLabelExternalIcon:"inline-block size-3 align-top text-dimmed"},variants:{color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},active:{true:{item:"text-highlighted before:bg-elevated",itemLeadingIcon:"text-default"},false:{item:["text-default data-highlighted:text-highlighted data-[state=open]:text-highlighted data-highlighted:before:bg-elevated/50 data-[state=open]:before:bg-elevated/50","transition-colors before:transition-colors"],itemLeadingIcon:["text-dimmed group-data-highlighted:text-default group-data-[state=open]:text-default","transition-colors"]}},loading:{true:{itemLeadingIcon:"animate-spin"}},size:{xs:{label:"p-1 text-xs gap-1",item:"p-1 text-xs gap-1",empty:"p-2 text-xs",itemLeadingIcon:"size-4",itemLeadingAvatarSize:"3xs",itemTrailingIcon:"size-4",itemTrailingKbds:"gap-0.5",itemTrailingKbdsSize:"sm"},sm:{label:"p-1.5 text-xs gap-1.5",item:"p-1.5 text-xs gap-1.5",empty:"p-2.5 text-xs",itemLeadingIcon:"size-4",itemLeadingAvatarSize:"3xs",itemTrailingIcon:"size-4",itemTrailingKbds:"gap-0.5",itemTrailingKbdsSize:"sm"},md:{label:"p-1.5 text-sm gap-1.5",item:"p-1.5 text-sm gap-1.5",empty:"p-2.5 text-sm",itemLeadingIcon:"size-5",itemLeadingAvatarSize:"2xs",itemTrailingIcon:"size-5",itemTrailingKbds:"gap-0.5",itemTrailingKbdsSize:"md"},lg:{label:"p-2 text-sm gap-2",item:"p-2 text-sm gap-2",empty:"p-3 text-sm",itemLeadingIcon:"size-5",itemLeadingAvatarSize:"2xs",itemTrailingIcon:"size-5",itemTrailingKbds:"gap-1",itemTrailingKbdsSize:"md"},xl:{label:"p-2 text-base gap-2",item:"p-2 text-base gap-2",empty:"p-3 text-base",itemLeadingIcon:"size-6",itemLeadingAvatarSize:"xs",itemTrailingIcon:"size-6",itemTrailingKbds:"gap-1",itemTrailingKbdsSize:"lg"}}},compoundVariants:[{color:"primary",active:!1,class:{item:"text-primary data-highlighted:text-primary data-highlighted:before:bg-primary/10 data-[state=open]:before:bg-primary/10",itemLeadingIcon:"text-primary/75 group-data-highlighted:text-primary group-data-[state=open]:text-primary"}},{color:"secondary",active:!1,class:{item:"text-secondary data-highlighted:text-secondary data-highlighted:before:bg-secondary/10 data-[state=open]:before:bg-secondary/10",itemLeadingIcon:"text-secondary/75 group-data-highlighted:text-secondary group-data-[state=open]:text-secondary"}},{color:"success",active:!1,class:{item:"text-success data-highlighted:text-success data-highlighted:before:bg-success/10 data-[state=open]:before:bg-success/10",itemLeadingIcon:"text-success/75 group-data-highlighted:text-success group-data-[state=open]:text-success"}},{color:"info",active:!1,class:{item:"text-info data-highlighted:text-info data-highlighted:before:bg-info/10 data-[state=open]:before:bg-info/10",itemLeadingIcon:"text-info/75 group-data-highlighted:text-info group-data-[state=open]:text-info"}},{color:"warning",active:!1,class:{item:"text-warning data-highlighted:text-warning data-highlighted:before:bg-warning/10 data-[state=open]:before:bg-warning/10",itemLeadingIcon:"text-warning/75 group-data-highlighted:text-warning group-data-[state=open]:text-warning"}},{color:"error",active:!1,class:{item:"text-error data-highlighted:text-error data-highlighted:before:bg-error/10 data-[state=open]:before:bg-error/10",itemLeadingIcon:"text-error/75 group-data-highlighted:text-error group-data-[state=open]:text-error"}},{color:"primary",active:!0,class:{item:"text-primary before:bg-primary/10",itemLeadingIcon:"text-primary"}},{color:"secondary",active:!0,class:{item:"text-secondary before:bg-secondary/10",itemLeadingIcon:"text-secondary"}},{color:"success",active:!0,class:{item:"text-success before:bg-success/10",itemLeadingIcon:"text-success"}},{color:"info",active:!0,class:{item:"text-info before:bg-info/10",itemLeadingIcon:"text-info"}},{color:"warning",active:!0,class:{item:"text-warning before:bg-warning/10",itemLeadingIcon:"text-warning"}},{color:"error",active:!0,class:{item:"text-error before:bg-error/10",itemLeadingIcon:"text-error"}}],defaultVariants:{size:"md"}},Hu={__name:"UDropdownMenu",props:Pn({size:{type:null,required:!1},items:{type:null,required:!1},checkedIcon:{type:null,required:!1},loadingIcon:{type:null,required:!1},externalIcon:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},content:{type:Object,required:!1},arrow:{type:[Boolean,Object],required:!1},portal:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},labelKey:{type:null,required:!1,default:"label"},descriptionKey:{type:null,required:!1,default:"description"},filter:{type:[Boolean,Object],required:!1,default:!1},filterFields:{type:Array,required:!1},ignoreFilter:{type:Boolean,required:!1,default:!1},disabled:{type:Boolean,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1},defaultOpen:{type:Boolean,required:!1},open:{type:Boolean,required:!1},modal:{type:Boolean,required:!1,default:!0}},{searchTerm:{type:String,default:""},searchTermModifiers:{}}),emits:Pn(["update:open"],["update:searchTerm"]),setup(i,{emit:e}){const t=i,r=e,n=Je(),s=ha(i,"searchTerm",{type:String,default:""}),a=Re("dropdownMenu",t),l=Me(),u=Pt(zt(a,"defaultOpen","open","modal"),r),d=He(()=>Ht(a.content,{side:"bottom",sideOffset:8,collisionPadding:8})),c=He(()=>Ht(a.arrow,{rounded:!0})),p=()=>Sl(n,["default"]),f=F(()=>de({extend:de(Ky),...l.ui?.dropdownMenu||{}})({size:a.size}));return(m,h)=>(y(),_(o(ou),oe(le(o(u))),{default:w(({open:g})=>[n.default?(y(),_(o(lu),{key:0,"as-child":"",class:I(o(a).class),disabled:o(a).disabled},{default:w(()=>[M(m.$slots,"default",{open:g})]),_:2},1032,["class","disabled"])):R("",!0),E(Lu,L({"search-term":s.value,"onUpdate:searchTerm":h[0]||(h[0]=v=>s.value=v),class:f.value.content({class:[!n.default&&o(a).class,o(a).ui?.content]}),ui:f.value,"ui-override":o(a).ui},d.value,{items:o(a).items,portal:o(a).portal,"label-key":o(a).labelKey,"description-key":o(a).descriptionKey,"checked-icon":o(a).checkedIcon,"loading-icon":o(a).loadingIcon,"external-icon":o(a).externalIcon,size:o(a).size,filter:o(a).filter,"filter-fields":o(a).filterFields,"ignore-filter":o(a).ignoreFilter}),Al({default:w(()=>[o(a).arrow?(y(),_(o(su),L({key:0},c.value,{"data-slot":"arrow",class:f.value.arrow({class:o(a).ui?.arrow})}),null,16,["class"])):R("",!0)]),_:2},[Xe(p(),(v,b)=>({name:b,fn:w(C=>[M(m.$slots,b,oe(le(C)))])}))]),1040,["search-term","class","ui","ui-override","items","portal","label-key","description-key","checked-icon","loading-icon","external-icon","size","filter","filter-fields","ignore-filter"])]),_:3},16))}},Io=async i=>{try{await navigator.clipboard.writeText(i)}catch(e){console.error("Failed to copy path:",e)}},Nu=async i=>{try{const e=`:${i.path.replace(/\./g,"-")}="${JSON.stringify(i.value)}"`;await navigator.clipboard.writeText(e)}catch(e){console.error("Failed to copy prop:",e)}},Xy=async i=>{try{const e=i.children?.map(r=>r.value)||[],t=`:${i.path.replace(/\./g,"-")}='[${e.map(r=>typeof r=="string"?`"${r}"`:r).join(", ")}]'`;await navigator.clipboard.writeText(t)}catch(e){console.error("Failed to copy prop as array:",e)}},Vu=async i=>{try{const e=JSON.stringify(i);await navigator.clipboard.writeText(e)}catch(e){console.error("Failed to copy value:",e)}},Uu=async i=>{try{if(!i.children||i.children.length<3)return;await navigator.clipboard.writeText(`new Vector3(${i.children[0].value}, ${i.children[1].value}, ${i.children[2].value})`)}catch(e){console.error("Failed to copy prop as Vector3:",e)}},Yy=async i=>{try{const t=`[${(i.children?.map(r=>r.value)||[]).map(r=>typeof r=="string"?`"${r}"`:r).join(", ")}]`;await navigator.clipboard.writeText(t)}catch(e){console.error("Failed to copy prop as array:",e)}},Jy=async i=>{try{let e={};i.children&&i.children.length>0&&(e=i.children.reduce((t,r)=>(t[r.label]=r.value,t),{})),await navigator.clipboard.writeText(JSON.stringify(e,null,2))}catch(e){console.error("Failed to copy value as JSON:",e)}},ju=async i=>{try{const e=i.children?.find(d=>d.label==="x"),t=i.children?.find(d=>d.label==="y"),r=i.children?.find(d=>d.label==="z"),n=i.children?.find(d=>d.label==="order"),s=e?.value||0,a=t?.value||0,l=r?.value||0,u=n?.value||"XYZ";await navigator.clipboard.writeText(`new Euler(${s}, ${a}, ${l}, '${u}')`)}catch(e){console.error("Failed to copy value as Euler:",e)}},Wu=async i=>{try{const e=i.children?.find(d=>d.label==="x"),t=i.children?.find(d=>d.label==="y"),r=i.children?.find(d=>d.label==="z"),n=i.children?.find(d=>d.label==="w"),s=e?.value||0,a=t?.value||0,l=r?.value||0,u=n?.value||1;await navigator.clipboard.writeText(`new Quaternion(${s}, ${a}, ${l}, ${u})`)}catch(e){console.error("Failed to copy value as Quaternion:",e)}};function Zy(i){let e=0,t=i;return i.scene&&(t=i.scene),t.traverse(r=>{if(r.isMesh&&r.geometry){const n=r.geometry,s=n.attributes.position.count*3*Float32Array.BYTES_PER_ELEMENT,a=n.index?n.index.count*Uint32Array.BYTES_PER_ELEMENT:0,l=n.attributes.normal?n.attributes.normal.count*3*Float32Array.BYTES_PER_ELEMENT:0,u=n.attributes.uv?n.attributes.uv.count*2*Float32Array.BYTES_PER_ELEMENT:0,d=s+a+l+u;e+=d}}),e}function Qy(i){return(i/1024).toFixed(2)}const Gu="184",ua=0,ev=1,tv=2,To=1,Po=100,Ro=204,Do=205,$o=3,rv=0,Ku=300,Lo=1e3,mn=1001,Ho=1002,iv=1006,nv=1008,sv=1009,av=1015,ov=1023,Xu="",kt="srgb",No="srgb-linear",Vo="linear",Cs="srgb",Nr=7680,Uo=519,jo=35044,gn=2e3,Wo=2001;function lv(i){for(let e=i.length-1;e>=0;--e)if(i[e]>=65535)return!0;return!1}function Go(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}const Ko={};function Yu(i){const e=i[0];if(typeof e=="string"&&e.startsWith("TSL:")){const t=i[1];t&&t.isStackTrace?i[0]+=" "+t.getLocation():i[1]='Stack trace not available. Enable "THREE.Node.captureStackTrace" to capture stack traces.'}return i}function Ye(...i){i=Yu(i);const e="THREE."+i.shift();{const t=i[0];t&&t.isStackTrace?console.warn(t.getError(e)):console.warn(e,...i)}}function Mr(...i){i=Yu(i);const e="THREE."+i.shift();{const t=i[0];t&&t.isStackTrace?console.error(t.getError(e)):console.error(e,...i)}}function Xo(...i){const e=i.join(" ");e in Ko||(Ko[e]=!0,Ye(...i))}class Gi{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});const r=this._listeners;r[e]===void 0&&(r[e]=[]),r[e].indexOf(t)===-1&&r[e].push(t)}hasEventListener(e,t){const r=this._listeners;return r===void 0?!1:r[e]!==void 0&&r[e].indexOf(t)!==-1}removeEventListener(e,t){const r=this._listeners;if(r===void 0)return;const n=r[e];if(n!==void 0){const s=n.indexOf(t);s!==-1&&n.splice(s,1)}}dispatchEvent(e){const t=this._listeners;if(t===void 0)return;const r=t[e.type];if(r!==void 0){e.target=this;const n=r.slice(0);for(let s=0,a=n.length;s<a;s++)n[s].call(this,e);e.target=null}}}const Ge=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];function Ki(){const i=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,r=Math.random()*4294967295|0;return(Ge[i&255]+Ge[i>>8&255]+Ge[i>>16&255]+Ge[i>>24&255]+"-"+Ge[e&255]+Ge[e>>8&255]+"-"+Ge[e>>16&15|64]+Ge[e>>24&255]+"-"+Ge[t&63|128]+Ge[t>>8&255]+"-"+Ge[t>>16&255]+Ge[t>>24&255]+Ge[r&255]+Ge[r>>8&255]+Ge[r>>16&255]+Ge[r>>24&255]).toLowerCase()}function pe(i,e,t){return Math.max(e,Math.min(t,i))}function uv(i,e){return(i%e+e)%e}function As(i,e,t){return(1-t)*i+t*e}function Ci(i,e){switch(e.constructor){case Float32Array:return i;case Uint32Array:return i/4294967295;case Uint16Array:return i/65535;case Uint8Array:return i/255;case Int32Array:return Math.max(i/2147483647,-1);case Int16Array:return Math.max(i/32767,-1);case Int8Array:return Math.max(i/127,-1);default:throw new Error("Invalid component type.")}}function nt(i,e){switch(e.constructor){case Float32Array:return i;case Uint32Array:return Math.round(i*4294967295);case Uint16Array:return Math.round(i*65535);case Uint8Array:return Math.round(i*255);case Int32Array:return Math.round(i*2147483647);case Int16Array:return Math.round(i*32767);case Int8Array:return Math.round(i*127);default:throw new Error("Invalid component type.")}}const Va=class Va{constructor(e=0,t=0){this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,r=this.y,n=e.elements;return this.x=n[0]*t+n[3]*r+n[6],this.y=n[1]*t+n[4]*r+n[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=pe(this.x,e.x,t.x),this.y=pe(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=pe(this.x,e,t),this.y=pe(this.y,e,t),this}clampLength(e,t){const r=this.length();return this.divideScalar(r||1).multiplyScalar(pe(r,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const r=this.dot(e)/t;return Math.acos(pe(r,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,r=this.y-e.y;return t*t+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,r){return this.x=e.x+(t.x-e.x)*r,this.y=e.y+(t.y-e.y)*r,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const r=Math.cos(t),n=Math.sin(t),s=this.x-e.x,a=this.y-e.y;return this.x=s*r-a*n+e.x,this.y=s*n+a*r+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}};Va.prototype.isVector2=!0;let Ot=Va;class Xi{constructor(e=0,t=0,r=0,n=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=r,this._w=n}static slerpFlat(e,t,r,n,s,a,l){let u=r[n+0],d=r[n+1],c=r[n+2],p=r[n+3],f=s[a+0],m=s[a+1],h=s[a+2],g=s[a+3];if(p!==g||u!==f||d!==m||c!==h){let v=u*f+d*m+c*h+p*g;v<0&&(f=-f,m=-m,h=-h,g=-g,v=-v);let b=1-l;if(v<.9995){const C=Math.acos(v),x=Math.sin(C);b=Math.sin(b*C)/x,l=Math.sin(l*C)/x,u=u*b+f*l,d=d*b+m*l,c=c*b+h*l,p=p*b+g*l}else{u=u*b+f*l,d=d*b+m*l,c=c*b+h*l,p=p*b+g*l;const C=1/Math.sqrt(u*u+d*d+c*c+p*p);u*=C,d*=C,c*=C,p*=C}}e[t]=u,e[t+1]=d,e[t+2]=c,e[t+3]=p}static multiplyQuaternionsFlat(e,t,r,n,s,a){const l=r[n],u=r[n+1],d=r[n+2],c=r[n+3],p=s[a],f=s[a+1],m=s[a+2],h=s[a+3];return e[t]=l*h+c*p+u*m-d*f,e[t+1]=u*h+c*f+d*p-l*m,e[t+2]=d*h+c*m+l*f-u*p,e[t+3]=c*h-l*p-u*f-d*m,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,r,n){return this._x=e,this._y=t,this._z=r,this._w=n,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){const r=e._x,n=e._y,s=e._z,a=e._order,l=Math.cos,u=Math.sin,d=l(r/2),c=l(n/2),p=l(s/2),f=u(r/2),m=u(n/2),h=u(s/2);switch(a){case"XYZ":this._x=f*c*p+d*m*h,this._y=d*m*p-f*c*h,this._z=d*c*h+f*m*p,this._w=d*c*p-f*m*h;break;case"YXZ":this._x=f*c*p+d*m*h,this._y=d*m*p-f*c*h,this._z=d*c*h-f*m*p,this._w=d*c*p+f*m*h;break;case"ZXY":this._x=f*c*p-d*m*h,this._y=d*m*p+f*c*h,this._z=d*c*h+f*m*p,this._w=d*c*p-f*m*h;break;case"ZYX":this._x=f*c*p-d*m*h,this._y=d*m*p+f*c*h,this._z=d*c*h-f*m*p,this._w=d*c*p+f*m*h;break;case"YZX":this._x=f*c*p+d*m*h,this._y=d*m*p+f*c*h,this._z=d*c*h-f*m*p,this._w=d*c*p-f*m*h;break;case"XZY":this._x=f*c*p-d*m*h,this._y=d*m*p-f*c*h,this._z=d*c*h+f*m*p,this._w=d*c*p+f*m*h;break;default:Ye("Quaternion: .setFromEuler() encountered an unknown order: "+a)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const r=t/2,n=Math.sin(r);return this._x=e.x*n,this._y=e.y*n,this._z=e.z*n,this._w=Math.cos(r),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,r=t[0],n=t[4],s=t[8],a=t[1],l=t[5],u=t[9],d=t[2],c=t[6],p=t[10],f=r+l+p;if(f>0){const m=.5/Math.sqrt(f+1);this._w=.25/m,this._x=(c-u)*m,this._y=(s-d)*m,this._z=(a-n)*m}else if(r>l&&r>p){const m=2*Math.sqrt(1+r-l-p);this._w=(c-u)/m,this._x=.25*m,this._y=(n+a)/m,this._z=(s+d)/m}else if(l>p){const m=2*Math.sqrt(1+l-r-p);this._w=(s-d)/m,this._x=(n+a)/m,this._y=.25*m,this._z=(u+c)/m}else{const m=2*Math.sqrt(1+p-r-l);this._w=(a-n)/m,this._x=(s+d)/m,this._y=(u+c)/m,this._z=.25*m}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let r=e.dot(t)+1;return r<1e-8?(r=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=r):(this._x=0,this._y=-e.z,this._z=e.y,this._w=r)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=r),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(pe(this.dot(e),-1,1)))}rotateTowards(e,t){const r=this.angleTo(e);if(r===0)return this;const n=Math.min(1,t/r);return this.slerp(e,n),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const r=e._x,n=e._y,s=e._z,a=e._w,l=t._x,u=t._y,d=t._z,c=t._w;return this._x=r*c+a*l+n*d-s*u,this._y=n*c+a*u+s*l-r*d,this._z=s*c+a*d+r*u-n*l,this._w=a*c-r*l-n*u-s*d,this._onChangeCallback(),this}slerp(e,t){let r=e._x,n=e._y,s=e._z,a=e._w,l=this.dot(e);l<0&&(r=-r,n=-n,s=-s,a=-a,l=-l);let u=1-t;if(l<.9995){const d=Math.acos(l),c=Math.sin(d);u=Math.sin(u*d)/c,t=Math.sin(t*d)/c,this._x=this._x*u+r*t,this._y=this._y*u+n*t,this._z=this._z*u+s*t,this._w=this._w*u+a*t,this._onChangeCallback()}else this._x=this._x*u+r*t,this._y=this._y*u+n*t,this._z=this._z*u+s*t,this._w=this._w*u+a*t,this.normalize();return this}slerpQuaternions(e,t,r){return this.copy(e).slerp(t,r)}random(){const e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),r=Math.random(),n=Math.sqrt(1-r),s=Math.sqrt(r);return this.set(n*Math.sin(e),n*Math.cos(e),s*Math.sin(t),s*Math.cos(t))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}const Ua=class Ua{constructor(e=0,t=0,r=0){this.x=e,this.y=t,this.z=r}set(e,t,r){return r===void 0&&(r=this.z),this.x=e,this.y=t,this.z=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(Yo.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(Yo.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,r=this.y,n=this.z,s=e.elements;return this.x=s[0]*t+s[3]*r+s[6]*n,this.y=s[1]*t+s[4]*r+s[7]*n,this.z=s[2]*t+s[5]*r+s[8]*n,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,r=this.y,n=this.z,s=e.elements,a=1/(s[3]*t+s[7]*r+s[11]*n+s[15]);return this.x=(s[0]*t+s[4]*r+s[8]*n+s[12])*a,this.y=(s[1]*t+s[5]*r+s[9]*n+s[13])*a,this.z=(s[2]*t+s[6]*r+s[10]*n+s[14])*a,this}applyQuaternion(e){const t=this.x,r=this.y,n=this.z,s=e.x,a=e.y,l=e.z,u=e.w,d=2*(a*n-l*r),c=2*(l*t-s*n),p=2*(s*r-a*t);return this.x=t+u*d+a*p-l*c,this.y=r+u*c+l*d-s*p,this.z=n+u*p+s*c-a*d,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,r=this.y,n=this.z,s=e.elements;return this.x=s[0]*t+s[4]*r+s[8]*n,this.y=s[1]*t+s[5]*r+s[9]*n,this.z=s[2]*t+s[6]*r+s[10]*n,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=pe(this.x,e.x,t.x),this.y=pe(this.y,e.y,t.y),this.z=pe(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=pe(this.x,e,t),this.y=pe(this.y,e,t),this.z=pe(this.z,e,t),this}clampLength(e,t){const r=this.length();return this.divideScalar(r||1).multiplyScalar(pe(r,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,r){return this.x=e.x+(t.x-e.x)*r,this.y=e.y+(t.y-e.y)*r,this.z=e.z+(t.z-e.z)*r,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const r=e.x,n=e.y,s=e.z,a=t.x,l=t.y,u=t.z;return this.x=n*u-s*l,this.y=s*a-r*u,this.z=r*l-n*a,this}projectOnVector(e){const t=e.lengthSq();if(t===0)return this.set(0,0,0);const r=e.dot(this)/t;return this.copy(e).multiplyScalar(r)}projectOnPlane(e){return Ss.copy(this).projectOnVector(e),this.sub(Ss)}reflect(e){return this.sub(Ss.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const r=this.dot(e)/t;return Math.acos(pe(r,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,r=this.y-e.y,n=this.z-e.z;return t*t+r*r+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,r){const n=Math.sin(t)*e;return this.x=n*Math.sin(r),this.y=Math.cos(t)*e,this.z=n*Math.cos(r),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,r){return this.x=e*Math.sin(t),this.y=r,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),r=this.setFromMatrixColumn(e,1).length(),n=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=r,this.z=n,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=Math.random()*Math.PI*2,t=Math.random()*2-1,r=Math.sqrt(1-t*t);return this.x=r*Math.cos(e),this.y=t,this.z=r*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}};Ua.prototype.isVector3=!0;let $=Ua;const Ss=new $,Yo=new Xi,ja=class ja{constructor(e,t,r,n,s,a,l,u,d){this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,r,n,s,a,l,u,d)}set(e,t,r,n,s,a,l,u,d){const c=this.elements;return c[0]=e,c[1]=n,c[2]=l,c[3]=t,c[4]=s,c[5]=u,c[6]=r,c[7]=a,c[8]=d,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,r=e.elements;return t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=r[3],t[4]=r[4],t[5]=r[5],t[6]=r[6],t[7]=r[7],t[8]=r[8],this}extractBasis(e,t,r){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),r.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const r=e.elements,n=t.elements,s=this.elements,a=r[0],l=r[3],u=r[6],d=r[1],c=r[4],p=r[7],f=r[2],m=r[5],h=r[8],g=n[0],v=n[3],b=n[6],C=n[1],x=n[4],A=n[7],q=n[2],S=n[5],B=n[8];return s[0]=a*g+l*C+u*q,s[3]=a*v+l*x+u*S,s[6]=a*b+l*A+u*B,s[1]=d*g+c*C+p*q,s[4]=d*v+c*x+p*S,s[7]=d*b+c*A+p*B,s[2]=f*g+m*C+h*q,s[5]=f*v+m*x+h*S,s[8]=f*b+m*A+h*B,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],r=e[1],n=e[2],s=e[3],a=e[4],l=e[5],u=e[6],d=e[7],c=e[8];return t*a*c-t*l*d-r*s*c+r*l*u+n*s*d-n*a*u}invert(){const e=this.elements,t=e[0],r=e[1],n=e[2],s=e[3],a=e[4],l=e[5],u=e[6],d=e[7],c=e[8],p=c*a-l*d,f=l*u-c*s,m=d*s-a*u,h=t*p+r*f+n*m;if(h===0)return this.set(0,0,0,0,0,0,0,0,0);const g=1/h;return e[0]=p*g,e[1]=(n*d-c*r)*g,e[2]=(l*r-n*a)*g,e[3]=f*g,e[4]=(c*t-n*u)*g,e[5]=(n*s-l*t)*g,e[6]=m*g,e[7]=(r*u-d*t)*g,e[8]=(a*t-r*s)*g,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,r,n,s,a,l){const u=Math.cos(s),d=Math.sin(s);return this.set(r*u,r*d,-r*(u*a+d*l)+a+e,-n*d,n*u,-n*(-d*a+u*l)+l+t,0,0,1),this}scale(e,t){return this.premultiply(Ms.makeScale(e,t)),this}rotate(e){return this.premultiply(Ms.makeRotation(-e)),this}translate(e,t){return this.premultiply(Ms.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),r=Math.sin(e);return this.set(t,-r,0,r,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,r=e.elements;for(let n=0;n<9;n++)if(t[n]!==r[n])return!1;return!0}fromArray(e,t=0){for(let r=0;r<9;r++)this.elements[r]=e[r+t];return this}toArray(e=[],t=0){const r=this.elements;return e[t]=r[0],e[t+1]=r[1],e[t+2]=r[2],e[t+3]=r[3],e[t+4]=r[4],e[t+5]=r[5],e[t+6]=r[6],e[t+7]=r[7],e[t+8]=r[8],e}clone(){return new this.constructor().fromArray(this.elements)}};ja.prototype.isMatrix3=!0;let Vt=ja;const Ms=new Vt,Jo=new Vt().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),Zo=new Vt().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function dv(){const i={enabled:!0,workingColorSpace:No,spaces:{},convert:function(n,s,a){return this.enabled===!1||s===a||!s||!a||(this.spaces[s].transfer===Cs&&(n.r=er(n.r),n.g=er(n.g),n.b=er(n.b)),this.spaces[s].primaries!==this.spaces[a].primaries&&(n.applyMatrix3(this.spaces[s].toXYZ),n.applyMatrix3(this.spaces[a].fromXYZ)),this.spaces[a].transfer===Cs&&(n.r=oi(n.r),n.g=oi(n.g),n.b=oi(n.b))),n},workingToColorSpace:function(n,s){return this.convert(n,this.workingColorSpace,s)},colorSpaceToWorking:function(n,s){return this.convert(n,s,this.workingColorSpace)},getPrimaries:function(n){return this.spaces[n].primaries},getTransfer:function(n){return n===Xu?Vo:this.spaces[n].transfer},getToneMappingMode:function(n){return this.spaces[n].outputColorSpaceConfig.toneMappingMode||"standard"},getLuminanceCoefficients:function(n,s=this.workingColorSpace){return n.fromArray(this.spaces[s].luminanceCoefficients)},define:function(n){Object.assign(this.spaces,n)},_getMatrix:function(n,s,a){return n.copy(this.spaces[s].toXYZ).multiply(this.spaces[a].fromXYZ)},_getDrawingBufferColorSpace:function(n){return this.spaces[n].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(n=this.workingColorSpace){return this.spaces[n].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(n,s){return Xo("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),i.workingToColorSpace(n,s)},toWorkingColorSpace:function(n,s){return Xo("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),i.colorSpaceToWorking(n,s)}},e=[.64,.33,.3,.6,.15,.06],t=[.2126,.7152,.0722],r=[.3127,.329];return i.define({[No]:{primaries:e,whitePoint:r,transfer:Vo,toXYZ:Jo,fromXYZ:Zo,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:kt},outputColorSpaceConfig:{drawingBufferColorSpace:kt}},[kt]:{primaries:e,whitePoint:r,transfer:Cs,toXYZ:Jo,fromXYZ:Zo,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:kt}}}),i}const At=dv();function er(i){return i<.04045?i*.0773993808:Math.pow(i*.9478672986+.0521327014,2.4)}function oi(i){return i<.0031308?i*12.92:1.055*Math.pow(i,.41666)-.055}let Vr;class cv{static getDataURL(e,t="image/png"){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let r;if(e instanceof HTMLCanvasElement)r=e;else{Vr===void 0&&(Vr=Go("canvas")),Vr.width=e.width,Vr.height=e.height;const n=Vr.getContext("2d");e instanceof ImageData?n.putImageData(e,0,0):n.drawImage(e,0,0,e.width,e.height),r=Vr}return r.toDataURL(t)}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const t=Go("canvas");t.width=e.width,t.height=e.height;const r=t.getContext("2d");r.drawImage(e,0,0,e.width,e.height);const n=r.getImageData(0,0,e.width,e.height),s=n.data;for(let a=0;a<s.length;a++)s[a]=er(s[a]/255)*255;return r.putImageData(n,0,0),t}else if(e.data){const t=e.data.slice(0);for(let r=0;r<t.length;r++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[r]=Math.floor(er(t[r]/255)*255):t[r]=er(t[r]);return{data:t,width:e.width,height:e.height}}else return Ye("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}}let pv=0;class fv{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:pv++}),this.uuid=Ki(),this.data=e,this.dataReady=!0,this.version=0}getSize(e){const t=this.data;return typeof HTMLVideoElement<"u"&&t instanceof HTMLVideoElement?e.set(t.videoWidth,t.videoHeight,0):typeof VideoFrame<"u"&&t instanceof VideoFrame?e.set(t.displayWidth,t.displayHeight,0):t!==null?e.set(t.width,t.height,t.depth||0):e.set(0,0,0),e}set needsUpdate(e){e===!0&&this.version++}toJSON(e){const t=e===void 0||typeof e=="string";if(!t&&e.images[this.uuid]!==void 0)return e.images[this.uuid];const r={uuid:this.uuid,url:""},n=this.data;if(n!==null){let s;if(Array.isArray(n)){s=[];for(let a=0,l=n.length;a<l;a++)n[a].isDataTexture?s.push(Bs(n[a].image)):s.push(Bs(n[a]))}else s=Bs(n);r.url=s}return t||(e.images[this.uuid]=r),r}}function Bs(i){return typeof HTMLImageElement<"u"&&i instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&i instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&i instanceof ImageBitmap?cv.getDataURL(i):i.data?{data:Array.from(i.data),width:i.width,height:i.height,type:i.data.constructor.name}:(Ye("Texture: Unable to serialize Texture."),{})}let hv=0;const ks=new $;class kr extends Gi{constructor(e=kr.DEFAULT_IMAGE,t=kr.DEFAULT_MAPPING,r=mn,n=mn,s=iv,a=nv,l=ov,u=sv,d=kr.DEFAULT_ANISOTROPY,c=Xu){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:hv++}),this.uuid=Ki(),this.name="",this.source=new fv(e),this.mipmaps=[],this.mapping=t,this.channel=0,this.wrapS=r,this.wrapT=n,this.magFilter=s,this.minFilter=a,this.anisotropy=d,this.format=l,this.internalFormat=null,this.type=u,this.offset=new Ot(0,0),this.repeat=new Ot(1,1),this.center=new Ot(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Vt,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=c,this.userData={},this.updateRanges=[],this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.isArrayTexture=!!(e&&e.depth&&e.depth>1),this.pmremVersion=0,this.normalized=!1}get width(){return this.source.getSize(ks).x}get height(){return this.source.getSize(ks).y}get depth(){return this.source.getSize(ks).z}get image(){return this.source.data}set image(e){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.normalized=e.normalized,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.colorSpace=e.colorSpace,this.renderTarget=e.renderTarget,this.isRenderTargetTexture=e.isRenderTargetTexture,this.isArrayTexture=e.isArrayTexture,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}setValues(e){for(const t in e){const r=e[t];if(r===void 0){Ye(`Texture.setValues(): parameter '${t}' has value of undefined.`);continue}const n=this[t];if(n===void 0){Ye(`Texture.setValues(): property '${t}' does not exist.`);continue}n&&r&&n.isVector2&&r.isVector2||n&&r&&n.isVector3&&r.isVector3||n&&r&&n.isMatrix3&&r.isMatrix3?n.copy(r):this[t]=r}}toJSON(e){const t=e===void 0||typeof e=="string";if(!t&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];const r={metadata:{version:4.7,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,normalized:this.normalized,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(r.userData=this.userData),t||(e.textures[this.uuid]=r),r}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==Ku)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case Lo:e.x=e.x-Math.floor(e.x);break;case mn:e.x=e.x<0?0:1;break;case Ho:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case Lo:e.y=e.y-Math.floor(e.y);break;case mn:e.y=e.y<0?0:1;break;case Ho:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){e===!0&&this.pmremVersion++}}kr.DEFAULT_IMAGE=null;kr.DEFAULT_MAPPING=Ku;kr.DEFAULT_ANISOTROPY=1;const Wa=class Wa{constructor(e=0,t=0,r=0,n=1){this.x=e,this.y=t,this.z=r,this.w=n}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,r,n){return this.x=e,this.y=t,this.z=r,this.w=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,r=this.y,n=this.z,s=this.w,a=e.elements;return this.x=a[0]*t+a[4]*r+a[8]*n+a[12]*s,this.y=a[1]*t+a[5]*r+a[9]*n+a[13]*s,this.z=a[2]*t+a[6]*r+a[10]*n+a[14]*s,this.w=a[3]*t+a[7]*r+a[11]*n+a[15]*s,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,r,n,s;const u=e.elements,d=u[0],c=u[4],p=u[8],f=u[1],m=u[5],h=u[9],g=u[2],v=u[6],b=u[10];if(Math.abs(c-f)<.01&&Math.abs(p-g)<.01&&Math.abs(h-v)<.01){if(Math.abs(c+f)<.1&&Math.abs(p+g)<.1&&Math.abs(h+v)<.1&&Math.abs(d+m+b-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const x=(d+1)/2,A=(m+1)/2,q=(b+1)/2,S=(c+f)/4,B=(p+g)/4,k=(h+v)/4;return x>A&&x>q?x<.01?(r=0,n=.707106781,s=.707106781):(r=Math.sqrt(x),n=S/r,s=B/r):A>q?A<.01?(r=.707106781,n=0,s=.707106781):(n=Math.sqrt(A),r=S/n,s=k/n):q<.01?(r=.707106781,n=.707106781,s=0):(s=Math.sqrt(q),r=B/s,n=k/s),this.set(r,n,s,t),this}let C=Math.sqrt((v-h)*(v-h)+(p-g)*(p-g)+(f-c)*(f-c));return Math.abs(C)<.001&&(C=1),this.x=(v-h)/C,this.y=(p-g)/C,this.z=(f-c)/C,this.w=Math.acos((d+m+b-1)/2),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this.w=t[15],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=pe(this.x,e.x,t.x),this.y=pe(this.y,e.y,t.y),this.z=pe(this.z,e.z,t.z),this.w=pe(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=pe(this.x,e,t),this.y=pe(this.y,e,t),this.z=pe(this.z,e,t),this.w=pe(this.w,e,t),this}clampLength(e,t){const r=this.length();return this.divideScalar(r||1).multiplyScalar(pe(r,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,r){return this.x=e.x+(t.x-e.x)*r,this.y=e.y+(t.y-e.y)*r,this.z=e.z+(t.z-e.z)*r,this.w=e.w+(t.w-e.w)*r,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}};Wa.prototype.isVector4=!0;let Ti=Wa;const Kn=class Kn{constructor(e,t,r,n,s,a,l,u,d,c,p,f,m,h,g,v){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,t,r,n,s,a,l,u,d,c,p,f,m,h,g,v)}set(e,t,r,n,s,a,l,u,d,c,p,f,m,h,g,v){const b=this.elements;return b[0]=e,b[4]=t,b[8]=r,b[12]=n,b[1]=s,b[5]=a,b[9]=l,b[13]=u,b[2]=d,b[6]=c,b[10]=p,b[14]=f,b[3]=m,b[7]=h,b[11]=g,b[15]=v,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new Kn().fromArray(this.elements)}copy(e){const t=this.elements,r=e.elements;return t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=r[3],t[4]=r[4],t[5]=r[5],t[6]=r[6],t[7]=r[7],t[8]=r[8],t[9]=r[9],t[10]=r[10],t[11]=r[11],t[12]=r[12],t[13]=r[13],t[14]=r[14],t[15]=r[15],this}copyPosition(e){const t=this.elements,r=e.elements;return t[12]=r[12],t[13]=r[13],t[14]=r[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,r){return this.determinant()===0?(e.set(1,0,0),t.set(0,1,0),r.set(0,0,1),this):(e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),r.setFromMatrixColumn(this,2),this)}makeBasis(e,t,r){return this.set(e.x,t.x,r.x,0,e.y,t.y,r.y,0,e.z,t.z,r.z,0,0,0,0,1),this}extractRotation(e){if(e.determinant()===0)return this.identity();const t=this.elements,r=e.elements,n=1/Ur.setFromMatrixColumn(e,0).length(),s=1/Ur.setFromMatrixColumn(e,1).length(),a=1/Ur.setFromMatrixColumn(e,2).length();return t[0]=r[0]*n,t[1]=r[1]*n,t[2]=r[2]*n,t[3]=0,t[4]=r[4]*s,t[5]=r[5]*s,t[6]=r[6]*s,t[7]=0,t[8]=r[8]*a,t[9]=r[9]*a,t[10]=r[10]*a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,r=e.x,n=e.y,s=e.z,a=Math.cos(r),l=Math.sin(r),u=Math.cos(n),d=Math.sin(n),c=Math.cos(s),p=Math.sin(s);if(e.order==="XYZ"){const f=a*c,m=a*p,h=l*c,g=l*p;t[0]=u*c,t[4]=-u*p,t[8]=d,t[1]=m+h*d,t[5]=f-g*d,t[9]=-l*u,t[2]=g-f*d,t[6]=h+m*d,t[10]=a*u}else if(e.order==="YXZ"){const f=u*c,m=u*p,h=d*c,g=d*p;t[0]=f+g*l,t[4]=h*l-m,t[8]=a*d,t[1]=a*p,t[5]=a*c,t[9]=-l,t[2]=m*l-h,t[6]=g+f*l,t[10]=a*u}else if(e.order==="ZXY"){const f=u*c,m=u*p,h=d*c,g=d*p;t[0]=f-g*l,t[4]=-a*p,t[8]=h+m*l,t[1]=m+h*l,t[5]=a*c,t[9]=g-f*l,t[2]=-a*d,t[6]=l,t[10]=a*u}else if(e.order==="ZYX"){const f=a*c,m=a*p,h=l*c,g=l*p;t[0]=u*c,t[4]=h*d-m,t[8]=f*d+g,t[1]=u*p,t[5]=g*d+f,t[9]=m*d-h,t[2]=-d,t[6]=l*u,t[10]=a*u}else if(e.order==="YZX"){const f=a*u,m=a*d,h=l*u,g=l*d;t[0]=u*c,t[4]=g-f*p,t[8]=h*p+m,t[1]=p,t[5]=a*c,t[9]=-l*c,t[2]=-d*c,t[6]=m*p+h,t[10]=f-g*p}else if(e.order==="XZY"){const f=a*u,m=a*d,h=l*u,g=l*d;t[0]=u*c,t[4]=-p,t[8]=d*c,t[1]=f*p+g,t[5]=a*c,t[9]=m*p-h,t[2]=h*p-m,t[6]=l*c,t[10]=g*p+f}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(mv,e,gv)}lookAt(e,t,r){const n=this.elements;return lt.subVectors(e,t),lt.lengthSq()===0&&(lt.z=1),lt.normalize(),nr.crossVectors(r,lt),nr.lengthSq()===0&&(Math.abs(r.z)===1?lt.x+=1e-4:lt.z+=1e-4,lt.normalize(),nr.crossVectors(r,lt)),nr.normalize(),yn.crossVectors(lt,nr),n[0]=nr.x,n[4]=yn.x,n[8]=lt.x,n[1]=nr.y,n[5]=yn.y,n[9]=lt.y,n[2]=nr.z,n[6]=yn.z,n[10]=lt.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const r=e.elements,n=t.elements,s=this.elements,a=r[0],l=r[4],u=r[8],d=r[12],c=r[1],p=r[5],f=r[9],m=r[13],h=r[2],g=r[6],v=r[10],b=r[14],C=r[3],x=r[7],A=r[11],q=r[15],S=n[0],B=n[4],k=n[8],N=n[12],z=n[1],j=n[5],W=n[9],J=n[13],ie=n[2],O=n[6],U=n[10],re=n[14],X=n[3],ce=n[7],te=n[11],fe=n[15];return s[0]=a*S+l*z+u*ie+d*X,s[4]=a*B+l*j+u*O+d*ce,s[8]=a*k+l*W+u*U+d*te,s[12]=a*N+l*J+u*re+d*fe,s[1]=c*S+p*z+f*ie+m*X,s[5]=c*B+p*j+f*O+m*ce,s[9]=c*k+p*W+f*U+m*te,s[13]=c*N+p*J+f*re+m*fe,s[2]=h*S+g*z+v*ie+b*X,s[6]=h*B+g*j+v*O+b*ce,s[10]=h*k+g*W+v*U+b*te,s[14]=h*N+g*J+v*re+b*fe,s[3]=C*S+x*z+A*ie+q*X,s[7]=C*B+x*j+A*O+q*ce,s[11]=C*k+x*W+A*U+q*te,s[15]=C*N+x*J+A*re+q*fe,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],r=e[4],n=e[8],s=e[12],a=e[1],l=e[5],u=e[9],d=e[13],c=e[2],p=e[6],f=e[10],m=e[14],h=e[3],g=e[7],v=e[11],b=e[15],C=u*m-d*f,x=l*m-d*p,A=l*f-u*p,q=a*m-d*c,S=a*f-u*c,B=a*p-l*c;return t*(g*C-v*x+b*A)-r*(h*C-v*q+b*S)+n*(h*x-g*q+b*B)-s*(h*A-g*S+v*B)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,r){const n=this.elements;return e.isVector3?(n[12]=e.x,n[13]=e.y,n[14]=e.z):(n[12]=e,n[13]=t,n[14]=r),this}invert(){const e=this.elements,t=e[0],r=e[1],n=e[2],s=e[3],a=e[4],l=e[5],u=e[6],d=e[7],c=e[8],p=e[9],f=e[10],m=e[11],h=e[12],g=e[13],v=e[14],b=e[15],C=t*l-r*a,x=t*u-n*a,A=t*d-s*a,q=r*u-n*l,S=r*d-s*l,B=n*d-s*u,k=c*g-p*h,N=c*v-f*h,z=c*b-m*h,j=p*v-f*g,W=p*b-m*g,J=f*b-m*v,ie=C*J-x*W+A*j+q*z-S*N+B*k;if(ie===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const O=1/ie;return e[0]=(l*J-u*W+d*j)*O,e[1]=(n*W-r*J-s*j)*O,e[2]=(g*B-v*S+b*q)*O,e[3]=(f*S-p*B-m*q)*O,e[4]=(u*z-a*J-d*N)*O,e[5]=(t*J-n*z+s*N)*O,e[6]=(v*A-h*B-b*x)*O,e[7]=(c*B-f*A+m*x)*O,e[8]=(a*W-l*z+d*k)*O,e[9]=(r*z-t*W-s*k)*O,e[10]=(h*S-g*A+b*C)*O,e[11]=(p*A-c*S-m*C)*O,e[12]=(l*N-a*j-u*k)*O,e[13]=(t*j-r*N+n*k)*O,e[14]=(g*x-h*q-v*C)*O,e[15]=(c*q-p*x+f*C)*O,this}scale(e){const t=this.elements,r=e.x,n=e.y,s=e.z;return t[0]*=r,t[4]*=n,t[8]*=s,t[1]*=r,t[5]*=n,t[9]*=s,t[2]*=r,t[6]*=n,t[10]*=s,t[3]*=r,t[7]*=n,t[11]*=s,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],r=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],n=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,r,n))}makeTranslation(e,t,r){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,r,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),r=Math.sin(e);return this.set(1,0,0,0,0,t,-r,0,0,r,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),r=Math.sin(e);return this.set(t,0,r,0,0,1,0,0,-r,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),r=Math.sin(e);return this.set(t,-r,0,0,r,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const r=Math.cos(t),n=Math.sin(t),s=1-r,a=e.x,l=e.y,u=e.z,d=s*a,c=s*l;return this.set(d*a+r,d*l-n*u,d*u+n*l,0,d*l+n*u,c*l+r,c*u-n*a,0,d*u-n*l,c*u+n*a,s*u*u+r,0,0,0,0,1),this}makeScale(e,t,r){return this.set(e,0,0,0,0,t,0,0,0,0,r,0,0,0,0,1),this}makeShear(e,t,r,n,s,a){return this.set(1,r,s,0,e,1,a,0,t,n,1,0,0,0,0,1),this}compose(e,t,r){const n=this.elements,s=t._x,a=t._y,l=t._z,u=t._w,d=s+s,c=a+a,p=l+l,f=s*d,m=s*c,h=s*p,g=a*c,v=a*p,b=l*p,C=u*d,x=u*c,A=u*p,q=r.x,S=r.y,B=r.z;return n[0]=(1-(g+b))*q,n[1]=(m+A)*q,n[2]=(h-x)*q,n[3]=0,n[4]=(m-A)*S,n[5]=(1-(f+b))*S,n[6]=(v+C)*S,n[7]=0,n[8]=(h+x)*B,n[9]=(v-C)*B,n[10]=(1-(f+g))*B,n[11]=0,n[12]=e.x,n[13]=e.y,n[14]=e.z,n[15]=1,this}decompose(e,t,r){const n=this.elements;e.x=n[12],e.y=n[13],e.z=n[14];const s=this.determinant();if(s===0)return r.set(1,1,1),t.identity(),this;let a=Ur.set(n[0],n[1],n[2]).length();const l=Ur.set(n[4],n[5],n[6]).length(),u=Ur.set(n[8],n[9],n[10]).length();s<0&&(a=-a),St.copy(this);const d=1/a,c=1/l,p=1/u;return St.elements[0]*=d,St.elements[1]*=d,St.elements[2]*=d,St.elements[4]*=c,St.elements[5]*=c,St.elements[6]*=c,St.elements[8]*=p,St.elements[9]*=p,St.elements[10]*=p,t.setFromRotationMatrix(St),r.x=a,r.y=l,r.z=u,this}makePerspective(e,t,r,n,s,a,l=gn,u=!1){const d=this.elements,c=2*s/(t-e),p=2*s/(r-n),f=(t+e)/(t-e),m=(r+n)/(r-n);let h,g;if(u)h=s/(a-s),g=a*s/(a-s);else if(l===gn)h=-(a+s)/(a-s),g=-2*a*s/(a-s);else if(l===Wo)h=-a/(a-s),g=-a*s/(a-s);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+l);return d[0]=c,d[4]=0,d[8]=f,d[12]=0,d[1]=0,d[5]=p,d[9]=m,d[13]=0,d[2]=0,d[6]=0,d[10]=h,d[14]=g,d[3]=0,d[7]=0,d[11]=-1,d[15]=0,this}makeOrthographic(e,t,r,n,s,a,l=gn,u=!1){const d=this.elements,c=2/(t-e),p=2/(r-n),f=-(t+e)/(t-e),m=-(r+n)/(r-n);let h,g;if(u)h=1/(a-s),g=a/(a-s);else if(l===gn)h=-2/(a-s),g=-(a+s)/(a-s);else if(l===Wo)h=-1/(a-s),g=-s/(a-s);else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+l);return d[0]=c,d[4]=0,d[8]=0,d[12]=f,d[1]=0,d[5]=p,d[9]=0,d[13]=m,d[2]=0,d[6]=0,d[10]=h,d[14]=g,d[3]=0,d[7]=0,d[11]=0,d[15]=1,this}equals(e){const t=this.elements,r=e.elements;for(let n=0;n<16;n++)if(t[n]!==r[n])return!1;return!0}fromArray(e,t=0){for(let r=0;r<16;r++)this.elements[r]=e[r+t];return this}toArray(e=[],t=0){const r=this.elements;return e[t]=r[0],e[t+1]=r[1],e[t+2]=r[2],e[t+3]=r[3],e[t+4]=r[4],e[t+5]=r[5],e[t+6]=r[6],e[t+7]=r[7],e[t+8]=r[8],e[t+9]=r[9],e[t+10]=r[10],e[t+11]=r[11],e[t+12]=r[12],e[t+13]=r[13],e[t+14]=r[14],e[t+15]=r[15],e}};Kn.prototype.isMatrix4=!0;let Lt=Kn;const Ur=new $,St=new Lt,mv=new $(0,0,0),gv=new $(1,1,1),nr=new $,yn=new $,lt=new $,Qo=new Lt,el=new Xi;class Yi{constructor(e=0,t=0,r=0,n=Yi.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=r,this._order=n}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,r,n=this._order){return this._x=e,this._y=t,this._z=r,this._order=n,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,r=!0){const n=e.elements,s=n[0],a=n[4],l=n[8],u=n[1],d=n[5],c=n[9],p=n[2],f=n[6],m=n[10];switch(t){case"XYZ":this._y=Math.asin(pe(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-c,m),this._z=Math.atan2(-a,s)):(this._x=Math.atan2(f,d),this._z=0);break;case"YXZ":this._x=Math.asin(-pe(c,-1,1)),Math.abs(c)<.9999999?(this._y=Math.atan2(l,m),this._z=Math.atan2(u,d)):(this._y=Math.atan2(-p,s),this._z=0);break;case"ZXY":this._x=Math.asin(pe(f,-1,1)),Math.abs(f)<.9999999?(this._y=Math.atan2(-p,m),this._z=Math.atan2(-a,d)):(this._y=0,this._z=Math.atan2(u,s));break;case"ZYX":this._y=Math.asin(-pe(p,-1,1)),Math.abs(p)<.9999999?(this._x=Math.atan2(f,m),this._z=Math.atan2(u,s)):(this._x=0,this._z=Math.atan2(-a,d));break;case"YZX":this._z=Math.asin(pe(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(-c,d),this._y=Math.atan2(-p,s)):(this._x=0,this._y=Math.atan2(l,m));break;case"XZY":this._z=Math.asin(-pe(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(f,d),this._y=Math.atan2(l,s)):(this._x=Math.atan2(-c,m),this._y=0);break;default:Ye("Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,r===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,r){return Qo.makeRotationFromQuaternion(e),this.setFromRotationMatrix(Qo,t,r)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return el.setFromEuler(this),this.setFromQuaternion(el,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}Yi.DEFAULT_ORDER="XYZ";class yv{constructor(){this.mask=1}set(e){this.mask=(1<<e|0)>>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return(this.mask&e.mask)!==0}isEnabled(e){return(this.mask&(1<<e|0))!==0}}let vv=0;const tl=new $,jr=new Xi,Gt=new Lt,vn=new $,Ai=new $,bv=new $,xv=new Xi,rl=new $(1,0,0),il=new $(0,1,0),nl=new $(0,0,1),sl={type:"added"},wv={type:"removed"},Wr={type:"childadded",child:null},qs={type:"childremoved",child:null};class tr extends Gi{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:vv++}),this.uuid=Ki(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=tr.DEFAULT_UP.clone();const e=new $,t=new Yi,r=new Xi,n=new $(1,1,1);function s(){r.setFromEuler(t,!1)}function a(){t.setFromQuaternion(r,void 0,!1)}t._onChange(s),r._onChange(a),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:r},scale:{configurable:!0,enumerable:!0,value:n},modelViewMatrix:{value:new Lt},normalMatrix:{value:new Vt}}),this.matrix=new Lt,this.matrixWorld=new Lt,this.matrixAutoUpdate=tr.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=tr.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new yv,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.customDepthMaterial=void 0,this.customDistanceMaterial=void 0,this.static=!1,this.userData={},this.pivot=null}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,t){this.quaternion.setFromAxisAngle(e,t)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return jr.setFromAxisAngle(e,t),this.quaternion.multiply(jr),this}rotateOnWorldAxis(e,t){return jr.setFromAxisAngle(e,t),this.quaternion.premultiply(jr),this}rotateX(e){return this.rotateOnAxis(rl,e)}rotateY(e){return this.rotateOnAxis(il,e)}rotateZ(e){return this.rotateOnAxis(nl,e)}translateOnAxis(e,t){return tl.copy(e).applyQuaternion(this.quaternion),this.position.add(tl.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(rl,e)}translateY(e){return this.translateOnAxis(il,e)}translateZ(e){return this.translateOnAxis(nl,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(Gt.copy(this.matrixWorld).invert())}lookAt(e,t,r){e.isVector3?vn.copy(e):vn.set(e,t,r);const n=this.parent;this.updateWorldMatrix(!0,!1),Ai.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?Gt.lookAt(Ai,vn,this.up):Gt.lookAt(vn,Ai,this.up),this.quaternion.setFromRotationMatrix(Gt),n&&(Gt.extractRotation(n.matrixWorld),jr.setFromRotationMatrix(Gt),this.quaternion.premultiply(jr.invert()))}add(e){if(arguments.length>1){for(let t=0;t<arguments.length;t++)this.add(arguments[t]);return this}return e===this?(Mr("Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(e.removeFromParent(),e.parent=this,this.children.push(e),e.dispatchEvent(sl),Wr.child=e,this.dispatchEvent(Wr),Wr.child=null):Mr("Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let r=0;r<arguments.length;r++)this.remove(arguments[r]);return this}const t=this.children.indexOf(e);return t!==-1&&(e.parent=null,this.children.splice(t,1),e.dispatchEvent(wv),qs.child=e,this.dispatchEvent(qs),qs.child=null),this}removeFromParent(){const e=this.parent;return e!==null&&e.remove(this),this}clear(){return this.remove(...this.children)}attach(e){return this.updateWorldMatrix(!0,!1),Gt.copy(this.matrixWorld).invert(),e.parent!==null&&(e.parent.updateWorldMatrix(!0,!1),Gt.multiply(e.parent.matrixWorld)),e.applyMatrix4(Gt),e.removeFromParent(),e.parent=this,this.children.push(e),e.updateWorldMatrix(!1,!0),e.dispatchEvent(sl),Wr.child=e,this.dispatchEvent(Wr),Wr.child=null,this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,t){if(this[e]===t)return this;for(let r=0,n=this.children.length;r<n;r++){const a=this.children[r].getObjectByProperty(e,t);if(a!==void 0)return a}}getObjectsByProperty(e,t,r=[]){this[e]===t&&r.push(this);const n=this.children;for(let s=0,a=n.length;s<a;s++)n[s].getObjectsByProperty(e,t,r);return r}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Ai,e,bv),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Ai,xv,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let r=0,n=t.length;r<n;r++)t[r].traverse(e)}traverseVisible(e){if(this.visible===!1)return;e(this);const t=this.children;for(let r=0,n=t.length;r<n;r++)t[r].traverseVisible(e)}traverseAncestors(e){const t=this.parent;t!==null&&(e(t),t.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale);const e=this.pivot;if(e!==null){const t=e.x,r=e.y,n=e.z,s=this.matrix.elements;s[12]+=t-s[0]*t-s[4]*r-s[8]*n,s[13]+=r-s[1]*t-s[5]*r-s[9]*n,s[14]+=n-s[2]*t-s[6]*r-s[10]*n}this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,e=!0);const t=this.children;for(let r=0,n=t.length;r<n;r++)t[r].updateMatrixWorld(e)}updateWorldMatrix(e,t){const r=this.parent;if(e===!0&&r!==null&&r.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),t===!0){const n=this.children;for(let s=0,a=n.length;s<a;s++)n[s].updateWorldMatrix(!1,!0)}}toJSON(e){const t=e===void 0||typeof e=="string",r={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},r.metadata={version:4.7,type:"Object",generator:"Object3D.toJSON"});const n={};n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.castShadow===!0&&(n.castShadow=!0),this.receiveShadow===!0&&(n.receiveShadow=!0),this.visible===!1&&(n.visible=!1),this.frustumCulled===!1&&(n.frustumCulled=!1),this.renderOrder!==0&&(n.renderOrder=this.renderOrder),this.static!==!1&&(n.static=this.static),Object.keys(this.userData).length>0&&(n.userData=this.userData),n.layers=this.layers.mask,n.matrix=this.matrix.toArray(),n.up=this.up.toArray(),this.pivot!==null&&(n.pivot=this.pivot.toArray()),this.matrixAutoUpdate===!1&&(n.matrixAutoUpdate=!1),this.morphTargetDictionary!==void 0&&(n.morphTargetDictionary=Object.assign({},this.morphTargetDictionary)),this.morphTargetInfluences!==void 0&&(n.morphTargetInfluences=this.morphTargetInfluences.slice()),this.isInstancedMesh&&(n.type="InstancedMesh",n.count=this.count,n.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(n.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(n.type="BatchedMesh",n.perObjectFrustumCulled=this.perObjectFrustumCulled,n.sortObjects=this.sortObjects,n.drawRanges=this._drawRanges,n.reservedRanges=this._reservedRanges,n.geometryInfo=this._geometryInfo.map(l=>({...l,boundingBox:l.boundingBox?l.boundingBox.toJSON():void 0,boundingSphere:l.boundingSphere?l.boundingSphere.toJSON():void 0})),n.instanceInfo=this._instanceInfo.map(l=>({...l})),n.availableInstanceIds=this._availableInstanceIds.slice(),n.availableGeometryIds=this._availableGeometryIds.slice(),n.nextIndexStart=this._nextIndexStart,n.nextVertexStart=this._nextVertexStart,n.geometryCount=this._geometryCount,n.maxInstanceCount=this._maxInstanceCount,n.maxVertexCount=this._maxVertexCount,n.maxIndexCount=this._maxIndexCount,n.geometryInitialized=this._geometryInitialized,n.matricesTexture=this._matricesTexture.toJSON(e),n.indirectTexture=this._indirectTexture.toJSON(e),this._colorsTexture!==null&&(n.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(n.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(n.boundingBox=this.boundingBox.toJSON()));function s(l,u){return l[u.uuid]===void 0&&(l[u.uuid]=u.toJSON(e)),u.uuid}if(this.isScene)this.background&&(this.background.isColor?n.background=this.background.toJSON():this.background.isTexture&&(n.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(n.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){n.geometry=s(e.geometries,this.geometry);const l=this.geometry.parameters;if(l!==void 0&&l.shapes!==void 0){const u=l.shapes;if(Array.isArray(u))for(let d=0,c=u.length;d<c;d++){const p=u[d];s(e.shapes,p)}else s(e.shapes,u)}}if(this.isSkinnedMesh&&(n.bindMode=this.bindMode,n.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(s(e.skeletons,this.skeleton),n.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){const l=[];for(let u=0,d=this.material.length;u<d;u++)l.push(s(e.materials,this.material[u]));n.material=l}else n.material=s(e.materials,this.material);if(this.children.length>0){n.children=[];for(let l=0;l<this.children.length;l++)n.children.push(this.children[l].toJSON(e).object)}if(this.animations.length>0){n.animations=[];for(let l=0;l<this.animations.length;l++){const u=this.animations[l];n.animations.push(s(e.animations,u))}}if(t){const l=a(e.geometries),u=a(e.materials),d=a(e.textures),c=a(e.images),p=a(e.shapes),f=a(e.skeletons),m=a(e.animations),h=a(e.nodes);l.length>0&&(r.geometries=l),u.length>0&&(r.materials=u),d.length>0&&(r.textures=d),c.length>0&&(r.images=c),p.length>0&&(r.shapes=p),f.length>0&&(r.skeletons=f),m.length>0&&(r.animations=m),h.length>0&&(r.nodes=h)}return r.object=n,r;function a(l){const u=[];for(const d in l){const c=l[d];delete c.metadata,u.push(c)}return u}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.pivot=e.pivot!==null?e.pivot.clone():null,this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.static=e.static,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let r=0;r<e.children.length;r++){const n=e.children[r];this.add(n.clone())}return this}}tr.DEFAULT_UP=new $(0,1,0);tr.DEFAULT_MATRIX_AUTO_UPDATE=!0;tr.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;const Ju={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},sr={h:0,s:0,l:0},bn={h:0,s:0,l:0};function Fs(i,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?i+(e-i)*6*t:t<1/2?e:t<2/3?i+(e-i)*6*(2/3-t):i}class Ji{constructor(e,t,r){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,r)}set(e,t,r){if(t===void 0&&r===void 0){const n=e;n&&n.isColor?this.copy(n):typeof n=="number"?this.setHex(n):typeof n=="string"&&this.setStyle(n)}else this.setRGB(e,t,r);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=kt){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,At.colorSpaceToWorking(this,t),this}setRGB(e,t,r,n=At.workingColorSpace){return this.r=e,this.g=t,this.b=r,At.colorSpaceToWorking(this,n),this}setHSL(e,t,r,n=At.workingColorSpace){if(e=uv(e,1),t=pe(t,0,1),r=pe(r,0,1),t===0)this.r=this.g=this.b=r;else{const s=r<=.5?r*(1+t):r+t-r*t,a=2*r-s;this.r=Fs(a,s,e+1/3),this.g=Fs(a,s,e),this.b=Fs(a,s,e-1/3)}return At.colorSpaceToWorking(this,n),this}setStyle(e,t=kt){function r(s){s!==void 0&&parseFloat(s)<1&&Ye("Color: Alpha component of "+e+" will be ignored.")}let n;if(n=/^(\w+)\(([^\)]*)\)/.exec(e)){let s;const a=n[1],l=n[2];switch(a){case"rgb":case"rgba":if(s=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(l))return r(s[4]),this.setRGB(Math.min(255,parseInt(s[1],10))/255,Math.min(255,parseInt(s[2],10))/255,Math.min(255,parseInt(s[3],10))/255,t);if(s=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(l))return r(s[4]),this.setRGB(Math.min(100,parseInt(s[1],10))/100,Math.min(100,parseInt(s[2],10))/100,Math.min(100,parseInt(s[3],10))/100,t);break;case"hsl":case"hsla":if(s=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(l))return r(s[4]),this.setHSL(parseFloat(s[1])/360,parseFloat(s[2])/100,parseFloat(s[3])/100,t);break;default:Ye("Color: Unknown color model "+e)}}else if(n=/^\#([A-Fa-f\d]+)$/.exec(e)){const s=n[1],a=s.length;if(a===3)return this.setRGB(parseInt(s.charAt(0),16)/15,parseInt(s.charAt(1),16)/15,parseInt(s.charAt(2),16)/15,t);if(a===6)return this.setHex(parseInt(s,16),t);Ye("Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=kt){const r=Ju[e.toLowerCase()];return r!==void 0?this.setHex(r,t):Ye("Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=er(e.r),this.g=er(e.g),this.b=er(e.b),this}copyLinearToSRGB(e){return this.r=oi(e.r),this.g=oi(e.g),this.b=oi(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=kt){return At.workingToColorSpace(Ke.copy(this),e),Math.round(pe(Ke.r*255,0,255))*65536+Math.round(pe(Ke.g*255,0,255))*256+Math.round(pe(Ke.b*255,0,255))}getHexString(e=kt){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=At.workingColorSpace){At.workingToColorSpace(Ke.copy(this),t);const r=Ke.r,n=Ke.g,s=Ke.b,a=Math.max(r,n,s),l=Math.min(r,n,s);let u,d;const c=(l+a)/2;if(l===a)u=0,d=0;else{const p=a-l;switch(d=c<=.5?p/(a+l):p/(2-a-l),a){case r:u=(n-s)/p+(n<s?6:0);break;case n:u=(s-r)/p+2;break;case s:u=(r-n)/p+4;break}u/=6}return e.h=u,e.s=d,e.l=c,e}getRGB(e,t=At.workingColorSpace){return At.workingToColorSpace(Ke.copy(this),t),e.r=Ke.r,e.g=Ke.g,e.b=Ke.b,e}getStyle(e=kt){At.workingToColorSpace(Ke.copy(this),e);const t=Ke.r,r=Ke.g,n=Ke.b;return e!==kt?`color(${e} ${t.toFixed(3)} ${r.toFixed(3)} ${n.toFixed(3)})`:`rgb(${Math.round(t*255)},${Math.round(r*255)},${Math.round(n*255)})`}offsetHSL(e,t,r){return this.getHSL(sr),this.setHSL(sr.h+e,sr.s+t,sr.l+r)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,r){return this.r=e.r+(t.r-e.r)*r,this.g=e.g+(t.g-e.g)*r,this.b=e.b+(t.b-e.b)*r,this}lerpHSL(e,t){this.getHSL(sr),e.getHSL(bn);const r=As(sr.h,bn.h,t),n=As(sr.s,bn.s,t),s=As(sr.l,bn.l,t);return this.setHSL(r,n,s),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){const t=this.r,r=this.g,n=this.b,s=e.elements;return this.r=s[0]*t+s[3]*r+s[6]*n,this.g=s[1]*t+s[4]*r+s[7]*n,this.b=s[2]*t+s[5]*r+s[8]*n,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const Ke=new Ji;Ji.NAMES=Ju;const Mt=new $,Kt=new $,Es=new $,Xt=new $,Gr=new $,Kr=new $,al=new $,Os=new $,zs=new $,Is=new $,Ts=new Ti,Ps=new Ti,Rs=new Ti;class Ft{constructor(e=new $,t=new $,r=new $){this.a=e,this.b=t,this.c=r}static getNormal(e,t,r,n){n.subVectors(r,t),Mt.subVectors(e,t),n.cross(Mt);const s=n.lengthSq();return s>0?n.multiplyScalar(1/Math.sqrt(s)):n.set(0,0,0)}static getBarycoord(e,t,r,n,s){Mt.subVectors(n,t),Kt.subVectors(r,t),Es.subVectors(e,t);const a=Mt.dot(Mt),l=Mt.dot(Kt),u=Mt.dot(Es),d=Kt.dot(Kt),c=Kt.dot(Es),p=a*d-l*l;if(p===0)return s.set(0,0,0),null;const f=1/p,m=(d*u-l*c)*f,h=(a*c-l*u)*f;return s.set(1-m-h,h,m)}static containsPoint(e,t,r,n){return this.getBarycoord(e,t,r,n,Xt)===null?!1:Xt.x>=0&&Xt.y>=0&&Xt.x+Xt.y<=1}static getInterpolation(e,t,r,n,s,a,l,u){return this.getBarycoord(e,t,r,n,Xt)===null?(u.x=0,u.y=0,"z"in u&&(u.z=0),"w"in u&&(u.w=0),null):(u.setScalar(0),u.addScaledVector(s,Xt.x),u.addScaledVector(a,Xt.y),u.addScaledVector(l,Xt.z),u)}static getInterpolatedAttribute(e,t,r,n,s,a){return Ts.setScalar(0),Ps.setScalar(0),Rs.setScalar(0),Ts.fromBufferAttribute(e,t),Ps.fromBufferAttribute(e,r),Rs.fromBufferAttribute(e,n),a.setScalar(0),a.addScaledVector(Ts,s.x),a.addScaledVector(Ps,s.y),a.addScaledVector(Rs,s.z),a}static isFrontFacing(e,t,r,n){return Mt.subVectors(r,t),Kt.subVectors(e,t),Mt.cross(Kt).dot(n)<0}set(e,t,r){return this.a.copy(e),this.b.copy(t),this.c.copy(r),this}setFromPointsAndIndices(e,t,r,n){return this.a.copy(e[t]),this.b.copy(e[r]),this.c.copy(e[n]),this}setFromAttributeAndIndices(e,t,r,n){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,r),this.c.fromBufferAttribute(e,n),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Mt.subVectors(this.c,this.b),Kt.subVectors(this.a,this.b),Mt.cross(Kt).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Ft.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return Ft.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,r,n,s){return Ft.getInterpolation(e,this.a,this.b,this.c,t,r,n,s)}containsPoint(e){return Ft.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Ft.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const r=this.a,n=this.b,s=this.c;let a,l;Gr.subVectors(n,r),Kr.subVectors(s,r),Os.subVectors(e,r);const u=Gr.dot(Os),d=Kr.dot(Os);if(u<=0&&d<=0)return t.copy(r);zs.subVectors(e,n);const c=Gr.dot(zs),p=Kr.dot(zs);if(c>=0&&p<=c)return t.copy(n);const f=u*p-c*d;if(f<=0&&u>=0&&c<=0)return a=u/(u-c),t.copy(r).addScaledVector(Gr,a);Is.subVectors(e,s);const m=Gr.dot(Is),h=Kr.dot(Is);if(h>=0&&m<=h)return t.copy(s);const g=m*d-u*h;if(g<=0&&d>=0&&h<=0)return l=d/(d-h),t.copy(r).addScaledVector(Kr,l);const v=c*h-m*p;if(v<=0&&p-c>=0&&m-h>=0)return al.subVectors(s,n),l=(p-c)/(p-c+(m-h)),t.copy(n).addScaledVector(al,l);const b=1/(v+g+f);return a=g*b,l=f*b,t.copy(r).addScaledVector(Gr,a).addScaledVector(Kr,l)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}class Zi{constructor(e=new $(1/0,1/0,1/0),t=new $(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,r=e.length;t<r;t+=3)this.expandByPoint(Bt.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,r=e.count;t<r;t++)this.expandByPoint(Bt.fromBufferAttribute(e,t));return this}setFromPoints(e){this.makeEmpty();for(let t=0,r=e.length;t<r;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const r=Bt.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(r),this.max.copy(e).add(r),this}setFromObject(e,t=!1){return this.makeEmpty(),this.expandByObject(e,t)}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,t=!1){e.updateWorldMatrix(!1,!1);const r=e.geometry;if(r!==void 0){const s=r.getAttribute("position");if(t===!0&&s!==void 0&&e.isInstancedMesh!==!0)for(let a=0,l=s.count;a<l;a++)e.isMesh===!0?e.getVertexPosition(a,Bt):Bt.fromBufferAttribute(s,a),Bt.applyMatrix4(e.matrixWorld),this.expandByPoint(Bt);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),xn.copy(e.boundingBox)):(r.boundingBox===null&&r.computeBoundingBox(),xn.copy(r.boundingBox)),xn.applyMatrix4(e.matrixWorld),this.union(xn)}const n=e.children;for(let s=0,a=n.length;s<a;s++)this.expandByObject(n[s],t);return this}containsPoint(e){return e.x>=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.max.z}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,Bt),Bt.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,r;return e.normal.x>0?(t=e.normal.x*this.min.x,r=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,r=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,r+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,r+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,r+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,r+=e.normal.z*this.min.z),t<=-e.constant&&r>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Si),wn.subVectors(this.max,Si),Xr.subVectors(e.a,Si),Yr.subVectors(e.b,Si),Jr.subVectors(e.c,Si),ar.subVectors(Yr,Xr),or.subVectors(Jr,Yr),Cr.subVectors(Xr,Jr);let t=[0,-ar.z,ar.y,0,-or.z,or.y,0,-Cr.z,Cr.y,ar.z,0,-ar.x,or.z,0,-or.x,Cr.z,0,-Cr.x,-ar.y,ar.x,0,-or.y,or.x,0,-Cr.y,Cr.x,0];return!Ds(t,Xr,Yr,Jr,wn)||(t=[1,0,0,0,1,0,0,0,1],!Ds(t,Xr,Yr,Jr,wn))?!1:(_n.crossVectors(ar,or),t=[_n.x,_n.y,_n.z],Ds(t,Xr,Yr,Jr,wn))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Bt).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Bt).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(Yt[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Yt[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Yt[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Yt[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Yt[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Yt[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Yt[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Yt[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Yt),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(e){return this.min.fromArray(e.min),this.max.fromArray(e.max),this}}const Yt=[new $,new $,new $,new $,new $,new $,new $,new $],Bt=new $,xn=new Zi,Xr=new $,Yr=new $,Jr=new $,ar=new $,or=new $,Cr=new $,Si=new $,wn=new $,_n=new $,Ar=new $;function Ds(i,e,t,r,n){for(let s=0,a=i.length-3;s<=a;s+=3){Ar.fromArray(i,s);const l=n.x*Math.abs(Ar.x)+n.y*Math.abs(Ar.y)+n.z*Math.abs(Ar.z),u=e.dot(Ar),d=t.dot(Ar),c=r.dot(Ar);if(Math.max(-Math.max(u,d,c),Math.min(u,d,c))>l)return!1}return!0}const Fe=new $,Cn=new Ot;let _v=0;class li extends Gi{constructor(e,t,r=!1){if(super(),Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:_v++}),this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=r,this.usage=jo,this.updateRanges=[],this.gpuType=av,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,r){e*=this.itemSize,r*=t.itemSize;for(let n=0,s=this.itemSize;n<s;n++)this.array[e+n]=t.array[r+n];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let t=0,r=this.count;t<r;t++)Cn.fromBufferAttribute(this,t),Cn.applyMatrix3(e),this.setXY(t,Cn.x,Cn.y);else if(this.itemSize===3)for(let t=0,r=this.count;t<r;t++)Fe.fromBufferAttribute(this,t),Fe.applyMatrix3(e),this.setXYZ(t,Fe.x,Fe.y,Fe.z);return this}applyMatrix4(e){for(let t=0,r=this.count;t<r;t++)Fe.fromBufferAttribute(this,t),Fe.applyMatrix4(e),this.setXYZ(t,Fe.x,Fe.y,Fe.z);return this}applyNormalMatrix(e){for(let t=0,r=this.count;t<r;t++)Fe.fromBufferAttribute(this,t),Fe.applyNormalMatrix(e),this.setXYZ(t,Fe.x,Fe.y,Fe.z);return this}transformDirection(e){for(let t=0,r=this.count;t<r;t++)Fe.fromBufferAttribute(this,t),Fe.transformDirection(e),this.setXYZ(t,Fe.x,Fe.y,Fe.z);return this}set(e,t=0){return this.array.set(e,t),this}getComponent(e,t){let r=this.array[e*this.itemSize+t];return this.normalized&&(r=Ci(r,this.array)),r}setComponent(e,t,r){return this.normalized&&(r=nt(r,this.array)),this.array[e*this.itemSize+t]=r,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=Ci(t,this.array)),t}setX(e,t){return this.normalized&&(t=nt(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=Ci(t,this.array)),t}setY(e,t){return this.normalized&&(t=nt(t,this.array)),this.array[e*this.itemSize+1]=t,this}getZ(e){let t=this.array[e*this.itemSize+2];return this.normalized&&(t=Ci(t,this.array)),t}setZ(e,t){return this.normalized&&(t=nt(t,this.array)),this.array[e*this.itemSize+2]=t,this}getW(e){let t=this.array[e*this.itemSize+3];return this.normalized&&(t=Ci(t,this.array)),t}setW(e,t){return this.normalized&&(t=nt(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,r){return e*=this.itemSize,this.normalized&&(t=nt(t,this.array),r=nt(r,this.array)),this.array[e+0]=t,this.array[e+1]=r,this}setXYZ(e,t,r,n){return e*=this.itemSize,this.normalized&&(t=nt(t,this.array),r=nt(r,this.array),n=nt(n,this.array)),this.array[e+0]=t,this.array[e+1]=r,this.array[e+2]=n,this}setXYZW(e,t,r,n,s){return e*=this.itemSize,this.normalized&&(t=nt(t,this.array),r=nt(r,this.array),n=nt(n,this.array),s=nt(s,this.array)),this.array[e+0]=t,this.array[e+1]=r,this.array[e+2]=n,this.array[e+3]=s,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==""&&(e.name=this.name),this.usage!==jo&&(e.usage=this.usage),e}dispose(){this.dispatchEvent({type:"dispose"})}}class Cv extends li{constructor(e,t,r){super(new Uint16Array(e),t,r)}}class Av extends li{constructor(e,t,r){super(new Uint32Array(e),t,r)}}class Sv extends li{constructor(e,t,r){super(new Float32Array(e),t,r)}}const Mv=new Zi,Mi=new $,$s=new $;class Zu{constructor(e=new $,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const r=this.center;t!==void 0?r.copy(t):Mv.setFromPoints(e).getCenter(r);let n=0;for(let s=0,a=e.length;s<a;s++)n=Math.max(n,r.distanceToSquared(e[s]));return this.radius=Math.sqrt(n),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){const t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){const r=this.center.distanceToSquared(e);return t.copy(e),r>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;Mi.subVectors(e,this.center);const t=Mi.lengthSq();if(t>this.radius*this.radius){const r=Math.sqrt(t),n=(r-this.radius)*.5;this.center.addScaledVector(Mi,n/r),this.radius+=n}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):($s.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Mi.copy(e.center).add($s)),this.expandByPoint(Mi.copy(e.center).sub($s))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(e){return this.radius=e.radius,this.center.fromArray(e.center),this}}let Bv=0;const gt=new Lt,Ls=new tr,Zr=new $,ut=new Zi,Bi=new Zi,De=new $;class Ha extends Gi{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:Bv++}),this.uuid=Ki(),this.name="",this.type="BufferGeometry",this.index=null,this.indirect=null,this.indirectOffset=0,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(lv(e)?Av:Cv)(e,1):this.index=e,this}setIndirect(e,t=0){return this.indirect=e,this.indirectOffset=t,this}getIndirect(){return this.indirect}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,t,r=0){this.groups.push({start:e,count:t,materialIndex:r})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){const t=this.attributes.position;t!==void 0&&(t.applyMatrix4(e),t.needsUpdate=!0);const r=this.attributes.normal;if(r!==void 0){const s=new Vt().getNormalMatrix(e);r.applyNormalMatrix(s),r.needsUpdate=!0}const n=this.attributes.tangent;return n!==void 0&&(n.transformDirection(e),n.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return gt.makeRotationFromQuaternion(e),this.applyMatrix4(gt),this}rotateX(e){return gt.makeRotationX(e),this.applyMatrix4(gt),this}rotateY(e){return gt.makeRotationY(e),this.applyMatrix4(gt),this}rotateZ(e){return gt.makeRotationZ(e),this.applyMatrix4(gt),this}translate(e,t,r){return gt.makeTranslation(e,t,r),this.applyMatrix4(gt),this}scale(e,t,r){return gt.makeScale(e,t,r),this.applyMatrix4(gt),this}lookAt(e){return Ls.lookAt(e),Ls.updateMatrix(),this.applyMatrix4(Ls.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Zr).negate(),this.translate(Zr.x,Zr.y,Zr.z),this}setFromPoints(e){const t=this.getAttribute("position");if(t===void 0){const r=[];for(let n=0,s=e.length;n<s;n++){const a=e[n];r.push(a.x,a.y,a.z||0)}this.setAttribute("position",new Sv(r,3))}else{const r=Math.min(e.length,t.count);for(let n=0;n<r;n++){const s=e[n];t.setXYZ(n,s.x,s.y,s.z||0)}e.length>t.count&&Ye("BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),t.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Zi);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){Mr("BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new $(-1/0,-1/0,-1/0),new $(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let r=0,n=t.length;r<n;r++){const s=t[r];ut.setFromBufferAttribute(s),this.morphTargetsRelative?(De.addVectors(this.boundingBox.min,ut.min),this.boundingBox.expandByPoint(De),De.addVectors(this.boundingBox.max,ut.max),this.boundingBox.expandByPoint(De)):(this.boundingBox.expandByPoint(ut.min),this.boundingBox.expandByPoint(ut.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&Mr('BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Zu);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){Mr("BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new $,1/0);return}if(e){const r=this.boundingSphere.center;if(ut.setFromBufferAttribute(e),t)for(let s=0,a=t.length;s<a;s++){const l=t[s];Bi.setFromBufferAttribute(l),this.morphTargetsRelative?(De.addVectors(ut.min,Bi.min),ut.expandByPoint(De),De.addVectors(ut.max,Bi.max),ut.expandByPoint(De)):(ut.expandByPoint(Bi.min),ut.expandByPoint(Bi.max))}ut.getCenter(r);let n=0;for(let s=0,a=e.count;s<a;s++)De.fromBufferAttribute(e,s),n=Math.max(n,r.distanceToSquared(De));if(t)for(let s=0,a=t.length;s<a;s++){const l=t[s],u=this.morphTargetsRelative;for(let d=0,c=l.count;d<c;d++)De.fromBufferAttribute(l,d),u&&(Zr.fromBufferAttribute(e,d),De.add(Zr)),n=Math.max(n,r.distanceToSquared(De))}this.boundingSphere.radius=Math.sqrt(n),isNaN(this.boundingSphere.radius)&&Mr('BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){const e=this.index,t=this.attributes;if(e===null||t.position===void 0||t.normal===void 0||t.uv===void 0){Mr("BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}const r=t.position,n=t.normal,s=t.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new li(new Float32Array(4*r.count),4));const a=this.getAttribute("tangent"),l=[],u=[];for(let k=0;k<r.count;k++)l[k]=new $,u[k]=new $;const d=new $,c=new $,p=new $,f=new Ot,m=new Ot,h=new Ot,g=new $,v=new $;function b(k,N,z){d.fromBufferAttribute(r,k),c.fromBufferAttribute(r,N),p.fromBufferAttribute(r,z),f.fromBufferAttribute(s,k),m.fromBufferAttribute(s,N),h.fromBufferAttribute(s,z),c.sub(d),p.sub(d),m.sub(f),h.sub(f);const j=1/(m.x*h.y-h.x*m.y);isFinite(j)&&(g.copy(c).multiplyScalar(h.y).addScaledVector(p,-m.y).multiplyScalar(j),v.copy(p).multiplyScalar(m.x).addScaledVector(c,-h.x).multiplyScalar(j),l[k].add(g),l[N].add(g),l[z].add(g),u[k].add(v),u[N].add(v),u[z].add(v))}let C=this.groups;C.length===0&&(C=[{start:0,count:e.count}]);for(let k=0,N=C.length;k<N;++k){const z=C[k],j=z.start,W=z.count;for(let J=j,ie=j+W;J<ie;J+=3)b(e.getX(J+0),e.getX(J+1),e.getX(J+2))}const x=new $,A=new $,q=new $,S=new $;function B(k){q.fromBufferAttribute(n,k),S.copy(q);const N=l[k];x.copy(N),x.sub(q.multiplyScalar(q.dot(N))).normalize(),A.crossVectors(S,N);const j=A.dot(u[k])<0?-1:1;a.setXYZW(k,x.x,x.y,x.z,j)}for(let k=0,N=C.length;k<N;++k){const z=C[k],j=z.start,W=z.count;for(let J=j,ie=j+W;J<ie;J+=3)B(e.getX(J+0)),B(e.getX(J+1)),B(e.getX(J+2))}}computeVertexNormals(){const e=this.index,t=this.getAttribute("position");if(t!==void 0){let r=this.getAttribute("normal");if(r===void 0)r=new li(new Float32Array(t.count*3),3),this.setAttribute("normal",r);else for(let f=0,m=r.count;f<m;f++)r.setXYZ(f,0,0,0);const n=new $,s=new $,a=new $,l=new $,u=new $,d=new $,c=new $,p=new $;if(e)for(let f=0,m=e.count;f<m;f+=3){const h=e.getX(f+0),g=e.getX(f+1),v=e.getX(f+2);n.fromBufferAttribute(t,h),s.fromBufferAttribute(t,g),a.fromBufferAttribute(t,v),c.subVectors(a,s),p.subVectors(n,s),c.cross(p),l.fromBufferAttribute(r,h),u.fromBufferAttribute(r,g),d.fromBufferAttribute(r,v),l.add(c),u.add(c),d.add(c),r.setXYZ(h,l.x,l.y,l.z),r.setXYZ(g,u.x,u.y,u.z),r.setXYZ(v,d.x,d.y,d.z)}else for(let f=0,m=t.count;f<m;f+=3)n.fromBufferAttribute(t,f+0),s.fromBufferAttribute(t,f+1),a.fromBufferAttribute(t,f+2),c.subVectors(a,s),p.subVectors(n,s),c.cross(p),r.setXYZ(f+0,c.x,c.y,c.z),r.setXYZ(f+1,c.x,c.y,c.z),r.setXYZ(f+2,c.x,c.y,c.z);this.normalizeNormals(),r.needsUpdate=!0}}normalizeNormals(){const e=this.attributes.normal;for(let t=0,r=e.count;t<r;t++)De.fromBufferAttribute(e,t),De.normalize(),e.setXYZ(t,De.x,De.y,De.z)}toNonIndexed(){function e(l,u){const d=l.array,c=l.itemSize,p=l.normalized,f=new d.constructor(u.length*c);let m=0,h=0;for(let g=0,v=u.length;g<v;g++){l.isInterleavedBufferAttribute?m=u[g]*l.data.stride+l.offset:m=u[g]*c;for(let b=0;b<c;b++)f[h++]=d[m++]}return new li(f,c,p)}if(this.index===null)return Ye("BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const t=new Ha,r=this.index.array,n=this.attributes;for(const l in n){const u=n[l],d=e(u,r);t.setAttribute(l,d)}const s=this.morphAttributes;for(const l in s){const u=[],d=s[l];for(let c=0,p=d.length;c<p;c++){const f=d[c],m=e(f,r);u.push(m)}t.morphAttributes[l]=u}t.morphTargetsRelative=this.morphTargetsRelative;const a=this.groups;for(let l=0,u=a.length;l<u;l++){const d=a[l];t.addGroup(d.start,d.count,d.materialIndex)}return t}toJSON(){const e={metadata:{version:4.7,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,this.name!==""&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),this.parameters!==void 0){const u=this.parameters;for(const d in u)u[d]!==void 0&&(e[d]=u[d]);return e}e.data={attributes:{}};const t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const r=this.attributes;for(const u in r){const d=r[u];e.data.attributes[u]=d.toJSON(e.data)}const n={};let s=!1;for(const u in this.morphAttributes){const d=this.morphAttributes[u],c=[];for(let p=0,f=d.length;p<f;p++){const m=d[p];c.push(m.toJSON(e.data))}c.length>0&&(n[u]=c,s=!0)}s&&(e.data.morphAttributes=n,e.data.morphTargetsRelative=this.morphTargetsRelative);const a=this.groups;a.length>0&&(e.data.groups=JSON.parse(JSON.stringify(a)));const l=this.boundingSphere;return l!==null&&(e.data.boundingSphere=l.toJSON()),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const r=e.index;r!==null&&this.setIndex(r.clone());const n=e.attributes;for(const d in n){const c=n[d];this.setAttribute(d,c.clone(t))}const s=e.morphAttributes;for(const d in s){const c=[],p=s[d];for(let f=0,m=p.length;f<m;f++)c.push(p[f].clone(t));this.morphAttributes[d]=c}this.morphTargetsRelative=e.morphTargetsRelative;const a=e.groups;for(let d=0,c=a.length;d<c;d++){const p=a[d];this.addGroup(p.start,p.count,p.materialIndex)}const l=e.boundingBox;l!==null&&(this.boundingBox=l.clone());const u=e.boundingSphere;return u!==null&&(this.boundingSphere=u.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}let kv=0;class qv extends Gi{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:kv++}),this.uuid=Ki(),this.name="",this.type="Material",this.blending=To,this.side=ua,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=Ro,this.blendDst=Do,this.blendEquation=Po,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new Ji(0,0,0),this.blendAlpha=0,this.depthFunc=$o,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=Uo,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=Nr,this.stencilZFail=Nr,this.stencilZPass=Nr,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.allowOverride=!0,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const t in e){const r=e[t];if(r===void 0){Ye(`Material: parameter '${t}' has value of undefined.`);continue}const n=this[t];if(n===void 0){Ye(`Material: '${t}' is not a property of THREE.${this.type}.`);continue}n&&n.isColor?n.set(r):n&&n.isVector3&&r&&r.isVector3?n.copy(r):this[t]=r}}toJSON(e){const t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});const r={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};r.uuid=this.uuid,r.type=this.type,this.name!==""&&(r.name=this.name),this.color&&this.color.isColor&&(r.color=this.color.getHex()),this.roughness!==void 0&&(r.roughness=this.roughness),this.metalness!==void 0&&(r.metalness=this.metalness),this.sheen!==void 0&&(r.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(r.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(r.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(r.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(r.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(r.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(r.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(r.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(r.shininess=this.shininess),this.clearcoat!==void 0&&(r.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(r.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(r.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(r.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(r.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,r.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.sheenColorMap&&this.sheenColorMap.isTexture&&(r.sheenColorMap=this.sheenColorMap.toJSON(e).uuid),this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture&&(r.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(e).uuid),this.dispersion!==void 0&&(r.dispersion=this.dispersion),this.iridescence!==void 0&&(r.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(r.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(r.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(r.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(r.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(r.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(r.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(r.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(r.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(r.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(r.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(r.lightMap=this.lightMap.toJSON(e).uuid,r.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(r.aoMap=this.aoMap.toJSON(e).uuid,r.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(r.bumpMap=this.bumpMap.toJSON(e).uuid,r.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(r.normalMap=this.normalMap.toJSON(e).uuid,r.normalMapType=this.normalMapType,r.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(r.displacementMap=this.displacementMap.toJSON(e).uuid,r.displacementScale=this.displacementScale,r.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(r.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(r.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(r.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(r.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(r.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(r.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(r.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(r.combine=this.combine)),this.envMapRotation!==void 0&&(r.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(r.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(r.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(r.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(r.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(r.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(r.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(r.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(r.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(r.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(r.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(r.size=this.size),this.shadowSide!==null&&(r.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(r.sizeAttenuation=this.sizeAttenuation),this.blending!==To&&(r.blending=this.blending),this.side!==ua&&(r.side=this.side),this.vertexColors===!0&&(r.vertexColors=!0),this.opacity<1&&(r.opacity=this.opacity),this.transparent===!0&&(r.transparent=!0),this.blendSrc!==Ro&&(r.blendSrc=this.blendSrc),this.blendDst!==Do&&(r.blendDst=this.blendDst),this.blendEquation!==Po&&(r.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(r.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(r.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(r.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(r.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(r.blendAlpha=this.blendAlpha),this.depthFunc!==$o&&(r.depthFunc=this.depthFunc),this.depthTest===!1&&(r.depthTest=this.depthTest),this.depthWrite===!1&&(r.depthWrite=this.depthWrite),this.colorWrite===!1&&(r.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(r.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==Uo&&(r.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(r.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(r.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Nr&&(r.stencilFail=this.stencilFail),this.stencilZFail!==Nr&&(r.stencilZFail=this.stencilZFail),this.stencilZPass!==Nr&&(r.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(r.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(r.rotation=this.rotation),this.polygonOffset===!0&&(r.polygonOffset=!0),this.polygonOffsetFactor!==0&&(r.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(r.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(r.linewidth=this.linewidth),this.dashSize!==void 0&&(r.dashSize=this.dashSize),this.gapSize!==void 0&&(r.gapSize=this.gapSize),this.scale!==void 0&&(r.scale=this.scale),this.dithering===!0&&(r.dithering=!0),this.alphaTest>0&&(r.alphaTest=this.alphaTest),this.alphaHash===!0&&(r.alphaHash=!0),this.alphaToCoverage===!0&&(r.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(r.premultipliedAlpha=!0),this.forceSinglePass===!0&&(r.forceSinglePass=!0),this.allowOverride===!1&&(r.allowOverride=!1),this.wireframe===!0&&(r.wireframe=!0),this.wireframeLinewidth>1&&(r.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(r.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(r.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(r.flatShading=!0),this.visible===!1&&(r.visible=!1),this.toneMapped===!1&&(r.toneMapped=!1),this.fog===!1&&(r.fog=!1),Object.keys(this.userData).length>0&&(r.userData=this.userData);function n(s){const a=[];for(const l in s){const u=s[l];delete u.metadata,a.push(u)}return a}if(t){const s=n(e.textures),a=n(e.images);s.length>0&&(r.textures=s),a.length>0&&(r.images=a)}return r}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let r=null;if(t!==null){const n=t.length;r=new Array(n);for(let s=0;s!==n;++s)r[s]=t[s].clone()}return this.clippingPlanes=r,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.allowOverride=e.allowOverride,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}const Jt=new $,Hs=new $,An=new $,lr=new $,Ns=new $,Sn=new $,Vs=new $;class Fv{constructor(e=new $,t=new $(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,Jt)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const r=t.dot(this.direction);return r<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,r)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=Jt.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Jt.copy(this.origin).addScaledVector(this.direction,t),Jt.distanceToSquared(e))}distanceSqToSegment(e,t,r,n){Hs.copy(e).add(t).multiplyScalar(.5),An.copy(t).sub(e).normalize(),lr.copy(this.origin).sub(Hs);const s=e.distanceTo(t)*.5,a=-this.direction.dot(An),l=lr.dot(this.direction),u=-lr.dot(An),d=lr.lengthSq(),c=Math.abs(1-a*a);let p,f,m,h;if(c>0)if(p=a*u-l,f=a*l-u,h=s*c,p>=0)if(f>=-h)if(f<=h){const g=1/c;p*=g,f*=g,m=p*(p+a*f+2*l)+f*(a*p+f+2*u)+d}else f=s,p=Math.max(0,-(a*f+l)),m=-p*p+f*(f+2*u)+d;else f=-s,p=Math.max(0,-(a*f+l)),m=-p*p+f*(f+2*u)+d;else f<=-h?(p=Math.max(0,-(-a*s+l)),f=p>0?-s:Math.min(Math.max(-s,-u),s),m=-p*p+f*(f+2*u)+d):f<=h?(p=0,f=Math.min(Math.max(-s,-u),s),m=f*(f+2*u)+d):(p=Math.max(0,-(a*s+l)),f=p>0?s:Math.min(Math.max(-s,-u),s),m=-p*p+f*(f+2*u)+d);else f=a>0?-s:s,p=Math.max(0,-(a*f+l)),m=-p*p+f*(f+2*u)+d;return r&&r.copy(this.origin).addScaledVector(this.direction,p),n&&n.copy(Hs).addScaledVector(An,f),m}intersectSphere(e,t){Jt.subVectors(e.center,this.origin);const r=Jt.dot(this.direction),n=Jt.dot(Jt)-r*r,s=e.radius*e.radius;if(n>s)return null;const a=Math.sqrt(s-n),l=r-a,u=r+a;return u<0?null:l<0?this.at(u,t):this.at(l,t)}intersectsSphere(e){return e.radius<0?!1:this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;const r=-(this.origin.dot(e.normal)+e.constant)/t;return r>=0?r:null}intersectPlane(e,t){const r=this.distanceToPlane(e);return r===null?null:this.at(r,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let r,n,s,a,l,u;const d=1/this.direction.x,c=1/this.direction.y,p=1/this.direction.z,f=this.origin;return d>=0?(r=(e.min.x-f.x)*d,n=(e.max.x-f.x)*d):(r=(e.max.x-f.x)*d,n=(e.min.x-f.x)*d),c>=0?(s=(e.min.y-f.y)*c,a=(e.max.y-f.y)*c):(s=(e.max.y-f.y)*c,a=(e.min.y-f.y)*c),r>a||s>n||((s>r||isNaN(r))&&(r=s),(a<n||isNaN(n))&&(n=a),p>=0?(l=(e.min.z-f.z)*p,u=(e.max.z-f.z)*p):(l=(e.max.z-f.z)*p,u=(e.min.z-f.z)*p),r>u||l>n)||((l>r||r!==r)&&(r=l),(u<n||n!==n)&&(n=u),n<0)?null:this.at(r>=0?r:n,t)}intersectsBox(e){return this.intersectBox(e,Jt)!==null}intersectTriangle(e,t,r,n,s){Ns.subVectors(t,e),Sn.subVectors(r,e),Vs.crossVectors(Ns,Sn);let a=this.direction.dot(Vs),l;if(a>0){if(n)return null;l=1}else if(a<0)l=-1,a=-a;else return null;lr.subVectors(this.origin,e);const u=l*this.direction.dot(Sn.crossVectors(lr,Sn));if(u<0)return null;const d=l*this.direction.dot(Ns.cross(lr));if(d<0||u+d>a)return null;const c=-l*lr.dot(Vs);return c<0?null:this.at(c/a,s)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class Qu extends qv{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Ji(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Yi,this.combine=rv,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const ol=new Lt,Sr=new Fv,Mn=new Zu,ll=new $,Bn=new $,kn=new $,qn=new $,Us=new $,Fn=new $,ul=new $,En=new $;class Ev extends tr{constructor(e=new Ha,t=new Qu){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.count=1,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),e.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){const t=this.geometry.morphAttributes,r=Object.keys(t);if(r.length>0){const n=t[r[0]];if(n!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,a=n.length;s<a;s++){const l=n[s].name||String(s);this.morphTargetInfluences.push(0),this.morphTargetDictionary[l]=s}}}}getVertexPosition(e,t){const r=this.geometry,n=r.attributes.position,s=r.morphAttributes.position,a=r.morphTargetsRelative;t.fromBufferAttribute(n,e);const l=this.morphTargetInfluences;if(s&&l){Fn.set(0,0,0);for(let u=0,d=s.length;u<d;u++){const c=l[u],p=s[u];c!==0&&(Us.fromBufferAttribute(p,e),a?Fn.addScaledVector(Us,c):Fn.addScaledVector(Us.sub(t),c))}t.add(Fn)}return t}raycast(e,t){const r=this.geometry,n=this.material,s=this.matrixWorld;n!==void 0&&(r.boundingSphere===null&&r.computeBoundingSphere(),Mn.copy(r.boundingSphere),Mn.applyMatrix4(s),Sr.copy(e.ray).recast(e.near),!(Mn.containsPoint(Sr.origin)===!1&&(Sr.intersectSphere(Mn,ll)===null||Sr.origin.distanceToSquared(ll)>(e.far-e.near)**2))&&(ol.copy(s).invert(),Sr.copy(e.ray).applyMatrix4(ol),!(r.boundingBox!==null&&Sr.intersectsBox(r.boundingBox)===!1)&&this._computeIntersections(e,t,Sr)))}_computeIntersections(e,t,r){let n;const s=this.geometry,a=this.material,l=s.index,u=s.attributes.position,d=s.attributes.uv,c=s.attributes.uv1,p=s.attributes.normal,f=s.groups,m=s.drawRange;if(l!==null)if(Array.isArray(a))for(let h=0,g=f.length;h<g;h++){const v=f[h],b=a[v.materialIndex],C=Math.max(v.start,m.start),x=Math.min(l.count,Math.min(v.start+v.count,m.start+m.count));for(let A=C,q=x;A<q;A+=3){const S=l.getX(A),B=l.getX(A+1),k=l.getX(A+2);n=On(this,b,e,r,d,c,p,S,B,k),n&&(n.faceIndex=Math.floor(A/3),n.face.materialIndex=v.materialIndex,t.push(n))}}else{const h=Math.max(0,m.start),g=Math.min(l.count,m.start+m.count);for(let v=h,b=g;v<b;v+=3){const C=l.getX(v),x=l.getX(v+1),A=l.getX(v+2);n=On(this,a,e,r,d,c,p,C,x,A),n&&(n.faceIndex=Math.floor(v/3),t.push(n))}}else if(u!==void 0)if(Array.isArray(a))for(let h=0,g=f.length;h<g;h++){const v=f[h],b=a[v.materialIndex],C=Math.max(v.start,m.start),x=Math.min(u.count,Math.min(v.start+v.count,m.start+m.count));for(let A=C,q=x;A<q;A+=3){const S=A,B=A+1,k=A+2;n=On(this,b,e,r,d,c,p,S,B,k),n&&(n.faceIndex=Math.floor(A/3),n.face.materialIndex=v.materialIndex,t.push(n))}}else{const h=Math.max(0,m.start),g=Math.min(u.count,m.start+m.count);for(let v=h,b=g;v<b;v+=3){const C=v,x=v+1,A=v+2;n=On(this,a,e,r,d,c,p,C,x,A),n&&(n.faceIndex=Math.floor(v/3),t.push(n))}}}}function Ov(i,e,t,r,n,s,a,l){let u;if(e.side===ev?u=r.intersectTriangle(a,s,n,!0,l):u=r.intersectTriangle(n,s,a,e.side===ua,l),u===null)return null;En.copy(l),En.applyMatrix4(i.matrixWorld);const d=t.ray.origin.distanceTo(En);return d<t.near||d>t.far?null:{distance:d,point:En.clone(),object:i}}function On(i,e,t,r,n,s,a,l,u,d){i.getVertexPosition(l,Bn),i.getVertexPosition(u,kn),i.getVertexPosition(d,qn);const c=Ov(i,e,t,r,Bn,kn,qn,ul);if(c){const p=new $;Ft.getBarycoord(ul,Bn,kn,qn,p),n&&(c.uv=Ft.getInterpolatedAttribute(n,l,u,d,p,new Ot)),s&&(c.uv1=Ft.getInterpolatedAttribute(s,l,u,d,p,new Ot)),a&&(c.normal=Ft.getInterpolatedAttribute(a,l,u,d,p,new $),c.normal.dot(r.direction)>0&&c.normal.multiplyScalar(-1));const f={a:l,b:u,c:d,normal:new $,materialIndex:0};Ft.getNormal(Bn,kn,qn,f.normal),c.face=f,c.barycoord=p}return c}const Ga=class Ga{constructor(e,t,r,n){this.elements=[1,0,0,1],e!==void 0&&this.set(e,t,r,n)}identity(){return this.set(1,0,0,1),this}fromArray(e,t=0){for(let r=0;r<4;r++)this.elements[r]=e[r+t];return this}set(e,t,r,n){const s=this.elements;return s[0]=e,s[2]=t,s[1]=r,s[3]=n,this}};Ga.prototype.isMatrix2=!0;let dl=Ga;typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:Gu}}));typeof window<"u"&&(window.__THREE__?Ye("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=Gu);const zv=new Vt;zv.set(-1,0,0,0,1,0,0,0,1);const Iv=new Vt;Iv.set(-1,0,0,0,1,0,0,0,1);class Tv extends Ev{type="HighlightMesh";createTime;constructor(...e){super(...e),this.createTime=Date.now()}onBeforeRender(){const t=(Date.now()-this.createTime)/1e3,s=1+.07*Math.sin(2.5*t);this.scale.set(s,s,s)}}const ed={scene:"i-carbon-web-services-container",perspectivecamera:"i-carbon-video",mesh:"i-carbon-cube",group:"i-carbon-group-objects",ambientlight:"i-carbon-light",directionallight:"i-carbon-light",spotlight:"i-iconoir-project-curve-3d",position:"i-iconoir-axes",rotation:"i-carbon-rotate-clockwise",scale:"i-iconoir-ellipse-3d-three-points",bone:"i-ph-bone",skinnedmesh:"carbon:3d-print-mesh"};function cl(i){return{name:i.name,value:i,key:i.uuid,label:i.type,type:i.type,icon:ed[i.type.toLowerCase()]||"i-carbon-cube",defaultExpanded:i.isScene,memorySize:Math.round(Zy(i)/1024),children:[]}}function Pv(i){function e(r,n){r.children.forEach(s=>{if(s.type==="HighlightMesh")return;const a=cl(s);n.children.push(a),e(s,a)})}const t=cl(i);return e(i,t),t}function ei(i,e="root",t="root",r=new WeakSet){const n=typeof i;if(i===null||n!=="object")return{label:e,type:n,path:t,value:i,defaultExpanded:t==="root"};if(r.has(i))return{label:e,type:"circular",path:t,value:"[Circular]",defaultExpanded:t==="root"};if(r.add(i),Array.isArray(i))return{label:e,type:"array",path:t,value:`Array[${i.length}]`,defaultExpanded:t==="root",children:i.map((l,u)=>ei(l,String(u),`${t}[${u}]`,r))};const s=[],a=i.constructor?.name||"Object";if(a==="_Euler"){const l=i,u=["x","y","z","order"];for(const d of u){const c=l[d],p=t==="root"?d:`${t}.${d}`;s.push(ei(c,d,p,r))}}else if(a==="Quaternion"){const l=i,u=["x","y","z","w"];for(const d of u){const c=l[d],p=t==="root"?d:`${t}.${d}`;s.push(ei(c,d,p,r))}}else if(a==="_Vector3"){const l=i,u=["x","y","z"];for(const d of u){const c=l[d],p=t==="root"?d:`${t}.${d}`;s.push(ei(c,d,p,r))}}else for(const l of Object.keys(i)){if(l.startsWith("_")||l.startsWith("$")||l==="__v_isRef"||l==="__v_isReactive"||l==="__v_isShallow"||l==="__v_raw"||l==="__v_isReadonly")continue;const u=i[l];if(typeof u=="function")continue;const d=t==="root"?l:`${t}.${l}`;s.push(ei(u,l,d,r))}return{label:e,type:"object",path:t,value:a==="Euler"?"Euler":a==="Quaternion"?"Quaternion":a==="Vector3"?"Vector3":a,defaultExpanded:t==="root",children:s}}function Rv(i){const e=new Qu({color:11003607,transparent:!0,opacity:.2,depthTest:!1,side:tv});return new Tv(i.geometry.clone(),e)}const Dv={key:1,class:"w-3 h-3 rounded-full border border-neutral-300 dark:border-neutral-600",style:{background:"linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #feca57)"}},$v={key:2,class:"w-3 h-3 rounded-full border border-neutral-300 dark:border-neutral-600 bg-neutral-200 dark:bg-neutral-700"},Lv=P({__name:"MaterialBadge",props:{material:{},displayValue:{}},setup(i){function e(s){return s!==null&&typeof s=="object"&&s.constructor?.name?.includes("Material")}function t(s){if(!s||typeof s!="object")return null;if("color"in s&&s.color&&typeof s.color=="object"){const a=s.color;if("getHexString"in a&&typeof a.getHexString=="function")return`#${a.getHexString()}`}return null}function r(s){return s!==null&&typeof s=="object"&&(s.constructor?.name==="MeshNormalMaterial"||s.constructor?.name==="MeshStandardMaterial"||s.constructor?.name==="MeshBasicMaterial")}function n(s){return typeof s=="boolean"?"text-blue-500 dark:text-blue-400":typeof s=="number"?"text-primary-500":typeof s=="string"?"text-red-500 dark:text-red-400":typeof s>"u"?"text-neutral-400 dark:text-neutral-500":"text-neutral-600 dark:text-neutral-400"}return(s,a)=>{const l=yr;return e(i.material)?(y(),_(l,{key:0,variant:"soft",color:"neutral",size:"sm",class:"flex items-center gap-1 ml-1"},{default:w(()=>[t(i.material)?(y(),V("div",{key:0,class:"w-3 h-3 rounded-full border border-neutral-300 dark:border-neutral-600",style:Et({backgroundColor:t(i.material)})},null,4)):r(i.material)?(y(),V("div",Dv)):(y(),V("div",$v)),D("span",{class:I(n(i.material))},ee(i.displayValue),3)]),_:1})):R("",!0)}}}),Hv=Object.assign(Lv,{__name:"InspectorMaterialBadge"}),Nv=P({__name:"GeometryBadge",props:{geometry:{},displayValue:{}},setup(i){const e={box:"i-carbon-cube",sphere:"i-tabler-circle",plane:"i-tabler-square",cylinder:"i-tabler-cylinder",cone:"i-tabler-cone",torus:"i-tabler-circle-dashed",circle:"i-tabler-circle-filled",ring:"i-tabler-circle",dodecahedron:"i-carbon-polygon",icosahedron:"i-carbon-polygon",octahedron:"i-carbon-polygon",tetrahedron:"i-carbon-polygon",tube:"i-tabler-pipe",extrude:"i-tabler-box",lathe:"i-tabler-rotate-3d"};function t(s){return s!==null&&typeof s=="object"&&s.constructor?.name?.includes("Geometry")}function r(s){if(!s||typeof s!="object")return"i-carbon-cube";const l=(s.constructor?.name?.toLowerCase()||"").replace(/geometry$/,"").replace(/^_+/,"");return e[l]||"i-carbon-cube"}function n(s){return typeof s=="boolean"?"text-blue-500 dark:text-blue-400":typeof s=="number"?"text-primary-500":typeof s=="string"?"text-red-500 dark:text-red-400":typeof s>"u"?"text-neutral-400 dark:text-neutral-500":"text-neutral-600 dark:text-neutral-400"}return(s,a)=>{const l=Ae,u=yr;return t(i.geometry)?(y(),_(u,{key:0,variant:"soft",color:"neutral",size:"sm",class:"flex items-center gap-1 ml-1"},{default:w(()=>[E(l,{name:r(i.geometry),class:"w-3 h-3 text-neutral-600"},null,8,["name"]),D("span",{class:I(n(i.geometry))},ee(i.displayValue),3)]),_:1})):R("",!0)}}}),Vv=Object.assign(Nv,{__name:"InspectorGeometryBadge"}),Uv={class:"text-sm text-neutral-500 dark:text-neutral-400 pt-2 pb-8"},jv={class:"flex items-center gap-1 py-0.5 mb-4 hover:bg-neutral-50 dark:hover:bg-neutral-800 group"},Wv={class:"text-neutral-600 dark:text-neutral-300 font-semibold"},Gv={class:"pl-5 flex flex-col gap-1"},Kv={class:"flex items-center gap-1 min-w-0"},Xv={key:0,class:"flex items-center gap-1 ml-1"},Yv=P({__name:"Props",props:{object:{}},emits:["update-value"],setup(i,{emit:e}){const t=e,r=i,n=F(()=>ed[r.object.type.toLowerCase()]||"i-carbon-cube"),s={PerspectiveCamera:["fov","position","rotation","far","near","aspect"],OrthographicCamera:["position","rotation","left","right","top","bottom","near","far"],DirectionalLight:["color","intensity","position"],PointLight:["color","intensity","position","distance","decay"],SpotLight:["color","intensity","position","target","angle","penumbra"],AmbientLight:["color","intensity"],Mesh:["position","rotation","scale","material","geometry","visible"],SkinnedMesh:["position","rotation","scale","material","geometry","skeleton"],Group:["position","rotation","scale","visible"],Object3D:["position","rotation","scale","visible"],Scene:["background","environment","fog"]};function a(h,g){return g&&typeof g=="object"&&"r"in g&&"g"in g&&"b"in g&&"getHexString"in g?`#${g.getHexString()}`:g}const l=F(()=>{const h=r.object.type;return(s[h]||["position","rotation","scale"]).map(v=>{const b=u(r.object,v);return{key:v,value:a(v,b),displayValue:d(v,b)}}).filter(v=>v.value!==void 0)});function u(h,g){return g.split(".").reduce((v,b)=>v&&typeof v=="object"&&b in v?v[b]:void 0,h)}function d(h,g){return g==null?"undefined":c(g)?"vector":p(g)?g.constructor?.name||"Material":f(g)?(g.constructor?.name||"Geometry").replace(/Geometry$/,"").replace(/^_+/,""):g&&typeof g=="object"&&"r"in g&&"g"in g&&"b"in g&&"getHexString"in g?`#${g.getHexString()}`:typeof g=="number"?Number.isInteger(g)?g.toString():g.toFixed(2):typeof g=="boolean"?g?"true":"false":typeof g=="object"?g.constructor?.name||"Object":String(g)}function c(h){return h!==null&&typeof h=="object"&&"x"in h&&"y"in h&&"z"in h&&typeof h.x=="number"&&typeof h.y=="number"&&typeof h.z=="number"}function p(h){return h!==null&&typeof h=="object"&&h.constructor?.name?.includes("Material")}function f(h){return h!==null&&typeof h=="object"&&h.constructor?.name?.includes("Geometry")}function m(h){return typeof h=="boolean"?"text-blue-500 dark:text-blue-400":typeof h=="number"?"text-green-500 dark:text-green-400":typeof h=="string"?"text-red-500 dark:text-red-400":typeof h>"u"?"text-neutral-400 dark:text-neutral-500":"text-neutral-600 dark:text-neutral-400"}return(h,g)=>{const v=Ae,b=yr,C=py,x=ct,A=Uy,q=Hu;return y(),V("div",Uv,[D("div",jv,[E(v,{name:n.value,class:"w-4 h-4 text-neutral-600 dark:text-neutral-400 flex-shrink-0"},null,8,["name"]),D("span",Wv,ee(i.object.type),1),i.object.name?(y(),_(b,{key:0,variant:"soft",size:"xs",class:"ml-2"},{default:w(()=>[ue(ee(i.object.name),1)]),_:1})):R("",!0)]),D("div",Gv,[(y(!0),V(ve,null,Xe(l.value,S=>(y(),V("div",{key:S.key,class:"flex items-center justify-between py-0.5 hover:bg-neutral-50 dark:hover:bg-neutral-800 group"},[D("div",Kv,[D("span",null,ee(S.key)+" :",1),c(S.value)?(y(),V("div",Xv,[E(C,{modelValue:S.value.x,"onUpdate:modelValue":[B=>S.value.x=B,B=>t("update-value",S.key+".x",B)]},null,8,["modelValue","onUpdate:modelValue"]),E(C,{modelValue:S.value.y,"onUpdate:modelValue":[B=>S.value.y=B,B=>t("update-value",S.key+".y",B)]},null,8,["modelValue","onUpdate:modelValue"]),E(C,{modelValue:S.value.z,"onUpdate:modelValue":[B=>S.value.z=B,B=>t("update-value",S.key+".z",B)]},null,8,["modelValue","onUpdate:modelValue"])])):p(S.value)?(y(),_(Hv,{key:1,material:S.value,"display-value":S.displayValue},null,8,["material","display-value"])):f(S.value)?(y(),_(Vv,{key:2,geometry:S.value,"display-value":S.displayValue},null,8,["geometry","display-value"])):S.key==="visible"?(y(),_(x,{key:3,size:"xs",class:"ml-1 mr-1",variant:"soft",icon:S.value?"i-lucide-eye":"i-lucide-eye-closed",onClick:()=>t("update-value",S.key,!S.value)},null,8,["icon","onClick"])):S.key==="color"?(y(),_(A,{key:4,modelValue:S.value,"onUpdate:modelValue":[B=>S.value=B,B=>t("update-value",S.key,B)]},null,8,["modelValue","onUpdate:modelValue"])):typeof S.value=="number"?(y(),_(C,{key:5,modelValue:S.value,"onUpdate:modelValue":[B=>S.value=B,B=>t("update-value",S.key,B)],class:"ml-1"},null,8,["modelValue","onUpdate:modelValue"])):(y(),V("span",{key:6,class:I([m(S.value),"ml-1"])},ee(S.displayValue),3))]),D("div",{class:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity ml-auto",onClick:g[0]||(g[0]=ye(()=>{},["stop"]))},[E(q,{size:"xs",items:[{label:"Copy Value",icon:"i-lucide:copy",onSelect:()=>o(Vu)(S.value)},S.displayValue==="vector"&&{label:"Copy as prop",icon:"i-material-symbols:data-array",onSelect:()=>o(Nu)({path:S.key,value:Object.values(S.value)})},S.displayValue==="vector"&&S.key==="rotation"&&{label:"Copy as Euler",icon:"i-lucide:rotate-3d",onSelect:()=>o(ju)({children:[{label:"x",value:S.value.x},{label:"y",value:S.value.y},{label:"z",value:S.value.z},{label:"order",value:S.value.order||"XYZ"}]})},S.displayValue==="vector"&&S.key!=="rotation"&&{label:"Copy as Vector3",icon:"i-lucide:pen-line",onSelect:()=>o(Uu)({children:Object.values(S.value).map(B=>({value:B}))})},S.displayValue==="vector"&&S.key==="quaternion"&&{label:"Copy as Quaternion",icon:"i-lucide:rotate-3d",onSelect:()=>o(Wu)({children:[{label:"x",value:S.value.x},{label:"y",value:S.value.y},{label:"z",value:S.value.z},{label:"w",value:S.value.w||1}]})}].filter(Boolean),ui:{content:"w-48"}},{default:w(()=>[E(x,{size:"xs",variant:"ghost",color:"neutral",icon:"i-lucide-ellipsis-vertical",title:"Copy value"})]),_:1},8,["items"])])]))),128))])])}}}),Jv=Object.assign(Yv,{__name:"InspectorProps"}),Zv={slots:{root:"flex items-center align-center text-center",border:"",container:"font-medium text-default flex",icon:"shrink-0 size-5",avatar:"shrink-0",avatarSize:"2xs",label:"text-sm"},variants:{color:{primary:{border:"border-primary"},secondary:{border:"border-secondary"},success:{border:"border-success"},info:{border:"border-info"},warning:{border:"border-warning"},error:{border:"border-error"},neutral:{border:"border-default"}},orientation:{horizontal:{root:"w-full flex-row",border:"w-full",container:"whitespace-nowrap"},vertical:{root:"h-full flex-col",border:"h-full",container:""}},size:{xs:"",sm:"",md:"",lg:"",xl:""},position:{start:"",center:"",end:""},type:{solid:{border:"border-solid"},dashed:{border:"border-dashed"},dotted:{border:"border-dotted"}}},compoundVariants:[{orientation:"horizontal",position:"start",class:{container:"me-3"}},{orientation:"horizontal",position:"center",class:{container:"mx-3"}},{orientation:"horizontal",position:"end",class:{container:"ms-3"}},{orientation:"vertical",position:"start",class:{container:"mb-2"}},{orientation:"vertical",position:"center",class:{container:"my-2"}},{orientation:"vertical",position:"end",class:{container:"mt-2"}},{orientation:"horizontal",size:"xs",class:{border:"border-t"}},{orientation:"horizontal",size:"sm",class:{border:"border-t-[2px]"}},{orientation:"horizontal",size:"md",class:{border:"border-t-[3px]"}},{orientation:"horizontal",size:"lg",class:{border:"border-t-[4px]"}},{orientation:"horizontal",size:"xl",class:{border:"border-t-[5px]"}},{orientation:"vertical",size:"xs",class:{border:"border-s"}},{orientation:"vertical",size:"sm",class:{border:"border-s-[2px]"}},{orientation:"vertical",size:"md",class:{border:"border-s-[3px]"}},{orientation:"vertical",size:"lg",class:{border:"border-s-[4px]"}},{orientation:"vertical",size:"xl",class:{border:"border-s-[5px]"}}],defaultVariants:{color:"neutral",size:"xs",type:"solid"}},Qv={__name:"USeparator",props:{as:{type:null,required:!1},label:{type:String,required:!1},icon:{type:null,required:!1},avatar:{type:Object,required:!1},color:{type:null,required:!1},size:{type:null,required:!1},type:{type:null,required:!1},orientation:{type:null,required:!1,default:"horizontal"},position:{type:null,required:!1,default:"center"},class:{type:null,required:!1},ui:{type:null,required:!1},decorative:{type:Boolean,required:!1}},setup(i){const e=i,t=Je(),r=Re("separator",e),n=Me(),s=Pt(zt(r,"as","decorative","orientation")),[a,l]=ii(),u=F(()=>!!(r.label||r.icon||r.avatar||t.default)),d=F(()=>de({extend:de(Zv),...n.ui?.separator||{}})({color:r.color,orientation:r.orientation,size:r.size,position:r.position,type:r.type}));return(c,p)=>(y(),V(ve,null,[E(o(a),null,{default:w(()=>[D("div",{"data-slot":"container",class:I(d.value.container({class:o(r).ui?.container}))},[M(c.$slots,"default",{ui:d.value},()=>[o(r).label?(y(),V("span",{key:0,"data-slot":"label",class:I(d.value.label({class:o(r).ui?.label}))},ee(o(r).label),3)):o(r).icon?(y(),_(Ae,{key:1,name:o(r).icon,"data-slot":"icon",class:I(d.value.icon({class:o(r).ui?.icon}))},null,8,["name","class"])):o(r).avatar?(y(),_(gi,L({key:2,size:o(r).ui?.avatarSize||d.value.avatarSize()},o(r).avatar,{"data-slot":"avatar",class:d.value.avatar({class:o(r).ui?.avatar})}),null,16,["size","class"])):R("",!0)])],2)]),_:3}),E(o(Lm),L(o(s),{"data-slot":"root",class:d.value.root({class:[o(r).ui?.root,o(r).class]})}),{default:w(()=>[u.value&&o(r).position==="start"?(y(),_(o(l),{key:0})):R("",!0),D("div",{"data-slot":"border",class:I(d.value.border({class:o(r).ui?.border}))},null,2),u.value&&o(r).position==="center"?(y(),V(ve,{key:1},[E(o(l)),D("div",{"data-slot":"border",class:I(d.value.border({class:o(r).ui?.border}))},null,2)],64)):R("",!0),u.value&&o(r).position==="end"?(y(),_(o(l),{key:2})):R("",!0)]),_:1},16,["class"])],64))}},eb={slots:{root:"relative flex items-start",container:"flex items-center",base:"rounded-sm ring ring-inset ring-accented overflow-hidden focus-visible:outline-2 focus-visible:outline-offset-2",indicator:"flex items-center justify-center size-full text-inverted",icon:"shrink-0 size-full",wrapper:"w-full",label:"block font-medium text-default",description:"text-muted"},variants:{color:{primary:{base:"focus-visible:outline-primary",indicator:"bg-primary"},secondary:{base:"focus-visible:outline-secondary",indicator:"bg-secondary"},success:{base:"focus-visible:outline-success",indicator:"bg-success"},info:{base:"focus-visible:outline-info",indicator:"bg-info"},warning:{base:"focus-visible:outline-warning",indicator:"bg-warning"},error:{base:"focus-visible:outline-error",indicator:"bg-error"},neutral:{base:"focus-visible:outline-inverted",indicator:"bg-inverted"}},variant:{list:{root:""},card:{root:"border border-muted rounded-lg"}},indicator:{start:{root:"flex-row",wrapper:"ms-2"},end:{root:"flex-row-reverse",wrapper:"me-2"},hidden:{base:"sr-only",wrapper:"text-center"}},size:{xs:{base:"size-3",container:"h-4",wrapper:"text-xs"},sm:{base:"size-3.5",container:"h-4",wrapper:"text-xs"},md:{base:"size-4",container:"h-5",wrapper:"text-sm"},lg:{base:"size-4.5",container:"h-5",wrapper:"text-sm"},xl:{base:"size-5",container:"h-6",wrapper:"text-base"}},required:{true:{label:"after:content-['*'] after:ms-0.5 after:text-error"}},disabled:{true:{root:"opacity-75",base:"cursor-not-allowed",label:"cursor-not-allowed",description:"cursor-not-allowed"}},highlight:{true:""},checked:{true:""}},compoundVariants:[{size:"xs",variant:"card",class:{root:"p-2.5"}},{size:"sm",variant:"card",class:{root:"p-3"}},{size:"md",variant:"card",class:{root:"p-3.5"}},{size:"lg",variant:"card",class:{root:"p-4"}},{size:"xl",variant:"card",class:{root:"p-4.5"}},{color:"primary",variant:"card",class:{root:"has-data-[state=checked]:border-primary"}},{color:"secondary",variant:"card",class:{root:"has-data-[state=checked]:border-secondary"}},{color:"success",variant:"card",class:{root:"has-data-[state=checked]:border-success"}},{color:"info",variant:"card",class:{root:"has-data-[state=checked]:border-info"}},{color:"warning",variant:"card",class:{root:"has-data-[state=checked]:border-warning"}},{color:"error",variant:"card",class:{root:"has-data-[state=checked]:border-error"}},{color:"neutral",variant:"card",class:{root:"has-data-[state=checked]:border-inverted"}},{variant:"card",disabled:!0,class:{root:"cursor-not-allowed"}},{color:"primary",highlight:!0,class:{base:"ring-primary"}},{color:"secondary",highlight:!0,class:{base:"ring-secondary"}},{color:"success",highlight:!0,class:{base:"ring-success"}},{color:"info",highlight:!0,class:{base:"ring-info"}},{color:"warning",highlight:!0,class:{base:"ring-warning"}},{color:"error",highlight:!0,class:{base:"ring-error"}},{color:"neutral",highlight:!0,class:{base:"ring-inverted"}}],defaultVariants:{size:"md",color:"primary",variant:"list",indicator:"start"}},tb=Object.assign({inheritAttrs:!1},{__name:"UCheckbox",props:{as:{type:null,required:!1},label:{type:String,required:!1},description:{type:String,required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},indicator:{type:null,required:!1},highlight:{type:Boolean,required:!1},icon:{type:null,required:!1},indeterminateIcon:{type:null,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1},disabled:{type:Boolean,required:!1},required:{type:Boolean,required:!1},name:{type:String,required:!1},value:{type:null,required:!1},id:{type:String,required:!1},defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1},trueValue:{type:null,required:!1},falseValue:{type:null,required:!1}},emits:["change","update:modelValue"],setup(i,{emit:e}){const t=i,r=Je(),n=e,s=Re("checkbox",t),a=Me(),l=Pt(zt(s,"required","value","defaultValue","modelValue","trueValue","falseValue"),n),{id:u,emitFormChange:d,emitFormInput:c,size:p,color:f,highlight:m,name:h,disabled:g,ariaAttrs:v}=ga(t),b=u.value??ml(),C=Rd(),x=F(()=>{const{"data-state":S,...B}=C;return B}),A=F(()=>de({extend:de(eb),...a.ui?.checkbox||{}})({size:p.value??s.size,color:f.value??s.color,variant:s.variant,indicator:s.indicator,highlight:m.value??s.highlight,required:s.required,disabled:g.value}));function q(S){const B=new Event("change",{target:{value:S}});n("change",B),d(),c()}return(S,B)=>(y(),_(o(se),{as:!o(s).variant||o(s).variant==="list"?o(s).as:o(wo),"data-slot":"root",class:I(A.value.root({class:[o(s).ui?.root,o(s).class]}))},{default:w(()=>[D("div",{"data-slot":"container",class:I(A.value.container({class:o(s).ui?.container}))},[E(o(ff),L({id:o(b)},{...o(l),...x.value,...o(v)},{name:o(h),disabled:o(g),"data-slot":"base",class:A.value.base({class:o(s).ui?.base}),"onUpdate:modelValue":q}),{default:w(({state:k})=>[E(o(mf),{"data-slot":"indicator",class:I(A.value.indicator({class:o(s).ui?.indicator}))},{default:w(()=>[k==="indeterminate"?(y(),_(Ae,{key:0,name:o(s).indeterminateIcon||o(a).ui.icons.minus,"data-slot":"icon",class:I(A.value.icon({class:o(s).ui?.icon}))},null,8,["name","class"])):(y(),_(Ae,{key:1,name:o(s).icon||o(a).ui.icons.check,"data-slot":"icon",class:I(A.value.icon({class:o(s).ui?.icon}))},null,8,["name","class"]))]),_:2},1032,["class"])]),_:1},16,["id","name","disabled","class"])],2),o(s).label||r.label||o(s).description||r.description?(y(),V("div",{key:0,"data-slot":"wrapper",class:I(A.value.wrapper({class:o(s).ui?.wrapper}))},[o(s).label||r.label?(y(),_(pi(!o(s).variant||o(s).variant==="list"?o(wo):"p"),{key:0,for:o(b),"data-slot":"label",class:I(A.value.label({class:o(s).ui?.label}))},{default:w(()=>[M(S.$slots,"label",{label:o(s).label},()=>[ue(ee(o(s).label),1)])]),_:3},8,["for","class"])):R("",!0),o(s).description||r.description?(y(),V("p",{key:1,"data-slot":"description",class:I(A.value.description({class:o(s).ui?.description}))},[M(S.$slots,"description",{description:o(s).description},()=>[ue(ee(o(s).description),1)])],2)):R("",!0)],2)):R("",!0)]),_:3},8,["as","class"]))}}),rb={class:"font-mono text-xs text-neutral-500 dark:text-neutral-400"},ib={key:1,class:"mr-1 w-4 h-4"},nb={class:"flex items-center gap-1 flex-1 min-w-0"},sb={class:"text-neutral-600 dark:text-neutral-300 font-semibold"},ab=P({__name:"Tree",props:{node:{},level:{default:0},selectedObject:{}},emits:["update-value"],setup(i,{emit:e}){const t=i,r=e,n=T(t.node.defaultExpanded??!1),s=T(null),a=()=>{n.value=!n.value},l=x=>typeof x=="boolean"?"text-blue-500 dark:text-blue-400":typeof x=="number"?"text-green-500 dark:text-green-400":typeof x=="string"?"text-red-500 dark:text-red-400":typeof x>"u"?"text-neutral-400 dark:text-neutral-500":"text-neutral-600 dark:text-neutral-400",u=x=>typeof x=="boolean"?x?"true":"false":typeof x=="number"?x.toString():typeof x=="string"?`"${x}"`:x===null?"null":typeof x>"u"?"undefined":"object",d=()=>{if(typeof t.node.value=="number"){const x=t.node.value+1;r("update-value",t.node.path,x)}},c=()=>{if(typeof t.node.value=="number"){const x=t.node.value-1;r("update-value",t.node.path,x)}},p=x=>{r("update-value",t.node.path,x)},f=()=>{const x=typeof t.node.value=="string"?t.node.value:JSON.stringify(t.node.value);s.value={path:t.node.path,value:x}},m=()=>{if(s.value)try{const{value:x}=s.value;let A=x;Number.isNaN(Number(x))?(x.toLowerCase()==="true"||x.toLowerCase()==="false")&&(A=x.toLowerCase()==="true"):A=Number(x),r("update-value",t.node.path,A)}catch(x){console.error("Failed to apply edit:",x)}finally{s.value=null}},h=()=>{s.value=null},g=x=>{x.key==="Enter"?m():x.key==="Escape"&&h()},v=F(()=>t.node.children&&t.node.children.length>0),b=F(()=>!v.value),C=F(()=>({paddingLeft:`${t.level*16}px`}));return(x,A)=>{const q=Ae,S=ct,B=Hu,k=tb,N=$u,z=Su,j=td;return y(),V("div",rb,[D("div",{style:Et(C.value),class:I(["flex items-center py-0.5 hover:bg-neutral-50 dark:hover:bg-neutral-800 group",{"cursor-pointer":v.value}])},[v.value?(y(),V("div",{key:0,class:"mr-1 w-4 h-4 flex items-center justify-center",onClick:a},[E(q,{name:n.value?"i-tabler:caret-down-filled":"i-tabler:caret-right-filled",class:"w-3 h-3 text-neutral-400 dark:text-neutral-500"},null,8,["name"])])):(y(),V("div",ib)),D("div",nb,[i.node.type==="object"||i.node.type==="array"?(y(),V(ve,{key:0},[D("span",{class:"cursor-pointer select-none",onClick:A[0]||(A[0]=W=>v.value?a():void 0)},[ue(ee(i.node.label)+" : ",1),D("span",sb,ee(i.node.value),1)]),i.node.type!=="array"?(y(),_(B,{key:0,size:"xs",items:[{label:"Copy Path",icon:"i-lucide:link",onSelect:()=>o(Io)(i.node.path)},{label:"Copy value as Array",icon:"i-material-symbols:data-array",onSelect:()=>o(Yy)(i.node)},i.node.value==="_Vector3"?{label:"Copy value as Vector3",icon:"i-lucide:pen-line",onSelect:()=>o(Uu)(i.node)}:null,i.node.value==="_Euler"?{label:"Copy as Euler",icon:"i-lucide:rotate-3d",onSelect:()=>o(ju)(i.node)}:null,i.node.value==="_Quaternion"?{label:"Copy as Quaternion",icon:"i-lucide:rotate-3d",onSelect:()=>o(Wu)(i.node)}:null,{label:"Copy value as JSON",icon:"i-material-symbols:data-object",onSelect:()=>o(Jy)(i.node)},i.node.value==="_Vector3"||i.node.value==="_Euler"||i.node.value==="_Quaternion"?{label:"Copy as Prop",icon:"i-lucide:code",onSelect:()=>o(Xy)(i.node)}:null].filter(Boolean),ui:{content:"w-48"}},{default:w(()=>[E(S,{size:"xs",variant:"ghost",color:"neutral",icon:"i-lucide-ellipsis-vertical",title:"Copy value"})]),_:1},8,["items"])):R("",!0)],64)):(y(),V(ve,{key:1},[D("span",null,ee(i.node.label)+" :",1),typeof i.node.value=="boolean"?(y(),_(k,{key:0,"model-value":i.node.value,size:"xs","onUpdate:modelValue":p,onClick:A[1]||(A[1]=ye(()=>{},["stop"]))},null,8,["model-value"])):s.value?.path===i.node.path&&typeof i.node.value!="number"&&typeof i.node.value!="boolean"?(y(),_(N,{key:1,modelValue:s.value.value,"onUpdate:modelValue":A[2]||(A[2]=W=>s.value.value=W),size:"xs",class:"w-20",variant:"soft",onKeydown:ye(g,["stop"]),onBlur:m,onFocus:A[3]||(A[3]=W=>W.target?.select()),onClick:A[4]||(A[4]=ye(()=>{},["stop"]))},null,8,["modelValue"])):s.value?.path===i.node.path&&typeof i.node.value=="number"?(y(),_(z,{key:2,modelValue:s.value.value,"onUpdate:modelValue":A[5]||(A[5]=W=>s.value.value=W),size:"xs",variant:"subtle",orientation:"vertical","format-options":{minimumFractionDigits:0,maximumFractionDigits:2},class:"w-20",onKeydown:ye(g,["stop"]),onBlur:m,onFocus:A[6]||(A[6]=W=>W.target?.select()),onClick:A[7]||(A[7]=ye(()=>{},["stop"]))},null,8,["modelValue"])):typeof i.node.value!="boolean"?(y(),V("span",{key:3,class:I([l(i.node.value),"cursor-pointer hover:bg-neutral-100 dark:hover:bg-neutral-800 px-1 py-0.5 rounded"]),onClick:ye(f,["stop"])},ee(u(i.node.value)),3)):R("",!0)],64)),b.value?(y(),V("div",{key:2,class:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity ml-auto",onClick:A[8]||(A[8]=ye(()=>{},["stop"]))},[typeof i.node.value=="number"?(y(),V(ve,{key:0},[E(S,{size:"xs",variant:"ghost",color:"neutral",icon:"i-tabler:minus",title:"Decrease value",onClick:ye(c,["stop"])}),E(S,{size:"xs",variant:"ghost",color:"neutral",icon:"i-tabler:plus",title:"Increase value",onClick:ye(d,["stop"])})],64)):R("",!0),E(B,{size:"xs",items:[{label:"Copy Value",icon:"i-lucide:copy",onSelect:()=>o(Vu)(i.node.value)},{label:"Copy Path",icon:"i-lucide:link",onSelect:()=>o(Io)(i.node.path)},{label:"Copy as prop",icon:"i-lucide:pen-line",onSelect:()=>o(Nu)(i.node)}],ui:{content:"w-48"}},{default:w(()=>[E(S,{size:"xs",variant:"ghost",color:"neutral",icon:"i-lucide-ellipsis-vertical",title:"Copy value"})]),_:1},8,["items"])])):R("",!0)])],6),v.value&&n.value?(y(!0),V(ve,{key:0},Xe(i.node.children,W=>(y(),_(j,{key:`${W.path}-${W.label}`,node:W,level:i.level+1,"selected-object":i.selectedObject,onUpdateValue:A[9]||(A[9]=(J,ie)=>r("update-value",J,ie))},null,8,["node","level","selected-object"]))),128)):R("",!0)])}}}),td=Object.assign(ab,{__name:"InspectorTree"});function ob(i){let e=0;return i.traverse(t=>{t.isObject3D&&e++}),e}function lb(){const i={scene:ps({objects:0,graph:null,value:void 0,selected:void 0,assets:[]}),fps:ps({value:0,accumulator:[],lastLoggedTime:Date.now(),logInterval:1e3}),memory:ps({currentMem:0,averageMem:0,maxMemory:0,allocatedMem:0,accumulator:[],lastLoggedTime:Date.now(),logInterval:1e3}),renderer:ca({info:{render:{frame:0,calls:0,triangles:0,points:0,lines:0},memory:{geometries:0,textures:0},programs:[]}})};let e=null;return typeof window<"u"&&window.parent.parent.__TRES__DEVTOOLS__&&window.parent.parent.__TRES__DEVTOOLS__.subscribe(t=>{if(t.type==="context"){const r=t.data;if(r.scene.value.children.length>0){const n=r.scene.value.uuid;n!==e&&(i.scene.value=r.scene.value,i.scene.objects=ob(r.scene.value),i.scene.graph=Pv(r.scene.value),e=n)}else i.scene.value=void 0,i.scene.graph=null,e=null;r.renderer?.instance?.info&&(Object.assign(i.renderer.info.render,r.renderer.instance.info.render),Object.assign(i.renderer.info.memory,r.renderer.instance.info.memory),i.renderer.info.programs=[...r.renderer.instance.info.programs||[]])}else if(t.type==="performance"){const r=t.data;Object.assign(i.fps,r.fps),i.fps.accumulator=[...r.fps.accumulator],Object.assign(i.memory,r.memory),i.memory.accumulator=[...r.memory.accumulator]}}),i}const Na=Xn(lb),ub={class:"grid grid-cols-1 sm:grid-cols-2 gap-4"},db={key:0,class:"relative isolate"},cb=P({__name:"index",setup(i){const{scene:e}=Na(),t=Tn(null),r=Tn(null),n=T(0);function s(c){t.value&&t.value.remove(r.value),c&&c.isMesh&&(r.value=Rv(c),c.add(qi(r))),t.value=c,n.value++}const a=F(()=>(n.value,ei(t.value))),l=(c,p)=>{t.value&&(u(t.value,c,p),c.includes("color")||n.value++)},u=(c,p,f)=>{if(!c||typeof c!="object")return;const m=p.split(".");let h=c;for(let C=0;C<m.length-1;C++){const x=m[C];if(h[x]&&typeof h[x]=="object")h=h[x];else return}const g=m[m.length-1],v=C=>typeof C=="string"&&/^#[0-9a-f]{6}$/i.test(C);h[g]=v(f)?new Ji(f):f;const b=c;b.isCamera&&d(p)&&b.updateProjectionMatrix()},d=c=>{const p=["fov","aspect","near","far","left","right","top","bottom"],f=c.split(".").pop();return p.includes(f||"")};return(c,p)=>{const f=Cu,m=Au,h=Jv,g=Qv,v=td;return y(),V("div",ub,[D("div",null,[o(e).value&&o(e).graph?(y(),_(f,{key:o(e).graph.key,item:o(e).graph,onSelectObject:s},null,8,["item"])):(y(),_(m,{key:1,color:"neutral",variant:"subtle",title:"No scene available",description:"Please open a view with a scene to view its graph.",icon:"i-lucide-terminal"}))]),D("div",null,[t.value?(y(),V("div",db,[(y(),_(h,{key:n.value,object:t.value,onUpdateValue:l},null,8,["object"])),E(g),E(v,{class:"pt-4",node:a.value,"selected-object":t.value,onUpdateValue:l},null,8,["node","selected-object"])])):R("",!0)])])}}}),pb=Object.assign(cb,{__name:"SceneGraph"}),fb=["points"],js=40,pl=2,hb=P({__name:"DevtoolsGraph",props:{points:{default:()=>[]},value:{default:0},unit:{default:""},label:{default:""},color:{default:"primary"}},setup(i){const e=i,t=T(140);xt(()=>{const n=Math.max(...e.points,30);t.value=Math.max(n,t.value)});const r=F(()=>e.points.map((n,s)=>`${s*pl},${js-n*js/t.value}`).join(" "));return(n,s)=>(y(),V("div",{class:I(["graph relative p-1 rounded text-right text-xs outline-none border-none font-sans",`graph-${i.color}`])},[D("div",{class:I(["absolute bottom-0.5 right-1 font-mono text-xs",`text-${i.color}`])},ee(Math.round(i.value))+" "+ee(i.unit),3),(y(),V("svg",{width:"100%",height:js,xmlns:"http://www.w3.org/2000/svg"},[D("polyline",{points:o(r),fill:"none","stroke-width":pl,"stroke-linecap":"round","stroke-linejoin":"round",class:I(i.color)},null,10,fb)]))],2))}}),mb=Object.assign(hb,{__name:"DevtoolsGraph"}),gb={slots:{root:"rounded-lg overflow-hidden",header:"p-4 sm:px-6",title:"text-highlighted font-semibold",description:"mt-1 text-muted text-sm",body:"p-4 sm:p-6",footer:"p-4 sm:px-6"},variants:{variant:{solid:{root:"bg-inverted text-inverted",title:"text-inverted",description:"text-dimmed"},outline:{root:"bg-default ring ring-default divide-y divide-default"},soft:{root:"bg-elevated/50 divide-y divide-default"},subtle:{root:"bg-elevated/50 ring ring-default divide-y divide-default"}}},defaultVariants:{variant:"outline"}},yb={__name:"UCard",props:{as:{type:null,required:!1},title:{type:String,required:!1},description:{type:String,required:!1},variant:{type:null,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1}},setup(i){const e=i,t=Je(),r=Re("card",e),n=Me(),s=F(()=>de({extend:de(gb),...n.ui?.card||{}})({variant:r.variant}));return(a,l)=>(y(),_(o(se),{as:o(r).as,"data-slot":"root",class:I(s.value.root({class:[o(r).ui?.root,o(r).class]}))},{default:w(()=>[t.header||o(r).title||t.title||o(r).description||t.description?(y(),V("div",{key:0,"data-slot":"header",class:I(s.value.header({class:o(r).ui?.header}))},[M(a.$slots,"header",{},()=>[o(r).title||t.title?(y(),V("div",{key:0,"data-slot":"title",class:I(s.value.title({class:o(r).ui?.title}))},[M(a.$slots,"title",{},()=>[ue(ee(o(r).title),1)])],2)):R("",!0),o(r).description||t.description?(y(),V("div",{key:1,"data-slot":"description",class:I(s.value.description({class:o(r).ui?.description}))},[M(a.$slots,"description",{},()=>[ue(ee(o(r).description),1)])],2)):R("",!0)])],2)):R("",!0),t.default?(y(),V("div",{key:1,"data-slot":"body",class:I(s.value.body({class:o(r).ui?.body}))},[M(a.$slots,"default")],2)):R("",!0),t.footer?(y(),V("div",{key:2,"data-slot":"footer",class:I(s.value.footer({class:o(r).ui?.footer}))},[M(a.$slots,"footer")],2)):R("",!0)]),_:3},8,["as","class"]))}},vb={class:"text-sm dark:text-neutral-400 text-neutral-500 font-mono"},bb={key:0,class:"h-1 border-b dark:border-neutral-400 border-neutral-500 w-4"},xb={class:"flex gap-2 items-center -mb2.5"},wb={key:0},_b={class:"p4 dark:text-neutral-400 text-neutral-500 text-xs font-mono"},Cb=P({__name:"ProgramsModuleItem",props:{item:{},depth:{default:0}},setup(i){const e=T(!1);return(t,r)=>{const n=yr;return y(),V("div",vb,[D("div",{class:"flex gap-2 items-end cursor-pointer pt2 mb2",onClick:r[0]||(r[0]=s=>e.value=!o(e))},[i.depth>0?(y(),V("span",bb)):R("",!0),D("div",xb,[D("i",{class:I(i.item.icon)},null,2),ue(" "+ee(i.item.type)+" ",1),i.item.name?(y(),_(n,{key:0,variant:"soft"},{default:w(()=>[ue(ee(i.item.name),1)]),_:1})):R("",!0)])]),o(e)?(y(),V("div",wb,[D("div",_b,[r[1]||(r[1]=D("p",{class:"text-xs font-bold dark:text-neutral-300/80 text-neutral-700/80 mb2 op-80"}," Uniforms ",-1)),(y(!0),V(ve,null,Xe(Object.entries(i.item.uniforms.map),([s,a])=>(y(),V("div",{key:s},[ue(ee(s)+" ",1),E(n,{color:"neutral",variant:"soft"},{default:w(()=>[ue(ee(a?.cache[a?.cache.length-1]),1)]),_:2},1024)]))),128))])])):R("",!0)])}}}),Ab=Object.assign(Cb,{__name:"ProgramsModuleItem"}),Sb=P({__name:"ProgramsModule",setup(i){const{renderer:e}=Na(),t={shaderMaterial:"i-file-icons-vertexshader"},r=F(()=>e.info.programs.map(n=>({...n,icon:t[n.type]||"i-file-icons-vertexshader",uniforms:n.getUniforms(),attributes:n.getAttributes()})));return(n,s)=>{const a=Ab;return y(!0),V(ve,null,Xe(o(r),l=>(y(),_(a,{key:l.id,item:l},null,8,["item"]))),128)}}}),Mb=Object.assign(Sb,{__name:"ProgramsModule"}),Bb={class:"space-y-6"},kb={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},qb={class:"flex items-center justify-between"},Fb={class:"flex items-center gap-2"},Eb={class:"space-y-4"},Ob={class:"flex items-center justify-between"},zb={class:"flex items-center gap-2"},Ib={class:"space-y-4"},Tb={class:"grid grid-cols-2 gap-4 text-sm"},Pb={class:"font-mono font-semibold"},Rb={class:"font-mono font-semibold"},Db={class:"grid grid-cols-1 lg:grid-cols-2 gap-6"},$b={class:"flex items-center gap-2"},Lb={class:"space-y-4"},Hb={class:"grid grid-cols-2 gap-4"},Nb={class:"text-center p-4 bg-neutral-50 dark:bg-neutral-800 rounded-lg"},Vb={class:"flex items-center justify-center gap-2 mb-2"},Ub={class:"font-mono text-sm font-bold"},jb={class:"text-center p-4 bg-neutral-50 dark:bg-neutral-800 rounded-lg"},Wb={class:"flex items-center justify-center gap-2 mb-2"},Gb={class:"font-mono text-sm font-bold"},Kb={class:"flex items-center gap-2"},Xb={class:"grid grid-cols-2 gap-3"},Yb={class:"text-center p-3 bg-neutral-50 dark:bg-neutral-800 rounded-lg"},Jb={class:"flex items-center justify-center gap-2 mb-2"},Zb={class:"font-mono font-bold"},Qb={class:"text-center p-3 bg-neutral-50 dark:bg-neutral-800 rounded-lg"},e0={class:"flex items-center justify-center gap-2 mb-2"},t0={class:"font-mono font-bold"},r0={class:"text-center p-3 bg-neutral-50 dark:bg-neutral-800 rounded-lg"},i0={class:"flex items-center justify-center gap-2 mb-2"},n0={class:"font-mono font-bold"},s0={class:"text-center p-3 bg-neutral-50 dark:bg-neutral-800 rounded-lg"},a0={class:"flex items-center justify-center gap-2 mb-2"},o0={class:"font-mono font-bold"},l0={class:"flex items-center gap-2"},u0=P({__name:"PerformanceMonitor",setup(i){const{fps:e,memory:t,renderer:r}=Na(),n=F(()=>e.value>=50?{color:"primary",label:"Excellent"}:e.value>=30?{color:"warning",label:"Good"}:{color:"error",label:"Poor"}),s=F(()=>{const a=t.currentMem;return a<100?{color:"primary",label:"Low"}:a<500?{color:"warning",label:"Moderate"}:{color:"error",label:"High"}});return(a,l)=>{const u=Ae,d=yr,c=mb,p=yb,f=Au,m=Mb;return y(),V("div",Bb,[D("div",kb,[E(p,null,{header:w(()=>[D("div",qb,[D("div",Fb,[E(u,{name:"i-tabler:activity",class:"w-5 h-5"}),l[0]||(l[0]=D("h3",{class:"text-sm font-semibold"}," Frame Rate ",-1))]),E(d,{color:o(n).color,variant:"soft",size:"sm"},{default:w(()=>[ue(ee(o(n).label),1)]),_:1},8,["color"])])]),default:w(()=>[D("div",Eb,[E(c,{points:o(e).accumulator,value:o(e).value,color:"primary",unit:"FPS",label:"FPS"},null,8,["points","value"])])]),_:1}),E(p,null,{header:w(()=>[D("div",Ob,[D("div",zb,[E(u,{name:"i-tabler:cpu",class:"w-5 h-5"}),l[1]||(l[1]=D("h3",{class:"text-sm font-semibold"}," Memory Usage ",-1))]),E(d,{color:o(s).color,variant:"soft",size:"sm"},{default:w(()=>[ue(ee(o(s).label),1)]),_:1},8,["color"])])]),default:w(()=>[D("div",Ib,[E(c,{points:o(t).accumulator,value:o(t).currentMem,color:"warning",unit:"MB",label:"Memory"},null,8,["points","value"]),D("div",Tb,[D("div",null,[l[2]||(l[2]=D("div",{class:"text-neutral-600 dark:text-neutral-400"}," Current ",-1)),D("div",Pb,ee(Math.round(o(t).currentMem))+" MB ",1)]),D("div",null,[l[3]||(l[3]=D("div",{class:"text-neutral-600 dark:text-neutral-400"}," Peak ",-1)),D("div",Rb,ee(Math.round(o(t).maxMemory))+" MB ",1)])])])]),_:1})]),D("div",Db,[E(p,null,{header:w(()=>[D("div",$b,[E(u,{name:"i-tabler:database",class:"w-5 h-5"}),l[4]||(l[4]=D("h3",{class:"font-semibold"}," Memory Details ",-1))])]),default:w(()=>[D("div",Lb,[D("div",Hb,[D("div",Nb,[D("div",Vb,[E(u,{name:"i-tabler:box",class:"w-5 h-5"}),D("span",Ub,ee(o(r).info?.memory?.geometries||0),1)]),l[5]||(l[5]=D("div",{class:"text-xs text-neutral-600 dark:text-neutral-400"}," Geometries ",-1))]),D("div",jb,[D("div",Wb,[E(u,{name:"i-tabler:photo",class:"w-5 h-5"}),D("span",Gb,ee(o(r).info?.memory?.textures||0),1)]),l[6]||(l[6]=D("div",{class:"text-xs text-neutral-600 dark:text-neutral-400"}," Textures ",-1))])]),E(f,{icon:"i-tabler:info-circle",color:"primary",variant:"soft",title:"Memory Allocation",description:`Approximately ${o(Qy)(o(t).allocatedMem)} KB allocated by 3D objects`},null,8,["description"])])]),_:1}),E(p,null,{header:w(()=>[D("div",Kb,[E(u,{name:"i-tabler:chart-bar",class:"w-5 h-5"}),l[7]||(l[7]=D("h3",{class:"font-semibold"}," Render Statistics ",-1))])]),default:w(()=>[D("div",Xb,[D("div",Yb,[D("div",Jb,[E(u,{name:"i-tabler:refresh",class:"w-4 h-4 text-primary-500"}),D("span",Zb,ee(o(r)?.info?.render?.calls||0),1)]),l[8]||(l[8]=D("div",{class:"text-xs text-neutral-600 dark:text-neutral-400"}," Draw Calls ",-1))]),D("div",Qb,[D("div",e0,[E(u,{name:"i-tabler:triangle",class:"w-4 h-4 text-orange-500"}),D("span",t0,ee(o(r)?.info?.render?.triangles||0),1)]),l[9]||(l[9]=D("div",{class:"text-xs text-neutral-600 dark:text-neutral-400"}," Triangles ",-1))]),D("div",r0,[D("div",i0,[E(u,{name:"i-tabler:point",class:"w-4 h-4 text-blue-500"}),D("span",n0,ee(o(r)?.info?.render?.points||0),1)]),l[10]||(l[10]=D("div",{class:"text-xs text-neutral-600 dark:text-neutral-400"}," Points ",-1))]),D("div",s0,[D("div",a0,[E(u,{name:"i-tabler:line",class:"w-4 h-4 text-red-500"}),D("span",o0,ee(o(r)?.info?.render?.lines||0),1)]),l[11]||(l[11]=D("div",{class:"text-xs text-neutral-600 dark:text-neutral-400"}," Lines ",-1))])])]),_:1})]),E(p,null,{header:w(()=>[D("div",l0,[E(u,{name:"i-tabler:code",class:"w-5 h-5"}),l[12]||(l[12]=D("h3",{class:"font-semibold"}," Shader Programs ",-1))])]),default:w(()=>[E(m)]),_:1})])}}}),d0=Object.assign(u0,{__name:"PerformanceMonitor"}),c0={slots:{root:"flex items-center gap-2",list:"relative flex p-1 group",indicator:"absolute transition-[translate,width] duration-200",trigger:["group relative inline-flex items-center min-w-0 data-[state=inactive]:text-muted hover:data-[state=inactive]:not-disabled:text-default font-medium rounded-md disabled:cursor-not-allowed disabled:opacity-75","transition-colors"],leadingIcon:"shrink-0",leadingAvatar:"shrink-0",leadingAvatarSize:"",label:"truncate",trailingBadge:"shrink-0",trailingBadgeSize:"sm",content:"focus:outline-none w-full"},variants:{color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},variant:{pill:{list:"bg-elevated rounded-lg",trigger:"grow",indicator:"rounded-md shadow-xs"},link:{list:"border-default",indicator:"rounded-full",trigger:"focus:outline-none"}},orientation:{horizontal:{root:"flex-col",list:"w-full",indicator:"left-0 w-(--reka-tabs-indicator-size) translate-x-(--reka-tabs-indicator-position)",trigger:"justify-center"},vertical:{list:"flex-col",indicator:"top-0 h-(--reka-tabs-indicator-size) translate-y-(--reka-tabs-indicator-position)"}},size:{xs:{trigger:"px-2 py-1 text-xs gap-1",leadingIcon:"size-4",leadingAvatarSize:"3xs"},sm:{trigger:"px-2.5 py-1.5 text-xs gap-1.5",leadingIcon:"size-4",leadingAvatarSize:"3xs"},md:{trigger:"px-3 py-1.5 text-sm gap-1.5",leadingIcon:"size-5",leadingAvatarSize:"2xs"},lg:{trigger:"px-3 py-2 text-sm gap-2",leadingIcon:"size-5",leadingAvatarSize:"2xs"},xl:{trigger:"px-3 py-2 text-base gap-2",leadingIcon:"size-6",leadingAvatarSize:"xs"}}},compoundVariants:[{orientation:"horizontal",variant:"pill",class:{indicator:"inset-y-1"}},{orientation:"horizontal",variant:"link",class:{list:"border-b -mb-px",indicator:"-bottom-px h-px"}},{orientation:"vertical",variant:"pill",class:{indicator:"inset-x-1",list:"items-center"}},{orientation:"vertical",variant:"link",class:{list:"border-s -ms-px",indicator:"-start-px w-px"}},{color:"primary",variant:"pill",class:{indicator:"bg-primary",trigger:"data-[state=active]:text-inverted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary"}},{color:"secondary",variant:"pill",class:{indicator:"bg-secondary",trigger:"data-[state=active]:text-inverted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-secondary"}},{color:"success",variant:"pill",class:{indicator:"bg-success",trigger:"data-[state=active]:text-inverted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-success"}},{color:"info",variant:"pill",class:{indicator:"bg-info",trigger:"data-[state=active]:text-inverted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-info"}},{color:"warning",variant:"pill",class:{indicator:"bg-warning",trigger:"data-[state=active]:text-inverted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-warning"}},{color:"error",variant:"pill",class:{indicator:"bg-error",trigger:"data-[state=active]:text-inverted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-error"}},{color:"neutral",variant:"pill",class:{indicator:"bg-inverted",trigger:"data-[state=active]:text-inverted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-inverted"}},{color:"primary",variant:"link",class:{indicator:"bg-primary",trigger:"data-[state=active]:text-primary focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary"}},{color:"secondary",variant:"link",class:{indicator:"bg-secondary",trigger:"data-[state=active]:text-secondary focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-secondary"}},{color:"success",variant:"link",class:{indicator:"bg-success",trigger:"data-[state=active]:text-success focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-success"}},{color:"info",variant:"link",class:{indicator:"bg-info",trigger:"data-[state=active]:text-info focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-info"}},{color:"warning",variant:"link",class:{indicator:"bg-warning",trigger:"data-[state=active]:text-warning focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-warning"}},{color:"error",variant:"link",class:{indicator:"bg-error",trigger:"data-[state=active]:text-error focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-error"}},{color:"neutral",variant:"link",class:{indicator:"bg-inverted",trigger:"data-[state=active]:text-highlighted focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-inverted"}}],defaultVariants:{color:"primary",variant:"pill",size:"md"}},p0={__name:"UTabs",props:{as:{type:null,required:!1},items:{type:Array,required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},orientation:{type:null,required:!1,default:"horizontal"},content:{type:Boolean,required:!1,default:!0},valueKey:{type:null,required:!1,default:"value"},labelKey:{type:null,required:!1,default:"label"},class:{type:null,required:!1},ui:{type:Object,required:!1},defaultValue:{type:[String,Number],required:!1,default:"0"},modelValue:{type:[String,Number],required:!1},activationMode:{type:String,required:!1},unmountOnHide:{type:Boolean,required:!1,default:!0}},emits:["update:modelValue"],setup(i,{expose:e,emit:t}){const r=i,n=t,s=Je(),a=Re("tabs",r),l=Me(),u=Pt(zt(a,"as","unmountOnHide"),n),d=F(()=>de({extend:de(c0),...l.ui?.tabs||{}})({color:a.color,variant:a.variant,size:a.size,orientation:a.orientation})),c=T([]);function p(f,m){c.value[f]=m}return e({triggersRef:c}),(f,m)=>(y(),_(o(Vm),L(o(u),{"model-value":o(a).modelValue,"default-value":o(a).defaultValue,orientation:o(a).orientation,"activation-mode":o(a).activationMode,"data-slot":"root",class:d.value.root({class:[o(a).ui?.root,o(a).class]})}),{default:w(()=>[E(o(Xm),{"data-slot":"list",class:I(d.value.list({class:o(a).ui?.list}))},{default:w(()=>[E(o(Gm),{"data-slot":"indicator",class:I(d.value.indicator({class:o(a).ui?.indicator}))},null,8,["class"]),M(f.$slots,"list-leading"),(y(!0),V(ve,null,Xe(o(a).items,(h,g)=>(y(),_(o(Jm),{key:o(Qe)(h,o(a).valueKey)??g,ref_for:!0,ref:v=>p(g,v),value:o(Qe)(h,o(a).valueKey)??String(g),disabled:h.disabled,"data-slot":"trigger",class:I(d.value.trigger({class:[o(a).ui?.trigger,h.ui?.trigger]}))},{default:w(()=>[M(f.$slots,"leading",{item:h,index:g,ui:d.value},()=>[h.icon?(y(),_(Ae,{key:0,name:h.icon,"data-slot":"leadingIcon",class:I(d.value.leadingIcon({class:[o(a).ui?.leadingIcon,h.ui?.leadingIcon]}))},null,8,["name","class"])):h.avatar?(y(),_(gi,L({key:1,size:h.ui?.leadingAvatarSize||o(a).ui?.leadingAvatarSize||d.value.leadingAvatarSize()},{ref_for:!0},h.avatar,{"data-slot":"leadingAvatar",class:d.value.leadingAvatar({class:[o(a).ui?.leadingAvatar,h.ui?.leadingAvatar]})}),null,16,["size","class"])):R("",!0)]),o(Qe)(h,o(a).labelKey)||s.default?(y(),V("span",{key:0,"data-slot":"label",class:I(d.value.label({class:[o(a).ui?.label,h.ui?.label]}))},[M(f.$slots,"default",{item:h,index:g},()=>[ue(ee(o(Qe)(h,o(a).labelKey)),1)])],2)):R("",!0),M(f.$slots,"trailing",{item:h,index:g,ui:d.value},()=>[h.badge||h.badge===0?(y(),_(yr,L({key:0,color:"neutral",variant:"outline",size:h.ui?.trailingBadgeSize||o(a).ui?.trailingBadgeSize||d.value.trailingBadgeSize()},{ref_for:!0},typeof h.badge=="string"||typeof h.badge=="number"?{label:h.badge}:h.badge,{"data-slot":"trailingBadge",class:d.value.trailingBadge({class:[o(a).ui?.trailingBadge,h.ui?.trailingBadge]})}),null,16,["size","class"])):R("",!0)])]),_:2},1032,["value","disabled","class"]))),128)),M(f.$slots,"list-trailing")]),_:3},8,["class"]),o(a).content?(y(!0),V(ve,{key:0},Xe(o(a).items,(h,g)=>(y(),_(o(jm),{key:o(Qe)(h,o(a).valueKey)??g,value:o(Qe)(h,o(a).valueKey)??String(g),"data-slot":"content",class:I(d.value.content({class:[o(a).ui?.content,h.ui?.content,h.class]}))},{default:w(()=>[M(f.$slots,h.slot||"content",{item:h,index:g,ui:d.value},()=>[ue(ee(h.content),1)])]),_:2},1032,["value","class"]))),128)):R("",!0)]),_:3},16,["model-value","default-value","orientation","activation-mode","class"]))}},f0={class:"pattern-bg"},h0={class:"bg-(--ui-bg) p-8 min-h-[calc(100vh-var(--ui-header-height))] max-w-screen-xl mx-auto pt-2 bg-default"},g0=P({__name:"index",setup(i){const e=[{label:"Scene Graph",description:"Explore and inspect the 3D scene hierarchy and object properties.",icon:"i-lucide-film",slot:"scene-graph"},{label:"Performance",description:"Monitor frame rate, memory usage, and rendering statistics.",icon:"i-lucide-chart-line",slot:"performance"}];return(t,r)=>{const n=ry,s=pb,a=d0,l=p0;return y(),V("div",f0,[E(n),D("main",h0,[E(l,{items:e,color:"primary",size:"lg",variant:"link",ui:{trigger:"grow"},class:"gap-4 w-full"},{"scene-graph":w(()=>[E(s)]),performance:w(()=>[E(a)]),_:1})])])}}});export{g0 as default};
|