@contentstudio/ui 0.1.2 → 0.1.3

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(z,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(z=typeof globalThis<"u"?globalThis:z||self,e(z.ContentStudioDesignSystem={},z.Vue))})(this,function(z,e){"use strict";const fe={primary:{base:"blue",light:"50",main:"600",dark:"700",hover:"700",border:"200",focus:"500"},secondary:{base:"gray",light:"50",main:"600",dark:"700",hover:"700",border:"200",focus:"500"},success:{base:"green",light:"50",main:"600",dark:"700",hover:"700",border:"200",focus:"500"},warning:{base:"yellow",light:"50",main:"600",dark:"700",hover:"700",border:"200",focus:"500"},danger:{base:"red",light:"50",main:"600",dark:"700",hover:"700",border:"200",focus:"500"},info:{base:"sky",light:"50",main:"600",dark:"700",hover:"700",border:"200",focus:"500"},dark:{base:"gray",light:"100",main:"900",dark:"950",hover:"800",border:"300",focus:"700"},light:{base:"gray",light:"50",main:"100",dark:"200",hover:"200",border:"200",focus:"300"}},H=(o,t,n={})=>{const{hover:l=!1,active:s=!1,focus:a=!1,disabled:i=!1}=n;if(i)return"bg-gray-100 border-gray-200 text-gray-400 cursor-not-allowed";const r=fe[o];if(!r||t==="default")return"";const c=[];switch(t){case"filled":c.push(`bg-${r.base}-${r.main}`),c.push("text-white"),l&&c.push(`hover:bg-${r.base}-${r.hover}`),s&&c.push(`active:bg-${r.base}-${r.dark}`),a&&c.push(`focus:ring-${r.base}-${r.focus}/20`);break;case"light":c.push(`bg-${r.base}-${r.light}`),c.push(`text-${r.base}-${r.main}`),c.push(`border border-${r.base}-${r.border}`),l&&c.push(`hover:bg-${r.base}-100`),s&&c.push(`active:bg-${r.base}-200`),a&&c.push(`focus:ring-${r.base}-${r.focus}/20`);break;case"outline":c.push("bg-white"),c.push(`text-${r.base}-${r.main}`),c.push(`border-2 border-${r.base}-${r.main}`),l&&c.push(`hover:bg-${r.base}-50`),s&&c.push(`active:bg-${r.base}-100`),a&&c.push(`focus:ring-${r.base}-${r.focus}/20`);break;case"subtle":c.push(`text-${r.base}-${r.main}`),l&&c.push(`hover:bg-${r.base}-50`),s&&c.push(`active:bg-${r.base}-100`),a&&c.push(`focus:ring-${r.base}-${r.focus}/20`);break;case"white":c.push("bg-white text-gray-900"),l&&c.push("hover:bg-gray-50"),s&&c.push("active:bg-gray-100"),a&&c.push("focus:ring-gray-200");break;case"dot":c.push(`bg-${r.base}-${r.main}`);break;case"bordered":c.push("bg-white"),c.push(`text-${r.base}-${r.main}`),c.push(`border border-${r.base}-${r.border}`),l&&c.push(`hover:bg-${r.base}-50 hover:border-${r.base}-${r.main}`),s&&c.push(`active:bg-${r.base}-100`),a&&c.push(`focus:ring-${r.base}-${r.focus}/20`);break;case"bordered-transparent":c.push("bg-transparent"),c.push(`text-${r.base}-${r.main}`),c.push(`border border-${r.base}-${r.border}`),l&&c.push(`hover:bg-${r.base}-50/10 hover:border-${r.base}-${r.main}`),s&&c.push(`active:bg-${r.base}-100/20`),a&&c.push(`focus:ring-${r.base}-${r.focus}/20`);break}return c.join(" ")},et=(o,t)=>{if(t==="filled")return"text-white";const n=fe[o];return`text-${n.base}-${n.main}`},tt=(o,t)=>{if(t==="filled")return"text-white";const n=fe[o];return`text-${n.base}-${n.main}`},ot=o=>{const t=["shadow-sm","transition-all duration-200"];switch(o){case"filled":t.push("border-transparent");break;case"light":t.push("border");break;case"outline":t.push("border-2");break;case"subtle":t.push("shadow-none");break;case"white":t.push("border");break;default:t.push("border")}return t.join(" ")},ue={button:{xs:{padding:{x:"px-2",y:"py-1"},text:"text-xs",icon:"w-3 h-3"},sm:{padding:{x:"px-3",y:"py-1.5"},text:"text-sm",icon:"w-4 h-4"},md:{padding:{x:"px-4",y:"py-2"},text:"text-base",icon:"w-5 h-5"},lg:{padding:{x:"px-5",y:"py-2.5"},text:"text-lg",icon:"w-6 h-6"},xl:{padding:{x:"px-6",y:"py-3"},text:"text-xl",icon:"w-7 h-7"}},badge:{xs:{padding:{x:"px-2",y:"py-0.5"},text:"text-xs",icon:"w-3 h-3"},sm:{padding:{x:"px-2.5",y:"py-1"},text:"text-sm",icon:"w-3.5 h-3.5"},md:{padding:{x:"px-3",y:"py-1.5"},text:"text-base",icon:"w-4 h-4"},lg:{padding:{x:"px-4",y:"py-2"},text:"text-lg",icon:"w-5 h-5"},xl:{padding:{x:"px-5",y:"py-2.5"},text:"text-xl",icon:"w-6 h-6"}},input:{xs:{padding:{x:"px-2",y:"py-1"},text:"text-xs",height:"h-7"},sm:{padding:{x:"px-3",y:"py-1.5"},text:"text-sm",height:"h-8"},md:{padding:{x:"px-3",y:"py-2"},text:"text-base",height:"h-10"},lg:{padding:{x:"px-4",y:"py-2.5"},text:"text-lg",height:"h-11"},xl:{padding:{x:"px-4",y:"py-3"},text:"text-xl",height:"h-12"}},notification:{xs:{padding:{x:"px-3",y:"py-2"},text:"text-xs"},sm:{padding:{x:"px-4",y:"py-2.5"},text:"text-sm"},md:{padding:{x:"px-4",y:"py-3"},text:"text-base"},lg:{padding:{x:"px-5",y:"py-4"},text:"text-lg"},xl:{padding:{x:"px-6",y:"py-5"},text:"text-xl"}},switch:{xs:{padding:{x:"px-0",y:"py-0"},text:"text-xs",height:"h-4"},sm:{padding:{x:"px-0",y:"py-0"},text:"text-sm",height:"h-5"},md:{padding:{x:"px-0",y:"py-0"},text:"text-base",height:"h-6"},lg:{padding:{x:"px-0",y:"py-0"},text:"text-lg",height:"h-7"},xl:{padding:{x:"px-0",y:"py-0"},text:"text-xl",height:"h-8"}},chip:{xs:{padding:{x:"px-1.5",y:"py-0.5"},text:"text-xs",icon:"w-2.5 h-2.5"},sm:{padding:{x:"px-2",y:"py-1"},text:"text-sm",icon:"w-3 h-3"},md:{padding:{x:"px-2.5",y:"py-1.5"},text:"text-base",icon:"w-3.5 h-3.5"},lg:{padding:{x:"px-3",y:"py-2"},text:"text-lg",icon:"w-4 h-4"},xl:{padding:{x:"px-3.5",y:"py-2.5"},text:"text-xl",icon:"w-4.5 h-4.5"}},checkbox:{xs:{padding:{x:"px-0",y:"py-0"},text:"text-xs",icon:"w-2 h-2"},sm:{padding:{x:"px-0",y:"py-0"},text:"text-sm",icon:"w-2.5 h-2.5"},md:{padding:{x:"px-0",y:"py-0"},text:"text-base",icon:"w-3 h-3"},lg:{padding:{x:"px-0",y:"py-0"},text:"text-lg",icon:"w-4 h-4"},xl:{padding:{x:"px-0",y:"py-0"},text:"text-xl",icon:"w-5 h-5"}},indicator:{xs:{padding:{x:"px-0.5",y:"py-0.5"},text:"text-[10px]",height:"h-3.5 min-w-3.5"},sm:{padding:{x:"px-1",y:"py-0.5"},text:"text-[11px]",height:"h-4 min-w-4"},md:{padding:{x:"px-1.5",y:"py-0.5"},text:"text-xs",height:"h-5 min-w-5"},lg:{padding:{x:"px-2",y:"py-0.5"},text:"text-xs",height:"h-6 min-w-6"},xl:{padding:{x:"px-2.5",y:"py-0.5"},text:"text-sm",height:"h-7 min-w-7"}},progress:{xs:{padding:{x:"px-0",y:"py-0"},text:"text-xs",height:"h-1"},sm:{padding:{x:"px-0",y:"py-0"},text:"text-sm",height:"h-1.5"},md:{padding:{x:"px-0",y:"py-0"},text:"text-base",height:"h-2"},lg:{padding:{x:"px-0",y:"py-0"},text:"text-sm",height:"h-6"},xl:{padding:{x:"px-0",y:"py-0"},text:"text-base",height:"h-8"}},alert:{xs:{padding:{x:"px-3",y:"py-2"},text:"text-xs",icon:"w-4 h-4"},sm:{padding:{x:"px-3",y:"py-2.5"},text:"text-sm",icon:"w-5 h-5"},md:{padding:{x:"px-4",y:"py-3"},text:"text-base",icon:"w-5 h-5"},lg:{padding:{x:"px-5",y:"py-4"},text:"text-lg",icon:"w-6 h-6"},xl:{padding:{x:"px-6",y:"py-5"},text:"text-xl",icon:"w-7 h-7"}}},L=(o,t)=>{const n=ue[t][o];return[n.padding.x,n.padding.y,n.text].filter(Boolean).join(" ")},Ne=(o,t)=>ue[t][o].icon||"",me=(o,t)=>ue[t][o].height||"",De=o=>{switch(o){case"xs":return"text-xs";case"sm":return"text-sm";case"md":return"text-base";case"lg":return"text-lg";case"xl":return"text-xl";default:return"text-base"}},Pe=o=>{switch(o){case"xs":return"space-x-1";case"sm":return"space-x-2";case"md":return"space-x-3";case"lg":return"space-x-4";case"xl":return"space-x-5";default:return"space-x-3"}},K=o=>{const t=[];return o.disabled&&t.push("opacity-50 cursor-not-allowed pointer-events-none"),o.loading&&t.push("cursor-wait"),o.active&&t.push("ring-2 ring-offset-2"),o.error&&t.push("border-red-300 focus:ring-red-500/20 focus:border-red-500"),o.success&&t.push("border-green-300 focus:ring-green-500/20 focus:border-green-500"),t.join(" ")},nt=o=>{const t=[];return o.valid&&t.push("border-green-300 focus:ring-green-500/20 focus:border-green-500"),o.invalid&&t.push("border-red-300 focus:ring-red-500/20 focus:border-red-500"),o.pending&&t.push("border-yellow-300 focus:ring-yellow-500/20 focus:border-yellow-500"),t.join(" ")},st=(o,t="primary")=>{const n=[];return o.hover&&n.push(`hover:bg-${t}-50`),o.active&&n.push(`active:bg-${t}-100`),o.focus&&n.push(`focus:outline-none focus:ring-2 focus:ring-${t}-500/20 focus:border-${t}-500`),n.join(" ")},lt=["disabled","type"],rt={key:1,class:"mr-2"},at=e.defineComponent({__name:"Button",props:{variant:{default:"filled"},color:{default:"primary"},size:{default:"md"},radius:{default:"md"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},fullWidth:{type:Boolean,default:!1},type:{default:"button"},leftSection:{},rightSection:{},leftSectionProps:{},rightSectionProps:{},gradient:{}},emits:["click"],setup(o,{emit:t}){const n=o,l=t,s=r=>{!n.disabled&&!n.loading&&l("click",r)},a=r=>({none:"rounded-none",xs:"rounded",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",xl:"rounded-2xl",full:"rounded-full"})[r]||"rounded-lg",i=e.computed(()=>{const r="inline-flex items-center justify-center font-medium transition-all duration-200",c=H(n.color,n.variant,{hover:!0,active:!0,focus:!0}),d=L(n.size,"button"),p=n.leftSection||n.rightSection?Ne(n.size,"button"):"",f=K({disabled:n.disabled,loading:n.loading}),h=a(n.radius);return[r,c,d,p,f,h,{"w-full":n.fullWidth,"cursor-pointer":!n.disabled&&!n.loading}]});return(r,c)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(i.value),disabled:r.disabled||r.loading,type:r.type,onClick:s},[r.leftSection?(e.openBlock(),e.createElementBlock("span",e.mergeProps({key:0},r.leftSectionProps,{class:"mr-2"}),[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.leftSection)))],16)):e.createCommentVNode("",!0),r.loading?(e.openBlock(),e.createElementBlock("span",rt,[e.renderSlot(r.$slots,"loader",{},()=>[c[0]||(c[0]=e.createElementVNode("svg",{class:"animate-spin h-4 w-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[e.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),e.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1))])])):e.createCommentVNode("",!0),e.renderSlot(r.$slots,"default"),r.rightSection?(e.openBlock(),e.createElementBlock("span",e.mergeProps({key:2},r.rightSectionProps,{class:"ml-2"}),[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.rightSection)))],16)):e.createCommentVNode("",!0)],10,lt))}}),_e=o=>{const t=["relative"];o.fullWidth&&t.push("w-full");const n=K({disabled:o.disabled,error:o.error,required:o.required||o.withAsterisk});return n&&t.push(n),t.join(" ")},Ae=o=>{const t=["block","font-medium","mb-1"];switch(o.size){case"xs":t.push("text-xs");break;case"sm":t.push("text-sm");break;case"lg":t.push("text-lg");break;case"xl":t.push("text-xl");break;default:t.push("text-sm")}return o.error?t.push("text-red-500"):o.disabled?t.push("text-gray-400"):t.push("text-gray-700"),(o.required||o.withAsterisk)&&t.push('after:content-["*"] after:ml-0.5 after:text-red-500'),t.join(" ")},Re=o=>{const t=["mt-1","text-sm"];return o.error?t.push("text-red-500"):o.disabled?t.push("text-gray-400"):t.push("text-gray-500"),t.join(" ")},it=["aria-checked","aria-disabled","onKeydown"],ct={key:2,class:"text-sm text-red-500 mt-0.5"},dt={name:"Checkbox"},pt=e.defineComponent({...dt,props:{modelValue:{type:[Boolean,Array],default:!1},value:{},id:{},label:{},color:{},size:{default:"md"},radius:{default:"sm"},labelPosition:{default:"right"},description:{},error:{},disabled:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},iconColor:{default:""},autoContrast:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(o,{emit:t}){const n=o,l=t,s=e.computed(()=>n.modelValue),a=()=>{if(n.disabled)return;const u=!s.value;l("update:modelValue",u),l("change",u)},i=()=>{a()},r=e.computed(()=>Ae({size:n.size,disabled:n.disabled,error:n.error})),c=e.computed(()=>Re({color:n.color})),d=e.computed(()=>["flex","flex-col",n.labelPosition==="left"?"order-first":""]),p=e.computed(()=>["inline-flex","items-center","justify-center","rounded-md","border","border-gray-300","cursor-pointer","transition-colors","duration-200","ease-in-out",n.size==="xs"?"h-3 w-3":"",n.size==="sm"?"h-4 w-4":"",n.size==="md"?"h-5 w-5":"",n.size==="lg"?"h-6 w-6":"",n.size==="xl"?"h-7 w-7":"",n.disabled?"opacity-50 cursor-not-allowed":"",s.value?"bg-primary-600 border-primary-600":"bg-white hover:border-primary-500"]),f=e.computed(()=>["text-white",n.size==="xs"?"h-2 w-2":"",n.size==="sm"?"h-3 w-3":"",n.size==="md"?"h-4 w-4":"",n.size==="lg"?"h-5 w-5":"",n.size==="xl"?"h-6 w-6":""]),h=e.computed(()=>_e({disabled:n.disabled,error:n.error}));return(u,y)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([h.value,"flex items-center gap-2"])},[e.createElementVNode("div",{class:e.normalizeClass(p.value),onClick:i,role:"checkbox","aria-checked":s.value,"aria-disabled":u.disabled,tabindex:"0",onKeydown:e.withKeys(e.withModifiers(i,["prevent"]),["space"])},[s.value&&!u.indeterminate?(e.openBlock(),e.createElementBlock("svg",{key:0,xmlns:"http://www.w3.org/2000/svg",class:e.normalizeClass(f.value),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"},y[0]||(y[0]=[e.createElementVNode("polyline",{points:"20 6 9 17 4 12"},null,-1)]),2)):e.createCommentVNode("",!0),u.indeterminate?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:"http://www.w3.org/2000/svg",class:e.normalizeClass(f.value),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"},y[1]||(y[1]=[e.createElementVNode("line",{x1:"5",y1:"12",x2:"19",y2:"12"},null,-1)]),2)):e.createCommentVNode("",!0)],42,it),u.label||u.description?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(d.value)},[u.label?(e.openBlock(),e.createElementBlock("label",{key:0,class:e.normalizeClass([r.value,"pt-0.5"]),onClick:i},e.toDisplayString(u.label),3)):e.createCommentVNode("",!0),u.description?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(c.value)},e.toDisplayString(u.description),3)):e.createCommentVNode("",!0),u.error?(e.openBlock(),e.createElementBlock("div",ct,e.toDisplayString(u.error),1)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0)],2))}}),ft=["aria-checked","aria-disabled"],ut=["id","checked","disabled","value"],mt=["for"],gt=e.defineComponent({__name:"Radio",props:{modelValue:{default:void 0},value:{default:void 0},id:{default:()=>`radio-${Math.random().toString(36).substr(2,9)}`},label:{},color:{default:"primary"},size:{default:"md"},labelPosition:{default:"right"},description:{},error:{},disabled:{type:Boolean,default:!1},iconColor:{}},emits:["update:modelValue","change"],setup(o,{emit:t}){const n=o,l=t,s=e.computed(()=>n.modelValue===n.value),a=()=>{n.disabled||(l("update:modelValue",n.value),l("change",n.value))},i=e.computed(()=>[_e({disabled:n.disabled,error:n.error}),"flex items-center gap-2",n.labelPosition==="left"?"flex-row-reverse":"flex-row"]),r=e.computed(()=>["relative flex items-center justify-center rounded-full border transition-colors duration-200",u.value,s.value?`bg-${n.color}-600 border-${n.color}-600`:"bg-white border-gray-300 hover:border-gray-400",n.disabled?"opacity-50 cursor-not-allowed":"cursor-pointer"]),c=e.computed(()=>["rounded-full bg-white",y.value,n.disabled?"opacity-50":""]),d=e.computed(()=>Ae({size:n.size,disabled:n.disabled,error:n.error})),p=e.computed(()=>Re({color:n.color})),f=e.computed(()=>["text-sm text-red-500 mt-1"]),h=e.computed(()=>["flex flex-col",n.disabled?"cursor-not-allowed":"cursor-pointer"]),u=e.computed(()=>({xs:"w-4 h-4",sm:"w-5 h-5",md:"w-6 h-6",lg:"w-8 h-8",xl:"w-10 h-10"})[n.size]),y=e.computed(()=>({xs:"w-2 h-2",sm:"w-2.5 h-2.5",md:"w-3 h-3",lg:"w-4 h-4",xl:"w-5 h-5"})[n.size]);return(m,x)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(i.value),onClick:a,"aria-checked":s.value,"aria-disabled":m.disabled,role:"radio"},[e.createElementVNode("input",{ref:"radio",type:"radio",id:m.id,checked:s.value,disabled:m.disabled,value:m.value,onChange:a,class:"sr-only"},null,40,ut),e.createElementVNode("div",{class:e.normalizeClass(r.value)},[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([c.value,"transition-transform duration-200 ease-in-out"])},null,2)):e.createCommentVNode("",!0)],2),e.createElementVNode("div",{class:e.normalizeClass(h.value)},[m.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:m.id,class:e.normalizeClass(d.value)},[e.renderSlot(m.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(m.label),1)])],10,mt)):e.createCommentVNode("",!0),m.description?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(p.value)},[e.renderSlot(m.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(m.description),1)])],2)):e.createCommentVNode("",!0),m.error?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(f.value)},[e.renderSlot(m.$slots,"error",{},()=>[e.createTextVNode(e.toDisplayString(m.error),1)])],2)):e.createCommentVNode("",!0)],2)],10,ft))}}),ht=["for"],yt={key:0,class:"text-red-500","aria-hidden":"true"},xt={class:"relative"},bt=["id","type","value","placeholder","disabled","required"],wt=e.defineComponent({__name:"TextInput",props:{id:{},type:{default:"text"},modelValue:{},placeholder:{},disabled:{type:Boolean,default:!1},label:{},labelProps:{},description:{},descriptionProps:{},error:{},errorProps:{},wrapperProps:{},inputProps:{},size:{default:"md"},radius:{default:"md"},rightSection:{},rightSectionProps:{},leftSection:{},leftSectionProps:{},withAsterisk:{type:Boolean,default:!1},required:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(o){const t=o,n=s=>({none:"rounded-none",xs:"rounded",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",xl:"rounded-2xl",full:"rounded-full"})[s]||"rounded-lg",l=e.computed(()=>{const s=["block w-full bg-white transition-all duration-200","border border-gray-200","text-gray-900","focus:outline-none focus:ring-2 focus:ring-offset-0 focus:border-transparent","placeholder:text-gray-400","shadow-sm"],a=L(t.size,"input"),i=L(t.size,"input"),r=K({disabled:t.disabled,error:t.withError||!!t.error}),c=n(t.radius),d={left:t.leftSection?"pl-10":"",right:t.rightSection?"pr-10":""},p=t.disabled?"":[t.withError||t.error?"focus:ring-red-500/20 focus:border-red-500":"focus:ring-blue-500/20 focus:border-blue-500","hover:border-gray-300"];return[...s,a,i,r,c,d.left,d.right,p].filter(Boolean).join(" ")});return(s,a)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({class:["relative flex flex-col",{"opacity-50 pointer-events-none":s.disabled}]},s.wrapperProps),[s.label?(e.openBlock(),e.createElementBlock("label",e.mergeProps({key:0,for:s.id,class:"mb-1 text-sm font-medium text-gray-700 flex items-center gap-1"},s.labelProps),[e.createTextVNode(e.toDisplayString(s.label)+" ",1),s.required||s.withAsterisk?(e.openBlock(),e.createElementBlock("span",yt,"*")):e.createCommentVNode("",!0)],16,ht)):e.createCommentVNode("",!0),e.createElementVNode("div",xt,[s.leftSection?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:0,class:"absolute inset-y-0 left-0 flex items-center pl-3"},s.leftSectionProps),[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.leftSection)))],16)):e.createCommentVNode("",!0),e.createElementVNode("input",e.mergeProps({id:s.id,type:s.type,value:s.modelValue,placeholder:s.placeholder,disabled:s.disabled,required:s.required,class:l.value,onInput:a[0]||(a[0]=i=>s.$emit("update:modelValue",i.target.value))},s.inputProps),null,16,bt),s.rightSection?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:1,class:"absolute inset-y-0 right-0 flex items-center pr-3"},s.rightSectionProps),[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.rightSection)))],16)):e.createCommentVNode("",!0)]),s.description?(e.openBlock(),e.createElementBlock("p",e.mergeProps({key:1,class:"mt-1 text-sm text-gray-500"},s.descriptionProps),e.toDisplayString(s.description),17)):e.createCommentVNode("",!0),s.error?(e.openBlock(),e.createElementBlock("p",e.mergeProps({key:2,class:"mt-1 text-sm text-red-500"},s.errorProps),e.toDisplayString(s.error),17)):e.createCommentVNode("",!0)],16))}}),kt=["aria-expanded","aria-disabled"],Ct=["placeholder","disabled"],Bt={key:1,class:"w-full truncate text-gray-900"},zt={class:"flex items-center gap-2 shrink-0"},$t={key:0,class:"py-3 text-center text-gray-500"},Et=["onClick"],St={key:0,class:"py-3 px-4 text-gray-500 text-center text-sm"},Vt=e.defineComponent({__name:"Select",props:{modelValue:{default:null},options:{default:()=>[]},placeholder:{default:"Select option"},disabled:{type:Boolean,default:!1},searchable:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},error:{type:Boolean,default:!1},size:{default:"md"},radius:{default:"sm"},variant:{default:"outline"},color:{default:"primary"},withCheckIcon:{type:Boolean,default:!0},checkIconPosition:{default:"right"},nothingFoundMessage:{default:"Nothing found..."}},emits:["update:modelValue","change"],setup(o,{emit:t}){const n=o,l=t,s=e.ref(!1),a=e.ref(""),i=e.ref(null),r=e.ref(null),c=g=>({none:"rounded-none",xs:"rounded",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",xl:"rounded-2xl",full:"rounded-full"})[g]||"rounded-lg",d=e.computed(()=>{const g="w-full flex items-center justify-between transition-colors duration-200",w=[L(n.size,"input"),me(n.size,"input")].join(" "),b=c(n.radius),k=n.error?"focus-within:ring-2 focus-within:ring-red-500/20 focus-within:border-red-500":"focus-within:ring-2 focus-within:ring-primary-500/20 focus-within:border-primary-500",S=n.variant==="filled"?`bg-gray-50 border border-transparent ${!n.disabled&&`hover:bg-gray-100 focus-within:bg-white focus-within:border-gray-300 ${k}`}`:`bg-white border border-gray-300 ${!n.disabled&&`hover:border-gray-400 ${k}`}`,B=K({disabled:n.disabled,error:n.error}),$=!n.disabled&&"cursor-pointer";return[g,w,b,S,B,$].filter(Boolean).join(" ")}),p=e.computed(()=>n.options.find(g=>g.value===n.modelValue)),f=e.computed(()=>{if(!a.value)return n.options;const g=a.value.toLowerCase();return n.options.filter(w=>w.label.toLowerCase().includes(g))}),h=()=>{var g;n.disabled||(n.searchable?((g=i.value)==null||g.focus(),s.value=!0):s.value=!s.value)},u=g=>{l("update:modelValue",g.value),l("change",g),s.value=!1,n.searchable&&(a.value=g.label)},y=()=>{l("update:modelValue",null),l("change",null),a.value=""},m=()=>{s.value||(s.value=!0)},x=()=>{s.value||(s.value=!0)},C=g=>{const w=g.target;r.value&&!r.value.contains(w)&&(s.value=!1)};return e.watch(()=>n.modelValue,g=>{g?p.value&&n.searchable&&(a.value=p.value.label):a.value=""}),e.onMounted(()=>{document.addEventListener("click",C)}),e.onUnmounted(()=>{document.removeEventListener("click",C)}),(g,w)=>(e.openBlock(),e.createElementBlock("div",{class:"relative select",ref_key:"selectRoot",ref:r},[e.createElementVNode("div",{class:e.normalizeClass(d.value),role:"combobox","aria-expanded":s.value,"aria-disabled":g.disabled,onClick:h},[g.searchable?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,ref_key:"searchInput",ref:i,"onUpdate:modelValue":w[0]||(w[0]=b=>a.value=b),placeholder:g.placeholder,type:"text",class:"w-full bg-transparent outline-none placeholder:text-gray-500",disabled:g.disabled,onFocus:m,onInput:x},null,40,Ct)),[[e.vModelText,a.value]]):(e.openBlock(),e.createElementBlock("div",Bt,e.toDisplayString(p.value?p.value.label:g.placeholder),1)),e.createElementVNode("div",zt,[g.clearable&&g.modelValue&&!g.disabled?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"p-1 hover:bg-gray-100 rounded-full text-gray-500 hover:text-gray-700",onClick:e.withModifiers(y,["stop"])},w[1]||(w[1]=[e.createElementVNode("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]))):e.createCommentVNode("",!0),(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["w-4 h-4 text-gray-500 transition-transform duration-200",{"rotate-180":s.value}]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},w[2]||(w[2]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 9l-7 7-7-7"},null,-1)]),2))])],10,kt),e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(["absolute w-full z-50 mt-1 bg-white","border border-gray-200",c(n.radius),"shadow-lg max-h-[240px] overflow-auto","divide-y divide-gray-100"])},[g.loading?(e.openBlock(),e.createElementBlock("div",$t,[e.renderSlot(g.$slots,"loader",{},()=>[w[3]||(w[3]=e.createElementVNode("svg",{class:"animate-spin h-5 w-5 mx-auto",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[e.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),e.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1))])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,b=>(e.openBlock(),e.createElementBlock("div",{key:b.value,class:e.normalizeClass(["py-2.5 px-4 flex items-center transition-colors duration-200","text-[14px] leading-5","text-gray-900",b.value===g.modelValue?"bg-gray-50 font-medium":"hover:bg-gray-50",b.disabled?"opacity-50 cursor-not-allowed":"cursor-pointer"]),onClick:k=>!b.disabled&&u(b)},[g.withCheckIcon&&b.value===g.modelValue?(e.openBlock(),e.createElementBlock("svg",{key:0,class:e.normalizeClass(["w-4 h-4 text-primary-600 shrink-0",g.checkIconPosition==="left"?"mr-2":"ml-2 order-last"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},w[4]||(w[4]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"},null,-1)]),2)):e.createCommentVNode("",!0),e.createElementVNode("span",{class:e.normalizeClass({"text-gray-500":b.disabled})},e.toDisplayString(b.label),3)],10,Et))),128)),f.value.length===0?(e.openBlock(),e.createElementBlock("div",St,e.toDisplayString(g.nothingFoundMessage||"No options found"),1)):e.createCommentVNode("",!0)],64))],2),[[e.vShow,s.value]])],512))}}),Nt=["disabled"],Dt={key:0,class:"w-3.5 h-3.5",viewBox:"0 0 20 20",fill:"currentColor"},Pt={key:1,class:"animate-spin"},_t=e.defineComponent({__name:"Chip",props:{modelValue:{type:Boolean,default:!1},label:{default:""},size:{default:"md"},variant:{default:"filled"},color:{default:"primary"},radius:{default:"xl"},checked:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},withRemoveButton:{type:Boolean,default:!1},withCheckIcon:{type:Boolean,default:!0},checkIconPosition:{default:"left"},allowDeselect:{type:Boolean,default:!0},loading:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(o,{emit:t}){const n=o,l=t,s=e.computed(()=>H(n.color)),a=e.computed(()=>L(n.size,"chip")),i=e.computed(()=>K({disabled:n.disabled,loading:n.loading})),r=e.computed(()=>H(n.color,"filled")),c=e.computed(()=>H(n.color,"outline")),d=()=>{n.disabled||n.loading||n.modelValue&&!n.allowDeselect||l("update:modelValue",!n.modelValue)};return(p,f)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["inline-flex items-center justify-center gap-2 rounded-full transition-colors duration-200 select-none","focus:outline-none",s.value,a.value,i.value,p.modelValue?r.value:c.value,"cursor-pointer"]),disabled:p.disabled||p.loading,onClick:d},[p.withCheckIcon&&p.modelValue?(e.openBlock(),e.createElementBlock("svg",Dt,f[0]||(f[0]=[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z","clip-rule":"evenodd"},null,-1)]))):e.createCommentVNode("",!0),p.loading?(e.openBlock(),e.createElementBlock("span",Pt,f[1]||(f[1]=[e.createElementVNode("svg",{class:"w-3.5 h-3.5",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[e.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),e.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1)]))):e.createCommentVNode("",!0),e.createElementVNode("span",{class:e.normalizeClass(["whitespace-nowrap",p.loading?"opacity-75":""])},e.toDisplayString(p.label),3)],10,Nt))}}),At=(o,t=0)=>{const n={position:"absolute",transform:"translate(50%, -50%)"},[l,s]=o.split("-");if(l==="top"?n.top="0":l==="bottom"?(n.bottom="0",n.transform="translate(50%, 50%)"):l==="middle"&&(n.top="50%",s==="start"?n.transform="translate(-50%, -50%)":s==="end"?n.transform="translate(50%, -50%)":n.transform="translate(0, -50%)"),s==="start"?(n.left="0",n.transform=l==="bottom"?"translate(-50%, 50%)":"translate(-50%, -50%)"):s==="end"?n.right="0":s==="center"&&(n.left="50%",n.transform=l==="bottom"?"translate(-50%, 50%)":"translate(-50%, -50%)"),t){const a=n.transform.includes("50%")?"50%":"0",i=n.transform.includes("-50%")?"-50%":"50%";(l==="top"||l==="bottom")&&(n.transform=`translate(${a}, ${i}) translateY(${t}px)`),(s==="start"||s==="end")&&(n.transform=`translate(${a}, ${i}) translateX(${s==="start"?-t:t}px)`)}return n},Rt={name:"Indicator"},Tt=e.defineComponent({...Rt,props:{position:{default:"top-end"},size:{default:"md"},radius:{default:"xl"},color:{default:"primary"},variant:{default:"filled"},offset:{default:0},inline:{type:Boolean,default:!1},label:{default:""},withBorder:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},processing:{type:Boolean,default:!1},zIndex:{default:200}},setup(o){const t=o,n=e.computed(()=>[t.inline?"inline-block":"block","relative"]),l=e.computed(()=>({...t.inline&&{display:"inline-block"}})),s=e.computed(()=>["flex items-center justify-center","absolute","select-none","rounded-full",me(t.size,"indicator"),L(t.size,"indicator"),!t.disabled&&`bg-${t.color==="primary"?"blue":t.color}-600 text-white`,t.disabled&&"bg-gray-200 text-gray-500",t.withBorder&&"border-2 border-white dark:border-gray-900",t.processing&&"animate-pulse"]),a=e.computed(()=>({...At(t.position,t.offset),zIndex:t.zIndex}));return(i,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(n.value),style:e.normalizeStyle(l.value)},[i.disabled?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(s.value),style:e.normalizeStyle(a.value)},e.toDisplayString(i.label),7)),e.renderSlot(i.$slots,"default",{},void 0,!0)],6))}}),Go="",Ot=((o,t)=>{const n=o.__vccOpts||o;for(const[l,s]of t)n[l]=s;return n})(Tt,[["__scopeId","data-v-643e9acf"]]),Lt=["aria-valuenow"],Mt=e.defineComponent({__name:"Progress",props:{value:{default:0},size:{default:"md"},color:{},label:{},striped:{type:Boolean,default:!1},animated:{type:Boolean,default:!1}},setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["relative w-full rounded-sm overflow-hidden","bg-gray-100",e.unref(me)(t.size,"progress")]),role:"progressbar","aria-valuenow":t.value,"aria-valuemin":"0","aria-valuemax":"100"},[e.createElementVNode("div",{class:e.normalizeClass(["h-full transition-all duration-300 ease-in-out",e.unref(H)(t.color||"primary","filled"),{"bg-striped":t.striped&&!t.animated,"bg-striped animate-progress":t.animated}]),style:e.normalizeStyle({width:`${t.value}%`})},[t.label&&(t.size==="lg"||t.size==="xl")?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["block px-2 py-1 text-white whitespace-nowrap font-medium leading-none",e.unref(De)(t.size)])},e.toDisplayString(t.label),3)):e.createCommentVNode("",!0)],6)],10,Lt))}}),Qo="",It={key:0,class:"flex-shrink-0"},jt={key:0,class:"flex items-center justify-between"},Ft={key:1,class:"flex-shrink-0 ml-3"},Ht=["disabled"],Wt=e.defineComponent({__name:"Alert",props:{title:{},message:{},icon:{},variant:{default:"default"},color:{default:"primary"},size:{default:"md"},closable:{type:Boolean,default:!1},onClose:{},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},valid:{type:Boolean,default:void 0},invalid:{type:Boolean,default:void 0}},emits:["close"],setup(o,{emit:t}){const n=o,l=t,s=e.computed(()=>H(n.color,n.variant,{hover:!1,active:!1,focus:!1,disabled:n.disabled})),a=e.computed(()=>ot(n.variant)),i=e.computed(()=>et(n.color,n.variant)),r=e.computed(()=>tt(n.color,n.variant)),c=e.computed(()=>L(n.size,"alert")),d=e.computed(()=>Ne(n.size,"alert")),p=e.computed(()=>De(n.size)),f=e.computed(()=>Pe(n.size)),h=e.computed(()=>K({disabled:n.disabled,loading:n.loading})),u=e.computed(()=>nt({valid:n.valid,invalid:n.invalid})),y=e.computed(()=>st({hover:!0,focus:!0},n.color)),m=()=>{l("close")};return(x,C)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["relative rounded-md",a.value,s.value,c.value,h.value,u.value]),role:"alert"},[e.createElementVNode("div",{class:e.normalizeClass(["flex items-start",[f.value]])},[x.icon?(e.openBlock(),e.createElementBlock("div",It,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(x.icon),{class:e.normalizeClass([d.value,i.value])},null,8,["class"]))])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["flex-grow",[x.icon&&"ml-3"]])},[x.title?(e.openBlock(),e.createElementBlock("div",jt,[e.createElementVNode("h3",{class:e.normalizeClass(["font-medium",r.value])},e.toDisplayString(x.title),3)])):e.createCommentVNode("",!0),x.message?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["mt-1",x.variant==="filled"?"text-white/90":"text-gray-600",p.value])},e.toDisplayString(x.message),3)):e.createCommentVNode("",!0),e.renderSlot(x.$slots,"default")],2),x.closable?(e.openBlock(),e.createElementBlock("div",Ft,[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["inline-flex rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2",[x.variant==="filled"?"text-white/80 hover:text-white focus:ring-white":"text-gray-400 hover:text-gray-500 focus:ring-primary-500",y.value]]),disabled:x.disabled,onClick:m},C[0]||(C[0]=[e.createElementVNode("span",{class:"sr-only"},"Close",-1),e.createElementVNode("svg",{class:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{d:"M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z"})],-1)]),10,Ht)])):e.createCommentVNode("",!0)],2)],2))}}),qt=e.defineComponent({__name:"Collapse",props:{open:{type:Boolean,default:!1},duration:{default:200},class:{},size:{default:"md"},disableTransition:{type:Boolean,default:!1}},setup(o){const t=o,n=e.ref(null),l=e.ref(null),s={xs:"p-1",sm:"p-2",md:"p-3",lg:"p-4",xl:"p-5"},a=e.computed(()=>Pe(t.size)),i=e.computed(()=>s[t.size]),r=e.computed(()=>t.disableTransition?"":`transition-[height] ease-in-out duration-${t.duration}`),c=e.computed(()=>({enter:t.duration,leave:t.duration})),d=m=>{m.style.height="0",m.style.overflow="hidden"},p=m=>{const x=m.scrollHeight;m.style.height="0",m.offsetHeight,m.style.height=`${x}px`},f=m=>{m.style.height="",m.style.overflow=""},h=m=>{m.style.height=`${m.scrollHeight}px`,m.style.overflow="hidden",m.offsetHeight},u=m=>{m.style.height="0"},y=m=>{m.style.height="",m.style.overflow=""};return(m,x)=>(e.openBlock(),e.createBlock(e.Transition,{duration:c.value,onBeforeEnter:d,onEnter:p,onAfterEnter:f,onBeforeLeave:h,onLeave:u,onAfterLeave:y},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(["overflow-hidden",a.value,r.value,t.class]),ref_key:"contentRef",ref:n},[e.createElementVNode("div",{ref_key:"innerRef",ref:l,class:e.normalizeClass(i.value)},[e.renderSlot(m.$slots,"default")],2)],2),[[e.vShow,m.open]])]),_:3},8,["duration"]))}}),Yt={class:"inline-block"},Kt=e.defineComponent({__name:"OvalLoader",props:{size:{default:"md"}},setup(o){const t={xs:"12px",sm:"16px",md:"24px",lg:"36px",xl:"48px"},n=o,l=e.computed(()=>{const s=parseInt(t[n.size]);return`${Math.max(2,s/12)}px`});return(s,a)=>(e.openBlock(),e.createElementBlock("span",Yt,[e.createElementVNode("span",{class:"inline-block rounded-full border-solid border-r-transparent border-current animate-[oval-spin_1.2s_linear_infinite]",style:e.normalizeStyle({width:t[n.size],height:t[n.size],borderWidth:l.value})},null,4)]))}}),Jo="",Xt=e.defineComponent({__name:"DotsLoader",props:{size:{default:"md"}},setup(o){const t={xs:"12px",sm:"16px",md:"24px",lg:"36px",xl:"48px"},n=o,l=e.computed(()=>`${parseInt(t[n.size])/3}px`),s=e.computed(()=>`${parseInt(t[n.size])/6}px`);return(a,i)=>(e.openBlock(),e.createElementBlock("span",{class:"inline-flex items-center",style:e.normalizeStyle({gap:s.value,height:t[n.size]})},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(3,r=>e.createElementVNode("span",{key:r,class:"inline-block rounded-full animate-[dots-pulse_0.8s_infinite_linear] bg-current",style:e.normalizeStyle({width:l.value,height:l.value,animationDelay:`${(r-1)*.16}s`,opacity:1})},null,4)),64))],4))}}),Zo="",Gt=e.defineComponent({__name:"BarsLoader",props:{size:{default:"md"}},setup(o){const t={xs:"12px",sm:"16px",md:"24px",lg:"36px",xl:"48px"},n=o,l=e.computed(()=>`${parseInt(t[n.size])/6}px`);return(s,a)=>(e.openBlock(),e.createElementBlock("span",{class:"inline-flex",style:e.normalizeStyle({gap:l.value,width:t[n.size],height:`${parseInt(t[n.size])/2}px`})},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(3,i=>e.createElementVNode("span",{key:i,class:"flex-1 rounded-[2px] animate-[bars-scale_1.2s_cubic-bezier(0,0.5,0.5,1)_infinite] bg-current",style:e.normalizeStyle({animationDelay:`${(i-1)*-.12}s`,opacity:1})},null,4)),64))],4))}}),vo="",Ut=e.defineComponent({__name:"Loader",props:{variant:{default:"oval"},color:{default:"primary"},size:{default:"md"},class:{}},setup(o){const t=o,n=i=>/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(i),l=e.computed(()=>!t.color||n(t.color)?"":{primary:"text-primary-500",secondary:"text-gray-500",success:"text-green-500",warning:"text-yellow-500",danger:"text-red-500",info:"text-blue-500",dark:"text-gray-900",light:"text-white"}[t.color]||""),s=e.computed(()=>!t.color||!n(t.color)?{}:{color:t.color}),a=e.computed(()=>{switch(t.variant){case"dots":return Xt;case"bars":return Gt;default:return Kt}});return(i,r)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.value),{class:e.normalizeClass(["inline-block",l.value,t.class]),style:e.normalizeStyle(s.value),size:t.size},null,8,["class","style","size"]))}}),Qt={class:"p-4"},Jt={key:0,class:"absolute top-2 right-2"},Zt={key:1,class:"text-lg font-medium mb-2"},vt={key:2},eo=e.defineComponent({__name:"Dialog",props:{title:{},content:{},opened:{type:Boolean},size:{default:"md"},withCloseButton:{type:Boolean,default:!0},onClose:{},position:{default:()=>({bottom:"20px",right:"20px"})},keepMounted:{type:Boolean,default:!1},zIndex:{default:1e3}},setup(o){const t=o,n=e.computed(()=>({xs:"w-[280px]",sm:"w-[320px]",md:"w-[380px]",lg:"w-[440px]",xl:"w-[520px]"})[t.size]);return(l,s)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{"enter-active-class":"transition duration-200 ease-out","enter-from-class":"opacity-0 scale-95","enter-to-class":"opacity-100 scale-100","leave-active-class":"transition duration-200 ease-in","leave-from-class":"opacity-100 scale-100","leave-to-class":"opacity-0 scale-95"},{default:e.withCtx(()=>[l.opened||l.keepMounted?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle({position:"fixed",zIndex:l.zIndex||1e3,...l.position,display:l.opened?"block":"none"}),class:"min-w-[200px]"},[e.createElementVNode("div",{class:e.normalizeClass(["rounded-lg bg-white dark:bg-gray-800 shadow-lg border border-gray-200 dark:border-gray-700",[n.value]])},[e.createElementVNode("div",Qt,[l.withCloseButton?(e.openBlock(),e.createElementBlock("div",Jt,[e.createElementVNode("button",{onClick:s[0]||(s[0]=(...a)=>l.onClose&&l.onClose(...a)),class:"text-gray-400 hover:text-gray-500 dark:text-gray-500 dark:hover:text-gray-400 focus:outline-none"},s[1]||(s[1]=[e.createElementVNode("span",{class:"sr-only"},"Close",-1),e.createElementVNode("svg",{class:"h-5 w-5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)]))])):e.createCommentVNode("",!0),l.title?(e.openBlock(),e.createElementBlock("div",Zt,e.toDisplayString(l.title),1)):e.createCommentVNode("",!0),l.content?(e.openBlock(),e.createElementBlock("div",vt,e.toDisplayString(l.content),1)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"default")])],2)],4)):e.createCommentVNode("",!0)]),_:3})]))}}),v=Math.min,X=Math.max,re=Math.round,P=o=>({x:o,y:o}),to={left:"right",right:"left",bottom:"top",top:"bottom"},oo={start:"end",end:"start"};function ge(o,t,n){return X(o,v(t,n))}function ee(o,t){return typeof o=="function"?o(t):o}function W(o){return o.split("-")[0]}function te(o){return o.split("-")[1]}function Te(o){return o==="x"?"y":"x"}function he(o){return o==="y"?"height":"width"}function G(o){return["top","bottom"].includes(W(o))?"y":"x"}function ye(o){return Te(G(o))}function no(o,t,n){n===void 0&&(n=!1);const l=te(o),s=ye(o),a=he(s);let i=s==="x"?l===(n?"end":"start")?"right":"left":l==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=ae(i)),[i,ae(i)]}function so(o){const t=ae(o);return[xe(o),t,xe(t)]}function xe(o){return o.replace(/start|end/g,t=>oo[t])}function lo(o,t,n){const l=["left","right"],s=["right","left"],a=["top","bottom"],i=["bottom","top"];switch(o){case"top":case"bottom":return n?t?s:l:t?l:s;case"left":case"right":return t?a:i;default:return[]}}function ro(o,t,n,l){const s=te(o);let a=lo(W(o),n==="start",l);return s&&(a=a.map(i=>i+"-"+s),t&&(a=a.concat(a.map(xe)))),a}function ae(o){return o.replace(/left|right|bottom|top/g,t=>to[t])}function ao(o){return{top:0,right:0,bottom:0,left:0,...o}}function Oe(o){return typeof o!="number"?ao(o):{top:o,right:o,bottom:o,left:o}}function ie(o){const{x:t,y:n,width:l,height:s}=o;return{width:l,height:s,top:n,left:t,right:t+l,bottom:n+s,x:t,y:n}}function Le(o,t,n){let{reference:l,floating:s}=o;const a=G(t),i=ye(t),r=he(i),c=W(t),d=a==="y",p=l.x+l.width/2-s.width/2,f=l.y+l.height/2-s.height/2,h=l[r]/2-s[r]/2;let u;switch(c){case"top":u={x:p,y:l.y-s.height};break;case"bottom":u={x:p,y:l.y+l.height};break;case"right":u={x:l.x+l.width,y:f};break;case"left":u={x:l.x-s.width,y:f};break;default:u={x:l.x,y:l.y}}switch(te(t)){case"start":u[i]-=h*(n&&d?-1:1);break;case"end":u[i]+=h*(n&&d?-1:1);break}return u}const io=async(o,t,n)=>{const{placement:l="bottom",strategy:s="absolute",middleware:a=[],platform:i}=n,r=a.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let d=await i.getElementRects({reference:o,floating:t,strategy:s}),{x:p,y:f}=Le(d,l,c),h=l,u={},y=0;for(let m=0;m<r.length;m++){const{name:x,fn:C}=r[m],{x:g,y:w,data:b,reset:k}=await C({x:p,y:f,initialPlacement:l,placement:h,strategy:s,middlewareData:u,rects:d,platform:i,elements:{reference:o,floating:t}});p=g??p,f=w??f,u={...u,[x]:{...u[x],...b}},k&&y<=50&&(y++,typeof k=="object"&&(k.placement&&(h=k.placement),k.rects&&(d=k.rects===!0?await i.getElementRects({reference:o,floating:t,strategy:s}):k.rects),{x:p,y:f}=Le(d,h,c)),m=-1)}return{x:p,y:f,placement:h,strategy:s,middlewareData:u}};async function Me(o,t){var n;t===void 0&&(t={});const{x:l,y:s,platform:a,rects:i,elements:r,strategy:c}=o,{boundary:d="clippingAncestors",rootBoundary:p="viewport",elementContext:f="floating",altBoundary:h=!1,padding:u=0}=ee(t,o),y=Oe(u),x=r[h?f==="floating"?"reference":"floating":f],C=ie(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(x)))==null||n?x:x.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(r.floating)),boundary:d,rootBoundary:p,strategy:c})),g=f==="floating"?{x:l,y:s,width:i.floating.width,height:i.floating.height}:i.reference,w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(r.floating)),b=await(a.isElement==null?void 0:a.isElement(w))?await(a.getScale==null?void 0:a.getScale(w))||{x:1,y:1}:{x:1,y:1},k=ie(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:r,rect:g,offsetParent:w,strategy:c}):g);return{top:(C.top-k.top+y.top)/b.y,bottom:(k.bottom-C.bottom+y.bottom)/b.y,left:(C.left-k.left+y.left)/b.x,right:(k.right-C.right+y.right)/b.x}}const co=o=>({name:"arrow",options:o,async fn(t){const{x:n,y:l,placement:s,rects:a,platform:i,elements:r,middlewareData:c}=t,{element:d,padding:p=0}=ee(o,t)||{};if(d==null)return{};const f=Oe(p),h={x:n,y:l},u=ye(s),y=he(u),m=await i.getDimensions(d),x=u==="y",C=x?"top":"left",g=x?"bottom":"right",w=x?"clientHeight":"clientWidth",b=a.reference[y]+a.reference[u]-h[u]-a.floating[y],k=h[u]-a.reference[u],S=await(i.getOffsetParent==null?void 0:i.getOffsetParent(d));let B=S?S[w]:0;(!B||!await(i.isElement==null?void 0:i.isElement(S)))&&(B=r.floating[w]||a.floating[y]);const $=b/2-k/2,A=B/2-m[y]/2-1,I=v(f[C],A),se=v(f[g],A),Y=I,le=B-m[y]-se,E=B/2-m[y]/2+$,Z=ge(Y,E,le),O=!c.arrow&&te(s)!=null&&E!==Z&&a.reference[y]/2-(E<Y?I:se)-m[y]/2<0,R=O?E<Y?E-Y:E-le:0;return{[u]:h[u]+R,data:{[u]:Z,centerOffset:E-Z-R,...O&&{alignmentOffset:R}},reset:O}}}),po=function(o){return o===void 0&&(o={}),{name:"flip",options:o,async fn(t){var n,l;const{placement:s,middlewareData:a,rects:i,initialPlacement:r,platform:c,elements:d}=t,{mainAxis:p=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:m=!0,...x}=ee(o,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const C=W(s),g=G(r),w=W(r)===r,b=await(c.isRTL==null?void 0:c.isRTL(d.floating)),k=h||(w||!m?[ae(r)]:so(r)),S=y!=="none";!h&&S&&k.push(...ro(r,m,y,b));const B=[r,...k],$=await Me(t,x),A=[];let I=((l=a.flip)==null?void 0:l.overflows)||[];if(p&&A.push($[C]),f){const E=no(s,i,b);A.push($[E[0]],$[E[1]])}if(I=[...I,{placement:s,overflows:A}],!A.every(E=>E<=0)){var se,Y;const E=(((se=a.flip)==null?void 0:se.index)||0)+1,Z=B[E];if(Z)return{data:{index:E,overflows:I},reset:{placement:Z}};let O=(Y=I.filter(R=>R.overflows[0]<=0).sort((R,j)=>R.overflows[1]-j.overflows[1])[0])==null?void 0:Y.placement;if(!O)switch(u){case"bestFit":{var le;const R=(le=I.filter(j=>{if(S){const F=G(j.placement);return F===g||F==="y"}return!0}).map(j=>[j.placement,j.overflows.filter(F=>F>0).reduce((F,Xo)=>F+Xo,0)]).sort((j,F)=>j[1]-F[1])[0])==null?void 0:le[0];R&&(O=R);break}case"initialPlacement":O=r;break}if(s!==O)return{reset:{placement:O}}}return{}}}};async function fo(o,t){const{placement:n,platform:l,elements:s}=o,a=await(l.isRTL==null?void 0:l.isRTL(s.floating)),i=W(n),r=te(n),c=G(n)==="y",d=["left","top"].includes(i)?-1:1,p=a&&c?-1:1,f=ee(t,o);let{mainAxis:h,crossAxis:u,alignmentAxis:y}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return r&&typeof y=="number"&&(u=r==="end"?y*-1:y),c?{x:u*p,y:h*d}:{x:h*d,y:u*p}}const uo=function(o){return o===void 0&&(o=0),{name:"offset",options:o,async fn(t){var n,l;const{x:s,y:a,placement:i,middlewareData:r}=t,c=await fo(t,o);return i===((n=r.offset)==null?void 0:n.placement)&&(l=r.arrow)!=null&&l.alignmentOffset?{}:{x:s+c.x,y:a+c.y,data:{...c,placement:i}}}}},mo=function(o){return o===void 0&&(o={}),{name:"shift",options:o,async fn(t){const{x:n,y:l,placement:s}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:r={fn:x=>{let{x:C,y:g}=x;return{x:C,y:g}}},...c}=ee(o,t),d={x:n,y:l},p=await Me(t,c),f=G(W(s)),h=Te(f);let u=d[h],y=d[f];if(a){const x=h==="y"?"top":"left",C=h==="y"?"bottom":"right",g=u+p[x],w=u-p[C];u=ge(g,u,w)}if(i){const x=f==="y"?"top":"left",C=f==="y"?"bottom":"right",g=y+p[x],w=y-p[C];y=ge(g,y,w)}const m=r.fn({...t,[h]:u,[f]:y});return{...m,data:{x:m.x-n,y:m.y-l,enabled:{[h]:a,[f]:i}}}}}};function ce(){return typeof window<"u"}function q(o){return be(o)?(o.nodeName||"").toLowerCase():"#document"}function V(o){var t;return(o==null||(t=o.ownerDocument)==null?void 0:t.defaultView)||window}function T(o){var t;return(t=(be(o)?o.ownerDocument:o.document)||window.document)==null?void 0:t.documentElement}function be(o){return ce()?o instanceof Node||o instanceof V(o).Node:!1}function N(o){return ce()?o instanceof Element||o instanceof V(o).Element:!1}function _(o){return ce()?o instanceof HTMLElement||o instanceof V(o).HTMLElement:!1}function Ie(o){return!ce()||typeof ShadowRoot>"u"?!1:o instanceof ShadowRoot||o instanceof V(o).ShadowRoot}function oe(o){const{overflow:t,overflowX:n,overflowY:l,display:s}=D(o);return/auto|scroll|overlay|hidden|clip/.test(t+l+n)&&!["inline","contents"].includes(s)}function go(o){return["table","td","th"].includes(q(o))}function de(o){return[":popover-open",":modal"].some(t=>{try{return o.matches(t)}catch{return!1}})}function we(o){const t=ke(),n=N(o)?D(o):o;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(l=>(n.willChange||"").includes(l))||["paint","layout","strict","content"].some(l=>(n.contain||"").includes(l))}function ho(o){let t=M(o);for(;_(t)&&!U(t);){if(we(t))return t;if(de(t))return null;t=M(t)}return null}function ke(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function U(o){return["html","body","#document"].includes(q(o))}function D(o){return V(o).getComputedStyle(o)}function pe(o){return N(o)?{scrollLeft:o.scrollLeft,scrollTop:o.scrollTop}:{scrollLeft:o.scrollX,scrollTop:o.scrollY}}function M(o){if(q(o)==="html")return o;const t=o.assignedSlot||o.parentNode||Ie(o)&&o.host||T(o);return Ie(t)?t.host:t}function je(o){const t=M(o);return U(t)?o.ownerDocument?o.ownerDocument.body:o.body:_(t)&&oe(t)?t:je(t)}function Ce(o,t,n){var l;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=je(o),a=s===((l=o.ownerDocument)==null?void 0:l.body),i=V(s);if(a){const r=Be(i);return t.concat(i,i.visualViewport||[],oe(s)?s:[],r&&n?Ce(r):[])}return t.concat(s,Ce(s,[],n))}function Be(o){return o.parent&&Object.getPrototypeOf(o.parent)?o.frameElement:null}function Fe(o){const t=D(o);let n=parseFloat(t.width)||0,l=parseFloat(t.height)||0;const s=_(o),a=s?o.offsetWidth:n,i=s?o.offsetHeight:l,r=re(n)!==a||re(l)!==i;return r&&(n=a,l=i),{width:n,height:l,$:r}}function He(o){return N(o)?o:o.contextElement}function Q(o){const t=He(o);if(!_(t))return P(1);const n=t.getBoundingClientRect(),{width:l,height:s,$:a}=Fe(t);let i=(a?re(n.width):n.width)/l,r=(a?re(n.height):n.height)/s;return(!i||!Number.isFinite(i))&&(i=1),(!r||!Number.isFinite(r))&&(r=1),{x:i,y:r}}const yo=P(0);function We(o){const t=V(o);return!ke()||!t.visualViewport?yo:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function xo(o,t,n){return t===void 0&&(t=!1),!n||t&&n!==V(o)?!1:t}function ne(o,t,n,l){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=o.getBoundingClientRect(),a=He(o);let i=P(1);t&&(l?N(l)&&(i=Q(l)):i=Q(o));const r=xo(a,n,l)?We(a):P(0);let c=(s.left+r.x)/i.x,d=(s.top+r.y)/i.y,p=s.width/i.x,f=s.height/i.y;if(a){const h=V(a),u=l&&N(l)?V(l):l;let y=h,m=Be(y);for(;m&&l&&u!==y;){const x=Q(m),C=m.getBoundingClientRect(),g=D(m),w=C.left+(m.clientLeft+parseFloat(g.paddingLeft))*x.x,b=C.top+(m.clientTop+parseFloat(g.paddingTop))*x.y;c*=x.x,d*=x.y,p*=x.x,f*=x.y,c+=w,d+=b,y=V(m),m=Be(y)}}return ie({width:p,height:f,x:c,y:d})}function ze(o,t){const n=pe(o).scrollLeft;return t?t.left+n:ne(T(o)).left+n}function qe(o,t,n){n===void 0&&(n=!1);const l=o.getBoundingClientRect(),s=l.left+t.scrollLeft-(n?0:ze(o,l)),a=l.top+t.scrollTop;return{x:s,y:a}}function bo(o){let{elements:t,rect:n,offsetParent:l,strategy:s}=o;const a=s==="fixed",i=T(l),r=t?de(t.floating):!1;if(l===i||r&&a)return n;let c={scrollLeft:0,scrollTop:0},d=P(1);const p=P(0),f=_(l);if((f||!f&&!a)&&((q(l)!=="body"||oe(i))&&(c=pe(l)),_(l))){const u=ne(l);d=Q(l),p.x=u.x+l.clientLeft,p.y=u.y+l.clientTop}const h=i&&!f&&!a?qe(i,c,!0):P(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-c.scrollLeft*d.x+p.x+h.x,y:n.y*d.y-c.scrollTop*d.y+p.y+h.y}}function wo(o){return Array.from(o.getClientRects())}function ko(o){const t=T(o),n=pe(o),l=o.ownerDocument.body,s=X(t.scrollWidth,t.clientWidth,l.scrollWidth,l.clientWidth),a=X(t.scrollHeight,t.clientHeight,l.scrollHeight,l.clientHeight);let i=-n.scrollLeft+ze(o);const r=-n.scrollTop;return D(l).direction==="rtl"&&(i+=X(t.clientWidth,l.clientWidth)-s),{width:s,height:a,x:i,y:r}}function Co(o,t){const n=V(o),l=T(o),s=n.visualViewport;let a=l.clientWidth,i=l.clientHeight,r=0,c=0;if(s){a=s.width,i=s.height;const d=ke();(!d||d&&t==="fixed")&&(r=s.offsetLeft,c=s.offsetTop)}return{width:a,height:i,x:r,y:c}}function Bo(o,t){const n=ne(o,!0,t==="fixed"),l=n.top+o.clientTop,s=n.left+o.clientLeft,a=_(o)?Q(o):P(1),i=o.clientWidth*a.x,r=o.clientHeight*a.y,c=s*a.x,d=l*a.y;return{width:i,height:r,x:c,y:d}}function Ye(o,t,n){let l;if(t==="viewport")l=Co(o,n);else if(t==="document")l=ko(T(o));else if(N(t))l=Bo(t,n);else{const s=We(o);l={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return ie(l)}function Ke(o,t){const n=M(o);return n===t||!N(n)||U(n)?!1:D(n).position==="fixed"||Ke(n,t)}function zo(o,t){const n=t.get(o);if(n)return n;let l=Ce(o,[],!1).filter(r=>N(r)&&q(r)!=="body"),s=null;const a=D(o).position==="fixed";let i=a?M(o):o;for(;N(i)&&!U(i);){const r=D(i),c=we(i);!c&&r.position==="fixed"&&(s=null),(a?!c&&!s:!c&&r.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||oe(i)&&!c&&Ke(o,i))?l=l.filter(p=>p!==i):s=r,i=M(i)}return t.set(o,l),l}function $o(o){let{element:t,boundary:n,rootBoundary:l,strategy:s}=o;const i=[...n==="clippingAncestors"?de(t)?[]:zo(t,this._c):[].concat(n),l],r=i[0],c=i.reduce((d,p)=>{const f=Ye(t,p,s);return d.top=X(f.top,d.top),d.right=v(f.right,d.right),d.bottom=v(f.bottom,d.bottom),d.left=X(f.left,d.left),d},Ye(t,r,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Eo(o){const{width:t,height:n}=Fe(o);return{width:t,height:n}}function So(o,t,n){const l=_(t),s=T(t),a=n==="fixed",i=ne(o,!0,a,t);let r={scrollLeft:0,scrollTop:0};const c=P(0);if(l||!l&&!a)if((q(t)!=="body"||oe(s))&&(r=pe(t)),l){const h=ne(t,!0,a,t);c.x=h.x+t.clientLeft,c.y=h.y+t.clientTop}else s&&(c.x=ze(s));const d=s&&!l&&!a?qe(s,r):P(0),p=i.left+r.scrollLeft-c.x-d.x,f=i.top+r.scrollTop-c.y-d.y;return{x:p,y:f,width:i.width,height:i.height}}function $e(o){return D(o).position==="static"}function Xe(o,t){if(!_(o)||D(o).position==="fixed")return null;if(t)return t(o);let n=o.offsetParent;return T(o)===n&&(n=n.ownerDocument.body),n}function Ge(o,t){const n=V(o);if(de(o))return n;if(!_(o)){let s=M(o);for(;s&&!U(s);){if(N(s)&&!$e(s))return s;s=M(s)}return n}let l=Xe(o,t);for(;l&&go(l)&&$e(l);)l=Xe(l,t);return l&&U(l)&&$e(l)&&!we(l)?n:l||ho(o)||n}const Vo=async function(o){const t=this.getOffsetParent||Ge,n=this.getDimensions,l=await n(o.floating);return{reference:So(o.reference,await t(o.floating),o.strategy),floating:{x:0,y:0,width:l.width,height:l.height}}};function No(o){return D(o).direction==="rtl"}const Do={convertOffsetParentRelativeRectToViewportRelativeRect:bo,getDocumentElement:T,getClippingRect:$o,getOffsetParent:Ge,getElementRects:Vo,getClientRects:wo,getDimensions:Eo,getScale:Q,isElement:N,isRTL:No},Po=uo,_o=mo,Ao=po,Ro=co,To=(o,t,n)=>{const l=new Map,s={platform:Do,...n},a={...s.platform,_c:l};return io(o,t,{...s,platform:a})};function Oo(o){return o!=null&&typeof o=="object"&&"$el"in o}function Ee(o){if(Oo(o)){const t=o.$el;return be(t)&&q(t)==="#comment"?null:t}return o}function J(o){return typeof o=="function"?o():e.unref(o)}function Lo(o){return{name:"arrow",options:o,fn(t){const n=Ee(J(o.element));return n==null?{}:Ro({element:n,padding:o.padding}).fn(t)}}}function Ue(o){return typeof window>"u"?1:(o.ownerDocument.defaultView||window).devicePixelRatio||1}function Qe(o,t){const n=Ue(o);return Math.round(t*n)/n}function Mo(o,t,n){n===void 0&&(n={});const l=n.whileElementsMounted,s=e.computed(()=>{var B;return(B=J(n.open))!=null?B:!0}),a=e.computed(()=>J(n.middleware)),i=e.computed(()=>{var B;return(B=J(n.placement))!=null?B:"bottom"}),r=e.computed(()=>{var B;return(B=J(n.strategy))!=null?B:"absolute"}),c=e.computed(()=>{var B;return(B=J(n.transform))!=null?B:!0}),d=e.computed(()=>Ee(o.value)),p=e.computed(()=>Ee(t.value)),f=e.ref(0),h=e.ref(0),u=e.ref(r.value),y=e.ref(i.value),m=e.shallowRef({}),x=e.ref(!1),C=e.computed(()=>{const B={position:u.value,left:"0",top:"0"};if(!p.value)return B;const $=Qe(p.value,f.value),A=Qe(p.value,h.value);return c.value?{...B,transform:"translate("+$+"px, "+A+"px)",...Ue(p.value)>=1.5&&{willChange:"transform"}}:{position:u.value,left:$+"px",top:A+"px"}});let g;function w(){if(d.value==null||p.value==null)return;const B=s.value;To(d.value,p.value,{middleware:a.value,placement:i.value,strategy:r.value}).then($=>{f.value=$.x,h.value=$.y,u.value=$.strategy,y.value=$.placement,m.value=$.middlewareData,x.value=B!==!1})}function b(){typeof g=="function"&&(g(),g=void 0)}function k(){if(b(),l===void 0){w();return}if(d.value!=null&&p.value!=null){g=l(d.value,p.value,w);return}}function S(){s.value||(x.value=!1)}return e.watch([a,i,r,s],w,{flush:"sync"}),e.watch([d,p],k,{flush:"sync"}),e.watch(s,S,{flush:"sync"}),e.getCurrentScope()&&e.onScopeDispose(b),{x:e.shallowReadonly(f),y:e.shallowReadonly(h),strategy:e.shallowReadonly(u),placement:e.shallowReadonly(y),middlewareData:e.shallowReadonly(m),isPositioned:e.shallowReadonly(x),floatingStyles:C,update:w}}function Io(o){return e.getCurrentScope()?(e.onScopeDispose(o),!0):!1}const jo=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;function Je(o,t,n={}){const{immediate:l=!0}=n,s=e.ref(!1);let a=null;function i(){a&&(clearTimeout(a),a=null)}function r(){s.value=!1,i()}function c(...d){i(),s.value=!0,a=setTimeout(()=>{s.value=!1,a=null,o(...d)},e.toValue(t))}return l&&(s.value=!0,jo&&c()),Io(r),{isPending:e.readonly(s),start:c,stop:r}}function Ze(o={}){const{openDelay:t=0,closeDelay:n=150,onOpen:l,onClose:s,initiallyOpened:a=!1}=o,i=e.ref(!1),{start:r,stop:c}=Je(()=>{i.value=!0,l==null||l()},t),{start:d,stop:p}=Je(()=>{i.value=!1,s==null||s()},n),f=()=>{p(),t===0?(i.value=!0,l==null||l()):r()},h=()=>{c(),n===0?(i.value=!1,s==null||s()):d()};return a&&f(),{isOpen:i,open:f,close:h}}const Se=Symbol("hover-card"),Ve=e.defineComponent({__name:"HoverCardTarget",props:{withWrapper:{type:Boolean,default:!1},wrapperClass:{default:""}},setup(o){return e.inject(Se,null),(t,n)=>t.withWrapper?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(t.wrapperClass)},[e.renderSlot(t.$slots,"default")],2)):e.renderSlot(t.$slots,"default",{key:1})}}),Fo={class:"rounded-lg bg-white dark:bg-gray-800 shadow-lg border border-gray-200 dark:border-gray-700 px-3 py-2"},ve=e.defineComponent({__name:"HoverCard",props:{initiallyOpened:{type:Boolean,default:!1},openDelay:{default:0},closeDelay:{default:150},placement:{default:"bottom"},onOpen:{},onClose:{},offset:{default:8},disabled:{type:Boolean,default:!1},size:{default:"md"},withArrow:{type:Boolean,default:!0},arrowOffset:{default:8},trapFocus:{type:Boolean,default:!0},zIndex:{default:1e3}},setup(o){const t=o,n=e.ref(!1);e.onMounted(()=>{n.value=!0});const l=e.ref(null),s=e.ref(null),a=e.ref(null),{isOpen:i,open:r,close:c}=Ze({openDelay:t.openDelay,closeDelay:t.closeDelay,initiallyOpened:t.initiallyOpened});e.provide(Se,{isOpen:i,open:r,close:c});const{x:d,y:p,strategy:f,middlewareData:h,placement:u,update:y}=Mo(s,a,{placement:t.placement,middleware:[Po(t.offset),Ao({fallbackPlacements:["top","bottom","right","left"].filter(b=>b!==t.placement)}),_o({padding:8}),Lo({element:l})]});e.watch(i,async b=>{b&&await y()});const m=e.computed(()=>{var b,k;return(k=(b=h.value)==null?void 0:b.arrow)==null?void 0:k.x}),x=e.computed(()=>{var b,k;return(k=(b=h.value)==null?void 0:b.arrow)==null?void 0:k.y}),C=e.computed(()=>{switch(u.value){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left";default:return"bottom"}}),g=e.computed(()=>{switch(u.value){case"top":return"translate(-50%, 50%)";case"bottom":return"translate(-50%, -50%)";case"left":return"translate(50%, -50%)";case"right":return"translate(-50%, -50%)";default:return"translate(-50%, -50%)"}}),w=e.computed(()=>({xs:"w-[200px]",sm:"w-[240px]",md:"w-[320px]",lg:"w-[400px]",xl:"w-[480px]"})[t.size]);return(b,k)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"reference",ref:s,class:"relative inline-block",onMouseenter:k[2]||(k[2]=S=>!b.disabled&&e.unref(r)()),onMouseleave:k[3]||(k[3]=S=>!b.disabled&&e.unref(c)())},[e.createVNode(Ve,null,{default:e.withCtx(()=>[e.renderSlot(b.$slots,"target")]),_:3}),n.value?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:"body"},[e.createVNode(e.Transition,{"enter-active-class":"transition duration-200 ease-out","enter-from-class":"opacity-0 translate-y-1","enter-to-class":"opacity-100 translate-y-0","leave-active-class":"transition duration-150 ease-in","leave-from-class":"opacity-100 translate-y-0","leave-to-class":"opacity-0 translate-y-1"},{default:e.withCtx(()=>[e.unref(i)?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"floating",ref:a,style:e.normalizeStyle({position:e.unref(f),top:`${e.unref(p)??0}px`,left:`${e.unref(d)??0}px`,zIndex:b.zIndex||1e3}),class:e.normalizeClass(["min-w-[200px]",[w.value]]),onMouseenter:k[0]||(k[0]=S=>!b.disabled&&e.unref(r)()),onMouseleave:k[1]||(k[1]=S=>!b.disabled&&e.unref(c)())},[e.createElementVNode("div",Fo,[e.renderSlot(b.$slots,"dropdown")]),b.withArrow?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"arrowRef",ref:l,class:"absolute w-2 h-2 rotate-45 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700",style:e.normalizeStyle({position:"absolute",left:`${m.value??0}px`,top:`${x.value??0}px`,[C.value]:"-1px","z-index":-1,"transform-origin":"center",transform:`rotate(45deg) ${g.value}`})},null,4)):e.createCommentVNode("",!0)],38)):e.createCommentVNode("",!0)]),_:3})])):e.createCommentVNode("",!0)],544))}});Object.assign(ve,{Target:Ve});const Ho={},Wo={key:0,class:"badge-section mr-2"},qo={class:"badge-label"},Yo={key:1,class:"badge-section ml-2"},Ko=e.defineComponent({__name:"Badge",props:{size:{default:"md"},circle:{type:Boolean,default:!1},radius:{default:"xl"},color:{default:"primary"},gradient:{},leftSection:{},rightSection:{},fullWidth:{type:Boolean,default:!1},variant:{default:"filled"}},setup(o){const t=o,n=a=>({none:"rounded-none",xs:"rounded",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",xl:"rounded-2xl",full:"rounded-full"})[a]||"rounded-lg",l=a=>`relative pl-6 before:absolute before:left-2 before:top-1/2 before:-translate-y-1/2 before:w-2 before:h-2 before:rounded-full before:bg-${a}-500`,s=e.computed(()=>{var f,h;const a="inline-flex items-center justify-center font-medium",i=t.variant==="gradient"?`bg-gradient-to-r from-${(f=t.gradient)==null?void 0:f.from} to-${(h=t.gradient)==null?void 0:h.to} text-white`:H(t.color,t.variant),r=L(t.size,"badge"),c=n(t.radius),d=t.variant==="dot"?l(t.color):"";return[a,i,r,c,d,{"aspect-square p-0":t.circle,"w-full":t.fullWidth}].filter(Boolean).join(" ")});return(a,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(s.value)},[a.leftSection?(e.openBlock(),e.createElementBlock("span",Wo,[typeof a.leftSection=="string"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(a.leftSection),1)],64)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.leftSection),{key:1}))])):e.createCommentVNode("",!0),e.createElementVNode("span",qo,[e.renderSlot(a.$slots,"default")]),a.rightSection?(e.openBlock(),e.createElementBlock("span",Yo,[typeof a.rightSection=="string"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(a.rightSection),1)],64)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.rightSection),{key:1}))])):e.createCommentVNode("",!0)],2))}}),en="",tn="";z.Alert=Wt,z.Badge=Ko,z.Button=at,z.Checkbox=pt,z.Chip=_t,z.Collapse=qt,z.Dialog=eo,z.HoverCard=ve,z.HoverCardTarget=Ve,z.Indicator=Ot,z.Loader=Ut,z.Progress=Mt,z.Radio=gt,z.Select=Vt,z.TextInput=wt,z.composables=Ho,z.hoverCardInjectionKey=Se,z.useHoverCard=Ze,Object.defineProperty(z,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.ContentStudioDesignSystem={},B.Vue))})(this,function(B,e){"use strict";const fe={primary:{base:"blue",light:"50",main:"500",dark:"600",hover:"550",border:"600",focus:"600"},secondary:{base:"gray",light:"200",main:"575",dark:"700",hover:"600",border:"600",focus:"500"},success:{base:"green",light:"50",main:"500",dark:"700",hover:"600",border:"200",focus:"500"},warning:{base:"yellow",light:"50",main:"500",dark:"700",hover:"600",border:"200",focus:"500"},danger:{base:"red",light:"50",main:"500",dark:"700",hover:"600",border:"200",focus:"500"},info:{base:"sea-blue",light:"50",main:"500",dark:"700",hover:"600",border:"200",focus:"500"},dark:{base:"gray",light:"100",main:"900",dark:"950",hover:"800",border:"300",focus:"700"},light:{base:"gray",light:"50",main:"300",dark:"500",hover:"400",border:"200",focus:"300"}},F=(s,o,t={})=>{const{hover:l=!1,active:n=!1,focus:a=!1,disabled:i=!1}=t;if(i)return"cstu-bg-gray-100 cstu-border-gray-200 cstu-text-gray-400 cstu-cursor-not-allowed";const r=fe[s];if(!r||o==="default")return"";if(o==="text")return[`cstu-text-${r.base}-${r.main}`,l&&`hover:cstu-text-${r.base}-${r.hover}`,n&&`active:cstu-text-${r.base}-${r.dark}`,a&&`focus:cstu-text-${r.base}-${r.focus}`,i&&"cstu-opacity-50 cstu-cursor-not-allowed"].filter(Boolean);const c=[];switch(o){case"filled":c.push(`cstu-bg-${r.base}-${r.main}`),c.push("cstu-text-white"),l&&c.push(`hover:cstu-bg-${r.base}-${r.hover} hover:cstu-shadow-md`),n&&c.push(`active:cstu-bg-${r.base}-${r.dark}`),a&&c.push(`focus:cstu-ring-${r.base}-${r.focus}/20`);break;case"light":c.push(`cstu-bg-${r.base}-${r.light}`),c.push(`cstu-text-${r.base}-${r.main}`),l&&c.push(`hover:cstu-bg-${r.base}-250`),n&&c.push(`active:cstu-bg-${r.base}-300 active:!cstu-text-white`),a&&c.push(`focus:cstu-ring-${r.base}-${r.focus}/20`);break;case"outline":c.push("cstu-bg-white"),c.push(`cstu-text-${r.base}-${r.main}`),c.push(`cstu-border cstu-border-${r.base}-${r.main}`),l&&c.push(`hover:cstu-bg-${r.base}-50`),n&&c.push(`active:cstu-bg-${r.base}-100`),a&&c.push(`focus:cstu-ring-${r.base}-${r.focus}/20`);break;case"subtle":c.push(`cstu-text-${r.base}-${r.main}`),l&&c.push(`hover:cstu-bg-${r.base}-50`),n&&c.push(`active:cstu-bg-${r.base}-100`),a&&c.push(`focus:cstu-ring-${r.base}-${r.focus}/20`);break;case"white":c.push("cstu-bg-white cstu-text-gray-900"),l&&c.push("hover:cstu-bg-gray-50"),n&&c.push("active:cstu-bg-gray-100"),a&&c.push("focus:cstu-ring-gray-200");break;case"dot":c.push(`cstu-bg-${r.base}-${r.main}`);break;case"bordered":c.push("cstu-bg-white"),c.push(`cstu-text-${r.base}-${r.main}`),c.push(`cstu-border cstu-border-${r.base}-${r.border}`),l&&c.push(`hover:cstu-bg-${r.base}-50 hover:cstu-border-${r.base}-${r.main}`),n&&c.push(`active:cstu-bg-${r.base}-100`),a&&c.push(`focus:cstu-ring-${r.base}-${r.focus}/20`);break;case"bordered-transparent":c.push("cstu-bg-transparent"),c.push(`cstu-text-${r.base}-${r.main}`),c.push(`cstu-border cstu-border-${r.base}-${r.border}`),l&&c.push(`hover:cstu-bg-${r.base}-50/10 hover:cstu-border-${r.base}-${r.main}`),n&&c.push(`active:cstu-bg-${r.base}-100/20`),a&&c.push(`focus:cstu-ring-${r.base}-${r.focus}/20`);break}return c.join(" ")},tt=(s,o)=>{if(o==="filled")return"cstu-text-white";const t=fe[s];return`cstu-text-${t.base}-${t.main}`},ot=(s,o)=>{if(o==="filled")return"cstu-text-white";const t=fe[s];return`text-${t.base}-${t.main}`},st=s=>{const o=["cstu-shadow-sm","cstu-transition-all cstu-duration-200"];switch(s){case"filled":o.push("cstu-border-transparent");break;case"light":o.push("cstu-border");break;case"outline":o.push("cstu-border");break;case"subtle":o.push("cstu-shadow-none");break;case"white":o.push("cstu-border");break;default:o.push("cstu-border")}return o.join(" ")},me={button:{xs:{height:"h-[30px]",gap:"gap-[0.55rem]",padding:{x:"px-[0.67rem]",y:"py-[0.67rem]"},text:"text-xs leading-none",icon:"w-3 h-3"},sm:{height:"h-[36px]",gap:"gap-[0.66rem]",padding:{x:"px-[0.8rem]",y:"py-[0.8rem]"},text:"text-sm leading-none",icon:"w-4 h-4"},md:{height:"h-[40px]",gap:"gap-[0.74rem]",padding:{x:"px-[0.89rem]",y:"py-[0.89rem]"},text:"text-base leading-none",icon:"w-5 h-5"},lg:{height:"h-[45px]",gap:"gap-[0.83rem]",padding:{x:"px-4",y:"py-4"},text:"text-lg leading-none",icon:"w-6 h-6"},xl:{height:"h-[50px]",gap:"gap-[0.92rem]",padding:{x:"px-[1.11rem]",y:"py-[1.11rem]"},text:"text-xl leading-none",icon:"w-7 h-7"}},badge:{xs:{padding:{x:"px-2",y:"py-0.5"},text:"text-xs",icon:"w-3 h-3"},sm:{padding:{x:"px-2.5",y:"py-1"},text:"text-sm",icon:"w-3.5 h-3.5"},md:{padding:{x:"px-3",y:"py-1.5"},text:"text-base",icon:"w-4 h-4"},lg:{padding:{x:"px-4",y:"py-2"},text:"text-lg",icon:"w-5 h-5"},xl:{padding:{x:"px-5",y:"py-2.5"},text:"text-xl",icon:"w-6 h-6"}},input:{xs:{padding:{x:"px-2",y:"py-1"},text:"text-xs",height:"h-7"},sm:{padding:{x:"px-3",y:"py-1.5"},text:"text-sm",height:"h-8"},md:{padding:{x:"px-3",y:"py-2"},text:"text-base",height:"h-10"},lg:{padding:{x:"px-4",y:"py-2.5"},text:"text-lg",height:"h-11"},xl:{padding:{x:"px-4",y:"py-3"},text:"text-xl",height:"h-12"}},notification:{xs:{padding:{x:"px-3",y:"py-2"},text:"text-xs"},sm:{padding:{x:"px-4",y:"py-2.5"},text:"text-sm"},md:{padding:{x:"px-4",y:"py-3"},text:"text-base"},lg:{padding:{x:"px-5",y:"py-4"},text:"text-lg"},xl:{padding:{x:"px-6",y:"py-5"},text:"text-xl"}},switch:{xs:{padding:{x:"px-0",y:"py-0"},text:"text-xs",height:"h-4"},sm:{padding:{x:"px-0",y:"py-0"},text:"text-sm",height:"h-5"},md:{padding:{x:"px-0",y:"py-0"},text:"text-base",height:"h-6"},lg:{padding:{x:"px-0",y:"py-0"},text:"text-lg",height:"h-7"},xl:{padding:{x:"px-0",y:"py-0"},text:"text-xl",height:"h-8"}},chip:{xs:{padding:{x:"px-1.5",y:"py-0.5"},text:"text-xs",icon:"w-2.5 h-2.5"},sm:{padding:{x:"px-2",y:"py-1"},text:"text-sm",icon:"w-3 h-3"},md:{padding:{x:"px-2.5",y:"py-1.5"},text:"text-base",icon:"w-3.5 h-3.5"},lg:{padding:{x:"px-3",y:"py-2"},text:"text-lg",icon:"w-4 h-4"},xl:{padding:{x:"px-3.5",y:"py-2.5"},text:"text-xl",icon:"w-4.5 h-4.5"}},checkbox:{xs:{padding:{x:"px-0",y:"py-0"},text:"text-xs",icon:"w-2 h-2"},sm:{padding:{x:"px-0",y:"py-0"},text:"text-sm",icon:"w-2.5 h-2.5"},md:{padding:{x:"px-0",y:"py-0"},text:"text-base",icon:"w-3 h-3"},lg:{padding:{x:"px-0",y:"py-0"},text:"text-lg",icon:"w-4 h-4"},xl:{padding:{x:"px-0",y:"py-0"},text:"text-xl",icon:"w-5 h-5"}},indicator:{xs:{padding:{x:"px-0.5",y:"py-0.5"},text:"text-[10px]",height:"h-3.5 min-w-3.5"},sm:{padding:{x:"px-1",y:"py-0.5"},text:"text-[11px]",height:"h-4 min-w-4"},md:{padding:{x:"px-1.5",y:"py-0.5"},text:"text-xs",height:"h-5 min-w-5"},lg:{padding:{x:"px-2",y:"py-0.5"},text:"text-xs",height:"h-6 min-w-6"},xl:{padding:{x:"px-2.5",y:"py-0.5"},text:"text-sm",height:"h-7 min-w-7"}},progress:{xs:{padding:{x:"px-0",y:"py-0"},text:"text-xs",height:"h-1"},sm:{padding:{x:"px-0",y:"py-0"},text:"text-sm",height:"h-1.5"},md:{padding:{x:"px-0",y:"py-0"},text:"text-base",height:"h-2"},lg:{padding:{x:"px-0",y:"py-0"},text:"text-sm",height:"h-6"},xl:{padding:{x:"px-0",y:"py-0"},text:"text-base",height:"h-8"}},alert:{xs:{padding:{x:"px-3",y:"py-2"},text:"text-xs",icon:"w-4 h-4"},sm:{padding:{x:"px-3",y:"py-2.5"},text:"text-sm",icon:"w-5 h-5"},md:{padding:{x:"px-4",y:"py-3"},text:"text-base",icon:"w-5 h-5"},lg:{padding:{x:"px-5",y:"py-4"},text:"text-lg",icon:"w-6 h-6"},xl:{padding:{x:"px-6",y:"py-5"},text:"text-xl",icon:"w-7 h-7"}},segmentedControl:{xs:{gap:"gap-[8px]",padding:{x:"px-[10.5px]",y:"py-[3.5px]"},text:"text-xs",height:"h-6"},sm:{gap:"gap-[9px]",padding:{x:"px-[12px]",y:"py-[4px]"},text:"text-sm",height:"h-8"},md:{gap:"gap-[10px]",padding:{x:"px-[13.5px]",y:"py-[4.5px]"},text:"text-base",height:"h-10"},lg:{gap:"gap-[11px]",padding:{x:"px-[15px]",y:"py-[5px]"},text:"text-lg",height:"h-12"},xl:{gap:"gap-[12px]",padding:{x:"px-[16.5px]",y:"py-[5.5px]"},text:"text-xl",height:"h-14"}},segmentedControlContainer:{xs:{gap:"gap-[5.25px]",padding:{x:"px-[5.25px]",y:"py-[5.25px]"}},sm:{gap:"gap-[6px]",padding:{x:"px-[6px]",y:"py-[6px]"}},md:{gap:"gap-[6.75px]",padding:{x:"px-[6.75px]",y:"py-[6.75px]"}},lg:{gap:"gap-[7.5px]",padding:{x:"px-[7.5px]",y:"py-[7.5px]"}},xl:{gap:"gap-[8.25px]",padding:{x:"px-[8.25px]",y:"py-[8.25px]"}}},dropdown:{xs:{padding:{x:"cstu-px-[12px]",y:"cstu-py-[7px]"},text:"text-xs",height:void 0,icon:void 0,gap:"gap-[9px]"},sm:{padding:{x:"cstu-px-[12px]",y:"cstu-py-[7px]"},text:"text-sm",height:void 0,icon:void 0,gap:"gap-[9px]"},md:{padding:{x:"cstu-px-[12px]",y:"cstu-py-[7px]"},text:"text-base",height:void 0,icon:void 0,gap:"gap-[9px]"},lg:{padding:{x:"cstu-px-[12px]",y:"cstu-py-[7px]"},text:"text-lg",height:void 0,icon:void 0,gap:"gap-[9px]"},xl:{padding:{x:"cstu-px-[12px]",y:"cstu-py-[7px]"},text:"text-xl",height:void 0,icon:void 0,gap:"gap-[9px]"}}},_=(s,o)=>{var t,l;if(typeof o=="string"){const n=me[o][s];return[(t=n==null?void 0:n.padding)==null?void 0:t.x,(l=n==null?void 0:n.padding)==null?void 0:l.y,n==null?void 0:n.text,n==null?void 0:n.gap].filter(Boolean).join(" ")}return o[s]},Ne=(s,o)=>me[o][s].icon||"",ae=(s,o)=>me[o][s].height||"",De=s=>{switch(s){case"xs":return"text-xs";case"sm":return"text-sm";case"md":return"text-base";case"lg":return"text-lg";case"xl":return"text-xl";default:return"text-base"}},_e=s=>{switch(s){case"xs":return"space-x-1";case"sm":return"space-x-2";case"md":return"space-x-3";case"lg":return"space-x-4";case"xl":return"space-x-5";default:return"space-x-3"}},H=s=>{const o=[];return s.disabled&&o.push("opacity-50 cursor-not-allowed pointer-events-none"),s.loading&&o.push("cursor-wait"),s.active&&o.push("ring-2 ring-offset-2"),s.error&&o.push("border-red-300 focus:ring-red-500/20 focus:border-red-500"),s.success&&o.push("border-green-300 focus:ring-green-500/20 focus:border-green-500"),o.join(" ")},nt=s=>{const o=[];return s.valid&&o.push("border-green-300 focus:ring-green-500/20 focus:border-green-500"),s.invalid&&o.push("border-red-300 focus:ring-red-500/20 focus:border-red-500"),s.pending&&o.push("border-yellow-300 focus:ring-yellow-500/20 focus:border-yellow-500"),o.join(" ")},lt=(s,o="primary")=>{const t=[];return s.hover&&t.push(`hover:bg-${o}-50`),s.active&&t.push(`active:bg-${o}-100`),s.focus&&t.push(`focus:outline-none focus:ring-2 focus:ring-${o}-500/20 focus:border-${o}-500`),t.join(" ")},at=["disabled","type"],rt={key:0},it=e.defineComponent({__name:"Button",props:{variant:{default:"filled"},color:{default:"primary"},size:{default:"md"},radius:{default:"md"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},fullWidth:{type:Boolean,default:!1},type:{default:"button"},leftSection:{},rightSection:{},leftSectionProps:{},rightSectionProps:{},gradient:{}},emits:{click:s=>!0},setup(s,{emit:o}){const t=s,l=o,n=c=>{!t.disabled&&!t.loading&&l("click",c)},a=c=>({none:"cstu-rounded-none",xs:"cstu-rounded",sm:"cstu-rounded-md",md:"cstu-rounded-lg",lg:"cstu-rounded-xl",xl:"cstu-rounded-2xl",full:"cstu-rounded-full"})[c]||"cstu-rounded-lg",i=c=>{if(!c)return"bg-gradient-to-r";const d=(c%360+360)%360;return d>=337.5||d<22.5?"cstu-bg-gradient-to-r":d>=22.5&&d<67.5?"cstu-bg-gradient-to-tr":d>=67.5&&d<112.5?"cstu-bg-gradient-to-t":d>=112.5&&d<157.5?"cstu-bg-gradient-to-tl":d>=157.5&&d<202.5?"cstu-bg-gradient-to-l":d>=202.5&&d<247.5?"cstu-bg-gradient-to-bl":d>=247.5&&d<292.5?"cstu-bg-gradient-to-b":"cstu-bg-gradient-to-br"},r=e.computed(()=>{const c="cstu-inline-flex cstu-items-center cstu-justify-center cstu-font-medium cstu-transition-all cstu-duration-200";if(t.variant==="gradient"&&t.gradient){const w=`${i(t.gradient.deg)} cstu-from-${t.gradient.from}-500 cstu-to-${t.gradient.to||t.gradient.from}-600 hover:cstu-from-${t.gradient.from}-600 hover:cstu-to-${t.gradient.to||t.gradient.from}-700 cstu-text-white`;return[c,w,_(t.size,"button"),a(t.radius),H({disabled:t.disabled,loading:t.loading}),{"cstu-w-full":t.fullWidth,"cstu-cursor-pointer":!t.disabled&&!t.loading}]}const d=F(t.color,t.variant,{hover:!0,active:!0,focus:!0}),u=_(t.size,"button"),f=t.leftSection||t.rightSection?Ne(t.size,"button"):"",y=H({disabled:t.disabled,loading:t.loading}),p=ae(t.size,"button"),m=a(t.radius);return[c,d,u,p,f,y,m,{"cstu-w-full":t.fullWidth,"cstu-cursor-pointer":!t.disabled&&!t.loading}]});return(c,d)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(r.value),disabled:c.disabled||c.loading,type:c.type,onClick:n},[e.renderSlot(c.$slots,"leftSection"),e.renderSlot(c.$slots,"default"),c.loading?(e.openBlock(),e.createElementBlock("span",rt,[e.renderSlot(c.$slots,"loader",{},()=>[d[0]||(d[0]=e.createElementVNode("svg",{class:"animate-spin h-4 w-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[e.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),e.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1))])])):e.createCommentVNode("",!0),e.renderSlot(c.$slots,"rightSection")],10,at))}}),Le=s=>{const o=["relative"];s.fullWidth&&o.push("w-full");const t=H({disabled:s.disabled,error:s.error,required:s.required||s.withAsterisk});return t&&o.push(t),o.join(" ")},Pe=s=>{const o=["block","font-medium","mb-1"];switch(s.size){case"xs":o.push("text-xs");break;case"sm":o.push("text-sm");break;case"md":o.push("text-base");break;case"lg":o.push("text-lg");break;case"xl":o.push("text-xl");break;default:o.push("text-sm")}return s.error?o.push("text-red-500"):s.disabled?o.push("text-gray-400"):o.push("text-gray-700"),(s.required||s.withAsterisk)&&o.push('after:content-["*"] after:ml-0.5 after:text-red-500'),o.join(" ")},Oe=s=>{const o=["mt-1","text-sm"];return s.error?o.push("text-red-500"):s.disabled?o.push("text-gray-400"):o.push("text-gray-500"),o.join(" ")},ct=["aria-disabled","onKeydown"],dt={key:2,class:"text-sm text-red-500 mt-0.5"},pt={name:"Checkbox"},ut=e.defineComponent({...pt,props:{modelValue:{type:[Boolean,Array],default:!1},checked:{type:Boolean,default:!1},value:{},id:{},label:{},color:{default:"primary"},size:{default:"md"},labelPosition:{default:"right"},description:{},error:{},disabled:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},variant:{default:"filled"}},emits:["update:modelValue","change"],setup(s,{emit:o}){const t=s,l=o,n=e.computed(()=>t.modelValue||t.checked),a=()=>{if(t.disabled)return;const m=!n.value;l("update:modelValue",m),l("change",m)},i=()=>{a()},r=e.computed(()=>Pe({size:t.size,disabled:t.disabled,error:t.error})),c=e.computed(()=>Oe({color:t.color})),d=e.computed(()=>["cstu-flex","cstu-flex-col",t.labelPosition==="left"?"cstu-order-first":""]),u={primary:"blue-450",secondary:"gray-500",success:"green-500",warning:"yellow-500",danger:"red-500",info:"blue-500",dark:"gray-900",light:"gray-300"},f=e.computed(()=>["cstu-inline-flex","cstu-items-center","cstu-justify-center","cstu-cursor-pointer","cstu-transition-colors","cstu-duration-200","cstu-ease-in-out",t.size==="xs"?"cstu-h-[12px] cstu-w-[12px] cstu-rounded":"",t.size==="sm"?"cstu-h-[14px] cstu-w-[14px] cstu-rounded":"",t.size==="md"?"cstu-h-[16px] cstu-w-[16px] cstu-rounded-md":"",t.size==="lg"?"cstu-h-[18px] cstu-w-[18px] cstu-rounded-md":"",t.size==="xl"?"cstu-h-[20px] cstu-w-[20px] cstu-rounded-md":"",t.disabled?"cstu-bg-gray-200 cstu-border cstu-border-gray-200 cstu-cursor-not-allowed":n.value||t.indeterminate?t.variant==="outlined"?`cstu-bg-transparent cstu-border cstu-border-${u[t.color]}`:`cstu-bg-${u[t.color]} cstu-border-${u[t.color]}`:"cstu-bg-white cstu-border cstu-border-gray-400/50"]),y=e.computed(()=>[t.variant==="outlined"&&(n.value||t.indeterminate)?`cstu-text-${u[t.color]}`:t.disabled?"cstu-text-gray-300":"cstu-text-white",t.size==="xs"?"cstu-h-[6px] cstu-w-[6px]":"",t.size==="sm"?"cstu-h-[7px] cstu-w-[7px]":"",t.size==="md"?"cstu-h-[8px] cstu-w-[8px]":"",t.size==="lg"?"cstu-h-[9px] cstu-w-[9px]":"",t.size==="xl"?"cstu-h-[10px] cstu-w-[10px]":""]),p=e.computed(()=>Le({disabled:t.disabled,error:t.error}));return(m,g)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([p.value,"cstu-flex cstu-items-center cstu-gap-2"])},[e.createElementVNode("div",{class:e.normalizeClass(f.value),onClick:i,role:"checkbox","aria-disabled":m.disabled,tabindex:"0",onKeydown:e.withKeys(e.withModifiers(i,["prevent"]),["space"])},[n.value&&!m.indeterminate?(e.openBlock(),e.createElementBlock("svg",{key:0,class:e.normalizeClass(y.value),xmlns:"http://www.w3.org/2000/svg",width:"8",height:"6",viewBox:"0 0 8 6",fill:"none"},g[0]||(g[0]=[e.createElementVNode("path",{d:"M6.75 0.75L2.625 5.25L0.75 3.20455",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]),2)):e.createCommentVNode("",!0),m.indeterminate?(e.openBlock(),e.createElementBlock("svg",{key:1,class:e.normalizeClass(y.value),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 8 7",fill:"none"},g[1]||(g[1]=[e.createElementVNode("path",{d:"M6.80245 3.90741L0.697913 3.8936",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]),2)):e.createCommentVNode("",!0)],42,ct),m.label||m.description?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(d.value)},[m.label?(e.openBlock(),e.createElementBlock("label",{key:0,class:e.normalizeClass([r.value,"pt-0.5"]),onClick:i},e.toDisplayString(m.label),3)):e.createCommentVNode("",!0),m.description?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(c.value)},e.toDisplayString(m.description),3)):e.createCommentVNode("",!0),m.error?(e.openBlock(),e.createElementBlock("div",dt,e.toDisplayString(m.error),1)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0)],2))}}),ft=["aria-checked","aria-disabled"],mt=["id","checked","disabled","value"],gt=["for"],ht=e.defineComponent({__name:"Radio",props:{modelValue:{default:void 0},value:{default:void 0},id:{default:()=>`radio-${Math.random().toString(36).substr(2,9)}`},label:{},color:{default:"primary"},size:{default:"md"},labelPosition:{default:"right"},description:{},error:{},disabled:{type:Boolean,default:!1},variant:{default:"filled"}},emits:["update:modelValue","change"],setup(s,{emit:o}){const t=s,l={primary:"blue-450",secondary:"gray-500",success:"green-500",warning:"yellow-500",danger:"red-500",info:"blue-500",dark:"gray-900",light:"gray-300"},n={primary:"blue-300",secondary:"gray-300",success:"green-300",warning:"yellow-300",danger:"red-300",info:"blue-300",dark:"gray-300",light:"gray-300"},a=o,i=e.computed(()=>t.modelValue===t.value),r=()=>{t.disabled||(a("update:modelValue",t.value),a("change",t.value))},c=e.computed(()=>[Le({disabled:t.disabled,error:t.error}),"cstu-flex cstu-items-center cstu-gap-2",t.labelPosition==="left"?"cstu-flex-row-reverse":"cstu-flex-row"]),d=e.computed(()=>["cstu-relative cstu-flex cstu-items-center cstu-justify-center cstu-rounded-full cstu-transition-colors cstu-duration-200",g.value,i.value?t.variant==="outlined"?`cstu-bg-white !cstu-border-2 cstu-border-${n[t.color]}`:`cstu-bg-${l[t.color]} cstu-border cstu-border-${l[t.color]}`:t.variant==="outlined"?`cstu-bg-white !cstu-border-2 cstu-border-${n[t.color]}`:"cstu-bg-white cstu-border cstu-border-gray-300 hover:cstu-border-gray-400",t.disabled?"cstu-opacity-50 cstu-cursor-not-allowed !cstu-bg-gray-200 !cstu-border-gray-300":"cstu-cursor-pointer"]),u=e.computed(()=>["cstu-rounded-full",x.value,t.variant==="outlined"?`cstu-bg-${l[t.color]}`:"cstu-bg-white",t.disabled?`cstu-opacity-50 ${t.variant==="outlined"?"!cstu-bg-gray-300":"!cstu-bg-gray-200"}`:""]),f=e.computed(()=>Pe({size:t.size,disabled:t.disabled,error:t.error})),y=e.computed(()=>Oe({color:t.color})),p=e.computed(()=>["cstu-text-sm cstu-text-red-500 cstu-mt-1"]),m=e.computed(()=>["cstu-flex cstu-flex-col",t.disabled?"cstu-cursor-not-allowed":"cstu-cursor-pointer"]),g=e.computed(()=>({xs:"cstu-w-[8px] cstu-h-[8px]",sm:"cstu-w-[12px] cstu-h-[12px]",md:"cstu-w-[16px] cstu-h-[16px]",lg:"cstu-w-[20px] cstu-h-[20px]",xl:"cstu-w-[24px] cstu-h-[24px]"})[t.size]),x=e.computed(()=>({xs:"cstu-w-[4px] cstu-h-[4px]",sm:"cstu-w-[6px] cstu-h-[6px]",md:"cstu-w-[8px] cstu-h-[8px]",lg:"cstu-w-[10px] cstu-h-[10px]",xl:"cstu-w-[12px] cstu-h-[12px]"})[t.size]);return(w,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(c.value),onClick:r,"aria-checked":i.value,"aria-disabled":w.disabled,role:"radio"},[e.createElementVNode("input",{ref:"radio",type:"radio",id:w.id,checked:i.value,disabled:w.disabled,value:w.value,onChange:r,class:"sr-only cstu-border-2"},null,40,mt),e.createElementVNode("div",{class:e.normalizeClass(d.value)},[i.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([u.value,"cstu-absolute cstu-left-1/2 cstu-top-1/2 cstu--translate-x-1/2 cstu--translate-y-1/2 cstu-transition-transform cstu-duration-200 cstu-ease-in-out"])},null,2)):e.createCommentVNode("",!0)],2),e.createElementVNode("div",{class:e.normalizeClass(m.value)},[w.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:w.id,class:e.normalizeClass(f.value)},[e.renderSlot(w.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(w.label),1)])],10,gt)):e.createCommentVNode("",!0),w.description?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(y.value)},[e.renderSlot(w.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(w.description),1)])],2)):e.createCommentVNode("",!0),w.error?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(p.value)},[e.renderSlot(w.$slots,"error",{},()=>[e.createTextVNode(e.toDisplayString(w.error),1)])],2)):e.createCommentVNode("",!0)],2)],10,ft))}}),yt=["for"],xt={key:0,class:"text-red-500","aria-hidden":"true"},bt={class:"relative"},wt=["id","type","value","placeholder","disabled","required"],Ct=e.defineComponent({__name:"TextInput",props:{id:{},type:{default:"text"},modelValue:{},placeholder:{},disabled:{type:Boolean,default:!1},label:{},labelProps:{},description:{},descriptionProps:{},error:{},errorProps:{},wrapperProps:{},inputProps:{},size:{default:"md"},radius:{default:"md"},rightSection:{},rightSectionProps:{},leftSection:{},leftSectionProps:{},withAsterisk:{type:Boolean,default:!1},required:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(s){const o=s,t=n=>({none:"rounded-none",xs:"rounded",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",xl:"rounded-2xl",full:"rounded-full"})[n]||"rounded-lg",l=e.computed(()=>{const n=["block w-full bg-white transition-all duration-200","border border-gray-200","text-gray-900","focus:outline-none focus:ring-2 focus:ring-offset-0 focus:border-transparent","placeholder:text-gray-400","shadow-sm"],a=_(o.size,"input"),i=_(o.size,"input"),r=H({disabled:o.disabled,error:o.withError||!!o.error}),c=t(o.radius),d={left:o.leftSection?"pl-10":"",right:o.rightSection?"pr-10":""},u=o.disabled?"":[o.withError||o.error?"focus:ring-red-500/20 focus:border-red-500":"focus:ring-blue-500/20 focus:border-blue-500","hover:border-gray-300"];return[...n,a,i,r,c,d.left,d.right,u].filter(Boolean).join(" ")});return(n,a)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({class:["relative flex flex-col",{"opacity-50 pointer-events-none":n.disabled}]},n.wrapperProps),[n.label?(e.openBlock(),e.createElementBlock("label",e.mergeProps({key:0,for:n.id,class:"mb-1 text-sm font-medium text-gray-700 flex items-center gap-1"},n.labelProps),[e.createTextVNode(e.toDisplayString(n.label)+" ",1),n.required||n.withAsterisk?(e.openBlock(),e.createElementBlock("span",xt,"*")):e.createCommentVNode("",!0)],16,yt)):e.createCommentVNode("",!0),e.createElementVNode("div",bt,[n.leftSection?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:0,class:"absolute inset-y-0 left-0 flex items-center pl-3"},n.leftSectionProps),[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.leftSection)))],16)):e.createCommentVNode("",!0),e.createElementVNode("input",e.mergeProps({id:n.id,type:n.type,value:n.modelValue,placeholder:n.placeholder,disabled:n.disabled,required:n.required,class:l.value,onInput:a[0]||(a[0]=i=>n.$emit("update:modelValue",i.target.value))},n.inputProps),null,16,wt),n.rightSection?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:1,class:"absolute inset-y-0 right-0 flex items-center pr-3"},n.rightSectionProps),[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.rightSection)))],16)):e.createCommentVNode("",!0)]),n.description?(e.openBlock(),e.createElementBlock("p",e.mergeProps({key:1,class:"mt-1 text-sm text-gray-500"},n.descriptionProps),e.toDisplayString(n.description),17)):e.createCommentVNode("",!0),n.error?(e.openBlock(),e.createElementBlock("p",e.mergeProps({key:2,class:"mt-1 text-sm text-red-500"},n.errorProps),e.toDisplayString(n.error),17)):e.createCommentVNode("",!0)],16))}}),kt=["aria-expanded","aria-disabled"],Bt=["placeholder","disabled"],$t={key:1,class:"w-full truncate text-gray-900"},zt={class:"flex items-center gap-2 shrink-0"},Et={key:0,class:"py-3 text-center text-gray-500"},St=["onClick"],Vt={key:0,class:"py-3 px-4 text-gray-500 text-center text-sm"},Nt=e.defineComponent({__name:"Select",props:{modelValue:{default:null},options:{default:()=>[]},placeholder:{default:"Select option"},disabled:{type:Boolean,default:!1},searchable:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},error:{type:Boolean,default:!1},size:{default:"md"},radius:{default:"sm"},variant:{default:"outline"},color:{default:"primary"},withCheckIcon:{type:Boolean,default:!0},checkIconPosition:{default:"right"},nothingFoundMessage:{default:"Nothing found..."}},emits:["update:modelValue","change"],setup(s,{emit:o}){const t=s,l=o,n=e.ref(!1),a=e.ref(""),i=e.ref(null),r=e.ref(null),c=h=>({none:"rounded-none",xs:"rounded",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",xl:"rounded-2xl",full:"rounded-full"})[h]||"rounded-lg",d=e.computed(()=>{const h="w-full flex items-center justify-between transition-colors duration-200",C=[_(t.size,"input"),ae(t.size,"input")].join(" "),b=c(t.radius),k=t.error?"focus-within:ring-2 focus-within:ring-red-500/20 focus-within:border-red-500":"focus-within:ring-2 focus-within:ring-blue-500/20 focus-within:border-blue-500",S=t.variant==="filled"?`bg-gray-50 border border-transparent ${!t.disabled&&`hover:bg-gray-100 focus-within:bg-white focus-within:border-gray-300 ${k}`}`:`bg-white border border-gray-300 ${!t.disabled&&`hover:border-gray-400 ${k}`}`,$=H({disabled:t.disabled,error:t.error}),z=!t.disabled&&"cursor-pointer";return[h,C,b,S,$,z].filter(Boolean).join(" ")}),u=e.computed(()=>t.options.find(h=>h.value===t.modelValue)),f=e.computed(()=>{if(!a.value)return t.options;const h=a.value.toLowerCase();return t.options.filter(C=>C.label.toLowerCase().includes(h))}),y=()=>{var h;t.disabled||(t.searchable?((h=i.value)==null||h.focus(),n.value=!0):n.value=!n.value)},p=h=>{l("update:modelValue",h.value),l("change",h),n.value=!1,t.searchable&&(a.value=h.label)},m=()=>{l("update:modelValue",null),l("change",null),a.value=""},g=()=>{n.value||(n.value=!0)},x=()=>{n.value||(n.value=!0)},w=h=>{const C=h.target;r.value&&!r.value.contains(C)&&(n.value=!1)};return e.watch(()=>t.modelValue,h=>{h?u.value&&t.searchable&&(a.value=u.value.label):a.value=""}),e.onMounted(()=>{document.addEventListener("click",w)}),e.onUnmounted(()=>{document.removeEventListener("click",w)}),(h,C)=>(e.openBlock(),e.createElementBlock("div",{class:"relative select",ref_key:"selectRoot",ref:r},[e.createElementVNode("div",{class:e.normalizeClass(d.value),role:"combobox","aria-expanded":n.value,"aria-disabled":h.disabled,onClick:y},[h.searchable?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,ref_key:"searchInput",ref:i,"onUpdate:modelValue":C[0]||(C[0]=b=>a.value=b),placeholder:h.placeholder,type:"text",class:"w-full bg-transparent outline-none placeholder:text-gray-500",disabled:h.disabled,onFocus:g,onInput:x},null,40,Bt)),[[e.vModelText,a.value]]):(e.openBlock(),e.createElementBlock("div",$t,e.toDisplayString(u.value?u.value.label:h.placeholder),1)),e.createElementVNode("div",zt,[h.clearable&&h.modelValue&&!h.disabled?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"p-1 hover:bg-gray-100 rounded-full text-gray-500 hover:text-gray-700",onClick:e.withModifiers(m,["stop"])},C[1]||(C[1]=[e.createElementVNode("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]))):e.createCommentVNode("",!0),(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["w-4 h-4 text-gray-500 transition-transform duration-200",{"rotate-180":n.value}]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},C[2]||(C[2]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 9l-7 7-7-7"},null,-1)]),2))])],10,kt),e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(["absolute w-full z-50 mt-1 bg-white","border border-gray-200",c(t.radius),"shadow-lg max-h-[240px] overflow-auto","divide-y divide-gray-100"])},[h.loading?(e.openBlock(),e.createElementBlock("div",Et,[e.renderSlot(h.$slots,"loader",{},()=>[C[3]||(C[3]=e.createElementVNode("svg",{class:"animate-spin h-5 w-5 mx-auto",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[e.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),e.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1))])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,b=>(e.openBlock(),e.createElementBlock("div",{key:b.value,class:e.normalizeClass(["py-2.5 px-4 flex items-center transition-colors duration-200","text-[14px] leading-5","text-gray-900",b.value===h.modelValue?"bg-gray-50 font-medium":"hover:bg-gray-50",b.disabled?"opacity-50 cursor-not-allowed":"cursor-pointer"]),onClick:k=>!b.disabled&&p(b)},[h.withCheckIcon&&b.value===h.modelValue?(e.openBlock(),e.createElementBlock("svg",{key:0,class:e.normalizeClass(["w-4 h-4 text-blue-600 shrink-0",h.checkIconPosition==="left"?"mr-2":"ml-2 order-last"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},C[4]||(C[4]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"},null,-1)]),2)):e.createCommentVNode("",!0),e.createElementVNode("span",{class:e.normalizeClass({"text-gray-500":b.disabled})},e.toDisplayString(b.label),3)],10,St))),128)),f.value.length===0?(e.openBlock(),e.createElementBlock("div",Vt,e.toDisplayString(h.nothingFoundMessage||"No options found"),1)):e.createCommentVNode("",!0)],64))],2),[[e.vShow,n.value]])],512))}}),Dt=["disabled"],_t={key:0,class:"w-3.5 h-3.5",viewBox:"0 0 20 20",fill:"currentColor"},Lt={key:1,class:"animate-spin"},Pt=e.defineComponent({__name:"Chip",props:{modelValue:{type:Boolean,default:!1},label:{default:""},size:{default:"md"},variant:{default:"filled"},color:{default:"primary"},radius:{default:"xl"},checked:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},withRemoveButton:{type:Boolean,default:!1},withCheckIcon:{type:Boolean,default:!0},checkIconPosition:{default:"left"},allowDeselect:{type:Boolean,default:!0},loading:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(s,{emit:o}){const t=s,l=o,n=e.computed(()=>F(t.color)),a=e.computed(()=>_(t.size,"chip")),i=e.computed(()=>H({disabled:t.disabled,loading:t.loading})),r=e.computed(()=>F(t.color,"filled")),c=e.computed(()=>F(t.color,"outline")),d=()=>{t.disabled||t.loading||t.modelValue&&!t.allowDeselect||l("update:modelValue",!t.modelValue)};return(u,f)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["inline-flex items-center justify-center gap-2 rounded-full transition-colors duration-200 select-none","focus:outline-none",n.value,a.value,i.value,u.modelValue?r.value:c.value,"cursor-pointer"]),disabled:u.disabled||u.loading,onClick:d},[u.withCheckIcon&&u.modelValue?(e.openBlock(),e.createElementBlock("svg",_t,f[0]||(f[0]=[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z","clip-rule":"evenodd"},null,-1)]))):e.createCommentVNode("",!0),u.loading?(e.openBlock(),e.createElementBlock("span",Lt,f[1]||(f[1]=[e.createElementVNode("svg",{class:"w-3.5 h-3.5",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[e.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),e.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1)]))):e.createCommentVNode("",!0),e.createElementVNode("span",{class:e.normalizeClass(["whitespace-nowrap",u.loading?"opacity-75":""])},e.toDisplayString(u.label),3)],10,Dt))}}),Ot=(s,o=0)=>{const t={position:"absolute",transform:"translate(50%, -50%)"},[l,n]=s.split("-");if(l==="top"?t.top="0":l==="bottom"?(t.bottom="0",t.transform="translate(50%, 50%)"):l==="middle"&&(t.top="50%",n==="start"?t.transform="translate(-50%, -50%)":n==="end"?t.transform="translate(50%, -50%)":t.transform="translate(0, -50%)"),n==="start"?(t.left="0",t.transform=l==="bottom"?"translate(-50%, 50%)":"translate(-50%, -50%)"):n==="end"?t.right="0":n==="center"&&(t.left="50%",t.transform=l==="bottom"?"translate(-50%, 50%)":"translate(-50%, -50%)"),o){const a=t.transform.includes("50%")?"50%":"0",i=t.transform.includes("-50%")?"-50%":"50%";(l==="top"||l==="bottom")&&(t.transform=`translate(${a}, ${i}) translateY(${o}px)`),(n==="start"||n==="end")&&(t.transform=`translate(${a}, ${i}) translateX(${n==="start"?-o:o}px)`)}return t},At={name:"Indicator"},Tt=e.defineComponent({...At,props:{position:{default:"top-end"},size:{default:"md"},radius:{default:"xl"},color:{default:"primary"},variant:{default:"filled"},offset:{default:0},inline:{type:Boolean,default:!1},label:{default:""},withBorder:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},processing:{type:Boolean,default:!1},zIndex:{default:200}},setup(s){const o=s,t=e.computed(()=>[o.inline?"inline-block":"block","relative"]),l=e.computed(()=>({...o.inline&&{display:"inline-block"}})),n=e.computed(()=>["flex items-center justify-center","absolute","select-none","rounded-full",ae(o.size,"indicator"),_(o.size,"indicator"),!o.disabled&&`bg-${o.color==="primary"?"blue":o.color}-600 text-white`,o.disabled&&"bg-gray-200 text-gray-500",o.withBorder&&"border-2 border-white dark:border-gray-900",o.processing&&"animate-pulse"]),a=e.computed(()=>({...Ot(o.position,o.offset),zIndex:o.zIndex}));return(i,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(t.value),style:e.normalizeStyle(l.value)},[i.disabled?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(n.value),style:e.normalizeStyle(a.value)},e.toDisplayString(i.label),7)),e.renderSlot(i.$slots,"default",{},void 0,!0)],6))}}),ts="",Rt=((s,o)=>{const t=s.__vccOpts||s;for(const[l,n]of o)t[l]=n;return t})(Tt,[["__scopeId","data-v-643e9acf"]]),Mt=["aria-valuenow"],It=e.defineComponent({__name:"Progress",props:{value:{default:0},size:{default:"md"},color:{},label:{},striped:{type:Boolean,default:!1},animated:{type:Boolean,default:!1}},setup(s){return(o,t)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["relative w-full rounded-sm overflow-hidden","bg-gray-100",e.unref(ae)(o.size,"progress")]),role:"progressbar","aria-valuenow":o.value,"aria-valuemin":"0","aria-valuemax":"100"},[e.createElementVNode("div",{class:e.normalizeClass(["h-full transition-all duration-300 ease-in-out",e.unref(F)(o.color||"primary","filled"),{"bg-striped":o.striped&&!o.animated,"bg-striped animate-progress":o.animated}]),style:e.normalizeStyle({width:`${o.value}%`})},[o.label&&(o.size==="lg"||o.size==="xl")?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["block px-2 py-1 text-white whitespace-nowrap font-medium leading-none",e.unref(De)(o.size)])},e.toDisplayString(o.label),3)):e.createCommentVNode("",!0)],6)],10,Mt))}}),ss="",jt={key:0,class:"flex-shrink-0"},vt={key:0,class:"flex items-center justify-between"},Ft={key:1,class:"flex-shrink-0 ml-3"},Ht=["disabled"],Wt=e.defineComponent({__name:"Alert",props:{title:{},message:{},icon:{},variant:{default:"default"},color:{default:"primary"},size:{default:"md"},closable:{type:Boolean,default:!1},onClose:{},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},valid:{type:Boolean,default:void 0},invalid:{type:Boolean,default:void 0}},emits:["close"],setup(s,{emit:o}){const t=s,l=o,n=e.computed(()=>F(t.color,t.variant,{hover:!1,active:!1,focus:!1,disabled:t.disabled})),a=e.computed(()=>st(t.variant)),i=e.computed(()=>tt(t.color,t.variant)),r=e.computed(()=>ot(t.color,t.variant)),c=e.computed(()=>_(t.size,"alert")),d=e.computed(()=>Ne(t.size,"alert")),u=e.computed(()=>De(t.size)),f=e.computed(()=>_e(t.size)),y=e.computed(()=>H({disabled:t.disabled,loading:t.loading})),p=e.computed(()=>nt({valid:t.valid,invalid:t.invalid})),m=e.computed(()=>lt({hover:!0,focus:!0},t.color)),g=()=>{l("close")};return(x,w)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["relative rounded-md",a.value,n.value,c.value,y.value,p.value]),role:"alert"},[e.createElementVNode("div",{class:e.normalizeClass(["flex items-start",[f.value]])},[x.icon?(e.openBlock(),e.createElementBlock("div",jt,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(x.icon),{class:e.normalizeClass([d.value,i.value])},null,8,["class"]))])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["flex-grow",[x.icon&&"ml-3"]])},[x.title?(e.openBlock(),e.createElementBlock("div",vt,[e.createElementVNode("h3",{class:e.normalizeClass(["font-medium",r.value])},e.toDisplayString(x.title),3)])):e.createCommentVNode("",!0),x.message?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["mt-1",x.variant==="filled"?"text-white/90":"text-gray-600",u.value])},e.toDisplayString(x.message),3)):e.createCommentVNode("",!0),e.renderSlot(x.$slots,"default")],2),x.closable?(e.openBlock(),e.createElementBlock("div",Ft,[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["inline-flex rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2",[x.variant==="filled"?"text-white/80 hover:text-white focus:ring-white":"text-gray-400 hover:text-gray-500 focus:ring-blue-500",m.value]]),disabled:x.disabled,onClick:g},w[0]||(w[0]=[e.createElementVNode("span",{class:"sr-only"},"Close",-1),e.createElementVNode("svg",{class:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{d:"M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z"})],-1)]),10,Ht)])):e.createCommentVNode("",!0)],2)],2))}}),qt=e.defineComponent({__name:"Collapse",props:{open:{type:Boolean,default:!1},duration:{default:200},class:{},size:{default:"md"},disableTransition:{type:Boolean,default:!1}},setup(s){const o=s,t=e.ref(null),l=e.ref(null),n={xs:"p-1",sm:"p-2",md:"p-3",lg:"p-4",xl:"p-5"},a=e.computed(()=>_e(o.size)),i=e.computed(()=>n[o.size]),r=e.computed(()=>o.disableTransition?"":`transition-[height] ease-in-out duration-${o.duration}`),c=e.computed(()=>({enter:o.duration,leave:o.duration})),d=g=>{g.style.height="0",g.style.overflow="hidden"},u=g=>{const x=g.scrollHeight;g.style.height="0",g.offsetHeight,g.style.height=`${x}px`},f=g=>{g.style.height="",g.style.overflow=""},y=g=>{g.style.height=`${g.scrollHeight}px`,g.style.overflow="hidden",g.offsetHeight},p=g=>{g.style.height="0"},m=g=>{g.style.height="",g.style.overflow=""};return(g,x)=>(e.openBlock(),e.createBlock(e.Transition,{duration:c.value,onBeforeEnter:d,onEnter:u,onAfterEnter:f,onBeforeLeave:y,onLeave:p,onAfterLeave:m},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(["overflow-hidden",a.value,r.value,o.class]),ref_key:"contentRef",ref:t},[e.createElementVNode("div",{ref_key:"innerRef",ref:l,class:e.normalizeClass(i.value)},[e.renderSlot(g.$slots,"default")],2)],2),[[e.vShow,g.open]])]),_:3},8,["duration"]))}}),Yt={class:"inline-block"},Kt=e.defineComponent({__name:"OvalLoader",props:{size:{default:"md"}},setup(s){const o={xs:"12px",sm:"16px",md:"24px",lg:"36px",xl:"48px"},t=s,l=e.computed(()=>{const n=parseInt(o[t.size]);return`${Math.max(2,n/12)}px`});return(n,a)=>(e.openBlock(),e.createElementBlock("span",Yt,[e.createElementVNode("span",{class:"inline-block rounded-full border-solid border-r-transparent border-current animate-[oval-spin_1.2s_linear_infinite]",style:e.normalizeStyle({width:o[t.size],height:o[t.size],borderWidth:l.value})},null,4)]))}}),ns="",Xt=e.defineComponent({__name:"DotsLoader",props:{size:{default:"md"}},setup(s){const o={xs:"12px",sm:"16px",md:"24px",lg:"36px",xl:"48px"},t=s,l=e.computed(()=>`${parseInt(o[t.size])/3}px`),n=e.computed(()=>`${parseInt(o[t.size])/6}px`);return(a,i)=>(e.openBlock(),e.createElementBlock("span",{class:"inline-flex items-center",style:e.normalizeStyle({gap:n.value,height:o[t.size]})},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(3,r=>e.createElementVNode("span",{key:r,class:"inline-block rounded-full animate-[dots-pulse_0.8s_infinite_linear] bg-current",style:e.normalizeStyle({width:l.value,height:l.value,animationDelay:`${(r-1)*.16}s`,opacity:1})},null,4)),64))],4))}}),ls="",Gt=e.defineComponent({__name:"BarsLoader",props:{size:{default:"md"}},setup(s){const o={xs:"12px",sm:"16px",md:"24px",lg:"36px",xl:"48px"},t=s,l=e.computed(()=>`${parseInt(o[t.size])/6}px`);return(n,a)=>(e.openBlock(),e.createElementBlock("span",{class:"inline-flex",style:e.normalizeStyle({gap:l.value,width:o[t.size],height:`${parseInt(o[t.size])/2}px`})},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(3,i=>e.createElementVNode("span",{key:i,class:"flex-1 rounded-[2px] animate-[bars-scale_1.2s_cubic-bezier(0,0.5,0.5,1)_infinite] bg-current",style:e.normalizeStyle({animationDelay:`${(i-1)*-.12}s`,opacity:1})},null,4)),64))],4))}}),as="",Ut=e.defineComponent({__name:"Loader",props:{variant:{default:"oval"},color:{default:"primary"},size:{default:"md"},class:{}},setup(s){const o=s,t=i=>/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(i),l=e.computed(()=>!o.color||t(o.color)?"":{primary:"text-blue-500",secondary:"text-gray-500",success:"text-green-500",warning:"text-yellow-500",danger:"text-red-500",info:"text-blue-500",dark:"text-gray-900",light:"text-white"}[o.color]||""),n=e.computed(()=>!o.color||!t(o.color)?{}:{color:o.color}),a=e.computed(()=>{switch(o.variant){case"dots":return Xt;case"bars":return Gt;default:return Kt}});return(i,r)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.value),{class:e.normalizeClass(["inline-block",l.value,o.class]),style:e.normalizeStyle(n.value),size:o.size},null,8,["class","style","size"]))}}),Zt={class:"p-4"},Qt={key:0,class:"absolute top-2 right-2"},Jt={key:1,class:"text-lg font-medium mb-2"},eo={key:2},to=e.defineComponent({__name:"Dialog",props:{title:{},content:{},opened:{type:Boolean},size:{default:"md"},withCloseButton:{type:Boolean,default:!0},onClose:{},position:{default:()=>({bottom:"20px",right:"20px"})},keepMounted:{type:Boolean,default:!1},zIndex:{default:1e3}},setup(s){const o=s,t=e.computed(()=>({xs:"w-[280px]",sm:"w-[320px]",md:"w-[380px]",lg:"w-[440px]",xl:"w-[520px]"})[o.size]);return(l,n)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{"enter-active-class":"transition duration-200 ease-out","enter-from-class":"opacity-0 scale-95","enter-to-class":"opacity-100 scale-100","leave-active-class":"transition duration-200 ease-in","leave-from-class":"opacity-100 scale-100","leave-to-class":"opacity-0 scale-95"},{default:e.withCtx(()=>[l.opened||l.keepMounted?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle({position:"fixed",zIndex:l.zIndex||1e3,...l.position,display:l.opened?"block":"none"}),class:"min-w-[200px]"},[e.createElementVNode("div",{class:e.normalizeClass(["rounded-lg bg-white dark:bg-gray-800 shadow-lg border border-gray-200 dark:border-gray-700",[t.value]])},[e.createElementVNode("div",Zt,[l.withCloseButton?(e.openBlock(),e.createElementBlock("div",Qt,[e.createElementVNode("button",{onClick:n[0]||(n[0]=(...a)=>l.onClose&&l.onClose(...a)),class:"text-gray-400 hover:text-gray-500 dark:text-gray-500 dark:hover:text-gray-400 focus:outline-none"},n[1]||(n[1]=[e.createElementVNode("span",{class:"sr-only"},"Close",-1),e.createElementVNode("svg",{class:"h-5 w-5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)]))])):e.createCommentVNode("",!0),l.title?(e.openBlock(),e.createElementBlock("div",Jt,e.toDisplayString(l.title),1)):e.createCommentVNode("",!0),l.content?(e.openBlock(),e.createElementBlock("div",eo,e.toDisplayString(l.content),1)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"default")])],2)],4)):e.createCommentVNode("",!0)]),_:3})]))}}),J=Math.min,K=Math.max,re=Math.round,L=s=>({x:s,y:s}),oo={left:"right",right:"left",bottom:"top",top:"bottom"},so={start:"end",end:"start"};function ge(s,o,t){return K(s,J(o,t))}function ee(s,o){return typeof s=="function"?s(o):s}function W(s){return s.split("-")[0]}function te(s){return s.split("-")[1]}function Ae(s){return s==="x"?"y":"x"}function he(s){return s==="y"?"height":"width"}function X(s){return["top","bottom"].includes(W(s))?"y":"x"}function ye(s){return Ae(X(s))}function no(s,o,t){t===void 0&&(t=!1);const l=te(s),n=ye(s),a=he(n);let i=n==="x"?l===(t?"end":"start")?"right":"left":l==="start"?"bottom":"top";return o.reference[a]>o.floating[a]&&(i=ie(i)),[i,ie(i)]}function lo(s){const o=ie(s);return[xe(s),o,xe(o)]}function xe(s){return s.replace(/start|end/g,o=>so[o])}function ao(s,o,t){const l=["left","right"],n=["right","left"],a=["top","bottom"],i=["bottom","top"];switch(s){case"top":case"bottom":return t?o?n:l:o?l:n;case"left":case"right":return o?a:i;default:return[]}}function ro(s,o,t,l){const n=te(s);let a=ao(W(s),t==="start",l);return n&&(a=a.map(i=>i+"-"+n),o&&(a=a.concat(a.map(xe)))),a}function ie(s){return s.replace(/left|right|bottom|top/g,o=>oo[o])}function io(s){return{top:0,right:0,bottom:0,left:0,...s}}function Te(s){return typeof s!="number"?io(s):{top:s,right:s,bottom:s,left:s}}function ce(s){const{x:o,y:t,width:l,height:n}=s;return{width:l,height:n,top:t,left:o,right:o+l,bottom:t+n,x:o,y:t}}function Re(s,o,t){let{reference:l,floating:n}=s;const a=X(o),i=ye(o),r=he(i),c=W(o),d=a==="y",u=l.x+l.width/2-n.width/2,f=l.y+l.height/2-n.height/2,y=l[r]/2-n[r]/2;let p;switch(c){case"top":p={x:u,y:l.y-n.height};break;case"bottom":p={x:u,y:l.y+l.height};break;case"right":p={x:l.x+l.width,y:f};break;case"left":p={x:l.x-n.width,y:f};break;default:p={x:l.x,y:l.y}}switch(te(o)){case"start":p[i]-=y*(t&&d?-1:1);break;case"end":p[i]+=y*(t&&d?-1:1);break}return p}const co=async(s,o,t)=>{const{placement:l="bottom",strategy:n="absolute",middleware:a=[],platform:i}=t,r=a.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(o));let d=await i.getElementRects({reference:s,floating:o,strategy:n}),{x:u,y:f}=Re(d,l,c),y=l,p={},m=0;for(let g=0;g<r.length;g++){const{name:x,fn:w}=r[g],{x:h,y:C,data:b,reset:k}=await w({x:u,y:f,initialPlacement:l,placement:y,strategy:n,middlewareData:p,rects:d,platform:i,elements:{reference:s,floating:o}});u=h??u,f=C??f,p={...p,[x]:{...p[x],...b}},k&&m<=50&&(m++,typeof k=="object"&&(k.placement&&(y=k.placement),k.rects&&(d=k.rects===!0?await i.getElementRects({reference:s,floating:o,strategy:n}):k.rects),{x:u,y:f}=Re(d,y,c)),g=-1)}return{x:u,y:f,placement:y,strategy:n,middlewareData:p}};async function Me(s,o){var t;o===void 0&&(o={});const{x:l,y:n,platform:a,rects:i,elements:r,strategy:c}=s,{boundary:d="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:y=!1,padding:p=0}=ee(o,s),m=Te(p),x=r[y?f==="floating"?"reference":"floating":f],w=ce(await a.getClippingRect({element:(t=await(a.isElement==null?void 0:a.isElement(x)))==null||t?x:x.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(r.floating)),boundary:d,rootBoundary:u,strategy:c})),h=f==="floating"?{x:l,y:n,width:i.floating.width,height:i.floating.height}:i.reference,C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(r.floating)),b=await(a.isElement==null?void 0:a.isElement(C))?await(a.getScale==null?void 0:a.getScale(C))||{x:1,y:1}:{x:1,y:1},k=ce(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:r,rect:h,offsetParent:C,strategy:c}):h);return{top:(w.top-k.top+m.top)/b.y,bottom:(k.bottom-w.bottom+m.bottom)/b.y,left:(w.left-k.left+m.left)/b.x,right:(k.right-w.right+m.right)/b.x}}const po=s=>({name:"arrow",options:s,async fn(o){const{x:t,y:l,placement:n,rects:a,platform:i,elements:r,middlewareData:c}=o,{element:d,padding:u=0}=ee(s,o)||{};if(d==null)return{};const f=Te(u),y={x:t,y:l},p=ye(n),m=he(p),g=await i.getDimensions(d),x=p==="y",w=x?"top":"left",h=x?"bottom":"right",C=x?"clientHeight":"clientWidth",b=a.reference[m]+a.reference[p]-y[p]-a.floating[m],k=y[p]-a.reference[p],S=await(i.getOffsetParent==null?void 0:i.getOffsetParent(d));let $=S?S[C]:0;(!$||!await(i.isElement==null?void 0:i.isElement(S)))&&($=r.floating[C]||a.floating[m]);const z=b/2-k/2,O=$/2-g[m]/2-1,I=J(f[w],O),ne=J(f[h],O),Y=I,le=$-g[m]-ne,E=$/2-g[m]/2+z,Q=ge(Y,E,le),R=!c.arrow&&te(n)!=null&&E!==Q&&a.reference[m]/2-(E<Y?I:ne)-g[m]/2<0,A=R?E<Y?E-Y:E-le:0;return{[p]:y[p]+A,data:{[p]:Q,centerOffset:E-Q-A,...R&&{alignmentOffset:A}},reset:R}}}),uo=function(s){return s===void 0&&(s={}),{name:"flip",options:s,async fn(o){var t,l;const{placement:n,middlewareData:a,rects:i,initialPlacement:r,platform:c,elements:d}=o,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:y,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...x}=ee(s,o);if((t=a.arrow)!=null&&t.alignmentOffset)return{};const w=W(n),h=X(r),C=W(r)===r,b=await(c.isRTL==null?void 0:c.isRTL(d.floating)),k=y||(C||!g?[ie(r)]:lo(r)),S=m!=="none";!y&&S&&k.push(...ro(r,g,m,b));const $=[r,...k],z=await Me(o,x),O=[];let I=((l=a.flip)==null?void 0:l.overflows)||[];if(u&&O.push(z[w]),f){const E=no(n,i,b);O.push(z[E[0]],z[E[1]])}if(I=[...I,{placement:n,overflows:O}],!O.every(E=>E<=0)){var ne,Y;const E=(((ne=a.flip)==null?void 0:ne.index)||0)+1,Q=$[E];if(Q)return{data:{index:E,overflows:I},reset:{placement:Q}};let R=(Y=I.filter(A=>A.overflows[0]<=0).sort((A,j)=>A.overflows[1]-j.overflows[1])[0])==null?void 0:Y.placement;if(!R)switch(p){case"bestFit":{var le;const A=(le=I.filter(j=>{if(S){const v=X(j.placement);return v===h||v==="y"}return!0}).map(j=>[j.placement,j.overflows.filter(v=>v>0).reduce((v,es)=>v+es,0)]).sort((j,v)=>j[1]-v[1])[0])==null?void 0:le[0];A&&(R=A);break}case"initialPlacement":R=r;break}if(n!==R)return{reset:{placement:R}}}return{}}}};async function fo(s,o){const{placement:t,platform:l,elements:n}=s,a=await(l.isRTL==null?void 0:l.isRTL(n.floating)),i=W(t),r=te(t),c=X(t)==="y",d=["left","top"].includes(i)?-1:1,u=a&&c?-1:1,f=ee(o,s);let{mainAxis:y,crossAxis:p,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return r&&typeof m=="number"&&(p=r==="end"?m*-1:m),c?{x:p*u,y:y*d}:{x:y*d,y:p*u}}const mo=function(s){return s===void 0&&(s=0),{name:"offset",options:s,async fn(o){var t,l;const{x:n,y:a,placement:i,middlewareData:r}=o,c=await fo(o,s);return i===((t=r.offset)==null?void 0:t.placement)&&(l=r.arrow)!=null&&l.alignmentOffset?{}:{x:n+c.x,y:a+c.y,data:{...c,placement:i}}}}},go=function(s){return s===void 0&&(s={}),{name:"shift",options:s,async fn(o){const{x:t,y:l,placement:n}=o,{mainAxis:a=!0,crossAxis:i=!1,limiter:r={fn:x=>{let{x:w,y:h}=x;return{x:w,y:h}}},...c}=ee(s,o),d={x:t,y:l},u=await Me(o,c),f=X(W(n)),y=Ae(f);let p=d[y],m=d[f];if(a){const x=y==="y"?"top":"left",w=y==="y"?"bottom":"right",h=p+u[x],C=p-u[w];p=ge(h,p,C)}if(i){const x=f==="y"?"top":"left",w=f==="y"?"bottom":"right",h=m+u[x],C=m-u[w];m=ge(h,m,C)}const g=r.fn({...o,[y]:p,[f]:m});return{...g,data:{x:g.x-t,y:g.y-l,enabled:{[y]:a,[f]:i}}}}}};function de(){return typeof window<"u"}function q(s){return be(s)?(s.nodeName||"").toLowerCase():"#document"}function V(s){var o;return(s==null||(o=s.ownerDocument)==null?void 0:o.defaultView)||window}function T(s){var o;return(o=(be(s)?s.ownerDocument:s.document)||window.document)==null?void 0:o.documentElement}function be(s){return de()?s instanceof Node||s instanceof V(s).Node:!1}function N(s){return de()?s instanceof Element||s instanceof V(s).Element:!1}function P(s){return de()?s instanceof HTMLElement||s instanceof V(s).HTMLElement:!1}function Ie(s){return!de()||typeof ShadowRoot>"u"?!1:s instanceof ShadowRoot||s instanceof V(s).ShadowRoot}function oe(s){const{overflow:o,overflowX:t,overflowY:l,display:n}=D(s);return/auto|scroll|overlay|hidden|clip/.test(o+l+t)&&!["inline","contents"].includes(n)}function ho(s){return["table","td","th"].includes(q(s))}function pe(s){return[":popover-open",":modal"].some(o=>{try{return s.matches(o)}catch{return!1}})}function we(s){const o=Ce(),t=N(s)?D(s):s;return t.transform!=="none"||t.perspective!=="none"||(t.containerType?t.containerType!=="normal":!1)||!o&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!o&&(t.filter?t.filter!=="none":!1)||["transform","perspective","filter"].some(l=>(t.willChange||"").includes(l))||["paint","layout","strict","content"].some(l=>(t.contain||"").includes(l))}function yo(s){let o=M(s);for(;P(o)&&!G(o);){if(we(o))return o;if(pe(o))return null;o=M(o)}return null}function Ce(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function G(s){return["html","body","#document"].includes(q(s))}function D(s){return V(s).getComputedStyle(s)}function ue(s){return N(s)?{scrollLeft:s.scrollLeft,scrollTop:s.scrollTop}:{scrollLeft:s.scrollX,scrollTop:s.scrollY}}function M(s){if(q(s)==="html")return s;const o=s.assignedSlot||s.parentNode||Ie(s)&&s.host||T(s);return Ie(o)?o.host:o}function je(s){const o=M(s);return G(o)?s.ownerDocument?s.ownerDocument.body:s.body:P(o)&&oe(o)?o:je(o)}function ke(s,o,t){var l;o===void 0&&(o=[]),t===void 0&&(t=!0);const n=je(s),a=n===((l=s.ownerDocument)==null?void 0:l.body),i=V(n);if(a){const r=Be(i);return o.concat(i,i.visualViewport||[],oe(n)?n:[],r&&t?ke(r):[])}return o.concat(n,ke(n,[],t))}function Be(s){return s.parent&&Object.getPrototypeOf(s.parent)?s.frameElement:null}function ve(s){const o=D(s);let t=parseFloat(o.width)||0,l=parseFloat(o.height)||0;const n=P(s),a=n?s.offsetWidth:t,i=n?s.offsetHeight:l,r=re(t)!==a||re(l)!==i;return r&&(t=a,l=i),{width:t,height:l,$:r}}function Fe(s){return N(s)?s:s.contextElement}function U(s){const o=Fe(s);if(!P(o))return L(1);const t=o.getBoundingClientRect(),{width:l,height:n,$:a}=ve(o);let i=(a?re(t.width):t.width)/l,r=(a?re(t.height):t.height)/n;return(!i||!Number.isFinite(i))&&(i=1),(!r||!Number.isFinite(r))&&(r=1),{x:i,y:r}}const xo=L(0);function He(s){const o=V(s);return!Ce()||!o.visualViewport?xo:{x:o.visualViewport.offsetLeft,y:o.visualViewport.offsetTop}}function bo(s,o,t){return o===void 0&&(o=!1),!t||o&&t!==V(s)?!1:o}function se(s,o,t,l){o===void 0&&(o=!1),t===void 0&&(t=!1);const n=s.getBoundingClientRect(),a=Fe(s);let i=L(1);o&&(l?N(l)&&(i=U(l)):i=U(s));const r=bo(a,t,l)?He(a):L(0);let c=(n.left+r.x)/i.x,d=(n.top+r.y)/i.y,u=n.width/i.x,f=n.height/i.y;if(a){const y=V(a),p=l&&N(l)?V(l):l;let m=y,g=Be(m);for(;g&&l&&p!==m;){const x=U(g),w=g.getBoundingClientRect(),h=D(g),C=w.left+(g.clientLeft+parseFloat(h.paddingLeft))*x.x,b=w.top+(g.clientTop+parseFloat(h.paddingTop))*x.y;c*=x.x,d*=x.y,u*=x.x,f*=x.y,c+=C,d+=b,m=V(g),g=Be(m)}}return ce({width:u,height:f,x:c,y:d})}function $e(s,o){const t=ue(s).scrollLeft;return o?o.left+t:se(T(s)).left+t}function We(s,o,t){t===void 0&&(t=!1);const l=s.getBoundingClientRect(),n=l.left+o.scrollLeft-(t?0:$e(s,l)),a=l.top+o.scrollTop;return{x:n,y:a}}function wo(s){let{elements:o,rect:t,offsetParent:l,strategy:n}=s;const a=n==="fixed",i=T(l),r=o?pe(o.floating):!1;if(l===i||r&&a)return t;let c={scrollLeft:0,scrollTop:0},d=L(1);const u=L(0),f=P(l);if((f||!f&&!a)&&((q(l)!=="body"||oe(i))&&(c=ue(l)),P(l))){const p=se(l);d=U(l),u.x=p.x+l.clientLeft,u.y=p.y+l.clientTop}const y=i&&!f&&!a?We(i,c,!0):L(0);return{width:t.width*d.x,height:t.height*d.y,x:t.x*d.x-c.scrollLeft*d.x+u.x+y.x,y:t.y*d.y-c.scrollTop*d.y+u.y+y.y}}function Co(s){return Array.from(s.getClientRects())}function ko(s){const o=T(s),t=ue(s),l=s.ownerDocument.body,n=K(o.scrollWidth,o.clientWidth,l.scrollWidth,l.clientWidth),a=K(o.scrollHeight,o.clientHeight,l.scrollHeight,l.clientHeight);let i=-t.scrollLeft+$e(s);const r=-t.scrollTop;return D(l).direction==="rtl"&&(i+=K(o.clientWidth,l.clientWidth)-n),{width:n,height:a,x:i,y:r}}function Bo(s,o){const t=V(s),l=T(s),n=t.visualViewport;let a=l.clientWidth,i=l.clientHeight,r=0,c=0;if(n){a=n.width,i=n.height;const d=Ce();(!d||d&&o==="fixed")&&(r=n.offsetLeft,c=n.offsetTop)}return{width:a,height:i,x:r,y:c}}function $o(s,o){const t=se(s,!0,o==="fixed"),l=t.top+s.clientTop,n=t.left+s.clientLeft,a=P(s)?U(s):L(1),i=s.clientWidth*a.x,r=s.clientHeight*a.y,c=n*a.x,d=l*a.y;return{width:i,height:r,x:c,y:d}}function qe(s,o,t){let l;if(o==="viewport")l=Bo(s,t);else if(o==="document")l=ko(T(s));else if(N(o))l=$o(o,t);else{const n=He(s);l={x:o.x-n.x,y:o.y-n.y,width:o.width,height:o.height}}return ce(l)}function Ye(s,o){const t=M(s);return t===o||!N(t)||G(t)?!1:D(t).position==="fixed"||Ye(t,o)}function zo(s,o){const t=o.get(s);if(t)return t;let l=ke(s,[],!1).filter(r=>N(r)&&q(r)!=="body"),n=null;const a=D(s).position==="fixed";let i=a?M(s):s;for(;N(i)&&!G(i);){const r=D(i),c=we(i);!c&&r.position==="fixed"&&(n=null),(a?!c&&!n:!c&&r.position==="static"&&!!n&&["absolute","fixed"].includes(n.position)||oe(i)&&!c&&Ye(s,i))?l=l.filter(u=>u!==i):n=r,i=M(i)}return o.set(s,l),l}function Eo(s){let{element:o,boundary:t,rootBoundary:l,strategy:n}=s;const i=[...t==="clippingAncestors"?pe(o)?[]:zo(o,this._c):[].concat(t),l],r=i[0],c=i.reduce((d,u)=>{const f=qe(o,u,n);return d.top=K(f.top,d.top),d.right=J(f.right,d.right),d.bottom=J(f.bottom,d.bottom),d.left=K(f.left,d.left),d},qe(o,r,n));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function So(s){const{width:o,height:t}=ve(s);return{width:o,height:t}}function Vo(s,o,t){const l=P(o),n=T(o),a=t==="fixed",i=se(s,!0,a,o);let r={scrollLeft:0,scrollTop:0};const c=L(0);if(l||!l&&!a)if((q(o)!=="body"||oe(n))&&(r=ue(o)),l){const y=se(o,!0,a,o);c.x=y.x+o.clientLeft,c.y=y.y+o.clientTop}else n&&(c.x=$e(n));const d=n&&!l&&!a?We(n,r):L(0),u=i.left+r.scrollLeft-c.x-d.x,f=i.top+r.scrollTop-c.y-d.y;return{x:u,y:f,width:i.width,height:i.height}}function ze(s){return D(s).position==="static"}function Ke(s,o){if(!P(s)||D(s).position==="fixed")return null;if(o)return o(s);let t=s.offsetParent;return T(s)===t&&(t=t.ownerDocument.body),t}function Xe(s,o){const t=V(s);if(pe(s))return t;if(!P(s)){let n=M(s);for(;n&&!G(n);){if(N(n)&&!ze(n))return n;n=M(n)}return t}let l=Ke(s,o);for(;l&&ho(l)&&ze(l);)l=Ke(l,o);return l&&G(l)&&ze(l)&&!we(l)?t:l||yo(s)||t}const No=async function(s){const o=this.getOffsetParent||Xe,t=this.getDimensions,l=await t(s.floating);return{reference:Vo(s.reference,await o(s.floating),s.strategy),floating:{x:0,y:0,width:l.width,height:l.height}}};function Do(s){return D(s).direction==="rtl"}const _o={convertOffsetParentRelativeRectToViewportRelativeRect:wo,getDocumentElement:T,getClippingRect:Eo,getOffsetParent:Xe,getElementRects:No,getClientRects:Co,getDimensions:So,getScale:U,isElement:N,isRTL:Do},Lo=mo,Po=go,Oo=uo,Ao=po,To=(s,o,t)=>{const l=new Map,n={platform:_o,...t},a={...n.platform,_c:l};return co(s,o,{...n,platform:a})};function Ro(s){return s!=null&&typeof s=="object"&&"$el"in s}function Ee(s){if(Ro(s)){const o=s.$el;return be(o)&&q(o)==="#comment"?null:o}return s}function Z(s){return typeof s=="function"?s():e.unref(s)}function Mo(s){return{name:"arrow",options:s,fn(o){const t=Ee(Z(s.element));return t==null?{}:Ao({element:t,padding:s.padding}).fn(o)}}}function Ge(s){return typeof window>"u"?1:(s.ownerDocument.defaultView||window).devicePixelRatio||1}function Ue(s,o){const t=Ge(s);return Math.round(o*t)/t}function Io(s,o,t){t===void 0&&(t={});const l=t.whileElementsMounted,n=e.computed(()=>{var $;return($=Z(t.open))!=null?$:!0}),a=e.computed(()=>Z(t.middleware)),i=e.computed(()=>{var $;return($=Z(t.placement))!=null?$:"bottom"}),r=e.computed(()=>{var $;return($=Z(t.strategy))!=null?$:"absolute"}),c=e.computed(()=>{var $;return($=Z(t.transform))!=null?$:!0}),d=e.computed(()=>Ee(s.value)),u=e.computed(()=>Ee(o.value)),f=e.ref(0),y=e.ref(0),p=e.ref(r.value),m=e.ref(i.value),g=e.shallowRef({}),x=e.ref(!1),w=e.computed(()=>{const $={position:p.value,left:"0",top:"0"};if(!u.value)return $;const z=Ue(u.value,f.value),O=Ue(u.value,y.value);return c.value?{...$,transform:"translate("+z+"px, "+O+"px)",...Ge(u.value)>=1.5&&{willChange:"transform"}}:{position:p.value,left:z+"px",top:O+"px"}});let h;function C(){if(d.value==null||u.value==null)return;const $=n.value;To(d.value,u.value,{middleware:a.value,placement:i.value,strategy:r.value}).then(z=>{f.value=z.x,y.value=z.y,p.value=z.strategy,m.value=z.placement,g.value=z.middlewareData,x.value=$!==!1})}function b(){typeof h=="function"&&(h(),h=void 0)}function k(){if(b(),l===void 0){C();return}if(d.value!=null&&u.value!=null){h=l(d.value,u.value,C);return}}function S(){n.value||(x.value=!1)}return e.watch([a,i,r,n],C,{flush:"sync"}),e.watch([d,u],k,{flush:"sync"}),e.watch(n,S,{flush:"sync"}),e.getCurrentScope()&&e.onScopeDispose(b),{x:e.shallowReadonly(f),y:e.shallowReadonly(y),strategy:e.shallowReadonly(p),placement:e.shallowReadonly(m),middlewareData:e.shallowReadonly(g),isPositioned:e.shallowReadonly(x),floatingStyles:w,update:C}}function jo(s){return e.getCurrentScope()?(e.onScopeDispose(s),!0):!1}const vo=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;function Ze(s,o,t={}){const{immediate:l=!0}=t,n=e.ref(!1);let a=null;function i(){a&&(clearTimeout(a),a=null)}function r(){n.value=!1,i()}function c(...d){i(),n.value=!0,a=setTimeout(()=>{n.value=!1,a=null,s(...d)},e.toValue(o))}return l&&(n.value=!0,vo&&c()),jo(r),{isPending:e.readonly(n),start:c,stop:r}}function Qe(s={}){const{openDelay:o=0,closeDelay:t=150,onOpen:l,onClose:n,initiallyOpened:a=!1}=s,i=e.ref(!1),{start:r,stop:c}=Ze(()=>{i.value=!0,l==null||l()},o),{start:d,stop:u}=Ze(()=>{i.value=!1,n==null||n()},t),f=()=>{u(),o===0?(i.value=!0,l==null||l()):r()},y=()=>{c(),t===0?(i.value=!1,n==null||n()):d()};return a&&f(),{isOpen:i,open:f,close:y}}const Se=Symbol("hover-card"),Ve=e.defineComponent({__name:"HoverCardTarget",props:{withWrapper:{type:Boolean,default:!1},wrapperClass:{default:""}},setup(s){return e.inject(Se,null),(o,t)=>o.withWrapper?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(o.wrapperClass)},[e.renderSlot(o.$slots,"default")],2)):e.renderSlot(o.$slots,"default",{key:1})}}),Fo={class:"rounded-lg bg-white dark:bg-gray-800 shadow-lg border border-gray-200 dark:border-gray-700 px-3 py-2"},Je=e.defineComponent({__name:"HoverCard",props:{initiallyOpened:{type:Boolean,default:!1},openDelay:{default:0},closeDelay:{default:150},placement:{default:"bottom"},onOpen:{},onClose:{},offset:{default:8},disabled:{type:Boolean,default:!1},size:{default:"md"},withArrow:{type:Boolean,default:!0},arrowOffset:{default:8},trapFocus:{type:Boolean,default:!0},zIndex:{default:1e3}},setup(s){const o=s,t=e.ref(!1);e.onMounted(()=>{t.value=!0});const l=e.ref(null),n=e.ref(null),a=e.ref(null),{isOpen:i,open:r,close:c}=Qe({openDelay:o.openDelay,closeDelay:o.closeDelay,initiallyOpened:o.initiallyOpened});e.provide(Se,{isOpen:i,open:r,close:c});const{x:d,y:u,strategy:f,middlewareData:y,placement:p,update:m}=Io(n,a,{placement:o.placement,middleware:[Lo(o.offset),Oo({fallbackPlacements:["top","bottom","right","left"].filter(b=>b!==o.placement)}),Po({padding:8}),Mo({element:l})]});e.watch(i,async b=>{b&&await m()});const g=e.computed(()=>{var b,k;return(k=(b=y.value)==null?void 0:b.arrow)==null?void 0:k.x}),x=e.computed(()=>{var b,k;return(k=(b=y.value)==null?void 0:b.arrow)==null?void 0:k.y}),w=e.computed(()=>{switch(p.value){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left";default:return"bottom"}}),h=e.computed(()=>{switch(p.value){case"top":return"translate(-50%, 50%)";case"bottom":return"translate(-50%, -50%)";case"left":return"translate(50%, -50%)";case"right":return"translate(-50%, -50%)";default:return"translate(-50%, -50%)"}}),C=e.computed(()=>({xs:"w-[200px]",sm:"w-[240px]",md:"w-[320px]",lg:"w-[400px]",xl:"w-[480px]"})[o.size]);return(b,k)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"reference",ref:n,class:"relative inline-block",onMouseenter:k[2]||(k[2]=S=>!b.disabled&&e.unref(r)()),onMouseleave:k[3]||(k[3]=S=>!b.disabled&&e.unref(c)())},[e.createVNode(Ve,null,{default:e.withCtx(()=>[e.renderSlot(b.$slots,"target")]),_:3}),t.value?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:"body"},[e.createVNode(e.Transition,{"enter-active-class":"transition duration-200 ease-out","enter-from-class":"opacity-0 translate-y-1","enter-to-class":"opacity-100 translate-y-0","leave-active-class":"transition duration-150 ease-in","leave-from-class":"opacity-100 translate-y-0","leave-to-class":"opacity-0 translate-y-1"},{default:e.withCtx(()=>[e.unref(i)?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"floating",ref:a,style:e.normalizeStyle({position:e.unref(f),top:`${e.unref(u)??0}px`,left:`${e.unref(d)??0}px`,zIndex:b.zIndex||1e3}),class:e.normalizeClass(["min-w-[200px]",[C.value]]),onMouseenter:k[0]||(k[0]=S=>!b.disabled&&e.unref(r)()),onMouseleave:k[1]||(k[1]=S=>!b.disabled&&e.unref(c)())},[e.createElementVNode("div",Fo,[e.renderSlot(b.$slots,"dropdown")]),b.withArrow?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"arrowRef",ref:l,class:"absolute w-2 h-2 rotate-45 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700",style:e.normalizeStyle({position:"absolute",left:`${g.value??0}px`,top:`${x.value??0}px`,[w.value]:"-1px","z-index":-1,"transform-origin":"center",transform:`rotate(45deg) ${h.value}`})},null,4)):e.createCommentVNode("",!0)],38)):e.createCommentVNode("",!0)]),_:3})])):e.createCommentVNode("",!0)],544))}});Object.assign(Je,{Target:Ve});const Ho={},Wo={key:0,class:"badge-section mr-2"},qo={class:"badge-label"},Yo={key:1,class:"badge-section ml-2"},Ko=e.defineComponent({__name:"Badge",props:{size:{default:"md"},circle:{type:Boolean,default:!1},radius:{default:"xl"},color:{default:"primary"},gradient:{},leftSection:{},rightSection:{},fullWidth:{type:Boolean,default:!1},variant:{default:"filled"}},setup(s){const o=s,t=a=>({none:"rounded-none",xs:"rounded",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",xl:"rounded-2xl",full:"rounded-full"})[a]||"rounded-lg",l=a=>`relative pl-6 before:absolute before:left-2 before:top-1/2 before:-translate-y-1/2 before:w-2 before:h-2 before:rounded-full before:bg-${a}-500`,n=e.computed(()=>{var f,y;const a="inline-flex items-center justify-center font-medium",i=o.variant==="gradient"?`bg-gradient-to-r from-${(f=o.gradient)==null?void 0:f.from} to-${(y=o.gradient)==null?void 0:y.to} text-white`:F(o.color,o.variant),r=_(o.size,"badge"),c=t(o.radius),d=o.variant==="dot"?l(o.color):"";return[a,i,r,c,d,{"aspect-square p-0":o.circle,"w-full":o.fullWidth}].filter(Boolean).join(" ")});return(a,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(n.value)},[a.leftSection?(e.openBlock(),e.createElementBlock("span",Wo,[typeof a.leftSection=="string"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(a.leftSection),1)],64)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.leftSection),{key:1}))])):e.createCommentVNode("",!0),e.createElementVNode("span",qo,[e.renderSlot(a.$slots,"default")]),a.rightSection?(e.openBlock(),e.createElementBlock("span",Yo,[typeof a.rightSection=="string"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(a.rightSection),1)],64)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.rightSection),{key:1}))])):e.createCommentVNode("",!0)],2))}}),rs="",Xo={mounted(s,o){s._clickOutside=t=>{const l=t.target;s===l||s.contains(l)||o.value(t)},document.addEventListener("click",s._clickOutside,!0),document.addEventListener("touchstart",s._clickOutside,!0)},unmounted(s){s._clickOutside&&(document.removeEventListener("click",s._clickOutside,!0),document.removeEventListener("touchstart",s._clickOutside,!0))}};function Go(s){return{none:"rounded-none",sm:"rounded-sm",md:"rounded",lg:"rounded-lg",xl:"rounded-xl",full:"rounded-full"}[s]}const Uo=["data-active"],Zo=e.defineComponent({__name:"Dropdown",props:{size:{default:"md"},radius:{default:"md"},open:{type:Boolean,default:!1},buttonClasses:{default:""},dropdownClasses:{default:""},placement:{default:"bottom"},disabled:{type:Boolean,default:!1},containerClasses:{default:""},showArrow:{type:Boolean,default:!0},disabledText:{default:""},parentPositionRelative:{type:Boolean,default:!0}},emits:["close","update:open"],setup(s,{emit:o}){const t=s,l=o,n=e.ref(t.open),a=e.ref(0),i=e.ref(null),r=e.computed(()=>_(t.size,"dropdown")),c=e.computed(()=>Go(t.radius)),d=e.computed(()=>({"bottom-full mb-2":t.placement==="top","mt-2":t.placement==="bottom"}));function u(){n.value=!1,l("close"),l("update:open",!1)}e.provide("dropdownClose",u);function f(){t.disabled||(n.value?(n.value=!1,l("close"),l("update:open",!1)):(n.value=!0,l("update:open",!0),setTimeout(()=>{var m,g;(m=i.value)==null||m.focus();const p=(g=i.value)==null?void 0:g.querySelector(".active");p==null||p.scrollIntoView({behavior:"smooth"})},100)))}function y(p){i.value&&(p.key==="ArrowUp"&&a.value>0?(p.preventDefault(),a.value--):p.key==="ArrowDown"&&a.value<i.value.children.length-1&&(p.preventDefault(),a.value++))}return(p,m)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cstu-inline-block cstu-text-left",[{"cstu-z-[100]":n.value},{"cstu-relative":p.parentPositionRelative},{"cstu-grayscale cstu-filter cstu-cursor-not-allowed cstu-opacity-70":p.disabled},p.containerClasses]])},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["cstu-text-gray-500 cstu-inline-flex cstu-overflow-hidden cstu-text-ellipsis cstu-whitespace-pre cstu-justify-between cstu-items-center cstu-w-full cstu-focus:cstu-outline-none",[c.value,r.value,p.buttonClasses,{"pointer-events-none":p.disabled},`${p.buttonClasses?p.buttonClasses:"cstu-border cstu-border-gray-400/20 hover:cstu-bg-gray-100/50 hover:cstu-border-gray-400/25 "}`]]),"aria-expanded":"true","aria-haspopup":"true",onClick:f},[e.renderSlot(p.$slots,"icon"),e.renderSlot(p.$slots,"selected",{},()=>[m[0]||(m[0]=e.createTextVNode("Select"))]),p.showArrow?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["cstu-transition cstu-leading-none",{"cstu-rotate-180":n.value}])},[e.renderSlot(p.$slots,"arrow",{},()=>[m[1]||(m[1]=e.createStaticVNode('<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="none"><g clip-path="url(#clip0_33663_12905)"><path d="M6 8.95312C5.91113 8.95312 5.82739 8.93604 5.74878 8.90186C5.67017 8.86768 5.6001 8.81982 5.53857 8.7583L0.93457 4.1543C0.886719 4.09961 0.845703 4.03467 0.811523 3.95947C0.777344 3.88428 0.760254 3.80225 0.760254 3.71338C0.760254 3.53564 0.823486 3.38354 0.949951 3.25708C1.07642 3.13062 1.23193 3.06738 1.4165 3.06738C1.49854 3.06738 1.57715 3.08276 1.65234 3.11353C1.72754 3.14429 1.7959 3.18701 1.85742 3.2417L6 7.40479L10.1426 3.2417C10.2041 3.18701 10.2725 3.14429 10.3477 3.11353C10.4229 3.08276 10.5015 3.06738 10.5835 3.06738C10.7681 3.06738 10.9236 3.13062 11.05 3.25708C11.1765 3.38354 11.2397 3.53564 11.2397 3.71338C11.2397 3.80225 11.2227 3.88428 11.1885 3.95947C11.1543 4.03467 11.1133 4.09961 11.0654 4.1543L6.46143 8.7583C6.3999 8.81982 6.32983 8.86768 6.25122 8.90186C6.17261 8.93604 6.08887 8.95312 6 8.95312Z" fill="#99A3A9"></path></g><defs><clipPath id="clip0_33663_12905"><rect width="10.5" height="11" fill="white" transform="matrix(1 0 0 -1 0.75 11.5)"></rect></clipPath></defs></svg>',1))])],2)):e.createCommentVNode("",!0)],2),e.createVNode(e.Transition,{"enter-active-class":"transition ease-out duration-100","enter-from-class":"transform opacity-0 scale-95","enter-to-class":"transform opacity-100 scale-100","leave-active-class":"transition ease-in duration-75","leave-from-class":"transform opacity-100 scale-100","leave-to-class":"transform opacity-0 scale-95"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(["max-h-72 px-[12px] py-[13px] min-w-[225px] overflow-y-auto origin-top-left absolute left-0 w-full rounded-lg cstu-shadow-custom bg-white focus:outline-none z-50",[d.value,p.dropdownClasses,c.value]])},[e.createElementVNode("div",{ref_key:"dropdownList",ref:i,class:"cstu-flex cstu-flex-col cstu-gap-[11px]",role:"menu","aria-orientation":"vertical","aria-labelledby":"menu-button","data-active":a.value,tabindex:"-1",onKeydown:y},[e.renderSlot(p.$slots,"default")],40,Uo)],2),[[e.vShow,n.value]])]),_:3})],2)),[[e.unref(Xo),u]])}}),Qo=e.defineComponent({__name:"DropdownItem",props:{disabled:{type:Boolean,default:!1},closeOnClick:{type:Boolean,default:!0},class:{default:""},selected:{type:Boolean,default:!1}},emits:["click"],setup(s,{emit:o}){const t=s,l=o,n=e.inject("dropdownClose",()=>{}),a=e.computed(()=>t.class);function i(){t.disabled||(t.closeOnClick&&n(),l("click"))}return(r,c)=>(e.openBlock(),e.createElementBlock("div",{role:"menuitem",tabindex:"-1",class:e.normalizeClass(["block cursor-pointer hover:cstu-bg-blue-50 active:cstu-bg-blue-50 rounded-lg","py-[5.5px] pr-[13.5px] pl-[10.5px]",{"cursor-not-allowed bg-gray-100":r.disabled},{"cstu-bg-blue-50":r.selected},a.value]),onClick:i},[e.renderSlot(r.$slots,"default",{selected:r.selected})],2))}}),et=e.defineComponent({__name:"ListItem",props:{disabled:{type:Boolean,default:!1},selected:{type:Boolean,default:!1},class:{default:""},selectedClass:{default:""}},emits:["click"],setup(s,{emit:o}){const t=s,l=o,n=e.computed(()=>t.class);function a(){t.disabled||l("click")}return(i,r)=>(e.openBlock(),e.createElementBlock("div",{role:"listitem",tabindex:"-1",class:e.normalizeClass(["block cursor-pointer rounded-lg","py-[5.5px] pr-[13.5px] pl-[10.5px]",{"hover:cstu-bg-blue-50 active:cstu-bg-blue-50":!i.disabled},{"cursor-not-allowed bg-gray-100 ":i.disabled},{[i.selectedClass||"cstu-bg-blue-50"]:i.selected&&!i.disabled},n.value]),onClick:a},[e.renderSlot(i.$slots,"default",{selected:i.selected})],2))}}),Jo=e.defineComponent({__name:"Collapsible",props:{defaultOpen:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},class:{default:""},hideArrow:{type:Boolean,default:!1},buttonClass:{default:""},selectedClass:{default:""}},setup(s){const o=s,t=e.ref(o.defaultOpen),l=e.computed(()=>o.class);function n(){o.disabled||(t.value=!t.value)}return(a,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["space-y-1",l.value])},[e.createVNode(et,{role:"button",disabled:a.disabled,class:e.normalizeClass(["flex items-center justify-between",a.buttonClass].join(" ")),"selected-class":a.selectedClass,selected:t.value,onClick:n},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"trigger"),a.hideArrow?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("svg",{key:0,xmlns:"http://www.w3.org/2000/svg",width:"10",height:"7",viewBox:"0 0 10 7",fill:"none",class:e.normalizeClass(["transform transition-transform duration-200",{"rotate-180":t.value}])},i[0]||(i[0]=[e.createElementVNode("path",{d:"M5.64844 0.919922L9.81641 5.08789C9.91667 5.18815 9.9668 5.3099 9.9668 5.45312C9.9668 5.59635 9.91667 5.7181 9.81641 5.81836L9.34375 6.29102C9.24349 6.39128 9.12174 6.44499 8.97852 6.45215C8.83529 6.45931 8.71354 6.41276 8.61328 6.3125L5.2832 2.98242L1.95312 6.3125C1.85286 6.41276 1.73112 6.45931 1.58789 6.45215C1.44466 6.44499 1.32292 6.39128 1.22266 6.29102L0.75 5.81836C0.649739 5.7181 0.599609 5.59635 0.599609 5.45312C0.599609 5.3099 0.649739 5.18815 0.75 5.08789L4.91797 0.919922C5.01823 0.805339 5.13997 0.748047 5.2832 0.748047C5.42643 0.748047 5.54818 0.805339 5.64844 0.919922Z",fill:"#75797C"},null,-1)]),2))]),_:3},8,["disabled","class","selected-class","selected"]),e.createVNode(e.Transition,{"enter-active-class":"transition duration-100 ease-out","enter-from-class":"transform scale-95 opacity-0","enter-to-class":"transform scale-100 opacity-100","leave-active-class":"transition duration-75 ease-in","leave-from-class":"transform scale-100 opacity-100","leave-to-class":"transform scale-95 opacity-0"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",null,[e.renderSlot(a.$slots,"default")],512),[[e.vShow,t.value]])]),_:3})],2))}}),is="";B.Alert=Wt,B.Badge=Ko,B.Button=it,B.Checkbox=ut,B.Chip=Pt,B.Collapse=qt,B.Collapsible=Jo,B.Dialog=to,B.Dropdown=Zo,B.DropdownItem=Qo,B.HoverCard=Je,B.HoverCardTarget=Ve,B.Indicator=Rt,B.ListItem=et,B.Loader=Ut,B.Progress=It,B.Radio=ht,B.Select=Nt,B.TextInput=Ct,B.composables=Ho,B.hoverCardInjectionKey=Se,B.useHoverCard=Qe,Object.defineProperty(B,Symbol.toStringTag,{value:"Module"})});