Files
formipay/node_modules/reakit/dist/reakit.min.js
dwindown e8fbfb14c1 fix: prevent asset conflicts between React and Grid.js versions
Add coexistence checks to all enqueue methods to prevent loading
both React and Grid.js assets simultaneously.

Changes:
- ReactAdmin.php: Only enqueue React assets when ?react=1
- Init.php: Skip Grid.js when React active on admin pages
- Form.php, Coupon.php, Access.php: Restore classic assets when ?react=0
- Customer.php, Product.php, License.php: Add coexistence checks

Now the toggle between Classic and React versions works correctly.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 17:02:14 +07:00

2 lines
128 KiB
JavaScript

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["exports","react","react-dom"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Reakit={},e.React,e.ReactDOM)}(this,(function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(e,t){if(null==e)return{};var n,r,o={},u=Object.keys(e);for(r=0;r<u.length;r++)n=u[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function s(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,t);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,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}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)}var l=t.createContext({});function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function v(e,t){if(null==e)return{};var n,r,o={},u=Object.keys(e);for(r=0;r<u.length;r++)n=u[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function m(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 p(e,t);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)?p(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}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)}var b=function(e,n,r){void 0===r&&(r=n.children);var o=t.useContext(l);if(o.useCreateElement)return o.useCreateElement(e,n,r);if("string"==typeof e&&function(e){return"function"==typeof e}(r)){n.children;return r(v(n,["children"]))}return t.createElement(e,n,r)};function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _(e){return"object"==typeof e&&null!=e}function k(e){var t;if(!_(e))return!1;var n=Object.getPrototypeOf(e);return null==n||(null===(t=n.constructor)||void 0===t?void 0:t.toString())===Object.toString()}function w(e,t){for(var n={},r={},o=0,u=Object.keys(e);o<u.length;o++){var a=u[o];t.indexOf(a)>=0?n[a]=e[a]:r[a]=e[a]}return[n,r]}function I(e,t){if(void 0===t&&(t=[]),!k(e.state))return w(e,t);var n=w(e,[].concat(t,["state"])),r=n[0],o=n[1],u=r.state,a=function(e,t){if(null==e)return{};var n,r,o={},u=Object.keys(e);for(r=0;r<u.length;r++)n=u[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(r,["state"]);return[y(y({},u),a),o]}function C(e,t){if(e===t)return!0;if(!e)return!1;if(!t)return!1;if("object"!=typeof e)return!1;if("object"!=typeof t)return!1;var n=Object.keys(e),r=Object.keys(t),o=n.length;if(r.length!==o)return!1;for(var u=0,a=n;u<a.length;u++){var i=a[u];if(e[i]!==t[i])return!1}return!0}function E(e){return"normalizePropsAreEqualInner"===e.name?e:function(t,n){return k(t.state)&&k(n.state)?e(y(y({},t.state),t),y(y({},n.state),n)):e(t,n)}}function O(e){var n,r=e.as,o=e.useHook,u=e.memo,a=e.propsAreEqual,i=void 0===a?null==o?void 0:o.unstable_propsAreEqual:a,s=e.keys,l=void 0===s?(null==o?void 0:o.__keys)||[]:s,c=e.useCreateElement,d=void 0===c?b:c,p=function(e,t){var n=e.as,u=void 0===n?r:n,a=v(e,["as"]);if(o){var i,s=I(a,l),c=s[0],p=s[1],m=o(c,f({ref:t},p)),b=m.wrapElement,g=v(m,["wrapElement"]),h=(null===(i=u.render)||void 0===i?void 0:i.__keys)||u.__keys,y=h&&I(a,h)[0],_=y?f(f({},g),y):g,k=d(u,_);return b?b(k):k}return d(u,f({ref:t},a))};return n=p,p=t.forwardRef(n),u&&(p=function(e,n){return t.memo(e,n)}(p,i&&E(i))),p.__keys=l,p.unstable_propsAreEqual=E(i||C),p}function x(e,n){t.useDebugValue(e);var r=t.useContext(l);return null!=r[e]?r[e]:n}function S(e){return Array.isArray(e)?e:void 0!==e?[e]:[]}function P(e){var n,r,o=S(e.compose),u=function(n,r){if(e.useOptions&&(n=e.useOptions(n,r)),e.name&&(n=function(e,n,r){void 0===n&&(n={}),void 0===r&&(r={});var o="use"+e+"Options";t.useDebugValue(o);var u=x(o);return u?f(f({},n),u(n,r)):n}(e.name,n,r)),e.compose)for(var u,a=m(o);!(u=a()).done;){n=u.value.__useOptions(n,r)}return n},a=function(n,r,a){if(void 0===n&&(n={}),void 0===r&&(r={}),void 0===a&&(a=!1),a||(n=u(n,r)),e.useProps&&(r=e.useProps(n,r)),e.name&&(r=function(e,n,r){void 0===n&&(n={}),void 0===r&&(r={});var o="use"+e+"Props";t.useDebugValue(o);var u=x(o);return u?u(n,r):r}(e.name,n,r)),e.compose)if(e.useComposeOptions&&(n=e.useComposeOptions(n,r)),e.useComposeProps)r=e.useComposeProps(n,r);else for(var i,s=m(o);!(i=s()).done;){r=(0,i.value)(n,r,!0)}var l={},c=r||{};for(var d in c)void 0!==c[d]&&(l[d]=c[d]);return l};a.__useOptions=u;var i=o.reduce((function(e,t){return e.push.apply(e,t.__keys||[]),e}),[]);return a.__keys=[].concat(i,(null===(n=e.useState)||void 0===n?void 0:n.__keys)||[],e.keys||[]),a.unstable_propsAreEqual=e.propsAreEqual||(null===(r=o[0])||void 0===r?void 0:r.unstable_propsAreEqual)||C,a}var R=P({name:"Box",keys:["unstable_system"],propsAreEqual:function(e,t){var n=e.unstable_system,r=a(e,["unstable_system"]),o=t.unstable_system,u=a(t,["unstable_system"]);return!(n!==o&&!C(n,o))&&C(r,u)}}),A=O({as:"div",useHook:R});function T(e,t){void 0===t&&(t=null),e&&("function"==typeof e?e(t):e.current=t)}function D(e,n){return t.useMemo((function(){return null==e&&null==n?null:function(t){T(e,t),T(n,t)}}),[e,n])}var M,B=["button","color","file","image","reset","submit"];function L(e){if("BUTTON"===e.tagName)return!0;if("INPUT"===e.tagName){var t=e;return-1!==B.indexOf(t.type)}return!1}function j(e){return e?e.ownerDocument||e:document}try{M=window}catch(e){}function H(e){return e&&j(e).defaultView||M}var F=function(){var e=H();return Boolean(void 0!==e&&e.document&&e.document.createElement)}(),V=F?t.useLayoutEffect:t.useEffect;function K(e){var n=t.useRef(e);return V((function(){n.current=e})),n}function W(e){return e.target===e.currentTarget}function G(e){var t=j(e).activeElement;return null!=t&&t.nodeName?t:null}function N(e,t){return e===t||e.contains(t)}function q(e){var t=G(e);if(!t)return!1;if(N(e,t))return!0;var n=t.getAttribute("aria-activedescendant");return!!n&&(n===e.id||!!e.querySelector("#"+n))}function U(e){return!N(e.currentTarget,e.target)}function z(e){return!!F&&-1!==window.navigator.userAgent.indexOf(e)}function X(e,t){return"matches"in e?e.matches(t):"msMatchesSelector"in e?e.msMatchesSelector(t):e.webkitMatchesSelector(t)}function Y(e,t){if("closest"in e)return e.closest(t);do{if(X(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}var $="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])";function Z(e){return X(e,$)&&function(e){var t=e;return t.offsetWidth>0||t.offsetHeight>0||e.getClientRects().length>0}(e)}function J(e){return Z(e)&&!function(e){return parseInt(e.getAttribute("tabindex")||"0",10)<0}(e)}function Q(e,t){var n=Array.from(e.querySelectorAll($)),r=n.filter(J);return J(e)&&r.unshift(e),!r.length&&t?n:r}function ee(e,t){return Q(e,t)[0]||null}var te=P({name:"Role",keys:["unstable_system"],propsAreEqual:function(e,t){var n=e.unstable_system,r=a(e,["unstable_system"]),o=t.unstable_system,u=a(t,["unstable_system"]);return!(n!==o&&!C(n,o))&&C(r,u)}}),ne=O({as:"div",useHook:te}),re=z("Mac")&&!z("Chrome")&&(z("Safari")||z("Firefox"));function oe(e){!q(e)&&Z(e)&&e.focus()}function ue(e,t,n,r){return e?t&&!n?-1:void 0:t?r:r||0}function ae(e,n){return t.useCallback((function(t){var r;null===(r=e.current)||void 0===r||r.call(e,t),t.defaultPrevented||n&&(t.stopPropagation(),t.preventDefault())}),[e,n])}var ie=P({name:"Tabbable",compose:te,keys:["disabled","focusable"],useOptions:function(e,t){return u({disabled:t.disabled},e)},useProps:function(e,n){var r=n.ref,o=n.tabIndex,i=n.onClickCapture,s=n.onMouseDownCapture,l=n.onMouseDown,c=n.onKeyPressCapture,d=n.style,f=a(n,["ref","tabIndex","onClickCapture","onMouseDownCapture","onMouseDown","onKeyPressCapture","style"]),v=t.useRef(null),p=K(i),m=K(s),b=K(l),g=K(c),h=!!e.disabled&&!e.focusable,y=t.useState(!0),_=y[0],k=y[1],w=t.useState(!0),I=w[0],C=w[1],E=e.disabled?u({pointerEvents:"none"},d):d;V((function(){var e=v.current;e&&(["BUTTON","INPUT","SELECT","TEXTAREA","A"].includes(e.tagName)||k(!1),function(e){return["BUTTON","INPUT","SELECT","TEXTAREA"].includes(e.tagName)}(e)||C(!1))}),[]);var O=ae(p,e.disabled),x=ae(m,e.disabled),S=ae(g,e.disabled),P=t.useCallback((function(e){var t;null===(t=b.current)||void 0===t||t.call(b,e);var n=e.currentTarget;if(!e.defaultPrevented&&re&&!U(e)&&L(n)){var r=requestAnimationFrame((function(){n.removeEventListener("mouseup",o,!0),oe(n)})),o=function(){cancelAnimationFrame(r),oe(n)};n.addEventListener("mouseup",o,{once:!0,capture:!0})}}),[]);return u({ref:D(v,r),style:E,tabIndex:ue(h,_,I,o),disabled:!(!h||!I)||void 0,"aria-disabled":!!e.disabled||void 0,onClickCapture:O,onMouseDownCapture:x,onMouseDown:P,onKeyPressCapture:S},f)}}),se=O({as:"div",useHook:ie});var le=P({name:"Clickable",compose:ie,keys:["unstable_clickOnEnter","unstable_clickOnSpace"],useOptions:function(e){var t=e.unstable_clickOnEnter,n=void 0===t||t,r=e.unstable_clickOnSpace;return u({unstable_clickOnEnter:n,unstable_clickOnSpace:void 0===r||r},a(e,["unstable_clickOnEnter","unstable_clickOnSpace"]))},useProps:function(e,n){var r=n.onKeyDown,o=n.onKeyUp,i=a(n,["onKeyDown","onKeyUp"]),s=t.useState(!1),l=s[0],c=s[1],d=K(r),f=K(o),v=t.useCallback((function(t){var n;if(null===(n=d.current)||void 0===n||n.call(d,t),!t.defaultPrevented&&!e.disabled&&!t.metaKey&&W(t)){var r=e.unstable_clickOnEnter&&"Enter"===t.key,o=e.unstable_clickOnSpace&&" "===t.key;if(r||o){if(function(e){var t=e.currentTarget;return!!e.isTrusted&&(L(t)||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||"A"===t.tagName||"SELECT"===t.tagName)}(t))return;t.preventDefault(),r?t.currentTarget.click():o&&c(!0)}}}),[e.disabled,e.unstable_clickOnEnter,e.unstable_clickOnSpace]),p=t.useCallback((function(t){var n;if(null===(n=f.current)||void 0===n||n.call(f,t),!t.defaultPrevented&&!e.disabled&&!t.metaKey){var r=e.unstable_clickOnSpace&&" "===t.key;l&&r&&(c(!1),t.currentTarget.click())}}),[e.disabled,e.unstable_clickOnSpace,l]);return u({"data-active":l||void 0,onKeyDown:v,onKeyUp:p},i)}}),ce=O({as:"button",memo:!0,useHook:le}),de=P({name:"Button",compose:le,keys:[],useProps:function(e,n){var r=n.ref,o=a(n,["ref"]),i=t.useRef(null),s=t.useState(void 0),l=s[0],c=s[1],d=t.useState("button"),f=d[0],v=d[1];return t.useEffect((function(){var e=i.current;e&&(L(e)||("A"!==e.tagName&&c("button"),v(void 0)))}),[]),u({ref:D(i,r),role:l,type:f},o)}}),fe=O({as:"button",memo:!0,useHook:de});function ve(e,t){return-1===t?e:[].concat(e.slice(0,t),e.slice(t+1))}function pe(e,t,n){if("function"==typeof Event)return new Event(t,n);var r=j(e).createEvent("Event");return r.initEvent(t,null==n?void 0:n.bubbles,null==n?void 0:n.cancelable),r}var me=[].concat(["state","setState"],["value","checked"]);function be(e){return void 0!==e.checked?e.checked:void 0===e.value?!!e.state:-1!==(Array.isArray(e.state)?e.state:[]).indexOf(e.value)}var ge=P({name:"Checkbox",compose:le,keys:me,useOptions:function(e,t){var n=t.value,r=t.checked,o=e.unstable_clickOnEnter,i=void 0!==o&&o,s=a(e,["unstable_clickOnEnter"]);return u({unstable_clickOnEnter:i,value:n,checked:be(u({checked:r},s))},s)},useProps:function(e,n){var r=n.ref,o=n.onChange,i=n.onClick,s=a(n,["ref","onChange","onClick"]),l=t.useRef(null),c=t.useState(!0),d=c[0],f=c[1],v=K(o),p=K(i);t.useEffect((function(){var e=l.current;e&&("INPUT"===e.tagName&&"checkbox"===e.type||f(!1))}),[]),function(e,n){t.useEffect((function(){var t=e.current;t&&("indeterminate"===n.state?t.indeterminate=!0:t.indeterminate&&(t.indeterminate=!1))}),[n.state,e])}(l,e);var m=t.useCallback((function(t){var n=t.currentTarget;if(e.disabled)return t.stopPropagation(),void t.preventDefault();if(v.current&&(d||(n.checked=!n.checked),v.current(t)),e.setState)if(void 0===e.value)e.setState(!e.checked);else{var r=Array.isArray(e.state)?e.state:[],o=r.indexOf(e.value);-1===o?e.setState([].concat(r,[e.value])):e.setState(ve(r,o))}}),[e.disabled,d,e.setState,e.value,e.checked,e.state]),b=t.useCallback((function(e){var t;null===(t=p.current)||void 0===t||t.call(p,e),e.defaultPrevented||d||function(e,t){var n=pe(e,"change");Object.defineProperties(n,{type:{value:"change"},target:{value:e},currentTarget:{value:e}}),null==t||t(n)}(e.currentTarget,m)}),[d,m]);return u({ref:D(l,r),role:d?void 0:"checkbox",type:d?"checkbox":void 0,value:d?e.value:void 0,checked:e.checked,"aria-checked":"indeterminate"===e.state?"mixed":e.checked,onChange:m,onClick:b},s)}}),he=O({as:"input",memo:!0,useHook:ge});function ye(e){return t.useState(e)[0]}function _e(e,n){var r=t.useRef(!1);t.useEffect((function(){if(r.current)return e();r.current=!0}),n)}function ke(e,t,n){return void 0===n&&(n={}),"function"==typeof FocusEvent?new FocusEvent(t,n):pe(e,t,n)}function we(e,t){var n=ke(e,"blur",t),r=e.dispatchEvent(n),o=y(y({},t),{},{bubbles:!0});return e.dispatchEvent(ke(e,"focusout",o)),r}function Ie(e,t,n){return e.dispatchEvent(function(e,t,n){if(void 0===n&&(n={}),"function"==typeof KeyboardEvent)return new KeyboardEvent(t,n);var r=j(e).createEvent("KeyboardEvent");return r.initKeyboardEvent(t,n.bubbles,n.cancelable,H(e),n.key,n.location,n.ctrlKey,n.altKey,n.shiftKey,n.metaKey),r}(e,t,n))}var Ce=F&&"msCrypto"in window;function Ee(e){return Ce?G(e.currentTarget):e.relatedTarget}function Oe(e){for(var t,n=[[]],r=function(){var e=t.value,r=n.find((function(t){return!t[0]||t[0].groupId===e.groupId}));r?r.push(e):n.push([e])},o=s(e);!(t=o()).done;)r();return n}function xe(e){for(var t,n=[],r=s(e);!(t=r()).done;){var o=t.value;n.push.apply(n,o)}return n}function Se(e,t){return t?e.find((function(e){return!e.disabled&&e.id!==t})):e.find((function(e){return!e.disabled}))}function Pe(e){return e.slice().reverse()}function Re(e,t){var n;return t||null===t?t:e.currentId||null===e.currentId?e.currentId:null===(n=Se(e.items||[]))||void 0===n?void 0:n.id}function Ae(e,t){if(t)return null==e?void 0:e.find((function(e){return e.id===t&&!e.disabled}))}var Te=["baseId","unstable_idCountRef","setBaseId","unstable_virtual","rtl","orientation","items","groups","currentId","loop","wrap","shift","unstable_moves","unstable_hasActiveWidget","unstable_includesBaseElement","registerItem","unregisterItem","registerGroup","unregisterGroup","move","next","previous","up","down","first","last","sort","unstable_setVirtual","setRTL","setOrientation","setCurrentId","setLoop","setWrap","setShift","reset","unstable_setIncludesBaseElement","unstable_setHasActiveWidget"],De=Te,Me=De,Be=Me;function Le(e){e.userFocus=!0,e.focus(),e.userFocus=!1}function je(e,t){e.userFocus=t}var He=F&&"msCrypto"in window;function Fe(e,n,r){var o=K(r);return t.useCallback((function(t){var r;if(null===(r=o.current)||void 0===r||r.call(o,t),!t.defaultPrevented&&e&&function(e){return!!W(e)&&!e.metaKey&&"Tab"!==e.key}(t)){var u=null==n?void 0:n.ref.current;u&&(Ie(u,t.type,t)||t.preventDefault(),t.currentTarget.contains(u)&&t.stopPropagation())}}),[e,n])}function Ve(e,t){return null==e?void 0:e.some((function(e){return!!t&&e.ref.current===t}))}var Ke=P({name:"Composite",compose:[ie],keys:Te,useOptions:function(e){return u(u({},e),{},{currentId:Re(e)})},useProps:function(e,n){var r=n.ref,o=n.onFocusCapture,i=n.onFocus,s=n.onBlurCapture,l=n.onKeyDown,c=n.onKeyDownCapture,d=n.onKeyUpCapture,f=a(n,["ref","onFocusCapture","onFocus","onBlurCapture","onKeyDown","onKeyDownCapture","onKeyUpCapture"]),v=t.useRef(null),p=Ae(e.items,e.currentId),m=t.useRef(null),b=K(o),g=K(i),h=K(s),y=K(l),_=function(e){var n=K(e),r=t.useReducer((function(e){return e+1}),0),o=r[0],u=r[1];return t.useEffect((function(){var e,t=null===(e=n.current)||void 0===e?void 0:e.ref.current;o&&t&&Le(t)}),[o]),u}(p),k=He?function(e){var n=t.useRef(null);return t.useEffect((function(){var t=j(e.current),r=function(e){var t=e.target;n.current=t};return t.addEventListener("focus",r,!0),function(){t.removeEventListener("focus",r,!0)}}),[]),n}(v):void 0;t.useEffect((function(){var t=v.current;e.unstable_moves&&!p&&(null==t||t.focus())}),[e.unstable_moves,p]);var w=Fe(e.unstable_virtual,p,c),I=Fe(e.unstable_virtual,p,d),C=t.useCallback((function(t){var n;if(null===(n=b.current)||void 0===n||n.call(b,t),!t.defaultPrevented&&e.unstable_virtual){var r=(null==k?void 0:k.current)||t.relatedTarget,o=Ve(e.items,r);W(t)&&o&&(t.stopPropagation(),m.current=r)}}),[e.unstable_virtual,e.items]),E=t.useCallback((function(t){var n;if(null===(n=g.current)||void 0===n||n.call(g,t),!t.defaultPrevented)if(e.unstable_virtual)W(t)&&_();else if(W(t)){var r;null===(r=e.setCurrentId)||void 0===r||r.call(e,null)}}),[e.unstable_virtual,e.setCurrentId]),O=t.useCallback((function(t){var n;if(null===(n=h.current)||void 0===n||n.call(h,t),!t.defaultPrevented&&e.unstable_virtual){var r=(null==p?void 0:p.ref.current)||null,o=Ee(t),u=Ve(e.items,o);if(W(t)&&u)o===r?m.current&&m.current!==o&&we(m.current,t):r&&we(r,t),t.stopPropagation();else!Ve(e.items,t.target)&&r&&we(r,t)}}),[e.unstable_virtual,e.items,p]),x=t.useCallback((function(t){var n,r;if(null===(n=y.current)||void 0===n||n.call(y,t),!t.defaultPrevented&&null===e.currentId&&W(t)){var o="horizontal"!==e.orientation,u="vertical"!==e.orientation,a=!(null===(r=e.groups)||void 0===r||!r.length),i={ArrowUp:(a||o)&&function(){if(a){var t,n=Se(xe(Pe(Oe(e.items))));if(null!=n&&n.id)null===(t=e.move)||void 0===t||t.call(e,n.id)}else{var r;null===(r=e.last)||void 0===r||r.call(e)}},ArrowRight:(a||u)&&e.first,ArrowDown:(a||o)&&e.first,ArrowLeft:(a||u)&&e.last,Home:e.first,End:e.last,PageUp:e.first,PageDown:e.last}[t.key];i&&(t.preventDefault(),i())}}),[e.currentId,e.orientation,e.groups,e.items,e.move,e.last,e.first]);return u({ref:D(v,r),id:e.baseId,onFocus:E,onFocusCapture:C,onBlurCapture:O,onKeyDownCapture:w,onKeyDown:x,onKeyUpCapture:I,"aria-activedescendant":e.unstable_virtual&&(null==p?void 0:p.id)||void 0},f)},useComposeProps:function(e,t){t=te(e,t,!0);var n=ie(e,t,!0);return e.unstable_virtual||null===e.currentId?u({tabIndex:0},n):u(u({},t),{},{ref:n.ref})}}),We=O({as:"div",useHook:Ke,useCreateElement:function(e,t,n){return b(e,t,n)}}),Ge=["baseId","unstable_idCountRef","unstable_virtual","rtl","orientation","groups","currentId","loop","wrap","shift","unstable_moves","unstable_hasActiveWidget","unstable_includesBaseElement","items","menuRole","inputValue","minValueLength","currentValue","values","limit","matches","list","inline","autoSelect","visible","setBaseId","unregisterItem","registerGroup","unregisterGroup","move","next","previous","up","down","first","last","sort","unstable_setVirtual","setRTL","setOrientation","setCurrentId","setLoop","setWrap","setShift","reset","unstable_setIncludesBaseElement","unstable_setHasActiveWidget","registerItem","setInputValue","setMinValueLength","setValues","setLimit","setList","setInline","setAutoSelect"],Ne=[].concat(Ge,["columns","setColumns"]),qe=[].concat(Ge,["animated","animating","modal","unstable_disclosureRef","unstable_referenceRef","unstable_popoverRef","unstable_arrowRef","unstable_popoverStyles","unstable_arrowStyles","unstable_originalPlacement","unstable_update","placement","show","hide","toggle","setVisible","setAnimated","stopAnimation","setModal","place"]),Ue=[].concat(Ne,qe),ze=[].concat(Ue,["hideOnEsc"]),Xe=Ue,Ye=Xe,$e=[].concat(Ye,["value"]),Ze=Ye,Je=Ze,Qe=Je;function et(e){return e+"-menu"}function tt(e,t){var n=et(e);return t?t+" "+n:n}function nt(e){return e.list&&e.inline?"both":e.list?"list":e.inline?"inline":"none"}function rt(e,t){return!!t&&t.length>e.length&&0===t.toLowerCase().indexOf(e.toLowerCase())}var ot=P({name:"Combobox",compose:Ke,keys:ze,useOptions:function(e){var t=e.menuRole,n=void 0===t?"listbox":t,r=e.hideOnEsc;return u({menuRole:n,hideOnEsc:void 0===r||r},a(e,["menuRole","hideOnEsc"]))},useProps:function(e,n){var r=n.ref,o=n.onKeyDown,i=n.onKeyPress,s=n.onChange,l=n.onClick,c=n.onBlur,d=n["aria-controls"],f=a(n,["ref","onKeyDown","onKeyPress","onChange","onClick","onBlur","aria-controls"]),v=t.useRef(null),p=t.useReducer((function(){return{}}),{}),m=p[0],b=p[1],g=K(o),h=K(i),y=K(s),_=K(l),k=K(c),w=function(e){return t.useMemo((function(){return e.inline?function(e,t,n){if(!t)return!1;var r=e.find((function(e){return!e.disabled}));return n&&(null==r?void 0:r.id)===n}(e.items,e.autoSelect,e.currentId)?rt(e.inputValue,e.currentValue)?e.inputValue+function(e,t){if(!t)return"";var n=t.toLowerCase().indexOf(e.toLowerCase());return t.slice(n+e.length)}(e.inputValue,e.currentValue):e.inputValue:e.currentValue||e.inputValue:e.inputValue}),[e.inline,e.inputValue,e.autoSelect,e.items,e.currentId,e.currentValue])}(e),I=t.useRef(!1);t.useEffect((function(){var t,n;if(e.inline&&(e.autoSelect&&e.currentValue&&e.currentId===(t=e.items,null===(n=t.find((function(e){return!e.disabled})))||void 0===n?void 0:n.id)&&rt(e.inputValue,e.currentValue))){var r=v.current;null==r||r.setSelectionRange(e.inputValue.length,e.currentValue.length)}}),[m,e.inline,e.autoSelect,e.currentValue,e.inputValue,e.currentId,e.items]),_e((function(){e.autoSelect&&e.items.length&&I.current?e.setCurrentId(void 0):e.setCurrentId(null)}),[e.items,e.inputValue,e.autoSelect,e.setCurrentId]);var C=t.useCallback((function(t){var n,r;(null===(n=g.current)||void 0===n||n.call(g,t),I.current=!1,t.defaultPrevented)||"Escape"===t.key&&e.hideOnEsc&&(null===(r=e.hide)||void 0===r||r.call(e))}),[e.hideOnEsc,e.hide]),E=t.useCallback((function(e){var t;null===(t=h.current)||void 0===t||t.call(h,e),I.current=!0}),[]),O=t.useCallback((function(t){var n,r,o,u,a;(null===(n=y.current)||void 0===n||n.call(y,t),t.defaultPrevented)||(null===(r=e.show)||void 0===r||r.call(e),null===(o=e.setInputValue)||void 0===o||o.call(e,t.target.value),b(),e.autoSelect&&I.current?null===(u=e.setCurrentId)||void 0===u||u.call(e,void 0):null===(a=e.setCurrentId)||void 0===a||a.call(e,null))}),[e.show,e.autoSelect,e.setCurrentId,e.setInputValue]),x=t.useCallback((function(t){var n,r;if(null===(n=_.current)||void 0===n||n.call(_,t),!t.defaultPrevented){var o;if(!e.minValueLength||w.length>=e.minValueLength)null===(o=e.show)||void 0===o||o.call(e);null===(r=e.setCurrentId)||void 0===r||r.call(e,null),e.setInputValue(w)}}),[e.show,e.setCurrentId,e.setInputValue,e.minValueLength,w]),S=t.useCallback((function(t){var n;null===(n=k.current)||void 0===n||n.call(k,t),t.defaultPrevented||e.setInputValue(w)}),[e.setInputValue,w]);return u({ref:D(v,D(e.unstable_referenceRef,r)),role:"combobox",autoComplete:"off","aria-controls":tt(e.baseId,d),"aria-haspopup":e.menuRole,"aria-expanded":e.visible,"aria-autocomplete":nt(e),value:w,onKeyDown:C,onKeyPress:E,onChange:O,onClick:x,onBlur:S},f)},useComposeProps:function(e,n){var r=n.onKeyUp,o=n.onKeyDownCapture,i=n.onKeyDown,s=a(n,["onKeyUp","onKeyDownCapture","onKeyDown"]),l=Ke(e,s,!0),c=K(o),d=K(i),f=t.useCallback((function(t){var n,r;if(null===(n=c.current)||void 0===n||n.call(c,t),!t.defaultPrevented){if("grid"!==e.menuRole){if("Home"===t.key)return;if("End"===t.key)return}1!==t.key.length&&(null===(r=l.onKeyDownCapture)||void 0===r||r.call(l,t))}}),[e.menuRole,l.onKeyDownCapture]),v=t.useCallback((function(t){var n,r;if((null===(n=d.current)||void 0===n||n.call(d,t),!t.defaultPrevented)&&(null===e.currentId&&"ArrowLeft"!==t.key&&"ArrowRight"!==t.key&&"Home"!==t.key&&"End"!==t.key)){var o;if(!(t.ctrlKey||t.altKey||t.shiftKey||t.metaKey||"ArrowUp"!==t.key&&"ArrowDown"!==t.key&&1!==t.key.length))null===(o=e.show)||void 0===o||o.call(e);null===(r=l.onKeyDown)||void 0===r||r.call(l,t)}}),[e.currentId,e.show,l.onKeyDown]);return u(u({},l),{},{onKeyDownCapture:f,onKeyDown:v,onKeyUp:r})}}),ut=O({as:"input",memo:!0,useHook:ot});function at(e){try{var t=e instanceof HTMLInputElement&&null!==e.selectionStart,n="TEXTAREA"===e.tagName,r="true"===e.contentEditable;return t||n||r||!1}catch(e){return!1}}function it(e){var t=G(e);if(!t)return!1;if(t===e)return!0;var n=t.getAttribute("aria-activedescendant");return!!n&&n===e.id}function st(e,t){var n=void 0===t?{}:t,r=n.preventScroll,o=n.isActive,u=void 0===o?it:o;return u(e)?-1:(e.focus({preventScroll:r}),u(e)?-1:requestAnimationFrame((function(){e.focus({preventScroll:r})})))}function lt(e){return void 0===e&&(e="id"),(e?e+"-":"")+Math.random().toString(32).substr(2,6)}var ct=t.createContext(lt);function dt(e){var n=e.children,r=e.prefix,o=void 0===r?"id":r,u=t.useRef(0),a=t.useCallback((function(e){return void 0===e&&(e=o),(e?e+"-":"")+ ++u.current}),[o]);return t.createElement(ct.Provider,{value:a},n)}var ft=P({keys:[].concat(["baseId","unstable_idCountRef","setBaseId"],["id"]),useOptions:function(e,n){var r=t.useContext(ct),o=t.useState((function(){return e.unstable_idCountRef?(e.unstable_idCountRef.current+=1,"-"+e.unstable_idCountRef.current):e.baseId?"-"+r(""):""}))[0],a=t.useMemo((function(){return e.baseId||r()}),[e.baseId,r]),i=n.id||e.id||""+a+o;return u(u({},e),{},{id:i})},useProps:function(e,t){return u({id:e.id},t)}}),vt=O({as:"div",useHook:ft});function pt(e,t){if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement){var n,r=Object.getPrototypeOf(e),o=null===(n=Object.getOwnPropertyDescriptor(r,"value"))||void 0===n?void 0:n.set;o&&(o.call(e,t),function(e,t,n){e.dispatchEvent(pe(e,t,n))}(e,"input",{bubbles:!0}))}}function mt(e){return e.querySelector("[data-composite-item-widget]")}var bt=P({name:"CompositeItem",compose:[le,ft],keys:Me,propsAreEqual:function(e,t){if(!t.id||e.id!==t.id)return le.unstable_propsAreEqual(e,t);var n=e.currentId,r=e.unstable_moves,o=a(e,["currentId","unstable_moves"]),u=t.currentId,i=t.unstable_moves,s=a(t,["currentId","unstable_moves"]);if(u!==n){if(t.id===u||t.id===n)return!1}else if(r!==i)return!1;return le.unstable_propsAreEqual(o,s)},useOptions:function(e){return u(u({},e),{},{id:e.id,currentId:Re(e),unstable_clickOnSpace:!e.unstable_hasActiveWidget&&e.unstable_clickOnSpace})},useProps:function(e,n){var r,o=n.ref,i=n.tabIndex,l=void 0===i?0:i,c=n.onMouseDown,d=n.onFocus,f=n.onBlurCapture,v=n.onKeyDown,p=n.onClick,m=a(n,["ref","tabIndex","onMouseDown","onFocus","onBlurCapture","onKeyDown","onClick"]),b=t.useRef(null),g=e.id,h=e.disabled&&!e.focusable,y=e.currentId===g,_=K(y),k=t.useRef(!1),w=function(e){return t.useMemo((function(){var t;return null===(t=e.items)||void 0===t?void 0:t.find((function(t){return e.id&&t.id===e.id}))}),[e.items,e.id])}(e),I=K(c),C=K(d),E=K(f),O=K(v),x=K(p),S=!e.unstable_virtual&&!e.unstable_hasActiveWidget&&y||!(null!==(r=e.items)&&void 0!==r&&r.length);t.useEffect((function(){var t;if(g)return null===(t=e.registerItem)||void 0===t||t.call(e,{id:g,ref:b,disabled:!!h}),function(){var t;null===(t=e.unregisterItem)||void 0===t||t.call(e,g)}}),[g,h,e.registerItem,e.unregisterItem]),t.useEffect((function(){var t=b.current;t&&e.unstable_moves&&_.current&&Le(t)}),[e.unstable_moves]);var P=t.useCallback((function(e){var t;null===(t=I.current)||void 0===t||t.call(I,e),je(e.currentTarget,!0)}),[]),R=t.useCallback((function(t){var n,r,o=!!t.currentTarget.userFocus;if(je(t.currentTarget,!1),null===(n=C.current)||void 0===n||n.call(C,t),!t.defaultPrevented&&!U(t)&&g&&!function(e,t){if(W(e))return!1;for(var n,r=s(t);!(n=r()).done;)if(n.value.ref.current===e.target)return!0;return!1}(t,e.items)&&(null===(r=e.setCurrentId)||void 0===r||r.call(e,g),o&&e.unstable_virtual&&e.baseId&&W(t))){var u=j(t.target).getElementById(e.baseId);u&&(k.current=!0,st(u))}}),[g,e.items,e.setCurrentId,e.unstable_virtual,e.baseId]),A=t.useCallback((function(t){var n;null===(n=E.current)||void 0===n||n.call(E,t),t.defaultPrevented||e.unstable_virtual&&k.current&&(k.current=!1,t.preventDefault(),t.stopPropagation())}),[e.unstable_virtual]),T=t.useCallback((function(t){var n;if(W(t)){var r="horizontal"!==e.orientation,o="vertical"!==e.orientation,u=!(null==w||!w.groupId),a={ArrowUp:(u||r)&&e.up,ArrowRight:(u||o)&&e.next,ArrowDown:(u||r)&&e.down,ArrowLeft:(u||o)&&e.previous,Home:function(){var n,r;!u||t.ctrlKey?null===(n=e.first)||void 0===n||n.call(e):null===(r=e.previous)||void 0===r||r.call(e,!0)},End:function(){var n,r;!u||t.ctrlKey?null===(n=e.last)||void 0===n||n.call(e):null===(r=e.next)||void 0===r||r.call(e,!0)},PageUp:function(){var t,n;u?null===(t=e.up)||void 0===t||t.call(e,!0):null===(n=e.first)||void 0===n||n.call(e)},PageDown:function(){var t,n;u?null===(t=e.down)||void 0===t||t.call(e,!0):null===(n=e.last)||void 0===n||n.call(e)}}[t.key];if(a)return t.preventDefault(),void a();if(null===(n=O.current)||void 0===n||n.call(O,t),!t.defaultPrevented)if(1===t.key.length&&" "!==t.key){var i=mt(t.currentTarget);i&&at(i)&&(i.focus(),pt(i,""))}else if("Delete"===t.key||"Backspace"===t.key){var s=mt(t.currentTarget);s&&at(s)&&(t.preventDefault(),pt(s,""))}}}),[e.orientation,w,e.up,e.next,e.down,e.previous,e.first,e.last]),M=t.useCallback((function(e){var t;if(null===(t=x.current)||void 0===t||t.call(x,e),!e.defaultPrevented){var n=mt(e.currentTarget);n&&!q(n)&&n.focus()}}),[]);return u({ref:D(b,o),id:g,tabIndex:S?l:-1,"aria-selected":!(!e.unstable_virtual||!y)||void 0,onMouseDown:P,onFocus:R,onBlurCapture:A,onKeyDown:T,onClick:M},m)}}),gt=O({as:"button",memo:!0,useHook:bt}),ht=["baseId","unstable_idCountRef","unstable_virtual","rtl","orientation","items","groups","currentId","loop","wrap","shift","unstable_moves","unstable_hasActiveWidget","unstable_includesBaseElement","setBaseId","registerItem","unregisterItem","registerGroup","unregisterGroup","move","next","previous","up","down","first","last","sort","unstable_setVirtual","setRTL","setOrientation","setCurrentId","setLoop","setWrap","setShift","reset","unstable_setIncludesBaseElement","unstable_setHasActiveWidget"],yt=ht,_t=P({name:"GridCell",compose:bt,keys:ht,useProps:function(e,t){return u({role:"gridcell"},t)}}),kt=O({as:"span",memo:!0,useHook:_t});function wt(e,t,n){return n||e+"-"+t.toLowerCase().replace(/[^a-z0-9]/g,"-")}var It=P({name:"ComboboxItem",compose:R,keys:$e,propsAreEqual:function(e,t){if(e.value!==t.value)return!1;if(!(e.value&&t.value&&e.baseId&&t.baseId))return bt.unstable_propsAreEqual(e,t);var n=e.currentValue,r=(e.inputValue,e.matches,a(e,["currentValue","inputValue","matches"])),o=t.currentValue,i=(t.inputValue,t.matches,a(t,["currentValue","inputValue","matches"]));if(n!==o&&(t.value===n||t.value===o))return!1;var s=wt(e.baseId,e.value,e.id),l=wt(t.baseId,t.value,e.id);return bt.unstable_propsAreEqual(u(u({},r),{},{id:s}),u(u({},i),{},{id:l}))},useOptions:function(e){var n=e.disabled&&!e.focusable?void 0:e.value,r=t.useCallback((function(t){var r;e.visible&&(null===(r=e.registerItem)||void 0===r||r.call(e,u(u({},t),{},{value:n})))}),[e.registerItem,e.visible,n]);if(e.id||!e.baseId||!e.value)return u(u({},e),{},{registerItem:r});var o=wt(e.baseId,e.value,e.id);return u(u({},e),{},{registerItem:r,id:o})},useProps:function(e,n){var r=n.onClick,o=a(n,["onClick"]),i=K(r),s=t.useCallback((function(t){var n,r,o;null===(n=i.current)||void 0===n||n.call(i,t),t.defaultPrevented||e.value&&(null===(r=e.hide)||void 0===r||r.call(e),null===(o=e.setInputValue)||void 0===o||o.call(e,e.value))}),[e.hide,e.setInputValue,e.value]);return u({children:e.value,onClick:s,tabIndex:-1},o)}}),Ct=O({as:"span",memo:!0,useHook:It}),Et=P({name:"ComboboxGridCell",compose:[It,_t],keys:Xe}),Ot=O({as:"span",memo:!0,useHook:Et}),xt=P({name:"Group",compose:te,keys:[],useProps:function(e,t){return u({role:"group"},t)}}),St=O({as:"div",useHook:xt}),Pt=P({name:"CompositeGroup",compose:[xt,ft],keys:De,propsAreEqual:function(e,t){if(!t.id||e.id!==t.id)return xt.unstable_propsAreEqual(e,t);var n=e.currentId,r=(e.unstable_moves,a(e,["currentId","unstable_moves"])),o=t.currentId,u=(t.unstable_moves,a(t,["currentId","unstable_moves"]));if(e.items&&t.items){var i=Ae(e.items,n),s=Ae(t.items,o),l=null==i?void 0:i.groupId,c=null==s?void 0:s.groupId;if(t.id===c||t.id===l)return!1}return xt.unstable_propsAreEqual(r,u)},useProps:function(e,n){var r=n.ref,o=a(n,["ref"]),i=t.useRef(null),s=e.id;return V((function(){var t;if(s)return null===(t=e.registerGroup)||void 0===t||t.call(e,{id:s,ref:i}),function(){var t;null===(t=e.unregisterGroup)||void 0===t||t.call(e,s)}}),[s,e.registerGroup,e.unregisterGroup]),u({ref:D(i,r)},o)}}),Rt=O({as:"div",useHook:Pt}),At=P({name:"GridRow",compose:Pt,keys:yt,useProps:function(e,t){return u({role:"row"},t)}}),Tt=O({as:"div",useHook:At}),Dt=P({name:"ComboboxGridRow",compose:At,keys:Ye}),Mt=O({as:"div",useHook:Dt});function Bt(e,t){return function(e){return"function"==typeof e}(e)?e(t):e}function Lt(e){void 0===e&&(e={});var n=ye(e).baseId,r=t.useContext(ct),o=t.useRef(0),u=t.useState((function(){return n||r()}));return{baseId:u[0],setBaseId:u[1],unstable_idCountRef:o}}function jt(e,t){return Boolean(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function Ht(e,t){return e.findIndex((function(e){return!(!e.ref.current||!t.ref.current)&&jt(t.ref.current,e.ref.current)}))}function Ft(e){for(var t,n=0,r=s(e);!(t=r()).done;){var o=t.value.length;o>n&&(n=o)}return n}function Vt(e){for(var t=Oe(e),n=Ft(t),r=[],o=0;o<n;o+=1)for(var a,i=s(t);!(a=i()).done;){var l=a.value;l[o]&&r.push(u(u({},l[o]),{},{groupId:l[o].groupId?""+o:void 0}))}return r}function Kt(e,t,n){for(var r,o=Ft(e),u=s(e);!(r=u()).done;)for(var a=r.value,i=0;i<o;i+=1){var l=a[i];if(!l||n&&l.disabled){var c=0===i&&n?Se(a):a[i-1];a[i]=c&&t!==(null==c?void 0:c.id)&&n?c:{id:"__EMPTY_ITEM__",disabled:!0,ref:{current:null},groupId:null==c?void 0:c.groupId}}}return e}var Wt={id:null,ref:{current:null}};function Gt(e,t){return e.filter((function(e){return e.groupId===t}))}var Nt={horizontal:"vertical",vertical:"horizontal"};function qt(e,t,n){return n in e?[].concat(e.slice(0,n),[t],e.slice(n)):[].concat(e,[t])}function Ut(e){var t=e.map((function(e,t){return[t,e]})),n=!1;return t.sort((function(e,t){var r=e[0],o=e[1],u=t[0],a=t[1],i=o.ref.current,s=a.ref.current;return i&&s?jt(i,s)?(r>u&&(n=!0),-1):(r<u&&(n=!0),1):0})),n?t.map((function(e){e[0];return e[1]})):e}function zt(e,t){var n=Ut(e);e!==n&&t(n)}function Xt(e,n){var r=t.useRef([]);t.useEffect((function(){for(var t,o=function(e){for(var t,n=e[0],r=e.slice(1),o=null==n||null===(t=n.ref.current)||void 0===t?void 0:t.parentElement,u=function(){var e=o;if(r.every((function(t){return e.contains(t.ref.current)})))return{v:o};o=o.parentElement};o;){var a=u();if("object"==typeof a)return a.v}return j(o).body}(e),u=new IntersectionObserver((function(){!!r.current.length&&zt(e,n),r.current=e}),{root:o}),a=s(e);!(t=a()).done;){var i=t.value;i.ref.current&&u.observe(i.ref.current)}return function(){u.disconnect()}}),[e])}function Yt(e,n){"function"==typeof IntersectionObserver?Xt(e,n):function(e,n){t.useEffect((function(){var t=setTimeout((function(){return zt(e,n)}),250);return function(){return clearTimeout(t)}}))}(e,n)}function $t(e,t){var n=e.unstable_virtual,r=e.rtl,o=e.orientation,a=e.items,i=e.groups,s=e.currentId,l=e.loop,c=e.wrap,d=e.pastIds,f=e.shift,v=e.unstable_moves,p=e.unstable_includesBaseElement,m=e.initialVirtual,b=e.initialRTL,g=e.initialOrientation,h=e.initialCurrentId,y=e.initialLoop,_=e.initialWrap,k=e.initialShift,w=e.hasSetCurrentId;switch(t.type){case"registerGroup":var I=t.group;if(0===i.length)return u(u({},e),{},{groups:[I]});var C=Ht(i,I);return u(u({},e),{},{groups:qt(i,I,C)});case"unregisterGroup":var E=t.id,O=i.filter((function(e){return e.id!==E}));return O.length===i.length?e:u(u({},e),{},{groups:O});case"registerItem":var x,S=t.item,P=i.find((function(e){var t;return null===(t=e.ref.current)||void 0===t?void 0:t.contains(S.ref.current)})),R=u({groupId:null==P?void 0:P.id},S),A=Ht(a,R),T=u(u({},e),{},{items:qt(a,R,A)});return w||v||void 0!==h?T:u(u({},T),{},{currentId:null===(x=Se(T.items))||void 0===x?void 0:x.id});case"unregisterItem":var D=t.id,M=a.filter((function(e){return e.id!==D}));if(M.length===a.length)return e;var B=d.filter((function(e){return e!==D})),L=u(u({},e),{},{pastIds:B,items:M});if(s&&s===D){var j=p?null:Re(u(u({},L),{},{currentId:B[0]}));return u(u({},L),{},{currentId:j})}return L;case"move":var H=t.id;if(void 0===H)return e;var F=d.filter((function(e){return e!==s&&e!==H})),V=s?[s].concat(F):F,K=u(u({},e),{},{pastIds:V});if(null===H)return u(u({},K),{},{unstable_moves:v+1,currentId:Re(K,H)});var W=Ae(a,H);return u(u({},K),{},{unstable_moves:W?v+1:v,currentId:Re(K,null==W?void 0:W.id)});case"next":if(null==s)return $t(e,u(u({},t),{},{type:"first"}));var G=r&&"vertical"!==o,N=G?Pe(a):a,q=N.find((function(e){return e.id===s}));if(!q)return $t(e,u(u({},t),{},{type:"first"}));var U=!!q.groupId,z=N.indexOf(q),X=N.slice(z+1),Y=Gt(X,q.groupId);if(t.allTheWay){var $=Se(G?Gt(N,q.groupId):Pe(Y));return $t(e,u(u({},t),{},{type:"move",id:null==$?void 0:$.id}))}var Z=function(e){return e&&Nt[e]}(U?o||"horizontal":o),J=l&&l!==Z,Q=U&&c&&c!==Z,ee=t.hasNullItem||!U&&J&&p;if(J){var te=Se(function(e,t,n){var r=e.findIndex((function(e){return e.id===t}));return[].concat(e.slice(r+1),n?[Wt]:[],e.slice(0,r))}(Q&&!ee?N:Gt(N,q.groupId),s,ee),s);return $t(e,u(u({},t),{},{type:"move",id:null==te?void 0:te.id}))}if(Q){var ne=Se(ee?Y:X,s),re=ee?(null==ne?void 0:ne.id)||null:null==ne?void 0:ne.id;return $t(e,u(u({},t),{},{type:"move",id:re}))}var oe=Se(Y,s);return $t(e,!oe&&ee?u(u({},t),{},{type:"move",id:null}):u(u({},t),{},{type:"move",id:null==oe?void 0:oe.id}));case"previous":var ue=!!!i.length&&p,ae=$t(u(u({},e),{},{items:Pe(a)}),u(u({},t),{},{type:"next",hasNullItem:ue}));return u(u({},ae),{},{items:a});case"down":var ie=f&&!t.allTheWay,se=Vt(xe(Kt(Oe(a),s,ie))),le=l&&"horizontal"!==l&&p,ce=$t(u(u({},e),{},{orientation:"vertical",items:se}),u(u({},t),{},{type:"next",hasNullItem:le}));return u(u({},ce),{},{orientation:o,items:a});case"up":var de=f&&!t.allTheWay,fe=Vt(Pe(xe(Kt(Oe(a),s,de)))),ve=p,pe=$t(u(u({},e),{},{orientation:"vertical",items:fe}),u(u({},t),{},{type:"next",hasNullItem:ve}));return u(u({},pe),{},{orientation:o,items:a});case"first":var me=Se(a);return $t(e,u(u({},t),{},{type:"move",id:null==me?void 0:me.id}));case"last":var be=$t(u(u({},e),{},{items:Pe(a)}),u(u({},t),{},{type:"first"}));return u(u({},be),{},{items:a});case"sort":return u(u({},e),{},{items:Ut(a),groups:Ut(i)});case"setVirtual":return u(u({},e),{},{unstable_virtual:Bt(t.virtual,n)});case"setRTL":return u(u({},e),{},{rtl:Bt(t.rtl,r)});case"setOrientation":return u(u({},e),{},{orientation:Bt(t.orientation,o)});case"setCurrentId":var ge=Re(u(u({},e),{},{currentId:Bt(t.currentId,s)}));return u(u({},e),{},{currentId:ge,hasSetCurrentId:!0});case"setLoop":return u(u({},e),{},{loop:Bt(t.loop,l)});case"setWrap":return u(u({},e),{},{wrap:Bt(t.wrap,c)});case"setShift":return u(u({},e),{},{shift:Bt(t.shift,f)});case"setIncludesBaseElement":return u(u({},e),{},{unstable_includesBaseElement:Bt(t.includesBaseElement,p)});case"reset":return u(u({},e),{},{unstable_virtual:m,rtl:b,orientation:g,currentId:Re(u(u({},e),{},{currentId:h})),loop:y,wrap:_,shift:k,unstable_moves:0,pastIds:[]});case"setItems":return u(u({},e),{},{items:t.items});default:throw new Error}}function Zt(e){return t.useCallback(e,[])}function Jt(e){void 0===e&&(e={});var n=ye(e),r=n.unstable_virtual,o=void 0!==r&&r,i=n.rtl,s=void 0!==i&&i,l=n.orientation,c=n.currentId,d=n.loop,f=void 0!==d&&d,v=n.wrap,p=void 0!==v&&v,m=n.shift,b=void 0!==m&&m,g=n.unstable_includesBaseElement,h=Lt(a(n,["unstable_virtual","rtl","orientation","currentId","loop","wrap","shift","unstable_includesBaseElement"])),y=t.useReducer($t,{unstable_virtual:o,rtl:s,orientation:l,items:[],groups:[],currentId:c,loop:f,wrap:p,shift:b,unstable_moves:0,pastIds:[],unstable_includesBaseElement:null!=g?g:null===c,initialVirtual:o,initialRTL:s,initialOrientation:l,initialCurrentId:c,initialLoop:f,initialWrap:p,initialShift:b}),_=y[0],k=(_.pastIds,_.initialVirtual,_.initialRTL,_.initialOrientation,_.initialCurrentId,_.initialLoop,_.initialWrap,_.initialShift,_.hasSetCurrentId,a(_,["pastIds","initialVirtual","initialRTL","initialOrientation","initialCurrentId","initialLoop","initialWrap","initialShift","hasSetCurrentId"])),w=y[1],I=t.useState(!1),C=I[0],E=I[1],O=function(){var e=t.useRef(!1);return V((function(){return function(){e.current=!0}}),[]),e}(),x=t.useCallback((function(e){return w({type:"setItems",items:e})}),[]);return Yt(k.items,x),u(u(u({},h),k),{},{unstable_hasActiveWidget:C,unstable_setHasActiveWidget:E,registerItem:Zt((function(e){O.current||w({type:"registerItem",item:e})})),unregisterItem:Zt((function(e){O.current||w({type:"unregisterItem",id:e})})),registerGroup:Zt((function(e){O.current||w({type:"registerGroup",group:e})})),unregisterGroup:Zt((function(e){O.current||w({type:"unregisterGroup",id:e})})),move:Zt((function(e){return w({type:"move",id:e})})),next:Zt((function(e){return w({type:"next",allTheWay:e})})),previous:Zt((function(e){return w({type:"previous",allTheWay:e})})),up:Zt((function(e){return w({type:"up",allTheWay:e})})),down:Zt((function(e){return w({type:"down",allTheWay:e})})),first:Zt((function(){return w({type:"first"})})),last:Zt((function(){return w({type:"last"})})),sort:Zt((function(){return w({type:"sort"})})),unstable_setVirtual:Zt((function(e){return w({type:"setVirtual",virtual:e})})),setRTL:Zt((function(e){return w({type:"setRTL",rtl:e})})),setOrientation:Zt((function(e){return w({type:"setOrientation",orientation:e})})),setCurrentId:Zt((function(e){return w({type:"setCurrentId",currentId:e})})),setLoop:Zt((function(e){return w({type:"setLoop",loop:e})})),setWrap:Zt((function(e){return w({type:"setWrap",wrap:e})})),setShift:Zt((function(e){return w({type:"setShift",shift:e})})),unstable_setIncludesBaseElement:Zt((function(e){return w({type:"setIncludesBaseElement",includesBaseElement:e})})),reset:Zt((function(){return w({type:"reset"})}))})}function Qt(e){return void 0===e&&(e={}),Jt(ye(e))}function en(e,n){var r=void 0===n?{}:n,o=r.inputValue,a=void 0===o?"":o,i=r.minValueLength,l=void 0===i?0:i,c=r.values,d=void 0===c?[]:c,f=r.limit,v=void 0===f?10:f,p=r.list,m=void 0===p?!!d.length:p,b=r.inline,g=void 0!==b&&b,h=r.autoSelect,y=void 0!==h&&h,_=t.useRef({}),k=t.useState(a),w=k[0],I=k[1],C=t.useState(l),E=C[0],O=C[1],x=t.useState(d),S=x[0],P=x[1],R=t.useState(v),A=R[0],T=R[1],D=t.useState(m),M=D[0],B=D[1],L=t.useState(g),j=L[0],H=L[1],F=t.useState(y),V=F[0],K=F[1],W=t.useMemo((function(){return function(e,t,n,r,o,u){if(0===n||e.length<u)return[];var a=!1===n?void 0:n;if(!r)return t.slice(0,a);var i=new RegExp(e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"i"),l=[];if(o){var c=t.find((function(e){return 0===e.search(i)}));c&&l.push(c)}for(var d,f=s(t);!(d=f()).done;){var v=d.value;if(a&&l.length>=a)break;v!==l[0]&&-1!==v.search(i)&&l.push(v)}return l}(w,S,A,M,V,E)}),[w,S,A,M,V,E]),G=t.useMemo((function(){return e.currentId?_.current[e.currentId]:void 0}),[_,e.currentId]),N=t.useMemo((function(){return e.items.forEach((function(e){e.id&&(e.value=_.current[e.id])})),e.items}),[e.items]),q=t.useCallback((function(t){e.registerItem(t),t.id&&(_.current[t.id]=t.value)}),[e.registerItem]),U=t.useCallback((function(t){e.unregisterItem(t),delete _.current[t]}),[e.unregisterItem]);return u(u({},e),{},{menuRole:"listbox",items:N,registerItem:q,unregisterItem:U,visible:!0,inputValue:w,minValueLength:E,currentValue:G,values:S,limit:A,matches:W,list:M,inline:j,autoSelect:V,setInputValue:I,setMinValueLength:O,setValues:P,setLimit:T,setList:B,setInline:H,setAutoSelect:K})}function tn(e){void 0===e&&(e={});var n=ye(e),r=n.columns,o=void 0===r?1:r,i=n.currentId,s=void 0===i?null:i,l=n.loop,c=void 0===l||l,d=a(n,["columns","currentId","loop"]),f=t.useState(o),v=f[0],p=f[1],m=en(Qt(u(u({currentId:s,loop:c},d),{},{unstable_virtual:!0,unstable_includesBaseElement:!0})),d),b=t.useMemo((function(){return function(e,t){for(var n=[],r=0,o=e.length;r<o;r+=t)n.push(e.slice(r,r+t));return n}(m.matches,v)}),[m.matches,v]);return u(u({},m),{},{menuRole:"grid",columns:v,matches:b,setColumns:p})}var nn="top",rn="bottom",on="right",un="left",an="auto",sn=[nn,rn,on,un],ln="start",cn="end",dn="viewport",fn="popper",vn=sn.reduce((function(e,t){return e.concat([t+"-"+ln,t+"-"+cn])}),[]),pn=[].concat(sn,[an]).reduce((function(e,t){return e.concat([t,t+"-"+ln,t+"-"+cn])}),[]),mn=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function bn(e){return e?(e.nodeName||"").toLowerCase():null}function gn(e){if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function hn(e){return e instanceof gn(e).Element||e instanceof Element}function yn(e){return e instanceof gn(e).HTMLElement||e instanceof HTMLElement}function _n(e){return e.split("-")[0]}function kn(e){return{x:e.offsetLeft,y:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}}function wn(e,t){var n,r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&((n=r)instanceof gn(n).ShadowRoot||n instanceof ShadowRoot)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function In(e){return gn(e).getComputedStyle(e)}function Cn(e){return["table","td","th"].indexOf(bn(e))>=0}function En(e){return((hn(e)?e.ownerDocument:e.document)||window.document).documentElement}function On(e){return"html"===bn(e)?e:e.assignedSlot||e.parentNode||e.host||En(e)}function xn(e){if(!yn(e)||"fixed"===In(e).position)return null;var t=e.offsetParent;if(t){var n=En(t);if("body"===bn(t)&&"static"===In(t).position&&"static"!==In(n).position)return n}return t}function Sn(e){for(var t=gn(e),n=xn(e);n&&Cn(n)&&"static"===In(n).position;)n=xn(n);return n&&"body"===bn(n)&&"static"===In(n).position?t:n||function(e){for(var t=On(e);yn(t)&&["html","body"].indexOf(bn(t))<0;){var n=In(t);if("none"!==n.transform||"none"!==n.perspective||n.willChange&&"auto"!==n.willChange)return t;t=t.parentNode}return null}(e)||t}function Pn(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Rn(e,t,n){return Math.max(e,Math.min(t,n))}function An(e){return Object.assign(Object.assign({},{top:0,right:0,bottom:0,left:0}),e)}function Tn(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}var Dn={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Mn(e){var t,n=e.popper,r=e.popperRect,o=e.placement,u=e.offsets,a=e.position,i=e.gpuAcceleration,s=e.adaptive,l=function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:Math.round(t*r)/r||0,y:Math.round(n*r)/r||0}}(u),c=l.x,d=l.y,f=u.hasOwnProperty("x"),v=u.hasOwnProperty("y"),p=un,m=nn,b=window;if(s){var g=Sn(n);g===gn(n)&&(g=En(n)),o===nn&&(m=rn,d-=g.clientHeight-r.height,d*=i?1:-1),o===un&&(p=on,c-=g.clientWidth-r.width,c*=i?1:-1)}var h,y=Object.assign({position:a},s&&Dn);return i?Object.assign(Object.assign({},y),{},((h={})[m]=v?"0":"",h[p]=f?"0":"",h.transform=(b.devicePixelRatio||1)<2?"translate("+c+"px, "+d+"px)":"translate3d("+c+"px, "+d+"px, 0)",h)):Object.assign(Object.assign({},y),{},((t={})[m]=v?d+"px":"",t[p]=f?c+"px":"",t.transform="",t))}var Bn={passive:!0};var Ln={left:"right",right:"left",bottom:"top",top:"bottom"};function jn(e){return e.replace(/left|right|bottom|top/g,(function(e){return Ln[e]}))}var Hn={start:"end",end:"start"};function Fn(e){return e.replace(/start|end/g,(function(e){return Hn[e]}))}function Vn(e){var t=e.getBoundingClientRect();return{width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left,x:t.left,y:t.top}}function Kn(e){var t=gn(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Wn(e){return Vn(En(e)).left+Kn(e).scrollLeft}function Gn(e){var t=In(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function Nn(e){return["html","body","#document"].indexOf(bn(e))>=0?e.ownerDocument.body:yn(e)&&Gn(e)?e:Nn(On(e))}function qn(e,t){void 0===t&&(t=[]);var n=Nn(e),r="body"===bn(n),o=gn(n),u=r?[o].concat(o.visualViewport||[],Gn(n)?n:[]):n,a=t.concat(u);return r?a:a.concat(qn(On(u)))}function Un(e){return Object.assign(Object.assign({},e),{},{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function zn(e,t){return t===dn?Un(function(e){var t=gn(e),n=En(e),r=t.visualViewport,o=n.clientWidth,u=n.clientHeight,a=0,i=0;return r&&(o=r.width,u=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=r.offsetLeft,i=r.offsetTop)),{width:o,height:u,x:a+Wn(e),y:i}}(e)):yn(t)?function(e){var t=Vn(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):Un(function(e){var t=En(e),n=Kn(e),r=e.ownerDocument.body,o=Math.max(t.scrollWidth,t.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),u=Math.max(t.scrollHeight,t.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-n.scrollLeft+Wn(e),i=-n.scrollTop;return"rtl"===In(r||t).direction&&(a+=Math.max(t.clientWidth,r?r.clientWidth:0)-o),{width:o,height:u,x:a,y:i}}(En(e)))}function Xn(e,t,n){var r="clippingParents"===t?function(e){var t=qn(On(e)),n=["absolute","fixed"].indexOf(In(e).position)>=0&&yn(e)?Sn(e):e;return hn(n)?t.filter((function(e){return hn(e)&&wn(e,n)&&"body"!==bn(e)})):[]}(e):[].concat(t),o=[].concat(r,[n]),u=o[0],a=o.reduce((function(t,n){var r=zn(e,n);return t.top=Math.max(r.top,t.top),t.right=Math.min(r.right,t.right),t.bottom=Math.min(r.bottom,t.bottom),t.left=Math.max(r.left,t.left),t}),zn(e,u));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function Yn(e){return e.split("-")[1]}function $n(e){var t,n=e.reference,r=e.element,o=e.placement,u=o?_n(o):null,a=o?Yn(o):null,i=n.x+n.width/2-r.width/2,s=n.y+n.height/2-r.height/2;switch(u){case nn:t={x:i,y:n.y-r.height};break;case rn:t={x:i,y:n.y+n.height};break;case on:t={x:n.x+n.width,y:s};break;case un:t={x:n.x-r.width,y:s};break;default:t={x:n.x,y:n.y}}var l=u?Pn(u):null;if(null!=l){var c="y"===l?"height":"width";switch(a){case ln:t[l]=Math.floor(t[l])-Math.floor(n[c]/2-r[c]/2);break;case cn:t[l]=Math.floor(t[l])+Math.ceil(n[c]/2-r[c]/2)}}return t}function Zn(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,u=n.boundary,a=void 0===u?"clippingParents":u,i=n.rootBoundary,s=void 0===i?dn:i,l=n.elementContext,c=void 0===l?fn:l,d=n.altBoundary,f=void 0!==d&&d,v=n.padding,p=void 0===v?0:v,m=An("number"!=typeof p?p:Tn(p,sn)),b=c===fn?"reference":fn,g=e.elements.reference,h=e.rects.popper,y=e.elements[f?b:c],_=Xn(hn(y)?y:y.contextElement||En(e.elements.popper),a,s),k=Vn(g),w=$n({reference:k,element:h,strategy:"absolute",placement:o}),I=Un(Object.assign(Object.assign({},h),w)),C=c===fn?I:k,E={top:_.top-C.top+m.top,bottom:C.bottom-_.bottom+m.bottom,left:_.left-C.left+m.left,right:C.right-_.right+m.right},O=e.modifiersData.offset;if(c===fn&&O){var x=O[o];Object.keys(E).forEach((function(e){var t=[on,rn].indexOf(e)>=0?1:-1,n=[nn,rn].indexOf(e)>=0?"y":"x";E[e]+=x[n]*t}))}return E}function Jn(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,u=n.rootBoundary,a=n.padding,i=n.flipVariations,s=n.allowedAutoPlacements,l=void 0===s?pn:s,c=Yn(r),d=c?i?vn:vn.filter((function(e){return Yn(e)===c})):sn,f=d.filter((function(e){return l.indexOf(e)>=0}));0===f.length&&(f=d);var v=f.reduce((function(t,n){return t[n]=Zn(e,{placement:n,boundary:o,rootBoundary:u,padding:a})[_n(n)],t}),{});return Object.keys(v).sort((function(e,t){return v[e]-v[t]}))}function Qn(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function er(e){return[nn,on,rn,un].some((function(t){return e[t]>=0}))}function tr(e,t,n){void 0===n&&(n=!1);var r,o,u=En(t),a=Vn(e),i=yn(t),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!n)&&(("body"!==bn(t)||Gn(u))&&(s=(r=t)!==gn(r)&&yn(r)?{scrollLeft:(o=r).scrollLeft,scrollTop:o.scrollTop}:Kn(r)),yn(t)?((l=Vn(t)).x+=t.clientLeft,l.y+=t.clientTop):u&&(l.x=Wn(u))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function nr(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}var rr={placement:"bottom",modifiers:[],strategy:"absolute"};function or(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function ur(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,o=t.defaultOptions,u=void 0===o?rr:o;return function(e,t,n){void 0===n&&(n=u);var o,a,i={placement:"bottom",orderedModifiers:[],options:Object.assign(Object.assign({},rr),u),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},s=[],l=!1,c={state:i,setOptions:function(n){d(),i.options=Object.assign(Object.assign(Object.assign({},u),i.options),n),i.scrollParents={reference:hn(e)?qn(e):e.contextElement?qn(e.contextElement):[],popper:qn(t)};var o,a,l=function(e){var t=nr(e);return mn.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}((o=[].concat(r,i.options.modifiers),a=o.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign(Object.assign(Object.assign({},n),t),{},{options:Object.assign(Object.assign({},n.options),t.options),data:Object.assign(Object.assign({},n.data),t.data)}):t,e}),{}),Object.keys(a).map((function(e){return a[e]}))));return i.orderedModifiers=l.filter((function(e){return e.enabled})),i.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,o=e.effect;if("function"==typeof o){var u=o({state:i,name:t,instance:c,options:r}),a=function(){};s.push(u||a)}})),c.update()},forceUpdate:function(){if(!l){var e=i.elements,t=e.reference,n=e.popper;if(or(t,n)){i.rects={reference:tr(t,Sn(n),"fixed"===i.options.strategy),popper:kn(n)},i.reset=!1,i.placement=i.options.placement,i.orderedModifiers.forEach((function(e){return i.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<i.orderedModifiers.length;r++)if(!0!==i.reset){var o=i.orderedModifiers[r],u=o.fn,a=o.options,s=void 0===a?{}:a,d=o.name;"function"==typeof u&&(i=u({state:i,options:s,name:d,instance:c})||i)}else i.reset=!1,r=-1}}},update:(o=function(){return new Promise((function(e){c.forceUpdate(),e(i)}))},function(){return a||(a=new Promise((function(e){Promise.resolve().then((function(){a=void 0,e(o())}))}))),a}),destroy:function(){d(),l=!0}};if(!or(e,t))return c;function d(){s.forEach((function(e){return e()})),s=[]}return c.setOptions(n).then((function(e){!l&&n.onFirstUpdate&&n.onFirstUpdate(e)})),c}}var ar=ur({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,u=void 0===o||o,a=r.resize,i=void 0===a||a,s=gn(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return u&&l.forEach((function(e){e.addEventListener("scroll",n.update,Bn)})),i&&s.addEventListener("resize",n.update,Bn),function(){u&&l.forEach((function(e){e.removeEventListener("scroll",n.update,Bn)})),i&&s.removeEventListener("resize",n.update,Bn)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=$n({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,u=n.adaptive,a=void 0===u||u,i={placement:_n(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign(Object.assign({},t.styles.popper),Mn(Object.assign(Object.assign({},i),{},{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign(Object.assign({},t.styles.arrow),Mn(Object.assign(Object.assign({},i),{},{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1})))),t.attributes.popper=Object.assign(Object.assign({},t.attributes.popper),{},{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];yn(o)&&bn(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{},u=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});yn(r)&&bn(r)&&(Object.assign(r.style,u),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,u=void 0===o?[0,0]:o,a=pn.reduce((function(e,n){return e[n]=function(e,t,n){var r=_n(e),o=[un,nn].indexOf(r)>=0?-1:1,u="function"==typeof n?n(Object.assign(Object.assign({},t),{},{placement:e})):n,a=u[0],i=u[1];return a=a||0,i=(i||0)*o,[un,on].indexOf(r)>=0?{x:i,y:a}:{x:a,y:i}}(n,t.rects,u),e}),{}),i=a[t.placement],s=i.x,l=i.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=s,t.modifiersData.popperOffsets.y+=l),t.modifiersData[r]=a}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,u=void 0===o||o,a=n.altAxis,i=void 0===a||a,s=n.fallbackPlacements,l=n.padding,c=n.boundary,d=n.rootBoundary,f=n.altBoundary,v=n.flipVariations,p=void 0===v||v,m=n.allowedAutoPlacements,b=t.options.placement,g=_n(b),h=s||(g===b||!p?[jn(b)]:function(e){if(_n(e)===an)return[];var t=jn(e);return[Fn(e),t,Fn(t)]}(b)),y=[b].concat(h).reduce((function(e,n){return e.concat(_n(n)===an?Jn(t,{placement:n,boundary:c,rootBoundary:d,padding:l,flipVariations:p,allowedAutoPlacements:m}):n)}),[]),_=t.rects.reference,k=t.rects.popper,w=new Map,I=!0,C=y[0],E=0;E<y.length;E++){var O=y[E],x=_n(O),S=Yn(O)===ln,P=[nn,rn].indexOf(x)>=0,R=P?"width":"height",A=Zn(t,{placement:O,boundary:c,rootBoundary:d,altBoundary:f,padding:l}),T=P?S?on:un:S?rn:nn;_[R]>k[R]&&(T=jn(T));var D=jn(T),M=[];if(u&&M.push(A[x]<=0),i&&M.push(A[T]<=0,A[D]<=0),M.every((function(e){return e}))){C=O,I=!1;break}w.set(O,M)}if(I)for(var B=function(e){var t=y.find((function(t){var n=w.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return C=t,"break"},L=p?3:1;L>0;L--){if("break"===B(L))break}t.placement!==C&&(t.modifiersData[r]._skip=!0,t.placement=C,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,u=void 0===o||o,a=n.altAxis,i=void 0!==a&&a,s=n.boundary,l=n.rootBoundary,c=n.altBoundary,d=n.padding,f=n.tether,v=void 0===f||f,p=n.tetherOffset,m=void 0===p?0:p,b=Zn(t,{boundary:s,rootBoundary:l,padding:d,altBoundary:c}),g=_n(t.placement),h=Yn(t.placement),y=!h,_=Pn(g),k="x"===_?"y":"x",w=t.modifiersData.popperOffsets,I=t.rects.reference,C=t.rects.popper,E="function"==typeof m?m(Object.assign(Object.assign({},t.rects),{},{placement:t.placement})):m,O={x:0,y:0};if(w){if(u){var x="y"===_?nn:un,S="y"===_?rn:on,P="y"===_?"height":"width",R=w[_],A=w[_]+b[x],T=w[_]-b[S],D=v?-C[P]/2:0,M=h===ln?I[P]:C[P],B=h===ln?-C[P]:-I[P],L=t.elements.arrow,j=v&&L?kn(L):{width:0,height:0},H=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},F=H[x],V=H[S],K=Rn(0,I[P],j[P]),W=y?I[P]/2-D-K-F-E:M-K-F-E,G=y?-I[P]/2+D+K+V+E:B+K+V+E,N=t.elements.arrow&&Sn(t.elements.arrow),q=N?"y"===_?N.clientTop||0:N.clientLeft||0:0,U=t.modifiersData.offset?t.modifiersData.offset[t.placement][_]:0,z=w[_]+W-U-q,X=w[_]+G-U,Y=Rn(v?Math.min(A,z):A,R,v?Math.max(T,X):T);w[_]=Y,O[_]=Y-R}if(i){var $="x"===_?nn:un,Z="x"===_?rn:on,J=w[k],Q=Rn(J+b[$],J,J-b[Z]);w[k]=Q,O[k]=Q-J}t.modifiersData[r]=O}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=n.elements.arrow,u=n.modifiersData.popperOffsets,a=_n(n.placement),i=Pn(a),s=[un,on].indexOf(a)>=0?"height":"width";if(o&&u){var l=n.modifiersData[r+"#persistent"].padding,c=kn(o),d="y"===i?nn:un,f="y"===i?rn:on,v=n.rects.reference[s]+n.rects.reference[i]-u[i]-n.rects.popper[s],p=u[i]-n.rects.reference[i],m=Sn(o),b=m?"y"===i?m.clientHeight||0:m.clientWidth||0:0,g=v/2-p/2,h=l[d],y=b-c[s]-l[f],_=b/2-c[s]/2+g,k=Rn(h,_,y),w=i;n.modifiersData[r]=((t={})[w]=k,t.centerOffset=k-_,t)}},effect:function(e){var t=e.state,n=e.options,r=e.name,o=n.element,u=void 0===o?"[data-popper-arrow]":o,a=n.padding,i=void 0===a?0:a;null!=u&&("string"!=typeof u||(u=t.elements.popper.querySelector(u)))&&wn(t.elements.popper,u)&&(t.elements.arrow=u,t.modifiersData[r+"#persistent"]={padding:An("number"!=typeof i?i:Tn(i,sn))})},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,u=t.modifiersData.preventOverflow,a=Zn(t,{elementContext:"reference"}),i=Zn(t,{altBoundary:!0}),s=Qn(a,r),l=Qn(i,o,u),c=er(s),d=er(l);t.modifiersData[n]={referenceClippingOffsets:s,popperEscapeOffsets:l,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign(Object.assign({},t.attributes.popper),{},{"data-popper-reference-hidden":c,"data-popper-escaped":d})}}]});function ir(e){void 0===e&&(e={});var n,r,o=ye(e),i=o.visible,s=void 0!==i&&i,l=o.animated,c=void 0!==l&&l,d=Lt(a(o,["visible","animated"])),f=t.useState(s),v=f[0],p=f[1],m=t.useState(c),b=m[0],g=m[1],h=t.useState(!1),y=h[0],_=h[1],k=(n=v,r=t.useRef(null),V((function(){r.current=n}),[n]),r),w=null!=k.current&&k.current!==v;b&&!y&&w&&_(!0),t.useEffect((function(){if("number"==typeof b&&y){var e=setTimeout((function(){return _(!1)}),b);return function(){clearTimeout(e)}}return function(){}}),[b,y]);var I=t.useCallback((function(){return p(!0)}),[]),C=t.useCallback((function(){return p(!1)}),[]),E=t.useCallback((function(){return p((function(e){return!e}))}),[]),O=t.useCallback((function(){return _(!1)}),[]);return u(u({},d),{},{visible:v,animated:b,animating:y,show:I,hide:C,toggle:E,setVisible:p,setAnimated:g,stopAnimation:O})}function sr(e){void 0===e&&(e={});var n=ye(e),r=n.modal,o=void 0===r||r,i=ir(a(n,["modal"])),s=t.useState(o),l=s[0],c=s[1],d=t.useRef(null);return u(u({},i),{},{modal:l,setModal:c,unstable_disclosureRef:d})}var lr=z("Mac")&&!z("Chrome")&&z("Safari");function cr(e){return function(t){return e&&!C(t,e)?e:t}}function dr(e){void 0===e&&(e={});var n=ye(e),r=n.gutter,o=void 0===r?12:r,i=n.placement,s=void 0===i?"bottom":i,l=n.unstable_flip,c=void 0===l||l,d=n.unstable_offset,f=n.unstable_preventOverflow,v=void 0===f||f,p=n.unstable_fixed,m=void 0!==p&&p,b=n.modal,g=void 0!==b&&b,h=a(n,["gutter","placement","unstable_flip","unstable_offset","unstable_preventOverflow","unstable_fixed","modal"]),y=t.useRef(null),_=t.useRef(null),k=t.useRef(null),w=t.useRef(null),I=t.useState(s),C=I[0],E=I[1],O=t.useState(s),x=O[0],S=O[1],P=t.useState(d||[0,o])[0],R=t.useState({position:"fixed",left:"100%",top:"100%"}),A=R[0],T=R[1],D=t.useState({}),M=D[0],B=D[1],L=sr(u({modal:g},h)),j=t.useCallback((function(){return!!y.current&&(y.current.forceUpdate(),!0)}),[]),H=t.useCallback((function(e){e.placement&&S(e.placement),e.styles&&(T(cr(e.styles.popper)),w.current&&B(cr(e.styles.arrow)))}),[]);return V((function(){return _.current&&k.current&&(y.current=ar(_.current,k.current,{placement:C,strategy:m?"fixed":"absolute",onFirstUpdate:lr?H:void 0,modifiers:[{name:"eventListeners",enabled:L.visible},{name:"applyStyles",enabled:!1},{name:"flip",enabled:c,options:{padding:8}},{name:"offset",options:{offset:P}},{name:"preventOverflow",enabled:v,options:{tetherOffset:function(){var e;return(null===(e=w.current)||void 0===e?void 0:e.clientWidth)||0}}},{name:"arrow",enabled:!!w.current,options:{element:w.current}},{name:"updateState",phase:"write",requires:["computeStyles"],enabled:L.visible&&!0,fn:function(e){var t=e.state;return H(t)}}]})),function(){y.current&&(y.current.destroy(),y.current=null)}}),[C,m,L.visible,c,P,v]),t.useEffect((function(){if(L.visible){var e=window.requestAnimationFrame((function(){var e;null===(e=y.current)||void 0===e||e.forceUpdate()}));return function(){window.cancelAnimationFrame(e)}}}),[L.visible]),u(u({},L),{},{unstable_referenceRef:_,unstable_popoverRef:k,unstable_arrowRef:w,unstable_popoverStyles:A,unstable_arrowStyles:M,unstable_update:j,unstable_originalPlacement:C,placement:x,place:E})}function fr(e,n){void 0===n&&(n={});var r=n,o=r.gutter,i=void 0===o?0:o,s=r.placement,l=dr(u({gutter:i,placement:void 0===s?"bottom-start":s},a(r,["gutter","placement"]))),c=l.visible&&e.inputValue.length>=e.minValueLength;return t.useEffect((function(){c||e.reset()}),[c,e.reset]),u(u(u({},e),l),{},{visible:c})}var vr=P({name:"ComboboxList",compose:R,keys:Ze,useOptions:function(e){var t=e.menuRole;return u({menuRole:void 0===t?"listbox":t},a(e,["menuRole"]))},useProps:function(e,t){return u({role:e.menuRole,id:et(e.baseId)},t)}}),pr=O({as:"div",useHook:vr,useCreateElement:function(e,t,n){return b(e,t,n)}});function mr(e){void 0===e&&(e={});var t=ye(e),n=t.currentId,r=void 0===n?null:n,o=t.orientation,i=void 0===o?"vertical":o,s=t.loop,l=void 0===s||s,c=a(t,["currentId","orientation","loop"]);return en(Jt(u(u({currentId:r,orientation:i,loop:l},c),{},{unstable_virtual:!0,unstable_includesBaseElement:!0})),c)}var br=P({name:"ComboboxOption",compose:[It,bt],keys:Je,useProps:function(e,t){return u({role:"option"},t)}}),gr=O({as:"div",memo:!0,useHook:br}),hr=["baseId","unstable_idCountRef","visible","animated","animating","setBaseId","show","hide","toggle","setVisible","setAnimated","stopAnimation"],yr=P({name:"DisclosureContent",compose:te,keys:hr,useProps:function(e,n){var r=n.onTransitionEnd,o=n.onAnimationEnd,i=n.style,s=a(n,["onTransitionEnd","onAnimationEnd","style"]),l=e.animated&&e.animating,c=t.useState(null),d=c[0],f=c[1],v=!e.visible&&!l,p=v?u({display:"none"},i):i,m=K(r),b=K(o),g=t.useRef(0);t.useEffect((function(){if(e.animated)return g.current=window.requestAnimationFrame((function(){g.current=window.requestAnimationFrame((function(){e.visible?f("enter"):f(l?"leave":null)}))})),function(){return window.cancelAnimationFrame(g.current)}}),[e.animated,e.visible,l]);var h=t.useCallback((function(t){var n;W(t)&&(l&&!0===e.animated&&(null===(n=e.stopAnimation)||void 0===n||n.call(e)))}),[e.animated,l,e.stopAnimation]),y=t.useCallback((function(e){var t;null===(t=m.current)||void 0===t||t.call(m,e),h(e)}),[h]),_=t.useCallback((function(e){var t;null===(t=b.current)||void 0===t||t.call(b,e),h(e)}),[h]);return u({id:e.baseId,"data-enter":"enter"===d?"":void 0,"data-leave":"leave"===d?"":void 0,onTransitionEnd:y,onAnimationEnd:_,hidden:v,style:p},s)}}),_r=O({as:"div",useHook:yr});function kr(){return F?document.body:null}var wr=t.createContext(kr());function Ir(e){var r=e.children,o=t.useContext(wr)||kr(),u=t.useState((function(){if(F){var e=document.createElement("div");return e.className=Ir.__className,e}return null}))[0];return V((function(){if(u&&o)return o.appendChild(u),function(){o.removeChild(u)}}),[u,o]),u?n.createPortal(t.createElement(wr.Provider,{value:u},r),u):null}function Cr(e,t){var n=e.indexOf(t);return ve(e,n)}Ir.__className="__reakit-portal",Ir.__selector="."+Ir.__className;var Er=t.createContext(null);var Or=!1;if("undefined"!=typeof window){var xr={get passive(){Or=!0}};window.addEventListener("testPassive",null,xr),window.removeEventListener("testPassive",null,xr)}var Sr="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1),Pr=[],Rr=!1,Ar=-1,Tr=void 0,Dr=void 0,Mr=function(e){return Pr.some((function(t){return!(!t.options.allowTouchMove||!t.options.allowTouchMove(e))}))},Br=function(e){var t=e||window.event;return!!Mr(t.target)||(t.touches.length>1||(t.preventDefault&&t.preventDefault(),!1))},Lr=function(e,t){if(e){if(!Pr.some((function(t){return t.targetElement===e}))){var n={targetElement:e,options:t||{}};Pr=[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(Pr),[n]),Sr?(e.ontouchstart=function(e){1===e.targetTouches.length&&(Ar=e.targetTouches[0].clientY)},e.ontouchmove=function(t){1===t.targetTouches.length&&function(e,t){var n=e.targetTouches[0].clientY-Ar;!Mr(e.target)&&(t&&0===t.scrollTop&&n>0||function(e){return!!e&&e.scrollHeight-e.scrollTop<=e.clientHeight}(t)&&n<0?Br(e):e.stopPropagation())}(t,e)},Rr||(document.addEventListener("touchmove",Br,Or?{passive:!1}:void 0),Rr=!0)):function(e){if(void 0===Dr){var t=!!e&&!0===e.reserveScrollBarGap,n=window.innerWidth-document.documentElement.clientWidth;t&&n>0&&(Dr=document.body.style.paddingRight,document.body.style.paddingRight=n+"px")}void 0===Tr&&(Tr=document.body.style.overflow,document.body.style.overflow="hidden")}(t)}}else console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.")},jr=function(e){e?(Pr=Pr.filter((function(t){return t.targetElement!==e})),Sr?(e.ontouchstart=null,e.ontouchmove=null,Rr&&0===Pr.length&&(document.removeEventListener("touchmove",Br,Or?{passive:!1}:void 0),Rr=!1)):Pr.length||(void 0!==Dr&&(document.body.style.paddingRight=Dr,Dr=void 0),void 0!==Tr&&(document.body.style.overflow=Tr,Tr=void 0))):console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.")};function Hr(e){null!=e.parentNode&&e.parentNode.removeChild(e)}var Fr="__reakit-focus-trap";function Vr(e,n,r){var o=function(e,n){var r=t.useRef(null);return t.useEffect((function(){var t=e.current;t&&n.visible&&(r.current=Y(t,Ir.__selector))}),[e,n.visible]),r}(e,r),u=r.visible&&r.modal,a=t.useRef(null),i=t.useRef(null);t.useEffect((function(){if(u){var e=o.current;if(e){if(!a.current){var t=j(e);a.current=t.createElement("div"),a.current.className=Fr,a.current.tabIndex=0,a.current.style.position="fixed",a.current.setAttribute("aria-hidden","true")}return i.current||(i.current=a.current.cloneNode()),e.insertAdjacentElement("beforebegin",a.current),e.insertAdjacentElement("afterend",i.current),function(){a.current&&Hr(a.current),i.current&&Hr(i.current)}}}}),[o,u]),t.useEffect((function(){var t=a.current,r=i.current;if(u&&t&&r){var o=function(t){var o=e.current;if(o&&!n.length){t.preventDefault();var u,a,i=t.target===r?ee(o):(a=Q(o,u))[a.length-1]||null;i?i.focus():o.focus()}};return t.addEventListener("focus",o),r.addEventListener("focus",o),function(){t.removeEventListener("focus",o),r.removeEventListener("focus",o)}}}),[e,n,u])}function Kr(e,t,n){var r=n.unstable_autoFocusOnHide&&!n.visible,o=!(!n.animated||!n.animating);_e((function(){var u;if(r&&!o&&!function(e){var t=e.current;if(!t)return!1;var n=G(t);return!(!n||N(t,n)||!J(n)&&"true"!==n.getAttribute("data-dialog"))}(e)){var a=(null===(u=n.unstable_finalFocusRef)||void 0===u?void 0:u.current)||t.current;if(a){if(a.id){var i=j(a).querySelector("[aria-activedescendant='"+a.id+"']");if(i)return void st(i)}st(a)}else;}}),[r,o,e,t])}var Wr=t.createContext({});function Gr(e,n,r,o,u,a,i){var s=K(u);t.useEffect((function(){if(a){var t=function(t){if(s.current){var o,u=e.current,a=n.current,i=t.target;if(u)if(function(e){var t=j(e);return"HTML"===e.tagName||N(t.body,e)}(i))if(!N(u,i))if(!a||!function(e,t){return N(t,e)}(i,a))if(!(null===(o=i.classList)||void 0===o?void 0:o.contains(Fr))&&!r.some(function(e){return function(t){var n=t.current;if(!n)return!1;if(N(n,e))return!0;var r=j(n).querySelector('[data-dialog-ref="'+n.id+'"]');return!!r&&N(r,e)}}(i)))s.current(t)}},u=j(e.current);return u.addEventListener(o,t,i),function(){return u.removeEventListener(o,t,i)}}}),[e,n,r,o,a,s])}function Nr(e,n,r,o){var u=function(e,n){var r=t.useRef();return t.useEffect((function(){if(n.visible&&n.hideOnClickOutside){var t=j(e.current),o=function(e){r.current=e.target};return t.addEventListener("mousedown",o),function(){return t.removeEventListener("mousedown",o)}}}),[n.visible,n.hideOnClickOutside,e]),r}(e,o);Gr(e,n,r,"click",(function(e){var t;u.current===e.target&&(null===(t=o.hide)||void 0===t||t.call(o))}),o.visible&&o.hideOnClickOutside),Gr(e,n,r,"focusin",(function(t){var n,r=j(e.current);t.target!==r&&t.target!==r.body&&(null===(n=o.hide)||void 0===n||n.call(o))}),o.visible&&o.hideOnClickOutside)}var qr=t.createContext(void 0);function Ur(e){return Array.isArray(e)?!e.length:_(e)?!Object.keys(e).length:null==e||""===e}function zr(e){return e&&e.tagName&&"HTML"!==e.tagName&&e!==j(e).body}var Xr=["baseId","unstable_idCountRef","visible","animated","animating","setBaseId","show","hide","toggle","setVisible","setAnimated","stopAnimation","modal","unstable_disclosureRef","setModal"],Yr=Xr,$r=Yr,Zr=P({name:"Dialog",compose:yr,keys:[].concat(Xr,["hideOnEsc","hideOnClickOutside","preventBodyScroll","unstable_initialFocusRef","unstable_finalFocusRef","unstable_orphan","unstable_autoFocusOnShow","unstable_autoFocusOnHide"]),useOptions:function(e){var t=e.modal,n=void 0===t||t,r=e.hideOnEsc,o=void 0===r||r,i=e.hideOnClickOutside,s=void 0===i||i,l=e.preventBodyScroll,c=void 0===l?n:l,d=e.unstable_autoFocusOnShow,f=void 0===d||d,v=e.unstable_autoFocusOnHide,p=void 0===v||v,m=e.unstable_orphan;return u({modal:n,hideOnEsc:o,hideOnClickOutside:s,preventBodyScroll:n&&c,unstable_autoFocusOnShow:f,unstable_autoFocusOnHide:p,unstable_orphan:n&&m},a(e,["modal","hideOnEsc","hideOnClickOutside","preventBodyScroll","unstable_autoFocusOnShow","unstable_autoFocusOnHide","unstable_orphan"]))},useProps:function(e,n){var r=n.ref,o=n.onKeyDown,i=n.onBlur,s=n.wrapElement,l=n.tabIndex,c=a(n,["ref","onKeyDown","onBlur","wrapElement","tabIndex"]),d=t.useRef(null),f=t.useContext(qr),v=f&&f===e.baseId,p=function(e,n){var r=t.useRef(null),o=!(!n.animated||!n.animating);return t.useEffect((function(){if(!n.visible&&!o){var t=function(e){var t=e.target;"focus"in t&&(r.current=t,n.unstable_disclosureRef&&(n.unstable_disclosureRef.current=t))},u=j(e.current);return u.addEventListener("focusin",t),function(){return u.removeEventListener("focusin",t)}}}),[n.visible,o,n.unstable_disclosureRef,e]),t.useEffect((function(){var e;if(n.visible&&!o){var t=function(e){var t=e.currentTarget;L(t)&&(e.preventDefault(),t.focus())},u=(null===(e=n.unstable_disclosureRef)||void 0===e?void 0:e.current)||r.current;return null==u||u.addEventListener("mousedown",t),function(){return null==u?void 0:u.removeEventListener("mousedown",t)}}}),[n.visible,o,n.unstable_disclosureRef]),n.unstable_disclosureRef||r}(d,e),m=K(o),b=K(i),g=function(e,n){var r=t.useReducer((function(e){return e+1}),0),o=r[0],u=r[1];return V((function(){var t=e.current;n.visible&&o&&(zr(G(t))||null==t||t.focus())}),[o,e]),t.useCallback((function(e){n.visible&&(zr(Ee(e))||u())}),[n.visible])}(d,e),h=function(e,n){var r=t.useContext(Wr),o=t.useState([]),u=o[0],a=o[1],i=t.useState(u),s=i[0],l=i[1],c=t.useCallback((function(e){var t;null===(t=r.addDialog)||void 0===t||t.call(r,e),a((function(t){return[].concat(t,[e])}))}),[r.addDialog]),d=t.useCallback((function(e){var t;null===(t=r.removeDialog)||void 0===t||t.call(r,e),a((function(t){return Cr(t,e)}))}),[r.removeDialog]),f=t.useCallback((function(e){var t;null===(t=r.showDialog)||void 0===t||t.call(r,e),l((function(t){return[].concat(t,[e])}))}),[r.showDialog]),v=t.useCallback((function(e){var t;null===(t=r.hideDialog)||void 0===t||t.call(r,e),l((function(t){return Cr(t,e)}))}),[r.hideDialog]);t.useEffect((function(){var t;if(!n.unstable_orphan)return null===(t=r.addDialog)||void 0===t||t.call(r,e),function(){var t;null===(t=r.removeDialog)||void 0===t||t.call(r,e)}}),[n.unstable_orphan,r.addDialog,e,r.removeDialog]),t.useEffect((function(){var t;if(!n.unstable_orphan&&n.modal&&n.visible)return null===(t=r.showDialog)||void 0===t||t.call(r,e),function(){var t;null===(t=r.hideDialog)||void 0===t||t.call(r,e)}}),[n.unstable_orphan,n.modal,n.visible,r.showDialog,e,r.hideDialog]),t.useEffect((function(){var e;!1===r.visible&&n.visible&&!n.unstable_orphan&&(null===(e=n.hide)||void 0===e||e.call(n))}),[r.visible,n.visible,n.hide,n.unstable_orphan]);var p=t.useMemo((function(){return{visible:n.visible,addDialog:c,removeDialog:d,showDialog:f,hideDialog:v}}),[n.visible,c,d,f,v]);return{dialogs:u,visibleModals:s,wrap:t.useCallback((function(e){return t.createElement(Wr.Provider,{value:p},e)}),[p])}}(d,e),y=h.dialogs,_=h.visibleModals,k=h.wrap,w=!(!e.modal||_.length)||void 0;!function(e,n){var r=Boolean(n.preventBodyScroll&&n.visible);t.useEffect((function(){var t=e.current;if(t&&r)return Lr(t,{reserveScrollBarGap:!0}),function(){return jr(t)}}),[e,r])}(d,e),Vr(d,_,e),function(e,n){t.useEffect((function(){var t=e.current;if(n.visible&&t){var r=new MutationObserver((function(e){if(e[0].target===t){var n=j(t),r=G(t);(r===n.body||Ur(r))&&t.focus()}}));return r.observe(t,{childList:!0,subtree:!0}),function(){r.disconnect()}}}),[n.visible,e])}(d,e),function(e,t,n){var r=n.unstable_initialFocusRef,o=n.visible&&n.unstable_autoFocusOnShow,u=!(!n.animated||!n.animating);_e((function(){var n=e.current;if(o&&n&&!u&&!t.some((function(e){return e.current&&!e.current.hidden})))if(null!=r&&r.current)r.current.focus({preventScroll:!0});else{st(ee(n,!0)||n,{preventScroll:!0,isActive:function(){return q(n)}})}}),[e,o,u,t,r])}(d,y,e),Kr(d,p,e),Nr(d,p,y,e),function(e,t,n){var r=function(r){return Gr(e,{current:null},t,r,(function(e){e.stopPropagation(),e.preventDefault()}),n.visible&&n.modal,!0)};r("mouseover"),r("mousemove"),r("mouseout")}(d,y,e);var I=t.useCallback((function(t){var n;null===(n=m.current)||void 0===n||n.call(m,t),t.defaultPrevented||"Escape"===t.key&&e.hideOnEsc&&e.hide&&(t.stopPropagation(),e.hide())}),[e.hideOnEsc,e.hide]),C=t.useCallback((function(e){var t;null===(t=b.current)||void 0===t||t.call(b,e),g(e)}),[g]),E=t.useCallback((function(n){return n=k(n),e.modal&&!v&&(n=t.createElement(Ir,null,n)),s&&(n=s(n)),t.createElement(Er.Provider,{value:null},n)}),[k,e.modal,v,s]);return u({ref:D(d,r),role:"dialog",tabIndex:null!=l?l:-1,"aria-modal":w,"data-dialog":!0,onKeyDown:I,onBlur:C,wrapElement:E},c)}}),Jr=O({as:"div",useHook:Zr,useCreateElement:function(e,t,n){return b(e,t,n)}}),Qr=["baseId","unstable_idCountRef","visible","animated","animating","setBaseId","show","hide","toggle","setVisible","setAnimated","stopAnimation","modal","unstable_disclosureRef","setModal","unstable_referenceRef","unstable_popoverRef","unstable_arrowRef","unstable_popoverStyles","unstable_arrowStyles","unstable_originalPlacement","unstable_update","placement","place"],eo=[].concat(Qr,["size"]),to=Qr,no=to,ro=P({name:"Popover",compose:Zr,keys:Qr,useOptions:function(e){var t=e.modal;return u({modal:void 0!==t&&t},a(e,["modal"]))},useProps:function(e,t){var n=t.ref,r=t.style,o=a(t,["ref","style"]);return u({ref:D(e.unstable_popoverRef,n),style:u(u({},e.unstable_popoverStyles),r)},o)}}),oo=O({as:"div",useHook:ro,useCreateElement:function(e,t,n){return b(e,t,n)}}),uo=P({name:"ComboboxPopover",compose:[vr,ro],keys:Qe,useOptions:function(e){return u(u({},e),{},{unstable_disclosureRef:e.unstable_referenceRef,unstable_autoFocusOnShow:!1,unstable_autoFocusOnHide:!1})},useComposeProps:function(e,t){var n=t.tabIndex,r=a(t,["tabIndex"]);return r=vr(e,r,!0),u(u({},r=ro(e,r,!0)),{},{tabIndex:null!=n?n:void 0})}}),ao=O({as:"div",useHook:uo,useCreateElement:function(e,t,n){return b(e,t,n)}});function io(e,t){var n;t&&(null===(n=j(e).getElementById(t))||void 0===n||n.focus())}var so=P({name:"CompositeItemWidget",compose:te,keys:Be,useProps:function(e,n){var r=n.onFocus,o=n.onBlur,i=n.onKeyDown,s=a(n,["onFocus","onBlur","onKeyDown"]),l=t.useRef(""),c=K(r),d=K(o),f=K(i),v=t.useCallback((function(t){var n,r;null===(n=c.current)||void 0===n||n.call(c,t),null===(r=e.unstable_setHasActiveWidget)||void 0===r||r.call(e,!0),at(t.currentTarget)&&(l.current=t.currentTarget.value)}),[e.unstable_setHasActiveWidget]),p=t.useCallback((function(t){var n,r;null===(n=d.current)||void 0===n||n.call(d,t),null===(r=e.unstable_setHasActiveWidget)||void 0===r||r.call(e,!1)}),[e.unstable_setHasActiveWidget]),m=t.useCallback((function(t){var n;if(null===(n=f.current)||void 0===n||n.call(f,t),!t.defaultPrevented&&W(t)&&!t.nativeEvent.isComposing){var r=t.currentTarget;if("Enter"===t.key){if(at(r)){if("TEXTAREA"===r.tagName&&t.shiftKey)return;t.preventDefault(),io(r,e.currentId)}}else"Escape"===t.key&&(io(r,e.currentId),at(r)&&pt(r,l.current))}}),[e.currentId]);return u({tabIndex:e.unstable_hasActiveWidget?0:-1,"data-composite-item-widget":!0,onFocus:v,onBlur:p,onKeyDown:m},s)}}),lo=O({as:"div",useHook:so}),co=P({name:"DialogBackdrop",compose:yr,keys:Yr,useOptions:function(e){var t=e.modal;return u({modal:void 0===t||t},a(e,["modal"]))},useProps:function(e,n){var r=n.wrapElement,o=a(n,["wrapElement"]),i=t.useCallback((function(n){return e.modal&&(n=t.createElement(Ir,null,t.createElement(qr.Provider,{value:e.baseId},n))),r?r(n):n}),[e.modal,r]);return u({id:void 0,"data-dialog-ref":e.baseId,wrapElement:i},o)}}),fo=O({as:"div",memo:!0,useHook:co}),vo=P({name:"Disclosure",compose:de,keys:hr,useProps:function(e,n){var r=n.onClick,o=n["aria-controls"],i=a(n,["onClick","aria-controls"]),s=K(r),l=o?o+" "+e.baseId:e.baseId,c=t.useCallback((function(t){var n,r;null===(n=s.current)||void 0===n||n.call(s,t),t.defaultPrevented||null===(r=e.toggle)||void 0===r||r.call(e)}),[e.toggle]);return u({"aria-expanded":!!e.visible,"aria-controls":l,onClick:c},i)}}),po=O({as:"button",memo:!0,useHook:vo}),mo=P({name:"DialogDisclosure",compose:vo,keys:$r,useProps:function(e,n){var r=n.ref,o=n.onClick,i=a(n,["ref","onClick"]),s=t.useRef(null),l=K(o),c=t.useState(!1),d=c[0],f=c[1],v=e.unstable_disclosureRef;V((function(){var t=s.current;v&&!v.current&&(v.current=t);var n=!(null!=v&&v.current)||v.current===t;f(!!e.visible&&n)}),[e.visible,v]);var p=t.useCallback((function(e){var t;null===(t=l.current)||void 0===t||t.call(l,e),e.defaultPrevented||v&&(v.current=e.currentTarget)}),[v]);return u({ref:D(s,r),"aria-haspopup":"dialog","aria-expanded":d,onClick:p},i)}}),bo=O({as:"button",memo:!0,useHook:mo}),go=["baseId","unstable_idCountRef","values","touched","messages","errors","validating","valid","submitting","submitSucceed","submitFailed","setBaseId","reset","validate","submit","update","blur","push","remove"],ho=[].concat(go,["name","value"]),yo=[].concat(go,["name"]),_o=yo,ko=[].concat(_o,["label"]),wo=_o,Io=[].concat(wo,ho),Co=Io,Eo=wo,Oo=[].concat(Eo,["index"]),xo=go,So=P({name:"Form",compose:te,keys:go,useProps:function(e,n){var r=n.onSubmit,o=a(n,["onSubmit"]),i=K(r);return u({role:"form",noValidate:!0,onSubmit:t.useCallback((function(t){var n,r;null===(n=i.current)||void 0===n||n.call(i,t),t.defaultPrevented||(t.preventDefault(),null===(r=e.submit)||void 0===r||r.call(e))}),[e.submit])},o)}}),Po=O({as:"form",useHook:So});function Ro(e,t){return void 0===t&&(t="."),Array.isArray(e)?e.join(t):e}function Ao(e,t,n){if(void 0===n&&(n=""),t)return t+"-"+Ro(e,"-")+n}function To(e,t){return Ao(e,t,"-label")}function Do(e,t,n){if("string"==typeof t)return null==e[t]?n:e[t];for(var r,o=e,u=s(t);!(r=u()).done;){var a=r.value;if(!(a in o))return n;o=o[a]}return null==o?n:o}function Mo(e,t){return Ao(e,t,"-message")}function Bo(e,t){var n=e.touched,r=e.errors;return!(!Do(n,t)||!Do(r,t))}var Lo=P({name:"FormCheckbox",compose:ge,keys:ho,useOptions:function(e,t){var n=e.name||t.name,r=void 0!==e.value?e.value:t.value,o=Do(e.values,n);return u(u({},e),{},{state:o,setState:function(t){return e.update(n,t)},name:n,value:r})},useProps:function(e,n){var r=n.onBlur,o=a(n,["onBlur"]),i=K(r),s=void 0===e.value,l=t.useCallback((function(t){var n,r;null===(n=i.current)||void 0===n||n.call(i,t),t.defaultPrevented||null===(r=e.blur)||void 0===r||r.call(e,e.name)}),[e.blur,e.name]);return u(u({"aria-invalid":Bo(e,e.name),name:Ro(e.name),onBlur:l},s?{id:Ao(e.name,e.baseId),"aria-describedby":Mo(e.name,e.baseId),"aria-labelledby":To(e.name,e.baseId)}:{}),o)}}),jo=O({as:"input",memo:!0,useHook:Lo}),Ho=P({name:"FormGroup",compose:xt,keys:yo,useProps:function(e,t){return u({id:Ao(e.name,e.baseId),tabIndex:-1,"aria-describedby":Mo(e.name,e.baseId),"aria-labelledby":To(e.name,e.baseId),"aria-invalid":Bo(e,e.name)},t)}}),Fo=O({as:"fieldset",useHook:Ho}),Vo=P({name:"Input",compose:ie,keys:[]}),Ko=O({as:"input",memo:!0,useHook:Vo}),Wo=P({name:"FormInput",compose:Vo,keys:_o,useOptions:function(e,t){var n=t.name;return u(u({},e),{},{name:e.name||n})},useProps:function(e,n){var r=n.onChange,o=n.onBlur,i=a(n,["onChange","onBlur"]),s=K(r),l=K(o),c=t.useCallback((function(t){var n,r;null===(n=s.current)||void 0===n||n.call(s,t),t.defaultPrevented||null===(r=e.update)||void 0===r||r.call(e,e.name,t.target.value)}),[e.update,e.name]),d=t.useCallback((function(t){var n,r;null===(n=l.current)||void 0===n||n.call(l,t),t.defaultPrevented||null===(r=e.blur)||void 0===r||r.call(e,e.name)}),[e.blur,e.name]);return u({id:Ao(e.name,e.baseId),name:Ro(e.name),value:Do(e.values,e.name,""),"aria-describedby":Mo(e.name,e.baseId),"aria-labelledby":To(e.name,e.baseId),"aria-invalid":Bo(e,e.name),onChange:c,onBlur:d},i)}}),Go=O({as:"input",memo:!0,useHook:Wo}),No=P({name:"FormLabel",compose:te,keys:ko,useProps:function(e,t){return u({children:e.label,id:To(e.name,e.baseId),htmlFor:Ao(e.name,e.baseId)},t)}}),qo=O({as:"label",memo:!0,useHook:No});var Uo=P({name:"FormMessage",compose:te,keys:wo,useProps:function(e,t){var n,r,o,a,i=Bo(e,e.name)?Do(e.errors,e.name):void 0;return i=i||(n=e,r=e.name,o=n.touched,a=n.messages,Do(o,r)&&Do(a,r)?Do(e.messages,e.name):void 0),u({role:"alert",id:Mo(e.name,e.baseId),children:i},t)}}),zo=O({as:"div",memo:!0,useHook:Uo});function Xo(e,t){return Ao(e,t,"-push")}var Yo=P({name:"FormPushButton",compose:de,keys:Io,useOptions:function(e,t){var n,r=t.name,o=t.value;return u(u({},e),{},{name:e.name||r,value:null!=(n=e.value)?n:o})},useProps:function(e,n){var r=n.onClick,o=a(n,["onClick"]),i=K(r),s=t.useCallback((function(t){var n,r;if(null===(n=i.current)||void 0===n||n.call(i,t),!t.defaultPrevented){null===(r=e.push)||void 0===r||r.call(e,e.name,e.value);var o=Do(e.values,e.name,[]).length,u=Ao(Ro(e.name,"-")+"-"+o,e.baseId);if(u){var a=t.currentTarget;window.requestAnimationFrame((function(){var e='[id^="'+u+'"]',t=j(a).querySelector(e);null==t||t.focus()}))}}}),[e.push,e.name,e.value,e.values,e.baseId]);return u({id:Xo(e.name,e.baseId),onClick:s},o)}}),$o=O({as:"button",memo:!0,useHook:Yo}),Zo=["baseId","unstable_idCountRef","unstable_virtual","rtl","orientation","items","groups","currentId","loop","wrap","shift","unstable_moves","unstable_hasActiveWidget","unstable_includesBaseElement","state","setBaseId","registerItem","unregisterItem","registerGroup","unregisterGroup","move","next","previous","up","down","first","last","sort","unstable_setVirtual","setRTL","setOrientation","setCurrentId","setLoop","setWrap","setShift","reset","unstable_setIncludesBaseElement","unstable_setHasActiveWidget","setState"],Jo=[].concat(Zo,["value","checked","unstable_checkOnFocus"]),Qo=Zo;function eu(e){return void 0!==e.checked?e.checked:void 0!==e.value&&e.state===e.value}function tu(e,t){var n=pe(e,"change");Object.defineProperties(n,{type:{value:"change"},target:{value:e},currentTarget:{value:e}}),null==t||t(n)}var nu=P({name:"Radio",compose:bt,keys:Jo,useOptions:function(e,t){var n,r=t.value,o=t.checked,i=e.unstable_clickOnEnter,s=void 0!==i&&i,l=e.unstable_checkOnFocus,c=void 0===l||l,d=a(e,["unstable_clickOnEnter","unstable_checkOnFocus"]);return u(u({checked:o,unstable_clickOnEnter:s,unstable_checkOnFocus:c},d),{},{value:null!=(n=d.value)?n:r})},useProps:function(e,n){var r=n.ref,o=n.onChange,i=n.onClick,s=a(n,["ref","onChange","onClick"]),l=t.useRef(null),c=t.useState(!0),d=c[0],f=c[1],v=eu(e),p=K(e.currentId===e.id),m=K(o),b=K(i);!function(e){var n=t.useState((function(){return eu(e)}))[0],r=t.useState(e.currentId)[0],o=e.id,u=e.setCurrentId;t.useEffect((function(){n&&o&&r!==o&&(null==u||u(o))}),[n,o,u,r])}(e),t.useEffect((function(){var e=l.current;e&&("INPUT"===e.tagName&&"radio"===e.type||f(!1))}),[]);var g=t.useCallback((function(t){var n,r;null===(n=m.current)||void 0===n||n.call(m,t),t.defaultPrevented||e.disabled||null===(r=e.setState)||void 0===r||r.call(e,e.value)}),[e.disabled,e.setState,e.value]),h=t.useCallback((function(e){var t;null===(t=b.current)||void 0===t||t.call(b,e),e.defaultPrevented||d||tu(e.currentTarget,g)}),[g,d]);return t.useEffect((function(){var t=l.current;t&&e.unstable_moves&&p.current&&e.unstable_checkOnFocus&&tu(t,g)}),[e.unstable_moves,e.unstable_checkOnFocus,g]),u({ref:D(l,r),role:d?void 0:"radio",type:d?"radio":void 0,value:d?e.value:void 0,name:d?e.baseId:void 0,"aria-checked":v,checked:v,onChange:g,onClick:h},s)}}),ru=O({as:"input",memo:!0,useHook:nu}),ou=t.createContext(null),uu=P({name:"FormRadioGroup",compose:Ho,keys:Eo,useOptions:function(e,t){var n=t.name;return u(u({},e),{},{name:e.name||n})},useProps:function(e,n){var r=n.wrapElement,o=a(n,["wrapElement"]),i=Jt({baseId:Ao(e.name,e.baseId),loop:!0}),s=t.useMemo((function(){return i}),Object.values(i));return u({role:"radiogroup",wrapElement:t.useCallback((function(e){return e=t.createElement(ou.Provider,{value:s},e),r?r(e):e}),[s,r])},o)}}),au=O({as:"fieldset",useHook:uu}),iu=P({name:"FormRadio",compose:nu,keys:Co,useOptions:function(e,n){var r=e.name||n.name,o=void 0!==e.value?e.value:n.value,a=t.useContext(ou),i=Do(e.values,r)===o;if(!a)throw new Error("Missing FormRadioGroup");return u(u(u({},e),a),{},{checked:i,name:r,value:o})},useProps:function(e,n){var r=n.onChange,o=n.onBlur,i=a(n,["onChange","onBlur"]),s=K(r),l=K(o),c=t.useCallback((function(t){var n,r;null===(n=s.current)||void 0===n||n.call(s,t),t.defaultPrevented||null===(r=e.update)||void 0===r||r.call(e,e.name,e.value)}),[e.update,e.name,e.value]),d=t.useCallback((function(t){var n,r;null===(n=l.current)||void 0===n||n.call(l,t),t.defaultPrevented||null===(r=e.blur)||void 0===r||r.call(e,e.name)}),[e.blur,e.name]);return u({name:Ro(e.name),onChange:c,onBlur:d},i)}}),su=O({as:"input",memo:!0,useHook:iu}),lu=P({name:"FormRemoveButton",compose:de,keys:Oo,useOptions:function(e,t){var n=t.name;return u(u({},e),{},{name:e.name||n})},useProps:function(e,n){var r=n.onClick,o=a(n,["onClick"]),i=K(r);return u({onClick:t.useCallback((function(t){var n,r;if(null===(n=i.current)||void 0===n||n.call(i,t),!t.defaultPrevented){null===(r=e.remove)||void 0===r||r.call(e,e.name,e.index);var o=Ao(e.name,e.baseId);if(o){var u=j(t.currentTarget);window.requestAnimationFrame((function(){var t='[id^="'+o+'-"]',n=u.querySelectorAll(t);if(n.length){var r=Array.from(n).reduce((function(t,n){var r=n.id.match(new RegExp(o+"-([0-9]+)"));if(!r)return t;var u=r[1];return Number(u)>t&&e.index>=t?Number(u):t}),0),a='[id^="'+o+"-"+r+'"]',i=u.querySelector(a);if(i)return void i.focus()}var s=Xo(e.name,e.baseId);if(s){var l=u.getElementById(s);null==l||l.focus()}}))}}}),[e.remove,e.name,e.index,e.baseId])},o)}}),cu=O({as:"button",memo:!0,useHook:lu});function du(e){if(Array.isArray(e))return e.filter((function(e){return!k(e)&&!Array.isArray(e)||du(e)}));for(var t={},n=0,r=Object.keys(e);n<r.length;n++){var o=r[n],u=e[o];t[o]=k(u)||Array.isArray(u)?du(u):e[o]}return t}function fu(e){return _(e)&&!Ur(e)}function vu(e,t){for(var n=e,r={},o=0,u=Object.keys(e);o<u.length;o++){var a=u[o],i=n[a];Array.isArray(i)?r[a]=i.map((function(e){return _(e)?vu(e,t):t})):_(i)?r[a]=vu(i,t):r[a]=t}return r}function pu(e){return"number"==typeof e?Math.floor(e)===e:String(Math.floor(Number(e)))===e}function mu(e,t,n){var r,o=S(t),a=o[0],i=o.slice(1);if(null==a)return e;var s=pu(a)?e||[]:e||{},l=i.length?mu(s[a],i,n):n;return pu(a)?e?[].concat(e.slice(0,Number(a)),[l],e.slice(Number(a)+1)):[l]:u(u({},e),{},((r={})[a]=l,r))}function bu(e,t){return Ur(t)?Ur(e)?e:{}:t}function gu(e,t){switch(t.type){case"reset":return u(u({},e),{},{values:e.initialValues,touched:{},errors:{},messages:{},valid:!0,validating:!1,submitting:!1,submitFailed:0,submitSucceed:0});case"startValidate":return u(u({},e),{},{validating:!0});case"endValidate":return u(u({},e),{},{validating:!1,errors:bu(e.errors,t.errors),messages:bu(e.messages,t.messages),valid:!fu(t.errors)});case"startSubmit":return u(u({},e),{},{touched:vu(e.values,!0),submitting:!0});case"endSubmit":var n=!fu(t.errors);return u(u({},e),{},{valid:n,submitting:!1,errors:bu(e.errors,t.errors),messages:bu(e.messages,t.messages),submitSucceed:n?e.submitSucceed+1:e.submitSucceed,submitFailed:n?e.submitFailed:e.submitFailed+1});case"update":var r=t.name,o=t.value,a="function"==typeof o?o(Do(e.values,r)):o;return u(u({},e),{},{values:mu(e.values,r,null!=a?a:"")});case"blur":return u(u({},e),{},{touched:mu(e.touched,t.name,!0)});case"push":var i=Do(e.values,t.name,[]);return u(u({},e),{},{values:mu(e.values,t.name,[].concat(i,[t.value]))});case"remove":var s=Do(e.values,t.name,[]).slice();return delete s[t.index],u(u({},e),{},{values:mu(e.values,t.name,s)});default:throw new Error}}var hu=P({name:"FormSubmitButton",compose:de,keys:xo,useOptions:function(e){return u({disabled:e.submitting},e)},useProps:function(e,n){var r=n.onClick,o=a(n,["onClick"]),i=K(r);return u({type:"submit",onClick:t.useCallback((function(t){var n;if(null===(n=i.current)||void 0===n||n.call(i,t),!t.defaultPrevented){var r=t.currentTarget;window.requestAnimationFrame((function(){var t=function(e,t){var n="[aria-invalid=true][id^="+e+"]";return j(t).querySelector(n)}(e.baseId,r);null==t||t.focus(),t&&"select"in t&&t.select()}))}}),[e.baseId])},o)}}),yu=O({as:"button",memo:!0,useHook:hu}),_u=P({name:"Grid",compose:Ke,keys:ht,useProps:function(e,t){return u({role:"grid"},t)}}),ku=O({as:"div",useHook:_u,useCreateElement:function(e,t,n){return b(e,t,n)}});var wu=[].concat(["baseId","unstable_idCountRef","unstable_virtual","rtl","orientation","items","groups","currentId","loop","wrap","shift","unstable_moves","unstable_hasActiveWidget","unstable_includesBaseElement","unstable_values","setBaseId","registerItem","unregisterItem","registerGroup","unregisterGroup","move","next","previous","up","down","first","last","sort","unstable_setVirtual","setRTL","setOrientation","setCurrentId","setLoop","setWrap","setShift","reset","unstable_setIncludesBaseElement","unstable_setHasActiveWidget","unstable_setValue"],["visible","animated","animating","show","hide","toggle","setVisible","setAnimated","stopAnimation","modal","unstable_disclosureRef","setModal","unstable_referenceRef","unstable_popoverRef","unstable_arrowRef","unstable_popoverStyles","unstable_arrowStyles","unstable_originalPlacement","unstable_update","placement","place"]),Iu=wu,Cu=Iu,Eu=Cu,Ou=Eu,xu=Ou,Su=[].concat(xu,["name"]),Pu=Su,Ru=xu,Au=P({name:"MenuBar",compose:Ke,keys:Cu,useProps:function(e,n){var r=n.ref,o=n.wrapElement,i=n.role,s=void 0===i?"menubar":i,l=a(n,["ref","wrapElement","role"]),c=t.useRef(null),d=function(e,n,r){var o="unstable_orphan"in r&&r.unstable_orphan,u=t.useContext(Er),a=t.useState([]),i=a[0],s=a[1],l=u||{},c=l.addChild,d=l.removeChild,f=t.useCallback((function(e){return s((function(t){return[].concat(t,[e])}))}),[]),v=t.useCallback((function(e){return s((function(t){return Cr(t,e)}))}),[]);t.useEffect((function(){if(c&&!o)return c(e),function(){null==d||d(e)}}),[e,c,d,o]);var p=t.useMemo((function(){return{orientation:r.orientation,next:r.next,previous:r.previous,ref:e,role:n,parent:u,children:i,addChild:f,removeChild:v}}),[r.orientation,r.next,r.previous,e,n,u,i,f,v]);return t.useCallback((function(e){return t.createElement(Er.Provider,{value:p},e)}),[p])}(c,s,e);!function(e,n,r){var o=n.items,u=void 0===o?[]:o,a=n.move;void 0===r&&(r=500);var i=t.useState(""),s=i[0],l=i[1];t.useEffect((function(){if(s){var e=setTimeout((function(){return l("")}),r),t=u.find((function(e){return Boolean(e.ref.current&&e.ref.current.textContent&&e.ref.current.textContent.toLowerCase().startsWith(s))}));return t&&a(t.id),function(){return clearTimeout(e)}}}),[s,u,a,r]),t.useEffect((function(){var t=e.current;if(t){var n=function(e){var n;if(!(e.key.length>1||e.shiftKey||e.metaKey||e.ctrlKey||e.altKey)){var r=e.target,o=null===(n=r.getAttribute)||void 0===n?void 0:n.call(r,"role"),u=r===t,a=o&&-1!==o.indexOf("menuitem")&&Y(r,"[role=menu],[role=menubar]")===t;(u||a)&&/^[a-z0-9_-]$/i.test(e.key)&&(e.stopPropagation(),e.preventDefault(),l((function(t){return""+t+e.key})))}};return t.addEventListener("keydown",n),function(){return t.removeEventListener("keydown",n)}}}),[e,l])}(c,e);var f=t.useCallback((function(e){return e=d(e),o?o(e):e}),[d,o]);return u({ref:D(c,r),role:s,"aria-orientation":e.orientation,wrapElement:f},l)}}),Tu=O({as:"div",useHook:Au,useCreateElement:function(e,t,n){return b(e,t,n)}});var Du=P({name:"Menu",compose:[Au,ro],keys:wu,useOptions:function(e){var n=t.useContext(Er);return u(u({unstable_autoFocusOnHide:!("menubar"===(null==n?void 0:n.role)),modal:!1},e),{},{unstable_autoFocusOnShow:!1,hideOnEsc:!1})},useProps:function(e,n){for(var r=n.onKeyDown,o=a(n,["onKeyDown"]),i=K(r),s=t.useContext(Er),l=!!s,c=s;c&&"menubar"!==c.role;)c=c.parent;var d,f=c||{},v=f.next,p=f.previous,m="horizontal"===f.orientation,b=(d=e.placement,t.useMemo((function(){var e;return null==d||null===(e=d.split("-"))||void 0===e?void 0:e[0]}),[d]));return u({role:"menu",onKeyDown:t.useCallback((function(t){var n,r;if(null===(n=i.current)||void 0===n||n.call(i,t),!t.defaultPrevented)if("Escape"===t.key)l||t.stopPropagation(),null===(r=e.hide)||void 0===r||r.call(e);else if(l&&!U(t)){var o={ArrowRight:m&&"left"!==b?v:"left"===b&&e.hide,ArrowLeft:m&&"right"!==b?p:"right"===b&&e.hide}[t.key];o&&(t.preventDefault(),l&&t.stopPropagation(),o())}}),[l,m,v,p,b,e.hide])},o)}}),Mu=O({as:"div",useHook:Du,useCreateElement:function(e,t,n){return b(e,t,n)}}),Bu=P({name:"PopoverArrow",compose:te,keys:eo,useOptions:function(e){var t=e.size;return u({size:void 0===t?30:t},a(e,["size"]))},useProps:function(e,n){var r,o=n.ref,i=n.style,s=a(n,["ref","style"]),l=e.placement.split("-")[0],c=e.unstable_arrowStyles,d={top:"rotateZ(180deg)",right:"rotateZ(-90deg)",bottom:"rotateZ(360deg)",left:"rotateZ(90deg)"}[l],f=t.useMemo((function(){return t.createElement("svg",{viewBox:"0 0 30 30",style:{transform:d}},t.createElement("path",{className:"stroke",d:"M23.7,27.1L17,19.9C16.5,19.3,15.8,19,15,19s-1.6,0.3-2.1,0.9l-6.6,7.2C5.3,28.1,3.4,29,2,29h26 C26.7,29,24.6,28.1,23.7,27.1z"}),t.createElement("path",{className:"fill",d:"M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z"}))}),[d]);return u({ref:D(e.unstable_arrowRef,o),style:u(u({},c),{},(r={fontSize:e.size,width:"1em",height:"1em",pointerEvents:"none"},r[l]="100%",r),i),children:f},s)}}),Lu=O({as:"div",memo:!0,useHook:Bu}),ju=P({name:"MenuArrow",compose:Bu,keys:Iu}),Hu=O({as:"div",memo:!0,useHook:ju});function Fu(e){void 0===e&&(e={});var n=ye(e),r=n.orientation,o=void 0===r?"horizontal":r,i=n.unstable_values,s=void 0===i?{}:i,l=a(n,["orientation","unstable_values"]),c=t.useState(s),d=c[0],f=c[1],v=Jt(u(u({},l),{},{orientation:o}));return u(u({},v),{},{unstable_values:d,unstable_setValue:t.useCallback((function(e,t){f((function(n){var r;return u(u({},n),{},((r={})[e]="function"==typeof t?t(n):t,r))}))}),[])})}var Vu=P({name:"PopoverDisclosure",compose:mo,keys:no,useProps:function(e,t){var n=t.ref,r=a(t,["ref"]);return u({ref:D(e.unstable_referenceRef,n)},r)}}),Ku=O({as:"button",memo:!0,useHook:Vu});function Wu(e){var t=null==e?void 0:e.find((function(e){return e.current&&!e.current.hidden}));return null==t?void 0:t.current}var Gu=function(){},Nu=P({name:"MenuButton",compose:Vu,keys:Eu,propsAreEqual:function(e,t){e.unstable_popoverStyles,e.unstable_arrowStyles,e.currentId,e.unstable_moves;var n=a(e,["unstable_popoverStyles","unstable_arrowStyles","currentId","unstable_moves"]),r=(t.unstable_popoverStyles,t.unstable_arrowStyles,t.currentId,t.unstable_moves,a(t,["unstable_popoverStyles","unstable_arrowStyles","currentId","unstable_moves"]));return Vu.unstable_propsAreEqual(n,r)},useProps:function(e,n){var r=n.ref,o=n.onClick,i=n.onKeyDown,s=n.onFocus,l=n.onMouseEnter,c=n.onMouseDown,d=a(n,["ref","onClick","onKeyDown","onFocus","onMouseEnter","onMouseDown"]),f=t.useContext(Er),v=t.useRef(null),p=t.useRef(!1),m=e.placement.split("-")[0],b=!!f,g="menubar"===(null==f?void 0:f.role),h=e.disabled||d["aria-disabled"],y=K(o),_=K(i),k=K(s),w=K(l),I=K(c),C=t.useCallback((function(t){var n,r;if("Escape"===t.key)null===(r=e.hide)||void 0===r||r.call(e);else if(!h){var o,u=e.first&&function(){return setTimeout(e.first)},a=e.last&&function(){return setTimeout(e.last)},i={Enter:u," ":u,ArrowUp:("top"===m||"bottom"===m)&&a,ArrowRight:"right"===m&&u,ArrowDown:("bottom"===m||"top"===m)&&u,ArrowLeft:"left"===m&&u}[t.key];if(i)return t.preventDefault(),t.stopPropagation(),null===(o=e.show)||void 0===o||o.call(e),void i()}null===(n=_.current)||void 0===n||n.call(_,t)}),[h,e.hide,e.first,e.last,m,e.show]),E=t.useCallback((function(t){var n;if(null===(n=w.current)||void 0===n||n.call(w,t),!t.defaultPrevented&&f){var r=t.currentTarget;g?Wu(f.children)&&r.focus():setTimeout((function(){var t;q(r)&&(null===(t=e.show)||void 0===t||t.call(e))}),200)}}),[f,g,e.show]),O=t.useCallback((function(e){var t;p.current=!0,null===(t=I.current)||void 0===t||t.call(I,e)}),[]),x=t.useCallback((function(t){var n,r;(null===(n=k.current)||void 0===n||n.call(k,t),t.defaultPrevented)||(h||g&&!p.current&&(null===(r=e.show)||void 0===r||r.call(e)))}),[g,h,e.show]),S=t.useCallback((function(t){var n;if(null===(n=y.current)||void 0===n||n.call(y,t),!t.defaultPrevented){var r,o,u;if(b&&!g)null===(r=e.show)||void 0===r||r.call(e);else if(null===(o=e.toggle)||void 0===o||o.call(e),p.current&&!g&&!e.visible)null===(u=e.move)||void 0===u||u.call(e,null);p.current=!1}}),[b,g,e.show,e.toggle,e.visible,e.move]);return u({ref:D(v,r),"aria-haspopup":"menu",onKeyDown:C,onMouseEnter:E,onMouseDown:O,onFocus:x,onClick:S},d)},useComposeOptions:function(e){return u(u({},e),{},{toggle:Gu})}}),qu=O({as:"button",memo:!0,useHook:Nu}),Uu=P({name:"MenuDisclosure",compose:Nu,useProps:function(e,t){return t}}),zu=O({as:"button",useHook:Uu}),Xu=P({name:"MenuGroup",compose:te,keys:Ou,useProps:function(e,t){return u({role:"group"},t)}}),Yu=O({as:"div",useHook:Xu});function $u(e,t,n){return Math.abs((e.x*(t.y-n.y)+t.x*(n.y-e.y)+n.x*(e.y-t.y))/2)}function Zu(e,n){var r=K(n),o=t.useRef(null),u=t.useRef(null),a=t.useRef(null),i=t.useRef(0),s=t.useRef(0),l=t.useCallback((function(t){if(null!=e&&e.children.length){u.current=null,a.current=null;var n=Wu(e.children);if(n){var r=function(e,t){var n=t.getBoundingClientRect(),r=n.top,o=n.right,u=n.bottom,a=n.left,i=a>e.clientX?a:o;return[{x:i,y:r},{x:i,y:u}]}(t,n);u.current=r[0],a.current=r[1]}}}),[null==e?void 0:e.children]),c=t.useCallback((function(e){var t=i.current!==e.clientX||s.current!==e.clientY;if(e.isTrusted&&!t)return!0;var n=Math.abs(i.current-e.clientX);i.current=e.clientX,s.current=e.clientY;var r,c,d,f,v=function(){return u.current&&a.current};return"mouseleave"!==e.type||v()||l(e),!!v()&&(n&&o.current&&(r={x:e.clientX,y:e.clientY},c=o.current,d=u.current,f=a.current,$u(c,d,f)===$u(r,d,f)+$u(c,r,f)+$u(c,d,r)))}),[l]);return{onMouseEnter:t.useCallback((function(t){var n;null===(n=r.current)||void 0===n||n.call(r,t),t.defaultPrevented||"menubar"!==(null==e?void 0:e.role)&&(o.current={x:t.clientX,y:t.clientY},l(t))}),[null==e?void 0:e.role,l]),isMouseInTransitToSubmenu:c}}function Ju(e){var t=e.relatedTarget;return(null==t?void 0:t.nodeType)===Node.ELEMENT_NODE?e.relatedTarget:e.toElement||null}var Qu=P({name:"MenuItem",compose:bt,keys:xu,propsAreEqual:function(e,t){e.unstable_popoverStyles,e.unstable_arrowStyles,e.visible;var n=a(e,["unstable_popoverStyles","unstable_arrowStyles","visible"]),r=(t.unstable_popoverStyles,t.unstable_arrowStyles,t.visible,a(t,["unstable_popoverStyles","unstable_arrowStyles","visible"]));return bt.unstable_propsAreEqual(n,r)},useProps:function(e,n){var r=n.onMouseEnter,o=n.onMouseMove,i=n.onMouseLeave,s=a(n,["onMouseEnter","onMouseMove","onMouseLeave"]),l=t.useContext(Er),c=K(o),d=K(i),f=Zu(l,r),v=f.onMouseEnter,p=f.isMouseInTransitToSubmenu;return u({role:"menuitem",onMouseEnter:v,onMouseMove:t.useCallback((function(t){var n,r;null===(n=c.current)||void 0===n||n.call(c,t),t.defaultPrevented||"menubar"!==(null==l?void 0:l.role)&&(p(t)||q(t.currentTarget)||null===(r=e.move)||void 0===r||r.call(e,t.currentTarget.id))}),[e.move]),onMouseLeave:t.useCallback((function(t){var n;if(null===(n=d.current)||void 0===n||n.call(d,t),!(t.defaultPrevented||"menubar"===(null==l?void 0:l.role)||function(e){var t=Ju(e);return!!t&&N(e.currentTarget,t)}(t)||function(e,t){if(null==t||!t.length)return!1;var n=Ju(e);if(!n)return!1;var r=Wu(t);return r&&N(r,n)}(t,null==l?void 0:l.children)||function(e,t){var n=Ju(e);return!!n&&(null==t?void 0:t.some((function(e){return e.ref.current&&N(e.ref.current,n)})))}(t,e.items))){var r;if(p(t))return;null===(r=e.move)||void 0===r||r.call(e,null)}}),[null==l?void 0:l.role,null==l?void 0:l.children,e.items,e.move])},s)}}),ea=O({as:"button",memo:!0,useHook:Qu}),ta=P({name:"MenuItemCheckbox",compose:[Qu,ge],keys:Su,propsAreEqual:function(e,t){if(e.name!==t.name)return Qu.unstable_propsAreEqual(e,t);var n=e.unstable_values,r=a(e,["unstable_values"]),o=t.unstable_values,u=a(t,["unstable_values"]);return n[t.name]===o[t.name]&&Qu.unstable_propsAreEqual(r,u)},useOptions:function(e){var n=t.useCallback((function(t){return e.unstable_setValue(e.name,t)}),[e.unstable_setValue,e.name]);return u(u({},e),{},{state:e.unstable_values[e.name],setState:n})},useProps:function(e,t){return u({role:"menuitemcheckbox",name:e.name},t)}}),na=O({as:"button",memo:!0,useHook:ta}),ra=P({name:"MenuItemRadio",compose:[Qu,nu],keys:Pu,propsAreEqual:function(e,t){if(e.name!==t.name)return Qu.unstable_propsAreEqual(e,t);var n=e.unstable_values,r=a(e,["unstable_values"]),o=t.unstable_values,u=a(t,["unstable_values"]);return n[t.name]===o[t.name]&&Qu.unstable_propsAreEqual(r,u)},useOptions:function(e){var n=t.useCallback((function(t){return e.unstable_setValue(e.name,t)}),[e.unstable_setValue,e.name]);return u(u({},e),{},{unstable_checkOnFocus:!1,state:e.unstable_values[e.name],setState:n})},useProps:function(e,t){return u({role:"menuitemradio"},t)}}),oa=O({as:"button",memo:!0,useHook:ra}),ua=P({name:"Separator",compose:te,keys:["orientation"],useOptions:function(e){var t=e.orientation;return u({orientation:void 0===t?"horizontal":t},a(e,["orientation"]))},useProps:function(e,t){return u({role:"separator","aria-orientation":e.orientation},t)}}),aa=O({as:"hr",memo:!0,useHook:ua}),ia=P({name:"MenuSeparator",compose:ua,keys:Ru,useOptions:function(e){var t=e.orientation;return u({orientation:"vertical"===(void 0===t?"vertical":t)?"horizontal":"vertical"},a(e,["orientation"]))}}),sa=O({as:"hr",memo:!0,useHook:ia});var la=P({name:"PopoverBackdrop",compose:co,keys:to,useOptions:function(e){var t=e.modal;return u({modal:void 0!==t&&t},a(e,["modal"]))}}),ca=O({as:"div",memo:!0,useHook:la}),da=P({name:"RadioGroup",compose:Ke,keys:Qo,useProps:function(e,t){return u({role:"radiogroup"},t)}}),fa=O({as:"div",useHook:da,useCreateElement:function(e,t,n){return b(e,t,n)}});var va=[].concat(["baseId","unstable_idCountRef","orientation","stops","currentId","unstable_pastId","unstable_moves","loop","setBaseId","register","unregister","move","next","previous","first","last","unstable_reset","unstable_orientate"],["stopId"]);function pa(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.useCallback((function(){for(var e,t=n.filter(Boolean),r=s(t);!(e=r()).done;){var o=e.value;o.apply(void 0,arguments)}}),n)}var ma=P({name:"Rover",compose:[le,ft],keys:va,useProps:function(e,n){var r=n.ref,o=n.tabIndex,i=void 0===o?0:o,s=n.onFocus,l=n.onKeyDown,c=a(n,["ref","tabIndex","onFocus","onKeyDown"]),d=t.useRef(null),f=e.stopId||e.id,v=e.disabled&&!e.focusable,p=null==e.currentId,m=e.currentId===f,b=(e.stops||[])[0]&&e.stops[0].id===f,g=m||b&&p;t.useEffect((function(){if(!v&&f)return e.register&&e.register(f,d),function(){return e.unregister&&e.unregister(f)}}),[f,v,e.register,e.unregister]),t.useEffect((function(){var t=d.current;t&&e.unstable_moves&&m&&!q(t)&&t.focus()}),[m,e.unstable_moves]);var h=t.useCallback((function(t){f&&t.currentTarget.contains(t.target)&&e.move(f,!0)}),[e.move,f]),y=t.useMemo((function(){return function(e){var t=void 0===e?{}:e,n=t.keyMap,r=t.onKey,o=t.stopPropagation,u=t.onKeyDown,a=t.shouldKeyDown,i=void 0===a?function(){return!0}:a,s=t.preventDefault,l=void 0===s||s;return function(e){if(n){var t,a="function"==typeof n?n(e):n,s="function"==typeof l?l(e):l,c="function"==typeof o?o(e):o;if(e.key in a){var d=a[e.key];if("function"==typeof d&&i(e))return s&&e.preventDefault(),c&&e.stopPropagation(),r&&r(e),void d(e)}u&&"current"in u?null===(t=u.current)||void 0===t||t.call(u,e):null==u||u(e)}}}({onKeyDown:l,stopPropagation:!0,shouldKeyDown:function(e){return e.currentTarget.contains(e.target)},keyMap:{ArrowUp:"horizontal"!==e.orientation&&e.previous,ArrowRight:"vertical"!==e.orientation&&e.next,ArrowDown:"horizontal"!==e.orientation&&e.next,ArrowLeft:"vertical"!==e.orientation&&e.previous,Home:e.first,End:e.last,PageUp:e.first,PageDown:e.last}})}),[l,e.orientation,e.previous,e.next,e.first,e.last]);return u({id:f,ref:D(d,r),tabIndex:g?i:-1,onFocus:pa(h,s),onKeyDown:y},c)}}),ba=O({as:"button",useHook:ma});function ga(e,t){var n=e.stops,r=e.currentId,o=e.unstable_pastId,i=e.unstable_moves,s=e.loop;switch(t.type){case"register":var l=t.id,c=t.ref;if(0===n.length)return u(u({},e),{},{stops:[{id:l,ref:c}]});if(n.findIndex((function(e){return e.id===l}))>=0)return e;var d=n.findIndex((function(e){return!(!e.ref.current||!c.current)&&Boolean(e.ref.current.compareDocumentPosition(c.current)&Node.DOCUMENT_POSITION_PRECEDING)}));return u(u({},e),{},-1===d?{stops:[].concat(n,[{id:l,ref:c}])}:{stops:[].concat(n.slice(0,d),[{id:l,ref:c}],n.slice(d))});case"unregister":var f=t.id,v=n.filter((function(e){return e.id!==f}));return v.length===n.length?e:u(u({},e),{},{stops:v,unstable_pastId:o&&o===f?null:o,currentId:r&&r===f?null:r});case"move":var p=t.id,m=t.silent?i:i+1;if(null===p)return u(u({},e),{},{currentId:null,unstable_pastId:r,unstable_moves:m});var b=n.findIndex((function(e){return e.id===p}));return-1===b?e:n[b].id===r?u(u({},e),{},{unstable_moves:m}):u(u({},e),{},{currentId:n[b].id,unstable_pastId:r,unstable_moves:m});case"next":if(null==r)return ga(e,{type:"move",id:n[0]&&n[0].id});var g=n.findIndex((function(e){return e.id===r})),h=[].concat(n.slice(g+1),s?n.slice(0,g):[]),y=h.findIndex((function(e){return e.id===r}))+1;return ga(e,{type:"move",id:h[y]&&h[y].id});case"previous":var _=ga(u(u({},e),{},{stops:n.slice().reverse()}),{type:"next"}),k=(_.stops,a(_,["stops"]));return u(u({},e),k);case"first":var w=n[0];return ga(e,{type:"move",id:w&&w.id});case"last":var I=n[n.length-1];return ga(e,{type:"move",id:I&&I.id});case"reset":return u(u({},e),{},{currentId:null,unstable_pastId:null});case"orientate":return u(u({},e),{},{orientation:t.orientation});default:throw new Error}}function ha(e){return t.useCallback(e,[])}var ya=["baseId","unstable_idCountRef","unstable_virtual","rtl","orientation","items","groups","currentId","loop","wrap","shift","unstable_moves","unstable_hasActiveWidget","unstable_includesBaseElement","selectedId","panels","manual","setBaseId","registerItem","unregisterItem","registerGroup","unregisterGroup","move","next","previous","up","down","first","last","sort","unstable_setVirtual","setRTL","setOrientation","setCurrentId","setLoop","setWrap","setShift","reset","unstable_setIncludesBaseElement","unstable_setHasActiveWidget","select","setSelectedId","registerPanel","unregisterPanel"],_a=ya,ka=[].concat(_a,["tabId"]);var wa=P({name:"Tab",compose:bt,keys:ya,useOptions:function(e){var t=e.focusable;return u({focusable:void 0===t||t},a(e,["focusable"]))},useProps:function(e,n){var r=n.onClick,o=n.onFocus,i=a(n,["onClick","onFocus"]),s=e.selectedId===e.id,l=function(e){return t.useMemo((function(){var t,n;return(null===(t=e.panels)||void 0===t||null===(n=t.find((function(t){return t.groupId===e.id})))||void 0===n?void 0:n.id)||void 0}),[e.panels,e.id])}(e),c=K(r),d=K(o),f=t.useCallback((function(t){var n,r;null===(n=c.current)||void 0===n||n.call(c,t),t.defaultPrevented||e.disabled||e.id&&(s||null===(r=e.select)||void 0===r||r.call(e,e.id))}),[e.disabled,s,e.select,e.id]),v=t.useCallback((function(t){var n,r;null===(n=d.current)||void 0===n||n.call(d,t),t.defaultPrevented||e.disabled||e.manual||e.id&&(s||null===(r=e.select)||void 0===r||r.call(e,e.id))}),[e.id,e.disabled,e.manual,s,e.select]);return u({role:"tab","aria-selected":s,"aria-controls":l,onClick:f,onFocus:v},i)}}),Ia=O({as:"button",memo:!0,useHook:wa}),Ca=P({name:"TabList",compose:Ke,keys:_a,useProps:function(e,t){return u({role:"tablist","aria-orientation":e.orientation},t)}}),Ea=O({as:"div",useHook:Ca,useCreateElement:function(e,t,n){return b(e,t,n)}});function Oa(e){var t,n,r=null===(t=e.panels)||void 0===t?void 0:t.find((function(t){return t.id===e.id})),o=e.tabId||(null==r?void 0:r.groupId);if(o||!r||!e.panels||!e.items)return o;var u,a,i,s=function(e,t){return e.filter((function(e){return!e.groupId})).indexOf(t)}(e.panels,r);return(null===(n=(u=e.items,a=e.panels,i=a.map((function(e){return e.groupId})).filter(Boolean),u.filter((function(e){return-1===i.indexOf(e.id||void 0)})))[s])||void 0===n?void 0:n.id)||void 0}var xa=P({name:"TabPanel",compose:[ft,yr],keys:ka,useProps:function(e,n){var r=n.ref,o=a(n,["ref"]),i=t.useRef(null),s=Oa(e),l=e.id,c=e.registerPanel,d=e.unregisterPanel;return t.useEffect((function(){if(l)return null==c||c({id:l,ref:i,groupId:s}),function(){null==d||d(l)}}),[s,l,c,d]),u({ref:D(i,r),role:"tabpanel",tabIndex:0,"aria-labelledby":s},o)},useComposeOptions:function(e){var t=Oa(e);return u({visible:!!t&&e.selectedId===t},e)}}),Sa=O({as:"div",useHook:xa});var Pa=["baseId","unstable_idCountRef","unstable_virtual","rtl","orientation","items","groups","currentId","loop","wrap","shift","unstable_moves","unstable_hasActiveWidget","unstable_includesBaseElement","setBaseId","registerItem","unregisterItem","registerGroup","unregisterGroup","move","next","previous","up","down","first","last","sort","unstable_setVirtual","setRTL","setOrientation","setCurrentId","setLoop","setWrap","setShift","reset","unstable_setIncludesBaseElement","unstable_setHasActiveWidget"],Ra=Pa,Aa=Ra,Ta=P({name:"Toolbar",compose:Ke,keys:Pa,useProps:function(e,t){return u({role:"toolbar","aria-orientation":e.orientation},t)}}),Da=O({as:"div",useHook:Ta,useCreateElement:function(e,t,n){return b(e,t,n)}}),Ma=P({name:"ToolbarItem",compose:bt,keys:Ra}),Ba=O({as:"button",memo:!0,useHook:Ma}),La=P({name:"ToolbarSeparator",compose:ua,keys:Aa,useOptions:function(e){var t=e.orientation;return u({orientation:"vertical"===(void 0===t?"vertical":t)?"horizontal":"vertical"},a(e,["orientation"]))}}),ja=O({as:"hr",memo:!0,useHook:La});var Ha=["baseId","unstable_idCountRef","visible","animated","animating","setBaseId","show","hide","toggle","setVisible","setAnimated","stopAnimation","unstable_disclosureRef","unstable_referenceRef","unstable_popoverRef","unstable_arrowRef","unstable_popoverStyles","unstable_arrowStyles","unstable_originalPlacement","unstable_update","placement","place","unstable_timeout","unstable_setTimeout"],Fa=[].concat(Ha,["unstable_portal"]),Va=Ha,Ka=Va,Wa={currentTooltipId:null,listeners:new Set,subscribe:function(e){var t=this;return this.listeners.add(e),function(){t.listeners.delete(e)}},show:function(e){this.currentTooltipId=e,this.listeners.forEach((function(t){return t(e)}))},hide:function(e){this.currentTooltipId===e&&(this.currentTooltipId=null,this.listeners.forEach((function(e){return e(null)})))}};function Ga(e){e.defaultPrevented||"Escape"===e.key&&Wa.show(null)}var Na=P({name:"Tooltip",compose:yr,keys:Fa,useOptions:function(e){var t=e.unstable_portal;return u({unstable_portal:void 0===t||t},a(e,["unstable_portal"]))},useProps:function(e,n){var r=n.ref,o=n.style,i=n.wrapElement,s=a(n,["ref","style","wrapElement"]);t.useEffect((function(){var t;j(null===(t=e.unstable_popoverRef)||void 0===t?void 0:t.current).addEventListener("keydown",Ga)}),[]);var l=t.useCallback((function(n){return e.unstable_portal&&(n=t.createElement(Ir,null,n)),i?i(n):n}),[e.unstable_portal,i]);return u({ref:D(e.unstable_popoverRef,r),role:"tooltip",style:u(u({},e.unstable_popoverStyles),{},{pointerEvents:"none"},o),wrapElement:l},s)}}),qa=O({as:"div",memo:!0,useHook:Na}),Ua=P({name:"TooltipArrow",compose:Bu,keys:Va,useOptions:function(e){var t=e.size;return u({size:void 0===t?16:t},a(e,["size"]))}}),za=O({as:"div",memo:!0,useHook:Ua}),Xa=P({name:"TooltipReference",compose:te,keys:Ka,useProps:function(e,n){var r=n.ref,o=n.onFocus,i=n.onBlur,s=n.onMouseEnter,l=n.onMouseLeave,c=a(n,["ref","onFocus","onBlur","onMouseEnter","onMouseLeave"]),d=K(o),f=K(i),v=K(s),p=K(l),m=t.useCallback((function(t){var n,r;null===(n=d.current)||void 0===n||n.call(d,t),t.defaultPrevented||null===(r=e.show)||void 0===r||r.call(e)}),[e.show]),b=t.useCallback((function(t){var n,r;null===(n=f.current)||void 0===n||n.call(f,t),t.defaultPrevented||null===(r=e.hide)||void 0===r||r.call(e)}),[e.hide]),g=t.useCallback((function(t){var n,r;null===(n=v.current)||void 0===n||n.call(v,t),t.defaultPrevented||null===(r=e.show)||void 0===r||r.call(e)}),[e.show]),h=t.useCallback((function(t){var n,r;null===(n=p.current)||void 0===n||n.call(p,t),t.defaultPrevented||null===(r=e.hide)||void 0===r||r.call(e)}),[e.hide]);return u({ref:D(e.unstable_referenceRef,r),tabIndex:0,onFocus:m,onBlur:b,onMouseEnter:g,onMouseLeave:h,"aria-describedby":e.baseId},c)}}),Ya=O({as:"div",useHook:Xa});var $a=P({name:"VisuallyHidden",compose:te,keys:[],useProps:function(e,t){var n=t.style,r=a(t,["style"]);return u({style:u({border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"},n)},r)}}),Za=O({as:"span",memo:!0,useHook:$a});function Ja(e){var n=e.children,r=e.unstable_system;return t.createElement(l.Provider,{value:r},n)}var Qa={};e.Box=A,e.Button=fe,e.Checkbox=he,e.Clickable=ce,e.Composite=We,e.CompositeGroup=Rt,e.CompositeItem=gt,e.Dialog=Jr,e.DialogBackdrop=fo,e.DialogDisclosure=bo,e.Disclosure=po,e.DisclosureContent=_r,e.FormRadioGroupContext=ou,e.Group=St,e.Input=Ko,e.Menu=Mu,e.MenuArrow=Hu,e.MenuBar=Tu,e.MenuButton=qu,e.MenuDisclosure=zu,e.MenuGroup=Yu,e.MenuItem=ea,e.MenuItemCheckbox=na,e.MenuItemRadio=oa,e.MenuSeparator=sa,e.Popover=oo,e.PopoverArrow=Lu,e.PopoverBackdrop=ca,e.PopoverDisclosure=Ku,e.Portal=Ir,e.PortalContext=wr,e.Provider=function(e){var n=e.unstable_prefix,r=e.unstable_system,o=void 0===r?Qa:r,u=e.children;return t.createElement(dt,{prefix:n},t.createElement(Ja,{unstable_system:o},u))},e.Radio=ru,e.RadioGroup=fa,e.Role=ne,e.Rover=ba,e.Separator=aa,e.Tab=Ia,e.TabList=Ea,e.TabPanel=Sa,e.Tabbable=se,e.Toolbar=Da,e.ToolbarItem=Ba,e.ToolbarSeparator=ja,e.Tooltip=qa,e.TooltipArrow=za,e.TooltipReference=Ya,e.VisuallyHidden=Za,e.unstable_Combobox=ut,e.unstable_ComboboxGridCell=Ot,e.unstable_ComboboxGridRow=Mt,e.unstable_ComboboxItem=Ct,e.unstable_ComboboxList=pr,e.unstable_ComboboxOption=gr,e.unstable_ComboboxPopover=ao,e.unstable_Composite=We,e.unstable_CompositeGroup=Rt,e.unstable_CompositeItem=gt,e.unstable_CompositeItemWidget=lo,e.unstable_Form=Po,e.unstable_FormCheckbox=jo,e.unstable_FormGroup=Fo,e.unstable_FormInput=Go,e.unstable_FormLabel=qo,e.unstable_FormMessage=zo,e.unstable_FormPushButton=$o,e.unstable_FormRadio=su,e.unstable_FormRadioGroup=au,e.unstable_FormRemoveButton=cu,e.unstable_FormSubmitButton=yu,e.unstable_Grid=ku,e.unstable_GridCell=kt,e.unstable_GridRow=Tt,e.unstable_Id=vt,e.unstable_IdContext=ct,e.unstable_IdProvider=dt,e.unstable_useCombobox=ot,e.unstable_useComboboxGridCell=Et,e.unstable_useComboboxGridRow=Dt,e.unstable_useComboboxGridState=function(e){void 0===e&&(e={});var t=ye(e);return fr(tn(t),t)},e.unstable_useComboboxItem=It,e.unstable_useComboboxList=vr,e.unstable_useComboboxListGridState=tn,e.unstable_useComboboxListState=mr,e.unstable_useComboboxOption=br,e.unstable_useComboboxPopover=uo,e.unstable_useComboboxState=function(e){void 0===e&&(e={});var t=ye(e);return fr(mr(t),t)},e.unstable_useCompositeItemWidget=so,e.unstable_useCompositeState=Jt,e.unstable_useForm=So,e.unstable_useFormCheckbox=Lo,e.unstable_useFormGroup=Ho,e.unstable_useFormInput=Wo,e.unstable_useFormLabel=No,e.unstable_useFormMessage=Uo,e.unstable_useFormPushButton=Yo,e.unstable_useFormRadio=iu,e.unstable_useFormRadioGroup=uu,e.unstable_useFormRemoveButton=lu,e.unstable_useFormState=function(e){void 0===e&&(e={});var n=ye(e),r=n.values,o=void 0===r?{}:r,i=n.validateOnBlur,s=void 0===i||i,l=n.validateOnChange,c=void 0===l||l,d=n.resetOnSubmitSucceed,f=void 0!==d&&d,v=n.resetOnUnmount,p=void 0===v||v,m=n.onValidate,b=n.onSubmit,g=a(n,["values","validateOnBlur","validateOnChange","resetOnSubmitSucceed","resetOnUnmount","onValidate","onSubmit"]),h=K("function"!=typeof e?e.onValidate:m),y=K("function"!=typeof e?e.onSubmit:b),_=Lt(g),k=t.useReducer(gu,{initialValues:o,values:o,touched:{},errors:{},messages:{},valid:!0,validating:!1,submitting:!1,submitFailed:0,submitSucceed:0}),w=k[0],I=(w.initialValues,a(w,["initialValues"])),C=k[1],E=t.useCallback((function(e){return void 0===e&&(e=I.values),new Promise((function(t){if(h.current){var n=h.current(e);r=n,Boolean(r&&"then"in r&&r.then)&&C({type:"startValidate"}),t(Promise.resolve(n).then((function(e){return C({type:"endValidate",messages:e}),e})))}else t(void 0);var r})).catch((function(e){throw C({type:"endValidate",errors:e}),e}))}),[I.values]);return _e((function(){c&&E().catch((function(){}))}),[E,c]),t.useEffect((function(){if(p)return function(){C({type:"reset"})}}),[p]),u(u(u({},_),I),{},{values:I.values,validate:E,reset:t.useCallback((function(){return C({type:"reset"})}),[]),submit:t.useCallback((function(){return C({type:"startSubmit"}),E().then((function(e){return y.current?Promise.resolve(y.current(du(I.values))).then((function(t){var n=u(u({},e),t);C({type:"endSubmit",messages:n})})):C({type:"endSubmit",messages:e})})).then((function(){f&&C({type:"reset"})})).catch((function(e){C({type:"endSubmit",errors:e})}))}),[E]),update:t.useCallback((function(e,t){return C({type:"update",name:e,value:t})}),[]),blur:t.useCallback((function(e){C({type:"blur",name:e}),s&&E().catch((function(){}))}),[E]),push:t.useCallback((function(e,t){return C({type:"push",name:e,value:t})}),[]),remove:t.useCallback((function(e,t){return C({type:"remove",name:e,index:t})}),[])})},e.unstable_useFormSubmitButton=hu,e.unstable_useGrid=_u,e.unstable_useGridCell=_t,e.unstable_useGridRow=At,e.unstable_useGridState=Qt,e.unstable_useId=ft,e.unstable_useIdState=Lt,e.useBox=R,e.useButton=de,e.useCheckbox=ge,e.useCheckboxState=function(e){void 0===e&&(e={});var n=ye(e).state,r=void 0!==n&&n,o=t.useState(r);return{state:o[0],setState:o[1]}},e.useClickable=le,e.useComposite=Ke,e.useCompositeGroup=Pt,e.useCompositeItem=bt,e.useCompositeState=Jt,e.useDialog=Zr,e.useDialogBackdrop=co,e.useDialogDisclosure=mo,e.useDialogState=sr,e.useDisclosure=vo,e.useDisclosureContent=yr,e.useDisclosureState=ir,e.useGroup=xt,e.useInput=Vo,e.useMenu=Du,e.useMenuArrow=ju,e.useMenuBar=Au,e.useMenuBarState=Fu,e.useMenuButton=Nu,e.useMenuDisclosure=Uu,e.useMenuGroup=Xu,e.useMenuItem=Qu,e.useMenuItemCheckbox=ta,e.useMenuItemRadio=ra,e.useMenuSeparator=ia,e.useMenuState=function(e){void 0===e&&(e={});var n=t.useContext(Er),r=ye(e),o=r.orientation,i=void 0===o?"vertical":o,s=r.gutter,l=void 0===s?0:s,c=a(r,["orientation","gutter"]),d=c.placement||(n&&"vertical"===n.orientation?"right-start":"bottom-start"),f=Fu(u(u({},c),{},{orientation:i})),v=dr(u(u({},c),{},{placement:d,gutter:l}));return t.useEffect((function(){v.visible||f.reset()}),[v.visible,f.reset]),u(u({},f),v)},e.usePopover=ro,e.usePopoverArrow=Bu,e.usePopoverBackdrop=la,e.usePopoverDisclosure=Vu,e.usePopoverState=dr,e.useRadio=nu,e.useRadioGroup=da,e.useRadioState=function(e){void 0===e&&(e={});var n=ye(e),r=n.state,o=n.loop,i=void 0===o||o,s=a(n,["state","loop"]),l=t.useState(r),c=l[0],d=l[1],f=Jt(u(u({},s),{},{loop:i}));return u(u({},f),{},{state:c,setState:d})},e.useRole=te,e.useRover=ma,e.useRoverState=function(e){void 0===e&&(e={});var n=ye(e),r=n.orientation,o=n.currentId,i=void 0===o?null:o,s=n.loop,l=void 0!==s&&s,c=a(n,["orientation","currentId","loop"]),d=t.useReducer(ga,{orientation:r,stops:[],currentId:i,unstable_pastId:null,unstable_moves:0,loop:l}),f=d[0],v=d[1];return u(u(u({},Lt(c)),f),{},{register:ha((function(e,t){return v({type:"register",id:e,ref:t})})),unregister:ha((function(e){return v({type:"unregister",id:e})})),move:ha((function(e,t){return v({type:"move",id:e,silent:t})})),next:ha((function(){return v({type:"next"})})),previous:ha((function(){return v({type:"previous"})})),first:ha((function(){return v({type:"first"})})),last:ha((function(){return v({type:"last"})})),unstable_reset:ha((function(){return v({type:"reset"})})),unstable_orientate:ha((function(e){return v({type:"orientate",orientation:e})}))})},e.useSeparator=ua,e.useTab=wa,e.useTabList=Ca,e.useTabPanel=xa,e.useTabState=function(e){void 0===e&&(e={});var n=ye(e),r=n.selectedId,o=n.loop,i=void 0===o||o,s=n.manual,l=void 0!==s&&s,c=Jt(u({loop:i,currentId:r},a(n,["selectedId","loop","manual"]))),d=Jt(),f=t.useState(r),v=f[0],p=f[1],m=t.useCallback((function(e){c.move(e),p(e)}),[c.move]);return t.useEffect((function(){null!==v&&(c.items.find((function(e){return e.id===v}))||c.currentId&&p(c.currentId))}),[v,c.items,c.currentId]),u(u({},c),{},{selectedId:v,panels:d.items,manual:l,select:m,setSelectedId:p,registerPanel:t.useCallback((function(e){return d.registerItem(e)}),[d.registerItem]),unregisterPanel:t.useCallback((function(e){return d.unregisterItem(e)}),[d.unregisterItem])})},e.useTabbable=ie,e.useToolbar=Ta,e.useToolbarItem=Ma,e.useToolbarSeparator=La,e.useToolbarState=function(e){void 0===e&&(e={});var t=ye(e),n=t.orientation;return Jt(u({orientation:void 0===n?"horizontal":n},a(t,["orientation"])))},e.useTooltip=Na,e.useTooltipArrow=Ua,e.useTooltipReference=Xa,e.useTooltipState=function(e){void 0===e&&(e={});var n=ye(e),r=n.placement,o=void 0===r?"top":r,i=n.unstable_timeout,s=void 0===i?0:i,l=a(n,["placement","unstable_timeout"]),c=t.useState(s),d=c[0],f=c[1],v=t.useRef(null),p=t.useRef(null),m=dr(u(u({},l),{},{placement:o})),b=(m.modal,m.setModal,a(m,["modal","setModal"])),g=t.useCallback((function(){null!==v.current&&window.clearTimeout(v.current),null!==p.current&&window.clearTimeout(p.current)}),[]),h=t.useCallback((function(){g(),b.hide(),p.current=window.setTimeout((function(){Wa.hide(b.baseId)}),d)}),[g,b.hide,d,b.baseId]),y=t.useCallback((function(){g(),!d||Wa.currentTooltipId?(Wa.show(b.baseId),b.show()):(Wa.show(null),v.current=window.setTimeout((function(){Wa.show(b.baseId),b.show()}),d))}),[g,d,b.show,b.baseId]);return t.useEffect((function(){return Wa.subscribe((function(e){e!==b.baseId&&(g(),b.visible&&b.hide())}))}),[b.baseId,g,b.visible,b.hide]),t.useEffect((function(){return function(){g(),Wa.hide(b.baseId)}}),[g,b.baseId]),u(u({},b),{},{hide:h,show:y,unstable_timeout:d,unstable_setTimeout:f})},e.useVisuallyHidden=$a,Object.defineProperty(e,"__esModule",{value:!0})}));