@speckle/ui-components 2.16.0 → 2.16.1-alpha10

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.
Files changed (35) hide show
  1. package/dist/AvatarEditor-594c4e0d.js +193 -0
  2. package/dist/AvatarEditor-594c4e0d.js.map +1 -0
  3. package/dist/AvatarEditor-92ea4e16.cjs +2 -0
  4. package/dist/AvatarEditor-92ea4e16.cjs.map +1 -0
  5. package/dist/components/common/loading/Icon.vue.d.ts +24 -0
  6. package/dist/components/form/Switch.vue.d.ts +6 -0
  7. package/dist/components/form/Tags.vue.d.ts +147 -0
  8. package/dist/components/form/TextArea.vue.d.ts +6 -0
  9. package/dist/components/form/TextInput.vue.d.ts +1 -1
  10. package/dist/components/form/file-upload/Zone.vue.d.ts +62 -0
  11. package/dist/components/form/select/Badges.vue.d.ts +64 -0
  12. package/dist/components/form/select/Base.vue.d.ts +375 -333
  13. package/dist/components/form/select/SourceApps.vue.d.ts +13 -0
  14. package/dist/components/form/tags/ContextManager.vue.d.ts +16 -0
  15. package/dist/components/layout/Table.vue.d.ts +68 -0
  16. package/dist/components/user/Avatar.vue.d.ts +59 -0
  17. package/dist/components/user/AvatarEditable.vue.d.ts +67 -0
  18. package/dist/components/user/AvatarEditor.vue.d.ts +26 -0
  19. package/dist/components/user/AvatarGroup.vue.d.ts +44 -0
  20. package/dist/composables/form/fileUpload.d.ts +63 -0
  21. package/dist/composables/form/textInput.d.ts +9 -5
  22. package/dist/composables/user/avatar.d.ts +19 -0
  23. package/dist/helpers/common/error.d.ts +28 -0
  24. package/dist/helpers/common/validation.d.ts +2 -0
  25. package/dist/helpers/form/file.d.ts +41 -0
  26. package/dist/lib.cjs +2 -1
  27. package/dist/lib.cjs.map +1 -0
  28. package/dist/lib.d.ts +14 -2
  29. package/dist/lib.js +2191 -1206
  30. package/dist/lib.js.map +1 -0
  31. package/dist/stories/helpers/avatar.d.ts +1 -0
  32. package/package.json +3 -2
  33. package/tailwind.config.cjs +11 -0
  34. package/tsconfig.json +1 -1
  35. package/vite.config.ts +6 -1
