Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@headlessui/vue

Package Overview
Dependencies
Maintainers
2
Versions
681
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@headlessui/vue - npm Package Compare versions

Comparing version 1.0.0-be833ba to 1.0.0-ce8d7f5

10

dist/components/radio-group/radio-group.d.ts

@@ -39,3 +39,3 @@ import { Ref } from 'vue';

value: {
type: (ObjectConstructor | StringConstructor)[];
type: (ObjectConstructor | StringConstructor | BooleanConstructor | NumberConstructor)[];
};

@@ -60,3 +60,5 @@ disabled: {

state: Ref<OptionState>;
disabled: import("vue").ComputedRef<boolean>;
checked: import("vue").ComputedRef<boolean>;
tabIndex: import("vue").ComputedRef<0 | -1>;
handleClick(): void;

@@ -81,3 +83,3 @@ handleFocus(): void;

};
clickable: {
passive: {
type: BooleanConstructor[];

@@ -96,6 +98,6 @@ default: boolean;

as: string;
clickable: boolean;
passive: boolean;
} & {}>, {
as: string;
clickable: boolean;
passive: boolean;
}>;

@@ -102,0 +104,0 @@ export declare let RadioGroupDescription: import("vue").DefineComponent<{

2

dist/headlessui.cjs.production.min.js

@@ -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 I(){return o.inject(T,(function(){}))}function R(e){var t=I();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=I();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))})),R(),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 N,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,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"}(N||(N={}));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===N.Open||void 0,"aria-labelledby":this.titleId,"aria-describedby":this.describedby}),i=this.$props,u=i.open,l=a(i,["open","initialFocus"]),c={open:this.dialogState===N.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?N.Open:N.Closed})),s=o.ref(null),c=o.ref(i.value===N.Open);o.onUpdated((function(){c.value=i.value===N.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),R((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===N.Open&&1===a.value.size&&(x(a.value,t)||(h.close(),o.nextTick((function(){return null==t?void 0:t.focus()}))))})),w("keydown",(function(e){e.key===n.Escape&&i.value===N.Open&&(a.value.size>1||h.close())})),o.watchEffect((function(e){if(i.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}))}})),o.watchEffect((function(e){if(i.value===N.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}}}),_=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===N.Open},attrs:this.$attrs,slots:this.$slots,name:"DialogOverlay"})},setup:function(){var e=G("DialogOverlay");return{id:"headlessui-dialog-overlay-"+p(),handleClick:function(){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===N.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=K;!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"}},setup:function(e,t){var n=t.slots,a=t.attrs,i=r({},e),u=o.ref(H.Closed),c=o.ref(null);return o.provide(Y,{disclosureState:u,panelRef:c,toggleDisclosure:function(){var e;u.value=l(u.value,((e={})[H.Open]=H.Closed,e[H.Closed]=H.Open,e))}}),function(){return s({props:i,slot:{open:u.value===H.Open},slots:n,attrs:a,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()}}}}),Ie=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()}}}}}),Re=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,Ne=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,change:function(t){e.disabled||s.value!==t&&r("update:modelValue",t)},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))switch(e.key){case n.ArrowLeft:case n.ArrowUp:if(e.preventDefault(),e.stopPropagation(),S(i.value.map((function(e){return e.element})),f.Previous|f.WrapAround)===v.Success){var t=i.value.find((function(e){return e.element===document.activeElement}));t&&c.change(t.propsRef.value)}break;case n.ArrowRight:case n.ArrowDown:if(e.preventDefault(),e.stopPropagation(),S(i.value.map((function(e){return e.element})),f.Next|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.Space:e.preventDefault(),e.stopPropagation();var r=i.value.find((function(e){return e.element===document.activeElement}));r&&c.change(r.propsRef.value)}}}}});!function(e){e[e.Empty=1]="Empty",e[e.Active=2]="Active"}(Me||(Me={}));var Ke,Ue=o.defineComponent({name:"RadioGroupOption",props:{as:{type:[Object,String],default:"div"},value:{type:[Object,String]},disabled:{type:Boolean,default:!1},class:{type:[String,Function],required:!1},className:{type:[String,Function],required:!1}},render:function(){var e,t,n=this.$props,o=n.className,i=void 0===o?n.class:o,u=a(n,["value","disabled","class","className"]),l=Be("RadioGroupOption"),c=(null==(e=l.options.value)||null==(t=e[0])?void 0:t.id)===this.id,d={checked:this.checked,active:Boolean(this.state&Me.Active)};return s({props:r({},u,{id:this.id,ref:"el",role:"radio",class:ae(i,d),"aria-checked":this.checked?"true":"false","aria-labelledby":this.labelledby,"aria-describedby":this.describedby,tabIndex:this.checked||void 0===l.value.value&&c?0:-1,onClick:this.handleClick,onFocus:this.handleFocus,onBlur:this.handleBlur}),slot:d,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}})),l=o.ref(Me.Empty);return o.onMounted((function(){return t.registerOption({id:n,element:i,propsRef:u})})),o.onUnmounted((function(){return t.unregisterOption(n)})),{id:n,el:i,labelledby:r,describedby:a,state:l,checked:o.computed((function(){return o.toRaw(t.value.value)===o.toRaw(e.value)})),handleClick:function(){var n,o=e.value;t.value.value!==o&&(l.value|=Me.Active,t.change(o),null==(n=i.value)||n.focus())},handleFocus:function(){l.value|=Me.Active},handleBlur:function(){l.value&=~Me.Active}}}}),Ve=je,Ge=K,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=K;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(Ke.Finished)}),a+r[1]):t(Ke.Finished),n.add((function(){return t(Ke.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(Ke.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"}(Ke||(Ke={}));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===Ke.Finished&&r("afterEnter")})):Xe(n,O,E,C,(function(e){y.value=!1,e===Ke.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=Re,exports.PopoverOverlay=Te,exports.PopoverPanel=Ie,exports.Portal=A,exports.PortalGroup=$,exports.RadioGroup=Ne,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,f=i(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,((a={})[t.Unmount]=function(){return null},a[t.Hidden]=function(){return c(r({},f,{props:r({},f.props,{hidden:!0,style:{display:"none"}})}))},a)):c(f)}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 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")}(),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 v.Error;var d=i+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(a),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 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(x(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,f.First)===v.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),w("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?f.Previous:f.Next)|f.WrapAround)===v.Success){a.value=document.activeElement;break}}})),w("focus",(function(n){if(t.value&&1===e.value.size){var o=a.value;if(o){var r=n.target;r&&r instanceof HTMLElement?x(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"}(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 k(e){e.setAttribute("aria-hidden","true"),e.inert=!0}function D(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: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?{}: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 N,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?{}: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,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"}(N||(N={}));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===N.Open||void 0,"aria-labelledby":this.titleId,"aria-describedby":this.describedby}),a=this.$props,u=a.open,l=i(a,["open","initialFocus"]),c={open:this.dialogState===N.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,i=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 a=o.computed((function(){return e.open?N.Open:N.Closed})),s=o.ref(null),c=o.ref(a.value===N.Open);o.onUpdated((function(){c.value=a.value===N.Open}));var d="headlessui-dialog-"+p(),f=o.computed((function(){return{initialFocus:e.initialFocus}}));O(i,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,i=u(C.keys());!(r=i()).done;){var a=r.value;a.contains(o)&&(D(a),C.delete(a))}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}),k(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}),k(e)}}));else for(var e,t=u(C.keys());!(e=t()).done;){var n=e.value;D(n),C.delete(n)}}))}}))}(s,c),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 v=M({name:"DialogDescription",slot:{open:e.open}}),m=o.ref(null),h={titleId:m,dialogState:a,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;a.value===N.Open&&1===i.value.size&&(x(i.value,t)||(h.close(),o.nextTick((function(){return null==t?void 0:t.focus()}))))})),w("keydown",(function(e){e.key===n.Escape&&a.value===N.Open&&(i.value.size>1||h.close())})),o.watchEffect((function(e){if(a.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}))}})),o.watchEffect((function(e){if(a.value===N.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:i,dialogState:a,titleId:m,describedby:v}}}),_=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===N.Open},attrs:this.$attrs,slots:this.$slots,name:"DialogOverlay"})},setup:function(){var e=G("DialogOverlay");return{id:"headlessui-dialog-overlay-"+p(),handleClick:function(){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===N.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=K;!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"}},setup:function(e,t){var n=t.slots,i=t.attrs,a=r({},e),u=o.ref(H.Closed),c=o.ref(null);return o.provide(Y,{disclosureState:u,panelRef:c,toggleDisclosure:function(){var e;u.value=l(u.value,((e={})[H.Open]=H.Closed,e[H.Closed]=H.Open,e))}}),function(){return s({props:a,slot:{open:u.value===H.Open},slots:n,attrs:i,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({},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),O(t,r,i))})),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,i=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 i=n.slice().reverse().findIndex((function(e){return!t.resolveDisabled(e)}));return-1===i?i:n.length-1-i;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===i?o:i}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"}(X||(X={})),function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(Z||(Z={}));var ae=Symbol("ListboxContext");function ue(e){var t=o.inject(ae,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,a=t.emit,u=e.disabled,l=i(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||a("update:modelValue",e)}};return w("mousedown",(function(e){var t,n,o,r=e.target,i=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(),i!==document.body&&(null==i?void 0:i.contains(r))||e.defaultPrevented||null==(o=U(p))||o.focus({preventScroll:!0})))})),o.provide(ae,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},i={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,i),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,i,a=ue("ListboxOptions"),u={open:a.listboxState.value===Z.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=U(a.labelRef))?void 0:o.id)?n:null==(i=U(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: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,i=t.attrs,a=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!==a.activeOptionIndex.value&&a.options.value[a.activeOptionIndex.value].id===u})),m=o.computed((function(){return o.toRaw(a.value.value)===o.toRaw(f)})),h=o.ref({disabled:l,value:f,textValue:""});function b(e){if(l)return e.preventDefault();a.select(f),a.closeListbox(),o.nextTick((function(){var e;return null==(e=U(a.buttonRef))?void 0:e.focus({preventScroll:!0})}))}function y(){if(l)return a.goToOption(X.Nothing);a.goToOption(X.Specific,u)}function g(){l||v.value||a.goToOption(X.Specific,u)}function S(){l||v.value&&a.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 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===Z.Open&&m.value&&(a.goToOption(X.Specific,u),null==(e=document.getElementById(u))||null==e.focus||e.focus())}),{immediate:!0})})),o.watchEffect((function(){a.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: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 s({props:r({},e,o),slot:t,attrs:i,slots:n,name:"ListboxOption"})}}});function ve(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"}(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,i=o.ref(le.Closed),a=o.ref(null),u=o.ref(null),l=o.ref([]),c=o.ref(""),d=o.ref(null),p={menuState:i,buttonRef:a,itemsRef:u,items:l,searchQuery:c,activeItemIndex:d,closeMenu:function(){i.value=le.Closed,d.value=null},openMenu:function(){return i.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;i.value===le.Open&&((null==(t=U(a))?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(a))||o.focus({preventScroll:!0})))})),o.provide(me,p),function(){return s({props:e,slot:{open:i.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"),i={open:o.menuState.value===le.Open},a={"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,a),slot:i,attrs:this.$attrs,slots:this.$slots,features:e.RenderStrategy|e.Static,visible:i.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 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=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,i=t.attrs,a=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!==a.activeItemIndex.value&&a.items.value[a.activeItemIndex.value].id===u})),v=o.ref({disabled:l,textValue:""});function m(e){if(l)return e.preventDefault();a.closeMenu(),o.nextTick((function(){var e;return null==(e=U(a.buttonRef))?void 0:e.focus({preventScroll:!0})}))}function h(){if(l)return a.goToItem(X.Nothing);a.goToItem(X.Specific,u)}function b(){l||f.value||a.goToItem(X.Specific,u)}function y(){l||f.value&&a.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 a.registerItem(u,v)})),o.onUnmounted((function(){return a.unregisterItem(u)})),o.watchEffect((function(){a.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:ie(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"}(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 <"+De.name+" /> component.");throw Error.captureStackTrace&&Error.captureStackTrace(n,Oe),n}return t}var Ee=Symbol("PopoverGroupContext");function Ce(){return o.inject(Ee,null)}var ke=Symbol("PopoverPanelContext"),De=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(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,i,a,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===(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=U(f))||o.focus())))})),function(){return s({props:a,slot:{open:d.value===be.Open},slots:n,attrs:i,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(),i=null==r?void 0:r.closeOthers,a=o.inject(ke,null),u=null!==a&&a===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==i||i(t.buttonId)),t.togglePopover();break;case n.Escape:if(t.popoverState.value!==be.Open)return null==i?void 0:i(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 a,l;if(!s.value)return;if(null==(a=U(t.button))?void 0:a.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 i=y(),a=i.indexOf(s.value);if(i.indexOf(U(t.button))>a)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==i||i(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(ke,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,i=S(U(r.panel),e.shiftKey?f.Previous:f.Next);if(i===v.Underflow)return null==(o=U(r.button))?void 0:o.focus();if(i===v.Overflow){if(!U(r.button))return;var a=y(),u=a.indexOf(U(r.button));S(a.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,i=t.name,a=void 0===i?"Label":i,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:a,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,a=e.slot,u=void 0===a?{}:a,l=e.props,c=void 0===l?{}:l,d=this.$props,p=d.passive,f=i(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,Ne=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=Ae({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($e,c),ve({container:o.computed((function(){return U(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,f.Previous|f.WrapAround)===v.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,f.Next|f.WrapAround)===v.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"}(Me||(Me={}));var Ke,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=i(e,["value","disabled","class","className"]),a={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:ie(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=Be("RadioGroupOption"),n="headlessui-radiogroup-option-"+p(),r=Ae({name:"RadioGroupLabel"}),i=M({name:"RadioGroupDescription"}),a=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: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|=Me.Active,null==(n=a.value)||n.focus())},handleFocus:function(){l.value|=Me.Active},handleBlur:function(){l.value&=~Me.Active}}}}),Ve=je,Ge=K,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,i=o.ref(null),a=Ae({name:"SwitchLabel",props:{onClick:function(){i.value&&(i.value.click(),i.value.focus({preventScroll:!0}))}}}),u=M({name:"SwitchDescription"});return o.provide(He,{switchRef:i,labelledby:a,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,i={checked:this.$props.modelValue},a={id:this.id,ref:null===e?void 0:e.switchRef,role:"switch",tabIndex:0,class:ie(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(He,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()}}}}),_e=je,ze=K;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 i,a,u=Qe(),l=void 0!==r?(i=r,a={called:!1},function(){if(!a.called)return a.called=!0,i.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})),i=r[0];return 0!==i?n.setTimeout((function(){return t(Ke.Finished)}),i+r[1]):t(Ke.Finished),n.add((function(){return t(Ke.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(Ke.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"}(Ke||(Ke={}));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 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=et.Hidden},a)),!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 i(e,t.Unmount)}},unregister:i}}var it=e.RenderStrategy,at=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:it,visible:this.state===et.Visible,name:"TransitionChild"})},setup:function(e,n){var r=n.emit,i=o.ref(null),a=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||(a.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&&a.value!==et.Visible?a.value=et.Visible:l(a.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(a.value===et.Visible){var e=U(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=U(i);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===Ke.Finished&&r("afterEnter")})):Xe(n,O,E,C,(function(e){y.value=!1,e===Ke.Finished&&(ot(g)||(a.value=et.Hidden,m(b),r("afterLeave")))})))))}(n),h.value=!1}),{immediate:!0})})),o.provide(nt,g),{el:i,state:a}}}),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,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(at,r({},e.$attrs,u,a),e.$slots.default)]}}),attrs:{},features:it,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},i={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,i),{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=De,exports.PopoverButton=Pe,exports.PopoverGroup=Ie,exports.PopoverOverlay=Te,exports.PopoverPanel=Re,exports.Portal=A,exports.PortalGroup=$,exports.RadioGroup=Ne,exports.RadioGroupDescription=Ge,exports.RadioGroupLabel=Ve,exports.RadioGroupOption=Ue,exports.Switch=We,exports.SwitchDescription=ze,exports.SwitchGroup=qe,exports.SwitchLabel=_e,exports.TransitionChild=at,exports.TransitionRoot=ut;
//# 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={},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,f=o(e,["visible","features"]);return s||p&u.Static&&f.props.static?d(f):p&u.RenderStrategy?a(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,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 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")}(),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 m.Error;var d=i+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(a),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=i(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),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(w(l.value,v.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),O("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(w(o.value,(t.shiftKey?v.Previous:v.Next)|v.WrapAround)===m.Success){a.value=document.activeElement;break}}})),O("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"}(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,I=Symbol("StackContext");function R(){return t.inject(I,(function(){}))}function F(e){var n=R();t.provide(I,(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=R();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 N(e){var n=void 0===e?{}:e,o=n.slot,r=void 0===o?{}: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 K,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,i=e.slot,a=void 0===i?{}: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,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"}(K||(K={}));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===K.Open||void 0,"aria-labelledby":this.titleId,"aria-describedby":this.describedby}),i=this.$props,a=i.open,l=o(i,["open","initialFocus"]),s={open:this.dialogState===K.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:a,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?K.Open:K.Closed})),l=t.ref(null),c=t.ref(u.value===K.Open);t.onUpdated((function(){c.value=u.value===K.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,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(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=i(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=i(D.keys());!(e=t()).done;){var n=e.value;P(n),D.delete(n)}}))}}))}(l,c),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 v=N({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===K.Open&&1===r.value.size&&(x(r.value,n)||(h.close(),t.nextTick((function(){return null==n?void 0:n.focus()}))))})),O("keydown",(function(e){e.key===s.Escape&&u.value===K.Open&&(r.value.size>1||h.close())})),t.watchEffect((function(e){if(u.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}))}})),t.watchEffect((function(e){if(u.value===K.Open){var t=V(l);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&&h.close()}}));n.observe(t),e((function(){return n.disconnect()}))}}})),{id:d,el:l,dialogRef:l,containers:r,dialogState:u,titleId:m,describedby:v}}}),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===K.Open},attrs:this.$attrs,slots:this.$slots,name:"DialogOverlay"})},setup:function(){var e=H("DialogOverlay");return{id:"headlessui-dialog-overlay-"+f(),handleClick:function(){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===K.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"}},setup:function(e,o){var r=o.slots,i=o.attrs,u=n({},e),l=t.ref(q.Closed),s=t.ref(null);return t.provide(J,{disclosureState:l,panelRef:s,toggleDisclosure:function(){var e;l.value=a(l.value,((e={})[q.Open]=q.Closed,e[q.Closed]=q.Open,e))}}),function(){return c({props:u,slot:{open:l.value===q.Open},slots:r,attrs:i,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),i=t.computed((function(){return{initialFocus:e.initialFocus}}));return t.onMounted((function(){o.value&&(n.value.add(o.value),E(n,r,i))})),t.onUnmounted((function(){r.value=!1})),{el:o}}});function ie(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 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 i=n.slice().reverse().findIndex((function(e){return!t.resolveDisabled(e)}));return-1===i?i:n.length-1-i;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===i?o:i}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"}(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,i=n.attrs,a=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=ie(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||a("update:modelValue",e)}};return O("mousedown",(function(e){var t,n,o,r=e.target,i=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(),i!==document.body&&(null==i?void 0:i.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:i,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},i={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,i),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,i=le("ListboxOptions"),a={open:i.listboxState.value===ee.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=V(i.labelRef))?void 0:o.id)?t:null==(r=V(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:a.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,i=o.attrs,a=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!==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=V(a.buttonRef))?void 0:e.focus({preventScroll:!0})}))}function y(){if(l)return a.goToOption(Z.Nothing);a.goToOption(Z.Specific,u)}function g(){l||v.value||a.goToOption(Z.Specific,u)}function S(){l||v.value&&a.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 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===ee.Open&&m.value&&(a.goToOption(Z.Specific,u),null==(e=document.getElementById(u))||null==e.focus||e.focus())}),{immediate:!0})})),t.watchEffect((function(){a.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: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 c({props:n({},e,o),slot:t,attrs:i,slots:r,name:"ListboxOption"})}}});function me(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"}(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,i=t.ref(se.Closed),a=t.ref(null),u=t.ref(null),l=t.ref([]),s=t.ref(""),d=t.ref(null),p={menuState:i,buttonRef:a,itemsRef:u,items:l,searchQuery:s,activeItemIndex:d,closeMenu:function(){i.value=se.Closed,d.value=null},openMenu:function(){return i.value=se.Open},goToItem:function(e,t){var n=ie(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;i.value===se.Open&&((null==(t=V(a))?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(a))||o.focus({preventScroll:!0})))})),t.provide(he,p),function(){return c({props:e,slot:{open:i.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},i={"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,i),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,i=o.attrs,a=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!==a.activeItemIndex.value&&a.items.value[a.activeItemIndex.value].id===u})),v=t.ref({disabled:l,textValue:""});function m(e){if(l)return e.preventDefault();a.closeMenu(),t.nextTick((function(){var e;return null==(e=V(a.buttonRef))?void 0:e.focus({preventScroll:!0})}))}function h(){if(l)return a.goToItem(Z.Nothing);a.goToItem(Z.Specific,u)}function b(){l||p.value||a.goToItem(Z.Specific,u)}function y(){l||p.value&&a.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 a.registerItem(u,v)})),t.onUnmounted((function(){return a.unregisterItem(u)})),t.watchEffect((function(){a.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:ae(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"}(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,i=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=a(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,i,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===(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=V(p))||o.focus())))})),function(){return c({props:u,slot:{open:d.value===ye.Open},slots:r,attrs:i,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,i=t.inject(ke,null),a=null!==i&&i===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:a,el:a?null:n.button,handleKeyDown:function(e){var t,o;if(a){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 i,u;if(!l.value)return;if(null==(i=V(n.button))?void 0:i.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(!a&&(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(),i=r.indexOf(l.value);if(r.indexOf(V(n.button))>i)return;e.preventDefault(),e.stopPropagation(),w(V(n.panel),v.Last)}},handleClick:function(){var t,o;e.disabled||(a?(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(){}}}}),Ie=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()}}}}),Re=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 i=g(),a=i.indexOf(V(o.button));w(i.splice(a+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=i(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,i=n.name,a=void 0===i?"Label":i,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:a,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,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,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:i})},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 Ne,Ke=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=je({name:"RadioGroupLabel"}),u=N({name:"RadioGroupDescription"}),l=t.computed((function(){return e.modelValue})),c={options:i,value:l,change:function(t){e.disabled||l.value!==t&&o("update:modelValue",t)},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(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:a,describedby:u,el:r,handleKeyDown:function(e){if(r.value&&r.value.contains(e.target))switch(e.key){case s.ArrowLeft:case s.ArrowUp:if(e.preventDefault(),e.stopPropagation(),w(i.value.map((function(e){return e.element})),v.Previous|v.WrapAround)===m.Success){var t=i.value.find((function(e){return e.element===document.activeElement}));t&&c.change(t.propsRef.value)}break;case s.ArrowRight:case s.ArrowDown:if(e.preventDefault(),e.stopPropagation(),w(i.value.map((function(e){return e.element})),v.Next|v.WrapAround)===m.Success){var n=i.value.find((function(e){return e.element===document.activeElement}));n&&c.change(n.propsRef.value)}break;case s.Space:e.preventDefault(),e.stopPropagation();var o=i.value.find((function(e){return e.element===document.activeElement}));o&&c.change(o.propsRef.value)}}}}});!function(e){e[e.Empty=1]="Empty",e[e.Active=2]="Active"}(Ne||(Ne={}));var Ue,Ve=t.defineComponent({name:"RadioGroupOption",props:{as:{type:[Object,String],default:"div"},value:{type:[Object,String]},disabled:{type:Boolean,default:!1},class:{type:[String,Function],required:!1},className:{type:[String,Function],required:!1}},render:function(){var e,t,r=this.$props,i=r.className,a=void 0===i?r.class:i,u=o(r,["value","disabled","class","className"]),l=Me("RadioGroupOption"),s=(null==(e=l.options.value)||null==(t=e[0])?void 0:t.id)===this.id,d={checked:this.checked,active:Boolean(this.state&Ne.Active)};return c({props:n({},u,{id:this.id,ref:"el",role:"radio",class:ae(a,d),"aria-checked":this.checked?"true":"false","aria-labelledby":this.labelledby,"aria-describedby":this.describedby,tabIndex:this.checked||void 0===l.value.value&&s?0:-1,onClick:this.handleClick,onFocus:this.handleFocus,onBlur:this.handleBlur}),slot:d,attrs:this.$attrs,slots:this.$slots,name:"RadioGroupOption"})},setup:function(e){var n=Me("RadioGroupOption"),o="headlessui-radiogroup-option-"+f(),r=je({name:"RadioGroupLabel"}),i=N({name:"RadioGroupDescription"}),a=t.ref(null),u=t.computed((function(){return{value:e.value}})),l=t.ref(Ne.Empty);return t.onMounted((function(){return n.registerOption({id:o,element:a,propsRef:u})})),t.onUnmounted((function(){return n.unregisterOption(o)})),{id:o,el:a,labelledby:r,describedby:i,state:l,checked:t.computed((function(){return t.toRaw(n.value.value)===t.toRaw(e.value)})),handleClick:function(){var t,o=e.value;n.value.value!==o&&(l.value|=Ne.Active,n.change(o),null==(t=a.value)||t.focus())},handleFocus:function(){l.value|=Ne.Active},handleBlur:function(){l.value&=~Ne.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,i=t.ref(null),a=je({name:"SwitchLabel",props:{onClick:function(){i.value&&(i.value.click(),i.value.focus({preventScroll:!0}))}}}),u=N({name:"SwitchDescription"});return t.provide(qe,{switchRef:i,labelledby:a,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,i={checked:this.$props.modelValue},a={id:this.id,ref:null===e?void 0:e.switchRef,role:"switch",tabIndex:0,class:ae(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-"+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(),i()},handleKeyUp:function(e){e.key!==s.Tab&&e.preventDefault(),e.key===s.Space&&i()},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=i(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 i,a,u=Ye(),l=void 0!==r?(i=r,a={called:!1},function(){if(!a.called)return a.called=!0,i.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})),i=r[0];return 0!==i?n.setTimeout((function(){return t(Ue.Finished)}),i+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 it(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=tt.Hidden},i)),!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 at=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:at,visible:this.state===tt.Visible,name:"TransitionChild"})},setup:function(e,n){var o=n.emit,r=t.ref(null),i=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=it((function(){y.value||(i.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&&i.value!==tt.Visible?i.value=tt.Visible:a(i.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(i.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)||(i.value=tt.Hidden,m(b),o("afterLeave")))})))))}(n),h.value=!1}),{immediate:!0})})),t.provide(ot,g),{el:r,state:i}}}),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,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(ut,n({},e.$attrs,u,a),e.$slots.default)]}}),attrs:{},features:at,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=it((function(){n.value=tt.Hidden})),r={value:!0},i={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,i),{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=Ie,e.PopoverPanel=Re,e.Portal=j,e.PortalGroup=B,e.RadioGroup=Ke,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,f=o(e,["visible","features"]);return s||p&u.Static&&f.props.static?d(f):p&u.RenderStrategy?a(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,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 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")}(),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 m.Error;var d=i+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(a),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=i(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),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(w(l.value,v.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),O("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(w(o.value,(t.shiftKey?v.Previous:v.Next)|v.WrapAround)===m.Success){a.value=document.activeElement;break}}})),O("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"}(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,k=new Map;function D(e){e.setAttribute("aria-hidden","true"),e.inert=!0}function P(e){var t=k.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 N(e){var n=void 0===e?{}:e,o=n.slot,r=void 0===o?{}: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 K,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,i=e.slot,a=void 0===i?{}: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,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"}(K||(K={}));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===K.Open||void 0,"aria-labelledby":this.titleId,"aria-describedby":this.describedby}),i=this.$props,a=i.open,l=o(i,["open","initialFocus"]),s={open:this.dialogState===K.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:a,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?K.Open:K.Closed})),l=t.ref(null),c=t.ref(u.value===K.Open);t.onUpdated((function(){c.value=u.value===K.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,a=i(k.keys());!(r=a()).done;){var u=r.value;u.contains(o)&&(P(u),k.delete(u))}document.querySelectorAll("body > *").forEach((function(e){if(e instanceof HTMLElement){for(var t,n=i(C);!(t=n()).done;)if(e.contains(t.value))return;1===C.size&&(k.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),D(e))}})),t((function(){if(C.delete(o),C.size>0)document.querySelectorAll("body > *").forEach((function(e){if(e instanceof HTMLElement&&!k.has(e)){for(var t,n=i(C);!(t=n()).done;)if(e.contains(t.value))return;k.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),D(e)}}));else for(var e,t=i(k.keys());!(e=t()).done;){var n=e.value;P(n),k.delete(n)}}))}}))}(l,c),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 v=N({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===K.Open&&1===r.value.size&&(x(r.value,n)||(h.close(),t.nextTick((function(){return null==n?void 0:n.focus()}))))})),O("keydown",(function(e){e.key===s.Escape&&u.value===K.Open&&(r.value.size>1||h.close())})),t.watchEffect((function(e){if(u.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}))}})),t.watchEffect((function(e){if(u.value===K.Open){var t=V(l);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&&h.close()}}));n.observe(t),e((function(){return n.disconnect()}))}}})),{id:d,el:l,dialogRef:l,containers:r,dialogState:u,titleId:m,describedby:v}}}),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===K.Open},attrs:this.$attrs,slots:this.$slots,name:"DialogOverlay"})},setup:function(){var e=H("DialogOverlay");return{id:"headlessui-dialog-overlay-"+f(),handleClick:function(){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===K.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"}},setup:function(e,o){var r=o.slots,i=o.attrs,u=n({},e),l=t.ref(q.Closed),s=t.ref(null);return t.provide(J,{disclosureState:l,panelRef:s,toggleDisclosure:function(){var e;l.value=a(l.value,((e={})[q.Open]=q.Closed,e[q.Closed]=q.Open,e))}}),function(){return c({props:u,slot:{open:l.value===q.Open},slots:r,attrs:i,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),i=t.computed((function(){return{initialFocus:e.initialFocus}}));return t.onMounted((function(){o.value&&(n.value.add(o.value),E(n,r,i))})),t.onUnmounted((function(){r.value=!1})),{el:o}}});function ie(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 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 i=n.slice().reverse().findIndex((function(e){return!t.resolveDisabled(e)}));return-1===i?i:n.length-1-i;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===i?o:i}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"}(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,i=n.attrs,a=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=ie(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||a("update:modelValue",e)}};return O("mousedown",(function(e){var t,n,o,r=e.target,i=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(),i!==document.body&&(null==i?void 0:i.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:i,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},i={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,i),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,i=le("ListboxOptions"),a={open:i.listboxState.value===ee.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=V(i.labelRef))?void 0:o.id)?t:null==(r=V(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:a.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,i=o.attrs,a=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!==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=V(a.buttonRef))?void 0:e.focus({preventScroll:!0})}))}function y(){if(l)return a.goToOption(Z.Nothing);a.goToOption(Z.Specific,u)}function g(){l||v.value||a.goToOption(Z.Specific,u)}function S(){l||v.value&&a.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 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===ee.Open&&m.value&&(a.goToOption(Z.Specific,u),null==(e=document.getElementById(u))||null==e.focus||e.focus())}),{immediate:!0})})),t.watchEffect((function(){a.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: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 c({props:n({},e,o),slot:t,attrs:i,slots:r,name:"ListboxOption"})}}});function me(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"}(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,i=t.ref(se.Closed),a=t.ref(null),u=t.ref(null),l=t.ref([]),s=t.ref(""),d=t.ref(null),p={menuState:i,buttonRef:a,itemsRef:u,items:l,searchQuery:s,activeItemIndex:d,closeMenu:function(){i.value=se.Closed,d.value=null},openMenu:function(){return i.value=se.Open},goToItem:function(e,t){var n=ie(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;i.value===se.Open&&((null==(t=V(a))?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(a))||o.focus({preventScroll:!0})))})),t.provide(he,p),function(){return c({props:e,slot:{open:i.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},i={"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,i),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,i=o.attrs,a=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!==a.activeItemIndex.value&&a.items.value[a.activeItemIndex.value].id===u})),v=t.ref({disabled:l,textValue:""});function m(e){if(l)return e.preventDefault();a.closeMenu(),t.nextTick((function(){var e;return null==(e=V(a.buttonRef))?void 0:e.focus({preventScroll:!0})}))}function h(){if(l)return a.goToItem(Z.Nothing);a.goToItem(Z.Specific,u)}function b(){l||p.value||a.goToItem(Z.Specific,u)}function y(){l||p.value&&a.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 a.registerItem(u,v)})),t.onUnmounted((function(){return a.unregisterItem(u)})),t.watchEffect((function(){a.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:ae(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"}(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 ke(){return t.inject(Ce,null)}var De=Symbol("PopoverPanelContext"),Pe=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-"+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=a(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=ke(),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,i,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===(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=V(p))||o.focus())))})),function(){return c({props:u,slot:{open:d.value===ye.Open},slots:r,attrs:i,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=ke(),r=null==o?void 0:o.closeOthers,i=t.inject(De,null),a=null!==i&&i===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:a,el:a?null:n.button,handleKeyDown:function(e){var t,o;if(a){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 i,u;if(!l.value)return;if(null==(i=V(n.button))?void 0:i.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(!a&&(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(),i=r.indexOf(l.value);if(r.indexOf(V(n.button))>i)return;e.preventDefault(),e.stopPropagation(),w(V(n.panel),v.Last)}},handleClick:function(){var t,o;e.disabled||(a?(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(De,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 i=g(),a=i.indexOf(V(o.button));w(i.splice(a+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=i(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,i=n.name,a=void 0===i?"Label":i,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:a,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,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,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:i})},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 Ne,Ke=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=je({name:"RadioGroupLabel"}),u=N({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(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: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(),w(t,v.Previous|v.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(),w(t,v.Next|v.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"}(Ne||(Ne={}));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,i=o(e,["value","disabled","class","className"]),a={checked:this.checked,disabled:this.disabled,active:Boolean(this.state&Ne.Active)};return c({props:n({},i,{id:this.id,ref:"el",role:"radio",class:ae(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=Me("RadioGroupOption"),o="headlessui-radiogroup-option-"+f(),r=je({name:"RadioGroupLabel"}),i=N({name:"RadioGroupDescription"}),a=t.ref(null),u=t.computed((function(){return{value:e.value,disabled:e.disabled}})),l=t.ref(Ne.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|=Ne.Active,null==(t=a.value)||t.focus())},handleFocus:function(){l.value|=Ne.Active},handleBlur:function(){l.value&=~Ne.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,i=t.ref(null),a=je({name:"SwitchLabel",props:{onClick:function(){i.value&&(i.value.click(),i.value.focus({preventScroll:!0}))}}}),u=N({name:"SwitchDescription"});return t.provide(qe,{switchRef:i,labelledby:a,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,i={checked:this.$props.modelValue},a={id:this.id,ref:null===e?void 0:e.switchRef,role:"switch",tabIndex:0,class:ae(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-"+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(),i()},handleKeyUp:function(e){e.key!==s.Tab&&e.preventDefault(),e.key===s.Space&&i()},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=i(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 i,a,u=Ye(),l=void 0!==r?(i=r,a={called:!1},function(){if(!a.called)return a.called=!0,i.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})),i=r[0];return 0!==i?n.setTimeout((function(){return t(Ue.Finished)}),i+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 it(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=tt.Hidden},i)),!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 at=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:at,visible:this.state===tt.Visible,name:"TransitionChild"})},setup:function(e,n){var o=n.emit,r=t.ref(null),i=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=it((function(){y.value||(i.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&&i.value!==tt.Visible?i.value=tt.Visible:a(i.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(i.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)||(i.value=tt.Hidden,m(b),o("afterLeave")))})))))}(n),h.value=!1}),{immediate:!0})})),t.provide(ot,g),{el:r,state:i}}}),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,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(ut,n({},e.$attrs,u,a),e.$slots.default)]}}),attrs:{},features:at,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=it((function(){n.value=tt.Hidden})),r={value:!0},i={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,i),{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=Ke,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})}));
//# sourceMappingURL=headlessui.umd.production.min.js.map
{
"name": "@headlessui/vue",
"version": "1.0.0-be833ba",
"version": "1.0.0-ce8d7f5",
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc