@roku-ui/vue 0.18.2 → 0.20.0

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.
@@ -1 +1 @@
1
- (function(B,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(B=typeof globalThis<"u"?globalThis:B||self,e(B["roku-ui"]={},B.Vue))})(this,function(B,e){"use strict";const ln=e.defineComponent({__name:"AspectRatio",props:{ratio:{default:1},width:{},maxWidth:{},height:{},maxHeight:{}},setup(t){return(r,n)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({"--ar-ratio":r.ratio,width:r.width,"max-width":r.maxWidth,height:r.height,"max-height":r.maxHeight}),class:"relative children:absolute children:top-0 before:block before:h-0 children:h-full children:w-full before:pb-[calc((1/var(--ar-ratio,1))*100%)] before:content-['']"},[e.renderSlot(r.$slots,"default")],4))}});function Te(t){"@babel/helpers - typeof";return Te=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Te(t)}var an=/^\s+/,sn=/\s+$/;function z(t,r){if(t=t||"",r=r||{},t instanceof z)return t;if(!(this instanceof z))return new z(t,r);var n=cn(t);this._originalInput=t,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=r.format||n.format,this._gradientType=r.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}z.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var r=this.toRgb();return(r.r*299+r.g*587+r.b*114)/1e3},getLuminance:function(){var r=this.toRgb(),n,o,a,l,c,i;return n=r.r/255,o=r.g/255,a=r.b/255,n<=.03928?l=n/12.92:l=Math.pow((n+.055)/1.055,2.4),o<=.03928?c=o/12.92:c=Math.pow((o+.055)/1.055,2.4),a<=.03928?i=a/12.92:i=Math.pow((a+.055)/1.055,2.4),.2126*l+.7152*c+.0722*i},setAlpha:function(r){return this._a=kt(r),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var r=ht(this._r,this._g,this._b);return{h:r.h*360,s:r.s,v:r.v,a:this._a}},toHsvString:function(){var r=ht(this._r,this._g,this._b),n=Math.round(r.h*360),o=Math.round(r.s*100),a=Math.round(r.v*100);return this._a==1?"hsv("+n+", "+o+"%, "+a+"%)":"hsva("+n+", "+o+"%, "+a+"%, "+this._roundA+")"},toHsl:function(){var r=pt(this._r,this._g,this._b);return{h:r.h*360,s:r.s,l:r.l,a:this._a}},toHslString:function(){var r=pt(this._r,this._g,this._b),n=Math.round(r.h*360),o=Math.round(r.s*100),a=Math.round(r.l*100);return this._a==1?"hsl("+n+", "+o+"%, "+a+"%)":"hsla("+n+", "+o+"%, "+a+"%, "+this._roundA+")"},toHex:function(r){return gt(this._r,this._g,this._b,r)},toHexString:function(r){return"#"+this.toHex(r)},toHex8:function(r){return mn(this._r,this._g,this._b,this._a,r)},toHex8String:function(r){return"#"+this.toHex8(r)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(R(this._r,255)*100)+"%",g:Math.round(R(this._g,255)*100)+"%",b:Math.round(R(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(R(this._r,255)*100)+"%, "+Math.round(R(this._g,255)*100)+"%, "+Math.round(R(this._b,255)*100)+"%)":"rgba("+Math.round(R(this._r,255)*100)+"%, "+Math.round(R(this._g,255)*100)+"%, "+Math.round(R(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:Bn[gt(this._r,this._g,this._b,!0)]||!1},toFilter:function(r){var n="#"+yt(this._r,this._g,this._b,this._a),o=n,a=this._gradientType?"GradientType = 1, ":"";if(r){var l=z(r);o="#"+yt(l._r,l._g,l._b,l._a)}return"progid:DXImageTransform.Microsoft.gradient("+a+"startColorstr="+n+",endColorstr="+o+")"},toString:function(r){var n=!!r;r=r||this._format;var o=!1,a=this._a<1&&this._a>=0,l=!n&&a&&(r==="hex"||r==="hex6"||r==="hex3"||r==="hex4"||r==="hex8"||r==="name");return l?r==="name"&&this._a===0?this.toName():this.toRgbString():(r==="rgb"&&(o=this.toRgbString()),r==="prgb"&&(o=this.toPercentageRgbString()),(r==="hex"||r==="hex6")&&(o=this.toHexString()),r==="hex3"&&(o=this.toHexString(!0)),r==="hex4"&&(o=this.toHex8String(!0)),r==="hex8"&&(o=this.toHex8String()),r==="name"&&(o=this.toName()),r==="hsl"&&(o=this.toHslString()),r==="hsv"&&(o=this.toHsvString()),o||this.toHexString())},clone:function(){return z(this.toString())},_applyModification:function(r,n){var o=r.apply(null,[this].concat([].slice.call(n)));return this._r=o._r,this._g=o._g,this._b=o._b,this.setAlpha(o._a),this},lighten:function(){return this._applyModification(yn,arguments)},brighten:function(){return this._applyModification(bn,arguments)},darken:function(){return this._applyModification(kn,arguments)},desaturate:function(){return this._applyModification(pn,arguments)},saturate:function(){return this._applyModification(hn,arguments)},greyscale:function(){return this._applyModification(gn,arguments)},spin:function(){return this._applyModification(wn,arguments)},_applyCombination:function(r,n){return r.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(vn,arguments)},complement:function(){return this._applyCombination(Sn,arguments)},monochromatic:function(){return this._applyCombination(Cn,arguments)},splitcomplement:function(){return this._applyCombination(xn,arguments)},triad:function(){return this._applyCombination(bt,[3])},tetrad:function(){return this._applyCombination(bt,[4])}},z.fromRatio=function(t,r){if(Te(t)=="object"){var n={};for(var o in t)t.hasOwnProperty(o)&&(o==="a"?n[o]=t[o]:n[o]=Me(t[o]));t=n}return z(t,r)};function cn(t){var r={r:0,g:0,b:0},n=1,o=null,a=null,l=null,c=!1,i=!1;return typeof t=="string"&&(t=$n(t)),Te(t)=="object"&&(re(t.r)&&re(t.g)&&re(t.b)?(r=un(t.r,t.g,t.b),c=!0,i=String(t.r).substr(-1)==="%"?"prgb":"rgb"):re(t.h)&&re(t.s)&&re(t.v)?(o=Me(t.s),a=Me(t.v),r=fn(t.h,o,a),c=!0,i="hsv"):re(t.h)&&re(t.s)&&re(t.l)&&(o=Me(t.s),l=Me(t.l),r=dn(t.h,o,l),c=!0,i="hsl"),t.hasOwnProperty("a")&&(n=t.a)),n=kt(n),{ok:c,format:t.format||i,r:Math.min(255,Math.max(r.r,0)),g:Math.min(255,Math.max(r.g,0)),b:Math.min(255,Math.max(r.b,0)),a:n}}function un(t,r,n){return{r:R(t,255)*255,g:R(r,255)*255,b:R(n,255)*255}}function pt(t,r,n){t=R(t,255),r=R(r,255),n=R(n,255);var o=Math.max(t,r,n),a=Math.min(t,r,n),l,c,i=(o+a)/2;if(o==a)l=c=0;else{var s=o-a;switch(c=i>.5?s/(2-o-a):s/(o+a),o){case t:l=(r-n)/s+(r<n?6:0);break;case r:l=(n-t)/s+2;break;case n:l=(t-r)/s+4;break}l/=6}return{h:l,s:c,l:i}}function dn(t,r,n){var o,a,l;t=R(t,360),r=R(r,100),n=R(n,100);function c(d,f,u){return u<0&&(u+=1),u>1&&(u-=1),u<1/6?d+(f-d)*6*u:u<1/2?f:u<2/3?d+(f-d)*(2/3-u)*6:d}if(r===0)o=a=l=n;else{var i=n<.5?n*(1+r):n+r-n*r,s=2*n-i;o=c(s,i,t+1/3),a=c(s,i,t),l=c(s,i,t-1/3)}return{r:o*255,g:a*255,b:l*255}}function ht(t,r,n){t=R(t,255),r=R(r,255),n=R(n,255);var o=Math.max(t,r,n),a=Math.min(t,r,n),l,c,i=o,s=o-a;if(c=o===0?0:s/o,o==a)l=0;else{switch(o){case t:l=(r-n)/s+(r<n?6:0);break;case r:l=(n-t)/s+2;break;case n:l=(t-r)/s+4;break}l/=6}return{h:l,s:c,v:i}}function fn(t,r,n){t=R(t,360)*6,r=R(r,100),n=R(n,100);var o=Math.floor(t),a=t-o,l=n*(1-r),c=n*(1-a*r),i=n*(1-(1-a)*r),s=o%6,d=[n,c,l,l,i,n][s],f=[i,n,n,c,l,l][s],u=[l,l,i,n,n,c][s];return{r:d*255,g:f*255,b:u*255}}function gt(t,r,n,o){var a=[K(Math.round(t).toString(16)),K(Math.round(r).toString(16)),K(Math.round(n).toString(16))];return o&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function mn(t,r,n,o,a){var l=[K(Math.round(t).toString(16)),K(Math.round(r).toString(16)),K(Math.round(n).toString(16)),K(wt(o))];return a&&l[0].charAt(0)==l[0].charAt(1)&&l[1].charAt(0)==l[1].charAt(1)&&l[2].charAt(0)==l[2].charAt(1)&&l[3].charAt(0)==l[3].charAt(1)?l[0].charAt(0)+l[1].charAt(0)+l[2].charAt(0)+l[3].charAt(0):l.join("")}function yt(t,r,n,o){var a=[K(wt(o)),K(Math.round(t).toString(16)),K(Math.round(r).toString(16)),K(Math.round(n).toString(16))];return a.join("")}z.equals=function(t,r){return!t||!r?!1:z(t).toRgbString()==z(r).toRgbString()},z.random=function(){return z.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function pn(t,r){r=r===0?0:r||10;var n=z(t).toHsl();return n.s-=r/100,n.s=Ne(n.s),z(n)}function hn(t,r){r=r===0?0:r||10;var n=z(t).toHsl();return n.s+=r/100,n.s=Ne(n.s),z(n)}function gn(t){return z(t).desaturate(100)}function yn(t,r){r=r===0?0:r||10;var n=z(t).toHsl();return n.l+=r/100,n.l=Ne(n.l),z(n)}function bn(t,r){r=r===0?0:r||10;var n=z(t).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(r/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(r/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(r/100)))),z(n)}function kn(t,r){r=r===0?0:r||10;var n=z(t).toHsl();return n.l-=r/100,n.l=Ne(n.l),z(n)}function wn(t,r){var n=z(t).toHsl(),o=(n.h+r)%360;return n.h=o<0?360+o:o,z(n)}function Sn(t){var r=z(t).toHsl();return r.h=(r.h+180)%360,z(r)}function bt(t,r){if(isNaN(r)||r<=0)throw new Error("Argument to polyad must be a positive number");for(var n=z(t).toHsl(),o=[z(t)],a=360/r,l=1;l<r;l++)o.push(z({h:(n.h+l*a)%360,s:n.s,l:n.l}));return o}function xn(t){var r=z(t).toHsl(),n=r.h;return[z(t),z({h:(n+72)%360,s:r.s,l:r.l}),z({h:(n+216)%360,s:r.s,l:r.l})]}function vn(t,r,n){r=r||6,n=n||30;var o=z(t).toHsl(),a=360/n,l=[z(t)];for(o.h=(o.h-(a*r>>1)+720)%360;--r;)o.h=(o.h+a)%360,l.push(z(o));return l}function Cn(t,r){r=r||6;for(var n=z(t).toHsv(),o=n.h,a=n.s,l=n.v,c=[],i=1/r;r--;)c.push(z({h:o,s:a,v:l})),l=(l+i)%1;return c}z.mix=function(t,r,n){n=n===0?0:n||50;var o=z(t).toRgb(),a=z(r).toRgb(),l=n/100,c={r:(a.r-o.r)*l+o.r,g:(a.g-o.g)*l+o.g,b:(a.b-o.b)*l+o.b,a:(a.a-o.a)*l+o.a};return z(c)},z.readability=function(t,r){var n=z(t),o=z(r);return(Math.max(n.getLuminance(),o.getLuminance())+.05)/(Math.min(n.getLuminance(),o.getLuminance())+.05)},z.isReadable=function(t,r,n){var o=z.readability(t,r),a,l;switch(l=!1,a=zn(n),a.level+a.size){case"AAsmall":case"AAAlarge":l=o>=4.5;break;case"AAlarge":l=o>=3;break;case"AAAsmall":l=o>=7;break}return l},z.mostReadable=function(t,r,n){var o=null,a=0,l,c,i,s;n=n||{},c=n.includeFallbackColors,i=n.level,s=n.size;for(var d=0;d<r.length;d++)l=z.readability(t,r[d]),l>a&&(a=l,o=z(r[d]));return z.isReadable(t,o,{level:i,size:s})||!c?o:(n.includeFallbackColors=!1,z.mostReadable(t,["#fff","#000"],n))};var Ye=z.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},Bn=z.hexNames=_n(Ye);function _n(t){var r={};for(var n in t)t.hasOwnProperty(n)&&(r[t[n]]=n);return r}function kt(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function R(t,r){En(t)&&(t="100%");var n=Mn(t);return t=Math.min(r,Math.max(0,parseFloat(t))),n&&(t=parseInt(t*r,10)/100),Math.abs(t-r)<1e-6?1:t%r/parseFloat(r)}function Ne(t){return Math.min(1,Math.max(0,t))}function j(t){return parseInt(t,16)}function En(t){return typeof t=="string"&&t.indexOf(".")!=-1&&parseFloat(t)===1}function Mn(t){return typeof t=="string"&&t.indexOf("%")!=-1}function K(t){return t.length==1?"0"+t:""+t}function Me(t){return t<=1&&(t=t*100+"%"),t}function wt(t){return Math.round(parseFloat(t)*255).toString(16)}function St(t){return j(t)/255}var J=function(){var t="[-\\+]?\\d+%?",r="[-\\+]?\\d*\\.\\d+%?",n="(?:"+r+")|(?:"+t+")",o="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",a="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+o),rgba:new RegExp("rgba"+a),hsl:new RegExp("hsl"+o),hsla:new RegExp("hsla"+a),hsv:new RegExp("hsv"+o),hsva:new RegExp("hsva"+a),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function re(t){return!!J.CSS_UNIT.exec(t)}function $n(t){t=t.replace(an,"").replace(sn,"").toLowerCase();var r=!1;if(Ye[t])t=Ye[t],r=!0;else if(t=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=J.rgb.exec(t))?{r:n[1],g:n[2],b:n[3]}:(n=J.rgba.exec(t))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=J.hsl.exec(t))?{h:n[1],s:n[2],l:n[3]}:(n=J.hsla.exec(t))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=J.hsv.exec(t))?{h:n[1],s:n[2],v:n[3]}:(n=J.hsva.exec(t))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=J.hex8.exec(t))?{r:j(n[1]),g:j(n[2]),b:j(n[3]),a:St(n[4]),format:r?"name":"hex8"}:(n=J.hex6.exec(t))?{r:j(n[1]),g:j(n[2]),b:j(n[3]),format:r?"name":"hex"}:(n=J.hex4.exec(t))?{r:j(n[1]+""+n[1]),g:j(n[2]+""+n[2]),b:j(n[3]+""+n[3]),a:St(n[4]+""+n[4]),format:r?"name":"hex8"}:(n=J.hex3.exec(t))?{r:j(n[1]+""+n[1]),g:j(n[2]+""+n[2]),b:j(n[3]+""+n[3]),format:r?"name":"hex"}:!1}function zn(t){var r,n;return t=t||{level:"AA",size:"small"},r=(t.level||"AA").toUpperCase(),n=(t.size||"small").toLowerCase(),r!=="AA"&&r!=="AAA"&&(r="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:r,size:n}}function O(t){return e.computed(()=>({style:Vn(t.rounded),class:"rounded-[--r-rounded]"}))}function Vn(t){const r=/^-?(?:\d+(?:\.\d+)?|\.\d+)(?:px|em|rem|vh|vw|in|cm|mm|pt|pc|%)?$/;switch(t){case"none":return"--r-rounded: 0";case"sm":return"--r-rounded: 0.125rem";case"md":return"--r-rounded: 0.25rem";case"lg":return"--r-rounded: 0.5rem";case"full":return"--r-rounded: 9999px";default:return typeof t=="string"&&r.test(t)?`--r-rounded: ${t};`:typeof t=="number"||!Number.isNaN(Number(t))?`--r-rounded: ${t}rem;`:"rounded-[--r-rounded]"}}const ye=e.shallowRef([]);function Ue(t){return e.computed({get:()=>{if(typeof t!="number"||t<=0)return ye.value;const r=ye.value.reduce((o,a)=>{const{position:l}=a;return o[l]||(o[l]=[]),o[l].push(a),o},{}),n=[];for(const o in r)n.push(...r[o].slice(-t));return ye.value.filter(o=>n.includes(o))},set:r=>{ye.value=r}})}class An{static show(r){r.hash=Math.random().toString(36),r.initialDurationMS=r.durationMS,ye.value=[r,...ye.value]}}const Ge=Symbol("tabCurrent"),qe=Symbol("direction"),Tn=Symbol("tabValueList"),Ke=Symbol("childrenElementMapSymbol");function Nn(t){const r=z(t).toHsl().l;return X.reduce((n,o)=>Math.abs(o-r)<Math.abs(n-r)?o:n)}function xt(t,r=X){const n=Z(t,r);return{...n,colors:n.colors.map(o=>o.toHexString())}}function Z(t,r=X){const n=z(t),o=Nn(n),a=r.findIndex(c=>c===o),l=r.map(c=>{const i=z({h:n.toHsl().h,s:n.toHsl().s,l:c}),s=0;return n.toHsl().h>=20&&n.toHsl().h<=200&&i.darken(2),i.saturate(s*100),i});return{baseColorIndex:a,colors:l.map(c=>c)}}function be(t,r=X){return xt(t,r).colors}function Hn(t,r){let n,o,a;const l=e.ref(!0),c=()=>{l.value=!0,a()};e.watch(t,c,{flush:"sync"});const i=typeof r=="function"?r:r.get,s=typeof r=="function"?void 0:r.set,d=e.customRef((f,u)=>(o=f,a=u,{get(){return l.value&&(n=i(n),l.value=!1),o(),n},set(m){s==null||s(m)}}));return Object.isExtensible(d)&&(d.trigger=c),d}function ke(t){return e.getCurrentScope()?(e.onScopeDispose(t),!0):!1}function vt(){const t=new Set,r=a=>{t.delete(a)};return{on:a=>{t.add(a);const l=()=>r(a);return ke(l),{off:l}},off:r,trigger:(...a)=>Promise.all(Array.from(t).map(l=>l(...a)))}}function D(t){return typeof t=="function"?t():e.unref(t)}const oe=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const In=t=>t!=null,Rn=Object.prototype.toString,Dn=t=>Rn.call(t)==="[object Object]",Q=()=>{},Pn=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),Ln=On();function On(){var t,r;return oe&&((t=window==null?void 0:window.navigator)==null?void 0:t.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((r=window==null?void 0:window.navigator)==null?void 0:r.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function Je(t,r){function n(...o){return new Promise((a,l)=>{Promise.resolve(t(()=>r.apply(this,o),{fn:r,thisArg:this,args:o})).then(a).catch(l)})}return n}const Ct=t=>t();function Fn(t,r={}){let n,o,a=Q;const l=i=>{clearTimeout(i),a(),a=Q};return i=>{const s=D(t),d=D(r.maxWait);return n&&l(n),s<=0||d!==void 0&&d<=0?(o&&(l(o),o=null),Promise.resolve(i())):new Promise((f,u)=>{a=r.rejectOnCancel?u:f,d&&!o&&(o=setTimeout(()=>{n&&l(n),o=null,f(i())},d)),n=setTimeout(()=>{o&&l(o),o=null,f(i())},s)})}}function Wn(...t){let r=0,n,o=!0,a=Q,l,c,i,s,d;!e.isRef(t[0])&&typeof t[0]=="object"?{delay:c,trailing:i=!0,leading:s=!0,rejectOnCancel:d=!1}=t[0]:[c,i=!0,s=!0,d=!1]=t;const f=()=>{n&&(clearTimeout(n),n=void 0,a(),a=Q)};return m=>{const y=D(c),v=Date.now()-r,p=()=>l=m();return f(),y<=0?(r=Date.now(),p()):(v>y&&(s||!o)?(r=Date.now(),p()):i&&(l=new Promise((b,k)=>{a=d?k:b,n=setTimeout(()=>{r=Date.now(),o=!0,b(p()),f()},Math.max(0,y-v))})),!s&&!n&&(n=setTimeout(()=>o=!0,y)),o=!1,l)}}function jn(t=Ct){const r=e.ref(!0);function n(){r.value=!1}function o(){r.value=!0}const a=(...l)=>{r.value&&t(...l)};return{isActive:e.readonly(r),pause:n,resume:o,eventFilter:a}}function Xn(t){return e.getCurrentInstance()}function Bt(t,r=200,n={}){return Je(Fn(r,n),t)}function Yn(t,r=200,n={}){const o=e.ref(t.value),a=Bt(()=>{o.value=t.value},r,n);return e.watch(t,()=>a()),o}function Un(t,r=200,n=!1,o=!0,a=!1){return Je(Wn(r,n,o,a),t)}function Gn(t,r,n={}){const{eventFilter:o=Ct,...a}=n;return e.watch(t,Je(o,r),a)}function qn(t,r,n={}){const{eventFilter:o,...a}=n,{eventFilter:l,pause:c,resume:i,isActive:s}=jn(o);return{stop:Gn(t,r,{...a,eventFilter:l}),pause:c,resume:i,isActive:s}}function we(t,r=!0,n){Xn()?e.onMounted(t,n):r?t():e.nextTick(t)}function Kn(t=!1,r={}){const{truthyValue:n=!0,falsyValue:o=!1}=r,a=e.isRef(t),l=e.ref(t);function c(i){if(arguments.length)return l.value=i,l.value;{const s=D(n);return l.value=l.value===s?D(o):s,l.value}}return a?c:[l,c]}const F=oe?window:void 0,Jn=oe?window.document:void 0;function W(t){var r;const n=D(t);return(r=n==null?void 0:n.$el)!=null?r:n}function N(...t){let r,n,o,a;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,o,a]=t,r=F):[r,n,o,a]=t,!r)return Q;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const l=[],c=()=>{l.forEach(f=>f()),l.length=0},i=(f,u,m,y)=>(f.addEventListener(u,m,y),()=>f.removeEventListener(u,m,y)),s=e.watch(()=>[W(r),D(a)],([f,u])=>{if(c(),!f)return;const m=Dn(u)?{...u}:u;l.push(...n.flatMap(y=>o.map(v=>i(f,y,v,m))))},{immediate:!0,flush:"post"}),d=()=>{s(),c()};return ke(d),d}let _t=!1;function Ze(t,r,n={}){const{window:o=F,ignore:a=[],capture:l=!0,detectIframe:c=!1}=n;if(!o)return Q;Ln&&!_t&&(_t=!0,Array.from(o.document.body.children).forEach(p=>p.addEventListener("click",Q)),o.document.documentElement.addEventListener("click",Q));let i=!0;const s=p=>D(a).some(b=>{if(typeof b=="string")return Array.from(o.document.querySelectorAll(b)).some(k=>k===p.target||p.composedPath().includes(k));{const k=W(b);return k&&(p.target===k||p.composedPath().includes(k))}});function d(p){const b=D(p);return b&&b.$.subTree.shapeFlag===16}function f(p,b){const k=D(p),h=k.$.subTree&&k.$.subTree.children;return h==null||!Array.isArray(h)?!1:h.some(w=>w.el===b.target||b.composedPath().includes(w.el))}const u=p=>{const b=W(t);if(p.target!=null&&!(!(b instanceof Element)&&d(t)&&f(t,p))&&!(!b||b===p.target||p.composedPath().includes(b))){if(p.detail===0&&(i=!s(p)),!i){i=!0;return}r(p)}};let m=!1;const y=[N(o,"click",p=>{m||(m=!0,setTimeout(()=>{m=!1},0),u(p))},{passive:!0,capture:l}),N(o,"pointerdown",p=>{const b=W(t);i=!s(p)&&!!(b&&!p.composedPath().includes(b))},{passive:!0}),c&&N(o,"blur",p=>{setTimeout(()=>{var b;const k=W(t);((b=o.document.activeElement)==null?void 0:b.tagName)==="IFRAME"&&!(k!=null&&k.contains(o.document.activeElement))&&r(p)},0)})].filter(Boolean);return()=>y.forEach(p=>p())}function Zn(t){return typeof t=="function"?t:typeof t=="string"?r=>r.key===t:Array.isArray(t)?r=>t.includes(r.key):()=>!0}function U(...t){let r,n,o={};t.length===3?(r=t[0],n=t[1],o=t[2]):t.length===2?typeof t[1]=="object"?(r=!0,n=t[0],o=t[1]):(r=t[0],n=t[1]):(r=!0,n=t[0]);const{target:a=F,eventName:l="keydown",passive:c=!1,dedupe:i=!1}=o,s=Zn(r);return N(a,l,f=>{f.repeat&&D(i)||s(f)&&n(f)},c)}function Qn(){const t=e.ref(!1),r=e.getCurrentInstance();return r&&e.onMounted(()=>{t.value=!0},r),t}function Qe(t){const r=Qn();return e.computed(()=>(r.value,!!t()))}function et(t,r,n={}){const{window:o=F,...a}=n;let l;const c=Qe(()=>o&&"MutationObserver"in o),i=()=>{l&&(l.disconnect(),l=void 0)},s=e.computed(()=>{const m=D(t),y=(Array.isArray(m)?m:[m]).map(W).filter(In);return new Set(y)}),d=e.watch(()=>s.value,m=>{i(),c.value&&m.size&&(l=new MutationObserver(r),m.forEach(y=>l.observe(y,a)))},{immediate:!0,flush:"post"}),f=()=>l==null?void 0:l.takeRecords(),u=()=>{d(),i()};return ke(u),{isSupported:c,stop:u,takeRecords:f}}function er(t,r={}){const{immediate:n=!0,fpsLimit:o=void 0,window:a=F}=r,l=e.ref(!1),c=o?1e3/o:null;let i=0,s=null;function d(m){if(!l.value||!a)return;i||(i=m);const y=m-i;if(c&&y<c){s=a.requestAnimationFrame(d);return}i=m,t({delta:y,timestamp:m}),s=a.requestAnimationFrame(d)}function f(){!l.value&&a&&(l.value=!0,i=0,s=a.requestAnimationFrame(d))}function u(){l.value=!1,s!=null&&a&&(a.cancelAnimationFrame(s),s=null)}return n&&f(),ke(u),{isActive:e.readonly(l),pause:u,resume:f}}function tr(t,r={}){const{window:n=F}=r,o=Qe(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function");let a;const l=e.ref(!1),c=d=>{l.value=d.matches},i=()=>{a&&("removeEventListener"in a?a.removeEventListener("change",c):a.removeListener(c))},s=e.watchEffect(()=>{o.value&&(i(),a=n.matchMedia(D(t)),"addEventListener"in a?a.addEventListener("change",c):a.addListener(c),l.value=a.matches)});return ke(()=>{s(),i(),a=void 0}),l}const He=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ie="__vueuse_ssr_handlers__",nr=rr();function rr(){return Ie in He||(He[Ie]=He[Ie]||{}),He[Ie]}function or(t,r){return nr[t]||r}function lr(t){return t==null?"any":t instanceof Set?"set":t instanceof Map?"map":t instanceof Date?"date":typeof t=="boolean"?"boolean":typeof t=="string"?"string":typeof t=="object"?"object":Number.isNaN(t)?"any":"number"}const ar={boolean:{read:t=>t==="true",write:t=>String(t)},object:{read:t=>JSON.parse(t),write:t=>JSON.stringify(t)},number:{read:t=>Number.parseFloat(t),write:t=>String(t)},any:{read:t=>t,write:t=>String(t)},string:{read:t=>t,write:t=>String(t)},map:{read:t=>new Map(JSON.parse(t)),write:t=>JSON.stringify(Array.from(t.entries()))},set:{read:t=>new Set(JSON.parse(t)),write:t=>JSON.stringify(Array.from(t))},date:{read:t=>new Date(t),write:t=>t.toISOString()}},Et="vueuse-storage";function sr(t,r,n,o={}){var a;const{flush:l="pre",deep:c=!0,listenToStorageChanges:i=!0,writeDefaults:s=!0,mergeDefaults:d=!1,shallow:f,window:u=F,eventFilter:m,onError:y=S=>{console.error(S)},initOnMounted:v}=o,p=(f?e.shallowRef:e.ref)(r);if(!n)try{n=or("getDefaultStorage",()=>{var S;return(S=F)==null?void 0:S.localStorage})()}catch(S){y(S)}if(!n)return p;const b=D(r),k=lr(b),h=(a=o.serializer)!=null?a:ar[k],{pause:w,resume:C}=qn(p,()=>_(p.value),{flush:l,deep:c,eventFilter:m});u&&i&&we(()=>{n instanceof Storage?N(u,"storage",x):N(u,Et,E),v&&x()}),v||x();function M(S,$){if(u){const A={key:t,oldValue:S,newValue:$,storageArea:n};u.dispatchEvent(n instanceof Storage?new StorageEvent("storage",A):new CustomEvent(Et,{detail:A}))}}function _(S){try{const $=n.getItem(t);if(S==null)M($,null),n.removeItem(t);else{const A=h.write(S);$!==A&&(n.setItem(t,A),M($,A))}}catch($){y($)}}function g(S){const $=S?S.newValue:n.getItem(t);if($==null)return s&&b!=null&&n.setItem(t,h.write(b)),b;if(!S&&d){const A=h.read($);return typeof d=="function"?d(A,b):k==="object"&&!Array.isArray(A)?{...b,...A}:A}else return typeof $!="string"?$:h.read($)}function x(S){if(!(S&&S.storageArea!==n)){if(S&&S.key==null){p.value=b;return}if(!(S&&S.key!==t)){w();try{(S==null?void 0:S.newValue)!==h.write(p.value)&&(p.value=g(S))}catch($){y($)}finally{S?e.nextTick(C):C()}}}}function E(S){x(S.detail)}return p}function ir(t){const r=e.getCurrentInstance(),n=Hn(()=>null,()=>r.proxy.$el);return e.onUpdated(n.trigger),e.onMounted(n.trigger),n}function cr(t,r={}){var n,o;const a=e.ref(!1),l=e.shallowRef(null);let c=0,i=!0;if(oe){const s=typeof r=="function"?{onDrop:r}:r,d=(n=s.multiple)!=null?n:!0,f=(o=s.preventDefaultForUnhandled)!=null?o:!1,u=p=>{var b,k;const h=Array.from((k=(b=p.dataTransfer)==null?void 0:b.files)!=null?k:[]);return h.length===0?null:d?h:[h[0]]},m=p=>{if(s.dataTypes){const b=e.unref(s.dataTypes);return typeof b=="function"?b(p):b?b.some(k=>p.includes(k)):!0}return!0},y=p=>{var b,k;const h=Array.from((k=(b=p.dataTransfer)==null?void 0:b.items)!=null?k:[]),w=h.map(_=>_.type),C=m(w),M=d||h.length<=1;return C&&M},v=(p,b)=>{var k,h,w,C;if(i=y(p),!i){f&&p.preventDefault(),p.dataTransfer&&(p.dataTransfer.dropEffect="none");return}p.preventDefault(),p.dataTransfer&&(p.dataTransfer.dropEffect="copy");const M=u(p);switch(b){case"enter":c+=1,a.value=!0,(k=s.onEnter)==null||k.call(s,null,p);break;case"over":(h=s.onOver)==null||h.call(s,null,p);break;case"leave":c-=1,c===0&&(a.value=!1),(w=s.onLeave)==null||w.call(s,null,p);break;case"drop":c=0,a.value=!1,i&&(l.value=M,(C=s.onDrop)==null||C.call(s,M,p));break}};N(t,"dragenter",p=>v(p,"enter")),N(t,"dragover",p=>v(p,"over")),N(t,"dragleave",p=>v(p,"leave")),N(t,"drop",p=>v(p,"drop"))}return{files:l,isOverDropZone:a}}function tt(t,r,n={}){const{window:o=F,...a}=n;let l;const c=Qe(()=>o&&"ResizeObserver"in o),i=()=>{l&&(l.disconnect(),l=void 0)},s=e.computed(()=>{const u=D(t);return Array.isArray(u)?u.map(m=>W(m)):[W(u)]}),d=e.watch(s,u=>{if(i(),c.value&&o){l=new ResizeObserver(r);for(const m of u)m&&l.observe(m,a)}},{immediate:!0,flush:"post"}),f=()=>{i(),d()};return ke(f),{isSupported:c,stop:f}}function le(t,r={}){const{reset:n=!0,windowResize:o=!0,windowScroll:a=!0,immediate:l=!0,updateTiming:c="sync"}=r,i=e.ref(0),s=e.ref(0),d=e.ref(0),f=e.ref(0),u=e.ref(0),m=e.ref(0),y=e.ref(0),v=e.ref(0);function p(){const k=W(t);if(!k){n&&(i.value=0,s.value=0,d.value=0,f.value=0,u.value=0,m.value=0,y.value=0,v.value=0);return}const h=k.getBoundingClientRect();i.value=h.height,s.value=h.bottom,d.value=h.left,f.value=h.right,u.value=h.top,m.value=h.width,y.value=h.x,v.value=h.y}function b(){c==="sync"?p():c==="next-frame"&&requestAnimationFrame(()=>p())}return tt(t,b),e.watch(()=>W(t),k=>!k&&b()),et(t,b,{attributeFilter:["style","class"]}),a&&N("scroll",b,{capture:!0,passive:!0}),o&&N("resize",b,{passive:!0}),we(()=>{l&&b()}),{height:i,bottom:s,left:d,right:f,top:u,width:m,x:y,y:v,update:b}}function te(t,r={}){const{delayEnter:n=0,delayLeave:o=0,window:a=F}=r,l=e.ref(!1);let c;const i=s=>{const d=s?n:o;c&&(clearTimeout(c),c=void 0),d?c=setTimeout(()=>l.value=s,d):l.value=s};return a&&(N(t,"mouseenter",()=>i(!0),{passive:!0}),N(t,"mouseleave",()=>i(!1),{passive:!0})),l}const ur={multiple:!0,accept:"*",reset:!1,directory:!1};function dr(t={}){const{document:r=Jn}=t,n=e.ref(null),{on:o,trigger:a}=vt(),{on:l,trigger:c}=vt();let i;r&&(i=r.createElement("input"),i.type="file",i.onchange=f=>{const u=f.target;n.value=u.files,a(n.value)},i.oncancel=()=>{c()});const s=()=>{n.value=null,i&&i.value&&(i.value="",a(null))},d=f=>{if(!i)return;const u={...ur,...t,...f};i.multiple=u.multiple,i.accept=u.accept,i.webkitdirectory=u.directory,Pn(u,"capture")&&(i.capture=u.capture),u.reset&&s(),i.click()};return{files:e.readonly(n),open:d,reset:s,onCancel:l,onChange:o}}const Mt=1;function fr(t,r={}){const{throttle:n=0,idle:o=200,onStop:a=Q,onScroll:l=Q,offset:c={left:0,right:0,top:0,bottom:0},eventListenerOptions:i={capture:!1,passive:!0},behavior:s="auto",window:d=F,onError:f=g=>{console.error(g)}}=r,u=e.ref(0),m=e.ref(0),y=e.computed({get(){return u.value},set(g){p(g,void 0)}}),v=e.computed({get(){return m.value},set(g){p(void 0,g)}});function p(g,x){var E,S,$,A;if(!d)return;const V=D(t);if(!V)return;($=V instanceof Document?d.document.body:V)==null||$.scrollTo({top:(E=D(x))!=null?E:v.value,left:(S=D(g))!=null?S:y.value,behavior:D(s)});const H=((A=V==null?void 0:V.document)==null?void 0:A.documentElement)||(V==null?void 0:V.documentElement)||V;y!=null&&(u.value=H.scrollLeft),v!=null&&(m.value=H.scrollTop)}const b=e.ref(!1),k=e.reactive({left:!0,right:!1,top:!0,bottom:!1}),h=e.reactive({left:!1,right:!1,top:!1,bottom:!1}),w=g=>{b.value&&(b.value=!1,h.left=!1,h.right=!1,h.top=!1,h.bottom=!1,a(g))},C=Bt(w,n+o),M=g=>{var x;if(!d)return;const E=((x=g==null?void 0:g.document)==null?void 0:x.documentElement)||(g==null?void 0:g.documentElement)||W(g),{display:S,flexDirection:$}=getComputedStyle(E),A=E.scrollLeft;h.left=A<u.value,h.right=A>u.value;const V=Math.abs(A)<=(c.left||0),H=Math.abs(A)+E.clientWidth>=E.scrollWidth-(c.right||0)-Mt;S==="flex"&&$==="row-reverse"?(k.left=H,k.right=V):(k.left=V,k.right=H),u.value=A;let I=E.scrollTop;g===d.document&&!I&&(I=d.document.body.scrollTop),h.top=I<m.value,h.bottom=I>m.value;const q=Math.abs(I)<=(c.top||0),T=Math.abs(I)+E.clientHeight>=E.scrollHeight-(c.bottom||0)-Mt;S==="flex"&&$==="column-reverse"?(k.top=T,k.bottom=q):(k.top=q,k.bottom=T),m.value=I},_=g=>{var x;if(!d)return;const E=(x=g.target.documentElement)!=null?x:g.target;M(E),b.value=!0,C(g),l(g)};return N(t,"scroll",n?Un(_,n,!0,!1):_,i),we(()=>{try{const g=D(t);if(!g)return;M(g)}catch(g){f(g)}}),N(t,"scrollend",w,i),{x:y,y:v,isScrolling:b,arrivedState:k,directions:h,measure(){const g=D(t);d&&g&&M(g)}}}function $t(t,r,n={}){const{window:o=F}=n;return sr(t,r,o==null?void 0:o.localStorage,n)}const mr={ctrl:"control",command:"meta",cmd:"meta",option:"alt",up:"arrowup",down:"arrowdown",left:"arrowleft",right:"arrowright"};function pr(t={}){const{reactive:r=!1,target:n=F,aliasMap:o=mr,passive:a=!0,onEventFired:l=Q}=t,c=e.reactive(new Set),i={toJSON(){return{}},current:c},s=r?e.reactive(i):i,d=new Set,f=new Set;function u(p,b){p in s&&(r?s[p]=b:s[p].value=b)}function m(){c.clear();for(const p of f)u(p,!1)}function y(p,b){var k,h;const w=(k=p.key)==null?void 0:k.toLowerCase(),M=[(h=p.code)==null?void 0:h.toLowerCase(),w].filter(Boolean);w&&(b?c.add(w):c.delete(w));for(const _ of M)f.add(_),u(_,b);w==="meta"&&!b?(d.forEach(_=>{c.delete(_),u(_,!1)}),d.clear()):typeof p.getModifierState=="function"&&p.getModifierState("Meta")&&b&&[...c,...M].forEach(_=>d.add(_))}N(n,"keydown",p=>(y(p,!0),l(p)),{passive:a}),N(n,"keyup",p=>(y(p,!1),l(p)),{passive:a}),N("blur",m,{passive:!0}),N("focus",m,{passive:!0});const v=new Proxy(s,{get(p,b,k){if(typeof b!="string")return Reflect.get(p,b,k);if(b=b.toLowerCase(),b in o&&(b=o[b]),!(b in s))if(/[+_-]/.test(b)){const w=b.split(/[+_-]/g).map(C=>C.trim());s[b]=e.computed(()=>w.every(C=>D(v[C])))}else s[b]=e.ref(!1);const h=Reflect.get(p,b,k);return r?D(h):h}});return v}const hr={page:t=>[t.pageX,t.pageY],client:t=>[t.clientX,t.clientY],screen:t=>[t.screenX,t.screenY],movement:t=>t instanceof Touch?null:[t.movementX,t.movementY]};function Re(t={}){const{type:r="page",touch:n=!0,resetOnTouchEnds:o=!1,initialValue:a={x:0,y:0},window:l=F,target:c=l,scroll:i=!0,eventFilter:s}=t;let d=null,f=0,u=0;const m=e.ref(a.x),y=e.ref(a.y),v=e.ref(null),p=typeof r=="function"?r:hr[r],b=g=>{const x=p(g);d=g,x&&([m.value,y.value]=x,v.value="mouse"),l&&(f=l.scrollX,u=l.scrollY)},k=g=>{if(g.touches.length>0){const x=p(g.touches[0]);x&&([m.value,y.value]=x,v.value="touch")}},h=()=>{if(!d||!l)return;const g=p(d);d instanceof MouseEvent&&g&&(m.value=g[0]+l.scrollX-f,y.value=g[1]+l.scrollY-u)},w=()=>{m.value=a.x,y.value=a.y},C=s?g=>s(()=>b(g),{}):g=>b(g),M=s?g=>s(()=>k(g),{}):g=>k(g),_=s?()=>s(()=>h(),{}):()=>h();if(c){const g={passive:!0};N(c,["mousemove","dragover"],C,g),n&&r!=="movement"&&(N(c,["touchstart","touchmove"],M,g),o&&N(c,"touchend",w,g)),i&&r==="page"&&N(l,"scroll",_,{passive:!0})}return{x:m,y,sourceType:v}}function zt(t=ir()){const r=e.shallowRef(),n=()=>{const o=W(t);o&&(r.value=o.parentElement)};return we(n),e.watch(()=>D(t),n),r}function Vt(t){const r=e.ref(0),n=e.computed(()=>W(t)),o=()=>{n.value&&(r.value=n.value.scrollHeight)};return o(),we(o),tt(()=>n.value,o),et(()=>n.value,o,{childList:!0,subtree:!0,attributes:!0}),r}function At(t,r={}){const{initialWidth:n=Number.POSITIVE_INFINITY,listenOrientation:o=!0}=r,a=e.ref(n),l=e.computed(()=>W(t)),c=()=>{l.value&&(a.value=l.value.clientHeight)};if(c(),we(c),N("resize",c,{passive:!0}),tt(()=>l.value,c),et(()=>l.value,c,{childList:!0,subtree:!0,attributes:!0}),o){const i=tr("(orientation: portrait)");e.watch(i,()=>c())}return a}const X=[.98,.8,.7,.6,.43,.4,.36,.3,.2,.1,.01],ce=[1,.99,.95,.9,.7,.5,.4,.16,.1,.075,.05];function gr(){if(!oe)return e.ref("dark");const t=e.ref(document.documentElement.dataset.scheme);return new MutationObserver(n=>{n.forEach(o=>{o.type==="attributes"&&o.attributeName==="data-scheme"&&(t.value=document.documentElement.dataset.scheme)})}).observe(document.documentElement,{attributes:!0,attributeFilter:["data-scheme"]}),t}function yr(){return e.inject("currentThemeScheme",null)}function Tt(){return e.inject("currentThemeData",e.ref(at))}function br(){return e.inject("currentThemeName",e.ref("default"))}function Nt(t,r,n={}){const o=X,a=ce;return n.primary===void 0&&(n.primary=o),n.secondary===void 0&&(n.secondary=o),n.tertiary===void 0&&(n.tertiary=o),n.error===void 0&&(n.error=o),n.surface===void 0&&(n.surface=a),e.computed(()=>({name:t,colors:{primary:be(e.unref(r.primary),n.primary),secondary:be(e.unref(r.secondary),n.secondary),tertiary:be(e.unref(r.tertiary),n.tertiary),error:be(e.unref(r.error),n.error),surface:be(e.unref(r.surface),n.surface)}}))}function kr(t,r=X){return e.computed(()=>{const n=e.unref(t);return typeof n=="string"?ae(n,r).value.map(o=>o.toHexString()):n})}function nt(t){const r=e.ref(t);return{...{...Object.keys(r.value.colors).map(l=>{const c=l,i=r.value.colors[c];return kr(i,c==="surface"?ce:X).value.reduce((f,u,m)=>{const y=z(u).toRgb();return f[`--r-color-${c}-${m}`]=`${y.r} ${y.g} ${y.b}`,f},{})}).reduce((l,c)=>({...l,...c}),{})},...{backgroundColor:"var(--r-surface-background-base-color)",color:"var(--r-surface-text-color)","--un-default-border-color":"var(--r-surface-border-color)"}}}function De(t){const r=e.ref("");return e.onMounted(()=>{t.id?r.value=t.id:r.value=`switch-${Math.random().toString(36).slice(2)}-${Date.now().toString(36)}`}),r}const Ht=Symbol("scheme");function It(){const t=$t("scheme","light");return oe&&new MutationObserver(()=>{t.value!==document.documentElement.dataset.scheme&&(t.value=document.documentElement.dataset.scheme)}).observe(document.documentElement,{attributes:!0,attributeFilter:["data-scheme"]}),t}const rt=9,wr=8,Sr=7,$e=7,xr=7,Se=3,vr=6,ue=5,Rt=6,ze=3,Cr=4,ot=.25,Br=.3,Pe=1,_r=2,xe=6,Er=5,ve=4,Dt=5,lt=.08,Mr=.15,de=e.ref("#0067cc"),fe=e.ref("#5999A6"),me=e.ref("#F76C22"),pe=e.ref("#F95858"),ne=e.ref("#121212"),Pt=e.computed(()=>L({color:"surface",type:"border",index:{dark:$e,light:ze}}).value);function Lt(t){return Ae(t,"text",{dark:Se,light:xe})}const $r=e.computed(()=>Z(e.unref(de),X).colors),zr=e.computed(()=>Z(e.unref(fe),X).colors),Vr=e.computed(()=>Z(e.unref(me),X).colors),Ar=e.computed(()=>Z(e.unref(pe),X).colors),Tr=e.computed(()=>Z(e.unref(ne),ce).colors),at=Nt("default",{primary:de,secondary:fe,tertiary:me,error:pe,surface:ne});function Ce(t,r){return e.computed(()=>{switch(e.unref(t)){case"filled":return _e(r).value;case"light":return Wt(r).value;default:return Le().value}})}function Nr(t){return e.computed(()=>{const r=e.unref(t);switch(r){case"surface":return z(e.unref(ne));case"primary":return z(e.unref(de));case"secondary":return z(e.unref(fe));case"tertiary":return z(e.unref(me));case"error":return z(e.unref(pe));default:return z(r)}})}const st=new Map;function ae(t,r=X){return e.computed(()=>{const o=Nr(t).value.toHexString();if(st.has(o))return st.get(o);function a(){const l=Z(o,r).colors;return st.set(o,l),l}return a()})}function Ot(){return e.computed(()=>Z(e.unref(ne),ce).colors)}function Le(){return e.computed(()=>{const t=L({color:"surface",type:"bg",index:{dark:rt,light:Pe}}),r=L({color:"surface",type:"border",index:{dark:$e,light:ze}}),n=Be(t,r);return n.value.class=[...n.value.class,"border"],n.value})}function it(){return e.computed(()=>{const t=L({color:"surface",type:"bg",index:{dark:7,light:2}}),r=L({color:"surface",type:"border",index:{dark:6,light:4}});return Be(t,r).value})}function Be(...t){return e.computed(()=>({style:t.reduce((r,n)=>({...r,...n.value.style}),{}),class:t.reduce((r,n)=>[...r,...n.value.class],[])}))}function Ft(t){return e.computed(()=>{const r=L({color:t,type:"bg",index:{dark:5,light:4}}),n=L({color:"surface",type:"border",index:{dark:rt,light:Pe}}),o=L({color:t,type:"text",index:0});return Be(r,n,o).value})}function _e(t){return e.computed(()=>{const r=L({color:t,type:"bg",index:{dark:ue,light:ve}}),n=L({color:t,type:"border",index:{dark:ue,light:ve}}),o=L({color:t,type:"text",index:0});return Be(r,n,o).value})}function Wt(t){return e.computed(()=>{const r=L({color:t,type:"bg",index:{dark:ue,light:ve},alpha:.15}),n=L({color:t,type:"text",index:{dark:Se,light:xe}}),o=L({color:t,type:"border",index:{dark:5,light:4},alpha:0});return Be(r,n,o).value})}function Ve(t,r,n,o,a=1){switch(r){case"outline":return{style:{"--d-outline":t[n].clone().setAlpha(a).toHex8String(),"--l-outline":t[o].clone().setAlpha(a).toHex8String()},class:["dark:focus-visible:outline-[--d-outline]","focus-visible:outline-[--l-outline]"]};case"bg":return{style:{"--d-bg":t[n].clone().setAlpha(a).toHex8String(),"--l-bg":t[o].clone().setAlpha(a).toHex8String()},class:["dark:bg-[--d-bg]","bg-[--l-bg]"]};case"border":return{style:{"--d-border":t[n].clone().setAlpha(a).toHex8String(),"--l-border":t[o].clone().setAlpha(a).toHex8String()},class:["dark:border-[--d-border]","border-[--l-border]"]};case"text":return{style:{"--d-text":t[n].clone().setAlpha(a).toHex8String(),"--l-text":t[o].clone().setAlpha(a).toHex8String()},class:["dark:text-[--d-text]","text-[--l-text]"]};case"placeholder":return{style:{"--d-placeholder":t[n].clone().setAlpha(a).toHex8String(),"--l-placeholder":t[o].clone().setAlpha(a).toHex8String()},class:["dark:placeholder-[--d-placeholder]","placeholder-[--l-placeholder]"]};case"hover:bg":return{style:{"--d-bg-h":t[n].clone().setAlpha(a).toHexString(),"--l-bg-h":t[o].clone().setAlpha(a).toHexString()},class:["dark:hover:bg-[--d-bg-h]","hover:bg-[--l-bg-h]"]};case"hover:border":return{style:{"--d-border-h":t[n].clone().setAlpha(a).toHexString(),"--l-border-h":t[o].clone().setAlpha(a).toHexString()},class:["dark:hover:border-[--d-border-h]","hover:border-[--l-border-h]"]};case"hover:text":return{style:{"--d-text-h":t[n].clone().setAlpha(a).toHexString(),"--l-text-h":t[o].clone().setAlpha(a).toHexString()},class:["dark:hover:text-[--d-text-h]","hover:text-[--l-text-h]"]}}}function L(t){return t.color==="surface"?Ee(t.type,t.index):Ae(t.color,t.type,t.index,t.alpha)}function Ae(t,r,n,o=1){return e.computed(()=>{const a=ae(t);return typeof n=="number"?Ve(e.unref(a),r,n,n,o):Ve(e.unref(a),r,n.dark,n.light,o)})}function Ee(t,r,n=1){return e.computed(()=>{const{colors:o}=Z(e.unref(ne),ce);return typeof r=="number"?Ve(o,t,r,r,n):Ve(o,t,r.dark,r.light,n)})}function Oe(t){return L({color:t,type:"outline",index:{dark:$e,light:ze}})}function Fe(t="default",r="primary"){return e.computed(()=>{const n=ae(r).value,o=Z(e.unref(ne),ce).colors;return{style:{default:()=>Hr(o),filled:()=>Ir(n),light:()=>Rr(n),outline:()=>Dr(n),transparent:()=>Pr(n),subtle:()=>Lr(n),contrast:()=>Or(n),white:()=>Fr(n)}[e.unref(t)](),class:"custom-colors"}})}function Hr(t){return{"--d-bg":t[wr].toHexString(),"--d-bg-h":t[Sr].toHexString(),"--d-border":t[xr].toHexString(),"--l-bg":t[Pe].toHexString(),"--l-bg-h":t[_r].toHexString(),"--l-border":t[Cr].toHexString()}}function Ir(t){return{"--d-border":"transparent","--d-bg":t[ue].toHexString(),"--d-bg-h":t[Rt].toHexString(),"--d-text":"white","--l-bg":t[ve].toHexString(),"--l-bg-h":t[Dt].toHexString(),"--l-text":"white","--l-text-h":"white","--l-border":"transparent"}}function Rr(t){return{"--d-border":"transparent","--d-bg":t[ue].clone().setAlpha(ot).toHex8String(),"--d-bg-h":t[ue].clone().setAlpha(Br).toHex8String(),"--d-text":t[Se].toHexString(),"--d-text-h":t[Se].toHexString(),"--l-bg":t[ve].clone().setAlpha(lt).toHex8String(),"--l-bg-h":t[ve].clone().setAlpha(Mr).toHex8String(),"--l-text":t[xe].toHexString(),"--l-text-h":t[xe].toHexString(),"--l-border":"transparent"}}function Dr(t){return{"--d-bg":"transparent","--d-bg-h":t[Rt].clone().setAlpha(ot).toHex8String(),"--d-text":t[Se].toHexString(),"--d-text-h":t[Se].toHexString(),"--d-border":t[$e].toHexString(),"--l-bg":"transparent","--l-bg-h":t[Dt].clone().setAlpha(lt).toHex8String(),"--l-text":t[xe].toHexString(),"--l-text-h":t[xe].toHexString(),"--l-border":t[ze].toHexString()}}function Pr(t){return{"--d-text":t[3].toHexString(),"--d-text-h":t[3].toHexString(),"--l-text":t[5].toHexString(),"--l-text-h":t[5].toHexString(),"--d-bg":"transparent","--l-bg":"transparent","--d-border":"transparent","--l-border":"transparent"}}function Lr(t){return{"--d-bg":"transparent","--d-bg-h":t[3].clone().setAlpha(ot).toHex8String(),"--d-text":t[2].toHexString(),"--d-text-h":t[2].toHexString(),"--d-border":"transparent","--l-bg":"transparent","--l-bg-h":t[3].clone().setAlpha(lt).toHex8String(),"--l-text":t[5].toHexString(),"--l-text-h":t[5].toHexString(),"--l-border":"transparent"}}function Or(t){return{"--d-text":t[2].toHexString(),"--d-text-h":"white","--d-bg":"transparent","--d-bg-h":t[5].toHexString(),"--d-border":"transparent","--l-text":t[5].toHexString(),"--l-text-h":"white","--l-bg":"transparent","--l-bg-h":t[5].toHexString(),"--l-border":"transparent"}}function Fr(t){return{"--d-bg":"white","--d-bg-h":"white","--d-text":t[4].toHexString(),"--d-text-h":t[4].toHexString(),"--d-border":"transparent","--l-bg":"white","--l-bg-h":"white","--l-text":t[5].toHexString(),"--l-text-h":t[5].toHexString(),"--l-border":"transparent"}}function ct(t,r="default"){return e.computed(()=>{const n=ae(t).value,o=Ot().value;switch(e.unref(r)){case"default":return{"--d-bg":o[rt].toHexString(),"--d-border-f":n[ue].toHexString(),"--d-border":o[$e].toHexString(),"--d-placeholder":o[vr].toHexString(),"--d-text":"white","--l-bg":o[Pe].toHexString(),"--l-border-f":n[3].toHexString(),"--l-border":o[ze].toHexString(),"--l-placeholder":o[Er].toHexString(),"--l-text":"black"};case"filled":return{"--d-bg":n[5].toHexString(),"--d-bg-h":n[6].toHexString(),"--d-border":"transparent","--l-bg":n[5].toHexString(),"--l-bg-h":n[6].toHexString(),"--l-border":"transparent"}}})}const Wr={key:2,class:"i-fluent-person-24-filled"},jt=e.defineComponent({__name:"Avatar",props:{is:{default:"img"},src:{},size:{default:"md"},name:{},variant:{default:"default"},color:{default:"default"},rounded:{default:"full"},skeleton:{type:Boolean}},setup(t){const r=t,n=O(r),o=e.computed(()=>r.name||""),a=e.computed(()=>{switch(r.size){case"xs":return"--size: 2rem; --font-size: 1rem;";case"sm":return"--size: 3rem; --font-size: 1.25rem;";case"md":return"--size: 4rem; --font-size: 2rem;";case"lg":return"--size: 6rem; --font-size: 3rem;";case"xl":return"--size: 8rem; --font-size: 4rem;";default:return typeof r.size=="number"&&!Number.isNaN(Number(r.size))?`--size: ${r.size}rem; --font-size: ${r.size/2}rem;`:"--size: 4rem;"}}),l=e.ref(!1),c=e.ref(null);function i(){l.value=!0}e.onMounted(()=>{var u;(u=c.value)!=null&&u.complete&&i()});function s(u){return u.split(" ").map(m=>m[0]).join("").toUpperCase().slice(0,2)}const d=e.computed(()=>r.color),f=Ce(r.variant,d);return(u,m)=>u.skeleton?(e.openBlock(),e.createElementBlock("div",{key:0,class:"inline-block min-h-[--size] min-w-[--size] animate-pulse rounded-full bg-surface-variant-1",style:e.normalizeStyle([e.unref(n).style,a.value])},null,4)):u.src?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.is),e.mergeProps({key:1,ref_key:"img",ref:c,alt:o.value,class:[[e.unref(n).class,e.unref(f).class,{hidden:!l.value}],"inline-block h-[var(--size)] w-[var(--size)] rounded-full object-cover"],style:[e.unref(n).style,e.unref(f).style,a.value],src:u.src},u.$attrs,{onLoad:i}),null,16,["alt","class","style","src"])):!l.value||!u.src?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:2,class:["inline-block h-[--size] w-[--size] flex items-center justify-center border-4 rounded-full object-cover font-size-[--font-size]",[e.unref(n).class,e.unref(f).class]],style:[e.unref(n).style,e.unref(f).style,a.value]},u.$attrs),[u.$slots.default?e.renderSlot(u.$slots,"default",{key:0}):o.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(s(o.value)),1)],64)):(e.openBlock(),e.createElementBlock("i",Wr))],16)):e.createCommentVNode("",!0)}}),We=e.defineComponent({__name:"Btn",props:{type:{default:"button"},size:{default:"md"},is:{default:"button"},icon:{type:Boolean,default:!1},pressEffect:{default:"translate"},variant:{},hoverVariant:{},color:{},rounded:{default:"md"},disabled:{type:Boolean,default:!1},skeleton:{type:Boolean},outlineColor:{}},setup(t){const r=t,n=O(r),o=e.computed(()=>{switch(r.size){case"sm":return{normalContent:"min-w-16 h-6 px-2 py-1 text-xs",iconContent:"h-6 w-6 p-1"};case"lg":return{normalContent:"min-w-24 h-10 px-4 py-2 text-base",iconContent:"h-10 w-10 p-3"};case"md":default:return{normalContent:"min-w-20 h-8 px-3 py-1 text-sm",iconContent:"h-8 w-8 p-2"}}}),a=e.ref(null),l=te(a),c=e.computed(()=>r.hoverVariant&&l.value?r.hoverVariant:r.variant??"default"),i=e.computed(()=>r.color??"primary"),s=Fe(c,i),d=e.computed(()=>r.outlineColor??i.value),f=Oe(d);return(u,m)=>u.skeleton?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle([e.unref(n).style]),class:e.normalizeClass([o.value.normalContent,"inline-block animate-pulse rounded-md bg-surface-variant-1"])},null,6)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.is),e.mergeProps({key:1,ref_key:"btn",ref:a,"data-size":u.size,type:u.type,class:["flex items-center justify-center gap-1 decoration-none outline-none",[e.unref(s).class,e.unref(n).class,e.unref(f).class,u.icon?o.value.iconContent:o.value.normalContent,{"opacity-60 pointer-events-none select-none":u.disabled,"active:translate-y-0.25":u.pressEffect==="translate"}]],style:[e.unref(s).style,e.unref(n).style,e.unref(f).style],disabled:u.disabled},u.$attrs),{default:e.withCtx(()=>[u.$slots.leftSection?e.renderSlot(u.$slots,"leftSection",{key:0}):e.createCommentVNode("",!0),e.renderSlot(u.$slots,"default"),u.$slots.rightSection?e.renderSlot(u.$slots,"rightSection",{key:1}):e.createCommentVNode("",!0)]),_:3},16,["data-size","type","style","class","disabled"]))}}),jr=e.defineComponent({__name:"BtnGroup",props:e.mergeModels({selections:{},default:{},color:{default:"primary"},unselectable:{type:Boolean,default:void 0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const r=t,n=e.computed(()=>r.unselectable===void 0?r.selections.length===1:r.unselectable);function o(f){return typeof f=="string"?f:f.label??f.value}function a(f){return typeof f=="string"?f:f.value}function l(f){return typeof f=="string"?void 0:f.icon}const c=e.useModel(t,"modelValue");function i(f){a(f)===c.value&&n.value?c.value=void 0:c.value=a(f)}const s=e.computed(()=>r.selections.length===1),d=e.computed(()=>s.value?null:"first-children:rounded-r-0 first-children:border-r-none last-children:rounded-l-0 last-children:border-l-none not-first-children:rounded-l-0 not-last-children:rounded-r-0");return(f,u)=>{const m=We;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["w-auto inline-flex container",[d.value]])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.selections,(y,v)=>(e.openBlock(),e.createBlock(m,{key:a(y),model:c.value,variant:a(y)===c.value?"filled":void 0,color:r.color,class:e.normalizeClass({"border-x-none":v!==0&&v!==r.selections.length-1}),onClick:p=>i(y)},{default:e.withCtx(()=>[l(y)?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(l(y))},null,2)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(o(y)),1)]),_:2},1032,["model","variant","color","class","onClick"]))),128))],2)}}}),Xr=(t,r)=>{const n=t.__vccOpts||t;for(const[o,a]of r)n[o]=a;return n},Yr={},Ur={class:"flex flex-col gap-4 container"};function Gr(t,r){return e.openBlock(),e.createElementBlock("div",Ur,[e.renderSlot(t.$slots,"default")])}const qr=Xr(Yr,[["render",Gr]]),Kr=e.defineComponent({__name:"ChatMessage",props:{avatar:{},position:{default:"left"},color:{default:"primary"},variant:{default:"default"},withBorder:{type:Boolean,default:!1}},setup(t){const r=t,n=e.computed(()=>r.variant),o=e.computed(()=>r.color),a=Ce(n,o);return(l,c)=>{const i=jt;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex items-start gap-2",[{"flex-row-reverse":l.position==="right","flex-row":l.position==="left"}]])},[l.$slots.avatar?e.renderSlot(l.$slots,"avatar",{key:0}):l.avatar?(e.openBlock(),e.createBlock(i,{key:1,size:"xs",src:l.avatar},null,8,["src"])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["flex flex-col gap-1 rounded-xl p-2",[{"rounded-tr":l.position==="right","rounded-tl":l.position==="left",border:l.withBorder},e.unref(a).class]]),style:e.normalizeStyle([e.unref(a).style])},[e.renderSlot(l.$slots,"default")],6)],2)}}}),Jr={class:"w-full flex self-center gap-2 text-center"},Zr=e.defineComponent({__name:"ChatSystem",props:{position:{},color:{default:"default"},variant:{default:"default"},withBorder:{type:Boolean,default:!1}},setup(t){const r=t,n=e.computed(()=>r.variant),o=e.computed(()=>r.color),a=Ce(n,o);return(l,c)=>(e.openBlock(),e.createElementBlock("div",Jr,[e.createElementVNode("div",{class:e.normalizeClass(["w-full rounded-xl px-3 py-2",[e.unref(a).class]]),style:e.normalizeStyle(e.unref(a).style)},[e.renderSlot(l.$slots,"default")],6)]))}}),Qr=e.defineComponent({__name:"Chip",props:{is:{default:"img"},src:{},size:{default:"md"},color:{default:"primary"},variant:{default:"default"},rounded:{default:"full"}},setup(t){const r=t,n=O(r),o=e.computed(()=>{switch(r.size){case"sm":return"px-3 py-0.5 text-xs";case"md":return"px-4 py-0.5 text-sm";case"lg":return"px-5 py-0.5 text-base";default:return""}}),a=e.computed(()=>r.variant),l=e.computed(()=>r.color),c=Ce(a,l);return(i,s)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["inline-block h-fit inline-flex items-center gap-1",[e.unref(n).class,e.unref(c).class,o.value]]),style:e.normalizeStyle([e.unref(n).style,e.unref(c).style])},[i.$slots.leftSection?e.renderSlot(i.$slots,"leftSection",{key:0}):e.createCommentVNode("",!0),e.renderSlot(i.$slots,"default"),i.$slots.rightSection?e.renderSlot(i.$slots,"rightSection",{key:1}):e.createCommentVNode("",!0)],6))}}),Xt=e.defineComponent({__name:"ColorSwatch",props:{color:{},is:{default:"div"},withBorder:{type:Boolean,default:!1}},setup(t){return(r,n)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.is),e.mergeProps({class:["h-6 w-6 border rounded-full",[{border:r.withBorder}]]},e.unref(Pt),{style:{backgroundColor:r.color}}),null,16,["class","style"]))}}),eo=["id","alt"],to=["for"],no={key:0},ro=e.defineComponent({__name:"ColorInput",props:e.mergeModels({label:{},withBorder:{type:Boolean,default:!1}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const r=e.useModel(t,"modelValue"),n=e.useAttrs(),o=De(n),a=e.ref(null);return(l,c)=>{const i=Xt;return e.openBlock(),e.createElementBlock("div",null,[e.withDirectives(e.createElementVNode("input",{id:e.unref(o),ref_key:"input",ref:a,"onUpdate:modelValue":c[0]||(c[0]=s=>r.value=s),alt:r.value,type:"color",class:"pointer-events-none absolute opacity-0"},null,8,eo),[[e.vModelText,r.value]]),e.createElementVNode("label",{class:"flex items-center gap-2",for:e.unref(o)},[e.createVNode(i,{"with-border":l.withBorder,class:"cursor-pointer",color:r.value??"#222"},null,8,["with-border","color"]),l.label?(e.openBlock(),e.createElementBlock("span",no,e.toDisplayString(l.label),1)):e.createCommentVNode("",!0)],8,to)])}}}),Yt=Symbol("rokuProvider");function oo(){return e.inject(Yt,e.ref(null))}function lo(t){return e.provide(Yt,t)}const je=e.defineComponent({__name:"FullscreenOverlay",props:e.mergeModels({persistent:{type:Boolean,default:!1},blur:{type:[String,Boolean],default:!1},wrapperClass:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const r=t,n=e.useModel(t,"modelValue"),o=e.ref(null);function a(s){r.persistent||s.target===o.value&&(n.value=!1)}const l=e.computed(()=>{switch(r.blur){case"sm":return"backdrop-blur-sm";case"md":case!0:return"backdrop-blur-md";case"lg":return"backdrop-blur-lg";default:return""}}),c=e.ref(0);e.watchEffect(()=>{n.value?(document.body.style.overflow="hidden",document.body.style.marginRight=`${c.value}px`):setTimeout(()=>{document&&(document.querySelector(".modal-wrapper.op100")||(document.body.style.overflow="",document.body.style.marginRight=""))},300)}),e.watchEffect(()=>{typeof window<"u"&&new ResizeObserver(()=>{const d=window.innerWidth-document.body.clientWidth;d!==0&&(c.value=d)}).observe(document.body)});const i=oo();return(s,d)=>(e.openBlock(),e.createBlock(e.Teleport,{to:e.unref(i)??"body"},[e.createElementVNode("div",{ref_key:"wrapperRef",ref:o,class:e.normalizeClass(["fixed left-0 top-0 z-100 h-full w-full bg-surface-10/50 p-2 transition-all duration-100",[l.value,s.wrapperClass,{"op-0 pointer-events-none":!n.value,"op-100":n.value}]]),onClick:a},[e.renderSlot(s.$slots,"default")],2)],8,["to"]))}}),ao={class:"flex justify-end p-4 md:px-6 md:py-4 md:pb-0"},so={class:"h-full flex flex-col items-center justify-center px-4 md:px-6"},io=e.defineComponent({__name:"Drawer",props:e.mergeModels({persistent:{type:Boolean,default:!1},blur:{type:[String,Boolean],default:!1},position:{default:"left"}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const r=t,n=e.useModel(t,"modelValue");return(o,a)=>{const l=We,c=je;return e.openBlock(),e.createBlock(c,{modelValue:n.value,"onUpdate:modelValue":a[1]||(a[1]=i=>n.value=i),blur:r.blur,persistent:r.persistent},{default:e.withCtx(()=>[e.createVNode(e.Transition,{"enter-from-class":o.position==="left"?"-translate-x-1/1":"translate-x-1/1","enter-to-class":(o.position==="left","translate-x-0"),"leave-from-class":(o.position==="left","translate-x-0"),"leave-to-class":o.position==="left"?"-translate-x-1/1":"translate-x-1/1","enter-active-class":"transition ease-out duration-300","leave-active-class":"transition ease-in duration-200"},{default:e.withCtx(()=>[n.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["bg-surface-low fixed h-full w-full md:w-md",o.position==="left"?"left-0":"right-0"])},[e.createElementVNode("div",ao,[e.createVNode(l,{icon:"",variant:"transparent",class:"text-surface-on hover:text-surface-on",onPointerup:a[0]||(a[0]=i=>n.value=!1)},{default:e.withCtx(()=>a[2]||(a[2]=[e.createElementVNode("i",{class:"i-fluent-dismiss-12-filled"},null,-1)])),_:1})]),e.createElementVNode("div",so,[e.renderSlot(o.$slots,"default")])],2)):e.createCommentVNode("",!0)]),_:3},8,["enter-from-class","enter-to-class","leave-from-class","leave-to-class"])]),_:3},8,["modelValue","blur","persistent"])}}}),co=e.defineComponent({__name:"Dropzone",props:{dashed:{type:Boolean,default:!0},accept:{default:"*"}},emits:["drop"],setup(t,{emit:r}){const n=t,o=r,a=e.ref(),{onChange:l,open:c}=dr({accept:n.accept});l(f=>{f?o("drop",Array.from(f)):o("drop",null)});const{isOverDropZone:i}=cr(a,{onDrop:f=>{o("drop",f)}}),s=Fe("default"),d=it();return(f,u)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"dropZoneRef",ref:a,class:e.normalizeClass([[e.unref(s).class,e.unref(i)&&e.unref(d).class,{"bg-surface-low":!e.unref(i),"border-dashed":f.dashed}],"h-full w-full flex cursor-pointer items-center justify-center border rounded"]),style:e.normalizeStyle([e.unref(s).style,e.unref(i)&&e.unref(d).style]),onPointerup:u[0]||(u[0]=()=>e.unref(c)())},[e.renderSlot(f.$slots,"default")],38))}}),uo=e.defineComponent({__name:"Image",props:{is:{default:"img"},src:{},style:{},class:{},width:{},maxWidth:{},height:{},maxHeight:{},rounded:{default:"none"}},setup(t){const r=t,n=e.ref(!1),o=e.ref(null);function a(){n.value=!0}e.onMounted(()=>{var c;(c=o.value)!=null&&c.complete&&a()});const l=O(r);return(c,i)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({height:c.height,width:c.width,maxHeight:c.maxHeight,maxWidth:c.maxWidth})},[c.src?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.is),e.mergeProps({key:0,ref_key:"img",ref:o,style:[c.style,e.unref(l).style],src:c.src,class:["h-full w-full object-cover",[r.class,e.unref(l).class,{hidden:!n.value}]]},c.$attrs,{onLoad:a}),null,16,["style","src","class"])):e.createCommentVNode("",!0),n.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["h-full w-full animate-pulse border-transparent object-cover",[r.class,e.unref(l).class]]),style:e.normalizeStyle([c.style,e.unref(l).style])},null,6))],4))}}),fo={class:"relative"},mo=e.defineComponent({__name:"Indicator",props:{color:{default:"primary"},size:{default:"md"},position:{default:"top-right"},ping:{type:Boolean}},setup(t){const r=t,n=e.computed(()=>{switch(r.size){case"sm":return"w-2 h-2";case"md":return"w-3 h-3";case"lg":return"w-4 h-4";default:return typeof r.size=="number"||!Number.isNaN(Number(r.size))?`w-${r.size} h-${r.size}`:r.size}}),o=e.useSlots(),a=e.computed(()=>{if(!o.label)return"";switch(r.size){case"sm":return"text-sm children:px-1.5";case"lg":return"text-lg children:px-2.5";case"md":default:return"text-md children:px-2"}}),l=e.computed(()=>{switch(r.position){case"bottom-left":return"bottom-0 left-0 -translate-x-1/2 translate-y-1/2";case"bottom-right":return"bottom-0 right-0 translate-x-1/2 translate-y-1/2";case"top-left":return"top-0 left-0 -translate-x-1/2 -translate-y-1/2";case"top-right":default:return"top-0 right-0 translate-x-1/2 -translate-y-1/2"}}),c=e.computed(()=>r.color),i=Ft(c);return(s,d)=>(e.openBlock(),e.createElementBlock("div",fo,[e.createElementVNode("div",{class:e.normalizeClass([[l.value,a.value],"absolute z-1"])},[r.ping?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["absolute box-content animate-ping border-2 border-transparent rounded-full",[{[n.value]:!s.$slots.label},e.unref(i).class]]),style:e.normalizeStyle([e.unref(i).style])},[s.$slots.label?e.renderSlot(s.$slots,"label",{key:0}):e.createCommentVNode("",!0)],6)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["border-surface-low top-0 box-content border-2 rounded-full",[{[n.value]:!s.$slots.label},e.unref(i).class]]),style:e.normalizeStyle(e.unref(i).style)},[s.$slots.label?e.renderSlot(s.$slots,"label",{key:0}):e.createCommentVNode("",!0)],6)],2),e.renderSlot(s.$slots,"default")]))}});function ut(t){return(t==null?void 0:t.role)==="divider"}function dt(t){return(t==null?void 0:t.role)==="label"}function se(t){return!ut(t)&&!dt(t)}function Ut(t){return t===void 0?!1:t.some(r=>se(r)?r.icon!==void 0:!1)}const po={key:0,class:"px-2 py-1 text-xs text-surface-dimmed"},ho={key:1,class:"my-2 border-t border-surface"},go={key:1,class:"w-5 flex-shrink-0"},yo={class:"flex-grow text-truncate text-left"},bo={key:2,class:"i-tabler-chevron-right flex-shrink-0"},Gt=e.defineComponent({__name:"MenuItem",props:{data:{},idx:{},hasIcon:{type:Boolean},rounded:{default:"md"},color:{default:"primary"}},setup(t){const r=t,n=e.ref(null),o=te(n,{delayLeave:100}),a=O({rounded:r.rounded}),l=e.inject("menuCurrentIdx",e.ref([])),c=e.computed(()=>l.value.join()===r.idx.join());e.watchEffect(()=>{var u;c.value&&((u=n.value)==null||u.focus())});const i=e.computed(()=>l.value.length>r.idx.length&&l.value.slice(0,r.idx.length).join()===r.idx.join()),s=e.computed(()=>r.color),d=Oe(s),f=e.inject("selectMenuItem",()=>{console.error("selectMenuItem is not provided")});return(u,m)=>{const y=e.resolveComponent("MenuItem",!0);return e.unref(dt)(u.data)?(e.openBlock(),e.createElementBlock("div",po,e.toDisplayString(u.data.title),1)):e.unref(ut)(u.data)?(e.openBlock(),e.createElementBlock("div",ho)):(e.openBlock(),e.createElementBlock("button",e.mergeProps({key:2,ref_key:"menuItemRef",ref:n,tabindex:-1,class:["relative inline-block h-8 w-full flex cursor-pointer items-center gap-2 hover:bg-surface-variant-2 px-2 outline-2 focus-visible:outline",[e.unref(a).class,{"z-1":c.value,"bg-surface-variant-2":i.value}]]},e.unref(d),{style:[e.unref(a).style],onPointerdown:m[0]||(m[0]=()=>{const v=u.data;v.value&&e.unref(f)(v.value)})}),[u.data.icon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass([u.data.icon,"w-5 flex-shrink-0"])},null,2)):r.hasIcon?(e.openBlock(),e.createElementBlock("i",go)):e.createCommentVNode("",!0),e.createElementVNode("div",yo,e.toDisplayString(u.data.title),1),u.data.children?(e.openBlock(),e.createElementBlock("i",bo)):e.createCommentVNode("",!0),u.data.children&&(e.unref(o)||i.value)?(e.openBlock(),e.createElementBlock("menu",{key:3,class:e.normalizeClass(["absolute left-100% top-0 ml-1 w-64 border border bg-surface bg-surface p-2",e.unref(a).class]),style:e.normalizeStyle(e.unref(a).style)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.data.children,(v,p)=>(e.openBlock(),e.createBlock(y,{key:p,"has-icon":e.unref(Ut)(u.data.children),data:v,idx:[...u.idx,p]},null,8,["has-icon","data","idx"]))),128))],6)):e.createCommentVNode("",!0)],16))}}}),ko={key:0,class:"text-surface-variant-3 px-2 py-1 text-xs text-surface-dimmed"},wo={key:1,class:"my-2 border-t border-surface"},So=e.defineComponent({__name:"Menu",props:e.mergeModels({rounded:{default:"md"},enterActiveClass:{default:"animate-keyframes-zoom-in animate-duration-0.1s"},leaveActiveClass:{default:"animate-keyframes-zoom-out animate-duration-0.1s"},data:{},trigger:{default:"click"},classes:{},color:{default:"primary"}},{modelValue:{type:Boolean,default:void 0},modelModifiers:{}}),emits:e.mergeModels(["select"],["update:modelValue"]),setup(t,{emit:r}){const n=t,o=r,a=e.useModel(t,"modelValue"),l=e.computed(()=>a.value),[c,i]=Kn(),s=e.computed(()=>l.value===void 0?c.value:l.value),d=O(n),f=e.ref(null),u=e.ref(null),m=e.ref(null);N(u,"pointerup",g=>{n.trigger!=="click"||g.button!==0||(g.stopPropagation(),g.preventDefault(),i())});const y=te(u,{delayLeave:100}),v=te(m,{delayLeave:100});e.watchEffect(()=>{n.trigger==="hover"&&(y.value||v.value?i(!0):i(!1))});const p=e.ref({x:0,y:0});N(u,"contextmenu",g=>{n.trigger==="contextmenu"&&(g.stopPropagation(),g.preventDefault(),i(),p.value={x:g.offsetX,y:g.offsetY})}),Ze(m,()=>{i(!1)},{capture:!0}),N(window,"contextmenu",()=>{i(!1)});const b=e.ref([-1]);e.watchEffect(()=>{s.value||(b.value=[-1])}),e.provide("menuCurrentIdx",b);function k(g,x){const E=g;if(x.length<=1)return E.length;const S=E[x[0]];if(!se(S)||S.children===void 0)return 0;const $=S.children;return k($,x.slice(1))}const h=e.computed(()=>n.data===void 0?0:k(n.data,b.value)),w=e.computed(()=>n.data);U("ArrowDown",g=>{var $;if(!s.value)return;g.preventDefault();const x=b.value;let S=(x[x.length-1]+1)%h.value;for(;!se(C(w.value,[...x.slice(0,x.length-1),S]))||($=C(w.value,[...x.slice(0,x.length-1),S]))!=null&&$.render;)S=(S+1)%h.value;b.value=[...x.slice(0,x.length-1),S]}),U("ArrowUp",g=>{var $;if(!s.value)return;g.preventDefault();const x=b.value,E=x[x.length-1];if(E===-1&&x.length===1){b.value=[h.value-1];return}let S=(E-1+h.value)%h.value;for(;!se(C(w.value,[...x.slice(0,x.length-1),S]))||($=C(w.value,[...x.slice(0,x.length-1),S]))!=null&&$.render;)S=(S-1+h.value)%h.value;b.value=[...x.slice(0,x.length-1),S]}),U("ArrowRight",g=>{if(s.value&&(g.preventDefault(),!!se(C(w.value,b.value))&&b.value[b.value.length-1]!==-1)){let x=w.value;for(let E=0;E<b.value.length;E++){if(x===void 0)return;const S=x[b.value[E]];if(!se(S)||S.children===void 0)return;x=S.children}x!==void 0&&(b.value=[...b.value,0])}}),U("ArrowLeft",g=>{s.value&&(g.preventDefault(),se(C(w.value,b.value))&&b.value.length>1&&(b.value=b.value.slice(0,b.value.length-1)))});function C(g,x){if(x.length===0)return;let E=g;for(let S=0;S<x.length-1;S++){if(E===void 0)return;const $=E[x[S]];if(!se($)||$.children===void 0)return;E=$.children}if(E!==void 0)return E[x[x.length-1]]}e.provide("selectMenuItem",g=>{o("select",g),i(!1)}),U("Enter",g=>{var E;if(!s.value)return;g.preventDefault();const x=(E=C(w.value,b.value))==null?void 0:E.value;x&&(o("select",x),i(!1))});const M=e.computed(()=>n.trigger==="contextmenu"?"":"absolute mt-2"),_=e.computed(()=>n.trigger==="contextmenu"?{left:`${p.value.x}px`,top:`${p.value.y}px`,position:"absolute"}:{});return(g,x)=>{var S,$,A,V;const E=Gt;return e.openBlock(),e.createElementBlock("div",{ref_key:"menuWrapperRef",ref:f,class:e.normalizeClass([(S=n.classes)==null?void 0:S.wrapper,{relative:!(($=n.classes)!=null&&$.wrapper)}])},[e.createElementVNode("div",{ref_key:"menuTriggerRef",ref:u,class:e.normalizeClass([(A=n.classes)==null?void 0:A.trigger,{"w-inherit h-inherit":!((V=n.classes)!=null&&V.trigger)}])},[e.renderSlot(g.$slots,"default")],2),e.createVNode(e.Transition,{"enter-active-class":n.enterActiveClass,"leave-active-class":n.leaveActiveClass},{default:e.withCtx(()=>[s.value&&g.data?(e.openBlock(),e.createElementBlock("menu",{key:0,class:"relative z-1 flex justify-center",style:e.normalizeStyle(_.value)},[e.createElementVNode("div",{ref_key:"menuDropdownRef",ref:m,class:e.normalizeClass([[e.unref(d).class,M.value],"w-64 border bg-surface p-2"]),style:e.normalizeStyle([e.unref(d).style])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.data,(H,I)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:I},[e.unref(dt)(H)?(e.openBlock(),e.createElementBlock("div",ko,e.toDisplayString(H.title),1)):e.unref(ut)(H)?(e.openBlock(),e.createElementBlock("div",wo)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[H.render?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(H.render),{key:0})):(e.openBlock(),e.createBlock(E,e.mergeProps({key:1,ref_for:!0},{...n,data:H},{idx:[I],"has-icon":e.unref(Ut)(n.data)}),null,16,["idx","has-icon"]))],64))],64))),128))],6)],4)):e.createCommentVNode("",!0)]),_:1},8,["enter-active-class","leave-active-class"])],2)}}}),ft=e.defineComponent({__name:"Paper",props:{rounded:{default:"md"},loading:{type:Boolean,default:!1},is:{default:"div"},color:{default:"primary"},traceAnimate:{type:Boolean,default:!1},withBorder:{type:Boolean,default:!1},noPadding:{type:Boolean,default:!1}},setup(t){const r=t,n=e.computed(()=>r.color),o=e.computed(()=>r.loading),a=O(r),{x:l,y:c}=Re({type:"client"}),i=e.ref(null),{width:s,height:d,top:f,left:u}=le(i),m=e.computed(()=>Math.min(s.value,d.value)),y=e.computed(()=>!s.value||!d.value?[]:o.value?[{backgroundPosition:"0% 0%",offset:0},{backgroundPosition:"0% 100%",offset:.25},{backgroundPosition:"100% 100%",offset:.5},{backgroundPosition:"100% 0%",offset:.75}]:[]);let v;const p=e.computed(()=>ae(n.value).value[5]),b=e.computed(()=>{var h;return r.loading?(v?v.play():v=(h=i.value)==null?void 0:h.animate(y.value,{duration:1e3,iterations:Number.POSITIVE_INFINITY}),{"--main-color":p.value,"--gradient":`radial-gradient(circle at center, var(--main-color) ${m.value*.5}px, var(--border-color) ${m.value*.5}px)`,"--border-color":"var(--r-surface-border-color)","--bg":"var(--r-surface-background-color)",background:"linear-gradient(var(--bg), var(--bg)) padding-box, var(--gradient) border-box","border-color":"transparent","background-color":"var(--bg)","background-size":"200% 200%"}):(v&&v.pause(),{background:"var(--r-surface-background-color)"})}),k=e.computed(()=>{if(r.traceAnimate){const h=e.computed(()=>({x:u.value+s.value/2,y:f.value+d.value/2})),w=e.computed(()=>{if(l.value<u.value||l.value>u.value+s.value||c.value<f.value||c.value>f.value+d.value)return{x:l.value,y:c.value};const C=h.value.x,M=h.value.y;let _,g;const x=(c.value-M)/(l.value-C);return l.value<C?(_=u.value,g=M+x*(u.value-C)):(_=u.value+s.value,g=M+x*(_-C)),g<f.value?(g=f.value,_=C+(g-M)/x):g>f.value+d.value&&(g=f.value+d.value,_=C+(g-M)/x),{x:_,y:g}});return{"--main-color":p.value,"--border-color":"var(--r-surface-border-color)","--bg":"var(--r-surface-background-color)","--gradient":`radial-gradient(circle at ${w.value.x-u.value}px ${w.value.y-f.value}px, var(--main-color) ${m.value*.5}px, var(--border-color) ${m.value*.5}px)`,background:"linear-gradient(var(--bg), var(--bg)) padding-box, var(--gradient) border-box","background-size":"200% 200%","background-color":"var(--bg)"}}else return{}});return(h,w)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(h.is),e.mergeProps({ref_key:"paperRef",ref:i,class:["relative border",[{"p-4":!h.noPadding},e.unref(a).class]],style:[e.unref(a).style,b.value,k.value]},h.withBorder&&!h.traceAnimate&&!o.value?{class:"border-[var(--r-surface-border-color)]"}:{class:"border-transparent"}),{default:e.withCtx(()=>[e.renderSlot(h.$slots,"default")]),_:3},16,["class","style"]))}}),xo={key:0,class:"text-lg"},vo={key:0},Co=e.defineComponent({__name:"Modal",props:e.mergeModels({persistent:{type:Boolean,default:!1},blur:{type:[String,Boolean],default:!1},title:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const r=t,n=e.useModel(t,"modelValue");return(o,a)=>{const l=ft,c=je;return e.openBlock(),e.createBlock(c,{modelValue:n.value,"onUpdate:modelValue":a[0]||(a[0]=i=>n.value=i),blur:r.blur,persistent:r.persistent,"wrapper-class":"flex justify-center items-end md:items-start md:pt-5%"},{default:e.withCtx(()=>[e.createVNode(e.Transition,{"enter-from-class":"translate-y-1/2","enter-to-class":"translate-y-0","leave-from-class":"translate-y-0","leave-to-class":"translate-y-1/2","enter-active-class":"transition ease-out duration-100","leave-active-class":"transition ease-in duration-100"},{default:e.withCtx(()=>[n.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[o.$slots.default?e.renderSlot(o.$slots,"default",{key:0}):(e.openBlock(),e.createBlock(l,{key:1,"with-border":"",class:"w-full flex flex flex-col gap-2 md:w-md"},{default:e.withCtx(()=>[o.title||o.$slots.title?(e.openBlock(),e.createElementBlock("div",xo,[o.title?(e.openBlock(),e.createElementBlock("div",vo,e.toDisplayString(o.title),1)):e.renderSlot(o.$slots,"title",{key:1})])):e.createCommentVNode("",!0),e.createElementVNode("div",null,[e.renderSlot(o.$slots,"body")]),e.renderSlot(o.$slots,"footer")]),_:3}))],64)):e.createCommentVNode("",!0)]),_:3})]),_:3},8,["modelValue","blur","persistent"])}}}),Bo=e.shallowRef([]);function _o(){return Bo}const Eo=e.defineComponent({__name:"ModalSystem",setup(t){const r=_o();e.watchEffect(()=>{console.log(r.value)});const n=e.computed(()=>r.value.length>0);return(o,a)=>{const l=je;return e.openBlock(),e.createBlock(l,{"model-value":n.value,persistent:!0,"wrapper-class":"flex justify-center items-end md:items-start md:pt-5%"},{default:e.withCtx(()=>[e.createElementVNode("div",null,e.toDisplayString(e.unref(r)),1)]),_:1},8,["model-value"])}}}),qt=e.defineComponent({__name:"Progress",props:{value:{default:0},max:{default:100},min:{default:0},size:{default:"md"},color:{default:"primary"},rounded:{default:"full"},loading:{type:Boolean,default:!1}},setup(t){const r=t,n=e.computed(()=>{switch(r.size){case"sm":return"h-0.25";case"md":return"h-0.5";case"lg":return"h-1";default:return"h-0.5"}}),o=e.computed(()=>r.color),a=_e(o),l=Ee("bg",{dark:7,light:3}),c=O(r);return(i,s)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({class:["relative w-full self-center overflow-hidden",[n.value,e.unref(c).class]],style:[e.unref(c).style]},e.unref(l)),[i.loading?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:1,class:"loading-progress h-full"},e.unref(a)),null,16)):(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:0,class:"h-full"},e.unref(a),{style:[{width:`${(Number(i.value)-Number(i.min))/(Number(i.max)-Number(i.min))*100}%`}]}),null,16))],16))}}),Mo={key:0,class:"h-container w-container i-tabler-loader-2 shrink-0 animate-spin"},$o={key:1},zo={class:"grow-1"},Vo={key:1,class:"i-fluent-dismiss-12-filled"},Kt=e.defineComponent({__name:"Notification",props:{title:{},message:{},icon:{},loading:{type:Boolean},withBorder:{type:Boolean},closeable:{type:Boolean},rounded:{default:"md"},block:{type:Boolean,default:!1},color:{default:"primary"},size:{default:"md"},complete:{},total:{default:100}},emits:["close"],setup(t){const r=t,n=O(r),o=e.computed(()=>r.color),a=_e(o),l=Lt(o),c=Le(),i=e.computed(()=>{switch(r.size){case"sm":return"min-h-10 p-1";case"lg":return"min-h-16 p-4";case"md":default:return"min-h-16 p-3"}});return(s,d)=>{const f=We,u=qt;return e.openBlock(),e.createElementBlock("div",e.mergeProps({class:["overflow-hidden",[{"border-0":!s.withBorder},e.unref(n).class,{"max-w-100":!s.block,"w-full":s.block}]],style:[e.unref(n).style]},e.unref(c)),[e.createElementVNode("div",{class:e.normalizeClass(["relative min-w-80 w-full flex items-center gap-2 pl-4",[i.value,e.unref(l).class]])},[s.icon?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([[e.unref(l).class],"leading-0"]),style:e.normalizeStyle(e.unref(l).style)},[s.loading?(e.openBlock(),e.createElementBlock("i",Mo)):(e.openBlock(),e.createElementBlock("i",{key:1,class:e.normalizeClass(["h-container w-container shrink-0",s.icon])},null,2))],6)):(e.openBlock(),e.createElementBlock("div",$o,[e.createElementVNode("div",e.mergeProps({class:["absolute left-[0.25rem] top-[0.25rem] h-[calc(100%-0.5rem)] w-1 rounded-full bg-[var(--d-bg)] dark:bg-[var(--d-bg)]",[{"animate-pulse":s.loading}]]},e.unref(a)),null,16)])),e.createElementVNode("div",zo,[s.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["text-[var(--l-text)] dark:text-[var(--d-text)]",[{"text-xs":s.size==="sm","text-sm":s.size==="md","text-base":s.size==="lg"},e.unref(l).class]]),style:e.normalizeStyle(e.unref(l).style)},e.toDisplayString(s.title),7)):e.createCommentVNode("",!0),s.$slots.message?e.renderSlot(s.$slots,"message",{key:1}):s.message?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["text-surface-dimmed",{"text-xs":s.size==="sm","text-sm":s.size==="md"||s.size==="lg"}])},e.toDisplayString(s.message),3)):e.createCommentVNode("",!0)]),s.closeable?(e.openBlock(),e.createBlock(f,{key:2,icon:"",variant:"transparent",color:"white",onClick:d[0]||(d[0]=m=>s.$emit("close"))},{default:e.withCtx(()=>[s.$slots.closeIcon?e.renderSlot(s.$slots,"close-icon",{key:0}):(e.openBlock(),e.createElementBlock("i",Vo))]),_:3})):e.createCommentVNode("",!0)],2),s.complete?(e.openBlock(),e.createBlock(u,{key:0,value:s.complete,max:s.total},null,8,["value","max"])):e.createCommentVNode("",!0)],16)}}}),Ao={class:"pointer-events-none fixed z-20 h-full w-full children:pointer-events-auto"},To=["data-hash"],No=e.defineComponent({__name:"NotificationSystem",props:{position:{default:"top-right"},progress:{type:Boolean,default:!0},topN:{default:3},gap:{default:8},pt:{default:8},pl:{default:8},pr:{default:8},pb:{default:8}},setup(t){const r=t,n=Ue(r.topN),o=e.ref([]),a=e.computed(()=>o.value.map(h=>h.getBoundingClientRect())),l=Ue(),c=e.shallowRef({});e.watch([o.value],()=>{for(const h of o.value){const w=h.dataset.hash;if(w&&!c.value[w]){const C=te(h,{});c.value[w]=C}}}),r.progress&&er(({delta:h})=>{l.value=l.value.map(w=>c.value[w.hash]&&c.value[w.hash].value||!n.value.includes(w)?w:{...w,durationMS:w.durationMS-h}).filter(w=>w.durationMS>0)},{});const i=e.computed(()=>{const h={"top-left":0,"top-right":0,top:0,"bottom-left":0,"bottom-right":0,bottom:0};return n.value.map((w,C)=>{const M=w.position||r.position,_=h[M];return a.value[C]&&(h[M]+=a.value[C].height+r.gap),_})});function s(h){return["top-left","top-right","top"].includes(h)}function d(h=0,w){return w||(w=r.position),s(w)?{top:`${h+r.pt}px`}:{bottom:`${h+r.pb}px`}}function f(h){return h.includes("right")?{transform:"translateX(-100%)"}:h.includes("left")?{}:{transform:"translateX(-50%)"}}function u(h){return h.includes("right")?{right:`${r.pr}px`}:h.includes("left")?{left:`${r.pl}px`}:{left:"50%"}}function m(h){return h.includes("top")?{top:`${r.pt}px`}:{bottom:`${r.pb}px`}}const y=function(h){return s(h)?"animate-keyframes-fade-in-down animate-duration-0.3s":"animate-keyframes-fade-in-up animate-duration-0.3s"},v=function(h){return s(h)?"animate-keyframes-fade-out-down animate-duration-0.3s":"animate-keyframes-fade-out-up animate-duration-0.3s"};function p(h){n.value.indexOf(h)!==-1&&(l.value=l.value.filter(C=>C.hash!==h.hash))}function b(h){if(!h.durationMS||h.durationMS<=0)return 0;const w=h.durationMS,C=h.initialDurationMS;return(C-w)/C}const k=["top-left","top-right","top","bottom-left","bottom-right","bottom"];return(h,w)=>{const C=Kt;return e.openBlock(),e.createElementBlock("div",Ao,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(k,M=>e.createElementVNode("div",{key:M,style:e.normalizeStyle([m(M),u(M)]),class:"absolute"},[e.createVNode(e.TransitionGroup,{"enter-active-class":y(M),"leave-active-class":v(M)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(n),(_,g)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:_.hash},[_.position===M?(e.openBlock(),e.createElementBlock("div",{key:0,class:"absolute transition-top,bottom,transform duration-0.3s",style:e.normalizeStyle([d(i.value[g],_.position)])},[e.createElementVNode("div",{ref_for:!0,ref_key:"notificationRefs",ref:o,"data-hash":_.hash,style:e.normalizeStyle([f(M),d(i.value[g],_.position)])},[e.createVNode(C,{"with-border":"",closeable:"",title:_.title,message:_.message,icon:_.icon,loading:_.loading,color:_.color,complete:h.progress?b(_)*100:void 0,onClose:x=>p(_)},null,8,["title","message","icon","loading","color","complete","onClose"])],12,To)],4)):e.createCommentVNode("",!0)],64))),128))]),_:2},1032,["enter-active-class","leave-active-class"])],4)),64))])}}}),Ho={class:"relative"},Jt=e.defineComponent({__name:"Overlay",props:{blur:{type:[Boolean,String],default:!1},rounded:{default:"none"},opacity:{default:30},color:{default:"black"}},setup(t){const r=t,n=e.computed(()=>{switch(r.blur){case"sm":return"backdrop-blur-sm";case"md":case!0:return"backdrop-blur-md";case"lg":return"backdrop-blur-lg";default:return""}}),o=O(r),a=e.ref(null),l=z(r.color).toRgb(),c=e.computed(()=>({backgroundColor:`rgba(${l.r}, ${l.g}, ${l.b}, ${r.opacity/100})`}));return(i,s)=>(e.openBlock(),e.createElementBlock("div",Ho,[e.renderSlot(i.$slots,"default"),e.createElementVNode("div",e.mergeProps(i.$attrs,{ref_key:"wrapperRef",ref:a,class:[[n.value,e.unref(o).class],"absolute left-0 top-0 h-full w-full overflow-hidden md:items-center"],style:[e.unref(o).style,c.value]}),[e.renderSlot(i.$slots,"content")],16)]))}}),Io=["for"],Ro={key:1},Do=["id","disabled","placeholder","type"],Zt=e.defineComponent({__name:"TextField",props:e.mergeModels({onChange:{},color:{default:"primary"},error:{type:Boolean},disabled:{type:Boolean},rounded:{default:"md"},size:{default:"md"},password:{type:Boolean},placeholder:{},label:{}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t,{expose:r}){const n=t,o=e.useModel(t,"modelValue"),a=e.computed(()=>{switch(n.size){case"sm":return{base:"h-6 px-2 py-1 text-xs"};case"lg":return{base:"h-10 px-4 py-2 text-base"};case"md":default:return{base:"h-8 px-3 py-1 text-sm"}}}),l=e.computed(()=>{switch(n.size){case"sm":return"text-xs";case"lg":return"md-md";case"md":default:return"text-sm"}}),c=e.computed(()=>n.color),i=ct(c),s=e.computed(()=>n.disabled?"pointer-events-none select-none filter opacity-60":""),d=O(n),f=e.ref(null);r({el:f});const u=e.useAttrs(),m=De(u);return(y,v)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle([e.unref(i)])},[y.$slots.label||y.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref(m),class:e.normalizeClass(["mb-1 block",[l.value]])},[y.$slots.label?e.renderSlot(y.$slots,"label",{key:0}):(e.openBlock(),e.createElementBlock("span",Ro,e.toDisplayString(y.label),1))],10,Io)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",e.mergeProps({id:e.unref(m)},y.$attrs,{ref_key:"input",ref:f,"onUpdate:modelValue":v[0]||(v[0]=p=>o.value=p),disabled:y.disabled,class:["w-full border px-2 py-1 outline-none custom-input-colors",[s.value,e.unref(d).class,a.value.base]],style:[e.unref(d).style],placeholder:y.placeholder,type:n.password?"password":"text"}),null,16,Do),[[e.vModelDynamic,o.value]])],4))}}),Po={class:"flex gap-2"},Lo=e.defineComponent({__name:"PinInput",props:{modelValue:{},length:{default:6},size:{},password:{type:Boolean}},setup(t){const r=t,n=e.ref([]);function o(i){i.preventDefault(),i.stopPropagation();const s=n.value.findIndex(f=>f.el===i.target),d=i.target.value??"";i.target.value="",Array.from(d).forEach((f,u)=>{s+u>=n.value.length||(n.value[s+u].el.value=f,s+u+1<n.value.length?(n.value[s+u+1].el.focus(),n.value[s+u+1].el.select()):n.value[s+u].el.blur())})}function a(i){i.preventDefault(),i.stopPropagation();const s=i.target.value!=="";i.target.value="";const d=n.value.findIndex(f=>f.el===i.target);d!==0&&(n.value[d-1].el.focus(),n.value[d-1].el.select(),s||(n.value[d-1].el.value=""))}function l(i){i.preventDefault(),i.stopPropagation();const s=n.value.findIndex(d=>d.el===i.target);s>0&&(n.value[s-1].el.focus(),n.value[s-1].el.select())}function c(i){i.preventDefault(),i.stopPropagation();const s=n.value.findIndex(d=>d.el===i.target);s<n.value.length-1&&(n.value[s+1].el.focus(),n.value[s+1].el.select())}return(i,s)=>(e.openBlock(),e.createElementBlock("div",Po,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.length,d=>(e.openBlock(),e.createBlock(Zt,{ref_for:!0,ref_key:"inputs",ref:n,key:d,class:"w-8 text-center",style:{padding:"0"},password:r.password,onPointerup:s[0]||(s[0]=f=>f.target.select()),onInput:e.withModifiers(o,["stop","prevent"]),onKeydown:[e.withKeys(a,["backspace"]),e.withKeys(l,["arrow-left"]),e.withKeys(c,["arrow-right"])]},null,8,["password"]))),128))]))}}),Oo=e.defineComponent({__name:"Popover",props:e.mergeModels({trigger:{default:"click"},position:{default:"bottom"},zIndex:{default:1e4},offset:{default:4},overlay:{type:Boolean,default:!1}},{modelValue:{default:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const r=t,n=e.ref(null),o=e.ref(null),a=le(n),l=le(o),c=e.computed(()=>{switch(r.position){case"top-start":return"top-0 left-0";case"top-end":return"top-0 right-0";case"bottom-end":return"top-100% right-0";case"bottom-start":return"top-100% left-0";case"bottom":return"top-100% left-50%";default:return"top-100%"}}),i=e.computed(()=>{switch(r.position){case"top-start":case"top-end":return{top:`${-l.height.value-r.offset}px`};case"top":return{top:`${-l.height.value-r.offset}px`,left:`${-l.width.value/2+a.width.value/2}px`};case"bottom-start":case"bottom-end":return{marginTop:`${r.offset}px`};case"bottom":return{top:`${a.height.value+r.offset}px`,left:`${-l.width.value/2+a.width.value/2}px`};case"left-start":return{left:`${-l.width.value-r.offset}px`,top:0};case"left-end":return{left:`${-l.width.value-r.offset}px`,top:`${-l.height.value+a.height.value}px`};case"left":return{left:`${-l.width.value-r.offset}px`,top:`${-l.height.value/2+a.height.value/2}px`};case"right-start":return{left:`${r.offset+a.width.value}px`,top:0};case"right-end":return{left:`${r.offset+a.width.value}px`,top:`${-l.height.value+a.height.value}px`};case"right":return{left:`${a.width.value+r.offset}px`,top:`${-l.height.value/2+a.height.value/2}px`};default:return{}}}),s=te(n),d=e.useModel(t,"modelValue"),f=e.computed(()=>r.trigger==="hover"?s.value:d.value);function u(m){var y;!((y=n.value)!=null&&y.contains(m.target))||m.target===n.value||(d.value=!d.value)}return Ze(o,m=>{var y;(y=n.value)!=null&&y.contains(m.target)?d.value=!0:d.value=!1}),(m,y)=>{const v=Jt;return e.openBlock(),e.createElementBlock("div",{ref_key:"wrapperRef",ref:n,class:"relative"},[e.createElementVNode("div",{onPointerup:u},[e.renderSlot(m.$slots,"default")],32),f.value&&m.overlay?(e.openBlock(),e.createBlock(v,{key:0,opacity:0,class:"fixed inset-0 z-10",style:e.normalizeStyle({zIndex:m.zIndex}),onPointerup:y[0]||(y[0]=p=>d.value=!1)},null,8,["style"])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"contentRef",ref:o,class:e.normalizeClass([c.value,"absolute children:w-max"]),style:e.normalizeStyle([i.value,{zIndex:m.zIndex}])},[e.renderSlot(m.$slots,"content")],6)):e.createCommentVNode("",!0)],512)}}}),Fo=["onMouseover","onPointerdown"],Wo="#ffeb91",jo="text-[var(--d-text)]",Xo="text-surface-dimmed",Yo="text-[var(--d-text-h)]",Uo="i-fluent-star-12-filled",Go="i-fluent-star-12-filled",qo=e.defineComponent({__name:"Rating",props:e.mergeModels({count:{},icons:{},color:{default:"#ffeb91"},highlightSelectedOnly:{type:Boolean},unselectable:{type:Boolean},size:{}},{modelValue:{default:0},modelModifiers:{}}),emits:e.mergeModels(["select"],["update:modelValue"]),setup(t,{emit:r}){const n=t,o=r,a=e.computed(()=>n.count??5),l=e.useModel(t,"modelValue"),c=e.computed(()=>n.highlightSelectedOnly??!1),i=e.computed(()=>n.unselectable??!1),s=e.ref(-1),d=e.computed(()=>f(n.icons,a.value,Uo,Go));function f(h,w,C,M){function _(x){return typeof x=="string"?{active:x,normal:x}:x===void 0?{active:M,normal:C}:{active:x.active||M,normal:x.normal||C}}if(h===void 0)return Array.from({length:w},()=>({active:M,normal:C}));let g;if(typeof h=="string")g={active:h,normal:h};else if(Array.isArray(h)){const x=h.map(E=>_(E));return x.length===1?(g=x[0],Array.from({length:w},()=>({...g}))):x.slice(0,w).concat(Array.from({length:Math.max(0,w-x.length)},()=>({active:M,normal:C})))}else g={active:h.active||M,normal:h.normal||C};return Array.from({length:w},()=>({...g}))}function u(h){return c.value?s.value!==-1?s.value===h+1:l.value===h+1:s.value!==-1?s.value>h:l.value>=h+1}function m(h){const w=d.value[h].normal,C=d.value[h].active;return u(h)?[c.value?Yo:jo,C]:[Xo,w]}const v=e.computed(()=>{if(typeof n.color=="string")return Array.from({length:a.value}).map(()=>n.color);const h=Array.from({length:a.value}).map(()=>Wo);return n.color.forEach((w,C)=>{w&&(h[C]=w)}),h}).value.map(h=>Ce("filled",h)),p=L({color:"surface",type:"text",index:{dark:6,light:4}});function b(h){l.value===h&&i.value?(o("select",0),l.value=0):(o("select",h+1),l.value=h+1)}const k=e.computed(()=>{switch(n.size){case"sm":return"text-xs";case"lg":return"text-lg";case"md":default:return"text-base"}});return(h,w)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex cursor-pointer",k.value])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(C,M)=>(e.openBlock(),e.createElementBlock("div",{key:M,class:"pr-1",onMouseover:_=>s.value=M+1,onMouseleave:w[0]||(w[0]=_=>s.value=-1),onPointerdown:_=>b(M)},[e.createElementVNode("i",e.mergeProps({ref_for:!0},u(M)?e.unref(v)[M].value:e.unref(p),{class:["active:translate-y-1px",[m(M)]]}),null,16)],40,Fo))),128))],2))}}),Ko=e.defineComponent({__name:"RokuProvider",props:{is:{default:"div"},theme:{default:"default"},themes:{default:()=>({default:at.value})}},setup(t){const r=t,n=It(),o=e.computed(()=>r.themes[r.theme]);e.watchEffect(()=>{ne.value=typeof o.value.colors.surface=="string"?o.value.colors.surface:ne.value,de.value=typeof o.value.colors.primary=="string"?o.value.colors.primary:de.value,fe.value=typeof o.value.colors.secondary=="string"?o.value.colors.secondary:fe.value,me.value=typeof o.value.colors.tertiary=="string"?o.value.colors.tertiary:me.value,pe.value=typeof o.value.colors.error=="string"?o.value.colors.error:pe.value});const a=e.ref(null),l=e.computed(()=>nt({colors:{surface:ne.value,primary:de.value,secondary:fe.value,tertiary:me.value,error:pe.value},name:o.value.name}));return e.provide(Ht,n),e.provide("currentThemeData",e.computed(()=>o.value)),lo(a),(c,i)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.is),{ref_key:"wrapperRef",ref:a,style:e.normalizeStyle([l.value])},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default")]),_:3},8,["style"]))}}),Jo=["id"],Zo=["for"],Qo=["for"],Qt=e.defineComponent({inheritAttrs:!1,__name:"Switch",props:e.mergeModels({size:{default:"md"},animate:{type:Boolean,default:!0},options:{},label:{},id:{},rounded:{default:"full"},color:{default:"primary"},disabled:{type:Boolean},offIcon:{},onIcon:{},value:{type:Boolean},indicatorIcon:{},onIndicatorIcon:{},offIndicatorIcon:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const r=t,n=e.useModel(t,"modelValue");r.value&&(n.value=r.value);const o=e.ref(null),a=e.ref(!1),l=e.computed(()=>{switch(r.size){case"sm":return{icon:"text-xs mx-0.5",wrapper:"h-4 w-8",indicator:a.value?"h-3 w-4":"h-3 w-3",inactive:"left-[calc(0.125rem-1px)]",active:a.value?"left-[calc(0.875rem-1px)]":"left-[calc(1.125rem-1px)]"};case"lg":return{icon:"text-lg mx-2",wrapper:"h-8 w-16",indicator:a.value?"h-6 w-8":"h-6 w-6",inactive:"left-[calc(0.25rem-1px)]",active:a.value?"left-[calc(1.75rem-1px)]":"left-[calc(2.25rem-1px)]"};case"md":default:return{icon:"text-sm mx-1",wrapper:"h-6 w-12",indicator:a.value?"h-4 w-5":"h-4 w-4",inactive:"left-[calc(0.25rem-1px)]",active:a.value?"left-[calc(1.5rem-1px)]":"left-[calc(1.75rem-1px)]"}}}),c=e.computed(()=>r.animate?{indicator:"transition-all",progress:"transition-width"}:{indicator:"",progress:""}),i=De(r),s=Ee("bg",{dark:7,light:3}),d=Ae(r.color,"bg",5),f=Ae(r.color,"text",5),u=e.computed(()=>({wrapper:n.value?[d.value.class]:[s.value.class],indicator:"bg-white shadow"})),m=e.computed(()=>({wrapper:n.value?d.value.style:s.value.style,indicator:n.value?{}:""})),y=O(r),v=e.computed(()=>r.color),p=Oe(v),b=e.ref(null);return N(b,"keydown",k=>{(k.key==="Enter"||k.key===" ")&&(n.value=!n.value)}),(k,h)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapperRef",ref:b,role:"switch",tabindex:"0",class:e.normalizeClass(["relative flex items-center gap-2 outline-none",[e.unref(p).class,e.unref(y).class,{"pointer-events-none filter-grayscale op-60":r.disabled}]]),style:e.normalizeStyle([e.unref(p).style,e.unref(y).style])},[e.withDirectives(e.createElementVNode("input",e.mergeProps({id:e.unref(i),"onUpdate:modelValue":h[0]||(h[0]=w=>n.value=w)},k.$attrs,{class:"hidden",type:"checkbox"}),null,16,Jo),[[e.vModelCheckbox,n.value]]),e.createElementVNode("label",{class:"leading-0 cursor-pointer!",for:e.unref(i)},[e.createElementVNode("div",{ref_key:"wrapper",ref:o,class:e.normalizeClass([[l.value.wrapper,...u.value.wrapper,e.unref(y).class],"relative inline-block"]),style:e.normalizeStyle([e.unref(y).style,m.value.wrapper]),onPointerdown:h[1]||(h[1]=w=>a.value=!0),onPointerup:h[2]||(h[2]=w=>a.value=!1),onPointerleave:h[3]||(h[3]=w=>a.value=!1),onPointerenter:h[4]||(h[4]=w=>w.buttons===1&&(a.value=!0))},[e.createElementVNode("div",{class:e.normalizeClass(["absolute top-50% -translate-y-50%",[l.value.indicator,u.value.indicator,c.value.indicator,n.value?l.value.active:l.value.inactive,e.unref(y).class]]),style:e.normalizeStyle([e.unref(y).style,m.value.indicator])},[e.createVNode(e.Transition,{name:"fade",mode:"out-in","enter-active-class":"transition-all duration-300","enter-from-class":"scale-0 ","enter-to-class":"scale-100","leave-active-class":"transition-all duration-300","leave-from-class":"scale-100","leave-to-class":"scale-0"},{default:e.withCtx(()=>[r.indicatorIcon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(["h-full w-full",[r.indicatorIcon,n.value?e.unref(f).class:"text-black"]]),style:e.normalizeStyle(e.unref(f).style)},null,6)):n.value&&r.onIndicatorIcon?(e.openBlock(),e.createElementBlock("i",{key:1,class:e.normalizeClass(["h-full w-full",[r.onIndicatorIcon,n.value?e.unref(f).class:"text-black"]]),style:e.normalizeStyle(e.unref(f).style)},null,6)):!n.value&&r.offIndicatorIcon?(e.openBlock(),e.createElementBlock("i",{key:2,class:e.normalizeClass(["h-full w-full",[r.offIndicatorIcon,n.value?e.unref(f).class:"text-black"]]),style:e.normalizeStyle(e.unref(f).style)},null,6)):e.createCommentVNode("",!0)]),_:1})],6),e.createVNode(e.Transition,{name:"fade",mode:"out-in","enter-active-class":"transition-all duration-300","enter-from-class":"scale-0 rotate-50","enter-to-class":"scale-100 rotate-0","leave-active-class":"transition-all duration-300","leave-from-class":"scale-100 rotate-0","leave-to-class":"scale-0 rotate-50 "},{default:e.withCtx(()=>[n.value?(e.openBlock(),e.createElementBlock("i",{key:"on",class:e.normalizeClass(["absolute top-1/2 -translate-y-50%",[l.value.icon,{[`left-0 text-${k.color}-on-container-low`]:n.value,[k.onIcon??""]:n.value&&k.onIcon,[k.offIcon??""]:!n.value&&k.offIcon}]])},null,2)):(e.openBlock(),e.createElementBlock("i",{key:"off",class:e.normalizeClass(["absolute top-1/2 -translate-y-50%",[l.value.icon,{"right-0":!n.value,[k.onIcon??""]:n.value&&k.onIcon,[k.offIcon??""]:!n.value&&k.offIcon}]])},null,2))]),_:1})],38)],8,Zo),k.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref(i)},e.toDisplayString(k.label),9,Qo)):e.createCommentVNode("",!0)],6))}}),el={class:"scheme-switch inline-block"},tl={class:"dark:hidden"},nl={class:"light:hidden"},rl=e.defineComponent({__name:"SchemeSwitch",props:{disableViewTranslation:{type:Boolean,default:!1},circleTranslation:{type:Boolean,default:!1}},setup(t){const r=t,n=e.ref(!1);let o;N("click",c=>o=c),e.watch([n],()=>{if(oe){const c=(o==null?void 0:o.clientX)??innerWidth/2,i=(o==null?void 0:o.clientY)??innerHeight/2,s=Math.hypot(Math.max(c,innerWidth-c),Math.max(i,innerHeight-i));if(r.disableViewTranslation)document.documentElement.setAttribute("data-scheme",n.value?"dark":"light"),localStorage.setItem("scheme",n.value?"dark":"light");else{const d=document.startViewTransition(()=>{n.value?(document.documentElement.setAttribute("data-scheme","dark"),localStorage.setItem("scheme","dark")):(document.documentElement.setAttribute("data-scheme","light"),localStorage.setItem("scheme","light"))});r.circleTranslation&&d.ready.then(()=>{document.documentElement.animate({clipPath:[`circle(0 at ${c}px ${i}px)`,`circle(${s}px at ${c}px ${i}px)`]},{duration:500,easing:"ease-in",pseudoElement:"::view-transition-new(root)"})})}}});const a=e.ref(!0),l=e.ref(!1);return e.onMounted(()=>{oe&&(n.value=localStorage.getItem("scheme")==="dark"),a.value=!1}),e.nextTick(()=>{l.value=!0}),(c,i)=>{const s=Qt;return e.openBlock(),e.createElementBlock("div",el,[e.createElementVNode("div",{class:e.normalizeClass({hidden:!a.value})},[e.createElementVNode("div",tl,[e.createVNode(s,{value:!1,"on-icon":"i-line-md-moon-twotone-alt-loop","off-icon":"i-line-md-sunny-outline-twotone-loop"})]),e.createElementVNode("div",nl,[e.createVNode(s,{value:!0,color:"secondary","on-icon":"i-line-md-moon-twotone-alt-loop","off-icon":"i-line-md-sunny-outline-twotone-loop"})])],2),e.createElementVNode("div",{class:e.normalizeClass({hidden:a.value})},[e.createVNode(s,{modelValue:n.value,"onUpdate:modelValue":i[0]||(i[0]=d=>n.value=d),animate:l.value,color:"secondary","on-icon":"i-line-md-moon-twotone-alt-loop","off-icon":"i-line-md-sunny-outline-twotone-loop"},null,8,["modelValue","animate"])],2)])}}}),ol=e.defineComponent({__name:"ScrollArea",props:{height:{},barWidth:{default:8},threshold:{default:100},floating:{type:Boolean},autoHide:{type:Boolean}},setup(t,{expose:r}){const n=t,o=zt(),a=le(o),l=e.ref(),c=le(()=>l.value),i=e.computed(()=>{if(n.height)return typeof n.height=="number"?`${n.height}px`:n.height;const V=o.value?Number.parseFloat(getComputedStyle(o.value).paddingTop)+Number.parseFloat(getComputedStyle(o.value).paddingBottom):0,H=o.value?Number.parseFloat(getComputedStyle(o.value).marginTop)+Number.parseFloat(getComputedStyle(o.value).marginBottom):0;return`${a.height.value-V-H}px`}),s=e.ref(),d=At(()=>s.value),{x:f,y:u}=fr(()=>s.value),m=e.computed(()=>{var V;return(((V=s.value)==null?void 0:V.scrollHeight)??0)-(d.value??0)}),y=Vt(()=>s.value),v=e.computed(()=>u.value/m.value||0),p=e.computed(()=>s.value?d.value/y.value*d.value:0),b=e.computed(()=>d.value-p.value),k=e.computed(()=>{if(!s.value)return null;const V=v.value*b.value;return{x:f.value,y:u.value,barHeight:p.value,barTop:V}}),h=e.ref(!1),w=e.ref(0),C=e.ref(""),M=e.ref(0),_=Re({type:"client"});N(()=>l.value,"pointerdown",V=>{h.value=!0,w.value=V.clientY,M.value=u.value,C.value=document.body.style.userSelect,document.body.style.userSelect="none"}),N(()=>document,"pointermove",()=>{if(!h.value)return;if(n.threshold<c.left.value-_.x.value||_.x.value-c.right.value>n.threshold){u.value=M.value;return}const H=(_.y.value-w.value)/b.value;u.value=M.value+H*m.value}),N(()=>document,"pointerup",()=>{h.value=!1,document.body.style.userSelect=C.value}),r({$el:s});const g=e.ref(),x=te(g),E=te(()=>l.value),S=Ee("bg",{dark:2,light:7},.5),$=Ee("bg",{dark:2,light:7},.75);function A(V){var ge;const{clientY:H}=V,{top:I,height:q}=c,T=I.value,P=q.value,Y=T+P/2,ee=H-Y;(ge=s.value)==null||ge.scrollBy({top:ee/P*d.value,behavior:"smooth"})}return(V,H)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapperRef",ref:g,style:e.normalizeStyle({height:i.value}),class:"relative max-h-fit overflow-hidden"},[k.value?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle({width:`${V.barWidth}px`}),class:"absolute right-0 z-99999 h-full",onPointerdown:A},[e.withDirectives(e.createElementVNode("div",{ref_key:"scrollBarIndicatorRef",ref:l,class:e.normalizeClass([[e.unref(S).class,{"op-0":!e.unref(x)&&V.autoHide,"op-100":e.unref(x)&&V.autoHide}],"absolute right-0 z-1 rounded-full transition-background-color,opacity"]),style:e.normalizeStyle([{right:"0px",width:`${V.barWidth}px`,top:`${k.value.barTop}px`,height:`${k.value.barHeight}px`},!e.unref(E)&&!h.value&&e.unref(S).style,(e.unref(E)||h.value)&&e.unref($).style])},null,6),[[e.vShow,k.value.barHeight<e.unref(d)]])],36)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"scrollDomRef",ref:s,style:e.normalizeStyle({paddingRight:`${V.floating?0:V.barWidth}px`,scrollbarWidth:"none",height:"100%",overflowY:"scroll"})},[e.renderSlot(V.$slots,"default")],4)],4))}}),ll={class:"w-full flex items-center"},al=["placeholder","readonly","value","aria-label"],sl={key:0,class:"flex cursor-default items-center justify-between gap-2 rounded p-1 px-2"},il=["onPointerdown","onMousemove"],cl={key:0},ul={key:0,class:"flex cursor-default items-center justify-between gap-2 rounded p-1 px-2"},dl=e.defineComponent({__name:"Select",props:e.mergeModels({ariaLabel:{},options:{default(){return[]}},color:{default:"primary"},size:{default:"md"},noneText:{default:"No options"},notFoundText:{default:"Not found"},rounded:{default:"md"},placeholder:{default:""},searchable:{type:Boolean,default:!1},filter:{type:Function,default:(t,r)=>t.includes(r)}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["change","input"],["update:modelValue"]),setup(t,{emit:r}){const n=t,o=r,a=O(n),l=e.useModel(t,"modelValue"),c=e.ref(null),i=e.ref(null),s=e.ref(!1);Ze(i,()=>{s.value=!1});const d=e.ref(-1),f=e.ref(-1);e.watchEffect(()=>{s.value||(f.value=-1)}),e.watch(l,()=>{o("change",l.value)});const u=e.computed(()=>l.value),m=e.computed(()=>p(u.value)),y=e.computed(()=>n.options.findIndex(T=>$(T,u.value))),v=e.ref(m.value);e.watch(m,()=>{v.value=m.value});function p(T){return T?typeof T=="string"||typeof T=="symbol"||typeof T=="number"?String(T):T.label?T.label:T.id:""}function b(T){if(T)return typeof T=="string"||typeof T=="symbol"||typeof T=="number"?T:T.id}function k(T){s.value=!0;const P=T.target;v.value=P.value,o("input",v.value)}const h=e.computed(()=>n.searchable&&v.value!==m.value?n.options.filter(T=>n.filter(p(T),v.value)):n.options);U("ArrowDown",T=>{s.value&&(T.preventDefault(),f.value===-1&&d.value!==-1?f.value=d.value:f.value===-1&&d.value===-1&&y.value!==-1&&(f.value=y.value),f.value=(f.value+1)%n.options.length)}),U("ArrowUp",T=>{s.value&&(T.preventDefault(),f.value===-1&&d.value!==-1?f.value=d.value:f.value===-1&&d.value===-1&&y.value!==-1&&(f.value=y.value),f.value=(f.value-1+n.options.length)%n.options.length)}),U("Enter",()=>{s.value&&f.value!==-1&&(l.value=h.value[f.value],c.value.focus(),s.value=!1)});function w(T){if(c.value.focus(),!s.value){s.value=!0;return}l.value=T,s.value=!1}const C=e.computed(()=>n.color),M=ct(C,"default"),_=e.computed(()=>{switch(n.size){case"sm":return{wrapper:"h-6 w-full py-1 pl-1.5 pr-6 text-sm",dropdown:"text-sm children:py-1"};case"lg":return{wrapper:"h-10 w-full py-2 pl-3 pr-10 text-lg",dropdown:"text-lg children:py-2"};default:return{wrapper:"h-8 w-full py-1 pl-2 pr-8 text-base",dropdown:"text-base children:py-1"}}}),g=e.ref(null),{height:x}=le(g),{bottom:E}=le(c);e.watch([s],()=>{f.value=-1,d.value=-1});const S=e.computed(()=>s.value&&oe?x.value===0?!1:document.documentElement.clientHeight-E.value>x.value:!1);function $(T,P){return P?typeof T=="string"||typeof T=="symbol"||typeof T=="number"?T===P:typeof P=="string"||typeof P=="symbol"||typeof P=="number"?!1:T.id===P.id:!1}const A=e.computed(()=>n.searchable?"cursor-text":"cursor-pointer"),V=Le(),H=it(),I=_e(C);function q(T){d.value=T,f.value=-1}return(T,P)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapperRef",ref:i,class:"relative",style:e.normalizeStyle(e.unref(M))},[e.createElementVNode("div",ll,[e.createElementVNode("input",{ref_key:"inputRef",ref:c,class:e.normalizeClass([[_.value.wrapper,e.unref(a).class,A.value],"border outline-none outline-none focus-visible:outline-2 custom-input-colors"]),placeholder:T.placeholder,style:e.normalizeStyle([e.unref(a).style,e.unref(M)]),readonly:!T.searchable,value:v.value,"aria-label":T.ariaLabel,"aria-haspopup":"listbox",autocomplete:"off",onInput:k,onClick:P[0]||(P[0]=Y=>s.value=!0)},null,46,al),P[2]||(P[2]=e.createElementVNode("i",{class:"i-fluent-chevron-down-12-filled pointer-events-none absolute right-2"},null,-1))]),s.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"dropdownRef",ref:g,class:e.normalizeClass(["absolute z-10 mt-2 w-full flex-col overflow-hidden border rounded p-1",[e.unref(V).class,_.value.dropdown,{"bottom-10":!S.value}]]),style:e.normalizeStyle([e.unref(V).style])},[T.options.length===0?(e.openBlock(),e.createElementBlock("div",sl,[e.renderSlot(T.$slots,"none",{},()=>[e.createTextVNode(e.toDisplayString(T.noneText),1)])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(Y,ee)=>(e.openBlock(),e.createElementBlock("div",{key:b(Y),class:e.normalizeClass([[f.value===ee&&e.unref(I).class,d.value===ee&&f.value===-1&&e.unref(H).class],"flex cursor-pointer items-center justify-between gap-2 rounded p-1 px-2"]),style:e.normalizeStyle([f.value===ee&&e.unref(I).style,d.value===ee&&f.value===-1&&e.unref(H).style]),onPointerdown:ge=>w(Y),onMousemove:ge=>q(ee),onMouseleave:P[1]||(P[1]=ge=>d.value=-1)},[e.renderSlot(T.$slots,"item",{data:Y,selected:$(Y,u.value)},()=>[e.createTextVNode(e.toDisplayString(p(Y)),1)]),$(Y,u.value)?(e.openBlock(),e.createElementBlock("div",cl,P[3]||(P[3]=[e.createElementVNode("i",{class:"i-fluent-checkmark-12-filled h-3 w-3"},null,-1)]))):e.createCommentVNode("",!0)],46,il))),128)),T.searchable&&h.value.length===0?(e.openBlock(),e.createElementBlock("div",ul,[e.renderSlot(T.$slots,"not-found",{},()=>[e.createTextVNode(e.toDisplayString(T.notFoundText),1)])])):e.createCommentVNode("",!0)],64))],6)):e.createCommentVNode("",!0)],4))}}),fl=e.defineComponent({__name:"SelectArea",props:{target:{},color:{default:"primary"}},emits:["selectStart","selectChange","selectEnd"],setup(t,{emit:r}){const n=t,o=r,a=e.computed(()=>n.color),l=ae(a),c=e.computed(()=>{const k=l.value[5].setAlpha(.5).toHex8String(),h=l.value[5].setAlpha(.1).toHex8String();return{"--border-color":k,"--fill-color":h}}),{shift:i,control:s}=pr(),d=zt(),f=e.computed(()=>n.target??d.value),u=Re(),m=e.ref({x:0,y:0}),y=e.ref({x:0,y:0}),v=e.ref(!1),p=le(f);N(f,"pointerdown",k=>{if(k.button!==0)return;const h=k.pageX-p.left.value,w=k.pageY-p.top.value;m.value={x:h,y:w},y.value={x:h,y:w},v.value=!0,o("selectStart",{target:k.target,shift:i.value,ctrl:s.value})},{capture:!0}),N(window,"pointerup",k=>{v.value=!1,o("selectEnd",{left:Math.min(m.value.x,y.value.x),top:Math.min(m.value.y,y.value.y),right:Math.max(m.value.x,y.value.x),bottom:Math.max(m.value.y,y.value.y)},{target:k.target,shift:i.value,ctrl:s.value})}),N(f,"pointermove",k=>{const h=k.pageX-p.left.value,w=k.pageY-p.top.value;v.value&&(y.value={x:h,y:w},o("selectChange",{left:Math.min(m.value.x,y.value.x),top:Math.min(m.value.y,y.value.y),right:Math.max(m.value.x,y.value.x),bottom:Math.max(m.value.y,y.value.y)},{target:k.target,shift:i.value,ctrl:s.value}))});const b=e.computed(()=>f.value?f.value.parentElement:null);return N(b,"scroll",k=>{v.value&&(y.value={x:u.x.value-p.left.value,y:u.y.value-p.top.value},o("selectChange",{left:Math.min(m.value.x,y.value.x),top:Math.min(m.value.y,y.value.y),right:Math.max(m.value.x,y.value.x),bottom:Math.max(m.value.y,y.value.y)},{target:k.target,shift:i.value,ctrl:s.value}))}),N(window,"dragend",()=>{v.value=!1}),(k,h)=>f.value?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:f.value},[v.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"absolute z-10000 h-1 border border border-[var(--border-color)] bg-[var(--fill-color)]",style:e.normalizeStyle([{left:`${Math.min(m.value.x,y.value.x)}px`,top:`${Math.min(m.value.y,y.value.y)}px`,width:`${Math.abs(m.value.x-y.value.x)}px`,height:`${Math.abs(m.value.y-y.value.y)}px`},c.value])},null,4)):e.createCommentVNode("",!0)],8,["to"])):e.createCommentVNode("",!0)}}),ml={class:"relative w-full"},pl="dark:bg-white bg-[var(--i-bg)]",hl="dark:bg-[var(--i-bg)] bg-white",gl=e.defineComponent({__name:"Slider",props:e.mergeModels({size:{default:"md"},animate:{type:Boolean,default:!1},width:{},options:{},min:{default:0},max:{default:100},step:{default:1},tickNum:{},color:{default:"primary"},minWidth:{default:12}},{modelValue:{default:void 0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const r=t;function n(_,g,x){const E=[];for(let S=_;S<=g;S+=x)E.push(S);return E[E.length-1]!==g&&E.push(g),E}function o(_,g){const x=[];if(_===0)return x;x.push(g[0]);const E=(g.length-1)/(_-1);for(let S=1;S<_-1;S++)x.push(g[Math.round(S*E)]);return x.push(g[g.length-1]),x}const a=e.computed(()=>r.options?r.options.length:r.tickNum??0),l=e.computed(()=>r.options===void 0?n(r.min,r.max,r.step):r.options),c=e.computed(()=>o(a.value,l.value)),i=e.useModel(t,"modelValue"),s=e.computed(()=>l.value.length??0),d=e.ref(l.value.includes(i.value)?l.value.indexOf(i.value):0);function f(_){let g=l.value.indexOf(_);if(g===-1)if(typeof _=="number"){let x=1/0;for(let E=0;E<l.value.length;E++){const S=Math.abs(l.value[E]-_);S<x&&(x=S,g=E)}}else g=0;return g}const u=e.computed(()=>r.color),m=ae(u.value),y=e.computed(()=>m.value[4]),v=_e(u);e.watchEffect(()=>{d.value<0||(i.value=l.value[d.value])}),e.watchEffect(()=>{d.value=f(i.value)});const p=e.ref(),b=e.ref(),k=e.ref(!1);function h(_){if(!k.value)return;if(!(_.buttons===1)){k.value=!1;return}_.preventDefault(),_.stopPropagation();const x=le(p),{clientX:E}=_,S=x.left.value,A=x.right.value-S,V=Math.round((E-S)/A*(s.value-1));if(V<0){d.value=0;return}if(V>s.value-1){d.value=s.value-1;return}d.value=V}e.watchEffect(()=>{d.value=f(i.value)});function w(_){_.preventDefault(),_.stopPropagation(),k.value=!0,h(_)}N(p,"pointerdown",w),e.onMounted(()=>{N(document,"pointermove",h),d.value=Math.max(0,f(i.value))});const C=e.computed(()=>{switch(r.size){case"sm":return{wrapper:"h-2",innerWrapper:"px-0.5 h-1",content:"h-1",tick:"h-0.5 w-0.5 -translate-x-0.25 -translate-y-0.25",indicator:"h-3 w-3 -translate-x-1.5 -translate-y-1.5",indicatorInner:"h-1.5 w-1.5 -translate-x-0.75 -translate-y-0.75",progress:"-mx-0.5"};case"lg":return{wrapper:"h-6",innerWrapper:"px-1.5 h-3",content:"h-3",tick:"h-1.5 w-1.5 -translate-x-0.75 -translate-y-0.75",indicator:"h-6 w-6 -translate-x-3 -translate-y-3",indicatorInner:"h-3 w-3 -translate-x-1.5 -translate-y-1.5",progress:"-mx-1.5"};case"md":default:return{wrapper:"h-4",innerWrapper:"px-1 h-2",content:"h-2",tick:"h-1 w-1 -translate-x-0.5 -translate-y-0.5",indicator:"h-4 w-4 -translate-x-2 -translate-y-2",indicatorInner:"h-2 w-2 -translate-x-1 -translate-y-1",progress:"-mx-1"}}}),M=e.computed(()=>r.animate?{indicator:"transition-left",progress:"transition-width"}:{indicator:"",progress:""});return(_,g)=>(e.openBlock(),e.createElementBlock("div",ml,[e.createElementVNode("div",{ref_key:"wrapper",ref:p,type:"size",class:e.normalizeClass(["w-full flex cursor-pointer items-center",C.value.wrapper]),onTouchmove:g[0]||(g[0]=e.withModifiers(()=>{},["prevent"]))},[e.createElementVNode("div",{class:e.normalizeClass(["w-full rounded-full bg-surface-3 transition-background-color,border-color,color dark:bg-surface-7",C.value.innerWrapper])},[e.createElementVNode("div",{class:e.normalizeClass(["relative flex",C.value.content]),style:e.normalizeStyle({width:`${r.width}rem`,minWidth:`${r.minWidth}rem`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,x=>(e.openBlock(),e.createElementBlock("div",{key:x,style:e.normalizeStyle({left:`${f(x)/(s.value-1)*100}%`}),class:e.normalizeClass(["absolute top-50% rounded-full bg-surface-0",C.value.tick])},null,6))),128)),d.value!==-1?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"indicator",ref:b,class:e.normalizeClass(["absolute top-50% cursor-pointer rounded-full transition-background-color,border-color,color",[C.value.indicator,M.value.indicator,pl]]),style:e.normalizeStyle([`--i-bg: ${y.value}`,{left:`${d.value/(s.value-1)*100}%`}])},[e.createElementVNode("div",{class:e.normalizeClass(["pointer-events-none absolute left-50% top-50% rounded-full",[C.value.indicatorInner,hl]])},null,2)],6)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["pointer-events-none h-full rounded-full",[e.unref(v).class,C.value.progress,M.value.progress]]),style:e.normalizeStyle([e.unref(v).style,{width:`${d.value/(s.value-1)*100}%`}])},null,6)],6)],2)],34),c.value.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:"relative mx-1 h-1em text-xs text-surface-dimmed",style:e.normalizeStyle({width:`${r.width}rem`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(x,E)=>(e.openBlock(),e.createElementBlock("div",{key:E,style:e.normalizeStyle({left:`${f(x)/(s.value-1)*100}%`}),class:e.normalizeClass(["absolute w-auto flex rounded-full -translate-x-50%",C.value.tick])},e.toDisplayString(x),7))),128))],4)):e.createCommentVNode("",!0)]))}}),yl={class:"h-full py-2"},bl=e.defineComponent({__name:"TabItem",props:{value:{},color:{default:"primary"}},setup(t){const r=t,n=e.computed(()=>r.color),o=e.inject(Ge,e.ref("")),a=e.ref(null),l=e.computed(()=>o.value===r.value);function c(){o.value=r.value}const i=e.inject(Ke,new Map);e.onMounted(()=>{i.set(r.value,a)});const s=e.inject(qe,e.computed(()=>"horizontal")),d=e.computed(()=>{switch(s.value){case"vertical":return"flex-row-reverse rounded-tr-lg rounded-br-lg";case"horizontal":default:return"flex-col rounded-tr-lg rounded-tl-lg"}}),f=e.computed(()=>{switch(s.value){case"vertical":return"absolute inset-0 right-100% h-full w-2px";case"horizontal":default:return"absolute inset-0 top-100% h-2px w-full"}}),u=L({color:n.value,type:"bg",index:5}),m=L({color:n.value,type:"outline",index:5});return(y,v)=>(e.openBlock(),e.createElementBlock("button",e.mergeProps({ref_key:"tabRef",ref:a,type:"button",class:["rutline-none relative min-w-20 flex items-center justify-center outline-none focus-visible:outline-2 outline-offset-0!",[d.value]]},e.unref(m),{onClick:c}),[l.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([e.unref(u).class,f.value]),style:e.normalizeStyle([e.unref(u).style])},null,6)):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass([f.value])},null,2)),e.createElementVNode("div",yl,[e.renderSlot(y.$slots,"default")])],16))}}),kl=e.defineComponent({__name:"Tabs",props:e.mergeModels({defaultValue:{},direction:{default:"horizontal"}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const r=t,n=e.useSlots(),o=e.computed(()=>{var u;const d=(u=n.default)==null?void 0:u.call(n);return(d==null?void 0:d.flatMap(m=>m.type===e.Fragment?m.children:m).filter(m=>{var y;return((y=m==null?void 0:m.props)==null?void 0:y.value)!==void 0}).map(m=>m.props.value))??[]}),a=e.useModel(t,"modelValue");!a.value&&o.value.length>0&&(a.value=o.value[0]);const l=e.ref(null);e.onMounted(()=>{r.defaultValue&&(a.value=r.defaultValue)}),e.provide(Ge,a);const c=e.computed(()=>r.direction);e.provide(qe,c);const i=new Map;e.provide(Ke,i),U("ArrowLeft",d=>{var y;if(!((y=l.value)!=null&&y.contains(document.activeElement))||(d.preventDefault(),r.direction!=="horizontal"))return;const f=a.value?o.value.indexOf(a.value):0,u=f>0?o.value[f-1]:o.value[o.value.length-1];a.value=u;const m=i.get(u);if(m){const v=m.value;v&&v.focus()}}),U("ArrowRight",d=>{var y;if(!((y=l.value)!=null&&y.contains(document.activeElement))||(d.preventDefault(),r.direction!=="horizontal"))return;const f=a.value?o.value.indexOf(a.value):0,u=f<o.value.length-1?a.value=o.value[f+1]:a.value=o.value[0];a.value=u;const m=i.get(u);if(m){const v=m.value;v&&v.focus()}}),U("ArrowUp",d=>{var y;if(!((y=l.value)!=null&&y.contains(document.activeElement))||(d.preventDefault(),r.direction!=="vertical"))return;const f=a.value?o.value.indexOf(a.value):0,u=f>0?o.value[f-1]:o.value[o.value.length-1];a.value=u;const m=i.get(u);if(m){const v=m.value;v&&v.focus()}}),U("ArrowDown",d=>{var y;if(!((y=l.value)!=null&&y.contains(document.activeElement))||(d.preventDefault(),r.direction!=="vertical"))return;const f=a.value?o.value.indexOf(a.value):0,u=f<o.value.length-1?o.value[f+1]:o.value[0];a.value=u;const m=i.get(u);if(m){const v=m.value;v&&v.focus()}});const s=e.computed(()=>{switch(r.direction){case"horizontal":return"flex-row";case"vertical":return"flex-col";default:return"flex-row"}});return(d,f)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tabRef",ref:l,class:e.normalizeClass(["flex",[s.value]])},[e.renderSlot(d.$slots,"default")],2))}}),wl=e.defineComponent({__name:"Tag",props:{color:{},variant:{default:"default"},rounded:{default:"md"},size:{},leftIcon:{},rightIcon:{}},setup(t){const r=t,n=e.computed(()=>{switch(r.size){case"sm":return"px-2 py-0.5 text-xs";case"lg":return"px-4 py-1 text-base";case"md":default:return"px-3 py-0.5 text-sm"}}),o=O(r),a=e.computed(()=>r.color??"primary"),l=e.computed(()=>r.variant),c=Fe(l,a);return(i,s)=>(e.openBlock(),e.createElementBlock("span",{tabindex:-1,style:e.normalizeStyle([e.unref(c).style,e.unref(o).style]),class:e.normalizeClass([[e.unref(c).class,e.unref(o).class,n.value],"inline-block h-fit flex cursor-pointer gap-1 border"])},[r.leftIcon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass([r.leftIcon,"shrink-0"])},null,2)):i.$slots.leftIcon?e.renderSlot(i.$slots,"left-icon",{key:1}):e.createCommentVNode("",!0),e.renderSlot(i.$slots,"default"),r.rightIcon?(e.openBlock(),e.createElementBlock("i",{key:2,class:e.normalizeClass([r.rightIcon,"h-container w-container shrink-0"])},null,2)):i.$slots.rightIcon?e.renderSlot(i.$slots,"right-icon",{key:3}):e.createCommentVNode("",!0)],6))}}),Sl=["data-scheme","data-theme"],xl=e.defineComponent({__name:"ThemeProvider",props:{theme:{},scheme:{}},setup(t){const r=t,n=Tt(),o=e.computed(()=>nt(r.theme?r.theme:n.value)),a=$t("scheme","light"),l=e.computed(()=>r.scheme?r.scheme:a.value);return(c,i)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle([o.value]),"data-scheme":l.value,"data-theme":e.unref(n).name},[e.renderSlot(c.$slots,"default")],12,Sl))}}),vl=e.defineComponent({__name:"Tooltip",props:{timeout:{default:200}},setup(t){const r=t,n=Re(),o=e.ref(null),a=te(o),l=Yn(a,r.timeout),c=e.ref(0),i=e.ref(0),s=e.ref(null),d=te(s);return e.watch(l,(f,u)=>{l.value&&f!==u&&(c.value=n.x.value,i.value=n.y.value)}),(f,u)=>{const m=ft;return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",{ref_key:"hoverableRef",ref:o},[e.renderSlot(f.$slots,"default")],512),c.value&&i.value&&(e.unref(l)||e.unref(d))?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"tooltipRef",ref:s,class:"absolute z-10",style:e.normalizeStyle({left:`${c.value+20}px`,top:`${i.value+20}px`})},[e.createVNode(m,{"with-border":""},{default:e.withCtx(()=>[e.renderSlot(f.$slots,"content")]),_:3})],4)):e.createCommentVNode("",!0)])}}}),Cl='before:absolute before:left-4 before:h-full before:border-r before:content-[""]',mt="relative h-8 py-1 w-full flex items-center gap-2 cursor-pointer focus-visible:outline-none focus-visible:bg-surface-variant-1",Bl=e.defineComponent({__name:"TreeList",props:e.mergeModels({items:{},rounded:{default:"md"}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const r=t,n=O(r),o=e.useModel(t,"modelValue");function a(p){return"children"in p}function l(p){return"value"in p}const c=e.computed(()=>`${mt} hover:bg-surface-variant-1 hover:text-surface text-surface-dimmed`),i=e.computed(()=>`${mt} text-primary before:border-primary bg-surface-variant-1`),s=e.computed(()=>[mt,"text-surface font-bold hover:bg-surface-variant-1"]),d=e.ref(null),f=e.ref(new Map);function u(p,b){a(p)&&(f.value.set(p,p.open??!1),p.children.forEach(k=>{u(k)}))}e.watchEffect(()=>{r.items.forEach(p=>{a(p)&&u(p)})});function m({data:p,level:b}){const k=h=>p.is?e.h(p.is,h,{default:()=>p.title}):e.h("a",h,p.title);return e.createVNode("li",null,[e.createVNode(k,e.mergeProps({tabindex:0,class:[n.value.class,Cl,{[c.value]:o.value!==p.value,[i.value]:o.value===p.value}],style:[{paddingLeft:`${32+b*4}px`},n.value.style],onClick:()=>o.value=p.value,onKeyup:h=>{h.key==="Enter"&&(o.value=p.value)}},p.attrs),{default:()=>[p.title]})])}function y({data:p,level:b}){return e.createVNode("li",{class:["flex items-center relative py-2 text-surface-dimmed font-bold tracking-widest text-xs"],style:[{paddingLeft:`${32+b*4}px`},n.value.style]},[e.createVNode("div",{class:"absolute left-4 h-1/2 translate-y-1/2 border-r"},null),e.createVNode("div",{class:"absolute left-[calc(1rem+0.6px)] h-2 w-2 border rounded-sm bg-surface-variant-1 -translate-x-1/2"},null),p.title])}function v({data:p,level:b}){const k=e.computed(()=>f.value.get(p)),h=e.ref(null),w=e.ref(null);return e.createVNode("li",{class:"transition-height",ref:h},[e.createVNode("button",{ref:w,onClick:()=>f.value.set(p,!f.value.get(p)),class:[n.value.class,s.value],style:[{paddingLeft:`${32+b*4}px`},n.value.style]},[e.createVNode("i",{class:["i-tabler-chevron-down absolute left-2 h-4 w-4 py-1 transition-transform",k.value?"rotate-0":"-rotate-90"]},null),p.title]),e.createVNode(e.Transition,{onBeforeEnter:C=>{C instanceof HTMLElement&&(C.style.height="0px")},onEnter:C=>{C instanceof HTMLElement&&(C.style.height=`${C.scrollHeight}px`)},onAfterEnter:C=>{C instanceof HTMLElement&&(C.style.height="auto")},onBeforeLeave:C=>{C instanceof HTMLElement&&(C.style.height=`${C.scrollHeight}px`)},onLeave:C=>{C instanceof HTMLElement&&(C.style.height="0px")},css:!0,mode:"out-in"},{default:()=>[f.value.get(p)&&e.createVNode("ul",{class:"overflow-hidden transition-height"},[p.children.map(C=>l(C)?e.createVNode(m,{data:C,level:b+1},null):a(C)?e.createVNode(v,{data:C,level:b+1},null):e.createVNode(y,{data:C,level:b+1},null))])]})])}return(p,b)=>(e.openBlock(),e.createElementBlock("ul",{ref_key:"treeListRef",ref:d,class:"flex flex-col text-sm"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.items,(k,h)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:h},[l(k)?(e.openBlock(),e.createBlock(m,{key:0,data:k,level:0},null,8,["data"])):a(k)?(e.openBlock(),e.createBlock(v,{key:1,data:k,level:0},null,8,["data"])):e.createCommentVNode("",!0)],64))),128))],512))}});function en(t){return e.getCurrentScope()?(e.onScopeDispose(t),!0):!1}function G(t){return typeof t=="function"?t():e.unref(t)}const _l=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const El=Object.prototype.toString,Ml=t=>El.call(t)==="[object Object]",he=()=>{};function tn(t,r){function n(...o){return new Promise((a,l)=>{Promise.resolve(t(()=>r.apply(this,o),{fn:r,thisArg:this,args:o})).then(a).catch(l)})}return n}function $l(t,r={}){let n,o,a=he;const l=c=>{clearTimeout(c),a(),a=he};return c=>{const i=G(t),s=G(r.maxWait);return n&&l(n),i<=0||s!==void 0&&s<=0?(o&&(l(o),o=null),Promise.resolve(c())):new Promise((d,f)=>{a=r.rejectOnCancel?f:d,s&&!o&&(o=setTimeout(()=>{n&&l(n),o=null,d(c())},s)),n=setTimeout(()=>{o&&l(o),o=null,d(c())},i)})}}function zl(...t){let r=0,n,o=!0,a=he,l,c,i,s,d;!e.isRef(t[0])&&typeof t[0]=="object"?{delay:c,trailing:i=!0,leading:s=!0,rejectOnCancel:d=!1}=t[0]:[c,i=!0,s=!0,d=!1]=t;const f=()=>{n&&(clearTimeout(n),n=void 0,a(),a=he)};return u=>{const m=G(c),y=Date.now()-r,v=()=>l=u();return f(),m<=0?(r=Date.now(),v()):(y>m&&(s||!o)?(r=Date.now(),v()):i&&(l=new Promise((p,b)=>{a=d?b:p,n=setTimeout(()=>{r=Date.now(),o=!0,p(v()),f()},Math.max(0,m-y))})),!s&&!n&&(n=setTimeout(()=>o=!0,m)),o=!1,l)}}function Vl(t){return e.getCurrentInstance()}function Al(t,r=200,n={}){return tn($l(r,n),t)}function Tl(t,r=200,n=!1,o=!0,a=!1){return tn(zl(r,n,o,a),t)}function nn(t,r=!0,n){Vl()?e.onMounted(t,n):r?t():e.nextTick(t)}function ie(t){var r;const n=G(t);return(r=n==null?void 0:n.$el)!=null?r:n}const Xe=_l?window:void 0;function rn(...t){let r,n,o,a;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,o,a]=t,r=Xe):[r,n,o,a]=t,!r)return he;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const l=[],c=()=>{l.forEach(f=>f()),l.length=0},i=(f,u,m,y)=>(f.addEventListener(u,m,y),()=>f.removeEventListener(u,m,y)),s=e.watch(()=>[ie(r),G(a)],([f,u])=>{if(c(),!f)return;const m=Ml(u)?{...u}:u;l.push(...n.flatMap(y=>o.map(v=>i(f,y,v,m))))},{immediate:!0,flush:"post"}),d=()=>{s(),c()};return en(d),d}function Nl(){const t=e.ref(!1),r=e.getCurrentInstance();return r&&e.onMounted(()=>{t.value=!0},r),t}function Hl(t){const r=Nl();return e.computed(()=>(r.value,!!t()))}function Il(t,r,n={}){const{window:o=Xe,...a}=n;let l;const c=Hl(()=>o&&"ResizeObserver"in o),i=()=>{l&&(l.disconnect(),l=void 0)},s=e.computed(()=>{const u=G(t);return Array.isArray(u)?u.map(m=>ie(m)):[ie(u)]}),d=e.watch(s,u=>{if(i(),c.value&&o){l=new ResizeObserver(r);for(const m of u)m&&l.observe(m,a)}},{immediate:!0,flush:"post"}),f=()=>{i(),d()};return en(f),{isSupported:c,stop:f}}function Rl(t,r={width:0,height:0},n={}){const{window:o=Xe,box:a="content-box"}=n,l=e.computed(()=>{var u,m;return(m=(u=ie(t))==null?void 0:u.namespaceURI)==null?void 0:m.includes("svg")}),c=e.ref(r.width),i=e.ref(r.height),{stop:s}=Il(t,([u])=>{const m=a==="border-box"?u.borderBoxSize:a==="content-box"?u.contentBoxSize:u.devicePixelContentBoxSize;if(o&&l.value){const y=ie(t);if(y){const v=y.getBoundingClientRect();c.value=v.width,i.value=v.height}}else if(m){const y=Array.isArray(m)?m:[m];c.value=y.reduce((v,{inlineSize:p})=>v+p,0),i.value=y.reduce((v,{blockSize:p})=>v+p,0)}else c.value=u.contentRect.width,i.value=u.contentRect.height},n);nn(()=>{const u=ie(t);u&&(c.value="offsetWidth"in u?u.offsetWidth:r.width,i.value="offsetHeight"in u?u.offsetHeight:r.height)});const d=e.watch(()=>ie(t),u=>{c.value=u?r.width:0,i.value=u?r.height:0});function f(){s(),d()}return{width:c,height:i,stop:f}}const on=1;function Dl(t,r={}){const{throttle:n=0,idle:o=200,onStop:a=he,onScroll:l=he,offset:c={left:0,right:0,top:0,bottom:0},eventListenerOptions:i={capture:!1,passive:!0},behavior:s="auto",window:d=Xe,onError:f=g=>{console.error(g)}}=r,u=e.ref(0),m=e.ref(0),y=e.computed({get(){return u.value},set(g){p(g,void 0)}}),v=e.computed({get(){return m.value},set(g){p(void 0,g)}});function p(g,x){var E,S,$,A;if(!d)return;const V=G(t);if(!V)return;($=V instanceof Document?d.document.body:V)==null||$.scrollTo({top:(E=G(x))!=null?E:v.value,left:(S=G(g))!=null?S:y.value,behavior:G(s)});const H=((A=V==null?void 0:V.document)==null?void 0:A.documentElement)||(V==null?void 0:V.documentElement)||V;y!=null&&(u.value=H.scrollLeft),v!=null&&(m.value=H.scrollTop)}const b=e.ref(!1),k=e.reactive({left:!0,right:!1,top:!0,bottom:!1}),h=e.reactive({left:!1,right:!1,top:!1,bottom:!1}),w=g=>{b.value&&(b.value=!1,h.left=!1,h.right=!1,h.top=!1,h.bottom=!1,a(g))},C=Al(w,n+o),M=g=>{var x;if(!d)return;const E=((x=g==null?void 0:g.document)==null?void 0:x.documentElement)||(g==null?void 0:g.documentElement)||ie(g),{display:S,flexDirection:$}=getComputedStyle(E),A=E.scrollLeft;h.left=A<u.value,h.right=A>u.value;const V=Math.abs(A)<=(c.left||0),H=Math.abs(A)+E.clientWidth>=E.scrollWidth-(c.right||0)-on;S==="flex"&&$==="row-reverse"?(k.left=H,k.right=V):(k.left=V,k.right=H),u.value=A;let I=E.scrollTop;g===d.document&&!I&&(I=d.document.body.scrollTop),h.top=I<m.value,h.bottom=I>m.value;const q=Math.abs(I)<=(c.top||0),T=Math.abs(I)+E.clientHeight>=E.scrollHeight-(c.bottom||0)-on;S==="flex"&&$==="column-reverse"?(k.top=T,k.bottom=q):(k.top=q,k.bottom=T),m.value=I},_=g=>{var x;if(!d)return;const E=(x=g.target.documentElement)!=null?x:g.target;M(E),b.value=!0,C(g),l(g)};return rn(t,"scroll",n?Tl(_,n,!0,!1):_,i),nn(()=>{try{const g=G(t);if(!g)return;M(g)}catch(g){f(g)}}),rn(t,"scrollend",w,i),{x:y,y:v,isScrolling:b,arrivedState:k,directions:h,measure(){const g=G(t);d&&g&&M(g)}}}const Pl=e.defineComponent({__name:"Waterfall",props:{gap:{},wrapperWidth:{},itemWidth:{},rowCount:{},paddingX:{}},setup(t,{expose:r}){const n=t,o=e.useSlots(),a=e.computed(()=>e.unref(n.gap)??16),l=e.computed(()=>e.unref(n.rowCount)??3),c=e.computed(()=>e.unref(n.paddingX)??0),i=e.ref();function s(w){return Array.isArray(w)}const d=e.ref([]),f=e.computed(()=>{const w=d.value;return Array.from(w).map(C=>Rl(C))}),u=e.computed(()=>{var w,C;return n.itemWidth?e.unref(n.itemWidth)*l.value+a.value*(l.value-1)+c.value*2:n.wrapperWidth?e.unref(n.wrapperWidth):((C=(w=i.value)==null?void 0:w.parentElement)==null?void 0:C.clientWidth)??0}),m=e.computed(()=>n.itemWidth?e.unref(n.itemWidth):(u.value-c.value*2-a.value*(l.value-1))/l.value);function y(w,C,M,_){const g=e.unref(w),x=Array.from({length:e.unref(C)}).fill(0),E=[],S=Math.max(0,u.value-e.unref(_)*2-m.value*g.length-e.unref(M)*g.length)/2;for(let $=0;$<g.length;$++){const A=g[$],V=x.indexOf(Math.min(...x)),H=V*(m.value+e.unref(M))+e.unref(_)+S,I=x[V];E.push({x:H,y:I,width:A.width.value,height:A.height.value}),x[V]+=A.height.value+e.unref(M)}return E}const v=e.computed(()=>y(f,l,a,c)),p=e.computed(()=>s(v.value)?Math.max(...v.value.map(w=>w.y+w.height)):0),b=e.computed(()=>{var w;return((w=o.default)==null?void 0:w.call(o))??[]}),k=e.computed(()=>{const w=[];return b.value.forEach(C=>{s(C.children)?C.children.forEach(M=>{w.push(M)}):w.push(C)}),w});function h(w){if(!s(v.value))return{};const C=v.value[w];return C?{left:`${C.x??0}px`,top:`${C.y??0}px`,maxWidth:`${m.value}px`}:{}}return r({width:m}),(w,C)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:i,style:e.normalizeStyle({position:"relative",overflowX:"clip",width:`${u.value}px`,height:`${p.value}px`,overflow:"scroll"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,(M,_)=>(e.openBlock(),e.createElementBlock("div",{key:_,ref_for:!0,ref_key:"itemsRef",ref:d,style:e.normalizeStyle([h(_),{position:"absolute"}])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(M),{style:e.normalizeStyle({width:`${m.value}px`})},null,8,["style"]))],4))),128))],4))}}),Ll=e.defineComponent({__name:"VirtualWaterfall",props:{gap:{},wrapperWidth:{},itemWidth:{},rowCount:{},paddingX:{},is:{},items:{},rangeExpand:{}},setup(t,{expose:r}){const n=t,o=e.computed(()=>e.unref(n.rangeExpand)??0),a=e.useSlots(),l=e.computed(()=>e.unref(n.gap)??16),c=e.computed(()=>e.unref(n.rowCount)??3),i=e.computed(()=>e.unref(n.paddingX)??0),s=e.ref(),d=e.computed(()=>s.value&&s.value.$el?s.value.$el:s.value);function f(S){return Array.isArray(S)}const u=e.computed(()=>{var S,$;return n.itemWidth?e.unref(n.itemWidth)*c.value+l.value*(c.value-1)+i.value*2:n.wrapperWidth?e.unref(n.wrapperWidth):(($=(S=d.value)==null?void 0:S.parentElement)==null?void 0:$.clientWidth)??0}),m=e.computed(()=>n.itemWidth?e.unref(n.itemWidth):(u.value-i.value*2-l.value*(c.value-1))/c.value),y=e.computed(()=>e.unref(n.items).map(S=>{const $=m.value/S.width;return{width:m.value,height:S.height*$}}));function v(S,$,A,V){const H=e.unref(S),I=Array.from({length:e.unref($)}).fill(0),q=[],T=Math.max(0,u.value-e.unref(V)*2-m.value*H.length-e.unref(A)*H.length)/2;for(let P=0;P<H.length;P++){const Y=H[P],ee=I.indexOf(Math.min(...I)),ge=ee*(m.value+e.unref(A))+e.unref(V)+T,Ol=I[ee];q.push({x:ge,y:Ol,width:Y.width,height:Y.height}),I[ee]+=Y.height+e.unref(A)}return q}const p=e.computed(()=>v(y,c,l,i)),b=e.computed(()=>f(p.value)?Math.max(...p.value.map(S=>S.y+S.height)):0),k=e.computed(()=>{var S;return((S=a.default)==null?void 0:S.call(a))??[]});function h(S){if(!f(p.value))return{};const $=p.value[S];return $?{left:`${$.x??0}px`,top:`${$.y??0}px`,maxWidth:`${m.value}px`}:{}}const w=e.ref(!1),C=e.computed(()=>w.value?"smooth":"auto"),M=Dl(d,{behavior:C}),_=e.computed(()=>{var S;return[M.y.value-o.value,M.y.value+(((S=d.value)==null?void 0:S.clientHeight)??0)+o.value]}),g=e.computed(()=>p.value.map(S=>{const $=S.y,A=S.y+S.height;return $>=_.value[0]&&$<=_.value[1]||A>=_.value[0]&&A<=_.value[1]||$<=_.value[0]&&A>=_.value[1]})),x=e.computed(()=>{const S=[];return k.value.forEach(($,A)=>{if(f($.children))$.children.forEach((V,H)=>{g.value[H]&&S.push([V,H])});else{if(!g.value[A])return;S.push([$,A])}}),S});r({scroll:M,scrollTo:(S,$=!1)=>{const A=w.value;w.value=$,M.y.value=S,w.value=A}});const E=e.computed(()=>n.is??"div");return(S,$)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(E.value),{ref_key:"wrapper",ref:s,style:{position:"relative"}},{default:e.withCtx(()=>[e.createElementVNode("div",{style:e.normalizeStyle({height:`${b.value}px`,width:`${u.value}px`,margin:"0 auto",position:"relative"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,([A,V])=>(e.openBlock(),e.createElementBlock("div",{key:A,style:e.normalizeStyle([h(V),{position:"absolute"}])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(A),{style:e.normalizeStyle({width:`${m.value}px`})},null,8,["style"]))],4))),128))],4)]),_:1},512))}});B.AspectRatio=ln,B.Avatar=jt,B.Btn=We,B.BtnGroup=jr,B.COLOR_LIGHTNESS_MAP=X,B.ChatContainer=qr,B.ChatMessage=Kr,B.ChatSystem=Zr,B.Chip=Qr,B.ColorInput=ro,B.ColorSwatch=Xt,B.Drawer=io,B.Dropzone=co,B.FullscreenOverlay=je,B.Image=uo,B.Indicator=mo,B.Menu=So,B.MenuItem=Gt,B.Modal=Co,B.ModalSystem=Eo,B.Notification=Kt,B.NotificationSystem=No,B.Notifications=An,B.Overlay=Jt,B.Paper=ft,B.PinInput=Lo,B.Popover=Oo,B.Progress=qt,B.Rating=qo,B.RokuProvider=Ko,B.SURFACE_LIGHTNESS_MAP=ce,B.SchemeSwitch=rl,B.ScrollArea=ol,B.Select=dl,B.SelectArea=fl,B.Slider=gl,B.Switch=Qt,B.TabItem=bl,B.Tabs=kl,B.Tag=wl,B.TextField=Zt,B.ThemeProvider=xl,B.Tooltip=vl,B.TreeList=Bl,B.VirtualWaterfall=Ll,B.Waterfall=Pl,B.borderCS=Pt,B.childrenElementMapSymbol=Ke,B.defaultTheme=at,B.directionSymbol=qe,B.errorColor=pe,B.errorColors=Ar,B.generateColors=be,B.generateColorsMap=xt,B.generateColorsObjMap=Z,B.getCSInner=Ve,B.primaryColor=de,B.primaryColors=$r,B.schemeSymbol=Ht,B.secondaryColor=fe,B.secondaryColors=zr,B.surfaceColor=ne,B.surfaceColors=Tr,B.tabCurrentSymbol=Ge,B.tabValueListSymbol=Tn,B.tertiaryColor=me,B.tertiaryColors=Vr,B.useButtonCS=Fe,B.useCS=L,B.useClientHeight=At,B.useColorCS=Ae,B.useColors=ae,B.useContainerCS=Ce,B.useContainerDefaultCS=Le,B.useContainerDefaultVariantCS=it,B.useContainerFilledCS=_e,B.useContainerLightCS=Wt,B.useCurrentThemeData=Tt,B.useCurrentThemeName=br,B.useCurrentThemeScheme=yr,B.useId=De,B.useIndicatorFilledCS=Ft,B.useInputColorStyle=ct,B.useMergedCS=Be,B.useNotifications=Ue,B.useOutlineCS=Oe,B.useRootTheme=gr,B.useRounded=O,B.useSchemeString=It,B.useScrollHeight=Vt,B.useSurfaceCS=Ee,B.useSurfaceColors=Ot,B.useTextCS=Lt,B.useThemeData=Nt,B.useThemeStyles=nt,Object.defineProperty(B,Symbol.toStringTag,{value:"Module"})});
1
+ (function(B,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(B=typeof globalThis<"u"?globalThis:B||self,e(B["roku-ui"]={},B.Vue))})(this,function(B,e){"use strict";const ln=e.defineComponent({__name:"AspectRatio",props:{ratio:{default:1},width:{},maxWidth:{},height:{},maxHeight:{}},setup(t){return(r,n)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({"--ar-ratio":r.ratio,width:r.width,"max-width":r.maxWidth,height:r.height,"max-height":r.maxHeight}),class:"relative children:absolute children:top-0 before:block before:h-0 children:h-full children:w-full before:pb-[calc((1/var(--ar-ratio,1))*100%)] before:content-['']"},[e.renderSlot(r.$slots,"default")],4))}});function Te(t){"@babel/helpers - typeof";return Te=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Te(t)}var an=/^\s+/,sn=/\s+$/;function z(t,r){if(t=t||"",r=r||{},t instanceof z)return t;if(!(this instanceof z))return new z(t,r);var n=cn(t);this._originalInput=t,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=r.format||n.format,this._gradientType=r.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}z.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var r=this.toRgb();return(r.r*299+r.g*587+r.b*114)/1e3},getLuminance:function(){var r=this.toRgb(),n,o,l,a,c,i;return n=r.r/255,o=r.g/255,l=r.b/255,n<=.03928?a=n/12.92:a=Math.pow((n+.055)/1.055,2.4),o<=.03928?c=o/12.92:c=Math.pow((o+.055)/1.055,2.4),l<=.03928?i=l/12.92:i=Math.pow((l+.055)/1.055,2.4),.2126*a+.7152*c+.0722*i},setAlpha:function(r){return this._a=kt(r),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var r=ht(this._r,this._g,this._b);return{h:r.h*360,s:r.s,v:r.v,a:this._a}},toHsvString:function(){var r=ht(this._r,this._g,this._b),n=Math.round(r.h*360),o=Math.round(r.s*100),l=Math.round(r.v*100);return this._a==1?"hsv("+n+", "+o+"%, "+l+"%)":"hsva("+n+", "+o+"%, "+l+"%, "+this._roundA+")"},toHsl:function(){var r=pt(this._r,this._g,this._b);return{h:r.h*360,s:r.s,l:r.l,a:this._a}},toHslString:function(){var r=pt(this._r,this._g,this._b),n=Math.round(r.h*360),o=Math.round(r.s*100),l=Math.round(r.l*100);return this._a==1?"hsl("+n+", "+o+"%, "+l+"%)":"hsla("+n+", "+o+"%, "+l+"%, "+this._roundA+")"},toHex:function(r){return gt(this._r,this._g,this._b,r)},toHexString:function(r){return"#"+this.toHex(r)},toHex8:function(r){return mn(this._r,this._g,this._b,this._a,r)},toHex8String:function(r){return"#"+this.toHex8(r)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(D(this._r,255)*100)+"%",g:Math.round(D(this._g,255)*100)+"%",b:Math.round(D(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(D(this._r,255)*100)+"%, "+Math.round(D(this._g,255)*100)+"%, "+Math.round(D(this._b,255)*100)+"%)":"rgba("+Math.round(D(this._r,255)*100)+"%, "+Math.round(D(this._g,255)*100)+"%, "+Math.round(D(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:Bn[gt(this._r,this._g,this._b,!0)]||!1},toFilter:function(r){var n="#"+yt(this._r,this._g,this._b,this._a),o=n,l=this._gradientType?"GradientType = 1, ":"";if(r){var a=z(r);o="#"+yt(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+l+"startColorstr="+n+",endColorstr="+o+")"},toString:function(r){var n=!!r;r=r||this._format;var o=!1,l=this._a<1&&this._a>=0,a=!n&&l&&(r==="hex"||r==="hex6"||r==="hex3"||r==="hex4"||r==="hex8"||r==="name");return a?r==="name"&&this._a===0?this.toName():this.toRgbString():(r==="rgb"&&(o=this.toRgbString()),r==="prgb"&&(o=this.toPercentageRgbString()),(r==="hex"||r==="hex6")&&(o=this.toHexString()),r==="hex3"&&(o=this.toHexString(!0)),r==="hex4"&&(o=this.toHex8String(!0)),r==="hex8"&&(o=this.toHex8String()),r==="name"&&(o=this.toName()),r==="hsl"&&(o=this.toHslString()),r==="hsv"&&(o=this.toHsvString()),o||this.toHexString())},clone:function(){return z(this.toString())},_applyModification:function(r,n){var o=r.apply(null,[this].concat([].slice.call(n)));return this._r=o._r,this._g=o._g,this._b=o._b,this.setAlpha(o._a),this},lighten:function(){return this._applyModification(yn,arguments)},brighten:function(){return this._applyModification(bn,arguments)},darken:function(){return this._applyModification(kn,arguments)},desaturate:function(){return this._applyModification(pn,arguments)},saturate:function(){return this._applyModification(hn,arguments)},greyscale:function(){return this._applyModification(gn,arguments)},spin:function(){return this._applyModification(wn,arguments)},_applyCombination:function(r,n){return r.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(vn,arguments)},complement:function(){return this._applyCombination(Sn,arguments)},monochromatic:function(){return this._applyCombination(Cn,arguments)},splitcomplement:function(){return this._applyCombination(xn,arguments)},triad:function(){return this._applyCombination(bt,[3])},tetrad:function(){return this._applyCombination(bt,[4])}},z.fromRatio=function(t,r){if(Te(t)=="object"){var n={};for(var o in t)t.hasOwnProperty(o)&&(o==="a"?n[o]=t[o]:n[o]=Me(t[o]));t=n}return z(t,r)};function cn(t){var r={r:0,g:0,b:0},n=1,o=null,l=null,a=null,c=!1,i=!1;return typeof t=="string"&&(t=$n(t)),Te(t)=="object"&&(re(t.r)&&re(t.g)&&re(t.b)?(r=un(t.r,t.g,t.b),c=!0,i=String(t.r).substr(-1)==="%"?"prgb":"rgb"):re(t.h)&&re(t.s)&&re(t.v)?(o=Me(t.s),l=Me(t.v),r=fn(t.h,o,l),c=!0,i="hsv"):re(t.h)&&re(t.s)&&re(t.l)&&(o=Me(t.s),a=Me(t.l),r=dn(t.h,o,a),c=!0,i="hsl"),t.hasOwnProperty("a")&&(n=t.a)),n=kt(n),{ok:c,format:t.format||i,r:Math.min(255,Math.max(r.r,0)),g:Math.min(255,Math.max(r.g,0)),b:Math.min(255,Math.max(r.b,0)),a:n}}function un(t,r,n){return{r:D(t,255)*255,g:D(r,255)*255,b:D(n,255)*255}}function pt(t,r,n){t=D(t,255),r=D(r,255),n=D(n,255);var o=Math.max(t,r,n),l=Math.min(t,r,n),a,c,i=(o+l)/2;if(o==l)a=c=0;else{var s=o-l;switch(c=i>.5?s/(2-o-l):s/(o+l),o){case t:a=(r-n)/s+(r<n?6:0);break;case r:a=(n-t)/s+2;break;case n:a=(t-r)/s+4;break}a/=6}return{h:a,s:c,l:i}}function dn(t,r,n){var o,l,a;t=D(t,360),r=D(r,100),n=D(n,100);function c(d,f,u){return u<0&&(u+=1),u>1&&(u-=1),u<1/6?d+(f-d)*6*u:u<1/2?f:u<2/3?d+(f-d)*(2/3-u)*6:d}if(r===0)o=l=a=n;else{var i=n<.5?n*(1+r):n+r-n*r,s=2*n-i;o=c(s,i,t+1/3),l=c(s,i,t),a=c(s,i,t-1/3)}return{r:o*255,g:l*255,b:a*255}}function ht(t,r,n){t=D(t,255),r=D(r,255),n=D(n,255);var o=Math.max(t,r,n),l=Math.min(t,r,n),a,c,i=o,s=o-l;if(c=o===0?0:s/o,o==l)a=0;else{switch(o){case t:a=(r-n)/s+(r<n?6:0);break;case r:a=(n-t)/s+2;break;case n:a=(t-r)/s+4;break}a/=6}return{h:a,s:c,v:i}}function fn(t,r,n){t=D(t,360)*6,r=D(r,100),n=D(n,100);var o=Math.floor(t),l=t-o,a=n*(1-r),c=n*(1-l*r),i=n*(1-(1-l)*r),s=o%6,d=[n,c,a,a,i,n][s],f=[i,n,n,c,a,a][s],u=[a,a,i,n,n,c][s];return{r:d*255,g:f*255,b:u*255}}function gt(t,r,n,o){var l=[K(Math.round(t).toString(16)),K(Math.round(r).toString(16)),K(Math.round(n).toString(16))];return o&&l[0].charAt(0)==l[0].charAt(1)&&l[1].charAt(0)==l[1].charAt(1)&&l[2].charAt(0)==l[2].charAt(1)?l[0].charAt(0)+l[1].charAt(0)+l[2].charAt(0):l.join("")}function mn(t,r,n,o,l){var a=[K(Math.round(t).toString(16)),K(Math.round(r).toString(16)),K(Math.round(n).toString(16)),K(wt(o))];return l&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function yt(t,r,n,o){var l=[K(wt(o)),K(Math.round(t).toString(16)),K(Math.round(r).toString(16)),K(Math.round(n).toString(16))];return l.join("")}z.equals=function(t,r){return!t||!r?!1:z(t).toRgbString()==z(r).toRgbString()},z.random=function(){return z.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function pn(t,r){r=r===0?0:r||10;var n=z(t).toHsl();return n.s-=r/100,n.s=He(n.s),z(n)}function hn(t,r){r=r===0?0:r||10;var n=z(t).toHsl();return n.s+=r/100,n.s=He(n.s),z(n)}function gn(t){return z(t).desaturate(100)}function yn(t,r){r=r===0?0:r||10;var n=z(t).toHsl();return n.l+=r/100,n.l=He(n.l),z(n)}function bn(t,r){r=r===0?0:r||10;var n=z(t).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(r/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(r/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(r/100)))),z(n)}function kn(t,r){r=r===0?0:r||10;var n=z(t).toHsl();return n.l-=r/100,n.l=He(n.l),z(n)}function wn(t,r){var n=z(t).toHsl(),o=(n.h+r)%360;return n.h=o<0?360+o:o,z(n)}function Sn(t){var r=z(t).toHsl();return r.h=(r.h+180)%360,z(r)}function bt(t,r){if(isNaN(r)||r<=0)throw new Error("Argument to polyad must be a positive number");for(var n=z(t).toHsl(),o=[z(t)],l=360/r,a=1;a<r;a++)o.push(z({h:(n.h+a*l)%360,s:n.s,l:n.l}));return o}function xn(t){var r=z(t).toHsl(),n=r.h;return[z(t),z({h:(n+72)%360,s:r.s,l:r.l}),z({h:(n+216)%360,s:r.s,l:r.l})]}function vn(t,r,n){r=r||6,n=n||30;var o=z(t).toHsl(),l=360/n,a=[z(t)];for(o.h=(o.h-(l*r>>1)+720)%360;--r;)o.h=(o.h+l)%360,a.push(z(o));return a}function Cn(t,r){r=r||6;for(var n=z(t).toHsv(),o=n.h,l=n.s,a=n.v,c=[],i=1/r;r--;)c.push(z({h:o,s:l,v:a})),a=(a+i)%1;return c}z.mix=function(t,r,n){n=n===0?0:n||50;var o=z(t).toRgb(),l=z(r).toRgb(),a=n/100,c={r:(l.r-o.r)*a+o.r,g:(l.g-o.g)*a+o.g,b:(l.b-o.b)*a+o.b,a:(l.a-o.a)*a+o.a};return z(c)},z.readability=function(t,r){var n=z(t),o=z(r);return(Math.max(n.getLuminance(),o.getLuminance())+.05)/(Math.min(n.getLuminance(),o.getLuminance())+.05)},z.isReadable=function(t,r,n){var o=z.readability(t,r),l,a;switch(a=!1,l=zn(n),l.level+l.size){case"AAsmall":case"AAAlarge":a=o>=4.5;break;case"AAlarge":a=o>=3;break;case"AAAsmall":a=o>=7;break}return a},z.mostReadable=function(t,r,n){var o=null,l=0,a,c,i,s;n=n||{},c=n.includeFallbackColors,i=n.level,s=n.size;for(var d=0;d<r.length;d++)a=z.readability(t,r[d]),a>l&&(l=a,o=z(r[d]));return z.isReadable(t,o,{level:i,size:s})||!c?o:(n.includeFallbackColors=!1,z.mostReadable(t,["#fff","#000"],n))};var Ye=z.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},Bn=z.hexNames=_n(Ye);function _n(t){var r={};for(var n in t)t.hasOwnProperty(n)&&(r[t[n]]=n);return r}function kt(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function D(t,r){En(t)&&(t="100%");var n=Mn(t);return t=Math.min(r,Math.max(0,parseFloat(t))),n&&(t=parseInt(t*r,10)/100),Math.abs(t-r)<1e-6?1:t%r/parseFloat(r)}function He(t){return Math.min(1,Math.max(0,t))}function X(t){return parseInt(t,16)}function En(t){return typeof t=="string"&&t.indexOf(".")!=-1&&parseFloat(t)===1}function Mn(t){return typeof t=="string"&&t.indexOf("%")!=-1}function K(t){return t.length==1?"0"+t:""+t}function Me(t){return t<=1&&(t=t*100+"%"),t}function wt(t){return Math.round(parseFloat(t)*255).toString(16)}function St(t){return X(t)/255}var J=function(){var t="[-\\+]?\\d+%?",r="[-\\+]?\\d*\\.\\d+%?",n="(?:"+r+")|(?:"+t+")",o="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",l="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+o),rgba:new RegExp("rgba"+l),hsl:new RegExp("hsl"+o),hsla:new RegExp("hsla"+l),hsv:new RegExp("hsv"+o),hsva:new RegExp("hsva"+l),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function re(t){return!!J.CSS_UNIT.exec(t)}function $n(t){t=t.replace(an,"").replace(sn,"").toLowerCase();var r=!1;if(Ye[t])t=Ye[t],r=!0;else if(t=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=J.rgb.exec(t))?{r:n[1],g:n[2],b:n[3]}:(n=J.rgba.exec(t))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=J.hsl.exec(t))?{h:n[1],s:n[2],l:n[3]}:(n=J.hsla.exec(t))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=J.hsv.exec(t))?{h:n[1],s:n[2],v:n[3]}:(n=J.hsva.exec(t))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=J.hex8.exec(t))?{r:X(n[1]),g:X(n[2]),b:X(n[3]),a:St(n[4]),format:r?"name":"hex8"}:(n=J.hex6.exec(t))?{r:X(n[1]),g:X(n[2]),b:X(n[3]),format:r?"name":"hex"}:(n=J.hex4.exec(t))?{r:X(n[1]+""+n[1]),g:X(n[2]+""+n[2]),b:X(n[3]+""+n[3]),a:St(n[4]+""+n[4]),format:r?"name":"hex8"}:(n=J.hex3.exec(t))?{r:X(n[1]+""+n[1]),g:X(n[2]+""+n[2]),b:X(n[3]+""+n[3]),format:r?"name":"hex"}:!1}function zn(t){var r,n;return t=t||{level:"AA",size:"small"},r=(t.level||"AA").toUpperCase(),n=(t.size||"small").toLowerCase(),r!=="AA"&&r!=="AAA"&&(r="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:r,size:n}}function O(t){return e.computed(()=>({style:Vn(t.rounded),class:"rounded-[--r-rounded]"}))}function Vn(t){const r=/^-?(?:\d+(?:\.\d+)?|\.\d+)(?:px|em|rem|vh|vw|in|cm|mm|pt|pc|%)?$/;switch(t){case"none":return"--r-rounded: 0";case"sm":return"--r-rounded: 0.125rem";case"md":return"--r-rounded: 0.25rem";case"lg":return"--r-rounded: 0.5rem";case"full":return"--r-rounded: 9999px";default:return typeof t=="string"&&r.test(t)?`--r-rounded: ${t};`:typeof t=="number"||!Number.isNaN(Number(t))?`--r-rounded: ${t}rem;`:"rounded-[--r-rounded]"}}const ye=e.shallowRef([]);function Ue(t){return e.computed({get:()=>{if(typeof t!="number"||t<=0)return ye.value;const r=ye.value.reduce((o,l)=>{const{position:a}=l;return o[a]||(o[a]=[]),o[a].push(l),o},{}),n=[];for(const o in r)n.push(...r[o].slice(-t));return ye.value.filter(o=>n.includes(o))},set:r=>{ye.value=r}})}class An{static show(r){r.hash=Math.random().toString(36),r.initialDurationMS=r.durationMS,ye.value=[r,...ye.value]}}const Ge=Symbol("tabCurrent"),qe=Symbol("direction"),Tn=Symbol("tabValueList"),Ke=Symbol("childrenElementMapSymbol");function Hn(t){const r=z(t).toHsl().l;return Y.reduce((n,o)=>Math.abs(o-r)<Math.abs(n-r)?o:n)}function xt(t,r=Y){const n=Z(t,r);return{...n,colors:n.colors.map(o=>o.toHexString())}}function Z(t,r=Y){const n=z(t),o=Hn(n),l=r.findIndex(c=>c===o),a=r.map(c=>{const i=z({h:n.toHsl().h,s:n.toHsl().s,l:c}),s=0;return n.toHsl().h>=20&&n.toHsl().h<=200&&i.darken(2),i.saturate(s*100),i});return{baseColorIndex:l,colors:a.map(c=>c)}}function be(t,r=Y){return xt(t,r).colors}function Nn(t,r){let n,o,l;const a=e.ref(!0),c=()=>{a.value=!0,l()};e.watch(t,c,{flush:"sync"});const i=typeof r=="function"?r:r.get,s=typeof r=="function"?void 0:r.set,d=e.customRef((f,u)=>(o=f,l=u,{get(){return a.value&&(n=i(n),a.value=!1),o(),n},set(m){s==null||s(m)}}));return Object.isExtensible(d)&&(d.trigger=c),d}function ke(t){return e.getCurrentScope()?(e.onScopeDispose(t),!0):!1}function vt(){const t=new Set,r=l=>{t.delete(l)};return{on:l=>{t.add(l);const a=()=>r(l);return ke(a),{off:a}},off:r,trigger:(...l)=>Promise.all(Array.from(t).map(a=>a(...l)))}}function P(t){return typeof t=="function"?t():e.unref(t)}const oe=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Rn=t=>t!=null,In=Object.prototype.toString,Dn=t=>In.call(t)==="[object Object]",Q=()=>{},Pn=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),Ln=On();function On(){var t,r;return oe&&((t=window==null?void 0:window.navigator)==null?void 0:t.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((r=window==null?void 0:window.navigator)==null?void 0:r.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function Je(t,r){function n(...o){return new Promise((l,a)=>{Promise.resolve(t(()=>r.apply(this,o),{fn:r,thisArg:this,args:o})).then(l).catch(a)})}return n}const Ct=t=>t();function Fn(t,r={}){let n,o,l=Q;const a=i=>{clearTimeout(i),l(),l=Q};return i=>{const s=P(t),d=P(r.maxWait);return n&&a(n),s<=0||d!==void 0&&d<=0?(o&&(a(o),o=null),Promise.resolve(i())):new Promise((f,u)=>{l=r.rejectOnCancel?u:f,d&&!o&&(o=setTimeout(()=>{n&&a(n),o=null,f(i())},d)),n=setTimeout(()=>{o&&a(o),o=null,f(i())},s)})}}function Wn(...t){let r=0,n,o=!0,l=Q,a,c,i,s,d;!e.isRef(t[0])&&typeof t[0]=="object"?{delay:c,trailing:i=!0,leading:s=!0,rejectOnCancel:d=!1}=t[0]:[c,i=!0,s=!0,d=!1]=t;const f=()=>{n&&(clearTimeout(n),n=void 0,l(),l=Q)};return m=>{const g=P(c),C=Date.now()-r,p=()=>a=m();return f(),g<=0?(r=Date.now(),p()):(C>g&&(s||!o)?(r=Date.now(),p()):i&&(a=new Promise((b,v)=>{l=d?v:b,n=setTimeout(()=>{r=Date.now(),o=!0,b(p()),f()},Math.max(0,g-C))})),!s&&!n&&(n=setTimeout(()=>o=!0,g)),o=!1,a)}}function jn(t=Ct){const r=e.ref(!0);function n(){r.value=!1}function o(){r.value=!0}const l=(...a)=>{r.value&&t(...a)};return{isActive:e.readonly(r),pause:n,resume:o,eventFilter:l}}function Xn(t){return e.getCurrentInstance()}function Bt(t,r=200,n={}){return Je(Fn(r,n),t)}function Yn(t,r=200,n={}){const o=e.ref(t.value),l=Bt(()=>{o.value=t.value},r,n);return e.watch(t,()=>l()),o}function Un(t,r=200,n=!1,o=!0,l=!1){return Je(Wn(r,n,o,l),t)}function Gn(t,r,n={}){const{eventFilter:o=Ct,...l}=n;return e.watch(t,Je(o,r),l)}function qn(t,r,n={}){const{eventFilter:o,...l}=n,{eventFilter:a,pause:c,resume:i,isActive:s}=jn(o);return{stop:Gn(t,r,{...l,eventFilter:a}),pause:c,resume:i,isActive:s}}function we(t,r=!0,n){Xn()?e.onMounted(t,n):r?t():e.nextTick(t)}function Kn(t=!1,r={}){const{truthyValue:n=!0,falsyValue:o=!1}=r,l=e.isRef(t),a=e.ref(t);function c(i){if(arguments.length)return a.value=i,a.value;{const s=P(n);return a.value=a.value===s?P(o):s,a.value}}return l?c:[a,c]}const W=oe?window:void 0,Jn=oe?window.document:void 0;function j(t){var r;const n=P(t);return(r=n==null?void 0:n.$el)!=null?r:n}function H(...t){let r,n,o,l;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,o,l]=t,r=W):[r,n,o,l]=t,!r)return Q;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const a=[],c=()=>{a.forEach(f=>f()),a.length=0},i=(f,u,m,g)=>(f.addEventListener(u,m,g),()=>f.removeEventListener(u,m,g)),s=e.watch(()=>[j(r),P(l)],([f,u])=>{if(c(),!f)return;const m=Dn(u)?{...u}:u;a.push(...n.flatMap(g=>o.map(C=>i(f,g,C,m))))},{immediate:!0,flush:"post"}),d=()=>{s(),c()};return ke(d),d}let _t=!1;function Ze(t,r,n={}){const{window:o=W,ignore:l=[],capture:a=!0,detectIframe:c=!1}=n;if(!o)return Q;Ln&&!_t&&(_t=!0,Array.from(o.document.body.children).forEach(p=>p.addEventListener("click",Q)),o.document.documentElement.addEventListener("click",Q));let i=!0;const s=p=>P(l).some(b=>{if(typeof b=="string")return Array.from(o.document.querySelectorAll(b)).some(v=>v===p.target||p.composedPath().includes(v));{const v=j(b);return v&&(p.target===v||p.composedPath().includes(v))}});function d(p){const b=P(p);return b&&b.$.subTree.shapeFlag===16}function f(p,b){const v=P(p),h=v.$.subTree&&v.$.subTree.children;return h==null||!Array.isArray(h)?!1:h.some(k=>k.el===b.target||b.composedPath().includes(k.el))}const u=p=>{const b=j(t);if(p.target!=null&&!(!(b instanceof Element)&&d(t)&&f(t,p))&&!(!b||b===p.target||p.composedPath().includes(b))){if(p.detail===0&&(i=!s(p)),!i){i=!0;return}r(p)}};let m=!1;const g=[H(o,"click",p=>{m||(m=!0,setTimeout(()=>{m=!1},0),u(p))},{passive:!0,capture:a}),H(o,"pointerdown",p=>{const b=j(t);i=!s(p)&&!!(b&&!p.composedPath().includes(b))},{passive:!0}),c&&H(o,"blur",p=>{setTimeout(()=>{var b;const v=j(t);((b=o.document.activeElement)==null?void 0:b.tagName)==="IFRAME"&&!(v!=null&&v.contains(o.document.activeElement))&&r(p)},0)})].filter(Boolean);return()=>g.forEach(p=>p())}function Zn(t){return typeof t=="function"?t:typeof t=="string"?r=>r.key===t:Array.isArray(t)?r=>t.includes(r.key):()=>!0}function G(...t){let r,n,o={};t.length===3?(r=t[0],n=t[1],o=t[2]):t.length===2?typeof t[1]=="object"?(r=!0,n=t[0],o=t[1]):(r=t[0],n=t[1]):(r=!0,n=t[0]);const{target:l=W,eventName:a="keydown",passive:c=!1,dedupe:i=!1}=o,s=Zn(r);return H(l,a,f=>{f.repeat&&P(i)||s(f)&&n(f)},c)}function Qn(){const t=e.ref(!1),r=e.getCurrentInstance();return r&&e.onMounted(()=>{t.value=!0},r),t}function Qe(t){const r=Qn();return e.computed(()=>(r.value,!!t()))}function et(t,r,n={}){const{window:o=W,...l}=n;let a;const c=Qe(()=>o&&"MutationObserver"in o),i=()=>{a&&(a.disconnect(),a=void 0)},s=e.computed(()=>{const m=P(t),g=(Array.isArray(m)?m:[m]).map(j).filter(Rn);return new Set(g)}),d=e.watch(()=>s.value,m=>{i(),c.value&&m.size&&(a=new MutationObserver(r),m.forEach(g=>a.observe(g,l)))},{immediate:!0,flush:"post"}),f=()=>a==null?void 0:a.takeRecords(),u=()=>{d(),i()};return ke(u),{isSupported:c,stop:u,takeRecords:f}}function er(t,r={}){const{immediate:n=!0,fpsLimit:o=void 0,window:l=W}=r,a=e.ref(!1),c=o?1e3/o:null;let i=0,s=null;function d(m){if(!a.value||!l)return;i||(i=m);const g=m-i;if(c&&g<c){s=l.requestAnimationFrame(d);return}i=m,t({delta:g,timestamp:m}),s=l.requestAnimationFrame(d)}function f(){!a.value&&l&&(a.value=!0,i=0,s=l.requestAnimationFrame(d))}function u(){a.value=!1,s!=null&&l&&(l.cancelAnimationFrame(s),s=null)}return n&&f(),ke(u),{isActive:e.readonly(a),pause:u,resume:f}}function tr(t,r={}){const{window:n=W}=r,o=Qe(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function");let l;const a=e.ref(!1),c=d=>{a.value=d.matches},i=()=>{l&&("removeEventListener"in l?l.removeEventListener("change",c):l.removeListener(c))},s=e.watchEffect(()=>{o.value&&(i(),l=n.matchMedia(P(t)),"addEventListener"in l?l.addEventListener("change",c):l.addListener(c),a.value=l.matches)});return ke(()=>{s(),i(),l=void 0}),a}const Ne=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Re="__vueuse_ssr_handlers__",nr=rr();function rr(){return Re in Ne||(Ne[Re]=Ne[Re]||{}),Ne[Re]}function or(t,r){return nr[t]||r}function lr(t){return t==null?"any":t instanceof Set?"set":t instanceof Map?"map":t instanceof Date?"date":typeof t=="boolean"?"boolean":typeof t=="string"?"string":typeof t=="object"?"object":Number.isNaN(t)?"any":"number"}const ar={boolean:{read:t=>t==="true",write:t=>String(t)},object:{read:t=>JSON.parse(t),write:t=>JSON.stringify(t)},number:{read:t=>Number.parseFloat(t),write:t=>String(t)},any:{read:t=>t,write:t=>String(t)},string:{read:t=>t,write:t=>String(t)},map:{read:t=>new Map(JSON.parse(t)),write:t=>JSON.stringify(Array.from(t.entries()))},set:{read:t=>new Set(JSON.parse(t)),write:t=>JSON.stringify(Array.from(t))},date:{read:t=>new Date(t),write:t=>t.toISOString()}},Et="vueuse-storage";function sr(t,r,n,o={}){var l;const{flush:a="pre",deep:c=!0,listenToStorageChanges:i=!0,writeDefaults:s=!0,mergeDefaults:d=!1,shallow:f,window:u=W,eventFilter:m,onError:g=x=>{console.error(x)},initOnMounted:C}=o,p=(f?e.shallowRef:e.ref)(r);if(!n)try{n=or("getDefaultStorage",()=>{var x;return(x=W)==null?void 0:x.localStorage})()}catch(x){g(x)}if(!n)return p;const b=P(r),v=lr(b),h=(l=o.serializer)!=null?l:ar[v],{pause:k,resume:w}=qn(p,()=>_(p.value),{flush:a,deep:c,eventFilter:m});u&&i&&we(()=>{n instanceof Storage?H(u,"storage",S):H(u,Et,M),C&&S()}),C||S();function E(x,$){if(u){const A={key:t,oldValue:x,newValue:$,storageArea:n};u.dispatchEvent(n instanceof Storage?new StorageEvent("storage",A):new CustomEvent(Et,{detail:A}))}}function _(x){try{const $=n.getItem(t);if(x==null)E($,null),n.removeItem(t);else{const A=h.write(x);$!==A&&(n.setItem(t,A),E($,A))}}catch($){g($)}}function y(x){const $=x?x.newValue:n.getItem(t);if($==null)return s&&b!=null&&n.setItem(t,h.write(b)),b;if(!x&&d){const A=h.read($);return typeof d=="function"?d(A,b):v==="object"&&!Array.isArray(A)?{...b,...A}:A}else return typeof $!="string"?$:h.read($)}function S(x){if(!(x&&x.storageArea!==n)){if(x&&x.key==null){p.value=b;return}if(!(x&&x.key!==t)){k();try{(x==null?void 0:x.newValue)!==h.write(p.value)&&(p.value=y(x))}catch($){g($)}finally{x?e.nextTick(w):w()}}}}function M(x){S(x.detail)}return p}function ir(t){const r=e.getCurrentInstance(),n=Nn(()=>null,()=>r.proxy.$el);return e.onUpdated(n.trigger),e.onMounted(n.trigger),n}function cr(t,r={}){var n,o;const l=e.ref(!1),a=e.shallowRef(null);let c=0,i=!0;if(oe){const s=typeof r=="function"?{onDrop:r}:r,d=(n=s.multiple)!=null?n:!0,f=(o=s.preventDefaultForUnhandled)!=null?o:!1,u=p=>{var b,v;const h=Array.from((v=(b=p.dataTransfer)==null?void 0:b.files)!=null?v:[]);return h.length===0?null:d?h:[h[0]]},m=p=>{if(s.dataTypes){const b=e.unref(s.dataTypes);return typeof b=="function"?b(p):b?b.some(v=>p.includes(v)):!0}return!0},g=p=>{var b,v;const h=Array.from((v=(b=p.dataTransfer)==null?void 0:b.items)!=null?v:[]),k=h.map(_=>_.type),w=m(k),E=d||h.length<=1;return w&&E},C=(p,b)=>{var v,h,k,w;if(i=g(p),!i){f&&p.preventDefault(),p.dataTransfer&&(p.dataTransfer.dropEffect="none");return}p.preventDefault(),p.dataTransfer&&(p.dataTransfer.dropEffect="copy");const E=u(p);switch(b){case"enter":c+=1,l.value=!0,(v=s.onEnter)==null||v.call(s,null,p);break;case"over":(h=s.onOver)==null||h.call(s,null,p);break;case"leave":c-=1,c===0&&(l.value=!1),(k=s.onLeave)==null||k.call(s,null,p);break;case"drop":c=0,l.value=!1,i&&(a.value=E,(w=s.onDrop)==null||w.call(s,E,p));break}};H(t,"dragenter",p=>C(p,"enter")),H(t,"dragover",p=>C(p,"over")),H(t,"dragleave",p=>C(p,"leave")),H(t,"drop",p=>C(p,"drop"))}return{files:a,isOverDropZone:l}}function tt(t,r,n={}){const{window:o=W,...l}=n;let a;const c=Qe(()=>o&&"ResizeObserver"in o),i=()=>{a&&(a.disconnect(),a=void 0)},s=e.computed(()=>{const u=P(t);return Array.isArray(u)?u.map(m=>j(m)):[j(u)]}),d=e.watch(s,u=>{if(i(),c.value&&o){a=new ResizeObserver(r);for(const m of u)m&&a.observe(m,l)}},{immediate:!0,flush:"post"}),f=()=>{i(),d()};return ke(f),{isSupported:c,stop:f}}function le(t,r={}){const{reset:n=!0,windowResize:o=!0,windowScroll:l=!0,immediate:a=!0,updateTiming:c="sync"}=r,i=e.ref(0),s=e.ref(0),d=e.ref(0),f=e.ref(0),u=e.ref(0),m=e.ref(0),g=e.ref(0),C=e.ref(0);function p(){const v=j(t);if(!v){n&&(i.value=0,s.value=0,d.value=0,f.value=0,u.value=0,m.value=0,g.value=0,C.value=0);return}const h=v.getBoundingClientRect();i.value=h.height,s.value=h.bottom,d.value=h.left,f.value=h.right,u.value=h.top,m.value=h.width,g.value=h.x,C.value=h.y}function b(){c==="sync"?p():c==="next-frame"&&requestAnimationFrame(()=>p())}return tt(t,b),e.watch(()=>j(t),v=>!v&&b()),et(t,b,{attributeFilter:["style","class"]}),l&&H("scroll",b,{capture:!0,passive:!0}),o&&H("resize",b,{passive:!0}),we(()=>{a&&b()}),{height:i,bottom:s,left:d,right:f,top:u,width:m,x:g,y:C,update:b}}function te(t,r={}){const{delayEnter:n=0,delayLeave:o=0,window:l=W}=r,a=e.ref(!1);let c;const i=s=>{const d=s?n:o;c&&(clearTimeout(c),c=void 0),d?c=setTimeout(()=>a.value=s,d):a.value=s};return l&&(H(t,"mouseenter",()=>i(!0),{passive:!0}),H(t,"mouseleave",()=>i(!1),{passive:!0})),a}const ur={multiple:!0,accept:"*",reset:!1,directory:!1};function dr(t={}){const{document:r=Jn}=t,n=e.ref(null),{on:o,trigger:l}=vt(),{on:a,trigger:c}=vt();let i;r&&(i=r.createElement("input"),i.type="file",i.onchange=f=>{const u=f.target;n.value=u.files,l(n.value)},i.oncancel=()=>{c()});const s=()=>{n.value=null,i&&i.value&&(i.value="",l(null))},d=f=>{if(!i)return;const u={...ur,...t,...f};i.multiple=u.multiple,i.accept=u.accept,i.webkitdirectory=u.directory,Pn(u,"capture")&&(i.capture=u.capture),u.reset&&s(),i.click()};return{files:e.readonly(n),open:d,reset:s,onCancel:a,onChange:o}}const Mt=1;function fr(t,r={}){const{throttle:n=0,idle:o=200,onStop:l=Q,onScroll:a=Q,offset:c={left:0,right:0,top:0,bottom:0},eventListenerOptions:i={capture:!1,passive:!0},behavior:s="auto",window:d=W,onError:f=y=>{console.error(y)}}=r,u=e.ref(0),m=e.ref(0),g=e.computed({get(){return u.value},set(y){p(y,void 0)}}),C=e.computed({get(){return m.value},set(y){p(void 0,y)}});function p(y,S){var M,x,$,A;if(!d)return;const V=P(t);if(!V)return;($=V instanceof Document?d.document.body:V)==null||$.scrollTo({top:(M=P(S))!=null?M:C.value,left:(x=P(y))!=null?x:g.value,behavior:P(s)});const N=((A=V==null?void 0:V.document)==null?void 0:A.documentElement)||(V==null?void 0:V.documentElement)||V;g!=null&&(u.value=N.scrollLeft),C!=null&&(m.value=N.scrollTop)}const b=e.ref(!1),v=e.reactive({left:!0,right:!1,top:!0,bottom:!1}),h=e.reactive({left:!1,right:!1,top:!1,bottom:!1}),k=y=>{b.value&&(b.value=!1,h.left=!1,h.right=!1,h.top=!1,h.bottom=!1,l(y))},w=Bt(k,n+o),E=y=>{var S;if(!d)return;const M=((S=y==null?void 0:y.document)==null?void 0:S.documentElement)||(y==null?void 0:y.documentElement)||j(y),{display:x,flexDirection:$}=getComputedStyle(M),A=M.scrollLeft;h.left=A<u.value,h.right=A>u.value;const V=Math.abs(A)<=(c.left||0),N=Math.abs(A)+M.clientWidth>=M.scrollWidth-(c.right||0)-Mt;x==="flex"&&$==="row-reverse"?(v.left=N,v.right=V):(v.left=V,v.right=N),u.value=A;let R=M.scrollTop;y===d.document&&!R&&(R=d.document.body.scrollTop),h.top=R<m.value,h.bottom=R>m.value;const F=Math.abs(R)<=(c.top||0),T=Math.abs(R)+M.clientHeight>=M.scrollHeight-(c.bottom||0)-Mt;x==="flex"&&$==="column-reverse"?(v.top=T,v.bottom=F):(v.top=F,v.bottom=T),m.value=R},_=y=>{var S;if(!d)return;const M=(S=y.target.documentElement)!=null?S:y.target;E(M),b.value=!0,w(y),a(y)};return H(t,"scroll",n?Un(_,n,!0,!1):_,i),we(()=>{try{const y=P(t);if(!y)return;E(y)}catch(y){f(y)}}),H(t,"scrollend",k,i),{x:g,y:C,isScrolling:b,arrivedState:v,directions:h,measure(){const y=P(t);d&&y&&E(y)}}}function $t(t,r,n={}){const{window:o=W}=n;return sr(t,r,o==null?void 0:o.localStorage,n)}const mr={ctrl:"control",command:"meta",cmd:"meta",option:"alt",up:"arrowup",down:"arrowdown",left:"arrowleft",right:"arrowright"};function pr(t={}){const{reactive:r=!1,target:n=W,aliasMap:o=mr,passive:l=!0,onEventFired:a=Q}=t,c=e.reactive(new Set),i={toJSON(){return{}},current:c},s=r?e.reactive(i):i,d=new Set,f=new Set;function u(p,b){p in s&&(r?s[p]=b:s[p].value=b)}function m(){c.clear();for(const p of f)u(p,!1)}function g(p,b){var v,h;const k=(v=p.key)==null?void 0:v.toLowerCase(),E=[(h=p.code)==null?void 0:h.toLowerCase(),k].filter(Boolean);k&&(b?c.add(k):c.delete(k));for(const _ of E)f.add(_),u(_,b);k==="meta"&&!b?(d.forEach(_=>{c.delete(_),u(_,!1)}),d.clear()):typeof p.getModifierState=="function"&&p.getModifierState("Meta")&&b&&[...c,...E].forEach(_=>d.add(_))}H(n,"keydown",p=>(g(p,!0),a(p)),{passive:l}),H(n,"keyup",p=>(g(p,!1),a(p)),{passive:l}),H("blur",m,{passive:!0}),H("focus",m,{passive:!0});const C=new Proxy(s,{get(p,b,v){if(typeof b!="string")return Reflect.get(p,b,v);if(b=b.toLowerCase(),b in o&&(b=o[b]),!(b in s))if(/[+_-]/.test(b)){const k=b.split(/[+_-]/g).map(w=>w.trim());s[b]=e.computed(()=>k.every(w=>P(C[w])))}else s[b]=e.ref(!1);const h=Reflect.get(p,b,v);return r?P(h):h}});return C}const hr={page:t=>[t.pageX,t.pageY],client:t=>[t.clientX,t.clientY],screen:t=>[t.screenX,t.screenY],movement:t=>t instanceof Touch?null:[t.movementX,t.movementY]};function Ie(t={}){const{type:r="page",touch:n=!0,resetOnTouchEnds:o=!1,initialValue:l={x:0,y:0},window:a=W,target:c=a,scroll:i=!0,eventFilter:s}=t;let d=null,f=0,u=0;const m=e.ref(l.x),g=e.ref(l.y),C=e.ref(null),p=typeof r=="function"?r:hr[r],b=y=>{const S=p(y);d=y,S&&([m.value,g.value]=S,C.value="mouse"),a&&(f=a.scrollX,u=a.scrollY)},v=y=>{if(y.touches.length>0){const S=p(y.touches[0]);S&&([m.value,g.value]=S,C.value="touch")}},h=()=>{if(!d||!a)return;const y=p(d);d instanceof MouseEvent&&y&&(m.value=y[0]+a.scrollX-f,g.value=y[1]+a.scrollY-u)},k=()=>{m.value=l.x,g.value=l.y},w=s?y=>s(()=>b(y),{}):y=>b(y),E=s?y=>s(()=>v(y),{}):y=>v(y),_=s?()=>s(()=>h(),{}):()=>h();if(c){const y={passive:!0};H(c,["mousemove","dragover"],w,y),n&&r!=="movement"&&(H(c,["touchstart","touchmove"],E,y),o&&H(c,"touchend",k,y)),i&&r==="page"&&H(a,"scroll",_,{passive:!0})}return{x:m,y:g,sourceType:C}}function zt(t=ir()){const r=e.shallowRef(),n=()=>{const o=j(t);o&&(r.value=o.parentElement)};return we(n),e.watch(()=>P(t),n),r}function Vt(t){const r=e.ref(0),n=e.computed(()=>j(t)),o=()=>{n.value&&(r.value=n.value.scrollHeight)};return o(),we(o),tt(()=>n.value,o),et(()=>n.value,o,{childList:!0,subtree:!0,attributes:!0}),r}function At(t,r={}){const{initialWidth:n=Number.POSITIVE_INFINITY,listenOrientation:o=!0}=r,l=e.ref(n),a=e.computed(()=>j(t)),c=()=>{a.value&&(l.value=a.value.clientHeight)};if(c(),we(c),H("resize",c,{passive:!0}),tt(()=>a.value,c),et(()=>a.value,c,{childList:!0,subtree:!0,attributes:!0}),o){const i=tr("(orientation: portrait)");e.watch(i,()=>c())}return l}const Y=[.98,.8,.7,.6,.43,.4,.36,.3,.2,.1,.01],ce=[1,.99,.95,.9,.7,.5,.4,.16,.1,.075,.05];function gr(){if(!oe)return e.ref("dark");const t=e.ref(document.documentElement.dataset.scheme);return new MutationObserver(n=>{n.forEach(o=>{o.type==="attributes"&&o.attributeName==="data-scheme"&&(t.value=document.documentElement.dataset.scheme)})}).observe(document.documentElement,{attributes:!0,attributeFilter:["data-scheme"]}),t}function yr(){return e.inject("currentThemeScheme",null)}function Tt(){return e.inject("currentThemeData",e.ref(at))}function br(){return e.inject("currentThemeName",e.ref("default"))}function Ht(t,r,n={}){const o=Y,l=ce;return n.primary===void 0&&(n.primary=o),n.secondary===void 0&&(n.secondary=o),n.tertiary===void 0&&(n.tertiary=o),n.error===void 0&&(n.error=o),n.surface===void 0&&(n.surface=l),e.computed(()=>({name:t,colors:{primary:be(e.unref(r.primary),n.primary),secondary:be(e.unref(r.secondary),n.secondary),tertiary:be(e.unref(r.tertiary),n.tertiary),error:be(e.unref(r.error),n.error),surface:be(e.unref(r.surface),n.surface)}}))}function kr(t,r=Y){return e.computed(()=>{const n=e.unref(t);return typeof n=="string"?ae(n,r).value.map(o=>o.toHexString()):n})}function nt(t){const r=e.ref(t);return{...{...Object.keys(r.value.colors).map(a=>{const c=a,i=r.value.colors[c];return kr(i,c==="surface"?ce:Y).value.reduce((f,u,m)=>{const g=z(u).toRgb();return f[`--r-color-${c}-${m}`]=`${g.r} ${g.g} ${g.b}`,f},{})}).reduce((a,c)=>({...a,...c}),{})},...{backgroundColor:"var(--r-surface-background-base-color)",color:"var(--r-surface-text-color)","--un-default-border-color":"var(--r-surface-border-color)"}}}function De(t){const r=e.ref("");return e.onMounted(()=>{t.id?r.value=t.id:r.value=`switch-${Math.random().toString(36).slice(2)}-${Date.now().toString(36)}`}),r}const Nt=Symbol("scheme");function Rt(){const t=$t("scheme","light");return oe&&new MutationObserver(()=>{t.value!==document.documentElement.dataset.scheme&&(t.value=document.documentElement.dataset.scheme)}).observe(document.documentElement,{attributes:!0,attributeFilter:["data-scheme"]}),t}const rt=9,wr=8,Sr=7,$e=7,xr=7,Se=3,vr=6,ue=5,It=6,ze=3,Cr=4,ot=.25,Br=.3,Pe=1,_r=2,xe=6,Er=5,ve=4,Dt=5,lt=.08,Mr=.15,de=e.ref("#0067cc"),fe=e.ref("#5999A6"),me=e.ref("#F76C22"),pe=e.ref("#F95858"),ne=e.ref("#121212"),Pt=e.computed(()=>L({color:"surface",type:"border",index:{dark:$e,light:ze}}).value);function Lt(t){return Ae(t,"text",{dark:Se,light:xe})}const $r=e.computed(()=>Z(e.unref(de),Y).colors),zr=e.computed(()=>Z(e.unref(fe),Y).colors),Vr=e.computed(()=>Z(e.unref(me),Y).colors),Ar=e.computed(()=>Z(e.unref(pe),Y).colors),Tr=e.computed(()=>Z(e.unref(ne),ce).colors),at=Ht("default",{primary:de,secondary:fe,tertiary:me,error:pe,surface:ne});function Ce(t,r){return e.computed(()=>{switch(e.unref(t)){case"filled":return _e(r).value;case"light":return Wt(r).value;default:return Le().value}})}function Hr(t){return e.computed(()=>{const r=e.unref(t);switch(r){case"surface":return z(e.unref(ne));case"primary":return z(e.unref(de));case"secondary":return z(e.unref(fe));case"tertiary":return z(e.unref(me));case"error":return z(e.unref(pe));default:return z(r)}})}const st=new Map;function ae(t,r=Y){return e.computed(()=>{const o=Hr(t).value.toHexString();if(st.has(o))return st.get(o);function l(){const a=Z(o,r).colors;return st.set(o,a),a}return l()})}function Ot(){return e.computed(()=>Z(e.unref(ne),ce).colors)}function Le(){return e.computed(()=>{const t=L({color:"surface",type:"bg",index:{dark:rt,light:Pe}}),r=L({color:"surface",type:"border",index:{dark:$e,light:ze}}),n=Be(t,r);return n.value.class=[...n.value.class,"border"],n.value})}function it(){return e.computed(()=>{const t=L({color:"surface",type:"bg",index:{dark:7,light:2}}),r=L({color:"surface",type:"border",index:{dark:6,light:4}});return Be(t,r).value})}function Be(...t){return e.computed(()=>({style:t.reduce((r,n)=>({...r,...n.value.style}),{}),class:t.reduce((r,n)=>[...r,...n.value.class],[])}))}function Ft(t){return e.computed(()=>{const r=L({color:t,type:"bg",index:{dark:5,light:4}}),n=L({color:"surface",type:"border",index:{dark:rt,light:Pe}}),o=L({color:t,type:"text",index:0});return Be(r,n,o).value})}function _e(t){return e.computed(()=>{const r=L({color:t,type:"bg",index:{dark:ue,light:ve}}),n=L({color:t,type:"border",index:{dark:ue,light:ve}}),o=L({color:t,type:"text",index:0});return Be(r,n,o).value})}function Wt(t){return e.computed(()=>{const r=L({color:t,type:"bg",index:{dark:ue,light:ve},alpha:.15}),n=L({color:t,type:"text",index:{dark:Se,light:xe}}),o=L({color:t,type:"border",index:{dark:5,light:4},alpha:0});return Be(r,n,o).value})}function Ve(t,r,n,o,l=1){switch(r){case"outline":return{style:{"--d-outline":t[n].clone().setAlpha(l).toHex8String(),"--l-outline":t[o].clone().setAlpha(l).toHex8String()},class:["dark:focus-visible:outline-[--d-outline]","focus-visible:outline-[--l-outline]"]};case"bg":return{style:{"--d-bg":t[n].clone().setAlpha(l).toHex8String(),"--l-bg":t[o].clone().setAlpha(l).toHex8String()},class:["dark:bg-[--d-bg]","bg-[--l-bg]"]};case"border":return{style:{"--d-border":t[n].clone().setAlpha(l).toHex8String(),"--l-border":t[o].clone().setAlpha(l).toHex8String()},class:["dark:border-[--d-border]","border-[--l-border]"]};case"text":return{style:{"--d-text":t[n].clone().setAlpha(l).toHex8String(),"--l-text":t[o].clone().setAlpha(l).toHex8String()},class:["dark:text-[--d-text]","text-[--l-text]"]};case"placeholder":return{style:{"--d-placeholder":t[n].clone().setAlpha(l).toHex8String(),"--l-placeholder":t[o].clone().setAlpha(l).toHex8String()},class:["dark:placeholder-[--d-placeholder]","placeholder-[--l-placeholder]"]};case"hover:bg":return{style:{"--d-bg-h":t[n].clone().setAlpha(l).toHexString(),"--l-bg-h":t[o].clone().setAlpha(l).toHexString()},class:["dark:hover:bg-[--d-bg-h]","hover:bg-[--l-bg-h]"]};case"hover:border":return{style:{"--d-border-h":t[n].clone().setAlpha(l).toHexString(),"--l-border-h":t[o].clone().setAlpha(l).toHexString()},class:["dark:hover:border-[--d-border-h]","hover:border-[--l-border-h]"]};case"hover:text":return{style:{"--d-text-h":t[n].clone().setAlpha(l).toHexString(),"--l-text-h":t[o].clone().setAlpha(l).toHexString()},class:["dark:hover:text-[--d-text-h]","hover:text-[--l-text-h]"]}}}function L(t){return t.color==="surface"?Ee(t.type,t.index):Ae(t.color,t.type,t.index,t.alpha)}function Ae(t,r,n,o=1){return e.computed(()=>{const l=ae(t);return typeof n=="number"?Ve(e.unref(l),r,n,n,o):Ve(e.unref(l),r,n.dark,n.light,o)})}function Ee(t,r,n=1){return e.computed(()=>{const{colors:o}=Z(e.unref(ne),ce);return typeof r=="number"?Ve(o,t,r,r,n):Ve(o,t,r.dark,r.light,n)})}function Oe(t){return L({color:t,type:"outline",index:{dark:$e,light:ze}})}function Fe(t="default",r="primary"){return e.computed(()=>{const n=ae(r).value,o=Z(e.unref(ne),ce).colors;return{style:{default:()=>Nr(o),filled:()=>Rr(n),light:()=>Ir(n),outline:()=>Dr(n),transparent:()=>Pr(n),subtle:()=>Lr(n),contrast:()=>Or(n),white:()=>Fr(n)}[e.unref(t)](),class:"custom-colors"}})}function Nr(t){return{"--d-bg":t[wr].toHexString(),"--d-bg-h":t[Sr].toHexString(),"--d-border":t[xr].toHexString(),"--l-bg":t[Pe].toHexString(),"--l-bg-h":t[_r].toHexString(),"--l-border":t[Cr].toHexString()}}function Rr(t){return{"--d-border":"transparent","--d-bg":t[ue].toHexString(),"--d-bg-h":t[It].toHexString(),"--d-text":"white","--l-bg":t[ve].toHexString(),"--l-bg-h":t[Dt].toHexString(),"--l-text":"white","--l-text-h":"white","--l-border":"transparent"}}function Ir(t){return{"--d-border":"transparent","--d-bg":t[ue].clone().setAlpha(ot).toHex8String(),"--d-bg-h":t[ue].clone().setAlpha(Br).toHex8String(),"--d-text":t[Se].toHexString(),"--d-text-h":t[Se].toHexString(),"--l-bg":t[ve].clone().setAlpha(lt).toHex8String(),"--l-bg-h":t[ve].clone().setAlpha(Mr).toHex8String(),"--l-text":t[xe].toHexString(),"--l-text-h":t[xe].toHexString(),"--l-border":"transparent"}}function Dr(t){return{"--d-bg":"transparent","--d-bg-h":t[It].clone().setAlpha(ot).toHex8String(),"--d-text":t[Se].toHexString(),"--d-text-h":t[Se].toHexString(),"--d-border":t[$e].toHexString(),"--l-bg":"transparent","--l-bg-h":t[Dt].clone().setAlpha(lt).toHex8String(),"--l-text":t[xe].toHexString(),"--l-text-h":t[xe].toHexString(),"--l-border":t[ze].toHexString()}}function Pr(t){return{"--d-text":t[3].toHexString(),"--d-text-h":t[3].toHexString(),"--l-text":t[5].toHexString(),"--l-text-h":t[5].toHexString(),"--d-bg":"transparent","--l-bg":"transparent","--d-border":"transparent","--l-border":"transparent"}}function Lr(t){return{"--d-bg":"transparent","--d-bg-h":t[3].clone().setAlpha(ot).toHex8String(),"--d-text":t[2].toHexString(),"--d-text-h":t[2].toHexString(),"--d-border":"transparent","--l-bg":"transparent","--l-bg-h":t[3].clone().setAlpha(lt).toHex8String(),"--l-text":t[5].toHexString(),"--l-text-h":t[5].toHexString(),"--l-border":"transparent"}}function Or(t){return{"--d-text":t[2].toHexString(),"--d-text-h":"white","--d-bg":"transparent","--d-bg-h":t[5].toHexString(),"--d-border":"transparent","--l-text":t[5].toHexString(),"--l-text-h":"white","--l-bg":"transparent","--l-bg-h":t[5].toHexString(),"--l-border":"transparent"}}function Fr(t){return{"--d-bg":"white","--d-bg-h":"white","--d-text":t[4].toHexString(),"--d-text-h":t[4].toHexString(),"--d-border":"transparent","--l-bg":"white","--l-bg-h":"white","--l-text":t[5].toHexString(),"--l-text-h":t[5].toHexString(),"--l-border":"transparent"}}function ct(t,r="default"){return e.computed(()=>{const n=ae(t).value,o=Ot().value;switch(e.unref(r)){case"default":return{"--d-bg":o[rt].toHexString(),"--d-border-f":n[ue].toHexString(),"--d-border":o[$e].toHexString(),"--d-placeholder":o[vr].toHexString(),"--d-text":"white","--l-bg":o[Pe].toHexString(),"--l-border-f":n[3].toHexString(),"--l-border":o[ze].toHexString(),"--l-placeholder":o[Er].toHexString(),"--l-text":"black"};case"filled":return{"--d-bg":n[5].toHexString(),"--d-bg-h":n[6].toHexString(),"--d-border":"transparent","--l-bg":n[5].toHexString(),"--l-bg-h":n[6].toHexString(),"--l-border":"transparent"}}})}const Wr={key:2,class:"i-fluent-person-24-filled"},jt=e.defineComponent({__name:"Avatar",props:{is:{default:"img"},src:{},size:{default:"md"},name:{},variant:{default:"default"},color:{default:"default"},rounded:{default:"full"},skeleton:{type:Boolean}},setup(t){const r=t,n=O(r),o=e.computed(()=>r.name||""),l=e.computed(()=>{switch(r.size){case"xs":return"--size: 2rem; --font-size: 1rem;";case"sm":return"--size: 3rem; --font-size: 1.25rem;";case"md":return"--size: 4rem; --font-size: 2rem;";case"lg":return"--size: 6rem; --font-size: 3rem;";case"xl":return"--size: 8rem; --font-size: 4rem;";default:return typeof r.size=="number"&&!Number.isNaN(Number(r.size))?`--size: ${r.size}rem; --font-size: ${r.size/2}rem;`:"--size: 4rem;"}}),a=e.ref(!1),c=e.ref(null);function i(){a.value=!0}e.onMounted(()=>{var u;(u=c.value)!=null&&u.complete&&i()});function s(u){return u.split(" ").map(m=>m[0]).join("").toUpperCase().slice(0,2)}const d=e.computed(()=>r.color),f=Ce(r.variant,d);return(u,m)=>u.skeleton?(e.openBlock(),e.createElementBlock("div",{key:0,class:"inline-block min-h-[--size] min-w-[--size] animate-pulse rounded-full bg-surface-variant-1",style:e.normalizeStyle([e.unref(n).style,l.value])},null,4)):u.src?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.is),e.mergeProps({key:1,ref_key:"img",ref:c,alt:o.value,class:[[e.unref(n).class,e.unref(f).class,{hidden:!a.value}],"inline-block h-[var(--size)] w-[var(--size)] rounded-full object-cover"],style:[e.unref(n).style,e.unref(f).style,l.value],src:u.src},u.$attrs,{onLoad:i}),null,16,["alt","class","style","src"])):!a.value||!u.src?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:2,class:["inline-block h-[--size] w-[--size] flex items-center justify-center border-4 rounded-full object-cover font-size-[--font-size]",[e.unref(n).class,e.unref(f).class]],style:[e.unref(n).style,e.unref(f).style,l.value]},u.$attrs),[u.$slots.default?e.renderSlot(u.$slots,"default",{key:0}):o.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(s(o.value)),1)],64)):(e.openBlock(),e.createElementBlock("i",Wr))],16)):e.createCommentVNode("",!0)}}),We=e.defineComponent({__name:"Btn",props:{type:{default:"button"},size:{default:"md"},is:{default:"button"},icon:{type:Boolean,default:!1},pressEffect:{default:"translate"},variant:{},hoverVariant:{},color:{},rounded:{default:"md"},disabled:{type:Boolean,default:!1},skeleton:{type:Boolean},outlineColor:{}},setup(t){const r=t,n=O(r),o=e.computed(()=>{switch(r.size){case"sm":return{normalContent:"min-w-16 h-6 px-2 py-1 text-xs",iconContent:"h-6 w-6 p-1"};case"lg":return{normalContent:"min-w-24 h-10 px-4 py-2 text-base",iconContent:"h-10 w-10 p-3"};case"md":default:return{normalContent:"min-w-20 h-8 px-3 py-1 text-sm",iconContent:"h-8 w-8 p-2"}}}),l=e.ref(null),a=te(l),c=e.computed(()=>r.hoverVariant&&a.value?r.hoverVariant:r.variant??"default"),i=e.computed(()=>r.color??"primary"),s=Fe(c,i),d=e.computed(()=>r.outlineColor??i.value),f=Oe(d);return(u,m)=>u.skeleton?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle([e.unref(n).style]),class:e.normalizeClass([o.value.normalContent,"inline-block animate-pulse rounded-md bg-surface-variant-1"])},null,6)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.is),e.mergeProps({key:1,ref_key:"btn",ref:l,"data-size":u.size,type:u.type,class:["flex items-center justify-center gap-1 decoration-none outline-none",[e.unref(s).class,e.unref(n).class,e.unref(f).class,u.icon?o.value.iconContent:o.value.normalContent,{"opacity-60 pointer-events-none select-none":u.disabled,"active:translate-y-0.25":u.pressEffect==="translate"}]],style:[e.unref(s).style,e.unref(n).style,e.unref(f).style],disabled:u.disabled},u.$attrs),{default:e.withCtx(()=>[u.$slots.leftSection?e.renderSlot(u.$slots,"leftSection",{key:0}):e.createCommentVNode("",!0),e.renderSlot(u.$slots,"default"),u.$slots.rightSection?e.renderSlot(u.$slots,"rightSection",{key:1}):e.createCommentVNode("",!0)]),_:3},16,["data-size","type","style","class","disabled"]))}}),jr=e.defineComponent({__name:"BtnGroup",props:e.mergeModels({selections:{},default:{},color:{default:"primary"},unselectable:{type:Boolean,default:void 0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const r=t,n=e.computed(()=>r.unselectable===void 0?r.selections.length===1:r.unselectable);function o(f){return typeof f=="string"?f:f.label??f.value}function l(f){return typeof f=="string"?f:f.value}function a(f){return typeof f=="string"?void 0:f.icon}const c=e.useModel(t,"modelValue");function i(f){l(f)===c.value&&n.value?c.value=void 0:c.value=l(f)}const s=e.computed(()=>r.selections.length===1),d=e.computed(()=>s.value?null:"first-children:rounded-r-0 first-children:border-r-none last-children:rounded-l-0 last-children:border-l-none not-first-children:rounded-l-0 not-last-children:rounded-r-0");return(f,u)=>{const m=We;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["w-auto inline-flex container",[d.value]])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.selections,(g,C)=>(e.openBlock(),e.createBlock(m,{key:l(g),model:c.value,variant:l(g)===c.value?"filled":void 0,color:r.color,class:e.normalizeClass({"border-x-none":C!==0&&C!==r.selections.length-1}),onClick:p=>i(g)},{default:e.withCtx(()=>[a(g)?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(a(g))},null,2)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(o(g)),1)]),_:2},1032,["model","variant","color","class","onClick"]))),128))],2)}}}),Xr=(t,r)=>{const n=t.__vccOpts||t;for(const[o,l]of r)n[o]=l;return n},Yr={},Ur={class:"flex flex-col gap-4 container"};function Gr(t,r){return e.openBlock(),e.createElementBlock("div",Ur,[e.renderSlot(t.$slots,"default")])}const qr=Xr(Yr,[["render",Gr]]),Kr=e.defineComponent({__name:"ChatMessage",props:{avatar:{},position:{default:"left"},color:{default:"primary"},variant:{default:"default"},withBorder:{type:Boolean,default:!1}},setup(t){const r=t,n=e.computed(()=>r.variant),o=e.computed(()=>r.color),l=Ce(n,o);return(a,c)=>{const i=jt;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex items-start gap-2",[{"flex-row-reverse":a.position==="right","flex-row":a.position==="left"}]])},[a.$slots.avatar?e.renderSlot(a.$slots,"avatar",{key:0}):a.avatar?(e.openBlock(),e.createBlock(i,{key:1,size:"xs",src:a.avatar},null,8,["src"])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["flex flex-col gap-1 rounded-xl p-2",[{"rounded-tr":a.position==="right","rounded-tl":a.position==="left",border:a.withBorder},e.unref(l).class]]),style:e.normalizeStyle([e.unref(l).style])},[e.renderSlot(a.$slots,"default")],6)],2)}}}),Jr={class:"w-full flex self-center gap-2 text-center"},Zr=e.defineComponent({__name:"ChatSystem",props:{position:{},color:{default:"default"},variant:{default:"default"},withBorder:{type:Boolean,default:!1}},setup(t){const r=t,n=e.computed(()=>r.variant),o=e.computed(()=>r.color),l=Ce(n,o);return(a,c)=>(e.openBlock(),e.createElementBlock("div",Jr,[e.createElementVNode("div",{class:e.normalizeClass(["w-full rounded-xl px-3 py-2",[e.unref(l).class]]),style:e.normalizeStyle(e.unref(l).style)},[e.renderSlot(a.$slots,"default")],6)]))}}),Qr=e.defineComponent({__name:"Chip",props:{is:{default:"img"},src:{},size:{default:"md"},color:{default:"primary"},variant:{default:"default"},rounded:{default:"full"}},setup(t){const r=t,n=O(r),o=e.computed(()=>{switch(r.size){case"sm":return"px-3 py-0.5 text-xs";case"md":return"px-4 py-0.5 text-sm";case"lg":return"px-5 py-0.5 text-base";default:return""}}),l=e.computed(()=>r.variant),a=e.computed(()=>r.color),c=Ce(l,a);return(i,s)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["inline-block h-fit inline-flex items-center gap-1",[e.unref(n).class,e.unref(c).class,o.value]]),style:e.normalizeStyle([e.unref(n).style,e.unref(c).style])},[i.$slots.leftSection?e.renderSlot(i.$slots,"leftSection",{key:0}):e.createCommentVNode("",!0),e.renderSlot(i.$slots,"default"),i.$slots.rightSection?e.renderSlot(i.$slots,"rightSection",{key:1}):e.createCommentVNode("",!0)],6))}}),Xt=e.defineComponent({__name:"ColorSwatch",props:{color:{},is:{default:"div"},withBorder:{type:Boolean,default:!1}},setup(t){return(r,n)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.is),e.mergeProps({class:["h-6 w-6 border rounded-full",[{border:r.withBorder}]]},e.unref(Pt),{style:{backgroundColor:r.color}}),null,16,["class","style"]))}}),eo=["id","alt"],to=["for"],no={key:0},ro=e.defineComponent({__name:"ColorInput",props:e.mergeModels({label:{},withBorder:{type:Boolean,default:!1}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const r=e.useModel(t,"modelValue"),n=e.useAttrs(),o=De(n),l=e.ref(null);return(a,c)=>{const i=Xt;return e.openBlock(),e.createElementBlock("div",null,[e.withDirectives(e.createElementVNode("input",{id:e.unref(o),ref_key:"input",ref:l,"onUpdate:modelValue":c[0]||(c[0]=s=>r.value=s),alt:r.value,type:"color",class:"pointer-events-none absolute opacity-0"},null,8,eo),[[e.vModelText,r.value]]),e.createElementVNode("label",{class:"flex items-center gap-2",for:e.unref(o)},[e.createVNode(i,{"with-border":a.withBorder,class:"cursor-pointer",color:r.value??"#222"},null,8,["with-border","color"]),a.label?(e.openBlock(),e.createElementBlock("span",no,e.toDisplayString(a.label),1)):e.createCommentVNode("",!0)],8,to)])}}}),Yt=Symbol("rokuProvider");function oo(){return e.inject(Yt,e.ref(null))}function lo(t){return e.provide(Yt,t)}const je=e.defineComponent({__name:"FullscreenOverlay",props:e.mergeModels({persistent:{type:Boolean,default:!1},blur:{type:[String,Boolean],default:!1},wrapperClass:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const r=t,n=e.useModel(t,"modelValue"),o=e.ref(null);function l(s){r.persistent||s.target===o.value&&(n.value=!1)}const a=e.computed(()=>{switch(r.blur){case"sm":return"backdrop-blur-sm";case"md":case!0:return"backdrop-blur-md";case"lg":return"backdrop-blur-lg";default:return""}}),c=e.ref(0);e.watchEffect(()=>{n.value?(document.body.style.overflow="hidden",document.body.style.marginRight=`${c.value}px`):setTimeout(()=>{document&&(document.querySelector(".modal-wrapper.op100")||(document.body.style.overflow="",document.body.style.marginRight=""))},300)}),e.watchEffect(()=>{typeof window<"u"&&new ResizeObserver(()=>{const d=window.innerWidth-document.body.clientWidth;d!==0&&(c.value=d)}).observe(document.body)});const i=oo();return(s,d)=>(e.openBlock(),e.createBlock(e.Teleport,{to:e.unref(i)??"body"},[e.createElementVNode("div",{ref_key:"wrapperRef",ref:o,class:e.normalizeClass(["fixed left-0 top-0 z-100 h-full w-full bg-surface-10/50 p-2 transition-all duration-100",[a.value,s.wrapperClass,{"op-0 pointer-events-none":!n.value,"op-100":n.value}]]),onClick:l},[e.renderSlot(s.$slots,"default")],2)],8,["to"]))}}),ao={class:"flex justify-end p-4 md:px-6 md:py-4 md:pb-0"},so={class:"h-full flex flex-col items-center justify-center px-4 md:px-6"},io=e.defineComponent({__name:"Drawer",props:e.mergeModels({persistent:{type:Boolean,default:!1},blur:{type:[String,Boolean],default:!1},position:{default:"left"}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const r=t,n=e.useModel(t,"modelValue");return(o,l)=>{const a=We,c=je;return e.openBlock(),e.createBlock(c,{modelValue:n.value,"onUpdate:modelValue":l[1]||(l[1]=i=>n.value=i),blur:r.blur,persistent:r.persistent},{default:e.withCtx(()=>[e.createVNode(e.Transition,{"enter-from-class":o.position==="left"?"-translate-x-1/1":"translate-x-1/1","enter-to-class":(o.position==="left","translate-x-0"),"leave-from-class":(o.position==="left","translate-x-0"),"leave-to-class":o.position==="left"?"-translate-x-1/1":"translate-x-1/1","enter-active-class":"transition ease-out duration-300","leave-active-class":"transition ease-in duration-200"},{default:e.withCtx(()=>[n.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["bg-surface-low fixed h-full w-full md:w-md",o.position==="left"?"left-0":"right-0"])},[e.createElementVNode("div",ao,[e.createVNode(a,{icon:"",variant:"transparent",class:"text-surface-on hover:text-surface-on",onPointerup:l[0]||(l[0]=i=>n.value=!1)},{default:e.withCtx(()=>l[2]||(l[2]=[e.createElementVNode("i",{class:"i-fluent-dismiss-12-filled"},null,-1)])),_:1})]),e.createElementVNode("div",so,[e.renderSlot(o.$slots,"default")])],2)):e.createCommentVNode("",!0)]),_:3},8,["enter-from-class","enter-to-class","leave-from-class","leave-to-class"])]),_:3},8,["modelValue","blur","persistent"])}}}),co=e.defineComponent({__name:"Dropzone",props:{dashed:{type:Boolean,default:!0},accept:{default:"*"}},emits:["drop"],setup(t,{emit:r}){const n=t,o=r,l=e.ref(),{onChange:a,open:c}=dr({accept:n.accept});a(f=>{f?o("drop",Array.from(f)):o("drop",null)});const{isOverDropZone:i}=cr(l,{onDrop:f=>{o("drop",f)}}),s=Fe("default"),d=it();return(f,u)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"dropZoneRef",ref:l,class:e.normalizeClass([[e.unref(s).class,e.unref(i)&&e.unref(d).class,{"bg-surface-low":!e.unref(i),"border-dashed":f.dashed}],"h-full w-full flex cursor-pointer items-center justify-center border rounded"]),style:e.normalizeStyle([e.unref(s).style,e.unref(i)&&e.unref(d).style]),onPointerup:u[0]||(u[0]=()=>e.unref(c)())},[e.renderSlot(f.$slots,"default")],38))}}),uo=e.defineComponent({__name:"Image",props:{is:{default:"img"},src:{},style:{},class:{},width:{},maxWidth:{},height:{},maxHeight:{},rounded:{default:"none"}},setup(t){const r=t,n=e.ref(!1),o=e.ref(null);function l(){n.value=!0}e.onMounted(()=>{var c;(c=o.value)!=null&&c.complete&&l()});const a=O(r);return(c,i)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({height:c.height,width:c.width,maxHeight:c.maxHeight,maxWidth:c.maxWidth})},[c.src?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.is),e.mergeProps({key:0,ref_key:"img",ref:o,style:[c.style,e.unref(a).style],src:c.src,class:["h-full w-full object-cover",[r.class,e.unref(a).class,{hidden:!n.value}]]},c.$attrs,{onLoad:l}),null,16,["style","src","class"])):e.createCommentVNode("",!0),n.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["h-full w-full animate-pulse border-transparent object-cover",[r.class,e.unref(a).class]]),style:e.normalizeStyle([c.style,e.unref(a).style])},null,6))],4))}}),fo={class:"relative"},mo=e.defineComponent({__name:"Indicator",props:{color:{default:"primary"},size:{default:"md"},position:{default:"top-right"},ping:{type:Boolean}},setup(t){const r=t,n=e.computed(()=>{switch(r.size){case"sm":return"w-2 h-2";case"md":return"w-3 h-3";case"lg":return"w-4 h-4";default:return typeof r.size=="number"||!Number.isNaN(Number(r.size))?`w-${r.size} h-${r.size}`:r.size}}),o=e.useSlots(),l=e.computed(()=>{if(!o.label)return"";switch(r.size){case"sm":return"text-sm children:px-1.5";case"lg":return"text-lg children:px-2.5";case"md":default:return"text-md children:px-2"}}),a=e.computed(()=>{switch(r.position){case"bottom-left":return"bottom-0 left-0 -translate-x-1/2 translate-y-1/2";case"bottom-right":return"bottom-0 right-0 translate-x-1/2 translate-y-1/2";case"top-left":return"top-0 left-0 -translate-x-1/2 -translate-y-1/2";case"top-right":default:return"top-0 right-0 translate-x-1/2 -translate-y-1/2"}}),c=e.computed(()=>r.color),i=Ft(c);return(s,d)=>(e.openBlock(),e.createElementBlock("div",fo,[e.createElementVNode("div",{class:e.normalizeClass([[a.value,l.value],"absolute z-1"])},[r.ping?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["absolute box-content animate-ping border-2 border-transparent rounded-full",[{[n.value]:!s.$slots.label},e.unref(i).class]]),style:e.normalizeStyle([e.unref(i).style])},[s.$slots.label?e.renderSlot(s.$slots,"label",{key:0}):e.createCommentVNode("",!0)],6)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["border-surface-low top-0 box-content border-2 rounded-full",[{[n.value]:!s.$slots.label},e.unref(i).class]]),style:e.normalizeStyle(e.unref(i).style)},[s.$slots.label?e.renderSlot(s.$slots,"label",{key:0}):e.createCommentVNode("",!0)],6)],2),e.renderSlot(s.$slots,"default")]))}});function ut(t){return(t==null?void 0:t.role)==="divider"}function dt(t){return(t==null?void 0:t.role)==="label"}function se(t){return!ut(t)&&!dt(t)}function Ut(t){return t===void 0?!1:t.some(r=>se(r)?r.icon!==void 0:!1)}const po={key:0,class:"px-2 py-1 text-xs text-surface-dimmed"},ho={key:1,class:"my-2 border-t border-surface"},go={key:1,class:"w-5 flex-shrink-0"},yo={class:"flex-grow text-truncate text-left"},bo={key:2,class:"i-tabler-chevron-right flex-shrink-0"},Gt=e.defineComponent({__name:"MenuItem",props:{data:{},idx:{},hasIcon:{type:Boolean},rounded:{default:"md"},color:{default:"primary"}},setup(t){const r=t,n=e.ref(null),o=te(n,{delayLeave:100}),l=O({rounded:r.rounded}),a=e.inject("menuCurrentIdx",e.ref([])),c=e.computed(()=>a.value.join()===r.idx.join());e.watchEffect(()=>{var g;c.value&&((g=n.value)==null||g.focus())});const i=e.computed(()=>a.value.length>r.idx.length&&a.value.slice(0,r.idx.length).join()===r.idx.join()),s=e.computed(()=>r.color),d=Oe(s),f=e.inject("selectMenuItem",()=>{console.error("selectMenuItem is not provided")}),u=e.ref(null),m=e.computed(()=>{var E,_,y,S;const g=window.innerWidth,C=((E=u.value)==null?void 0:E.clientWidth)??0,p=((_=u.value)==null?void 0:_.getBoundingClientRect().left)??0,b=g-p>C,v=window.innerHeight,h=((y=u.value)==null?void 0:y.clientHeight)??0,k=((S=u.value)==null?void 0:S.getBoundingClientRect().top)??0,w=v-k>h;return{left:b?"100%":"auto",right:b?"auto":"100%",top:w?"0":"auto",bottom:w?"auto":"0"}});return(g,C)=>{const p=e.resolveComponent("MenuItem",!0);return e.unref(dt)(g.data)?(e.openBlock(),e.createElementBlock("div",po,e.toDisplayString(g.data.title),1)):e.unref(ut)(g.data)?(e.openBlock(),e.createElementBlock("div",ho)):(e.openBlock(),e.createElementBlock("button",e.mergeProps({key:2,ref_key:"menuItemRef",ref:n,tabindex:-1,class:["relative inline-block h-8 w-full flex cursor-pointer items-center gap-2 hover:bg-surface-variant-2 px-2 outline-2 focus-visible:outline",[e.unref(l).class,{"z-1":c.value,"bg-surface-variant-2":i.value}]]},e.unref(d),{style:[e.unref(l).style],onPointerdown:C[0]||(C[0]=()=>{const b=g.data;b.value&&e.unref(f)(b.value)})}),[g.data.icon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass([g.data.icon,"w-5 flex-shrink-0"])},null,2)):r.hasIcon?(e.openBlock(),e.createElementBlock("i",go)):e.createCommentVNode("",!0),e.createElementVNode("div",yo,e.toDisplayString(g.data.title),1),g.data.children?(e.openBlock(),e.createElementBlock("i",bo)):e.createCommentVNode("",!0),g.data.children&&(e.unref(o)||i.value)?(e.openBlock(),e.createElementBlock("menu",{key:3,ref_key:"menuDropdownRef",ref:u,class:e.normalizeClass(["absolute left-100% top-0 ml-1 w-64 border border bg-surface bg-surface p-2",e.unref(l).class]),style:e.normalizeStyle([e.unref(l).style,m.value])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.data.children,(b,v)=>(e.openBlock(),e.createBlock(p,{key:v,"has-icon":e.unref(Ut)(g.data.children),data:b,idx:[...g.idx,v]},null,8,["has-icon","data","idx"]))),128))],6)):e.createCommentVNode("",!0)],16))}}}),ko={key:0,class:"text-surface-variant-3 px-2 py-1 text-xs text-surface-dimmed"},wo={key:1,class:"my-2 border-t border-surface"},So=e.defineComponent({__name:"Menu",props:e.mergeModels({rounded:{default:"md"},enterActiveClass:{default:"animate-keyframes-zoom-in animate-duration-0.1s"},leaveActiveClass:{default:"animate-keyframes-zoom-out animate-duration-0.1s"},data:{},trigger:{default:"click"},classes:{},color:{default:"primary"}},{modelValue:{type:Boolean,default:void 0},modelModifiers:{}}),emits:e.mergeModels(["select"],["update:modelValue"]),setup(t,{emit:r}){const n=t,o=r,l=e.useModel(t,"modelValue"),a=e.computed(()=>l.value),[c,i]=Kn(),s=e.computed(()=>a.value===void 0?c.value:a.value),d=O(n),f=e.ref(null),u=e.ref(null),m=e.ref(null);H(u,"pointerup",y=>{n.trigger!=="click"||y.button!==0||(y.stopPropagation(),y.preventDefault(),i())});const g=te(u,{delayLeave:100}),C=te(m,{delayLeave:100});e.watchEffect(()=>{n.trigger==="hover"&&(g.value||C.value?i(!0):i(!1))});const p=e.ref({x:0,y:0});H(u,"contextmenu",y=>{if(n.trigger!=="contextmenu")return;y.stopPropagation(),y.preventDefault(),i();const S=f.value,M=S==null?void 0:S.getBoundingClientRect();M&&(p.value={x:y.clientX-M.left,y:y.clientY-M.top})}),Ze(m,()=>{i(!1)},{capture:!0}),H(window,"contextmenu",()=>{i(!1)});const b=e.ref([-1]);e.watchEffect(()=>{s.value||(b.value=[-1])}),e.provide("menuCurrentIdx",b);function v(y,S){const M=y;if(S.length<=1)return M.length;const x=M[S[0]];if(!se(x)||x.children===void 0)return 0;const $=x.children;return v($,S.slice(1))}const h=e.computed(()=>n.data===void 0?0:v(n.data,b.value)),k=e.computed(()=>n.data);G("ArrowDown",y=>{var $;if(!s.value)return;y.preventDefault();const S=b.value;let x=(S[S.length-1]+1)%h.value;for(;!se(w(k.value,[...S.slice(0,S.length-1),x]))||($=w(k.value,[...S.slice(0,S.length-1),x]))!=null&&$.render;)x=(x+1)%h.value;b.value=[...S.slice(0,S.length-1),x]}),G("ArrowUp",y=>{var $;if(!s.value)return;y.preventDefault();const S=b.value,M=S[S.length-1];if(M===-1&&S.length===1){b.value=[h.value-1];return}let x=(M-1+h.value)%h.value;for(;!se(w(k.value,[...S.slice(0,S.length-1),x]))||($=w(k.value,[...S.slice(0,S.length-1),x]))!=null&&$.render;)x=(x-1+h.value)%h.value;b.value=[...S.slice(0,S.length-1),x]}),G("ArrowRight",y=>{if(s.value&&(y.preventDefault(),!!se(w(k.value,b.value))&&b.value[b.value.length-1]!==-1)){let S=k.value;for(let M=0;M<b.value.length;M++){if(S===void 0)return;const x=S[b.value[M]];if(!se(x)||x.children===void 0)return;S=x.children}S!==void 0&&(b.value=[...b.value,0])}}),G("ArrowLeft",y=>{s.value&&(y.preventDefault(),se(w(k.value,b.value))&&b.value.length>1&&(b.value=b.value.slice(0,b.value.length-1)))});function w(y,S){if(S.length===0)return;let M=y;for(let x=0;x<S.length-1;x++){if(M===void 0)return;const $=M[S[x]];if(!se($)||$.children===void 0)return;M=$.children}if(M!==void 0)return M[S[S.length-1]]}e.provide("selectMenuItem",y=>{o("select",y),i(!1)}),G("Enter",y=>{var M;if(!s.value)return;y.preventDefault();const S=(M=w(k.value,b.value))==null?void 0:M.value;S&&(o("select",S),i(!1))});const E=e.computed(()=>n.trigger==="contextmenu"?"":"absolute mt-2");H(window,"scroll",()=>{s.value&&i(!1)});const _=e.computed(()=>{var R,F,T,I;const y=window.innerWidth,S=((R=m.value)==null?void 0:R.clientWidth)??0,M=((F=m.value)==null?void 0:F.getBoundingClientRect().left)??0,x=y-M>S,$=window.innerHeight,A=((T=m.value)==null?void 0:T.clientHeight)??0,V=((I=m.value)==null?void 0:I.getBoundingClientRect().top)??0,N=$-V>A;return n.trigger==="contextmenu"?{left:`${x?p.value.x:p.value.x-S}px`,top:`${N?p.value.y:p.value.y-A}px`,position:"absolute"}:{}});return(y,S)=>{var x,$,A,V;const M=Gt;return e.openBlock(),e.createElementBlock("div",{ref_key:"menuWrapperRef",ref:f,class:e.normalizeClass([(x=n.classes)==null?void 0:x.wrapper,{relative:!(($=n.classes)!=null&&$.wrapper)}])},[e.createElementVNode("div",{ref_key:"menuTriggerRef",ref:u,class:e.normalizeClass([(A=n.classes)==null?void 0:A.trigger,{"w-inherit h-inherit":!((V=n.classes)!=null&&V.trigger)}])},[e.renderSlot(y.$slots,"default")],2),e.createVNode(e.Transition,{"enter-active-class":n.enterActiveClass,"leave-active-class":n.leaveActiveClass},{default:e.withCtx(()=>[s.value&&y.data?(e.openBlock(),e.createElementBlock("menu",{key:0,class:"relative z-1 flex justify-center",style:e.normalizeStyle(_.value)},[e.createElementVNode("div",{ref_key:"menuDropdownRef",ref:m,class:e.normalizeClass([[e.unref(d).class,E.value],"w-64 border bg-surface p-2"]),style:e.normalizeStyle([e.unref(d).style])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.data,(N,R)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:R},[e.unref(dt)(N)?(e.openBlock(),e.createElementBlock("div",ko,e.toDisplayString(N.title),1)):e.unref(ut)(N)?(e.openBlock(),e.createElementBlock("div",wo)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[N.render?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(N.render),{key:0})):(e.openBlock(),e.createBlock(M,e.mergeProps({key:1,ref_for:!0},{...n,data:N},{idx:[R],"has-icon":e.unref(Ut)(n.data)}),null,16,["idx","has-icon"]))],64))],64))),128))],6)],4)):e.createCommentVNode("",!0)]),_:1},8,["enter-active-class","leave-active-class"])],2)}}}),ft=e.defineComponent({__name:"Paper",props:{rounded:{default:"md"},loading:{type:Boolean,default:!1},is:{default:"div"},color:{default:"primary"},traceAnimate:{type:Boolean,default:!1},withBorder:{type:Boolean,default:!1},noPadding:{type:Boolean,default:!1}},setup(t){const r=t,n=e.computed(()=>r.color),o=e.computed(()=>r.loading),l=O(r),{x:a,y:c}=Ie({type:"client"}),i=e.ref(null),{width:s,height:d,top:f,left:u}=le(i),m=e.computed(()=>Math.min(s.value,d.value)),g=e.computed(()=>!s.value||!d.value?[]:o.value?[{backgroundPosition:"0% 0%",offset:0},{backgroundPosition:"0% 100%",offset:.25},{backgroundPosition:"100% 100%",offset:.5},{backgroundPosition:"100% 0%",offset:.75}]:[]);let C;const p=e.computed(()=>ae(n.value).value[5]),b=e.computed(()=>{var h;return r.loading?(C?C.play():C=(h=i.value)==null?void 0:h.animate(g.value,{duration:1e3,iterations:Number.POSITIVE_INFINITY}),{"--main-color":p.value,"--gradient":`radial-gradient(circle at center, var(--main-color) ${m.value*.5}px, var(--border-color) ${m.value*.5}px)`,"--border-color":"var(--r-surface-border-color)","--bg":"var(--r-surface-background-color)",background:"linear-gradient(var(--bg), var(--bg)) padding-box, var(--gradient) border-box","border-color":"transparent","background-color":"var(--bg)","background-size":"200% 200%"}):(C&&C.pause(),{background:"var(--r-surface-background-color)"})}),v=e.computed(()=>{if(r.traceAnimate){const h=e.computed(()=>({x:u.value+s.value/2,y:f.value+d.value/2})),k=e.computed(()=>{if(a.value<u.value||a.value>u.value+s.value||c.value<f.value||c.value>f.value+d.value)return{x:a.value,y:c.value};const w=h.value.x,E=h.value.y;let _,y;const S=(c.value-E)/(a.value-w);return a.value<w?(_=u.value,y=E+S*(u.value-w)):(_=u.value+s.value,y=E+S*(_-w)),y<f.value?(y=f.value,_=w+(y-E)/S):y>f.value+d.value&&(y=f.value+d.value,_=w+(y-E)/S),{x:_,y}});return{"--main-color":p.value,"--border-color":"var(--r-surface-border-color)","--bg":"var(--r-surface-background-color)","--gradient":`radial-gradient(circle at ${k.value.x-u.value}px ${k.value.y-f.value}px, var(--main-color) ${m.value*.5}px, var(--border-color) ${m.value*.5}px)`,background:"linear-gradient(var(--bg), var(--bg)) padding-box, var(--gradient) border-box","background-size":"200% 200%","background-color":"var(--bg)"}}else return{}});return(h,k)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(h.is),e.mergeProps({ref_key:"paperRef",ref:i,class:["relative border",[{"p-4":!h.noPadding},e.unref(l).class]],style:[e.unref(l).style,b.value,v.value]},h.withBorder&&!h.traceAnimate&&!o.value?{class:"border-[var(--r-surface-border-color)]"}:{class:"border-transparent"}),{default:e.withCtx(()=>[e.renderSlot(h.$slots,"default")]),_:3},16,["class","style"]))}}),xo={key:0,class:"text-lg"},vo={key:0},Co=e.defineComponent({__name:"Modal",props:e.mergeModels({persistent:{type:Boolean,default:!1},blur:{type:[String,Boolean],default:!1},title:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const r=t,n=e.useModel(t,"modelValue");return(o,l)=>{const a=ft,c=je;return e.openBlock(),e.createBlock(c,{modelValue:n.value,"onUpdate:modelValue":l[0]||(l[0]=i=>n.value=i),blur:r.blur,persistent:r.persistent,"wrapper-class":"flex justify-center items-end md:items-start md:pt-5%"},{default:e.withCtx(()=>[e.createVNode(e.Transition,{"enter-from-class":"translate-y-1/2","enter-to-class":"translate-y-0","leave-from-class":"translate-y-0","leave-to-class":"translate-y-1/2","enter-active-class":"transition ease-out duration-100","leave-active-class":"transition ease-in duration-100"},{default:e.withCtx(()=>[n.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[o.$slots.default?e.renderSlot(o.$slots,"default",{key:0}):(e.openBlock(),e.createBlock(a,{key:1,"with-border":"",class:"w-full flex flex flex-col gap-2 md:w-md"},{default:e.withCtx(()=>[o.title||o.$slots.title?(e.openBlock(),e.createElementBlock("div",xo,[o.title?(e.openBlock(),e.createElementBlock("div",vo,e.toDisplayString(o.title),1)):e.renderSlot(o.$slots,"title",{key:1})])):e.createCommentVNode("",!0),e.createElementVNode("div",null,[e.renderSlot(o.$slots,"body")]),e.renderSlot(o.$slots,"footer")]),_:3}))],64)):e.createCommentVNode("",!0)]),_:3})]),_:3},8,["modelValue","blur","persistent"])}}}),Bo=e.shallowRef([]);function _o(){return Bo}const Eo=e.defineComponent({__name:"ModalSystem",setup(t){const r=_o();e.watchEffect(()=>{console.log(r.value)});const n=e.computed(()=>r.value.length>0);return(o,l)=>{const a=je;return e.openBlock(),e.createBlock(a,{"model-value":n.value,persistent:!0,"wrapper-class":"flex justify-center items-end md:items-start md:pt-5%"},{default:e.withCtx(()=>[e.createElementVNode("div",null,e.toDisplayString(e.unref(r)),1)]),_:1},8,["model-value"])}}}),qt=e.defineComponent({__name:"Progress",props:{value:{default:0},max:{default:100},min:{default:0},size:{default:"md"},color:{default:"primary"},rounded:{default:"full"},loading:{type:Boolean,default:!1}},setup(t){const r=t,n=e.computed(()=>{switch(r.size){case"sm":return"h-0.25";case"md":return"h-0.5";case"lg":return"h-1";default:return"h-0.5"}}),o=e.computed(()=>r.color),l=_e(o),a=Ee("bg",{dark:7,light:3}),c=O(r);return(i,s)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({class:["relative w-full self-center overflow-hidden",[n.value,e.unref(c).class]],style:[e.unref(c).style]},e.unref(a)),[i.loading?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:1,class:"loading-progress h-full"},e.unref(l)),null,16)):(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:0,class:"h-full"},e.unref(l),{style:[{width:`${(Number(i.value)-Number(i.min))/(Number(i.max)-Number(i.min))*100}%`}]}),null,16))],16))}}),Mo={key:0,class:"h-container w-container i-tabler-loader-2 shrink-0 animate-spin"},$o={key:1},zo={class:"grow-1"},Vo={key:1,class:"i-fluent-dismiss-12-filled"},Kt=e.defineComponent({__name:"Notification",props:{title:{},message:{},icon:{},loading:{type:Boolean},withBorder:{type:Boolean},closeable:{type:Boolean},rounded:{default:"md"},block:{type:Boolean,default:!1},color:{default:"primary"},size:{default:"md"},complete:{},total:{default:100}},emits:["close"],setup(t){const r=t,n=O(r),o=e.computed(()=>r.color),l=_e(o),a=Lt(o),c=Le(),i=e.computed(()=>{switch(r.size){case"sm":return"min-h-10 p-1";case"lg":return"min-h-16 p-4";case"md":default:return"min-h-16 p-3"}});return(s,d)=>{const f=We,u=qt;return e.openBlock(),e.createElementBlock("div",e.mergeProps({class:["overflow-hidden",[{"border-0":!s.withBorder},e.unref(n).class,{"max-w-100":!s.block,"w-full":s.block}]],style:[e.unref(n).style]},e.unref(c)),[e.createElementVNode("div",{class:e.normalizeClass(["relative min-w-80 w-full flex items-center gap-2 pl-4",[i.value,e.unref(a).class]])},[s.icon?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([[e.unref(a).class],"leading-0"]),style:e.normalizeStyle(e.unref(a).style)},[s.loading?(e.openBlock(),e.createElementBlock("i",Mo)):(e.openBlock(),e.createElementBlock("i",{key:1,class:e.normalizeClass(["h-container w-container shrink-0",s.icon])},null,2))],6)):(e.openBlock(),e.createElementBlock("div",$o,[e.createElementVNode("div",e.mergeProps({class:["absolute left-[0.25rem] top-[0.25rem] h-[calc(100%-0.5rem)] w-1 rounded-full bg-[var(--d-bg)] dark:bg-[var(--d-bg)]",[{"animate-pulse":s.loading}]]},e.unref(l)),null,16)])),e.createElementVNode("div",zo,[s.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["text-[var(--l-text)] dark:text-[var(--d-text)]",[{"text-xs":s.size==="sm","text-sm":s.size==="md","text-base":s.size==="lg"},e.unref(a).class]]),style:e.normalizeStyle(e.unref(a).style)},e.toDisplayString(s.title),7)):e.createCommentVNode("",!0),s.$slots.message?e.renderSlot(s.$slots,"message",{key:1}):s.message?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["text-surface-dimmed",{"text-xs":s.size==="sm","text-sm":s.size==="md"||s.size==="lg"}])},e.toDisplayString(s.message),3)):e.createCommentVNode("",!0)]),s.closeable?(e.openBlock(),e.createBlock(f,{key:2,icon:"",variant:"transparent",color:"white",onClick:d[0]||(d[0]=m=>s.$emit("close"))},{default:e.withCtx(()=>[s.$slots.closeIcon?e.renderSlot(s.$slots,"close-icon",{key:0}):(e.openBlock(),e.createElementBlock("i",Vo))]),_:3})):e.createCommentVNode("",!0)],2),s.complete?(e.openBlock(),e.createBlock(u,{key:0,value:s.complete,max:s.total},null,8,["value","max"])):e.createCommentVNode("",!0)],16)}}}),Ao={class:"pointer-events-none fixed z-20 h-full w-full children:pointer-events-auto"},To=["data-hash"],Ho=e.defineComponent({__name:"NotificationSystem",props:{position:{default:"top-right"},progress:{type:Boolean,default:!0},topN:{default:3},gap:{default:8},pt:{default:8},pl:{default:8},pr:{default:8},pb:{default:8}},setup(t){const r=t,n=Ue(r.topN),o=e.ref([]),l=e.computed(()=>o.value.map(h=>h.getBoundingClientRect())),a=Ue(),c=e.shallowRef({});e.watch([o.value],()=>{for(const h of o.value){const k=h.dataset.hash;if(k&&!c.value[k]){const w=te(h,{});c.value[k]=w}}}),r.progress&&er(({delta:h})=>{a.value=a.value.map(k=>c.value[k.hash]&&c.value[k.hash].value||!n.value.includes(k)?k:{...k,durationMS:k.durationMS-h}).filter(k=>k.durationMS>0)},{});const i=e.computed(()=>{const h={"top-left":0,"top-right":0,top:0,"bottom-left":0,"bottom-right":0,bottom:0};return n.value.map((k,w)=>{const E=k.position||r.position,_=h[E];return l.value[w]&&(h[E]+=l.value[w].height+r.gap),_})});function s(h){return["top-left","top-right","top"].includes(h)}function d(h=0,k){return k||(k=r.position),s(k)?{top:`${h+r.pt}px`}:{bottom:`${h+r.pb}px`}}function f(h){return h.includes("right")?{transform:"translateX(-100%)"}:h.includes("left")?{}:{transform:"translateX(-50%)"}}function u(h){return h.includes("right")?{right:`${r.pr}px`}:h.includes("left")?{left:`${r.pl}px`}:{left:"50%"}}function m(h){return h.includes("top")?{top:`${r.pt}px`}:{bottom:`${r.pb}px`}}const g=function(h){return s(h)?"animate-keyframes-fade-in-down animate-duration-0.3s":"animate-keyframes-fade-in-up animate-duration-0.3s"},C=function(h){return s(h)?"animate-keyframes-fade-out-down animate-duration-0.3s":"animate-keyframes-fade-out-up animate-duration-0.3s"};function p(h){n.value.indexOf(h)!==-1&&(a.value=a.value.filter(w=>w.hash!==h.hash))}function b(h){if(!h.durationMS||h.durationMS<=0)return 0;const k=h.durationMS,w=h.initialDurationMS;return(w-k)/w}const v=["top-left","top-right","top","bottom-left","bottom-right","bottom"];return(h,k)=>{const w=Kt;return e.openBlock(),e.createElementBlock("div",Ao,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(v,E=>e.createElementVNode("div",{key:E,style:e.normalizeStyle([m(E),u(E)]),class:"absolute"},[e.createVNode(e.TransitionGroup,{"enter-active-class":g(E),"leave-active-class":C(E)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(n),(_,y)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:_.hash},[_.position===E?(e.openBlock(),e.createElementBlock("div",{key:0,class:"absolute transition-top,bottom,transform duration-0.3s",style:e.normalizeStyle([d(i.value[y],_.position)])},[e.createElementVNode("div",{ref_for:!0,ref_key:"notificationRefs",ref:o,"data-hash":_.hash,style:e.normalizeStyle([f(E),d(i.value[y],_.position)])},[e.createVNode(w,{"with-border":"",closeable:"",title:_.title,message:_.message,icon:_.icon,loading:_.loading,color:_.color,complete:h.progress?b(_)*100:void 0,onClose:S=>p(_)},null,8,["title","message","icon","loading","color","complete","onClose"])],12,To)],4)):e.createCommentVNode("",!0)],64))),128))]),_:2},1032,["enter-active-class","leave-active-class"])],4)),64))])}}}),No={class:"relative"},Jt=e.defineComponent({__name:"Overlay",props:{blur:{type:[Boolean,String],default:!1},rounded:{default:"none"},opacity:{default:30},color:{default:"black"}},setup(t){const r=t,n=e.computed(()=>{switch(r.blur){case"sm":return"backdrop-blur-sm";case"md":case!0:return"backdrop-blur-md";case"lg":return"backdrop-blur-lg";default:return""}}),o=O(r),l=e.ref(null),a=z(r.color).toRgb(),c=e.computed(()=>({backgroundColor:`rgba(${a.r}, ${a.g}, ${a.b}, ${r.opacity/100})`}));return(i,s)=>(e.openBlock(),e.createElementBlock("div",No,[e.renderSlot(i.$slots,"default"),e.createElementVNode("div",e.mergeProps(i.$attrs,{ref_key:"wrapperRef",ref:l,class:[[n.value,e.unref(o).class],"absolute left-0 top-0 h-full w-full overflow-hidden md:items-center"],style:[e.unref(o).style,c.value]}),[e.renderSlot(i.$slots,"content")],16)]))}}),Ro=["for"],Io={key:1},Do=["id","disabled","placeholder","type"],Zt=e.defineComponent({__name:"TextField",props:e.mergeModels({onChange:{},color:{default:"primary"},error:{type:Boolean},disabled:{type:Boolean},rounded:{default:"md"},size:{default:"md"},password:{type:Boolean},placeholder:{},label:{}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t,{expose:r}){const n=t,o=e.useModel(t,"modelValue"),l=e.computed(()=>{switch(n.size){case"sm":return{base:"h-6 px-2 py-1 text-xs"};case"lg":return{base:"h-10 px-4 py-2 text-base"};case"md":default:return{base:"h-8 px-3 py-1 text-sm"}}}),a=e.computed(()=>{switch(n.size){case"sm":return"text-xs";case"lg":return"md-md";case"md":default:return"text-sm"}}),c=e.computed(()=>n.color),i=ct(c),s=e.computed(()=>n.disabled?"pointer-events-none select-none filter opacity-60":""),d=O(n),f=e.ref(null);r({el:f});const u=e.useAttrs(),m=De(u);return(g,C)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle([e.unref(i)])},[g.$slots.label||g.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref(m),class:e.normalizeClass(["mb-1 block",[a.value]])},[g.$slots.label?e.renderSlot(g.$slots,"label",{key:0}):(e.openBlock(),e.createElementBlock("span",Io,e.toDisplayString(g.label),1))],10,Ro)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",e.mergeProps({id:e.unref(m)},g.$attrs,{ref_key:"input",ref:f,"onUpdate:modelValue":C[0]||(C[0]=p=>o.value=p),disabled:g.disabled,class:["w-full border px-2 py-1 outline-none custom-input-colors",[s.value,e.unref(d).class,l.value.base]],style:[e.unref(d).style],placeholder:g.placeholder,type:n.password?"password":"text"}),null,16,Do),[[e.vModelDynamic,o.value]])],4))}}),Po={class:"flex gap-2"},Lo=e.defineComponent({__name:"PinInput",props:{modelValue:{},length:{default:6},size:{},password:{type:Boolean}},setup(t){const r=t,n=e.ref([]);function o(i){i.preventDefault(),i.stopPropagation();const s=n.value.findIndex(f=>f.el===i.target),d=i.target.value??"";i.target.value="",Array.from(d).forEach((f,u)=>{s+u>=n.value.length||(n.value[s+u].el.value=f,s+u+1<n.value.length?(n.value[s+u+1].el.focus(),n.value[s+u+1].el.select()):n.value[s+u].el.blur())})}function l(i){i.preventDefault(),i.stopPropagation();const s=i.target.value!=="";i.target.value="";const d=n.value.findIndex(f=>f.el===i.target);d!==0&&(n.value[d-1].el.focus(),n.value[d-1].el.select(),s||(n.value[d-1].el.value=""))}function a(i){i.preventDefault(),i.stopPropagation();const s=n.value.findIndex(d=>d.el===i.target);s>0&&(n.value[s-1].el.focus(),n.value[s-1].el.select())}function c(i){i.preventDefault(),i.stopPropagation();const s=n.value.findIndex(d=>d.el===i.target);s<n.value.length-1&&(n.value[s+1].el.focus(),n.value[s+1].el.select())}return(i,s)=>(e.openBlock(),e.createElementBlock("div",Po,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.length,d=>(e.openBlock(),e.createBlock(Zt,{ref_for:!0,ref_key:"inputs",ref:n,key:d,class:"w-8 text-center",style:{padding:"0"},password:r.password,onPointerup:s[0]||(s[0]=f=>f.target.select()),onInput:e.withModifiers(o,["stop","prevent"]),onKeydown:[e.withKeys(l,["backspace"]),e.withKeys(a,["arrow-left"]),e.withKeys(c,["arrow-right"])]},null,8,["password"]))),128))]))}}),Oo=e.defineComponent({__name:"Popover",props:e.mergeModels({trigger:{default:"click"},position:{default:"bottom"},zIndex:{default:1e4},offset:{default:4},overlay:{type:Boolean,default:!1}},{modelValue:{default:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const r=t,n=e.ref(null),o=e.ref(null),l=le(n),a=le(o),c=e.computed(()=>{switch(r.position){case"top-start":return"top-0 left-0";case"top-end":return"top-0 right-0";case"bottom-end":return"top-100% right-0";case"bottom-start":return"top-100% left-0";case"bottom":return"top-100% left-50%";default:return"top-100%"}}),i=e.computed(()=>{switch(r.position){case"top-start":case"top-end":return{top:`${-a.height.value-r.offset}px`};case"top":return{top:`${-a.height.value-r.offset}px`,left:`${-a.width.value/2+l.width.value/2}px`};case"bottom-start":case"bottom-end":return{marginTop:`${r.offset}px`};case"bottom":return{top:`${l.height.value+r.offset}px`,left:`${-a.width.value/2+l.width.value/2}px`};case"left-start":return{left:`${-a.width.value-r.offset}px`,top:0};case"left-end":return{left:`${-a.width.value-r.offset}px`,top:`${-a.height.value+l.height.value}px`};case"left":return{left:`${-a.width.value-r.offset}px`,top:`${-a.height.value/2+l.height.value/2}px`};case"right-start":return{left:`${r.offset+l.width.value}px`,top:0};case"right-end":return{left:`${r.offset+l.width.value}px`,top:`${-a.height.value+l.height.value}px`};case"right":return{left:`${l.width.value+r.offset}px`,top:`${-a.height.value/2+l.height.value/2}px`};default:return{}}}),s=te(n),d=e.useModel(t,"modelValue"),f=e.computed(()=>r.trigger==="hover"?s.value:d.value);function u(m){var g;!((g=n.value)!=null&&g.contains(m.target))||m.target===n.value||(d.value=!d.value)}return Ze(o,m=>{var g;(g=n.value)!=null&&g.contains(m.target)?d.value=!0:d.value=!1}),(m,g)=>{const C=Jt;return e.openBlock(),e.createElementBlock("div",{ref_key:"wrapperRef",ref:n,class:"relative"},[e.createElementVNode("div",{onPointerup:u},[e.renderSlot(m.$slots,"default")],32),f.value&&m.overlay?(e.openBlock(),e.createBlock(C,{key:0,opacity:0,class:"fixed inset-0 z-10",style:e.normalizeStyle({zIndex:m.zIndex}),onPointerup:g[0]||(g[0]=p=>d.value=!1)},null,8,["style"])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"contentRef",ref:o,class:e.normalizeClass([c.value,"absolute children:w-max"]),style:e.normalizeStyle([i.value,{zIndex:m.zIndex}])},[e.renderSlot(m.$slots,"content")],6)):e.createCommentVNode("",!0)],512)}}}),Fo=["onMouseover","onPointerdown"],Wo="#ffeb91",jo="text-[var(--d-text)]",Xo="text-surface-dimmed",Yo="text-[var(--d-text-h)]",Uo="i-fluent-star-12-filled",Go="i-fluent-star-12-filled",qo=e.defineComponent({__name:"Rating",props:e.mergeModels({count:{},icons:{},color:{default:"#ffeb91"},highlightSelectedOnly:{type:Boolean},unselectable:{type:Boolean},size:{}},{modelValue:{default:0},modelModifiers:{}}),emits:e.mergeModels(["select"],["update:modelValue"]),setup(t,{emit:r}){const n=t,o=r,l=e.computed(()=>n.count??5),a=e.useModel(t,"modelValue"),c=e.computed(()=>n.highlightSelectedOnly??!1),i=e.computed(()=>n.unselectable??!1),s=e.ref(-1),d=e.computed(()=>f(n.icons,l.value,Uo,Go));function f(h,k,w,E){function _(S){return typeof S=="string"?{active:S,normal:S}:S===void 0?{active:E,normal:w}:{active:S.active||E,normal:S.normal||w}}if(h===void 0)return Array.from({length:k},()=>({active:E,normal:w}));let y;if(typeof h=="string")y={active:h,normal:h};else if(Array.isArray(h)){const S=h.map(M=>_(M));return S.length===1?(y=S[0],Array.from({length:k},()=>({...y}))):S.slice(0,k).concat(Array.from({length:Math.max(0,k-S.length)},()=>({active:E,normal:w})))}else y={active:h.active||E,normal:h.normal||w};return Array.from({length:k},()=>({...y}))}function u(h){return c.value?s.value!==-1?s.value===h+1:a.value===h+1:s.value!==-1?s.value>h:a.value>=h+1}function m(h){const k=d.value[h].normal,w=d.value[h].active;return u(h)?[c.value?Yo:jo,w]:[Xo,k]}const C=e.computed(()=>{if(typeof n.color=="string")return Array.from({length:l.value}).map(()=>n.color);const h=Array.from({length:l.value}).map(()=>Wo);return n.color.forEach((k,w)=>{k&&(h[w]=k)}),h}).value.map(h=>Ce("filled",h)),p=L({color:"surface",type:"text",index:{dark:6,light:4}});function b(h){a.value===h&&i.value?(o("select",0),a.value=0):(o("select",h+1),a.value=h+1)}const v=e.computed(()=>{switch(n.size){case"sm":return"text-xs";case"lg":return"text-lg";case"md":default:return"text-base"}});return(h,k)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex cursor-pointer",v.value])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,(w,E)=>(e.openBlock(),e.createElementBlock("div",{key:E,class:"pr-1",onMouseover:_=>s.value=E+1,onMouseleave:k[0]||(k[0]=_=>s.value=-1),onPointerdown:_=>b(E)},[e.createElementVNode("i",e.mergeProps({ref_for:!0},u(E)?e.unref(C)[E].value:e.unref(p),{class:["active:translate-y-1px",[m(E)]]}),null,16)],40,Fo))),128))],2))}}),Ko=e.defineComponent({__name:"RokuProvider",props:{is:{default:"div"},theme:{default:"default"},themes:{default:()=>({default:at.value})}},setup(t){const r=t,n=Rt(),o=e.computed(()=>r.themes[r.theme]);e.watchEffect(()=>{ne.value=typeof o.value.colors.surface=="string"?o.value.colors.surface:ne.value,de.value=typeof o.value.colors.primary=="string"?o.value.colors.primary:de.value,fe.value=typeof o.value.colors.secondary=="string"?o.value.colors.secondary:fe.value,me.value=typeof o.value.colors.tertiary=="string"?o.value.colors.tertiary:me.value,pe.value=typeof o.value.colors.error=="string"?o.value.colors.error:pe.value});const l=e.ref(null),a=e.computed(()=>nt({colors:{surface:ne.value,primary:de.value,secondary:fe.value,tertiary:me.value,error:pe.value},name:o.value.name}));return e.provide(Nt,n),e.provide("currentThemeData",e.computed(()=>o.value)),lo(l),(c,i)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.is),{ref_key:"wrapperRef",ref:l,style:e.normalizeStyle([a.value])},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default")]),_:3},8,["style"]))}}),Jo=["id"],Zo=["for"],Qo=["for"],Qt=e.defineComponent({inheritAttrs:!1,__name:"Switch",props:e.mergeModels({size:{default:"md"},animate:{type:Boolean,default:!0},options:{},label:{},id:{},rounded:{default:"full"},color:{default:"primary"},disabled:{type:Boolean},offIcon:{},onIcon:{},indicatorIcon:{},onIndicatorIcon:{},offIndicatorIcon:{}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:e.mergeModels(["change"],["update:modelValue"]),setup(t,{emit:r}){const n=t,o=r,l=e.useModel(t,"modelValue"),a=e.ref(null),c=e.ref(!1),i=e.computed(()=>{switch(n.size){case"sm":return{icon:"text-xs mx-0.5",wrapper:"h-4 w-8",indicator:c.value?"h-3 w-4":"h-3 w-3",inactive:"left-[calc(0.125rem-1px)]",active:c.value?"left-[calc(0.875rem-1px)]":"left-[calc(1.125rem-1px)]"};case"lg":return{icon:"text-lg mx-2",wrapper:"h-8 w-16",indicator:c.value?"h-6 w-8":"h-6 w-6",inactive:"left-[calc(0.25rem-1px)]",active:c.value?"left-[calc(1.75rem-1px)]":"left-[calc(2.25rem-1px)]"};case"md":default:return{icon:"text-sm mx-1",wrapper:"h-6 w-12",indicator:c.value?"h-4 w-5":"h-4 w-4",inactive:"left-[calc(0.25rem-1px)]",active:c.value?"left-[calc(1.5rem-1px)]":"left-[calc(1.75rem-1px)]"}}}),s=e.computed(()=>n.animate?{indicator:"transition-all",progress:"transition-width"}:{indicator:"",progress:""}),d=De(n),f=Ee("bg",{dark:7,light:3}),u=Ae(n.color,"bg",5),m=Ae(n.color,"text",5),g=e.computed(()=>({wrapper:l.value?[u.value.class]:[f.value.class],indicator:"bg-white shadow"})),C=e.computed(()=>({wrapper:l.value?u.value.style:f.value.style,indicator:l.value?{}:""})),p=O(n),b=e.computed(()=>n.color),v=Oe(b),h=e.ref(null);return H(h,"keydown",k=>{(k.key==="Enter"||k.key===" ")&&(l.value=!l.value)}),e.watch(l,k=>{o("change",k)}),(k,w)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapperRef",ref:h,role:"switch",tabindex:"0",class:e.normalizeClass(["relative flex items-center gap-2 outline-none",[e.unref(v).class,e.unref(p).class,{"pointer-events-none filter-grayscale op-60":n.disabled}]]),style:e.normalizeStyle([e.unref(v).style,e.unref(p).style])},[e.withDirectives(e.createElementVNode("input",e.mergeProps({id:e.unref(d),"onUpdate:modelValue":w[0]||(w[0]=E=>l.value=E)},k.$attrs,{class:"hidden",type:"checkbox"}),null,16,Jo),[[e.vModelCheckbox,l.value]]),e.createElementVNode("label",{class:"leading-0 cursor-pointer!",for:e.unref(d)},[e.createElementVNode("div",{ref_key:"wrapper",ref:a,class:e.normalizeClass([[i.value.wrapper,...g.value.wrapper,e.unref(p).class],"relative inline-block"]),style:e.normalizeStyle([e.unref(p).style,C.value.wrapper]),onPointerdown:w[1]||(w[1]=E=>c.value=!0),onPointerup:w[2]||(w[2]=E=>c.value=!1),onPointerleave:w[3]||(w[3]=E=>c.value=!1),onPointerenter:w[4]||(w[4]=E=>E.buttons===1&&(c.value=!0))},[e.createElementVNode("div",{class:e.normalizeClass(["absolute top-50% -translate-y-50%",[i.value.indicator,g.value.indicator,s.value.indicator,l.value?i.value.active:i.value.inactive,e.unref(p).class]]),style:e.normalizeStyle([e.unref(p).style,C.value.indicator])},[e.createVNode(e.Transition,{name:"fade",mode:"out-in","enter-active-class":"transition-all duration-300","enter-from-class":"scale-0 ","enter-to-class":"scale-100","leave-active-class":"transition-all duration-300","leave-from-class":"scale-100","leave-to-class":"scale-0"},{default:e.withCtx(()=>[n.indicatorIcon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(["h-full w-full",[n.indicatorIcon,l.value?e.unref(m).class:"text-black"]]),style:e.normalizeStyle(e.unref(m).style)},null,6)):l.value&&n.onIndicatorIcon?(e.openBlock(),e.createElementBlock("i",{key:1,class:e.normalizeClass(["h-full w-full",[n.onIndicatorIcon,l.value?e.unref(m).class:"text-black"]]),style:e.normalizeStyle(e.unref(m).style)},null,6)):!l.value&&n.offIndicatorIcon?(e.openBlock(),e.createElementBlock("i",{key:2,class:e.normalizeClass(["h-full w-full",[n.offIndicatorIcon,l.value?e.unref(m).class:"text-black"]]),style:e.normalizeStyle(e.unref(m).style)},null,6)):e.createCommentVNode("",!0)]),_:1})],6),e.createVNode(e.Transition,{name:"fade",mode:"out-in","enter-active-class":"transition-all duration-300","enter-from-class":"scale-0 rotate-50","enter-to-class":"scale-100 rotate-0","leave-active-class":"transition-all duration-300","leave-from-class":"scale-100 rotate-0","leave-to-class":"scale-0 rotate-50 "},{default:e.withCtx(()=>[l.value?(e.openBlock(),e.createElementBlock("i",{key:"on",class:e.normalizeClass(["absolute top-1/2 -translate-y-50%",[i.value.icon,{[`left-0 text-${k.color}-on-container-low`]:l.value,[k.onIcon??""]:l.value&&k.onIcon,[k.offIcon??""]:!l.value&&k.offIcon}]])},null,2)):(e.openBlock(),e.createElementBlock("i",{key:"off",class:e.normalizeClass(["absolute top-1/2 -translate-y-50%",[i.value.icon,{"right-0":!l.value,[k.onIcon??""]:l.value&&k.onIcon,[k.offIcon??""]:!l.value&&k.offIcon}]])},null,2))]),_:1})],38)],8,Zo),k.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref(d)},e.toDisplayString(k.label),9,Qo)):e.createCommentVNode("",!0)],6))}}),el={class:"scheme-switch inline-block"},tl={class:"dark:hidden"},nl={class:"light:hidden"},rl=e.defineComponent({__name:"SchemeSwitch",props:{disableViewTranslation:{type:Boolean,default:!1},circleTranslation:{type:Boolean,default:!1}},setup(t){const r=t,n=e.ref(!1);let o;H("click",c=>o=c),e.watch([n],()=>{if(oe){const c=(o==null?void 0:o.clientX)??innerWidth/2,i=(o==null?void 0:o.clientY)??innerHeight/2,s=Math.hypot(Math.max(c,innerWidth-c),Math.max(i,innerHeight-i));if(r.disableViewTranslation)document.documentElement.setAttribute("data-scheme",n.value?"dark":"light"),localStorage.setItem("scheme",n.value?"dark":"light");else{const d=document.startViewTransition(()=>{n.value?(document.documentElement.setAttribute("data-scheme","dark"),localStorage.setItem("scheme","dark")):(document.documentElement.setAttribute("data-scheme","light"),localStorage.setItem("scheme","light"))});r.circleTranslation&&d.ready.then(()=>{document.documentElement.animate({clipPath:[`circle(0 at ${c}px ${i}px)`,`circle(${s}px at ${c}px ${i}px)`]},{duration:500,easing:"ease-in",pseudoElement:"::view-transition-new(root)"})})}}});const l=e.ref(!0),a=e.ref(!1);return e.onMounted(()=>{oe&&(n.value=localStorage.getItem("scheme")==="dark"),l.value=!1}),e.nextTick(()=>{a.value=!0}),(c,i)=>{const s=Qt;return e.openBlock(),e.createElementBlock("div",el,[e.createElementVNode("div",{class:e.normalizeClass({hidden:!l.value})},[e.createElementVNode("div",tl,[e.createVNode(s,{value:!1,"on-icon":"i-line-md-moon-twotone-alt-loop","off-icon":"i-line-md-sunny-outline-twotone-loop"})]),e.createElementVNode("div",nl,[e.createVNode(s,{value:!0,color:"secondary","on-icon":"i-line-md-moon-twotone-alt-loop","off-icon":"i-line-md-sunny-outline-twotone-loop"})])],2),e.createElementVNode("div",{class:e.normalizeClass({hidden:l.value})},[e.createVNode(s,{modelValue:n.value,"onUpdate:modelValue":i[0]||(i[0]=d=>n.value=d),animate:a.value,color:"secondary","on-icon":"i-line-md-moon-twotone-alt-loop","off-icon":"i-line-md-sunny-outline-twotone-loop"},null,8,["modelValue","animate"])],2)])}}}),ol=e.defineComponent({__name:"ScrollArea",props:{height:{},barWidth:{default:8},threshold:{default:100},floating:{type:Boolean},autoHide:{type:Boolean}},setup(t,{expose:r}){const n=t,o=zt(),l=le(o),a=e.ref(),c=le(()=>a.value),i=e.computed(()=>{if(n.height)return typeof n.height=="number"?`${n.height}px`:n.height;const V=o.value?Number.parseFloat(getComputedStyle(o.value).paddingTop)+Number.parseFloat(getComputedStyle(o.value).paddingBottom):0,N=o.value?Number.parseFloat(getComputedStyle(o.value).marginTop)+Number.parseFloat(getComputedStyle(o.value).marginBottom):0;return`${l.height.value-V-N}px`}),s=e.ref(),d=At(()=>s.value),{x:f,y:u}=fr(()=>s.value),m=e.computed(()=>{var V;return(((V=s.value)==null?void 0:V.scrollHeight)??0)-(d.value??0)}),g=Vt(()=>s.value),C=e.computed(()=>u.value/m.value||0),p=e.computed(()=>s.value?d.value/g.value*d.value:0),b=e.computed(()=>d.value-p.value),v=e.computed(()=>{if(!s.value)return null;const V=C.value*b.value;return{x:f.value,y:u.value,barHeight:p.value,barTop:V}}),h=e.ref(!1),k=e.ref(0),w=e.ref(""),E=e.ref(0),_=Ie({type:"client"});H(()=>a.value,"pointerdown",V=>{h.value=!0,k.value=V.clientY,E.value=u.value,w.value=document.body.style.userSelect,document.body.style.userSelect="none"}),H(()=>document,"pointermove",()=>{if(!h.value)return;if(n.threshold<c.left.value-_.x.value||_.x.value-c.right.value>n.threshold){u.value=E.value;return}const N=(_.y.value-k.value)/b.value;u.value=E.value+N*m.value}),H(()=>document,"pointerup",()=>{h.value=!1,document.body.style.userSelect=w.value}),r({$el:s});const y=e.ref(),S=te(y),M=te(()=>a.value),x=Ee("bg",{dark:2,light:7},.5),$=Ee("bg",{dark:2,light:7},.75);function A(V){var ge;const{clientY:N}=V,{top:R,height:F}=c,T=R.value,I=F.value,U=T+I/2,ee=N-U;(ge=s.value)==null||ge.scrollBy({top:ee/I*d.value,behavior:"smooth"})}return(V,N)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapperRef",ref:y,style:e.normalizeStyle({height:i.value}),class:"relative max-h-fit overflow-hidden"},[v.value?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle({width:`${V.barWidth}px`}),class:"absolute right-0 z-99999 h-full",onPointerdown:A},[e.withDirectives(e.createElementVNode("div",{ref_key:"scrollBarIndicatorRef",ref:a,class:e.normalizeClass([[e.unref(x).class,{"op-0":!e.unref(S)&&V.autoHide,"op-100":e.unref(S)&&V.autoHide}],"absolute right-0 z-1 rounded-full transition-background-color,opacity"]),style:e.normalizeStyle([{right:"0px",width:`${V.barWidth}px`,top:`${v.value.barTop}px`,height:`${v.value.barHeight}px`},!e.unref(M)&&!h.value&&e.unref(x).style,(e.unref(M)||h.value)&&e.unref($).style])},null,6),[[e.vShow,v.value.barHeight<e.unref(d)]])],36)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"scrollDomRef",ref:s,style:e.normalizeStyle({paddingRight:`${V.floating?0:V.barWidth}px`,scrollbarWidth:"none",height:"100%",overflowY:"scroll"})},[e.renderSlot(V.$slots,"default")],4)],4))}}),ll={class:"w-full flex items-center"},al=["placeholder","readonly","value","aria-label"],sl={key:0,class:"flex cursor-default items-center justify-between gap-2 rounded p-1 px-2"},il=["onPointerdown","onMousemove"],cl={key:0},ul={key:0,class:"flex cursor-default items-center justify-between gap-2 rounded p-1 px-2"},dl=e.defineComponent({__name:"Select",props:e.mergeModels({ariaLabel:{},options:{default(){return[]}},color:{default:"primary"},size:{default:"md"},noneText:{default:"No options"},notFoundText:{default:"Not found"},rounded:{default:"md"},placeholder:{default:""},searchable:{type:Boolean,default:!1},filter:{type:Function,default:(t,r)=>t.includes(r)}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["change","input"],["update:modelValue"]),setup(t,{emit:r}){const n=t,o=r,l=O(n),a=e.useModel(t,"modelValue"),c=e.ref(null),i=e.ref(null),s=e.ref(!1);Ze(i,()=>{s.value=!1});const d=e.ref(-1),f=e.ref(-1);e.watchEffect(()=>{s.value||(f.value=-1)}),e.watch(a,()=>{o("change",a.value)});const u=e.computed(()=>a.value),m=e.computed(()=>p(u.value)),g=e.computed(()=>n.options.findIndex(T=>$(T,u.value))),C=e.ref(m.value);e.watch(m,()=>{C.value=m.value});function p(T){return T?typeof T=="string"||typeof T=="symbol"||typeof T=="number"?String(T):T.label?T.label:T.id:""}function b(T){if(T)return typeof T=="string"||typeof T=="symbol"||typeof T=="number"?T:T.id}function v(T){s.value=!0;const I=T.target;C.value=I.value,o("input",C.value)}const h=e.computed(()=>n.searchable&&C.value!==m.value?n.options.filter(T=>n.filter(p(T),C.value)):n.options);G("ArrowDown",T=>{s.value&&(T.preventDefault(),f.value===-1&&d.value!==-1?f.value=d.value:f.value===-1&&d.value===-1&&g.value!==-1&&(f.value=g.value),f.value=(f.value+1)%n.options.length)}),G("ArrowUp",T=>{s.value&&(T.preventDefault(),f.value===-1&&d.value!==-1?f.value=d.value:f.value===-1&&d.value===-1&&g.value!==-1&&(f.value=g.value),f.value=(f.value-1+n.options.length)%n.options.length)}),G("Enter",()=>{s.value&&f.value!==-1&&(a.value=h.value[f.value],c.value.focus(),s.value=!1)});function k(T){if(c.value.focus(),!s.value){s.value=!0;return}a.value=T,s.value=!1}const w=e.computed(()=>n.color),E=ct(w,"default"),_=e.computed(()=>{switch(n.size){case"sm":return{wrapper:"h-6 w-full py-1 pl-1.5 pr-6 text-sm",dropdown:"text-sm children:py-1"};case"lg":return{wrapper:"h-10 w-full py-2 pl-3 pr-10 text-lg",dropdown:"text-lg children:py-2"};default:return{wrapper:"h-8 w-full py-1 pl-2 pr-8 text-base",dropdown:"text-base children:py-1"}}}),y=e.ref(null),{height:S}=le(y),{bottom:M}=le(c);e.watch([s],()=>{f.value=-1,d.value=-1});const x=e.computed(()=>s.value&&oe?S.value===0?!1:document.documentElement.clientHeight-M.value>S.value:!1);function $(T,I){return I?typeof T=="string"||typeof T=="symbol"||typeof T=="number"?T===I:typeof I=="string"||typeof I=="symbol"||typeof I=="number"?!1:T.id===I.id:!1}const A=e.computed(()=>n.searchable?"cursor-text":"cursor-pointer"),V=Le(),N=it(),R=_e(w);function F(T){d.value=T,f.value=-1}return(T,I)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapperRef",ref:i,class:"relative",style:e.normalizeStyle(e.unref(E))},[e.createElementVNode("div",ll,[e.createElementVNode("input",{ref_key:"inputRef",ref:c,class:e.normalizeClass([[_.value.wrapper,e.unref(l).class,A.value],"border outline-none outline-none focus-visible:outline-2 custom-input-colors"]),placeholder:T.placeholder,style:e.normalizeStyle([e.unref(l).style,e.unref(E)]),readonly:!T.searchable,value:C.value,"aria-label":T.ariaLabel,"aria-haspopup":"listbox",autocomplete:"off",onInput:v,onClick:I[0]||(I[0]=U=>s.value=!0)},null,46,al),I[2]||(I[2]=e.createElementVNode("i",{class:"i-fluent-chevron-down-12-filled pointer-events-none absolute right-2"},null,-1))]),s.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"dropdownRef",ref:y,class:e.normalizeClass(["absolute z-10 mt-2 w-full flex-col overflow-hidden border rounded p-1",[e.unref(V).class,_.value.dropdown,{"bottom-10":!x.value}]]),style:e.normalizeStyle([e.unref(V).style])},[T.options.length===0?(e.openBlock(),e.createElementBlock("div",sl,[e.renderSlot(T.$slots,"none",{},()=>[e.createTextVNode(e.toDisplayString(T.noneText),1)])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(U,ee)=>(e.openBlock(),e.createElementBlock("div",{key:b(U),class:e.normalizeClass([[f.value===ee&&e.unref(R).class,d.value===ee&&f.value===-1&&e.unref(N).class],"flex cursor-pointer items-center justify-between gap-2 rounded p-1 px-2"]),style:e.normalizeStyle([f.value===ee&&e.unref(R).style,d.value===ee&&f.value===-1&&e.unref(N).style]),onPointerdown:ge=>k(U),onMousemove:ge=>F(ee),onMouseleave:I[1]||(I[1]=ge=>d.value=-1)},[e.renderSlot(T.$slots,"item",{data:U,selected:$(U,u.value)},()=>[e.createTextVNode(e.toDisplayString(p(U)),1)]),$(U,u.value)?(e.openBlock(),e.createElementBlock("div",cl,I[3]||(I[3]=[e.createElementVNode("i",{class:"i-fluent-checkmark-12-filled h-3 w-3"},null,-1)]))):e.createCommentVNode("",!0)],46,il))),128)),T.searchable&&h.value.length===0?(e.openBlock(),e.createElementBlock("div",ul,[e.renderSlot(T.$slots,"not-found",{},()=>[e.createTextVNode(e.toDisplayString(T.notFoundText),1)])])):e.createCommentVNode("",!0)],64))],6)):e.createCommentVNode("",!0)],4))}}),fl=e.defineComponent({__name:"SelectArea",props:{target:{},color:{default:"primary"}},emits:["selectStart","selectChange","selectEnd"],setup(t,{emit:r}){const n=t,o=r,l=e.computed(()=>n.color),a=ae(l),c=e.computed(()=>{const v=a.value[5].setAlpha(.5).toHex8String(),h=a.value[5].setAlpha(.1).toHex8String();return{"--border-color":v,"--fill-color":h}}),{shift:i,control:s}=pr(),d=zt(),f=e.computed(()=>n.target??d.value),u=Ie(),m=e.ref({x:0,y:0}),g=e.ref({x:0,y:0}),C=e.ref(!1),p=le(f);H(f,"pointerdown",v=>{if(v.button!==0)return;const h=v.pageX-p.left.value,k=v.pageY-p.top.value;m.value={x:h,y:k},g.value={x:h,y:k},C.value=!0,o("selectStart",{target:v.target,shift:i.value,ctrl:s.value})},{capture:!0}),H(window,"pointerup",v=>{C.value=!1,o("selectEnd",{left:Math.min(m.value.x,g.value.x),top:Math.min(m.value.y,g.value.y),right:Math.max(m.value.x,g.value.x),bottom:Math.max(m.value.y,g.value.y)},{target:v.target,shift:i.value,ctrl:s.value})}),H(f,"pointermove",v=>{const h=v.pageX-p.left.value,k=v.pageY-p.top.value;C.value&&(g.value={x:h,y:k},o("selectChange",{left:Math.min(m.value.x,g.value.x),top:Math.min(m.value.y,g.value.y),right:Math.max(m.value.x,g.value.x),bottom:Math.max(m.value.y,g.value.y)},{target:v.target,shift:i.value,ctrl:s.value}))});const b=e.computed(()=>f.value?f.value.parentElement:null);return H(b,"scroll",v=>{C.value&&(g.value={x:u.x.value-p.left.value,y:u.y.value-p.top.value},o("selectChange",{left:Math.min(m.value.x,g.value.x),top:Math.min(m.value.y,g.value.y),right:Math.max(m.value.x,g.value.x),bottom:Math.max(m.value.y,g.value.y)},{target:v.target,shift:i.value,ctrl:s.value}))}),H(window,"dragend",()=>{C.value=!1}),(v,h)=>f.value?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:f.value},[C.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"absolute z-10000 h-1 border border border-[var(--border-color)] bg-[var(--fill-color)]",style:e.normalizeStyle([{left:`${Math.min(m.value.x,g.value.x)}px`,top:`${Math.min(m.value.y,g.value.y)}px`,width:`${Math.abs(m.value.x-g.value.x)}px`,height:`${Math.abs(m.value.y-g.value.y)}px`},c.value])},null,4)):e.createCommentVNode("",!0)],8,["to"])):e.createCommentVNode("",!0)}}),ml={class:"relative w-full"},pl="dark:bg-white bg-[var(--i-bg)]",hl="dark:bg-[var(--i-bg)] bg-white",gl=e.defineComponent({__name:"Slider",props:e.mergeModels({size:{default:"md"},animate:{type:Boolean,default:!1},width:{},options:{},min:{default:0},max:{default:100},step:{default:1},tickNum:{},color:{default:"primary"},minWidth:{default:12}},{modelValue:{default:void 0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const r=t;function n(_,y,S){const M=[];for(let x=_;x<=y;x+=S)M.push(x);return M[M.length-1]!==y&&M.push(y),M}function o(_,y){const S=[];if(_===0)return S;S.push(y[0]);const M=(y.length-1)/(_-1);for(let x=1;x<_-1;x++)S.push(y[Math.round(x*M)]);return S.push(y[y.length-1]),S}const l=e.computed(()=>r.options?r.options.length:r.tickNum??0),a=e.computed(()=>r.options===void 0?n(r.min,r.max,r.step):r.options),c=e.computed(()=>o(l.value,a.value)),i=e.useModel(t,"modelValue"),s=e.computed(()=>a.value.length??0),d=e.ref(a.value.includes(i.value)?a.value.indexOf(i.value):0);function f(_){let y=a.value.indexOf(_);if(y===-1)if(typeof _=="number"){let S=1/0;for(let M=0;M<a.value.length;M++){const x=Math.abs(a.value[M]-_);x<S&&(S=x,y=M)}}else y=0;return y}const u=e.computed(()=>r.color),m=ae(u.value),g=e.computed(()=>m.value[4]),C=_e(u);e.watchEffect(()=>{d.value<0||(i.value=a.value[d.value])}),e.watchEffect(()=>{d.value=f(i.value)});const p=e.ref(),b=e.ref(),v=e.ref(!1);function h(_){if(!v.value)return;if(!(_.buttons===1)){v.value=!1;return}_.preventDefault(),_.stopPropagation();const S=le(p),{clientX:M}=_,x=S.left.value,A=S.right.value-x,V=Math.round((M-x)/A*(s.value-1));if(V<0){d.value=0;return}if(V>s.value-1){d.value=s.value-1;return}d.value=V}e.watchEffect(()=>{d.value=f(i.value)});function k(_){_.preventDefault(),_.stopPropagation(),v.value=!0,h(_)}H(p,"pointerdown",k),e.onMounted(()=>{H(document,"pointermove",h),d.value=Math.max(0,f(i.value))});const w=e.computed(()=>{switch(r.size){case"sm":return{wrapper:"h-2",innerWrapper:"px-0.5 h-1",content:"h-1",tick:"h-0.5 w-0.5 -translate-x-0.25 -translate-y-0.25",indicator:"h-3 w-3 -translate-x-1.5 -translate-y-1.5",indicatorInner:"h-1.5 w-1.5 -translate-x-0.75 -translate-y-0.75",progress:"-mx-0.5"};case"lg":return{wrapper:"h-6",innerWrapper:"px-1.5 h-3",content:"h-3",tick:"h-1.5 w-1.5 -translate-x-0.75 -translate-y-0.75",indicator:"h-6 w-6 -translate-x-3 -translate-y-3",indicatorInner:"h-3 w-3 -translate-x-1.5 -translate-y-1.5",progress:"-mx-1.5"};case"md":default:return{wrapper:"h-4",innerWrapper:"px-1 h-2",content:"h-2",tick:"h-1 w-1 -translate-x-0.5 -translate-y-0.5",indicator:"h-4 w-4 -translate-x-2 -translate-y-2",indicatorInner:"h-2 w-2 -translate-x-1 -translate-y-1",progress:"-mx-1"}}}),E=e.computed(()=>r.animate?{indicator:"transition-left",progress:"transition-width"}:{indicator:"",progress:""});return(_,y)=>(e.openBlock(),e.createElementBlock("div",ml,[e.createElementVNode("div",{ref_key:"wrapper",ref:p,type:"size",class:e.normalizeClass(["w-full flex cursor-pointer items-center",w.value.wrapper]),onTouchmove:y[0]||(y[0]=e.withModifiers(()=>{},["prevent"]))},[e.createElementVNode("div",{class:e.normalizeClass(["w-full rounded-full bg-surface-3 transition-background-color,border-color,color dark:bg-surface-7",w.value.innerWrapper])},[e.createElementVNode("div",{class:e.normalizeClass(["relative flex",w.value.content]),style:e.normalizeStyle({width:`${r.width}rem`,minWidth:`${r.minWidth}rem`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,S=>(e.openBlock(),e.createElementBlock("div",{key:S,style:e.normalizeStyle({left:`${f(S)/(s.value-1)*100}%`}),class:e.normalizeClass(["absolute top-50% rounded-full bg-surface-0",w.value.tick])},null,6))),128)),d.value!==-1?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"indicator",ref:b,class:e.normalizeClass(["absolute top-50% cursor-pointer rounded-full transition-background-color,border-color,color",[w.value.indicator,E.value.indicator,pl]]),style:e.normalizeStyle([`--i-bg: ${g.value}`,{left:`${d.value/(s.value-1)*100}%`}])},[e.createElementVNode("div",{class:e.normalizeClass(["pointer-events-none absolute left-50% top-50% rounded-full",[w.value.indicatorInner,hl]])},null,2)],6)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["pointer-events-none h-full rounded-full",[e.unref(C).class,w.value.progress,E.value.progress]]),style:e.normalizeStyle([e.unref(C).style,{width:`${d.value/(s.value-1)*100}%`}])},null,6)],6)],2)],34),c.value.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:"relative mx-1 h-1em text-xs text-surface-dimmed",style:e.normalizeStyle({width:`${r.width}rem`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(S,M)=>(e.openBlock(),e.createElementBlock("div",{key:M,style:e.normalizeStyle({left:`${f(S)/(s.value-1)*100}%`}),class:e.normalizeClass(["absolute w-auto flex rounded-full -translate-x-50%",w.value.tick])},e.toDisplayString(S),7))),128))],4)):e.createCommentVNode("",!0)]))}}),yl={class:"h-full py-2"},bl=e.defineComponent({__name:"TabItem",props:{value:{},color:{default:"primary"}},setup(t){const r=t,n=e.computed(()=>r.color),o=e.inject(Ge,e.ref("")),l=e.ref(null),a=e.computed(()=>o.value===r.value);function c(){o.value=r.value}const i=e.inject(Ke,new Map);e.onMounted(()=>{i.set(r.value,l)});const s=e.inject(qe,e.computed(()=>"horizontal")),d=e.computed(()=>{switch(s.value){case"vertical":return"flex-row-reverse rounded-tr-lg rounded-br-lg";case"horizontal":default:return"flex-col rounded-tr-lg rounded-tl-lg"}}),f=e.computed(()=>{switch(s.value){case"vertical":return"absolute inset-0 right-100% h-full w-2px";case"horizontal":default:return"absolute inset-0 top-100% h-2px w-full"}}),u=L({color:n.value,type:"bg",index:5}),m=L({color:n.value,type:"outline",index:5});return(g,C)=>(e.openBlock(),e.createElementBlock("button",e.mergeProps({ref_key:"tabRef",ref:l,type:"button",class:["rutline-none relative min-w-20 flex items-center justify-center outline-none focus-visible:outline-2 outline-offset-0!",[d.value]]},e.unref(m),{onClick:c}),[a.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([e.unref(u).class,f.value]),style:e.normalizeStyle([e.unref(u).style])},null,6)):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass([f.value])},null,2)),e.createElementVNode("div",yl,[e.renderSlot(g.$slots,"default")])],16))}}),kl=e.defineComponent({__name:"Tabs",props:e.mergeModels({defaultValue:{},direction:{default:"horizontal"}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const r=t,n=e.useSlots(),o=e.computed(()=>{var u;const d=(u=n.default)==null?void 0:u.call(n);return(d==null?void 0:d.flatMap(m=>m.type===e.Fragment?m.children:m).filter(m=>{var g;return((g=m==null?void 0:m.props)==null?void 0:g.value)!==void 0}).map(m=>m.props.value))??[]}),l=e.useModel(t,"modelValue");!l.value&&o.value.length>0&&(l.value=o.value[0]);const a=e.ref(null);e.onMounted(()=>{r.defaultValue&&(l.value=r.defaultValue)}),e.provide(Ge,l);const c=e.computed(()=>r.direction);e.provide(qe,c);const i=new Map;e.provide(Ke,i),G("ArrowLeft",d=>{var g;if(!((g=a.value)!=null&&g.contains(document.activeElement))||(d.preventDefault(),r.direction!=="horizontal"))return;const f=l.value?o.value.indexOf(l.value):0,u=f>0?o.value[f-1]:o.value[o.value.length-1];l.value=u;const m=i.get(u);if(m){const C=m.value;C&&C.focus()}}),G("ArrowRight",d=>{var g;if(!((g=a.value)!=null&&g.contains(document.activeElement))||(d.preventDefault(),r.direction!=="horizontal"))return;const f=l.value?o.value.indexOf(l.value):0,u=f<o.value.length-1?l.value=o.value[f+1]:l.value=o.value[0];l.value=u;const m=i.get(u);if(m){const C=m.value;C&&C.focus()}}),G("ArrowUp",d=>{var g;if(!((g=a.value)!=null&&g.contains(document.activeElement))||(d.preventDefault(),r.direction!=="vertical"))return;const f=l.value?o.value.indexOf(l.value):0,u=f>0?o.value[f-1]:o.value[o.value.length-1];l.value=u;const m=i.get(u);if(m){const C=m.value;C&&C.focus()}}),G("ArrowDown",d=>{var g;if(!((g=a.value)!=null&&g.contains(document.activeElement))||(d.preventDefault(),r.direction!=="vertical"))return;const f=l.value?o.value.indexOf(l.value):0,u=f<o.value.length-1?o.value[f+1]:o.value[0];l.value=u;const m=i.get(u);if(m){const C=m.value;C&&C.focus()}});const s=e.computed(()=>{switch(r.direction){case"horizontal":return"flex-row";case"vertical":return"flex-col";default:return"flex-row"}});return(d,f)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tabRef",ref:a,class:e.normalizeClass(["flex",[s.value]])},[e.renderSlot(d.$slots,"default")],2))}}),wl=e.defineComponent({__name:"Tag",props:{color:{},variant:{default:"default"},rounded:{default:"md"},size:{},leftIcon:{},rightIcon:{}},setup(t){const r=t,n=e.computed(()=>{switch(r.size){case"sm":return"px-2 py-0.5 text-xs";case"lg":return"px-4 py-1 text-base";case"md":default:return"px-3 py-0.5 text-sm"}}),o=O(r),l=e.computed(()=>r.color??"primary"),a=e.computed(()=>r.variant),c=Fe(a,l);return(i,s)=>(e.openBlock(),e.createElementBlock("span",{tabindex:-1,style:e.normalizeStyle([e.unref(c).style,e.unref(o).style]),class:e.normalizeClass([[e.unref(c).class,e.unref(o).class,n.value],"inline-block h-fit flex cursor-pointer gap-1 border"])},[r.leftIcon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass([r.leftIcon,"shrink-0"])},null,2)):i.$slots.leftIcon?e.renderSlot(i.$slots,"left-icon",{key:1}):e.createCommentVNode("",!0),e.renderSlot(i.$slots,"default"),r.rightIcon?(e.openBlock(),e.createElementBlock("i",{key:2,class:e.normalizeClass([r.rightIcon,"h-container w-container shrink-0"])},null,2)):i.$slots.rightIcon?e.renderSlot(i.$slots,"right-icon",{key:3}):e.createCommentVNode("",!0)],6))}}),Sl=["data-scheme","data-theme"],xl=e.defineComponent({__name:"ThemeProvider",props:{theme:{},scheme:{}},setup(t){const r=t,n=Tt(),o=e.computed(()=>nt(r.theme?r.theme:n.value)),l=$t("scheme","light"),a=e.computed(()=>r.scheme?r.scheme:l.value);return(c,i)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle([o.value]),"data-scheme":a.value,"data-theme":e.unref(n).name},[e.renderSlot(c.$slots,"default")],12,Sl))}}),vl=e.defineComponent({__name:"Tooltip",props:{timeout:{default:200}},setup(t){const r=t,n=Ie(),o=e.ref(null),l=te(o),a=Yn(l,r.timeout),c=e.ref(0),i=e.ref(0),s=e.ref(null),d=te(s);return e.watch(a,(f,u)=>{a.value&&f!==u&&(c.value=n.x.value,i.value=n.y.value)}),(f,u)=>{const m=ft;return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",{ref_key:"hoverableRef",ref:o},[e.renderSlot(f.$slots,"default")],512),c.value&&i.value&&(e.unref(a)||e.unref(d))?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"tooltipRef",ref:s,class:"absolute z-10",style:e.normalizeStyle({left:`${c.value+20}px`,top:`${i.value+20}px`})},[e.createVNode(m,{"with-border":""},{default:e.withCtx(()=>[e.renderSlot(f.$slots,"content")]),_:3})],4)):e.createCommentVNode("",!0)])}}}),Cl='before:absolute before:left-4 before:h-full before:border-r before:content-[""]',mt="relative h-8 py-1 w-full flex items-center gap-2 cursor-pointer focus-visible:outline-none focus-visible:bg-surface-variant-1",Bl=e.defineComponent({__name:"TreeList",props:e.mergeModels({items:{},rounded:{default:"md"}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const r=t,n=O(r),o=e.useModel(t,"modelValue");function l(p){return"children"in p}function a(p){return"value"in p}const c=e.computed(()=>`${mt} hover:bg-surface-variant-1 hover:text-surface text-surface-dimmed`),i=e.computed(()=>`${mt} text-primary before:border-primary bg-surface-variant-1`),s=e.computed(()=>[mt,"text-surface font-bold hover:bg-surface-variant-1"]),d=e.ref(null),f=e.ref(new Map);function u(p,b){l(p)&&(f.value.set(p,p.open??!1),p.children.forEach(v=>{u(v)}))}e.watchEffect(()=>{r.items.forEach(p=>{l(p)&&u(p)})});function m({data:p,level:b}){const v=h=>p.is?e.h(p.is,h,{default:()=>p.title}):e.h("a",h,p.title);return e.createVNode("li",null,[e.createVNode(v,e.mergeProps({tabindex:0,class:[n.value.class,Cl,{[c.value]:o.value!==p.value,[i.value]:o.value===p.value}],style:[{paddingLeft:`${32+b*4}px`},n.value.style],onClick:()=>o.value=p.value,onKeyup:h=>{h.key==="Enter"&&(o.value=p.value)}},p.attrs),{default:()=>[p.title]})])}function g({data:p,level:b}){return e.createVNode("li",{class:["flex items-center relative py-2 text-surface-dimmed font-bold tracking-widest text-xs"],style:[{paddingLeft:`${32+b*4}px`},n.value.style]},[e.createVNode("div",{class:"absolute left-4 h-1/2 translate-y-1/2 border-r"},null),e.createVNode("div",{class:"absolute left-[calc(1rem+0.6px)] h-2 w-2 border rounded-sm bg-surface-variant-1 -translate-x-1/2"},null),p.title])}function C({data:p,level:b}){const v=e.computed(()=>f.value.get(p)),h=e.ref(null),k=e.ref(null);return e.createVNode("li",{class:"transition-height",ref:h},[e.createVNode("button",{ref:k,onClick:()=>f.value.set(p,!f.value.get(p)),class:[n.value.class,s.value],style:[{paddingLeft:`${32+b*4}px`},n.value.style]},[e.createVNode("i",{class:["i-tabler-chevron-down absolute left-2 h-4 w-4 py-1 transition-transform",v.value?"rotate-0":"-rotate-90"]},null),p.title]),e.createVNode(e.Transition,{onBeforeEnter:w=>{w instanceof HTMLElement&&(w.style.height="0px")},onEnter:w=>{w instanceof HTMLElement&&(w.style.height=`${w.scrollHeight}px`)},onAfterEnter:w=>{w instanceof HTMLElement&&(w.style.height="auto")},onBeforeLeave:w=>{w instanceof HTMLElement&&(w.style.height=`${w.scrollHeight}px`)},onLeave:w=>{w instanceof HTMLElement&&(w.style.height="0px")},css:!0,mode:"out-in"},{default:()=>[f.value.get(p)&&e.createVNode("ul",{class:"overflow-hidden transition-height"},[p.children.map(w=>a(w)?e.createVNode(m,{data:w,level:b+1},null):l(w)?e.createVNode(C,{data:w,level:b+1},null):e.createVNode(g,{data:w,level:b+1},null))])]})])}return(p,b)=>(e.openBlock(),e.createElementBlock("ul",{ref_key:"treeListRef",ref:d,class:"flex flex-col text-sm"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.items,(v,h)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:h},[a(v)?(e.openBlock(),e.createBlock(m,{key:0,data:v,level:0},null,8,["data"])):l(v)?(e.openBlock(),e.createBlock(C,{key:1,data:v,level:0},null,8,["data"])):e.createCommentVNode("",!0)],64))),128))],512))}});function en(t){return e.getCurrentScope()?(e.onScopeDispose(t),!0):!1}function q(t){return typeof t=="function"?t():e.unref(t)}const _l=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const El=Object.prototype.toString,Ml=t=>El.call(t)==="[object Object]",he=()=>{};function tn(t,r){function n(...o){return new Promise((l,a)=>{Promise.resolve(t(()=>r.apply(this,o),{fn:r,thisArg:this,args:o})).then(l).catch(a)})}return n}function $l(t,r={}){let n,o,l=he;const a=c=>{clearTimeout(c),l(),l=he};return c=>{const i=q(t),s=q(r.maxWait);return n&&a(n),i<=0||s!==void 0&&s<=0?(o&&(a(o),o=null),Promise.resolve(c())):new Promise((d,f)=>{l=r.rejectOnCancel?f:d,s&&!o&&(o=setTimeout(()=>{n&&a(n),o=null,d(c())},s)),n=setTimeout(()=>{o&&a(o),o=null,d(c())},i)})}}function zl(...t){let r=0,n,o=!0,l=he,a,c,i,s,d;!e.isRef(t[0])&&typeof t[0]=="object"?{delay:c,trailing:i=!0,leading:s=!0,rejectOnCancel:d=!1}=t[0]:[c,i=!0,s=!0,d=!1]=t;const f=()=>{n&&(clearTimeout(n),n=void 0,l(),l=he)};return u=>{const m=q(c),g=Date.now()-r,C=()=>a=u();return f(),m<=0?(r=Date.now(),C()):(g>m&&(s||!o)?(r=Date.now(),C()):i&&(a=new Promise((p,b)=>{l=d?b:p,n=setTimeout(()=>{r=Date.now(),o=!0,p(C()),f()},Math.max(0,m-g))})),!s&&!n&&(n=setTimeout(()=>o=!0,m)),o=!1,a)}}function Vl(t){return e.getCurrentInstance()}function Al(t,r=200,n={}){return tn($l(r,n),t)}function Tl(t,r=200,n=!1,o=!0,l=!1){return tn(zl(r,n,o,l),t)}function nn(t,r=!0,n){Vl()?e.onMounted(t,n):r?t():e.nextTick(t)}function ie(t){var r;const n=q(t);return(r=n==null?void 0:n.$el)!=null?r:n}const Xe=_l?window:void 0;function rn(...t){let r,n,o,l;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,o,l]=t,r=Xe):[r,n,o,l]=t,!r)return he;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const a=[],c=()=>{a.forEach(f=>f()),a.length=0},i=(f,u,m,g)=>(f.addEventListener(u,m,g),()=>f.removeEventListener(u,m,g)),s=e.watch(()=>[ie(r),q(l)],([f,u])=>{if(c(),!f)return;const m=Ml(u)?{...u}:u;a.push(...n.flatMap(g=>o.map(C=>i(f,g,C,m))))},{immediate:!0,flush:"post"}),d=()=>{s(),c()};return en(d),d}function Hl(){const t=e.ref(!1),r=e.getCurrentInstance();return r&&e.onMounted(()=>{t.value=!0},r),t}function Nl(t){const r=Hl();return e.computed(()=>(r.value,!!t()))}function Rl(t,r,n={}){const{window:o=Xe,...l}=n;let a;const c=Nl(()=>o&&"ResizeObserver"in o),i=()=>{a&&(a.disconnect(),a=void 0)},s=e.computed(()=>{const u=q(t);return Array.isArray(u)?u.map(m=>ie(m)):[ie(u)]}),d=e.watch(s,u=>{if(i(),c.value&&o){a=new ResizeObserver(r);for(const m of u)m&&a.observe(m,l)}},{immediate:!0,flush:"post"}),f=()=>{i(),d()};return en(f),{isSupported:c,stop:f}}function Il(t,r={width:0,height:0},n={}){const{window:o=Xe,box:l="content-box"}=n,a=e.computed(()=>{var u,m;return(m=(u=ie(t))==null?void 0:u.namespaceURI)==null?void 0:m.includes("svg")}),c=e.ref(r.width),i=e.ref(r.height),{stop:s}=Rl(t,([u])=>{const m=l==="border-box"?u.borderBoxSize:l==="content-box"?u.contentBoxSize:u.devicePixelContentBoxSize;if(o&&a.value){const g=ie(t);if(g){const C=g.getBoundingClientRect();c.value=C.width,i.value=C.height}}else if(m){const g=Array.isArray(m)?m:[m];c.value=g.reduce((C,{inlineSize:p})=>C+p,0),i.value=g.reduce((C,{blockSize:p})=>C+p,0)}else c.value=u.contentRect.width,i.value=u.contentRect.height},n);nn(()=>{const u=ie(t);u&&(c.value="offsetWidth"in u?u.offsetWidth:r.width,i.value="offsetHeight"in u?u.offsetHeight:r.height)});const d=e.watch(()=>ie(t),u=>{c.value=u?r.width:0,i.value=u?r.height:0});function f(){s(),d()}return{width:c,height:i,stop:f}}const on=1;function Dl(t,r={}){const{throttle:n=0,idle:o=200,onStop:l=he,onScroll:a=he,offset:c={left:0,right:0,top:0,bottom:0},eventListenerOptions:i={capture:!1,passive:!0},behavior:s="auto",window:d=Xe,onError:f=y=>{console.error(y)}}=r,u=e.ref(0),m=e.ref(0),g=e.computed({get(){return u.value},set(y){p(y,void 0)}}),C=e.computed({get(){return m.value},set(y){p(void 0,y)}});function p(y,S){var M,x,$,A;if(!d)return;const V=q(t);if(!V)return;($=V instanceof Document?d.document.body:V)==null||$.scrollTo({top:(M=q(S))!=null?M:C.value,left:(x=q(y))!=null?x:g.value,behavior:q(s)});const N=((A=V==null?void 0:V.document)==null?void 0:A.documentElement)||(V==null?void 0:V.documentElement)||V;g!=null&&(u.value=N.scrollLeft),C!=null&&(m.value=N.scrollTop)}const b=e.ref(!1),v=e.reactive({left:!0,right:!1,top:!0,bottom:!1}),h=e.reactive({left:!1,right:!1,top:!1,bottom:!1}),k=y=>{b.value&&(b.value=!1,h.left=!1,h.right=!1,h.top=!1,h.bottom=!1,l(y))},w=Al(k,n+o),E=y=>{var S;if(!d)return;const M=((S=y==null?void 0:y.document)==null?void 0:S.documentElement)||(y==null?void 0:y.documentElement)||ie(y),{display:x,flexDirection:$}=getComputedStyle(M),A=M.scrollLeft;h.left=A<u.value,h.right=A>u.value;const V=Math.abs(A)<=(c.left||0),N=Math.abs(A)+M.clientWidth>=M.scrollWidth-(c.right||0)-on;x==="flex"&&$==="row-reverse"?(v.left=N,v.right=V):(v.left=V,v.right=N),u.value=A;let R=M.scrollTop;y===d.document&&!R&&(R=d.document.body.scrollTop),h.top=R<m.value,h.bottom=R>m.value;const F=Math.abs(R)<=(c.top||0),T=Math.abs(R)+M.clientHeight>=M.scrollHeight-(c.bottom||0)-on;x==="flex"&&$==="column-reverse"?(v.top=T,v.bottom=F):(v.top=F,v.bottom=T),m.value=R},_=y=>{var S;if(!d)return;const M=(S=y.target.documentElement)!=null?S:y.target;E(M),b.value=!0,w(y),a(y)};return rn(t,"scroll",n?Tl(_,n,!0,!1):_,i),nn(()=>{try{const y=q(t);if(!y)return;E(y)}catch(y){f(y)}}),rn(t,"scrollend",k,i),{x:g,y:C,isScrolling:b,arrivedState:v,directions:h,measure(){const y=q(t);d&&y&&E(y)}}}const Pl=e.defineComponent({__name:"Waterfall",props:{gap:{},wrapperWidth:{},itemWidth:{},rowCount:{},paddingX:{}},setup(t,{expose:r}){const n=t,o=e.useSlots(),l=e.computed(()=>e.unref(n.gap)??16),a=e.computed(()=>e.unref(n.rowCount)??3),c=e.computed(()=>e.unref(n.paddingX)??0),i=e.ref();function s(k){return Array.isArray(k)}const d=e.ref([]),f=e.computed(()=>{const k=d.value;return Array.from(k).map(w=>Il(w))}),u=e.computed(()=>{var k,w;return n.itemWidth?e.unref(n.itemWidth)*a.value+l.value*(a.value-1)+c.value*2:n.wrapperWidth?e.unref(n.wrapperWidth):((w=(k=i.value)==null?void 0:k.parentElement)==null?void 0:w.clientWidth)??0}),m=e.computed(()=>n.itemWidth?e.unref(n.itemWidth):(u.value-c.value*2-l.value*(a.value-1))/a.value);function g(k,w,E,_){const y=e.unref(k),S=Array.from({length:e.unref(w)}).fill(0),M=[],x=Math.max(0,u.value-e.unref(_)*2-m.value*y.length-e.unref(E)*y.length)/2;for(let $=0;$<y.length;$++){const A=y[$],V=S.indexOf(Math.min(...S)),N=V*(m.value+e.unref(E))+e.unref(_)+x,R=S[V];M.push({x:N,y:R,width:A.width.value,height:A.height.value}),S[V]+=A.height.value+e.unref(E)}return M}const C=e.computed(()=>g(f,a,l,c)),p=e.computed(()=>s(C.value)?Math.max(...C.value.map(k=>k.y+k.height)):0),b=e.computed(()=>{var k;return((k=o.default)==null?void 0:k.call(o))??[]}),v=e.computed(()=>{const k=[];return b.value.forEach(w=>{s(w.children)?w.children.forEach(E=>{k.push(E)}):k.push(w)}),k});function h(k){if(!s(C.value))return{};const w=C.value[k];return w?{left:`${w.x??0}px`,top:`${w.y??0}px`,maxWidth:`${m.value}px`}:{}}return r({width:m}),(k,w)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:i,style:e.normalizeStyle({position:"relative",overflowX:"clip",width:`${u.value}px`,height:`${p.value}px`,overflow:"scroll"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(E,_)=>(e.openBlock(),e.createElementBlock("div",{key:_,ref_for:!0,ref_key:"itemsRef",ref:d,style:e.normalizeStyle([h(_),{position:"absolute"}])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(E),{style:e.normalizeStyle({width:`${m.value}px`})},null,8,["style"]))],4))),128))],4))}}),Ll=e.defineComponent({__name:"VirtualWaterfall",props:{gap:{},wrapperWidth:{},itemWidth:{},rowCount:{},paddingX:{},is:{},items:{},rangeExpand:{}},setup(t,{expose:r}){const n=t,o=e.computed(()=>e.unref(n.rangeExpand)??0),l=e.useSlots(),a=e.computed(()=>e.unref(n.gap)??16),c=e.computed(()=>e.unref(n.rowCount)??3),i=e.computed(()=>e.unref(n.paddingX)??0),s=e.ref(),d=e.computed(()=>s.value&&s.value.$el?s.value.$el:s.value);function f(x){return Array.isArray(x)}const u=e.computed(()=>{var x,$;return n.itemWidth?e.unref(n.itemWidth)*c.value+a.value*(c.value-1)+i.value*2:n.wrapperWidth?e.unref(n.wrapperWidth):(($=(x=d.value)==null?void 0:x.parentElement)==null?void 0:$.clientWidth)??0}),m=e.computed(()=>n.itemWidth?e.unref(n.itemWidth):(u.value-i.value*2-a.value*(c.value-1))/c.value),g=e.computed(()=>e.unref(n.items).map(x=>{const $=m.value/x.width;return{width:m.value,height:x.height*$}}));function C(x,$,A,V){const N=e.unref(x),R=Array.from({length:e.unref($)}).fill(0),F=[],T=Math.max(0,u.value-e.unref(V)*2-m.value*N.length-e.unref(A)*N.length)/2;for(let I=0;I<N.length;I++){const U=N[I],ee=R.indexOf(Math.min(...R)),ge=ee*(m.value+e.unref(A))+e.unref(V)+T,Ol=R[ee];F.push({x:ge,y:Ol,width:U.width,height:U.height}),R[ee]+=U.height+e.unref(A)}return F}const p=e.computed(()=>C(g,c,a,i)),b=e.computed(()=>f(p.value)?Math.max(...p.value.map(x=>x.y+x.height)):0),v=e.computed(()=>{var x;return((x=l.default)==null?void 0:x.call(l))??[]});function h(x){if(!f(p.value))return{};const $=p.value[x];return $?{left:`${$.x??0}px`,top:`${$.y??0}px`,maxWidth:`${m.value}px`}:{}}const k=e.ref(!1),w=e.computed(()=>k.value?"smooth":"auto"),E=Dl(d,{behavior:w}),_=e.computed(()=>{var x;return[E.y.value-o.value,E.y.value+(((x=d.value)==null?void 0:x.clientHeight)??0)+o.value]}),y=e.computed(()=>p.value.map(x=>{const $=x.y,A=x.y+x.height;return $>=_.value[0]&&$<=_.value[1]||A>=_.value[0]&&A<=_.value[1]||$<=_.value[0]&&A>=_.value[1]})),S=e.computed(()=>{const x=[];return v.value.forEach(($,A)=>{if(f($.children))$.children.forEach((V,N)=>{y.value[N]&&x.push([V,N])});else{if(!y.value[A])return;x.push([$,A])}}),x});r({scroll:E,scrollTo:(x,$=!1)=>{const A=k.value;k.value=$,E.y.value=x,k.value=A}});const M=e.computed(()=>n.is??"div");return(x,$)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(M.value),{ref_key:"wrapper",ref:s,style:{position:"relative"}},{default:e.withCtx(()=>[e.createElementVNode("div",{style:e.normalizeStyle({height:`${b.value}px`,width:`${u.value}px`,margin:"0 auto",position:"relative"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,([A,V])=>(e.openBlock(),e.createElementBlock("div",{key:A,style:e.normalizeStyle([h(V),{position:"absolute"}])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(A),{style:e.normalizeStyle({width:`${m.value}px`})},null,8,["style"]))],4))),128))],4)]),_:1},512))}});B.AspectRatio=ln,B.Avatar=jt,B.Btn=We,B.BtnGroup=jr,B.COLOR_LIGHTNESS_MAP=Y,B.ChatContainer=qr,B.ChatMessage=Kr,B.ChatSystem=Zr,B.Chip=Qr,B.ColorInput=ro,B.ColorSwatch=Xt,B.Drawer=io,B.Dropzone=co,B.FullscreenOverlay=je,B.Image=uo,B.Indicator=mo,B.Menu=So,B.MenuItem=Gt,B.Modal=Co,B.ModalSystem=Eo,B.Notification=Kt,B.NotificationSystem=Ho,B.Notifications=An,B.Overlay=Jt,B.Paper=ft,B.PinInput=Lo,B.Popover=Oo,B.Progress=qt,B.Rating=qo,B.RokuProvider=Ko,B.SURFACE_LIGHTNESS_MAP=ce,B.SchemeSwitch=rl,B.ScrollArea=ol,B.Select=dl,B.SelectArea=fl,B.Slider=gl,B.Switch=Qt,B.TabItem=bl,B.Tabs=kl,B.Tag=wl,B.TextField=Zt,B.ThemeProvider=xl,B.Tooltip=vl,B.TreeList=Bl,B.VirtualWaterfall=Ll,B.Waterfall=Pl,B.borderCS=Pt,B.childrenElementMapSymbol=Ke,B.defaultTheme=at,B.directionSymbol=qe,B.errorColor=pe,B.errorColors=Ar,B.generateColors=be,B.generateColorsMap=xt,B.generateColorsObjMap=Z,B.getCSInner=Ve,B.primaryColor=de,B.primaryColors=$r,B.schemeSymbol=Nt,B.secondaryColor=fe,B.secondaryColors=zr,B.surfaceColor=ne,B.surfaceColors=Tr,B.tabCurrentSymbol=Ge,B.tabValueListSymbol=Tn,B.tertiaryColor=me,B.tertiaryColors=Vr,B.useButtonCS=Fe,B.useCS=L,B.useClientHeight=At,B.useColorCS=Ae,B.useColors=ae,B.useContainerCS=Ce,B.useContainerDefaultCS=Le,B.useContainerDefaultVariantCS=it,B.useContainerFilledCS=_e,B.useContainerLightCS=Wt,B.useCurrentThemeData=Tt,B.useCurrentThemeName=br,B.useCurrentThemeScheme=yr,B.useId=De,B.useIndicatorFilledCS=Ft,B.useInputColorStyle=ct,B.useMergedCS=Be,B.useNotifications=Ue,B.useOutlineCS=Oe,B.useRootTheme=gr,B.useRounded=O,B.useSchemeString=Rt,B.useScrollHeight=Vt,B.useSurfaceCS=Ee,B.useSurfaceColors=Ot,B.useTextCS=Lt,B.useThemeData=Ht,B.useThemeStyles=nt,Object.defineProperty(B,Symbol.toStringTag,{value:"Module"})});