@speckle/ui-components 2.16.1-alpha4 → 2.16.1-alpha5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/form/Tags.vue.d.ts +141 -0
- package/dist/components/form/tags/ContextManager.vue.d.ts +16 -0
- package/dist/lib.cjs +1 -1
- package/dist/lib.cjs.map +1 -1
- package/dist/lib.d.ts +2 -1
- package/dist/lib.js +1554 -1262
- package/dist/lib.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { InputColor } from '../../composables/form/textInput';
|
|
2
|
+
import { MaybeAsync } from '@speckle/shared';
|
|
3
|
+
type InputSize = 'sm' | 'base' | 'lg' | 'xl';
|
|
4
|
+
declare const _default: import("vue").DefineComponent<{
|
|
5
|
+
modelValue: import("vue").PropType<string[]>;
|
|
6
|
+
size: {
|
|
7
|
+
type: import("vue").PropType<InputSize>;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
10
|
+
color: {
|
|
11
|
+
type: import("vue").PropType<InputColor>;
|
|
12
|
+
default: string;
|
|
13
|
+
};
|
|
14
|
+
disabled: {
|
|
15
|
+
type: import("vue").PropType<boolean>;
|
|
16
|
+
};
|
|
17
|
+
placeholder: {
|
|
18
|
+
type: import("vue").PropType<string>;
|
|
19
|
+
};
|
|
20
|
+
label: {
|
|
21
|
+
type: import("vue").PropType<string>;
|
|
22
|
+
};
|
|
23
|
+
name: {
|
|
24
|
+
type: import("vue").PropType<string>;
|
|
25
|
+
required: true;
|
|
26
|
+
};
|
|
27
|
+
rules: {
|
|
28
|
+
type: import("vue").PropType<string | Record<string, unknown> | import("vee-validate").GenericValidateFunction<string[]> | import("vee-validate").GenericValidateFunction<string[]>[] | {
|
|
29
|
+
validate(value: string[], options: Record<string, any>): Promise<string[]>;
|
|
30
|
+
}>;
|
|
31
|
+
};
|
|
32
|
+
validateOnMount: {
|
|
33
|
+
type: import("vue").PropType<boolean>;
|
|
34
|
+
};
|
|
35
|
+
showRequired: {
|
|
36
|
+
type: import("vue").PropType<boolean>;
|
|
37
|
+
};
|
|
38
|
+
validateOnValueUpdate: {
|
|
39
|
+
type: import("vue").PropType<boolean>;
|
|
40
|
+
};
|
|
41
|
+
help: {
|
|
42
|
+
type: import("vue").PropType<string>;
|
|
43
|
+
};
|
|
44
|
+
showLabel: {
|
|
45
|
+
type: import("vue").PropType<boolean>;
|
|
46
|
+
};
|
|
47
|
+
autoFocus: {
|
|
48
|
+
type: import("vue").PropType<boolean>;
|
|
49
|
+
};
|
|
50
|
+
showClear: {
|
|
51
|
+
type: import("vue").PropType<boolean>;
|
|
52
|
+
};
|
|
53
|
+
useLabelInErrors: {
|
|
54
|
+
type: import("vue").PropType<boolean>;
|
|
55
|
+
default: boolean;
|
|
56
|
+
};
|
|
57
|
+
wrapperClasses: {
|
|
58
|
+
type: import("vue").PropType<string>;
|
|
59
|
+
};
|
|
60
|
+
getAutocompleteItems: {
|
|
61
|
+
type: import("vue").PropType<(query: string) => MaybeAsync<string[]>>;
|
|
62
|
+
};
|
|
63
|
+
}, {
|
|
64
|
+
resolveAutocompleteItems: () => Promise<void>;
|
|
65
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
66
|
+
change: (val: {
|
|
67
|
+
event?: Event | undefined;
|
|
68
|
+
value: string[];
|
|
69
|
+
}) => void;
|
|
70
|
+
clear: () => void;
|
|
71
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
72
|
+
modelValue: import("vue").PropType<string[]>;
|
|
73
|
+
size: {
|
|
74
|
+
type: import("vue").PropType<InputSize>;
|
|
75
|
+
default: string;
|
|
76
|
+
};
|
|
77
|
+
color: {
|
|
78
|
+
type: import("vue").PropType<InputColor>;
|
|
79
|
+
default: string;
|
|
80
|
+
};
|
|
81
|
+
disabled: {
|
|
82
|
+
type: import("vue").PropType<boolean>;
|
|
83
|
+
};
|
|
84
|
+
placeholder: {
|
|
85
|
+
type: import("vue").PropType<string>;
|
|
86
|
+
};
|
|
87
|
+
label: {
|
|
88
|
+
type: import("vue").PropType<string>;
|
|
89
|
+
};
|
|
90
|
+
name: {
|
|
91
|
+
type: import("vue").PropType<string>;
|
|
92
|
+
required: true;
|
|
93
|
+
};
|
|
94
|
+
rules: {
|
|
95
|
+
type: import("vue").PropType<string | Record<string, unknown> | import("vee-validate").GenericValidateFunction<string[]> | import("vee-validate").GenericValidateFunction<string[]>[] | {
|
|
96
|
+
validate(value: string[], options: Record<string, any>): Promise<string[]>;
|
|
97
|
+
}>;
|
|
98
|
+
};
|
|
99
|
+
validateOnMount: {
|
|
100
|
+
type: import("vue").PropType<boolean>;
|
|
101
|
+
};
|
|
102
|
+
showRequired: {
|
|
103
|
+
type: import("vue").PropType<boolean>;
|
|
104
|
+
};
|
|
105
|
+
validateOnValueUpdate: {
|
|
106
|
+
type: import("vue").PropType<boolean>;
|
|
107
|
+
};
|
|
108
|
+
help: {
|
|
109
|
+
type: import("vue").PropType<string>;
|
|
110
|
+
};
|
|
111
|
+
showLabel: {
|
|
112
|
+
type: import("vue").PropType<boolean>;
|
|
113
|
+
};
|
|
114
|
+
autoFocus: {
|
|
115
|
+
type: import("vue").PropType<boolean>;
|
|
116
|
+
};
|
|
117
|
+
showClear: {
|
|
118
|
+
type: import("vue").PropType<boolean>;
|
|
119
|
+
};
|
|
120
|
+
useLabelInErrors: {
|
|
121
|
+
type: import("vue").PropType<boolean>;
|
|
122
|
+
default: boolean;
|
|
123
|
+
};
|
|
124
|
+
wrapperClasses: {
|
|
125
|
+
type: import("vue").PropType<string>;
|
|
126
|
+
};
|
|
127
|
+
getAutocompleteItems: {
|
|
128
|
+
type: import("vue").PropType<(query: string) => MaybeAsync<string[]>>;
|
|
129
|
+
};
|
|
130
|
+
}>> & {
|
|
131
|
+
onChange?: ((val: {
|
|
132
|
+
event?: Event | undefined;
|
|
133
|
+
value: string[];
|
|
134
|
+
}) => any) | undefined;
|
|
135
|
+
onClear?: (() => any) | undefined;
|
|
136
|
+
}, {
|
|
137
|
+
size: InputSize;
|
|
138
|
+
color: InputColor;
|
|
139
|
+
useLabelInErrors: boolean;
|
|
140
|
+
}, {}>;
|
|
141
|
+
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{}, {
|
|
2
|
+
goUp: () => void;
|
|
3
|
+
goDown: () => void;
|
|
4
|
+
open: () => void;
|
|
5
|
+
close: () => void;
|
|
6
|
+
selectActive: () => void;
|
|
7
|
+
isOpen: () => boolean;
|
|
8
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>, {
|
|
9
|
+
default?(_: {}): any;
|
|
10
|
+
}>;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
13
|
+
new (): {
|
|
14
|
+
$slots: S;
|
|
15
|
+
};
|
|
16
|
+
};
|
package/dist/lib.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),C=require("lodash"),$=require("@heroicons/vue/24/solid"),T=require("@heroicons/vue/24/outline"),N=require("@heroicons/vue/20/solid"),J=require("vee-validate"),Q=require("nanoid"),U=require("@speckle/shared"),O=require("@vueuse/core"),S=require("@headlessui/vue"),ce=require("vue-tippy"),we=require("v3-infinite-loading");const Ve={key:2,style:{margin:"0 !important",width:"0.01px"}},Ee=e.defineComponent({__name:"Button",props:{to:{type:String,required:!1,default:void 0},size:{type:String,default:"base"},fullWidth:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},text:{type:Boolean,default:!1},link:{type:Boolean,default:!1},color:{type:String,default:"default"},external:{type:Boolean,required:!1,default:void 0},disabled:{type:Boolean,required:!1,default:void 0},submit:{type:Boolean,default:!1},iconLeft:{type:[Object,Function],default:null},iconRight:{type:[Object,Function],default:null},hideText:{type:Boolean,default:!1},linkComponent:{type:[Object,Function],default:null},loading:{type:Boolean,default:!1}},emits:["click"],setup(t,{emit:l}){const n=t,o=e.resolveDynamicComponent("NuxtLink"),a=e.resolveDynamicComponent("RouterLink"),c=e.computed(()=>n.linkComponent?n.linkComponent:n.external?"a":C.isObjectLike(o)?o:C.isObjectLike(a)?a:"a"),s=e.computed(()=>{if(!n.to)return n.submit?"submit":"button"}),r=e.computed(()=>n.disabled||n.loading),d=e.computed(()=>n.loading?$.ArrowPathIcon:n.iconLeft),i=e.computed(()=>{const f=[];if(f.push("border-2"),r.value)f.push(n.outlined?"border-foreground-disabled":"bg-foundation-disabled border-transparent");else switch(n.color){case"invert":f.push(n.outlined?"border-foundation dark:border-foreground":"bg-foundation dark:bg-foreground border-transparent");break;case"card":f.push(n.outlined?"border-foundation-2 shadow":"bg-foundation-2 dark:bg-foundation-2 border-foundation shadow");break;case"danger":f.push(n.outlined?"border-danger":"bg-danger border-danger");break;case"secondary":f.push(n.outlined?"border-foundation":"bg-foundation border-foundation-2");break;case"warning":f.push(n.outlined?"border-warning":"bg-warning border-warning");break;case"info":f.push(n.outlined?"border-info":"bg-info border-info");break;case"success":f.push(n.outlined?"border-success":"bg-success border-success");break;case"default":default:f.push(n.outlined?"border-primary hover:border-primary-focus":"bg-primary hover:bg-primary-focus border-transparent");break}return f.join(" ")}),p=e.computed(()=>{const f=[];if(!n.text&&!n.link)if(r.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 r.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(" ")}),g=e.computed(()=>{const f=[];return f.push(n.rounded?"rounded-full":"rounded-md"),f.join(" ")}),m=e.computed(()=>{const f=[];if(!r.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(" ")}),k=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"}}),u=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"),r.value&&f.push("cursor-not-allowed"),f.join(" ")}),h=e.computed(()=>{const f=[];return!r.value&&!n.link&&!n.text&&f.push("active:scale-[0.97]"),!r.value&&n.link&&f.push("underline decoration-transparent decoration-2 underline-offset-4 hover:decoration-inherit"),f.join(" ")}),y=e.computed(()=>{const f=n.link||n.text;return["transition inline-flex justify-center items-center space-x-2 outline-none select-none",B.value,k.value,p.value,f?"":i.value,f?"":g.value,f?"":m.value,n.link?"":u.value,h.value].join(" ")}),b=e.computed(()=>{const f=[""];switch(n.loading&&f.push("animate-spin"),n.size){case"xs":f.push("h-3 w-3");break;case"sm":f.push("h-4 w-4");break;case"lg":f.push("h-6 w-6");break;case"xl":f.push("h-8 w-8");break;case"base":default:f.push("h-5 w-5");break}return f.join(" ")}),x=f=>{if(r.value){f.preventDefault(),f.stopPropagation(),f.stopImmediatePropagation();return}l("click",f)};return(f,E)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.to?c.value:"button"),{href:t.to,to:t.to,type:s.value,external:t.external,class:e.normalizeClass(y.value),disabled:r.value,role:"button",onClick:x},{default:e.withCtx(()=>[d.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d.value),{key:0,class:e.normalizeClass(`${b.value} ${t.hideText?"":"mr-2"}`)},null,8,["class"])):e.createCommentVNode("",!0),t.hideText?(e.openBlock(),e.createElementBlock("div",Ve," ")):e.renderSlot(f.$slots,"default",{key:1},()=>[e.createTextVNode("Button")],!0),t.iconRight||!t.loading?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.iconRight),{key:3,class:e.normalizeClass(`${b.value} ${t.hideText?"":"ml-2"}`)},null,8,["class"])):e.createCommentVNode("",!0)]),_:3},8,["href","to","type","external","class","disabled"]))}});const ue=(t,l)=>{const n=t.__vccOpts||t;for(const[o,a]of l)n[o]=a;return n},A=ue(Ee,[["__scopeId","data-v-38aa371e"]]),de=e.defineComponent({__name:"Link",props:{to:{type:String,required:!1,default:void 0},external:{type:Boolean,required:!1,default:void 0},disabled:{type:Boolean,required:!1,default:void 0},size:{type:String,default:"base"},foregroundLink:{type:Boolean,default:!1},iconLeft:{type:[Object,Function],default:null},iconRight:{type:[Object,Function],default:null},hideText:{type:Boolean,default:!1}},emits:["click"],setup(t,{emit:l}){const n=t,o=a=>{if(n.disabled){a.preventDefault(),a.stopPropagation(),a.stopImmediatePropagation();return}l("click",a)};return(a,c)=>(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:o},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default",{},()=>[e.createTextVNode("Link")])]),_:3},8,["to","external","disabled","size","foreground-link","icon-left","icon-right","hide-text"]))}});var M=(t=>(t[t.Success=0]="Success",t[t.Warning=1]="Warning",t[t.Danger=2]="Danger",t[t.Info=3]="Info",t))(M||{});const Se={"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"},Ne={class:"flex w-full flex-col items-center space-y-4 sm:items-end"},$e={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"},Ie={class:"p-4"},ze={class:"flex items-start"},Le={class:"flex-shrink-0"},De={class:"ml-2 w-0 flex-1 flex flex-col"},Pe={key:0,class:"text-foreground font-bold"},je={key:1,class:"label label--light text-foreground-2"},_e={key:2,class:"flex justify-start mt-2"},Te=e.createElementVNode("span",{class:"sr-only"},"Close",-1),Oe=e.defineComponent({__name:"ToastRenderer",props:{notification:null},emits:["update:notification"],setup(t,{emit:l}){const n=t,o=e.computed(()=>{var s,r;return!((s=n.notification)!=null&&s.description)&&!((r=n.notification)!=null&&r.cta)}),a=()=>{l("update:notification",null)},c=s=>{var r,d,i;(i=(d=(r=n.notification)==null?void 0:r.cta)==null?void 0:d.onClick)==null||i.call(d,s),a()};return(s,r)=>(e.openBlock(),e.createElementBlock("div",Se,[e.createElementVNode("div",Ne,[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",$e,[e.createElementVNode("div",Ie,[e.createElementVNode("div",ze,[e.createElementVNode("div",Le,[t.notification.type===e.unref(M).Success?(e.openBlock(),e.createBlock(e.unref(T.CheckCircleIcon),{key:0,class:"h-6 w-6 text-success","aria-hidden":"true"})):t.notification.type===e.unref(M).Danger?(e.openBlock(),e.createBlock(e.unref(T.XCircleIcon),{key:1,class:"h-6 w-6 text-danger","aria-hidden":"true"})):t.notification.type===e.unref(M).Warning?(e.openBlock(),e.createBlock(e.unref(T.ExclamationCircleIcon),{key:2,class:"h-6 w-6 text-warning","aria-hidden":"true"})):t.notification.type===e.unref(M).Info?(e.openBlock(),e.createBlock(e.unref(T.InformationCircleIcon),{key:3,class:"h-6 w-6 text-info","aria-hidden":"true"})):e.createCommentVNode("",!0)]),e.createElementVNode("div",De,[t.notification.title?(e.openBlock(),e.createElementBlock("p",Pe,e.toDisplayString(t.notification.title),1)):e.createCommentVNode("",!0),t.notification.description?(e.openBlock(),e.createElementBlock("p",je,e.toDisplayString(t.notification.description),1)):e.createCommentVNode("",!0),t.notification.cta?(e.openBlock(),e.createElementBlock("div",_e,[e.createVNode(de,{to:t.notification.cta.url,class:"label",primary:"",onClick:c},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.notification.cta.title),1)]),_:1},8,["to"])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:e.normalizeClass(["ml-4 flex flex-shrink-0",{"self-center":o.value}])},[e.createElementVNode("button",{type:"button",class:"inline-flex rounded-md bg-foundation text-foreground-2 hover:text-foreground focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2",onClick:a},[Te,e.createVNode(e.unref(N.XMarkIcon),{class:"h-6 w-6","aria-hidden":"true"})])],2)])])])):e.createCommentVNode("",!0)]),_:1})])]))}}),Ae=e.createElementVNode("circle",{cx:"4",cy:"4",r:"3"},null,-1),Me=[Ae],Y=e.defineComponent({__name:"Badge",props:{size:null,colorClasses:null,dot:{type:Boolean},dotIconColorClasses:null,iconLeft:null,rounded:{type:Boolean},clickableIcon:{type:Boolean}},emits:["click-icon"],setup(t,{emit:l}){const n=t,o=e.computed(()=>n.colorClasses||"bg-blue-100 text-blue-800"),a=e.computed(()=>n.dotIconColorClasses||"text-blue-400"),c=e.computed(()=>{const i=["inline-flex items-center",o.value,n.size==="lg"?"px-3 py-0.5 label":"px-2.5 py-0.5 caption font-medium"];return n.rounded?(i.push("rounded"),i.push(n.size==="lg"?"px-2 py-0.5 label":"px-2.5 py-0.5 caption font-medium")):(i.push("rounded-full"),i.push(n.size==="lg"?"px-2.5 py-0.5 label":"px-2.5 py-0.5 caption font-medium")),i.join(" ")}),s=e.computed(()=>{const i=["mt-0.5 ml-0.5 inline-flex h-4 w-4 flex-shrink-0 items-center justify-center rounded-full focus:outline-none"];return n.clickableIcon?i.push("cursor-pointer"):i.push("cursor-default"),i.join(" ")}),r=e.computed(()=>["-ml-0.5 mr-1.5 h-2 w-2",a.value].join(" ")),d=i=>{if(!n.clickableIcon){i.stopPropagation(),i.stopImmediatePropagation(),i.preventDefault();return}l("click-icon",i)};return(i,p)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(c.value)},[t.dot?(e.openBlock(),e.createElementBlock("svg",{key:0,class:e.normalizeClass(r.value),fill:"currentColor",viewBox:"0 0 8 8"},Me,2)):e.createCommentVNode("",!0),e.renderSlot(i.$slots,"default",{},()=>[e.createTextVNode("Badge")]),t.iconLeft?(e.openBlock(),e.createElementBlock("button",{key:1,class:e.normalizeClass(s.value),onClick:p[0]||(p[0]=g=>d(g))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.iconLeft),{class:e.normalizeClass(["h-4 w-4",a.value])},null,8,["class"]))],2)):e.createCommentVNode("",!0)],2))}});let ie=[];function Fe(t){ie=ie?t:t.slice()}var F=(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))(F||{});function me(t){const{props:{modelValue:l,steps:n,orientation:o,goVerticalBelow:a,nonInteractive:c,stepsPadding:s},emit:r}=t,d=e.computed(()=>(o==null?void 0:o.value)==="vertical"?"vertical":"horizontal"),i=e.computed({get:()=>C.clamp((l==null?void 0:l.value)||0,-1,n.value.length),set:h=>r("update:modelValue",C.clamp(h,0,n.value.length))}),p=h=>`${h+1}`,g=h=>h===i.value,m=h=>h<i.value,k=(h,y)=>{var x;if(c!=null&&c.value){y==null||y.preventDefault(),y==null||y.stopPropagation(),y==null||y.stopImmediatePropagation();return}i.value=h;const b=n.value[i.value];(x=b==null?void 0:b.onClick)==null||x.call(b)},u=e.computed(()=>{const h=["flex"];let y,b;return(s==null?void 0:s.value)==="xs"?(y="space-x-2",b="space-y-1"):(s==null?void 0:s.value)==="sm"?(y="space-x-4",b="space-y-1"):(y="space-x-8",b="space-y-4"),h.push("flex"),d.value==="vertical"||a!=null&&a.value?(h.push(`flex-col ${b} justify-center`),(a==null?void 0:a.value)===F.sm?h.push(`sm:flex-row sm:space-y-0 sm:justify-start sm:${y} sm:items-center`):(a==null?void 0:a.value)===F.md?h.push(`md:flex-row md:space-y-0 md:justify-start md:${y} md:items-center`):(a==null?void 0:a.value)===F.lg?h.push(`lg:flex-row lg:space-y-0 lg:justify-start lg:${y} lg:items-center`):(a==null?void 0:a.value)===F.xl&&h.push(`xl:flex-row xl:space-y-0 xl:justify-start xl:${y} xl:items-center`)):h.push(`flex-row ${y} items-center`),h.join(" ")}),B=e.computed(()=>{const h=["flex items-center"];return c!=null&&c.value||h.push("cursor-pointer"),h.join(" ")});return{value:i,isCurrentStep:g,isFinishedStep:m,switchStep:k,getStepDisplayValue:p,listClasses:u,linkClasses:B,orientation:d}}Fe(["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 Re=["aria-label"],Ue=["href","onClick"],qe={class:"flex space-x-3 items-center text-primary-focus normal font-medium leading-5"},We={class:"shrink-0 h-8 w-8 rounded-full bg-primary-focus text-foreground-on-primary inline-flex items-center justify-center"},He={class:"flex flex-col"},Ke={key:0,class:"label label--light text-foreground"},Ge=["href","onClick"],Xe={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 border-2 border-primary-focus inline-flex items-center justify-center"},Qe={class:"flex flex-col"},Ye={key:0,class:"label label--light text-foreground"},Ze=["href","onClick"],et={class:"flex space-x-3 items-center text-foreground-disabled normal font-medium leading-5"},tt={class:"shrink-0 h-8 w-8 rounded-full border-2 border-foreground-disabled inline-flex items-center justify-center"},nt={class:"flex flex-col"},ot={key:0,class:"label label--light"},lt=e.defineComponent({__name:"Number",props:{ariaLabel:null,orientation:null,steps:null,modelValue:null,goVerticalBelow:null,nonInteractive:{type:Boolean},stepsPadding:null},emits:["update:modelValue"],setup(t,{emit:l}){const n=t,{isCurrentStep:o,isFinishedStep:a,switchStep:c,getStepDisplayValue:s,listClasses:r,linkClasses:d}=me({props:e.toRefs(n),emit:l});return(i,p)=>(e.openBlock(),e.createElementBlock("nav",{class:"flex justify-center","aria-label":t.ariaLabel||"Progress steps"},[e.createElementVNode("ol",{class:e.normalizeClass(e.unref(r))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.steps,(g,m)=>(e.openBlock(),e.createElementBlock("li",{key:g.name},[e.unref(a)(m)?(e.openBlock(),e.createElementBlock("a",{key:0,href:g.href,class:e.normalizeClass(e.unref(d)),onClick:k=>e.unref(c)(m,k)},[e.createElementVNode("div",qe,[e.createElementVNode("div",We,[e.createVNode(e.unref(N.CheckIcon),{class:"w-5 h-5"})]),e.createElementVNode("div",He,[e.createElementVNode("div",null,e.toDisplayString(g.name),1),g.description?(e.openBlock(),e.createElementBlock("div",Ke,e.toDisplayString(g.description),1)):e.createCommentVNode("",!0)])])],10,Ue)):e.unref(o)(m)?(e.openBlock(),e.createElementBlock("a",{key:1,href:g.href,class:e.normalizeClass(e.unref(d)),"aria-current":"step",onClick:k=>e.unref(c)(m,k)},[e.createElementVNode("div",Xe,[e.createElementVNode("div",Je,e.toDisplayString(e.unref(s)(m)),1),e.createElementVNode("div",Qe,[e.createElementVNode("div",null,e.toDisplayString(g.name),1),g.description?(e.openBlock(),e.createElementBlock("div",Ye,e.toDisplayString(g.description),1)):e.createCommentVNode("",!0)])])],10,Ge)):(e.openBlock(),e.createElementBlock("a",{key:2,href:g.href,class:e.normalizeClass(e.unref(d)),onClick:k=>e.unref(c)(m,k)},[e.createElementVNode("div",et,[e.createElementVNode("div",tt,e.toDisplayString(e.unref(s)(m)),1),e.createElementVNode("div",nt,[e.createElementVNode("div",null,e.toDisplayString(g.name),1),g.description?(e.openBlock(),e.createElementBlock("div",ot,e.toDisplayString(g.description),1)):e.createCommentVNode("",!0)])])],10,Ze))]))),128))],2)],8,Re))}}),at=["aria-label"],st=["href","onClick"],rt={class:"relative flex h-5 w-5 flex-shrink-0 items-center justify-center"},it={key:0,class:"h-3 w-3 rounded-full bg-foreground-2"},ct=["href","onClick"],ut={class:"relative flex h-5 w-5 flex-shrink-0 items-center justify-center","aria-hidden":"true"},dt={key:0,class:"h-3 w-3 rounded-full bg-foreground"},mt=e.createElementVNode("span",{class:"absolute h-4 w-4 rounded-full bg-outline-2"},null,-1),ft=e.createElementVNode("span",{class:"relative block h-2 w-2 rounded-full bg-primary-focus"},null,-1),pt=["href","onClick"],ht={class:"relative flex h-5 w-5 flex-shrink-0 items-center justify-center","aria-hidden":"true"},gt={key:0,class:"h-3 w-3 rounded-full bg-foreground-2"},vt={key:1,class:"h-4 w-4 rounded-full bg-foreground-disabled"},kt=e.defineComponent({__name:"Bullet",props:{ariaLabel:null,basic:{type:Boolean},orientation:null,steps:null,modelValue:null,goVerticalBelow:null,nonInteractive:{type:Boolean},stepsPadding:null},emits:["update:modelValue"],setup(t,{emit:l}){const n=t,{isCurrentStep:o,isFinishedStep:a,switchStep:c,listClasses:s,linkClasses:r}=me({props:e.toRefs(n),emit:l}),d=e.computed(()=>{const p=["h6 font-medium leading-7"];let g;return n.stepsPadding==="xs"?g="ml-1":n.stepsPadding==="sm"?g="ml-2":g="ml-3",p.push(g),n.basic&&p.push("sr-only"),p.join(" ")}),i=e.computed(()=>{const p=[];return n.basic&&p.push("basic"),p.join(" ")});return(p,g)=>(e.openBlock(),e.createElementBlock("nav",{class:"flex justify-center","aria-label":t.ariaLabel||"Progress steps"},[e.createElementVNode("ol",{class:e.normalizeClass([e.unref(s),i.value])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.steps,(m,k)=>(e.openBlock(),e.createElementBlock("li",{key:m.name},[e.unref(a)(k)?(e.openBlock(),e.createElementBlock("a",{key:0,href:m.href,class:e.normalizeClass(e.unref(r)),onClick:u=>e.unref(c)(k,u)},[e.createElementVNode("span",rt,[t.basic?(e.openBlock(),e.createElementBlock("span",it)):(e.openBlock(),e.createBlock(e.unref(N.CheckCircleIcon),{key:1,class:"h-full w-full text-primary","aria-hidden":"true"}))]),e.createElementVNode("span",{class:e.normalizeClass(["text-foreground",d.value])},e.toDisplayString(m.name),3)],10,st)):e.unref(o)(k)?(e.openBlock(),e.createElementBlock("a",{key:1,href:m.href,class:e.normalizeClass(e.unref(r)),"aria-current":"step",onClick:u=>e.unref(c)(k,u)},[e.createElementVNode("span",ut,[t.basic?(e.openBlock(),e.createElementBlock("span",dt)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[mt,ft],64))]),e.createElementVNode("span",{class:e.normalizeClass(["text-primary-focus",d.value])},e.toDisplayString(m.name),3)],10,ct)):(e.openBlock(),e.createElementBlock("a",{key:2,href:m.href,class:e.normalizeClass(e.unref(r)),onClick:u=>e.unref(c)(k,u)},[e.createElementVNode("div",ht,[t.basic?(e.openBlock(),e.createElementBlock("span",gt)):(e.openBlock(),e.createElementBlock("div",vt))]),e.createElementVNode("p",{class:e.normalizeClass(["text-foreground-disabled",d.value])},e.toDisplayString(m.name),3)],10,pt))]))),128))],2)],8,at))}}),yt=["disabled"],bt=e.defineComponent({__name:"CardButton",props:{disabled:{type:Boolean},modelValue:{type:Boolean}},emits:["update:modelValue","click"],setup(t,{emit:l}){const n=t,o=e.computed(()=>{const c=["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?c.push("bg-foundation-disabled text-foreground-2 cursor-not-allowed"):(c.push(n.modelValue?"bg-primary-focus text-foreground-on-primary":"bg-foundation text-foreground"),c.push("ring-outline-2 hover:ring-4")),c.join(" ")}),a=c=>{if(n.disabled){c.preventDefault(),c.stopPropagation(),c.stopImmediatePropagation();return}l("update:modelValue",!n.modelValue),l("click",c)};return(c,s)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(o.value),disabled:t.disabled,onClick:a},[e.renderSlot(c.$slots,"default",{},()=>[e.createTextVNode("Text")])],10,yt))}}),xt={class:"relative flex items-start"},Ct={class:"flex h-6 items-center"},Bt=["id","checked","aria-describedby","name","disabled","value"],wt={class:"ml-2 text-sm",style:{"padding-top":"2px"}},Vt=["for"],Et={key:0,class:"text-danger ml-1"},St=["id"],Nt=e.defineComponent({inheritAttrs:!1,__name:"Checkbox",props:{name:{type:String,required:!0},disabled:{type:Boolean,default:!1},label:{type:String,default:void 0},description:{type:String,default:void 0},inlineDescription:{type:Boolean,default:!1},rules:{type:[String,Object,Function,Array],default:void 0},validateOnMount:{type:Boolean,default:!1},showRequired:{type:Boolean,default:!1},modelValue:{type:[String,Boolean],default:void 0},value:{type:[String,Boolean],default:!0},id:{type:String,default:void 0},hideLabel:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t){const l=t,n=h=>`${h}-${Q.nanoid()}`,o=e.computed(()=>l.value||l.name),{checked:a,errorMessage:c,handleChange:s,value:r}=J.useField(l.name,l.rules,{validateOnMount:l.validateOnMount,type:"checkbox",checkedValue:o,initialValue:l.modelValue||void 0}),d=e.computed(()=>l.label||l.name),i=e.computed(()=>c.value?"border-danger-lighter":"border-foreground-4 "),p=e.computed(()=>l.description||c.value),g=e.computed(()=>`${l.name}-description`),m=e.computed(()=>{const h=[];return l.inlineDescription?h.push("inline ml-2"):h.push("block"),c.value?h.push("text-danger"):h.push("text-foreground-2"),h.join(" ")}),k=e.ref(n("checkbox")),u=e.computed(()=>l.id||k.value),B=h=>{l.disabled||s(h)};return e.onMounted(()=>{const h=l.modelValue,y=r.value,b=Array.isArray(h)?h.includes(l.value):h===l.value,x=Array.isArray(y)?y.includes(l.value):y===l.value;b!==x&&s(h)}),(h,y)=>(e.openBlock(),e.createElementBlock("div",xt,[e.createElementVNode("div",Ct,[e.createElementVNode("input",e.mergeProps({id:u.value,checked:e.unref(a),"aria-describedby":g.value,name:t.name,disabled:t.disabled,value:o.value,type:"checkbox",class:["h-4 w-4 rounded text-primary focus:ring-primary bg-foundation disabled:cursor-not-allowed disabled:bg-disabled disabled:text-disabled-2",i.value]},h.$attrs,{onChange:B}),null,16,Bt)]),e.createElementVNode("div",wt,[e.createElementVNode("label",{for:u.value,class:e.normalizeClass(["font-medium text-foreground",{"sr-only":t.hideLabel}])},[e.createElementVNode("span",null,e.toDisplayString(d.value),1),t.showRequired?(e.openBlock(),e.createElementBlock("span",Et,"*")):e.createCommentVNode("",!0)],10,Vt),p.value?(e.openBlock(),e.createElementBlock("p",{key:0,id:g.value,class:e.normalizeClass(m.value)},e.toDisplayString(p.value),11,St)):e.createCommentVNode("",!0)])]))}});function fe(t){const{props:l,inputEl:n,emit:o}=t,{value:a,errorMessage:c}=J.useField(l.name,l.rules,{validateOnMount:e.unref(l.validateOnMount),validateOnValueUpdate:e.unref(l.validateOnValueUpdate),initialValue:e.unref(l.modelValue)||void 0}),s=e.computed(()=>{const x=["block label text-foreground-2 mb-2"];return e.unref(l.showLabel)||x.push("sr-only"),x.join(" ")}),r=e.computed(()=>["focus:outline-none disabled:cursor-not-allowed disabled:bg-foundation-disabled","disabled:text-disabled-muted placeholder:text-foreground-2","rounded"].join(" ")),d=e.computed(()=>{const x=["block w-full text-foreground transition-all",r.value];return c.value?x.push("focus:border-danger focus:ring-danger border-2 border-danger text-danger-darker"):x.push("border-0 focus:ring-2 focus:ring-outline-2"),e.unref(l.color)==="foundation"?x.push("bg-foundation shadow-sm hover:shadow"):x.push("bg-foundation-page"),x.join(" ")}),i=e.ref(Q.nanoid()),p=e.computed(()=>e.unref(l.label)||e.unref(l.name)),g=e.computed(()=>{const x=c.value;return!x||!e.unref(l.useLabelInErrors)?x:x.replace("Value",p.value)}),m=e.computed(()=>g.value&&e.unref(l.hideErrorMessage)),k=e.computed(()=>g.value||e.unref(l.help)),u=e.computed(()=>!!k.value),B=e.computed(()=>u.value?`${e.unref(l.name)}-${i.value}`:void 0),h=e.computed(()=>{const x=["mt-2 text-sm"];return x.push(c.value?"text-danger":"text-foreground-2"),x.join(" ")}),y=()=>{var x;(x=n.value)==null||x.focus()},b=()=>{a.value=C.isArray(a.value)?[]:"",o("change",{value:a.value}),o("clear")};return e.onMounted(()=>{e.unref(l.autoFocus)&&y()}),{coreInputClasses:r,coreClasses:d,title:p,value:a,helpTipId:B,helpTipClasses:h,helpTip:k,hideHelpTip:m,errorMessage:g,clear:b,focus:y,labelClasses:s}}const $t=["for"],It={class:"relative"},zt=["id","name","placeholder","disabled","aria-invalid","aria-describedby"],Lt=e.createElementVNode("span",{class:"text-xs sr-only"},"Clear input",-1),Dt=["id"],Pt=e.defineComponent({__name:"TextArea",props:{name:null,showLabel:{type:Boolean},help:null,placeholder:null,label:null,disabled:{type:Boolean},rules:null,validateOnMount:{type:Boolean},validateOnValueUpdate:{type:Boolean},useLabelInErrors:{type:Boolean,default:!0},autoFocus:{type:Boolean},modelValue:{default:""},showClear:{type:Boolean},fullWidth:{type:Boolean},showRequired:{type:Boolean},color:{default:"page"},textareaClasses:null},emits:["update:modelValue","change","input","clear"],setup(t,{expose:l,emit:n}){const o=t,a=e.ref(null),{coreClasses:c,title:s,value:r,helpTipId:d,helpTipClasses:i,helpTip:p,errorMessage:g,labelClasses:m,clear:k,focus:u}=fe({props:e.toRefs(o),emit:n,inputEl:a}),B=e.computed(()=>{const h=["pl-2"];return o.showClear&&g.value?h.push("pr-12"):(o.showClear||g.value)&&h.push("pr-8"),h.join(" ")});return l({focus:u}),(h,y)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([t.fullWidth?"w-full":""])},[e.createElementVNode("label",{for:t.name,class:e.normalizeClass(e.unref(m))},[e.createElementVNode("span",null,e.toDisplayString(e.unref(s)),1)],10,$t),e.createElementVNode("div",It,[e.withDirectives(e.createElementVNode("textarea",e.mergeProps({id:t.name,ref_key:"inputElement",ref:a,"onUpdate:modelValue":y[0]||(y[0]=b=>e.isRef(r)?r.value=b:null),name:t.name,class:[e.unref(c),B.value,t.textareaClasses||"","min-h-[4rem] simple-scrollbar"],placeholder:t.placeholder,disabled:t.disabled,"aria-invalid":e.unref(g)?"true":"false","aria-describedby":e.unref(d)},h.$attrs,{onChange:y[1]||(y[1]=b=>h.$emit("change",{event:b,value:e.unref(r)})),onInput:y[2]||(y[2]=b=>h.$emit("input",{event:b,value:e.unref(r)}))}),null,16,zt),[[e.vModelText,e.unref(r)]]),t.showClear?(e.openBlock(),e.createElementBlock("a",{key:0,title:"Clear input",class:"absolute top-2 right-0 flex items-center pr-2 cursor-pointer",onClick:y[3]||(y[3]=(...b)=>e.unref(k)&&e.unref(k)(...b)),onKeydown:y[4]||(y[4]=(...b)=>e.unref(k)&&e.unref(k)(...b))},[Lt,e.createVNode(e.unref(N.XMarkIcon),{class:"h-5 w-5 text-foreground","aria-hidden":"true"})],32)):e.createCommentVNode("",!0),e.unref(g)?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["pointer-events-none absolute inset-y-0 right-0 flex items-start mt-2",t.showClear?"pr-8":"pr-2"])},[e.createVNode(e.unref(N.ExclamationCircleIcon),{class:"h-4 w-4 text-danger","aria-hidden":"true"})],2)):e.createCommentVNode("",!0),t.showRequired&&!e.unref(g)?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["pointer-events-none absolute inset-y-0 mt-0.5 text-4xl right-0 flex items-start text-danger opacity-50",[t.showClear?"pr-8":"pr-2"]])}," * ",2)):e.createCommentVNode("",!0)]),e.unref(d)?(e.openBlock(),e.createElementBlock("p",{key:0,id:e.unref(d),class:e.normalizeClass(e.unref(i))},e.toDisplayString(e.unref(p)),11,Dt)):e.createCommentVNode("",!0)],2))}}),jt=["for"],_t={class:"relative"},Tt={key:0,class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2"},Ot=["id","type","name","placeholder","disabled","aria-invalid","aria-describedby"],At=e.createElementVNode("span",{class:"text-xs sr-only"},"Clear input",-1),Mt=["id"],Ft=e.defineComponent({inheritAttrs:!1,__name:"TextInput",props:{type:{type:String,default:"text"},name:{type:String,required:!0},showLabel:{type:Boolean,required:!1},help:{type:String,default:void 0},placeholder:{type:String,default:void 0},label:{type:String,default:void 0},showRequired:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},rules:{type:[String,Object,Function,Array],default:void 0},validateOnMount:{type:Boolean,default:!1},validateOnValueUpdate:{type:Boolean,default:!1},useLabelInErrors:{type:Boolean,default:!0},customIcon:{type:[Object,Function],default:void 0},autoFocus:{type:Boolean,default:!1},modelValue:{type:String,default:""},size:{type:String,default:"base"},showClear:{type:Boolean,default:!1},fullWidth:{type:Boolean,default:!1},inputClasses:{type:String,default:null},hideErrorMessage:{type:Boolean,default:!1},wrapperClasses:{type:String,default:()=>""},color:{type:String,default:"page"}},emits:["update:modelValue","change","input","clear","focusin","focusout"],setup(t,{expose:l,emit:n}){const o=t,a=e.useSlots(),c=e.ref(null),{coreClasses:s,title:r,value:d,helpTipId:i,helpTipClasses:p,helpTip:g,hideHelpTip:m,errorMessage:k,clear:u,focus:B,labelClasses:h}=fe({props:e.toRefs(o),emit:n,inputEl:c}),y=e.computed(()=>{const E=["h-5 w-5"];return k.value?E.push("text-danger"):E.push("text-foreground-2"),E.join(" ")}),b=e.computed(()=>["email","password"].includes(o.type)||o.customIcon),x=e.computed(()=>{const E=[];return b.value?E.push("pl-8"):E.push("pl-2"),a["input-right"]||(k.value||o.showClear)&&(k.value&&o.showClear?E.push("pr-12"):E.push("pr-8")),E.join(" ")}),f=e.computed(()=>{switch(o.size){case"sm":return"h-6";case"lg":return"h-10";case"xl":return"h-14";case"base":default:return"h-8"}});return l({focus:B}),(E,I)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([t.fullWidth?"w-full":"",t.wrapperClasses])},[e.createElementVNode("label",{for:t.name,class:e.normalizeClass(e.unref(h))},[e.createElementVNode("span",null,e.toDisplayString(e.unref(r)),1)],10,jt),e.createElementVNode("div",_t,[b.value?(e.openBlock(),e.createElementBlock("div",Tt,[t.customIcon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.customIcon),{key:0,class:e.normalizeClass(y.value),"aria-hidden":"true"},null,8,["class"])):t.type==="email"?(e.openBlock(),e.createBlock(e.unref(N.EnvelopeIcon),{key:1,class:e.normalizeClass(y.value),"aria-hidden":"true"},null,8,["class"])):t.type==="password"?(e.openBlock(),e.createBlock(e.unref(N.KeyIcon),{key:2,class:e.normalizeClass(y.value),"aria-hidden":"true"},null,8,["class"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",e.mergeProps({id:t.name,ref_key:"inputElement",ref:c,"onUpdate:modelValue":I[0]||(I[0]=L=>e.isRef(d)?d.value=L:null),type:t.type,name:t.name,class:[e.unref(s),x.value,f.value,t.inputClasses||""],placeholder:t.placeholder,disabled:t.disabled,"aria-invalid":e.unref(k)?"true":"false","aria-describedby":e.unref(i),role:"textbox"},E.$attrs,{onChange:I[1]||(I[1]=L=>E.$emit("change",{event:L,value:e.unref(d)})),onInput:I[2]||(I[2]=L=>E.$emit("input",{event:L,value:e.unref(d)}))}),null,16,Ot),[[e.vModelDynamic,e.unref(d)]]),e.renderSlot(E.$slots,"input-right",{},()=>[t.showClear?(e.openBlock(),e.createElementBlock("a",{key:0,title:"Clear input",class:"absolute inset-y-0 right-0 flex items-center pr-2 cursor-pointer",onClick:I[3]||(I[3]=(...L)=>e.unref(u)&&e.unref(u)(...L)),onKeydown:I[4]||(I[4]=(...L)=>e.unref(u)&&e.unref(u)(...L))},[At,e.createVNode(e.unref(N.XMarkIcon),{class:"h-5 w-5 text-foreground","aria-hidden":"true"})],32)):e.createCommentVNode("",!0),e.unref(k)?(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(N.ExclamationCircleIcon),{class:"h-4 w-4 text-danger","aria-hidden":"true"})],2)):e.createCommentVNode("",!0),t.showRequired&&!e.unref(k)?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["pointer-events-none absolute inset-y-0 mt-3 text-4xl right-0 flex items-center text-danger opacity-50",[t.showClear?"pr-8":"pr-2"]])}," * ",2)):e.createCommentVNode("",!0)])]),e.unref(i)&&!e.unref(m)?(e.openBlock(),e.createElementBlock("p",{key:0,id:e.unref(i),class:e.normalizeClass(e.unref(p))},e.toDisplayString(e.unref(g)),11,Mt)):e.createCommentVNode("",!0)],2))}}),pe=/^https?:\/\//,Z=/^[\w-_.+]+@[\w-_.+]+$/,Rt=t=>(t||"").match(Z)?!0:"Value should be a valid e-mail address",Ut=t=>(t||"").split(",").map(o=>o.trim()).every(o=>o.match(Z))||"Value should be one or multiple comma-delimited e-mail addresses",qt=t=>(C.isString(t)&&(t=t.trim()),t?!0:"Value is required"),Wt=(t,l)=>(n,o)=>n===o.form[t]?!0:`Value must be the same as in field '${l||t}'`,Ht=t=>l=>{const{minLength:n,maxLength:o}=t;return l=U.isNullOrUndefined(l)?"":l,C.isString(l)?!C.isUndefined(n)&&l.length<n?`Value needs to be at least ${n} characters long`:!C.isUndefined(o)&&l.length>o?`Value needs to be no more than ${o} characters long`:!0:"Value should be a text string"},Kt=t=>l=>{const{match:n,message:o}=t;return C.isString(l)?n?C.isString(n)?l.includes(n)?!0:o:n.test(l)?!0:o:!0:"Value should be a text string"},Gt=t=>pe.test(t)?!0:"Value is not a valid URL",Xt=t=>Array.isArray(t)&&t.length>0?!0:"Value should have at least a single item selected",Jt=Object.freeze(Object.defineProperty({__proto__:null,VALID_EMAIL:Z,VALID_HTTP_URL:pe,isEmail:Rt,isItemSelected:Xt,isOneOrMultipleEmails:Ut,isRequired:qt,isSameAs:Wt,isStringOfLength:Ht,isUrl:Gt,stringContains:Kt},Symbol.toStringTag,{value:"Module"}));function he(t){const{skipCalculation:l,elementToWatchForChanges:n,itemContainer:o,trackResize:a=!1,trackMutations:c=!0}=t||{},s=e.ref(0),r=()=>{const d=o.value;if(l!=null&&l.value||!d)return;const i=d.children;let p=0,g=0,m;for(const k of i){const u=k.offsetTop;C.isUndefined(m)?(m=u,p+=1):u===m&&(p+=1),g+=1}s.value=g-p};return a&&O.useResizeObserver(n,r),c&&O.useMutationObserver(n,r,{childList:!0,subtree:!0}),{hiddenItemCount:s}}function ee(t){const{props:l,emit:n,dynamicVisibility:o}=t;let a;if(o){const{elementToWatchForChanges:i,itemContainer:p}=o;a=he({skipCalculation:e.computed(()=>{var m;return!((m=l.multiple)!=null&&m.value)}),elementToWatchForChanges:i,itemContainer:p}).hiddenItemCount}else a=e.ref(0);const c=e.computed({get:()=>{var p,g;const i=(p=l.modelValue)==null?void 0:p.value;return(g=l.multiple)!=null&&g.value?C.isArray(i)?i:[]:C.isArray(i)?void 0:i},set:i=>{var p,g,m;if((p=l.multiple)!=null&&p.value&&!C.isArray(i)){console.warn("Attempting to set non-array value in selector w/ multiple=true");return}else if(!((g=l.multiple)!=null&&g.value)&&C.isArray(i)){console.warn("Attempting to set array value in selector w/ multiple=false");return}n("update:modelValue",(m=l.multiple)!=null&&m.value?i||[]:i)}}),s=i=>C.isArray(i);return{selectedValue:c,hiddenSelectedItemCount:a,isArrayValue:s,isMultiItemArrayValue:i=>C.isArray(i)&&i.length>1,firstItem:i=>s(i)?i[0]:i}}const Qt=t=>(e.pushScopeId("data-v-60cf597b"),t=t(),e.popScopeId(),t),Yt=Qt(()=>e.createElementVNode("div",{class:"swoosher relative top-0 bg-blue-500/50"},null,-1)),Zt=[Yt],en=e.defineComponent({__name:"Bar",props:{loading:{type:Boolean}},setup(t){return(l,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["relative w-full h-1 bg-blue-500/30 text-xs text-foreground-on-primary overflow-hidden rounded-xl",t.loading?"opacity-100":"opacity-0"])},Zt,2))}});const te=ue(en,[["__scopeId","data-v-60cf597b"]]),tn={class:"flex items-center justify-between w-full"},nn={class:"block truncate grow text-left"},on={class:"pointer-events-none shrink-0 ml-1 flex items-center space-x-2"},ln={key:1,class:"text-4xl text-danger opacity-50 h-4 w-4 leading-6"},an=["disabled"],sn={key:0,class:"flex flex-col mx-1 mb-1"},rn=e.createElementVNode("span",{class:"sr-only label text-foreground"},"Search",-1),cn={class:"relative"},un={class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2"},dn=["placeholder"],mn={key:0,class:"px-1"},fn={key:1},pn=e.createElementVNode("div",{class:"text-foreground-2 text-center"},"Nothing found 🤷♂️",-1),hn={class:e.normalizeClass(["block truncate"])},gn=["id"],ne=e.defineComponent({__name:"Base",props:{multiple:{type:Boolean,default:!1},items:{type:Array,default:()=>[]},modelValue:{type:[Object,Array,String],default:void 0},search:{type:Boolean,default:!1},filterPredicate:{type:Function,default:void 0},disabledItemPredicate:{type:Function,default:void 0},getSearchResults:{type:Function,default:void 0},searchPlaceholder:{type:String,default:"Search"},label:{type:String,required:!0},placeholder:{type:String},showLabel:{type:Boolean,default:!1},name:{type:String,required:!0},by:{type:String,required:!1},disabled:{type:Boolean,default:!1},buttonStyle:{type:String,default:"base"},hideCheckmarks:{type:Boolean,default:!1},allowUnset:{type:Boolean,default:!0},clearable:{type:Boolean,default:!1},rules:{type:[String,Object,Function,Array],default:void 0},validateOnMount:{type:Boolean,default:!1},validateOnValueUpdate:{type:Boolean,default:!1},useLabelInErrors:{type:Boolean,default:!0},help:{type:String,default:void 0},fixedHeight:{type:Boolean,default:!1},fullyControlValue:{type:Boolean,default:!1},showRequired:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{expose:l,emit:n}){const o=t,a=v=>C.isObjectLike(v),{value:c,errorMessage:s}=J.useField(o.name,o.rules,{validateOnMount:o.validateOnMount,validateOnValueUpdate:o.validateOnValueUpdate,initialValue:o.modelValue}),r=e.ref(null),d=e.ref(""),i=e.ref([]),p=e.ref(!1),g=e.ref(1),m=e.ref(Q.nanoid()),k=e.computed(()=>e.unref(o.label)||e.unref(o.name)),u=e.computed(()=>{const v=s.value;return!v||!e.unref(o.useLabelInErrors)?v:v.replace("Value",k.value)}),B=e.computed(()=>u.value||e.unref(o.help)),h=e.computed(()=>!!B.value),y=e.computed(()=>h.value?`${e.unref(o.name)}-${m.value}`:void 0),b=e.computed(()=>s.value?"text-danger":"text-foreground-2"),x=e.computed(()=>o.buttonStyle!=="simple"&&o.clearable&&!o.disabled),f=e.computed(()=>{const v=["relative flex group"];return s.value?(v.push("hover:shadow rounded-md"),v.push("text-danger-darker focus:border-danger focus:ring-danger"),o.buttonStyle!=="simple"&&v.push("outline outline-2 outline-danger")):o.buttonStyle!=="simple"&&(v.push("hover:shadow rounded-md"),v.push("outline outline-2 outline-primary-muted")),o.fixedHeight&&v.push("h-8"),v.join(" ")}),E=e.computed(()=>{const v=[];return o.buttonStyle!=="simple"&&v.push(q.value?"bg-foundation-disabled text-foreground-disabled":""),q.value&&v.push("cursor-not-allowed"),v.join(" ")}),I=e.computed(()=>{const v=["relative z-[1]","flex items-center justify-center text-center shrink-0","rounded-r-md overflow-hidden transition-all","text-foreground",oe.value?`w-6 ${E.value}`:"w-0"];return q.value||(v.push("hover:bg-primary hover:text-foreground-on-primary dark:text-foreground-on-primary"),o.buttonStyle==="tinted"?v.push("bg-outline-3"):v.push("bg-primary-muted")),v.join(" ")}),L=e.computed(()=>{const v=["relative z-[2]","normal rounded-md cursor-pointer transition truncate flex-1","flex items-center",E.value];return o.buttonStyle!=="simple"&&(v.push("py-2 px-3"),q.value||(o.buttonStyle==="tinted"?v.push("bg-foundation-page text-foreground"):v.push("bg-foundation text-foreground"))),x.value&&oe.value&&v.push("rounded-r-none"),v.join(" ")}),W=e.computed(()=>!!(o.search&&(o.filterPredicate||o.getSearchResults))),P=e.computed(()=>W.value&&o.getSearchResults),q=e.computed(()=>o.disabled||!o.items.length&&!P.value),z=e.computed({get:()=>{const v=c.value;return o.multiple?C.isArray(v)?v:[]:C.isArray(v)?void 0:v},set:v=>{if(o.multiple&&!C.isArray(v)){console.warn("Attempting to set non-array value in selector w/ multiple=true");return}else if(!o.multiple&&C.isArray(v)){console.warn("Attempting to set array value in selector w/ multiple=false");return}let V;if(o.multiple)V=v||[];else{const w=c.value;V=o.allowUnset&&w&&v&&G(w)===G(v)?void 0:v}o.fullyControlValue?n("update:modelValue",V):c.value=V,g.value+=1}}),oe=e.computed(()=>o.multiple&&C.isArray(z.value)?z.value.length!==0:!!z.value),be=()=>{o.multiple?z.value=[]:z.value=void 0},xe=e.computed(()=>{const v=d.value;return!W.value||!(v!=null&&v.length)?i.value:o.filterPredicate?i.value.filter(V=>{var w;return((w=o.filterPredicate)==null?void 0:w.call(o,V,v))||!1}):i.value}),le=v=>JSON.stringify(v),G=v=>a(v)?v[o.by||"id"]:v,X=async()=>{if(!(!P.value||!o.getSearchResults)){p.value=!0;try{i.value=await o.getSearchResults(d.value)}finally{p.value=!1}}},Ce=C.debounce(X,1e3),Be=v=>{const{active:V,disabled:w}=v||{},{hideCheckmarks:D}=o,j=["relative transition cursor-pointer select-none py-1.5 pl-3",D?"":"pr-9"];return w?j.push("opacity-50 cursor-not-allowed"):j.push(V?"text-primary":"text-foreground"),j.join(" ")};return e.watch(()=>o.items,v=>{i.value=v.slice()},{immediate:!0}),e.watch(d,()=>{P.value&&Ce()}),e.onMounted(()=>{P.value&&!o.items.length&&X()}),l({triggerSearch:X}),(v,V)=>(e.openBlock(),e.createElementBlock("div",null,[(e.openBlock(),e.createBlock(e.unref(S.Listbox),{key:g.value,modelValue:z.value,"onUpdate:modelValue":V[4]||(V[4]=w=>z.value=w),name:t.name,multiple:t.multiple,by:t.by,disabled:q.value,as:"div"},{default:e.withCtx(()=>[e.createVNode(e.unref(S.ListboxLabel),{class:e.normalizeClass(["block label text-foreground-2 mb-2",{"sr-only":!t.showLabel}])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]),_:1},8,["class"]),e.createElementVNode("div",{class:e.normalizeClass(f.value)},[e.createVNode(e.unref(S.ListboxButton),{class:e.normalizeClass(L.value)},{default:e.withCtx(({open:w})=>[e.createElementVNode("div",tn,[e.createElementVNode("div",nn,[!z.value||e.unref(C.isArray)(z.value)&&!z.value.length?e.renderSlot(v.$slots,"nothing-selected",{key:0},()=>[e.createTextVNode(e.toDisplayString(t.placeholder?t.placeholder:t.label),1)]):e.renderSlot(v.$slots,"something-selected",{key:1,value:z.value},()=>[e.createTextVNode(e.toDisplayString(le(z.value)),1)])]),e.createElementVNode("div",on,[u.value?(e.openBlock(),e.createBlock(e.unref($.ExclamationCircleIcon),{key:0,class:"h-4 w-4 text-danger","aria-hidden":"true"})):t.showRequired?(e.openBlock(),e.createElementBlock("div",ln," * ")):e.createCommentVNode("",!0),w?(e.openBlock(),e.createBlock(e.unref($.ChevronUpIcon),{key:2,class:"h-4 w-4 text-foreground","aria-hidden":"true"})):(e.openBlock(),e.createBlock(e.unref($.ChevronDownIcon),{key:3,class:"h-4 w-4 text-foreground","aria-hidden":"true"}))])])]),_:3},8,["class"]),x.value?e.withDirectives((e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(I.value),disabled:t.disabled,onClick:V[0]||(V[0]=w=>be())},[e.createVNode(e.unref($.XMarkIcon),{class:"w-3 h-3"})],10,an)),[[e.unref(ce.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(S.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:V[3]||(V[3]=w=>{var D;return(D=r.value)==null?void 0:D.focus()})},{default:e.withCtx(()=>[W.value?(e.openBlock(),e.createElementBlock("label",sn,[rn,e.createElementVNode("div",cn,[e.createElementVNode("div",un,[e.createVNode(e.unref($.MagnifyingGlassIcon),{class:"h-5 w-5 text-foreground"})]),e.withDirectives(e.createElementVNode("input",{ref_key:"searchInput",ref:r,"onUpdate:modelValue":V[1]||(V[1]=w=>d.value=w),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:V[2]||(V[2]=e.withModifiers(()=>{},["stop"]))},null,40,dn),[[e.vModelText,d.value]])])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["overflow-auto simple-scrollbar",[W.value?"max-h-52":"max-h-60"]])},[P.value&&p.value?(e.openBlock(),e.createElementBlock("div",mn,[e.createVNode(te,{loading:!0})])):P.value&&!i.value.length?(e.openBlock(),e.createElementBlock("div",fn,[e.renderSlot(v.$slots,"nothing-found",{},()=>[pn])])):e.createCommentVNode("",!0),!P.value||!p.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(xe.value,w=>{var D;return e.openBlock(),e.createBlock(e.unref(S.ListboxOption),{key:G(w),value:w,disabled:((D=t.disabledItemPredicate)==null?void 0:D.call(t,w))||!1},{default:e.withCtx(({active:j,selected:ae})=>{var se,re;return[e.createElementVNode("li",{class:e.normalizeClass(Be({active:j,disabled:((se=t.disabledItemPredicate)==null?void 0:se.call(t,w))||!1}))},[e.createElementVNode("span",hn,[e.renderSlot(v.$slots,"option",{item:w,active:j,selected:ae,disabled:((re=t.disabledItemPredicate)==null?void 0:re.call(t,w))||!1},()=>[e.createTextVNode(e.toDisplayString(le(w)),1)])]),!t.hideCheckmarks&&ae?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass([j?"text-primary":"text-foreground","absolute inset-y-0 right-0 flex items-center pr-4"])},[e.createVNode(e.unref($.CheckIcon),{class:"h-5 w-5","aria-hidden":"true"})],2)):e.createCommentVNode("",!0)],2)]}),_:2},1032,["value","disabled"])}),128)):e.createCommentVNode("",!0)],2)]),_:3})]),_:3})],2)]),_:3},8,["modelValue","name","multiple","by","disabled"])),y.value?(e.openBlock(),e.createElementBlock("p",{key:0,id:y.value,class:e.normalizeClass(["mt-2 text-sm",b.value])},e.toDisplayString(B.value),11,gn)):e.createCommentVNode("",!0)]))}}),ge=e.defineComponent({__name:"SourceAppBadge",props:{sourceApp:null},setup(t){return(l,n)=>(e.openBlock(),e.createBlock(Y,{"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"]))}}),vn={key:0,class:"text-foreground-2 normal"},kn={key:1,class:"flex items-center"},yn={class:"truncate"},bn={class:"flex items-center"},xn={class:"truncate"},Cn=e.defineComponent({__name:"SourceApps",props:{multiple:{type:Boolean,default:!1},modelValue:{type:[Object,Array],default:void 0},search:{type:Boolean,default:!1},searchPlaceholder:{type:String,default:"Search apps"},selectorPlaceholder:{type:String,default:void 0},label:{type:String,required:!0},showLabel:{type:Boolean,default:!1},name:{type:String,default:void 0},items:{type:Array,default:void 0},clearable:{type:Boolean},help:{type:String}},emits:["update:modelValue"],setup(t,{emit:l}){const n=t,o=e.ref(null),a=e.ref(null),{selectedValue:c,hiddenSelectedItemCount:s,isMultiItemArrayValue:r,firstItem:d}=ee({props:e.toRefs(n),emit:l,dynamicVisibility:{elementToWatchForChanges:o,itemContainer:a}}),i=(p,g)=>p.name.toLocaleLowerCase().includes(g.toLocaleLowerCase());return(p,g)=>(e.openBlock(),e.createBlock(ne,{modelValue:e.unref(c),"onUpdate:modelValue":g[0]||(g[0]=m=>e.isRef(c)?c.value=m:null),multiple:t.multiple,items:t.items??e.unref(U.SourceApps),search:t.search,"search-placeholder":t.searchPlaceholder,label:t.label,"show-label":t.showLabel,name:t.name||"sourceApps","filter-predicate":i,clearable:t.clearable,help:t.help,by:"name"},{"nothing-selected":e.withCtx(()=>[t.selectorPlaceholder?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(t.selectorPlaceholder),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(t.multiple?"Select apps":"Select an app"),1)],64))]),"something-selected":e.withCtx(({value:m})=>[e.unref(r)(m)?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"elementToWatchForChanges",ref:o,class:"flex items-center space-x-0.5 h-5"},[e.createElementVNode("div",{ref_key:"itemContainer",ref:a,class:"flex flex-wrap overflow-hidden space-x-0.5 h-5"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m,k=>(e.openBlock(),e.createBlock(ge,{key:k.name,"source-app":k},null,8,["source-app"]))),128))],512),e.unref(s)>0?(e.openBlock(),e.createElementBlock("div",vn," +"+e.toDisplayString(e.unref(s)),1)):e.createCommentVNode("",!0)],512)):(e.openBlock(),e.createElementBlock("div",kn,[e.createElementVNode("div",{class:"h-2 w-2 rounded-full mr-2",style:e.normalizeStyle({backgroundColor:e.unref(d)(m).bgColor})},null,4),e.createElementVNode("span",yn,e.toDisplayString(e.unref(d)(m).name),1)]))]),option:e.withCtx(({item:m})=>[e.createElementVNode("div",bn,[e.createElementVNode("div",{class:"h-2 w-2 rounded-full mr-2",style:e.normalizeStyle({backgroundColor:m.bgColor})},null,4),e.createElementVNode("span",xn,e.toDisplayString(m.name),1)])]),_:1},8,["modelValue","multiple","items","search","search-placeholder","label","show-label","name","clearable","help"]))}}),Bn={class:"flex flex-wrap gap-1.5 text-xs"},wn=e.defineComponent({__name:"Badges",props:{items:null,label:null,name:null,help:null,modelValue:null,multiple:{type:Boolean},rules:null,by:null},emits:["update:modelValue"],setup(t,{emit:l}){const n=t,{selectedValue:o,isArrayValue:a}=ee({props:e.toRefs(n),emit:l}),c=s=>{a(o.value)?o.value=o.value.filter(r=>r.id!==s.id):o.value=void 0};return(s,r)=>(e.openBlock(),e.createBlock(ne,{modelValue:e.unref(o),"onUpdate:modelValue":r[0]||(r[0]=d=>e.isRef(o)?o.value=d:null),multiple:t.multiple,items:t.items,label:t.label,name:t.name,help:t.help,rules:t.rules,by:t.by},{"something-selected":e.withCtx(({value:d})=>[e.createElementVNode("ul",Bn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a)(d)?d:[d],i=>(e.openBlock(),e.createElementBlock("li",{key:i[t.by]},[e.createVNode(Y,{size:"lg","clickable-icon":!0,"icon-left":e.unref($.XMarkIcon),onClickIcon:e.withModifiers(p=>c(i),["stop"])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.text),1)]),_:2},1032,["icon-left","onClickIcon"])]))),128))])]),option:e.withCtx(({item:d})=>[e.createTextVNode(e.toDisplayString(d.text),1)]),_:1},8,["modelValue","multiple","items","label","name","help","rules","by"]))}}),Vn={class:"flex items-center"},En={class:"absolute inset-0 flex items-center gap-2 px-1 text-white"},Sn=e.defineComponent({__name:"Switch",props:{modelValue:{type:Boolean}},emits:["update:modelValue"],setup(t){const l=e.useModel(t,"modelValue");return(n,o)=>(e.openBlock(),e.createElementBlock("div",Vn,[e.createVNode(e.unref(S.Switch),{modelValue:l.value,"onUpdate:modelValue":o[0]||(o[0]=a=>l.value=a),class:e.normalizeClass(["relative inline-flex flex-shrink-0 h-6 w-11 border-2 border-transparent rounded-full cursor-pointer transition-colors ease-in-out duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary",{"bg-primary":l.value,"bg-primary-muted":!l.value}])},{default:e.withCtx(()=>[e.createElementVNode("div",En,[e.createVNode(e.unref($.CheckIcon),{class:"h-5 w-5 drop-shadow-md"}),e.createVNode(e.unref($.XMarkIcon),{class:"h-5 w-5 drop-shadow-md"})]),e.createElementVNode("span",{class:e.normalizeClass(["scale-95 pointer-events-none inline-block h-5 w-5 rounded-full bg-white shadow transform ring-0 transition ease-in-out duration-200",{"translate-x-5":l.value,"translate-x-0":!l.value}])},null,2)]),_:1},8,["modelValue","class"])]))}});var R=(t=>(t.CtrlOrCmd="cmd-or-ctrl",t.AltOrOpt="alt-or-opt",t.Shift="shift",t))(R||{});const H=U.getClientOperatingSystem(),Nn={["cmd-or-ctrl"]:H===U.OperatingSystem.Mac?"Cmd":"Ctrl",["alt-or-opt"]:H===U.OperatingSystem.Mac?"Opt":"Alt",shift:"Shift"};function $n(t){const l=n=>Object.values(R).includes(n);return t.map(n=>l(n)?Nn[n]:n).join("+")}function In(t,...l){O.onKeyDown(l[0],n=>{const o=n.getModifierState("Alt"),a=H===U.OperatingSystem.Mac?n.getModifierState("Meta"):n.getModifierState("Control"),c=n.getModifierState("Shift");for(const s of t)switch(s){case R.CtrlOrCmd:if(!a)return;break;case R.AltOrOpt:if(!o)return;break;case R.Shift:if(!c)return;break}l[1](n)},l[2])}function zn(t){const l=(t==null?void 0:t.model)||e.ref(),n=e.computed({get:()=>!!l.value,set:o=>l.value=o?!0:void 0});return{model:l,isChecked:n}}const Ln=e.createElementVNode("div",{class:"fixed inset-0 bg-neutral-100/70 dark:bg-neutral-900/70 transition-opacity"},null,-1),Dn={class:"fixed inset-0 z-10 overflow-y-auto"},Pn={class:"flex min-h-full justify-center p-4 text-center items-center sm:p-0"},jn={key:0,class:"flex items-center justify-center shadow p-4 relative z-10 bg-foundation rounded-t-lg"},_n={class:"text-2xl font-bold"},Tn={class:"p-4 sm:p-6"},On={key:2,class:"flex p-4 sm:px-6 sm:py-5 border-t gap-2 border-outline-3"},An=e.defineComponent({__name:"Dialog",props:{open:{type:Boolean},maxWidth:null,hideCloser:{type:Boolean},preventCloseOnClickOutside:{type:Boolean},title:null,buttons:null,onSubmit:{type:Function}},emits:["update:open","fully-closed"],setup(t,{emit:l}){const n=t,o=e.useSlots(),a=e.computed(()=>!!n.onSubmit),c=e.computed(()=>n.buttons||o.buttons),s=e.computed({get:()=>n.open,set:p=>l("update:open",p)}),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}}),d=e.computed(()=>{const p=["w-full","sm:my-8 sm:w-full sm:max-w-xl"];return!n.title&&!c.value&&p.push("px-4 pt-4 pb-4","sm:p-6"),r.value>=1&&p.push("md:max-w-2xl"),r.value>=2&&p.push("lg:max-w-4xl"),r.value>=3&&p.push("xl:max-w-6xl"),r.value>=4&&p.push("2xl:max-w-7xl"),p.join(" ")}),i=()=>{n.preventCloseOnClickOutside||(s.value=!1)};return(p,g)=>(e.openBlock(),e.createBlock(e.unref(S.TransitionRoot),{as:"template",show:s.value},{default:e.withCtx(()=>[e.createVNode(e.unref(S.Dialog),{as:"div",class:"relative z-40",onClose:i},{default:e.withCtx(()=>[e.createVNode(e.unref(S.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(()=>[Ln]),_:1}),e.createElementVNode("div",Dn,[e.createElementVNode("div",Pn,[e.createVNode(e.unref(S.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:g[1]||(g[1]=m=>p.$emit("fully-closed"))},{default:e.withCtx(()=>[e.createVNode(e.unref(S.DialogPanel),{class:e.normalizeClass(["transform rounded-lg bg-foundation text-left shadow-xl transition-all",d.value]),as:a.value?"form":"div",onSubmit:e.withModifiers(t.onSubmit,["prevent"])},{default:e.withCtx(()=>[t.title?(e.openBlock(),e.createElementBlock("div",jn,[e.createElementVNode("h4",_n,e.toDisplayString(t.title),1)])):e.createCommentVNode("",!0),t.hideCloser?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:1,class:"absolute z-20 top-5 right-4 text-foreground",onClick:g[0]||(g[0]=m=>s.value=!1)},[e.createVNode(e.unref(T.XMarkIcon),{class:"h-6 w-6"})])),e.createElementVNode("div",Tn,[e.renderSlot(p.$slots,"default",{},()=>[e.createTextVNode("Put your content here!")])]),c.value?(e.openBlock(),e.createElementBlock("div",On,[t.buttons?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.buttons,(m,k)=>(e.openBlock(),e.createBlock(e.unref(A),e.mergeProps({key:k},m.props,{onClick:m.onClick}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.text),1)]),_:2},1040,["onClick"]))),128)):e.renderSlot(p.$slots,"buttons",{key:1})])):e.createCommentVNode("",!0)]),_:3},8,["class","as","onSubmit"])]),_:3})])])]),_:3})]),_:3},8,["show"]))}}),Mn={class:"inline-flex items-center space-x-2"},Fn={class:"label-light"},Rn=e.defineComponent({__name:"Disclosure",props:{title:null,icon:null,color:{default:"default"}},setup(t){const l=t,n=e.computed(()=>{const a=["pr-3 h-10 w-full flex items-center justify-between border-l-2 px-2 rounded transition","ring-1 font-medium"];switch(l.color){case"warning":a.push("border-warning text-warning ring-warning-lighter hover:ring-warning");break;case"success":a.push("border-success text-success ring-success-lighter hover:ring-success");break;case"danger":a.push("border-danger text-danger ring-danger-lighter hover:ring-danger");break;case"default":default:a.push("border-primary text-primary ring-primary-muted hover:ring-primary");break}return a.join(" ")}),o=e.computed(()=>{const a=["mt-4 px-3 py-1 border-x "];switch(l.color){case"warning":a.push("border-warning-lighter");break;case"success":a.push("border-success-lighter");break;case"danger":a.push("border-danger-lighter");break;case"default":default:a.push("border-primary-muted");break}return a.join(" ")});return(a,c)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(S.Disclosure),null,{default:e.withCtx(({open:s})=>[e.createVNode(e.unref(S.DisclosureButton),{class:e.normalizeClass(n.value)},{default:e.withCtx(()=>[e.createElementVNode("div",Mn,[t.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.icon),{key:0,class:"h-4 w-4"})):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(t.title),1)]),e.createVNode(e.unref($.ChevronUpIcon),{class:e.normalizeClass([s?"":"rotate-180 transform","h-5 w-5"])},null,8,["class"])]),_:2},1032,["class"]),e.createVNode(e.unref(S.DisclosurePanel),{class:e.normalizeClass(o.value)},{default:e.withCtx(()=>[e.createElementVNode("div",Fn,[e.renderSlot(a.$slots,"default",{},()=>[e.createTextVNode("Panel contents")])])]),_:3},8,["class"])]),_:3})]))}});var _=(t=>(t.Grid="grid",t.List="list",t))(_||{});const Un=e.defineComponent({__name:"GridListToggle",props:{modelValue:null},emits:["click","update:modelValue"],setup(t,{emit:l}){const n=t,o=e.computed({get:()=>n.modelValue||_.Grid,set:s=>l("update:modelValue",s)}),a=e.computed(()=>o.value===_.Grid?$.Bars3Icon:$.Squares2X2Icon),c=s=>{l("click",s);const r=o.value===_.Grid?_.List:_.Grid;o.value=r};return(s,r)=>(e.openBlock(),e.createElementBlock("button",{class:"flex items-center justify-center rounded bg-foundation h-8 w-8 shadow cursor-pointer text-foreground",onClick:c},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.value),{class:"h-6 w-6"}))]))}});var ve=(t=>(t[t.Throttle=0]="Throttle",t[t.Debounce=1]="Debounce",t))(ve||{}),K=(t=>(t[t.Left=0]="Left",t[t.Right=1]="Right",t))(K||{});function ke(t,l){if(!O.isClient)return;const{wait:n=100,throttleOrDebounce:o=0}=l||{},a=n?o===0?C.throttle(t,n):C.debounce(t,n):t;e.onMounted(()=>window.addEventListener("resize",a)),e.onBeforeUnmount(()=>window.removeEventListener("resize",a))}function qn(t){e.onMounted(()=>{window.addEventListener("beforeunload",t)}),e.onBeforeUnmount(()=>{window.removeEventListener("beforeunload",t)})}function ye(t){const{el:l,defaultDirection:n}=t,o=e.ref(C.isUndefined(n)?1:n),a=e.computed(()=>{const s=e.unref(t.stopUpdatesBelowWidth);if(!C.isUndefined(s))return s;const r=e.unref(l);return r!=null&&r.offsetWidth?r.offsetWidth*2:void 0}),c=()=>{if(!O.isClient)return;const s=e.unref(l);if(!s)return;const r=s.getBoundingClientRect(),d=r.x+r.width>window.innerWidth,i=r.x<0;d&&i||!C.isUndefined(a.value)&&window.innerWidth<a.value||(d?o.value=0:i&&(o.value=1))};return ke(()=>c()),e.watch(()=>e.unref(l),s=>{s&&c()}),{direction:e.computed(()=>o.value),recalculateDirection:c}}const Wn=["disabled","onClick"],Hn=e.defineComponent({__name:"Menu",props:{open:{type:Boolean},items:null},emits:["update:open","chosen"],setup(t,{emit:l}){const n=t,o=e.ref(null),{direction:a}=ye({el:e.computed(()=>{var m;return((m=o.value)==null?void 0:m.el)||null}),defaultDirection:K.Left,stopUpdatesBelowWidth:300}),c=e.ref(null),s=e.ref(!1),r=e.computed({get:()=>n.open||!1,set:m=>l("update:open",m)}),d=m=>{const{active:k,disabled:u}=m,B=["group flex w-full items-center rounded-md px-2 py-2 text-sm"];return k?B.push("bg-primary text-foreground-on-primary"):u?B.push("text-foreground-disabled"):B.push("text-foreground"),B.join(" ")},i=(m,k)=>{l("chosen",{item:m,event:k})},p=()=>{var m;return(m=c.value)==null?void 0:m.el.click()},g=m=>{const k=!!m;return s.value=k,k};return e.watch(s,(m,k)=>{m!==k&&(r.value=m)}),e.watch(r,m=>{(m&&!s.value||!m&&s.value)&&p()}),(m,k)=>(e.openBlock(),e.createBlock(e.unref(S.Menu),{as:"div",class:"relative inline-block"},{default:e.withCtx(({open:u})=>[e.createElementVNode("div",null,[e.createVNode(e.unref(S.MenuButton),{ref_key:"menuButton",ref:c,class:"hidden",onClick:k[0]||(k[0]=e.withModifiers(()=>{},["stop","prevent"]))},null,512),e.createElementVNode("div",{class:e.normalizeClass(u?"pointer-events-none":"")},[e.renderSlot(m.$slots,"default",{toggle:p,open:g(u)})],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(S.MenuItems),{ref_key:"menuItems",ref:o,class:e.normalizeClass(["absolute mt-2 w-56 origin-top-right divide-y divide-outline-3 rounded-md bg-foundation shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none z-40",e.unref(a)===e.unref(K).Left?"right-0":""])},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(B,h)=>(e.openBlock(),e.createElementBlock("div",{key:h,class:"px-1 py-1"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B,y=>(e.openBlock(),e.createBlock(e.unref(S.MenuItem),{key:y.id,disabled:y.disabled},{default:e.withCtx(({active:b,disabled:x})=>[e.withDirectives((e.openBlock(),e.createElementBlock("span",null,[e.createElementVNode("button",{class:e.normalizeClass(d({active:b,disabled:x})),disabled:x,onClick:f=>i(y,f)},[e.renderSlot(m.$slots,"item",{item:y},()=>[e.createTextVNode(e.toDisplayString(y.title),1)])],10,Wn)])),[[e.unref(ce.directive),y.disabled&&y.disabledTooltip]])]),_:2},1032,["disabled"]))),128))]))),128))]),_:3},8,["class"])]),_:3})]),_:3}))}}),Kn={class:"flex flex-col space-y-4"},Gn={class:"flex space-x-6"},Xn=e.defineComponent({__name:"Tabs",props:{items:null},setup(t){const l=t,n=e.ref(null),o=e.computed(()=>n.value&&l.items.find(c=>c.id===n.value)||l.items[0]),a=c=>{n.value=c.id};return(c,s)=>(e.openBlock(),e.createElementBlock("div",Kn,[e.createElementVNode("div",Gn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,r=>(e.openBlock(),e.createBlock(A,{key:r.id,link:"",color:o.value.id===r.id?"default":"secondary",onClick:d=>a(r)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.title),1)]),_:2},1032,["color","onClick"]))),128))]),e.renderSlot(c.$slots,"default",{activeItem:o.value})]))}}),Jn={class:"text-foreground"},Qn={class:"w-full text-sm overflow-x-auto overflow-y-visible simple-scrollbar"},Yn=["onClick","onKeypress"],Zn=e.createElementVNode("div",{class:"text-gray-900 font-medium order-1"},"Placeholder",-1),eo={class:"absolute right-1.5 gap-1 flex items-center p-0"},to=e.defineComponent({__name:"Table",props:{items:null,buttons:null,columns:null,overflowCells:{type:Boolean},onRowClick:{type:Function}},setup(t){const l=t,n=e.computed(()=>{const s=(l.buttons||[]).length;let r=16;return s>0&&(r=48+(s-1)*42),`${r}px`}),o=s=>{var r;return((r=l.columns.find(d=>d.id===s))==null?void 0:r.classes)||""},a=(s,r)=>{const d=o(s);return r===0?`bg-transparent py-3 pr-5 px-1 ${d}`:`lg:p-0 px-1 ${d}`},c=s=>{var r;(r=l.onRowClick)==null||r.call(l,s)};return(s,r)=>(e.openBlock(),e.createElementBlock("div",Jn,[e.createElementVNode("div",Qn,[t.items.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:"grid z-10 grid-cols-12 items-center gap-6 font-semibold bg-foundation rounded-t-lg w-full border-b border-outline-3 pb-2 pt-4 px-4 min-w-[900px]",style:e.normalizeStyle({paddingRight:n.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.columns,d=>(e.openBlock(),e.createElementBlock("div",{key:d.id,class:e.normalizeClass([o(d.id),"capitalize"])},e.toDisplayString(d.header),3))),128))],4)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["divide-y divide-outline-3 h-full overflow-visible",{"pb-32":t.overflowCells}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,d=>(e.openBlock(),e.createElementBlock("div",{key:d.id,class:e.normalizeClass(["relative grid grid-cols-12 items-center gap-6 px-4 py-1 min-w-[900px] bg-foundation",{"cursor-pointer hover:bg-primary-muted":!!t.onRowClick}]),style:e.normalizeStyle({paddingRight:n.value}),tabindex:"0",onClick:i=>c(d),onKeypress:i=>c(d)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.columns,(i,p)=>(e.openBlock(),e.createElementBlock("div",{key:i.id,class:e.normalizeClass(a(i.id,p)),tabindex:"0"},[e.renderSlot(s.$slots,i.id,{item:d},()=>[Zn])],2))),128)),e.createElementVNode("div",eo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.buttons,i=>(e.openBlock(),e.createElementBlock("div",{key:i.label},[e.createVNode(e.unref(A),{"icon-left":i.icon,size:"sm",color:"secondary","hide-text":"",class:e.normalizeClass(i.class),onClick:e.withModifiers(p=>i.action(d),["stop"])},null,8,["icon-left","class","onClick"])]))),128))])],46,Yn))),128))],2)])]))}}),no={class:"w-full flex flex-col items-center my-2 space-y-2 mt-4"},oo={class:"inline-flex items-center space-x-1"},lo=e.createElementVNode("span",{class:"text-foreground-2"},"That's it, you've loaded everything!",-1),ao={class:"w-full flex flex-col items-center my-2 space-y-2 mt-4"},so={class:"inline-flex items-center space-x-1"},ro=e.createElementVNode("span",{class:"text-foreground-2"},"An error occurred while loading",-1),io=e.defineComponent({__name:"InfiniteLoading",props:{settings:null,allowRetry:{type:Boolean}},emits:["infinite"],setup(t){const l=e.ref(null),n=e.ref(!1);return O.isClient&&e.onMounted(()=>{const o=setInterval(()=>{var a;(a=l.value)!=null&&a.isConnected&&(n.value=!0,clearInterval(o))},200)}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:l},[n.value?(e.openBlock(),e.createBlock(e.unref(we),e.mergeProps({key:0},o.$props.settings||{},{onInfinite:a[0]||(a[0]=c=>o.$emit("infinite",c))}),{spinner:e.withCtx(()=>[e.createVNode(te,{loading:!0,class:"my-2"})]),complete:e.withCtx(()=>[e.createElementVNode("div",no,[e.createElementVNode("div",oo,[e.createVNode(e.unref(T.CheckIcon),{class:"w-5 h-5 text-success"}),lo])])]),error:e.withCtx(({retry:c})=>[e.createElementVNode("div",ao,[e.createElementVNode("div",so,[e.createVNode(e.unref(T.ExclamationTriangleIcon),{class:"w-5 h-5 text-danger"}),ro]),t.allowRetry?(e.openBlock(),e.createBlock(A,{key:0,onClick:c},{default:e.withCtx(()=>[e.createTextVNode("Retry")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)])]),_:1},16)):e.createCommentVNode("",!0)],512))}}),co={class:"relative group"},uo={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"},mo=e.defineComponent({__name:"Panel",props:{form:{type:Boolean,default:!1},ring:{type:Boolean,default:!1},fancyGlow:{type:Boolean,default:!1},customPadding:{type:Boolean,default:!1},noShadow:{type:Boolean,default:!1},panelClasses:{type:String}},emits:["submit"],setup(t,{emit:l}){const n=t,o=e.computed(()=>n.customPadding?"":"px-4 py-4 sm:px-6"),a=e.computed(()=>n.customPadding?"":"px-4 py-4 sm:p-6"),c=e.computed(()=>{const s=["rounded-lg"];return n.noShadow||s.push("shadow"),n.ring&&s.push("ring-outline-2 hover:ring-2"),n.panelClasses&&s.push(n.panelClasses),s.join(" ")});return(s,r)=>(e.openBlock(),e.createElementBlock("div",co,[t.fancyGlow?(e.openBlock(),e.createElementBlock("div",uo)):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",c.value]),onSubmit:r[0]||(r[0]=d=>l("submit",d))},{default:e.withCtx(()=>[s.$slots.header?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(o.value)},[e.renderSlot(s.$slots,"header")],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["grow",a.value])},[e.renderSlot(s.$slots,"default")],2),s.$slots.footer?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(o.value)},[e.renderSlot(s.$slots,"footer")],2)):e.createCommentVNode("",!0)]),_:3},40,["class"]))]))}}),fo={class:"flex-shrink-0"},po=e.createElementVNode("span",{class:"sr-only"},"Dismiss",-1),ho=e.defineComponent({__name:"Alert",props:{color:{default:"success"},withDismiss:{type:Boolean},actions:null,customIcon:null,size:{default:"default"}},emits:["dismiss"],setup(t){const l=t,n=e.useSlots(),o=e.computed(()=>!!n.description),a=e.computed(()=>{if(l.customIcon)return l.customIcon;switch(l.color){case"info":return N.InformationCircleIcon;case"warning":return N.ExclamationCircleIcon;case"danger":return N.XCircleIcon;case"success":default:return N.CheckCircleIcon}}),c=e.computed(()=>{const u=[];switch(l.size){case"xs":u.push("p-1");break;case"default":default:u.push(o.value?"p-4":"p-2");break}switch(l.color){case"success":u.push("bg-success-lighter border-l-4 border-success");break;case"info":u.push("bg-info-lighter border-l-4 border-info");break;case"danger":u.push("bg-danger-lighter border-l-4 border-danger");break;case"warning":u.push("bg-warning-lighter border-l-4 border-warning");break}return u.join(" ")}),s=e.computed(()=>{const u=[];if(o.value)u.push("");else switch(u.push("items-center"),l.size){case"xs":u.push("space-x-1");break;case"default":default:u.push("space-x-2");break}return u.join(" ")}),r=e.computed(()=>{const u=["grow"];switch(o.value||u.push("flex items-center space-x-2"),l.size){case"xs":u.push("ml-1");break;case"default":default:u.push("ml-3");break}return u.join(" ")}),d=e.computed(()=>{const u=[];switch(l.size){case"xs":u.push("text-xs");break;case"default":default:u.push("mt-2 text-sm");break}return u.join(" ")}),i=e.computed(()=>{var h;const u=["flex"];o.value||u.push("grow justify-end");const B=o.value&&((h=l.actions)==null?void 0:h.length);switch(l.size){case"xs":u.push("space-x-1"),B&&u.push("mt-1");break;case"default":default:u.push("space-x-2"),B&&u.push("mt-4");break}return u.join(" ")}),p=e.computed(()=>{const u=[];switch(l.color){case"success":u.push("text-success-darker");break;case"info":u.push("text-info-darker");break;case"danger":u.push("text-danger-darker");break;case"warning":u.push("text-warning-darker");break}return u.join(" ")}),g=e.computed(()=>{const u=[];switch(l.size){case"xs":u.push("h-4 w-4"),u.push(o.value?"mt-0.5":"");break;case"default":default:u.push("h-5 w-5");break}switch(l.color){case"success":u.push("text-success");break;case"info":u.push("text-info");break;case"danger":u.push("text-danger");break;case"warning":u.push("text-warning");break}return u.join(" ")}),m=e.computed(()=>{const u=[];switch(l.color){case"success":u.push("bg-success-lighter ring-success");break;case"info":u.push("bg-info-lighter ring-info");break;case"danger":u.push("bg-danger-lighter ring-danger");break;case"warning":u.push("bg-warning-lighter ring-warning");break}return u.join(" ")}),k=e.computed(()=>{switch(l.size){case"xs":return"xs";case"default":default:return"sm"}});return(u,B)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["rounded-md",[c.value,p.value]])},[e.createElementVNode("div",{class:e.normalizeClass(["flex",s.value])},[e.createElementVNode("div",fo,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.value),{class:e.normalizeClass(g.value),"aria-hidden":"true"},null,8,["class"]))]),e.createElementVNode("div",{class:e.normalizeClass(r.value)},[e.createElementVNode("h3",{class:e.normalizeClass(["text-sm",[o.value?"font-medium":""]])},[e.renderSlot(u.$slots,"title",{},()=>[e.createTextVNode("Title")])],2),o.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(d.value)},[e.renderSlot(u.$slots,"description",{},()=>[e.createTextVNode(" Lorem ipsum dolor sit amet consectetur adipisicing elit. Aliquid pariatur, ipsum similique veniam. ")])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(i.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.actions||[],(h,y)=>(e.openBlock(),e.createBlock(A,{key:y,color:t.color,size:k.value,to:h.url,external:h.externalUrl||!1,onClick:b=>h.onClick||e.unref(C.noop)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h.title),1)]),_:2},1032,["color","size","to","external","onClick"]))),128))],2)],2),t.withDismiss?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["flex",[o.value?"items-start":"items-center"]])},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["inline-flex rounded-md focus:outline-none focus:ring-2",m.value]),onClick:B[0]||(B[0]=h=>u.$emit("dismiss"))},[po,e.createVNode(e.unref(N.XMarkIcon),{class:"h-5 w-5","aria-hidden":"true"})],2)],2)):e.createCommentVNode("",!0)],2)],2))}});function go(t){var u,B;const{get:l,initialState:n,readOptions:o,set:a,asyncRead:c=!0,debugging:s}=t,r=s==null?void 0:s.log,d=()=>(new Error("Trace:").stack||"").substring(7),i=((B=(u=t.debugging)==null?void 0:u.log)==null?void 0:B.logger)||console.debug,p=r&&!r.writesOnly?()=>{const h=l();return i(`debugging: '${r.name}' read`,h,d()),h}:l,g=r&&!r.readsOnly?h=>(i(`debugging: '${r.name}' written to`,h,d()),a(h)):a,m=c?O.computedAsync(p,n,o):e.computed(p),k=e.computed(()=>m.value);return k.update=g,k}exports.CommonAlert=ho;exports.CommonBadge=Y;exports.CommonLoadingBar=te;exports.CommonStepsBullet=kt;exports.CommonStepsNumber=lt;exports.CommonTextLink=de;exports.FormButton=A;exports.FormCardButton=bt;exports.FormCheckbox=Nt;exports.FormSelectBadges=wn;exports.FormSelectBase=ne;exports.FormSelectSourceApps=Cn;exports.FormSwitch=Sn;exports.FormTextArea=Pt;exports.FormTextInput=Ft;exports.GlobalToastRenderer=Oe;exports.GridListToggleValue=_;exports.HorizontalDirection=K;exports.InfiniteLoading=io;exports.LayoutDialog=An;exports.LayoutDisclosure=Rn;exports.LayoutGridListToggle=Un;exports.LayoutMenu=Hn;exports.LayoutPanel=mo;exports.LayoutTable=to;exports.LayoutTabs=Xn;exports.ModifierKeys=R;exports.SourceAppBadge=ge;exports.TailwindBreakpoints=F;exports.ThrottleOrDebounce=ve;exports.ToastNotificationType=M;exports.ValidationHelpers=Jt;exports.clientOs=H;exports.getKeyboardShortcutTitle=$n;exports.onKeyboardShortcut=In;exports.useFormCheckboxModel=zn;exports.useFormSelectChildInternals=ee;exports.useOnBeforeWindowUnload=qn;exports.useResponsiveHorizontalDirectionCalculation=ye;exports.useWindowResizeHandler=ke;exports.useWrappingContainerHiddenCount=he;exports.writableAsyncComputed=go;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),w=require("lodash"),P=require("@heroicons/vue/24/solid"),M=require("@heroicons/vue/24/outline"),z=require("@heroicons/vue/20/solid"),se=require("vee-validate"),re=require("nanoid"),X=require("@speckle/shared"),O=require("@vueuse/core"),I=require("@headlessui/vue"),pe=require("vue-tippy"),we=require("v3-infinite-loading");const Ve={key:2,style:{margin:"0 !important",width:"0.01px"}},Ee=e.defineComponent({__name:"Button",props:{to:{type:String,required:!1,default:void 0},size:{type:String,default:"base"},fullWidth:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},text:{type:Boolean,default:!1},link:{type:Boolean,default:!1},color:{type:String,default:"default"},external:{type:Boolean,required:!1,default:void 0},disabled:{type:Boolean,required:!1,default:void 0},submit:{type:Boolean,default:!1},iconLeft:{type:[Object,Function],default:null},iconRight:{type:[Object,Function],default:null},hideText:{type:Boolean,default:!1},linkComponent:{type:[Object,Function],default:null},loading:{type:Boolean,default:!1}},emits:["click"],setup(t,{emit:l}){const n=t,o=e.resolveDynamicComponent("NuxtLink"),a=e.resolveDynamicComponent("RouterLink"),s=e.computed(()=>n.linkComponent?n.linkComponent:n.external?"a":w.isObjectLike(o)?o:w.isObjectLike(a)?a:"a"),r=e.computed(()=>{if(!n.to)return n.submit?"submit":"button"}),i=e.computed(()=>n.disabled||n.loading),u=e.computed(()=>n.loading?P.ArrowPathIcon:n.iconLeft),c=e.computed(()=>{const p=[];if(p.push("border-2"),i.value)p.push(n.outlined?"border-foreground-disabled":"bg-foundation-disabled border-transparent");else switch(n.color){case"invert":p.push(n.outlined?"border-foundation dark:border-foreground":"bg-foundation dark:bg-foreground border-transparent");break;case"card":p.push(n.outlined?"border-foundation-2 shadow":"bg-foundation-2 dark:bg-foundation-2 border-foundation shadow");break;case"danger":p.push(n.outlined?"border-danger":"bg-danger border-danger");break;case"secondary":p.push(n.outlined?"border-foundation":"bg-foundation border-foundation-2");break;case"warning":p.push(n.outlined?"border-warning":"bg-warning border-warning");break;case"info":p.push(n.outlined?"border-info":"bg-info border-info");break;case"success":p.push(n.outlined?"border-success":"bg-success border-success");break;case"default":default:p.push(n.outlined?"border-primary hover:border-primary-focus":"bg-primary hover:bg-primary-focus border-transparent");break}return p.join(" ")}),h=e.computed(()=>{const p=[];if(!n.text&&!n.link)if(i.value)p.push((n.outlined,"text-foreground-disabled"));else switch(n.color){case"invert":p.push(n.outlined?"text-foundation dark:text-foreground":"text-primary");break;case"card":p.push((n.outlined,"text-foreground"));break;case"danger":p.push(n.outlined?"text-danger":"text-foundation dark:text-foreground");break;case"warning":p.push(n.outlined?"text-warning":"text-foundation dark:text-foreground");break;case"info":p.push(n.outlined?"text-info":"text-foundation dark:text-foreground");break;case"success":p.push(n.outlined?"text-success":"text-foundation dark:text-foreground");break;case"secondary":p.push((n.outlined,"text-foreground hover:text-primary"));break;case"default":default:p.push(n.outlined?"text-primary hover:text-primary-focus":"text-foundation dark:text-foreground");break}else i.value?p.push("text-foreground-disabled"):n.color==="invert"?p.push("text-foundation hover:text-foundation-2 dark:text-foreground dark:hover:text-foreground"):n.color==="secondary"?p.push("text-foreground-2 hover:text-primary-focus"):n.color==="success"?p.push("text-success"):n.color==="warning"?p.push("text-warning"):n.color==="info"?p.push("text-info"):n.color==="danger"?p.push("text-danger"):p.push("text-primary hover:text-primary-focus");return p.join(" ")}),v=e.computed(()=>{const p=[];return p.push(n.rounded?"rounded-full":"rounded-md"),p.join(" ")}),f=e.computed(()=>{const p=[];if(!i.value)switch(n.color){case"invert":p.push("hover:ring-4 ring-white/50");break;case"danger":p.push("hover:ring-4 ring-danger-lighter dark:ring-danger-darker");break;case"warning":p.push("hover:ring-4 ring-warning-lighter dark:ring-warning-darker");break;case"info":p.push("hover:ring-4 ring-info-lighter dark:ring-info-darker");break;case"success":p.push("hover:ring-4 ring-success-lighter dark:ring-success-darker");break;case"default":default:p.push("hover:ring-2");break}return p.join(" ")}),k=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"}}),d=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"}}),E=e.computed(()=>{const p=[];return n.fullWidth&&p.push("w-full"),i.value&&p.push("cursor-not-allowed"),p.join(" ")}),g=e.computed(()=>{const p=[];return!i.value&&!n.link&&!n.text&&p.push("active:scale-[0.97]"),!i.value&&n.link&&p.push("underline decoration-transparent decoration-2 underline-offset-4 hover:decoration-inherit"),p.join(" ")}),y=e.computed(()=>{const p=n.link||n.text;return["transition inline-flex justify-center items-center space-x-2 outline-none select-none",E.value,k.value,h.value,p?"":c.value,p?"":v.value,p?"":f.value,n.link?"":d.value,g.value].join(" ")}),C=e.computed(()=>{const p=[""];switch(n.loading&&p.push("animate-spin"),n.size){case"xs":p.push("h-3 w-3");break;case"sm":p.push("h-4 w-4");break;case"lg":p.push("h-6 w-6");break;case"xl":p.push("h-8 w-8");break;case"base":default:p.push("h-5 w-5");break}return p.join(" ")}),x=p=>{if(i.value){p.preventDefault(),p.stopPropagation(),p.stopImmediatePropagation();return}l("click",p)};return(p,N)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.to?s.value:"button"),{href:t.to,to:t.to,type:r.value,external:t.external,class:e.normalizeClass(y.value),disabled:i.value,role:"button",onClick:x},{default:e.withCtx(()=>[u.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.value),{key:0,class:e.normalizeClass(`${C.value} ${t.hideText?"":"mr-2"}`)},null,8,["class"])):e.createCommentVNode("",!0),t.hideText?(e.openBlock(),e.createElementBlock("div",Ve," ")):e.renderSlot(p.$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(`${C.value} ${t.hideText?"":"ml-2"}`)},null,8,["class"])):e.createCommentVNode("",!0)]),_:3},8,["href","to","type","external","class","disabled"]))}});const he=(t,l)=>{const n=t.__vccOpts||t;for(const[o,a]of l)n[o]=a;return n},F=he(Ee,[["__scopeId","data-v-38aa371e"]]),ge=e.defineComponent({__name:"Link",props:{to:{type:String,required:!1,default:void 0},external:{type:Boolean,required:!1,default:void 0},disabled:{type:Boolean,required:!1,default:void 0},size:{type:String,default:"base"},foregroundLink:{type:Boolean,default:!1},iconLeft:{type:[Object,Function],default:null},iconRight:{type:[Object,Function],default:null},hideText:{type:Boolean,default:!1}},emits:["click"],setup(t,{emit:l}){const n=t,o=a=>{if(n.disabled){a.preventDefault(),a.stopPropagation(),a.stopImmediatePropagation();return}l("click",a)};return(a,s)=>(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:o},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default",{},()=>[e.createTextVNode("Link")])]),_:3},8,["to","external","disabled","size","foreground-link","icon-left","icon-right","hide-text"]))}});var W=(t=>(t[t.Success=0]="Success",t[t.Warning=1]="Warning",t[t.Danger=2]="Danger",t[t.Info=3]="Info",t))(W||{});const Ne={"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"},Se={class:"flex w-full flex-col items-center space-y-4 sm:items-end"},$e={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"},Ie={class:"p-4"},ze={class:"flex items-start"},Le={class:"flex-shrink-0"},De={class:"ml-2 w-0 flex-1 flex flex-col"},Pe={key:0,class:"text-foreground font-bold"},Te={key:1,class:"label label--light text-foreground-2"},je={key:2,class:"flex justify-start mt-2"},Oe=e.createElementVNode("span",{class:"sr-only"},"Close",-1),_e=e.defineComponent({__name:"ToastRenderer",props:{notification:null},emits:["update:notification"],setup(t,{emit:l}){const n=t,o=e.computed(()=>{var r,i;return!((r=n.notification)!=null&&r.description)&&!((i=n.notification)!=null&&i.cta)}),a=()=>{l("update:notification",null)},s=r=>{var i,u,c;(c=(u=(i=n.notification)==null?void 0:i.cta)==null?void 0:u.onClick)==null||c.call(u,r),a()};return(r,i)=>(e.openBlock(),e.createElementBlock("div",Ne,[e.createElementVNode("div",Se,[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",$e,[e.createElementVNode("div",Ie,[e.createElementVNode("div",ze,[e.createElementVNode("div",Le,[t.notification.type===e.unref(W).Success?(e.openBlock(),e.createBlock(e.unref(M.CheckCircleIcon),{key:0,class:"h-6 w-6 text-success","aria-hidden":"true"})):t.notification.type===e.unref(W).Danger?(e.openBlock(),e.createBlock(e.unref(M.XCircleIcon),{key:1,class:"h-6 w-6 text-danger","aria-hidden":"true"})):t.notification.type===e.unref(W).Warning?(e.openBlock(),e.createBlock(e.unref(M.ExclamationCircleIcon),{key:2,class:"h-6 w-6 text-warning","aria-hidden":"true"})):t.notification.type===e.unref(W).Info?(e.openBlock(),e.createBlock(e.unref(M.InformationCircleIcon),{key:3,class:"h-6 w-6 text-info","aria-hidden":"true"})):e.createCommentVNode("",!0)]),e.createElementVNode("div",De,[t.notification.title?(e.openBlock(),e.createElementBlock("p",Pe,e.toDisplayString(t.notification.title),1)):e.createCommentVNode("",!0),t.notification.description?(e.openBlock(),e.createElementBlock("p",Te,e.toDisplayString(t.notification.description),1)):e.createCommentVNode("",!0),t.notification.cta?(e.openBlock(),e.createElementBlock("div",je,[e.createVNode(ge,{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":o.value}])},[e.createElementVNode("button",{type:"button",class:"inline-flex rounded-md bg-foundation text-foreground-2 hover:text-foreground focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2",onClick:a},[Oe,e.createVNode(e.unref(z.XMarkIcon),{class:"h-6 w-6","aria-hidden":"true"})])],2)])])])):e.createCommentVNode("",!0)]),_:1})])]))}}),Ae=e.createElementVNode("circle",{cx:"4",cy:"4",r:"3"},null,-1),Me=[Ae],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:l}){const n=t,o=e.computed(()=>n.colorClasses||"bg-blue-100 text-blue-800"),a=e.computed(()=>n.dotIconColorClasses||"text-blue-400"),s=e.computed(()=>{const c=["inline-flex items-center",o.value,n.size==="lg"?"px-3 py-0.5 label":"px-2.5 py-0.5 caption font-medium"];return n.rounded?(c.push("rounded"),c.push(n.size==="lg"?"px-2 py-0.5 label":"px-2.5 py-0.5 caption font-medium")):(c.push("rounded-full"),c.push(n.size==="lg"?"px-2.5 py-0.5 label":"px-2.5 py-0.5 caption font-medium")),c.join(" ")}),r=e.computed(()=>{const c=["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?c.push("cursor-pointer"):c.push("cursor-default"),c.join(" ")}),i=e.computed(()=>["-ml-0.5 mr-1.5 h-2 w-2",a.value].join(" ")),u=c=>{if(!n.clickableIcon){c.stopPropagation(),c.stopImmediatePropagation(),c.preventDefault();return}l("click-icon",c)};return(c,h)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(s.value)},[t.dot?(e.openBlock(),e.createElementBlock("svg",{key:0,class:e.normalizeClass(i.value),fill:"currentColor",viewBox:"0 0 8 8"},Me,2)):e.createCommentVNode("",!0),e.renderSlot(c.$slots,"default",{},()=>[e.createTextVNode("Badge")]),t.iconLeft?(e.openBlock(),e.createElementBlock("button",{key:1,class:e.normalizeClass(r.value),onClick:h[0]||(h[0]=v=>u(v))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.iconLeft),{class:e.normalizeClass(["h-4 w-4",a.value])},null,8,["class"]))],2)):e.createCommentVNode("",!0)],2))}});let fe=[];function Fe(t){fe=fe?t:t.slice()}var K=(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))(K||{});function ve(t){const{props:{modelValue:l,steps:n,orientation:o,goVerticalBelow:a,nonInteractive:s,stepsPadding:r},emit:i}=t,u=e.computed(()=>(o==null?void 0:o.value)==="vertical"?"vertical":"horizontal"),c=e.computed({get:()=>w.clamp((l==null?void 0:l.value)||0,-1,n.value.length),set:g=>i("update:modelValue",w.clamp(g,0,n.value.length))}),h=g=>`${g+1}`,v=g=>g===c.value,f=g=>g<c.value,k=(g,y)=>{var x;if(s!=null&&s.value){y==null||y.preventDefault(),y==null||y.stopPropagation(),y==null||y.stopImmediatePropagation();return}c.value=g;const C=n.value[c.value];(x=C==null?void 0:C.onClick)==null||x.call(C)},d=e.computed(()=>{const g=["flex"];let y,C;return(r==null?void 0:r.value)==="xs"?(y="space-x-2",C="space-y-1"):(r==null?void 0:r.value)==="sm"?(y="space-x-4",C="space-y-1"):(y="space-x-8",C="space-y-4"),g.push("flex"),u.value==="vertical"||a!=null&&a.value?(g.push(`flex-col ${C} justify-center`),(a==null?void 0:a.value)===K.sm?g.push(`sm:flex-row sm:space-y-0 sm:justify-start sm:${y} sm:items-center`):(a==null?void 0:a.value)===K.md?g.push(`md:flex-row md:space-y-0 md:justify-start md:${y} md:items-center`):(a==null?void 0:a.value)===K.lg?g.push(`lg:flex-row lg:space-y-0 lg:justify-start lg:${y} lg:items-center`):(a==null?void 0:a.value)===K.xl&&g.push(`xl:flex-row xl:space-y-0 xl:justify-start xl:${y} xl:items-center`)):g.push(`flex-row ${y} items-center`),g.join(" ")}),E=e.computed(()=>{const g=["flex items-center"];return s!=null&&s.value||g.push("cursor-pointer"),g.join(" ")});return{value:c,isCurrentStep:v,isFinishedStep:f,switchStep:k,getStepDisplayValue:h,listClasses:d,linkClasses:E,orientation:u}}Fe(["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 Re=["aria-label"],Ue=["href","onClick"],qe={class:"flex space-x-3 items-center text-primary-focus normal font-medium leading-5"},We={class:"shrink-0 h-8 w-8 rounded-full bg-primary-focus text-foreground-on-primary inline-flex items-center justify-center"},Ke={class:"flex flex-col"},He={key:0,class:"label label--light text-foreground"},Xe=["href","onClick"],Ge={class:"flex space-x-3 items-center text-primary-focus normal font-medium leading-5"},Qe={class:"shrink-0 h-8 w-8 rounded-full border-2 border-primary-focus inline-flex items-center justify-center"},Je={class:"flex flex-col"},Ye={key:0,class:"label label--light text-foreground"},Ze=["href","onClick"],et={class:"flex space-x-3 items-center text-foreground-disabled normal font-medium leading-5"},tt={class:"shrink-0 h-8 w-8 rounded-full border-2 border-foreground-disabled inline-flex items-center justify-center"},nt={class:"flex flex-col"},ot={key:0,class:"label label--light"},lt=e.defineComponent({__name:"Number",props:{ariaLabel:null,orientation:null,steps:null,modelValue:null,goVerticalBelow:null,nonInteractive:{type:Boolean},stepsPadding:null},emits:["update:modelValue"],setup(t,{emit:l}){const n=t,{isCurrentStep:o,isFinishedStep:a,switchStep:s,getStepDisplayValue:r,listClasses:i,linkClasses:u}=ve({props:e.toRefs(n),emit:l});return(c,h)=>(e.openBlock(),e.createElementBlock("nav",{class:"flex justify-center","aria-label":t.ariaLabel||"Progress steps"},[e.createElementVNode("ol",{class:e.normalizeClass(e.unref(i))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.steps,(v,f)=>(e.openBlock(),e.createElementBlock("li",{key:v.name},[e.unref(a)(f)?(e.openBlock(),e.createElementBlock("a",{key:0,href:v.href,class:e.normalizeClass(e.unref(u)),onClick:k=>e.unref(s)(f,k)},[e.createElementVNode("div",qe,[e.createElementVNode("div",We,[e.createVNode(e.unref(z.CheckIcon),{class:"w-5 h-5"})]),e.createElementVNode("div",Ke,[e.createElementVNode("div",null,e.toDisplayString(v.name),1),v.description?(e.openBlock(),e.createElementBlock("div",He,e.toDisplayString(v.description),1)):e.createCommentVNode("",!0)])])],10,Ue)):e.unref(o)(f)?(e.openBlock(),e.createElementBlock("a",{key:1,href:v.href,class:e.normalizeClass(e.unref(u)),"aria-current":"step",onClick:k=>e.unref(s)(f,k)},[e.createElementVNode("div",Ge,[e.createElementVNode("div",Qe,e.toDisplayString(e.unref(r)(f)),1),e.createElementVNode("div",Je,[e.createElementVNode("div",null,e.toDisplayString(v.name),1),v.description?(e.openBlock(),e.createElementBlock("div",Ye,e.toDisplayString(v.description),1)):e.createCommentVNode("",!0)])])],10,Xe)):(e.openBlock(),e.createElementBlock("a",{key:2,href:v.href,class:e.normalizeClass(e.unref(u)),onClick:k=>e.unref(s)(f,k)},[e.createElementVNode("div",et,[e.createElementVNode("div",tt,e.toDisplayString(e.unref(r)(f)),1),e.createElementVNode("div",nt,[e.createElementVNode("div",null,e.toDisplayString(v.name),1),v.description?(e.openBlock(),e.createElementBlock("div",ot,e.toDisplayString(v.description),1)):e.createCommentVNode("",!0)])])],10,Ze))]))),128))],2)],8,Re))}}),at=["aria-label"],st=["href","onClick"],rt={class:"relative flex h-5 w-5 flex-shrink-0 items-center justify-center"},it={key:0,class:"h-3 w-3 rounded-full bg-foreground-2"},ct=["href","onClick"],ut={class:"relative flex h-5 w-5 flex-shrink-0 items-center justify-center","aria-hidden":"true"},dt={key:0,class:"h-3 w-3 rounded-full bg-foreground"},mt=e.createElementVNode("span",{class:"absolute h-4 w-4 rounded-full bg-outline-2"},null,-1),ft=e.createElementVNode("span",{class:"relative block h-2 w-2 rounded-full bg-primary-focus"},null,-1),pt=["href","onClick"],ht={class:"relative flex h-5 w-5 flex-shrink-0 items-center justify-center","aria-hidden":"true"},gt={key:0,class:"h-3 w-3 rounded-full bg-foreground-2"},vt={key:1,class:"h-4 w-4 rounded-full bg-foreground-disabled"},yt=e.defineComponent({__name:"Bullet",props:{ariaLabel:null,basic:{type:Boolean},orientation:null,steps:null,modelValue:null,goVerticalBelow:null,nonInteractive:{type:Boolean},stepsPadding:null},emits:["update:modelValue"],setup(t,{emit:l}){const n=t,{isCurrentStep:o,isFinishedStep:a,switchStep:s,listClasses:r,linkClasses:i}=ve({props:e.toRefs(n),emit:l}),u=e.computed(()=>{const h=["h6 font-medium leading-7"];let v;return n.stepsPadding==="xs"?v="ml-1":n.stepsPadding==="sm"?v="ml-2":v="ml-3",h.push(v),n.basic&&h.push("sr-only"),h.join(" ")}),c=e.computed(()=>{const h=[];return n.basic&&h.push("basic"),h.join(" ")});return(h,v)=>(e.openBlock(),e.createElementBlock("nav",{class:"flex justify-center","aria-label":t.ariaLabel||"Progress steps"},[e.createElementVNode("ol",{class:e.normalizeClass([e.unref(r),c.value])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.steps,(f,k)=>(e.openBlock(),e.createElementBlock("li",{key:f.name},[e.unref(a)(k)?(e.openBlock(),e.createElementBlock("a",{key:0,href:f.href,class:e.normalizeClass(e.unref(i)),onClick:d=>e.unref(s)(k,d)},[e.createElementVNode("span",rt,[t.basic?(e.openBlock(),e.createElementBlock("span",it)):(e.openBlock(),e.createBlock(e.unref(z.CheckCircleIcon),{key:1,class:"h-full w-full text-primary","aria-hidden":"true"}))]),e.createElementVNode("span",{class:e.normalizeClass(["text-foreground",u.value])},e.toDisplayString(f.name),3)],10,st)):e.unref(o)(k)?(e.openBlock(),e.createElementBlock("a",{key:1,href:f.href,class:e.normalizeClass(e.unref(i)),"aria-current":"step",onClick:d=>e.unref(s)(k,d)},[e.createElementVNode("span",ut,[t.basic?(e.openBlock(),e.createElementBlock("span",dt)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[mt,ft],64))]),e.createElementVNode("span",{class:e.normalizeClass(["text-primary-focus",u.value])},e.toDisplayString(f.name),3)],10,ct)):(e.openBlock(),e.createElementBlock("a",{key:2,href:f.href,class:e.normalizeClass(e.unref(i)),onClick:d=>e.unref(s)(k,d)},[e.createElementVNode("div",ht,[t.basic?(e.openBlock(),e.createElementBlock("span",gt)):(e.openBlock(),e.createElementBlock("div",vt))]),e.createElementVNode("p",{class:e.normalizeClass(["text-foreground-disabled",u.value])},e.toDisplayString(f.name),3)],10,pt))]))),128))],2)],8,at))}}),kt=["disabled"],bt=e.defineComponent({__name:"CardButton",props:{disabled:{type:Boolean},modelValue:{type:Boolean}},emits:["update:modelValue","click"],setup(t,{emit:l}){const n=t,o=e.computed(()=>{const 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(" ")}),a=s=>{if(n.disabled){s.preventDefault(),s.stopPropagation(),s.stopImmediatePropagation();return}l("update:modelValue",!n.modelValue),l("click",s)};return(s,r)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(o.value),disabled:t.disabled,onClick:a},[e.renderSlot(s.$slots,"default",{},()=>[e.createTextVNode("Text")])],10,kt))}}),xt={class:"relative flex items-start"},Ct={class:"flex h-6 items-center"},Bt=["id","checked","aria-describedby","name","disabled","value"],wt={class:"ml-2 text-sm",style:{"padding-top":"2px"}},Vt=["for"],Et={key:0,class:"text-danger ml-1"},Nt=["id"],St=e.defineComponent({inheritAttrs:!1,__name:"Checkbox",props:{name:{type:String,required:!0},disabled:{type:Boolean,default:!1},label:{type:String,default:void 0},description:{type:String,default:void 0},inlineDescription:{type:Boolean,default:!1},rules:{type:[String,Object,Function,Array],default:void 0},validateOnMount:{type:Boolean,default:!1},showRequired:{type:Boolean,default:!1},modelValue:{type:[String,Boolean],default:void 0},value:{type:[String,Boolean],default:!0},id:{type:String,default:void 0},hideLabel:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t){const l=t,n=g=>`${g}-${re.nanoid()}`,o=e.computed(()=>l.value||l.name),{checked:a,errorMessage:s,handleChange:r,value:i}=se.useField(l.name,l.rules,{validateOnMount:l.validateOnMount,type:"checkbox",checkedValue:o,initialValue:l.modelValue||void 0}),u=e.computed(()=>l.label||l.name),c=e.computed(()=>s.value?"border-danger-lighter":"border-foreground-4 "),h=e.computed(()=>l.description||s.value),v=e.computed(()=>`${l.name}-description`),f=e.computed(()=>{const g=[];return l.inlineDescription?g.push("inline ml-2"):g.push("block"),s.value?g.push("text-danger"):g.push("text-foreground-2"),g.join(" ")}),k=e.ref(n("checkbox")),d=e.computed(()=>l.id||k.value),E=g=>{l.disabled||r(g)};return e.onMounted(()=>{const g=l.modelValue,y=i.value,C=Array.isArray(g)?g.includes(l.value):g===l.value,x=Array.isArray(y)?y.includes(l.value):y===l.value;C!==x&&r(g)}),(g,y)=>(e.openBlock(),e.createElementBlock("div",xt,[e.createElementVNode("div",Ct,[e.createElementVNode("input",e.mergeProps({id:d.value,checked:e.unref(a),"aria-describedby":v.value,name:t.name,disabled:t.disabled,value:o.value,type:"checkbox",class:["h-4 w-4 rounded text-primary focus:ring-primary bg-foundation disabled:cursor-not-allowed disabled:bg-disabled disabled:text-disabled-2",c.value]},g.$attrs,{onChange:E}),null,16,Bt)]),e.createElementVNode("div",wt,[e.createElementVNode("label",{for:d.value,class:e.normalizeClass(["font-medium text-foreground",{"sr-only":t.hideLabel}])},[e.createElementVNode("span",null,e.toDisplayString(u.value),1),t.showRequired?(e.openBlock(),e.createElementBlock("span",Et,"*")):e.createCommentVNode("",!0)],10,Vt),h.value?(e.openBlock(),e.createElementBlock("p",{key:0,id:v.value,class:e.normalizeClass(f.value)},e.toDisplayString(h.value),11,Nt)):e.createCommentVNode("",!0)])]))}});function ie(t){const{props:l,inputEl:n,emit:o}=t,{value:a,errorMessage:s}=se.useField(l.name,l.rules,{validateOnMount:e.unref(l.validateOnMount),validateOnValueUpdate:e.unref(l.validateOnValueUpdate),initialValue:e.unref(l.modelValue)||void 0}),r=e.computed(()=>{const x=["block label text-foreground-2 mb-2"];return e.unref(l.showLabel)||x.push("sr-only"),x.join(" ")}),i=e.computed(()=>["focus:outline-none disabled:cursor-not-allowed disabled:bg-foundation-disabled","disabled:text-disabled-muted placeholder:text-foreground-2","rounded"].join(" ")),u=e.computed(()=>{const x=["block w-full text-foreground transition-all",i.value];return s.value?x.push("focus:border-danger focus:ring-danger border-2 border-danger text-danger-darker"):x.push("border-0 focus:ring-2 focus:ring-outline-2"),e.unref(l.color)==="foundation"?x.push("bg-foundation shadow-sm hover:shadow"):x.push("bg-foundation-page"),x.join(" ")}),c=e.ref(re.nanoid()),h=e.computed(()=>e.unref(l.label)||e.unref(l.name)),v=e.computed(()=>{const x=s.value;return!x||!e.unref(l.useLabelInErrors)?x:x.replace("Value",h.value)}),f=e.computed(()=>v.value&&e.unref(l.hideErrorMessage)),k=e.computed(()=>v.value||e.unref(l.help)),d=e.computed(()=>!!k.value),E=e.computed(()=>d.value?`${e.unref(l.name)}-${c.value}`:void 0),g=e.computed(()=>{const x=["mt-2 text-sm"];return x.push(s.value?"text-danger":"text-foreground-2"),x.join(" ")}),y=()=>{var x;(x=n.value)==null||x.focus()},C=()=>{a.value=w.isArray(a.value)?[]:"",o("change",{value:a.value}),o("clear")};return e.onMounted(()=>{e.unref(l.autoFocus)&&y()}),{coreInputClasses:i,coreClasses:u,title:h,value:a,helpTipId:E,helpTipClasses:g,helpTip:k,hideHelpTip:f,errorMessage:v,clear:C,focus:y,labelClasses:r}}const $t=["for"],It={class:"relative"},zt=["id","name","placeholder","disabled","aria-invalid","aria-describedby"],Lt=e.createElementVNode("span",{class:"text-xs sr-only"},"Clear input",-1),Dt=["id"],Pt=e.defineComponent({__name:"TextArea",props:{name:null,showLabel:{type:Boolean},help:null,placeholder:null,label:null,disabled:{type:Boolean},rules:null,validateOnMount:{type:Boolean},validateOnValueUpdate:{type:Boolean},useLabelInErrors:{type:Boolean,default:!0},autoFocus:{type:Boolean},modelValue:{default:""},showClear:{type:Boolean},fullWidth:{type:Boolean},showRequired:{type:Boolean},color:{default:"page"},textareaClasses:null},emits:["update:modelValue","change","input","clear"],setup(t,{expose:l,emit:n}){const o=t,a=e.ref(null),{coreClasses:s,title:r,value:i,helpTipId:u,helpTipClasses:c,helpTip:h,errorMessage:v,labelClasses:f,clear:k,focus:d}=ie({props:e.toRefs(o),emit:n,inputEl:a}),E=e.computed(()=>{const g=["pl-2"];return o.showClear&&v.value?g.push("pr-12"):(o.showClear||v.value)&&g.push("pr-8"),g.join(" ")});return l({focus:d}),(g,y)=>(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(r)),1)],10,$t),e.createElementVNode("div",It,[e.withDirectives(e.createElementVNode("textarea",e.mergeProps({id:t.name,ref_key:"inputElement",ref:a,"onUpdate:modelValue":y[0]||(y[0]=C=>e.isRef(i)?i.value=C:null),name:t.name,class:[e.unref(s),E.value,t.textareaClasses||"","min-h-[4rem] simple-scrollbar"],placeholder:t.placeholder,disabled:t.disabled,"aria-invalid":e.unref(v)?"true":"false","aria-describedby":e.unref(u)},g.$attrs,{onChange:y[1]||(y[1]=C=>g.$emit("change",{event:C,value:e.unref(i)})),onInput:y[2]||(y[2]=C=>g.$emit("input",{event:C,value:e.unref(i)}))}),null,16,zt),[[e.vModelText,e.unref(i)]]),t.showClear?(e.openBlock(),e.createElementBlock("a",{key:0,title:"Clear input",class:"absolute top-2 right-0 flex items-center pr-2 cursor-pointer",onClick:y[3]||(y[3]=(...C)=>e.unref(k)&&e.unref(k)(...C)),onKeydown:y[4]||(y[4]=(...C)=>e.unref(k)&&e.unref(k)(...C))},[Lt,e.createVNode(e.unref(z.XMarkIcon),{class:"h-5 w-5 text-foreground","aria-hidden":"true"})],32)):e.createCommentVNode("",!0),e.unref(v)?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["pointer-events-none absolute inset-y-0 right-0 flex items-start mt-2",t.showClear?"pr-8":"pr-2"])},[e.createVNode(e.unref(z.ExclamationCircleIcon),{class:"h-4 w-4 text-danger","aria-hidden":"true"})],2)):e.createCommentVNode("",!0),t.showRequired&&!e.unref(v)?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["pointer-events-none absolute inset-y-0 mt-0.5 text-4xl right-0 flex items-start text-danger opacity-50",[t.showClear?"pr-8":"pr-2"]])}," * ",2)):e.createCommentVNode("",!0)]),e.unref(u)?(e.openBlock(),e.createElementBlock("p",{key:0,id:e.unref(u),class:e.normalizeClass(e.unref(c))},e.toDisplayString(e.unref(h)),11,Dt)):e.createCommentVNode("",!0)],2))}}),Tt=["for"],jt={class:"relative"},Ot={key:0,class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2"},_t=["id","type","name","placeholder","disabled","aria-invalid","aria-describedby"],At=e.createElementVNode("span",{class:"text-xs sr-only"},"Clear input",-1),Mt=["id"],Ft=e.defineComponent({inheritAttrs:!1,__name:"TextInput",props:{type:{type:String,default:"text"},name:{type:String,required:!0},showLabel:{type:Boolean,required:!1},help:{type:String,default:void 0},placeholder:{type:String,default:void 0},label:{type:String,default:void 0},showRequired:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},rules:{type:[String,Object,Function,Array],default:void 0},validateOnMount:{type:Boolean,default:!1},validateOnValueUpdate:{type:Boolean,default:!1},useLabelInErrors:{type:Boolean,default:!0},customIcon:{type:[Object,Function],default:void 0},autoFocus:{type:Boolean,default:!1},modelValue:{type:String,default:""},size:{type:String,default:"base"},showClear:{type:Boolean,default:!1},fullWidth:{type:Boolean,default:!1},inputClasses:{type:String,default:null},hideErrorMessage:{type:Boolean,default:!1},wrapperClasses:{type:String,default:()=>""},color:{type:String,default:"page"}},emits:["update:modelValue","change","input","clear","focusin","focusout"],setup(t,{expose:l,emit:n}){const o=t,a=e.useSlots(),s=e.ref(null),{coreClasses:r,title:i,value:u,helpTipId:c,helpTipClasses:h,helpTip:v,hideHelpTip:f,errorMessage:k,clear:d,focus:E,labelClasses:g}=ie({props:e.toRefs(o),emit:n,inputEl:s}),y=e.computed(()=>{const N=["h-5 w-5"];return k.value?N.push("text-danger"):N.push("text-foreground-2"),N.join(" ")}),C=e.computed(()=>["email","password"].includes(o.type)||o.customIcon),x=e.computed(()=>{const N=[];return C.value?N.push("pl-8"):N.push("pl-2"),a["input-right"]||(k.value||o.showClear)&&(k.value&&o.showClear?N.push("pr-12"):N.push("pr-8")),N.join(" ")}),p=e.computed(()=>{switch(o.size){case"sm":return"h-6";case"lg":return"h-10";case"xl":return"h-14";case"base":default:return"h-8"}});return l({focus:E}),(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(g))},[e.createElementVNode("span",null,e.toDisplayString(e.unref(i)),1)],10,Tt),e.createElementVNode("div",jt,[C.value?(e.openBlock(),e.createElementBlock("div",Ot,[t.customIcon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.customIcon),{key:0,class:e.normalizeClass(y.value),"aria-hidden":"true"},null,8,["class"])):t.type==="email"?(e.openBlock(),e.createBlock(e.unref(z.EnvelopeIcon),{key:1,class:e.normalizeClass(y.value),"aria-hidden":"true"},null,8,["class"])):t.type==="password"?(e.openBlock(),e.createBlock(e.unref(z.KeyIcon),{key:2,class:e.normalizeClass(y.value),"aria-hidden":"true"},null,8,["class"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",e.mergeProps({id:t.name,ref_key:"inputElement",ref:s,"onUpdate:modelValue":$[0]||($[0]=S=>e.isRef(u)?u.value=S:null),type:t.type,name:t.name,class:[e.unref(r),x.value,p.value,t.inputClasses||""],placeholder:t.placeholder,disabled:t.disabled,"aria-invalid":e.unref(k)?"true":"false","aria-describedby":e.unref(c),role:"textbox"},N.$attrs,{onChange:$[1]||($[1]=S=>N.$emit("change",{event:S,value:e.unref(u)})),onInput:$[2]||($[2]=S=>N.$emit("input",{event:S,value:e.unref(u)}))}),null,16,_t),[[e.vModelDynamic,e.unref(u)]]),e.renderSlot(N.$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:$[3]||($[3]=(...S)=>e.unref(d)&&e.unref(d)(...S)),onKeydown:$[4]||($[4]=(...S)=>e.unref(d)&&e.unref(d)(...S))},[At,e.createVNode(e.unref(z.XMarkIcon),{class:"h-5 w-5 text-foreground","aria-hidden":"true"})],32)):e.createCommentVNode("",!0),e.unref(k)?(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(z.ExclamationCircleIcon),{class:"h-4 w-4 text-danger","aria-hidden":"true"})],2)):e.createCommentVNode("",!0),t.showRequired&&!e.unref(k)?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["pointer-events-none absolute inset-y-0 mt-3 text-4xl right-0 flex items-center text-danger opacity-50",[t.showClear?"pr-8":"pr-2"]])}," * ",2)):e.createCommentVNode("",!0)])]),e.unref(c)&&!e.unref(f)?(e.openBlock(),e.createElementBlock("p",{key:0,id:e.unref(c),class:e.normalizeClass(e.unref(h))},e.toDisplayString(e.unref(v)),11,Mt)):e.createCommentVNode("",!0)],2))}}),ye=/^https?:\/\//,ce=/^[\w-_.+]+@[\w-_.+]+$/,Rt=t=>(t||"").match(ce)?!0:"Value should be a valid e-mail address",Ut=t=>(t||"").split(",").map(o=>o.trim()).every(o=>o.match(ce))||"Value should be one or multiple comma-delimited e-mail addresses",qt=t=>(w.isString(t)&&(t=t.trim()),t?!0:"Value is required"),Wt=(t,l)=>(n,o)=>n===o.form[t]?!0:`Value must be the same as in field '${l||t}'`,Kt=t=>l=>{const{minLength:n,maxLength:o}=t;return l=X.isNullOrUndefined(l)?"":l,w.isString(l)?!w.isUndefined(n)&&l.length<n?`Value needs to be at least ${n} characters long`:!w.isUndefined(o)&&l.length>o?`Value needs to be no more than ${o} characters long`:!0:"Value should be a text string"},Ht=t=>l=>{const{match:n,message:o}=t;return w.isString(l)?n?w.isString(n)?l.includes(n)?!0:o:n.test(l)?!0:o:!0:"Value should be a text string"},Xt=t=>ye.test(t)?!0:"Value is not a valid URL",Gt=t=>Array.isArray(t)&&t.length>0?!0:"Value should have at least a single item selected",Qt=Object.freeze(Object.defineProperty({__proto__:null,VALID_EMAIL:ce,VALID_HTTP_URL:ye,isEmail:Rt,isItemSelected:Gt,isOneOrMultipleEmails:Ut,isRequired:qt,isSameAs:Wt,isStringOfLength:Kt,isUrl:Xt,stringContains:Ht},Symbol.toStringTag,{value:"Module"}));function ke(t){const{skipCalculation:l,elementToWatchForChanges:n,itemContainer:o,trackResize:a=!1,trackMutations:s=!0}=t||{},r=e.ref(0),i=()=>{const u=o.value;if(l!=null&&l.value||!u)return;const c=u.children;let h=0,v=0,f;for(const k of c){const d=k.offsetTop;w.isUndefined(f)?(f=d,h+=1):d===f&&(h+=1),v+=1}r.value=v-h};return a&&O.useResizeObserver(n,i),s&&O.useMutationObserver(n,i,{childList:!0,subtree:!0}),{hiddenItemCount:r}}function ue(t){const{props:l,emit:n,dynamicVisibility:o}=t;let a;if(o){const{elementToWatchForChanges:c,itemContainer:h}=o;a=ke({skipCalculation:e.computed(()=>{var f;return!((f=l.multiple)!=null&&f.value)}),elementToWatchForChanges:c,itemContainer:h}).hiddenItemCount}else a=e.ref(0);const s=e.computed({get:()=>{var h,v;const c=(h=l.modelValue)==null?void 0:h.value;return(v=l.multiple)!=null&&v.value?w.isArray(c)?c:[]:w.isArray(c)?void 0:c},set:c=>{var h,v,f;if((h=l.multiple)!=null&&h.value&&!w.isArray(c)){console.warn("Attempting to set non-array value in selector w/ multiple=true");return}else if(!((v=l.multiple)!=null&&v.value)&&w.isArray(c)){console.warn("Attempting to set array value in selector w/ multiple=false");return}n("update:modelValue",(f=l.multiple)!=null&&f.value?c||[]:c)}}),r=c=>w.isArray(c);return{selectedValue:s,hiddenSelectedItemCount:a,isArrayValue:r,isMultiItemArrayValue:c=>w.isArray(c)&&c.length>1,firstItem:c=>r(c)?c[0]:c}}const Jt=t=>(e.pushScopeId("data-v-60cf597b"),t=t(),e.popScopeId(),t),Yt=Jt(()=>e.createElementVNode("div",{class:"swoosher relative top-0 bg-blue-500/50"},null,-1)),Zt=[Yt],en=e.defineComponent({__name:"Bar",props:{loading:{type:Boolean}},setup(t){return(l,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["relative w-full h-1 bg-blue-500/30 text-xs text-foreground-on-primary overflow-hidden rounded-xl",t.loading?"opacity-100":"opacity-0"])},Zt,2))}});const oe=he(en,[["__scopeId","data-v-60cf597b"]]),tn={class:"flex items-center justify-between w-full"},nn={class:"block truncate grow text-left"},on={class:"pointer-events-none shrink-0 ml-1 flex items-center space-x-2"},ln={key:1,class:"text-4xl text-danger opacity-50 h-4 w-4 leading-6"},an=["disabled"],sn={key:0,class:"flex flex-col mx-1 mb-1"},rn=e.createElementVNode("span",{class:"sr-only label text-foreground"},"Search",-1),cn={class:"relative"},un={class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2"},dn=["placeholder"],mn={key:0,class:"px-1"},fn={key:1},pn=e.createElementVNode("div",{class:"text-foreground-2 text-center"},"Nothing found 🤷♂️",-1),hn={class:e.normalizeClass(["block truncate"])},gn=["id"],de=e.defineComponent({__name:"Base",props:{multiple:{type:Boolean,default:!1},items:{type:Array,default:()=>[]},modelValue:{type:[Object,Array,String],default:void 0},search:{type:Boolean,default:!1},filterPredicate:{type:Function,default:void 0},disabledItemPredicate:{type:Function,default:void 0},getSearchResults:{type:Function,default:void 0},searchPlaceholder:{type:String,default:"Search"},label:{type:String,required:!0},placeholder:{type:String},showLabel:{type:Boolean,default:!1},name:{type:String,required:!0},by:{type:String,required:!1},disabled:{type:Boolean,default:!1},buttonStyle:{type:String,default:"base"},hideCheckmarks:{type:Boolean,default:!1},allowUnset:{type:Boolean,default:!0},clearable:{type:Boolean,default:!1},rules:{type:[String,Object,Function,Array],default:void 0},validateOnMount:{type:Boolean,default:!1},validateOnValueUpdate:{type:Boolean,default:!1},useLabelInErrors:{type:Boolean,default:!0},help:{type:String,default:void 0},fixedHeight:{type:Boolean,default:!1},fullyControlValue:{type:Boolean,default:!1},showRequired:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{expose:l,emit:n}){const o=t,a=m=>w.isObjectLike(m),{value:s,errorMessage:r}=se.useField(o.name,o.rules,{validateOnMount:o.validateOnMount,validateOnValueUpdate:o.validateOnValueUpdate,initialValue:o.modelValue}),i=e.ref(null),u=e.ref(""),c=e.ref([]),h=e.ref(!1),v=e.ref(1),f=e.ref(re.nanoid()),k=e.computed(()=>e.unref(o.label)||e.unref(o.name)),d=e.computed(()=>{const m=r.value;return!m||!e.unref(o.useLabelInErrors)?m:m.replace("Value",k.value)}),E=e.computed(()=>d.value||e.unref(o.help)),g=e.computed(()=>!!E.value),y=e.computed(()=>g.value?`${e.unref(o.name)}-${f.value}`:void 0),C=e.computed(()=>r.value?"text-danger":"text-foreground-2"),x=e.computed(()=>o.buttonStyle!=="simple"&&o.clearable&&!o.disabled),p=e.computed(()=>{const m=["relative flex group"];return r.value?(m.push("hover:shadow rounded-md"),m.push("text-danger-darker focus:border-danger focus:ring-danger"),o.buttonStyle!=="simple"&&m.push("outline outline-2 outline-danger")):o.buttonStyle!=="simple"&&(m.push("hover:shadow rounded-md"),m.push("outline outline-2 outline-primary-muted")),o.fixedHeight&&m.push("h-8"),m.join(" ")}),N=e.computed(()=>{const m=[];return o.buttonStyle!=="simple"&&m.push(_.value?"bg-foundation-disabled text-foreground-disabled":""),_.value&&m.push("cursor-not-allowed"),m.join(" ")}),$=e.computed(()=>{const m=["relative z-[1]","flex items-center justify-center text-center shrink-0","rounded-r-md overflow-hidden transition-all","text-foreground",Y.value?`w-6 ${N.value}`:"w-0"];return _.value||(m.push("hover:bg-primary hover:text-foreground-on-primary dark:text-foreground-on-primary"),o.buttonStyle==="tinted"?m.push("bg-outline-3"):m.push("bg-primary-muted")),m.join(" ")}),S=e.computed(()=>{const m=["relative z-[2]","normal rounded-md cursor-pointer transition truncate flex-1","flex items-center",N.value];return o.buttonStyle!=="simple"&&(m.push("py-2 px-3"),_.value||(o.buttonStyle==="tinted"?m.push("bg-foundation-page text-foreground"):m.push("bg-foundation text-foreground"))),x.value&&Y.value&&m.push("rounded-r-none"),m.join(" ")}),R=e.computed(()=>!!(o.search&&(o.filterPredicate||o.getSearchResults))),j=e.computed(()=>R.value&&o.getSearchResults),_=e.computed(()=>o.disabled||!o.items.length&&!j.value),D=e.computed({get:()=>{const m=s.value;return o.multiple?w.isArray(m)?m:[]:w.isArray(m)?void 0:m},set:m=>{if(o.multiple&&!w.isArray(m)){console.warn("Attempting to set non-array value in selector w/ multiple=true");return}else if(!o.multiple&&w.isArray(m)){console.warn("Attempting to set array value in selector w/ multiple=false");return}let b;if(o.multiple)b=m||[];else{const V=s.value;b=o.allowUnset&&V&&m&&G(V)===G(m)?void 0:m}o.fullyControlValue?n("update:modelValue",b):s.value=b,v.value+=1}}),Y=e.computed(()=>o.multiple&&w.isArray(D.value)?D.value.length!==0:!!D.value),le=()=>{o.multiple?D.value=[]:D.value=void 0},ae=e.computed(()=>{const m=u.value;return!R.value||!(m!=null&&m.length)?c.value:o.filterPredicate?c.value.filter(b=>{var V;return((V=o.filterPredicate)==null?void 0:V.call(o,b,m))||!1}):c.value}),U=m=>JSON.stringify(m),G=m=>a(m)?m[o.by||"id"]:m,Q=async()=>{if(!(!j.value||!o.getSearchResults)){h.value=!0;try{c.value=await o.getSearchResults(u.value)}finally{h.value=!1}}},J=w.debounce(Q,1e3),B=m=>{const{active:b,disabled:V}=m||{},{hideCheckmarks:L}=o,T=["relative transition cursor-pointer select-none py-1.5 pl-3",L?"":"pr-9"];return V?T.push("opacity-50 cursor-not-allowed"):T.push(b?"text-primary":"text-foreground"),T.join(" ")};return e.watch(()=>o.items,m=>{c.value=m.slice()},{immediate:!0}),e.watch(u,()=>{j.value&&J()}),e.onMounted(()=>{j.value&&!o.items.length&&Q()}),l({triggerSearch:Q}),(m,b)=>(e.openBlock(),e.createElementBlock("div",null,[(e.openBlock(),e.createBlock(e.unref(I.Listbox),{key:v.value,modelValue:D.value,"onUpdate:modelValue":b[4]||(b[4]=V=>D.value=V),name:t.name,multiple:t.multiple,by:t.by,disabled:_.value,as:"div"},{default:e.withCtx(()=>[e.createVNode(e.unref(I.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(p.value)},[e.createVNode(e.unref(I.ListboxButton),{class:e.normalizeClass(S.value)},{default:e.withCtx(({open:V})=>[e.createElementVNode("div",tn,[e.createElementVNode("div",nn,[!D.value||e.unref(w.isArray)(D.value)&&!D.value.length?e.renderSlot(m.$slots,"nothing-selected",{key:0},()=>[e.createTextVNode(e.toDisplayString(t.placeholder?t.placeholder:t.label),1)]):e.renderSlot(m.$slots,"something-selected",{key:1,value:D.value},()=>[e.createTextVNode(e.toDisplayString(U(D.value)),1)])]),e.createElementVNode("div",on,[d.value?(e.openBlock(),e.createBlock(e.unref(P.ExclamationCircleIcon),{key:0,class:"h-4 w-4 text-danger","aria-hidden":"true"})):t.showRequired?(e.openBlock(),e.createElementBlock("div",ln," * ")):e.createCommentVNode("",!0),V?(e.openBlock(),e.createBlock(e.unref(P.ChevronUpIcon),{key:2,class:"h-4 w-4 text-foreground","aria-hidden":"true"})):(e.openBlock(),e.createBlock(e.unref(P.ChevronDownIcon),{key:3,class:"h-4 w-4 text-foreground","aria-hidden":"true"}))])])]),_:3},8,["class"]),x.value?e.withDirectives((e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass($.value),disabled:t.disabled,onClick:b[0]||(b[0]=V=>le())},[e.createVNode(e.unref(P.XMarkIcon),{class:"w-3 h-3"})],10,an)),[[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(I.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:b[3]||(b[3]=V=>{var L;return(L=i.value)==null?void 0:L.focus()})},{default:e.withCtx(()=>[R.value?(e.openBlock(),e.createElementBlock("label",sn,[rn,e.createElementVNode("div",cn,[e.createElementVNode("div",un,[e.createVNode(e.unref(P.MagnifyingGlassIcon),{class:"h-5 w-5 text-foreground"})]),e.withDirectives(e.createElementVNode("input",{ref_key:"searchInput",ref:i,"onUpdate:modelValue":b[1]||(b[1]=V=>u.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:b[2]||(b[2]=e.withModifiers(()=>{},["stop"]))},null,40,dn),[[e.vModelText,u.value]])])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["overflow-auto simple-scrollbar",[R.value?"max-h-52":"max-h-60"]])},[j.value&&h.value?(e.openBlock(),e.createElementBlock("div",mn,[e.createVNode(oe,{loading:!0})])):j.value&&!c.value.length?(e.openBlock(),e.createElementBlock("div",fn,[e.renderSlot(m.$slots,"nothing-found",{},()=>[pn])])):e.createCommentVNode("",!0),!j.value||!h.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(ae.value,V=>{var L;return e.openBlock(),e.createBlock(e.unref(I.ListboxOption),{key:G(V),value:V,disabled:((L=t.disabledItemPredicate)==null?void 0:L.call(t,V))||!1},{default:e.withCtx(({active:T,selected:q})=>{var Z,me;return[e.createElementVNode("li",{class:e.normalizeClass(B({active:T,disabled:((Z=t.disabledItemPredicate)==null?void 0:Z.call(t,V))||!1}))},[e.createElementVNode("span",hn,[e.renderSlot(m.$slots,"option",{item:V,active:T,selected:q,disabled:((me=t.disabledItemPredicate)==null?void 0:me.call(t,V))||!1},()=>[e.createTextVNode(e.toDisplayString(U(V)),1)])]),!t.hideCheckmarks&&q?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass([T?"text-primary":"text-foreground","absolute inset-y-0 right-0 flex items-center pr-4"])},[e.createVNode(e.unref(P.CheckIcon),{class:"h-5 w-5","aria-hidden":"true"})],2)):e.createCommentVNode("",!0)],2)]}),_:2},1032,["value","disabled"])}),128)):e.createCommentVNode("",!0)],2)]),_:3})]),_:3})],2)]),_:3},8,["modelValue","name","multiple","by","disabled"])),y.value?(e.openBlock(),e.createElementBlock("p",{key:0,id:y.value,class:e.normalizeClass(["mt-2 text-sm",C.value])},e.toDisplayString(E.value),11,gn)):e.createCommentVNode("",!0)]))}}),be=e.defineComponent({__name:"SourceAppBadge",props:{sourceApp:null},setup(t){return(l,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"]))}}),vn={key:0,class:"text-foreground-2 normal"},yn={key:1,class:"flex items-center"},kn={class:"truncate"},bn={class:"flex items-center"},xn={class:"truncate"},Cn=e.defineComponent({__name:"SourceApps",props:{multiple:{type:Boolean,default:!1},modelValue:{type:[Object,Array],default:void 0},search:{type:Boolean,default:!1},searchPlaceholder:{type:String,default:"Search apps"},selectorPlaceholder:{type:String,default:void 0},label:{type:String,required:!0},showLabel:{type:Boolean,default:!1},name:{type:String,default:void 0},items:{type:Array,default:void 0},clearable:{type:Boolean},help:{type:String}},emits:["update:modelValue"],setup(t,{emit:l}){const n=t,o=e.ref(null),a=e.ref(null),{selectedValue:s,hiddenSelectedItemCount:r,isMultiItemArrayValue:i,firstItem:u}=ue({props:e.toRefs(n),emit:l,dynamicVisibility:{elementToWatchForChanges:o,itemContainer:a}}),c=(h,v)=>h.name.toLocaleLowerCase().includes(v.toLocaleLowerCase());return(h,v)=>(e.openBlock(),e.createBlock(de,{modelValue:e.unref(s),"onUpdate:modelValue":v[0]||(v[0]=f=>e.isRef(s)?s.value=f:null),multiple:t.multiple,items:t.items??e.unref(X.SourceApps),search:t.search,"search-placeholder":t.searchPlaceholder,label:t.label,"show-label":t.showLabel,name:t.name||"sourceApps","filter-predicate":c,clearable:t.clearable,help:t.help,by:"name"},{"nothing-selected":e.withCtx(()=>[t.selectorPlaceholder?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(t.selectorPlaceholder),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(t.multiple?"Select apps":"Select an app"),1)],64))]),"something-selected":e.withCtx(({value:f})=>[e.unref(i)(f)?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"elementToWatchForChanges",ref:o,class:"flex items-center space-x-0.5 h-5"},[e.createElementVNode("div",{ref_key:"itemContainer",ref:a,class:"flex flex-wrap overflow-hidden space-x-0.5 h-5"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f,k=>(e.openBlock(),e.createBlock(be,{key:k.name,"source-app":k},null,8,["source-app"]))),128))],512),e.unref(r)>0?(e.openBlock(),e.createElementBlock("div",vn," +"+e.toDisplayString(e.unref(r)),1)):e.createCommentVNode("",!0)],512)):(e.openBlock(),e.createElementBlock("div",yn,[e.createElementVNode("div",{class:"h-2 w-2 rounded-full mr-2",style:e.normalizeStyle({backgroundColor:e.unref(u)(f).bgColor})},null,4),e.createElementVNode("span",kn,e.toDisplayString(e.unref(u)(f).name),1)]))]),option:e.withCtx(({item:f})=>[e.createElementVNode("div",bn,[e.createElementVNode("div",{class:"h-2 w-2 rounded-full mr-2",style:e.normalizeStyle({backgroundColor:f.bgColor})},null,4),e.createElementVNode("span",xn,e.toDisplayString(f.name),1)])]),_:1},8,["modelValue","multiple","items","search","search-placeholder","label","show-label","name","clearable","help"]))}}),Bn={class:"flex flex-wrap gap-1.5 text-xs"},wn=e.defineComponent({__name:"Badges",props:{items:null,label:null,name:null,help:null,modelValue:null,multiple:{type:Boolean},rules:null,by:null},emits:["update:modelValue"],setup(t,{emit:l}){const n=t,{selectedValue:o,isArrayValue:a}=ue({props:e.toRefs(n),emit:l}),s=r=>{a(o.value)?o.value=o.value.filter(i=>i.id!==r.id):o.value=void 0};return(r,i)=>(e.openBlock(),e.createBlock(de,{modelValue:e.unref(o),"onUpdate:modelValue":i[0]||(i[0]=u=>e.isRef(o)?o.value=u:null),multiple:t.multiple,items:t.items,label:t.label,name:t.name,help:t.help,rules:t.rules,by:t.by},{"something-selected":e.withCtx(({value:u})=>[e.createElementVNode("ul",Bn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a)(u)?u:[u],c=>(e.openBlock(),e.createElementBlock("li",{key:c[t.by]},[e.createVNode(ne,{size:"lg","clickable-icon":!0,"icon-left":e.unref(P.XMarkIcon),onClickIcon:e.withModifiers(h=>s(c),["stop"])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.text),1)]),_:2},1032,["icon-left","onClickIcon"])]))),128))])]),option:e.withCtx(({item:u})=>[e.createTextVNode(e.toDisplayString(u.text),1)]),_:1},8,["modelValue","multiple","items","label","name","help","rules","by"]))}}),Vn={class:"flex items-center"},En={class:"absolute inset-0 flex items-center gap-2 px-1 text-white"},Nn=e.defineComponent({__name:"Switch",props:{modelValue:{type:Boolean}},emits:["update:modelValue"],setup(t){const l=e.useModel(t,"modelValue");return(n,o)=>(e.openBlock(),e.createElementBlock("div",Vn,[e.createVNode(e.unref(I.Switch),{modelValue:l.value,"onUpdate:modelValue":o[0]||(o[0]=a=>l.value=a),class:e.normalizeClass(["relative inline-flex flex-shrink-0 h-6 w-11 border-2 border-transparent rounded-full cursor-pointer transition-colors ease-in-out duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary",{"bg-primary":l.value,"bg-primary-muted":!l.value}])},{default:e.withCtx(()=>[e.createElementVNode("div",En,[e.createVNode(e.unref(P.CheckIcon),{class:"h-5 w-5 drop-shadow-md"}),e.createVNode(e.unref(P.XMarkIcon),{class:"h-5 w-5 drop-shadow-md"})]),e.createElementVNode("span",{class:e.normalizeClass(["scale-95 pointer-events-none inline-block h-5 w-5 rounded-full bg-white shadow transform ring-0 transition ease-in-out duration-200",{"translate-x-5":l.value,"translate-x-0":!l.value}])},null,2)]),_:1},8,["modelValue","class"])]))}});var H=(t=>(t.CtrlOrCmd="cmd-or-ctrl",t.AltOrOpt="alt-or-opt",t.Shift="shift",t))(H||{});const ee=X.getClientOperatingSystem(),Sn={["cmd-or-ctrl"]:ee===X.OperatingSystem.Mac?"Cmd":"Ctrl",["alt-or-opt"]:ee===X.OperatingSystem.Mac?"Opt":"Alt",shift:"Shift"};function $n(t){const l=n=>Object.values(H).includes(n);return t.map(n=>l(n)?Sn[n]:n).join("+")}function In(t,...l){O.onKeyDown(l[0],n=>{const o=n.getModifierState("Alt"),a=ee===X.OperatingSystem.Mac?n.getModifierState("Meta"):n.getModifierState("Control"),s=n.getModifierState("Shift");for(const r of t)switch(r){case H.CtrlOrCmd:if(!a)return;break;case H.AltOrOpt:if(!o)return;break;case H.Shift:if(!s)return;break}l[1](n)},l[2])}function zn(t){const l=(t==null?void 0:t.model)||e.ref(),n=e.computed({get:()=>!!l.value,set:o=>l.value=o?!0:void 0});return{model:l,isChecked:n}}const Ln=e.createElementVNode("div",{class:"fixed inset-0 bg-neutral-100/70 dark:bg-neutral-900/70 transition-opacity"},null,-1),Dn={class:"fixed inset-0 z-10 overflow-y-auto"},Pn={class:"flex min-h-full justify-center p-4 text-center items-center sm:p-0"},Tn={key:0,class:"flex items-center justify-center shadow p-4 relative z-10 bg-foundation rounded-t-lg"},jn={class:"text-2xl font-bold"},On={class:"p-4 sm:p-6"},_n={key:2,class:"flex p-4 sm:px-6 sm:py-5 border-t gap-2 border-outline-3"},An=e.defineComponent({__name:"Dialog",props:{open:{type:Boolean},maxWidth:null,hideCloser:{type:Boolean},preventCloseOnClickOutside:{type:Boolean},title:null,buttons:null,onSubmit:{type:Function}},emits:["update:open","fully-closed"],setup(t,{emit:l}){const n=t,o=e.useSlots(),a=e.computed(()=>!!n.onSubmit),s=e.computed(()=>n.buttons||o.buttons),r=e.computed({get:()=>n.open,set:h=>l("update:open",h)}),i=e.computed(()=>{switch(n.maxWidth){case"sm":return 0;case"md":return 1;case"lg":return 2;case"xl":return 3;default:return 1e4}}),u=e.computed(()=>{const h=["w-full","sm:my-8 sm:w-full sm:max-w-xl"];return!n.title&&!s.value&&h.push("px-4 pt-4 pb-4","sm:p-6"),i.value>=1&&h.push("md:max-w-2xl"),i.value>=2&&h.push("lg:max-w-4xl"),i.value>=3&&h.push("xl:max-w-6xl"),i.value>=4&&h.push("2xl:max-w-7xl"),h.join(" ")}),c=()=>{n.preventCloseOnClickOutside||(r.value=!1)};return(h,v)=>(e.openBlock(),e.createBlock(e.unref(I.TransitionRoot),{as:"template",show:r.value},{default:e.withCtx(()=>[e.createVNode(e.unref(I.Dialog),{as:"div",class:"relative z-40",onClose:c},{default:e.withCtx(()=>[e.createVNode(e.unref(I.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(()=>[Ln]),_:1}),e.createElementVNode("div",Dn,[e.createElementVNode("div",Pn,[e.createVNode(e.unref(I.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:v[1]||(v[1]=f=>h.$emit("fully-closed"))},{default:e.withCtx(()=>[e.createVNode(e.unref(I.DialogPanel),{class:e.normalizeClass(["transform rounded-lg bg-foundation text-left shadow-xl transition-all",u.value]),as:a.value?"form":"div",onSubmit:e.withModifiers(t.onSubmit,["prevent"])},{default:e.withCtx(()=>[t.title?(e.openBlock(),e.createElementBlock("div",Tn,[e.createElementVNode("h4",jn,e.toDisplayString(t.title),1)])):e.createCommentVNode("",!0),t.hideCloser?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:1,class:"absolute z-20 top-5 right-4 text-foreground",onClick:v[0]||(v[0]=f=>r.value=!1)},[e.createVNode(e.unref(M.XMarkIcon),{class:"h-6 w-6"})])),e.createElementVNode("div",On,[e.renderSlot(h.$slots,"default",{},()=>[e.createTextVNode("Put your content here!")])]),s.value?(e.openBlock(),e.createElementBlock("div",_n,[t.buttons?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.buttons,(f,k)=>(e.openBlock(),e.createBlock(e.unref(F),e.mergeProps({key:k},f.props,{onClick:f.onClick}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.text),1)]),_:2},1040,["onClick"]))),128)):e.renderSlot(h.$slots,"buttons",{key:1})])):e.createCommentVNode("",!0)]),_:3},8,["class","as","onSubmit"])]),_:3})])])]),_:3})]),_:3},8,["show"]))}}),Mn={class:"inline-flex items-center space-x-2"},Fn={class:"label-light"},Rn=e.defineComponent({__name:"Disclosure",props:{title:null,icon:null,color:{default:"default"}},setup(t){const l=t,n=e.computed(()=>{const a=["pr-3 h-10 w-full flex items-center justify-between border-l-2 px-2 rounded transition","ring-1 font-medium"];switch(l.color){case"warning":a.push("border-warning text-warning ring-warning-lighter hover:ring-warning");break;case"success":a.push("border-success text-success ring-success-lighter hover:ring-success");break;case"danger":a.push("border-danger text-danger ring-danger-lighter hover:ring-danger");break;case"default":default:a.push("border-primary text-primary ring-primary-muted hover:ring-primary");break}return a.join(" ")}),o=e.computed(()=>{const a=["mt-4 px-3 py-1 border-x "];switch(l.color){case"warning":a.push("border-warning-lighter");break;case"success":a.push("border-success-lighter");break;case"danger":a.push("border-danger-lighter");break;case"default":default:a.push("border-primary-muted");break}return a.join(" ")});return(a,s)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(I.Disclosure),null,{default:e.withCtx(({open:r})=>[e.createVNode(e.unref(I.DisclosureButton),{class:e.normalizeClass(n.value)},{default:e.withCtx(()=>[e.createElementVNode("div",Mn,[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(P.ChevronUpIcon),{class:e.normalizeClass([r?"":"rotate-180 transform","h-5 w-5"])},null,8,["class"])]),_:2},1032,["class"]),e.createVNode(e.unref(I.DisclosurePanel),{class:e.normalizeClass(o.value)},{default:e.withCtx(()=>[e.createElementVNode("div",Fn,[e.renderSlot(a.$slots,"default",{},()=>[e.createTextVNode("Panel contents")])])]),_:3},8,["class"])]),_:3})]))}});var A=(t=>(t.Grid="grid",t.List="list",t))(A||{});const Un=e.defineComponent({__name:"GridListToggle",props:{modelValue:null},emits:["click","update:modelValue"],setup(t,{emit:l}){const n=t,o=e.computed({get:()=>n.modelValue||A.Grid,set:r=>l("update:modelValue",r)}),a=e.computed(()=>o.value===A.Grid?P.Bars3Icon:P.Squares2X2Icon),s=r=>{l("click",r);const i=o.value===A.Grid?A.List:A.Grid;o.value=i};return(r,i)=>(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(a.value),{class:"h-6 w-6"}))]))}});var xe=(t=>(t[t.Throttle=0]="Throttle",t[t.Debounce=1]="Debounce",t))(xe||{}),te=(t=>(t[t.Left=0]="Left",t[t.Right=1]="Right",t))(te||{});function Ce(t,l){if(!O.isClient)return;const{wait:n=100,throttleOrDebounce:o=0}=l||{},a=n?o===0?w.throttle(t,n):w.debounce(t,n):t;e.onMounted(()=>window.addEventListener("resize",a)),e.onBeforeUnmount(()=>window.removeEventListener("resize",a))}function qn(t){e.onMounted(()=>{window.addEventListener("beforeunload",t)}),e.onBeforeUnmount(()=>{window.removeEventListener("beforeunload",t)})}function Be(t){const{el:l,defaultDirection:n}=t,o=e.ref(w.isUndefined(n)?1:n),a=e.computed(()=>{const r=e.unref(t.stopUpdatesBelowWidth);if(!w.isUndefined(r))return r;const i=e.unref(l);return i!=null&&i.offsetWidth?i.offsetWidth*2:void 0}),s=()=>{if(!O.isClient)return;const r=e.unref(l);if(!r)return;const i=r.getBoundingClientRect(),u=i.x+i.width>window.innerWidth,c=i.x<0;u&&c||!w.isUndefined(a.value)&&window.innerWidth<a.value||(u?o.value=0:c&&(o.value=1))};return Ce(()=>s()),e.watch(()=>e.unref(l),r=>{r&&s()}),{direction:e.computed(()=>o.value),recalculateDirection:s}}const Wn=["disabled","onClick"],Kn=e.defineComponent({__name:"Menu",props:{open:{type:Boolean},items:null},emits:["update:open","chosen"],setup(t,{emit:l}){const n=t,o=e.ref(null),{direction:a}=Be({el:e.computed(()=>{var f;return((f=o.value)==null?void 0:f.el)||null}),defaultDirection:te.Left,stopUpdatesBelowWidth:300}),s=e.ref(null),r=e.ref(!1),i=e.computed({get:()=>n.open||!1,set:f=>l("update:open",f)}),u=f=>{const{active:k,disabled:d}=f,E=["group flex w-full items-center rounded-md px-2 py-2 text-sm"];return k?E.push("bg-primary text-foreground-on-primary"):d?E.push("text-foreground-disabled"):E.push("text-foreground"),E.join(" ")},c=(f,k)=>{l("chosen",{item:f,event:k})},h=()=>{var f;return(f=s.value)==null?void 0:f.el.click()},v=f=>{const k=!!f;return r.value=k,k};return e.watch(r,(f,k)=>{f!==k&&(i.value=f)}),e.watch(i,f=>{(f&&!r.value||!f&&r.value)&&h()}),(f,k)=>(e.openBlock(),e.createBlock(e.unref(I.Menu),{as:"div",class:"relative inline-block"},{default:e.withCtx(({open:d})=>[e.createElementVNode("div",null,[e.createVNode(e.unref(I.MenuButton),{ref_key:"menuButton",ref:s,class:"hidden",onClick:k[0]||(k[0]=e.withModifiers(()=>{},["stop","prevent"]))},null,512),e.createElementVNode("div",{class:e.normalizeClass(d?"pointer-events-none":"")},[e.renderSlot(f.$slots,"default",{toggle:h,open:v(d)})],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(I.MenuItems),{ref_key:"menuItems",ref:o,class:e.normalizeClass(["absolute mt-2 w-56 origin-top-right divide-y divide-outline-3 rounded-md bg-foundation shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none z-40",e.unref(a)===e.unref(te).Left?"right-0":""])},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(E,g)=>(e.openBlock(),e.createElementBlock("div",{key:g,class:"px-1 py-1"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E,y=>(e.openBlock(),e.createBlock(e.unref(I.MenuItem),{key:y.id,disabled:y.disabled},{default:e.withCtx(({active:C,disabled:x})=>[e.withDirectives((e.openBlock(),e.createElementBlock("span",null,[e.createElementVNode("button",{class:e.normalizeClass(u({active:C,disabled:x})),disabled:x,onClick:p=>c(y,p)},[e.renderSlot(f.$slots,"item",{item:y},()=>[e.createTextVNode(e.toDisplayString(y.title),1)])],10,Wn)])),[[e.unref(pe.directive),y.disabled&&y.disabledTooltip]])]),_:2},1032,["disabled"]))),128))]))),128))]),_:3},8,["class"])]),_:3})]),_:3}))}}),Hn={class:"flex flex-col space-y-4"},Xn={class:"flex space-x-6"},Gn=e.defineComponent({__name:"Tabs",props:{items:null},setup(t){const l=t,n=e.ref(null),o=e.computed(()=>n.value&&l.items.find(s=>s.id===n.value)||l.items[0]),a=s=>{n.value=s.id};return(s,r)=>(e.openBlock(),e.createElementBlock("div",Hn,[e.createElementVNode("div",Xn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,i=>(e.openBlock(),e.createBlock(F,{key:i.id,link:"",color:o.value.id===i.id?"default":"secondary",onClick:u=>a(i)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.title),1)]),_:2},1032,["color","onClick"]))),128))]),e.renderSlot(s.$slots,"default",{activeItem:o.value})]))}}),Qn={class:"text-foreground"},Jn={class:"w-full text-sm overflow-x-auto overflow-y-visible simple-scrollbar"},Yn=["onClick","onKeypress"],Zn=e.createElementVNode("div",{class:"text-gray-900 font-medium order-1"},"Placeholder",-1),eo={class:"absolute right-1.5 gap-1 flex items-center p-0"},to=e.defineComponent({__name:"Table",props:{items:null,buttons:null,columns:null,overflowCells:{type:Boolean},onRowClick:{type:Function}},setup(t){const l=t,n=e.computed(()=>{const r=(l.buttons||[]).length;let i=16;return r>0&&(i=48+(r-1)*42),`${i}px`}),o=r=>{var i;return((i=l.columns.find(u=>u.id===r))==null?void 0:i.classes)||""},a=(r,i)=>{const u=o(r);return i===0?`bg-transparent py-3 pr-5 px-1 ${u}`:`lg:p-0 px-1 ${u}`},s=r=>{var i;(i=l.onRowClick)==null||i.call(l,r)};return(r,i)=>(e.openBlock(),e.createElementBlock("div",Qn,[e.createElementVNode("div",Jn,[t.items.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:"grid z-10 grid-cols-12 items-center gap-6 font-semibold bg-foundation rounded-t-lg w-full border-b border-outline-3 pb-2 pt-4 px-4 min-w-[900px]",style:e.normalizeStyle({paddingRight:n.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.columns,u=>(e.openBlock(),e.createElementBlock("div",{key:u.id,class:e.normalizeClass([o(u.id),"capitalize"])},e.toDisplayString(u.header),3))),128))],4)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["divide-y divide-outline-3 h-full overflow-visible",{"pb-32":t.overflowCells}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,u=>(e.openBlock(),e.createElementBlock("div",{key:u.id,class:e.normalizeClass(["relative grid grid-cols-12 items-center gap-6 px-4 py-1 min-w-[900px] bg-foundation",{"cursor-pointer hover:bg-primary-muted":!!t.onRowClick}]),style:e.normalizeStyle({paddingRight:n.value}),tabindex:"0",onClick:c=>s(u),onKeypress:c=>s(u)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.columns,(c,h)=>(e.openBlock(),e.createElementBlock("div",{key:c.id,class:e.normalizeClass(a(c.id,h)),tabindex:"0"},[e.renderSlot(r.$slots,c.id,{item:u},()=>[Zn])],2))),128)),e.createElementVNode("div",eo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.buttons,c=>(e.openBlock(),e.createElementBlock("div",{key:c.label},[e.createVNode(e.unref(F),{"icon-left":c.icon,size:"sm",color:"secondary","hide-text":"",class:e.normalizeClass(c.class),onClick:e.withModifiers(h=>c.action(u),["stop"])},null,8,["icon-left","class","onClick"])]))),128))])],46,Yn))),128))],2)])]))}}),no={class:"w-full flex flex-col items-center my-2 space-y-2 mt-4"},oo={class:"inline-flex items-center space-x-1"},lo=e.createElementVNode("span",{class:"text-foreground-2"},"That's it, you've loaded everything!",-1),ao={class:"w-full flex flex-col items-center my-2 space-y-2 mt-4"},so={class:"inline-flex items-center space-x-1"},ro=e.createElementVNode("span",{class:"text-foreground-2"},"An error occurred while loading",-1),io=e.defineComponent({__name:"InfiniteLoading",props:{settings:null,allowRetry:{type:Boolean}},emits:["infinite"],setup(t){const l=e.ref(null),n=e.ref(!1);return O.isClient&&e.onMounted(()=>{const o=setInterval(()=>{var a;(a=l.value)!=null&&a.isConnected&&(n.value=!0,clearInterval(o))},200)}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:l},[n.value?(e.openBlock(),e.createBlock(e.unref(we),e.mergeProps({key:0},o.$props.settings||{},{onInfinite:a[0]||(a[0]=s=>o.$emit("infinite",s))}),{spinner:e.withCtx(()=>[e.createVNode(oe,{loading:!0,class:"my-2"})]),complete:e.withCtx(()=>[e.createElementVNode("div",no,[e.createElementVNode("div",oo,[e.createVNode(e.unref(M.CheckIcon),{class:"w-5 h-5 text-success"}),lo])])]),error:e.withCtx(({retry:s})=>[e.createElementVNode("div",ao,[e.createElementVNode("div",so,[e.createVNode(e.unref(M.ExclamationTriangleIcon),{class:"w-5 h-5 text-danger"}),ro]),t.allowRetry?(e.openBlock(),e.createBlock(F,{key:0,onClick:s},{default:e.withCtx(()=>[e.createTextVNode("Retry")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)])]),_:1},16)):e.createCommentVNode("",!0)],512))}}),co={class:"relative group"},uo={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"},mo=e.defineComponent({__name:"Panel",props:{form:{type:Boolean,default:!1},ring:{type:Boolean,default:!1},fancyGlow:{type:Boolean,default:!1},customPadding:{type:Boolean,default:!1},noShadow:{type:Boolean,default:!1},panelClasses:{type:String}},emits:["submit"],setup(t,{emit:l}){const n=t,o=e.computed(()=>n.customPadding?"":"px-4 py-4 sm:px-6"),a=e.computed(()=>n.customPadding?"":"px-4 py-4 sm:p-6"),s=e.computed(()=>{const r=["rounded-lg"];return n.noShadow||r.push("shadow"),n.ring&&r.push("ring-outline-2 hover:ring-2"),n.panelClasses&&r.push(n.panelClasses),r.join(" ")});return(r,i)=>(e.openBlock(),e.createElementBlock("div",co,[t.fancyGlow?(e.openBlock(),e.createElementBlock("div",uo)):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",s.value]),onSubmit:i[0]||(i[0]=u=>l("submit",u))},{default:e.withCtx(()=>[r.$slots.header?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(o.value)},[e.renderSlot(r.$slots,"header")],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["grow",a.value])},[e.renderSlot(r.$slots,"default")],2),r.$slots.footer?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(o.value)},[e.renderSlot(r.$slots,"footer")],2)):e.createCommentVNode("",!0)]),_:3},40,["class"]))]))}}),fo={class:"flex-shrink-0"},po=e.createElementVNode("span",{class:"sr-only"},"Dismiss",-1),ho=e.defineComponent({__name:"Alert",props:{color:{default:"success"},withDismiss:{type:Boolean},actions:null,customIcon:null,size:{default:"default"}},emits:["dismiss"],setup(t){const l=t,n=e.useSlots(),o=e.computed(()=>!!n.description),a=e.computed(()=>{if(l.customIcon)return l.customIcon;switch(l.color){case"info":return z.InformationCircleIcon;case"warning":return z.ExclamationCircleIcon;case"danger":return z.XCircleIcon;case"success":default:return z.CheckCircleIcon}}),s=e.computed(()=>{const d=[];switch(l.size){case"xs":d.push("p-1");break;case"default":default:d.push(o.value?"p-4":"p-2");break}switch(l.color){case"success":d.push("bg-success-lighter border-l-4 border-success");break;case"info":d.push("bg-info-lighter border-l-4 border-info");break;case"danger":d.push("bg-danger-lighter border-l-4 border-danger");break;case"warning":d.push("bg-warning-lighter border-l-4 border-warning");break}return d.join(" ")}),r=e.computed(()=>{const d=[];if(o.value)d.push("");else switch(d.push("items-center"),l.size){case"xs":d.push("space-x-1");break;case"default":default:d.push("space-x-2");break}return d.join(" ")}),i=e.computed(()=>{const d=["grow"];switch(o.value||d.push("flex items-center space-x-2"),l.size){case"xs":d.push("ml-1");break;case"default":default:d.push("ml-3");break}return d.join(" ")}),u=e.computed(()=>{const d=[];switch(l.size){case"xs":d.push("text-xs");break;case"default":default:d.push("mt-2 text-sm");break}return d.join(" ")}),c=e.computed(()=>{var g;const d=["flex"];o.value||d.push("grow justify-end");const E=o.value&&((g=l.actions)==null?void 0:g.length);switch(l.size){case"xs":d.push("space-x-1"),E&&d.push("mt-1");break;case"default":default:d.push("space-x-2"),E&&d.push("mt-4");break}return d.join(" ")}),h=e.computed(()=>{const d=[];switch(l.color){case"success":d.push("text-success-darker");break;case"info":d.push("text-info-darker");break;case"danger":d.push("text-danger-darker");break;case"warning":d.push("text-warning-darker");break}return d.join(" ")}),v=e.computed(()=>{const d=[];switch(l.size){case"xs":d.push("h-4 w-4"),d.push(o.value?"mt-0.5":"");break;case"default":default:d.push("h-5 w-5");break}switch(l.color){case"success":d.push("text-success");break;case"info":d.push("text-info");break;case"danger":d.push("text-danger");break;case"warning":d.push("text-warning");break}return d.join(" ")}),f=e.computed(()=>{const d=[];switch(l.color){case"success":d.push("bg-success-lighter ring-success");break;case"info":d.push("bg-info-lighter ring-info");break;case"danger":d.push("bg-danger-lighter ring-danger");break;case"warning":d.push("bg-warning-lighter ring-warning");break}return d.join(" ")}),k=e.computed(()=>{switch(l.size){case"xs":return"xs";case"default":default:return"sm"}});return(d,E)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["rounded-md",[s.value,h.value]])},[e.createElementVNode("div",{class:e.normalizeClass(["flex",r.value])},[e.createElementVNode("div",fo,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.value),{class:e.normalizeClass(v.value),"aria-hidden":"true"},null,8,["class"]))]),e.createElementVNode("div",{class:e.normalizeClass(i.value)},[e.createElementVNode("h3",{class:e.normalizeClass(["text-sm",[o.value?"font-medium":""]])},[e.renderSlot(d.$slots,"title",{},()=>[e.createTextVNode("Title")])],2),o.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(u.value)},[e.renderSlot(d.$slots,"description",{},()=>[e.createTextVNode(" Lorem ipsum dolor sit amet consectetur adipisicing elit. Aliquid pariatur, ipsum similique veniam. ")])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(c.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.actions||[],(g,y)=>(e.openBlock(),e.createBlock(F,{key:y,color:t.color,size:k.value,to:g.url,external:g.externalUrl||!1,onClick:C=>g.onClick||e.unref(w.noop)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g.title),1)]),_:2},1032,["color","size","to","external","onClick"]))),128))],2)],2),t.withDismiss?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["flex",[o.value?"items-start":"items-center"]])},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["inline-flex rounded-md focus:outline-none focus:ring-2",f.value]),onClick:E[0]||(E[0]=g=>d.$emit("dismiss"))},[po,e.createVNode(e.unref(z.XMarkIcon),{class:"h-5 w-5","aria-hidden":"true"})],2)],2)):e.createCommentVNode("",!0)],2)],2))}});function go(t){var d,E;const{get:l,initialState:n,readOptions:o,set:a,asyncRead:s=!0,debugging:r}=t,i=r==null?void 0:r.log,u=()=>(new Error("Trace:").stack||"").substring(7),c=((E=(d=t.debugging)==null?void 0:d.log)==null?void 0:E.logger)||console.debug,h=i&&!i.writesOnly?()=>{const g=l();return c(`debugging: '${i.name}' read`,g,u()),g}:l,v=i&&!i.readsOnly?g=>(c(`debugging: '${i.name}' written to`,g,u()),a(g)):a,f=s?O.computedAsync(h,n,o):e.computed(h),k=e.computed(()=>f.value);return k.update=v,k}const vo=e.defineComponent({__name:"ContextManager",setup(t,{expose:l}){const o=e.getCurrentInstance().provides,a=Object.getOwnPropertySymbols(o).find(f=>f.description==="ComboboxContext");a||console.error("FormTagsContextManager ctx key not found!");const s=e.inject(a||"__undefined");return s||console.error("FormTagsContextManager ctx not found!"),l({goUp:()=>{s==null||s.goToOption(1)},goDown:()=>{s==null||s.goToOption(2)},open:()=>{s&&s.openCombobox()},close:()=>{s==null||s.closeCombobox()},selectActive:()=>{s==null||s.selectActiveOption()},isOpen:()=>(s==null?void 0:s.comboboxState.value)===0}),(f,k)=>e.renderSlot(f.$slots,"default")}}),yo=["for"],ko=["disabled","placeholder","onKeydown"],bo=e.createElementVNode("span",{class:"text-xs sr-only"},"Clear input",-1),xo={key:1},Co=e.createElementVNode("div",{class:"text-foreground-2 text-center"},[e.createTextVNode(" Press "),e.createElementVNode("strong",null,"Enter"),e.createTextVNode(" to create tag ⚡ ")],-1),Bo=[Co],wo=["id"],Vo=e.defineComponent({__name:"Tags",props:e.mergeModels({name:null,help:null,label:null,showLabel:{type:Boolean},rules:null,validateOnMount:{type:Boolean},validateOnValueUpdate:{type:Boolean},autoFocus:{type:Boolean},showClear:{type:Boolean},showRequired:{type:Boolean},color:{default:"page"},wrapperClasses:null,size:{default:"base"},placeholder:null,disabled:{type:Boolean},useLabelInErrors:{type:Boolean,default:!0},getAutocompleteItems:{type:Function}},{modelValue:{local:!0}}),emits:e.mergeModels(["change","clear"],["update:modelValue"]),setup(t,{expose:l,emit:n}){const o=t,a=B=>B.type==="input",s=e.useModel(t,"modelValue",{local:!0}),r=e.ref(null),{focused:i}=O.useFocus(r),u=e.ref(null),{coreInputClasses:c,coreClasses:h,labelClasses:v,title:f,helpTip:k,helpTipId:d,hideHelpTip:E,helpTipClasses:g,errorMessage:y,clear:C}=ie({props:e.toRefs(o),emit:n,inputEl:r}),x=e.ref([]),p=e.ref(!1),N=e.ref(!1),$=e.ref(""),S=e.computed({get:()=>s.value||[],set:B=>{s.value=w.uniq(B).filter(m=>!!m.length)}}),R=e.computed(()=>{switch(o.size){case"sm":return"h-6";case"lg":return"h-10";case"xl":return"h-14";case"base":default:return"h-8"}}),j=e.computed(()=>{const B=[h.value,o.disabled?"cursor-not-allowed !bg-foundation-disabled !text-disabled-muted":""];return o.showClear&&(y.value||o.showRequired)?B.push("pr-14"):(o.showClear||y.value||o.showRequired)&&B.push("pr-8"),y.value?(B.push("border-2 border-danger text-danger-darker"),i.value&&B.push("ring-1 ring-danger")):(B.push("border-2 border-transparent"),i.value&&B.push("ring-2 ring-outline-2")),B.join(" ")}),_=B=>{if(o.disabled)return;const m=S.value.indexOf(B);if(m!==-1){const b=S.value.slice();b.splice(m,1),S.value=b}},D=()=>{var B;(B=r.value)==null||B.blur(),N.value=!1},Y=B=>{if(B.key!=="Backspace"||$.value.length)return;const m=S.value.slice();m.pop(),S.value=m,N.value=!1},le=()=>{var B,m,b;(B=u.value)!=null&&B.isOpen()?(m=u.value)==null||m.goUp():(b=u.value)==null||b.open()},ae=()=>{var B,m,b;(B=u.value)!=null&&B.isOpen()?(m=u.value)==null||m.goDown():(b=u.value)==null||b.open()},U=async()=>{o.getAutocompleteItems&&(p.value=!0,x.value=await Promise.resolve(o.getAutocompleteItems($.value)),p.value=!1)},G=w.debounce(U,1e3),Q=()=>{p.value=!0,G()},J=(B,m)=>{var V,L;if(a(B)?B.data===" "||B.data===","||B.data===";":!0){let T=!1;if((V=u.value)!=null&&V.isOpen()&&x.value.length&&!m)(L=u.value)==null||L.selectActive(),T=!0;else{const q=$.value.trim().substring(0,$.value.length-(a(B)?1:0)),Z=S.value.includes(q);q.length>0&&!Z&&(S.value=[...S.value,q],T=!0)}T&&($.value="",N.value=!1)}else N.value=!!$.value.length};return e.watch(N,(B,m)=>{var b,V;B&&!m?o.getAutocompleteItems&&((b=u.value)==null||b.open()):!B&&m&&((V=u.value)==null||V.close())}),e.watch($,()=>{Q()}),e.onMounted(()=>{U()}),l({resolveAutocompleteItems:U}),(B,m)=>(e.openBlock(),e.createBlock(e.unref(I.Combobox),{modelValue:S.value,"onUpdate:modelValue":m[5]||(m[5]=b=>S.value=b),as:"div",multiple:"",clearable:"",class:e.normalizeClass([t.wrapperClasses])},{default:e.withCtx(()=>[e.createVNode(vo,{ref_key:"ctxManager",ref:u},{default:e.withCtx(()=>[e.createElementVNode("label",{for:t.name,class:e.normalizeClass(e.unref(v))},[e.createElementVNode("span",null,e.toDisplayString(e.unref(f)),1)],10,yo),e.createElementVNode("div",{class:e.normalizeClass(["relative flex flex-wrap items-center space-x-1 px-2 py-1",j.value])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,b=>(e.openBlock(),e.createBlock(ne,{key:b,"icon-left":t.disabled?void 0:e.unref(z.XMarkIcon),"clickable-icon":"",size:"lg",onClickIcon:()=>_(b)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(b),1)]),_:2},1032,["icon-left","onClickIcon"]))),128)),e.withDirectives(e.createElementVNode("input",{ref_key:"inputEl",ref:r,"onUpdate:modelValue":m[0]||(m[0]=b=>$.value=b),disabled:t.disabled,class:e.normalizeClass(["bg-transparent grow shrink border-0 focus:ring-0 p-0",[e.unref(c),R.value]]),style:{"flex-basis":"70px","min-width":"70px"},placeholder:S.value.length?void 0:t.placeholder,onInput:J,onKeydown:[e.withKeys(D,["escape"]),m[1]||(m[1]=e.withKeys(b=>J(b,!0),["enter"])),e.withKeys(J,["tab"]),e.withKeys(Y,["backspace"]),e.withKeys(le,["arrow-up"]),e.withKeys(ae,["arrow-down"])],onBlur:m[2]||(m[2]=b=>N.value=!1)},null,42,ko),[[e.vModelText,$.value]]),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:m[3]||(m[3]=(...b)=>e.unref(C)&&e.unref(C)(...b)),onKeydown:m[4]||(m[4]=(...b)=>e.unref(C)&&e.unref(C)(...b))},[bo,e.createVNode(e.unref(z.XMarkIcon),{class:"h-5 w-5 text-foreground","aria-hidden":"true"})],32)):e.createCommentVNode("",!0),e.unref(y)?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["pointer-events-none absolute top-[10px] right-0 flex items-center",t.showClear?"pr-8":"pr-2"])},[e.createVNode(e.unref(z.ExclamationCircleIcon),{class:"h-4 w-4 text-danger","aria-hidden":"true"})],2)):e.createCommentVNode("",!0),t.showRequired&&!e.unref(y)?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["pointer-events-none absolute top-[2px] text-4xl right-0 flex items-center text-danger opacity-50",t.showClear?"pr-8":"pr-2"])}," * ",2)):e.createCommentVNode("",!0)],2),e.createVNode(e.unref(I.TransitionRoot),{leave:"transition ease-in duration-100","leave-from":"opacity-100","leave-to":"opacity-0",class:"relative px-0.5"},{default:e.withCtx(()=>[e.createVNode(e.unref(I.ComboboxOptions),{class:"absolute top-1 max-h-60 w-full overflow-auto simple-scrollbar rounded-md bg-foundation-2 py-1 shadow label label--light outline outline-2 outline-primary-muted focus:outline-none"},{default:e.withCtx(()=>[p.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["px-1",x.value.length?"mb-1":""])},[e.createVNode(oe,{loading:!0})],2)):e.createCommentVNode("",!0),!x.value.length&&!p.value?(e.openBlock(),e.createElementBlock("div",xo,Bo)):e.createCommentVNode("",!0),x.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(x.value,b=>(e.openBlock(),e.createBlock(e.unref(I.ComboboxOption),{key:b,as:"template",value:b},{default:e.withCtx(({selected:V,active:L})=>[e.createElementVNode("li",{class:e.normalizeClass(["relative cursor-pointer select-none py-1.5 pl-3",{"text-primary":L,"text-foreground":!L}])},[e.createElementVNode("span",{class:e.normalizeClass(["block truncate",{"font-medium":V,"font-normal":!V}])},e.toDisplayString(b),3),V?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["absolute inset-y-0 right-0 flex items-center pr-4",{"text-primary":L,"text-foreground":!L}])},[e.createVNode(e.unref(z.CheckIcon),{class:"h-5 w-5","aria-hidden":"true"})],2)):e.createCommentVNode("",!0)],2)]),_:2},1032,["value"]))),128)):e.createCommentVNode("",!0)]),_:1})]),_:1}),e.unref(d)&&!e.unref(E)?(e.openBlock(),e.createElementBlock("p",{key:0,id:e.unref(d),class:e.normalizeClass(e.unref(g))},e.toDisplayString(e.unref(k)),11,wo)):e.createCommentVNode("",!0)]),_:1},512)]),_:1},8,["modelValue","class"]))}});exports.CommonAlert=ho;exports.CommonBadge=ne;exports.CommonLoadingBar=oe;exports.CommonStepsBullet=yt;exports.CommonStepsNumber=lt;exports.CommonTextLink=ge;exports.FormButton=F;exports.FormCardButton=bt;exports.FormCheckbox=St;exports.FormSelectBadges=wn;exports.FormSelectBase=de;exports.FormSelectSourceApps=Cn;exports.FormSwitch=Nn;exports.FormTags=Vo;exports.FormTextArea=Pt;exports.FormTextInput=Ft;exports.GlobalToastRenderer=_e;exports.GridListToggleValue=A;exports.HorizontalDirection=te;exports.InfiniteLoading=io;exports.LayoutDialog=An;exports.LayoutDisclosure=Rn;exports.LayoutGridListToggle=Un;exports.LayoutMenu=Kn;exports.LayoutPanel=mo;exports.LayoutTable=to;exports.LayoutTabs=Gn;exports.ModifierKeys=H;exports.SourceAppBadge=be;exports.TailwindBreakpoints=K;exports.ThrottleOrDebounce=xe;exports.ToastNotificationType=W;exports.ValidationHelpers=Qt;exports.clientOs=ee;exports.getKeyboardShortcutTitle=$n;exports.onKeyboardShortcut=In;exports.useFormCheckboxModel=zn;exports.useFormSelectChildInternals=ue;exports.useOnBeforeWindowUnload=qn;exports.useResponsiveHorizontalDirectionCalculation=Be;exports.useWindowResizeHandler=Ce;exports.useWrappingContainerHiddenCount=ke;exports.writableAsyncComputed=go;
|
|
2
2
|
//# sourceMappingURL=lib.cjs.map
|