react-tooltip 5.5.2 → 5.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/react-tooltip.cjs.js +2251 -1925
- package/dist/react-tooltip.cjs.min.js +3 -3
- package/dist/react-tooltip.d.ts +6 -1
- package/dist/react-tooltip.esm.js +2246 -1926
- package/dist/react-tooltip.esm.min.js +3 -3
- package/dist/react-tooltip.umd.js +2251 -1925
- package/dist/react-tooltip.umd.min.js +3 -3
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ReactTooltip={},e.React)}(this,(function(e,t){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=n(t),o={exports:{}},i={};
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ReactTooltip={},e.React)}(this,(function(e,t){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=n(t);function o(e){return e.split("-")[0]}function i(e){return e.split("-")[1]}function l(e){return["top","bottom"].includes(o(e))?"x":"y"}function a(e){return"y"===e?"height":"width"}function s(e,t,n){let{reference:r,floating:s}=e;const c=r.x+r.width/2-s.width/2,u=r.y+r.height/2-s.height/2,f=l(t),p=a(f),d=r[p]/2-s[p]/2,y="x"===f;let m;switch(o(t)){case"top":m={x:c,y:r.y-s.height};break;case"bottom":m={x:c,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:u};break;case"left":m={x:r.x-s.width,y:u};break;default:m={x:r.x,y:r.y}}switch(i(t)){case"start":m[f]-=d*(n&&y?-1:1);break;case"end":m[f]+=d*(n&&y?-1:1)}return m}function c(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 u(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function f(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:l,elements:a,strategy:s}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:d="floating",altBoundary:y=!1,padding:m=0}=t,h=c(m),g=a[y?"floating"===d?"reference":"floating":d],v=u(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(g)))||n?g:g.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:f,rootBoundary:p,strategy:s})),w=u(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:"floating"===d?{...l.floating,x:r,y:o}:l.reference,offsetParent:await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),strategy:s}):l[d]);return{top:v.top-w.top+h.top,bottom:w.bottom-v.bottom+h.bottom,left:v.left-w.left+h.left,right:w.right-v.right+h.right}}const p=Math.min,d=Math.max;function y(e,t,n){return d(e,p(t,n))}const m={left:"right",right:"left",bottom:"top",top:"bottom"};function h(e){return e.replace(/left|right|bottom|top/g,(e=>m[e]))}function g(e,t,n){void 0===n&&(n=!1);const r=i(e),o=l(e),s=a(o);let c="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[s]>t.floating[s]&&(c=h(c)),{main:c,cross:h(c)}}const v={start:"end",end:"start"};function w(e){return e.replace(/start|end/g,(e=>v[e]))}const b=["top","right","bottom","left"].reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[]);const x=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:l,initialPlacement:a,platform:s,elements:c}=t,{mainAxis:u=!0,crossAxis:p=!0,fallbackPlacements:d,fallbackStrategy:y="bestFit",flipAlignment:m=!0,...v}=e,b=o(r),x=d||(b===a||!m?[h(a)]:function(e){const t=h(e);return[w(e),t,w(t)]}(a)),R=[a,...x],_=await f(t,v),S=[];let T=(null==(n=i.flip)?void 0:n.overflows)||[];if(u&&S.push(_[b]),p){const{main:e,cross:t}=g(r,l,await(null==s.isRTL?void 0:s.isRTL(c.floating)));S.push(_[e],_[t])}if(T=[...T,{placement:r,overflows:S}],!S.every((e=>e<=0))){var k,O;const e=(null!=(k=null==(O=i.flip)?void 0:O.index)?k:0)+1,t=R[e];if(t)return{data:{index:e,overflows:T},reset:{placement:t}};let n="bottom";switch(y){case"bestFit":{var E;const e=null==(E=T.map((e=>[e,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:E[0].placement;e&&(n=e);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}}}};const R=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,a=await async function(e,t){const{placement:n,platform:r,elements:a}=e,s=await(null==r.isRTL?void 0:r.isRTL(a.floating)),c=o(n),u=i(n),f="x"===l(n),p=["left","top"].includes(c)?-1:1,d=s&&f?-1:1,y="function"==typeof t?t(e):t;let{mainAxis:m,crossAxis:h,alignmentAxis:g}="number"==typeof y?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...y};return u&&"number"==typeof g&&(h="end"===u?-1*g:g),f?{x:h*d,y:m*p}:{x:m*p,y:h*d}}(t,e);return{x:n+a.x,y:r+a.y,data:a}}}};const _=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...u}=e,p={x:n,y:r},d=await f(t,u),m=l(o(i)),h="x"===m?"y":"x";let g=p[m],v=p[h];if(a){const e="y"===m?"bottom":"right";g=y(g+d["y"===m?"top":"left"],g,g-d[e])}if(s){const e="y"===h?"bottom":"right";v=y(v+d["y"===h?"top":"left"],v,v-d[e])}const w=c.fn({...t,[m]:g,[h]:v});return{...w,data:{x:w.x-n,y:w.y-r}}}}};function S(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function T(e){if(null==e)return window;if(!S(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function k(e){return T(e).getComputedStyle(e)}function O(e){return S(e)?"":e?(e.nodeName||"").toLowerCase():""}function E(){const e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((e=>e.brand+"/"+e.version)).join(" "):navigator.userAgent}function A(e){return e instanceof T(e).HTMLElement}function j(e){return e instanceof T(e).Element}function P(e){if("undefined"==typeof ShadowRoot)return!1;return e instanceof T(e).ShadowRoot||e instanceof ShadowRoot}function L(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=k(e);return/auto|scroll|overlay|hidden/.test(t+r+n)&&!["inline","contents"].includes(o)}function N(e){return["table","td","th"].includes(O(e))}function D(e){const t=/firefox/i.test(E()),n=k(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 C(){return!/^((?!chrome|android).)*safari/i.test(E())}function $(e){return["html","body","#document"].includes(O(e))}const F=Math.min,I=Math.max,W=Math.round;function H(e,t,n){var r,o,i,l;void 0===t&&(t=!1),void 0===n&&(n=!1);const a=e.getBoundingClientRect();let s=1,c=1;t&&A(e)&&(s=e.offsetWidth>0&&W(a.width)/e.offsetWidth||1,c=e.offsetHeight>0&&W(a.height)/e.offsetHeight||1);const u=j(e)?T(e):window,f=!C()&&n,p=(a.left+(f&&null!=(r=null==(o=u.visualViewport)?void 0:o.offsetLeft)?r:0))/s,d=(a.top+(f&&null!=(i=null==(l=u.visualViewport)?void 0:l.offsetTop)?i:0))/c,y=a.width/s,m=a.height/c;return{width:y,height:m,top:d,right:p+y,bottom:d+m,left:p,x:p,y:d}}function U(e){return(t=e,(t instanceof T(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function B(e){return j(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function V(e){return H(U(e)).left+B(e).scrollLeft}function M(e,t,n){const r=A(t),o=U(t),i=H(e,r&&function(e){const t=H(e);return W(t.width)!==e.offsetWidth||W(t.height)!==e.offsetHeight}(t),"fixed"===n);let l={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if(r||!r&&"fixed"!==n)if(("body"!==O(t)||L(o))&&(l=B(t)),A(t)){const e=H(t,!0);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&(a.x=V(o));return{x:i.left+l.scrollLeft-a.x,y:i.top+l.scrollTop-a.y,width:i.width,height:i.height}}function z(e){if("html"===O(e))return e;const t=e.assignedSlot||e.parentNode||(P(e)?e.host:null)||U(e);return P(t)?t.host:t}function q(e){return A(e)&&"fixed"!==k(e).position?e.offsetParent:null}function Y(e){const t=T(e);let n=q(e);for(;n&&N(n)&&"static"===k(n).position;)n=q(n);return n&&("html"===O(n)||"body"===O(n)&&"static"===k(n).position&&!D(n))?t:n||function(e){let t=z(e);for(;A(t)&&!$(t);){if(D(t))return t;t=z(t)}return null}(e)||t}function X(e){if(A(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=H(e);return{width:t.width,height:t.height}}function K(e){const t=z(e);return $(t)?e.ownerDocument.body:A(t)&&L(t)?t:K(t)}function J(e,t){var n;void 0===t&&(t=[]);const r=K(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=T(r),l=o?[i].concat(i.visualViewport||[],L(r)?r:[]):r,a=t.concat(l);return o?a:a.concat(J(l))}function Z(e,t,n){return"viewport"===t?u(function(e,t){const n=T(e),r=U(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=C();(e||!e&&"fixed"===t)&&(a=o.offsetLeft,s=o.offsetTop)}return{width:i,height:l,x:a,y:s}}(e,n)):j(t)?function(e,t){const n=H(e,!1,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft;return{top:r,left:o,x:o,y:r,right:o+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}(t,n):u(function(e){var t;const n=U(e),r=B(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=I(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),l=I(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0);let a=-r.scrollLeft+V(e);const s=-r.scrollTop;return"rtl"===k(o||n).direction&&(a+=I(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:l,x:a,y:s}}(U(e)))}const G={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?function(e){let t=J(e).filter((e=>j(e)&&"body"!==O(e))),n=e,r=null;for(;j(n)&&!$(n);){const e=k(n);"static"===e.position&&r&&["absolute","fixed"].includes(r.position)&&!D(n)?t=t.filter((e=>e!==n)):r=e,n=z(n)}return t}(t):[].concat(n),l=[...i,r],a=l[0],s=l.reduce(((e,n)=>{const r=Z(t,n,o);return e.top=I(r.top,e.top),e.right=F(r.right,e.right),e.bottom=F(r.bottom,e.bottom),e.left=I(r.left,e.left),e}),Z(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=A(n),i=U(n);if(n===i)return t;let l={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==O(n)||L(i))&&(l=B(n)),A(n))){const e=H(n,!0);a.x=e.x+n.clientLeft,a.y=e.y+n.clientTop}return{...t,x:t.x-l.scrollLeft+a.x,y:t.y-l.scrollTop+a.y}},isElement:j,getDimensions:X,getOffsetParent:Y,getDocumentElement:U,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:M(t,Y(n),r),floating:{...X(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===k(e).direction},Q=(e,t,n)=>(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 u=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:p}=s(u,r,c),d=r,y={},m=0;for(let n=0;n<a.length;n++){const{name:i,fn:h}=a[n],{x:g,y:v,data:w,reset:b}=await h({x:f,y:p,initialPlacement:r,placement:d,strategy:o,middlewareData:y,rects:u,platform:l,elements:{reference:e,floating:t}});f=null!=g?g:f,p=null!=v?v:p,y={...y,[i]:{...y[i],...w}},m>50&&console.warn(["Floating UI: The middleware lifecycle appears to be running in an","infinite loop. This is usually caused by a `reset` continually","being returned without a break condition."].join(" ")),b&&m<=50&&(m++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(u=!0===b.rects?await l.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:f,y:p}=s(u,d,c))),n=-1)}return{x:f,y:p,placement:d,strategy:o,middlewareData:y}})(e,t,{platform:G,...n});var ee={exports:{}},te={};
|
|
2
2
|
/** @license React v16.14.0
|
|
3
3
|
* react-jsx-runtime.development.js
|
|
4
4
|
*
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
9
|
*/
|
|
10
|
-
!function(e){!function(){var t=r.default,n=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,
|
|
10
|
+
!function(e){!function(){var t=r.default,n=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,g=60129,v=60131;if("function"==typeof Symbol&&Symbol.for){var w=Symbol.for;n=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"),g=w("react.debug_trace_mode"),w("react.offscreen"),v=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 R(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(O){var i=T(O.type),l=O._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];if(a)i=a.replace(S,"")+"/"+i}}r=" (at "+i+":"+t.lineNumber+")"}else n&&(r=" (created by "+n+")");return"\n in "+(e||"Unknown")+r}(i,O._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 S=/^(.*)[\\\/]/;function T(t){if(null==t)return null;if("number"==typeof t.tag&&R("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,g="ForwardRef",v=h.displayName||h.name||"",m.displayName||(""!==v?g+"("+v+")":g);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,g,v;return null}var k={};x.ReactDebugCurrentFrame;var O=null;function E(e){O=e}var A,j,P,L=x.ReactCurrentOwner,N=Object.prototype.hasOwnProperty,D={key:!0,ref:!0,__self:!0,__source:!0};P={};function C(e,t,r,o,i){var l,a={},s=null,c=null;for(l in void 0!==r&&(s=""+r),function(e){if(N.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(N.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&&L.current&&t&&L.current.stateNode!==t){var n=T(L.current.type);P[n]||(R('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(L.current.type),e.ref),P[n]=!0)}}(t,i)),t)N.call(t,l)&&!D.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(){A||(A=!0,R("%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,R("%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 s={$$typeof:n,type:e,key:t,ref:r,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,L.current,a)}var $,F=x.ReactCurrentOwner;function I(e){O=e}function W(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}function H(){if(F.current){var e=T(F.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}x.ReactDebugCurrentFrame,$=!1;var U={};function B(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var t=H();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(!U[n]){U[n]=!0;var r="";e&&e._owner&&e._owner!==F.current&&(r=" It was passed a child from "+T(e._owner.type)+"."),I(e),R('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 V(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 M(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||(E(o),R("%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),E(null)),a instanceof Error&&!(a.message in k)&&(k[a.message]=!0,E(o),R("Failed %s type: %s",n,a.message),E(null))}}(t,e.props,"prop",r,e)}else if(void 0!==n.PropTypes&&!$){$=!0,R("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",T(n)||"Unknown")}"function"!=typeof n.getDefaultProps||n.getDefaultProps.isReactClassApproved||R("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function z(t,r,o,w,b,x){var _=function(t){return"string"==typeof t||"function"==typeof t||t===e.Fragment||t===l||t===g||t===i||t===u||t===f||t===v||"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 S="";(void 0===t||"object"==typeof t&&null!==t&&0===Object.keys(t).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 k,O=function(e){return void 0!==e?"\n\nCheck your code at "+e.fileName.replace(/^.*[\\\/]/,"")+":"+e.lineNumber+".":""}(b);S+=O||H(),null===t?k="null":Array.isArray(t)?k="array":void 0!==t&&t.$$typeof===n?(k="<"+(T(t.type)||"Unknown")+" />",S=" Did you accidentally export a JSX literal instead of a component?"):k=typeof t,R("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",k,S)}var E=C(t,r,o,b,x);if(null==E)return E;if(_){var A=r.children;if(void 0!==A)if(w)if(Array.isArray(A)){for(var j=0;j<A.length;j++)V(A[j],t);Object.freeze&&Object.freeze(A)}else R("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 V(A,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),R("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),R("Invalid attribute `ref` supplied to `React.Fragment`."),I(null))}(E):M(E),E}var q=function(e,t,n){return z(e,t,n,!1)},Y=function(e,t,n){return z(e,t,n,!0)};e.jsx=q,e.jsxs=Y}()}(te),function(e){e.exports=te}(ee);var ne={exports:{}};
|
|
11
11
|
/*!
|
|
12
12
|
Copyright (c) 2018 Jed Watson.
|
|
13
13
|
Licensed under the MIT License (MIT), see
|
|
14
14
|
http://jedwatson.github.io/classnames
|
|
15
|
-
*/!function(e){!function(){var t={}.hasOwnProperty;function n(){for(var e=[],r=0;r<arguments.length;r++){var o=arguments[r];if(o){var i=typeof o;if("string"===i||"number"===i)e.push(o);else if(Array.isArray(o)){if(o.length){var l=n.apply(null,o);l&&e.push(l)}}else if("object"===i){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){e.push(o.toString());continue}for(var a in o)t.call(o,a)&&o[a]&&e.push(a)}}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n}()}(l);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=({content:e})=>o.exports.jsx("span",{dangerouslySetInnerHTML:{__html:e}}),u="DEFAULT_TOOLTIP_ID",f={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},p={getTooltipData:()=>f},d=t.createContext(p);function y(e=u){return t.useContext(d).getTooltipData(e)}function h(e){return e.split("-")[0]}function m(e){return e.split("-")[1]}function v(e){return["top","bottom"].includes(h(e))?"x":"y"}function g(e){return"y"===e?"height":"width"}function w(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=g(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(m(t)){case"start":f[a]-=c*(n&&u?-1:1);break;case"end":f[a]+=c*(n&&u?-1:1)}return f}function b(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function x(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function _(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=b(d),h=a[p?"floating"===f?"reference":"floating":f],m=x(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(h)))||n?h:h.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:s})),v=x(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:"floating"===f?{...l.floating,x:r,y:o}:l.reference,offsetParent:await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),strategy:s}):l[f]);return{top:m.top-v.top+y.top,bottom:v.bottom-m.bottom+y.bottom,left:m.left-v.left+y.left,right:v.right-m.right+y.right}}const S=Math.min,R=Math.max;function T(e,t,n){return R(e,S(t,n))}const k={left:"right",right:"left",bottom:"top",top:"bottom"};function O(e){return e.replace(/left|right|bottom|top/g,(e=>k[e]))}const j={start:"end",end:"start"};function A(e){return e.replace(/start|end/g,(e=>j[e]))}const E=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",flipAlignment:d=!0,...y}=e,w=h(r),b=f||(w===l||!d?[O(l)]:function(e){const t=O(e);return[A(e),t,A(t)]}(l)),x=[l,...b],S=await _(t,y),R=[];let T=(null==(n=o.flip)?void 0:n.overflows)||[];if(c&&R.push(S[w]),u){const{main:e,cross:t}=function(e,t,n){void 0===n&&(n=!1);const r=m(e),o=v(e),i=g(o);let l="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=O(l)),{main:l,cross:O(l)}}(r,i,await(null==a.isRTL?void 0:a.isRTL(s.floating)));R.push(S[e],S[t])}if(T=[...T,{placement:r,overflows:R}],!R.every((e=>e<=0))){var k,j;const e=(null!=(k=null==(j=o.flip)?void 0:j.index)?k:0)+1,t=x[e];if(t)return{data:{index:e,overflows:T},reset:{placement:t}};let n="bottom";switch(p){case"bestFit":{var E;const e=null==(E=T.map((e=>[e,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:E[0].placement;e&&(n=e);break}case"initialPlacement":n=l}if(r!==n)return{reset:{placement:n}}}return{}}}};const P=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=m(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: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),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}}}};function L(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function N(e){if(null==e)return window;if(!L(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function D(e){return N(e).getComputedStyle(e)}function $(e){return L(e)?"":e?(e.nodeName||"").toLowerCase():""}function C(){const e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((e=>e.brand+"/"+e.version)).join(" "):navigator.userAgent}function F(e){return e instanceof N(e).HTMLElement}function I(e){return e instanceof N(e).Element}function W(e){if("undefined"==typeof ShadowRoot)return!1;return e instanceof N(e).ShadowRoot||e instanceof ShadowRoot}function H(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=D(e);return/auto|scroll|overlay|hidden/.test(t+r+n)&&!["inline","contents"].includes(o)}function U(e){return["table","td","th"].includes($(e))}function B(e){const t=/firefox/i.test(C()),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 M(){return!/^((?!chrome|android).)*safari/i.test(C())}function V(e){return["html","body","#document"].includes($(e))}const q=Math.min,z=Math.max,Y=Math.round;function X(e,t,n){var r,o,i,l;void 0===t&&(t=!1),void 0===n&&(n=!1);const a=e.getBoundingClientRect();let s=1,c=1;t&&F(e)&&(s=e.offsetWidth>0&&Y(a.width)/e.offsetWidth||1,c=e.offsetHeight>0&&Y(a.height)/e.offsetHeight||1);const u=I(e)?N(e):window,f=!M()&&n,p=(a.left+(f&&null!=(r=null==(o=u.visualViewport)?void 0:o.offsetLeft)?r:0))/s,d=(a.top+(f&&null!=(i=null==(l=u.visualViewport)?void 0:l.offsetTop)?i:0))/c,y=a.width/s,h=a.height/c;return{width:y,height:h,top:d,right:p+y,bottom:d+h,left:p,x:p,y:d}}function K(e){return(t=e,(t instanceof N(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function J(e){return I(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Z(e){return X(K(e)).left+J(e).scrollLeft}function G(e,t,n){const r=F(t),o=K(t),i=X(e,r&&function(e){const t=X(e);return Y(t.width)!==e.offsetWidth||Y(t.height)!==e.offsetHeight}(t),"fixed"===n);let l={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if(r||!r&&"fixed"!==n)if(("body"!==$(t)||H(o))&&(l=J(t)),F(t)){const e=X(t,!0);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&(a.x=Z(o));return{x:i.left+l.scrollLeft-a.x,y:i.top+l.scrollTop-a.y,width:i.width,height:i.height}}function Q(e){if("html"===$(e))return e;const t=e.assignedSlot||e.parentNode||(W(e)?e.host:null)||K(e);return W(t)?t.host:t}function ee(e){return F(e)&&"fixed"!==D(e).position?e.offsetParent:null}function te(e){const t=N(e);let n=ee(e);for(;n&&U(n)&&"static"===D(n).position;)n=ee(n);return n&&("html"===$(n)||"body"===$(n)&&"static"===D(n).position&&!B(n))?t:n||function(e){let t=Q(e);for(;F(t)&&!V(t);){if(B(t))return t;t=Q(t)}return null}(e)||t}function ne(e){if(F(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=X(e);return{width:t.width,height:t.height}}function re(e){const t=Q(e);return V(t)?e.ownerDocument.body:F(t)&&H(t)?t:re(t)}function oe(e,t){var n;void 0===t&&(t=[]);const r=re(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=N(r),l=o?[i].concat(i.visualViewport||[],H(r)?r:[]):r,a=t.concat(l);return o?a:a.concat(oe(l))}function ie(e,t,n){return"viewport"===t?x(function(e,t){const n=N(e),r=K(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=M();(e||!e&&"fixed"===t)&&(a=o.offsetLeft,s=o.offsetTop)}return{width:i,height:l,x:a,y:s}}(e,n)):I(t)?function(e,t){const n=X(e,!1,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft;return{top:r,left:o,x:o,y:r,right:o+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}(t,n):x(function(e){var t;const n=K(e),r=J(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=z(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),l=z(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0);let a=-r.scrollLeft+Z(e);const s=-r.scrollTop;return"rtl"===D(o||n).direction&&(a+=z(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:l,x:a,y:s}}(K(e)))}const le={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?function(e){let t=oe(e).filter((e=>I(e)&&"body"!==$(e))),n=e,r=null;for(;I(n)&&!V(n);){const e=D(n);"static"===e.position&&r&&["absolute","fixed"].includes(r.position)&&!B(n)?t=t.filter((e=>e!==n)):r=e,n=Q(n)}return t}(t):[].concat(n),l=[...i,r],a=l[0],s=l.reduce(((e,n)=>{const r=ie(t,n,o);return e.top=z(r.top,e.top),e.right=q(r.right,e.right),e.bottom=q(r.bottom,e.bottom),e.left=z(r.left,e.left),e}),ie(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=F(n),i=K(n);if(n===i)return t;let l={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==$(n)||H(i))&&(l=J(n)),F(n))){const e=X(n,!0);a.x=e.x+n.clientLeft,a.y=e.y+n.clientTop}return{...t,x:t.x-l.scrollLeft+a.x,y:t.y-l.scrollTop+a.y}},isElement:I,getDimensions:ne,getOffsetParent:te,getDocumentElement:K,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:G(t,te(n),r),floating:{...ne(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===D(e).direction},ae=(e,t,n)=>(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}=w(c,r,s),p=r,d={},y=0;for(let n=0;n<a.length;n++){const{name:i,fn:h}=a[n],{x:m,y:v,data:g,reset:b}=await h({x:u,y:f,initialPlacement:r,placement:p,strategy:o,middlewareData:d,rects:c,platform:l,elements:{reference:e,floating:t}});u=null!=m?m: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(" ")),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}=w(c,p,s))),n=-1)}return{x:u,y:f,placement:p,strategy:o,middlewareData:d}})(e,t,{platform:le,...n}),se=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:n=null,place:r="top",offset:o=10,strategy:i="absolute"})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{}};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{}};const l=[P(Number(o)),E(),(a={padding:5},void 0===a&&(a={}),{name:"shift",options:a,async fn(e){const{x:t,y:n,placement:r}=e,{mainAxis:o=!0,crossAxis:i=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=a,c={x:t,y:n},u=await _(e,s),f=v(h(r)),p="x"===f?"y":"x";let d=c[f],y=c[p];if(o){const e="y"===f?"bottom":"right";d=T(d+u["y"===f?"top":"left"],d,d-u[e])}if(i){const e="y"===p?"bottom":"right";y=T(y+u["y"===p?"top":"left"],y,y-u[e])}const m=l.fn({...e,[f]:d,[p]:y});return{...m,data:{x:m.x-t,y:m.y-n}}}})];var a;return n?(l.push((e=>({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=null!=e?e:{},{x:o,y:i,placement:l,rects:a,platform:s}=t;if(null==n)return console.warn("Floating UI: No `element` was passed to the `arrow` middleware."),{};const c=b(r),u={x:o,y:i},f=v(l),p=m(l),d=g(f),y=await s.getDimensions(n),h="y"===f?"top":"left",w="y"===f?"bottom":"right",x=a.reference[d]+a.reference[f]-u[f]-a.floating[d],_=u[f]-a.reference[f],S=await(null==s.getOffsetParent?void 0:s.getOffsetParent(n));let R=S?"y"===f?S.clientHeight||0:S.clientWidth||0:0;0===R&&(R=a.floating[d]);const k=x/2-_/2,O=c[h],j=R-y[d]-c[w],A=R/2-y[d]/2+k,E=T(O,A,j),P=("start"===p?c[h]:c[w])>0&&A!==E&&a.reference[d]<=a.floating[d];return{[f]:u[f]-(P?A<O?O-A:j-A:0),data:{[f]:E,centerOffset:A-E}}}}))({element:n,padding:5})),ae(e,t,{placement:r,strategy:i,middleware:l}).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"}}}))):ae(e,t,{placement:"bottom",strategy:i,middleware:l}).then((({x:e,y:t})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{}})))};var ce={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 ue=({id:e,className:n,classNameArrow:r,variant:i="dark",anchorId:l,place:u="top",offset:f=10,events:p=["hover"],positionStrategy:d="absolute",wrapper:h="div",children:m=null,delayShow:v=0,delayHide:g=0,float:w=!1,noArrow:b=!1,clickable:x=!1,style:_,position:S,afterShow:R,afterHide:T,content:k,html:O,isOpen:j,setIsOpen:A})=>{const E=t.useRef(null),P=t.useRef(null),L=t.useRef(null),N=t.useRef(null),[D,$]=t.useState({}),[C,F]=t.useState({}),[I,W]=t.useState(!1),H=t.useRef(!1),[U,B]=t.useState(!1),M=t.useRef(null),{anchorRefs:V,setActiveAnchor:q}=y(e),[z,Y]=t.useState({current:null}),X=t.useRef(!1),K=e=>{A?A(e):void 0===j&&W(e)};t.useEffect((()=>{I!==H.current&&(H.current=I,I?null==R||R():null==T||T())}),[I]);const J=(e=g)=>{N.current&&clearTimeout(N.current),N.current=setTimeout((()=>{X.current||K(!1)}),e)},Z=e=>{var t;if(!e)return;v?(L.current&&clearTimeout(L.current),L.current=setTimeout((()=>{K(!0)}),v)):K(!0);const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;Y((e=>e.current===n?e:{current:n})),q({current:n}),N.current&&clearTimeout(N.current)},G=()=>{x?J(g||50):g?J():K(!1),L.current&&clearTimeout(L.current)},Q=({x:e,y:t})=>{const n={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};B(!0),se({place:u,offset:f,elementReference:n,tooltipReference:E.current,tooltipArrowReference:P.current,strategy:d}).then((e=>{B(!1),Object.keys(e.tooltipStyles).length&&$(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&F(e.tooltipArrowStyles)}))},ee=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};Q(n),M.current=n},te=e=>{Z(e),g&&J()},ne=e=>{var t;(null===(t=z.current)||void 0===t?void 0:t.contains(e.target))||K(!1)},re=s(Z,50),oe=s(G,50);t.useEffect((()=>{var e,t;const n=new Set(V),r=document.querySelector(`[id='${l}']`);if(r&&(Y((e=>e.current===r?e:{current:r})),n.add({current:r})),!n.size)return()=>null;const o=[];p.find((e=>"click"===e))&&(window.addEventListener("click",ne),o.push({event:"click",listener:te})),p.find((e=>"hover"===e))&&(o.push({event:"mouseenter",listener:re},{event:"mouseleave",listener:oe},{event:"focus",listener:re},{event:"blur",listener:oe}),w&&o.push({event:"mousemove",listener:ee}));const i=()=>{X.current=!0},a=()=>{X.current=!1,G()};return x&&(null===(e=E.current)||void 0===e||e.addEventListener("mouseenter",i),null===(t=E.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;window.removeEventListener("click",ne),x&&(null===(e=E.current)||void 0===e||e.removeEventListener("mouseenter",i),null===(t=E.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)}))}))}}),[V,z,l,p,g,v]),t.useEffect((()=>{if(S)return Q(S),()=>null;if(w)return M.current&&Q(M.current),()=>null;let e=z.current;l&&(e=document.querySelector(`[id='${l}']`)),B(!0);let t=!0;return se({place:u,offset:f,elementReference:e,tooltipReference:E.current,tooltipArrowReference:P.current,strategy:d}).then((e=>{t&&(B(!1),Object.keys(e.tooltipStyles).length&&$(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&F(e.tooltipArrowStyles))})),()=>{t=!1}}),[I,j,l,z,k,O,u,f,d,S]),t.useEffect((()=>()=>{L.current&&clearTimeout(L.current),N.current&&clearTimeout(N.current)}),[]);const ie=Boolean(O||k||m);return o.exports.jsxs(h,{id:e,role:"tooltip",className:a("react-tooltip",ce.tooltip,ce[i],n,{[ce.show]:ie&&!U&&(j||I),[ce.fixed]:"fixed"===d,[ce.clickable]:x}),style:{..._,...D},ref:E,children:[m||O&&o.exports.jsx(c,{content:O})||k,o.exports.jsx("div",{className:a("react-tooltip-arrow",ce.arrow,r,{[ce["no-arrow"]]:b}),style:C,ref:P})]})};e.Tooltip=({id:e,anchorId:n,content:r,html:i,className:l,classNameArrow:a,variant:s="dark",place:c="top",offset:u=10,wrapper:f="div",children:p=null,events:d=["hover"],positionStrategy:h="absolute",delayShow:m=0,delayHide:v=0,float:g=!1,noArrow:w=!1,clickable:b=!1,style:x,position:_,isOpen:S,setIsOpen:R,afterShow:T,afterHide:k})=>{const[O,j]=t.useState(r),[A,E]=t.useState(i),[P,L]=t.useState(c),[N,D]=t.useState(s),[$,C]=t.useState(u),[F,I]=t.useState(m),[W,H]=t.useState(v),[U,B]=t.useState(g),[M,V]=t.useState(f),[q,z]=t.useState(d),[Y,X]=t.useState(h),{anchorRefs:K,activeAnchor:J}=y(e),Z=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}),{}),G=e=>{const t={place:e=>{var t;L(null!==(t=e)&&void 0!==t?t:c)},content:e=>{j(null!=e?e:r)},html:e=>{E(null!=e?e:i)},variant:e=>{var t;D(null!==(t=e)&&void 0!==t?t:s)},offset:e=>{C(null===e?u:Number(e))},wrapper:e=>{var t;V(null!==(t=e)&&void 0!==t?t:"div")},events:e=>{const t=null==e?void 0:e.split(" ");z(null!=t?t:d)},"position-strategy":e=>{var t;X(null!==(t=e)&&void 0!==t?t:h)},"delay-show":e=>{I(null===e?m:Number(e))},"delay-hide":e=>{H(null===e?v:Number(e))},float:e=>{B(null===e?g:Boolean(e))}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,n])=>{var r;null===(r=t[e])||void 0===r||r.call(t,n)}))};t.useEffect((()=>{j(r)}),[r]),t.useEffect((()=>{E(i)}),[i]),t.useEffect((()=>{var e;const t=new Set(K),r=document.querySelector(`[id='${n}']`);if(r&&t.add({current:r}),!t.size)return()=>null;const o=null!==(e=J.current)&&void 0!==e?e:r,i=new MutationObserver((e=>{e.forEach((e=>{var t;if(!o||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=Z(o);G(n)}))})),l={attributes:!0,childList:!1,subtree:!1};if(o){const e=Z(o);G(e),i.observe(o,l)}return()=>{i.disconnect()}}),[K,J,n]);const Q={id:e,anchorId:n,className:l,classNameArrow:a,content:O,html:A,place:P,variant:N,offset:$,wrapper:M,events:q,positionStrategy:Y,delayShow:F,delayHide:W,float:U,noArrow:w,clickable:b,style:x,position:_,isOpen:S,setIsOpen:R,afterShow:T,afterHide:k};return p?o.exports.jsx(ue,{...Q,children:p}):o.exports.jsx(ue,{...Q})},e.TooltipProvider=({children:e})=>{const[n,r]=t.useState({[u]:new Set}),[i,l]=t.useState({[u]:{current:null}}),a=(e,...t)=>{r((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)=>{r((n=>{const r=n[e];return r?(t.forEach((e=>r.delete(e))),{...n}):n}))},c=t.useCallback(((e=u)=>{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]),f=t.useMemo((()=>({getTooltipData:c})),[c]);return o.exports.jsx(d.Provider,{value:f,children:e})},e.TooltipWrapper=({tooltipId:e,children:n,className:r,place:i,content:l,html:s,variant:c,offset:u,wrapper:f,events:p,positionStrategy:d,delayShow:h,delayHide:m})=>{const{attach:v,detach:g}=y(e),w=t.useRef(null);return t.useEffect((()=>(v(w),()=>{g(w)})),[]),o.exports.jsx("span",{ref:w,className:a("react-tooltip-wrapper",r),"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":p,"data-tooltip-position-strategy":d,"data-tooltip-delay-show":h,"data-tooltip-delay-hide":m,children:n})},Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
15
|
+
*/!function(e){!function(){var t={}.hasOwnProperty;function n(){for(var e=[],r=0;r<arguments.length;r++){var o=arguments[r];if(o){var i=typeof o;if("string"===i||"number"===i)e.push(o);else if(Array.isArray(o)){if(o.length){var l=n.apply(null,o);l&&e.push(l)}}else if("object"===i){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){e.push(o.toString());continue}for(var a in o)t.call(o,a)&&o[a]&&e.push(a)}}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n}()}(ne);var re=ne.exports;const oe=(e,t,n)=>{let r=null;return function(...o){r&&clearTimeout(r),r=setTimeout((()=>{r=null,n||e.apply(this,o)}),t)}},ie=({content:e})=>ee.exports.jsx("span",{dangerouslySetInnerHTML:{__html:e}}),le="DEFAULT_TOOLTIP_ID",ae={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},se={getTooltipData:()=>ae},ce=t.createContext(se);function ue(e=le){return t.useContext(ce).getTooltipData(e)}const fe=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:n=null,place:r="top",offset:o=10,strategy:s="absolute",middlewares:u=[R(Number(o)),x(),_({padding:5})]})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{}};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{}};const f=u;return n?(f.push({name:"arrow",options:p={element:n,padding:5},async fn(e){const{element:t,padding:n=0}=null!=p?p:{},{x:r,y:o,placement:s,rects:u,platform:f}=e;if(null==t)return console.warn("Floating UI: No `element` was passed to the `arrow` middleware."),{};const d=c(n),m={x:r,y:o},h=l(s),g=i(s),v=a(h),w=await f.getDimensions(t),b="y"===h?"top":"left",x="y"===h?"bottom":"right",R=u.reference[v]+u.reference[h]-m[h]-u.floating[v],_=m[h]-u.reference[h],S=await(null==f.getOffsetParent?void 0:f.getOffsetParent(t));let T=S?"y"===h?S.clientHeight||0:S.clientWidth||0:0;0===T&&(T=u.floating[v]);const k=R/2-_/2,O=d[b],E=T-w[v]-d[x],A=T/2-w[v]/2+k,j=y(O,A,E),P=("start"===g?d[b]:d[x])>0&&A!==j&&u.reference[v]<=u.floating[v];return{[h]:m[h]-(P?A<O?O-A:E-A:0),data:{[h]:j,centerOffset:A-j}}}}),Q(e,t,{placement:r,strategy:s,middleware:f}).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"}}}))):Q(e,t,{placement:"bottom",strategy:s,middleware:f}).then((({x:e,y:t})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{}})));var p};var pe={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 de=({id:e,className:n,classNameArrow:r,variant:o="dark",anchorId:i,place:l="top",offset:a=10,events:s=["hover"],positionStrategy:c="absolute",middlewares:u,wrapper:f="div",children:p=null,delayShow:d=0,delayHide:y=0,float:m=!1,noArrow:h=!1,clickable:g=!1,closeOnEsc:v=!1,style:w,position:b,afterShow:x,afterHide:R,content:_,html:S,isOpen:T,setIsOpen:k})=>{const O=t.useRef(null),E=t.useRef(null),A=t.useRef(null),j=t.useRef(null),[P,L]=t.useState({}),[N,D]=t.useState({}),[C,$]=t.useState(!1),F=t.useRef(!1),[I,W]=t.useState(!1),H=t.useRef(null),{anchorRefs:U,setActiveAnchor:B}=ue(e),[V,M]=t.useState({current:null}),z=t.useRef(!1),q=e=>{k?k(e):void 0===T&&$(e)};t.useEffect((()=>{C!==F.current&&(F.current=C,C?null==x||x():null==R||R())}),[C]);const Y=(e=y)=>{j.current&&clearTimeout(j.current),j.current=setTimeout((()=>{z.current||q(!1)}),e)},X=e=>{var t;if(!e)return;d?(A.current&&clearTimeout(A.current),A.current=setTimeout((()=>{q(!0)}),d)):q(!0);const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;M((e=>e.current===n?e:{current:n})),B({current:n}),j.current&&clearTimeout(j.current)},K=()=>{g?Y(y||50):y?Y():q(!1),A.current&&clearTimeout(A.current)},J=({x:e,y:t})=>{const n={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};W(!0),fe({place:l,offset:a,elementReference:n,tooltipReference:O.current,tooltipArrowReference:E.current,strategy:c,middlewares:u}).then((e=>{W(!1),Object.keys(e.tooltipStyles).length&&L(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&D(e.tooltipArrowStyles)}))},Z=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};J(n),H.current=n},G=e=>{X(e),y&&Y()},Q=e=>{var t;(null===(t=V.current)||void 0===t?void 0:t.contains(e.target))||q(!1)},te=e=>{"Escape"===e.key&&q(!1)},ne=oe(X,50),le=oe(K,50);t.useEffect((()=>{var e,t;const n=new Set(U),r=document.querySelector(`[id='${i}']`);if(r&&(M((e=>e.current===r?e:{current:r})),n.add({current:r})),!n.size)return()=>null;v&&window.addEventListener("keydown",te);const o=[];s.find((e=>"click"===e))&&(window.addEventListener("click",Q),o.push({event:"click",listener:G})),s.find((e=>"hover"===e))&&(o.push({event:"mouseenter",listener:ne},{event:"mouseleave",listener:le},{event:"focus",listener:ne},{event:"blur",listener:le}),m&&o.push({event:"mousemove",listener:Z}));const l=()=>{z.current=!0},a=()=>{z.current=!1,K()};return g&&(null===(e=O.current)||void 0===e||e.addEventListener("mouseenter",l),null===(t=O.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;s.find((e=>"click"===e))&&window.removeEventListener("click",Q),v&&window.removeEventListener("keydown",te),g&&(null===(e=O.current)||void 0===e||e.removeEventListener("mouseenter",l),null===(t=O.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)}))}))}}),[U,V,v,i,s,y,d]),t.useEffect((()=>{if(b)return J(b),()=>null;if(m)return H.current&&J(H.current),()=>null;let e=V.current;i&&(e=document.querySelector(`[id='${i}']`)),W(!0);let t=!0;return fe({place:l,offset:a,elementReference:e,tooltipReference:O.current,tooltipArrowReference:E.current,strategy:c,middlewares:u}).then((e=>{t&&(W(!1),Object.keys(e.tooltipStyles).length&&L(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&D(e.tooltipArrowStyles))})),()=>{t=!1}}),[C,T,i,V,_,S,l,a,c,b]),t.useEffect((()=>()=>{A.current&&clearTimeout(A.current),j.current&&clearTimeout(j.current)}),[]);const ae=Boolean(S||_||p);return ee.exports.jsxs(f,{id:e,role:"tooltip",className:re("react-tooltip",pe.tooltip,pe[o],n,{[pe.show]:ae&&!I&&(T||C),[pe.fixed]:"fixed"===c,[pe.clickable]:g}),style:{...w,...P},ref:O,children:[p||S&&ee.exports.jsx(ie,{content:S})||_,ee.exports.jsx("div",{className:re("react-tooltip-arrow",pe.arrow,r,{[pe["no-arrow"]]:h}),style:N,ref:E})]})};e.Tooltip=({id:e,anchorId:n,content:r,html:o,className:i,classNameArrow:l,variant:a="dark",place:s="top",offset:c=10,wrapper:u="div",children:f=null,events:p=["hover"],positionStrategy:d="absolute",middlewares:y,delayShow:m=0,delayHide:h=0,float:g=!1,noArrow:v=!1,clickable:w=!1,closeOnEsc:b=!1,style:x,position:R,isOpen:_,setIsOpen:S,afterShow:T,afterHide:k})=>{const[O,E]=t.useState(r),[A,j]=t.useState(o),[P,L]=t.useState(s),[N,D]=t.useState(a),[C,$]=t.useState(c),[F,I]=t.useState(m),[W,H]=t.useState(h),[U,B]=t.useState(g),[V,M]=t.useState(u),[z,q]=t.useState(p),[Y,X]=t.useState(d),{anchorRefs:K,activeAnchor:J}=ue(e),Z=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}),{}),G=e=>{const t={place:e=>{var t;L(null!==(t=e)&&void 0!==t?t:s)},content:e=>{E(null!=e?e:r)},html:e=>{j(null!=e?e:o)},variant:e=>{var t;D(null!==(t=e)&&void 0!==t?t:a)},offset:e=>{$(null===e?c:Number(e))},wrapper:e=>{var t;M(null!==(t=e)&&void 0!==t?t:"div")},events:e=>{const t=null==e?void 0:e.split(" ");q(null!=t?t:p)},"position-strategy":e=>{var t;X(null!==(t=e)&&void 0!==t?t:d)},"delay-show":e=>{I(null===e?m:Number(e))},"delay-hide":e=>{H(null===e?h:Number(e))},float:e=>{B(null===e?g:Boolean(e))}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,n])=>{var r;null===(r=t[e])||void 0===r||r.call(t,n)}))};t.useEffect((()=>{E(r)}),[r]),t.useEffect((()=>{j(o)}),[o]),t.useEffect((()=>{var e;const t=new Set(K),r=document.querySelector(`[id='${n}']`);if(r&&t.add({current:r}),!t.size)return()=>null;const o=null!==(e=J.current)&&void 0!==e?e:r,i=new MutationObserver((e=>{e.forEach((e=>{var t;if(!o||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=Z(o);G(n)}))})),l={attributes:!0,childList:!1,subtree:!1};if(o){const e=Z(o);G(e),i.observe(o,l)}return()=>{i.disconnect()}}),[K,J,n]);const Q={id:e,anchorId:n,className:i,classNameArrow:l,content:O,html:A,place:P,variant:N,offset:C,wrapper:V,events:z,positionStrategy:Y,middlewares:y,delayShow:F,delayHide:W,float:U,noArrow:v,clickable:w,closeOnEsc:b,style:x,position:R,isOpen:_,setIsOpen:S,afterShow:T,afterHide:k};return f?ee.exports.jsx(de,{...Q,children:f}):ee.exports.jsx(de,{...Q})},e.TooltipProvider=({children:e})=>{const[n,r]=t.useState({[le]:new Set}),[o,i]=t.useState({[le]:{current:null}}),l=(e,...t)=>{r((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)}}))},a=(e,...t)=>{r((n=>{const r=n[e];return r?(t.forEach((e=>r.delete(e))),{...n}):n}))},s=t.useCallback(((e=le)=>{var t,r;return{anchorRefs:null!==(t=n[e])&&void 0!==t?t:new Set,activeAnchor:null!==(r=o[e])&&void 0!==r?r:{current:null},attach:(...t)=>l(e,...t),detach:(...t)=>a(e,...t),setActiveAnchor:t=>((e,t)=>{i((n=>{var r;return(null===(r=n[e])||void 0===r?void 0:r.current)===t.current?n:{...n,[e]:t}}))})(e,t)}}),[n,o,l,a]),c=t.useMemo((()=>({getTooltipData:s})),[s]);return ee.exports.jsx(ce.Provider,{value:c,children:e})},e.TooltipWrapper=({tooltipId:e,children:n,className:r,place:o,content:i,html:l,variant:a,offset:s,wrapper:c,events:u,positionStrategy:f,delayShow:p,delayHide:d})=>{const{attach:y,detach:m}=ue(e),h=t.useRef(null);return t.useEffect((()=>(y(h),()=>{m(h)})),[]),ee.exports.jsx("span",{ref:h,className:re("react-tooltip-wrapper",r),"data-tooltip-place":o,"data-tooltip-content":i,"data-tooltip-html":l,"data-tooltip-variant":a,"data-tooltip-offset":s,"data-tooltip-wrapper":c,"data-tooltip-events":u,"data-tooltip-position-strategy":f,"data-tooltip-delay-show":p,"data-tooltip-delay-hide":d,children:n})},e.autoPlacement=function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,l,a,s;const{x:c,y:u,rects:p,middlewareData:d,placement:y,platform:m,elements:h}=t,{alignment:v=null,allowedPlacements:x=b,autoAlignment:R=!0,..._}=e,S=function(e,t,n){return(e?[...n.filter((t=>i(t)===e)),...n.filter((t=>i(t)!==e))]:n.filter((e=>o(e)===e))).filter((n=>!e||i(n)===e||!!t&&w(n)!==n))}(v,R,x),T=await f(t,_),k=null!=(n=null==(r=d.autoPlacement)?void 0:r.index)?n:0,O=S[k];if(null==O)return{};const{main:E,cross:A}=g(O,p,await(null==m.isRTL?void 0:m.isRTL(h.floating)));if(y!==O)return{x:c,y:u,reset:{placement:S[0]}};const j=[T[o(O)],T[E],T[A]],P=[...null!=(l=null==(a=d.autoPlacement)?void 0:a.overflows)?l:[],{placement:O,overflows:j}],L=S[k+1];if(L)return{data:{index:k+1,overflows:P},reset:{placement:L}};const N=P.slice().sort(((e,t)=>e.overflows[0]-t.overflows[0])),D=null==(s=N.find((e=>{let{overflows:t}=e;return t.every((e=>e<=0))})))?void 0:s.placement,C=null!=D?D:N[0].placement;return C!==y?{data:{index:k+1,overflows:P},reset:{placement:C}}:{}}}},e.flip=x,e.inline=function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){var n;const{placement:r,elements:i,rects:a,platform:s,strategy:f}=t,{padding:y=2,x:m,y:h}=e,g=u(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({rect:a.reference,offsetParent:await(null==s.getOffsetParent?void 0:s.getOffsetParent(i.floating)),strategy:f}):a.reference),v=null!=(n=await(null==s.getClientRects?void 0:s.getClientRects(i.reference)))?n:[],w=c(y);const b=await s.getElementRects({reference:{getBoundingClientRect:function(){var e;if(2===v.length&&v[0].left>v[1].right&&null!=m&&null!=h)return null!=(e=v.find((e=>m>e.left-w.left&&m<e.right+w.right&&h>e.top-w.top&&h<e.bottom+w.bottom)))?e:g;if(v.length>=2){if("x"===l(r)){const e=v[0],t=v[v.length-1],n="top"===o(r),i=e.top,l=t.bottom,a=n?e.left:t.left,s=n?e.right:t.right;return{top:i,bottom:l,left:a,right:s,width:s-a,height:l-i,x:a,y:i}}const e="left"===o(r),t=d(...v.map((e=>e.right))),n=p(...v.map((e=>e.left))),i=v.filter((r=>e?r.left===n:r.right===t)),a=i[0].top,s=i[i.length-1].bottom;return{top:a,bottom:s,left:n,right:t,width:t-n,height:s-a,x:n,y:a}}return g}},floating:i.floating,strategy:f});return a.reference.x!==b.reference.x||a.reference.y!==b.reference.y||a.reference.width!==b.reference.width||a.reference.height!==b.reference.height?{reset:{rects:b}}:{}}}},e.offset=R,e.shift=_,e.size=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:l,elements:a}=t,{apply:s=(()=>{}),...c}=e,u=await f(t,c),p=o(n),y=i(n);let m,h;"top"===p||"bottom"===p?(m=p,h=y===(await(null==l.isRTL?void 0:l.isRTL(a.floating))?"start":"end")?"left":"right"):(h=p,m="end"===y?"top":"bottom");const g=d(u.left,0),v=d(u.right,0),w=d(u.top,0),b=d(u.bottom,0),x={availableHeight:r.floating.height-(["left","right"].includes(n)?2*(0!==w||0!==b?w+b:d(u.top,u.bottom)):u[m]),availableWidth:r.floating.width-(["top","bottom"].includes(n)?2*(0!==g||0!==v?g+v:d(u.left,u.right)):u[h])};await s({...t,...x});const R=await l.getDimensions(a.floating);return r.floating.width!==R.width||r.floating.height!==R.height?{reset:{rects:!0}}:{}}}},Object.defineProperty(e,"__esModule",{value:!0})}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-tooltip",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.7.0",
|
|
4
4
|
"description": "react tooltip component",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "node ./cli.js --env=development && node --max_old_space_size=2048 ./node_modules/rollup/dist/bin/rollup -c rollup.config.dev.js --watch",
|