@contentstudio/ui 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +180 -178
- package/dist/index.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(B,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(B=typeof globalThis<"u"?globalThis:B||self,e(B.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"})});
|
|
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=(o,s,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[o];if(!r||s==="default")return"";if(s==="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(s){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=(o,s)=>{if(s==="filled")return"cstu-text-white";const t=fe[o];return`cstu-text-${t.base}-${t.main}`},st=(o,s)=>{if(s==="filled")return"cstu-text-white";const t=fe[o];return`cstu-text-${t.base}-${t.main}`},ot=o=>{const s=["cstu-shadow-sm","cstu-transition-all cstu-duration-200"];switch(o){case"filled":s.push("cstu-border-transparent");break;case"light":s.push("cstu-border");break;case"outline":s.push("cstu-border");break;case"subtle":s.push("cstu-shadow-none");break;case"white":s.push("cstu-border");break;default:s.push("cstu-border")}return s.join(" ")},me={button:{xs:{height:"cstu-h-[30px]",gap:"cstu-gap-[0.55rem]",padding:{x:"cstu-px-[0.67rem]",y:"cstu-py-[0.67rem]"},text:"cstu-text-xs cstu-leading-none",icon:"cstu-w-3 cstu-h-3"},sm:{height:"cstu-h-[36px]",gap:"cstu-gap-[0.66rem]",padding:{x:"cstu-px-[0.8rem]",y:"cstu-py-[0.8rem]"},text:"cstu-text-sm cstu-leading-none",icon:"cstu-w-4 cstu-h-4"},md:{height:"cstu-h-[40px]",gap:"cstu-gap-[0.74rem]",padding:{x:"cstu-px-[0.89rem]",y:"cstu-py-[0.89rem]"},text:"cstu-text-base cstu-leading-none",icon:"cstu-w-5 cstu-h-5"},lg:{height:"cstu-h-[45px]",gap:"cstu-gap-[0.83rem]",padding:{x:"cstu-px-4",y:"cstu-py-4"},text:"cstu-text-lg cstu-leading-none",icon:"cstu-w-6 cstu-h-6"},xl:{height:"cstu-h-[50px]",gap:"cstu-gap-[0.92rem]",padding:{x:"cstu-px-[1.11rem]",y:"cstu-py-[1.11rem]"},text:"cstu-text-xl cstu-leading-none",icon:"cstu-w-7 cstu-h-7"}},badge:{xs:{padding:{x:"cstu-px-2",y:"cstu-py-0.5"},text:"cstu-text-xs",icon:"cstu-w-3 cstu-h-3"},sm:{padding:{x:"cstu-px-2.5",y:"cstu-py-1"},text:"cstu-text-sm",icon:"cstu-w-3.5 cstu-h-3.5"},md:{padding:{x:"cstu-px-3",y:"cstu-py-1.5"},text:"cstu-text-base",icon:"cstu-w-4 cstu-h-4"},lg:{padding:{x:"cstu-px-4",y:"cstu-py-2"},text:"cstu-text-lg",icon:"cstu-w-5 cstu-h-5"},xl:{padding:{x:"cstu-px-5",y:"cstu-py-2.5"},text:"cstu-text-xl",icon:"cstu-w-6 cstu-h-6"}},input:{xs:{padding:{x:"cstu-px-2",y:"cstu-py-1"},text:"cstu-text-xs",height:"cstu-h-7"},sm:{padding:{x:"cstu-px-3",y:"cstu-py-1.5"},text:"cstu-text-sm",height:"cstu-h-8"},md:{padding:{x:"cstu-px-3",y:"cstu-py-2"},text:"cstu-text-base",height:"cstu-h-10"},lg:{padding:{x:"cstu-px-4",y:"cstu-py-2.5"},text:"cstu-text-lg",height:"cstu-h-11"},xl:{padding:{x:"cstu-px-4",y:"cstu-py-3"},text:"cstu-text-xl",height:"cstu-h-12"}},notification:{xs:{padding:{x:"cstu-px-3",y:"cstu-py-2"},text:"cstu-text-xs"},sm:{padding:{x:"cstu-px-4",y:"cstu-py-2.5"},text:"cstu-text-sm"},md:{padding:{x:"cstu-px-4",y:"cstu-py-3"},text:"cstu-text-base"},lg:{padding:{x:"cstu-px-5",y:"cstu-py-4"},text:"cstu-text-lg"},xl:{padding:{x:"cstu-px-6",y:"cstu-py-5"},text:"cstu-text-xl"}},switch:{xs:{padding:{x:"cstu-px-0",y:"cstu-py-0"},text:"cstu-text-xs",height:"cstu-h-4"},sm:{padding:{x:"cstu-px-0",y:"cstu-py-0"},text:"cstu-text-sm",height:"cstu-h-5"},md:{padding:{x:"cstu-px-0",y:"cstu-py-0"},text:"cstu-text-base",height:"cstu-h-6"},lg:{padding:{x:"cstu-px-0",y:"cstu-py-0"},text:"cstu-text-lg",height:"cstu-h-7"},xl:{padding:{x:"cstu-px-0",y:"cstu-py-0"},text:"cstu-text-xl",height:"cstu-h-8"}},chip:{xs:{padding:{x:"cstu-px-1.5",y:"cstu-py-0.5"},text:"cstu-text-xs",icon:"cstu-w-2.5 cstu-h-2.5"},sm:{padding:{x:"cstu-px-2",y:"cstu-py-1"},text:"cstu-text-sm",icon:"cstu-w-3 cstu-h-3"},md:{padding:{x:"cstu-px-2.5",y:"cstu-py-1.5"},text:"cstu-text-base",icon:"cstu-w-3.5 cstu-h-3.5"},lg:{padding:{x:"cstu-px-3",y:"cstu-py-2"},text:"cstu-text-lg",icon:"cstu-w-4 cstu-h-4"},xl:{padding:{x:"cstu-px-3.5",y:"cstu-py-2.5"},text:"cstu-text-xl",icon:"cstu-w-4.5 cstu-h-4.5"}},checkbox:{xs:{padding:{x:"cstu-px-0",y:"cstu-py-0"},text:"cstu-text-xs",icon:"cstu-w-2 cstu-h-2"},sm:{padding:{x:"cstu-px-0",y:"cstu-py-0"},text:"cstu-text-sm",icon:"cstu-w-2.5 cstu-h-2.5"},md:{padding:{x:"cstu-px-0",y:"cstu-py-0"},text:"cstu-text-base",icon:"cstu-w-3 cstu-h-3"},lg:{padding:{x:"cstu-px-0",y:"cstu-py-0"},text:"cstu-text-lg",icon:"cstu-w-4 cstu-h-4"},xl:{padding:{x:"cstu-px-0",y:"cstu-py-0"},text:"cstu-text-xl",icon:"cstu-w-5 cstu-h-5"}},indicator:{xs:{padding:{x:"cstu-px-0.5",y:"cstu-py-0.5"},text:"cstu-text-[10px]",height:"cstu-h-3.5 cstu-min-w-3.5"},sm:{padding:{x:"cstu-px-1",y:"cstu-py-0.5"},text:"cstu-text-[11px]",height:"cstu-h-4 cstu-min-w-4"},md:{padding:{x:"cstu-px-1.5",y:"cstu-py-0.5"},text:"cstu-text-xs",height:"cstu-h-5 cstu-min-w-5"},lg:{padding:{x:"cstu-px-2",y:"cstu-py-0.5"},text:"cstu-text-xs",height:"cstu-h-6 cstu-min-w-6"},xl:{padding:{x:"cstu-px-2.5",y:"cstu-py-0.5"},text:"cstu-text-sm",height:"cstu-h-7 cstu-min-w-7"}},progress:{xs:{padding:{x:"cstu-px-0",y:"cstu-py-0"},text:"cstu-text-xs",height:"cstu-h-1"},sm:{padding:{x:"cstu-px-0",y:"cstu-py-0"},text:"cstu-text-sm",height:"cstu-h-1.5"},md:{padding:{x:"cstu-px-0",y:"cstu-py-0"},text:"cstu-text-base",height:"cstu-h-2"},lg:{padding:{x:"cstu-px-0",y:"cstu-py-0"},text:"cstu-text-sm",height:"cstu-h-6"},xl:{padding:{x:"cstu-px-0",y:"cstu-py-0"},text:"cstu-text-base",height:"cstu-h-8"}},alert:{xs:{padding:{x:"cstu-px-3",y:"cstu-py-2"},text:"cstu-text-xs",icon:"cstu-w-4 cstu-h-4"},sm:{padding:{x:"cstu-px-3",y:"cstu-py-2.5"},text:"cstu-text-sm",icon:"cstu-w-5 cstu-h-5"},md:{padding:{x:"cstu-px-4",y:"cstu-py-3"},text:"cstu-text-base",icon:"cstu-w-5 cstu-h-5"},lg:{padding:{x:"cstu-px-5",y:"cstu-py-4"},text:"cstu-text-lg",icon:"cstu-w-6 cstu-h-6"},xl:{padding:{x:"cstu-px-6",y:"cstu-py-5"},text:"cstu-text-xl",icon:"cstu-w-7 cstu-h-7"}},segmentedControl:{xs:{gap:"cstu-gap-[8px]",padding:{x:"cstu-px-[10.5px]",y:"cstu-py-[3.5px]"},text:"cstu-text-xs",height:"cstu-h-6"},sm:{gap:"cstu-gap-[9px]",padding:{x:"cstu-px-[12px]",y:"cstu-py-[4px]"},text:"cstu-text-sm",height:"cstu-h-8"},md:{gap:"cstu-gap-[10px]",padding:{x:"cstu-px-[13.5px]",y:"cstu-py-[4.5px]"},text:"cstu-text-base",height:"cstu-h-10"},lg:{gap:"cstu-gap-[11px]",padding:{x:"cstu-px-[15px]",y:"cstu-py-[5px]"},text:"cstu-text-lg",height:"cstu-h-12"},xl:{gap:"cstu-gap-[12px]",padding:{x:"cstu-px-[16.5px]",y:"cstu-py-[5.5px]"},text:"cstu-text-xl",height:"cstu-h-14"}},segmentedControlContainer:{xs:{gap:"cstu-gap-[5.25px]",padding:{x:"cstu-px-[5.25px]",y:"cstu-py-[5.25px]"}},sm:{gap:"cstu-gap-[6px]",padding:{x:"cstu-px-[6px]",y:"cstu-py-[6px]"}},md:{gap:"cstu-gap-[6.75px]",padding:{x:"cstu-px-[6.75px]",y:"cstu-py-[6.75px]"}},lg:{gap:"cstu-gap-[7.5px]",padding:{x:"cstu-px-[7.5px]",y:"cstu-py-[7.5px]"}},xl:{gap:"cstu-gap-[8.25px]",padding:{x:"cstu-px-[8.25px]",y:"cstu-py-[8.25px]"}}},dropdown:{xs:{padding:{x:"cstu-px-[12px]",y:"cstu-py-[7px]"},text:"cstu-text-xs",height:void 0,icon:void 0,gap:"cstu-gap-[9px]"},sm:{padding:{x:"cstu-px-[12px]",y:"cstu-py-[7px]"},text:"cstu-text-sm",height:void 0,icon:void 0,gap:"cstu-gap-[9px]"},md:{padding:{x:"cstu-px-[12px]",y:"cstu-py-[7px]"},text:"cstu-text-base",height:void 0,icon:void 0,gap:"cstu-gap-[9px]"},lg:{padding:{x:"cstu-px-[12px]",y:"cstu-py-[7px]"},text:"cstu-text-lg",height:void 0,icon:void 0,gap:"cstu-gap-[9px]"},xl:{padding:{x:"cstu-px-[12px]",y:"cstu-py-[7px]"},text:"cstu-text-xl",height:void 0,icon:void 0,gap:"cstu-gap-[9px]"}}},_=(o,s)=>{var t,l;if(typeof s=="string"){const n=me[s][o];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 s[o]},De=(o,s)=>me[s][o].icon||"",ae=(o,s)=>me[s][o].height||"",ge=o=>{switch(o){case"xs":return"cstu-text-xs";case"sm":return"cstu-text-sm";case"md":return"cstu-text-base";case"lg":return"cstu-text-lg";case"xl":return"cstu-text-xl";default:return"cstu-text-base"}},_e=o=>{switch(o){case"xs":return"cstu-space-x-1";case"sm":return"cstu-space-x-2";case"md":return"cstu-space-x-3";case"lg":return"cstu-space-x-4";case"xl":return"cstu-space-x-5";default:return"cstu-space-x-3"}},H=o=>{const s=[];return o.disabled&&s.push("cstu-opacity-50 cstu-cursor-not-allowed cstu-pointer-events-none"),o.loading&&s.push("cstu-cursor-wait"),o.active&&s.push("cstu-ring-2 cstu-ring-offset-2"),o.error&&s.push("cstu-border-red-300 focus:cstu-ring-red-500/20 focus:cstu-border-red-500"),o.success&&s.push("cstu-border-green-300 focus:cstu-ring-green-500/20 focus:cstu-border-green-500"),s.join(" ")},nt=o=>{const s=[];return o.valid&&s.push("cstu-border-green-300 focus:cstu-ring-green-500/20 focus:cstu-border-green-500"),o.invalid&&s.push("cstu-border-red-300 focus:cstu-ring-red-500/20 focus:cstu-border-red-500"),o.pending&&s.push("cstu-border-yellow-300 focus:cstu-ring-yellow-500/20 focus:cstu-border-yellow-500"),s.join(" ")},lt=(o,s="primary")=>{const t=[];return o.hover&&t.push(`hover:cstu-bg-${s}-50`),o.active&&t.push(`active:cstu-bg-${s}-100`),o.focus&&t.push(`focus:cstu-outline-none focus:cstu-ring-2 focus:cstu-ring-${s}-500/20 focus:cstu-border-${s}-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:o=>!0},setup(o,{emit:s}){const t=o,l=s,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}),p=_(t.size,"button"),f=t.leftSection||t.rightSection?De(t.size,"button"):"",y=H({disabled:t.disabled,loading:t.loading}),u=ae(t.size,"button"),m=a(t.radius);return[c,d,p,u,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=o=>{const s=["cstu-relative"];o.fullWidth&&s.push("cstu-w-full");const t=H({disabled:o.disabled,error:o.error,required:o.required||o.withAsterisk});return t&&s.push(t),s.join(" ")},Pe=o=>{const s=["cstu-block","cstu-font-medium","cstu-mb-1"];switch(o.size){case"xs":s.push("cstu-text-xs");break;case"sm":s.push("cstu-text-sm");break;case"md":s.push("cstu-text-base");break;case"lg":s.push("cstu-text-lg");break;case"xl":s.push("cstu-text-xl");break;default:s.push("cstu-text-sm")}return o.error?s.push("cstu-text-red-500"):o.disabled?s.push("cstu-text-gray-400"):s.push("cstu-text-gray-700"),(o.required||o.withAsterisk)&&s.push('after:cstu-content-["*"] after:cstu-ml-0.5 after:cstu-text-red-500'),s.join(" ")},Oe=o=>{const s=["cstu-mt-1","cstu-text-sm"];return o.error?s.push("cstu-text-red-500"):o.disabled?s.push("cstu-text-gray-400"):s.push("cstu-text-gray-500"),s.join(" ")},ct=["aria-disabled","onKeydown"],dt={key:2,class:"cstu-text-sm cstu-text-red-500 cstu-mt-0.5"},ut={name:"Checkbox"},pt=e.defineComponent({...ut,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(o,{emit:s}){const t=o,l=s,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":""]),p={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-${p[t.color]}`:`cstu-bg-${p[t.color]} cstu-border-${p[t.color]}`:"cstu-bg-white cstu-border cstu-border-gray-400/50"]),y=e.computed(()=>[t.variant==="outlined"&&(n.value||t.indeterminate)?`cstu-text-${p[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]":""]),u=e.computed(()=>Le({disabled:t.disabled,error:t.error}));return(m,g)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([u.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,"cstu-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(o,{emit:s}){const t=o,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=s,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"]),p=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})),u=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:"cstu-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([p.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(u.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(o){const s=o,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=_(s.size,"input"),i=_(s.size,"input"),r=H({disabled:s.disabled,error:s.withError||!!s.error}),c=t(s.radius),d={left:s.leftSection?"pl-10":"",right:s.rightSection?"pr-10":""},p=s.disabled?"":[s.withError||s.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,p].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(o,{emit:s}){const t=o,l=s,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(" ")}),p=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)},u=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?p.value&&t.searchable&&(a.value=p.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(p.value?p.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&&u(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(o,{emit:s}){const t=o,l=s,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(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",n.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",_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),p.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",p.loading?"opacity-75":""])},e.toDisplayString(p.label),3)],10,Dt))}}),Ot=(o,s=0)=>{const t={position:"absolute",transform:"translate(50%, -50%)"},[l,n]=o.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%)"),s){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(${s}px)`),(n==="start"||n==="end")&&(t.transform=`translate(${a}, ${i}) translateX(${n==="start"?-s:s}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(o){const s=o,t=e.computed(()=>[s.inline?"inline-block":"block","relative"]),l=e.computed(()=>({...s.inline&&{display:"inline-block"}})),n=e.computed(()=>["flex items-center justify-center","absolute","select-none","rounded-full",ae(s.size,"indicator"),_(s.size,"indicator"),!s.disabled&&`bg-${s.color==="primary"?"blue":s.color}-600 text-white`,s.disabled&&"bg-gray-200 text-gray-500",s.withBorder&&"border-2 border-white dark:border-gray-900",s.processing&&"animate-pulse"]),a=e.computed(()=>({...Ot(s.position,s.offset),zIndex:s.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))}}),eo="",Rt=((o,s)=>{const t=o.__vccOpts||o;for(const[l,n]of s)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(o){return(s,t)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["relative w-full rounded-sm overflow-hidden","bg-gray-100",e.unref(ae)(s.size,"progress")]),role:"progressbar","aria-valuenow":s.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)(s.color||"primary","filled"),{"bg-striped":s.striped&&!s.animated,"bg-striped animate-progress":s.animated}]),style:e.normalizeStyle({width:`${s.value}%`})},[s.label&&(s.size==="lg"||s.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(ge)(s.size)])},e.toDisplayString(s.label),3)):e.createCommentVNode("",!0)],6)],10,Mt))}}),so="",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(o,{emit:s}){const t=o,l=s,n=e.computed(()=>F(t.color,t.variant,{hover:!1,active:!1,focus:!1,disabled:t.disabled})),a=e.computed(()=>ot(t.variant)),i=e.computed(()=>tt(t.color,t.variant)),r=e.computed(()=>st(t.color,t.variant)),c=e.computed(()=>_(t.size,"alert")),d=e.computed(()=>De(t.size,"alert")),p=e.computed(()=>ge(t.size)),f=e.computed(()=>_e(t.size)),y=e.computed(()=>H({disabled:t.disabled,loading:t.loading})),u=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,u.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",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-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(o){const s=o,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(s.size)),i=e.computed(()=>n[s.size]),r=e.computed(()=>s.disableTransition?"":`transition-[height] ease-in-out duration-${s.duration}`),c=e.computed(()=>({enter:s.duration,leave:s.duration})),d=g=>{g.style.height="0",g.style.overflow="hidden"},p=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},u=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:p,onAfterEnter:f,onBeforeLeave:y,onLeave:u,onAfterLeave:m},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(["overflow-hidden",a.value,r.value,s.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(o){const s={xs:"12px",sm:"16px",md:"24px",lg:"36px",xl:"48px"},t=o,l=e.computed(()=>{const n=parseInt(s[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:s[t.size],height:s[t.size],borderWidth:l.value})},null,4)]))}}),oo="",Xt=e.defineComponent({__name:"DotsLoader",props:{size:{default:"md"}},setup(o){const s={xs:"12px",sm:"16px",md:"24px",lg:"36px",xl:"48px"},t=o,l=e.computed(()=>`${parseInt(s[t.size])/3}px`),n=e.computed(()=>`${parseInt(s[t.size])/6}px`);return(a,i)=>(e.openBlock(),e.createElementBlock("span",{class:"inline-flex items-center",style:e.normalizeStyle({gap:n.value,height:s[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))}}),no="",Gt=e.defineComponent({__name:"BarsLoader",props:{size:{default:"md"}},setup(o){const s={xs:"12px",sm:"16px",md:"24px",lg:"36px",xl:"48px"},t=o,l=e.computed(()=>`${parseInt(s[t.size])/6}px`);return(n,a)=>(e.openBlock(),e.createElementBlock("span",{class:"inline-flex",style:e.normalizeStyle({gap:l.value,width:s[t.size],height:`${parseInt(s[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))}}),lo="",Ut=e.defineComponent({__name:"Loader",props:{variant:{default:"oval"},color:{default:"primary"},size:{default:"md"},class:{}},setup(o){const s=o,t=i=>/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(i),l=e.computed(()=>!s.color||t(s.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"}[s.color]||""),n=e.computed(()=>!s.color||!t(s.color)?{}:{color:s.color}),a=e.computed(()=>{switch(s.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,s.class]),style:e.normalizeStyle(n.value),size:s.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"},es={key:2},ts=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 s=o,t=e.computed(()=>({xs:"w-[280px]",sm:"w-[320px]",md:"w-[380px]",lg:"w-[440px]",xl:"w-[520px]"})[s.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",es,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=o=>({x:o,y:o}),ss={left:"right",right:"left",bottom:"top",top:"bottom"},os={start:"end",end:"start"};function he(o,s,t){return K(o,J(s,t))}function ee(o,s){return typeof o=="function"?o(s):o}function W(o){return o.split("-")[0]}function te(o){return o.split("-")[1]}function Ae(o){return o==="x"?"y":"x"}function ye(o){return o==="y"?"height":"width"}function X(o){return["top","bottom"].includes(W(o))?"y":"x"}function xe(o){return Ae(X(o))}function ns(o,s,t){t===void 0&&(t=!1);const l=te(o),n=xe(o),a=ye(n);let i=n==="x"?l===(t?"end":"start")?"right":"left":l==="start"?"bottom":"top";return s.reference[a]>s.floating[a]&&(i=ie(i)),[i,ie(i)]}function ls(o){const s=ie(o);return[be(o),s,be(s)]}function be(o){return o.replace(/start|end/g,s=>os[s])}function as(o,s,t){const l=["left","right"],n=["right","left"],a=["top","bottom"],i=["bottom","top"];switch(o){case"top":case"bottom":return t?s?n:l:s?l:n;case"left":case"right":return s?a:i;default:return[]}}function rs(o,s,t,l){const n=te(o);let a=as(W(o),t==="start",l);return n&&(a=a.map(i=>i+"-"+n),s&&(a=a.concat(a.map(be)))),a}function ie(o){return o.replace(/left|right|bottom|top/g,s=>ss[s])}function is(o){return{top:0,right:0,bottom:0,left:0,...o}}function Te(o){return typeof o!="number"?is(o):{top:o,right:o,bottom:o,left:o}}function ce(o){const{x:s,y:t,width:l,height:n}=o;return{width:l,height:n,top:t,left:s,right:s+l,bottom:t+n,x:s,y:t}}function Re(o,s,t){let{reference:l,floating:n}=o;const a=X(s),i=xe(s),r=ye(i),c=W(s),d=a==="y",p=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 u;switch(c){case"top":u={x:p,y:l.y-n.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-n.width,y:f};break;default:u={x:l.x,y:l.y}}switch(te(s)){case"start":u[i]-=y*(t&&d?-1:1);break;case"end":u[i]+=y*(t&&d?-1:1);break}return u}const cs=async(o,s,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(s));let d=await i.getElementRects({reference:o,floating:s,strategy:n}),{x:p,y:f}=Re(d,l,c),y=l,u={},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:p,y:f,initialPlacement:l,placement:y,strategy:n,middlewareData:u,rects:d,platform:i,elements:{reference:o,floating:s}});p=h??p,f=C??f,u={...u,[x]:{...u[x],...b}},k&&m<=50&&(m++,typeof k=="object"&&(k.placement&&(y=k.placement),k.rects&&(d=k.rects===!0?await i.getElementRects({reference:o,floating:s,strategy:n}):k.rects),{x:p,y:f}=Re(d,y,c)),g=-1)}return{x:p,y:f,placement:y,strategy:n,middlewareData:u}};async function Me(o,s){var t;s===void 0&&(s={});const{x:l,y:n,platform:a,rects:i,elements:r,strategy:c}=o,{boundary:d="clippingAncestors",rootBoundary:p="viewport",elementContext:f="floating",altBoundary:y=!1,padding:u=0}=ee(s,o),m=Te(u),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:p,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 ds=o=>({name:"arrow",options:o,async fn(s){const{x:t,y:l,placement:n,rects:a,platform:i,elements:r,middlewareData:c}=s,{element:d,padding:p=0}=ee(o,s)||{};if(d==null)return{};const f=Te(p),y={x:t,y:l},u=xe(n),m=ye(u),g=await i.getDimensions(d),x=u==="y",w=x?"top":"left",h=x?"bottom":"right",C=x?"clientHeight":"clientWidth",b=a.reference[m]+a.reference[u]-y[u]-a.floating[m],k=y[u]-a.reference[u],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=he(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{[u]:y[u]+A,data:{[u]:Q,centerOffset:E-Q-A,...R&&{alignmentOffset:A}},reset:R}}}),us=function(o){return o===void 0&&(o={}),{name:"flip",options:o,async fn(s){var t,l;const{placement:n,middlewareData:a,rects:i,initialPlacement:r,platform:c,elements:d}=s,{mainAxis:p=!0,crossAxis:f=!0,fallbackPlacements:y,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...x}=ee(o,s);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)]:ls(r)),S=m!=="none";!y&&S&&k.push(...rs(r,g,m,b));const $=[r,...k],z=await Me(s,x),O=[];let I=((l=a.flip)==null?void 0:l.overflows)||[];if(p&&O.push(z[w]),f){const E=ns(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(u){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,Js)=>v+Js,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 ps(o,s){const{placement:t,platform:l,elements:n}=o,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,p=a&&c?-1:1,f=ee(s,o);let{mainAxis:y,crossAxis:u,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"&&(u=r==="end"?m*-1:m),c?{x:u*p,y:y*d}:{x:y*d,y:u*p}}const fs=function(o){return o===void 0&&(o=0),{name:"offset",options:o,async fn(s){var t,l;const{x:n,y:a,placement:i,middlewareData:r}=s,c=await ps(s,o);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}}}}},ms=function(o){return o===void 0&&(o={}),{name:"shift",options:o,async fn(s){const{x:t,y:l,placement:n}=s,{mainAxis:a=!0,crossAxis:i=!1,limiter:r={fn:x=>{let{x:w,y:h}=x;return{x:w,y:h}}},...c}=ee(o,s),d={x:t,y:l},p=await Me(s,c),f=X(W(n)),y=Ae(f);let u=d[y],m=d[f];if(a){const x=y==="y"?"top":"left",w=y==="y"?"bottom":"right",h=u+p[x],C=u-p[w];u=he(h,u,C)}if(i){const x=f==="y"?"top":"left",w=f==="y"?"bottom":"right",h=m+p[x],C=m-p[w];m=he(h,m,C)}const g=r.fn({...s,[y]:u,[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(o){return we(o)?(o.nodeName||"").toLowerCase():"#document"}function V(o){var s;return(o==null||(s=o.ownerDocument)==null?void 0:s.defaultView)||window}function T(o){var s;return(s=(we(o)?o.ownerDocument:o.document)||window.document)==null?void 0:s.documentElement}function we(o){return de()?o instanceof Node||o instanceof V(o).Node:!1}function N(o){return de()?o instanceof Element||o instanceof V(o).Element:!1}function P(o){return de()?o instanceof HTMLElement||o instanceof V(o).HTMLElement:!1}function Ie(o){return!de()||typeof ShadowRoot>"u"?!1:o instanceof ShadowRoot||o instanceof V(o).ShadowRoot}function se(o){const{overflow:s,overflowX:t,overflowY:l,display:n}=D(o);return/auto|scroll|overlay|hidden|clip/.test(s+l+t)&&!["inline","contents"].includes(n)}function gs(o){return["table","td","th"].includes(q(o))}function ue(o){return[":popover-open",":modal"].some(s=>{try{return o.matches(s)}catch{return!1}})}function Ce(o){const s=ke(),t=N(o)?D(o):o;return t.transform!=="none"||t.perspective!=="none"||(t.containerType?t.containerType!=="normal":!1)||!s&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!s&&(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 hs(o){let s=M(o);for(;P(s)&&!G(s);){if(Ce(s))return s;if(ue(s))return null;s=M(s)}return null}function ke(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function G(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 s=o.assignedSlot||o.parentNode||Ie(o)&&o.host||T(o);return Ie(s)?s.host:s}function je(o){const s=M(o);return G(s)?o.ownerDocument?o.ownerDocument.body:o.body:P(s)&&se(s)?s:je(s)}function Be(o,s,t){var l;s===void 0&&(s=[]),t===void 0&&(t=!0);const n=je(o),a=n===((l=o.ownerDocument)==null?void 0:l.body),i=V(n);if(a){const r=$e(i);return s.concat(i,i.visualViewport||[],se(n)?n:[],r&&t?Be(r):[])}return s.concat(n,Be(n,[],t))}function $e(o){return o.parent&&Object.getPrototypeOf(o.parent)?o.frameElement:null}function ve(o){const s=D(o);let t=parseFloat(s.width)||0,l=parseFloat(s.height)||0;const n=P(o),a=n?o.offsetWidth:t,i=n?o.offsetHeight:l,r=re(t)!==a||re(l)!==i;return r&&(t=a,l=i),{width:t,height:l,$:r}}function Fe(o){return N(o)?o:o.contextElement}function U(o){const s=Fe(o);if(!P(s))return L(1);const t=s.getBoundingClientRect(),{width:l,height:n,$:a}=ve(s);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 ys=L(0);function He(o){const s=V(o);return!ke()||!s.visualViewport?ys:{x:s.visualViewport.offsetLeft,y:s.visualViewport.offsetTop}}function xs(o,s,t){return s===void 0&&(s=!1),!t||s&&t!==V(o)?!1:s}function oe(o,s,t,l){s===void 0&&(s=!1),t===void 0&&(t=!1);const n=o.getBoundingClientRect(),a=Fe(o);let i=L(1);s&&(l?N(l)&&(i=U(l)):i=U(o));const r=xs(a,t,l)?He(a):L(0);let c=(n.left+r.x)/i.x,d=(n.top+r.y)/i.y,p=n.width/i.x,f=n.height/i.y;if(a){const y=V(a),u=l&&N(l)?V(l):l;let m=y,g=$e(m);for(;g&&l&&u!==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,p*=x.x,f*=x.y,c+=C,d+=b,m=V(g),g=$e(m)}}return ce({width:p,height:f,x:c,y:d})}function ze(o,s){const t=pe(o).scrollLeft;return s?s.left+t:oe(T(o)).left+t}function We(o,s,t){t===void 0&&(t=!1);const l=o.getBoundingClientRect(),n=l.left+s.scrollLeft-(t?0:ze(o,l)),a=l.top+s.scrollTop;return{x:n,y:a}}function bs(o){let{elements:s,rect:t,offsetParent:l,strategy:n}=o;const a=n==="fixed",i=T(l),r=s?ue(s.floating):!1;if(l===i||r&&a)return t;let c={scrollLeft:0,scrollTop:0},d=L(1);const p=L(0),f=P(l);if((f||!f&&!a)&&((q(l)!=="body"||se(i))&&(c=pe(l)),P(l))){const u=oe(l);d=U(l),p.x=u.x+l.clientLeft,p.y=u.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+p.x+y.x,y:t.y*d.y-c.scrollTop*d.y+p.y+y.y}}function ws(o){return Array.from(o.getClientRects())}function Cs(o){const s=T(o),t=pe(o),l=o.ownerDocument.body,n=K(s.scrollWidth,s.clientWidth,l.scrollWidth,l.clientWidth),a=K(s.scrollHeight,s.clientHeight,l.scrollHeight,l.clientHeight);let i=-t.scrollLeft+ze(o);const r=-t.scrollTop;return D(l).direction==="rtl"&&(i+=K(s.clientWidth,l.clientWidth)-n),{width:n,height:a,x:i,y:r}}function ks(o,s){const t=V(o),l=T(o),n=t.visualViewport;let a=l.clientWidth,i=l.clientHeight,r=0,c=0;if(n){a=n.width,i=n.height;const d=ke();(!d||d&&s==="fixed")&&(r=n.offsetLeft,c=n.offsetTop)}return{width:a,height:i,x:r,y:c}}function Bs(o,s){const t=oe(o,!0,s==="fixed"),l=t.top+o.clientTop,n=t.left+o.clientLeft,a=P(o)?U(o):L(1),i=o.clientWidth*a.x,r=o.clientHeight*a.y,c=n*a.x,d=l*a.y;return{width:i,height:r,x:c,y:d}}function qe(o,s,t){let l;if(s==="viewport")l=ks(o,t);else if(s==="document")l=Cs(T(o));else if(N(s))l=Bs(s,t);else{const n=He(o);l={x:s.x-n.x,y:s.y-n.y,width:s.width,height:s.height}}return ce(l)}function Ye(o,s){const t=M(o);return t===s||!N(t)||G(t)?!1:D(t).position==="fixed"||Ye(t,s)}function $s(o,s){const t=s.get(o);if(t)return t;let l=Be(o,[],!1).filter(r=>N(r)&&q(r)!=="body"),n=null;const a=D(o).position==="fixed";let i=a?M(o):o;for(;N(i)&&!G(i);){const r=D(i),c=Ce(i);!c&&r.position==="fixed"&&(n=null),(a?!c&&!n:!c&&r.position==="static"&&!!n&&["absolute","fixed"].includes(n.position)||se(i)&&!c&&Ye(o,i))?l=l.filter(p=>p!==i):n=r,i=M(i)}return s.set(o,l),l}function zs(o){let{element:s,boundary:t,rootBoundary:l,strategy:n}=o;const i=[...t==="clippingAncestors"?ue(s)?[]:$s(s,this._c):[].concat(t),l],r=i[0],c=i.reduce((d,p)=>{const f=qe(s,p,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(s,r,n));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Es(o){const{width:s,height:t}=ve(o);return{width:s,height:t}}function Ss(o,s,t){const l=P(s),n=T(s),a=t==="fixed",i=oe(o,!0,a,s);let r={scrollLeft:0,scrollTop:0};const c=L(0);if(l||!l&&!a)if((q(s)!=="body"||se(n))&&(r=pe(s)),l){const y=oe(s,!0,a,s);c.x=y.x+s.clientLeft,c.y=y.y+s.clientTop}else n&&(c.x=ze(n));const d=n&&!l&&!a?We(n,r):L(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 Ee(o){return D(o).position==="static"}function Ke(o,s){if(!P(o)||D(o).position==="fixed")return null;if(s)return s(o);let t=o.offsetParent;return T(o)===t&&(t=t.ownerDocument.body),t}function Xe(o,s){const t=V(o);if(ue(o))return t;if(!P(o)){let n=M(o);for(;n&&!G(n);){if(N(n)&&!Ee(n))return n;n=M(n)}return t}let l=Ke(o,s);for(;l&&gs(l)&&Ee(l);)l=Ke(l,s);return l&&G(l)&&Ee(l)&&!Ce(l)?t:l||hs(o)||t}const Vs=async function(o){const s=this.getOffsetParent||Xe,t=this.getDimensions,l=await t(o.floating);return{reference:Ss(o.reference,await s(o.floating),o.strategy),floating:{x:0,y:0,width:l.width,height:l.height}}};function Ns(o){return D(o).direction==="rtl"}const Ds={convertOffsetParentRelativeRectToViewportRelativeRect:bs,getDocumentElement:T,getClippingRect:zs,getOffsetParent:Xe,getElementRects:Vs,getClientRects:ws,getDimensions:Es,getScale:U,isElement:N,isRTL:Ns},_s=fs,Ls=ms,Ps=us,Os=ds,As=(o,s,t)=>{const l=new Map,n={platform:Ds,...t},a={...n.platform,_c:l};return cs(o,s,{...n,platform:a})};function Ts(o){return o!=null&&typeof o=="object"&&"$el"in o}function Se(o){if(Ts(o)){const s=o.$el;return we(s)&&q(s)==="#comment"?null:s}return o}function Z(o){return typeof o=="function"?o():e.unref(o)}function Rs(o){return{name:"arrow",options:o,fn(s){const t=Se(Z(o.element));return t==null?{}:Os({element:t,padding:o.padding}).fn(s)}}}function Ge(o){return typeof window>"u"?1:(o.ownerDocument.defaultView||window).devicePixelRatio||1}function Ue(o,s){const t=Ge(o);return Math.round(s*t)/t}function Ms(o,s,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(()=>Se(o.value)),p=e.computed(()=>Se(s.value)),f=e.ref(0),y=e.ref(0),u=e.ref(r.value),m=e.ref(i.value),g=e.shallowRef({}),x=e.ref(!1),w=e.computed(()=>{const $={position:u.value,left:"0",top:"0"};if(!p.value)return $;const z=Ue(p.value,f.value),O=Ue(p.value,y.value);return c.value?{...$,transform:"translate("+z+"px, "+O+"px)",...Ge(p.value)>=1.5&&{willChange:"transform"}}:{position:u.value,left:z+"px",top:O+"px"}});let h;function C(){if(d.value==null||p.value==null)return;const $=n.value;As(d.value,p.value,{middleware:a.value,placement:i.value,strategy:r.value}).then(z=>{f.value=z.x,y.value=z.y,u.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&&p.value!=null){h=l(d.value,p.value,C);return}}function S(){n.value||(x.value=!1)}return e.watch([a,i,r,n],C,{flush:"sync"}),e.watch([d,p],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(u),placement:e.shallowReadonly(m),middlewareData:e.shallowReadonly(g),isPositioned:e.shallowReadonly(x),floatingStyles:w,update:C}}function Is(o){return e.getCurrentScope()?(e.onScopeDispose(o),!0):!1}const js=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;function Ze(o,s,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,o(...d)},e.toValue(s))}return l&&(n.value=!0,js&&c()),Is(r),{isPending:e.readonly(n),start:c,stop:r}}function Qe(o={}){const{openDelay:s=0,closeDelay:t=150,onOpen:l,onClose:n,initiallyOpened:a=!1}=o,i=e.ref(!1),{start:r,stop:c}=Ze(()=>{i.value=!0,l==null||l()},s),{start:d,stop:p}=Ze(()=>{i.value=!1,n==null||n()},t),f=()=>{p(),s===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 Ve=Symbol("hover-card"),Ne=e.defineComponent({__name:"HoverCardTarget",props:{withWrapper:{type:Boolean,default:!1},wrapperClass:{default:""}},setup(o){return e.inject(Ve,null),(s,t)=>s.withWrapper?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(s.wrapperClass)},[e.renderSlot(s.$slots,"default")],2)):e.renderSlot(s.$slots,"default",{key:1})}}),vs={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(o){const s=o,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:s.openDelay,closeDelay:s.closeDelay,initiallyOpened:s.initiallyOpened});e.provide(Ve,{isOpen:i,open:r,close:c});const{x:d,y:p,strategy:f,middlewareData:y,placement:u,update:m}=Ms(n,a,{placement:s.placement,middleware:[_s(s.offset),Ps({fallbackPlacements:["top","bottom","right","left"].filter(b=>b!==s.placement)}),Ls({padding:8}),Rs({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(u.value){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left";default:return"bottom"}}),h=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%)"}}),C=e.computed(()=>({xs:"w-[200px]",sm:"w-[240px]",md:"w-[320px]",lg:"w-[400px]",xl:"w-[480px]"})[s.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(Ne,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(p)??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",vs,[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:Ne});const Fs={},Hs={key:0,class:"badge-section mr-2"},Ws={class:"badge-label"},qs={key:1,class:"badge-section ml-2"},Ys=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 s=o,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=s.variant==="gradient"?`bg-gradient-to-r from-${(f=s.gradient)==null?void 0:f.from} to-${(y=s.gradient)==null?void 0:y.to} text-white`:F(s.color,s.variant),r=_(s.size,"badge"),c=t(s.radius),d=s.variant==="dot"?l(s.color):"";return[a,i,r,c,d,{"aspect-square p-0":s.circle,"w-full":s.fullWidth}].filter(Boolean).join(" ")});return(a,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(n.value)},[a.leftSection?(e.openBlock(),e.createElementBlock("span",Hs,[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",Ws,[e.renderSlot(a.$slots,"default")]),a.rightSection?(e.openBlock(),e.createElementBlock("span",qs,[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))}}),ao="",Ks={mounted(o,s){o._clickOutside=t=>{const l=t.target;o===l||o.contains(l)||s.value(t)},document.addEventListener("click",o._clickOutside,!0),document.addEventListener("touchstart",o._clickOutside,!0)},unmounted(o){o._clickOutside&&(document.removeEventListener("click",o._clickOutside,!0),document.removeEventListener("touchstart",o._clickOutside,!0))}};function Xs(o){return{none:"cstu-rounded-none",sm:"cstu-rounded-sm",md:"cstu-rounded",lg:"cstu-rounded-lg",xl:"cstu-rounded-xl",full:"cstu-rounded-full"}[o]}const Gs=["data-active"],Us=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(o,{emit:s}){const t=o,l=s,n=e.ref(t.open),a=e.ref(0),i=e.ref(null),r=e.computed(()=>_(t.size,"dropdown")),c=e.computed(()=>Xs(t.radius)),d=e.computed(()=>({"cstu-bottom-full cstu-mb-2":t.placement==="top","cstu-mt-2":t.placement==="bottom"}));function p(){n.value=!1,l("close"),l("update:open",!1)}e.provide("dropdownClose",p);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 u=(g=i.value)==null?void 0:g.querySelector(".active");u==null||u.scrollIntoView({behavior:"smooth"})},100)))}function y(u){i.value&&(u.key==="ArrowUp"&&a.value>0?(u.preventDefault(),a.value--):u.key==="ArrowDown"&&a.value<i.value.children.length-1&&(u.preventDefault(),a.value++))}return(u,m)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cstu-inline-block cstu-text-left",[{"cstu-z-[100]":n.value},{"cstu-relative":u.parentPositionRelative},{"cstu-grayscale cstu-filter cstu-cursor-not-allowed cstu-opacity-70":u.disabled},u.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 focus:cstu-outline-none",[c.value,r.value,u.buttonClasses,{"cstu-pointer-events-none":u.disabled},`${u.buttonClasses?u.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(u.$slots,"icon"),e.renderSlot(u.$slots,"selected",{},()=>[m[0]||(m[0]=e.createTextVNode("Select"))]),u.showArrow?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["cstu-transition cstu-leading-none",{"cstu-rotate-180":n.value}])},[e.renderSlot(u.$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":"cstu-transition cstu-ease-out cstu-duration-100","enter-from-class":"cstu-transform cstu-opacity-0 cstu-scale-95","enter-to-class":"cstu-transform cstu-opacity-100 cstu-scale-100","leave-active-class":"cstu-transition cstu-ease-in cstu-duration-75","leave-from-class":"cstu-transform cstu-opacity-100 cstu-scale-100","leave-to-class":"cstu-transform cstu-opacity-0 cstu-scale-95"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(["cstu-max-h-72 cstu-px-[12px] cstu-py-[13px] cstu-min-w-[225px] cstu-overflow-y-auto cstu-origin-top-left cstu-absolute cstu-left-0 cstu-w-full cstu-rounded-lg cstu-shadow-custom cstu-bg-white focus:cstu-outline-none cstu-z-50",[d.value,u.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(u.$slots,"default")],40,Gs)],2),[[e.vShow,n.value]])]),_:3})],2)),[[e.unref(Ks),p]])}}),Zs=e.defineComponent({__name:"DropdownItem",props:{disabled:{type:Boolean,default:!1},closeOnClick:{type:Boolean,default:!0},class:{default:""},selected:{type:Boolean,default:!1},size:{default:"md"}},emits:["click"],setup(o,{emit:s}){const t=o,l=s,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(["cstu-block cstu-cursor-pointer hover:cstu-bg-blue-50 active:cstu-bg-blue-50 cstu-rounded-lg",e.unref(ge)(t.size),"cstu-py-[5.5px] cstu-pr-[13.5px] cstu-pl-[10.5px]",{"cstu-cursor-not-allowed cstu-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(o,{emit:s}){const t=o,l=s,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(["cstu-block cstu-cursor-pointer cstu-rounded-lg","cstu-py-[5.5px] cstu-pr-[13.5px] cstu-pl-[10.5px]",{"hover:cstu-bg-blue-50 active:cstu-bg-blue-50":!i.disabled},{"cstu-cursor-not-allowed cstu-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))}}),Qs=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(o){const s=o,t=e.ref(s.defaultOpen),l=e.computed(()=>s.class);function n(){s.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))}}),ro="";B.Alert=Wt,B.Badge=Ys,B.Button=it,B.Checkbox=pt,B.Chip=Pt,B.Collapse=qt,B.Collapsible=Qs,B.Dialog=ts,B.Dropdown=Us,B.DropdownItem=Zs,B.HoverCard=Je,B.HoverCardTarget=Ne,B.Indicator=Rt,B.ListItem=et,B.Loader=Ut,B.Progress=It,B.Radio=ht,B.Select=Nt,B.TextInput=Ct,B.composables=Fs,B.hoverCardInjectionKey=Ve,B.useHoverCard=Qe,Object.defineProperty(B,Symbol.toStringTag,{value:"Module"})});
|