react-tooltip 5.8.2-beta.4 → 5.8.2

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.
@@ -1,6 +1,15 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react/jsx-runtime"),e=require("react");function n(t){return t.split("-")[1]}function o(t){return"y"===t?"height":"width"}function r(t){return t.split("-")[0]}function i(t){return["top","bottom"].includes(r(t))?"x":"y"}function l(t,e,l){let{reference:a,floating:s}=t;const c=a.x+a.width/2-s.width/2,u=a.y+a.height/2-s.height/2,f=i(e),d=o(f),p=a[d]/2-s[d]/2,h="x"===f;let m;switch(r(e)){case"top":m={x:c,y:a.y-s.height};break;case"bottom":m={x:c,y:a.y+a.height};break;case"right":m={x:a.x+a.width,y:u};break;case"left":m={x:a.x-s.width,y:u};break;default:m={x:a.x,y:a.y}}switch(n(e)){case"start":m[f]-=p*(l&&h?-1:1);break;case"end":m[f]+=p*(l&&h?-1:1)}return m}function a(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function s(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}async function c(t,e){var n;void 0===e&&(e={});const{x:o,y:r,platform:i,rects:l,elements:c,strategy:u}=t,{boundary:f="clippingAncestors",rootBoundary:d="viewport",elementContext:p="floating",altBoundary:h=!1,padding:m=0}=e,g=a(m),y=c[h?"floating"===p?"reference":"floating":p],v=s(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(y)))||n?y:y.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(c.floating)),boundary:f,rootBoundary:d,strategy:u})),w="floating"===p?{...l.floating,x:o,y:r}:l.reference,x=await(null==i.getOffsetParent?void 0:i.getOffsetParent(c.floating)),b=await(null==i.isElement?void 0:i.isElement(x))&&await(null==i.getScale?void 0:i.getScale(x))||{x:1,y:1},S=s(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:w,offsetParent:x,strategy:u}):w);return{top:(v.top-S.top+g.top)/b.y,bottom:(S.bottom-v.bottom+g.bottom)/b.y,left:(v.left-S.left+g.left)/b.x,right:(S.right-v.right+g.right)/b.x}}const u=Math.min,f=Math.max;function d(t,e,n){return f(t,u(e,n))}const p=["top","right","bottom","left"].reduce(((t,e)=>t.concat(e,e+"-start",e+"-end")),[]),h={left:"right",right:"left",bottom:"top",top:"bottom"};function m(t){return t.replace(/left|right|bottom|top/g,(t=>h[t]))}function g(t,e,r){void 0===r&&(r=!1);const l=n(t),a=i(t),s=o(a);let c="x"===a?l===(r?"end":"start")?"right":"left":"start"===l?"bottom":"top";return e.reference[s]>e.floating[s]&&(c=m(c)),{main:c,cross:m(c)}}const y={start:"end",end:"start"};function v(t){return t.replace(/start|end/g,(t=>y[t]))}const w=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var o;const{placement:i,middlewareData:l,rects:a,initialPlacement:s,platform:u,elements:f}=e,{mainAxis:d=!0,crossAxis:p=!0,fallbackPlacements:h,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:x=!0,...b}=t,S=r(i),T=r(s)===s,R=await(null==u.isRTL?void 0:u.isRTL(f.floating)),A=h||(T||!x?[m(s)]:function(t){const e=m(t);return[v(t),e,v(e)]}(s));h||"none"===w||A.push(...function(t,e,o,i){const l=n(t);let a=function(t,e,n){const o=["left","right"],r=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(t){case"top":case"bottom":return n?e?r:o:e?o:r;case"left":case"right":return e?i:l;default:return[]}}(r(t),"start"===o,i);return l&&(a=a.map((t=>t+"-"+l)),e&&(a=a.concat(a.map(v)))),a}(s,x,w,R));const E=[s,...A],L=await c(e,b),_=[];let O=(null==(o=l.flip)?void 0:o.overflows)||[];if(d&&_.push(L[S]),p){const{main:t,cross:e}=g(i,a,R);_.push(L[t],L[e])}if(O=[...O,{placement:i,overflows:_}],!_.every((t=>t<=0))){var k,P;const t=((null==(k=l.flip)?void 0:k.index)||0)+1,e=E[t];if(e)return{data:{index:t,overflows:O},reset:{placement:e}};let n=null==(P=O.find((t=>t.overflows[0]<=0)))?void 0:P.placement;if(!n)switch(y){case"bestFit":{var D;const t=null==(D=O.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:D[0];t&&(n=t);break}case"initialPlacement":n=s}if(i!==n)return{reset:{placement:n}}}return{}}}};const x=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){const{x:o,y:l}=e,a=await async function(t,e){const{placement:o,platform:l,elements:a}=t,s=await(null==l.isRTL?void 0:l.isRTL(a.floating)),c=r(o),u=n(o),f="x"===i(o),d=["left","top"].includes(c)?-1:1,p=s&&f?-1:1,h="function"==typeof e?e(t):e;let{mainAxis:m,crossAxis:g,alignmentAxis:y}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...h};return u&&"number"==typeof y&&(g="end"===u?-1*y:y),f?{x:g*p,y:m*d}:{x:m*d,y:g*p}}(e,t);return{x:o+a.x,y:l+a.y,data:a}}}};const b=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:l}=e,{mainAxis:a=!0,crossAxis:s=!1,limiter:u={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...f}=t,p={x:n,y:o},h=await c(e,f),m=i(r(l)),g="x"===m?"y":"x";let y=p[m],v=p[g];if(a){const t="y"===m?"bottom":"right";y=d(y+h["y"===m?"top":"left"],y,y-h[t])}if(s){const t="y"===g?"bottom":"right";v=d(v+h["y"===g?"top":"left"],v,v-h[t])}const w=u.fn({...e,[m]:y,[g]:v});return{...w,data:{x:w.x-n,y:w.y-o}}}}};function S(t){var e;return(null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function T(t){return S(t).getComputedStyle(t)}const R=Math.min,A=Math.max,E=Math.round;function L(t){const e=T(t);let n=parseFloat(e.width),o=parseFloat(e.height);const r=t.offsetWidth,i=t.offsetHeight,l=E(n)!==r||E(o)!==i;return l&&(n=r,o=i),{width:n,height:o,fallback:l}}function _(t){return N(t)?(t.nodeName||"").toLowerCase():""}let O;function k(){if(O)return O;const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?(O=t.brands.map((t=>t.brand+"/"+t.version)).join(" "),O):navigator.userAgent}function P(t){return t instanceof S(t).HTMLElement}function D(t){return t instanceof S(t).Element}function N(t){return t instanceof S(t).Node}function j(t){if("undefined"==typeof ShadowRoot)return!1;return t instanceof S(t).ShadowRoot||t instanceof ShadowRoot}function C(t){const{overflow:e,overflowX:n,overflowY:o,display:r}=T(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!["inline","contents"].includes(r)}function I(t){return["table","td","th"].includes(_(t))}function F(t){const e=/firefox/i.test(k()),n=T(t),o=n.backdropFilter||n.WebkitBackdropFilter;return"none"!==n.transform||"none"!==n.perspective||!!o&&"none"!==o||e&&"filter"===n.willChange||e&&!!n.filter&&"none"!==n.filter||["transform","perspective"].some((t=>n.willChange.includes(t)))||["paint","layout","strict","content"].some((t=>{const e=n.contain;return null!=e&&e.includes(t)}))}function H(){return!/^((?!chrome|android).)*safari/i.test(k())}function W(t){return["html","body","#document"].includes(_(t))}function B(t){return D(t)?t:t.contextElement}const $={x:1,y:1};function M(t){const e=B(t);if(!P(e))return $;const n=e.getBoundingClientRect(),{width:o,height:r,fallback:i}=L(e);let l=(i?E(n.width):n.width)/o,a=(i?E(n.height):n.height)/r;return l&&Number.isFinite(l)||(l=1),a&&Number.isFinite(a)||(a=1),{x:l,y:a}}function U(t,e,n,o){var r,i;void 0===e&&(e=!1),void 0===n&&(n=!1);const l=t.getBoundingClientRect(),a=B(t);let s=$;e&&(o?D(o)&&(s=M(o)):s=M(t));const c=a?S(a):window,u=!H()&&n;let f=(l.left+(u&&(null==(r=c.visualViewport)?void 0:r.offsetLeft)||0))/s.x,d=(l.top+(u&&(null==(i=c.visualViewport)?void 0:i.offsetTop)||0))/s.y,p=l.width/s.x,h=l.height/s.y;if(a){const t=S(a),e=o&&D(o)?S(o):o;let n=t.frameElement;for(;n&&o&&e!==t;){const t=M(n),e=n.getBoundingClientRect(),o=getComputedStyle(n);e.x+=(n.clientLeft+parseFloat(o.paddingLeft))*t.x,e.y+=(n.clientTop+parseFloat(o.paddingTop))*t.y,f*=t.x,d*=t.y,p*=t.x,h*=t.y,f+=e.x,d+=e.y,n=S(n).frameElement}}return{width:p,height:h,top:d,right:f+p,bottom:d+h,left:f,x:f,y:d}}function q(t){return((N(t)?t.ownerDocument:t.document)||window.document).documentElement}function V(t){return D(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function X(t){return U(q(t)).left+V(t).scrollLeft}function K(t){if("html"===_(t))return t;const e=t.assignedSlot||t.parentNode||j(t)&&t.host||q(t);return j(e)?e.host:e}function z(t){const e=K(t);return W(e)?e.ownerDocument.body:P(e)&&C(e)?e:z(e)}function Y(t,e){var n;void 0===e&&(e=[]);const o=z(t),r=o===(null==(n=t.ownerDocument)?void 0:n.body),i=S(o);return r?e.concat(i,i.visualViewport||[],C(o)?o:[]):e.concat(o,Y(o))}function J(t,e,n){return"viewport"===e?s(function(t,e){const n=S(t),o=q(t),r=n.visualViewport;let i=o.clientWidth,l=o.clientHeight,a=0,s=0;if(r){i=r.width,l=r.height;const t=H();(t||!t&&"fixed"===e)&&(a=r.offsetLeft,s=r.offsetTop)}return{width:i,height:l,x:a,y:s}}(t,n)):D(e)?s(function(t,e){const n=U(t,!0,"fixed"===e),o=n.top+t.clientTop,r=n.left+t.clientLeft,i=P(t)?M(t):{x:1,y:1};return{width:t.clientWidth*i.x,height:t.clientHeight*i.y,x:r*i.x,y:o*i.y}}(e,n)):s(function(t){const e=q(t),n=V(t),o=t.ownerDocument.body,r=A(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),i=A(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let l=-n.scrollLeft+X(t);const a=-n.scrollTop;return"rtl"===T(o).direction&&(l+=A(e.clientWidth,o.clientWidth)-r),{width:r,height:i,x:l,y:a}}(q(t)))}function Z(t){return P(t)&&"fixed"!==T(t).position?t.offsetParent:null}function G(t){const e=S(t);let n=Z(t);for(;n&&I(n)&&"static"===T(n).position;)n=Z(n);return n&&("html"===_(n)||"body"===_(n)&&"static"===T(n).position&&!F(n))?e:n||function(t){let e=K(t);for(;P(e)&&!W(e);){if(F(e))return e;e=K(e)}return null}(t)||e}function Q(t,e,n){const o=P(e),r=q(e),i=U(t,!0,"fixed"===n,e);let l={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if(o||!o&&"fixed"!==n)if(("body"!==_(e)||C(r))&&(l=V(e)),P(e)){const t=U(e,!0);a.x=t.x+e.clientLeft,a.y=t.y+e.clientTop}else r&&(a.x=X(r));return{x:i.left+l.scrollLeft-a.x,y:i.top+l.scrollTop-a.y,width:i.width,height:i.height}}const tt={getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:o,strategy:r}=t;const i="clippingAncestors"===n?function(t,e){const n=e.get(t);if(n)return n;let o=Y(t).filter((t=>D(t)&&"body"!==_(t))),r=null;const i="fixed"===T(t).position;let l=i?K(t):t;for(;D(l)&&!W(l);){const t=T(l),e=F(l);(i?e||r:e||"static"!==t.position||!r||!["absolute","fixed"].includes(r.position))?r=t:o=o.filter((t=>t!==l)),l=K(l)}return e.set(t,o),o}(e,this._c):[].concat(n),l=[...i,o],a=l[0],s=l.reduce(((t,n)=>{const o=J(e,n,r);return t.top=A(o.top,t.top),t.right=R(o.right,t.right),t.bottom=R(o.bottom,t.bottom),t.left=A(o.left,t.left),t}),J(e,a,r));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:n,strategy:o}=t;const r=P(n),i=q(n);if(n===i)return e;let l={scrollLeft:0,scrollTop:0},a={x:1,y:1};const s={x:0,y:0};if((r||!r&&"fixed"!==o)&&(("body"!==_(n)||C(i))&&(l=V(n)),P(n))){const t=U(n);a=M(n),s.x=t.x+n.clientLeft,s.y=t.y+n.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-l.scrollLeft*a.x+s.x,y:e.y*a.y-l.scrollTop*a.y+s.y}},isElement:D,getDimensions:function(t){return P(t)?L(t):t.getBoundingClientRect()},getOffsetParent:G,getDocumentElement:q,getScale:M,async getElementRects(t){let{reference:e,floating:n,strategy:o}=t;const r=this.getOffsetParent||G,i=this.getDimensions;return{reference:Q(e,await r(n),o),floating:{x:0,y:0,...await i(n)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>"rtl"===T(t).direction},et=(t,e,n)=>{const o=new Map,r={platform:tt,...n},i={...r.platform,_c:o};return(async(t,e,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),c=await(null==a.isRTL?void 0:a.isRTL(e));if(null==a&&console.error(["Floating UI: `platform` property was not passed to config. If you","want to use Floating UI on the web, install @floating-ui/dom","instead of the /core package. Otherwise, you can create your own","`platform`: https://floating-ui.com/docs/platform"].join(" ")),s.filter((t=>{let{name:e}=t;return"autoPlacement"===e||"flip"===e})).length>1)throw new Error(["Floating UI: duplicate `flip` and/or `autoPlacement` middleware","detected. This will lead to an infinite loop. Ensure only one of","either has been passed to the `middleware` array."].join(" "));t&&e||console.error(["Floating UI: The reference and/or floating element was not defined","when `computePosition()` was called. Ensure that both elements have","been created and can be measured."].join(" "));let u=await a.getElementRects({reference:t,floating:e,strategy:r}),{x:f,y:d}=l(u,o,c),p=o,h={},m=0;for(let n=0;n<s.length;n++){const{name:i,fn:g}=s[n],{x:y,y:v,data:w,reset:x}=await g({x:f,y:d,initialPlacement:o,placement:p,strategy:r,middlewareData:h,rects:u,platform:a,elements:{reference:t,floating:e}});f=null!=y?y:f,d=null!=v?v:d,h={...h,[i]:{...h[i],...w}},m>50&&console.warn(["Floating UI: The middleware lifecycle appears to be running in an","infinite loop. This is usually caused by a `reset` continually","being returned without a break condition."].join(" ")),x&&m<=50&&(m++,"object"==typeof x&&(x.placement&&(p=x.placement),x.rects&&(u=!0===x.rects?await a.getElementRects({reference:t,floating:e,strategy:r}):x.rects),({x:f,y:d}=l(u,p,c))),n=-1)}return{x:f,y:d,placement:p,strategy:r,middlewareData:h}})(t,e,{...r,platform:i})};var nt,ot={exports:{}};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),r={exports:{}},o={};
2
+ /** @license React v16.14.0
3
+ * react-jsx-runtime.development.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */
10
+ !function(e){!function(){var t=n.default,r=60103,o=60106;e.Fragment=60107;var i=60108,a=60114,l=60109,s=60110,c=60112,u=60113,f=60120,d=60115,p=60116,y=60121,m=60122,h=60117,v=60129,g=60131;if("function"==typeof Symbol&&Symbol.for){var w=Symbol.for;r=w("react.element"),o=w("react.portal"),e.Fragment=w("react.fragment"),i=w("react.strict_mode"),a=w("react.profiler"),l=w("react.provider"),s=w("react.context"),c=w("react.forward_ref"),u=w("react.suspense"),f=w("react.suspense_list"),d=w("react.memo"),p=w("react.lazy"),y=w("react.block"),m=w("react.server.block"),h=w("react.fundamental"),w("react.scope"),w("react.opaque.id"),v=w("react.debug_trace_mode"),w("react.offscreen"),g=w("react.legacy_hidden")}var b="function"==typeof Symbol&&Symbol.iterator;var x=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function S(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];_("error",e,n)}function _(e,t,n){var r=x.ReactDebugCurrentFrame,o="";if(A){var i=T(A.type),a=A._owner;o+=function(e,t,n){var r="";if(t){var o=t.fileName,i=o.replace(R,"");if(/^index\./.test(i)){var a=o.match(R);if(a){var l=a[1];if(l)i=l.replace(R,"")+"/"+i}}r=" (at "+i+":"+t.lineNumber+")"}else n&&(r=" (created by "+n+")");return"\n in "+(e||"Unknown")+r}(i,A._source,a&&T(a.type))}""!==(o+=r.getStackAddendum())&&(t+="%s",n=n.concat([o]));var l=n.map((function(e){return""+e}));l.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,l)}var R=/^(.*)[\\\/]/;function T(t){if(null==t)return null;if("number"==typeof t.tag&&S("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),"function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t;switch(t){case e.Fragment:return"Fragment";case o:return"Portal";case a:return"Profiler";case i:return"StrictMode";case u:return"Suspense";case f:return"SuspenseList"}if("object"==typeof t)switch(t.$$typeof){case s:return"Context.Consumer";case l:return"Context.Provider";case c:return m=t,h=t.render,v="ForwardRef",g=h.displayName||h.name||"",m.displayName||(""!==g?v+"("+g+")":v);case d:return T(t.type);case y:return T(t.render);case p:var n=1===(r=t)._status?r._result:null;if(n)return T(n)}var r,m,h,v,g;return null}var E={};x.ReactDebugCurrentFrame;var A=null;function O(e){A=e}var k,j,L,P=x.ReactCurrentOwner,D=Object.prototype.hasOwnProperty,N={key:!0,ref:!0,__self:!0,__source:!0};L={};function F(e,t,n,o,i){var a,l={},s=null,c=null;for(a in void 0!==n&&(s=""+n),function(e){if(D.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(t)&&(s=""+t.key),function(e){if(D.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}(t)&&(c=t.ref,function(e,t){if("string"==typeof e.ref&&P.current&&t&&P.current.stateNode!==t){var n=T(P.current.type);L[n]||(S('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',T(P.current.type),e.ref),L[n]=!0)}}(t,i)),t)D.call(t,a)&&!N.hasOwnProperty(a)&&(l[a]=t[a]);if(e&&e.defaultProps){var u=e.defaultProps;for(a in u)void 0===l[a]&&(l[a]=u[a])}if(s||c){var f="function"==typeof e?e.displayName||e.name||"Unknown":e;s&&function(e,t){var n=function(){k||(k=!0,S("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}(l,f),c&&function(e,t){var n=function(){j||(j=!0,S("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}(l,f)}return function(e,t,n,o,i,a,l){var s={$$typeof:r,type:e,key:t,ref:n,props:l,_owner:a,_store:{}};return Object.defineProperty(s._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(s,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(s,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(s.props),Object.freeze(s)),s}(e,s,c,i,o,P.current,l)}var $,C=x.ReactCurrentOwner;function I(e){A=e}function W(e){return"object"==typeof e&&null!==e&&e.$$typeof===r}function U(){if(C.current){var e=T(C.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}x.ReactDebugCurrentFrame,$=!1;var H={};function B(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var t=U();if(!t){var n="string"==typeof e?e:e.displayName||e.name;n&&(t="\n\nCheck the top-level render call using <"+n+">.")}return t}(t);if(!H[n]){H[n]=!0;var r="";e&&e._owner&&e._owner!==C.current&&(r=" It was passed a child from "+T(e._owner.type)+"."),I(e),S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,r),I(null)}}}function M(e,t){if("object"==typeof e)if(Array.isArray(e))for(var n=0;n<e.length;n++){var r=e[n];W(r)&&B(r,t)}else if(W(e))e._store&&(e._store.validated=!0);else if(e){var o=function(e){if(null===e||"object"!=typeof e)return null;var t=b&&e[b]||e["@@iterator"];return"function"==typeof t?t:null}(e);if("function"==typeof o&&o!==e.entries)for(var i,a=o.call(e);!(i=a.next()).done;)W(i.value)&&B(i.value,t)}}function q(e){var t,n=e.type;if(null!=n&&"string"!=typeof n){if("function"==typeof n)t=n.propTypes;else{if("object"!=typeof n||n.$$typeof!==c&&n.$$typeof!==d)return;t=n.propTypes}if(t){var r=T(n);!function(e,t,n,r,o){var i=Function.call.bind(Object.prototype.hasOwnProperty);for(var a in e)if(i(e,a)){var l=void 0;try{if("function"!=typeof e[a]){var s=Error((r||"React class")+": "+n+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[a]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw s.name="Invariant Violation",s}l=e[a](t,a,r,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){l=e}!l||l instanceof Error||(O(o),S("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",r||"React class",n,a,typeof l),O(null)),l instanceof Error&&!(l.message in E)&&(E[l.message]=!0,O(o),S("Failed %s type: %s",n,l.message),O(null))}}(t,e.props,"prop",r,e)}else if(void 0!==n.PropTypes&&!$){$=!0,S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",T(n)||"Unknown")}"function"!=typeof n.getDefaultProps||n.getDefaultProps.isReactClassApproved||S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function V(t,n,o,w,b,x){var _=function(t){return"string"==typeof t||"function"==typeof t||t===e.Fragment||t===a||t===v||t===i||t===u||t===f||t===g||"object"==typeof t&&null!==t&&(t.$$typeof===p||t.$$typeof===d||t.$$typeof===l||t.$$typeof===s||t.$$typeof===c||t.$$typeof===h||t.$$typeof===y||t[0]===m)}(t);if(!_){var R="";(void 0===t||"object"==typeof t&&null!==t&&0===Object.keys(t).length)&&(R+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var E,A=function(e){return void 0!==e?"\n\nCheck your code at "+e.fileName.replace(/^.*[\\\/]/,"")+":"+e.lineNumber+".":""}(b);R+=A||U(),null===t?E="null":Array.isArray(t)?E="array":void 0!==t&&t.$$typeof===r?(E="<"+(T(t.type)||"Unknown")+" />",R=" Did you accidentally export a JSX literal instead of a component?"):E=typeof t,S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",E,R)}var O=F(t,n,o,b,x);if(null==O)return O;if(_){var k=n.children;if(void 0!==k)if(w)if(Array.isArray(k)){for(var j=0;j<k.length;j++)M(k[j],t);Object.freeze&&Object.freeze(k)}else S("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else M(k,t)}return t===e.Fragment?function(e){for(var t=Object.keys(e.props),n=0;n<t.length;n++){var r=t[n];if("children"!==r&&"key"!==r){I(e),S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",r),I(null);break}}null!==e.ref&&(I(e),S("Invalid attribute `ref` supplied to `React.Fragment`."),I(null))}(O):q(O),O}var Y=function(e,t,n){return V(e,t,n,!1)},z=function(e,t,n){return V(e,t,n,!0)};e.jsx=Y,e.jsxs=z}()}(o),r.exports=o;var i,a={exports:{}};
2
11
  /*!
3
12
  Copyright (c) 2018 Jed Watson.
4
13
  Licensed under the MIT License (MIT), see
5
14
  http://jedwatson.github.io/classnames
6
- */nt=ot,function(){var t={}.hasOwnProperty;function e(){for(var n=[],o=0;o<arguments.length;o++){var r=arguments[o];if(r){var i=typeof r;if("string"===i||"number"===i)n.push(r);else if(Array.isArray(r)){if(r.length){var l=e.apply(null,r);l&&n.push(l)}}else if("object"===i){if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]")){n.push(r.toString());continue}for(var a in r)t.call(r,a)&&r[a]&&n.push(a)}}}return n.join(" ")}nt.exports?(e.default=e,nt.exports=e):window.classNames=e}();var rt=ot.exports;const it=(t,e,n)=>{let o=null;return function(...r){o&&clearTimeout(o),o=setTimeout((()=>{o=null,n||t.apply(this,r)}),e)}},lt=({content:e})=>t.jsx("span",{dangerouslySetInnerHTML:{__html:e}}),at={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},st={getTooltipData:()=>at},ct=e.createContext(st);function ut(t="DEFAULT_TOOLTIP_ID"){return e.useContext(ct).getTooltipData(t)}const ft=async({elementReference:t=null,tooltipReference:e=null,tooltipArrowReference:r=null,place:l="top",offset:s=10,strategy:c="absolute",middlewares:u=[x(Number(s)),w(),b({padding:5})]})=>{if(!t)return{tooltipStyles:{},tooltipArrowStyles:{}};if(null===e)return{tooltipStyles:{},tooltipArrowStyles:{}};const f=u;return r?(f.push({name:"arrow",options:p={element:r,padding:5},async fn(t){const{element:e,padding:r=0}=p||{},{x:l,y:s,placement:c,rects:u,platform:f}=t;if(null==e)return console.warn("Floating UI: No `element` was passed to the `arrow` middleware."),{};const h=a(r),m={x:l,y:s},g=i(c),y=o(g),v=await f.getDimensions(e),w="y"===g?"top":"left",x="y"===g?"bottom":"right",b=u.reference[y]+u.reference[g]-m[g]-u.floating[y],S=m[g]-u.reference[g],T=await(null==f.getOffsetParent?void 0:f.getOffsetParent(e));let R=T?"y"===g?T.clientHeight||0:T.clientWidth||0:0;0===R&&(R=u.floating[y]);const A=b/2-S/2,E=h[w],L=R-v[y]-h[x],_=R/2-v[y]/2+A,O=d(E,_,L),k=null!=n(c)&&_!=O&&u.reference[y]/2-(_<E?h[w]:h[x])-v[y]/2<0;return{[g]:m[g]-(k?_<E?E-_:L-_:0),data:{[g]:O,centerOffset:_-O}}}}),et(t,e,{placement:l,strategy:c,middleware:f}).then((({x:t,y:e,placement:n,middlewareData:o})=>{var r,i;const l={left:`${t}px`,top:`${e}px`},{x:a,y:s}=null!==(r=o.arrow)&&void 0!==r?r:{x:0,y:0};return{tooltipStyles:l,tooltipArrowStyles:{left:null!=a?`${a}px`:"",top:null!=s?`${s}px`:"",right:"",bottom:"",[null!==(i={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==i?i:"bottom"]:"-4px"}}}))):et(t,e,{placement:"bottom",strategy:c,middleware:f}).then((({x:t,y:e})=>({tooltipStyles:{left:`${t}px`,top:`${e}px`},tooltipArrowStyles:{}})));var p};var dt={tooltip:"styles-module_tooltip__mnnfp",fixed:"styles-module_fixed__7ciUi",arrow:"styles-module_arrow__K0L3T","no-arrow":"styles-module_no-arrow__KcFZN",clickable:"styles-module_clickable__Bv9o7",show:"styles-module_show__2NboJ",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const pt=({id:n,className:o,classNameArrow:r,variant:i="dark",anchorId:l,anchorSelect:a,place:s="top",offset:c=10,events:u=["hover"],positionStrategy:f="absolute",middlewares:d,wrapper:p,children:h=null,delayShow:m=0,delayHide:g=0,float:y=!1,noArrow:v=!1,clickable:w=!1,closeOnEsc:x=!1,style:b,position:S,afterShow:T,afterHide:R,content:A,html:E,isOpen:L,setIsOpen:_,activeAnchor:O,setActiveAnchor:k})=>{const P=e.useRef(null),D=e.useRef(null),N=e.useRef(null),j=e.useRef(null),[C,I]=e.useState({}),[F,H]=e.useState({}),[W,B]=e.useState(!1),[$,M]=e.useState(!1),U=e.useRef(!1),q=e.useRef(null),{anchorRefs:V,setActiveAnchor:X}=ut(n),K=e.useRef(!1),[z,Y]=e.useState([]),J=e.useRef(!1);e.useLayoutEffect((()=>(J.current=!0,()=>{J.current=!1})),[]),e.useEffect((()=>{if(!W){const t=setTimeout((()=>{M(!1)}),150);return()=>{clearTimeout(t)}}return()=>null}),[W]);const Z=t=>{J.current&&(t&&M(!0),setTimeout((()=>{J.current&&(null==_||_(t),void 0===L&&B(t))}),10))};e.useEffect((()=>{if(void 0===L)return()=>null;L&&M(!0);const t=setTimeout((()=>{B(L)}),10);return()=>{clearTimeout(t)}}),[L]),e.useEffect((()=>{W!==U.current&&(U.current=W,W?null==T||T():null==R||R())}),[W]);const G=(t=g)=>{j.current&&clearTimeout(j.current),j.current=setTimeout((()=>{K.current||Z(!1)}),t)},Q=t=>{var e;if(!t)return;m?(N.current&&clearTimeout(N.current),N.current=setTimeout((()=>{Z(!0)}),m)):Z(!0);const n=null!==(e=t.currentTarget)&&void 0!==e?e:t.target;k(n),X({current:n}),j.current&&clearTimeout(j.current)},tt=()=>{w?G(g||100):g?G():Z(!1),N.current&&clearTimeout(N.current)},et=({x:t,y:e})=>{ft({place:s,offset:c,elementReference:{getBoundingClientRect:()=>({x:t,y:e,width:0,height:0,top:e,left:t,right:t,bottom:e})},tooltipReference:P.current,tooltipArrowReference:D.current,strategy:f,middlewares:d}).then((t=>{Object.keys(t.tooltipStyles).length&&I(t.tooltipStyles),Object.keys(t.tooltipArrowStyles).length&&H(t.tooltipArrowStyles)}))},nt=t=>{if(!t)return;const e=t,n={x:e.clientX,y:e.clientY};et(n),q.current=n},ot=t=>{Q(t),g&&G()},at=t=>{const e=document.querySelector(`[id='${l}']`);(null==e?void 0:e.contains(t.target))||z.some((e=>e.contains(t.target)))||Z(!1)},st=t=>{"Escape"===t.key&&Z(!1)},ct=it(Q,50),pt=it(tt,50);e.useEffect((()=>{var t,e;const n=new Set(V);z.forEach((t=>{n.add({current:t})}));const o=document.querySelector(`[id='${l}']`);o&&n.add({current:o}),x&&window.addEventListener("keydown",st);const r=[];u.find((t=>"click"===t))&&(window.addEventListener("click",at),r.push({event:"click",listener:ot})),u.find((t=>"hover"===t))&&(r.push({event:"mouseenter",listener:ct},{event:"mouseleave",listener:pt},{event:"focus",listener:ct},{event:"blur",listener:pt}),y&&r.push({event:"mousemove",listener:nt}));const i=()=>{K.current=!0},a=()=>{K.current=!1,tt()};return w&&(null===(t=P.current)||void 0===t||t.addEventListener("mouseenter",i),null===(e=P.current)||void 0===e||e.addEventListener("mouseleave",a)),r.forEach((({event:t,listener:e})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.addEventListener(t,e)}))})),()=>{var t,e;u.find((t=>"click"===t))&&window.removeEventListener("click",at),x&&window.removeEventListener("keydown",st),w&&(null===(t=P.current)||void 0===t||t.removeEventListener("mouseenter",i),null===(e=P.current)||void 0===e||e.removeEventListener("mouseleave",a)),r.forEach((({event:t,listener:e})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.removeEventListener(t,e)}))}))}}),[$,V,z,x,u]),e.useEffect((()=>{let t=null!=a?a:"";!t&&n&&(t=`[data-tooltip-id='${n}']`);const e=new MutationObserver((e=>{const o=[];e.forEach((e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName){e.target.getAttribute("data-tooltip-id")===n&&o.push(e.target)}if("childList"===e.type&&(O&&[...e.removedNodes].some((t=>!!t.contains(O)&&(M(!1),Z(!1),k(null),!0))),t))try{const n=[...e.addedNodes].filter((t=>1===t.nodeType));o.push(...n.filter((e=>e.matches(t)))),o.push(...n.flatMap((e=>[...e.querySelectorAll(t)])))}catch(t){}})),o.length&&Y((t=>[...t,...o]))}));return e.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"]}),()=>{e.disconnect()}}),[n,a,O]),e.useEffect((()=>{S?et(S):y?q.current&&et(q.current):ft({place:s,offset:c,elementReference:O,tooltipReference:P.current,tooltipArrowReference:D.current,strategy:f,middlewares:d}).then((t=>{J.current&&(Object.keys(t.tooltipStyles).length&&I(t.tooltipStyles),Object.keys(t.tooltipArrowStyles).length&&H(t.tooltipArrowStyles))}))}),[W,O,A,E,s,c,f,S]),e.useEffect((()=>{var t;const e=document.querySelector(`[id='${l}']`),n=[...z,e];O&&n.includes(O)||k(null!==(t=z[0])&&void 0!==t?t:e)}),[l,z,O]),e.useEffect((()=>()=>{N.current&&clearTimeout(N.current),j.current&&clearTimeout(j.current)}),[]),e.useEffect((()=>{let t=a;if(!t&&n&&(t=`[data-tooltip-id='${n}']`),t)try{const e=Array.from(document.querySelectorAll(t));Y(e)}catch(t){Y([])}}),[n,a]);const ht=Boolean(E||A||h)&&W&&Object.keys(C).length>0;return $?t.jsxs(p,{id:n,role:"tooltip",className:rt("react-tooltip",dt.tooltip,dt[i],o,{[dt.show]:ht,[dt.fixed]:"fixed"===f,[dt.clickable]:w}),style:{...b,...C},ref:P,children:[E&&t.jsx(lt,{content:E})||A||h,t.jsx(p,{className:rt("react-tooltip-arrow",dt.arrow,r,{[dt["no-arrow"]]:v}),style:F,ref:D})]}):null};exports.Tooltip=({id:n,anchorId:o,anchorSelect:r,content:i,html:l,className:a,classNameArrow:s,variant:c="dark",place:u="top",offset:f=10,wrapper:d="div",children:p=null,events:h=["hover"],positionStrategy:m="absolute",middlewares:g,delayShow:y=0,delayHide:v=0,float:w=!1,noArrow:x=!1,clickable:b=!1,closeOnEsc:S=!1,style:T,position:R,isOpen:A,setIsOpen:E,afterShow:L,afterHide:_})=>{const[O,k]=e.useState(i),[P,D]=e.useState(l),[N,j]=e.useState(u),[C,I]=e.useState(c),[F,H]=e.useState(f),[W,B]=e.useState(y),[$,M]=e.useState(v),[U,q]=e.useState(w),[V,X]=e.useState(d),[K,z]=e.useState(h),[Y,J]=e.useState(m),[Z,G]=e.useState(null),{anchorRefs:Q,activeAnchor:tt}=ut(n),et=t=>null==t?void 0:t.getAttributeNames().reduce(((e,n)=>{var o;if(n.startsWith("data-tooltip-")){e[n.replace(/^data-tooltip-/,"")]=null!==(o=null==t?void 0:t.getAttribute(n))&&void 0!==o?o:null}return e}),{}),nt=t=>{const e={place:t=>{var e;j(null!==(e=t)&&void 0!==e?e:u)},content:t=>{k(null!=t?t:i)},html:t=>{D(null!=t?t:l)},variant:t=>{var e;I(null!==(e=t)&&void 0!==e?e:c)},offset:t=>{H(null===t?f:Number(t))},wrapper:t=>{var e;X(null!==(e=t)&&void 0!==e?e:d)},events:t=>{const e=null==t?void 0:t.split(" ");z(null!=e?e:h)},"position-strategy":t=>{var e;J(null!==(e=t)&&void 0!==e?e:m)},"delay-show":t=>{B(null===t?y:Number(t))},"delay-hide":t=>{M(null===t?v:Number(t))},float:t=>{q(null===t?w:Boolean(t))}};Object.values(e).forEach((t=>t(null))),Object.entries(t).forEach((([t,n])=>{var o;null===(o=e[t])||void 0===o||o.call(e,n)}))};e.useEffect((()=>{k(i)}),[i]),e.useEffect((()=>{D(l)}),[l]),e.useEffect((()=>{j(u)}),[u]),e.useEffect((()=>{var t;const e=new Set(Q);let i=r;if(!i&&n&&(i=`[data-tooltip-id='${n}']`),i)try{document.querySelectorAll(i).forEach((t=>{e.add({current:t})}))}catch(t){console.warn(`[react-tooltip] "${r}" is not a valid CSS selector`)}const l=document.querySelector(`[id='${o}']`);if(l&&e.add({current:l}),!e.size)return()=>null;const a=null!==(t=null!=Z?Z:l)&&void 0!==t?t:tt.current,s=new MutationObserver((t=>{t.forEach((t=>{var e;if(!a||"attributes"!==t.type||!(null===(e=t.attributeName)||void 0===e?void 0:e.startsWith("data-tooltip-")))return;const n=et(a);nt(n)}))})),c={attributes:!0,childList:!1,subtree:!1};if(a){const t=et(a);nt(t),s.observe(a,c)}return()=>{s.disconnect()}}),[Q,tt,Z,o,r]);const ot={id:n,anchorId:o,anchorSelect:r,className:a,classNameArrow:s,content:O,html:P,place:N,variant:C,offset:F,wrapper:V,events:K,positionStrategy:Y,middlewares:g,delayShow:W,delayHide:$,float:U,noArrow:x,clickable:b,closeOnEsc:S,style:T,position:R,isOpen:A,setIsOpen:E,afterShow:L,afterHide:_,activeAnchor:Z,setActiveAnchor:t=>G(t)};return p?t.jsx(pt,{...ot,children:p}):t.jsx(pt,{...ot})},exports.TooltipProvider=({children:n})=>{const[o,r]=e.useState({DEFAULT_TOOLTIP_ID:new Set}),[i,l]=e.useState({DEFAULT_TOOLTIP_ID:{current:null}}),a=(t,...e)=>{r((n=>{var o;const r=null!==(o=n[t])&&void 0!==o?o:new Set;return e.forEach((t=>r.add(t))),{...n,[t]:new Set(r)}}))},s=(t,...e)=>{r((n=>{const o=n[t];return o?(e.forEach((t=>o.delete(t))),{...n}):n}))},c=e.useCallback(((t="DEFAULT_TOOLTIP_ID")=>{var e,n;return{anchorRefs:null!==(e=o[t])&&void 0!==e?e:new Set,activeAnchor:null!==(n=i[t])&&void 0!==n?n:{current:null},attach:(...e)=>a(t,...e),detach:(...e)=>s(t,...e),setActiveAnchor:e=>((t,e)=>{l((n=>{var o;return(null===(o=n[t])||void 0===o?void 0:o.current)===e.current?n:{...n,[t]:e}}))})(t,e)}}),[o,i,a,s]),u=e.useMemo((()=>({getTooltipData:c})),[c]);return t.jsx(ct.Provider,{value:u,children:n})},exports.TooltipWrapper=({tooltipId:n,children:o,className:r,place:i,content:l,html:a,variant:s,offset:c,wrapper:u,events:f,positionStrategy:d,delayShow:p,delayHide:h})=>{const{attach:m,detach:g}=ut(n),y=e.useRef(null);return e.useEffect((()=>(m(y),()=>{g(y)})),[]),t.jsx("span",{ref:y,className:rt("react-tooltip-wrapper",r),"data-tooltip-place":i,"data-tooltip-content":l,"data-tooltip-html":a,"data-tooltip-variant":s,"data-tooltip-offset":c,"data-tooltip-wrapper":u,"data-tooltip-events":f,"data-tooltip-position-strategy":d,"data-tooltip-delay-show":p,"data-tooltip-delay-hide":h,children:o})},exports.autoPlacement=function(t){return void 0===t&&(t={}),{name:"autoPlacement",options:t,async fn(e){var o,i,l;const{rects:a,middlewareData:s,placement:u,platform:f,elements:d}=e,{alignment:h,allowedPlacements:m=p,autoAlignment:y=!0,...w}=t,x=void 0!==h||m===p?function(t,e,o){return(t?[...o.filter((e=>n(e)===t)),...o.filter((e=>n(e)!==t))]:o.filter((t=>r(t)===t))).filter((o=>!t||n(o)===t||!!e&&v(o)!==o))}(h||null,y,m):m,b=await c(e,w),S=(null==(o=s.autoPlacement)?void 0:o.index)||0,T=x[S];if(null==T)return{};const{main:R,cross:A}=g(T,a,await(null==f.isRTL?void 0:f.isRTL(d.floating)));if(u!==T)return{reset:{placement:x[0]}};const E=[b[r(T)],b[R],b[A]],L=[...(null==(i=s.autoPlacement)?void 0:i.overflows)||[],{placement:T,overflows:E}],_=x[S+1];if(_)return{data:{index:S+1,overflows:L},reset:{placement:_}};const O=L.slice().sort(((t,e)=>t.overflows[0]-e.overflows[0])),k=null==(l=O.find((t=>{let{overflows:e}=t;return e.every((t=>t<=0))})))?void 0:l.placement,P=k||O[0].placement;return P!==u?{data:{index:S+1,overflows:L},reset:{placement:P}}:{}}}},exports.flip=w,exports.inline=function(t){return void 0===t&&(t={}),{name:"inline",options:t,async fn(e){const{placement:n,elements:o,rects:l,platform:c,strategy:d}=e,{padding:p=2,x:h,y:m}=t,g=s(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({rect:l.reference,offsetParent:await(null==c.getOffsetParent?void 0:c.getOffsetParent(o.floating)),strategy:d}):l.reference),y=await(null==c.getClientRects?void 0:c.getClientRects(o.reference))||[],v=a(p);const w=await c.getElementRects({reference:{getBoundingClientRect:function(){if(2===y.length&&y[0].left>y[1].right&&null!=h&&null!=m)return y.find((t=>h>t.left-v.left&&h<t.right+v.right&&m>t.top-v.top&&m<t.bottom+v.bottom))||g;if(y.length>=2){if("x"===i(n)){const t=y[0],e=y[y.length-1],o="top"===r(n),i=t.top,l=e.bottom,a=o?t.left:e.left,s=o?t.right:e.right;return{top:i,bottom:l,left:a,right:s,width:s-a,height:l-i,x:a,y:i}}const t="left"===r(n),e=f(...y.map((t=>t.right))),o=u(...y.map((t=>t.left))),l=y.filter((n=>t?n.left===o:n.right===e)),a=l[0].top,s=l[l.length-1].bottom;return{top:a,bottom:s,left:o,right:e,width:e-o,height:s-a,x:o,y:a}}return g}},floating:o.floating,strategy:d});return l.reference.x!==w.reference.x||l.reference.y!==w.reference.y||l.reference.width!==w.reference.width||l.reference.height!==w.reference.height?{reset:{rects:w}}:{}}}},exports.offset=x,exports.shift=b,exports.size=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(e){const{placement:o,rects:i,platform:l,elements:a}=e,{apply:s=(()=>{}),...u}=t,d=await c(e,u),p=r(o),h=n(o);let m,g;"top"===p||"bottom"===p?(m=p,g=h===(await(null==l.isRTL?void 0:l.isRTL(a.floating))?"start":"end")?"left":"right"):(g=p,m="end"===h?"top":"bottom");const y=f(d.left,0),v=f(d.right,0),w=f(d.top,0),x=f(d.bottom,0),b={availableHeight:i.floating.height-(["left","right"].includes(o)?2*(0!==w||0!==x?w+x:f(d.top,d.bottom)):d[m]),availableWidth:i.floating.width-(["top","bottom"].includes(o)?2*(0!==y||0!==v?y+v:f(d.left,d.right)):d[g])};await s({...e,...b});const S=await l.getDimensions(a.floating);return i.floating.width!==S.width||i.floating.height!==S.height?{reset:{rects:!0}}:{}}}};
15
+ */i=a,function(){var e={}.hasOwnProperty;function t(){for(var n=[],r=0;r<arguments.length;r++){var o=arguments[r];if(o){var i=typeof o;if("string"===i||"number"===i)n.push(o);else if(Array.isArray(o)){if(o.length){var a=t.apply(null,o);a&&n.push(a)}}else if("object"===i){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){n.push(o.toString());continue}for(var l in o)e.call(o,l)&&o[l]&&n.push(l)}}}return n.join(" ")}i.exports?(t.default=t,i.exports=t):window.classNames=t}();var l=a.exports;const s=(e,t,n)=>{let r=null;return function(...o){r&&clearTimeout(r),r=setTimeout((()=>{r=null,n||e.apply(this,o)}),t)}},c=({content:e})=>r.exports.jsx("span",{dangerouslySetInnerHTML:{__html:e}}),u={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},f={getTooltipData:()=>u},d=e.createContext(f);function p(t="DEFAULT_TOOLTIP_ID"){return e.useContext(d).getTooltipData(t)}const y="undefined"!=typeof window?e.useLayoutEffect:e.useEffect;function m(e){return e.split("-")[1]}function h(e){return"y"===e?"height":"width"}function v(e){return e.split("-")[0]}function g(e){return["top","bottom"].includes(v(e))?"x":"y"}function w(e,t,n){let{reference:r,floating:o}=e;const i=r.x+r.width/2-o.width/2,a=r.y+r.height/2-o.height/2,l=g(t),s=h(l),c=r[s]/2-o[s]/2,u="x"===l;let f;switch(v(t)){case"top":f={x:i,y:r.y-o.height};break;case"bottom":f={x:i,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:a};break;case"left":f={x:r.x-o.width,y:a};break;default:f={x:r.x,y:r.y}}switch(m(t)){case"start":f[l]-=c*(n&&u?-1:1);break;case"end":f[l]+=c*(n&&u?-1:1)}return f}function b(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 x(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function S(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:l,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:d=!1,padding:p=0}=t,y=b(p),m=l[d?"floating"===f?"reference":"floating":f],h=x(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(l.floating)),boundary:c,rootBoundary:u,strategy:s})),v="floating"===f?{...a.floating,x:r,y:o}:a.reference,g=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),w=await(null==i.isElement?void 0:i.isElement(g))&&await(null==i.getScale?void 0:i.getScale(g))||{x:1,y:1},S=x(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:v,offsetParent:g,strategy:s}):v);return{top:(h.top-S.top+y.top)/w.y,bottom:(S.bottom-h.bottom+y.bottom)/w.y,left:(h.left-S.left+y.left)/w.x,right:(S.right-h.right+y.right)/w.x}}const _=Math.min,R=Math.max;function T(e,t,n){return R(e,_(t,n))}const E={left:"right",right:"left",bottom:"top",top:"bottom"};function A(e){return e.replace(/left|right|bottom|top/g,(e=>E[e]))}const O={start:"end",end:"start"};function k(e){return e.replace(/start|end/g,(e=>O[e]))}const j=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:o,rects:i,initialPlacement:a,platform:l,elements:s}=t,{mainAxis:c=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:y=!0,...w}=e,b=v(r),x=v(a)===a,_=await(null==l.isRTL?void 0:l.isRTL(s.floating)),R=f||(x||!y?[A(a)]:function(e){const t=A(e);return[k(e),t,k(t)]}(a));f||"none"===p||R.push(...function(e,t,n,r){const o=m(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}(v(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(k)))),i}(a,y,p,_));const T=[a,...R],E=await S(t,w),O=[];let j=(null==(n=o.flip)?void 0:n.overflows)||[];if(c&&O.push(E[b]),u){const{main:e,cross:t}=function(e,t,n){void 0===n&&(n=!1);const r=m(e),o=g(e),i=h(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=A(a)),{main:a,cross:A(a)}}(r,i,_);O.push(E[e],E[t])}if(j=[...j,{placement:r,overflows:O}],!O.every((e=>e<=0))){var L,P;const e=((null==(L=o.flip)?void 0:L.index)||0)+1,t=T[e];if(t)return{data:{index:e,overflows:j},reset:{placement:t}};let n=null==(P=j.find((e=>e.overflows[0]<=0)))?void 0:P.placement;if(!n)switch(d){case"bestFit":{var D;const e=null==(D=j.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:D[0];e&&(n=e);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}}}};const L=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=v(n),l=m(n),s="x"===g(n),c=["left","top"].includes(a)?-1:1,u=i&&s?-1:1,f="function"==typeof t?t(e):t;let{mainAxis:d,crossAxis:p,alignmentAxis:y}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return l&&"number"==typeof y&&(p="end"===l?-1*y:y),s?{x:p*u,y:d*c}:{x:d*c,y:p*u}}(t,e);return{x:n+o.x,y:r+o.y,data:o}}}};const P=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=e,c={x:n,y:r},u=await S(t,s),f=g(v(o)),d="x"===f?"y":"x";let p=c[f],y=c[d];if(i){const e="y"===f?"bottom":"right";p=T(p+u["y"===f?"top":"left"],p,p-u[e])}if(a){const e="y"===d?"bottom":"right";y=T(y+u["y"===d?"top":"left"],y,y-u[e])}const m=l.fn({...t,[f]:p,[d]:y});return{...m,data:{x:m.x-n,y:m.y-r}}}}};function D(e){var t;return(null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function N(e){return D(e).getComputedStyle(e)}const F=Math.min,$=Math.max,C=Math.round;function I(e){const t=N(e);let n=parseFloat(t.width),r=parseFloat(t.height);const o=e.offsetWidth,i=e.offsetHeight,a=C(n)!==o||C(r)!==i;return a&&(n=o,r=i),{width:n,height:r,fallback:a}}function W(e){return q(e)?(e.nodeName||"").toLowerCase():""}let U;function H(){if(U)return U;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(U=e.brands.map((e=>e.brand+"/"+e.version)).join(" "),U):navigator.userAgent}function B(e){return e instanceof D(e).HTMLElement}function M(e){return e instanceof D(e).Element}function q(e){return e instanceof D(e).Node}function V(e){if("undefined"==typeof ShadowRoot)return!1;return e instanceof D(e).ShadowRoot||e instanceof ShadowRoot}function Y(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=N(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function z(e){return["table","td","th"].includes(W(e))}function X(e){const t=/firefox/i.test(H()),n=N(e),r=n.backdropFilter||n.WebkitBackdropFilter;return"none"!==n.transform||"none"!==n.perspective||!!r&&"none"!==r||t&&"filter"===n.willChange||t&&!!n.filter&&"none"!==n.filter||["transform","perspective"].some((e=>n.willChange.includes(e)))||["paint","layout","strict","content"].some((e=>{const t=n.contain;return null!=t&&t.includes(e)}))}function K(){return!/^((?!chrome|android).)*safari/i.test(H())}function J(e){return["html","body","#document"].includes(W(e))}function Z(e){return M(e)?e:e.contextElement}const G={x:1,y:1};function Q(e){const t=Z(e);if(!B(t))return G;const n=t.getBoundingClientRect(),{width:r,height:o,fallback:i}=I(t);let a=(i?C(n.width):n.width)/r,l=(i?C(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}function ee(e,t,n,r){var o,i;void 0===t&&(t=!1),void 0===n&&(n=!1);const a=e.getBoundingClientRect(),l=Z(e);let s=G;t&&(r?M(r)&&(s=Q(r)):s=Q(e));const c=l?D(l):window,u=!K()&&n;let f=(a.left+(u&&(null==(o=c.visualViewport)?void 0:o.offsetLeft)||0))/s.x,d=(a.top+(u&&(null==(i=c.visualViewport)?void 0:i.offsetTop)||0))/s.y,p=a.width/s.x,y=a.height/s.y;if(l){const e=D(l),t=r&&M(r)?D(r):r;let n=e.frameElement;for(;n&&r&&t!==e;){const e=Q(n),t=n.getBoundingClientRect(),r=getComputedStyle(n);t.x+=(n.clientLeft+parseFloat(r.paddingLeft))*e.x,t.y+=(n.clientTop+parseFloat(r.paddingTop))*e.y,f*=e.x,d*=e.y,p*=e.x,y*=e.y,f+=t.x,d+=t.y,n=D(n).frameElement}}return{width:p,height:y,top:d,right:f+p,bottom:d+y,left:f,x:f,y:d}}function te(e){return((q(e)?e.ownerDocument:e.document)||window.document).documentElement}function ne(e){return M(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function re(e){return ee(te(e)).left+ne(e).scrollLeft}function oe(e){if("html"===W(e))return e;const t=e.assignedSlot||e.parentNode||V(e)&&e.host||te(e);return V(t)?t.host:t}function ie(e){const t=oe(e);return J(t)?t.ownerDocument.body:B(t)&&Y(t)?t:ie(t)}function ae(e,t){var n;void 0===t&&(t=[]);const r=ie(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=D(r);return o?t.concat(i,i.visualViewport||[],Y(r)?r:[]):t.concat(r,ae(r))}function le(e,t,n){return"viewport"===t?x(function(e,t){const n=D(e),r=te(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,l=0,s=0;if(o){i=o.width,a=o.height;const e=K();(e||!e&&"fixed"===t)&&(l=o.offsetLeft,s=o.offsetTop)}return{width:i,height:a,x:l,y:s}}(e,n)):M(t)?x(function(e,t){const n=ee(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=B(e)?Q(e):{x:1,y:1};return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n)):x(function(e){const t=te(e),n=ne(e),r=e.ownerDocument.body,o=$(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=$(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+re(e);const l=-n.scrollTop;return"rtl"===N(r).direction&&(a+=$(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:l}}(te(e)))}function se(e){return B(e)&&"fixed"!==N(e).position?e.offsetParent:null}function ce(e){const t=D(e);let n=se(e);for(;n&&z(n)&&"static"===N(n).position;)n=se(n);return n&&("html"===W(n)||"body"===W(n)&&"static"===N(n).position&&!X(n))?t:n||function(e){let t=oe(e);for(;B(t)&&!J(t);){if(X(t))return t;t=oe(t)}return null}(e)||t}function ue(e,t,n){const r=B(t),o=te(t),i=ee(e,!0,"fixed"===n,t);let a={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(r||!r&&"fixed"!==n)if(("body"!==W(t)||Y(o))&&(a=ne(t)),B(t)){const e=ee(t,!0);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=re(o));return{x:i.left+a.scrollLeft-l.x,y:i.top+a.scrollTop-l.y,width:i.width,height:i.height}}const fe={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let r=ae(e).filter((e=>M(e)&&"body"!==W(e))),o=null;const i="fixed"===N(e).position;let a=i?oe(e):e;for(;M(a)&&!J(a);){const e=N(a),t=X(a);(i?t||o:t||"static"!==e.position||!o||!["absolute","fixed"].includes(o.position))?o=e:r=r.filter((e=>e!==a)),a=oe(a)}return t.set(e,r),r}(t,this._c):[].concat(n),a=[...i,r],l=a[0],s=a.reduce(((e,n)=>{const r=le(t,n,o);return e.top=$(r.top,e.top),e.right=F(r.right,e.right),e.bottom=F(r.bottom,e.bottom),e.left=$(r.left,e.left),e}),le(t,l,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=B(n),i=te(n);if(n===i)return t;let a={scrollLeft:0,scrollTop:0},l={x:1,y:1};const s={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==W(n)||Y(i))&&(a=ne(n)),B(n))){const e=ee(n);l=Q(n),s.x=e.x+n.clientLeft,s.y=e.y+n.clientTop}return{width:t.width*l.x,height:t.height*l.y,x:t.x*l.x-a.scrollLeft*l.x+s.x,y:t.y*l.y-a.scrollTop*l.y+s.y}},isElement:M,getDimensions:function(e){return B(e)?I(e):e.getBoundingClientRect()},getOffsetParent:ce,getDocumentElement:te,getScale:Q,async getElementRects(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||ce,i=this.getDimensions;return{reference:ue(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===N(e).direction},de=(e,t,n)=>{const r=new Map,o={platform:fe,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,l=i.filter(Boolean),s=await(null==a.isRTL?void 0:a.isRTL(t));if(null==a&&console.error(["Floating UI: `platform` property was not passed to config. If you","want to use Floating UI on the web, install @floating-ui/dom","instead of the /core package. Otherwise, you can create your own","`platform`: https://floating-ui.com/docs/platform"].join(" ")),l.filter((e=>{let{name:t}=e;return"autoPlacement"===t||"flip"===t})).length>1)throw new Error(["Floating UI: duplicate `flip` and/or `autoPlacement` middleware","detected. This will lead to an infinite loop. Ensure only one of","either has been passed to the `middleware` array."].join(" "));e&&t||console.error(["Floating UI: The reference and/or floating element was not defined","when `computePosition()` was called. Ensure that both elements have","been created and can be measured."].join(" "));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=w(c,r,s),d=r,p={},y=0;for(let n=0;n<l.length;n++){const{name:i,fn:m}=l[n],{x:h,y:v,data:g,reset:b}=await m({x:u,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:p,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=h?h:u,f=null!=v?v:f,p={...p,[i]:{...p[i],...g}},y>50&&console.warn(["Floating UI: The middleware lifecycle appears to be running in an","infinite loop. This is usually caused by a `reset` continually","being returned without a break condition."].join(" ")),b&&y<=50&&(y++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(c=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:f}=w(c,d,s))),n=-1)}return{x:u,y:f,placement:d,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})},pe=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:n=null,place:r="top",offset:o=10,strategy:i="absolute",middlewares:a=[L(Number(o)),j(),P({padding:5})]})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{}};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{}};const l=a;return n?(l.push({name:"arrow",options:s={element:n,padding:5},async fn(e){const{element:t,padding:n=0}=s||{},{x:r,y:o,placement:i,rects:a,platform:l}=e;if(null==t)return console.warn("Floating UI: No `element` was passed to the `arrow` middleware."),{};const c=b(n),u={x:r,y:o},f=g(i),d=h(f),p=await l.getDimensions(t),y="y"===f?"top":"left",v="y"===f?"bottom":"right",w=a.reference[d]+a.reference[f]-u[f]-a.floating[d],x=u[f]-a.reference[f],S=await(null==l.getOffsetParent?void 0:l.getOffsetParent(t));let _=S?"y"===f?S.clientHeight||0:S.clientWidth||0:0;0===_&&(_=a.floating[d]);const R=w/2-x/2,E=c[y],A=_-p[d]-c[v],O=_/2-p[d]/2+R,k=T(E,O,A),j=null!=m(i)&&O!=k&&a.reference[d]/2-(O<E?c[y]:c[v])-p[d]/2<0;return{[f]:u[f]-(j?O<E?E-O:A-O:0),data:{[f]:k,centerOffset:O-k}}}}),de(e,t,{placement:r,strategy:i,middleware:l}).then((({x:e,y:t,placement:n,middlewareData:r})=>{var o,i;const a={left:`${e}px`,top:`${t}px`},{x:l,y:s}=null!==(o=r.arrow)&&void 0!==o?o:{x:0,y:0};return{tooltipStyles:a,tooltipArrowStyles:{left:null!=l?`${l}px`:"",top:null!=s?`${s}px`:"",right:"",bottom:"",[null!==(i={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==i?i:"bottom"]:"-4px"}}}))):de(e,t,{placement:"bottom",strategy:i,middleware:l}).then((({x:e,y:t})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{}})));var s};var ye={tooltip:"styles-module_tooltip__mnnfp",fixed:"styles-module_fixed__7ciUi",arrow:"styles-module_arrow__K0L3T","no-arrow":"styles-module_no-arrow__KcFZN",clickable:"styles-module_clickable__Bv9o7",show:"styles-module_show__2NboJ",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const me=({id:t,className:n,classNameArrow:o,variant:i="dark",anchorId:a,anchorSelect:u,place:f="top",offset:d=10,events:m=["hover"],positionStrategy:h="absolute",middlewares:v,wrapper:g,children:w=null,delayShow:b=0,delayHide:x=0,float:S=!1,noArrow:_=!1,clickable:R=!1,closeOnEsc:T=!1,style:E,position:A,afterShow:O,afterHide:k,content:j,html:L,isOpen:P,setIsOpen:D,activeAnchor:N,setActiveAnchor:F})=>{const $=e.useRef(null),C=e.useRef(null),I=e.useRef(null),W=e.useRef(null),[U,H]=e.useState({}),[B,M]=e.useState({}),[q,V]=e.useState(!1),[Y,z]=e.useState(!1),X=e.useRef(!1),K=e.useRef(null),{anchorRefs:J,setActiveAnchor:Z}=p(t),G=e.useRef(!1),[Q,ee]=e.useState([]),te=e.useRef(!1);y((()=>(te.current=!0,()=>{te.current=!1})),[]),e.useEffect((()=>{if(!q){const e=setTimeout((()=>{z(!1)}),150);return()=>{clearTimeout(e)}}return()=>null}),[q]);const ne=e=>{te.current&&(e&&z(!0),setTimeout((()=>{te.current&&(null==D||D(e),void 0===P&&V(e))}),10))};e.useEffect((()=>{if(void 0===P)return()=>null;P&&z(!0);const e=setTimeout((()=>{V(P)}),10);return()=>{clearTimeout(e)}}),[P]),e.useEffect((()=>{q!==X.current&&(X.current=q,q?null==O||O():null==k||k())}),[q]);const re=(e=x)=>{W.current&&clearTimeout(W.current),W.current=setTimeout((()=>{G.current||ne(!1)}),e)},oe=e=>{var t;if(!e)return;b?(I.current&&clearTimeout(I.current),I.current=setTimeout((()=>{ne(!0)}),b)):ne(!0);const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;F(n),Z({current:n}),W.current&&clearTimeout(W.current)},ie=()=>{R?re(x||100):x?re():ne(!1),I.current&&clearTimeout(I.current)},ae=({x:e,y:t})=>{pe({place:f,offset:d,elementReference:{getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})},tooltipReference:$.current,tooltipArrowReference:C.current,strategy:h,middlewares:v}).then((e=>{Object.keys(e.tooltipStyles).length&&H(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&M(e.tooltipArrowStyles)}))},le=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};ae(n),K.current=n},se=e=>{oe(e),x&&re()},ce=e=>{const t=document.querySelector(`[id='${a}']`);(null==t?void 0:t.contains(e.target))||Q.some((t=>t.contains(e.target)))||ne(!1)},ue=e=>{"Escape"===e.key&&ne(!1)},fe=s(oe,50),de=s(ie,50);e.useEffect((()=>{var e,t;const n=new Set(J);Q.forEach((e=>{n.add({current:e})}));const r=document.querySelector(`[id='${a}']`);r&&n.add({current:r}),T&&window.addEventListener("keydown",ue);const o=[];m.find((e=>"click"===e))&&(window.addEventListener("click",ce),o.push({event:"click",listener:se})),m.find((e=>"hover"===e))&&(o.push({event:"mouseenter",listener:fe},{event:"mouseleave",listener:de},{event:"focus",listener:fe},{event:"blur",listener:de}),S&&o.push({event:"mousemove",listener:le}));const i=()=>{G.current=!0},l=()=>{G.current=!1,ie()};return R&&(null===(e=$.current)||void 0===e||e.addEventListener("mouseenter",i),null===(t=$.current)||void 0===t||t.addEventListener("mouseleave",l)),o.forEach((({event:e,listener:t})=>{n.forEach((n=>{var r;null===(r=n.current)||void 0===r||r.addEventListener(e,t)}))})),()=>{var e,t;m.find((e=>"click"===e))&&window.removeEventListener("click",ce),T&&window.removeEventListener("keydown",ue),R&&(null===(e=$.current)||void 0===e||e.removeEventListener("mouseenter",i),null===(t=$.current)||void 0===t||t.removeEventListener("mouseleave",l)),o.forEach((({event:e,listener:t})=>{n.forEach((n=>{var r;null===(r=n.current)||void 0===r||r.removeEventListener(e,t)}))}))}}),[Y,J,Q,T,m]),e.useEffect((()=>{let e=null!=u?u:"";!e&&t&&(e=`[data-tooltip-id='${t}']`);const n=new MutationObserver((n=>{const r=[];n.forEach((n=>{if("attributes"===n.type&&"data-tooltip-id"===n.attributeName){n.target.getAttribute("data-tooltip-id")===t&&r.push(n.target)}if("childList"===n.type&&(N&&[...n.removedNodes].some((e=>!!e.contains(N)&&(z(!1),ne(!1),F(null),!0))),e))try{const t=[...n.addedNodes].filter((e=>1===e.nodeType));r.push(...t.filter((t=>t.matches(e)))),r.push(...t.flatMap((t=>[...t.querySelectorAll(e)])))}catch(e){}})),r.length&&ee((e=>[...e,...r]))}));return n.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"]}),()=>{n.disconnect()}}),[t,u,N]),e.useEffect((()=>{A?ae(A):S?K.current&&ae(K.current):pe({place:f,offset:d,elementReference:N,tooltipReference:$.current,tooltipArrowReference:C.current,strategy:h,middlewares:v}).then((e=>{te.current&&(Object.keys(e.tooltipStyles).length&&H(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&M(e.tooltipArrowStyles))}))}),[q,N,j,L,f,d,h,A]),e.useEffect((()=>{var e;const t=document.querySelector(`[id='${a}']`),n=[...Q,t];N&&n.includes(N)||F(null!==(e=Q[0])&&void 0!==e?e:t)}),[a,Q,N]),e.useEffect((()=>()=>{I.current&&clearTimeout(I.current),W.current&&clearTimeout(W.current)}),[]),e.useEffect((()=>{let e=u;if(!e&&t&&(e=`[data-tooltip-id='${t}']`),e)try{const t=Array.from(document.querySelectorAll(e));ee(t)}catch(e){ee([])}}),[t,u]);const me=Boolean(L||j||w)&&q&&Object.keys(U).length>0;return Y?r.exports.jsxs(g,{id:t,role:"tooltip",className:l("react-tooltip",ye.tooltip,ye[i],n,{[ye.show]:me,[ye.fixed]:"fixed"===h,[ye.clickable]:R}),style:{...E,...U},ref:$,children:[L&&r.exports.jsx(c,{content:L})||j||w,r.exports.jsx(g,{className:l("react-tooltip-arrow",ye.arrow,o,{[ye["no-arrow"]]:_}),style:B,ref:C})]}):null};exports.Tooltip=({id:t,anchorId:n,anchorSelect:o,content:i,html:a,className:l,classNameArrow:s,variant:c="dark",place:u="top",offset:f=10,wrapper:d="div",children:y=null,events:m=["hover"],positionStrategy:h="absolute",middlewares:v,delayShow:g=0,delayHide:w=0,float:b=!1,noArrow:x=!1,clickable:S=!1,closeOnEsc:_=!1,style:R,position:T,isOpen:E,setIsOpen:A,afterShow:O,afterHide:k})=>{const[j,L]=e.useState(i),[P,D]=e.useState(a),[N,F]=e.useState(u),[$,C]=e.useState(c),[I,W]=e.useState(f),[U,H]=e.useState(g),[B,M]=e.useState(w),[q,V]=e.useState(b),[Y,z]=e.useState(d),[X,K]=e.useState(m),[J,Z]=e.useState(h),[G,Q]=e.useState(null),{anchorRefs:ee,activeAnchor:te}=p(t),ne=e=>null==e?void 0:e.getAttributeNames().reduce(((t,n)=>{var r;if(n.startsWith("data-tooltip-")){t[n.replace(/^data-tooltip-/,"")]=null!==(r=null==e?void 0:e.getAttribute(n))&&void 0!==r?r:null}return t}),{}),re=e=>{const t={place:e=>{var t;F(null!==(t=e)&&void 0!==t?t:u)},content:e=>{L(null!=e?e:i)},html:e=>{D(null!=e?e:a)},variant:e=>{var t;C(null!==(t=e)&&void 0!==t?t:c)},offset:e=>{W(null===e?f:Number(e))},wrapper:e=>{var t;z(null!==(t=e)&&void 0!==t?t:d)},events:e=>{const t=null==e?void 0:e.split(" ");K(null!=t?t:m)},"position-strategy":e=>{var t;Z(null!==(t=e)&&void 0!==t?t:h)},"delay-show":e=>{H(null===e?g:Number(e))},"delay-hide":e=>{M(null===e?w:Number(e))},float:e=>{V(null===e?b:Boolean(e))}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,n])=>{var r;null===(r=t[e])||void 0===r||r.call(t,n)}))};e.useEffect((()=>{L(i)}),[i]),e.useEffect((()=>{D(a)}),[a]),e.useEffect((()=>{F(u)}),[u]),e.useEffect((()=>{var e;const r=new Set(ee);let i=o;if(!i&&t&&(i=`[data-tooltip-id='${t}']`),i)try{document.querySelectorAll(i).forEach((e=>{r.add({current:e})}))}catch(e){console.warn(`[react-tooltip] "${o}" is not a valid CSS selector`)}const a=document.querySelector(`[id='${n}']`);if(a&&r.add({current:a}),!r.size)return()=>null;const l=null!==(e=null!=G?G:a)&&void 0!==e?e:te.current,s=new MutationObserver((e=>{e.forEach((e=>{var t;if(!l||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=ne(l);re(n)}))})),c={attributes:!0,childList:!1,subtree:!1};if(l){const e=ne(l);re(e),s.observe(l,c)}return()=>{s.disconnect()}}),[ee,te,G,n,o]);const oe={id:t,anchorId:n,anchorSelect:o,className:l,classNameArrow:s,content:j,html:P,place:N,variant:$,offset:I,wrapper:Y,events:X,positionStrategy:J,middlewares:v,delayShow:U,delayHide:B,float:q,noArrow:x,clickable:S,closeOnEsc:_,style:R,position:T,isOpen:E,setIsOpen:A,afterShow:O,afterHide:k,activeAnchor:G,setActiveAnchor:e=>Q(e)};return y?r.exports.jsx(me,{...oe,children:y}):r.exports.jsx(me,{...oe})},exports.TooltipProvider=({children:t})=>{const[n,o]=e.useState({DEFAULT_TOOLTIP_ID:new Set}),[i,a]=e.useState({DEFAULT_TOOLTIP_ID:{current:null}}),l=(e,...t)=>{o((n=>{var r;const o=null!==(r=n[e])&&void 0!==r?r:new Set;return t.forEach((e=>o.add(e))),{...n,[e]:new Set(o)}}))},s=(e,...t)=>{o((n=>{const r=n[e];return r?(t.forEach((e=>r.delete(e))),{...n}):n}))},c=e.useCallback(((e="DEFAULT_TOOLTIP_ID")=>{var t,r;return{anchorRefs:null!==(t=n[e])&&void 0!==t?t:new Set,activeAnchor:null!==(r=i[e])&&void 0!==r?r:{current:null},attach:(...t)=>l(e,...t),detach:(...t)=>s(e,...t),setActiveAnchor:t=>((e,t)=>{a((n=>{var r;return(null===(r=n[e])||void 0===r?void 0:r.current)===t.current?n:{...n,[e]:t}}))})(e,t)}}),[n,i,l,s]),u=e.useMemo((()=>({getTooltipData:c})),[c]);return r.exports.jsx(d.Provider,{value:u,children:t})},exports.TooltipWrapper=({tooltipId:t,children:n,className:o,place:i,content:a,html:s,variant:c,offset:u,wrapper:f,events:d,positionStrategy:y,delayShow:m,delayHide:h})=>{const{attach:v,detach:g}=p(t),w=e.useRef(null);return e.useEffect((()=>(v(w),()=>{g(w)})),[]),r.exports.jsx("span",{ref:w,className:l("react-tooltip-wrapper",o),"data-tooltip-place":i,"data-tooltip-content":a,"data-tooltip-html":s,"data-tooltip-variant":c,"data-tooltip-offset":u,"data-tooltip-wrapper":f,"data-tooltip-events":d,"data-tooltip-position-strategy":y,"data-tooltip-delay-show":m,"data-tooltip-delay-hide":h,children:n})};
@@ -1,6 +1,4 @@
1
1
  import React, { ElementType, ReactNode, CSSProperties, PropsWithChildren } from 'react';
2
- import { Middleware } from '@floating-ui/dom';
3
- export { Middleware, autoPlacement, flip, inline, offset, shift, size } from '@floating-ui/dom';
4
2
 
5
3
  type PlacesType = 'top' | 'right' | 'bottom' | 'left'
6
4
 
@@ -27,6 +25,12 @@ type DataAttribute =
27
25
  | 'delay-hide'
28
26
  | 'float'
29
27
 
28
+ /**
29
+ * @description floating-ui middleware
30
+ */
31
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
32
+ type Middleware = any
33
+
30
34
  interface IPosition {
31
35
  x: number
32
36
  y: number
@@ -118,4 +122,4 @@ declare const TooltipProvider: React.FC<PropsWithChildren>;
118
122
  */
119
123
  declare const TooltipWrapper: ({ tooltipId, children, className, place, content, html, variant, offset, wrapper, events, positionStrategy, delayShow, delayHide, }: ITooltipWrapper) => JSX.Element;
120
124
 
121
- export { ChildrenType, DataAttribute, EventsType, IPosition, ITooltipController as ITooltip, ITooltipWrapper, PlacesType, PositionStrategy, TooltipController as Tooltip, TooltipProvider, TooltipWrapper, VariantType, WrapperType };
125
+ export { ChildrenType, DataAttribute, EventsType, IPosition, ITooltipController as ITooltip, ITooltipWrapper, Middleware, PlacesType, PositionStrategy, TooltipController as Tooltip, TooltipProvider, TooltipWrapper, VariantType, WrapperType };