package/dist/lib.cjs CHANGED
@@ -1 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),C=require("lodash"),_=require("@heroicons/vue/24/solid"),O=require("@heroicons/vue/24/outline"),$=require("@heroicons/vue/20/solid"),X=require("vee-validate"),J=require("nanoid"),R=require("@speckle/shared"),T=require("@vueuse/core"),E=require("@headlessui/vue"),se=require("vue-tippy"),Ce=require("v3-infinite-loading");const Be={key:2,style:{margin:"0 !important",width:"0.01px"}},we=e.defineComponent({__name:"Button",props:{to:{type:String,required:!1,default:void 0},size:{type:String,default:"base"},fullWidth:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},text:{type:Boolean,default:!1},link:{type:Boolean,default:!1},color:{type:String,default:"default"},external:{type:Boolean,required:!1,default:void 0},disabled:{type:Boolean,required:!1,default:void 0},submit:{type:Boolean,default:!1},iconLeft:{type:[Object,Function],default:null},iconRight:{type:[Object,Function],default:null},hideText:{type:Boolean,default:!1},linkComponent:{type:[Object,Function],default:null},loading:{type:Boolean,default:!1}},emits:["click"],setup(t,{emit:l}){const n=t,o=e.resolveDynamicComponent("NuxtLink"),s=e.resolveDynamicComponent("RouterLink"),r=e.computed(()=>n.linkComponent?n.linkComponent:n.external?"a":C.isObjectLike(o)?o:C.isObjectLike(s)?s:"a"),i=e.computed(()=>{if(!n.to)return n.submit?"submit":"button"}),c=e.computed(()=>n.disabled||n.loading),g=e.computed(()=>n.loading?_.ArrowPathIcon:n.iconLeft),u=e.computed(()=>{const f=[];if(f.push("border-2"),c.value)f.push(n.outlined?"border-foreground-disabled":"bg-foundation-disabled border-transparent");else switch(n.color){case"invert":f.push(n.outlined?"border-foundation dark:border-foreground":"bg-foundation dark:bg-foreground border-transparent");break;case"card":f.push(n.outlined?"border-foundation-2 shadow":"bg-foundation-2 dark:bg-foundation-2 border-foundation shadow");break;case"danger":f.push(n.outlined?"border-danger":"bg-danger border-danger");break;case"secondary":f.push(n.outlined?"border-foundation":"bg-foundation border-foundation-2");break;case"warning":f.push(n.outlined?"border-warning":"bg-warning border-warning");break;case"info":f.push(n.outlined?"border-info":"bg-info border-info");break;case"success":f.push(n.outlined?"border-success":"bg-success border-success");break;case"default":default:f.push(n.outlined?"border-primary hover:border-primary-focus":"bg-primary hover:bg-primary-focus border-transparent");break}return f.join(" ")}),p=e.computed(()=>{const f=[];if(!n.text&&!n.link)if(c.value)f.push((n.outlined,"text-foreground-disabled"));else switch(n.color){case"invert":f.push(n.outlined?"text-foundation dark:text-foreground":"text-primary");break;case"card":f.push((n.outlined,"text-foreground"));break;case"danger":f.push(n.outlined?"text-danger":"text-foundation dark:text-foreground");break;case"warning":f.push(n.outlined?"text-warning":"text-foundation dark:text-foreground");break;case"info":f.push(n.outlined?"text-info":"text-foundation dark:text-foreground");break;case"success":f.push(n.outlined?"text-success":"text-foundation dark:text-foreground");break;case"secondary":f.push((n.outlined,"text-foreground hover:text-primary"));break;case"default":default:f.push(n.outlined?"text-primary hover:text-primary-focus":"text-foundation dark:text-foreground");break}else c.value?f.push("text-foreground-disabled"):n.color==="invert"?f.push("text-foundation hover:text-foundation-2 dark:text-foreground dark:hover:text-foreground"):n.color==="secondary"?f.push("text-foreground-2 hover:text-primary-focus"):n.color==="success"?f.push("text-success"):n.color==="warning"?f.push("text-warning"):n.color==="info"?f.push("text-info"):n.color==="danger"?f.push("text-danger"):f.push("text-primary hover:text-primary-focus");return f.join(" ")}),h=e.computed(()=>{const f=[];return f.push(n.rounded?"rounded-full":"rounded-md"),f.join(" ")}),d=e.computed(()=>{const f=[];if(!c.value)switch(n.color){case"invert":f.push("hover:ring-4 ring-white/50");break;case"danger":f.push("hover:ring-4 ring-danger-lighter dark:ring-danger-darker");break;case"warning":f.push("hover:ring-4 ring-warning-lighter dark:ring-warning-darker");break;case"info":f.push("hover:ring-4 ring-info-lighter dark:ring-info-darker");break;case"success":f.push("hover:ring-4 ring-success-lighter dark:ring-success-darker");break;case"default":default:f.push("hover:ring-2");break}return f.join(" ")}),v=e.computed(()=>{switch(n.size){case"xs":return"h-5 text-xs font-medium xxx-tracking-wide";case"sm":return"h-6 text-sm font-medium xxx-tracking-wide";case"lg":return"h-10 text-lg font-semibold xxx-tracking-wide";case"xl":return"h-14 text-xl font-bold xxx-tracking-wide";default:case"base":return"h-8 text-base font-medium xxx-tracking-wide"}}),a=e.computed(()=>{switch(n.size){case"xs":return"px-1";case"sm":return"px-2";case"lg":return"px-4";case"xl":return"px-5";default:case"base":return"px-3"}}),x=e.computed(()=>{const f=[];return n.fullWidth&&f.push("w-full"),c.value&&f.push("cursor-not-allowed"),f.join(" ")}),m=e.computed(()=>{const f=[];return!c.value&&!n.link&&!n.text&&f.push("active:scale-[0.97]"),!c.value&&n.link&&f.push("underline decoration-transparent decoration-2 underline-offset-4 hover:decoration-inherit"),f.join(" ")}),y=e.computed(()=>{const f=n.link||n.text;return["transition inline-flex justify-center items-center space-x-2 outline-none select-none",x.value,v.value,p.value,f?"":u.value,f?"":h.value,f?"":d.value,n.link?"":a.value,m.value].join(" ")}),b=e.computed(()=>{const f=[""];switch(n.loading&&f.push("animate-spin"),n.size){case"xs":f.push("h-3 w-3");break;case"sm":f.push("h-4 w-4");break;case"lg":f.push("h-6 w-6");break;case"xl":f.push("h-8 w-8");break;case"base":default:f.push("h-5 w-5");break}return f.join(" ")}),S=f=>{if(c.value){f.preventDefault(),f.stopPropagation(),f.stopImmediatePropagation();return}l("click",f)};return(f,V)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.to?r.value:"button"),{href:t.to,to:t.to,type:i.value,external:t.external,class:e.normalizeClass(y.value),disabled:c.value,role:"button",onClick:S},{default:e.withCtx(()=>[g.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g.value),{key:0,class:e.normalizeClass(`${b.value} ${t.hideText?"":"mr-2"}`)},null,8,["class"])):e.createCommentVNode("",!0),t.hideText?(e.openBlock(),e.createElementBlock("div",Be,"   ")):e.renderSlot(f.$slots,"default",{key:1},()=>[e.createTextVNode("Button")],!0),t.iconRight||!t.loading?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.iconRight),{key:3,class:e.normalizeClass(`${b.value} ${t.hideText?"":"ml-2"}`)},null,8,["class"])):e.createCommentVNode("",!0)]),_:3},8,["href","to","type","external","class","disabled"]))}});const ae=(t,l)=>{const n=t.__vccOpts||t;for(const[o,s]of l)n[o]=s;return n},U=ae(we,[["__scopeId","data-v-38aa371e"]]),re=e.defineComponent({__name:"Link",props:{to:{type:String,required:!1,default:void 0},external:{type:Boolean,required:!1,default:void 0},disabled:{type:Boolean,required:!1,default:void 0},size:{type:String,default:"base"},foregroundLink:{type:Boolean,default:!1},iconLeft:{type:[Object,Function],default:null},iconRight:{type:[Object,Function],default:null},hideText:{type:Boolean,default:!1}},emits:["click"],setup(t,{emit:l}){const n=t,o=s=>{if(n.disabled){s.preventDefault(),s.stopPropagation(),s.stopImmediatePropagation();return}l("click",s)};return(s,r)=>(e.openBlock(),e.createBlock(U,{link:"",to:t.to,external:t.external,disabled:t.disabled,size:t.size,"foreground-link":t.foregroundLink,"icon-left":t.iconLeft,"icon-right":t.iconRight,"hide-text":t.hideText,role:"link",onClickCapture:o},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default",{},()=>[e.createTextVNode("Link")])]),_:3},8,["to","external","disabled","size","foreground-link","icon-left","icon-right","hide-text"]))}});var A=(t=>(t[t.Success=0]="Success",t[t.Warning=1]="Warning",t[t.Danger=2]="Danger",t[t.Info=3]="Info",t))(A||{});const Ve={"aria-live":"assertive",class:"pointer-events-none fixed inset-0 flex items-end px-4 py-6 mt-10 sm:items-start sm:p-6 z-50"},Ee={class:"flex w-full flex-col items-center space-y-4 sm:items-end"},Se={key:0,class:"pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg bg-foundation text-foreground shadow-lg ring-1 ring-primary-muted ring-opacity-5"},Ne={class:"p-4"},$e={class:"flex items-start"},Ie={class:"flex-shrink-0"},ze={class:"ml-2 w-0 flex-1 flex flex-col"},_e={key:0,class:"text-foreground font-bold"},De={key:1,class:"label label--light text-foreground-2"},Le={key:2,class:"flex justify-start mt-2"},Pe=e.createElementVNode("span",{class:"sr-only"},"Close",-1),je=e.defineComponent({__name:"ToastRenderer",props:{notification:null},emits:["update:notification"],setup(t,{emit:l}){const n=t,o=e.computed(()=>{var i,c;return!((i=n.notification)!=null&&i.description)&&!((c=n.notification)!=null&&c.cta)}),s=()=>{l("update:notification",null)},r=i=>{var c,g,u;(u=(g=(c=n.notification)==null?void 0:c.cta)==null?void 0:g.onClick)==null||u.call(g,i),s()};return(i,c)=>(e.openBlock(),e.createElementBlock("div",Ve,[e.createElementVNode("div",Ee,[e.createVNode(e.Transition,{"enter-active-class":"transform ease-out duration-300 transition","enter-from-class":"translate-y-2 opacity-0 sm:translate-y-0 sm:translate-x-2","enter-to-class":"translate-y-0 opacity-100 sm:translate-x-0","leave-active-class":"transition ease-in duration-100","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:e.withCtx(()=>[t.notification?(e.openBlock(),e.createElementBlock("div",Se,[e.createElementVNode("div",Ne,[e.createElementVNode("div",$e,[e.createElementVNode("div",Ie,[t.notification.type===e.unref(A).Success?(e.openBlock(),e.createBlock(e.unref(O.CheckCircleIcon),{key:0,class:"h-6 w-6 text-success","aria-hidden":"true"})):t.notification.type===e.unref(A).Danger?(e.openBlock(),e.createBlock(e.unref(O.XCircleIcon),{key:1,class:"h-6 w-6 text-danger","aria-hidden":"true"})):t.notification.type===e.unref(A).Warning?(e.openBlock(),e.createBlock(e.unref(O.ExclamationCircleIcon),{key:2,class:"h-6 w-6 text-warning","aria-hidden":"true"})):t.notification.type===e.unref(A).Info?(e.openBlock(),e.createBlock(e.unref(O.InformationCircleIcon),{key:3,class:"h-6 w-6 text-info","aria-hidden":"true"})):e.createCommentVNode("",!0)]),e.createElementVNode("div",ze,[t.notification.title?(e.openBlock(),e.createElementBlock("p",_e,e.toDisplayString(t.notification.title),1)):e.createCommentVNode("",!0),t.notification.description?(e.openBlock(),e.createElementBlock("p",De,e.toDisplayString(t.notification.description),1)):e.createCommentVNode("",!0),t.notification.cta?(e.openBlock(),e.createElementBlock("div",Le,[e.createVNode(re,{to:t.notification.cta.url,class:"label",primary:"",onClick:r},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.notification.cta.title),1)]),_:1},8,["to"])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:e.normalizeClass(["ml-4 flex flex-shrink-0",{"self-center":o.value}])},[e.createElementVNode("button",{type:"button",class:"inline-flex rounded-md bg-foundation text-foreground-2 hover:text-foreground focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2",onClick:s},[Pe,e.createVNode(e.unref($.XMarkIcon),{class:"h-6 w-6","aria-hidden":"true"})])],2)])])])):e.createCommentVNode("",!0)]),_:1})])]))}}),Oe=e.createElementVNode("circle",{cx:"4",cy:"4",r:"3"},null,-1),Te=[Oe],ie=e.defineComponent({__name:"Badge",props:{size:null,colorClasses:null,dot:{type:Boolean},dotIconColorClasses:null,iconLeft:null,rounded:{type:Boolean},clickableIcon:{type:Boolean}},emits:["click-icon"],setup(t,{emit:l}){const n=t,o=e.computed(()=>n.colorClasses||"bg-blue-100 text-blue-800"),s=e.computed(()=>n.dotIconColorClasses||"text-blue-400"),r=e.computed(()=>{const u=["inline-flex items-center",o.value,n.size==="lg"?"px-3 py-0.5 label":"px-2.5 py-0.5 caption font-medium"];return n.rounded?(u.push("rounded"),u.push(n.size==="lg"?"px-2 py-0.5 label":"px-2.5 py-0.5 caption font-medium")):(u.push("rounded-full"),u.push(n.size==="lg"?"px-2.5 py-0.5 label":"px-2.5 py-0.5 caption font-medium")),u.join(" ")}),i=e.computed(()=>{const u=["mt-0.5 ml-0.5 inline-flex h-4 w-4 flex-shrink-0 items-center justify-center rounded-full focus:outline-none"];return n.clickableIcon?u.push("cursor-pointer"):u.push("cursor-default"),u.join(" ")}),c=e.computed(()=>["-ml-0.5 mr-1.5 h-2 w-2",s.value].join(" ")),g=u=>{if(!n.clickableIcon){u.stopPropagation(),u.stopImmediatePropagation(),u.preventDefault();return}l("click-icon",u)};return(u,p)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(r.value)},[t.dot?(e.openBlock(),e.createElementBlock("svg",{key:0,class:e.normalizeClass(c.value),fill:"currentColor",viewBox:"0 0 8 8"},Te,2)):e.createCommentVNode("",!0),e.renderSlot(u.$slots,"default",{},()=>[e.createTextVNode("Badge")]),t.iconLeft?(e.openBlock(),e.createElementBlock("button",{key:1,class:e.normalizeClass(i.value),onClick:p[0]||(p[0]=h=>g(h))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.iconLeft),{class:e.normalizeClass(["h-4 w-4",s.value])},null,8,["class"]))],2)):e.createCommentVNode("",!0)],2))}});let le=[];function Ae(t){le=le?t:t.slice()}var M=(t=>(t[t.sm=640]="sm",t[t.md=746]="md",t[t.lg=1024]="lg",t[t.xl=1280]="xl",t[t["2xl"]=1536]="2xl",t))(M||{});function ce(t){const{props:{modelValue:l,steps:n,orientation:o,goVerticalBelow:s,nonInteractive:r,stepsPadding:i},emit:c}=t,g=e.computed(()=>(o==null?void 0:o.value)==="vertical"?"vertical":"horizontal"),u=e.computed({get:()=>C.clamp((l==null?void 0:l.value)||0,-1,n.value.length),set:m=>c("update:modelValue",C.clamp(m,0,n.value.length))}),p=m=>`${m+1}`,h=m=>m===u.value,d=m=>m<u.value,v=(m,y)=>{var S;if(r!=null&&r.value){y==null||y.preventDefault(),y==null||y.stopPropagation(),y==null||y.stopImmediatePropagation();return}u.value=m;const b=n.value[u.value];(S=b==null?void 0:b.onClick)==null||S.call(b)},a=e.computed(()=>{const m=["flex"];let y,b;return(i==null?void 0:i.value)==="xs"?(y="space-x-2",b="space-y-1"):(i==null?void 0:i.value)==="sm"?(y="space-x-4",b="space-y-1"):(y="space-x-8",b="space-y-4"),m.push("flex"),g.value==="vertical"||s!=null&&s.value?(m.push(`flex-col ${b} justify-center`),(s==null?void 0:s.value)===M.sm?m.push(`sm:flex-row sm:space-y-0 sm:justify-start sm:${y} sm:items-center`):(s==null?void 0:s.value)===M.md?m.push(`md:flex-row md:space-y-0 md:justify-start md:${y} md:items-center`):(s==null?void 0:s.value)===M.lg?m.push(`lg:flex-row lg:space-y-0 lg:justify-start lg:${y} lg:items-center`):(s==null?void 0:s.value)===M.xl&&m.push(`xl:flex-row xl:space-y-0 xl:justify-start xl:${y} xl:items-center`)):m.push(`flex-row ${y} items-center`),m.join(" ")}),x=e.computed(()=>{const m=["flex items-center"];return r!=null&&r.value||m.push("cursor-pointer"),m.join(" ")});return{value:u,isCurrentStep:h,isFinishedStep:d,switchStep:v,getStepDisplayValue:p,listClasses:a,linkClasses:x,orientation:g}}Ae(["sm:space-x-8","md:space-x-8","lg:space-x-8","xl:space-x-8","sm:space-x-2","md:space-x-2","lg:space-x-2","xl:space-x-2","sm:space-x-4","md:space-x-4","lg:space-x-4","xl:space-x-4"]);const Me=["aria-label"],Fe=["href","onClick"],Re={class:"flex space-x-3 items-center text-primary-focus normal font-medium leading-5"},Ue={class:"shrink-0 h-8 w-8 rounded-full bg-primary-focus text-foreground-on-primary inline-flex items-center justify-center"},qe={class:"flex flex-col"},We={key:0,class:"label label--light text-foreground"},He=["href","onClick"],Ge={class:"flex space-x-3 items-center text-primary-focus normal font-medium leading-5"},Ke={class:"shrink-0 h-8 w-8 rounded-full border-2 border-primary-focus inline-flex items-center justify-center"},Xe={class:"flex flex-col"},Je={key:0,class:"label label--light text-foreground"},Qe=["href","onClick"],Ye={class:"flex space-x-3 items-center text-foreground-disabled normal font-medium leading-5"},Ze={class:"shrink-0 h-8 w-8 rounded-full border-2 border-foreground-disabled inline-flex items-center justify-center"},et={class:"flex flex-col"},tt={key:0,class:"label label--light"},nt=e.defineComponent({__name:"Number",props:{ariaLabel:null,orientation:null,steps:null,modelValue:null,goVerticalBelow:null,nonInteractive:{type:Boolean},stepsPadding:null},emits:["update:modelValue"],setup(t,{emit:l}){const n=t,{isCurrentStep:o,isFinishedStep:s,switchStep:r,getStepDisplayValue:i,listClasses:c,linkClasses:g}=ce({props:e.toRefs(n),emit:l});return(u,p)=>(e.openBlock(),e.createElementBlock("nav",{class:"flex justify-center","aria-label":t.ariaLabel||"Progress steps"},[e.createElementVNode("ol",{class:e.normalizeClass(e.unref(c))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.steps,(h,d)=>(e.openBlock(),e.createElementBlock("li",{key:h.name},[e.unref(s)(d)?(e.openBlock(),e.createElementBlock("a",{key:0,href:h.href,class:e.normalizeClass(e.unref(g)),onClick:v=>e.unref(r)(d,v)},[e.createElementVNode("div",Re,[e.createElementVNode("div",Ue,[e.createVNode(e.unref($.CheckIcon),{class:"w-5 h-5"})]),e.createElementVNode("div",qe,[e.createElementVNode("div",null,e.toDisplayString(h.name),1),h.description?(e.openBlock(),e.createElementBlock("div",We,e.toDisplayString(h.description),1)):e.createCommentVNode("",!0)])])],10,Fe)):e.unref(o)(d)?(e.openBlock(),e.createElementBlock("a",{key:1,href:h.href,class:e.normalizeClass(e.unref(g)),"aria-current":"step",onClick:v=>e.unref(r)(d,v)},[e.createElementVNode("div",Ge,[e.createElementVNode("div",Ke,e.toDisplayString(e.unref(i)(d)),1),e.createElementVNode("div",Xe,[e.createElementVNode("div",null,e.toDisplayString(h.name),1),h.description?(e.openBlock(),e.createElementBlock("div",Je,e.toDisplayString(h.description),1)):e.createCommentVNode("",!0)])])],10,He)):(e.openBlock(),e.createElementBlock("a",{key:2,href:h.href,class:e.normalizeClass(e.unref(g)),onClick:v=>e.unref(r)(d,v)},[e.createElementVNode("div",Ye,[e.createElementVNode("div",Ze,e.toDisplayString(e.unref(i)(d)),1),e.createElementVNode("div",et,[e.createElementVNode("div",null,e.toDisplayString(h.name),1),h.description?(e.openBlock(),e.createElementBlock("div",tt,e.toDisplayString(h.description),1)):e.createCommentVNode("",!0)])])],10,Qe))]))),128))],2)],8,Me))}}),ot=["aria-label"],lt=["href","onClick"],st={class:"relative flex h-5 w-5 flex-shrink-0 items-center justify-center"},at={key:0,class:"h-3 w-3 rounded-full bg-foreground-2"},rt=["href","onClick"],it={class:"relative flex h-5 w-5 flex-shrink-0 items-center justify-center","aria-hidden":"true"},ct={key:0,class:"h-3 w-3 rounded-full bg-foreground"},ut=e.createElementVNode("span",{class:"absolute h-4 w-4 rounded-full bg-outline-2"},null,-1),dt=e.createElementVNode("span",{class:"relative block h-2 w-2 rounded-full bg-primary-focus"},null,-1),ft=["href","onClick"],mt={class:"relative flex h-5 w-5 flex-shrink-0 items-center justify-center","aria-hidden":"true"},pt={key:0,class:"h-3 w-3 rounded-full bg-foreground-2"},ht={key:1,class:"h-4 w-4 rounded-full bg-foreground-disabled"},gt=e.defineComponent({__name:"Bullet",props:{ariaLabel:null,basic:{type:Boolean},orientation:null,steps:null,modelValue:null,goVerticalBelow:null,nonInteractive:{type:Boolean},stepsPadding:null},emits:["update:modelValue"],setup(t,{emit:l}){const n=t,{isCurrentStep:o,isFinishedStep:s,switchStep:r,listClasses:i,linkClasses:c}=ce({props:e.toRefs(n),emit:l}),g=e.computed(()=>{const p=["h6 font-medium leading-7"];let h;return n.stepsPadding==="xs"?h="ml-1":n.stepsPadding==="sm"?h="ml-2":h="ml-3",p.push(h),n.basic&&p.push("sr-only"),p.join(" ")}),u=e.computed(()=>{const p=[];return n.basic&&p.push("basic"),p.join(" ")});return(p,h)=>(e.openBlock(),e.createElementBlock("nav",{class:"flex justify-center","aria-label":t.ariaLabel||"Progress steps"},[e.createElementVNode("ol",{class:e.normalizeClass([e.unref(i),u.value])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.steps,(d,v)=>(e.openBlock(),e.createElementBlock("li",{key:d.name},[e.unref(s)(v)?(e.openBlock(),e.createElementBlock("a",{key:0,href:d.href,class:e.normalizeClass(e.unref(c)),onClick:a=>e.unref(r)(v,a)},[e.createElementVNode("span",st,[t.basic?(e.openBlock(),e.createElementBlock("span",at)):(e.openBlock(),e.createBlock(e.unref($.CheckCircleIcon),{key:1,class:"h-full w-full text-primary","aria-hidden":"true"}))]),e.createElementVNode("span",{class:e.normalizeClass(["text-foreground",g.value])},e.toDisplayString(d.name),3)],10,lt)):e.unref(o)(v)?(e.openBlock(),e.createElementBlock("a",{key:1,href:d.href,class:e.normalizeClass(e.unref(c)),"aria-current":"step",onClick:a=>e.unref(r)(v,a)},[e.createElementVNode("span",it,[t.basic?(e.openBlock(),e.createElementBlock("span",ct)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[ut,dt],64))]),e.createElementVNode("span",{class:e.normalizeClass(["text-primary-focus",g.value])},e.toDisplayString(d.name),3)],10,rt)):(e.openBlock(),e.createElementBlock("a",{key:2,href:d.href,class:e.normalizeClass(e.unref(c)),onClick:a=>e.unref(r)(v,a)},[e.createElementVNode("div",mt,[t.basic?(e.openBlock(),e.createElementBlock("span",pt)):(e.openBlock(),e.createElementBlock("div",ht))]),e.createElementVNode("p",{class:e.normalizeClass(["text-foreground-disabled",g.value])},e.toDisplayString(d.name),3)],10,ft))]))),128))],2)],8,ot))}}),vt=["disabled"],yt=e.defineComponent({__name:"CardButton",props:{disabled:{type:Boolean},modelValue:{type:Boolean}},emits:["update:modelValue","click"],setup(t,{emit:l}){const n=t,o=e.computed(()=>{const r=["h-20 bg-foundation-2 inline-flex justify-center items-center outline-none","normal px-16 py-5 shadow rounded transition active:scale-95"];return n.disabled?r.push("bg-foundation-disabled text-foreground-2 cursor-not-allowed"):(r.push(n.modelValue?"bg-primary-focus text-foreground-on-primary":"bg-foundation text-foreground"),r.push("ring-outline-2 hover:ring-4")),r.join(" ")}),s=r=>{if(n.disabled){r.preventDefault(),r.stopPropagation(),r.stopImmediatePropagation();return}l("update:modelValue",!n.modelValue),l("click",r)};return(r,i)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(o.value),disabled:t.disabled,onClick:s},[e.renderSlot(r.$slots,"default",{},()=>[e.createTextVNode("Text")])],10,vt))}}),kt={class:"relative flex items-start"},bt={class:"flex h-6 items-center"},xt=["id","checked","aria-describedby","name","disabled","value"],Ct={class:"ml-2 text-sm",style:{"padding-top":"2px"}},Bt=["for"],wt={key:0,class:"text-danger ml-1"},Vt=["id"],Et=e.defineComponent({inheritAttrs:!1,__name:"Checkbox",props:{name:{type:String,required:!0},disabled:{type:Boolean,default:!1},label:{type:String,default:void 0},description:{type:String,default:void 0},inlineDescription:{type:Boolean,default:!1},rules:{type:[String,Object,Function,Array],default:void 0},validateOnMount:{type:Boolean,default:!1},showRequired:{type:Boolean,default:!1},modelValue:{type:[String,Boolean],default:void 0},value:{type:[String,Boolean],default:!0},id:{type:String,default:void 0},hideLabel:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t){const l=t,n=m=>`${m}-${J.nanoid()}`,o=e.computed(()=>l.value||l.name),{checked:s,errorMessage:r,handleChange:i,value:c}=X.useField(l.name,l.rules,{validateOnMount:l.validateOnMount,type:"checkbox",checkedValue:o,initialValue:l.modelValue||void 0}),g=e.computed(()=>l.label||l.name),u=e.computed(()=>r.value?"border-danger-lighter":"border-foreground-4 "),p=e.computed(()=>l.description||r.value),h=e.computed(()=>`${l.name}-description`),d=e.computed(()=>{const m=[];return l.inlineDescription?m.push("inline ml-2"):m.push("block"),r.value?m.push("text-danger"):m.push("text-foreground-2"),m.join(" ")}),v=e.ref(n("checkbox")),a=e.computed(()=>l.id||v.value),x=m=>{l.disabled||i(m)};return e.onMounted(()=>{const m=l.modelValue,y=c.value,b=Array.isArray(m)?m.includes(l.value):m===l.value,S=Array.isArray(y)?y.includes(l.value):y===l.value;b!==S&&i(m)}),(m,y)=>(e.openBlock(),e.createElementBlock("div",kt,[e.createElementVNode("div",bt,[e.createElementVNode("input",e.mergeProps({id:a.value,checked:e.unref(s),"aria-describedby":h.value,name:t.name,disabled:t.disabled,value:o.value,type:"checkbox",class:["h-4 w-4 rounded text-primary focus:ring-primary bg-foundation disabled:cursor-not-allowed disabled:bg-disabled disabled:text-disabled-2",u.value]},m.$attrs,{onChange:x}),null,16,xt)]),e.createElementVNode("div",Ct,[e.createElementVNode("label",{for:a.value,class:e.normalizeClass(["font-medium text-foreground",{"sr-only":t.hideLabel}])},[e.createElementVNode("span",null,e.toDisplayString(g.value),1),t.showRequired?(e.openBlock(),e.createElementBlock("span",wt,"*")):e.createCommentVNode("",!0)],10,Bt),p.value?(e.openBlock(),e.createElementBlock("p",{key:0,id:h.value,class:e.normalizeClass(d.value)},e.toDisplayString(p.value),11,Vt)):e.createCommentVNode("",!0)])]))}});function ue(t){const{props:l,inputEl:n,emit:o}=t,{value:s,errorMessage:r}=X.useField(l.name,l.rules,{validateOnMount:e.unref(l.validateOnMount),validateOnValueUpdate:e.unref(l.validateOnValueUpdate),initialValue:e.unref(l.modelValue)||void 0}),i=e.computed(()=>{const b=["block label text-foreground-2 mb-2"];return e.unref(l.showLabel)||b.push("sr-only"),b.join(" ")}),c=e.computed(()=>{const b=["block w-full rounded focus:outline-none text-foreground transition-all","disabled:cursor-not-allowed disabled:bg-foundation-disabled disabled:text-disabled-muted","placeholder:text-foreground-2"];return r.value?b.push("border-2 border-danger text-danger-darker focus:border-danger focus:ring-danger"):b.push("border-0 focus:ring-2 focus:ring-outline-2"),e.unref(l.color)==="foundation"?b.push("bg-foundation shadow-sm hover:shadow"):b.push("bg-foundation-page"),b.join(" ")}),g=e.ref(J.nanoid()),u=e.computed(()=>e.unref(l.label)||e.unref(l.name)),p=e.computed(()=>{const b=r.value;return!b||!e.unref(l.useLabelInErrors)?b:b.replace("Value",u.value)}),h=e.computed(()=>p.value&&e.unref(l.hideErrorMessage)),d=e.computed(()=>p.value||e.unref(l.help)),v=e.computed(()=>!!d.value),a=e.computed(()=>v.value?`${e.unref(l.name)}-${g.value}`:void 0),x=e.computed(()=>{const b=["mt-2 text-sm"];return b.push(r.value?"text-danger":"text-foreground-2"),b.join(" ")}),m=()=>{var b;(b=n.value)==null||b.focus()},y=()=>{s.value="",o("change",{value:""}),o("clear")};return e.onMounted(()=>{e.unref(l.autoFocus)&&m()}),{coreClasses:c,title:u,value:s,helpTipId:a,helpTipClasses:x,helpTip:d,hideHelpTip:h,errorMessage:p,clear:y,focus:m,labelClasses:i}}const St=["for"],Nt={class:"relative"},$t=["id","name","placeholder","disabled","aria-invalid","aria-describedby"],It=e.createElementVNode("span",{class:"text-xs sr-only"},"Clear input",-1),zt={key:2,class:"pointer-events-none absolute inset-y-0 mt-3 text-4xl right-0 flex items-center pr-2 text-danger opacity-50"},_t=["id"],Dt=e.defineComponent({__name:"TextArea",props:{name:null,showLabel:{type:Boolean},help:null,placeholder:null,label:null,disabled:{type:Boolean},rules:null,validateOnMount:{type:Boolean},validateOnValueUpdate:{type:Boolean},useLabelInErrors:{type:Boolean,default:!0},autoFocus:{type:Boolean},modelValue:{default:""},showClear:{type:Boolean},fullWidth:{type:Boolean},showRequired:{type:Boolean},color:{default:"page"}},emits:["update:modelValue","change","input","clear"],setup(t,{expose:l,emit:n}){const o=t,s=e.ref(null),{coreClasses:r,title:i,value:c,helpTipId:g,helpTipClasses:u,helpTip:p,errorMessage:h,labelClasses:d,clear:v,focus:a}=ue({props:e.toRefs(o),emit:n,inputEl:s}),x=e.computed(()=>{const m=["pl-2"];return o.showClear&&h.value?m.push("pr-12"):(o.showClear||h.value)&&m.push("pr-8"),m.join(" ")});return l({focus:a}),(m,y)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([t.fullWidth?"w-full":""])},[e.createElementVNode("label",{for:t.name,class:e.normalizeClass(e.unref(d))},[e.createElementVNode("span",null,e.toDisplayString(e.unref(i)),1)],10,St),e.createElementVNode("div",Nt,[e.withDirectives(e.createElementVNode("textarea",e.mergeProps({id:t.name,ref_key:"inputElement",ref:s,"onUpdate:modelValue":y[0]||(y[0]=b=>e.isRef(c)?c.value=b:null),name:t.name,class:[e.unref(r),x.value,"min-h-[4rem]"],placeholder:t.placeholder,disabled:t.disabled,"aria-invalid":e.unref(h)?"true":"false","aria-describedby":e.unref(g)},m.$attrs,{onChange:y[1]||(y[1]=b=>m.$emit("change",{event:b,value:e.unref(c)})),onInput:y[2]||(y[2]=b=>m.$emit("input",{event:b,value:e.unref(c)}))}),null,16,$t),[[e.vModelText,e.unref(c)]]),t.showClear?(e.openBlock(),e.createElementBlock("a",{key:0,title:"Clear input",class:"absolute top-2 right-0 flex items-center pr-2 cursor-pointer",onClick:y[3]||(y[3]=(...b)=>e.unref(v)&&e.unref(v)(...b)),onKeydown:y[4]||(y[4]=(...b)=>e.unref(v)&&e.unref(v)(...b))},[It,e.createVNode(e.unref($.XMarkIcon),{class:"h-5 w-5 text-foreground","aria-hidden":"true"})],32)):e.createCommentVNode("",!0),e.unref(h)?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["pointer-events-none absolute inset-y-0 right-0 flex items-center",t.showClear?"pr-8":"pr-2"])},[e.createVNode(e.unref($.ExclamationCircleIcon),{class:"h-4 w-4 text-danger","aria-hidden":"true"})],2)):e.createCommentVNode("",!0),t.showRequired&&!e.unref(h)?(e.openBlock(),e.createElementBlock("div",zt," * ")):e.createCommentVNode("",!0)]),e.unref(g)?(e.openBlock(),e.createElementBlock("p",{key:0,id:e.unref(g),class:e.normalizeClass(e.unref(u))},e.toDisplayString(e.unref(p)),11,_t)):e.createCommentVNode("",!0)],2))}}),Lt=["for"],Pt={class:"relative"},jt={key:0,class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2"},Ot=["id","type","name","placeholder","disabled","aria-invalid","aria-describedby"],Tt=e.createElementVNode("span",{class:"text-xs sr-only"},"Clear input",-1),At={key:2,class:"pointer-events-none absolute inset-y-0 mt-3 text-4xl right-0 flex items-center pr-2 text-danger opacity-50"},Mt=["id"],Ft=e.defineComponent({inheritAttrs:!1,__name:"TextInput",props:{type:{type:String,default:"text"},name:{type:String,required:!0},showLabel:{type:Boolean,required:!1},help:{type:String,default:void 0},placeholder:{type:String,default:void 0},label:{type:String,default:void 0},showRequired:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},rules:{type:[String,Object,Function,Array],default:void 0},validateOnMount:{type:Boolean,default:!1},validateOnValueUpdate:{type:Boolean,default:!1},useLabelInErrors:{type:Boolean,default:!0},customIcon:{type:[Object,Function],default:void 0},autoFocus:{type:Boolean,default:!1},modelValue:{type:String,default:""},size:{type:String,default:"base"},showClear:{type:Boolean,default:!1},fullWidth:{type:Boolean,default:!1},inputClasses:{type:String,default:null},hideErrorMessage:{type:Boolean,default:!1},wrapperClasses:{type:String,default:()=>""},color:{type:String,default:"page"}},emits:["update:modelValue","change","input","clear","focusin","focusout"],setup(t,{expose:l,emit:n}){const o=t,s=e.useSlots(),r=e.ref(null),{coreClasses:i,title:c,value:g,helpTipId:u,helpTipClasses:p,helpTip:h,hideHelpTip:d,errorMessage:v,clear:a,focus:x,labelClasses:m}=ue({props:e.toRefs(o),emit:n,inputEl:r}),y=e.computed(()=>{const V=["h-5 w-5"];return v.value?V.push("text-danger"):V.push("text-foreground-2"),V.join(" ")}),b=e.computed(()=>["email","password"].includes(o.type)||o.customIcon),S=e.computed(()=>{const V=[];return b.value?V.push("pl-8"):V.push("pl-2"),s["input-right"]||(v.value||o.showClear)&&(v.value&&o.showClear?V.push("pr-12"):V.push("pr-8")),V.join(" ")}),f=e.computed(()=>{switch(o.size){case"sm":return"h-6";case"lg":return"h-10";case"xl":return"h-14";case"base":default:return"h-8"}});return l({focus:x}),(V,I)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([t.fullWidth?"w-full":"",t.wrapperClasses])},[e.createElementVNode("label",{for:t.name,class:e.normalizeClass(e.unref(m))},[e.createElementVNode("span",null,e.toDisplayString(e.unref(c)),1)],10,Lt),e.createElementVNode("div",Pt,[b.value?(e.openBlock(),e.createElementBlock("div",jt,[t.customIcon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.customIcon),{key:0,class:e.normalizeClass(y.value),"aria-hidden":"true"},null,8,["class"])):t.type==="email"?(e.openBlock(),e.createBlock(e.unref($.EnvelopeIcon),{key:1,class:e.normalizeClass(y.value),"aria-hidden":"true"},null,8,["class"])):t.type==="password"?(e.openBlock(),e.createBlock(e.unref($.KeyIcon),{key:2,class:e.normalizeClass(y.value),"aria-hidden":"true"},null,8,["class"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",e.mergeProps({id:t.name,ref_key:"inputElement",ref:r,"onUpdate:modelValue":I[0]||(I[0]=N=>e.isRef(g)?g.value=N:null),type:t.type,name:t.name,class:[e.unref(i),S.value,f.value,t.inputClasses||""],placeholder:t.placeholder,disabled:t.disabled,"aria-invalid":e.unref(v)?"true":"false","aria-describedby":e.unref(u),role:"textbox"},V.$attrs,{onChange:I[1]||(I[1]=N=>V.$emit("change",{event:N,value:e.unref(g)})),onInput:I[2]||(I[2]=N=>V.$emit("input",{event:N,value:e.unref(g)}))}),null,16,Ot),[[e.vModelDynamic,e.unref(g)]]),e.renderSlot(V.$slots,"input-right",{},()=>[t.showClear?(e.openBlock(),e.createElementBlock("a",{key:0,title:"Clear input",class:"absolute inset-y-0 right-0 flex items-center pr-2 cursor-pointer",onClick:I[3]||(I[3]=(...N)=>e.unref(a)&&e.unref(a)(...N)),onKeydown:I[4]||(I[4]=(...N)=>e.unref(a)&&e.unref(a)(...N))},[Tt,e.createVNode(e.unref($.XMarkIcon),{class:"h-5 w-5 text-foreground","aria-hidden":"true"})],32)):e.createCommentVNode("",!0),e.unref(v)?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["pointer-events-none absolute inset-y-0 right-0 flex items-center",t.showClear?"pr-8":"pr-2"])},[e.createVNode(e.unref($.ExclamationCircleIcon),{class:"h-4 w-4 text-danger","aria-hidden":"true"})],2)):e.createCommentVNode("",!0),t.showRequired&&!e.unref(v)?(e.openBlock(),e.createElementBlock("div",At," * ")):e.createCommentVNode("",!0)])]),e.unref(u)&&!e.unref(d)?(e.openBlock(),e.createElementBlock("p",{key:0,id:e.unref(u),class:e.normalizeClass(e.unref(p))},e.toDisplayString(e.unref(h)),11,Mt)):e.createCommentVNode("",!0)],2))}}),Rt=/^https?:\/\//,Q=/^[\w-_.+]+@[\w-_.+]+$/,Ut=t=>(t||"").match(Q)?!0:"Value should be a valid e-mail address",qt=t=>(t||"").split(",").map(o=>o.trim()).every(o=>o.match(Q))||"Value should be one or multiple comma-delimited e-mail addresses",Wt=t=>(C.isString(t)&&(t=t.trim()),t?!0:"Value is required"),Ht=(t,l)=>(n,o)=>n===o.form[t]?!0:`Value must be the same as in field '${l||t}'`,Gt=t=>l=>{const{minLength:n,maxLength:o}=t;return l=R.isNullOrUndefined(l)?"":l,C.isString(l)?!C.isUndefined(n)&&l.length<n?`Value needs to be at least ${n} characters long`:!C.isUndefined(o)&&l.length>o?`Value needs to be no more than ${o} characters long`:!0:"Value should be a text string"},Kt=t=>l=>{const{match:n,message:o}=t;return C.isString(l)?n?C.isString(n)?l.includes(n)?!0:o:n.test(l)?!0:o:!0:"Value should be a text string"},Xt=Object.freeze(Object.defineProperty({__proto__:null,VALID_EMAIL:Q,VALID_HTTP_URL:Rt,isEmail:Ut,isOneOrMultipleEmails:qt,isRequired:Wt,isSameAs:Ht,isStringOfLength:Gt,stringContains:Kt},Symbol.toStringTag,{value:"Module"}));function de(t){const{skipCalculation:l,elementToWatchForChanges:n,itemContainer:o,trackResize:s=!1,trackMutations:r=!0}=t||{},i=e.ref(0),c=()=>{const g=o.value;if(l!=null&&l.value||!g)return;const u=g.children;let p=0,h=0,d;for(const v of u){const a=v.offsetTop;C.isUndefined(d)?(d=a,p+=1):a===d&&(p+=1),h+=1}i.value=h-p};return s&&T.useResizeObserver(n,c),r&&T.useMutationObserver(n,c,{childList:!0,subtree:!0}),{hiddenItemCount:i}}function fe(t){const{props:l,emit:n,dynamicVisibility:o}=t;let s;if(o){const{elementToWatchForChanges:u,itemContainer:p}=o;s=de({skipCalculation:e.computed(()=>{var d;return!((d=l.multiple)!=null&&d.value)}),elementToWatchForChanges:u,itemContainer:p}).hiddenItemCount}else s=e.ref(0);const r=e.computed({get:()=>{var p,h;const u=(p=l.modelValue)==null?void 0:p.value;return(h=l.multiple)!=null&&h.value?C.isArray(u)?u:[]:C.isArray(u)?void 0:u},set:u=>{var p,h,d;if((p=l.multiple)!=null&&p.value&&!C.isArray(u)){console.warn("Attempting to set non-array value in selector w/ multiple=true");return}else if(!((h=l.multiple)!=null&&h.value)&&C.isArray(u)){console.warn("Attempting to set array value in selector w/ multiple=false");return}n("update:modelValue",(d=l.multiple)!=null&&d.value?u||[]:u)}}),i=u=>C.isArray(u);return{selectedValue:r,hiddenSelectedItemCount:s,isArrayValue:i,isMultiItemArrayValue:u=>C.isArray(u)&&u.length>1,firstItem:u=>i(u)?u[0]:u}}const Jt=t=>(e.pushScopeId("data-v-60cf597b"),t=t(),e.popScopeId(),t),Qt=Jt(()=>e.createElementVNode("div",{class:"swoosher relative top-0 bg-blue-500/50"},null,-1)),Yt=[Qt],Zt=e.defineComponent({__name:"Bar",props:{loading:{type:Boolean}},setup(t){return(l,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["relative w-full h-1 bg-blue-500/30 text-xs text-foreground-on-primary overflow-hidden rounded-xl",t.loading?"opacity-100":"opacity-0"])},Yt,2))}});const Y=ae(Zt,[["__scopeId","data-v-60cf597b"]]),en={class:"flex items-center justify-between w-full"},tn={class:"block truncate grow text-left"},nn={class:"pointer-events-none shrink-0 ml-1 flex items-center"},on=["disabled"],ln={key:0,class:"flex flex-col mx-1 mb-1"},sn=e.createElementVNode("span",{class:"sr-only label text-foreground"},"Search",-1),an={class:"relative"},rn={class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2"},cn=["placeholder"],un={key:0,class:"px-1"},dn={key:1},fn=e.createElementVNode("div",{class:"text-foreground-2 text-center"},"Nothing found 🤷‍♂️",-1),mn={class:e.normalizeClass(["block truncate"])},pn=["id"],me=e.defineComponent({__name:"Base",props:{multiple:{type:Boolean,default:!1},items:{type:Array,default:()=>[]},modelValue:{type:[Object,Array,String],default:void 0},search:{type:Boolean,default:!1},filterPredicate:{type:Function,default:void 0},disabledItemPredicate:{type:Function,default:void 0},getSearchResults:{type:Function,default:void 0},searchPlaceholder:{type:String,default:"Search"},label:{type:String,required:!0},showLabel:{type:Boolean,default:!1},name:{type:String,required:!0},by:{type:String,required:!1},disabled:{type:Boolean,default:!1},buttonStyle:{type:String,default:"base"},hideCheckmarks:{type:Boolean,default:!1},allowUnset:{type:Boolean,default:!0},clearable:{type:Boolean,default:!1},rules:{type:[String,Object,Function,Array],default:void 0},validateOnMount:{type:Boolean,default:!1},validateOnValueUpdate:{type:Boolean,default:!1},useLabelInErrors:{type:Boolean,default:!0},help:{type:String,default:void 0},fixedHeight:{type:Boolean,default:!1},fullyControlValue:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{expose:l,emit:n}){const o=t,{value:s,errorMessage:r}=X.useField(o.name,o.rules,{validateOnMount:o.validateOnMount,validateOnValueUpdate:o.validateOnValueUpdate,initialValue:o.modelValue}),i=e.ref(null),c=e.ref(""),g=e.ref([]),u=e.ref(!1),p=e.ref(1),h=e.ref(J.nanoid()),d=e.computed(()=>e.unref(o.label)||e.unref(o.name)),v=e.computed(()=>{const k=r.value;return!k||!e.unref(o.useLabelInErrors)?k:k.replace("Value",d.value)}),a=e.computed(()=>v.value||e.unref(o.help)),x=e.computed(()=>!!a.value),m=e.computed(()=>x.value?`${e.unref(o.name)}-${h.value}`:void 0),y=e.computed(()=>r.value?"text-danger":"text-foreground-2"),b=e.computed(()=>o.buttonStyle!=="simple"&&o.clearable&&!o.disabled),S=e.computed(()=>{const k=["relative flex group"];return o.buttonStyle!=="simple"&&(k.push("hover:shadow rounded-md"),k.push("outline outline-2 outline-primary-muted")),o.fixedHeight&&k.push("h-8"),k.join(" ")}),f=e.computed(()=>{const k=[];return o.buttonStyle!=="simple"&&k.push(q.value?"bg-foundation-disabled text-foreground-disabled":""),q.value&&k.push("cursor-not-allowed"),k.join(" ")}),V=e.computed(()=>{const k=["relative z-[1]","flex items-center justify-center text-center shrink-0","rounded-r-md overflow-hidden transition-all","text-foreground",Z.value?`w-6 ${f.value}`:"w-0"];return q.value||(k.push("hover:bg-primary hover:text-foreground-on-primary dark:text-foreground-on-primary"),o.buttonStyle==="tinted"?k.push("bg-outline-3"):k.push("bg-primary-muted")),k.join(" ")}),I=e.computed(()=>{const k=["relative z-[2]","normal rounded-md cursor-pointer transition truncate flex-1","flex items-center",f.value];return o.buttonStyle!=="simple"&&(k.push("py-2 px-3"),q.value||(o.buttonStyle==="tinted"?k.push("bg-foundation-page text-foreground"):k.push("bg-foundation text-foreground"))),b.value&&Z.value&&k.push("rounded-r-none"),k.join(" ")}),N=e.computed(()=>!!(o.search&&(o.filterPredicate||o.getSearchResults))),L=e.computed(()=>N.value&&o.getSearchResults),q=e.computed(()=>o.disabled||!o.items.length&&!L.value),z=e.computed({get:()=>{const k=s.value;return o.multiple?C.isArray(k)?k:[]:C.isArray(k)?void 0:k},set:k=>{if(o.multiple&&!C.isArray(k)){console.warn("Attempting to set non-array value in selector w/ multiple=true");return}else if(!o.multiple&&C.isArray(k)){console.warn("Attempting to set array value in selector w/ multiple=false");return}let w;if(o.multiple)w=k||[];else{const B=s.value;w=o.allowUnset&&B&&k&&G(B)===G(k)?void 0:k}o.fullyControlValue?n("update:modelValue",w):s.value=w,p.value+=1}}),Z=e.computed(()=>o.multiple?z.value.length!==0:!!z.value),ye=()=>{o.multiple?z.value=[]:z.value=void 0},ke=e.computed(()=>{const k=c.value;return!N.value||!(k!=null&&k.length)?g.value:o.filterPredicate?g.value.filter(w=>{var B;return((B=o.filterPredicate)==null?void 0:B.call(o,w,k))||!1}):g.value}),ee=k=>JSON.stringify(k),G=k=>o.by?k[o.by]:k,K=async()=>{if(!(!L.value||!o.getSearchResults)){u.value=!0;try{g.value=await o.getSearchResults(c.value)}finally{u.value=!1}}},be=C.debounce(K,1e3),xe=k=>{const{active:w,disabled:B}=k||{},{hideCheckmarks:D}=o,P=["relative transition cursor-pointer select-none py-1.5 pl-3",D?"":"pr-9"];return B?P.push("opacity-50 cursor-not-allowed"):P.push(w?"text-primary":"text-foreground"),P.join(" ")};return e.watch(()=>o.items,k=>{g.value=k.slice()},{immediate:!0}),e.watch(c,()=>{L.value&&be()}),e.onMounted(()=>{L.value&&!o.items.length&&K()}),l({triggerSearch:K}),(k,w)=>(e.openBlock(),e.createElementBlock("div",null,[(e.openBlock(),e.createBlock(e.unref(E.Listbox),{key:p.value,modelValue:z.value,"onUpdate:modelValue":w[4]||(w[4]=B=>z.value=B),name:t.name,multiple:t.multiple,by:t.by,disabled:q.value,as:"div"},{default:e.withCtx(()=>[e.createVNode(e.unref(E.ListboxLabel),{class:e.normalizeClass(["block label text-foreground-2 mb-2",{"sr-only":!t.showLabel}])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]),_:1},8,["class"]),e.createElementVNode("div",{class:e.normalizeClass(S.value)},[e.createVNode(e.unref(E.ListboxButton),{class:e.normalizeClass(I.value)},{default:e.withCtx(({open:B})=>[e.createElementVNode("div",en,[e.createElementVNode("div",tn,[!z.value||e.unref(C.isArray)(z.value)&&!z.value.length?e.renderSlot(k.$slots,"nothing-selected",{key:0},()=>[e.createTextVNode(e.toDisplayString(t.label),1)]):e.renderSlot(k.$slots,"something-selected",{key:1,value:z.value},()=>[e.createTextVNode(e.toDisplayString(ee(z.value)),1)])]),e.createElementVNode("div",nn,[B?(e.openBlock(),e.createBlock(e.unref(_.ChevronUpIcon),{key:0,class:"h-4 w-4 text-foreground","aria-hidden":"true"})):(e.openBlock(),e.createBlock(e.unref(_.ChevronDownIcon),{key:1,class:"h-4 w-4 text-foreground","aria-hidden":"true"}))])])]),_:3},8,["class"]),b.value?e.withDirectives((e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(V.value),disabled:t.disabled,onClick:w[0]||(w[0]=B=>ye())},[e.createVNode(e.unref(_.XMarkIcon),{class:"w-3 h-3"})],10,on)),[[e.unref(se.directive),"Clear"]]):e.createCommentVNode("",!0),e.createVNode(e.Transition,{"leave-active-class":"transition ease-in duration-100","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:e.withCtx(()=>[e.createVNode(e.unref(E.ListboxOptions),{class:"absolute top-[100%] z-10 mt-1 w-full rounded-md bg-foundation-2 py-1 label label--light outline outline-2 outline-primary-muted focus:outline-none shadow",onFocus:w[3]||(w[3]=B=>{var D;return(D=i.value)==null?void 0:D.focus()})},{default:e.withCtx(()=>[N.value?(e.openBlock(),e.createElementBlock("label",ln,[sn,e.createElementVNode("div",an,[e.createElementVNode("div",rn,[e.createVNode(e.unref(_.MagnifyingGlassIcon),{class:"h-5 w-5 text-foreground"})]),e.withDirectives(e.createElementVNode("input",{ref_key:"searchInput",ref:i,"onUpdate:modelValue":w[1]||(w[1]=B=>c.value=B),type:"text",class:"pl-9 w-full border-0 bg-foundation-page rounded placeholder:font-normal normal placeholder:text-foreground-2 focus:outline-none focus:ring-1 focus:border-outline-1 focus:ring-outline-1",placeholder:t.searchPlaceholder,onKeydown:w[2]||(w[2]=e.withModifiers(()=>{},["stop"]))},null,40,cn),[[e.vModelText,c.value]])])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["overflow-auto simple-scrollbar",[N.value?"max-h-52":"max-h-60"]])},[L.value&&u.value?(e.openBlock(),e.createElementBlock("div",un,[e.createVNode(Y,{loading:!0})])):L.value&&!g.value.length?(e.openBlock(),e.createElementBlock("div",dn,[e.renderSlot(k.$slots,"nothing-found",{},()=>[fn])])):e.createCommentVNode("",!0),!L.value||!u.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(ke.value,B=>{var D;return e.openBlock(),e.createBlock(e.unref(E.ListboxOption),{key:G(B),value:B,disabled:((D=t.disabledItemPredicate)==null?void 0:D.call(t,B))||!1},{default:e.withCtx(({active:P,selected:te})=>{var ne,oe;return[e.createElementVNode("li",{class:e.normalizeClass(xe({active:P,disabled:((ne=t.disabledItemPredicate)==null?void 0:ne.call(t,B))||!1}))},[e.createElementVNode("span",mn,[e.renderSlot(k.$slots,"option",{item:B,active:P,selected:te,disabled:((oe=t.disabledItemPredicate)==null?void 0:oe.call(t,B))||!1},()=>[e.createTextVNode(e.toDisplayString(ee(B)),1)])]),!t.hideCheckmarks&&te?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass([P?"text-primary":"text-foreground","absolute inset-y-0 right-0 flex items-center pr-4"])},[e.createVNode(e.unref(_.CheckIcon),{class:"h-5 w-5","aria-hidden":"true"})],2)):e.createCommentVNode("",!0)],2)]}),_:2},1032,["value","disabled"])}),128)):e.createCommentVNode("",!0)],2)]),_:3})]),_:3})],2)]),_:3},8,["modelValue","name","multiple","by","disabled"])),m.value?(e.openBlock(),e.createElementBlock("p",{key:0,id:m.value,class:e.normalizeClass(["mt-2 text-sm",y.value])},e.toDisplayString(a.value),11,pn)):e.createCommentVNode("",!0)]))}}),pe=e.defineComponent({__name:"SourceAppBadge",props:{sourceApp:null},setup(t){return(l,n)=>(e.openBlock(),e.createBlock(ie,{"color-classes":"text-foreground-on-primary",rounded:"",style:e.normalizeStyle({backgroundColor:t.sourceApp.bgColor})},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.sourceApp.short),1)]),_:1},8,["style"]))}}),hn={key:0,class:"text-foreground-2 normal"},gn={key:1,class:"flex items-center"},vn={class:"truncate"},yn={class:"flex items-center"},kn={class:"truncate"},bn=e.defineComponent({__name:"SourceApps",props:{multiple:{type:Boolean,default:!1},modelValue:{type:[Object,Array],default:void 0},search:{type:Boolean,default:!1},searchPlaceholder:{type:String,default:"Search apps"},selectorPlaceholder:{type:String,default:void 0},label:{type:String,required:!0},showLabel:{type:Boolean,default:!1},name:{type:String,default:void 0},items:{type:Array,default:void 0}},emits:["update:modelValue"],setup(t,{emit:l}){const n=t,o=e.ref(null),s=e.ref(null),{selectedValue:r,hiddenSelectedItemCount:i,isMultiItemArrayValue:c,firstItem:g}=fe({props:e.toRefs(n),emit:l,dynamicVisibility:{elementToWatchForChanges:o,itemContainer:s}}),u=(p,h)=>p.name.toLocaleLowerCase().includes(h.toLocaleLowerCase());return(p,h)=>(e.openBlock(),e.createBlock(me,{modelValue:e.unref(r),"onUpdate:modelValue":h[0]||(h[0]=d=>e.isRef(r)?r.value=d:null),multiple:t.multiple,items:t.items??e.unref(R.SourceApps),search:t.search,"search-placeholder":t.searchPlaceholder,label:t.label,"show-label":t.showLabel,name:t.name||"sourceApps","filter-predicate":u,by:"name"},{"nothing-selected":e.withCtx(()=>[t.selectorPlaceholder?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(t.selectorPlaceholder),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(t.multiple?"Select apps":"Select an app"),1)],64))]),"something-selected":e.withCtx(({value:d})=>[e.unref(c)(d)?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"elementToWatchForChanges",ref:o,class:"flex items-center space-x-0.5 h-5"},[e.createElementVNode("div",{ref_key:"itemContainer",ref:s,class:"flex flex-wrap overflow-hidden space-x-0.5 h-5"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d,v=>(e.openBlock(),e.createBlock(pe,{key:v.name,"source-app":v},null,8,["source-app"]))),128))],512),e.unref(i)>0?(e.openBlock(),e.createElementBlock("div",hn," +"+e.toDisplayString(e.unref(i)),1)):e.createCommentVNode("",!0)],512)):(e.openBlock(),e.createElementBlock("div",gn,[e.createElementVNode("div",{class:"h-2 w-2 rounded-full mr-2",style:e.normalizeStyle({backgroundColor:e.unref(g)(d).bgColor})},null,4),e.createElementVNode("span",vn,e.toDisplayString(e.unref(g)(d).name),1)]))]),option:e.withCtx(({item:d})=>[e.createElementVNode("div",yn,[e.createElementVNode("div",{class:"h-2 w-2 rounded-full mr-2",style:e.normalizeStyle({backgroundColor:d.bgColor})},null,4),e.createElementVNode("span",kn,e.toDisplayString(d.name),1)])]),_:1},8,["modelValue","multiple","items","search","search-placeholder","label","show-label","name"]))}});var F=(t=>(t.CtrlOrCmd="cmd-or-ctrl",t.AltOrOpt="alt-or-opt",t.Shift="shift",t))(F||{});const W=R.getClientOperatingSystem(),xn={["cmd-or-ctrl"]:W===R.OperatingSystem.Mac?"Cmd":"Ctrl",["alt-or-opt"]:W===R.OperatingSystem.Mac?"Opt":"Alt",shift:"Shift"};function Cn(t){const l=n=>Object.values(F).includes(n);return t.map(n=>l(n)?xn[n]:n).join("+")}function Bn(t,...l){T.onKeyDown(l[0],n=>{const o=n.getModifierState("Alt"),s=W===R.OperatingSystem.Mac?n.getModifierState("Meta"):n.getModifierState("Control"),r=n.getModifierState("Shift");for(const i of t)switch(i){case F.CtrlOrCmd:if(!s)return;break;case F.AltOrOpt:if(!o)return;break;case F.Shift:if(!r)return;break}l[1](n)},l[2])}function wn(t){const l=(t==null?void 0:t.model)||e.ref(),n=e.computed({get:()=>!!l.value,set:o=>l.value=o?!0:void 0});return{model:l,isChecked:n}}const Vn=e.createElementVNode("div",{class:"fixed inset-0 bg-neutral-100/70 dark:bg-neutral-900/70 transition-opacity"},null,-1),En={class:"fixed inset-0 z-10 overflow-y-auto"},Sn={class:"flex min-h-full justify-center p-4 text-center items-center sm:p-0"},Nn={key:0,class:"flex items-center justify-center shadow p-4 relative z-10 bg-foundation rounded-t-lg"},$n={class:"text-2xl font-bold"},In={class:"p-4 sm:p-6"},zn={key:2,class:"flex p-4 sm:px-6 sm:py-5 border-t gap-2 border-outline-3"},_n=e.defineComponent({__name:"Dialog",props:{open:{type:Boolean},maxWidth:null,hideCloser:{type:Boolean},preventCloseOnClickOutside:{type:Boolean},title:null,buttons:null,onSubmit:{type:Function}},emits:["update:open","fully-closed"],setup(t,{emit:l}){const n=t,o=e.useSlots(),s=e.computed(()=>!!n.onSubmit),r=e.computed(()=>n.buttons||o.buttons),i=e.computed({get:()=>n.open,set:p=>l("update:open",p)}),c=e.computed(()=>{switch(n.maxWidth){case"sm":return 0;case"md":return 1;case"lg":return 2;case"xl":return 3;default:return 1e4}}),g=e.computed(()=>{const p=["w-full","sm:my-8 sm:w-full sm:max-w-xl"];return!n.title&&!r.value&&p.push("px-4 pt-4 pb-4","sm:p-6"),c.value>=1&&p.push("md:max-w-2xl"),c.value>=2&&p.push("lg:max-w-4xl"),c.value>=3&&p.push("xl:max-w-6xl"),c.value>=4&&p.push("2xl:max-w-7xl"),p.join(" ")}),u=()=>{n.preventCloseOnClickOutside||(i.value=!1)};return(p,h)=>(e.openBlock(),e.createBlock(e.unref(E.TransitionRoot),{as:"template",show:i.value},{default:e.withCtx(()=>[e.createVNode(e.unref(E.Dialog),{as:"div",class:"relative z-40",onClose:u},{default:e.withCtx(()=>[e.createVNode(e.unref(E.TransitionChild),{as:"template",enter:"ease-out duration-300","enter-from":"opacity-0","enter-to":"opacity-100",leave:"ease-in duration-200","leave-from":"opacity-100","leave-to":"opacity-0"},{default:e.withCtx(()=>[Vn]),_:1}),e.createElementVNode("div",En,[e.createElementVNode("div",Sn,[e.createVNode(e.unref(E.TransitionChild),{as:"template",enter:"ease-out duration-300","enter-from":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95","enter-to":"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200","leave-from":"opacity-100 translate-y-0 sm:scale-100","leave-to":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",onAfterLeave:h[1]||(h[1]=d=>p.$emit("fully-closed"))},{default:e.withCtx(()=>[e.createVNode(e.unref(E.DialogPanel),{class:e.normalizeClass(["transform rounded-lg bg-foundation text-left shadow-xl transition-all",g.value]),as:s.value?"form":"div",onSubmit:e.withModifiers(t.onSubmit,["prevent"])},{default:e.withCtx(()=>[t.title?(e.openBlock(),e.createElementBlock("div",Nn,[e.createElementVNode("h4",$n,e.toDisplayString(t.title),1)])):e.createCommentVNode("",!0),t.hideCloser?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:1,class:"absolute z-20 top-5 right-4 text-foreground",onClick:h[0]||(h[0]=d=>i.value=!1)},[e.createVNode(e.unref(O.XMarkIcon),{class:"h-6 w-6"})])),e.createElementVNode("div",In,[e.renderSlot(p.$slots,"default",{},()=>[e.createTextVNode("Put your content here!")])]),r.value?(e.openBlock(),e.createElementBlock("div",zn,[t.buttons?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.buttons,(d,v)=>(e.openBlock(),e.createBlock(e.unref(U),e.mergeProps({key:v},d.props,{onClick:d.onClick}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d.text),1)]),_:2},1040,["onClick"]))),128)):e.renderSlot(p.$slots,"buttons",{key:1})])):e.createCommentVNode("",!0)]),_:3},8,["class","as","onSubmit"])]),_:3})])])]),_:3})]),_:3},8,["show"]))}}),Dn={class:"inline-flex items-center space-x-2"},Ln={class:"label-light"},Pn=e.defineComponent({__name:"Disclosure",props:{title:null,icon:null,color:{default:"default"}},setup(t){const l=t,n=e.computed(()=>{const s=["pr-3 h-10 w-full flex items-center justify-between border-l-2 px-2 rounded transition","ring-1 font-medium"];switch(l.color){case"warning":s.push("border-warning text-warning ring-warning-lighter hover:ring-warning");break;case"success":s.push("border-success text-success ring-success-lighter hover:ring-success");break;case"danger":s.push("border-danger text-danger ring-danger-lighter hover:ring-danger");break;case"default":default:s.push("border-primary text-primary ring-primary-muted hover:ring-primary");break}return s.join(" ")}),o=e.computed(()=>{const s=["mt-4 px-3 py-1 border-x "];switch(l.color){case"warning":s.push("border-warning-lighter");break;case"success":s.push("border-success-lighter");break;case"danger":s.push("border-danger-lighter");break;case"default":default:s.push("border-primary-muted");break}return s.join(" ")});return(s,r)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(E.Disclosure),null,{default:e.withCtx(({open:i})=>[e.createVNode(e.unref(E.DisclosureButton),{class:e.normalizeClass(n.value)},{default:e.withCtx(()=>[e.createElementVNode("div",Dn,[t.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.icon),{key:0,class:"h-4 w-4"})):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(t.title),1)]),e.createVNode(e.unref(_.ChevronUpIcon),{class:e.normalizeClass([i?"":"rotate-180 transform","h-5 w-5"])},null,8,["class"])]),_:2},1032,["class"]),e.createVNode(e.unref(E.DisclosurePanel),{class:e.normalizeClass(o.value)},{default:e.withCtx(()=>[e.createElementVNode("div",Ln,[e.renderSlot(s.$slots,"default",{},()=>[e.createTextVNode("Panel contents")])])]),_:3},8,["class"])]),_:3})]))}});var j=(t=>(t.Grid="grid",t.List="list",t))(j||{});const jn=e.defineComponent({__name:"GridListToggle",props:{modelValue:null},emits:["click","update:modelValue"],setup(t,{emit:l}){const n=t,o=e.computed({get:()=>n.modelValue||j.Grid,set:i=>l("update:modelValue",i)}),s=e.computed(()=>o.value===j.Grid?_.Bars3Icon:_.Squares2X2Icon),r=i=>{l("click",i);const c=o.value===j.Grid?j.List:j.Grid;o.value=c};return(i,c)=>(e.openBlock(),e.createElementBlock("button",{class:"flex items-center justify-center rounded bg-foundation h-8 w-8 shadow cursor-pointer text-foreground",onClick:r},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value),{class:"h-6 w-6"}))]))}});var he=(t=>(t[t.Throttle=0]="Throttle",t[t.Debounce=1]="Debounce",t))(he||{}),H=(t=>(t[t.Left=0]="Left",t[t.Right=1]="Right",t))(H||{});function ge(t,l){if(!T.isClient)return;const{wait:n=100,throttleOrDebounce:o=0}=l||{},s=n?o===0?C.throttle(t,n):C.debounce(t,n):t;e.onMounted(()=>window.addEventListener("resize",s)),e.onBeforeUnmount(()=>window.removeEventListener("resize",s))}function On(t){e.onMounted(()=>{window.addEventListener("beforeunload",t)}),e.onBeforeUnmount(()=>{window.removeEventListener("beforeunload",t)})}function ve(t){const{el:l,defaultDirection:n}=t,o=e.ref(C.isUndefined(n)?1:n),s=e.computed(()=>{const i=e.unref(t.stopUpdatesBelowWidth);if(!C.isUndefined(i))return i;const c=e.unref(l);return c!=null&&c.offsetWidth?c.offsetWidth*2:void 0}),r=()=>{if(!T.isClient)return;const i=e.unref(l);if(!i)return;const c=i.getBoundingClientRect(),g=c.x+c.width>window.innerWidth,u=c.x<0;g&&u||!C.isUndefined(s.value)&&window.innerWidth<s.value||(g?o.value=0:u&&(o.value=1))};return ge(()=>r()),e.watch(()=>e.unref(l),i=>{i&&r()}),{direction:e.computed(()=>o.value),recalculateDirection:r}}const Tn=["disabled","onClick"],An=e.defineComponent({__name:"Menu",props:{open:{type:Boolean},items:null},emits:["update:open","chosen"],setup(t,{emit:l}){const n=t,o=e.ref(null),{direction:s}=ve({el:e.computed(()=>{var d;return((d=o.value)==null?void 0:d.el)||null}),defaultDirection:H.Left,stopUpdatesBelowWidth:300}),r=e.ref(null),i=e.ref(!1),c=e.computed({get:()=>n.open||!1,set:d=>l("update:open",d)}),g=d=>{const{active:v,disabled:a}=d,x=["group flex w-full items-center rounded-md px-2 py-2 text-sm"];return v?x.push("bg-primary text-foreground-on-primary"):a?x.push("text-foreground-disabled"):x.push("text-foreground"),x.join(" ")},u=(d,v)=>{l("chosen",{item:d,event:v})},p=()=>{var d;return(d=r.value)==null?void 0:d.el.click()},h=d=>{const v=!!d;return i.value=v,v};return e.watch(i,(d,v)=>{d!==v&&(c.value=d)}),e.watch(c,d=>{(d&&!i.value||!d&&i.value)&&p()}),(d,v)=>(e.openBlock(),e.createBlock(e.unref(E.Menu),{as:"div",class:"relative inline-block"},{default:e.withCtx(({open:a})=>[e.createElementVNode("div",null,[e.createVNode(e.unref(E.MenuButton),{ref_key:"menuButton",ref:r,class:"hidden",onClick:v[0]||(v[0]=e.withModifiers(()=>{},["stop","prevent"]))},null,512),e.createElementVNode("div",{class:e.normalizeClass(a?"pointer-events-none":"")},[e.renderSlot(d.$slots,"default",{toggle:p,open:h(a)})],2)]),e.createVNode(e.Transition,{"enter-active-class":"transition duration-100 ease-out","enter-from-class":"transform scale-95 opacity-0","enter-to-class":"transform scale-100 opacity-100","leave-active-class":"transition duration-75 ease-in","leave-from-class":"transform scale-100 opacity-100","leave-to-class":"transform scale-95 opacity-0"},{default:e.withCtx(()=>[e.createVNode(e.unref(E.MenuItems),{ref_key:"menuItems",ref:o,class:e.normalizeClass(["absolute mt-2 w-56 origin-top-right divide-y divide-outline-3 rounded-md bg-foundation shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none z-40",e.unref(s)===e.unref(H).Left?"right-0":""])},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(x,m)=>(e.openBlock(),e.createElementBlock("div",{key:m,class:"px-1 py-1"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x,y=>(e.openBlock(),e.createBlock(e.unref(E.MenuItem),{key:y.id,disabled:y.disabled},{default:e.withCtx(({active:b,disabled:S})=>[e.withDirectives((e.openBlock(),e.createElementBlock("span",null,[e.createElementVNode("button",{class:e.normalizeClass(g({active:b,disabled:S})),disabled:S,onClick:f=>u(y,f)},[e.renderSlot(d.$slots,"item",{item:y},()=>[e.createTextVNode(e.toDisplayString(y.title),1)])],10,Tn)])),[[e.unref(se.directive),y.disabled&&y.disabledTooltip]])]),_:2},1032,["disabled"]))),128))]))),128))]),_:3},8,["class"])]),_:3})]),_:3}))}}),Mn={class:"flex flex-col space-y-4"},Fn={class:"flex space-x-6"},Rn=e.defineComponent({__name:"Tabs",props:{items:null},setup(t){const l=t,n=e.ref(null),o=e.computed(()=>n.value&&l.items.find(r=>r.id===n.value)||l.items[0]),s=r=>{n.value=r.id};return(r,i)=>(e.openBlock(),e.createElementBlock("div",Mn,[e.createElementVNode("div",Fn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,c=>(e.openBlock(),e.createBlock(U,{key:c.id,link:"",color:o.value.id===c.id?"default":"secondary",onClick:g=>s(c)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.title),1)]),_:2},1032,["color","onClick"]))),128))]),e.renderSlot(r.$slots,"default",{activeItem:o.value})]))}}),Un={class:"w-full flex flex-col items-center my-2 space-y-2 mt-4"},qn={class:"inline-flex items-center space-x-1"},Wn=e.createElementVNode("span",{class:"text-foreground-2"},"That's it, you've loaded everything!",-1),Hn={class:"w-full flex flex-col items-center my-2 space-y-2 mt-4"},Gn={class:"inline-flex items-center space-x-1"},Kn=e.createElementVNode("span",{class:"text-foreground-2"},"An error occurred while loading",-1),Xn=e.defineComponent({__name:"InfiniteLoading",props:{settings:null,allowRetry:{type:Boolean}},emits:["infinite"],setup(t){const l=e.ref(null),n=e.ref(!1);return T.isClient&&e.onMounted(()=>{const o=setInterval(()=>{var s;(s=l.value)!=null&&s.isConnected&&(n.value=!0,clearInterval(o))},200)}),(o,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:l},[n.value?(e.openBlock(),e.createBlock(e.unref(Ce),e.mergeProps({key:0},o.$props.settings||{},{onInfinite:s[0]||(s[0]=r=>o.$emit("infinite",r))}),{spinner:e.withCtx(()=>[e.createVNode(Y,{loading:!0,class:"my-2"})]),complete:e.withCtx(()=>[e.createElementVNode("div",Un,[e.createElementVNode("div",qn,[e.createVNode(e.unref(O.CheckIcon),{class:"w-5 h-5 text-success"}),Wn])])]),error:e.withCtx(({retry:r})=>[e.createElementVNode("div",Hn,[e.createElementVNode("div",Gn,[e.createVNode(e.unref(O.ExclamationTriangleIcon),{class:"w-5 h-5 text-danger"}),Kn]),t.allowRetry?(e.openBlock(),e.createBlock(U,{key:0,onClick:r},{default:e.withCtx(()=>[e.createTextVNode("Retry")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)])]),_:1},16)):e.createCommentVNode("",!0)],512))}}),Jn={class:"relative group"},Qn={key:0,class:"absolute -inset-1 bg-blue-300 dark:bg-blue-500 opacity-5 dark:opacity-0 rounded-md blur-sm group-hover:opacity-60 dark:group-hover:opacity-30 transition duration-500"},Yn=e.defineComponent({__name:"Panel",props:{form:{type:Boolean,default:!1},ring:{type:Boolean,default:!1},fancyGlow:{type:Boolean,default:!1},customPadding:{type:Boolean,default:!1},noShadow:{type:Boolean,default:!1},panelClasses:{type:String}},emits:["submit"],setup(t,{emit:l}){const n=t,o=e.computed(()=>n.customPadding?"":"px-4 py-4 sm:px-6"),s=e.computed(()=>n.customPadding?"":"px-4 py-4 sm:p-6"),r=e.computed(()=>{const i=["rounded-lg"];return n.noShadow||i.push("shadow"),n.ring&&i.push("ring-outline-2 hover:ring-2"),n.panelClasses&&i.push(n.panelClasses),i.join(" ")});return(i,c)=>(e.openBlock(),e.createElementBlock("div",Jn,[t.fancyGlow?(e.openBlock(),e.createElementBlock("div",Qn)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.form?"form":"div"),{class:e.normalizeClass(["relative divide-outline-3 bg-foundation text-foreground flex flex-col divide-y overflow-hidden",r.value]),onSubmit:c[0]||(c[0]=g=>l("submit",g))},{default:e.withCtx(()=>[i.$slots.header?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(o.value)},[e.renderSlot(i.$slots,"header")],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["grow",s.value])},[e.renderSlot(i.$slots,"default")],2),i.$slots.footer?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(o.value)},[e.renderSlot(i.$slots,"footer")],2)):e.createCommentVNode("",!0)]),_:3},40,["class"]))]))}}),Zn={class:"flex-shrink-0"},eo=e.createElementVNode("span",{class:"sr-only"},"Dismiss",-1),to=e.defineComponent({__name:"Alert",props:{color:{default:"success"},withDismiss:{type:Boolean},actions:null,customIcon:null,size:{default:"default"}},emits:["dismiss"],setup(t){const l=t,n=e.useSlots(),o=e.computed(()=>!!n.description),s=e.computed(()=>{if(l.customIcon)return l.customIcon;switch(l.color){case"info":return $.InformationCircleIcon;case"warning":return $.ExclamationCircleIcon;case"danger":return $.XCircleIcon;case"success":default:return $.CheckCircleIcon}}),r=e.computed(()=>{const a=[];switch(l.size){case"xs":a.push("p-1");break;case"default":default:a.push(o.value?"p-4":"p-2");break}switch(l.color){case"success":a.push("bg-success-lighter border-l-4 border-success");break;case"info":a.push("bg-info-lighter border-l-4 border-info");break;case"danger":a.push("bg-danger-lighter border-l-4 border-danger");break;case"warning":a.push("bg-warning-lighter border-l-4 border-warning");break}return a.join(" ")}),i=e.computed(()=>{const a=[];if(o.value)a.push("");else switch(a.push("items-center"),l.size){case"xs":a.push("space-x-1");break;case"default":default:a.push("space-x-2");break}return a.join(" ")}),c=e.computed(()=>{const a=["grow"];switch(o.value||a.push("flex items-center space-x-2"),l.size){case"xs":a.push("ml-1");break;case"default":default:a.push("ml-3");break}return a.join(" ")}),g=e.computed(()=>{const a=[];switch(l.size){case"xs":a.push("text-xs");break;case"default":default:a.push("mt-2 text-sm");break}return a.join(" ")}),u=e.computed(()=>{var m;const a=["flex"];o.value||a.push("grow justify-end");const x=o.value&&((m=l.actions)==null?void 0:m.length);switch(l.size){case"xs":a.push("space-x-1"),x&&a.push("mt-1");break;case"default":default:a.push("space-x-2"),x&&a.push("mt-4");break}return a.join(" ")}),p=e.computed(()=>{const a=[];switch(l.color){case"success":a.push("text-success-darker");break;case"info":a.push("text-info-darker");break;case"danger":a.push("text-danger-darker");break;case"warning":a.push("text-warning-darker");break}return a.join(" ")}),h=e.computed(()=>{const a=[];switch(l.size){case"xs":a.push("h-4 w-4"),a.push(o.value?"mt-0.5":"");break;case"default":default:a.push("h-5 w-5");break}switch(l.color){case"success":a.push("text-success");break;case"info":a.push("text-info");break;case"danger":a.push("text-danger");break;case"warning":a.push("text-warning");break}return a.join(" ")}),d=e.computed(()=>{const a=[];switch(l.color){case"success":a.push("bg-success-lighter ring-success");break;case"info":a.push("bg-info-lighter ring-info");break;case"danger":a.push("bg-danger-lighter ring-danger");break;case"warning":a.push("bg-warning-lighter ring-warning");break}return a.join(" ")}),v=e.computed(()=>{switch(l.size){case"xs":return"xs";case"default":default:return"sm"}});return(a,x)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["rounded-md",[r.value,p.value]])},[e.createElementVNode("div",{class:e.normalizeClass(["flex",i.value])},[e.createElementVNode("div",Zn,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value),{class:e.normalizeClass(h.value),"aria-hidden":"true"},null,8,["class"]))]),e.createElementVNode("div",{class:e.normalizeClass(c.value)},[e.createElementVNode("h3",{class:e.normalizeClass(["text-sm",[o.value?"font-medium":""]])},[e.renderSlot(a.$slots,"title",{},()=>[e.createTextVNode("Title")])],2),o.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(g.value)},[e.renderSlot(a.$slots,"description",{},()=>[e.createTextVNode(" Lorem ipsum dolor sit amet consectetur adipisicing elit. Aliquid pariatur, ipsum similique veniam. ")])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(u.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.actions||[],(m,y)=>(e.openBlock(),e.createBlock(U,{key:y,color:t.color,size:v.value,to:m.url,external:m.externalUrl||!1,onClick:b=>m.onClick||e.unref(C.noop)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.title),1)]),_:2},1032,["color","size","to","external","onClick"]))),128))],2)],2),t.withDismiss?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["flex",[o.value?"items-start":"items-center"]])},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["inline-flex rounded-md focus:outline-none focus:ring-2",d.value]),onClick:x[0]||(x[0]=m=>a.$emit("dismiss"))},[eo,e.createVNode(e.unref($.XMarkIcon),{class:"h-5 w-5","aria-hidden":"true"})],2)],2)):e.createCommentVNode("",!0)],2)],2))}});function no(t){var a,x;const{get:l,initialState:n,readOptions:o,set:s,asyncRead:r=!0,debugging:i}=t,c=i==null?void 0:i.log,g=()=>(new Error("Trace:").stack||"").substring(7),u=((x=(a=t.debugging)==null?void 0:a.log)==null?void 0:x.logger)||console.debug,p=c&&!c.writesOnly?()=>{const m=l();return u(`debugging: '${c.name}' read`,m,g()),m}:l,h=c&&!c.readsOnly?m=>(u(`debugging: '${c.name}' written to`,m,g()),s(m)):s,d=r?T.computedAsync(p,n,o):e.computed(p),v=e.computed(()=>d.value);return v.update=h,v}exports.CommonAlert=to;exports.CommonBadge=ie;exports.CommonLoadingBar=Y;exports.CommonStepsBullet=gt;exports.CommonStepsNumber=nt;exports.CommonTextLink=re;exports.FormButton=U;exports.FormCardButton=yt;exports.FormCheckbox=Et;exports.FormSelectBase=me;exports.FormSelectSourceApps=bn;exports.FormTextArea=Dt;exports.FormTextInput=Ft;exports.GlobalToastRenderer=je;exports.GridListToggleValue=j;exports.HorizontalDirection=H;exports.InfiniteLoading=Xn;exports.LayoutDialog=_n;exports.LayoutDisclosure=Pn;exports.LayoutGridListToggle=jn;exports.LayoutMenu=An;exports.LayoutPanel=Yn;exports.LayoutTabs=Rn;exports.ModifierKeys=F;exports.SourceAppBadge=pe;exports.TailwindBreakpoints=M;exports.ThrottleOrDebounce=he;exports.ToastNotificationType=A;exports.ValidationHelpers=Xt;exports.clientOs=W;exports.getKeyboardShortcutTitle=Cn;exports.onKeyboardShortcut=Bn;exports.useFormCheckboxModel=wn;exports.useFormSelectChildInternals=fe;exports.useOnBeforeWindowUnload=On;exports.useResponsiveHorizontalDirectionCalculation=ve;exports.useWindowResizeHandler=ge;exports.useWrappingContainerHiddenCount=de;exports.writableAsyncComputed=no;
1
+ "use strict";var Pe=Object.defineProperty;var je=(t,n,o)=>n in t?Pe(t,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[n]=o;var A=(t,n,o)=>(je(t,typeof n!="symbol"?n+"":n,o),o);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),w=require("lodash"),D=require("@heroicons/vue/24/solid"),U=require("@heroicons/vue/24/outline"),I=require("@heroicons/vue/20/solid"),se=require("vee-validate"),fe=require("nanoid"),q=require("@speckle/shared"),_=require("@vueuse/core"),$=require("@headlessui/vue"),be=require("vue-tippy"),Fe=require("v3-infinite-loading");const Re={key:2,style:{margin:"0 !important",width:"0.01px"}},Ue=e.defineComponent({__name:"Button",props:{to:{type:String,required:!1,default:void 0},size:{type:String,default:"base"},fullWidth:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},text:{type:Boolean,default:!1},link:{type:Boolean,default:!1},color:{type:String,default:"default"},external:{type:Boolean,required:!1,default:void 0},disabled:{type:Boolean,required:!1,default:void 0},submit:{type:Boolean,default:!1},iconLeft:{type:[Object,Function],default:null},iconRight:{type:[Object,Function],default:null},hideText:{type:Boolean,default:!1},linkComponent:{type:[Object,Function],default:null},loading:{type:Boolean,default:!1}},emits:["click"],setup(t,{emit:n}){const o=t,l=e.resolveDynamicComponent("NuxtLink"),s=e.resolveDynamicComponent("RouterLink"),a=e.computed(()=>o.linkComponent?o.linkComponent:o.external?"a":w.isObjectLike(l)?l:w.isObjectLike(s)?s:"a"),c=e.computed(()=>{if(!o.to)return o.submit?"submit":"button"}),r=e.computed(()=>o.disabled||o.loading),u=e.computed(()=>o.loading?D.ArrowPathIcon:o.iconLeft),i=e.computed(()=>{const f=[];if(f.push("border-2"),r.value)f.push(o.outlined?"border-foreground-disabled":"bg-foundation-disabled border-transparent");else switch(o.color){case"invert":f.push(o.outlined?"border-foundation dark:border-foreground":"bg-foundation dark:bg-foreground border-transparent");break;case"card":f.push(o.outlined?"border-foundation-2 shadow":"bg-foundation-2 dark:bg-foundation-2 border-foundation shadow");break;case"danger":f.push(o.outlined?"border-danger":"bg-danger border-danger");break;case"secondary":f.push(o.outlined?"border-foundation":"bg-foundation border-foundation-2");break;case"warning":f.push(o.outlined?"border-warning":"bg-warning border-warning");break;case"info":f.push(o.outlined?"border-info":"bg-info border-info");break;case"success":f.push(o.outlined?"border-success":"bg-success border-success");break;case"default":default:f.push(o.outlined?"border-primary hover:border-primary-focus":"bg-primary hover:bg-primary-focus border-transparent");break}return f.join(" ")}),y=e.computed(()=>{const f=[];if(!o.text&&!o.link)if(r.value)f.push((o.outlined,"text-foreground-disabled"));else switch(o.color){case"invert":f.push(o.outlined?"text-foundation dark:text-foreground":"text-primary");break;case"card":f.push((o.outlined,"text-foreground"));break;case"danger":f.push(o.outlined?"text-danger":"text-foundation dark:text-foreground");break;case"warning":f.push(o.outlined?"text-warning":"text-foundation dark:text-foreground");break;case"info":f.push(o.outlined?"text-info":"text-foundation dark:text-foreground");break;case"success":f.push(o.outlined?"text-success":"text-foundation dark:text-foreground");break;case"secondary":f.push((o.outlined,"text-foreground hover:text-primary"));break;case"default":default:f.push(o.outlined?"text-primary hover:text-primary-focus":"text-foundation dark:text-foreground");break}else r.value?f.push("text-foreground-disabled"):o.color==="invert"?f.push("text-foundation hover:text-foundation-2 dark:text-foreground dark:hover:text-foreground"):o.color==="secondary"?f.push("text-foreground-2 hover:text-primary-focus"):o.color==="success"?f.push("text-success"):o.color==="warning"?f.push("text-warning"):o.color==="info"?f.push("text-info"):o.color==="danger"?f.push("text-danger"):f.push("text-primary hover:text-primary-focus");return f.join(" ")}),p=e.computed(()=>{const f=[];return f.push(o.rounded?"rounded-full":"rounded-md"),f.join(" ")}),d=e.computed(()=>{const f=[];if(!r.value)switch(o.color){case"invert":f.push("hover:ring-4 ring-white/50");break;case"danger":f.push("hover:ring-4 ring-danger-lighter dark:ring-danger-darker");break;case"warning":f.push("hover:ring-4 ring-warning-lighter dark:ring-warning-darker");break;case"info":f.push("hover:ring-4 ring-info-lighter dark:ring-info-darker");break;case"success":f.push("hover:ring-4 ring-success-lighter dark:ring-success-darker");break;case"default":default:f.push("hover:ring-2");break}return f.join(" ")}),g=e.computed(()=>{switch(o.size){case"xs":return"h-5 text-xs font-medium xxx-tracking-wide";case"sm":return"h-6 text-sm font-medium xxx-tracking-wide";case"lg":return"h-10 text-lg font-semibold xxx-tracking-wide";case"xl":return"h-14 text-xl font-bold xxx-tracking-wide";default:case"base":return"h-8 text-base font-medium xxx-tracking-wide"}}),m=e.computed(()=>{switch(o.size){case"xs":return"px-1";case"sm":return"px-2";case"lg":return"px-4";case"xl":return"px-5";default:case"base":return"px-3"}}),C=e.computed(()=>{const f=[];return o.fullWidth&&f.push("w-full"),r.value&&f.push("cursor-not-allowed"),f.join(" ")}),v=e.computed(()=>{const f=[];return!r.value&&!o.link&&!o.text&&f.push("active:scale-[0.97]"),!r.value&&o.link&&f.push("underline decoration-transparent decoration-2 underline-offset-4 hover:decoration-inherit"),f.join(" ")}),k=e.computed(()=>{const f=o.link||o.text;return["transition inline-flex justify-center items-center space-x-2 outline-none select-none",C.value,g.value,y.value,f?"":i.value,f?"":p.value,f?"":d.value,o.link?"":m.value,v.value].join(" ")}),B=e.computed(()=>{const f=[""];switch(o.loading&&f.push("animate-spin"),o.size){case"xs":f.push("h-3 w-3");break;case"sm":f.push("h-4 w-4");break;case"lg":f.push("h-6 w-6");break;case"xl":f.push("h-8 w-8");break;case"base":default:f.push("h-5 w-5");break}return f.join(" ")}),S=f=>{if(r.value){f.preventDefault(),f.stopPropagation(),f.stopImmediatePropagation();return}n("click",f)};return(f,V)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.to?a.value:"button"),{href:t.to,to:t.to,type:c.value,external:t.external,class:e.normalizeClass(k.value),disabled:r.value,role:"button",onClick:S},{default:e.withCtx(()=>[u.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.value),{key:0,class:e.normalizeClass(`${B.value} ${t.hideText?"":"mr-2"}`)},null,8,["class"])):e.createCommentVNode("",!0),t.hideText?(e.openBlock(),e.createElementBlock("div",Re,"   ")):e.renderSlot(f.$slots,"default",{key:1},()=>[e.createTextVNode("Button")],!0),t.iconRight||!t.loading?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.iconRight),{key:3,class:e.normalizeClass(`${B.value} ${t.hideText?"":"ml-2"}`)},null,8,["class"])):e.createCommentVNode("",!0)]),_:3},8,["href","to","type","external","class","disabled"]))}});const xe=(t,n)=>{const o=t.__vccOpts||t;for(const[l,s]of n)o[l]=s;return o},P=xe(Ue,[["__scopeId","data-v-38aa371e"]]),Ce=e.defineComponent({__name:"Link",props:{to:{type:String,required:!1,default:void 0},external:{type:Boolean,required:!1,default:void 0},disabled:{type:Boolean,required:!1,default:void 0},size:{type:String,default:"base"},foregroundLink:{type:Boolean,default:!1},iconLeft:{type:[Object,Function],default:null},iconRight:{type:[Object,Function],default:null},hideText:{type:Boolean,default:!1}},emits:["click"],setup(t,{emit:n}){const o=t,l=s=>{if(o.disabled){s.preventDefault(),s.stopPropagation(),s.stopImmediatePropagation();return}n("click",s)};return(s,a)=>(e.openBlock(),e.createBlock(P,{link:"",to:t.to,external:t.external,disabled:t.disabled,size:t.size,"foreground-link":t.foregroundLink,"icon-left":t.iconLeft,"icon-right":t.iconRight,"hide-text":t.hideText,role:"link",onClickCapture:l},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default",{},()=>[e.createTextVNode("Link")])]),_:3},8,["to","external","disabled","size","foreground-link","icon-left","icon-right","hide-text"]))}});var G=(t=>(t[t.Success=0]="Success",t[t.Warning=1]="Warning",t[t.Danger=2]="Danger",t[t.Info=3]="Info",t))(G||{});const qe={"aria-live":"assertive",class:"pointer-events-none fixed inset-0 flex items-end px-4 py-6 mt-10 sm:items-start sm:p-6 z-50"},We={class:"flex w-full flex-col items-center space-y-4 sm:items-end"},Ke={key:0,class:"pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg bg-foundation text-foreground shadow-lg ring-1 ring-primary-muted ring-opacity-5"},He={class:"p-4"},Ge={class:"flex items-start"},Xe={class:"flex-shrink-0"},Ze={class:"ml-2 w-0 flex-1 flex flex-col"},Qe={key:0,class:"text-foreground font-bold"},Je={key:1,class:"label label--light text-foreground-2"},Ye={key:2,class:"flex justify-start mt-2"},et=e.createElementVNode("span",{class:"sr-only"},"Close",-1),tt=e.defineComponent({__name:"ToastRenderer",props:{notification:null},emits:["update:notification"],setup(t,{emit:n}){const o=t,l=e.computed(()=>{var c,r;return!((c=o.notification)!=null&&c.description)&&!((r=o.notification)!=null&&r.cta)}),s=()=>{n("update:notification",null)},a=c=>{var r,u,i;(i=(u=(r=o.notification)==null?void 0:r.cta)==null?void 0:u.onClick)==null||i.call(u,c),s()};return(c,r)=>(e.openBlock(),e.createElementBlock("div",qe,[e.createElementVNode("div",We,[e.createVNode(e.Transition,{"enter-active-class":"transform ease-out duration-300 transition","enter-from-class":"translate-y-2 opacity-0 sm:translate-y-0 sm:translate-x-2","enter-to-class":"translate-y-0 opacity-100 sm:translate-x-0","leave-active-class":"transition ease-in duration-100","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:e.withCtx(()=>[t.notification?(e.openBlock(),e.createElementBlock("div",Ke,[e.createElementVNode("div",He,[e.createElementVNode("div",Ge,[e.createElementVNode("div",Xe,[t.notification.type===e.unref(G).Success?(e.openBlock(),e.createBlock(e.unref(U.CheckCircleIcon),{key:0,class:"h-6 w-6 text-success","aria-hidden":"true"})):t.notification.type===e.unref(G).Danger?(e.openBlock(),e.createBlock(e.unref(U.XCircleIcon),{key:1,class:"h-6 w-6 text-danger","aria-hidden":"true"})):t.notification.type===e.unref(G).Warning?(e.openBlock(),e.createBlock(e.unref(U.ExclamationCircleIcon),{key:2,class:"h-6 w-6 text-warning","aria-hidden":"true"})):t.notification.type===e.unref(G).Info?(e.openBlock(),e.createBlock(e.unref(U.InformationCircleIcon),{key:3,class:"h-6 w-6 text-info","aria-hidden":"true"})):e.createCommentVNode("",!0)]),e.createElementVNode("div",Ze,[t.notification.title?(e.openBlock(),e.createElementBlock("p",Qe,e.toDisplayString(t.notification.title),1)):e.createCommentVNode("",!0),t.notification.description?(e.openBlock(),e.createElementBlock("p",Je,e.toDisplayString(t.notification.description),1)):e.createCommentVNode("",!0),t.notification.cta?(e.openBlock(),e.createElementBlock("div",Ye,[e.createVNode(Ce,{to:t.notification.cta.url,class:"label",primary:"",onClick:a},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.notification.cta.title),1)]),_:1},8,["to"])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:e.normalizeClass(["ml-4 flex flex-shrink-0",{"self-center":l.value}])},[e.createElementVNode("button",{type:"button",class:"inline-flex rounded-md bg-foundation text-foreground-2 hover:text-foreground focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2",onClick:s},[et,e.createVNode(e.unref(I.XMarkIcon),{class:"h-6 w-6","aria-hidden":"true"})])],2)])])])):e.createCommentVNode("",!0)]),_:1})])]))}}),nt=e.createElementVNode("circle",{cx:"4",cy:"4",r:"3"},null,-1),ot=[nt],ae=e.defineComponent({__name:"Badge",props:{size:null,colorClasses:null,dot:{type:Boolean},dotIconColorClasses:null,iconLeft:null,rounded:{type:Boolean},clickableIcon:{type:Boolean}},emits:["click-icon"],setup(t,{emit:n}){const o=t,l=e.computed(()=>o.colorClasses||"bg-blue-100 text-blue-800"),s=e.computed(()=>o.dotIconColorClasses||"text-blue-400"),a=e.computed(()=>{const i=["inline-flex items-center",l.value,o.size==="lg"?"px-3 py-0.5 label":"px-2.5 py-0.5 caption font-medium"];return o.rounded?(i.push("rounded"),i.push(o.size==="lg"?"px-2 py-0.5 label":"px-2.5 py-0.5 caption font-medium")):(i.push("rounded-full"),i.push(o.size==="lg"?"px-2.5 py-0.5 label":"px-2.5 py-0.5 caption font-medium")),i.join(" ")}),c=e.computed(()=>{const i=["mt-0.5 ml-0.5 inline-flex h-4 w-4 flex-shrink-0 items-center justify-center rounded-full focus:outline-none"];return o.clickableIcon?i.push("cursor-pointer"):i.push("cursor-default"),i.join(" ")}),r=e.computed(()=>["-ml-0.5 mr-1.5 h-2 w-2",s.value].join(" ")),u=i=>{if(!o.clickableIcon){i.stopPropagation(),i.stopImmediatePropagation(),i.preventDefault();return}n("click-icon",i)};return(i,y)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(a.value)},[t.dot?(e.openBlock(),e.createElementBlock("svg",{key:0,class:e.normalizeClass(r.value),fill:"currentColor",viewBox:"0 0 8 8"},ot,2)):e.createCommentVNode("",!0),e.renderSlot(i.$slots,"default",{},()=>[e.createTextVNode("Badge")]),t.iconLeft?(e.openBlock(),e.createElementBlock("button",{key:1,class:e.normalizeClass(c.value),onClick:y[0]||(y[0]=p=>u(p))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.iconLeft),{class:e.normalizeClass(["h-4 w-4",s.value])},null,8,["class"]))],2)):e.createCommentVNode("",!0)],2))}});let ke=[];function lt(t){ke=ke?t:t.slice()}var X=(t=>(t[t.sm=640]="sm",t[t.md=746]="md",t[t.lg=1024]="lg",t[t.xl=1280]="xl",t[t["2xl"]=1536]="2xl",t))(X||{});function Be(t){const{props:{modelValue:n,steps:o,orientation:l,goVerticalBelow:s,nonInteractive:a,stepsPadding:c},emit:r}=t,u=e.computed(()=>(l==null?void 0:l.value)==="vertical"?"vertical":"horizontal"),i=e.computed({get:()=>w.clamp((n==null?void 0:n.value)||0,-1,o.value.length),set:v=>r("update:modelValue",w.clamp(v,0,o.value.length))}),y=v=>`${v+1}`,p=v=>v===i.value,d=v=>v<i.value,g=(v,k)=>{var S;if(a!=null&&a.value){k==null||k.preventDefault(),k==null||k.stopPropagation(),k==null||k.stopImmediatePropagation();return}i.value=v;const B=o.value[i.value];(S=B==null?void 0:B.onClick)==null||S.call(B)},m=e.computed(()=>{const v=["flex"];let k,B;return(c==null?void 0:c.value)==="xs"?(k="space-x-2",B="space-y-1"):(c==null?void 0:c.value)==="sm"?(k="space-x-4",B="space-y-1"):(k="space-x-8",B="space-y-4"),v.push("flex"),u.value==="vertical"||s!=null&&s.value?(v.push(`flex-col ${B} justify-center`),(s==null?void 0:s.value)===X.sm?v.push(`sm:flex-row sm:space-y-0 sm:justify-start sm:${k} sm:items-center`):(s==null?void 0:s.value)===X.md?v.push(`md:flex-row md:space-y-0 md:justify-start md:${k} md:items-center`):(s==null?void 0:s.value)===X.lg?v.push(`lg:flex-row lg:space-y-0 lg:justify-start lg:${k} lg:items-center`):(s==null?void 0:s.value)===X.xl&&v.push(`xl:flex-row xl:space-y-0 xl:justify-start xl:${k} xl:items-center`)):v.push(`flex-row ${k} items-center`),v.join(" ")}),C=e.computed(()=>{const v=["flex items-center"];return a!=null&&a.value||v.push("cursor-pointer"),v.join(" ")});return{value:i,isCurrentStep:p,isFinishedStep:d,switchStep:g,getStepDisplayValue:y,listClasses:m,linkClasses:C,orientation:u}}lt(["sm:space-x-8","md:space-x-8","lg:space-x-8","xl:space-x-8","sm:space-x-2","md:space-x-2","lg:space-x-2","xl:space-x-2","sm:space-x-4","md:space-x-4","lg:space-x-4","xl:space-x-4"]);const st=["aria-label"],at=["href","onClick"],rt={class:"flex space-x-3 items-center text-primary-focus normal font-medium leading-5"},it={class:"shrink-0 h-8 w-8 rounded-full bg-primary-focus text-foreground-on-primary inline-flex items-center justify-center"},ct={class:"flex flex-col"},ut={key:0,class:"label label--light text-foreground"},dt=["href","onClick"],mt={class:"flex space-x-3 items-center text-primary-focus normal font-medium leading-5"},ft={class:"shrink-0 h-8 w-8 rounded-full border-2 border-primary-focus inline-flex items-center justify-center"},pt={class:"flex flex-col"},ht={key:0,class:"label label--light text-foreground"},gt=["href","onClick"],vt={class:"flex space-x-3 items-center text-foreground-disabled normal font-medium leading-5"},yt={class:"shrink-0 h-8 w-8 rounded-full border-2 border-foreground-disabled inline-flex items-center justify-center"},kt={class:"flex flex-col"},bt={key:0,class:"label label--light"},xt=e.defineComponent({__name:"Number",props:{ariaLabel:null,orientation:null,steps:null,modelValue:null,goVerticalBelow:null,nonInteractive:{type:Boolean},stepsPadding:null},emits:["update:modelValue"],setup(t,{emit:n}){const o=t,{isCurrentStep:l,isFinishedStep:s,switchStep:a,getStepDisplayValue:c,listClasses:r,linkClasses:u}=Be({props:e.toRefs(o),emit:n});return(i,y)=>(e.openBlock(),e.createElementBlock("nav",{class:"flex justify-center","aria-label":t.ariaLabel||"Progress steps"},[e.createElementVNode("ol",{class:e.normalizeClass(e.unref(r))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.steps,(p,d)=>(e.openBlock(),e.createElementBlock("li",{key:p.name},[e.unref(s)(d)?(e.openBlock(),e.createElementBlock("a",{key:0,href:p.href,class:e.normalizeClass(e.unref(u)),onClick:g=>e.unref(a)(d,g)},[e.createElementVNode("div",rt,[e.createElementVNode("div",it,[e.createVNode(e.unref(I.CheckIcon),{class:"w-5 h-5"})]),e.createElementVNode("div",ct,[e.createElementVNode("div",null,e.toDisplayString(p.name),1),p.description?(e.openBlock(),e.createElementBlock("div",ut,e.toDisplayString(p.description),1)):e.createCommentVNode("",!0)])])],10,at)):e.unref(l)(d)?(e.openBlock(),e.createElementBlock("a",{key:1,href:p.href,class:e.normalizeClass(e.unref(u)),"aria-current":"step",onClick:g=>e.unref(a)(d,g)},[e.createElementVNode("div",mt,[e.createElementVNode("div",ft,e.toDisplayString(e.unref(c)(d)),1),e.createElementVNode("div",pt,[e.createElementVNode("div",null,e.toDisplayString(p.name),1),p.description?(e.openBlock(),e.createElementBlock("div",ht,e.toDisplayString(p.description),1)):e.createCommentVNode("",!0)])])],10,dt)):(e.openBlock(),e.createElementBlock("a",{key:2,href:p.href,class:e.normalizeClass(e.unref(u)),onClick:g=>e.unref(a)(d,g)},[e.createElementVNode("div",vt,[e.createElementVNode("div",yt,e.toDisplayString(e.unref(c)(d)),1),e.createElementVNode("div",kt,[e.createElementVNode("div",null,e.toDisplayString(p.name),1),p.description?(e.openBlock(),e.createElementBlock("div",bt,e.toDisplayString(p.description),1)):e.createCommentVNode("",!0)])])],10,gt))]))),128))],2)],8,st))}}),Ct=["aria-label"],Bt=["href","onClick"],wt={class:"relative flex h-5 w-5 flex-shrink-0 items-center justify-center"},Vt={key:0,class:"h-3 w-3 rounded-full bg-foreground-2"},Et=["href","onClick"],St={class:"relative flex h-5 w-5 flex-shrink-0 items-center justify-center","aria-hidden":"true"},Nt={key:0,class:"h-3 w-3 rounded-full bg-foreground"},$t=e.createElementVNode("span",{class:"absolute h-4 w-4 rounded-full bg-outline-2"},null,-1),zt=e.createElementVNode("span",{class:"relative block h-2 w-2 rounded-full bg-primary-focus"},null,-1),It=["href","onClick"],Lt={class:"relative flex h-5 w-5 flex-shrink-0 items-center justify-center","aria-hidden":"true"},Dt={key:0,class:"h-3 w-3 rounded-full bg-foreground-2"},Tt={key:1,class:"h-4 w-4 rounded-full bg-foreground-disabled"},Mt=e.defineComponent({__name:"Bullet",props:{ariaLabel:null,basic:{type:Boolean},orientation:null,steps:null,modelValue:null,goVerticalBelow:null,nonInteractive:{type:Boolean},stepsPadding:null},emits:["update:modelValue"],setup(t,{emit:n}){const o=t,{isCurrentStep:l,isFinishedStep:s,switchStep:a,listClasses:c,linkClasses:r}=Be({props:e.toRefs(o),emit:n}),u=e.computed(()=>{const y=["h6 font-medium leading-7"];let p;return o.stepsPadding==="xs"?p="ml-1":o.stepsPadding==="sm"?p="ml-2":p="ml-3",y.push(p),o.basic&&y.push("sr-only"),y.join(" ")}),i=e.computed(()=>{const y=[];return o.basic&&y.push("basic"),y.join(" ")});return(y,p)=>(e.openBlock(),e.createElementBlock("nav",{class:"flex justify-center","aria-label":t.ariaLabel||"Progress steps"},[e.createElementVNode("ol",{class:e.normalizeClass([e.unref(c),i.value])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.steps,(d,g)=>(e.openBlock(),e.createElementBlock("li",{key:d.name},[e.unref(s)(g)?(e.openBlock(),e.createElementBlock("a",{key:0,href:d.href,class:e.normalizeClass(e.unref(r)),onClick:m=>e.unref(a)(g,m)},[e.createElementVNode("span",wt,[t.basic?(e.openBlock(),e.createElementBlock("span",Vt)):(e.openBlock(),e.createBlock(e.unref(I.CheckCircleIcon),{key:1,class:"h-full w-full text-primary","aria-hidden":"true"}))]),e.createElementVNode("span",{class:e.normalizeClass(["text-foreground",u.value])},e.toDisplayString(d.name),3)],10,Bt)):e.unref(l)(g)?(e.openBlock(),e.createElementBlock("a",{key:1,href:d.href,class:e.normalizeClass(e.unref(r)),"aria-current":"step",onClick:m=>e.unref(a)(g,m)},[e.createElementVNode("span",St,[t.basic?(e.openBlock(),e.createElementBlock("span",Nt)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[$t,zt],64))]),e.createElementVNode("span",{class:e.normalizeClass(["text-primary-focus",u.value])},e.toDisplayString(d.name),3)],10,Et)):(e.openBlock(),e.createElementBlock("a",{key:2,href:d.href,class:e.normalizeClass(e.unref(r)),onClick:m=>e.unref(a)(g,m)},[e.createElementVNode("div",Lt,[t.basic?(e.openBlock(),e.createElementBlock("span",Dt)):(e.openBlock(),e.createElementBlock("div",Tt))]),e.createElementVNode("p",{class:e.normalizeClass(["text-foreground-disabled",u.value])},e.toDisplayString(d.name),3)],10,It))]))),128))],2)],8,Ct))}}),At=["disabled"],_t=e.defineComponent({__name:"CardButton",props:{disabled:{type:Boolean},modelValue:{type:Boolean}},emits:["update:modelValue","click"],setup(t,{emit:n}){const o=t,l=e.computed(()=>{const a=["h-20 bg-foundation-2 inline-flex justify-center items-center outline-none","normal px-16 py-5 shadow rounded transition active:scale-95"];return o.disabled?a.push("bg-foundation-disabled text-foreground-2 cursor-not-allowed"):(a.push(o.modelValue?"bg-primary-focus text-foreground-on-primary":"bg-foundation text-foreground"),a.push("ring-outline-2 hover:ring-4")),a.join(" ")}),s=a=>{if(o.disabled){a.preventDefault(),a.stopPropagation(),a.stopImmediatePropagation();return}n("update:modelValue",!o.modelValue),n("click",a)};return(a,c)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(l.value),disabled:t.disabled,onClick:s},[e.renderSlot(a.$slots,"default",{},()=>[e.createTextVNode("Text")])],10,At))}}),Ot={class:"relative flex items-start"},Pt={class:"flex h-6 items-center"},jt=["id","checked","aria-describedby","name","disabled","value"],Ft={class:"ml-2 text-sm",style:{"padding-top":"2px"}},Rt=["for"],Ut={key:0,class:"text-danger ml-1"},qt=["id"],Wt=e.defineComponent({inheritAttrs:!1,__name:"Checkbox",props:{name:{type:String,required:!0},disabled:{type:Boolean,default:!1},label:{type:String,default:void 0},description:{type:String,default:void 0},inlineDescription:{type:Boolean,default:!1},rules:{type:[String,Object,Function,Array],default:void 0},validateOnMount:{type:Boolean,default:!1},showRequired:{type:Boolean,default:!1},modelValue:{type:[String,Boolean],default:void 0},value:{type:[String,Boolean],default:!0},id:{type:String,default:void 0},hideLabel:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t){const n=t,o=v=>`${v}-${fe.nanoid()}`,l=e.computed(()=>n.value||n.name),{checked:s,errorMessage:a,handleChange:c,value:r}=se.useField(n.name,n.rules,{validateOnMount:n.validateOnMount,type:"checkbox",checkedValue:l,initialValue:n.modelValue||void 0}),u=e.computed(()=>n.label||n.name),i=e.computed(()=>a.value?"border-danger-lighter":"border-foreground-4 "),y=e.computed(()=>n.description||a.value),p=e.computed(()=>`${n.name}-description`),d=e.computed(()=>{const v=[];return n.inlineDescription?v.push("inline ml-2"):v.push("block"),a.value?v.push("text-danger"):v.push("text-foreground-2"),v.join(" ")}),g=e.ref(o("checkbox")),m=e.computed(()=>n.id||g.value),C=v=>{n.disabled||c(v)};return e.onMounted(()=>{const v=n.modelValue,k=r.value,B=Array.isArray(v)?v.includes(n.value):v===n.value,S=Array.isArray(k)?k.includes(n.value):k===n.value;B!==S&&c(v)}),(v,k)=>(e.openBlock(),e.createElementBlock("div",Ot,[e.createElementVNode("div",Pt,[e.createElementVNode("input",e.mergeProps({id:m.value,checked:e.unref(s),"aria-describedby":p.value,name:t.name,disabled:t.disabled,value:l.value,type:"checkbox",class:["h-4 w-4 rounded text-primary focus:ring-primary bg-foundation disabled:cursor-not-allowed disabled:bg-disabled disabled:text-disabled-2",i.value]},v.$attrs,{onChange:C}),null,16,jt)]),e.createElementVNode("div",Ft,[e.createElementVNode("label",{for:m.value,class:e.normalizeClass(["font-medium text-foreground",{"sr-only":t.hideLabel}])},[e.createElementVNode("span",null,e.toDisplayString(u.value),1),t.showRequired?(e.openBlock(),e.createElementBlock("span",Ut,"*")):e.createCommentVNode("",!0)],10,Rt),y.value?(e.openBlock(),e.createElementBlock("p",{key:0,id:p.value,class:e.normalizeClass(d.value)},e.toDisplayString(y.value),11,qt)):e.createCommentVNode("",!0)])]))}});function pe(t){const{props:n,inputEl:o,emit:l,options:s}=t,{value:a,errorMessage:c}=se.useField(n.name,n.rules,{validateOnMount:e.unref(n.validateOnMount),validateOnValueUpdate:e.unref(n.validateOnValueUpdate),initialValue:e.unref(n.modelValue)||void 0}),r=e.computed(()=>{const f=["block label text-foreground-2 mb-2"];return e.unref(n.showLabel)||f.push("sr-only"),f.join(" ")}),u=e.computed(()=>["focus:outline-none disabled:cursor-not-allowed disabled:bg-foundation-disabled","disabled:text-disabled-muted placeholder:text-foreground-2","rounded"].join(" ")),i=e.computed(()=>{const f=["block w-full text-foreground transition-all",u.value];return c.value?f.push("focus:border-danger focus:ring-danger border-2 border-danger text-danger-darker"):f.push("border-0 focus:ring-2 focus:ring-outline-2"),e.unref(n.color)==="foundation"?f.push("bg-foundation shadow-sm hover:shadow"):f.push("bg-foundation-page"),f.join(" ")}),y=e.ref(fe.nanoid()),p=e.computed(()=>e.unref(n.label)||e.unref(n.name)),d=e.computed(()=>{const f=c.value;return!f||!e.unref(n.useLabelInErrors)?f:f.replace("Value",p.value)}),g=e.computed(()=>d.value&&e.unref(n.hideErrorMessage)),m=e.computed(()=>d.value||e.unref(n.help)),C=e.computed(()=>!!m.value),v=e.computed(()=>C.value?`${e.unref(n.name)}-${y.value}`:void 0),k=e.computed(()=>{const f=["mt-2 text-sm"];return f.push(c.value?"text-danger":"text-foreground-2"),f.join(" ")}),B=()=>{var f;(f=o.value)==null||f.focus()},S=()=>{var f;a.value=w.isArray(a.value)?[]:"",(f=s==null?void 0:s.customClear)==null||f.call(s),l("change",{value:a.value}),l("clear")};return e.onMounted(()=>{e.unref(n.autoFocus)&&B()}),{coreInputClasses:u,coreClasses:i,title:p,value:a,helpTipId:v,helpTipClasses:k,helpTip:m,hideHelpTip:g,errorMessage:d,clear:S,focus:B,labelClasses:r}}const Kt=["for"],Ht={class:"relative"},Gt=["id","name","placeholder","disabled","aria-invalid","aria-describedby"],Xt=e.createElementVNode("span",{class:"text-xs sr-only"},"Clear input",-1),Zt=["id"],Qt=e.defineComponent({__name:"TextArea",props:{name:null,showLabel:{type:Boolean},help:null,placeholder:null,label:null,disabled:{type:Boolean},rules:null,validateOnMount:{type:Boolean},validateOnValueUpdate:{type:Boolean},useLabelInErrors:{type:Boolean,default:!0},autoFocus:{type:Boolean},modelValue:{default:""},showClear:{type:Boolean},fullWidth:{type:Boolean},showRequired:{type:Boolean},color:{default:"page"},textareaClasses:null},emits:["update:modelValue","change","input","clear"],setup(t,{expose:n,emit:o}){const l=t,s=e.ref(null),{coreClasses:a,title:c,value:r,helpTipId:u,helpTipClasses:i,helpTip:y,errorMessage:p,labelClasses:d,clear:g,focus:m}=pe({props:e.toRefs(l),emit:o,inputEl:s}),C=e.computed(()=>{const v=["pl-2"];return l.showClear&&p.value?v.push("pr-12"):(l.showClear||p.value)&&v.push("pr-8"),v.join(" ")});return n({focus:m}),(v,k)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([t.fullWidth?"w-full":""])},[e.createElementVNode("label",{for:t.name,class:e.normalizeClass(e.unref(d))},[e.createElementVNode("span",null,e.toDisplayString(e.unref(c)),1)],10,Kt),e.createElementVNode("div",Ht,[e.withDirectives(e.createElementVNode("textarea",e.mergeProps({id:t.name,ref_key:"inputElement",ref:s,"onUpdate:modelValue":k[0]||(k[0]=B=>e.isRef(r)?r.value=B:null),name:t.name,class:[e.unref(a),C.value,t.textareaClasses||"","min-h-[4rem] simple-scrollbar"],placeholder:t.placeholder,disabled:t.disabled,"aria-invalid":e.unref(p)?"true":"false","aria-describedby":e.unref(u)},v.$attrs,{onChange:k[1]||(k[1]=B=>v.$emit("change",{event:B,value:e.unref(r)})),onInput:k[2]||(k[2]=B=>v.$emit("input",{event:B,value:e.unref(r)}))}),null,16,Gt),[[e.vModelText,e.unref(r)]]),t.showClear?(e.openBlock(),e.createElementBlock("a",{key:0,title:"Clear input",class:"absolute top-2 right-0 flex items-center pr-2 cursor-pointer",onClick:k[3]||(k[3]=(...B)=>e.unref(g)&&e.unref(g)(...B)),onKeydown:k[4]||(k[4]=(...B)=>e.unref(g)&&e.unref(g)(...B))},[Xt,e.createVNode(e.unref(I.XMarkIcon),{class:"h-5 w-5 text-foreground","aria-hidden":"true"})],32)):e.createCommentVNode("",!0),e.unref(p)?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["pointer-events-none absolute inset-y-0 right-0 flex items-start mt-2",t.showClear?"pr-8":"pr-2"])},[e.createVNode(e.unref(I.ExclamationCircleIcon),{class:"h-4 w-4 text-danger","aria-hidden":"true"})],2)):e.createCommentVNode("",!0),t.showRequired&&!e.unref(p)?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["pointer-events-none absolute inset-y-0 mt-0.5 text-4xl right-0 flex items-start text-danger opacity-50",[t.showClear?"pr-8":"pr-2"]])}," * ",2)):e.createCommentVNode("",!0)]),e.unref(u)?(e.openBlock(),e.createElementBlock("p",{key:0,id:e.unref(u),class:e.normalizeClass(e.unref(i))},e.toDisplayString(e.unref(y)),11,Zt)):e.createCommentVNode("",!0)],2))}}),Jt=["for"],Yt={class:"relative"},en={key:0,class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2"},tn=["id","type","name","placeholder","disabled","aria-invalid","aria-describedby"],nn=e.createElementVNode("span",{class:"text-xs sr-only"},"Clear input",-1),on=["id"],ln=e.defineComponent({inheritAttrs:!1,__name:"TextInput",props:{type:{type:String,default:"text"},name:{type:String,required:!0},showLabel:{type:Boolean,required:!1},help:{type:String,default:void 0},placeholder:{type:String,default:void 0},label:{type:String,default:void 0},showRequired:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},rules:{type:[String,Object,Function,Array],default:void 0},validateOnMount:{type:Boolean,default:!1},validateOnValueUpdate:{type:Boolean,default:!1},useLabelInErrors:{type:Boolean,default:!0},customIcon:{type:[Object,Function],default:void 0},autoFocus:{type:Boolean,default:!1},modelValue:{type:String,default:""},size:{type:String,default:"base"},showClear:{type:Boolean,default:!1},fullWidth:{type:Boolean,default:!1},inputClasses:{type:String,default:null},hideErrorMessage:{type:Boolean,default:!1},wrapperClasses:{type:String,default:()=>""},color:{type:String,default:"page"}},emits:["update:modelValue","change","input","clear","focusin","focusout"],setup(t,{expose:n,emit:o}){const l=t,s=e.useSlots(),a=e.ref(null),{coreClasses:c,title:r,value:u,helpTipId:i,helpTipClasses:y,helpTip:p,hideHelpTip:d,errorMessage:g,clear:m,focus:C,labelClasses:v}=pe({props:e.toRefs(l),emit:o,inputEl:a}),k=e.computed(()=>{const V=["h-5 w-5"];return g.value?V.push("text-danger"):V.push("text-foreground-2"),V.join(" ")}),B=e.computed(()=>["email","password"].includes(l.type)||l.customIcon),S=e.computed(()=>{const V=[];return B.value?V.push("pl-8"):V.push("pl-2"),s["input-right"]||(g.value||l.showClear)&&(g.value&&l.showClear?V.push("pr-12"):V.push("pr-8")),V.join(" ")}),f=e.computed(()=>{switch(l.size){case"sm":return"h-6";case"lg":return"h-10";case"xl":return"h-14";case"base":default:return"h-8"}});return n({focus:C}),(V,N)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([t.fullWidth?"w-full":"",t.wrapperClasses])},[e.createElementVNode("label",{for:t.name,class:e.normalizeClass(e.unref(v))},[e.createElementVNode("span",null,e.toDisplayString(e.unref(r)),1)],10,Jt),e.createElementVNode("div",Yt,[B.value?(e.openBlock(),e.createElementBlock("div",en,[t.customIcon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.customIcon),{key:0,class:e.normalizeClass(k.value),"aria-hidden":"true"},null,8,["class"])):t.type==="email"?(e.openBlock(),e.createBlock(e.unref(I.EnvelopeIcon),{key:1,class:e.normalizeClass(k.value),"aria-hidden":"true"},null,8,["class"])):t.type==="password"?(e.openBlock(),e.createBlock(e.unref(I.KeyIcon),{key:2,class:e.normalizeClass(k.value),"aria-hidden":"true"},null,8,["class"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",e.mergeProps({id:t.name,ref_key:"inputElement",ref:a,"onUpdate:modelValue":N[0]||(N[0]=E=>e.isRef(u)?u.value=E:null),type:t.type,name:t.name,class:[e.unref(c),S.value,f.value,t.inputClasses||""],placeholder:t.placeholder,disabled:t.disabled,"aria-invalid":e.unref(g)?"true":"false","aria-describedby":e.unref(i),role:"textbox"},V.$attrs,{onChange:N[1]||(N[1]=E=>V.$emit("change",{event:E,value:e.unref(u)})),onInput:N[2]||(N[2]=E=>V.$emit("input",{event:E,value:e.unref(u)}))}),null,16,tn),[[e.vModelDynamic,e.unref(u)]]),e.renderSlot(V.$slots,"input-right",{},()=>[t.showClear?(e.openBlock(),e.createElementBlock("a",{key:0,title:"Clear input",class:"absolute inset-y-0 right-0 flex items-center pr-2 cursor-pointer",onClick:N[3]||(N[3]=(...E)=>e.unref(m)&&e.unref(m)(...E)),onKeydown:N[4]||(N[4]=(...E)=>e.unref(m)&&e.unref(m)(...E))},[nn,e.createVNode(e.unref(I.XMarkIcon),{class:"h-5 w-5 text-foreground","aria-hidden":"true"})],32)):e.createCommentVNode("",!0),e.unref(g)?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["pointer-events-none absolute inset-y-0 right-0 flex items-center",t.showClear?"pr-8":"pr-2"])},[e.createVNode(e.unref(I.ExclamationCircleIcon),{class:"h-4 w-4 text-danger","aria-hidden":"true"})],2)):e.createCommentVNode("",!0),t.showRequired&&!e.unref(g)?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["pointer-events-none absolute inset-y-0 mt-3 text-4xl right-0 flex items-center text-danger opacity-50",[t.showClear?"pr-8":"pr-2"]])}," * ",2)):e.createCommentVNode("",!0)])]),e.unref(i)&&!e.unref(d)?(e.openBlock(),e.createElementBlock("p",{key:0,id:e.unref(i),class:e.normalizeClass(e.unref(y))},e.toDisplayString(e.unref(p)),11,on)):e.createCommentVNode("",!0)],2))}}),we=/^https?:\/\//,he=/^[\w-_.+]+@[\w-_.+]+$/,sn=t=>(t||"").match(he)?!0:"Value should be a valid e-mail address",an=t=>(t||"").split(",").map(l=>l.trim()).every(l=>l.match(he))||"Value should be one or multiple comma-delimited e-mail addresses",rn=t=>(w.isString(t)&&(t=t.trim()),t?!0:"Value is required"),cn=(t,n)=>(o,l)=>o===l.form[t]?!0:`Value must be the same as in field '${n||t}'`,un=t=>n=>{const{minLength:o,maxLength:l}=t;return n=q.isNullOrUndefined(n)?"":n,w.isString(n)?!w.isUndefined(o)&&n.length<o?`Value needs to be at least ${o} characters long`:!w.isUndefined(l)&&n.length>l?`Value needs to be no more than ${l} characters long`:!0:"Value should be a text string"},dn=t=>n=>{const{match:o,message:l}=t;return w.isString(n)?o?w.isString(o)?n.includes(o)?!0:l:o.test(n)?!0:l:!0:"Value should be a text string"},mn=t=>we.test(t)?!0:"Value is not a valid URL",fn=t=>Array.isArray(t)&&t.length>0?!0:"Value should have at least a single item selected",pn=Object.freeze(Object.defineProperty({__proto__:null,VALID_EMAIL:he,VALID_HTTP_URL:we,isEmail:sn,isItemSelected:fn,isOneOrMultipleEmails:an,isRequired:rn,isSameAs:cn,isStringOfLength:un,isUrl:mn,stringContains:dn},Symbol.toStringTag,{value:"Module"}));function ge(t){const{skipCalculation:n,elementToWatchForChanges:o,itemContainer:l,trackResize:s=!1,trackMutations:a=!0}=t||{},c=e.ref(0),r=()=>{const u=l.value;if(n!=null&&n.value||!u)return;const i=u.children;let y=0,p=0,d;for(const g of i){const m=g.offsetTop;w.isUndefined(d)?(d=m,y+=1):m===d&&(y+=1),p+=1}c.value=p-y};return s&&_.useResizeObserver(o,r),a&&_.useMutationObserver(o,r,{childList:!0,subtree:!0}),{hiddenItemCount:c}}function ve(t){const{props:n,emit:o,dynamicVisibility:l}=t;let s;if(l){const{elementToWatchForChanges:i,itemContainer:y}=l;s=ge({skipCalculation:e.computed(()=>{var d;return!((d=n.multiple)!=null&&d.value)}),elementToWatchForChanges:i,itemContainer:y}).hiddenItemCount}else s=e.ref(0);const a=e.computed({get:()=>{var y,p;const i=(y=n.modelValue)==null?void 0:y.value;return(p=n.multiple)!=null&&p.value?w.isArray(i)?i:[]:w.isArray(i)?void 0:i},set:i=>{var y,p,d;if((y=n.multiple)!=null&&y.value&&!w.isArray(i)){console.warn("Attempting to set non-array value in selector w/ multiple=true");return}else if(!((p=n.multiple)!=null&&p.value)&&w.isArray(i)){console.warn("Attempting to set array value in selector w/ multiple=false");return}o("update:modelValue",(d=n.multiple)!=null&&d.value?i||[]:i)}}),c=i=>w.isArray(i);return{selectedValue:a,hiddenSelectedItemCount:s,isArrayValue:c,isMultiItemArrayValue:i=>w.isArray(i)&&i.length>1,firstItem:i=>c(i)?i[0]:i}}const hn=t=>(e.pushScopeId("data-v-60cf597b"),t=t(),e.popScopeId(),t),gn=hn(()=>e.createElementVNode("div",{class:"swoosher relative top-0 bg-blue-500/50"},null,-1)),vn=[gn],yn=e.defineComponent({__name:"Bar",props:{loading:{type:Boolean}},setup(t){return(n,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["relative w-full h-1 bg-blue-500/30 text-xs text-foreground-on-primary overflow-hidden rounded-xl",t.loading?"opacity-100":"opacity-0"])},vn,2))}});const re=xe(yn,[["__scopeId","data-v-60cf597b"]]),kn={class:"flex items-center justify-between w-full"},bn={class:"block truncate grow text-left"},xn={class:"pointer-events-none shrink-0 ml-1 flex items-center space-x-2"},Cn={key:1,class:"text-4xl text-danger opacity-50 h-4 w-4 leading-6"},Bn=["disabled"],wn={key:0,class:"flex flex-col mx-1 mb-1"},Vn=e.createElementVNode("span",{class:"sr-only label text-foreground"},"Search",-1),En={class:"relative"},Sn={class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2"},Nn=["placeholder"],$n={key:0,class:"px-1"},zn={key:1},In=e.createElementVNode("div",{class:"text-foreground-2 text-center"},"Nothing found 🤷‍♂️",-1),Ln={class:e.normalizeClass(["block truncate"])},Dn=["id"],ye=e.defineComponent({__name:"Base",props:{multiple:{type:Boolean,default:!1},items:{type:Array,default:()=>[]},modelValue:{type:[Object,Array,String],default:void 0},search:{type:Boolean,default:!1},filterPredicate:{type:Function,default:void 0},disabledItemPredicate:{type:Function,default:void 0},getSearchResults:{type:Function,default:void 0},searchPlaceholder:{type:String,default:"Search"},label:{type:String,required:!0},placeholder:{type:String},showLabel:{type:Boolean,default:!1},name:{type:String,required:!0},by:{type:String,required:!1},disabled:{type:Boolean,default:!1},buttonStyle:{type:String,default:"base"},hideCheckmarks:{type:Boolean,default:!1},allowUnset:{type:Boolean,default:!0},clearable:{type:Boolean,default:!1},rules:{type:[String,Object,Function,Array],default:void 0},validateOnMount:{type:Boolean,default:!1},validateOnValueUpdate:{type:Boolean,default:!1},useLabelInErrors:{type:Boolean,default:!0},help:{type:String,default:void 0},fixedHeight:{type:Boolean,default:!1},fullyControlValue:{type:Boolean,default:!1},showRequired:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{expose:n,emit:o}){const l=t,s=h=>w.isObjectLike(h),{value:a,errorMessage:c}=se.useField(l.name,l.rules,{validateOnMount:l.validateOnMount,validateOnValueUpdate:l.validateOnValueUpdate,initialValue:l.modelValue}),r=e.ref(null),u=e.ref(""),i=e.ref([]),y=e.ref(!1),p=e.ref(1),d=e.ref(fe.nanoid()),g=e.computed(()=>e.unref(l.label)||e.unref(l.name)),m=e.computed(()=>{const h=c.value;return!h||!e.unref(l.useLabelInErrors)?h:h.replace("Value",g.value)}),C=e.computed(()=>m.value||e.unref(l.help)),v=e.computed(()=>!!C.value),k=e.computed(()=>v.value?`${e.unref(l.name)}-${d.value}`:void 0),B=e.computed(()=>c.value?"text-danger":"text-foreground-2"),S=e.computed(()=>l.buttonStyle!=="simple"&&l.clearable&&!l.disabled),f=e.computed(()=>{const h=["relative flex group"];return c.value?(h.push("hover:shadow rounded-md"),h.push("text-danger-darker focus:border-danger focus:ring-danger"),l.buttonStyle!=="simple"&&h.push("outline outline-2 outline-danger")):l.buttonStyle!=="simple"&&(h.push("hover:shadow rounded-md"),h.push("outline outline-2 outline-primary-muted")),l.fixedHeight&&h.push("h-8"),h.join(" ")}),V=e.computed(()=>{const h=[];return l.buttonStyle!=="simple"&&h.push(j.value?"bg-foundation-disabled text-foreground-disabled":""),j.value&&h.push("cursor-not-allowed"),h.join(" ")}),N=e.computed(()=>{const h=["relative z-[1]","flex items-center justify-center text-center shrink-0","rounded-r-md overflow-hidden transition-all","text-foreground",Y.value?`w-6 ${V.value}`:"w-0"];return j.value||(h.push("hover:bg-primary hover:text-foreground-on-primary dark:text-foreground-on-primary"),l.buttonStyle==="tinted"?h.push("bg-outline-3"):h.push("bg-primary-muted")),h.join(" ")}),E=e.computed(()=>{const h=["relative z-[2]","normal rounded-md cursor-pointer transition truncate flex-1","flex items-center",V.value];return l.buttonStyle!=="simple"&&(h.push("py-2 px-3"),j.value||(l.buttonStyle==="tinted"?h.push("bg-foundation-page text-foreground"):h.push("bg-foundation text-foreground"))),S.value&&Y.value&&h.push("rounded-r-none"),h.join(" ")}),W=e.computed(()=>!!(l.search&&(l.filterPredicate||l.getSearchResults))),M=e.computed(()=>W.value&&l.getSearchResults),j=e.computed(()=>l.disabled||!l.items.length&&!M.value),T=e.computed({get:()=>{const h=a.value;return l.multiple?w.isArray(h)?h:[]:w.isArray(h)?void 0:h},set:h=>{if(l.multiple&&!w.isArray(h)){console.warn("Attempting to set non-array value in selector w/ multiple=true");return}else if(!l.multiple&&w.isArray(h)){console.warn("Attempting to set array value in selector w/ multiple=false");return}let x;if(l.multiple)x=h||[];else{const b=a.value;x=l.allowUnset&&b&&h&&F(b)===F(h)?void 0:h}l.fullyControlValue?o("update:modelValue",x):a.value=x,p.value+=1}}),Y=e.computed(()=>l.multiple&&w.isArray(T.value)?T.value.length!==0:!!T.value),ce=()=>{l.multiple?T.value=[]:T.value=void 0},ue=e.computed(()=>{const h=u.value;return!W.value||!(h!=null&&h.length)?i.value:l.filterPredicate?i.value.filter(x=>{var b;return((b=l.filterPredicate)==null?void 0:b.call(l,x,h))||!1}):i.value}),ee=h=>JSON.stringify(h),F=h=>s(h)?h[l.by||"id"]:h,Q=async()=>{if(!(!M.value||!l.getSearchResults)){y.value=!0;try{i.value=await l.getSearchResults(u.value)}finally{y.value=!1}}},de=w.debounce(Q,1e3),J=h=>{const{active:x,disabled:b}=h||{},{hideCheckmarks:z}=l,L=["relative transition cursor-pointer select-none py-1.5 pl-3",z?"":"pr-9"];return b?L.push("opacity-50 cursor-not-allowed"):L.push(x?"text-primary":"text-foreground"),L.join(" ")};return e.watch(()=>l.items,h=>{i.value=h.slice()},{immediate:!0}),e.watch(u,()=>{M.value&&de()}),e.onMounted(()=>{M.value&&!l.items.length&&Q()}),n({triggerSearch:Q}),(h,x)=>(e.openBlock(),e.createElementBlock("div",null,[(e.openBlock(),e.createBlock(e.unref($.Listbox),{key:p.value,modelValue:T.value,"onUpdate:modelValue":x[4]||(x[4]=b=>T.value=b),name:t.name,multiple:t.multiple,by:t.by,disabled:j.value,as:"div"},{default:e.withCtx(()=>[e.createVNode(e.unref($.ListboxLabel),{class:e.normalizeClass(["block label text-foreground-2 mb-2",{"sr-only":!t.showLabel}])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]),_:1},8,["class"]),e.createElementVNode("div",{class:e.normalizeClass(f.value)},[e.createVNode(e.unref($.ListboxButton),{class:e.normalizeClass(E.value)},{default:e.withCtx(({open:b})=>[e.createElementVNode("div",kn,[e.createElementVNode("div",bn,[!T.value||e.unref(w.isArray)(T.value)&&!T.value.length?e.renderSlot(h.$slots,"nothing-selected",{key:0},()=>[e.createTextVNode(e.toDisplayString(t.placeholder?t.placeholder:t.label),1)]):e.renderSlot(h.$slots,"something-selected",{key:1,value:T.value},()=>[e.createTextVNode(e.toDisplayString(ee(T.value)),1)])]),e.createElementVNode("div",xn,[m.value?(e.openBlock(),e.createBlock(e.unref(D.ExclamationCircleIcon),{key:0,class:"h-4 w-4 text-danger","aria-hidden":"true"})):t.showRequired?(e.openBlock(),e.createElementBlock("div",Cn," * ")):e.createCommentVNode("",!0),b?(e.openBlock(),e.createBlock(e.unref(D.ChevronUpIcon),{key:2,class:"h-4 w-4 text-foreground","aria-hidden":"true"})):(e.openBlock(),e.createBlock(e.unref(D.ChevronDownIcon),{key:3,class:"h-4 w-4 text-foreground","aria-hidden":"true"}))])])]),_:3},8,["class"]),S.value?e.withDirectives((e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(N.value),disabled:t.disabled,onClick:x[0]||(x[0]=b=>ce())},[e.createVNode(e.unref(D.XMarkIcon),{class:"w-3 h-3"})],10,Bn)),[[e.unref(be.directive),"Clear"]]):e.createCommentVNode("",!0),e.createVNode(e.Transition,{"leave-active-class":"transition ease-in duration-100","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:e.withCtx(()=>[e.createVNode(e.unref($.ListboxOptions),{class:"absolute top-[100%] z-10 mt-1 w-full rounded-md bg-foundation-2 py-1 label label--light outline outline-2 outline-primary-muted focus:outline-none shadow",onFocus:x[3]||(x[3]=b=>{var z;return(z=r.value)==null?void 0:z.focus()})},{default:e.withCtx(()=>[W.value?(e.openBlock(),e.createElementBlock("label",wn,[Vn,e.createElementVNode("div",En,[e.createElementVNode("div",Sn,[e.createVNode(e.unref(D.MagnifyingGlassIcon),{class:"h-5 w-5 text-foreground"})]),e.withDirectives(e.createElementVNode("input",{ref_key:"searchInput",ref:r,"onUpdate:modelValue":x[1]||(x[1]=b=>u.value=b),type:"text",class:"pl-9 w-full border-0 bg-foundation-page rounded placeholder:font-normal normal placeholder:text-foreground-2 focus:outline-none focus:ring-1 focus:border-outline-1 focus:ring-outline-1",placeholder:t.searchPlaceholder,onKeydown:x[2]||(x[2]=e.withModifiers(()=>{},["stop"]))},null,40,Nn),[[e.vModelText,u.value]])])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["overflow-auto simple-scrollbar",[W.value?"max-h-52":"max-h-60"]])},[M.value&&y.value?(e.openBlock(),e.createElementBlock("div",$n,[e.createVNode(re,{loading:!0})])):M.value&&!i.value.length?(e.openBlock(),e.createElementBlock("div",zn,[e.renderSlot(h.$slots,"nothing-found",{},()=>[In])])):e.createCommentVNode("",!0),!M.value||!y.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(ue.value,b=>{var z;return e.openBlock(),e.createBlock(e.unref($.ListboxOption),{key:F(b),value:b,disabled:((z=t.disabledItemPredicate)==null?void 0:z.call(t,b))||!1},{default:e.withCtx(({active:L,selected:K})=>{var H,te;return[e.createElementVNode("li",{class:e.normalizeClass(J({active:L,disabled:((H=t.disabledItemPredicate)==null?void 0:H.call(t,b))||!1}))},[e.createElementVNode("span",Ln,[e.renderSlot(h.$slots,"option",{item:b,active:L,selected:K,disabled:((te=t.disabledItemPredicate)==null?void 0:te.call(t,b))||!1},()=>[e.createTextVNode(e.toDisplayString(ee(b)),1)])]),!t.hideCheckmarks&&K?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass([L?"text-primary":"text-foreground","absolute inset-y-0 right-0 flex items-center pr-4"])},[e.createVNode(e.unref(D.CheckIcon),{class:"h-5 w-5","aria-hidden":"true"})],2)):e.createCommentVNode("",!0)],2)]}),_:2},1032,["value","disabled"])}),128)):e.createCommentVNode("",!0)],2)]),_:3})]),_:3})],2)]),_:3},8,["modelValue","name","multiple","by","disabled"])),k.value?(e.openBlock(),e.createElementBlock("p",{key:0,id:k.value,class:e.normalizeClass(["mt-2 text-sm",B.value])},e.toDisplayString(C.value),11,Dn)):e.createCommentVNode("",!0)]))}}),Ve=e.defineComponent({__name:"SourceAppBadge",props:{sourceApp:null},setup(t){return(n,o)=>(e.openBlock(),e.createBlock(ae,{"color-classes":"text-foreground-on-primary",rounded:"",style:e.normalizeStyle({backgroundColor:t.sourceApp.bgColor})},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.sourceApp.short),1)]),_:1},8,["style"]))}}),Tn={key:0,class:"text-foreground-2 normal"},Mn={key:1,class:"flex items-center"},An={class:"truncate"},_n={class:"flex items-center"},On={class:"truncate"},Pn=e.defineComponent({__name:"SourceApps",props:{multiple:{type:Boolean,default:!1},modelValue:{type:[Object,Array],default:void 0},search:{type:Boolean,default:!1},searchPlaceholder:{type:String,default:"Search apps"},selectorPlaceholder:{type:String,default:void 0},label:{type:String,required:!0},showLabel:{type:Boolean,default:!1},name:{type:String,default:void 0},items:{type:Array,default:void 0},clearable:{type:Boolean},help:{type:String}},emits:["update:modelValue"],setup(t,{emit:n}){const o=t,l=e.ref(null),s=e.ref(null),{selectedValue:a,hiddenSelectedItemCount:c,isMultiItemArrayValue:r,firstItem:u}=ve({props:e.toRefs(o),emit:n,dynamicVisibility:{elementToWatchForChanges:l,itemContainer:s}}),i=(y,p)=>y.name.toLocaleLowerCase().includes(p.toLocaleLowerCase());return(y,p)=>(e.openBlock(),e.createBlock(ye,{modelValue:e.unref(a),"onUpdate:modelValue":p[0]||(p[0]=d=>e.isRef(a)?a.value=d:null),multiple:t.multiple,items:t.items??e.unref(q.SourceApps),search:t.search,"search-placeholder":t.searchPlaceholder,label:t.label,"show-label":t.showLabel,name:t.name||"sourceApps","filter-predicate":i,clearable:t.clearable,help:t.help,by:"name"},{"nothing-selected":e.withCtx(()=>[t.selectorPlaceholder?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(t.selectorPlaceholder),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(t.multiple?"Select apps":"Select an app"),1)],64))]),"something-selected":e.withCtx(({value:d})=>[e.unref(r)(d)?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"elementToWatchForChanges",ref:l,class:"flex items-center space-x-0.5 h-5"},[e.createElementVNode("div",{ref_key:"itemContainer",ref:s,class:"flex flex-wrap overflow-hidden space-x-0.5 h-5"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d,g=>(e.openBlock(),e.createBlock(Ve,{key:g.name,"source-app":g},null,8,["source-app"]))),128))],512),e.unref(c)>0?(e.openBlock(),e.createElementBlock("div",Tn," +"+e.toDisplayString(e.unref(c)),1)):e.createCommentVNode("",!0)],512)):(e.openBlock(),e.createElementBlock("div",Mn,[e.createElementVNode("div",{class:"h-2 w-2 rounded-full mr-2",style:e.normalizeStyle({backgroundColor:e.unref(u)(d).bgColor})},null,4),e.createElementVNode("span",An,e.toDisplayString(e.unref(u)(d).name),1)]))]),option:e.withCtx(({item:d})=>[e.createElementVNode("div",_n,[e.createElementVNode("div",{class:"h-2 w-2 rounded-full mr-2",style:e.normalizeStyle({backgroundColor:d.bgColor})},null,4),e.createElementVNode("span",On,e.toDisplayString(d.name),1)])]),_:1},8,["modelValue","multiple","items","search","search-placeholder","label","show-label","name","clearable","help"]))}}),jn={class:"flex flex-wrap gap-1.5 text-xs"},Fn=e.defineComponent({__name:"Badges",props:{items:null,label:null,name:null,help:null,modelValue:null,multiple:{type:Boolean},rules:null,by:null},emits:["update:modelValue"],setup(t,{emit:n}){const o=t,{selectedValue:l,isArrayValue:s}=ve({props:e.toRefs(o),emit:n}),a=c=>{s(l.value)?l.value=l.value.filter(r=>r.id!==c.id):l.value=void 0};return(c,r)=>(e.openBlock(),e.createBlock(ye,{modelValue:e.unref(l),"onUpdate:modelValue":r[0]||(r[0]=u=>e.isRef(l)?l.value=u:null),multiple:t.multiple,items:t.items,label:t.label,name:t.name,help:t.help,rules:t.rules,by:t.by},{"something-selected":e.withCtx(({value:u})=>[e.createElementVNode("ul",jn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s)(u)?u:[u],i=>(e.openBlock(),e.createElementBlock("li",{key:i[t.by]},[e.createVNode(ae,{size:"lg","clickable-icon":!0,"icon-left":e.unref(D.XMarkIcon),onClickIcon:e.withModifiers(y=>a(i),["stop"])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.text),1)]),_:2},1032,["icon-left","onClickIcon"])]))),128))])]),option:e.withCtx(({item:u})=>[e.createTextVNode(e.toDisplayString(u.text),1)]),_:1},8,["modelValue","multiple","items","label","name","help","rules","by"]))}}),Rn={class:"flex items-center"},Un={class:"absolute inset-0 flex items-center gap-2 px-1 text-white"},qn=e.defineComponent({__name:"Switch",props:{modelValue:{type:Boolean}},emits:["update:modelValue"],setup(t){const n=e.useModel(t,"modelValue");return(o,l)=>(e.openBlock(),e.createElementBlock("div",Rn,[e.createVNode(e.unref($.Switch),{modelValue:n.value,"onUpdate:modelValue":l[0]||(l[0]=s=>n.value=s),class:e.normalizeClass(["relative inline-flex flex-shrink-0 h-6 w-11 border-2 border-transparent rounded-full cursor-pointer transition-colors ease-in-out duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary",{"bg-primary":n.value,"bg-primary-muted":!n.value}])},{default:e.withCtx(()=>[e.createElementVNode("div",Un,[e.createVNode(e.unref(D.CheckIcon),{class:"h-5 w-5 drop-shadow-md"}),e.createVNode(e.unref(D.XMarkIcon),{class:"h-5 w-5 drop-shadow-md"})]),e.createElementVNode("span",{class:e.normalizeClass(["scale-95 pointer-events-none inline-block h-5 w-5 rounded-full bg-white shadow transform ring-0 transition ease-in-out duration-200",{"translate-x-5":n.value,"translate-x-0":!n.value}])},null,2)]),_:1},8,["modelValue","class"])]))}});var Z=(t=>(t.CtrlOrCmd="cmd-or-ctrl",t.AltOrOpt="alt-or-opt",t.Shift="shift",t))(Z||{});const ne=q.getClientOperatingSystem(),Wn={["cmd-or-ctrl"]:ne===q.OperatingSystem.Mac?"Cmd":"Ctrl",["alt-or-opt"]:ne===q.OperatingSystem.Mac?"Opt":"Alt",shift:"Shift"};function Kn(t){const n=o=>Object.values(Z).includes(o);return t.map(o=>n(o)?Wn[o]:o).join("+")}function Hn(t,...n){_.onKeyDown(n[0],o=>{const l=o.getModifierState("Alt"),s=ne===q.OperatingSystem.Mac?o.getModifierState("Meta"):o.getModifierState("Control"),a=o.getModifierState("Shift");for(const c of t)switch(c){case Z.CtrlOrCmd:if(!s)return;break;case Z.AltOrOpt:if(!l)return;break;case Z.Shift:if(!a)return;break}n[1](o)},n[2])}function Gn(t){const n=(t==null?void 0:t.model)||e.ref(),o=e.computed({get:()=>!!n.value,set:l=>n.value=l?!0:void 0});return{model:n,isChecked:o}}const Xn=e.createElementVNode("div",{class:"fixed inset-0 bg-neutral-100/70 dark:bg-neutral-900/70 transition-opacity backdrop-blur-xs"},null,-1),Zn={class:"fixed inset-0 z-10 h-screen w-screen"},Qn={class:"flex justify-center items-center h-full w-full p-4 sm:p-0"},Jn={key:0,class:"flex items-center justify-start rounded-t-lg shrink-0 h-16 px-8"},Yn={class:"text-2xl font-bold"},eo=e.defineComponent({__name:"Dialog",props:{open:{type:Boolean},maxWidth:null,hideCloser:{type:Boolean},preventCloseOnClickOutside:{type:Boolean},title:null,buttons:null,onSubmit:{type:Function}},emits:["update:open","fully-closed"],setup(t,{emit:n}){const o=t,l=e.useSlots(),s=e.ref(!1),a=e.ref(!1),c=e.computed(()=>!!o.onSubmit),r=e.computed(()=>o.buttons||l.buttons),u=e.computed({get:()=>o.open,set:g=>n("update:open",g)}),i=e.computed(()=>{switch(o.maxWidth){case"sm":return 0;case"md":return 1;case"lg":return 2;case"xl":return 3;default:return 1e4}}),y=e.computed(()=>{const g=["w-full","sm:my-8 sm:w-full sm:max-w-xl"];return i.value>=1&&g.push("max-w-2xl"),i.value>=2&&g.push("max-w-4xl"),i.value>=3&&g.push("max-w-6xl"),i.value>=4&&g.push("max-w-7xl"),g.join(" ")}),p=()=>{o.preventCloseOnClickOutside||(u.value=!1)},d=w.throttle(g=>{const m=g.target,{scrollTop:C,offsetHeight:v,scrollHeight:k}=m;s.value=C>0,a.value=C+v>=k},60);return(g,m)=>(e.openBlock(),e.createBlock(e.unref($.TransitionRoot),{as:"template",show:u.value},{default:e.withCtx(()=>[e.createVNode(e.unref($.Dialog),{as:"div",class:"relative z-40",onClose:p},{default:e.withCtx(()=>[e.createVNode(e.unref($.TransitionChild),{as:"template",enter:"ease-out duration-300","enter-from":"opacity-0","enter-to":"opacity-100",leave:"ease-in duration-200","leave-from":"opacity-100","leave-to":"opacity-0"},{default:e.withCtx(()=>[Xn]),_:1}),e.createElementVNode("div",Zn,[e.createElementVNode("div",Qn,[e.createVNode(e.unref($.TransitionChild),{as:"template",enter:"ease-out duration-300","enter-from":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95","enter-to":"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200","leave-from":"opacity-100 translate-y-0 sm:scale-100","leave-to":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",onAfterLeave:m[2]||(m[2]=C=>g.$emit("fully-closed"))},{default:e.withCtx(()=>[e.createVNode(e.unref($.DialogPanel),{class:e.normalizeClass(["transform rounded-lg text-foreground overflow-hidden bg-foundation text-left shadow-xl transition-all flex flex-col max-h-[90vh]",y.value]),as:c.value?"form":"div",onSubmit:e.withModifiers(t.onSubmit,["prevent"])},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(s.value&&"relative z-10 shadow-lg")},[t.title?(e.openBlock(),e.createElementBlock("div",Jn,[e.createElementVNode("h4",Yn,e.toDisplayString(t.title),1)])):e.createCommentVNode("",!0)],2),t.hideCloser?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(["absolute z-20 right-4 bg-foundation rounded-full p-1",t.title?"top-4":"top-3"]),onClick:m[0]||(m[0]=C=>u.value=!1)},[e.createVNode(e.unref(U.XMarkIcon),{class:"h-6 w-6"})],2)),e.createElementVNode("div",{class:e.normalizeClass(["flex-1 simple-scrollbar overflow-y-auto bg-white dark:bg-foundation",t.title?"py-6 px-8":"p-10"]),onScroll:m[1]||(m[1]=(...C)=>e.unref(d)&&e.unref(d)(...C))},[e.renderSlot(g.$slots,"default",{},()=>[e.createTextVNode("Put your content here!")])],34),r.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["flex p-4 sm:px-6 gap-2 shrink-0",!a.value&&"shadow-t"])},[t.buttons?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.buttons,(C,v)=>(e.openBlock(),e.createBlock(e.unref(P),e.mergeProps({key:v},C.props,{onClick:C.onClick}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(C.text),1)]),_:2},1040,["onClick"]))),128)):e.renderSlot(g.$slots,"buttons",{key:1})],2)):e.createCommentVNode("",!0)]),_:3},8,["class","as","onSubmit"])]),_:3})])])]),_:3})]),_:3},8,["show"]))}}),to={class:"inline-flex items-center space-x-2"},no={class:"label-light"},oo=e.defineComponent({__name:"Disclosure",props:{title:null,icon:null,color:{default:"default"}},setup(t){const n=t,o=e.computed(()=>{const s=["pr-3 h-10 w-full flex items-center justify-between border-l-2 px-2 rounded transition","ring-1 font-medium"];switch(n.color){case"warning":s.push("border-warning text-warning ring-warning-lighter hover:ring-warning");break;case"success":s.push("border-success text-success ring-success-lighter hover:ring-success");break;case"danger":s.push("border-danger text-danger ring-danger-lighter hover:ring-danger");break;case"default":default:s.push("border-primary text-primary ring-primary-muted hover:ring-primary");break}return s.join(" ")}),l=e.computed(()=>{const s=["mt-4 px-3 py-1 border-x "];switch(n.color){case"warning":s.push("border-warning-lighter");break;case"success":s.push("border-success-lighter");break;case"danger":s.push("border-danger-lighter");break;case"default":default:s.push("border-primary-muted");break}return s.join(" ")});return(s,a)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref($.Disclosure),null,{default:e.withCtx(({open:c})=>[e.createVNode(e.unref($.DisclosureButton),{class:e.normalizeClass(o.value)},{default:e.withCtx(()=>[e.createElementVNode("div",to,[t.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.icon),{key:0,class:"h-4 w-4"})):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(t.title),1)]),e.createVNode(e.unref(D.ChevronUpIcon),{class:e.normalizeClass([c?"":"rotate-180 transform","h-5 w-5"])},null,8,["class"])]),_:2},1032,["class"]),e.createVNode(e.unref($.DisclosurePanel),{class:e.normalizeClass(l.value)},{default:e.withCtx(()=>[e.createElementVNode("div",no,[e.renderSlot(s.$slots,"default",{},()=>[e.createTextVNode("Panel contents")])])]),_:3},8,["class"])]),_:3})]))}});var R=(t=>(t.Grid="grid",t.List="list",t))(R||{});const lo=e.defineComponent({__name:"GridListToggle",props:{modelValue:null},emits:["click","update:modelValue"],setup(t,{emit:n}){const o=t,l=e.computed({get:()=>o.modelValue||R.Grid,set:c=>n("update:modelValue",c)}),s=e.computed(()=>l.value===R.Grid?D.Bars3Icon:D.Squares2X2Icon),a=c=>{n("click",c);const r=l.value===R.Grid?R.List:R.Grid;l.value=r};return(c,r)=>(e.openBlock(),e.createElementBlock("button",{class:"flex items-center justify-center rounded bg-foundation h-8 w-8 shadow cursor-pointer text-foreground",onClick:a},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value),{class:"h-6 w-6"}))]))}});var Ee=(t=>(t[t.Throttle=0]="Throttle",t[t.Debounce=1]="Debounce",t))(Ee||{}),oe=(t=>(t[t.Left=0]="Left",t[t.Right=1]="Right",t))(oe||{});function Se(t,n){if(!_.isClient)return;const{wait:o=100,throttleOrDebounce:l=0}=n||{},s=o?l===0?w.throttle(t,o):w.debounce(t,o):t;e.onMounted(()=>window.addEventListener("resize",s)),e.onBeforeUnmount(()=>window.removeEventListener("resize",s))}function so(t){e.onMounted(()=>{window.addEventListener("beforeunload",t)}),e.onBeforeUnmount(()=>{window.removeEventListener("beforeunload",t)})}function Ne(t){const{el:n,defaultDirection:o}=t,l=e.ref(w.isUndefined(o)?1:o),s=e.computed(()=>{const c=e.unref(t.stopUpdatesBelowWidth);if(!w.isUndefined(c))return c;const r=e.unref(n);return r!=null&&r.offsetWidth?r.offsetWidth*2:void 0}),a=()=>{if(!_.isClient)return;const c=e.unref(n);if(!c)return;const r=c.getBoundingClientRect(),u=r.x+r.width>window.innerWidth,i=r.x<0;u&&i||!w.isUndefined(s.value)&&window.innerWidth<s.value||(u?l.value=0:i&&(l.value=1))};return Se(()=>a()),e.watch(()=>e.unref(n),c=>{c&&a()}),{direction:e.computed(()=>l.value),recalculateDirection:a}}const ao=["disabled","onClick"],ro=e.defineComponent({__name:"Menu",props:{open:{type:Boolean},items:null},emits:["update:open","chosen"],setup(t,{emit:n}){const o=t,l=e.ref(null),{direction:s}=Ne({el:e.computed(()=>{var d;return((d=l.value)==null?void 0:d.el)||null}),defaultDirection:oe.Left,stopUpdatesBelowWidth:300}),a=e.ref(null),c=e.ref(!1),r=e.computed({get:()=>o.open||!1,set:d=>n("update:open",d)}),u=d=>{const{active:g,disabled:m}=d,C=["group flex w-full items-center rounded-md px-2 py-2 text-sm"];return g?C.push("bg-primary text-foreground-on-primary"):m?C.push("text-foreground-disabled"):C.push("text-foreground"),C.join(" ")},i=(d,g)=>{n("chosen",{item:d,event:g})},y=()=>{var d;return(d=a.value)==null?void 0:d.el.click()},p=d=>{const g=!!d;return c.value=g,g};return e.watch(c,(d,g)=>{d!==g&&(r.value=d)}),e.watch(r,d=>{(d&&!c.value||!d&&c.value)&&y()}),(d,g)=>(e.openBlock(),e.createBlock(e.unref($.Menu),{as:"div",class:"relative inline-block"},{default:e.withCtx(({open:m})=>[e.createElementVNode("div",null,[e.createVNode(e.unref($.MenuButton),{ref_key:"menuButton",ref:a,class:"hidden",onClick:g[0]||(g[0]=e.withModifiers(()=>{},["stop","prevent"]))},null,512),e.createElementVNode("div",{class:e.normalizeClass(m?"pointer-events-none":"")},[e.renderSlot(d.$slots,"default",{toggle:y,open:p(m)})],2)]),e.createVNode(e.Transition,{"enter-active-class":"transition duration-100 ease-out","enter-from-class":"transform scale-95 opacity-0","enter-to-class":"transform scale-100 opacity-100","leave-active-class":"transition duration-75 ease-in","leave-from-class":"transform scale-100 opacity-100","leave-to-class":"transform scale-95 opacity-0"},{default:e.withCtx(()=>[e.createVNode(e.unref($.MenuItems),{ref_key:"menuItems",ref:l,class:e.normalizeClass(["absolute mt-2 w-56 origin-top-right divide-y divide-outline-3 rounded-md bg-foundation shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none z-40",e.unref(s)===e.unref(oe).Left?"right-0":""])},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(C,v)=>(e.openBlock(),e.createElementBlock("div",{key:v,class:"px-1 py-1"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C,k=>(e.openBlock(),e.createBlock(e.unref($.MenuItem),{key:k.id,disabled:k.disabled},{default:e.withCtx(({active:B,disabled:S})=>[e.withDirectives((e.openBlock(),e.createElementBlock("span",null,[e.createElementVNode("button",{class:e.normalizeClass(u({active:B,disabled:S})),disabled:S,onClick:f=>i(k,f)},[e.renderSlot(d.$slots,"item",{item:k},()=>[e.createTextVNode(e.toDisplayString(k.title),1)])],10,ao)])),[[e.unref(be.directive),k.disabled&&k.disabledTooltip]])]),_:2},1032,["disabled"]))),128))]))),128))]),_:3},8,["class"])]),_:3})]),_:3}))}}),io={class:"flex flex-col space-y-4"},co={class:"flex space-x-6"},uo=e.defineComponent({__name:"Tabs",props:{items:null},setup(t){const n=t,o=e.ref(null),l=e.computed(()=>o.value&&n.items.find(a=>a.id===o.value)||n.items[0]),s=a=>{o.value=a.id};return(a,c)=>(e.openBlock(),e.createElementBlock("div",io,[e.createElementVNode("div",co,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,r=>(e.openBlock(),e.createBlock(P,{key:r.id,link:"",color:l.value.id===r.id?"default":"secondary",onClick:u=>s(r)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.title),1)]),_:2},1032,["color","onClick"]))),128))]),e.renderSlot(a.$slots,"default",{activeItem:l.value})]))}}),mo={class:"text-foreground"},fo={class:"w-full text-sm overflow-x-auto overflow-y-visible simple-scrollbar"},po=["onClick","onKeypress"],ho=e.createElementVNode("div",{class:"text-gray-900 font-medium order-1"},"Placeholder",-1),go={class:"absolute right-1.5 gap-1 flex items-center p-0"},vo=e.defineComponent({__name:"Table",props:{items:null,buttons:null,columns:null,overflowCells:{type:Boolean},onRowClick:{type:Function}},setup(t){const n=t,o=e.computed(()=>{const c=(n.buttons||[]).length;let r=16;return c>0&&(r=48+(c-1)*42),`${r}px`}),l=c=>{var r;return((r=n.columns.find(u=>u.id===c))==null?void 0:r.classes)||""},s=(c,r)=>{const u=l(c);return r===0?`bg-transparent py-3 pr-5 px-1 ${u}`:`lg:p-0 px-1 ${u}`},a=c=>{var r;(r=n.onRowClick)==null||r.call(n,c)};return(c,r)=>(e.openBlock(),e.createElementBlock("div",mo,[e.createElementVNode("div",fo,[t.items.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:"grid z-10 grid-cols-12 items-center gap-6 font-semibold bg-foundation rounded-t-lg w-full border-b border-outline-3 pb-2 pt-4 px-4 min-w-[900px]",style:e.normalizeStyle({paddingRight:o.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.columns,u=>(e.openBlock(),e.createElementBlock("div",{key:u.id,class:e.normalizeClass([l(u.id),"capitalize"])},e.toDisplayString(u.header),3))),128))],4)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["divide-y divide-outline-3 h-full overflow-visible",{"pb-32":t.overflowCells}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,u=>(e.openBlock(),e.createElementBlock("div",{key:u.id,class:e.normalizeClass(["relative grid grid-cols-12 items-center gap-6 px-4 py-1 min-w-[900px] bg-foundation",{"cursor-pointer hover:bg-primary-muted":!!t.onRowClick}]),style:e.normalizeStyle({paddingRight:o.value}),tabindex:"0",onClick:i=>a(u),onKeypress:i=>a(u)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.columns,(i,y)=>(e.openBlock(),e.createElementBlock("div",{key:i.id,class:e.normalizeClass(s(i.id,y)),tabindex:"0"},[e.renderSlot(c.$slots,i.id,{item:u},()=>[ho])],2))),128)),e.createElementVNode("div",go,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.buttons,i=>(e.openBlock(),e.createElementBlock("div",{key:i.label},[e.createVNode(e.unref(P),{"icon-left":i.icon,size:"sm",color:"secondary","hide-text":"",class:e.normalizeClass(i.class),onClick:e.withModifiers(y=>i.action(u),["stop"])},null,8,["icon-left","class","onClick"])]))),128))])],46,po))),128))],2)])]))}}),yo={class:"w-full flex flex-col items-center my-2 space-y-2 mt-4"},ko={class:"inline-flex items-center space-x-1"},bo=e.createElementVNode("span",{class:"text-foreground-2"},"That's it, you've loaded everything!",-1),xo={class:"w-full flex flex-col items-center my-2 space-y-2 mt-4"},Co={class:"inline-flex items-center space-x-1"},Bo=e.createElementVNode("span",{class:"text-foreground-2"},"An error occurred while loading",-1),wo=e.defineComponent({__name:"InfiniteLoading",props:{settings:null,allowRetry:{type:Boolean}},emits:["infinite"],setup(t){const n=e.ref(null),o=e.ref(!1);return _.isClient&&e.onMounted(()=>{const l=setInterval(()=>{var s;(s=n.value)!=null&&s.isConnected&&(o.value=!0,clearInterval(l))},200)}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:n},[o.value?(e.openBlock(),e.createBlock(e.unref(Fe),e.mergeProps({key:0},l.$props.settings||{},{onInfinite:s[0]||(s[0]=a=>l.$emit("infinite",a))}),{spinner:e.withCtx(()=>[e.createVNode(re,{loading:!0,class:"my-2"})]),complete:e.withCtx(()=>[e.createElementVNode("div",yo,[e.createElementVNode("div",ko,[e.createVNode(e.unref(U.CheckIcon),{class:"w-5 h-5 text-success"}),bo])])]),error:e.withCtx(({retry:a})=>[e.createElementVNode("div",xo,[e.createElementVNode("div",Co,[e.createVNode(e.unref(U.ExclamationTriangleIcon),{class:"w-5 h-5 text-danger"}),Bo]),t.allowRetry?(e.openBlock(),e.createBlock(P,{key:0,onClick:a},{default:e.withCtx(()=>[e.createTextVNode("Retry")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)])]),_:1},16)):e.createCommentVNode("",!0)],512))}}),Vo={class:"relative group"},Eo={key:0,class:"absolute -inset-1 bg-blue-300 dark:bg-blue-500 opacity-5 dark:opacity-0 rounded-md blur-sm group-hover:opacity-60 dark:group-hover:opacity-30 transition duration-500"},So=e.defineComponent({__name:"Panel",props:{form:{type:Boolean,default:!1},ring:{type:Boolean,default:!1},fancyGlow:{type:Boolean,default:!1},customPadding:{type:Boolean,default:!1},noShadow:{type:Boolean,default:!1},panelClasses:{type:String}},emits:["submit"],setup(t,{emit:n}){const o=t,l=e.computed(()=>o.customPadding?"":"px-4 py-4 sm:px-6"),s=e.computed(()=>o.customPadding?"":"px-4 py-4 sm:p-6"),a=e.computed(()=>{const c=["rounded-lg"];return o.noShadow||c.push("shadow"),o.ring&&c.push("ring-outline-2 hover:ring-2"),o.panelClasses&&c.push(o.panelClasses),c.join(" ")});return(c,r)=>(e.openBlock(),e.createElementBlock("div",Vo,[t.fancyGlow?(e.openBlock(),e.createElementBlock("div",Eo)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.form?"form":"div"),{class:e.normalizeClass(["relative divide-outline-3 bg-foundation text-foreground flex flex-col divide-y overflow-hidden",a.value]),onSubmit:r[0]||(r[0]=u=>n("submit",u))},{default:e.withCtx(()=>[c.$slots.header?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(l.value)},[e.renderSlot(c.$slots,"header")],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["grow",s.value])},[e.renderSlot(c.$slots,"default")],2),c.$slots.footer?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(l.value)},[e.renderSlot(c.$slots,"footer")],2)):e.createCommentVNode("",!0)]),_:3},40,["class"]))]))}}),No={class:"flex-shrink-0"},$o=e.createElementVNode("span",{class:"sr-only"},"Dismiss",-1),zo=e.defineComponent({__name:"Alert",props:{color:{default:"success"},withDismiss:{type:Boolean},actions:null,customIcon:null,size:{default:"default"}},emits:["dismiss"],setup(t){const n=t,o=e.useSlots(),l=e.computed(()=>!!o.description),s=e.computed(()=>{if(n.customIcon)return n.customIcon;switch(n.color){case"info":return I.InformationCircleIcon;case"warning":return I.ExclamationCircleIcon;case"danger":return I.XCircleIcon;case"success":default:return I.CheckCircleIcon}}),a=e.computed(()=>{const m=[];switch(n.size){case"xs":m.push("p-1");break;case"default":default:m.push(l.value?"p-4":"p-2");break}switch(n.color){case"success":m.push("bg-success-lighter border-l-4 border-success");break;case"info":m.push("bg-info-lighter border-l-4 border-info");break;case"danger":m.push("bg-danger-lighter border-l-4 border-danger");break;case"warning":m.push("bg-warning-lighter border-l-4 border-warning");break}return m.join(" ")}),c=e.computed(()=>{const m=[];if(l.value)m.push("");else switch(m.push("items-center"),n.size){case"xs":m.push("space-x-1");break;case"default":default:m.push("space-x-2");break}return m.join(" ")}),r=e.computed(()=>{const m=["grow"];switch(l.value||m.push("flex items-center space-x-2"),n.size){case"xs":m.push("ml-1");break;case"default":default:m.push("ml-3");break}return m.join(" ")}),u=e.computed(()=>{const m=[];switch(n.size){case"xs":m.push("text-xs");break;case"default":default:m.push("mt-2 text-sm");break}return m.join(" ")}),i=e.computed(()=>{var v;const m=["flex"];l.value||m.push("grow justify-end");const C=l.value&&((v=n.actions)==null?void 0:v.length);switch(n.size){case"xs":m.push("space-x-1"),C&&m.push("mt-1");break;case"default":default:m.push("space-x-2"),C&&m.push("mt-4");break}return m.join(" ")}),y=e.computed(()=>{const m=[];switch(n.color){case"success":m.push("text-success-darker");break;case"info":m.push("text-info-darker");break;case"danger":m.push("text-danger-darker");break;case"warning":m.push("text-warning-darker");break}return m.join(" ")}),p=e.computed(()=>{const m=[];switch(n.size){case"xs":m.push("h-4 w-4"),m.push(l.value?"mt-0.5":"");break;case"default":default:m.push("h-5 w-5");break}switch(n.color){case"success":m.push("text-success");break;case"info":m.push("text-info");break;case"danger":m.push("text-danger");break;case"warning":m.push("text-warning");break}return m.join(" ")}),d=e.computed(()=>{const m=[];switch(n.color){case"success":m.push("bg-success-lighter ring-success");break;case"info":m.push("bg-info-lighter ring-info");break;case"danger":m.push("bg-danger-lighter ring-danger");break;case"warning":m.push("bg-warning-lighter ring-warning");break}return m.join(" ")}),g=e.computed(()=>{switch(n.size){case"xs":return"xs";case"default":default:return"sm"}});return(m,C)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["rounded-md",[a.value,y.value]])},[e.createElementVNode("div",{class:e.normalizeClass(["flex",c.value])},[e.createElementVNode("div",No,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value),{class:e.normalizeClass(p.value),"aria-hidden":"true"},null,8,["class"]))]),e.createElementVNode("div",{class:e.normalizeClass(r.value)},[e.createElementVNode("h3",{class:e.normalizeClass(["text-sm",[l.value?"font-medium":""]])},[e.renderSlot(m.$slots,"title",{},()=>[e.createTextVNode("Title")])],2),l.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(u.value)},[e.renderSlot(m.$slots,"description",{},()=>[e.createTextVNode(" Lorem ipsum dolor sit amet consectetur adipisicing elit. Aliquid pariatur, ipsum similique veniam. ")])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(i.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.actions||[],(v,k)=>(e.openBlock(),e.createBlock(P,{key:k,color:t.color,size:g.value,to:v.url,external:v.externalUrl||!1,onClick:B=>v.onClick||e.unref(w.noop)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(v.title),1)]),_:2},1032,["color","size","to","external","onClick"]))),128))],2)],2),t.withDismiss?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["flex",[l.value?"items-start":"items-center"]])},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["inline-flex rounded-md focus:outline-none focus:ring-2",d.value]),onClick:C[0]||(C[0]=v=>m.$emit("dismiss"))},[$o,e.createVNode(e.unref(I.XMarkIcon),{class:"h-5 w-5","aria-hidden":"true"})],2)],2)):e.createCommentVNode("",!0)],2)],2))}});function Io(t){var m,C;const{get:n,initialState:o,readOptions:l,set:s,asyncRead:a=!0,debugging:c}=t,r=c==null?void 0:c.log,u=()=>(new Error("Trace:").stack||"").substring(7),i=((C=(m=t.debugging)==null?void 0:m.log)==null?void 0:C.logger)||console.debug,y=r&&!r.writesOnly?()=>{const v=n();return i(`debugging: '${r.name}' read`,v,u()),v}:n,p=r&&!r.readsOnly?v=>(i(`debugging: '${r.name}' written to`,v,u()),s(v)):s,d=a?_.computedAsync(y,o,l):e.computed(y),g=e.computed(()=>d.value);return g.update=p,g}const Lo=e.defineComponent({__name:"ContextManager",setup(t,{expose:n}){const l=e.getCurrentInstance().provides,s=Object.getOwnPropertySymbols(l).find(d=>d.description==="ComboboxContext");s||console.error("FormTagsContextManager ctx key not found!");const a=e.inject(s||"__undefined");return a||console.error("FormTagsContextManager ctx not found!"),n({goUp:()=>{a==null||a.goToOption(1)},goDown:()=>{a==null||a.goToOption(2)},open:()=>{a&&a.openCombobox()},close:()=>{a==null||a.closeCombobox()},selectActive:()=>{a==null||a.selectActiveOption()},isOpen:()=>(a==null?void 0:a.comboboxState.value)===0}),(d,g)=>e.renderSlot(d.$slots,"default")}}),Do=["for"],To=["disabled","placeholder","onKeydown"],Mo=e.createElementVNode("span",{class:"text-xs sr-only"},"Clear input",-1),Ao={key:1},_o=e.createElementVNode("div",{class:"text-foreground-2 text-center"},[e.createTextVNode(" Press "),e.createElementVNode("strong",null,"Enter"),e.createTextVNode(" to create tag ⚡ ")],-1),Oo=[_o],Po=["id"],jo=e.defineComponent({__name:"Tags",props:{name:null,help:null,label:null,showLabel:{type:Boolean},rules:null,validateOnMount:{type:Boolean},validateOnValueUpdate:{type:Boolean},autoFocus:{type:Boolean},showClear:{type:Boolean},showRequired:{type:Boolean},color:{default:"page"},wrapperClasses:null,size:{default:"base"},placeholder:null,disabled:{type:Boolean},useLabelInErrors:{type:Boolean,default:!0},getAutocompleteItems:{type:Function},modelValue:null},emits:["update:modelValue","change","clear"],setup(t,{expose:n,emit:o}){const l=t,s=h=>h.type==="input",a=e.ref(null),{focused:c}=_.useFocus(a),r=e.ref(null),{coreInputClasses:u,coreClasses:i,labelClasses:y,title:p,helpTip:d,helpTipId:g,hideHelpTip:m,helpTipClasses:C,errorMessage:v,clear:k,value:B}=pe({props:e.toRefs(l),emit:o,inputEl:a}),S=e.ref([]),f=e.ref(!1),V=e.ref(!1),N=e.ref(""),E=e.computed({get:()=>B.value||[],set:h=>{B.value=w.uniq(h).filter(x=>!!x.length)}}),W=e.computed(()=>{switch(l.size){case"sm":return"h-6";case"lg":return"h-10";case"xl":return"h-14";case"base":default:return"h-8"}}),M=e.computed(()=>l.showClear&&!!E.value.length),j=e.computed(()=>{const h=[i.value,l.disabled?"cursor-not-allowed !bg-foundation-disabled !text-disabled-muted":""];return M.value&&(v.value||l.showRequired)?h.push("pr-14"):(M.value||v.value||l.showRequired)&&h.push("pr-8"),v.value?(h.push("border-2 border-danger text-danger-darker"),c.value&&h.push("ring-1 ring-danger")):(h.push("border-2 border-transparent"),c.value&&h.push("ring-2 ring-outline-2")),h.join(" ")}),T=h=>{if(l.disabled)return;const x=E.value.indexOf(h);if(x!==-1){const b=E.value.slice();b.splice(x,1),E.value=b}},Y=()=>{var h;(h=a.value)==null||h.blur(),V.value=!1},ce=h=>{if(h.key!=="Backspace"||N.value.length)return;const x=E.value.slice();x.pop(),E.value=x,V.value=!1},ue=()=>{var h,x,b;(h=r.value)!=null&&h.isOpen()?(x=r.value)==null||x.goUp():(b=r.value)==null||b.open()},ee=()=>{var h,x,b;(h=r.value)!=null&&h.isOpen()?(x=r.value)==null||x.goDown():(b=r.value)==null||b.open()},F=async()=>{l.getAutocompleteItems&&(f.value=!0,S.value=await Promise.resolve(l.getAutocompleteItems(N.value)),f.value=!1)},Q=w.debounce(F,1e3),de=()=>{f.value=!0,Q()},J=(h,x)=>{var z,L;if(s(h)?h.data===" "||h.data===","||h.data===";":!0){let K=!1;if((z=r.value)!=null&&z.isOpen()&&S.value.length&&!x)(L=r.value)==null||L.selectActive(),K=!0;else{const H=N.value.trim().substring(0,N.value.length-(s(h)?1:0)),te=E.value.includes(H);H.length>0&&!te&&(E.value=[...E.value,H],K=!0)}K&&(N.value="",V.value=!1)}else V.value=!!N.value.length};return e.watch(V,(h,x)=>{var b,z;h&&!x?l.getAutocompleteItems&&((b=r.value)==null||b.open()):!h&&x&&((z=r.value)==null||z.close())}),e.watch(N,()=>{de()}),e.onMounted(()=>{F()}),n({resolveAutocompleteItems:F}),(h,x)=>(e.openBlock(),e.createBlock(e.unref($.Combobox),{modelValue:E.value,"onUpdate:modelValue":x[5]||(x[5]=b=>E.value=b),as:"div",multiple:"",clearable:"",class:e.normalizeClass([t.wrapperClasses])},{default:e.withCtx(()=>[e.createVNode(Lo,{ref_key:"ctxManager",ref:r},{default:e.withCtx(()=>[e.createElementVNode("label",{for:t.name,class:e.normalizeClass(e.unref(y))},[e.createElementVNode("span",null,e.toDisplayString(e.unref(p)),1)],10,Do),e.createElementVNode("div",{class:e.normalizeClass(["relative flex flex-wrap items-center space-x-1 px-2 py-1",j.value])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,b=>(e.openBlock(),e.createBlock(ae,{key:b,"icon-left":t.disabled?void 0:e.unref(I.XMarkIcon),"clickable-icon":"",size:"lg",onClickIcon:()=>T(b)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(b),1)]),_:2},1032,["icon-left","onClickIcon"]))),128)),e.withDirectives(e.createElementVNode("input",{ref_key:"inputEl",ref:a,"onUpdate:modelValue":x[0]||(x[0]=b=>N.value=b),disabled:t.disabled,class:e.normalizeClass(["bg-transparent grow shrink border-0 focus:ring-0 p-0",[e.unref(u),W.value]]),style:{"flex-basis":"70px","min-width":"70px"},placeholder:E.value.length?void 0:t.placeholder,onInput:J,onKeydown:[e.withKeys(Y,["escape"]),x[1]||(x[1]=e.withKeys(e.withModifiers(b=>J(b,!0),["stop","prevent"]),["enter"])),e.withKeys(J,["tab"]),e.withKeys(ce,["backspace"]),e.withKeys(ue,["arrow-up"]),e.withKeys(ee,["arrow-down"])],onBlur:x[2]||(x[2]=b=>V.value=!1)},null,42,To),[[e.vModelText,N.value]]),M.value?(e.openBlock(),e.createElementBlock("a",{key:0,title:"Clear input",class:"absolute top-2 right-0 flex items-center pr-2 cursor-pointer",onClick:x[3]||(x[3]=(...b)=>e.unref(k)&&e.unref(k)(...b)),onKeydown:x[4]||(x[4]=(...b)=>e.unref(k)&&e.unref(k)(...b))},[Mo,e.createVNode(e.unref(I.XMarkIcon),{class:"h-5 w-5 text-foreground","aria-hidden":"true"})],32)):e.createCommentVNode("",!0),e.unref(v)?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["pointer-events-none absolute top-[10px] right-0 flex items-center",M.value?"pr-8":"pr-2"])},[e.createVNode(e.unref(I.ExclamationCircleIcon),{class:"h-4 w-4 text-danger","aria-hidden":"true"})],2)):e.createCommentVNode("",!0),t.showRequired&&!e.unref(v)?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["pointer-events-none absolute top-[2px] text-4xl right-0 flex items-center text-danger opacity-50",M.value?"pr-8":"pr-2"])}," * ",2)):e.createCommentVNode("",!0)],2),e.createVNode(e.unref($.TransitionRoot),{leave:"transition ease-in duration-100","leave-from":"opacity-100","leave-to":"opacity-0",class:"relative px-0.5"},{default:e.withCtx(()=>[e.createVNode(e.unref($.ComboboxOptions),{class:"absolute top-1 max-h-60 w-full overflow-auto simple-scrollbar rounded-md bg-foundation-2 py-1 shadow label label--light outline outline-2 outline-primary-muted focus:outline-none"},{default:e.withCtx(()=>[f.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["px-1",S.value.length?"mb-1":""])},[e.createVNode(re,{loading:!0})],2)):e.createCommentVNode("",!0),!S.value.length&&!f.value?(e.openBlock(),e.createElementBlock("div",Ao,Oo)):e.createCommentVNode("",!0),S.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(S.value,b=>(e.openBlock(),e.createBlock(e.unref($.ComboboxOption),{key:b,as:"template",value:b},{default:e.withCtx(({selected:z,active:L})=>[e.createElementVNode("li",{class:e.normalizeClass(["relative cursor-pointer select-none py-1.5 pl-3",{"text-primary":L,"text-foreground":!L}])},[e.createElementVNode("span",{class:e.normalizeClass(["block truncate",{"font-medium":z,"font-normal":!z}])},e.toDisplayString(b),3),z?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["absolute inset-y-0 right-0 flex items-center pr-4",{"text-primary":L,"text-foreground":!L}])},[e.createVNode(e.unref(I.CheckIcon),{class:"h-5 w-5","aria-hidden":"true"})],2)):e.createCommentVNode("",!0)],2)]),_:2},1032,["value"]))),128)):e.createCommentVNode("",!0)]),_:1})]),_:1}),e.unref(g)&&!e.unref(m)?(e.openBlock(),e.createElementBlock("p",{key:0,id:e.unref(g),class:e.normalizeClass(e.unref(C))},e.toDisplayString(e.unref(d)),11,Po)):e.createCommentVNode("",!0)]),_:1},512)]),_:1},8,["modelValue","class"]))}});function $e(t){const{props:n}=t,o=e.computed(()=>{var u;switch((u=n.size)==null?void 0:u.value){case"xs":return"h-5";case"sm":return"h-6";case"lg":return"h-10";case"xl":return"h-14";case"editable":return"h-60";case"base":default:return"h-8"}}),l=e.computed(()=>{var u;switch((u=n.size)==null?void 0:u.value){case"xs":return"w-5";case"sm":return"w-6";case"lg":return"w-10";case"xl":return"w-14";case"editable":return"w-60";case"base":default:return"w-8"}}),s=e.computed(()=>{var u;switch((u=n.size)==null?void 0:u.value){case"xs":return"text-tiny";case"sm":return"text-xs";case"lg":return"text-md";case"xl":return"text-2xl";case"editable":return"h1";case"base":default:return"text-sm"}}),a=e.computed(()=>{var u;switch((u=n.size)==null?void 0:u.value){case"xs":return"w-3 h-3";case"sm":return"w-3 h-3";case"lg":return"w-5 h-5";case"xl":return"w-8 h-8";case"editable":return"w-20 h-20";case"base":default:return"w-4 h-4"}}),c=e.computed(()=>`${l.value} ${o.value} ${s.value}`);return{heightClasses:o,widthClasses:l,sizeClasses:c,iconClasses:a}}const Fo={key:1,class:"flex h-full w-full select-none items-center justify-center"},Ro={key:2},le=e.defineComponent({__name:"Avatar",props:{user:{default:null},size:{default:"base"},hoverEffect:{type:Boolean,default:!1},active:{type:Boolean},noBorder:{type:Boolean},noBg:{type:Boolean}},setup(t){const n=t,{sizeClasses:o,iconClasses:l}=$e({props:e.toRefs(n)}),s=e.computed(()=>{var d,g,m;if(!((d=n.user)!=null&&d.name.length))return;const i=n.user.name.split(" "),y=((g=i[0])==null?void 0:g[0])||"",p=((m=i[1])==null?void 0:m[0])||"";return n.size==="sm"||n.size==="xs"?y:y+p}),a=e.computed(()=>n.noBorder?"":"border-2 border-foundation"),c=e.computed(()=>n.noBg?"":"bg-primary"),r=e.computed(()=>n.hoverEffect?"hover:border-primary focus:border-primary active:scale-95":""),u=e.computed(()=>n.active?"border-primary":"");return(i,y)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["text-foreground-on-primary flex shrink-0 items-center justify-center overflow-hidden rounded-full font-semibold uppercase transition",e.unref(o),c.value,a.value,r.value,u.value])},[e.renderSlot(i.$slots,"default",{},()=>{var p;return[(p=t.user)!=null&&p.avatar?(e.openBlock(),e.createElementBlock("div",{key:0,class:"h-full w-full bg-cover bg-center bg-no-repeat",style:e.normalizeStyle({backgroundImage:`url('${t.user.avatar}')`})},null,4)):s.value?(e.openBlock(),e.createElementBlock("div",Fo,e.toDisplayString(s.value),1)):(e.openBlock(),e.createElementBlock("div",Ro,[e.createVNode(e.unref(D.UserCircleIcon),{class:e.normalizeClass(e.unref(l))},null,8,["class"])]))]}),e.renderSlot(i.$slots,"absolute-anchor")],2))}}),Uo=e.defineComponent({__name:"AvatarGroup",props:{users:{default:()=>[]},overlap:{type:Boolean,default:!0},size:{default:"base"},maxCount:{default:void 0}},setup(t){const n=t,o=e.ref(null),l=e.ref(null),{hiddenItemCount:s}=ge({elementToWatchForChanges:o,itemContainer:l,trackResize:!0,trackMutations:!0}),{heightClasses:a}=$e({props:e.toRefs(n)}),c=e.computed(()=>n.maxCount?Math.max(n.users.length-n.maxCount,0):0),r=e.computed(()=>s.value+c.value),u=e.computed(()=>n.maxCount?n.users.slice(0,n.maxCount):n.users);return(i,y)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"elementToWatchForChanges",ref:o,class:e.normalizeClass(`flex ${t.overlap?"-space-x-2":""}`)},[e.createElementVNode("div",{ref_key:"itemContainer",ref:l,class:e.normalizeClass(`flex flex-wrap overflow-hidden ${t.overlap?"-space-x-2 ":""} ${e.unref(a)}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(p,d)=>(e.openBlock(),e.createBlock(le,{key:p.id||d,user:p,size:t.size},null,8,["user","size"]))),128))],2),r.value?(e.openBlock(),e.createBlock(le,{key:0,size:t.size},{default:e.withCtx(()=>[e.createTextVNode(" +"+e.toDisplayString(r.value),1)]),_:1},8,["size"])):e.createCommentVNode("",!0)],2))}}),ze=e.defineComponent({__name:"Icon",props:{loading:{type:Boolean,default:!0},size:{default:"base"}},setup(t){const n=t,o=e.computed(()=>{const l=["text-primary transition-all animate-spin"];switch(l.push(n.loading?"opacity-100":"opacity-0"),n.size){case"base":l.push("h-8 w-8");break;case"sm":l.push("h-5 w-5");break;case"lg":l.push("h-12 w-12");break}return l.join(" ")});return(l,s)=>(e.openBlock(),e.createBlock(e.unref(D.ArrowPathIcon),{class:e.normalizeClass(o.value)},null,8,["class"]))}}),qo={class:"flex flex-col items-center space-y-2"},Wo={key:1,class:"relative group"},Ko={class:"opacity-0 transition-all absolute group-hover:opacity-100 inset-0 flex items-end justify-center bottom-4"},Ho={key:2,class:"w-full text-center text-danger text-sm"},Go=e.defineComponent({__name:"AvatarEditable",props:e.mergeModels({modelValue:null,placeholder:null,name:null,rules:null,validateOnMount:{type:Boolean},validateOnValueUpdate:{type:Boolean},disabled:{type:Boolean}},{editMode:{type:Boolean,local:!0}}),emits:e.mergeModels(["save","update:modelValue"],["update:editMode"]),setup(t,{expose:n,emit:o}){const l=t,s=e.defineAsyncComponent({loader:()=>Promise.resolve().then(()=>require("./AvatarEditor-92ea4e16.cjs")),loadingComponent:ze,delay:100}),{value:a,errorMessage:c}=se.useField(l.name,l.rules,{validateOnMount:l.validateOnMount,validateOnValueUpdate:l.validateOnValueUpdate,initialValue:l.modelValue||void 0}),r=e.useModel(t,"editMode",{local:!0}),u=e.computed(()=>({avatar:a.value,name:l.placeholder})),i=d=>{a.value=d,o("save",d)};return n({open:()=>r.value=!0,close:()=>r.value=!1}),(d,g)=>(e.openBlock(),e.createElementBlock("div",qo,[r.value?(e.openBlock(),e.createBlock(e.unref(s),{key:0,user:u.value,disabled:t.disabled,onCancel:g[0]||(g[0]=m=>r.value=!1),onSave:i},null,8,["user","disabled"])):(e.openBlock(),e.createElementBlock("div",Wo,[e.createVNode(le,{user:u.value,size:"editable"},null,8,["user"]),e.createElementVNode("div",Ko,[e.createVNode(P,{disabled:t.disabled,color:"secondary",onClick:g[1]||(g[1]=m=>r.value=!0)},{default:e.withCtx(()=>[e.createTextVNode(" Change ")]),_:1},8,["disabled"])])])),e.unref(c)?(e.openBlock(),e.createElementBlock("div",Ho,e.toDisplayString(e.unref(c)),1)):e.createCommentVNode("",!0)]))}});class O extends Error{constructor(n,o){n||(n=new.target.defaultMessage),super(n,o)}}A(O,"defaultMessage","Unexpected error occurred");class Ie extends O{}A(Ie,"defaultMessage","An unexpected logic error occurred!");class Le extends O{}A(Le,"defaultMessage","Attempting to access an uninitialized resource");class De extends O{}A(De,"defaultMessage","getCurrentInstance() returned null. Method must be called at the top of a setup function");class Te extends O{}A(Te,"defaultMessage","Operation not supported in current (server or client) environment");var ie=(t=>(t.AnyAudio="audio/*",t.AnyVideo="video/*",t.AnyImage="image/*",t))(ie||{});function Xo(t,n){const o=w.intersection(Object.values(ie),n);for(const a of o)switch(a){case"audio/*":if(t.type.startsWith("audio"))return!0;break;case"image/*":if(t.type.startsWith("image"))return!0;break;case"video/*":if(t.type.startsWith("video"))return!0;break}const l=w.difference(n,o),s=Zo(t.name);if(!s)return new Me;for(const a of l)if(a.toLowerCase()===s.toLowerCase())return!0;return new Ae}function Zo(t){const n=t.split(".").pop()||null;return n?`.${n}`:null}function Qo(t){return t.startsWith(".")||Object.values(ie).includes(t)}function me(t){const n=a=>parseFloat(a.toFixed(2)).toString();if(t<1024)return`${t}bytes`;const o=t/1024;if(o<1024)return`${n(o)}KB`;const l=o/1024;if(l<1024)return`${n(l)}MB`;const s=l/1024;return`${n(s)}GB`}function Jo(t){const n={name:t.name,lastModified:t.lastModified,size:t.size,type:t.type};return q.md5(JSON.stringify(n))}class Me extends O{}A(Me,"defaultMessage","The selected file has a missing extension");class Ae extends O{}A(Ae,"defaultMessage","The selected file type is forbidden");var _e=(t=>(t[t.Success=1]="Success",t[t.Failure=2]="Failure",t))(_e||{});function Yo(t){if(!t)return;const n=t.split(",").map(o=>Qo(o)?o:null).filter(o=>o!==null);return n.length?n:void 0}function el(t){const{disabled:n,accept:o,multiple:l,sizeLimit:s,countLimit:a}=t,c=e.computed(()=>Yo(e.unref(o))),r=u=>{const i=[],y=c.value;for(const p of u){const d=Jo(p),g=e.unref(l)?e.unref(a):1;if(!i.find(m=>m.id===d)){if(g&&i.length>=g)break;if(y){const m=Xo(p,y);if(m instanceof Error){i.push({file:p,id:d,error:m});continue}}if(p.size>e.unref(s)){i.push({file:p,id:d,error:new Oe(`The selected file's size (${me(p.size)}) is too big (over ${me(e.unref(s))})`)});continue}i.push({file:p,id:d,error:null})}}return i};return{buildUploadableFiles:u=>{if(!e.unref(n||!1))return r(u)}}}class Oe extends O{}A(Oe,"defaultMessage","The selected file's size is too large");const tl=["accept","multiple"],nl=e.defineComponent({__name:"Zone",props:{accept:null,multiple:{type:Boolean},sizeLimit:{default:1024*1024*100},countLimit:null,disabled:{type:Boolean}},emits:["files-selected"],setup(t,{expose:n,emit:o}){const l=t,s=e.ref(null),a=e.ref(null),{buildUploadableFiles:c}=el({sizeLimit:e.computed(()=>l.sizeLimit),countLimit:e.computed(()=>l.countLimit),accept:e.computed(()=>l.accept),multiple:e.computed(()=>l.multiple),disabled:e.computed(()=>l.disabled)}),r=p=>{const d=c(p);d!=null&&d.length&&o("files-selected",{files:d})},{isOverDropZone:u}=_.useDropZone(s,p=>{p!=null&&p.length&&r(p)}),i=()=>{const p=a.value;if(!p)return;const d=[...p.files||[]];p.value="",d.length&&r(d)},y=()=>{var p;(p=a.value)==null||p.click()};return n({triggerPicker:y}),(p,d)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"fileUploadZone",ref:s,class:"file-upload-zone"},[e.renderSlot(p.$slots,"default",{isDraggingFiles:e.unref(u),openFilePicker:y,activatorOn:{click:y}}),e.createElementVNode("input",{ref_key:"fileInput",ref:a,type:"file",class:"hidden",accept:t.accept,multiple:t.multiple,onClick:d[0]||(d[0]=e.withModifiers(()=>{},["stop"])),onChange:i},null,40,tl)],512))}});exports.BaseError=O;exports.BlobUploadStatus=_e;exports.CommonAlert=zo;exports.CommonBadge=ae;exports.CommonLoadingBar=re;exports.CommonLoadingIcon=ze;exports.CommonStepsBullet=Mt;exports.CommonStepsNumber=xt;exports.CommonTextLink=Ce;exports.ComposableInvokedOutOfScopeError=De;exports.FormButton=P;exports.FormCardButton=_t;exports.FormCheckbox=Wt;exports.FormFileUploadZone=nl;exports.FormSelectBadges=Fn;exports.FormSelectBase=ye;exports.FormSelectSourceApps=Pn;exports.FormSwitch=qn;exports.FormTags=jo;exports.FormTextArea=Qt;exports.FormTextInput=ln;exports.GlobalToastRenderer=tt;exports.GridListToggleValue=R;exports.HorizontalDirection=oe;exports.InfiniteLoading=wo;exports.LayoutDialog=eo;exports.LayoutDisclosure=oo;exports.LayoutGridListToggle=lo;exports.LayoutMenu=ro;exports.LayoutPanel=So;exports.LayoutTable=vo;exports.LayoutTabs=uo;exports.LogicError=Ie;exports.ModifierKeys=Z;exports.SourceAppBadge=Ve;exports.TailwindBreakpoints=X;exports.ThrottleOrDebounce=Ee;exports.ToastNotificationType=G;exports.UninitializedResourceAccessError=Le;exports.UniqueFileTypeSpecifier=ie;exports.UnsupportedEnvironmentError=Te;exports.UserAvatar=le;exports.UserAvatarEditable=Go;exports.UserAvatarGroup=Uo;exports.ValidationHelpers=pn;exports.clientOs=ne;exports.getKeyboardShortcutTitle=Kn;exports.onKeyboardShortcut=Hn;exports.prettyFileSize=me;exports.useFormCheckboxModel=Gn;exports.useFormSelectChildInternals=ve;exports.useOnBeforeWindowUnload=so;exports.useResponsiveHorizontalDirectionCalculation=Ne;exports.useWindowResizeHandler=Se;exports.useWrappingContainerHiddenCount=ge;exports.writableAsyncComputed=Io;
2
+ //# sourceMappingURL=lib.cjs.map