@bobbykim/mcl-forms 0.12.0 → 0.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mcl-forms.js +1109 -2977
- package/dist/mcl-forms.umd.cjs +1 -2
- package/package.json +4 -3
package/dist/mcl-forms.umd.cjs
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('.switch[data-v-784930f6]{width:var(--switch-width);height:var(--switch-height)}.slider[data-v-784930f6]:before{content:"";height:var(--slider-size);width:var(--slider-size);left:var(--gutter-size);bottom:var(--gutter-size)}input:checked+.slider[data-v-784930f6]:before{transform:translate(var(--slider-size))}.options-enter-active[data-v-2695c901],.options-leave-active[data-v-2695c901]{opacity:1;transition:opacity .3s linear,transform .3s linear}.options-enter-from[data-v-2695c901],.options-leave-to[data-v-2695c901]{opacity:0;transform:translateY(-10px)}.options-leave-active[data-v-2695c901]{pointer-events:none}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
-
(function(X,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("@bobbykim/manguito-theme"),require("@vueuse/core")):typeof define=="function"&&define.amd?define(["exports","vue","@bobbykim/manguito-theme","@vueuse/core"],t):(X=typeof globalThis<"u"?globalThis:X||self,t(X.MclForms={},X.Vue,X.ManguitoTheme,X.core))})(this,(function(X,t,L,gn){"use strict";const bn=["id"],hn={class:"text-xs text-danger"},_e=t.defineComponent({__name:"FieldFeedback",props:{id:{},invalid:{type:Boolean,default:!1},text:{default:""}},setup(e){return(r,n)=>e.invalid?(t.openBlock(),t.createElementBlock("div",{key:0,id:e.id,role:"alert",class:"ml-3xs"},[t.renderSlot(r.$slots,"default",{},()=>[t.createElementVNode("span",hn,t.toDisplayString(e.text),1)])],8,bn)):t.createCommentVNode("",!0)}}),Zt=Symbol("mcl-field");let xn=0;const Qe=e=>e!==void 0&&e!==""?e:void 0,Jt=e=>Qe(e)??Qe(t.useId())??`mcl-field-${++xn}`,Qt=(e,r,n)=>t.computed(()=>{const o=[];return e&&o.push(e),n.value&&r!==void 0&&o.push(r),o.length>0?o.join(" "):void 0}),yn=e=>{const r=Jt(e.fieldId),n=t.computed(()=>t.toValue(e.invalid)??!1),o=`${r}-error`,l=e.hasHelpText?`${r}-description`:void 0,i={id:r,name:t.computed(()=>t.toValue(e.name)??r),errorId:o,descriptionId:l,invalid:n,required:t.computed(()=>t.toValue(e.required)??!1),disabled:t.computed(()=>t.toValue(e.disabled)??!1),describedBy:Qt(l,o,n),feedbackOwnedByGroup:e.ownsFeedback,isGroupLabel:e.isGroupLabel};return t.provide(Zt,i),i},Ce=(e,r)=>{const n=t.inject(Zt,null),o=r?.rendersOwnFeedback??!0,l=Jt(void 0),i=Qe(e.id),s=n!==null&&!n.isGroupLabel?Qe(n.id):void 0,c=i??s??l,f=n?.feedbackOwnedByGroup??!1,d=f?n.errorId:`${c}-error`,u=f||o,g=n?.descriptionId,m=t.computed(()=>e.invalid??n?.invalid.value??!1);return{id:c,name:t.computed(()=>e.name??t.toValue(n?.name)),errorId:d,descriptionId:g,invalid:m,required:t.computed(()=>e.required??n?.required.value??!1),disabled:t.computed(()=>e.disabled??n?.disabled.value??!1),describedBy:Qt(g,u?d:void 0,m),feedbackOwnedByGroup:f,isGroupLabel:n?.isGroupLabel??!1}},kn={key:0,class:"m-0 min-w-0 border-0 p-0"},wn={key:0,class:"inline-block"},Cn=["id"],vn={key:1},Tn=["for"],En=["id"],Sn=t.defineComponent({__name:"MclFormGroup",props:{fieldId:{},groupLabel:{type:Boolean,default:!1},label:{},helpText:{},invalidFeedback:{},invalid:{type:Boolean,default:void 0},required:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},textColor:{default:"dark-3"},textSize:{default:"md"},textBold:{type:Boolean,default:!1}},setup(e){const r=e,n=t.useSlots(),o=n["invalid-feedback"]!==void 0,l=r.helpText!==void 0||n.help!==void 0,i=r.invalidFeedback!==void 0||o,s=r.groupLabel,c=yn({fieldId:r.fieldId,invalid:()=>r.invalid,required:()=>r.required,disabled:()=>r.disabled,hasHelpText:l,ownsFeedback:i,isGroupLabel:s}),f=t.computed(()=>{const d=[L.generateClass.textColorVariant({color:r.textColor}),L.generateClass.bodyTextVariant({size:r.textSize})];return r.textBold&&d.push("font-bold"),d.join(" ")});return(d,u)=>t.unref(s)?(t.openBlock(),t.createElementBlock("fieldset",kn,[e.label||d.$slots.label?(t.openBlock(),t.createElementBlock("legend",wn,[t.renderSlot(d.$slots,"label",{},()=>[t.createElementVNode("span",{class:t.normalizeClass(["mb-2xs block",f.value])},t.toDisplayString(e.label),3)])])):t.createCommentVNode("",!0),t.unref(l)?(t.openBlock(),t.createElementBlock("p",{key:1,id:t.unref(c).descriptionId,class:"mb-2xs text-xs"},[t.renderSlot(d.$slots,"help",{},()=>[t.createTextVNode(t.toDisplayString(e.helpText),1)])],8,Cn)):t.createCommentVNode("",!0),t.renderSlot(d.$slots,"default"),t.unref(i)?(t.openBlock(),t.createBlock(_e,{key:2,id:t.unref(c).errorId,invalid:t.unref(c).invalid.value,text:e.invalidFeedback},{default:t.withCtx(()=>[o?t.renderSlot(d.$slots,"invalid-feedback",{key:0}):t.createCommentVNode("",!0)]),_:3},8,["id","invalid","text"])):t.createCommentVNode("",!0)])):(t.openBlock(),t.createElementBlock("div",vn,[e.label||d.$slots.label?(t.openBlock(),t.createElementBlock("label",{key:0,for:t.unref(c).id,class:"inline-block"},[t.renderSlot(d.$slots,"label",{},()=>[t.createElementVNode("span",{class:t.normalizeClass(["mb-2xs block",f.value])},t.toDisplayString(e.label),3)])],8,Tn)):t.createCommentVNode("",!0),t.unref(l)?(t.openBlock(),t.createElementBlock("p",{key:1,id:t.unref(c).descriptionId,class:"mb-2xs text-xs"},[t.renderSlot(d.$slots,"help",{},()=>[t.createTextVNode(t.toDisplayString(e.helpText),1)])],8,En)):t.createCommentVNode("",!0),t.renderSlot(d.$slots,"default"),t.unref(i)?(t.openBlock(),t.createBlock(_e,{key:2,id:t.unref(c).errorId,invalid:t.unref(c).invalid.value,text:e.invalidFeedback},{default:t.withCtx(()=>[o?t.renderSlot(d.$slots,"invalid-feedback",{key:0}):t.createCommentVNode("",!0)]),_:3},8,["id","invalid","text"])):t.createCommentVNode("",!0)]))}}),er=t.defineComponent({__name:"XMark",props:{color:{default:"dark-4"},className:{default:""}},setup(e){const r=e,n=t.computed(()=>[L.generateClass.svgFillColorVariant({color:r.color}),r.className].filter(Boolean).join(" "));return(o,l)=>(t.openBlock(),t.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512","aria-hidden":"true",focusable:"false",class:t.normalizeClass(n.value)},[...l[0]||(l[0]=[t.createElementVNode("path",{d:"M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"},null,-1)])],2))}}),et=e=>t.computed(()=>{const{bgColor:r,textColor:n,borderColor:o,showBorder:l,showShadow:i,rounded:s}=e,c=e.showHighlight??!1,f=[L.generateClass.bgColorVariant({color:r}),L.generateClass.textColorVariant({color:n})];return l&&f.push("border-2",L.generateClass.borderColorVariant({color:o})),c||f.push("focus-visible:ring-4 ring-offset-2 transition-all duration-300 ease-linear",L.generateClass.focusVisibleRingColorVariant({color:o})),i&&f.push("shadow-md"),s&&f.push("rounded-md"),f.join(" ")}),An={class:"my-3xs mr-xs ml-3xs shrink-0"},Rn=["aria-controls","disabled"],Nn=["id","name","accept","required","disabled","aria-invalid","aria-describedby"],On={key:0,class:"my-3xs mr-3xs self-stretch"},_n=["disabled"],Bn=t.defineComponent({__name:"MclInputFile",props:t.mergeModels({id:{},name:{},accept:{default:"image/jpg,image/jpeg,image/png"},buttonText:{default:"Browse File"},buttonTextColor:{default:"dark-3"},buttonColor:{default:"light-4"},showBorder:{type:Boolean,default:!1},borderColor:{default:"light-4"},rounded:{type:Boolean,default:!1},bgColor:{default:"light-1"},textColor:{default:"black"},showShadow:{type:Boolean,default:!0},showClear:{type:Boolean,default:!1},invalidFeedback:{},invalid:{type:Boolean,default:void 0},required:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const r=e,n=t.useModel(e,"modelValue"),o=Ce(r),l=et(r),i=t.ref(),s=t.ref(0),c=()=>{i.value?.click()},f=m=>{const b=m.target.files;n.value=b&&b.length>0?b[0]:null},d=()=>{n.value=null,s.value++},u=t.computed(()=>{const m=[L.generateClass.bgColorVariant({color:r.buttonColor}),L.generateClass.textColorVariant({color:r.buttonTextColor})];return r.rounded&&m.push("rounded-l-md"),m.join(" ")}),g=t.computed(()=>{const m=[L.generateClass.bgColorVariant({color:r.buttonColor})];return r.rounded&&m.push("rounded-r-md"),m.join(" ")});return(m,b)=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",{class:t.normalizeClass(["flex items-center overflow-hidden",t.unref(l)])},[t.createElementVNode("div",An,[t.createElementVNode("button",{type:"button","aria-controls":t.unref(o).id,disabled:t.unref(o).disabled.value,class:t.normalizeClass(["max-w-full px-xs py-2xs transition-all duration-200 ease-linear hover:bg-opacity-70 disabled:cursor-not-allowed disabled:opacity-50",u.value]),onClick:c},t.toDisplayString(e.buttonText),11,Rn)]),(t.openBlock(),t.createElementBlock("input",{id:t.unref(o).id,ref_key:"inputRef",ref:i,key:s.value,type:"file",class:"w-full bg-transparent file:hidden",name:t.unref(o).name.value,accept:e.accept,required:t.unref(o).required.value,disabled:t.unref(o).disabled.value,"aria-invalid":t.unref(o).invalid.value||void 0,"aria-describedby":t.unref(o).describedBy.value,onChange:f},null,40,Nn)),e.showClear?(t.openBlock(),t.createElementBlock("div",On,[t.createElementVNode("button",{type:"button","aria-label":"Clear selected file",disabled:t.unref(o).disabled.value,class:t.normalizeClass(["flex h-full items-center px-xs py-2xs transition-all duration-200 ease-linear hover:bg-opacity-70 disabled:cursor-not-allowed disabled:opacity-50",g.value]),onClick:d},[t.createVNode(er,{color:e.buttonTextColor,"class-name":"h-xs"},null,8,["color"])],10,_n)])):t.createCommentVNode("",!0)],2),t.unref(o).feedbackOwnedByGroup?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(_e,{key:0,id:t.unref(o).errorId,invalid:t.unref(o).invalid.value,text:e.invalidFeedback},{default:t.withCtx(()=>[m.$slots["invalid-feedback"]?t.renderSlot(m.$slots,"invalid-feedback",{key:0}):t.createCommentVNode("",!0)]),_:3},8,["id","invalid","text"]))]))}}),Vn={sm:"h-xs w-xs before:h-2xs before:w-2xs",md:"h-sm w-sm before:h-[12px] before:w-[12px]",lg:"h-md w-md before:h-xs before:w-xs"},Dn={sm:{"--switch-width":"30px","--switch-height":"17px","--slider-size":"13px","--gutter-size":"2px"},md:{"--switch-width":"45px","--switch-height":"25.5px","--slider-size":"19.5px","--gutter-size":"3px"},lg:{"--switch-width":"60px","--switch-height":"34px","--slider-size":"26px","--gutter-size":"4px"}},Ln="rounded-md before:rounded-[3px]",Ct=e=>{const r=t.computed(()=>{const{bgColor:l,borderColor:i,indicatorColor:s,checkedBgColor:c,showShadow:f}=e,d=e.rounded??!1,u=[L.generateClass.bgColorVariant({color:l}),L.generateClass.borderColorVariant({color:i}),L.generateClass.beforeBgColorVariant({color:s}),L.generateClass.peerCheckedBgColorVariant({color:c}),"peer-focus-visible:ring-2 ring-offset-2",L.generateClass.peerFocusVisibleRingColorVariant({color:i})];return f&&u.push("drop-shadow-md"),d&&u.push(e.roundedClass??Ln),u.join(" ")}),n=t.computed(()=>Vn[e.size]),o=t.computed(()=>({...Dn[e.size]}));return{boxClass:r,sizeClass:n,switchVars:o}},In={class:"relative inline-flex"},Mn=["id","name","value","required","disabled","aria-invalid","aria-describedby"],Fn=t.defineComponent({__name:"MclInputRadio",props:t.mergeModels({id:{},name:{},size:{default:"md"},bgColor:{default:"light-1"},checkedBgColor:{default:"success"},indicatorColor:{default:"light-1"},borderColor:{default:"dark-1"},showShadow:{type:Boolean,default:!1},value:{default:""},invalid:{type:Boolean,default:void 0},required:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0}},{modelValue:{default:null},modelModifiers:{}}),emits:t.mergeModels(["change"],["update:modelValue"]),setup(e,{emit:r}){const n=e,o=t.useModel(e,"modelValue"),l=r,i=Ce(n,{rendersOwnFeedback:!1}),{boxClass:s,sizeClass:c}=Ct(n),f=t.computed(()=>i.name.value??i.id),d=u=>{l("change",u)};return(u,g)=>(t.openBlock(),t.createElementBlock("div",In,[t.withDirectives(t.createElementVNode("input",{id:t.unref(i).id,"onUpdate:modelValue":g[0]||(g[0]=m=>o.value=m),type:"radio",class:"peer absolute inset-0 z-10 h-full w-full cursor-pointer appearance-none opacity-0 disabled:cursor-not-allowed",name:f.value,value:e.value,required:t.unref(i).required.value,disabled:t.unref(i).disabled.value,"aria-invalid":t.unref(i).invalid.value||void 0,"aria-describedby":t.unref(i).describedBy.value,onChange:d},null,40,Mn),[[t.vModelRadio,o.value]]),t.createElementVNode("span",{"aria-hidden":"true",class:t.normalizeClass(["relative inline-block rounded-full border transition-colors duration-200 ease-linear peer-disabled:opacity-50 before:absolute before:top-1/2 before:left-1/2 before:-translate-x-1/2 before:-translate-y-1/2 before:rounded-full before:opacity-0 before:transition-opacity before:duration-200 peer-checked:before:opacity-100",[t.unref(s),t.unref(c)]])},null,2)]))}}),zn=["id","name","required","disabled","aria-invalid","aria-describedby"],Pn="rounded-full before:rounded-full",$n=t.defineComponent({__name:"MclInputSwitch",props:t.mergeModels({id:{},name:{},size:{default:"md"},bgColor:{default:"dark-1"},checkedBgColor:{default:"success"},indicatorColor:{default:"light-1"},borderColor:{default:"dark-1"},showShadow:{type:Boolean,default:!1},rounded:{type:Boolean,default:!0},invalid:{type:Boolean,default:void 0},required:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:t.mergeModels(["change"],["update:modelValue"]),setup(e,{emit:r}){const n=e,o=t.useModel(e,"modelValue"),l=r,i=Ce(n,{rendersOwnFeedback:!1}),s={get size(){return n.size},get bgColor(){return n.bgColor},get checkedBgColor(){return n.checkedBgColor},get indicatorColor(){return n.indicatorColor},get borderColor(){return n.borderColor},get showShadow(){return n.showShadow},get rounded(){return n.rounded},roundedClass:Pn},{boxClass:c,switchVars:f}=Ct(s),d=u=>{l("change",u)};return(u,g)=>(t.openBlock(),t.createElementBlock("div",{class:"switch relative",style:t.normalizeStyle(t.unref(f))},[t.withDirectives(t.createElementVNode("input",{id:t.unref(i).id,"onUpdate:modelValue":g[0]||(g[0]=m=>o.value=m),type:"checkbox",role:"switch",class:"peer absolute inset-0 z-10 h-full w-full cursor-pointer appearance-none opacity-0 disabled:cursor-not-allowed",name:t.unref(i).name.value,required:t.unref(i).required.value,disabled:t.unref(i).disabled.value,"aria-invalid":t.unref(i).invalid.value||void 0,"aria-describedby":t.unref(i).describedBy.value,onChange:d},null,40,zn),[[t.vModelCheckbox,o.value]]),t.createElementVNode("span",{"aria-hidden":"true",class:t.normalizeClass(["slider absolute inset-0 transition-all duration-300 peer-disabled:opacity-50 before:absolute before:transition-all before:duration-300",t.unref(c)])},null,2)],4))}}),tr=(e,r)=>{const n=e.__vccOpts||e;for(const[o,l]of r)n[o]=l;return n},Hn=tr($n,[["__scopeId","data-v-784930f6"]]),rr=t.defineComponent({__name:"InputHighlight",props:{color:{default:"primary"},rounded:{type:Boolean,default:!1},offset:{default:1}},setup(e){const r=e,n={1:"-top-1",2.5:"-top-2.5"},o=t.computed(()=>{const l=[L.generateClass.beforeBgColorVariant({color:r.color})];return r.rounded&&l.push("rounded-b-md"),l.push(n[r.offset]),l.join(" ")});return(l,i)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["relative h-3xs overflow-hidden before:absolute before:bottom-0 before:left-0 before:h-full before:w-0 before:transition-[width] before:duration-300 before:ease-linear peer-focus:before:w-full",o.value])},null,2))}}),Un=["id","type","name","placeholder","autocomplete","minlength","maxlength","pattern","required","disabled","aria-invalid","aria-describedby"],Wn=t.defineComponent({__name:"MclInputText",props:t.mergeModels({id:{},name:{},type:{default:"text"},placeholder:{default:""},autocomplete:{},showBorder:{type:Boolean,default:!1},borderColor:{default:"light-4"},rounded:{type:Boolean,default:!1},showHighlight:{type:Boolean,default:!0},highlightColor:{default:"primary"},textColor:{default:"black"},bgColor:{default:"light-1"},showShadow:{type:Boolean,default:!0},invalidFeedback:{},minLength:{},maxLength:{},pattern:{},invalid:{type:Boolean,default:void 0},required:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const r=e,n=t.useModel(e,"modelValue"),o=Ce(r),l=et(r);return(i,s)=>(t.openBlock(),t.createElementBlock("div",null,[t.withDirectives(t.createElementVNode("input",{id:t.unref(o).id,"onUpdate:modelValue":s[0]||(s[0]=c=>n.value=c),class:t.normalizeClass(["peer w-full p-2xs outline-none disabled:cursor-not-allowed disabled:opacity-50",t.unref(l)]),type:e.type,name:t.unref(o).name.value,placeholder:e.placeholder,autocomplete:e.autocomplete,minlength:e.minLength,maxlength:e.maxLength,pattern:e.pattern,required:t.unref(o).required.value,disabled:t.unref(o).disabled.value,"aria-invalid":t.unref(o).invalid.value||void 0,"aria-describedby":t.unref(o).describedBy.value},null,10,Un),[[t.vModelDynamic,n.value]]),e.showHighlight?(t.openBlock(),t.createBlock(rr,{key:0,color:e.highlightColor,rounded:e.rounded},null,8,["color","rounded"])):t.createCommentVNode("",!0),t.unref(o).feedbackOwnedByGroup?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(_e,{key:1,id:t.unref(o).errorId,invalid:t.unref(o).invalid.value,text:e.invalidFeedback},{default:t.withCtx(()=>[i.$slots["invalid-feedback"]?t.renderSlot(i.$slots,"invalid-feedback",{key:0}):t.createCommentVNode("",!0)]),_:3},8,["id","invalid","text"]))]))}});function nr(e){var r,n,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var l=e.length;for(r=0;r<l;r++)e[r]&&(n=nr(e[r]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}function qn(){for(var e,r,n=0,o="",l=arguments.length;n<l;n++)(e=arguments[n])&&(r=nr(e))&&(o&&(o+=" "),o+=r);return o}const or=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ar=qn,x=(e,r)=>n=>{var o;if(r?.variants==null)return ar(e,n?.class,n?.className);const{variants:l,defaultVariants:i}=r,s=Object.keys(l).map(d=>{const u=n?.[d],g=i?.[d];if(u===null)return null;const m=or(u)||or(g);return l[d][m]}),c=n&&Object.entries(n).reduce((d,u)=>{let[g,m]=u;return m===void 0||(d[g]=m),d},{}),f=r==null||(o=r.compoundVariants)===null||o===void 0?void 0:o.reduce((d,u)=>{let{class:g,className:m,...b}=u;return Object.entries(b).every(y=>{let[w,k]=y;return Array.isArray(k)?k.includes({...i,...c}[w]):{...i,...c}[w]===k})?[...d,g,m]:d},[]);return ar(e,s,f,n?.class,n?.className)},jn=x("",{variants:{color:{primary:"mcl-bg-primary",secondary:"mcl-bg-secondary",success:"mcl-bg-success",danger:"mcl-bg-danger",info:"mcl-bg-info",warning:"mcl-bg-warning","light-1":"mcl-bg-light-1","light-2":"mcl-bg-light-2","light-3":"mcl-bg-light-3","light-4":"mcl-bg-light-4","dark-1":"mcl-bg-dark-1","dark-2":"mcl-bg-dark-2","dark-3":"mcl-bg-dark-3","dark-4":"mcl-bg-dark-4",black:"mcl-bg-black",white:"mcl-bg-white",transparent:"mcl-bg-transparent"}}}),Gn=x("",{variants:{color:{primary:"hover:bg-primary",secondary:"hover:bg-secondary",success:"hover:bg-success",danger:"hover:bg-danger",info:"hover:bg-info",warning:"hover:bg-warning","light-1":"hover:bg-light-1","light-2":"hover:bg-light-2","light-3":"hover:bg-light-3","light-4":"hover:bg-light-4","dark-1":"hover:bg-dark-1","dark-2":"hover:bg-dark-2","dark-3":"hover:bg-dark-3","dark-4":"hover:bg-dark-4",black:"hover:bg-black",white:"hover:bg-white",transparent:"hover:bg-transparent"}}}),Yn=x("",{variants:{color:{primary:"focus:bg-primary",secondary:"focus:bg-secondary",success:"focus:bg-success",danger:"focus:bg-danger",info:"focus:bg-info",warning:"focus:bg-warning","light-1":"focus:bg-light-1","light-2":"focus:bg-light-2","light-3":"focus:bg-light-3","light-4":"focus:bg-light-4","dark-1":"focus:bg-dark-1","dark-2":"focus:bg-dark-2","dark-3":"focus:bg-dark-3","dark-4":"focus:bg-dark-4",black:"focus:bg-black",white:"focus:bg-white",transparent:"focus:bg-transparent"}}}),Xn=x("",{variants:{color:{primary:"before:bg-primary",secondary:"before:bg-secondary",success:"before:bg-success",danger:"before:bg-danger",info:"before:bg-info",warning:"before:bg-warning","light-1":"before:bg-light-1","light-2":"before:bg-light-2","light-3":"before:bg-light-3","light-4":"before:bg-light-4","dark-1":"before:bg-dark-1","dark-2":"before:bg-dark-2","dark-3":"before:bg-dark-3","dark-4":"before:bg-dark-4",black:"before:bg-black",white:"before:bg-white",transparent:"before:bg-transparent"}}}),Kn=x("",{variants:{color:{primary:"after:bg-primary",secondary:"after:bg-secondary",success:"after:bg-success",danger:"after:bg-danger",info:"after:bg-info",warning:"after:bg-warning","light-1":"after:bg-light-1","light-2":"after:bg-light-2","light-3":"after:bg-light-3","light-4":"after:bg-light-4","dark-1":"after:bg-dark-1","dark-2":"after:bg-dark-2","dark-3":"after:bg-dark-3","dark-4":"after:bg-dark-4",black:"after:bg-black",white:"after:bg-white",transparent:"after:bg-transparent"}}}),Zn=x("",{variants:{color:{primary:"active:bg-primary",secondary:"active:bg-secondary",success:"active:bg-success",danger:"active:bg-danger",info:"active:bg-info",warning:"active:bg-warning","light-1":"active:bg-light-1","light-2":"active:bg-light-2","light-3":"active:bg-light-3","light-4":"active:bg-light-4","dark-1":"active:bg-dark-1","dark-2":"active:bg-dark-2","dark-3":"active:bg-dark-3","dark-4":"active:bg-dark-4",black:"active:bg-black",white:"active:bg-white",transparent:"active:bg-transparent"}}}),Jn=x("",{variants:{color:{primary:"text-primary",secondary:"text-secondary",success:"text-success",danger:"text-danger",info:"text-info",warning:"text-warning","light-1":"text-light-1","light-2":"text-light-2","light-3":"text-light-3","light-4":"text-light-4","dark-1":"text-dark-1","dark-2":"text-dark-2","dark-3":"text-dark-3","dark-4":"text-dark-4",black:"text-black",white:"text-white",transparent:"text-transparent"}}}),Qn=x("",{variants:{color:{primary:"hover:text-primary",secondary:"hover:text-secondary",success:"hover:text-success",danger:"hover:text-danger",info:"hover:text-info",warning:"hover:text-warning","light-1":"hover:text-light-1","light-2":"hover:text-light-2","light-3":"hover:text-light-3","light-4":"hover:text-light-4","dark-1":"hover:text-dark-1","dark-2":"hover:text-dark-2","dark-3":"hover:text-dark-3","dark-4":"hover:text-dark-4",black:"hover:text-black",white:"hover:text-white",transparent:"hover:text-transparent"}}}),eo=x("",{variants:{color:{primary:"focus:text-primary",secondary:"focus:text-secondary",success:"focus:text-success",danger:"focus:text-danger",info:"focus:text-info",warning:"focus:text-warning","light-1":"focus:text-light-1","light-2":"focus:text-light-2","light-3":"focus:text-light-3","light-4":"focus:text-light-4","dark-1":"focus:text-dark-1","dark-2":"focus:text-dark-2","dark-3":"focus:text-dark-3","dark-4":"focus:text-dark-4",black:"focus:text-black",white:"focus:text-white",transparent:"focus:text-transparent"}}}),to=x("",{variants:{color:{primary:"disabled:text-primary",secondary:"disabled:text-secondary",success:"disabled:text-success",danger:"disabled:text-danger",info:"disabled:text-info",warning:"disabled:text-warning","light-1":"disabled:text-light-1","light-2":"disabled:text-light-2","light-3":"disabled:text-light-3","light-4":"disabled:text-light-4","dark-1":"disabled:text-dark-1","dark-2":"disabled:text-dark-2","dark-3":"disabled:text-dark-3","dark-4":"disabled:text-dark-4",black:"disabled:text-black",white:"disabled:text-white",transparent:"disabled:text-transparent"}}}),ro=x("",{variants:{color:{primary:"fill-primary",secondary:"fill-secondary",success:"fill-success",danger:"fill-danger",info:"fill-info",warning:"fill-warning","light-1":"fill-light-1","light-2":"fill-light-2","light-3":"fill-light-3","light-4":"fill-light-4","dark-1":"fill-dark-1","dark-2":"fill-dark-2","dark-3":"fill-dark-3","dark-4":"fill-dark-4",black:"fill-black",white:"fill-white",transparent:"fill-transparent"}}}),no=x("",{variants:{color:{primary:"ring-primary",secondary:"ring-secondary",success:"ring-success",danger:"ring-danger",info:"ring-info",warning:"ring-warning","light-1":"ring-light-1","light-2":"ring-light-2","light-3":"ring-light-3","light-4":"ring-light-4","dark-1":"ring-dark-1","dark-2":"ring-dark-2","dark-3":"ring-dark-3","dark-4":"ring-dark-4",black:"ring-black",white:"ring-white",transparent:"ring-transparent"}}}),oo=x("",{variants:{color:{primary:"focus:ring-primary",secondary:"focus:ring-secondary",success:"focus:ring-success",danger:"focus:ring-danger",info:"focus:ring-info",warning:"focus:ring-warning","light-1":"focus:ring-light-1","light-2":"focus:ring-light-2","light-3":"focus:ring-light-3","light-4":"focus:ring-light-4","dark-1":"focus:ring-dark-1","dark-2":"focus:ring-dark-2","dark-3":"focus:ring-dark-3","dark-4":"focus:ring-dark-4",black:"focus:ring-black",white:"focus:ring-white",transparent:"focus:ring-transparent"}}}),ao=x("",{variants:{color:{primary:"active:ring-primary",secondary:"active:ring-secondary",success:"active:ring-success",danger:"active:ring-danger",info:"active:ring-info",warning:"active:ring-warning","light-1":"active:ring-light-1","light-2":"active:ring-light-2","light-3":"active:ring-light-3","light-4":"active:ring-light-4","dark-1":"active:ring-dark-1","dark-2":"active:ring-dark-2","dark-3":"active:ring-dark-3","dark-4":"active:ring-dark-4",black:"active:ring-black",white:"active:ring-white",transparent:"active:ring-transparent"}}}),lo=x("",{variants:{color:{primary:"peer-checked:bg-primary",secondary:"peer-checked:bg-secondary",success:"peer-checked:bg-success",danger:"peer-checked:bg-danger",info:"peer-checked:bg-info",warning:"peer-checked:bg-warning","light-1":"peer-checked:bg-light-1","light-2":"peer-checked:bg-light-2","light-3":"peer-checked:bg-light-3","light-4":"peer-checked:bg-light-4","dark-1":"peer-checked:bg-dark-1","dark-2":"peer-checked:bg-dark-2","dark-3":"peer-checked:bg-dark-3","dark-4":"peer-checked:bg-dark-4",black:"peer-checked:bg-black",white:"peer-checked:bg-white",transparent:"peer-checked:bg-transparent"}}}),io=x("",{variants:{color:{primary:"peer-focus-visible:ring-primary",secondary:"peer-focus-visible:ring-secondary",success:"peer-focus-visible:ring-success",danger:"peer-focus-visible:ring-danger",info:"peer-focus-visible:ring-info",warning:"peer-focus-visible:ring-warning","light-1":"peer-focus-visible:ring-light-1","light-2":"peer-focus-visible:ring-light-2","light-3":"peer-focus-visible:ring-light-3","light-4":"peer-focus-visible:ring-light-4","dark-1":"peer-focus-visible:ring-dark-1","dark-2":"peer-focus-visible:ring-dark-2","dark-3":"peer-focus-visible:ring-dark-3","dark-4":"peer-focus-visible:ring-dark-4",black:"peer-focus-visible:ring-black",white:"peer-focus-visible:ring-white",transparent:"peer-focus-visible:ring-transparent"}}}),so=x("",{variants:{color:{primary:"focus-visible:ring-primary",secondary:"focus-visible:ring-secondary",success:"focus-visible:ring-success",danger:"focus-visible:ring-danger",info:"focus-visible:ring-info",warning:"focus-visible:ring-warning","light-1":"focus-visible:ring-light-1","light-2":"focus-visible:ring-light-2","light-3":"focus-visible:ring-light-3","light-4":"focus-visible:ring-light-4","dark-1":"focus-visible:ring-dark-1","dark-2":"focus-visible:ring-dark-2","dark-3":"focus-visible:ring-dark-3","dark-4":"focus-visible:ring-dark-4",black:"focus-visible:ring-black",white:"focus-visible:ring-white",transparent:"focus-visible:ring-transparent"}}}),co=x("",{variants:{color:{primary:"ring-offset-primary",secondary:"ring-offset-secondary",success:"ring-offset-success",danger:"ring-offset-danger",info:"ring-offset-info",warning:"ring-offset-warning","light-1":"ring-offset-light-1","light-2":"ring-offset-light-2","light-3":"ring-offset-light-3","light-4":"ring-offset-light-4","dark-1":"ring-offset-dark-1","dark-2":"ring-offset-dark-2","dark-3":"ring-offset-dark-3","dark-4":"ring-offset-dark-4",black:"ring-offset-black",white:"ring-offset-white",transparent:"ring-offset-transparent"}}}),fo=x("",{variants:{color:{primary:"mcl-outline-primary",secondary:"mcl-outline-secondary",success:"mcl-outline-success",danger:"mcl-outline-danger",info:"mcl-outline-info",warning:"mcl-outline-warning","light-1":"mcl-outline-light-1","light-2":"mcl-outline-light-2","light-3":"mcl-outline-light-3","light-4":"mcl-outline-light-4","dark-1":"mcl-outline-dark-1","dark-2":"mcl-outline-dark-2","dark-3":"mcl-outline-dark-3","dark-4":"mcl-outline-dark-4",black:"mcl-outline-black",white:"mcl-outline-white",transparent:"mcl-outline-transparent"}}}),uo=x("",{variants:{color:{primary:"focus:mcl-outline-primary",secondary:"focus:mcl-outline-secondary",success:"focus:mcl-outline-success",danger:"focus:mcl-outline-danger",info:"focus:mcl-outline-info",warning:"focus:mcl-outline-warning","light-1":"focus:mcl-outline-light-1","light-2":"focus:mcl-outline-light-2","light-3":"focus:mcl-outline-light-3","light-4":"focus:mcl-outline-light-4","dark-1":"focus:mcl-outline-dark-1","dark-2":"focus:mcl-outline-dark-2","dark-3":"focus:mcl-outline-dark-3","dark-4":"focus:mcl-outline-dark-4",black:"focus:mcl-outline-black",white:"focus:mcl-outline-white",transparent:"focus:mcl-outline-transparent"}}}),mo=x("",{variants:{color:{primary:"active:mcl-outline-primary",secondary:"active:mcl-outline-secondary",success:"active:mcl-outline-success",danger:"active:mcl-outline-danger",info:"active:mcl-outline-info",warning:"active:mcl-outline-warning","light-1":"active:mcl-outline-light-1","light-2":"active:mcl-outline-light-2","light-3":"active:mcl-outline-light-3","light-4":"active:mcl-outline-light-4","dark-1":"active:mcl-outline-dark-1","dark-2":"active:mcl-outline-dark-2","dark-3":"active:mcl-outline-dark-3","dark-4":"active:mcl-outline-dark-4",black:"active:mcl-outline-black",white:"active:mcl-outline-white",transparent:"active:mcl-outline-transparent"}}}),po=x("",{variants:{color:{primary:"btn-primary",secondary:"btn-secondary",success:"btn-success",danger:"btn-danger",info:"btn-info",warning:"btn-warning","light-1":"btn-light-1","light-2":"btn-light-2","light-3":"btn-light-3","light-4":"btn-light-4","dark-1":"btn-dark-1","dark-2":"btn-dark-2","dark-3":"btn-dark-3","dark-4":"btn-dark-4",black:"btn-black",white:"btn-white",transparent:"btn-transparent"}}}),go=x("",{variants:{color:{primary:"mcl-list-primary",secondary:"mcl-list-secondary",success:"mcl-list-success",danger:"mcl-list-danger",info:"mcl-list-info",warning:"mcl-list-warning","light-1":"mcl-list-light-1","light-2":"mcl-list-light-2","light-3":"mcl-list-light-3","light-4":"mcl-list-light-4","dark-1":"mcl-list-dark-1","dark-2":"mcl-list-dark-2","dark-3":"mcl-list-dark-3","dark-4":"mcl-list-dark-4",black:"mcl-list-black",white:"mcl-list-white",transparent:"mcl-list-transparent"}}}),bo=x("",{variants:{color:{primary:"border-primary",secondary:"border-secondary",success:"border-success",danger:"border-danger",info:"border-info",warning:"border-warning","light-1":"border-light-1","light-2":"border-light-2","light-3":"border-light-3","light-4":"border-light-4","dark-1":"border-dark-1","dark-2":"border-dark-2","dark-3":"border-dark-3","dark-4":"border-dark-4",black:"border-black",white:"border-white",transparent:"border-transparent"}}}),ho=x("",{variants:{color:{primary:"border-x-primary",secondary:"border-x-secondary",success:"border-x-success",danger:"border-x-danger",info:"border-x-info",warning:"border-x-warning","light-1":"border-x-light-1","light-2":"border-x-light-2","light-3":"border-x-light-3","light-4":"border-x-light-4","dark-1":"border-x-dark-1","dark-2":"border-x-dark-2","dark-3":"border-x-dark-3","dark-4":"border-x-dark-4",black:"border-x-black",white:"border-x-white",transparent:"border-x-transparent"}}}),xo=x("",{variants:{color:{primary:"border-y-primary",secondary:"border-y-secondary",success:"border-y-success",danger:"border-y-danger",info:"border-y-info",warning:"border-y-warning","light-1":"border-y-light-1","light-2":"border-y-light-2","light-3":"border-y-light-3","light-4":"border-y-light-4","dark-1":"border-y-dark-1","dark-2":"border-y-dark-2","dark-3":"border-y-dark-3","dark-4":"border-y-dark-4",black:"border-y-black",white:"border-y-white",transparent:"border-y-transparent"}}}),yo=x("",{variants:{color:{primary:"border-t-primary",secondary:"border-t-secondary",success:"border-t-success",danger:"border-t-danger",info:"border-t-info",warning:"border-t-warning","light-1":"border-t-light-1","light-2":"border-t-light-2","light-3":"border-t-light-3","light-4":"border-t-light-4","dark-1":"border-t-dark-1","dark-2":"border-t-dark-2","dark-3":"border-t-dark-3","dark-4":"border-t-dark-4",black:"border-t-black",white:"border-t-white",transparent:"border-t-transparent"}}}),ko=x("",{variants:{color:{primary:"border-b-primary",secondary:"border-b-secondary",success:"border-b-success",danger:"border-b-danger",info:"border-b-info",warning:"border-b-warning","light-1":"border-b-light-1","light-2":"border-b-light-2","light-3":"border-b-light-3","light-4":"border-b-light-4","dark-1":"border-b-dark-1","dark-2":"border-b-dark-2","dark-3":"border-b-dark-3","dark-4":"border-b-dark-4",black:"border-b-black",white:"border-b-white",transparent:"border-b-transparent"}}}),wo=x("",{variants:{color:{primary:"border-l-primary",secondary:"border-l-secondary",success:"border-l-success",danger:"border-l-danger",info:"border-l-info",warning:"border-l-warning","light-1":"border-l-light-1","light-2":"border-l-light-2","light-3":"border-l-light-3","light-4":"border-l-light-4","dark-1":"border-l-dark-1","dark-2":"border-l-dark-2","dark-3":"border-l-dark-3","dark-4":"border-l-dark-4",black:"border-l-black",white:"border-l-white",transparent:"border-l-transparent"}}}),Co=x("",{variants:{color:{primary:"border-r-primary",secondary:"border-r-secondary",success:"border-r-success",danger:"border-r-danger",info:"border-r-info",warning:"border-r-warning","light-1":"border-r-light-1","light-2":"border-r-light-2","light-3":"border-r-light-3","light-4":"border-r-light-4","dark-1":"border-r-dark-1","dark-2":"border-r-dark-2","dark-3":"border-r-dark-3","dark-4":"border-r-dark-4",black:"border-r-black",white:"border-r-white",transparent:"border-r-transparent"}}}),vo=x("",{variants:{size:{xs:"text-xs",sm:"text-sm",md:"text-md",lg:"text-lg",xl:"text-xl"}}}),To=x("",{variants:{weight:{light:"font-light",normal:"font-normal",bold:"font-bold"}}}),Eo=x("",{variants:{align:{left:"text-left",center:"text-center",right:"text-right"}}}),So=x("",{variants:{size:{sm:"h1-sm",md:"h1-md",lg:"h1-lg",xl:"h1-xl"}}}),Ao=x("",{variants:{size:{sm:"h2-sm",md:"h2-md",lg:"h2-lg",xl:"h2-xl"}}}),Ro=x("",{variants:{size:{sm:"h3-sm",md:"h3-md",lg:"h3-lg",xl:"h3-xl"}}}),No=x("",{variants:{size:{sm:"h4-sm",md:"h4-md",lg:"h4-lg",xl:"h4-xl"}}}),Oo={1:"border-[1px]",2:"border-[2px]",3:"border-[3px]",4:"border-[4px]",5:"border-[5px]",6:"border-[6px]",7:"border-[7px]",8:"border-[8px]",9:"border-[9px]",10:"border-[10px]",11:"border-[11px]",12:"border-[12px]"},_o={1:"border-x-[1px]",2:"border-x-[2px]",3:"border-x-[3px]",4:"border-x-[4px]",5:"border-x-[5px]",6:"border-x-[6px]",7:"border-x-[7px]",8:"border-x-[8px]",9:"border-x-[9px]",10:"border-x-[10px]",11:"border-x-[11px]",12:"border-x-[12px]"},Bo={1:"border-y-[1px]",2:"border-y-[2px]",3:"border-y-[3px]",4:"border-y-[4px]",5:"border-y-[5px]",6:"border-y-[6px]",7:"border-y-[7px]",8:"border-y-[8px]",9:"border-y-[9px]",10:"border-y-[10px]",11:"border-y-[11px]",12:"border-y-[12px]"},Vo={1:"border-t-[1px]",2:"border-t-[2px]",3:"border-t-[3px]",4:"border-t-[4px]",5:"border-t-[5px]",6:"border-t-[6px]",7:"border-t-[7px]",8:"border-t-[8px]",9:"border-t-[9px]",10:"border-t-[10px]",11:"border-t-[11px]",12:"border-t-[12px]"},Do={1:"border-b-[1px]",2:"border-b-[2px]",3:"border-b-[3px]",4:"border-b-[4px]",5:"border-b-[5px]",6:"border-b-[6px]",7:"border-b-[7px]",8:"border-b-[8px]",9:"border-b-[9px]",10:"border-b-[10px]",11:"border-b-[11px]",12:"border-b-[12px]"},Lo={1:"border-l-[1px]",2:"border-l-[2px]",3:"border-l-[3px]",4:"border-l-[4px]",5:"border-l-[5px]",6:"border-l-[6px]",7:"border-l-[7px]",8:"border-l-[8px]",9:"border-l-[9px]",10:"border-l-[10px]",11:"border-l-[11px]",12:"border-l-[12px]"},Io={1:"border-r-[1px]",2:"border-r-[2px]",3:"border-r-[3px]",4:"border-r-[4px]",5:"border-r-[5px]",6:"border-r-[6px]",7:"border-r-[7px]",8:"border-r-[8px]",9:"border-r-[9px]",10:"border-r-[10px]",11:"border-r-[11px]",12:"border-r-[12px]"},Mo=e=>Oo[e.width]??"",Fo=e=>_o[e.width]??"",zo=e=>Bo[e.width]??"",Po=e=>Vo[e.width]??"",$o=e=>Do[e.width]??"",Ho=e=>Lo[e.width]??"",Uo=e=>Io[e.width]??"",Wo={10:"opacity-10",20:"opacity-20",30:"opacity-30",40:"opacity-40",50:"opacity-50",60:"opacity-60",70:"opacity-70",80:"opacity-80",90:"opacity-90",100:"opacity-100"},qo={10:"bg-opacity-10",20:"bg-opacity-20",30:"bg-opacity-30",40:"bg-opacity-40",50:"bg-opacity-50",60:"bg-opacity-60",70:"bg-opacity-70",80:"bg-opacity-80",90:"bg-opacity-90",100:"bg-opacity-100"},jo={10:"outline-opacity-10",20:"outline-opacity-20",30:"outline-opacity-30",40:"outline-opacity-40",50:"outline-opacity-50",60:"outline-opacity-60",70:"outline-opacity-70",80:"outline-opacity-80",90:"outline-opacity-90",100:"outline-opacity-100"},Go=e=>Wo[e.opacity]??"",Yo=e=>qo[e.opacity]??"",Xo=e=>jo[e.opacity]??"",Ko=x("",{variants:{spacing:{0:"m-0","3xs":"m-3xs","2xs":"m-2xs",xs:"m-xs",sm:"m-sm",md:"m-md",lg:"m-lg",xl:"m-xl","2xl":"m-2xl","3xl":"m-3xl"}}}),Zo=x("",{variants:{spacing:{0:"mx-0","3xs":"mx-3xs","2xs":"mx-2xs",xs:"mx-xs",sm:"mx-sm",md:"mx-md",lg:"mx-lg",xl:"mx-xl","2xl":"mx-2xl","3xl":"mx-3xl"}}}),Jo=x("",{variants:{spacing:{0:"my-0","3xs":"my-3xs","2xs":"my-2xs",xs:"my-xs",sm:"my-sm",md:"my-md",lg:"my-lg",xl:"my-xl","2xl":"my-2xl","3xl":"my-3xl"}}}),Qo=x("",{variants:{spacing:{0:"mt-0","3xs":"mt-3xs","2xs":"mt-2xs",xs:"mt-xs",sm:"mt-sm",md:"mt-md",lg:"mt-lg",xl:"mt-xl","2xl":"mt-2xl","3xl":"mt-3xl"}}}),ea=x("",{variants:{spacing:{0:"mb-0","3xs":"mb-3xs","2xs":"mb-2xs",xs:"mb-xs",sm:"mb-sm",md:"mb-md",lg:"mb-lg",xl:"mb-xl","2xl":"mb-2xl","3xl":"mb-3xl"}}}),ta=x("",{variants:{spacing:{0:"ml-0","3xs":"ml-3xs","2xs":"ml-2xs",xs:"ml-xs",sm:"ml-sm",md:"ml-md",lg:"ml-lg",xl:"ml-xl","2xl":"ml-2xl","3xl":"ml-3xl"}}}),ra=x("",{variants:{spacing:{0:"mr-0","3xs":"mr-3xs","2xs":"mr-2xs",xs:"mr-xs",sm:"mr-sm",md:"mr-md",lg:"mr-lg",xl:"mr-xl","2xl":"mr-2xl","3xl":"mr-3xl"}}}),na=x("",{variants:{spacing:{0:"p-0","3xs":"p-3xs","2xs":"p-2xs",xs:"p-xs",sm:"p-sm",md:"p-md",lg:"p-lg",xl:"p-xl","2xl":"p-2xl","3xl":"p-3xl"}}}),oa=x("",{variants:{spacing:{0:"px-0","3xs":"px-3xs","2xs":"px-2xs",xs:"px-xs",sm:"px-sm",md:"px-md",lg:"px-lg",xl:"px-xl","2xl":"px-2xl","3xl":"px-3xl"}}}),aa=x("",{variants:{spacing:{0:"py-0","3xs":"py-3xs","2xs":"py-2xs",xs:"py-xs",sm:"py-sm",md:"py-md",lg:"py-lg",xl:"py-xl","2xl":"py-2xl","3xl":"py-3xl"}}}),la=x("",{variants:{spacing:{0:"pt-0","3xs":"pt-3xs","2xs":"pt-2xs",xs:"pt-xs",sm:"pt-sm",md:"pt-md",lg:"pt-lg",xl:"pt-xl","2xl":"pt-2xl","3xl":"pt-3xl"}}}),ia=x("",{variants:{spacing:{0:"pb-0","3xs":"pb-3xs","2xs":"pb-2xs",xs:"pb-xs",sm:"pb-sm",md:"pb-md",lg:"pb-lg",xl:"pb-xl","2xl":"pb-2xl","3xl":"pb-3xl"}}}),sa=x("",{variants:{spacing:{0:"pl-0","3xs":"pl-3xs","2xs":"pl-2xs",xs:"pl-xs",sm:"pl-sm",md:"pl-md",lg:"pl-lg",xl:"pl-xl","2xl":"pl-2xl","3xl":"pl-3xl"}}}),ca=x("",{variants:{spacing:{0:"pr-0","3xs":"pr-3xs","2xs":"pr-2xs",xs:"pr-xs",sm:"pr-sm",md:"pr-md",lg:"pr-lg",xl:"pr-xl","2xl":"pr-2xl","3xl":"pr-3xl"}}}),da=x("",{variants:{spacing:{0:"gap-0","3xs":"gap-3xs","2xs":"gap-2xs",xs:"gap-xs",sm:"gap-sm",md:"gap-md",lg:"gap-lg",xl:"gap-xl","2xl":"gap-2xl","3xl":"gap-3xl"}}}),lr={bgColorVariant:jn,hoverBgColorVariant:Gn,focusBgColorVariant:Yn,beforeBgColorVariant:Xn,afterBgColorVariant:Kn,activeBgColorVariant:Zn,textColorVariant:Jn,hoverTextColorVariant:Qn,focusTextColorVariant:eo,disabledTextColorVariant:to,svgFillColorVariant:ro,ringColorVariant:no,focusRingColorVariant:oo,activeRingColorVariant:ao,peerCheckedBgColorVariant:lo,peerFocusVisibleRingColorVariant:io,focusVisibleRingColorVariant:so,ringOffsetColorVariant:co,outlineColorVariant:fo,focusOutlineColorVariant:uo,activeOutlineColorVariant:mo,btnColorVariant:po,listColorVariant:go,borderColorVariant:bo,borderXColorVariant:ho,borderYColorVariant:xo,borderTopColorVariant:yo,borderBottomColorVariant:ko,borderLeftColorVariant:wo,borderRightColorVariant:Co,bodyTextVariant:vo,fontWeightVariant:To,textAlignVariant:Eo,h1Variant:So,h2Variant:Ao,h3Variant:Ro,h4Variant:No,borderWidthVariant:Mo,borderXWidthVariant:Fo,borderYWidthVariant:zo,borderTopWidthVariant:Po,borderBottomWidthVariant:$o,borderLeftWidthVariant:Ho,borderRightWidthVariant:Uo,opacityVariant:Go,bgOpacityVariant:Yo,outlineOpacityVariant:Xo,marginVariant:Ko,marginXVariant:Zo,marginYVariant:Jo,marginTopVariant:Qo,marginBottomVariant:ea,marginLeftVariant:ta,marginRightVariant:ra,paddingVariant:na,paddingXVariant:oa,paddingYVariant:aa,paddingTopVariant:la,paddingBottomVariant:ia,paddingLeftVariant:sa,paddingRightVariant:ca,gapVariant:da},fa=(e,r,n)=>!r||!(r instanceof Node)||e===r||e.contains(r)?!1:n?.length?!n.some(o=>o===r||o.contains(r)):!0,tt=e=>typeof e.value=="function"?{handler:e.value,events:["click"]}:{handler:e.value.handler,events:e.value.events||["click"],excludeElements:e.value.excludeElements},ir=(e,r,n)=>o=>{fa(e,o.target,n)&&r(o)},ua={mounted(e,r){const{handler:n,events:o,excludeElements:l}=tt(r);e.__ClickOutsideHandler=ir(e,n,l),o.forEach(i=>{document.addEventListener(i,e.__ClickOutsideHandler,!0)})},updated(e,r){e.__ClickOutsideHandler&&tt({...r,value:r.oldValue}).events.forEach(i=>{document.removeEventListener(i,e.__ClickOutsideHandler,!0)});const{handler:n,events:o,excludeElements:l}=tt(r);e.__ClickOutsideHandler=ir(e,n,l),o.forEach(i=>{document.addEventListener(i,e.__ClickOutsideHandler,!0)})},unmounted(e,r){if(e.__ClickOutsideHandler){const{events:n}=tt(r);n.forEach(o=>{document.removeEventListener(o,e.__ClickOutsideHandler,!0)}),delete e.__ClickOutsideHandler}}},{entries:sr,setPrototypeOf:cr,isFrozen:ma,getPrototypeOf:pa,getOwnPropertyDescriptor:ga}=Object;let{freeze:K,seal:ne,create:Be}=Object,{apply:vt,construct:Tt}=typeof Reflect<"u"&&Reflect;K||(K=function(e){return e}),ne||(ne=function(e){return e}),vt||(vt=function(e,r){for(var n=arguments.length,o=new Array(n>2?n-2:0),l=2;l<n;l++)o[l-2]=arguments[l];return e.apply(r,o)}),Tt||(Tt=function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return new e(...n)});const $e=F(Array.prototype.forEach),ba=F(Array.prototype.lastIndexOf),dr=F(Array.prototype.pop),He=F(Array.prototype.push),ha=F(Array.prototype.splice),Z=Array.isArray,Ue=F(String.prototype.toLowerCase),Et=F(String.prototype.toString),fr=F(String.prototype.match),Ve=F(String.prototype.replace),ur=F(String.prototype.indexOf),xa=F(String.prototype.trim),ya=F(Number.prototype.toString),ka=F(Boolean.prototype.toString),mr=typeof BigInt>"u"?null:F(BigInt.prototype.toString),pr=typeof Symbol>"u"?null:F(Symbol.prototype.toString),I=F(Object.prototype.hasOwnProperty),We=F(Object.prototype.toString),q=F(RegExp.prototype.test),rt=wa(TypeError);function F(e){return function(r){r instanceof RegExp&&(r.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),l=1;l<n;l++)o[l-1]=arguments[l];return vt(e,r,o)}}function wa(e){return function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return Tt(e,n)}}function v(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ue;if(cr&&cr(e,null),!Z(r))return e;let o=r.length;for(;o--;){let l=r[o];if(typeof l=="string"){const i=n(l);i!==l&&(ma(r)||(r[o]=i),l=i)}e[l]=!0}return e}function Ca(e){for(let r=0;r<e.length;r++)I(e,r)||(e[r]=null);return e}function ee(e){const r=Be(null);for(const[n,o]of sr(e))I(e,n)&&(Z(o)?r[n]=Ca(o):o&&typeof o=="object"&&o.constructor===Object?r[n]=ee(o):r[n]=o);return r}function va(e){switch(typeof e){case"string":return e;case"number":return ya(e);case"boolean":return ka(e);case"bigint":return mr?mr(e):"0";case"symbol":return pr?pr(e):"Symbol()";case"undefined":return We(e);case"function":case"object":{if(e===null)return We(e);const r=e,n=De(r,"toString");if(typeof n=="function"){const o=n(r);return typeof o=="string"?o:We(o)}return We(e)}default:return We(e)}}function De(e,r){for(;e!==null;){const o=ga(e,r);if(o){if(o.get)return F(o.get);if(typeof o.value=="function")return F(o.value)}e=pa(e)}function n(){return null}return n}function Ta(e){try{return q(e,""),!0}catch{return!1}}const gr=K(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),St=K(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),At=K(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Ea=K(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Rt=K(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Sa=K(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),br=K(["#text"]),hr=K(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Nt=K(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),xr=K(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),nt=K(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Aa=ne(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Ra=ne(/<%[\w\W]*|[\w\W]*%>/gm),Na=ne(/\$\{[\w\W]*/gm),Oa=ne(/^data-[\-\w.\u00B7-\uFFFF]+$/),_a=ne(/^aria-[\-\w]+$/),yr=ne(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ba=ne(/^(?:\w+script|data):/i),Va=ne(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),kr=ne(/^html$/i),Da=ne(/^[a-z][.\w]*(-[.\w]+)+$/i);var wr=Object.freeze({__proto__:null,ARIA_ATTR:_a,ATTR_WHITESPACE:Va,CUSTOM_ELEMENT:Da,DATA_ATTR:Oa,DOCTYPE_NAME:kr,ERB_EXPR:Ra,IS_ALLOWED_URI:yr,IS_SCRIPT_OR_DATA:Ba,MUSTACHE_EXPR:Aa,TMPLIT_EXPR:Na});const qe={element:1,text:3,progressingInstruction:7,comment:8,document:9},La=function(){return typeof window>"u"?null:window},Ia=function(e,r){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null;const o="data-tt-policy-suffix";r&&r.hasAttribute(o)&&(n=r.getAttribute(o));const l="dompurify"+(n?"#"+n:"");try{return e.createPolicy(l,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return console.warn("TrustedTypes policy "+l+" could not be created."),null}},Cr=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function vr(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:La();const r=a=>vr(a);if(r.version="3.4.2",r.removed=[],!e||!e.document||e.document.nodeType!==qe.document||!e.Element)return r.isSupported=!1,r;let{document:n}=e;const o=n,l=o.currentScript,{DocumentFragment:i,HTMLTemplateElement:s,Node:c,Element:f,NodeFilter:d,NamedNodeMap:u=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:g,DOMParser:m,trustedTypes:b}=e,y=f.prototype,w=De(y,"cloneNode"),k=De(y,"remove"),C=De(y,"nextSibling"),S=De(y,"childNodes"),A=De(y,"parentNode");if(typeof s=="function"){const a=n.createElement("template");a.content&&a.content.ownerDocument&&(n=a.content.ownerDocument)}let T,_="";const{implementation:V,createNodeIterator:N,createDocumentFragment:j,getElementsByTagName:le}=n,{importNode:de}=o;let P=Cr();r.isSupported=typeof sr=="function"&&typeof A=="function"&&V&&V.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:fe,ERB_EXPR:ge,TMPLIT_EXPR:J,DATA_ATTR:E,ARIA_ATTR:O,IS_SCRIPT_OR_DATA:B,ATTR_WHITESPACE:$,CUSTOM_ELEMENT:te}=wr;let{IS_ALLOWED_URI:bt}=wr,U=null;const jr=v({},[...gr,...St,...At,...Rt,...br]);let G=null;const Gr=v({},[...hr,...Nt,...xr,...nt]);let M=Object.seal(Be(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Xe=null,ht=null;const ke=Object.seal(Be(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Yr=!0,Ft=!0,Xr=!1,Kr=!0,Ae=!1,Ke=!0,Re=!1,zt=!1,Pt=!1,Me=!1,xt=!1,yt=!1,Zr=!0,Jr=!1;const Qr="user-content-";let $t=!0,Ze=!1,Fe={},ue=null;const Ht=v({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let en=null;const tn=v({},["audio","video","img","source","image","track"]);let Ut=null;const rn=v({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),kt="http://www.w3.org/1998/Math/MathML",wt="http://www.w3.org/2000/svg",me="http://www.w3.org/1999/xhtml";let ze=me,Wt=!1,qt=null;const Zl=v({},[kt,wt,me],Et);let jt=v({},["mi","mo","mn","ms","mtext"]),Gt=v({},["annotation-xml"]);const Jl=v({},["title","style","font","a","script"]);let Je=null;const Ql=["application/xhtml+xml","text/html"],ei="text/html";let H=null,Pe=null;const ti=n.createElement("form"),nn=function(a){return a instanceof RegExp||a instanceof Function},Yt=function(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Pe&&Pe===a)return;(!a||typeof a!="object")&&(a={}),a=ee(a),Je=Ql.indexOf(a.PARSER_MEDIA_TYPE)===-1?ei:a.PARSER_MEDIA_TYPE,H=Je==="application/xhtml+xml"?Et:Ue,U=I(a,"ALLOWED_TAGS")&&Z(a.ALLOWED_TAGS)?v({},a.ALLOWED_TAGS,H):jr,G=I(a,"ALLOWED_ATTR")&&Z(a.ALLOWED_ATTR)?v({},a.ALLOWED_ATTR,H):Gr,qt=I(a,"ALLOWED_NAMESPACES")&&Z(a.ALLOWED_NAMESPACES)?v({},a.ALLOWED_NAMESPACES,Et):Zl,Ut=I(a,"ADD_URI_SAFE_ATTR")&&Z(a.ADD_URI_SAFE_ATTR)?v(ee(rn),a.ADD_URI_SAFE_ATTR,H):rn,en=I(a,"ADD_DATA_URI_TAGS")&&Z(a.ADD_DATA_URI_TAGS)?v(ee(tn),a.ADD_DATA_URI_TAGS,H):tn,ue=I(a,"FORBID_CONTENTS")&&Z(a.FORBID_CONTENTS)?v({},a.FORBID_CONTENTS,H):Ht,Xe=I(a,"FORBID_TAGS")&&Z(a.FORBID_TAGS)?v({},a.FORBID_TAGS,H):ee({}),ht=I(a,"FORBID_ATTR")&&Z(a.FORBID_ATTR)?v({},a.FORBID_ATTR,H):ee({}),Fe=I(a,"USE_PROFILES")?a.USE_PROFILES&&typeof a.USE_PROFILES=="object"?ee(a.USE_PROFILES):a.USE_PROFILES:!1,Yr=a.ALLOW_ARIA_ATTR!==!1,Ft=a.ALLOW_DATA_ATTR!==!1,Xr=a.ALLOW_UNKNOWN_PROTOCOLS||!1,Kr=a.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ae=a.SAFE_FOR_TEMPLATES||!1,Ke=a.SAFE_FOR_XML!==!1,Re=a.WHOLE_DOCUMENT||!1,Me=a.RETURN_DOM||!1,xt=a.RETURN_DOM_FRAGMENT||!1,yt=a.RETURN_TRUSTED_TYPE||!1,Pt=a.FORCE_BODY||!1,Zr=a.SANITIZE_DOM!==!1,Jr=a.SANITIZE_NAMED_PROPS||!1,$t=a.KEEP_CONTENT!==!1,Ze=a.IN_PLACE||!1,bt=Ta(a.ALLOWED_URI_REGEXP)?a.ALLOWED_URI_REGEXP:yr,ze=typeof a.NAMESPACE=="string"?a.NAMESPACE:me,jt=I(a,"MATHML_TEXT_INTEGRATION_POINTS")&&a.MATHML_TEXT_INTEGRATION_POINTS&&typeof a.MATHML_TEXT_INTEGRATION_POINTS=="object"?ee(a.MATHML_TEXT_INTEGRATION_POINTS):v({},["mi","mo","mn","ms","mtext"]),Gt=I(a,"HTML_INTEGRATION_POINTS")&&a.HTML_INTEGRATION_POINTS&&typeof a.HTML_INTEGRATION_POINTS=="object"?ee(a.HTML_INTEGRATION_POINTS):v({},["annotation-xml"]);const p=I(a,"CUSTOM_ELEMENT_HANDLING")&&a.CUSTOM_ELEMENT_HANDLING&&typeof a.CUSTOM_ELEMENT_HANDLING=="object"?ee(a.CUSTOM_ELEMENT_HANDLING):Be(null);if(M=Be(null),I(p,"tagNameCheck")&&nn(p.tagNameCheck)&&(M.tagNameCheck=p.tagNameCheck),I(p,"attributeNameCheck")&&nn(p.attributeNameCheck)&&(M.attributeNameCheck=p.attributeNameCheck),I(p,"allowCustomizedBuiltInElements")&&typeof p.allowCustomizedBuiltInElements=="boolean"&&(M.allowCustomizedBuiltInElements=p.allowCustomizedBuiltInElements),Ae&&(Ft=!1),xt&&(Me=!0),Fe&&(U=v({},br),G=Be(null),Fe.html===!0&&(v(U,gr),v(G,hr)),Fe.svg===!0&&(v(U,St),v(G,Nt),v(G,nt)),Fe.svgFilters===!0&&(v(U,At),v(G,Nt),v(G,nt)),Fe.mathMl===!0&&(v(U,Rt),v(G,xr),v(G,nt))),ke.tagCheck=null,ke.attributeCheck=null,I(a,"ADD_TAGS")&&(typeof a.ADD_TAGS=="function"?ke.tagCheck=a.ADD_TAGS:Z(a.ADD_TAGS)&&(U===jr&&(U=ee(U)),v(U,a.ADD_TAGS,H))),I(a,"ADD_ATTR")&&(typeof a.ADD_ATTR=="function"?ke.attributeCheck=a.ADD_ATTR:Z(a.ADD_ATTR)&&(G===Gr&&(G=ee(G)),v(G,a.ADD_ATTR,H))),I(a,"ADD_URI_SAFE_ATTR")&&Z(a.ADD_URI_SAFE_ATTR)&&v(Ut,a.ADD_URI_SAFE_ATTR,H),I(a,"FORBID_CONTENTS")&&Z(a.FORBID_CONTENTS)&&(ue===Ht&&(ue=ee(ue)),v(ue,a.FORBID_CONTENTS,H)),I(a,"ADD_FORBID_CONTENTS")&&Z(a.ADD_FORBID_CONTENTS)&&(ue===Ht&&(ue=ee(ue)),v(ue,a.ADD_FORBID_CONTENTS,H)),$t&&(U["#text"]=!0),Re&&v(U,["html","head","body"]),U.table&&(v(U,["tbody"]),delete Xe.tbody),a.TRUSTED_TYPES_POLICY){if(typeof a.TRUSTED_TYPES_POLICY.createHTML!="function")throw rt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof a.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw rt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');T=a.TRUSTED_TYPES_POLICY,_=T.createHTML("")}else T===void 0&&(T=Ia(b,l)),T!==null&&typeof _=="string"&&(_=T.createHTML(""));K&&K(a),Pe=a},on=v({},[...St,...At,...Ea]),an=v({},[...Rt,...Sa]),ri=function(a){let p=A(a);(!p||!p.tagName)&&(p={namespaceURI:ze,tagName:"template"});const h=Ue(a.tagName),R=Ue(p.tagName);return qt[a.namespaceURI]?a.namespaceURI===wt?p.namespaceURI===me?h==="svg":p.namespaceURI===kt?h==="svg"&&(R==="annotation-xml"||jt[R]):!!on[h]:a.namespaceURI===kt?p.namespaceURI===me?h==="math":p.namespaceURI===wt?h==="math"&&Gt[R]:!!an[h]:a.namespaceURI===me?p.namespaceURI===wt&&!Gt[R]||p.namespaceURI===kt&&!jt[R]?!1:!an[h]&&(Jl[h]||!on[h]):!!(Je==="application/xhtml+xml"&&qt[a.namespaceURI]):!1},Ne=function(a){He(r.removed,{element:a});try{A(a).removeChild(a)}catch{k(a)}},Oe=function(a,p){try{He(r.removed,{attribute:p.getAttributeNode(a),from:p})}catch{He(r.removed,{attribute:null,from:p})}if(p.removeAttribute(a),a==="is")if(Me||xt)try{Ne(p)}catch{}else try{p.setAttribute(a,"")}catch{}},ln=function(a){let p=null,h=null;if(Pt)a="<remove></remove>"+a;else{const D=fr(a,/^[\r\n\t ]+/);h=D&&D[0]}Je==="application/xhtml+xml"&&ze===me&&(a='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+a+"</body></html>");const R=T?T.createHTML(a):a;if(ze===me)try{p=new m().parseFromString(R,Je)}catch{}if(!p||!p.documentElement){p=V.createDocument(ze,"template",null);try{p.documentElement.innerHTML=Wt?_:R}catch{}}const Y=p.body||p.documentElement;return a&&h&&Y.insertBefore(n.createTextNode(h),Y.childNodes[0]||null),ze===me?le.call(p,Re?"html":"body")[0]:Re?p.documentElement:Y},sn=function(a){return N.call(a.ownerDocument||a,a,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},Xt=function(a){return a instanceof g&&(typeof a.nodeName!="string"||typeof a.textContent!="string"||typeof a.removeChild!="function"||!(a.attributes instanceof u)||typeof a.removeAttribute!="function"||typeof a.setAttribute!="function"||typeof a.namespaceURI!="string"||typeof a.insertBefore!="function"||typeof a.hasChildNodes!="function")},Kt=function(a){return typeof c=="function"&&a instanceof c};function be(a,p,h){$e(a,R=>{R.call(r,p,h,Pe)})}const cn=function(a){let p=null;if(be(P.beforeSanitizeElements,a,null),Xt(a))return Ne(a),!0;const h=H(a.nodeName);if(be(P.uponSanitizeElement,a,{tagName:h,allowedTags:U}),Ke&&a.hasChildNodes()&&!Kt(a.firstElementChild)&&q(/<[/\w!]/g,a.innerHTML)&&q(/<[/\w!]/g,a.textContent)||Ke&&a.namespaceURI===me&&h==="style"&&Kt(a.firstElementChild)||a.nodeType===qe.progressingInstruction||Ke&&a.nodeType===qe.comment&&q(/<[/\w]/g,a.data))return Ne(a),!0;if(Xe[h]||!(ke.tagCheck instanceof Function&&ke.tagCheck(h))&&!U[h]){if(!Xe[h]&&fn(h)&&(M.tagNameCheck instanceof RegExp&&q(M.tagNameCheck,h)||M.tagNameCheck instanceof Function&&M.tagNameCheck(h)))return!1;if($t&&!ue[h]){const R=A(a)||a.parentNode,Y=S(a)||a.childNodes;if(Y&&R){const D=Y.length;for(let he=D-1;he>=0;--he){const pe=w(Y[he],!0);R.insertBefore(pe,C(a))}}}return Ne(a),!0}return a instanceof f&&!ri(a)||(h==="noscript"||h==="noembed"||h==="noframes")&&q(/<\/no(script|embed|frames)/i,a.innerHTML)?(Ne(a),!0):(Ae&&a.nodeType===qe.text&&(p=a.textContent,$e([fe,ge,J],R=>{p=Ve(p,R," ")}),a.textContent!==p&&(He(r.removed,{element:a.cloneNode()}),a.textContent=p)),be(P.afterSanitizeElements,a,null),!1)},dn=function(a,p,h){if(ht[p]||Zr&&(p==="id"||p==="name")&&(h in n||h in ti))return!1;const R=G[p]||ke.attributeCheck instanceof Function&&ke.attributeCheck(p,a);if(!(Ft&&!ht[p]&&q(E,p))&&!(Yr&&q(O,p))){if(!R||ht[p]){if(!(fn(a)&&(M.tagNameCheck instanceof RegExp&&q(M.tagNameCheck,a)||M.tagNameCheck instanceof Function&&M.tagNameCheck(a))&&(M.attributeNameCheck instanceof RegExp&&q(M.attributeNameCheck,p)||M.attributeNameCheck instanceof Function&&M.attributeNameCheck(p,a))||p==="is"&&M.allowCustomizedBuiltInElements&&(M.tagNameCheck instanceof RegExp&&q(M.tagNameCheck,h)||M.tagNameCheck instanceof Function&&M.tagNameCheck(h))))return!1}else if(!Ut[p]&&!q(bt,Ve(h,$,""))&&!((p==="src"||p==="xlink:href"||p==="href")&&a!=="script"&&ur(h,"data:")===0&&en[a])&&!(Xr&&!q(B,Ve(h,$,"")))&&h)return!1}return!0},ni=v({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),fn=function(a){return!ni[Ue(a)]&&q(te,a)},un=function(a){be(P.beforeSanitizeAttributes,a,null);const{attributes:p}=a;if(!p||Xt(a))return;const h={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:G,forceKeepAttr:void 0};let R=p.length;for(;R--;){const Y=p[R],{name:D,namespaceURI:he,value:pe}=Y,Q=H(D),we=pe;let W=D==="value"?we:xa(we);if(h.attrName=Q,h.attrValue=W,h.keepAttr=!0,h.forceKeepAttr=void 0,be(P.uponSanitizeAttribute,a,h),W=h.attrValue,Jr&&(Q==="id"||Q==="name")&&ur(W,Qr)!==0&&(Oe(D,a),W=Qr+W),Ke&&q(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,W)){Oe(D,a);continue}if(Q==="attributename"&&fr(W,"href")){Oe(D,a);continue}if(h.forceKeepAttr)continue;if(!h.keepAttr){Oe(D,a);continue}if(!Kr&&q(/\/>/i,W)){Oe(D,a);continue}Ae&&$e([fe,ge,J],oi=>{W=Ve(W,oi," ")});const pn=H(a.nodeName);if(!dn(pn,Q,W)){Oe(D,a);continue}if(T&&typeof b=="object"&&typeof b.getAttributeType=="function"&&!he)switch(b.getAttributeType(pn,Q)){case"TrustedHTML":{W=T.createHTML(W);break}case"TrustedScriptURL":{W=T.createScriptURL(W);break}}if(W!==we)try{he?a.setAttributeNS(he,D,W):a.setAttribute(D,W),Xt(a)?Ne(a):dr(r.removed)}catch{Oe(D,a)}}be(P.afterSanitizeAttributes,a,null)},mn=function(a){let p=null;const h=sn(a);for(be(P.beforeSanitizeShadowDOM,a,null);p=h.nextNode();)be(P.uponSanitizeShadowNode,p,null),cn(p),un(p),p.content instanceof i&&mn(p.content);be(P.afterSanitizeShadowDOM,a,null)};return r.sanitize=function(a){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h=null,R=null,Y=null,D=null;if(Wt=!a,Wt&&(a="<!-->"),typeof a!="string"&&!Kt(a)&&(a=va(a),typeof a!="string"))throw rt("dirty is not a string, aborting");if(!r.isSupported)return a;if(zt||Yt(p),r.removed=[],typeof a=="string"&&(Ze=!1),Ze){const Q=a.nodeName;if(typeof Q=="string"){const we=H(Q);if(!U[we]||Xe[we])throw rt("root node is forbidden and cannot be sanitized in-place")}}else if(a instanceof c)h=ln("<!---->"),R=h.ownerDocument.importNode(a,!0),R.nodeType===qe.element&&R.nodeName==="BODY"||R.nodeName==="HTML"?h=R:h.appendChild(R);else{if(!Me&&!Ae&&!Re&&a.indexOf("<")===-1)return T&&yt?T.createHTML(a):a;if(h=ln(a),!h)return Me?null:yt?_:""}h&&Pt&&Ne(h.firstChild);const he=sn(Ze?a:h);for(;Y=he.nextNode();)cn(Y),un(Y),Y.content instanceof i&&mn(Y.content);if(Ze)return a;if(Me){if(Ae){h.normalize();let Q=h.innerHTML;$e([fe,ge,J],we=>{Q=Ve(Q,we," ")}),h.innerHTML=Q}if(xt)for(D=j.call(h.ownerDocument);h.firstChild;)D.appendChild(h.firstChild);else D=h;return(G.shadowroot||G.shadowrootmode)&&(D=de.call(o,D,!0)),D}let pe=Re?h.outerHTML:h.innerHTML;return Re&&U["!doctype"]&&h.ownerDocument&&h.ownerDocument.doctype&&h.ownerDocument.doctype.name&&q(kr,h.ownerDocument.doctype.name)&&(pe="<!DOCTYPE "+h.ownerDocument.doctype.name+`>
|
|
3
|
-
`+pe),Ae&&$e([fe,ge,J],Q=>{pe=Ve(pe,Q," ")}),T&&yt?T.createHTML(pe):pe},r.setConfig=function(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Yt(a),zt=!0},r.clearConfig=function(){Pe=null,zt=!1},r.isValidAttribute=function(a,p,h){Pe||Yt({});const R=H(a),Y=H(p);return dn(R,Y,h)},r.addHook=function(a,p){typeof p=="function"&&He(P[a],p)},r.removeHook=function(a,p){if(p!==void 0){const h=ba(P[a],p);return h===-1?void 0:ha(P[a],h,1)[0]}return dr(P[a])},r.removeHooks=function(a){P[a]=[]},r.removeAllHooks=function(){P=Cr()},r}var z=vr(),Ma=z;z.sanitize.bind(z),z.isSupported,z.addHook.bind(z),z.removeHook.bind(z),z.removeHooks.bind(z),z.removeAllHooks.bind(z),z.setConfig.bind(z),z.clearConfig.bind(z),z.isValidAttribute.bind(z),z.version,z.removed;const Tr={left:"tooltip-left",top:"tooltip-top",bottom:"tooltip-bottom",right:"tooltip-right"};t.defineComponent({name:"Tooltip",props:{id:{type:String,default:void 0},direction:{type:String,default:"right"},color:{type:String,default:"dark-3"},textColor:{type:String,default:"white"},width:{type:[Number,String],default:80},customClass:{type:String,default:""},content:{type:String,required:!0}},setup(e){const r="invisible opacity-0 group-hover:visible group-hover:opacity-100 group-focus:visible group-focus:opacity-100 z-[100] tooltip",n=t.computed(()=>[lr.bgColorVariant({color:e.color}),lr.textColorVariant({color:e.textColor})].join(" ")),o=t.computed(()=>({width:`${e.width}px`})),l=t.computed(()=>Tr[e.direction]||Tr.right),i=t.computed(()=>[r,l.value,n.value,e.customClass]);return()=>t.h("div",{id:e.id,class:i.value,role:"tooltip",innerHTML:Ma.sanitize(e.content),style:[o.value]})}});const ot=Math.min,ve=Math.max,at=Math.round,lt=Math.floor,ie=e=>({x:e,y:e}),Fa={left:"right",right:"left",bottom:"top",top:"bottom"},za={start:"end",end:"start"};function Er(e,r,n){return ve(e,ot(r,n))}function it(e,r){return typeof e=="function"?e(r):e}function Te(e){return e.split("-")[0]}function st(e){return e.split("-")[1]}function Sr(e){return e==="x"?"y":"x"}function Ar(e){return e==="y"?"height":"width"}const Pa=new Set(["top","bottom"]);function xe(e){return Pa.has(Te(e))?"y":"x"}function Rr(e){return Sr(xe(e))}function $a(e,r,n){n===void 0&&(n=!1);const o=st(e),l=Rr(e),i=Ar(l);let s=l==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return r.reference[i]>r.floating[i]&&(s=ct(s)),[s,ct(s)]}function Ha(e){const r=ct(e);return[Ot(e),r,Ot(r)]}function Ot(e){return e.replace(/start|end/g,r=>za[r])}const Nr=["left","right"],Or=["right","left"],Ua=["top","bottom"],Wa=["bottom","top"];function qa(e,r,n){switch(e){case"top":case"bottom":return n?r?Or:Nr:r?Nr:Or;case"left":case"right":return r?Ua:Wa;default:return[]}}function ja(e,r,n,o){const l=st(e);let i=qa(Te(e),n==="start",o);return l&&(i=i.map(s=>s+"-"+l),r&&(i=i.concat(i.map(Ot)))),i}function ct(e){return e.replace(/left|right|bottom|top/g,r=>Fa[r])}function Ga(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ya(e){return typeof e!="number"?Ga(e):{top:e,right:e,bottom:e,left:e}}function dt(e){const{x:r,y:n,width:o,height:l}=e;return{width:o,height:l,top:n,left:r,right:r+o,bottom:n+l,x:r,y:n}}function _r(e,r,n){let{reference:o,floating:l}=e;const i=xe(r),s=Rr(r),c=Ar(s),f=Te(r),d=i==="y",u=o.x+o.width/2-l.width/2,g=o.y+o.height/2-l.height/2,m=o[c]/2-l[c]/2;let b;switch(f){case"top":b={x:u,y:o.y-l.height};break;case"bottom":b={x:u,y:o.y+o.height};break;case"right":b={x:o.x+o.width,y:g};break;case"left":b={x:o.x-l.width,y:g};break;default:b={x:o.x,y:o.y}}switch(st(r)){case"start":b[s]-=m*(n&&d?-1:1);break;case"end":b[s]+=m*(n&&d?-1:1);break}return b}async function Xa(e,r){var n;r===void 0&&(r={});const{x:o,y:l,platform:i,rects:s,elements:c,strategy:f}=e,{boundary:d="clippingAncestors",rootBoundary:u="viewport",elementContext:g="floating",altBoundary:m=!1,padding:b=0}=it(r,e),y=Ya(b),k=c[m?g==="floating"?"reference":"floating":g],C=dt(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(k)))==null||n?k:k.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(c.floating)),boundary:d,rootBoundary:u,strategy:f})),S=g==="floating"?{x:o,y:l,width:s.floating.width,height:s.floating.height}:s.reference,A=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating)),T=await(i.isElement==null?void 0:i.isElement(A))?await(i.getScale==null?void 0:i.getScale(A))||{x:1,y:1}:{x:1,y:1},_=dt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:S,offsetParent:A,strategy:f}):S);return{top:(C.top-_.top+y.top)/T.y,bottom:(_.bottom-C.bottom+y.bottom)/T.y,left:(C.left-_.left+y.left)/T.x,right:(_.right-C.right+y.right)/T.x}}const Ka=async(e,r,n)=>{const{placement:o="bottom",strategy:l="absolute",middleware:i=[],platform:s}=n,c=i.filter(Boolean),f=await(s.isRTL==null?void 0:s.isRTL(r));let d=await s.getElementRects({reference:e,floating:r,strategy:l}),{x:u,y:g}=_r(d,o,f),m=o,b={},y=0;for(let k=0;k<c.length;k++){var w;const{name:C,fn:S}=c[k],{x:A,y:T,data:_,reset:V}=await S({x:u,y:g,initialPlacement:o,placement:m,strategy:l,middlewareData:b,rects:d,platform:{...s,detectOverflow:(w=s.detectOverflow)!=null?w:Xa},elements:{reference:e,floating:r}});u=A??u,g=T??g,b={...b,[C]:{...b[C],..._}},V&&y<=50&&(y++,typeof V=="object"&&(V.placement&&(m=V.placement),V.rects&&(d=V.rects===!0?await s.getElementRects({reference:e,floating:r,strategy:l}):V.rects),{x:u,y:g}=_r(d,m,f)),k=-1)}return{x:u,y:g,placement:m,strategy:l,middlewareData:b}},Za=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(r){var n,o;const{placement:l,middlewareData:i,rects:s,initialPlacement:c,platform:f,elements:d}=r,{mainAxis:u=!0,crossAxis:g=!0,fallbackPlacements:m,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:w=!0,...k}=it(e,r);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const C=Te(l),S=xe(c),A=Te(c)===c,T=await(f.isRTL==null?void 0:f.isRTL(d.floating)),_=m||(A||!w?[ct(c)]:Ha(c)),V=y!=="none";!m&&V&&_.push(...ja(c,w,y,T));const N=[c,..._],j=await f.detectOverflow(r,k),le=[];let de=((o=i.flip)==null?void 0:o.overflows)||[];if(u&&le.push(j[C]),g){const J=$a(l,s,T);le.push(j[J[0]],j[J[1]])}if(de=[...de,{placement:l,overflows:le}],!le.every(J=>J<=0)){var P,fe;const J=(((P=i.flip)==null?void 0:P.index)||0)+1,E=N[J];if(E&&(!(g==="alignment"?S!==xe(E):!1)||de.every($=>xe($.placement)===S?$.overflows[0]>0:!0)))return{data:{index:J,overflows:de},reset:{placement:E}};let O=(fe=de.filter(B=>B.overflows[0]<=0).sort((B,$)=>B.overflows[1]-$.overflows[1])[0])==null?void 0:fe.placement;if(!O)switch(b){case"bestFit":{var ge;const B=(ge=de.filter($=>{if(V){const te=xe($.placement);return te===S||te==="y"}return!0}).map($=>[$.placement,$.overflows.filter(te=>te>0).reduce((te,bt)=>te+bt,0)]).sort(($,te)=>$[1]-te[1])[0])==null?void 0:ge[0];B&&(O=B);break}case"initialPlacement":O=c;break}if(l!==O)return{reset:{placement:O}}}return{}}}},Ja=new Set(["left","top"]);async function Qa(e,r){const{placement:n,platform:o,elements:l}=e,i=await(o.isRTL==null?void 0:o.isRTL(l.floating)),s=Te(n),c=st(n),f=xe(n)==="y",d=Ja.has(s)?-1:1,u=i&&f?-1:1,g=it(r,e);let{mainAxis:m,crossAxis:b,alignmentAxis:y}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return c&&typeof y=="number"&&(b=c==="end"?y*-1:y),f?{x:b*u,y:m*d}:{x:m*d,y:b*u}}const el=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(r){var n,o;const{x:l,y:i,placement:s,middlewareData:c}=r,f=await Qa(r,e);return s===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:l+f.x,y:i+f.y,data:{...f,placement:s}}}}},tl=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(r){const{x:n,y:o,placement:l,platform:i}=r,{mainAxis:s=!0,crossAxis:c=!1,limiter:f={fn:C=>{let{x:S,y:A}=C;return{x:S,y:A}}},...d}=it(e,r),u={x:n,y:o},g=await i.detectOverflow(r,d),m=xe(Te(l)),b=Sr(m);let y=u[b],w=u[m];if(s){const C=b==="y"?"top":"left",S=b==="y"?"bottom":"right",A=y+g[C],T=y-g[S];y=Er(A,y,T)}if(c){const C=m==="y"?"top":"left",S=m==="y"?"bottom":"right",A=w+g[C],T=w-g[S];w=Er(A,w,T)}const k=f.fn({...r,[b]:y,[m]:w});return{...k,data:{x:k.x-n,y:k.y-o,enabled:{[b]:s,[m]:c}}}}}};function ft(){return typeof window<"u"}function Ee(e){return _t(e)?(e.nodeName||"").toLowerCase():"#document"}function re(e){var r;return(e==null||(r=e.ownerDocument)==null?void 0:r.defaultView)||window}function se(e){var r;return(r=(_t(e)?e.ownerDocument:e.document)||window.document)==null?void 0:r.documentElement}function _t(e){return ft()?e instanceof Node||e instanceof re(e).Node:!1}function oe(e){return ft()?e instanceof Element||e instanceof re(e).Element:!1}function ce(e){return ft()?e instanceof HTMLElement||e instanceof re(e).HTMLElement:!1}function Br(e){return!ft()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof re(e).ShadowRoot}const rl=new Set(["inline","contents"]);function je(e){const{overflow:r,overflowX:n,overflowY:o,display:l}=ae(e);return/auto|scroll|overlay|hidden|clip/.test(r+o+n)&&!rl.has(l)}const nl=new Set(["table","td","th"]);function ol(e){return nl.has(Ee(e))}const al=[":popover-open",":modal"];function ut(e){return al.some(r=>{try{return e.matches(r)}catch{return!1}})}const ll=["transform","translate","scale","rotate","perspective"],il=["transform","translate","scale","rotate","perspective","filter"],sl=["paint","layout","strict","content"];function Bt(e){const r=Vt(),n=oe(e)?ae(e):e;return ll.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!r&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!r&&(n.filter?n.filter!=="none":!1)||il.some(o=>(n.willChange||"").includes(o))||sl.some(o=>(n.contain||"").includes(o))}function cl(e){let r=ye(e);for(;ce(r)&&!Le(r);){if(Bt(r))return r;if(ut(r))return null;r=ye(r)}return null}function Vt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const dl=new Set(["html","body","#document"]);function Le(e){return dl.has(Ee(e))}function ae(e){return re(e).getComputedStyle(e)}function mt(e){return oe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ye(e){if(Ee(e)==="html")return e;const r=e.assignedSlot||e.parentNode||Br(e)&&e.host||se(e);return Br(r)?r.host:r}function Vr(e){const r=ye(e);return Le(r)?e.ownerDocument?e.ownerDocument.body:e.body:ce(r)&&je(r)?r:Vr(r)}function Ge(e,r,n){var o;r===void 0&&(r=[]),n===void 0&&(n=!0);const l=Vr(e),i=l===((o=e.ownerDocument)==null?void 0:o.body),s=re(l);if(i){const c=Dt(s);return r.concat(s,s.visualViewport||[],je(l)?l:[],c&&n?Ge(c):[])}return r.concat(l,Ge(l,[],n))}function Dt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Dr(e){const r=ae(e);let n=parseFloat(r.width)||0,o=parseFloat(r.height)||0;const l=ce(e),i=l?e.offsetWidth:n,s=l?e.offsetHeight:o,c=at(n)!==i||at(o)!==s;return c&&(n=i,o=s),{width:n,height:o,$:c}}function Lt(e){return oe(e)?e:e.contextElement}function Ie(e){const r=Lt(e);if(!ce(r))return ie(1);const n=r.getBoundingClientRect(),{width:o,height:l,$:i}=Dr(r);let s=(i?at(n.width):n.width)/o,c=(i?at(n.height):n.height)/l;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const fl=ie(0);function Lr(e){const r=re(e);return!Vt()||!r.visualViewport?fl:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function ul(e,r,n){return r===void 0&&(r=!1),!n||r&&n!==re(e)?!1:r}function Se(e,r,n,o){r===void 0&&(r=!1),n===void 0&&(n=!1);const l=e.getBoundingClientRect(),i=Lt(e);let s=ie(1);r&&(o?oe(o)&&(s=Ie(o)):s=Ie(e));const c=ul(i,n,o)?Lr(i):ie(0);let f=(l.left+c.x)/s.x,d=(l.top+c.y)/s.y,u=l.width/s.x,g=l.height/s.y;if(i){const m=re(i),b=o&&oe(o)?re(o):o;let y=m,w=Dt(y);for(;w&&o&&b!==y;){const k=Ie(w),C=w.getBoundingClientRect(),S=ae(w),A=C.left+(w.clientLeft+parseFloat(S.paddingLeft))*k.x,T=C.top+(w.clientTop+parseFloat(S.paddingTop))*k.y;f*=k.x,d*=k.y,u*=k.x,g*=k.y,f+=A,d+=T,y=re(w),w=Dt(y)}}return dt({width:u,height:g,x:f,y:d})}function pt(e,r){const n=mt(e).scrollLeft;return r?r.left+n:Se(se(e)).left+n}function Ir(e,r){const n=e.getBoundingClientRect(),o=n.left+r.scrollLeft-pt(e,n),l=n.top+r.scrollTop;return{x:o,y:l}}function ml(e){let{elements:r,rect:n,offsetParent:o,strategy:l}=e;const i=l==="fixed",s=se(o),c=r?ut(r.floating):!1;if(o===s||c&&i)return n;let f={scrollLeft:0,scrollTop:0},d=ie(1);const u=ie(0),g=ce(o);if((g||!g&&!i)&&((Ee(o)!=="body"||je(s))&&(f=mt(o)),ce(o))){const b=Se(o);d=Ie(o),u.x=b.x+o.clientLeft,u.y=b.y+o.clientTop}const m=s&&!g&&!i?Ir(s,f):ie(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-f.scrollLeft*d.x+u.x+m.x,y:n.y*d.y-f.scrollTop*d.y+u.y+m.y}}function pl(e){return Array.from(e.getClientRects())}function gl(e){const r=se(e),n=mt(e),o=e.ownerDocument.body,l=ve(r.scrollWidth,r.clientWidth,o.scrollWidth,o.clientWidth),i=ve(r.scrollHeight,r.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+pt(e);const c=-n.scrollTop;return ae(o).direction==="rtl"&&(s+=ve(r.clientWidth,o.clientWidth)-l),{width:l,height:i,x:s,y:c}}const Mr=25;function bl(e,r){const n=re(e),o=se(e),l=n.visualViewport;let i=o.clientWidth,s=o.clientHeight,c=0,f=0;if(l){i=l.width,s=l.height;const u=Vt();(!u||u&&r==="fixed")&&(c=l.offsetLeft,f=l.offsetTop)}const d=pt(o);if(d<=0){const u=o.ownerDocument,g=u.body,m=getComputedStyle(g),b=u.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,y=Math.abs(o.clientWidth-g.clientWidth-b);y<=Mr&&(i-=y)}else d<=Mr&&(i+=d);return{width:i,height:s,x:c,y:f}}const hl=new Set(["absolute","fixed"]);function xl(e,r){const n=Se(e,!0,r==="fixed"),o=n.top+e.clientTop,l=n.left+e.clientLeft,i=ce(e)?Ie(e):ie(1),s=e.clientWidth*i.x,c=e.clientHeight*i.y,f=l*i.x,d=o*i.y;return{width:s,height:c,x:f,y:d}}function Fr(e,r,n){let o;if(r==="viewport")o=bl(e,n);else if(r==="document")o=gl(se(e));else if(oe(r))o=xl(r,n);else{const l=Lr(e);o={x:r.x-l.x,y:r.y-l.y,width:r.width,height:r.height}}return dt(o)}function zr(e,r){const n=ye(e);return n===r||!oe(n)||Le(n)?!1:ae(n).position==="fixed"||zr(n,r)}function yl(e,r){const n=r.get(e);if(n)return n;let o=Ge(e,[],!1).filter(c=>oe(c)&&Ee(c)!=="body"),l=null;const i=ae(e).position==="fixed";let s=i?ye(e):e;for(;oe(s)&&!Le(s);){const c=ae(s),f=Bt(s);!f&&c.position==="fixed"&&(l=null),(i?!f&&!l:!f&&c.position==="static"&&!!l&&hl.has(l.position)||je(s)&&!f&&zr(e,s))?o=o.filter(u=>u!==s):l=c,s=ye(s)}return r.set(e,o),o}function kl(e){let{element:r,boundary:n,rootBoundary:o,strategy:l}=e;const s=[...n==="clippingAncestors"?ut(r)?[]:yl(r,this._c):[].concat(n),o],c=s[0],f=s.reduce((d,u)=>{const g=Fr(r,u,l);return d.top=ve(g.top,d.top),d.right=ot(g.right,d.right),d.bottom=ot(g.bottom,d.bottom),d.left=ve(g.left,d.left),d},Fr(r,c,l));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function wl(e){const{width:r,height:n}=Dr(e);return{width:r,height:n}}function Cl(e,r,n){const o=ce(r),l=se(r),i=n==="fixed",s=Se(e,!0,i,r);let c={scrollLeft:0,scrollTop:0};const f=ie(0);function d(){f.x=pt(l)}if(o||!o&&!i)if((Ee(r)!=="body"||je(l))&&(c=mt(r)),o){const b=Se(r,!0,i,r);f.x=b.x+r.clientLeft,f.y=b.y+r.clientTop}else l&&d();i&&!o&&l&&d();const u=l&&!o&&!i?Ir(l,c):ie(0),g=s.left+c.scrollLeft-f.x-u.x,m=s.top+c.scrollTop-f.y-u.y;return{x:g,y:m,width:s.width,height:s.height}}function It(e){return ae(e).position==="static"}function Pr(e,r){if(!ce(e)||ae(e).position==="fixed")return null;if(r)return r(e);let n=e.offsetParent;return se(e)===n&&(n=n.ownerDocument.body),n}function $r(e,r){const n=re(e);if(ut(e))return n;if(!ce(e)){let l=ye(e);for(;l&&!Le(l);){if(oe(l)&&!It(l))return l;l=ye(l)}return n}let o=Pr(e,r);for(;o&&ol(o)&&It(o);)o=Pr(o,r);return o&&Le(o)&&It(o)&&!Bt(o)?n:o||cl(e)||n}const vl=async function(e){const r=this.getOffsetParent||$r,n=this.getDimensions,o=await n(e.floating);return{reference:Cl(e.reference,await r(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Tl(e){return ae(e).direction==="rtl"}const El={convertOffsetParentRelativeRectToViewportRelativeRect:ml,getDocumentElement:se,getClippingRect:kl,getOffsetParent:$r,getElementRects:vl,getClientRects:pl,getDimensions:wl,getScale:Ie,isElement:oe,isRTL:Tl};function Hr(e,r){return e.x===r.x&&e.y===r.y&&e.width===r.width&&e.height===r.height}function Sl(e,r){let n=null,o;const l=se(e);function i(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function s(c,f){c===void 0&&(c=!1),f===void 0&&(f=1),i();const d=e.getBoundingClientRect(),{left:u,top:g,width:m,height:b}=d;if(c||r(),!m||!b)return;const y=lt(g),w=lt(l.clientWidth-(u+m)),k=lt(l.clientHeight-(g+b)),C=lt(u),A={rootMargin:-y+"px "+-w+"px "+-k+"px "+-C+"px",threshold:ve(0,ot(1,f))||1};let T=!0;function _(V){const N=V[0].intersectionRatio;if(N!==f){if(!T)return s();N?s(!1,N):o=setTimeout(()=>{s(!1,1e-7)},1e3)}N===1&&!Hr(d,e.getBoundingClientRect())&&s(),T=!1}try{n=new IntersectionObserver(_,{...A,root:l.ownerDocument})}catch{n=new IntersectionObserver(_,A)}n.observe(e)}return s(!0),i}function Al(e,r,n,o){o===void 0&&(o={});const{ancestorScroll:l=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:f=!1}=o,d=Lt(e),u=l||i?[...d?Ge(d):[],...Ge(r)]:[];u.forEach(C=>{l&&C.addEventListener("scroll",n,{passive:!0}),i&&C.addEventListener("resize",n)});const g=d&&c?Sl(d,n):null;let m=-1,b=null;s&&(b=new ResizeObserver(C=>{let[S]=C;S&&S.target===d&&b&&(b.unobserve(r),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var A;(A=b)==null||A.observe(r)})),n()}),d&&!f&&b.observe(d),b.observe(r));let y,w=f?Se(e):null;f&&k();function k(){const C=Se(e);w&&!Hr(w,C)&&n(),w=C,y=requestAnimationFrame(k)}return n(),()=>{var C;u.forEach(S=>{l&&S.removeEventListener("scroll",n),i&&S.removeEventListener("resize",n)}),g?.(),(C=b)==null||C.disconnect(),b=null,f&&cancelAnimationFrame(y)}}const Rl=el,Nl=tl,Ol=Za,_l=(e,r,n)=>{const o=new Map,l={platform:El,...n},i={...l.platform,_c:o};return Ka(e,r,{...l,platform:i})};function Bl(e){return e!=null&&typeof e=="object"&&"$el"in e}function Ur(e){if(Bl(e)){const r=e.$el;return _t(r)&&Ee(r)==="#comment"?null:r}return e}function Ye(e){return typeof e=="function"?e():t.unref(e)}function Wr(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function qr(e,r){const n=Wr(e);return Math.round(r*n)/n}function Vl(e,r,n){n===void 0&&(n={});const o=n.whileElementsMounted,l=t.computed(()=>{var N;return(N=Ye(n.open))!=null?N:!0}),i=t.computed(()=>Ye(n.middleware)),s=t.computed(()=>{var N;return(N=Ye(n.placement))!=null?N:"bottom"}),c=t.computed(()=>{var N;return(N=Ye(n.strategy))!=null?N:"absolute"}),f=t.computed(()=>{var N;return(N=Ye(n.transform))!=null?N:!0}),d=t.computed(()=>Ur(e.value)),u=t.computed(()=>Ur(r.value)),g=t.ref(0),m=t.ref(0),b=t.ref(c.value),y=t.ref(s.value),w=t.shallowRef({}),k=t.ref(!1),C=t.computed(()=>{const N={position:b.value,left:"0",top:"0"};if(!u.value)return N;const j=qr(u.value,g.value),le=qr(u.value,m.value);return f.value?{...N,transform:"translate("+j+"px, "+le+"px)",...Wr(u.value)>=1.5&&{willChange:"transform"}}:{position:b.value,left:j+"px",top:le+"px"}});let S;function A(){if(d.value==null||u.value==null)return;const N=l.value;_l(d.value,u.value,{middleware:i.value,placement:s.value,strategy:c.value}).then(j=>{g.value=j.x,m.value=j.y,b.value=j.strategy,y.value=j.placement,w.value=j.middlewareData,k.value=N!==!1})}function T(){typeof S=="function"&&(S(),S=void 0)}function _(){if(T(),o===void 0){A();return}if(d.value!=null&&u.value!=null){S=o(d.value,u.value,A);return}}function V(){l.value||(k.value=!1)}return t.watch([i,s,c,l],A,{flush:"sync"}),t.watch([d,u],_,{flush:"sync"}),t.watch(l,V,{flush:"sync"}),t.getCurrentScope()&&t.onScopeDispose(T),{x:t.shallowReadonly(g),y:t.shallowReadonly(m),strategy:t.shallowReadonly(b),placement:t.shallowReadonly(y),middlewareData:t.shallowReadonly(w),isPositioned:t.shallowReadonly(k),floatingStyles:C,update:A}}const Dl=t.defineComponent({__name:"CaretDown",props:{color:{default:"dark-4"},className:{default:""}},setup(e){const r=e,n=t.computed(()=>[L.generateClass.svgFillColorVariant({color:r.color}),r.className].filter(Boolean).join(" "));return(o,l)=>(t.openBlock(),t.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512","aria-hidden":"true",focusable:"false",class:t.normalizeClass(n.value)},[...l[0]||(l[0]=[t.createElementVNode("path",{d:"M137.4 374.6c12.5 12.5 32.8 12.5 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l128 128z"},null,-1)])],2))}}),Ll=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),gt=e=>typeof e=="string"?e:e.text,Mt=e=>typeof e=="string"?e:e.value,Il=(e,r)=>t.computed(()=>{const n=t.toValue(e),o=t.toValue(r);if(o==="")return n;const l=new RegExp(Ll(o),"i");return n.filter(i=>l.test(gt(i)))}),Ml=e=>{const{isOpen:r,activeIndex:n,onSelect:o,onClear:l,onActiveChange:i}=e,s=u=>{const g=t.toValue(e.optionCount);if(g<=0){n.value=-1;return}const m=Math.max(0,Math.min(u,g-1));n.value=m,i?.(m)},c=()=>{r.value=!1,n.value=-1},f=u=>{switch(u.key){case"ArrowDown":if(u.preventDefault(),!r.value){r.value=!0;return}if(u.altKey)return;s(n.value+1);return;case"ArrowUp":if(u.preventDefault(),!r.value){r.value=!0;return}s(n.value<0?t.toValue(e.optionCount)-1:n.value-1);return;case"Home":if(!r.value)return;u.preventDefault(),s(0);return;case"End":if(!r.value)return;u.preventDefault(),s(t.toValue(e.optionCount)-1);return;case"Enter":if(!r.value||n.value<0)return;u.preventDefault(),o(n.value);return;case"Escape":if(r.value){c();return}l();return;case"Tab":r.value&&c();return;default:return}},d=t.computed(()=>r.value&&n.value>=0?`${t.toValue(e.idPrefix)}-option-${n.value}`:void 0);return{onKeydown:f,activeDescendantId:d}},Fl=["id","placeholder","disabled","aria-expanded","aria-controls","aria-activedescendant","aria-required","aria-invalid","aria-describedby"],zl=["disabled"],Pl=["disabled"],$l=["id"],Hl=["id","aria-selected","onClick","onMouseenter"],Ul=["id"],Wl=["name","value"],ql=tr(t.defineComponent({__name:"MclSelect",props:t.mergeModels({options:{},id:{},name:{},placeholder:{default:""},showBorder:{type:Boolean,default:!1},borderColor:{default:"light-4"},rounded:{type:Boolean,default:!1},showHighlight:{type:Boolean,default:!0},highlightColor:{default:"primary"},textColor:{default:"black"},bgColor:{default:"light-1"},iconColor:{default:"dark-4"},optionHoverColor:{default:"primary"},showShadow:{type:Boolean,default:!0},noMatchText:{default:"No match."},invalidFeedback:{},invalid:{type:Boolean,default:void 0},required:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0}},{modelValue:{default:null},modelModifiers:{}}),emits:t.mergeModels(["open","close","clear","changed","select"],["update:modelValue"]),setup(e,{emit:r}){const n=e,o=t.useModel(e,"modelValue"),l=r,i=Ce(n),s=et(n),c=t.ref(),f=t.ref(),d=t.ref(),u=t.ref([]),g=t.ref(),m=t.ref(!1),b=t.ref(-1),y=E=>{if(E===null||E==="")return"";const O=n.options.find(B=>Mt(B)===E);return O?gt(O):String(E)},w=t.ref(y(o.value)),k=t.ref(!1),C=Il(()=>n.options,()=>k.value?w.value:""),S=(E,O)=>{u.value[O]=E},A=E=>{u.value[E]?.scrollIntoView?.({block:"nearest"})},T=()=>{m.value||(m.value=!0,k.value=!1,b.value=-1)},_=()=>{m.value=!1,b.value=-1},V=E=>{w.value=gt(E);const O=Mt(E);o.value=O,k.value=!1,m.value=!1,b.value=-1,l("select",O)},N=()=>{w.value="",b.value=-1,o.value=null,k.value=!1,l("clear"),f.value?.focus()},{onKeydown:j,activeDescendantId:le}=Ml({isOpen:m,activeIndex:b,optionCount:()=>C.value.length,idPrefix:()=>i.id,onSelect:E=>{const O=C.value[E];O!==void 0&&V(O)},onClear:N,onActiveChange:A}),de=()=>{if(m.value){_();return}T(),f.value?.focus()},P=t.computed(()=>{const E=[L.generateClass.beforeBgColorVariant({color:n.highlightColor})];return n.rounded&&E.push("rounded-b-md"),E.join(" ")}),fe=t.computed(()=>{const E=[L.generateClass.bgColorVariant({color:n.bgColor}),L.generateClass.borderColorVariant({color:n.borderColor})];return n.showHighlight||E.push("mt-2xs"),n.rounded&&E.push("rounded-md"),E.join(" ")}),ge=E=>o.value!==null&&o.value!==""&&Mt(E)===o.value,{floatingStyles:J}=Vl(c,d,{whileElementsMounted:Al,strategy:"absolute",open:m,transform:!1,placement:"bottom",middleware:[Ol(),Rl(-2.2),Nl()]});return gn.useResizeObserver(c,()=>{c.value&&(g.value=c.value.clientWidth)}),t.watch(C,()=>{b.value=-1}),t.watch(m,E=>{if(E){l("open");return}k.value&&(w.value=y(o.value),k.value=!1),l("close")}),t.watch(()=>i.disabled.value,E=>{E&&_()}),t.watch(()=>n.options,()=>{k.value||(w.value=y(o.value))}),t.watch(o,E=>{w.value=y(E),k.value=!1,E!==null&&l("changed",E)}),(E,O)=>t.withDirectives((t.openBlock(),t.createElementBlock("div",{ref_key:"rootRef",ref:c,class:"relative"},[t.createElementVNode("div",{class:t.normalizeClass(["relative flex gap-3xs p-2xs",[t.unref(s),!e.showHighlight&&m.value&&t.unref(L.generateClass).ringColorVariant({color:e.borderColor})+" ring-4"]])},[t.withDirectives(t.createElementVNode("input",{id:t.unref(i).id,ref_key:"inputRef",ref:f,"onUpdate:modelValue":O[0]||(O[0]=B=>w.value=B),type:"text",role:"combobox",autocomplete:"off",class:"w-full bg-transparent outline-none disabled:cursor-not-allowed",placeholder:e.placeholder,disabled:t.unref(i).disabled.value,"aria-autocomplete":"list","aria-expanded":m.value,"aria-controls":`${t.unref(i).id}-listbox`,"aria-activedescendant":t.unref(le),"aria-required":t.unref(i).required.value||void 0,"aria-invalid":t.unref(i).invalid.value||void 0,"aria-describedby":t.unref(i).describedBy.value,onFocus:T,onInput:O[1]||(O[1]=B=>k.value=!0),onKeydown:O[2]||(O[2]=(...B)=>t.unref(j)&&t.unref(j)(...B))},null,40,Fl),[[t.vModelText,w.value]]),w.value!==""?(t.openBlock(),t.createElementBlock("button",{key:0,"data-mcl":"clear",type:"button","aria-label":"Clear selection",class:"flex items-center px-3xs",disabled:t.unref(i).disabled.value,onClick:N},[t.createVNode(er,{color:e.iconColor,"class-name":"h-xs opacity-70"},null,8,["color"])],8,zl)):t.createCommentVNode("",!0),t.createElementVNode("button",{"data-mcl":"caret",type:"button",tabindex:"-1","aria-label":"Toggle options",class:"flex items-center px-3xs",disabled:t.unref(i).disabled.value,onClick:de},[t.createVNode(Dl,{color:e.iconColor,"class-name":`h-xs transition-transform duration-300 ease-in ${m.value?"rotate-180":"rotate-0"}`},null,8,["color","class-name"])],8,Pl)],2),e.showHighlight?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["relative -top-1 h-3xs overflow-hidden before:absolute before:bottom-0 before:left-0 before:h-full before:transition-[width] before:duration-300 before:ease-linear",[m.value?"before:w-full":"before:w-0",P.value]])},null,2)):t.createCommentVNode("",!0),t.createVNode(t.Transition,{name:"options"},{default:t.withCtx(()=>[m.value&&t.unref(C).length>0?(t.openBlock(),t.createElementBlock("ul",{key:0,id:`${t.unref(i).id}-listbox`,ref_key:"dropdownRef",ref:d,role:"listbox",class:t.normalizeClass(["max-h-[12.5rem] overflow-y-auto border-2",fe.value]),style:t.normalizeStyle({width:`${g.value}px`,...t.unref(J)})},[t.renderSlot(E.$slots,"dropdown",{options:t.unref(C),activeIndex:b.value,optionClick:V,setRef:S,hover:B=>b.value=B,optionId:B=>`${t.unref(i).id}-option-${B}`},()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(C),(B,$)=>(t.openBlock(),t.createElementBlock("li",{id:`${t.unref(i).id}-option-${$}`,key:$,ref_for:!0,ref:te=>S(te,$),role:"option",class:t.normalizeClass(["cursor-pointer p-2xs",[b.value===$&&t.unref(L.generateClass).bgColorVariant({color:e.optionHoverColor})]]),"aria-selected":ge(B),onClick:te=>V(B),onMouseenter:te=>b.value=$},t.toDisplayString(t.unref(gt)(B)),43,Hl))),128))],!0)],14,$l)):t.createCommentVNode("",!0)]),_:3}),m.value&&t.unref(C).length===0?(t.openBlock(),t.createElementBlock("div",{key:1,id:`${t.unref(i).id}-listbox`,ref_key:"dropdownRef",ref:d,role:"status",class:t.normalizeClass(["border-2 p-2xs",fe.value]),style:t.normalizeStyle({width:`${g.value}px`,...t.unref(J)})},[t.renderSlot(E.$slots,"no-match",{},()=>[t.createElementVNode("span",null,t.toDisplayString(e.noMatchText),1)],!0)],14,Ul)):t.createCommentVNode("",!0),t.unref(i).name.value?(t.openBlock(),t.createElementBlock("input",{key:2,type:"hidden",name:t.unref(i).name.value,value:o.value??""},null,8,Wl)):t.createCommentVNode("",!0),t.unref(i).feedbackOwnedByGroup?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(_e,{key:3,id:t.unref(i).errorId,invalid:t.unref(i).invalid.value,text:e.invalidFeedback},{default:t.withCtx(()=>[E.$slots["invalid-feedback"]?t.renderSlot(E.$slots,"invalid-feedback",{key:0},void 0,!0):t.createCommentVNode("",!0)]),_:3},8,["id","invalid","text"]))])),[[t.unref(ua),_]])}}),[["__scopeId","data-v-2695c901"]]),jl=["id","name","rows","placeholder","required","disabled","aria-invalid","aria-describedby"],Gl=t.defineComponent({__name:"MclTextArea",props:t.mergeModels({id:{},name:{},placeholder:{default:""},rows:{default:5},showBorder:{type:Boolean,default:!1},borderColor:{default:"light-4"},rounded:{type:Boolean,default:!1},showHighlight:{type:Boolean,default:!0},highlightColor:{default:"primary"},textColor:{default:"black"},bgColor:{default:"light-1"},showShadow:{type:Boolean,default:!0},invalidFeedback:{},invalid:{type:Boolean,default:void 0},required:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const r=e,n=t.useModel(e,"modelValue"),o=Ce(r),l=et(r);return(i,s)=>(t.openBlock(),t.createElementBlock("div",null,[t.withDirectives(t.createElementVNode("textarea",{id:t.unref(o).id,"onUpdate:modelValue":s[0]||(s[0]=c=>n.value=c),class:t.normalizeClass(["peer w-full p-2xs outline-none disabled:cursor-not-allowed disabled:opacity-50",t.unref(l)]),name:t.unref(o).name.value,rows:e.rows,placeholder:e.placeholder,required:t.unref(o).required.value,disabled:t.unref(o).disabled.value,"aria-invalid":t.unref(o).invalid.value||void 0,"aria-describedby":t.unref(o).describedBy.value},null,10,jl),[[t.vModelText,n.value]]),e.showHighlight?(t.openBlock(),t.createBlock(rr,{key:0,color:e.highlightColor,rounded:e.rounded,offset:2.5},null,8,["color","rounded"])):t.createCommentVNode("",!0),t.unref(o).feedbackOwnedByGroup?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(_e,{key:1,id:t.unref(o).errorId,invalid:t.unref(o).invalid.value,text:e.invalidFeedback},{default:t.withCtx(()=>[i.$slots["invalid-feedback"]?t.renderSlot(i.$slots,"invalid-feedback",{key:0}):t.createCommentVNode("",!0)]),_:3},8,["id","invalid","text"]))]))}}),Yl={class:"relative inline-flex"},Xl=["id","name","value","required","disabled","aria-invalid","aria-describedby"],Kl=t.defineComponent({__name:"MclCheckbox",props:t.mergeModels({id:{},name:{},size:{default:"md"},bgColor:{default:"light-1"},checkedBgColor:{default:"warning"},indicatorColor:{default:"dark-3"},borderColor:{default:"dark-1"},showShadow:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},value:{},invalid:{type:Boolean,default:void 0},required:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:t.mergeModels(["change"],["update:modelValue"]),setup(e,{emit:r}){const n=e,o=t.useModel(e,"modelValue"),l=r,i=Ce(n,{rendersOwnFeedback:!1}),{boxClass:s,sizeClass:c}=Ct(n),f=d=>{l("change",d)};return(d,u)=>(t.openBlock(),t.createElementBlock("div",Yl,[t.withDirectives(t.createElementVNode("input",{id:t.unref(i).id,"onUpdate:modelValue":u[0]||(u[0]=g=>o.value=g),type:"checkbox",class:"peer absolute inset-0 z-10 h-full w-full cursor-pointer appearance-none opacity-0 disabled:cursor-not-allowed",name:t.unref(i).name.value,value:e.value,required:t.unref(i).required.value,disabled:t.unref(i).disabled.value,"aria-invalid":t.unref(i).invalid.value||void 0,"aria-describedby":t.unref(i).describedBy.value,onChange:f},null,40,Xl),[[t.vModelCheckbox,o.value]]),t.createElementVNode("span",{"aria-hidden":"true",class:t.normalizeClass(["relative inline-block border p-3xs transition-colors duration-200 ease-linear peer-disabled:opacity-50 before:absolute before:top-1/2 before:left-1/2 before:-translate-x-1/2 before:-translate-y-1/2 before:opacity-0 before:transition-opacity before:duration-200 peer-checked:before:opacity-100",[t.unref(s),t.unref(c)]])},null,2)]))}});X.MclCheckbox=Kl,X.MclFormGroup=Sn,X.MclInputFile=Bn,X.MclInputRadio=Fn,X.MclInputSwitch=Hn,X.MclInputText=Wn,X.MclSelect=ql,X.MclTextArea=Gl,Object.defineProperty(X,Symbol.toStringTag,{value:"Module"})}));
|
|
2
|
+
(function(M,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@bobbykim/manguito-theme"),require("@bobbykim/manguito-theme/directives"),require("@vueuse/core")):typeof define=="function"&&define.amd?define(["exports","vue","@bobbykim/manguito-theme","@bobbykim/manguito-theme/directives","@vueuse/core"],e):(M=typeof globalThis<"u"?globalThis:M||self,e(M.MclForms={},M.Vue,M.ManguitoTheme,M.ManguitoThemeDirectives,M.core))})(this,(function(M,e,v,et,tt){"use strict";const ot=["id"],nt={class:"text-xs text-danger"},X=e.defineComponent({__name:"FieldFeedback",props:{id:{},invalid:{type:Boolean,default:!1},text:{default:""}},setup(t){return(o,n)=>t.invalid?(e.openBlock(),e.createElementBlock("div",{key:0,id:t.id,role:"alert",class:"ml-3xs"},[e.renderSlot(o.$slots,"default",{},()=>[e.createElementVNode("span",nt,e.toDisplayString(t.text),1)])],8,ot)):e.createCommentVNode("",!0)}}),Ee=Symbol("mcl-field");let lt=0;const oe=t=>t!==void 0&&t!==""?t:void 0,Re=t=>oe(t)??oe(e.useId())??`mcl-field-${++lt}`,Me=(t,o,n)=>e.computed(()=>{const l=[];return t&&l.push(t),n.value&&o!==void 0&&l.push(o),l.length>0?l.join(" "):void 0}),rt=t=>{const o=Re(t.fieldId),n=e.computed(()=>e.toValue(t.invalid)??!1),l=`${o}-error`,a=t.hasHelpText?`${o}-description`:void 0,r={id:o,name:e.computed(()=>e.toValue(t.name)??o),errorId:l,descriptionId:a,invalid:n,required:e.computed(()=>e.toValue(t.required)??!1),disabled:e.computed(()=>e.toValue(t.disabled)??!1),describedBy:Me(a,l,n),feedbackOwnedByGroup:t.ownsFeedback,isGroupLabel:t.isGroupLabel};return e.provide(Ee,r),r},W=(t,o)=>{const n=e.inject(Ee,null),l=o?.rendersOwnFeedback??!0,a=Re(void 0),r=oe(t.id),i=n!==null&&!n.isGroupLabel?oe(n.id):void 0,s=r??i??a,d=n?.feedbackOwnedByGroup??!1,c=d?n.errorId:`${s}-error`,f=d||l,m=n?.descriptionId,u=e.computed(()=>t.invalid??n?.invalid.value??!1);return{id:s,name:e.computed(()=>t.name??e.toValue(n?.name)),errorId:c,descriptionId:m,invalid:u,required:e.computed(()=>t.required??n?.required.value??!1),disabled:e.computed(()=>t.disabled??n?.disabled.value??!1),describedBy:Me(m,f?c:void 0,u),feedbackOwnedByGroup:d,isGroupLabel:n?.isGroupLabel??!1}},at={key:0,class:"m-0 min-w-0 border-0 p-0"},it={key:0,class:"inline-block"},st=["id"],ct={key:1},dt=["for"],ft=["id"],ut=e.defineComponent({__name:"MclFormGroup",props:{fieldId:{},groupLabel:{type:Boolean,default:!1},label:{},helpText:{},invalidFeedback:{},invalid:{type:Boolean,default:void 0},required:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},textColor:{default:"dark-3"},textSize:{default:"md"},textBold:{type:Boolean,default:!1}},setup(t){const o=t,n=e.useSlots(),l=n["invalid-feedback"]!==void 0,a=o.helpText!==void 0||n.help!==void 0,r=o.invalidFeedback!==void 0||l,i=o.groupLabel,s=rt({fieldId:o.fieldId,invalid:()=>o.invalid,required:()=>o.required,disabled:()=>o.disabled,hasHelpText:a,ownsFeedback:r,isGroupLabel:i}),d=e.computed(()=>{const c=[v.generateClass.textColorVariant({color:o.textColor}),v.generateClass.bodyTextVariant({size:o.textSize})];return o.textBold&&c.push("font-bold"),c.join(" ")});return(c,f)=>e.unref(i)?(e.openBlock(),e.createElementBlock("fieldset",at,[t.label||c.$slots.label?(e.openBlock(),e.createElementBlock("legend",it,[e.renderSlot(c.$slots,"label",{},()=>[e.createElementVNode("span",{class:e.normalizeClass(["mb-2xs block",d.value])},e.toDisplayString(t.label),3)])])):e.createCommentVNode("",!0),e.unref(a)?(e.openBlock(),e.createElementBlock("p",{key:1,id:e.unref(s).descriptionId,class:"mb-2xs text-xs"},[e.renderSlot(c.$slots,"help",{},()=>[e.createTextVNode(e.toDisplayString(t.helpText),1)])],8,st)):e.createCommentVNode("",!0),e.renderSlot(c.$slots,"default"),e.unref(r)?(e.openBlock(),e.createBlock(X,{key:2,id:e.unref(s).errorId,invalid:e.unref(s).invalid.value,text:t.invalidFeedback},{default:e.withCtx(()=>[l?e.renderSlot(c.$slots,"invalid-feedback",{key:0}):e.createCommentVNode("",!0)]),_:3},8,["id","invalid","text"])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",ct,[t.label||c.$slots.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref(s).id,class:"inline-block"},[e.renderSlot(c.$slots,"label",{},()=>[e.createElementVNode("span",{class:e.normalizeClass(["mb-2xs block",d.value])},e.toDisplayString(t.label),3)])],8,dt)):e.createCommentVNode("",!0),e.unref(a)?(e.openBlock(),e.createElementBlock("p",{key:1,id:e.unref(s).descriptionId,class:"mb-2xs text-xs"},[e.renderSlot(c.$slots,"help",{},()=>[e.createTextVNode(e.toDisplayString(t.helpText),1)])],8,ft)):e.createCommentVNode("",!0),e.renderSlot(c.$slots,"default"),e.unref(r)?(e.openBlock(),e.createBlock(X,{key:2,id:e.unref(s).errorId,invalid:e.unref(s).invalid.value,text:t.invalidFeedback},{default:e.withCtx(()=>[l?e.renderSlot(c.$slots,"invalid-feedback",{key:0}):e.createCommentVNode("",!0)]),_:3},8,["id","invalid","text"])):e.createCommentVNode("",!0)]))}}),Oe=e.defineComponent({__name:"XMark",props:{color:{default:"dark-4"},className:{default:""}},setup(t){const o=t,n=e.computed(()=>[v.generateClass.svgFillColorVariant({color:o.color}),o.className].filter(Boolean).join(" "));return(l,a)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512","aria-hidden":"true",focusable:"false",class:e.normalizeClass(n.value)},[...a[0]||(a[0]=[e.createElementVNode("path",{d:"M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"},null,-1)])],2))}}),ne=t=>e.computed(()=>{const{bgColor:o,textColor:n,borderColor:l,showBorder:a,showShadow:r,rounded:i}=t,s=t.showHighlight??!1,d=[v.generateClass.bgColorVariant({color:o}),v.generateClass.textColorVariant({color:n})];return a&&d.push("border-2",v.generateClass.borderColorVariant({color:l})),s||d.push("focus-visible:ring-4 ring-offset-2 transition-all duration-300 ease-linear",v.generateClass.focusVisibleRingColorVariant({color:l})),r&&d.push("shadow-md"),i&&d.push("rounded-md"),d.join(" ")}),mt={class:"my-3xs mr-xs ml-3xs shrink-0"},pt=["aria-controls","disabled"],ht=["id","name","accept","required","disabled","aria-invalid","aria-describedby"],bt={key:0,class:"my-3xs mr-3xs self-stretch"},gt=["disabled"],yt=e.defineComponent({__name:"MclInputFile",props:e.mergeModels({id:{},name:{},accept:{default:"image/jpg,image/jpeg,image/png"},buttonText:{default:"Browse File"},buttonTextColor:{default:"dark-3"},buttonColor:{default:"light-4"},showBorder:{type:Boolean,default:!1},borderColor:{default:"light-4"},rounded:{type:Boolean,default:!1},bgColor:{default:"light-1"},textColor:{default:"black"},showShadow:{type:Boolean,default:!0},showClear:{type:Boolean,default:!1},invalidFeedback:{},invalid:{type:Boolean,default:void 0},required:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const o=t,n=e.useModel(t,"modelValue"),l=W(o),a=ne(o),r=e.ref(),i=e.ref(0),s=()=>{r.value?.click()},d=u=>{const p=u.target.files;n.value=p&&p.length>0?p[0]:null},c=()=>{n.value=null,i.value++},f=e.computed(()=>{const u=[v.generateClass.bgColorVariant({color:o.buttonColor}),v.generateClass.textColorVariant({color:o.buttonTextColor})];return o.rounded&&u.push("rounded-l-md"),u.join(" ")}),m=e.computed(()=>{const u=[v.generateClass.bgColorVariant({color:o.buttonColor})];return o.rounded&&u.push("rounded-r-md"),u.join(" ")});return(u,p)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",{class:e.normalizeClass(["flex items-center overflow-hidden",e.unref(a)])},[e.createElementVNode("div",mt,[e.createElementVNode("button",{type:"button","aria-controls":e.unref(l).id,disabled:e.unref(l).disabled.value,class:e.normalizeClass(["max-w-full px-xs py-2xs transition-all duration-200 ease-linear hover:bg-opacity-70 disabled:cursor-not-allowed disabled:opacity-50",f.value]),onClick:s},e.toDisplayString(t.buttonText),11,pt)]),(e.openBlock(),e.createElementBlock("input",{id:e.unref(l).id,ref_key:"inputRef",ref:r,key:i.value,type:"file",class:"w-full bg-transparent file:hidden",name:e.unref(l).name.value,accept:t.accept,required:e.unref(l).required.value,disabled:e.unref(l).disabled.value,"aria-invalid":e.unref(l).invalid.value||void 0,"aria-describedby":e.unref(l).describedBy.value,onChange:d},null,40,ht)),t.showClear?(e.openBlock(),e.createElementBlock("div",bt,[e.createElementVNode("button",{type:"button","aria-label":"Clear selected file",disabled:e.unref(l).disabled.value,class:e.normalizeClass(["flex h-full items-center px-xs py-2xs transition-all duration-200 ease-linear hover:bg-opacity-70 disabled:cursor-not-allowed disabled:opacity-50",m.value]),onClick:c},[e.createVNode(Oe,{color:t.buttonTextColor,"class-name":"h-xs"},null,8,["color"])],10,gt)])):e.createCommentVNode("",!0)],2),e.unref(l).feedbackOwnedByGroup?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(X,{key:0,id:e.unref(l).errorId,invalid:e.unref(l).invalid.value,text:t.invalidFeedback},{default:e.withCtx(()=>[u.$slots["invalid-feedback"]?e.renderSlot(u.$slots,"invalid-feedback",{key:0}):e.createCommentVNode("",!0)]),_:3},8,["id","invalid","text"]))]))}}),wt={sm:"h-xs w-xs before:h-2xs before:w-2xs",md:"h-sm w-sm before:h-[12px] before:w-[12px]",lg:"h-md w-md before:h-xs before:w-xs"},xt={sm:{"--switch-width":"30px","--switch-height":"17px","--slider-size":"13px","--gutter-size":"2px"},md:{"--switch-width":"45px","--switch-height":"25.5px","--slider-size":"19.5px","--gutter-size":"3px"},lg:{"--switch-width":"60px","--switch-height":"34px","--slider-size":"26px","--gutter-size":"4px"}},Ct="rounded-md before:rounded-[3px]",ye=t=>{const o=e.computed(()=>{const{bgColor:a,borderColor:r,indicatorColor:i,checkedBgColor:s,showShadow:d}=t,c=t.rounded??!1,f=[v.generateClass.bgColorVariant({color:a}),v.generateClass.borderColorVariant({color:r}),v.generateClass.beforeBgColorVariant({color:i}),v.generateClass.peerCheckedBgColorVariant({color:s}),"peer-focus-visible:ring-2 ring-offset-2",v.generateClass.peerFocusVisibleRingColorVariant({color:r})];return d&&f.push("drop-shadow-md"),c&&f.push(t.roundedClass??Ct),f.join(" ")}),n=e.computed(()=>wt[t.size]),l=e.computed(()=>({...xt[t.size]}));return{boxClass:o,sizeClass:n,switchVars:l}},kt={class:"relative inline-flex"},Bt=["id","name","value","required","disabled","aria-invalid","aria-describedby"],Vt=e.defineComponent({__name:"MclInputRadio",props:e.mergeModels({id:{},name:{},size:{default:"md"},bgColor:{default:"light-1"},checkedBgColor:{default:"success"},indicatorColor:{default:"light-1"},borderColor:{default:"dark-1"},showShadow:{type:Boolean,default:!1},value:{default:""},invalid:{type:Boolean,default:void 0},required:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0}},{modelValue:{default:null},modelModifiers:{}}),emits:e.mergeModels(["change"],["update:modelValue"]),setup(t,{emit:o}){const n=t,l=e.useModel(t,"modelValue"),a=o,r=W(n,{rendersOwnFeedback:!1}),{boxClass:i,sizeClass:s}=ye(n),d=e.computed(()=>r.name.value??r.id),c=f=>{a("change",f)};return(f,m)=>(e.openBlock(),e.createElementBlock("div",kt,[e.withDirectives(e.createElementVNode("input",{id:e.unref(r).id,"onUpdate:modelValue":m[0]||(m[0]=u=>l.value=u),type:"radio",class:"peer absolute inset-0 z-10 h-full w-full cursor-pointer appearance-none opacity-0 disabled:cursor-not-allowed",name:d.value,value:t.value,required:e.unref(r).required.value,disabled:e.unref(r).disabled.value,"aria-invalid":e.unref(r).invalid.value||void 0,"aria-describedby":e.unref(r).describedBy.value,onChange:c},null,40,Bt),[[e.vModelRadio,l.value]]),e.createElementVNode("span",{"aria-hidden":"true",class:e.normalizeClass(["relative inline-block rounded-full border transition-colors duration-200 ease-linear peer-disabled:opacity-50 before:absolute before:top-1/2 before:left-1/2 before:-translate-x-1/2 before:-translate-y-1/2 before:rounded-full before:opacity-0 before:transition-opacity before:duration-200 peer-checked:before:opacity-100",[e.unref(i),e.unref(s)]])},null,2)]))}}),vt=["id","name","required","disabled","aria-invalid","aria-describedby"],St="rounded-full before:rounded-full",Et=e.defineComponent({__name:"MclInputSwitch",props:e.mergeModels({id:{},name:{},size:{default:"md"},bgColor:{default:"dark-1"},checkedBgColor:{default:"success"},indicatorColor:{default:"light-1"},borderColor:{default:"dark-1"},showShadow:{type:Boolean,default:!1},rounded:{type:Boolean,default:!0},invalid:{type:Boolean,default:void 0},required:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["change"],["update:modelValue"]),setup(t,{emit:o}){const n=t,l=e.useModel(t,"modelValue"),a=o,r=W(n,{rendersOwnFeedback:!1}),i={get size(){return n.size},get bgColor(){return n.bgColor},get checkedBgColor(){return n.checkedBgColor},get indicatorColor(){return n.indicatorColor},get borderColor(){return n.borderColor},get showShadow(){return n.showShadow},get rounded(){return n.rounded},roundedClass:St},{boxClass:s,switchVars:d}=ye(i),c=f=>{a("change",f)};return(f,m)=>(e.openBlock(),e.createElementBlock("div",{class:"switch relative",style:e.normalizeStyle(e.unref(d))},[e.withDirectives(e.createElementVNode("input",{id:e.unref(r).id,"onUpdate:modelValue":m[0]||(m[0]=u=>l.value=u),type:"checkbox",role:"switch",class:"peer absolute inset-0 z-10 h-full w-full cursor-pointer appearance-none opacity-0 disabled:cursor-not-allowed",name:e.unref(r).name.value,required:e.unref(r).required.value,disabled:e.unref(r).disabled.value,"aria-invalid":e.unref(r).invalid.value||void 0,"aria-describedby":e.unref(r).describedBy.value,onChange:c},null,40,vt),[[e.vModelCheckbox,l.value]]),e.createElementVNode("span",{"aria-hidden":"true",class:e.normalizeClass(["slider absolute inset-0 transition-all duration-300 peer-disabled:opacity-50 before:absolute before:transition-all before:duration-300",e.unref(s)])},null,2)],4))}}),$e=(t,o)=>{const n=t.__vccOpts||t;for(const[l,a]of o)n[l]=a;return n},Rt=$e(Et,[["__scopeId","data-v-784930f6"]]),Ae=e.defineComponent({__name:"InputHighlight",props:{color:{default:"primary"},rounded:{type:Boolean,default:!1},offset:{default:1}},setup(t){const o=t,n={1:"-top-1",2.5:"-top-2.5"},l=e.computed(()=>{const a=[v.generateClass.beforeBgColorVariant({color:o.color})];return o.rounded&&a.push("rounded-b-md"),a.push(n[o.offset]),a.join(" ")});return(a,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["relative h-3xs overflow-hidden before:absolute before:bottom-0 before:left-0 before:h-full before:w-0 before:transition-[width] before:duration-300 before:ease-linear peer-focus:before:w-full",l.value])},null,2))}}),Mt=["id","type","name","placeholder","autocomplete","minlength","maxlength","pattern","required","disabled","aria-invalid","aria-describedby"],Ot=e.defineComponent({__name:"MclInputText",props:e.mergeModels({id:{},name:{},type:{default:"text"},placeholder:{default:""},autocomplete:{},showBorder:{type:Boolean,default:!1},borderColor:{default:"light-4"},rounded:{type:Boolean,default:!1},showHighlight:{type:Boolean,default:!0},highlightColor:{default:"primary"},textColor:{default:"black"},bgColor:{default:"light-1"},showShadow:{type:Boolean,default:!0},invalidFeedback:{},minLength:{},maxLength:{},pattern:{},invalid:{type:Boolean,default:void 0},required:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const o=t,n=e.useModel(t,"modelValue"),l=W(o),a=ne(o);return(r,i)=>(e.openBlock(),e.createElementBlock("div",null,[e.withDirectives(e.createElementVNode("input",{id:e.unref(l).id,"onUpdate:modelValue":i[0]||(i[0]=s=>n.value=s),class:e.normalizeClass(["peer w-full p-2xs outline-none disabled:cursor-not-allowed disabled:opacity-50",e.unref(a)]),type:t.type,name:e.unref(l).name.value,placeholder:t.placeholder,autocomplete:t.autocomplete,minlength:t.minLength,maxlength:t.maxLength,pattern:t.pattern,required:e.unref(l).required.value,disabled:e.unref(l).disabled.value,"aria-invalid":e.unref(l).invalid.value||void 0,"aria-describedby":e.unref(l).describedBy.value},null,10,Mt),[[e.vModelDynamic,n.value]]),t.showHighlight?(e.openBlock(),e.createBlock(Ae,{key:0,color:t.highlightColor,rounded:t.rounded},null,8,["color","rounded"])):e.createCommentVNode("",!0),e.unref(l).feedbackOwnedByGroup?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(X,{key:1,id:e.unref(l).errorId,invalid:e.unref(l).invalid.value,text:t.invalidFeedback},{default:e.withCtx(()=>[r.$slots["invalid-feedback"]?e.renderSlot(r.$slots,"invalid-feedback",{key:0}):e.createCommentVNode("",!0)]),_:3},8,["id","invalid","text"]))]))}}),le=Math.min,j=Math.max,re=Math.round,ae=Math.floor,D=t=>({x:t,y:t}),$t={left:"right",right:"left",bottom:"top",top:"bottom"},At={start:"end",end:"start"};function Ne(t,o,n){return j(t,le(o,n))}function ie(t,o){return typeof t=="function"?t(o):t}function G(t){return t.split("-")[0]}function se(t){return t.split("-")[1]}function Fe(t){return t==="x"?"y":"x"}function Le(t){return t==="y"?"height":"width"}const Nt=new Set(["top","bottom"]);function P(t){return Nt.has(G(t))?"y":"x"}function De(t){return Fe(P(t))}function Ft(t,o,n){n===void 0&&(n=!1);const l=se(t),a=De(t),r=Le(a);let i=a==="x"?l===(n?"end":"start")?"right":"left":l==="start"?"bottom":"top";return o.reference[r]>o.floating[r]&&(i=ce(i)),[i,ce(i)]}function Lt(t){const o=ce(t);return[we(t),o,we(o)]}function we(t){return t.replace(/start|end/g,o=>At[o])}const Ie=["left","right"],Te=["right","left"],Dt=["top","bottom"],It=["bottom","top"];function Tt(t,o,n){switch(t){case"top":case"bottom":return n?o?Te:Ie:o?Ie:Te;case"left":case"right":return o?Dt:It;default:return[]}}function zt(t,o,n,l){const a=se(t);let r=Tt(G(t),n==="start",l);return a&&(r=r.map(i=>i+"-"+a),o&&(r=r.concat(r.map(we)))),r}function ce(t){return t.replace(/left|right|bottom|top/g,o=>$t[o])}function qt(t){return{top:0,right:0,bottom:0,left:0,...t}}function Pt(t){return typeof t!="number"?qt(t):{top:t,right:t,bottom:t,left:t}}function de(t){const{x:o,y:n,width:l,height:a}=t;return{width:l,height:a,top:n,left:o,right:o+l,bottom:n+a,x:o,y:n}}function ze(t,o,n){let{reference:l,floating:a}=t;const r=P(o),i=De(o),s=Le(i),d=G(o),c=r==="y",f=l.x+l.width/2-a.width/2,m=l.y+l.height/2-a.height/2,u=l[s]/2-a[s]/2;let p;switch(d){case"top":p={x:f,y:l.y-a.height};break;case"bottom":p={x:f,y:l.y+l.height};break;case"right":p={x:l.x+l.width,y:m};break;case"left":p={x:l.x-a.width,y:m};break;default:p={x:l.x,y:l.y}}switch(se(o)){case"start":p[i]-=u*(n&&c?-1:1);break;case"end":p[i]+=u*(n&&c?-1:1);break}return p}async function _t(t,o){var n;o===void 0&&(o={});const{x:l,y:a,platform:r,rects:i,elements:s,strategy:d}=t,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:m="floating",altBoundary:u=!1,padding:p=0}=ie(o,t),h=Pt(p),y=s[u?m==="floating"?"reference":"floating":m],b=de(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(y)))==null||n?y:y.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(s.floating)),boundary:c,rootBoundary:f,strategy:d})),x=m==="floating"?{x:l,y:a,width:i.floating.width,height:i.floating.height}:i.reference,C=await(r.getOffsetParent==null?void 0:r.getOffsetParent(s.floating)),B=await(r.isElement==null?void 0:r.isElement(C))?await(r.getScale==null?void 0:r.getScale(C))||{x:1,y:1}:{x:1,y:1},R=de(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:x,offsetParent:C,strategy:d}):x);return{top:(b.top-R.top+h.top)/B.y,bottom:(R.bottom-b.bottom+h.bottom)/B.y,left:(b.left-R.left+h.left)/B.x,right:(R.right-b.right+h.right)/B.x}}const Ht=async(t,o,n)=>{const{placement:l="bottom",strategy:a="absolute",middleware:r=[],platform:i}=n,s=r.filter(Boolean),d=await(i.isRTL==null?void 0:i.isRTL(o));let c=await i.getElementRects({reference:t,floating:o,strategy:a}),{x:f,y:m}=ze(c,l,d),u=l,p={},h=0;for(let y=0;y<s.length;y++){var g;const{name:b,fn:x}=s[y],{x:C,y:B,data:R,reset:E}=await x({x:f,y:m,initialPlacement:l,placement:u,strategy:a,middlewareData:p,rects:c,platform:{...i,detectOverflow:(g=i.detectOverflow)!=null?g:_t},elements:{reference:t,floating:o}});f=C??f,m=B??m,p={...p,[b]:{...p[b],...R}},E&&h<=50&&(h++,typeof E=="object"&&(E.placement&&(u=E.placement),E.rects&&(c=E.rects===!0?await i.getElementRects({reference:t,floating:o,strategy:a}):E.rects),{x:f,y:m}=ze(c,u,d)),y=-1)}return{x:f,y:m,placement:u,strategy:a,middlewareData:p}},Wt=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(o){var n,l;const{placement:a,middlewareData:r,rects:i,initialPlacement:s,platform:d,elements:c}=o,{mainAxis:f=!0,crossAxis:m=!0,fallbackPlacements:u,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...y}=ie(t,o);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const b=G(a),x=P(s),C=G(s)===s,B=await(d.isRTL==null?void 0:d.isRTL(c.floating)),R=u||(C||!g?[ce(s)]:Lt(s)),E=h!=="none";!u&&E&&R.push(...zt(s,g,h,B));const k=[s,...R],$=await d.detectOverflow(o,y),q=[];let H=((l=r.flip)==null?void 0:l.overflows)||[];if(f&&q.push($[b]),m){const z=Ft(a,i,B);q.push($[z[0]],$[z[1]])}if(H=[...H,{placement:a,overflows:q}],!q.every(z=>z<=0)){var be,te;const z=(((be=r.flip)==null?void 0:be.index)||0)+1,w=k[z];if(w&&(!(m==="alignment"?x!==P(w):!1)||H.every(O=>P(O.placement)===x?O.overflows[0]>0:!0)))return{data:{index:z,overflows:H},reset:{placement:w}};let V=(te=H.filter(S=>S.overflows[0]<=0).sort((S,O)=>S.overflows[1]-O.overflows[1])[0])==null?void 0:te.placement;if(!V)switch(p){case"bestFit":{var ge;const S=(ge=H.filter(O=>{if(E){const N=P(O.placement);return N===x||N==="y"}return!0}).map(O=>[O.placement,O.overflows.filter(N=>N>0).reduce((N,jo)=>N+jo,0)]).sort((O,N)=>O[1]-N[1])[0])==null?void 0:ge[0];S&&(V=S);break}case"initialPlacement":V=s;break}if(a!==V)return{reset:{placement:V}}}return{}}}},jt=new Set(["left","top"]);async function Gt(t,o){const{placement:n,platform:l,elements:a}=t,r=await(l.isRTL==null?void 0:l.isRTL(a.floating)),i=G(n),s=se(n),d=P(n)==="y",c=jt.has(i)?-1:1,f=r&&d?-1:1,m=ie(o,t);let{mainAxis:u,crossAxis:p,alignmentAxis:h}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return s&&typeof h=="number"&&(p=s==="end"?h*-1:h),d?{x:p*f,y:u*c}:{x:u*c,y:p*f}}const Ut=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(o){var n,l;const{x:a,y:r,placement:i,middlewareData:s}=o,d=await Gt(o,t);return i===((n=s.offset)==null?void 0:n.placement)&&(l=s.arrow)!=null&&l.alignmentOffset?{}:{x:a+d.x,y:r+d.y,data:{...d,placement:i}}}}},Kt=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(o){const{x:n,y:l,placement:a,platform:r}=o,{mainAxis:i=!0,crossAxis:s=!1,limiter:d={fn:b=>{let{x,y:C}=b;return{x,y:C}}},...c}=ie(t,o),f={x:n,y:l},m=await r.detectOverflow(o,c),u=P(G(a)),p=Fe(u);let h=f[p],g=f[u];if(i){const b=p==="y"?"top":"left",x=p==="y"?"bottom":"right",C=h+m[b],B=h-m[x];h=Ne(C,h,B)}if(s){const b=u==="y"?"top":"left",x=u==="y"?"bottom":"right",C=g+m[b],B=g-m[x];g=Ne(C,g,B)}const y=d.fn({...o,[p]:h,[u]:g});return{...y,data:{x:y.x-n,y:y.y-l,enabled:{[p]:i,[u]:s}}}}}};function fe(){return typeof window<"u"}function U(t){return xe(t)?(t.nodeName||"").toLowerCase():"#document"}function A(t){var o;return(t==null||(o=t.ownerDocument)==null?void 0:o.defaultView)||window}function I(t){var o;return(o=(xe(t)?t.ownerDocument:t.document)||window.document)==null?void 0:o.documentElement}function xe(t){return fe()?t instanceof Node||t instanceof A(t).Node:!1}function F(t){return fe()?t instanceof Element||t instanceof A(t).Element:!1}function T(t){return fe()?t instanceof HTMLElement||t instanceof A(t).HTMLElement:!1}function qe(t){return!fe()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof A(t).ShadowRoot}const Xt=new Set(["inline","contents"]);function J(t){const{overflow:o,overflowX:n,overflowY:l,display:a}=L(t);return/auto|scroll|overlay|hidden|clip/.test(o+l+n)&&!Xt.has(a)}const Yt=new Set(["table","td","th"]);function Zt(t){return Yt.has(U(t))}const Jt=[":popover-open",":modal"];function ue(t){return Jt.some(o=>{try{return t.matches(o)}catch{return!1}})}const Qt=["transform","translate","scale","rotate","perspective"],eo=["transform","translate","scale","rotate","perspective","filter"],to=["paint","layout","strict","content"];function Ce(t){const o=ke(),n=F(t)?L(t):t;return Qt.some(l=>n[l]?n[l]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!o&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!o&&(n.filter?n.filter!=="none":!1)||eo.some(l=>(n.willChange||"").includes(l))||to.some(l=>(n.contain||"").includes(l))}function oo(t){let o=_(t);for(;T(o)&&!Y(o);){if(Ce(o))return o;if(ue(o))return null;o=_(o)}return null}function ke(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const no=new Set(["html","body","#document"]);function Y(t){return no.has(U(t))}function L(t){return A(t).getComputedStyle(t)}function me(t){return F(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function _(t){if(U(t)==="html")return t;const o=t.assignedSlot||t.parentNode||qe(t)&&t.host||I(t);return qe(o)?o.host:o}function Pe(t){const o=_(t);return Y(o)?t.ownerDocument?t.ownerDocument.body:t.body:T(o)&&J(o)?o:Pe(o)}function Q(t,o,n){var l;o===void 0&&(o=[]),n===void 0&&(n=!0);const a=Pe(t),r=a===((l=t.ownerDocument)==null?void 0:l.body),i=A(a);if(r){const s=Be(i);return o.concat(i,i.visualViewport||[],J(a)?a:[],s&&n?Q(s):[])}return o.concat(a,Q(a,[],n))}function Be(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function _e(t){const o=L(t);let n=parseFloat(o.width)||0,l=parseFloat(o.height)||0;const a=T(t),r=a?t.offsetWidth:n,i=a?t.offsetHeight:l,s=re(n)!==r||re(l)!==i;return s&&(n=r,l=i),{width:n,height:l,$:s}}function Ve(t){return F(t)?t:t.contextElement}function Z(t){const o=Ve(t);if(!T(o))return D(1);const n=o.getBoundingClientRect(),{width:l,height:a,$:r}=_e(o);let i=(r?re(n.width):n.width)/l,s=(r?re(n.height):n.height)/a;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const lo=D(0);function He(t){const o=A(t);return!ke()||!o.visualViewport?lo:{x:o.visualViewport.offsetLeft,y:o.visualViewport.offsetTop}}function ro(t,o,n){return o===void 0&&(o=!1),!n||o&&n!==A(t)?!1:o}function K(t,o,n,l){o===void 0&&(o=!1),n===void 0&&(n=!1);const a=t.getBoundingClientRect(),r=Ve(t);let i=D(1);o&&(l?F(l)&&(i=Z(l)):i=Z(t));const s=ro(r,n,l)?He(r):D(0);let d=(a.left+s.x)/i.x,c=(a.top+s.y)/i.y,f=a.width/i.x,m=a.height/i.y;if(r){const u=A(r),p=l&&F(l)?A(l):l;let h=u,g=Be(h);for(;g&&l&&p!==h;){const y=Z(g),b=g.getBoundingClientRect(),x=L(g),C=b.left+(g.clientLeft+parseFloat(x.paddingLeft))*y.x,B=b.top+(g.clientTop+parseFloat(x.paddingTop))*y.y;d*=y.x,c*=y.y,f*=y.x,m*=y.y,d+=C,c+=B,h=A(g),g=Be(h)}}return de({width:f,height:m,x:d,y:c})}function pe(t,o){const n=me(t).scrollLeft;return o?o.left+n:K(I(t)).left+n}function We(t,o){const n=t.getBoundingClientRect(),l=n.left+o.scrollLeft-pe(t,n),a=n.top+o.scrollTop;return{x:l,y:a}}function ao(t){let{elements:o,rect:n,offsetParent:l,strategy:a}=t;const r=a==="fixed",i=I(l),s=o?ue(o.floating):!1;if(l===i||s&&r)return n;let d={scrollLeft:0,scrollTop:0},c=D(1);const f=D(0),m=T(l);if((m||!m&&!r)&&((U(l)!=="body"||J(i))&&(d=me(l)),T(l))){const p=K(l);c=Z(l),f.x=p.x+l.clientLeft,f.y=p.y+l.clientTop}const u=i&&!m&&!r?We(i,d):D(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-d.scrollLeft*c.x+f.x+u.x,y:n.y*c.y-d.scrollTop*c.y+f.y+u.y}}function io(t){return Array.from(t.getClientRects())}function so(t){const o=I(t),n=me(t),l=t.ownerDocument.body,a=j(o.scrollWidth,o.clientWidth,l.scrollWidth,l.clientWidth),r=j(o.scrollHeight,o.clientHeight,l.scrollHeight,l.clientHeight);let i=-n.scrollLeft+pe(t);const s=-n.scrollTop;return L(l).direction==="rtl"&&(i+=j(o.clientWidth,l.clientWidth)-a),{width:a,height:r,x:i,y:s}}const je=25;function co(t,o){const n=A(t),l=I(t),a=n.visualViewport;let r=l.clientWidth,i=l.clientHeight,s=0,d=0;if(a){r=a.width,i=a.height;const f=ke();(!f||f&&o==="fixed")&&(s=a.offsetLeft,d=a.offsetTop)}const c=pe(l);if(c<=0){const f=l.ownerDocument,m=f.body,u=getComputedStyle(m),p=f.compatMode==="CSS1Compat"&&parseFloat(u.marginLeft)+parseFloat(u.marginRight)||0,h=Math.abs(l.clientWidth-m.clientWidth-p);h<=je&&(r-=h)}else c<=je&&(r+=c);return{width:r,height:i,x:s,y:d}}const fo=new Set(["absolute","fixed"]);function uo(t,o){const n=K(t,!0,o==="fixed"),l=n.top+t.clientTop,a=n.left+t.clientLeft,r=T(t)?Z(t):D(1),i=t.clientWidth*r.x,s=t.clientHeight*r.y,d=a*r.x,c=l*r.y;return{width:i,height:s,x:d,y:c}}function Ge(t,o,n){let l;if(o==="viewport")l=co(t,n);else if(o==="document")l=so(I(t));else if(F(o))l=uo(o,n);else{const a=He(t);l={x:o.x-a.x,y:o.y-a.y,width:o.width,height:o.height}}return de(l)}function Ue(t,o){const n=_(t);return n===o||!F(n)||Y(n)?!1:L(n).position==="fixed"||Ue(n,o)}function mo(t,o){const n=o.get(t);if(n)return n;let l=Q(t,[],!1).filter(s=>F(s)&&U(s)!=="body"),a=null;const r=L(t).position==="fixed";let i=r?_(t):t;for(;F(i)&&!Y(i);){const s=L(i),d=Ce(i);!d&&s.position==="fixed"&&(a=null),(r?!d&&!a:!d&&s.position==="static"&&!!a&&fo.has(a.position)||J(i)&&!d&&Ue(t,i))?l=l.filter(f=>f!==i):a=s,i=_(i)}return o.set(t,l),l}function po(t){let{element:o,boundary:n,rootBoundary:l,strategy:a}=t;const i=[...n==="clippingAncestors"?ue(o)?[]:mo(o,this._c):[].concat(n),l],s=i[0],d=i.reduce((c,f)=>{const m=Ge(o,f,a);return c.top=j(m.top,c.top),c.right=le(m.right,c.right),c.bottom=le(m.bottom,c.bottom),c.left=j(m.left,c.left),c},Ge(o,s,a));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function ho(t){const{width:o,height:n}=_e(t);return{width:o,height:n}}function bo(t,o,n){const l=T(o),a=I(o),r=n==="fixed",i=K(t,!0,r,o);let s={scrollLeft:0,scrollTop:0};const d=D(0);function c(){d.x=pe(a)}if(l||!l&&!r)if((U(o)!=="body"||J(a))&&(s=me(o)),l){const p=K(o,!0,r,o);d.x=p.x+o.clientLeft,d.y=p.y+o.clientTop}else a&&c();r&&!l&&a&&c();const f=a&&!l&&!r?We(a,s):D(0),m=i.left+s.scrollLeft-d.x-f.x,u=i.top+s.scrollTop-d.y-f.y;return{x:m,y:u,width:i.width,height:i.height}}function ve(t){return L(t).position==="static"}function Ke(t,o){if(!T(t)||L(t).position==="fixed")return null;if(o)return o(t);let n=t.offsetParent;return I(t)===n&&(n=n.ownerDocument.body),n}function Xe(t,o){const n=A(t);if(ue(t))return n;if(!T(t)){let a=_(t);for(;a&&!Y(a);){if(F(a)&&!ve(a))return a;a=_(a)}return n}let l=Ke(t,o);for(;l&&Zt(l)&&ve(l);)l=Ke(l,o);return l&&Y(l)&&ve(l)&&!Ce(l)?n:l||oo(t)||n}const go=async function(t){const o=this.getOffsetParent||Xe,n=this.getDimensions,l=await n(t.floating);return{reference:bo(t.reference,await o(t.floating),t.strategy),floating:{x:0,y:0,width:l.width,height:l.height}}};function yo(t){return L(t).direction==="rtl"}const wo={convertOffsetParentRelativeRectToViewportRelativeRect:ao,getDocumentElement:I,getClippingRect:po,getOffsetParent:Xe,getElementRects:go,getClientRects:io,getDimensions:ho,getScale:Z,isElement:F,isRTL:yo};function Ye(t,o){return t.x===o.x&&t.y===o.y&&t.width===o.width&&t.height===o.height}function xo(t,o){let n=null,l;const a=I(t);function r(){var s;clearTimeout(l),(s=n)==null||s.disconnect(),n=null}function i(s,d){s===void 0&&(s=!1),d===void 0&&(d=1),r();const c=t.getBoundingClientRect(),{left:f,top:m,width:u,height:p}=c;if(s||o(),!u||!p)return;const h=ae(m),g=ae(a.clientWidth-(f+u)),y=ae(a.clientHeight-(m+p)),b=ae(f),C={rootMargin:-h+"px "+-g+"px "+-y+"px "+-b+"px",threshold:j(0,le(1,d))||1};let B=!0;function R(E){const k=E[0].intersectionRatio;if(k!==d){if(!B)return i();k?i(!1,k):l=setTimeout(()=>{i(!1,1e-7)},1e3)}k===1&&!Ye(c,t.getBoundingClientRect())&&i(),B=!1}try{n=new IntersectionObserver(R,{...C,root:a.ownerDocument})}catch{n=new IntersectionObserver(R,C)}n.observe(t)}return i(!0),r}function Co(t,o,n,l){l===void 0&&(l={});const{ancestorScroll:a=!0,ancestorResize:r=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:d=!1}=l,c=Ve(t),f=a||r?[...c?Q(c):[],...Q(o)]:[];f.forEach(b=>{a&&b.addEventListener("scroll",n,{passive:!0}),r&&b.addEventListener("resize",n)});const m=c&&s?xo(c,n):null;let u=-1,p=null;i&&(p=new ResizeObserver(b=>{let[x]=b;x&&x.target===c&&p&&(p.unobserve(o),cancelAnimationFrame(u),u=requestAnimationFrame(()=>{var C;(C=p)==null||C.observe(o)})),n()}),c&&!d&&p.observe(c),p.observe(o));let h,g=d?K(t):null;d&&y();function y(){const b=K(t);g&&!Ye(g,b)&&n(),g=b,h=requestAnimationFrame(y)}return n(),()=>{var b;f.forEach(x=>{a&&x.removeEventListener("scroll",n),r&&x.removeEventListener("resize",n)}),m?.(),(b=p)==null||b.disconnect(),p=null,d&&cancelAnimationFrame(h)}}const ko=Ut,Bo=Kt,Vo=Wt,vo=(t,o,n)=>{const l=new Map,a={platform:wo,...n},r={...a.platform,_c:l};return Ht(t,o,{...a,platform:r})};function So(t){return t!=null&&typeof t=="object"&&"$el"in t}function Ze(t){if(So(t)){const o=t.$el;return xe(o)&&U(o)==="#comment"?null:o}return t}function ee(t){return typeof t=="function"?t():e.unref(t)}function Je(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Qe(t,o){const n=Je(t);return Math.round(o*n)/n}function Eo(t,o,n){n===void 0&&(n={});const l=n.whileElementsMounted,a=e.computed(()=>{var k;return(k=ee(n.open))!=null?k:!0}),r=e.computed(()=>ee(n.middleware)),i=e.computed(()=>{var k;return(k=ee(n.placement))!=null?k:"bottom"}),s=e.computed(()=>{var k;return(k=ee(n.strategy))!=null?k:"absolute"}),d=e.computed(()=>{var k;return(k=ee(n.transform))!=null?k:!0}),c=e.computed(()=>Ze(t.value)),f=e.computed(()=>Ze(o.value)),m=e.ref(0),u=e.ref(0),p=e.ref(s.value),h=e.ref(i.value),g=e.shallowRef({}),y=e.ref(!1),b=e.computed(()=>{const k={position:p.value,left:"0",top:"0"};if(!f.value)return k;const $=Qe(f.value,m.value),q=Qe(f.value,u.value);return d.value?{...k,transform:"translate("+$+"px, "+q+"px)",...Je(f.value)>=1.5&&{willChange:"transform"}}:{position:p.value,left:$+"px",top:q+"px"}});let x;function C(){if(c.value==null||f.value==null)return;const k=a.value;vo(c.value,f.value,{middleware:r.value,placement:i.value,strategy:s.value}).then($=>{m.value=$.x,u.value=$.y,p.value=$.strategy,h.value=$.placement,g.value=$.middlewareData,y.value=k!==!1})}function B(){typeof x=="function"&&(x(),x=void 0)}function R(){if(B(),l===void 0){C();return}if(c.value!=null&&f.value!=null){x=l(c.value,f.value,C);return}}function E(){a.value||(y.value=!1)}return e.watch([r,i,s,a],C,{flush:"sync"}),e.watch([c,f],R,{flush:"sync"}),e.watch(a,E,{flush:"sync"}),e.getCurrentScope()&&e.onScopeDispose(B),{x:e.shallowReadonly(m),y:e.shallowReadonly(u),strategy:e.shallowReadonly(p),placement:e.shallowReadonly(h),middlewareData:e.shallowReadonly(g),isPositioned:e.shallowReadonly(y),floatingStyles:b,update:C}}const Ro=e.defineComponent({__name:"CaretDown",props:{color:{default:"dark-4"},className:{default:""}},setup(t){const o=t,n=e.computed(()=>[v.generateClass.svgFillColorVariant({color:o.color}),o.className].filter(Boolean).join(" "));return(l,a)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512","aria-hidden":"true",focusable:"false",class:e.normalizeClass(n.value)},[...a[0]||(a[0]=[e.createElementVNode("path",{d:"M137.4 374.6c12.5 12.5 32.8 12.5 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l128 128z"},null,-1)])],2))}}),Mo=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),he=t=>typeof t=="string"?t:t.text,Se=t=>typeof t=="string"?t:t.value,Oo=(t,o)=>e.computed(()=>{const n=e.toValue(t),l=e.toValue(o);if(l==="")return n;const a=new RegExp(Mo(l),"i");return n.filter(r=>a.test(he(r)))}),$o=t=>{const{isOpen:o,activeIndex:n,onSelect:l,onClear:a,onActiveChange:r}=t,i=f=>{const m=e.toValue(t.optionCount);if(m<=0){n.value=-1;return}const u=Math.max(0,Math.min(f,m-1));n.value=u,r?.(u)},s=()=>{o.value=!1,n.value=-1},d=f=>{switch(f.key){case"ArrowDown":if(f.preventDefault(),!o.value){o.value=!0;return}if(f.altKey)return;i(n.value+1);return;case"ArrowUp":if(f.preventDefault(),!o.value){o.value=!0;return}i(n.value<0?e.toValue(t.optionCount)-1:n.value-1);return;case"Home":if(!o.value)return;f.preventDefault(),i(0);return;case"End":if(!o.value)return;f.preventDefault(),i(e.toValue(t.optionCount)-1);return;case"Enter":if(!o.value||n.value<0)return;f.preventDefault(),l(n.value);return;case"Escape":if(o.value){s();return}a();return;case"Tab":o.value&&s();return;default:return}},c=e.computed(()=>o.value&&n.value>=0?`${e.toValue(t.idPrefix)}-option-${n.value}`:void 0);return{onKeydown:d,activeDescendantId:c}},Ao=["id","placeholder","disabled","aria-expanded","aria-controls","aria-activedescendant","aria-required","aria-invalid","aria-describedby"],No=["disabled"],Fo=["disabled"],Lo=["id"],Do=["id","aria-selected","onClick","onMouseenter"],Io=["id"],To=["name","value"],zo=$e(e.defineComponent({__name:"MclSelect",props:e.mergeModels({options:{},id:{},name:{},placeholder:{default:""},showBorder:{type:Boolean,default:!1},borderColor:{default:"light-4"},rounded:{type:Boolean,default:!1},showHighlight:{type:Boolean,default:!0},highlightColor:{default:"primary"},textColor:{default:"black"},bgColor:{default:"light-1"},iconColor:{default:"dark-4"},optionHoverColor:{default:"primary"},showShadow:{type:Boolean,default:!0},noMatchText:{default:"No match."},invalidFeedback:{},invalid:{type:Boolean,default:void 0},required:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0}},{modelValue:{default:null},modelModifiers:{}}),emits:e.mergeModels(["open","close","clear","changed","select"],["update:modelValue"]),setup(t,{emit:o}){const n=t,l=e.useModel(t,"modelValue"),a=o,r=W(n),i=ne(n),s=e.ref(),d=e.ref(),c=e.ref(),f=e.ref([]),m=e.ref(),u=e.ref(!1),p=e.ref(-1),h=w=>{if(w===null||w==="")return"";const V=n.options.find(S=>Se(S)===w);return V?he(V):String(w)},g=e.ref(h(l.value)),y=e.ref(!1),b=Oo(()=>n.options,()=>y.value?g.value:""),x=(w,V)=>{f.value[V]=w},C=w=>{f.value[w]?.scrollIntoView?.({block:"nearest"})},B=()=>{u.value||(u.value=!0,y.value=!1,p.value=-1)},R=()=>{u.value=!1,p.value=-1},E=w=>{g.value=he(w);const V=Se(w);l.value=V,y.value=!1,u.value=!1,p.value=-1,a("select",V)},k=()=>{g.value="",p.value=-1,l.value=null,y.value=!1,a("clear"),d.value?.focus()},{onKeydown:$,activeDescendantId:q}=$o({isOpen:u,activeIndex:p,optionCount:()=>b.value.length,idPrefix:()=>r.id,onSelect:w=>{const V=b.value[w];V!==void 0&&E(V)},onClear:k,onActiveChange:C}),H=()=>{if(u.value){R();return}B(),d.value?.focus()},be=e.computed(()=>{const w=[v.generateClass.beforeBgColorVariant({color:n.highlightColor})];return n.rounded&&w.push("rounded-b-md"),w.join(" ")}),te=e.computed(()=>{const w=[v.generateClass.bgColorVariant({color:n.bgColor}),v.generateClass.borderColorVariant({color:n.borderColor})];return n.showHighlight||w.push("mt-2xs"),n.rounded&&w.push("rounded-md"),w.join(" ")}),ge=w=>l.value!==null&&l.value!==""&&Se(w)===l.value,{floatingStyles:z}=Eo(s,c,{whileElementsMounted:Co,strategy:"absolute",open:u,transform:!1,placement:"bottom",middleware:[Vo(),ko(-2.2),Bo()]});return tt.useResizeObserver(s,()=>{s.value&&(m.value=s.value.clientWidth)}),e.watch(b,()=>{p.value=-1}),e.watch(u,w=>{if(w){a("open");return}y.value&&(g.value=h(l.value),y.value=!1),a("close")}),e.watch(()=>r.disabled.value,w=>{w&&R()}),e.watch(()=>n.options,()=>{y.value||(g.value=h(l.value))}),e.watch(l,w=>{g.value=h(w),y.value=!1,w!==null&&a("changed",w)}),(w,V)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{ref_key:"rootRef",ref:s,class:"relative"},[e.createElementVNode("div",{class:e.normalizeClass(["relative flex gap-3xs p-2xs",[e.unref(i),!t.showHighlight&&u.value&&e.unref(v.generateClass).ringColorVariant({color:t.borderColor})+" ring-4"]])},[e.withDirectives(e.createElementVNode("input",{id:e.unref(r).id,ref_key:"inputRef",ref:d,"onUpdate:modelValue":V[0]||(V[0]=S=>g.value=S),type:"text",role:"combobox",autocomplete:"off",class:"w-full bg-transparent outline-none disabled:cursor-not-allowed",placeholder:t.placeholder,disabled:e.unref(r).disabled.value,"aria-autocomplete":"list","aria-expanded":u.value,"aria-controls":`${e.unref(r).id}-listbox`,"aria-activedescendant":e.unref(q),"aria-required":e.unref(r).required.value||void 0,"aria-invalid":e.unref(r).invalid.value||void 0,"aria-describedby":e.unref(r).describedBy.value,onFocus:B,onInput:V[1]||(V[1]=S=>y.value=!0),onKeydown:V[2]||(V[2]=(...S)=>e.unref($)&&e.unref($)(...S))},null,40,Ao),[[e.vModelText,g.value]]),g.value!==""?(e.openBlock(),e.createElementBlock("button",{key:0,"data-mcl":"clear",type:"button","aria-label":"Clear selection",class:"flex items-center px-3xs",disabled:e.unref(r).disabled.value,onClick:k},[e.createVNode(Oe,{color:t.iconColor,"class-name":"h-xs opacity-70"},null,8,["color"])],8,No)):e.createCommentVNode("",!0),e.createElementVNode("button",{"data-mcl":"caret",type:"button",tabindex:"-1","aria-label":"Toggle options",class:"flex items-center px-3xs",disabled:e.unref(r).disabled.value,onClick:H},[e.createVNode(Ro,{color:t.iconColor,"class-name":`h-xs transition-transform duration-300 ease-in ${u.value?"rotate-180":"rotate-0"}`},null,8,["color","class-name"])],8,Fo)],2),t.showHighlight?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["relative -top-1 h-3xs overflow-hidden before:absolute before:bottom-0 before:left-0 before:h-full before:transition-[width] before:duration-300 before:ease-linear",[u.value?"before:w-full":"before:w-0",be.value]])},null,2)):e.createCommentVNode("",!0),e.createVNode(e.Transition,{name:"options"},{default:e.withCtx(()=>[u.value&&e.unref(b).length>0?(e.openBlock(),e.createElementBlock("ul",{key:0,id:`${e.unref(r).id}-listbox`,ref_key:"dropdownRef",ref:c,role:"listbox",class:e.normalizeClass(["max-h-[12.5rem] overflow-y-auto border-2",te.value]),style:e.normalizeStyle({width:`${m.value}px`,...e.unref(z)})},[e.renderSlot(w.$slots,"dropdown",{options:e.unref(b),activeIndex:p.value,optionClick:E,setRef:x,hover:S=>p.value=S,optionId:S=>`${e.unref(r).id}-option-${S}`},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(b),(S,O)=>(e.openBlock(),e.createElementBlock("li",{id:`${e.unref(r).id}-option-${O}`,key:O,ref_for:!0,ref:N=>x(N,O),role:"option",class:e.normalizeClass(["cursor-pointer p-2xs",[p.value===O&&e.unref(v.generateClass).bgColorVariant({color:t.optionHoverColor})]]),"aria-selected":ge(S),onClick:N=>E(S),onMouseenter:N=>p.value=O},e.toDisplayString(e.unref(he)(S)),43,Do))),128))],!0)],14,Lo)):e.createCommentVNode("",!0)]),_:3}),u.value&&e.unref(b).length===0?(e.openBlock(),e.createElementBlock("div",{key:1,id:`${e.unref(r).id}-listbox`,ref_key:"dropdownRef",ref:c,role:"status",class:e.normalizeClass(["border-2 p-2xs",te.value]),style:e.normalizeStyle({width:`${m.value}px`,...e.unref(z)})},[e.renderSlot(w.$slots,"no-match",{},()=>[e.createElementVNode("span",null,e.toDisplayString(t.noMatchText),1)],!0)],14,Io)):e.createCommentVNode("",!0),e.unref(r).name.value?(e.openBlock(),e.createElementBlock("input",{key:2,type:"hidden",name:e.unref(r).name.value,value:l.value??""},null,8,To)):e.createCommentVNode("",!0),e.unref(r).feedbackOwnedByGroup?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(X,{key:3,id:e.unref(r).errorId,invalid:e.unref(r).invalid.value,text:t.invalidFeedback},{default:e.withCtx(()=>[w.$slots["invalid-feedback"]?e.renderSlot(w.$slots,"invalid-feedback",{key:0},void 0,!0):e.createCommentVNode("",!0)]),_:3},8,["id","invalid","text"]))])),[[e.unref(et.vClickOutside),R]])}}),[["__scopeId","data-v-2695c901"]]),qo=["id","name","rows","placeholder","required","disabled","aria-invalid","aria-describedby"],Po=e.defineComponent({__name:"MclTextArea",props:e.mergeModels({id:{},name:{},placeholder:{default:""},rows:{default:5},showBorder:{type:Boolean,default:!1},borderColor:{default:"light-4"},rounded:{type:Boolean,default:!1},showHighlight:{type:Boolean,default:!0},highlightColor:{default:"primary"},textColor:{default:"black"},bgColor:{default:"light-1"},showShadow:{type:Boolean,default:!0},invalidFeedback:{},invalid:{type:Boolean,default:void 0},required:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const o=t,n=e.useModel(t,"modelValue"),l=W(o),a=ne(o);return(r,i)=>(e.openBlock(),e.createElementBlock("div",null,[e.withDirectives(e.createElementVNode("textarea",{id:e.unref(l).id,"onUpdate:modelValue":i[0]||(i[0]=s=>n.value=s),class:e.normalizeClass(["peer w-full p-2xs outline-none disabled:cursor-not-allowed disabled:opacity-50",e.unref(a)]),name:e.unref(l).name.value,rows:t.rows,placeholder:t.placeholder,required:e.unref(l).required.value,disabled:e.unref(l).disabled.value,"aria-invalid":e.unref(l).invalid.value||void 0,"aria-describedby":e.unref(l).describedBy.value},null,10,qo),[[e.vModelText,n.value]]),t.showHighlight?(e.openBlock(),e.createBlock(Ae,{key:0,color:t.highlightColor,rounded:t.rounded,offset:2.5},null,8,["color","rounded"])):e.createCommentVNode("",!0),e.unref(l).feedbackOwnedByGroup?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(X,{key:1,id:e.unref(l).errorId,invalid:e.unref(l).invalid.value,text:t.invalidFeedback},{default:e.withCtx(()=>[r.$slots["invalid-feedback"]?e.renderSlot(r.$slots,"invalid-feedback",{key:0}):e.createCommentVNode("",!0)]),_:3},8,["id","invalid","text"]))]))}}),_o={class:"relative inline-flex"},Ho=["id","name","value","required","disabled","aria-invalid","aria-describedby"],Wo=e.defineComponent({__name:"MclCheckbox",props:e.mergeModels({id:{},name:{},size:{default:"md"},bgColor:{default:"light-1"},checkedBgColor:{default:"warning"},indicatorColor:{default:"dark-3"},borderColor:{default:"dark-1"},showShadow:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},value:{},invalid:{type:Boolean,default:void 0},required:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["change"],["update:modelValue"]),setup(t,{emit:o}){const n=t,l=e.useModel(t,"modelValue"),a=o,r=W(n,{rendersOwnFeedback:!1}),{boxClass:i,sizeClass:s}=ye(n),d=c=>{a("change",c)};return(c,f)=>(e.openBlock(),e.createElementBlock("div",_o,[e.withDirectives(e.createElementVNode("input",{id:e.unref(r).id,"onUpdate:modelValue":f[0]||(f[0]=m=>l.value=m),type:"checkbox",class:"peer absolute inset-0 z-10 h-full w-full cursor-pointer appearance-none opacity-0 disabled:cursor-not-allowed",name:e.unref(r).name.value,value:t.value,required:e.unref(r).required.value,disabled:e.unref(r).disabled.value,"aria-invalid":e.unref(r).invalid.value||void 0,"aria-describedby":e.unref(r).describedBy.value,onChange:d},null,40,Ho),[[e.vModelCheckbox,l.value]]),e.createElementVNode("span",{"aria-hidden":"true",class:e.normalizeClass(["relative inline-block border p-3xs transition-colors duration-200 ease-linear peer-disabled:opacity-50 before:absolute before:top-1/2 before:left-1/2 before:-translate-x-1/2 before:-translate-y-1/2 before:opacity-0 before:transition-opacity before:duration-200 peer-checked:before:opacity-100",[e.unref(i),e.unref(s)]])},null,2)]))}});M.MclCheckbox=Wo,M.MclFormGroup=ut,M.MclInputFile=yt,M.MclInputRadio=Vt,M.MclInputSwitch=Rt,M.MclInputText=Ot,M.MclSelect=zo,M.MclTextArea=Po,Object.defineProperty(M,Symbol.toStringTag,{value:"Module"})}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bobbykim/mcl-forms",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.2",
|
|
4
4
|
"description": "form group components based on manguito-theme",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@floating-ui/vue": "^1.1.5",
|
|
34
34
|
"@vueuse/core": "^12.0.0",
|
|
35
35
|
"vue": "^3.5.13",
|
|
36
|
-
"@bobbykim/manguito-theme": "1.
|
|
36
|
+
"@bobbykim/manguito-theme": "1.3.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@vitejs/plugin-vue": "^5.2.1",
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
"scripts": {
|
|
48
48
|
"build": "vite build",
|
|
49
49
|
"test": "vitest run",
|
|
50
|
-
"test:watch": "vitest"
|
|
50
|
+
"test:watch": "vitest",
|
|
51
|
+
"typecheck": "vue-tsc --noEmit -p tsconfig.json"
|
|
51
52
|
}
|
|
52
53
|
}
|