@contentstudio/ui 0.1.25 → 0.1.27
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.d.ts +49 -1
- package/dist/index.js +2193 -1814
- package/dist/index.umd.cjs +2 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function($,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):($=typeof globalThis<"u"?globalThis:$||self,e($.ContentStudioDesignSystem={},$.Vue))})(this,function($,e){"use strict";var an=Object.defineProperty;var rn=($,e,H)=>e in $?an($,e,{enumerable:!0,configurable:!0,writable:!0,value:H}):$[e]=H;var Y=($,e,H)=>(rn($,typeof e!="symbol"?e+"":e,H),H);const H={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"}},D=(t,s,o={})=>{const{hover:l=!1,active:n=!1,focus:c=!1,disabled:i=!1}=o;if(i)return"cstu-bg-gray-100 cstu-border-gray-200 cstu-text-gray-400 cstu-cursor-not-allowed";const r=H[t];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}`,c&&`focus:cstu-text-${r.base}-${r.focus}`,i&&"cstu-opacity-50 cstu-cursor-not-allowed"].filter(Boolean);const d=[];switch(s){case"filled":d.push(`cstu-bg-${r.base}-${r.main}`),d.push("cstu-text-white"),l&&d.push(`hover:cstu-bg-${r.base}-${r.hover} hover:cstu-shadow-md`),n&&d.push(`active:cstu-bg-${r.base}-${r.dark}`),c&&d.push(`focus:cstu-ring-${r.base}-${r.focus}/20`);break;case"light":d.push(`cstu-bg-${r.base}-${r.light}`),d.push(`cstu-text-${r.base}-${r.main}`),l&&d.push(`hover:cstu-bg-${r.base}-250`),n&&d.push(`active:cstu-bg-${r.base}-300 active:!cstu-text-white`),c&&d.push(`focus:cstu-ring-${r.base}-${r.focus}/20`);break;case"outline":d.push("cstu-bg-white"),d.push(`cstu-text-${r.base}-${r.main}`),d.push(`cstu-border cstu-border-${r.base}-${r.main}`),l&&d.push(`hover:cstu-bg-${r.base}-50`),n&&d.push(`active:cstu-bg-${r.base}-100`),c&&d.push(`focus:cstu-ring-${r.base}-${r.focus}/20`);break;case"subtle":d.push(`cstu-text-${r.base}-${r.main}`),l&&d.push(`hover:cstu-bg-${r.base}-50`),n&&d.push(`active:cstu-bg-${r.base}-100`),c&&d.push(`focus:cstu-ring-${r.base}-${r.focus}/20`);break;case"white":d.push("cstu-bg-white cstu-text-gray-900"),l&&d.push("hover:cstu-bg-gray-50"),n&&d.push("active:cstu-bg-gray-100"),c&&d.push("focus:cstu-ring-gray-200");break;case"dot":d.push(`cstu-bg-${r.base}-${r.main}`);break;case"bordered":d.push("cstu-bg-white"),d.push(`cstu-text-${r.base}-${r.main}`),d.push(`cstu-border cstu-border-${r.base}-${r.border}`),l&&d.push(`hover:cstu-bg-${r.base}-50 hover:cstu-border-${r.base}-${r.main}`),n&&d.push(`active:cstu-bg-${r.base}-100`),c&&d.push(`focus:cstu-ring-${r.base}-${r.focus}/20`);break;case"bordered-transparent":d.push("cstu-bg-transparent"),d.push(`cstu-text-${r.base}-${r.main}`),d.push(`cstu-border cstu-border-${r.base}-${r.border}`),l&&d.push(`hover:cstu-bg-${r.base}-50/10 hover:cstu-border-${r.base}-${r.main}`),n&&d.push(`active:cstu-bg-${r.base}-100/20`),c&&d.push(`focus:cstu-ring-${r.base}-${r.focus}/20`);break}return d.join(" ")},St=(t,s)=>{if(s==="filled")return"cstu-text-white";const o=H[t];return`cstu-text-${o.base}-${o.main}`},Et=(t,s)=>{if(s==="filled")return"cstu-text-white";const o=H[t];return`cstu-text-${o.base}-${o.main}`},je=t=>{const s=["cstu-shadow-sm","cstu-transition-all cstu-duration-200"];switch(t){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(" ")},ze={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]"}}},P=(t,s)=>{var o,l;if(typeof s=="string"){const n=ze[s][t];return[(o=n==null?void 0:n.padding)==null?void 0:o.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[t]},Vt=(t,s)=>ze[s][t].icon||"",$e=(t,s)=>ze[s][t].height||"",fe=t=>{switch(t){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"}},We=t=>{switch(t){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"}},te=t=>{const s=[];return t.disabled&&s.push("cstu-opacity-50 cstu-cursor-not-allowed cstu-pointer-events-none"),t.loading&&s.push("cstu-cursor-wait"),t.active&&s.push("cstu-ring-2 cstu-ring-offset-2"),t.error&&s.push("cstu-border-red-300 focus:cstu-ring-red-500/20 focus:cstu-border-red-500"),t.success&&s.push("cstu-border-green-300 focus:cstu-ring-green-500/20 focus:cstu-border-green-500"),s.join(" ")},Nt=t=>t?"cstu-opacity-50 cstu-cursor-not-allowed cstu-pointer-events-none":"",Dt=t=>{const s=[];return t.valid&&s.push("cstu-border-green-300 focus:cstu-ring-green-500/20 focus:cstu-border-green-500"),t.invalid&&s.push("cstu-border-red-300 focus:cstu-ring-red-500/20 focus:cstu-border-red-500"),t.pending&&s.push("cstu-border-yellow-300 focus:cstu-ring-yellow-500/20 focus:cstu-border-yellow-500"),s.join(" ")},Tt=(t,s="primary")=>{const o=[];return t.hover&&o.push(`hover:cstu-bg-${s}-50`),t.active&&o.push(`active:cstu-bg-${s}-100`),t.focus&&o.push(`focus:cstu-outline-none focus:cstu-ring-2 focus:cstu-ring-${s}-500/20 focus:cstu-border-${s}-500`),o.join(" ")},vt=["disabled","type"],Ot={key:0},X=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"},gradient:{}},emits:{click:t=>!0},setup(t,{emit:s}){const o=t,l=s,n=d=>{!o.disabled&&!o.loading&&l("click",d)},c=d=>({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"})[d]||"cstu-rounded-lg",i=d=>{if(!d)return"bg-gradient-to-r";const a=(d%360+360)%360;return a>=337.5||a<22.5?"cstu-bg-gradient-to-r":a>=22.5&&a<67.5?"cstu-bg-gradient-to-tr":a>=67.5&&a<112.5?"cstu-bg-gradient-to-t":a>=112.5&&a<157.5?"cstu-bg-gradient-to-tl":a>=157.5&&a<202.5?"cstu-bg-gradient-to-l":a>=202.5&&a<247.5?"cstu-bg-gradient-to-bl":a>=247.5&&a<292.5?"cstu-bg-gradient-to-b":"cstu-bg-gradient-to-br"},r=e.computed(()=>{const d="cstu-inline-flex cstu-items-center cstu-justify-center cstu-font-medium cstu-transition-all cstu-duration-200";if(o.variant==="gradient"&&o.gradient){const x=`${i(o.gradient.deg)} cstu-from-${o.gradient.from}-500 cstu-to-${o.gradient.to||o.gradient.from}-600 hover:cstu-from-${o.gradient.from}-600 hover:cstu-to-${o.gradient.to||o.gradient.from}-700 cstu-text-white`;return[d,x,P(o.size,"button"),c(o.radius),te({disabled:o.disabled,loading:o.loading}),{"cstu-w-full":o.fullWidth,"cstu-cursor-pointer":!o.disabled&&!o.loading}]}const a=D(o.color,o.variant,{hover:!0,active:!0,focus:!0}),f=P(o.size,"button"),u=te({disabled:o.disabled,loading:o.loading}),p=$e(o.size,"button"),g=c(o.radius);return[d,a,f,p,u,g,{"cstu-w-full":o.fullWidth,"cstu-cursor-pointer":!o.disabled&&!o.loading}]});return(d,a)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(r.value),disabled:d.disabled||d.loading,type:d.type,onClick:n},[e.renderSlot(d.$slots,"leftSection"),e.renderSlot(d.$slots,"default"),d.loading?(e.openBlock(),e.createElementBlock("span",Ot,[e.renderSlot(d.$slots,"loader",{},()=>[a[0]||(a[0]=e.createElementVNode("svg",{class:"cstu-animate-spin cstu-h-4 cstu-w-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[e.createElementVNode("circle",{class:"cstu-opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),e.createElementVNode("path",{class:"cstu-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(d.$slots,"rightSection")],10,vt))}}),He=t=>{const s=["cstu-relative"];t.fullWidth&&s.push("cstu-w-full");const o=te({disabled:t.disabled,error:t.error,required:t.required||t.withAsterisk});return o&&s.push(o),s.join(" ")},Se=(t,s=!1)=>{const o=["cstu-block","cstu-font-medium"];switch(s||o.push("cstu-mb-1"),t.size){case"xs":o.push("cstu-text-xs");break;case"sm":o.push("cstu-text-sm");break;case"md":o.push("cstu-text-base");break;case"lg":o.push("cstu-text-lg");break;case"xl":o.push("cstu-text-xl");break;default:o.push("cstu-text-sm")}return t.error?o.push("cstu-text-red-500"):t.disabled?o.push("cstu-text-gray-400"):o.push("cstu-text-gray-700"),(t.required||t.withAsterisk)&&o.push('after:cstu-content-["*"] after:cstu-ml-0.5 after:cstu-text-red-500'),o.join(" ")},qe=t=>{const s=["cstu-mt-1","cstu-text-sm"];return t.error?s.push("cstu-text-red-500"):t.disabled?s.push("cstu-text-gray-400"):s.push("cstu-text-gray-500"),s.join(" ")},Mt=["aria-disabled","onKeydown"],Lt={key:2,class:"cstu-text-sm cstu-text-red-500 cstu-mt-0.5"},At={name:"Checkbox"},Pt=e.defineComponent({...At,props:{modelValue:{type:[Boolean,Array],default:!1},checked:{type:Boolean,default:!1},value:{},id:{},label:{},color:{default:"primary"},size:{default:"md"},labelPosition:{default:"right"},labelSize:{default:"md"},description:{},error:{},disabled:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},variant:{default:"filled"}},emits:["update:modelValue","change"],setup(t,{emit:s}){const o=t,l=s,n=e.computed(()=>o.modelValue||o.checked),c=()=>{if(o.disabled)return;const y=!n.value;l("update:modelValue",y),l("change",y)},i=()=>{c()},r=e.computed(()=>Se({size:o.labelSize,disabled:o.disabled,error:o.error},!0)),d=e.computed(()=>qe({color:o.color})),a=e.computed(()=>["cstu-flex","cstu-flex-col",o.labelPosition==="left"?"cstu-order-first":""]),f={primary:"blue-450",secondary:"gray-500",success:"green-500",warning:"yellow-500",danger:"red-500",info:"blue-500",dark:"gray-900",light:"gray-300"},u=e.computed(()=>["cstu-inline-flex","cstu-items-center","cstu-justify-center","cstu-cursor-pointer","cstu-transition-colors","cstu-duration-200","cstu-ease-in-out",o.size==="xs"?"cstu-h-[12px] cstu-w-[12px] cstu-rounded":"",o.size==="sm"?"cstu-h-[14px] cstu-w-[14px] cstu-rounded":"",o.size==="md"?"cstu-h-[16px] cstu-w-[16px] cstu-rounded-md":"",o.size==="lg"?"cstu-h-[18px] cstu-w-[18px] cstu-rounded-md":"",o.size==="xl"?"cstu-h-[20px] cstu-w-[20px] cstu-rounded-md":"",o.disabled?"cstu-bg-gray-200 cstu-border cstu-border-gray-200 cstu-cursor-not-allowed":n.value||o.indeterminate?o.variant==="outlined"?`cstu-bg-transparent cstu-border cstu-border-${f[o.color]}`:`cstu-bg-${f[o.color]} cstu-border-${f[o.color]}`:"cstu-bg-white cstu-border cstu-border-gray-400/50"]),p=e.computed(()=>[o.variant==="outlined"&&(n.value||o.indeterminate)?`cstu-text-${f[o.color]}`:o.disabled?"cstu-text-gray-300":"cstu-text-white",o.size==="xs"?"cstu-h-[6px] cstu-w-[6px]":"",o.size==="sm"?"cstu-h-[7px] cstu-w-[7px]":"",o.size==="md"?"cstu-h-[8px] cstu-w-[8px]":"",o.size==="lg"?"cstu-h-[9px] cstu-w-[9px]":"",o.size==="xl"?"cstu-h-[10px] cstu-w-[10px]":""]),g=e.computed(()=>He({disabled:o.disabled,error:o.error}));return(y,m)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([g.value,"cstu-flex cstu-items-center cstu-gap-2"])},[e.createElementVNode("div",{class:e.normalizeClass(u.value),onClick:i,role:"checkbox","aria-disabled":y.disabled,tabindex:"0",onKeydown:e.withKeys(e.withModifiers(i,["prevent"]),["space"])},[n.value&&!y.indeterminate?(e.openBlock(),e.createElementBlock("svg",{key:0,class:e.normalizeClass(p.value),xmlns:"http://www.w3.org/2000/svg",width:"8",height:"6",viewBox:"0 0 8 6",fill:"none"},m[0]||(m[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),y.indeterminate?(e.openBlock(),e.createElementBlock("svg",{key:1,class:e.normalizeClass(p.value),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 8 7",fill:"none"},m[1]||(m[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,Mt),y.label||y.description?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(a.value)},[y.label?(e.openBlock(),e.createElementBlock("label",{key:0,class:e.normalizeClass([r.value]),onClick:i},e.toDisplayString(y.label),3)):e.createCommentVNode("",!0),y.description?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(d.value)},e.toDisplayString(y.description),3)):e.createCommentVNode("",!0),y.error?(e.openBlock(),e.createElementBlock("div",Lt,e.toDisplayString(y.error),1)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0)],2))}}),It=["aria-checked","aria-disabled"],Rt=["id","checked","disabled","value"],Ft=["for"],jt=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(t,{emit:s}){const o=t,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"},c=s,i=e.computed(()=>o.modelValue===o.value),r=()=>{o.disabled||(c("update:modelValue",o.value),c("change",o.value))},d=e.computed(()=>[He({disabled:o.disabled,error:o.error}),"cstu-flex cstu-items-center cstu-gap-2",o.labelPosition==="left"?"cstu-flex-row-reverse":"cstu-flex-row"]),a=e.computed(()=>["cstu-relative cstu-flex cstu-items-center cstu-justify-center cstu-rounded-full cstu-transition-colors cstu-duration-200",m.value,i.value?o.variant==="outlined"?`cstu-bg-white !cstu-border-2 cstu-border-${n[o.color]}`:`cstu-bg-${l[o.color]} cstu-border cstu-border-${l[o.color]}`:o.variant==="outlined"?`cstu-bg-white !cstu-border-2 cstu-border-${n[o.color]}`:"cstu-bg-white cstu-border cstu-border-gray-300 hover:cstu-border-gray-400",o.disabled?"cstu-opacity-50 cstu-cursor-not-allowed !cstu-bg-gray-200 !cstu-border-gray-300":"cstu-cursor-pointer"]),f=e.computed(()=>["cstu-rounded-full",x.value,o.variant==="outlined"?`cstu-bg-${l[o.color]}`:"cstu-bg-white",o.disabled?`cstu-opacity-50 ${o.variant==="outlined"?"!cstu-bg-gray-300":"!cstu-bg-gray-200"}`:""]),u=e.computed(()=>Se({size:o.size,disabled:o.disabled,error:o.error})),p=e.computed(()=>qe({color:o.color})),g=e.computed(()=>["cstu-text-sm cstu-text-red-500 cstu-mt-1"]),y=e.computed(()=>["cstu-flex cstu-flex-col",o.disabled?"cstu-cursor-not-allowed":"cstu-cursor-pointer"]),m=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]"})[o.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]"})[o.size]);return(w,b)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(d.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,Rt),e.createElementVNode("div",{class:e.normalizeClass(a.value)},[i.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([f.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(y.value)},[w.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:w.id,class:e.normalizeClass(u.value)},[e.renderSlot(w.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(w.label),1)])],10,Ft)):e.createCommentVNode("",!0),w.description?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(p.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(g.value)},[e.renderSlot(w.$slots,"error",{},()=>[e.createTextVNode(e.toDisplayString(w.error),1)])],2)):e.createCommentVNode("",!0)],2)],10,It))}});function J(t){return{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"}[t]}const Wt={key:0,class:"cstu-flex cstu-justify-between cstu-items-center cstu-mb-1"},Ht=["for"],qt={key:0,class:"cstu-text-red-500 cstu-ml-1"},Zt={key:0,class:"cstu-flex cstu-items-center cstu-justify-center cstu-w-[15px] cstu-h-[15px]"},Kt=["id","type","value","placeholder","disabled","required","readonly"],Ut={key:1,class:"cstu-flex cstu-items-center cstu-justify-center cstu-w-[15px] cstu-h-[15px]"},Gt={key:1,class:"cstu-mt-1"},Yt={key:2,class:"cstu-mt-1"},Xt=e.defineComponent({__name:"TextInput",props:{id:{},type:{default:"text"},modelValue:{},placeholder:{},label:{},description:{},error:{},hasError:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},withAsterisk:{type:Boolean,default:!1},showBothErrorAndDescription:{type:Boolean,default:!1},inputProps:{},size:{default:"md"},variant:{default:"default"},radius:{default:"md"},class:{},fullWidth:{type:Boolean,default:!1}},emits:["update:modelValue","focus","blur"],setup(t,{emit:s}){const o=`text-input-${Math.random().toString(36).substring(2,11)}`,l={xs:{inputClass:`cstu-h-8 ${t.fullWidth?"cstu-w-full":"cstu-max-w-[20.5rem]"}`,labelSize:"cstu-text-xs cstu-font-medium",descriptionSize:"cstu-text-xs"},sm:{inputClass:`cstu-h-9 ${t.fullWidth?"cstu-w-full":"cstu-max-w-[20.5rem]"}`,labelSize:"cstu-text-sm cstu-font-medium",descriptionSize:"cstu-text-xs"},md:{inputClass:`cstu-h-10 ${t.fullWidth?"cstu-w-full":"cstu-max-w-[20.5rem]"}`,labelSize:"cstu-text-sm cstu-font-medium",descriptionSize:"cstu-text-sm"},lg:{inputClass:`cstu-h-11 ${t.fullWidth?"cstu-w-full":"cstu-max-w-[20.5rem]"}`,labelSize:"cstu-text-sm cstu-font-medium",descriptionSize:"cstu-text-sm"},xl:{inputClass:`cstu-h-12 ${t.fullWidth?"cstu-w-full":"cstu-max-w-[20.5rem]"}`,labelSize:"cstu-text-base cstu-font-medium",descriptionSize:"cstu-text-sm"}},n=e.computed(()=>`${l[t.size].inputClass.split(" ")[0]} cstu-transition-all cstu-duration-300`),c=e.computed(()=>l[t.size].labelSize),i=e.computed(()=>l[t.size].descriptionSize),r=e.computed(()=>"cstu-text-sm"),d=e.computed(()=>J(t.radius)),a=e.computed(()=>{const m={default:"cstu-bg-white cstu-border cstu-transition-colors cstu-duration-150 cstu-px-3",filled:"cstu-bg-gray-100 cstu-border cstu-border-transparent cstu-transition-colors cstu-duration-150 cstu-px-3",unstyled:"cstu-bg-transparent cstu-border-0"},x=f.value?"":t.variant==="default"?"cstu-border-gray-300/45":"",w=f.value?"cstu-border-red-500":"";return t.variant==="unstyled"?[m[t.variant]]:[m[t.variant],x,w,f.value?"hover:cstu-border-red-500":"hover:cstu-border-blue-450",f.value?"focus-within:cstu-border-red-500 focus-within:cstu-ring-1 focus-within:cstu-ring-red-500":"focus-within:cstu-border-blue-450 focus-within:cstu-ring-1 focus-within:cstu-ring-blue-450"]}),f=e.computed(()=>t.error!==void 0&&t.error!==""||t.hasError),u=s,p=e.ref(!1),g=m=>{p.value=!0,u("focus",m)},y=m=>{p.value=!1,u("blur",m)};return(m,x)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cstu-flex cstu-flex-col cstu-transition-all cstu-duration-300",[t.class,m.fullWidth?"cstu-w-full":"cstu-max-w-[20.5rem]"]])},[m.label||m.$slots.label?(e.openBlock(),e.createElementBlock("div",Wt,[e.createElementVNode("label",{for:m.id||o,class:e.normalizeClass(["cstu-flex cstu-items-center",c.value])},[e.renderSlot(m.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(m.label)+" ",1),m.withAsterisk||m.required?(e.openBlock(),e.createElementBlock("span",qt,"*")):e.createCommentVNode("",!0)])],10,Ht),e.renderSlot(m.$slots,"labelIcon")])):e.createCommentVNode("",!0),e.createElementVNode("div",null,[e.createElementVNode("div",{class:e.normalizeClass(["cstu-flex cstu-items-center cstu-gap-2 cstu-py-2",n.value,d.value,a.value,{"cstu-opacity-50 cstu-pointer-events-none cstu-cursor-not-allowed":m.disabled}])},[m.$slots.leftSection?(e.openBlock(),e.createElementBlock("div",Zt,[e.renderSlot(m.$slots,"leftSection")])):e.createCommentVNode("",!0),e.createElementVNode("input",e.mergeProps({id:m.id||o,type:m.type,value:m.modelValue,placeholder:m.placeholder,disabled:m.disabled,required:m.required,readonly:m.readonly,class:["cstu-flex-1 cstu-bg-transparent cstu-outline-none cstu-w-full",r.value,{"cstu-text-gray-500":m.modelValue,"cstu-text-red-500":f.value&&!m.modelValue}],onInput:x[0]||(x[0]=w=>m.$emit("update:modelValue",w.target.value)),onFocus:g,onBlur:y},m.inputProps),null,16,Kt),m.$slots.rightSection?(e.openBlock(),e.createElementBlock("div",Ut,[e.renderSlot(m.$slots,"rightSection")])):e.createCommentVNode("",!0)],2)]),m.description&&!f.value||m.$slots.description&&!f.value||m.showBothErrorAndDescription&&m.description||m.showBothErrorAndDescription&&m.$slots.description?(e.openBlock(),e.createElementBlock("div",Gt,[e.createElementVNode("p",{class:e.normalizeClass(["cstu-text-gray-500",i.value])},[e.renderSlot(m.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(m.description),1)])],2)])):e.createCommentVNode("",!0),f.value&&m.error||f.value&&m.$slots.error||m.showBothErrorAndDescription&&m.error||m.showBothErrorAndDescription&&m.$slots.error?(e.openBlock(),e.createElementBlock("div",Yt,[e.createElementVNode("p",{class:e.normalizeClass(["cstu-text-red-500",i.value])},[e.renderSlot(m.$slots,"error",{},()=>[e.createTextVNode(e.toDisplayString(m.error),1)])],2)])):e.createCommentVNode("",!0)],2))}}),Jt=["aria-expanded","aria-disabled"],Qt=["placeholder","disabled"],_t={key:1,class:"w-full truncate text-gray-900"},es={class:"flex items-center gap-2 shrink-0"},ts={key:0,class:"py-3 text-center text-gray-500"},ss=["onClick"],os={key:0,class:"py-3 px-4 text-gray-500 text-center text-sm"},ns=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(t,{emit:s}){const o=t,l=s,n=e.ref(!1),c=e.ref(""),i=e.ref(null),r=e.ref(null),d=b=>({none:"rounded-none",xs:"rounded",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",xl:"rounded-2xl",full:"rounded-full"})[b]||"rounded-lg",a=e.computed(()=>{const b="w-full flex items-center justify-between transition-colors duration-200",B=[P(o.size,"input"),$e(o.size,"input")].join(" "),h=d(o.radius),C=o.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",E=o.variant==="filled"?`bg-gray-50 border border-transparent ${!o.disabled&&`hover:bg-gray-100 focus-within:bg-white focus-within:border-gray-300 ${C}`}`:`bg-white border border-gray-300 ${!o.disabled&&`hover:border-gray-400 ${C}`}`,S=te({disabled:o.disabled,error:o.error}),N=!o.disabled&&"cursor-pointer";return[b,B,h,E,S,N].filter(Boolean).join(" ")}),f=e.computed(()=>o.options.find(b=>b.value===o.modelValue)),u=e.computed(()=>{if(!c.value)return o.options;const b=c.value.toLowerCase();return o.options.filter(B=>B.label.toLowerCase().includes(b))}),p=()=>{var b;o.disabled||(o.searchable?((b=i.value)==null||b.focus(),n.value=!0):n.value=!n.value)},g=b=>{l("update:modelValue",b.value),l("change",b),n.value=!1,o.searchable&&(c.value=b.label)},y=()=>{l("update:modelValue",null),l("change",null),c.value=""},m=()=>{n.value||(n.value=!0)},x=()=>{n.value||(n.value=!0)},w=b=>{const B=b.target;r.value&&!r.value.contains(B)&&(n.value=!1)};return e.watch(()=>o.modelValue,b=>{b?f.value&&o.searchable&&(c.value=f.value.label):c.value=""}),e.onMounted(()=>{document.addEventListener("click",w)}),e.onUnmounted(()=>{document.removeEventListener("click",w)}),(b,B)=>(e.openBlock(),e.createElementBlock("div",{class:"relative select",ref_key:"selectRoot",ref:r},[e.createElementVNode("div",{class:e.normalizeClass(a.value),role:"combobox","aria-expanded":n.value,"aria-disabled":b.disabled,onClick:p},[b.searchable?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,ref_key:"searchInput",ref:i,"onUpdate:modelValue":B[0]||(B[0]=h=>c.value=h),placeholder:b.placeholder,type:"text",class:"w-full bg-transparent outline-none placeholder:text-gray-500",disabled:b.disabled,onFocus:m,onInput:x},null,40,Qt)),[[e.vModelText,c.value]]):(e.openBlock(),e.createElementBlock("div",_t,e.toDisplayString(f.value?f.value.label:b.placeholder),1)),e.createElementVNode("div",es,[b.clearable&&b.modelValue&&!b.disabled?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"p-1 hover:bg-gray-100 rounded-full text-gray-500 hover:text-gray-700",onClick:e.withModifiers(y,["stop"])},B[1]||(B[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"},B[2]||(B[2]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 9l-7 7-7-7"},null,-1)]),2))])],10,Jt),e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(["absolute w-full z-50 mt-1 bg-white","border border-gray-200",d(o.radius),"shadow-lg max-h-[240px] overflow-auto","divide-y divide-gray-100"])},[b.loading?(e.openBlock(),e.createElementBlock("div",ts,[e.renderSlot(b.$slots,"loader",{},()=>[B[3]||(B[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(u.value,h=>(e.openBlock(),e.createElementBlock("div",{key:h.value,class:e.normalizeClass(["py-2.5 px-4 flex items-center transition-colors duration-200","text-[14px] leading-5","text-gray-900",h.value===b.modelValue?"bg-gray-50 font-medium":"hover:bg-gray-50",h.disabled?"opacity-50 cursor-not-allowed":"cursor-pointer"]),onClick:C=>!h.disabled&&g(h)},[b.withCheckIcon&&h.value===b.modelValue?(e.openBlock(),e.createElementBlock("svg",{key:0,class:e.normalizeClass(["w-4 h-4 text-blue-600 shrink-0",b.checkIconPosition==="left"?"mr-2":"ml-2 order-last"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},B[4]||(B[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":h.disabled})},e.toDisplayString(h.label),3)],10,ss))),128)),u.value.length===0?(e.openBlock(),e.createElementBlock("div",os,e.toDisplayString(b.nothingFoundMessage||"No options found"),1)):e.createCommentVNode("",!0)],64))],2),[[e.vShow,n.value]])],512))}}),ls=["disabled"],as={key:0,class:"w-3.5 h-3.5",viewBox:"0 0 20 20",fill:"currentColor"},rs={key:1,class:"animate-spin"},is=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(t,{emit:s}){const o=t,l=s,n=e.computed(()=>D(o.color)),c=e.computed(()=>P(o.size,"chip")),i=e.computed(()=>te({disabled:o.disabled,loading:o.loading})),r=e.computed(()=>D(o.color,"filled")),d=e.computed(()=>D(o.color,"outline")),a=()=>{o.disabled||o.loading||o.modelValue&&!o.allowDeselect||l("update:modelValue",!o.modelValue)};return(f,u)=>(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,c.value,i.value,f.modelValue?r.value:d.value,"cursor-pointer"]),disabled:f.disabled||f.loading,onClick:a},[f.withCheckIcon&&f.modelValue?(e.openBlock(),e.createElementBlock("svg",as,u[0]||(u[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),f.loading?(e.openBlock(),e.createElementBlock("span",rs,u[1]||(u[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",f.loading?"opacity-75":""])},e.toDisplayString(f.label),3)],10,ls))}}),cs={class:"indicator-content-wrapper"},ds={key:0,class:"indicator-content"},us={name:"Indicator"},fs=e.defineComponent({...us,props:{position:{default:"top-end"},size:{default:"md"},radius:{default:"full"},color:{default:"danger"},offset:{default:0},inline:{type:Boolean,default:!1},withOutline:{type:Boolean,default:!1},outlineWidth:{default:2},outlineColor:{default:void 0},outlineOffset:{default:0},disabled:{type:Boolean,default:!1},processing:{type:Boolean,default:!1},zIndex:{default:200},label:{default:""},variant:{default:"filled"},dot:{type:Boolean,default:!1},autoContrast:{type:Boolean,default:!0},customClasses:{default:""}},setup(t){const s=t,o=p=>p?["primary","secondary","success","warning","danger","info","dark","light"].includes(p):!0,l=e.computed(()=>[s.inline?"inline-block":"block","relative"]),n=e.computed(()=>{if(typeof s.size=="number")return s.size;const p={xs:6,sm:8,md:10,lg:12,xl:14};return p[s.size]||p.md}),c=e.computed(()=>`position-${s.position}`),i=e.computed(()=>({"--indicator-z-index":`${s.zIndex}`,"--indicator-offset":`${s.offset}px`,"--indicator-outline-width":`${s.outlineWidth}px`,"--indicator-outline-offset":`${s.outlineOffset}px`,"--indicator-size":`${n.value}px`})),r=e.computed(()=>{if(!o(s.color))return"";const p={filled:`${D(s.color,"filled")} ${s.autoContrast?"text-white dark:text-white":""}`,light:`${D(s.color,"light")}`,outline:`${D(s.color,"outline")}`};return p[s.variant]||p.filled}),d=e.computed(()=>typeof s.radius=="number"?"":J(s.radius)),a=e.computed(()=>{const p=[s.dot?"indicator--dot":"",s.processing?"indicator--processing":"",s.withOutline?"indicator--with-outline":"",r.value,d.value,typeof s.customClasses=="string"?s.customClasses:""];return Array.isArray(s.customClasses)&&p.push(...s.customClasses),p.filter(Boolean)}),f=e.computed(()=>{const p={};if(typeof s.radius=="number"&&(p.borderRadius=`${s.radius}px`),o(s.color)||(s.variant==="filled"?(p.backgroundColor=s.color,p.color="white"):s.variant==="light"?(p.backgroundColor=`${s.color}20`,p.color=s.color):s.variant==="outline"&&(p.backgroundColor="transparent",p.color=s.color,p.border=`1px solid ${s.color}`)),s.withOutline){const g=s.outlineColor||s.color;s.outlineOffset>0?p.boxShadow=`0 0 0 ${s.outlineOffset}px white, 0 0 0 ${s.outlineOffset+s.outlineWidth}px ${u(g)}`:p.boxShadow=`0 0 0 ${s.outlineWidth}px ${u(g)}`}return p});function u(p){if(o(p)){const g={primary:"#4F46E5",secondary:"#6B7280",success:"#10B981",warning:"#F59E0B",danger:"#EF4444",info:"#3B82F6",dark:"#1F2937",light:"#F3F4F6"};return g[p]||g.primary}else return p}return(p,g)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["indicator-root",l.value]),style:e.normalizeStyle(i.value)},[e.createElementVNode("div",cs,[e.renderSlot(p.$slots,"default",{},void 0,!0),p.disabled?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["indicator-dot",[a.value,c.value]]),style:e.normalizeStyle(f.value)},[p.label&&!p.dot?(e.openBlock(),e.createElementBlock("span",ds,e.toDisplayString(p.label),1)):e.createCommentVNode("",!0)],6))])],6))}}),cn="",Ze=(t,s)=>{const o=t.__vccOpts||t;for(const[l,n]of s)o[l]=n;return o},ps=Ze(fs,[["__scopeId","data-v-c570d29c"]]),ms=["aria-valuenow"],gs={key:1,class:"flex h-full"},hs={key:2,class:"absolute right-2 top-1/2 transform -translate-y-1/2 text-xs font-medium text-gray-700 dark:text-gray-300"},ys=e.defineComponent({__name:"Progress",props:{value:{default:0},size:{default:"md"},color:{default:"primary"},striped:{type:Boolean,default:!1},animated:{type:Boolean,default:!1},label:{},showValue:{type:Boolean,default:!1},radius:{default:"sm"},class:{default:""},sections:{default:()=>[]}},setup(t){const s=t,o=e.computed(()=>Math.min(100,Math.max(0,s.value))),l=e.computed(()=>typeof s.color=="string"&&(s.color.startsWith("#")||s.color.startsWith("rgb"))),n=e.computed(()=>l.value?"":D(s.color,"filled",{hover:!1,active:!1,focus:!1})),c=e.computed(()=>{const u={width:`${o.value}%`};return l.value&&(u.backgroundColor=s.color),u}),i=e.computed(()=>{if(!s.sections||s.sections.length===0)return[];const u=s.sections.reduce((p,g)=>p+g.value,0);return s.sections.map(p=>{const g=u>0?p.value/u*100:0;return{...p,percentage:g}})}),r=u=>{if(typeof u.color=="string"&&(u.color.startsWith("#")||u.color.startsWith("rgb")))return"";const p=u.color||s.color;return D(p,"filled",{hover:!1,active:!1,focus:!1})},d=u=>{const p={width:`${u.percentage}%`};return typeof u.color=="string"&&(u.color.startsWith("#")||u.color.startsWith("rgb"))&&(p.backgroundColor=u.color),p},a=e.computed(()=>J(s.radius)),f=e.computed(()=>s.class||"");return(u,p)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["relative w-full overflow-hidden",a.value,"bg-gray-100 dark:bg-gray-700",e.unref($e)(u.size,"progress"),f.value]),role:"progressbar","aria-valuenow":u.value,"aria-valuemin":"0","aria-valuemax":"100"},[!u.sections||u.sections.length===0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["h-full transition-all duration-300 ease-in-out",n.value,{"bg-striped":u.striped&&!u.animated,"bg-striped animate-progress":u.animated}]),style:e.normalizeStyle(c.value)},[(u.label||u.showValue)&&(u.size==="lg"||u.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(fe)(u.size)])},e.toDisplayString(u.label||`${o.value}%`),3)):e.createCommentVNode("",!0)],6)):(e.openBlock(),e.createElementBlock("div",gs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(g,y)=>(e.openBlock(),e.createElementBlock("div",{key:y,class:e.normalizeClass(["h-full transition-all duration-300 ease-in-out",r(g),{"bg-striped":g.striped&&!g.animated,"bg-striped animate-progress":g.animated}]),style:e.normalizeStyle(d(g))},[g.label&&(u.size==="lg"||u.size==="xl")&&g.percentage>=10?(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(fe)(u.size)])},e.toDisplayString(g.label),3)):e.createCommentVNode("",!0)],6))),128))])),u.showValue&&!(u.size==="lg"||u.size==="xl")?(e.openBlock(),e.createElementBlock("span",hs,e.toDisplayString(o.value)+"% ",1)):e.createCommentVNode("",!0)],10,ms))}}),dn="",bs={key:0,class:"flex-shrink-0"},xs={key:0,class:"flex items-center justify-between"},ws={key:1,class:"flex-shrink-0 ml-3"},Cs=["disabled"],ks=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(t,{emit:s}){const o=t,l=s,n=e.computed(()=>D(o.color,o.variant,{hover:!1,active:!1,focus:!1,disabled:o.disabled})),c=e.computed(()=>je(o.variant)),i=e.computed(()=>St(o.color,o.variant)),r=e.computed(()=>Et(o.color,o.variant)),d=e.computed(()=>P(o.size,"alert")),a=e.computed(()=>Vt(o.size,"alert")),f=e.computed(()=>fe(o.size)),u=e.computed(()=>We(o.size)),p=e.computed(()=>te({disabled:o.disabled,loading:o.loading})),g=e.computed(()=>Dt({valid:o.valid,invalid:o.invalid})),y=e.computed(()=>Tt({hover:!0,focus:!0},o.color)),m=()=>{l("close")};return(x,w)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["relative rounded-md",c.value,n.value,d.value,p.value,g.value]),role:"alert"},[e.createElementVNode("div",{class:e.normalizeClass(["flex items-start",[u.value]])},[x.icon?(e.openBlock(),e.createElementBlock("div",bs,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(x.icon),{class:e.normalizeClass([a.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",xs,[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",f.value])},e.toDisplayString(x.message),3)):e.createCommentVNode("",!0),e.renderSlot(x.$slots,"default")],2),x.closable?(e.openBlock(),e.createElementBlock("div",ws,[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",y.value]]),disabled:x.disabled,onClick:m},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,Cs)])):e.createCommentVNode("",!0)],2)],2))}}),Bs=e.defineComponent({__name:"Collapse",props:{open:{type:Boolean,default:!1},duration:{default:200},class:{},size:{default:"md"},disableTransition:{type:Boolean,default:!1}},setup(t){const s=t,o=e.ref(null),l=e.ref(null),n={xs:"p-1",sm:"p-2",md:"p-3",lg:"p-4",xl:"p-5"},c=e.computed(()=>We(s.size)),i=e.computed(()=>n[s.size]),r=e.computed(()=>s.disableTransition?"":`transition-[height] ease-in-out duration-${s.duration}`),d=e.computed(()=>({enter:s.duration,leave:s.duration})),a=m=>{m.style.height="0",m.style.overflow="hidden"},f=m=>{const x=m.scrollHeight;m.style.height="0",m.offsetHeight,m.style.height=`${x}px`},u=m=>{m.style.height="",m.style.overflow=""},p=m=>{m.style.height=`${m.scrollHeight}px`,m.style.overflow="hidden",m.offsetHeight},g=m=>{m.style.height="0"},y=m=>{m.style.height="",m.style.overflow=""};return(m,x)=>(e.openBlock(),e.createBlock(e.Transition,{duration:d.value,onBeforeEnter:a,onEnter:f,onAfterEnter:u,onBeforeLeave:p,onLeave:g,onAfterLeave:y},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(["overflow-hidden",c.value,r.value,s.class]),ref_key:"contentRef",ref:o},[e.createElementVNode("div",{ref_key:"innerRef",ref:l,class:e.normalizeClass(i.value)},[e.renderSlot(m.$slots,"default")],2)],2),[[e.vShow,m.open]])]),_:3},8,["duration"]))}}),zs={class:"inline-block"},$s=e.defineComponent({__name:"OvalLoader",props:{size:{default:"md"}},setup(t){const s={xs:"12px",sm:"16px",md:"24px",lg:"36px",xl:"48px"},o=t,l=e.computed(()=>{const n=parseInt(s[o.size]);return`${Math.max(2,n/12)}px`});return(n,c)=>(e.openBlock(),e.createElementBlock("span",zs,[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[o.size],height:s[o.size],borderWidth:l.value})},null,4)]))}}),un="",Ss=e.defineComponent({__name:"DotsLoader",props:{size:{default:"md"}},setup(t){const s={xs:"12px",sm:"16px",md:"24px",lg:"36px",xl:"48px"},o=t,l=e.computed(()=>`${parseInt(s[o.size])/3}px`),n=e.computed(()=>`${parseInt(s[o.size])/6}px`);return(c,i)=>(e.openBlock(),e.createElementBlock("span",{class:"inline-flex items-center",style:e.normalizeStyle({gap:n.value,height:s[o.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))}}),fn="",Es=e.defineComponent({__name:"BarsLoader",props:{size:{default:"md"}},setup(t){const s={xs:"12px",sm:"16px",md:"24px",lg:"36px",xl:"48px"},o=t,l=e.computed(()=>`${parseInt(s[o.size])/6}px`);return(n,c)=>(e.openBlock(),e.createElementBlock("span",{class:"inline-flex",style:e.normalizeStyle({gap:l.value,width:s[o.size],height:`${parseInt(s[o.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))}}),pn="",Vs=e.defineComponent({__name:"Loader",props:{variant:{default:"oval"},color:{default:"primary"},size:{default:"md"},class:{}},setup(t){const s=t,o=i=>/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(i),l=e.computed(()=>!s.color||o(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||!o(s.color)?{}:{color:s.color}),c=e.computed(()=>{switch(s.variant){case"dots":return Ss;case"bars":return Es;default:return $s}});return(i,r)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.value),{class:e.normalizeClass(["inline-block",l.value,s.class]),style:e.normalizeStyle(n.value),size:s.size},null,8,["class","style","size"]))}}),Ns={class:"p-4"},Ds={key:0,class:"absolute top-2 right-2"},Ts={key:1,class:"text-lg font-medium mb-2"},vs={key:2},Os=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(t){const s=t,o=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",[o.value]])},[e.createElementVNode("div",Ns,[l.withCloseButton?(e.openBlock(),e.createElementBlock("div",Ds,[e.createElementVNode("button",{onClick:n[0]||(n[0]=(...c)=>l.onClose&&l.onClose(...c)),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",Ts,e.toDisplayString(l.title),1)):e.createCommentVNode("",!0),l.content?(e.openBlock(),e.createElementBlock("div",vs,e.toDisplayString(l.content),1)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"default")])],2)],4)):e.createCommentVNode("",!0)]),_:3})]))}}),Ms=["top","right","bottom","left"],Ke=["start","end"],Ue=Ms.reduce((t,s)=>t.concat(s,s+"-"+Ke[0],s+"-"+Ke[1]),[]),se=Math.min,Q=Math.max,pe=Math.round,me=Math.floor,I=t=>({x:t,y:t}),Ls={left:"right",right:"left",bottom:"top",top:"bottom"},As={start:"end",end:"start"};function Ee(t,s,o){return Q(t,se(s,o))}function oe(t,s){return typeof t=="function"?t(s):t}function q(t){return t.split("-")[0]}function R(t){return t.split("-")[1]}function Ge(t){return t==="x"?"y":"x"}function Ve(t){return t==="y"?"height":"width"}function ne(t){return["top","bottom"].includes(q(t))?"y":"x"}function Ne(t){return Ge(ne(t))}function Ye(t,s,o){o===void 0&&(o=!1);const l=R(t),n=Ne(t),c=Ve(n);let i=n==="x"?l===(o?"end":"start")?"right":"left":l==="start"?"bottom":"top";return s.reference[c]>s.floating[c]&&(i=he(i)),[i,he(i)]}function Ps(t){const s=he(t);return[ge(t),s,ge(s)]}function ge(t){return t.replace(/start|end/g,s=>As[s])}function Is(t,s,o){const l=["left","right"],n=["right","left"],c=["top","bottom"],i=["bottom","top"];switch(t){case"top":case"bottom":return o?s?n:l:s?l:n;case"left":case"right":return s?c:i;default:return[]}}function Rs(t,s,o,l){const n=R(t);let c=Is(q(t),o==="start",l);return n&&(c=c.map(i=>i+"-"+n),s&&(c=c.concat(c.map(ge)))),c}function he(t){return t.replace(/left|right|bottom|top/g,s=>Ls[s])}function Fs(t){return{top:0,right:0,bottom:0,left:0,...t}}function Xe(t){return typeof t!="number"?Fs(t):{top:t,right:t,bottom:t,left:t}}function ye(t){const{x:s,y:o,width:l,height:n}=t;return{width:l,height:n,top:o,left:s,right:s+l,bottom:o+n,x:s,y:o}}function Je(t,s,o){let{reference:l,floating:n}=t;const c=ne(s),i=Ne(s),r=Ve(i),d=q(s),a=c==="y",f=l.x+l.width/2-n.width/2,u=l.y+l.height/2-n.height/2,p=l[r]/2-n[r]/2;let g;switch(d){case"top":g={x:f,y:l.y-n.height};break;case"bottom":g={x:f,y:l.y+l.height};break;case"right":g={x:l.x+l.width,y:u};break;case"left":g={x:l.x-n.width,y:u};break;default:g={x:l.x,y:l.y}}switch(R(s)){case"start":g[i]-=p*(o&&a?-1:1);break;case"end":g[i]+=p*(o&&a?-1:1);break}return g}const js=async(t,s,o)=>{const{placement:l="bottom",strategy:n="absolute",middleware:c=[],platform:i}=o,r=c.filter(Boolean),d=await(i.isRTL==null?void 0:i.isRTL(s));let a=await i.getElementRects({reference:t,floating:s,strategy:n}),{x:f,y:u}=Je(a,l,d),p=l,g={},y=0;for(let m=0;m<r.length;m++){const{name:x,fn:w}=r[m],{x:b,y:B,data:h,reset:C}=await w({x:f,y:u,initialPlacement:l,placement:p,strategy:n,middlewareData:g,rects:a,platform:i,elements:{reference:t,floating:s}});f=b??f,u=B??u,g={...g,[x]:{...g[x],...h}},C&&y<=50&&(y++,typeof C=="object"&&(C.placement&&(p=C.placement),C.rects&&(a=C.rects===!0?await i.getElementRects({reference:t,floating:s,strategy:n}):C.rects),{x:f,y:u}=Je(a,p,d)),m=-1)}return{x:f,y:u,placement:p,strategy:n,middlewareData:g}};async function De(t,s){var o;s===void 0&&(s={});const{x:l,y:n,platform:c,rects:i,elements:r,strategy:d}=t,{boundary:a="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:p=!1,padding:g=0}=oe(s,t),y=Xe(g),x=r[p?u==="floating"?"reference":"floating":u],w=ye(await c.getClippingRect({element:(o=await(c.isElement==null?void 0:c.isElement(x)))==null||o?x:x.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(r.floating)),boundary:a,rootBoundary:f,strategy:d})),b=u==="floating"?{x:l,y:n,width:i.floating.width,height:i.floating.height}:i.reference,B=await(c.getOffsetParent==null?void 0:c.getOffsetParent(r.floating)),h=await(c.isElement==null?void 0:c.isElement(B))?await(c.getScale==null?void 0:c.getScale(B))||{x:1,y:1}:{x:1,y:1},C=ye(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:r,rect:b,offsetParent:B,strategy:d}):b);return{top:(w.top-C.top+y.top)/h.y,bottom:(C.bottom-w.bottom+y.bottom)/h.y,left:(w.left-C.left+y.left)/h.x,right:(C.right-w.right+y.right)/h.x}}const Ws=t=>({name:"arrow",options:t,async fn(s){const{x:o,y:l,placement:n,rects:c,platform:i,elements:r,middlewareData:d}=s,{element:a,padding:f=0}=oe(t,s)||{};if(a==null)return{};const u=Xe(f),p={x:o,y:l},g=Ne(n),y=Ve(g),m=await i.getDimensions(a),x=g==="y",w=x?"top":"left",b=x?"bottom":"right",B=x?"clientHeight":"clientWidth",h=c.reference[y]+c.reference[g]-p[g]-c.floating[y],C=p[g]-c.reference[g],E=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a));let S=E?E[B]:0;(!S||!await(i.isElement==null?void 0:i.isElement(E)))&&(S=r.floating[B]||c.floating[y]);const N=h/2-C/2,T=S/2-m[y]/2-1,k=se(u[w],T),z=se(u[b],T),V=k,v=S-m[y]-z,O=S/2-m[y]/2+N,ie=Ee(V,O,v),Z=!d.arrow&&R(n)!=null&&O!==ie&&c.reference[y]/2-(O<V?k:z)-m[y]/2<0,W=Z?O<V?O-V:O-v:0;return{[g]:p[g]+W,data:{[g]:ie,centerOffset:O-ie-W,...Z&&{alignmentOffset:W}},reset:Z}}});function Hs(t,s,o){return(t?[...o.filter(n=>R(n)===t),...o.filter(n=>R(n)!==t)]:o.filter(n=>q(n)===n)).filter(n=>t?R(n)===t||(s?ge(n)!==n:!1):!0)}const qs=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(s){var o,l,n;const{rects:c,middlewareData:i,placement:r,platform:d,elements:a}=s,{crossAxis:f=!1,alignment:u,allowedPlacements:p=Ue,autoAlignment:g=!0,...y}=oe(t,s),m=u!==void 0||p===Ue?Hs(u||null,g,p):p,x=await De(s,y),w=((o=i.autoPlacement)==null?void 0:o.index)||0,b=m[w];if(b==null)return{};const B=Ye(b,c,await(d.isRTL==null?void 0:d.isRTL(a.floating)));if(r!==b)return{reset:{placement:m[0]}};const h=[x[q(b)],x[B[0]],x[B[1]]],C=[...((l=i.autoPlacement)==null?void 0:l.overflows)||[],{placement:b,overflows:h}],E=m[w+1];if(E)return{data:{index:w+1,overflows:C},reset:{placement:E}};const S=C.map(k=>{const z=R(k.placement);return[k.placement,z&&f?k.overflows.slice(0,2).reduce((V,v)=>V+v,0):k.overflows[0],k.overflows]}).sort((k,z)=>k[1]-z[1]),T=((n=S.filter(k=>k[2].slice(0,R(k[0])?2:3).every(z=>z<=0))[0])==null?void 0:n[0])||S[0][0];return T!==r?{data:{index:w+1,overflows:C},reset:{placement:T}}:{}}}},Zs=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(s){var o,l;const{placement:n,middlewareData:c,rects:i,initialPlacement:r,platform:d,elements:a}=s,{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:m=!0,...x}=oe(t,s);if((o=c.arrow)!=null&&o.alignmentOffset)return{};const w=q(n),b=ne(r),B=q(r)===r,h=await(d.isRTL==null?void 0:d.isRTL(a.floating)),C=p||(B||!m?[he(r)]:Ps(r)),E=y!=="none";!p&&E&&C.push(...Rs(r,m,y,h));const S=[r,...C],N=await De(s,x),T=[];let k=((l=c.flip)==null?void 0:l.overflows)||[];if(f&&T.push(N[w]),u){const O=Ye(n,i,h);T.push(N[O[0]],N[O[1]])}if(k=[...k,{placement:n,overflows:T}],!T.every(O=>O<=0)){var z,V;const O=(((z=c.flip)==null?void 0:z.index)||0)+1,ie=S[O];if(ie)return{data:{index:O,overflows:k},reset:{placement:ie}};let Z=(V=k.filter(W=>W.overflows[0]<=0).sort((W,U)=>W.overflows[1]-U.overflows[1])[0])==null?void 0:V.placement;if(!Z)switch(g){case"bestFit":{var v;const W=(v=k.filter(U=>{if(E){const G=ne(U.placement);return G===b||G==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(G=>G>0).reduce((G,ln)=>G+ln,0)]).sort((U,G)=>U[1]-G[1])[0])==null?void 0:v[0];W&&(Z=W);break}case"initialPlacement":Z=r;break}if(n!==Z)return{reset:{placement:Z}}}return{}}}};async function Ks(t,s){const{placement:o,platform:l,elements:n}=t,c=await(l.isRTL==null?void 0:l.isRTL(n.floating)),i=q(o),r=R(o),d=ne(o)==="y",a=["left","top"].includes(i)?-1:1,f=c&&d?-1:1,u=oe(s,t);let{mainAxis:p,crossAxis:g,alignmentAxis:y}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return r&&typeof y=="number"&&(g=r==="end"?y*-1:y),d?{x:g*f,y:p*a}:{x:p*a,y:g*f}}const Us=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(s){var o,l;const{x:n,y:c,placement:i,middlewareData:r}=s,d=await Ks(s,t);return i===((o=r.offset)==null?void 0:o.placement)&&(l=r.arrow)!=null&&l.alignmentOffset?{}:{x:n+d.x,y:c+d.y,data:{...d,placement:i}}}}},Gs=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(s){const{x:o,y:l,placement:n}=s,{mainAxis:c=!0,crossAxis:i=!1,limiter:r={fn:x=>{let{x:w,y:b}=x;return{x:w,y:b}}},...d}=oe(t,s),a={x:o,y:l},f=await De(s,d),u=ne(q(n)),p=Ge(u);let g=a[p],y=a[u];if(c){const x=p==="y"?"top":"left",w=p==="y"?"bottom":"right",b=g+f[x],B=g-f[w];g=Ee(b,g,B)}if(i){const x=u==="y"?"top":"left",w=u==="y"?"bottom":"right",b=y+f[x],B=y-f[w];y=Ee(b,y,B)}const m=r.fn({...s,[p]:g,[u]:y});return{...m,data:{x:m.x-o,y:m.y-l,enabled:{[p]:c,[u]:i}}}}}};function be(){return typeof window<"u"}function _(t){return Te(t)?(t.nodeName||"").toLowerCase():"#document"}function M(t){var s;return(t==null||(s=t.ownerDocument)==null?void 0:s.defaultView)||window}function F(t){var s;return(s=(Te(t)?t.ownerDocument:t.document)||window.document)==null?void 0:s.documentElement}function Te(t){return be()?t instanceof Node||t instanceof M(t).Node:!1}function L(t){return be()?t instanceof Element||t instanceof M(t).Element:!1}function j(t){return be()?t instanceof HTMLElement||t instanceof M(t).HTMLElement:!1}function Qe(t){return!be()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof M(t).ShadowRoot}function ce(t){const{overflow:s,overflowX:o,overflowY:l,display:n}=A(t);return/auto|scroll|overlay|hidden|clip/.test(s+l+o)&&!["inline","contents"].includes(n)}function Ys(t){return["table","td","th"].includes(_(t))}function xe(t){return[":popover-open",":modal"].some(s=>{try{return t.matches(s)}catch{return!1}})}function ve(t){const s=Oe(),o=L(t)?A(t):t;return o.transform!=="none"||o.perspective!=="none"||(o.containerType?o.containerType!=="normal":!1)||!s&&(o.backdropFilter?o.backdropFilter!=="none":!1)||!s&&(o.filter?o.filter!=="none":!1)||["transform","perspective","filter"].some(l=>(o.willChange||"").includes(l))||["paint","layout","strict","content"].some(l=>(o.contain||"").includes(l))}function Xs(t){let s=K(t);for(;j(s)&&!le(s);){if(ve(s))return s;if(xe(s))return null;s=K(s)}return null}function Oe(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function le(t){return["html","body","#document"].includes(_(t))}function A(t){return M(t).getComputedStyle(t)}function we(t){return L(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function K(t){if(_(t)==="html")return t;const s=t.assignedSlot||t.parentNode||Qe(t)&&t.host||F(t);return Qe(s)?s.host:s}function _e(t){const s=K(t);return le(s)?t.ownerDocument?t.ownerDocument.body:t.body:j(s)&&ce(s)?s:_e(s)}function de(t,s,o){var l;s===void 0&&(s=[]),o===void 0&&(o=!0);const n=_e(t),c=n===((l=t.ownerDocument)==null?void 0:l.body),i=M(n);if(c){const r=Me(i);return s.concat(i,i.visualViewport||[],ce(n)?n:[],r&&o?de(r):[])}return s.concat(n,de(n,[],o))}function Me(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function et(t){const s=A(t);let o=parseFloat(s.width)||0,l=parseFloat(s.height)||0;const n=j(t),c=n?t.offsetWidth:o,i=n?t.offsetHeight:l,r=pe(o)!==c||pe(l)!==i;return r&&(o=c,l=i),{width:o,height:l,$:r}}function Le(t){return L(t)?t:t.contextElement}function ae(t){const s=Le(t);if(!j(s))return I(1);const o=s.getBoundingClientRect(),{width:l,height:n,$:c}=et(s);let i=(c?pe(o.width):o.width)/l,r=(c?pe(o.height):o.height)/n;return(!i||!Number.isFinite(i))&&(i=1),(!r||!Number.isFinite(r))&&(r=1),{x:i,y:r}}const Js=I(0);function tt(t){const s=M(t);return!Oe()||!s.visualViewport?Js:{x:s.visualViewport.offsetLeft,y:s.visualViewport.offsetTop}}function Qs(t,s,o){return s===void 0&&(s=!1),!o||s&&o!==M(t)?!1:s}function ee(t,s,o,l){s===void 0&&(s=!1),o===void 0&&(o=!1);const n=t.getBoundingClientRect(),c=Le(t);let i=I(1);s&&(l?L(l)&&(i=ae(l)):i=ae(t));const r=Qs(c,o,l)?tt(c):I(0);let d=(n.left+r.x)/i.x,a=(n.top+r.y)/i.y,f=n.width/i.x,u=n.height/i.y;if(c){const p=M(c),g=l&&L(l)?M(l):l;let y=p,m=Me(y);for(;m&&l&&g!==y;){const x=ae(m),w=m.getBoundingClientRect(),b=A(m),B=w.left+(m.clientLeft+parseFloat(b.paddingLeft))*x.x,h=w.top+(m.clientTop+parseFloat(b.paddingTop))*x.y;d*=x.x,a*=x.y,f*=x.x,u*=x.y,d+=B,a+=h,y=M(m),m=Me(y)}}return ye({width:f,height:u,x:d,y:a})}function Ae(t,s){const o=we(t).scrollLeft;return s?s.left+o:ee(F(t)).left+o}function st(t,s,o){o===void 0&&(o=!1);const l=t.getBoundingClientRect(),n=l.left+s.scrollLeft-(o?0:Ae(t,l)),c=l.top+s.scrollTop;return{x:n,y:c}}function _s(t){let{elements:s,rect:o,offsetParent:l,strategy:n}=t;const c=n==="fixed",i=F(l),r=s?xe(s.floating):!1;if(l===i||r&&c)return o;let d={scrollLeft:0,scrollTop:0},a=I(1);const f=I(0),u=j(l);if((u||!u&&!c)&&((_(l)!=="body"||ce(i))&&(d=we(l)),j(l))){const g=ee(l);a=ae(l),f.x=g.x+l.clientLeft,f.y=g.y+l.clientTop}const p=i&&!u&&!c?st(i,d,!0):I(0);return{width:o.width*a.x,height:o.height*a.y,x:o.x*a.x-d.scrollLeft*a.x+f.x+p.x,y:o.y*a.y-d.scrollTop*a.y+f.y+p.y}}function eo(t){return Array.from(t.getClientRects())}function to(t){const s=F(t),o=we(t),l=t.ownerDocument.body,n=Q(s.scrollWidth,s.clientWidth,l.scrollWidth,l.clientWidth),c=Q(s.scrollHeight,s.clientHeight,l.scrollHeight,l.clientHeight);let i=-o.scrollLeft+Ae(t);const r=-o.scrollTop;return A(l).direction==="rtl"&&(i+=Q(s.clientWidth,l.clientWidth)-n),{width:n,height:c,x:i,y:r}}function so(t,s){const o=M(t),l=F(t),n=o.visualViewport;let c=l.clientWidth,i=l.clientHeight,r=0,d=0;if(n){c=n.width,i=n.height;const a=Oe();(!a||a&&s==="fixed")&&(r=n.offsetLeft,d=n.offsetTop)}return{width:c,height:i,x:r,y:d}}function oo(t,s){const o=ee(t,!0,s==="fixed"),l=o.top+t.clientTop,n=o.left+t.clientLeft,c=j(t)?ae(t):I(1),i=t.clientWidth*c.x,r=t.clientHeight*c.y,d=n*c.x,a=l*c.y;return{width:i,height:r,x:d,y:a}}function ot(t,s,o){let l;if(s==="viewport")l=so(t,o);else if(s==="document")l=to(F(t));else if(L(s))l=oo(s,o);else{const n=tt(t);l={x:s.x-n.x,y:s.y-n.y,width:s.width,height:s.height}}return ye(l)}function nt(t,s){const o=K(t);return o===s||!L(o)||le(o)?!1:A(o).position==="fixed"||nt(o,s)}function no(t,s){const o=s.get(t);if(o)return o;let l=de(t,[],!1).filter(r=>L(r)&&_(r)!=="body"),n=null;const c=A(t).position==="fixed";let i=c?K(t):t;for(;L(i)&&!le(i);){const r=A(i),d=ve(i);!d&&r.position==="fixed"&&(n=null),(c?!d&&!n:!d&&r.position==="static"&&!!n&&["absolute","fixed"].includes(n.position)||ce(i)&&!d&&nt(t,i))?l=l.filter(f=>f!==i):n=r,i=K(i)}return s.set(t,l),l}function lo(t){let{element:s,boundary:o,rootBoundary:l,strategy:n}=t;const i=[...o==="clippingAncestors"?xe(s)?[]:no(s,this._c):[].concat(o),l],r=i[0],d=i.reduce((a,f)=>{const u=ot(s,f,n);return a.top=Q(u.top,a.top),a.right=se(u.right,a.right),a.bottom=se(u.bottom,a.bottom),a.left=Q(u.left,a.left),a},ot(s,r,n));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function ao(t){const{width:s,height:o}=et(t);return{width:s,height:o}}function ro(t,s,o){const l=j(s),n=F(s),c=o==="fixed",i=ee(t,!0,c,s);let r={scrollLeft:0,scrollTop:0};const d=I(0);if(l||!l&&!c)if((_(s)!=="body"||ce(n))&&(r=we(s)),l){const p=ee(s,!0,c,s);d.x=p.x+s.clientLeft,d.y=p.y+s.clientTop}else n&&(d.x=Ae(n));const a=n&&!l&&!c?st(n,r):I(0),f=i.left+r.scrollLeft-d.x-a.x,u=i.top+r.scrollTop-d.y-a.y;return{x:f,y:u,width:i.width,height:i.height}}function Pe(t){return A(t).position==="static"}function lt(t,s){if(!j(t)||A(t).position==="fixed")return null;if(s)return s(t);let o=t.offsetParent;return F(t)===o&&(o=o.ownerDocument.body),o}function at(t,s){const o=M(t);if(xe(t))return o;if(!j(t)){let n=K(t);for(;n&&!le(n);){if(L(n)&&!Pe(n))return n;n=K(n)}return o}let l=lt(t,s);for(;l&&Ys(l)&&Pe(l);)l=lt(l,s);return l&&le(l)&&Pe(l)&&!ve(l)?o:l||Xs(t)||o}const io=async function(t){const s=this.getOffsetParent||at,o=this.getDimensions,l=await o(t.floating);return{reference:ro(t.reference,await s(t.floating),t.strategy),floating:{x:0,y:0,width:l.width,height:l.height}}};function co(t){return A(t).direction==="rtl"}const uo={convertOffsetParentRelativeRectToViewportRelativeRect:_s,getDocumentElement:F,getClippingRect:lo,getOffsetParent:at,getElementRects:io,getClientRects:eo,getDimensions:ao,getScale:ae,isElement:L,isRTL:co};function fo(t,s){let o=null,l;const n=F(t);function c(){var r;clearTimeout(l),(r=o)==null||r.disconnect(),o=null}function i(r,d){r===void 0&&(r=!1),d===void 0&&(d=1),c();const{left:a,top:f,width:u,height:p}=t.getBoundingClientRect();if(r||s(),!u||!p)return;const g=me(f),y=me(n.clientWidth-(a+u)),m=me(n.clientHeight-(f+p)),x=me(a),b={rootMargin:-g+"px "+-y+"px "+-m+"px "+-x+"px",threshold:Q(0,se(1,d))||1};let B=!0;function h(C){const E=C[0].intersectionRatio;if(E!==d){if(!B)return i();E?i(!1,E):l=setTimeout(()=>{i(!1,1e-7)},1e3)}B=!1}try{o=new IntersectionObserver(h,{...b,root:n.ownerDocument})}catch{o=new IntersectionObserver(h,b)}o.observe(t)}return i(!0),c}function po(t,s,o,l){l===void 0&&(l={});const{ancestorScroll:n=!0,ancestorResize:c=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:r=typeof IntersectionObserver=="function",animationFrame:d=!1}=l,a=Le(t),f=n||c?[...a?de(a):[],...de(s)]:[];f.forEach(w=>{n&&w.addEventListener("scroll",o,{passive:!0}),c&&w.addEventListener("resize",o)});const u=a&&r?fo(a,o):null;let p=-1,g=null;i&&(g=new ResizeObserver(w=>{let[b]=w;b&&b.target===a&&g&&(g.unobserve(s),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var B;(B=g)==null||B.observe(s)})),o()}),a&&!d&&g.observe(a),g.observe(s));let y,m=d?ee(t):null;d&&x();function x(){const w=ee(t);m&&(w.x!==m.x||w.y!==m.y||w.width!==m.width||w.height!==m.height)&&o(),m=w,y=requestAnimationFrame(x)}return o(),()=>{var w;f.forEach(b=>{n&&b.removeEventListener("scroll",o),c&&b.removeEventListener("resize",o)}),u==null||u(),(w=g)==null||w.disconnect(),g=null,d&&cancelAnimationFrame(y)}}const rt=Us,mo=qs,it=Gs,ct=Zs,go=Ws,ho=(t,s,o)=>{const l=new Map,n={platform:uo,...o},c={...n.platform,_c:l};return js(t,s,{...n,platform:c})};function yo(t){return t!=null&&typeof t=="object"&&"$el"in t}function Ie(t){if(yo(t)){const s=t.$el;return Te(s)&&_(s)==="#comment"?null:s}return t}function re(t){return typeof t=="function"?t():e.unref(t)}function bo(t){return{name:"arrow",options:t,fn(s){const o=Ie(re(t.element));return o==null?{}:go({element:o,padding:t.padding}).fn(s)}}}function dt(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function ut(t,s){const o=dt(t);return Math.round(s*o)/o}function ft(t,s,o){o===void 0&&(o={});const l=o.whileElementsMounted,n=e.computed(()=>{var S;return(S=re(o.open))!=null?S:!0}),c=e.computed(()=>re(o.middleware)),i=e.computed(()=>{var S;return(S=re(o.placement))!=null?S:"bottom"}),r=e.computed(()=>{var S;return(S=re(o.strategy))!=null?S:"absolute"}),d=e.computed(()=>{var S;return(S=re(o.transform))!=null?S:!0}),a=e.computed(()=>Ie(t.value)),f=e.computed(()=>Ie(s.value)),u=e.ref(0),p=e.ref(0),g=e.ref(r.value),y=e.ref(i.value),m=e.shallowRef({}),x=e.ref(!1),w=e.computed(()=>{const S={position:g.value,left:"0",top:"0"};if(!f.value)return S;const N=ut(f.value,u.value),T=ut(f.value,p.value);return d.value?{...S,transform:"translate("+N+"px, "+T+"px)",...dt(f.value)>=1.5&&{willChange:"transform"}}:{position:g.value,left:N+"px",top:T+"px"}});let b;function B(){if(a.value==null||f.value==null)return;const S=n.value;ho(a.value,f.value,{middleware:c.value,placement:i.value,strategy:r.value}).then(N=>{u.value=N.x,p.value=N.y,g.value=N.strategy,y.value=N.placement,m.value=N.middlewareData,x.value=S!==!1})}function h(){typeof b=="function"&&(b(),b=void 0)}function C(){if(h(),l===void 0){B();return}if(a.value!=null&&f.value!=null){b=l(a.value,f.value,B);return}}function E(){n.value||(x.value=!1)}return e.watch([c,i,r,n],B,{flush:"sync"}),e.watch([a,f],C,{flush:"sync"}),e.watch(n,E,{flush:"sync"}),e.getCurrentScope()&&e.onScopeDispose(h),{x:e.shallowReadonly(u),y:e.shallowReadonly(p),strategy:e.shallowReadonly(g),placement:e.shallowReadonly(y),middlewareData:e.shallowReadonly(m),isPositioned:e.shallowReadonly(x),floatingStyles:w,update:B}}function xo(t){return e.getCurrentScope()?(e.onScopeDispose(t),!0):!1}const wo=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;function pt(t,s,o={}){const{immediate:l=!0}=o,n=e.ref(!1);let c=null;function i(){c&&(clearTimeout(c),c=null)}function r(){n.value=!1,i()}function d(...a){i(),n.value=!0,c=setTimeout(()=>{n.value=!1,c=null,t(...a)},e.toValue(s))}return l&&(n.value=!0,wo&&d()),xo(r),{isPending:e.readonly(n),start:d,stop:r}}function mt(t={}){const{openDelay:s=0,closeDelay:o=150,onOpen:l,onClose:n,initiallyOpened:c=!1}=t,i=e.ref(!1),{start:r,stop:d}=pt(()=>{i.value=!0,l==null||l()},s),{start:a,stop:f}=pt(()=>{i.value=!1,n==null||n()},o),u=()=>{f(),s===0?(i.value=!0,l==null||l()):r()},p=()=>{d(),o===0?(i.value=!1,n==null||n()):a()};return c&&u(),{isOpen:i,open:u,close:p}}const Re=Symbol("hover-card"),Fe=e.defineComponent({__name:"HoverCardTarget",props:{withWrapper:{type:Boolean,default:!1},wrapperClass:{default:""}},setup(t){return e.inject(Re,null),(s,o)=>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})}}),Co={class:"rounded-lg bg-white dark:bg-gray-800 shadow-lg border border-gray-200 dark:border-gray-700 px-3 py-2"},gt=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(t){const s=t,o=e.ref(!1);e.onMounted(()=>{o.value=!0});const l=e.ref(null),n=e.ref(null),c=e.ref(null),{isOpen:i,open:r,close:d}=mt({openDelay:s.openDelay,closeDelay:s.closeDelay,initiallyOpened:s.initiallyOpened});e.provide(Re,{isOpen:i,open:r,close:d});const{x:a,y:f,strategy:u,middlewareData:p,placement:g,update:y}=ft(n,c,{placement:s.placement,middleware:[rt(s.offset),ct({fallbackPlacements:["top","bottom","right","left"].filter(h=>h!==s.placement)}),it({padding:8}),bo({element:l})]});e.watch(i,async h=>{h&&await y()});const m=e.computed(()=>{var h,C;return(C=(h=p.value)==null?void 0:h.arrow)==null?void 0:C.x}),x=e.computed(()=>{var h,C;return(C=(h=p.value)==null?void 0:h.arrow)==null?void 0:C.y}),w=e.computed(()=>{switch(g.value){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left";default:return"bottom"}}),b=e.computed(()=>{switch(g.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%)"}}),B=e.computed(()=>({xs:"w-[200px]",sm:"w-[240px]",md:"w-[320px]",lg:"w-[400px]",xl:"w-[480px]"})[s.size]);return(h,C)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"reference",ref:n,class:"relative inline-block",onMouseenter:C[2]||(C[2]=E=>!h.disabled&&e.unref(r)()),onMouseleave:C[3]||(C[3]=E=>!h.disabled&&e.unref(d)())},[e.createVNode(Fe,null,{default:e.withCtx(()=>[e.renderSlot(h.$slots,"target")]),_:3}),o.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:c,style:e.normalizeStyle({position:e.unref(u),top:`${e.unref(f)??0}px`,left:`${e.unref(a)??0}px`,zIndex:h.zIndex||1e3}),class:e.normalizeClass(["min-w-[200px]",[B.value]]),onMouseenter:C[0]||(C[0]=E=>!h.disabled&&e.unref(r)()),onMouseleave:C[1]||(C[1]=E=>!h.disabled&&e.unref(d)())},[e.createElementVNode("div",Co,[e.renderSlot(h.$slots,"dropdown")]),h.withArrow?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"arrowRef",ref:l,class:"absolute w-2 h-2 rotate-45 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700",style:e.normalizeStyle({position:"absolute",left:`${m.value??0}px`,top:`${x.value??0}px`,[w.value]:"-1px","z-index":-1,"transform-origin":"center",transform:`rotate(45deg) ${b.value}`})},null,4)):e.createCommentVNode("",!0)],38)):e.createCommentVNode("",!0)]),_:3})])):e.createCommentVNode("",!0)],544))}});Object.assign(gt,{Target:Fe});const ko={class:"cstu-modal-title"},Bo=["innerHTML"],zo=e.defineComponent({__name:"MessageBoxOk",props:{message:{type:[String,Object],default:""},title:{type:String,default:"Message"},okTitle:{type:String,default:"OK"},okVariant:{type:String,default:"filled"},okColor:{type:String,default:"primary"},okDisabled:{type:Boolean,default:!1},centered:{type:Boolean,default:!0},scrollable:{type:Boolean,default:!1},fullscreen:{type:Boolean,default:!1},size:{type:String,default:"md"},headerClass:{type:String,default:""},bodyClass:{type:String,default:""},footerClass:{type:String,default:""},contentClass:{type:String,default:""},dialogClass:{type:String,default:""},modalClass:{type:String,default:""},showHeaderDivider:{type:Boolean,default:!1},showFooterDivider:{type:Boolean,default:!1},showDividers:{type:Boolean,default:!1},radius:{type:String,default:""},busy:{type:Boolean,default:!1},zIndex:{type:Number,default:1050}},emits:["close"],setup(t,{emit:s}){const o=t,l=s,n=e.ref(!1),c=e.computed(()=>o.radius?{[`cstu-radius-${o.radius}`]:!0}:{});function i(){r(!1)}function r(d){n.value=!1,setTimeout(()=>{document.body.classList.remove("cstu-modal-open"),l("close",d)},300)}return e.onMounted(()=>{document.body.classList.add("cstu-modal-open"),e.nextTick(()=>{n.value=!0})}),e.onBeforeUnmount(()=>{n.value=!1,document.body.classList.remove("cstu-modal-open")}),(d,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[n.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"cstu-modal-backdrop",style:e.normalizeStyle({zIndex:t.zIndex-10})},null,4)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"cstu-modal"},{default:e.withCtx(()=>[n.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["cstu-modal modal",{"cstu-modal-static":!0,"cstu-modal-scrollable":t.scrollable},t.modalClass]),style:e.normalizeStyle({display:n.value?"block":"none",zIndex:t.zIndex}),tabindex:"-1",role:"dialog","aria-modal":"true",onClick:i},[e.createElementVNode("div",{class:e.normalizeClass(["cstu-modal-dialog",t.dialogClass,{"cstu-modal-fullscreen":t.fullscreen,"cstu-modal-dialog-centered":t.centered&&!t.fullscreen,"cstu-modal-dialog-scrollable":t.scrollable,[`cstu-modal-${t.size}`]:t.size&&!t.fullscreen}]),onClick:a[2]||(a[2]=e.withModifiers(()=>{},["stop"]))},[a[4]||(a[4]=e.createElementVNode("span",{tabindex:"0"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["cstu-modal-content",t.contentClass,{"cstu-modal-content-fullscreen":t.fullscreen},c.value]),tabindex:"-1"},[e.createElementVNode("header",{class:e.normalizeClass(["cstu-modal-header",t.headerClass,{"show-divider":t.showHeaderDivider||t.showDividers}])},[e.createElementVNode("h5",ko,e.toDisplayString(t.title||"Message"),1),e.createElementVNode("button",{type:"button",class:"cstu-close","aria-label":"Close",onClick:a[0]||(a[0]=f=>r(!1))},a[3]||(a[3]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"cstu-size-6"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"})],-1)]))],2),e.createElementVNode("div",{class:e.normalizeClass(["cstu-modal-body",t.bodyClass])},[typeof t.message=="string"?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:t.message},null,8,Bo)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.message),{key:1}))],2),e.createElementVNode("footer",{class:e.normalizeClass(["cstu-modal-footer",t.footerClass,{"show-divider":t.showFooterDivider||t.showDividers}])},[e.createVNode(X,{variant:t.okVariant,color:t.okColor,disabled:t.okDisabled||t.busy,loading:t.busy,onClick:a[1]||(a[1]=f=>r(!0))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.okTitle),1)]),_:1},8,["variant","color","disabled","loading"])],2)],2),a[5]||(a[5]=e.createElementVNode("span",{tabindex:"0"},null,-1))],2)],6)):e.createCommentVNode("",!0)]),_:1})],64))}}),$o={class:"cstu-modal-title"},So=["innerHTML"],Eo=e.defineComponent({__name:"MessageBoxConfirm",props:{message:{type:[String,Object],default:""},title:{type:String,default:"Confirm"},okTitle:{type:String,default:"OK"},okVariant:{type:String,default:"filled"},okColor:{type:String,default:"primary"},okDisabled:{type:Boolean,default:!1},cancelTitle:{type:String,default:"Cancel"},cancelVariant:{type:String,default:"outline"},cancelColor:{type:String,default:"secondary"},cancelDisabled:{type:Boolean,default:!1},centered:{type:Boolean,default:!0},scrollable:{type:Boolean,default:!1},fullscreen:{type:Boolean,default:!1},size:{type:String,default:"md"},headerClass:{type:String,default:""},bodyClass:{type:String,default:""},footerClass:{type:String,default:""},contentClass:{type:String,default:""},dialogClass:{type:String,default:""},modalClass:{type:String,default:""},showHeaderDivider:{type:Boolean,default:!1},showFooterDivider:{type:Boolean,default:!1},showDividers:{type:Boolean,default:!1},radius:{type:String,default:""},busy:{type:Boolean,default:!1},zIndex:{type:Number,default:1050}},emits:["close"],setup(t,{emit:s}){const o=t,l=s,n=e.ref(!1),c=e.computed(()=>o.radius?{[`cstu-radius-${o.radius}`]:!0}:{});function i(){r(!1)}function r(d){n.value=!1,setTimeout(()=>{document.body.classList.remove("cstu-modal-open"),l("close",d)},300)}return e.onMounted(()=>{document.body.classList.add("cstu-modal-open"),e.nextTick(()=>{n.value=!0})}),e.onBeforeUnmount(()=>{n.value=!1,document.body.classList.remove("cstu-modal-open")}),(d,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[n.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"cstu-modal-backdrop",style:e.normalizeStyle({zIndex:t.zIndex-10})},null,4)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"cstu-modal"},{default:e.withCtx(()=>[n.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["cstu-modal modal",{"cstu-modal-static":!0,"cstu-modal-scrollable":t.scrollable},t.modalClass]),style:e.normalizeStyle({display:n.value?"block":"none",zIndex:t.zIndex}),tabindex:"-1",role:"dialog","aria-modal":"true",onClick:i},[e.createElementVNode("div",{class:e.normalizeClass(["cstu-modal-dialog",t.dialogClass,{"cstu-modal-fullscreen":t.fullscreen,"cstu-modal-dialog-centered":t.centered&&!t.fullscreen,"cstu-modal-dialog-scrollable":t.scrollable,[`cstu-modal-${t.size}`]:t.size&&!t.fullscreen}]),onClick:a[3]||(a[3]=e.withModifiers(()=>{},["stop"]))},[a[5]||(a[5]=e.createElementVNode("span",{tabindex:"0"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["cstu-modal-content",t.contentClass,{"cstu-modal-content-fullscreen":t.fullscreen},c.value]),tabindex:"-1"},[e.createElementVNode("header",{class:e.normalizeClass(["cstu-modal-header",t.headerClass,{"show-divider":t.showHeaderDivider||t.showDividers}])},[e.createElementVNode("h5",$o,e.toDisplayString(t.title||"Confirm"),1),e.createElementVNode("button",{type:"button",class:"cstu-close","aria-label":"Close",onClick:a[0]||(a[0]=f=>r(!1))},a[4]||(a[4]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"cstu-size-6"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"})],-1)]))],2),e.createElementVNode("div",{class:e.normalizeClass(["cstu-modal-body",t.bodyClass])},[typeof t.message=="string"?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:t.message},null,8,So)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.message),{key:1}))],2),e.createElementVNode("footer",{class:e.normalizeClass(["cstu-modal-footer",t.footerClass,{"show-divider":t.showFooterDivider||t.showDividers}])},[e.createVNode(X,{variant:t.cancelVariant,color:t.cancelColor,disabled:t.cancelDisabled||t.busy,onClick:a[1]||(a[1]=f=>r(!1))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.cancelTitle),1)]),_:1},8,["variant","color","disabled"]),e.createVNode(X,{variant:t.okVariant,color:t.okColor,disabled:t.okDisabled||t.busy,loading:t.busy,onClick:a[2]||(a[2]=f=>r(!0))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.okTitle),1)]),_:1},8,["variant","color","disabled","loading"])],2)],2),a[6]||(a[6]=e.createElementVNode("span",{tabindex:"0"},null,-1))],2)],6)):e.createCommentVNode("",!0)]),_:1})],64))}}),Vo=Symbol("CstuModal"),ue=e.reactive(new Map),Ce={show:t=>{const s=ue.get(t);s&&typeof s.show=="function"&&s.show()},hide:t=>{const s=ue.get(t);s&&typeof s.hide=="function"&&s.hide()},toggle:t=>{const s=ue.get(t);s&&typeof s.toggle=="function"&&s.toggle()},msgBoxOk:(t,s={})=>{const o=document.createElement("div");document.body.appendChild(o);const l={...s,message:t};return new Promise(n=>{const c=e.createApp(zo,{...l,onClose:i=>{n(i),setTimeout(()=>{c.unmount(),o.parentNode&&o.parentNode.removeChild(o)},300)}});c.mount(o)})},msgBoxConfirm:(t,s={})=>{const o=document.createElement("div");document.body.appendChild(o);const l={...s,message:t};return new Promise(n=>{const c=e.createApp(Eo,{...l,onClose:i=>{n(i),setTimeout(()=>{c.unmount(),o.parentNode&&o.parentNode.removeChild(o)},300)}});c.mount(o)})}},ht=Ce;function No(){return Ce}function Do(t,s){ue.set(t,s)}function To(t){ue.delete(t)}const vo={install:t=>{t.provide(Vo,Ce),t.config.globalProperties.$cstuModal=Ce}},yt=document.createElement("style");yt.textContent=`
|
|
1
|
+
(function($,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):($=typeof globalThis<"u"?globalThis:$||self,e($.ContentStudioDesignSystem={},$.Vue))})(this,function($,e){"use strict";var pn=Object.defineProperty;var mn=($,e,P)=>e in $?pn($,e,{enumerable:!0,configurable:!0,writable:!0,value:P}):$[e]=P;var X=($,e,P)=>(mn($,typeof e!="symbol"?e+"":e,P),P);const P={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"}},T=(t,s,o={})=>{const{hover:l=!1,active:n=!1,focus:c=!1,disabled:i=!1}=o;if(i)return"cstu-bg-gray-100 cstu-border-gray-200 cstu-text-gray-400 cstu-cursor-not-allowed";const a=P[t];if(!a||s==="default")return"";if(s==="text")return[`cstu-text-${a.base}-${a.main}`,l&&`hover:cstu-text-${a.base}-${a.hover}`,n&&`active:cstu-text-${a.base}-${a.dark}`,c&&`focus:cstu-text-${a.base}-${a.focus}`,i&&"cstu-opacity-50 cstu-cursor-not-allowed"].filter(Boolean);const f=[];switch(s){case"filled":f.push(`cstu-bg-${a.base}-${a.main}`),f.push("cstu-text-white"),l&&f.push(`hover:cstu-bg-${a.base}-${a.hover} hover:cstu-shadow-md`),n&&f.push(`active:cstu-bg-${a.base}-${a.dark}`),c&&f.push(`focus:cstu-ring-${a.base}-${a.focus}/20`);break;case"light":f.push(`cstu-bg-${a.base}-${a.light}`),f.push(`cstu-text-${a.base}-${a.main}`),l&&f.push(`hover:cstu-bg-${a.base}-250`),n&&f.push(`active:cstu-bg-${a.base}-300 active:!cstu-text-white`),c&&f.push(`focus:cstu-ring-${a.base}-${a.focus}/20`);break;case"outline":f.push("cstu-bg-white"),f.push(`cstu-text-${a.base}-${a.main}`),f.push(`cstu-border cstu-border-${a.base}-${a.main}`),l&&f.push(`hover:cstu-bg-${a.base}-50`),n&&f.push(`active:cstu-bg-${a.base}-100`),c&&f.push(`focus:cstu-ring-${a.base}-${a.focus}/20`);break;case"subtle":f.push(`cstu-text-${a.base}-${a.main}`),l&&f.push(`hover:cstu-bg-${a.base}-50`),n&&f.push(`active:cstu-bg-${a.base}-100`),c&&f.push(`focus:cstu-ring-${a.base}-${a.focus}/20`);break;case"white":f.push("cstu-bg-white cstu-text-gray-900"),l&&f.push("hover:cstu-bg-gray-50"),n&&f.push("active:cstu-bg-gray-100"),c&&f.push("focus:cstu-ring-gray-200");break;case"dot":f.push(`cstu-bg-${a.base}-${a.main}`);break;case"bordered":f.push("cstu-bg-white"),f.push(`cstu-text-${a.base}-${a.main}`),f.push(`cstu-border cstu-border-${a.base}-${a.border}`),l&&f.push(`hover:cstu-bg-${a.base}-50 hover:cstu-border-${a.base}-${a.main}`),n&&f.push(`active:cstu-bg-${a.base}-100`),c&&f.push(`focus:cstu-ring-${a.base}-${a.focus}/20`);break;case"bordered-transparent":f.push("cstu-bg-transparent"),f.push(`cstu-text-${a.base}-${a.main}`),f.push(`cstu-border cstu-border-${a.base}-${a.border}`),l&&f.push(`hover:cstu-bg-${a.base}-50/10 hover:cstu-border-${a.base}-${a.main}`),n&&f.push(`active:cstu-bg-${a.base}-100/20`),c&&f.push(`focus:cstu-ring-${a.base}-${a.focus}/20`);break}return f.join(" ")},St=(t,s)=>{if(s==="filled")return"cstu-text-white";const o=P[t];return`cstu-text-${o.base}-${o.main}`},Et=(t,s)=>{if(s==="filled")return"cstu-text-white";const o=P[t];return`cstu-text-${o.base}-${o.main}`},Fe=t=>{const s=["cstu-shadow-sm","cstu-transition-all cstu-duration-200"];switch(t){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(" ")},Be=t=>t?["primary","secondary","success","warning","danger","info","dark","light","initials"].includes(t):!0,ze={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-[0.125rem]"},sm:{padding:{x:"cstu-px-0",y:"cstu-py-0"},text:"cstu-text-sm",height:"cstu-h-[0.1875rem]"},md:{padding:{x:"cstu-px-0",y:"cstu-py-0"},text:"cstu-text-base",height:"cstu-h-[0.25rem]"},lg:{padding:{x:"cstu-px-0",y:"cstu-py-0"},text:"cstu-text-sm",height:"cstu-h-[0.3125rem]"},xl:{padding:{x:"cstu-px-0",y:"cstu-py-0"},text:"cstu-text-base",height:"cstu-h-[0.375rem]"}},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]"}}},R=(t,s)=>{var o,l;if(typeof s=="string"){const n=ze[s][t];return[(o=n==null?void 0:n.padding)==null?void 0:o.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[t]},Nt=(t,s)=>ze[s][t].icon||"",$e=(t,s)=>ze[s][t].height||"",We=t=>{switch(t){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"}},He=t=>{switch(t){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"}},te=t=>{const s=[];return t.disabled&&s.push("cstu-opacity-50 cstu-cursor-not-allowed cstu-pointer-events-none"),t.loading&&s.push("cstu-cursor-wait"),t.active&&s.push("cstu-ring-2 cstu-ring-offset-2"),t.error&&s.push("cstu-border-red-300 focus:cstu-ring-red-500/20 focus:cstu-border-red-500"),t.success&&s.push("cstu-border-green-300 focus:cstu-ring-green-500/20 focus:cstu-border-green-500"),s.join(" ")},Dt=t=>t?"cstu-opacity-50 cstu-cursor-not-allowed cstu-pointer-events-none":"",Tt=t=>{const s=[];return t.valid&&s.push("cstu-border-green-300 focus:cstu-ring-green-500/20 focus:cstu-border-green-500"),t.invalid&&s.push("cstu-border-red-300 focus:cstu-ring-red-500/20 focus:cstu-border-red-500"),t.pending&&s.push("cstu-border-yellow-300 focus:cstu-ring-yellow-500/20 focus:cstu-border-yellow-500"),s.join(" ")},vt=(t,s="primary")=>{const o=[];return t.hover&&o.push(`hover:cstu-bg-${s}-50`),t.active&&o.push(`active:cstu-bg-${s}-100`),t.focus&&o.push(`focus:cstu-outline-none focus:cstu-ring-2 focus:cstu-ring-${s}-500/20 focus:cstu-border-${s}-500`),o.join(" ")},Ot=["disabled","type"],Mt={key:0},L=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"},gradient:{}},emits:{click:t=>!0},setup(t,{emit:s}){const o=t,l=s,n=r=>{!o.disabled&&!o.loading&&l("click",r)},c=r=>({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"})[r]||"cstu-rounded-lg",i=r=>{if(!r)return"bg-gradient-to-r";const d=(r%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"},a=e.computed(()=>{if(Be(o.color)||o.disabled)return{};switch(o.variant){case"filled":return{backgroundColor:o.color,color:"white",borderColor:o.color};case"light":return{backgroundColor:`${o.color}10`,color:o.color,borderColor:"transparent"};case"outline":return{borderColor:o.color,color:o.color};case"subtle":return{color:o.color};case"bordered":return{borderColor:o.color,color:o.color};case"bordered-transparent":return{borderColor:o.color,color:o.color,backgroundColor:"transparent"};default:return{}}}),f=e.computed(()=>{const r="cstu-inline-flex cstu-items-center cstu-justify-center cstu-font-medium cstu-transition-all cstu-duration-200";if(o.variant==="gradient"&&o.gradient){const x=`${i(o.gradient.deg)} cstu-from-${o.gradient.from}-500 cstu-to-${o.gradient.to||o.gradient.from}-600 hover:cstu-from-${o.gradient.from}-600 hover:cstu-to-${o.gradient.to||o.gradient.from}-700 cstu-text-white`;return[r,x,R(o.size,"button"),c(o.radius),te({disabled:o.disabled,loading:o.loading}),{"cstu-w-full":o.fullWidth,"cstu-cursor-pointer":!o.disabled&&!o.loading}]}const d=Be(o.color)?T(o.color,o.variant,{hover:!0,active:!0,focus:!0}):"",p=R(o.size,"button"),m=te({disabled:o.disabled,loading:o.loading}),g=$e(o.size,"button"),h=c(o.radius),b=!Be(o.color)&&["outline","bordered","bordered-transparent"].includes(o.variant)?"cstu-border":"";return[r,d,b,p,g,m,h,{"cstu-w-full":o.fullWidth,"cstu-cursor-pointer":!o.disabled&&!o.loading,"cstu-border":o.variant==="outline"||o.variant==="bordered"||o.variant==="bordered-transparent"}]});return(r,d)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(f.value),style:e.normalizeStyle(a.value),disabled:r.disabled||r.loading,type:r.type,onClick:n},[e.renderSlot(r.$slots,"leftSection"),e.renderSlot(r.$slots,"default"),r.loading?(e.openBlock(),e.createElementBlock("span",Mt,[e.renderSlot(r.$slots,"loader",{},()=>[d[0]||(d[0]=e.createElementVNode("svg",{class:"cstu-animate-spin cstu-h-4 cstu-w-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[e.createElementVNode("circle",{class:"cstu-opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),e.createElementVNode("path",{class:"cstu-opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1))])])):e.createCommentVNode("",!0),e.renderSlot(r.$slots,"rightSection")],14,Ot))}}),qe=t=>{const s=["cstu-relative"];t.fullWidth&&s.push("cstu-w-full");const o=te({disabled:t.disabled,error:t.error,required:t.required||t.withAsterisk});return o&&s.push(o),s.join(" ")},Ve=(t,s=!1)=>{const o=["cstu-block","cstu-font-medium"];switch(s||o.push("cstu-mb-1"),t.size){case"xs":o.push("cstu-text-xs");break;case"sm":o.push("cstu-text-sm");break;case"md":o.push("cstu-text-base");break;case"lg":o.push("cstu-text-lg");break;case"xl":o.push("cstu-text-xl");break;default:o.push("cstu-text-sm")}return t.error?o.push("cstu-text-red-500"):t.disabled?o.push("cstu-text-gray-400"):o.push("cstu-text-gray-700"),(t.required||t.withAsterisk)&&o.push('after:cstu-content-["*"] after:cstu-ml-0.5 after:cstu-text-red-500'),o.join(" ")},Ge=t=>{const s=["cstu-mt-1","cstu-text-sm"];return t.error?s.push("cstu-text-red-500"):t.disabled?s.push("cstu-text-gray-400"):s.push("cstu-text-gray-500"),s.join(" ")},Lt=["aria-disabled","onKeydown"],Pt={key:2,class:"cstu-text-sm cstu-text-red-500 cstu-mt-0.5"},At={name:"Checkbox"},It=e.defineComponent({...At,props:{modelValue:{type:[Boolean,Array],default:!1},checked:{type:Boolean,default:!1},value:{},id:{},label:{},color:{default:"primary"},size:{default:"md"},labelPosition:{default:"right"},labelSize:{default:"md"},description:{},error:{},disabled:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},variant:{default:"filled"}},emits:["update:modelValue","change"],setup(t,{emit:s}){const o=t,l=s,n=e.computed(()=>o.modelValue||o.checked),c=()=>{if(o.disabled)return;const h=!n.value;l("update:modelValue",h),l("change",h)},i=()=>{c()},a=e.computed(()=>Ve({size:o.labelSize,disabled:o.disabled,error:o.error},!0)),f=e.computed(()=>Ge({color:o.color})),r=e.computed(()=>["cstu-flex","cstu-flex-col",o.labelPosition==="left"?"cstu-order-first":""]),d={primary:"blue-450",secondary:"gray-500",success:"green-500",warning:"yellow-500",danger:"red-500",info:"blue-500",dark:"gray-900",light:"gray-300"},p=e.computed(()=>["cstu-inline-flex","cstu-items-center","cstu-justify-center","cstu-cursor-pointer","cstu-transition-colors","cstu-duration-200","cstu-ease-in-out",o.size==="xs"?"cstu-h-[12px] cstu-w-[12px] cstu-rounded":"",o.size==="sm"?"cstu-h-[14px] cstu-w-[14px] cstu-rounded":"",o.size==="md"?"cstu-h-[16px] cstu-w-[16px] cstu-rounded-md":"",o.size==="lg"?"cstu-h-[18px] cstu-w-[18px] cstu-rounded-md":"",o.size==="xl"?"cstu-h-[20px] cstu-w-[20px] cstu-rounded-md":"",o.disabled?"cstu-bg-gray-200 cstu-border cstu-border-gray-200 cstu-cursor-not-allowed":n.value||o.indeterminate?o.variant==="outlined"?`cstu-bg-transparent cstu-border cstu-border-${d[o.color]}`:`cstu-bg-${d[o.color]} cstu-border-${d[o.color]}`:"cstu-bg-white cstu-border cstu-border-gray-400/50"]),m=e.computed(()=>[o.variant==="outlined"&&(n.value||o.indeterminate)?`cstu-text-${d[o.color]}`:o.disabled?"cstu-text-gray-300":"cstu-text-white",o.size==="xs"?"cstu-h-[6px] cstu-w-[6px]":"",o.size==="sm"?"cstu-h-[7px] cstu-w-[7px]":"",o.size==="md"?"cstu-h-[8px] cstu-w-[8px]":"",o.size==="lg"?"cstu-h-[9px] cstu-w-[9px]":"",o.size==="xl"?"cstu-h-[10px] cstu-w-[10px]":""]),g=e.computed(()=>qe({disabled:o.disabled,error:o.error}));return(h,b)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([g.value,"cstu-flex cstu-items-center cstu-gap-2"])},[e.createElementVNode("div",{class:e.normalizeClass(p.value),onClick:i,role:"checkbox","aria-disabled":h.disabled,tabindex:"0",onKeydown:e.withKeys(e.withModifiers(i,["prevent"]),["space"])},[n.value&&!h.indeterminate?(e.openBlock(),e.createElementBlock("svg",{key:0,class:e.normalizeClass(m.value),xmlns:"http://www.w3.org/2000/svg",width:"8",height:"6",viewBox:"0 0 8 6",fill:"none"},b[0]||(b[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),h.indeterminate?(e.openBlock(),e.createElementBlock("svg",{key:1,class:e.normalizeClass(m.value),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 8 7",fill:"none"},b[1]||(b[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,Lt),h.label||h.description?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(r.value)},[h.label?(e.openBlock(),e.createElementBlock("label",{key:0,class:e.normalizeClass([a.value]),onClick:i},e.toDisplayString(h.label),3)):e.createCommentVNode("",!0),h.description?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(f.value)},e.toDisplayString(h.description),3)):e.createCommentVNode("",!0),h.error?(e.openBlock(),e.createElementBlock("div",Pt,e.toDisplayString(h.error),1)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0)],2))}}),Rt=["aria-checked","aria-disabled"],jt=["id","checked","disabled","value"],Ft=["for"],Wt=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(t,{emit:s}){const o=t,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"},c=s,i=e.computed(()=>o.modelValue===o.value),a=()=>{o.disabled||(c("update:modelValue",o.value),c("change",o.value))},f=e.computed(()=>[qe({disabled:o.disabled,error:o.error}),"cstu-flex cstu-items-center cstu-gap-2",o.labelPosition==="left"?"cstu-flex-row-reverse":"cstu-flex-row"]),r=e.computed(()=>["cstu-relative cstu-flex cstu-items-center cstu-justify-center cstu-rounded-full cstu-transition-colors cstu-duration-200",b.value,i.value?o.variant==="outlined"?`cstu-bg-white !cstu-border-2 cstu-border-${n[o.color]}`:`cstu-bg-${l[o.color]} cstu-border cstu-border-${l[o.color]}`:o.variant==="outlined"?`cstu-bg-white !cstu-border-2 cstu-border-${n[o.color]}`:"cstu-bg-white cstu-border cstu-border-gray-300 hover:cstu-border-gray-400",o.disabled?"cstu-opacity-50 cstu-cursor-not-allowed !cstu-bg-gray-200 !cstu-border-gray-300":"cstu-cursor-pointer"]),d=e.computed(()=>["cstu-rounded-full",u.value,o.variant==="outlined"?`cstu-bg-${l[o.color]}`:"cstu-bg-white",o.disabled?`cstu-opacity-50 ${o.variant==="outlined"?"!cstu-bg-gray-300":"!cstu-bg-gray-200"}`:""]),p=e.computed(()=>Ve({size:o.size,disabled:o.disabled,error:o.error})),m=e.computed(()=>Ge({color:o.color})),g=e.computed(()=>["cstu-text-sm cstu-text-red-500 cstu-mt-1"]),h=e.computed(()=>["cstu-flex cstu-flex-col",o.disabled?"cstu-cursor-not-allowed":"cstu-cursor-pointer"]),b=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]"})[o.size]),u=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]"})[o.size]);return(C,x)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(f.value),onClick:a,"aria-checked":i.value,"aria-disabled":C.disabled,role:"radio"},[e.createElementVNode("input",{ref:"radio",type:"radio",id:C.id,checked:i.value,disabled:C.disabled,value:C.value,onChange:a,class:"cstu-sr-only cstu-border-2"},null,40,jt),e.createElementVNode("div",{class:e.normalizeClass(r.value)},[i.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([d.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(h.value)},[C.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:C.id,class:e.normalizeClass(p.value)},[e.renderSlot(C.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(C.label),1)])],10,Ft)):e.createCommentVNode("",!0),C.description?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(m.value)},[e.renderSlot(C.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(C.description),1)])],2)):e.createCommentVNode("",!0),C.error?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(g.value)},[e.renderSlot(C.$slots,"error",{},()=>[e.createTextVNode(e.toDisplayString(C.error),1)])],2)):e.createCommentVNode("",!0)],2)],10,Rt))}});function J(t){return{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"}[t]}const Ht={key:0,class:"cstu-flex cstu-justify-between cstu-items-center cstu-mb-1"},qt=["for"],Gt={key:0,class:"cstu-text-red-500 cstu-ml-1"},Zt={key:0,class:"cstu-flex cstu-items-center cstu-justify-center cstu-w-[15px] cstu-h-[15px]"},Kt=["id","type","value","placeholder","disabled","required","readonly","pattern","title"],Ut={key:1,class:"cstu-flex cstu-items-center cstu-justify-center cstu-w-[15px] cstu-h-[15px]"},Yt={key:1,class:"cstu-mt-1"},Xt={key:2,class:"cstu-mt-1"},Jt=e.defineComponent({__name:"TextInput",props:{id:{},type:{default:"text"},modelValue:{},placeholder:{},label:{},description:{},error:{},hasError:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},withAsterisk:{type:Boolean,default:!1},showBothErrorAndDescription:{type:Boolean,default:!1},inputProps:{},size:{default:"md"},variant:{default:"default"},radius:{default:"md"},class:{},fullWidth:{type:Boolean,default:!1},pattern:{default:""},title:{default:""}},emits:["update:modelValue","focus","blur","change"],setup(t,{emit:s}){const o=`text-input-${Math.random().toString(36).substring(2,11)}`,l={xs:{inputClass:`cstu-h-8 ${t.fullWidth?"cstu-w-full":"cstu-max-w-[20.5rem]"}`,labelSize:"cstu-text-xs cstu-font-medium",descriptionSize:"cstu-text-xs"},sm:{inputClass:`cstu-h-9 ${t.fullWidth?"cstu-w-full":"cstu-max-w-[20.5rem]"}`,labelSize:"cstu-text-sm cstu-font-medium",descriptionSize:"cstu-text-xs"},md:{inputClass:`cstu-h-10 ${t.fullWidth?"cstu-w-full":"cstu-max-w-[20.5rem]"}`,labelSize:"cstu-text-sm cstu-font-medium",descriptionSize:"cstu-text-sm"},lg:{inputClass:`cstu-h-11 ${t.fullWidth?"cstu-w-full":"cstu-max-w-[20.5rem]"}`,labelSize:"cstu-text-sm cstu-font-medium",descriptionSize:"cstu-text-sm"},xl:{inputClass:`cstu-h-12 ${t.fullWidth?"cstu-w-full":"cstu-max-w-[20.5rem]"}`,labelSize:"cstu-text-base cstu-font-medium",descriptionSize:"cstu-text-sm"}},n=e.computed(()=>`${l[t.size].inputClass.split(" ")[0]} cstu-transition-all cstu-duration-300`),c=e.computed(()=>l[t.size].labelSize),i=e.computed(()=>l[t.size].descriptionSize),a=e.computed(()=>"cstu-text-sm"),f=e.computed(()=>J(t.radius)),r=e.computed(()=>{const u={default:"cstu-bg-white cstu-border cstu-transition-colors cstu-duration-150 cstu-px-3",filled:"cstu-bg-gray-100 cstu-border cstu-border-transparent cstu-transition-colors cstu-duration-150 cstu-px-3",unstyled:"cstu-bg-transparent cstu-border-0"},C=d.value?"":t.variant==="default"?"cstu-border-gray-300/45":"",x=d.value?"cstu-border-red-500":"";return t.variant==="unstyled"?[u[t.variant]]:[u[t.variant],C,x,d.value?"hover:cstu-border-red-500":"hover:cstu-border-blue-450",d.value?"focus-within:cstu-border-red-500 focus-within:cstu-ring-1 focus-within:cstu-ring-red-500":"focus-within:cstu-border-blue-450 focus-within:cstu-ring-1 focus-within:cstu-ring-blue-450"]}),d=e.computed(()=>t.error!==void 0&&t.error!==""||t.hasError),p=s,m=e.ref(!1),g=u=>{m.value=!0,p("focus",u)},h=u=>{m.value=!1,p("blur",u)},b=u=>{p("change",u)};return(u,C)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cstu-flex cstu-flex-col cstu-transition-all cstu-duration-300",[t.class,u.fullWidth?"cstu-w-full":"cstu-max-w-[20.5rem]"]])},[u.label||u.$slots.label?(e.openBlock(),e.createElementBlock("div",Ht,[e.createElementVNode("label",{for:u.id||o,class:e.normalizeClass(["cstu-flex cstu-items-center",c.value])},[e.renderSlot(u.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(u.label)+" ",1),u.withAsterisk||u.required?(e.openBlock(),e.createElementBlock("span",Gt,"*")):e.createCommentVNode("",!0)])],10,qt),e.renderSlot(u.$slots,"labelIcon")])):e.createCommentVNode("",!0),e.createElementVNode("div",null,[e.createElementVNode("div",{class:e.normalizeClass(["cstu-flex cstu-items-center cstu-gap-2 cstu-py-2",n.value,f.value,r.value,{"cstu-opacity-50 cstu-pointer-events-none cstu-cursor-not-allowed":u.disabled}])},[u.$slots.leftSection?(e.openBlock(),e.createElementBlock("div",Zt,[e.renderSlot(u.$slots,"leftSection")])):e.createCommentVNode("",!0),e.createElementVNode("input",e.mergeProps({id:u.id||o,type:u.type,value:u.modelValue,placeholder:u.placeholder,disabled:u.disabled,required:u.required,readonly:u.readonly,pattern:u.pattern,title:u.title,class:["cstu-flex-1 cstu-bg-transparent cstu-outline-none cstu-w-full",a.value,{"cstu-text-gray-500":u.modelValue,"cstu-text-red-500":d.value&&!u.modelValue}],onInput:C[0]||(C[0]=x=>u.$emit("update:modelValue",x.target.value)),onFocus:g,onBlur:h,onChange:b},u.inputProps),null,16,Kt),u.$slots.rightSection?(e.openBlock(),e.createElementBlock("div",Ut,[e.renderSlot(u.$slots,"rightSection")])):e.createCommentVNode("",!0)],2)]),u.description&&!d.value||u.$slots.description&&!d.value||u.showBothErrorAndDescription&&u.description||u.showBothErrorAndDescription&&u.$slots.description?(e.openBlock(),e.createElementBlock("div",Yt,[e.createElementVNode("p",{class:e.normalizeClass(["cstu-text-gray-500",i.value])},[e.renderSlot(u.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(u.description),1)])],2)])):e.createCommentVNode("",!0),d.value&&u.error||d.value&&u.$slots.error||u.showBothErrorAndDescription&&u.error||u.showBothErrorAndDescription&&u.$slots.error?(e.openBlock(),e.createElementBlock("div",Xt,[e.createElementVNode("p",{class:e.normalizeClass(["cstu-text-red-500",i.value])},[e.renderSlot(u.$slots,"error",{},()=>[e.createTextVNode(e.toDisplayString(u.error),1)])],2)])):e.createCommentVNode("",!0)],2))}}),Qt=["aria-expanded","aria-disabled"],_t=["placeholder","disabled"],es={key:1,class:"w-full truncate text-gray-900"},ts={class:"flex items-center gap-2 shrink-0"},ss={key:0,class:"py-3 text-center text-gray-500"},os=["onClick"],ns={key:0,class:"py-3 px-4 text-gray-500 text-center text-sm"},ls=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(t,{emit:s}){const o=t,l=s,n=e.ref(!1),c=e.ref(""),i=e.ref(null),a=e.ref(null),f=x=>({none:"rounded-none",xs:"rounded",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",xl:"rounded-2xl",full:"rounded-full"})[x]||"rounded-lg",r=e.computed(()=>{const x="w-full flex items-center justify-between transition-colors duration-200",B=[R(o.size,"input"),$e(o.size,"input")].join(" "),y=f(o.radius),w=o.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=o.variant==="filled"?`bg-gray-50 border border-transparent ${!o.disabled&&`hover:bg-gray-100 focus-within:bg-white focus-within:border-gray-300 ${w}`}`:`bg-white border border-gray-300 ${!o.disabled&&`hover:border-gray-400 ${w}`}`,V=te({disabled:o.disabled,error:o.error}),N=!o.disabled&&"cursor-pointer";return[x,B,y,S,V,N].filter(Boolean).join(" ")}),d=e.computed(()=>o.options.find(x=>x.value===o.modelValue)),p=e.computed(()=>{if(!c.value)return o.options;const x=c.value.toLowerCase();return o.options.filter(B=>B.label.toLowerCase().includes(x))}),m=()=>{var x;o.disabled||(o.searchable?((x=i.value)==null||x.focus(),n.value=!0):n.value=!n.value)},g=x=>{l("update:modelValue",x.value),l("change",x),n.value=!1,o.searchable&&(c.value=x.label)},h=()=>{l("update:modelValue",null),l("change",null),c.value=""},b=()=>{n.value||(n.value=!0)},u=()=>{n.value||(n.value=!0)},C=x=>{const B=x.target;a.value&&!a.value.contains(B)&&(n.value=!1)};return e.watch(()=>o.modelValue,x=>{x?d.value&&o.searchable&&(c.value=d.value.label):c.value=""}),e.onMounted(()=>{document.addEventListener("click",C)}),e.onUnmounted(()=>{document.removeEventListener("click",C)}),(x,B)=>(e.openBlock(),e.createElementBlock("div",{class:"relative select",ref_key:"selectRoot",ref:a},[e.createElementVNode("div",{class:e.normalizeClass(r.value),role:"combobox","aria-expanded":n.value,"aria-disabled":x.disabled,onClick:m},[x.searchable?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,ref_key:"searchInput",ref:i,"onUpdate:modelValue":B[0]||(B[0]=y=>c.value=y),placeholder:x.placeholder,type:"text",class:"w-full bg-transparent outline-none placeholder:text-gray-500",disabled:x.disabled,onFocus:b,onInput:u},null,40,_t)),[[e.vModelText,c.value]]):(e.openBlock(),e.createElementBlock("div",es,e.toDisplayString(d.value?d.value.label:x.placeholder),1)),e.createElementVNode("div",ts,[x.clearable&&x.modelValue&&!x.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(h,["stop"])},B[1]||(B[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"},B[2]||(B[2]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 9l-7 7-7-7"},null,-1)]),2))])],10,Qt),e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(["absolute w-full z-50 mt-1 bg-white","border border-gray-200",f(o.radius),"shadow-lg max-h-[240px] overflow-auto","divide-y divide-gray-100"])},[x.loading?(e.openBlock(),e.createElementBlock("div",ss,[e.renderSlot(x.$slots,"loader",{},()=>[B[3]||(B[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(p.value,y=>(e.openBlock(),e.createElementBlock("div",{key:y.value,class:e.normalizeClass(["py-2.5 px-4 flex items-center transition-colors duration-200","text-[14px] leading-5","text-gray-900",y.value===x.modelValue?"bg-gray-50 font-medium":"hover:bg-gray-50",y.disabled?"opacity-50 cursor-not-allowed":"cursor-pointer"]),onClick:w=>!y.disabled&&g(y)},[x.withCheckIcon&&y.value===x.modelValue?(e.openBlock(),e.createElementBlock("svg",{key:0,class:e.normalizeClass(["w-4 h-4 text-blue-600 shrink-0",x.checkIconPosition==="left"?"mr-2":"ml-2 order-last"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},B[4]||(B[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":y.disabled})},e.toDisplayString(y.label),3)],10,os))),128)),p.value.length===0?(e.openBlock(),e.createElementBlock("div",ns,e.toDisplayString(x.nothingFoundMessage||"No options found"),1)):e.createCommentVNode("",!0)],64))],2),[[e.vShow,n.value]])],512))}}),as=["disabled"],rs={key:0,class:"w-3.5 h-3.5",viewBox:"0 0 20 20",fill:"currentColor"},is={key:1,class:"animate-spin"},cs=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(t,{emit:s}){const o=t,l=s,n=e.computed(()=>T(o.color)),c=e.computed(()=>R(o.size,"chip")),i=e.computed(()=>te({disabled:o.disabled,loading:o.loading})),a=e.computed(()=>T(o.color,"filled")),f=e.computed(()=>T(o.color,"outline")),r=()=>{o.disabled||o.loading||o.modelValue&&!o.allowDeselect||l("update:modelValue",!o.modelValue)};return(d,p)=>(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,c.value,i.value,d.modelValue?a.value:f.value,"cursor-pointer"]),disabled:d.disabled||d.loading,onClick:r},[d.withCheckIcon&&d.modelValue?(e.openBlock(),e.createElementBlock("svg",rs,p[0]||(p[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),d.loading?(e.openBlock(),e.createElementBlock("span",is,p[1]||(p[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",d.loading?"opacity-75":""])},e.toDisplayString(d.label),3)],10,as))}}),ds={class:"indicator-content-wrapper"},us={key:0,class:"indicator-content"},fs={name:"Indicator"},ps=e.defineComponent({...fs,props:{position:{default:"top-end"},size:{default:"md"},radius:{default:"full"},color:{default:"danger"},offset:{default:0},inline:{type:Boolean,default:!1},withOutline:{type:Boolean,default:!1},outlineWidth:{default:2},outlineColor:{default:void 0},outlineOffset:{default:0},disabled:{type:Boolean,default:!1},processing:{type:Boolean,default:!1},zIndex:{default:200},label:{default:""},variant:{default:"filled"},dot:{type:Boolean,default:!1},autoContrast:{type:Boolean,default:!0},customClasses:{default:""}},setup(t){const s=t,o=m=>m?["primary","secondary","success","warning","danger","info","dark","light"].includes(m):!0,l=e.computed(()=>[s.inline?"inline-block":"block","relative"]),n=e.computed(()=>{if(typeof s.size=="number")return s.size;const m={xs:6,sm:8,md:10,lg:12,xl:14};return m[s.size]||m.md}),c=e.computed(()=>`position-${s.position}`),i=e.computed(()=>({"--indicator-z-index":`${s.zIndex}`,"--indicator-offset":`${s.offset}px`,"--indicator-outline-width":`${s.outlineWidth}px`,"--indicator-outline-offset":`${s.outlineOffset}px`,"--indicator-size":`${n.value}px`})),a=e.computed(()=>{if(!o(s.color))return"";const m={filled:`${T(s.color,"filled")} ${s.autoContrast?"text-white dark:text-white":""}`,light:`${T(s.color,"light")}`,outline:`${T(s.color,"outline")}`};return m[s.variant]||m.filled}),f=e.computed(()=>typeof s.radius=="number"?"":J(s.radius)),r=e.computed(()=>{const m=[s.dot?"indicator--dot":"",s.processing?"indicator--processing":"",s.withOutline?"indicator--with-outline":"",a.value,f.value,typeof s.customClasses=="string"?s.customClasses:""];return Array.isArray(s.customClasses)&&m.push(...s.customClasses),m.filter(Boolean)}),d=e.computed(()=>{const m={};if(typeof s.radius=="number"&&(m.borderRadius=`${s.radius}px`),o(s.color)||(s.variant==="filled"?(m.backgroundColor=s.color,m.color="white"):s.variant==="light"?(m.backgroundColor=`${s.color}20`,m.color=s.color):s.variant==="outline"&&(m.backgroundColor="transparent",m.color=s.color,m.border=`1px solid ${s.color}`)),s.withOutline){const g=s.outlineColor||s.color;s.outlineOffset>0?m.boxShadow=`0 0 0 ${s.outlineOffset}px white, 0 0 0 ${s.outlineOffset+s.outlineWidth}px ${p(g)}`:m.boxShadow=`0 0 0 ${s.outlineWidth}px ${p(g)}`}return m});function p(m){if(o(m)){const g={primary:"#4F46E5",secondary:"#6B7280",success:"#10B981",warning:"#F59E0B",danger:"#EF4444",info:"#3B82F6",dark:"#1F2937",light:"#F3F4F6"};return g[m]||g.primary}else return m}return(m,g)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["indicator-root",l.value]),style:e.normalizeStyle(i.value)},[e.createElementVNode("div",ds,[e.renderSlot(m.$slots,"default",{},void 0,!0),m.disabled?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["indicator-dot",[r.value,c.value]]),style:e.normalizeStyle(d.value)},[m.label&&!m.dot?(e.openBlock(),e.createElementBlock("span",us,e.toDisplayString(m.label),1)):e.createCommentVNode("",!0)],6))])],6))}}),gn="",Ze=(t,s)=>{const o=t.__vccOpts||t;for(const[l,n]of s)o[l]=n;return o},ms=Ze(ps,[["__scopeId","data-v-c570d29c"]]),gs={key:0,class:"cstu-flex cstu-justify-between cstu-mb-1"},hs={key:0,class:"cstu-text-sm cstu-font-medium cstu-text-gray-500"},ys={key:2,class:"cstu-text-sm cstu-font-medium cstu-text-gray-500"},bs=["aria-valuenow"],xs={key:1,class:"cstu-flex cstu-h-full"},ws={key:1,class:"cstu-text-sm cstu-font-medium cstu-text-gray-500 cstu-whitespace-nowrap"},Cs=e.defineComponent({__name:"Progress",props:{value:{default:0},size:{default:"md"},color:{default:"primary"},striped:{type:Boolean,default:!1},animated:{type:Boolean,default:!1},label:{},showValue:{type:Boolean,default:!1},valuePosition:{default:"top"},radius:{default:"sm"},class:{default:""},sections:{default:()=>[]},minValue:{default:0},showMinValue:{type:Boolean,default:!1},minValueColor:{default:"secondary"}},setup(t){const s=t,o=e.computed(()=>Math.min(100,Math.max(0,s.value))),l=e.computed(()=>typeof s.color=="string"&&(s.color.startsWith("#")||s.color.startsWith("rgb"))),n=e.computed(()=>l.value?"":T(s.color,"filled",{hover:!1,active:!1,focus:!1})),c=e.computed(()=>typeof s.minValueColor=="string"&&(s.minValueColor.startsWith("#")||s.minValueColor.startsWith("rgb"))),i=e.computed(()=>!s.minValueColor||c.value?"":T(s.minValueColor,"filled",{hover:!1,active:!1,focus:!1})),a=e.computed(()=>{const u={width:`${o.value}%`};return l.value&&(u.backgroundColor=s.color),u}),f=e.computed(()=>({left:`${s.minValue}%`})),r=e.computed(()=>{if(!s.sections||s.sections.length===0)return[];const u=s.sections.reduce((C,x)=>C+x.value,0);return s.sections.map(C=>{const x=u>0?C.value/u*100:0;return{...C,percentage:x}})}),d=u=>{if(typeof u.color=="string"&&(u.color.startsWith("#")||u.color.startsWith("rgb")))return"";const C=u.color||s.color;return T(C,"filled",{hover:!1,active:!1,focus:!1})},p=u=>{const C={width:`${u.percentage}%`};return typeof u.color=="string"&&(u.color.startsWith("#")||u.color.startsWith("rgb"))&&(C.backgroundColor=u.color),C},m=e.computed(()=>J(s.radius)),g=e.computed(()=>s.class||""),h=e.computed(()=>{switch(s.size){case"xs":return"cstu-w-1";case"sm":return"cstu-w-1";case"md":return"cstu-w-1.5";case"lg":return"cstu-w-1.5";case"xl":return"cstu-w-1.5";default:return"cstu-w-1.5"}}),b=e.computed(()=>{let u;switch(s.size){case"xs":u=4;break;case"sm":u=4;break;case"md":u=8;break;case"lg":u=8;break;case"xl":u=8;break;default:u=8}return`${u+4}px`});return(u,C)=>(e.openBlock(),e.createElementBlock("div",null,[u.label||u.$slots.label?(e.openBlock(),e.createElementBlock("div",gs,[u.label&&!u.$slots.label?(e.openBlock(),e.createElementBlock("span",hs,e.toDisplayString(u.label),1)):e.createCommentVNode("",!0),u.$slots.label?e.renderSlot(u.$slots,"label",{key:1}):e.createCommentVNode("",!0),u.showValue&&u.valuePosition==="top"&&!u.$slots.value?(e.openBlock(),e.createElementBlock("span",ys,e.toDisplayString(o.value)+"% ",1)):e.createCommentVNode("",!0),u.showValue&&u.valuePosition==="top"&&u.$slots.value?e.renderSlot(u.$slots,"value",{key:3}):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["cstu-relative",{"cstu-flex cstu-items-center cstu-gap-2":u.showValue&&u.valuePosition==="right"}])},[e.createElementVNode("div",{class:e.normalizeClass(["cstu-overflow-hidden",{"cstu-w-full":!(u.showValue&&u.valuePosition==="right"),"cstu-flex-1":u.showValue&&u.valuePosition==="right"}])},[e.createElementVNode("div",{class:e.normalizeClass(["cstu-relative cstu-overflow-hidden",m.value,"cstu-bg-gray-250",e.unref($e)(u.size,"progress"),g.value]),role:"progressbar","aria-valuenow":u.value,"aria-valuemin":"0","aria-valuemax":"100"},[!u.sections||u.sections.length===0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["cstu-h-full cstu-transition-all cstu-duration-300 cstu-ease-in-out",n.value,{"bg-striped":u.striped&&!u.animated,"bg-striped animate-progress":u.animated}]),style:e.normalizeStyle(a.value)},null,6)):(e.openBlock(),e.createElementBlock("div",xs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(x,B)=>(e.openBlock(),e.createElementBlock("div",{key:B,class:e.normalizeClass(["cstu-h-full cstu-transition-all cstu-duration-300 cstu-ease-in-out",d(x),{"bg-striped":x.striped&&!x.animated,"bg-striped animate-progress":x.animated}]),style:e.normalizeStyle(p(x))},null,6))),128))]))],10,bs)],2),u.showMinValue?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["cstu-absolute cstu-z-10",[h.value]]),style:e.normalizeStyle([f.value,{top:"50%",transform:"translateX(-50%) translateY(-50%)"}])},[e.renderSlot(u.$slots,"minValueMarker",{},()=>[e.createElementVNode("div",{class:e.normalizeClass(["cstu-h-full cstu-w-full cstu-rounded-sm border",i.value]),style:e.normalizeStyle([c.value?{backgroundColor:s.minValueColor}:{},{height:b.value}])},null,6)])],6)):e.createCommentVNode("",!0),u.showValue&&u.valuePosition==="right"&&!u.$slots.value?(e.openBlock(),e.createElementBlock("span",ws,e.toDisplayString(o.value)+"% ",1)):e.createCommentVNode("",!0),u.showValue&&u.valuePosition==="right"&&u.$slots.value?e.renderSlot(u.$slots,"value",{key:2}):e.createCommentVNode("",!0)],2)]))}}),hn="",ks={key:0,class:"flex-shrink-0"},Bs={key:0,class:"flex items-center justify-between"},zs={key:1,class:"flex-shrink-0 ml-3"},$s=["disabled"],Vs=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(t,{emit:s}){const o=t,l=s,n=e.computed(()=>T(o.color,o.variant,{hover:!1,active:!1,focus:!1,disabled:o.disabled})),c=e.computed(()=>Fe(o.variant)),i=e.computed(()=>St(o.color,o.variant)),a=e.computed(()=>Et(o.color,o.variant)),f=e.computed(()=>R(o.size,"alert")),r=e.computed(()=>Nt(o.size,"alert")),d=e.computed(()=>We(o.size)),p=e.computed(()=>He(o.size)),m=e.computed(()=>te({disabled:o.disabled,loading:o.loading})),g=e.computed(()=>Tt({valid:o.valid,invalid:o.invalid})),h=e.computed(()=>vt({hover:!0,focus:!0},o.color)),b=()=>{l("close")};return(u,C)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["relative rounded-md",c.value,n.value,f.value,m.value,g.value]),role:"alert"},[e.createElementVNode("div",{class:e.normalizeClass(["flex items-start",[p.value]])},[u.icon?(e.openBlock(),e.createElementBlock("div",ks,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.icon),{class:e.normalizeClass([r.value,i.value])},null,8,["class"]))])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["flex-grow",[u.icon&&"ml-3"]])},[u.title?(e.openBlock(),e.createElementBlock("div",Bs,[e.createElementVNode("h3",{class:e.normalizeClass(["font-medium",a.value])},e.toDisplayString(u.title),3)])):e.createCommentVNode("",!0),u.message?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["mt-1",u.variant==="filled"?"text-white/90":"text-gray-600",d.value])},e.toDisplayString(u.message),3)):e.createCommentVNode("",!0),e.renderSlot(u.$slots,"default")],2),u.closable?(e.openBlock(),e.createElementBlock("div",zs,[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["inline-flex rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2",[u.variant==="filled"?"text-white/80 hover:text-white focus:ring-white":"text-gray-400 hover:text-gray-500 focus:ring-blue-500",h.value]]),disabled:u.disabled,onClick:b},C[0]||(C[0]=[e.createElementVNode("span",{class:"sr-only"},"Close",-1),e.createElementVNode("svg",{class:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{d:"M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z"})],-1)]),10,$s)])):e.createCommentVNode("",!0)],2)],2))}}),Ss=e.defineComponent({__name:"Collapse",props:{open:{type:Boolean,default:!1},duration:{default:200},class:{},size:{default:"md"},disableTransition:{type:Boolean,default:!1}},setup(t){const s=t,o=e.ref(null),l=e.ref(null),n={xs:"p-1",sm:"p-2",md:"p-3",lg:"p-4",xl:"p-5"},c=e.computed(()=>He(s.size)),i=e.computed(()=>n[s.size]),a=e.computed(()=>s.disableTransition?"":`transition-[height] ease-in-out duration-${s.duration}`),f=e.computed(()=>({enter:s.duration,leave:s.duration})),r=b=>{b.style.height="0",b.style.overflow="hidden"},d=b=>{const u=b.scrollHeight;b.style.height="0",b.offsetHeight,b.style.height=`${u}px`},p=b=>{b.style.height="",b.style.overflow=""},m=b=>{b.style.height=`${b.scrollHeight}px`,b.style.overflow="hidden",b.offsetHeight},g=b=>{b.style.height="0"},h=b=>{b.style.height="",b.style.overflow=""};return(b,u)=>(e.openBlock(),e.createBlock(e.Transition,{duration:f.value,onBeforeEnter:r,onEnter:d,onAfterEnter:p,onBeforeLeave:m,onLeave:g,onAfterLeave:h},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(["overflow-hidden",c.value,a.value,s.class]),ref_key:"contentRef",ref:o},[e.createElementVNode("div",{ref_key:"innerRef",ref:l,class:e.normalizeClass(i.value)},[e.renderSlot(b.$slots,"default")],2)],2),[[e.vShow,b.open]])]),_:3},8,["duration"]))}}),Es={class:"cstu-inline-block"},Ns=e.defineComponent({__name:"OvalLoader",props:{size:{default:"md"},radius:{default:"100%"}},setup(t){const s={xs:"12px",sm:"16px",md:"24px",lg:"36px",xl:"48px"},o=t,l=e.computed(()=>{const n=parseInt(s[o.size]);return`${Math.max(2,n/12)}px`});return(n,c)=>(e.openBlock(),e.createElementBlock("span",Es,[e.createElementVNode("span",{class:"cstu-inline-block cstu-rounded-full cstu-border-solid cstu-border-r-transparent cstu-border-current cstu-animate-[oval-spin_1.2s_linear_infinite]",style:e.normalizeStyle({width:s[o.size],height:s[o.size],borderWidth:l.value,borderRadius:o.radius||"100%"})},null,4)]))}}),yn="",Ds=e.defineComponent({__name:"DotsLoader",props:{size:{default:"md"}},setup(t){const s={xs:"12px",sm:"16px",md:"24px",lg:"36px",xl:"48px"},o=t,l=e.computed(()=>`${parseInt(s[o.size])/3}px`),n=e.computed(()=>`${parseInt(s[o.size])/6}px`);return(c,i)=>(e.openBlock(),e.createElementBlock("span",{class:"cstu-inline-flex cstu-items-center",style:e.normalizeStyle({gap:n.value,height:s[o.size]})},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(3,a=>e.createElementVNode("span",{key:a,class:"cstu-inline-block cstu-rounded-full cstu-animate-[dots-pulse_0.8s_infinite_linear] cstu-bg-current",style:e.normalizeStyle({width:l.value,height:l.value,animationDelay:`${(a-1)*.16}s`,opacity:1})},null,4)),64))],4))}}),bn="",Ts=e.defineComponent({__name:"BarsLoader",props:{size:{default:"md"}},setup(t){const s={xs:"12px",sm:"16px",md:"24px",lg:"36px",xl:"48px"},o=t,l=e.computed(()=>`${parseInt(s[o.size])/6}px`);return(n,c)=>(e.openBlock(),e.createElementBlock("span",{class:"cstu-inline-flex",style:e.normalizeStyle({gap:l.value,width:s[o.size],height:`${parseInt(s[o.size])/2}px`})},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(3,i=>e.createElementVNode("span",{key:i,class:"cstu-flex-1 cstu-rounded-[2px] cstu-animate-[bars-scale_1.2s_cubic-bezier(0,0.5,0.5,1)_infinite] cstu-bg-current",style:e.normalizeStyle({animationDelay:`${(i-1)*-.12}s`,opacity:1})},null,4)),64))],4))}}),xn="",vs=e.defineComponent({__name:"Loader",props:{variant:{default:"oval"},color:{default:"primary"},size:{default:"md"},class:{},loading:{type:Boolean,default:!0},radius:{default:void 0}},setup(t){const s=t,o=i=>i?Object.keys(P).includes(i):!0,l=e.computed(()=>{if(!s.color||!o(s.color))return"";const i=s.color,a=P[i];return`cstu-text-${a.base}-${a.main}`}),n=e.computed(()=>!s.color||o(s.color)?{}:{color:s.color}),c=e.computed(()=>{switch(s.variant){case"dots":return Ds;case"bars":return Ts;default:return Ns}});return(i,a)=>e.withDirectives((e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.value),{class:e.normalizeClass(["cstu-inline-block",l.value,s.class]),style:e.normalizeStyle(n.value),size:s.size,radius:s.radius},null,8,["class","style","size","radius"])),[[e.vShow,s.loading]])}}),Os={class:"p-4"},Ms={key:0,class:"absolute top-2 right-2"},Ls={key:1,class:"text-lg font-medium mb-2"},Ps={key:2},As=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(t){const s=t,o=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",[o.value]])},[e.createElementVNode("div",Os,[l.withCloseButton?(e.openBlock(),e.createElementBlock("div",Ms,[e.createElementVNode("button",{onClick:n[0]||(n[0]=(...c)=>l.onClose&&l.onClose(...c)),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",Ls,e.toDisplayString(l.title),1)):e.createCommentVNode("",!0),l.content?(e.openBlock(),e.createElementBlock("div",Ps,e.toDisplayString(l.content),1)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"default")])],2)],4)):e.createCommentVNode("",!0)]),_:3})]))}}),Is=["top","right","bottom","left"],Ke=["start","end"],Ue=Is.reduce((t,s)=>t.concat(s,s+"-"+Ke[0],s+"-"+Ke[1]),[]),se=Math.min,Q=Math.max,fe=Math.round,pe=Math.floor,j=t=>({x:t,y:t}),Rs={left:"right",right:"left",bottom:"top",top:"bottom"},js={start:"end",end:"start"};function Se(t,s,o){return Q(t,se(s,o))}function oe(t,s){return typeof t=="function"?t(s):t}function G(t){return t.split("-")[0]}function F(t){return t.split("-")[1]}function Ye(t){return t==="x"?"y":"x"}function Ee(t){return t==="y"?"height":"width"}function ne(t){return["top","bottom"].includes(G(t))?"y":"x"}function Ne(t){return Ye(ne(t))}function Xe(t,s,o){o===void 0&&(o=!1);const l=F(t),n=Ne(t),c=Ee(n);let i=n==="x"?l===(o?"end":"start")?"right":"left":l==="start"?"bottom":"top";return s.reference[c]>s.floating[c]&&(i=ge(i)),[i,ge(i)]}function Fs(t){const s=ge(t);return[me(t),s,me(s)]}function me(t){return t.replace(/start|end/g,s=>js[s])}function Ws(t,s,o){const l=["left","right"],n=["right","left"],c=["top","bottom"],i=["bottom","top"];switch(t){case"top":case"bottom":return o?s?n:l:s?l:n;case"left":case"right":return s?c:i;default:return[]}}function Hs(t,s,o,l){const n=F(t);let c=Ws(G(t),o==="start",l);return n&&(c=c.map(i=>i+"-"+n),s&&(c=c.concat(c.map(me)))),c}function ge(t){return t.replace(/left|right|bottom|top/g,s=>Rs[s])}function qs(t){return{top:0,right:0,bottom:0,left:0,...t}}function Je(t){return typeof t!="number"?qs(t):{top:t,right:t,bottom:t,left:t}}function he(t){const{x:s,y:o,width:l,height:n}=t;return{width:l,height:n,top:o,left:s,right:s+l,bottom:o+n,x:s,y:o}}function Qe(t,s,o){let{reference:l,floating:n}=t;const c=ne(s),i=Ne(s),a=Ee(i),f=G(s),r=c==="y",d=l.x+l.width/2-n.width/2,p=l.y+l.height/2-n.height/2,m=l[a]/2-n[a]/2;let g;switch(f){case"top":g={x:d,y:l.y-n.height};break;case"bottom":g={x:d,y:l.y+l.height};break;case"right":g={x:l.x+l.width,y:p};break;case"left":g={x:l.x-n.width,y:p};break;default:g={x:l.x,y:l.y}}switch(F(s)){case"start":g[i]-=m*(o&&r?-1:1);break;case"end":g[i]+=m*(o&&r?-1:1);break}return g}const Gs=async(t,s,o)=>{const{placement:l="bottom",strategy:n="absolute",middleware:c=[],platform:i}=o,a=c.filter(Boolean),f=await(i.isRTL==null?void 0:i.isRTL(s));let r=await i.getElementRects({reference:t,floating:s,strategy:n}),{x:d,y:p}=Qe(r,l,f),m=l,g={},h=0;for(let b=0;b<a.length;b++){const{name:u,fn:C}=a[b],{x,y:B,data:y,reset:w}=await C({x:d,y:p,initialPlacement:l,placement:m,strategy:n,middlewareData:g,rects:r,platform:i,elements:{reference:t,floating:s}});d=x??d,p=B??p,g={...g,[u]:{...g[u],...y}},w&&h<=50&&(h++,typeof w=="object"&&(w.placement&&(m=w.placement),w.rects&&(r=w.rects===!0?await i.getElementRects({reference:t,floating:s,strategy:n}):w.rects),{x:d,y:p}=Qe(r,m,f)),b=-1)}return{x:d,y:p,placement:m,strategy:n,middlewareData:g}};async function De(t,s){var o;s===void 0&&(s={});const{x:l,y:n,platform:c,rects:i,elements:a,strategy:f}=t,{boundary:r="clippingAncestors",rootBoundary:d="viewport",elementContext:p="floating",altBoundary:m=!1,padding:g=0}=oe(s,t),h=Je(g),u=a[m?p==="floating"?"reference":"floating":p],C=he(await c.getClippingRect({element:(o=await(c.isElement==null?void 0:c.isElement(u)))==null||o?u:u.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(a.floating)),boundary:r,rootBoundary:d,strategy:f})),x=p==="floating"?{x:l,y:n,width:i.floating.width,height:i.floating.height}:i.reference,B=await(c.getOffsetParent==null?void 0:c.getOffsetParent(a.floating)),y=await(c.isElement==null?void 0:c.isElement(B))?await(c.getScale==null?void 0:c.getScale(B))||{x:1,y:1}:{x:1,y:1},w=he(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:x,offsetParent:B,strategy:f}):x);return{top:(C.top-w.top+h.top)/y.y,bottom:(w.bottom-C.bottom+h.bottom)/y.y,left:(C.left-w.left+h.left)/y.x,right:(w.right-C.right+h.right)/y.x}}const Zs=t=>({name:"arrow",options:t,async fn(s){const{x:o,y:l,placement:n,rects:c,platform:i,elements:a,middlewareData:f}=s,{element:r,padding:d=0}=oe(t,s)||{};if(r==null)return{};const p=Je(d),m={x:o,y:l},g=Ne(n),h=Ee(g),b=await i.getDimensions(r),u=g==="y",C=u?"top":"left",x=u?"bottom":"right",B=u?"clientHeight":"clientWidth",y=c.reference[h]+c.reference[g]-m[g]-c.floating[h],w=m[g]-c.reference[g],S=await(i.getOffsetParent==null?void 0:i.getOffsetParent(r));let V=S?S[B]:0;(!V||!await(i.isElement==null?void 0:i.isElement(S)))&&(V=a.floating[B]||c.floating[h]);const N=y/2-w/2,v=V/2-b[h]/2-1,k=se(p[C],v),z=se(p[x],v),E=k,O=V-b[h]-z,D=V/2-b[h]/2+N,ie=Se(E,D,O),Z=!f.arrow&&F(n)!=null&&D!==ie&&c.reference[h]/2-(D<E?k:z)-b[h]/2<0,q=Z?D<E?D-E:D-O:0;return{[g]:m[g]+q,data:{[g]:ie,centerOffset:D-ie-q,...Z&&{alignmentOffset:q}},reset:Z}}});function Ks(t,s,o){return(t?[...o.filter(n=>F(n)===t),...o.filter(n=>F(n)!==t)]:o.filter(n=>G(n)===n)).filter(n=>t?F(n)===t||(s?me(n)!==n:!1):!0)}const Us=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(s){var o,l,n;const{rects:c,middlewareData:i,placement:a,platform:f,elements:r}=s,{crossAxis:d=!1,alignment:p,allowedPlacements:m=Ue,autoAlignment:g=!0,...h}=oe(t,s),b=p!==void 0||m===Ue?Ks(p||null,g,m):m,u=await De(s,h),C=((o=i.autoPlacement)==null?void 0:o.index)||0,x=b[C];if(x==null)return{};const B=Xe(x,c,await(f.isRTL==null?void 0:f.isRTL(r.floating)));if(a!==x)return{reset:{placement:b[0]}};const y=[u[G(x)],u[B[0]],u[B[1]]],w=[...((l=i.autoPlacement)==null?void 0:l.overflows)||[],{placement:x,overflows:y}],S=b[C+1];if(S)return{data:{index:C+1,overflows:w},reset:{placement:S}};const V=w.map(k=>{const z=F(k.placement);return[k.placement,z&&d?k.overflows.slice(0,2).reduce((E,O)=>E+O,0):k.overflows[0],k.overflows]}).sort((k,z)=>k[1]-z[1]),v=((n=V.filter(k=>k[2].slice(0,F(k[0])?2:3).every(z=>z<=0))[0])==null?void 0:n[0])||V[0][0];return v!==a?{data:{index:C+1,overflows:w},reset:{placement:v}}:{}}}},Ys=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(s){var o,l;const{placement:n,middlewareData:c,rects:i,initialPlacement:a,platform:f,elements:r}=s,{mainAxis:d=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:b=!0,...u}=oe(t,s);if((o=c.arrow)!=null&&o.alignmentOffset)return{};const C=G(n),x=ne(a),B=G(a)===a,y=await(f.isRTL==null?void 0:f.isRTL(r.floating)),w=m||(B||!b?[ge(a)]:Fs(a)),S=h!=="none";!m&&S&&w.push(...Hs(a,b,h,y));const V=[a,...w],N=await De(s,u),v=[];let k=((l=c.flip)==null?void 0:l.overflows)||[];if(d&&v.push(N[C]),p){const D=Xe(n,i,y);v.push(N[D[0]],N[D[1]])}if(k=[...k,{placement:n,overflows:v}],!v.every(D=>D<=0)){var z,E;const D=(((z=c.flip)==null?void 0:z.index)||0)+1,ie=V[D];if(ie)return{data:{index:D,overflows:k},reset:{placement:ie}};let Z=(E=k.filter(q=>q.overflows[0]<=0).sort((q,U)=>q.overflows[1]-U.overflows[1])[0])==null?void 0:E.placement;if(!Z)switch(g){case"bestFit":{var O;const q=(O=k.filter(U=>{if(S){const Y=ne(U.placement);return Y===x||Y==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(Y=>Y>0).reduce((Y,fn)=>Y+fn,0)]).sort((U,Y)=>U[1]-Y[1])[0])==null?void 0:O[0];q&&(Z=q);break}case"initialPlacement":Z=a;break}if(n!==Z)return{reset:{placement:Z}}}return{}}}};async function Xs(t,s){const{placement:o,platform:l,elements:n}=t,c=await(l.isRTL==null?void 0:l.isRTL(n.floating)),i=G(o),a=F(o),f=ne(o)==="y",r=["left","top"].includes(i)?-1:1,d=c&&f?-1:1,p=oe(s,t);let{mainAxis:m,crossAxis:g,alignmentAxis:h}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return a&&typeof h=="number"&&(g=a==="end"?h*-1:h),f?{x:g*d,y:m*r}:{x:m*r,y:g*d}}const Js=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(s){var o,l;const{x:n,y:c,placement:i,middlewareData:a}=s,f=await Xs(s,t);return i===((o=a.offset)==null?void 0:o.placement)&&(l=a.arrow)!=null&&l.alignmentOffset?{}:{x:n+f.x,y:c+f.y,data:{...f,placement:i}}}}},Qs=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(s){const{x:o,y:l,placement:n}=s,{mainAxis:c=!0,crossAxis:i=!1,limiter:a={fn:u=>{let{x:C,y:x}=u;return{x:C,y:x}}},...f}=oe(t,s),r={x:o,y:l},d=await De(s,f),p=ne(G(n)),m=Ye(p);let g=r[m],h=r[p];if(c){const u=m==="y"?"top":"left",C=m==="y"?"bottom":"right",x=g+d[u],B=g-d[C];g=Se(x,g,B)}if(i){const u=p==="y"?"top":"left",C=p==="y"?"bottom":"right",x=h+d[u],B=h-d[C];h=Se(x,h,B)}const b=a.fn({...s,[m]:g,[p]:h});return{...b,data:{x:b.x-o,y:b.y-l,enabled:{[m]:c,[p]:i}}}}}};function ye(){return typeof window<"u"}function _(t){return Te(t)?(t.nodeName||"").toLowerCase():"#document"}function M(t){var s;return(t==null||(s=t.ownerDocument)==null?void 0:s.defaultView)||window}function W(t){var s;return(s=(Te(t)?t.ownerDocument:t.document)||window.document)==null?void 0:s.documentElement}function Te(t){return ye()?t instanceof Node||t instanceof M(t).Node:!1}function A(t){return ye()?t instanceof Element||t instanceof M(t).Element:!1}function H(t){return ye()?t instanceof HTMLElement||t instanceof M(t).HTMLElement:!1}function _e(t){return!ye()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof M(t).ShadowRoot}function ce(t){const{overflow:s,overflowX:o,overflowY:l,display:n}=I(t);return/auto|scroll|overlay|hidden|clip/.test(s+l+o)&&!["inline","contents"].includes(n)}function _s(t){return["table","td","th"].includes(_(t))}function be(t){return[":popover-open",":modal"].some(s=>{try{return t.matches(s)}catch{return!1}})}function ve(t){const s=Oe(),o=A(t)?I(t):t;return o.transform!=="none"||o.perspective!=="none"||(o.containerType?o.containerType!=="normal":!1)||!s&&(o.backdropFilter?o.backdropFilter!=="none":!1)||!s&&(o.filter?o.filter!=="none":!1)||["transform","perspective","filter"].some(l=>(o.willChange||"").includes(l))||["paint","layout","strict","content"].some(l=>(o.contain||"").includes(l))}function eo(t){let s=K(t);for(;H(s)&&!le(s);){if(ve(s))return s;if(be(s))return null;s=K(s)}return null}function Oe(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function le(t){return["html","body","#document"].includes(_(t))}function I(t){return M(t).getComputedStyle(t)}function xe(t){return A(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function K(t){if(_(t)==="html")return t;const s=t.assignedSlot||t.parentNode||_e(t)&&t.host||W(t);return _e(s)?s.host:s}function et(t){const s=K(t);return le(s)?t.ownerDocument?t.ownerDocument.body:t.body:H(s)&&ce(s)?s:et(s)}function de(t,s,o){var l;s===void 0&&(s=[]),o===void 0&&(o=!0);const n=et(t),c=n===((l=t.ownerDocument)==null?void 0:l.body),i=M(n);if(c){const a=Me(i);return s.concat(i,i.visualViewport||[],ce(n)?n:[],a&&o?de(a):[])}return s.concat(n,de(n,[],o))}function Me(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function tt(t){const s=I(t);let o=parseFloat(s.width)||0,l=parseFloat(s.height)||0;const n=H(t),c=n?t.offsetWidth:o,i=n?t.offsetHeight:l,a=fe(o)!==c||fe(l)!==i;return a&&(o=c,l=i),{width:o,height:l,$:a}}function Le(t){return A(t)?t:t.contextElement}function ae(t){const s=Le(t);if(!H(s))return j(1);const o=s.getBoundingClientRect(),{width:l,height:n,$:c}=tt(s);let i=(c?fe(o.width):o.width)/l,a=(c?fe(o.height):o.height)/n;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const to=j(0);function st(t){const s=M(t);return!Oe()||!s.visualViewport?to:{x:s.visualViewport.offsetLeft,y:s.visualViewport.offsetTop}}function so(t,s,o){return s===void 0&&(s=!1),!o||s&&o!==M(t)?!1:s}function ee(t,s,o,l){s===void 0&&(s=!1),o===void 0&&(o=!1);const n=t.getBoundingClientRect(),c=Le(t);let i=j(1);s&&(l?A(l)&&(i=ae(l)):i=ae(t));const a=so(c,o,l)?st(c):j(0);let f=(n.left+a.x)/i.x,r=(n.top+a.y)/i.y,d=n.width/i.x,p=n.height/i.y;if(c){const m=M(c),g=l&&A(l)?M(l):l;let h=m,b=Me(h);for(;b&&l&&g!==h;){const u=ae(b),C=b.getBoundingClientRect(),x=I(b),B=C.left+(b.clientLeft+parseFloat(x.paddingLeft))*u.x,y=C.top+(b.clientTop+parseFloat(x.paddingTop))*u.y;f*=u.x,r*=u.y,d*=u.x,p*=u.y,f+=B,r+=y,h=M(b),b=Me(h)}}return he({width:d,height:p,x:f,y:r})}function Pe(t,s){const o=xe(t).scrollLeft;return s?s.left+o:ee(W(t)).left+o}function ot(t,s,o){o===void 0&&(o=!1);const l=t.getBoundingClientRect(),n=l.left+s.scrollLeft-(o?0:Pe(t,l)),c=l.top+s.scrollTop;return{x:n,y:c}}function oo(t){let{elements:s,rect:o,offsetParent:l,strategy:n}=t;const c=n==="fixed",i=W(l),a=s?be(s.floating):!1;if(l===i||a&&c)return o;let f={scrollLeft:0,scrollTop:0},r=j(1);const d=j(0),p=H(l);if((p||!p&&!c)&&((_(l)!=="body"||ce(i))&&(f=xe(l)),H(l))){const g=ee(l);r=ae(l),d.x=g.x+l.clientLeft,d.y=g.y+l.clientTop}const m=i&&!p&&!c?ot(i,f,!0):j(0);return{width:o.width*r.x,height:o.height*r.y,x:o.x*r.x-f.scrollLeft*r.x+d.x+m.x,y:o.y*r.y-f.scrollTop*r.y+d.y+m.y}}function no(t){return Array.from(t.getClientRects())}function lo(t){const s=W(t),o=xe(t),l=t.ownerDocument.body,n=Q(s.scrollWidth,s.clientWidth,l.scrollWidth,l.clientWidth),c=Q(s.scrollHeight,s.clientHeight,l.scrollHeight,l.clientHeight);let i=-o.scrollLeft+Pe(t);const a=-o.scrollTop;return I(l).direction==="rtl"&&(i+=Q(s.clientWidth,l.clientWidth)-n),{width:n,height:c,x:i,y:a}}function ao(t,s){const o=M(t),l=W(t),n=o.visualViewport;let c=l.clientWidth,i=l.clientHeight,a=0,f=0;if(n){c=n.width,i=n.height;const r=Oe();(!r||r&&s==="fixed")&&(a=n.offsetLeft,f=n.offsetTop)}return{width:c,height:i,x:a,y:f}}function ro(t,s){const o=ee(t,!0,s==="fixed"),l=o.top+t.clientTop,n=o.left+t.clientLeft,c=H(t)?ae(t):j(1),i=t.clientWidth*c.x,a=t.clientHeight*c.y,f=n*c.x,r=l*c.y;return{width:i,height:a,x:f,y:r}}function nt(t,s,o){let l;if(s==="viewport")l=ao(t,o);else if(s==="document")l=lo(W(t));else if(A(s))l=ro(s,o);else{const n=st(t);l={x:s.x-n.x,y:s.y-n.y,width:s.width,height:s.height}}return he(l)}function lt(t,s){const o=K(t);return o===s||!A(o)||le(o)?!1:I(o).position==="fixed"||lt(o,s)}function io(t,s){const o=s.get(t);if(o)return o;let l=de(t,[],!1).filter(a=>A(a)&&_(a)!=="body"),n=null;const c=I(t).position==="fixed";let i=c?K(t):t;for(;A(i)&&!le(i);){const a=I(i),f=ve(i);!f&&a.position==="fixed"&&(n=null),(c?!f&&!n:!f&&a.position==="static"&&!!n&&["absolute","fixed"].includes(n.position)||ce(i)&&!f&<(t,i))?l=l.filter(d=>d!==i):n=a,i=K(i)}return s.set(t,l),l}function co(t){let{element:s,boundary:o,rootBoundary:l,strategy:n}=t;const i=[...o==="clippingAncestors"?be(s)?[]:io(s,this._c):[].concat(o),l],a=i[0],f=i.reduce((r,d)=>{const p=nt(s,d,n);return r.top=Q(p.top,r.top),r.right=se(p.right,r.right),r.bottom=se(p.bottom,r.bottom),r.left=Q(p.left,r.left),r},nt(s,a,n));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function uo(t){const{width:s,height:o}=tt(t);return{width:s,height:o}}function fo(t,s,o){const l=H(s),n=W(s),c=o==="fixed",i=ee(t,!0,c,s);let a={scrollLeft:0,scrollTop:0};const f=j(0);if(l||!l&&!c)if((_(s)!=="body"||ce(n))&&(a=xe(s)),l){const m=ee(s,!0,c,s);f.x=m.x+s.clientLeft,f.y=m.y+s.clientTop}else n&&(f.x=Pe(n));const r=n&&!l&&!c?ot(n,a):j(0),d=i.left+a.scrollLeft-f.x-r.x,p=i.top+a.scrollTop-f.y-r.y;return{x:d,y:p,width:i.width,height:i.height}}function Ae(t){return I(t).position==="static"}function at(t,s){if(!H(t)||I(t).position==="fixed")return null;if(s)return s(t);let o=t.offsetParent;return W(t)===o&&(o=o.ownerDocument.body),o}function rt(t,s){const o=M(t);if(be(t))return o;if(!H(t)){let n=K(t);for(;n&&!le(n);){if(A(n)&&!Ae(n))return n;n=K(n)}return o}let l=at(t,s);for(;l&&_s(l)&&Ae(l);)l=at(l,s);return l&&le(l)&&Ae(l)&&!ve(l)?o:l||eo(t)||o}const po=async function(t){const s=this.getOffsetParent||rt,o=this.getDimensions,l=await o(t.floating);return{reference:fo(t.reference,await s(t.floating),t.strategy),floating:{x:0,y:0,width:l.width,height:l.height}}};function mo(t){return I(t).direction==="rtl"}const go={convertOffsetParentRelativeRectToViewportRelativeRect:oo,getDocumentElement:W,getClippingRect:co,getOffsetParent:rt,getElementRects:po,getClientRects:no,getDimensions:uo,getScale:ae,isElement:A,isRTL:mo};function ho(t,s){let o=null,l;const n=W(t);function c(){var a;clearTimeout(l),(a=o)==null||a.disconnect(),o=null}function i(a,f){a===void 0&&(a=!1),f===void 0&&(f=1),c();const{left:r,top:d,width:p,height:m}=t.getBoundingClientRect();if(a||s(),!p||!m)return;const g=pe(d),h=pe(n.clientWidth-(r+p)),b=pe(n.clientHeight-(d+m)),u=pe(r),x={rootMargin:-g+"px "+-h+"px "+-b+"px "+-u+"px",threshold:Q(0,se(1,f))||1};let B=!0;function y(w){const S=w[0].intersectionRatio;if(S!==f){if(!B)return i();S?i(!1,S):l=setTimeout(()=>{i(!1,1e-7)},1e3)}B=!1}try{o=new IntersectionObserver(y,{...x,root:n.ownerDocument})}catch{o=new IntersectionObserver(y,x)}o.observe(t)}return i(!0),c}function yo(t,s,o,l){l===void 0&&(l={});const{ancestorScroll:n=!0,ancestorResize:c=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:f=!1}=l,r=Le(t),d=n||c?[...r?de(r):[],...de(s)]:[];d.forEach(C=>{n&&C.addEventListener("scroll",o,{passive:!0}),c&&C.addEventListener("resize",o)});const p=r&&a?ho(r,o):null;let m=-1,g=null;i&&(g=new ResizeObserver(C=>{let[x]=C;x&&x.target===r&&g&&(g.unobserve(s),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var B;(B=g)==null||B.observe(s)})),o()}),r&&!f&&g.observe(r),g.observe(s));let h,b=f?ee(t):null;f&&u();function u(){const C=ee(t);b&&(C.x!==b.x||C.y!==b.y||C.width!==b.width||C.height!==b.height)&&o(),b=C,h=requestAnimationFrame(u)}return o(),()=>{var C;d.forEach(x=>{n&&x.removeEventListener("scroll",o),c&&x.removeEventListener("resize",o)}),p==null||p(),(C=g)==null||C.disconnect(),g=null,f&&cancelAnimationFrame(h)}}const it=Js,bo=Us,ct=Qs,dt=Ys,xo=Zs,wo=(t,s,o)=>{const l=new Map,n={platform:go,...o},c={...n.platform,_c:l};return Gs(t,s,{...n,platform:c})};function Co(t){return t!=null&&typeof t=="object"&&"$el"in t}function Ie(t){if(Co(t)){const s=t.$el;return Te(s)&&_(s)==="#comment"?null:s}return t}function re(t){return typeof t=="function"?t():e.unref(t)}function ko(t){return{name:"arrow",options:t,fn(s){const o=Ie(re(t.element));return o==null?{}:xo({element:o,padding:t.padding}).fn(s)}}}function ut(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function ft(t,s){const o=ut(t);return Math.round(s*o)/o}function pt(t,s,o){o===void 0&&(o={});const l=o.whileElementsMounted,n=e.computed(()=>{var V;return(V=re(o.open))!=null?V:!0}),c=e.computed(()=>re(o.middleware)),i=e.computed(()=>{var V;return(V=re(o.placement))!=null?V:"bottom"}),a=e.computed(()=>{var V;return(V=re(o.strategy))!=null?V:"absolute"}),f=e.computed(()=>{var V;return(V=re(o.transform))!=null?V:!0}),r=e.computed(()=>Ie(t.value)),d=e.computed(()=>Ie(s.value)),p=e.ref(0),m=e.ref(0),g=e.ref(a.value),h=e.ref(i.value),b=e.shallowRef({}),u=e.ref(!1),C=e.computed(()=>{const V={position:g.value,left:"0",top:"0"};if(!d.value)return V;const N=ft(d.value,p.value),v=ft(d.value,m.value);return f.value?{...V,transform:"translate("+N+"px, "+v+"px)",...ut(d.value)>=1.5&&{willChange:"transform"}}:{position:g.value,left:N+"px",top:v+"px"}});let x;function B(){if(r.value==null||d.value==null)return;const V=n.value;wo(r.value,d.value,{middleware:c.value,placement:i.value,strategy:a.value}).then(N=>{p.value=N.x,m.value=N.y,g.value=N.strategy,h.value=N.placement,b.value=N.middlewareData,u.value=V!==!1})}function y(){typeof x=="function"&&(x(),x=void 0)}function w(){if(y(),l===void 0){B();return}if(r.value!=null&&d.value!=null){x=l(r.value,d.value,B);return}}function S(){n.value||(u.value=!1)}return e.watch([c,i,a,n],B,{flush:"sync"}),e.watch([r,d],w,{flush:"sync"}),e.watch(n,S,{flush:"sync"}),e.getCurrentScope()&&e.onScopeDispose(y),{x:e.shallowReadonly(p),y:e.shallowReadonly(m),strategy:e.shallowReadonly(g),placement:e.shallowReadonly(h),middlewareData:e.shallowReadonly(b),isPositioned:e.shallowReadonly(u),floatingStyles:C,update:B}}function Bo(t){return e.getCurrentScope()?(e.onScopeDispose(t),!0):!1}const zo=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;function mt(t,s,o={}){const{immediate:l=!0}=o,n=e.ref(!1);let c=null;function i(){c&&(clearTimeout(c),c=null)}function a(){n.value=!1,i()}function f(...r){i(),n.value=!0,c=setTimeout(()=>{n.value=!1,c=null,t(...r)},e.toValue(s))}return l&&(n.value=!0,zo&&f()),Bo(a),{isPending:e.readonly(n),start:f,stop:a}}function gt(t={}){const{openDelay:s=0,closeDelay:o=150,onOpen:l,onClose:n,initiallyOpened:c=!1}=t,i=e.ref(!1),{start:a,stop:f}=mt(()=>{i.value=!0,l==null||l()},s),{start:r,stop:d}=mt(()=>{i.value=!1,n==null||n()},o),p=()=>{d(),s===0?(i.value=!0,l==null||l()):a()},m=()=>{f(),o===0?(i.value=!1,n==null||n()):r()};return c&&p(),{isOpen:i,open:p,close:m}}const Re=Symbol("hover-card"),je=e.defineComponent({__name:"HoverCardTarget",props:{withWrapper:{type:Boolean,default:!1},wrapperClass:{default:""}},setup(t){return e.inject(Re,null),(s,o)=>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})}}),$o={class:"rounded-lg bg-white dark:bg-gray-800 shadow-lg border border-gray-200 dark:border-gray-700 px-3 py-2"},ht=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(t){const s=t,o=e.ref(!1);e.onMounted(()=>{o.value=!0});const l=e.ref(null),n=e.ref(null),c=e.ref(null),{isOpen:i,open:a,close:f}=gt({openDelay:s.openDelay,closeDelay:s.closeDelay,initiallyOpened:s.initiallyOpened});e.provide(Re,{isOpen:i,open:a,close:f});const{x:r,y:d,strategy:p,middlewareData:m,placement:g,update:h}=pt(n,c,{placement:s.placement,middleware:[it(s.offset),dt({fallbackPlacements:["top","bottom","right","left"].filter(y=>y!==s.placement)}),ct({padding:8}),ko({element:l})]});e.watch(i,async y=>{y&&await h()});const b=e.computed(()=>{var y,w;return(w=(y=m.value)==null?void 0:y.arrow)==null?void 0:w.x}),u=e.computed(()=>{var y,w;return(w=(y=m.value)==null?void 0:y.arrow)==null?void 0:w.y}),C=e.computed(()=>{switch(g.value){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left";default:return"bottom"}}),x=e.computed(()=>{switch(g.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%)"}}),B=e.computed(()=>({xs:"w-[200px]",sm:"w-[240px]",md:"w-[320px]",lg:"w-[400px]",xl:"w-[480px]"})[s.size]);return(y,w)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"reference",ref:n,class:"relative inline-block",onMouseenter:w[2]||(w[2]=S=>!y.disabled&&e.unref(a)()),onMouseleave:w[3]||(w[3]=S=>!y.disabled&&e.unref(f)())},[e.createVNode(je,null,{default:e.withCtx(()=>[e.renderSlot(y.$slots,"target")]),_:3}),o.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:c,style:e.normalizeStyle({position:e.unref(p),top:`${e.unref(d)??0}px`,left:`${e.unref(r)??0}px`,zIndex:y.zIndex||1e3}),class:e.normalizeClass(["min-w-[200px]",[B.value]]),onMouseenter:w[0]||(w[0]=S=>!y.disabled&&e.unref(a)()),onMouseleave:w[1]||(w[1]=S=>!y.disabled&&e.unref(f)())},[e.createElementVNode("div",$o,[e.renderSlot(y.$slots,"dropdown")]),y.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:`${b.value??0}px`,top:`${u.value??0}px`,[C.value]:"-1px","z-index":-1,"transform-origin":"center",transform:`rotate(45deg) ${x.value}`})},null,4)):e.createCommentVNode("",!0)],38)):e.createCommentVNode("",!0)]),_:3})])):e.createCommentVNode("",!0)],544))}});Object.assign(ht,{Target:je});const Vo={class:"cstu-modal-title"},So=["innerHTML"],Eo=e.defineComponent({__name:"MessageBoxOk",props:{message:{type:[String,Object],default:""},title:{type:String,default:"Message"},okTitle:{type:String,default:"OK"},okVariant:{type:String,default:"filled"},okColor:{type:String,default:"primary"},okDisabled:{type:Boolean,default:!1},centered:{type:Boolean,default:!0},scrollable:{type:Boolean,default:!1},fullscreen:{type:Boolean,default:!1},size:{type:String,default:"md"},headerClass:{type:String,default:""},bodyClass:{type:String,default:""},footerClass:{type:String,default:""},contentClass:{type:String,default:""},dialogClass:{type:String,default:""},modalClass:{type:String,default:""},showHeaderDivider:{type:Boolean,default:!1},showFooterDivider:{type:Boolean,default:!1},showDividers:{type:Boolean,default:!1},radius:{type:String,default:""},busy:{type:Boolean,default:!1},zIndex:{type:Number,default:1050}},emits:["close"],setup(t,{emit:s}){const o=t,l=s,n=e.ref(!1),c=e.computed(()=>o.radius?{[`cstu-radius-${o.radius}`]:!0}:{});function i(){a(!1)}function a(f){n.value=!1,setTimeout(()=>{document.body.classList.remove("cstu-modal-open"),l("close",f)},300)}return e.onMounted(()=>{document.body.classList.add("cstu-modal-open"),e.nextTick(()=>{n.value=!0})}),e.onBeforeUnmount(()=>{n.value=!1,document.body.classList.remove("cstu-modal-open")}),(f,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[n.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"cstu-modal-backdrop",style:e.normalizeStyle({zIndex:t.zIndex-10})},null,4)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"cstu-modal"},{default:e.withCtx(()=>[n.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["cstu-modal modal",{"cstu-modal-static":!0,"cstu-modal-scrollable":t.scrollable},t.modalClass]),style:e.normalizeStyle({display:n.value?"block":"none",zIndex:t.zIndex}),tabindex:"-1",role:"dialog","aria-modal":"true",onClick:i},[e.createElementVNode("div",{class:e.normalizeClass(["cstu-modal-dialog",t.dialogClass,{"cstu-modal-fullscreen":t.fullscreen,"cstu-modal-dialog-centered":t.centered&&!t.fullscreen,"cstu-modal-dialog-scrollable":t.scrollable,[`cstu-modal-${t.size}`]:t.size&&!t.fullscreen}]),onClick:r[2]||(r[2]=e.withModifiers(()=>{},["stop"]))},[r[4]||(r[4]=e.createElementVNode("span",{tabindex:"0"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["cstu-modal-content",t.contentClass,{"cstu-modal-content-fullscreen":t.fullscreen},c.value]),tabindex:"-1"},[e.createElementVNode("header",{class:e.normalizeClass(["cstu-modal-header",t.headerClass,{"show-divider":t.showHeaderDivider||t.showDividers}])},[e.createElementVNode("h5",Vo,e.toDisplayString(t.title||"Message"),1),e.createElementVNode("button",{type:"button",class:"cstu-close","aria-label":"Close",onClick:r[0]||(r[0]=d=>a(!1))},r[3]||(r[3]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"cstu-size-6"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"})],-1)]))],2),e.createElementVNode("div",{class:e.normalizeClass(["cstu-modal-body",t.bodyClass])},[typeof t.message=="string"?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:t.message},null,8,So)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.message),{key:1}))],2),e.createElementVNode("footer",{class:e.normalizeClass(["cstu-modal-footer",t.footerClass,{"show-divider":t.showFooterDivider||t.showDividers}])},[e.createVNode(L,{variant:t.okVariant,color:t.okColor,disabled:t.okDisabled||t.busy,loading:t.busy,size:"sm",onClick:r[1]||(r[1]=d=>a(!0))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.okTitle),1)]),_:1},8,["variant","color","disabled","loading"])],2)],2),r[5]||(r[5]=e.createElementVNode("span",{tabindex:"0"},null,-1))],2)],6)):e.createCommentVNode("",!0)]),_:1})],64))}}),No={class:"cstu-modal-title"},Do=["innerHTML"],To=e.defineComponent({__name:"MessageBoxConfirm",props:{message:{type:[String,Object],default:""},title:{type:String,default:"Confirm"},okTitle:{type:String,default:"OK"},okVariant:{type:String,default:"filled"},okColor:{type:String,default:"primary"},okDisabled:{type:Boolean,default:!1},cancelTitle:{type:String,default:"Cancel"},cancelVariant:{type:String,default:"outline"},cancelColor:{type:String,default:"secondary"},cancelDisabled:{type:Boolean,default:!1},centered:{type:Boolean,default:!0},scrollable:{type:Boolean,default:!1},fullscreen:{type:Boolean,default:!1},size:{type:String,default:"md"},headerClass:{type:String,default:""},bodyClass:{type:String,default:""},footerClass:{type:String,default:""},contentClass:{type:String,default:""},dialogClass:{type:String,default:""},modalClass:{type:String,default:""},showHeaderDivider:{type:Boolean,default:!1},showFooterDivider:{type:Boolean,default:!1},showDividers:{type:Boolean,default:!1},radius:{type:String,default:""},busy:{type:Boolean,default:!1},zIndex:{type:Number,default:1050}},emits:["close"],setup(t,{emit:s}){const o=t,l=s,n=e.ref(!1),c=e.computed(()=>o.radius?{[`cstu-radius-${o.radius}`]:!0}:{});function i(){a(!1)}function a(f){n.value=!1,setTimeout(()=>{document.body.classList.remove("cstu-modal-open"),l("close",f)},300)}return e.onMounted(()=>{document.body.classList.add("cstu-modal-open"),e.nextTick(()=>{n.value=!0})}),e.onBeforeUnmount(()=>{n.value=!1,document.body.classList.remove("cstu-modal-open")}),(f,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[n.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"cstu-modal-backdrop",style:e.normalizeStyle({zIndex:t.zIndex-10})},null,4)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"cstu-modal"},{default:e.withCtx(()=>[n.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["cstu-modal modal",{"cstu-modal-static":!0,"cstu-modal-scrollable":t.scrollable},t.modalClass]),style:e.normalizeStyle({display:n.value?"block":"none",zIndex:t.zIndex}),tabindex:"-1",role:"dialog","aria-modal":"true",onClick:i},[e.createElementVNode("div",{class:e.normalizeClass(["cstu-modal-dialog",t.dialogClass,{"cstu-modal-fullscreen":t.fullscreen,"cstu-modal-dialog-centered":t.centered&&!t.fullscreen,"cstu-modal-dialog-scrollable":t.scrollable,[`cstu-modal-${t.size}`]:t.size&&!t.fullscreen}]),onClick:r[3]||(r[3]=e.withModifiers(()=>{},["stop"]))},[r[5]||(r[5]=e.createElementVNode("span",{tabindex:"0"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["cstu-modal-content",t.contentClass,{"cstu-modal-content-fullscreen":t.fullscreen},c.value]),tabindex:"-1"},[e.createElementVNode("header",{class:e.normalizeClass(["cstu-modal-header",t.headerClass,{"show-divider":t.showHeaderDivider||t.showDividers}])},[e.createElementVNode("h5",No,e.toDisplayString(t.title||"Confirm"),1),e.createElementVNode("button",{type:"button",class:"cstu-close","aria-label":"Close",onClick:r[0]||(r[0]=d=>a(!1))},r[4]||(r[4]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"cstu-size-6"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"})],-1)]))],2),e.createElementVNode("div",{class:e.normalizeClass(["cstu-modal-body",t.bodyClass])},[typeof t.message=="string"?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:t.message},null,8,Do)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.message),{key:1}))],2),e.createElementVNode("footer",{class:e.normalizeClass(["cstu-modal-footer",t.footerClass,{"show-divider":t.showFooterDivider||t.showDividers}])},[e.createVNode(L,{variant:t.cancelVariant,color:t.cancelColor,disabled:t.cancelDisabled||t.busy,size:"sm",onClick:r[1]||(r[1]=d=>a(!1))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.cancelTitle),1)]),_:1},8,["variant","color","disabled"]),e.createVNode(L,{variant:t.okVariant,color:t.okColor,disabled:t.okDisabled||t.busy,size:"sm",loading:t.busy,onClick:r[2]||(r[2]=d=>a(!0))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.okTitle),1)]),_:1},8,["variant","color","disabled","loading"])],2)],2),r[6]||(r[6]=e.createElementVNode("span",{tabindex:"0"},null,-1))],2)],6)):e.createCommentVNode("",!0)]),_:1})],64))}}),vo=Symbol("CstuModal"),ue=e.reactive(new Map),we={show:t=>{const s=ue.get(t);s&&typeof s.show=="function"&&s.show()},hide:t=>{const s=ue.get(t);s&&typeof s.hide=="function"&&s.hide()},toggle:t=>{const s=ue.get(t);s&&typeof s.toggle=="function"&&s.toggle()},msgBoxOk:(t,s={})=>{const o=document.createElement("div");document.body.appendChild(o);const l={...s,message:t};return new Promise(n=>{const c=e.createApp(Eo,{...l,onClose:i=>{n(i),setTimeout(()=>{c.unmount(),o.parentNode&&o.parentNode.removeChild(o)},300)}});c.mount(o)})},msgBoxConfirm:(t,s={})=>{const o=document.createElement("div");document.body.appendChild(o);const l={...s,message:t};return new Promise(n=>{const c=e.createApp(To,{...l,onClose:i=>{n(i),setTimeout(()=>{c.unmount(),o.parentNode&&o.parentNode.removeChild(o)},300)}});c.mount(o)})}},yt=we;function Oo(){return we}function Mo(t,s){ue.set(t,s)}function Lo(t){ue.delete(t)}const Po={install:t=>{t.provide(vo,we),t.config.globalProperties.$cstuModal=we}},bt=document.createElement("style");bt.textContent=`
|
|
2
2
|
.cstu-msgbox-container {
|
|
3
3
|
position: relative;
|
|
4
4
|
z-index: 9999;
|
|
@@ -9,4 +9,4 @@
|
|
|
9
9
|
opacity: 0 !important;
|
|
10
10
|
transition: opacity 0.15s linear;
|
|
11
11
|
}
|
|
12
|
-
`,document.head.appendChild(yt);const Oo=["id","aria-labelledby"],Mo=["aria-label"],Lo=["id"],Ao=["aria-label"],Po={key:0},Io=e.defineComponent({__name:"Modal",props:{id:{type:String,default:()=>`modal-${Date.now()}`},title:{type:String,default:""},modelValue:{type:Boolean,default:!1},size:{type:String,default:"md"},radius:{type:String,default:""},centered:{type:Boolean,default:!0},scrollable:{type:Boolean,default:!1},fullscreen:{type:Boolean,default:!1},hideHeader:{type:Boolean,default:!1},hideFooter:{type:Boolean,default:!1},hideHeaderClose:{type:Boolean,default:!1},titleSrOnly:{type:Boolean,default:!1},ariaLabel:{type:String,default:""},content:{type:String,default:""},okTitle:{type:String,default:"OK"},okVariant:{type:String,default:"filled"},okColor:{type:String,default:"primary"},okDisabled:{type:Boolean,default:!1},cancelTitle:{type:String,default:"Cancel"},cancelVariant:{type:String,default:"outline"},cancelColor:{type:String,default:"secondary"},cancelDisabled:{type:Boolean,default:!1},modalClass:{type:String,default:""},dialogClass:{type:String,default:""},contentClass:{type:String,default:""},headerClass:{type:String,default:""},bodyClass:{type:String,default:""},footerClass:{type:String,default:""},ariaLabelledby:{type:String,default:""},teleport:{type:Boolean,default:!0},backdrop:{type:Boolean,default:!0},titleClass:{type:String,default:""},showHeaderDivider:{type:Boolean,default:!1},showFooterDivider:{type:Boolean,default:!1},showDividers:{type:Boolean,default:void 0},closeTitle:{type:String,default:"Close"},busy:{type:Boolean,default:!1},noCloseOnBackdrop:{type:Boolean,default:!1},noCloseOnEsc:{type:Boolean,default:!1},static:{type:Boolean,default:!1},lazy:{type:Boolean,default:!1},okOnly:{type:Boolean,default:!1},zIndex:{type:Number,default:1050}},emits:["update:modelValue","show","shown","hide","hidden","ok","cancel","close"],setup(t,{expose:s,emit:o}){class l{constructor(z,V={}){Y(this,"type");Y(this,"cancelable",!0);Y(this,"target",null);Y(this,"vueTarget",null);Y(this,"defaultPrevented",!1);Y(this,"componentId","");Y(this,"trigger","programmatic");this.type=z,Object.assign(this,V)}preventDefault(){this.defaultPrevented=!0}}const n=t,c=o,i=e.ref(!1),r=e.ref(null),d=e.ref(null),a=e.ref(n.zIndex),f=e.ref(!1),u=e.ref(0),p=e.computed(()=>n.zIndex!==1050?n.zIndex:a.value);function g(){if(n.zIndex!==1050){a.value=n.zIndex;return}const k=document.querySelectorAll(".cstu-modal");let z=1050;k.forEach(V=>{const v=parseInt(window.getComputedStyle(V).zIndex,10);!isNaN(v)&&v>z&&(z=v)}),a.value=z+10}const y=e.computed(()=>n.fullscreen?"":m(n.radius));function m(k){const z={none:"",sm:"cstu-rounded-sm",md:"cstu-rounded-md",lg:"cstu-rounded-lg",xl:"cstu-rounded-xl",full:"cstu-rounded-full"};return z[k||n.size]||z.md}function x(){if(i.value)return;const k=new l("show",{trigger:"programmatic",target:null,vueTarget:null,componentId:n.id});c("show",k),!k.defaultPrevented&&(r.value=document.activeElement,i.value=!0,u.value++,g(),document.body.classList.add("cstu-modal-open"),c("update:modelValue",!0),e.nextTick(()=>{E(),c("shown",k)}))}function w(k="programmatic"){if(!i.value)return;const z=new l("hide",{trigger:k,target:null,vueTarget:null,componentId:n.id});c("hide",z),!z.defaultPrevented&&(i.value=!1,f.value=!1,document.body.classList.remove("cstu-modal-open"),c("update:modelValue",!1),e.nextTick(()=>{S(r.value),c("hidden",z)}))}function b(k){k&&(r.value=typeof k=="string"?document.querySelector(k):k),i.value?w():x()}function B(k){k==="ok"?c("ok"):k==="cancel"&&c("cancel"),w(k)}function h(k){const z=k.target,V=z.closest(".cstu-dropdown-menu"),v=z.tagName&&z.tagName.toLowerCase()==="input";if(V||v){k.stopPropagation();return}!n.noCloseOnBackdrop&&z===k.currentTarget&&w("backdrop")}function C(k){k.key==="Escape"&&i.value&&!n.noCloseOnEsc&&!n.busy&&w("esc")}function E(){e.nextTick(()=>{if(!d.value)return;const k=d.value,z=T(k);z.length>0&&z[0].focus()})}function S(k){if(k&&i.value===!1)try{k.focus()}catch{}}function N(k){if(i.value&&d.value&&k.target){const z=k.target,V=d.value;if(V!==z&&!V.contains(z)){if(f.value)return;f.value=!0;try{const v=T(V);v.length>0?v[0].focus():V.focus()}finally{setTimeout(()=>{f.value=!1},0)}}}}function T(k){return Array.from(k.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'))}return e.watch(()=>n.modelValue,k=>{k!==i.value&&(k?x():w())}),e.onMounted(()=>{Do(n.id,{show:x,hide:w,toggle:b}),document.addEventListener("keydown",C),document.addEventListener("focusin",N),n.modelValue&&(x(),i.value&&e.nextTick(()=>{setTimeout(()=>{const k=document.getElementById(n.id);let z=null;k&&k.parentNode&&(z=k.parentNode.querySelector(".cstu-modal-backdrop")),k&&window.getComputedStyle(k).display==="none"&&(k.style.display="block"),z&&window.getComputedStyle(z).display==="none"&&(z.style.display="block")},50)}))}),e.onBeforeUnmount(()=>{To(n.id),document.removeEventListener("keydown",C),document.removeEventListener("focusin",N),i.value&&(i.value=!1,c("update:modelValue",!1))}),s({hide:w,show:x,close:B,toggle:b}),(k,z)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body",disabled:n.static||n.teleport===!1},[e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[i.value&&t.backdrop!==!1?(e.openBlock(),e.createElementBlock("div",{key:0,class:"cstu-modal-backdrop",style:e.normalizeStyle({zIndex:p.value-10})},null,4)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[i.value?(e.openBlock(),e.createElementBlock("div",{key:0,id:n.id,class:e.normalizeClass(["cstu-modal",[{"cstu-modal-static":n.static,"cstu-modal-scrollable":n.scrollable},n.modalClass]]),tabindex:"-1",role:"dialog","aria-modal":"true",style:e.normalizeStyle({zIndex:p.value}),"aria-labelledby":!t.hideHeader&&t.title?`modal-title-${n.id}`:void 0,onClick:h,onMousedown:z[5]||(z[5]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:e.normalizeClass(["cstu-modal-dialog",t.dialogClass,{"cstu-modal-fullscreen":t.fullscreen,"cstu-modal-dialog-centered":t.centered&&!t.fullscreen,"cstu-modal-dialog-scrollable":t.scrollable,[`cstu-modal-${t.size}`]:t.size&&!t.fullscreen}]),onClick:z[4]||(z[4]=e.withModifiers(()=>{},["stop"]))},[z[7]||(z[7]=e.createElementVNode("span",{tabindex:"0"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["cstu-modal-content",t.contentClass,{"cstu-modal-content-fullscreen":t.fullscreen},y.value]),tabindex:"-1",ref_key:"modalElement",ref:d,"aria-label":t.ariaLabel,onClick:z[3]||(z[3]=e.withModifiers(()=>{},["stop"]))},[t.hideHeader?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("header",{key:0,class:e.normalizeClass(["cstu-modal-header",t.headerClass,{"show-divider":t.showHeaderDivider||t.showDividers}])},[e.renderSlot(k.$slots,"modal-title",{},()=>[e.createElementVNode("h5",{id:`modal-title-${n.id}`,class:e.normalizeClass([n.titleClass||"cstu-modal-title",{"sr-only":t.titleSrOnly}])},e.toDisplayString(t.title),11,Lo)]),t.hideHeaderClose?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,type:"button","aria-label":t.closeTitle,class:"cstu-close",onClick:z[0]||(z[0]=V=>B("headerClose"))},z[6]||(z[6]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"cstu-size-6"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"})],-1)]),8,Ao))],2)),e.createElementVNode("div",{class:e.normalizeClass(["cstu-modal-body",t.bodyClass,{"cstu-modal-body-scrollable":t.scrollable}])},[e.renderSlot(k.$slots,"default",{},()=>[t.content?(e.openBlock(),e.createElementBlock("div",Po,e.toDisplayString(t.content),1)):e.createCommentVNode("",!0)])],2),t.hideFooter?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("footer",{key:1,class:e.normalizeClass(["cstu-modal-footer",t.footerClass,{"show-divider":t.showFooterDivider||t.showDividers}])},[e.renderSlot(k.$slots,"modal-footer",{},()=>[t.okOnly?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(X,{key:0,variant:t.cancelVariant,color:t.cancelColor,disabled:t.cancelDisabled||t.busy,onClick:z[1]||(z[1]=V=>B("cancel"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.cancelTitle),1)]),_:1},8,["variant","color","disabled"])),e.createVNode(X,{variant:t.okVariant,color:t.okColor,disabled:t.okDisabled||t.busy,loading:t.busy,onClick:z[2]||(z[2]=V=>B("ok"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.okTitle),1)]),_:1},8,["variant","color","disabled","loading"])])],2))],10,Mo),z[8]||(z[8]=e.createElementVNode("span",{tabindex:"0"},null,-1))],2)],46,Oo)):e.createCommentVNode("",!0)]),_:3})],8,["disabled"]))}}),mn="",Ro={mounted(t,s){const o=typeof s.value=="string"?s.value:Object.keys(s.modifiers)[0];if(!o){console.warn("v-cstu-modal directive requires a modal ID");return}t.addEventListener("click",()=>{ht.show(o)}),t.tagName!=="BUTTON"&&(t.setAttribute("role","button"),t.addEventListener("keydown",l=>{(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),ht.show(o))}),t.hasAttribute("tabindex")||t.setAttribute("tabindex","0"))}},Fo={install:t=>{t.directive("cstu-modal",Ro)}},jo=["primary","secondary","success","warning","info"];function bt(t,s=jo){if(!t||!s||s.length===0)return"primary";let o=0;for(let n=0;n<t.length;n+=1)o=t.charCodeAt(n)+((o<<5)-o);const l=Math.abs(o)%s.length;return s[l]}function xt(t){return!t||typeof t!="string"?"":t.trim().split(" ").slice(0,2).map(s=>s.charAt(0).toUpperCase()).join("")}const Wo=["src","alt"],Ho=["title"],qo={key:1,"data-avatar-placeholder-icon":"true",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wt=e.defineComponent({__name:"Avatar",props:{size:{default:"md"},radius:{default:"full"},color:{default:"primary"},gradient:{},src:{default:null},alt:{},imageProps:{},children:{},autoContrast:{type:Boolean,default:!0},name:{},allowedInitialsColors:{},variant:{default:"light"},component:{default:"div"},hover:{type:Boolean,default:!1},customClasses:{default:""}},setup(t){const s=t,o=e.ref(!s.src);e.watch(()=>s.src,u=>{o.value=!u},{immediate:!0});const l=u=>u?["primary","secondary","success","warning","danger","info","dark","light","initials"].includes(u):!0,n=e.computed(()=>s.name?xt(s.name):""),c=e.computed(()=>{const u={sm:"w-5 h-5 text-xs",md:"w-6 h-6 text-xs",lg:"w-[30px] h-[30px] text-sm",xl:"w-[32px] h-[32px] text-sm","2xl":"w-[34px] h-[34px] text-base","3xl":"w-[36px] h-[36px] text-base","4xl":"w-[38px] h-[38px] text-lg","5xl":"w-[52px] h-[52px] text-xl"};return typeof s.size=="string"?u[s.size]||u.md:typeof s.size=="number"?`w-[${s.size}px] h-[${s.size}px]`:u.md}),i=e.computed(()=>J(s.radius)),r=e.computed(()=>{if(s.src&&!o.value||!l(s.color)&&s.color!=="initials")return"";if(s.color==="initials"&&s.name){const y=bt(s.name,s.allowedInitialsColors||["primary","secondary","success","warning","info"]);return y?D(y,"filled",{}):D("primary","filled",{})}const u=s.variant==="transparent"?"default":s.variant==="gradient"?"filled":s.variant,p=s.color&&s.color!=="initials"?s.color:"primary",g=D(p,u,{});return s.variant==="transparent"?"bg-transparent":g}),d=e.computed(()=>!l(s.color)&&s.color!=="initials"?"":s.variant==="transparent"?"bg-transparent":s.variant==="gradient"&&s.gradient?`bg-gradient-to-r from-${s.gradient.from} to-${s.gradient.to}`:je(s.variant)),a=e.computed(()=>{if(s.src&&!o.value||l(s.color)||s.color==="initials")return{};const u={};switch(s.variant){case"filled":u.backgroundColor=s.color,s.autoContrast&&(u.color="white");break;case"light":u.backgroundColor=`${s.color}20`,u.color=s.color;break;case"outline":u.backgroundColor="transparent",u.color=s.color,u.border=`1px solid ${s.color}`;break;case"transparent":u.backgroundColor="transparent",u.color=s.color;break}return u}),f=u=>{var p;o.value=!0,(p=s.imageProps)!=null&&p.onError&&s.imageProps.onError(u)};return(u,p)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.component||"div"),{class:e.normalizeClass(["avatar",c.value,i.value,!o.value&&u.src?"":r.value,!o.value&&u.src?"":d.value,{"avatar--with-image":!o.value&&u.src},{"hover:opacity-80 transition-opacity":u.hover},u.customClasses]),style:e.normalizeStyle(a.value)},{default:e.withCtx(()=>[!o.value&&u.src?(e.openBlock(),e.createElementBlock("img",e.mergeProps({key:0,class:"avatar__image",src:u.src,alt:u.alt},u.imageProps,{onError:f}),null,16,Wo)):(e.openBlock(),e.createElementBlock("span",{key:1,class:"avatar__placeholder",title:u.alt},[e.renderSlot(u.$slots,"default",{},()=>[u.name?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(n.value),1)],64)):(e.openBlock(),e.createElementBlock("svg",qo,p[0]||(p[0]=[e.createElementVNode("path",{d:"M0.877014 7.49988C0.877014 3.84219 3.84216 0.877045 7.49985 0.877045C11.1575 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1575 14.1227 7.49985 14.1227C3.84216 14.1227 0.877014 11.1575 0.877014 7.49988ZM7.49985 1.82704C4.36683 1.82704 1.82701 4.36686 1.82701 7.49988C1.82701 8.97196 2.38774 10.3131 3.30727 11.3213C4.19074 9.94119 5.73818 9.02499 7.50023 9.02499C9.26206 9.02499 10.8093 9.94097 11.6929 11.3208C12.6121 10.3127 13.1727 8.97172 13.1727 7.49988C13.1727 4.36686 10.6328 1.82704 7.49985 1.82704ZM10.9818 11.9787C10.2839 10.7795 8.9857 9.97499 7.50023 9.97499C6.01458 9.97499 4.71624 10.7797 4.01845 11.9791C4.97952 12.7272 6.18765 13.1727 7.49985 13.1727C8.81227 13.1727 10.0206 12.727 10.9818 11.9787ZM5.14999 6.50487C5.14999 5.207 6.20212 4.15487 7.49999 4.15487C8.79786 4.15487 9.84999 5.207 9.84999 6.50487C9.84999 7.80274 8.79786 8.85487 7.49999 8.85487C6.20212 8.85487 5.14999 7.80274 5.14999 6.50487ZM7.49999 5.10487C6.72679 5.10487 6.09999 5.73167 6.09999 6.50487C6.09999 7.27807 6.72679 7.90487 7.49999 7.90487C8.27319 7.90487 8.89999 7.27807 8.89999 6.50487C8.89999 5.73167 8.27319 5.10487 7.49999 5.10487Z",fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd"},null,-1)])))])],8,Ho))]),_:3},8,["class","style"]))}}),gn="",Zo=e.defineComponent({__name:"AvatarGroup",props:{spacing:{default:"sm"},gap:{default:"none"},outlineWidth:{default:"normal"},outlineColor:{default:"white"},outlineOffset:{default:"small"},customClasses:{default:""},max:{},hover:{type:Boolean,default:!1}},setup(t){const s=t,o=e.computed(()=>{if(typeof s.spacing=="number")return`${s.spacing}px`;const a={xs:"-1rem",sm:"-0.75rem",md:"-0.5rem",lg:"-0.25rem",xl:"0"};return a[s.spacing]||a.sm}),l=e.computed(()=>{if(typeof s.gap=="number")return`${s.gap}px`;if(typeof s.gap=="string"&&!isNaN(parseFloat(s.gap)))return s.gap;const a={none:"0",xs:"0.25rem",sm:"0.5rem",md:"0.75rem",lg:"1rem"};return a[s.gap]||a.none}),n=e.computed(()=>{if(typeof s.outlineWidth=="number")return`${s.outlineWidth}px`;if(typeof s.outlineWidth=="string"&&!isNaN(parseFloat(s.outlineWidth)))return s.outlineWidth;const a={none:"0",thin:"1px",normal:"2px",medium:"3px",thick:"4px"};return a[s.outlineWidth]||a.normal}),c=e.computed(()=>{if(typeof s.outlineOffset=="number")return`${s.outlineOffset}px`;if(typeof s.outlineOffset=="string"&&!isNaN(parseFloat(s.outlineOffset)))return s.outlineOffset;const a={none:"0",inset:"-2px",small:"1px",medium:"2px",large:"3px"};return a[s.outlineOffset]||a.small}),i=e.computed(()=>typeof s.outlineColor=="string"&&["primary","secondary","success","danger","warning","info","dark","light"].includes(s.outlineColor)?`outline-${s.outlineColor}`:""),r=e.computed(()=>typeof s.outlineColor=="string"&&["primary","secondary","success","danger","warning","info","dark","light"].includes(s.outlineColor)?"var(--color-"+s.outlineColor+")":s.outlineColor),d=e.computed(()=>({"--avatar-group-spacing":o.value,"--avatar-group-gap":l.value,"--avatar-group-outline-width":n.value,"--avatar-group-outline-color":r.value,"--avatar-group-outline-offset":c.value}));return(a,f)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["avatar-group",a.customClasses,i.value,{"avatar-group--hover":a.hover}]),style:e.normalizeStyle(d.value)},[e.renderSlot(a.$slots,"default",{},void 0,!0)],6))}}),hn="",Ct=Ze(Zo,[["__scopeId","data-v-f582d4fb"]]);wt.Group=Ct;const ke=e.defineComponent({__name:"Tabs",props:{value:{type:String,default:void 0},defaultValue:{type:String,default:"first"},orientation:{type:String,default:"horizontal"},placement:{type:String,default:void 0},variant:{type:String,default:"text"}},emits:["change"],setup(t,{emit:s}){const o=t,l=e.computed(()=>o.placement?o.placement:o.orientation==="horizontal"?"top":"left"),n=e.computed(()=>o.orientation),c=e.computed(()=>o.variant),i=s,r=e.ref(o.value!==void 0?o.value:o.defaultValue);e.watch(()=>o.value,a=>{a!==void 0&&(r.value=a)});const d=a=>{o.value!==void 0?i("change",a):r.value=a};return e.provide("activeTab",r),e.provide("setActiveTab",d),e.provide("tabsOrientation",n),e.provide("tabsPlacement",l),(a,f)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cstu-tabs",`cstu-tabs-${n.value}`,`cstu-tabs-placement-${l.value}`,`cstu-tabs-variant-${c.value}`])},[e.renderSlot(a.$slots,"default")],2))}}),yn="",kt=e.defineComponent({__name:"TabsList",props:{justify:{type:String,default:"flex-start"},divider:{type:Boolean,default:!1}},setup(t){const s=t,o=e.inject("tabsOrientation",e.ref("horizontal")),l=e.inject("tabsPlacement",e.ref("top")),n=e.computed(()=>["tabs-list",`tabs-list-${o.value}`,`tabs-list-placement-${l.value}`,s.divider?"tabs-list-with-divider":""]),c=r=>{if(["space-between","space-around","space-evenly"].includes(r))return r;switch(r){case"flex-start":return"flex-start";case"flex-end":return"flex-end";case"center":return"center";default:return"flex-start"}},i=e.computed(()=>o.value==="horizontal"?{justifyContent:s.justify}:{justifyContent:c(s.justify)});return(r,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(n.value),style:e.normalizeStyle(i.value)},[e.renderSlot(r.$slots,"default")],6))}}),bn="",Bt=e.defineComponent({__name:"TabsTab",props:{value:{type:String,required:!0},color:{type:String,default:"primary"},variant:{type:String,default:"text"},size:{type:String,default:"md"},radius:{type:String,default:"md"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},fullWidth:{type:Boolean,default:!1}},setup(t){const s=t,o=e.inject("activeTab",e.ref("")),l=e.inject("setActiveTab",()=>{}),n=e.inject("tabsOrientation",e.ref("horizontal")),c=e.inject("tabsPlacement",e.ref("top")),i=e.computed(()=>o.value),r=e.computed(()=>n.value),d=e.computed(()=>c.value),a=e.computed(()=>i.value===s.value),f=e.computed(()=>r.value==="vertical"),u=e.computed(()=>s.fullWidth&&r.value==="horizontal"),p=()=>{!s.disabled&&!s.loading&&l(s.value)};return(g,y)=>(e.openBlock(),e.createBlock(e.unref(X),{class:e.normalizeClass(["tabs-tab",a.value?"tabs-tab-active":"tabs-tab-inactive",`tabs-tab-${s.variant}`,s.color?`tabs-tab-color-${s.color}`:"",`tabs-tab-orientation-${r.value}`,`tabs-tab-placement-${d.value}`,{"tabs-tab-full-width":u.value}]),disabled:s.disabled,loading:s.loading,color:a.value?s.color:"secondary",variant:a.value?s.variant:"subtle",size:s.size,radius:s.variant==="text"?"none":s.radius,"full-width":f.value,onClick:p},e.createSlots({default:e.withCtx(()=>[e.renderSlot(g.$slots,"default")]),_:2},[g.$slots.leftSection?{name:"leftSection",fn:e.withCtx(()=>[e.renderSlot(g.$slots,"leftSection")]),key:"0"}:void 0,g.$slots.rightSection?{name:"rightSection",fn:e.withCtx(()=>[e.renderSlot(g.$slots,"rightSection")]),key:"1"}:void 0]),1032,["class","disabled","loading","color","variant","size","radius","full-width"]))}}),xn="",zt=e.defineComponent({__name:"TabsPanel",props:{value:{type:String,required:!0}},setup(t){const s=t,o=e.inject("activeTab",e.ref("")),l=e.inject("tabsOrientation",e.ref("horizontal")),n=e.inject("tabsPlacement",e.ref("top")),c=e.computed(()=>o.value===s.value),i=e.computed(()=>["tabs-panel",c.value?"tabs-panel-active":"tabs-panel-inactive",`tabs-panel-${l.value}`,`tabs-panel-placement-${n.value}`]);return(r,d)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(i.value)},[e.renderSlot(r.$slots,"default")],2)),[[e.vShow,e.unref(o)===s.value]])}}),wn="";ke.List=kt,ke.Tab=Bt,ke.Panel=zt;const Ko={},Uo={key:0,class:"badge-section mr-2"},Go={key:1,class:"badge-section ml-2"},Yo=e.defineComponent({__name:"Badge",props:{variant:{default:"filled"},color:{default:"primary"},textClass:{},size:{default:"md"},radius:{default:"xl"},circle:{type:Boolean,default:!1},fullWidth:{type:Boolean,default:!1},autoContrast:{type:Boolean,default:!0},gradient:{},leftSection:{},rightSection:{},component:{}},setup(t){const s=t,o=a=>a?["primary","secondary","success","warning","danger","info","dark","light"].includes(a):!0,l=a=>{if(!a)return"cstu-bg-gradient-to-r";const f=(a%360+360)%360;return f>=337.5||f<22.5?"cstu-bg-gradient-to-r":f>=22.5&&f<67.5?"cstu-bg-gradient-to-tr":f>=67.5&&f<112.5?"cstu-bg-gradient-to-t":f>=112.5&&f<157.5?"cstu-bg-gradient-to-tl":f>=157.5&&f<202.5?"cstu-bg-gradient-to-l":f>=202.5&&f<247.5?"cstu-bg-gradient-to-bl":f>=247.5&&f<292.5?"cstu-bg-gradient-to-b":f>=292.5&&f<337.5?"cstu-bg-gradient-to-br":"cstu-bg-gradient-to-r"},n=e.computed(()=>{const a={xs:"h-5 w-5 flex items-center justify-center p-0 overflow-hidden text-center",sm:"h-6 w-6 flex items-center justify-center p-0 overflow-hidden text-center",md:"h-7 w-7 flex items-center justify-center p-0 overflow-hidden text-center",lg:"h-8 w-8 flex items-center justify-center p-0 overflow-hidden text-center",xl:"h-9 w-9 flex items-center justify-center p-0 overflow-hidden text-center"};return a[s.size]||a.md}),c=e.computed(()=>{if(s.variant!=="gradient"||!s.gradient)return"";const a=l(s.gradient.deg),f=s.gradient.from||"blue",u=s.gradient.to||f;return`${a} cstu-from-${f}-500 cstu-to-${u}-600 text-white`}),i=e.computed(()=>{const a={filled:`${D(s.color,"filled")} ${s.autoContrast?"text-white dark:text-white":""}`,light:`${D(s.color,"light")}`,outline:`${D(s.color,"outline")}`,transparent:`${D(s.color,"text")}`,gradient:c.value};return a[s.variant]||a.filled}),r=e.computed(()=>{const a="inline-flex items-center justify-center font-medium";if(s.variant==="gradient"&&s.gradient){const g=l(s.gradient.deg),y=s.gradient.from||"blue",m=s.gradient.to||y,x=`${g} cstu-from-${y}-500 cstu-to-${m}-600 ${s.autoContrast?"text-white":""}`;return[a,x,s.circle?n.value:P(s.size,"badge"),s.circle?"rounded-full":J(s.radius),s.fullWidth?"w-full":""].filter(Boolean).join(" ")}const f=s.circle?n.value:P(s.size,"badge"),u=s.circle?"rounded-full":J(s.radius),p=s.fullWidth?"w-full":"";return[a,i.value,f,u,p].filter(Boolean).join(" ")}),d=e.computed(()=>{const a={};if(!o(s.color))switch(s.variant){case"filled":a.backgroundColor=s.color,a.color="cstu-bg-white";break;case"light":a.backgroundColor=`${s.color}20`,a.color=s.color;break;case"outline":a.backgroundColor="transparent",a.color=s.color,a.border=`1px solid ${s.color}`;break}return a});return(a,f)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.component||"div"),e.mergeProps({class:r.value,style:d.value},a.$attrs),{default:e.withCtx(()=>[a.leftSection?(e.openBlock(),e.createElementBlock("span",Uo,[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",{class:e.normalizeClass([[{"overflow-hidden max-w-full":a.circle},a.textClass],"badge-label"])},[e.renderSlot(a.$slots,"default")],2),a.rightSection?(e.openBlock(),e.createElementBlock("span",Go,[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)]),_:3},16,["class","style"]))}}),Cn="",Xo={mounted(t,s){t._clickOutside=o=>{const l=o.target;if(!(t===l||t.contains(l))){const n=o.target,c=n.tagName&&n.tagName.toLowerCase()==="input",i=n.closest(".cstu-dropdown-menu");!c&&!i&&s.value(o)}},document.addEventListener("click",t._clickOutside,!0),document.addEventListener("touchstart",t._clickOutside,!0)},unmounted(t){t._clickOutside&&(document.removeEventListener("click",t._clickOutside,!0),document.removeEventListener("touchstart",t._clickOutside,!0))}},Jo=["data-active"],Qo=e.defineComponent({__name:"Dropdown",props:{size:{default:"md"},radius:{default:"md"},open:{type:Boolean,default:!1},buttonClasses:{default:""},dropdownClasses:{default:""},placement:{default:"auto"},disabled:{type:Boolean,default:!1},containerClasses:{default:""},showArrow:{type:Boolean,default:!0},disabledText:{default:""},parentPositionRelative:{type:Boolean,default:!0},offsetDistance:{default:8},unstyled:{type:Boolean,default:!1},matchWidth:{type:Boolean,default:!1},zIndex:{default:50}},emits:["close","update:open"],setup(t,{emit:s}){const o=t,l=s,n=e.ref(o.open),c=e.ref(0),i=e.ref(null),r=e.ref(null);e.onMounted(()=>{e.watch(n,h=>{h&&e.nextTick(()=>{var E;const C=(E=i.value)==null?void 0:E.querySelectorAll("input");C&&C.length&&C.forEach(S=>{S.addEventListener("click",d,{capture:!0}),S.addEventListener("mousedown",d,{capture:!0}),S.addEventListener("focus",d,{capture:!0})})})})});function d(h){h.stopPropagation();const C=h.target;setTimeout(()=>{C.focus()},0)}const a=e.computed(()=>{switch(o.placement){case"top":return"top";case"bottom":return"bottom";case"left":return"left";case"right":return"right";case"auto":return;case"top-start":return"top-start";case"bottom-start":return"bottom-start";case"top-end":return"top-end";case"bottom-end":return"bottom-end";case"left-start":return"left-start";case"right-start":return"right-start";default:return"bottom-start"}}),f=e.computed(()=>{const h=[rt(o.offsetDistance),it({padding:8})];return o.placement==="auto"?h.push(mo({padding:8})):h.push(ct({fallbackPlacements:["top-start","bottom-start","left-start","right-start"],padding:8})),h}),{floatingStyles:u,update:p}=ft(r,i,{placement:a.value,middleware:f.value,whileElementsMounted:po,strategy:"fixed"}),g=e.inject("parentDropdownOpen",null);e.provide("parentDropdownOpen",n),e.watch(()=>o.open,h=>{h!==n.value&&(n.value=h)}),e.watch(()=>g==null?void 0:g.value,h=>{h===!1&&(n.value=!1)},{immediate:!0}),e.watch(n,h=>{h&&e.nextTick(()=>{p()})});const y=e.computed(()=>P(o.size,"dropdown")),m=e.computed(()=>J(o.radius));function x(h){var N;if(!h){B();return}const C=h.target,E=C.closest(".cstu-dropdown-menu"),S=(N=r.value)==null?void 0:N.contains(C);E||S||o.disabled||B()}e.provide("dropdownClose",x);function w(){o.disabled||(n.value?(n.value=!1,l("close"),l("update:open",!1)):(n.value=!0,l("update:open",!0),setTimeout(()=>{var C,E;(C=i.value)==null||C.focus();const h=(E=i.value)==null?void 0:E.querySelector(".active");h==null||h.scrollIntoView({behavior:"smooth"})},100)))}function b(h){i.value&&(h.key==="ArrowUp"&&c.value>0?(h.preventDefault(),c.value--):h.key==="ArrowDown"&&c.value<i.value.children.length-1&&(h.preventDefault(),c.value++))}function B(h=!1){n.value=!1,!h&&(l("close"),l("update:open",!1))}return(h,C)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cstu-inline-block cstu-text-left cstu-dropdown-container",[{"cstu-relative":h.parentPositionRelative},{"cstu-grayscale cstu-filter cstu-cursor-not-allowed cstu-opacity-70":h.disabled},h.containerClasses]])},[e.createElementVNode("button",{ref_key:"buttonRef",ref:r,type:"button",class:e.normalizeClass([!h.unstyled&&"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",!h.unstyled&&m.value,!h.unstyled&&y.value,{"cstu-pointer-events-none":h.disabled},h.buttonClasses||!h.unstyled&&"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:w},[e.renderSlot(h.$slots,"icon",{closeDropdown:B}),e.renderSlot(h.$slots,"selected",{closeDropdown:B},()=>[C[2]||(C[2]=e.createTextVNode("Select"))]),h.showArrow?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["cstu-transition cstu-leading-none",{"cstu-rotate-180":n.value}])},[e.renderSlot(h.$slots,"arrow",{closeDropdown:B},()=>[C[3]||(C[3]=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(()=>{var E;return[(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.withDirectives(e.createElementVNode("div",{ref_key:"dropdownList",ref:i,style:e.normalizeStyle([e.unref(u),o.matchWidth?{width:((E=r.value)==null?void 0:E.offsetWidth)+"px"}:{},{zIndex:o.zIndex}]),class:e.normalizeClass(["cstu-dropdown-menu cstu-max-h-72 cstu-px-[12px] cstu-py-[13px] cstu-min-w-[225px] cstu-overflow-y-auto cstu-origin-top-left cstu-rounded-lg cstu-shadow-dropdown cstu-bg-white focus:cstu-outline-none",[m.value,h.dropdownClasses]]),onClick:C[0]||(C[0]=e.withModifiers(()=>{},["stop"])),onMousedown:C[1]||(C[1]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:"cstu-flex cstu-flex-col cstu-gap-[11px]",role:"menu","aria-orientation":"vertical","aria-labelledby":"menu-button","data-active":c.value,tabindex:"-1",onKeydown:b},[e.renderSlot(h.$slots,"default",{closeDropdown:B})],40,Jo)],38),[[e.vShow,n.value]])]))]}),_:3})],2)),[[e.unref(Xo),x]])}}),_o=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(t,{emit:s}){const o=t,l=s,n=e.inject("dropdownClose",()=>{}),c=e.computed(()=>o.class);function i(){o.disabled||(o.closeOnClick&&n(),l("click"))}return(r,d)=>(e.openBlock(),e.createElementBlock("div",{role:"menuitem",tabindex:"-1",class:e.normalizeClass(["cstu-cursor-pointer hover:cstu-bg-blue-50 active:cstu-bg-blue-50 cstu-rounded-lg",e.unref(fe)(o.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},c.value]),onClick:i},[e.renderSlot(r.$slots,"default",{selected:r.selected})],2))}}),$t=e.defineComponent({__name:"ListItem",props:{disabled:{type:Boolean,default:!1},selected:{type:Boolean,default:!1},class:{default:""},selectedClass:{default:""},noColorOnSelected:{type:Boolean,default:!1}},emits:["click"],setup(t,{emit:s}){const o=t,l=s,n=e.computed(()=>o.class);function c(){o.disabled||l("click")}return(i,r)=>(e.openBlock(),e.createElementBlock("div",{role:"listitem",tabindex:"-1",class:e.normalizeClass(["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]:i.selected&&!i.disabled},{"cstu-bg-blue-50":i.selected&&!i.noColorOnSelected&&!i.disabled},n.value]),onClick:c},[e.renderSlot(i.$slots,"default",{selected:i.selected})],2))}}),en=e.defineComponent({__name:"Collapsible",props:{modelValue:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},class:{default:""},hideArrow:{type:Boolean,default:!1},buttonClass:{default:""},selectedClass:{default:""}},emits:["update:modelValue"],setup(t,{emit:s}){const o=t,l=s,n=e.computed(()=>o.modelValue!==void 0),c=e.computed({get:()=>n.value?o.modelValue??!1:i.value,set:a=>{n.value?l("update:modelValue",a):i.value=a}}),i=e.ref(o.defaultOpen),r=e.computed(()=>o.class);function d(){o.disabled||(c.value=!c.value)}return(a,f)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["space-y-1 cstu-select-none",r.value])},[e.createVNode($t,{role:"button",disabled:a.disabled,class:e.normalizeClass(["cstu-flex cstu-items-center cstu-justify-between",a.buttonClass].join(" ")),"selected-class":a.selectedClass,selected:c.value,"no-color-on-selected":!0,onClick:d},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"trigger",{open:c.value}),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(["cstu-transform cstu-transition-transform cstu-duration-200",{"cstu-rotate-180":!c.value}])},f[0]||(f[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":"cstu-transition cstu-duration-100 cstu-ease-out","enter-from-class":"cstu-transform cstu-scale-95 cstu-opacity-0","enter-to-class":"cstu-transform cstu-scale-100 cstu-opacity-100","leave-active-class":"cstu-transition cstu-duration-75 cstu-ease-in","leave-from-class":"cstu-transform cstu-scale-100 cstu-opacity-100","leave-to-class":"cstu-transform cstu-scale-95 cstu-opacity-0"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",null,[e.renderSlot(a.$slots,"default")],512),[[e.vShow,c.value]])]),_:3})],2))}}),tn={xs:"px-2.5 py-1.5 text-xs",sm:"px-3 py-2 text-sm",md:"px-4 py-2 text-base",lg:"px-4 py-2.5 text-lg",xl:"px-5 py-3 text-xl"},Be={none:"rounded-none",xs:"rounded",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",xl:"rounded-2xl",full:"rounded-full"},sn={primary:{base:"blue",text:"text-blue-600",bg:"bg-blue-600",hover:"hover:bg-blue-700",border:"border-blue-600",ring:"ring-blue-500"},secondary:{base:"gray",text:"text-gray-600",bg:"bg-gray-600",hover:"hover:bg-gray-700",border:"border-gray-600",ring:"ring-gray-500"},success:{base:"green",text:"text-green-600",bg:"bg-green-600",hover:"hover:bg-green-700",border:"border-green-600",ring:"ring-green-500"},warning:{base:"yellow",text:"text-yellow-600",bg:"bg-yellow-600",hover:"hover:bg-yellow-700",border:"border-yellow-600",ring:"ring-yellow-500"},danger:{base:"red",text:"text-red-600",bg:"bg-red-600",hover:"hover:bg-red-700",border:"border-red-600",ring:"ring-red-500"},info:{base:"sky",text:"text-sky-600",bg:"bg-sky-600",hover:"hover:bg-sky-700",border:"border-sky-600",ring:"ring-sky-500"},dark:{base:"dark",text:"text-gray-200",bg:"bg-gray-900",hover:"hover:bg-gray-800",border:"border-gray-900",ring:"ring-gray-700"},light:{base:"light",text:"text-gray-600",bg:"bg-gray-100",hover:"hover:bg-gray-200",border:"border-gray-100",ring:"ring-gray-300"}},on=["onClick","data-value"],nn=e.defineComponent({name:"SegmentedControl",__name:"SegmentedControl",props:{modelValue:{default:""},data:{},size:{default:"md"},radius:{default:"md"},color:{default:"primary"},disabled:{type:Boolean,default:!1},fullWidth:{type:Boolean,default:!1},transitionDuration:{default:200},withItemsBorders:{type:Boolean,default:!1},orientation:{default:"horizontal"}},emits:["update:modelValue"],setup(t,{emit:s}){const o=s,l=t,n=e.ref({}),c=e.ref(null),i=e.computed(()=>l.data.map(f=>typeof f=="string"?{value:f,label:f}:f)),r=e.computed(()=>l.orientation==="horizontal"?"cstu-flex-row":"cstu-flex-col"),d=async()=>{if(!l.modelValue)return;await e.nextTick();const f=n.value[l.modelValue];if(!f)return;const u=f.getBoundingClientRect(),p=f.parentElement.getBoundingClientRect();c.value={left:u.left-p.left,top:u.top-p.top,width:u.width,height:u.height}},a=f=>{o("update:modelValue",f)};return e.watch(()=>l.modelValue,d),e.watch(()=>l.orientation,d),e.onMounted(()=>{d(),window.addEventListener("resize",d)}),e.onUnmounted(()=>{window.removeEventListener("resize",d)}),(f,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cstu-relative cstu-inline-flex",r.value,{"cstu-w-full":f.fullWidth,"cstu-opacity-50 cstu-pointer-events-none":f.disabled}]),role:"radiogroup"},[c.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["cstu-absolute cstu-bg-white cstu-rounded-[inherit]",e.unref(Be)[f.radius]]),style:e.normalizeStyle({transform:`translate(${c.value.left}px, ${c.value.top}px)`,width:`${c.value.width}px`,height:`${c.value.height}px`,transition:`transform ${f.transitionDuration}ms ease`,boxShadow:"0 1px 2px 0 rgb(0 0 0 / 0.05)"})},null,6)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["cstu-relative cstu-flex",r.value,e.unref(Be)[f.radius],{"cstu-w-full":f.fullWidth,"cstu-divide-x cstu-divide-gray-200":f.withItemsBorders&&f.orientation==="horizontal","cstu-divide-y cstu-divide-gray-200":f.withItemsBorders&&f.orientation==="vertical"},e.unref(P)(f.size,"segmentedControlContainer"),"cstu-bg-gray-100"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,p=>(e.openBlock(),e.createElementBlock("div",{key:p.value,class:e.normalizeClass(["cstu-relative cstu-flex-1","cstu-transition-all cstu-duration-200",e.unref(Nt)(!!p.disabled),l.modelValue===p.value?"cstu-bg-white cstu-border-gray-500/15":"cstu-border-transparent",e.unref(P)(f.size,"segmentedControl"),"cstu-cursor-pointer","cstu-flex cstu-items-center cstu-justify-center hover:cstu-border-gray-500/15 cstu-border",e.unref(Be)[f.radius]]),onClick:()=>!p.disabled&&a(p.value),"data-value":p.value,ref_for:!0,ref:"el => segmentRefs[option.value] = el"},[e.createElementVNode("span",{class:e.normalizeClass([e.unref(Se)({size:f.size,disabled:p.disabled}),l.modelValue===p.value?"cstu-text-gray-500":"cstu-text-gray-600","cstu-select-none !cstu-mb-0 !cstu-font-normal cstu-capitalize cstu-whitespace-nowrap"])},e.toDisplayString(p.label),3)],10,on))),128))],2)],2))}}),kn="";$.Alert=ks,$.Avatar=wt,$.AvatarGroup=Ct,$.Badge=Yo,$.Button=X,$.Checkbox=Pt,$.Chip=is,$.Collapse=Bs,$.Collapsible=en,$.Dialog=Os,$.Dropdown=Qo,$.DropdownItem=_o,$.HoverCard=gt,$.HoverCardTarget=Fe,$.Indicator=ps,$.ListItem=$t,$.Loader=Vs,$.Modal=Io,$.ModalDirective=Fo,$.ModalPlugin=vo,$.Progress=ys,$.Radio=jt,$.SegmentedControl=nn,$.Select=ns,$.Tabs=ke,$.TabsList=kt,$.TabsPanel=zt,$.TabsTab=Bt,$.TextInput=Xt,$.colorClasses=sn,$.composables=Ko,$.getInitials=xt,$.getInitialsColor=bt,$.hoverCardInjectionKey=Re,$.radiusClasses=Be,$.sizeClasses=tn,$.useHoverCard=mt,$.useModal=No,Object.defineProperty($,Symbol.toStringTag,{value:"Module"})});
|
|
12
|
+
`,document.head.appendChild(bt);const Ao=["id","aria-labelledby"],Io=["aria-label"],Ro=["id"],jo=["aria-label"],Fo={key:0},Wo=e.defineComponent({__name:"Modal",props:{id:{type:String,default:()=>`modal-${Date.now()}`},title:{type:String,default:""},modelValue:{type:Boolean,default:!1},size:{type:String,default:"md"},radius:{type:String,default:""},centered:{type:Boolean,default:!0},scrollable:{type:Boolean,default:!1},fullscreen:{type:Boolean,default:!1},hideHeader:{type:Boolean,default:!1},hideFooter:{type:Boolean,default:!1},hideHeaderClose:{type:Boolean,default:!1},titleSrOnly:{type:Boolean,default:!1},ariaLabel:{type:String,default:""},content:{type:String,default:""},okTitle:{type:String,default:"OK"},okVariant:{type:String,default:"filled"},okColor:{type:String,default:"primary"},okDisabled:{type:Boolean,default:!1},cancelTitle:{type:String,default:"Cancel"},cancelVariant:{type:String,default:"outline"},cancelColor:{type:String,default:"secondary"},cancelDisabled:{type:Boolean,default:!1},modalClass:{type:String,default:""},dialogClass:{type:String,default:""},contentClass:{type:String,default:""},headerClass:{type:String,default:""},bodyClass:{type:String,default:""},footerClass:{type:String,default:""},ariaLabelledby:{type:String,default:""},teleport:{type:Boolean,default:!0},backdrop:{type:Boolean,default:!0},titleClass:{type:String,default:""},showHeaderDivider:{type:Boolean,default:!1},showFooterDivider:{type:Boolean,default:!1},showDividers:{type:Boolean,default:void 0},closeTitle:{type:String,default:"Close"},busy:{type:Boolean,default:!1},noCloseOnBackdrop:{type:Boolean,default:!1},noCloseOnEsc:{type:Boolean,default:!1},static:{type:Boolean,default:!1},lazy:{type:Boolean,default:!1},okOnly:{type:Boolean,default:!1},zIndex:{type:Number,default:1050}},emits:["update:modelValue","show","shown","hide","hidden","ok","cancel","close"],setup(t,{expose:s,emit:o}){class l{constructor(z,E={}){X(this,"type");X(this,"cancelable",!0);X(this,"target",null);X(this,"vueTarget",null);X(this,"defaultPrevented",!1);X(this,"componentId","");X(this,"trigger","programmatic");this.type=z,Object.assign(this,E)}preventDefault(){this.defaultPrevented=!0}}const n=t,c=o,i=e.ref(!1),a=e.ref(null),f=e.ref(null),r=e.ref(n.zIndex),d=e.ref(!1),p=e.ref(0),m=e.computed(()=>n.zIndex!==1050?n.zIndex:r.value);function g(){if(n.zIndex!==1050){r.value=n.zIndex;return}const k=document.querySelectorAll(".cstu-modal");let z=1050;k.forEach(E=>{const O=parseInt(window.getComputedStyle(E).zIndex,10);!isNaN(O)&&O>z&&(z=O)}),r.value=z+10}const h=e.computed(()=>n.fullscreen?"":b(n.radius));function b(k){const z={none:"",sm:"cstu-rounded-sm",md:"cstu-rounded-md",lg:"cstu-rounded-lg",xl:"cstu-rounded-xl",full:"cstu-rounded-full"};return z[k||n.size]||z.md}function u(){if(i.value)return;const k=new l("show",{trigger:"programmatic",target:null,vueTarget:null,componentId:n.id});c("show",k),!k.defaultPrevented&&(a.value=document.activeElement,i.value=!0,p.value++,g(),document.body.classList.add("cstu-modal-open"),c("update:modelValue",!0),e.nextTick(()=>{S(),c("shown",k)}))}function C(k="programmatic"){if(!i.value)return;const z=new l("hide",{trigger:k,target:null,vueTarget:null,componentId:n.id});c("hide",z),!z.defaultPrevented&&(i.value=!1,d.value=!1,document.body.classList.remove("cstu-modal-open"),c("update:modelValue",!1),e.nextTick(()=>{V(a.value),c("hidden",z)}))}function x(k){k&&(a.value=typeof k=="string"?document.querySelector(k):k),i.value?C():u()}function B(k){k==="ok"?c("ok"):k==="cancel"&&c("cancel"),C(k)}function y(k){const z=k.target,E=z.closest(".cstu-dropdown-menu"),O=z.tagName&&["input","select","textarea","button"].includes(z.tagName.toLowerCase()),D=z.closest(".cstu-modal-content");E||O||D&&z!==k.currentTarget||!n.noCloseOnBackdrop&&z===k.currentTarget&&C("backdrop")}function w(k){k.key==="Escape"&&i.value&&!n.noCloseOnEsc&&!n.busy&&C("esc")}function S(){e.nextTick(()=>{if(!f.value)return;const k=f.value,z=v(k);z.length>0&&z[0].focus()})}function V(k){if(k&&i.value===!1)try{k.focus()}catch{}}function N(k){if(i.value&&f.value&&k.target){const z=k.target,E=f.value,O=!!z.closest(".cstu-modal-content");if(E!==z&&!E.contains(z)&&!O){if(d.value)return;d.value=!0;try{const D=v(E);D.length>0?D[0].focus():E.focus()}finally{setTimeout(()=>{d.value=!1},0)}}}}function v(k){return Array.from(k.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'))}return e.watch(()=>n.modelValue,k=>{k!==i.value&&(k?u():C())}),e.onMounted(()=>{Mo(n.id,{show:u,hide:C,toggle:x}),document.addEventListener("keydown",w),document.addEventListener("focusin",N),n.modelValue&&(u(),i.value&&e.nextTick(()=>{setTimeout(()=>{const k=document.getElementById(n.id);let z=null;k&&k.parentNode&&(z=k.parentNode.querySelector(".cstu-modal-backdrop")),k&&window.getComputedStyle(k).display==="none"&&(k.style.display="block"),z&&window.getComputedStyle(z).display==="none"&&(z.style.display="block")},50)}))}),e.onBeforeUnmount(()=>{Lo(n.id),document.removeEventListener("keydown",w),document.removeEventListener("focusin",N),i.value&&(i.value=!1,c("update:modelValue",!1))}),s({hide:C,show:u,close:B,toggle:x}),(k,z)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body",disabled:n.static||n.teleport===!1},[e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[i.value&&t.backdrop!==!1?(e.openBlock(),e.createElementBlock("div",{key:0,class:"cstu-modal-backdrop",style:e.normalizeStyle({zIndex:m.value-10})},null,4)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[i.value?(e.openBlock(),e.createElementBlock("div",{key:0,id:n.id,class:e.normalizeClass(["cstu-modal",[{"cstu-modal-static":n.static,"cstu-modal-scrollable":n.scrollable},n.modalClass]]),tabindex:"-1",role:"dialog","aria-modal":"true",style:e.normalizeStyle({zIndex:m.value}),"aria-labelledby":!t.hideHeader&&t.title?`modal-title-${n.id}`:void 0,onClick:y,onMousedown:z[5]||(z[5]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:e.normalizeClass(["cstu-modal-dialog",t.dialogClass,{"cstu-modal-fullscreen":t.fullscreen,"cstu-modal-dialog-centered":t.centered&&!t.fullscreen,"cstu-modal-dialog-scrollable":t.scrollable,[`cstu-modal-${t.size}`]:t.size&&!t.fullscreen}]),onClick:z[4]||(z[4]=e.withModifiers(E=>E.target===E.currentTarget&&E.stopPropagation(),["stop"]))},[z[7]||(z[7]=e.createElementVNode("span",{tabindex:"0"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["cstu-modal-content",t.contentClass,{"cstu-modal-content-fullscreen":t.fullscreen},h.value]),tabindex:"-1",ref_key:"modalElement",ref:f,"aria-label":t.ariaLabel,onClick:z[3]||(z[3]=E=>E.target===E.currentTarget&&E.stopPropagation())},[t.hideHeader?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("header",{key:0,class:e.normalizeClass(["cstu-modal-header",t.headerClass,{"show-divider":t.showHeaderDivider||t.showDividers}])},[e.renderSlot(k.$slots,"modal-title",{},()=>[e.createElementVNode("h5",{id:`modal-title-${n.id}`,class:e.normalizeClass([n.titleClass||"cstu-modal-title",{"sr-only":t.titleSrOnly}])},e.toDisplayString(t.title),11,Ro)]),t.hideHeaderClose?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,type:"button","aria-label":t.closeTitle,class:"cstu-close",onClick:z[0]||(z[0]=E=>B("headerClose"))},z[6]||(z[6]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"cstu-size-6"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"})],-1)]),8,jo))],2)),e.createElementVNode("div",{class:e.normalizeClass(["cstu-modal-body",t.bodyClass,{"cstu-modal-body-scrollable":t.scrollable}])},[e.renderSlot(k.$slots,"default",{},()=>[t.content?(e.openBlock(),e.createElementBlock("div",Fo,e.toDisplayString(t.content),1)):e.createCommentVNode("",!0)])],2),t.hideFooter?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("footer",{key:1,class:e.normalizeClass(["cstu-modal-footer",t.footerClass,{"show-divider":t.showFooterDivider||t.showDividers}])},[e.renderSlot(k.$slots,"modal-footer",{},()=>[t.okOnly?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(L,{key:0,variant:t.cancelVariant,color:t.cancelColor,disabled:t.cancelDisabled||t.busy,onClick:z[1]||(z[1]=E=>B("cancel"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.cancelTitle),1)]),_:1},8,["variant","color","disabled"])),e.createVNode(L,{variant:t.okVariant,color:t.okColor,disabled:t.okDisabled||t.busy,loading:t.busy,onClick:z[2]||(z[2]=E=>B("ok"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.okTitle),1)]),_:1},8,["variant","color","disabled","loading"])])],2))],10,Io),z[8]||(z[8]=e.createElementVNode("span",{tabindex:"0"},null,-1))],2)],46,Ao)):e.createCommentVNode("",!0)]),_:3})],8,["disabled"]))}}),wn="",Ho={mounted(t,s){const o=typeof s.value=="string"?s.value:Object.keys(s.modifiers)[0];if(!o){console.warn("v-cstu-modal directive requires a modal ID");return}t.addEventListener("click",()=>{yt.show(o)}),t.tagName!=="BUTTON"&&(t.setAttribute("role","button"),t.addEventListener("keydown",l=>{(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),yt.show(o))}),t.hasAttribute("tabindex")||t.setAttribute("tabindex","0"))}},qo={install:t=>{t.directive("cstu-modal",Ho)}},Go=["primary","secondary","success","warning","info"];function xt(t,s=Go){if(!t||!s||s.length===0)return"primary";let o=0;for(let n=0;n<t.length;n+=1)o=t.charCodeAt(n)+((o<<5)-o);const l=Math.abs(o)%s.length;return s[l]}function wt(t){return!t||typeof t!="string"?"":t.trim().split(" ").slice(0,2).map(s=>s.charAt(0).toUpperCase()).join("")}const Zo=["src","alt"],Ko=["title"],Uo={key:1,"data-avatar-placeholder-icon":"true",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Ct=e.defineComponent({__name:"Avatar",props:{size:{default:"md"},radius:{default:"full"},color:{default:"primary"},gradient:{},src:{default:null},alt:{},imageProps:{},children:{},autoContrast:{type:Boolean,default:!0},name:{},allowedInitialsColors:{},variant:{default:"light"},component:{default:"div"},hover:{type:Boolean,default:!1},customClasses:{default:""}},setup(t){const s=t,o=e.ref(!s.src);e.watch(()=>s.src,p=>{o.value=!p},{immediate:!0});const l=p=>p?["primary","secondary","success","warning","danger","info","dark","light","initials"].includes(p):!0,n=e.computed(()=>s.name?wt(s.name):""),c=e.computed(()=>{const p={sm:"w-5 h-5 text-xs",md:"w-6 h-6 text-xs",lg:"w-[30px] h-[30px] text-sm",xl:"w-[32px] h-[32px] text-sm","2xl":"w-[34px] h-[34px] text-base","3xl":"w-[36px] h-[36px] text-base","4xl":"w-[38px] h-[38px] text-lg","5xl":"w-[52px] h-[52px] text-xl"};return typeof s.size=="string"?p[s.size]||p.md:typeof s.size=="number"?`w-[${s.size}px] h-[${s.size}px]`:p.md}),i=e.computed(()=>J(s.radius)),a=e.computed(()=>{if(s.src&&!o.value||!l(s.color)&&s.color!=="initials")return"";if(s.color==="initials"&&s.name){const h=xt(s.name,s.allowedInitialsColors||["primary","secondary","success","warning","info"]);return h?T(h,"filled",{}):T("primary","filled",{})}const p=s.variant==="transparent"?"default":s.variant==="gradient"?"filled":s.variant,m=s.color&&s.color!=="initials"?s.color:"primary",g=T(m,p,{});return s.variant==="transparent"?"bg-transparent":g}),f=e.computed(()=>!l(s.color)&&s.color!=="initials"?"":s.variant==="transparent"?"bg-transparent":s.variant==="gradient"&&s.gradient?`bg-gradient-to-r from-${s.gradient.from} to-${s.gradient.to}`:Fe(s.variant)),r=e.computed(()=>{if(s.src&&!o.value||l(s.color)||s.color==="initials")return{};const p={};switch(s.variant){case"filled":p.backgroundColor=s.color,s.autoContrast&&(p.color="white");break;case"light":p.backgroundColor=`${s.color}20`,p.color=s.color;break;case"outline":p.backgroundColor="transparent",p.color=s.color,p.border=`1px solid ${s.color}`;break;case"transparent":p.backgroundColor="transparent",p.color=s.color;break}return p}),d=p=>{var m;o.value=!0,(m=s.imageProps)!=null&&m.onError&&s.imageProps.onError(p)};return(p,m)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p.component||"div"),{class:e.normalizeClass(["avatar",c.value,i.value,!o.value&&p.src?"":a.value,!o.value&&p.src?"":f.value,{"avatar--with-image":!o.value&&p.src},{"hover:opacity-80 transition-opacity":p.hover},p.customClasses]),style:e.normalizeStyle(r.value)},{default:e.withCtx(()=>[!o.value&&p.src?(e.openBlock(),e.createElementBlock("img",e.mergeProps({key:0,class:"avatar__image",src:p.src,alt:p.alt},p.imageProps,{onError:d}),null,16,Zo)):(e.openBlock(),e.createElementBlock("span",{key:1,class:"avatar__placeholder",title:p.alt},[e.renderSlot(p.$slots,"default",{},()=>[p.name?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(n.value),1)],64)):(e.openBlock(),e.createElementBlock("svg",Uo,m[0]||(m[0]=[e.createElementVNode("path",{d:"M0.877014 7.49988C0.877014 3.84219 3.84216 0.877045 7.49985 0.877045C11.1575 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1575 14.1227 7.49985 14.1227C3.84216 14.1227 0.877014 11.1575 0.877014 7.49988ZM7.49985 1.82704C4.36683 1.82704 1.82701 4.36686 1.82701 7.49988C1.82701 8.97196 2.38774 10.3131 3.30727 11.3213C4.19074 9.94119 5.73818 9.02499 7.50023 9.02499C9.26206 9.02499 10.8093 9.94097 11.6929 11.3208C12.6121 10.3127 13.1727 8.97172 13.1727 7.49988C13.1727 4.36686 10.6328 1.82704 7.49985 1.82704ZM10.9818 11.9787C10.2839 10.7795 8.9857 9.97499 7.50023 9.97499C6.01458 9.97499 4.71624 10.7797 4.01845 11.9791C4.97952 12.7272 6.18765 13.1727 7.49985 13.1727C8.81227 13.1727 10.0206 12.727 10.9818 11.9787ZM5.14999 6.50487C5.14999 5.207 6.20212 4.15487 7.49999 4.15487C8.79786 4.15487 9.84999 5.207 9.84999 6.50487C9.84999 7.80274 8.79786 8.85487 7.49999 8.85487C6.20212 8.85487 5.14999 7.80274 5.14999 6.50487ZM7.49999 5.10487C6.72679 5.10487 6.09999 5.73167 6.09999 6.50487C6.09999 7.27807 6.72679 7.90487 7.49999 7.90487C8.27319 7.90487 8.89999 7.27807 8.89999 6.50487C8.89999 5.73167 8.27319 5.10487 7.49999 5.10487Z",fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd"},null,-1)])))])],8,Ko))]),_:3},8,["class","style"]))}}),Cn="",Yo=e.defineComponent({__name:"AvatarGroup",props:{spacing:{default:"sm"},gap:{default:"none"},outlineWidth:{default:"normal"},outlineColor:{default:"white"},outlineOffset:{default:"small"},customClasses:{default:""},max:{},hover:{type:Boolean,default:!1}},setup(t){const s=t,o=e.computed(()=>{if(typeof s.spacing=="number")return`${s.spacing}px`;const r={xs:"-1rem",sm:"-0.75rem",md:"-0.5rem",lg:"-0.25rem",xl:"0"};return r[s.spacing]||r.sm}),l=e.computed(()=>{if(typeof s.gap=="number")return`${s.gap}px`;if(typeof s.gap=="string"&&!isNaN(parseFloat(s.gap)))return s.gap;const r={none:"0",xs:"0.25rem",sm:"0.5rem",md:"0.75rem",lg:"1rem"};return r[s.gap]||r.none}),n=e.computed(()=>{if(typeof s.outlineWidth=="number")return`${s.outlineWidth}px`;if(typeof s.outlineWidth=="string"&&!isNaN(parseFloat(s.outlineWidth)))return s.outlineWidth;const r={none:"0",thin:"1px",normal:"2px",medium:"3px",thick:"4px"};return r[s.outlineWidth]||r.normal}),c=e.computed(()=>{if(typeof s.outlineOffset=="number")return`${s.outlineOffset}px`;if(typeof s.outlineOffset=="string"&&!isNaN(parseFloat(s.outlineOffset)))return s.outlineOffset;const r={none:"0",inset:"-2px",small:"1px",medium:"2px",large:"3px"};return r[s.outlineOffset]||r.small}),i=e.computed(()=>typeof s.outlineColor=="string"&&["primary","secondary","success","danger","warning","info","dark","light"].includes(s.outlineColor)?`outline-${s.outlineColor}`:""),a=e.computed(()=>typeof s.outlineColor=="string"&&["primary","secondary","success","danger","warning","info","dark","light"].includes(s.outlineColor)?"var(--color-"+s.outlineColor+")":s.outlineColor),f=e.computed(()=>({"--avatar-group-spacing":o.value,"--avatar-group-gap":l.value,"--avatar-group-outline-width":n.value,"--avatar-group-outline-color":a.value,"--avatar-group-outline-offset":c.value}));return(r,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["avatar-group",r.customClasses,i.value,{"avatar-group--hover":r.hover}]),style:e.normalizeStyle(f.value)},[e.renderSlot(r.$slots,"default",{},void 0,!0)],6))}}),kn="",kt=Ze(Yo,[["__scopeId","data-v-f582d4fb"]]);Ct.Group=kt;const Ce=e.defineComponent({__name:"Tabs",props:{value:{type:String,default:void 0},defaultValue:{type:String,default:"first"},orientation:{type:String,default:"horizontal"},placement:{type:String,default:void 0},variant:{type:String,default:"text"}},emits:["change"],setup(t,{emit:s}){const o=t,l=e.computed(()=>o.placement?o.placement:o.orientation==="horizontal"?"top":"left"),n=e.computed(()=>o.orientation),c=e.computed(()=>o.variant),i=s,a=e.ref(o.value!==void 0?o.value:o.defaultValue);e.watch(()=>o.value,r=>{r!==void 0&&(a.value=r)});const f=r=>{o.value!==void 0?i("change",r):a.value=r};return e.provide("activeTab",a),e.provide("setActiveTab",f),e.provide("tabsOrientation",n),e.provide("tabsPlacement",l),(r,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cstu-tabs",`cstu-tabs-${n.value}`,`cstu-tabs-placement-${l.value}`,`cstu-tabs-variant-${c.value}`])},[e.renderSlot(r.$slots,"default")],2))}}),Bn="",Bt=e.defineComponent({__name:"TabsList",props:{justify:{type:String,default:"flex-start"},divider:{type:Boolean,default:!1}},setup(t){const s=t,o=e.inject("tabsOrientation",e.ref("horizontal")),l=e.inject("tabsPlacement",e.ref("top")),n=e.computed(()=>["tabs-list",`tabs-list-${o.value}`,`tabs-list-placement-${l.value}`,s.divider?"tabs-list-with-divider":""]),c=a=>{if(["space-between","space-around","space-evenly"].includes(a))return a;switch(a){case"flex-start":return"flex-start";case"flex-end":return"flex-end";case"center":return"center";default:return"flex-start"}},i=e.computed(()=>o.value==="horizontal"?{justifyContent:s.justify}:{justifyContent:c(s.justify)});return(a,f)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(n.value),style:e.normalizeStyle(i.value)},[e.renderSlot(a.$slots,"default")],6))}}),zn="",zt=e.defineComponent({__name:"TabsTab",props:{value:{type:String,required:!0},color:{type:String,default:"primary"},variant:{type:String,default:"text"},size:{type:String,default:"md"},radius:{type:String,default:"md"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},fullWidth:{type:Boolean,default:!1}},setup(t){const s=t,o=e.inject("activeTab",e.ref("")),l=e.inject("setActiveTab",()=>{}),n=e.inject("tabsOrientation",e.ref("horizontal")),c=e.inject("tabsPlacement",e.ref("top")),i=e.computed(()=>o.value),a=e.computed(()=>n.value),f=e.computed(()=>c.value),r=e.computed(()=>i.value===s.value),d=e.computed(()=>a.value==="vertical"),p=e.computed(()=>s.fullWidth&&a.value==="horizontal"),m=()=>{!s.disabled&&!s.loading&&l(s.value)};return(g,h)=>(e.openBlock(),e.createBlock(e.unref(L),{class:e.normalizeClass(["tabs-tab",r.value?"tabs-tab-active":"tabs-tab-inactive",`tabs-tab-${s.variant}`,s.color?`tabs-tab-color-${s.color}`:"",`tabs-tab-orientation-${a.value}`,`tabs-tab-placement-${f.value}`,{"tabs-tab-full-width":p.value}]),disabled:s.disabled,loading:s.loading,color:r.value?s.color:"secondary",variant:r.value?s.variant:"subtle",size:s.size,radius:s.variant==="text"?"none":s.radius,"full-width":d.value,onClick:m},e.createSlots({default:e.withCtx(()=>[e.renderSlot(g.$slots,"default")]),_:2},[g.$slots.leftSection?{name:"leftSection",fn:e.withCtx(()=>[e.renderSlot(g.$slots,"leftSection")]),key:"0"}:void 0,g.$slots.rightSection?{name:"rightSection",fn:e.withCtx(()=>[e.renderSlot(g.$slots,"rightSection")]),key:"1"}:void 0]),1032,["class","disabled","loading","color","variant","size","radius","full-width"]))}}),$n="",$t=e.defineComponent({__name:"TabsPanel",props:{value:{type:String,required:!0}},setup(t){const s=t,o=e.inject("activeTab",e.ref("")),l=e.inject("tabsOrientation",e.ref("horizontal")),n=e.inject("tabsPlacement",e.ref("top")),c=e.computed(()=>o.value===s.value),i=e.computed(()=>["tabs-panel",c.value?"tabs-panel-active":"tabs-panel-inactive",`tabs-panel-${l.value}`,`tabs-panel-placement-${n.value}`]);return(a,f)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(i.value)},[e.renderSlot(a.$slots,"default")],2)),[[e.vShow,e.unref(o)===s.value]])}}),Vn="";Ce.List=Bt,Ce.Tab=zt,Ce.Panel=$t;const Xo={key:2,class:"cstu-flex cstu-items-center cstu-gap-2"},Jo=e.defineComponent({__name:"Pagination",props:{modelValue:{default:1},total:{},siblings:{default:1},boundaries:{default:1},variant:{default:"filled"},color:{default:"primary"},size:{default:"md"},disabled:{type:Boolean,default:!1},withControls:{type:Boolean,default:!0},withEdges:{type:Boolean,default:!1},withPages:{type:Boolean,default:!0},class:{}},emits:["update:modelValue"],setup(t,{emit:s}){const o=t,l=s,n=e.ref(o.modelValue);e.watch(()=>o.modelValue,g=>{n.value=g});const c=e.computed(()=>n.value===1),i=e.computed(()=>n.value===o.total),a=e.computed(()=>{switch(o.size){case"xs":return"cstu-!h-[30px] cstu-!w-[30px] cstu-min-w-[30px] !cstu-p-0";case"sm":return"cstu-!h-[36px] cstu-!w-[36px] cstu-min-w-[36px] !cstu-p-0";case"md":return"cstu-!h-[40px] cstu-!w-[40px] cstu-min-w-[40px] !cstu-p-0";case"lg":return"cstu-!h-[45px] cstu-!w-[45px] cstu-min-w-[45px] !cstu-p-0";case"xl":return"cstu-!h-[50px] cstu-!w-[50px] cstu-min-w-[50px] !cstu-p-0";default:return"cstu-!h-[40px] cstu-!w-[40px] cstu-min-w-[40px] !cstu-p-0"}}),f=e.computed(()=>["cstu-flex cstu-items-center cstu-justify-center",p(o.size)]),r=e.computed(()=>{const g=[],h=o.total;if(o.siblings*2+3+o.boundaries*2>=h)return Array.from({length:h},(w,S)=>S+1);const u=Math.max(n.value-o.siblings,o.boundaries+1),C=Math.min(n.value+o.siblings,h-o.boundaries),x=u>o.boundaries+2,B=C<h-(o.boundaries+1),y=new Set;for(let w=1;w<=o.boundaries;w++)g.push(w),y.add(w);if(x)g.push("dots");else if(!x&&u>o.boundaries)for(let w=o.boundaries+1;w<u;w++)y.has(w)||(g.push(w),y.add(w));for(let w=u;w<=C;w++)y.has(w)||(g.push(w),y.add(w));if(B)g.push("dots");else if(!B&&C<h-o.boundaries)for(let w=C+1;w<h-o.boundaries+1;w++)y.has(w)||(g.push(w),y.add(w));for(let w=h-o.boundaries+1;w<=h;w++)y.has(w)||(g.push(w),y.add(w));return g}),d=g=>{g<1||g>o.total||o.disabled||(n.value=g,l("update:modelValue",g))};function p(g){const h={xs:"cstu-h-6 cstu-w-6 cstu-text-xs",sm:"cstu-h-7 cstu-w-7 cstu-text-sm",md:"cstu-h-8 cstu-w-8 cstu-text-sm",lg:"cstu-h-9 cstu-w-9 cstu-text-base",xl:"cstu-h-10 cstu-w-10 cstu-text-base"};return h[g]||h.md}const m=e.computed(()=>o.variant==="filled"?"subtle":"bordered-transparent");return(g,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cstu-flex cstu-items-center cstu-gap-2",[o.class]])},[o.withEdges?(e.openBlock(),e.createBlock(L,{key:0,variant:m.value,color:"light",size:o.size,disabled:c.value||o.disabled,onClick:h[0]||(h[0]=b=>d(1)),"aria-label":"Go to first page",class:e.normalizeClass(a.value)},{default:e.withCtx(()=>h[4]||(h[4]=[e.createElementVNode("span",{class:"cstu-sr-only"},"First page",-1),e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"cstu-h-4 cstu-w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("polyline",{points:"11 17 6 12 11 7"}),e.createElementVNode("polyline",{points:"18 17 13 12 18 7"})],-1)])),_:1},8,["variant","size","disabled","class"])):e.createCommentVNode("",!0),o.withControls?(e.openBlock(),e.createBlock(L,{key:1,variant:m.value,color:"light",size:o.size,disabled:c.value||o.disabled,onClick:h[1]||(h[1]=b=>d(n.value-1)),"aria-label":"Go to previous page",class:e.normalizeClass(a.value)},{default:e.withCtx(()=>h[5]||(h[5]=[e.createElementVNode("span",{class:"cstu-sr-only"},"Previous page",-1),e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"cstu-h-4 cstu-w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("polyline",{points:"15 18 9 12 15 6"})],-1)])),_:1},8,["variant","size","disabled","class"])):e.createCommentVNode("",!0),o.withPages?(e.openBlock(),e.createElementBlock("div",Xo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(b,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:u},[b!=="dots"?(e.openBlock(),e.createBlock(L,{key:0,variant:b===n.value?"filled":m.value,color:b===n.value?o.color:"light",size:o.size,disabled:o.disabled,onClick:C=>d(Number(b)),"aria-current":b===n.value?"page":void 0,"aria-label":`Page ${b}`,class:e.normalizeClass(a.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(b),1)]),_:2},1032,["variant","color","size","disabled","onClick","aria-current","aria-label","class"])):(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(["pagination-dots",[f.value,a.value]])},h[6]||(h[6]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"cstu-h-4 cstu-w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("circle",{cx:"12",cy:"12",r:"1"}),e.createElementVNode("circle",{cx:"19",cy:"12",r:"1"}),e.createElementVNode("circle",{cx:"5",cy:"12",r:"1"})],-1)]),2))],64))),128))])):e.createCommentVNode("",!0),o.withControls?(e.openBlock(),e.createBlock(L,{key:3,variant:m.value,color:"light",size:o.size,disabled:i.value||o.disabled,onClick:h[2]||(h[2]=b=>d(n.value+1)),"aria-label":"Go to next page",class:e.normalizeClass(a.value)},{default:e.withCtx(()=>h[7]||(h[7]=[e.createElementVNode("span",{class:"cstu-sr-only"},"Next page",-1),e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"cstu-h-4 cstu-w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("polyline",{points:"9 18 15 12 9 6"})],-1)])),_:1},8,["variant","size","disabled","class"])):e.createCommentVNode("",!0),o.withEdges?(e.openBlock(),e.createBlock(L,{key:4,variant:m.value,color:"light",size:o.size,disabled:i.value||o.disabled,onClick:h[3]||(h[3]=b=>d(o.total)),"aria-label":"Go to last page",class:e.normalizeClass(a.value)},{default:e.withCtx(()=>h[8]||(h[8]=[e.createElementVNode("span",{class:"cstu-sr-only"},"Last page",-1),e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"cstu-h-4 cstu-w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("polyline",{points:"13 17 18 12 13 7"}),e.createElementVNode("polyline",{points:"6 17 11 12 6 7"})],-1)])),_:1},8,["variant","size","disabled","class"])):e.createCommentVNode("",!0)],2))}}),Qo={},_o={key:0,class:"badge-section mr-2"},en={key:1,class:"badge-section ml-2"},tn=e.defineComponent({__name:"Badge",props:{variant:{default:"filled"},color:{default:"primary"},textClass:{},size:{default:"md"},radius:{default:"xl"},circle:{type:Boolean,default:!1},fullWidth:{type:Boolean,default:!1},autoContrast:{type:Boolean,default:!0},gradient:{},leftSection:{},rightSection:{},component:{}},setup(t){const s=t,o=r=>r?["primary","secondary","success","warning","danger","info","dark","light"].includes(r):!0,l=r=>{if(!r)return"cstu-bg-gradient-to-r";const d=(r%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":d>=292.5&&d<337.5?"cstu-bg-gradient-to-br":"cstu-bg-gradient-to-r"},n=e.computed(()=>{const r={xs:"h-5 w-5 flex items-center justify-center p-0 overflow-hidden text-center",sm:"h-6 w-6 flex items-center justify-center p-0 overflow-hidden text-center",md:"h-7 w-7 flex items-center justify-center p-0 overflow-hidden text-center",lg:"h-8 w-8 flex items-center justify-center p-0 overflow-hidden text-center",xl:"h-9 w-9 flex items-center justify-center p-0 overflow-hidden text-center"};return r[s.size]||r.md}),c=e.computed(()=>{if(s.variant!=="gradient"||!s.gradient)return"";const r=l(s.gradient.deg),d=s.gradient.from||"blue",p=s.gradient.to||d;return`${r} cstu-from-${d}-500 cstu-to-${p}-600 text-white`}),i=e.computed(()=>{const r={filled:`${T(s.color,"filled")} ${s.autoContrast?"text-white dark:text-white":""}`,light:`${T(s.color,"light")}`,outline:`${T(s.color,"outline")}`,transparent:`${T(s.color,"text")}`,gradient:c.value};return r[s.variant]||r.filled}),a=e.computed(()=>{const r="inline-flex items-center justify-center font-medium";if(s.variant==="gradient"&&s.gradient){const g=l(s.gradient.deg),h=s.gradient.from||"blue",b=s.gradient.to||h,u=`${g} cstu-from-${h}-500 cstu-to-${b}-600 ${s.autoContrast?"text-white":""}`;return[r,u,s.circle?n.value:R(s.size,"badge"),s.circle?"rounded-full":J(s.radius),s.fullWidth?"w-full":""].filter(Boolean).join(" ")}const d=s.circle?n.value:R(s.size,"badge"),p=s.circle?"rounded-full":J(s.radius),m=s.fullWidth?"w-full":"";return[r,i.value,d,p,m].filter(Boolean).join(" ")}),f=e.computed(()=>{const r={};if(!o(s.color))switch(s.variant){case"filled":r.backgroundColor=s.color,r.color="cstu-bg-white";break;case"light":r.backgroundColor=`${s.color}20`,r.color=s.color;break;case"outline":r.backgroundColor="transparent",r.color=s.color,r.border=`1px solid ${s.color}`;break}return r});return(r,d)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.component||"div"),e.mergeProps({class:a.value,style:f.value},r.$attrs),{default:e.withCtx(()=>[r.leftSection?(e.openBlock(),e.createElementBlock("span",_o,[typeof r.leftSection=="string"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(r.leftSection),1)],64)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.leftSection),{key:1}))])):e.createCommentVNode("",!0),e.createElementVNode("span",{class:e.normalizeClass([[{"overflow-hidden max-w-full":r.circle},r.textClass],"badge-label"])},[e.renderSlot(r.$slots,"default")],2),r.rightSection?(e.openBlock(),e.createElementBlock("span",en,[typeof r.rightSection=="string"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(r.rightSection),1)],64)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.rightSection),{key:1}))])):e.createCommentVNode("",!0)]),_:3},16,["class","style"]))}}),Sn="",sn={mounted(t,s){t._clickOutside=o=>{const l=o.target;if(!(t===l||t.contains(l))){const n=o.target,c=n.tagName&&n.tagName.toLowerCase()==="input",i=n.closest(".cstu-dropdown-menu");!c&&!i&&s.value(o)}},document.addEventListener("click",t._clickOutside,!0),document.addEventListener("touchstart",t._clickOutside,!0)},unmounted(t){t._clickOutside&&(document.removeEventListener("click",t._clickOutside,!0),document.removeEventListener("touchstart",t._clickOutside,!0))}},on=["data-active"],nn=e.defineComponent({__name:"Dropdown",props:{size:{default:"md"},radius:{default:"md"},open:{type:Boolean,default:!1},buttonClasses:{default:""},dropdownClasses:{default:""},placement:{default:"auto"},disabled:{type:Boolean,default:!1},containerClasses:{default:""},showArrow:{type:Boolean,default:!0},disabledText:{default:""},parentPositionRelative:{type:Boolean,default:!0},offsetDistance:{default:8},unstyled:{type:Boolean,default:!1},matchWidth:{type:Boolean,default:!1},zIndex:{default:50}},emits:["close","update:open"],setup(t,{emit:s}){const o=t,l=s,n=e.ref(o.open),c=e.ref(0),i=e.ref(null),a=e.ref(null);e.onMounted(()=>{e.watch(n,y=>{y&&e.nextTick(()=>{var S;const w=(S=i.value)==null?void 0:S.querySelectorAll("input");w&&w.length&&w.forEach(V=>{V.addEventListener("click",f,{capture:!0}),V.addEventListener("mousedown",f,{capture:!0}),V.addEventListener("focus",f,{capture:!0})})})})});function f(y){y.stopPropagation();const w=y.target;setTimeout(()=>{w.focus()},0)}const r=e.computed(()=>{switch(o.placement){case"top":return"top";case"bottom":return"bottom";case"left":return"left";case"right":return"right";case"auto":return;case"top-start":return"top-start";case"bottom-start":return"bottom-start";case"top-end":return"top-end";case"bottom-end":return"bottom-end";case"left-start":return"left-start";case"right-start":return"right-start";default:return"bottom-start"}}),d=e.computed(()=>{const y=[it(o.offsetDistance),ct({padding:8})];return o.placement==="auto"?y.push(bo({padding:8})):y.push(dt({fallbackPlacements:["top-start","bottom-start","left-start","right-start"],padding:8})),y}),{floatingStyles:p,update:m}=pt(a,i,{placement:r.value,middleware:d.value,whileElementsMounted:yo,strategy:"fixed"}),g=e.inject("parentDropdownOpen",null);e.provide("parentDropdownOpen",n),e.watch(()=>o.open,y=>{y!==n.value&&(n.value=y)}),e.watch(()=>g==null?void 0:g.value,y=>{y===!1&&(n.value=!1)},{immediate:!0}),e.watch(n,y=>{y&&e.nextTick(()=>{m()})});const h=e.computed(()=>R(o.size,"dropdown")),b=e.computed(()=>J(o.radius));function u(y){var N;if(!n.value)return;if(!y){B();return}const w=y.target,S=w.closest(".cstu-dropdown-menu"),V=(N=a.value)==null?void 0:N.contains(w);S||V||o.disabled||B()}e.provide("dropdownClose",u);function C(){o.disabled||(n.value?(n.value=!1,l("close"),l("update:open",!1)):(n.value=!0,l("update:open",!0),setTimeout(()=>{var w,S;(w=i.value)==null||w.focus();const y=(S=i.value)==null?void 0:S.querySelector(".active");y==null||y.scrollIntoView({behavior:"smooth"})},100)))}function x(y){i.value&&(y.key==="ArrowUp"&&c.value>0?(y.preventDefault(),c.value--):y.key==="ArrowDown"&&c.value<i.value.children.length-1&&(y.preventDefault(),c.value++))}function B(y=!1){n.value=!1,!y&&(l("close"),l("update:open",!1))}return(y,w)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cstu-inline-block cstu-text-left cstu-dropdown-container",[{"cstu-relative":y.parentPositionRelative},{"cstu-grayscale cstu-filter cstu-cursor-not-allowed cstu-opacity-70":y.disabled},y.containerClasses]])},[e.createElementVNode("button",{ref_key:"buttonRef",ref:a,type:"button",class:e.normalizeClass([!y.unstyled&&"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",!y.unstyled&&b.value,!y.unstyled&&h.value,{"cstu-pointer-events-none":y.disabled},y.buttonClasses||!y.unstyled&&"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:C},[e.renderSlot(y.$slots,"icon",{closeDropdown:B}),e.renderSlot(y.$slots,"selected",{closeDropdown:B},()=>[w[2]||(w[2]=e.createTextVNode("Select"))]),y.showArrow?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["cstu-transition cstu-leading-none",{"cstu-rotate-180":n.value}])},[e.renderSlot(y.$slots,"arrow",{closeDropdown:B},()=>[w[3]||(w[3]=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(()=>{var S;return[(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.withDirectives(e.createElementVNode("div",{ref_key:"dropdownList",ref:i,style:e.normalizeStyle([e.unref(p),o.matchWidth?{width:((S=a.value)==null?void 0:S.offsetWidth)+"px"}:{},{zIndex:o.zIndex}]),class:e.normalizeClass(["cstu-dropdown-menu cstu-max-h-72 cstu-px-[12px] cstu-py-[13px] cstu-min-w-[225px] cstu-overflow-y-auto cstu-origin-top-left cstu-rounded-lg cstu-shadow-dropdown cstu-bg-white focus:cstu-outline-none",[b.value,y.dropdownClasses]]),onClick:w[0]||(w[0]=e.withModifiers(()=>{},["stop"])),onMousedown:w[1]||(w[1]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:"cstu-flex cstu-flex-col cstu-gap-[11px]",role:"menu","aria-orientation":"vertical","aria-labelledby":"menu-button","data-active":c.value,tabindex:"-1",onKeydown:x},[e.renderSlot(y.$slots,"default",{closeDropdown:B})],40,on)],38),[[e.vShow,n.value]])]))]}),_:3})],2)),[[e.unref(sn),u]])}}),ln=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(t,{emit:s}){const o=t,l=s,n=e.inject("dropdownClose",()=>{}),c=e.computed(()=>o.class);function i(){o.disabled||(o.closeOnClick&&n(),l("click"))}return(a,f)=>(e.openBlock(),e.createElementBlock("div",{role:"menuitem",tabindex:"-1",class:e.normalizeClass(["cstu-cursor-pointer hover:cstu-bg-blue-50 active:cstu-bg-blue-50 cstu-rounded-lg",e.unref(We)(o.size),"cstu-py-[5.5px] cstu-pr-[13.5px] cstu-pl-[10.5px]",{"cstu-cursor-not-allowed cstu-bg-gray-100":a.disabled},{"cstu-bg-blue-50":a.selected},c.value]),onClick:i},[e.renderSlot(a.$slots,"default",{selected:a.selected})],2))}}),Vt=e.defineComponent({__name:"ListItem",props:{disabled:{type:Boolean,default:!1},selected:{type:Boolean,default:!1},class:{default:""},selectedClass:{default:""},noColorOnSelected:{type:Boolean,default:!1}},emits:["click"],setup(t,{emit:s}){const o=t,l=s,n=e.computed(()=>o.class);function c(){o.disabled||l("click")}return(i,a)=>(e.openBlock(),e.createElementBlock("div",{role:"listitem",tabindex:"-1",class:e.normalizeClass(["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]:i.selected&&!i.disabled},{"cstu-bg-blue-50":i.selected&&!i.noColorOnSelected&&!i.disabled},n.value]),onClick:c},[e.renderSlot(i.$slots,"default",{selected:i.selected})],2))}}),an=e.defineComponent({__name:"Collapsible",props:{modelValue:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},class:{default:""},hideArrow:{type:Boolean,default:!1},buttonClass:{default:""},selectedClass:{default:""}},emits:["update:modelValue"],setup(t,{emit:s}){const o=t,l=s,n=e.computed(()=>o.modelValue!==void 0),c=e.computed({get:()=>n.value?o.modelValue??!1:i.value,set:r=>{n.value?l("update:modelValue",r):i.value=r}}),i=e.ref(o.defaultOpen),a=e.computed(()=>o.class);function f(){o.disabled||(c.value=!c.value)}return(r,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["space-y-1 cstu-select-none",a.value])},[e.createVNode(Vt,{role:"button",disabled:r.disabled,class:e.normalizeClass(["cstu-flex cstu-items-center cstu-justify-between",r.buttonClass].join(" ")),"selected-class":r.selectedClass,selected:c.value,"no-color-on-selected":!0,onClick:f},{default:e.withCtx(()=>[e.renderSlot(r.$slots,"trigger",{open:c.value}),r.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(["cstu-transform cstu-transition-transform cstu-duration-200",{"cstu-rotate-180":!c.value}])},d[0]||(d[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":"cstu-transition cstu-duration-100 cstu-ease-out","enter-from-class":"cstu-transform cstu-scale-95 cstu-opacity-0","enter-to-class":"cstu-transform cstu-scale-100 cstu-opacity-100","leave-active-class":"cstu-transition cstu-duration-75 cstu-ease-in","leave-from-class":"cstu-transform cstu-scale-100 cstu-opacity-100","leave-to-class":"cstu-transform cstu-scale-95 cstu-opacity-0"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",null,[e.renderSlot(r.$slots,"default")],512),[[e.vShow,c.value]])]),_:3})],2))}}),rn={xs:"px-2.5 py-1.5 text-xs",sm:"px-3 py-2 text-sm",md:"px-4 py-2 text-base",lg:"px-4 py-2.5 text-lg",xl:"px-5 py-3 text-xl"},ke={none:"rounded-none",xs:"rounded",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",xl:"rounded-2xl",full:"rounded-full"},cn={primary:{base:"blue",text:"text-blue-600",bg:"bg-blue-600",hover:"hover:bg-blue-700",border:"border-blue-600",ring:"ring-blue-500"},secondary:{base:"gray",text:"text-gray-600",bg:"bg-gray-600",hover:"hover:bg-gray-700",border:"border-gray-600",ring:"ring-gray-500"},success:{base:"green",text:"text-green-600",bg:"bg-green-600",hover:"hover:bg-green-700",border:"border-green-600",ring:"ring-green-500"},warning:{base:"yellow",text:"text-yellow-600",bg:"bg-yellow-600",hover:"hover:bg-yellow-700",border:"border-yellow-600",ring:"ring-yellow-500"},danger:{base:"red",text:"text-red-600",bg:"bg-red-600",hover:"hover:bg-red-700",border:"border-red-600",ring:"ring-red-500"},info:{base:"sky",text:"text-sky-600",bg:"bg-sky-600",hover:"hover:bg-sky-700",border:"border-sky-600",ring:"ring-sky-500"},dark:{base:"dark",text:"text-gray-200",bg:"bg-gray-900",hover:"hover:bg-gray-800",border:"border-gray-900",ring:"ring-gray-700"},light:{base:"light",text:"text-gray-600",bg:"bg-gray-100",hover:"hover:bg-gray-200",border:"border-gray-100",ring:"ring-gray-300"}},dn=["onClick","data-value"],un=e.defineComponent({name:"SegmentedControl",__name:"SegmentedControl",props:{modelValue:{default:""},data:{},size:{default:"md"},radius:{default:"md"},color:{default:"primary"},disabled:{type:Boolean,default:!1},fullWidth:{type:Boolean,default:!1},transitionDuration:{default:200},withItemsBorders:{type:Boolean,default:!1},orientation:{default:"horizontal"}},emits:["update:modelValue"],setup(t,{emit:s}){const o=s,l=t,n=e.ref({}),c=e.ref(null),i=e.computed(()=>l.data.map(d=>typeof d=="string"?{value:d,label:d}:d)),a=e.computed(()=>l.orientation==="horizontal"?"cstu-flex-row":"cstu-flex-col"),f=async()=>{if(!l.modelValue)return;await e.nextTick();const d=n.value[l.modelValue];if(!d)return;const p=d.getBoundingClientRect(),m=d.parentElement.getBoundingClientRect();c.value={left:p.left-m.left,top:p.top-m.top,width:p.width,height:p.height}},r=d=>{o("update:modelValue",d)};return e.watch(()=>l.modelValue,f),e.watch(()=>l.orientation,f),e.onMounted(()=>{f(),window.addEventListener("resize",f)}),e.onUnmounted(()=>{window.removeEventListener("resize",f)}),(d,p)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cstu-relative cstu-inline-flex",a.value,{"cstu-w-full":d.fullWidth,"cstu-opacity-50 cstu-pointer-events-none":d.disabled}]),role:"radiogroup"},[c.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["cstu-absolute cstu-bg-white cstu-rounded-[inherit]",e.unref(ke)[d.radius]]),style:e.normalizeStyle({transform:`translate(${c.value.left}px, ${c.value.top}px)`,width:`${c.value.width}px`,height:`${c.value.height}px`,transition:`transform ${d.transitionDuration}ms ease`,boxShadow:"0 1px 2px 0 rgb(0 0 0 / 0.05)"})},null,6)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["cstu-relative cstu-flex",a.value,e.unref(ke)[d.radius],{"cstu-w-full":d.fullWidth,"cstu-divide-x cstu-divide-gray-200":d.withItemsBorders&&d.orientation==="horizontal","cstu-divide-y cstu-divide-gray-200":d.withItemsBorders&&d.orientation==="vertical"},e.unref(R)(d.size,"segmentedControlContainer"),"cstu-bg-gray-100"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,m=>(e.openBlock(),e.createElementBlock("div",{key:m.value,class:e.normalizeClass(["cstu-relative cstu-flex-1","cstu-transition-all cstu-duration-200",e.unref(Dt)(!!m.disabled),l.modelValue===m.value?"cstu-bg-white cstu-border-gray-500/15":"cstu-border-transparent",e.unref(R)(d.size,"segmentedControl"),"cstu-cursor-pointer","cstu-flex cstu-items-center cstu-justify-center hover:cstu-border-gray-500/15 cstu-border",e.unref(ke)[d.radius]]),onClick:()=>!m.disabled&&r(m.value),"data-value":m.value,ref_for:!0,ref:"el => segmentRefs[option.value] = el"},[e.createElementVNode("span",{class:e.normalizeClass([e.unref(Ve)({size:d.size,disabled:m.disabled}),l.modelValue===m.value?"cstu-text-gray-500":"cstu-text-gray-600","cstu-select-none !cstu-mb-0 !cstu-font-normal cstu-capitalize cstu-whitespace-nowrap"])},e.toDisplayString(m.label),3)],10,dn))),128))],2)],2))}}),En="";$.Alert=Vs,$.Avatar=Ct,$.AvatarGroup=kt,$.Badge=tn,$.Button=L,$.Checkbox=It,$.Chip=cs,$.Collapse=Ss,$.Collapsible=an,$.Dialog=As,$.Dropdown=nn,$.DropdownItem=ln,$.HoverCard=ht,$.HoverCardTarget=je,$.Indicator=ms,$.ListItem=Vt,$.Loader=vs,$.Modal=Wo,$.ModalDirective=qo,$.ModalPlugin=Po,$.Pagination=Jo,$.Progress=Cs,$.Radio=Wt,$.SegmentedControl=un,$.Select=ls,$.Tabs=Ce,$.TabsList=Bt,$.TabsPanel=$t,$.TabsTab=zt,$.TextInput=Jt,$.colorClasses=cn,$.composables=Qo,$.getInitials=wt,$.getInitialsColor=xt,$.hoverCardInjectionKey=Re,$.radiusClasses=ke,$.sizeClasses=rn,$.useHoverCard=gt,$.useModal=Oo,Object.defineProperty($,Symbol.toStringTag,{value:"Module"})});
|