@speckle/ui-components 2.14.8-alpha8 → 2.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { RuleExpression } from 'vee-validate';
|
|
2
2
|
import { ConcreteComponent, PropType } from 'vue';
|
|
3
3
|
import { Optional } from '@speckle/shared';
|
|
4
|
-
type InputType = 'text' | 'email' | 'password' | 'url' | 'search';
|
|
5
4
|
type InputSize = 'sm' | 'base' | 'lg' | 'xl';
|
|
6
5
|
type InputColor = 'page' | 'foundation';
|
|
7
6
|
declare const _sfc_main: import("vue").DefineComponent<{
|
|
@@ -9,7 +8,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
9
8
|
* Input "type" value (changes behaviour & look)
|
|
10
9
|
*/
|
|
11
10
|
type: {
|
|
12
|
-
type: PropType<
|
|
11
|
+
type: PropType<string>;
|
|
13
12
|
default: string;
|
|
14
13
|
};
|
|
15
14
|
/**
|
|
@@ -142,7 +141,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
142
141
|
* Input "type" value (changes behaviour & look)
|
|
143
142
|
*/
|
|
144
143
|
type: {
|
|
145
|
-
type: PropType<
|
|
144
|
+
type: PropType<string>;
|
|
146
145
|
default: string;
|
|
147
146
|
};
|
|
148
147
|
/**
|
|
@@ -276,7 +275,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
276
275
|
onFocusin?: ((...args: any[]) => any) | undefined;
|
|
277
276
|
onFocusout?: ((...args: any[]) => any) | undefined;
|
|
278
277
|
}, {
|
|
279
|
-
type:
|
|
278
|
+
type: string;
|
|
280
279
|
size: InputSize;
|
|
281
280
|
fullWidth: boolean;
|
|
282
281
|
color: InputColor;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
2
|
import { MaybeAsync, Optional } from '@speckle/shared';
|
|
3
3
|
import { RuleExpression } from 'vee-validate';
|
|
4
|
-
type ButtonStyle = 'base' | 'simple';
|
|
4
|
+
type ButtonStyle = 'base' | 'simple' | 'tinted';
|
|
5
5
|
type SingleItem = any;
|
|
6
6
|
declare const _sfc_main: import("vue").DefineComponent<{
|
|
7
7
|
multiple: {
|
|
@@ -130,7 +130,9 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
130
130
|
type: BooleanConstructor;
|
|
131
131
|
default: boolean;
|
|
132
132
|
};
|
|
133
|
-
}, {
|
|
133
|
+
}, {
|
|
134
|
+
triggerSearch: () => Promise<void>;
|
|
135
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
134
136
|
multiple: {
|
|
135
137
|
type: BooleanConstructor;
|
|
136
138
|
default: boolean;
|
package/dist/lib.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),C=require("lodash"),I=require("@heroicons/vue/24/solid"),L=require("@heroicons/vue/24/outline"),_=require("@heroicons/vue/20/solid"),U=require("vee-validate"),W=require("nanoid"),T=require("@speckle/shared"),M=require("@vueuse/core"),E=require("@headlessui/vue"),pe=require("vue-tippy"),he=require("v3-infinite-loading");const ge={key:2,style:{margin:"0 !important",width:"0.01px"}},ye=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:o}){const n=t,l=e.resolveDynamicComponent("NuxtLink"),r=e.resolveDynamicComponent("RouterLink"),s=e.computed(()=>n.linkComponent?n.linkComponent:n.external?"a":C.isObjectLike(l)?l:C.isObjectLike(r)?r:"a"),c=e.computed(()=>{if(!n.to)return n.submit?"submit":"button"}),a=e.computed(()=>n.disabled||n.loading),i=e.computed(()=>n.loading?I.ArrowPathIcon:n.iconLeft),u=e.computed(()=>{const d=[];if(d.push("border-2"),a.value)d.push(n.outlined?"border-foreground-disabled":"bg-foundation-disabled border-transparent");else switch(n.color){case"invert":d.push(n.outlined?"border-foundation dark:border-foreground":"bg-foundation dark:bg-foreground border-transparent");break;case"card":d.push(n.outlined?"border-foundation-2 shadow":"bg-foundation-2 dark:bg-foundation-2 border-foundation shadow");break;case"danger":d.push(n.outlined?"border-danger":"bg-danger border-danger");break;case"secondary":d.push(n.outlined?"border-foundation":"bg-foundation border-foundation-2");break;case"warning":d.push(n.outlined?"border-warning":"bg-warning border-warning");break;case"info":d.push(n.outlined?"border-info":"bg-info border-info");break;case"success":d.push(n.outlined?"border-success":"bg-success border-success");break;case"default":default:d.push(n.outlined?"border-primary hover:border-primary-focus":"bg-primary hover:bg-primary-focus border-transparent");break}return d.join(" ")}),h=e.computed(()=>{const d=[];if(!n.text&&!n.link)if(a.value)d.push((n.outlined,"text-foreground-disabled"));else switch(n.color){case"invert":d.push(n.outlined?"text-foundation dark:text-foreground":"text-primary");break;case"card":d.push((n.outlined,"text-foreground"));break;case"danger":d.push(n.outlined?"text-danger":"text-foundation dark:text-foreground");break;case"warning":d.push(n.outlined?"text-warning":"text-foundation dark:text-foreground");break;case"info":d.push(n.outlined?"text-info":"text-foundation dark:text-foreground");break;case"success":d.push(n.outlined?"text-success":"text-foundation dark:text-foreground");break;case"secondary":d.push((n.outlined,"text-foreground hover:text-primary"));break;case"default":default:d.push(n.outlined?"text-primary hover:text-primary-focus":"text-foundation dark:text-foreground");break}else a.value?d.push("text-foreground-disabled"):n.color==="invert"?d.push("text-foundation hover:text-foundation-2 dark:text-foreground dark:hover:text-foreground"):n.color==="secondary"?d.push("text-foreground-2 hover:text-primary-focus"):n.color==="success"?d.push("text-success"):n.color==="warning"?d.push("text-warning"):n.color==="info"?d.push("text-info"):n.color==="danger"?d.push("text-danger"):d.push("text-primary hover:text-primary-focus");return d.join(" ")}),m=e.computed(()=>{const d=[];return d.push(n.rounded?"rounded-full":"rounded-md"),d.join(" ")}),f=e.computed(()=>{const d=[];if(!a.value)switch(n.color){case"invert":d.push("hover:ring-4 ring-white/50");break;case"danger":d.push("hover:ring-4 ring-danger-lighter dark:ring-danger-darker");break;case"warning":d.push("hover:ring-4 ring-warning-lighter dark:ring-warning-darker");break;case"info":d.push("hover:ring-4 ring-info-lighter dark:ring-info-darker");break;case"success":d.push("hover:ring-4 ring-success-lighter dark:ring-success-darker");break;case"default":default:d.push("hover:ring-2");break}return d.join(" ")}),p=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"}}),x=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"}}),b=e.computed(()=>{const d=[];return n.fullWidth&&d.push("w-full"),a.value&&d.push("cursor-not-allowed"),d.join(" ")}),v=e.computed(()=>{const d=[];return!a.value&&!n.link&&!n.text&&d.push("active:scale-[0.97]"),!a.value&&n.link&&d.push("underline decoration-transparent decoration-2 underline-offset-4 hover:decoration-inherit"),d.join(" ")}),k=e.computed(()=>{const d=n.link||n.text;return["transition inline-flex justify-center items-center space-x-2 outline-none select-none",b.value,p.value,h.value,d?"":u.value,d?"":m.value,d?"":f.value,n.link?"":x.value,v.value].join(" ")}),g=e.computed(()=>{const d=[""];switch(n.loading&&d.push("animate-spin"),n.size){case"xs":d.push("h-3 w-3");break;case"sm":d.push("h-4 w-4");break;case"lg":d.push("h-6 w-6");break;case"xl":d.push("h-8 w-8");break;case"base":default:d.push("h-5 w-5");break}return d.join(" ")}),$=d=>{if(a.value){d.preventDefault(),d.stopPropagation(),d.stopImmediatePropagation();return}o("click",d)};return(d,B)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.to?e.unref(s):"button"),{href:t.to,to:t.to,type:e.unref(c),external:t.external,class:e.normalizeClass(e.unref(k)),disabled:e.unref(a),role:"button",onClick:$},{default:e.withCtx(()=>[e.unref(i)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(i)),{key:0,class:e.normalizeClass(`${e.unref(g)} ${t.hideText?"":"mr-2"}`)},null,8,["class"])):e.createCommentVNode("",!0),t.hideText?(e.openBlock(),e.createElementBlock("div",ge," ")):e.renderSlot(d.$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(`${e.unref(g)} ${t.hideText?"":"ml-2"}`)},null,8,["class"])):e.createCommentVNode("",!0)]),_:3},8,["href","to","type","external","class","disabled"]))}});const Z=(t,o)=>{const n=t.__vccOpts||t;for(const[l,r]of o)n[l]=r;return n},A=Z(ye,[["__scopeId","data-v-38aa371e"]]),ee=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:o}){const n=t,l=r=>{if(n.disabled){r.preventDefault(),r.stopPropagation(),r.stopImmediatePropagation();return}o("click",r)};return(r,s)=>(e.openBlock(),e.createBlock(A,{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(r.$slots,"default",{},()=>[e.createTextVNode("Link")])]),_:3},8,["to","external","disabled","size","foreground-link","icon-left","icon-right","hide-text"]))}});var P=(t=>(t[t.Success=0]="Success",t[t.Warning=1]="Warning",t[t.Danger=2]="Danger",t[t.Info=3]="Info",t))(P||{});const ke={"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"},ve={class:"flex w-full flex-col items-center space-y-4 sm:items-end"},xe={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"},be={class:"p-4"},Ce={class:"flex items-start"},Be={class:"flex-shrink-0"},we={class:"ml-2 w-0 flex-1 flex flex-col"},Ve={key:0,class:"text-foreground font-bold"},Ee={key:1,class:"label label--light text-foreground-2"},Ne={key:2,class:"flex justify-start mt-2"},Se=e.createElementVNode("span",{class:"sr-only"},"Close",-1),$e=e.defineComponent({__name:"ToastRenderer",props:{notification:null},emits:["update:notification"],setup(t,{emit:o}){const n=t,l=e.computed(()=>{var c,a;return!((c=n.notification)!=null&&c.description)&&!((a=n.notification)!=null&&a.cta)}),r=()=>{o("update:notification",null)},s=c=>{var a,i,u;(u=(i=(a=n.notification)==null?void 0:a.cta)==null?void 0:i.onClick)==null||u.call(i,c),r()};return(c,a)=>(e.openBlock(),e.createElementBlock("div",ke,[e.createElementVNode("div",ve,[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",xe,[e.createElementVNode("div",be,[e.createElementVNode("div",Ce,[e.createElementVNode("div",Be,[t.notification.type===e.unref(P).Success?(e.openBlock(),e.createBlock(e.unref(L.CheckCircleIcon),{key:0,class:"h-6 w-6 text-success","aria-hidden":"true"})):t.notification.type===e.unref(P).Danger?(e.openBlock(),e.createBlock(e.unref(L.XCircleIcon),{key:1,class:"h-6 w-6 text-danger","aria-hidden":"true"})):t.notification.type===e.unref(P).Warning?(e.openBlock(),e.createBlock(e.unref(L.ExclamationCircleIcon),{key:2,class:"h-6 w-6 text-warning","aria-hidden":"true"})):t.notification.type===e.unref(P).Info?(e.openBlock(),e.createBlock(e.unref(L.InformationCircleIcon),{key:3,class:"h-6 w-6 text-info","aria-hidden":"true"})):e.createCommentVNode("",!0)]),e.createElementVNode("div",we,[t.notification.title?(e.openBlock(),e.createElementBlock("p",Ve,e.toDisplayString(t.notification.title),1)):e.createCommentVNode("",!0),t.notification.description?(e.openBlock(),e.createElementBlock("p",Ee,e.toDisplayString(t.notification.description),1)):e.createCommentVNode("",!0),t.notification.cta?(e.openBlock(),e.createElementBlock("div",Ne,[e.createVNode(ee,{to:t.notification.cta.url,class:"label",primary:"",onClick:s},{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":e.unref(l)}])},[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:r},[Se,e.createVNode(e.unref(_.XMarkIcon),{class:"h-6 w-6","aria-hidden":"true"})])],2)])])])):e.createCommentVNode("",!0)]),_:1})])]))}}),_e=e.createElementVNode("circle",{cx:"4",cy:"4",r:"3"},null,-1),Ie=[_e],te=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:o}){const n=t,l=e.computed(()=>n.colorClasses||"bg-blue-100 text-blue-800"),r=e.computed(()=>n.dotIconColorClasses||"text-blue-400"),s=e.computed(()=>{const u=["inline-flex items-center",l.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(" ")}),c=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(" ")}),a=e.computed(()=>["-ml-0.5 mr-1.5 h-2 w-2",r.value].join(" ")),i=u=>{if(!n.clickableIcon){u.stopPropagation(),u.stopImmediatePropagation(),u.preventDefault();return}o("click-icon",u)};return(u,h)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(e.unref(s))},[t.dot?(e.openBlock(),e.createElementBlock("svg",{key:0,class:e.normalizeClass(e.unref(a)),fill:"currentColor",viewBox:"0 0 8 8"},Ie,2)):e.createCommentVNode("",!0),e.renderSlot(u.$slots,"default",{},()=>[e.createTextVNode("Badge")]),t.iconLeft?(e.openBlock(),e.createElementBlock("button",{key:1,class:e.normalizeClass(e.unref(c)),onClick:h[0]||(h[0]=m=>i(m))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.iconLeft),{class:e.normalizeClass(["h-4 w-4",e.unref(r)])},null,8,["class"]))],2)):e.createCommentVNode("",!0)],2))}});let Y=[];function ze(t){Y=Y?t:t.slice()}var j=(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))(j||{});function ne(t){const{props:{modelValue:o,steps:n,orientation:l,goVerticalBelow:r,nonInteractive:s,stepsPadding:c},emit:a}=t,i=e.computed(()=>(l==null?void 0:l.value)==="vertical"?"vertical":"horizontal"),u=e.computed({get:()=>C.clamp((o==null?void 0:o.value)||0,-1,n.value.length),set:v=>a("update:modelValue",C.clamp(v,0,n.value.length))}),h=v=>`${v+1}`,m=v=>v===u.value,f=v=>v<u.value,p=(v,k)=>{var $;if(s!=null&&s.value){k==null||k.preventDefault(),k==null||k.stopPropagation(),k==null||k.stopImmediatePropagation();return}u.value=v;const g=n.value[u.value];($=g==null?void 0:g.onClick)==null||$.call(g)},x=e.computed(()=>{const v=["flex"];let k,g;return(c==null?void 0:c.value)==="xs"?(k="space-x-2",g="space-y-1"):(c==null?void 0:c.value)==="sm"?(k="space-x-4",g="space-y-1"):(k="space-x-8",g="space-y-4"),v.push("flex"),i.value==="vertical"||r!=null&&r.value?(v.push(`flex-col ${g} justify-center`),(r==null?void 0:r.value)===j.sm?v.push(`sm:flex-row sm:space-y-0 sm:justify-start sm:${k} sm:items-center`):(r==null?void 0:r.value)===j.md?v.push(`md:flex-row md:space-y-0 md:justify-start md:${k} md:items-center`):(r==null?void 0:r.value)===j.lg?v.push(`lg:flex-row lg:space-y-0 lg:justify-start lg:${k} lg:items-center`):(r==null?void 0:r.value)===j.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(" ")}),b=e.computed(()=>{const v=["flex items-center"];return s!=null&&s.value||v.push("cursor-pointer"),v.join(" ")});return{value:u,isCurrentStep:m,isFinishedStep:f,switchStep:p,getStepDisplayValue:h,listClasses:x,linkClasses:b,orientation:i}}ze(["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 Le=["aria-label"],De=["href","onClick"],Pe={class:"flex space-x-3 items-center text-primary-focus normal font-medium leading-5"},je={class:"shrink-0 h-8 w-8 rounded-full bg-primary-focus text-foreground-on-primary inline-flex items-center justify-center"},Oe={class:"flex flex-col"},Te={key:0,class:"label label--light text-foreground"},Me=["href","onClick"],Ae={class:"flex space-x-3 items-center text-primary-focus normal font-medium leading-5"},Fe={class:"shrink-0 h-8 w-8 rounded-full border-2 border-primary-focus inline-flex items-center justify-center"},Re={class:"flex flex-col"},qe={key:0,class:"label label--light text-foreground"},Ue=["href","onClick"],We={class:"flex space-x-3 items-center text-foreground-disabled normal font-medium leading-5"},He={class:"shrink-0 h-8 w-8 rounded-full border-2 border-foreground-disabled inline-flex items-center justify-center"},Ge={class:"flex flex-col"},Ke={key:0,class:"label label--light"},Xe=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:o}){const n=t,{isCurrentStep:l,isFinishedStep:r,switchStep:s,getStepDisplayValue:c,listClasses:a,linkClasses:i}=ne({props:e.toRefs(n),emit:o});return(u,h)=>(e.openBlock(),e.createElementBlock("nav",{class:"flex justify-center","aria-label":t.ariaLabel||"Progress steps"},[e.createElementVNode("ol",{class:e.normalizeClass(e.unref(a))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.steps,(m,f)=>(e.openBlock(),e.createElementBlock("li",{key:m.name},[e.unref(r)(f)?(e.openBlock(),e.createElementBlock("a",{key:0,href:m.href,class:e.normalizeClass(e.unref(i)),onClick:p=>e.unref(s)(f,p)},[e.createElementVNode("div",Pe,[e.createElementVNode("div",je,[e.createVNode(e.unref(_.CheckIcon),{class:"w-5 h-5"})]),e.createElementVNode("div",Oe,[e.createElementVNode("div",null,e.toDisplayString(m.name),1),m.description?(e.openBlock(),e.createElementBlock("div",Te,e.toDisplayString(m.description),1)):e.createCommentVNode("",!0)])])],10,De)):e.unref(l)(f)?(e.openBlock(),e.createElementBlock("a",{key:1,href:m.href,class:e.normalizeClass(e.unref(i)),"aria-current":"step",onClick:p=>e.unref(s)(f,p)},[e.createElementVNode("div",Ae,[e.createElementVNode("div",Fe,e.toDisplayString(e.unref(c)(f)),1),e.createElementVNode("div",Re,[e.createElementVNode("div",null,e.toDisplayString(m.name),1),m.description?(e.openBlock(),e.createElementBlock("div",qe,e.toDisplayString(m.description),1)):e.createCommentVNode("",!0)])])],10,Me)):(e.openBlock(),e.createElementBlock("a",{key:2,href:m.href,class:e.normalizeClass(e.unref(i)),onClick:p=>e.unref(s)(f,p)},[e.createElementVNode("div",We,[e.createElementVNode("div",He,e.toDisplayString(e.unref(c)(f)),1),e.createElementVNode("div",Ge,[e.createElementVNode("div",null,e.toDisplayString(m.name),1),m.description?(e.openBlock(),e.createElementBlock("div",Ke,e.toDisplayString(m.description),1)):e.createCommentVNode("",!0)])])],10,Ue))]))),128))],2)],8,Le))}}),Je=["aria-label"],Qe=["href","onClick"],Ye={class:"relative flex h-5 w-5 flex-shrink-0 items-center justify-center"},Ze={key:0,class:"h-3 w-3 rounded-full bg-foreground-2"},et=["href","onClick"],tt={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"},ot=e.createElementVNode("span",{class:"absolute h-4 w-4 rounded-full bg-outline-2"},null,-1),lt=e.createElementVNode("span",{class:"relative block h-2 w-2 rounded-full bg-primary-focus"},null,-1),rt=["href","onClick"],st={class:"relative flex h-5 w-5 flex-shrink-0 items-center justify-center","aria-hidden":"true"},at={key:0,class:"h-3 w-3 rounded-full bg-foreground-2"},it={key:1,class:"h-4 w-4 rounded-full bg-foreground-disabled"},ct=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:o}){const n=t,{isCurrentStep:l,isFinishedStep:r,switchStep:s,listClasses:c,linkClasses:a}=ne({props:e.toRefs(n),emit:o}),i=e.computed(()=>{const h=["h6 font-medium leading-7"];let m;return n.stepsPadding==="xs"?m="ml-1":n.stepsPadding==="sm"?m="ml-2":m="ml-3",h.push(m),n.basic&&h.push("sr-only"),h.join(" ")}),u=e.computed(()=>{const h=[];return n.basic&&h.push("basic"),h.join(" ")});return(h,m)=>(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.unref(u)])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.steps,(f,p)=>(e.openBlock(),e.createElementBlock("li",{key:f.name},[e.unref(r)(p)?(e.openBlock(),e.createElementBlock("a",{key:0,href:f.href,class:e.normalizeClass(e.unref(a)),onClick:x=>e.unref(s)(p,x)},[e.createElementVNode("span",Ye,[t.basic?(e.openBlock(),e.createElementBlock("span",Ze)):(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",e.unref(i)])},e.toDisplayString(f.name),3)],10,Qe)):e.unref(l)(p)?(e.openBlock(),e.createElementBlock("a",{key:1,href:f.href,class:e.normalizeClass(e.unref(a)),"aria-current":"step",onClick:x=>e.unref(s)(p,x)},[e.createElementVNode("span",tt,[t.basic?(e.openBlock(),e.createElementBlock("span",nt)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[ot,lt],64))]),e.createElementVNode("span",{class:e.normalizeClass(["text-primary-focus",e.unref(i)])},e.toDisplayString(f.name),3)],10,et)):(e.openBlock(),e.createElementBlock("a",{key:2,href:f.href,class:e.normalizeClass(e.unref(a)),onClick:x=>e.unref(s)(p,x)},[e.createElementVNode("div",st,[t.basic?(e.openBlock(),e.createElementBlock("span",at)):(e.openBlock(),e.createElementBlock("div",it))]),e.createElementVNode("p",{class:e.normalizeClass(["text-foreground-disabled",e.unref(i)])},e.toDisplayString(f.name),3)],10,rt))]))),128))],2)],8,Je))}}),ut=["disabled"],dt=e.defineComponent({__name:"CardButton",props:{disabled:{type:Boolean},modelValue:{type:Boolean}},emits:["update:modelValue","click"],setup(t,{emit:o}){const n=t,l=e.computed(()=>{const s=["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?s.push("bg-foundation-disabled text-foreground-2 cursor-not-allowed"):(s.push(n.modelValue?"bg-primary-focus text-foreground-on-primary":"bg-foundation text-foreground"),s.push("ring-outline-2 hover:ring-4")),s.join(" ")}),r=s=>{if(n.disabled){s.preventDefault(),s.stopPropagation(),s.stopImmediatePropagation();return}o("update:modelValue",!n.modelValue),o("click",s)};return(s,c)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(e.unref(l)),disabled:t.disabled,onClick:r},[e.renderSlot(s.$slots,"default",{},()=>[e.createTextVNode("Text")])],10,ut))}}),ft={class:"relative flex items-start"},mt={class:"flex h-6 items-center"},pt=["id","checked","aria-describedby","name","value","disabled"],ht={class:"ml-2 text-sm",style:{"padding-top":"2px"}},gt=["for"],yt={key:0,class:"text-danger ml-1"},kt=["id"],vt=e.defineComponent({inheritAttrs:!1}),xt=e.defineComponent({...vt,__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 o=t,n=b=>`${b}-${W.nanoid()}`,l=e.computed(()=>o.value||o.name),{checked:r,errorMessage:s,handleChange:c}=U.useField(o.name,o.rules,{validateOnMount:o.validateOnMount,type:"checkbox",checkedValue:l,initialValue:o.modelValue||void 0}),a=b=>{o.disabled||c(b)},i=e.computed(()=>o.label||o.name),u=e.computed(()=>s.value?"border-danger-lighter":"border-foreground-4 "),h=e.computed(()=>o.description||s.value),m=e.computed(()=>`${o.name}-description`),f=e.computed(()=>{const b=[];return o.inlineDescription?b.push("inline ml-2"):b.push("block"),s.value?b.push("text-danger"):b.push("text-foreground-2"),b.join(" ")}),p=e.ref(n("checkbox")),x=e.computed(()=>o.id||p.value);return(b,v)=>(e.openBlock(),e.createElementBlock("div",ft,[e.createElementVNode("div",mt,[e.createElementVNode("input",e.mergeProps({id:e.unref(x),checked:e.unref(r),"aria-describedby":e.unref(m),name:t.name,value:e.unref(l),disabled:t.disabled,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",e.unref(u)]},b.$attrs,{onChange:a}),null,16,pt)]),e.createElementVNode("div",ht,[e.createElementVNode("label",{for:e.unref(x),class:e.normalizeClass(["font-medium text-foreground",{"sr-only":t.hideLabel}])},[e.createElementVNode("span",null,e.toDisplayString(e.unref(i)),1),t.showRequired?(e.openBlock(),e.createElementBlock("span",yt,"*")):e.createCommentVNode("",!0)],10,gt),e.unref(h)?(e.openBlock(),e.createElementBlock("p",{key:0,id:e.unref(m),class:e.normalizeClass(e.unref(f))},e.toDisplayString(e.unref(h)),11,kt)):e.createCommentVNode("",!0)])]))}});function oe(t){const{props:o,inputEl:n,emit:l}=t,{value:r,errorMessage:s}=U.useField(o.name,o.rules,{validateOnMount:e.unref(o.validateOnMount),validateOnValueUpdate:e.unref(o.validateOnValueUpdate),initialValue:e.unref(o.modelValue)||void 0}),c=e.computed(()=>{const g=["block label text-foreground-2 mb-2"];return e.unref(o.showLabel)||g.push("sr-only"),g.join(" ")}),a=e.computed(()=>{const g=["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 s.value?g.push("border-2 border-danger text-danger-darker focus:border-danger focus:ring-danger"):g.push("border-0 focus:ring-2 focus:ring-outline-2"),e.unref(o.color)==="foundation"?g.push("bg-foundation shadow-sm hover:shadow"):g.push("bg-foundation-page"),g.join(" ")}),i=e.ref(W.nanoid()),u=e.computed(()=>e.unref(o.label)||e.unref(o.name)),h=e.computed(()=>{const g=s.value;return!g||!e.unref(o.useLabelInErrors)?g:g.replace("Value",u.value)}),m=e.computed(()=>h.value&&e.unref(o.hideErrorMessage)),f=e.computed(()=>h.value||e.unref(o.help)),p=e.computed(()=>!!f.value),x=e.computed(()=>p.value?`${e.unref(o.name)}-${i.value}`:void 0),b=e.computed(()=>{const g=["mt-2 text-sm"];return g.push(s.value?"text-danger":"text-foreground-2"),g.join(" ")}),v=()=>{var g;(g=n.value)==null||g.focus()},k=()=>{r.value="",l("change",{value:""}),l("clear")};return e.onMounted(()=>{e.unref(o.autoFocus)&&v()}),{coreClasses:a,title:u,value:r,helpTipId:x,helpTipClasses:b,helpTip:f,hideHelpTip:m,errorMessage:h,clear:k,focus:v,labelClasses:c}}const bt=["for"],Ct={class:"relative"},Bt=["id","name","placeholder","disabled","aria-invalid","aria-describedby"],wt=e.createElementVNode("span",{class:"text-xs sr-only"},"Clear input",-1),Vt={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"},Et=["id"],Nt=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:o,emit:n}){const l=t,r=e.ref(null),{coreClasses:s,title:c,value:a,helpTipId:i,helpTipClasses:u,helpTip:h,errorMessage:m,labelClasses:f,clear:p,focus:x}=oe({props:e.toRefs(l),emit:n,inputEl:r}),b=e.computed(()=>{const v=["pl-2"];return l.showClear&&m.value?v.push("pr-12"):(l.showClear||m.value)&&v.push("pr-8"),v.join(" ")});return o({focus:x}),(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(f))},[e.createElementVNode("span",null,e.toDisplayString(e.unref(c)),1)],10,bt),e.createElementVNode("div",Ct,[e.withDirectives(e.createElementVNode("textarea",e.mergeProps({id:t.name,ref_key:"inputElement",ref:r,"onUpdate:modelValue":k[0]||(k[0]=g=>e.isRef(a)?a.value=g:null),name:t.name,class:[e.unref(s),e.unref(b),"min-h-[4rem]"],placeholder:t.placeholder,disabled:t.disabled,"aria-invalid":e.unref(m)?"true":"false","aria-describedby":e.unref(i)},v.$attrs,{onChange:k[1]||(k[1]=g=>v.$emit("change",{event:g,value:e.unref(a)})),onInput:k[2]||(k[2]=g=>v.$emit("input",{event:g,value:e.unref(a)}))}),null,16,Bt),[[e.vModelText,e.unref(a)]]),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]=(...g)=>e.unref(p)&&e.unref(p)(...g)),onKeydown:k[4]||(k[4]=(...g)=>e.unref(p)&&e.unref(p)(...g))},[wt,e.createVNode(e.unref(_.XMarkIcon),{class:"h-5 w-5 text-foreground","aria-hidden":"true"})],32)):e.createCommentVNode("",!0),e.unref(m)?(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(m)?(e.openBlock(),e.createElementBlock("div",Vt," * ")):e.createCommentVNode("",!0)]),e.unref(i)?(e.openBlock(),e.createElementBlock("p",{key:0,id:e.unref(i),class:e.normalizeClass(e.unref(u))},e.toDisplayString(e.unref(h)),11,Et)):e.createCommentVNode("",!0)],2))}}),St=["for"],$t={class:"relative"},_t={key:0,class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2"},It=["id","type","name","placeholder","disabled","aria-invalid","aria-describedby"],zt=e.createElementVNode("span",{class:"text-xs sr-only"},"Clear input",-1),Lt={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"},Dt=["id"],Pt=e.defineComponent({inheritAttrs:!1}),jt=e.defineComponent({...Pt,__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:o,emit:n}){const l=t,r=e.useSlots(),s=e.ref(null),{coreClasses:c,title:a,value:i,helpTipId:u,helpTipClasses:h,helpTip:m,hideHelpTip:f,errorMessage:p,clear:x,focus:b,labelClasses:v}=oe({props:e.toRefs(l),emit:n,inputEl:s}),k=e.computed(()=>{const B=["h-5 w-5"];return p.value?B.push("text-danger"):B.push("text-foreground-2"),B.join(" ")}),g=e.computed(()=>["email","password"].includes(l.type)||l.customIcon),$=e.computed(()=>{const B=[];return g.value?B.push("pl-8"):B.push("pl-2"),r["input-right"]||(p.value||l.showClear)&&(p.value&&l.showClear?B.push("pr-12"):B.push("pr-8")),B.join(" ")}),d=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 o({focus:b}),(B,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(a)),1)],10,St),e.createElementVNode("div",$t,[e.unref(g)?(e.openBlock(),e.createElementBlock("div",_t,[t.customIcon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.customIcon),{key:0,class:e.normalizeClass(e.unref(k)),"aria-hidden":"true"},null,8,["class"])):t.type==="email"?(e.openBlock(),e.createBlock(e.unref(_.EnvelopeIcon),{key:1,class:e.normalizeClass(e.unref(k)),"aria-hidden":"true"},null,8,["class"])):t.type==="password"?(e.openBlock(),e.createBlock(e.unref(_.KeyIcon),{key:2,class:e.normalizeClass(e.unref(k)),"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:s,"onUpdate:modelValue":N[0]||(N[0]=w=>e.isRef(i)?i.value=w:null),type:t.type,name:t.name,class:[e.unref(c),e.unref($),e.unref(d),t.inputClasses||""],placeholder:t.placeholder,disabled:t.disabled,"aria-invalid":e.unref(p)?"true":"false","aria-describedby":e.unref(u),role:"textbox"},B.$attrs,{onChange:N[1]||(N[1]=w=>B.$emit("change",{event:w,value:e.unref(i)})),onInput:N[2]||(N[2]=w=>B.$emit("input",{event:w,value:e.unref(i)}))}),null,16,It),[[e.vModelDynamic,e.unref(i)]]),e.renderSlot(B.$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]=(...w)=>e.unref(x)&&e.unref(x)(...w)),onKeydown:N[4]||(N[4]=(...w)=>e.unref(x)&&e.unref(x)(...w))},[zt,e.createVNode(e.unref(_.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-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(p)?(e.openBlock(),e.createElementBlock("div",Lt," * ")):e.createCommentVNode("",!0)])]),e.unref(u)&&!e.unref(f)?(e.openBlock(),e.createElementBlock("p",{key:0,id:e.unref(u),class:e.normalizeClass(e.unref(h))},e.toDisplayString(e.unref(m)),11,Dt)):e.createCommentVNode("",!0)],2))}}),Ot=/^https?:\/\//,H=/^[\w-_.+]+@[\w-_.+]+$/,Tt=t=>(t||"").match(H)?!0:"Value should be a valid e-mail address",Mt=t=>(t||"").split(",").map(l=>l.trim()).every(l=>l.match(H))||"Value should be one or multiple comma-delimited e-mail addresses",At=t=>(C.isString(t)&&(t=t.trim()),t?!0:"Value is required"),Ft=(t,o)=>(n,l)=>n===l.form[t]?!0:`Value must be the same as in field '${o||t}'`,Rt=t=>o=>{const{minLength:n,maxLength:l}=t;return o=T.isNullOrUndefined(o)?"":o,C.isString(o)?!C.isUndefined(n)&&o.length<n?`Value needs to be at least ${n} characters long`:!C.isUndefined(l)&&o.length>l?`Value needs to be no more than ${l} characters long`:!0:"Value should be a text string"},qt=t=>o=>{const{match:n,message:l}=t;return C.isString(o)?n?C.isString(n)?o.includes(n)?!0:l:n.test(o)?!0:l:!0:"Value should be a text string"},Ut=Object.freeze(Object.defineProperty({__proto__:null,VALID_EMAIL:H,VALID_HTTP_URL:Ot,isEmail:Tt,isOneOrMultipleEmails:Mt,isRequired:At,isSameAs:Ft,isStringOfLength:Rt,stringContains:qt},Symbol.toStringTag,{value:"Module"}));function le(t){const{skipCalculation:o,elementToWatchForChanges:n,itemContainer:l,trackResize:r=!1,trackMutations:s=!0}=t||{},c=e.ref(0),a=()=>{const i=l.value;if(o!=null&&o.value||!i)return;const u=i.children;let h=0,m=0,f;for(const p of u){const x=p.offsetTop;C.isUndefined(f)?(f=x,h+=1):x===f&&(h+=1),m+=1}c.value=m-h};return r&&M.useResizeObserver(n,a),s&&M.useMutationObserver(n,a,{childList:!0,subtree:!0}),{hiddenItemCount:c}}function re(t){const{props:o,emit:n,dynamicVisibility:l}=t;let r;if(l){const{elementToWatchForChanges:u,itemContainer:h}=l;r=le({skipCalculation:e.computed(()=>{var f;return!((f=o.multiple)!=null&&f.value)}),elementToWatchForChanges:u,itemContainer:h}).hiddenItemCount}else r=e.ref(0);const s=e.computed({get:()=>{var h,m;const u=(h=o.modelValue)==null?void 0:h.value;return(m=o.multiple)!=null&&m.value?C.isArray(u)?u:[]:C.isArray(u)?void 0:u},set:u=>{var h,m,f;if((h=o.multiple)!=null&&h.value&&!C.isArray(u)){console.warn("Attempting to set non-array value in selector w/ multiple=true");return}else if(!((m=o.multiple)!=null&&m.value)&&C.isArray(u)){console.warn("Attempting to set array value in selector w/ multiple=false");return}n("update:modelValue",(f=o.multiple)!=null&&f.value?u||[]:u)}}),c=u=>C.isArray(u);return{selectedValue:s,hiddenSelectedItemCount:r,isArrayValue:c,isMultiItemArrayValue:u=>C.isArray(u)&&u.length>1,firstItem:u=>c(u)?u[0]:u}}const Wt=t=>(e.pushScopeId("data-v-60cf597b"),t=t(),e.popScopeId(),t),Ht=Wt(()=>e.createElementVNode("div",{class:"swoosher relative top-0 bg-blue-500/50"},null,-1)),Gt=[Ht],Kt=e.defineComponent({__name:"Bar",props:{loading:{type:Boolean}},setup(t){return(o,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"])},Gt,2))}});const G=Z(Kt,[["__scopeId","data-v-60cf597b"]]),Xt={class:"flex items-center justify-between w-full"},Jt={class:"block truncate grow text-left"},Qt={class:"pointer-events-none shrink-0 ml-1 flex items-center"},Yt=["disabled"],Zt={key:0,class:"flex flex-col mx-1 mb-1"},en=e.createElementVNode("span",{class:"sr-only label text-foreground"},"Search",-1),tn={class:"relative"},nn={class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2"},on=["placeholder"],ln={key:0,class:"px-1"},rn={key:1},sn=e.createElementVNode("div",{class:"text-foreground-2 text-center"},"Nothing found 🤷♂️",-1),an={class:e.normalizeClass(["block truncate"])},cn=["id"],se=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},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}},emits:["update:modelValue"],setup(t){const o=t,{value:n,errorMessage:l}=U.useField(o.name,o.rules,{validateOnMount:o.validateOnMount,validateOnValueUpdate:o.validateOnValueUpdate,initialValue:o.modelValue}),r=e.ref(null),s=e.ref(""),c=e.ref([]),a=e.ref(!1),i=e.ref(W.nanoid()),u=e.computed(()=>e.unref(o.label)||e.unref(o.name)),h=e.computed(()=>{const y=l.value;return!y||!e.unref(o.useLabelInErrors)?y:y.replace("Value",u.value)}),m=e.computed(()=>h.value||e.unref(o.help)),f=e.computed(()=>!!m.value),p=e.computed(()=>f.value?`${e.unref(o.name)}-${i.value}`:void 0),x=e.computed(()=>l.value?"text-danger":"text-foreground-2"),b=e.computed(()=>o.buttonStyle!=="simple"&&o.clearable&&!o.disabled),v=e.computed(()=>{const y=["relative flex group",o.showLabel?"mt-1":""];return o.buttonStyle!=="simple"&&(y.push("hover:shadow rounded-md"),y.push("outline outline-2 outline-primary-muted")),o.fixedHeight&&y.push("h-8"),y.join(" ")}),k=e.computed(()=>{const y=[];return o.buttonStyle!=="simple"&&y.push(N.value?"bg-foundation-disabled text-foreground-disabled":""),N.value&&y.push("cursor-not-allowed"),y.join(" ")}),g=e.computed(()=>{const y=["relative z-[1]","flex items-center justify-center text-center shrink-0","rounded-r-md overflow-hidden transition-all",K.value?`w-6 ${k.value}`:"w-0"];return N.value||y.push("bg-primary-muted hover:bg-primary hover:text-foreground-on-primary"),y.join(" ")}),$=e.computed(()=>{const y=["relative z-[2]","normal rounded-md cursor-pointer transition truncate flex-1","flex items-center",k.value];return o.buttonStyle!=="simple"&&(y.push("py-2 px-3"),N.value||y.push("bg-foundation text-foreground")),b.value&&K.value&&y.push("rounded-r-none"),y.join(" ")}),d=e.computed(()=>!!(o.search&&(o.filterPredicate||o.getSearchResults))),B=e.computed(()=>d.value&&o.getSearchResults),N=e.computed(()=>o.disabled||!o.items.length&&!B.value),w=e.computed({get:()=>{const y=n.value;return o.multiple?C.isArray(y)?y:[]:C.isArray(y)?void 0:y},set:y=>{if(o.multiple&&!C.isArray(y)){console.warn("Attempting to set non-array value in selector w/ multiple=true");return}else if(!o.multiple&&C.isArray(y)){console.warn("Attempting to set array value in selector w/ multiple=false");return}if(o.multiple)n.value=y||[];else{const S=n.value,V=o.allowUnset&&S&&y&&q(S)===q(y);n.value=V?void 0:y}}}),K=e.computed(()=>o.multiple?w.value.length!==0:!!w.value),de=()=>{o.multiple?w.value=[]:w.value=void 0},fe=e.computed(()=>{const y=s.value;return!d.value||!(y!=null&&y.length)?c.value:o.filterPredicate?c.value.filter(S=>{var V;return((V=o.filterPredicate)==null?void 0:V.call(o,S,y))||!1}):c.value}),X=y=>JSON.stringify(y),q=y=>o.by?y[o.by]:y,J=async()=>{if(!(!B.value||!o.getSearchResults)){a.value=!0;try{c.value=await o.getSearchResults(s.value)}finally{a.value=!1}}},me=C.debounce(J,1e3);return e.watch(()=>o.items,y=>{c.value=y.slice()},{immediate:!0}),e.watch(s,()=>{B.value&&me()}),e.onMounted(()=>{B.value&&!o.items.length&&J()}),(y,S)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(E.Listbox),{modelValue:e.unref(w),"onUpdate:modelValue":S[4]||(S[4]=V=>e.isRef(w)?w.value=V:null),name:t.name,multiple:t.multiple,by:t.by,disabled:e.unref(N),as:"div"},{default:e.withCtx(()=>[e.createVNode(e.unref(E.ListboxLabel),{class:e.normalizeClass(["block label text-foreground",{"sr-only":!t.showLabel}])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]),_:1},8,["class"]),e.createElementVNode("div",{class:e.normalizeClass(e.unref(v))},[e.createVNode(e.unref(E.ListboxButton),{class:e.normalizeClass(e.unref($))},{default:e.withCtx(({open:V})=>[e.createElementVNode("div",Xt,[e.createElementVNode("div",Jt,[!e.unref(w)||e.unref(C.isArray)(e.unref(w))&&!e.unref(w).length?e.renderSlot(y.$slots,"nothing-selected",{key:0},()=>[e.createTextVNode(e.toDisplayString(t.label),1)]):e.renderSlot(y.$slots,"something-selected",{key:1,value:e.unref(w)},()=>[e.createTextVNode(e.toDisplayString(X(e.unref(w))),1)])]),e.createElementVNode("div",Qt,[V?(e.openBlock(),e.createBlock(e.unref(I.ChevronUpIcon),{key:0,class:"h-4 w-4 text-foreground","aria-hidden":"true"})):(e.openBlock(),e.createBlock(e.unref(I.ChevronDownIcon),{key:1,class:"h-4 w-4 text-foreground","aria-hidden":"true"}))])])]),_:3},8,["class"]),e.unref(b)?e.withDirectives((e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(e.unref(g)),disabled:t.disabled,onClick:S[0]||(S[0]=V=>de())},[e.createVNode(e.unref(I.XMarkIcon),{class:"w-3 h-3"})],10,Yt)),[[e.unref(pe.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:S[3]||(S[3]=V=>{var D;return(D=r.value)==null?void 0:D.focus()})},{default:e.withCtx(()=>[e.unref(d)?(e.openBlock(),e.createElementBlock("label",Zt,[en,e.createElementVNode("div",tn,[e.createElementVNode("div",nn,[e.createVNode(e.unref(I.MagnifyingGlassIcon),{class:"h-5 w-5 text-foreground"})]),e.withDirectives(e.createElementVNode("input",{ref_key:"searchInput",ref:r,"onUpdate:modelValue":S[1]||(S[1]=V=>s.value=V),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:S[2]||(S[2]=e.withModifiers(()=>{},["stop"]))},null,40,on),[[e.vModelText,s.value]])])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["overflow-auto simple-scrollbar",[e.unref(d)?"max-h-52":"max-h-60"]])},[e.unref(B)&&a.value?(e.openBlock(),e.createElementBlock("div",ln,[e.createVNode(G,{loading:!0})])):e.unref(B)&&!c.value.length?(e.openBlock(),e.createElementBlock("div",rn,[e.renderSlot(y.$slots,"nothing-found",{},()=>[sn])])):e.createCommentVNode("",!0),!e.unref(B)||!a.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(e.unref(fe),V=>(e.openBlock(),e.createBlock(e.unref(E.ListboxOption),{key:q(V),value:V},{default:e.withCtx(({active:D,selected:Q})=>[e.createElementVNode("li",{class:e.normalizeClass([D?"text-primary":"text-foreground","relative transition cursor-pointer select-none py-1.5 pl-3",t.hideCheckmarks?"":"pr-9"])},[e.createElementVNode("span",an,[e.renderSlot(y.$slots,"option",{item:V,active:D,selected:Q},()=>[e.createTextVNode(e.toDisplayString(X(V)),1)])]),!t.hideCheckmarks&&Q?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass([D?"text-primary":"text-foreground","absolute inset-y-0 right-0 flex items-center pr-4"])},[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)],2)]),_:3})]),_:3})],2)]),_:3},8,["modelValue","name","multiple","by","disabled"]),e.unref(p)?(e.openBlock(),e.createElementBlock("p",{key:0,id:e.unref(p),class:e.normalizeClass(["mt-2 ml-3 text-sm",e.unref(x)])},e.toDisplayString(e.unref(m)),11,cn)):e.createCommentVNode("",!0)]))}}),ae=e.defineComponent({__name:"SourceAppBadge",props:{sourceApp:null},setup(t){return(o,n)=>(e.openBlock(),e.createBlock(te,{"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"]))}}),un={key:0,class:"text-foreground-2 normal"},dn={key:1,class:"flex items-center"},fn={class:"truncate"},mn={class:"flex items-center"},pn={class:"truncate"},hn=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:o}){const n=t,l=e.ref(null),r=e.ref(null),{selectedValue:s,hiddenSelectedItemCount:c,isMultiItemArrayValue:a,firstItem:i}=re({props:e.toRefs(n),emit:o,dynamicVisibility:{elementToWatchForChanges:l,itemContainer:r}}),u=(h,m)=>h.name.toLocaleLowerCase().includes(m.toLocaleLowerCase());return(h,m)=>(e.openBlock(),e.createBlock(se,{modelValue:e.unref(s),"onUpdate:modelValue":m[0]||(m[0]=f=>e.isRef(s)?s.value=f:null),multiple:t.multiple,items:t.items??e.unref(T.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:f})=>[e.unref(a)(f)?(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:r,class:"flex flex-wrap overflow-hidden space-x-0.5 h-5"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f,p=>(e.openBlock(),e.createBlock(ae,{key:p.name,"source-app":p},null,8,["source-app"]))),128))],512),e.unref(c)>0?(e.openBlock(),e.createElementBlock("div",un," +"+e.toDisplayString(e.unref(c)),1)):e.createCommentVNode("",!0)],512)):(e.openBlock(),e.createElementBlock("div",dn,[e.createElementVNode("div",{class:"h-2 w-2 rounded-full mr-2",style:e.normalizeStyle({backgroundColor:e.unref(i)(f).bgColor})},null,4),e.createElementVNode("span",fn,e.toDisplayString(e.unref(i)(f).name),1)]))]),option:e.withCtx(({item:f})=>[e.createElementVNode("div",mn,[e.createElementVNode("div",{class:"h-2 w-2 rounded-full mr-2",style:e.normalizeStyle({backgroundColor:f.bgColor})},null,4),e.createElementVNode("span",pn,e.toDisplayString(f.name),1)])]),_:1},8,["modelValue","multiple","items","search","search-placeholder","label","show-label","name"]))}});var O=(t=>(t.CtrlOrCmd="cmd-or-ctrl",t.AltOrOpt="alt-or-opt",t.Shift="shift",t))(O||{});const F=T.getClientOperatingSystem(),gn={["cmd-or-ctrl"]:F===T.OperatingSystem.Mac?"Cmd":"Ctrl",["alt-or-opt"]:F===T.OperatingSystem.Mac?"Opt":"Alt",shift:"Shift"};function yn(t){const o=n=>Object.values(O).includes(n);return t.map(n=>o(n)?gn[n]:n).join("+")}function kn(t,...o){M.onKeyDown(o[0],n=>{const l=n.getModifierState("Alt"),r=F===T.OperatingSystem.Mac?n.getModifierState("Meta"):n.getModifierState("Control"),s=n.getModifierState("Shift");for(const c of t)switch(c){case O.CtrlOrCmd:if(!r)return;break;case O.AltOrOpt:if(!l)return;break;case O.Shift:if(!s)return;break}o[1](n)},o[2])}const vn=e.createElementVNode("div",{class:"fixed inset-0 bg-neutral-100/70 dark:bg-neutral-900/70 transition-opacity"},null,-1),xn={class:"fixed inset-0 z-10 overflow-y-auto"},bn={class:"flex min-h-full justify-center p-4 text-center items-center sm:p-0"},Cn={class:"relative"},Bn=e.defineComponent({__name:"Dialog",props:{open:{type:Boolean},maxWidth:null,hideCloser:{type:Boolean},preventCloseOnClickOutside:{type:Boolean}},emits:["update:open","fully-closed"],setup(t,{emit:o}){const n=t,l=e.computed({get:()=>n.open,set:a=>o("update:open",a)}),r=e.computed(()=>{switch(n.maxWidth){case"sm":return 0;case"md":return 1;case"lg":return 2;case"xl":return 3;default:return 1e4}}),s=e.computed(()=>{const a=["px-4 pt-4 pb-4 w-full","sm:my-8 sm:w-full sm:max-w-xl sm:p-6"];return r.value>=1&&a.push("md:max-w-2xl"),r.value>=2&&a.push("lg:max-w-4xl"),r.value>=3&&a.push("xl:max-w-6xl"),r.value>=4&&a.push("2xl:max-w-7xl"),a.join(" ")}),c=()=>{n.preventCloseOnClickOutside||(l.value=!1)};return(a,i)=>(e.openBlock(),e.createBlock(e.unref(E.TransitionRoot),{as:"template",show:e.unref(l)},{default:e.withCtx(()=>[e.createVNode(e.unref(E.Dialog),{as:"div",class:"relative z-40",onClose:c},{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",xn,[e.createElementVNode("div",bn,[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:i[1]||(i[1]=u=>a.$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",e.unref(s)])},{default:e.withCtx(()=>[e.createElementVNode("div",Cn,[e.renderSlot(a.$slots,"default",{},()=>[e.createTextVNode("Put your content here!")]),t.hideCloser?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,class:"absolute top-0 right-0 text-foreground",onClick:i[0]||(i[0]=u=>l.value=!1)},[e.createVNode(e.unref(L.XMarkIcon),{class:"h-6 w-6"})]))])]),_:3},8,["class"])]),_:3})])])]),_:3})]),_:3},8,["show"]))}}),wn={class:"inline-flex items-center space-x-2"},Vn={class:"label-light"},En=e.defineComponent({__name:"Disclosure",props:{title:null,icon:null,color:{default:"default"}},setup(t){const o=t,n=e.computed(()=>{const r=["pr-3 h-10 w-full flex items-center justify-between border-l-2 px-2 rounded transition","ring-1"];switch(o.color){case"danger":r.push("border-danger text-danger ring-danger-lighter hover:ring-danger");break;case"default":default:r.push("border-primary text-primary ring-primary-muted hover:ring-primary");break}return r.join(" ")}),l=e.computed(()=>{const r=["mt-4 px-3 py-1 border-x "];switch(o.color){case"danger":r.push("border-danger-lighter");break;case"default":default:r.push("border-primary-muted");break}return r.join(" ")});return(r,s)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(E.Disclosure),null,{default:e.withCtx(({open:c})=>[e.createVNode(e.unref(E.DisclosureButton),{class:e.normalizeClass(e.unref(n))},{default:e.withCtx(()=>[e.createElementVNode("div",wn,[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(I.ChevronUpIcon),{class:e.normalizeClass([c?"":"rotate-180 transform","h-5 w-5"])},null,8,["class"])]),_:2},1032,["class"]),e.createVNode(e.unref(E.DisclosurePanel),{class:e.normalizeClass(e.unref(l))},{default:e.withCtx(()=>[e.createElementVNode("div",Vn,[e.renderSlot(r.$slots,"default",{},()=>[e.createTextVNode("Panel contents")])])]),_:3},8,["class"])]),_:3})]))}});var z=(t=>(t.Grid="grid",t.List="list",t))(z||{});const Nn=e.defineComponent({__name:"GridListToggle",props:{modelValue:null},emits:["click","update:modelValue"],setup(t,{emit:o}){const n=t,l=e.computed({get:()=>n.modelValue||z.Grid,set:c=>o("update:modelValue",c)}),r=e.computed(()=>l.value===z.Grid?I.Bars3Icon:I.Squares2X2Icon),s=c=>{o("click",c);const a=l.value===z.Grid?z.List:z.Grid;l.value=a};return(c,a)=>(e.openBlock(),e.createElementBlock("button",{class:"flex items-center justify-center rounded bg-foundation h-8 w-8 shadow cursor-pointer text-foreground",onClick:s},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(r)),{class:"h-6 w-6"}))]))}});var ie=(t=>(t[t.Throttle=0]="Throttle",t[t.Debounce=1]="Debounce",t))(ie||{}),R=(t=>(t[t.Left=0]="Left",t[t.Right=1]="Right",t))(R||{});function ce(t,o){if(!M.isClient)return;const{wait:n=100,throttleOrDebounce:l=0}=o||{},r=n?l===0?C.throttle(t,n):C.debounce(t,n):t;e.onMounted(()=>window.addEventListener("resize",r)),e.onBeforeUnmount(()=>window.removeEventListener("resize",r))}function Sn(t){e.onMounted(()=>{window.addEventListener("beforeunload",t)}),e.onBeforeUnmount(()=>{window.removeEventListener("beforeunload",t)})}function ue(t){const{el:o,defaultDirection:n}=t,l=e.ref(C.isUndefined(n)?1:n),r=e.computed(()=>{const c=e.unref(t.stopUpdatesBelowWidth);if(!C.isUndefined(c))return c;const a=e.unref(o);return a!=null&&a.offsetWidth?a.offsetWidth*2:void 0}),s=()=>{if(!M.isClient)return;const c=e.unref(o);if(!c)return;const a=c.getBoundingClientRect(),i=a.x+a.width>window.innerWidth,u=a.x<0;i&&u||!C.isUndefined(r.value)&&window.innerWidth<r.value||(i?l.value=0:u&&(l.value=1))};return ce(()=>s()),e.watch(()=>e.unref(o),c=>{c&&s()}),{direction:e.computed(()=>l.value),recalculateDirection:s}}const $n=["onClick"],_n=e.defineComponent({__name:"Menu",props:{open:{type:Boolean},items:null},emits:["update:open","chosen"],setup(t,{emit:o}){const n=t,l=e.ref(null),{direction:r}=ue({el:e.computed(()=>{var f;return((f=l.value)==null?void 0:f.el)||null}),defaultDirection:R.Left,stopUpdatesBelowWidth:300}),s=e.ref(null),c=e.ref(!1),a=e.computed({get:()=>n.open||!1,set:f=>o("update:open",f)}),i=f=>{const{active:p,disabled:x}=f,b=["group flex w-full items-center rounded-md px-2 py-2 text-sm"];return p?b.push("bg-primary text-foreground-on-primary"):x?b.push("text-foreground-disabled"):b.push("text-foreground"),b.join(" ")},u=(f,p)=>{o("chosen",{item:f,event:p})},h=()=>{var f;return(f=s.value)==null?void 0:f.el.click()},m=f=>{const p=!!f;return c.value=p,p};return e.watch(c,(f,p)=>{f!==p&&(a.value=f)}),e.watch(a,f=>{(f&&!c.value||!f&&c.value)&&h()}),(f,p)=>(e.openBlock(),e.createBlock(e.unref(E.Menu),{as:"div",class:"relative inline-block"},{default:e.withCtx(({open:x})=>[e.createElementVNode("div",null,[e.createVNode(e.unref(E.MenuButton),{ref_key:"menuButton",ref:s,class:"hidden",onClick:p[0]||(p[0]=e.withModifiers(()=>{},["stop","prevent"]))},null,512),e.createElementVNode("div",{class:e.normalizeClass(x?"pointer-events-none":"")},[e.renderSlot(f.$slots,"default",{toggle:h,open:m(x)})],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: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(r)===e.unref(R).Left?"right-0":""])},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(b,v)=>(e.openBlock(),e.createElementBlock("div",{key:v,class:"px-1 py-1"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b,k=>(e.openBlock(),e.createBlock(e.unref(E.MenuItem),{key:k.id,disabled:k.disabled},{default:e.withCtx(({active:g,disabled:$})=>[e.createElementVNode("button",{class:e.normalizeClass(i({active:g,disabled:$})),onClick:d=>u(k,d)},[e.renderSlot(f.$slots,"item",{item:k},()=>[e.createTextVNode(e.toDisplayString(k.title),1)])],10,$n)]),_:2},1032,["disabled"]))),128))]))),128))]),_:3},8,["class"])]),_:3})]),_:3}))}}),In={class:"flex flex-col space-y-4"},zn={class:"flex space-x-6"},Ln=e.defineComponent({__name:"Tabs",props:{items:null},setup(t){const o=t,n=e.ref(null),l=e.computed(()=>n.value&&o.items.find(s=>s.id===n.value)||o.items[0]),r=s=>{n.value=s.id};return(s,c)=>(e.openBlock(),e.createElementBlock("div",In,[e.createElementVNode("div",zn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,a=>(e.openBlock(),e.createBlock(A,{key:a.id,link:"",color:e.unref(l).id===a.id?"default":"secondary",onClick:i=>r(a)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.title),1)]),_:2},1032,["color","onClick"]))),128))]),e.renderSlot(s.$slots,"default",{activeItem:e.unref(l)})]))}}),Dn={class:"w-full flex flex-col items-center my-2 space-y-2 mt-4"},Pn={class:"inline-flex items-center space-x-1"},jn=e.createElementVNode("span",{class:"text-foreground-2"},"That's it, you've loaded everything!",-1),On={class:"w-full flex flex-col items-center my-2 space-y-2 mt-4"},Tn={class:"inline-flex items-center space-x-1"},Mn=e.createElementVNode("span",{class:"text-foreground-2"},"An error occurred while loading",-1),An=e.defineComponent({__name:"InfiniteLoading",props:{settings:null,allowRetry:{type:Boolean}},emits:["infinite"],setup(t){const o=e.ref(null),n=e.ref(!1);return M.isClient&&e.onMounted(()=>{const l=setInterval(()=>{var r;(r=o.value)!=null&&r.isConnected&&(n.value=!0,clearInterval(l))},200)}),(l,r)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:o},[n.value?(e.openBlock(),e.createBlock(e.unref(he),e.mergeProps({key:0},l.$props.settings||{},{onInfinite:r[0]||(r[0]=s=>l.$emit("infinite",s))}),{spinner:e.withCtx(()=>[e.createVNode(G,{loading:!0,class:"my-2"})]),complete:e.withCtx(()=>[e.createElementVNode("div",Dn,[e.createElementVNode("div",Pn,[e.createVNode(e.unref(L.CheckIcon),{class:"w-5 h-5 text-success"}),jn])])]),error:e.withCtx(({retry:s})=>[e.createElementVNode("div",On,[e.createElementVNode("div",Tn,[e.createVNode(e.unref(L.ExclamationTriangleIcon),{class:"w-5 h-5 text-danger"}),Mn]),t.allowRetry?(e.openBlock(),e.createBlock(A,{key:0,onClick:s},{default:e.withCtx(()=>[e.createTextVNode("Retry")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)])]),_:1},16)):e.createCommentVNode("",!0)],512))}}),Fn={class:"relative group"},Rn={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"},qn=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}},emits:["submit"],setup(t,{emit:o}){const n=t,l=e.computed(()=>n.customPadding?"":"px-4 py-4 sm:px-6"),r=e.computed(()=>n.customPadding?"":"px-4 py-4 sm:p-6"),s=e.computed(()=>{const c=["rounded-lg"];return n.noShadow||c.push("shadow"),n.ring&&c.push("ring-outline-2 hover:ring-2"),c.join(" ")});return(c,a)=>(e.openBlock(),e.createElementBlock("div",Fn,[t.fancyGlow?(e.openBlock(),e.createElementBlock("div",Rn)):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",e.unref(s)]),onSubmit:a[0]||(a[0]=i=>o("submit",i))},{default:e.withCtx(()=>[c.$slots.header?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(l))},[e.renderSlot(c.$slots,"header")],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["grow",e.unref(r)])},[e.renderSlot(c.$slots,"default")],2),c.$slots.footer?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(l))},[e.renderSlot(c.$slots,"footer")],2)):e.createCommentVNode("",!0)]),_:3},40,["class"]))]))}}),Un={class:"flex-shrink-0"},Wn={key:0,class:"mt-2 text-sm"},Hn=e.createElementVNode("span",{class:"sr-only"},"Dismiss",-1),Gn=e.defineComponent({__name:"Alert",props:{color:{default:"success"},withDismiss:{type:Boolean},actions:null},emits:["dismiss"],setup(t){const o=t,n=e.useSlots(),l=e.computed(()=>!!n.description),r=e.computed(()=>{const i=[];switch(i.push(l.value?"p-4":"p-2"),o.color){case"success":i.push("bg-success-lighter border-l-4 border-success");break;case"info":i.push("bg-info-lighter border-l-4 border-info");break;case"danger":i.push("bg-danger-lighter border-l-4 border-danger");break;case"warning":i.push("bg-warning-lighter border-l-4 border-warning");break}return i.join(" ")}),s=e.computed(()=>{const i=[];switch(o.color){case"success":i.push("text-success-darker");break;case"info":i.push("text-info-darker");break;case"danger":i.push("text-danger-darker");break;case"warning":i.push("text-warning-darker");break}return i.join(" ")}),c=e.computed(()=>{const i=[];switch(o.color){case"success":i.push("text-success");break;case"info":i.push("text-info");break;case"danger":i.push("text-danger");break;case"warning":i.push("text-warning");break}return i.join(" ")}),a=e.computed(()=>{const i=[];switch(o.color){case"success":i.push("bg-success-lighter ring-success");break;case"info":i.push("bg-info-lighter ring-info");break;case"danger":i.push("bg-danger-lighter ring-danger");break;case"warning":i.push("bg-warning-lighter ring-warning");break}return i.join(" ")});return(i,u)=>{var h;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["rounded-md",[e.unref(r),e.unref(s)]])},[e.createElementVNode("div",{class:e.normalizeClass(["flex",[e.unref(l)?"":"items-center space-x-2"]])},[e.createElementVNode("div",Un,[e.createVNode(e.unref(_.CheckCircleIcon),{class:e.normalizeClass(["h-5 w-5",e.unref(c)]),"aria-hidden":"true"},null,8,["class"])]),e.createElementVNode("div",{class:e.normalizeClass(["ml-3 grow",[e.unref(l)?"":"flex items-center space-x-2"]])},[e.createElementVNode("h3",{class:e.normalizeClass(["text-sm",[e.unref(l)?"font-medium":""]])},[e.renderSlot(i.$slots,"title",{},()=>[e.createTextVNode("Title")])],2),e.unref(l)?(e.openBlock(),e.createElementBlock("div",Wn,[e.renderSlot(i.$slots,"description",{},()=>[e.createTextVNode(" Lorem ipsum dolor sit amet consectetur adipisicing elit. Aliquid pariatur, ipsum similique veniam. ")])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass([e.unref(l)?(h=t.actions)!=null&&h.length?"mt-4":"":"grow flex"])},[e.createElementVNode("div",{class:e.normalizeClass(["flex",["space-x-2",e.unref(l)?"":"grow justify-end"]])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.actions||[],(m,f)=>(e.openBlock(),e.createBlock(A,{key:f,color:t.color,size:"sm",to:m.url,external:m.externalUrl||!1,onClick:p=>m.onClick||e.unref(C.noop)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.title),1)]),_:2},1032,["color","to","external","onClick"]))),128))],2)],2)],2),t.withDismiss?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["flex",[e.unref(l)?"items-start":"items-center"]])},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["inline-flex rounded-md focus:outline-none focus:ring-2",e.unref(a)]),onClick:u[0]||(u[0]=m=>i.$emit("dismiss"))},[Hn,e.createVNode(e.unref(_.XMarkIcon),{class:"h-5 w-5","aria-hidden":"true"})],2)],2)):e.createCommentVNode("",!0)],2)],2)}}});exports.CommonAlert=Gn;exports.CommonBadge=te;exports.CommonLoadingBar=G;exports.CommonStepsBullet=ct;exports.CommonStepsNumber=Xe;exports.CommonTextLink=ee;exports.FormButton=A;exports.FormCardButton=dt;exports.FormCheckbox=xt;exports.FormSelectBase=se;exports.FormSelectSourceApps=hn;exports.FormTextArea=Nt;exports.FormTextInput=jt;exports.GlobalToastRenderer=$e;exports.GridListToggleValue=z;exports.HorizontalDirection=R;exports.InfiniteLoading=An;exports.LayoutDialog=Bn;exports.LayoutDisclosure=En;exports.LayoutGridListToggle=Nn;exports.LayoutMenu=_n;exports.LayoutPanel=qn;exports.LayoutTabs=Ln;exports.ModifierKeys=O;exports.SourceAppBadge=ae;exports.TailwindBreakpoints=j;exports.ThrottleOrDebounce=ie;exports.ToastNotificationType=P;exports.ValidationHelpers=Ut;exports.clientOs=F;exports.getKeyboardShortcutTitle=yn;exports.onKeyboardShortcut=kn;exports.useFormSelectChildInternals=re;exports.useOnBeforeWindowUnload=Sn;exports.useResponsiveHorizontalDirectionCalculation=ue;exports.useWindowResizeHandler=ce;exports.useWrappingContainerHiddenCount=le;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),C=require("lodash"),z=require("@heroicons/vue/24/solid"),D=require("@heroicons/vue/24/outline"),I=require("@heroicons/vue/20/solid"),H=require("vee-validate"),G=require("nanoid"),M=require("@speckle/shared"),A=require("@vueuse/core"),E=require("@headlessui/vue"),he=require("vue-tippy"),ge=require("v3-infinite-loading");const ye={key:2,style:{margin:"0 !important",width:"0.01px"}},ke=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:o}){const n=t,l=e.resolveDynamicComponent("NuxtLink"),r=e.resolveDynamicComponent("RouterLink"),i=e.computed(()=>n.linkComponent?n.linkComponent:n.external?"a":C.isObjectLike(l)?l:C.isObjectLike(r)?r:"a"),c=e.computed(()=>{if(!n.to)return n.submit?"submit":"button"}),a=e.computed(()=>n.disabled||n.loading),s=e.computed(()=>n.loading?z.ArrowPathIcon:n.iconLeft),u=e.computed(()=>{const f=[];if(f.push("border-2"),a.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(" ")}),g=e.computed(()=>{const f=[];if(!n.text&&!n.link)if(a.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 a.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(" ")}),m=e.computed(()=>{const f=[];return f.push(n.rounded?"rounded-full":"rounded-md"),f.join(" ")}),d=e.computed(()=>{const f=[];if(!a.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(" ")}),h=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"}}),x=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"}}),b=e.computed(()=>{const f=[];return n.fullWidth&&f.push("w-full"),a.value&&f.push("cursor-not-allowed"),f.join(" ")}),v=e.computed(()=>{const f=[];return!a.value&&!n.link&&!n.text&&f.push("active:scale-[0.97]"),!a.value&&n.link&&f.push("underline decoration-transparent decoration-2 underline-offset-4 hover:decoration-inherit"),f.join(" ")}),k=e.computed(()=>{const f=n.link||n.text;return["transition inline-flex justify-center items-center space-x-2 outline-none select-none",b.value,h.value,g.value,f?"":u.value,f?"":m.value,f?"":d.value,n.link?"":x.value,v.value].join(" ")}),y=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(" ")}),_=f=>{if(a.value){f.preventDefault(),f.stopPropagation(),f.stopImmediatePropagation();return}o("click",f)};return(f,B)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.to?e.unref(i):"button"),{href:t.to,to:t.to,type:e.unref(c),external:t.external,class:e.normalizeClass(e.unref(k)),disabled:e.unref(a),role:"button",onClick:_},{default:e.withCtx(()=>[e.unref(s)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(s)),{key:0,class:e.normalizeClass(`${e.unref(y)} ${t.hideText?"":"mr-2"}`)},null,8,["class"])):e.createCommentVNode("",!0),t.hideText?(e.openBlock(),e.createElementBlock("div",ye," ")):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(`${e.unref(y)} ${t.hideText?"":"ml-2"}`)},null,8,["class"])):e.createCommentVNode("",!0)]),_:3},8,["href","to","type","external","class","disabled"]))}});const ee=(t,o)=>{const n=t.__vccOpts||t;for(const[l,r]of o)n[l]=r;return n},F=ee(ke,[["__scopeId","data-v-38aa371e"]]),te=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:o}){const n=t,l=r=>{if(n.disabled){r.preventDefault(),r.stopPropagation(),r.stopImmediatePropagation();return}o("click",r)};return(r,i)=>(e.openBlock(),e.createBlock(F,{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(r.$slots,"default",{},()=>[e.createTextVNode("Link")])]),_:3},8,["to","external","disabled","size","foreground-link","icon-left","icon-right","hide-text"]))}});var j=(t=>(t[t.Success=0]="Success",t[t.Warning=1]="Warning",t[t.Danger=2]="Danger",t[t.Info=3]="Info",t))(j||{});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"},xe={class:"flex w-full flex-col items-center space-y-4 sm:items-end"},be={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"},Ce={class:"p-4"},Be={class:"flex items-start"},we={class:"flex-shrink-0"},Ve={class:"ml-2 w-0 flex-1 flex flex-col"},Ee={key:0,class:"text-foreground font-bold"},Ne={key:1,class:"label label--light text-foreground-2"},Se={key:2,class:"flex justify-start mt-2"},$e=e.createElementVNode("span",{class:"sr-only"},"Close",-1),_e=e.defineComponent({__name:"ToastRenderer",props:{notification:null},emits:["update:notification"],setup(t,{emit:o}){const n=t,l=e.computed(()=>{var c,a;return!((c=n.notification)!=null&&c.description)&&!((a=n.notification)!=null&&a.cta)}),r=()=>{o("update:notification",null)},i=c=>{var a,s,u;(u=(s=(a=n.notification)==null?void 0:a.cta)==null?void 0:s.onClick)==null||u.call(s,c),r()};return(c,a)=>(e.openBlock(),e.createElementBlock("div",ve,[e.createElementVNode("div",xe,[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",be,[e.createElementVNode("div",Ce,[e.createElementVNode("div",Be,[e.createElementVNode("div",we,[t.notification.type===e.unref(j).Success?(e.openBlock(),e.createBlock(e.unref(D.CheckCircleIcon),{key:0,class:"h-6 w-6 text-success","aria-hidden":"true"})):t.notification.type===e.unref(j).Danger?(e.openBlock(),e.createBlock(e.unref(D.XCircleIcon),{key:1,class:"h-6 w-6 text-danger","aria-hidden":"true"})):t.notification.type===e.unref(j).Warning?(e.openBlock(),e.createBlock(e.unref(D.ExclamationCircleIcon),{key:2,class:"h-6 w-6 text-warning","aria-hidden":"true"})):t.notification.type===e.unref(j).Info?(e.openBlock(),e.createBlock(e.unref(D.InformationCircleIcon),{key:3,class:"h-6 w-6 text-info","aria-hidden":"true"})):e.createCommentVNode("",!0)]),e.createElementVNode("div",Ve,[t.notification.title?(e.openBlock(),e.createElementBlock("p",Ee,e.toDisplayString(t.notification.title),1)):e.createCommentVNode("",!0),t.notification.description?(e.openBlock(),e.createElementBlock("p",Ne,e.toDisplayString(t.notification.description),1)):e.createCommentVNode("",!0),t.notification.cta?(e.openBlock(),e.createElementBlock("div",Se,[e.createVNode(te,{to:t.notification.cta.url,class:"label",primary:"",onClick:i},{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":e.unref(l)}])},[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:r},[$e,e.createVNode(e.unref(I.XMarkIcon),{class:"h-6 w-6","aria-hidden":"true"})])],2)])])])):e.createCommentVNode("",!0)]),_:1})])]))}}),Ie=e.createElementVNode("circle",{cx:"4",cy:"4",r:"3"},null,-1),ze=[Ie],ne=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:o}){const n=t,l=e.computed(()=>n.colorClasses||"bg-blue-100 text-blue-800"),r=e.computed(()=>n.dotIconColorClasses||"text-blue-400"),i=e.computed(()=>{const u=["inline-flex items-center",l.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(" ")}),c=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(" ")}),a=e.computed(()=>["-ml-0.5 mr-1.5 h-2 w-2",r.value].join(" ")),s=u=>{if(!n.clickableIcon){u.stopPropagation(),u.stopImmediatePropagation(),u.preventDefault();return}o("click-icon",u)};return(u,g)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(e.unref(i))},[t.dot?(e.openBlock(),e.createElementBlock("svg",{key:0,class:e.normalizeClass(e.unref(a)),fill:"currentColor",viewBox:"0 0 8 8"},ze,2)):e.createCommentVNode("",!0),e.renderSlot(u.$slots,"default",{},()=>[e.createTextVNode("Badge")]),t.iconLeft?(e.openBlock(),e.createElementBlock("button",{key:1,class:e.normalizeClass(e.unref(c)),onClick:g[0]||(g[0]=m=>s(m))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.iconLeft),{class:e.normalizeClass(["h-4 w-4",e.unref(r)])},null,8,["class"]))],2)):e.createCommentVNode("",!0)],2))}});let Z=[];function Le(t){Z=Z?t:t.slice()}var O=(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))(O||{});function oe(t){const{props:{modelValue:o,steps:n,orientation:l,goVerticalBelow:r,nonInteractive:i,stepsPadding:c},emit:a}=t,s=e.computed(()=>(l==null?void 0:l.value)==="vertical"?"vertical":"horizontal"),u=e.computed({get:()=>C.clamp((o==null?void 0:o.value)||0,-1,n.value.length),set:v=>a("update:modelValue",C.clamp(v,0,n.value.length))}),g=v=>`${v+1}`,m=v=>v===u.value,d=v=>v<u.value,h=(v,k)=>{var _;if(i!=null&&i.value){k==null||k.preventDefault(),k==null||k.stopPropagation(),k==null||k.stopImmediatePropagation();return}u.value=v;const y=n.value[u.value];(_=y==null?void 0:y.onClick)==null||_.call(y)},x=e.computed(()=>{const v=["flex"];let k,y;return(c==null?void 0:c.value)==="xs"?(k="space-x-2",y="space-y-1"):(c==null?void 0:c.value)==="sm"?(k="space-x-4",y="space-y-1"):(k="space-x-8",y="space-y-4"),v.push("flex"),s.value==="vertical"||r!=null&&r.value?(v.push(`flex-col ${y} justify-center`),(r==null?void 0:r.value)===O.sm?v.push(`sm:flex-row sm:space-y-0 sm:justify-start sm:${k} sm:items-center`):(r==null?void 0:r.value)===O.md?v.push(`md:flex-row md:space-y-0 md:justify-start md:${k} md:items-center`):(r==null?void 0:r.value)===O.lg?v.push(`lg:flex-row lg:space-y-0 lg:justify-start lg:${k} lg:items-center`):(r==null?void 0:r.value)===O.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(" ")}),b=e.computed(()=>{const v=["flex items-center"];return i!=null&&i.value||v.push("cursor-pointer"),v.join(" ")});return{value:u,isCurrentStep:m,isFinishedStep:d,switchStep:h,getStepDisplayValue:g,listClasses:x,linkClasses:b,orientation:s}}Le(["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 De=["aria-label"],Pe=["href","onClick"],je={class:"flex space-x-3 items-center text-primary-focus normal font-medium leading-5"},Oe={class:"shrink-0 h-8 w-8 rounded-full bg-primary-focus text-foreground-on-primary inline-flex items-center justify-center"},Te={class:"flex flex-col"},Me={key:0,class:"label label--light text-foreground"},Ae=["href","onClick"],Fe={class:"flex space-x-3 items-center text-primary-focus normal font-medium leading-5"},Re={class:"shrink-0 h-8 w-8 rounded-full border-2 border-primary-focus inline-flex items-center justify-center"},qe={class:"flex flex-col"},Ue={key:0,class:"label label--light text-foreground"},We=["href","onClick"],He={class:"flex space-x-3 items-center text-foreground-disabled normal font-medium leading-5"},Ge={class:"shrink-0 h-8 w-8 rounded-full border-2 border-foreground-disabled inline-flex items-center justify-center"},Ke={class:"flex flex-col"},Xe={key:0,class:"label label--light"},Je=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:o}){const n=t,{isCurrentStep:l,isFinishedStep:r,switchStep:i,getStepDisplayValue:c,listClasses:a,linkClasses:s}=oe({props:e.toRefs(n),emit:o});return(u,g)=>(e.openBlock(),e.createElementBlock("nav",{class:"flex justify-center","aria-label":t.ariaLabel||"Progress steps"},[e.createElementVNode("ol",{class:e.normalizeClass(e.unref(a))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.steps,(m,d)=>(e.openBlock(),e.createElementBlock("li",{key:m.name},[e.unref(r)(d)?(e.openBlock(),e.createElementBlock("a",{key:0,href:m.href,class:e.normalizeClass(e.unref(s)),onClick:h=>e.unref(i)(d,h)},[e.createElementVNode("div",je,[e.createElementVNode("div",Oe,[e.createVNode(e.unref(I.CheckIcon),{class:"w-5 h-5"})]),e.createElementVNode("div",Te,[e.createElementVNode("div",null,e.toDisplayString(m.name),1),m.description?(e.openBlock(),e.createElementBlock("div",Me,e.toDisplayString(m.description),1)):e.createCommentVNode("",!0)])])],10,Pe)):e.unref(l)(d)?(e.openBlock(),e.createElementBlock("a",{key:1,href:m.href,class:e.normalizeClass(e.unref(s)),"aria-current":"step",onClick:h=>e.unref(i)(d,h)},[e.createElementVNode("div",Fe,[e.createElementVNode("div",Re,e.toDisplayString(e.unref(c)(d)),1),e.createElementVNode("div",qe,[e.createElementVNode("div",null,e.toDisplayString(m.name),1),m.description?(e.openBlock(),e.createElementBlock("div",Ue,e.toDisplayString(m.description),1)):e.createCommentVNode("",!0)])])],10,Ae)):(e.openBlock(),e.createElementBlock("a",{key:2,href:m.href,class:e.normalizeClass(e.unref(s)),onClick:h=>e.unref(i)(d,h)},[e.createElementVNode("div",He,[e.createElementVNode("div",Ge,e.toDisplayString(e.unref(c)(d)),1),e.createElementVNode("div",Ke,[e.createElementVNode("div",null,e.toDisplayString(m.name),1),m.description?(e.openBlock(),e.createElementBlock("div",Xe,e.toDisplayString(m.description),1)):e.createCommentVNode("",!0)])])],10,We))]))),128))],2)],8,De))}}),Qe=["aria-label"],Ye=["href","onClick"],Ze={class:"relative flex h-5 w-5 flex-shrink-0 items-center justify-center"},et={key:0,class:"h-3 w-3 rounded-full bg-foreground-2"},tt=["href","onClick"],nt={class:"relative flex h-5 w-5 flex-shrink-0 items-center justify-center","aria-hidden":"true"},ot={key:0,class:"h-3 w-3 rounded-full bg-foreground"},lt=e.createElementVNode("span",{class:"absolute h-4 w-4 rounded-full bg-outline-2"},null,-1),rt=e.createElementVNode("span",{class:"relative block h-2 w-2 rounded-full bg-primary-focus"},null,-1),st=["href","onClick"],at={class:"relative flex h-5 w-5 flex-shrink-0 items-center justify-center","aria-hidden":"true"},it={key:0,class:"h-3 w-3 rounded-full bg-foreground-2"},ct={key:1,class:"h-4 w-4 rounded-full bg-foreground-disabled"},ut=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:o}){const n=t,{isCurrentStep:l,isFinishedStep:r,switchStep:i,listClasses:c,linkClasses:a}=oe({props:e.toRefs(n),emit:o}),s=e.computed(()=>{const g=["h6 font-medium leading-7"];let m;return n.stepsPadding==="xs"?m="ml-1":n.stepsPadding==="sm"?m="ml-2":m="ml-3",g.push(m),n.basic&&g.push("sr-only"),g.join(" ")}),u=e.computed(()=>{const g=[];return n.basic&&g.push("basic"),g.join(" ")});return(g,m)=>(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.unref(u)])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.steps,(d,h)=>(e.openBlock(),e.createElementBlock("li",{key:d.name},[e.unref(r)(h)?(e.openBlock(),e.createElementBlock("a",{key:0,href:d.href,class:e.normalizeClass(e.unref(a)),onClick:x=>e.unref(i)(h,x)},[e.createElementVNode("span",Ze,[t.basic?(e.openBlock(),e.createElementBlock("span",et)):(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",e.unref(s)])},e.toDisplayString(d.name),3)],10,Ye)):e.unref(l)(h)?(e.openBlock(),e.createElementBlock("a",{key:1,href:d.href,class:e.normalizeClass(e.unref(a)),"aria-current":"step",onClick:x=>e.unref(i)(h,x)},[e.createElementVNode("span",nt,[t.basic?(e.openBlock(),e.createElementBlock("span",ot)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[lt,rt],64))]),e.createElementVNode("span",{class:e.normalizeClass(["text-primary-focus",e.unref(s)])},e.toDisplayString(d.name),3)],10,tt)):(e.openBlock(),e.createElementBlock("a",{key:2,href:d.href,class:e.normalizeClass(e.unref(a)),onClick:x=>e.unref(i)(h,x)},[e.createElementVNode("div",at,[t.basic?(e.openBlock(),e.createElementBlock("span",it)):(e.openBlock(),e.createElementBlock("div",ct))]),e.createElementVNode("p",{class:e.normalizeClass(["text-foreground-disabled",e.unref(s)])},e.toDisplayString(d.name),3)],10,st))]))),128))],2)],8,Qe))}}),dt=["disabled"],ft=e.defineComponent({__name:"CardButton",props:{disabled:{type:Boolean},modelValue:{type:Boolean}},emits:["update:modelValue","click"],setup(t,{emit:o}){const n=t,l=e.computed(()=>{const i=["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?i.push("bg-foundation-disabled text-foreground-2 cursor-not-allowed"):(i.push(n.modelValue?"bg-primary-focus text-foreground-on-primary":"bg-foundation text-foreground"),i.push("ring-outline-2 hover:ring-4")),i.join(" ")}),r=i=>{if(n.disabled){i.preventDefault(),i.stopPropagation(),i.stopImmediatePropagation();return}o("update:modelValue",!n.modelValue),o("click",i)};return(i,c)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(e.unref(l)),disabled:t.disabled,onClick:r},[e.renderSlot(i.$slots,"default",{},()=>[e.createTextVNode("Text")])],10,dt))}}),mt={class:"relative flex items-start"},pt={class:"flex h-6 items-center"},ht=["id","checked","aria-describedby","name","value","disabled"],gt={class:"ml-2 text-sm",style:{"padding-top":"2px"}},yt=["for"],kt={key:0,class:"text-danger ml-1"},vt=["id"],xt=e.defineComponent({inheritAttrs:!1}),bt=e.defineComponent({...xt,__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 o=t,n=b=>`${b}-${G.nanoid()}`,l=e.computed(()=>o.value||o.name),{checked:r,errorMessage:i,handleChange:c}=H.useField(o.name,o.rules,{validateOnMount:o.validateOnMount,type:"checkbox",checkedValue:l,initialValue:o.modelValue||void 0}),a=b=>{o.disabled||c(b)},s=e.computed(()=>o.label||o.name),u=e.computed(()=>i.value?"border-danger-lighter":"border-foreground-4 "),g=e.computed(()=>o.description||i.value),m=e.computed(()=>`${o.name}-description`),d=e.computed(()=>{const b=[];return o.inlineDescription?b.push("inline ml-2"):b.push("block"),i.value?b.push("text-danger"):b.push("text-foreground-2"),b.join(" ")}),h=e.ref(n("checkbox")),x=e.computed(()=>o.id||h.value);return(b,v)=>(e.openBlock(),e.createElementBlock("div",mt,[e.createElementVNode("div",pt,[e.createElementVNode("input",e.mergeProps({id:e.unref(x),checked:e.unref(r),"aria-describedby":e.unref(m),name:t.name,value:e.unref(l),disabled:t.disabled,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",e.unref(u)]},b.$attrs,{onChange:a}),null,16,ht)]),e.createElementVNode("div",gt,[e.createElementVNode("label",{for:e.unref(x),class:e.normalizeClass(["font-medium text-foreground",{"sr-only":t.hideLabel}])},[e.createElementVNode("span",null,e.toDisplayString(e.unref(s)),1),t.showRequired?(e.openBlock(),e.createElementBlock("span",kt,"*")):e.createCommentVNode("",!0)],10,yt),e.unref(g)?(e.openBlock(),e.createElementBlock("p",{key:0,id:e.unref(m),class:e.normalizeClass(e.unref(d))},e.toDisplayString(e.unref(g)),11,vt)):e.createCommentVNode("",!0)])]))}});function le(t){const{props:o,inputEl:n,emit:l}=t,{value:r,errorMessage:i}=H.useField(o.name,o.rules,{validateOnMount:e.unref(o.validateOnMount),validateOnValueUpdate:e.unref(o.validateOnValueUpdate),initialValue:e.unref(o.modelValue)||void 0}),c=e.computed(()=>{const y=["block label text-foreground-2 mb-2"];return e.unref(o.showLabel)||y.push("sr-only"),y.join(" ")}),a=e.computed(()=>{const y=["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 i.value?y.push("border-2 border-danger text-danger-darker focus:border-danger focus:ring-danger"):y.push("border-0 focus:ring-2 focus:ring-outline-2"),e.unref(o.color)==="foundation"?y.push("bg-foundation shadow-sm hover:shadow"):y.push("bg-foundation-page"),y.join(" ")}),s=e.ref(G.nanoid()),u=e.computed(()=>e.unref(o.label)||e.unref(o.name)),g=e.computed(()=>{const y=i.value;return!y||!e.unref(o.useLabelInErrors)?y:y.replace("Value",u.value)}),m=e.computed(()=>g.value&&e.unref(o.hideErrorMessage)),d=e.computed(()=>g.value||e.unref(o.help)),h=e.computed(()=>!!d.value),x=e.computed(()=>h.value?`${e.unref(o.name)}-${s.value}`:void 0),b=e.computed(()=>{const y=["mt-2 text-sm"];return y.push(i.value?"text-danger":"text-foreground-2"),y.join(" ")}),v=()=>{var y;(y=n.value)==null||y.focus()},k=()=>{r.value="",l("change",{value:""}),l("clear")};return e.onMounted(()=>{e.unref(o.autoFocus)&&v()}),{coreClasses:a,title:u,value:r,helpTipId:x,helpTipClasses:b,helpTip:d,hideHelpTip:m,errorMessage:g,clear:k,focus:v,labelClasses:c}}const Ct=["for"],Bt={class:"relative"},wt=["id","name","placeholder","disabled","aria-invalid","aria-describedby"],Vt=e.createElementVNode("span",{class:"text-xs sr-only"},"Clear input",-1),Et={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"},Nt=["id"],St=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:o,emit:n}){const l=t,r=e.ref(null),{coreClasses:i,title:c,value:a,helpTipId:s,helpTipClasses:u,helpTip:g,errorMessage:m,labelClasses:d,clear:h,focus:x}=le({props:e.toRefs(l),emit:n,inputEl:r}),b=e.computed(()=>{const v=["pl-2"];return l.showClear&&m.value?v.push("pr-12"):(l.showClear||m.value)&&v.push("pr-8"),v.join(" ")});return o({focus:x}),(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,Ct),e.createElementVNode("div",Bt,[e.withDirectives(e.createElementVNode("textarea",e.mergeProps({id:t.name,ref_key:"inputElement",ref:r,"onUpdate:modelValue":k[0]||(k[0]=y=>e.isRef(a)?a.value=y:null),name:t.name,class:[e.unref(i),e.unref(b),"min-h-[4rem]"],placeholder:t.placeholder,disabled:t.disabled,"aria-invalid":e.unref(m)?"true":"false","aria-describedby":e.unref(s)},v.$attrs,{onChange:k[1]||(k[1]=y=>v.$emit("change",{event:y,value:e.unref(a)})),onInput:k[2]||(k[2]=y=>v.$emit("input",{event:y,value:e.unref(a)}))}),null,16,wt),[[e.vModelText,e.unref(a)]]),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]=(...y)=>e.unref(h)&&e.unref(h)(...y)),onKeydown:k[4]||(k[4]=(...y)=>e.unref(h)&&e.unref(h)(...y))},[Vt,e.createVNode(e.unref(I.XMarkIcon),{class:"h-5 w-5 text-foreground","aria-hidden":"true"})],32)):e.createCommentVNode("",!0),e.unref(m)?(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(m)?(e.openBlock(),e.createElementBlock("div",Et," * ")):e.createCommentVNode("",!0)]),e.unref(s)?(e.openBlock(),e.createElementBlock("p",{key:0,id:e.unref(s),class:e.normalizeClass(e.unref(u))},e.toDisplayString(e.unref(g)),11,Nt)):e.createCommentVNode("",!0)],2))}}),$t=["for"],_t={class:"relative"},It={key:0,class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2"},zt=["id","type","name","placeholder","disabled","aria-invalid","aria-describedby"],Lt=e.createElementVNode("span",{class:"text-xs sr-only"},"Clear input",-1),Dt={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"},Pt=["id"],jt=e.defineComponent({inheritAttrs:!1}),Ot=e.defineComponent({...jt,__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:o,emit:n}){const l=t,r=e.useSlots(),i=e.ref(null),{coreClasses:c,title:a,value:s,helpTipId:u,helpTipClasses:g,helpTip:m,hideHelpTip:d,errorMessage:h,clear:x,focus:b,labelClasses:v}=le({props:e.toRefs(l),emit:n,inputEl:i}),k=e.computed(()=>{const B=["h-5 w-5"];return h.value?B.push("text-danger"):B.push("text-foreground-2"),B.join(" ")}),y=e.computed(()=>["email","password"].includes(l.type)||l.customIcon),_=e.computed(()=>{const B=[];return y.value?B.push("pl-8"):B.push("pl-2"),r["input-right"]||(h.value||l.showClear)&&(h.value&&l.showClear?B.push("pr-12"):B.push("pr-8")),B.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 o({focus:b}),(B,w)=>(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(a)),1)],10,$t),e.createElementVNode("div",_t,[e.unref(y)?(e.openBlock(),e.createElementBlock("div",It,[t.customIcon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.customIcon),{key:0,class:e.normalizeClass(e.unref(k)),"aria-hidden":"true"},null,8,["class"])):t.type==="email"?(e.openBlock(),e.createBlock(e.unref(I.EnvelopeIcon),{key:1,class:e.normalizeClass(e.unref(k)),"aria-hidden":"true"},null,8,["class"])):t.type==="password"?(e.openBlock(),e.createBlock(e.unref(I.KeyIcon),{key:2,class:e.normalizeClass(e.unref(k)),"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:i,"onUpdate:modelValue":w[0]||(w[0]=N=>e.isRef(s)?s.value=N:null),type:t.type,name:t.name,class:[e.unref(c),e.unref(_),e.unref(f),t.inputClasses||""],placeholder:t.placeholder,disabled:t.disabled,"aria-invalid":e.unref(h)?"true":"false","aria-describedby":e.unref(u),role:"textbox"},B.$attrs,{onChange:w[1]||(w[1]=N=>B.$emit("change",{event:N,value:e.unref(s)})),onInput:w[2]||(w[2]=N=>B.$emit("input",{event:N,value:e.unref(s)}))}),null,16,zt),[[e.vModelDynamic,e.unref(s)]]),e.renderSlot(B.$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:w[3]||(w[3]=(...N)=>e.unref(x)&&e.unref(x)(...N)),onKeydown:w[4]||(w[4]=(...N)=>e.unref(x)&&e.unref(x)(...N))},[Lt,e.createVNode(e.unref(I.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(I.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",Dt," * ")):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(g))},e.toDisplayString(e.unref(m)),11,Pt)):e.createCommentVNode("",!0)],2))}}),Tt=/^https?:\/\//,K=/^[\w-_.+]+@[\w-_.+]+$/,Mt=t=>(t||"").match(K)?!0:"Value should be a valid e-mail address",At=t=>(t||"").split(",").map(l=>l.trim()).every(l=>l.match(K))||"Value should be one or multiple comma-delimited e-mail addresses",Ft=t=>(C.isString(t)&&(t=t.trim()),t?!0:"Value is required"),Rt=(t,o)=>(n,l)=>n===l.form[t]?!0:`Value must be the same as in field '${o||t}'`,qt=t=>o=>{const{minLength:n,maxLength:l}=t;return o=M.isNullOrUndefined(o)?"":o,C.isString(o)?!C.isUndefined(n)&&o.length<n?`Value needs to be at least ${n} characters long`:!C.isUndefined(l)&&o.length>l?`Value needs to be no more than ${l} characters long`:!0:"Value should be a text string"},Ut=t=>o=>{const{match:n,message:l}=t;return C.isString(o)?n?C.isString(n)?o.includes(n)?!0:l:n.test(o)?!0:l:!0:"Value should be a text string"},Wt=Object.freeze(Object.defineProperty({__proto__:null,VALID_EMAIL:K,VALID_HTTP_URL:Tt,isEmail:Mt,isOneOrMultipleEmails:At,isRequired:Ft,isSameAs:Rt,isStringOfLength:qt,stringContains:Ut},Symbol.toStringTag,{value:"Module"}));function re(t){const{skipCalculation:o,elementToWatchForChanges:n,itemContainer:l,trackResize:r=!1,trackMutations:i=!0}=t||{},c=e.ref(0),a=()=>{const s=l.value;if(o!=null&&o.value||!s)return;const u=s.children;let g=0,m=0,d;for(const h of u){const x=h.offsetTop;C.isUndefined(d)?(d=x,g+=1):x===d&&(g+=1),m+=1}c.value=m-g};return r&&A.useResizeObserver(n,a),i&&A.useMutationObserver(n,a,{childList:!0,subtree:!0}),{hiddenItemCount:c}}function se(t){const{props:o,emit:n,dynamicVisibility:l}=t;let r;if(l){const{elementToWatchForChanges:u,itemContainer:g}=l;r=re({skipCalculation:e.computed(()=>{var d;return!((d=o.multiple)!=null&&d.value)}),elementToWatchForChanges:u,itemContainer:g}).hiddenItemCount}else r=e.ref(0);const i=e.computed({get:()=>{var g,m;const u=(g=o.modelValue)==null?void 0:g.value;return(m=o.multiple)!=null&&m.value?C.isArray(u)?u:[]:C.isArray(u)?void 0:u},set:u=>{var g,m,d;if((g=o.multiple)!=null&&g.value&&!C.isArray(u)){console.warn("Attempting to set non-array value in selector w/ multiple=true");return}else if(!((m=o.multiple)!=null&&m.value)&&C.isArray(u)){console.warn("Attempting to set array value in selector w/ multiple=false");return}n("update:modelValue",(d=o.multiple)!=null&&d.value?u||[]:u)}}),c=u=>C.isArray(u);return{selectedValue:i,hiddenSelectedItemCount:r,isArrayValue:c,isMultiItemArrayValue:u=>C.isArray(u)&&u.length>1,firstItem:u=>c(u)?u[0]:u}}const Ht=t=>(e.pushScopeId("data-v-60cf597b"),t=t(),e.popScopeId(),t),Gt=Ht(()=>e.createElementVNode("div",{class:"swoosher relative top-0 bg-blue-500/50"},null,-1)),Kt=[Gt],Xt=e.defineComponent({__name:"Bar",props:{loading:{type:Boolean}},setup(t){return(o,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"])},Kt,2))}});const X=ee(Xt,[["__scopeId","data-v-60cf597b"]]),Jt={class:"flex items-center justify-between w-full"},Qt={class:"block truncate grow text-left"},Yt={class:"pointer-events-none shrink-0 ml-1 flex items-center"},Zt=["disabled"],en={key:0,class:"flex flex-col mx-1 mb-1"},tn=e.createElementVNode("span",{class:"sr-only label text-foreground"},"Search",-1),nn={class:"relative"},on={class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2"},ln=["placeholder"],rn={key:0,class:"px-1"},sn={key:1},an=e.createElementVNode("div",{class:"text-foreground-2 text-center"},"Nothing found 🤷♂️",-1),cn={class:e.normalizeClass(["block truncate"])},un=["id"],ae=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},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}},emits:["update:modelValue"],setup(t,{expose:o}){const n=t,{value:l,errorMessage:r}=H.useField(n.name,n.rules,{validateOnMount:n.validateOnMount,validateOnValueUpdate:n.validateOnValueUpdate,initialValue:n.modelValue}),i=e.ref(null),c=e.ref(""),a=e.ref([]),s=e.ref(!1),u=e.ref(G.nanoid()),g=e.computed(()=>e.unref(n.label)||e.unref(n.name)),m=e.computed(()=>{const p=r.value;return!p||!e.unref(n.useLabelInErrors)?p:p.replace("Value",g.value)}),d=e.computed(()=>m.value||e.unref(n.help)),h=e.computed(()=>!!d.value),x=e.computed(()=>h.value?`${e.unref(n.name)}-${u.value}`:void 0),b=e.computed(()=>r.value?"text-danger":"text-foreground-2"),v=e.computed(()=>n.buttonStyle!=="simple"&&n.clearable&&!n.disabled),k=e.computed(()=>{const p=["relative flex group"];return n.buttonStyle!=="simple"&&(p.push("hover:shadow rounded-md"),p.push("outline outline-2 outline-primary-muted")),n.fixedHeight&&p.push("h-8"),p.join(" ")}),y=e.computed(()=>{const p=[];return n.buttonStyle!=="simple"&&p.push(N.value?"bg-foundation-disabled text-foreground-disabled":""),N.value&&p.push("cursor-not-allowed"),p.join(" ")}),_=e.computed(()=>{const p=["relative z-[1]","flex items-center justify-center text-center shrink-0","rounded-r-md overflow-hidden transition-all","text-foreground",J.value?`w-6 ${y.value}`:"w-0"];return N.value||(p.push("hover:bg-primary hover:text-foreground-on-primary dark:text-foreground-on-primary"),n.buttonStyle==="tinted"?p.push("bg-outline-3"):p.push("bg-primary-muted")),p.join(" ")}),f=e.computed(()=>{const p=["relative z-[2]","normal rounded-md cursor-pointer transition truncate flex-1","flex items-center",y.value];return n.buttonStyle!=="simple"&&(p.push("py-2 px-3"),N.value||(n.buttonStyle==="tinted"?p.push("bg-foundation-page text-foreground"):p.push("bg-foundation text-foreground"))),v.value&&J.value&&p.push("rounded-r-none"),p.join(" ")}),B=e.computed(()=>!!(n.search&&(n.filterPredicate||n.getSearchResults))),w=e.computed(()=>B.value&&n.getSearchResults),N=e.computed(()=>n.disabled||!n.items.length&&!w.value),$=e.computed({get:()=>{const p=l.value;return n.multiple?C.isArray(p)?p:[]:C.isArray(p)?void 0:p},set:p=>{if(n.multiple&&!C.isArray(p)){console.warn("Attempting to set non-array value in selector w/ multiple=true");return}else if(!n.multiple&&C.isArray(p)){console.warn("Attempting to set array value in selector w/ multiple=false");return}if(n.multiple)l.value=p||[];else{const S=l.value,V=n.allowUnset&&S&&p&&U(S)===U(p);l.value=V?void 0:p}}}),J=e.computed(()=>n.multiple?$.value.length!==0:!!$.value),fe=()=>{n.multiple?$.value=[]:$.value=void 0},me=e.computed(()=>{const p=c.value;return!B.value||!(p!=null&&p.length)?a.value:n.filterPredicate?a.value.filter(S=>{var V;return((V=n.filterPredicate)==null?void 0:V.call(n,S,p))||!1}):a.value}),Q=p=>JSON.stringify(p),U=p=>n.by?p[n.by]:p,W=async()=>{if(!(!w.value||!n.getSearchResults)){s.value=!0;try{a.value=await n.getSearchResults(c.value)}finally{s.value=!1}}},pe=C.debounce(W,1e3);return e.watch(()=>n.items,p=>{a.value=p.slice()},{immediate:!0}),e.watch(c,()=>{w.value&&pe()}),e.onMounted(()=>{w.value&&!n.items.length&&W()}),o({triggerSearch:W}),(p,S)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(E.Listbox),{modelValue:e.unref($),"onUpdate:modelValue":S[4]||(S[4]=V=>e.isRef($)?$.value=V:null),name:t.name,multiple:t.multiple,by:t.by,disabled:e.unref(N),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(e.unref(k))},[e.createVNode(e.unref(E.ListboxButton),{class:e.normalizeClass(e.unref(f))},{default:e.withCtx(({open:V})=>[e.createElementVNode("div",Jt,[e.createElementVNode("div",Qt,[!e.unref($)||e.unref(C.isArray)(e.unref($))&&!e.unref($).length?e.renderSlot(p.$slots,"nothing-selected",{key:0},()=>[e.createTextVNode(e.toDisplayString(t.label),1)]):e.renderSlot(p.$slots,"something-selected",{key:1,value:e.unref($)},()=>[e.createTextVNode(e.toDisplayString(Q(e.unref($))),1)])]),e.createElementVNode("div",Yt,[V?(e.openBlock(),e.createBlock(e.unref(z.ChevronUpIcon),{key:0,class:"h-4 w-4 text-foreground","aria-hidden":"true"})):(e.openBlock(),e.createBlock(e.unref(z.ChevronDownIcon),{key:1,class:"h-4 w-4 text-foreground","aria-hidden":"true"}))])])]),_:3},8,["class"]),e.unref(v)?e.withDirectives((e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(e.unref(_)),disabled:t.disabled,onClick:S[0]||(S[0]=V=>fe())},[e.createVNode(e.unref(z.XMarkIcon),{class:"w-3 h-3"})],10,Zt)),[[e.unref(he.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:S[3]||(S[3]=V=>{var P;return(P=i.value)==null?void 0:P.focus()})},{default:e.withCtx(()=>[e.unref(B)?(e.openBlock(),e.createElementBlock("label",en,[tn,e.createElementVNode("div",nn,[e.createElementVNode("div",on,[e.createVNode(e.unref(z.MagnifyingGlassIcon),{class:"h-5 w-5 text-foreground"})]),e.withDirectives(e.createElementVNode("input",{ref_key:"searchInput",ref:i,"onUpdate:modelValue":S[1]||(S[1]=V=>c.value=V),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:S[2]||(S[2]=e.withModifiers(()=>{},["stop"]))},null,40,ln),[[e.vModelText,c.value]])])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["overflow-auto simple-scrollbar",[e.unref(B)?"max-h-52":"max-h-60"]])},[e.unref(w)&&s.value?(e.openBlock(),e.createElementBlock("div",rn,[e.createVNode(X,{loading:!0})])):e.unref(w)&&!a.value.length?(e.openBlock(),e.createElementBlock("div",sn,[e.renderSlot(p.$slots,"nothing-found",{},()=>[an])])):e.createCommentVNode("",!0),!e.unref(w)||!s.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(e.unref(me),V=>(e.openBlock(),e.createBlock(e.unref(E.ListboxOption),{key:U(V),value:V},{default:e.withCtx(({active:P,selected:Y})=>[e.createElementVNode("li",{class:e.normalizeClass([P?"text-primary":"text-foreground","relative transition cursor-pointer select-none py-1.5 pl-3",t.hideCheckmarks?"":"pr-9"])},[e.createElementVNode("span",cn,[e.renderSlot(p.$slots,"option",{item:V,active:P,selected:Y},()=>[e.createTextVNode(e.toDisplayString(Q(V)),1)])]),!t.hideCheckmarks&&Y?(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(z.CheckIcon),{class:"h-5 w-5","aria-hidden":"true"})],2)):e.createCommentVNode("",!0)],2)]),_:2},1032,["value"]))),128)):e.createCommentVNode("",!0)],2)]),_:3})]),_:3})],2)]),_:3},8,["modelValue","name","multiple","by","disabled"]),e.unref(x)?(e.openBlock(),e.createElementBlock("p",{key:0,id:e.unref(x),class:e.normalizeClass(["mt-2 text-sm",e.unref(b)])},e.toDisplayString(e.unref(d)),11,un)):e.createCommentVNode("",!0)]))}}),ie=e.defineComponent({__name:"SourceAppBadge",props:{sourceApp:null},setup(t){return(o,n)=>(e.openBlock(),e.createBlock(ne,{"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"]))}}),dn={key:0,class:"text-foreground-2 normal"},fn={key:1,class:"flex items-center"},mn={class:"truncate"},pn={class:"flex items-center"},hn={class:"truncate"},gn=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:o}){const n=t,l=e.ref(null),r=e.ref(null),{selectedValue:i,hiddenSelectedItemCount:c,isMultiItemArrayValue:a,firstItem:s}=se({props:e.toRefs(n),emit:o,dynamicVisibility:{elementToWatchForChanges:l,itemContainer:r}}),u=(g,m)=>g.name.toLocaleLowerCase().includes(m.toLocaleLowerCase());return(g,m)=>(e.openBlock(),e.createBlock(ae,{modelValue:e.unref(i),"onUpdate:modelValue":m[0]||(m[0]=d=>e.isRef(i)?i.value=d:null),multiple:t.multiple,items:t.items??e.unref(M.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(a)(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:r,class:"flex flex-wrap overflow-hidden space-x-0.5 h-5"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d,h=>(e.openBlock(),e.createBlock(ie,{key:h.name,"source-app":h},null,8,["source-app"]))),128))],512),e.unref(c)>0?(e.openBlock(),e.createElementBlock("div",dn," +"+e.toDisplayString(e.unref(c)),1)):e.createCommentVNode("",!0)],512)):(e.openBlock(),e.createElementBlock("div",fn,[e.createElementVNode("div",{class:"h-2 w-2 rounded-full mr-2",style:e.normalizeStyle({backgroundColor:e.unref(s)(d).bgColor})},null,4),e.createElementVNode("span",mn,e.toDisplayString(e.unref(s)(d).name),1)]))]),option:e.withCtx(({item:d})=>[e.createElementVNode("div",pn,[e.createElementVNode("div",{class:"h-2 w-2 rounded-full mr-2",style:e.normalizeStyle({backgroundColor:d.bgColor})},null,4),e.createElementVNode("span",hn,e.toDisplayString(d.name),1)])]),_:1},8,["modelValue","multiple","items","search","search-placeholder","label","show-label","name"]))}});var T=(t=>(t.CtrlOrCmd="cmd-or-ctrl",t.AltOrOpt="alt-or-opt",t.Shift="shift",t))(T||{});const R=M.getClientOperatingSystem(),yn={["cmd-or-ctrl"]:R===M.OperatingSystem.Mac?"Cmd":"Ctrl",["alt-or-opt"]:R===M.OperatingSystem.Mac?"Opt":"Alt",shift:"Shift"};function kn(t){const o=n=>Object.values(T).includes(n);return t.map(n=>o(n)?yn[n]:n).join("+")}function vn(t,...o){A.onKeyDown(o[0],n=>{const l=n.getModifierState("Alt"),r=R===M.OperatingSystem.Mac?n.getModifierState("Meta"):n.getModifierState("Control"),i=n.getModifierState("Shift");for(const c of t)switch(c){case T.CtrlOrCmd:if(!r)return;break;case T.AltOrOpt:if(!l)return;break;case T.Shift:if(!i)return;break}o[1](n)},o[2])}const xn=e.createElementVNode("div",{class:"fixed inset-0 bg-neutral-100/70 dark:bg-neutral-900/70 transition-opacity"},null,-1),bn={class:"fixed inset-0 z-10 overflow-y-auto"},Cn={class:"flex min-h-full justify-center p-4 text-center items-center sm:p-0"},Bn={class:"relative"},wn=e.defineComponent({__name:"Dialog",props:{open:{type:Boolean},maxWidth:null,hideCloser:{type:Boolean},preventCloseOnClickOutside:{type:Boolean}},emits:["update:open","fully-closed"],setup(t,{emit:o}){const n=t,l=e.computed({get:()=>n.open,set:a=>o("update:open",a)}),r=e.computed(()=>{switch(n.maxWidth){case"sm":return 0;case"md":return 1;case"lg":return 2;case"xl":return 3;default:return 1e4}}),i=e.computed(()=>{const a=["px-4 pt-4 pb-4 w-full","sm:my-8 sm:w-full sm:max-w-xl sm:p-6"];return r.value>=1&&a.push("md:max-w-2xl"),r.value>=2&&a.push("lg:max-w-4xl"),r.value>=3&&a.push("xl:max-w-6xl"),r.value>=4&&a.push("2xl:max-w-7xl"),a.join(" ")}),c=()=>{n.preventCloseOnClickOutside||(l.value=!1)};return(a,s)=>(e.openBlock(),e.createBlock(e.unref(E.TransitionRoot),{as:"template",show:e.unref(l)},{default:e.withCtx(()=>[e.createVNode(e.unref(E.Dialog),{as:"div",class:"relative z-40",onClose:c},{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(()=>[xn]),_:1}),e.createElementVNode("div",bn,[e.createElementVNode("div",Cn,[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:s[1]||(s[1]=u=>a.$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",e.unref(i)])},{default:e.withCtx(()=>[e.createElementVNode("div",Bn,[e.renderSlot(a.$slots,"default",{},()=>[e.createTextVNode("Put your content here!")]),t.hideCloser?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,class:"absolute top-0 right-0 text-foreground",onClick:s[0]||(s[0]=u=>l.value=!1)},[e.createVNode(e.unref(D.XMarkIcon),{class:"h-6 w-6"})]))])]),_:3},8,["class"])]),_:3})])])]),_:3})]),_:3},8,["show"]))}}),Vn={class:"inline-flex items-center space-x-2"},En={class:"label-light"},Nn=e.defineComponent({__name:"Disclosure",props:{title:null,icon:null,color:{default:"default"}},setup(t){const o=t,n=e.computed(()=>{const r=["pr-3 h-10 w-full flex items-center justify-between border-l-2 px-2 rounded transition","ring-1"];switch(o.color){case"danger":r.push("border-danger text-danger ring-danger-lighter hover:ring-danger");break;case"default":default:r.push("border-primary text-primary ring-primary-muted hover:ring-primary");break}return r.join(" ")}),l=e.computed(()=>{const r=["mt-4 px-3 py-1 border-x "];switch(o.color){case"danger":r.push("border-danger-lighter");break;case"default":default:r.push("border-primary-muted");break}return r.join(" ")});return(r,i)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(E.Disclosure),null,{default:e.withCtx(({open:c})=>[e.createVNode(e.unref(E.DisclosureButton),{class:e.normalizeClass(e.unref(n))},{default:e.withCtx(()=>[e.createElementVNode("div",Vn,[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(z.ChevronUpIcon),{class:e.normalizeClass([c?"":"rotate-180 transform","h-5 w-5"])},null,8,["class"])]),_:2},1032,["class"]),e.createVNode(e.unref(E.DisclosurePanel),{class:e.normalizeClass(e.unref(l))},{default:e.withCtx(()=>[e.createElementVNode("div",En,[e.renderSlot(r.$slots,"default",{},()=>[e.createTextVNode("Panel contents")])])]),_:3},8,["class"])]),_:3})]))}});var L=(t=>(t.Grid="grid",t.List="list",t))(L||{});const Sn=e.defineComponent({__name:"GridListToggle",props:{modelValue:null},emits:["click","update:modelValue"],setup(t,{emit:o}){const n=t,l=e.computed({get:()=>n.modelValue||L.Grid,set:c=>o("update:modelValue",c)}),r=e.computed(()=>l.value===L.Grid?z.Bars3Icon:z.Squares2X2Icon),i=c=>{o("click",c);const a=l.value===L.Grid?L.List:L.Grid;l.value=a};return(c,a)=>(e.openBlock(),e.createElementBlock("button",{class:"flex items-center justify-center rounded bg-foundation h-8 w-8 shadow cursor-pointer text-foreground",onClick:i},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(r)),{class:"h-6 w-6"}))]))}});var ce=(t=>(t[t.Throttle=0]="Throttle",t[t.Debounce=1]="Debounce",t))(ce||{}),q=(t=>(t[t.Left=0]="Left",t[t.Right=1]="Right",t))(q||{});function ue(t,o){if(!A.isClient)return;const{wait:n=100,throttleOrDebounce:l=0}=o||{},r=n?l===0?C.throttle(t,n):C.debounce(t,n):t;e.onMounted(()=>window.addEventListener("resize",r)),e.onBeforeUnmount(()=>window.removeEventListener("resize",r))}function $n(t){e.onMounted(()=>{window.addEventListener("beforeunload",t)}),e.onBeforeUnmount(()=>{window.removeEventListener("beforeunload",t)})}function de(t){const{el:o,defaultDirection:n}=t,l=e.ref(C.isUndefined(n)?1:n),r=e.computed(()=>{const c=e.unref(t.stopUpdatesBelowWidth);if(!C.isUndefined(c))return c;const a=e.unref(o);return a!=null&&a.offsetWidth?a.offsetWidth*2:void 0}),i=()=>{if(!A.isClient)return;const c=e.unref(o);if(!c)return;const a=c.getBoundingClientRect(),s=a.x+a.width>window.innerWidth,u=a.x<0;s&&u||!C.isUndefined(r.value)&&window.innerWidth<r.value||(s?l.value=0:u&&(l.value=1))};return ue(()=>i()),e.watch(()=>e.unref(o),c=>{c&&i()}),{direction:e.computed(()=>l.value),recalculateDirection:i}}const _n=["onClick"],In=e.defineComponent({__name:"Menu",props:{open:{type:Boolean},items:null},emits:["update:open","chosen"],setup(t,{emit:o}){const n=t,l=e.ref(null),{direction:r}=de({el:e.computed(()=>{var d;return((d=l.value)==null?void 0:d.el)||null}),defaultDirection:q.Left,stopUpdatesBelowWidth:300}),i=e.ref(null),c=e.ref(!1),a=e.computed({get:()=>n.open||!1,set:d=>o("update:open",d)}),s=d=>{const{active:h,disabled:x}=d,b=["group flex w-full items-center rounded-md px-2 py-2 text-sm"];return h?b.push("bg-primary text-foreground-on-primary"):x?b.push("text-foreground-disabled"):b.push("text-foreground"),b.join(" ")},u=(d,h)=>{o("chosen",{item:d,event:h})},g=()=>{var d;return(d=i.value)==null?void 0:d.el.click()},m=d=>{const h=!!d;return c.value=h,h};return e.watch(c,(d,h)=>{d!==h&&(a.value=d)}),e.watch(a,d=>{(d&&!c.value||!d&&c.value)&&g()}),(d,h)=>(e.openBlock(),e.createBlock(e.unref(E.Menu),{as:"div",class:"relative inline-block"},{default:e.withCtx(({open:x})=>[e.createElementVNode("div",null,[e.createVNode(e.unref(E.MenuButton),{ref_key:"menuButton",ref:i,class:"hidden",onClick:h[0]||(h[0]=e.withModifiers(()=>{},["stop","prevent"]))},null,512),e.createElementVNode("div",{class:e.normalizeClass(x?"pointer-events-none":"")},[e.renderSlot(d.$slots,"default",{toggle:g,open:m(x)})],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: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(r)===e.unref(q).Left?"right-0":""])},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(b,v)=>(e.openBlock(),e.createElementBlock("div",{key:v,class:"px-1 py-1"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b,k=>(e.openBlock(),e.createBlock(e.unref(E.MenuItem),{key:k.id,disabled:k.disabled},{default:e.withCtx(({active:y,disabled:_})=>[e.createElementVNode("button",{class:e.normalizeClass(s({active:y,disabled:_})),onClick:f=>u(k,f)},[e.renderSlot(d.$slots,"item",{item:k},()=>[e.createTextVNode(e.toDisplayString(k.title),1)])],10,_n)]),_:2},1032,["disabled"]))),128))]))),128))]),_:3},8,["class"])]),_:3})]),_:3}))}}),zn={class:"flex flex-col space-y-4"},Ln={class:"flex space-x-6"},Dn=e.defineComponent({__name:"Tabs",props:{items:null},setup(t){const o=t,n=e.ref(null),l=e.computed(()=>n.value&&o.items.find(i=>i.id===n.value)||o.items[0]),r=i=>{n.value=i.id};return(i,c)=>(e.openBlock(),e.createElementBlock("div",zn,[e.createElementVNode("div",Ln,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,a=>(e.openBlock(),e.createBlock(F,{key:a.id,link:"",color:e.unref(l).id===a.id?"default":"secondary",onClick:s=>r(a)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.title),1)]),_:2},1032,["color","onClick"]))),128))]),e.renderSlot(i.$slots,"default",{activeItem:e.unref(l)})]))}}),Pn={class:"w-full flex flex-col items-center my-2 space-y-2 mt-4"},jn={class:"inline-flex items-center space-x-1"},On=e.createElementVNode("span",{class:"text-foreground-2"},"That's it, you've loaded everything!",-1),Tn={class:"w-full flex flex-col items-center my-2 space-y-2 mt-4"},Mn={class:"inline-flex items-center space-x-1"},An=e.createElementVNode("span",{class:"text-foreground-2"},"An error occurred while loading",-1),Fn=e.defineComponent({__name:"InfiniteLoading",props:{settings:null,allowRetry:{type:Boolean}},emits:["infinite"],setup(t){const o=e.ref(null),n=e.ref(!1);return A.isClient&&e.onMounted(()=>{const l=setInterval(()=>{var r;(r=o.value)!=null&&r.isConnected&&(n.value=!0,clearInterval(l))},200)}),(l,r)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:o},[n.value?(e.openBlock(),e.createBlock(e.unref(ge),e.mergeProps({key:0},l.$props.settings||{},{onInfinite:r[0]||(r[0]=i=>l.$emit("infinite",i))}),{spinner:e.withCtx(()=>[e.createVNode(X,{loading:!0,class:"my-2"})]),complete:e.withCtx(()=>[e.createElementVNode("div",Pn,[e.createElementVNode("div",jn,[e.createVNode(e.unref(D.CheckIcon),{class:"w-5 h-5 text-success"}),On])])]),error:e.withCtx(({retry:i})=>[e.createElementVNode("div",Tn,[e.createElementVNode("div",Mn,[e.createVNode(e.unref(D.ExclamationTriangleIcon),{class:"w-5 h-5 text-danger"}),An]),t.allowRetry?(e.openBlock(),e.createBlock(F,{key:0,onClick:i},{default:e.withCtx(()=>[e.createTextVNode("Retry")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)])]),_:1},16)):e.createCommentVNode("",!0)],512))}}),Rn={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"},Un=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}},emits:["submit"],setup(t,{emit:o}){const n=t,l=e.computed(()=>n.customPadding?"":"px-4 py-4 sm:px-6"),r=e.computed(()=>n.customPadding?"":"px-4 py-4 sm:p-6"),i=e.computed(()=>{const c=["rounded-lg"];return n.noShadow||c.push("shadow"),n.ring&&c.push("ring-outline-2 hover:ring-2"),c.join(" ")});return(c,a)=>(e.openBlock(),e.createElementBlock("div",Rn,[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",e.unref(i)]),onSubmit:a[0]||(a[0]=s=>o("submit",s))},{default:e.withCtx(()=>[c.$slots.header?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(l))},[e.renderSlot(c.$slots,"header")],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["grow",e.unref(r)])},[e.renderSlot(c.$slots,"default")],2),c.$slots.footer?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(l))},[e.renderSlot(c.$slots,"footer")],2)):e.createCommentVNode("",!0)]),_:3},40,["class"]))]))}}),Wn={class:"flex-shrink-0"},Hn={key:0,class:"mt-2 text-sm"},Gn=e.createElementVNode("span",{class:"sr-only"},"Dismiss",-1),Kn=e.defineComponent({__name:"Alert",props:{color:{default:"success"},withDismiss:{type:Boolean},actions:null},emits:["dismiss"],setup(t){const o=t,n=e.useSlots(),l=e.computed(()=>!!n.description),r=e.computed(()=>{const s=[];switch(s.push(l.value?"p-4":"p-2"),o.color){case"success":s.push("bg-success-lighter border-l-4 border-success");break;case"info":s.push("bg-info-lighter border-l-4 border-info");break;case"danger":s.push("bg-danger-lighter border-l-4 border-danger");break;case"warning":s.push("bg-warning-lighter border-l-4 border-warning");break}return s.join(" ")}),i=e.computed(()=>{const s=[];switch(o.color){case"success":s.push("text-success-darker");break;case"info":s.push("text-info-darker");break;case"danger":s.push("text-danger-darker");break;case"warning":s.push("text-warning-darker");break}return s.join(" ")}),c=e.computed(()=>{const s=[];switch(o.color){case"success":s.push("text-success");break;case"info":s.push("text-info");break;case"danger":s.push("text-danger");break;case"warning":s.push("text-warning");break}return s.join(" ")}),a=e.computed(()=>{const s=[];switch(o.color){case"success":s.push("bg-success-lighter ring-success");break;case"info":s.push("bg-info-lighter ring-info");break;case"danger":s.push("bg-danger-lighter ring-danger");break;case"warning":s.push("bg-warning-lighter ring-warning");break}return s.join(" ")});return(s,u)=>{var g;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["rounded-md",[e.unref(r),e.unref(i)]])},[e.createElementVNode("div",{class:e.normalizeClass(["flex",[e.unref(l)?"":"items-center space-x-2"]])},[e.createElementVNode("div",Wn,[e.createVNode(e.unref(I.CheckCircleIcon),{class:e.normalizeClass(["h-5 w-5",e.unref(c)]),"aria-hidden":"true"},null,8,["class"])]),e.createElementVNode("div",{class:e.normalizeClass(["ml-3 grow",[e.unref(l)?"":"flex items-center space-x-2"]])},[e.createElementVNode("h3",{class:e.normalizeClass(["text-sm",[e.unref(l)?"font-medium":""]])},[e.renderSlot(s.$slots,"title",{},()=>[e.createTextVNode("Title")])],2),e.unref(l)?(e.openBlock(),e.createElementBlock("div",Hn,[e.renderSlot(s.$slots,"description",{},()=>[e.createTextVNode(" Lorem ipsum dolor sit amet consectetur adipisicing elit. Aliquid pariatur, ipsum similique veniam. ")])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass([e.unref(l)?(g=t.actions)!=null&&g.length?"mt-4":"":"grow flex"])},[e.createElementVNode("div",{class:e.normalizeClass(["flex",["space-x-2",e.unref(l)?"":"grow justify-end"]])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.actions||[],(m,d)=>(e.openBlock(),e.createBlock(F,{key:d,color:t.color,size:"sm",to:m.url,external:m.externalUrl||!1,onClick:h=>m.onClick||e.unref(C.noop)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.title),1)]),_:2},1032,["color","to","external","onClick"]))),128))],2)],2)],2),t.withDismiss?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["flex",[e.unref(l)?"items-start":"items-center"]])},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["inline-flex rounded-md focus:outline-none focus:ring-2",e.unref(a)]),onClick:u[0]||(u[0]=m=>s.$emit("dismiss"))},[Gn,e.createVNode(e.unref(I.XMarkIcon),{class:"h-5 w-5","aria-hidden":"true"})],2)],2)):e.createCommentVNode("",!0)],2)],2)}}});exports.CommonAlert=Kn;exports.CommonBadge=ne;exports.CommonLoadingBar=X;exports.CommonStepsBullet=ut;exports.CommonStepsNumber=Je;exports.CommonTextLink=te;exports.FormButton=F;exports.FormCardButton=ft;exports.FormCheckbox=bt;exports.FormSelectBase=ae;exports.FormSelectSourceApps=gn;exports.FormTextArea=St;exports.FormTextInput=Ot;exports.GlobalToastRenderer=_e;exports.GridListToggleValue=L;exports.HorizontalDirection=q;exports.InfiniteLoading=Fn;exports.LayoutDialog=wn;exports.LayoutDisclosure=Nn;exports.LayoutGridListToggle=Sn;exports.LayoutMenu=In;exports.LayoutPanel=Un;exports.LayoutTabs=Dn;exports.ModifierKeys=T;exports.SourceAppBadge=ie;exports.TailwindBreakpoints=O;exports.ThrottleOrDebounce=ce;exports.ToastNotificationType=j;exports.ValidationHelpers=Wt;exports.clientOs=R;exports.getKeyboardShortcutTitle=kn;exports.onKeyboardShortcut=vn;exports.useFormSelectChildInternals=se;exports.useOnBeforeWindowUnload=$n;exports.useResponsiveHorizontalDirectionCalculation=de;exports.useWindowResizeHandler=ue;exports.useWrappingContainerHiddenCount=re;
|