react-tooltip 5.4.0 → 5.5.1
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 +23 -7
- package/dist/react-tooltip.cjs.js +47 -26
- package/dist/react-tooltip.cjs.min.js +2 -2
- package/dist/react-tooltip.d.ts +3 -1
- package/dist/react-tooltip.esm.js +47 -26
- package/dist/react-tooltip.esm.min.js +2 -2
- package/dist/react-tooltip.umd.js +47 -26
- package/dist/react-tooltip.umd.min.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
# react-tooltip
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.org/package/react-tooltip)
|
|
4
|
+

|
|
4
5
|
[](https://github.com/prettier/prettier)
|
|
5
6
|
[![npm download][download-image]][download-url]
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+

|
|
8
|
+

|
|
9
|
+
<!--  -->
|
|
8
10
|
|
|
9
11
|
[download-image]: https://img.shields.io/npm/dm/react-tooltip.svg?style=flat-square
|
|
10
12
|
[download-url]: https://npmjs.org/package/react-tooltip
|
|
@@ -15,6 +17,8 @@
|
|
|
15
17
|
</a>
|
|
16
18
|
</p>
|
|
17
19
|
|
|
20
|
+
If you like the project, please give the project a GitHub 🌟
|
|
21
|
+
|
|
18
22
|
## Demo
|
|
19
23
|
|
|
20
24
|
[](https://codesandbox.io/s/still-monad-yfi4fn?fontsize=14&hidenavigation=1&theme=dark)
|
|
@@ -23,6 +27,10 @@ Documentation for V4 - [Github Page](https://reacttooltip.github.io/react-toolti
|
|
|
23
27
|
|
|
24
28
|
Documentation for V5 - [ReactTooltip](https://react-tooltip.com/docs/getting-started).
|
|
25
29
|
|
|
30
|
+
[Bundle size timeline comparation from V4 -> V5](https://bundlephobia.com/package/react-tooltip@5.0.0)
|
|
31
|
+
|
|
32
|
+
<img width="1073" alt="image" src="https://user-images.githubusercontent.com/9615850/211835641-f6373084-ad73-4902-9855-246d34952345.png">
|
|
33
|
+
|
|
26
34
|
## Installation
|
|
27
35
|
|
|
28
36
|
```sh
|
|
@@ -39,7 +47,15 @@ yarn add react-tooltip
|
|
|
39
47
|
|
|
40
48
|
### Using NPM
|
|
41
49
|
|
|
42
|
-
1 .
|
|
50
|
+
1 . Import the CSS file to set default styling
|
|
51
|
+
|
|
52
|
+
```js
|
|
53
|
+
import 'react-tooltip/dist/react-tooltip.css'
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
This needs to be done only once. We suggest you do it on your `src/index.js` or equivalent file.
|
|
57
|
+
|
|
58
|
+
2 . Import `react-tooltip` after installation
|
|
43
59
|
|
|
44
60
|
```js
|
|
45
61
|
import { Tooltip } from 'react-tooltip'
|
|
@@ -51,7 +67,7 @@ or if you want to still use the name ReactTooltip as V4:
|
|
|
51
67
|
import { Tooltip as ReactTooltip } from 'react-tooltip'
|
|
52
68
|
```
|
|
53
69
|
|
|
54
|
-
|
|
70
|
+
3 . Add `data-tooltip-content="your placeholder"` to your element
|
|
55
71
|
|
|
56
72
|
```jsx
|
|
57
73
|
<p id="my-element" data-tooltip-content="hello world">
|
|
@@ -59,7 +75,7 @@ import { Tooltip as ReactTooltip } from 'react-tooltip'
|
|
|
59
75
|
</p>
|
|
60
76
|
```
|
|
61
77
|
|
|
62
|
-
|
|
78
|
+
4 . Include react-tooltip component
|
|
63
79
|
|
|
64
80
|
```jsx
|
|
65
81
|
<ReactTooltip anchorId="my-element" />
|
|
@@ -71,9 +87,9 @@ You can import `node_modules/react-tooltip/dist/react-tooltip.[mode].js` into yo
|
|
|
71
87
|
|
|
72
88
|
mode: `esm` `cjs` `umd`
|
|
73
89
|
|
|
74
|
-
|
|
90
|
+
Don't forget to import the CSS file from `node_modules/react-tooltip/dist/react-tooltip.css` to set default styling. This needs to be done only once in your application.
|
|
75
91
|
|
|
76
|
-
PS: all the files
|
|
92
|
+
PS: all the files have a minified version and a non-minified version.
|
|
77
93
|
|
|
78
94
|

|
|
79
95
|
|
|
@@ -2750,9 +2750,9 @@ var styles = {"tooltip":"styles-module_tooltip__mnnfp","fixed":"styles-module_fi
|
|
|
2750
2750
|
|
|
2751
2751
|
const Tooltip = ({
|
|
2752
2752
|
// props
|
|
2753
|
-
id, className, classNameArrow, variant = 'dark', anchorId, place = 'top', offset = 10, events = ['hover'], positionStrategy = 'absolute', wrapper: WrapperElement = 'div', children = null, delayShow = 0, delayHide = 0, float = false, noArrow = false, clickable = false, style: externalStyles, position,
|
|
2753
|
+
id, className, classNameArrow, variant = 'dark', anchorId, place = 'top', offset = 10, events = ['hover'], positionStrategy = 'absolute', wrapper: WrapperElement = 'div', children = null, delayShow = 0, delayHide = 0, float = false, noArrow = false, clickable = false, style: externalStyles, position, afterShow, afterHide,
|
|
2754
2754
|
// props handled by controller
|
|
2755
|
-
|
|
2755
|
+
content, html, isOpen, setIsOpen, }) => {
|
|
2756
2756
|
const tooltipRef = require$$0.useRef(null);
|
|
2757
2757
|
const tooltipArrowRef = require$$0.useRef(null);
|
|
2758
2758
|
const tooltipShowDelayTimerRef = require$$0.useRef(null);
|
|
@@ -2760,6 +2760,7 @@ isHtmlContent = false, content, isOpen, setIsOpen, }) => {
|
|
|
2760
2760
|
const [inlineStyles, setInlineStyles] = require$$0.useState({});
|
|
2761
2761
|
const [inlineArrowStyles, setInlineArrowStyles] = require$$0.useState({});
|
|
2762
2762
|
const [show, setShow] = require$$0.useState(false);
|
|
2763
|
+
const wasShowing = require$$0.useRef(false);
|
|
2763
2764
|
const [calculatingPosition, setCalculatingPosition] = require$$0.useState(false);
|
|
2764
2765
|
const lastFloatPosition = require$$0.useRef(null);
|
|
2765
2766
|
const { anchorRefs, setActiveAnchor: setProviderActiveAnchor } = useTooltip()(id);
|
|
@@ -2773,6 +2774,18 @@ isHtmlContent = false, content, isOpen, setIsOpen, }) => {
|
|
|
2773
2774
|
setShow(value);
|
|
2774
2775
|
}
|
|
2775
2776
|
};
|
|
2777
|
+
require$$0.useEffect(() => {
|
|
2778
|
+
if (show === wasShowing.current) {
|
|
2779
|
+
return;
|
|
2780
|
+
}
|
|
2781
|
+
wasShowing.current = show;
|
|
2782
|
+
if (show) {
|
|
2783
|
+
afterShow === null || afterShow === void 0 ? void 0 : afterShow();
|
|
2784
|
+
}
|
|
2785
|
+
else {
|
|
2786
|
+
afterHide === null || afterHide === void 0 ? void 0 : afterHide();
|
|
2787
|
+
}
|
|
2788
|
+
}, [show]);
|
|
2776
2789
|
const handleShowTooltipDelayed = () => {
|
|
2777
2790
|
if (tooltipShowDelayTimerRef.current) {
|
|
2778
2791
|
clearTimeout(tooltipShowDelayTimerRef.current);
|
|
@@ -2881,7 +2894,7 @@ isHtmlContent = false, content, isOpen, setIsOpen, }) => {
|
|
|
2881
2894
|
if ((_a = activeAnchor.current) === null || _a === void 0 ? void 0 : _a.contains(event.target)) {
|
|
2882
2895
|
return;
|
|
2883
2896
|
}
|
|
2884
|
-
|
|
2897
|
+
handleShow(false);
|
|
2885
2898
|
};
|
|
2886
2899
|
// debounce handler to prevent call twice when
|
|
2887
2900
|
// mouse enter and focus events being triggered toggether
|
|
@@ -2994,7 +3007,18 @@ isHtmlContent = false, content, isOpen, setIsOpen, }) => {
|
|
|
2994
3007
|
return () => {
|
|
2995
3008
|
mounted = false;
|
|
2996
3009
|
};
|
|
2997
|
-
}, [
|
|
3010
|
+
}, [
|
|
3011
|
+
show,
|
|
3012
|
+
isOpen,
|
|
3013
|
+
anchorId,
|
|
3014
|
+
activeAnchor,
|
|
3015
|
+
content,
|
|
3016
|
+
html,
|
|
3017
|
+
place,
|
|
3018
|
+
offset,
|
|
3019
|
+
positionStrategy,
|
|
3020
|
+
position,
|
|
3021
|
+
]);
|
|
2998
3022
|
require$$0.useEffect(() => {
|
|
2999
3023
|
return () => {
|
|
3000
3024
|
if (tooltipShowDelayTimerRef.current) {
|
|
@@ -3005,18 +3029,19 @@ isHtmlContent = false, content, isOpen, setIsOpen, }) => {
|
|
|
3005
3029
|
}
|
|
3006
3030
|
};
|
|
3007
3031
|
}, []);
|
|
3008
|
-
const hasContentOrChildren = Boolean(content || children);
|
|
3032
|
+
const hasContentOrChildren = Boolean(html || content || children);
|
|
3009
3033
|
return (jsxRuntime.exports.jsxs(WrapperElement, { id: id, role: "tooltip", className: classNames('react-tooltip', styles['tooltip'], styles[variant], className, {
|
|
3010
3034
|
[styles['show']]: hasContentOrChildren && !calculatingPosition && (isOpen || show),
|
|
3011
3035
|
[styles['fixed']]: positionStrategy === 'fixed',
|
|
3012
3036
|
[styles['clickable']]: clickable,
|
|
3013
|
-
}), style: { ...externalStyles, ...inlineStyles }, ref: tooltipRef, children: [children || (
|
|
3037
|
+
}), style: { ...externalStyles, ...inlineStyles }, ref: tooltipRef, children: [children || (html && jsxRuntime.exports.jsx(TooltipContent, { content: html })) || content, jsxRuntime.exports.jsx("div", { className: classNames('react-tooltip-arrow', styles['arrow'], classNameArrow, {
|
|
3014
3038
|
[styles['no-arrow']]: noArrow,
|
|
3015
3039
|
}), style: inlineArrowStyles, ref: tooltipArrowRef })] }));
|
|
3016
3040
|
};
|
|
3017
3041
|
|
|
3018
|
-
const TooltipController = ({ id, anchorId, content, html, className, classNameArrow, variant = 'dark', place = 'top', offset = 10, wrapper = 'div', children = null, events = ['hover'], positionStrategy = 'absolute', delayShow = 0, delayHide = 0, float = false, noArrow = false, clickable = false, style, position, isOpen, setIsOpen, }) => {
|
|
3019
|
-
const [tooltipContent, setTooltipContent] = require$$0.useState(content
|
|
3042
|
+
const TooltipController = ({ id, anchorId, content, html, className, classNameArrow, variant = 'dark', place = 'top', offset = 10, wrapper = 'div', children = null, events = ['hover'], positionStrategy = 'absolute', delayShow = 0, delayHide = 0, float = false, noArrow = false, clickable = false, style, position, isOpen, setIsOpen, afterShow, afterHide, }) => {
|
|
3043
|
+
const [tooltipContent, setTooltipContent] = require$$0.useState(content);
|
|
3044
|
+
const [tooltipHtml, setTooltipHtml] = require$$0.useState(html);
|
|
3020
3045
|
const [tooltipPlace, setTooltipPlace] = require$$0.useState(place);
|
|
3021
3046
|
const [tooltipVariant, setTooltipVariant] = require$$0.useState(variant);
|
|
3022
3047
|
const [tooltipOffset, setTooltipOffset] = require$$0.useState(offset);
|
|
@@ -3026,7 +3051,6 @@ const TooltipController = ({ id, anchorId, content, html, className, classNameAr
|
|
|
3026
3051
|
const [tooltipWrapper, setTooltipWrapper] = require$$0.useState(wrapper);
|
|
3027
3052
|
const [tooltipEvents, setTooltipEvents] = require$$0.useState(events);
|
|
3028
3053
|
const [tooltipPositionStrategy, setTooltipPositionStrategy] = require$$0.useState(positionStrategy);
|
|
3029
|
-
const [isHtmlContent, setIsHtmlContent] = require$$0.useState(Boolean(html));
|
|
3030
3054
|
const { anchorRefs, activeAnchor } = useTooltip()(id);
|
|
3031
3055
|
const getDataAttributesFromAnchorElement = (elementReference) => {
|
|
3032
3056
|
const dataAttributes = elementReference === null || elementReference === void 0 ? void 0 : elementReference.getAttributeNames().reduce((acc, name) => {
|
|
@@ -3049,9 +3073,7 @@ const TooltipController = ({ id, anchorId, content, html, className, classNameAr
|
|
|
3049
3073
|
setTooltipContent(value !== null && value !== void 0 ? value : content);
|
|
3050
3074
|
},
|
|
3051
3075
|
html: (value) => {
|
|
3052
|
-
|
|
3053
|
-
setIsHtmlContent(Boolean(value !== null && value !== void 0 ? value : html));
|
|
3054
|
-
setTooltipContent((_a = value !== null && value !== void 0 ? value : html) !== null && _a !== void 0 ? _a : content);
|
|
3076
|
+
setTooltipHtml(value !== null && value !== void 0 ? value : html);
|
|
3055
3077
|
},
|
|
3056
3078
|
variant: (value) => {
|
|
3057
3079
|
var _a;
|
|
@@ -3091,14 +3113,11 @@ const TooltipController = ({ id, anchorId, content, html, className, classNameAr
|
|
|
3091
3113
|
});
|
|
3092
3114
|
};
|
|
3093
3115
|
require$$0.useEffect(() => {
|
|
3094
|
-
setIsHtmlContent(false);
|
|
3095
3116
|
setTooltipContent(content);
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
}
|
|
3101
|
-
}, [content, html]);
|
|
3117
|
+
}, [content]);
|
|
3118
|
+
require$$0.useEffect(() => {
|
|
3119
|
+
setTooltipHtml(html);
|
|
3120
|
+
}, [html]);
|
|
3102
3121
|
require$$0.useEffect(() => {
|
|
3103
3122
|
var _a;
|
|
3104
3123
|
const elementRefs = new Set(anchorRefs);
|
|
@@ -3109,16 +3128,17 @@ const TooltipController = ({ id, anchorId, content, html, className, classNameAr
|
|
|
3109
3128
|
if (!elementRefs.size) {
|
|
3110
3129
|
return () => null;
|
|
3111
3130
|
}
|
|
3131
|
+
const anchorElement = (_a = activeAnchor.current) !== null && _a !== void 0 ? _a : anchorById;
|
|
3112
3132
|
const observerCallback = (mutationList) => {
|
|
3113
3133
|
mutationList.forEach((mutation) => {
|
|
3114
3134
|
var _a;
|
|
3115
|
-
if (!
|
|
3135
|
+
if (!anchorElement ||
|
|
3116
3136
|
mutation.type !== 'attributes' ||
|
|
3117
3137
|
!((_a = mutation.attributeName) === null || _a === void 0 ? void 0 : _a.startsWith('data-tooltip-'))) {
|
|
3118
3138
|
return;
|
|
3119
3139
|
}
|
|
3120
3140
|
// make sure to get all set attributes, since all unset attributes are reset
|
|
3121
|
-
const dataAttributes = getDataAttributesFromAnchorElement(
|
|
3141
|
+
const dataAttributes = getDataAttributesFromAnchorElement(anchorElement);
|
|
3122
3142
|
applyAllDataAttributesFromAnchorElement(dataAttributes);
|
|
3123
3143
|
});
|
|
3124
3144
|
};
|
|
@@ -3127,12 +3147,11 @@ const TooltipController = ({ id, anchorId, content, html, className, classNameAr
|
|
|
3127
3147
|
// do not check for subtree and childrens, we only want to know attribute changes
|
|
3128
3148
|
// to stay watching `data-attributes-*` from anchor element
|
|
3129
3149
|
const observerConfig = { attributes: true, childList: false, subtree: false };
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
const dataAttributes = getDataAttributesFromAnchorElement(element);
|
|
3150
|
+
if (anchorElement) {
|
|
3151
|
+
const dataAttributes = getDataAttributesFromAnchorElement(anchorElement);
|
|
3133
3152
|
applyAllDataAttributesFromAnchorElement(dataAttributes);
|
|
3134
3153
|
// Start observing the target node for configured mutations
|
|
3135
|
-
observer.observe(
|
|
3154
|
+
observer.observe(anchorElement, observerConfig);
|
|
3136
3155
|
}
|
|
3137
3156
|
return () => {
|
|
3138
3157
|
// Remove the observer when the tooltip is destroyed
|
|
@@ -3145,7 +3164,7 @@ const TooltipController = ({ id, anchorId, content, html, className, classNameAr
|
|
|
3145
3164
|
className,
|
|
3146
3165
|
classNameArrow,
|
|
3147
3166
|
content: tooltipContent,
|
|
3148
|
-
|
|
3167
|
+
html: tooltipHtml,
|
|
3149
3168
|
place: tooltipPlace,
|
|
3150
3169
|
variant: tooltipVariant,
|
|
3151
3170
|
offset: tooltipOffset,
|
|
@@ -3161,6 +3180,8 @@ const TooltipController = ({ id, anchorId, content, html, className, classNameAr
|
|
|
3161
3180
|
position,
|
|
3162
3181
|
isOpen,
|
|
3163
3182
|
setIsOpen,
|
|
3183
|
+
afterShow,
|
|
3184
|
+
afterHide,
|
|
3164
3185
|
};
|
|
3165
3186
|
return children ? jsxRuntime.exports.jsx(Tooltip, { ...props, children: children }) : jsxRuntime.exports.jsx(Tooltip, { ...props });
|
|
3166
3187
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
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={};!function(){var e=n.default,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),h=Symbol.iterator;var v=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function g(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];w("error",e,n)}function w(e,t,n){var r=v.ReactDebugCurrentFrame.getStackAddendum();""!==r&&(t+="%s",n=n.concat([r]));var o=n.map((function(e){return String(e)}));o.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,o)}var b;function x(e){return e.displayName||"Context"}function S(e){if(null==e)return null;if("number"==typeof e.tag&&g("Received an unexpected object in getComponentNameFromType(). 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 i:return"Fragment";case r:return"Portal";case a:return"Profiler";case l:return"StrictMode";case f:return"Suspense";case p:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case c:return x(e)+".Consumer";case s:return x(e._context)+".Provider";case u:return function(e,t,n){var r=e.displayName;if(r)return r;var o=t.displayName||t.name||"";return""!==o?n+"("+o+")":n}(e,e.render,"ForwardRef");case d:var t=e.displayName||null;return null!==t?t:S(e.type)||"Memo";case y:var n=e,o=n._payload,m=n._init;try{return S(m(o))}catch(e){return null}}return null}b=Symbol.for("react.module.reference");var _,R,k,T,j,E,O,A=Object.assign,P=0;function L(){}L.__reactDisabledLog=!0;var N,C=v.ReactCurrentDispatcher;function $(e,t,n){if(void 0===N)try{throw Error()}catch(e){var r=e.stack.trim().match(/\n( *(at )?)/);N=r&&r[1]||""}return"\n"+N+e}var D,W=!1,F="function"==typeof WeakMap?WeakMap:Map;function I(e,t){if(!e||W)return"";var n,r=D.get(e);if(void 0!==r)return r;W=!0;var o,i=Error.prepareStackTrace;Error.prepareStackTrace=void 0,o=C.current,C.current=null,function(){if(0===P){_=console.log,R=console.info,k=console.warn,T=console.error,j=console.group,E=console.groupCollapsed,O=console.groupEnd;var e={configurable:!0,enumerable:!0,value:L,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}P++}();try{if(t){var l=function(){throw Error()};if(Object.defineProperty(l.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(l,[])}catch(e){n=e}Reflect.construct(e,[],l)}else{try{l.call()}catch(e){n=e}e.call(l.prototype)}}else{try{throw Error()}catch(e){n=e}e()}}catch(t){if(t&&n&&"string"==typeof t.stack){for(var a=t.stack.split("\n"),s=n.stack.split("\n"),c=a.length-1,u=s.length-1;c>=1&&u>=0&&a[c]!==s[u];)u--;for(;c>=1&&u>=0;c--,u--)if(a[c]!==s[u]){if(1!==c||1!==u)do{if(c--,--u<0||a[c]!==s[u]){var f="\n"+a[c].replace(" at new "," at ");return e.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",e.displayName)),"function"==typeof e&&D.set(e,f),f}}while(c>=1&&u>=0);break}}}finally{W=!1,C.current=o,function(){if(0==--P){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:A({},e,{value:_}),info:A({},e,{value:R}),warn:A({},e,{value:k}),error:A({},e,{value:T}),group:A({},e,{value:j}),groupCollapsed:A({},e,{value:E}),groupEnd:A({},e,{value:O})})}P<0&&g("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=i}var p=e?e.displayName||e.name:"",d=p?$(p):"";return"function"==typeof e&&D.set(e,d),d}function H(e,t,n){if(null==e)return"";if("function"==typeof e)return I(e,!(!(r=e.prototype)||!r.isReactComponent));var r;if("string"==typeof e)return $(e);switch(e){case f:return $("Suspense");case p:return $("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case u:return I(e.render,!1);case d:return H(e.type,t,n);case y:var o=e,i=o._payload,l=o._init;try{return H(l(i),t,n)}catch(e){}}return""}D=new F;var B=Object.prototype.hasOwnProperty,M={},U=v.ReactDebugCurrentFrame;function V(e){if(e){var t=e._owner,n=H(e.type,e._source,t?t.type:null);U.setExtraStackFrame(n)}else U.setExtraStackFrame(null)}var z=Array.isArray;function Y(e){return z(e)}function q(e){return""+e}function X(e){if(function(e){try{return q(e),!1}catch(e){return!0}}(e))return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",function(e){return"function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}(e)),q(e)}var K,J,Z,G=v.ReactCurrentOwner,Q={key:!0,ref:!0,__self:!0,__source:!0};Z={};function ee(e,n,r,o,i){var l,a={},s=null,c=null;for(l in void 0!==r&&(X(r),s=""+r),function(e){if(B.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(n)&&(X(n.key),s=""+n.key),function(e){if(B.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}(n)&&(c=n.ref,function(e,t){if("string"==typeof e.ref&&G.current&&t&&G.current.stateNode!==t){var n=S(G.current.type);Z[n]||(g('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',S(G.current.type),e.ref),Z[n]=!0)}}(n,i)),n)B.call(n,l)&&!Q.hasOwnProperty(l)&&(a[l]=n[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,g("%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,g("%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,n,r,o,i,l,a){var s={$$typeof:t,type:e,key:n,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,G.current,a)}var te,ne=v.ReactCurrentOwner,re=v.ReactDebugCurrentFrame;function oe(e){if(e){var t=e._owner,n=H(e.type,e._source,t?t.type:null);re.setExtraStackFrame(n)}else re.setExtraStackFrame(null)}function ie(e){return"object"==typeof e&&null!==e&&e.$$typeof===t}function le(){if(ne.current){var e=S(ne.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}te=!1;var ae={};function se(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var t=le();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(!ae[n]){ae[n]=!0;var r="";e&&e._owner&&e._owner!==ne.current&&(r=" It was passed a child from "+S(e._owner.type)+"."),oe(e),g('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),oe(null)}}}function ce(e,t){if("object"==typeof e)if(Y(e))for(var n=0;n<e.length;n++){var r=e[n];ie(r)&&se(r,t)}else if(ie(e))e._store&&(e._store.validated=!0);else if(e){var o=function(e){if(null===e||"object"!=typeof e)return null;var t=h&&e[h]||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;)ie(i.value)&&se(i.value,t)}}function ue(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!==u&&n.$$typeof!==d)return;t=n.propTypes}if(t){var r=S(n);!function(e,t,n,r,o){var i=Function.call.bind(B);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||(V(o),g("%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),V(null)),a instanceof Error&&!(a.message in M)&&(M[a.message]=!0,V(o),g("Failed %s type: %s",n,a.message),V(null))}}(t,e.props,"prop",r,e)}else if(void 0!==n.PropTypes&&!te){te=!0,g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",S(n)||"Unknown")}"function"!=typeof n.getDefaultProps||n.getDefaultProps.isReactClassApproved||g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function fe(e,n,r,o,h,v){var w=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===a||e===l||e===f||e===p||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===d||e.$$typeof===s||e.$$typeof===c||e.$$typeof===u||e.$$typeof===b||void 0!==e.getModuleId)}(e);if(!w){var x="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(x+=" 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 _,R=function(e){return void 0!==e?"\n\nCheck your code at "+e.fileName.replace(/^.*[\\\/]/,"")+":"+e.lineNumber+".":""}(h);x+=R||le(),null===e?_="null":Y(e)?_="array":void 0!==e&&e.$$typeof===t?(_="<"+(S(e.type)||"Unknown")+" />",x=" Did you accidentally export a JSX literal instead of a component?"):_=typeof e,g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",_,x)}var k=ee(e,n,r,h,v);if(null==k)return k;if(w){var T=n.children;if(void 0!==T)if(o)if(Y(T)){for(var j=0;j<T.length;j++)ce(T[j],e);Object.freeze&&Object.freeze(T)}else g("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 ce(T,e)}return e===i?function(e){for(var t=Object.keys(e.props),n=0;n<t.length;n++){var r=t[n];if("children"!==r&&"key"!==r){oe(e),g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",r),oe(null);break}}null!==e.ref&&(oe(e),g("Invalid attribute `ref` supplied to `React.Fragment`."),oe(null))}(k):ue(k),k}var pe=function(e,t,n){return fe(e,t,n,!1)},de=function(e,t,n){return fe(e,t,n,!0)};o.Fragment=i,o.jsx=pe,o.jsxs=de}(),r.exports=o;var i,l={exports:{}};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=t(e),n={exports:{}},o={};!function(){var e=r.default,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),h=Symbol.iterator;var v=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function g(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];w("error",e,r)}function w(e,t,r){var n=v.ReactDebugCurrentFrame.getStackAddendum();""!==n&&(t+="%s",r=r.concat([n]));var o=r.map((function(e){return String(e)}));o.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,o)}var b;function x(e){return e.displayName||"Context"}function S(e){if(null==e)return null;if("number"==typeof e.tag&&g("Received an unexpected object in getComponentNameFromType(). 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 i:return"Fragment";case n:return"Portal";case a:return"Profiler";case l:return"StrictMode";case f:return"Suspense";case p:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case c:return x(e)+".Consumer";case s:return x(e._context)+".Provider";case u:return function(e,t,r){var n=e.displayName;if(n)return n;var o=t.displayName||t.name||"";return""!==o?r+"("+o+")":r}(e,e.render,"ForwardRef");case d:var t=e.displayName||null;return null!==t?t:S(e.type)||"Memo";case y:var r=e,o=r._payload,m=r._init;try{return S(m(o))}catch(e){return null}}return null}b=Symbol.for("react.module.reference");var R,_,k,T,E,j,O,A=Object.assign,P=0;function L(){}L.__reactDisabledLog=!0;var N,C=v.ReactCurrentDispatcher;function $(e,t,r){if(void 0===N)try{throw Error()}catch(e){var n=e.stack.trim().match(/\n( *(at )?)/);N=n&&n[1]||""}return"\n"+N+e}var D,W=!1,F="function"==typeof WeakMap?WeakMap:Map;function I(e,t){if(!e||W)return"";var r,n=D.get(e);if(void 0!==n)return n;W=!0;var o,i=Error.prepareStackTrace;Error.prepareStackTrace=void 0,o=C.current,C.current=null,function(){if(0===P){R=console.log,_=console.info,k=console.warn,T=console.error,E=console.group,j=console.groupCollapsed,O=console.groupEnd;var e={configurable:!0,enumerable:!0,value:L,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}P++}();try{if(t){var l=function(){throw Error()};if(Object.defineProperty(l.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(l,[])}catch(e){r=e}Reflect.construct(e,[],l)}else{try{l.call()}catch(e){r=e}e.call(l.prototype)}}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var a=t.stack.split("\n"),s=r.stack.split("\n"),c=a.length-1,u=s.length-1;c>=1&&u>=0&&a[c]!==s[u];)u--;for(;c>=1&&u>=0;c--,u--)if(a[c]!==s[u]){if(1!==c||1!==u)do{if(c--,--u<0||a[c]!==s[u]){var f="\n"+a[c].replace(" at new "," at ");return e.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",e.displayName)),"function"==typeof e&&D.set(e,f),f}}while(c>=1&&u>=0);break}}}finally{W=!1,C.current=o,function(){if(0==--P){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:A({},e,{value:R}),info:A({},e,{value:_}),warn:A({},e,{value:k}),error:A({},e,{value:T}),group:A({},e,{value:E}),groupCollapsed:A({},e,{value:j}),groupEnd:A({},e,{value:O})})}P<0&&g("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=i}var p=e?e.displayName||e.name:"",d=p?$(p):"";return"function"==typeof e&&D.set(e,d),d}function H(e,t,r){if(null==e)return"";if("function"==typeof e)return I(e,!(!(n=e.prototype)||!n.isReactComponent));var n;if("string"==typeof e)return $(e);switch(e){case f:return $("Suspense");case p:return $("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case u:return I(e.render,!1);case d:return H(e.type,t,r);case y:var o=e,i=o._payload,l=o._init;try{return H(l(i),t,r)}catch(e){}}return""}D=new F;var M=Object.prototype.hasOwnProperty,B={},U=v.ReactDebugCurrentFrame;function V(e){if(e){var t=e._owner,r=H(e.type,e._source,t?t.type:null);U.setExtraStackFrame(r)}else U.setExtraStackFrame(null)}var z=Array.isArray;function Y(e){return z(e)}function q(e){return""+e}function X(e){if(function(e){try{return q(e),!1}catch(e){return!0}}(e))return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",function(e){return"function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}(e)),q(e)}var K,J,Z,G=v.ReactCurrentOwner,Q={key:!0,ref:!0,__self:!0,__source:!0};Z={};function ee(e,r,n,o,i){var l,a={},s=null,c=null;for(l in void 0!==n&&(X(n),s=""+n),function(e){if(M.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(r)&&(X(r.key),s=""+r.key),function(e){if(M.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}(r)&&(c=r.ref,function(e,t){if("string"==typeof e.ref&&G.current&&t&&G.current.stateNode!==t){var r=S(G.current.type);Z[r]||(g('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',S(G.current.type),e.ref),Z[r]=!0)}}(r,i)),r)M.call(r,l)&&!Q.hasOwnProperty(l)&&(a[l]=r[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 r=function(){K||(K=!0,g("%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))};r.isReactWarning=!0,Object.defineProperty(e,"key",{get:r,configurable:!0})}(a,f),c&&function(e,t){var r=function(){J||(J=!0,g("%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))};r.isReactWarning=!0,Object.defineProperty(e,"ref",{get:r,configurable:!0})}(a,f)}return function(e,r,n,o,i,l,a){var s={$$typeof:t,type:e,key:r,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,G.current,a)}var te,re=v.ReactCurrentOwner,ne=v.ReactDebugCurrentFrame;function oe(e){if(e){var t=e._owner,r=H(e.type,e._source,t?t.type:null);ne.setExtraStackFrame(r)}else ne.setExtraStackFrame(null)}function ie(e){return"object"==typeof e&&null!==e&&e.$$typeof===t}function le(){if(re.current){var e=S(re.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}te=!1;var ae={};function se(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var r=function(e){var t=le();if(!t){var r="string"==typeof e?e:e.displayName||e.name;r&&(t="\n\nCheck the top-level render call using <"+r+">.")}return t}(t);if(!ae[r]){ae[r]=!0;var n="";e&&e._owner&&e._owner!==re.current&&(n=" It was passed a child from "+S(e._owner.type)+"."),oe(e),g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',r,n),oe(null)}}}function ce(e,t){if("object"==typeof e)if(Y(e))for(var r=0;r<e.length;r++){var n=e[r];ie(n)&&se(n,t)}else if(ie(e))e._store&&(e._store.validated=!0);else if(e){var o=function(e){if(null===e||"object"!=typeof e)return null;var t=h&&e[h]||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;)ie(i.value)&&se(i.value,t)}}function ue(e){var t,r=e.type;if(null!=r&&"string"!=typeof r){if("function"==typeof r)t=r.propTypes;else{if("object"!=typeof r||r.$$typeof!==u&&r.$$typeof!==d)return;t=r.propTypes}if(t){var n=S(r);!function(e,t,r,n,o){var i=Function.call.bind(M);for(var l in e)if(i(e,l)){var a=void 0;try{if("function"!=typeof e[l]){var s=Error((n||"React class")+": "+r+" 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,n,r,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){a=e}!a||a instanceof Error||(V(o),g("%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).",n||"React class",r,l,typeof a),V(null)),a instanceof Error&&!(a.message in B)&&(B[a.message]=!0,V(o),g("Failed %s type: %s",r,a.message),V(null))}}(t,e.props,"prop",n,e)}else if(void 0!==r.PropTypes&&!te){te=!0,g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",S(r)||"Unknown")}"function"!=typeof r.getDefaultProps||r.getDefaultProps.isReactClassApproved||g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function fe(e,r,n,o,h,v){var w=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===a||e===l||e===f||e===p||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===d||e.$$typeof===s||e.$$typeof===c||e.$$typeof===u||e.$$typeof===b||void 0!==e.getModuleId)}(e);if(!w){var x="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(x+=" 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 R,_=function(e){return void 0!==e?"\n\nCheck your code at "+e.fileName.replace(/^.*[\\\/]/,"")+":"+e.lineNumber+".":""}(h);x+=_||le(),null===e?R="null":Y(e)?R="array":void 0!==e&&e.$$typeof===t?(R="<"+(S(e.type)||"Unknown")+" />",x=" Did you accidentally export a JSX literal instead of a component?"):R=typeof e,g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",R,x)}var k=ee(e,r,n,h,v);if(null==k)return k;if(w){var T=r.children;if(void 0!==T)if(o)if(Y(T)){for(var E=0;E<T.length;E++)ce(T[E],e);Object.freeze&&Object.freeze(T)}else g("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 ce(T,e)}return e===i?function(e){for(var t=Object.keys(e.props),r=0;r<t.length;r++){var n=t[r];if("children"!==n&&"key"!==n){oe(e),g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),oe(null);break}}null!==e.ref&&(oe(e),g("Invalid attribute `ref` supplied to `React.Fragment`."),oe(null))}(k):ue(k),k}var pe=function(e,t,r){return fe(e,t,r,!1)},de=function(e,t,r){return fe(e,t,r,!0)};o.Fragment=i,o.jsx=pe,o.jsxs=de}(),n.exports=o;var i,l={exports:{}};
|
|
2
2
|
/*!
|
|
3
3
|
Copyright (c) 2018 Jed Watson.
|
|
4
4
|
Licensed under the MIT License (MIT), see
|
|
5
5
|
http://jedwatson.github.io/classnames
|
|
6
|
-
*/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=({content:e})=>r.exports.jsx("span",{dangerouslySetInnerHTML:{__html:e}}),u={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},f=Object.assign((()=>u),u),p=e.createContext(f);function d(){return e.useContext(p)}function y(e){return e.split("-")[0]}function m(e){return e.split("-")[1]}function h(e){return["top","bottom"].includes(y(e))?"x":"y"}function v(e){return"y"===e?"height":"width"}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=h(t),s=v(a),c=r[s]/2-o[s]/2,u="x"===a;let f;switch(y(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 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=b(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:h.top-v.top+y.top,bottom:v.bottom-h.bottom+y.bottom,left:h.left-v.left+y.left,right:v.right-h.right+y.right}}const S=Math.min,_=Math.max;function R(e,t,n){return _(e,S(t,n))}const k={left:"right",right:"left",bottom:"top",top:"bottom"};function T(e){return e.replace(/left|right|bottom|top/g,(e=>k[e]))}const j={start:"end",end:"start"};function E(e){return e.replace(/start|end/g,(e=>j[e]))}const O=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,...g}=e,w=y(r),b=f||(w===l||!d?[T(l)]:function(e){const t=T(e);return[E(e),t,E(t)]}(l)),S=[l,...b],_=await x(t,g),R=[];let k=(null==(n=o.flip)?void 0:n.overflows)||[];if(c&&R.push(_[w]),u){const{main:e,cross:t}=function(e,t,n){void 0===n&&(n=!1);const r=m(e),o=h(e),i=v(o);let l="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=T(l)),{main:l,cross:T(l)}}(r,i,await(null==a.isRTL?void 0:a.isRTL(s.floating)));R.push(_[e],_[t])}if(k=[...k,{placement:r,overflows:R}],!R.every((e=>e<=0))){var j,O;const e=(null!=(j=null==(O=o.flip)?void 0:O.index)?j:0)+1,t=S[e];if(t)return{data:{index:e,overflows:k},reset:{placement:t}};let n="bottom";switch(p){case"bestFit":{var A;const e=null==(A=k.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:A[0].placement;e&&(n=e);break}case"initialPlacement":n=l}if(r!==n)return{reset:{placement:n}}}return{}}}};const A=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=y(n),a=m(n),s="x"===h(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:v}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&"number"==typeof v&&(d="end"===a?-1*v:v),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 P(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function L(e){if(null==e)return window;if(!P(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function N(e){return L(e).getComputedStyle(e)}function C(e){return P(e)?"":e?(e.nodeName||"").toLowerCase():""}function $(){const e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((e=>e.brand+"/"+e.version)).join(" "):navigator.userAgent}function D(e){return e instanceof L(e).HTMLElement}function W(e){return e instanceof L(e).Element}function F(e){if("undefined"==typeof ShadowRoot)return!1;return e instanceof L(e).ShadowRoot||e instanceof ShadowRoot}function I(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=N(e);return/auto|scroll|overlay|hidden/.test(t+r+n)&&!["inline","contents"].includes(o)}function H(e){return["table","td","th"].includes(C(e))}function B(e){const t=/firefox/i.test($()),n=N(e),r=n.backdropFilter||n.WebkitBackdropFilter;return"none"!==n.transform||"none"!==n.perspective||!!r&&"none"!==r||t&&"filter"===n.willChange||t&&!!n.filter&&"none"!==n.filter||["transform","perspective"].some((e=>n.willChange.includes(e)))||["paint","layout","strict","content"].some((e=>{const t=n.contain;return null!=t&&t.includes(e)}))}function M(){return!/^((?!chrome|android).)*safari/i.test($())}function U(e){return["html","body","#document"].includes(C(e))}const V=Math.min,z=Math.max,Y=Math.round;function q(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&&D(e)&&(s=e.offsetWidth>0&&Y(a.width)/e.offsetWidth||1,c=e.offsetHeight>0&&Y(a.height)/e.offsetHeight||1);const u=W(e)?L(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,m=a.height/c;return{width:y,height:m,top:d,right:p+y,bottom:d+m,left:p,x:p,y:d}}function X(e){return(t=e,(t instanceof L(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function K(e){return W(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function J(e){return q(X(e)).left+K(e).scrollLeft}function Z(e,t,n){const r=D(t),o=X(t),i=q(e,r&&function(e){const t=q(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"!==C(t)||I(o))&&(l=K(t)),D(t)){const e=q(t,!0);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&(a.x=J(o));return{x:i.left+l.scrollLeft-a.x,y:i.top+l.scrollTop-a.y,width:i.width,height:i.height}}function G(e){if("html"===C(e))return e;const t=e.assignedSlot||e.parentNode||(F(e)?e.host:null)||X(e);return F(t)?t.host:t}function Q(e){return D(e)&&"fixed"!==N(e).position?e.offsetParent:null}function ee(e){const t=L(e);let n=Q(e);for(;n&&H(n)&&"static"===N(n).position;)n=Q(n);return n&&("html"===C(n)||"body"===C(n)&&"static"===N(n).position&&!B(n))?t:n||function(e){let t=G(e);for(;D(t)&&!U(t);){if(B(t))return t;t=G(t)}return null}(e)||t}function te(e){if(D(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=q(e);return{width:t.width,height:t.height}}function ne(e){const t=G(e);return U(t)?e.ownerDocument.body:D(t)&&I(t)?t:ne(t)}function re(e,t){var n;void 0===t&&(t=[]);const r=ne(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=L(r),l=o?[i].concat(i.visualViewport||[],I(r)?r:[]):r,a=t.concat(l);return o?a:a.concat(re(l))}function oe(e,t,n){return"viewport"===t?b(function(e,t){const n=L(e),r=X(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)):W(t)?function(e,t){const n=q(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):b(function(e){var t;const n=X(e),r=K(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+J(e);const s=-r.scrollTop;return"rtl"===N(o||n).direction&&(a+=z(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:l,x:a,y:s}}(X(e)))}const ie={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?function(e){let t=re(e).filter((e=>W(e)&&"body"!==C(e))),n=e,r=null;for(;W(n)&&!U(n);){const e=N(n);"static"===e.position&&r&&["absolute","fixed"].includes(r.position)&&!B(n)?t=t.filter((e=>e!==n)):r=e,n=G(n)}return t}(t):[].concat(n),l=[...i,r],a=l[0],s=l.reduce(((e,n)=>{const r=oe(t,n,o);return e.top=z(r.top,e.top),e.right=V(r.right,e.right),e.bottom=V(r.bottom,e.bottom),e.left=z(r.left,e.left),e}),oe(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=D(n),i=X(n);if(n===i)return t;let l={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==C(n)||I(i))&&(l=K(n)),D(n))){const e=q(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:W,getDimensions:te,getOffsetParent:ee,getDocumentElement:X,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:Z(t,ee(n),r),floating:{...te(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===N(e).direction},le=(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}=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,{platform:ie,...n}),ae=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=[A(Number(o)),O(),(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 x(e,s),f=h(y(r)),p="x"===f?"y":"x";let d=c[f],m=c[p];if(o){const e="y"===f?"bottom":"right";d=R(d+u["y"===f?"top":"left"],d,d-u[e])}if(i){const e="y"===p?"bottom":"right";m=R(m+u["y"===p?"top":"left"],m,m-u[e])}const v=l.fn({...e,[f]:d,[p]:m});return{...v,data:{x:v.x-t,y:v.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=w(r),u={x:o,y:i},f=h(l),p=m(l),d=v(f),y=await s.getDimensions(n),g="y"===f?"top":"left",b="y"===f?"bottom":"right",x=a.reference[d]+a.reference[f]-u[f]-a.floating[d],S=u[f]-a.reference[f],_=await(null==s.getOffsetParent?void 0:s.getOffsetParent(n));let k=_?"y"===f?_.clientHeight||0:_.clientWidth||0:0;0===k&&(k=a.floating[d]);const T=x/2-S/2,j=c[g],E=k-y[d]-c[b],O=k/2-y[d]/2+T,A=R(j,O,E),P=("start"===p?c[g]:c[b])>0&&O!==A&&a.reference[d]<=a.floating[d];return{[f]:u[f]-(P?O<j?j-O:E-O:0),data:{[f]:A,centerOffset:O-A}}}}))({element:n,padding:5})),le(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"}}}))):le(e,t,{placement:"bottom",strategy:i,middleware:l}).then((({x:e,y:t})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{}})))};var se={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 ce=({id:t,className:n,classNameArrow:o,variant:i="dark",anchorId:l,place:u="top",offset:f=10,events:p=["hover"],positionStrategy:y="absolute",wrapper:m="div",children:h=null,delayShow:v=0,delayHide:g=0,float:w=!1,noArrow:b=!1,clickable:x=!1,style:S,position:_,isHtmlContent:R=!1,content:k,isOpen:T,setIsOpen:j})=>{const E=e.useRef(null),O=e.useRef(null),A=e.useRef(null),P=e.useRef(null),[L,N]=e.useState({}),[C,$]=e.useState({}),[D,W]=e.useState(!1),[F,I]=e.useState(!1),H=e.useRef(null),{anchorRefs:B,setActiveAnchor:M}=d()(t),[U,V]=e.useState({current:null}),z=e.useRef(!1),Y=e=>{j?j(e):void 0===T&&W(e)},q=(e=g)=>{P.current&&clearTimeout(P.current),P.current=setTimeout((()=>{z.current||Y(!1)}),e)},X=e=>{var t;if(!e)return;v?(A.current&&clearTimeout(A.current),A.current=setTimeout((()=>{Y(!0)}),v)):Y(!0);const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;V((e=>e.current===n?e:{current:n})),M({current:n}),P.current&&clearTimeout(P.current)},K=()=>{x?q(g||50):g?q():Y(!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})};I(!0),ae({place:u,offset:f,elementReference:n,tooltipReference:E.current,tooltipArrowReference:O.current,strategy:y}).then((e=>{I(!1),Object.keys(e.tooltipStyles).length&&N(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&$(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),g&&q()},Q=e=>{var t;(null===(t=U.current)||void 0===t?void 0:t.contains(e.target))||W(!1)},ee=s(X,50),te=s(K,50);e.useEffect((()=>{var e,t;const n=new Set(B),r=document.querySelector(`[id='${l}']`);if(r&&(V((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",Q),o.push({event:"click",listener:G})),p.find((e=>"hover"===e))&&(o.push({event:"mouseenter",listener:ee},{event:"mouseleave",listener:te},{event:"focus",listener:ee},{event:"blur",listener:te}),w&&o.push({event:"mousemove",listener:Z}));const i=()=>{z.current=!0},a=()=>{z.current=!1,K()};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",Q),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)}))}))}}),[B,U,l,p,g,v]),e.useEffect((()=>{if(_)return J(_),()=>null;if(w)return H.current&&J(H.current),()=>null;let e=U.current;l&&(e=document.querySelector(`[id='${l}']`)),I(!0);let t=!0;return ae({place:u,offset:f,elementReference:e,tooltipReference:E.current,tooltipArrowReference:O.current,strategy:y}).then((e=>{t&&(I(!1),Object.keys(e.tooltipStyles).length&&N(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&$(e.tooltipArrowStyles))})),()=>{t=!1}}),[D,T,l,U,k,u,f,y,_]),e.useEffect((()=>()=>{A.current&&clearTimeout(A.current),P.current&&clearTimeout(P.current)}),[]);const ne=Boolean(k||h);return r.exports.jsxs(m,{id:t,role:"tooltip",className:a("react-tooltip",se.tooltip,se[i],n,{[se.show]:ne&&!F&&(T||D),[se.fixed]:"fixed"===y,[se.clickable]:x}),style:{...S,...L},ref:E,children:[h||(R?r.exports.jsx(c,{content:k}):k),r.exports.jsx("div",{className:a("react-tooltip-arrow",se.arrow,o,{[se["no-arrow"]]:b}),style:C,ref:O})]})};exports.Tooltip=({id:t,anchorId:n,content:o,html:i,className:l,classNameArrow:a,variant:s="dark",place:c="top",offset:u=10,wrapper:f="div",children:p=null,events:y=["hover"],positionStrategy:m="absolute",delayShow:h=0,delayHide:v=0,float:g=!1,noArrow:w=!1,clickable:b=!1,style:x,position:S,isOpen:_,setIsOpen:R})=>{const[k,T]=e.useState(o||i),[j,E]=e.useState(c),[O,A]=e.useState(s),[P,L]=e.useState(u),[N,C]=e.useState(h),[$,D]=e.useState(v),[W,F]=e.useState(g),[I,H]=e.useState(f),[B,M]=e.useState(y),[U,V]=e.useState(m),[z,Y]=e.useState(Boolean(i)),{anchorRefs:q,activeAnchor:X}=d()(t),K=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}),{}),J=e=>{const t={place:e=>{var t;E(null!==(t=e)&&void 0!==t?t:c)},content:e=>{T(null!=e?e:o)},html:e=>{var t;Y(Boolean(null!=e?e:i)),T(null!==(t=null!=e?e:i)&&void 0!==t?t:o)},variant:e=>{var t;A(null!==(t=e)&&void 0!==t?t:s)},offset:e=>{L(null===e?u:Number(e))},wrapper:e=>{var t;H(null!==(t=e)&&void 0!==t?t:"div")},events:e=>{const t=null==e?void 0:e.split(" ");M(null!=t?t:y)},"position-strategy":e=>{var t;V(null!==(t=e)&&void 0!==t?t:m)},"delay-show":e=>{C(null===e?h:Number(e))},"delay-hide":e=>{D(null===e?v:Number(e))},float:e=>{F(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)}))};e.useEffect((()=>{Y(!1),T(o),i&&(Y(!0),T(i))}),[o,i]),e.useEffect((()=>{var e;const t=new Set(q),r=document.querySelector(`[id='${n}']`);if(r&&t.add({current:r}),!t.size)return()=>null;const o=new MutationObserver((e=>{e.forEach((e=>{var t;if(!X.current||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=K(X.current);J(n)}))})),i={attributes:!0,childList:!1,subtree:!1},l=null!==(e=X.current)&&void 0!==e?e:r;if(l){const e=K(l);J(e),o.observe(l,i)}return()=>{o.disconnect()}}),[q,X,n]);const Z={id:t,anchorId:n,className:l,classNameArrow:a,content:k,isHtmlContent:z,place:j,variant:O,offset:P,wrapper:I,events:B,positionStrategy:U,delayShow:N,delayHide:$,float:W,noArrow:w,clickable:b,style:x,position:S,isOpen:_,setIsOpen:R};return p?r.exports.jsx(ce,{...Z,children:p}):r.exports.jsx(ce,{...Z})},exports.TooltipProvider=({children:t})=>{const n=e.useId(),[o,i]=e.useState({[n]:new Set}),[l,a]=e.useState({[n]:{current:null}}),s=(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)}}))},c=(e,...t)=>{i((n=>{const r=n[e];return r?(t.forEach((e=>r.delete(e))),{...n}):n}))},u=e.useCallback((e=>{var t,r;return{anchorRefs:null!==(t=o[null!=e?e:n])&&void 0!==t?t:new Set,activeAnchor:null!==(r=l[null!=e?e:n])&&void 0!==r?r:{current:null},attach:(...t)=>s(null!=e?e:n,...t),detach:(...t)=>c(null!=e?e:n,...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}}))})(null!=e?e:n,t)}}),[n,o,l,s,c]),f=e.useMemo((()=>{const e=u(n);return Object.assign((e=>u(e)),e)}),[u]);return r.exports.jsx(p.Provider,{value:f,children:t})},exports.TooltipWrapper=({tooltipId:t,children:n,className:o,place:i,content:l,html:s,variant:c,offset:u,wrapper:f,events:p,positionStrategy:y,delayShow:m,delayHide:h})=>{const{attach:v,detach:g}=d()(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":p,"data-tooltip-position-strategy":y,"data-tooltip-delay-show":m,"data-tooltip-delay-hide":h,children:n})};
|
|
6
|
+
*/i=l,function(){var e={}.hasOwnProperty;function t(){for(var r=[],n=0;n<arguments.length;n++){var o=arguments[n];if(o){var i=typeof o;if("string"===i||"number"===i)r.push(o);else if(Array.isArray(o)){if(o.length){var l=t.apply(null,o);l&&r.push(l)}}else if("object"===i){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){r.push(o.toString());continue}for(var a in o)e.call(o,a)&&o[a]&&r.push(a)}}}return r.join(" ")}i.exports?(t.default=t,i.exports=t):window.classNames=t}();var a=l.exports;const s=(e,t,r)=>{let n=null;return function(...o){n&&clearTimeout(n),n=setTimeout((()=>{n=null,r||e.apply(this,o)}),t)}},c=({content:e})=>n.exports.jsx("span",{dangerouslySetInnerHTML:{__html:e}}),u={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},f=Object.assign((()=>u),u),p=e.createContext(f);function d(){return e.useContext(p)}function y(e){return e.split("-")[0]}function m(e){return e.split("-")[1]}function h(e){return["top","bottom"].includes(y(e))?"x":"y"}function v(e){return"y"===e?"height":"width"}function g(e,t,r){let{reference:n,floating:o}=e;const i=n.x+n.width/2-o.width/2,l=n.y+n.height/2-o.height/2,a=h(t),s=v(a),c=n[s]/2-o[s]/2,u="x"===a;let f;switch(y(t)){case"top":f={x:i,y:n.y-o.height};break;case"bottom":f={x:i,y:n.y+n.height};break;case"right":f={x:n.x+n.width,y:l};break;case"left":f={x:n.x-o.width,y:l};break;default:f={x:n.x,y:n.y}}switch(m(t)){case"start":f[a]-=c*(r&&u?-1:1);break;case"end":f[a]+=c*(r&&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 r;void 0===t&&(t={});const{x:n,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==(r=await(null==i.isElement?void 0:i.isElement(m)))||r?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:s})),v=b(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:"floating"===f?{...l.floating,x:n,y:o}:l.reference,offsetParent:await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),strategy:s}):l[f]);return{top:h.top-v.top+y.top,bottom:v.bottom-h.bottom+y.bottom,left:h.left-v.left+y.left,right:v.right-h.right+y.right}}const S=Math.min,R=Math.max;function _(e,t,r){return R(e,S(t,r))}const k={left:"right",right:"left",bottom:"top",top:"bottom"};function T(e){return e.replace(/left|right|bottom|top/g,(e=>k[e]))}const E={start:"end",end:"start"};function j(e){return e.replace(/start|end/g,(e=>E[e]))}const O=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var r;const{placement:n,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,...g}=e,w=y(n),b=f||(w===l||!d?[T(l)]:function(e){const t=T(e);return[j(e),t,j(t)]}(l)),S=[l,...b],R=await x(t,g),_=[];let k=(null==(r=o.flip)?void 0:r.overflows)||[];if(c&&_.push(R[w]),u){const{main:e,cross:t}=function(e,t,r){void 0===r&&(r=!1);const n=m(e),o=h(e),i=v(o);let l="x"===o?n===(r?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=T(l)),{main:l,cross:T(l)}}(n,i,await(null==a.isRTL?void 0:a.isRTL(s.floating)));_.push(R[e],R[t])}if(k=[...k,{placement:n,overflows:_}],!_.every((e=>e<=0))){var E,O;const e=(null!=(E=null==(O=o.flip)?void 0:O.index)?E:0)+1,t=S[e];if(t)return{data:{index:e,overflows:k},reset:{placement:t}};let r="bottom";switch(p){case"bestFit":{var A;const e=null==(A=k.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:A[0].placement;e&&(r=e);break}case"initialPlacement":r=l}if(n!==r)return{reset:{placement:r}}}return{}}}};const A=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:r,y:n}=t,o=await async function(e,t){const{placement:r,platform:n,elements:o}=e,i=await(null==n.isRTL?void 0:n.isRTL(o.floating)),l=y(r),a=m(r),s="x"===h(r),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:v}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&"number"==typeof v&&(d="end"===a?-1*v:v),s?{x:d*u,y:p*c}:{x:p*c,y:d*u}}(t,e);return{x:r+o.x,y:n+o.y,data:o}}}};function P(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function L(e){if(null==e)return window;if(!P(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function N(e){return L(e).getComputedStyle(e)}function C(e){return P(e)?"":e?(e.nodeName||"").toLowerCase():""}function $(){const e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((e=>e.brand+"/"+e.version)).join(" "):navigator.userAgent}function D(e){return e instanceof L(e).HTMLElement}function W(e){return e instanceof L(e).Element}function F(e){if("undefined"==typeof ShadowRoot)return!1;return e instanceof L(e).ShadowRoot||e instanceof ShadowRoot}function I(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=N(e);return/auto|scroll|overlay|hidden/.test(t+n+r)&&!["inline","contents"].includes(o)}function H(e){return["table","td","th"].includes(C(e))}function M(e){const t=/firefox/i.test($()),r=N(e),n=r.backdropFilter||r.WebkitBackdropFilter;return"none"!==r.transform||"none"!==r.perspective||!!n&&"none"!==n||t&&"filter"===r.willChange||t&&!!r.filter&&"none"!==r.filter||["transform","perspective"].some((e=>r.willChange.includes(e)))||["paint","layout","strict","content"].some((e=>{const t=r.contain;return null!=t&&t.includes(e)}))}function B(){return!/^((?!chrome|android).)*safari/i.test($())}function U(e){return["html","body","#document"].includes(C(e))}const V=Math.min,z=Math.max,Y=Math.round;function q(e,t,r){var n,o,i,l;void 0===t&&(t=!1),void 0===r&&(r=!1);const a=e.getBoundingClientRect();let s=1,c=1;t&&D(e)&&(s=e.offsetWidth>0&&Y(a.width)/e.offsetWidth||1,c=e.offsetHeight>0&&Y(a.height)/e.offsetHeight||1);const u=W(e)?L(e):window,f=!B()&&r,p=(a.left+(f&&null!=(n=null==(o=u.visualViewport)?void 0:o.offsetLeft)?n: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 X(e){return(t=e,(t instanceof L(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function K(e){return W(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function J(e){return q(X(e)).left+K(e).scrollLeft}function Z(e,t,r){const n=D(t),o=X(t),i=q(e,n&&function(e){const t=q(e);return Y(t.width)!==e.offsetWidth||Y(t.height)!==e.offsetHeight}(t),"fixed"===r);let l={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if(n||!n&&"fixed"!==r)if(("body"!==C(t)||I(o))&&(l=K(t)),D(t)){const e=q(t,!0);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&(a.x=J(o));return{x:i.left+l.scrollLeft-a.x,y:i.top+l.scrollTop-a.y,width:i.width,height:i.height}}function G(e){if("html"===C(e))return e;const t=e.assignedSlot||e.parentNode||(F(e)?e.host:null)||X(e);return F(t)?t.host:t}function Q(e){return D(e)&&"fixed"!==N(e).position?e.offsetParent:null}function ee(e){const t=L(e);let r=Q(e);for(;r&&H(r)&&"static"===N(r).position;)r=Q(r);return r&&("html"===C(r)||"body"===C(r)&&"static"===N(r).position&&!M(r))?t:r||function(e){let t=G(e);for(;D(t)&&!U(t);){if(M(t))return t;t=G(t)}return null}(e)||t}function te(e){if(D(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=q(e);return{width:t.width,height:t.height}}function re(e){const t=G(e);return U(t)?e.ownerDocument.body:D(t)&&I(t)?t:re(t)}function ne(e,t){var r;void 0===t&&(t=[]);const n=re(e),o=n===(null==(r=e.ownerDocument)?void 0:r.body),i=L(n),l=o?[i].concat(i.visualViewport||[],I(n)?n:[]):n,a=t.concat(l);return o?a:a.concat(ne(l))}function oe(e,t,r){return"viewport"===t?b(function(e,t){const r=L(e),n=X(e),o=r.visualViewport;let i=n.clientWidth,l=n.clientHeight,a=0,s=0;if(o){i=o.width,l=o.height;const e=B();(e||!e&&"fixed"===t)&&(a=o.offsetLeft,s=o.offsetTop)}return{width:i,height:l,x:a,y:s}}(e,r)):W(t)?function(e,t){const r=q(e,!1,"fixed"===t),n=r.top+e.clientTop,o=r.left+e.clientLeft;return{top:n,left:o,x:o,y:n,right:o+e.clientWidth,bottom:n+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}(t,r):b(function(e){var t;const r=X(e),n=K(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=z(r.scrollWidth,r.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),l=z(r.scrollHeight,r.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0);let a=-n.scrollLeft+J(e);const s=-n.scrollTop;return"rtl"===N(o||r).direction&&(a+=z(r.clientWidth,o?o.clientWidth:0)-i),{width:i,height:l,x:a,y:s}}(X(e)))}const ie={getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i="clippingAncestors"===r?function(e){let t=ne(e).filter((e=>W(e)&&"body"!==C(e))),r=e,n=null;for(;W(r)&&!U(r);){const e=N(r);"static"===e.position&&n&&["absolute","fixed"].includes(n.position)&&!M(r)?t=t.filter((e=>e!==r)):n=e,r=G(r)}return t}(t):[].concat(r),l=[...i,n],a=l[0],s=l.reduce(((e,r)=>{const n=oe(t,r,o);return e.top=z(n.top,e.top),e.right=V(n.right,e.right),e.bottom=V(n.bottom,e.bottom),e.left=z(n.left,e.left),e}),oe(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:r,strategy:n}=e;const o=D(r),i=X(r);if(r===i)return t;let l={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if((o||!o&&"fixed"!==n)&&(("body"!==C(r)||I(i))&&(l=K(r)),D(r))){const e=q(r,!0);a.x=e.x+r.clientLeft,a.y=e.y+r.clientTop}return{...t,x:t.x-l.scrollLeft+a.x,y:t.y-l.scrollTop+a.y}},isElement:W,getDimensions:te,getOffsetParent:ee,getDocumentElement:X,getElementRects:e=>{let{reference:t,floating:r,strategy:n}=e;return{reference:Z(t,ee(r),n),floating:{...te(r),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===N(e).direction},le=(e,t,r)=>(async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:l}=r,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,n,s),p=n,d={},y=0;for(let r=0;r<a.length;r++){const{name:i,fn:m}=a[r],{x:h,y:v,data:w,reset:b}=await m({x:u,y:f,initialPlacement:n,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))),r=-1)}return{x:u,y:f,placement:p,strategy:o,middlewareData:d}})(e,t,{platform:ie,...r}),ae=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:r=null,place:n="top",offset:o=10,strategy:i="absolute"})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{}};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{}};const l=[A(Number(o)),O(),(a={padding:5},void 0===a&&(a={}),{name:"shift",options:a,async fn(e){const{x:t,y:r,placement:n}=e,{mainAxis:o=!0,crossAxis:i=!1,limiter:l={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...s}=a,c={x:t,y:r},u=await x(e,s),f=h(y(n)),p="x"===f?"y":"x";let d=c[f],m=c[p];if(o){const e="y"===f?"bottom":"right";d=_(d+u["y"===f?"top":"left"],d,d-u[e])}if(i){const e="y"===p?"bottom":"right";m=_(m+u["y"===p?"top":"left"],m,m-u[e])}const v=l.fn({...e,[f]:d,[p]:m});return{...v,data:{x:v.x-t,y:v.y-r}}}})];var a;return r?(l.push((e=>({name:"arrow",options:e,async fn(t){const{element:r,padding:n=0}=null!=e?e:{},{x:o,y:i,placement:l,rects:a,platform:s}=t;if(null==r)return console.warn("Floating UI: No `element` was passed to the `arrow` middleware."),{};const c=w(n),u={x:o,y:i},f=h(l),p=m(l),d=v(f),y=await s.getDimensions(r),g="y"===f?"top":"left",b="y"===f?"bottom":"right",x=a.reference[d]+a.reference[f]-u[f]-a.floating[d],S=u[f]-a.reference[f],R=await(null==s.getOffsetParent?void 0:s.getOffsetParent(r));let k=R?"y"===f?R.clientHeight||0:R.clientWidth||0:0;0===k&&(k=a.floating[d]);const T=x/2-S/2,E=c[g],j=k-y[d]-c[b],O=k/2-y[d]/2+T,A=_(E,O,j),P=("start"===p?c[g]:c[b])>0&&O!==A&&a.reference[d]<=a.floating[d];return{[f]:u[f]-(P?O<E?E-O:j-O:0),data:{[f]:A,centerOffset:O-A}}}}))({element:r,padding:5})),le(e,t,{placement:n,strategy:i,middleware:l}).then((({x:e,y:t,placement:r,middlewareData:n})=>{var o,i;const l={left:`${e}px`,top:`${t}px`},{x:a,y:s}=null!==(o=n.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"}[r.split("-")[0]])&&void 0!==i?i:"bottom"]:"-4px"}}}))):le(e,t,{placement:"bottom",strategy:i,middleware:l}).then((({x:e,y:t})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{}})))};var se={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 ce=({id:t,className:r,classNameArrow:o,variant:i="dark",anchorId:l,place:u="top",offset:f=10,events:p=["hover"],positionStrategy:y="absolute",wrapper:m="div",children:h=null,delayShow:v=0,delayHide:g=0,float:w=!1,noArrow:b=!1,clickable:x=!1,style:S,position:R,afterShow:_,afterHide:k,content:T,html:E,isOpen:j,setIsOpen:O})=>{const A=e.useRef(null),P=e.useRef(null),L=e.useRef(null),N=e.useRef(null),[C,$]=e.useState({}),[D,W]=e.useState({}),[F,I]=e.useState(!1),H=e.useRef(!1),[M,B]=e.useState(!1),U=e.useRef(null),{anchorRefs:V,setActiveAnchor:z}=d()(t),[Y,q]=e.useState({current:null}),X=e.useRef(!1),K=e=>{O?O(e):void 0===j&&I(e)};e.useEffect((()=>{F!==H.current&&(H.current=F,F?null==_||_():null==k||k())}),[F]);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 r=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;q((e=>e.current===r?e:{current:r})),z({current:r}),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 r={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};B(!0),ae({place:u,offset:f,elementReference:r,tooltipReference:A.current,tooltipArrowReference:P.current,strategy:y}).then((e=>{B(!1),Object.keys(e.tooltipStyles).length&&$(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&W(e.tooltipArrowStyles)}))},ee=e=>{if(!e)return;const t=e,r={x:t.clientX,y:t.clientY};Q(r),U.current=r},te=e=>{Z(e),g&&J()},re=e=>{var t;(null===(t=Y.current)||void 0===t?void 0:t.contains(e.target))||K(!1)},ne=s(Z,50),oe=s(G,50);e.useEffect((()=>{var e,t;const r=new Set(V),n=document.querySelector(`[id='${l}']`);if(n&&(q((e=>e.current===n?e:{current:n})),r.add({current:n})),!r.size)return()=>null;const o=[];p.find((e=>"click"===e))&&(window.addEventListener("click",re),o.push({event:"click",listener:te})),p.find((e=>"hover"===e))&&(o.push({event:"mouseenter",listener:ne},{event:"mouseleave",listener:oe},{event:"focus",listener:ne},{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=A.current)||void 0===e||e.addEventListener("mouseenter",i),null===(t=A.current)||void 0===t||t.addEventListener("mouseleave",a)),o.forEach((({event:e,listener:t})=>{r.forEach((r=>{var n;null===(n=r.current)||void 0===n||n.addEventListener(e,t)}))})),()=>{var e,t;window.removeEventListener("click",re),x&&(null===(e=A.current)||void 0===e||e.removeEventListener("mouseenter",i),null===(t=A.current)||void 0===t||t.removeEventListener("mouseleave",a)),o.forEach((({event:e,listener:t})=>{r.forEach((r=>{var n;null===(n=r.current)||void 0===n||n.removeEventListener(e,t)}))}))}}),[V,Y,l,p,g,v]),e.useEffect((()=>{if(R)return Q(R),()=>null;if(w)return U.current&&Q(U.current),()=>null;let e=Y.current;l&&(e=document.querySelector(`[id='${l}']`)),B(!0);let t=!0;return ae({place:u,offset:f,elementReference:e,tooltipReference:A.current,tooltipArrowReference:P.current,strategy:y}).then((e=>{t&&(B(!1),Object.keys(e.tooltipStyles).length&&$(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&W(e.tooltipArrowStyles))})),()=>{t=!1}}),[F,j,l,Y,T,E,u,f,y,R]),e.useEffect((()=>()=>{L.current&&clearTimeout(L.current),N.current&&clearTimeout(N.current)}),[]);const ie=Boolean(E||T||h);return n.exports.jsxs(m,{id:t,role:"tooltip",className:a("react-tooltip",se.tooltip,se[i],r,{[se.show]:ie&&!M&&(j||F),[se.fixed]:"fixed"===y,[se.clickable]:x}),style:{...S,...C},ref:A,children:[h||E&&n.exports.jsx(c,{content:E})||T,n.exports.jsx("div",{className:a("react-tooltip-arrow",se.arrow,o,{[se["no-arrow"]]:b}),style:D,ref:P})]})};exports.Tooltip=({id:t,anchorId:r,content:o,html:i,className:l,classNameArrow:a,variant:s="dark",place:c="top",offset:u=10,wrapper:f="div",children:p=null,events:y=["hover"],positionStrategy:m="absolute",delayShow:h=0,delayHide:v=0,float:g=!1,noArrow:w=!1,clickable:b=!1,style:x,position:S,isOpen:R,setIsOpen:_,afterShow:k,afterHide:T})=>{const[E,j]=e.useState(o),[O,A]=e.useState(i),[P,L]=e.useState(c),[N,C]=e.useState(s),[$,D]=e.useState(u),[W,F]=e.useState(h),[I,H]=e.useState(v),[M,B]=e.useState(g),[U,V]=e.useState(f),[z,Y]=e.useState(y),[q,X]=e.useState(m),{anchorRefs:K,activeAnchor:J}=d()(t),Z=e=>null==e?void 0:e.getAttributeNames().reduce(((t,r)=>{var n;if(r.startsWith("data-tooltip-")){t[r.replace(/^data-tooltip-/,"")]=null!==(n=null==e?void 0:e.getAttribute(r))&&void 0!==n?n: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:o)},html:e=>{A(null!=e?e:i)},variant:e=>{var t;C(null!==(t=e)&&void 0!==t?t:s)},offset:e=>{D(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(" ");Y(null!=t?t:y)},"position-strategy":e=>{var t;X(null!==(t=e)&&void 0!==t?t:m)},"delay-show":e=>{F(null===e?h: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,r])=>{var n;null===(n=t[e])||void 0===n||n.call(t,r)}))};e.useEffect((()=>{j(o)}),[o]),e.useEffect((()=>{A(i)}),[i]),e.useEffect((()=>{var e;const t=new Set(K),n=document.querySelector(`[id='${r}']`);if(n&&t.add({current:n}),!t.size)return()=>null;const o=null!==(e=J.current)&&void 0!==e?e:n,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 r=Z(o);G(r)}))})),l={attributes:!0,childList:!1,subtree:!1};if(o){const e=Z(o);G(e),i.observe(o,l)}return()=>{i.disconnect()}}),[K,J,r]);const Q={id:t,anchorId:r,className:l,classNameArrow:a,content:E,html:O,place:P,variant:N,offset:$,wrapper:U,events:z,positionStrategy:q,delayShow:W,delayHide:I,float:M,noArrow:w,clickable:b,style:x,position:S,isOpen:R,setIsOpen:_,afterShow:k,afterHide:T};return p?n.exports.jsx(ce,{...Q,children:p}):n.exports.jsx(ce,{...Q})},exports.TooltipProvider=({children:t})=>{const r=e.useId(),[o,i]=e.useState({[r]:new Set}),[l,a]=e.useState({[r]:{current:null}}),s=(e,...t)=>{i((r=>{var n;const o=null!==(n=r[e])&&void 0!==n?n:new Set;return t.forEach((e=>o.add(e))),{...r,[e]:new Set(o)}}))},c=(e,...t)=>{i((r=>{const n=r[e];return n?(t.forEach((e=>n.delete(e))),{...r}):r}))},u=e.useCallback((e=>{var t,n;return{anchorRefs:null!==(t=o[null!=e?e:r])&&void 0!==t?t:new Set,activeAnchor:null!==(n=l[null!=e?e:r])&&void 0!==n?n:{current:null},attach:(...t)=>s(null!=e?e:r,...t),detach:(...t)=>c(null!=e?e:r,...t),setActiveAnchor:t=>((e,t)=>{a((r=>{var n;return(null===(n=r[e])||void 0===n?void 0:n.current)===t.current?r:{...r,[e]:t}}))})(null!=e?e:r,t)}}),[r,o,l,s,c]),f=e.useMemo((()=>{const e=u(r);return Object.assign((e=>u(e)),e)}),[u]);return n.exports.jsx(p.Provider,{value:f,children:t})},exports.TooltipWrapper=({tooltipId:t,children:r,className:o,place:i,content:l,html:s,variant:c,offset:u,wrapper:f,events:p,positionStrategy:y,delayShow:m,delayHide:h})=>{const{attach:v,detach:g}=d()(t),w=e.useRef(null);return e.useEffect((()=>(v(w),()=>{g(w)})),[]),n.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":p,"data-tooltip-position-strategy":y,"data-tooltip-delay-show":m,"data-tooltip-delay-hide":h,children:r})};
|
package/dist/react-tooltip.d.ts
CHANGED
|
@@ -53,6 +53,8 @@ interface ITooltipController {
|
|
|
53
53
|
position?: IPosition
|
|
54
54
|
isOpen?: boolean
|
|
55
55
|
setIsOpen?: (value: boolean) => void
|
|
56
|
+
afterShow?: () => void
|
|
57
|
+
afterHide?: () => void
|
|
56
58
|
}
|
|
57
59
|
|
|
58
60
|
declare module 'react' {
|
|
@@ -88,7 +90,7 @@ interface ITooltipWrapper {
|
|
|
88
90
|
delayHide?: ITooltipController['delayHide']
|
|
89
91
|
}
|
|
90
92
|
|
|
91
|
-
declare const TooltipController: ({ id, anchorId, content, html, className, classNameArrow, variant, place, offset, wrapper, children, events, positionStrategy, delayShow, delayHide, float, noArrow, clickable, style, position, isOpen, setIsOpen, }: ITooltipController) => JSX.Element;
|
|
93
|
+
declare const TooltipController: ({ id, anchorId, content, html, className, classNameArrow, variant, place, offset, wrapper, children, events, positionStrategy, delayShow, delayHide, float, noArrow, clickable, style, position, isOpen, setIsOpen, afterShow, afterHide, }: ITooltipController) => JSX.Element;
|
|
92
94
|
|
|
93
95
|
declare const TooltipProvider: React.FC<PropsWithChildren>;
|
|
94
96
|
|
|
@@ -2742,9 +2742,9 @@ var styles = {"tooltip":"styles-module_tooltip__mnnfp","fixed":"styles-module_fi
|
|
|
2742
2742
|
|
|
2743
2743
|
const Tooltip = ({
|
|
2744
2744
|
// props
|
|
2745
|
-
id, className, classNameArrow, variant = 'dark', anchorId, place = 'top', offset = 10, events = ['hover'], positionStrategy = 'absolute', wrapper: WrapperElement = 'div', children = null, delayShow = 0, delayHide = 0, float = false, noArrow = false, clickable = false, style: externalStyles, position,
|
|
2745
|
+
id, className, classNameArrow, variant = 'dark', anchorId, place = 'top', offset = 10, events = ['hover'], positionStrategy = 'absolute', wrapper: WrapperElement = 'div', children = null, delayShow = 0, delayHide = 0, float = false, noArrow = false, clickable = false, style: externalStyles, position, afterShow, afterHide,
|
|
2746
2746
|
// props handled by controller
|
|
2747
|
-
|
|
2747
|
+
content, html, isOpen, setIsOpen, }) => {
|
|
2748
2748
|
const tooltipRef = useRef(null);
|
|
2749
2749
|
const tooltipArrowRef = useRef(null);
|
|
2750
2750
|
const tooltipShowDelayTimerRef = useRef(null);
|
|
@@ -2752,6 +2752,7 @@ isHtmlContent = false, content, isOpen, setIsOpen, }) => {
|
|
|
2752
2752
|
const [inlineStyles, setInlineStyles] = useState({});
|
|
2753
2753
|
const [inlineArrowStyles, setInlineArrowStyles] = useState({});
|
|
2754
2754
|
const [show, setShow] = useState(false);
|
|
2755
|
+
const wasShowing = useRef(false);
|
|
2755
2756
|
const [calculatingPosition, setCalculatingPosition] = useState(false);
|
|
2756
2757
|
const lastFloatPosition = useRef(null);
|
|
2757
2758
|
const { anchorRefs, setActiveAnchor: setProviderActiveAnchor } = useTooltip()(id);
|
|
@@ -2765,6 +2766,18 @@ isHtmlContent = false, content, isOpen, setIsOpen, }) => {
|
|
|
2765
2766
|
setShow(value);
|
|
2766
2767
|
}
|
|
2767
2768
|
};
|
|
2769
|
+
useEffect(() => {
|
|
2770
|
+
if (show === wasShowing.current) {
|
|
2771
|
+
return;
|
|
2772
|
+
}
|
|
2773
|
+
wasShowing.current = show;
|
|
2774
|
+
if (show) {
|
|
2775
|
+
afterShow === null || afterShow === void 0 ? void 0 : afterShow();
|
|
2776
|
+
}
|
|
2777
|
+
else {
|
|
2778
|
+
afterHide === null || afterHide === void 0 ? void 0 : afterHide();
|
|
2779
|
+
}
|
|
2780
|
+
}, [show]);
|
|
2768
2781
|
const handleShowTooltipDelayed = () => {
|
|
2769
2782
|
if (tooltipShowDelayTimerRef.current) {
|
|
2770
2783
|
clearTimeout(tooltipShowDelayTimerRef.current);
|
|
@@ -2873,7 +2886,7 @@ isHtmlContent = false, content, isOpen, setIsOpen, }) => {
|
|
|
2873
2886
|
if ((_a = activeAnchor.current) === null || _a === void 0 ? void 0 : _a.contains(event.target)) {
|
|
2874
2887
|
return;
|
|
2875
2888
|
}
|
|
2876
|
-
|
|
2889
|
+
handleShow(false);
|
|
2877
2890
|
};
|
|
2878
2891
|
// debounce handler to prevent call twice when
|
|
2879
2892
|
// mouse enter and focus events being triggered toggether
|
|
@@ -2986,7 +2999,18 @@ isHtmlContent = false, content, isOpen, setIsOpen, }) => {
|
|
|
2986
2999
|
return () => {
|
|
2987
3000
|
mounted = false;
|
|
2988
3001
|
};
|
|
2989
|
-
}, [
|
|
3002
|
+
}, [
|
|
3003
|
+
show,
|
|
3004
|
+
isOpen,
|
|
3005
|
+
anchorId,
|
|
3006
|
+
activeAnchor,
|
|
3007
|
+
content,
|
|
3008
|
+
html,
|
|
3009
|
+
place,
|
|
3010
|
+
offset,
|
|
3011
|
+
positionStrategy,
|
|
3012
|
+
position,
|
|
3013
|
+
]);
|
|
2990
3014
|
useEffect(() => {
|
|
2991
3015
|
return () => {
|
|
2992
3016
|
if (tooltipShowDelayTimerRef.current) {
|
|
@@ -2997,18 +3021,19 @@ isHtmlContent = false, content, isOpen, setIsOpen, }) => {
|
|
|
2997
3021
|
}
|
|
2998
3022
|
};
|
|
2999
3023
|
}, []);
|
|
3000
|
-
const hasContentOrChildren = Boolean(content || children);
|
|
3024
|
+
const hasContentOrChildren = Boolean(html || content || children);
|
|
3001
3025
|
return (jsxRuntime.exports.jsxs(WrapperElement, { id: id, role: "tooltip", className: classNames('react-tooltip', styles['tooltip'], styles[variant], className, {
|
|
3002
3026
|
[styles['show']]: hasContentOrChildren && !calculatingPosition && (isOpen || show),
|
|
3003
3027
|
[styles['fixed']]: positionStrategy === 'fixed',
|
|
3004
3028
|
[styles['clickable']]: clickable,
|
|
3005
|
-
}), style: { ...externalStyles, ...inlineStyles }, ref: tooltipRef, children: [children || (
|
|
3029
|
+
}), style: { ...externalStyles, ...inlineStyles }, ref: tooltipRef, children: [children || (html && jsxRuntime.exports.jsx(TooltipContent, { content: html })) || content, jsxRuntime.exports.jsx("div", { className: classNames('react-tooltip-arrow', styles['arrow'], classNameArrow, {
|
|
3006
3030
|
[styles['no-arrow']]: noArrow,
|
|
3007
3031
|
}), style: inlineArrowStyles, ref: tooltipArrowRef })] }));
|
|
3008
3032
|
};
|
|
3009
3033
|
|
|
3010
|
-
const TooltipController = ({ id, anchorId, content, html, className, classNameArrow, variant = 'dark', place = 'top', offset = 10, wrapper = 'div', children = null, events = ['hover'], positionStrategy = 'absolute', delayShow = 0, delayHide = 0, float = false, noArrow = false, clickable = false, style, position, isOpen, setIsOpen, }) => {
|
|
3011
|
-
const [tooltipContent, setTooltipContent] = useState(content
|
|
3034
|
+
const TooltipController = ({ id, anchorId, content, html, className, classNameArrow, variant = 'dark', place = 'top', offset = 10, wrapper = 'div', children = null, events = ['hover'], positionStrategy = 'absolute', delayShow = 0, delayHide = 0, float = false, noArrow = false, clickable = false, style, position, isOpen, setIsOpen, afterShow, afterHide, }) => {
|
|
3035
|
+
const [tooltipContent, setTooltipContent] = useState(content);
|
|
3036
|
+
const [tooltipHtml, setTooltipHtml] = useState(html);
|
|
3012
3037
|
const [tooltipPlace, setTooltipPlace] = useState(place);
|
|
3013
3038
|
const [tooltipVariant, setTooltipVariant] = useState(variant);
|
|
3014
3039
|
const [tooltipOffset, setTooltipOffset] = useState(offset);
|
|
@@ -3018,7 +3043,6 @@ const TooltipController = ({ id, anchorId, content, html, className, classNameAr
|
|
|
3018
3043
|
const [tooltipWrapper, setTooltipWrapper] = useState(wrapper);
|
|
3019
3044
|
const [tooltipEvents, setTooltipEvents] = useState(events);
|
|
3020
3045
|
const [tooltipPositionStrategy, setTooltipPositionStrategy] = useState(positionStrategy);
|
|
3021
|
-
const [isHtmlContent, setIsHtmlContent] = useState(Boolean(html));
|
|
3022
3046
|
const { anchorRefs, activeAnchor } = useTooltip()(id);
|
|
3023
3047
|
const getDataAttributesFromAnchorElement = (elementReference) => {
|
|
3024
3048
|
const dataAttributes = elementReference === null || elementReference === void 0 ? void 0 : elementReference.getAttributeNames().reduce((acc, name) => {
|
|
@@ -3041,9 +3065,7 @@ const TooltipController = ({ id, anchorId, content, html, className, classNameAr
|
|
|
3041
3065
|
setTooltipContent(value !== null && value !== void 0 ? value : content);
|
|
3042
3066
|
},
|
|
3043
3067
|
html: (value) => {
|
|
3044
|
-
|
|
3045
|
-
setIsHtmlContent(Boolean(value !== null && value !== void 0 ? value : html));
|
|
3046
|
-
setTooltipContent((_a = value !== null && value !== void 0 ? value : html) !== null && _a !== void 0 ? _a : content);
|
|
3068
|
+
setTooltipHtml(value !== null && value !== void 0 ? value : html);
|
|
3047
3069
|
},
|
|
3048
3070
|
variant: (value) => {
|
|
3049
3071
|
var _a;
|
|
@@ -3083,14 +3105,11 @@ const TooltipController = ({ id, anchorId, content, html, className, classNameAr
|
|
|
3083
3105
|
});
|
|
3084
3106
|
};
|
|
3085
3107
|
useEffect(() => {
|
|
3086
|
-
setIsHtmlContent(false);
|
|
3087
3108
|
setTooltipContent(content);
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
}
|
|
3093
|
-
}, [content, html]);
|
|
3109
|
+
}, [content]);
|
|
3110
|
+
useEffect(() => {
|
|
3111
|
+
setTooltipHtml(html);
|
|
3112
|
+
}, [html]);
|
|
3094
3113
|
useEffect(() => {
|
|
3095
3114
|
var _a;
|
|
3096
3115
|
const elementRefs = new Set(anchorRefs);
|
|
@@ -3101,16 +3120,17 @@ const TooltipController = ({ id, anchorId, content, html, className, classNameAr
|
|
|
3101
3120
|
if (!elementRefs.size) {
|
|
3102
3121
|
return () => null;
|
|
3103
3122
|
}
|
|
3123
|
+
const anchorElement = (_a = activeAnchor.current) !== null && _a !== void 0 ? _a : anchorById;
|
|
3104
3124
|
const observerCallback = (mutationList) => {
|
|
3105
3125
|
mutationList.forEach((mutation) => {
|
|
3106
3126
|
var _a;
|
|
3107
|
-
if (!
|
|
3127
|
+
if (!anchorElement ||
|
|
3108
3128
|
mutation.type !== 'attributes' ||
|
|
3109
3129
|
!((_a = mutation.attributeName) === null || _a === void 0 ? void 0 : _a.startsWith('data-tooltip-'))) {
|
|
3110
3130
|
return;
|
|
3111
3131
|
}
|
|
3112
3132
|
// make sure to get all set attributes, since all unset attributes are reset
|
|
3113
|
-
const dataAttributes = getDataAttributesFromAnchorElement(
|
|
3133
|
+
const dataAttributes = getDataAttributesFromAnchorElement(anchorElement);
|
|
3114
3134
|
applyAllDataAttributesFromAnchorElement(dataAttributes);
|
|
3115
3135
|
});
|
|
3116
3136
|
};
|
|
@@ -3119,12 +3139,11 @@ const TooltipController = ({ id, anchorId, content, html, className, classNameAr
|
|
|
3119
3139
|
// do not check for subtree and childrens, we only want to know attribute changes
|
|
3120
3140
|
// to stay watching `data-attributes-*` from anchor element
|
|
3121
3141
|
const observerConfig = { attributes: true, childList: false, subtree: false };
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
const dataAttributes = getDataAttributesFromAnchorElement(element);
|
|
3142
|
+
if (anchorElement) {
|
|
3143
|
+
const dataAttributes = getDataAttributesFromAnchorElement(anchorElement);
|
|
3125
3144
|
applyAllDataAttributesFromAnchorElement(dataAttributes);
|
|
3126
3145
|
// Start observing the target node for configured mutations
|
|
3127
|
-
observer.observe(
|
|
3146
|
+
observer.observe(anchorElement, observerConfig);
|
|
3128
3147
|
}
|
|
3129
3148
|
return () => {
|
|
3130
3149
|
// Remove the observer when the tooltip is destroyed
|
|
@@ -3137,7 +3156,7 @@ const TooltipController = ({ id, anchorId, content, html, className, classNameAr
|
|
|
3137
3156
|
className,
|
|
3138
3157
|
classNameArrow,
|
|
3139
3158
|
content: tooltipContent,
|
|
3140
|
-
|
|
3159
|
+
html: tooltipHtml,
|
|
3141
3160
|
place: tooltipPlace,
|
|
3142
3161
|
variant: tooltipVariant,
|
|
3143
3162
|
offset: tooltipOffset,
|
|
@@ -3153,6 +3172,8 @@ const TooltipController = ({ id, anchorId, content, html, className, classNameAr
|
|
|
3153
3172
|
position,
|
|
3154
3173
|
isOpen,
|
|
3155
3174
|
setIsOpen,
|
|
3175
|
+
afterShow,
|
|
3176
|
+
afterHide,
|
|
3156
3177
|
};
|
|
3157
3178
|
return children ? jsxRuntime.exports.jsx(Tooltip, { ...props, children: children }) : jsxRuntime.exports.jsx(Tooltip, { ...props });
|
|
3158
3179
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import e,{createContext as t,useId as n,useState as r,useCallback as o,useMemo as i,useContext as l,useRef as a,useEffect as s}from"react";var c={exports:{}},u={};!function(){var t=e,n=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),h=Symbol.iterator;var v=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function g(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];w("error",e,n)}function w(e,t,n){var r=v.ReactDebugCurrentFrame.getStackAddendum();""!==r&&(t+="%s",n=n.concat([r]));var o=n.map((function(e){return String(e)}));o.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,o)}var b;function x(e){return e.displayName||"Context"}function S(e){if(null==e)return null;if("number"==typeof e.tag&&g("Received an unexpected object in getComponentNameFromType(). 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 o:return"Fragment";case r:return"Portal";case l:return"Profiler";case i:return"StrictMode";case f:return"Suspense";case p:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case s:return x(e)+".Consumer";case a:return x(e._context)+".Provider";case c:return function(e,t,n){var r=e.displayName;if(r)return r;var o=t.displayName||t.name||"";return""!==o?n+"("+o+")":n}(e,e.render,"ForwardRef");case d:var t=e.displayName||null;return null!==t?t:S(e.type)||"Memo";case y:var n=e,u=n._payload,m=n._init;try{return S(m(u))}catch(e){return null}}return null}b=Symbol.for("react.module.reference");var _,R,k,T,j,O,E,A=Object.assign,P=0;function L(){}L.__reactDisabledLog=!0;var N,C=v.ReactCurrentDispatcher;function $(e,t,n){if(void 0===N)try{throw Error()}catch(e){var r=e.stack.trim().match(/\n( *(at )?)/);N=r&&r[1]||""}return"\n"+N+e}var D,F=!1,W="function"==typeof WeakMap?WeakMap:Map;function I(e,t){if(!e||F)return"";var n,r=D.get(e);if(void 0!==r)return r;F=!0;var o,i=Error.prepareStackTrace;Error.prepareStackTrace=void 0,o=C.current,C.current=null,function(){if(0===P){_=console.log,R=console.info,k=console.warn,T=console.error,j=console.group,O=console.groupCollapsed,E=console.groupEnd;var e={configurable:!0,enumerable:!0,value:L,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}P++}();try{if(t){var l=function(){throw Error()};if(Object.defineProperty(l.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(l,[])}catch(e){n=e}Reflect.construct(e,[],l)}else{try{l.call()}catch(e){n=e}e.call(l.prototype)}}else{try{throw Error()}catch(e){n=e}e()}}catch(t){if(t&&n&&"string"==typeof t.stack){for(var a=t.stack.split("\n"),s=n.stack.split("\n"),c=a.length-1,u=s.length-1;c>=1&&u>=0&&a[c]!==s[u];)u--;for(;c>=1&&u>=0;c--,u--)if(a[c]!==s[u]){if(1!==c||1!==u)do{if(c--,--u<0||a[c]!==s[u]){var f="\n"+a[c].replace(" at new "," at ");return e.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",e.displayName)),"function"==typeof e&&D.set(e,f),f}}while(c>=1&&u>=0);break}}}finally{F=!1,C.current=o,function(){if(0==--P){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:A({},e,{value:_}),info:A({},e,{value:R}),warn:A({},e,{value:k}),error:A({},e,{value:T}),group:A({},e,{value:j}),groupCollapsed:A({},e,{value:O}),groupEnd:A({},e,{value:E})})}P<0&&g("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=i}var p=e?e.displayName||e.name:"",d=p?$(p):"";return"function"==typeof e&&D.set(e,d),d}function H(e,t,n){if(null==e)return"";if("function"==typeof e)return I(e,!(!(r=e.prototype)||!r.isReactComponent));var r;if("string"==typeof e)return $(e);switch(e){case f:return $("Suspense");case p:return $("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case c:return I(e.render,!1);case d:return H(e.type,t,n);case y:var o=e,i=o._payload,l=o._init;try{return H(l(i),t,n)}catch(e){}}return""}D=new W;var B=Object.prototype.hasOwnProperty,U={},M=v.ReactDebugCurrentFrame;function V(e){if(e){var t=e._owner,n=H(e.type,e._source,t?t.type:null);M.setExtraStackFrame(n)}else M.setExtraStackFrame(null)}var z=Array.isArray;function Y(e){return z(e)}function q(e){return""+e}function X(e){if(function(e){try{return q(e),!1}catch(e){return!0}}(e))return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",function(e){return"function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}(e)),q(e)}var K,J,Z,G=v.ReactCurrentOwner,Q={key:!0,ref:!0,__self:!0,__source:!0};Z={};function ee(e,t,r,o,i){var l,a={},s=null,c=null;for(l in void 0!==r&&(X(r),s=""+r),function(e){if(B.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(t)&&(X(t.key),s=""+t.key),function(e){if(B.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&&G.current&&t&&G.current.stateNode!==t){var n=S(G.current.type);Z[n]||(g('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',S(G.current.type),e.ref),Z[n]=!0)}}(t,i)),t)B.call(t,l)&&!Q.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,g("%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,g("%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,G.current,a)}var te,ne=v.ReactCurrentOwner,re=v.ReactDebugCurrentFrame;function oe(e){if(e){var t=e._owner,n=H(e.type,e._source,t?t.type:null);re.setExtraStackFrame(n)}else re.setExtraStackFrame(null)}function ie(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}function le(){if(ne.current){var e=S(ne.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}te=!1;var ae={};function se(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var t=le();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(!ae[n]){ae[n]=!0;var r="";e&&e._owner&&e._owner!==ne.current&&(r=" It was passed a child from "+S(e._owner.type)+"."),oe(e),g('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),oe(null)}}}function ce(e,t){if("object"==typeof e)if(Y(e))for(var n=0;n<e.length;n++){var r=e[n];ie(r)&&se(r,t)}else if(ie(e))e._store&&(e._store.validated=!0);else if(e){var o=function(e){if(null===e||"object"!=typeof e)return null;var t=h&&e[h]||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;)ie(i.value)&&se(i.value,t)}}function ue(e){var t,n=e.type;if(null!=n&&"string"!=typeof n){if("function"==typeof n)t=n.propTypes;else{if("object"!=typeof n||n.$$typeof!==c&&n.$$typeof!==d)return;t=n.propTypes}if(t){var r=S(n);!function(e,t,n,r,o){var i=Function.call.bind(B);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||(V(o),g("%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),V(null)),a instanceof Error&&!(a.message in U)&&(U[a.message]=!0,V(o),g("Failed %s type: %s",n,a.message),V(null))}}(t,e.props,"prop",r,e)}else if(void 0!==n.PropTypes&&!te){te=!0,g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",S(n)||"Unknown")}"function"!=typeof n.getDefaultProps||n.getDefaultProps.isReactClassApproved||g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function fe(e,t,r,u,h,v){var w=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===l||e===i||e===f||e===p||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===d||e.$$typeof===a||e.$$typeof===s||e.$$typeof===c||e.$$typeof===b||void 0!==e.getModuleId)}(e);if(!w){var x="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(x+=" 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 _,R=function(e){return void 0!==e?"\n\nCheck your code at "+e.fileName.replace(/^.*[\\\/]/,"")+":"+e.lineNumber+".":""}(h);x+=R||le(),null===e?_="null":Y(e)?_="array":void 0!==e&&e.$$typeof===n?(_="<"+(S(e.type)||"Unknown")+" />",x=" Did you accidentally export a JSX literal instead of a component?"):_=typeof e,g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",_,x)}var k=ee(e,t,r,h,v);if(null==k)return k;if(w){var T=t.children;if(void 0!==T)if(u)if(Y(T)){for(var j=0;j<T.length;j++)ce(T[j],e);Object.freeze&&Object.freeze(T)}else g("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 ce(T,e)}return e===o?function(e){for(var t=Object.keys(e.props),n=0;n<t.length;n++){var r=t[n];if("children"!==r&&"key"!==r){oe(e),g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",r),oe(null);break}}null!==e.ref&&(oe(e),g("Invalid attribute `ref` supplied to `React.Fragment`."),oe(null))}(k):ue(k),k}var pe=function(e,t,n){return fe(e,t,n,!1)},de=function(e,t,n){return fe(e,t,n,!0)};u.Fragment=o,u.jsx=pe,u.jsxs=de}(),c.exports=u;var f,p={exports:{}};
|
|
1
|
+
import e,{createContext as t,useId as n,useState as r,useCallback as o,useMemo as i,useContext as l,useRef as a,useEffect as c}from"react";var s={exports:{}},u={};!function(){var t=e,n=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),c=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),h=Symbol.iterator;var v=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function g(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];w("error",e,n)}function w(e,t,n){var r=v.ReactDebugCurrentFrame.getStackAddendum();""!==r&&(t+="%s",n=n.concat([r]));var o=n.map((function(e){return String(e)}));o.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,o)}var b;function x(e){return e.displayName||"Context"}function S(e){if(null==e)return null;if("number"==typeof e.tag&&g("Received an unexpected object in getComponentNameFromType(). 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 o:return"Fragment";case r:return"Portal";case l:return"Profiler";case i:return"StrictMode";case f:return"Suspense";case p:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case c:return x(e)+".Consumer";case a:return x(e._context)+".Provider";case s:return function(e,t,n){var r=e.displayName;if(r)return r;var o=t.displayName||t.name||"";return""!==o?n+"("+o+")":n}(e,e.render,"ForwardRef");case d:var t=e.displayName||null;return null!==t?t:S(e.type)||"Memo";case y:var n=e,u=n._payload,m=n._init;try{return S(m(u))}catch(e){return null}}return null}b=Symbol.for("react.module.reference");var _,R,k,T,j,O,E,A=Object.assign,P=0;function L(){}L.__reactDisabledLog=!0;var N,$=v.ReactCurrentDispatcher;function C(e,t,n){if(void 0===N)try{throw Error()}catch(e){var r=e.stack.trim().match(/\n( *(at )?)/);N=r&&r[1]||""}return"\n"+N+e}var D,F=!1,W="function"==typeof WeakMap?WeakMap:Map;function I(e,t){if(!e||F)return"";var n,r=D.get(e);if(void 0!==r)return r;F=!0;var o,i=Error.prepareStackTrace;Error.prepareStackTrace=void 0,o=$.current,$.current=null,function(){if(0===P){_=console.log,R=console.info,k=console.warn,T=console.error,j=console.group,O=console.groupCollapsed,E=console.groupEnd;var e={configurable:!0,enumerable:!0,value:L,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}P++}();try{if(t){var l=function(){throw Error()};if(Object.defineProperty(l.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(l,[])}catch(e){n=e}Reflect.construct(e,[],l)}else{try{l.call()}catch(e){n=e}e.call(l.prototype)}}else{try{throw Error()}catch(e){n=e}e()}}catch(t){if(t&&n&&"string"==typeof t.stack){for(var a=t.stack.split("\n"),c=n.stack.split("\n"),s=a.length-1,u=c.length-1;s>=1&&u>=0&&a[s]!==c[u];)u--;for(;s>=1&&u>=0;s--,u--)if(a[s]!==c[u]){if(1!==s||1!==u)do{if(s--,--u<0||a[s]!==c[u]){var f="\n"+a[s].replace(" at new "," at ");return e.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",e.displayName)),"function"==typeof e&&D.set(e,f),f}}while(s>=1&&u>=0);break}}}finally{F=!1,$.current=o,function(){if(0==--P){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:A({},e,{value:_}),info:A({},e,{value:R}),warn:A({},e,{value:k}),error:A({},e,{value:T}),group:A({},e,{value:j}),groupCollapsed:A({},e,{value:O}),groupEnd:A({},e,{value:E})})}P<0&&g("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=i}var p=e?e.displayName||e.name:"",d=p?C(p):"";return"function"==typeof e&&D.set(e,d),d}function H(e,t,n){if(null==e)return"";if("function"==typeof e)return I(e,!(!(r=e.prototype)||!r.isReactComponent));var r;if("string"==typeof e)return C(e);switch(e){case f:return C("Suspense");case p:return C("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case s:return I(e.render,!1);case d:return H(e.type,t,n);case y:var o=e,i=o._payload,l=o._init;try{return H(l(i),t,n)}catch(e){}}return""}D=new W;var B=Object.prototype.hasOwnProperty,U={},M=v.ReactDebugCurrentFrame;function V(e){if(e){var t=e._owner,n=H(e.type,e._source,t?t.type:null);M.setExtraStackFrame(n)}else M.setExtraStackFrame(null)}var z=Array.isArray;function Y(e){return z(e)}function q(e){return""+e}function X(e){if(function(e){try{return q(e),!1}catch(e){return!0}}(e))return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",function(e){return"function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}(e)),q(e)}var K,J,Z,G=v.ReactCurrentOwner,Q={key:!0,ref:!0,__self:!0,__source:!0};Z={};function ee(e,t,r,o,i){var l,a={},c=null,s=null;for(l in void 0!==r&&(X(r),c=""+r),function(e){if(B.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(t)&&(X(t.key),c=""+t.key),function(e){if(B.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&&G.current&&t&&G.current.stateNode!==t){var n=S(G.current.type);Z[n]||(g('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',S(G.current.type),e.ref),Z[n]=!0)}}(t,i)),t)B.call(t,l)&&!Q.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(){K||(K=!0,g("%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,g("%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,G.current,a)}var te,ne=v.ReactCurrentOwner,re=v.ReactDebugCurrentFrame;function oe(e){if(e){var t=e._owner,n=H(e.type,e._source,t?t.type:null);re.setExtraStackFrame(n)}else re.setExtraStackFrame(null)}function ie(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}function le(){if(ne.current){var e=S(ne.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}te=!1;var ae={};function ce(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var t=le();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(!ae[n]){ae[n]=!0;var r="";e&&e._owner&&e._owner!==ne.current&&(r=" It was passed a child from "+S(e._owner.type)+"."),oe(e),g('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),oe(null)}}}function se(e,t){if("object"==typeof e)if(Y(e))for(var n=0;n<e.length;n++){var r=e[n];ie(r)&&ce(r,t)}else if(ie(e))e._store&&(e._store.validated=!0);else if(e){var o=function(e){if(null===e||"object"!=typeof e)return null;var t=h&&e[h]||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;)ie(i.value)&&ce(i.value,t)}}function ue(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!==s&&n.$$typeof!==d)return;t=n.propTypes}if(t){var r=S(n);!function(e,t,n,r,o){var i=Function.call.bind(B);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||(V(o),g("%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),V(null)),a instanceof Error&&!(a.message in U)&&(U[a.message]=!0,V(o),g("Failed %s type: %s",n,a.message),V(null))}}(t,e.props,"prop",r,e)}else if(void 0!==n.PropTypes&&!te){te=!0,g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",S(n)||"Unknown")}"function"!=typeof n.getDefaultProps||n.getDefaultProps.isReactClassApproved||g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function fe(e,t,r,u,h,v){var w=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===l||e===i||e===f||e===p||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===d||e.$$typeof===a||e.$$typeof===c||e.$$typeof===s||e.$$typeof===b||void 0!==e.getModuleId)}(e);if(!w){var x="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(x+=" 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 _,R=function(e){return void 0!==e?"\n\nCheck your code at "+e.fileName.replace(/^.*[\\\/]/,"")+":"+e.lineNumber+".":""}(h);x+=R||le(),null===e?_="null":Y(e)?_="array":void 0!==e&&e.$$typeof===n?(_="<"+(S(e.type)||"Unknown")+" />",x=" Did you accidentally export a JSX literal instead of a component?"):_=typeof e,g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",_,x)}var k=ee(e,t,r,h,v);if(null==k)return k;if(w){var T=t.children;if(void 0!==T)if(u)if(Y(T)){for(var j=0;j<T.length;j++)se(T[j],e);Object.freeze&&Object.freeze(T)}else g("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 se(T,e)}return e===o?function(e){for(var t=Object.keys(e.props),n=0;n<t.length;n++){var r=t[n];if("children"!==r&&"key"!==r){oe(e),g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",r),oe(null);break}}null!==e.ref&&(oe(e),g("Invalid attribute `ref` supplied to `React.Fragment`."),oe(null))}(k):ue(k),k}var pe=function(e,t,n){return fe(e,t,n,!1)},de=function(e,t,n){return fe(e,t,n,!0)};u.Fragment=o,u.jsx=pe,u.jsxs=de}(),s.exports=u;var f,p={exports:{}};
|
|
2
2
|
/*!
|
|
3
3
|
Copyright (c) 2018 Jed Watson.
|
|
4
4
|
Licensed under the MIT License (MIT), see
|
|
5
5
|
http://jedwatson.github.io/classnames
|
|
6
|
-
*/f=p,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(" ")}f.exports?(t.default=t,f.exports=t):window.classNames=t}();var d=p.exports;const y=(e,t,n)=>{let r=null;return function(...o){r&&clearTimeout(r),r=setTimeout((()=>{r=null,n||e.apply(this,o)}),t)}},m=({content:e})=>c.exports.jsx("span",{dangerouslySetInnerHTML:{__html:e}}),h={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},v=t(Object.assign((()=>h),h)),g=({children:e})=>{const t=n(),[l,a]=r({[t]:new Set}),[s,u]=r({[t]:{current:null}}),f=(e,...t)=>{a((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)}}))},p=(e,...t)=>{a((n=>{const r=n[e];return r?(t.forEach((e=>r.delete(e))),{...n}):n}))},d=o((e=>{var n,r;return{anchorRefs:null!==(n=l[null!=e?e:t])&&void 0!==n?n:new Set,activeAnchor:null!==(r=s[null!=e?e:t])&&void 0!==r?r:{current:null},attach:(...n)=>f(null!=e?e:t,...n),detach:(...n)=>p(null!=e?e:t,...n),setActiveAnchor:n=>((e,t)=>{u((n=>{var r;return(null===(r=n[e])||void 0===r?void 0:r.current)===t.current?n:{...n,[e]:t}}))})(null!=e?e:t,n)}}),[t,l,s,f,p]),y=i((()=>{const e=d(t);return Object.assign((e=>d(e)),e)}),[d]);return c.exports.jsx(v.Provider,{value:y,children:e})};function w(){return l(v)}const b=({tooltipId:e,children:t,className:n,place:r,content:o,html:i,variant:l,offset:u,wrapper:f,events:p,positionStrategy:y,delayShow:m,delayHide:h})=>{const{attach:v,detach:g}=w()(e),b=a(null);return s((()=>(v(b),()=>{g(b)})),[]),c.exports.jsx("span",{ref:b,className:d("react-tooltip-wrapper",n),"data-tooltip-place":r,"data-tooltip-content":o,"data-tooltip-html":i,"data-tooltip-variant":l,"data-tooltip-offset":u,"data-tooltip-wrapper":f,"data-tooltip-events":p,"data-tooltip-position-strategy":y,"data-tooltip-delay-show":m,"data-tooltip-delay-hide":h,children:t})};function x(e){return e.split("-")[0]}function S(e){return e.split("-")[1]}function _(e){return["top","bottom"].includes(x(e))?"x":"y"}function R(e){return"y"===e?"height":"width"}function k(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=_(t),s=R(a),c=r[s]/2-o[s]/2,u="x"===a;let f;switch(x(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(S(t)){case"start":f[a]-=c*(n&&u?-1:1);break;case"end":f[a]+=c*(n&&u?-1:1)}return f}function T(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 j(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function O(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=T(d),m=a[p?"floating"===f?"reference":"floating":f],h=j(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=j(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:h.top-v.top+y.top,bottom:v.bottom-h.bottom+y.bottom,left:h.left-v.left+y.left,right:v.right-h.right+y.right}}const E=Math.min,A=Math.max;function P(e,t,n){return A(e,E(t,n))}const L={left:"right",right:"left",bottom:"top",top:"bottom"};function N(e){return e.replace(/left|right|bottom|top/g,(e=>L[e]))}const C={start:"end",end:"start"};function $(e){return e.replace(/start|end/g,(e=>C[e]))}const D=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,m=x(r),h=f||(m===l||!d?[N(l)]:function(e){const t=N(e);return[$(e),t,$(t)]}(l)),v=[l,...h],g=await O(t,y),w=[];let b=(null==(n=o.flip)?void 0:n.overflows)||[];if(c&&w.push(g[m]),u){const{main:e,cross:t}=function(e,t,n){void 0===n&&(n=!1);const r=S(e),o=_(e),i=R(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,await(null==a.isRTL?void 0:a.isRTL(s.floating)));w.push(g[e],g[t])}if(b=[...b,{placement:r,overflows:w}],!w.every((e=>e<=0))){var k,T;const e=(null!=(k=null==(T=o.flip)?void 0:T.index)?k:0)+1,t=v[e];if(t)return{data:{index:e,overflows:b},reset:{placement:t}};let n="bottom";switch(p){case"bestFit":{var j;const e=null==(j=b.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:j[0].placement;e&&(n=e);break}case"initialPlacement":n=l}if(r!==n)return{reset:{placement:n}}}return{}}}};const F=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=x(n),a=S(n),s="x"===_(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 W(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function I(e){if(null==e)return window;if(!W(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function H(e){return I(e).getComputedStyle(e)}function B(e){return W(e)?"":e?(e.nodeName||"").toLowerCase():""}function U(){const e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((e=>e.brand+"/"+e.version)).join(" "):navigator.userAgent}function M(e){return e instanceof I(e).HTMLElement}function V(e){return e instanceof I(e).Element}function z(e){if("undefined"==typeof ShadowRoot)return!1;return e instanceof I(e).ShadowRoot||e instanceof ShadowRoot}function Y(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=H(e);return/auto|scroll|overlay|hidden/.test(t+r+n)&&!["inline","contents"].includes(o)}function q(e){return["table","td","th"].includes(B(e))}function X(e){const t=/firefox/i.test(U()),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 K(){return!/^((?!chrome|android).)*safari/i.test(U())}function J(e){return["html","body","#document"].includes(B(e))}const Z=Math.min,G=Math.max,Q=Math.round;function ee(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&&M(e)&&(s=e.offsetWidth>0&&Q(a.width)/e.offsetWidth||1,c=e.offsetHeight>0&&Q(a.height)/e.offsetHeight||1);const u=V(e)?I(e):window,f=!K()&&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 te(e){return(t=e,(t instanceof I(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function ne(e){return V(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function re(e){return ee(te(e)).left+ne(e).scrollLeft}function oe(e,t,n){const r=M(t),o=te(t),i=ee(e,r&&function(e){const t=ee(e);return Q(t.width)!==e.offsetWidth||Q(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"!==B(t)||Y(o))&&(l=ne(t)),M(t)){const e=ee(t,!0);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&(a.x=re(o));return{x:i.left+l.scrollLeft-a.x,y:i.top+l.scrollTop-a.y,width:i.width,height:i.height}}function ie(e){if("html"===B(e))return e;const t=e.assignedSlot||e.parentNode||(z(e)?e.host:null)||te(e);return z(t)?t.host:t}function le(e){return M(e)&&"fixed"!==H(e).position?e.offsetParent:null}function ae(e){const t=I(e);let n=le(e);for(;n&&q(n)&&"static"===H(n).position;)n=le(n);return n&&("html"===B(n)||"body"===B(n)&&"static"===H(n).position&&!X(n))?t:n||function(e){let t=ie(e);for(;M(t)&&!J(t);){if(X(t))return t;t=ie(t)}return null}(e)||t}function se(e){if(M(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=ee(e);return{width:t.width,height:t.height}}function ce(e){const t=ie(e);return J(t)?e.ownerDocument.body:M(t)&&Y(t)?t:ce(t)}function ue(e,t){var n;void 0===t&&(t=[]);const r=ce(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=I(r),l=o?[i].concat(i.visualViewport||[],Y(r)?r:[]):r,a=t.concat(l);return o?a:a.concat(ue(l))}function fe(e,t,n){return"viewport"===t?j(function(e,t){const n=I(e),r=te(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=K();(e||!e&&"fixed"===t)&&(a=o.offsetLeft,s=o.offsetTop)}return{width:i,height:l,x:a,y:s}}(e,n)):V(t)?function(e,t){const n=ee(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):j(function(e){var t;const n=te(e),r=ne(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=G(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),l=G(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0);let a=-r.scrollLeft+re(e);const s=-r.scrollTop;return"rtl"===H(o||n).direction&&(a+=G(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:l,x:a,y:s}}(te(e)))}const pe={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?function(e){let t=ue(e).filter((e=>V(e)&&"body"!==B(e))),n=e,r=null;for(;V(n)&&!J(n);){const e=H(n);"static"===e.position&&r&&["absolute","fixed"].includes(r.position)&&!X(n)?t=t.filter((e=>e!==n)):r=e,n=ie(n)}return t}(t):[].concat(n),l=[...i,r],a=l[0],s=l.reduce(((e,n)=>{const r=fe(t,n,o);return e.top=G(r.top,e.top),e.right=Z(r.right,e.right),e.bottom=Z(r.bottom,e.bottom),e.left=G(r.left,e.left),e}),fe(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=M(n),i=te(n);if(n===i)return t;let l={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==B(n)||Y(i))&&(l=ne(n)),M(n))){const e=ee(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:V,getDimensions:se,getOffsetParent:ae,getDocumentElement:te,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:oe(t,ae(n),r),floating:{...se(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===H(e).direction},de=(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}=k(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:g,reset:w}=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],...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&&(c=!0===w.rects?await l.getElementRects({reference:e,floating:t,strategy:o}):w.rects),({x:u,y:f}=k(c,p,s))),n=-1)}return{x:u,y:f,placement:p,strategy:o,middlewareData:d}})(e,t,{platform:pe,...n}),ye=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=[F(Number(o)),D(),(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 O(e,s),f=_(x(r)),p="x"===f?"y":"x";let d=c[f],y=c[p];if(o){const e="y"===f?"bottom":"right";d=P(d+u["y"===f?"top":"left"],d,d-u[e])}if(i){const e="y"===p?"bottom":"right";y=P(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=T(r),u={x:o,y:i},f=_(l),p=S(l),d=R(f),y=await s.getDimensions(n),m="y"===f?"top":"left",h="y"===f?"bottom":"right",v=a.reference[d]+a.reference[f]-u[f]-a.floating[d],g=u[f]-a.reference[f],w=await(null==s.getOffsetParent?void 0:s.getOffsetParent(n));let b=w?"y"===f?w.clientHeight||0:w.clientWidth||0:0;0===b&&(b=a.floating[d]);const x=v/2-g/2,k=c[m],j=b-y[d]-c[h],O=b/2-y[d]/2+x,E=P(k,O,j),A=("start"===p?c[m]:c[h])>0&&O!==E&&a.reference[d]<=a.floating[d];return{[f]:u[f]-(A?O<k?k-O:j-O:0),data:{[f]:E,centerOffset:O-E}}}}))({element:n,padding:5})),de(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"}}}))):de(e,t,{placement:"bottom",strategy:i,middleware:l}).then((({x:e,y:t})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{}})))};var me={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 he=({id:e,className:t,classNameArrow:n,variant:o="dark",anchorId:i,place:l="top",offset:u=10,events:f=["hover"],positionStrategy:p="absolute",wrapper:h="div",children:v=null,delayShow:g=0,delayHide:b=0,float:x=!1,noArrow:S=!1,clickable:_=!1,style:R,position:k,isHtmlContent:T=!1,content:j,isOpen:O,setIsOpen:E})=>{const A=a(null),P=a(null),L=a(null),N=a(null),[C,$]=r({}),[D,F]=r({}),[W,I]=r(!1),[H,B]=r(!1),U=a(null),{anchorRefs:M,setActiveAnchor:V}=w()(e),[z,Y]=r({current:null}),q=a(!1),X=e=>{E?E(e):void 0===O&&I(e)},K=(e=b)=>{N.current&&clearTimeout(N.current),N.current=setTimeout((()=>{q.current||X(!1)}),e)},J=e=>{var t;if(!e)return;g?(L.current&&clearTimeout(L.current),L.current=setTimeout((()=>{X(!0)}),g)):X(!0);const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;Y((e=>e.current===n?e:{current:n})),V({current:n}),N.current&&clearTimeout(N.current)},Z=()=>{_?K(b||50):b?K():X(!1),L.current&&clearTimeout(L.current)},G=({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),ye({place:l,offset:u,elementReference:n,tooltipReference:A.current,tooltipArrowReference:P.current,strategy:p}).then((e=>{B(!1),Object.keys(e.tooltipStyles).length&&$(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&F(e.tooltipArrowStyles)}))},Q=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};G(n),U.current=n},ee=e=>{J(e),b&&K()},te=e=>{var t;(null===(t=z.current)||void 0===t?void 0:t.contains(e.target))||I(!1)},ne=y(J,50),re=y(Z,50);s((()=>{var e,t;const n=new Set(M),r=document.querySelector(`[id='${i}']`);if(r&&(Y((e=>e.current===r?e:{current:r})),n.add({current:r})),!n.size)return()=>null;const o=[];f.find((e=>"click"===e))&&(window.addEventListener("click",te),o.push({event:"click",listener:ee})),f.find((e=>"hover"===e))&&(o.push({event:"mouseenter",listener:ne},{event:"mouseleave",listener:re},{event:"focus",listener:ne},{event:"blur",listener:re}),x&&o.push({event:"mousemove",listener:Q}));const l=()=>{q.current=!0},a=()=>{q.current=!1,Z()};return _&&(null===(e=A.current)||void 0===e||e.addEventListener("mouseenter",l),null===(t=A.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",te),_&&(null===(e=A.current)||void 0===e||e.removeEventListener("mouseenter",l),null===(t=A.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)}))}))}}),[M,z,i,f,b,g]),s((()=>{if(k)return G(k),()=>null;if(x)return U.current&&G(U.current),()=>null;let e=z.current;i&&(e=document.querySelector(`[id='${i}']`)),B(!0);let t=!0;return ye({place:l,offset:u,elementReference:e,tooltipReference:A.current,tooltipArrowReference:P.current,strategy:p}).then((e=>{t&&(B(!1),Object.keys(e.tooltipStyles).length&&$(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&F(e.tooltipArrowStyles))})),()=>{t=!1}}),[W,O,i,z,j,l,u,p,k]),s((()=>()=>{L.current&&clearTimeout(L.current),N.current&&clearTimeout(N.current)}),[]);const oe=Boolean(j||v);return c.exports.jsxs(h,{id:e,role:"tooltip",className:d("react-tooltip",me.tooltip,me[o],t,{[me.show]:oe&&!H&&(O||W),[me.fixed]:"fixed"===p,[me.clickable]:_}),style:{...R,...C},ref:A,children:[v||(T?c.exports.jsx(m,{content:j}):j),c.exports.jsx("div",{className:d("react-tooltip-arrow",me.arrow,n,{[me["no-arrow"]]:S}),style:D,ref:P})]})},ve=({id:e,anchorId:t,content:n,html:o,className:i,classNameArrow:l,variant:a="dark",place:u="top",offset:f=10,wrapper:p="div",children:d=null,events:y=["hover"],positionStrategy:m="absolute",delayShow:h=0,delayHide:v=0,float:g=!1,noArrow:b=!1,clickable:x=!1,style:S,position:_,isOpen:R,setIsOpen:k})=>{const[T,j]=r(n||o),[O,E]=r(u),[A,P]=r(a),[L,N]=r(f),[C,$]=r(h),[D,F]=r(v),[W,I]=r(g),[H,B]=r(p),[U,M]=r(y),[V,z]=r(m),[Y,q]=r(Boolean(o)),{anchorRefs:X,activeAnchor:K}=w()(e),J=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}),{}),Z=e=>{const t={place:e=>{var t;E(null!==(t=e)&&void 0!==t?t:u)},content:e=>{j(null!=e?e:n)},html:e=>{var t;q(Boolean(null!=e?e:o)),j(null!==(t=null!=e?e:o)&&void 0!==t?t:n)},variant:e=>{var t;P(null!==(t=e)&&void 0!==t?t:a)},offset:e=>{N(null===e?f:Number(e))},wrapper:e=>{var t;B(null!==(t=e)&&void 0!==t?t:"div")},events:e=>{const t=null==e?void 0:e.split(" ");M(null!=t?t:y)},"position-strategy":e=>{var t;z(null!==(t=e)&&void 0!==t?t:m)},"delay-show":e=>{$(null===e?h:Number(e))},"delay-hide":e=>{F(null===e?v:Number(e))},float:e=>{I(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)}))};s((()=>{q(!1),j(n),o&&(q(!0),j(o))}),[n,o]),s((()=>{var e;const n=new Set(X),r=document.querySelector(`[id='${t}']`);if(r&&n.add({current:r}),!n.size)return()=>null;const o=new MutationObserver((e=>{e.forEach((e=>{var t;if(!K.current||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=J(K.current);Z(n)}))})),i={attributes:!0,childList:!1,subtree:!1},l=null!==(e=K.current)&&void 0!==e?e:r;if(l){const e=J(l);Z(e),o.observe(l,i)}return()=>{o.disconnect()}}),[X,K,t]);const G={id:e,anchorId:t,className:i,classNameArrow:l,content:T,isHtmlContent:Y,place:O,variant:A,offset:L,wrapper:H,events:U,positionStrategy:V,delayShow:C,delayHide:D,float:W,noArrow:b,clickable:x,style:S,position:_,isOpen:R,setIsOpen:k};return d?c.exports.jsx(he,{...G,children:d}):c.exports.jsx(he,{...G})};export{ve as Tooltip,g as TooltipProvider,b as TooltipWrapper};
|
|
6
|
+
*/f=p,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(" ")}f.exports?(t.default=t,f.exports=t):window.classNames=t}();var d=p.exports;const y=(e,t,n)=>{let r=null;return function(...o){r&&clearTimeout(r),r=setTimeout((()=>{r=null,n||e.apply(this,o)}),t)}},m=({content:e})=>s.exports.jsx("span",{dangerouslySetInnerHTML:{__html:e}}),h={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},v=t(Object.assign((()=>h),h)),g=({children:e})=>{const t=n(),[l,a]=r({[t]:new Set}),[c,u]=r({[t]:{current:null}}),f=(e,...t)=>{a((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)}}))},p=(e,...t)=>{a((n=>{const r=n[e];return r?(t.forEach((e=>r.delete(e))),{...n}):n}))},d=o((e=>{var n,r;return{anchorRefs:null!==(n=l[null!=e?e:t])&&void 0!==n?n:new Set,activeAnchor:null!==(r=c[null!=e?e:t])&&void 0!==r?r:{current:null},attach:(...n)=>f(null!=e?e:t,...n),detach:(...n)=>p(null!=e?e:t,...n),setActiveAnchor:n=>((e,t)=>{u((n=>{var r;return(null===(r=n[e])||void 0===r?void 0:r.current)===t.current?n:{...n,[e]:t}}))})(null!=e?e:t,n)}}),[t,l,c,f,p]),y=i((()=>{const e=d(t);return Object.assign((e=>d(e)),e)}),[d]);return s.exports.jsx(v.Provider,{value:y,children:e})};function w(){return l(v)}const b=({tooltipId:e,children:t,className:n,place:r,content:o,html:i,variant:l,offset:u,wrapper:f,events:p,positionStrategy:y,delayShow:m,delayHide:h})=>{const{attach:v,detach:g}=w()(e),b=a(null);return c((()=>(v(b),()=>{g(b)})),[]),s.exports.jsx("span",{ref:b,className:d("react-tooltip-wrapper",n),"data-tooltip-place":r,"data-tooltip-content":o,"data-tooltip-html":i,"data-tooltip-variant":l,"data-tooltip-offset":u,"data-tooltip-wrapper":f,"data-tooltip-events":p,"data-tooltip-position-strategy":y,"data-tooltip-delay-show":m,"data-tooltip-delay-hide":h,children:t})};function x(e){return e.split("-")[0]}function S(e){return e.split("-")[1]}function _(e){return["top","bottom"].includes(x(e))?"x":"y"}function R(e){return"y"===e?"height":"width"}function k(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=_(t),c=R(a),s=r[c]/2-o[c]/2,u="x"===a;let f;switch(x(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(S(t)){case"start":f[a]-=s*(n&&u?-1:1);break;case"end":f[a]+=s*(n&&u?-1:1)}return f}function T(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 j(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function O(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=T(d),m=a[p?"floating"===f?"reference":"floating":f],h=j(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=j(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:c}):l[f]);return{top:h.top-v.top+y.top,bottom:v.bottom-h.bottom+y.bottom,left:h.left-v.left+y.left,right:v.right-h.right+y.right}}const E=Math.min,A=Math.max;function P(e,t,n){return A(e,E(t,n))}const L={left:"right",right:"left",bottom:"top",top:"bottom"};function N(e){return e.replace(/left|right|bottom|top/g,(e=>L[e]))}const $={start:"end",end:"start"};function C(e){return e.replace(/start|end/g,(e=>$[e]))}const D=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",flipAlignment:d=!0,...y}=e,m=x(r),h=f||(m===l||!d?[N(l)]:function(e){const t=N(e);return[C(e),t,C(t)]}(l)),v=[l,...h],g=await O(t,y),w=[];let b=(null==(n=o.flip)?void 0:n.overflows)||[];if(s&&w.push(g[m]),u){const{main:e,cross:t}=function(e,t,n){void 0===n&&(n=!1);const r=S(e),o=_(e),i=R(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,await(null==a.isRTL?void 0:a.isRTL(c.floating)));w.push(g[e],g[t])}if(b=[...b,{placement:r,overflows:w}],!w.every((e=>e<=0))){var k,T;const e=(null!=(k=null==(T=o.flip)?void 0:T.index)?k:0)+1,t=v[e];if(t)return{data:{index:e,overflows:b},reset:{placement:t}};let n="bottom";switch(p){case"bestFit":{var j;const e=null==(j=b.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:j[0].placement;e&&(n=e);break}case"initialPlacement":n=l}if(r!==n)return{reset:{placement:n}}}return{}}}};const F=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=x(n),a=S(n),c="x"===_(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}}}};function W(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function I(e){if(null==e)return window;if(!W(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function H(e){return I(e).getComputedStyle(e)}function B(e){return W(e)?"":e?(e.nodeName||"").toLowerCase():""}function U(){const e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((e=>e.brand+"/"+e.version)).join(" "):navigator.userAgent}function M(e){return e instanceof I(e).HTMLElement}function V(e){return e instanceof I(e).Element}function z(e){if("undefined"==typeof ShadowRoot)return!1;return e instanceof I(e).ShadowRoot||e instanceof ShadowRoot}function Y(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=H(e);return/auto|scroll|overlay|hidden/.test(t+r+n)&&!["inline","contents"].includes(o)}function q(e){return["table","td","th"].includes(B(e))}function X(e){const t=/firefox/i.test(U()),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 K(){return!/^((?!chrome|android).)*safari/i.test(U())}function J(e){return["html","body","#document"].includes(B(e))}const Z=Math.min,G=Math.max,Q=Math.round;function ee(e,t,n){var r,o,i,l;void 0===t&&(t=!1),void 0===n&&(n=!1);const a=e.getBoundingClientRect();let c=1,s=1;t&&M(e)&&(c=e.offsetWidth>0&&Q(a.width)/e.offsetWidth||1,s=e.offsetHeight>0&&Q(a.height)/e.offsetHeight||1);const u=V(e)?I(e):window,f=!K()&&n,p=(a.left+(f&&null!=(r=null==(o=u.visualViewport)?void 0:o.offsetLeft)?r:0))/c,d=(a.top+(f&&null!=(i=null==(l=u.visualViewport)?void 0:l.offsetTop)?i:0))/s,y=a.width/c,m=a.height/s;return{width:y,height:m,top:d,right:p+y,bottom:d+m,left:p,x:p,y:d}}function te(e){return(t=e,(t instanceof I(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function ne(e){return V(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function re(e){return ee(te(e)).left+ne(e).scrollLeft}function oe(e,t,n){const r=M(t),o=te(t),i=ee(e,r&&function(e){const t=ee(e);return Q(t.width)!==e.offsetWidth||Q(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"!==B(t)||Y(o))&&(l=ne(t)),M(t)){const e=ee(t,!0);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&(a.x=re(o));return{x:i.left+l.scrollLeft-a.x,y:i.top+l.scrollTop-a.y,width:i.width,height:i.height}}function ie(e){if("html"===B(e))return e;const t=e.assignedSlot||e.parentNode||(z(e)?e.host:null)||te(e);return z(t)?t.host:t}function le(e){return M(e)&&"fixed"!==H(e).position?e.offsetParent:null}function ae(e){const t=I(e);let n=le(e);for(;n&&q(n)&&"static"===H(n).position;)n=le(n);return n&&("html"===B(n)||"body"===B(n)&&"static"===H(n).position&&!X(n))?t:n||function(e){let t=ie(e);for(;M(t)&&!J(t);){if(X(t))return t;t=ie(t)}return null}(e)||t}function ce(e){if(M(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=ee(e);return{width:t.width,height:t.height}}function se(e){const t=ie(e);return J(t)?e.ownerDocument.body:M(t)&&Y(t)?t:se(t)}function ue(e,t){var n;void 0===t&&(t=[]);const r=se(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=I(r),l=o?[i].concat(i.visualViewport||[],Y(r)?r:[]):r,a=t.concat(l);return o?a:a.concat(ue(l))}function fe(e,t,n){return"viewport"===t?j(function(e,t){const n=I(e),r=te(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=K();(e||!e&&"fixed"===t)&&(a=o.offsetLeft,c=o.offsetTop)}return{width:i,height:l,x:a,y:c}}(e,n)):V(t)?function(e,t){const n=ee(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):j(function(e){var t;const n=te(e),r=ne(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=G(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),l=G(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0);let a=-r.scrollLeft+re(e);const c=-r.scrollTop;return"rtl"===H(o||n).direction&&(a+=G(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:l,x:a,y:c}}(te(e)))}const pe={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?function(e){let t=ue(e).filter((e=>V(e)&&"body"!==B(e))),n=e,r=null;for(;V(n)&&!J(n);){const e=H(n);"static"===e.position&&r&&["absolute","fixed"].includes(r.position)&&!X(n)?t=t.filter((e=>e!==n)):r=e,n=ie(n)}return t}(t):[].concat(n),l=[...i,r],a=l[0],c=l.reduce(((e,n)=>{const r=fe(t,n,o);return e.top=G(r.top,e.top),e.right=Z(r.right,e.right),e.bottom=Z(r.bottom,e.bottom),e.left=G(r.left,e.left),e}),fe(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=M(n),i=te(n);if(n===i)return t;let l={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==B(n)||Y(i))&&(l=ne(n)),M(n))){const e=ee(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:V,getDimensions:ce,getOffsetParent:ae,getDocumentElement:te,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:oe(t,ae(n),r),floating:{...ce(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===H(e).direction},de=(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 s=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=k(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}=k(s,p,c))),n=-1)}return{x:u,y:f,placement:p,strategy:o,middlewareData:d}})(e,t,{platform:pe,...n}),ye=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=[F(Number(o)),D(),(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}}},...c}=a,s={x:t,y:n},u=await O(e,c),f=_(x(r)),p="x"===f?"y":"x";let d=s[f],y=s[p];if(o){const e="y"===f?"bottom":"right";d=P(d+u["y"===f?"top":"left"],d,d-u[e])}if(i){const e="y"===p?"bottom":"right";y=P(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:c}=t;if(null==n)return console.warn("Floating UI: No `element` was passed to the `arrow` middleware."),{};const s=T(r),u={x:o,y:i},f=_(l),p=S(l),d=R(f),y=await c.getDimensions(n),m="y"===f?"top":"left",h="y"===f?"bottom":"right",v=a.reference[d]+a.reference[f]-u[f]-a.floating[d],g=u[f]-a.reference[f],w=await(null==c.getOffsetParent?void 0:c.getOffsetParent(n));let b=w?"y"===f?w.clientHeight||0:w.clientWidth||0:0;0===b&&(b=a.floating[d]);const x=v/2-g/2,k=s[m],j=b-y[d]-s[h],O=b/2-y[d]/2+x,E=P(k,O,j),A=("start"===p?s[m]:s[h])>0&&O!==E&&a.reference[d]<=a.floating[d];return{[f]:u[f]-(A?O<k?k-O:j-O:0),data:{[f]:E,centerOffset:O-E}}}}))({element:n,padding:5})),de(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: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"}}}))):de(e,t,{placement:"bottom",strategy:i,middleware:l}).then((({x:e,y:t})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{}})))};var me={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 he=({id:e,className:t,classNameArrow:n,variant:o="dark",anchorId:i,place:l="top",offset:u=10,events:f=["hover"],positionStrategy:p="absolute",wrapper:h="div",children:v=null,delayShow:g=0,delayHide:b=0,float:x=!1,noArrow:S=!1,clickable:_=!1,style:R,position:k,afterShow:T,afterHide:j,content:O,html:E,isOpen:A,setIsOpen:P})=>{const L=a(null),N=a(null),$=a(null),C=a(null),[D,F]=r({}),[W,I]=r({}),[H,B]=r(!1),U=a(!1),[M,V]=r(!1),z=a(null),{anchorRefs:Y,setActiveAnchor:q}=w()(e),[X,K]=r({current:null}),J=a(!1),Z=e=>{P?P(e):void 0===A&&B(e)};c((()=>{H!==U.current&&(U.current=H,H?null==T||T():null==j||j())}),[H]);const G=(e=b)=>{C.current&&clearTimeout(C.current),C.current=setTimeout((()=>{J.current||Z(!1)}),e)},Q=e=>{var t;if(!e)return;g?($.current&&clearTimeout($.current),$.current=setTimeout((()=>{Z(!0)}),g)):Z(!0);const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;K((e=>e.current===n?e:{current:n})),q({current:n}),C.current&&clearTimeout(C.current)},ee=()=>{_?G(b||50):b?G():Z(!1),$.current&&clearTimeout($.current)},te=({x:e,y:t})=>{const n={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};V(!0),ye({place:l,offset:u,elementReference:n,tooltipReference:L.current,tooltipArrowReference:N.current,strategy:p}).then((e=>{V(!1),Object.keys(e.tooltipStyles).length&&F(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&I(e.tooltipArrowStyles)}))},ne=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};te(n),z.current=n},re=e=>{Q(e),b&&G()},oe=e=>{var t;(null===(t=X.current)||void 0===t?void 0:t.contains(e.target))||Z(!1)},ie=y(Q,50),le=y(ee,50);c((()=>{var e,t;const n=new Set(Y),r=document.querySelector(`[id='${i}']`);if(r&&(K((e=>e.current===r?e:{current:r})),n.add({current:r})),!n.size)return()=>null;const o=[];f.find((e=>"click"===e))&&(window.addEventListener("click",oe),o.push({event:"click",listener:re})),f.find((e=>"hover"===e))&&(o.push({event:"mouseenter",listener:ie},{event:"mouseleave",listener:le},{event:"focus",listener:ie},{event:"blur",listener:le}),x&&o.push({event:"mousemove",listener:ne}));const l=()=>{J.current=!0},a=()=>{J.current=!1,ee()};return _&&(null===(e=L.current)||void 0===e||e.addEventListener("mouseenter",l),null===(t=L.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",oe),_&&(null===(e=L.current)||void 0===e||e.removeEventListener("mouseenter",l),null===(t=L.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,X,i,f,b,g]),c((()=>{if(k)return te(k),()=>null;if(x)return z.current&&te(z.current),()=>null;let e=X.current;i&&(e=document.querySelector(`[id='${i}']`)),V(!0);let t=!0;return ye({place:l,offset:u,elementReference:e,tooltipReference:L.current,tooltipArrowReference:N.current,strategy:p}).then((e=>{t&&(V(!1),Object.keys(e.tooltipStyles).length&&F(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&I(e.tooltipArrowStyles))})),()=>{t=!1}}),[H,A,i,X,O,E,l,u,p,k]),c((()=>()=>{$.current&&clearTimeout($.current),C.current&&clearTimeout(C.current)}),[]);const ae=Boolean(E||O||v);return s.exports.jsxs(h,{id:e,role:"tooltip",className:d("react-tooltip",me.tooltip,me[o],t,{[me.show]:ae&&!M&&(A||H),[me.fixed]:"fixed"===p,[me.clickable]:_}),style:{...R,...D},ref:L,children:[v||E&&s.exports.jsx(m,{content:E})||O,s.exports.jsx("div",{className:d("react-tooltip-arrow",me.arrow,n,{[me["no-arrow"]]:S}),style:W,ref:N})]})},ve=({id:e,anchorId:t,content:n,html:o,className:i,classNameArrow:l,variant:a="dark",place:u="top",offset:f=10,wrapper:p="div",children:d=null,events:y=["hover"],positionStrategy:m="absolute",delayShow:h=0,delayHide:v=0,float:g=!1,noArrow:b=!1,clickable:x=!1,style:S,position:_,isOpen:R,setIsOpen:k,afterShow:T,afterHide:j})=>{const[O,E]=r(n),[A,P]=r(o),[L,N]=r(u),[$,C]=r(a),[D,F]=r(f),[W,I]=r(h),[H,B]=r(v),[U,M]=r(g),[V,z]=r(p),[Y,q]=r(y),[X,K]=r(m),{anchorRefs:J,activeAnchor:Z}=w()(e),G=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}),{}),Q=e=>{const t={place:e=>{var t;N(null!==(t=e)&&void 0!==t?t:u)},content:e=>{E(null!=e?e:n)},html:e=>{P(null!=e?e:o)},variant:e=>{var t;C(null!==(t=e)&&void 0!==t?t:a)},offset:e=>{F(null===e?f:Number(e))},wrapper:e=>{var t;z(null!==(t=e)&&void 0!==t?t:"div")},events:e=>{const t=null==e?void 0:e.split(" ");q(null!=t?t:y)},"position-strategy":e=>{var t;K(null!==(t=e)&&void 0!==t?t:m)},"delay-show":e=>{I(null===e?h:Number(e))},"delay-hide":e=>{B(null===e?v:Number(e))},float:e=>{M(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)}))};c((()=>{E(n)}),[n]),c((()=>{P(o)}),[o]),c((()=>{var e;const n=new Set(J),r=document.querySelector(`[id='${t}']`);if(r&&n.add({current:r}),!n.size)return()=>null;const o=null!==(e=Z.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=G(o);Q(n)}))})),l={attributes:!0,childList:!1,subtree:!1};if(o){const e=G(o);Q(e),i.observe(o,l)}return()=>{i.disconnect()}}),[J,Z,t]);const ee={id:e,anchorId:t,className:i,classNameArrow:l,content:O,html:A,place:L,variant:$,offset:D,wrapper:V,events:Y,positionStrategy:X,delayShow:W,delayHide:H,float:U,noArrow:b,clickable:x,style:S,position:_,isOpen:R,setIsOpen:k,afterShow:T,afterHide:j};return d?s.exports.jsx(he,{...ee,children:d}):s.exports.jsx(he,{...ee})};export{ve as Tooltip,g as TooltipProvider,b as TooltipWrapper};
|
|
@@ -2750,9 +2750,9 @@
|
|
|
2750
2750
|
|
|
2751
2751
|
const Tooltip = ({
|
|
2752
2752
|
// props
|
|
2753
|
-
id, className, classNameArrow, variant = 'dark', anchorId, place = 'top', offset = 10, events = ['hover'], positionStrategy = 'absolute', wrapper: WrapperElement = 'div', children = null, delayShow = 0, delayHide = 0, float = false, noArrow = false, clickable = false, style: externalStyles, position,
|
|
2753
|
+
id, className, classNameArrow, variant = 'dark', anchorId, place = 'top', offset = 10, events = ['hover'], positionStrategy = 'absolute', wrapper: WrapperElement = 'div', children = null, delayShow = 0, delayHide = 0, float = false, noArrow = false, clickable = false, style: externalStyles, position, afterShow, afterHide,
|
|
2754
2754
|
// props handled by controller
|
|
2755
|
-
|
|
2755
|
+
content, html, isOpen, setIsOpen, }) => {
|
|
2756
2756
|
const tooltipRef = require$$0.useRef(null);
|
|
2757
2757
|
const tooltipArrowRef = require$$0.useRef(null);
|
|
2758
2758
|
const tooltipShowDelayTimerRef = require$$0.useRef(null);
|
|
@@ -2760,6 +2760,7 @@
|
|
|
2760
2760
|
const [inlineStyles, setInlineStyles] = require$$0.useState({});
|
|
2761
2761
|
const [inlineArrowStyles, setInlineArrowStyles] = require$$0.useState({});
|
|
2762
2762
|
const [show, setShow] = require$$0.useState(false);
|
|
2763
|
+
const wasShowing = require$$0.useRef(false);
|
|
2763
2764
|
const [calculatingPosition, setCalculatingPosition] = require$$0.useState(false);
|
|
2764
2765
|
const lastFloatPosition = require$$0.useRef(null);
|
|
2765
2766
|
const { anchorRefs, setActiveAnchor: setProviderActiveAnchor } = useTooltip()(id);
|
|
@@ -2773,6 +2774,18 @@
|
|
|
2773
2774
|
setShow(value);
|
|
2774
2775
|
}
|
|
2775
2776
|
};
|
|
2777
|
+
require$$0.useEffect(() => {
|
|
2778
|
+
if (show === wasShowing.current) {
|
|
2779
|
+
return;
|
|
2780
|
+
}
|
|
2781
|
+
wasShowing.current = show;
|
|
2782
|
+
if (show) {
|
|
2783
|
+
afterShow === null || afterShow === void 0 ? void 0 : afterShow();
|
|
2784
|
+
}
|
|
2785
|
+
else {
|
|
2786
|
+
afterHide === null || afterHide === void 0 ? void 0 : afterHide();
|
|
2787
|
+
}
|
|
2788
|
+
}, [show]);
|
|
2776
2789
|
const handleShowTooltipDelayed = () => {
|
|
2777
2790
|
if (tooltipShowDelayTimerRef.current) {
|
|
2778
2791
|
clearTimeout(tooltipShowDelayTimerRef.current);
|
|
@@ -2881,7 +2894,7 @@
|
|
|
2881
2894
|
if ((_a = activeAnchor.current) === null || _a === void 0 ? void 0 : _a.contains(event.target)) {
|
|
2882
2895
|
return;
|
|
2883
2896
|
}
|
|
2884
|
-
|
|
2897
|
+
handleShow(false);
|
|
2885
2898
|
};
|
|
2886
2899
|
// debounce handler to prevent call twice when
|
|
2887
2900
|
// mouse enter and focus events being triggered toggether
|
|
@@ -2994,7 +3007,18 @@
|
|
|
2994
3007
|
return () => {
|
|
2995
3008
|
mounted = false;
|
|
2996
3009
|
};
|
|
2997
|
-
}, [
|
|
3010
|
+
}, [
|
|
3011
|
+
show,
|
|
3012
|
+
isOpen,
|
|
3013
|
+
anchorId,
|
|
3014
|
+
activeAnchor,
|
|
3015
|
+
content,
|
|
3016
|
+
html,
|
|
3017
|
+
place,
|
|
3018
|
+
offset,
|
|
3019
|
+
positionStrategy,
|
|
3020
|
+
position,
|
|
3021
|
+
]);
|
|
2998
3022
|
require$$0.useEffect(() => {
|
|
2999
3023
|
return () => {
|
|
3000
3024
|
if (tooltipShowDelayTimerRef.current) {
|
|
@@ -3005,18 +3029,19 @@
|
|
|
3005
3029
|
}
|
|
3006
3030
|
};
|
|
3007
3031
|
}, []);
|
|
3008
|
-
const hasContentOrChildren = Boolean(content || children);
|
|
3032
|
+
const hasContentOrChildren = Boolean(html || content || children);
|
|
3009
3033
|
return (jsxRuntime.exports.jsxs(WrapperElement, { id: id, role: "tooltip", className: classNames('react-tooltip', styles['tooltip'], styles[variant], className, {
|
|
3010
3034
|
[styles['show']]: hasContentOrChildren && !calculatingPosition && (isOpen || show),
|
|
3011
3035
|
[styles['fixed']]: positionStrategy === 'fixed',
|
|
3012
3036
|
[styles['clickable']]: clickable,
|
|
3013
|
-
}), style: { ...externalStyles, ...inlineStyles }, ref: tooltipRef, children: [children || (
|
|
3037
|
+
}), style: { ...externalStyles, ...inlineStyles }, ref: tooltipRef, children: [children || (html && jsxRuntime.exports.jsx(TooltipContent, { content: html })) || content, jsxRuntime.exports.jsx("div", { className: classNames('react-tooltip-arrow', styles['arrow'], classNameArrow, {
|
|
3014
3038
|
[styles['no-arrow']]: noArrow,
|
|
3015
3039
|
}), style: inlineArrowStyles, ref: tooltipArrowRef })] }));
|
|
3016
3040
|
};
|
|
3017
3041
|
|
|
3018
|
-
const TooltipController = ({ id, anchorId, content, html, className, classNameArrow, variant = 'dark', place = 'top', offset = 10, wrapper = 'div', children = null, events = ['hover'], positionStrategy = 'absolute', delayShow = 0, delayHide = 0, float = false, noArrow = false, clickable = false, style, position, isOpen, setIsOpen, }) => {
|
|
3019
|
-
const [tooltipContent, setTooltipContent] = require$$0.useState(content
|
|
3042
|
+
const TooltipController = ({ id, anchorId, content, html, className, classNameArrow, variant = 'dark', place = 'top', offset = 10, wrapper = 'div', children = null, events = ['hover'], positionStrategy = 'absolute', delayShow = 0, delayHide = 0, float = false, noArrow = false, clickable = false, style, position, isOpen, setIsOpen, afterShow, afterHide, }) => {
|
|
3043
|
+
const [tooltipContent, setTooltipContent] = require$$0.useState(content);
|
|
3044
|
+
const [tooltipHtml, setTooltipHtml] = require$$0.useState(html);
|
|
3020
3045
|
const [tooltipPlace, setTooltipPlace] = require$$0.useState(place);
|
|
3021
3046
|
const [tooltipVariant, setTooltipVariant] = require$$0.useState(variant);
|
|
3022
3047
|
const [tooltipOffset, setTooltipOffset] = require$$0.useState(offset);
|
|
@@ -3026,7 +3051,6 @@
|
|
|
3026
3051
|
const [tooltipWrapper, setTooltipWrapper] = require$$0.useState(wrapper);
|
|
3027
3052
|
const [tooltipEvents, setTooltipEvents] = require$$0.useState(events);
|
|
3028
3053
|
const [tooltipPositionStrategy, setTooltipPositionStrategy] = require$$0.useState(positionStrategy);
|
|
3029
|
-
const [isHtmlContent, setIsHtmlContent] = require$$0.useState(Boolean(html));
|
|
3030
3054
|
const { anchorRefs, activeAnchor } = useTooltip()(id);
|
|
3031
3055
|
const getDataAttributesFromAnchorElement = (elementReference) => {
|
|
3032
3056
|
const dataAttributes = elementReference === null || elementReference === void 0 ? void 0 : elementReference.getAttributeNames().reduce((acc, name) => {
|
|
@@ -3049,9 +3073,7 @@
|
|
|
3049
3073
|
setTooltipContent(value !== null && value !== void 0 ? value : content);
|
|
3050
3074
|
},
|
|
3051
3075
|
html: (value) => {
|
|
3052
|
-
|
|
3053
|
-
setIsHtmlContent(Boolean(value !== null && value !== void 0 ? value : html));
|
|
3054
|
-
setTooltipContent((_a = value !== null && value !== void 0 ? value : html) !== null && _a !== void 0 ? _a : content);
|
|
3076
|
+
setTooltipHtml(value !== null && value !== void 0 ? value : html);
|
|
3055
3077
|
},
|
|
3056
3078
|
variant: (value) => {
|
|
3057
3079
|
var _a;
|
|
@@ -3091,14 +3113,11 @@
|
|
|
3091
3113
|
});
|
|
3092
3114
|
};
|
|
3093
3115
|
require$$0.useEffect(() => {
|
|
3094
|
-
setIsHtmlContent(false);
|
|
3095
3116
|
setTooltipContent(content);
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
}
|
|
3101
|
-
}, [content, html]);
|
|
3117
|
+
}, [content]);
|
|
3118
|
+
require$$0.useEffect(() => {
|
|
3119
|
+
setTooltipHtml(html);
|
|
3120
|
+
}, [html]);
|
|
3102
3121
|
require$$0.useEffect(() => {
|
|
3103
3122
|
var _a;
|
|
3104
3123
|
const elementRefs = new Set(anchorRefs);
|
|
@@ -3109,16 +3128,17 @@
|
|
|
3109
3128
|
if (!elementRefs.size) {
|
|
3110
3129
|
return () => null;
|
|
3111
3130
|
}
|
|
3131
|
+
const anchorElement = (_a = activeAnchor.current) !== null && _a !== void 0 ? _a : anchorById;
|
|
3112
3132
|
const observerCallback = (mutationList) => {
|
|
3113
3133
|
mutationList.forEach((mutation) => {
|
|
3114
3134
|
var _a;
|
|
3115
|
-
if (!
|
|
3135
|
+
if (!anchorElement ||
|
|
3116
3136
|
mutation.type !== 'attributes' ||
|
|
3117
3137
|
!((_a = mutation.attributeName) === null || _a === void 0 ? void 0 : _a.startsWith('data-tooltip-'))) {
|
|
3118
3138
|
return;
|
|
3119
3139
|
}
|
|
3120
3140
|
// make sure to get all set attributes, since all unset attributes are reset
|
|
3121
|
-
const dataAttributes = getDataAttributesFromAnchorElement(
|
|
3141
|
+
const dataAttributes = getDataAttributesFromAnchorElement(anchorElement);
|
|
3122
3142
|
applyAllDataAttributesFromAnchorElement(dataAttributes);
|
|
3123
3143
|
});
|
|
3124
3144
|
};
|
|
@@ -3127,12 +3147,11 @@
|
|
|
3127
3147
|
// do not check for subtree and childrens, we only want to know attribute changes
|
|
3128
3148
|
// to stay watching `data-attributes-*` from anchor element
|
|
3129
3149
|
const observerConfig = { attributes: true, childList: false, subtree: false };
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
const dataAttributes = getDataAttributesFromAnchorElement(element);
|
|
3150
|
+
if (anchorElement) {
|
|
3151
|
+
const dataAttributes = getDataAttributesFromAnchorElement(anchorElement);
|
|
3133
3152
|
applyAllDataAttributesFromAnchorElement(dataAttributes);
|
|
3134
3153
|
// Start observing the target node for configured mutations
|
|
3135
|
-
observer.observe(
|
|
3154
|
+
observer.observe(anchorElement, observerConfig);
|
|
3136
3155
|
}
|
|
3137
3156
|
return () => {
|
|
3138
3157
|
// Remove the observer when the tooltip is destroyed
|
|
@@ -3145,7 +3164,7 @@
|
|
|
3145
3164
|
className,
|
|
3146
3165
|
classNameArrow,
|
|
3147
3166
|
content: tooltipContent,
|
|
3148
|
-
|
|
3167
|
+
html: tooltipHtml,
|
|
3149
3168
|
place: tooltipPlace,
|
|
3150
3169
|
variant: tooltipVariant,
|
|
3151
3170
|
offset: tooltipOffset,
|
|
@@ -3161,6 +3180,8 @@
|
|
|
3161
3180
|
position,
|
|
3162
3181
|
isOpen,
|
|
3163
3182
|
setIsOpen,
|
|
3183
|
+
afterShow,
|
|
3184
|
+
afterHide,
|
|
3164
3185
|
};
|
|
3165
3186
|
return children ? jsxRuntime.exports.jsx(Tooltip, { ...props, children: children }) : jsxRuntime.exports.jsx(Tooltip, { ...props });
|
|
3166
3187
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
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={};!function(){var e=r.default,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),h=Symbol.iterator;var v=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function g(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];w("error",e,n)}function w(e,t,n){var r=v.ReactDebugCurrentFrame.getStackAddendum();""!==r&&(t+="%s",n=n.concat([r]));var o=n.map((function(e){return String(e)}));o.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,o)}var b;function x(e){return e.displayName||"Context"}function S(e){if(null==e)return null;if("number"==typeof e.tag&&g("Received an unexpected object in getComponentNameFromType(). 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 o:return"Fragment";case n:return"Portal";case a:return"Profiler";case l:return"StrictMode";case f:return"Suspense";case p:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case c:return x(e)+".Consumer";case s:return x(e._context)+".Provider";case u:return function(e,t,n){var r=e.displayName;if(r)return r;var o=t.displayName||t.name||"";return""!==o?n+"("+o+")":n}(e,e.render,"ForwardRef");case d:var t=e.displayName||null;return null!==t?t:S(e.type)||"Memo";case y:var r=e,i=r._payload,m=r._init;try{return S(m(i))}catch(e){return null}}return null}b=Symbol.for("react.module.reference");var R,_,k,T,j,E,O,A=Object.assign,P=0;function L(){}L.__reactDisabledLog=!0;var N,C=v.ReactCurrentDispatcher;function $(e,t,n){if(void 0===N)try{throw Error()}catch(e){var r=e.stack.trim().match(/\n( *(at )?)/);N=r&&r[1]||""}return"\n"+N+e}var D,W=!1,F="function"==typeof WeakMap?WeakMap:Map;function I(e,t){if(!e||W)return"";var n,r=D.get(e);if(void 0!==r)return r;W=!0;var o,i=Error.prepareStackTrace;Error.prepareStackTrace=void 0,o=C.current,C.current=null,function(){if(0===P){R=console.log,_=console.info,k=console.warn,T=console.error,j=console.group,E=console.groupCollapsed,O=console.groupEnd;var e={configurable:!0,enumerable:!0,value:L,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}P++}();try{if(t){var l=function(){throw Error()};if(Object.defineProperty(l.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(l,[])}catch(e){n=e}Reflect.construct(e,[],l)}else{try{l.call()}catch(e){n=e}e.call(l.prototype)}}else{try{throw Error()}catch(e){n=e}e()}}catch(t){if(t&&n&&"string"==typeof t.stack){for(var a=t.stack.split("\n"),s=n.stack.split("\n"),c=a.length-1,u=s.length-1;c>=1&&u>=0&&a[c]!==s[u];)u--;for(;c>=1&&u>=0;c--,u--)if(a[c]!==s[u]){if(1!==c||1!==u)do{if(c--,--u<0||a[c]!==s[u]){var f="\n"+a[c].replace(" at new "," at ");return e.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",e.displayName)),"function"==typeof e&&D.set(e,f),f}}while(c>=1&&u>=0);break}}}finally{W=!1,C.current=o,function(){if(0==--P){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:A({},e,{value:R}),info:A({},e,{value:_}),warn:A({},e,{value:k}),error:A({},e,{value:T}),group:A({},e,{value:j}),groupCollapsed:A({},e,{value:E}),groupEnd:A({},e,{value:O})})}P<0&&g("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=i}var p=e?e.displayName||e.name:"",d=p?$(p):"";return"function"==typeof e&&D.set(e,d),d}function H(e,t,n){if(null==e)return"";if("function"==typeof e)return I(e,!(!(r=e.prototype)||!r.isReactComponent));var r;if("string"==typeof e)return $(e);switch(e){case f:return $("Suspense");case p:return $("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case u:return I(e.render,!1);case d:return H(e.type,t,n);case y:var o=e,i=o._payload,l=o._init;try{return H(l(i),t,n)}catch(e){}}return""}D=new F;var B=Object.prototype.hasOwnProperty,M={},U=v.ReactDebugCurrentFrame;function V(e){if(e){var t=e._owner,n=H(e.type,e._source,t?t.type:null);U.setExtraStackFrame(n)}else U.setExtraStackFrame(null)}var z=Array.isArray;function Y(e){return z(e)}function q(e){return""+e}function X(e){if(function(e){try{return q(e),!1}catch(e){return!0}}(e))return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",function(e){return"function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}(e)),q(e)}var K,J,Z,G=v.ReactCurrentOwner,Q={key:!0,ref:!0,__self:!0,__source:!0};Z={};function ee(e,n,r,o,i){var l,a={},s=null,c=null;for(l in void 0!==r&&(X(r),s=""+r),function(e){if(B.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(n)&&(X(n.key),s=""+n.key),function(e){if(B.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}(n)&&(c=n.ref,function(e,t){if("string"==typeof e.ref&&G.current&&t&&G.current.stateNode!==t){var n=S(G.current.type);Z[n]||(g('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',S(G.current.type),e.ref),Z[n]=!0)}}(n,i)),n)B.call(n,l)&&!Q.hasOwnProperty(l)&&(a[l]=n[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,g("%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,g("%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,n,r,o,i,l,a){var s={$$typeof:t,type:e,key:n,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,G.current,a)}var te,ne=v.ReactCurrentOwner,re=v.ReactDebugCurrentFrame;function oe(e){if(e){var t=e._owner,n=H(e.type,e._source,t?t.type:null);re.setExtraStackFrame(n)}else re.setExtraStackFrame(null)}function ie(e){return"object"==typeof e&&null!==e&&e.$$typeof===t}function le(){if(ne.current){var e=S(ne.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}te=!1;var ae={};function se(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var t=le();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(!ae[n]){ae[n]=!0;var r="";e&&e._owner&&e._owner!==ne.current&&(r=" It was passed a child from "+S(e._owner.type)+"."),oe(e),g('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),oe(null)}}}function ce(e,t){if("object"==typeof e)if(Y(e))for(var n=0;n<e.length;n++){var r=e[n];ie(r)&&se(r,t)}else if(ie(e))e._store&&(e._store.validated=!0);else if(e){var o=function(e){if(null===e||"object"!=typeof e)return null;var t=h&&e[h]||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;)ie(i.value)&&se(i.value,t)}}function ue(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!==u&&n.$$typeof!==d)return;t=n.propTypes}if(t){var r=S(n);!function(e,t,n,r,o){var i=Function.call.bind(B);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||(V(o),g("%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),V(null)),a instanceof Error&&!(a.message in M)&&(M[a.message]=!0,V(o),g("Failed %s type: %s",n,a.message),V(null))}}(t,e.props,"prop",r,e)}else if(void 0!==n.PropTypes&&!te){te=!0,g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",S(n)||"Unknown")}"function"!=typeof n.getDefaultProps||n.getDefaultProps.isReactClassApproved||g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function fe(e,n,r,i,h,v){var w=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===a||e===l||e===f||e===p||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===d||e.$$typeof===s||e.$$typeof===c||e.$$typeof===u||e.$$typeof===b||void 0!==e.getModuleId)}(e);if(!w){var x="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(x+=" 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 R,_=function(e){return void 0!==e?"\n\nCheck your code at "+e.fileName.replace(/^.*[\\\/]/,"")+":"+e.lineNumber+".":""}(h);x+=_||le(),null===e?R="null":Y(e)?R="array":void 0!==e&&e.$$typeof===t?(R="<"+(S(e.type)||"Unknown")+" />",x=" Did you accidentally export a JSX literal instead of a component?"):R=typeof e,g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",R,x)}var k=ee(e,n,r,h,v);if(null==k)return k;if(w){var T=n.children;if(void 0!==T)if(i)if(Y(T)){for(var j=0;j<T.length;j++)ce(T[j],e);Object.freeze&&Object.freeze(T)}else g("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 ce(T,e)}return e===o?function(e){for(var t=Object.keys(e.props),n=0;n<t.length;n++){var r=t[n];if("children"!==r&&"key"!==r){oe(e),g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",r),oe(null);break}}null!==e.ref&&(oe(e),g("Invalid attribute `ref` supplied to `React.Fragment`."),oe(null))}(k):ue(k),k}var pe=function(e,t,n){return fe(e,t,n,!1)},de=function(e,t,n){return fe(e,t,n,!0)};i.Fragment=o,i.jsx=pe,i.jsxs=de}(),function(e){e.exports=i}(o);var l={exports:{}};
|
|
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={};!function(){var e=r.default,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),h=Symbol.iterator;var v=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function g(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];w("error",e,n)}function w(e,t,n){var r=v.ReactDebugCurrentFrame.getStackAddendum();""!==r&&(t+="%s",n=n.concat([r]));var o=n.map((function(e){return String(e)}));o.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,o)}var b;function x(e){return e.displayName||"Context"}function S(e){if(null==e)return null;if("number"==typeof e.tag&&g("Received an unexpected object in getComponentNameFromType(). 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 o:return"Fragment";case n:return"Portal";case a:return"Profiler";case l:return"StrictMode";case f:return"Suspense";case p:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case c:return x(e)+".Consumer";case s:return x(e._context)+".Provider";case u:return function(e,t,n){var r=e.displayName;if(r)return r;var o=t.displayName||t.name||"";return""!==o?n+"("+o+")":n}(e,e.render,"ForwardRef");case d:var t=e.displayName||null;return null!==t?t:S(e.type)||"Memo";case y:var r=e,i=r._payload,m=r._init;try{return S(m(i))}catch(e){return null}}return null}b=Symbol.for("react.module.reference");var R,_,k,T,j,E,O,A=Object.assign,P=0;function L(){}L.__reactDisabledLog=!0;var N,C=v.ReactCurrentDispatcher;function $(e,t,n){if(void 0===N)try{throw Error()}catch(e){var r=e.stack.trim().match(/\n( *(at )?)/);N=r&&r[1]||""}return"\n"+N+e}var D,W=!1,F="function"==typeof WeakMap?WeakMap:Map;function I(e,t){if(!e||W)return"";var n,r=D.get(e);if(void 0!==r)return r;W=!0;var o,i=Error.prepareStackTrace;Error.prepareStackTrace=void 0,o=C.current,C.current=null,function(){if(0===P){R=console.log,_=console.info,k=console.warn,T=console.error,j=console.group,E=console.groupCollapsed,O=console.groupEnd;var e={configurable:!0,enumerable:!0,value:L,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}P++}();try{if(t){var l=function(){throw Error()};if(Object.defineProperty(l.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(l,[])}catch(e){n=e}Reflect.construct(e,[],l)}else{try{l.call()}catch(e){n=e}e.call(l.prototype)}}else{try{throw Error()}catch(e){n=e}e()}}catch(t){if(t&&n&&"string"==typeof t.stack){for(var a=t.stack.split("\n"),s=n.stack.split("\n"),c=a.length-1,u=s.length-1;c>=1&&u>=0&&a[c]!==s[u];)u--;for(;c>=1&&u>=0;c--,u--)if(a[c]!==s[u]){if(1!==c||1!==u)do{if(c--,--u<0||a[c]!==s[u]){var f="\n"+a[c].replace(" at new "," at ");return e.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",e.displayName)),"function"==typeof e&&D.set(e,f),f}}while(c>=1&&u>=0);break}}}finally{W=!1,C.current=o,function(){if(0==--P){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:A({},e,{value:R}),info:A({},e,{value:_}),warn:A({},e,{value:k}),error:A({},e,{value:T}),group:A({},e,{value:j}),groupCollapsed:A({},e,{value:E}),groupEnd:A({},e,{value:O})})}P<0&&g("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=i}var p=e?e.displayName||e.name:"",d=p?$(p):"";return"function"==typeof e&&D.set(e,d),d}function H(e,t,n){if(null==e)return"";if("function"==typeof e)return I(e,!(!(r=e.prototype)||!r.isReactComponent));var r;if("string"==typeof e)return $(e);switch(e){case f:return $("Suspense");case p:return $("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case u:return I(e.render,!1);case d:return H(e.type,t,n);case y:var o=e,i=o._payload,l=o._init;try{return H(l(i),t,n)}catch(e){}}return""}D=new F;var M=Object.prototype.hasOwnProperty,B={},U=v.ReactDebugCurrentFrame;function V(e){if(e){var t=e._owner,n=H(e.type,e._source,t?t.type:null);U.setExtraStackFrame(n)}else U.setExtraStackFrame(null)}var z=Array.isArray;function Y(e){return z(e)}function q(e){return""+e}function X(e){if(function(e){try{return q(e),!1}catch(e){return!0}}(e))return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",function(e){return"function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}(e)),q(e)}var K,J,Z,G=v.ReactCurrentOwner,Q={key:!0,ref:!0,__self:!0,__source:!0};Z={};function ee(e,n,r,o,i){var l,a={},s=null,c=null;for(l in void 0!==r&&(X(r),s=""+r),function(e){if(M.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(n)&&(X(n.key),s=""+n.key),function(e){if(M.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}(n)&&(c=n.ref,function(e,t){if("string"==typeof e.ref&&G.current&&t&&G.current.stateNode!==t){var n=S(G.current.type);Z[n]||(g('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',S(G.current.type),e.ref),Z[n]=!0)}}(n,i)),n)M.call(n,l)&&!Q.hasOwnProperty(l)&&(a[l]=n[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,g("%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,g("%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,n,r,o,i,l,a){var s={$$typeof:t,type:e,key:n,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,G.current,a)}var te,ne=v.ReactCurrentOwner,re=v.ReactDebugCurrentFrame;function oe(e){if(e){var t=e._owner,n=H(e.type,e._source,t?t.type:null);re.setExtraStackFrame(n)}else re.setExtraStackFrame(null)}function ie(e){return"object"==typeof e&&null!==e&&e.$$typeof===t}function le(){if(ne.current){var e=S(ne.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}te=!1;var ae={};function se(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var t=le();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(!ae[n]){ae[n]=!0;var r="";e&&e._owner&&e._owner!==ne.current&&(r=" It was passed a child from "+S(e._owner.type)+"."),oe(e),g('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),oe(null)}}}function ce(e,t){if("object"==typeof e)if(Y(e))for(var n=0;n<e.length;n++){var r=e[n];ie(r)&&se(r,t)}else if(ie(e))e._store&&(e._store.validated=!0);else if(e){var o=function(e){if(null===e||"object"!=typeof e)return null;var t=h&&e[h]||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;)ie(i.value)&&se(i.value,t)}}function ue(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!==u&&n.$$typeof!==d)return;t=n.propTypes}if(t){var r=S(n);!function(e,t,n,r,o){var i=Function.call.bind(M);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||(V(o),g("%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),V(null)),a instanceof Error&&!(a.message in B)&&(B[a.message]=!0,V(o),g("Failed %s type: %s",n,a.message),V(null))}}(t,e.props,"prop",r,e)}else if(void 0!==n.PropTypes&&!te){te=!0,g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",S(n)||"Unknown")}"function"!=typeof n.getDefaultProps||n.getDefaultProps.isReactClassApproved||g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function fe(e,n,r,i,h,v){var w=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===a||e===l||e===f||e===p||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===d||e.$$typeof===s||e.$$typeof===c||e.$$typeof===u||e.$$typeof===b||void 0!==e.getModuleId)}(e);if(!w){var x="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(x+=" 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 R,_=function(e){return void 0!==e?"\n\nCheck your code at "+e.fileName.replace(/^.*[\\\/]/,"")+":"+e.lineNumber+".":""}(h);x+=_||le(),null===e?R="null":Y(e)?R="array":void 0!==e&&e.$$typeof===t?(R="<"+(S(e.type)||"Unknown")+" />",x=" Did you accidentally export a JSX literal instead of a component?"):R=typeof e,g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",R,x)}var k=ee(e,n,r,h,v);if(null==k)return k;if(w){var T=n.children;if(void 0!==T)if(i)if(Y(T)){for(var j=0;j<T.length;j++)ce(T[j],e);Object.freeze&&Object.freeze(T)}else g("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 ce(T,e)}return e===o?function(e){for(var t=Object.keys(e.props),n=0;n<t.length;n++){var r=t[n];if("children"!==r&&"key"!==r){oe(e),g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",r),oe(null);break}}null!==e.ref&&(oe(e),g("Invalid attribute `ref` supplied to `React.Fragment`."),oe(null))}(k):ue(k),k}var pe=function(e,t,n){return fe(e,t,n,!1)},de=function(e,t,n){return fe(e,t,n,!0)};i.Fragment=o,i.jsx=pe,i.jsxs=de}(),function(e){e.exports=i}(o);var l={exports:{}};
|
|
2
2
|
/*!
|
|
3
3
|
Copyright (c) 2018 Jed Watson.
|
|
4
4
|
Licensed under the MIT License (MIT), see
|
|
5
5
|
http://jedwatson.github.io/classnames
|
|
6
|
-
*/!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={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},f=Object.assign((()=>u),u),p=t.createContext(f);function d(){return t.useContext(p)}function y(e){return e.split("-")[0]}function m(e){return e.split("-")[1]}function h(e){return["top","bottom"].includes(y(e))?"x":"y"}function v(e){return"y"===e?"height":"width"}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=h(t),s=v(a),c=r[s]/2-o[s]/2,u="x"===a;let f;switch(y(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 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=b(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:h.top-v.top+y.top,bottom:v.bottom-h.bottom+y.bottom,left:h.left-v.left+y.left,right:v.right-h.right+y.right}}const S=Math.min,R=Math.max;function _(e,t,n){return R(e,S(t,n))}const k={left:"right",right:"left",bottom:"top",top:"bottom"};function T(e){return e.replace(/left|right|bottom|top/g,(e=>k[e]))}const j={start:"end",end:"start"};function E(e){return e.replace(/start|end/g,(e=>j[e]))}const O=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,...g}=e,w=y(r),b=f||(w===l||!d?[T(l)]:function(e){const t=T(e);return[E(e),t,E(t)]}(l)),S=[l,...b],R=await x(t,g),_=[];let k=(null==(n=o.flip)?void 0:n.overflows)||[];if(c&&_.push(R[w]),u){const{main:e,cross:t}=function(e,t,n){void 0===n&&(n=!1);const r=m(e),o=h(e),i=v(o);let l="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=T(l)),{main:l,cross:T(l)}}(r,i,await(null==a.isRTL?void 0:a.isRTL(s.floating)));_.push(R[e],R[t])}if(k=[...k,{placement:r,overflows:_}],!_.every((e=>e<=0))){var j,O;const e=(null!=(j=null==(O=o.flip)?void 0:O.index)?j:0)+1,t=S[e];if(t)return{data:{index:e,overflows:k},reset:{placement:t}};let n="bottom";switch(p){case"bestFit":{var A;const e=null==(A=k.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:A[0].placement;e&&(n=e);break}case"initialPlacement":n=l}if(r!==n)return{reset:{placement:n}}}return{}}}};const A=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=y(n),a=m(n),s="x"===h(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:v}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&"number"==typeof v&&(d="end"===a?-1*v:v),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 P(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function L(e){if(null==e)return window;if(!P(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function N(e){return L(e).getComputedStyle(e)}function C(e){return P(e)?"":e?(e.nodeName||"").toLowerCase():""}function $(){const e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((e=>e.brand+"/"+e.version)).join(" "):navigator.userAgent}function D(e){return e instanceof L(e).HTMLElement}function W(e){return e instanceof L(e).Element}function F(e){if("undefined"==typeof ShadowRoot)return!1;return e instanceof L(e).ShadowRoot||e instanceof ShadowRoot}function I(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=N(e);return/auto|scroll|overlay|hidden/.test(t+r+n)&&!["inline","contents"].includes(o)}function H(e){return["table","td","th"].includes(C(e))}function B(e){const t=/firefox/i.test($()),n=N(e),r=n.backdropFilter||n.WebkitBackdropFilter;return"none"!==n.transform||"none"!==n.perspective||!!r&&"none"!==r||t&&"filter"===n.willChange||t&&!!n.filter&&"none"!==n.filter||["transform","perspective"].some((e=>n.willChange.includes(e)))||["paint","layout","strict","content"].some((e=>{const t=n.contain;return null!=t&&t.includes(e)}))}function M(){return!/^((?!chrome|android).)*safari/i.test($())}function U(e){return["html","body","#document"].includes(C(e))}const V=Math.min,z=Math.max,Y=Math.round;function q(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&&D(e)&&(s=e.offsetWidth>0&&Y(a.width)/e.offsetWidth||1,c=e.offsetHeight>0&&Y(a.height)/e.offsetHeight||1);const u=W(e)?L(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,m=a.height/c;return{width:y,height:m,top:d,right:p+y,bottom:d+m,left:p,x:p,y:d}}function X(e){return(t=e,(t instanceof L(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function K(e){return W(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function J(e){return q(X(e)).left+K(e).scrollLeft}function Z(e,t,n){const r=D(t),o=X(t),i=q(e,r&&function(e){const t=q(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"!==C(t)||I(o))&&(l=K(t)),D(t)){const e=q(t,!0);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&(a.x=J(o));return{x:i.left+l.scrollLeft-a.x,y:i.top+l.scrollTop-a.y,width:i.width,height:i.height}}function G(e){if("html"===C(e))return e;const t=e.assignedSlot||e.parentNode||(F(e)?e.host:null)||X(e);return F(t)?t.host:t}function Q(e){return D(e)&&"fixed"!==N(e).position?e.offsetParent:null}function ee(e){const t=L(e);let n=Q(e);for(;n&&H(n)&&"static"===N(n).position;)n=Q(n);return n&&("html"===C(n)||"body"===C(n)&&"static"===N(n).position&&!B(n))?t:n||function(e){let t=G(e);for(;D(t)&&!U(t);){if(B(t))return t;t=G(t)}return null}(e)||t}function te(e){if(D(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=q(e);return{width:t.width,height:t.height}}function ne(e){const t=G(e);return U(t)?e.ownerDocument.body:D(t)&&I(t)?t:ne(t)}function re(e,t){var n;void 0===t&&(t=[]);const r=ne(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=L(r),l=o?[i].concat(i.visualViewport||[],I(r)?r:[]):r,a=t.concat(l);return o?a:a.concat(re(l))}function oe(e,t,n){return"viewport"===t?b(function(e,t){const n=L(e),r=X(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)):W(t)?function(e,t){const n=q(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):b(function(e){var t;const n=X(e),r=K(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+J(e);const s=-r.scrollTop;return"rtl"===N(o||n).direction&&(a+=z(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:l,x:a,y:s}}(X(e)))}const ie={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?function(e){let t=re(e).filter((e=>W(e)&&"body"!==C(e))),n=e,r=null;for(;W(n)&&!U(n);){const e=N(n);"static"===e.position&&r&&["absolute","fixed"].includes(r.position)&&!B(n)?t=t.filter((e=>e!==n)):r=e,n=G(n)}return t}(t):[].concat(n),l=[...i,r],a=l[0],s=l.reduce(((e,n)=>{const r=oe(t,n,o);return e.top=z(r.top,e.top),e.right=V(r.right,e.right),e.bottom=V(r.bottom,e.bottom),e.left=z(r.left,e.left),e}),oe(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=D(n),i=X(n);if(n===i)return t;let l={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==C(n)||I(i))&&(l=K(n)),D(n))){const e=q(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:W,getDimensions:te,getOffsetParent:ee,getDocumentElement:X,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:Z(t,ee(n),r),floating:{...te(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===N(e).direction},le=(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}=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,{platform:ie,...n}),ae=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=[A(Number(o)),O(),(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 x(e,s),f=h(y(r)),p="x"===f?"y":"x";let d=c[f],m=c[p];if(o){const e="y"===f?"bottom":"right";d=_(d+u["y"===f?"top":"left"],d,d-u[e])}if(i){const e="y"===p?"bottom":"right";m=_(m+u["y"===p?"top":"left"],m,m-u[e])}const v=l.fn({...e,[f]:d,[p]:m});return{...v,data:{x:v.x-t,y:v.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=w(r),u={x:o,y:i},f=h(l),p=m(l),d=v(f),y=await s.getDimensions(n),g="y"===f?"top":"left",b="y"===f?"bottom":"right",x=a.reference[d]+a.reference[f]-u[f]-a.floating[d],S=u[f]-a.reference[f],R=await(null==s.getOffsetParent?void 0:s.getOffsetParent(n));let k=R?"y"===f?R.clientHeight||0:R.clientWidth||0:0;0===k&&(k=a.floating[d]);const T=x/2-S/2,j=c[g],E=k-y[d]-c[b],O=k/2-y[d]/2+T,A=_(j,O,E),P=("start"===p?c[g]:c[b])>0&&O!==A&&a.reference[d]<=a.floating[d];return{[f]:u[f]-(P?O<j?j-O:E-O:0),data:{[f]:A,centerOffset:O-A}}}}))({element:n,padding:5})),le(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"}}}))):le(e,t,{placement:"bottom",strategy:i,middleware:l}).then((({x:e,y:t})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{}})))};var se={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 ce=({id:e,className:n,classNameArrow:r,variant:i="dark",anchorId:l,place:u="top",offset:f=10,events:p=["hover"],positionStrategy:y="absolute",wrapper:m="div",children:h=null,delayShow:v=0,delayHide:g=0,float:w=!1,noArrow:b=!1,clickable:x=!1,style:S,position:R,isHtmlContent:_=!1,content:k,isOpen:T,setIsOpen:j})=>{const E=t.useRef(null),O=t.useRef(null),A=t.useRef(null),P=t.useRef(null),[L,N]=t.useState({}),[C,$]=t.useState({}),[D,W]=t.useState(!1),[F,I]=t.useState(!1),H=t.useRef(null),{anchorRefs:B,setActiveAnchor:M}=d()(e),[U,V]=t.useState({current:null}),z=t.useRef(!1),Y=e=>{j?j(e):void 0===T&&W(e)},q=(e=g)=>{P.current&&clearTimeout(P.current),P.current=setTimeout((()=>{z.current||Y(!1)}),e)},X=e=>{var t;if(!e)return;v?(A.current&&clearTimeout(A.current),A.current=setTimeout((()=>{Y(!0)}),v)):Y(!0);const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;V((e=>e.current===n?e:{current:n})),M({current:n}),P.current&&clearTimeout(P.current)},K=()=>{x?q(g||50):g?q():Y(!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})};I(!0),ae({place:u,offset:f,elementReference:n,tooltipReference:E.current,tooltipArrowReference:O.current,strategy:y}).then((e=>{I(!1),Object.keys(e.tooltipStyles).length&&N(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&$(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),g&&q()},Q=e=>{var t;(null===(t=U.current)||void 0===t?void 0:t.contains(e.target))||W(!1)},ee=s(X,50),te=s(K,50);t.useEffect((()=>{var e,t;const n=new Set(B),r=document.querySelector(`[id='${l}']`);if(r&&(V((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",Q),o.push({event:"click",listener:G})),p.find((e=>"hover"===e))&&(o.push({event:"mouseenter",listener:ee},{event:"mouseleave",listener:te},{event:"focus",listener:ee},{event:"blur",listener:te}),w&&o.push({event:"mousemove",listener:Z}));const i=()=>{z.current=!0},a=()=>{z.current=!1,K()};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",Q),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)}))}))}}),[B,U,l,p,g,v]),t.useEffect((()=>{if(R)return J(R),()=>null;if(w)return H.current&&J(H.current),()=>null;let e=U.current;l&&(e=document.querySelector(`[id='${l}']`)),I(!0);let t=!0;return ae({place:u,offset:f,elementReference:e,tooltipReference:E.current,tooltipArrowReference:O.current,strategy:y}).then((e=>{t&&(I(!1),Object.keys(e.tooltipStyles).length&&N(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&$(e.tooltipArrowStyles))})),()=>{t=!1}}),[D,T,l,U,k,u,f,y,R]),t.useEffect((()=>()=>{A.current&&clearTimeout(A.current),P.current&&clearTimeout(P.current)}),[]);const ne=Boolean(k||h);return o.exports.jsxs(m,{id:e,role:"tooltip",className:a("react-tooltip",se.tooltip,se[i],n,{[se.show]:ne&&!F&&(T||D),[se.fixed]:"fixed"===y,[se.clickable]:x}),style:{...S,...L},ref:E,children:[h||(_?o.exports.jsx(c,{content:k}):k),o.exports.jsx("div",{className:a("react-tooltip-arrow",se.arrow,r,{[se["no-arrow"]]:b}),style:C,ref:O})]})};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:y=["hover"],positionStrategy:m="absolute",delayShow:h=0,delayHide:v=0,float:g=!1,noArrow:w=!1,clickable:b=!1,style:x,position:S,isOpen:R,setIsOpen:_})=>{const[k,T]=t.useState(r||i),[j,E]=t.useState(c),[O,A]=t.useState(s),[P,L]=t.useState(u),[N,C]=t.useState(h),[$,D]=t.useState(v),[W,F]=t.useState(g),[I,H]=t.useState(f),[B,M]=t.useState(y),[U,V]=t.useState(m),[z,Y]=t.useState(Boolean(i)),{anchorRefs:q,activeAnchor:X}=d()(e),K=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}),{}),J=e=>{const t={place:e=>{var t;E(null!==(t=e)&&void 0!==t?t:c)},content:e=>{T(null!=e?e:r)},html:e=>{var t;Y(Boolean(null!=e?e:i)),T(null!==(t=null!=e?e:i)&&void 0!==t?t:r)},variant:e=>{var t;A(null!==(t=e)&&void 0!==t?t:s)},offset:e=>{L(null===e?u:Number(e))},wrapper:e=>{var t;H(null!==(t=e)&&void 0!==t?t:"div")},events:e=>{const t=null==e?void 0:e.split(" ");M(null!=t?t:y)},"position-strategy":e=>{var t;V(null!==(t=e)&&void 0!==t?t:m)},"delay-show":e=>{C(null===e?h:Number(e))},"delay-hide":e=>{D(null===e?v:Number(e))},float:e=>{F(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((()=>{Y(!1),T(r),i&&(Y(!0),T(i))}),[r,i]),t.useEffect((()=>{var e;const t=new Set(q),r=document.querySelector(`[id='${n}']`);if(r&&t.add({current:r}),!t.size)return()=>null;const o=new MutationObserver((e=>{e.forEach((e=>{var t;if(!X.current||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=K(X.current);J(n)}))})),i={attributes:!0,childList:!1,subtree:!1},l=null!==(e=X.current)&&void 0!==e?e:r;if(l){const e=K(l);J(e),o.observe(l,i)}return()=>{o.disconnect()}}),[q,X,n]);const Z={id:e,anchorId:n,className:l,classNameArrow:a,content:k,isHtmlContent:z,place:j,variant:O,offset:P,wrapper:I,events:B,positionStrategy:U,delayShow:N,delayHide:$,float:W,noArrow:w,clickable:b,style:x,position:S,isOpen:R,setIsOpen:_};return p?o.exports.jsx(ce,{...Z,children:p}):o.exports.jsx(ce,{...Z})},e.TooltipProvider=({children:e})=>{const n=t.useId(),[r,i]=t.useState({[n]:new Set}),[l,a]=t.useState({[n]:{current:null}}),s=(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)}}))},c=(e,...t)=>{i((n=>{const r=n[e];return r?(t.forEach((e=>r.delete(e))),{...n}):n}))},u=t.useCallback((e=>{var t,o;return{anchorRefs:null!==(t=r[null!=e?e:n])&&void 0!==t?t:new Set,activeAnchor:null!==(o=l[null!=e?e:n])&&void 0!==o?o:{current:null},attach:(...t)=>s(null!=e?e:n,...t),detach:(...t)=>c(null!=e?e:n,...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}}))})(null!=e?e:n,t)}}),[n,r,l,s,c]),f=t.useMemo((()=>{const e=u(n);return Object.assign((e=>u(e)),e)}),[u]);return o.exports.jsx(p.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:y,delayShow:m,delayHide:h})=>{const{attach:v,detach:g}=d()(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":y,"data-tooltip-delay-show":m,"data-tooltip-delay-hide":h,children:n})},Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
6
|
+
*/!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={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},f=Object.assign((()=>u),u),p=t.createContext(f);function d(){return t.useContext(p)}function y(e){return e.split("-")[0]}function m(e){return e.split("-")[1]}function h(e){return["top","bottom"].includes(y(e))?"x":"y"}function v(e){return"y"===e?"height":"width"}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=h(t),s=v(a),c=r[s]/2-o[s]/2,u="x"===a;let f;switch(y(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 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=b(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:h.top-v.top+y.top,bottom:v.bottom-h.bottom+y.bottom,left:h.left-v.left+y.left,right:v.right-h.right+y.right}}const S=Math.min,R=Math.max;function _(e,t,n){return R(e,S(t,n))}const k={left:"right",right:"left",bottom:"top",top:"bottom"};function T(e){return e.replace(/left|right|bottom|top/g,(e=>k[e]))}const j={start:"end",end:"start"};function E(e){return e.replace(/start|end/g,(e=>j[e]))}const O=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,...g}=e,w=y(r),b=f||(w===l||!d?[T(l)]:function(e){const t=T(e);return[E(e),t,E(t)]}(l)),S=[l,...b],R=await x(t,g),_=[];let k=(null==(n=o.flip)?void 0:n.overflows)||[];if(c&&_.push(R[w]),u){const{main:e,cross:t}=function(e,t,n){void 0===n&&(n=!1);const r=m(e),o=h(e),i=v(o);let l="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=T(l)),{main:l,cross:T(l)}}(r,i,await(null==a.isRTL?void 0:a.isRTL(s.floating)));_.push(R[e],R[t])}if(k=[...k,{placement:r,overflows:_}],!_.every((e=>e<=0))){var j,O;const e=(null!=(j=null==(O=o.flip)?void 0:O.index)?j:0)+1,t=S[e];if(t)return{data:{index:e,overflows:k},reset:{placement:t}};let n="bottom";switch(p){case"bestFit":{var A;const e=null==(A=k.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:A[0].placement;e&&(n=e);break}case"initialPlacement":n=l}if(r!==n)return{reset:{placement:n}}}return{}}}};const A=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=y(n),a=m(n),s="x"===h(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:v}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&"number"==typeof v&&(d="end"===a?-1*v:v),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 P(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function L(e){if(null==e)return window;if(!P(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function N(e){return L(e).getComputedStyle(e)}function C(e){return P(e)?"":e?(e.nodeName||"").toLowerCase():""}function $(){const e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((e=>e.brand+"/"+e.version)).join(" "):navigator.userAgent}function D(e){return e instanceof L(e).HTMLElement}function W(e){return e instanceof L(e).Element}function F(e){if("undefined"==typeof ShadowRoot)return!1;return e instanceof L(e).ShadowRoot||e instanceof ShadowRoot}function I(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=N(e);return/auto|scroll|overlay|hidden/.test(t+r+n)&&!["inline","contents"].includes(o)}function H(e){return["table","td","th"].includes(C(e))}function M(e){const t=/firefox/i.test($()),n=N(e),r=n.backdropFilter||n.WebkitBackdropFilter;return"none"!==n.transform||"none"!==n.perspective||!!r&&"none"!==r||t&&"filter"===n.willChange||t&&!!n.filter&&"none"!==n.filter||["transform","perspective"].some((e=>n.willChange.includes(e)))||["paint","layout","strict","content"].some((e=>{const t=n.contain;return null!=t&&t.includes(e)}))}function B(){return!/^((?!chrome|android).)*safari/i.test($())}function U(e){return["html","body","#document"].includes(C(e))}const V=Math.min,z=Math.max,Y=Math.round;function q(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&&D(e)&&(s=e.offsetWidth>0&&Y(a.width)/e.offsetWidth||1,c=e.offsetHeight>0&&Y(a.height)/e.offsetHeight||1);const u=W(e)?L(e):window,f=!B()&&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 X(e){return(t=e,(t instanceof L(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function K(e){return W(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function J(e){return q(X(e)).left+K(e).scrollLeft}function Z(e,t,n){const r=D(t),o=X(t),i=q(e,r&&function(e){const t=q(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"!==C(t)||I(o))&&(l=K(t)),D(t)){const e=q(t,!0);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&(a.x=J(o));return{x:i.left+l.scrollLeft-a.x,y:i.top+l.scrollTop-a.y,width:i.width,height:i.height}}function G(e){if("html"===C(e))return e;const t=e.assignedSlot||e.parentNode||(F(e)?e.host:null)||X(e);return F(t)?t.host:t}function Q(e){return D(e)&&"fixed"!==N(e).position?e.offsetParent:null}function ee(e){const t=L(e);let n=Q(e);for(;n&&H(n)&&"static"===N(n).position;)n=Q(n);return n&&("html"===C(n)||"body"===C(n)&&"static"===N(n).position&&!M(n))?t:n||function(e){let t=G(e);for(;D(t)&&!U(t);){if(M(t))return t;t=G(t)}return null}(e)||t}function te(e){if(D(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=q(e);return{width:t.width,height:t.height}}function ne(e){const t=G(e);return U(t)?e.ownerDocument.body:D(t)&&I(t)?t:ne(t)}function re(e,t){var n;void 0===t&&(t=[]);const r=ne(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=L(r),l=o?[i].concat(i.visualViewport||[],I(r)?r:[]):r,a=t.concat(l);return o?a:a.concat(re(l))}function oe(e,t,n){return"viewport"===t?b(function(e,t){const n=L(e),r=X(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=B();(e||!e&&"fixed"===t)&&(a=o.offsetLeft,s=o.offsetTop)}return{width:i,height:l,x:a,y:s}}(e,n)):W(t)?function(e,t){const n=q(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):b(function(e){var t;const n=X(e),r=K(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+J(e);const s=-r.scrollTop;return"rtl"===N(o||n).direction&&(a+=z(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:l,x:a,y:s}}(X(e)))}const ie={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?function(e){let t=re(e).filter((e=>W(e)&&"body"!==C(e))),n=e,r=null;for(;W(n)&&!U(n);){const e=N(n);"static"===e.position&&r&&["absolute","fixed"].includes(r.position)&&!M(n)?t=t.filter((e=>e!==n)):r=e,n=G(n)}return t}(t):[].concat(n),l=[...i,r],a=l[0],s=l.reduce(((e,n)=>{const r=oe(t,n,o);return e.top=z(r.top,e.top),e.right=V(r.right,e.right),e.bottom=V(r.bottom,e.bottom),e.left=z(r.left,e.left),e}),oe(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=D(n),i=X(n);if(n===i)return t;let l={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==C(n)||I(i))&&(l=K(n)),D(n))){const e=q(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:W,getDimensions:te,getOffsetParent:ee,getDocumentElement:X,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:Z(t,ee(n),r),floating:{...te(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===N(e).direction},le=(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}=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,{platform:ie,...n}),ae=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=[A(Number(o)),O(),(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 x(e,s),f=h(y(r)),p="x"===f?"y":"x";let d=c[f],m=c[p];if(o){const e="y"===f?"bottom":"right";d=_(d+u["y"===f?"top":"left"],d,d-u[e])}if(i){const e="y"===p?"bottom":"right";m=_(m+u["y"===p?"top":"left"],m,m-u[e])}const v=l.fn({...e,[f]:d,[p]:m});return{...v,data:{x:v.x-t,y:v.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=w(r),u={x:o,y:i},f=h(l),p=m(l),d=v(f),y=await s.getDimensions(n),g="y"===f?"top":"left",b="y"===f?"bottom":"right",x=a.reference[d]+a.reference[f]-u[f]-a.floating[d],S=u[f]-a.reference[f],R=await(null==s.getOffsetParent?void 0:s.getOffsetParent(n));let k=R?"y"===f?R.clientHeight||0:R.clientWidth||0:0;0===k&&(k=a.floating[d]);const T=x/2-S/2,j=c[g],E=k-y[d]-c[b],O=k/2-y[d]/2+T,A=_(j,O,E),P=("start"===p?c[g]:c[b])>0&&O!==A&&a.reference[d]<=a.floating[d];return{[f]:u[f]-(P?O<j?j-O:E-O:0),data:{[f]:A,centerOffset:O-A}}}}))({element:n,padding:5})),le(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"}}}))):le(e,t,{placement:"bottom",strategy:i,middleware:l}).then((({x:e,y:t})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{}})))};var se={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 ce=({id:e,className:n,classNameArrow:r,variant:i="dark",anchorId:l,place:u="top",offset:f=10,events:p=["hover"],positionStrategy:y="absolute",wrapper:m="div",children:h=null,delayShow:v=0,delayHide:g=0,float:w=!1,noArrow:b=!1,clickable:x=!1,style:S,position:R,afterShow:_,afterHide:k,content:T,html:j,isOpen:E,setIsOpen:O})=>{const A=t.useRef(null),P=t.useRef(null),L=t.useRef(null),N=t.useRef(null),[C,$]=t.useState({}),[D,W]=t.useState({}),[F,I]=t.useState(!1),H=t.useRef(!1),[M,B]=t.useState(!1),U=t.useRef(null),{anchorRefs:V,setActiveAnchor:z}=d()(e),[Y,q]=t.useState({current:null}),X=t.useRef(!1),K=e=>{O?O(e):void 0===E&&I(e)};t.useEffect((()=>{F!==H.current&&(H.current=F,F?null==_||_():null==k||k())}),[F]);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;q((e=>e.current===n?e:{current:n})),z({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),ae({place:u,offset:f,elementReference:n,tooltipReference:A.current,tooltipArrowReference:P.current,strategy:y}).then((e=>{B(!1),Object.keys(e.tooltipStyles).length&&$(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&W(e.tooltipArrowStyles)}))},ee=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};Q(n),U.current=n},te=e=>{Z(e),g&&J()},ne=e=>{var t;(null===(t=Y.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&&(q((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=A.current)||void 0===e||e.addEventListener("mouseenter",i),null===(t=A.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=A.current)||void 0===e||e.removeEventListener("mouseenter",i),null===(t=A.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,Y,l,p,g,v]),t.useEffect((()=>{if(R)return Q(R),()=>null;if(w)return U.current&&Q(U.current),()=>null;let e=Y.current;l&&(e=document.querySelector(`[id='${l}']`)),B(!0);let t=!0;return ae({place:u,offset:f,elementReference:e,tooltipReference:A.current,tooltipArrowReference:P.current,strategy:y}).then((e=>{t&&(B(!1),Object.keys(e.tooltipStyles).length&&$(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&W(e.tooltipArrowStyles))})),()=>{t=!1}}),[F,E,l,Y,T,j,u,f,y,R]),t.useEffect((()=>()=>{L.current&&clearTimeout(L.current),N.current&&clearTimeout(N.current)}),[]);const ie=Boolean(j||T||h);return o.exports.jsxs(m,{id:e,role:"tooltip",className:a("react-tooltip",se.tooltip,se[i],n,{[se.show]:ie&&!M&&(E||F),[se.fixed]:"fixed"===y,[se.clickable]:x}),style:{...S,...C},ref:A,children:[h||j&&o.exports.jsx(c,{content:j})||T,o.exports.jsx("div",{className:a("react-tooltip-arrow",se.arrow,r,{[se["no-arrow"]]:b}),style:D,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:y=["hover"],positionStrategy:m="absolute",delayShow:h=0,delayHide:v=0,float:g=!1,noArrow:w=!1,clickable:b=!1,style:x,position:S,isOpen:R,setIsOpen:_,afterShow:k,afterHide:T})=>{const[j,E]=t.useState(r),[O,A]=t.useState(i),[P,L]=t.useState(c),[N,C]=t.useState(s),[$,D]=t.useState(u),[W,F]=t.useState(h),[I,H]=t.useState(v),[M,B]=t.useState(g),[U,V]=t.useState(f),[z,Y]=t.useState(y),[q,X]=t.useState(m),{anchorRefs:K,activeAnchor:J}=d()(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=>{E(null!=e?e:r)},html:e=>{A(null!=e?e:i)},variant:e=>{var t;C(null!==(t=e)&&void 0!==t?t:s)},offset:e=>{D(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(" ");Y(null!=t?t:y)},"position-strategy":e=>{var t;X(null!==(t=e)&&void 0!==t?t:m)},"delay-show":e=>{F(null===e?h: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((()=>{E(r)}),[r]),t.useEffect((()=>{A(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:j,html:O,place:P,variant:N,offset:$,wrapper:U,events:z,positionStrategy:q,delayShow:W,delayHide:I,float:M,noArrow:w,clickable:b,style:x,position:S,isOpen:R,setIsOpen:_,afterShow:k,afterHide:T};return p?o.exports.jsx(ce,{...Q,children:p}):o.exports.jsx(ce,{...Q})},e.TooltipProvider=({children:e})=>{const n=t.useId(),[r,i]=t.useState({[n]:new Set}),[l,a]=t.useState({[n]:{current:null}}),s=(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)}}))},c=(e,...t)=>{i((n=>{const r=n[e];return r?(t.forEach((e=>r.delete(e))),{...n}):n}))},u=t.useCallback((e=>{var t,o;return{anchorRefs:null!==(t=r[null!=e?e:n])&&void 0!==t?t:new Set,activeAnchor:null!==(o=l[null!=e?e:n])&&void 0!==o?o:{current:null},attach:(...t)=>s(null!=e?e:n,...t),detach:(...t)=>c(null!=e?e:n,...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}}))})(null!=e?e:n,t)}}),[n,r,l,s,c]),f=t.useMemo((()=>{const e=u(n);return Object.assign((e=>u(e)),e)}),[u]);return o.exports.jsx(p.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:y,delayShow:m,delayHide:h})=>{const{attach:v,detach:g}=d()(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":y,"data-tooltip-delay-show":m,"data-tooltip-delay-hide":h,children:n})},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.5.1",
|
|
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",
|