@headlessui/vue
Advanced tools
Comparing version 1.1.0 to 1.1.1-ab92811
@@ -1,4 +0,4 @@ | ||
import { ComputedRef } from 'vue'; | ||
import { ComputedRef, Ref } from 'vue'; | ||
export declare function useDescriptions({ slot, name, props, }?: { | ||
slot?: Record<string, unknown>; | ||
slot?: Ref<Record<string, unknown>>; | ||
name?: string; | ||
@@ -16,3 +16,3 @@ props?: Record<string, unknown>; | ||
register(value: string): () => void; | ||
slot: Record<string, any>; | ||
slot: Ref<Record<string, any>>; | ||
name: string; | ||
@@ -19,0 +19,0 @@ props: Record<string, any>; |
@@ -35,2 +35,4 @@ import { PropType, Ref } from 'vue'; | ||
describedby: import("vue").ComputedRef<string | undefined>; | ||
visible: import("vue").ComputedRef<boolean>; | ||
open: import("vue").ComputedRef<boolean>; | ||
handleClick(event: MouseEvent): void; | ||
@@ -85,3 +87,3 @@ handleKeyDown(event: KeyboardEvent): void; | ||
register(value: string): () => void; | ||
slot: Record<string, any>; | ||
slot: Ref<Record<string, any>>; | ||
name: string; | ||
@@ -88,0 +90,0 @@ props: Record<string, any>; |
@@ -60,2 +60,3 @@ import { Ref } from 'vue'; | ||
el: Ref<HTMLElement | null>; | ||
visible: import("vue").ComputedRef<boolean>; | ||
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{ | ||
@@ -62,0 +63,0 @@ as: string; |
@@ -1,2 +0,2 @@ | ||
import { Ref } from 'vue'; | ||
import { Ref, ComputedRef } from 'vue'; | ||
export declare let Listbox: import("vue").DefineComponent<{ | ||
@@ -13,3 +13,2 @@ as: { | ||
type: (ObjectConstructor | StringConstructor | BooleanConstructor | NumberConstructor)[]; | ||
default: null; | ||
}; | ||
@@ -23,7 +22,7 @@ }, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, { | ||
disabled: boolean; | ||
modelValue: null; | ||
} & {}>, { | ||
} & { | ||
modelValue?: unknown; | ||
}>, { | ||
as: string; | ||
disabled: boolean; | ||
modelValue: null; | ||
}>; | ||
@@ -77,2 +76,3 @@ export declare let ListboxLabel: import("vue").DefineComponent<{ | ||
handleKeyDown: (event: KeyboardEvent) => void; | ||
visible: ComputedRef<boolean>; | ||
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{ | ||
@@ -94,3 +94,2 @@ as: string; | ||
type: (ObjectConstructor | StringConstructor)[]; | ||
default: null; | ||
}; | ||
@@ -116,4 +115,4 @@ disabled: { | ||
disabled: boolean; | ||
value: null; | ||
} & { | ||
value?: unknown; | ||
class?: string | Function | undefined; | ||
@@ -124,3 +123,2 @@ className?: string | Function | undefined; | ||
disabled: boolean; | ||
value: null; | ||
}>; |
@@ -56,2 +56,3 @@ import { Ref } from 'vue'; | ||
handleKeyUp: (event: KeyboardEvent) => void; | ||
visible: import("vue").ComputedRef<boolean>; | ||
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{ | ||
@@ -58,0 +59,0 @@ as: string; |
@@ -55,2 +55,3 @@ import { Ref } from 'vue'; | ||
handleClick(): void; | ||
visible: import("vue").ComputedRef<boolean>; | ||
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{ | ||
@@ -86,2 +87,3 @@ as: string; | ||
handleKeyDown(event: KeyboardEvent): void; | ||
visible: import("vue").ComputedRef<boolean>; | ||
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{ | ||
@@ -88,0 +90,0 @@ as: string; |
@@ -109,3 +109,3 @@ import { Ref } from 'vue'; | ||
register(value: string): () => void; | ||
slot: Record<string, any>; | ||
slot: Ref<Record<string, any>>; | ||
name: string; | ||
@@ -112,0 +112,0 @@ props: Record<string, any>; |
@@ -22,4 +22,4 @@ import { Ref } from 'vue'; | ||
modelValue: { | ||
type: (ObjectConstructor | BooleanConstructor)[]; | ||
default: null; | ||
type: BooleanConstructor; | ||
default: boolean; | ||
}; | ||
@@ -44,3 +44,3 @@ class: { | ||
as: string; | ||
modelValue: null; | ||
modelValue: boolean; | ||
} & { | ||
@@ -51,3 +51,3 @@ class?: string | Function | undefined; | ||
as: string; | ||
modelValue: null; | ||
modelValue: boolean; | ||
}>; | ||
@@ -59,3 +59,3 @@ export declare let SwitchLabel: import("vue").DefineComponent<{ | ||
}; | ||
clickable: { | ||
passive: { | ||
type: BooleanConstructor[]; | ||
@@ -74,6 +74,6 @@ default: boolean; | ||
as: string; | ||
clickable: boolean; | ||
passive: boolean; | ||
} & {}>, { | ||
as: string; | ||
clickable: boolean; | ||
passive: boolean; | ||
}>; | ||
@@ -89,3 +89,3 @@ export declare let SwitchDescription: import("vue").DefineComponent<{ | ||
register(value: string): () => void; | ||
slot: Record<string, any>; | ||
slot: Ref<Record<string, any>>; | ||
name: string; | ||
@@ -92,0 +92,0 @@ props: Record<string, any>; |
@@ -116,2 +116,3 @@ import { Ref } from 'vue'; | ||
state: Ref<TreeStates>; | ||
show: import("vue").ComputedRef<boolean>; | ||
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("beforeEnter" | "afterEnter" | "beforeLeave" | "afterLeave")[], "beforeEnter" | "afterEnter" | "beforeLeave" | "afterLeave", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{ | ||
@@ -118,0 +119,0 @@ as: string; |
@@ -1,2 +0,2 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t,n,o=require("vue");function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function a(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o<a.length;o++)t.indexOf(n=a[o])>=0||(r[n]=e[n]);return r}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function u(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return i(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function l(e,t){if(e in t){for(var n=t[e],o=arguments.length,r=new Array(o>2?o-2:0),a=2;a<o;a++)r[a-2]=arguments[a];return"function"==typeof n?n.apply(void 0,r):n}var i=new Error('Tried to handle "'+e+'" but there is no handler defined. Only defined handlers are: '+Object.keys(t).map((function(e){return'"'+e+'"'})).join(", ")+".");throw Error.captureStackTrace&&Error.captureStackTrace(i,l),i}function s(n){var o,i,u=n.visible,s=void 0===u||u,d=n.features,p=void 0===d?e.None:d,f=a(n,["visible","features"]);return s||p&e.Static&&f.props.static?c(f):p&e.RenderStrategy?l(null==(o=f.props.unmount)||o?t.Unmount:t.Hidden,((i={})[t.Unmount]=function(){return null},i[t.Hidden]=function(){return c(r({},f,{props:r({},f.props,{hidden:!0,style:{display:"none"}})}))},i)):c(f)}function c(e){var t,n=e.attrs,r=e.slots,i=e.slot,l=e.name,s=function(e,t){void 0===t&&(t=[]);for(var n,o=Object.assign({},e),r=u(t);!(n=r()).done;){var a=n.value;a in o&&delete o[a]}return o}(e.props,["unmount","static"]),c=s.as,d=a(s,["as"]),p=null==r.default?void 0:r.default(i);if("template"===c){if(Object.keys(d).length>0||Object.keys(n).length>0){var f=null!=p?p:[],v=f[0],m=f.slice(1);if(null==(t=v)||"string"!=typeof t.type&&"object"!=typeof t.type&&"function"!=typeof t.type||m.length>0)throw new Error(['Passing props on "template"!',"","The current component <"+l+' /> is rendering a "template".',"However we need to passthrough the following props:",Object.keys(d).concat(Object.keys(n)).map((function(e){return" - "+e})).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".',"Render a single element as the child so that we can forward the props onto that element."].map((function(e){return" - "+e})).join("\n")].join("\n"));return o.cloneVNode(v,d)}return Array.isArray(p)&&1===p.length?p[0]:p}return o.h(c,d,p)}!function(e){e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static"}(e||(e={})),function(e){e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden"}(t||(t={})),function(e){e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab"}(n||(n={}));var d=0;function p(){return++d}var f,v,m,h,b=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map((function(e){return e+":not([tabindex='-1'])"})).join(",");function y(e){return void 0===e&&(e=document.body),null==e?[]:Array.from(e.querySelectorAll(b))}function g(e){null==e||e.focus({preventScroll:!0})}function S(e,t){var n=Array.isArray(e)?e:y(e),o=document.activeElement,r=function(){if(t&(f.First|f.Next))return m.Next;if(t&(f.Previous|f.Last))return m.Previous;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")}(),a=function(){if(t&f.First)return 0;if(t&f.Previous)return Math.max(0,n.indexOf(o))-1;if(t&f.Next)return Math.max(0,n.indexOf(o))+1;if(t&f.Last)return n.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")}(),i=t&f.NoScroll?{preventScroll:!0}:{},u=0,l=n.length,s=void 0;do{var c;if(u>=l||u+l<=0)return v.Error;var d=a+u;if(t&f.WrapAround)d=(d+l)%l;else{if(d<0)return v.Underflow;if(d>=l)return v.Overflow}null==(c=s=n[d])||c.focus(i),u+=r}while(s!==document.activeElement);return s.hasAttribute("tabindex")||s.setAttribute("tabindex","0"),v.Success}function w(e,t,n){window.addEventListener(e,t,n),o.onUnmounted((function(){return window.removeEventListener(e,t,n)}))}function x(e,t){for(var n,o=u(e);!(n=o()).done;)if(n.value.contains(t))return!0;return!1}function O(e,t,r){void 0===t&&(t=o.ref(!0)),void 0===r&&(r=o.ref({}));var a=o.ref("undefined"!=typeof window?document.activeElement:null),i=o.ref(null);function l(){if(t.value&&1===e.value.size){var n=r.value.initialFocus,o=document.activeElement;if(n){if(n===o)return}else if(x(e.value,o))return;if(a.value=o,n)g(n);else{for(var l,s=!1,c=u(e.value);!(l=c()).done;)if(S(l.value,f.First)===v.Success){s=!0;break}if(!s)throw new Error("There are no focusable elements inside the <FocusTrap />")}i.value=document.activeElement}}function s(){g(a.value),a.value=null,i.value=null}o.watchEffect(l),o.onUpdated((function(){t.value?l():s()})),o.onUnmounted(s),w("keydown",(function(o){if(t.value&&o.key===n.Tab&&document.activeElement&&1===e.value.size){o.preventDefault();for(var r,a=u(e.value);!(r=a()).done;)if(S(r.value,(o.shiftKey?f.Previous:f.Next)|f.WrapAround)===v.Success){i.value=document.activeElement;break}}})),w("focus",(function(n){if(t.value&&1===e.value.size){var o=i.value;if(o){var r=n.target;r&&r instanceof HTMLElement?x(e.value,r)?(i.value=r,g(r)):(n.preventDefault(),n.stopPropagation(),g(o)):g(i.value)}}}),!0)}!function(e){e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll"}(f||(f={})),function(e){e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow"}(v||(v={})),function(e){e[e.Previous=-1]="Previous",e[e.Next=1]="Next"}(m||(m={})),function(e){e[e.Strict=0]="Strict",e[e.Loose=1]="Loose"}(h||(h={}));var E=new Set,C=new Map;function D(e){e.setAttribute("aria-hidden","true"),e.inert=!0}function k(e){var t=C.get(e);t&&(null===t["aria-hidden"]?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",t["aria-hidden"]),e.inert=t.inert)}var P,T=Symbol("StackContext");function R(){return o.inject(T,(function(){}))}function I(e){var t=R();o.provide(T,(function(){for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];null==e||e.apply(void 0,o),t.apply(void 0,o)}))}!function(e){e[e.AddElement=0]="AddElement",e[e.RemoveElement=1]="RemoveElement"}(P||(P={}));var F=Symbol("ForcePortalRootContext"),L=o.defineComponent({name:"ForcePortalRoot",props:{as:{type:[Object,String],default:"template"},force:{type:Boolean,default:!1}},setup:function(e,t){var n=t.slots,r=t.attrs;return o.provide(F,e.force),function(){return s({props:a(e,["force"]),slot:{},slots:n,attrs:r,name:"ForcePortalRoot"})}}}),A=o.defineComponent({name:"Portal",props:{as:{type:[Object,String],default:"div"}},setup:function(e,t){var n=t.slots,a=t.attrs,i=o.inject(F,!1),u=o.inject(j,null),l=o.ref(!0===i||null===u?function(){var e=document.getElementById("headlessui-portal-root");if(e)return e;var t=document.createElement("div");return t.setAttribute("id","headlessui-portal-root"),document.body.appendChild(t)}():u.resolveTarget());o.watchEffect((function(){i||null!==u&&(l.value=u.resolveTarget())}));var c=o.ref(null);return function(e){var t=R();o.watchEffect((function(n){var o=null==e?void 0:e.value;o&&(t(P.AddElement,o),n((function(){return t(P.RemoveElement,o)})))}))}(c),o.onUnmounted((function(){var e,t=document.getElementById("headlessui-portal-root");t&&l.value===t&&l.value.children.length<=0&&(null==(e=l.value.parentElement)||e.removeChild(l.value))})),I(),function(){return null===l.value?null:o.h(o.Teleport,{to:l.value},s({props:r({},e,{ref:c}),slot:{},attrs:a,slots:n,name:"Portal"}))}}}),j=Symbol("PortalGroupContext"),$=o.defineComponent({name:"PortalGroup",props:{as:{type:[Object,String],default:"template"},target:{type:Object,default:null}},setup:function(e,t){var n=t.attrs,r=t.slots,i=o.reactive({resolveTarget:function(){return e.target}});return o.provide(j,i),function(){return s({props:a(e,["target"]),slot:{},attrs:n,slots:r,name:"PortalGroup"})}}}),B=Symbol("DescriptionContext");function M(e){var t=void 0===e?{}:e,n=t.slot,r=void 0===n?{}:n,a=t.name,i=void 0===a?"Description":a,u=t.props,l=void 0===u?{}:u,s=o.ref([]);return o.provide(B,{register:function(e){return s.value.push(e),function(){var t=s.value.indexOf(e);-1!==t&&s.value.splice(t,1)}},slot:r,name:i,props:l}),o.computed((function(){return s.value.length>0?s.value.join(" "):void 0}))}var K,N=o.defineComponent({name:"Description",props:{as:{type:[Object,String],default:"p"}},render:function(){var e=this.context,t=e.name,n=void 0===t?"Description":t,a=e.slot,i=void 0===a?{}:a,u=e.props,l=this.$props,c=r({},Object.entries(void 0===u?{}:u).reduce((function(e,t){var n;return Object.assign(e,((n={})[t[0]]=o.unref(t[1]),n))}),{}),{id:this.id});return s({props:r({},l,c),slot:i,attrs:this.$attrs,slots:this.$slots,name:n})},setup:function(){var e=function(){var e=o.inject(B,null);if(null===e)throw new Error("Missing parent");return e}(),t="headlessui-description-"+p();return o.onMounted((function(){return o.onUnmounted(e.register(t))})),{id:t,context:e}}});function U(e){var t;return null==e||null==e.value?null:null!=(t=e.value.$el)?t:e.value}!function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(K||(K={}));var V=Symbol("DialogContext");function G(e){var t=o.inject(V,null);if(null===t){var n=new Error("<"+e+" /> is missing a parent <Dialog /> component.");throw Error.captureStackTrace&&Error.captureStackTrace(n,G),n}return t}var H,q="DC8F892D-2EBD-447C-A4C8-A03058436FF4",W=o.defineComponent({name:"Dialog",inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},open:{type:Boolean,default:q},initialFocus:{type:Object,default:null}},emits:["close"],render:function(){var t=this,n=r({},this.$attrs,{ref:"el",id:this.id,role:"dialog","aria-modal":this.dialogState===K.Open||void 0,"aria-labelledby":this.titleId,"aria-describedby":this.describedby,onClick:this.handleClick,onKeydown:this.handleKeyDown}),i=this.$props,u=i.open,l=a(i,["open","initialFocus"]),c={open:this.dialogState===K.Open};return o.h(L,{force:!0},(function(){return o.h(A,(function(){return o.h($,{target:t.dialogRef},(function(){return o.h(L,{force:!1},(function(){return s({props:r({},l,n),slot:c,attrs:t.$attrs,slots:t.$slots,visible:u,features:e.RenderStrategy|e.Static,name:"Dialog"})}))}))}))}))},setup:function(e,t){var r=t.emit,a=o.ref(new Set);if(e.open===q)throw new Error("You forgot to provide an `open` prop to the `Dialog`.");if("boolean"!=typeof e.open)throw new Error("You provided an `open` prop to the `Dialog`, but the value is not a boolean. Received: "+(e.open===q?void 0:e.open));var i=o.computed((function(){return e.open?K.Open:K.Closed})),s=o.ref(null),c=o.ref(i.value===K.Open);o.onUpdated((function(){c.value=i.value===K.Open}));var d="headlessui-dialog-"+p(),f=o.computed((function(){return{initialFocus:e.initialFocus}}));O(a,c,f),function(e,t){void 0===t&&(t=o.ref(!0)),o.watchEffect((function(n){if(t.value&&e.value){var o=e.value;E.add(o);for(var r,a=u(C.keys());!(r=a()).done;){var i=r.value;i.contains(o)&&(k(i),C.delete(i))}document.querySelectorAll("body > *").forEach((function(e){if(e instanceof HTMLElement){for(var t,n=u(E);!(t=n()).done;)if(e.contains(t.value))return;1===E.size&&(C.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),D(e))}})),n((function(){if(E.delete(o),E.size>0)document.querySelectorAll("body > *").forEach((function(e){if(e instanceof HTMLElement&&!C.has(e)){for(var t,n=u(E);!(t=n()).done;)if(e.contains(t.value))return;C.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),D(e)}}));else for(var e,t=u(C.keys());!(e=t()).done;){var n=e.value;k(n),C.delete(n)}}))}}))}(s,c),I((function(e,t){var n;return l(e,((n={})[P.AddElement]=function(){a.value.add(t)},n[P.RemoveElement]=function(){a.value.delete(t)},n))}));var v=M({name:"DialogDescription",slot:{open:e.open}}),m=o.ref(null),h={titleId:m,dialogState:i,setTitleId:function(e){m.value!==e&&(m.value=e)},close:function(){r("close",!1)}};return o.provide(V,h),w("mousedown",(function(e){var t=e.target;i.value===K.Open&&1===a.value.size&&(x(a.value,t)||(h.close(),o.nextTick((function(){return null==t?void 0:t.focus()}))))})),o.watchEffect((function(e){if(i.value===K.Open){var t=document.documentElement.style.overflow,n=document.documentElement.style.paddingRight,o=window.innerWidth-document.documentElement.clientWidth;document.documentElement.style.overflow="hidden",document.documentElement.style.paddingRight=o+"px",e((function(){document.documentElement.style.overflow=t,document.documentElement.style.paddingRight=n}))}})),o.watchEffect((function(e){if(i.value===K.Open){var t=U(s);if(t){var n=new IntersectionObserver((function(e){for(var t,n=u(e);!(t=n()).done;){var o=t.value;0===o.boundingClientRect.x&&0===o.boundingClientRect.y&&0===o.boundingClientRect.width&&0===o.boundingClientRect.height&&h.close()}}));n.observe(t),e((function(){return n.disconnect()}))}}})),{id:d,el:s,dialogRef:s,containers:a,dialogState:i,titleId:m,describedby:v,handleClick:function(e){e.preventDefault(),e.stopPropagation()},handleKeyDown:function(e){e.key===n.Escape&&i.value===K.Open&&(a.value.size>1||(e.preventDefault(),e.stopPropagation(),h.close()))}}}}),_=o.defineComponent({name:"DialogOverlay",props:{as:{type:[Object,String],default:"div"}},render:function(){var e=G("DialogOverlay");return s({props:r({},this.$props,{ref:"el",id:this.id,"aria-hidden":!0,onClick:this.handleClick}),slot:{open:e.dialogState.value===K.Open},attrs:this.$attrs,slots:this.$slots,name:"DialogOverlay"})},setup:function(){var e=G("DialogOverlay");return{id:"headlessui-dialog-overlay-"+p(),handleClick:function(t){t.preventDefault(),t.stopPropagation(),e.close()}}}}),z=o.defineComponent({name:"DialogTitle",props:{as:{type:[Object,String],default:"h2"}},render:function(){var e=G("DialogTitle");return s({props:r({},this.$props,{id:this.id}),slot:{open:e.dialogState.value===K.Open},attrs:this.$attrs,slots:this.$slots,name:"DialogTitle"})},setup:function(){var e=G("DialogTitle"),t="headlessui-dialog-title-"+p();return o.onMounted((function(){e.setTitleId(t),o.onUnmounted((function(){return e.setTitleId(null)}))})),{id:t}}}),Q=N;!function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(H||(H={}));var Y=Symbol("DisclosureContext");function J(e){var t=o.inject(Y,null);if(null===t){var n=new Error("<"+e+" /> is missing a parent <Disclosure /> component.");throw Error.captureStackTrace&&Error.captureStackTrace(n,J),n}return t}var X,Z,ee=o.defineComponent({name:"Disclosure",props:{as:{type:[Object,String],default:"template"},defaultOpen:{type:[Boolean],default:!1}},setup:function(e,t){var n=t.slots,r=t.attrs,i=o.ref(e.defaultOpen?H.Open:H.Closed),u=o.ref(null);return o.provide(Y,{disclosureState:i,panelRef:u,toggleDisclosure:function(){var e;i.value=l(i.value,((e={})[H.Open]=H.Closed,e[H.Closed]=H.Open,e))}}),function(){return s({props:a(e,["defaultOpen"]),slot:{open:i.value===H.Open},slots:n,attrs:r,name:"Disclosure"})}}}),te=o.defineComponent({name:"DisclosureButton",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1}},render:function(){var e=J("DisclosureButton"),t={open:e.disclosureState.value===H.Open};return s({props:r({},this.$props,{id:this.id,type:"button","aria-expanded":e.disclosureState.value===H.Open||void 0,"aria-controls":this.ariaControls,onClick:this.handleClick,onKeydown:this.handleKeyDown,onKeyup:this.handleKeyUp}),slot:t,attrs:this.$attrs,slots:this.$slots,name:"DisclosureButton"})},setup:function(e){var t=J("DisclosureButton");return{id:"headlessui-disclosure-button-"+p(),ariaControls:o.computed((function(){var e,n;return null!=(e=null==(n=U(t.panelRef))?void 0:n.id)?e:void 0})),handleClick:function(){e.disabled||t.toggleDisclosure()},handleKeyDown:function(o){if(!e.disabled)switch(o.key){case n.Space:case n.Enter:o.preventDefault(),o.stopPropagation(),t.toggleDisclosure()}},handleKeyUp:function(e){switch(e.key){case n.Space:e.preventDefault()}}}}}),ne=o.defineComponent({name:"DisclosurePanel",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0}},render:function(){var t={open:J("DisclosurePanel").disclosureState.value===H.Open};return s({props:r({},this.$props,{id:this.id,ref:"el"}),slot:t,attrs:this.$attrs,slots:this.$slots,features:e.RenderStrategy|e.Static,visible:t.open,name:"DisclosurePanel"})},setup:function(){var e=J("DisclosurePanel");return{id:"headlessui-disclosure-panel-"+p(),el:e.panelRef}}}),oe=o.defineComponent({name:"FocusTrap",props:{as:{type:[Object,String],default:"div"},initialFocus:{type:Object,default:null}},render:function(){return s({props:r({},a(this.$props,["initialFocus"]),{ref:"el"}),slot:{},attrs:this.$attrs,slots:this.$slots,name:"FocusTrap"})},setup:function(e){var t=o.ref(new Set),n=o.ref(null),r=o.ref(!0),a=o.computed((function(){return{initialFocus:e.initialFocus}}));return o.onMounted((function(){n.value&&(t.value.add(n.value),O(t,r,a))})),o.onUnmounted((function(){r.value=!1})),{el:n}}});function re(e,t){var n=t.resolveItems();if(n.length<=0)return null;var o=t.resolveActiveIndex(),r=null!=o?o:-1,a=function(){switch(e.focus){case X.First:return n.findIndex((function(e){return!t.resolveDisabled(e)}));case X.Previous:var o=n.slice().reverse().findIndex((function(e,n,o){return!(-1!==r&&o.length-n-1>=r||t.resolveDisabled(e))}));return-1===o?o:n.length-1-o;case X.Next:return n.findIndex((function(e,n){return!(n<=r||t.resolveDisabled(e))}));case X.Last:var a=n.slice().reverse().findIndex((function(e){return!t.resolveDisabled(e)}));return-1===a?a:n.length-1-a;case X.Specific:return n.findIndex((function(n){return t.resolveId(n)===e.id}));case X.Nothing:return null;default:!function(e){throw new Error("Unexpected object: "+e)}(e)}}();return-1===a?o:a}function ae(e,t){if(void 0!==e)return"function"==typeof e?e(t):e}!function(e){e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing"}(X||(X={})),function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(Z||(Z={}));var ie=Symbol("ListboxContext");function ue(e){var t=o.inject(ie,null);if(null===t){var n=new Error("<"+e+" /> is missing a parent <Listbox /> component.");throw Error.captureStackTrace&&Error.captureStackTrace(n,ue),n}return t}var le,se=o.defineComponent({name:"Listbox",emits:["update:modelValue"],props:{as:{type:[Object,String],default:"template"},disabled:{type:[Boolean],default:!1},modelValue:{type:[Object,String,Number,Boolean],default:null}},setup:function(e,t){var n=t.slots,r=t.attrs,i=t.emit,u=e.disabled,l=a(e,["modelValue","disabled"]),c=o.ref(Z.Closed),d=o.ref(null),p=o.ref(null),f=o.ref(null),v=o.ref([]),m=o.ref(""),h=o.ref(null),b=o.computed((function(){return e.modelValue})),y={listboxState:c,value:b,labelRef:d,buttonRef:p,optionsRef:f,disabled:u,options:v,searchQuery:m,activeOptionIndex:h,closeListbox:function(){u||c.value!==Z.Closed&&(c.value=Z.Closed,h.value=null)},openListbox:function(){u||c.value!==Z.Open&&(c.value=Z.Open)},goToOption:function(e,t){if(!u&&c.value!==Z.Closed){var n=re(e===X.Specific?{focus:X.Specific,id:t}:{focus:e},{resolveItems:function(){return v.value},resolveActiveIndex:function(){return h.value},resolveId:function(e){return e.id},resolveDisabled:function(e){return e.dataRef.disabled}});""===m.value&&h.value===n||(m.value="",h.value=n)}},search:function(e){if(!u&&c.value!==Z.Closed){m.value+=e.toLowerCase();var t=v.value.findIndex((function(e){return!e.dataRef.disabled&&e.dataRef.textValue.startsWith(m.value)}));-1!==t&&t!==h.value&&(h.value=t)}},clearSearch:function(){u||c.value!==Z.Closed&&""!==m.value&&(m.value="")},registerOption:function(e,t){v.value.push({id:e,dataRef:t})},unregisterOption:function(e){var t=v.value.slice(),n=null!==h.value?t[h.value]:null,o=t.findIndex((function(t){return t.id===e}));-1!==o&&t.splice(o,1),v.value=t,h.value=o===h.value||null===n?null:t.indexOf(n)},select:function(e){u||i("update:modelValue",e)}};return w("mousedown",(function(e){var t,n,o,r=e.target,a=document.activeElement;c.value===Z.Open&&((null==(t=U(p))?void 0:t.contains(r))||((null==(n=U(f))?void 0:n.contains(r))||y.closeListbox(),a!==document.body&&(null==a?void 0:a.contains(r))||e.defaultPrevented||null==(o=U(p))||o.focus({preventScroll:!0})))})),o.provide(ie,y),function(){return s({props:l,slot:{open:c.value===Z.Open,disabled:u},slots:n,attrs:r,name:"Listbox"})}}}),ce=o.defineComponent({name:"ListboxLabel",props:{as:{type:[Object,String],default:"label"}},render:function(){var e=ue("ListboxLabel"),t={open:e.listboxState.value===Z.Open,disabled:e.disabled};return s({props:r({},this.$props,{id:this.id,ref:"el",onClick:this.handleClick}),slot:t,attrs:this.$attrs,slots:this.$slots,name:"ListboxLabel"})},setup:function(){var e=ue("ListboxLabel");return{id:"headlessui-listbox-label-"+p(),el:e.labelRef,handleClick:function(){var t;null==(t=U(e.buttonRef))||t.focus({preventScroll:!0})}}}}),de=o.defineComponent({name:"ListboxButton",props:{as:{type:[Object,String],default:"button"}},render:function(){var e,t,n=ue("ListboxButton"),o={open:n.listboxState.value===Z.Open,disabled:n.disabled},a={ref:"el",id:this.id,type:"button","aria-haspopup":!0,"aria-controls":null==(e=U(n.optionsRef))?void 0:e.id,"aria-expanded":n.listboxState.value===Z.Open||void 0,"aria-labelledby":n.labelRef.value?[null==(t=U(n.labelRef))?void 0:t.id,this.id].join(" "):void 0,disabled:n.disabled,onKeydown:this.handleKeyDown,onKeyup:this.handleKeyUp,onClick:this.handleClick};return s({props:r({},this.$props,a),slot:o,attrs:this.$attrs,slots:this.$slots,name:"ListboxButton"})},setup:function(){var e=ue("ListboxButton");return{id:"headlessui-listbox-button-"+p(),el:e.buttonRef,handleKeyDown:function(t){switch(t.key){case n.Space:case n.Enter:case n.ArrowDown:t.preventDefault(),e.openListbox(),o.nextTick((function(){var t;null==(t=U(e.optionsRef))||t.focus({preventScroll:!0}),e.value.value||e.goToOption(X.First)}));break;case n.ArrowUp:t.preventDefault(),e.openListbox(),o.nextTick((function(){var t;null==(t=U(e.optionsRef))||t.focus({preventScroll:!0}),e.value.value||e.goToOption(X.Last)}))}},handleKeyUp:function(e){switch(e.key){case n.Space:e.preventDefault()}},handleClick:function(t){var n;e.disabled||(e.listboxState.value===Z.Open?(e.closeListbox(),o.nextTick((function(){var t;return null==(t=U(e.buttonRef))?void 0:t.focus({preventScroll:!0})}))):(t.preventDefault(),e.openListbox(),n=function(){var t;return null==(t=U(e.optionsRef))?void 0:t.focus({preventScroll:!0})},requestAnimationFrame((function(){return requestAnimationFrame(n)}))))}}}}),pe=o.defineComponent({name:"ListboxOptions",props:{as:{type:[Object,String],default:"ul"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0}},render:function(){var t,n,o,a,i=ue("ListboxOptions"),u={open:i.listboxState.value===Z.Open},l={"aria-activedescendant":null===i.activeOptionIndex.value||null==(t=i.options.value[i.activeOptionIndex.value])?void 0:t.id,"aria-labelledby":null!=(n=null==(o=U(i.labelRef))?void 0:o.id)?n:null==(a=U(i.buttonRef))?void 0:a.id,id:this.id,onKeydown:this.handleKeyDown,role:"listbox",tabIndex:0,ref:"el"};return s({props:r({},this.$props,l),slot:u,attrs:this.$attrs,slots:this.$slots,features:e.RenderStrategy|e.Static,visible:u.open,name:"ListboxOptions"})},setup:function(){var e=ue("ListboxOptions"),t="headlessui-listbox-options-"+p(),r=o.ref(null);return{id:t,el:e.optionsRef,handleKeyDown:function(t){switch(r.value&&clearTimeout(r.value),t.key){case n.Space:if(""!==e.searchQuery.value)return t.preventDefault(),t.stopPropagation(),e.search(t.key);case n.Enter:t.preventDefault(),t.stopPropagation(),null!==e.activeOptionIndex.value&&e.select(e.options.value[e.activeOptionIndex.value].dataRef.value),e.closeListbox(),o.nextTick((function(){var t;return null==(t=U(e.buttonRef))?void 0:t.focus({preventScroll:!0})}));break;case n.ArrowDown:return t.preventDefault(),t.stopPropagation(),e.goToOption(X.Next);case n.ArrowUp:return t.preventDefault(),t.stopPropagation(),e.goToOption(X.Previous);case n.Home:case n.PageUp:return t.preventDefault(),t.stopPropagation(),e.goToOption(X.First);case n.End:case n.PageDown:return t.preventDefault(),t.stopPropagation(),e.goToOption(X.Last);case n.Escape:t.preventDefault(),t.stopPropagation(),e.closeListbox(),o.nextTick((function(){var t;return null==(t=U(e.buttonRef))?void 0:t.focus({preventScroll:!0})}));break;case n.Tab:t.preventDefault(),t.stopPropagation();break;default:1===t.key.length&&(e.search(t.key),r.value=setTimeout((function(){return e.clearSearch()}),350))}}}}}),fe=o.defineComponent({name:"ListboxOption",props:{as:{type:[Object,String],default:"li"},value:{type:[Object,String],default:null},disabled:{type:Boolean,default:!1},class:{type:[String,Function],required:!1},className:{type:[String,Function],required:!1}},setup:function(e,t){var n=t.slots,a=t.attrs,i=ue("ListboxOption"),u="headlessui-listbox-option-"+p(),l=e.disabled,c=e.className,d=void 0===c?e.class:c,f=e.value,v=o.computed((function(){return null!==i.activeOptionIndex.value&&i.options.value[i.activeOptionIndex.value].id===u})),m=o.computed((function(){return o.toRaw(i.value.value)===o.toRaw(f)})),h=o.ref({disabled:l,value:f,textValue:""});function b(e){if(l)return e.preventDefault();i.select(f),i.closeListbox(),o.nextTick((function(){var e;return null==(e=U(i.buttonRef))?void 0:e.focus({preventScroll:!0})}))}function y(){if(l)return i.goToOption(X.Nothing);i.goToOption(X.Specific,u)}function g(){l||v.value||i.goToOption(X.Specific,u)}function S(){l||v.value&&i.goToOption(X.Nothing)}return o.onMounted((function(){var e,t,n=null==(e=document.getElementById(u))||null==(t=e.textContent)?void 0:t.toLowerCase().trim();void 0!==n&&(h.value.textValue=n)})),o.onMounted((function(){return i.registerOption(u,h)})),o.onUnmounted((function(){return i.unregisterOption(u)})),o.onMounted((function(){o.watch([i.listboxState,m],(function(){var e;i.listboxState.value===Z.Open&&m.value&&(i.goToOption(X.Specific,u),null==(e=document.getElementById(u))||null==e.focus||e.focus())}),{immediate:!0})})),o.watchEffect((function(){i.listboxState.value===Z.Open&&v.value&&o.nextTick((function(){var e;return null==(e=document.getElementById(u))||null==e.scrollIntoView?void 0:e.scrollIntoView({block:"nearest"})}))})),function(){var t={active:v.value,selected:m.value,disabled:l},o={id:u,role:"option",tabIndex:-1,class:ae(d,t),"aria-disabled":!0===l||void 0,"aria-selected":!0===m.value?m.value:void 0,onClick:b,onFocus:y,onPointermove:g,onMousemove:g,onPointerleave:S,onMouseleave:S};return s({props:r({},e,o),slot:t,attrs:a,slots:n,name:"ListboxOption"})}}});function ve(e){var t=e.container,n=e.accept,r=e.walk,a=e.enabled;o.watchEffect((function(){var e=t.value;if(e&&(void 0===a||a.value))for(var o=Object.assign((function(e){return n(e)}),{acceptNode:n}),i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,o,!1);i.nextNode();)r(i.currentNode)}))}!function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(le||(le={}));var me=Symbol("MenuContext");function he(e){var t=o.inject(me,null);if(null===t){var n=new Error("<"+e+" /> is missing a parent <Menu /> component.");throw Error.captureStackTrace&&Error.captureStackTrace(n,he),n}return t}var be,ye=o.defineComponent({name:"Menu",props:{as:{type:[Object,String],default:"template"}},setup:function(e,t){var n=t.slots,r=t.attrs,a=o.ref(le.Closed),i=o.ref(null),u=o.ref(null),l=o.ref([]),c=o.ref(""),d=o.ref(null),p={menuState:a,buttonRef:i,itemsRef:u,items:l,searchQuery:c,activeItemIndex:d,closeMenu:function(){a.value=le.Closed,d.value=null},openMenu:function(){return a.value=le.Open},goToItem:function(e,t){var n=re(e===X.Specific?{focus:X.Specific,id:t}:{focus:e},{resolveItems:function(){return l.value},resolveActiveIndex:function(){return d.value},resolveId:function(e){return e.id},resolveDisabled:function(e){return e.dataRef.disabled}});""===c.value&&d.value===n||(c.value="",d.value=n)},search:function(e){c.value+=e.toLowerCase();var t=l.value.findIndex((function(e){return e.dataRef.textValue.startsWith(c.value)&&!e.dataRef.disabled}));-1!==t&&t!==d.value&&(d.value=t)},clearSearch:function(){c.value=""},registerItem:function(e,t){l.value.push({id:e,dataRef:t})},unregisterItem:function(e){var t=l.value.slice(),n=null!==d.value?t[d.value]:null,o=t.findIndex((function(t){return t.id===e}));-1!==o&&t.splice(o,1),l.value=t,d.value=o===d.value||null===n?null:t.indexOf(n)}};return w("mousedown",(function(e){var t,n,o,r=e.target,l=document.activeElement;a.value===le.Open&&((null==(t=U(i))?void 0:t.contains(r))||((null==(n=U(u))?void 0:n.contains(r))||p.closeMenu(),l!==document.body&&(null==l?void 0:l.contains(r))||e.defaultPrevented||null==(o=U(i))||o.focus({preventScroll:!0})))})),o.provide(me,p),function(){return s({props:e,slot:{open:a.value===le.Open},slots:n,attrs:r,name:"Menu"})}}}),ge=o.defineComponent({name:"MenuButton",props:{disabled:{type:Boolean,default:!1},as:{type:[Object,String],default:"button"}},render:function(){var e,t=he("MenuButton"),n={open:t.menuState.value===le.Open},o={ref:"el",id:this.id,type:"button","aria-haspopup":!0,"aria-controls":null==(e=U(t.itemsRef))?void 0:e.id,"aria-expanded":t.menuState.value===le.Open||void 0,onKeydown:this.handleKeyDown,onKeyup:this.handleKeyUp,onClick:this.handleClick};return s({props:r({},this.$props,o),slot:n,attrs:this.$attrs,slots:this.$slots,name:"MenuButton"})},setup:function(e){var t=he("MenuButton");return{id:"headlessui-menu-button-"+p(),el:t.buttonRef,handleKeyDown:function(e){switch(e.key){case n.Space:case n.Enter:case n.ArrowDown:e.preventDefault(),e.stopPropagation(),t.openMenu(),o.nextTick((function(){var e;null==(e=U(t.itemsRef))||e.focus({preventScroll:!0}),t.goToItem(X.First)}));break;case n.ArrowUp:e.preventDefault(),e.stopPropagation(),t.openMenu(),o.nextTick((function(){var e;null==(e=U(t.itemsRef))||e.focus({preventScroll:!0}),t.goToItem(X.Last)}))}},handleKeyUp:function(e){switch(e.key){case n.Space:e.preventDefault()}},handleClick:function(n){var r;e.disabled||(t.menuState.value===le.Open?(t.closeMenu(),o.nextTick((function(){var e;return null==(e=U(t.buttonRef))?void 0:e.focus({preventScroll:!0})}))):(n.preventDefault(),n.stopPropagation(),t.openMenu(),r=function(){var e;return null==(e=U(t.itemsRef))?void 0:e.focus({preventScroll:!0})},requestAnimationFrame((function(){return requestAnimationFrame(r)}))))}}}}),Se=o.defineComponent({name:"MenuItems",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0}},render:function(){var t,n,o=he("MenuItems"),a={open:o.menuState.value===le.Open},i={"aria-activedescendant":null===o.activeItemIndex.value||null==(t=o.items.value[o.activeItemIndex.value])?void 0:t.id,"aria-labelledby":null==(n=U(o.buttonRef))?void 0:n.id,id:this.id,onKeydown:this.handleKeyDown,onKeyup:this.handleKeyUp,role:"menu",tabIndex:0,ref:"el"};return s({props:r({},this.$props,i),slot:a,attrs:this.$attrs,slots:this.$slots,features:e.RenderStrategy|e.Static,visible:a.open,name:"MenuItems"})},setup:function(){var e=he("MenuItems"),t="headlessui-menu-items-"+p(),r=o.ref(null);return ve({container:o.computed((function(){return U(e.itemsRef)})),enabled:o.computed((function(){return e.menuState.value===le.Open})),accept:function(e){return"menuitem"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk:function(e){e.setAttribute("role","none")}}),{id:t,el:e.itemsRef,handleKeyDown:function(t){switch(r.value&&clearTimeout(r.value),t.key){case n.Space:if(""!==e.searchQuery.value)return t.preventDefault(),t.stopPropagation(),e.search(t.key);case n.Enter:var a;t.preventDefault(),t.stopPropagation(),null!==e.activeItemIndex.value&&(null==(a=document.getElementById(e.items.value[e.activeItemIndex.value].id))||a.click()),e.closeMenu(),o.nextTick((function(){var t;return null==(t=U(e.buttonRef))?void 0:t.focus({preventScroll:!0})}));break;case n.ArrowDown:return t.preventDefault(),t.stopPropagation(),e.goToItem(X.Next);case n.ArrowUp:return t.preventDefault(),t.stopPropagation(),e.goToItem(X.Previous);case n.Home:case n.PageUp:return t.preventDefault(),t.stopPropagation(),e.goToItem(X.First);case n.End:case n.PageDown:return t.preventDefault(),t.stopPropagation(),e.goToItem(X.Last);case n.Escape:t.preventDefault(),t.stopPropagation(),e.closeMenu(),o.nextTick((function(){var t;return null==(t=U(e.buttonRef))?void 0:t.focus({preventScroll:!0})}));break;case n.Tab:t.preventDefault(),t.stopPropagation();break;default:1===t.key.length&&(e.search(t.key),r.value=setTimeout((function(){return e.clearSearch()}),350))}},handleKeyUp:function(e){switch(e.key){case n.Space:e.preventDefault()}}}}}),we=o.defineComponent({name:"MenuItem",props:{as:{type:[Object,String],default:"template"},disabled:{type:Boolean,default:!1},class:{type:[String,Function],required:!1},className:{type:[String,Function],required:!1}},setup:function(e,t){var n=t.slots,a=t.attrs,i=he("MenuItem"),u="headlessui-menu-item-"+p(),l=e.disabled,c=e.className,d=void 0===c?e.class:c,f=o.computed((function(){return null!==i.activeItemIndex.value&&i.items.value[i.activeItemIndex.value].id===u})),v=o.ref({disabled:l,textValue:""});function m(e){if(l)return e.preventDefault();i.closeMenu(),o.nextTick((function(){var e;return null==(e=U(i.buttonRef))?void 0:e.focus({preventScroll:!0})}))}function h(){if(l)return i.goToItem(X.Nothing);i.goToItem(X.Specific,u)}function b(){l||f.value||i.goToItem(X.Specific,u)}function y(){l||f.value&&i.goToItem(X.Nothing)}return o.onMounted((function(){var e,t,n=null==(e=document.getElementById(u))||null==(t=e.textContent)?void 0:t.toLowerCase().trim();void 0!==n&&(v.value.textValue=n)})),o.onMounted((function(){return i.registerItem(u,v)})),o.onUnmounted((function(){return i.unregisterItem(u)})),o.watchEffect((function(){i.menuState.value===le.Open&&f.value&&o.nextTick((function(){var e;return null==(e=document.getElementById(u))||null==e.scrollIntoView?void 0:e.scrollIntoView({block:"nearest"})}))})),function(){var t={active:f.value,disabled:l},o={id:u,role:"menuitem",tabIndex:-1,class:ae(d,t),"aria-disabled":!0===l||void 0,onClick:m,onFocus:h,onPointermove:b,onMousemove:b,onPointerleave:y,onMouseleave:y};return s({props:r({},e,o),slot:t,attrs:a,slots:n,name:"MenuItem"})}}});!function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(be||(be={}));var xe=Symbol("PopoverContext");function Oe(e){var t=o.inject(xe,null);if(null===t){var n=new Error("<"+e+" /> is missing a parent <"+ke.name+" /> component.");throw Error.captureStackTrace&&Error.captureStackTrace(n,Oe),n}return t}var Ee=Symbol("PopoverGroupContext");function Ce(){return o.inject(Ee,null)}var De=Symbol("PopoverPanelContext"),ke=o.defineComponent({name:"Popover",props:{as:{type:[Object,String],default:"div"}},setup:function(e,t){var n=t.slots,a=t.attrs,i=r({},e),u="headlessui-popover-button-"+p(),c="headlessui-popover-panel-"+p(),d=o.ref(be.Closed),f=o.ref(null),v=o.ref(null),m={popoverState:d,buttonId:u,panelId:c,panel:v,button:f,togglePopover:function(){var e;d.value=l(d.value,((e={})[be.Open]=be.Closed,e[be.Closed]=be.Open,e))},closePopover:function(){d.value!==be.Closed&&(d.value=be.Closed)}};o.provide(xe,m);var y={buttonId:u,panelId:c,close:function(){m.closePopover()}},g=Ce(),S=null==g?void 0:g.registerPopover;return o.watchEffect((function(){return null==S?void 0:S(y)})),w("focus",(function(){var e,t,n;d.value===be.Open&&((null!=(e=null==g?void 0:g.isFocusWithinPopoverGroup())?e:(null==(t=U(f))?void 0:t.contains(document.activeElement))||(null==(n=U(v))?void 0:n.contains(document.activeElement)))||f&&v&&m.closePopover())}),!0),w("mousedown",(function(e){var t,n,o,r,a,i,u=e.target;d.value===be.Open&&((null==(t=U(f))?void 0:t.contains(u))||(null==(n=U(v))?void 0:n.contains(u))||(m.closePopover(),void 0===(a=h.Loose)&&(a=h.Strict),(r=u)!==document.body&&l(a,((i={})[h.Strict]=function(){return r.matches(b)},i[h.Loose]=function(){for(var e=r;null!==e;){if(e.matches(b))return!0;e=e.parentElement}return!1},i))||(e.preventDefault(),null==(o=U(f))||o.focus())))})),function(){return s({props:i,slot:{open:d.value===be.Open},slots:n,attrs:a,name:"Popover"})}}}),Pe=o.defineComponent({name:"PopoverButton",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1}},render:function(){var e=Oe("PopoverButton"),t={open:e.popoverState.value===be.Open},n=this.isWithinPanel?{type:"button",onKeydown:this.handleKeyDown,onClick:this.handleClick}:{ref:"el",id:e.buttonId,type:"button","aria-expanded":e.popoverState.value===be.Open||void 0,"aria-controls":U(e.panel)?e.panelId:void 0,onKeydown:this.handleKeyDown,onKeyup:this.handleKeyUp,onClick:this.handleClick};return s({props:r({},this.$props,n),slot:t,attrs:this.$attrs,slots:this.$slots,name:"PopoverButton"})},setup:function(e){var t=Oe("PopoverButton"),r=Ce(),a=null==r?void 0:r.closeOthers,i=o.inject(De,null),u=null!==i&&i===t.panelId,l=o.ref(null),s=o.ref("undefined"==typeof window?null:document.activeElement);return w("focus",(function(){s.value=l.value,l.value=document.activeElement}),!0),{isWithinPanel:u,el:u?null:t.button,handleKeyDown:function(e){var o,r;if(u){if(t.popoverState.value===be.Closed)return;switch(e.key){case n.Space:case n.Enter:e.preventDefault(),e.stopPropagation(),t.closePopover(),null==(o=U(t.button))||o.focus()}}else switch(e.key){case n.Space:case n.Enter:e.preventDefault(),e.stopPropagation(),t.popoverState.value===be.Closed&&(null==a||a(t.buttonId)),t.togglePopover();break;case n.Escape:if(t.popoverState.value!==be.Open)return null==a?void 0:a(t.buttonId);if(!U(t.button))return;if(!(null==(r=U(t.button))?void 0:r.contains(document.activeElement)))return;t.closePopover();break;case n.Tab:if(t.popoverState.value!==be.Open)return;if(!t.panel)return;if(!t.button)return;if(e.shiftKey){var i,l;if(!s.value)return;if(null==(i=U(t.button))?void 0:i.contains(s.value))return;if(null==(l=U(t.panel))?void 0:l.contains(s.value))return;var c=y(),d=c.indexOf(s.value);if(c.indexOf(U(t.button))>d)return;e.preventDefault(),e.stopPropagation(),S(U(t.panel),f.Last)}else e.preventDefault(),e.stopPropagation(),S(U(t.panel),f.First)}},handleKeyUp:function(e){var o,r;if(!u&&(e.key===n.Space&&e.preventDefault(),t.popoverState.value===be.Open&&t.panel&&t.button))switch(e.key){case n.Tab:if(!s.value)return;if(null==(o=U(t.button))?void 0:o.contains(s.value))return;if(null==(r=U(t.panel))?void 0:r.contains(s.value))return;var a=y(),i=a.indexOf(s.value);if(a.indexOf(U(t.button))>i)return;e.preventDefault(),e.stopPropagation(),S(U(t.panel),f.Last)}},handleClick:function(){var n,o;e.disabled||(u?(t.closePopover(),null==(n=U(t.button))||n.focus()):(t.popoverState.value===be.Closed&&(null==a||a(t.buttonId)),null==(o=U(t.button))||o.focus(),t.togglePopover()))},handleFocus:function(){}}}}),Te=o.defineComponent({name:"PopoverOverlay",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0}},render:function(){var t={open:Oe("PopoverOverlay").popoverState.value===be.Open};return s({props:r({},this.$props,{id:this.id,ref:"el","aria-hidden":!0,onClick:this.handleClick}),slot:t,attrs:this.$attrs,slots:this.$slots,features:e.RenderStrategy|e.Static,visible:t.open,name:"PopoverOverlay"})},setup:function(){var e=Oe("PopoverOverlay");return{id:"headlessui-popover-overlay-"+p(),handleClick:function(){e.closePopover()}}}}),Re=o.defineComponent({name:"PopoverPanel",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},focus:{type:Boolean,default:!1}},render:function(){var t={open:Oe("PopoverPanel").popoverState.value===be.Open};return s({props:r({},this.$props,{ref:"el",id:this.id,onKeydown:this.handleKeyDown}),slot:t,attrs:this.$attrs,slots:this.$slots,features:e.RenderStrategy|e.Static,visible:t.open,name:"PopoverPanel"})},setup:function(e){var t=e.focus,r=Oe("PopoverPanel");return o.provide(De,r.panelId),o.onUnmounted((function(){r.panel.value=null})),o.watchEffect((function(){var e;if(t&&r.popoverState.value===be.Open&&r.panel){var n=document.activeElement;(null==(e=U(r.panel))?void 0:e.contains(n))||S(U(r.panel),f.First)}})),w("keydown",(function(e){var t;if(r.popoverState.value===be.Open&&U(r.panel)&&e.key===n.Tab&&document.activeElement&&(null==(t=U(r.panel))?void 0:t.contains(document.activeElement))){e.preventDefault();var o,a=S(U(r.panel),e.shiftKey?f.Previous:f.Next);if(a===v.Underflow)return null==(o=U(r.button))?void 0:o.focus();if(a===v.Overflow){if(!U(r.button))return;var i=y(),u=i.indexOf(U(r.button));S(i.splice(u+1).filter((function(e){var t;return!(null==(t=U(r.panel))?void 0:t.contains(e))})),f.First)===v.Error&&S(document.body,f.First)}}})),w("focus",(function(){var e;t&&r.popoverState.value===be.Open&&U(r.panel)&&((null==(e=U(r.panel))?void 0:e.contains(document.activeElement))||r.closePopover())}),!0),{id:r.panelId,el:r.panel,handleKeyDown:function(e){var t,o;switch(e.key){case n.Escape:if(r.popoverState.value!==be.Open)return;if(!U(r.panel))return;if(!(null==(t=U(r.panel))?void 0:t.contains(document.activeElement)))return;e.preventDefault(),r.closePopover(),null==(o=U(r.button))||o.focus()}}}}}),Ie=o.defineComponent({name:"PopoverGroup",props:{as:{type:[Object,String],default:"div"}},render:function(){return s({props:r({},this.$props,{ref:"el"}),slot:{},attrs:this.$attrs,slots:this.$slots,name:"PopoverGroup"})},setup:function(){var e=o.ref(null),t=o.ref([]);function n(e){var n=t.value.indexOf(e);-1!==n&&t.value.splice(n,1)}return o.provide(Ee,{registerPopover:function(e){return t.value.push(e),function(){n(e)}},unregisterPopover:n,isFocusWithinPopoverGroup:function(){var n,o=document.activeElement;return!!(null==(n=U(e))?void 0:n.contains(o))||t.value.some((function(e){var t,n;return(null==(t=document.getElementById(e.buttonId))?void 0:t.contains(o))||(null==(n=document.getElementById(e.panelId))?void 0:n.contains(o))}))},closeOthers:function(e){for(var n,o=u(t.value);!(n=o()).done;){var r=n.value;r.buttonId!==e&&r.close()}}}),{el:e}}}),Fe=Symbol("LabelContext");function Le(){var e=o.inject(Fe,null);if(null===e){var t=new Error("You used a <Label /> component, but it is not inside a parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,Le),t}return e}function Ae(e){var t=void 0===e?{}:e,n=t.slot,r=void 0===n?{}:n,a=t.name,i=void 0===a?"Label":a,u=t.props,l=void 0===u?{}:u,s=o.ref([]);return o.provide(Fe,{register:function(e){return s.value.push(e),function(){var t=s.value.indexOf(e);-1!==t&&s.value.splice(t,1)}},slot:r,name:i,props:l}),o.computed((function(){return s.value.length>0?s.value.join(" "):void 0}))}var je=o.defineComponent({name:"Label",props:{as:{type:[Object,String],default:"label"},passive:{type:[Boolean],default:!1}},render:function(){var e=this.context,t=e.name,n=void 0===t?"Label":t,i=e.slot,u=void 0===i?{}:i,l=e.props,c=void 0===l?{}:l,d=this.$props,p=d.passive,f=a(d,["passive"]),v=r({},Object.entries(c).reduce((function(e,t){var n;return Object.assign(e,((n={})[t[0]]=o.unref(t[1]),n))}),{}),{id:this.id}),m=r({},f,v);return p&&delete m.onClick,s({props:m,slot:u,attrs:this.$attrs,slots:this.$slots,name:n})},setup:function(){var e=Le(),t="headlessui-label-"+p();return o.onMounted((function(){return o.onUnmounted(e.register(t))})),{id:t,context:e}}}),$e=Symbol("RadioGroupContext");function Be(e){var t=o.inject($e,null);if(null===t){var n=new Error("<"+e+" /> is missing a parent <RadioGroup /> component.");throw Error.captureStackTrace&&Error.captureStackTrace(n,Be),n}return t}var Me,Ke=o.defineComponent({name:"RadioGroup",emits:["update:modelValue"],props:{as:{type:[Object,String],default:"div"},disabled:{type:[Boolean],default:!1},modelValue:{type:[Object,String,Number,Boolean]}},render:function(){return s({props:r({},a(this.$props,["modelValue","disabled"]),{ref:"el",id:this.id,role:"radiogroup","aria-labelledby":this.labelledby,"aria-describedby":this.describedby,onKeydown:this.handleKeyDown}),slot:{},attrs:this.$attrs,slots:this.$slots,name:"RadioGroup"})},setup:function(e,t){var r=t.emit,a=o.ref(null),i=o.ref([]),u=Ae({name:"RadioGroupLabel"}),l=M({name:"RadioGroupDescription"}),s=o.computed((function(){return e.modelValue})),c={options:i,value:s,disabled:o.computed((function(){return e.disabled})),firstOption:o.computed((function(){return i.value.find((function(e){return!e.propsRef.disabled}))})),containsCheckedOption:o.computed((function(){return i.value.some((function(t){return o.toRaw(t.propsRef.value)===o.toRaw(e.modelValue)}))})),change:function(t){var n;if(e.disabled)return!1;if(s.value===t)return!1;var a=null==(n=i.value.find((function(e){return o.toRaw(e.propsRef.value)===o.toRaw(t)})))?void 0:n.propsRef;return!(null==a?void 0:a.disabled)&&(r("update:modelValue",t),!0)},registerOption:function(e){var t,n=Array.from(null==(t=a.value)?void 0:t.querySelectorAll('[id^="headlessui-radiogroup-option-"]')).reduce((function(e,t,n){var o;return Object.assign(e,((o={})[t.id]=n,o))}),{});i.value.push(e),i.value.sort((function(e,t){return n[e.id]-n[t.id]}))},unregisterOption:function(e){var t=i.value.findIndex((function(t){return t.id===e}));-1!==t&&i.value.splice(t,1)}};return o.provide($e,c),ve({container:o.computed((function(){return U(a)})),accept:function(e){return"radio"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk:function(e){e.setAttribute("role","none")}}),{id:"headlessui-radiogroup-"+p(),labelledby:u,describedby:l,el:a,handleKeyDown:function(e){if(a.value&&a.value.contains(e.target)){var t=i.value.filter((function(e){return!1===e.propsRef.disabled})).map((function(e){return e.element}));switch(e.key){case n.ArrowLeft:case n.ArrowUp:if(e.preventDefault(),e.stopPropagation(),S(t,f.Previous|f.WrapAround)===v.Success){var o=i.value.find((function(e){return e.element===document.activeElement}));o&&c.change(o.propsRef.value)}break;case n.ArrowRight:case n.ArrowDown:if(e.preventDefault(),e.stopPropagation(),S(t,f.Next|f.WrapAround)===v.Success){var r=i.value.find((function(e){return e.element===document.activeElement}));r&&c.change(r.propsRef.value)}break;case n.Space:e.preventDefault(),e.stopPropagation();var u=i.value.find((function(e){return e.element===document.activeElement}));u&&c.change(u.propsRef.value)}}}}}});!function(e){e[e.Empty=1]="Empty",e[e.Active=2]="Active"}(Me||(Me={}));var Ne,Ue=o.defineComponent({name:"RadioGroupOption",props:{as:{type:[Object,String],default:"div"},value:{type:[Object,String,Number,Boolean]},disabled:{type:Boolean,default:!1},class:{type:[String,Function],required:!1},className:{type:[String,Function],required:!1}},render:function(){var e=this.$props,t=e.className,n=void 0===t?e.class:t,o=a(e,["value","disabled","class","className"]),i={checked:this.checked,disabled:this.disabled,active:Boolean(this.state&Me.Active)};return s({props:r({},o,{id:this.id,ref:"el",role:"radio",class:ae(n,i),"aria-checked":this.checked?"true":"false","aria-labelledby":this.labelledby,"aria-describedby":this.describedby,tabIndex:this.tabIndex,onClick:this.disabled?void 0:this.handleClick,onFocus:this.disabled?void 0:this.handleFocus,onBlur:this.disabled?void 0:this.handleBlur}),slot:i,attrs:this.$attrs,slots:this.$slots,name:"RadioGroupOption"})},setup:function(e){var t=Be("RadioGroupOption"),n="headlessui-radiogroup-option-"+p(),r=Ae({name:"RadioGroupLabel"}),a=M({name:"RadioGroupDescription"}),i=o.ref(null),u=o.computed((function(){return{value:e.value,disabled:e.disabled}})),l=o.ref(Me.Empty);o.onMounted((function(){return t.registerOption({id:n,element:i,propsRef:u})})),o.onUnmounted((function(){return t.unregisterOption(n)}));var s=o.computed((function(){var e;return(null==(e=t.firstOption.value)?void 0:e.id)===n})),c=o.computed((function(){return t.disabled.value||e.disabled})),d=o.computed((function(){return o.toRaw(t.value.value)===o.toRaw(e.value)}));return{id:n,el:i,labelledby:r,describedby:a,state:l,disabled:c,checked:d,tabIndex:o.computed((function(){return c.value?-1:d.value||!t.containsCheckedOption.value&&s.value?0:-1})),handleClick:function(){var n;t.change(e.value)&&(l.value|=Me.Active,null==(n=i.value)||n.focus())},handleFocus:function(){l.value|=Me.Active},handleBlur:function(){l.value&=~Me.Active}}}}),Ve=je,Ge=N,He=Symbol("GroupContext"),qe=o.defineComponent({name:"SwitchGroup",props:{as:{type:[Object,String],default:"template"}},setup:function(e,t){var n=t.slots,r=t.attrs,a=o.ref(null),i=Ae({name:"SwitchLabel",props:{onClick:function(){a.value&&(a.value.click(),a.value.focus({preventScroll:!0}))}}}),u=M({name:"SwitchDescription"});return o.provide(He,{switchRef:a,labelledby:i,describedby:u}),function(){return s({props:e,slot:{},slots:n,attrs:r,name:"SwitchGroup"})}}}),We=o.defineComponent({name:"Switch",emits:["update:modelValue"],props:{as:{type:[Object,String],default:"button"},modelValue:{type:[Object,Boolean],default:null},class:{type:[String,Function],required:!1},className:{type:[String,Function],required:!1}},render:function(){var e=o.inject(He,null),t=this.$props,n=t.className,a={checked:this.$props.modelValue},i={id:this.id,ref:null===e?void 0:e.switchRef,role:"switch",tabIndex:0,class:ae(void 0===n?t.class:n,a),"aria-checked":this.$props.modelValue,"aria-labelledby":this.labelledby,"aria-describedby":this.describedby,onClick:this.handleClick,onKeyup:this.handleKeyUp,onKeypress:this.handleKeyPress};return"button"===this.$props.as&&Object.assign(i,{type:"button"}),s({props:r({},this.$props,i),slot:a,attrs:this.$attrs,slots:this.$slots,name:"Switch"})},setup:function(e,t){var r=t.emit,a=o.inject(He,null);function i(){r("update:modelValue",!e.modelValue)}return{id:"headlessui-switch-"+p(),el:null==a?void 0:a.switchRef,labelledby:null==a?void 0:a.labelledby,describedby:null==a?void 0:a.describedby,handleClick:function(e){e.preventDefault(),i()},handleKeyUp:function(e){e.key!==n.Tab&&e.preventDefault(),e.key===n.Space&&i()},handleKeyPress:function(e){e.preventDefault()}}}}),_e=je,ze=N;function Qe(){var e=[],t={requestAnimationFrame:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){var e=requestAnimationFrame.apply(void 0,arguments);t.add((function(){return cancelAnimationFrame(e)}))})),nextFrame:function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];t.requestAnimationFrame((function(){t.requestAnimationFrame.apply(t,n)}))},setTimeout:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){var e=setTimeout.apply(void 0,arguments);t.add((function(){return clearTimeout(e)}))})),add:function(t){e.push(t)},dispose:function(){for(var t,n=u(e.splice(0));!(t=n()).done;)(0,t.value)()}};return t}function Ye(e){for(var t,n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];e&&o.length>0&&(t=e.classList).add.apply(t,o)}function Je(e){for(var t,n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];e&&o.length>0&&(t=e.classList).remove.apply(t,o)}function Xe(e,t,n,o,r){var a,i,u=Qe(),l=void 0!==r?(a=r,i={called:!1},function(){if(!i.called)return i.called=!0,a.apply(void 0,arguments)}):function(){};return Ye.apply(void 0,[e].concat(t,n)),u.nextFrame((function(){Je.apply(void 0,[e].concat(n)),Ye.apply(void 0,[e].concat(o)),u.add(function(e,t){var n=Qe();if(!e)return n.dispose;var o=getComputedStyle(e),r=[o.transitionDuration,o.transitionDelay].map((function(e){var t=e.split(",").filter(Boolean).map((function(e){return e.includes("ms")?parseFloat(e):1e3*parseFloat(e)})).sort((function(e,t){return t-e}))[0];return void 0===t?0:t})),a=r[0];return 0!==a?n.setTimeout((function(){return t(Ne.Finished)}),a+r[1]):t(Ne.Finished),n.add((function(){return t(Ne.Cancelled)})),n.dispose}(e,(function(n){return Je.apply(void 0,[e].concat(o,t)),l(n)})))})),u.add((function(){return Je.apply(void 0,[e].concat(t,n,o))})),u.add((function(){return l(Ne.Cancelled)})),u.dispose}function Ze(e){return void 0===e&&(e=""),e.split(" ").filter((function(e){return e.trim().length>1}))}!function(e){e.Finished="finished",e.Cancelled="cancelled"}(Ne||(Ne={}));var et,tt=Symbol("TransitionContext");!function(e){e.Visible="visible",e.Hidden="hidden"}(et||(et={}));var nt=Symbol("NestingContext");function ot(e){return"children"in e?ot(e.children):e.value.filter((function(e){return e.state===et.Visible})).length>0}function rt(e){var n=o.ref([]),r=o.ref(!1);function a(o,a){var i;void 0===a&&(a=t.Hidden);var u=n.value.findIndex((function(e){return e.id===o}));-1!==u&&(l(a,((i={})[t.Unmount]=function(){n.value.splice(u,1)},i[t.Hidden]=function(){n.value[u].state=et.Hidden},i)),!ot(n)&&r.value&&(null==e||e()))}return o.onMounted((function(){return r.value=!0})),o.onUnmounted((function(){return r.value=!1})),{children:n,register:function(e){var o=n.value.find((function(t){return t.id===e}));return o?o.state!==et.Visible&&(o.state=et.Visible):n.value.push({id:e,state:et.Visible}),function(){return a(e,t.Unmount)}},unregister:a}}var at=e.RenderStrategy,it=o.defineComponent({props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:["beforeEnter","afterEnter","beforeLeave","afterLeave"],render:function(){return s({props:r({},a(this.$props,["appear","show","enter","enterFrom","enterTo","leave","leaveFrom","leaveTo"]),{ref:"el"}),slot:{},slots:this.$slots,attrs:this.$attrs,features:at,visible:this.state===et.Visible,name:"TransitionChild"})},setup:function(e,n){var r=n.emit,a=o.ref(null),i=o.ref(et.Visible),u=o.computed((function(){return e.unmount?t.Unmount:t.Hidden})),s=function(){var e=o.inject(tt,null);if(null===e)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return e}(),c=s.show,d=s.appear,f=function(){var e=o.inject(nt,null);if(null===e)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return e}(),v=f.register,m=f.unregister,h={value:!0},b=p(),y={value:!1},g=rt((function(){y.value||(i.value=et.Hidden,m(b),r("afterLeave"))}));o.onMounted((function(){var e=v(b);o.onUnmounted(e)})),o.watchEffect((function(){var e;u.value===t.Hidden&&b&&(c&&i.value!==et.Visible?i.value=et.Visible:l(i.value,((e={})[et.Hidden]=function(){return m(b)},e[et.Visible]=function(){return v(b)},e)))}));var S=Ze(e.enter),w=Ze(e.enterFrom),x=Ze(e.enterTo),O=Ze(e.leave),E=Ze(e.leaveFrom),C=Ze(e.leaveTo);return o.onMounted((function(){o.watchEffect((function(){if(i.value===et.Visible){var e=U(a);if(e instanceof Comment&&""===e.data)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}}))})),o.onMounted((function(){o.watch([c,d],(function(e,t,n){!function(e){var t=h.value&&!d.value,n=U(a);n&&n instanceof HTMLElement&&(t||(y.value=!0,c.value&&r("beforeEnter"),c.value||r("beforeLeave"),e(c.value?Xe(n,S,w,x,(function(e){y.value=!1,e===Ne.Finished&&r("afterEnter")})):Xe(n,O,E,C,(function(e){y.value=!1,e===Ne.Finished&&(ot(g)||(i.value=et.Hidden,m(b),r("afterLeave")))})))))}(n),h.value=!1}),{immediate:!0})})),o.provide(nt,g),{el:a,state:i}}}),ut=o.defineComponent({inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:["beforeEnter","afterEnter","beforeLeave","afterLeave"],render:function(){var e=this,t=this.$props,n=t.unmount,i=a(t,["show","appear","unmount"]),u={unmount:n};return s({props:r({},u,{as:"template"}),slot:{},slots:r({},this.$slots,{default:function(){return[o.h(it,r({},e.$attrs,u,i),e.$slots.default)]}}),attrs:{},features:at,visible:this.state===et.Visible,name:"Transition"})},setup:function(e){o.watchEffect((function(){if(![!0,!1].includes(e.show))throw new Error('A <Transition /> is used but it is missing a `:show="true | false"` prop.')}));var t=o.ref(e.show?et.Visible:et.Hidden),n=rt((function(){t.value=et.Hidden})),r={value:!0},a={show:o.computed((function(){return e.show})),appear:o.computed((function(){return e.appear||!r.value}))};return o.onMounted((function(){o.watchEffect((function(){r.value=!1,e.show?t.value=et.Visible:ot(n)||(t.value=et.Hidden)}))})),o.provide(nt,n),o.provide(tt,a),{state:t}}});exports.Dialog=W,exports.DialogDescription=Q,exports.DialogOverlay=_,exports.DialogTitle=z,exports.Disclosure=ee,exports.DisclosureButton=te,exports.DisclosurePanel=ne,exports.FocusTrap=oe,exports.Listbox=se,exports.ListboxButton=de,exports.ListboxLabel=ce,exports.ListboxOption=fe,exports.ListboxOptions=pe,exports.Menu=ye,exports.MenuButton=ge,exports.MenuItem=we,exports.MenuItems=Se,exports.Popover=ke,exports.PopoverButton=Pe,exports.PopoverGroup=Ie,exports.PopoverOverlay=Te,exports.PopoverPanel=Re,exports.Portal=A,exports.PortalGroup=$,exports.RadioGroup=Ke,exports.RadioGroupDescription=Ge,exports.RadioGroupLabel=Ve,exports.RadioGroupOption=Ue,exports.Switch=We,exports.SwitchDescription=ze,exports.SwitchGroup=qe,exports.SwitchLabel=_e,exports.TransitionChild=it,exports.TransitionRoot=ut; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t,n,o=require("vue");function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function i(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)t.indexOf(n=i[o])>=0||(r[n]=e[n]);return r}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function u(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return a(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function l(e,t){if(e in t){for(var n=t[e],o=arguments.length,r=new Array(o>2?o-2:0),i=2;i<o;i++)r[i-2]=arguments[i];return"function"==typeof n?n.apply(void 0,r):n}var a=new Error('Tried to handle "'+e+'" but there is no handler defined. Only defined handlers are: '+Object.keys(t).map((function(e){return'"'+e+'"'})).join(", ")+".");throw Error.captureStackTrace&&Error.captureStackTrace(a,l),a}function s(n){var o,a,u=n.visible,s=void 0===u||u,d=n.features,p=void 0===d?e.None:d,v=i(n,["visible","features"]);return s||p&e.Static&&v.props.static?c(v):p&e.RenderStrategy?l(null==(o=v.props.unmount)||o?t.Unmount:t.Hidden,((a={})[t.Unmount]=function(){return null},a[t.Hidden]=function(){return c(r({},v,{props:r({},v.props,{hidden:!0,style:{display:"none"}})}))},a)):c(v)}function c(e){var t,n=e.attrs,r=e.slots,a=e.slot,l=e.name,s=function(e,t){void 0===t&&(t=[]);for(var n,o=Object.assign({},e),r=u(t);!(n=r()).done;){var i=n.value;i in o&&delete o[i]}return o}(e.props,["unmount","static"]),c=s.as,d=i(s,["as"]),p=null==r.default?void 0:r.default(a);if("template"===c){if(Object.keys(d).length>0||Object.keys(n).length>0){var v=null!=p?p:[],f=v[0],m=v.slice(1);if(null==(t=f)||"string"!=typeof t.type&&"object"!=typeof t.type&&"function"!=typeof t.type||m.length>0)throw new Error(['Passing props on "template"!',"","The current component <"+l+' /> is rendering a "template".',"However we need to passthrough the following props:",Object.keys(d).concat(Object.keys(n)).map((function(e){return" - "+e})).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".',"Render a single element as the child so that we can forward the props onto that element."].map((function(e){return" - "+e})).join("\n")].join("\n"));return o.cloneVNode(f,d)}return Array.isArray(p)&&1===p.length?p[0]:p}return o.h(c,d,p)}!function(e){e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static"}(e||(e={})),function(e){e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden"}(t||(t={})),function(e){e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab"}(n||(n={}));var d=0;function p(){return++d}var v,f,m,h,b=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map((function(e){return e+":not([tabindex='-1'])"})).join(",");function y(e){return void 0===e&&(e=document.body),null==e?[]:Array.from(e.querySelectorAll(b))}function g(e){null==e||e.focus({preventScroll:!0})}function S(e,t){var n=Array.isArray(e)?e:y(e),o=document.activeElement,r=function(){if(t&(v.First|v.Next))return m.Next;if(t&(v.Previous|v.Last))return m.Previous;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")}(),i=function(){if(t&v.First)return 0;if(t&v.Previous)return Math.max(0,n.indexOf(o))-1;if(t&v.Next)return Math.max(0,n.indexOf(o))+1;if(t&v.Last)return n.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")}(),a=t&v.NoScroll?{preventScroll:!0}:{},u=0,l=n.length,s=void 0;do{var c;if(u>=l||u+l<=0)return f.Error;var d=i+u;if(t&v.WrapAround)d=(d+l)%l;else{if(d<0)return f.Underflow;if(d>=l)return f.Overflow}null==(c=s=n[d])||c.focus(a),u+=r}while(s!==document.activeElement);return s.hasAttribute("tabindex")||s.setAttribute("tabindex","0"),f.Success}function O(e,t,n){window.addEventListener(e,t,n),o.onUnmounted((function(){return window.removeEventListener(e,t,n)}))}function w(e,t){for(var n,o=u(e);!(n=o()).done;)if(n.value.contains(t))return!0;return!1}function x(e,t,r){void 0===t&&(t=o.ref(!0)),void 0===r&&(r=o.ref({}));var i=o.ref("undefined"!=typeof window?document.activeElement:null),a=o.ref(null);function l(){if(t.value&&1===e.value.size){var n=r.value.initialFocus,o=document.activeElement;if(n){if(n===o)return}else if(w(e.value,o))return;if(i.value=o,n)g(n);else{for(var l,s=!1,c=u(e.value);!(l=c()).done;)if(S(l.value,v.First)===f.Success){s=!0;break}if(!s)throw new Error("There are no focusable elements inside the <FocusTrap />")}a.value=document.activeElement}}function s(){g(i.value),i.value=null,a.value=null}o.watchEffect(l),o.onUpdated((function(){t.value?l():s()})),o.onUnmounted(s),O("keydown",(function(o){if(t.value&&o.key===n.Tab&&document.activeElement&&1===e.value.size){o.preventDefault();for(var r,i=u(e.value);!(r=i()).done;)if(S(r.value,(o.shiftKey?v.Previous:v.Next)|v.WrapAround)===f.Success){a.value=document.activeElement;break}}})),O("focus",(function(n){if(t.value&&1===e.value.size){var o=a.value;if(o){var r=n.target;r&&r instanceof HTMLElement?w(e.value,r)?(a.value=r,g(r)):(n.preventDefault(),n.stopPropagation(),g(o)):g(a.value)}}}),!0)}!function(e){e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll"}(v||(v={})),function(e){e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow"}(f||(f={})),function(e){e[e.Previous=-1]="Previous",e[e.Next=1]="Next"}(m||(m={})),function(e){e[e.Strict=0]="Strict",e[e.Loose=1]="Loose"}(h||(h={}));var C=new Set,E=new Map;function D(e){e.setAttribute("aria-hidden","true"),e.inert=!0}function k(e){var t=E.get(e);t&&(null===t["aria-hidden"]?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",t["aria-hidden"]),e.inert=t.inert)}var P,T=Symbol("StackContext");function R(){return o.inject(T,(function(){}))}function I(e){var t=R();o.provide(T,(function(){for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];null==e||e.apply(void 0,o),t.apply(void 0,o)}))}!function(e){e[e.AddElement=0]="AddElement",e[e.RemoveElement=1]="RemoveElement"}(P||(P={}));var F=Symbol("ForcePortalRootContext"),L=o.defineComponent({name:"ForcePortalRoot",props:{as:{type:[Object,String],default:"template"},force:{type:Boolean,default:!1}},setup:function(e,t){var n=t.slots,r=t.attrs;return o.provide(F,e.force),function(){return s({props:i(e,["force"]),slot:{},slots:n,attrs:r,name:"ForcePortalRoot"})}}}),A=o.defineComponent({name:"Portal",props:{as:{type:[Object,String],default:"div"}},setup:function(e,t){var n=t.slots,i=t.attrs,a=o.inject(F,!1),u=o.inject(j,null),l=o.ref(!0===a||null===u?function(){var e=document.getElementById("headlessui-portal-root");if(e)return e;var t=document.createElement("div");return t.setAttribute("id","headlessui-portal-root"),document.body.appendChild(t)}():u.resolveTarget());o.watchEffect((function(){a||null!==u&&(l.value=u.resolveTarget())}));var c=o.ref(null);return function(e){var t=R();o.watchEffect((function(n){var o=null==e?void 0:e.value;o&&(t(P.AddElement,o),n((function(){return t(P.RemoveElement,o)})))}))}(c),o.onUnmounted((function(){var e,t=document.getElementById("headlessui-portal-root");t&&l.value===t&&l.value.children.length<=0&&(null==(e=l.value.parentElement)||e.removeChild(l.value))})),I(),function(){return null===l.value?null:o.h(o.Teleport,{to:l.value},s({props:r({},e,{ref:c}),slot:{},attrs:i,slots:n,name:"Portal"}))}}}),j=Symbol("PortalGroupContext"),$=o.defineComponent({name:"PortalGroup",props:{as:{type:[Object,String],default:"template"},target:{type:Object,default:null}},setup:function(e,t){var n=t.attrs,r=t.slots,a=o.reactive({resolveTarget:function(){return e.target}});return o.provide(j,a),function(){return s({props:i(e,["target"]),slot:{},attrs:n,slots:r,name:"PortalGroup"})}}}),B=Symbol("DescriptionContext");function M(e){var t=void 0===e?{}:e,n=t.slot,r=void 0===n?o.ref({}):n,i=t.name,a=void 0===i?"Description":i,u=t.props,l=void 0===u?{}:u,s=o.ref([]);return o.provide(B,{register:function(e){return s.value.push(e),function(){var t=s.value.indexOf(e);-1!==t&&s.value.splice(t,1)}},slot:r,name:a,props:l}),o.computed((function(){return s.value.length>0?s.value.join(" "):void 0}))}var K=o.defineComponent({name:"Description",props:{as:{type:[Object,String],default:"p"}},render:function(){var e=this.context,t=e.name,n=void 0===t?"Description":t,i=e.slot,a=void 0===i?o.ref({}):i,u=e.props,l=this.$props,c=r({},Object.entries(void 0===u?{}:u).reduce((function(e,t){var n;return Object.assign(e,((n={})[t[0]]=o.unref(t[1]),n))}),{}),{id:this.id});return s({props:r({},l,c),slot:a.value,attrs:this.$attrs,slots:this.$slots,name:n})},setup:function(){var e=function(){var e=o.inject(B,null);if(null===e)throw new Error("Missing parent");return e}(),t="headlessui-description-"+p();return o.onMounted((function(){return o.onUnmounted(e.register(t))})),{id:t,context:e}}});function N(e){var t;return null==e||null==e.value?null:null!=(t=e.value.$el)?t:e.value}var U,V,G=Symbol("Context");function H(){return o.inject(G,null)}function q(e){o.provide(G,e)}!function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(U||(U={})),function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(V||(V={}));var W=Symbol("DialogContext");function _(e){var t=o.inject(W,null);if(null===t){var n=new Error("<"+e+" /> is missing a parent <Dialog /> component.");throw Error.captureStackTrace&&Error.captureStackTrace(n,_),n}return t}var z,Q="DC8F892D-2EBD-447C-A4C8-A03058436FF4",Y=o.defineComponent({name:"Dialog",inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},open:{type:Boolean,default:Q},initialFocus:{type:Object,default:null}},emits:["close"],render:function(){var t=this,n=r({},this.$attrs,{ref:"el",id:this.id,role:"dialog","aria-modal":this.dialogState===V.Open||void 0,"aria-labelledby":this.titleId,"aria-describedby":this.describedby,onClick:this.handleClick,onKeydown:this.handleKeyDown}),a=i(this.$props,["open","initialFocus"]),u={open:this.dialogState===V.Open};return o.h(L,{force:!0},(function(){return o.h(A,(function(){return o.h($,{target:t.dialogRef},(function(){return o.h(L,{force:!1},(function(){return s({props:r({},a,n),slot:u,attrs:t.$attrs,slots:t.$slots,visible:t.visible,features:e.RenderStrategy|e.Static,name:"Dialog"})}))}))}))}))},setup:function(e,t){var r=t.emit,i=o.ref(new Set),a=H(),s=o.computed((function(){var t;return e.open===Q&&null!==a?l(a.value,((t={})[U.Open]=!0,t[U.Closed]=!1,t)):e.open}));if(e.open===Q&&null===a)throw new Error("You forgot to provide an `open` prop to the `Dialog`.");if("boolean"!=typeof s.value)throw new Error("You provided an `open` prop to the `Dialog`, but the value is not a boolean. Received: "+(s.value===Q?void 0:e.open));var c=o.computed((function(){return e.open?V.Open:V.Closed})),d=o.computed((function(){return null!==a?a.value===U.Open:c.value===V.Open})),v=o.ref(null),f=o.ref(c.value===V.Open);o.onUpdated((function(){f.value=c.value===V.Open}));var m="headlessui-dialog-"+p(),h=o.computed((function(){return{initialFocus:e.initialFocus}}));x(i,f,h),function(e,t){void 0===t&&(t=o.ref(!0)),o.watchEffect((function(n){if(t.value&&e.value){var o=e.value;C.add(o);for(var r,i=u(E.keys());!(r=i()).done;){var a=r.value;a.contains(o)&&(k(a),E.delete(a))}document.querySelectorAll("body > *").forEach((function(e){if(e instanceof HTMLElement){for(var t,n=u(C);!(t=n()).done;)if(e.contains(t.value))return;1===C.size&&(E.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),D(e))}})),n((function(){if(C.delete(o),C.size>0)document.querySelectorAll("body > *").forEach((function(e){if(e instanceof HTMLElement&&!E.has(e)){for(var t,n=u(C);!(t=n()).done;)if(e.contains(t.value))return;E.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),D(e)}}));else for(var e,t=u(E.keys());!(e=t()).done;){var n=e.value;k(n),E.delete(n)}}))}}))}(v,f),I((function(e,t){var n;return l(e,((n={})[P.AddElement]=function(){i.value.add(t)},n[P.RemoveElement]=function(){i.value.delete(t)},n))}));var b=M({name:"DialogDescription",slot:o.computed((function(){return{open:s.value}}))}),y=o.ref(null),g={titleId:y,dialogState:c,setTitleId:function(e){y.value!==e&&(y.value=e)},close:function(){r("close",!1)}};return o.provide(W,g),O("mousedown",(function(e){var t=e.target;c.value===V.Open&&1===i.value.size&&(w(i.value,t)||(g.close(),o.nextTick((function(){return null==t?void 0:t.focus()}))))})),o.watchEffect((function(e){if(c.value===V.Open){var t=document.documentElement.style.overflow,n=document.documentElement.style.paddingRight,o=window.innerWidth-document.documentElement.clientWidth;document.documentElement.style.overflow="hidden",document.documentElement.style.paddingRight=o+"px",e((function(){document.documentElement.style.overflow=t,document.documentElement.style.paddingRight=n}))}})),o.watchEffect((function(e){if(c.value===V.Open){var t=N(v);if(t){var n=new IntersectionObserver((function(e){for(var t,n=u(e);!(t=n()).done;){var o=t.value;0===o.boundingClientRect.x&&0===o.boundingClientRect.y&&0===o.boundingClientRect.width&&0===o.boundingClientRect.height&&g.close()}}));n.observe(t),e((function(){return n.disconnect()}))}}})),{id:m,el:v,dialogRef:v,containers:i,dialogState:c,titleId:y,describedby:b,visible:d,open:s,handleClick:function(e){e.stopPropagation()},handleKeyDown:function(e){e.key===n.Escape&&c.value===V.Open&&(i.value.size>1||(e.preventDefault(),e.stopPropagation(),g.close()))}}}}),J=o.defineComponent({name:"DialogOverlay",props:{as:{type:[Object,String],default:"div"}},render:function(){var e=_("DialogOverlay");return s({props:r({},this.$props,{ref:"el",id:this.id,"aria-hidden":!0,onClick:this.handleClick}),slot:{open:e.dialogState.value===V.Open},attrs:this.$attrs,slots:this.$slots,name:"DialogOverlay"})},setup:function(){var e=_("DialogOverlay");return{id:"headlessui-dialog-overlay-"+p(),handleClick:function(t){t.preventDefault(),t.stopPropagation(),e.close()}}}}),X=o.defineComponent({name:"DialogTitle",props:{as:{type:[Object,String],default:"h2"}},render:function(){var e=_("DialogTitle");return s({props:r({},this.$props,{id:this.id}),slot:{open:e.dialogState.value===V.Open},attrs:this.$attrs,slots:this.$slots,name:"DialogTitle"})},setup:function(){var e=_("DialogTitle"),t="headlessui-dialog-title-"+p();return o.onMounted((function(){e.setTitleId(t),o.onUnmounted((function(){return e.setTitleId(null)}))})),{id:t}}}),Z=K;!function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(z||(z={}));var ee=Symbol("DisclosureContext");function te(e){var t=o.inject(ee,null);if(null===t){var n=new Error("<"+e+" /> is missing a parent <Disclosure /> component.");throw Error.captureStackTrace&&Error.captureStackTrace(n,te),n}return t}var ne,oe,re=o.defineComponent({name:"Disclosure",props:{as:{type:[Object,String],default:"template"},defaultOpen:{type:[Boolean],default:!1}},setup:function(e,t){var n=t.slots,r=t.attrs,a=o.ref(e.defaultOpen?z.Open:z.Closed),u=o.ref(null);return o.provide(ee,{disclosureState:a,panelRef:u,toggleDisclosure:function(){var e;a.value=l(a.value,((e={})[z.Open]=z.Closed,e[z.Closed]=z.Open,e))}}),q(o.computed((function(){var e;return l(a.value,((e={})[z.Open]=U.Open,e[z.Closed]=U.Closed,e))}))),function(){return s({props:i(e,["defaultOpen"]),slot:{open:a.value===z.Open},slots:n,attrs:r,name:"Disclosure"})}}}),ie=o.defineComponent({name:"DisclosureButton",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1}},render:function(){var e=te("DisclosureButton"),t={open:e.disclosureState.value===z.Open};return s({props:r({},this.$props,{id:this.id,type:"button","aria-expanded":e.disclosureState.value===z.Open||void 0,"aria-controls":this.ariaControls,onClick:this.handleClick,onKeydown:this.handleKeyDown,onKeyup:this.handleKeyUp}),slot:t,attrs:this.$attrs,slots:this.$slots,name:"DisclosureButton"})},setup:function(e){var t=te("DisclosureButton");return{id:"headlessui-disclosure-button-"+p(),ariaControls:o.computed((function(){var e,n;return null!=(e=null==(n=N(t.panelRef))?void 0:n.id)?e:void 0})),handleClick:function(){e.disabled||t.toggleDisclosure()},handleKeyDown:function(o){if(!e.disabled)switch(o.key){case n.Space:case n.Enter:o.preventDefault(),o.stopPropagation(),t.toggleDisclosure()}},handleKeyUp:function(e){switch(e.key){case n.Space:e.preventDefault()}}}}}),ae=o.defineComponent({name:"DisclosurePanel",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0}},render:function(){var t={open:te("DisclosurePanel").disclosureState.value===z.Open};return s({props:r({},this.$props,{id:this.id,ref:"el"}),slot:t,attrs:this.$attrs,slots:this.$slots,features:e.RenderStrategy|e.Static,visible:this.visible,name:"DisclosurePanel"})},setup:function(){var e=te("DisclosurePanel"),t="headlessui-disclosure-panel-"+p(),n=H(),r=o.computed((function(){return null!==n?n.value===U.Open:e.disclosureState.value===z.Open}));return{id:t,el:e.panelRef,visible:r}}}),ue=o.defineComponent({name:"FocusTrap",props:{as:{type:[Object,String],default:"div"},initialFocus:{type:Object,default:null}},render:function(){return s({props:r({},i(this.$props,["initialFocus"]),{ref:"el"}),slot:{},attrs:this.$attrs,slots:this.$slots,name:"FocusTrap"})},setup:function(e){var t=o.ref(new Set),n=o.ref(null),r=o.ref(!0),i=o.computed((function(){return{initialFocus:e.initialFocus}}));return o.onMounted((function(){n.value&&(t.value.add(n.value),x(t,r,i))})),o.onUnmounted((function(){r.value=!1})),{el:n}}});function le(e,t){var n=t.resolveItems();if(n.length<=0)return null;var o=t.resolveActiveIndex(),r=null!=o?o:-1,i=function(){switch(e.focus){case ne.First:return n.findIndex((function(e){return!t.resolveDisabled(e)}));case ne.Previous:var o=n.slice().reverse().findIndex((function(e,n,o){return!(-1!==r&&o.length-n-1>=r||t.resolveDisabled(e))}));return-1===o?o:n.length-1-o;case ne.Next:return n.findIndex((function(e,n){return!(n<=r||t.resolveDisabled(e))}));case ne.Last:var i=n.slice().reverse().findIndex((function(e){return!t.resolveDisabled(e)}));return-1===i?i:n.length-1-i;case ne.Specific:return n.findIndex((function(n){return t.resolveId(n)===e.id}));case ne.Nothing:return null;default:!function(e){throw new Error("Unexpected object: "+e)}(e)}}();return-1===i?o:i}function se(e,t){if(void 0!==e)return"function"==typeof e?e(t):e}!function(e){e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing"}(ne||(ne={})),function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(oe||(oe={}));var ce=Symbol("ListboxContext");function de(e){var t=o.inject(ce,null);if(null===t){var n=new Error("<"+e+" /> is missing a parent <Listbox /> component.");throw Error.captureStackTrace&&Error.captureStackTrace(n,de),n}return t}var pe,ve=o.defineComponent({name:"Listbox",emits:["update:modelValue"],props:{as:{type:[Object,String],default:"template"},disabled:{type:[Boolean],default:!1},modelValue:{type:[Object,String,Number,Boolean]}},setup:function(e,t){var n=t.slots,r=t.attrs,a=t.emit,u=e.disabled,c=i(e,["modelValue","disabled"]),d=o.ref(oe.Closed),p=o.ref(null),v=o.ref(null),f=o.ref(null),m=o.ref([]),h=o.ref(""),b=o.ref(null),y=o.computed((function(){return e.modelValue})),g={listboxState:d,value:y,labelRef:p,buttonRef:v,optionsRef:f,disabled:u,options:m,searchQuery:h,activeOptionIndex:b,closeListbox:function(){u||d.value!==oe.Closed&&(d.value=oe.Closed,b.value=null)},openListbox:function(){u||d.value!==oe.Open&&(d.value=oe.Open)},goToOption:function(e,t){if(!u&&d.value!==oe.Closed){var n=le(e===ne.Specific?{focus:ne.Specific,id:t}:{focus:e},{resolveItems:function(){return m.value},resolveActiveIndex:function(){return b.value},resolveId:function(e){return e.id},resolveDisabled:function(e){return e.dataRef.disabled}});""===h.value&&b.value===n||(h.value="",b.value=n)}},search:function(e){if(!u&&d.value!==oe.Closed){h.value+=e.toLowerCase();var t=m.value.findIndex((function(e){return!e.dataRef.disabled&&e.dataRef.textValue.startsWith(h.value)}));-1!==t&&t!==b.value&&(b.value=t)}},clearSearch:function(){u||d.value!==oe.Closed&&""!==h.value&&(h.value="")},registerOption:function(e,t){m.value.push({id:e,dataRef:t})},unregisterOption:function(e){var t=m.value.slice(),n=null!==b.value?t[b.value]:null,o=t.findIndex((function(t){return t.id===e}));-1!==o&&t.splice(o,1),m.value=t,b.value=o===b.value||null===n?null:t.indexOf(n)},select:function(e){u||a("update:modelValue",e)}};return O("mousedown",(function(e){var t,n,o,r=e.target,i=document.activeElement;d.value===oe.Open&&((null==(t=N(v))?void 0:t.contains(r))||((null==(n=N(f))?void 0:n.contains(r))||g.closeListbox(),i!==document.body&&(null==i?void 0:i.contains(r))||e.defaultPrevented||null==(o=N(v))||o.focus({preventScroll:!0})))})),o.provide(ce,g),q(o.computed((function(){var e;return l(d.value,((e={})[oe.Open]=U.Open,e[oe.Closed]=U.Closed,e))}))),function(){return s({props:c,slot:{open:d.value===oe.Open,disabled:u},slots:n,attrs:r,name:"Listbox"})}}}),fe=o.defineComponent({name:"ListboxLabel",props:{as:{type:[Object,String],default:"label"}},render:function(){var e=de("ListboxLabel"),t={open:e.listboxState.value===oe.Open,disabled:e.disabled};return s({props:r({},this.$props,{id:this.id,ref:"el",onClick:this.handleClick}),slot:t,attrs:this.$attrs,slots:this.$slots,name:"ListboxLabel"})},setup:function(){var e=de("ListboxLabel");return{id:"headlessui-listbox-label-"+p(),el:e.labelRef,handleClick:function(){var t;null==(t=N(e.buttonRef))||t.focus({preventScroll:!0})}}}}),me=o.defineComponent({name:"ListboxButton",props:{as:{type:[Object,String],default:"button"}},render:function(){var e,t,n=de("ListboxButton"),o={open:n.listboxState.value===oe.Open,disabled:n.disabled},i={ref:"el",id:this.id,type:"button","aria-haspopup":!0,"aria-controls":null==(e=N(n.optionsRef))?void 0:e.id,"aria-expanded":n.listboxState.value===oe.Open||void 0,"aria-labelledby":n.labelRef.value?[null==(t=N(n.labelRef))?void 0:t.id,this.id].join(" "):void 0,disabled:n.disabled,onKeydown:this.handleKeyDown,onKeyup:this.handleKeyUp,onClick:this.handleClick};return s({props:r({},this.$props,i),slot:o,attrs:this.$attrs,slots:this.$slots,name:"ListboxButton"})},setup:function(){var e=de("ListboxButton");return{id:"headlessui-listbox-button-"+p(),el:e.buttonRef,handleKeyDown:function(t){switch(t.key){case n.Space:case n.Enter:case n.ArrowDown:t.preventDefault(),e.openListbox(),o.nextTick((function(){var t;null==(t=N(e.optionsRef))||t.focus({preventScroll:!0}),e.value.value||e.goToOption(ne.First)}));break;case n.ArrowUp:t.preventDefault(),e.openListbox(),o.nextTick((function(){var t;null==(t=N(e.optionsRef))||t.focus({preventScroll:!0}),e.value.value||e.goToOption(ne.Last)}))}},handleKeyUp:function(e){switch(e.key){case n.Space:e.preventDefault()}},handleClick:function(t){var n;e.disabled||(e.listboxState.value===oe.Open?(e.closeListbox(),o.nextTick((function(){var t;return null==(t=N(e.buttonRef))?void 0:t.focus({preventScroll:!0})}))):(t.preventDefault(),e.openListbox(),n=function(){var t;return null==(t=N(e.optionsRef))?void 0:t.focus({preventScroll:!0})},requestAnimationFrame((function(){return requestAnimationFrame(n)}))))}}}}),he=o.defineComponent({name:"ListboxOptions",props:{as:{type:[Object,String],default:"ul"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0}},render:function(){var t,n,o,i,a=de("ListboxOptions"),u={open:a.listboxState.value===oe.Open},l={"aria-activedescendant":null===a.activeOptionIndex.value||null==(t=a.options.value[a.activeOptionIndex.value])?void 0:t.id,"aria-labelledby":null!=(n=null==(o=N(a.labelRef))?void 0:o.id)?n:null==(i=N(a.buttonRef))?void 0:i.id,id:this.id,onKeydown:this.handleKeyDown,role:"listbox",tabIndex:0,ref:"el"};return s({props:r({},this.$props,l),slot:u,attrs:this.$attrs,slots:this.$slots,features:e.RenderStrategy|e.Static,visible:this.visible,name:"ListboxOptions"})},setup:function(){var e=de("ListboxOptions"),t="headlessui-listbox-options-"+p(),r=o.ref(null),i=H(),a=o.computed((function(){return null!==i?i.value===U.Open:e.listboxState.value===oe.Open}));return{id:t,el:e.optionsRef,handleKeyDown:function(t){switch(r.value&&clearTimeout(r.value),t.key){case n.Space:if(""!==e.searchQuery.value)return t.preventDefault(),t.stopPropagation(),e.search(t.key);case n.Enter:t.preventDefault(),t.stopPropagation(),null!==e.activeOptionIndex.value&&e.select(e.options.value[e.activeOptionIndex.value].dataRef.value),e.closeListbox(),o.nextTick((function(){var t;return null==(t=N(e.buttonRef))?void 0:t.focus({preventScroll:!0})}));break;case n.ArrowDown:return t.preventDefault(),t.stopPropagation(),e.goToOption(ne.Next);case n.ArrowUp:return t.preventDefault(),t.stopPropagation(),e.goToOption(ne.Previous);case n.Home:case n.PageUp:return t.preventDefault(),t.stopPropagation(),e.goToOption(ne.First);case n.End:case n.PageDown:return t.preventDefault(),t.stopPropagation(),e.goToOption(ne.Last);case n.Escape:t.preventDefault(),t.stopPropagation(),e.closeListbox(),o.nextTick((function(){var t;return null==(t=N(e.buttonRef))?void 0:t.focus({preventScroll:!0})}));break;case n.Tab:t.preventDefault(),t.stopPropagation();break;default:1===t.key.length&&(e.search(t.key),r.value=setTimeout((function(){return e.clearSearch()}),350))}},visible:a}}}),be=o.defineComponent({name:"ListboxOption",props:{as:{type:[Object,String],default:"li"},value:{type:[Object,String]},disabled:{type:Boolean,default:!1},class:{type:[String,Function],required:!1},className:{type:[String,Function],required:!1}},setup:function(e,t){var n=t.slots,i=t.attrs,a=de("ListboxOption"),u="headlessui-listbox-option-"+p(),l=e.disabled,c=e.className,d=void 0===c?e.class:c,v=e.value,f=o.computed((function(){return null!==a.activeOptionIndex.value&&a.options.value[a.activeOptionIndex.value].id===u})),m=o.computed((function(){return o.toRaw(a.value.value)===o.toRaw(v)})),h=o.ref({disabled:l,value:v,textValue:""});function b(e){if(l)return e.preventDefault();a.select(v),a.closeListbox(),o.nextTick((function(){var e;return null==(e=N(a.buttonRef))?void 0:e.focus({preventScroll:!0})}))}function y(){if(l)return a.goToOption(ne.Nothing);a.goToOption(ne.Specific,u)}function g(){l||f.value||a.goToOption(ne.Specific,u)}function S(){l||f.value&&a.goToOption(ne.Nothing)}return o.onMounted((function(){var e,t,n=null==(e=document.getElementById(u))||null==(t=e.textContent)?void 0:t.toLowerCase().trim();void 0!==n&&(h.value.textValue=n)})),o.onMounted((function(){return a.registerOption(u,h)})),o.onUnmounted((function(){return a.unregisterOption(u)})),o.onMounted((function(){o.watch([a.listboxState,m],(function(){var e;a.listboxState.value===oe.Open&&m.value&&(a.goToOption(ne.Specific,u),null==(e=document.getElementById(u))||null==e.focus||e.focus())}),{immediate:!0})})),o.watchEffect((function(){a.listboxState.value===oe.Open&&f.value&&o.nextTick((function(){var e;return null==(e=document.getElementById(u))||null==e.scrollIntoView?void 0:e.scrollIntoView({block:"nearest"})}))})),function(){var t={active:f.value,selected:m.value,disabled:l},o={id:u,role:"option",tabIndex:-1,class:se(d,t),"aria-disabled":!0===l||void 0,"aria-selected":!0===m.value?m.value:void 0,onClick:b,onFocus:y,onPointermove:g,onMousemove:g,onPointerleave:S,onMouseleave:S};return s({props:r({},e,o),slot:t,attrs:i,slots:n,name:"ListboxOption"})}}});function ye(e){var t=e.container,n=e.accept,r=e.walk,i=e.enabled;o.watchEffect((function(){var e=t.value;if(e&&(void 0===i||i.value))for(var o=Object.assign((function(e){return n(e)}),{acceptNode:n}),a=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,o,!1);a.nextNode();)r(a.currentNode)}))}!function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(pe||(pe={}));var ge=Symbol("MenuContext");function Se(e){var t=o.inject(ge,null);if(null===t){var n=new Error("<"+e+" /> is missing a parent <Menu /> component.");throw Error.captureStackTrace&&Error.captureStackTrace(n,Se),n}return t}var Oe,we=o.defineComponent({name:"Menu",props:{as:{type:[Object,String],default:"template"}},setup:function(e,t){var n=t.slots,r=t.attrs,i=o.ref(pe.Closed),a=o.ref(null),u=o.ref(null),c=o.ref([]),d=o.ref(""),p=o.ref(null),v={menuState:i,buttonRef:a,itemsRef:u,items:c,searchQuery:d,activeItemIndex:p,closeMenu:function(){i.value=pe.Closed,p.value=null},openMenu:function(){return i.value=pe.Open},goToItem:function(e,t){var n=le(e===ne.Specific?{focus:ne.Specific,id:t}:{focus:e},{resolveItems:function(){return c.value},resolveActiveIndex:function(){return p.value},resolveId:function(e){return e.id},resolveDisabled:function(e){return e.dataRef.disabled}});""===d.value&&p.value===n||(d.value="",p.value=n)},search:function(e){d.value+=e.toLowerCase();var t=c.value.findIndex((function(e){return e.dataRef.textValue.startsWith(d.value)&&!e.dataRef.disabled}));-1!==t&&t!==p.value&&(p.value=t)},clearSearch:function(){d.value=""},registerItem:function(e,t){c.value.push({id:e,dataRef:t})},unregisterItem:function(e){var t=c.value.slice(),n=null!==p.value?t[p.value]:null,o=t.findIndex((function(t){return t.id===e}));-1!==o&&t.splice(o,1),c.value=t,p.value=o===p.value||null===n?null:t.indexOf(n)}};return O("mousedown",(function(e){var t,n,o,r=e.target,l=document.activeElement;i.value===pe.Open&&((null==(t=N(a))?void 0:t.contains(r))||((null==(n=N(u))?void 0:n.contains(r))||v.closeMenu(),l!==document.body&&(null==l?void 0:l.contains(r))||e.defaultPrevented||null==(o=N(a))||o.focus({preventScroll:!0})))})),o.provide(ge,v),q(o.computed((function(){var e;return l(i.value,((e={})[pe.Open]=U.Open,e[pe.Closed]=U.Closed,e))}))),function(){return s({props:e,slot:{open:i.value===pe.Open},slots:n,attrs:r,name:"Menu"})}}}),xe=o.defineComponent({name:"MenuButton",props:{disabled:{type:Boolean,default:!1},as:{type:[Object,String],default:"button"}},render:function(){var e,t=Se("MenuButton"),n={open:t.menuState.value===pe.Open},o={ref:"el",id:this.id,type:"button","aria-haspopup":!0,"aria-controls":null==(e=N(t.itemsRef))?void 0:e.id,"aria-expanded":t.menuState.value===pe.Open||void 0,onKeydown:this.handleKeyDown,onKeyup:this.handleKeyUp,onClick:this.handleClick};return s({props:r({},this.$props,o),slot:n,attrs:this.$attrs,slots:this.$slots,name:"MenuButton"})},setup:function(e){var t=Se("MenuButton");return{id:"headlessui-menu-button-"+p(),el:t.buttonRef,handleKeyDown:function(e){switch(e.key){case n.Space:case n.Enter:case n.ArrowDown:e.preventDefault(),e.stopPropagation(),t.openMenu(),o.nextTick((function(){var e;null==(e=N(t.itemsRef))||e.focus({preventScroll:!0}),t.goToItem(ne.First)}));break;case n.ArrowUp:e.preventDefault(),e.stopPropagation(),t.openMenu(),o.nextTick((function(){var e;null==(e=N(t.itemsRef))||e.focus({preventScroll:!0}),t.goToItem(ne.Last)}))}},handleKeyUp:function(e){switch(e.key){case n.Space:e.preventDefault()}},handleClick:function(n){var r;e.disabled||(t.menuState.value===pe.Open?(t.closeMenu(),o.nextTick((function(){var e;return null==(e=N(t.buttonRef))?void 0:e.focus({preventScroll:!0})}))):(n.preventDefault(),n.stopPropagation(),t.openMenu(),r=function(){var e;return null==(e=N(t.itemsRef))?void 0:e.focus({preventScroll:!0})},requestAnimationFrame((function(){return requestAnimationFrame(r)}))))}}}}),Ce=o.defineComponent({name:"MenuItems",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0}},render:function(){var t,n,o=Se("MenuItems"),i={open:o.menuState.value===pe.Open},a={"aria-activedescendant":null===o.activeItemIndex.value||null==(t=o.items.value[o.activeItemIndex.value])?void 0:t.id,"aria-labelledby":null==(n=N(o.buttonRef))?void 0:n.id,id:this.id,onKeydown:this.handleKeyDown,onKeyup:this.handleKeyUp,role:"menu",tabIndex:0,ref:"el"};return s({props:r({},this.$props,a),slot:i,attrs:this.$attrs,slots:this.$slots,features:e.RenderStrategy|e.Static,visible:this.visible,name:"MenuItems"})},setup:function(){var e=Se("MenuItems"),t="headlessui-menu-items-"+p(),r=o.ref(null);ye({container:o.computed((function(){return N(e.itemsRef)})),enabled:o.computed((function(){return e.menuState.value===pe.Open})),accept:function(e){return"menuitem"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk:function(e){e.setAttribute("role","none")}});var i=H(),a=o.computed((function(){return null!==i?i.value===U.Open:e.menuState.value===pe.Open}));return{id:t,el:e.itemsRef,handleKeyDown:function(t){switch(r.value&&clearTimeout(r.value),t.key){case n.Space:if(""!==e.searchQuery.value)return t.preventDefault(),t.stopPropagation(),e.search(t.key);case n.Enter:var i;t.preventDefault(),t.stopPropagation(),null!==e.activeItemIndex.value&&(null==(i=document.getElementById(e.items.value[e.activeItemIndex.value].id))||i.click()),e.closeMenu(),o.nextTick((function(){var t;return null==(t=N(e.buttonRef))?void 0:t.focus({preventScroll:!0})}));break;case n.ArrowDown:return t.preventDefault(),t.stopPropagation(),e.goToItem(ne.Next);case n.ArrowUp:return t.preventDefault(),t.stopPropagation(),e.goToItem(ne.Previous);case n.Home:case n.PageUp:return t.preventDefault(),t.stopPropagation(),e.goToItem(ne.First);case n.End:case n.PageDown:return t.preventDefault(),t.stopPropagation(),e.goToItem(ne.Last);case n.Escape:t.preventDefault(),t.stopPropagation(),e.closeMenu(),o.nextTick((function(){var t;return null==(t=N(e.buttonRef))?void 0:t.focus({preventScroll:!0})}));break;case n.Tab:t.preventDefault(),t.stopPropagation();break;default:1===t.key.length&&(e.search(t.key),r.value=setTimeout((function(){return e.clearSearch()}),350))}},handleKeyUp:function(e){switch(e.key){case n.Space:e.preventDefault()}},visible:a}}}),Ee=o.defineComponent({name:"MenuItem",props:{as:{type:[Object,String],default:"template"},disabled:{type:Boolean,default:!1},class:{type:[String,Function],required:!1},className:{type:[String,Function],required:!1}},setup:function(e,t){var n=t.slots,i=t.attrs,a=Se("MenuItem"),u="headlessui-menu-item-"+p(),l=e.disabled,c=e.className,d=void 0===c?e.class:c,v=o.computed((function(){return null!==a.activeItemIndex.value&&a.items.value[a.activeItemIndex.value].id===u})),f=o.ref({disabled:l,textValue:""});function m(e){if(l)return e.preventDefault();a.closeMenu(),o.nextTick((function(){var e;return null==(e=N(a.buttonRef))?void 0:e.focus({preventScroll:!0})}))}function h(){if(l)return a.goToItem(ne.Nothing);a.goToItem(ne.Specific,u)}function b(){l||v.value||a.goToItem(ne.Specific,u)}function y(){l||v.value&&a.goToItem(ne.Nothing)}return o.onMounted((function(){var e,t,n=null==(e=document.getElementById(u))||null==(t=e.textContent)?void 0:t.toLowerCase().trim();void 0!==n&&(f.value.textValue=n)})),o.onMounted((function(){return a.registerItem(u,f)})),o.onUnmounted((function(){return a.unregisterItem(u)})),o.watchEffect((function(){a.menuState.value===pe.Open&&v.value&&o.nextTick((function(){var e;return null==(e=document.getElementById(u))||null==e.scrollIntoView?void 0:e.scrollIntoView({block:"nearest"})}))})),function(){var t={active:v.value,disabled:l},o={id:u,role:"menuitem",tabIndex:-1,class:se(d,t),"aria-disabled":!0===l||void 0,onClick:m,onFocus:h,onPointermove:b,onMousemove:b,onPointerleave:y,onMouseleave:y};return s({props:r({},e,o),slot:t,attrs:i,slots:n,name:"MenuItem"})}}});!function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(Oe||(Oe={}));var De=Symbol("PopoverContext");function ke(e){var t=o.inject(De,null);if(null===t){var n=new Error("<"+e+" /> is missing a parent <"+Ie.name+" /> component.");throw Error.captureStackTrace&&Error.captureStackTrace(n,ke),n}return t}var Pe=Symbol("PopoverGroupContext");function Te(){return o.inject(Pe,null)}var Re=Symbol("PopoverPanelContext"),Ie=o.defineComponent({name:"Popover",props:{as:{type:[Object,String],default:"div"}},setup:function(e,t){var n=t.slots,i=t.attrs,a=r({},e),u="headlessui-popover-button-"+p(),c="headlessui-popover-panel-"+p(),d=o.ref(Oe.Closed),v=o.ref(null),f=o.ref(null),m={popoverState:d,buttonId:u,panelId:c,panel:f,button:v,togglePopover:function(){var e;d.value=l(d.value,((e={})[Oe.Open]=Oe.Closed,e[Oe.Closed]=Oe.Open,e))},closePopover:function(){d.value!==Oe.Closed&&(d.value=Oe.Closed)}};o.provide(De,m),q(o.computed((function(){var e;return l(d.value,((e={})[Oe.Open]=U.Open,e[Oe.Closed]=U.Closed,e))})));var y={buttonId:u,panelId:c,close:function(){m.closePopover()}},g=Te(),S=null==g?void 0:g.registerPopover;return o.watchEffect((function(){return null==S?void 0:S(y)})),O("focus",(function(){var e,t,n;d.value===Oe.Open&&((null!=(e=null==g?void 0:g.isFocusWithinPopoverGroup())?e:(null==(t=N(v))?void 0:t.contains(document.activeElement))||(null==(n=N(f))?void 0:n.contains(document.activeElement)))||v&&f&&m.closePopover())}),!0),O("mousedown",(function(e){var t,n,o,r,i,a,u=e.target;d.value===Oe.Open&&((null==(t=N(v))?void 0:t.contains(u))||(null==(n=N(f))?void 0:n.contains(u))||(m.closePopover(),void 0===(i=h.Loose)&&(i=h.Strict),(r=u)!==document.body&&l(i,((a={})[h.Strict]=function(){return r.matches(b)},a[h.Loose]=function(){for(var e=r;null!==e;){if(e.matches(b))return!0;e=e.parentElement}return!1},a))||(e.preventDefault(),null==(o=N(v))||o.focus())))})),function(){return s({props:a,slot:{open:d.value===Oe.Open},slots:n,attrs:i,name:"Popover"})}}}),Fe=o.defineComponent({name:"PopoverButton",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1}},render:function(){var e=ke("PopoverButton"),t={open:e.popoverState.value===Oe.Open},n=this.isWithinPanel?{type:"button",onKeydown:this.handleKeyDown,onClick:this.handleClick}:{ref:"el",id:e.buttonId,type:"button","aria-expanded":e.popoverState.value===Oe.Open||void 0,"aria-controls":N(e.panel)?e.panelId:void 0,onKeydown:this.handleKeyDown,onKeyup:this.handleKeyUp,onClick:this.handleClick};return s({props:r({},this.$props,n),slot:t,attrs:this.$attrs,slots:this.$slots,name:"PopoverButton"})},setup:function(e){var t=ke("PopoverButton"),r=Te(),i=null==r?void 0:r.closeOthers,a=o.inject(Re,null),u=null!==a&&a===t.panelId,l=o.ref(null),s=o.ref("undefined"==typeof window?null:document.activeElement);return O("focus",(function(){s.value=l.value,l.value=document.activeElement}),!0),{isWithinPanel:u,el:u?null:t.button,handleKeyDown:function(e){var o,r;if(u){if(t.popoverState.value===Oe.Closed)return;switch(e.key){case n.Space:case n.Enter:e.preventDefault(),e.stopPropagation(),t.closePopover(),null==(o=N(t.button))||o.focus()}}else switch(e.key){case n.Space:case n.Enter:e.preventDefault(),e.stopPropagation(),t.popoverState.value===Oe.Closed&&(null==i||i(t.buttonId)),t.togglePopover();break;case n.Escape:if(t.popoverState.value!==Oe.Open)return null==i?void 0:i(t.buttonId);if(!N(t.button))return;if(!(null==(r=N(t.button))?void 0:r.contains(document.activeElement)))return;t.closePopover();break;case n.Tab:if(t.popoverState.value!==Oe.Open)return;if(!t.panel)return;if(!t.button)return;if(e.shiftKey){var a,l;if(!s.value)return;if(null==(a=N(t.button))?void 0:a.contains(s.value))return;if(null==(l=N(t.panel))?void 0:l.contains(s.value))return;var c=y(),d=c.indexOf(s.value);if(c.indexOf(N(t.button))>d)return;e.preventDefault(),e.stopPropagation(),S(N(t.panel),v.Last)}else e.preventDefault(),e.stopPropagation(),S(N(t.panel),v.First)}},handleKeyUp:function(e){var o,r;if(!u&&(e.key===n.Space&&e.preventDefault(),t.popoverState.value===Oe.Open&&t.panel&&t.button))switch(e.key){case n.Tab:if(!s.value)return;if(null==(o=N(t.button))?void 0:o.contains(s.value))return;if(null==(r=N(t.panel))?void 0:r.contains(s.value))return;var i=y(),a=i.indexOf(s.value);if(i.indexOf(N(t.button))>a)return;e.preventDefault(),e.stopPropagation(),S(N(t.panel),v.Last)}},handleClick:function(){var n,o;e.disabled||(u?(t.closePopover(),null==(n=N(t.button))||n.focus()):(t.popoverState.value===Oe.Closed&&(null==i||i(t.buttonId)),null==(o=N(t.button))||o.focus(),t.togglePopover()))},handleFocus:function(){}}}}),Le=o.defineComponent({name:"PopoverOverlay",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0}},render:function(){var t={open:ke("PopoverOverlay").popoverState.value===Oe.Open};return s({props:r({},this.$props,{id:this.id,ref:"el","aria-hidden":!0,onClick:this.handleClick}),slot:t,attrs:this.$attrs,slots:this.$slots,features:e.RenderStrategy|e.Static,visible:this.visible,name:"PopoverOverlay"})},setup:function(){var e=ke("PopoverOverlay"),t=H(),n=o.computed((function(){return null!==t?t.value===U.Open:e.popoverState.value===Oe.Open}));return{id:"headlessui-popover-overlay-"+p(),handleClick:function(){e.closePopover()},visible:n}}}),Ae=o.defineComponent({name:"PopoverPanel",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},focus:{type:Boolean,default:!1}},render:function(){var t={open:ke("PopoverPanel").popoverState.value===Oe.Open};return s({props:r({},this.$props,{ref:"el",id:this.id,onKeydown:this.handleKeyDown}),slot:t,attrs:this.$attrs,slots:this.$slots,features:e.RenderStrategy|e.Static,visible:this.visible,name:"PopoverPanel"})},setup:function(e){var t=e.focus,r=ke("PopoverPanel");o.provide(Re,r.panelId),o.onUnmounted((function(){r.panel.value=null})),o.watchEffect((function(){var e;if(t&&r.popoverState.value===Oe.Open&&r.panel){var n=document.activeElement;(null==(e=N(r.panel))?void 0:e.contains(n))||S(N(r.panel),v.First)}})),O("keydown",(function(e){var t;if(r.popoverState.value===Oe.Open&&N(r.panel)&&e.key===n.Tab&&document.activeElement&&(null==(t=N(r.panel))?void 0:t.contains(document.activeElement))){e.preventDefault();var o,i=S(N(r.panel),e.shiftKey?v.Previous:v.Next);if(i===f.Underflow)return null==(o=N(r.button))?void 0:o.focus();if(i===f.Overflow){if(!N(r.button))return;var a=y(),u=a.indexOf(N(r.button));S(a.splice(u+1).filter((function(e){var t;return!(null==(t=N(r.panel))?void 0:t.contains(e))})),v.First)===f.Error&&S(document.body,v.First)}}})),O("focus",(function(){var e;t&&r.popoverState.value===Oe.Open&&N(r.panel)&&((null==(e=N(r.panel))?void 0:e.contains(document.activeElement))||r.closePopover())}),!0);var i=H(),a=o.computed((function(){return null!==i?i.value===U.Open:r.popoverState.value===Oe.Open}));return{id:r.panelId,el:r.panel,handleKeyDown:function(e){var t,o;switch(e.key){case n.Escape:if(r.popoverState.value!==Oe.Open)return;if(!N(r.panel))return;if(!(null==(t=N(r.panel))?void 0:t.contains(document.activeElement)))return;e.preventDefault(),r.closePopover(),null==(o=N(r.button))||o.focus()}},visible:a}}}),je=o.defineComponent({name:"PopoverGroup",props:{as:{type:[Object,String],default:"div"}},render:function(){return s({props:r({},this.$props,{ref:"el"}),slot:{},attrs:this.$attrs,slots:this.$slots,name:"PopoverGroup"})},setup:function(){var e=o.ref(null),t=o.ref([]);function n(e){var n=t.value.indexOf(e);-1!==n&&t.value.splice(n,1)}return o.provide(Pe,{registerPopover:function(e){return t.value.push(e),function(){n(e)}},unregisterPopover:n,isFocusWithinPopoverGroup:function(){var n,o=document.activeElement;return!!(null==(n=N(e))?void 0:n.contains(o))||t.value.some((function(e){var t,n;return(null==(t=document.getElementById(e.buttonId))?void 0:t.contains(o))||(null==(n=document.getElementById(e.panelId))?void 0:n.contains(o))}))},closeOthers:function(e){for(var n,o=u(t.value);!(n=o()).done;){var r=n.value;r.buttonId!==e&&r.close()}}}),{el:e}}}),$e=Symbol("LabelContext");function Be(){var e=o.inject($e,null);if(null===e){var t=new Error("You used a <Label /> component, but it is not inside a parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,Be),t}return e}function Me(e){var t=void 0===e?{}:e,n=t.slot,r=void 0===n?{}:n,i=t.name,a=void 0===i?"Label":i,u=t.props,l=void 0===u?{}:u,s=o.ref([]);return o.provide($e,{register:function(e){return s.value.push(e),function(){var t=s.value.indexOf(e);-1!==t&&s.value.splice(t,1)}},slot:r,name:a,props:l}),o.computed((function(){return s.value.length>0?s.value.join(" "):void 0}))}var Ke=o.defineComponent({name:"Label",props:{as:{type:[Object,String],default:"label"},passive:{type:[Boolean],default:!1}},render:function(){var e=this.context,t=e.name,n=void 0===t?"Label":t,a=e.slot,u=void 0===a?{}:a,l=e.props,c=void 0===l?{}:l,d=this.$props,p=d.passive,v=i(d,["passive"]),f=r({},Object.entries(c).reduce((function(e,t){var n;return Object.assign(e,((n={})[t[0]]=o.unref(t[1]),n))}),{}),{id:this.id}),m=r({},v,f);return p&&delete m.onClick,s({props:m,slot:u,attrs:this.$attrs,slots:this.$slots,name:n})},setup:function(){var e=Be(),t="headlessui-label-"+p();return o.onMounted((function(){return o.onUnmounted(e.register(t))})),{id:t,context:e}}}),Ne=Symbol("RadioGroupContext");function Ue(e){var t=o.inject(Ne,null);if(null===t){var n=new Error("<"+e+" /> is missing a parent <RadioGroup /> component.");throw Error.captureStackTrace&&Error.captureStackTrace(n,Ue),n}return t}var Ve,Ge=o.defineComponent({name:"RadioGroup",emits:["update:modelValue"],props:{as:{type:[Object,String],default:"div"},disabled:{type:[Boolean],default:!1},modelValue:{type:[Object,String,Number,Boolean]}},render:function(){return s({props:r({},i(this.$props,["modelValue","disabled"]),{ref:"el",id:this.id,role:"radiogroup","aria-labelledby":this.labelledby,"aria-describedby":this.describedby,onKeydown:this.handleKeyDown}),slot:{},attrs:this.$attrs,slots:this.$slots,name:"RadioGroup"})},setup:function(e,t){var r=t.emit,i=o.ref(null),a=o.ref([]),u=Me({name:"RadioGroupLabel"}),l=M({name:"RadioGroupDescription"}),s=o.computed((function(){return e.modelValue})),c={options:a,value:s,disabled:o.computed((function(){return e.disabled})),firstOption:o.computed((function(){return a.value.find((function(e){return!e.propsRef.disabled}))})),containsCheckedOption:o.computed((function(){return a.value.some((function(t){return o.toRaw(t.propsRef.value)===o.toRaw(e.modelValue)}))})),change:function(t){var n;if(e.disabled)return!1;if(s.value===t)return!1;var i=null==(n=a.value.find((function(e){return o.toRaw(e.propsRef.value)===o.toRaw(t)})))?void 0:n.propsRef;return!(null==i?void 0:i.disabled)&&(r("update:modelValue",t),!0)},registerOption:function(e){var t,n=Array.from(null==(t=i.value)?void 0:t.querySelectorAll('[id^="headlessui-radiogroup-option-"]')).reduce((function(e,t,n){var o;return Object.assign(e,((o={})[t.id]=n,o))}),{});a.value.push(e),a.value.sort((function(e,t){return n[e.id]-n[t.id]}))},unregisterOption:function(e){var t=a.value.findIndex((function(t){return t.id===e}));-1!==t&&a.value.splice(t,1)}};return o.provide(Ne,c),ye({container:o.computed((function(){return N(i)})),accept:function(e){return"radio"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk:function(e){e.setAttribute("role","none")}}),{id:"headlessui-radiogroup-"+p(),labelledby:u,describedby:l,el:i,handleKeyDown:function(e){if(i.value&&i.value.contains(e.target)){var t=a.value.filter((function(e){return!1===e.propsRef.disabled})).map((function(e){return e.element}));switch(e.key){case n.ArrowLeft:case n.ArrowUp:if(e.preventDefault(),e.stopPropagation(),S(t,v.Previous|v.WrapAround)===f.Success){var o=a.value.find((function(e){return e.element===document.activeElement}));o&&c.change(o.propsRef.value)}break;case n.ArrowRight:case n.ArrowDown:if(e.preventDefault(),e.stopPropagation(),S(t,v.Next|v.WrapAround)===f.Success){var r=a.value.find((function(e){return e.element===document.activeElement}));r&&c.change(r.propsRef.value)}break;case n.Space:e.preventDefault(),e.stopPropagation();var u=a.value.find((function(e){return e.element===document.activeElement}));u&&c.change(u.propsRef.value)}}}}}});!function(e){e[e.Empty=1]="Empty",e[e.Active=2]="Active"}(Ve||(Ve={}));var He,qe=o.defineComponent({name:"RadioGroupOption",props:{as:{type:[Object,String],default:"div"},value:{type:[Object,String,Number,Boolean]},disabled:{type:Boolean,default:!1},class:{type:[String,Function],required:!1},className:{type:[String,Function],required:!1}},render:function(){var e=this.$props,t=e.className,n=void 0===t?e.class:t,o=i(e,["value","disabled","class","className"]),a={checked:this.checked,disabled:this.disabled,active:Boolean(this.state&Ve.Active)};return s({props:r({},o,{id:this.id,ref:"el",role:"radio",class:se(n,a),"aria-checked":this.checked?"true":"false","aria-labelledby":this.labelledby,"aria-describedby":this.describedby,tabIndex:this.tabIndex,onClick:this.disabled?void 0:this.handleClick,onFocus:this.disabled?void 0:this.handleFocus,onBlur:this.disabled?void 0:this.handleBlur}),slot:a,attrs:this.$attrs,slots:this.$slots,name:"RadioGroupOption"})},setup:function(e){var t=Ue("RadioGroupOption"),n="headlessui-radiogroup-option-"+p(),r=Me({name:"RadioGroupLabel"}),i=M({name:"RadioGroupDescription"}),a=o.ref(null),u=o.computed((function(){return{value:e.value,disabled:e.disabled}})),l=o.ref(Ve.Empty);o.onMounted((function(){return t.registerOption({id:n,element:a,propsRef:u})})),o.onUnmounted((function(){return t.unregisterOption(n)}));var s=o.computed((function(){var e;return(null==(e=t.firstOption.value)?void 0:e.id)===n})),c=o.computed((function(){return t.disabled.value||e.disabled})),d=o.computed((function(){return o.toRaw(t.value.value)===o.toRaw(e.value)}));return{id:n,el:a,labelledby:r,describedby:i,state:l,disabled:c,checked:d,tabIndex:o.computed((function(){return c.value?-1:d.value||!t.containsCheckedOption.value&&s.value?0:-1})),handleClick:function(){var n;t.change(e.value)&&(l.value|=Ve.Active,null==(n=a.value)||n.focus())},handleFocus:function(){l.value|=Ve.Active},handleBlur:function(){l.value&=~Ve.Active}}}}),We=Ke,_e=K,ze=Symbol("GroupContext"),Qe=o.defineComponent({name:"SwitchGroup",props:{as:{type:[Object,String],default:"template"}},setup:function(e,t){var n=t.slots,r=t.attrs,i=o.ref(null),a=Me({name:"SwitchLabel",props:{onClick:function(){i.value&&(i.value.click(),i.value.focus({preventScroll:!0}))}}}),u=M({name:"SwitchDescription"});return o.provide(ze,{switchRef:i,labelledby:a,describedby:u}),function(){return s({props:e,slot:{},slots:n,attrs:r,name:"SwitchGroup"})}}}),Ye=o.defineComponent({name:"Switch",emits:["update:modelValue"],props:{as:{type:[Object,String],default:"button"},modelValue:{type:Boolean,default:!1},class:{type:[String,Function],required:!1},className:{type:[String,Function],required:!1}},render:function(){var e=o.inject(ze,null),t=this.$props,n=t.className,i={checked:this.$props.modelValue},a={id:this.id,ref:null===e?void 0:e.switchRef,role:"switch",tabIndex:0,class:se(void 0===n?t.class:n,i),"aria-checked":this.$props.modelValue,"aria-labelledby":this.labelledby,"aria-describedby":this.describedby,onClick:this.handleClick,onKeyup:this.handleKeyUp,onKeypress:this.handleKeyPress};return"button"===this.$props.as&&Object.assign(a,{type:"button"}),s({props:r({},this.$props,a),slot:i,attrs:this.$attrs,slots:this.$slots,name:"Switch"})},setup:function(e,t){var r=t.emit,i=o.inject(ze,null);function a(){r("update:modelValue",!e.modelValue)}return{id:"headlessui-switch-"+p(),el:null==i?void 0:i.switchRef,labelledby:null==i?void 0:i.labelledby,describedby:null==i?void 0:i.describedby,handleClick:function(e){e.preventDefault(),a()},handleKeyUp:function(e){e.key!==n.Tab&&e.preventDefault(),e.key===n.Space&&a()},handleKeyPress:function(e){e.preventDefault()}}}}),Je=Ke,Xe=K;function Ze(){var e=[],t={requestAnimationFrame:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){var e=requestAnimationFrame.apply(void 0,arguments);t.add((function(){return cancelAnimationFrame(e)}))})),nextFrame:function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];t.requestAnimationFrame((function(){t.requestAnimationFrame.apply(t,n)}))},setTimeout:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){var e=setTimeout.apply(void 0,arguments);t.add((function(){return clearTimeout(e)}))})),add:function(t){e.push(t)},dispose:function(){for(var t,n=u(e.splice(0));!(t=n()).done;)(0,t.value)()}};return t}function et(e){for(var t,n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];e&&o.length>0&&(t=e.classList).add.apply(t,o)}function tt(e){for(var t,n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];e&&o.length>0&&(t=e.classList).remove.apply(t,o)}function nt(e,t,n,o,r){var i,a,u=Ze(),l=void 0!==r?(i=r,a={called:!1},function(){if(!a.called)return a.called=!0,i.apply(void 0,arguments)}):function(){};return et.apply(void 0,[e].concat(t,n)),u.nextFrame((function(){tt.apply(void 0,[e].concat(n)),et.apply(void 0,[e].concat(o)),u.add(function(e,t){var n=Ze();if(!e)return n.dispose;var o=getComputedStyle(e),r=[o.transitionDuration,o.transitionDelay].map((function(e){var t=e.split(",").filter(Boolean).map((function(e){return e.includes("ms")?parseFloat(e):1e3*parseFloat(e)})).sort((function(e,t){return t-e}))[0];return void 0===t?0:t})),i=r[0];return 0!==i?n.setTimeout((function(){return t(He.Finished)}),i+r[1]):t(He.Finished),n.add((function(){return t(He.Cancelled)})),n.dispose}(e,(function(n){return tt.apply(void 0,[e].concat(o,t)),l(n)})))})),u.add((function(){return tt.apply(void 0,[e].concat(t,n,o))})),u.add((function(){return l(He.Cancelled)})),u.dispose}function ot(e){return void 0===e&&(e=""),e.split(" ").filter((function(e){return e.trim().length>1}))}!function(e){e.Finished="finished",e.Cancelled="cancelled"}(He||(He={}));var rt,it=Symbol("TransitionContext");!function(e){e.Visible="visible",e.Hidden="hidden"}(rt||(rt={}));var at=Symbol("NestingContext");function ut(e){return"children"in e?ut(e.children):e.value.filter((function(e){return e.state===rt.Visible})).length>0}function lt(e){var n=o.ref([]),r=o.ref(!1);function i(o,i){var a;void 0===i&&(i=t.Hidden);var u=n.value.findIndex((function(e){return e.id===o}));-1!==u&&(l(i,((a={})[t.Unmount]=function(){n.value.splice(u,1)},a[t.Hidden]=function(){n.value[u].state=rt.Hidden},a)),!ut(n)&&r.value&&(null==e||e()))}return o.onMounted((function(){return r.value=!0})),o.onUnmounted((function(){return r.value=!1})),{children:n,register:function(e){var o=n.value.find((function(t){return t.id===e}));return o?o.state!==rt.Visible&&(o.state=rt.Visible):n.value.push({id:e,state:rt.Visible}),function(){return i(e,t.Unmount)}},unregister:i}}var st=e.RenderStrategy,ct=o.defineComponent({props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:["beforeEnter","afterEnter","beforeLeave","afterLeave"],render:function(){return s({props:r({},i(this.$props,["appear","show","enter","enterFrom","enterTo","leave","leaveFrom","leaveTo"]),{ref:"el"}),slot:{},slots:this.$slots,attrs:this.$attrs,features:st,visible:this.state===rt.Visible,name:"TransitionChild"})},setup:function(e,n){var r=n.emit,i=o.ref(null),a=o.ref(rt.Visible),u=o.computed((function(){return e.unmount?t.Unmount:t.Hidden})),s=function(){var e=o.inject(it,null);if(null===e)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return e}(),c=s.show,d=s.appear,v=function(){var e=o.inject(at,null);if(null===e)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return e}(),f=v.register,m=v.unregister,h={value:!0},b=p(),y={value:!1},g=lt((function(){y.value||(a.value=rt.Hidden,m(b),r("afterLeave"))}));o.onMounted((function(){var e=f(b);o.onUnmounted(e)})),o.watchEffect((function(){var e;u.value===t.Hidden&&b&&(c&&a.value!==rt.Visible?a.value=rt.Visible:l(a.value,((e={})[rt.Hidden]=function(){return m(b)},e[rt.Visible]=function(){return f(b)},e)))}));var S=ot(e.enter),O=ot(e.enterFrom),w=ot(e.enterTo),x=ot(e.leave),C=ot(e.leaveFrom),E=ot(e.leaveTo);return o.onMounted((function(){o.watchEffect((function(){if(a.value===rt.Visible){var e=N(i);if(e instanceof Comment&&""===e.data)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}}))})),o.onMounted((function(){o.watch([c,d],(function(e,t,n){!function(e){var t=h.value&&!d.value,n=N(i);n&&n instanceof HTMLElement&&(t||(y.value=!0,c.value&&r("beforeEnter"),c.value||r("beforeLeave"),e(c.value?nt(n,S,O,w,(function(e){y.value=!1,e===He.Finished&&r("afterEnter")})):nt(n,x,C,E,(function(e){y.value=!1,e===He.Finished&&(ut(g)||(a.value=rt.Hidden,m(b),r("afterLeave")))})))))}(n),h.value=!1}),{immediate:!0})})),o.provide(at,g),q(o.computed((function(){var e;return l(a.value,((e={})[rt.Visible]=U.Open,e[rt.Hidden]=U.Closed,e))}))),{el:i,state:a}}}),dt=o.defineComponent({inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:["beforeEnter","afterEnter","beforeLeave","afterLeave"],render:function(){var e=this,t=this.$props,n=t.unmount,a=i(t,["show","appear","unmount"]),u={unmount:n};return s({props:r({},u,{as:"template"}),slot:{},slots:r({},this.$slots,{default:function(){return[o.h(ct,r({},e.$attrs,u,a),e.$slots.default)]}}),attrs:{},features:st,visible:this.state===rt.Visible,name:"Transition"})},setup:function(e){var t=H(),n=o.computed((function(){var n;return null===e.show&&null!==t?l(t.value,((n={})[U.Open]=!0,n[U.Closed]=!1,n)):e.show}));o.watchEffect((function(){if(![!0,!1].includes(n.value))throw new Error('A <Transition /> is used but it is missing a `:show="true | false"` prop.')}));var r=o.ref(n.value?rt.Visible:rt.Hidden),i=lt((function(){r.value=rt.Hidden})),a={value:!0},u={show:n,appear:o.computed((function(){return e.appear||!a.value}))};return o.onMounted((function(){o.watchEffect((function(){a.value=!1,n.value?r.value=rt.Visible:ut(i)||(r.value=rt.Hidden)}))})),o.provide(at,i),o.provide(it,u),{state:r,show:n}}});exports.Dialog=Y,exports.DialogDescription=Z,exports.DialogOverlay=J,exports.DialogTitle=X,exports.Disclosure=re,exports.DisclosureButton=ie,exports.DisclosurePanel=ae,exports.FocusTrap=ue,exports.Listbox=ve,exports.ListboxButton=me,exports.ListboxLabel=fe,exports.ListboxOption=be,exports.ListboxOptions=he,exports.Menu=we,exports.MenuButton=xe,exports.MenuItem=Ee,exports.MenuItems=Ce,exports.Popover=Ie,exports.PopoverButton=Fe,exports.PopoverGroup=je,exports.PopoverOverlay=Le,exports.PopoverPanel=Ae,exports.Portal=A,exports.PortalGroup=$,exports.RadioGroup=Ge,exports.RadioGroupDescription=_e,exports.RadioGroupLabel=We,exports.RadioGroupOption=qe,exports.Switch=Ye,exports.SwitchDescription=Xe,exports.SwitchGroup=Qe,exports.SwitchLabel=Je,exports.TransitionChild=ct,exports.TransitionRoot=dt; | ||
//# sourceMappingURL=headlessui.cjs.production.min.js.map |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],t):t((e=e||self).headlessui={},e.Vue)}(this,(function(e,t){"use strict";function n(){return(n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function o(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o<a.length;o++)t.indexOf(n=a[o])>=0||(r[n]=e[n]);return r}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function a(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return r(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function i(e,t){if(e in t){for(var n=t[e],o=arguments.length,r=new Array(o>2?o-2:0),a=2;a<o;a++)r[a-2]=arguments[a];return"function"==typeof n?n.apply(void 0,r):n}var u=new Error('Tried to handle "'+e+'" but there is no handler defined. Only defined handlers are: '+Object.keys(t).map((function(e){return'"'+e+'"'})).join(", ")+".");throw Error.captureStackTrace&&Error.captureStackTrace(u,i),u}var u,l,s;function c(e){var t,r,a=e.visible,s=void 0===a||a,c=e.features,p=void 0===c?u.None:c,f=o(e,["visible","features"]);return s||p&u.Static&&f.props.static?d(f):p&u.RenderStrategy?i(null==(t=f.props.unmount)||t?l.Unmount:l.Hidden,((r={})[l.Unmount]=function(){return null},r[l.Hidden]=function(){return d(n({},f,{props:n({},f.props,{hidden:!0,style:{display:"none"}})}))},r)):d(f)}function d(e){var n,r=e.attrs,i=e.slots,u=e.slot,l=e.name,s=function(e,t){void 0===t&&(t=[]);for(var n,o=Object.assign({},e),r=a(t);!(n=r()).done;){var i=n.value;i in o&&delete o[i]}return o}(e.props,["unmount","static"]),c=s.as,d=o(s,["as"]),p=null==i.default?void 0:i.default(u);if("template"===c){if(Object.keys(d).length>0||Object.keys(r).length>0){var f=null!=p?p:[],v=f[0],m=f.slice(1);if(null==(n=v)||"string"!=typeof n.type&&"object"!=typeof n.type&&"function"!=typeof n.type||m.length>0)throw new Error(['Passing props on "template"!',"","The current component <"+l+' /> is rendering a "template".',"However we need to passthrough the following props:",Object.keys(d).concat(Object.keys(r)).map((function(e){return" - "+e})).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".',"Render a single element as the child so that we can forward the props onto that element."].map((function(e){return" - "+e})).join("\n")].join("\n"));return t.cloneVNode(v,d)}return Array.isArray(p)&&1===p.length?p[0]:p}return t.h(c,d,p)}!function(e){e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static"}(u||(u={})),function(e){e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden"}(l||(l={})),function(e){e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab"}(s||(s={}));var p=0;function f(){return++p}var v,m,h,b,y=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map((function(e){return e+":not([tabindex='-1'])"})).join(",");function g(e){return void 0===e&&(e=document.body),null==e?[]:Array.from(e.querySelectorAll(y))}function S(e){null==e||e.focus({preventScroll:!0})}function w(e,t){var n=Array.isArray(e)?e:g(e),o=document.activeElement,r=function(){if(t&(v.First|v.Next))return h.Next;if(t&(v.Previous|v.Last))return h.Previous;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")}(),a=function(){if(t&v.First)return 0;if(t&v.Previous)return Math.max(0,n.indexOf(o))-1;if(t&v.Next)return Math.max(0,n.indexOf(o))+1;if(t&v.Last)return n.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")}(),i=t&v.NoScroll?{preventScroll:!0}:{},u=0,l=n.length,s=void 0;do{var c;if(u>=l||u+l<=0)return m.Error;var d=a+u;if(t&v.WrapAround)d=(d+l)%l;else{if(d<0)return m.Underflow;if(d>=l)return m.Overflow}null==(c=s=n[d])||c.focus(i),u+=r}while(s!==document.activeElement);return s.hasAttribute("tabindex")||s.setAttribute("tabindex","0"),m.Success}function O(e,n,o){window.addEventListener(e,n,o),t.onUnmounted((function(){return window.removeEventListener(e,n,o)}))}function x(e,t){for(var n,o=a(e);!(n=o()).done;)if(n.value.contains(t))return!0;return!1}function E(e,n,o){void 0===n&&(n=t.ref(!0)),void 0===o&&(o=t.ref({}));var r=t.ref("undefined"!=typeof window?document.activeElement:null),i=t.ref(null);function u(){if(n.value&&1===e.value.size){var t=o.value.initialFocus,u=document.activeElement;if(t){if(t===u)return}else if(x(e.value,u))return;if(r.value=u,t)S(t);else{for(var l,s=!1,c=a(e.value);!(l=c()).done;)if(w(l.value,v.First)===m.Success){s=!0;break}if(!s)throw new Error("There are no focusable elements inside the <FocusTrap />")}i.value=document.activeElement}}function l(){S(r.value),r.value=null,i.value=null}t.watchEffect(u),t.onUpdated((function(){n.value?u():l()})),t.onUnmounted(l),O("keydown",(function(t){if(n.value&&t.key===s.Tab&&document.activeElement&&1===e.value.size){t.preventDefault();for(var o,r=a(e.value);!(o=r()).done;)if(w(o.value,(t.shiftKey?v.Previous:v.Next)|v.WrapAround)===m.Success){i.value=document.activeElement;break}}})),O("focus",(function(t){if(n.value&&1===e.value.size){var o=i.value;if(o){var r=t.target;r&&r instanceof HTMLElement?x(e.value,r)?(i.value=r,S(r)):(t.preventDefault(),t.stopPropagation(),S(o)):S(i.value)}}}),!0)}!function(e){e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll"}(v||(v={})),function(e){e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow"}(m||(m={})),function(e){e[e.Previous=-1]="Previous",e[e.Next=1]="Next"}(h||(h={})),function(e){e[e.Strict=0]="Strict",e[e.Loose=1]="Loose"}(b||(b={}));var C=new Set,D=new Map;function k(e){e.setAttribute("aria-hidden","true"),e.inert=!0}function P(e){var t=D.get(e);t&&(null===t["aria-hidden"]?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",t["aria-hidden"]),e.inert=t.inert)}var T,R=Symbol("StackContext");function I(){return t.inject(R,(function(){}))}function F(e){var n=I();t.provide(R,(function(){for(var t=arguments.length,o=new Array(t),r=0;r<t;r++)o[r]=arguments[r];null==e||e.apply(void 0,o),n.apply(void 0,o)}))}!function(e){e[e.AddElement=0]="AddElement",e[e.RemoveElement=1]="RemoveElement"}(T||(T={}));var L=Symbol("ForcePortalRootContext"),A=t.defineComponent({name:"ForcePortalRoot",props:{as:{type:[Object,String],default:"template"},force:{type:Boolean,default:!1}},setup:function(e,n){var r=n.slots,a=n.attrs;return t.provide(L,e.force),function(){return c({props:o(e,["force"]),slot:{},slots:r,attrs:a,name:"ForcePortalRoot"})}}}),j=t.defineComponent({name:"Portal",props:{as:{type:[Object,String],default:"div"}},setup:function(e,o){var r=o.slots,a=o.attrs,i=t.inject(L,!1),u=t.inject($,null),l=t.ref(!0===i||null===u?function(){var e=document.getElementById("headlessui-portal-root");if(e)return e;var t=document.createElement("div");return t.setAttribute("id","headlessui-portal-root"),document.body.appendChild(t)}():u.resolveTarget());t.watchEffect((function(){i||null!==u&&(l.value=u.resolveTarget())}));var s=t.ref(null);return function(e){var n=I();t.watchEffect((function(t){var o=null==e?void 0:e.value;o&&(n(T.AddElement,o),t((function(){return n(T.RemoveElement,o)})))}))}(s),t.onUnmounted((function(){var e,t=document.getElementById("headlessui-portal-root");t&&l.value===t&&l.value.children.length<=0&&(null==(e=l.value.parentElement)||e.removeChild(l.value))})),F(),function(){return null===l.value?null:t.h(t.Teleport,{to:l.value},c({props:n({},e,{ref:s}),slot:{},attrs:a,slots:r,name:"Portal"}))}}}),$=Symbol("PortalGroupContext"),B=t.defineComponent({name:"PortalGroup",props:{as:{type:[Object,String],default:"template"},target:{type:Object,default:null}},setup:function(e,n){var r=n.attrs,a=n.slots,i=t.reactive({resolveTarget:function(){return e.target}});return t.provide($,i),function(){return c({props:o(e,["target"]),slot:{},attrs:r,slots:a,name:"PortalGroup"})}}}),M=Symbol("DescriptionContext");function K(e){var n=void 0===e?{}:e,o=n.slot,r=void 0===o?{}:o,a=n.name,i=void 0===a?"Description":a,u=n.props,l=void 0===u?{}:u,s=t.ref([]);return t.provide(M,{register:function(e){return s.value.push(e),function(){var t=s.value.indexOf(e);-1!==t&&s.value.splice(t,1)}},slot:r,name:i,props:l}),t.computed((function(){return s.value.length>0?s.value.join(" "):void 0}))}var N,U=t.defineComponent({name:"Description",props:{as:{type:[Object,String],default:"p"}},render:function(){var e=this.context,o=e.name,r=void 0===o?"Description":o,a=e.slot,i=void 0===a?{}:a,u=e.props,l=this.$props,s=n({},Object.entries(void 0===u?{}:u).reduce((function(e,n){var o;return Object.assign(e,((o={})[n[0]]=t.unref(n[1]),o))}),{}),{id:this.id});return c({props:n({},l,s),slot:i,attrs:this.$attrs,slots:this.$slots,name:r})},setup:function(){var e=function(){var e=t.inject(M,null);if(null===e)throw new Error("Missing parent");return e}(),n="headlessui-description-"+f();return t.onMounted((function(){return t.onUnmounted(e.register(n))})),{id:n,context:e}}});function V(e){var t;return null==e||null==e.value?null:null!=(t=e.value.$el)?t:e.value}!function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(N||(N={}));var G=Symbol("DialogContext");function H(e){var n=t.inject(G,null);if(null===n){var o=new Error("<"+e+" /> is missing a parent <Dialog /> component.");throw Error.captureStackTrace&&Error.captureStackTrace(o,H),o}return n}var q,W="DC8F892D-2EBD-447C-A4C8-A03058436FF4",_=t.defineComponent({name:"Dialog",inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},open:{type:Boolean,default:W},initialFocus:{type:Object,default:null}},emits:["close"],render:function(){var e=this,r=n({},this.$attrs,{ref:"el",id:this.id,role:"dialog","aria-modal":this.dialogState===N.Open||void 0,"aria-labelledby":this.titleId,"aria-describedby":this.describedby,onClick:this.handleClick,onKeydown:this.handleKeyDown}),a=this.$props,i=a.open,l=o(a,["open","initialFocus"]),s={open:this.dialogState===N.Open};return t.h(A,{force:!0},(function(){return t.h(j,(function(){return t.h(B,{target:e.dialogRef},(function(){return t.h(A,{force:!1},(function(){return c({props:n({},l,r),slot:s,attrs:e.$attrs,slots:e.$slots,visible:i,features:u.RenderStrategy|u.Static,name:"Dialog"})}))}))}))}))},setup:function(e,n){var o=n.emit,r=t.ref(new Set);if(e.open===W)throw new Error("You forgot to provide an `open` prop to the `Dialog`.");if("boolean"!=typeof e.open)throw new Error("You provided an `open` prop to the `Dialog`, but the value is not a boolean. Received: "+(e.open===W?void 0:e.open));var u=t.computed((function(){return e.open?N.Open:N.Closed})),l=t.ref(null),c=t.ref(u.value===N.Open);t.onUpdated((function(){c.value=u.value===N.Open}));var d="headlessui-dialog-"+f(),p=t.computed((function(){return{initialFocus:e.initialFocus}}));E(r,c,p),function(e,n){void 0===n&&(n=t.ref(!0)),t.watchEffect((function(t){if(n.value&&e.value){var o=e.value;C.add(o);for(var r,i=a(D.keys());!(r=i()).done;){var u=r.value;u.contains(o)&&(P(u),D.delete(u))}document.querySelectorAll("body > *").forEach((function(e){if(e instanceof HTMLElement){for(var t,n=a(C);!(t=n()).done;)if(e.contains(t.value))return;1===C.size&&(D.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),k(e))}})),t((function(){if(C.delete(o),C.size>0)document.querySelectorAll("body > *").forEach((function(e){if(e instanceof HTMLElement&&!D.has(e)){for(var t,n=a(C);!(t=n()).done;)if(e.contains(t.value))return;D.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),k(e)}}));else for(var e,t=a(D.keys());!(e=t()).done;){var n=e.value;P(n),D.delete(n)}}))}}))}(l,c),F((function(e,t){var n;return i(e,((n={})[T.AddElement]=function(){r.value.add(t)},n[T.RemoveElement]=function(){r.value.delete(t)},n))}));var v=K({name:"DialogDescription",slot:{open:e.open}}),m=t.ref(null),h={titleId:m,dialogState:u,setTitleId:function(e){m.value!==e&&(m.value=e)},close:function(){o("close",!1)}};return t.provide(G,h),O("mousedown",(function(e){var n=e.target;u.value===N.Open&&1===r.value.size&&(x(r.value,n)||(h.close(),t.nextTick((function(){return null==n?void 0:n.focus()}))))})),t.watchEffect((function(e){if(u.value===N.Open){var t=document.documentElement.style.overflow,n=document.documentElement.style.paddingRight,o=window.innerWidth-document.documentElement.clientWidth;document.documentElement.style.overflow="hidden",document.documentElement.style.paddingRight=o+"px",e((function(){document.documentElement.style.overflow=t,document.documentElement.style.paddingRight=n}))}})),t.watchEffect((function(e){if(u.value===N.Open){var t=V(l);if(t){var n=new IntersectionObserver((function(e){for(var t,n=a(e);!(t=n()).done;){var o=t.value;0===o.boundingClientRect.x&&0===o.boundingClientRect.y&&0===o.boundingClientRect.width&&0===o.boundingClientRect.height&&h.close()}}));n.observe(t),e((function(){return n.disconnect()}))}}})),{id:d,el:l,dialogRef:l,containers:r,dialogState:u,titleId:m,describedby:v,handleClick:function(e){e.preventDefault(),e.stopPropagation()},handleKeyDown:function(e){e.key===s.Escape&&u.value===N.Open&&(r.value.size>1||(e.preventDefault(),e.stopPropagation(),h.close()))}}}}),z=t.defineComponent({name:"DialogOverlay",props:{as:{type:[Object,String],default:"div"}},render:function(){var e=H("DialogOverlay");return c({props:n({},this.$props,{ref:"el",id:this.id,"aria-hidden":!0,onClick:this.handleClick}),slot:{open:e.dialogState.value===N.Open},attrs:this.$attrs,slots:this.$slots,name:"DialogOverlay"})},setup:function(){var e=H("DialogOverlay");return{id:"headlessui-dialog-overlay-"+f(),handleClick:function(t){t.preventDefault(),t.stopPropagation(),e.close()}}}}),Q=t.defineComponent({name:"DialogTitle",props:{as:{type:[Object,String],default:"h2"}},render:function(){var e=H("DialogTitle");return c({props:n({},this.$props,{id:this.id}),slot:{open:e.dialogState.value===N.Open},attrs:this.$attrs,slots:this.$slots,name:"DialogTitle"})},setup:function(){var e=H("DialogTitle"),n="headlessui-dialog-title-"+f();return t.onMounted((function(){e.setTitleId(n),t.onUnmounted((function(){return e.setTitleId(null)}))})),{id:n}}}),Y=U;!function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(q||(q={}));var J=Symbol("DisclosureContext");function X(e){var n=t.inject(J,null);if(null===n){var o=new Error("<"+e+" /> is missing a parent <Disclosure /> component.");throw Error.captureStackTrace&&Error.captureStackTrace(o,X),o}return n}var Z,ee,te=t.defineComponent({name:"Disclosure",props:{as:{type:[Object,String],default:"template"},defaultOpen:{type:[Boolean],default:!1}},setup:function(e,n){var r=n.slots,a=n.attrs,u=t.ref(e.defaultOpen?q.Open:q.Closed),l=t.ref(null);return t.provide(J,{disclosureState:u,panelRef:l,toggleDisclosure:function(){var e;u.value=i(u.value,((e={})[q.Open]=q.Closed,e[q.Closed]=q.Open,e))}}),function(){return c({props:o(e,["defaultOpen"]),slot:{open:u.value===q.Open},slots:r,attrs:a,name:"Disclosure"})}}}),ne=t.defineComponent({name:"DisclosureButton",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1}},render:function(){var e=X("DisclosureButton"),t={open:e.disclosureState.value===q.Open};return c({props:n({},this.$props,{id:this.id,type:"button","aria-expanded":e.disclosureState.value===q.Open||void 0,"aria-controls":this.ariaControls,onClick:this.handleClick,onKeydown:this.handleKeyDown,onKeyup:this.handleKeyUp}),slot:t,attrs:this.$attrs,slots:this.$slots,name:"DisclosureButton"})},setup:function(e){var n=X("DisclosureButton");return{id:"headlessui-disclosure-button-"+f(),ariaControls:t.computed((function(){var e,t;return null!=(e=null==(t=V(n.panelRef))?void 0:t.id)?e:void 0})),handleClick:function(){e.disabled||n.toggleDisclosure()},handleKeyDown:function(t){if(!e.disabled)switch(t.key){case s.Space:case s.Enter:t.preventDefault(),t.stopPropagation(),n.toggleDisclosure()}},handleKeyUp:function(e){switch(e.key){case s.Space:e.preventDefault()}}}}}),oe=t.defineComponent({name:"DisclosurePanel",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0}},render:function(){var e={open:X("DisclosurePanel").disclosureState.value===q.Open};return c({props:n({},this.$props,{id:this.id,ref:"el"}),slot:e,attrs:this.$attrs,slots:this.$slots,features:u.RenderStrategy|u.Static,visible:e.open,name:"DisclosurePanel"})},setup:function(){var e=X("DisclosurePanel");return{id:"headlessui-disclosure-panel-"+f(),el:e.panelRef}}}),re=t.defineComponent({name:"FocusTrap",props:{as:{type:[Object,String],default:"div"},initialFocus:{type:Object,default:null}},render:function(){return c({props:n({},o(this.$props,["initialFocus"]),{ref:"el"}),slot:{},attrs:this.$attrs,slots:this.$slots,name:"FocusTrap"})},setup:function(e){var n=t.ref(new Set),o=t.ref(null),r=t.ref(!0),a=t.computed((function(){return{initialFocus:e.initialFocus}}));return t.onMounted((function(){o.value&&(n.value.add(o.value),E(n,r,a))})),t.onUnmounted((function(){r.value=!1})),{el:o}}});function ae(e,t){var n=t.resolveItems();if(n.length<=0)return null;var o=t.resolveActiveIndex(),r=null!=o?o:-1,a=function(){switch(e.focus){case Z.First:return n.findIndex((function(e){return!t.resolveDisabled(e)}));case Z.Previous:var o=n.slice().reverse().findIndex((function(e,n,o){return!(-1!==r&&o.length-n-1>=r||t.resolveDisabled(e))}));return-1===o?o:n.length-1-o;case Z.Next:return n.findIndex((function(e,n){return!(n<=r||t.resolveDisabled(e))}));case Z.Last:var a=n.slice().reverse().findIndex((function(e){return!t.resolveDisabled(e)}));return-1===a?a:n.length-1-a;case Z.Specific:return n.findIndex((function(n){return t.resolveId(n)===e.id}));case Z.Nothing:return null;default:!function(e){throw new Error("Unexpected object: "+e)}(e)}}();return-1===a?o:a}function ie(e,t){if(void 0!==e)return"function"==typeof e?e(t):e}!function(e){e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing"}(Z||(Z={})),function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(ee||(ee={}));var ue=Symbol("ListboxContext");function le(e){var n=t.inject(ue,null);if(null===n){var o=new Error("<"+e+" /> is missing a parent <Listbox /> component.");throw Error.captureStackTrace&&Error.captureStackTrace(o,le),o}return n}var se,ce=t.defineComponent({name:"Listbox",emits:["update:modelValue"],props:{as:{type:[Object,String],default:"template"},disabled:{type:[Boolean],default:!1},modelValue:{type:[Object,String,Number,Boolean],default:null}},setup:function(e,n){var r=n.slots,a=n.attrs,i=n.emit,u=e.disabled,l=o(e,["modelValue","disabled"]),s=t.ref(ee.Closed),d=t.ref(null),p=t.ref(null),f=t.ref(null),v=t.ref([]),m=t.ref(""),h=t.ref(null),b=t.computed((function(){return e.modelValue})),y={listboxState:s,value:b,labelRef:d,buttonRef:p,optionsRef:f,disabled:u,options:v,searchQuery:m,activeOptionIndex:h,closeListbox:function(){u||s.value!==ee.Closed&&(s.value=ee.Closed,h.value=null)},openListbox:function(){u||s.value!==ee.Open&&(s.value=ee.Open)},goToOption:function(e,t){if(!u&&s.value!==ee.Closed){var n=ae(e===Z.Specific?{focus:Z.Specific,id:t}:{focus:e},{resolveItems:function(){return v.value},resolveActiveIndex:function(){return h.value},resolveId:function(e){return e.id},resolveDisabled:function(e){return e.dataRef.disabled}});""===m.value&&h.value===n||(m.value="",h.value=n)}},search:function(e){if(!u&&s.value!==ee.Closed){m.value+=e.toLowerCase();var t=v.value.findIndex((function(e){return!e.dataRef.disabled&&e.dataRef.textValue.startsWith(m.value)}));-1!==t&&t!==h.value&&(h.value=t)}},clearSearch:function(){u||s.value!==ee.Closed&&""!==m.value&&(m.value="")},registerOption:function(e,t){v.value.push({id:e,dataRef:t})},unregisterOption:function(e){var t=v.value.slice(),n=null!==h.value?t[h.value]:null,o=t.findIndex((function(t){return t.id===e}));-1!==o&&t.splice(o,1),v.value=t,h.value=o===h.value||null===n?null:t.indexOf(n)},select:function(e){u||i("update:modelValue",e)}};return O("mousedown",(function(e){var t,n,o,r=e.target,a=document.activeElement;s.value===ee.Open&&((null==(t=V(p))?void 0:t.contains(r))||((null==(n=V(f))?void 0:n.contains(r))||y.closeListbox(),a!==document.body&&(null==a?void 0:a.contains(r))||e.defaultPrevented||null==(o=V(p))||o.focus({preventScroll:!0})))})),t.provide(ue,y),function(){return c({props:l,slot:{open:s.value===ee.Open,disabled:u},slots:r,attrs:a,name:"Listbox"})}}}),de=t.defineComponent({name:"ListboxLabel",props:{as:{type:[Object,String],default:"label"}},render:function(){var e=le("ListboxLabel"),t={open:e.listboxState.value===ee.Open,disabled:e.disabled};return c({props:n({},this.$props,{id:this.id,ref:"el",onClick:this.handleClick}),slot:t,attrs:this.$attrs,slots:this.$slots,name:"ListboxLabel"})},setup:function(){var e=le("ListboxLabel");return{id:"headlessui-listbox-label-"+f(),el:e.labelRef,handleClick:function(){var t;null==(t=V(e.buttonRef))||t.focus({preventScroll:!0})}}}}),pe=t.defineComponent({name:"ListboxButton",props:{as:{type:[Object,String],default:"button"}},render:function(){var e,t,o=le("ListboxButton"),r={open:o.listboxState.value===ee.Open,disabled:o.disabled},a={ref:"el",id:this.id,type:"button","aria-haspopup":!0,"aria-controls":null==(e=V(o.optionsRef))?void 0:e.id,"aria-expanded":o.listboxState.value===ee.Open||void 0,"aria-labelledby":o.labelRef.value?[null==(t=V(o.labelRef))?void 0:t.id,this.id].join(" "):void 0,disabled:o.disabled,onKeydown:this.handleKeyDown,onKeyup:this.handleKeyUp,onClick:this.handleClick};return c({props:n({},this.$props,a),slot:r,attrs:this.$attrs,slots:this.$slots,name:"ListboxButton"})},setup:function(){var e=le("ListboxButton");return{id:"headlessui-listbox-button-"+f(),el:e.buttonRef,handleKeyDown:function(n){switch(n.key){case s.Space:case s.Enter:case s.ArrowDown:n.preventDefault(),e.openListbox(),t.nextTick((function(){var t;null==(t=V(e.optionsRef))||t.focus({preventScroll:!0}),e.value.value||e.goToOption(Z.First)}));break;case s.ArrowUp:n.preventDefault(),e.openListbox(),t.nextTick((function(){var t;null==(t=V(e.optionsRef))||t.focus({preventScroll:!0}),e.value.value||e.goToOption(Z.Last)}))}},handleKeyUp:function(e){switch(e.key){case s.Space:e.preventDefault()}},handleClick:function(n){var o;e.disabled||(e.listboxState.value===ee.Open?(e.closeListbox(),t.nextTick((function(){var t;return null==(t=V(e.buttonRef))?void 0:t.focus({preventScroll:!0})}))):(n.preventDefault(),e.openListbox(),o=function(){var t;return null==(t=V(e.optionsRef))?void 0:t.focus({preventScroll:!0})},requestAnimationFrame((function(){return requestAnimationFrame(o)}))))}}}}),fe=t.defineComponent({name:"ListboxOptions",props:{as:{type:[Object,String],default:"ul"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0}},render:function(){var e,t,o,r,a=le("ListboxOptions"),i={open:a.listboxState.value===ee.Open},l={"aria-activedescendant":null===a.activeOptionIndex.value||null==(e=a.options.value[a.activeOptionIndex.value])?void 0:e.id,"aria-labelledby":null!=(t=null==(o=V(a.labelRef))?void 0:o.id)?t:null==(r=V(a.buttonRef))?void 0:r.id,id:this.id,onKeydown:this.handleKeyDown,role:"listbox",tabIndex:0,ref:"el"};return c({props:n({},this.$props,l),slot:i,attrs:this.$attrs,slots:this.$slots,features:u.RenderStrategy|u.Static,visible:i.open,name:"ListboxOptions"})},setup:function(){var e=le("ListboxOptions"),n="headlessui-listbox-options-"+f(),o=t.ref(null);return{id:n,el:e.optionsRef,handleKeyDown:function(n){switch(o.value&&clearTimeout(o.value),n.key){case s.Space:if(""!==e.searchQuery.value)return n.preventDefault(),n.stopPropagation(),e.search(n.key);case s.Enter:n.preventDefault(),n.stopPropagation(),null!==e.activeOptionIndex.value&&e.select(e.options.value[e.activeOptionIndex.value].dataRef.value),e.closeListbox(),t.nextTick((function(){var t;return null==(t=V(e.buttonRef))?void 0:t.focus({preventScroll:!0})}));break;case s.ArrowDown:return n.preventDefault(),n.stopPropagation(),e.goToOption(Z.Next);case s.ArrowUp:return n.preventDefault(),n.stopPropagation(),e.goToOption(Z.Previous);case s.Home:case s.PageUp:return n.preventDefault(),n.stopPropagation(),e.goToOption(Z.First);case s.End:case s.PageDown:return n.preventDefault(),n.stopPropagation(),e.goToOption(Z.Last);case s.Escape:n.preventDefault(),n.stopPropagation(),e.closeListbox(),t.nextTick((function(){var t;return null==(t=V(e.buttonRef))?void 0:t.focus({preventScroll:!0})}));break;case s.Tab:n.preventDefault(),n.stopPropagation();break;default:1===n.key.length&&(e.search(n.key),o.value=setTimeout((function(){return e.clearSearch()}),350))}}}}}),ve=t.defineComponent({name:"ListboxOption",props:{as:{type:[Object,String],default:"li"},value:{type:[Object,String],default:null},disabled:{type:Boolean,default:!1},class:{type:[String,Function],required:!1},className:{type:[String,Function],required:!1}},setup:function(e,o){var r=o.slots,a=o.attrs,i=le("ListboxOption"),u="headlessui-listbox-option-"+f(),l=e.disabled,s=e.className,d=void 0===s?e.class:s,p=e.value,v=t.computed((function(){return null!==i.activeOptionIndex.value&&i.options.value[i.activeOptionIndex.value].id===u})),m=t.computed((function(){return t.toRaw(i.value.value)===t.toRaw(p)})),h=t.ref({disabled:l,value:p,textValue:""});function b(e){if(l)return e.preventDefault();i.select(p),i.closeListbox(),t.nextTick((function(){var e;return null==(e=V(i.buttonRef))?void 0:e.focus({preventScroll:!0})}))}function y(){if(l)return i.goToOption(Z.Nothing);i.goToOption(Z.Specific,u)}function g(){l||v.value||i.goToOption(Z.Specific,u)}function S(){l||v.value&&i.goToOption(Z.Nothing)}return t.onMounted((function(){var e,t,n=null==(e=document.getElementById(u))||null==(t=e.textContent)?void 0:t.toLowerCase().trim();void 0!==n&&(h.value.textValue=n)})),t.onMounted((function(){return i.registerOption(u,h)})),t.onUnmounted((function(){return i.unregisterOption(u)})),t.onMounted((function(){t.watch([i.listboxState,m],(function(){var e;i.listboxState.value===ee.Open&&m.value&&(i.goToOption(Z.Specific,u),null==(e=document.getElementById(u))||null==e.focus||e.focus())}),{immediate:!0})})),t.watchEffect((function(){i.listboxState.value===ee.Open&&v.value&&t.nextTick((function(){var e;return null==(e=document.getElementById(u))||null==e.scrollIntoView?void 0:e.scrollIntoView({block:"nearest"})}))})),function(){var t={active:v.value,selected:m.value,disabled:l},o={id:u,role:"option",tabIndex:-1,class:ie(d,t),"aria-disabled":!0===l||void 0,"aria-selected":!0===m.value?m.value:void 0,onClick:b,onFocus:y,onPointermove:g,onMousemove:g,onPointerleave:S,onMouseleave:S};return c({props:n({},e,o),slot:t,attrs:a,slots:r,name:"ListboxOption"})}}});function me(e){var n=e.container,o=e.accept,r=e.walk,a=e.enabled;t.watchEffect((function(){var e=n.value;if(e&&(void 0===a||a.value))for(var t=Object.assign((function(e){return o(e)}),{acceptNode:o}),i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,t,!1);i.nextNode();)r(i.currentNode)}))}!function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(se||(se={}));var he=Symbol("MenuContext");function be(e){var n=t.inject(he,null);if(null===n){var o=new Error("<"+e+" /> is missing a parent <Menu /> component.");throw Error.captureStackTrace&&Error.captureStackTrace(o,be),o}return n}var ye,ge=t.defineComponent({name:"Menu",props:{as:{type:[Object,String],default:"template"}},setup:function(e,n){var o=n.slots,r=n.attrs,a=t.ref(se.Closed),i=t.ref(null),u=t.ref(null),l=t.ref([]),s=t.ref(""),d=t.ref(null),p={menuState:a,buttonRef:i,itemsRef:u,items:l,searchQuery:s,activeItemIndex:d,closeMenu:function(){a.value=se.Closed,d.value=null},openMenu:function(){return a.value=se.Open},goToItem:function(e,t){var n=ae(e===Z.Specific?{focus:Z.Specific,id:t}:{focus:e},{resolveItems:function(){return l.value},resolveActiveIndex:function(){return d.value},resolveId:function(e){return e.id},resolveDisabled:function(e){return e.dataRef.disabled}});""===s.value&&d.value===n||(s.value="",d.value=n)},search:function(e){s.value+=e.toLowerCase();var t=l.value.findIndex((function(e){return e.dataRef.textValue.startsWith(s.value)&&!e.dataRef.disabled}));-1!==t&&t!==d.value&&(d.value=t)},clearSearch:function(){s.value=""},registerItem:function(e,t){l.value.push({id:e,dataRef:t})},unregisterItem:function(e){var t=l.value.slice(),n=null!==d.value?t[d.value]:null,o=t.findIndex((function(t){return t.id===e}));-1!==o&&t.splice(o,1),l.value=t,d.value=o===d.value||null===n?null:t.indexOf(n)}};return O("mousedown",(function(e){var t,n,o,r=e.target,l=document.activeElement;a.value===se.Open&&((null==(t=V(i))?void 0:t.contains(r))||((null==(n=V(u))?void 0:n.contains(r))||p.closeMenu(),l!==document.body&&(null==l?void 0:l.contains(r))||e.defaultPrevented||null==(o=V(i))||o.focus({preventScroll:!0})))})),t.provide(he,p),function(){return c({props:e,slot:{open:a.value===se.Open},slots:o,attrs:r,name:"Menu"})}}}),Se=t.defineComponent({name:"MenuButton",props:{disabled:{type:Boolean,default:!1},as:{type:[Object,String],default:"button"}},render:function(){var e,t=be("MenuButton"),o={open:t.menuState.value===se.Open},r={ref:"el",id:this.id,type:"button","aria-haspopup":!0,"aria-controls":null==(e=V(t.itemsRef))?void 0:e.id,"aria-expanded":t.menuState.value===se.Open||void 0,onKeydown:this.handleKeyDown,onKeyup:this.handleKeyUp,onClick:this.handleClick};return c({props:n({},this.$props,r),slot:o,attrs:this.$attrs,slots:this.$slots,name:"MenuButton"})},setup:function(e){var n=be("MenuButton");return{id:"headlessui-menu-button-"+f(),el:n.buttonRef,handleKeyDown:function(e){switch(e.key){case s.Space:case s.Enter:case s.ArrowDown:e.preventDefault(),e.stopPropagation(),n.openMenu(),t.nextTick((function(){var e;null==(e=V(n.itemsRef))||e.focus({preventScroll:!0}),n.goToItem(Z.First)}));break;case s.ArrowUp:e.preventDefault(),e.stopPropagation(),n.openMenu(),t.nextTick((function(){var e;null==(e=V(n.itemsRef))||e.focus({preventScroll:!0}),n.goToItem(Z.Last)}))}},handleKeyUp:function(e){switch(e.key){case s.Space:e.preventDefault()}},handleClick:function(o){var r;e.disabled||(n.menuState.value===se.Open?(n.closeMenu(),t.nextTick((function(){var e;return null==(e=V(n.buttonRef))?void 0:e.focus({preventScroll:!0})}))):(o.preventDefault(),o.stopPropagation(),n.openMenu(),r=function(){var e;return null==(e=V(n.itemsRef))?void 0:e.focus({preventScroll:!0})},requestAnimationFrame((function(){return requestAnimationFrame(r)}))))}}}}),we=t.defineComponent({name:"MenuItems",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0}},render:function(){var e,t,o=be("MenuItems"),r={open:o.menuState.value===se.Open},a={"aria-activedescendant":null===o.activeItemIndex.value||null==(e=o.items.value[o.activeItemIndex.value])?void 0:e.id,"aria-labelledby":null==(t=V(o.buttonRef))?void 0:t.id,id:this.id,onKeydown:this.handleKeyDown,onKeyup:this.handleKeyUp,role:"menu",tabIndex:0,ref:"el"};return c({props:n({},this.$props,a),slot:r,attrs:this.$attrs,slots:this.$slots,features:u.RenderStrategy|u.Static,visible:r.open,name:"MenuItems"})},setup:function(){var e=be("MenuItems"),n="headlessui-menu-items-"+f(),o=t.ref(null);return me({container:t.computed((function(){return V(e.itemsRef)})),enabled:t.computed((function(){return e.menuState.value===se.Open})),accept:function(e){return"menuitem"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk:function(e){e.setAttribute("role","none")}}),{id:n,el:e.itemsRef,handleKeyDown:function(n){switch(o.value&&clearTimeout(o.value),n.key){case s.Space:if(""!==e.searchQuery.value)return n.preventDefault(),n.stopPropagation(),e.search(n.key);case s.Enter:var r;n.preventDefault(),n.stopPropagation(),null!==e.activeItemIndex.value&&(null==(r=document.getElementById(e.items.value[e.activeItemIndex.value].id))||r.click()),e.closeMenu(),t.nextTick((function(){var t;return null==(t=V(e.buttonRef))?void 0:t.focus({preventScroll:!0})}));break;case s.ArrowDown:return n.preventDefault(),n.stopPropagation(),e.goToItem(Z.Next);case s.ArrowUp:return n.preventDefault(),n.stopPropagation(),e.goToItem(Z.Previous);case s.Home:case s.PageUp:return n.preventDefault(),n.stopPropagation(),e.goToItem(Z.First);case s.End:case s.PageDown:return n.preventDefault(),n.stopPropagation(),e.goToItem(Z.Last);case s.Escape:n.preventDefault(),n.stopPropagation(),e.closeMenu(),t.nextTick((function(){var t;return null==(t=V(e.buttonRef))?void 0:t.focus({preventScroll:!0})}));break;case s.Tab:n.preventDefault(),n.stopPropagation();break;default:1===n.key.length&&(e.search(n.key),o.value=setTimeout((function(){return e.clearSearch()}),350))}},handleKeyUp:function(e){switch(e.key){case s.Space:e.preventDefault()}}}}}),Oe=t.defineComponent({name:"MenuItem",props:{as:{type:[Object,String],default:"template"},disabled:{type:Boolean,default:!1},class:{type:[String,Function],required:!1},className:{type:[String,Function],required:!1}},setup:function(e,o){var r=o.slots,a=o.attrs,i=be("MenuItem"),u="headlessui-menu-item-"+f(),l=e.disabled,s=e.className,d=void 0===s?e.class:s,p=t.computed((function(){return null!==i.activeItemIndex.value&&i.items.value[i.activeItemIndex.value].id===u})),v=t.ref({disabled:l,textValue:""});function m(e){if(l)return e.preventDefault();i.closeMenu(),t.nextTick((function(){var e;return null==(e=V(i.buttonRef))?void 0:e.focus({preventScroll:!0})}))}function h(){if(l)return i.goToItem(Z.Nothing);i.goToItem(Z.Specific,u)}function b(){l||p.value||i.goToItem(Z.Specific,u)}function y(){l||p.value&&i.goToItem(Z.Nothing)}return t.onMounted((function(){var e,t,n=null==(e=document.getElementById(u))||null==(t=e.textContent)?void 0:t.toLowerCase().trim();void 0!==n&&(v.value.textValue=n)})),t.onMounted((function(){return i.registerItem(u,v)})),t.onUnmounted((function(){return i.unregisterItem(u)})),t.watchEffect((function(){i.menuState.value===se.Open&&p.value&&t.nextTick((function(){var e;return null==(e=document.getElementById(u))||null==e.scrollIntoView?void 0:e.scrollIntoView({block:"nearest"})}))})),function(){var t={active:p.value,disabled:l},o={id:u,role:"menuitem",tabIndex:-1,class:ie(d,t),"aria-disabled":!0===l||void 0,onClick:m,onFocus:h,onPointermove:b,onMousemove:b,onPointerleave:y,onMouseleave:y};return c({props:n({},e,o),slot:t,attrs:a,slots:r,name:"MenuItem"})}}});!function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(ye||(ye={}));var xe=Symbol("PopoverContext");function Ee(e){var n=t.inject(xe,null);if(null===n){var o=new Error("<"+e+" /> is missing a parent <"+Pe.name+" /> component.");throw Error.captureStackTrace&&Error.captureStackTrace(o,Ee),o}return n}var Ce=Symbol("PopoverGroupContext");function De(){return t.inject(Ce,null)}var ke=Symbol("PopoverPanelContext"),Pe=t.defineComponent({name:"Popover",props:{as:{type:[Object,String],default:"div"}},setup:function(e,o){var r=o.slots,a=o.attrs,u=n({},e),l="headlessui-popover-button-"+f(),s="headlessui-popover-panel-"+f(),d=t.ref(ye.Closed),p=t.ref(null),v=t.ref(null),m={popoverState:d,buttonId:l,panelId:s,panel:v,button:p,togglePopover:function(){var e;d.value=i(d.value,((e={})[ye.Open]=ye.Closed,e[ye.Closed]=ye.Open,e))},closePopover:function(){d.value!==ye.Closed&&(d.value=ye.Closed)}};t.provide(xe,m);var h={buttonId:l,panelId:s,close:function(){m.closePopover()}},g=De(),S=null==g?void 0:g.registerPopover;return t.watchEffect((function(){return null==S?void 0:S(h)})),O("focus",(function(){var e,t,n;d.value===ye.Open&&((null!=(e=null==g?void 0:g.isFocusWithinPopoverGroup())?e:(null==(t=V(p))?void 0:t.contains(document.activeElement))||(null==(n=V(v))?void 0:n.contains(document.activeElement)))||p&&v&&m.closePopover())}),!0),O("mousedown",(function(e){var t,n,o,r,a,u,l=e.target;d.value===ye.Open&&((null==(t=V(p))?void 0:t.contains(l))||(null==(n=V(v))?void 0:n.contains(l))||(m.closePopover(),void 0===(a=b.Loose)&&(a=b.Strict),(r=l)!==document.body&&i(a,((u={})[b.Strict]=function(){return r.matches(y)},u[b.Loose]=function(){for(var e=r;null!==e;){if(e.matches(y))return!0;e=e.parentElement}return!1},u))||(e.preventDefault(),null==(o=V(p))||o.focus())))})),function(){return c({props:u,slot:{open:d.value===ye.Open},slots:r,attrs:a,name:"Popover"})}}}),Te=t.defineComponent({name:"PopoverButton",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1}},render:function(){var e=Ee("PopoverButton"),t={open:e.popoverState.value===ye.Open},o=this.isWithinPanel?{type:"button",onKeydown:this.handleKeyDown,onClick:this.handleClick}:{ref:"el",id:e.buttonId,type:"button","aria-expanded":e.popoverState.value===ye.Open||void 0,"aria-controls":V(e.panel)?e.panelId:void 0,onKeydown:this.handleKeyDown,onKeyup:this.handleKeyUp,onClick:this.handleClick};return c({props:n({},this.$props,o),slot:t,attrs:this.$attrs,slots:this.$slots,name:"PopoverButton"})},setup:function(e){var n=Ee("PopoverButton"),o=De(),r=null==o?void 0:o.closeOthers,a=t.inject(ke,null),i=null!==a&&a===n.panelId,u=t.ref(null),l=t.ref("undefined"==typeof window?null:document.activeElement);return O("focus",(function(){l.value=u.value,u.value=document.activeElement}),!0),{isWithinPanel:i,el:i?null:n.button,handleKeyDown:function(e){var t,o;if(i){if(n.popoverState.value===ye.Closed)return;switch(e.key){case s.Space:case s.Enter:e.preventDefault(),e.stopPropagation(),n.closePopover(),null==(t=V(n.button))||t.focus()}}else switch(e.key){case s.Space:case s.Enter:e.preventDefault(),e.stopPropagation(),n.popoverState.value===ye.Closed&&(null==r||r(n.buttonId)),n.togglePopover();break;case s.Escape:if(n.popoverState.value!==ye.Open)return null==r?void 0:r(n.buttonId);if(!V(n.button))return;if(!(null==(o=V(n.button))?void 0:o.contains(document.activeElement)))return;n.closePopover();break;case s.Tab:if(n.popoverState.value!==ye.Open)return;if(!n.panel)return;if(!n.button)return;if(e.shiftKey){var a,u;if(!l.value)return;if(null==(a=V(n.button))?void 0:a.contains(l.value))return;if(null==(u=V(n.panel))?void 0:u.contains(l.value))return;var c=g(),d=c.indexOf(l.value);if(c.indexOf(V(n.button))>d)return;e.preventDefault(),e.stopPropagation(),w(V(n.panel),v.Last)}else e.preventDefault(),e.stopPropagation(),w(V(n.panel),v.First)}},handleKeyUp:function(e){var t,o;if(!i&&(e.key===s.Space&&e.preventDefault(),n.popoverState.value===ye.Open&&n.panel&&n.button))switch(e.key){case s.Tab:if(!l.value)return;if(null==(t=V(n.button))?void 0:t.contains(l.value))return;if(null==(o=V(n.panel))?void 0:o.contains(l.value))return;var r=g(),a=r.indexOf(l.value);if(r.indexOf(V(n.button))>a)return;e.preventDefault(),e.stopPropagation(),w(V(n.panel),v.Last)}},handleClick:function(){var t,o;e.disabled||(i?(n.closePopover(),null==(t=V(n.button))||t.focus()):(n.popoverState.value===ye.Closed&&(null==r||r(n.buttonId)),null==(o=V(n.button))||o.focus(),n.togglePopover()))},handleFocus:function(){}}}}),Re=t.defineComponent({name:"PopoverOverlay",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0}},render:function(){var e={open:Ee("PopoverOverlay").popoverState.value===ye.Open};return c({props:n({},this.$props,{id:this.id,ref:"el","aria-hidden":!0,onClick:this.handleClick}),slot:e,attrs:this.$attrs,slots:this.$slots,features:u.RenderStrategy|u.Static,visible:e.open,name:"PopoverOverlay"})},setup:function(){var e=Ee("PopoverOverlay");return{id:"headlessui-popover-overlay-"+f(),handleClick:function(){e.closePopover()}}}}),Ie=t.defineComponent({name:"PopoverPanel",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},focus:{type:Boolean,default:!1}},render:function(){var e={open:Ee("PopoverPanel").popoverState.value===ye.Open};return c({props:n({},this.$props,{ref:"el",id:this.id,onKeydown:this.handleKeyDown}),slot:e,attrs:this.$attrs,slots:this.$slots,features:u.RenderStrategy|u.Static,visible:e.open,name:"PopoverPanel"})},setup:function(e){var n=e.focus,o=Ee("PopoverPanel");return t.provide(ke,o.panelId),t.onUnmounted((function(){o.panel.value=null})),t.watchEffect((function(){var e;if(n&&o.popoverState.value===ye.Open&&o.panel){var t=document.activeElement;(null==(e=V(o.panel))?void 0:e.contains(t))||w(V(o.panel),v.First)}})),O("keydown",(function(e){var t;if(o.popoverState.value===ye.Open&&V(o.panel)&&e.key===s.Tab&&document.activeElement&&(null==(t=V(o.panel))?void 0:t.contains(document.activeElement))){e.preventDefault();var n,r=w(V(o.panel),e.shiftKey?v.Previous:v.Next);if(r===m.Underflow)return null==(n=V(o.button))?void 0:n.focus();if(r===m.Overflow){if(!V(o.button))return;var a=g(),i=a.indexOf(V(o.button));w(a.splice(i+1).filter((function(e){var t;return!(null==(t=V(o.panel))?void 0:t.contains(e))})),v.First)===m.Error&&w(document.body,v.First)}}})),O("focus",(function(){var e;n&&o.popoverState.value===ye.Open&&V(o.panel)&&((null==(e=V(o.panel))?void 0:e.contains(document.activeElement))||o.closePopover())}),!0),{id:o.panelId,el:o.panel,handleKeyDown:function(e){var t,n;switch(e.key){case s.Escape:if(o.popoverState.value!==ye.Open)return;if(!V(o.panel))return;if(!(null==(t=V(o.panel))?void 0:t.contains(document.activeElement)))return;e.preventDefault(),o.closePopover(),null==(n=V(o.button))||n.focus()}}}}}),Fe=t.defineComponent({name:"PopoverGroup",props:{as:{type:[Object,String],default:"div"}},render:function(){return c({props:n({},this.$props,{ref:"el"}),slot:{},attrs:this.$attrs,slots:this.$slots,name:"PopoverGroup"})},setup:function(){var e=t.ref(null),n=t.ref([]);function o(e){var t=n.value.indexOf(e);-1!==t&&n.value.splice(t,1)}return t.provide(Ce,{registerPopover:function(e){return n.value.push(e),function(){o(e)}},unregisterPopover:o,isFocusWithinPopoverGroup:function(){var t,o=document.activeElement;return!!(null==(t=V(e))?void 0:t.contains(o))||n.value.some((function(e){var t,n;return(null==(t=document.getElementById(e.buttonId))?void 0:t.contains(o))||(null==(n=document.getElementById(e.panelId))?void 0:n.contains(o))}))},closeOthers:function(e){for(var t,o=a(n.value);!(t=o()).done;){var r=t.value;r.buttonId!==e&&r.close()}}}),{el:e}}}),Le=Symbol("LabelContext");function Ae(){var e=t.inject(Le,null);if(null===e){var n=new Error("You used a <Label /> component, but it is not inside a parent.");throw Error.captureStackTrace&&Error.captureStackTrace(n,Ae),n}return e}function je(e){var n=void 0===e?{}:e,o=n.slot,r=void 0===o?{}:o,a=n.name,i=void 0===a?"Label":a,u=n.props,l=void 0===u?{}:u,s=t.ref([]);return t.provide(Le,{register:function(e){return s.value.push(e),function(){var t=s.value.indexOf(e);-1!==t&&s.value.splice(t,1)}},slot:r,name:i,props:l}),t.computed((function(){return s.value.length>0?s.value.join(" "):void 0}))}var $e=t.defineComponent({name:"Label",props:{as:{type:[Object,String],default:"label"},passive:{type:[Boolean],default:!1}},render:function(){var e=this.context,r=e.name,a=void 0===r?"Label":r,i=e.slot,u=void 0===i?{}:i,l=e.props,s=void 0===l?{}:l,d=this.$props,p=d.passive,f=o(d,["passive"]),v=n({},Object.entries(s).reduce((function(e,n){var o;return Object.assign(e,((o={})[n[0]]=t.unref(n[1]),o))}),{}),{id:this.id}),m=n({},f,v);return p&&delete m.onClick,c({props:m,slot:u,attrs:this.$attrs,slots:this.$slots,name:a})},setup:function(){var e=Ae(),n="headlessui-label-"+f();return t.onMounted((function(){return t.onUnmounted(e.register(n))})),{id:n,context:e}}}),Be=Symbol("RadioGroupContext");function Me(e){var n=t.inject(Be,null);if(null===n){var o=new Error("<"+e+" /> is missing a parent <RadioGroup /> component.");throw Error.captureStackTrace&&Error.captureStackTrace(o,Me),o}return n}var Ke,Ne=t.defineComponent({name:"RadioGroup",emits:["update:modelValue"],props:{as:{type:[Object,String],default:"div"},disabled:{type:[Boolean],default:!1},modelValue:{type:[Object,String,Number,Boolean]}},render:function(){return c({props:n({},o(this.$props,["modelValue","disabled"]),{ref:"el",id:this.id,role:"radiogroup","aria-labelledby":this.labelledby,"aria-describedby":this.describedby,onKeydown:this.handleKeyDown}),slot:{},attrs:this.$attrs,slots:this.$slots,name:"RadioGroup"})},setup:function(e,n){var o=n.emit,r=t.ref(null),a=t.ref([]),i=je({name:"RadioGroupLabel"}),u=K({name:"RadioGroupDescription"}),l=t.computed((function(){return e.modelValue})),c={options:a,value:l,disabled:t.computed((function(){return e.disabled})),firstOption:t.computed((function(){return a.value.find((function(e){return!e.propsRef.disabled}))})),containsCheckedOption:t.computed((function(){return a.value.some((function(n){return t.toRaw(n.propsRef.value)===t.toRaw(e.modelValue)}))})),change:function(n){var r;if(e.disabled)return!1;if(l.value===n)return!1;var i=null==(r=a.value.find((function(e){return t.toRaw(e.propsRef.value)===t.toRaw(n)})))?void 0:r.propsRef;return!(null==i?void 0:i.disabled)&&(o("update:modelValue",n),!0)},registerOption:function(e){var t,n=Array.from(null==(t=r.value)?void 0:t.querySelectorAll('[id^="headlessui-radiogroup-option-"]')).reduce((function(e,t,n){var o;return Object.assign(e,((o={})[t.id]=n,o))}),{});a.value.push(e),a.value.sort((function(e,t){return n[e.id]-n[t.id]}))},unregisterOption:function(e){var t=a.value.findIndex((function(t){return t.id===e}));-1!==t&&a.value.splice(t,1)}};return t.provide(Be,c),me({container:t.computed((function(){return V(r)})),accept:function(e){return"radio"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk:function(e){e.setAttribute("role","none")}}),{id:"headlessui-radiogroup-"+f(),labelledby:i,describedby:u,el:r,handleKeyDown:function(e){if(r.value&&r.value.contains(e.target)){var t=a.value.filter((function(e){return!1===e.propsRef.disabled})).map((function(e){return e.element}));switch(e.key){case s.ArrowLeft:case s.ArrowUp:if(e.preventDefault(),e.stopPropagation(),w(t,v.Previous|v.WrapAround)===m.Success){var n=a.value.find((function(e){return e.element===document.activeElement}));n&&c.change(n.propsRef.value)}break;case s.ArrowRight:case s.ArrowDown:if(e.preventDefault(),e.stopPropagation(),w(t,v.Next|v.WrapAround)===m.Success){var o=a.value.find((function(e){return e.element===document.activeElement}));o&&c.change(o.propsRef.value)}break;case s.Space:e.preventDefault(),e.stopPropagation();var i=a.value.find((function(e){return e.element===document.activeElement}));i&&c.change(i.propsRef.value)}}}}}});!function(e){e[e.Empty=1]="Empty",e[e.Active=2]="Active"}(Ke||(Ke={}));var Ue,Ve=t.defineComponent({name:"RadioGroupOption",props:{as:{type:[Object,String],default:"div"},value:{type:[Object,String,Number,Boolean]},disabled:{type:Boolean,default:!1},class:{type:[String,Function],required:!1},className:{type:[String,Function],required:!1}},render:function(){var e=this.$props,t=e.className,r=void 0===t?e.class:t,a=o(e,["value","disabled","class","className"]),i={checked:this.checked,disabled:this.disabled,active:Boolean(this.state&Ke.Active)};return c({props:n({},a,{id:this.id,ref:"el",role:"radio",class:ie(r,i),"aria-checked":this.checked?"true":"false","aria-labelledby":this.labelledby,"aria-describedby":this.describedby,tabIndex:this.tabIndex,onClick:this.disabled?void 0:this.handleClick,onFocus:this.disabled?void 0:this.handleFocus,onBlur:this.disabled?void 0:this.handleBlur}),slot:i,attrs:this.$attrs,slots:this.$slots,name:"RadioGroupOption"})},setup:function(e){var n=Me("RadioGroupOption"),o="headlessui-radiogroup-option-"+f(),r=je({name:"RadioGroupLabel"}),a=K({name:"RadioGroupDescription"}),i=t.ref(null),u=t.computed((function(){return{value:e.value,disabled:e.disabled}})),l=t.ref(Ke.Empty);t.onMounted((function(){return n.registerOption({id:o,element:i,propsRef:u})})),t.onUnmounted((function(){return n.unregisterOption(o)}));var s=t.computed((function(){var e;return(null==(e=n.firstOption.value)?void 0:e.id)===o})),c=t.computed((function(){return n.disabled.value||e.disabled})),d=t.computed((function(){return t.toRaw(n.value.value)===t.toRaw(e.value)}));return{id:o,el:i,labelledby:r,describedby:a,state:l,disabled:c,checked:d,tabIndex:t.computed((function(){return c.value?-1:d.value||!n.containsCheckedOption.value&&s.value?0:-1})),handleClick:function(){var t;n.change(e.value)&&(l.value|=Ke.Active,null==(t=i.value)||t.focus())},handleFocus:function(){l.value|=Ke.Active},handleBlur:function(){l.value&=~Ke.Active}}}}),Ge=$e,He=U,qe=Symbol("GroupContext"),We=t.defineComponent({name:"SwitchGroup",props:{as:{type:[Object,String],default:"template"}},setup:function(e,n){var o=n.slots,r=n.attrs,a=t.ref(null),i=je({name:"SwitchLabel",props:{onClick:function(){a.value&&(a.value.click(),a.value.focus({preventScroll:!0}))}}}),u=K({name:"SwitchDescription"});return t.provide(qe,{switchRef:a,labelledby:i,describedby:u}),function(){return c({props:e,slot:{},slots:o,attrs:r,name:"SwitchGroup"})}}}),_e=t.defineComponent({name:"Switch",emits:["update:modelValue"],props:{as:{type:[Object,String],default:"button"},modelValue:{type:[Object,Boolean],default:null},class:{type:[String,Function],required:!1},className:{type:[String,Function],required:!1}},render:function(){var e=t.inject(qe,null),o=this.$props,r=o.className,a={checked:this.$props.modelValue},i={id:this.id,ref:null===e?void 0:e.switchRef,role:"switch",tabIndex:0,class:ie(void 0===r?o.class:r,a),"aria-checked":this.$props.modelValue,"aria-labelledby":this.labelledby,"aria-describedby":this.describedby,onClick:this.handleClick,onKeyup:this.handleKeyUp,onKeypress:this.handleKeyPress};return"button"===this.$props.as&&Object.assign(i,{type:"button"}),c({props:n({},this.$props,i),slot:a,attrs:this.$attrs,slots:this.$slots,name:"Switch"})},setup:function(e,n){var o=n.emit,r=t.inject(qe,null);function a(){o("update:modelValue",!e.modelValue)}return{id:"headlessui-switch-"+f(),el:null==r?void 0:r.switchRef,labelledby:null==r?void 0:r.labelledby,describedby:null==r?void 0:r.describedby,handleClick:function(e){e.preventDefault(),a()},handleKeyUp:function(e){e.key!==s.Tab&&e.preventDefault(),e.key===s.Space&&a()},handleKeyPress:function(e){e.preventDefault()}}}}),ze=$e,Qe=U;function Ye(){var e=[],t={requestAnimationFrame:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){var e=requestAnimationFrame.apply(void 0,arguments);t.add((function(){return cancelAnimationFrame(e)}))})),nextFrame:function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];t.requestAnimationFrame((function(){t.requestAnimationFrame.apply(t,n)}))},setTimeout:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){var e=setTimeout.apply(void 0,arguments);t.add((function(){return clearTimeout(e)}))})),add:function(t){e.push(t)},dispose:function(){for(var t,n=a(e.splice(0));!(t=n()).done;)(0,t.value)()}};return t}function Je(e){for(var t,n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];e&&o.length>0&&(t=e.classList).add.apply(t,o)}function Xe(e){for(var t,n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];e&&o.length>0&&(t=e.classList).remove.apply(t,o)}function Ze(e,t,n,o,r){var a,i,u=Ye(),l=void 0!==r?(a=r,i={called:!1},function(){if(!i.called)return i.called=!0,a.apply(void 0,arguments)}):function(){};return Je.apply(void 0,[e].concat(t,n)),u.nextFrame((function(){Xe.apply(void 0,[e].concat(n)),Je.apply(void 0,[e].concat(o)),u.add(function(e,t){var n=Ye();if(!e)return n.dispose;var o=getComputedStyle(e),r=[o.transitionDuration,o.transitionDelay].map((function(e){var t=e.split(",").filter(Boolean).map((function(e){return e.includes("ms")?parseFloat(e):1e3*parseFloat(e)})).sort((function(e,t){return t-e}))[0];return void 0===t?0:t})),a=r[0];return 0!==a?n.setTimeout((function(){return t(Ue.Finished)}),a+r[1]):t(Ue.Finished),n.add((function(){return t(Ue.Cancelled)})),n.dispose}(e,(function(n){return Xe.apply(void 0,[e].concat(o,t)),l(n)})))})),u.add((function(){return Xe.apply(void 0,[e].concat(t,n,o))})),u.add((function(){return l(Ue.Cancelled)})),u.dispose}function et(e){return void 0===e&&(e=""),e.split(" ").filter((function(e){return e.trim().length>1}))}!function(e){e.Finished="finished",e.Cancelled="cancelled"}(Ue||(Ue={}));var tt,nt=Symbol("TransitionContext");!function(e){e.Visible="visible",e.Hidden="hidden"}(tt||(tt={}));var ot=Symbol("NestingContext");function rt(e){return"children"in e?rt(e.children):e.value.filter((function(e){return e.state===tt.Visible})).length>0}function at(e){var n=t.ref([]),o=t.ref(!1);function r(t,r){var a;void 0===r&&(r=l.Hidden);var u=n.value.findIndex((function(e){return e.id===t}));-1!==u&&(i(r,((a={})[l.Unmount]=function(){n.value.splice(u,1)},a[l.Hidden]=function(){n.value[u].state=tt.Hidden},a)),!rt(n)&&o.value&&(null==e||e()))}return t.onMounted((function(){return o.value=!0})),t.onUnmounted((function(){return o.value=!1})),{children:n,register:function(e){var t=n.value.find((function(t){return t.id===e}));return t?t.state!==tt.Visible&&(t.state=tt.Visible):n.value.push({id:e,state:tt.Visible}),function(){return r(e,l.Unmount)}},unregister:r}}var it=u.RenderStrategy,ut=t.defineComponent({props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:["beforeEnter","afterEnter","beforeLeave","afterLeave"],render:function(){return c({props:n({},o(this.$props,["appear","show","enter","enterFrom","enterTo","leave","leaveFrom","leaveTo"]),{ref:"el"}),slot:{},slots:this.$slots,attrs:this.$attrs,features:it,visible:this.state===tt.Visible,name:"TransitionChild"})},setup:function(e,n){var o=n.emit,r=t.ref(null),a=t.ref(tt.Visible),u=t.computed((function(){return e.unmount?l.Unmount:l.Hidden})),s=function(){var e=t.inject(nt,null);if(null===e)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return e}(),c=s.show,d=s.appear,p=function(){var e=t.inject(ot,null);if(null===e)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return e}(),v=p.register,m=p.unregister,h={value:!0},b=f(),y={value:!1},g=at((function(){y.value||(a.value=tt.Hidden,m(b),o("afterLeave"))}));t.onMounted((function(){var e=v(b);t.onUnmounted(e)})),t.watchEffect((function(){var e;u.value===l.Hidden&&b&&(c&&a.value!==tt.Visible?a.value=tt.Visible:i(a.value,((e={})[tt.Hidden]=function(){return m(b)},e[tt.Visible]=function(){return v(b)},e)))}));var S=et(e.enter),w=et(e.enterFrom),O=et(e.enterTo),x=et(e.leave),E=et(e.leaveFrom),C=et(e.leaveTo);return t.onMounted((function(){t.watchEffect((function(){if(a.value===tt.Visible){var e=V(r);if(e instanceof Comment&&""===e.data)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}}))})),t.onMounted((function(){t.watch([c,d],(function(e,t,n){!function(e){var t=h.value&&!d.value,n=V(r);n&&n instanceof HTMLElement&&(t||(y.value=!0,c.value&&o("beforeEnter"),c.value||o("beforeLeave"),e(c.value?Ze(n,S,w,O,(function(e){y.value=!1,e===Ue.Finished&&o("afterEnter")})):Ze(n,x,E,C,(function(e){y.value=!1,e===Ue.Finished&&(rt(g)||(a.value=tt.Hidden,m(b),o("afterLeave")))})))))}(n),h.value=!1}),{immediate:!0})})),t.provide(ot,g),{el:r,state:a}}}),lt=t.defineComponent({inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:["beforeEnter","afterEnter","beforeLeave","afterLeave"],render:function(){var e=this,r=this.$props,a=r.unmount,i=o(r,["show","appear","unmount"]),u={unmount:a};return c({props:n({},u,{as:"template"}),slot:{},slots:n({},this.$slots,{default:function(){return[t.h(ut,n({},e.$attrs,u,i),e.$slots.default)]}}),attrs:{},features:it,visible:this.state===tt.Visible,name:"Transition"})},setup:function(e){t.watchEffect((function(){if(![!0,!1].includes(e.show))throw new Error('A <Transition /> is used but it is missing a `:show="true | false"` prop.')}));var n=t.ref(e.show?tt.Visible:tt.Hidden),o=at((function(){n.value=tt.Hidden})),r={value:!0},a={show:t.computed((function(){return e.show})),appear:t.computed((function(){return e.appear||!r.value}))};return t.onMounted((function(){t.watchEffect((function(){r.value=!1,e.show?n.value=tt.Visible:rt(o)||(n.value=tt.Hidden)}))})),t.provide(ot,o),t.provide(nt,a),{state:n}}});e.Dialog=_,e.DialogDescription=Y,e.DialogOverlay=z,e.DialogTitle=Q,e.Disclosure=te,e.DisclosureButton=ne,e.DisclosurePanel=oe,e.FocusTrap=re,e.Listbox=ce,e.ListboxButton=pe,e.ListboxLabel=de,e.ListboxOption=ve,e.ListboxOptions=fe,e.Menu=ge,e.MenuButton=Se,e.MenuItem=Oe,e.MenuItems=we,e.Popover=Pe,e.PopoverButton=Te,e.PopoverGroup=Fe,e.PopoverOverlay=Re,e.PopoverPanel=Ie,e.Portal=j,e.PortalGroup=B,e.RadioGroup=Ne,e.RadioGroupDescription=He,e.RadioGroupLabel=Ge,e.RadioGroupOption=Ve,e.Switch=_e,e.SwitchDescription=Qe,e.SwitchGroup=We,e.SwitchLabel=ze,e.TransitionChild=ut,e.TransitionRoot=lt,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],t):t((e=e||self).headlessui={},e.Vue)}(this,(function(e,t){"use strict";function n(){return(n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function o(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)t.indexOf(n=i[o])>=0||(r[n]=e[n]);return r}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function i(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return r(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function a(e,t){if(e in t){for(var n=t[e],o=arguments.length,r=new Array(o>2?o-2:0),i=2;i<o;i++)r[i-2]=arguments[i];return"function"==typeof n?n.apply(void 0,r):n}var u=new Error('Tried to handle "'+e+'" but there is no handler defined. Only defined handlers are: '+Object.keys(t).map((function(e){return'"'+e+'"'})).join(", ")+".");throw Error.captureStackTrace&&Error.captureStackTrace(u,a),u}var u,l,s;function c(e){var t,r,i=e.visible,s=void 0===i||i,c=e.features,p=void 0===c?u.None:c,v=o(e,["visible","features"]);return s||p&u.Static&&v.props.static?d(v):p&u.RenderStrategy?a(null==(t=v.props.unmount)||t?l.Unmount:l.Hidden,((r={})[l.Unmount]=function(){return null},r[l.Hidden]=function(){return d(n({},v,{props:n({},v.props,{hidden:!0,style:{display:"none"}})}))},r)):d(v)}function d(e){var n,r=e.attrs,a=e.slots,u=e.slot,l=e.name,s=function(e,t){void 0===t&&(t=[]);for(var n,o=Object.assign({},e),r=i(t);!(n=r()).done;){var a=n.value;a in o&&delete o[a]}return o}(e.props,["unmount","static"]),c=s.as,d=o(s,["as"]),p=null==a.default?void 0:a.default(u);if("template"===c){if(Object.keys(d).length>0||Object.keys(r).length>0){var v=null!=p?p:[],f=v[0],m=v.slice(1);if(null==(n=f)||"string"!=typeof n.type&&"object"!=typeof n.type&&"function"!=typeof n.type||m.length>0)throw new Error(['Passing props on "template"!',"","The current component <"+l+' /> is rendering a "template".',"However we need to passthrough the following props:",Object.keys(d).concat(Object.keys(r)).map((function(e){return" - "+e})).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".',"Render a single element as the child so that we can forward the props onto that element."].map((function(e){return" - "+e})).join("\n")].join("\n"));return t.cloneVNode(f,d)}return Array.isArray(p)&&1===p.length?p[0]:p}return t.h(c,d,p)}!function(e){e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static"}(u||(u={})),function(e){e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden"}(l||(l={})),function(e){e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab"}(s||(s={}));var p=0;function v(){return++p}var f,m,h,b,y=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map((function(e){return e+":not([tabindex='-1'])"})).join(",");function g(e){return void 0===e&&(e=document.body),null==e?[]:Array.from(e.querySelectorAll(y))}function S(e){null==e||e.focus({preventScroll:!0})}function O(e,t){var n=Array.isArray(e)?e:g(e),o=document.activeElement,r=function(){if(t&(f.First|f.Next))return h.Next;if(t&(f.Previous|f.Last))return h.Previous;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")}(),i=function(){if(t&f.First)return 0;if(t&f.Previous)return Math.max(0,n.indexOf(o))-1;if(t&f.Next)return Math.max(0,n.indexOf(o))+1;if(t&f.Last)return n.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")}(),a=t&f.NoScroll?{preventScroll:!0}:{},u=0,l=n.length,s=void 0;do{var c;if(u>=l||u+l<=0)return m.Error;var d=i+u;if(t&f.WrapAround)d=(d+l)%l;else{if(d<0)return m.Underflow;if(d>=l)return m.Overflow}null==(c=s=n[d])||c.focus(a),u+=r}while(s!==document.activeElement);return s.hasAttribute("tabindex")||s.setAttribute("tabindex","0"),m.Success}function w(e,n,o){window.addEventListener(e,n,o),t.onUnmounted((function(){return window.removeEventListener(e,n,o)}))}function x(e,t){for(var n,o=i(e);!(n=o()).done;)if(n.value.contains(t))return!0;return!1}function C(e,n,o){void 0===n&&(n=t.ref(!0)),void 0===o&&(o=t.ref({}));var r=t.ref("undefined"!=typeof window?document.activeElement:null),a=t.ref(null);function u(){if(n.value&&1===e.value.size){var t=o.value.initialFocus,u=document.activeElement;if(t){if(t===u)return}else if(x(e.value,u))return;if(r.value=u,t)S(t);else{for(var l,s=!1,c=i(e.value);!(l=c()).done;)if(O(l.value,f.First)===m.Success){s=!0;break}if(!s)throw new Error("There are no focusable elements inside the <FocusTrap />")}a.value=document.activeElement}}function l(){S(r.value),r.value=null,a.value=null}t.watchEffect(u),t.onUpdated((function(){n.value?u():l()})),t.onUnmounted(l),w("keydown",(function(t){if(n.value&&t.key===s.Tab&&document.activeElement&&1===e.value.size){t.preventDefault();for(var o,r=i(e.value);!(o=r()).done;)if(O(o.value,(t.shiftKey?f.Previous:f.Next)|f.WrapAround)===m.Success){a.value=document.activeElement;break}}})),w("focus",(function(t){if(n.value&&1===e.value.size){var o=a.value;if(o){var r=t.target;r&&r instanceof HTMLElement?x(e.value,r)?(a.value=r,S(r)):(t.preventDefault(),t.stopPropagation(),S(o)):S(a.value)}}}),!0)}!function(e){e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll"}(f||(f={})),function(e){e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow"}(m||(m={})),function(e){e[e.Previous=-1]="Previous",e[e.Next=1]="Next"}(h||(h={})),function(e){e[e.Strict=0]="Strict",e[e.Loose=1]="Loose"}(b||(b={}));var E=new Set,D=new Map;function k(e){e.setAttribute("aria-hidden","true"),e.inert=!0}function P(e){var t=D.get(e);t&&(null===t["aria-hidden"]?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",t["aria-hidden"]),e.inert=t.inert)}var T,R=Symbol("StackContext");function I(){return t.inject(R,(function(){}))}function F(e){var n=I();t.provide(R,(function(){for(var t=arguments.length,o=new Array(t),r=0;r<t;r++)o[r]=arguments[r];null==e||e.apply(void 0,o),n.apply(void 0,o)}))}!function(e){e[e.AddElement=0]="AddElement",e[e.RemoveElement=1]="RemoveElement"}(T||(T={}));var L=Symbol("ForcePortalRootContext"),A=t.defineComponent({name:"ForcePortalRoot",props:{as:{type:[Object,String],default:"template"},force:{type:Boolean,default:!1}},setup:function(e,n){var r=n.slots,i=n.attrs;return t.provide(L,e.force),function(){return c({props:o(e,["force"]),slot:{},slots:r,attrs:i,name:"ForcePortalRoot"})}}}),j=t.defineComponent({name:"Portal",props:{as:{type:[Object,String],default:"div"}},setup:function(e,o){var r=o.slots,i=o.attrs,a=t.inject(L,!1),u=t.inject($,null),l=t.ref(!0===a||null===u?function(){var e=document.getElementById("headlessui-portal-root");if(e)return e;var t=document.createElement("div");return t.setAttribute("id","headlessui-portal-root"),document.body.appendChild(t)}():u.resolveTarget());t.watchEffect((function(){a||null!==u&&(l.value=u.resolveTarget())}));var s=t.ref(null);return function(e){var n=I();t.watchEffect((function(t){var o=null==e?void 0:e.value;o&&(n(T.AddElement,o),t((function(){return n(T.RemoveElement,o)})))}))}(s),t.onUnmounted((function(){var e,t=document.getElementById("headlessui-portal-root");t&&l.value===t&&l.value.children.length<=0&&(null==(e=l.value.parentElement)||e.removeChild(l.value))})),F(),function(){return null===l.value?null:t.h(t.Teleport,{to:l.value},c({props:n({},e,{ref:s}),slot:{},attrs:i,slots:r,name:"Portal"}))}}}),$=Symbol("PortalGroupContext"),B=t.defineComponent({name:"PortalGroup",props:{as:{type:[Object,String],default:"template"},target:{type:Object,default:null}},setup:function(e,n){var r=n.attrs,i=n.slots,a=t.reactive({resolveTarget:function(){return e.target}});return t.provide($,a),function(){return c({props:o(e,["target"]),slot:{},attrs:r,slots:i,name:"PortalGroup"})}}}),M=Symbol("DescriptionContext");function K(e){var n=void 0===e?{}:e,o=n.slot,r=void 0===o?t.ref({}):o,i=n.name,a=void 0===i?"Description":i,u=n.props,l=void 0===u?{}:u,s=t.ref([]);return t.provide(M,{register:function(e){return s.value.push(e),function(){var t=s.value.indexOf(e);-1!==t&&s.value.splice(t,1)}},slot:r,name:a,props:l}),t.computed((function(){return s.value.length>0?s.value.join(" "):void 0}))}var N=t.defineComponent({name:"Description",props:{as:{type:[Object,String],default:"p"}},render:function(){var e=this.context,o=e.name,r=void 0===o?"Description":o,i=e.slot,a=void 0===i?t.ref({}):i,u=e.props,l=this.$props,s=n({},Object.entries(void 0===u?{}:u).reduce((function(e,n){var o;return Object.assign(e,((o={})[n[0]]=t.unref(n[1]),o))}),{}),{id:this.id});return c({props:n({},l,s),slot:a.value,attrs:this.$attrs,slots:this.$slots,name:r})},setup:function(){var e=function(){var e=t.inject(M,null);if(null===e)throw new Error("Missing parent");return e}(),n="headlessui-description-"+v();return t.onMounted((function(){return t.onUnmounted(e.register(n))})),{id:n,context:e}}});function U(e){var t;return null==e||null==e.value?null:null!=(t=e.value.$el)?t:e.value}var V,G,H=Symbol("Context");function q(){return t.inject(H,null)}function W(e){t.provide(H,e)}!function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(V||(V={})),function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(G||(G={}));var _=Symbol("DialogContext");function z(e){var n=t.inject(_,null);if(null===n){var o=new Error("<"+e+" /> is missing a parent <Dialog /> component.");throw Error.captureStackTrace&&Error.captureStackTrace(o,z),o}return n}var Q,Y="DC8F892D-2EBD-447C-A4C8-A03058436FF4",J=t.defineComponent({name:"Dialog",inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},open:{type:Boolean,default:Y},initialFocus:{type:Object,default:null}},emits:["close"],render:function(){var e=this,r=n({},this.$attrs,{ref:"el",id:this.id,role:"dialog","aria-modal":this.dialogState===G.Open||void 0,"aria-labelledby":this.titleId,"aria-describedby":this.describedby,onClick:this.handleClick,onKeydown:this.handleKeyDown}),i=o(this.$props,["open","initialFocus"]),a={open:this.dialogState===G.Open};return t.h(A,{force:!0},(function(){return t.h(j,(function(){return t.h(B,{target:e.dialogRef},(function(){return t.h(A,{force:!1},(function(){return c({props:n({},i,r),slot:a,attrs:e.$attrs,slots:e.$slots,visible:e.visible,features:u.RenderStrategy|u.Static,name:"Dialog"})}))}))}))}))},setup:function(e,n){var o=n.emit,r=t.ref(new Set),u=q(),l=t.computed((function(){var t;return e.open===Y&&null!==u?a(u.value,((t={})[V.Open]=!0,t[V.Closed]=!1,t)):e.open}));if(e.open===Y&&null===u)throw new Error("You forgot to provide an `open` prop to the `Dialog`.");if("boolean"!=typeof l.value)throw new Error("You provided an `open` prop to the `Dialog`, but the value is not a boolean. Received: "+(l.value===Y?void 0:e.open));var c=t.computed((function(){return e.open?G.Open:G.Closed})),d=t.computed((function(){return null!==u?u.value===V.Open:c.value===G.Open})),p=t.ref(null),f=t.ref(c.value===G.Open);t.onUpdated((function(){f.value=c.value===G.Open}));var m="headlessui-dialog-"+v(),h=t.computed((function(){return{initialFocus:e.initialFocus}}));C(r,f,h),function(e,n){void 0===n&&(n=t.ref(!0)),t.watchEffect((function(t){if(n.value&&e.value){var o=e.value;E.add(o);for(var r,a=i(D.keys());!(r=a()).done;){var u=r.value;u.contains(o)&&(P(u),D.delete(u))}document.querySelectorAll("body > *").forEach((function(e){if(e instanceof HTMLElement){for(var t,n=i(E);!(t=n()).done;)if(e.contains(t.value))return;1===E.size&&(D.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),k(e))}})),t((function(){if(E.delete(o),E.size>0)document.querySelectorAll("body > *").forEach((function(e){if(e instanceof HTMLElement&&!D.has(e)){for(var t,n=i(E);!(t=n()).done;)if(e.contains(t.value))return;D.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),k(e)}}));else for(var e,t=i(D.keys());!(e=t()).done;){var n=e.value;P(n),D.delete(n)}}))}}))}(p,f),F((function(e,t){var n;return a(e,((n={})[T.AddElement]=function(){r.value.add(t)},n[T.RemoveElement]=function(){r.value.delete(t)},n))}));var b=K({name:"DialogDescription",slot:t.computed((function(){return{open:l.value}}))}),y=t.ref(null),g={titleId:y,dialogState:c,setTitleId:function(e){y.value!==e&&(y.value=e)},close:function(){o("close",!1)}};return t.provide(_,g),w("mousedown",(function(e){var n=e.target;c.value===G.Open&&1===r.value.size&&(x(r.value,n)||(g.close(),t.nextTick((function(){return null==n?void 0:n.focus()}))))})),t.watchEffect((function(e){if(c.value===G.Open){var t=document.documentElement.style.overflow,n=document.documentElement.style.paddingRight,o=window.innerWidth-document.documentElement.clientWidth;document.documentElement.style.overflow="hidden",document.documentElement.style.paddingRight=o+"px",e((function(){document.documentElement.style.overflow=t,document.documentElement.style.paddingRight=n}))}})),t.watchEffect((function(e){if(c.value===G.Open){var t=U(p);if(t){var n=new IntersectionObserver((function(e){for(var t,n=i(e);!(t=n()).done;){var o=t.value;0===o.boundingClientRect.x&&0===o.boundingClientRect.y&&0===o.boundingClientRect.width&&0===o.boundingClientRect.height&&g.close()}}));n.observe(t),e((function(){return n.disconnect()}))}}})),{id:m,el:p,dialogRef:p,containers:r,dialogState:c,titleId:y,describedby:b,visible:d,open:l,handleClick:function(e){e.stopPropagation()},handleKeyDown:function(e){e.key===s.Escape&&c.value===G.Open&&(r.value.size>1||(e.preventDefault(),e.stopPropagation(),g.close()))}}}}),X=t.defineComponent({name:"DialogOverlay",props:{as:{type:[Object,String],default:"div"}},render:function(){var e=z("DialogOverlay");return c({props:n({},this.$props,{ref:"el",id:this.id,"aria-hidden":!0,onClick:this.handleClick}),slot:{open:e.dialogState.value===G.Open},attrs:this.$attrs,slots:this.$slots,name:"DialogOverlay"})},setup:function(){var e=z("DialogOverlay");return{id:"headlessui-dialog-overlay-"+v(),handleClick:function(t){t.preventDefault(),t.stopPropagation(),e.close()}}}}),Z=t.defineComponent({name:"DialogTitle",props:{as:{type:[Object,String],default:"h2"}},render:function(){var e=z("DialogTitle");return c({props:n({},this.$props,{id:this.id}),slot:{open:e.dialogState.value===G.Open},attrs:this.$attrs,slots:this.$slots,name:"DialogTitle"})},setup:function(){var e=z("DialogTitle"),n="headlessui-dialog-title-"+v();return t.onMounted((function(){e.setTitleId(n),t.onUnmounted((function(){return e.setTitleId(null)}))})),{id:n}}}),ee=N;!function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(Q||(Q={}));var te=Symbol("DisclosureContext");function ne(e){var n=t.inject(te,null);if(null===n){var o=new Error("<"+e+" /> is missing a parent <Disclosure /> component.");throw Error.captureStackTrace&&Error.captureStackTrace(o,ne),o}return n}var oe,re,ie=t.defineComponent({name:"Disclosure",props:{as:{type:[Object,String],default:"template"},defaultOpen:{type:[Boolean],default:!1}},setup:function(e,n){var r=n.slots,i=n.attrs,u=t.ref(e.defaultOpen?Q.Open:Q.Closed),l=t.ref(null);return t.provide(te,{disclosureState:u,panelRef:l,toggleDisclosure:function(){var e;u.value=a(u.value,((e={})[Q.Open]=Q.Closed,e[Q.Closed]=Q.Open,e))}}),W(t.computed((function(){var e;return a(u.value,((e={})[Q.Open]=V.Open,e[Q.Closed]=V.Closed,e))}))),function(){return c({props:o(e,["defaultOpen"]),slot:{open:u.value===Q.Open},slots:r,attrs:i,name:"Disclosure"})}}}),ae=t.defineComponent({name:"DisclosureButton",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1}},render:function(){var e=ne("DisclosureButton"),t={open:e.disclosureState.value===Q.Open};return c({props:n({},this.$props,{id:this.id,type:"button","aria-expanded":e.disclosureState.value===Q.Open||void 0,"aria-controls":this.ariaControls,onClick:this.handleClick,onKeydown:this.handleKeyDown,onKeyup:this.handleKeyUp}),slot:t,attrs:this.$attrs,slots:this.$slots,name:"DisclosureButton"})},setup:function(e){var n=ne("DisclosureButton");return{id:"headlessui-disclosure-button-"+v(),ariaControls:t.computed((function(){var e,t;return null!=(e=null==(t=U(n.panelRef))?void 0:t.id)?e:void 0})),handleClick:function(){e.disabled||n.toggleDisclosure()},handleKeyDown:function(t){if(!e.disabled)switch(t.key){case s.Space:case s.Enter:t.preventDefault(),t.stopPropagation(),n.toggleDisclosure()}},handleKeyUp:function(e){switch(e.key){case s.Space:e.preventDefault()}}}}}),ue=t.defineComponent({name:"DisclosurePanel",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0}},render:function(){var e={open:ne("DisclosurePanel").disclosureState.value===Q.Open};return c({props:n({},this.$props,{id:this.id,ref:"el"}),slot:e,attrs:this.$attrs,slots:this.$slots,features:u.RenderStrategy|u.Static,visible:this.visible,name:"DisclosurePanel"})},setup:function(){var e=ne("DisclosurePanel"),n="headlessui-disclosure-panel-"+v(),o=q(),r=t.computed((function(){return null!==o?o.value===V.Open:e.disclosureState.value===Q.Open}));return{id:n,el:e.panelRef,visible:r}}}),le=t.defineComponent({name:"FocusTrap",props:{as:{type:[Object,String],default:"div"},initialFocus:{type:Object,default:null}},render:function(){return c({props:n({},o(this.$props,["initialFocus"]),{ref:"el"}),slot:{},attrs:this.$attrs,slots:this.$slots,name:"FocusTrap"})},setup:function(e){var n=t.ref(new Set),o=t.ref(null),r=t.ref(!0),i=t.computed((function(){return{initialFocus:e.initialFocus}}));return t.onMounted((function(){o.value&&(n.value.add(o.value),C(n,r,i))})),t.onUnmounted((function(){r.value=!1})),{el:o}}});function se(e,t){var n=t.resolveItems();if(n.length<=0)return null;var o=t.resolveActiveIndex(),r=null!=o?o:-1,i=function(){switch(e.focus){case oe.First:return n.findIndex((function(e){return!t.resolveDisabled(e)}));case oe.Previous:var o=n.slice().reverse().findIndex((function(e,n,o){return!(-1!==r&&o.length-n-1>=r||t.resolveDisabled(e))}));return-1===o?o:n.length-1-o;case oe.Next:return n.findIndex((function(e,n){return!(n<=r||t.resolveDisabled(e))}));case oe.Last:var i=n.slice().reverse().findIndex((function(e){return!t.resolveDisabled(e)}));return-1===i?i:n.length-1-i;case oe.Specific:return n.findIndex((function(n){return t.resolveId(n)===e.id}));case oe.Nothing:return null;default:!function(e){throw new Error("Unexpected object: "+e)}(e)}}();return-1===i?o:i}function ce(e,t){if(void 0!==e)return"function"==typeof e?e(t):e}!function(e){e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing"}(oe||(oe={})),function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(re||(re={}));var de=Symbol("ListboxContext");function pe(e){var n=t.inject(de,null);if(null===n){var o=new Error("<"+e+" /> is missing a parent <Listbox /> component.");throw Error.captureStackTrace&&Error.captureStackTrace(o,pe),o}return n}var ve,fe=t.defineComponent({name:"Listbox",emits:["update:modelValue"],props:{as:{type:[Object,String],default:"template"},disabled:{type:[Boolean],default:!1},modelValue:{type:[Object,String,Number,Boolean]}},setup:function(e,n){var r=n.slots,i=n.attrs,u=n.emit,l=e.disabled,s=o(e,["modelValue","disabled"]),d=t.ref(re.Closed),p=t.ref(null),v=t.ref(null),f=t.ref(null),m=t.ref([]),h=t.ref(""),b=t.ref(null),y=t.computed((function(){return e.modelValue})),g={listboxState:d,value:y,labelRef:p,buttonRef:v,optionsRef:f,disabled:l,options:m,searchQuery:h,activeOptionIndex:b,closeListbox:function(){l||d.value!==re.Closed&&(d.value=re.Closed,b.value=null)},openListbox:function(){l||d.value!==re.Open&&(d.value=re.Open)},goToOption:function(e,t){if(!l&&d.value!==re.Closed){var n=se(e===oe.Specific?{focus:oe.Specific,id:t}:{focus:e},{resolveItems:function(){return m.value},resolveActiveIndex:function(){return b.value},resolveId:function(e){return e.id},resolveDisabled:function(e){return e.dataRef.disabled}});""===h.value&&b.value===n||(h.value="",b.value=n)}},search:function(e){if(!l&&d.value!==re.Closed){h.value+=e.toLowerCase();var t=m.value.findIndex((function(e){return!e.dataRef.disabled&&e.dataRef.textValue.startsWith(h.value)}));-1!==t&&t!==b.value&&(b.value=t)}},clearSearch:function(){l||d.value!==re.Closed&&""!==h.value&&(h.value="")},registerOption:function(e,t){m.value.push({id:e,dataRef:t})},unregisterOption:function(e){var t=m.value.slice(),n=null!==b.value?t[b.value]:null,o=t.findIndex((function(t){return t.id===e}));-1!==o&&t.splice(o,1),m.value=t,b.value=o===b.value||null===n?null:t.indexOf(n)},select:function(e){l||u("update:modelValue",e)}};return w("mousedown",(function(e){var t,n,o,r=e.target,i=document.activeElement;d.value===re.Open&&((null==(t=U(v))?void 0:t.contains(r))||((null==(n=U(f))?void 0:n.contains(r))||g.closeListbox(),i!==document.body&&(null==i?void 0:i.contains(r))||e.defaultPrevented||null==(o=U(v))||o.focus({preventScroll:!0})))})),t.provide(de,g),W(t.computed((function(){var e;return a(d.value,((e={})[re.Open]=V.Open,e[re.Closed]=V.Closed,e))}))),function(){return c({props:s,slot:{open:d.value===re.Open,disabled:l},slots:r,attrs:i,name:"Listbox"})}}}),me=t.defineComponent({name:"ListboxLabel",props:{as:{type:[Object,String],default:"label"}},render:function(){var e=pe("ListboxLabel"),t={open:e.listboxState.value===re.Open,disabled:e.disabled};return c({props:n({},this.$props,{id:this.id,ref:"el",onClick:this.handleClick}),slot:t,attrs:this.$attrs,slots:this.$slots,name:"ListboxLabel"})},setup:function(){var e=pe("ListboxLabel");return{id:"headlessui-listbox-label-"+v(),el:e.labelRef,handleClick:function(){var t;null==(t=U(e.buttonRef))||t.focus({preventScroll:!0})}}}}),he=t.defineComponent({name:"ListboxButton",props:{as:{type:[Object,String],default:"button"}},render:function(){var e,t,o=pe("ListboxButton"),r={open:o.listboxState.value===re.Open,disabled:o.disabled},i={ref:"el",id:this.id,type:"button","aria-haspopup":!0,"aria-controls":null==(e=U(o.optionsRef))?void 0:e.id,"aria-expanded":o.listboxState.value===re.Open||void 0,"aria-labelledby":o.labelRef.value?[null==(t=U(o.labelRef))?void 0:t.id,this.id].join(" "):void 0,disabled:o.disabled,onKeydown:this.handleKeyDown,onKeyup:this.handleKeyUp,onClick:this.handleClick};return c({props:n({},this.$props,i),slot:r,attrs:this.$attrs,slots:this.$slots,name:"ListboxButton"})},setup:function(){var e=pe("ListboxButton");return{id:"headlessui-listbox-button-"+v(),el:e.buttonRef,handleKeyDown:function(n){switch(n.key){case s.Space:case s.Enter:case s.ArrowDown:n.preventDefault(),e.openListbox(),t.nextTick((function(){var t;null==(t=U(e.optionsRef))||t.focus({preventScroll:!0}),e.value.value||e.goToOption(oe.First)}));break;case s.ArrowUp:n.preventDefault(),e.openListbox(),t.nextTick((function(){var t;null==(t=U(e.optionsRef))||t.focus({preventScroll:!0}),e.value.value||e.goToOption(oe.Last)}))}},handleKeyUp:function(e){switch(e.key){case s.Space:e.preventDefault()}},handleClick:function(n){var o;e.disabled||(e.listboxState.value===re.Open?(e.closeListbox(),t.nextTick((function(){var t;return null==(t=U(e.buttonRef))?void 0:t.focus({preventScroll:!0})}))):(n.preventDefault(),e.openListbox(),o=function(){var t;return null==(t=U(e.optionsRef))?void 0:t.focus({preventScroll:!0})},requestAnimationFrame((function(){return requestAnimationFrame(o)}))))}}}}),be=t.defineComponent({name:"ListboxOptions",props:{as:{type:[Object,String],default:"ul"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0}},render:function(){var e,t,o,r,i=pe("ListboxOptions"),a={open:i.listboxState.value===re.Open},l={"aria-activedescendant":null===i.activeOptionIndex.value||null==(e=i.options.value[i.activeOptionIndex.value])?void 0:e.id,"aria-labelledby":null!=(t=null==(o=U(i.labelRef))?void 0:o.id)?t:null==(r=U(i.buttonRef))?void 0:r.id,id:this.id,onKeydown:this.handleKeyDown,role:"listbox",tabIndex:0,ref:"el"};return c({props:n({},this.$props,l),slot:a,attrs:this.$attrs,slots:this.$slots,features:u.RenderStrategy|u.Static,visible:this.visible,name:"ListboxOptions"})},setup:function(){var e=pe("ListboxOptions"),n="headlessui-listbox-options-"+v(),o=t.ref(null),r=q(),i=t.computed((function(){return null!==r?r.value===V.Open:e.listboxState.value===re.Open}));return{id:n,el:e.optionsRef,handleKeyDown:function(n){switch(o.value&&clearTimeout(o.value),n.key){case s.Space:if(""!==e.searchQuery.value)return n.preventDefault(),n.stopPropagation(),e.search(n.key);case s.Enter:n.preventDefault(),n.stopPropagation(),null!==e.activeOptionIndex.value&&e.select(e.options.value[e.activeOptionIndex.value].dataRef.value),e.closeListbox(),t.nextTick((function(){var t;return null==(t=U(e.buttonRef))?void 0:t.focus({preventScroll:!0})}));break;case s.ArrowDown:return n.preventDefault(),n.stopPropagation(),e.goToOption(oe.Next);case s.ArrowUp:return n.preventDefault(),n.stopPropagation(),e.goToOption(oe.Previous);case s.Home:case s.PageUp:return n.preventDefault(),n.stopPropagation(),e.goToOption(oe.First);case s.End:case s.PageDown:return n.preventDefault(),n.stopPropagation(),e.goToOption(oe.Last);case s.Escape:n.preventDefault(),n.stopPropagation(),e.closeListbox(),t.nextTick((function(){var t;return null==(t=U(e.buttonRef))?void 0:t.focus({preventScroll:!0})}));break;case s.Tab:n.preventDefault(),n.stopPropagation();break;default:1===n.key.length&&(e.search(n.key),o.value=setTimeout((function(){return e.clearSearch()}),350))}},visible:i}}}),ye=t.defineComponent({name:"ListboxOption",props:{as:{type:[Object,String],default:"li"},value:{type:[Object,String]},disabled:{type:Boolean,default:!1},class:{type:[String,Function],required:!1},className:{type:[String,Function],required:!1}},setup:function(e,o){var r=o.slots,i=o.attrs,a=pe("ListboxOption"),u="headlessui-listbox-option-"+v(),l=e.disabled,s=e.className,d=void 0===s?e.class:s,p=e.value,f=t.computed((function(){return null!==a.activeOptionIndex.value&&a.options.value[a.activeOptionIndex.value].id===u})),m=t.computed((function(){return t.toRaw(a.value.value)===t.toRaw(p)})),h=t.ref({disabled:l,value:p,textValue:""});function b(e){if(l)return e.preventDefault();a.select(p),a.closeListbox(),t.nextTick((function(){var e;return null==(e=U(a.buttonRef))?void 0:e.focus({preventScroll:!0})}))}function y(){if(l)return a.goToOption(oe.Nothing);a.goToOption(oe.Specific,u)}function g(){l||f.value||a.goToOption(oe.Specific,u)}function S(){l||f.value&&a.goToOption(oe.Nothing)}return t.onMounted((function(){var e,t,n=null==(e=document.getElementById(u))||null==(t=e.textContent)?void 0:t.toLowerCase().trim();void 0!==n&&(h.value.textValue=n)})),t.onMounted((function(){return a.registerOption(u,h)})),t.onUnmounted((function(){return a.unregisterOption(u)})),t.onMounted((function(){t.watch([a.listboxState,m],(function(){var e;a.listboxState.value===re.Open&&m.value&&(a.goToOption(oe.Specific,u),null==(e=document.getElementById(u))||null==e.focus||e.focus())}),{immediate:!0})})),t.watchEffect((function(){a.listboxState.value===re.Open&&f.value&&t.nextTick((function(){var e;return null==(e=document.getElementById(u))||null==e.scrollIntoView?void 0:e.scrollIntoView({block:"nearest"})}))})),function(){var t={active:f.value,selected:m.value,disabled:l},o={id:u,role:"option",tabIndex:-1,class:ce(d,t),"aria-disabled":!0===l||void 0,"aria-selected":!0===m.value?m.value:void 0,onClick:b,onFocus:y,onPointermove:g,onMousemove:g,onPointerleave:S,onMouseleave:S};return c({props:n({},e,o),slot:t,attrs:i,slots:r,name:"ListboxOption"})}}});function ge(e){var n=e.container,o=e.accept,r=e.walk,i=e.enabled;t.watchEffect((function(){var e=n.value;if(e&&(void 0===i||i.value))for(var t=Object.assign((function(e){return o(e)}),{acceptNode:o}),a=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,t,!1);a.nextNode();)r(a.currentNode)}))}!function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(ve||(ve={}));var Se=Symbol("MenuContext");function Oe(e){var n=t.inject(Se,null);if(null===n){var o=new Error("<"+e+" /> is missing a parent <Menu /> component.");throw Error.captureStackTrace&&Error.captureStackTrace(o,Oe),o}return n}var we,xe=t.defineComponent({name:"Menu",props:{as:{type:[Object,String],default:"template"}},setup:function(e,n){var o=n.slots,r=n.attrs,i=t.ref(ve.Closed),u=t.ref(null),l=t.ref(null),s=t.ref([]),d=t.ref(""),p=t.ref(null),v={menuState:i,buttonRef:u,itemsRef:l,items:s,searchQuery:d,activeItemIndex:p,closeMenu:function(){i.value=ve.Closed,p.value=null},openMenu:function(){return i.value=ve.Open},goToItem:function(e,t){var n=se(e===oe.Specific?{focus:oe.Specific,id:t}:{focus:e},{resolveItems:function(){return s.value},resolveActiveIndex:function(){return p.value},resolveId:function(e){return e.id},resolveDisabled:function(e){return e.dataRef.disabled}});""===d.value&&p.value===n||(d.value="",p.value=n)},search:function(e){d.value+=e.toLowerCase();var t=s.value.findIndex((function(e){return e.dataRef.textValue.startsWith(d.value)&&!e.dataRef.disabled}));-1!==t&&t!==p.value&&(p.value=t)},clearSearch:function(){d.value=""},registerItem:function(e,t){s.value.push({id:e,dataRef:t})},unregisterItem:function(e){var t=s.value.slice(),n=null!==p.value?t[p.value]:null,o=t.findIndex((function(t){return t.id===e}));-1!==o&&t.splice(o,1),s.value=t,p.value=o===p.value||null===n?null:t.indexOf(n)}};return w("mousedown",(function(e){var t,n,o,r=e.target,a=document.activeElement;i.value===ve.Open&&((null==(t=U(u))?void 0:t.contains(r))||((null==(n=U(l))?void 0:n.contains(r))||v.closeMenu(),a!==document.body&&(null==a?void 0:a.contains(r))||e.defaultPrevented||null==(o=U(u))||o.focus({preventScroll:!0})))})),t.provide(Se,v),W(t.computed((function(){var e;return a(i.value,((e={})[ve.Open]=V.Open,e[ve.Closed]=V.Closed,e))}))),function(){return c({props:e,slot:{open:i.value===ve.Open},slots:o,attrs:r,name:"Menu"})}}}),Ce=t.defineComponent({name:"MenuButton",props:{disabled:{type:Boolean,default:!1},as:{type:[Object,String],default:"button"}},render:function(){var e,t=Oe("MenuButton"),o={open:t.menuState.value===ve.Open},r={ref:"el",id:this.id,type:"button","aria-haspopup":!0,"aria-controls":null==(e=U(t.itemsRef))?void 0:e.id,"aria-expanded":t.menuState.value===ve.Open||void 0,onKeydown:this.handleKeyDown,onKeyup:this.handleKeyUp,onClick:this.handleClick};return c({props:n({},this.$props,r),slot:o,attrs:this.$attrs,slots:this.$slots,name:"MenuButton"})},setup:function(e){var n=Oe("MenuButton");return{id:"headlessui-menu-button-"+v(),el:n.buttonRef,handleKeyDown:function(e){switch(e.key){case s.Space:case s.Enter:case s.ArrowDown:e.preventDefault(),e.stopPropagation(),n.openMenu(),t.nextTick((function(){var e;null==(e=U(n.itemsRef))||e.focus({preventScroll:!0}),n.goToItem(oe.First)}));break;case s.ArrowUp:e.preventDefault(),e.stopPropagation(),n.openMenu(),t.nextTick((function(){var e;null==(e=U(n.itemsRef))||e.focus({preventScroll:!0}),n.goToItem(oe.Last)}))}},handleKeyUp:function(e){switch(e.key){case s.Space:e.preventDefault()}},handleClick:function(o){var r;e.disabled||(n.menuState.value===ve.Open?(n.closeMenu(),t.nextTick((function(){var e;return null==(e=U(n.buttonRef))?void 0:e.focus({preventScroll:!0})}))):(o.preventDefault(),o.stopPropagation(),n.openMenu(),r=function(){var e;return null==(e=U(n.itemsRef))?void 0:e.focus({preventScroll:!0})},requestAnimationFrame((function(){return requestAnimationFrame(r)}))))}}}}),Ee=t.defineComponent({name:"MenuItems",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0}},render:function(){var e,t,o=Oe("MenuItems"),r={open:o.menuState.value===ve.Open},i={"aria-activedescendant":null===o.activeItemIndex.value||null==(e=o.items.value[o.activeItemIndex.value])?void 0:e.id,"aria-labelledby":null==(t=U(o.buttonRef))?void 0:t.id,id:this.id,onKeydown:this.handleKeyDown,onKeyup:this.handleKeyUp,role:"menu",tabIndex:0,ref:"el"};return c({props:n({},this.$props,i),slot:r,attrs:this.$attrs,slots:this.$slots,features:u.RenderStrategy|u.Static,visible:this.visible,name:"MenuItems"})},setup:function(){var e=Oe("MenuItems"),n="headlessui-menu-items-"+v(),o=t.ref(null);ge({container:t.computed((function(){return U(e.itemsRef)})),enabled:t.computed((function(){return e.menuState.value===ve.Open})),accept:function(e){return"menuitem"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk:function(e){e.setAttribute("role","none")}});var r=q(),i=t.computed((function(){return null!==r?r.value===V.Open:e.menuState.value===ve.Open}));return{id:n,el:e.itemsRef,handleKeyDown:function(n){switch(o.value&&clearTimeout(o.value),n.key){case s.Space:if(""!==e.searchQuery.value)return n.preventDefault(),n.stopPropagation(),e.search(n.key);case s.Enter:var r;n.preventDefault(),n.stopPropagation(),null!==e.activeItemIndex.value&&(null==(r=document.getElementById(e.items.value[e.activeItemIndex.value].id))||r.click()),e.closeMenu(),t.nextTick((function(){var t;return null==(t=U(e.buttonRef))?void 0:t.focus({preventScroll:!0})}));break;case s.ArrowDown:return n.preventDefault(),n.stopPropagation(),e.goToItem(oe.Next);case s.ArrowUp:return n.preventDefault(),n.stopPropagation(),e.goToItem(oe.Previous);case s.Home:case s.PageUp:return n.preventDefault(),n.stopPropagation(),e.goToItem(oe.First);case s.End:case s.PageDown:return n.preventDefault(),n.stopPropagation(),e.goToItem(oe.Last);case s.Escape:n.preventDefault(),n.stopPropagation(),e.closeMenu(),t.nextTick((function(){var t;return null==(t=U(e.buttonRef))?void 0:t.focus({preventScroll:!0})}));break;case s.Tab:n.preventDefault(),n.stopPropagation();break;default:1===n.key.length&&(e.search(n.key),o.value=setTimeout((function(){return e.clearSearch()}),350))}},handleKeyUp:function(e){switch(e.key){case s.Space:e.preventDefault()}},visible:i}}}),De=t.defineComponent({name:"MenuItem",props:{as:{type:[Object,String],default:"template"},disabled:{type:Boolean,default:!1},class:{type:[String,Function],required:!1},className:{type:[String,Function],required:!1}},setup:function(e,o){var r=o.slots,i=o.attrs,a=Oe("MenuItem"),u="headlessui-menu-item-"+v(),l=e.disabled,s=e.className,d=void 0===s?e.class:s,p=t.computed((function(){return null!==a.activeItemIndex.value&&a.items.value[a.activeItemIndex.value].id===u})),f=t.ref({disabled:l,textValue:""});function m(e){if(l)return e.preventDefault();a.closeMenu(),t.nextTick((function(){var e;return null==(e=U(a.buttonRef))?void 0:e.focus({preventScroll:!0})}))}function h(){if(l)return a.goToItem(oe.Nothing);a.goToItem(oe.Specific,u)}function b(){l||p.value||a.goToItem(oe.Specific,u)}function y(){l||p.value&&a.goToItem(oe.Nothing)}return t.onMounted((function(){var e,t,n=null==(e=document.getElementById(u))||null==(t=e.textContent)?void 0:t.toLowerCase().trim();void 0!==n&&(f.value.textValue=n)})),t.onMounted((function(){return a.registerItem(u,f)})),t.onUnmounted((function(){return a.unregisterItem(u)})),t.watchEffect((function(){a.menuState.value===ve.Open&&p.value&&t.nextTick((function(){var e;return null==(e=document.getElementById(u))||null==e.scrollIntoView?void 0:e.scrollIntoView({block:"nearest"})}))})),function(){var t={active:p.value,disabled:l},o={id:u,role:"menuitem",tabIndex:-1,class:ce(d,t),"aria-disabled":!0===l||void 0,onClick:m,onFocus:h,onPointermove:b,onMousemove:b,onPointerleave:y,onMouseleave:y};return c({props:n({},e,o),slot:t,attrs:i,slots:r,name:"MenuItem"})}}});!function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(we||(we={}));var ke=Symbol("PopoverContext");function Pe(e){var n=t.inject(ke,null);if(null===n){var o=new Error("<"+e+" /> is missing a parent <"+Fe.name+" /> component.");throw Error.captureStackTrace&&Error.captureStackTrace(o,Pe),o}return n}var Te=Symbol("PopoverGroupContext");function Re(){return t.inject(Te,null)}var Ie=Symbol("PopoverPanelContext"),Fe=t.defineComponent({name:"Popover",props:{as:{type:[Object,String],default:"div"}},setup:function(e,o){var r=o.slots,i=o.attrs,u=n({},e),l="headlessui-popover-button-"+v(),s="headlessui-popover-panel-"+v(),d=t.ref(we.Closed),p=t.ref(null),f=t.ref(null),m={popoverState:d,buttonId:l,panelId:s,panel:f,button:p,togglePopover:function(){var e;d.value=a(d.value,((e={})[we.Open]=we.Closed,e[we.Closed]=we.Open,e))},closePopover:function(){d.value!==we.Closed&&(d.value=we.Closed)}};t.provide(ke,m),W(t.computed((function(){var e;return a(d.value,((e={})[we.Open]=V.Open,e[we.Closed]=V.Closed,e))})));var h={buttonId:l,panelId:s,close:function(){m.closePopover()}},g=Re(),S=null==g?void 0:g.registerPopover;return t.watchEffect((function(){return null==S?void 0:S(h)})),w("focus",(function(){var e,t,n;d.value===we.Open&&((null!=(e=null==g?void 0:g.isFocusWithinPopoverGroup())?e:(null==(t=U(p))?void 0:t.contains(document.activeElement))||(null==(n=U(f))?void 0:n.contains(document.activeElement)))||p&&f&&m.closePopover())}),!0),w("mousedown",(function(e){var t,n,o,r,i,u,l=e.target;d.value===we.Open&&((null==(t=U(p))?void 0:t.contains(l))||(null==(n=U(f))?void 0:n.contains(l))||(m.closePopover(),void 0===(i=b.Loose)&&(i=b.Strict),(r=l)!==document.body&&a(i,((u={})[b.Strict]=function(){return r.matches(y)},u[b.Loose]=function(){for(var e=r;null!==e;){if(e.matches(y))return!0;e=e.parentElement}return!1},u))||(e.preventDefault(),null==(o=U(p))||o.focus())))})),function(){return c({props:u,slot:{open:d.value===we.Open},slots:r,attrs:i,name:"Popover"})}}}),Le=t.defineComponent({name:"PopoverButton",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1}},render:function(){var e=Pe("PopoverButton"),t={open:e.popoverState.value===we.Open},o=this.isWithinPanel?{type:"button",onKeydown:this.handleKeyDown,onClick:this.handleClick}:{ref:"el",id:e.buttonId,type:"button","aria-expanded":e.popoverState.value===we.Open||void 0,"aria-controls":U(e.panel)?e.panelId:void 0,onKeydown:this.handleKeyDown,onKeyup:this.handleKeyUp,onClick:this.handleClick};return c({props:n({},this.$props,o),slot:t,attrs:this.$attrs,slots:this.$slots,name:"PopoverButton"})},setup:function(e){var n=Pe("PopoverButton"),o=Re(),r=null==o?void 0:o.closeOthers,i=t.inject(Ie,null),a=null!==i&&i===n.panelId,u=t.ref(null),l=t.ref("undefined"==typeof window?null:document.activeElement);return w("focus",(function(){l.value=u.value,u.value=document.activeElement}),!0),{isWithinPanel:a,el:a?null:n.button,handleKeyDown:function(e){var t,o;if(a){if(n.popoverState.value===we.Closed)return;switch(e.key){case s.Space:case s.Enter:e.preventDefault(),e.stopPropagation(),n.closePopover(),null==(t=U(n.button))||t.focus()}}else switch(e.key){case s.Space:case s.Enter:e.preventDefault(),e.stopPropagation(),n.popoverState.value===we.Closed&&(null==r||r(n.buttonId)),n.togglePopover();break;case s.Escape:if(n.popoverState.value!==we.Open)return null==r?void 0:r(n.buttonId);if(!U(n.button))return;if(!(null==(o=U(n.button))?void 0:o.contains(document.activeElement)))return;n.closePopover();break;case s.Tab:if(n.popoverState.value!==we.Open)return;if(!n.panel)return;if(!n.button)return;if(e.shiftKey){var i,u;if(!l.value)return;if(null==(i=U(n.button))?void 0:i.contains(l.value))return;if(null==(u=U(n.panel))?void 0:u.contains(l.value))return;var c=g(),d=c.indexOf(l.value);if(c.indexOf(U(n.button))>d)return;e.preventDefault(),e.stopPropagation(),O(U(n.panel),f.Last)}else e.preventDefault(),e.stopPropagation(),O(U(n.panel),f.First)}},handleKeyUp:function(e){var t,o;if(!a&&(e.key===s.Space&&e.preventDefault(),n.popoverState.value===we.Open&&n.panel&&n.button))switch(e.key){case s.Tab:if(!l.value)return;if(null==(t=U(n.button))?void 0:t.contains(l.value))return;if(null==(o=U(n.panel))?void 0:o.contains(l.value))return;var r=g(),i=r.indexOf(l.value);if(r.indexOf(U(n.button))>i)return;e.preventDefault(),e.stopPropagation(),O(U(n.panel),f.Last)}},handleClick:function(){var t,o;e.disabled||(a?(n.closePopover(),null==(t=U(n.button))||t.focus()):(n.popoverState.value===we.Closed&&(null==r||r(n.buttonId)),null==(o=U(n.button))||o.focus(),n.togglePopover()))},handleFocus:function(){}}}}),Ae=t.defineComponent({name:"PopoverOverlay",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0}},render:function(){var e={open:Pe("PopoverOverlay").popoverState.value===we.Open};return c({props:n({},this.$props,{id:this.id,ref:"el","aria-hidden":!0,onClick:this.handleClick}),slot:e,attrs:this.$attrs,slots:this.$slots,features:u.RenderStrategy|u.Static,visible:this.visible,name:"PopoverOverlay"})},setup:function(){var e=Pe("PopoverOverlay"),n=q(),o=t.computed((function(){return null!==n?n.value===V.Open:e.popoverState.value===we.Open}));return{id:"headlessui-popover-overlay-"+v(),handleClick:function(){e.closePopover()},visible:o}}}),je=t.defineComponent({name:"PopoverPanel",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},focus:{type:Boolean,default:!1}},render:function(){var e={open:Pe("PopoverPanel").popoverState.value===we.Open};return c({props:n({},this.$props,{ref:"el",id:this.id,onKeydown:this.handleKeyDown}),slot:e,attrs:this.$attrs,slots:this.$slots,features:u.RenderStrategy|u.Static,visible:this.visible,name:"PopoverPanel"})},setup:function(e){var n=e.focus,o=Pe("PopoverPanel");t.provide(Ie,o.panelId),t.onUnmounted((function(){o.panel.value=null})),t.watchEffect((function(){var e;if(n&&o.popoverState.value===we.Open&&o.panel){var t=document.activeElement;(null==(e=U(o.panel))?void 0:e.contains(t))||O(U(o.panel),f.First)}})),w("keydown",(function(e){var t;if(o.popoverState.value===we.Open&&U(o.panel)&&e.key===s.Tab&&document.activeElement&&(null==(t=U(o.panel))?void 0:t.contains(document.activeElement))){e.preventDefault();var n,r=O(U(o.panel),e.shiftKey?f.Previous:f.Next);if(r===m.Underflow)return null==(n=U(o.button))?void 0:n.focus();if(r===m.Overflow){if(!U(o.button))return;var i=g(),a=i.indexOf(U(o.button));O(i.splice(a+1).filter((function(e){var t;return!(null==(t=U(o.panel))?void 0:t.contains(e))})),f.First)===m.Error&&O(document.body,f.First)}}})),w("focus",(function(){var e;n&&o.popoverState.value===we.Open&&U(o.panel)&&((null==(e=U(o.panel))?void 0:e.contains(document.activeElement))||o.closePopover())}),!0);var r=q(),i=t.computed((function(){return null!==r?r.value===V.Open:o.popoverState.value===we.Open}));return{id:o.panelId,el:o.panel,handleKeyDown:function(e){var t,n;switch(e.key){case s.Escape:if(o.popoverState.value!==we.Open)return;if(!U(o.panel))return;if(!(null==(t=U(o.panel))?void 0:t.contains(document.activeElement)))return;e.preventDefault(),o.closePopover(),null==(n=U(o.button))||n.focus()}},visible:i}}}),$e=t.defineComponent({name:"PopoverGroup",props:{as:{type:[Object,String],default:"div"}},render:function(){return c({props:n({},this.$props,{ref:"el"}),slot:{},attrs:this.$attrs,slots:this.$slots,name:"PopoverGroup"})},setup:function(){var e=t.ref(null),n=t.ref([]);function o(e){var t=n.value.indexOf(e);-1!==t&&n.value.splice(t,1)}return t.provide(Te,{registerPopover:function(e){return n.value.push(e),function(){o(e)}},unregisterPopover:o,isFocusWithinPopoverGroup:function(){var t,o=document.activeElement;return!!(null==(t=U(e))?void 0:t.contains(o))||n.value.some((function(e){var t,n;return(null==(t=document.getElementById(e.buttonId))?void 0:t.contains(o))||(null==(n=document.getElementById(e.panelId))?void 0:n.contains(o))}))},closeOthers:function(e){for(var t,o=i(n.value);!(t=o()).done;){var r=t.value;r.buttonId!==e&&r.close()}}}),{el:e}}}),Be=Symbol("LabelContext");function Me(){var e=t.inject(Be,null);if(null===e){var n=new Error("You used a <Label /> component, but it is not inside a parent.");throw Error.captureStackTrace&&Error.captureStackTrace(n,Me),n}return e}function Ke(e){var n=void 0===e?{}:e,o=n.slot,r=void 0===o?{}:o,i=n.name,a=void 0===i?"Label":i,u=n.props,l=void 0===u?{}:u,s=t.ref([]);return t.provide(Be,{register:function(e){return s.value.push(e),function(){var t=s.value.indexOf(e);-1!==t&&s.value.splice(t,1)}},slot:r,name:a,props:l}),t.computed((function(){return s.value.length>0?s.value.join(" "):void 0}))}var Ne=t.defineComponent({name:"Label",props:{as:{type:[Object,String],default:"label"},passive:{type:[Boolean],default:!1}},render:function(){var e=this.context,r=e.name,i=void 0===r?"Label":r,a=e.slot,u=void 0===a?{}:a,l=e.props,s=void 0===l?{}:l,d=this.$props,p=d.passive,v=o(d,["passive"]),f=n({},Object.entries(s).reduce((function(e,n){var o;return Object.assign(e,((o={})[n[0]]=t.unref(n[1]),o))}),{}),{id:this.id}),m=n({},v,f);return p&&delete m.onClick,c({props:m,slot:u,attrs:this.$attrs,slots:this.$slots,name:i})},setup:function(){var e=Me(),n="headlessui-label-"+v();return t.onMounted((function(){return t.onUnmounted(e.register(n))})),{id:n,context:e}}}),Ue=Symbol("RadioGroupContext");function Ve(e){var n=t.inject(Ue,null);if(null===n){var o=new Error("<"+e+" /> is missing a parent <RadioGroup /> component.");throw Error.captureStackTrace&&Error.captureStackTrace(o,Ve),o}return n}var Ge,He=t.defineComponent({name:"RadioGroup",emits:["update:modelValue"],props:{as:{type:[Object,String],default:"div"},disabled:{type:[Boolean],default:!1},modelValue:{type:[Object,String,Number,Boolean]}},render:function(){return c({props:n({},o(this.$props,["modelValue","disabled"]),{ref:"el",id:this.id,role:"radiogroup","aria-labelledby":this.labelledby,"aria-describedby":this.describedby,onKeydown:this.handleKeyDown}),slot:{},attrs:this.$attrs,slots:this.$slots,name:"RadioGroup"})},setup:function(e,n){var o=n.emit,r=t.ref(null),i=t.ref([]),a=Ke({name:"RadioGroupLabel"}),u=K({name:"RadioGroupDescription"}),l=t.computed((function(){return e.modelValue})),c={options:i,value:l,disabled:t.computed((function(){return e.disabled})),firstOption:t.computed((function(){return i.value.find((function(e){return!e.propsRef.disabled}))})),containsCheckedOption:t.computed((function(){return i.value.some((function(n){return t.toRaw(n.propsRef.value)===t.toRaw(e.modelValue)}))})),change:function(n){var r;if(e.disabled)return!1;if(l.value===n)return!1;var a=null==(r=i.value.find((function(e){return t.toRaw(e.propsRef.value)===t.toRaw(n)})))?void 0:r.propsRef;return!(null==a?void 0:a.disabled)&&(o("update:modelValue",n),!0)},registerOption:function(e){var t,n=Array.from(null==(t=r.value)?void 0:t.querySelectorAll('[id^="headlessui-radiogroup-option-"]')).reduce((function(e,t,n){var o;return Object.assign(e,((o={})[t.id]=n,o))}),{});i.value.push(e),i.value.sort((function(e,t){return n[e.id]-n[t.id]}))},unregisterOption:function(e){var t=i.value.findIndex((function(t){return t.id===e}));-1!==t&&i.value.splice(t,1)}};return t.provide(Ue,c),ge({container:t.computed((function(){return U(r)})),accept:function(e){return"radio"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk:function(e){e.setAttribute("role","none")}}),{id:"headlessui-radiogroup-"+v(),labelledby:a,describedby:u,el:r,handleKeyDown:function(e){if(r.value&&r.value.contains(e.target)){var t=i.value.filter((function(e){return!1===e.propsRef.disabled})).map((function(e){return e.element}));switch(e.key){case s.ArrowLeft:case s.ArrowUp:if(e.preventDefault(),e.stopPropagation(),O(t,f.Previous|f.WrapAround)===m.Success){var n=i.value.find((function(e){return e.element===document.activeElement}));n&&c.change(n.propsRef.value)}break;case s.ArrowRight:case s.ArrowDown:if(e.preventDefault(),e.stopPropagation(),O(t,f.Next|f.WrapAround)===m.Success){var o=i.value.find((function(e){return e.element===document.activeElement}));o&&c.change(o.propsRef.value)}break;case s.Space:e.preventDefault(),e.stopPropagation();var a=i.value.find((function(e){return e.element===document.activeElement}));a&&c.change(a.propsRef.value)}}}}}});!function(e){e[e.Empty=1]="Empty",e[e.Active=2]="Active"}(Ge||(Ge={}));var qe,We=t.defineComponent({name:"RadioGroupOption",props:{as:{type:[Object,String],default:"div"},value:{type:[Object,String,Number,Boolean]},disabled:{type:Boolean,default:!1},class:{type:[String,Function],required:!1},className:{type:[String,Function],required:!1}},render:function(){var e=this.$props,t=e.className,r=void 0===t?e.class:t,i=o(e,["value","disabled","class","className"]),a={checked:this.checked,disabled:this.disabled,active:Boolean(this.state&Ge.Active)};return c({props:n({},i,{id:this.id,ref:"el",role:"radio",class:ce(r,a),"aria-checked":this.checked?"true":"false","aria-labelledby":this.labelledby,"aria-describedby":this.describedby,tabIndex:this.tabIndex,onClick:this.disabled?void 0:this.handleClick,onFocus:this.disabled?void 0:this.handleFocus,onBlur:this.disabled?void 0:this.handleBlur}),slot:a,attrs:this.$attrs,slots:this.$slots,name:"RadioGroupOption"})},setup:function(e){var n=Ve("RadioGroupOption"),o="headlessui-radiogroup-option-"+v(),r=Ke({name:"RadioGroupLabel"}),i=K({name:"RadioGroupDescription"}),a=t.ref(null),u=t.computed((function(){return{value:e.value,disabled:e.disabled}})),l=t.ref(Ge.Empty);t.onMounted((function(){return n.registerOption({id:o,element:a,propsRef:u})})),t.onUnmounted((function(){return n.unregisterOption(o)}));var s=t.computed((function(){var e;return(null==(e=n.firstOption.value)?void 0:e.id)===o})),c=t.computed((function(){return n.disabled.value||e.disabled})),d=t.computed((function(){return t.toRaw(n.value.value)===t.toRaw(e.value)}));return{id:o,el:a,labelledby:r,describedby:i,state:l,disabled:c,checked:d,tabIndex:t.computed((function(){return c.value?-1:d.value||!n.containsCheckedOption.value&&s.value?0:-1})),handleClick:function(){var t;n.change(e.value)&&(l.value|=Ge.Active,null==(t=a.value)||t.focus())},handleFocus:function(){l.value|=Ge.Active},handleBlur:function(){l.value&=~Ge.Active}}}}),_e=Ne,ze=N,Qe=Symbol("GroupContext"),Ye=t.defineComponent({name:"SwitchGroup",props:{as:{type:[Object,String],default:"template"}},setup:function(e,n){var o=n.slots,r=n.attrs,i=t.ref(null),a=Ke({name:"SwitchLabel",props:{onClick:function(){i.value&&(i.value.click(),i.value.focus({preventScroll:!0}))}}}),u=K({name:"SwitchDescription"});return t.provide(Qe,{switchRef:i,labelledby:a,describedby:u}),function(){return c({props:e,slot:{},slots:o,attrs:r,name:"SwitchGroup"})}}}),Je=t.defineComponent({name:"Switch",emits:["update:modelValue"],props:{as:{type:[Object,String],default:"button"},modelValue:{type:Boolean,default:!1},class:{type:[String,Function],required:!1},className:{type:[String,Function],required:!1}},render:function(){var e=t.inject(Qe,null),o=this.$props,r=o.className,i={checked:this.$props.modelValue},a={id:this.id,ref:null===e?void 0:e.switchRef,role:"switch",tabIndex:0,class:ce(void 0===r?o.class:r,i),"aria-checked":this.$props.modelValue,"aria-labelledby":this.labelledby,"aria-describedby":this.describedby,onClick:this.handleClick,onKeyup:this.handleKeyUp,onKeypress:this.handleKeyPress};return"button"===this.$props.as&&Object.assign(a,{type:"button"}),c({props:n({},this.$props,a),slot:i,attrs:this.$attrs,slots:this.$slots,name:"Switch"})},setup:function(e,n){var o=n.emit,r=t.inject(Qe,null);function i(){o("update:modelValue",!e.modelValue)}return{id:"headlessui-switch-"+v(),el:null==r?void 0:r.switchRef,labelledby:null==r?void 0:r.labelledby,describedby:null==r?void 0:r.describedby,handleClick:function(e){e.preventDefault(),i()},handleKeyUp:function(e){e.key!==s.Tab&&e.preventDefault(),e.key===s.Space&&i()},handleKeyPress:function(e){e.preventDefault()}}}}),Xe=Ne,Ze=N;function et(){var e=[],t={requestAnimationFrame:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){var e=requestAnimationFrame.apply(void 0,arguments);t.add((function(){return cancelAnimationFrame(e)}))})),nextFrame:function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];t.requestAnimationFrame((function(){t.requestAnimationFrame.apply(t,n)}))},setTimeout:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){var e=setTimeout.apply(void 0,arguments);t.add((function(){return clearTimeout(e)}))})),add:function(t){e.push(t)},dispose:function(){for(var t,n=i(e.splice(0));!(t=n()).done;)(0,t.value)()}};return t}function tt(e){for(var t,n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];e&&o.length>0&&(t=e.classList).add.apply(t,o)}function nt(e){for(var t,n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];e&&o.length>0&&(t=e.classList).remove.apply(t,o)}function ot(e,t,n,o,r){var i,a,u=et(),l=void 0!==r?(i=r,a={called:!1},function(){if(!a.called)return a.called=!0,i.apply(void 0,arguments)}):function(){};return tt.apply(void 0,[e].concat(t,n)),u.nextFrame((function(){nt.apply(void 0,[e].concat(n)),tt.apply(void 0,[e].concat(o)),u.add(function(e,t){var n=et();if(!e)return n.dispose;var o=getComputedStyle(e),r=[o.transitionDuration,o.transitionDelay].map((function(e){var t=e.split(",").filter(Boolean).map((function(e){return e.includes("ms")?parseFloat(e):1e3*parseFloat(e)})).sort((function(e,t){return t-e}))[0];return void 0===t?0:t})),i=r[0];return 0!==i?n.setTimeout((function(){return t(qe.Finished)}),i+r[1]):t(qe.Finished),n.add((function(){return t(qe.Cancelled)})),n.dispose}(e,(function(n){return nt.apply(void 0,[e].concat(o,t)),l(n)})))})),u.add((function(){return nt.apply(void 0,[e].concat(t,n,o))})),u.add((function(){return l(qe.Cancelled)})),u.dispose}function rt(e){return void 0===e&&(e=""),e.split(" ").filter((function(e){return e.trim().length>1}))}!function(e){e.Finished="finished",e.Cancelled="cancelled"}(qe||(qe={}));var it,at=Symbol("TransitionContext");!function(e){e.Visible="visible",e.Hidden="hidden"}(it||(it={}));var ut=Symbol("NestingContext");function lt(e){return"children"in e?lt(e.children):e.value.filter((function(e){return e.state===it.Visible})).length>0}function st(e){var n=t.ref([]),o=t.ref(!1);function r(t,r){var i;void 0===r&&(r=l.Hidden);var u=n.value.findIndex((function(e){return e.id===t}));-1!==u&&(a(r,((i={})[l.Unmount]=function(){n.value.splice(u,1)},i[l.Hidden]=function(){n.value[u].state=it.Hidden},i)),!lt(n)&&o.value&&(null==e||e()))}return t.onMounted((function(){return o.value=!0})),t.onUnmounted((function(){return o.value=!1})),{children:n,register:function(e){var t=n.value.find((function(t){return t.id===e}));return t?t.state!==it.Visible&&(t.state=it.Visible):n.value.push({id:e,state:it.Visible}),function(){return r(e,l.Unmount)}},unregister:r}}var ct=u.RenderStrategy,dt=t.defineComponent({props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:["beforeEnter","afterEnter","beforeLeave","afterLeave"],render:function(){return c({props:n({},o(this.$props,["appear","show","enter","enterFrom","enterTo","leave","leaveFrom","leaveTo"]),{ref:"el"}),slot:{},slots:this.$slots,attrs:this.$attrs,features:ct,visible:this.state===it.Visible,name:"TransitionChild"})},setup:function(e,n){var o=n.emit,r=t.ref(null),i=t.ref(it.Visible),u=t.computed((function(){return e.unmount?l.Unmount:l.Hidden})),s=function(){var e=t.inject(at,null);if(null===e)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return e}(),c=s.show,d=s.appear,p=function(){var e=t.inject(ut,null);if(null===e)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return e}(),f=p.register,m=p.unregister,h={value:!0},b=v(),y={value:!1},g=st((function(){y.value||(i.value=it.Hidden,m(b),o("afterLeave"))}));t.onMounted((function(){var e=f(b);t.onUnmounted(e)})),t.watchEffect((function(){var e;u.value===l.Hidden&&b&&(c&&i.value!==it.Visible?i.value=it.Visible:a(i.value,((e={})[it.Hidden]=function(){return m(b)},e[it.Visible]=function(){return f(b)},e)))}));var S=rt(e.enter),O=rt(e.enterFrom),w=rt(e.enterTo),x=rt(e.leave),C=rt(e.leaveFrom),E=rt(e.leaveTo);return t.onMounted((function(){t.watchEffect((function(){if(i.value===it.Visible){var e=U(r);if(e instanceof Comment&&""===e.data)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}}))})),t.onMounted((function(){t.watch([c,d],(function(e,t,n){!function(e){var t=h.value&&!d.value,n=U(r);n&&n instanceof HTMLElement&&(t||(y.value=!0,c.value&&o("beforeEnter"),c.value||o("beforeLeave"),e(c.value?ot(n,S,O,w,(function(e){y.value=!1,e===qe.Finished&&o("afterEnter")})):ot(n,x,C,E,(function(e){y.value=!1,e===qe.Finished&&(lt(g)||(i.value=it.Hidden,m(b),o("afterLeave")))})))))}(n),h.value=!1}),{immediate:!0})})),t.provide(ut,g),W(t.computed((function(){var e;return a(i.value,((e={})[it.Visible]=V.Open,e[it.Hidden]=V.Closed,e))}))),{el:r,state:i}}}),pt=t.defineComponent({inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:["beforeEnter","afterEnter","beforeLeave","afterLeave"],render:function(){var e=this,r=this.$props,i=r.unmount,a=o(r,["show","appear","unmount"]),u={unmount:i};return c({props:n({},u,{as:"template"}),slot:{},slots:n({},this.$slots,{default:function(){return[t.h(dt,n({},e.$attrs,u,a),e.$slots.default)]}}),attrs:{},features:ct,visible:this.state===it.Visible,name:"Transition"})},setup:function(e){var n=q(),o=t.computed((function(){var t;return null===e.show&&null!==n?a(n.value,((t={})[V.Open]=!0,t[V.Closed]=!1,t)):e.show}));t.watchEffect((function(){if(![!0,!1].includes(o.value))throw new Error('A <Transition /> is used but it is missing a `:show="true | false"` prop.')}));var r=t.ref(o.value?it.Visible:it.Hidden),i=st((function(){r.value=it.Hidden})),u={value:!0},l={show:o,appear:t.computed((function(){return e.appear||!u.value}))};return t.onMounted((function(){t.watchEffect((function(){u.value=!1,o.value?r.value=it.Visible:lt(i)||(r.value=it.Hidden)}))})),t.provide(ut,i),t.provide(at,l),{state:r,show:o}}});e.Dialog=J,e.DialogDescription=ee,e.DialogOverlay=X,e.DialogTitle=Z,e.Disclosure=ie,e.DisclosureButton=ae,e.DisclosurePanel=ue,e.FocusTrap=le,e.Listbox=fe,e.ListboxButton=he,e.ListboxLabel=me,e.ListboxOption=ye,e.ListboxOptions=be,e.Menu=xe,e.MenuButton=Ce,e.MenuItem=De,e.MenuItems=Ee,e.Popover=Fe,e.PopoverButton=Le,e.PopoverGroup=$e,e.PopoverOverlay=Ae,e.PopoverPanel=je,e.Portal=j,e.PortalGroup=B,e.RadioGroup=He,e.RadioGroupDescription=ze,e.RadioGroupLabel=_e,e.RadioGroupOption=We,e.Switch=Je,e.SwitchDescription=Ze,e.SwitchGroup=Ye,e.SwitchLabel=Xe,e.TransitionChild=dt,e.TransitionRoot=pt,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=headlessui.umd.production.min.js.map |
{ | ||
"name": "@headlessui/vue", | ||
"version": "1.1.0", | ||
"version": "1.1.1-ab92811", | ||
"description": "A set of completely unstyled, fully accessible UI components for Vue 3, designed to integrate beautifully with Tailwind CSS.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1752836
53
13972
4