@react-hive/honey-layout 16.0.0 → 16.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/HoneyBox/HoneyBox.d.ts +5 -5
- package/dist/components/HoneyFlex/HoneyFlex.d.ts +2 -2
- package/dist/components/HoneyGrid/HoneyGridStyled.d.ts +2 -2
- package/dist/components/HoneyGridColumn/HoneyGridColumnStyled.d.ts +2 -2
- package/dist/components/HoneyList/HoneyListStyled.d.ts +2 -2
- package/dist/components/HoneyPopup/HoneyPopupStyled.d.ts +2 -2
- package/dist/effects.d.ts +2 -2
- package/dist/helpers/helpers.d.ts +3 -3
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.dev.cjs +12 -13
- package/dist/index.dev.cjs.map +1 -1
- package/dist/index.mjs +10 -10
- package/dist/index.mjs.map +1 -1
- package/dist/types/css.types.d.ts +11 -11
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
/*! For license information please see index.mjs.LICENSE.txt */
|
|
2
|
-
import*as e from"react";import{CSS_COLOR_PROPERTIES as t,CSS_SPACING_PROPERTIES as n,HONEY_BREAKPOINTS as r,HoneyStyleProvider as o,checkIsThemeColorValue as i,css as u,resolveColor as c,resolveSpacing as l,styled as s}from"@react-hive/honey-style";var a={117(e,t,n){e=n.nmd(e);var r="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",u="[object Function]",c="[object Object]",l=/^\[object .+?Constructor\]$/,s=/^(?:0|[1-9]\d*)$/,a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a[i]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a[u]=a["[object Map]"]=a["[object Number]"]=a[c]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1;var f,d,p,v="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,m="object"==typeof self&&self&&self.Object===Object&&self,h=v||m||Function("return this")(),g=t&&!t.nodeType&&t,y=g&&e&&!e.nodeType&&e,b=y&&y.exports===g,x=b&&v.process,w=function(){try{return y&&y.require&&y.require("util").types||x&&x.binding&&x.binding("util")}catch(e){}}(),E=w&&w.isTypedArray,R=Array.prototype,O=Function.prototype,C=Object.prototype,S=h["__core-js_shared__"],_=O.toString,j=C.hasOwnProperty,A=(f=/[^.]+$/.exec(S&&S.keys&&S.keys.IE_PROTO||""))?"Symbol(src)_1."+f:"",k=C.toString,L=_.call(Object),T=RegExp("^"+_.call(j).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),P=b?h.Buffer:void 0,M=h.Symbol,D=h.Uint8Array,$=(P&&P.allocUnsafe,d=Object.getPrototypeOf,p=Object,function(e){return d(p(e))}),I=Object.create,N=C.propertyIsEnumerable,F=R.splice,W=M?M.toStringTag:void 0,H=function(){try{var e=ce(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),z=P?P.isBuffer:void 0,B=Math.max,U=Date.now,K=ce(h,"Map"),V=ce(Object,"create"),q=function(){function e(){}return function(t){if(!be(t))return{};if(I)return I(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function X(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Y(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function G(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Z(e){var t=this.__data__=new Y(e);this.size=t.size}function Q(e,t,n){(void 0!==n&&!de(e[t],n)||void 0===n&&!(t in e))&&te(e,t,n)}function J(e,t,n){var r=e[t];j.call(e,t)&&de(r,n)&&(void 0!==n||t in e)||te(e,t,n)}function ee(e,t){for(var n=e.length;n--;)if(de(e[n][0],t))return n;return-1}function te(e,t,n){"__proto__"==t&&H?H(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}X.prototype.clear=function(){this.__data__=V?V(null):{},this.size=0},X.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},X.prototype.get=function(e){var t=this.__data__;if(V){var n=t[e];return n===r?void 0:n}return j.call(t,e)?t[e]:void 0},X.prototype.has=function(e){var t=this.__data__;return V?void 0!==t[e]:j.call(t,e)},X.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=V&&void 0===t?r:t,this},Y.prototype.clear=function(){this.__data__=[],this.size=0},Y.prototype.delete=function(e){var t=this.__data__,n=ee(t,e);return!(n<0||(n==t.length-1?t.pop():F.call(t,n,1),--this.size,0))},Y.prototype.get=function(e){var t=this.__data__,n=ee(t,e);return n<0?void 0:t[n][1]},Y.prototype.has=function(e){return ee(this.__data__,e)>-1},Y.prototype.set=function(e,t){var n=this.__data__,r=ee(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},G.prototype.clear=function(){this.size=0,this.__data__={hash:new X,map:new(K||Y),string:new X}},G.prototype.delete=function(e){var t=ue(this,e).delete(e);return this.size-=t?1:0,t},G.prototype.get=function(e){return ue(this,e).get(e)},G.prototype.has=function(e){return ue(this,e).has(e)},G.prototype.set=function(e,t){var n=ue(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Z.prototype.clear=function(){this.__data__=new Y,this.size=0},Z.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Z.prototype.get=function(e){return this.__data__.get(e)},Z.prototype.has=function(e){return this.__data__.has(e)},Z.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Y){var r=n.__data__;if(!K||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new G(r)}return n.set(e,t),this.size=n.size,this};function ne(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":W&&W in Object(e)?function(e){var t=j.call(e,W),n=e[W];try{e[W]=void 0;var r=!0}catch(e){}var o=k.call(e);return r&&(t?e[W]=n:delete e[W]),o}(e):function(e){return k.call(e)}(e)}function re(e){return xe(e)&&ne(e)==i}function oe(e,t,n,r,o){e!==t&&function(e,t,n){for(var r=-1,o=Object(e),i=n(e),u=i.length;u--;){var c=i[++r];if(!1===t(o[c],c,o))break}}(t,function(i,u){if(o||(o=new Z),be(i))!function(e,t,n,r,o,i,u){var l=ae(e,n),s=ae(t,n),a=u.get(s);if(a)Q(e,n,a);else{var f,d,p,v,m,h=i?i(l,s,n+"",e,t,u):void 0,g=void 0===h;if(g){var y=ve(s),b=!y&&he(s),x=!y&&!b&&we(s);h=s,y||b||x?ve(l)?h=l:xe(m=l)&&me(m)?h=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(l):b?(g=!1,h=function(e){return e.slice()}(s)):x?(g=!1,v=new(p=(f=s).buffer).constructor(p.byteLength),new D(v).set(new D(p)),d=v,h=new f.constructor(d,f.byteOffset,f.length)):h=[]:function(e){if(!xe(e)||ne(e)!=c)return!1;var t=$(e);if(null===t)return!0;var n=j.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&_.call(n)==L}(s)||pe(s)?(h=l,pe(l)?h=function(e){return function(e,t,n){var r=!n;n||(n={});for(var o=-1,i=t.length;++o<i;){var u=t[o],c=void 0;void 0===c&&(c=e[u]),r?te(n,u,c):J(n,u,c)}return n}(e,Ee(e))}(l):be(l)&&!ge(l)||(h=function(e){return"function"!=typeof e.constructor||se(e)?{}:q($(e))}(s))):g=!1}g&&(u.set(s,h),o(h,s,r,i,u),u.delete(s)),Q(e,n,h)}}(e,t,u,n,oe,r,o);else{var l=r?r(ae(e,u),i,u+"",e,t,o):void 0;void 0===l&&(l=i),Q(e,u,l)}},Ee)}var ie=H?function(e,t){return H(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:Ce;function ue(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function ce(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!be(e)||function(e){return!!A&&A in e}(e))&&(ge(e)?T:l).test(function(e){if(null!=e){try{return _.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}function le(e,t){var n=typeof e;return!!(t=null==t?o:t)&&("number"==n||"symbol"!=n&&s.test(e))&&e>-1&&e%1==0&&e<t}function se(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||C)}function ae(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var fe=function(e){var t=0,n=0;return function(){var r=U(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(ie);function de(e,t){return e===t||e!=e&&t!=t}var pe=re(function(){return arguments}())?re:function(e){return xe(e)&&j.call(e,"callee")&&!N.call(e,"callee")},ve=Array.isArray;function me(e){return null!=e&&ye(e.length)&&!ge(e)}var he=z||function(){return!1};function ge(e){if(!be(e))return!1;var t=ne(e);return t==u||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function ye(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}function be(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function xe(e){return null!=e&&"object"==typeof e}var we=E?function(e){return function(t){return e(t)}}(E):function(e){return xe(e)&&ye(e.length)&&!!a[ne(e)]};function Ee(e){return me(e)?function(e,t){var n=ve(e),r=!n&&pe(e),o=!n&&!r&&he(e),i=!n&&!r&&!o&&we(e),u=n||r||o||i,c=u?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],l=c.length;for(var s in e)!t&&!j.call(e,s)||u&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||le(s,l))||c.push(s);return c}(e,!0):function(e){if(!be(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=se(e),n=[];for(var r in e)("constructor"!=r||!t&&j.call(e,r))&&n.push(r);return n}(e)}var Re,Oe=(Re=function(e,t,n){oe(e,t,n)},function(e,t){return fe(function(e,t,n){return t=B(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=B(r.length-t,0),u=Array(i);++o<i;)u[o]=r[t+o];o=-1;for(var c=Array(t+1);++o<t;)c[o]=r[o];return c[t]=n(u),function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(e,this,c)}}(e,t,Ce),e+"")}(function(e,t){var n=-1,r=t.length,o=r>1?t[r-1]:void 0,i=r>2?t[2]:void 0;for(o=Re.length>3&&"function"==typeof o?(r--,o):void 0,i&&function(e,t,n){if(!be(n))return!1;var r=typeof t;return!!("number"==r?me(n)&&le(t,n.length):"string"==r&&t in n)&&de(n[t],e)}(t[0],t[1],i)&&(o=r<3?void 0:o,r=1),e=Object(e);++n<r;){var u=t[n];u&&Re(e,u,n)}return e}));function Ce(e){return e}e.exports=Oe},551(e,t,n){var r="Expected a function",o=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt,s="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,a="object"==typeof self&&self&&self.Object===Object&&self,f=s||a||Function("return this")(),d=Object.prototype.toString,p=Math.max,v=Math.min,m=function(){return f.Date.now()};function h(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==d.call(e)}(e))return NaN;if(h(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=h(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var n=u.test(e);return n||c.test(e)?l(e.slice(2),n?2:8):i.test(e)?NaN:+e}e.exports=function(e,t,n){var o=!0,i=!0;if("function"!=typeof e)throw new TypeError(r);return h(n)&&(o="leading"in n?!!n.leading:o,i="trailing"in n?!!n.trailing:i),function(e,t,n){var o,i,u,c,l,s,a=0,f=!1,d=!1,y=!0;if("function"!=typeof e)throw new TypeError(r);function b(t){var n=o,r=i;return o=i=void 0,a=t,c=e.apply(r,n)}function x(e){var n=e-s;return void 0===s||n>=t||n<0||d&&e-a>=u}function w(){var e=m();if(x(e))return E(e);l=setTimeout(w,function(e){var n=t-(e-s);return d?v(n,u-(e-a)):n}(e))}function E(e){return l=void 0,y&&o?b(e):(o=i=void 0,c)}function R(){var e=m(),n=x(e);if(o=arguments,i=this,s=e,n){if(void 0===l)return function(e){return a=e,l=setTimeout(w,t),f?b(e):c}(s);if(d)return l=setTimeout(w,t),b(s)}return void 0===l&&(l=setTimeout(w,t)),c}return t=g(t)||0,h(n)&&(f=!!n.leading,u=(d="maxWait"in n)?p(g(n.maxWait)||0,t):u,y="trailing"in n?!!n.trailing:y),R.cancel=function(){void 0!==l&&clearTimeout(l),a=0,o=s=i=l=void 0},R.flush=function(){return void 0===l?c:E(m())},R}(e,t,{leading:o,maxWait:t,trailing:i})}},685(e,t,n){var r=n(649);function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var u={d:{f:i,r:function(){throw Error(o(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},c=Symbol.for("react.portal"),l=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType)throw Error(o(299));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:c,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.flushSync=function(e){var t=l.T,n=u.p;try{if(l.T=null,u.p=2,e)return e()}finally{l.T=t,u.p=n,u.d.f()}}},289(e,t,n){!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(685)},131(e,t){var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function o(e,t,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==t.key&&(o=""+t.key),"key"in t)for(var i in r={},t)"key"!==i&&(r[i]=t[i]);else r=t;return t=r.ref,{$$typeof:n,type:e,key:o,ref:void 0!==t?t:null,props:r}}t.Fragment=r,t.jsx=o,t.jsxs=o},615(e,t,n){e.exports=n(131)},649(t){t.exports=e}},f={};function d(e){var t=f[e];if(void 0!==t)return t.exports;var n=f[e]={id:e,loaded:!1,exports:{}};return a[e](n,n.exports,d),n.loaded=!0,n.exports}d.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return d.d(t,{a:t}),t},d.d=(e,t)=>{for(var n in t)d.o(t,n)&&!d.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},d.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),d.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),d.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);const p=!1;function v(e,t){if(!e)throw new Error(t)}const m=e=>"function"==typeof e,h=(e,...t)=>"function"==typeof e?e(...t):e,g=(...e)=>t=>{e.forEach(e=>{m(e)?e(t):"object"==typeof e&&(e.current=t)})},y=()=>`${Date.now().toString()}${Math.floor(1e4*Math.random()).toString().padStart(4,"0")}`,b=e=>"$"===e[0],x=e=>({theme:r,...o})=>u`
|
|
3
|
-
${((e,t)=>Object.entries(e).filter(([e,n])=>"xs"===t&&b(e)||n&&"object"==typeof n&&t in n))(o,e).map(([r,o])=>{const s=r.slice(1);return
|
|
4
|
-
${(e=>{const t=e.charAt(0),n=e.slice(1);return t.toLowerCase()+n.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)})(s)}: ${((e,r,o)=>{const
|
|
2
|
+
import*as e from"react";import{CSS_COLOR_PROPERTIES as t,CSS_SPACING_PROPERTIES as n,HONEY_BREAKPOINTS as r,HoneyStyleProvider as o,css as i,isThemeColorValue as u,resolveColor as c,resolveSpacing as l,styled as s}from"@react-hive/honey-style";var a={117(e,t,n){e=n.nmd(e);var r="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",u="[object Function]",c="[object Object]",l=/^\[object .+?Constructor\]$/,s=/^(?:0|[1-9]\d*)$/,a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a[i]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a[u]=a["[object Map]"]=a["[object Number]"]=a[c]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1;var f,d,p,v="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,m="object"==typeof self&&self&&self.Object===Object&&self,h=v||m||Function("return this")(),g=t&&!t.nodeType&&t,y=g&&e&&!e.nodeType&&e,b=y&&y.exports===g,x=b&&v.process,w=function(){try{return y&&y.require&&y.require("util").types||x&&x.binding&&x.binding("util")}catch(e){}}(),E=w&&w.isTypedArray,R=Array.prototype,O=Function.prototype,C=Object.prototype,S=h["__core-js_shared__"],_=O.toString,j=C.hasOwnProperty,A=(f=/[^.]+$/.exec(S&&S.keys&&S.keys.IE_PROTO||""))?"Symbol(src)_1."+f:"",k=C.toString,L=_.call(Object),T=RegExp("^"+_.call(j).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),P=b?h.Buffer:void 0,M=h.Symbol,D=h.Uint8Array,$=(P&&P.allocUnsafe,d=Object.getPrototypeOf,p=Object,function(e){return d(p(e))}),I=Object.create,N=C.propertyIsEnumerable,F=R.splice,W=M?M.toStringTag:void 0,H=function(){try{var e=ce(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),z=P?P.isBuffer:void 0,B=Math.max,U=Date.now,K=ce(h,"Map"),V=ce(Object,"create"),q=function(){function e(){}return function(t){if(!be(t))return{};if(I)return I(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function X(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Y(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function G(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Z(e){var t=this.__data__=new Y(e);this.size=t.size}function Q(e,t,n){(void 0!==n&&!de(e[t],n)||void 0===n&&!(t in e))&&te(e,t,n)}function J(e,t,n){var r=e[t];j.call(e,t)&&de(r,n)&&(void 0!==n||t in e)||te(e,t,n)}function ee(e,t){for(var n=e.length;n--;)if(de(e[n][0],t))return n;return-1}function te(e,t,n){"__proto__"==t&&H?H(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}X.prototype.clear=function(){this.__data__=V?V(null):{},this.size=0},X.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},X.prototype.get=function(e){var t=this.__data__;if(V){var n=t[e];return n===r?void 0:n}return j.call(t,e)?t[e]:void 0},X.prototype.has=function(e){var t=this.__data__;return V?void 0!==t[e]:j.call(t,e)},X.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=V&&void 0===t?r:t,this},Y.prototype.clear=function(){this.__data__=[],this.size=0},Y.prototype.delete=function(e){var t=this.__data__,n=ee(t,e);return!(n<0||(n==t.length-1?t.pop():F.call(t,n,1),--this.size,0))},Y.prototype.get=function(e){var t=this.__data__,n=ee(t,e);return n<0?void 0:t[n][1]},Y.prototype.has=function(e){return ee(this.__data__,e)>-1},Y.prototype.set=function(e,t){var n=this.__data__,r=ee(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},G.prototype.clear=function(){this.size=0,this.__data__={hash:new X,map:new(K||Y),string:new X}},G.prototype.delete=function(e){var t=ue(this,e).delete(e);return this.size-=t?1:0,t},G.prototype.get=function(e){return ue(this,e).get(e)},G.prototype.has=function(e){return ue(this,e).has(e)},G.prototype.set=function(e,t){var n=ue(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Z.prototype.clear=function(){this.__data__=new Y,this.size=0},Z.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Z.prototype.get=function(e){return this.__data__.get(e)},Z.prototype.has=function(e){return this.__data__.has(e)},Z.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Y){var r=n.__data__;if(!K||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new G(r)}return n.set(e,t),this.size=n.size,this};function ne(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":W&&W in Object(e)?function(e){var t=j.call(e,W),n=e[W];try{e[W]=void 0;var r=!0}catch(e){}var o=k.call(e);return r&&(t?e[W]=n:delete e[W]),o}(e):function(e){return k.call(e)}(e)}function re(e){return xe(e)&&ne(e)==i}function oe(e,t,n,r,o){e!==t&&function(e,t,n){for(var r=-1,o=Object(e),i=n(e),u=i.length;u--;){var c=i[++r];if(!1===t(o[c],c,o))break}}(t,function(i,u){if(o||(o=new Z),be(i))!function(e,t,n,r,o,i,u){var l=ae(e,n),s=ae(t,n),a=u.get(s);if(a)Q(e,n,a);else{var f,d,p,v,m,h=i?i(l,s,n+"",e,t,u):void 0,g=void 0===h;if(g){var y=ve(s),b=!y&&he(s),x=!y&&!b&&we(s);h=s,y||b||x?ve(l)?h=l:xe(m=l)&&me(m)?h=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(l):b?(g=!1,h=function(e){return e.slice()}(s)):x?(g=!1,v=new(p=(f=s).buffer).constructor(p.byteLength),new D(v).set(new D(p)),d=v,h=new f.constructor(d,f.byteOffset,f.length)):h=[]:function(e){if(!xe(e)||ne(e)!=c)return!1;var t=$(e);if(null===t)return!0;var n=j.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&_.call(n)==L}(s)||pe(s)?(h=l,pe(l)?h=function(e){return function(e,t,n){var r=!n;n||(n={});for(var o=-1,i=t.length;++o<i;){var u=t[o],c=void 0;void 0===c&&(c=e[u]),r?te(n,u,c):J(n,u,c)}return n}(e,Ee(e))}(l):be(l)&&!ge(l)||(h=function(e){return"function"!=typeof e.constructor||se(e)?{}:q($(e))}(s))):g=!1}g&&(u.set(s,h),o(h,s,r,i,u),u.delete(s)),Q(e,n,h)}}(e,t,u,n,oe,r,o);else{var l=r?r(ae(e,u),i,u+"",e,t,o):void 0;void 0===l&&(l=i),Q(e,u,l)}},Ee)}var ie=H?function(e,t){return H(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:Ce;function ue(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function ce(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!be(e)||function(e){return!!A&&A in e}(e))&&(ge(e)?T:l).test(function(e){if(null!=e){try{return _.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}function le(e,t){var n=typeof e;return!!(t=null==t?o:t)&&("number"==n||"symbol"!=n&&s.test(e))&&e>-1&&e%1==0&&e<t}function se(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||C)}function ae(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var fe=function(e){var t=0,n=0;return function(){var r=U(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(ie);function de(e,t){return e===t||e!=e&&t!=t}var pe=re(function(){return arguments}())?re:function(e){return xe(e)&&j.call(e,"callee")&&!N.call(e,"callee")},ve=Array.isArray;function me(e){return null!=e&&ye(e.length)&&!ge(e)}var he=z||function(){return!1};function ge(e){if(!be(e))return!1;var t=ne(e);return t==u||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function ye(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}function be(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function xe(e){return null!=e&&"object"==typeof e}var we=E?function(e){return function(t){return e(t)}}(E):function(e){return xe(e)&&ye(e.length)&&!!a[ne(e)]};function Ee(e){return me(e)?function(e,t){var n=ve(e),r=!n&&pe(e),o=!n&&!r&&he(e),i=!n&&!r&&!o&&we(e),u=n||r||o||i,c=u?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],l=c.length;for(var s in e)!t&&!j.call(e,s)||u&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||le(s,l))||c.push(s);return c}(e,!0):function(e){if(!be(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=se(e),n=[];for(var r in e)("constructor"!=r||!t&&j.call(e,r))&&n.push(r);return n}(e)}var Re,Oe=(Re=function(e,t,n){oe(e,t,n)},function(e,t){return fe(function(e,t,n){return t=B(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=B(r.length-t,0),u=Array(i);++o<i;)u[o]=r[t+o];o=-1;for(var c=Array(t+1);++o<t;)c[o]=r[o];return c[t]=n(u),function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(e,this,c)}}(e,t,Ce),e+"")}(function(e,t){var n=-1,r=t.length,o=r>1?t[r-1]:void 0,i=r>2?t[2]:void 0;for(o=Re.length>3&&"function"==typeof o?(r--,o):void 0,i&&function(e,t,n){if(!be(n))return!1;var r=typeof t;return!!("number"==r?me(n)&&le(t,n.length):"string"==r&&t in n)&&de(n[t],e)}(t[0],t[1],i)&&(o=r<3?void 0:o,r=1),e=Object(e);++n<r;){var u=t[n];u&&Re(e,u,n)}return e}));function Ce(e){return e}e.exports=Oe},551(e,t,n){var r="Expected a function",o=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt,s="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,a="object"==typeof self&&self&&self.Object===Object&&self,f=s||a||Function("return this")(),d=Object.prototype.toString,p=Math.max,v=Math.min,m=function(){return f.Date.now()};function h(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==d.call(e)}(e))return NaN;if(h(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=h(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var n=u.test(e);return n||c.test(e)?l(e.slice(2),n?2:8):i.test(e)?NaN:+e}e.exports=function(e,t,n){var o=!0,i=!0;if("function"!=typeof e)throw new TypeError(r);return h(n)&&(o="leading"in n?!!n.leading:o,i="trailing"in n?!!n.trailing:i),function(e,t,n){var o,i,u,c,l,s,a=0,f=!1,d=!1,y=!0;if("function"!=typeof e)throw new TypeError(r);function b(t){var n=o,r=i;return o=i=void 0,a=t,c=e.apply(r,n)}function x(e){var n=e-s;return void 0===s||n>=t||n<0||d&&e-a>=u}function w(){var e=m();if(x(e))return E(e);l=setTimeout(w,function(e){var n=t-(e-s);return d?v(n,u-(e-a)):n}(e))}function E(e){return l=void 0,y&&o?b(e):(o=i=void 0,c)}function R(){var e=m(),n=x(e);if(o=arguments,i=this,s=e,n){if(void 0===l)return function(e){return a=e,l=setTimeout(w,t),f?b(e):c}(s);if(d)return l=setTimeout(w,t),b(s)}return void 0===l&&(l=setTimeout(w,t)),c}return t=g(t)||0,h(n)&&(f=!!n.leading,u=(d="maxWait"in n)?p(g(n.maxWait)||0,t):u,y="trailing"in n?!!n.trailing:y),R.cancel=function(){void 0!==l&&clearTimeout(l),a=0,o=s=i=l=void 0},R.flush=function(){return void 0===l?c:E(m())},R}(e,t,{leading:o,maxWait:t,trailing:i})}},685(e,t,n){var r=n(649);function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var u={d:{f:i,r:function(){throw Error(o(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},c=Symbol.for("react.portal"),l=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType)throw Error(o(299));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:c,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.flushSync=function(e){var t=l.T,n=u.p;try{if(l.T=null,u.p=2,e)return e()}finally{l.T=t,u.p=n,u.d.f()}}},289(e,t,n){!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(685)},131(e,t){var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function o(e,t,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==t.key&&(o=""+t.key),"key"in t)for(var i in r={},t)"key"!==i&&(r[i]=t[i]);else r=t;return t=r.ref,{$$typeof:n,type:e,key:o,ref:void 0!==t?t:null,props:r}}t.Fragment=r,t.jsx=o,t.jsxs=o},615(e,t,n){e.exports=n(131)},649(t){t.exports=e}},f={};function d(e){var t=f[e];if(void 0!==t)return t.exports;var n=f[e]={id:e,loaded:!1,exports:{}};return a[e](n,n.exports,d),n.loaded=!0,n.exports}d.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return d.d(t,{a:t}),t},d.d=(e,t)=>{for(var n in t)d.o(t,n)&&!d.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},d.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),d.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),d.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);const p=!1;function v(e,t){if(!e)throw new Error(t)}const m=e=>"function"==typeof e,h=(e,...t)=>"function"==typeof e?e(...t):e,g=(...e)=>t=>{e.forEach(e=>{m(e)?e(t):"object"==typeof e&&(e.current=t)})},y=()=>`${Date.now().toString()}${Math.floor(1e4*Math.random()).toString().padStart(4,"0")}`,b=e=>"$"===e[0],x=e=>({theme:r,...o})=>i`
|
|
3
|
+
${((e,t)=>Object.entries(e).filter(([e,n])=>"xs"===t&&b(e)||n&&"object"==typeof n&&t in n))(o,e).map(([r,o])=>{const s=r.slice(1);return i`
|
|
4
|
+
${(e=>{const t=e.charAt(0),n=e.slice(1);return t.toLowerCase()+n.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)})(s)}: ${((e,r,o)=>{const i="object"!=typeof r||Array.isArray(r)?r:r[o];if(void 0!==i){if((e=>n.includes(e))(e)){if("number"==typeof i||Array.isArray(i))return l(i,"px")}else if((e=>t.includes(e))(e)&&"string"==typeof i&&u(i))return c(i);return i}})(s,o,e)};
|
|
5
5
|
`})}
|
|
6
|
-
`,w=e=>({theme:t,...n})=>t.breakpoints[e]&&((e,t)=>Object.entries(t).some(([t,n])=>b(t)&&"object"==typeof n&&e in n))(e,n)?
|
|
6
|
+
`,w=e=>({theme:t,...n})=>t.breakpoints[e]&&((e,t)=>Object.entries(t).some(([t,n])=>b(t)&&"object"==typeof n&&e in n))(e,n)?i`
|
|
7
7
|
@honey-media (${e}:up) {
|
|
8
8
|
${x(e)};
|
|
9
9
|
}
|
|
10
10
|
`:null,E=e=>{const t=window.screen.orientation.type,n="portrait-primary"===t||"portrait-secondary"===t,r=!n;if(!e)return{isPortrait:n,isLandscape:r,isXs:!1,isSm:!1,isMd:!1,isLg:!1,isXl:!1};const o=Object.entries(e).sort(([,e],[,t])=>e-t).map(([e])=>e),i=o.find(t=>{const n=e[t];return!!n&&window.innerWidth<n})??o.pop();return{isPortrait:n,isLandscape:r,isXs:"xs"===i,isSm:"sm"===i,isMd:"md"===i,isLg:"lg"===i,isXl:"xl"===i}},R=e=>"xs"===e?x(e):w(e),O=s("div",e=>({"data-testid":e["data-testid"]??"honey-box"}))`
|
|
11
|
-
${({effects:e})=>
|
|
11
|
+
${({effects:e})=>i`
|
|
12
12
|
${e};
|
|
13
13
|
|
|
14
14
|
${r.map(R)};
|
|
15
15
|
`}
|
|
16
16
|
`,C=new Set,S=(e,t)=>{C.has(e)||(C.add(e),console.warn(t))},_=s(O,({inline:e=!1,row:t=!1,center:n=!1,centerX:r=!1,centerY:o=!1,$display:i,$flexDirection:u,$alignItems:c,$justifyContent:l,...s})=>{const a=u??(t?"row":"column"),f="row"===a;return{$display:e?"inline-flex":i??"flex",$flexDirection:a,$alignItems:c??(n||(f?o:r)?"center":void 0),$justifyContent:l??(n||(f?r:o)?"center":void 0),"data-testid":s["data-testid"]??"honey-flex"}})``;var j=d(615),A=d(649);const k=(0,A.createContext)(void 0),L=s(_)`
|
|
17
|
-
${({columns:e,takeColumns:t=1,spacing:n=0,applyMaxWidth:r,applyBasis:o=!0,theme:
|
|
17
|
+
${({columns:e,takeColumns:t=1,spacing:n=0,applyMaxWidth:r,applyBasis:o=!0,theme:u})=>{let c=null;return o&&(c=`calc(${t*(100/e)}% - ${l(n,null)({theme:u})/e*(e-t)}px)`),i`
|
|
18
18
|
flex-basis: ${c};
|
|
19
19
|
|
|
20
|
-
${r&&
|
|
20
|
+
${r&&i`
|
|
21
21
|
@honey-media (${r}:up) {
|
|
22
22
|
max-width: ${c};
|
|
23
23
|
}
|
|
24
24
|
`}
|
|
25
25
|
`}}
|
|
26
26
|
`,T=s(O,({$flexWrap:e="wrap"})=>({$flexWrap:e}))`
|
|
27
|
-
${({columnHeight:e,minColumnHeight:t,spacing:n=0})=>
|
|
27
|
+
${({columnHeight:e,minColumnHeight:t,spacing:n=0})=>i`
|
|
28
28
|
display: flex;
|
|
29
29
|
gap: ${l(n)};
|
|
30
30
|
|
|
@@ -33,7 +33,7 @@ import*as e from"react";import{CSS_COLOR_PROPERTIES as t,CSS_SPACING_PROPERTIES
|
|
|
33
33
|
min-height: ${t};
|
|
34
34
|
}
|
|
35
35
|
`}
|
|
36
|
-
`,P=({ref:e,children:t,columns:n,spacing:r,columnsGrowing:o=!0,applyColumnMaxWidth:i=!1,...u})=>{const c=(0,A.useMemo)(()=>({columns:n,spacing:r,isColumnsGrowing:o,applyColumnMaxWidth:i}),[n,r,o,i]);return(0,j.jsx)(k,{value:c,children:(0,j.jsx)(T,{ref:e,spacing:r,"data-testid":"honey-grid",...u,children:t})})},M=()=>{const e=(0,A.useContext)(k);if(!e)throw new Error("The `useHoneyGridContext()` hook can only be used inside <HoneyGrid/> component!");return e},D=({children:e,...t})=>{const{columns:n,spacing:r,isColumnsGrowing:o,applyColumnMaxWidth:i}=M();return(0,j.jsx)(L,{columns:n,spacing:r,applyMaxWidth:i,$flexGrow:o?1:0,"data-testid":"honey-grid-column",...t,children:e})},$=(e,t,n)=>"function"==typeof t?t(e):"string"==typeof e||"number"==typeof e?e:t?e[t]:n,I=({children:e,loading:t=!1,loadingOverContent:n=!1,error:r=!1,empty:o=!1,loadingContent:i=null,errorContent:u=null,emptyContent:c=null})=>r?u:!n&&t?i:(0,j.jsxs)(j.Fragment,{children:[n&&t&&i,o?c:e]}),N=s(_,({$overflow:e="hidden auto"})=>({$overflow:e}))``,F=({children:e,items:t,itemKey:n,loading:r,loadingOverContent:o,loadingContent:i,error:u,errorContent:c,empty:l=!1,emptyContent:s,...a})=>(0,j.jsx)(N,{role:"list","aria-busy":r,"data-testid":"honey-list",...a,children:(0,j.jsx)(I,{loading:r,loadingOverContent:o,loadingContent:i,error:u,errorContent:c,empty:l||0===t?.length,emptyContent:s,children:t?.map((t,r,o)=>(0,j.jsx)(A.Fragment,{children:e(t,r,o)},String($(t,n,r))))})}),W=({children:e,mount:t,unmountDelay:n,alwaysMounted:r=!1,keepAfterMount:o=!1})=>{const[i,u]=(0,A.useState)(r||t),c=(0,A.useRef)(void 0);return(0,A.useLayoutEffect)(()=>{if(t&&!r)return clearTimeout(c.current),u(!0),()=>{o||(c.current=setTimeout(()=>u(!1),n))}},[t,r,n]),i?e:null};var H=d(551),z=d.n(H);const B=(e,{resizeThrottle:t=0,overrideScreenState:n}={})=>{const[r,o]=(0,A.useState)(()=>({...E(e.breakpoints),...n}));return(0,A.useEffect)(()=>{const r=z()(()=>{o({...E(e.breakpoints),...n})},t);return r(),window.addEventListener("resize",r),window.screen.orientation.addEventListener("change",r),()=>{r.cancel(),window.removeEventListener("resize",r),window.screen.orientation.removeEventListener("change",r)}},[]),r},U=(0,A.createContext)(void 0),K=()=>{const e=(0,A.useContext)(U);return v(e,"The `useHoneyLayout()` hook must be used inside <HoneyLayoutProvider/> component!"),e},V=(e,t)=>{const{registerOverlay:n,unregisterOverlay:r}=K(),o=(0,A.useRef)(null);return(0,A.useEffect)(()=>{if(!e)return;const i=n(t);return o.current=i,()=>{o.current=null,r(i.id)}},[e,t.onKeyUp]),o.current},q=(e,{onKeyUp:t}={})=>{const{overlays:n}=K(),r=n.find(t=>t.id===e);return(0,A.useEffect)(()=>{if(r&&t)return r.addListener("keyup",t),()=>{r.removeListener("keyup",t)}},[r,t]),r},X=({ref:e,children:t,active:n,overlayId:r,onDeactivate:o,...i})=>{const u=V(n,{id:r,onKeyUp:(0,A.useCallback)(e=>{"Escape"===e&&o()},[o])}),c=g(u?.setContainerRef,e);return(0,j.jsx)(_,{ref:c,inert:!n,...i,children:h(t,{overlay:u,deactivateOverlay:o})})},Y=(0,A.createContext)(void 0);function G(){return"undefined"!=typeof window}function Z(e){return ee(e)?(e.nodeName||"").toLowerCase():"#document"}function Q(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function J(e){var t;return null==(t=(ee(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function ee(e){return!!G()&&(e instanceof Node||e instanceof Q(e).Node)}function te(e){return!!G()&&(e instanceof Element||e instanceof Q(e).Element)}function ne(e){return!!G()&&(e instanceof HTMLElement||e instanceof Q(e).HTMLElement)}function re(e){return!(!G()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Q(e).ShadowRoot)}function oe(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ve(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==o&&"contents"!==o}function ie(e){return/^(table|td|th)$/.test(Z(e))}function ue(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}const ce=/transform|translate|scale|rotate|perspective|filter/,le=/paint|layout|strict|content/,se=e=>!!e&&"none"!==e;let ae;function fe(e){const t=te(e)?ve(e):e;return se(t.transform)||se(t.translate)||se(t.scale)||se(t.rotate)||se(t.perspective)||!de()&&(se(t.backdropFilter)||se(t.filter))||ce.test(t.willChange||"")||le.test(t.contain||"")}function de(){return null==ae&&(ae="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ae}function pe(e){return/^(html|body|#document)$/.test(Z(e))}function ve(e){return Q(e).getComputedStyle(e)}function me(e){return te(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function he(e){if("html"===Z(e))return e;const t=e.assignedSlot||e.parentNode||re(e)&&e.host||J(e);return re(t)?t.host:t}function ge(e){const t=he(e);return pe(t)?e.ownerDocument?e.ownerDocument.body:e.body:ne(t)&&oe(t)?t:ge(t)}function ye(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=ge(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),u=Q(o);if(i){const e=be(u);return t.concat(u,u.visualViewport||[],oe(o)?o:[],e&&n?ye(e):[])}return t.concat(o,ye(o,[],n))}function be(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var xe=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"].join(","),we="undefined"==typeof Element,Ee=we?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Re=!we&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},Oe=function(e,t){var n;void 0===t&&(t=!0);var r=null==e||null===(n=e.getAttribute)||void 0===n?void 0:n.call(e,"inert");return""===r||"true"===r||t&&e&&("function"==typeof e.closest?e.closest("[inert]"):Oe(e.parentNode))},Ce=function(e,t,n){if(Oe(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(xe));return t&&Ee.call(e,xe)&&r.unshift(e),r.filter(n)},Se=function(e,t,n){for(var r=[],o=Array.from(e);o.length;){var i=o.shift();if(!Oe(i,!1))if("SLOT"===i.tagName){var u=i.assignedElements(),c=u.length?u:i.children,l=Se(c,!0,n);n.flatten?r.push.apply(r,l):r.push({scopeParent:i,candidates:l})}else{Ee.call(i,xe)&&n.filter(i)&&(t||!e.includes(i))&&r.push(i);var s=i.shadowRoot||"function"==typeof n.getShadowRoot&&n.getShadowRoot(i),a=!Oe(s,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(i));if(s&&a){var f=Se(!0===s?i.children:s.children,!0,n);n.flatten?r.push.apply(r,f):r.push({scopeParent:i,candidates:f})}else o.unshift.apply(o,i.children)}}return r},_e=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},je=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n}(e))&&!_e(e)?0:e.tabIndex},Ae=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},ke=function(e){return"INPUT"===e.tagName},Le=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},Te=function(e,t){return!(t.disabled||function(e){return ke(e)&&"hidden"===e.type}(t)||function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("full-native"===n&&"checkVisibility"in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if("hidden"===getComputedStyle(e).visibility)return!0;var o=Ee.call(e,"details>summary:first-of-type")?e.parentElement:e;if(Ee.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"full-native"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return Le(e)}else{if("function"==typeof r){for(var i=e;e;){var u=e.parentElement,c=Re(e);if(u&&!u.shadowRoot&&!0===r(u))return Le(e);e=e.assignedSlot?e.assignedSlot:u||c===e.ownerDocument?u:c.host}e=i}if(function(e){var t,n,r,o,i=e&&Re(e),u=null===(t=i)||void 0===t?void 0:t.host,c=!1;if(i&&i!==e)for(c=!!(null!==(n=u)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(u)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!c&&u;){var l,s,a;c=!(null===(s=u=null===(l=i=Re(u))||void 0===l?void 0:l.host)||void 0===s||null===(a=s.ownerDocument)||void 0===a||!a.contains(u))}return c}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some(function(e){return"SUMMARY"===e.tagName})}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!Ee.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},Pe=function(e,t){return!(function(e){return function(e){return ke(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||Re(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!o||o===e}(e)}(t)||je(t)<0||!Te(e,t))},Me=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},De=function(e){var t=[],n=[];return e.forEach(function(e,r){var o=!!e.scopeParent,i=o?e.scopeParent:e,u=function(e,t){var n=je(e);return n<0&&t&&!_e(e)?0:n}(i,o),c=o?De(e.candidates):i;0===u?o?t.push.apply(t,c):t.push(i):n.push({documentOrder:r,tabIndex:u,item:e,isScope:o,content:c})}),n.sort(Ae).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},$e=function(e,t){var n;return n=(t=t||{}).getShadowRoot?Se([e],t.includeContainer,{filter:Pe.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Me}):Ce(e,t.includeContainer,Pe.bind(null,t)),De(n)},Ie=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==Ee.call(e,xe)&&Pe(t,e)};function Ne(){const e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}function Fe(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+"/"+n}).join(" "):navigator.userAgent}function We(){return/apple/i.test(navigator.vendor)}function He(){const e=/android/i;return e.test(Ne())||e.test(Fe())}function ze(){return Fe().includes("jsdom/")}const Be="data-floating-ui-focusable";function Ue(e){let t=e.activeElement;for(;null!=(null==(n=t)||null==(n=n.shadowRoot)?void 0:n.activeElement);){var n;t=t.shadowRoot.activeElement}return t}function Ke(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&re(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Ve(e){return"composedPath"in e?e.composedPath()[0]:e.target}function qe(e,t){if(null==t)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return null!=n.target&&t.contains(n.target)}function Xe(e){return(null==e?void 0:e.ownerDocument)||document}function Ye(e){return ne(e)&&e.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])")}function Ge(e){return!!e&&"combobox"===e.getAttribute("role")&&Ye(e)}function Ze(e){return e?e.hasAttribute(Be)?e:e.querySelector("["+Be+"]")||e:null}function Qe(e,t,n){return void 0===n&&(n=!0),e.filter(e=>{var r;return e.parentId===t&&(!n||(null==(r=e.context)?void 0:r.open))}).flatMap(t=>[t,...Qe(e,t.id,n)])}function Je(e,t){var n;let r=[],o=null==(n=e.find(e=>e.id===t))?void 0:n.parentId;for(;o;){const t=e.find(e=>e.id===o);o=null==t?void 0:t.parentId,t&&(r=r.concat(t))}return r}function et(e){e.preventDefault(),e.stopPropagation()}function tt(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var nt="undefined"!=typeof document?A.useLayoutEffect:function(){};function rt(e){const t=A.useRef(e);return nt(()=>{t.current=e}),t}const ot={...A}.useInsertionEffect||(e=>e());function it(e){const t=A.useRef(()=>{});return ot(()=>{t.current=e}),A.useCallback(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)},[])}const ut=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function ct(e,t){const n=$e(e,ut()),r=n.length;if(0===r)return;const o=Ue(Xe(e)),i=n.indexOf(o);return n[-1===i?1===t?0:r-1:i+t]}function lt(e){return ct(Xe(e).body,1)||e}function st(e){return ct(Xe(e).body,-1)||e}function at(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Ke(n,r)}function ft(e){$e(e,ut()).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})}function dt(e){e.querySelectorAll("[data-tabindex]").forEach(e=>{const t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")})}var pt=d(289);const vt=["start","end"],mt=["top","right","bottom","left"].reduce((e,t)=>e.concat(t,t+"-"+vt[0],t+"-"+vt[1]),[]),ht=Math.min,gt=Math.max,yt=Math.round,bt=Math.floor,xt=e=>({x:e,y:e}),wt={left:"right",right:"left",bottom:"top",top:"bottom"};function Et(e,t,n){return gt(e,ht(t,n))}function Rt(e,t){return"function"==typeof e?e(t):e}function Ot(e){return e.split("-")[0]}function Ct(e){return e.split("-")[1]}function St(e){return"x"===e?"y":"x"}function _t(e){return"y"===e?"height":"width"}function jt(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function At(e){return St(jt(e))}function kt(e,t,n){void 0===n&&(n=!1);const r=Ct(e),o=At(e),i=_t(o);let u="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(u=$t(u)),[u,$t(u)]}function Lt(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Tt=["left","right"],Pt=["right","left"],Mt=["top","bottom"],Dt=["bottom","top"];function $t(e){const t=Ot(e);return wt[t]+e.slice(t.length)}function It(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Nt(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Ft(e,t,n){let{reference:r,floating:o}=e;const i=jt(t),u=At(t),c=_t(u),l=Ot(t),s="y"===i,a=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,d=r[c]/2-o[c]/2;let p;switch(l){case"top":p={x:a,y:r.y-o.height};break;case"bottom":p={x:a,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-o.width,y:f};break;default:p={x:r.x,y:r.y}}switch(Ct(t)){case"start":p[u]-=d*(n&&s?-1:1);break;case"end":p[u]+=d*(n&&s?-1:1)}return p}async function Wt(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:u,elements:c,strategy:l}=e,{boundary:s="clippingAncestors",rootBoundary:a="viewport",elementContext:f="floating",altBoundary:d=!1,padding:p=0}=Rt(t,e),v=It(p),m=c[d?"floating"===f?"reference":"floating":f],h=Nt(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(c.floating)),boundary:s,rootBoundary:a,strategy:l})),g="floating"===f?{x:r,y:o,width:u.floating.width,height:u.floating.height}:u.reference,y=await(null==i.getOffsetParent?void 0:i.getOffsetParent(c.floating)),b=await(null==i.isElement?void 0:i.isElement(y))&&await(null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},x=Nt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:g,offsetParent:y,strategy:l}):g);return{top:(h.top-x.top+v.top)/b.y,bottom:(x.bottom-h.bottom+v.bottom)/b.y,left:(h.left-x.left+v.left)/b.x,right:(x.right-h.right+v.right)/b.x}}const Ht=new Set(["left","top"]);function zt(e){const t=ve(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ne(e),i=o?e.offsetWidth:n,u=o?e.offsetHeight:r,c=yt(n)!==i||yt(r)!==u;return c&&(n=i,r=u),{width:n,height:r,$:c}}function Bt(e){return te(e)?e:e.contextElement}function Ut(e){const t=Bt(e);if(!ne(t))return xt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=zt(t);let u=(i?yt(n.width):n.width)/r,c=(i?yt(n.height):n.height)/o;return u&&Number.isFinite(u)||(u=1),c&&Number.isFinite(c)||(c=1),{x:u,y:c}}const Kt=xt(0);function Vt(e){const t=Q(e);return de()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Kt}function qt(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=Bt(e);let u=xt(1);t&&(r?te(r)&&(u=Ut(r)):u=Ut(e));const c=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Q(e))&&t}(i,n,r)?Vt(i):xt(0);let l=(o.left+c.x)/u.x,s=(o.top+c.y)/u.y,a=o.width/u.x,f=o.height/u.y;if(i){const e=Q(i),t=r&&te(r)?Q(r):r;let n=e,o=be(n);for(;o&&r&&t!==n;){const e=Ut(o),t=o.getBoundingClientRect(),r=ve(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,u=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,s*=e.y,a*=e.x,f*=e.y,l+=i,s+=u,n=Q(o),o=be(n)}}return Nt({width:a,height:f,x:l,y:s})}function Xt(e,t){const n=me(e).scrollLeft;return t?t.left+n:qt(J(e)).left+n}function Yt(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Xt(e,n),y:n.top+t.scrollTop}}function Gt(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=Q(e),r=J(e),o=n.visualViewport;let i=r.clientWidth,u=r.clientHeight,c=0,l=0;if(o){i=o.width,u=o.height;const e=de();(!e||e&&"fixed"===t)&&(c=o.offsetLeft,l=o.offsetTop)}const s=Xt(r);if(s<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,u=Math.abs(r.clientWidth-t.clientWidth-o);u<=25&&(i-=u)}else s<=25&&(i+=s);return{width:i,height:u,x:c,y:l}}(e,n);else if("document"===t)r=function(e){const t=J(e),n=me(e),r=e.ownerDocument.body,o=gt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=gt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+Xt(e);const c=-n.scrollTop;return"rtl"===ve(r).direction&&(u+=gt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:u,y:c}}(J(e));else if(te(t))r=function(e,t){const n=qt(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=ne(e)?Ut(e):xt(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=Vt(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Nt(r)}function Zt(e,t){const n=he(e);return!(n===t||!te(n)||pe(n))&&("fixed"===ve(n).position||Zt(n,t))}function Qt(e,t,n){const r=ne(t),o=J(t),i="fixed"===n,u=qt(e,!0,i,t);let c={scrollLeft:0,scrollTop:0};const l=xt(0);function s(){l.x=Xt(o)}if(r||!r&&!i)if(("body"!==Z(t)||oe(o))&&(c=me(t)),r){const e=qt(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&s();i&&!r&&o&&s();const a=!o||r||i?xt(0):Yt(o,c);return{x:u.left+c.scrollLeft-l.x-a.x,y:u.top+c.scrollTop-l.y-a.y,width:u.width,height:u.height}}function Jt(e){return"static"===ve(e).position}function en(e,t){if(!ne(e)||"fixed"===ve(e).position)return null;if(t)return t(e);let n=e.offsetParent;return J(e)===n&&(n=n.ownerDocument.body),n}function tn(e,t){const n=Q(e);if(ue(e))return n;if(!ne(e)){let t=he(e);for(;t&&!pe(t);){if(te(t)&&!Jt(t))return t;t=he(t)}return n}let r=en(e,t);for(;r&&ie(r)&&Jt(r);)r=en(r,t);return r&&pe(r)&&Jt(r)&&!fe(r)?n:r||function(e){let t=he(e);for(;ne(t)&&!pe(t);){if(fe(t))return t;if(ue(t))return null;t=he(t)}return null}(e)||n}const nn={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,u=J(r),c=!!t&&ue(t.floating);if(r===u||c&&i)return n;let l={scrollLeft:0,scrollTop:0},s=xt(1);const a=xt(0),f=ne(r);if((f||!f&&!i)&&(("body"!==Z(r)||oe(u))&&(l=me(r)),f)){const e=qt(r);s=Ut(r),a.x=e.x+r.clientLeft,a.y=e.y+r.clientTop}const d=!u||f||i?xt(0):Yt(u,l);return{width:n.width*s.x,height:n.height*s.y,x:n.x*s.x-l.scrollLeft*s.x+a.x+d.x,y:n.y*s.y-l.scrollTop*s.y+a.y+d.y}},getDocumentElement:J,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?ue(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=ye(e,[],!1).filter(e=>te(e)&&"body"!==Z(e)),o=null;const i="fixed"===ve(e).position;let u=i?he(e):e;for(;te(u)&&!pe(u);){const t=ve(u),n=fe(u);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&("absolute"===o.position||"fixed"===o.position)||oe(u)&&!n&&Zt(e,u))?r=r.filter(e=>e!==u):o=t,u=he(u)}return t.set(e,r),r}(t,this._c):[].concat(n),r],u=Gt(t,i[0],o);let c=u.top,l=u.right,s=u.bottom,a=u.left;for(let e=1;e<i.length;e++){const n=Gt(t,i[e],o);c=gt(n.top,c),l=ht(n.right,l),s=ht(n.bottom,s),a=gt(n.left,a)}return{width:l-a,height:s-c,x:a,y:c}},getOffsetParent:tn,getElementRects:async function(e){const t=this.getOffsetParent||tn,n=this.getDimensions,r=await n(e.floating);return{reference:Qt(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=zt(e);return{width:t,height:n}},getScale:Ut,isElement:te,isRTL:function(e){return"rtl"===ve(e).direction}};function rn(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}const on=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:u,initialPlacement:c,platform:l,elements:s}=t,{mainAxis:a=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:m=!0,...h}=Rt(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const g=Ot(o),y=jt(c),b=Ot(c)===c,x=await(null==l.isRTL?void 0:l.isRTL(s.floating)),w=d||(b||!m?[$t(c)]:function(e){const t=$t(e);return[Lt(e),t,Lt(t)]}(c)),E="none"!==v;!d&&E&&w.push(...function(e,t,n,r){const o=Ct(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?Pt:Tt:t?Tt:Pt;case"left":case"right":return t?Mt:Dt;default:return[]}}(Ot(e),"start"===n,r);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(Lt)))),i}(c,m,v,x));const R=[c,...w],O=await l.detectOverflow(t,h),C=[];let S=(null==(r=i.flip)?void 0:r.overflows)||[];if(a&&C.push(O[g]),f){const e=kt(o,u,x);C.push(O[e[0]],O[e[1]])}if(S=[...S,{placement:o,overflows:C}],!C.every(e=>e<=0)){var _,j;const e=((null==(_=i.flip)?void 0:_.index)||0)+1,t=R[e];if(t&&("alignment"!==f||y===jt(t)||S.every(e=>jt(e.placement)!==y||e.overflows[0]>0)))return{data:{index:e,overflows:S},reset:{placement:t}};let n=null==(j=S.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:j.placement;if(!n)switch(p){case"bestFit":{var A;const e=null==(A=S.filter(e=>{if(E){const t=jt(e.placement);return t===y||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:A[0];e&&(n=e);break}case"initialPlacement":n=c}if(o!==n)return{reset:{placement:n}}}return{}}}},un=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:u,elements:c,middlewareData:l}=t,{element:s,padding:a=0}=Rt(e,t)||{};if(null==s)return{};const f=It(a),d={x:n,y:r},p=At(o),v=_t(p),m=await u.getDimensions(s),h="y"===p,g=h?"top":"left",y=h?"bottom":"right",b=h?"clientHeight":"clientWidth",x=i.reference[v]+i.reference[p]-d[p]-i.floating[v],w=d[p]-i.reference[p],E=await(null==u.getOffsetParent?void 0:u.getOffsetParent(s));let R=E?E[b]:0;R&&await(null==u.isElement?void 0:u.isElement(E))||(R=c.floating[b]||i.floating[v]);const O=x/2-w/2,C=R/2-m[v]/2-1,S=ht(f[g],C),_=ht(f[y],C),j=S,A=R-m[v]-_,k=R/2-m[v]/2+O,L=Et(j,k,A),T=!l.arrow&&null!=Ct(o)&&k!==L&&i.reference[v]/2-(k<j?S:_)-m[v]/2<0,P=T?k<j?k-j:k-A:0;return{[p]:d[p]+P,data:{[p]:L,centerOffset:k-L-P,...T&&{alignmentOffset:P}},reset:T}}}),cn=(e,t,n)=>{const r=new Map,o={platform:nn,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:u}=n,c=u.detectOverflow?u:{...u,detectOverflow:Wt},l=await(null==u.isRTL?void 0:u.isRTL(t));let s=await u.getElementRects({reference:e,floating:t,strategy:o}),{x:a,y:f}=Ft(s,r,l),d=r,p=0;const v={};for(let n=0;n<i.length;n++){const m=i[n];if(!m)continue;const{name:h,fn:g}=m,{x:y,y:b,data:x,reset:w}=await g({x:a,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:v,rects:s,platform:c,elements:{reference:e,floating:t}});a=null!=y?y:a,f=null!=b?b:f,v[h]={...v[h],...x},w&&p<50&&(p++,"object"==typeof w&&(w.placement&&(d=w.placement),w.rects&&(s=!0===w.rects?await u.getElementRects({reference:e,floating:t,strategy:o}):w.rects),({x:a,y:f}=Ft(s,d,l))),n=-1)}return{x:a,y:f,placement:d,strategy:o,middlewareData:v}})(e,t,{...o,platform:i})};var ln="undefined"!=typeof document?A.useLayoutEffect:function(){};function sn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!==r--;)if(!sn(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!==r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||sn(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function an(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function fn(e,t){const n=an(e);return Math.round(t*n)/n}function dn(e){const t=A.useRef(e);return ln(()=>{t.current=e}),t}const pn="data-floating-ui-focusable",vn="active",mn="selected",hn={...A};let gn=!1,yn=0;const bn=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+yn++,xn=hn.useId||function(){const[e,t]=A.useState(()=>gn?bn():void 0);return nt(()=>{null==e&&t(bn())},[]),A.useEffect(()=>{gn=!0},[]),e},wn=A.forwardRef(function(e,t){const{context:{placement:n,elements:{floating:r},middlewareData:{arrow:o,shift:i}},width:u=14,height:c=7,tipRadius:l=0,strokeWidth:s=0,staticOffset:a,stroke:f,d,style:{transform:p,...v}={},...m}=e,h=xn(),[g,y]=A.useState(!1);if(nt(()=>{r&&"rtl"===ve(r).direction&&y(!0)},[r]),!r)return null;const[b,x]=n.split("-"),w="top"===b||"bottom"===b;let E=a;(w&&null!=i&&i.x||!w&&null!=i&&i.y)&&(E=null);const R=2*s,O=R/2,C=u/2*(l/-8+1),S=c/2*l/4,_=!!d,k=E&&"end"===x?"bottom":"top";let L=E&&"end"===x?"right":"left";E&&g&&(L="end"===x?"left":"right");const T=null!=(null==o?void 0:o.x)?E||o.x:"",P=null!=(null==o?void 0:o.y)?E||o.y:"",M=d||"M0,0 H"+u+" L"+(u-C)+","+(c-S)+" Q"+u/2+","+c+" "+C+","+(c-S)+" Z",D={top:_?"rotate(180deg)":"",left:_?"rotate(90deg)":"rotate(-90deg)",bottom:_?"":"rotate(180deg)",right:_?"rotate(-90deg)":"rotate(90deg)"}[b];return(0,j.jsxs)("svg",{...m,"aria-hidden":!0,ref:t,width:_?u:u+R,height:u,viewBox:"0 0 "+u+" "+(c>u?c:u),style:{position:"absolute",pointerEvents:"none",[L]:T,[k]:P,[b]:w||_?"100%":"calc(100% - "+R/2+"px)",transform:[D,p].filter(e=>!!e).join(" "),...v},children:[R>0&&(0,j.jsx)("path",{clipPath:"url(#"+h+")",fill:"none",stroke:f,strokeWidth:R+(d?0:1),d:M}),(0,j.jsx)("path",{stroke:R&&!d?m.fill:"none",d:M}),(0,j.jsx)("clipPath",{id:h,children:(0,j.jsx)("rect",{x:-O,y:O*(_?-1:1),width:u+R,height:u})})]})});function En(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;null==(r=e.get(t))||r.delete(n)}}}const Rn=A.createContext(null),On=A.createContext(null),Cn=()=>{var e;return(null==(e=A.useContext(Rn))?void 0:e.id)||null},Sn=()=>A.useContext(On);function _n(e){const{children:t,id:n}=e,r=Cn();return(0,j.jsx)(Rn.Provider,{value:A.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function jn(e){const{children:t}=e,n=A.useRef([]),r=A.useCallback(e=>{n.current=[...n.current,e]},[]),o=A.useCallback(e=>{n.current=n.current.filter(t=>t!==e)},[]),[i]=A.useState(()=>En());return(0,j.jsx)(On.Provider,{value:A.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i]),children:t})}function An(e){return"data-floating-ui-"+e}function kn(e){-1!==e.current&&(clearTimeout(e.current),e.current=-1)}const Ln=An("safe-polygon");function Tn(e,t,n){if(n&&!tt(n))return 0;if("number"==typeof e)return e;if("function"==typeof e){const n=e();return"number"==typeof n?n:null==n?void 0:n[t]}return null==e?void 0:e[t]}function Pn(e){return"function"==typeof e?e():e}let Mn=0;function Dn(e,t){void 0===t&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Mn);const i=()=>null==e?void 0:e.focus({preventScroll:n});o?i():Mn=requestAnimationFrame(i)}function $n(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&re(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}const In={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function Nn(e){return"inert"===e?In.inert:"aria-hidden"===e?In["aria-hidden"]:In.none}let Fn=new WeakSet,Wn={},Hn=0;function zn(e){return e?re(e)?e.host:zn(e.parentNode):null}const Bn=(e,t)=>t.map(t=>{if(e.contains(t))return t;const n=zn(t);return e.contains(n)?n:null}).filter(e=>null!=e);function Un(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=(o=e[0],(null==o?void 0:o.ownerDocument)||document).body;var o;return function(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,u=Bn(t,e),c=new Set,l=new Set(u),s=[];Wn[o]||(Wn[o]=new WeakMap);const a=Wn[o];return u.forEach(function e(t){t&&!c.has(t)&&(c.add(t),t.parentNode&&e(t.parentNode))}),function e(t){t&&!l.has(t)&&[].forEach.call(t.children,t=>{if("script"!==Z(t))if(c.has(t))e(t);else{const e=i?t.getAttribute(i):null,n=null!==e&&"false"!==e,r=Nn(i),u=(r.get(t)||0)+1,c=(a.get(t)||0)+1;r.set(t,u),a.set(t,c),s.push(t),1===u&&n&&Fn.add(t),1===c&&t.setAttribute(o,""),!n&&i&&t.setAttribute(i,"inert"===i?"":"true")}})}(t),c.clear(),Hn++,()=>{s.forEach(e=>{const t=Nn(i),n=(t.get(e)||0)-1,r=(a.get(e)||0)-1;t.set(e,n),a.set(e,r),n||(!Fn.has(e)&&i&&e.removeAttribute(i),Fn.delete(e)),r||e.removeAttribute(o)}),Hn--,Hn||(In.inert=new WeakMap,In["aria-hidden"]=new WeakMap,In.none=new WeakMap,Fn=new WeakSet,Wn={})}}(e.concat(Array.from(r.querySelectorAll('[aria-live],[role="status"],output'))),r,t,n)}const Kn={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},Vn=A.forwardRef(function(e,t){const[n,r]=A.useState();nt(()=>{We()&&r("button")},[]);const o={ref:t,tabIndex:0,role:n,"aria-hidden":!n||void 0,[An("focus-guard")]:"",style:Kn};return(0,j.jsx)("span",{...e,...o})}),qn={clipPath:"inset(50%)",position:"fixed",top:0,left:0},Xn=A.createContext(null),Yn=An("portal");function Gn(e){const{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,i=function(e){void 0===e&&(e={});const{id:t,root:n}=e,r=xn(),o=Zn(),[i,u]=A.useState(null),c=A.useRef(null);return nt(()=>()=>{null==i||i.remove(),queueMicrotask(()=>{c.current=null})},[i]),nt(()=>{if(!r)return;if(c.current)return;const e=t?document.getElementById(t):null;if(!e)return;const n=document.createElement("div");n.id=r,n.setAttribute(Yn,""),e.appendChild(n),c.current=n,u(n)},[t,r]),nt(()=>{if(null===n)return;if(!r)return;if(c.current)return;let e=n||(null==o?void 0:o.portalNode);e&&!ee(e)&&(e=e.current),e=e||document.body;let i=null;t&&(i=document.createElement("div"),i.id=t,e.appendChild(i));const l=document.createElement("div");l.id=r,l.setAttribute(Yn,""),e=i||e,e.appendChild(l),c.current=l,u(l)},[t,n,r,o]),i}({id:n,root:r}),[u,c]=A.useState(null),l=A.useRef(null),s=A.useRef(null),a=A.useRef(null),f=A.useRef(null),d=null==u?void 0:u.modal,p=null==u?void 0:u.open,v=!!u&&!u.modal&&u.open&&o&&!(!r&&!i);return A.useEffect(()=>{if(i&&o&&!d)return i.addEventListener("focusin",e,!0),i.addEventListener("focusout",e,!0),()=>{i.removeEventListener("focusin",e,!0),i.removeEventListener("focusout",e,!0)};function e(e){i&&at(e)&&("focusin"===e.type?dt:ft)(i)}},[i,o,d]),A.useEffect(()=>{i&&(p||dt(i))},[p,i]),(0,j.jsxs)(Xn.Provider,{value:A.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:s,beforeInsideRef:a,afterInsideRef:f,portalNode:i,setFocusManagerState:c}),[o,i]),children:[v&&i&&(0,j.jsx)(Vn,{"data-type":"outside",ref:l,onFocus:e=>{if(at(e,i)){var t;null==(t=a.current)||t.focus()}else{const e=st(u?u.domReference:null);null==e||e.focus()}}}),v&&i&&(0,j.jsx)("span",{"aria-owns":i.id,style:qn}),i&&pt.createPortal(t,i),v&&i&&(0,j.jsx)(Vn,{"data-type":"outside",ref:s,onFocus:e=>{if(at(e,i)){var t;null==(t=f.current)||t.focus()}else{const t=lt(u?u.domReference:null);null==t||t.focus(),(null==u?void 0:u.closeOnFocusOut)&&(null==u||u.onOpenChange(!1,e.nativeEvent,"focus-out"))}}})]})}const Zn=()=>A.useContext(Xn);function Qn(e){return A.useMemo(()=>t=>{e.forEach(e=>{e&&(e.current=t)})},e)}let Jn=[];function er(){Jn=Jn.filter(e=>{var t;return null==(t=e.deref())?void 0:t.isConnected})}function tr(){er();const e=Jn[Jn.length-1];return null==e?void 0:e.deref()}function nr(e,t){var n;if(!(t.current.includes("floating")||null!=(n=e.getAttribute("role"))&&n.includes("dialog")))return;const r=ut(),o=function(e,t){return(t=t||{}).getShadowRoot?Se([e],t.includeContainer,{filter:Te.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):Ce(e,t.includeContainer,Te.bind(null,t))}(e,r),i=o.filter(e=>{const t=e.getAttribute("data-tabindex")||"";return Ie(e,r)||e.hasAttribute("data-tabindex")&&!t.startsWith("-")}),u=e.getAttribute("tabindex");t.current.includes("floating")||0===i.length?"0"!==u&&e.setAttribute("tabindex","0"):("-1"!==u||e.hasAttribute("data-tabindex")&&"-1"!==e.getAttribute("data-tabindex"))&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}const rr=A.forwardRef(function(e,t){return(0,j.jsx)("button",{...e,type:"button",ref:t,tabIndex:-1,style:Kn})});function or(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:u=0,returnFocus:c=!0,restoreFocus:l=!1,modal:s=!0,visuallyHiddenDismiss:a=!1,closeOnFocusOut:f=!0,outsideElementsInert:d=!1,getInsideElements:p=()=>[]}=e,{open:v,onOpenChange:m,events:h,dataRef:g,elements:{domReference:y,floating:b}}=t,x=it(()=>{var e;return null==(e=g.current.floatingContext)?void 0:e.nodeId}),w=it(p),E="number"==typeof u&&u<0,R=Ge(y)&&E,O="undefined"!=typeof HTMLElement&&"inert"in HTMLElement.prototype,C=!O||i,S=!C||O&&d,_=rt(o),k=rt(u),L=rt(c),T=Sn(),P=Zn(),M=A.useRef(null),D=A.useRef(null),$=A.useRef(!1),I=A.useRef(!1),N=A.useRef(-1),F=A.useRef(-1),W=null!=P,H=Ze(b),z=it(function(e){return void 0===e&&(e=H),e?$e(e,ut()):[]}),B=it(e=>{const t=z(e);return _.current.map(e=>y&&"reference"===e?y:H&&"floating"===e?H:t).filter(Boolean).flat()});A.useEffect(()=>{if(r)return;if(!s)return;function e(e){if("Tab"===e.key){Ke(H,Ue(Xe(H)))&&0===z().length&&!R&&et(e);const t=B(),n=Ve(e);"reference"===_.current[0]&&n===y&&(et(e),e.shiftKey?Dn(t[t.length-1]):Dn(t[1])),"floating"===_.current[1]&&n===H&&e.shiftKey&&(et(e),Dn(t[0]))}}const t=Xe(H);return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}},[r,y,H,s,_,R,z,B]),A.useEffect(()=>{if(!r&&b)return b.addEventListener("focusin",e),()=>{b.removeEventListener("focusin",e)};function e(e){const t=Ve(e),n=z().indexOf(t);-1!==n&&(N.current=n)}},[r,b,z]),A.useEffect(()=>{if(r)return;if(!f)return;function e(){I.current=!0,setTimeout(()=>{I.current=!1})}function t(e){const t=e.relatedTarget,n=e.currentTarget,r=Ve(e);queueMicrotask(()=>{const o=x(),i=!(Ke(y,t)||Ke(b,t)||Ke(t,b)||Ke(null==P?void 0:P.portalNode,t)||null!=t&&t.hasAttribute(An("focus-guard"))||T&&(Qe(T.nodesRef.current,o).find(e=>{var n,r;return Ke(null==(n=e.context)?void 0:n.elements.floating,t)||Ke(null==(r=e.context)?void 0:r.elements.domReference,t)})||Je(T.nodesRef.current,o).find(e=>{var n,r,o;return[null==(n=e.context)?void 0:n.elements.floating,Ze(null==(r=e.context)?void 0:r.elements.floating)].includes(t)||(null==(o=e.context)?void 0:o.elements.domReference)===t})));if(n===y&&H&&nr(H,_),l&&n!==y&&(null==r||!r.isConnected)&&Ue(Xe(H))===Xe(H).body){ne(H)&&H.focus();const e=N.current,t=z(),n=t[e]||t[t.length-1]||H;ne(n)&&n.focus()}g.current.insideReactTree?g.current.insideReactTree=!1:!R&&s||!t||!i||I.current||t===tr()||($.current=!0,m(!1,e,"focus-out"))})}const n=Boolean(!T&&P);function o(){kn(F),g.current.insideReactTree=!0,F.current=window.setTimeout(()=>{g.current.insideReactTree=!1})}return b&&ne(y)?(y.addEventListener("focusout",t),y.addEventListener("pointerdown",e),b.addEventListener("focusout",t),n&&b.addEventListener("focusout",o,!0),()=>{y.removeEventListener("focusout",t),y.removeEventListener("pointerdown",e),b.removeEventListener("focusout",t),n&&b.removeEventListener("focusout",o,!0)}):void 0},[r,y,b,H,s,T,P,m,f,l,z,R,x,_,g]);const U=A.useRef(null),K=A.useRef(null),V=Qn([U,null==P?void 0:P.beforeInsideRef]),q=Qn([K,null==P?void 0:P.afterInsideRef]);function X(e){return!r&&a&&s?(0,j.jsx)(rr,{ref:"start"===e?M:D,onClick:e=>m(!1,e.nativeEvent),children:"string"==typeof a?a:"Dismiss"}):null}A.useEffect(()=>{var e,t;if(r)return;if(!b)return;const n=Array.from((null==P||null==(e=P.portalNode)?void 0:e.querySelectorAll("["+An("portal")+"]"))||[]),o=null==(t=(T?Je(T.nodesRef.current,x()):[]).find(e=>{var t;return Ge((null==(t=e.context)?void 0:t.elements.domReference)||null)}))||null==(t=t.context)?void 0:t.elements.domReference,i=[b,o,...n,...w(),M.current,D.current,U.current,K.current,null==P?void 0:P.beforeOutsideRef.current,null==P?void 0:P.afterOutsideRef.current,_.current.includes("reference")||R?y:null].filter(e=>null!=e),u=s||R?Un(i,!S,S):Un(i);return()=>{u()}},[r,y,b,s,_,P,R,C,S,T,x,w]),nt(()=>{if(r||!ne(H))return;const e=Ue(Xe(H));queueMicrotask(()=>{const t=B(H),n=k.current,r=("number"==typeof n?t[n]:n.current)||H,o=Ke(H,e);E||o||!v||Dn(r,{preventScroll:r===H})})},[r,v,H,E,B,k]),nt(()=>{if(r||!H)return;const e=Xe(H);var t;function n(e){let{reason:t,event:n,nested:r}=e;if(["hover","safe-polygon"].includes(t)&&"mouseleave"===n.type&&($.current=!0),"outside-press"===t)if(r)$.current=!1;else if(function(e){return!(0!==e.mozInputSource||!e.isTrusted)||(He()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}(n)||function(e){return!ze()&&(!He()&&0===e.width&&0===e.height||He()&&1===e.width&&1===e.height&&0===e.pressure&&0===e.detail&&"mouse"===e.pointerType||e.width<1&&e.height<1&&0===e.pressure&&0===e.detail&&"touch"===e.pointerType)}(n))$.current=!1;else{let e=!1;document.createElement("div").focus({get preventScroll(){return e=!0,!1}}),$.current=!e}}t=Ue(e),er(),t&&"body"!==Z(t)&&(Jn.push(new WeakRef(t)),Jn.length>20&&(Jn=Jn.slice(-20))),h.on("openchange",n);const o=e.createElement("span");return o.setAttribute("tabindex","-1"),o.setAttribute("aria-hidden","true"),Object.assign(o.style,Kn),W&&y&&y.insertAdjacentElement("afterend",o),()=>{h.off("openchange",n);const t=Ue(e),r=Ke(b,t)||T&&Qe(T.nodesRef.current,x(),!1).some(e=>{var n;return Ke(null==(n=e.context)?void 0:n.elements.floating,t)}),i=function(){if("boolean"==typeof L.current){const e=y||tr();return e&&e.isConnected?e:o}return L.current.current||o}();queueMicrotask(()=>{const n=function(e){const t=ut();return Ie(e,t)?e:$e(e,t)[0]||e}(i);L.current&&!$.current&&ne(n)&&(n===t||t===e.body||r)&&n.focus({preventScroll:!0}),o.remove()})}},[r,b,H,L,g,h,T,W,y,x]),A.useEffect(()=>(queueMicrotask(()=>{$.current=!1}),()=>{queueMicrotask(er)}),[r]),nt(()=>{if(!r&&P)return P.setFocusManagerState({modal:s,closeOnFocusOut:f,open:v,onOpenChange:m,domReference:y}),()=>{P.setFocusManagerState(null)}},[r,P,s,v,m,f,y]),nt(()=>{r||H&&nr(H,_)},[r,H,_]);const Y=!r&&C&&(!s||!R)&&(W||s);return(0,j.jsxs)(j.Fragment,{children:[Y&&(0,j.jsx)(Vn,{"data-type":"inside",ref:V,onFocus:e=>{if(s){const e=B();Dn("reference"===o[0]?e[0]:e[e.length-1])}else if(null!=P&&P.preserveTabOrder&&P.portalNode)if($.current=!1,at(e,P.portalNode)){const e=lt(y);null==e||e.focus()}else{var t;null==(t=P.beforeOutsideRef.current)||t.focus()}}}),!R&&X("start"),n,X("end"),Y&&(0,j.jsx)(Vn,{"data-type":"inside",ref:q,onFocus:e=>{if(s)Dn(B()[0]);else if(null!=P&&P.preserveTabOrder&&P.portalNode)if(f&&($.current=!0),at(e,P.portalNode)){const e=st(y);null==e||e.focus()}else{var t;null==(t=P.afterOutsideRef.current)||t.focus()}}})]})}function ir(e){return ne(e.target)&&"BUTTON"===e.target.tagName}function ur(e){return Ye(e)}function cr(e){return null!=e&&null!=e.clientX}const lr={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},sr={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},ar=e=>{var t,n;return{escapeKey:"boolean"==typeof e?e:null!=(t=null==e?void 0:e.escapeKey)&&t,outsidePress:"boolean"==typeof e?e:null==(n=null==e?void 0:e.outsidePress)||n}};function fr(){return Ne().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints&&We()}function dr(e,t,n){const r=new Map,o="item"===n;let i=e;if(o&&e){const{[vn]:t,[mn]:n,...r}=e;i=r}return{..."floating"===n&&{tabIndex:-1,[pn]:""},...i,...t.map(t=>{const r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r}).concat(e).reduce((e,t)=>t?(Object.entries(t).forEach(t=>{let[n,i]=t;var u;o&&[vn,mn].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof i&&(null==(u=r.get(n))||u.push(i),e[n]=function(){for(var e,t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return null==(e=r.get(n))?void 0:e.map(e=>e(...o)).find(e=>void 0!==e)})):e[n]=i)}),e):e,{})}}const pr=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]),vr=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(e,t)=>(t?"-":"")+e.toLowerCase());function mr(e,t){return"function"==typeof e?e(t):e}function hr(e,t,n){return void 0===n&&(n=!0),e.filter(e=>{var r;return e.parentId===t&&(!n||(null==(r=e.context)?void 0:r.open))}).flatMap(t=>[t,...hr(e,t.id,n)])}function gr(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let e=0,u=i-1;e<i;u=e++){const[i,c]=t[e]||[0,0],[l,s]=t[u]||[0,0];c>=r!=s>=r&&n<=(l-i)*(r-c)/(s-c)+i&&(o=!o)}return o}function yr(e){void 0===e&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,o={current:-1};let i=!1,u=null,c=null,l="undefined"!=typeof performance?performance.now():0;const s=e=>{let{x:n,y:s,placement:a,elements:f,onClose:d,nodeId:p,tree:v}=e;return function(e){function m(){kn(o),d()}if(kn(o),!f.domReference||!f.floating||null==a||null==n||null==s)return;const{clientX:h,clientY:g}=e,y=[h,g],b=function(e){return"composedPath"in e?e.composedPath()[0]:e.target}(e),x="mouseleave"===e.type,w=$n(f.floating,b),E=$n(f.domReference,b),R=f.domReference.getBoundingClientRect(),O=f.floating.getBoundingClientRect(),C=a.split("-")[0],S=n>O.right-O.width/2,_=s>O.bottom-O.height/2,j=function(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}(y,R),A=O.width>R.width,k=O.height>R.height,L=(A?R:O).left,T=(A?R:O).right,P=(k?R:O).top,M=(k?R:O).bottom;if(w&&(i=!0,!x))return;if(E&&(i=!1),E&&!x)return void(i=!0);if(x&&te(e.relatedTarget)&&$n(f.floating,e.relatedTarget))return;if(v&&hr(v.nodesRef.current,p).length)return;if("top"===C&&s>=R.bottom-1||"bottom"===C&&s<=R.top+1||"left"===C&&n>=R.right-1||"right"===C&&n<=R.left+1)return m();let D=[];switch(C){case"top":D=[[L,R.top+1],[L,O.bottom-1],[T,O.bottom-1],[T,R.top+1]];break;case"bottom":D=[[L,O.top+1],[L,R.bottom-1],[T,R.bottom-1],[T,O.top+1]];break;case"left":D=[[O.right-1,M],[O.right-1,P],[R.left+1,P],[R.left+1,M]];break;case"right":D=[[R.right-1,M],[R.right-1,P],[O.left+1,P],[O.left+1,M]]}if(!gr([h,g],D)){if(i&&!j)return m();if(!x&&r){const t=function(e,t){const n=performance.now(),r=n-l;if(null===u||null===c||0===r)return u=e,c=t,l=n,null;const o=e-u,i=t-c,s=Math.sqrt(o*o+i*i);return u=e,c=t,l=n,s/r}(e.clientX,e.clientY);if(null!==t&&t<.1)return m()}gr([h,g],function(e){let[n,r]=e;switch(C){case"top":return[[A?n+t/2:S?n+4*t:n-4*t,r+t+1],[A?n-t/2:S?n+4*t:n-4*t,r+t+1],[O.left,S||A?O.bottom-t:O.top],[O.right,S?A?O.bottom-t:O.top:O.bottom-t]];case"bottom":return[[A?n+t/2:S?n+4*t:n-4*t,r-t],[A?n-t/2:S?n+4*t:n-4*t,r-t],[O.left,S||A?O.top+t:O.bottom],[O.right,S?A?O.top+t:O.bottom:O.top+t]];case"left":{const e=[n+t+1,k?r+t/2:_?r+4*t:r-4*t],o=[n+t+1,k?r-t/2:_?r+4*t:r-4*t];return[[_||k?O.right-t:O.left,O.top],[_?k?O.right-t:O.left:O.right-t,O.bottom],e,o]}case"right":return[[n-t,k?r+t/2:_?r+4*t:r-4*t],[n-t,k?r-t/2:_?r+4*t:r-4*t],[_||k?O.left+t:O.right,O.top],[_?k?O.left+t:O.right:O.left+t,O.bottom]]}}([n,s]))?!i&&r&&(o.current=window.setTimeout(m,40)):m()}}};return s.__options={blockPointerEvents:n},s}const br=({children:e,enabled:t=!0,...n})=>{const r=Cn();return!t||r?e:(0,j.jsx)(jn,{...n,children:e})},xr=s(_,({$width:e="max-content"})=>({$width:e}))``,wr=({children:e,enabled:t=!0,...n})=>t?(0,j.jsx)(Gn,{...n,children:e}):e;var Er={551(e,t,n){var r="Expected a function",o=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt,s="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,a="object"==typeof self&&self&&self.Object===Object&&self,f=s||a||Function("return this")(),d=Object.prototype.toString,p=Math.max,v=Math.min,m=function(){return f.Date.now()};function h(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==d.call(e)}(e))return NaN;if(h(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=h(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var n=u.test(e);return n||c.test(e)?l(e.slice(2),n?2:8):i.test(e)?NaN:+e}e.exports=function(e,t,n){var o=!0,i=!0;if("function"!=typeof e)throw new TypeError(r);return h(n)&&(o="leading"in n?!!n.leading:o,i="trailing"in n?!!n.trailing:i),function(e,t,n){var o,i,u,c,l,s,a=0,f=!1,d=!1,y=!0;if("function"!=typeof e)throw new TypeError(r);function b(t){var n=o,r=i;return o=i=void 0,a=t,c=e.apply(r,n)}function x(e){var n=e-s;return void 0===s||n>=t||n<0||d&&e-a>=u}function w(){var e=m();if(x(e))return E(e);l=setTimeout(w,function(e){var n=t-(e-s);return d?v(n,u-(e-a)):n}(e))}function E(e){return l=void 0,y&&o?b(e):(o=i=void 0,c)}function R(){var e=m(),n=x(e);if(o=arguments,i=this,s=e,n){if(void 0===l)return function(e){return a=e,l=setTimeout(w,t),f?b(e):c}(s);if(d)return l=setTimeout(w,t),b(s)}return void 0===l&&(l=setTimeout(w,t)),c}return t=g(t)||0,h(n)&&(f=!!n.leading,u=(d="maxWait"in n)?p(g(n.maxWait)||0,t):u,y="trailing"in n?!!n.trailing:y),R.cancel=function(){void 0!==l&&clearTimeout(l),a=0,o=s=i=l=void 0},R.flush=function(){return void 0===l?c:E(m())},R}(e,t,{leading:o,maxWait:t,trailing:i})}}},Rr={};function Or(e){var t=Rr[e];if(void 0!==t)return t.exports;var n=Rr[e]={exports:{}};return Er[e](n,n.exports,Or),n.exports}Or.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return Or.d(t,{a:t}),t},Or.d=(e,t)=>{for(var n in t)Or.o(t,n)&&!Or.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},Or.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),Or.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var Cr=Or(551);Or.n(Cr);const Sr=(e,{enabled:t=!0,event:n="click",dismissOptions:r,clickOptions:o,hoverOptions:i,focusOptions:u,clientPointsOptions:c,roleOptions:l,extraInteractions:s=[]})=>{const a=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:u=!0,escapeKey:c=!0,outsidePress:l=!0,outsidePressEvent:s="pointerdown",referencePress:a=!1,referencePressEvent:f="pointerdown",ancestorScroll:d=!1,bubbles:p,capture:v}=t,m=Sn(),h=it("function"==typeof l?l:()=>!1),g="function"==typeof l?h:l,y=A.useRef(!1),{escapeKey:b,outsidePress:x}=ar(p),{escapeKey:w,outsidePress:E}=ar(v),R=A.useRef(!1),O=it(e=>{var t;if(!n||!u||!c||"Escape"!==e.key)return;if(R.current)return;const o=null==(t=i.current.floatingContext)?void 0:t.nodeId,l=m?Qe(m.nodesRef.current,o):[];if(!b&&(e.stopPropagation(),l.length>0)){let e=!0;if(l.forEach(t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)}),!e)return}r(!1,function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,"escape-key")}),C=it(e=>{var t;const n=()=>{var t;O(e),null==(t=Ve(e))||t.removeEventListener("keydown",n)};null==(t=Ve(e))||t.addEventListener("keydown",n)}),S=it(e=>{var t;const n=i.current.insideReactTree;i.current.insideReactTree=!1;const u=y.current;if(y.current=!1,"click"===s&&u)return;if(n)return;if("function"==typeof g&&!g(e))return;const c=Ve(e),l="["+An("inert")+"]",a=Xe(o.floating).querySelectorAll(l);let f=te(c)?c:null;for(;f&&!pe(f);){const e=he(f);if(pe(e)||!te(e))break;f=e}if(a.length&&te(c)&&!c.matches("html,body")&&!Ke(c,o.floating)&&Array.from(a).every(e=>!Ke(f,e)))return;if(ne(c)&&k){const t=pe(c),n=ve(c),r=/auto|scroll/,o=t||r.test(n.overflowX),i=t||r.test(n.overflowY),u=o&&c.clientWidth>0&&c.scrollWidth>c.clientWidth,l=i&&c.clientHeight>0&&c.scrollHeight>c.clientHeight,s="rtl"===n.direction,a=l&&(s?e.offsetX<=c.offsetWidth-c.clientWidth:e.offsetX>c.clientWidth),f=u&&e.offsetY>c.clientHeight;if(a||f)return}const d=null==(t=i.current.floatingContext)?void 0:t.nodeId,p=m&&Qe(m.nodesRef.current,d).some(t=>{var n;return qe(e,null==(n=t.context)?void 0:n.elements.floating)});if(qe(e,o.floating)||qe(e,o.domReference)||p)return;const v=m?Qe(m.nodesRef.current,d):[];if(v.length>0){let e=!0;if(v.forEach(t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)}),!e)return}r(!1,e,"outside-press")}),_=it(e=>{var t;const n=()=>{var t;S(e),null==(t=Ve(e))||t.removeEventListener(s,n)};null==(t=Ve(e))||t.addEventListener(s,n)});A.useEffect(()=>{if(!n||!u)return;i.current.__escapeKeyBubbles=b,i.current.__outsidePressBubbles=x;let e=-1;function t(e){r(!1,e,"ancestor-scroll")}function l(){window.clearTimeout(e),R.current=!0}function a(){e=window.setTimeout(()=>{R.current=!1},de()?5:0)}const f=Xe(o.floating);c&&(f.addEventListener("keydown",w?C:O,w),f.addEventListener("compositionstart",l),f.addEventListener("compositionend",a)),g&&f.addEventListener(s,E?_:S,E);let p=[];return d&&(te(o.domReference)&&(p=ye(o.domReference)),te(o.floating)&&(p=p.concat(ye(o.floating))),!te(o.reference)&&o.reference&&o.reference.contextElement&&(p=p.concat(ye(o.reference.contextElement)))),p=p.filter(e=>{var t;return e!==(null==(t=f.defaultView)?void 0:t.visualViewport)}),p.forEach(e=>{e.addEventListener("scroll",t,{passive:!0})}),()=>{c&&(f.removeEventListener("keydown",w?C:O,w),f.removeEventListener("compositionstart",l),f.removeEventListener("compositionend",a)),g&&f.removeEventListener(s,E?_:S,E),p.forEach(e=>{e.removeEventListener("scroll",t)}),window.clearTimeout(e)}},[i,o,c,g,s,n,r,d,u,b,x,O,w,C,S,E,_]),A.useEffect(()=>{i.current.insideReactTree=!1},[i,g,s]);const j=A.useMemo(()=>({onKeyDown:O,...a&&{[lr[f]]:e=>{r(!1,e.nativeEvent,"reference-press")},..."click"!==f&&{onClick(e){r(!1,e.nativeEvent,"reference-press")}}}}),[O,r,a,f]),k=A.useMemo(()=>{function e(e){0===e.button&&(y.current=!0)}return{onKeyDown:O,onMouseDown:e,onMouseUp:e,[sr[s]]:()=>{i.current.insideReactTree=!0}}},[O,s,i]);return A.useMemo(()=>u?{reference:j,floating:k}:{},[u,j,k])}(e,{escapeKey:!1,...r}),f=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:u=!0,event:c="click",toggle:l=!0,ignoreMouse:s=!1,keyboardHandlers:a=!0,stickIfOpen:f=!0}=t,d=A.useRef(),p=A.useRef(!1),v=A.useMemo(()=>({onPointerDown(e){d.current=e.pointerType},onMouseDown(e){const t=d.current;0===e.button&&"click"!==c&&(tt(t,!0)&&s||(!n||!l||o.current.openEvent&&f&&"mousedown"!==o.current.openEvent.type?(e.preventDefault(),r(!0,e.nativeEvent,"click")):r(!1,e.nativeEvent,"click")))},onClick(e){const t=d.current;"mousedown"===c&&d.current?d.current=void 0:tt(t,!0)&&s||(!n||!l||o.current.openEvent&&f&&"click"!==o.current.openEvent.type?r(!0,e.nativeEvent,"click"):r(!1,e.nativeEvent,"click"))},onKeyDown(e){d.current=void 0,e.defaultPrevented||!a||ir(e)||(" "!==e.key||ur(i)||(e.preventDefault(),p.current=!0),function(e){return ne(e.target)&&"A"===e.target.tagName}(e)||"Enter"===e.key&&r(!n||!l,e.nativeEvent,"click"))},onKeyUp(e){e.defaultPrevented||!a||ir(e)||ur(i)||" "===e.key&&p.current&&(p.current=!1,r(!n||!l,e.nativeEvent,"click"))}}),[o,i,c,s,a,r,n,f,l]);return A.useMemo(()=>u?{reference:v}:{},[u,v])}(e,{enabled:t&&"click"===n,...o}),d=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:u}=e,{enabled:c=!0,delay:l=0,handleClose:s=null,mouseOnly:a=!1,restMs:f=0,move:d=!0}=t,p=Sn(),v=Cn(),m=rt(s),h=rt(l),g=rt(n),y=rt(f),b=A.useRef(),x=A.useRef(-1),w=A.useRef(),E=A.useRef(-1),R=A.useRef(!0),O=A.useRef(!1),C=A.useRef(()=>{}),S=A.useRef(!1),_=it(()=>{var e;const t=null==(e=o.current.openEvent)?void 0:e.type;return(null==t?void 0:t.includes("mouse"))&&"mousedown"!==t});A.useEffect(()=>{if(c)return i.on("openchange",e),()=>{i.off("openchange",e)};function e(e){let{open:t}=e;t||(kn(x),kn(E),R.current=!0,S.current=!1)}},[c,i]),A.useEffect(()=>{if(!c)return;if(!m.current)return;if(!n)return;function e(e){_()&&r(!1,e,"hover")}const t=Xe(u.floating).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}},[u.floating,n,r,c,m,_]);const j=A.useCallback(function(e,t,n){void 0===t&&(t=!0),void 0===n&&(n="hover");const o=Tn(h.current,"close",b.current);o&&!w.current?(kn(x),x.current=window.setTimeout(()=>r(!1,e,n),o)):t&&(kn(x),r(!1,e,n))},[h,r]),k=it(()=>{C.current(),w.current=void 0}),L=it(()=>{if(O.current){const e=Xe(u.floating).body;e.style.pointerEvents="",e.removeAttribute(Ln),O.current=!1}}),T=it(()=>!!o.current.openEvent&&["click","mousedown"].includes(o.current.openEvent.type));A.useEffect(()=>{if(c&&te(u.domReference)){const r=u.domReference,o=u.floating;return n&&r.addEventListener("mouseleave",i),d&&r.addEventListener("mousemove",e,{once:!0}),r.addEventListener("mouseenter",e),r.addEventListener("mouseleave",t),o&&(o.addEventListener("mouseleave",i),o.addEventListener("mouseenter",l),o.addEventListener("mouseleave",s)),()=>{n&&r.removeEventListener("mouseleave",i),d&&r.removeEventListener("mousemove",e),r.removeEventListener("mouseenter",e),r.removeEventListener("mouseleave",t),o&&(o.removeEventListener("mouseleave",i),o.removeEventListener("mouseenter",l),o.removeEventListener("mouseleave",s))}}function e(e){if(kn(x),R.current=!1,a&&!tt(b.current)||Pn(y.current)>0&&!Tn(h.current,"open"))return;const t=Tn(h.current,"open",b.current);t?x.current=window.setTimeout(()=>{g.current||r(!0,e,"hover")},t):n||r(!0,e,"hover")}function t(e){if(T())return void L();C.current();const t=Xe(u.floating);if(kn(E),S.current=!1,m.current&&o.current.floatingContext){n||kn(x),w.current=m.current({...o.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){L(),k(),T()||j(e,!0,"safe-polygon")}});const r=w.current;return t.addEventListener("mousemove",r),void(C.current=()=>{t.removeEventListener("mousemove",r)})}("touch"!==b.current||!Ke(u.floating,e.relatedTarget))&&j(e)}function i(e){T()||o.current.floatingContext&&(null==m.current||m.current({...o.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){L(),k(),T()||j(e)}})(e))}function l(){kn(x)}function s(e){T()||j(e,!1)}},[u,c,e,a,d,j,k,L,r,n,g,p,h,m,o,T,y]),nt(()=>{var e;if(c&&n&&null!=(e=m.current)&&null!=(e=e.__options)&&e.blockPointerEvents&&_()){O.current=!0;const e=u.floating;if(te(u.domReference)&&e){var t;const n=Xe(u.floating).body;n.setAttribute(Ln,"");const r=u.domReference,o=null==p||null==(t=p.nodesRef.current.find(e=>e.id===v))||null==(t=t.context)?void 0:t.elements.floating;return o&&(o.style.pointerEvents=""),n.style.pointerEvents="none",r.style.pointerEvents="auto",e.style.pointerEvents="auto",()=>{n.style.pointerEvents="",r.style.pointerEvents="",e.style.pointerEvents=""}}}},[c,n,v,u,p,m,_]),nt(()=>{n||(b.current=void 0,S.current=!1,k(),L())},[n,k,L]),A.useEffect(()=>()=>{k(),kn(x),kn(E),L()},[c,u.domReference,k,L]);const P=A.useMemo(()=>{function e(e){b.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){const{nativeEvent:t}=e;function o(){R.current||g.current||r(!0,t,"hover")}a&&!tt(b.current)||n||0===Pn(y.current)||S.current&&e.movementX**2+e.movementY**2<2||(kn(E),"touch"===b.current?o():(S.current=!0,E.current=window.setTimeout(o,Pn(y.current))))}}},[a,r,n,g,y]);return A.useMemo(()=>c?{reference:P}:{},[c,P])}(e,{restMs:150,enabled:t&&"hover"===n,handleClose:yr(),...i}),p=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:u}=e,{enabled:c=!0,visibleOnly:l=!0}=t,s=A.useRef(!1),a=A.useRef(-1),f=A.useRef(!0);A.useEffect(()=>{if(!c)return;const e=Q(u.domReference);function t(){!n&&ne(u.domReference)&&u.domReference===Ue(Xe(u.domReference))&&(s.current=!0)}function r(){f.current=!0}function o(){f.current=!1}return e.addEventListener("blur",t),fr()&&(e.addEventListener("keydown",r,!0),e.addEventListener("pointerdown",o,!0)),()=>{e.removeEventListener("blur",t),fr()&&(e.removeEventListener("keydown",r,!0),e.removeEventListener("pointerdown",o,!0))}},[u.domReference,n,c]),A.useEffect(()=>{if(c)return o.on("openchange",e),()=>{o.off("openchange",e)};function e(e){let{reason:t}=e;"reference-press"!==t&&"escape-key"!==t||(s.current=!0)}},[o,c]),A.useEffect(()=>()=>{kn(a)},[]);const d=A.useMemo(()=>({onMouseLeave(){s.current=!1},onFocus(e){if(s.current)return;const t=Ve(e.nativeEvent);if(l&&te(t))if(fr()&&!e.relatedTarget){if(!f.current&&!Ye(t))return}else if(!function(e){if(!e||ze())return!0;try{return e.matches(":focus-visible")}catch(e){return!0}}(t))return;r(!0,e.nativeEvent,"focus")},onBlur(e){s.current=!1;const t=e.relatedTarget,n=e.nativeEvent,o=te(t)&&t.hasAttribute(An("focus-guard"))&&"outside"===t.getAttribute("data-type");a.current=window.setTimeout(()=>{var e;const c=Ue(u.domReference?u.domReference.ownerDocument:document);(t||c!==u.domReference)&&(Ke(null==(e=i.current.floatingContext)?void 0:e.refs.floating.current,c)||Ke(u.domReference,c)||o||r(!1,n,"focus"))})}}),[i,u.domReference,r,l]);return A.useMemo(()=>c?{reference:d}:{},[c,d])}(e,{enabled:t&&"focus"===n,...u}),v=function(e,t){void 0===t&&(t={});const{open:n,dataRef:r,elements:{floating:o,domReference:i},refs:u}=e,{enabled:c=!0,axis:l="both",x:s=null,y:a=null}=t,f=A.useRef(!1),d=A.useRef(null),[p,v]=A.useState(),[m,h]=A.useState([]),g=it((e,t)=>{f.current||r.current.openEvent&&!cr(r.current.openEvent)||u.setPositionReference(function(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var i;const u=(null==e?void 0:e.getBoundingClientRect())||{width:0,height:0,x:0,y:0},c="x"===t.axis||"both"===t.axis,l="y"===t.axis||"both"===t.axis,s=["mouseenter","mousemove"].includes((null==(i=t.dataRef.current.openEvent)?void 0:i.type)||"")&&"touch"!==t.pointerType;let a=u.width,f=u.height,d=u.x,p=u.y;return null==n&&t.x&&c&&(n=u.x-t.x),null==r&&t.y&&l&&(r=u.y-t.y),d-=n||0,p-=r||0,a=0,f=0,!o||s?(a="y"===t.axis?u.width:0,f="x"===t.axis?u.height:0,d=c&&null!=t.x?t.x:d,p=l&&null!=t.y?t.y:p):o&&!s&&(f="x"===t.axis?u.height:f,a="y"===t.axis?u.width:a),o=!0,{width:a,height:f,x:d,y:p,top:p,right:d+a,bottom:p+f,left:d}}}}(i,{x:e,y:t,axis:l,dataRef:r,pointerType:p}))}),y=it(e=>{null==s&&null==a&&(n?d.current||h([]):g(e.clientX,e.clientY))}),b=tt(p)?o:n,x=A.useCallback(()=>{if(!b||!c||null!=s||null!=a)return;const e=Q(o);function t(n){const r=Ve(n);Ke(o,r)?(e.removeEventListener("mousemove",t),d.current=null):g(n.clientX,n.clientY)}if(!r.current.openEvent||cr(r.current.openEvent)){e.addEventListener("mousemove",t);const n=()=>{e.removeEventListener("mousemove",t),d.current=null};return d.current=n,n}u.setPositionReference(i)},[b,c,s,a,o,r,u,i,g]);A.useEffect(()=>x(),[x,m]),A.useEffect(()=>{c&&!o&&(f.current=!1)},[c,o]),A.useEffect(()=>{!c&&n&&(f.current=!0)},[c,n]),nt(()=>{!c||null==s&&null==a||(f.current=!1,g(s,a))},[c,s,a,g]);const w=A.useMemo(()=>{function e(e){let{pointerType:t}=e;v(t)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:y,onMouseEnter:y}},[y]);return A.useMemo(()=>c?{reference:w}:{},[c,w])}(e,{enabled:t&&"point"===n,...c}),m=function(e,t){var n,r;void 0===t&&(t={});const{open:o,elements:i,floatingId:u}=e,{enabled:c=!0,role:l="dialog"}=t,s=xn(),a=(null==(n=i.domReference)?void 0:n.id)||s,f=A.useMemo(()=>{var e;return(null==(e=Ze(i.floating))?void 0:e.id)||u},[i.floating,u]),d=null!=(r=pr.get(l))?r:l,p=null!=Cn(),v=A.useMemo(()=>"tooltip"===d||"label"===l?{["aria-"+("label"===l?"labelledby":"describedby")]:o?f:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":"alertdialog"===d?"dialog":d,"aria-controls":o?f:void 0,..."listbox"===d&&{role:"combobox"},..."menu"===d&&{id:a},..."menu"===d&&p&&{role:"menuitem"},..."select"===l&&{"aria-autocomplete":"none"},..."combobox"===l&&{"aria-autocomplete":"list"}},[d,f,p,o,a,l]),m=A.useMemo(()=>{const e={id:f,...d&&{role:d}};return"tooltip"===d||"label"===l?e:{...e,..."menu"===d&&{"aria-labelledby":a}}},[d,f,a,l]),h=A.useCallback(e=>{let{active:t,selected:n}=e;const r={role:"option",...t&&{id:f+"-fui-option"}};switch(l){case"select":case"combobox":return{...r,"aria-selected":n}}return{}},[f,l]);return A.useMemo(()=>c?{reference:v,floating:m,item:h}:{},[c,v,m,h])}(e,l);return function(e){void 0===e&&(e=[]);const t=e.map(e=>null==e?void 0:e.reference),n=e.map(e=>null==e?void 0:e.floating),r=e.map(e=>null==e?void 0:e.item),o=A.useCallback(t=>dr(t,e,"reference"),t),i=A.useCallback(t=>dr(t,e,"floating"),n),u=A.useCallback(t=>dr(t,e,"item"),r);return A.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:u}),[o,i,u])}([a,f,d,p,v,m,...s])},_r=({enabled:e=!0,event:t,dismissOptions:n,clickOptions:r,hoverOptions:o,focusOptions:i,clientPointsOptions:u,roleOptions:c,extraInteractions:l,open:s,floatingOptions:a,useOffset:f=!0,offsetOptions:d,useFlip:p=!0,flipOptions:v,useShift:h=!0,shiftOptions:g,useArrow:y=!1,arrowOptions:b,transitionOptions:x,useAutoPlacement:w=!1,autoPlacementOptions:E,useAutoUpdate:R=!1,autoUpdateOptions:O,useAutoSize:C=!1,sizeOptions:S,minAcceptableWidth:_=null,minAcceptableHeight:j=null,maxAcceptableWidth:k,maxAcceptableHeight:L,onOpen:T,onClose:P})=>{const{theme:M}=K(),D=function(){const e=xn(),t=Sn(),n=Cn();return nt(()=>{if(!e)return;const r={id:e,parentId:n};return null==t||t.addNode(r),()=>{null==t||t.removeNode(r)}},[t,e,n]),e}(),[$,I]=(0,A.useState)(!1),N=(0,A.useRef)(null),F=e&&(s??$);(0,A.useEffect)(()=>{F&&T?.()},[F]),(e=>{const t=(0,A.useRef)(e);(0,A.useEffect)(()=>{if(t.current!==e)return t.current=e,(e=>{e||I(!1)})(e)},[e])})(e);const W=[];f&&W.push((e=>{const t=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:u,middlewareData:c}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),u=Ot(n),c=Ct(n),l="y"===jt(n),s=Ht.has(u)?-1:1,a=i&&l?-1:1,f=Rt(t,e);let{mainAxis:d,crossAxis:p,alignmentAxis:v}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return c&&"number"==typeof v&&(p="end"===c?-1*v:v),l?{x:p*a,y:d*s}:{x:d*s,y:p*a}}(t,e);return u===(null==(n=c.offset)?void 0:n.placement)&&null!=(r=c.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:u}}}}}(e);return{name:t.name,fn:t.fn,options:[e,void 0]}})(d??M.spacings.base));let H=null;if(w?W.push((e=>{const t=function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,o;const{rects:i,middlewareData:u,placement:c,platform:l,elements:s}=t,{crossAxis:a=!1,alignment:f,allowedPlacements:d=mt,autoAlignment:p=!0,...v}=Rt(e,t),m=void 0!==f||d===mt?function(e,t,n){return(e?[...n.filter(t=>Ct(t)===e),...n.filter(t=>Ct(t)!==e)]:n.filter(e=>Ot(e)===e)).filter(n=>!e||Ct(n)===e||!!t&&Lt(n)!==n)}(f||null,p,d):d,h=await l.detectOverflow(t,v),g=(null==(n=u.autoPlacement)?void 0:n.index)||0,y=m[g];if(null==y)return{};const b=kt(y,i,await(null==l.isRTL?void 0:l.isRTL(s.floating)));if(c!==y)return{reset:{placement:m[0]}};const x=[h[Ot(y)],h[b[0]],h[b[1]]],w=[...(null==(r=u.autoPlacement)?void 0:r.overflows)||[],{placement:y,overflows:x}],E=m[g+1];if(E)return{data:{index:g+1,overflows:w},reset:{placement:E}};const R=w.map(e=>{const t=Ct(e.placement);return[e.placement,t&&a?e.overflows.slice(0,2).reduce((e,t)=>e+t,0):e.overflows[0],e.overflows]}).sort((e,t)=>e[1]-t[1]),O=(null==(o=R.filter(e=>e[2].slice(0,Ct(e[0])?2:3).every(e=>e<=0))[0])?void 0:o[0])||R[0][0];return O!==c?{data:{index:g+1,overflows:w},reset:{placement:O}}:{}}}}(e);return{name:t.name,fn:t.fn,options:[e,void 0]}})(E)):p&&(H=(e=>{const t=on(e);return{name:t.name,fn:t.fn,options:[e,void 0]}})({crossAxis:!1,fallbackStrategy:"bestFit",...v})),C){const e=(e=>{const t=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:u,elements:c}=t,{apply:l=()=>{},...s}=Rt(e,t),a=await u.detectOverflow(t,s),f=Ot(o),d=Ct(o),p="y"===jt(o),{width:v,height:m}=i.floating;let h,g;"top"===f||"bottom"===f?(h=f,g=d===(await(null==u.isRTL?void 0:u.isRTL(c.floating))?"start":"end")?"left":"right"):(g=f,h="end"===d?"top":"bottom");const y=m-a.top-a.bottom,b=v-a.left-a.right,x=ht(m-a[h],y),w=ht(v-a[g],b),E=!t.middlewareData.shift;let R=x,O=w;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(O=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(R=y),E&&!d){const e=gt(a.left,0),t=gt(a.right,0),n=gt(a.top,0),r=gt(a.bottom,0);p?O=v-2*(0!==e||0!==t?e+t:gt(a.left,a.right)):R=m-2*(0!==n||0!==r?n+r:gt(a.top,a.bottom))}await l({...t,availableWidth:O,availableHeight:R});const C=await u.getDimensions(c.floating);return v!==C.width||m!==C.height?{reset:{rects:!0}}:{}}}}(e);return{name:t.name,fn:t.fn,options:[e,void 0]}})({...S,apply({elements:e,rects:t,availableWidth:n,availableHeight:r}){const o=m(_)?_(t.reference):_??t.reference.width,i=m(k)?k(t.reference):Math.min(n,k??1/0),u=m(j)?j(t.reference):j??0,c=m(L)?L(t.reference):Math.min(r,L??1/0);Object.assign(e.floating.style,{minWidth:`${Math.min(o,i)}px`,maxWidth:`${i}px`,minHeight:`${Math.min(u,c)}px`,maxHeight:`${c}px`})}});H?"initialPlacement"===v?.fallbackStrategy?W.push(e,H):W.push(H,e):W.push(e)}else H&&W.push(H);h&&W.push((e=>{const t=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:u=!0,crossAxis:c=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=Rt(e,t),a={x:n,y:r},f=await i.detectOverflow(t,s),d=jt(Ot(o)),p=St(d);let v=a[p],m=a[d];if(u){const e="y"===p?"bottom":"right";v=Et(v+f["y"===p?"top":"left"],v,v-f[e])}if(c){const e="y"===d?"bottom":"right";m=Et(m+f["y"===d?"top":"left"],m,m-f[e])}const h=l.fn({...t,[p]:v,[d]:m});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[p]:u,[d]:c}}}}}}(e);return{name:t.name,fn:t.fn,options:[e,void 0]}})({padding:M.spacings.base,...g})),y&&W.push(((e,t)=>{const n=(e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?un({element:n.current,padding:r}).fn(t):{}:n?un({element:n,padding:r}).fn(t):{};var o}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}})({element:N,padding:M.spacings.base,...b}));const z=function(e){void 0===e&&(e={});const{nodeId:t}=e,n=function(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=xn(),i=A.useRef({}),[u]=A.useState(()=>En()),c=null!=Cn(),[l,s]=A.useState(r.reference),a=it((e,t,r)=>{i.current.openEvent=e?t:void 0,u.emit("openchange",{open:e,event:t,reason:r,nested:c}),null==n||n(e,t,r)}),f=A.useMemo(()=>({setPositionReference:s}),[]),d=A.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return A.useMemo(()=>({dataRef:i,open:t,onOpenChange:a,elements:d,events:u,floatingId:o,refs:f}),[t,a,d,u,o,f])}({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,u]=A.useState(null),[c,l]=A.useState(null),s=(null==o?void 0:o.domReference)||i,a=A.useRef(null),f=Sn();nt(()=>{s&&(a.current=s)},[s]);const d=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:u}={},transform:c=!0,whileElementsMounted:l,open:s}=e,[a,f]=A.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,p]=A.useState(r);sn(d,r)||p(r);const[v,m]=A.useState(null),[h,g]=A.useState(null),y=A.useCallback(e=>{e!==E.current&&(E.current=e,m(e))},[]),b=A.useCallback(e=>{e!==R.current&&(R.current=e,g(e))},[]),x=i||v,w=u||h,E=A.useRef(null),R=A.useRef(null),O=A.useRef(a),C=null!=l,S=dn(l),_=dn(o),j=dn(s),k=A.useCallback(()=>{if(!E.current||!R.current)return;const e={placement:t,strategy:n,middleware:d};_.current&&(e.platform=_.current),cn(E.current,R.current,e).then(e=>{const t={...e,isPositioned:!1!==j.current};L.current&&!sn(O.current,t)&&(O.current=t,pt.flushSync(()=>{f(t)}))})},[d,t,n,_,j]);ln(()=>{!1===s&&O.current.isPositioned&&(O.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[s]);const L=A.useRef(!1);ln(()=>(L.current=!0,()=>{L.current=!1}),[]),ln(()=>{if(x&&(E.current=x),w&&(R.current=w),x&&w){if(S.current)return S.current(x,w,k);k()}},[x,w,k,S,C]);const T=A.useMemo(()=>({reference:E,floating:R,setReference:y,setFloating:b}),[y,b]),P=A.useMemo(()=>({reference:x,floating:w}),[x,w]),M=A.useMemo(()=>{const e={position:n,left:0,top:0};if(!P.floating)return e;const t=fn(P.floating,a.x),r=fn(P.floating,a.y);return c?{...e,transform:"translate("+t+"px, "+r+"px)",...an(P.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,c,P.floating,a.x,a.y]);return A.useMemo(()=>({...a,update:k,refs:T,elements:P,floatingStyles:M}),[a,k,T,P,M])}({...e,elements:{...o,...c&&{reference:c}}}),p=A.useCallback(e=>{const t=te(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;l(t),d.refs.setReference(t)},[d.refs]),v=A.useCallback(e=>{(te(e)||null===e)&&(a.current=e,u(e)),(te(d.refs.reference.current)||null===d.refs.reference.current||null!==e&&!te(e))&&d.refs.setReference(e)},[d.refs]),m=A.useMemo(()=>({...d.refs,setReference:v,setPositionReference:p,domReference:a}),[d.refs,v,p]),h=A.useMemo(()=>({...d.elements,domReference:s}),[d.elements,s]),g=A.useMemo(()=>({...d,...r,refs:m,elements:h,nodeId:t}),[d,m,h,t,r]);return nt(()=>{r.dataRef.current.floatingContext=g;const e=null==f?void 0:f.nodesRef.current.find(e=>e.id===t);e&&(e.context=g)}),A.useMemo(()=>({...d,context:g,refs:m,elements:h}),[d,m,h,g])}({nodeId:D,open:F,middleware:W,onOpenChange:(e,t,n)=>{I(e),e||P?.(n,t)},...R&&{whileElementsMounted:(e,t,n)=>function(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:u="function"==typeof ResizeObserver,layoutShift:c="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,s=Bt(e),a=o||i?[...s?ye(s):[],...t?ye(t):[]]:[];a.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)});const f=s&&c?function(e,t){let n,r=null;const o=J(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function u(c,l){void 0===c&&(c=!1),void 0===l&&(l=1),i();const s=e.getBoundingClientRect(),{left:a,top:f,width:d,height:p}=s;if(c||t(),!d||!p)return;const v={rootMargin:-bt(f)+"px "+-bt(o.clientWidth-(a+d))+"px "+-bt(o.clientHeight-(f+p))+"px "+-bt(a)+"px",threshold:gt(0,ht(1,l))||1};let m=!0;function h(t){const r=t[0].intersectionRatio;if(r!==l){if(!m)return u();r?u(!1,r):n=setTimeout(()=>{u(!1,1e-7)},1e3)}1!==r||rn(s,e.getBoundingClientRect())||u(),m=!1}try{r=new IntersectionObserver(h,{...v,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(h,v)}r.observe(e)}(!0),i}(s,n):null;let d,p=-1,v=null;u&&(v=new ResizeObserver(e=>{let[r]=e;r&&r.target===s&&v&&t&&(v.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=v)||e.observe(t)})),n()}),s&&!l&&v.observe(s),t&&v.observe(t));let m=l?qt(e):null;return l&&function t(){const r=qt(e);m&&!rn(m,r)&&n(),m=r,d=requestAnimationFrame(t)}(),n(),()=>{var e;a.forEach(e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)}),null==f||f(),null==(e=v)||e.disconnect(),v=null,l&&cancelAnimationFrame(d)}}(e,t,n,O)},...a}),B=Sr(z.context,{enabled:e,event:t,dismissOptions:n,clickOptions:r,hoverOptions:o,focusOptions:i,clientPointsOptions:u,roleOptions:c,extraInteractions:l}),U=function(e,t){void 0===t&&(t={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:u=250}=t,c=e.placement,l=c.split("-")[0],s=A.useMemo(()=>({side:l,placement:c}),[l,c]),a="number"==typeof u,f=(a?u:u.open)||0,d=(a?u:u.close)||0,[p,v]=A.useState(()=>({...mr(i,s),...mr(n,s)})),{isMounted:m,status:h}=function(e,t){void 0===t&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,i=("number"==typeof o?o:o.close)||0,[u,c]=A.useState("unmounted"),l=function(e,t){const[n,r]=A.useState(e);return e&&!n&&r(!0),A.useEffect(()=>{if(!e&&n){const e=setTimeout(()=>r(!1),t);return()=>clearTimeout(e)}},[e,n,t]),n}(n,i);return l||"close"!==u||c("unmounted"),nt(()=>{if(r){if(n){c("initial");const e=requestAnimationFrame(()=>{pt.flushSync(()=>{c("open")})});return()=>{cancelAnimationFrame(e)}}c("close")}},[n,r]),{isMounted:l,status:u}}(e,{duration:u}),g=rt(n),y=rt(r),b=rt(o),x=rt(i);return nt(()=>{const e=mr(g.current,s),t=mr(b.current,s),n=mr(x.current,s),r=mr(y.current,s)||Object.keys(e).reduce((e,t)=>(e[t]="",e),{});if("initial"===h&&v(t=>({transitionProperty:t.transitionProperty,...n,...e})),"open"===h&&v({transitionProperty:Object.keys(r).map(vr).join(","),transitionDuration:f+"ms",...n,...r}),"close"===h){const r=t||e;v({transitionProperty:Object.keys(r).map(vr).join(","),transitionDuration:d+"ms",...n,...r})}},[d,b,g,y,x,f,h,s]),{isMounted:m,styles:p}}(z.context,{duration:250,...x});return{nodeId:D,isOpen:F,floating:z,arrowRef:N,interactions:B,transition:U}},jr=()=>{const e=(0,A.useContext)(Y);return v(e,"The `useHoneyPopupContext()` hook can only be used inside <HoneyPopup/> component!"),e},Ar=({children:e,referenceProps:t,content:n,contentProps:r,focusManagerProps:o,arrowProps:i,portalProps:u,adjustStyles:c,context:l,...s})=>{const{useArrow:a,onClose:f}=s,{nodeId:d,floating:p,isOpen:v,arrowRef:m,interactions:g,transition:y}=_r(s),b=(0,A.useCallback)(()=>{f?.("escape-key")},[f]),x=(0,A.useMemo)(()=>({context:l,floatingContext:p.context}),[l,p.context]);return(0,j.jsx)(xr,{ref:p.refs.setReference,...g.getReferenceProps(),...t,"data-testid":"honey-popup",children:(0,j.jsxs)(Y,{value:x,children:[h(e,x),(0,j.jsx)(_n,{id:d,children:y.isMounted&&(0,j.jsx)(wr,{...u,children:(0,j.jsx)(or,{context:p.context,disabled:!v,...o,children:(0,j.jsxs)(X,{ref:p.refs.setFloating,active:v,style:c?.({...p.floatingStyles,...y.styles},{middlewareData:p.middlewareData})??{...p.floatingStyles,...y.styles},onDeactivate:b,...g.getFloatingProps(),...r,"data-testid":"honey-popup-floating-content",children:[a&&(0,j.jsx)(wn,{ref:m,context:p.context,fill:"white",...i}),h(n,x)]})})})})]})})},kr=({useTree:e=!1,...t})=>(0,j.jsx)(br,{enabled:e,children:(0,j.jsx)(Ar,{...t})}),Lr=({option:e,...t})=>{const{context:n,floatingContext:r}=jr();return(0,j.jsx)(O,{onClick:()=>{e.onClick?.({context:n,floatingContext:r})},...t,children:e.label})},Tr=({options:e,optionProps:t,floatingOptions:n,...r})=>{const{contentProps:o}=r,{context:i,floatingContext:u}=jr(),c=(0,A.useMemo)(()=>e?.filter(e=>"function"==typeof e.visible?e.visible({context:i,floatingContext:u}):!1!==e.visible),[e]);return(0,j.jsx)(F,{items:c,itemKey:"id",emptyContent:"No options",children:e=>e.options?.length?(0,j.jsx)(kr,{context:i,content:(0,j.jsx)(Tr,{options:e.options,optionProps:t,contentProps:o}),event:"hover",referenceProps:{$width:"100%"},floatingOptions:{placement:"right-start",...n},useArrow:!0,...r,children:(0,j.jsx)(Lr,{option:e,...t,children:e.label})}):(0,j.jsx)(Lr,{option:e,...t})})},Pr=({children:e,subProps:t,options:n,optionProps:r,clickOptions:o,context:i,...u})=>{const{contentProps:c}=u;return(0,j.jsx)(j.Fragment,{children:(0,j.jsx)(kr,{context:i,content:(0,j.jsx)(Tr,{options:n,optionProps:r,contentProps:c,...t}),clickOptions:{toggle:!1,...o},useArrow:!0,...u,children:e})})},Mr=(0,A.createContext)(void 0),Dr=()=>{const e=(0,A.useContext)(Mr);return v(e,"The `useHoneyLayerRegistryContext()` hook can only be used inside <HoneyLayerRegistry/> component!"),e},$r=({children:e})=>{const t=(0,A.useContext)(Mr),[n,r]=(0,A.useState)([]),o=(0,A.useMemo)(()=>({layers:n,registerLayer:e=>{const t=`${Math.floor(1e3*performance.now()).toString(36)}${Math.random().toString(36).slice(2,10)}`;return r(n=>[...n,{id:t,payload:e}]),t},unregisterLayer:e=>{r(t=>t.filter(t=>t.id!==e))},getLayerIndex:e=>n.findIndex(t=>t.id===e)}),[n]);return t?e:(0,j.jsx)(Mr,{value:o,children:e})},Ir=({children:e,theme:t,mediaQueryOptions:n,...r})=>{const i=B(t,n),{overlays:u,registerOverlay:c,unregisterOverlay:l}=(()=>{const e=(0,A.useRef)([]);(0,A.useEffect)(()=>{const t=t=>{const n=e.current;n.length&&n[n.length-1].notifyListeners("keyup",t.code,t)};return document.addEventListener("keyup",t),()=>{document.removeEventListener("keyup",t)}},[]);const t=(0,A.useCallback)(t=>{const n=t.id??y(),r=[["keyup",t.onKeyUp]],o={current:null},i={containerRef:o,id:n,setContainerRef:e=>{o.current=e},addListener:(e,t)=>{r.push([e,t])},removeListener:(e,t)=>{const n=r.findIndex(([n,r])=>n===e&&r===t);-1!==n&&r.splice(n,1)},notifyListeners:(e,n,o)=>{const u=t.listenKeys??[];u.length&&!u.includes(n)||(o.preventDefault(),r.forEach(([t,r])=>{t===e&&r(n,i,o)}))}};return e.current.push(i),i},[]),n=(0,A.useCallback)(t=>{e.current=e.current.filter(e=>e.id!==t)},[]);return{overlays:e.current,registerOverlay:t,unregisterOverlay:n}})(),s=(0,A.useMemo)(()=>({theme:t,screenState:i,overlays:u,registerOverlay:c,unregisterOverlay:l}),[t,i,u]);return(0,j.jsx)(o,{theme:t,...r,children:(0,j.jsx)(U,{value:s,children:e})})};var Nr=d(117),Fr=d.n(Nr);const Wr=({theme:e,...t})=>{const n=(0,A.useContext)(U),r=(0,A.useMemo)(()=>Fr()(n?.theme,e),[n?.theme,e]);return(0,j.jsx)(o,{theme:r,...t})},Hr=({durationMs:e,timingFunction:t="ease-in-out",extraProperties:n=[],activeClassName:r})=>({active:o=!1})=>u`
|
|
36
|
+
`,P=({ref:e,children:t,columns:n,spacing:r,columnsGrowing:o=!0,applyColumnMaxWidth:i=!1,...u})=>{const c=(0,A.useMemo)(()=>({columns:n,spacing:r,isColumnsGrowing:o,applyColumnMaxWidth:i}),[n,r,o,i]);return(0,j.jsx)(k,{value:c,children:(0,j.jsx)(T,{ref:e,spacing:r,"data-testid":"honey-grid",...u,children:t})})},M=()=>{const e=(0,A.useContext)(k);if(!e)throw new Error("The `useHoneyGridContext()` hook can only be used inside <HoneyGrid/> component!");return e},D=({children:e,...t})=>{const{columns:n,spacing:r,isColumnsGrowing:o,applyColumnMaxWidth:i}=M();return(0,j.jsx)(L,{columns:n,spacing:r,applyMaxWidth:i,$flexGrow:o?1:0,"data-testid":"honey-grid-column",...t,children:e})},$=(e,t,n)=>"function"==typeof t?t(e):"string"==typeof e||"number"==typeof e?e:t?e[t]:n,I=({children:e,loading:t=!1,loadingOverContent:n=!1,error:r=!1,empty:o=!1,loadingContent:i=null,errorContent:u=null,emptyContent:c=null})=>r?u:!n&&t?i:(0,j.jsxs)(j.Fragment,{children:[n&&t&&i,o?c:e]}),N=s(_,({$overflow:e="hidden auto"})=>({$overflow:e}))``,F=({children:e,items:t,itemKey:n,loading:r,loadingOverContent:o,loadingContent:i,error:u,errorContent:c,empty:l=!1,emptyContent:s,...a})=>(0,j.jsx)(N,{role:"list","aria-busy":r,"data-testid":"honey-list",...a,children:(0,j.jsx)(I,{loading:r,loadingOverContent:o,loadingContent:i,error:u,errorContent:c,empty:l||0===t?.length,emptyContent:s,children:t?.map((t,r,o)=>(0,j.jsx)(A.Fragment,{children:e(t,r,o)},String($(t,n,r))))})}),W=({children:e,mount:t,unmountDelay:n,alwaysMounted:r=!1,keepAfterMount:o=!1})=>{const[i,u]=(0,A.useState)(r||t),c=(0,A.useRef)(void 0);return(0,A.useLayoutEffect)(()=>{if(t&&!r)return clearTimeout(c.current),u(!0),()=>{o||(c.current=setTimeout(()=>u(!1),n))}},[t,r,n]),i?e:null};var H=d(551),z=d.n(H);const B=(e,{resizeThrottle:t=0,overrideScreenState:n}={})=>{const[r,o]=(0,A.useState)(()=>({...E(e.breakpoints),...n}));return(0,A.useEffect)(()=>{const r=z()(()=>{o({...E(e.breakpoints),...n})},t);return r(),window.addEventListener("resize",r),window.screen.orientation.addEventListener("change",r),()=>{r.cancel(),window.removeEventListener("resize",r),window.screen.orientation.removeEventListener("change",r)}},[]),r},U=(0,A.createContext)(void 0),K=()=>{const e=(0,A.useContext)(U);return v(e,"The `useHoneyLayout()` hook must be used inside <HoneyLayoutProvider/> component!"),e},V=(e,t)=>{const{registerOverlay:n,unregisterOverlay:r}=K(),o=(0,A.useRef)(null);return(0,A.useEffect)(()=>{if(!e)return;const i=n(t);return o.current=i,()=>{o.current=null,r(i.id)}},[e,t.onKeyUp]),o.current},q=(e,{onKeyUp:t}={})=>{const{overlays:n}=K(),r=n.find(t=>t.id===e);return(0,A.useEffect)(()=>{if(r&&t)return r.addListener("keyup",t),()=>{r.removeListener("keyup",t)}},[r,t]),r},X=({ref:e,children:t,active:n,overlayId:r,onDeactivate:o,...i})=>{const u=V(n,{id:r,onKeyUp:(0,A.useCallback)(e=>{"Escape"===e&&o()},[o])}),c=g(u?.setContainerRef,e);return(0,j.jsx)(_,{ref:c,inert:!n,...i,children:h(t,{overlay:u,deactivateOverlay:o})})},Y=(0,A.createContext)(void 0);function G(){return"undefined"!=typeof window}function Z(e){return ee(e)?(e.nodeName||"").toLowerCase():"#document"}function Q(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function J(e){var t;return null==(t=(ee(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function ee(e){return!!G()&&(e instanceof Node||e instanceof Q(e).Node)}function te(e){return!!G()&&(e instanceof Element||e instanceof Q(e).Element)}function ne(e){return!!G()&&(e instanceof HTMLElement||e instanceof Q(e).HTMLElement)}function re(e){return!(!G()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Q(e).ShadowRoot)}function oe(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ve(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==o&&"contents"!==o}function ie(e){return/^(table|td|th)$/.test(Z(e))}function ue(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}const ce=/transform|translate|scale|rotate|perspective|filter/,le=/paint|layout|strict|content/,se=e=>!!e&&"none"!==e;let ae;function fe(e){const t=te(e)?ve(e):e;return se(t.transform)||se(t.translate)||se(t.scale)||se(t.rotate)||se(t.perspective)||!de()&&(se(t.backdropFilter)||se(t.filter))||ce.test(t.willChange||"")||le.test(t.contain||"")}function de(){return null==ae&&(ae="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ae}function pe(e){return/^(html|body|#document)$/.test(Z(e))}function ve(e){return Q(e).getComputedStyle(e)}function me(e){return te(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function he(e){if("html"===Z(e))return e;const t=e.assignedSlot||e.parentNode||re(e)&&e.host||J(e);return re(t)?t.host:t}function ge(e){const t=he(e);return pe(t)?e.ownerDocument?e.ownerDocument.body:e.body:ne(t)&&oe(t)?t:ge(t)}function ye(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=ge(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),u=Q(o);if(i){const e=be(u);return t.concat(u,u.visualViewport||[],oe(o)?o:[],e&&n?ye(e):[])}return t.concat(o,ye(o,[],n))}function be(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var xe=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"].join(","),we="undefined"==typeof Element,Ee=we?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Re=!we&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},Oe=function(e,t){var n;void 0===t&&(t=!0);var r=null==e||null===(n=e.getAttribute)||void 0===n?void 0:n.call(e,"inert");return""===r||"true"===r||t&&e&&("function"==typeof e.closest?e.closest("[inert]"):Oe(e.parentNode))},Ce=function(e,t,n){if(Oe(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(xe));return t&&Ee.call(e,xe)&&r.unshift(e),r.filter(n)},Se=function(e,t,n){for(var r=[],o=Array.from(e);o.length;){var i=o.shift();if(!Oe(i,!1))if("SLOT"===i.tagName){var u=i.assignedElements(),c=u.length?u:i.children,l=Se(c,!0,n);n.flatten?r.push.apply(r,l):r.push({scopeParent:i,candidates:l})}else{Ee.call(i,xe)&&n.filter(i)&&(t||!e.includes(i))&&r.push(i);var s=i.shadowRoot||"function"==typeof n.getShadowRoot&&n.getShadowRoot(i),a=!Oe(s,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(i));if(s&&a){var f=Se(!0===s?i.children:s.children,!0,n);n.flatten?r.push.apply(r,f):r.push({scopeParent:i,candidates:f})}else o.unshift.apply(o,i.children)}}return r},_e=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},je=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n}(e))&&!_e(e)?0:e.tabIndex},Ae=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},ke=function(e){return"INPUT"===e.tagName},Le=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},Te=function(e,t){return!(t.disabled||function(e){return ke(e)&&"hidden"===e.type}(t)||function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("full-native"===n&&"checkVisibility"in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if("hidden"===getComputedStyle(e).visibility)return!0;var o=Ee.call(e,"details>summary:first-of-type")?e.parentElement:e;if(Ee.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"full-native"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return Le(e)}else{if("function"==typeof r){for(var i=e;e;){var u=e.parentElement,c=Re(e);if(u&&!u.shadowRoot&&!0===r(u))return Le(e);e=e.assignedSlot?e.assignedSlot:u||c===e.ownerDocument?u:c.host}e=i}if(function(e){var t,n,r,o,i=e&&Re(e),u=null===(t=i)||void 0===t?void 0:t.host,c=!1;if(i&&i!==e)for(c=!!(null!==(n=u)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(u)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!c&&u;){var l,s,a;c=!(null===(s=u=null===(l=i=Re(u))||void 0===l?void 0:l.host)||void 0===s||null===(a=s.ownerDocument)||void 0===a||!a.contains(u))}return c}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some(function(e){return"SUMMARY"===e.tagName})}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!Ee.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},Pe=function(e,t){return!(function(e){return function(e){return ke(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||Re(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!o||o===e}(e)}(t)||je(t)<0||!Te(e,t))},Me=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},De=function(e){var t=[],n=[];return e.forEach(function(e,r){var o=!!e.scopeParent,i=o?e.scopeParent:e,u=function(e,t){var n=je(e);return n<0&&t&&!_e(e)?0:n}(i,o),c=o?De(e.candidates):i;0===u?o?t.push.apply(t,c):t.push(i):n.push({documentOrder:r,tabIndex:u,item:e,isScope:o,content:c})}),n.sort(Ae).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},$e=function(e,t){var n;return n=(t=t||{}).getShadowRoot?Se([e],t.includeContainer,{filter:Pe.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Me}):Ce(e,t.includeContainer,Pe.bind(null,t)),De(n)},Ie=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==Ee.call(e,xe)&&Pe(t,e)};function Ne(){const e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}function Fe(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+"/"+n}).join(" "):navigator.userAgent}function We(){return/apple/i.test(navigator.vendor)}function He(){const e=/android/i;return e.test(Ne())||e.test(Fe())}function ze(){return Fe().includes("jsdom/")}const Be="data-floating-ui-focusable";function Ue(e){let t=e.activeElement;for(;null!=(null==(n=t)||null==(n=n.shadowRoot)?void 0:n.activeElement);){var n;t=t.shadowRoot.activeElement}return t}function Ke(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&re(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Ve(e){return"composedPath"in e?e.composedPath()[0]:e.target}function qe(e,t){if(null==t)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return null!=n.target&&t.contains(n.target)}function Xe(e){return(null==e?void 0:e.ownerDocument)||document}function Ye(e){return ne(e)&&e.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])")}function Ge(e){return!!e&&"combobox"===e.getAttribute("role")&&Ye(e)}function Ze(e){return e?e.hasAttribute(Be)?e:e.querySelector("["+Be+"]")||e:null}function Qe(e,t,n){return void 0===n&&(n=!0),e.filter(e=>{var r;return e.parentId===t&&(!n||(null==(r=e.context)?void 0:r.open))}).flatMap(t=>[t,...Qe(e,t.id,n)])}function Je(e,t){var n;let r=[],o=null==(n=e.find(e=>e.id===t))?void 0:n.parentId;for(;o;){const t=e.find(e=>e.id===o);o=null==t?void 0:t.parentId,t&&(r=r.concat(t))}return r}function et(e){e.preventDefault(),e.stopPropagation()}function tt(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var nt="undefined"!=typeof document?A.useLayoutEffect:function(){};function rt(e){const t=A.useRef(e);return nt(()=>{t.current=e}),t}const ot={...A}.useInsertionEffect||(e=>e());function it(e){const t=A.useRef(()=>{});return ot(()=>{t.current=e}),A.useCallback(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)},[])}const ut=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function ct(e,t){const n=$e(e,ut()),r=n.length;if(0===r)return;const o=Ue(Xe(e)),i=n.indexOf(o);return n[-1===i?1===t?0:r-1:i+t]}function lt(e){return ct(Xe(e).body,1)||e}function st(e){return ct(Xe(e).body,-1)||e}function at(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Ke(n,r)}function ft(e){$e(e,ut()).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})}function dt(e){e.querySelectorAll("[data-tabindex]").forEach(e=>{const t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")})}var pt=d(289);const vt=["start","end"],mt=["top","right","bottom","left"].reduce((e,t)=>e.concat(t,t+"-"+vt[0],t+"-"+vt[1]),[]),ht=Math.min,gt=Math.max,yt=Math.round,bt=Math.floor,xt=e=>({x:e,y:e}),wt={left:"right",right:"left",bottom:"top",top:"bottom"};function Et(e,t,n){return gt(e,ht(t,n))}function Rt(e,t){return"function"==typeof e?e(t):e}function Ot(e){return e.split("-")[0]}function Ct(e){return e.split("-")[1]}function St(e){return"x"===e?"y":"x"}function _t(e){return"y"===e?"height":"width"}function jt(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function At(e){return St(jt(e))}function kt(e,t,n){void 0===n&&(n=!1);const r=Ct(e),o=At(e),i=_t(o);let u="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(u=$t(u)),[u,$t(u)]}function Lt(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Tt=["left","right"],Pt=["right","left"],Mt=["top","bottom"],Dt=["bottom","top"];function $t(e){const t=Ot(e);return wt[t]+e.slice(t.length)}function It(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Nt(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Ft(e,t,n){let{reference:r,floating:o}=e;const i=jt(t),u=At(t),c=_t(u),l=Ot(t),s="y"===i,a=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,d=r[c]/2-o[c]/2;let p;switch(l){case"top":p={x:a,y:r.y-o.height};break;case"bottom":p={x:a,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-o.width,y:f};break;default:p={x:r.x,y:r.y}}switch(Ct(t)){case"start":p[u]-=d*(n&&s?-1:1);break;case"end":p[u]+=d*(n&&s?-1:1)}return p}async function Wt(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:u,elements:c,strategy:l}=e,{boundary:s="clippingAncestors",rootBoundary:a="viewport",elementContext:f="floating",altBoundary:d=!1,padding:p=0}=Rt(t,e),v=It(p),m=c[d?"floating"===f?"reference":"floating":f],h=Nt(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(c.floating)),boundary:s,rootBoundary:a,strategy:l})),g="floating"===f?{x:r,y:o,width:u.floating.width,height:u.floating.height}:u.reference,y=await(null==i.getOffsetParent?void 0:i.getOffsetParent(c.floating)),b=await(null==i.isElement?void 0:i.isElement(y))&&await(null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},x=Nt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:g,offsetParent:y,strategy:l}):g);return{top:(h.top-x.top+v.top)/b.y,bottom:(x.bottom-h.bottom+v.bottom)/b.y,left:(h.left-x.left+v.left)/b.x,right:(x.right-h.right+v.right)/b.x}}const Ht=new Set(["left","top"]);function zt(e){const t=ve(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ne(e),i=o?e.offsetWidth:n,u=o?e.offsetHeight:r,c=yt(n)!==i||yt(r)!==u;return c&&(n=i,r=u),{width:n,height:r,$:c}}function Bt(e){return te(e)?e:e.contextElement}function Ut(e){const t=Bt(e);if(!ne(t))return xt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=zt(t);let u=(i?yt(n.width):n.width)/r,c=(i?yt(n.height):n.height)/o;return u&&Number.isFinite(u)||(u=1),c&&Number.isFinite(c)||(c=1),{x:u,y:c}}const Kt=xt(0);function Vt(e){const t=Q(e);return de()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Kt}function qt(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=Bt(e);let u=xt(1);t&&(r?te(r)&&(u=Ut(r)):u=Ut(e));const c=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Q(e))&&t}(i,n,r)?Vt(i):xt(0);let l=(o.left+c.x)/u.x,s=(o.top+c.y)/u.y,a=o.width/u.x,f=o.height/u.y;if(i){const e=Q(i),t=r&&te(r)?Q(r):r;let n=e,o=be(n);for(;o&&r&&t!==n;){const e=Ut(o),t=o.getBoundingClientRect(),r=ve(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,u=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,s*=e.y,a*=e.x,f*=e.y,l+=i,s+=u,n=Q(o),o=be(n)}}return Nt({width:a,height:f,x:l,y:s})}function Xt(e,t){const n=me(e).scrollLeft;return t?t.left+n:qt(J(e)).left+n}function Yt(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Xt(e,n),y:n.top+t.scrollTop}}function Gt(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=Q(e),r=J(e),o=n.visualViewport;let i=r.clientWidth,u=r.clientHeight,c=0,l=0;if(o){i=o.width,u=o.height;const e=de();(!e||e&&"fixed"===t)&&(c=o.offsetLeft,l=o.offsetTop)}const s=Xt(r);if(s<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,u=Math.abs(r.clientWidth-t.clientWidth-o);u<=25&&(i-=u)}else s<=25&&(i+=s);return{width:i,height:u,x:c,y:l}}(e,n);else if("document"===t)r=function(e){const t=J(e),n=me(e),r=e.ownerDocument.body,o=gt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=gt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+Xt(e);const c=-n.scrollTop;return"rtl"===ve(r).direction&&(u+=gt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:u,y:c}}(J(e));else if(te(t))r=function(e,t){const n=qt(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=ne(e)?Ut(e):xt(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=Vt(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Nt(r)}function Zt(e,t){const n=he(e);return!(n===t||!te(n)||pe(n))&&("fixed"===ve(n).position||Zt(n,t))}function Qt(e,t,n){const r=ne(t),o=J(t),i="fixed"===n,u=qt(e,!0,i,t);let c={scrollLeft:0,scrollTop:0};const l=xt(0);function s(){l.x=Xt(o)}if(r||!r&&!i)if(("body"!==Z(t)||oe(o))&&(c=me(t)),r){const e=qt(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&s();i&&!r&&o&&s();const a=!o||r||i?xt(0):Yt(o,c);return{x:u.left+c.scrollLeft-l.x-a.x,y:u.top+c.scrollTop-l.y-a.y,width:u.width,height:u.height}}function Jt(e){return"static"===ve(e).position}function en(e,t){if(!ne(e)||"fixed"===ve(e).position)return null;if(t)return t(e);let n=e.offsetParent;return J(e)===n&&(n=n.ownerDocument.body),n}function tn(e,t){const n=Q(e);if(ue(e))return n;if(!ne(e)){let t=he(e);for(;t&&!pe(t);){if(te(t)&&!Jt(t))return t;t=he(t)}return n}let r=en(e,t);for(;r&&ie(r)&&Jt(r);)r=en(r,t);return r&&pe(r)&&Jt(r)&&!fe(r)?n:r||function(e){let t=he(e);for(;ne(t)&&!pe(t);){if(fe(t))return t;if(ue(t))return null;t=he(t)}return null}(e)||n}const nn={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,u=J(r),c=!!t&&ue(t.floating);if(r===u||c&&i)return n;let l={scrollLeft:0,scrollTop:0},s=xt(1);const a=xt(0),f=ne(r);if((f||!f&&!i)&&(("body"!==Z(r)||oe(u))&&(l=me(r)),f)){const e=qt(r);s=Ut(r),a.x=e.x+r.clientLeft,a.y=e.y+r.clientTop}const d=!u||f||i?xt(0):Yt(u,l);return{width:n.width*s.x,height:n.height*s.y,x:n.x*s.x-l.scrollLeft*s.x+a.x+d.x,y:n.y*s.y-l.scrollTop*s.y+a.y+d.y}},getDocumentElement:J,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?ue(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=ye(e,[],!1).filter(e=>te(e)&&"body"!==Z(e)),o=null;const i="fixed"===ve(e).position;let u=i?he(e):e;for(;te(u)&&!pe(u);){const t=ve(u),n=fe(u);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&("absolute"===o.position||"fixed"===o.position)||oe(u)&&!n&&Zt(e,u))?r=r.filter(e=>e!==u):o=t,u=he(u)}return t.set(e,r),r}(t,this._c):[].concat(n),r],u=Gt(t,i[0],o);let c=u.top,l=u.right,s=u.bottom,a=u.left;for(let e=1;e<i.length;e++){const n=Gt(t,i[e],o);c=gt(n.top,c),l=ht(n.right,l),s=ht(n.bottom,s),a=gt(n.left,a)}return{width:l-a,height:s-c,x:a,y:c}},getOffsetParent:tn,getElementRects:async function(e){const t=this.getOffsetParent||tn,n=this.getDimensions,r=await n(e.floating);return{reference:Qt(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=zt(e);return{width:t,height:n}},getScale:Ut,isElement:te,isRTL:function(e){return"rtl"===ve(e).direction}};function rn(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}const on=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:u,initialPlacement:c,platform:l,elements:s}=t,{mainAxis:a=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:m=!0,...h}=Rt(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const g=Ot(o),y=jt(c),b=Ot(c)===c,x=await(null==l.isRTL?void 0:l.isRTL(s.floating)),w=d||(b||!m?[$t(c)]:function(e){const t=$t(e);return[Lt(e),t,Lt(t)]}(c)),E="none"!==v;!d&&E&&w.push(...function(e,t,n,r){const o=Ct(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?Pt:Tt:t?Tt:Pt;case"left":case"right":return t?Mt:Dt;default:return[]}}(Ot(e),"start"===n,r);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(Lt)))),i}(c,m,v,x));const R=[c,...w],O=await l.detectOverflow(t,h),C=[];let S=(null==(r=i.flip)?void 0:r.overflows)||[];if(a&&C.push(O[g]),f){const e=kt(o,u,x);C.push(O[e[0]],O[e[1]])}if(S=[...S,{placement:o,overflows:C}],!C.every(e=>e<=0)){var _,j;const e=((null==(_=i.flip)?void 0:_.index)||0)+1,t=R[e];if(t&&("alignment"!==f||y===jt(t)||S.every(e=>jt(e.placement)!==y||e.overflows[0]>0)))return{data:{index:e,overflows:S},reset:{placement:t}};let n=null==(j=S.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:j.placement;if(!n)switch(p){case"bestFit":{var A;const e=null==(A=S.filter(e=>{if(E){const t=jt(e.placement);return t===y||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:A[0];e&&(n=e);break}case"initialPlacement":n=c}if(o!==n)return{reset:{placement:n}}}return{}}}},un=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:u,elements:c,middlewareData:l}=t,{element:s,padding:a=0}=Rt(e,t)||{};if(null==s)return{};const f=It(a),d={x:n,y:r},p=At(o),v=_t(p),m=await u.getDimensions(s),h="y"===p,g=h?"top":"left",y=h?"bottom":"right",b=h?"clientHeight":"clientWidth",x=i.reference[v]+i.reference[p]-d[p]-i.floating[v],w=d[p]-i.reference[p],E=await(null==u.getOffsetParent?void 0:u.getOffsetParent(s));let R=E?E[b]:0;R&&await(null==u.isElement?void 0:u.isElement(E))||(R=c.floating[b]||i.floating[v]);const O=x/2-w/2,C=R/2-m[v]/2-1,S=ht(f[g],C),_=ht(f[y],C),j=S,A=R-m[v]-_,k=R/2-m[v]/2+O,L=Et(j,k,A),T=!l.arrow&&null!=Ct(o)&&k!==L&&i.reference[v]/2-(k<j?S:_)-m[v]/2<0,P=T?k<j?k-j:k-A:0;return{[p]:d[p]+P,data:{[p]:L,centerOffset:k-L-P,...T&&{alignmentOffset:P}},reset:T}}}),cn=(e,t,n)=>{const r=new Map,o={platform:nn,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:u}=n,c=u.detectOverflow?u:{...u,detectOverflow:Wt},l=await(null==u.isRTL?void 0:u.isRTL(t));let s=await u.getElementRects({reference:e,floating:t,strategy:o}),{x:a,y:f}=Ft(s,r,l),d=r,p=0;const v={};for(let n=0;n<i.length;n++){const m=i[n];if(!m)continue;const{name:h,fn:g}=m,{x:y,y:b,data:x,reset:w}=await g({x:a,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:v,rects:s,platform:c,elements:{reference:e,floating:t}});a=null!=y?y:a,f=null!=b?b:f,v[h]={...v[h],...x},w&&p<50&&(p++,"object"==typeof w&&(w.placement&&(d=w.placement),w.rects&&(s=!0===w.rects?await u.getElementRects({reference:e,floating:t,strategy:o}):w.rects),({x:a,y:f}=Ft(s,d,l))),n=-1)}return{x:a,y:f,placement:d,strategy:o,middlewareData:v}})(e,t,{...o,platform:i})};var ln="undefined"!=typeof document?A.useLayoutEffect:function(){};function sn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!==r--;)if(!sn(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!==r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||sn(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function an(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function fn(e,t){const n=an(e);return Math.round(t*n)/n}function dn(e){const t=A.useRef(e);return ln(()=>{t.current=e}),t}const pn="data-floating-ui-focusable",vn="active",mn="selected",hn={...A};let gn=!1,yn=0;const bn=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+yn++,xn=hn.useId||function(){const[e,t]=A.useState(()=>gn?bn():void 0);return nt(()=>{null==e&&t(bn())},[]),A.useEffect(()=>{gn=!0},[]),e},wn=A.forwardRef(function(e,t){const{context:{placement:n,elements:{floating:r},middlewareData:{arrow:o,shift:i}},width:u=14,height:c=7,tipRadius:l=0,strokeWidth:s=0,staticOffset:a,stroke:f,d,style:{transform:p,...v}={},...m}=e,h=xn(),[g,y]=A.useState(!1);if(nt(()=>{r&&"rtl"===ve(r).direction&&y(!0)},[r]),!r)return null;const[b,x]=n.split("-"),w="top"===b||"bottom"===b;let E=a;(w&&null!=i&&i.x||!w&&null!=i&&i.y)&&(E=null);const R=2*s,O=R/2,C=u/2*(l/-8+1),S=c/2*l/4,_=!!d,k=E&&"end"===x?"bottom":"top";let L=E&&"end"===x?"right":"left";E&&g&&(L="end"===x?"left":"right");const T=null!=(null==o?void 0:o.x)?E||o.x:"",P=null!=(null==o?void 0:o.y)?E||o.y:"",M=d||"M0,0 H"+u+" L"+(u-C)+","+(c-S)+" Q"+u/2+","+c+" "+C+","+(c-S)+" Z",D={top:_?"rotate(180deg)":"",left:_?"rotate(90deg)":"rotate(-90deg)",bottom:_?"":"rotate(180deg)",right:_?"rotate(-90deg)":"rotate(90deg)"}[b];return(0,j.jsxs)("svg",{...m,"aria-hidden":!0,ref:t,width:_?u:u+R,height:u,viewBox:"0 0 "+u+" "+(c>u?c:u),style:{position:"absolute",pointerEvents:"none",[L]:T,[k]:P,[b]:w||_?"100%":"calc(100% - "+R/2+"px)",transform:[D,p].filter(e=>!!e).join(" "),...v},children:[R>0&&(0,j.jsx)("path",{clipPath:"url(#"+h+")",fill:"none",stroke:f,strokeWidth:R+(d?0:1),d:M}),(0,j.jsx)("path",{stroke:R&&!d?m.fill:"none",d:M}),(0,j.jsx)("clipPath",{id:h,children:(0,j.jsx)("rect",{x:-O,y:O*(_?-1:1),width:u+R,height:u})})]})});function En(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;null==(r=e.get(t))||r.delete(n)}}}const Rn=A.createContext(null),On=A.createContext(null),Cn=()=>{var e;return(null==(e=A.useContext(Rn))?void 0:e.id)||null},Sn=()=>A.useContext(On);function _n(e){const{children:t,id:n}=e,r=Cn();return(0,j.jsx)(Rn.Provider,{value:A.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function jn(e){const{children:t}=e,n=A.useRef([]),r=A.useCallback(e=>{n.current=[...n.current,e]},[]),o=A.useCallback(e=>{n.current=n.current.filter(t=>t!==e)},[]),[i]=A.useState(()=>En());return(0,j.jsx)(On.Provider,{value:A.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i]),children:t})}function An(e){return"data-floating-ui-"+e}function kn(e){-1!==e.current&&(clearTimeout(e.current),e.current=-1)}const Ln=An("safe-polygon");function Tn(e,t,n){if(n&&!tt(n))return 0;if("number"==typeof e)return e;if("function"==typeof e){const n=e();return"number"==typeof n?n:null==n?void 0:n[t]}return null==e?void 0:e[t]}function Pn(e){return"function"==typeof e?e():e}let Mn=0;function Dn(e,t){void 0===t&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Mn);const i=()=>null==e?void 0:e.focus({preventScroll:n});o?i():Mn=requestAnimationFrame(i)}function $n(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&re(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}const In={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function Nn(e){return"inert"===e?In.inert:"aria-hidden"===e?In["aria-hidden"]:In.none}let Fn=new WeakSet,Wn={},Hn=0;function zn(e){return e?re(e)?e.host:zn(e.parentNode):null}const Bn=(e,t)=>t.map(t=>{if(e.contains(t))return t;const n=zn(t);return e.contains(n)?n:null}).filter(e=>null!=e);function Un(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=(o=e[0],(null==o?void 0:o.ownerDocument)||document).body;var o;return function(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,u=Bn(t,e),c=new Set,l=new Set(u),s=[];Wn[o]||(Wn[o]=new WeakMap);const a=Wn[o];return u.forEach(function e(t){t&&!c.has(t)&&(c.add(t),t.parentNode&&e(t.parentNode))}),function e(t){t&&!l.has(t)&&[].forEach.call(t.children,t=>{if("script"!==Z(t))if(c.has(t))e(t);else{const e=i?t.getAttribute(i):null,n=null!==e&&"false"!==e,r=Nn(i),u=(r.get(t)||0)+1,c=(a.get(t)||0)+1;r.set(t,u),a.set(t,c),s.push(t),1===u&&n&&Fn.add(t),1===c&&t.setAttribute(o,""),!n&&i&&t.setAttribute(i,"inert"===i?"":"true")}})}(t),c.clear(),Hn++,()=>{s.forEach(e=>{const t=Nn(i),n=(t.get(e)||0)-1,r=(a.get(e)||0)-1;t.set(e,n),a.set(e,r),n||(!Fn.has(e)&&i&&e.removeAttribute(i),Fn.delete(e)),r||e.removeAttribute(o)}),Hn--,Hn||(In.inert=new WeakMap,In["aria-hidden"]=new WeakMap,In.none=new WeakMap,Fn=new WeakSet,Wn={})}}(e.concat(Array.from(r.querySelectorAll('[aria-live],[role="status"],output'))),r,t,n)}const Kn={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},Vn=A.forwardRef(function(e,t){const[n,r]=A.useState();nt(()=>{We()&&r("button")},[]);const o={ref:t,tabIndex:0,role:n,"aria-hidden":!n||void 0,[An("focus-guard")]:"",style:Kn};return(0,j.jsx)("span",{...e,...o})}),qn={clipPath:"inset(50%)",position:"fixed",top:0,left:0},Xn=A.createContext(null),Yn=An("portal");function Gn(e){const{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,i=function(e){void 0===e&&(e={});const{id:t,root:n}=e,r=xn(),o=Zn(),[i,u]=A.useState(null),c=A.useRef(null);return nt(()=>()=>{null==i||i.remove(),queueMicrotask(()=>{c.current=null})},[i]),nt(()=>{if(!r)return;if(c.current)return;const e=t?document.getElementById(t):null;if(!e)return;const n=document.createElement("div");n.id=r,n.setAttribute(Yn,""),e.appendChild(n),c.current=n,u(n)},[t,r]),nt(()=>{if(null===n)return;if(!r)return;if(c.current)return;let e=n||(null==o?void 0:o.portalNode);e&&!ee(e)&&(e=e.current),e=e||document.body;let i=null;t&&(i=document.createElement("div"),i.id=t,e.appendChild(i));const l=document.createElement("div");l.id=r,l.setAttribute(Yn,""),e=i||e,e.appendChild(l),c.current=l,u(l)},[t,n,r,o]),i}({id:n,root:r}),[u,c]=A.useState(null),l=A.useRef(null),s=A.useRef(null),a=A.useRef(null),f=A.useRef(null),d=null==u?void 0:u.modal,p=null==u?void 0:u.open,v=!!u&&!u.modal&&u.open&&o&&!(!r&&!i);return A.useEffect(()=>{if(i&&o&&!d)return i.addEventListener("focusin",e,!0),i.addEventListener("focusout",e,!0),()=>{i.removeEventListener("focusin",e,!0),i.removeEventListener("focusout",e,!0)};function e(e){i&&at(e)&&("focusin"===e.type?dt:ft)(i)}},[i,o,d]),A.useEffect(()=>{i&&(p||dt(i))},[p,i]),(0,j.jsxs)(Xn.Provider,{value:A.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:s,beforeInsideRef:a,afterInsideRef:f,portalNode:i,setFocusManagerState:c}),[o,i]),children:[v&&i&&(0,j.jsx)(Vn,{"data-type":"outside",ref:l,onFocus:e=>{if(at(e,i)){var t;null==(t=a.current)||t.focus()}else{const e=st(u?u.domReference:null);null==e||e.focus()}}}),v&&i&&(0,j.jsx)("span",{"aria-owns":i.id,style:qn}),i&&pt.createPortal(t,i),v&&i&&(0,j.jsx)(Vn,{"data-type":"outside",ref:s,onFocus:e=>{if(at(e,i)){var t;null==(t=f.current)||t.focus()}else{const t=lt(u?u.domReference:null);null==t||t.focus(),(null==u?void 0:u.closeOnFocusOut)&&(null==u||u.onOpenChange(!1,e.nativeEvent,"focus-out"))}}})]})}const Zn=()=>A.useContext(Xn);function Qn(e){return A.useMemo(()=>t=>{e.forEach(e=>{e&&(e.current=t)})},e)}let Jn=[];function er(){Jn=Jn.filter(e=>{var t;return null==(t=e.deref())?void 0:t.isConnected})}function tr(){er();const e=Jn[Jn.length-1];return null==e?void 0:e.deref()}function nr(e,t){var n;if(!(t.current.includes("floating")||null!=(n=e.getAttribute("role"))&&n.includes("dialog")))return;const r=ut(),o=function(e,t){return(t=t||{}).getShadowRoot?Se([e],t.includeContainer,{filter:Te.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):Ce(e,t.includeContainer,Te.bind(null,t))}(e,r),i=o.filter(e=>{const t=e.getAttribute("data-tabindex")||"";return Ie(e,r)||e.hasAttribute("data-tabindex")&&!t.startsWith("-")}),u=e.getAttribute("tabindex");t.current.includes("floating")||0===i.length?"0"!==u&&e.setAttribute("tabindex","0"):("-1"!==u||e.hasAttribute("data-tabindex")&&"-1"!==e.getAttribute("data-tabindex"))&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}const rr=A.forwardRef(function(e,t){return(0,j.jsx)("button",{...e,type:"button",ref:t,tabIndex:-1,style:Kn})});function or(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:u=0,returnFocus:c=!0,restoreFocus:l=!1,modal:s=!0,visuallyHiddenDismiss:a=!1,closeOnFocusOut:f=!0,outsideElementsInert:d=!1,getInsideElements:p=()=>[]}=e,{open:v,onOpenChange:m,events:h,dataRef:g,elements:{domReference:y,floating:b}}=t,x=it(()=>{var e;return null==(e=g.current.floatingContext)?void 0:e.nodeId}),w=it(p),E="number"==typeof u&&u<0,R=Ge(y)&&E,O="undefined"!=typeof HTMLElement&&"inert"in HTMLElement.prototype,C=!O||i,S=!C||O&&d,_=rt(o),k=rt(u),L=rt(c),T=Sn(),P=Zn(),M=A.useRef(null),D=A.useRef(null),$=A.useRef(!1),I=A.useRef(!1),N=A.useRef(-1),F=A.useRef(-1),W=null!=P,H=Ze(b),z=it(function(e){return void 0===e&&(e=H),e?$e(e,ut()):[]}),B=it(e=>{const t=z(e);return _.current.map(e=>y&&"reference"===e?y:H&&"floating"===e?H:t).filter(Boolean).flat()});A.useEffect(()=>{if(r)return;if(!s)return;function e(e){if("Tab"===e.key){Ke(H,Ue(Xe(H)))&&0===z().length&&!R&&et(e);const t=B(),n=Ve(e);"reference"===_.current[0]&&n===y&&(et(e),e.shiftKey?Dn(t[t.length-1]):Dn(t[1])),"floating"===_.current[1]&&n===H&&e.shiftKey&&(et(e),Dn(t[0]))}}const t=Xe(H);return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}},[r,y,H,s,_,R,z,B]),A.useEffect(()=>{if(!r&&b)return b.addEventListener("focusin",e),()=>{b.removeEventListener("focusin",e)};function e(e){const t=Ve(e),n=z().indexOf(t);-1!==n&&(N.current=n)}},[r,b,z]),A.useEffect(()=>{if(r)return;if(!f)return;function e(){I.current=!0,setTimeout(()=>{I.current=!1})}function t(e){const t=e.relatedTarget,n=e.currentTarget,r=Ve(e);queueMicrotask(()=>{const o=x(),i=!(Ke(y,t)||Ke(b,t)||Ke(t,b)||Ke(null==P?void 0:P.portalNode,t)||null!=t&&t.hasAttribute(An("focus-guard"))||T&&(Qe(T.nodesRef.current,o).find(e=>{var n,r;return Ke(null==(n=e.context)?void 0:n.elements.floating,t)||Ke(null==(r=e.context)?void 0:r.elements.domReference,t)})||Je(T.nodesRef.current,o).find(e=>{var n,r,o;return[null==(n=e.context)?void 0:n.elements.floating,Ze(null==(r=e.context)?void 0:r.elements.floating)].includes(t)||(null==(o=e.context)?void 0:o.elements.domReference)===t})));if(n===y&&H&&nr(H,_),l&&n!==y&&(null==r||!r.isConnected)&&Ue(Xe(H))===Xe(H).body){ne(H)&&H.focus();const e=N.current,t=z(),n=t[e]||t[t.length-1]||H;ne(n)&&n.focus()}g.current.insideReactTree?g.current.insideReactTree=!1:!R&&s||!t||!i||I.current||t===tr()||($.current=!0,m(!1,e,"focus-out"))})}const n=Boolean(!T&&P);function o(){kn(F),g.current.insideReactTree=!0,F.current=window.setTimeout(()=>{g.current.insideReactTree=!1})}return b&&ne(y)?(y.addEventListener("focusout",t),y.addEventListener("pointerdown",e),b.addEventListener("focusout",t),n&&b.addEventListener("focusout",o,!0),()=>{y.removeEventListener("focusout",t),y.removeEventListener("pointerdown",e),b.removeEventListener("focusout",t),n&&b.removeEventListener("focusout",o,!0)}):void 0},[r,y,b,H,s,T,P,m,f,l,z,R,x,_,g]);const U=A.useRef(null),K=A.useRef(null),V=Qn([U,null==P?void 0:P.beforeInsideRef]),q=Qn([K,null==P?void 0:P.afterInsideRef]);function X(e){return!r&&a&&s?(0,j.jsx)(rr,{ref:"start"===e?M:D,onClick:e=>m(!1,e.nativeEvent),children:"string"==typeof a?a:"Dismiss"}):null}A.useEffect(()=>{var e,t;if(r)return;if(!b)return;const n=Array.from((null==P||null==(e=P.portalNode)?void 0:e.querySelectorAll("["+An("portal")+"]"))||[]),o=null==(t=(T?Je(T.nodesRef.current,x()):[]).find(e=>{var t;return Ge((null==(t=e.context)?void 0:t.elements.domReference)||null)}))||null==(t=t.context)?void 0:t.elements.domReference,i=[b,o,...n,...w(),M.current,D.current,U.current,K.current,null==P?void 0:P.beforeOutsideRef.current,null==P?void 0:P.afterOutsideRef.current,_.current.includes("reference")||R?y:null].filter(e=>null!=e),u=s||R?Un(i,!S,S):Un(i);return()=>{u()}},[r,y,b,s,_,P,R,C,S,T,x,w]),nt(()=>{if(r||!ne(H))return;const e=Ue(Xe(H));queueMicrotask(()=>{const t=B(H),n=k.current,r=("number"==typeof n?t[n]:n.current)||H,o=Ke(H,e);E||o||!v||Dn(r,{preventScroll:r===H})})},[r,v,H,E,B,k]),nt(()=>{if(r||!H)return;const e=Xe(H);var t;function n(e){let{reason:t,event:n,nested:r}=e;if(["hover","safe-polygon"].includes(t)&&"mouseleave"===n.type&&($.current=!0),"outside-press"===t)if(r)$.current=!1;else if(function(e){return!(0!==e.mozInputSource||!e.isTrusted)||(He()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}(n)||function(e){return!ze()&&(!He()&&0===e.width&&0===e.height||He()&&1===e.width&&1===e.height&&0===e.pressure&&0===e.detail&&"mouse"===e.pointerType||e.width<1&&e.height<1&&0===e.pressure&&0===e.detail&&"touch"===e.pointerType)}(n))$.current=!1;else{let e=!1;document.createElement("div").focus({get preventScroll(){return e=!0,!1}}),$.current=!e}}t=Ue(e),er(),t&&"body"!==Z(t)&&(Jn.push(new WeakRef(t)),Jn.length>20&&(Jn=Jn.slice(-20))),h.on("openchange",n);const o=e.createElement("span");return o.setAttribute("tabindex","-1"),o.setAttribute("aria-hidden","true"),Object.assign(o.style,Kn),W&&y&&y.insertAdjacentElement("afterend",o),()=>{h.off("openchange",n);const t=Ue(e),r=Ke(b,t)||T&&Qe(T.nodesRef.current,x(),!1).some(e=>{var n;return Ke(null==(n=e.context)?void 0:n.elements.floating,t)}),i=function(){if("boolean"==typeof L.current){const e=y||tr();return e&&e.isConnected?e:o}return L.current.current||o}();queueMicrotask(()=>{const n=function(e){const t=ut();return Ie(e,t)?e:$e(e,t)[0]||e}(i);L.current&&!$.current&&ne(n)&&(n===t||t===e.body||r)&&n.focus({preventScroll:!0}),o.remove()})}},[r,b,H,L,g,h,T,W,y,x]),A.useEffect(()=>(queueMicrotask(()=>{$.current=!1}),()=>{queueMicrotask(er)}),[r]),nt(()=>{if(!r&&P)return P.setFocusManagerState({modal:s,closeOnFocusOut:f,open:v,onOpenChange:m,domReference:y}),()=>{P.setFocusManagerState(null)}},[r,P,s,v,m,f,y]),nt(()=>{r||H&&nr(H,_)},[r,H,_]);const Y=!r&&C&&(!s||!R)&&(W||s);return(0,j.jsxs)(j.Fragment,{children:[Y&&(0,j.jsx)(Vn,{"data-type":"inside",ref:V,onFocus:e=>{if(s){const e=B();Dn("reference"===o[0]?e[0]:e[e.length-1])}else if(null!=P&&P.preserveTabOrder&&P.portalNode)if($.current=!1,at(e,P.portalNode)){const e=lt(y);null==e||e.focus()}else{var t;null==(t=P.beforeOutsideRef.current)||t.focus()}}}),!R&&X("start"),n,X("end"),Y&&(0,j.jsx)(Vn,{"data-type":"inside",ref:q,onFocus:e=>{if(s)Dn(B()[0]);else if(null!=P&&P.preserveTabOrder&&P.portalNode)if(f&&($.current=!0),at(e,P.portalNode)){const e=st(y);null==e||e.focus()}else{var t;null==(t=P.afterOutsideRef.current)||t.focus()}}})]})}function ir(e){return ne(e.target)&&"BUTTON"===e.target.tagName}function ur(e){return Ye(e)}function cr(e){return null!=e&&null!=e.clientX}const lr={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},sr={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},ar=e=>{var t,n;return{escapeKey:"boolean"==typeof e?e:null!=(t=null==e?void 0:e.escapeKey)&&t,outsidePress:"boolean"==typeof e?e:null==(n=null==e?void 0:e.outsidePress)||n}};function fr(){return Ne().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints&&We()}function dr(e,t,n){const r=new Map,o="item"===n;let i=e;if(o&&e){const{[vn]:t,[mn]:n,...r}=e;i=r}return{..."floating"===n&&{tabIndex:-1,[pn]:""},...i,...t.map(t=>{const r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r}).concat(e).reduce((e,t)=>t?(Object.entries(t).forEach(t=>{let[n,i]=t;var u;o&&[vn,mn].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof i&&(null==(u=r.get(n))||u.push(i),e[n]=function(){for(var e,t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return null==(e=r.get(n))?void 0:e.map(e=>e(...o)).find(e=>void 0!==e)})):e[n]=i)}),e):e,{})}}const pr=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]),vr=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(e,t)=>(t?"-":"")+e.toLowerCase());function mr(e,t){return"function"==typeof e?e(t):e}function hr(e,t,n){return void 0===n&&(n=!0),e.filter(e=>{var r;return e.parentId===t&&(!n||(null==(r=e.context)?void 0:r.open))}).flatMap(t=>[t,...hr(e,t.id,n)])}function gr(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let e=0,u=i-1;e<i;u=e++){const[i,c]=t[e]||[0,0],[l,s]=t[u]||[0,0];c>=r!=s>=r&&n<=(l-i)*(r-c)/(s-c)+i&&(o=!o)}return o}function yr(e){void 0===e&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,o={current:-1};let i=!1,u=null,c=null,l="undefined"!=typeof performance?performance.now():0;const s=e=>{let{x:n,y:s,placement:a,elements:f,onClose:d,nodeId:p,tree:v}=e;return function(e){function m(){kn(o),d()}if(kn(o),!f.domReference||!f.floating||null==a||null==n||null==s)return;const{clientX:h,clientY:g}=e,y=[h,g],b=function(e){return"composedPath"in e?e.composedPath()[0]:e.target}(e),x="mouseleave"===e.type,w=$n(f.floating,b),E=$n(f.domReference,b),R=f.domReference.getBoundingClientRect(),O=f.floating.getBoundingClientRect(),C=a.split("-")[0],S=n>O.right-O.width/2,_=s>O.bottom-O.height/2,j=function(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}(y,R),A=O.width>R.width,k=O.height>R.height,L=(A?R:O).left,T=(A?R:O).right,P=(k?R:O).top,M=(k?R:O).bottom;if(w&&(i=!0,!x))return;if(E&&(i=!1),E&&!x)return void(i=!0);if(x&&te(e.relatedTarget)&&$n(f.floating,e.relatedTarget))return;if(v&&hr(v.nodesRef.current,p).length)return;if("top"===C&&s>=R.bottom-1||"bottom"===C&&s<=R.top+1||"left"===C&&n>=R.right-1||"right"===C&&n<=R.left+1)return m();let D=[];switch(C){case"top":D=[[L,R.top+1],[L,O.bottom-1],[T,O.bottom-1],[T,R.top+1]];break;case"bottom":D=[[L,O.top+1],[L,R.bottom-1],[T,R.bottom-1],[T,O.top+1]];break;case"left":D=[[O.right-1,M],[O.right-1,P],[R.left+1,P],[R.left+1,M]];break;case"right":D=[[R.right-1,M],[R.right-1,P],[O.left+1,P],[O.left+1,M]]}if(!gr([h,g],D)){if(i&&!j)return m();if(!x&&r){const t=function(e,t){const n=performance.now(),r=n-l;if(null===u||null===c||0===r)return u=e,c=t,l=n,null;const o=e-u,i=t-c,s=Math.sqrt(o*o+i*i);return u=e,c=t,l=n,s/r}(e.clientX,e.clientY);if(null!==t&&t<.1)return m()}gr([h,g],function(e){let[n,r]=e;switch(C){case"top":return[[A?n+t/2:S?n+4*t:n-4*t,r+t+1],[A?n-t/2:S?n+4*t:n-4*t,r+t+1],[O.left,S||A?O.bottom-t:O.top],[O.right,S?A?O.bottom-t:O.top:O.bottom-t]];case"bottom":return[[A?n+t/2:S?n+4*t:n-4*t,r-t],[A?n-t/2:S?n+4*t:n-4*t,r-t],[O.left,S||A?O.top+t:O.bottom],[O.right,S?A?O.top+t:O.bottom:O.top+t]];case"left":{const e=[n+t+1,k?r+t/2:_?r+4*t:r-4*t],o=[n+t+1,k?r-t/2:_?r+4*t:r-4*t];return[[_||k?O.right-t:O.left,O.top],[_?k?O.right-t:O.left:O.right-t,O.bottom],e,o]}case"right":return[[n-t,k?r+t/2:_?r+4*t:r-4*t],[n-t,k?r-t/2:_?r+4*t:r-4*t],[_||k?O.left+t:O.right,O.top],[_?k?O.left+t:O.right:O.left+t,O.bottom]]}}([n,s]))?!i&&r&&(o.current=window.setTimeout(m,40)):m()}}};return s.__options={blockPointerEvents:n},s}const br=({children:e,enabled:t=!0,...n})=>{const r=Cn();return!t||r?e:(0,j.jsx)(jn,{...n,children:e})},xr=s(_,({$width:e="max-content"})=>({$width:e}))``,wr=({children:e,enabled:t=!0,...n})=>t?(0,j.jsx)(Gn,{...n,children:e}):e;var Er={551(e,t,n){var r="Expected a function",o=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt,s="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,a="object"==typeof self&&self&&self.Object===Object&&self,f=s||a||Function("return this")(),d=Object.prototype.toString,p=Math.max,v=Math.min,m=function(){return f.Date.now()};function h(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==d.call(e)}(e))return NaN;if(h(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=h(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var n=u.test(e);return n||c.test(e)?l(e.slice(2),n?2:8):i.test(e)?NaN:+e}e.exports=function(e,t,n){var o=!0,i=!0;if("function"!=typeof e)throw new TypeError(r);return h(n)&&(o="leading"in n?!!n.leading:o,i="trailing"in n?!!n.trailing:i),function(e,t,n){var o,i,u,c,l,s,a=0,f=!1,d=!1,y=!0;if("function"!=typeof e)throw new TypeError(r);function b(t){var n=o,r=i;return o=i=void 0,a=t,c=e.apply(r,n)}function x(e){var n=e-s;return void 0===s||n>=t||n<0||d&&e-a>=u}function w(){var e=m();if(x(e))return E(e);l=setTimeout(w,function(e){var n=t-(e-s);return d?v(n,u-(e-a)):n}(e))}function E(e){return l=void 0,y&&o?b(e):(o=i=void 0,c)}function R(){var e=m(),n=x(e);if(o=arguments,i=this,s=e,n){if(void 0===l)return function(e){return a=e,l=setTimeout(w,t),f?b(e):c}(s);if(d)return l=setTimeout(w,t),b(s)}return void 0===l&&(l=setTimeout(w,t)),c}return t=g(t)||0,h(n)&&(f=!!n.leading,u=(d="maxWait"in n)?p(g(n.maxWait)||0,t):u,y="trailing"in n?!!n.trailing:y),R.cancel=function(){void 0!==l&&clearTimeout(l),a=0,o=s=i=l=void 0},R.flush=function(){return void 0===l?c:E(m())},R}(e,t,{leading:o,maxWait:t,trailing:i})}}},Rr={};function Or(e){var t=Rr[e];if(void 0!==t)return t.exports;var n=Rr[e]={exports:{}};return Er[e](n,n.exports,Or),n.exports}Or.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return Or.d(t,{a:t}),t},Or.d=(e,t)=>{for(var n in t)Or.o(t,n)&&!Or.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},Or.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),Or.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var Cr=Or(551);Or.n(Cr);const Sr=(e,{enabled:t=!0,event:n="click",dismissOptions:r,clickOptions:o,hoverOptions:i,focusOptions:u,clientPointsOptions:c,roleOptions:l,extraInteractions:s=[]})=>{const a=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:u=!0,escapeKey:c=!0,outsidePress:l=!0,outsidePressEvent:s="pointerdown",referencePress:a=!1,referencePressEvent:f="pointerdown",ancestorScroll:d=!1,bubbles:p,capture:v}=t,m=Sn(),h=it("function"==typeof l?l:()=>!1),g="function"==typeof l?h:l,y=A.useRef(!1),{escapeKey:b,outsidePress:x}=ar(p),{escapeKey:w,outsidePress:E}=ar(v),R=A.useRef(!1),O=it(e=>{var t;if(!n||!u||!c||"Escape"!==e.key)return;if(R.current)return;const o=null==(t=i.current.floatingContext)?void 0:t.nodeId,l=m?Qe(m.nodesRef.current,o):[];if(!b&&(e.stopPropagation(),l.length>0)){let e=!0;if(l.forEach(t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)}),!e)return}r(!1,function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,"escape-key")}),C=it(e=>{var t;const n=()=>{var t;O(e),null==(t=Ve(e))||t.removeEventListener("keydown",n)};null==(t=Ve(e))||t.addEventListener("keydown",n)}),S=it(e=>{var t;const n=i.current.insideReactTree;i.current.insideReactTree=!1;const u=y.current;if(y.current=!1,"click"===s&&u)return;if(n)return;if("function"==typeof g&&!g(e))return;const c=Ve(e),l="["+An("inert")+"]",a=Xe(o.floating).querySelectorAll(l);let f=te(c)?c:null;for(;f&&!pe(f);){const e=he(f);if(pe(e)||!te(e))break;f=e}if(a.length&&te(c)&&!c.matches("html,body")&&!Ke(c,o.floating)&&Array.from(a).every(e=>!Ke(f,e)))return;if(ne(c)&&k){const t=pe(c),n=ve(c),r=/auto|scroll/,o=t||r.test(n.overflowX),i=t||r.test(n.overflowY),u=o&&c.clientWidth>0&&c.scrollWidth>c.clientWidth,l=i&&c.clientHeight>0&&c.scrollHeight>c.clientHeight,s="rtl"===n.direction,a=l&&(s?e.offsetX<=c.offsetWidth-c.clientWidth:e.offsetX>c.clientWidth),f=u&&e.offsetY>c.clientHeight;if(a||f)return}const d=null==(t=i.current.floatingContext)?void 0:t.nodeId,p=m&&Qe(m.nodesRef.current,d).some(t=>{var n;return qe(e,null==(n=t.context)?void 0:n.elements.floating)});if(qe(e,o.floating)||qe(e,o.domReference)||p)return;const v=m?Qe(m.nodesRef.current,d):[];if(v.length>0){let e=!0;if(v.forEach(t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)}),!e)return}r(!1,e,"outside-press")}),_=it(e=>{var t;const n=()=>{var t;S(e),null==(t=Ve(e))||t.removeEventListener(s,n)};null==(t=Ve(e))||t.addEventListener(s,n)});A.useEffect(()=>{if(!n||!u)return;i.current.__escapeKeyBubbles=b,i.current.__outsidePressBubbles=x;let e=-1;function t(e){r(!1,e,"ancestor-scroll")}function l(){window.clearTimeout(e),R.current=!0}function a(){e=window.setTimeout(()=>{R.current=!1},de()?5:0)}const f=Xe(o.floating);c&&(f.addEventListener("keydown",w?C:O,w),f.addEventListener("compositionstart",l),f.addEventListener("compositionend",a)),g&&f.addEventListener(s,E?_:S,E);let p=[];return d&&(te(o.domReference)&&(p=ye(o.domReference)),te(o.floating)&&(p=p.concat(ye(o.floating))),!te(o.reference)&&o.reference&&o.reference.contextElement&&(p=p.concat(ye(o.reference.contextElement)))),p=p.filter(e=>{var t;return e!==(null==(t=f.defaultView)?void 0:t.visualViewport)}),p.forEach(e=>{e.addEventListener("scroll",t,{passive:!0})}),()=>{c&&(f.removeEventListener("keydown",w?C:O,w),f.removeEventListener("compositionstart",l),f.removeEventListener("compositionend",a)),g&&f.removeEventListener(s,E?_:S,E),p.forEach(e=>{e.removeEventListener("scroll",t)}),window.clearTimeout(e)}},[i,o,c,g,s,n,r,d,u,b,x,O,w,C,S,E,_]),A.useEffect(()=>{i.current.insideReactTree=!1},[i,g,s]);const j=A.useMemo(()=>({onKeyDown:O,...a&&{[lr[f]]:e=>{r(!1,e.nativeEvent,"reference-press")},..."click"!==f&&{onClick(e){r(!1,e.nativeEvent,"reference-press")}}}}),[O,r,a,f]),k=A.useMemo(()=>{function e(e){0===e.button&&(y.current=!0)}return{onKeyDown:O,onMouseDown:e,onMouseUp:e,[sr[s]]:()=>{i.current.insideReactTree=!0}}},[O,s,i]);return A.useMemo(()=>u?{reference:j,floating:k}:{},[u,j,k])}(e,{escapeKey:!1,...r}),f=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:u=!0,event:c="click",toggle:l=!0,ignoreMouse:s=!1,keyboardHandlers:a=!0,stickIfOpen:f=!0}=t,d=A.useRef(),p=A.useRef(!1),v=A.useMemo(()=>({onPointerDown(e){d.current=e.pointerType},onMouseDown(e){const t=d.current;0===e.button&&"click"!==c&&(tt(t,!0)&&s||(!n||!l||o.current.openEvent&&f&&"mousedown"!==o.current.openEvent.type?(e.preventDefault(),r(!0,e.nativeEvent,"click")):r(!1,e.nativeEvent,"click")))},onClick(e){const t=d.current;"mousedown"===c&&d.current?d.current=void 0:tt(t,!0)&&s||(!n||!l||o.current.openEvent&&f&&"click"!==o.current.openEvent.type?r(!0,e.nativeEvent,"click"):r(!1,e.nativeEvent,"click"))},onKeyDown(e){d.current=void 0,e.defaultPrevented||!a||ir(e)||(" "!==e.key||ur(i)||(e.preventDefault(),p.current=!0),function(e){return ne(e.target)&&"A"===e.target.tagName}(e)||"Enter"===e.key&&r(!n||!l,e.nativeEvent,"click"))},onKeyUp(e){e.defaultPrevented||!a||ir(e)||ur(i)||" "===e.key&&p.current&&(p.current=!1,r(!n||!l,e.nativeEvent,"click"))}}),[o,i,c,s,a,r,n,f,l]);return A.useMemo(()=>u?{reference:v}:{},[u,v])}(e,{enabled:t&&"click"===n,...o}),d=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:u}=e,{enabled:c=!0,delay:l=0,handleClose:s=null,mouseOnly:a=!1,restMs:f=0,move:d=!0}=t,p=Sn(),v=Cn(),m=rt(s),h=rt(l),g=rt(n),y=rt(f),b=A.useRef(),x=A.useRef(-1),w=A.useRef(),E=A.useRef(-1),R=A.useRef(!0),O=A.useRef(!1),C=A.useRef(()=>{}),S=A.useRef(!1),_=it(()=>{var e;const t=null==(e=o.current.openEvent)?void 0:e.type;return(null==t?void 0:t.includes("mouse"))&&"mousedown"!==t});A.useEffect(()=>{if(c)return i.on("openchange",e),()=>{i.off("openchange",e)};function e(e){let{open:t}=e;t||(kn(x),kn(E),R.current=!0,S.current=!1)}},[c,i]),A.useEffect(()=>{if(!c)return;if(!m.current)return;if(!n)return;function e(e){_()&&r(!1,e,"hover")}const t=Xe(u.floating).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}},[u.floating,n,r,c,m,_]);const j=A.useCallback(function(e,t,n){void 0===t&&(t=!0),void 0===n&&(n="hover");const o=Tn(h.current,"close",b.current);o&&!w.current?(kn(x),x.current=window.setTimeout(()=>r(!1,e,n),o)):t&&(kn(x),r(!1,e,n))},[h,r]),k=it(()=>{C.current(),w.current=void 0}),L=it(()=>{if(O.current){const e=Xe(u.floating).body;e.style.pointerEvents="",e.removeAttribute(Ln),O.current=!1}}),T=it(()=>!!o.current.openEvent&&["click","mousedown"].includes(o.current.openEvent.type));A.useEffect(()=>{if(c&&te(u.domReference)){const r=u.domReference,o=u.floating;return n&&r.addEventListener("mouseleave",i),d&&r.addEventListener("mousemove",e,{once:!0}),r.addEventListener("mouseenter",e),r.addEventListener("mouseleave",t),o&&(o.addEventListener("mouseleave",i),o.addEventListener("mouseenter",l),o.addEventListener("mouseleave",s)),()=>{n&&r.removeEventListener("mouseleave",i),d&&r.removeEventListener("mousemove",e),r.removeEventListener("mouseenter",e),r.removeEventListener("mouseleave",t),o&&(o.removeEventListener("mouseleave",i),o.removeEventListener("mouseenter",l),o.removeEventListener("mouseleave",s))}}function e(e){if(kn(x),R.current=!1,a&&!tt(b.current)||Pn(y.current)>0&&!Tn(h.current,"open"))return;const t=Tn(h.current,"open",b.current);t?x.current=window.setTimeout(()=>{g.current||r(!0,e,"hover")},t):n||r(!0,e,"hover")}function t(e){if(T())return void L();C.current();const t=Xe(u.floating);if(kn(E),S.current=!1,m.current&&o.current.floatingContext){n||kn(x),w.current=m.current({...o.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){L(),k(),T()||j(e,!0,"safe-polygon")}});const r=w.current;return t.addEventListener("mousemove",r),void(C.current=()=>{t.removeEventListener("mousemove",r)})}("touch"!==b.current||!Ke(u.floating,e.relatedTarget))&&j(e)}function i(e){T()||o.current.floatingContext&&(null==m.current||m.current({...o.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){L(),k(),T()||j(e)}})(e))}function l(){kn(x)}function s(e){T()||j(e,!1)}},[u,c,e,a,d,j,k,L,r,n,g,p,h,m,o,T,y]),nt(()=>{var e;if(c&&n&&null!=(e=m.current)&&null!=(e=e.__options)&&e.blockPointerEvents&&_()){O.current=!0;const e=u.floating;if(te(u.domReference)&&e){var t;const n=Xe(u.floating).body;n.setAttribute(Ln,"");const r=u.domReference,o=null==p||null==(t=p.nodesRef.current.find(e=>e.id===v))||null==(t=t.context)?void 0:t.elements.floating;return o&&(o.style.pointerEvents=""),n.style.pointerEvents="none",r.style.pointerEvents="auto",e.style.pointerEvents="auto",()=>{n.style.pointerEvents="",r.style.pointerEvents="",e.style.pointerEvents=""}}}},[c,n,v,u,p,m,_]),nt(()=>{n||(b.current=void 0,S.current=!1,k(),L())},[n,k,L]),A.useEffect(()=>()=>{k(),kn(x),kn(E),L()},[c,u.domReference,k,L]);const P=A.useMemo(()=>{function e(e){b.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){const{nativeEvent:t}=e;function o(){R.current||g.current||r(!0,t,"hover")}a&&!tt(b.current)||n||0===Pn(y.current)||S.current&&e.movementX**2+e.movementY**2<2||(kn(E),"touch"===b.current?o():(S.current=!0,E.current=window.setTimeout(o,Pn(y.current))))}}},[a,r,n,g,y]);return A.useMemo(()=>c?{reference:P}:{},[c,P])}(e,{restMs:150,enabled:t&&"hover"===n,handleClose:yr(),...i}),p=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:u}=e,{enabled:c=!0,visibleOnly:l=!0}=t,s=A.useRef(!1),a=A.useRef(-1),f=A.useRef(!0);A.useEffect(()=>{if(!c)return;const e=Q(u.domReference);function t(){!n&&ne(u.domReference)&&u.domReference===Ue(Xe(u.domReference))&&(s.current=!0)}function r(){f.current=!0}function o(){f.current=!1}return e.addEventListener("blur",t),fr()&&(e.addEventListener("keydown",r,!0),e.addEventListener("pointerdown",o,!0)),()=>{e.removeEventListener("blur",t),fr()&&(e.removeEventListener("keydown",r,!0),e.removeEventListener("pointerdown",o,!0))}},[u.domReference,n,c]),A.useEffect(()=>{if(c)return o.on("openchange",e),()=>{o.off("openchange",e)};function e(e){let{reason:t}=e;"reference-press"!==t&&"escape-key"!==t||(s.current=!0)}},[o,c]),A.useEffect(()=>()=>{kn(a)},[]);const d=A.useMemo(()=>({onMouseLeave(){s.current=!1},onFocus(e){if(s.current)return;const t=Ve(e.nativeEvent);if(l&&te(t))if(fr()&&!e.relatedTarget){if(!f.current&&!Ye(t))return}else if(!function(e){if(!e||ze())return!0;try{return e.matches(":focus-visible")}catch(e){return!0}}(t))return;r(!0,e.nativeEvent,"focus")},onBlur(e){s.current=!1;const t=e.relatedTarget,n=e.nativeEvent,o=te(t)&&t.hasAttribute(An("focus-guard"))&&"outside"===t.getAttribute("data-type");a.current=window.setTimeout(()=>{var e;const c=Ue(u.domReference?u.domReference.ownerDocument:document);(t||c!==u.domReference)&&(Ke(null==(e=i.current.floatingContext)?void 0:e.refs.floating.current,c)||Ke(u.domReference,c)||o||r(!1,n,"focus"))})}}),[i,u.domReference,r,l]);return A.useMemo(()=>c?{reference:d}:{},[c,d])}(e,{enabled:t&&"focus"===n,...u}),v=function(e,t){void 0===t&&(t={});const{open:n,dataRef:r,elements:{floating:o,domReference:i},refs:u}=e,{enabled:c=!0,axis:l="both",x:s=null,y:a=null}=t,f=A.useRef(!1),d=A.useRef(null),[p,v]=A.useState(),[m,h]=A.useState([]),g=it((e,t)=>{f.current||r.current.openEvent&&!cr(r.current.openEvent)||u.setPositionReference(function(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var i;const u=(null==e?void 0:e.getBoundingClientRect())||{width:0,height:0,x:0,y:0},c="x"===t.axis||"both"===t.axis,l="y"===t.axis||"both"===t.axis,s=["mouseenter","mousemove"].includes((null==(i=t.dataRef.current.openEvent)?void 0:i.type)||"")&&"touch"!==t.pointerType;let a=u.width,f=u.height,d=u.x,p=u.y;return null==n&&t.x&&c&&(n=u.x-t.x),null==r&&t.y&&l&&(r=u.y-t.y),d-=n||0,p-=r||0,a=0,f=0,!o||s?(a="y"===t.axis?u.width:0,f="x"===t.axis?u.height:0,d=c&&null!=t.x?t.x:d,p=l&&null!=t.y?t.y:p):o&&!s&&(f="x"===t.axis?u.height:f,a="y"===t.axis?u.width:a),o=!0,{width:a,height:f,x:d,y:p,top:p,right:d+a,bottom:p+f,left:d}}}}(i,{x:e,y:t,axis:l,dataRef:r,pointerType:p}))}),y=it(e=>{null==s&&null==a&&(n?d.current||h([]):g(e.clientX,e.clientY))}),b=tt(p)?o:n,x=A.useCallback(()=>{if(!b||!c||null!=s||null!=a)return;const e=Q(o);function t(n){const r=Ve(n);Ke(o,r)?(e.removeEventListener("mousemove",t),d.current=null):g(n.clientX,n.clientY)}if(!r.current.openEvent||cr(r.current.openEvent)){e.addEventListener("mousemove",t);const n=()=>{e.removeEventListener("mousemove",t),d.current=null};return d.current=n,n}u.setPositionReference(i)},[b,c,s,a,o,r,u,i,g]);A.useEffect(()=>x(),[x,m]),A.useEffect(()=>{c&&!o&&(f.current=!1)},[c,o]),A.useEffect(()=>{!c&&n&&(f.current=!0)},[c,n]),nt(()=>{!c||null==s&&null==a||(f.current=!1,g(s,a))},[c,s,a,g]);const w=A.useMemo(()=>{function e(e){let{pointerType:t}=e;v(t)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:y,onMouseEnter:y}},[y]);return A.useMemo(()=>c?{reference:w}:{},[c,w])}(e,{enabled:t&&"point"===n,...c}),m=function(e,t){var n,r;void 0===t&&(t={});const{open:o,elements:i,floatingId:u}=e,{enabled:c=!0,role:l="dialog"}=t,s=xn(),a=(null==(n=i.domReference)?void 0:n.id)||s,f=A.useMemo(()=>{var e;return(null==(e=Ze(i.floating))?void 0:e.id)||u},[i.floating,u]),d=null!=(r=pr.get(l))?r:l,p=null!=Cn(),v=A.useMemo(()=>"tooltip"===d||"label"===l?{["aria-"+("label"===l?"labelledby":"describedby")]:o?f:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":"alertdialog"===d?"dialog":d,"aria-controls":o?f:void 0,..."listbox"===d&&{role:"combobox"},..."menu"===d&&{id:a},..."menu"===d&&p&&{role:"menuitem"},..."select"===l&&{"aria-autocomplete":"none"},..."combobox"===l&&{"aria-autocomplete":"list"}},[d,f,p,o,a,l]),m=A.useMemo(()=>{const e={id:f,...d&&{role:d}};return"tooltip"===d||"label"===l?e:{...e,..."menu"===d&&{"aria-labelledby":a}}},[d,f,a,l]),h=A.useCallback(e=>{let{active:t,selected:n}=e;const r={role:"option",...t&&{id:f+"-fui-option"}};switch(l){case"select":case"combobox":return{...r,"aria-selected":n}}return{}},[f,l]);return A.useMemo(()=>c?{reference:v,floating:m,item:h}:{},[c,v,m,h])}(e,l);return function(e){void 0===e&&(e=[]);const t=e.map(e=>null==e?void 0:e.reference),n=e.map(e=>null==e?void 0:e.floating),r=e.map(e=>null==e?void 0:e.item),o=A.useCallback(t=>dr(t,e,"reference"),t),i=A.useCallback(t=>dr(t,e,"floating"),n),u=A.useCallback(t=>dr(t,e,"item"),r);return A.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:u}),[o,i,u])}([a,f,d,p,v,m,...s])},_r=({enabled:e=!0,event:t,dismissOptions:n,clickOptions:r,hoverOptions:o,focusOptions:i,clientPointsOptions:u,roleOptions:c,extraInteractions:l,open:s,floatingOptions:a,useOffset:f=!0,offsetOptions:d,useFlip:p=!0,flipOptions:v,useShift:h=!0,shiftOptions:g,useArrow:y=!1,arrowOptions:b,transitionOptions:x,useAutoPlacement:w=!1,autoPlacementOptions:E,useAutoUpdate:R=!1,autoUpdateOptions:O,useAutoSize:C=!1,sizeOptions:S,minAcceptableWidth:_=null,minAcceptableHeight:j=null,maxAcceptableWidth:k,maxAcceptableHeight:L,onOpen:T,onClose:P})=>{const{theme:M}=K(),D=function(){const e=xn(),t=Sn(),n=Cn();return nt(()=>{if(!e)return;const r={id:e,parentId:n};return null==t||t.addNode(r),()=>{null==t||t.removeNode(r)}},[t,e,n]),e}(),[$,I]=(0,A.useState)(!1),N=(0,A.useRef)(null),F=e&&(s??$);(0,A.useEffect)(()=>{F&&T?.()},[F]),(e=>{const t=(0,A.useRef)(e);(0,A.useEffect)(()=>{if(t.current!==e)return t.current=e,(e=>{e||I(!1)})(e)},[e])})(e);const W=[];f&&W.push((e=>{const t=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:u,middlewareData:c}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),u=Ot(n),c=Ct(n),l="y"===jt(n),s=Ht.has(u)?-1:1,a=i&&l?-1:1,f=Rt(t,e);let{mainAxis:d,crossAxis:p,alignmentAxis:v}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return c&&"number"==typeof v&&(p="end"===c?-1*v:v),l?{x:p*a,y:d*s}:{x:d*s,y:p*a}}(t,e);return u===(null==(n=c.offset)?void 0:n.placement)&&null!=(r=c.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:u}}}}}(e);return{name:t.name,fn:t.fn,options:[e,void 0]}})(d??M.spacings.base));let H=null;if(w?W.push((e=>{const t=function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,o;const{rects:i,middlewareData:u,placement:c,platform:l,elements:s}=t,{crossAxis:a=!1,alignment:f,allowedPlacements:d=mt,autoAlignment:p=!0,...v}=Rt(e,t),m=void 0!==f||d===mt?function(e,t,n){return(e?[...n.filter(t=>Ct(t)===e),...n.filter(t=>Ct(t)!==e)]:n.filter(e=>Ot(e)===e)).filter(n=>!e||Ct(n)===e||!!t&&Lt(n)!==n)}(f||null,p,d):d,h=await l.detectOverflow(t,v),g=(null==(n=u.autoPlacement)?void 0:n.index)||0,y=m[g];if(null==y)return{};const b=kt(y,i,await(null==l.isRTL?void 0:l.isRTL(s.floating)));if(c!==y)return{reset:{placement:m[0]}};const x=[h[Ot(y)],h[b[0]],h[b[1]]],w=[...(null==(r=u.autoPlacement)?void 0:r.overflows)||[],{placement:y,overflows:x}],E=m[g+1];if(E)return{data:{index:g+1,overflows:w},reset:{placement:E}};const R=w.map(e=>{const t=Ct(e.placement);return[e.placement,t&&a?e.overflows.slice(0,2).reduce((e,t)=>e+t,0):e.overflows[0],e.overflows]}).sort((e,t)=>e[1]-t[1]),O=(null==(o=R.filter(e=>e[2].slice(0,Ct(e[0])?2:3).every(e=>e<=0))[0])?void 0:o[0])||R[0][0];return O!==c?{data:{index:g+1,overflows:w},reset:{placement:O}}:{}}}}(e);return{name:t.name,fn:t.fn,options:[e,void 0]}})(E)):p&&(H=(e=>{const t=on(e);return{name:t.name,fn:t.fn,options:[e,void 0]}})({crossAxis:!1,fallbackStrategy:"bestFit",...v})),C){const e=(e=>{const t=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:u,elements:c}=t,{apply:l=()=>{},...s}=Rt(e,t),a=await u.detectOverflow(t,s),f=Ot(o),d=Ct(o),p="y"===jt(o),{width:v,height:m}=i.floating;let h,g;"top"===f||"bottom"===f?(h=f,g=d===(await(null==u.isRTL?void 0:u.isRTL(c.floating))?"start":"end")?"left":"right"):(g=f,h="end"===d?"top":"bottom");const y=m-a.top-a.bottom,b=v-a.left-a.right,x=ht(m-a[h],y),w=ht(v-a[g],b),E=!t.middlewareData.shift;let R=x,O=w;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(O=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(R=y),E&&!d){const e=gt(a.left,0),t=gt(a.right,0),n=gt(a.top,0),r=gt(a.bottom,0);p?O=v-2*(0!==e||0!==t?e+t:gt(a.left,a.right)):R=m-2*(0!==n||0!==r?n+r:gt(a.top,a.bottom))}await l({...t,availableWidth:O,availableHeight:R});const C=await u.getDimensions(c.floating);return v!==C.width||m!==C.height?{reset:{rects:!0}}:{}}}}(e);return{name:t.name,fn:t.fn,options:[e,void 0]}})({...S,apply({elements:e,rects:t,availableWidth:n,availableHeight:r}){const o=m(_)?_(t.reference):_??t.reference.width,i=m(k)?k(t.reference):Math.min(n,k??1/0),u=m(j)?j(t.reference):j??0,c=m(L)?L(t.reference):Math.min(r,L??1/0);Object.assign(e.floating.style,{minWidth:`${Math.min(o,i)}px`,maxWidth:`${i}px`,minHeight:`${Math.min(u,c)}px`,maxHeight:`${c}px`})}});H?"initialPlacement"===v?.fallbackStrategy?W.push(e,H):W.push(H,e):W.push(e)}else H&&W.push(H);h&&W.push((e=>{const t=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:u=!0,crossAxis:c=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=Rt(e,t),a={x:n,y:r},f=await i.detectOverflow(t,s),d=jt(Ot(o)),p=St(d);let v=a[p],m=a[d];if(u){const e="y"===p?"bottom":"right";v=Et(v+f["y"===p?"top":"left"],v,v-f[e])}if(c){const e="y"===d?"bottom":"right";m=Et(m+f["y"===d?"top":"left"],m,m-f[e])}const h=l.fn({...t,[p]:v,[d]:m});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[p]:u,[d]:c}}}}}}(e);return{name:t.name,fn:t.fn,options:[e,void 0]}})({padding:M.spacings.base,...g})),y&&W.push(((e,t)=>{const n=(e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?un({element:n.current,padding:r}).fn(t):{}:n?un({element:n,padding:r}).fn(t):{};var o}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}})({element:N,padding:M.spacings.base,...b}));const z=function(e){void 0===e&&(e={});const{nodeId:t}=e,n=function(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=xn(),i=A.useRef({}),[u]=A.useState(()=>En()),c=null!=Cn(),[l,s]=A.useState(r.reference),a=it((e,t,r)=>{i.current.openEvent=e?t:void 0,u.emit("openchange",{open:e,event:t,reason:r,nested:c}),null==n||n(e,t,r)}),f=A.useMemo(()=>({setPositionReference:s}),[]),d=A.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return A.useMemo(()=>({dataRef:i,open:t,onOpenChange:a,elements:d,events:u,floatingId:o,refs:f}),[t,a,d,u,o,f])}({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,u]=A.useState(null),[c,l]=A.useState(null),s=(null==o?void 0:o.domReference)||i,a=A.useRef(null),f=Sn();nt(()=>{s&&(a.current=s)},[s]);const d=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:u}={},transform:c=!0,whileElementsMounted:l,open:s}=e,[a,f]=A.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,p]=A.useState(r);sn(d,r)||p(r);const[v,m]=A.useState(null),[h,g]=A.useState(null),y=A.useCallback(e=>{e!==E.current&&(E.current=e,m(e))},[]),b=A.useCallback(e=>{e!==R.current&&(R.current=e,g(e))},[]),x=i||v,w=u||h,E=A.useRef(null),R=A.useRef(null),O=A.useRef(a),C=null!=l,S=dn(l),_=dn(o),j=dn(s),k=A.useCallback(()=>{if(!E.current||!R.current)return;const e={placement:t,strategy:n,middleware:d};_.current&&(e.platform=_.current),cn(E.current,R.current,e).then(e=>{const t={...e,isPositioned:!1!==j.current};L.current&&!sn(O.current,t)&&(O.current=t,pt.flushSync(()=>{f(t)}))})},[d,t,n,_,j]);ln(()=>{!1===s&&O.current.isPositioned&&(O.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[s]);const L=A.useRef(!1);ln(()=>(L.current=!0,()=>{L.current=!1}),[]),ln(()=>{if(x&&(E.current=x),w&&(R.current=w),x&&w){if(S.current)return S.current(x,w,k);k()}},[x,w,k,S,C]);const T=A.useMemo(()=>({reference:E,floating:R,setReference:y,setFloating:b}),[y,b]),P=A.useMemo(()=>({reference:x,floating:w}),[x,w]),M=A.useMemo(()=>{const e={position:n,left:0,top:0};if(!P.floating)return e;const t=fn(P.floating,a.x),r=fn(P.floating,a.y);return c?{...e,transform:"translate("+t+"px, "+r+"px)",...an(P.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,c,P.floating,a.x,a.y]);return A.useMemo(()=>({...a,update:k,refs:T,elements:P,floatingStyles:M}),[a,k,T,P,M])}({...e,elements:{...o,...c&&{reference:c}}}),p=A.useCallback(e=>{const t=te(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;l(t),d.refs.setReference(t)},[d.refs]),v=A.useCallback(e=>{(te(e)||null===e)&&(a.current=e,u(e)),(te(d.refs.reference.current)||null===d.refs.reference.current||null!==e&&!te(e))&&d.refs.setReference(e)},[d.refs]),m=A.useMemo(()=>({...d.refs,setReference:v,setPositionReference:p,domReference:a}),[d.refs,v,p]),h=A.useMemo(()=>({...d.elements,domReference:s}),[d.elements,s]),g=A.useMemo(()=>({...d,...r,refs:m,elements:h,nodeId:t}),[d,m,h,t,r]);return nt(()=>{r.dataRef.current.floatingContext=g;const e=null==f?void 0:f.nodesRef.current.find(e=>e.id===t);e&&(e.context=g)}),A.useMemo(()=>({...d,context:g,refs:m,elements:h}),[d,m,h,g])}({nodeId:D,open:F,middleware:W,onOpenChange:(e,t,n)=>{I(e),e||P?.(n,t)},...R&&{whileElementsMounted:(e,t,n)=>function(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:u="function"==typeof ResizeObserver,layoutShift:c="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,s=Bt(e),a=o||i?[...s?ye(s):[],...t?ye(t):[]]:[];a.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)});const f=s&&c?function(e,t){let n,r=null;const o=J(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function u(c,l){void 0===c&&(c=!1),void 0===l&&(l=1),i();const s=e.getBoundingClientRect(),{left:a,top:f,width:d,height:p}=s;if(c||t(),!d||!p)return;const v={rootMargin:-bt(f)+"px "+-bt(o.clientWidth-(a+d))+"px "+-bt(o.clientHeight-(f+p))+"px "+-bt(a)+"px",threshold:gt(0,ht(1,l))||1};let m=!0;function h(t){const r=t[0].intersectionRatio;if(r!==l){if(!m)return u();r?u(!1,r):n=setTimeout(()=>{u(!1,1e-7)},1e3)}1!==r||rn(s,e.getBoundingClientRect())||u(),m=!1}try{r=new IntersectionObserver(h,{...v,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(h,v)}r.observe(e)}(!0),i}(s,n):null;let d,p=-1,v=null;u&&(v=new ResizeObserver(e=>{let[r]=e;r&&r.target===s&&v&&t&&(v.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=v)||e.observe(t)})),n()}),s&&!l&&v.observe(s),t&&v.observe(t));let m=l?qt(e):null;return l&&function t(){const r=qt(e);m&&!rn(m,r)&&n(),m=r,d=requestAnimationFrame(t)}(),n(),()=>{var e;a.forEach(e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)}),null==f||f(),null==(e=v)||e.disconnect(),v=null,l&&cancelAnimationFrame(d)}}(e,t,n,O)},...a}),B=Sr(z.context,{enabled:e,event:t,dismissOptions:n,clickOptions:r,hoverOptions:o,focusOptions:i,clientPointsOptions:u,roleOptions:c,extraInteractions:l}),U=function(e,t){void 0===t&&(t={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:u=250}=t,c=e.placement,l=c.split("-")[0],s=A.useMemo(()=>({side:l,placement:c}),[l,c]),a="number"==typeof u,f=(a?u:u.open)||0,d=(a?u:u.close)||0,[p,v]=A.useState(()=>({...mr(i,s),...mr(n,s)})),{isMounted:m,status:h}=function(e,t){void 0===t&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,i=("number"==typeof o?o:o.close)||0,[u,c]=A.useState("unmounted"),l=function(e,t){const[n,r]=A.useState(e);return e&&!n&&r(!0),A.useEffect(()=>{if(!e&&n){const e=setTimeout(()=>r(!1),t);return()=>clearTimeout(e)}},[e,n,t]),n}(n,i);return l||"close"!==u||c("unmounted"),nt(()=>{if(r){if(n){c("initial");const e=requestAnimationFrame(()=>{pt.flushSync(()=>{c("open")})});return()=>{cancelAnimationFrame(e)}}c("close")}},[n,r]),{isMounted:l,status:u}}(e,{duration:u}),g=rt(n),y=rt(r),b=rt(o),x=rt(i);return nt(()=>{const e=mr(g.current,s),t=mr(b.current,s),n=mr(x.current,s),r=mr(y.current,s)||Object.keys(e).reduce((e,t)=>(e[t]="",e),{});if("initial"===h&&v(t=>({transitionProperty:t.transitionProperty,...n,...e})),"open"===h&&v({transitionProperty:Object.keys(r).map(vr).join(","),transitionDuration:f+"ms",...n,...r}),"close"===h){const r=t||e;v({transitionProperty:Object.keys(r).map(vr).join(","),transitionDuration:d+"ms",...n,...r})}},[d,b,g,y,x,f,h,s]),{isMounted:m,styles:p}}(z.context,{duration:250,...x});return{nodeId:D,isOpen:F,floating:z,arrowRef:N,interactions:B,transition:U}},jr=()=>{const e=(0,A.useContext)(Y);return v(e,"The `useHoneyPopupContext()` hook can only be used inside <HoneyPopup/> component!"),e},Ar=({children:e,referenceProps:t,content:n,contentProps:r,focusManagerProps:o,arrowProps:i,portalProps:u,adjustStyles:c,context:l,...s})=>{const{useArrow:a,onClose:f}=s,{nodeId:d,floating:p,isOpen:v,arrowRef:m,interactions:g,transition:y}=_r(s),b=(0,A.useCallback)(()=>{f?.("escape-key")},[f]),x=(0,A.useMemo)(()=>({context:l,floatingContext:p.context}),[l,p.context]);return(0,j.jsx)(xr,{ref:p.refs.setReference,...g.getReferenceProps(),...t,"data-testid":"honey-popup",children:(0,j.jsxs)(Y,{value:x,children:[h(e,x),(0,j.jsx)(_n,{id:d,children:y.isMounted&&(0,j.jsx)(wr,{...u,children:(0,j.jsx)(or,{context:p.context,disabled:!v,...o,children:(0,j.jsxs)(X,{ref:p.refs.setFloating,active:v,style:c?.({...p.floatingStyles,...y.styles},{middlewareData:p.middlewareData})??{...p.floatingStyles,...y.styles},onDeactivate:b,...g.getFloatingProps(),...r,"data-testid":"honey-popup-floating-content",children:[a&&(0,j.jsx)(wn,{ref:m,context:p.context,fill:"white",...i}),h(n,x)]})})})})]})})},kr=({useTree:e=!1,...t})=>(0,j.jsx)(br,{enabled:e,children:(0,j.jsx)(Ar,{...t})}),Lr=({option:e,...t})=>{const{context:n,floatingContext:r}=jr();return(0,j.jsx)(O,{onClick:()=>{e.onClick?.({context:n,floatingContext:r})},...t,children:e.label})},Tr=({options:e,optionProps:t,floatingOptions:n,...r})=>{const{contentProps:o}=r,{context:i,floatingContext:u}=jr(),c=(0,A.useMemo)(()=>e?.filter(e=>"function"==typeof e.visible?e.visible({context:i,floatingContext:u}):!1!==e.visible),[e]);return(0,j.jsx)(F,{items:c,itemKey:"id",emptyContent:"No options",children:e=>e.options?.length?(0,j.jsx)(kr,{context:i,content:(0,j.jsx)(Tr,{options:e.options,optionProps:t,contentProps:o}),event:"hover",referenceProps:{$width:"100%"},floatingOptions:{placement:"right-start",...n},useArrow:!0,...r,children:(0,j.jsx)(Lr,{option:e,...t,children:e.label})}):(0,j.jsx)(Lr,{option:e,...t})})},Pr=({children:e,subProps:t,options:n,optionProps:r,clickOptions:o,context:i,...u})=>{const{contentProps:c}=u;return(0,j.jsx)(j.Fragment,{children:(0,j.jsx)(kr,{context:i,content:(0,j.jsx)(Tr,{options:n,optionProps:r,contentProps:c,...t}),clickOptions:{toggle:!1,...o},useArrow:!0,...u,children:e})})},Mr=(0,A.createContext)(void 0),Dr=()=>{const e=(0,A.useContext)(Mr);return v(e,"The `useHoneyLayerRegistryContext()` hook can only be used inside <HoneyLayerRegistry/> component!"),e},$r=({children:e})=>{const t=(0,A.useContext)(Mr),[n,r]=(0,A.useState)([]),o=(0,A.useMemo)(()=>({layers:n,registerLayer:e=>{const t=`${Math.floor(1e3*performance.now()).toString(36)}${Math.random().toString(36).slice(2,10)}`;return r(n=>[...n,{id:t,payload:e}]),t},unregisterLayer:e=>{r(t=>t.filter(t=>t.id!==e))},getLayerIndex:e=>n.findIndex(t=>t.id===e)}),[n]);return t?e:(0,j.jsx)(Mr,{value:o,children:e})},Ir=({children:e,theme:t,mediaQueryOptions:n,...r})=>{const i=B(t,n),{overlays:u,registerOverlay:c,unregisterOverlay:l}=(()=>{const e=(0,A.useRef)([]);(0,A.useEffect)(()=>{const t=t=>{const n=e.current;n.length&&n[n.length-1].notifyListeners("keyup",t.code,t)};return document.addEventListener("keyup",t),()=>{document.removeEventListener("keyup",t)}},[]);const t=(0,A.useCallback)(t=>{const n=t.id??y(),r=[["keyup",t.onKeyUp]],o={current:null},i={containerRef:o,id:n,setContainerRef:e=>{o.current=e},addListener:(e,t)=>{r.push([e,t])},removeListener:(e,t)=>{const n=r.findIndex(([n,r])=>n===e&&r===t);-1!==n&&r.splice(n,1)},notifyListeners:(e,n,o)=>{const u=t.listenKeys??[];u.length&&!u.includes(n)||(o.preventDefault(),r.forEach(([t,r])=>{t===e&&r(n,i,o)}))}};return e.current.push(i),i},[]),n=(0,A.useCallback)(t=>{e.current=e.current.filter(e=>e.id!==t)},[]);return{overlays:e.current,registerOverlay:t,unregisterOverlay:n}})(),s=(0,A.useMemo)(()=>({theme:t,screenState:i,overlays:u,registerOverlay:c,unregisterOverlay:l}),[t,i,u]);return(0,j.jsx)(o,{theme:t,...r,children:(0,j.jsx)(U,{value:s,children:e})})};var Nr=d(117),Fr=d.n(Nr);const Wr=({theme:e,...t})=>{const n=(0,A.useContext)(U),r=(0,A.useMemo)(()=>Fr()(n?.theme,e),[n?.theme,e]);return(0,j.jsx)(o,{theme:r,...t})},Hr=({durationMs:e,timingFunction:t="ease-in-out",extraProperties:n=[],activeClassName:r})=>({active:o=!1})=>i`
|
|
37
37
|
opacity: ${o?1:0};
|
|
38
38
|
visibility: ${o?"visible":"hidden"};
|
|
39
39
|
|
|
@@ -41,7 +41,7 @@ import*as e from"react";import{CSS_COLOR_PROPERTIES as t,CSS_SPACING_PROPERTIES
|
|
|
41
41
|
transition-duration: ${e}ms;
|
|
42
42
|
transition-timing-function: ${Array.isArray(t)?t.join(", "):t};
|
|
43
43
|
|
|
44
|
-
${r&&
|
|
44
|
+
${r&&i`
|
|
45
45
|
&.${r} {
|
|
46
46
|
opacity: 1;
|
|
47
47
|
visibility: visible;
|