react-tooltip 5.10.1-beta-9 → 5.10.1-beta-10

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,15 +1 @@
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,l=60114,a=60109,s=60110,c=60112,u=60113,f=60120,p=60115,d=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"),l=w("react.profiler"),a=w("react.provider"),s=w("react.context"),c=w("react.forward_ref"),u=w("react.suspense"),f=w("react.suspense_list"),p=w("react.memo"),d=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),l=A._owner;o+=function(e,t,n){var r="";if(t){var o=t.fileName,i=o.replace(R,"");if(/^index\./.test(i)){var l=o.match(R);if(l){var a=l[1];if(a)i=a.replace(R,"")+"/"+i}}r=" (at "+i+":"+t.lineNumber+")"}else n&&(r=" (created by "+n+")");return"\n in "+(e||"Unknown")+r}(i,A._source,l&&T(l.type))}""!==(o+=r.getStackAddendum())&&(t+="%s",n=n.concat([o]));var a=n.map((function(e){return""+e}));a.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,a)}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 l: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 a: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 p:return T(t.type);case y:return T(t.render);case d: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 C(e,t,n,o,i){var l,a={},s=null,c=null;for(l 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,l)&&!N.hasOwnProperty(l)&&(a[l]=t[l]);if(e&&e.defaultProps){var u=e.defaultProps;for(l in u)void 0===a[l]&&(a[l]=u[l])}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})}(a,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})}(a,f)}return function(e,t,n,o,i,l,a){var s={$$typeof:r,type:e,key:t,ref:n,props:a,_owner:l,_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,a)}var $,F=x.ReactCurrentOwner;function I(e){A=e}function W(e){return"object"==typeof e&&null!==e&&e.$$typeof===r}function U(){if(F.current){var e=T(F.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!==F.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,l=o.call(e);!(i=l.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!==p)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 l in e)if(i(e,l)){var a=void 0;try{if("function"!=typeof e[l]){var s=Error((r||"React class")+": "+n+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw s.name="Invariant Violation",s}a=e[l](t,l,r,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){a=e}!a||a 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,l,typeof a),O(null)),a instanceof Error&&!(a.message in E)&&(E[a.message]=!0,O(o),S("Failed %s type: %s",n,a.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===l||t===v||t===i||t===u||t===f||t===g||"object"==typeof t&&null!==t&&(t.$$typeof===d||t.$$typeof===p||t.$$typeof===a||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=C(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,l={exports:{}};
11
- /*!
12
- Copyright (c) 2018 Jed Watson.
13
- Licensed under the MIT License (MIT), see
14
- http://jedwatson.github.io/classnames
15
- */i=l,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 l=t.apply(null,o);l&&n.push(l)}}else if("object"===i){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){n.push(o.toString());continue}for(var a in o)e.call(o,a)&&o[a]&&n.push(a)}}}return n.join(" ")}i.exports?(t.default=t,i.exports=t):window.classNames=t}();var a=l.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={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},u={getTooltipData:()=>c},f=e.createContext(u);function p(t="DEFAULT_TOOLTIP_ID"){return e.useContext(f).getTooltipData(t)}const d="undefined"!=typeof window?e.useLayoutEffect:e.useEffect;function y(e){return e.split("-")[1]}function m(e){return"y"===e?"height":"width"}function h(e){return e.split("-")[0]}function v(e){return["top","bottom"].includes(h(e))?"x":"y"}function g(e,t,n){let{reference:r,floating:o}=e;const i=r.x+r.width/2-o.width/2,l=r.y+r.height/2-o.height/2,a=v(t),s=m(a),c=r[s]/2-o[s]/2,u="x"===a;let f;switch(h(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:l};break;case"left":f={x:r.x-o.width,y:l};break;default:f={x:r.x,y:r.y}}switch(y(t)){case"start":f[a]-=c*(n&&u?-1:1);break;case"end":f[a]+=c*(n&&u?-1:1)}return f}function w(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 b(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function x(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:l,elements:a,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:p=!1,padding:d=0}=t,y=w(d),m=a[p?"floating"===f?"reference":"floating":f],h=b(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(a.floating)),boundary:c,rootBoundary:u,strategy:s})),v="floating"===f?{...l.floating,x:r,y:o}:l.reference,g=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),x=await(null==i.isElement?void 0:i.isElement(g))&&await(null==i.getScale?void 0:i.getScale(g))||{x:1,y:1},S=b(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:v,offsetParent:g,strategy:s}):v);return{top:(h.top-S.top+y.top)/x.y,bottom:(S.bottom-h.bottom+y.bottom)/x.y,left:(h.left-S.left+y.left)/x.x,right:(S.right-h.right+y.right)/x.x}}const S=Math.min,_=Math.max;function R(e,t,n){return _(e,S(t,n))}const T={left:"right",right:"left",bottom:"top",top:"bottom"};function E(e){return e.replace(/left|right|bottom|top/g,(e=>T[e]))}const A={start:"end",end:"start"};function O(e){return e.replace(/start|end/g,(e=>A[e]))}const k=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:o,rects:i,initialPlacement:l,platform:a,elements:s}=t,{mainAxis:c=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:d="none",flipAlignment:g=!0,...w}=e,b=h(r),S=h(l)===l,_=await(null==a.isRTL?void 0:a.isRTL(s.floating)),R=f||(S||!g?[E(l)]:function(e){const t=E(e);return[O(e),t,O(t)]}(l));f||"none"===d||R.push(...function(e,t,n,r){const o=y(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:l;default:return[]}}(h(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(O)))),i}(l,g,d,_));const T=[l,...R],A=await x(t,w),k=[];let j=(null==(n=o.flip)?void 0:n.overflows)||[];if(c&&k.push(A[b]),u){const{main:e,cross:t}=function(e,t,n){void 0===n&&(n=!1);const r=y(e),o=v(e),i=m(o);let l="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=E(l)),{main:l,cross:E(l)}}(r,i,_);k.push(A[e],A[t])}if(j=[...j,{placement:r,overflows:k}],!k.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.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:P.placement;if(!n)switch(p){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=l}if(r!==n)return{reset:{placement:n}}}return{}}}};const j=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)),l=h(n),a=y(n),s="x"===v(n),c=["left","top"].includes(l)?-1:1,u=i&&s?-1:1,f="function"==typeof t?t(e):t;let{mainAxis:p,crossAxis:d,alignmentAxis:m}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&"number"==typeof m&&(d="end"===a?-1*m:m),s?{x:d*u,y:p*c}:{x:p*c,y:d*u}}(t,e);return{x:n+o.x,y:r+o.y,data:o}}}};const L=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:l=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=e,c={x:n,y:r},u=await x(t,s),f=v(h(o)),p="x"===f?"y":"x";let d=c[f],y=c[p];if(i){const e="y"===f?"bottom":"right";d=R(d+u["y"===f?"top":"left"],d,d-u[e])}if(l){const e="y"===p?"bottom":"right";y=R(y+u["y"===p?"top":"left"],y,y-u[e])}const m=a.fn({...t,[f]:d,[p]:y});return{...m,data:{x:m.x-n,y:m.y-r}}}}};function P(e){var t;return(null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function D(e){return P(e).getComputedStyle(e)}const N=Math.min,C=Math.max,$=Math.round;function F(e){const t=D(e);let n=parseFloat(t.width),r=parseFloat(t.height);const o=e.offsetWidth,i=e.offsetHeight,l=$(n)!==o||$(r)!==i;return l&&(n=o,r=i),{width:n,height:r,fallback:l}}function I(e){return M(e)?(e.nodeName||"").toLowerCase():""}let W;function U(){if(W)return W;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(W=e.brands.map((e=>e.brand+"/"+e.version)).join(" "),W):navigator.userAgent}function H(e){return e instanceof P(e).HTMLElement}function B(e){return e instanceof P(e).Element}function M(e){return e instanceof P(e).Node}function q(e){if("undefined"==typeof ShadowRoot)return!1;return e instanceof P(e).ShadowRoot||e instanceof ShadowRoot}function V(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=D(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Y(e){return["table","td","th"].includes(I(e))}function z(e){const t=/firefox/i.test(U()),n=D(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 X(){return/^((?!chrome|android).)*safari/i.test(U())}function K(e){return["html","body","#document"].includes(I(e))}function J(e){return B(e)?e:e.contextElement}const Z={x:1,y:1};function G(e){const t=J(e);if(!H(t))return Z;const n=t.getBoundingClientRect(),{width:r,height:o,fallback:i}=F(t);let l=(i?$(n.width):n.width)/r,a=(i?$(n.height):n.height)/o;return l&&Number.isFinite(l)||(l=1),a&&Number.isFinite(a)||(a=1),{x:l,y:a}}function Q(e,t,n,r){var o,i;void 0===t&&(t=!1),void 0===n&&(n=!1);const l=e.getBoundingClientRect(),a=J(e);let s=Z;t&&(r?B(r)&&(s=G(r)):s=G(e));const c=a?P(a):window,u=X()&&n;let f=(l.left+(u&&(null==(o=c.visualViewport)?void 0:o.offsetLeft)||0))/s.x,p=(l.top+(u&&(null==(i=c.visualViewport)?void 0:i.offsetTop)||0))/s.y,d=l.width/s.x,y=l.height/s.y;if(a){const e=P(a),t=r&&B(r)?P(r):r;let n=e.frameElement;for(;n&&r&&t!==e;){const e=G(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,p*=e.y,d*=e.x,y*=e.y,f+=t.x,p+=t.y,n=P(n).frameElement}}return b({width:d,height:y,x:f,y:p})}function ee(e){return((M(e)?e.ownerDocument:e.document)||window.document).documentElement}function te(e){return B(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ne(e){return Q(ee(e)).left+te(e).scrollLeft}function re(e){if("html"===I(e))return e;const t=e.assignedSlot||e.parentNode||q(e)&&e.host||ee(e);return q(t)?t.host:t}function oe(e){const t=re(e);return K(t)?t.ownerDocument.body:H(t)&&V(t)?t:oe(t)}function ie(e,t){var n;void 0===t&&(t=[]);const r=oe(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=P(r);return o?t.concat(i,i.visualViewport||[],V(r)?r:[]):t.concat(r,ie(r))}function le(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=P(e),r=ee(e),o=n.visualViewport;let i=r.clientWidth,l=r.clientHeight,a=0,s=0;if(o){i=o.width,l=o.height;const e=X();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,s=o.offsetTop)}return{width:i,height:l,x:a,y:s}}(e,n);else if("document"===t)r=function(e){const t=ee(e),n=te(e),r=e.ownerDocument.body,o=C(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=C(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+ne(e);const a=-n.scrollTop;return"rtl"===D(r).direction&&(l+=C(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:a}}(ee(e));else if(B(t))r=function(e,t){const n=Q(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=H(e)?G(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);else{const n={...t};if(X()){var o,i;const t=P(e);n.x-=(null==(o=t.visualViewport)?void 0:o.offsetLeft)||0,n.y-=(null==(i=t.visualViewport)?void 0:i.offsetTop)||0}r=n}return b(r)}function ae(e,t){return H(e)&&"fixed"!==D(e).position?t?t(e):e.offsetParent:null}function se(e,t){const n=P(e);if(!H(e))return n;let r=ae(e,t);for(;r&&Y(r)&&"static"===D(r).position;)r=ae(r,t);return r&&("html"===I(r)||"body"===I(r)&&"static"===D(r).position&&!z(r))?n:r||function(e){let t=re(e);for(;H(t)&&!K(t);){if(z(t))return t;t=re(t)}return null}(e)||n}function ce(e,t,n){const r=H(t),o=ee(t),i=Q(e,!0,"fixed"===n,t);let l={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if(r||!r&&"fixed"!==n)if(("body"!==I(t)||V(o))&&(l=te(t)),H(t)){const e=Q(t,!0);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&(a.x=ne(o));return{x:i.left+l.scrollLeft-a.x,y:i.top+l.scrollTop-a.y,width:i.width,height:i.height}}const ue={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=ie(e).filter((e=>B(e)&&"body"!==I(e))),o=null;const i="fixed"===D(e).position;let l=i?re(e):e;for(;B(l)&&!K(l);){const e=D(l),t=z(l);"fixed"===e.position?o=null:(i?t||o:t||"static"!==e.position||!o||!["absolute","fixed"].includes(o.position))?o=e:r=r.filter((e=>e!==l)),l=re(l)}return t.set(e,r),r}(t,this._c):[].concat(n),l=[...i,r],a=l[0],s=l.reduce(((e,n)=>{const r=le(t,n,o);return e.top=C(r.top,e.top),e.right=N(r.right,e.right),e.bottom=N(r.bottom,e.bottom),e.left=C(r.left,e.left),e}),le(t,a,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=H(n),i=ee(n);if(n===i)return t;let l={scrollLeft:0,scrollTop:0},a={x:1,y:1};const s={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==I(n)||V(i))&&(l=te(n)),H(n))){const e=Q(n);a=G(n),s.x=e.x+n.clientLeft,s.y=e.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-l.scrollLeft*a.x+s.x,y:t.y*a.y-l.scrollTop*a.y+s.y}},isElement:B,getDimensions:function(e){return H(e)?F(e):e.getBoundingClientRect()},getOffsetParent:se,getDocumentElement:ee,getScale:G,async getElementRects(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||se,i=this.getDimensions;return{reference:ce(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===D(e).direction},fe=(e,t,n)=>{const r=new Map,o={platform:ue,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,a=i.filter(Boolean),s=await(null==l.isRTL?void 0:l.isRTL(t));if(null==l&&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(" ")),a.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 l.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=g(c,r,s),p=r,d={},y=0;for(let n=0;n<a.length;n++){const{name:i,fn:m}=a[n],{x:h,y:v,data:w,reset:b}=await m({x:u,y:f,initialPlacement:r,placement:p,strategy:o,middlewareData:d,rects:c,platform:l,elements:{reference:e,floating:t}});u=null!=h?h:u,f=null!=v?v:f,d={...d,[i]:{...d[i],...w}},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&&(p=b.placement),b.rects&&(c=!0===b.rects?await l.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:f}=g(c,p,s))),n=-1)}return{x:u,y:f,placement:p,strategy:o,middlewareData:d}})(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:l=[j(Number(o)),k(),L({padding:5})]})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};const a=l;return n?(a.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:l,platform:a,elements:c}=e;if(null==t)return console.warn("Floating UI: No `element` was passed to the `arrow` middleware."),{};const u=w(n),f={x:r,y:o},p=v(i),d=m(p),h=await a.getDimensions(t),g="y"===p,b=g?"top":"left",x=g?"bottom":"right",S=g?"clientHeight":"clientWidth",_=l.reference[d]+l.reference[p]-f[p]-l.floating[d],T=f[p]-l.reference[p],E=await(null==a.getOffsetParent?void 0:a.getOffsetParent(t));let A=E?E[S]:0;A&&await(null==a.isElement?void 0:a.isElement(E))||(A=c.floating[S]||l.floating[d]);const O=_/2-T/2,k=u[b],j=A-h[d]-u[x],L=A/2-h[d]/2+O,P=R(k,L,j),D=null!=y(i)&&L!=P&&l.reference[d]/2-(L<k?u[b]:u[x])-h[d]/2<0;return{[p]:f[p]-(D?L<k?k-L:j-L:0),data:{[p]:P,centerOffset:L-P}}}}),fe(e,t,{placement:r,strategy:i,middleware:a}).then((({x:e,y:t,placement:n,middlewareData:r})=>{var o,i;const l={left:`${e}px`,top:`${t}px`},{x:a,y:s}=null!==(o=r.arrow)&&void 0!==o?o:{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"},place:n}}))):fe(e,t,{placement:"bottom",strategy:i,middleware:a}).then((({x:e,y:t,placement:n})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:n})));var s};var de={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 ye=({id:t,className:n,classNameArrow:o,variant:i="dark",anchorId:l,anchorSelect:c,place:u="top",offset:f=10,events:y=["hover"],openOnClick:m=!1,positionStrategy:h="absolute",middlewares:v,wrapper:g,delayShow:w=0,delayHide:b=0,float:x=!1,noArrow:S=!1,clickable:_=!1,closeOnEsc:R=!1,style:T,position:E,afterShow:A,afterHide:O,content:k,isOpen:j,setIsOpen:L,activeAnchor:P,setActiveAnchor:D})=>{const N=e.useRef(null),C=e.useRef(null),$=e.useRef(null),F=e.useRef(null),[I,W]=e.useState(u),[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),ne=m||y.includes("click");d((()=>(te.current=!0,()=>{te.current=!1})),[]),e.useEffect((()=>{if(!q){const e=setTimeout((()=>{z(!1)}),150);return()=>{clearTimeout(e)}}return()=>null}),[q]);const re=e=>{te.current&&(e&&z(!0),setTimeout((()=>{te.current&&(null==L||L(e),void 0===j&&V(e))}),10))};e.useEffect((()=>{if(void 0===j)return()=>null;j&&z(!0);const e=setTimeout((()=>{V(j)}),10);return()=>{clearTimeout(e)}}),[j]),e.useEffect((()=>{q!==X.current&&(X.current=q,q?null==A||A():null==O||O())}),[q]);const oe=(e=b)=>{F.current&&clearTimeout(F.current),F.current=setTimeout((()=>{G.current||re(!1)}),e)},ie=e=>{var t;if(!e)return;w?($.current&&clearTimeout($.current),$.current=setTimeout((()=>{re(!0)}),w)):re(!0);const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;D(n),Z({current:n}),F.current&&clearTimeout(F.current)},le=()=>{_?oe(b||100):b?oe():re(!1),$.current&&clearTimeout($.current)},ae=({x:e,y:t})=>{pe({place:u,offset:f,elementReference:{getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})},tooltipReference:N.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),W(e.place)}))},se=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};ae(n),K.current=n},ce=e=>{ie(e),b&&oe()},ue=e=>{var t;[document.querySelector(`[id='${l}']`),...Q].some((t=>null==t?void 0:t.contains(e.target)))||(null===(t=N.current)||void 0===t?void 0:t.contains(e.target))||re(!1)},fe=e=>{"Escape"===e.key&&re(!1)},ye=s(ie,50),me=s(le,50);e.useEffect((()=>{var e,t;const n=new Set(J);Q.forEach((e=>{n.add({current:e})}));const r=document.querySelector(`[id='${l}']`);r&&n.add({current:r}),R&&window.addEventListener("keydown",fe);const o=[];ne?(window.addEventListener("click",ue),o.push({event:"click",listener:ce})):(o.push({event:"mouseenter",listener:ye},{event:"mouseleave",listener:me},{event:"focus",listener:ye},{event:"blur",listener:me}),x&&o.push({event:"mousemove",listener:se}));const i=()=>{G.current=!0},a=()=>{G.current=!1,le()};return _&&!ne&&(null===(e=N.current)||void 0===e||e.addEventListener("mouseenter",i),null===(t=N.current)||void 0===t||t.addEventListener("mouseleave",a)),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;ne&&window.removeEventListener("click",ue),R&&window.removeEventListener("keydown",fe),_&&!ne&&(null===(e=N.current)||void 0===e||e.removeEventListener("mouseenter",i),null===(t=N.current)||void 0===t||t.removeEventListener("mouseleave",a)),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,R,y]),e.useEffect((()=>{let e=null!=c?c:"";!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&&(P&&[...n.removedNodes].some((e=>!!e.contains(P)&&(z(!1),re(!1),D(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,c,P]),e.useEffect((()=>{E?ae(E):x?K.current&&ae(K.current):pe({place:u,offset:f,elementReference:P,tooltipReference:N.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),W(e.place))}))}),[q,P,k,u,f,h,E]),e.useEffect((()=>{var e;const t=document.querySelector(`[id='${l}']`),n=[...Q,t];P&&n.includes(P)||D(null!==(e=Q[0])&&void 0!==e?e:t)}),[l,Q,P]),e.useEffect((()=>()=>{$.current&&clearTimeout($.current),F.current&&clearTimeout(F.current)}),[]),e.useEffect((()=>{let e=c;if(!e&&t&&(e=`[data-tooltip-id='${t}']`),e)try{const t=Array.from(document.querySelectorAll(e));ee(t)}catch(e){ee([])}}),[t,c]);const he=k&&q&&Object.keys(U).length>0;return Y?r.exports.jsxs(g,{id:t,role:"tooltip",className:a("react-tooltip",de.tooltip,de[i],n,`react-tooltip__place-${I}`,{[de.show]:he,[de.fixed]:"fixed"===h,[de.clickable]:_}),style:{...T,...U},ref:N,children:[k,r.exports.jsx(g,{className:a("react-tooltip-arrow",de.arrow,o,{[de.noArrow]:S}),style:B,ref:C})]}):null},me=({content:e})=>r.exports.jsx("span",{dangerouslySetInnerHTML:{__html:e}});exports.Tooltip=({id:t,anchorId:n,anchorSelect:o,content:i,html:l,render:a,className:s,classNameArrow:c,variant:u="dark",place:f="top",offset:d=10,wrapper:y="div",children:m=null,events:h=["hover"],openOnClick:v=!1,positionStrategy:g="absolute",middlewares:w,delayShow:b=0,delayHide:x=0,float:S=!1,noArrow:_=!1,clickable:R=!1,closeOnEsc:T=!1,style:E,position:A,isOpen:O,setIsOpen:k,afterShow:j,afterHide:L})=>{const[P,D]=e.useState(i),[N,C]=e.useState(l),[$,F]=e.useState(f),[I,W]=e.useState(u),[U,H]=e.useState(d),[B,M]=e.useState(b),[q,V]=e.useState(x),[Y,z]=e.useState(S),[X,K]=e.useState(y),[J,Z]=e.useState(h),[G,Q]=e.useState(g),[ee,te]=e.useState(null),{anchorRefs:ne,activeAnchor:re}=p(t),oe=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}),{}),ie=e=>{const t={place:e=>{var t;F(null!==(t=e)&&void 0!==t?t:f)},content:e=>{D(null!=e?e:i)},html:e=>{C(null!=e?e:l)},variant:e=>{var t;W(null!==(t=e)&&void 0!==t?t:u)},offset:e=>{H(null===e?d:Number(e))},wrapper:e=>{var t;K(null!==(t=e)&&void 0!==t?t:y)},events:e=>{const t=null==e?void 0:e.split(" ");Z(null!=t?t:h)},"position-strategy":e=>{var t;Q(null!==(t=e)&&void 0!==t?t:g)},"delay-show":e=>{M(null===e?b:Number(e))},"delay-hide":e=>{V(null===e?x:Number(e))},float:e=>{z(null===e?S:"true"===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((()=>{D(i)}),[i]),e.useEffect((()=>{C(l)}),[l]),e.useEffect((()=>{F(f)}),[f]),e.useEffect((()=>{var e;const r=new Set(ne);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 l=document.querySelector(`[id='${n}']`);if(l&&r.add({current:l}),!r.size)return()=>null;const a=null!==(e=null!=ee?ee:l)&&void 0!==e?e:re.current,s=new MutationObserver((e=>{e.forEach((e=>{var t;if(!a||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=oe(a);ie(n)}))})),c={attributes:!0,childList:!1,subtree:!1};if(a){const e=oe(a);ie(e),s.observe(a,c)}return()=>{s.disconnect()}}),[ne,re,ee,n,o]);let le=m;a?le=a({content:null!=P?P:null,activeAnchor:ee}):P&&(le=P),N&&(le=r.exports.jsx(me,{content:N}));const ae={id:t,anchorId:n,anchorSelect:o,className:s,classNameArrow:c,content:le,place:$,variant:I,offset:U,wrapper:X,events:J,openOnClick:v,positionStrategy:G,middlewares:w,delayShow:B,delayHide:q,float:Y,noArrow:_,clickable:R,closeOnEsc:T,style:E,position:A,isOpen:O,setIsOpen:k,afterShow:j,afterHide:L,activeAnchor:ee,setActiveAnchor:e=>te(e)};return r.exports.jsx(ye,{...ae})},exports.TooltipProvider=({children:t})=>{const[n,o]=e.useState({DEFAULT_TOOLTIP_ID:new Set}),[i,l]=e.useState({DEFAULT_TOOLTIP_ID:{current:null}}),a=(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)=>a(e,...t),detach:(...t)=>s(e,...t),setActiveAnchor:t=>((e,t)=>{l((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,a,s]),u=e.useMemo((()=>({getTooltipData:c})),[c]);return r.exports.jsx(f.Provider,{value:u,children:t})},exports.TooltipWrapper=({tooltipId:t,children:n,className:o,place:i,content:l,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:a("react-tooltip-wrapper",o),"data-tooltip-place":i,"data-tooltip-content":l,"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
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),r=require("classnames"),o=require("@floating-ui/dom");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=l(r);const a=(e,t,r)=>{let o=null;return function(...l){o&&clearTimeout(o),o=setTimeout((()=>{o=null,r||e.apply(this,l)}),t)}},s="DEFAULT_TOOLTIP_ID",c={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},i={getTooltipData:()=>c},u=t.createContext(i);function d(e=s){return t.useContext(u).getTooltipData(e)}const p="undefined"!=typeof window?t.useLayoutEffect:t.useEffect,f=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:r=null,place:l="top",offset:n=10,strategy:a="absolute",middlewares:s=[o.offset(Number(n)),o.flip(),o.shift({padding:5})]})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:l};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:l};const c=s;return r?(c.push(o.arrow({element:r,padding:5})),o.computePosition(e,t,{placement:l,strategy:a,middleware:c}).then((({x:e,y:t,placement:r,middlewareData:o})=>{var l,n;const a={left:`${e}px`,top:`${t}px`},{x:s,y:c}=null!==(l=o.arrow)&&void 0!==l?l:{x:0,y:0};return{tooltipStyles:a,tooltipArrowStyles:{left:null!=s?`${s}px`:"",top:null!=c?`${c}px`:"",right:"",bottom:"",[null!==(n={top:"bottom",right:"left",bottom:"top",left:"right"}[r.split("-")[0]])&&void 0!==n?n:"bottom"]:"-4px"},place:r}}))):o.computePosition(e,t,{placement:"bottom",strategy:a,middleware:c}).then((({x:e,y:t,placement:r})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:r})))};var v={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 m=({id:r,className:o,classNameArrow:l,variant:s="dark",anchorId:c,anchorSelect:i,place:u="top",offset:m=10,events:h=["hover"],openOnClick:y=!1,positionStrategy:w="absolute",middlewares:S,wrapper:b,delayShow:g=0,delayHide:A=0,float:_=!1,noArrow:E=!1,clickable:x=!1,closeOnEsc:T=!1,style:k,position:O,afterShow:R,afterHide:N,content:j,isOpen:L,setIsOpen:$,activeAnchor:q,setActiveAnchor:I})=>{const C=t.useRef(null),H=t.useRef(null),D=t.useRef(null),M=t.useRef(null),[P,W]=t.useState(u),[K,B]=t.useState({}),[F,X]=t.useState({}),[J,U]=t.useState(!1),[Z,z]=t.useState(!1),Y=t.useRef(!1),G=t.useRef(null),{anchorRefs:Q,setActiveAnchor:V}=d(r),ee=t.useRef(!1),[te,re]=t.useState([]),oe=t.useRef(!1),le=y||h.includes("click");p((()=>(oe.current=!0,()=>{oe.current=!1})),[]),t.useEffect((()=>{if(!J){const e=setTimeout((()=>{z(!1)}),150);return()=>{clearTimeout(e)}}return()=>null}),[J]);const ne=e=>{oe.current&&(e&&z(!0),setTimeout((()=>{oe.current&&(null==$||$(e),void 0===L&&U(e))}),10))};t.useEffect((()=>{if(void 0===L)return()=>null;L&&z(!0);const e=setTimeout((()=>{U(L)}),10);return()=>{clearTimeout(e)}}),[L]),t.useEffect((()=>{J!==Y.current&&(Y.current=J,J?null==R||R():null==N||N())}),[J]);const ae=(e=A)=>{M.current&&clearTimeout(M.current),M.current=setTimeout((()=>{ee.current||ne(!1)}),e)},se=e=>{var t;if(!e)return;g?(D.current&&clearTimeout(D.current),D.current=setTimeout((()=>{ne(!0)}),g)):ne(!0);const r=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;I(r),V({current:r}),M.current&&clearTimeout(M.current)},ce=()=>{x?ae(A||100):A?ae():ne(!1),D.current&&clearTimeout(D.current)},ie=({x:e,y:t})=>{f({place:u,offset:m,elementReference:{getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})},tooltipReference:C.current,tooltipArrowReference:H.current,strategy:w,middlewares:S}).then((e=>{Object.keys(e.tooltipStyles).length&&B(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&X(e.tooltipArrowStyles),W(e.place)}))},ue=e=>{if(!e)return;const t=e,r={x:t.clientX,y:t.clientY};ie(r),G.current=r},de=e=>{se(e),A&&ae()},pe=e=>{var t;[document.querySelector(`[id='${c}']`),...te].some((t=>null==t?void 0:t.contains(e.target)))||(null===(t=C.current)||void 0===t?void 0:t.contains(e.target))||ne(!1)},fe=e=>{"Escape"===e.key&&ne(!1)},ve=a(se,50),me=a(ce,50);t.useEffect((()=>{var e,t;const r=new Set(Q);te.forEach((e=>{r.add({current:e})}));const o=document.querySelector(`[id='${c}']`);o&&r.add({current:o}),T&&window.addEventListener("keydown",fe);const l=[];le?(window.addEventListener("click",pe),l.push({event:"click",listener:de})):(l.push({event:"mouseenter",listener:ve},{event:"mouseleave",listener:me},{event:"focus",listener:ve},{event:"blur",listener:me}),_&&l.push({event:"mousemove",listener:ue}));const n=()=>{ee.current=!0},a=()=>{ee.current=!1,ce()};return x&&!le&&(null===(e=C.current)||void 0===e||e.addEventListener("mouseenter",n),null===(t=C.current)||void 0===t||t.addEventListener("mouseleave",a)),l.forEach((({event:e,listener:t})=>{r.forEach((r=>{var o;null===(o=r.current)||void 0===o||o.addEventListener(e,t)}))})),()=>{var e,t;le&&window.removeEventListener("click",pe),T&&window.removeEventListener("keydown",fe),x&&!le&&(null===(e=C.current)||void 0===e||e.removeEventListener("mouseenter",n),null===(t=C.current)||void 0===t||t.removeEventListener("mouseleave",a)),l.forEach((({event:e,listener:t})=>{r.forEach((r=>{var o;null===(o=r.current)||void 0===o||o.removeEventListener(e,t)}))}))}}),[Z,Q,te,T,h]),t.useEffect((()=>{let e=null!=i?i:"";!e&&r&&(e=`[data-tooltip-id='${r}']`);const t=new MutationObserver((t=>{const o=[];t.forEach((t=>{if("attributes"===t.type&&"data-tooltip-id"===t.attributeName){t.target.getAttribute("data-tooltip-id")===r&&o.push(t.target)}if("childList"===t.type&&(q&&[...t.removedNodes].some((e=>!!e.contains(q)&&(z(!1),ne(!1),I(null),!0))),e))try{const r=[...t.addedNodes].filter((e=>1===e.nodeType));o.push(...r.filter((t=>t.matches(e)))),o.push(...r.flatMap((t=>[...t.querySelectorAll(e)])))}catch(e){}})),o.length&&re((e=>[...e,...o]))}));return t.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"]}),()=>{t.disconnect()}}),[r,i,q]),t.useEffect((()=>{O?ie(O):_?G.current&&ie(G.current):f({place:u,offset:m,elementReference:q,tooltipReference:C.current,tooltipArrowReference:H.current,strategy:w,middlewares:S}).then((e=>{oe.current&&(Object.keys(e.tooltipStyles).length&&B(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&X(e.tooltipArrowStyles),W(e.place))}))}),[J,q,j,u,m,w,O]),t.useEffect((()=>{var e;const t=document.querySelector(`[id='${c}']`),r=[...te,t];q&&r.includes(q)||I(null!==(e=te[0])&&void 0!==e?e:t)}),[c,te,q]),t.useEffect((()=>()=>{D.current&&clearTimeout(D.current),M.current&&clearTimeout(M.current)}),[]),t.useEffect((()=>{let e=i;if(!e&&r&&(e=`[data-tooltip-id='${r}']`),e)try{const t=Array.from(document.querySelectorAll(e));re(t)}catch(e){re([])}}),[r,i]);const he=j&&J&&Object.keys(K).length>0;return Z?e.jsxs(b,{id:r,role:"tooltip",className:n.default("react-tooltip",v.tooltip,v[s],o,`react-tooltip__place-${P}`,{[v.show]:he,[v.fixed]:"fixed"===w,[v.clickable]:x}),style:{...k,...K},ref:C,children:[j,e.jsx(b,{className:n.default("react-tooltip-arrow",v.arrow,l,{[v.noArrow]:E}),style:F,ref:H})]}):null},h=({content:t})=>e.jsx("span",{dangerouslySetInnerHTML:{__html:t}});exports.Tooltip=({id:r,anchorId:o,anchorSelect:l,content:n,html:a,render:s,className:c,classNameArrow:i,variant:u="dark",place:p="top",offset:f=10,wrapper:v="div",children:y=null,events:w=["hover"],openOnClick:S=!1,positionStrategy:b="absolute",middlewares:g,delayShow:A=0,delayHide:_=0,float:E=!1,noArrow:x=!1,clickable:T=!1,closeOnEsc:k=!1,style:O,position:R,isOpen:N,setIsOpen:j,afterShow:L,afterHide:$})=>{const[q,I]=t.useState(n),[C,H]=t.useState(a),[D,M]=t.useState(p),[P,W]=t.useState(u),[K,B]=t.useState(f),[F,X]=t.useState(A),[J,U]=t.useState(_),[Z,z]=t.useState(E),[Y,G]=t.useState(v),[Q,V]=t.useState(w),[ee,te]=t.useState(b),[re,oe]=t.useState(null),{anchorRefs:le,activeAnchor:ne}=d(r),ae=e=>null==e?void 0:e.getAttributeNames().reduce(((t,r)=>{var o;if(r.startsWith("data-tooltip-")){t[r.replace(/^data-tooltip-/,"")]=null!==(o=null==e?void 0:e.getAttribute(r))&&void 0!==o?o:null}return t}),{}),se=e=>{const t={place:e=>{var t;M(null!==(t=e)&&void 0!==t?t:p)},content:e=>{I(null!=e?e:n)},html:e=>{H(null!=e?e:a)},variant:e=>{var t;W(null!==(t=e)&&void 0!==t?t:u)},offset:e=>{B(null===e?f:Number(e))},wrapper:e=>{var t;G(null!==(t=e)&&void 0!==t?t:v)},events:e=>{const t=null==e?void 0:e.split(" ");V(null!=t?t:w)},"position-strategy":e=>{var t;te(null!==(t=e)&&void 0!==t?t:b)},"delay-show":e=>{X(null===e?A:Number(e))},"delay-hide":e=>{U(null===e?_:Number(e))},float:e=>{z(null===e?E:"true"===e)}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,r])=>{var o;null===(o=t[e])||void 0===o||o.call(t,r)}))};t.useEffect((()=>{I(n)}),[n]),t.useEffect((()=>{H(a)}),[a]),t.useEffect((()=>{M(p)}),[p]),t.useEffect((()=>{var e;const t=new Set(le);let n=l;if(!n&&r&&(n=`[data-tooltip-id='${r}']`),n)try{document.querySelectorAll(n).forEach((e=>{t.add({current:e})}))}catch(e){console.warn(`[react-tooltip] "${l}" is not a valid CSS selector`)}const a=document.querySelector(`[id='${o}']`);if(a&&t.add({current:a}),!t.size)return()=>null;const s=null!==(e=null!=re?re:a)&&void 0!==e?e:ne.current,c=new MutationObserver((e=>{e.forEach((e=>{var t;if(!s||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const r=ae(s);se(r)}))})),i={attributes:!0,childList:!1,subtree:!1};if(s){const e=ae(s);se(e),c.observe(s,i)}return()=>{c.disconnect()}}),[le,ne,re,o,l]);let ce=y;s?ce=s({content:null!=q?q:null,activeAnchor:re}):q&&(ce=q),C&&(ce=e.jsx(h,{content:C}));const ie={id:r,anchorId:o,anchorSelect:l,className:c,classNameArrow:i,content:ce,place:D,variant:P,offset:K,wrapper:Y,events:Q,openOnClick:S,positionStrategy:ee,middlewares:g,delayShow:F,delayHide:J,float:Z,noArrow:x,clickable:T,closeOnEsc:k,style:O,position:R,isOpen:N,setIsOpen:j,afterShow:L,afterHide:$,activeAnchor:re,setActiveAnchor:e=>oe(e)};return e.jsx(m,{...ie})},exports.TooltipProvider=({children:r})=>{const[o,l]=t.useState({[s]:new Set}),[n,a]=t.useState({[s]:{current:null}}),c=(e,...t)=>{l((r=>{var o;const l=null!==(o=r[e])&&void 0!==o?o:new Set;return t.forEach((e=>l.add(e))),{...r,[e]:new Set(l)}}))},i=(e,...t)=>{l((r=>{const o=r[e];return o?(t.forEach((e=>o.delete(e))),{...r}):r}))},d=t.useCallback(((e=s)=>{var t,r;return{anchorRefs:null!==(t=o[e])&&void 0!==t?t:new Set,activeAnchor:null!==(r=n[e])&&void 0!==r?r:{current:null},attach:(...t)=>c(e,...t),detach:(...t)=>i(e,...t),setActiveAnchor:t=>((e,t)=>{a((r=>{var o;return(null===(o=r[e])||void 0===o?void 0:o.current)===t.current?r:{...r,[e]:t}}))})(e,t)}}),[o,n,c,i]),p=t.useMemo((()=>({getTooltipData:d})),[d]);return e.jsx(u.Provider,{value:p,children:r})},exports.TooltipWrapper=({tooltipId:r,children:o,className:l,place:a,content:s,html:c,variant:i,offset:u,wrapper:p,events:f,positionStrategy:v,delayShow:m,delayHide:h})=>{const{attach:y,detach:w}=d(r),S=t.useRef(null);return t.useEffect((()=>(y(S),()=>{w(S)})),[]),e.jsx("span",{ref:S,className:n.default("react-tooltip-wrapper",l),"data-tooltip-place":a,"data-tooltip-content":s,"data-tooltip-html":c,"data-tooltip-variant":i,"data-tooltip-offset":u,"data-tooltip-wrapper":p,"data-tooltip-events":f,"data-tooltip-position-strategy":v,"data-tooltip-delay-show":m,"data-tooltip-delay-hide":h,children:o})};
@@ -1,15 +1 @@
1
- import e,{createContext as t,useState as n,useCallback as r,useMemo as o,useContext as i,useRef as l,useEffect as a,useLayoutEffect as c}from"react";var s,u={exports:{}},f={};
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
- s=f,function(){var t=e,n=60103,r=60106;s.Fragment=60107;var o=60108,i=60114,l=60109,a=60110,c=60112,u=60113,f=60120,p=60115,d=60116,y=60121,m=60122,h=60117,v=60129,g=60131;if("function"==typeof Symbol&&Symbol.for){var w=Symbol.for;n=w("react.element"),r=w("react.portal"),s.Fragment=w("react.fragment"),o=w("react.strict_mode"),i=w("react.profiler"),l=w("react.provider"),a=w("react.context"),c=w("react.forward_ref"),u=w("react.suspense"),f=w("react.suspense_list"),p=w("react.memo"),d=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,x=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function _(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];T("error",e,n)}function T(e,t,n){var r=x.ReactDebugCurrentFrame,o="";if(R){var i=A(R.type),l=R._owner;o+=function(e,t,n){var r="";if(t){var o=t.fileName,i=o.replace(S,"");if(/^index\./.test(i)){var l=o.match(S);if(l){var a=l[1];a&&(i=a.replace(S,"")+"/"+i)}}r=" (at "+i+":"+t.lineNumber+")"}else n&&(r=" (created by "+n+")");return"\n in "+(e||"Unknown")+r}(i,R._source,l&&A(l.type))}""!==(o+=r.getStackAddendum())&&(t+="%s",n=n.concat([o]));var a=n.map((function(e){return""+e}));a.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,a)}var S=/^(.*)[\\\/]/;function A(e){if(null==e)return null;if("number"==typeof e.tag&&_("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case s.Fragment:return"Fragment";case r:return"Portal";case i:return"Profiler";case o:return"StrictMode";case u:return"Suspense";case f:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case a:return"Context.Consumer";case l:return"Context.Provider";case c:return m=e,h=e.render,v="ForwardRef",g=h.displayName||h.name||"",m.displayName||(""!==g?v+"("+g+")":v);case p:return A(e.type);case y:return A(e.render);case d:var t=1===(n=e)._status?n._result:null;if(t)return A(t)}var n,m,h,v,g;return null}var O={};x.ReactDebugCurrentFrame;var R=null;function k(e){R=e}var E,j,L,P=x.ReactCurrentOwner,D=Object.prototype.hasOwnProperty,N={key:!0,ref:!0,__self:!0,__source:!0};function $(e,t,r,o,i){var l,a={},c=null,s=null;for(l in void 0!==r&&(c=""+r),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)&&(c=""+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)&&(s=t.ref,function(e,t){if("string"==typeof e.ref&&P.current&&t&&P.current.stateNode!==t){var n=A(P.current.type);L[n]||(_('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',A(P.current.type),e.ref),L[n]=!0)}}(t,i)),t)D.call(t,l)&&!N.hasOwnProperty(l)&&(a[l]=t[l]);if(e&&e.defaultProps){var u=e.defaultProps;for(l in u)void 0===a[l]&&(a[l]=u[l])}if(c||s){var f="function"==typeof e?e.displayName||e.name||"Unknown":e;c&&function(e,t){var n=function(){E||(E=!0,_("%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})}(a,f),s&&function(e,t){var n=function(){j||(j=!0,_("%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})}(a,f)}return function(e,t,r,o,i,l,a){var c={$$typeof:n,type:e,key:t,ref:r,props:a,_owner:l,_store:{}};return Object.defineProperty(c._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(c,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(c,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(c.props),Object.freeze(c)),c}(e,c,s,i,o,P.current,a)}L={};var F,C=x.ReactCurrentOwner;function I(e){R=e}function W(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}function U(){if(C.current){var e=A(C.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}x.ReactDebugCurrentFrame,F=!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 "+A(e._owner.type)+"."),I(e),_('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,l=o.call(e);!(i=l.next()).done;)W(i.value)&&B(i.value,t)}}function V(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!==p)return;t=n.propTypes}if(t){var r=A(n);!function(e,t,n,r,o){var i=Function.call.bind(Object.prototype.hasOwnProperty);for(var l in e)if(i(e,l)){var a=void 0;try{if("function"!=typeof e[l]){var c=Error((r||"React class")+": "+n+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw c.name="Invariant Violation",c}a=e[l](t,l,r,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){a=e}!a||a instanceof Error||(k(o),_("%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,l,typeof a),k(null)),a instanceof Error&&!(a.message in O)&&(O[a.message]=!0,k(o),_("Failed %s type: %s",n,a.message),k(null))}}(t,e.props,"prop",r,e)}else void 0===n.PropTypes||F||(F=!0,_("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",A(n)||"Unknown"));"function"!=typeof n.getDefaultProps||n.getDefaultProps.isReactClassApproved||_("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function q(e,t,r,w,b,x){var T=function(e){return"string"==typeof e||"function"==typeof e||e===s.Fragment||e===i||e===v||e===o||e===u||e===f||e===g||"object"==typeof e&&null!==e&&(e.$$typeof===d||e.$$typeof===p||e.$$typeof===l||e.$$typeof===a||e.$$typeof===c||e.$$typeof===h||e.$$typeof===y||e[0]===m)}(e);if(!T){var S="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(S+=" 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 O,R=function(e){return void 0!==e?"\n\nCheck your code at "+e.fileName.replace(/^.*[\\\/]/,"")+":"+e.lineNumber+".":""}(b);S+=R||U(),null===e?O="null":Array.isArray(e)?O="array":void 0!==e&&e.$$typeof===n?(O="<"+(A(e.type)||"Unknown")+" />",S=" Did you accidentally export a JSX literal instead of a component?"):O=typeof e,_("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",O,S)}var k=$(e,t,r,b,x);if(null==k)return k;if(T){var E=t.children;if(void 0!==E)if(w)if(Array.isArray(E)){for(var j=0;j<E.length;j++)M(E[j],e);Object.freeze&&Object.freeze(E)}else _("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(E,e)}return e===s.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),_("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),_("Invalid attribute `ref` supplied to `React.Fragment`."),I(null))}(k):V(k),k}var Y=function(e,t,n){return q(e,t,n,!1)},z=function(e,t,n){return q(e,t,n,!0)};s.jsx=Y,s.jsxs=z}(),u.exports=f;var p,d={exports:{}};
11
- /*!
12
- Copyright (c) 2018 Jed Watson.
13
- Licensed under the MIT License (MIT), see
14
- http://jedwatson.github.io/classnames
15
- */p=d,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 l=t.apply(null,o);l&&n.push(l)}}else if("object"===i){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){n.push(o.toString());continue}for(var a in o)e.call(o,a)&&o[a]&&n.push(a)}}}return n.join(" ")}p.exports?(t.default=t,p.exports=t):window.classNames=t}();var y=d.exports;const m=(e,t,n)=>{let r=null;return function(...o){r&&clearTimeout(r),r=setTimeout((()=>{r=null,n||e.apply(this,o)}),t)}},h={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},v=t({getTooltipData:()=>h}),g=({children:e})=>{const[t,i]=n({DEFAULT_TOOLTIP_ID:new Set}),[l,a]=n({DEFAULT_TOOLTIP_ID:{current:null}}),c=(e,...t)=>{i((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)=>{i((n=>{const r=n[e];return r?(t.forEach((e=>r.delete(e))),{...n}):n}))},f=r(((e="DEFAULT_TOOLTIP_ID")=>{var n,r;return{anchorRefs:null!==(n=t[e])&&void 0!==n?n:new Set,activeAnchor:null!==(r=l[e])&&void 0!==r?r:{current:null},attach:(...t)=>c(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)}}),[t,l,c,s]),p=o((()=>({getTooltipData:f})),[f]);return u.exports.jsx(v.Provider,{value:p,children:e})};function w(e="DEFAULT_TOOLTIP_ID"){return i(v).getTooltipData(e)}const b=({tooltipId:e,children:t,className:n,place:r,content:o,html:i,variant:c,offset:s,wrapper:f,events:p,positionStrategy:d,delayShow:m,delayHide:h})=>{const{attach:v,detach:g}=w(e),b=l(null);return a((()=>(v(b),()=>{g(b)})),[]),u.exports.jsx("span",{ref:b,className:y("react-tooltip-wrapper",n),"data-tooltip-place":r,"data-tooltip-content":o,"data-tooltip-html":i,"data-tooltip-variant":c,"data-tooltip-offset":s,"data-tooltip-wrapper":f,"data-tooltip-events":p,"data-tooltip-position-strategy":d,"data-tooltip-delay-show":m,"data-tooltip-delay-hide":h,children:t})},x="undefined"!=typeof window?c:a;function _(e){return e.split("-")[1]}function T(e){return"y"===e?"height":"width"}function S(e){return e.split("-")[0]}function A(e){return["top","bottom"].includes(S(e))?"x":"y"}function O(e,t,n){let{reference:r,floating:o}=e;const i=r.x+r.width/2-o.width/2,l=r.y+r.height/2-o.height/2,a=A(t),c=T(a),s=r[c]/2-o[c]/2,u="x"===a;let f;switch(S(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:l};break;case"left":f={x:r.x-o.width,y:l};break;default:f={x:r.x,y:r.y}}switch(_(t)){case"start":f[a]-=s*(n&&u?-1:1);break;case"end":f[a]+=s*(n&&u?-1:1)}return f}function R(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 k(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function E(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:l,elements:a,strategy:c}=e,{boundary:s="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:p=!1,padding:d=0}=t,y=R(d),m=a[p?"floating"===f?"reference":"floating":f],h=k(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(a.floating)),boundary:s,rootBoundary:u,strategy:c})),v="floating"===f?{...l.floating,x:r,y:o}:l.reference,g=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),w=await(null==i.isElement?void 0:i.isElement(g))&&await(null==i.getScale?void 0:i.getScale(g))||{x:1,y:1},b=k(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:v,offsetParent:g,strategy:c}):v);return{top:(h.top-b.top+y.top)/w.y,bottom:(b.bottom-h.bottom+y.bottom)/w.y,left:(h.left-b.left+y.left)/w.x,right:(b.right-h.right+y.right)/w.x}}const j=Math.min,L=Math.max;function P(e,t,n){return L(e,j(t,n))}const D={left:"right",right:"left",bottom:"top",top:"bottom"};function N(e){return e.replace(/left|right|bottom|top/g,(e=>D[e]))}const $={start:"end",end:"start"};function F(e){return e.replace(/start|end/g,(e=>$[e]))}const C=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:o,rects:i,initialPlacement:l,platform:a,elements:c}=t,{mainAxis:s=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:d="none",flipAlignment:y=!0,...m}=e,h=S(r),v=S(l)===l,g=await(null==a.isRTL?void 0:a.isRTL(c.floating)),w=f||(v||!y?[N(l)]:function(e){const t=N(e);return[F(e),t,F(t)]}(l));f||"none"===d||w.push(...function(e,t,n,r){const o=_(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:l;default:return[]}}(S(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(F)))),i}(l,y,d,g));const b=[l,...w],x=await E(t,m),O=[];let R=(null==(n=o.flip)?void 0:n.overflows)||[];if(s&&O.push(x[h]),u){const{main:e,cross:t}=function(e,t,n){void 0===n&&(n=!1);const r=_(e),o=A(e),i=T(o);let l="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=N(l)),{main:l,cross:N(l)}}(r,i,g);O.push(x[e],x[t])}if(R=[...R,{placement:r,overflows:O}],!O.every((e=>e<=0))){var k,j;const e=((null==(k=o.flip)?void 0:k.index)||0)+1,t=b[e];if(t)return{data:{index:e,overflows:R},reset:{placement:t}};let n=null==(j=R.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 L;const e=null==(L=R.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:L[0];e&&(n=e);break}case"initialPlacement":n=l}if(r!==n)return{reset:{placement:n}}}return{}}}};const I=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)),l=S(n),a=_(n),c="x"===A(n),s=["left","top"].includes(l)?-1:1,u=i&&c?-1:1,f="function"==typeof t?t(e):t;let{mainAxis:p,crossAxis:d,alignmentAxis:y}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&"number"==typeof y&&(d="end"===a?-1*y:y),c?{x:d*u,y:p*s}:{x:p*s,y:d*u}}(t,e);return{x:n+o.x,y:r+o.y,data:o}}}};const W=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:l=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=e,s={x:n,y:r},u=await E(t,c),f=A(S(o)),p="x"===f?"y":"x";let d=s[f],y=s[p];if(i){const e="y"===f?"bottom":"right";d=P(d+u["y"===f?"top":"left"],d,d-u[e])}if(l){const e="y"===p?"bottom":"right";y=P(y+u["y"===p?"top":"left"],y,y-u[e])}const m=a.fn({...t,[f]:d,[p]:y});return{...m,data:{x:m.x-n,y:m.y-r}}}}};function U(e){var t;return(null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function H(e){return U(e).getComputedStyle(e)}const B=Math.min,M=Math.max,V=Math.round;function q(e){const t=H(e);let n=parseFloat(t.width),r=parseFloat(t.height);const o=e.offsetWidth,i=e.offsetHeight,l=V(n)!==o||V(r)!==i;return l&&(n=o,r=i),{width:n,height:r,fallback:l}}function Y(e){return Z(e)?(e.nodeName||"").toLowerCase():""}let z;function X(){if(z)return z;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(z=e.brands.map((e=>e.brand+"/"+e.version)).join(" "),z):navigator.userAgent}function K(e){return e instanceof U(e).HTMLElement}function J(e){return e instanceof U(e).Element}function Z(e){return e instanceof U(e).Node}function G(e){if("undefined"==typeof ShadowRoot)return!1;return e instanceof U(e).ShadowRoot||e instanceof ShadowRoot}function Q(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=H(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function ee(e){return["table","td","th"].includes(Y(e))}function te(e){const t=/firefox/i.test(X()),n=H(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 ne(){return/^((?!chrome|android).)*safari/i.test(X())}function re(e){return["html","body","#document"].includes(Y(e))}function oe(e){return J(e)?e:e.contextElement}const ie={x:1,y:1};function le(e){const t=oe(e);if(!K(t))return ie;const n=t.getBoundingClientRect(),{width:r,height:o,fallback:i}=q(t);let l=(i?V(n.width):n.width)/r,a=(i?V(n.height):n.height)/o;return l&&Number.isFinite(l)||(l=1),a&&Number.isFinite(a)||(a=1),{x:l,y:a}}function ae(e,t,n,r){var o,i;void 0===t&&(t=!1),void 0===n&&(n=!1);const l=e.getBoundingClientRect(),a=oe(e);let c=ie;t&&(r?J(r)&&(c=le(r)):c=le(e));const s=a?U(a):window,u=ne()&&n;let f=(l.left+(u&&(null==(o=s.visualViewport)?void 0:o.offsetLeft)||0))/c.x,p=(l.top+(u&&(null==(i=s.visualViewport)?void 0:i.offsetTop)||0))/c.y,d=l.width/c.x,y=l.height/c.y;if(a){const e=U(a),t=r&&J(r)?U(r):r;let n=e.frameElement;for(;n&&r&&t!==e;){const e=le(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,p*=e.y,d*=e.x,y*=e.y,f+=t.x,p+=t.y,n=U(n).frameElement}}return k({width:d,height:y,x:f,y:p})}function ce(e){return((Z(e)?e.ownerDocument:e.document)||window.document).documentElement}function se(e){return J(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ue(e){return ae(ce(e)).left+se(e).scrollLeft}function fe(e){if("html"===Y(e))return e;const t=e.assignedSlot||e.parentNode||G(e)&&e.host||ce(e);return G(t)?t.host:t}function pe(e){const t=fe(e);return re(t)?t.ownerDocument.body:K(t)&&Q(t)?t:pe(t)}function de(e,t){var n;void 0===t&&(t=[]);const r=pe(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=U(r);return o?t.concat(i,i.visualViewport||[],Q(r)?r:[]):t.concat(r,de(r))}function ye(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=U(e),r=ce(e),o=n.visualViewport;let i=r.clientWidth,l=r.clientHeight,a=0,c=0;if(o){i=o.width,l=o.height;const e=ne();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,c=o.offsetTop)}return{width:i,height:l,x:a,y:c}}(e,n);else if("document"===t)r=function(e){const t=ce(e),n=se(e),r=e.ownerDocument.body,o=M(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=M(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+ue(e);const a=-n.scrollTop;return"rtl"===H(r).direction&&(l+=M(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:a}}(ce(e));else if(J(t))r=function(e,t){const n=ae(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=K(e)?le(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);else{const n={...t};if(ne()){var o,i;const t=U(e);n.x-=(null==(o=t.visualViewport)?void 0:o.offsetLeft)||0,n.y-=(null==(i=t.visualViewport)?void 0:i.offsetTop)||0}r=n}return k(r)}function me(e,t){return K(e)&&"fixed"!==H(e).position?t?t(e):e.offsetParent:null}function he(e,t){const n=U(e);if(!K(e))return n;let r=me(e,t);for(;r&&ee(r)&&"static"===H(r).position;)r=me(r,t);return r&&("html"===Y(r)||"body"===Y(r)&&"static"===H(r).position&&!te(r))?n:r||function(e){let t=fe(e);for(;K(t)&&!re(t);){if(te(t))return t;t=fe(t)}return null}(e)||n}function ve(e,t,n){const r=K(t),o=ce(t),i=ae(e,!0,"fixed"===n,t);let l={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if(r||!r&&"fixed"!==n)if(("body"!==Y(t)||Q(o))&&(l=se(t)),K(t)){const e=ae(t,!0);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&(a.x=ue(o));return{x:i.left+l.scrollLeft-a.x,y:i.top+l.scrollTop-a.y,width:i.width,height:i.height}}const ge={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=de(e).filter((e=>J(e)&&"body"!==Y(e))),o=null;const i="fixed"===H(e).position;let l=i?fe(e):e;for(;J(l)&&!re(l);){const e=H(l),t=te(l);"fixed"===e.position?o=null:(i?t||o:t||"static"!==e.position||!o||!["absolute","fixed"].includes(o.position))?o=e:r=r.filter((e=>e!==l)),l=fe(l)}return t.set(e,r),r}(t,this._c):[].concat(n),l=[...i,r],a=l[0],c=l.reduce(((e,n)=>{const r=ye(t,n,o);return e.top=M(r.top,e.top),e.right=B(r.right,e.right),e.bottom=B(r.bottom,e.bottom),e.left=M(r.left,e.left),e}),ye(t,a,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=K(n),i=ce(n);if(n===i)return t;let l={scrollLeft:0,scrollTop:0},a={x:1,y:1};const c={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==Y(n)||Q(i))&&(l=se(n)),K(n))){const e=ae(n);a=le(n),c.x=e.x+n.clientLeft,c.y=e.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-l.scrollLeft*a.x+c.x,y:t.y*a.y-l.scrollTop*a.y+c.y}},isElement:J,getDimensions:function(e){return K(e)?q(e):e.getBoundingClientRect()},getOffsetParent:he,getDocumentElement:ce,getScale:le,async getElementRects(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||he,i=this.getDimensions;return{reference:ve(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===H(e).direction},we=(e,t,n)=>{const r=new Map,o={platform:ge,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,a=i.filter(Boolean),c=await(null==l.isRTL?void 0:l.isRTL(t));if(null==l&&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(" ")),a.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 s=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=O(s,r,c),p=r,d={},y=0;for(let n=0;n<a.length;n++){const{name:i,fn:m}=a[n],{x:h,y:v,data:g,reset:w}=await m({x:u,y:f,initialPlacement:r,placement:p,strategy:o,middlewareData:d,rects:s,platform:l,elements:{reference:e,floating:t}});u=null!=h?h:u,f=null!=v?v:f,d={...d,[i]:{...d[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(" ")),w&&y<=50&&(y++,"object"==typeof w&&(w.placement&&(p=w.placement),w.rects&&(s=!0===w.rects?await l.getElementRects({reference:e,floating:t,strategy:o}):w.rects),({x:u,y:f}=O(s,p,c))),n=-1)}return{x:u,y:f,placement:p,strategy:o,middlewareData:d}})(e,t,{...o,platform:i})},be=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:n=null,place:r="top",offset:o=10,strategy:i="absolute",middlewares:l=[I(Number(o)),C(),W({padding:5})]})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};const a=l;return n?(a.push({name:"arrow",options:c={element:n,padding:5},async fn(e){const{element:t,padding:n=0}=c||{},{x:r,y:o,placement:i,rects:l,platform:a,elements:s}=e;if(null==t)return console.warn("Floating UI: No `element` was passed to the `arrow` middleware."),{};const u=R(n),f={x:r,y:o},p=A(i),d=T(p),y=await a.getDimensions(t),m="y"===p,h=m?"top":"left",v=m?"bottom":"right",g=m?"clientHeight":"clientWidth",w=l.reference[d]+l.reference[p]-f[p]-l.floating[d],b=f[p]-l.reference[p],x=await(null==a.getOffsetParent?void 0:a.getOffsetParent(t));let S=x?x[g]:0;S&&await(null==a.isElement?void 0:a.isElement(x))||(S=s.floating[g]||l.floating[d]);const O=w/2-b/2,k=u[h],E=S-y[d]-u[v],j=S/2-y[d]/2+O,L=P(k,j,E),D=null!=_(i)&&j!=L&&l.reference[d]/2-(j<k?u[h]:u[v])-y[d]/2<0;return{[p]:f[p]-(D?j<k?k-j:E-j:0),data:{[p]:L,centerOffset:j-L}}}}),we(e,t,{placement:r,strategy:i,middleware:a}).then((({x:e,y:t,placement:n,middlewareData:r})=>{var o,i;const l={left:`${e}px`,top:`${t}px`},{x:a,y:c}=null!==(o=r.arrow)&&void 0!==o?o:{x:0,y:0};return{tooltipStyles:l,tooltipArrowStyles:{left:null!=a?`${a}px`:"",top:null!=c?`${c}px`:"",right:"",bottom:"",[null!==(i={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==i?i:"bottom"]:"-4px"},place:n}}))):we(e,t,{placement:"bottom",strategy:i,middleware:a}).then((({x:e,y:t,placement:n})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:n})));var c};var xe={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 _e=({id:e,className:t,classNameArrow:r,variant:o="dark",anchorId:i,anchorSelect:c,place:s="top",offset:f=10,events:p=["hover"],openOnClick:d=!1,positionStrategy:h="absolute",middlewares:v,wrapper:g,delayShow:b=0,delayHide:_=0,float:T=!1,noArrow:S=!1,clickable:A=!1,closeOnEsc:O=!1,style:R,position:k,afterShow:E,afterHide:j,content:L,isOpen:P,setIsOpen:D,activeAnchor:N,setActiveAnchor:$})=>{const F=l(null),C=l(null),I=l(null),W=l(null),[U,H]=n(s),[B,M]=n({}),[V,q]=n({}),[Y,z]=n(!1),[X,K]=n(!1),J=l(!1),Z=l(null),{anchorRefs:G,setActiveAnchor:Q}=w(e),ee=l(!1),[te,ne]=n([]),re=l(!1),oe=d||p.includes("click");x((()=>(re.current=!0,()=>{re.current=!1})),[]),a((()=>{if(!Y){const e=setTimeout((()=>{K(!1)}),150);return()=>{clearTimeout(e)}}return()=>null}),[Y]);const ie=e=>{re.current&&(e&&K(!0),setTimeout((()=>{re.current&&(null==D||D(e),void 0===P&&z(e))}),10))};a((()=>{if(void 0===P)return()=>null;P&&K(!0);const e=setTimeout((()=>{z(P)}),10);return()=>{clearTimeout(e)}}),[P]),a((()=>{Y!==J.current&&(J.current=Y,Y?null==E||E():null==j||j())}),[Y]);const le=(e=_)=>{W.current&&clearTimeout(W.current),W.current=setTimeout((()=>{ee.current||ie(!1)}),e)},ae=e=>{var t;if(!e)return;b?(I.current&&clearTimeout(I.current),I.current=setTimeout((()=>{ie(!0)}),b)):ie(!0);const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;$(n),Q({current:n}),W.current&&clearTimeout(W.current)},ce=()=>{A?le(_||100):_?le():ie(!1),I.current&&clearTimeout(I.current)},se=({x:e,y:t})=>{be({place:s,offset:f,elementReference:{getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})},tooltipReference:F.current,tooltipArrowReference:C.current,strategy:h,middlewares:v}).then((e=>{Object.keys(e.tooltipStyles).length&&M(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&q(e.tooltipArrowStyles),H(e.place)}))},ue=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};se(n),Z.current=n},fe=e=>{ae(e),_&&le()},pe=e=>{var t;[document.querySelector(`[id='${i}']`),...te].some((t=>null==t?void 0:t.contains(e.target)))||(null===(t=F.current)||void 0===t?void 0:t.contains(e.target))||ie(!1)},de=e=>{"Escape"===e.key&&ie(!1)},ye=m(ae,50),me=m(ce,50);a((()=>{var e,t;const n=new Set(G);te.forEach((e=>{n.add({current:e})}));const r=document.querySelector(`[id='${i}']`);r&&n.add({current:r}),O&&window.addEventListener("keydown",de);const o=[];oe?(window.addEventListener("click",pe),o.push({event:"click",listener:fe})):(o.push({event:"mouseenter",listener:ye},{event:"mouseleave",listener:me},{event:"focus",listener:ye},{event:"blur",listener:me}),T&&o.push({event:"mousemove",listener:ue}));const l=()=>{ee.current=!0},a=()=>{ee.current=!1,ce()};return A&&!oe&&(null===(e=F.current)||void 0===e||e.addEventListener("mouseenter",l),null===(t=F.current)||void 0===t||t.addEventListener("mouseleave",a)),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;oe&&window.removeEventListener("click",pe),O&&window.removeEventListener("keydown",de),A&&!oe&&(null===(e=F.current)||void 0===e||e.removeEventListener("mouseenter",l),null===(t=F.current)||void 0===t||t.removeEventListener("mouseleave",a)),o.forEach((({event:e,listener:t})=>{n.forEach((n=>{var r;null===(r=n.current)||void 0===r||r.removeEventListener(e,t)}))}))}}),[X,G,te,O,p]),a((()=>{let t=null!=c?c:"";!t&&e&&(t=`[data-tooltip-id='${e}']`);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")===e&&r.push(n.target)}if("childList"===n.type&&(N&&[...n.removedNodes].some((e=>!!e.contains(N)&&(K(!1),ie(!1),$(null),!0))),t))try{const e=[...n.addedNodes].filter((e=>1===e.nodeType));r.push(...e.filter((e=>e.matches(t)))),r.push(...e.flatMap((e=>[...e.querySelectorAll(t)])))}catch(e){}})),r.length&&ne((e=>[...e,...r]))}));return n.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"]}),()=>{n.disconnect()}}),[e,c,N]),a((()=>{k?se(k):T?Z.current&&se(Z.current):be({place:s,offset:f,elementReference:N,tooltipReference:F.current,tooltipArrowReference:C.current,strategy:h,middlewares:v}).then((e=>{re.current&&(Object.keys(e.tooltipStyles).length&&M(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&q(e.tooltipArrowStyles),H(e.place))}))}),[Y,N,L,s,f,h,k]),a((()=>{var e;const t=document.querySelector(`[id='${i}']`),n=[...te,t];N&&n.includes(N)||$(null!==(e=te[0])&&void 0!==e?e:t)}),[i,te,N]),a((()=>()=>{I.current&&clearTimeout(I.current),W.current&&clearTimeout(W.current)}),[]),a((()=>{let t=c;if(!t&&e&&(t=`[data-tooltip-id='${e}']`),t)try{const e=Array.from(document.querySelectorAll(t));ne(e)}catch(e){ne([])}}),[e,c]);const he=L&&Y&&Object.keys(B).length>0;return X?u.exports.jsxs(g,{id:e,role:"tooltip",className:y("react-tooltip",xe.tooltip,xe[o],t,`react-tooltip__place-${U}`,{[xe.show]:he,[xe.fixed]:"fixed"===h,[xe.clickable]:A}),style:{...R,...B},ref:F,children:[L,u.exports.jsx(g,{className:y("react-tooltip-arrow",xe.arrow,r,{[xe.noArrow]:S}),style:V,ref:C})]}):null},Te=({content:e})=>u.exports.jsx("span",{dangerouslySetInnerHTML:{__html:e}}),Se=({id:e,anchorId:t,anchorSelect:r,content:o,html:i,render:l,className:c,classNameArrow:s,variant:f="dark",place:p="top",offset:d=10,wrapper:y="div",children:m=null,events:h=["hover"],openOnClick:v=!1,positionStrategy:g="absolute",middlewares:b,delayShow:x=0,delayHide:_=0,float:T=!1,noArrow:S=!1,clickable:A=!1,closeOnEsc:O=!1,style:R,position:k,isOpen:E,setIsOpen:j,afterShow:L,afterHide:P})=>{const[D,N]=n(o),[$,F]=n(i),[C,I]=n(p),[W,U]=n(f),[H,B]=n(d),[M,V]=n(x),[q,Y]=n(_),[z,X]=n(T),[K,J]=n(y),[Z,G]=n(h),[Q,ee]=n(g),[te,ne]=n(null),{anchorRefs:re,activeAnchor:oe}=w(e),ie=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}),{}),le=e=>{const t={place:e=>{var t;I(null!==(t=e)&&void 0!==t?t:p)},content:e=>{N(null!=e?e:o)},html:e=>{F(null!=e?e:i)},variant:e=>{var t;U(null!==(t=e)&&void 0!==t?t:f)},offset:e=>{B(null===e?d:Number(e))},wrapper:e=>{var t;J(null!==(t=e)&&void 0!==t?t:y)},events:e=>{const t=null==e?void 0:e.split(" ");G(null!=t?t:h)},"position-strategy":e=>{var t;ee(null!==(t=e)&&void 0!==t?t:g)},"delay-show":e=>{V(null===e?x:Number(e))},"delay-hide":e=>{Y(null===e?_:Number(e))},float:e=>{X(null===e?T:"true"===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)}))};a((()=>{N(o)}),[o]),a((()=>{F(i)}),[i]),a((()=>{I(p)}),[p]),a((()=>{var n;const o=new Set(re);let i=r;if(!i&&e&&(i=`[data-tooltip-id='${e}']`),i)try{document.querySelectorAll(i).forEach((e=>{o.add({current:e})}))}catch(e){console.warn(`[react-tooltip] "${r}" is not a valid CSS selector`)}const l=document.querySelector(`[id='${t}']`);if(l&&o.add({current:l}),!o.size)return()=>null;const a=null!==(n=null!=te?te:l)&&void 0!==n?n:oe.current,c=new MutationObserver((e=>{e.forEach((e=>{var t;if(!a||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=ie(a);le(n)}))})),s={attributes:!0,childList:!1,subtree:!1};if(a){const e=ie(a);le(e),c.observe(a,s)}return()=>{c.disconnect()}}),[re,oe,te,t,r]);let ae=m;l?ae=l({content:null!=D?D:null,activeAnchor:te}):D&&(ae=D),$&&(ae=u.exports.jsx(Te,{content:$}));const ce={id:e,anchorId:t,anchorSelect:r,className:c,classNameArrow:s,content:ae,place:C,variant:W,offset:H,wrapper:K,events:Z,openOnClick:v,positionStrategy:Q,middlewares:b,delayShow:M,delayHide:q,float:z,noArrow:S,clickable:A,closeOnEsc:O,style:R,position:k,isOpen:E,setIsOpen:j,afterShow:L,afterHide:P,activeAnchor:te,setActiveAnchor:e=>ne(e)};return u.exports.jsx(_e,{...ce})};export{Se as Tooltip,g as TooltipProvider,b as TooltipWrapper};
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{createContext as r,useState as o,useCallback as l,useMemo as n,useContext as a,useRef as i,useEffect as c,useLayoutEffect as s}from"react";import u from"classnames";import{arrow as d,computePosition as p,offset as v,flip as m,shift as h}from"@floating-ui/dom";const f=(e,t,r)=>{let o=null;return function(...l){o&&clearTimeout(o),o=setTimeout((()=>{o=null,r||e.apply(this,l)}),t)}},y="DEFAULT_TOOLTIP_ID",w={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},S=r({getTooltipData:()=>w}),b=({children:t})=>{const[r,a]=o({[y]:new Set}),[i,c]=o({[y]:{current:null}}),s=(e,...t)=>{a((r=>{var o;const l=null!==(o=r[e])&&void 0!==o?o:new Set;return t.forEach((e=>l.add(e))),{...r,[e]:new Set(l)}}))},u=(e,...t)=>{a((r=>{const o=r[e];return o?(t.forEach((e=>o.delete(e))),{...r}):r}))},d=l(((e=y)=>{var t,o;return{anchorRefs:null!==(t=r[e])&&void 0!==t?t:new Set,activeAnchor:null!==(o=i[e])&&void 0!==o?o:{current:null},attach:(...t)=>s(e,...t),detach:(...t)=>u(e,...t),setActiveAnchor:t=>((e,t)=>{c((r=>{var o;return(null===(o=r[e])||void 0===o?void 0:o.current)===t.current?r:{...r,[e]:t}}))})(e,t)}}),[r,i,s,u]),p=n((()=>({getTooltipData:d})),[d]);return e(S.Provider,{value:p,children:t})};function g(e=y){return a(S).getTooltipData(e)}const A=({tooltipId:t,children:r,className:o,place:l,content:n,html:a,variant:s,offset:d,wrapper:p,events:v,positionStrategy:m,delayShow:h,delayHide:f})=>{const{attach:y,detach:w}=g(t),S=i(null);return c((()=>(y(S),()=>{w(S)})),[]),e("span",{ref:S,className:u("react-tooltip-wrapper",o),"data-tooltip-place":l,"data-tooltip-content":n,"data-tooltip-html":a,"data-tooltip-variant":s,"data-tooltip-offset":d,"data-tooltip-wrapper":p,"data-tooltip-events":v,"data-tooltip-position-strategy":m,"data-tooltip-delay-show":h,"data-tooltip-delay-hide":f,children:r})},_="undefined"!=typeof window?s:c,E=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:r=null,place:o="top",offset:l=10,strategy:n="absolute",middlewares:a=[v(Number(l)),m(),h({padding:5})]})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};const i=a;return r?(i.push(d({element:r,padding:5})),p(e,t,{placement:o,strategy:n,middleware:i}).then((({x:e,y:t,placement:r,middlewareData:o})=>{var l,n;const a={left:`${e}px`,top:`${t}px`},{x:i,y:c}=null!==(l=o.arrow)&&void 0!==l?l:{x:0,y:0};return{tooltipStyles:a,tooltipArrowStyles:{left:null!=i?`${i}px`:"",top:null!=c?`${c}px`:"",right:"",bottom:"",[null!==(n={top:"bottom",right:"left",bottom:"top",left:"right"}[r.split("-")[0]])&&void 0!==n?n:"bottom"]:"-4px"},place:r}}))):p(e,t,{placement:"bottom",strategy:n,middleware:i}).then((({x:e,y:t,placement:r})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:r})))};var T={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 k=({id:r,className:l,classNameArrow:n,variant:a="dark",anchorId:s,anchorSelect:d,place:p="top",offset:v=10,events:m=["hover"],openOnClick:h=!1,positionStrategy:y="absolute",middlewares:w,wrapper:S,delayShow:b=0,delayHide:A=0,float:k=!1,noArrow:O=!1,clickable:N=!1,closeOnEsc:x=!1,style:L,position:$,afterShow:R,afterHide:I,content:j,isOpen:H,setIsOpen:q,activeAnchor:D,setActiveAnchor:C})=>{const W=i(null),K=i(null),M=i(null),B=i(null),[F,X]=o(p),[J,P]=o({}),[U,Z]=o({}),[z,Y]=o(!1),[G,Q]=o(!1),V=i(!1),ee=i(null),{anchorRefs:te,setActiveAnchor:re}=g(r),oe=i(!1),[le,ne]=o([]),ae=i(!1),ie=h||m.includes("click");_((()=>(ae.current=!0,()=>{ae.current=!1})),[]),c((()=>{if(!z){const e=setTimeout((()=>{Q(!1)}),150);return()=>{clearTimeout(e)}}return()=>null}),[z]);const ce=e=>{ae.current&&(e&&Q(!0),setTimeout((()=>{ae.current&&(null==q||q(e),void 0===H&&Y(e))}),10))};c((()=>{if(void 0===H)return()=>null;H&&Q(!0);const e=setTimeout((()=>{Y(H)}),10);return()=>{clearTimeout(e)}}),[H]),c((()=>{z!==V.current&&(V.current=z,z?null==R||R():null==I||I())}),[z]);const se=(e=A)=>{B.current&&clearTimeout(B.current),B.current=setTimeout((()=>{oe.current||ce(!1)}),e)},ue=e=>{var t;if(!e)return;b?(M.current&&clearTimeout(M.current),M.current=setTimeout((()=>{ce(!0)}),b)):ce(!0);const r=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;C(r),re({current:r}),B.current&&clearTimeout(B.current)},de=()=>{N?se(A||100):A?se():ce(!1),M.current&&clearTimeout(M.current)},pe=({x:e,y:t})=>{E({place:p,offset:v,elementReference:{getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})},tooltipReference:W.current,tooltipArrowReference:K.current,strategy:y,middlewares:w}).then((e=>{Object.keys(e.tooltipStyles).length&&P(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&Z(e.tooltipArrowStyles),X(e.place)}))},ve=e=>{if(!e)return;const t=e,r={x:t.clientX,y:t.clientY};pe(r),ee.current=r},me=e=>{ue(e),A&&se()},he=e=>{var t;[document.querySelector(`[id='${s}']`),...le].some((t=>null==t?void 0:t.contains(e.target)))||(null===(t=W.current)||void 0===t?void 0:t.contains(e.target))||ce(!1)},fe=e=>{"Escape"===e.key&&ce(!1)},ye=f(ue,50),we=f(de,50);c((()=>{var e,t;const r=new Set(te);le.forEach((e=>{r.add({current:e})}));const o=document.querySelector(`[id='${s}']`);o&&r.add({current:o}),x&&window.addEventListener("keydown",fe);const l=[];ie?(window.addEventListener("click",he),l.push({event:"click",listener:me})):(l.push({event:"mouseenter",listener:ye},{event:"mouseleave",listener:we},{event:"focus",listener:ye},{event:"blur",listener:we}),k&&l.push({event:"mousemove",listener:ve}));const n=()=>{oe.current=!0},a=()=>{oe.current=!1,de()};return N&&!ie&&(null===(e=W.current)||void 0===e||e.addEventListener("mouseenter",n),null===(t=W.current)||void 0===t||t.addEventListener("mouseleave",a)),l.forEach((({event:e,listener:t})=>{r.forEach((r=>{var o;null===(o=r.current)||void 0===o||o.addEventListener(e,t)}))})),()=>{var e,t;ie&&window.removeEventListener("click",he),x&&window.removeEventListener("keydown",fe),N&&!ie&&(null===(e=W.current)||void 0===e||e.removeEventListener("mouseenter",n),null===(t=W.current)||void 0===t||t.removeEventListener("mouseleave",a)),l.forEach((({event:e,listener:t})=>{r.forEach((r=>{var o;null===(o=r.current)||void 0===o||o.removeEventListener(e,t)}))}))}}),[G,te,le,x,m]),c((()=>{let e=null!=d?d:"";!e&&r&&(e=`[data-tooltip-id='${r}']`);const t=new MutationObserver((t=>{const o=[];t.forEach((t=>{if("attributes"===t.type&&"data-tooltip-id"===t.attributeName){t.target.getAttribute("data-tooltip-id")===r&&o.push(t.target)}if("childList"===t.type&&(D&&[...t.removedNodes].some((e=>!!e.contains(D)&&(Q(!1),ce(!1),C(null),!0))),e))try{const r=[...t.addedNodes].filter((e=>1===e.nodeType));o.push(...r.filter((t=>t.matches(e)))),o.push(...r.flatMap((t=>[...t.querySelectorAll(e)])))}catch(e){}})),o.length&&ne((e=>[...e,...o]))}));return t.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"]}),()=>{t.disconnect()}}),[r,d,D]),c((()=>{$?pe($):k?ee.current&&pe(ee.current):E({place:p,offset:v,elementReference:D,tooltipReference:W.current,tooltipArrowReference:K.current,strategy:y,middlewares:w}).then((e=>{ae.current&&(Object.keys(e.tooltipStyles).length&&P(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&Z(e.tooltipArrowStyles),X(e.place))}))}),[z,D,j,p,v,y,$]),c((()=>{var e;const t=document.querySelector(`[id='${s}']`),r=[...le,t];D&&r.includes(D)||C(null!==(e=le[0])&&void 0!==e?e:t)}),[s,le,D]),c((()=>()=>{M.current&&clearTimeout(M.current),B.current&&clearTimeout(B.current)}),[]),c((()=>{let e=d;if(!e&&r&&(e=`[data-tooltip-id='${r}']`),e)try{const t=Array.from(document.querySelectorAll(e));ne(t)}catch(e){ne([])}}),[r,d]);const Se=j&&z&&Object.keys(J).length>0;return G?t(S,{id:r,role:"tooltip",className:u("react-tooltip",T.tooltip,T[a],l,`react-tooltip__place-${F}`,{[T.show]:Se,[T.fixed]:"fixed"===y,[T.clickable]:N}),style:{...L,...J},ref:W,children:[j,e(S,{className:u("react-tooltip-arrow",T.arrow,n,{[T.noArrow]:O}),style:U,ref:K})]}):null},O=({content:t})=>e("span",{dangerouslySetInnerHTML:{__html:t}}),N=({id:t,anchorId:r,anchorSelect:l,content:n,html:a,render:i,className:s,classNameArrow:u,variant:d="dark",place:p="top",offset:v=10,wrapper:m="div",children:h=null,events:f=["hover"],openOnClick:y=!1,positionStrategy:w="absolute",middlewares:S,delayShow:b=0,delayHide:A=0,float:_=!1,noArrow:E=!1,clickable:T=!1,closeOnEsc:N=!1,style:x,position:L,isOpen:$,setIsOpen:R,afterShow:I,afterHide:j})=>{const[H,q]=o(n),[D,C]=o(a),[W,K]=o(p),[M,B]=o(d),[F,X]=o(v),[J,P]=o(b),[U,Z]=o(A),[z,Y]=o(_),[G,Q]=o(m),[V,ee]=o(f),[te,re]=o(w),[oe,le]=o(null),{anchorRefs:ne,activeAnchor:ae}=g(t),ie=e=>null==e?void 0:e.getAttributeNames().reduce(((t,r)=>{var o;if(r.startsWith("data-tooltip-")){t[r.replace(/^data-tooltip-/,"")]=null!==(o=null==e?void 0:e.getAttribute(r))&&void 0!==o?o:null}return t}),{}),ce=e=>{const t={place:e=>{var t;K(null!==(t=e)&&void 0!==t?t:p)},content:e=>{q(null!=e?e:n)},html:e=>{C(null!=e?e:a)},variant:e=>{var t;B(null!==(t=e)&&void 0!==t?t:d)},offset:e=>{X(null===e?v:Number(e))},wrapper:e=>{var t;Q(null!==(t=e)&&void 0!==t?t:m)},events:e=>{const t=null==e?void 0:e.split(" ");ee(null!=t?t:f)},"position-strategy":e=>{var t;re(null!==(t=e)&&void 0!==t?t:w)},"delay-show":e=>{P(null===e?b:Number(e))},"delay-hide":e=>{Z(null===e?A:Number(e))},float:e=>{Y(null===e?_:"true"===e)}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,r])=>{var o;null===(o=t[e])||void 0===o||o.call(t,r)}))};c((()=>{q(n)}),[n]),c((()=>{C(a)}),[a]),c((()=>{K(p)}),[p]),c((()=>{var e;const o=new Set(ne);let n=l;if(!n&&t&&(n=`[data-tooltip-id='${t}']`),n)try{document.querySelectorAll(n).forEach((e=>{o.add({current:e})}))}catch(e){console.warn(`[react-tooltip] "${l}" is not a valid CSS selector`)}const a=document.querySelector(`[id='${r}']`);if(a&&o.add({current:a}),!o.size)return()=>null;const i=null!==(e=null!=oe?oe:a)&&void 0!==e?e:ae.current,c=new MutationObserver((e=>{e.forEach((e=>{var t;if(!i||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const r=ie(i);ce(r)}))})),s={attributes:!0,childList:!1,subtree:!1};if(i){const e=ie(i);ce(e),c.observe(i,s)}return()=>{c.disconnect()}}),[ne,ae,oe,r,l]);let se=h;i?se=i({content:null!=H?H:null,activeAnchor:oe}):H&&(se=H),D&&(se=e(O,{content:D}));return e(k,{...{id:t,anchorId:r,anchorSelect:l,className:s,classNameArrow:u,content:se,place:W,variant:M,offset:F,wrapper:G,events:V,openOnClick:y,positionStrategy:te,middlewares:S,delayShow:J,delayHide:U,float:z,noArrow:E,clickable:T,closeOnEsc:N,style:x,position:L,isOpen:$,setIsOpen:R,afterShow:I,afterHide:j,activeAnchor:oe,setActiveAnchor:e=>le(e)}})};export{N as Tooltip,b as TooltipProvider,A as TooltipWrapper};