react-tooltip 5.7.4-beta.0 → 5.7.5

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.
@@ -2676,20 +2676,48 @@ content, html, isOpen, setIsOpen, }) => {
2676
2676
  const [inlineStyles, setInlineStyles] = require$$0.useState({});
2677
2677
  const [inlineArrowStyles, setInlineArrowStyles] = require$$0.useState({});
2678
2678
  const [show, setShow] = require$$0.useState(false);
2679
+ const [rendered, setRendered] = require$$0.useState(false);
2679
2680
  const wasShowing = require$$0.useRef(false);
2680
- const [calculatingPosition, setCalculatingPosition] = require$$0.useState(false);
2681
2681
  const lastFloatPosition = require$$0.useRef(null);
2682
2682
  const { anchorRefs, setActiveAnchor: setProviderActiveAnchor } = useTooltip(id);
2683
2683
  const [activeAnchor, setActiveAnchor] = require$$0.useState({ current: null });
2684
2684
  const hoveringTooltip = require$$0.useRef(false);
2685
+ require$$0.useEffect(() => {
2686
+ if (!show) {
2687
+ setRendered(false);
2688
+ }
2689
+ }, [show]);
2685
2690
  const handleShow = (value) => {
2686
- if (setIsOpen) {
2687
- setIsOpen(value);
2691
+ setRendered(true);
2692
+ /**
2693
+ * wait for the component to render and calculate position
2694
+ * before actually showing
2695
+ */
2696
+ setTimeout(() => {
2697
+ setIsOpen === null || setIsOpen === void 0 ? void 0 : setIsOpen(value);
2698
+ if (isOpen === undefined) {
2699
+ setShow(value);
2700
+ }
2701
+ }, 10);
2702
+ };
2703
+ /**
2704
+ * this replicates the effect from `handleShow()`
2705
+ * when `isOpen` is changed from outside
2706
+ */
2707
+ require$$0.useEffect(() => {
2708
+ if (isOpen === undefined) {
2709
+ return () => null;
2688
2710
  }
2689
- else if (isOpen === undefined) {
2690
- setShow(value);
2711
+ if (isOpen) {
2712
+ setRendered(true);
2691
2713
  }
2692
- };
2714
+ const timeout = setTimeout(() => {
2715
+ setShow(isOpen);
2716
+ }, 10);
2717
+ return () => {
2718
+ clearTimeout(timeout);
2719
+ };
2720
+ }, [isOpen]);
2693
2721
  require$$0.useEffect(() => {
2694
2722
  if (show === wasShowing.current) {
2695
2723
  return;
@@ -2742,7 +2770,7 @@ content, html, isOpen, setIsOpen, }) => {
2742
2770
  const handleHideTooltip = () => {
2743
2771
  if (clickable) {
2744
2772
  // allow time for the mouse to reach the tooltip, in case there's a gap
2745
- handleHideTooltipDelayed(delayHide || 50);
2773
+ handleHideTooltipDelayed(delayHide || 100);
2746
2774
  }
2747
2775
  else if (delayHide) {
2748
2776
  handleHideTooltipDelayed();
@@ -2769,7 +2797,6 @@ content, html, isOpen, setIsOpen, }) => {
2769
2797
  };
2770
2798
  },
2771
2799
  };
2772
- setCalculatingPosition(true);
2773
2800
  computeTooltipPosition({
2774
2801
  place,
2775
2802
  offset,
@@ -2779,7 +2806,6 @@ content, html, isOpen, setIsOpen, }) => {
2779
2806
  strategy: positionStrategy,
2780
2807
  middlewares,
2781
2808
  }).then((computedStylesData) => {
2782
- setCalculatingPosition(false);
2783
2809
  if (Object.keys(computedStylesData.tooltipStyles).length) {
2784
2810
  setInlineStyles(computedStylesData.tooltipStyles);
2785
2811
  }
@@ -2909,7 +2935,11 @@ content, html, isOpen, setIsOpen, }) => {
2909
2935
  });
2910
2936
  parentObserver.disconnect();
2911
2937
  };
2912
- }, [anchorRefs, activeAnchor, closeOnEsc, anchorId, events, delayHide, delayShow]);
2938
+ /**
2939
+ * rendered is also a dependency to ensure anchor observers are re-registered
2940
+ * since `tooltipRef` becomes stale after removing/adding the tooltip to the DOM
2941
+ */
2942
+ }, [rendered, anchorRefs, activeAnchor, closeOnEsc, anchorId, events, delayHide, delayShow]);
2913
2943
  require$$0.useEffect(() => {
2914
2944
  if (position) {
2915
2945
  // if `position` is set, override regular and `float` positioning
@@ -2935,7 +2965,6 @@ content, html, isOpen, setIsOpen, }) => {
2935
2965
  // `anchorId` element takes precedence
2936
2966
  elementReference = document.querySelector(`[id='${anchorId}']`);
2937
2967
  }
2938
- setCalculatingPosition(true);
2939
2968
  let mounted = true;
2940
2969
  computeTooltipPosition({
2941
2970
  place,
@@ -2950,7 +2979,6 @@ content, html, isOpen, setIsOpen, }) => {
2950
2979
  // invalidate computed positions after remount
2951
2980
  return;
2952
2981
  }
2953
- setCalculatingPosition(false);
2954
2982
  if (Object.keys(computedStylesData.tooltipStyles).length) {
2955
2983
  setInlineStyles(computedStylesData.tooltipStyles);
2956
2984
  }
@@ -2961,18 +2989,7 @@ content, html, isOpen, setIsOpen, }) => {
2961
2989
  return () => {
2962
2990
  mounted = false;
2963
2991
  };
2964
- }, [
2965
- show,
2966
- isOpen,
2967
- anchorId,
2968
- activeAnchor,
2969
- content,
2970
- html,
2971
- place,
2972
- offset,
2973
- positionStrategy,
2974
- position,
2975
- ]);
2992
+ }, [show, anchorId, activeAnchor, content, html, place, offset, positionStrategy, position]);
2976
2993
  require$$0.useEffect(() => {
2977
2994
  return () => {
2978
2995
  if (tooltipShowDelayTimerRef.current) {
@@ -2984,13 +3001,14 @@ content, html, isOpen, setIsOpen, }) => {
2984
3001
  };
2985
3002
  }, []);
2986
3003
  const hasContentOrChildren = Boolean(html || content || children);
2987
- return (jsxRuntime.exports.jsxs(WrapperElement, { id: id, role: "tooltip", className: classNames('react-tooltip', styles['tooltip'], styles[variant], className, {
2988
- [styles['show']]: hasContentOrChildren && !calculatingPosition && (isOpen || show),
3004
+ const canShow = Boolean(hasContentOrChildren && show && Object.keys(inlineStyles).length > 0);
3005
+ return rendered ? (jsxRuntime.exports.jsxs(WrapperElement, { id: id, role: "tooltip", className: classNames('react-tooltip', styles['tooltip'], styles[variant], className, {
3006
+ [styles['show']]: canShow,
2989
3007
  [styles['fixed']]: positionStrategy === 'fixed',
2990
3008
  [styles['clickable']]: clickable,
2991
3009
  }), style: { ...externalStyles, ...inlineStyles }, ref: tooltipRef, children: [children || (html && jsxRuntime.exports.jsx(TooltipContent, { content: html })) || content, jsxRuntime.exports.jsx(WrapperElement, { className: classNames('react-tooltip-arrow', styles['arrow'], classNameArrow, {
2992
3010
  [styles['no-arrow']]: noArrow,
2993
- }), style: inlineArrowStyles, ref: tooltipArrowRef })] }));
3011
+ }), style: inlineArrowStyles, ref: tooltipArrowRef })] })) : null;
2994
3012
  };
2995
3013
 
2996
3014
  const TooltipController = ({ id, anchorId, content, html, className, classNameArrow, variant = 'dark', place = 'top', offset = 10, wrapper = 'div', children = null, events = ['hover'], positionStrategy = 'absolute', middlewares, delayShow = 0, delayHide = 0, float = false, noArrow = false, clickable = false, closeOnEsc = false, style, position, isOpen, setIsOpen, afterShow, afterHide, }) => {
@@ -1,4 +1,4 @@
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);function r(e){return e.split("-")[1]}function o(e){return"y"===e?"height":"width"}function i(e){return e.split("-")[0]}function l(e){return["top","bottom"].includes(i(e))?"x":"y"}function a(e,t,n){let{reference:a,floating:s}=e;const c=a.x+a.width/2-s.width/2,u=a.y+a.height/2-s.height/2,f=l(t),p=o(f),d=a[p]/2-s[p]/2,y="x"===f;let m;switch(i(t)){case"top":m={x:c,y:a.y-s.height};break;case"bottom":m={x:c,y:a.y+a.height};break;case"right":m={x:a.x+a.width,y:u};break;case"left":m={x:a.x-s.width,y:u};break;default:m={x:a.x,y:a.y}}switch(r(t)){case"start":m[f]-=d*(n&&y?-1:1);break;case"end":m[f]+=d*(n&&y?-1:1)}return m}function s(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 c(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function u(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:l,elements:a,strategy:u}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:d="floating",altBoundary:y=!1,padding:m=0}=t,h=s(m),g=a[y?"floating"===d?"reference":"floating":d],v=c(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(g)))||n?g:g.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:f,rootBoundary:p,strategy:u})),w="floating"===d?{...l.floating,x:r,y:o}:l.reference,b=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),x=await(null==i.isElement?void 0:i.isElement(b))&&await(null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},R=c(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:w,offsetParent:b,strategy:u}):w);return{top:(v.top-R.top+h.top)/x.y,bottom:(R.bottom-v.bottom+h.bottom)/x.y,left:(v.left-R.left+h.left)/x.x,right:(R.right-v.right+h.right)/x.x}}const f=Math.min,p=Math.max;function d(e,t,n){return p(e,f(t,n))}const y=["top","right","bottom","left"].reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[]),m={left:"right",right:"left",bottom:"top",top:"bottom"};function h(e){return e.replace(/left|right|bottom|top/g,(e=>m[e]))}function g(e,t,n){void 0===n&&(n=!1);const i=r(e),a=l(e),s=o(a);let c="x"===a?i===(n?"end":"start")?"right":"left":"start"===i?"bottom":"top";return t.reference[s]>t.floating[s]&&(c=h(c)),{main:c,cross:h(c)}}const v={start:"end",end:"start"};function w(e){return e.replace(/start|end/g,(e=>v[e]))}const b=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:o,middlewareData:l,rects:a,initialPlacement:s,platform:c,elements:f}=t,{mainAxis:p=!0,crossAxis:d=!0,fallbackPlacements:y,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:b=!0,...x}=e,R=i(o),_=i(s)===s,S=await(null==c.isRTL?void 0:c.isRTL(f.floating)),T=y||(_||!b?[h(s)]:function(e){const t=h(e);return[w(e),t,w(t)]}(s));y||"none"===v||T.push(...function(e,t,n,o){const l=r(e);let a=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:l;default:return[]}}(i(e),"start"===n,o);return l&&(a=a.map((e=>e+"-"+l)),t&&(a=a.concat(a.map(w)))),a}(s,b,v,S));const O=[s,...T],k=await u(t,x),E=[];let A=(null==(n=l.flip)?void 0:n.overflows)||[];if(p&&E.push(k[R]),d){const{main:e,cross:t}=g(o,a,S);E.push(k[e],k[t])}if(A=[...A,{placement:o,overflows:E}],!E.every((e=>e<=0))){var j,P;const e=((null==(j=l.flip)?void 0:j.index)||0)+1,t=O[e];if(t)return{data:{index:e,overflows:A},reset:{placement:t}};let n=null==(P=A.find((e=>e.overflows[0]<=0)))?void 0:P.placement;if(!n)switch(m){case"bestFit":{var L;const e=null==(L=A.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:L[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}};const x=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:o}=t,a=await async function(e,t){const{placement:n,platform:o,elements:a}=e,s=await(null==o.isRTL?void 0:o.isRTL(a.floating)),c=i(n),u=r(n),f="x"===l(n),p=["left","top"].includes(c)?-1:1,d=s&&f?-1:1,y="function"==typeof t?t(e):t;let{mainAxis:m,crossAxis:h,alignmentAxis:g}="number"==typeof y?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...y};return u&&"number"==typeof g&&(h="end"===u?-1*g:g),f?{x:h*d,y:m*p}:{x:m*p,y:h*d}}(t,e);return{x:n+a.x,y:o+a.y,data:a}}}};const R=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...f}=e,p={x:n,y:r},y=await u(t,f),m=l(i(o)),h="x"===m?"y":"x";let g=p[m],v=p[h];if(a){const e="y"===m?"bottom":"right";g=d(g+y["y"===m?"top":"left"],g,g-y[e])}if(s){const e="y"===h?"bottom":"right";v=d(v+y["y"===h?"top":"left"],v,v-y[e])}const w=c.fn({...t,[m]:g,[h]:v});return{...w,data:{x:w.x-n,y:w.y-r}}}}};function _(e){var t;return(null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function S(e){return _(e).getComputedStyle(e)}const T=Math.min,O=Math.max,k=Math.round;function E(e){const t=S(e);let n=parseFloat(t.width),r=parseFloat(t.height);const o=e.offsetWidth,i=e.offsetHeight,l=k(n)!==o||k(r)!==i;return l&&(n=o,r=i),{width:n,height:r,fallback:l}}function A(e){return N(e)?(e.nodeName||"").toLowerCase():""}let j;function P(){if(j)return j;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(j=e.brands.map((e=>e.brand+"/"+e.version)).join(" "),j):navigator.userAgent}function L(e){return e instanceof _(e).HTMLElement}function D(e){return e instanceof _(e).Element}function N(e){return e instanceof _(e).Node}function C(e){if("undefined"==typeof ShadowRoot)return!1;return e instanceof _(e).ShadowRoot||e instanceof ShadowRoot}function F(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=S(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function I(e){return["table","td","th"].includes(A(e))}function $(e){const t=/firefox/i.test(P()),n=S(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 W(){return!/^((?!chrome|android).)*safari/i.test(P())}function H(e){return["html","body","#document"].includes(A(e))}function U(e){return D(e)?e:e.contextElement}const B={x:1,y:1};function M(e){const t=U(e);if(!L(t))return B;const n=t.getBoundingClientRect(),{width:r,height:o,fallback:i}=E(t);let l=(i?k(n.width):n.width)/r,a=(i?k(n.height):n.height)/o;return l&&Number.isFinite(l)||(l=1),a&&Number.isFinite(a)||(a=1),{x:l,y:a}}function V(e,t,n,r){var o,i;void 0===t&&(t=!1),void 0===n&&(n=!1);const l=e.getBoundingClientRect(),a=U(e);let s=B;t&&(r?D(r)&&(s=M(r)):s=M(e));const c=a?_(a):window,u=!W()&&n;let f=(l.left+(u&&(null==(o=c.visualViewport)?void 0:o.offsetLeft)||0))/s.x,p=(l.top+(u&&(null==(i=c.visualViewport)?void 0:i.offsetTop)||0))/s.y,d=l.width/s.x,y=l.height/s.y;if(a){const e=_(a),t=r&&D(r)?_(r):r;let n=e.frameElement;for(;n&&r&&t!==e;){const e=M(n),t=n.getBoundingClientRect(),r=getComputedStyle(n);t.x+=(n.clientLeft+parseFloat(r.paddingLeft))*e.x,t.y+=(n.clientTop+parseFloat(r.paddingTop))*e.y,f*=e.x,p*=e.y,d*=e.x,y*=e.y,f+=t.x,p+=t.y,n=_(n).frameElement}}return{width:d,height:y,top:p,right:f+d,bottom:p+y,left:f,x:f,y:p}}function z(e){return((N(e)?e.ownerDocument:e.document)||window.document).documentElement}function q(e){return D(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Y(e){return V(z(e)).left+q(e).scrollLeft}function X(e){if("html"===A(e))return e;const t=e.assignedSlot||e.parentNode||C(e)&&e.host||z(e);return C(t)?t.host:t}function K(e){const t=X(e);return H(t)?t.ownerDocument.body:L(t)&&F(t)?t:K(t)}function J(e,t){var n;void 0===t&&(t=[]);const r=K(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=_(r);return o?t.concat(i,i.visualViewport||[],F(r)?r:[]):t.concat(r,J(r))}function Z(e,t,n){return"viewport"===t?c(function(e,t){const n=_(e),r=z(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=W();(e||!e&&"fixed"===t)&&(a=o.offsetLeft,s=o.offsetTop)}return{width:i,height:l,x:a,y:s}}(e,n)):D(t)?c(function(e,t){const n=V(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=L(e)?M(e):{x:1,y:1};return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n)):c(function(e){const t=z(e),n=q(e),r=e.ownerDocument.body,o=O(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=O(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+Y(e);const a=-n.scrollTop;return"rtl"===S(r).direction&&(l+=O(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:a}}(z(e)))}function G(e){return L(e)&&"fixed"!==S(e).position?e.offsetParent:null}function Q(e){const t=_(e);let n=G(e);for(;n&&I(n)&&"static"===S(n).position;)n=G(n);return n&&("html"===A(n)||"body"===A(n)&&"static"===S(n).position&&!$(n))?t:n||function(e){let t=X(e);for(;L(t)&&!H(t);){if($(t))return t;t=X(t)}return null}(e)||t}function ee(e,t,n){const r=L(t),o=z(t),i=V(e,!0,"fixed"===n,t);let l={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if(r||!r&&"fixed"!==n)if(("body"!==A(t)||F(o))&&(l=q(t)),L(t)){const e=V(t,!0);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&(a.x=Y(o));return{x:i.left+l.scrollLeft-a.x,y:i.top+l.scrollTop-a.y,width:i.width,height:i.height}}const te={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let r=J(e).filter((e=>D(e)&&"body"!==A(e))),o=null;const i="fixed"===S(e).position;let l=i?X(e):e;for(;D(l)&&!H(l);){const e=S(l),t=$(l);(i?t||o:t||"static"!==e.position||!o||!["absolute","fixed"].includes(o.position))?o=e:r=r.filter((e=>e!==l)),l=X(l)}return t.set(e,r),r}(t,this._c):[].concat(n),l=[...i,r],a=l[0],s=l.reduce(((e,n)=>{const r=Z(t,n,o);return e.top=O(r.top,e.top),e.right=T(r.right,e.right),e.bottom=T(r.bottom,e.bottom),e.left=O(r.left,e.left),e}),Z(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=L(n),i=z(n);if(n===i)return t;let l={scrollLeft:0,scrollTop:0},a={x:1,y:1};const s={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==A(n)||F(i))&&(l=q(n)),L(n))){const e=V(n);a=M(n),s.x=e.x+n.clientLeft,s.y=e.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-l.scrollLeft*a.x+s.x,y:t.y*a.y-l.scrollTop*a.y+s.y}},isElement:D,getDimensions:function(e){return L(e)?E(e):e.getBoundingClientRect()},getOffsetParent:Q,getDocumentElement:z,getScale:M,async getElementRects(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||Q,i=this.getDimensions;return{reference:ee(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===S(e).direction},ne=(e,t,n)=>{const r=new Map,o={platform:te,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,s=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(" ")),s.filter((e=>{let{name:t}=e;return"autoPlacement"===t||"flip"===t})).length>1)throw new Error(["Floating UI: duplicate `flip` and/or `autoPlacement` middleware","detected. This will lead to an infinite loop. Ensure only one of","either has been passed to the `middleware` array."].join(" "));e&&t||console.error(["Floating UI: The reference and/or floating element was not defined","when `computePosition()` was called. Ensure that both elements have","been created and can be measured."].join(" "));let u=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:p}=a(u,r,c),d=r,y={},m=0;for(let n=0;n<s.length;n++){const{name:i,fn:h}=s[n],{x:g,y:v,data:w,reset:b}=await h({x:f,y:p,initialPlacement:r,placement:d,strategy:o,middlewareData:y,rects:u,platform:l,elements:{reference:e,floating:t}});f=null!=g?g:f,p=null!=v?v:p,y={...y,[i]:{...y[i],...w}},m>50&&console.warn(["Floating UI: The middleware lifecycle appears to be running in an","infinite loop. This is usually caused by a `reset` continually","being returned without a break condition."].join(" ")),b&&m<=50&&(m++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(u=!0===b.rects?await l.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:f,y:p}=a(u,d,c))),n=-1)}return{x:f,y:p,placement:d,strategy:o,middlewareData:y}})(e,t,{...o,platform:i})};var re={exports:{}},oe={};
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);function r(e){return e.split("-")[1]}function o(e){return"y"===e?"height":"width"}function i(e){return e.split("-")[0]}function l(e){return["top","bottom"].includes(i(e))?"x":"y"}function a(e,t,n){let{reference:a,floating:s}=e;const c=a.x+a.width/2-s.width/2,u=a.y+a.height/2-s.height/2,f=l(t),p=o(f),d=a[p]/2-s[p]/2,y="x"===f;let m;switch(i(t)){case"top":m={x:c,y:a.y-s.height};break;case"bottom":m={x:c,y:a.y+a.height};break;case"right":m={x:a.x+a.width,y:u};break;case"left":m={x:a.x-s.width,y:u};break;default:m={x:a.x,y:a.y}}switch(r(t)){case"start":m[f]-=d*(n&&y?-1:1);break;case"end":m[f]+=d*(n&&y?-1:1)}return m}function s(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 c(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function u(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:l,elements:a,strategy:u}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:d="floating",altBoundary:y=!1,padding:m=0}=t,h=s(m),g=a[y?"floating"===d?"reference":"floating":d],v=c(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(g)))||n?g:g.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:f,rootBoundary:p,strategy:u})),w="floating"===d?{...l.floating,x:r,y:o}:l.reference,b=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),x=await(null==i.isElement?void 0:i.isElement(b))&&await(null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},R=c(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:w,offsetParent:b,strategy:u}):w);return{top:(v.top-R.top+h.top)/x.y,bottom:(R.bottom-v.bottom+h.bottom)/x.y,left:(v.left-R.left+h.left)/x.x,right:(R.right-v.right+h.right)/x.x}}const f=Math.min,p=Math.max;function d(e,t,n){return p(e,f(t,n))}const y=["top","right","bottom","left"].reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[]),m={left:"right",right:"left",bottom:"top",top:"bottom"};function h(e){return e.replace(/left|right|bottom|top/g,(e=>m[e]))}function g(e,t,n){void 0===n&&(n=!1);const i=r(e),a=l(e),s=o(a);let c="x"===a?i===(n?"end":"start")?"right":"left":"start"===i?"bottom":"top";return t.reference[s]>t.floating[s]&&(c=h(c)),{main:c,cross:h(c)}}const v={start:"end",end:"start"};function w(e){return e.replace(/start|end/g,(e=>v[e]))}const b=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:o,middlewareData:l,rects:a,initialPlacement:s,platform:c,elements:f}=t,{mainAxis:p=!0,crossAxis:d=!0,fallbackPlacements:y,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:b=!0,...x}=e,R=i(o),_=i(s)===s,S=await(null==c.isRTL?void 0:c.isRTL(f.floating)),T=y||(_||!b?[h(s)]:function(e){const t=h(e);return[w(e),t,w(t)]}(s));y||"none"===v||T.push(...function(e,t,n,o){const l=r(e);let a=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:l;default:return[]}}(i(e),"start"===n,o);return l&&(a=a.map((e=>e+"-"+l)),t&&(a=a.concat(a.map(w)))),a}(s,b,v,S));const O=[s,...T],k=await u(t,x),E=[];let A=(null==(n=l.flip)?void 0:n.overflows)||[];if(p&&E.push(k[R]),d){const{main:e,cross:t}=g(o,a,S);E.push(k[e],k[t])}if(A=[...A,{placement:o,overflows:E}],!E.every((e=>e<=0))){var j,P;const e=((null==(j=l.flip)?void 0:j.index)||0)+1,t=O[e];if(t)return{data:{index:e,overflows:A},reset:{placement:t}};let n=null==(P=A.find((e=>e.overflows[0]<=0)))?void 0:P.placement;if(!n)switch(m){case"bestFit":{var L;const e=null==(L=A.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:L[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}};const x=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:o}=t,a=await async function(e,t){const{placement:n,platform:o,elements:a}=e,s=await(null==o.isRTL?void 0:o.isRTL(a.floating)),c=i(n),u=r(n),f="x"===l(n),p=["left","top"].includes(c)?-1:1,d=s&&f?-1:1,y="function"==typeof t?t(e):t;let{mainAxis:m,crossAxis:h,alignmentAxis:g}="number"==typeof y?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...y};return u&&"number"==typeof g&&(h="end"===u?-1*g:g),f?{x:h*d,y:m*p}:{x:m*p,y:h*d}}(t,e);return{x:n+a.x,y:o+a.y,data:a}}}};const R=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...f}=e,p={x:n,y:r},y=await u(t,f),m=l(i(o)),h="x"===m?"y":"x";let g=p[m],v=p[h];if(a){const e="y"===m?"bottom":"right";g=d(g+y["y"===m?"top":"left"],g,g-y[e])}if(s){const e="y"===h?"bottom":"right";v=d(v+y["y"===h?"top":"left"],v,v-y[e])}const w=c.fn({...t,[m]:g,[h]:v});return{...w,data:{x:w.x-n,y:w.y-r}}}}};function _(e){var t;return(null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function S(e){return _(e).getComputedStyle(e)}const T=Math.min,O=Math.max,k=Math.round;function E(e){const t=S(e);let n=parseFloat(t.width),r=parseFloat(t.height);const o=e.offsetWidth,i=e.offsetHeight,l=k(n)!==o||k(r)!==i;return l&&(n=o,r=i),{width:n,height:r,fallback:l}}function A(e){return N(e)?(e.nodeName||"").toLowerCase():""}let j;function P(){if(j)return j;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(j=e.brands.map((e=>e.brand+"/"+e.version)).join(" "),j):navigator.userAgent}function L(e){return e instanceof _(e).HTMLElement}function D(e){return e instanceof _(e).Element}function N(e){return e instanceof _(e).Node}function C(e){if("undefined"==typeof ShadowRoot)return!1;return e instanceof _(e).ShadowRoot||e instanceof ShadowRoot}function F(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=S(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function I(e){return["table","td","th"].includes(A(e))}function $(e){const t=/firefox/i.test(P()),n=S(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 W(){return!/^((?!chrome|android).)*safari/i.test(P())}function B(e){return["html","body","#document"].includes(A(e))}function H(e){return D(e)?e:e.contextElement}const U={x:1,y:1};function M(e){const t=H(e);if(!L(t))return U;const n=t.getBoundingClientRect(),{width:r,height:o,fallback:i}=E(t);let l=(i?k(n.width):n.width)/r,a=(i?k(n.height):n.height)/o;return l&&Number.isFinite(l)||(l=1),a&&Number.isFinite(a)||(a=1),{x:l,y:a}}function V(e,t,n,r){var o,i;void 0===t&&(t=!1),void 0===n&&(n=!1);const l=e.getBoundingClientRect(),a=H(e);let s=U;t&&(r?D(r)&&(s=M(r)):s=M(e));const c=a?_(a):window,u=!W()&&n;let f=(l.left+(u&&(null==(o=c.visualViewport)?void 0:o.offsetLeft)||0))/s.x,p=(l.top+(u&&(null==(i=c.visualViewport)?void 0:i.offsetTop)||0))/s.y,d=l.width/s.x,y=l.height/s.y;if(a){const e=_(a),t=r&&D(r)?_(r):r;let n=e.frameElement;for(;n&&r&&t!==e;){const e=M(n),t=n.getBoundingClientRect(),r=getComputedStyle(n);t.x+=(n.clientLeft+parseFloat(r.paddingLeft))*e.x,t.y+=(n.clientTop+parseFloat(r.paddingTop))*e.y,f*=e.x,p*=e.y,d*=e.x,y*=e.y,f+=t.x,p+=t.y,n=_(n).frameElement}}return{width:d,height:y,top:p,right:f+d,bottom:p+y,left:f,x:f,y:p}}function z(e){return((N(e)?e.ownerDocument:e.document)||window.document).documentElement}function q(e){return D(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Y(e){return V(z(e)).left+q(e).scrollLeft}function X(e){if("html"===A(e))return e;const t=e.assignedSlot||e.parentNode||C(e)&&e.host||z(e);return C(t)?t.host:t}function K(e){const t=X(e);return B(t)?t.ownerDocument.body:L(t)&&F(t)?t:K(t)}function J(e,t){var n;void 0===t&&(t=[]);const r=K(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=_(r);return o?t.concat(i,i.visualViewport||[],F(r)?r:[]):t.concat(r,J(r))}function Z(e,t,n){return"viewport"===t?c(function(e,t){const n=_(e),r=z(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=W();(e||!e&&"fixed"===t)&&(a=o.offsetLeft,s=o.offsetTop)}return{width:i,height:l,x:a,y:s}}(e,n)):D(t)?c(function(e,t){const n=V(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=L(e)?M(e):{x:1,y:1};return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n)):c(function(e){const t=z(e),n=q(e),r=e.ownerDocument.body,o=O(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=O(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+Y(e);const a=-n.scrollTop;return"rtl"===S(r).direction&&(l+=O(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:a}}(z(e)))}function G(e){return L(e)&&"fixed"!==S(e).position?e.offsetParent:null}function Q(e){const t=_(e);let n=G(e);for(;n&&I(n)&&"static"===S(n).position;)n=G(n);return n&&("html"===A(n)||"body"===A(n)&&"static"===S(n).position&&!$(n))?t:n||function(e){let t=X(e);for(;L(t)&&!B(t);){if($(t))return t;t=X(t)}return null}(e)||t}function ee(e,t,n){const r=L(t),o=z(t),i=V(e,!0,"fixed"===n,t);let l={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if(r||!r&&"fixed"!==n)if(("body"!==A(t)||F(o))&&(l=q(t)),L(t)){const e=V(t,!0);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&(a.x=Y(o));return{x:i.left+l.scrollLeft-a.x,y:i.top+l.scrollTop-a.y,width:i.width,height:i.height}}const te={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let r=J(e).filter((e=>D(e)&&"body"!==A(e))),o=null;const i="fixed"===S(e).position;let l=i?X(e):e;for(;D(l)&&!B(l);){const e=S(l),t=$(l);(i?t||o:t||"static"!==e.position||!o||!["absolute","fixed"].includes(o.position))?o=e:r=r.filter((e=>e!==l)),l=X(l)}return t.set(e,r),r}(t,this._c):[].concat(n),l=[...i,r],a=l[0],s=l.reduce(((e,n)=>{const r=Z(t,n,o);return e.top=O(r.top,e.top),e.right=T(r.right,e.right),e.bottom=T(r.bottom,e.bottom),e.left=O(r.left,e.left),e}),Z(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=L(n),i=z(n);if(n===i)return t;let l={scrollLeft:0,scrollTop:0},a={x:1,y:1};const s={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==A(n)||F(i))&&(l=q(n)),L(n))){const e=V(n);a=M(n),s.x=e.x+n.clientLeft,s.y=e.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-l.scrollLeft*a.x+s.x,y:t.y*a.y-l.scrollTop*a.y+s.y}},isElement:D,getDimensions:function(e){return L(e)?E(e):e.getBoundingClientRect()},getOffsetParent:Q,getDocumentElement:z,getScale:M,async getElementRects(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||Q,i=this.getDimensions;return{reference:ee(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===S(e).direction},ne=(e,t,n)=>{const r=new Map,o={platform:te,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,s=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(" ")),s.filter((e=>{let{name:t}=e;return"autoPlacement"===t||"flip"===t})).length>1)throw new Error(["Floating UI: duplicate `flip` and/or `autoPlacement` middleware","detected. This will lead to an infinite loop. Ensure only one of","either has been passed to the `middleware` array."].join(" "));e&&t||console.error(["Floating UI: The reference and/or floating element was not defined","when `computePosition()` was called. Ensure that both elements have","been created and can be measured."].join(" "));let u=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:p}=a(u,r,c),d=r,y={},m=0;for(let n=0;n<s.length;n++){const{name:i,fn:h}=s[n],{x:g,y:v,data:w,reset:b}=await h({x:f,y:p,initialPlacement:r,placement:d,strategy:o,middlewareData:y,rects:u,platform:l,elements:{reference:e,floating:t}});f=null!=g?g:f,p=null!=v?v:p,y={...y,[i]:{...y[i],...w}},m>50&&console.warn(["Floating UI: The middleware lifecycle appears to be running in an","infinite loop. This is usually caused by a `reset` continually","being returned without a break condition."].join(" ")),b&&m<=50&&(m++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(u=!0===b.rects?await l.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:f,y:p}=a(u,d,c))),n=-1)}return{x:f,y:p,placement:d,strategy:o,middlewareData:y}})(e,t,{...o,platform:i})};var re={exports:{}},oe={};
2
2
  /** @license React v16.14.0
3
3
  * react-jsx-runtime.development.js
4
4
  *
@@ -7,9 +7,9 @@
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
9
  */
10
- !function(e){!function(){var t=n.default,r=60103,o=60106;e.Fragment=60107;var i=60108,l=60114,a=60109,s=60110,c=60112,u=60113,f=60120,p=60115,d=60116,y=60121,m=60122,h=60117,g=60129,v=60131;if("function"==typeof Symbol&&Symbol.for){var w=Symbol.for;r=w("react.element"),o=w("react.portal"),e.Fragment=w("react.fragment"),i=w("react.strict_mode"),l=w("react.profiler"),a=w("react.provider"),s=w("react.context"),c=w("react.forward_ref"),u=w("react.suspense"),f=w("react.suspense_list"),p=w("react.memo"),d=w("react.lazy"),y=w("react.block"),m=w("react.server.block"),h=w("react.fundamental"),w("react.scope"),w("react.opaque.id"),g=w("react.debug_trace_mode"),w("react.offscreen"),v=w("react.legacy_hidden")}var b="function"==typeof Symbol&&Symbol.iterator;var x=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function R(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];_("error",e,n)}function _(e,t,n){var r=x.ReactDebugCurrentFrame,o="";if(k){var i=T(k.type),l=k._owner;o+=function(e,t,n){var r="";if(t){var o=t.fileName,i=o.replace(S,"");if(/^index\./.test(i)){var l=o.match(S);if(l){var a=l[1];if(a)i=a.replace(S,"")+"/"+i}}r=" (at "+i+":"+t.lineNumber+")"}else n&&(r=" (created by "+n+")");return"\n in "+(e||"Unknown")+r}(i,k._source,l&&T(l.type))}""!==(o+=r.getStackAddendum())&&(t+="%s",n=n.concat([o]));var a=n.map((function(e){return""+e}));a.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,a)}var S=/^(.*)[\\\/]/;function T(t){if(null==t)return null;if("number"==typeof t.tag&&R("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),"function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t;switch(t){case e.Fragment:return"Fragment";case o:return"Portal";case l:return"Profiler";case i:return"StrictMode";case u:return"Suspense";case f:return"SuspenseList"}if("object"==typeof t)switch(t.$$typeof){case s:return"Context.Consumer";case a:return"Context.Provider";case c:return m=t,h=t.render,g="ForwardRef",v=h.displayName||h.name||"",m.displayName||(""!==v?g+"("+v+")":g);case p:return T(t.type);case y:return T(t.render);case d:var n=1===(r=t)._status?r._result:null;if(n)return T(n)}var r,m,h,g,v;return null}var O={};x.ReactDebugCurrentFrame;var k=null;function E(e){k=e}var A,j,P,L=x.ReactCurrentOwner,D=Object.prototype.hasOwnProperty,N={key:!0,ref:!0,__self:!0,__source:!0};P={};function C(e,t,n,o,i){var l,a={},s=null,c=null;for(l in void 0!==n&&(s=""+n),function(e){if(D.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(t)&&(s=""+t.key),function(e){if(D.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}(t)&&(c=t.ref,function(e,t){if("string"==typeof e.ref&&L.current&&t&&L.current.stateNode!==t){var n=T(L.current.type);P[n]||(R('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',T(L.current.type),e.ref),P[n]=!0)}}(t,i)),t)D.call(t,l)&&!N.hasOwnProperty(l)&&(a[l]=t[l]);if(e&&e.defaultProps){var u=e.defaultProps;for(l in u)void 0===a[l]&&(a[l]=u[l])}if(s||c){var f="function"==typeof e?e.displayName||e.name||"Unknown":e;s&&function(e,t){var n=function(){A||(A=!0,R("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}(a,f),c&&function(e,t){var n=function(){j||(j=!0,R("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}(a,f)}return function(e,t,n,o,i,l,a){var s={$$typeof:r,type:e,key:t,ref:n,props:a,_owner:l,_store:{}};return Object.defineProperty(s._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(s,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(s,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(s.props),Object.freeze(s)),s}(e,s,c,i,o,L.current,a)}var F,I=x.ReactCurrentOwner;function $(e){k=e}function W(e){return"object"==typeof e&&null!==e&&e.$$typeof===r}function H(){if(I.current){var e=T(I.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}x.ReactDebugCurrentFrame,F=!1;var U={};function B(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var t=H();if(!t){var n="string"==typeof e?e:e.displayName||e.name;n&&(t="\n\nCheck the top-level render call using <"+n+">.")}return t}(t);if(!U[n]){U[n]=!0;var r="";e&&e._owner&&e._owner!==I.current&&(r=" It was passed a child from "+T(e._owner.type)+"."),$(e),R('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,r),$(null)}}}function M(e,t){if("object"==typeof e)if(Array.isArray(e))for(var n=0;n<e.length;n++){var r=e[n];W(r)&&B(r,t)}else if(W(e))e._store&&(e._store.validated=!0);else if(e){var o=function(e){if(null===e||"object"!=typeof e)return null;var t=b&&e[b]||e["@@iterator"];return"function"==typeof t?t:null}(e);if("function"==typeof o&&o!==e.entries)for(var i,l=o.call(e);!(i=l.next()).done;)W(i.value)&&B(i.value,t)}}function V(e){var t,n=e.type;if(null!=n&&"string"!=typeof n){if("function"==typeof n)t=n.propTypes;else{if("object"!=typeof n||n.$$typeof!==c&&n.$$typeof!==p)return;t=n.propTypes}if(t){var r=T(n);!function(e,t,n,r,o){var i=Function.call.bind(Object.prototype.hasOwnProperty);for(var l in e)if(i(e,l)){var a=void 0;try{if("function"!=typeof e[l]){var s=Error((r||"React class")+": "+n+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw s.name="Invariant Violation",s}a=e[l](t,l,r,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){a=e}!a||a instanceof Error||(E(o),R("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",r||"React class",n,l,typeof a),E(null)),a instanceof Error&&!(a.message in O)&&(O[a.message]=!0,E(o),R("Failed %s type: %s",n,a.message),E(null))}}(t,e.props,"prop",r,e)}else if(void 0!==n.PropTypes&&!F){F=!0,R("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",T(n)||"Unknown")}"function"!=typeof n.getDefaultProps||n.getDefaultProps.isReactClassApproved||R("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function z(t,n,o,w,b,x){var _=function(t){return"string"==typeof t||"function"==typeof t||t===e.Fragment||t===l||t===g||t===i||t===u||t===f||t===v||"object"==typeof t&&null!==t&&(t.$$typeof===d||t.$$typeof===p||t.$$typeof===a||t.$$typeof===s||t.$$typeof===c||t.$$typeof===h||t.$$typeof===y||t[0]===m)}(t);if(!_){var S="";(void 0===t||"object"==typeof t&&null!==t&&0===Object.keys(t).length)&&(S+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var O,k=function(e){return void 0!==e?"\n\nCheck your code at "+e.fileName.replace(/^.*[\\\/]/,"")+":"+e.lineNumber+".":""}(b);S+=k||H(),null===t?O="null":Array.isArray(t)?O="array":void 0!==t&&t.$$typeof===r?(O="<"+(T(t.type)||"Unknown")+" />",S=" Did you accidentally export a JSX literal instead of a component?"):O=typeof t,R("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",O,S)}var E=C(t,n,o,b,x);if(null==E)return E;if(_){var A=n.children;if(void 0!==A)if(w)if(Array.isArray(A)){for(var j=0;j<A.length;j++)M(A[j],t);Object.freeze&&Object.freeze(A)}else R("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else M(A,t)}return t===e.Fragment?function(e){for(var t=Object.keys(e.props),n=0;n<t.length;n++){var r=t[n];if("children"!==r&&"key"!==r){$(e),R("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",r),$(null);break}}null!==e.ref&&($(e),R("Invalid attribute `ref` supplied to `React.Fragment`."),$(null))}(E):V(E),E}var q=function(e,t,n){return z(e,t,n,!1)},Y=function(e,t,n){return z(e,t,n,!0)};e.jsx=q,e.jsxs=Y}()}(oe),re.exports=oe;var ie,le={exports:{}};
10
+ !function(e){!function(){var t=n.default,r=60103,o=60106;e.Fragment=60107;var i=60108,l=60114,a=60109,s=60110,c=60112,u=60113,f=60120,p=60115,d=60116,y=60121,m=60122,h=60117,g=60129,v=60131;if("function"==typeof Symbol&&Symbol.for){var w=Symbol.for;r=w("react.element"),o=w("react.portal"),e.Fragment=w("react.fragment"),i=w("react.strict_mode"),l=w("react.profiler"),a=w("react.provider"),s=w("react.context"),c=w("react.forward_ref"),u=w("react.suspense"),f=w("react.suspense_list"),p=w("react.memo"),d=w("react.lazy"),y=w("react.block"),m=w("react.server.block"),h=w("react.fundamental"),w("react.scope"),w("react.opaque.id"),g=w("react.debug_trace_mode"),w("react.offscreen"),v=w("react.legacy_hidden")}var b="function"==typeof Symbol&&Symbol.iterator;var x=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function R(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];_("error",e,n)}function _(e,t,n){var r=x.ReactDebugCurrentFrame,o="";if(k){var i=T(k.type),l=k._owner;o+=function(e,t,n){var r="";if(t){var o=t.fileName,i=o.replace(S,"");if(/^index\./.test(i)){var l=o.match(S);if(l){var a=l[1];if(a)i=a.replace(S,"")+"/"+i}}r=" (at "+i+":"+t.lineNumber+")"}else n&&(r=" (created by "+n+")");return"\n in "+(e||"Unknown")+r}(i,k._source,l&&T(l.type))}""!==(o+=r.getStackAddendum())&&(t+="%s",n=n.concat([o]));var a=n.map((function(e){return""+e}));a.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,a)}var S=/^(.*)[\\\/]/;function T(t){if(null==t)return null;if("number"==typeof t.tag&&R("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),"function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t;switch(t){case e.Fragment:return"Fragment";case o:return"Portal";case l:return"Profiler";case i:return"StrictMode";case u:return"Suspense";case f:return"SuspenseList"}if("object"==typeof t)switch(t.$$typeof){case s:return"Context.Consumer";case a:return"Context.Provider";case c:return m=t,h=t.render,g="ForwardRef",v=h.displayName||h.name||"",m.displayName||(""!==v?g+"("+v+")":g);case p:return T(t.type);case y:return T(t.render);case d:var n=1===(r=t)._status?r._result:null;if(n)return T(n)}var r,m,h,g,v;return null}var O={};x.ReactDebugCurrentFrame;var k=null;function E(e){k=e}var A,j,P,L=x.ReactCurrentOwner,D=Object.prototype.hasOwnProperty,N={key:!0,ref:!0,__self:!0,__source:!0};P={};function C(e,t,n,o,i){var l,a={},s=null,c=null;for(l in void 0!==n&&(s=""+n),function(e){if(D.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(t)&&(s=""+t.key),function(e){if(D.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}(t)&&(c=t.ref,function(e,t){if("string"==typeof e.ref&&L.current&&t&&L.current.stateNode!==t){var n=T(L.current.type);P[n]||(R('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',T(L.current.type),e.ref),P[n]=!0)}}(t,i)),t)D.call(t,l)&&!N.hasOwnProperty(l)&&(a[l]=t[l]);if(e&&e.defaultProps){var u=e.defaultProps;for(l in u)void 0===a[l]&&(a[l]=u[l])}if(s||c){var f="function"==typeof e?e.displayName||e.name||"Unknown":e;s&&function(e,t){var n=function(){A||(A=!0,R("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}(a,f),c&&function(e,t){var n=function(){j||(j=!0,R("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}(a,f)}return function(e,t,n,o,i,l,a){var s={$$typeof:r,type:e,key:t,ref:n,props:a,_owner:l,_store:{}};return Object.defineProperty(s._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(s,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(s,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(s.props),Object.freeze(s)),s}(e,s,c,i,o,L.current,a)}var F,I=x.ReactCurrentOwner;function $(e){k=e}function W(e){return"object"==typeof e&&null!==e&&e.$$typeof===r}function B(){if(I.current){var e=T(I.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}x.ReactDebugCurrentFrame,F=!1;var H={};function U(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var t=B();if(!t){var n="string"==typeof e?e:e.displayName||e.name;n&&(t="\n\nCheck the top-level render call using <"+n+">.")}return t}(t);if(!H[n]){H[n]=!0;var r="";e&&e._owner&&e._owner!==I.current&&(r=" It was passed a child from "+T(e._owner.type)+"."),$(e),R('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,r),$(null)}}}function M(e,t){if("object"==typeof e)if(Array.isArray(e))for(var n=0;n<e.length;n++){var r=e[n];W(r)&&U(r,t)}else if(W(e))e._store&&(e._store.validated=!0);else if(e){var o=function(e){if(null===e||"object"!=typeof e)return null;var t=b&&e[b]||e["@@iterator"];return"function"==typeof t?t:null}(e);if("function"==typeof o&&o!==e.entries)for(var i,l=o.call(e);!(i=l.next()).done;)W(i.value)&&U(i.value,t)}}function V(e){var t,n=e.type;if(null!=n&&"string"!=typeof n){if("function"==typeof n)t=n.propTypes;else{if("object"!=typeof n||n.$$typeof!==c&&n.$$typeof!==p)return;t=n.propTypes}if(t){var r=T(n);!function(e,t,n,r,o){var i=Function.call.bind(Object.prototype.hasOwnProperty);for(var l in e)if(i(e,l)){var a=void 0;try{if("function"!=typeof e[l]){var s=Error((r||"React class")+": "+n+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw s.name="Invariant Violation",s}a=e[l](t,l,r,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){a=e}!a||a instanceof Error||(E(o),R("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",r||"React class",n,l,typeof a),E(null)),a instanceof Error&&!(a.message in O)&&(O[a.message]=!0,E(o),R("Failed %s type: %s",n,a.message),E(null))}}(t,e.props,"prop",r,e)}else if(void 0!==n.PropTypes&&!F){F=!0,R("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",T(n)||"Unknown")}"function"!=typeof n.getDefaultProps||n.getDefaultProps.isReactClassApproved||R("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function z(t,n,o,w,b,x){var _=function(t){return"string"==typeof t||"function"==typeof t||t===e.Fragment||t===l||t===g||t===i||t===u||t===f||t===v||"object"==typeof t&&null!==t&&(t.$$typeof===d||t.$$typeof===p||t.$$typeof===a||t.$$typeof===s||t.$$typeof===c||t.$$typeof===h||t.$$typeof===y||t[0]===m)}(t);if(!_){var S="";(void 0===t||"object"==typeof t&&null!==t&&0===Object.keys(t).length)&&(S+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var O,k=function(e){return void 0!==e?"\n\nCheck your code at "+e.fileName.replace(/^.*[\\\/]/,"")+":"+e.lineNumber+".":""}(b);S+=k||B(),null===t?O="null":Array.isArray(t)?O="array":void 0!==t&&t.$$typeof===r?(O="<"+(T(t.type)||"Unknown")+" />",S=" Did you accidentally export a JSX literal instead of a component?"):O=typeof t,R("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",O,S)}var E=C(t,n,o,b,x);if(null==E)return E;if(_){var A=n.children;if(void 0!==A)if(w)if(Array.isArray(A)){for(var j=0;j<A.length;j++)M(A[j],t);Object.freeze&&Object.freeze(A)}else R("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else M(A,t)}return t===e.Fragment?function(e){for(var t=Object.keys(e.props),n=0;n<t.length;n++){var r=t[n];if("children"!==r&&"key"!==r){$(e),R("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",r),$(null);break}}null!==e.ref&&($(e),R("Invalid attribute `ref` supplied to `React.Fragment`."),$(null))}(E):V(E),E}var q=function(e,t,n){return z(e,t,n,!1)},Y=function(e,t,n){return z(e,t,n,!0)};e.jsx=q,e.jsxs=Y}()}(oe),re.exports=oe;var ie,le={exports:{}};
11
11
  /*!
12
12
  Copyright (c) 2018 Jed Watson.
13
13
  Licensed under the MIT License (MIT), see
14
14
  http://jedwatson.github.io/classnames
15
- */ie=le,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(" ")}ie.exports?(t.default=t,ie.exports=t):window.classNames=t}();var ae=le.exports;const se=(e,t,n)=>{let r=null;return function(...o){r&&clearTimeout(r),r=setTimeout((()=>{r=null,n||e.apply(this,o)}),t)}},ce=({content:e})=>re.exports.jsx("span",{dangerouslySetInnerHTML:{__html:e}}),ue={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},fe={getTooltipData:()=>ue},pe=e.createContext(fe);function de(t="DEFAULT_TOOLTIP_ID"){return e.useContext(pe).getTooltipData(t)}const ye=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:n=null,place:i="top",offset:a=10,strategy:c="absolute",middlewares:u=[x(Number(a)),b(),R({padding:5})]})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{}};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{}};const f=u;return n?(f.push({name:"arrow",options:p={element:n,padding:5},async fn(e){const{element:t,padding:n=0}=p||{},{x:i,y:a,placement:c,rects:u,platform:f}=e;if(null==t)return console.warn("Floating UI: No `element` was passed to the `arrow` middleware."),{};const y=s(n),m={x:i,y:a},h=l(c),g=o(h),v=await f.getDimensions(t),w="y"===h?"top":"left",b="y"===h?"bottom":"right",x=u.reference[g]+u.reference[h]-m[h]-u.floating[g],R=m[h]-u.reference[h],_=await(null==f.getOffsetParent?void 0:f.getOffsetParent(t));let S=_?"y"===h?_.clientHeight||0:_.clientWidth||0:0;0===S&&(S=u.floating[g]);const T=x/2-R/2,O=y[w],k=S-v[g]-y[b],E=S/2-v[g]/2+T,A=d(O,E,k),j=null!=r(c)&&E!=A&&u.reference[g]/2-(E<O?y[w]:y[b])-v[g]/2<0;return{[h]:m[h]-(j?E<O?O-E:k-E:0),data:{[h]:A,centerOffset:E-A}}}}),ne(e,t,{placement:i,strategy:c,middleware:f}).then((({x:e,y:t,placement:n,middlewareData:r})=>{var o,i;const l={left:`${e}px`,top:`${t}px`},{x:a,y:s}=null!==(o=r.arrow)&&void 0!==o?o:{x:0,y:0};return{tooltipStyles:l,tooltipArrowStyles:{left:null!=a?`${a}px`:"",top:null!=s?`${s}px`:"",right:"",bottom:"",[null!==(i={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==i?i:"bottom"]:"-4px"}}}))):ne(e,t,{placement:"bottom",strategy:c,middleware:f}).then((({x:e,y:t})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{}})));var p};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:t,className:n,classNameArrow:r,variant:o="dark",anchorId:i,place:l="top",offset:a=10,events:s=["hover"],positionStrategy:c="absolute",middlewares:u,wrapper:f,children:p=null,delayShow:d=0,delayHide:y=0,float:m=!1,noArrow:h=!1,clickable:g=!1,closeOnEsc:v=!1,style:w,position:b,afterShow:x,afterHide:R,content:_,html:S,isOpen:T,setIsOpen:O})=>{const k=e.useRef(null),E=e.useRef(null),A=e.useRef(null),j=e.useRef(null),[P,L]=e.useState({}),[D,N]=e.useState({}),[C,F]=e.useState(!1),I=e.useRef(!1),[$,W]=e.useState(!1),H=e.useRef(null),{anchorRefs:U,setActiveAnchor:B}=de(t),[M,V]=e.useState({current:null}),z=e.useRef(!1),q=e=>{O?O(e):void 0===T&&F(e)};e.useEffect((()=>{C!==I.current&&(I.current=C,C?null==x||x():null==R||R())}),[C]);const Y=(e=y)=>{j.current&&clearTimeout(j.current),j.current=setTimeout((()=>{z.current||q(!1)}),e)},X=e=>{var t;if(!e)return;d?(A.current&&clearTimeout(A.current),A.current=setTimeout((()=>{q(!0)}),d)):q(!0);const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;V((e=>e.current===n?e:{current:n})),B({current:n}),j.current&&clearTimeout(j.current)},K=()=>{g?Y(y||50):y?Y():q(!1),A.current&&clearTimeout(A.current)},J=({x:e,y:t})=>{const n={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};W(!0),ye({place:l,offset:a,elementReference:n,tooltipReference:k.current,tooltipArrowReference:E.current,strategy:c,middlewares:u}).then((e=>{W(!1),Object.keys(e.tooltipStyles).length&&L(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&N(e.tooltipArrowStyles)}))},Z=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};J(n),H.current=n},G=e=>{X(e),y&&Y()},Q=e=>{var t;(null===(t=M.current)||void 0===t?void 0:t.contains(e.target))||q(!1)},ee=e=>{"Escape"===e.key&&q(!1)},te=se(X,50),ne=se(K,50);e.useEffect((()=>{var e,t;const n=new Set(U),r=document.querySelector(`[id='${i}']`);if(r&&(V((e=>e.current===r?e:{current:r})),n.add({current:r})),!n.size)return()=>null;v&&window.addEventListener("keydown",ee);const o=[];s.find((e=>"click"===e))&&(window.addEventListener("click",Q),o.push({event:"click",listener:G})),s.find((e=>"hover"===e))&&(o.push({event:"mouseenter",listener:te},{event:"mouseleave",listener:ne},{event:"focus",listener:te},{event:"blur",listener:ne}),m&&o.push({event:"mousemove",listener:Z}));const l=()=>{z.current=!0},a=()=>{z.current=!1,K()};g&&(null===(e=k.current)||void 0===e||e.addEventListener("mouseenter",l),null===(t=k.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)}))}));const c=null!=r?r:M.current,u=new MutationObserver((e=>{c&&e.some((e=>"childList"===e.type&&[...e.removedNodes].some((e=>!!e.contains(c)&&(q(!1),!0)))))}));return u.observe(document.body,{attributes:!1,childList:!0,subtree:!0}),()=>{var e,t;s.find((e=>"click"===e))&&window.removeEventListener("click",Q),v&&window.removeEventListener("keydown",ee),g&&(null===(e=k.current)||void 0===e||e.removeEventListener("mouseenter",l),null===(t=k.current)||void 0===t||t.removeEventListener("mouseleave",a)),o.forEach((({event:e,listener:t})=>{n.forEach((n=>{var r;null===(r=n.current)||void 0===r||r.removeEventListener(e,t)}))})),u.disconnect()}}),[U,M,v,i,s,y,d]),e.useEffect((()=>{if(b)return J(b),()=>null;if(m)return H.current&&J(H.current),()=>null;let e=M.current;i&&(e=document.querySelector(`[id='${i}']`)),W(!0);let t=!0;return ye({place:l,offset:a,elementReference:e,tooltipReference:k.current,tooltipArrowReference:E.current,strategy:c,middlewares:u}).then((e=>{t&&(W(!1),Object.keys(e.tooltipStyles).length&&L(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&N(e.tooltipArrowStyles))})),()=>{t=!1}}),[C,T,i,M,_,S,l,a,c,b]),e.useEffect((()=>()=>{A.current&&clearTimeout(A.current),j.current&&clearTimeout(j.current)}),[]);const oe=Boolean(S||_||p);return re.exports.jsxs(f,{id:t,role:"tooltip",className:ae("react-tooltip",me.tooltip,me[o],n,{[me.show]:oe&&!$&&(T||C),[me.fixed]:"fixed"===c,[me.clickable]:g}),style:{...w,...P},ref:k,children:[p||S&&re.exports.jsx(ce,{content:S})||_,re.exports.jsx(f,{className:ae("react-tooltip-arrow",me.arrow,r,{[me["no-arrow"]]:h}),style:D,ref:E})]})};exports.Tooltip=({id:t,anchorId:n,content:r,html:o,className:i,classNameArrow:l,variant:a="dark",place:s="top",offset:c=10,wrapper:u="div",children:f=null,events:p=["hover"],positionStrategy:d="absolute",middlewares:y,delayShow:m=0,delayHide:h=0,float:g=!1,noArrow:v=!1,clickable:w=!1,closeOnEsc:b=!1,style:x,position:R,isOpen:_,setIsOpen:S,afterShow:T,afterHide:O})=>{const[k,E]=e.useState(r),[A,j]=e.useState(o),[P,L]=e.useState(s),[D,N]=e.useState(a),[C,F]=e.useState(c),[I,$]=e.useState(m),[W,H]=e.useState(h),[U,B]=e.useState(g),[M,V]=e.useState(u),[z,q]=e.useState(p),[Y,X]=e.useState(d),{anchorRefs:K,activeAnchor:J}=de(t),Z=e=>null==e?void 0:e.getAttributeNames().reduce(((t,n)=>{var r;if(n.startsWith("data-tooltip-")){t[n.replace(/^data-tooltip-/,"")]=null!==(r=null==e?void 0:e.getAttribute(n))&&void 0!==r?r:null}return t}),{}),G=e=>{const t={place:e=>{var t;L(null!==(t=e)&&void 0!==t?t:s)},content:e=>{E(null!=e?e:r)},html:e=>{j(null!=e?e:o)},variant:e=>{var t;N(null!==(t=e)&&void 0!==t?t:a)},offset:e=>{F(null===e?c:Number(e))},wrapper:e=>{var t;V(null!==(t=e)&&void 0!==t?t:u)},events:e=>{const t=null==e?void 0:e.split(" ");q(null!=t?t:p)},"position-strategy":e=>{var t;X(null!==(t=e)&&void 0!==t?t:d)},"delay-show":e=>{$(null===e?m:Number(e))},"delay-hide":e=>{H(null===e?h:Number(e))},float:e=>{B(null===e?g:Boolean(e))}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,n])=>{var r;null===(r=t[e])||void 0===r||r.call(t,n)}))};e.useEffect((()=>{E(r)}),[r]),e.useEffect((()=>{j(o)}),[o]),e.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:t,anchorId:n,className:i,classNameArrow:l,content:k,html:A,place:P,variant:D,offset:C,wrapper:M,events:z,positionStrategy:Y,middlewares:y,delayShow:I,delayHide:W,float:U,noArrow:v,clickable:w,closeOnEsc:b,style:x,position:R,isOpen:_,setIsOpen:S,afterShow:T,afterHide:O};return f?re.exports.jsx(he,{...Q,children:f}):re.exports.jsx(he,{...Q})},exports.TooltipProvider=({children:t})=>{const[n,r]=e.useState({DEFAULT_TOOLTIP_ID:new Set}),[o,i]=e.useState({DEFAULT_TOOLTIP_ID:{current:null}}),l=(e,...t)=>{r((n=>{var r;const o=null!==(r=n[e])&&void 0!==r?r:new Set;return t.forEach((e=>o.add(e))),{...n,[e]:new Set(o)}}))},a=(e,...t)=>{r((n=>{const r=n[e];return r?(t.forEach((e=>r.delete(e))),{...n}):n}))},s=e.useCallback(((e="DEFAULT_TOOLTIP_ID")=>{var t,r;return{anchorRefs:null!==(t=n[e])&&void 0!==t?t:new Set,activeAnchor:null!==(r=o[e])&&void 0!==r?r:{current:null},attach:(...t)=>l(e,...t),detach:(...t)=>a(e,...t),setActiveAnchor:t=>((e,t)=>{i((n=>{var r;return(null===(r=n[e])||void 0===r?void 0:r.current)===t.current?n:{...n,[e]:t}}))})(e,t)}}),[n,o,l,a]),c=e.useMemo((()=>({getTooltipData:s})),[s]);return re.exports.jsx(pe.Provider,{value:c,children:t})},exports.TooltipWrapper=({tooltipId:t,children:n,className:r,place:o,content:i,html:l,variant:a,offset:s,wrapper:c,events:u,positionStrategy:f,delayShow:p,delayHide:d})=>{const{attach:y,detach:m}=de(t),h=e.useRef(null);return e.useEffect((()=>(y(h),()=>{m(h)})),[]),re.exports.jsx("span",{ref:h,className:ae("react-tooltip-wrapper",r),"data-tooltip-place":o,"data-tooltip-content":i,"data-tooltip-html":l,"data-tooltip-variant":a,"data-tooltip-offset":s,"data-tooltip-wrapper":c,"data-tooltip-events":u,"data-tooltip-position-strategy":f,"data-tooltip-delay-show":p,"data-tooltip-delay-hide":d,children:n})},exports.autoPlacement=function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,o,l;const{rects:a,middlewareData:s,placement:c,platform:f,elements:p}=t,{alignment:d,allowedPlacements:m=y,autoAlignment:h=!0,...v}=e,b=void 0!==d||m===y?function(e,t,n){return(e?[...n.filter((t=>r(t)===e)),...n.filter((t=>r(t)!==e))]:n.filter((e=>i(e)===e))).filter((n=>!e||r(n)===e||!!t&&w(n)!==n))}(d||null,h,m):m,x=await u(t,v),R=(null==(n=s.autoPlacement)?void 0:n.index)||0,_=b[R];if(null==_)return{};const{main:S,cross:T}=g(_,a,await(null==f.isRTL?void 0:f.isRTL(p.floating)));if(c!==_)return{reset:{placement:b[0]}};const O=[x[i(_)],x[S],x[T]],k=[...(null==(o=s.autoPlacement)?void 0:o.overflows)||[],{placement:_,overflows:O}],E=b[R+1];if(E)return{data:{index:R+1,overflows:k},reset:{placement:E}};const A=k.slice().sort(((e,t)=>e.overflows[0]-t.overflows[0])),j=null==(l=A.find((e=>{let{overflows:t}=e;return t.every((e=>e<=0))})))?void 0:l.placement,P=j||A[0].placement;return P!==c?{data:{index:R+1,overflows:k},reset:{placement:P}}:{}}}},exports.flip=b,exports.inline=function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){const{placement:n,elements:r,rects:o,platform:a,strategy:u}=t,{padding:d=2,x:y,y:m}=e,h=c(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({rect:o.reference,offsetParent:await(null==a.getOffsetParent?void 0:a.getOffsetParent(r.floating)),strategy:u}):o.reference),g=await(null==a.getClientRects?void 0:a.getClientRects(r.reference))||[],v=s(d);const w=await a.getElementRects({reference:{getBoundingClientRect:function(){if(2===g.length&&g[0].left>g[1].right&&null!=y&&null!=m)return g.find((e=>y>e.left-v.left&&y<e.right+v.right&&m>e.top-v.top&&m<e.bottom+v.bottom))||h;if(g.length>=2){if("x"===l(n)){const e=g[0],t=g[g.length-1],r="top"===i(n),o=e.top,l=t.bottom,a=r?e.left:t.left,s=r?e.right:t.right;return{top:o,bottom:l,left:a,right:s,width:s-a,height:l-o,x:a,y:o}}const e="left"===i(n),t=p(...g.map((e=>e.right))),r=f(...g.map((e=>e.left))),o=g.filter((n=>e?n.left===r:n.right===t)),a=o[0].top,s=o[o.length-1].bottom;return{top:a,bottom:s,left:r,right:t,width:t-r,height:s-a,x:r,y:a}}return h}},floating:r.floating,strategy:u});return o.reference.x!==w.reference.x||o.reference.y!==w.reference.y||o.reference.width!==w.reference.width||o.reference.height!==w.reference.height?{reset:{rects:w}}:{}}}},exports.offset=x,exports.shift=R,exports.size=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:o,platform:l,elements:a}=t,{apply:s=(()=>{}),...c}=e,f=await u(t,c),d=i(n),y=r(n);let m,h;"top"===d||"bottom"===d?(m=d,h=y===(await(null==l.isRTL?void 0:l.isRTL(a.floating))?"start":"end")?"left":"right"):(h=d,m="end"===y?"top":"bottom");const g=p(f.left,0),v=p(f.right,0),w=p(f.top,0),b=p(f.bottom,0),x={availableHeight:o.floating.height-(["left","right"].includes(n)?2*(0!==w||0!==b?w+b:p(f.top,f.bottom)):f[m]),availableWidth:o.floating.width-(["top","bottom"].includes(n)?2*(0!==g||0!==v?g+v:p(f.left,f.right)):f[h])};await s({...t,...x});const R=await l.getDimensions(a.floating);return o.floating.width!==R.width||o.floating.height!==R.height?{reset:{rects:!0}}:{}}}};
15
+ */ie=le,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(" ")}ie.exports?(t.default=t,ie.exports=t):window.classNames=t}();var ae=le.exports;const se=(e,t,n)=>{let r=null;return function(...o){r&&clearTimeout(r),r=setTimeout((()=>{r=null,n||e.apply(this,o)}),t)}},ce=({content:e})=>re.exports.jsx("span",{dangerouslySetInnerHTML:{__html:e}}),ue={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},fe={getTooltipData:()=>ue},pe=e.createContext(fe);function de(t="DEFAULT_TOOLTIP_ID"){return e.useContext(pe).getTooltipData(t)}const ye=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:n=null,place:i="top",offset:a=10,strategy:c="absolute",middlewares:u=[x(Number(a)),b(),R({padding:5})]})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{}};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{}};const f=u;return n?(f.push({name:"arrow",options:p={element:n,padding:5},async fn(e){const{element:t,padding:n=0}=p||{},{x:i,y:a,placement:c,rects:u,platform:f}=e;if(null==t)return console.warn("Floating UI: No `element` was passed to the `arrow` middleware."),{};const y=s(n),m={x:i,y:a},h=l(c),g=o(h),v=await f.getDimensions(t),w="y"===h?"top":"left",b="y"===h?"bottom":"right",x=u.reference[g]+u.reference[h]-m[h]-u.floating[g],R=m[h]-u.reference[h],_=await(null==f.getOffsetParent?void 0:f.getOffsetParent(t));let S=_?"y"===h?_.clientHeight||0:_.clientWidth||0:0;0===S&&(S=u.floating[g]);const T=x/2-R/2,O=y[w],k=S-v[g]-y[b],E=S/2-v[g]/2+T,A=d(O,E,k),j=null!=r(c)&&E!=A&&u.reference[g]/2-(E<O?y[w]:y[b])-v[g]/2<0;return{[h]:m[h]-(j?E<O?O-E:k-E:0),data:{[h]:A,centerOffset:E-A}}}}),ne(e,t,{placement:i,strategy:c,middleware:f}).then((({x:e,y:t,placement:n,middlewareData:r})=>{var o,i;const l={left:`${e}px`,top:`${t}px`},{x:a,y:s}=null!==(o=r.arrow)&&void 0!==o?o:{x:0,y:0};return{tooltipStyles:l,tooltipArrowStyles:{left:null!=a?`${a}px`:"",top:null!=s?`${s}px`:"",right:"",bottom:"",[null!==(i={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==i?i:"bottom"]:"-4px"}}}))):ne(e,t,{placement:"bottom",strategy:c,middleware:f}).then((({x:e,y:t})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{}})));var p};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:t,className:n,classNameArrow:r,variant:o="dark",anchorId:i,place:l="top",offset:a=10,events:s=["hover"],positionStrategy:c="absolute",middlewares:u,wrapper:f,children:p=null,delayShow:d=0,delayHide:y=0,float:m=!1,noArrow:h=!1,clickable:g=!1,closeOnEsc:v=!1,style:w,position:b,afterShow:x,afterHide:R,content:_,html:S,isOpen:T,setIsOpen:O})=>{const k=e.useRef(null),E=e.useRef(null),A=e.useRef(null),j=e.useRef(null),[P,L]=e.useState({}),[D,N]=e.useState({}),[C,F]=e.useState(!1),[I,$]=e.useState(!1),W=e.useRef(!1),B=e.useRef(null),{anchorRefs:H,setActiveAnchor:U}=de(t),[M,V]=e.useState({current:null}),z=e.useRef(!1);e.useEffect((()=>{C||$(!1)}),[C]);const q=e=>{$(!0),setTimeout((()=>{null==O||O(e),void 0===T&&F(e)}),10)};e.useEffect((()=>{if(void 0===T)return()=>null;T&&$(!0);const e=setTimeout((()=>{F(T)}),10);return()=>{clearTimeout(e)}}),[T]),e.useEffect((()=>{C!==W.current&&(W.current=C,C?null==x||x():null==R||R())}),[C]);const Y=(e=y)=>{j.current&&clearTimeout(j.current),j.current=setTimeout((()=>{z.current||q(!1)}),e)},X=e=>{var t;if(!e)return;d?(A.current&&clearTimeout(A.current),A.current=setTimeout((()=>{q(!0)}),d)):q(!0);const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;V((e=>e.current===n?e:{current:n})),U({current:n}),j.current&&clearTimeout(j.current)},K=()=>{g?Y(y||100):y?Y():q(!1),A.current&&clearTimeout(A.current)},J=({x:e,y:t})=>{ye({place:l,offset:a,elementReference:{getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})},tooltipReference:k.current,tooltipArrowReference:E.current,strategy:c,middlewares:u}).then((e=>{Object.keys(e.tooltipStyles).length&&L(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&N(e.tooltipArrowStyles)}))},Z=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};J(n),B.current=n},G=e=>{X(e),y&&Y()},Q=e=>{var t;(null===(t=M.current)||void 0===t?void 0:t.contains(e.target))||q(!1)},ee=e=>{"Escape"===e.key&&q(!1)},te=se(X,50),ne=se(K,50);e.useEffect((()=>{var e,t;const n=new Set(H),r=document.querySelector(`[id='${i}']`);if(r&&(V((e=>e.current===r?e:{current:r})),n.add({current:r})),!n.size)return()=>null;v&&window.addEventListener("keydown",ee);const o=[];s.find((e=>"click"===e))&&(window.addEventListener("click",Q),o.push({event:"click",listener:G})),s.find((e=>"hover"===e))&&(o.push({event:"mouseenter",listener:te},{event:"mouseleave",listener:ne},{event:"focus",listener:te},{event:"blur",listener:ne}),m&&o.push({event:"mousemove",listener:Z}));const l=()=>{z.current=!0},a=()=>{z.current=!1,K()};g&&(null===(e=k.current)||void 0===e||e.addEventListener("mouseenter",l),null===(t=k.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)}))}));const c=null!=r?r:M.current,u=new MutationObserver((e=>{c&&e.some((e=>"childList"===e.type&&[...e.removedNodes].some((e=>!!e.contains(c)&&(q(!1),!0)))))}));return u.observe(document.body,{attributes:!1,childList:!0,subtree:!0}),()=>{var e,t;s.find((e=>"click"===e))&&window.removeEventListener("click",Q),v&&window.removeEventListener("keydown",ee),g&&(null===(e=k.current)||void 0===e||e.removeEventListener("mouseenter",l),null===(t=k.current)||void 0===t||t.removeEventListener("mouseleave",a)),o.forEach((({event:e,listener:t})=>{n.forEach((n=>{var r;null===(r=n.current)||void 0===r||r.removeEventListener(e,t)}))})),u.disconnect()}}),[I,H,M,v,i,s,y,d]),e.useEffect((()=>{if(b)return J(b),()=>null;if(m)return B.current&&J(B.current),()=>null;let e=M.current;i&&(e=document.querySelector(`[id='${i}']`));let t=!0;return ye({place:l,offset:a,elementReference:e,tooltipReference:k.current,tooltipArrowReference:E.current,strategy:c,middlewares:u}).then((e=>{t&&(Object.keys(e.tooltipStyles).length&&L(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&N(e.tooltipArrowStyles))})),()=>{t=!1}}),[C,i,M,_,S,l,a,c,b]),e.useEffect((()=>()=>{A.current&&clearTimeout(A.current),j.current&&clearTimeout(j.current)}),[]);const oe=Boolean(S||_||p),ie=Boolean(oe&&C&&Object.keys(P).length>0);return I?re.exports.jsxs(f,{id:t,role:"tooltip",className:ae("react-tooltip",me.tooltip,me[o],n,{[me.show]:ie,[me.fixed]:"fixed"===c,[me.clickable]:g}),style:{...w,...P},ref:k,children:[p||S&&re.exports.jsx(ce,{content:S})||_,re.exports.jsx(f,{className:ae("react-tooltip-arrow",me.arrow,r,{[me["no-arrow"]]:h}),style:D,ref:E})]}):null};exports.Tooltip=({id:t,anchorId:n,content:r,html:o,className:i,classNameArrow:l,variant:a="dark",place:s="top",offset:c=10,wrapper:u="div",children:f=null,events:p=["hover"],positionStrategy:d="absolute",middlewares:y,delayShow:m=0,delayHide:h=0,float:g=!1,noArrow:v=!1,clickable:w=!1,closeOnEsc:b=!1,style:x,position:R,isOpen:_,setIsOpen:S,afterShow:T,afterHide:O})=>{const[k,E]=e.useState(r),[A,j]=e.useState(o),[P,L]=e.useState(s),[D,N]=e.useState(a),[C,F]=e.useState(c),[I,$]=e.useState(m),[W,B]=e.useState(h),[H,U]=e.useState(g),[M,V]=e.useState(u),[z,q]=e.useState(p),[Y,X]=e.useState(d),{anchorRefs:K,activeAnchor:J}=de(t),Z=e=>null==e?void 0:e.getAttributeNames().reduce(((t,n)=>{var r;if(n.startsWith("data-tooltip-")){t[n.replace(/^data-tooltip-/,"")]=null!==(r=null==e?void 0:e.getAttribute(n))&&void 0!==r?r:null}return t}),{}),G=e=>{const t={place:e=>{var t;L(null!==(t=e)&&void 0!==t?t:s)},content:e=>{E(null!=e?e:r)},html:e=>{j(null!=e?e:o)},variant:e=>{var t;N(null!==(t=e)&&void 0!==t?t:a)},offset:e=>{F(null===e?c:Number(e))},wrapper:e=>{var t;V(null!==(t=e)&&void 0!==t?t:u)},events:e=>{const t=null==e?void 0:e.split(" ");q(null!=t?t:p)},"position-strategy":e=>{var t;X(null!==(t=e)&&void 0!==t?t:d)},"delay-show":e=>{$(null===e?m:Number(e))},"delay-hide":e=>{B(null===e?h:Number(e))},float:e=>{U(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((()=>{E(r)}),[r]),e.useEffect((()=>{j(o)}),[o]),e.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:t,anchorId:n,className:i,classNameArrow:l,content:k,html:A,place:P,variant:D,offset:C,wrapper:M,events:z,positionStrategy:Y,middlewares:y,delayShow:I,delayHide:W,float:H,noArrow:v,clickable:w,closeOnEsc:b,style:x,position:R,isOpen:_,setIsOpen:S,afterShow:T,afterHide:O};return f?re.exports.jsx(he,{...Q,children:f}):re.exports.jsx(he,{...Q})},exports.TooltipProvider=({children:t})=>{const[n,r]=e.useState({DEFAULT_TOOLTIP_ID:new Set}),[o,i]=e.useState({DEFAULT_TOOLTIP_ID:{current:null}}),l=(e,...t)=>{r((n=>{var r;const o=null!==(r=n[e])&&void 0!==r?r:new Set;return t.forEach((e=>o.add(e))),{...n,[e]:new Set(o)}}))},a=(e,...t)=>{r((n=>{const r=n[e];return r?(t.forEach((e=>r.delete(e))),{...n}):n}))},s=e.useCallback(((e="DEFAULT_TOOLTIP_ID")=>{var t,r;return{anchorRefs:null!==(t=n[e])&&void 0!==t?t:new Set,activeAnchor:null!==(r=o[e])&&void 0!==r?r:{current:null},attach:(...t)=>l(e,...t),detach:(...t)=>a(e,...t),setActiveAnchor:t=>((e,t)=>{i((n=>{var r;return(null===(r=n[e])||void 0===r?void 0:r.current)===t.current?n:{...n,[e]:t}}))})(e,t)}}),[n,o,l,a]),c=e.useMemo((()=>({getTooltipData:s})),[s]);return re.exports.jsx(pe.Provider,{value:c,children:t})},exports.TooltipWrapper=({tooltipId:t,children:n,className:r,place:o,content:i,html:l,variant:a,offset:s,wrapper:c,events:u,positionStrategy:f,delayShow:p,delayHide:d})=>{const{attach:y,detach:m}=de(t),h=e.useRef(null);return e.useEffect((()=>(y(h),()=>{m(h)})),[]),re.exports.jsx("span",{ref:h,className:ae("react-tooltip-wrapper",r),"data-tooltip-place":o,"data-tooltip-content":i,"data-tooltip-html":l,"data-tooltip-variant":a,"data-tooltip-offset":s,"data-tooltip-wrapper":c,"data-tooltip-events":u,"data-tooltip-position-strategy":f,"data-tooltip-delay-show":p,"data-tooltip-delay-hide":d,children:n})},exports.autoPlacement=function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,o,l;const{rects:a,middlewareData:s,placement:c,platform:f,elements:p}=t,{alignment:d,allowedPlacements:m=y,autoAlignment:h=!0,...v}=e,b=void 0!==d||m===y?function(e,t,n){return(e?[...n.filter((t=>r(t)===e)),...n.filter((t=>r(t)!==e))]:n.filter((e=>i(e)===e))).filter((n=>!e||r(n)===e||!!t&&w(n)!==n))}(d||null,h,m):m,x=await u(t,v),R=(null==(n=s.autoPlacement)?void 0:n.index)||0,_=b[R];if(null==_)return{};const{main:S,cross:T}=g(_,a,await(null==f.isRTL?void 0:f.isRTL(p.floating)));if(c!==_)return{reset:{placement:b[0]}};const O=[x[i(_)],x[S],x[T]],k=[...(null==(o=s.autoPlacement)?void 0:o.overflows)||[],{placement:_,overflows:O}],E=b[R+1];if(E)return{data:{index:R+1,overflows:k},reset:{placement:E}};const A=k.slice().sort(((e,t)=>e.overflows[0]-t.overflows[0])),j=null==(l=A.find((e=>{let{overflows:t}=e;return t.every((e=>e<=0))})))?void 0:l.placement,P=j||A[0].placement;return P!==c?{data:{index:R+1,overflows:k},reset:{placement:P}}:{}}}},exports.flip=b,exports.inline=function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){const{placement:n,elements:r,rects:o,platform:a,strategy:u}=t,{padding:d=2,x:y,y:m}=e,h=c(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({rect:o.reference,offsetParent:await(null==a.getOffsetParent?void 0:a.getOffsetParent(r.floating)),strategy:u}):o.reference),g=await(null==a.getClientRects?void 0:a.getClientRects(r.reference))||[],v=s(d);const w=await a.getElementRects({reference:{getBoundingClientRect:function(){if(2===g.length&&g[0].left>g[1].right&&null!=y&&null!=m)return g.find((e=>y>e.left-v.left&&y<e.right+v.right&&m>e.top-v.top&&m<e.bottom+v.bottom))||h;if(g.length>=2){if("x"===l(n)){const e=g[0],t=g[g.length-1],r="top"===i(n),o=e.top,l=t.bottom,a=r?e.left:t.left,s=r?e.right:t.right;return{top:o,bottom:l,left:a,right:s,width:s-a,height:l-o,x:a,y:o}}const e="left"===i(n),t=p(...g.map((e=>e.right))),r=f(...g.map((e=>e.left))),o=g.filter((n=>e?n.left===r:n.right===t)),a=o[0].top,s=o[o.length-1].bottom;return{top:a,bottom:s,left:r,right:t,width:t-r,height:s-a,x:r,y:a}}return h}},floating:r.floating,strategy:u});return o.reference.x!==w.reference.x||o.reference.y!==w.reference.y||o.reference.width!==w.reference.width||o.reference.height!==w.reference.height?{reset:{rects:w}}:{}}}},exports.offset=x,exports.shift=R,exports.size=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:o,platform:l,elements:a}=t,{apply:s=(()=>{}),...c}=e,f=await u(t,c),d=i(n),y=r(n);let m,h;"top"===d||"bottom"===d?(m=d,h=y===(await(null==l.isRTL?void 0:l.isRTL(a.floating))?"start":"end")?"left":"right"):(h=d,m="end"===y?"top":"bottom");const g=p(f.left,0),v=p(f.right,0),w=p(f.top,0),b=p(f.bottom,0),x={availableHeight:o.floating.height-(["left","right"].includes(n)?2*(0!==w||0!==b?w+b:p(f.top,f.bottom)):f[m]),availableWidth:o.floating.width-(["top","bottom"].includes(n)?2*(0!==g||0!==v?g+v:p(f.left,f.right)):f[h])};await s({...t,...x});const R=await l.getDimensions(a.floating);return o.floating.width!==R.width||o.floating.height!==R.height?{reset:{rects:!0}}:{}}}};
@@ -2668,20 +2668,48 @@ content, html, isOpen, setIsOpen, }) => {
2668
2668
  const [inlineStyles, setInlineStyles] = useState({});
2669
2669
  const [inlineArrowStyles, setInlineArrowStyles] = useState({});
2670
2670
  const [show, setShow] = useState(false);
2671
+ const [rendered, setRendered] = useState(false);
2671
2672
  const wasShowing = useRef(false);
2672
- const [calculatingPosition, setCalculatingPosition] = useState(false);
2673
2673
  const lastFloatPosition = useRef(null);
2674
2674
  const { anchorRefs, setActiveAnchor: setProviderActiveAnchor } = useTooltip(id);
2675
2675
  const [activeAnchor, setActiveAnchor] = useState({ current: null });
2676
2676
  const hoveringTooltip = useRef(false);
2677
+ useEffect(() => {
2678
+ if (!show) {
2679
+ setRendered(false);
2680
+ }
2681
+ }, [show]);
2677
2682
  const handleShow = (value) => {
2678
- if (setIsOpen) {
2679
- setIsOpen(value);
2683
+ setRendered(true);
2684
+ /**
2685
+ * wait for the component to render and calculate position
2686
+ * before actually showing
2687
+ */
2688
+ setTimeout(() => {
2689
+ setIsOpen === null || setIsOpen === void 0 ? void 0 : setIsOpen(value);
2690
+ if (isOpen === undefined) {
2691
+ setShow(value);
2692
+ }
2693
+ }, 10);
2694
+ };
2695
+ /**
2696
+ * this replicates the effect from `handleShow()`
2697
+ * when `isOpen` is changed from outside
2698
+ */
2699
+ useEffect(() => {
2700
+ if (isOpen === undefined) {
2701
+ return () => null;
2680
2702
  }
2681
- else if (isOpen === undefined) {
2682
- setShow(value);
2703
+ if (isOpen) {
2704
+ setRendered(true);
2683
2705
  }
2684
- };
2706
+ const timeout = setTimeout(() => {
2707
+ setShow(isOpen);
2708
+ }, 10);
2709
+ return () => {
2710
+ clearTimeout(timeout);
2711
+ };
2712
+ }, [isOpen]);
2685
2713
  useEffect(() => {
2686
2714
  if (show === wasShowing.current) {
2687
2715
  return;
@@ -2734,7 +2762,7 @@ content, html, isOpen, setIsOpen, }) => {
2734
2762
  const handleHideTooltip = () => {
2735
2763
  if (clickable) {
2736
2764
  // allow time for the mouse to reach the tooltip, in case there's a gap
2737
- handleHideTooltipDelayed(delayHide || 50);
2765
+ handleHideTooltipDelayed(delayHide || 100);
2738
2766
  }
2739
2767
  else if (delayHide) {
2740
2768
  handleHideTooltipDelayed();
@@ -2761,7 +2789,6 @@ content, html, isOpen, setIsOpen, }) => {
2761
2789
  };
2762
2790
  },
2763
2791
  };
2764
- setCalculatingPosition(true);
2765
2792
  computeTooltipPosition({
2766
2793
  place,
2767
2794
  offset,
@@ -2771,7 +2798,6 @@ content, html, isOpen, setIsOpen, }) => {
2771
2798
  strategy: positionStrategy,
2772
2799
  middlewares,
2773
2800
  }).then((computedStylesData) => {
2774
- setCalculatingPosition(false);
2775
2801
  if (Object.keys(computedStylesData.tooltipStyles).length) {
2776
2802
  setInlineStyles(computedStylesData.tooltipStyles);
2777
2803
  }
@@ -2901,7 +2927,11 @@ content, html, isOpen, setIsOpen, }) => {
2901
2927
  });
2902
2928
  parentObserver.disconnect();
2903
2929
  };
2904
- }, [anchorRefs, activeAnchor, closeOnEsc, anchorId, events, delayHide, delayShow]);
2930
+ /**
2931
+ * rendered is also a dependency to ensure anchor observers are re-registered
2932
+ * since `tooltipRef` becomes stale after removing/adding the tooltip to the DOM
2933
+ */
2934
+ }, [rendered, anchorRefs, activeAnchor, closeOnEsc, anchorId, events, delayHide, delayShow]);
2905
2935
  useEffect(() => {
2906
2936
  if (position) {
2907
2937
  // if `position` is set, override regular and `float` positioning
@@ -2927,7 +2957,6 @@ content, html, isOpen, setIsOpen, }) => {
2927
2957
  // `anchorId` element takes precedence
2928
2958
  elementReference = document.querySelector(`[id='${anchorId}']`);
2929
2959
  }
2930
- setCalculatingPosition(true);
2931
2960
  let mounted = true;
2932
2961
  computeTooltipPosition({
2933
2962
  place,
@@ -2942,7 +2971,6 @@ content, html, isOpen, setIsOpen, }) => {
2942
2971
  // invalidate computed positions after remount
2943
2972
  return;
2944
2973
  }
2945
- setCalculatingPosition(false);
2946
2974
  if (Object.keys(computedStylesData.tooltipStyles).length) {
2947
2975
  setInlineStyles(computedStylesData.tooltipStyles);
2948
2976
  }
@@ -2953,18 +2981,7 @@ content, html, isOpen, setIsOpen, }) => {
2953
2981
  return () => {
2954
2982
  mounted = false;
2955
2983
  };
2956
- }, [
2957
- show,
2958
- isOpen,
2959
- anchorId,
2960
- activeAnchor,
2961
- content,
2962
- html,
2963
- place,
2964
- offset,
2965
- positionStrategy,
2966
- position,
2967
- ]);
2984
+ }, [show, anchorId, activeAnchor, content, html, place, offset, positionStrategy, position]);
2968
2985
  useEffect(() => {
2969
2986
  return () => {
2970
2987
  if (tooltipShowDelayTimerRef.current) {
@@ -2976,13 +2993,14 @@ content, html, isOpen, setIsOpen, }) => {
2976
2993
  };
2977
2994
  }, []);
2978
2995
  const hasContentOrChildren = Boolean(html || content || children);
2979
- return (jsxRuntime.exports.jsxs(WrapperElement, { id: id, role: "tooltip", className: classNames('react-tooltip', styles['tooltip'], styles[variant], className, {
2980
- [styles['show']]: hasContentOrChildren && !calculatingPosition && (isOpen || show),
2996
+ const canShow = Boolean(hasContentOrChildren && show && Object.keys(inlineStyles).length > 0);
2997
+ return rendered ? (jsxRuntime.exports.jsxs(WrapperElement, { id: id, role: "tooltip", className: classNames('react-tooltip', styles['tooltip'], styles[variant], className, {
2998
+ [styles['show']]: canShow,
2981
2999
  [styles['fixed']]: positionStrategy === 'fixed',
2982
3000
  [styles['clickable']]: clickable,
2983
3001
  }), style: { ...externalStyles, ...inlineStyles }, ref: tooltipRef, children: [children || (html && jsxRuntime.exports.jsx(TooltipContent, { content: html })) || content, jsxRuntime.exports.jsx(WrapperElement, { className: classNames('react-tooltip-arrow', styles['arrow'], classNameArrow, {
2984
3002
  [styles['no-arrow']]: noArrow,
2985
- }), style: inlineArrowStyles, ref: tooltipArrowRef })] }));
3003
+ }), style: inlineArrowStyles, ref: tooltipArrowRef })] })) : null;
2986
3004
  };
2987
3005
 
2988
3006
  const TooltipController = ({ id, anchorId, content, html, className, classNameArrow, variant = 'dark', place = 'top', offset = 10, wrapper = 'div', children = null, events = ['hover'], positionStrategy = 'absolute', middlewares, delayShow = 0, delayHide = 0, float = false, noArrow = false, clickable = false, closeOnEsc = false, style, position, isOpen, setIsOpen, afterShow, afterHide, }) => {
@@ -1,4 +1,4 @@
1
- import e,{createContext as t,useState as n,useCallback as r,useMemo as o,useContext as i,useRef as l,useEffect as a}from"react";function s(e){return e.split("-")[1]}function c(e){return"y"===e?"height":"width"}function u(e){return e.split("-")[0]}function f(e){return["top","bottom"].includes(u(e))?"x":"y"}function p(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=f(t),p=c(a),d=r[p]/2-o[p]/2,y="x"===a;let m;switch(u(t)){case"top":m={x:i,y:r.y-o.height};break;case"bottom":m={x:i,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:l};break;case"left":m={x:r.x-o.width,y:l};break;default:m={x:r.x,y:r.y}}switch(s(t)){case"start":m[a]-=d*(n&&y?-1:1);break;case"end":m[a]+=d*(n&&y?-1:1)}return m}function d(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 y(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function m(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:m=0}=t,h=d(m),g=a[p?"floating"===f?"reference":"floating":f],v=y(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(g)))||n?g:g.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:s})),w="floating"===f?{...l.floating,x:r,y:o}:l.reference,b=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),x=await(null==i.isElement?void 0:i.isElement(b))&&await(null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},R=y(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:w,offsetParent:b,strategy:s}):w);return{top:(v.top-R.top+h.top)/x.y,bottom:(R.bottom-v.bottom+h.bottom)/x.y,left:(v.left-R.left+h.left)/x.x,right:(R.right-v.right+h.right)/x.x}}const h=Math.min,g=Math.max;function v(e,t,n){return g(e,h(t,n))}const w=["top","right","bottom","left"].reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[]),b={left:"right",right:"left",bottom:"top",top:"bottom"};function x(e){return e.replace(/left|right|bottom|top/g,(e=>b[e]))}function R(e,t,n){void 0===n&&(n=!1);const r=s(e),o=f(e),i=c(o);let l="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=x(l)),{main:l,cross:x(l)}}const _={start:"end",end:"start"};function T(e){return e.replace(/start|end/g,(e=>_[e]))}const O=function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,o;const{rects:i,middlewareData:l,placement:a,platform:c,elements:f}=t,{alignment:p,allowedPlacements:d=w,autoAlignment:y=!0,...h}=e,g=void 0!==p||d===w?function(e,t,n){return(e?[...n.filter((t=>s(t)===e)),...n.filter((t=>s(t)!==e))]:n.filter((e=>u(e)===e))).filter((n=>!e||s(n)===e||!!t&&T(n)!==n))}(p||null,y,d):d,v=await m(t,h),b=(null==(n=l.autoPlacement)?void 0:n.index)||0,x=g[b];if(null==x)return{};const{main:_,cross:O}=R(x,i,await(null==c.isRTL?void 0:c.isRTL(f.floating)));if(a!==x)return{reset:{placement:g[0]}};const k=[v[u(x)],v[_],v[O]],S=[...(null==(r=l.autoPlacement)?void 0:r.overflows)||[],{placement:x,overflows:k}],A=g[b+1];if(A)return{data:{index:b+1,overflows:S},reset:{placement:A}};const E=S.slice().sort(((e,t)=>e.overflows[0]-t.overflows[0])),j=null==(o=E.find((e=>{let{overflows:t}=e;return t.every((e=>e<=0))})))?void 0:o.placement,L=j||E[0].placement;return L!==a?{data:{index:b+1,overflows:S},reset:{placement:L}}:{}}}};const k=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:o,rects:i,initialPlacement:l,platform:a,elements:c}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:d,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...v}=e,w=u(r),b=u(l)===l,_=await(null==a.isRTL?void 0:a.isRTL(c.floating)),O=d||(b||!g?[x(l)]:function(e){const t=x(e);return[T(e),t,T(t)]}(l));d||"none"===h||O.push(...function(e,t,n,r){const o=s(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:l;default:return[]}}(u(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(T)))),i}(l,g,h,_));const k=[l,...O],S=await m(t,v),A=[];let E=(null==(n=o.flip)?void 0:n.overflows)||[];if(f&&A.push(S[w]),p){const{main:e,cross:t}=R(r,i,_);A.push(S[e],S[t])}if(E=[...E,{placement:r,overflows:A}],!A.every((e=>e<=0))){var j,L;const e=((null==(j=o.flip)?void 0:j.index)||0)+1,t=k[e];if(t)return{data:{index:e,overflows:E},reset:{placement:t}};let n=null==(L=E.find((e=>e.overflows[0]<=0)))?void 0:L.placement;if(!n)switch(y){case"bestFit":{var P;const e=null==(P=E.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:P[0];e&&(n=e);break}case"initialPlacement":n=l}if(r!==n)return{reset:{placement:n}}}return{}}}},S=function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){const{placement:n,elements:r,rects:o,platform:i,strategy:l}=t,{padding:a=2,x:s,y:c}=e,p=y(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:o.reference,offsetParent:await(null==i.getOffsetParent?void 0:i.getOffsetParent(r.floating)),strategy:l}):o.reference),m=await(null==i.getClientRects?void 0:i.getClientRects(r.reference))||[],v=d(a);const w=await i.getElementRects({reference:{getBoundingClientRect:function(){if(2===m.length&&m[0].left>m[1].right&&null!=s&&null!=c)return m.find((e=>s>e.left-v.left&&s<e.right+v.right&&c>e.top-v.top&&c<e.bottom+v.bottom))||p;if(m.length>=2){if("x"===f(n)){const e=m[0],t=m[m.length-1],r="top"===u(n),o=e.top,i=t.bottom,l=r?e.left:t.left,a=r?e.right:t.right;return{top:o,bottom:i,left:l,right:a,width:a-l,height:i-o,x:l,y:o}}const e="left"===u(n),t=g(...m.map((e=>e.right))),r=h(...m.map((e=>e.left))),o=m.filter((n=>e?n.left===r:n.right===t)),i=o[0].top,l=o[o.length-1].bottom;return{top:i,bottom:l,left:r,right:t,width:t-r,height:l-i,x:r,y:i}}return p}},floating:r.floating,strategy:l});return o.reference.x!==w.reference.x||o.reference.y!==w.reference.y||o.reference.width!==w.reference.width||o.reference.height!==w.reference.height?{reset:{rects:w}}:{}}}};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=u(n),a=s(n),c="x"===f(n),p=["left","top"].includes(l)?-1:1,d=i&&c?-1:1,y="function"==typeof t?t(e):t;let{mainAxis:m,crossAxis:h,alignmentAxis:g}="number"==typeof y?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...y};return a&&"number"==typeof g&&(h="end"===a?-1*g:g),c?{x:h*d,y:m*p}:{x:m*p,y:h*d}}(t,e);return{x:n+o.x,y:r+o.y,data:o}}}};const E=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=e,c={x:n,y:r},p=await m(t,s),d=f(u(o)),y="x"===d?"y":"x";let h=c[d],g=c[y];if(i){const e="y"===d?"bottom":"right";h=v(h+p["y"===d?"top":"left"],h,h-p[e])}if(l){const e="y"===y?"bottom":"right";g=v(g+p["y"===y?"top":"left"],g,g-p[e])}const w=a.fn({...t,[d]:h,[y]:g});return{...w,data:{x:w.x-n,y:w.y-r}}}}},j=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:l=(()=>{}),...a}=e,c=await m(t,a),f=u(n),p=s(n);let d,y;"top"===f||"bottom"===f?(d=f,y=p===(await(null==o.isRTL?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(y=f,d="end"===p?"top":"bottom");const h=g(c.left,0),v=g(c.right,0),w=g(c.top,0),b=g(c.bottom,0),x={availableHeight:r.floating.height-(["left","right"].includes(n)?2*(0!==w||0!==b?w+b:g(c.top,c.bottom)):c[d]),availableWidth:r.floating.width-(["top","bottom"].includes(n)?2*(0!==h||0!==v?h+v:g(c.left,c.right)):c[y])};await l({...t,...x});const R=await o.getDimensions(i.floating);return r.floating.width!==R.width||r.floating.height!==R.height?{reset:{rects:!0}}:{}}}};function L(e){var t;return(null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function P(e){return L(e).getComputedStyle(e)}const D=Math.min,N=Math.max,F=Math.round;function C(e){const t=P(e);let n=parseFloat(t.width),r=parseFloat(t.height);const o=e.offsetWidth,i=e.offsetHeight,l=F(n)!==o||F(r)!==i;return l&&(n=o,r=i),{width:n,height:r,fallback:l}}function I(e){return B(e)?(e.nodeName||"").toLowerCase():""}let $;function W(){if($)return $;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?($=e.brands.map((e=>e.brand+"/"+e.version)).join(" "),$):navigator.userAgent}function H(e){return e instanceof L(e).HTMLElement}function U(e){return e instanceof L(e).Element}function B(e){return e instanceof L(e).Node}function V(e){if("undefined"==typeof ShadowRoot)return!1;return e instanceof L(e).ShadowRoot||e instanceof ShadowRoot}function M(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=P(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function z(e){return["table","td","th"].includes(I(e))}function Y(e){const t=/firefox/i.test(W()),n=P(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 q(){return!/^((?!chrome|android).)*safari/i.test(W())}function X(e){return["html","body","#document"].includes(I(e))}function K(e){return U(e)?e:e.contextElement}const J={x:1,y:1};function Z(e){const t=K(e);if(!H(t))return J;const n=t.getBoundingClientRect(),{width:r,height:o,fallback:i}=C(t);let l=(i?F(n.width):n.width)/r,a=(i?F(n.height):n.height)/o;return l&&Number.isFinite(l)||(l=1),a&&Number.isFinite(a)||(a=1),{x:l,y:a}}function G(e,t,n,r){var o,i;void 0===t&&(t=!1),void 0===n&&(n=!1);const l=e.getBoundingClientRect(),a=K(e);let s=J;t&&(r?U(r)&&(s=Z(r)):s=Z(e));const c=a?L(a):window,u=!q()&&n;let f=(l.left+(u&&(null==(o=c.visualViewport)?void 0:o.offsetLeft)||0))/s.x,p=(l.top+(u&&(null==(i=c.visualViewport)?void 0:i.offsetTop)||0))/s.y,d=l.width/s.x,y=l.height/s.y;if(a){const e=L(a),t=r&&U(r)?L(r):r;let n=e.frameElement;for(;n&&r&&t!==e;){const e=Z(n),t=n.getBoundingClientRect(),r=getComputedStyle(n);t.x+=(n.clientLeft+parseFloat(r.paddingLeft))*e.x,t.y+=(n.clientTop+parseFloat(r.paddingTop))*e.y,f*=e.x,p*=e.y,d*=e.x,y*=e.y,f+=t.x,p+=t.y,n=L(n).frameElement}}return{width:d,height:y,top:p,right:f+d,bottom:p+y,left:f,x:f,y:p}}function Q(e){return((B(e)?e.ownerDocument:e.document)||window.document).documentElement}function ee(e){return U(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function te(e){return G(Q(e)).left+ee(e).scrollLeft}function ne(e){if("html"===I(e))return e;const t=e.assignedSlot||e.parentNode||V(e)&&e.host||Q(e);return V(t)?t.host:t}function re(e){const t=ne(e);return X(t)?t.ownerDocument.body:H(t)&&M(t)?t:re(t)}function oe(e,t){var n;void 0===t&&(t=[]);const r=re(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=L(r);return o?t.concat(i,i.visualViewport||[],M(r)?r:[]):t.concat(r,oe(r))}function ie(e,t,n){return"viewport"===t?y(function(e,t){const n=L(e),r=Q(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=q();(e||!e&&"fixed"===t)&&(a=o.offsetLeft,s=o.offsetTop)}return{width:i,height:l,x:a,y:s}}(e,n)):U(t)?y(function(e,t){const n=G(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=H(e)?Z(e):{x:1,y:1};return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n)):y(function(e){const t=Q(e),n=ee(e),r=e.ownerDocument.body,o=N(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=N(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+te(e);const a=-n.scrollTop;return"rtl"===P(r).direction&&(l+=N(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:a}}(Q(e)))}function le(e){return H(e)&&"fixed"!==P(e).position?e.offsetParent:null}function ae(e){const t=L(e);let n=le(e);for(;n&&z(n)&&"static"===P(n).position;)n=le(n);return n&&("html"===I(n)||"body"===I(n)&&"static"===P(n).position&&!Y(n))?t:n||function(e){let t=ne(e);for(;H(t)&&!X(t);){if(Y(t))return t;t=ne(t)}return null}(e)||t}function se(e,t,n){const r=H(t),o=Q(t),i=G(e,!0,"fixed"===n,t);let l={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if(r||!r&&"fixed"!==n)if(("body"!==I(t)||M(o))&&(l=ee(t)),H(t)){const e=G(t,!0);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&(a.x=te(o));return{x:i.left+l.scrollLeft-a.x,y:i.top+l.scrollTop-a.y,width:i.width,height:i.height}}const ce={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let r=oe(e).filter((e=>U(e)&&"body"!==I(e))),o=null;const i="fixed"===P(e).position;let l=i?ne(e):e;for(;U(l)&&!X(l);){const e=P(l),t=Y(l);(i?t||o:t||"static"!==e.position||!o||!["absolute","fixed"].includes(o.position))?o=e:r=r.filter((e=>e!==l)),l=ne(l)}return t.set(e,r),r}(t,this._c):[].concat(n),l=[...i,r],a=l[0],s=l.reduce(((e,n)=>{const r=ie(t,n,o);return e.top=N(r.top,e.top),e.right=D(r.right,e.right),e.bottom=D(r.bottom,e.bottom),e.left=N(r.left,e.left),e}),ie(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=H(n),i=Q(n);if(n===i)return t;let l={scrollLeft:0,scrollTop:0},a={x:1,y:1};const s={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==I(n)||M(i))&&(l=ee(n)),H(n))){const e=G(n);a=Z(n),s.x=e.x+n.clientLeft,s.y=e.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-l.scrollLeft*a.x+s.x,y:t.y*a.y-l.scrollTop*a.y+s.y}},isElement:U,getDimensions:function(e){return H(e)?C(e):e.getBoundingClientRect()},getOffsetParent:ae,getDocumentElement:Q,getScale:Z,async getElementRects(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||ae,i=this.getDimensions;return{reference:se(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===P(e).direction},ue=(e,t,n)=>{const r=new Map,o={platform:ce,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,a=i.filter(Boolean),s=await(null==l.isRTL?void 0:l.isRTL(t));if(null==l&&console.error(["Floating UI: `platform` property was not passed to config. If you","want to use Floating UI on the web, install @floating-ui/dom","instead of the /core package. Otherwise, you can create your own","`platform`: https://floating-ui.com/docs/platform"].join(" ")),a.filter((e=>{let{name:t}=e;return"autoPlacement"===t||"flip"===t})).length>1)throw new Error(["Floating UI: duplicate `flip` and/or `autoPlacement` middleware","detected. This will lead to an infinite loop. Ensure only one of","either has been passed to the `middleware` array."].join(" "));e&&t||console.error(["Floating UI: The reference and/or floating element was not defined","when `computePosition()` was called. Ensure that both elements have","been created and can be measured."].join(" "));let c=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=p(c,r,s),d=r,y={},m=0;for(let n=0;n<a.length;n++){const{name:i,fn:h}=a[n],{x:g,y:v,data:w,reset:b}=await h({x:u,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:y,rects:c,platform:l,elements:{reference:e,floating:t}});u=null!=g?g:u,f=null!=v?v:f,y={...y,[i]:{...y[i],...w}},m>50&&console.warn(["Floating UI: The middleware lifecycle appears to be running in an","infinite loop. This is usually caused by a `reset` continually","being returned without a break condition."].join(" ")),b&&m<=50&&(m++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(c=!0===b.rects?await l.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:f}=p(c,d,s))),n=-1)}return{x:u,y:f,placement:d,strategy:o,middlewareData:y}})(e,t,{...o,platform:i})};var fe,pe={exports:{}},de={};
1
+ import e,{createContext as t,useState as n,useCallback as r,useMemo as o,useContext as i,useRef as l,useEffect as a}from"react";function s(e){return e.split("-")[1]}function c(e){return"y"===e?"height":"width"}function u(e){return e.split("-")[0]}function f(e){return["top","bottom"].includes(u(e))?"x":"y"}function p(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=f(t),p=c(a),d=r[p]/2-o[p]/2,m="x"===a;let y;switch(u(t)){case"top":y={x:i,y:r.y-o.height};break;case"bottom":y={x:i,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:l};break;case"left":y={x:r.x-o.width,y:l};break;default:y={x:r.x,y:r.y}}switch(s(t)){case"start":y[a]-=d*(n&&m?-1:1);break;case"end":y[a]+=d*(n&&m?-1:1)}return y}function d(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 m(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function y(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:y=0}=t,h=d(y),g=a[p?"floating"===f?"reference":"floating":f],v=m(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(g)))||n?g:g.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:s})),w="floating"===f?{...l.floating,x:r,y:o}:l.reference,b=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),x=await(null==i.isElement?void 0:i.isElement(b))&&await(null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},R=m(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:w,offsetParent:b,strategy:s}):w);return{top:(v.top-R.top+h.top)/x.y,bottom:(R.bottom-v.bottom+h.bottom)/x.y,left:(v.left-R.left+h.left)/x.x,right:(R.right-v.right+h.right)/x.x}}const h=Math.min,g=Math.max;function v(e,t,n){return g(e,h(t,n))}const w=["top","right","bottom","left"].reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[]),b={left:"right",right:"left",bottom:"top",top:"bottom"};function x(e){return e.replace(/left|right|bottom|top/g,(e=>b[e]))}function R(e,t,n){void 0===n&&(n=!1);const r=s(e),o=f(e),i=c(o);let l="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=x(l)),{main:l,cross:x(l)}}const _={start:"end",end:"start"};function T(e){return e.replace(/start|end/g,(e=>_[e]))}const O=function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,o;const{rects:i,middlewareData:l,placement:a,platform:c,elements:f}=t,{alignment:p,allowedPlacements:d=w,autoAlignment:m=!0,...h}=e,g=void 0!==p||d===w?function(e,t,n){return(e?[...n.filter((t=>s(t)===e)),...n.filter((t=>s(t)!==e))]:n.filter((e=>u(e)===e))).filter((n=>!e||s(n)===e||!!t&&T(n)!==n))}(p||null,m,d):d,v=await y(t,h),b=(null==(n=l.autoPlacement)?void 0:n.index)||0,x=g[b];if(null==x)return{};const{main:_,cross:O}=R(x,i,await(null==c.isRTL?void 0:c.isRTL(f.floating)));if(a!==x)return{reset:{placement:g[0]}};const k=[v[u(x)],v[_],v[O]],S=[...(null==(r=l.autoPlacement)?void 0:r.overflows)||[],{placement:x,overflows:k}],A=g[b+1];if(A)return{data:{index:b+1,overflows:S},reset:{placement:A}};const E=S.slice().sort(((e,t)=>e.overflows[0]-t.overflows[0])),j=null==(o=E.find((e=>{let{overflows:t}=e;return t.every((e=>e<=0))})))?void 0:o.placement,L=j||E[0].placement;return L!==a?{data:{index:b+1,overflows:S},reset:{placement:L}}:{}}}};const k=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:o,rects:i,initialPlacement:l,platform:a,elements:c}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:d,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...v}=e,w=u(r),b=u(l)===l,_=await(null==a.isRTL?void 0:a.isRTL(c.floating)),O=d||(b||!g?[x(l)]:function(e){const t=x(e);return[T(e),t,T(t)]}(l));d||"none"===h||O.push(...function(e,t,n,r){const o=s(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:l;default:return[]}}(u(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(T)))),i}(l,g,h,_));const k=[l,...O],S=await y(t,v),A=[];let E=(null==(n=o.flip)?void 0:n.overflows)||[];if(f&&A.push(S[w]),p){const{main:e,cross:t}=R(r,i,_);A.push(S[e],S[t])}if(E=[...E,{placement:r,overflows:A}],!A.every((e=>e<=0))){var j,L;const e=((null==(j=o.flip)?void 0:j.index)||0)+1,t=k[e];if(t)return{data:{index:e,overflows:E},reset:{placement:t}};let n=null==(L=E.find((e=>e.overflows[0]<=0)))?void 0:L.placement;if(!n)switch(m){case"bestFit":{var P;const e=null==(P=E.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:P[0];e&&(n=e);break}case"initialPlacement":n=l}if(r!==n)return{reset:{placement:n}}}return{}}}},S=function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){const{placement:n,elements:r,rects:o,platform:i,strategy:l}=t,{padding:a=2,x:s,y:c}=e,p=m(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:o.reference,offsetParent:await(null==i.getOffsetParent?void 0:i.getOffsetParent(r.floating)),strategy:l}):o.reference),y=await(null==i.getClientRects?void 0:i.getClientRects(r.reference))||[],v=d(a);const w=await i.getElementRects({reference:{getBoundingClientRect:function(){if(2===y.length&&y[0].left>y[1].right&&null!=s&&null!=c)return y.find((e=>s>e.left-v.left&&s<e.right+v.right&&c>e.top-v.top&&c<e.bottom+v.bottom))||p;if(y.length>=2){if("x"===f(n)){const e=y[0],t=y[y.length-1],r="top"===u(n),o=e.top,i=t.bottom,l=r?e.left:t.left,a=r?e.right:t.right;return{top:o,bottom:i,left:l,right:a,width:a-l,height:i-o,x:l,y:o}}const e="left"===u(n),t=g(...y.map((e=>e.right))),r=h(...y.map((e=>e.left))),o=y.filter((n=>e?n.left===r:n.right===t)),i=o[0].top,l=o[o.length-1].bottom;return{top:i,bottom:l,left:r,right:t,width:t-r,height:l-i,x:r,y:i}}return p}},floating:r.floating,strategy:l});return o.reference.x!==w.reference.x||o.reference.y!==w.reference.y||o.reference.width!==w.reference.width||o.reference.height!==w.reference.height?{reset:{rects:w}}:{}}}};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=u(n),a=s(n),c="x"===f(n),p=["left","top"].includes(l)?-1:1,d=i&&c?-1:1,m="function"==typeof t?t(e):t;let{mainAxis:y,crossAxis:h,alignmentAxis:g}="number"==typeof m?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...m};return a&&"number"==typeof g&&(h="end"===a?-1*g:g),c?{x:h*d,y:y*p}:{x:y*p,y:h*d}}(t,e);return{x:n+o.x,y:r+o.y,data:o}}}};const E=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=e,c={x:n,y:r},p=await y(t,s),d=f(u(o)),m="x"===d?"y":"x";let h=c[d],g=c[m];if(i){const e="y"===d?"bottom":"right";h=v(h+p["y"===d?"top":"left"],h,h-p[e])}if(l){const e="y"===m?"bottom":"right";g=v(g+p["y"===m?"top":"left"],g,g-p[e])}const w=a.fn({...t,[d]:h,[m]:g});return{...w,data:{x:w.x-n,y:w.y-r}}}}},j=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:l=(()=>{}),...a}=e,c=await y(t,a),f=u(n),p=s(n);let d,m;"top"===f||"bottom"===f?(d=f,m=p===(await(null==o.isRTL?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(m=f,d="end"===p?"top":"bottom");const h=g(c.left,0),v=g(c.right,0),w=g(c.top,0),b=g(c.bottom,0),x={availableHeight:r.floating.height-(["left","right"].includes(n)?2*(0!==w||0!==b?w+b:g(c.top,c.bottom)):c[d]),availableWidth:r.floating.width-(["top","bottom"].includes(n)?2*(0!==h||0!==v?h+v:g(c.left,c.right)):c[m])};await l({...t,...x});const R=await o.getDimensions(i.floating);return r.floating.width!==R.width||r.floating.height!==R.height?{reset:{rects:!0}}:{}}}};function L(e){var t;return(null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function P(e){return L(e).getComputedStyle(e)}const D=Math.min,N=Math.max,F=Math.round;function C(e){const t=P(e);let n=parseFloat(t.width),r=parseFloat(t.height);const o=e.offsetWidth,i=e.offsetHeight,l=F(n)!==o||F(r)!==i;return l&&(n=o,r=i),{width:n,height:r,fallback:l}}function I(e){return U(e)?(e.nodeName||"").toLowerCase():""}let $;function W(){if($)return $;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?($=e.brands.map((e=>e.brand+"/"+e.version)).join(" "),$):navigator.userAgent}function B(e){return e instanceof L(e).HTMLElement}function H(e){return e instanceof L(e).Element}function U(e){return e instanceof L(e).Node}function V(e){if("undefined"==typeof ShadowRoot)return!1;return e instanceof L(e).ShadowRoot||e instanceof ShadowRoot}function M(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=P(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function z(e){return["table","td","th"].includes(I(e))}function Y(e){const t=/firefox/i.test(W()),n=P(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 q(){return!/^((?!chrome|android).)*safari/i.test(W())}function X(e){return["html","body","#document"].includes(I(e))}function K(e){return H(e)?e:e.contextElement}const J={x:1,y:1};function Z(e){const t=K(e);if(!B(t))return J;const n=t.getBoundingClientRect(),{width:r,height:o,fallback:i}=C(t);let l=(i?F(n.width):n.width)/r,a=(i?F(n.height):n.height)/o;return l&&Number.isFinite(l)||(l=1),a&&Number.isFinite(a)||(a=1),{x:l,y:a}}function G(e,t,n,r){var o,i;void 0===t&&(t=!1),void 0===n&&(n=!1);const l=e.getBoundingClientRect(),a=K(e);let s=J;t&&(r?H(r)&&(s=Z(r)):s=Z(e));const c=a?L(a):window,u=!q()&&n;let f=(l.left+(u&&(null==(o=c.visualViewport)?void 0:o.offsetLeft)||0))/s.x,p=(l.top+(u&&(null==(i=c.visualViewport)?void 0:i.offsetTop)||0))/s.y,d=l.width/s.x,m=l.height/s.y;if(a){const e=L(a),t=r&&H(r)?L(r):r;let n=e.frameElement;for(;n&&r&&t!==e;){const e=Z(n),t=n.getBoundingClientRect(),r=getComputedStyle(n);t.x+=(n.clientLeft+parseFloat(r.paddingLeft))*e.x,t.y+=(n.clientTop+parseFloat(r.paddingTop))*e.y,f*=e.x,p*=e.y,d*=e.x,m*=e.y,f+=t.x,p+=t.y,n=L(n).frameElement}}return{width:d,height:m,top:p,right:f+d,bottom:p+m,left:f,x:f,y:p}}function Q(e){return((U(e)?e.ownerDocument:e.document)||window.document).documentElement}function ee(e){return H(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function te(e){return G(Q(e)).left+ee(e).scrollLeft}function ne(e){if("html"===I(e))return e;const t=e.assignedSlot||e.parentNode||V(e)&&e.host||Q(e);return V(t)?t.host:t}function re(e){const t=ne(e);return X(t)?t.ownerDocument.body:B(t)&&M(t)?t:re(t)}function oe(e,t){var n;void 0===t&&(t=[]);const r=re(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=L(r);return o?t.concat(i,i.visualViewport||[],M(r)?r:[]):t.concat(r,oe(r))}function ie(e,t,n){return"viewport"===t?m(function(e,t){const n=L(e),r=Q(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=q();(e||!e&&"fixed"===t)&&(a=o.offsetLeft,s=o.offsetTop)}return{width:i,height:l,x:a,y:s}}(e,n)):H(t)?m(function(e,t){const n=G(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=B(e)?Z(e):{x:1,y:1};return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n)):m(function(e){const t=Q(e),n=ee(e),r=e.ownerDocument.body,o=N(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=N(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+te(e);const a=-n.scrollTop;return"rtl"===P(r).direction&&(l+=N(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:a}}(Q(e)))}function le(e){return B(e)&&"fixed"!==P(e).position?e.offsetParent:null}function ae(e){const t=L(e);let n=le(e);for(;n&&z(n)&&"static"===P(n).position;)n=le(n);return n&&("html"===I(n)||"body"===I(n)&&"static"===P(n).position&&!Y(n))?t:n||function(e){let t=ne(e);for(;B(t)&&!X(t);){if(Y(t))return t;t=ne(t)}return null}(e)||t}function se(e,t,n){const r=B(t),o=Q(t),i=G(e,!0,"fixed"===n,t);let l={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if(r||!r&&"fixed"!==n)if(("body"!==I(t)||M(o))&&(l=ee(t)),B(t)){const e=G(t,!0);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&(a.x=te(o));return{x:i.left+l.scrollLeft-a.x,y:i.top+l.scrollTop-a.y,width:i.width,height:i.height}}const ce={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let r=oe(e).filter((e=>H(e)&&"body"!==I(e))),o=null;const i="fixed"===P(e).position;let l=i?ne(e):e;for(;H(l)&&!X(l);){const e=P(l),t=Y(l);(i?t||o:t||"static"!==e.position||!o||!["absolute","fixed"].includes(o.position))?o=e:r=r.filter((e=>e!==l)),l=ne(l)}return t.set(e,r),r}(t,this._c):[].concat(n),l=[...i,r],a=l[0],s=l.reduce(((e,n)=>{const r=ie(t,n,o);return e.top=N(r.top,e.top),e.right=D(r.right,e.right),e.bottom=D(r.bottom,e.bottom),e.left=N(r.left,e.left),e}),ie(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=B(n),i=Q(n);if(n===i)return t;let l={scrollLeft:0,scrollTop:0},a={x:1,y:1};const s={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==I(n)||M(i))&&(l=ee(n)),B(n))){const e=G(n);a=Z(n),s.x=e.x+n.clientLeft,s.y=e.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-l.scrollLeft*a.x+s.x,y:t.y*a.y-l.scrollTop*a.y+s.y}},isElement:H,getDimensions:function(e){return B(e)?C(e):e.getBoundingClientRect()},getOffsetParent:ae,getDocumentElement:Q,getScale:Z,async getElementRects(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||ae,i=this.getDimensions;return{reference:se(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===P(e).direction},ue=(e,t,n)=>{const r=new Map,o={platform:ce,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,a=i.filter(Boolean),s=await(null==l.isRTL?void 0:l.isRTL(t));if(null==l&&console.error(["Floating UI: `platform` property was not passed to config. If you","want to use Floating UI on the web, install @floating-ui/dom","instead of the /core package. Otherwise, you can create your own","`platform`: https://floating-ui.com/docs/platform"].join(" ")),a.filter((e=>{let{name:t}=e;return"autoPlacement"===t||"flip"===t})).length>1)throw new Error(["Floating UI: duplicate `flip` and/or `autoPlacement` middleware","detected. This will lead to an infinite loop. Ensure only one of","either has been passed to the `middleware` array."].join(" "));e&&t||console.error(["Floating UI: The reference and/or floating element was not defined","when `computePosition()` was called. Ensure that both elements have","been created and can be measured."].join(" "));let c=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=p(c,r,s),d=r,m={},y=0;for(let n=0;n<a.length;n++){const{name:i,fn:h}=a[n],{x:g,y:v,data:w,reset:b}=await h({x:u,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:m,rects:c,platform:l,elements:{reference:e,floating:t}});u=null!=g?g:u,f=null!=v?v:f,m={...m,[i]:{...m[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&&(d=b.placement),b.rects&&(c=!0===b.rects?await l.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:f}=p(c,d,s))),n=-1)}return{x:u,y:f,placement:d,strategy:o,middlewareData:m}})(e,t,{...o,platform:i})};var fe,pe={exports:{}},de={};
2
2
  /** @license React v16.14.0
3
3
  * react-jsx-runtime.development.js
4
4
  *
@@ -7,9 +7,9 @@ import e,{createContext as t,useState as n,useCallback as r,useMemo as o,useCont
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
9
  */
10
- fe=de,function(){var t=e,n=60103,r=60106;fe.Fragment=60107;var o=60108,i=60114,l=60109,a=60110,s=60112,c=60113,u=60120,f=60115,p=60116,d=60121,y=60122,m=60117,h=60129,g=60131;if("function"==typeof Symbol&&Symbol.for){var v=Symbol.for;n=v("react.element"),r=v("react.portal"),fe.Fragment=v("react.fragment"),o=v("react.strict_mode"),i=v("react.profiler"),l=v("react.provider"),a=v("react.context"),s=v("react.forward_ref"),c=v("react.suspense"),u=v("react.suspense_list"),f=v("react.memo"),p=v("react.lazy"),d=v("react.block"),y=v("react.server.block"),m=v("react.fundamental"),v("react.scope"),v("react.opaque.id"),h=v("react.debug_trace_mode"),v("react.offscreen"),g=v("react.legacy_hidden")}var w="function"==typeof Symbol&&Symbol.iterator,b=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function x(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];R("error",e,n)}function R(e,t,n){var r=b.ReactDebugCurrentFrame,o="";if(k){var i=T(k.type),l=k._owner;o+=function(e,t,n){var r="";if(t){var o=t.fileName,i=o.replace(_,"");if(/^index\./.test(i)){var l=o.match(_);if(l){var a=l[1];a&&(i=a.replace(_,"")+"/"+i)}}r=" (at "+i+":"+t.lineNumber+")"}else n&&(r=" (created by "+n+")");return"\n in "+(e||"Unknown")+r}(i,k._source,l&&T(l.type))}""!==(o+=r.getStackAddendum())&&(t+="%s",n=n.concat([o]));var a=n.map((function(e){return""+e}));a.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,a)}var _=/^(.*)[\\\/]/;function T(e){if(null==e)return null;if("number"==typeof e.tag&&x("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case fe.Fragment:return"Fragment";case r:return"Portal";case i:return"Profiler";case o:return"StrictMode";case c:return"Suspense";case u:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case a:return"Context.Consumer";case l:return"Context.Provider";case s:return y=e,m=e.render,h="ForwardRef",g=m.displayName||m.name||"",y.displayName||(""!==g?h+"("+g+")":h);case f:return T(e.type);case d:return T(e.render);case p:var t=1===(n=e)._status?n._result:null;if(t)return T(t)}var n,y,m,h,g;return null}var O={};b.ReactDebugCurrentFrame;var k=null;function S(e){k=e}var A,E,j,L=b.ReactCurrentOwner,P=Object.prototype.hasOwnProperty,D={key:!0,ref:!0,__self:!0,__source:!0};function N(e,t,r,o,i){var l,a={},s=null,c=null;for(l in void 0!==r&&(s=""+r),function(e){if(P.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(t)&&(s=""+t.key),function(e){if(P.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}(t)&&(c=t.ref,function(e,t){if("string"==typeof e.ref&&L.current&&t&&L.current.stateNode!==t){var n=T(L.current.type);j[n]||(x('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',T(L.current.type),e.ref),j[n]=!0)}}(t,i)),t)P.call(t,l)&&!D.hasOwnProperty(l)&&(a[l]=t[l]);if(e&&e.defaultProps){var u=e.defaultProps;for(l in u)void 0===a[l]&&(a[l]=u[l])}if(s||c){var f="function"==typeof e?e.displayName||e.name||"Unknown":e;s&&function(e,t){var n=function(){A||(A=!0,x("%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(){E||(E=!0,x("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}(a,f)}return function(e,t,r,o,i,l,a){var s={$$typeof:n,type:e,key:t,ref:r,props:a,_owner:l,_store:{}};return Object.defineProperty(s._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(s,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(s,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(s.props),Object.freeze(s)),s}(e,s,c,i,o,L.current,a)}j={};var F,C=b.ReactCurrentOwner;function I(e){k=e}function $(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}function W(){if(C.current){var e=T(C.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}b.ReactDebugCurrentFrame,F=!1;var H={};function U(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var t=W();if(!t){var n="string"==typeof e?e:e.displayName||e.name;n&&(t="\n\nCheck the top-level render call using <"+n+">.")}return t}(t);if(!H[n]){H[n]=!0;var r="";e&&e._owner&&e._owner!==C.current&&(r=" It was passed a child from "+T(e._owner.type)+"."),I(e),x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,r),I(null)}}}function B(e,t){if("object"==typeof e)if(Array.isArray(e))for(var n=0;n<e.length;n++){var r=e[n];$(r)&&U(r,t)}else if($(e))e._store&&(e._store.validated=!0);else if(e){var o=function(e){if(null===e||"object"!=typeof e)return null;var t=w&&e[w]||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;)$(i.value)&&U(i.value,t)}}function V(e){var t,n=e.type;if(null!=n&&"string"!=typeof n){if("function"==typeof n)t=n.propTypes;else{if("object"!=typeof n||n.$$typeof!==s&&n.$$typeof!==f)return;t=n.propTypes}if(t){var r=T(n);!function(e,t,n,r,o){var i=Function.call.bind(Object.prototype.hasOwnProperty);for(var l in e)if(i(e,l)){var a=void 0;try{if("function"!=typeof e[l]){var s=Error((r||"React class")+": "+n+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw s.name="Invariant Violation",s}a=e[l](t,l,r,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){a=e}!a||a instanceof Error||(S(o),x("%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),S(null)),a instanceof Error&&!(a.message in O)&&(O[a.message]=!0,S(o),x("Failed %s type: %s",n,a.message),S(null))}}(t,e.props,"prop",r,e)}else void 0===n.PropTypes||F||(F=!0,x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",T(n)||"Unknown"));"function"!=typeof n.getDefaultProps||n.getDefaultProps.isReactClassApproved||x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function M(e,t,r,v,w,b){var R=function(e){return"string"==typeof e||"function"==typeof e||e===fe.Fragment||e===i||e===h||e===o||e===c||e===u||e===g||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===f||e.$$typeof===l||e.$$typeof===a||e.$$typeof===s||e.$$typeof===m||e.$$typeof===d||e[0]===y)}(e);if(!R){var _="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(_+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var O,k=function(e){return void 0!==e?"\n\nCheck your code at "+e.fileName.replace(/^.*[\\\/]/,"")+":"+e.lineNumber+".":""}(w);_+=k||W(),null===e?O="null":Array.isArray(e)?O="array":void 0!==e&&e.$$typeof===n?(O="<"+(T(e.type)||"Unknown")+" />",_=" Did you accidentally export a JSX literal instead of a component?"):O=typeof e,x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",O,_)}var S=N(e,t,r,w,b);if(null==S)return S;if(R){var A=t.children;if(void 0!==A)if(v)if(Array.isArray(A)){for(var E=0;E<A.length;E++)B(A[E],e);Object.freeze&&Object.freeze(A)}else x("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 B(A,e)}return e===fe.Fragment?function(e){for(var t=Object.keys(e.props),n=0;n<t.length;n++){var r=t[n];if("children"!==r&&"key"!==r){I(e),x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",r),I(null);break}}null!==e.ref&&(I(e),x("Invalid attribute `ref` supplied to `React.Fragment`."),I(null))}(S):V(S),S}var z=function(e,t,n){return M(e,t,n,!1)},Y=function(e,t,n){return M(e,t,n,!0)};fe.jsx=z,fe.jsxs=Y}(),pe.exports=de;var ye,me={exports:{}};
10
+ fe=de,function(){var t=e,n=60103,r=60106;fe.Fragment=60107;var o=60108,i=60114,l=60109,a=60110,s=60112,c=60113,u=60120,f=60115,p=60116,d=60121,m=60122,y=60117,h=60129,g=60131;if("function"==typeof Symbol&&Symbol.for){var v=Symbol.for;n=v("react.element"),r=v("react.portal"),fe.Fragment=v("react.fragment"),o=v("react.strict_mode"),i=v("react.profiler"),l=v("react.provider"),a=v("react.context"),s=v("react.forward_ref"),c=v("react.suspense"),u=v("react.suspense_list"),f=v("react.memo"),p=v("react.lazy"),d=v("react.block"),m=v("react.server.block"),y=v("react.fundamental"),v("react.scope"),v("react.opaque.id"),h=v("react.debug_trace_mode"),v("react.offscreen"),g=v("react.legacy_hidden")}var w="function"==typeof Symbol&&Symbol.iterator,b=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function x(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];R("error",e,n)}function R(e,t,n){var r=b.ReactDebugCurrentFrame,o="";if(k){var i=T(k.type),l=k._owner;o+=function(e,t,n){var r="";if(t){var o=t.fileName,i=o.replace(_,"");if(/^index\./.test(i)){var l=o.match(_);if(l){var a=l[1];a&&(i=a.replace(_,"")+"/"+i)}}r=" (at "+i+":"+t.lineNumber+")"}else n&&(r=" (created by "+n+")");return"\n in "+(e||"Unknown")+r}(i,k._source,l&&T(l.type))}""!==(o+=r.getStackAddendum())&&(t+="%s",n=n.concat([o]));var a=n.map((function(e){return""+e}));a.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,a)}var _=/^(.*)[\\\/]/;function T(e){if(null==e)return null;if("number"==typeof e.tag&&x("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case fe.Fragment:return"Fragment";case r:return"Portal";case i:return"Profiler";case o:return"StrictMode";case c:return"Suspense";case u:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case a:return"Context.Consumer";case l:return"Context.Provider";case s:return m=e,y=e.render,h="ForwardRef",g=y.displayName||y.name||"",m.displayName||(""!==g?h+"("+g+")":h);case f:return T(e.type);case d:return T(e.render);case p:var t=1===(n=e)._status?n._result:null;if(t)return T(t)}var n,m,y,h,g;return null}var O={};b.ReactDebugCurrentFrame;var k=null;function S(e){k=e}var A,E,j,L=b.ReactCurrentOwner,P=Object.prototype.hasOwnProperty,D={key:!0,ref:!0,__self:!0,__source:!0};function N(e,t,r,o,i){var l,a={},s=null,c=null;for(l in void 0!==r&&(s=""+r),function(e){if(P.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(t)&&(s=""+t.key),function(e){if(P.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}(t)&&(c=t.ref,function(e,t){if("string"==typeof e.ref&&L.current&&t&&L.current.stateNode!==t){var n=T(L.current.type);j[n]||(x('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',T(L.current.type),e.ref),j[n]=!0)}}(t,i)),t)P.call(t,l)&&!D.hasOwnProperty(l)&&(a[l]=t[l]);if(e&&e.defaultProps){var u=e.defaultProps;for(l in u)void 0===a[l]&&(a[l]=u[l])}if(s||c){var f="function"==typeof e?e.displayName||e.name||"Unknown":e;s&&function(e,t){var n=function(){A||(A=!0,x("%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(){E||(E=!0,x("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}(a,f)}return function(e,t,r,o,i,l,a){var s={$$typeof:n,type:e,key:t,ref:r,props:a,_owner:l,_store:{}};return Object.defineProperty(s._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(s,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(s,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(s.props),Object.freeze(s)),s}(e,s,c,i,o,L.current,a)}j={};var F,C=b.ReactCurrentOwner;function I(e){k=e}function $(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}function W(){if(C.current){var e=T(C.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}b.ReactDebugCurrentFrame,F=!1;var B={};function H(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var t=W();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(!B[n]){B[n]=!0;var r="";e&&e._owner&&e._owner!==C.current&&(r=" It was passed a child from "+T(e._owner.type)+"."),I(e),x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,r),I(null)}}}function U(e,t){if("object"==typeof e)if(Array.isArray(e))for(var n=0;n<e.length;n++){var r=e[n];$(r)&&H(r,t)}else if($(e))e._store&&(e._store.validated=!0);else if(e){var o=function(e){if(null===e||"object"!=typeof e)return null;var t=w&&e[w]||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;)$(i.value)&&H(i.value,t)}}function V(e){var t,n=e.type;if(null!=n&&"string"!=typeof n){if("function"==typeof n)t=n.propTypes;else{if("object"!=typeof n||n.$$typeof!==s&&n.$$typeof!==f)return;t=n.propTypes}if(t){var r=T(n);!function(e,t,n,r,o){var i=Function.call.bind(Object.prototype.hasOwnProperty);for(var l in e)if(i(e,l)){var a=void 0;try{if("function"!=typeof e[l]){var s=Error((r||"React class")+": "+n+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw s.name="Invariant Violation",s}a=e[l](t,l,r,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){a=e}!a||a instanceof Error||(S(o),x("%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),S(null)),a instanceof Error&&!(a.message in O)&&(O[a.message]=!0,S(o),x("Failed %s type: %s",n,a.message),S(null))}}(t,e.props,"prop",r,e)}else void 0===n.PropTypes||F||(F=!0,x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",T(n)||"Unknown"));"function"!=typeof n.getDefaultProps||n.getDefaultProps.isReactClassApproved||x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function M(e,t,r,v,w,b){var R=function(e){return"string"==typeof e||"function"==typeof e||e===fe.Fragment||e===i||e===h||e===o||e===c||e===u||e===g||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===f||e.$$typeof===l||e.$$typeof===a||e.$$typeof===s||e.$$typeof===y||e.$$typeof===d||e[0]===m)}(e);if(!R){var _="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(_+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var O,k=function(e){return void 0!==e?"\n\nCheck your code at "+e.fileName.replace(/^.*[\\\/]/,"")+":"+e.lineNumber+".":""}(w);_+=k||W(),null===e?O="null":Array.isArray(e)?O="array":void 0!==e&&e.$$typeof===n?(O="<"+(T(e.type)||"Unknown")+" />",_=" Did you accidentally export a JSX literal instead of a component?"):O=typeof e,x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",O,_)}var S=N(e,t,r,w,b);if(null==S)return S;if(R){var A=t.children;if(void 0!==A)if(v)if(Array.isArray(A)){for(var E=0;E<A.length;E++)U(A[E],e);Object.freeze&&Object.freeze(A)}else x("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 U(A,e)}return e===fe.Fragment?function(e){for(var t=Object.keys(e.props),n=0;n<t.length;n++){var r=t[n];if("children"!==r&&"key"!==r){I(e),x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",r),I(null);break}}null!==e.ref&&(I(e),x("Invalid attribute `ref` supplied to `React.Fragment`."),I(null))}(S):V(S),S}var z=function(e,t,n){return M(e,t,n,!1)},Y=function(e,t,n){return M(e,t,n,!0)};fe.jsx=z,fe.jsxs=Y}(),pe.exports=de;var me,ye={exports:{}};
11
11
  /*!
12
12
  Copyright (c) 2018 Jed Watson.
13
13
  Licensed under the MIT License (MIT), see
14
14
  http://jedwatson.github.io/classnames
15
- */ye=me,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(" ")}ye.exports?(t.default=t,ye.exports=t):window.classNames=t}();var he=me.exports;const ge=(e,t,n)=>{let r=null;return function(...o){r&&clearTimeout(r),r=setTimeout((()=>{r=null,n||e.apply(this,o)}),t)}},ve=({content:e})=>pe.exports.jsx("span",{dangerouslySetInnerHTML:{__html:e}}),we={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},be=t({getTooltipData:()=>we}),xe=({children:e})=>{const[t,i]=n({DEFAULT_TOOLTIP_ID:new Set}),[l,a]=n({DEFAULT_TOOLTIP_ID:{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=r(((e="DEFAULT_TOOLTIP_ID")=>{var n,r;return{anchorRefs:null!==(n=t[e])&&void 0!==n?n:new Set,activeAnchor:null!==(r=l[e])&&void 0!==r?r:{current:null},attach:(...t)=>s(e,...t),detach:(...t)=>c(e,...t),setActiveAnchor:t=>((e,t)=>{a((n=>{var r;return(null===(r=n[e])||void 0===r?void 0:r.current)===t.current?n:{...n,[e]:t}}))})(e,t)}}),[t,l,s,c]),f=o((()=>({getTooltipData:u})),[u]);return pe.exports.jsx(be.Provider,{value:f,children:e})};function Re(e="DEFAULT_TOOLTIP_ID"){return i(be).getTooltipData(e)}const _e=({tooltipId:e,children:t,className:n,place:r,content:o,html:i,variant:s,offset:c,wrapper:u,events:f,positionStrategy:p,delayShow:d,delayHide:y})=>{const{attach:m,detach:h}=Re(e),g=l(null);return a((()=>(m(g),()=>{h(g)})),[]),pe.exports.jsx("span",{ref:g,className:he("react-tooltip-wrapper",n),"data-tooltip-place":r,"data-tooltip-content":o,"data-tooltip-html":i,"data-tooltip-variant":s,"data-tooltip-offset":c,"data-tooltip-wrapper":u,"data-tooltip-events":f,"data-tooltip-position-strategy":p,"data-tooltip-delay-show":d,"data-tooltip-delay-hide":y,children:t})},Te=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:n=null,place:r="top",offset:o=10,strategy:i="absolute",middlewares:l=[A(Number(o)),k(),E({padding:5})]})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{}};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{}};const a=l;return n?(a.push({name:"arrow",options:u={element:n,padding:5},async fn(e){const{element:t,padding:n=0}=u||{},{x:r,y:o,placement:i,rects:l,platform:a}=e;if(null==t)return console.warn("Floating UI: No `element` was passed to the `arrow` middleware."),{};const p=d(n),y={x:r,y:o},m=f(i),h=c(m),g=await a.getDimensions(t),w="y"===m?"top":"left",b="y"===m?"bottom":"right",x=l.reference[h]+l.reference[m]-y[m]-l.floating[h],R=y[m]-l.reference[m],_=await(null==a.getOffsetParent?void 0:a.getOffsetParent(t));let T=_?"y"===m?_.clientHeight||0:_.clientWidth||0:0;0===T&&(T=l.floating[h]);const O=x/2-R/2,k=p[w],S=T-g[h]-p[b],A=T/2-g[h]/2+O,E=v(k,A,S),j=null!=s(i)&&A!=E&&l.reference[h]/2-(A<k?p[w]:p[b])-g[h]/2<0;return{[m]:y[m]-(j?A<k?k-A:S-A:0),data:{[m]:E,centerOffset:A-E}}}}),ue(e,t,{placement:r,strategy:i,middleware:a}).then((({x:e,y:t,placement:n,middlewareData:r})=>{var o,i;const l={left:`${e}px`,top:`${t}px`},{x:a,y:s}=null!==(o=r.arrow)&&void 0!==o?o:{x:0,y:0};return{tooltipStyles:l,tooltipArrowStyles:{left:null!=a?`${a}px`:"",top:null!=s?`${s}px`:"",right:"",bottom:"",[null!==(i={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==i?i:"bottom"]:"-4px"}}}))):ue(e,t,{placement:"bottom",strategy:i,middleware:a}).then((({x:e,y:t})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{}})));var u};var Oe={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 ke=({id:e,className:t,classNameArrow:r,variant:o="dark",anchorId:i,place:s="top",offset:c=10,events:u=["hover"],positionStrategy:f="absolute",middlewares:p,wrapper:d,children:y=null,delayShow:m=0,delayHide:h=0,float:g=!1,noArrow:v=!1,clickable:w=!1,closeOnEsc:b=!1,style:x,position:R,afterShow:_,afterHide:T,content:O,html:k,isOpen:S,setIsOpen:A})=>{const E=l(null),j=l(null),L=l(null),P=l(null),[D,N]=n({}),[F,C]=n({}),[I,$]=n(!1),W=l(!1),[H,U]=n(!1),B=l(null),{anchorRefs:V,setActiveAnchor:M}=Re(e),[z,Y]=n({current:null}),q=l(!1),X=e=>{A?A(e):void 0===S&&$(e)};a((()=>{I!==W.current&&(W.current=I,I?null==_||_():null==T||T())}),[I]);const K=(e=h)=>{P.current&&clearTimeout(P.current),P.current=setTimeout((()=>{q.current||X(!1)}),e)},J=e=>{var t;if(!e)return;m?(L.current&&clearTimeout(L.current),L.current=setTimeout((()=>{X(!0)}),m)):X(!0);const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;Y((e=>e.current===n?e:{current:n})),M({current:n}),P.current&&clearTimeout(P.current)},Z=()=>{w?K(h||50):h?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})};U(!0),Te({place:s,offset:c,elementReference:n,tooltipReference:E.current,tooltipArrowReference:j.current,strategy:f,middlewares:p}).then((e=>{U(!1),Object.keys(e.tooltipStyles).length&&N(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&C(e.tooltipArrowStyles)}))},Q=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};G(n),B.current=n},ee=e=>{J(e),h&&K()},te=e=>{var t;(null===(t=z.current)||void 0===t?void 0:t.contains(e.target))||X(!1)},ne=e=>{"Escape"===e.key&&X(!1)},re=ge(J,50),oe=ge(Z,50);a((()=>{var e,t;const n=new Set(V),r=document.querySelector(`[id='${i}']`);if(r&&(Y((e=>e.current===r?e:{current:r})),n.add({current:r})),!n.size)return()=>null;b&&window.addEventListener("keydown",ne);const o=[];u.find((e=>"click"===e))&&(window.addEventListener("click",te),o.push({event:"click",listener:ee})),u.find((e=>"hover"===e))&&(o.push({event:"mouseenter",listener:re},{event:"mouseleave",listener:oe},{event:"focus",listener:re},{event:"blur",listener:oe}),g&&o.push({event:"mousemove",listener:Q}));const l=()=>{q.current=!0},a=()=>{q.current=!1,Z()};w&&(null===(e=E.current)||void 0===e||e.addEventListener("mouseenter",l),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)}))}));const s=null!=r?r:z.current,c=new MutationObserver((e=>{s&&e.some((e=>"childList"===e.type&&[...e.removedNodes].some((e=>!!e.contains(s)&&(X(!1),!0)))))}));return c.observe(document.body,{attributes:!1,childList:!0,subtree:!0}),()=>{var e,t;u.find((e=>"click"===e))&&window.removeEventListener("click",te),b&&window.removeEventListener("keydown",ne),w&&(null===(e=E.current)||void 0===e||e.removeEventListener("mouseenter",l),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)}))})),c.disconnect()}}),[V,z,b,i,u,h,m]),a((()=>{if(R)return G(R),()=>null;if(g)return B.current&&G(B.current),()=>null;let e=z.current;i&&(e=document.querySelector(`[id='${i}']`)),U(!0);let t=!0;return Te({place:s,offset:c,elementReference:e,tooltipReference:E.current,tooltipArrowReference:j.current,strategy:f,middlewares:p}).then((e=>{t&&(U(!1),Object.keys(e.tooltipStyles).length&&N(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&C(e.tooltipArrowStyles))})),()=>{t=!1}}),[I,S,i,z,O,k,s,c,f,R]),a((()=>()=>{L.current&&clearTimeout(L.current),P.current&&clearTimeout(P.current)}),[]);const ie=Boolean(k||O||y);return pe.exports.jsxs(d,{id:e,role:"tooltip",className:he("react-tooltip",Oe.tooltip,Oe[o],t,{[Oe.show]:ie&&!H&&(S||I),[Oe.fixed]:"fixed"===f,[Oe.clickable]:w}),style:{...x,...D},ref:E,children:[y||k&&pe.exports.jsx(ve,{content:k})||O,pe.exports.jsx(d,{className:he("react-tooltip-arrow",Oe.arrow,r,{[Oe["no-arrow"]]:v}),style:F,ref:j})]})},Se=({id:e,anchorId:t,content:r,html:o,className:i,classNameArrow:l,variant:s="dark",place:c="top",offset:u=10,wrapper:f="div",children:p=null,events:d=["hover"],positionStrategy:y="absolute",middlewares:m,delayShow:h=0,delayHide:g=0,float:v=!1,noArrow:w=!1,clickable:b=!1,closeOnEsc:x=!1,style:R,position:_,isOpen:T,setIsOpen:O,afterShow:k,afterHide:S})=>{const[A,E]=n(r),[j,L]=n(o),[P,D]=n(c),[N,F]=n(s),[C,I]=n(u),[$,W]=n(h),[H,U]=n(g),[B,V]=n(v),[M,z]=n(f),[Y,q]=n(d),[X,K]=n(y),{anchorRefs:J,activeAnchor:Z}=Re(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;D(null!==(t=e)&&void 0!==t?t:c)},content:e=>{E(null!=e?e:r)},html:e=>{L(null!=e?e:o)},variant:e=>{var t;F(null!==(t=e)&&void 0!==t?t:s)},offset:e=>{I(null===e?u:Number(e))},wrapper:e=>{var t;z(null!==(t=e)&&void 0!==t?t:f)},events:e=>{const t=null==e?void 0:e.split(" ");q(null!=t?t:d)},"position-strategy":e=>{var t;K(null!==(t=e)&&void 0!==t?t:y)},"delay-show":e=>{W(null===e?h:Number(e))},"delay-hide":e=>{U(null===e?g:Number(e))},float:e=>{V(null===e?v: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)}))};a((()=>{E(r)}),[r]),a((()=>{L(o)}),[o]),a((()=>{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:A,html:j,place:P,variant:N,offset:C,wrapper:M,events:Y,positionStrategy:X,middlewares:m,delayShow:$,delayHide:H,float:B,noArrow:w,clickable:b,closeOnEsc:x,style:R,position:_,isOpen:T,setIsOpen:O,afterShow:k,afterHide:S};return p?pe.exports.jsx(ke,{...ee,children:p}):pe.exports.jsx(ke,{...ee})};export{Se as Tooltip,xe as TooltipProvider,_e as TooltipWrapper,O as autoPlacement,k as flip,S as inline,A as offset,E as shift,j as size};
15
+ */me=ye,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(" ")}me.exports?(t.default=t,me.exports=t):window.classNames=t}();var he=ye.exports;const ge=(e,t,n)=>{let r=null;return function(...o){r&&clearTimeout(r),r=setTimeout((()=>{r=null,n||e.apply(this,o)}),t)}},ve=({content:e})=>pe.exports.jsx("span",{dangerouslySetInnerHTML:{__html:e}}),we={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},be=t({getTooltipData:()=>we}),xe=({children:e})=>{const[t,i]=n({DEFAULT_TOOLTIP_ID:new Set}),[l,a]=n({DEFAULT_TOOLTIP_ID:{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=r(((e="DEFAULT_TOOLTIP_ID")=>{var n,r;return{anchorRefs:null!==(n=t[e])&&void 0!==n?n:new Set,activeAnchor:null!==(r=l[e])&&void 0!==r?r:{current:null},attach:(...t)=>s(e,...t),detach:(...t)=>c(e,...t),setActiveAnchor:t=>((e,t)=>{a((n=>{var r;return(null===(r=n[e])||void 0===r?void 0:r.current)===t.current?n:{...n,[e]:t}}))})(e,t)}}),[t,l,s,c]),f=o((()=>({getTooltipData:u})),[u]);return pe.exports.jsx(be.Provider,{value:f,children:e})};function Re(e="DEFAULT_TOOLTIP_ID"){return i(be).getTooltipData(e)}const _e=({tooltipId:e,children:t,className:n,place:r,content:o,html:i,variant:s,offset:c,wrapper:u,events:f,positionStrategy:p,delayShow:d,delayHide:m})=>{const{attach:y,detach:h}=Re(e),g=l(null);return a((()=>(y(g),()=>{h(g)})),[]),pe.exports.jsx("span",{ref:g,className:he("react-tooltip-wrapper",n),"data-tooltip-place":r,"data-tooltip-content":o,"data-tooltip-html":i,"data-tooltip-variant":s,"data-tooltip-offset":c,"data-tooltip-wrapper":u,"data-tooltip-events":f,"data-tooltip-position-strategy":p,"data-tooltip-delay-show":d,"data-tooltip-delay-hide":m,children:t})},Te=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:n=null,place:r="top",offset:o=10,strategy:i="absolute",middlewares:l=[A(Number(o)),k(),E({padding:5})]})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{}};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{}};const a=l;return n?(a.push({name:"arrow",options:u={element:n,padding:5},async fn(e){const{element:t,padding:n=0}=u||{},{x:r,y:o,placement:i,rects:l,platform:a}=e;if(null==t)return console.warn("Floating UI: No `element` was passed to the `arrow` middleware."),{};const p=d(n),m={x:r,y:o},y=f(i),h=c(y),g=await a.getDimensions(t),w="y"===y?"top":"left",b="y"===y?"bottom":"right",x=l.reference[h]+l.reference[y]-m[y]-l.floating[h],R=m[y]-l.reference[y],_=await(null==a.getOffsetParent?void 0:a.getOffsetParent(t));let T=_?"y"===y?_.clientHeight||0:_.clientWidth||0:0;0===T&&(T=l.floating[h]);const O=x/2-R/2,k=p[w],S=T-g[h]-p[b],A=T/2-g[h]/2+O,E=v(k,A,S),j=null!=s(i)&&A!=E&&l.reference[h]/2-(A<k?p[w]:p[b])-g[h]/2<0;return{[y]:m[y]-(j?A<k?k-A:S-A:0),data:{[y]:E,centerOffset:A-E}}}}),ue(e,t,{placement:r,strategy:i,middleware:a}).then((({x:e,y:t,placement:n,middlewareData:r})=>{var o,i;const l={left:`${e}px`,top:`${t}px`},{x:a,y:s}=null!==(o=r.arrow)&&void 0!==o?o:{x:0,y:0};return{tooltipStyles:l,tooltipArrowStyles:{left:null!=a?`${a}px`:"",top:null!=s?`${s}px`:"",right:"",bottom:"",[null!==(i={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==i?i:"bottom"]:"-4px"}}}))):ue(e,t,{placement:"bottom",strategy:i,middleware:a}).then((({x:e,y:t})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{}})));var u};var Oe={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 ke=({id:e,className:t,classNameArrow:r,variant:o="dark",anchorId:i,place:s="top",offset:c=10,events:u=["hover"],positionStrategy:f="absolute",middlewares:p,wrapper:d,children:m=null,delayShow:y=0,delayHide:h=0,float:g=!1,noArrow:v=!1,clickable:w=!1,closeOnEsc:b=!1,style:x,position:R,afterShow:_,afterHide:T,content:O,html:k,isOpen:S,setIsOpen:A})=>{const E=l(null),j=l(null),L=l(null),P=l(null),[D,N]=n({}),[F,C]=n({}),[I,$]=n(!1),[W,B]=n(!1),H=l(!1),U=l(null),{anchorRefs:V,setActiveAnchor:M}=Re(e),[z,Y]=n({current:null}),q=l(!1);a((()=>{I||B(!1)}),[I]);const X=e=>{B(!0),setTimeout((()=>{null==A||A(e),void 0===S&&$(e)}),10)};a((()=>{if(void 0===S)return()=>null;S&&B(!0);const e=setTimeout((()=>{$(S)}),10);return()=>{clearTimeout(e)}}),[S]),a((()=>{I!==H.current&&(H.current=I,I?null==_||_():null==T||T())}),[I]);const K=(e=h)=>{P.current&&clearTimeout(P.current),P.current=setTimeout((()=>{q.current||X(!1)}),e)},J=e=>{var t;if(!e)return;y?(L.current&&clearTimeout(L.current),L.current=setTimeout((()=>{X(!0)}),y)):X(!0);const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;Y((e=>e.current===n?e:{current:n})),M({current:n}),P.current&&clearTimeout(P.current)},Z=()=>{w?K(h||100):h?K():X(!1),L.current&&clearTimeout(L.current)},G=({x:e,y:t})=>{Te({place:s,offset:c,elementReference:{getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})},tooltipReference:E.current,tooltipArrowReference:j.current,strategy:f,middlewares:p}).then((e=>{Object.keys(e.tooltipStyles).length&&N(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&C(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),h&&K()},te=e=>{var t;(null===(t=z.current)||void 0===t?void 0:t.contains(e.target))||X(!1)},ne=e=>{"Escape"===e.key&&X(!1)},re=ge(J,50),oe=ge(Z,50);a((()=>{var e,t;const n=new Set(V),r=document.querySelector(`[id='${i}']`);if(r&&(Y((e=>e.current===r?e:{current:r})),n.add({current:r})),!n.size)return()=>null;b&&window.addEventListener("keydown",ne);const o=[];u.find((e=>"click"===e))&&(window.addEventListener("click",te),o.push({event:"click",listener:ee})),u.find((e=>"hover"===e))&&(o.push({event:"mouseenter",listener:re},{event:"mouseleave",listener:oe},{event:"focus",listener:re},{event:"blur",listener:oe}),g&&o.push({event:"mousemove",listener:Q}));const l=()=>{q.current=!0},a=()=>{q.current=!1,Z()};w&&(null===(e=E.current)||void 0===e||e.addEventListener("mouseenter",l),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)}))}));const s=null!=r?r:z.current,c=new MutationObserver((e=>{s&&e.some((e=>"childList"===e.type&&[...e.removedNodes].some((e=>!!e.contains(s)&&(X(!1),!0)))))}));return c.observe(document.body,{attributes:!1,childList:!0,subtree:!0}),()=>{var e,t;u.find((e=>"click"===e))&&window.removeEventListener("click",te),b&&window.removeEventListener("keydown",ne),w&&(null===(e=E.current)||void 0===e||e.removeEventListener("mouseenter",l),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)}))})),c.disconnect()}}),[W,V,z,b,i,u,h,y]),a((()=>{if(R)return G(R),()=>null;if(g)return U.current&&G(U.current),()=>null;let e=z.current;i&&(e=document.querySelector(`[id='${i}']`));let t=!0;return Te({place:s,offset:c,elementReference:e,tooltipReference:E.current,tooltipArrowReference:j.current,strategy:f,middlewares:p}).then((e=>{t&&(Object.keys(e.tooltipStyles).length&&N(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&C(e.tooltipArrowStyles))})),()=>{t=!1}}),[I,i,z,O,k,s,c,f,R]),a((()=>()=>{L.current&&clearTimeout(L.current),P.current&&clearTimeout(P.current)}),[]);const ie=Boolean(k||O||m),le=Boolean(ie&&I&&Object.keys(D).length>0);return W?pe.exports.jsxs(d,{id:e,role:"tooltip",className:he("react-tooltip",Oe.tooltip,Oe[o],t,{[Oe.show]:le,[Oe.fixed]:"fixed"===f,[Oe.clickable]:w}),style:{...x,...D},ref:E,children:[m||k&&pe.exports.jsx(ve,{content:k})||O,pe.exports.jsx(d,{className:he("react-tooltip-arrow",Oe.arrow,r,{[Oe["no-arrow"]]:v}),style:F,ref:j})]}):null},Se=({id:e,anchorId:t,content:r,html:o,className:i,classNameArrow:l,variant:s="dark",place:c="top",offset:u=10,wrapper:f="div",children:p=null,events:d=["hover"],positionStrategy:m="absolute",middlewares:y,delayShow:h=0,delayHide:g=0,float:v=!1,noArrow:w=!1,clickable:b=!1,closeOnEsc:x=!1,style:R,position:_,isOpen:T,setIsOpen:O,afterShow:k,afterHide:S})=>{const[A,E]=n(r),[j,L]=n(o),[P,D]=n(c),[N,F]=n(s),[C,I]=n(u),[$,W]=n(h),[B,H]=n(g),[U,V]=n(v),[M,z]=n(f),[Y,q]=n(d),[X,K]=n(m),{anchorRefs:J,activeAnchor:Z}=Re(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;D(null!==(t=e)&&void 0!==t?t:c)},content:e=>{E(null!=e?e:r)},html:e=>{L(null!=e?e:o)},variant:e=>{var t;F(null!==(t=e)&&void 0!==t?t:s)},offset:e=>{I(null===e?u:Number(e))},wrapper:e=>{var t;z(null!==(t=e)&&void 0!==t?t:f)},events:e=>{const t=null==e?void 0:e.split(" ");q(null!=t?t:d)},"position-strategy":e=>{var t;K(null!==(t=e)&&void 0!==t?t:m)},"delay-show":e=>{W(null===e?h:Number(e))},"delay-hide":e=>{H(null===e?g:Number(e))},float:e=>{V(null===e?v: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)}))};a((()=>{E(r)}),[r]),a((()=>{L(o)}),[o]),a((()=>{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:A,html:j,place:P,variant:N,offset:C,wrapper:M,events:Y,positionStrategy:X,middlewares:y,delayShow:$,delayHide:B,float:U,noArrow:w,clickable:b,closeOnEsc:x,style:R,position:_,isOpen:T,setIsOpen:O,afterShow:k,afterHide:S};return p?pe.exports.jsx(ke,{...ee,children:p}):pe.exports.jsx(ke,{...ee})};export{Se as Tooltip,xe as TooltipProvider,_e as TooltipWrapper,O as autoPlacement,k as flip,S as inline,A as offset,E as shift,j as size};
@@ -2676,20 +2676,48 @@
2676
2676
  const [inlineStyles, setInlineStyles] = require$$0.useState({});
2677
2677
  const [inlineArrowStyles, setInlineArrowStyles] = require$$0.useState({});
2678
2678
  const [show, setShow] = require$$0.useState(false);
2679
+ const [rendered, setRendered] = require$$0.useState(false);
2679
2680
  const wasShowing = require$$0.useRef(false);
2680
- const [calculatingPosition, setCalculatingPosition] = require$$0.useState(false);
2681
2681
  const lastFloatPosition = require$$0.useRef(null);
2682
2682
  const { anchorRefs, setActiveAnchor: setProviderActiveAnchor } = useTooltip(id);
2683
2683
  const [activeAnchor, setActiveAnchor] = require$$0.useState({ current: null });
2684
2684
  const hoveringTooltip = require$$0.useRef(false);
2685
+ require$$0.useEffect(() => {
2686
+ if (!show) {
2687
+ setRendered(false);
2688
+ }
2689
+ }, [show]);
2685
2690
  const handleShow = (value) => {
2686
- if (setIsOpen) {
2687
- setIsOpen(value);
2691
+ setRendered(true);
2692
+ /**
2693
+ * wait for the component to render and calculate position
2694
+ * before actually showing
2695
+ */
2696
+ setTimeout(() => {
2697
+ setIsOpen === null || setIsOpen === void 0 ? void 0 : setIsOpen(value);
2698
+ if (isOpen === undefined) {
2699
+ setShow(value);
2700
+ }
2701
+ }, 10);
2702
+ };
2703
+ /**
2704
+ * this replicates the effect from `handleShow()`
2705
+ * when `isOpen` is changed from outside
2706
+ */
2707
+ require$$0.useEffect(() => {
2708
+ if (isOpen === undefined) {
2709
+ return () => null;
2688
2710
  }
2689
- else if (isOpen === undefined) {
2690
- setShow(value);
2711
+ if (isOpen) {
2712
+ setRendered(true);
2691
2713
  }
2692
- };
2714
+ const timeout = setTimeout(() => {
2715
+ setShow(isOpen);
2716
+ }, 10);
2717
+ return () => {
2718
+ clearTimeout(timeout);
2719
+ };
2720
+ }, [isOpen]);
2693
2721
  require$$0.useEffect(() => {
2694
2722
  if (show === wasShowing.current) {
2695
2723
  return;
@@ -2742,7 +2770,7 @@
2742
2770
  const handleHideTooltip = () => {
2743
2771
  if (clickable) {
2744
2772
  // allow time for the mouse to reach the tooltip, in case there's a gap
2745
- handleHideTooltipDelayed(delayHide || 50);
2773
+ handleHideTooltipDelayed(delayHide || 100);
2746
2774
  }
2747
2775
  else if (delayHide) {
2748
2776
  handleHideTooltipDelayed();
@@ -2769,7 +2797,6 @@
2769
2797
  };
2770
2798
  },
2771
2799
  };
2772
- setCalculatingPosition(true);
2773
2800
  computeTooltipPosition({
2774
2801
  place,
2775
2802
  offset,
@@ -2779,7 +2806,6 @@
2779
2806
  strategy: positionStrategy,
2780
2807
  middlewares,
2781
2808
  }).then((computedStylesData) => {
2782
- setCalculatingPosition(false);
2783
2809
  if (Object.keys(computedStylesData.tooltipStyles).length) {
2784
2810
  setInlineStyles(computedStylesData.tooltipStyles);
2785
2811
  }
@@ -2909,7 +2935,11 @@
2909
2935
  });
2910
2936
  parentObserver.disconnect();
2911
2937
  };
2912
- }, [anchorRefs, activeAnchor, closeOnEsc, anchorId, events, delayHide, delayShow]);
2938
+ /**
2939
+ * rendered is also a dependency to ensure anchor observers are re-registered
2940
+ * since `tooltipRef` becomes stale after removing/adding the tooltip to the DOM
2941
+ */
2942
+ }, [rendered, anchorRefs, activeAnchor, closeOnEsc, anchorId, events, delayHide, delayShow]);
2913
2943
  require$$0.useEffect(() => {
2914
2944
  if (position) {
2915
2945
  // if `position` is set, override regular and `float` positioning
@@ -2935,7 +2965,6 @@
2935
2965
  // `anchorId` element takes precedence
2936
2966
  elementReference = document.querySelector(`[id='${anchorId}']`);
2937
2967
  }
2938
- setCalculatingPosition(true);
2939
2968
  let mounted = true;
2940
2969
  computeTooltipPosition({
2941
2970
  place,
@@ -2950,7 +2979,6 @@
2950
2979
  // invalidate computed positions after remount
2951
2980
  return;
2952
2981
  }
2953
- setCalculatingPosition(false);
2954
2982
  if (Object.keys(computedStylesData.tooltipStyles).length) {
2955
2983
  setInlineStyles(computedStylesData.tooltipStyles);
2956
2984
  }
@@ -2961,18 +2989,7 @@
2961
2989
  return () => {
2962
2990
  mounted = false;
2963
2991
  };
2964
- }, [
2965
- show,
2966
- isOpen,
2967
- anchorId,
2968
- activeAnchor,
2969
- content,
2970
- html,
2971
- place,
2972
- offset,
2973
- positionStrategy,
2974
- position,
2975
- ]);
2992
+ }, [show, anchorId, activeAnchor, content, html, place, offset, positionStrategy, position]);
2976
2993
  require$$0.useEffect(() => {
2977
2994
  return () => {
2978
2995
  if (tooltipShowDelayTimerRef.current) {
@@ -2984,13 +3001,14 @@
2984
3001
  };
2985
3002
  }, []);
2986
3003
  const hasContentOrChildren = Boolean(html || content || children);
2987
- return (jsxRuntime.exports.jsxs(WrapperElement, { id: id, role: "tooltip", className: classNames('react-tooltip', styles['tooltip'], styles[variant], className, {
2988
- [styles['show']]: hasContentOrChildren && !calculatingPosition && (isOpen || show),
3004
+ const canShow = Boolean(hasContentOrChildren && show && Object.keys(inlineStyles).length > 0);
3005
+ return rendered ? (jsxRuntime.exports.jsxs(WrapperElement, { id: id, role: "tooltip", className: classNames('react-tooltip', styles['tooltip'], styles[variant], className, {
3006
+ [styles['show']]: canShow,
2989
3007
  [styles['fixed']]: positionStrategy === 'fixed',
2990
3008
  [styles['clickable']]: clickable,
2991
3009
  }), style: { ...externalStyles, ...inlineStyles }, ref: tooltipRef, children: [children || (html && jsxRuntime.exports.jsx(TooltipContent, { content: html })) || content, jsxRuntime.exports.jsx(WrapperElement, { className: classNames('react-tooltip-arrow', styles['arrow'], classNameArrow, {
2992
3010
  [styles['no-arrow']]: noArrow,
2993
- }), style: inlineArrowStyles, ref: tooltipArrowRef })] }));
3011
+ }), style: inlineArrowStyles, ref: tooltipArrowRef })] })) : null;
2994
3012
  };
2995
3013
 
2996
3014
  const TooltipController = ({ id, anchorId, content, html, className, classNameArrow, variant = 'dark', place = 'top', offset = 10, wrapper = 'div', children = null, events = ['hover'], positionStrategy = 'absolute', middlewares, delayShow = 0, delayHide = 0, float = false, noArrow = false, clickable = false, closeOnEsc = false, style, position, isOpen, setIsOpen, afterShow, afterHide, }) => {
@@ -1,4 +1,4 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ReactTooltip={},e.React)}(this,(function(e,t){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=n(t);function o(e){return e.split("-")[1]}function i(e){return"y"===e?"height":"width"}function l(e){return e.split("-")[0]}function a(e){return["top","bottom"].includes(l(e))?"x":"y"}function s(e,t,n){let{reference:r,floating:s}=e;const c=r.x+r.width/2-s.width/2,u=r.y+r.height/2-s.height/2,f=a(t),p=i(f),d=r[p]/2-s[p]/2,y="x"===f;let m;switch(l(t)){case"top":m={x:c,y:r.y-s.height};break;case"bottom":m={x:c,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:u};break;case"left":m={x:r.x-s.width,y:u};break;default:m={x:r.x,y:r.y}}switch(o(t)){case"start":m[f]-=d*(n&&y?-1:1);break;case"end":m[f]+=d*(n&&y?-1:1)}return m}function c(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function u(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function f(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:l,elements:a,strategy:s}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:d="floating",altBoundary:y=!1,padding:m=0}=t,h=c(m),g=a[y?"floating"===d?"reference":"floating":d],v=u(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(g)))||n?g:g.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:f,rootBoundary:p,strategy:s})),w="floating"===d?{...l.floating,x:r,y:o}:l.reference,b=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),x=await(null==i.isElement?void 0:i.isElement(b))&&await(null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},R=u(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:w,offsetParent:b,strategy:s}):w);return{top:(v.top-R.top+h.top)/x.y,bottom:(R.bottom-v.bottom+h.bottom)/x.y,left:(v.left-R.left+h.left)/x.x,right:(R.right-v.right+h.right)/x.x}}const p=Math.min,d=Math.max;function y(e,t,n){return d(e,p(t,n))}const m=["top","right","bottom","left"].reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[]),h={left:"right",right:"left",bottom:"top",top:"bottom"};function g(e){return e.replace(/left|right|bottom|top/g,(e=>h[e]))}function v(e,t,n){void 0===n&&(n=!1);const r=o(e),l=a(e),s=i(l);let c="x"===l?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[s]>t.floating[s]&&(c=g(c)),{main:c,cross:g(c)}}const w={start:"end",end:"start"};function b(e){return e.replace(/start|end/g,(e=>w[e]))}const x=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:a,initialPlacement:s,platform:c,elements:u}=t,{mainAxis:p=!0,crossAxis:d=!0,fallbackPlacements:y,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:w=!0,...x}=e,R=l(r),S=l(s)===s,_=await(null==c.isRTL?void 0:c.isRTL(u.floating)),T=y||(S||!w?[g(s)]:function(e){const t=g(e);return[b(e),t,b(t)]}(s));y||"none"===h||T.push(...function(e,t,n,r){const i=o(e);let a=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:l;default:return[]}}(l(e),"start"===n,r);return i&&(a=a.map((e=>e+"-"+i)),t&&(a=a.concat(a.map(b)))),a}(s,w,h,_));const k=[s,...T],O=await f(t,x),E=[];let A=(null==(n=i.flip)?void 0:n.overflows)||[];if(p&&E.push(O[R]),d){const{main:e,cross:t}=v(r,a,_);E.push(O[e],O[t])}if(A=[...A,{placement:r,overflows:E}],!E.every((e=>e<=0))){var j,P;const e=((null==(j=i.flip)?void 0:j.index)||0)+1,t=k[e];if(t)return{data:{index:e,overflows:A},reset:{placement:t}};let n=null==(P=A.find((e=>e.overflows[0]<=0)))?void 0:P.placement;if(!n)switch(m){case"bestFit":{var L;const e=null==(L=A.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:L[0];e&&(n=e);break}case"initialPlacement":n=s}if(r!==n)return{reset:{placement:n}}}return{}}}};const R=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await async function(e,t){const{placement:n,platform:r,elements:i}=e,s=await(null==r.isRTL?void 0:r.isRTL(i.floating)),c=l(n),u=o(n),f="x"===a(n),p=["left","top"].includes(c)?-1:1,d=s&&f?-1:1,y="function"==typeof t?t(e):t;let{mainAxis:m,crossAxis:h,alignmentAxis:g}="number"==typeof y?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...y};return u&&"number"==typeof g&&(h="end"===u?-1*g:g),f?{x:h*d,y:m*p}:{x:m*p,y:h*d}}(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};const S=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...u}=e,p={x:n,y:r},d=await f(t,u),m=a(l(o)),h="x"===m?"y":"x";let g=p[m],v=p[h];if(i){const e="y"===m?"bottom":"right";g=y(g+d["y"===m?"top":"left"],g,g-d[e])}if(s){const e="y"===h?"bottom":"right";v=y(v+d["y"===h?"top":"left"],v,v-d[e])}const w=c.fn({...t,[m]:g,[h]:v});return{...w,data:{x:w.x-n,y:w.y-r}}}}};function _(e){var t;return(null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function T(e){return _(e).getComputedStyle(e)}const k=Math.min,O=Math.max,E=Math.round;function A(e){const t=T(e);let n=parseFloat(t.width),r=parseFloat(t.height);const o=e.offsetWidth,i=e.offsetHeight,l=E(n)!==o||E(r)!==i;return l&&(n=o,r=i),{width:n,height:r,fallback:l}}function j(e){return D(e)?(e.nodeName||"").toLowerCase():""}let P;function L(){if(P)return P;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(P=e.brands.map((e=>e.brand+"/"+e.version)).join(" "),P):navigator.userAgent}function N(e){return e instanceof _(e).HTMLElement}function C(e){return e instanceof _(e).Element}function D(e){return e instanceof _(e).Node}function F(e){if("undefined"==typeof ShadowRoot)return!1;return e instanceof _(e).ShadowRoot||e instanceof ShadowRoot}function $(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=T(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function I(e){return["table","td","th"].includes(j(e))}function W(e){const t=/firefox/i.test(L()),n=T(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 H(){return!/^((?!chrome|android).)*safari/i.test(L())}function B(e){return["html","body","#document"].includes(j(e))}function U(e){return C(e)?e:e.contextElement}const M={x:1,y:1};function V(e){const t=U(e);if(!N(t))return M;const n=t.getBoundingClientRect(),{width:r,height:o,fallback:i}=A(t);let l=(i?E(n.width):n.width)/r,a=(i?E(n.height):n.height)/o;return l&&Number.isFinite(l)||(l=1),a&&Number.isFinite(a)||(a=1),{x:l,y:a}}function z(e,t,n,r){var o,i;void 0===t&&(t=!1),void 0===n&&(n=!1);const l=e.getBoundingClientRect(),a=U(e);let s=M;t&&(r?C(r)&&(s=V(r)):s=V(e));const c=a?_(a):window,u=!H()&&n;let f=(l.left+(u&&(null==(o=c.visualViewport)?void 0:o.offsetLeft)||0))/s.x,p=(l.top+(u&&(null==(i=c.visualViewport)?void 0:i.offsetTop)||0))/s.y,d=l.width/s.x,y=l.height/s.y;if(a){const e=_(a),t=r&&C(r)?_(r):r;let n=e.frameElement;for(;n&&r&&t!==e;){const e=V(n),t=n.getBoundingClientRect(),r=getComputedStyle(n);t.x+=(n.clientLeft+parseFloat(r.paddingLeft))*e.x,t.y+=(n.clientTop+parseFloat(r.paddingTop))*e.y,f*=e.x,p*=e.y,d*=e.x,y*=e.y,f+=t.x,p+=t.y,n=_(n).frameElement}}return{width:d,height:y,top:p,right:f+d,bottom:p+y,left:f,x:f,y:p}}function q(e){return((D(e)?e.ownerDocument:e.document)||window.document).documentElement}function Y(e){return C(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function X(e){return z(q(e)).left+Y(e).scrollLeft}function K(e){if("html"===j(e))return e;const t=e.assignedSlot||e.parentNode||F(e)&&e.host||q(e);return F(t)?t.host:t}function J(e){const t=K(e);return B(t)?t.ownerDocument.body:N(t)&&$(t)?t:J(t)}function Z(e,t){var n;void 0===t&&(t=[]);const r=J(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=_(r);return o?t.concat(i,i.visualViewport||[],$(r)?r:[]):t.concat(r,Z(r))}function G(e,t,n){return"viewport"===t?u(function(e,t){const n=_(e),r=q(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=H();(e||!e&&"fixed"===t)&&(a=o.offsetLeft,s=o.offsetTop)}return{width:i,height:l,x:a,y:s}}(e,n)):C(t)?u(function(e,t){const n=z(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=N(e)?V(e):{x:1,y:1};return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n)):u(function(e){const t=q(e),n=Y(e),r=e.ownerDocument.body,o=O(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=O(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+X(e);const a=-n.scrollTop;return"rtl"===T(r).direction&&(l+=O(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:a}}(q(e)))}function Q(e){return N(e)&&"fixed"!==T(e).position?e.offsetParent:null}function ee(e){const t=_(e);let n=Q(e);for(;n&&I(n)&&"static"===T(n).position;)n=Q(n);return n&&("html"===j(n)||"body"===j(n)&&"static"===T(n).position&&!W(n))?t:n||function(e){let t=K(e);for(;N(t)&&!B(t);){if(W(t))return t;t=K(t)}return null}(e)||t}function te(e,t,n){const r=N(t),o=q(t),i=z(e,!0,"fixed"===n,t);let l={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if(r||!r&&"fixed"!==n)if(("body"!==j(t)||$(o))&&(l=Y(t)),N(t)){const e=z(t,!0);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&(a.x=X(o));return{x:i.left+l.scrollLeft-a.x,y:i.top+l.scrollTop-a.y,width:i.width,height:i.height}}const ne={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let r=Z(e).filter((e=>C(e)&&"body"!==j(e))),o=null;const i="fixed"===T(e).position;let l=i?K(e):e;for(;C(l)&&!B(l);){const e=T(l),t=W(l);(i?t||o:t||"static"!==e.position||!o||!["absolute","fixed"].includes(o.position))?o=e:r=r.filter((e=>e!==l)),l=K(l)}return t.set(e,r),r}(t,this._c):[].concat(n),l=[...i,r],a=l[0],s=l.reduce(((e,n)=>{const r=G(t,n,o);return e.top=O(r.top,e.top),e.right=k(r.right,e.right),e.bottom=k(r.bottom,e.bottom),e.left=O(r.left,e.left),e}),G(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=N(n),i=q(n);if(n===i)return t;let l={scrollLeft:0,scrollTop:0},a={x:1,y:1};const s={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==j(n)||$(i))&&(l=Y(n)),N(n))){const e=z(n);a=V(n),s.x=e.x+n.clientLeft,s.y=e.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-l.scrollLeft*a.x+s.x,y:t.y*a.y-l.scrollTop*a.y+s.y}},isElement:C,getDimensions:function(e){return N(e)?A(e):e.getBoundingClientRect()},getOffsetParent:ee,getDocumentElement:q,getScale:V,async getElementRects(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||ee,i=this.getDimensions;return{reference:te(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===T(e).direction},re=(e,t,n)=>{const r=new Map,o={platform:ne,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,a=i.filter(Boolean),c=await(null==l.isRTL?void 0:l.isRTL(t));if(null==l&&console.error(["Floating UI: `platform` property was not passed to config. If you","want to use Floating UI on the web, install @floating-ui/dom","instead of the /core package. Otherwise, you can create your own","`platform`: https://floating-ui.com/docs/platform"].join(" ")),a.filter((e=>{let{name:t}=e;return"autoPlacement"===t||"flip"===t})).length>1)throw new Error(["Floating UI: duplicate `flip` and/or `autoPlacement` middleware","detected. This will lead to an infinite loop. Ensure only one of","either has been passed to the `middleware` array."].join(" "));e&&t||console.error(["Floating UI: The reference and/or floating element was not defined","when `computePosition()` was called. Ensure that both elements have","been created and can be measured."].join(" "));let u=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:p}=s(u,r,c),d=r,y={},m=0;for(let n=0;n<a.length;n++){const{name:i,fn:h}=a[n],{x:g,y:v,data:w,reset:b}=await h({x:f,y:p,initialPlacement:r,placement:d,strategy:o,middlewareData:y,rects:u,platform:l,elements:{reference:e,floating:t}});f=null!=g?g:f,p=null!=v?v:p,y={...y,[i]:{...y[i],...w}},m>50&&console.warn(["Floating UI: The middleware lifecycle appears to be running in an","infinite loop. This is usually caused by a `reset` continually","being returned without a break condition."].join(" ")),b&&m<=50&&(m++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(u=!0===b.rects?await l.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:f,y:p}=s(u,d,c))),n=-1)}return{x:f,y:p,placement:d,strategy:o,middlewareData:y}})(e,t,{...o,platform:i})};var oe={exports:{}},ie={};
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ReactTooltip={},e.React)}(this,(function(e,t){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=n(t);function o(e){return e.split("-")[1]}function i(e){return"y"===e?"height":"width"}function l(e){return e.split("-")[0]}function a(e){return["top","bottom"].includes(l(e))?"x":"y"}function s(e,t,n){let{reference:r,floating:s}=e;const c=r.x+r.width/2-s.width/2,u=r.y+r.height/2-s.height/2,f=a(t),p=i(f),d=r[p]/2-s[p]/2,y="x"===f;let m;switch(l(t)){case"top":m={x:c,y:r.y-s.height};break;case"bottom":m={x:c,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:u};break;case"left":m={x:r.x-s.width,y:u};break;default:m={x:r.x,y:r.y}}switch(o(t)){case"start":m[f]-=d*(n&&y?-1:1);break;case"end":m[f]+=d*(n&&y?-1:1)}return m}function c(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function u(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function f(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:l,elements:a,strategy:s}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:d="floating",altBoundary:y=!1,padding:m=0}=t,h=c(m),g=a[y?"floating"===d?"reference":"floating":d],v=u(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(g)))||n?g:g.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:f,rootBoundary:p,strategy:s})),w="floating"===d?{...l.floating,x:r,y:o}:l.reference,b=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),x=await(null==i.isElement?void 0:i.isElement(b))&&await(null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},R=u(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:w,offsetParent:b,strategy:s}):w);return{top:(v.top-R.top+h.top)/x.y,bottom:(R.bottom-v.bottom+h.bottom)/x.y,left:(v.left-R.left+h.left)/x.x,right:(R.right-v.right+h.right)/x.x}}const p=Math.min,d=Math.max;function y(e,t,n){return d(e,p(t,n))}const m=["top","right","bottom","left"].reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[]),h={left:"right",right:"left",bottom:"top",top:"bottom"};function g(e){return e.replace(/left|right|bottom|top/g,(e=>h[e]))}function v(e,t,n){void 0===n&&(n=!1);const r=o(e),l=a(e),s=i(l);let c="x"===l?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[s]>t.floating[s]&&(c=g(c)),{main:c,cross:g(c)}}const w={start:"end",end:"start"};function b(e){return e.replace(/start|end/g,(e=>w[e]))}const x=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:a,initialPlacement:s,platform:c,elements:u}=t,{mainAxis:p=!0,crossAxis:d=!0,fallbackPlacements:y,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:w=!0,...x}=e,R=l(r),S=l(s)===s,_=await(null==c.isRTL?void 0:c.isRTL(u.floating)),T=y||(S||!w?[g(s)]:function(e){const t=g(e);return[b(e),t,b(t)]}(s));y||"none"===h||T.push(...function(e,t,n,r){const i=o(e);let a=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:l;default:return[]}}(l(e),"start"===n,r);return i&&(a=a.map((e=>e+"-"+i)),t&&(a=a.concat(a.map(b)))),a}(s,w,h,_));const k=[s,...T],O=await f(t,x),E=[];let A=(null==(n=i.flip)?void 0:n.overflows)||[];if(p&&E.push(O[R]),d){const{main:e,cross:t}=v(r,a,_);E.push(O[e],O[t])}if(A=[...A,{placement:r,overflows:E}],!E.every((e=>e<=0))){var j,P;const e=((null==(j=i.flip)?void 0:j.index)||0)+1,t=k[e];if(t)return{data:{index:e,overflows:A},reset:{placement:t}};let n=null==(P=A.find((e=>e.overflows[0]<=0)))?void 0:P.placement;if(!n)switch(m){case"bestFit":{var L;const e=null==(L=A.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:L[0];e&&(n=e);break}case"initialPlacement":n=s}if(r!==n)return{reset:{placement:n}}}return{}}}};const R=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await async function(e,t){const{placement:n,platform:r,elements:i}=e,s=await(null==r.isRTL?void 0:r.isRTL(i.floating)),c=l(n),u=o(n),f="x"===a(n),p=["left","top"].includes(c)?-1:1,d=s&&f?-1:1,y="function"==typeof t?t(e):t;let{mainAxis:m,crossAxis:h,alignmentAxis:g}="number"==typeof y?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...y};return u&&"number"==typeof g&&(h="end"===u?-1*g:g),f?{x:h*d,y:m*p}:{x:m*p,y:h*d}}(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};const S=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...u}=e,p={x:n,y:r},d=await f(t,u),m=a(l(o)),h="x"===m?"y":"x";let g=p[m],v=p[h];if(i){const e="y"===m?"bottom":"right";g=y(g+d["y"===m?"top":"left"],g,g-d[e])}if(s){const e="y"===h?"bottom":"right";v=y(v+d["y"===h?"top":"left"],v,v-d[e])}const w=c.fn({...t,[m]:g,[h]:v});return{...w,data:{x:w.x-n,y:w.y-r}}}}};function _(e){var t;return(null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function T(e){return _(e).getComputedStyle(e)}const k=Math.min,O=Math.max,E=Math.round;function A(e){const t=T(e);let n=parseFloat(t.width),r=parseFloat(t.height);const o=e.offsetWidth,i=e.offsetHeight,l=E(n)!==o||E(r)!==i;return l&&(n=o,r=i),{width:n,height:r,fallback:l}}function j(e){return D(e)?(e.nodeName||"").toLowerCase():""}let P;function L(){if(P)return P;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(P=e.brands.map((e=>e.brand+"/"+e.version)).join(" "),P):navigator.userAgent}function N(e){return e instanceof _(e).HTMLElement}function C(e){return e instanceof _(e).Element}function D(e){return e instanceof _(e).Node}function F(e){if("undefined"==typeof ShadowRoot)return!1;return e instanceof _(e).ShadowRoot||e instanceof ShadowRoot}function $(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=T(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function I(e){return["table","td","th"].includes(j(e))}function W(e){const t=/firefox/i.test(L()),n=T(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(L())}function H(e){return["html","body","#document"].includes(j(e))}function U(e){return C(e)?e:e.contextElement}const M={x:1,y:1};function V(e){const t=U(e);if(!N(t))return M;const n=t.getBoundingClientRect(),{width:r,height:o,fallback:i}=A(t);let l=(i?E(n.width):n.width)/r,a=(i?E(n.height):n.height)/o;return l&&Number.isFinite(l)||(l=1),a&&Number.isFinite(a)||(a=1),{x:l,y:a}}function z(e,t,n,r){var o,i;void 0===t&&(t=!1),void 0===n&&(n=!1);const l=e.getBoundingClientRect(),a=U(e);let s=M;t&&(r?C(r)&&(s=V(r)):s=V(e));const c=a?_(a):window,u=!B()&&n;let f=(l.left+(u&&(null==(o=c.visualViewport)?void 0:o.offsetLeft)||0))/s.x,p=(l.top+(u&&(null==(i=c.visualViewport)?void 0:i.offsetTop)||0))/s.y,d=l.width/s.x,y=l.height/s.y;if(a){const e=_(a),t=r&&C(r)?_(r):r;let n=e.frameElement;for(;n&&r&&t!==e;){const e=V(n),t=n.getBoundingClientRect(),r=getComputedStyle(n);t.x+=(n.clientLeft+parseFloat(r.paddingLeft))*e.x,t.y+=(n.clientTop+parseFloat(r.paddingTop))*e.y,f*=e.x,p*=e.y,d*=e.x,y*=e.y,f+=t.x,p+=t.y,n=_(n).frameElement}}return{width:d,height:y,top:p,right:f+d,bottom:p+y,left:f,x:f,y:p}}function q(e){return((D(e)?e.ownerDocument:e.document)||window.document).documentElement}function Y(e){return C(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function X(e){return z(q(e)).left+Y(e).scrollLeft}function K(e){if("html"===j(e))return e;const t=e.assignedSlot||e.parentNode||F(e)&&e.host||q(e);return F(t)?t.host:t}function J(e){const t=K(e);return H(t)?t.ownerDocument.body:N(t)&&$(t)?t:J(t)}function Z(e,t){var n;void 0===t&&(t=[]);const r=J(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=_(r);return o?t.concat(i,i.visualViewport||[],$(r)?r:[]):t.concat(r,Z(r))}function G(e,t,n){return"viewport"===t?u(function(e,t){const n=_(e),r=q(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)):C(t)?u(function(e,t){const n=z(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=N(e)?V(e):{x:1,y:1};return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n)):u(function(e){const t=q(e),n=Y(e),r=e.ownerDocument.body,o=O(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=O(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+X(e);const a=-n.scrollTop;return"rtl"===T(r).direction&&(l+=O(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:a}}(q(e)))}function Q(e){return N(e)&&"fixed"!==T(e).position?e.offsetParent:null}function ee(e){const t=_(e);let n=Q(e);for(;n&&I(n)&&"static"===T(n).position;)n=Q(n);return n&&("html"===j(n)||"body"===j(n)&&"static"===T(n).position&&!W(n))?t:n||function(e){let t=K(e);for(;N(t)&&!H(t);){if(W(t))return t;t=K(t)}return null}(e)||t}function te(e,t,n){const r=N(t),o=q(t),i=z(e,!0,"fixed"===n,t);let l={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if(r||!r&&"fixed"!==n)if(("body"!==j(t)||$(o))&&(l=Y(t)),N(t)){const e=z(t,!0);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&(a.x=X(o));return{x:i.left+l.scrollLeft-a.x,y:i.top+l.scrollTop-a.y,width:i.width,height:i.height}}const ne={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let r=Z(e).filter((e=>C(e)&&"body"!==j(e))),o=null;const i="fixed"===T(e).position;let l=i?K(e):e;for(;C(l)&&!H(l);){const e=T(l),t=W(l);(i?t||o:t||"static"!==e.position||!o||!["absolute","fixed"].includes(o.position))?o=e:r=r.filter((e=>e!==l)),l=K(l)}return t.set(e,r),r}(t,this._c):[].concat(n),l=[...i,r],a=l[0],s=l.reduce(((e,n)=>{const r=G(t,n,o);return e.top=O(r.top,e.top),e.right=k(r.right,e.right),e.bottom=k(r.bottom,e.bottom),e.left=O(r.left,e.left),e}),G(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=N(n),i=q(n);if(n===i)return t;let l={scrollLeft:0,scrollTop:0},a={x:1,y:1};const s={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==j(n)||$(i))&&(l=Y(n)),N(n))){const e=z(n);a=V(n),s.x=e.x+n.clientLeft,s.y=e.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-l.scrollLeft*a.x+s.x,y:t.y*a.y-l.scrollTop*a.y+s.y}},isElement:C,getDimensions:function(e){return N(e)?A(e):e.getBoundingClientRect()},getOffsetParent:ee,getDocumentElement:q,getScale:V,async getElementRects(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||ee,i=this.getDimensions;return{reference:te(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===T(e).direction},re=(e,t,n)=>{const r=new Map,o={platform:ne,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,a=i.filter(Boolean),c=await(null==l.isRTL?void 0:l.isRTL(t));if(null==l&&console.error(["Floating UI: `platform` property was not passed to config. If you","want to use Floating UI on the web, install @floating-ui/dom","instead of the /core package. Otherwise, you can create your own","`platform`: https://floating-ui.com/docs/platform"].join(" ")),a.filter((e=>{let{name:t}=e;return"autoPlacement"===t||"flip"===t})).length>1)throw new Error(["Floating UI: duplicate `flip` and/or `autoPlacement` middleware","detected. This will lead to an infinite loop. Ensure only one of","either has been passed to the `middleware` array."].join(" "));e&&t||console.error(["Floating UI: The reference and/or floating element was not defined","when `computePosition()` was called. Ensure that both elements have","been created and can be measured."].join(" "));let u=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:p}=s(u,r,c),d=r,y={},m=0;for(let n=0;n<a.length;n++){const{name:i,fn:h}=a[n],{x:g,y:v,data:w,reset:b}=await h({x:f,y:p,initialPlacement:r,placement:d,strategy:o,middlewareData:y,rects:u,platform:l,elements:{reference:e,floating:t}});f=null!=g?g:f,p=null!=v?v:p,y={...y,[i]:{...y[i],...w}},m>50&&console.warn(["Floating UI: The middleware lifecycle appears to be running in an","infinite loop. This is usually caused by a `reset` continually","being returned without a break condition."].join(" ")),b&&m<=50&&(m++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(u=!0===b.rects?await l.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:f,y:p}=s(u,d,c))),n=-1)}return{x:f,y:p,placement:d,strategy:o,middlewareData:y}})(e,t,{...o,platform:i})};var oe={exports:{}},ie={};
2
2
  /** @license React v16.14.0
3
3
  * react-jsx-runtime.development.js
4
4
  *
@@ -7,9 +7,9 @@
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
9
  */
10
- !function(e){!function(){var t=r.default,n=60103,o=60106;e.Fragment=60107;var i=60108,l=60114,a=60109,s=60110,c=60112,u=60113,f=60120,p=60115,d=60116,y=60121,m=60122,h=60117,g=60129,v=60131;if("function"==typeof Symbol&&Symbol.for){var w=Symbol.for;n=w("react.element"),o=w("react.portal"),e.Fragment=w("react.fragment"),i=w("react.strict_mode"),l=w("react.profiler"),a=w("react.provider"),s=w("react.context"),c=w("react.forward_ref"),u=w("react.suspense"),f=w("react.suspense_list"),p=w("react.memo"),d=w("react.lazy"),y=w("react.block"),m=w("react.server.block"),h=w("react.fundamental"),w("react.scope"),w("react.opaque.id"),g=w("react.debug_trace_mode"),w("react.offscreen"),v=w("react.legacy_hidden")}var b="function"==typeof Symbol&&Symbol.iterator;var x=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function R(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];S("error",e,n)}function S(e,t,n){var r=x.ReactDebugCurrentFrame,o="";if(O){var i=T(O.type),l=O._owner;o+=function(e,t,n){var r="";if(t){var o=t.fileName,i=o.replace(_,"");if(/^index\./.test(i)){var l=o.match(_);if(l){var a=l[1];if(a)i=a.replace(_,"")+"/"+i}}r=" (at "+i+":"+t.lineNumber+")"}else n&&(r=" (created by "+n+")");return"\n in "+(e||"Unknown")+r}(i,O._source,l&&T(l.type))}""!==(o+=r.getStackAddendum())&&(t+="%s",n=n.concat([o]));var a=n.map((function(e){return""+e}));a.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,a)}var _=/^(.*)[\\\/]/;function T(t){if(null==t)return null;if("number"==typeof t.tag&&R("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),"function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t;switch(t){case e.Fragment:return"Fragment";case o:return"Portal";case l:return"Profiler";case i:return"StrictMode";case u:return"Suspense";case f:return"SuspenseList"}if("object"==typeof t)switch(t.$$typeof){case s:return"Context.Consumer";case a:return"Context.Provider";case c:return m=t,h=t.render,g="ForwardRef",v=h.displayName||h.name||"",m.displayName||(""!==v?g+"("+v+")":g);case p:return T(t.type);case y:return T(t.render);case d:var n=1===(r=t)._status?r._result:null;if(n)return T(n)}var r,m,h,g,v;return null}var k={};x.ReactDebugCurrentFrame;var O=null;function E(e){O=e}var A,j,P,L=x.ReactCurrentOwner,N=Object.prototype.hasOwnProperty,C={key:!0,ref:!0,__self:!0,__source:!0};P={};function D(e,t,r,o,i){var l,a={},s=null,c=null;for(l in void 0!==r&&(s=""+r),function(e){if(N.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(t)&&(s=""+t.key),function(e){if(N.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}(t)&&(c=t.ref,function(e,t){if("string"==typeof e.ref&&L.current&&t&&L.current.stateNode!==t){var n=T(L.current.type);P[n]||(R('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',T(L.current.type),e.ref),P[n]=!0)}}(t,i)),t)N.call(t,l)&&!C.hasOwnProperty(l)&&(a[l]=t[l]);if(e&&e.defaultProps){var u=e.defaultProps;for(l in u)void 0===a[l]&&(a[l]=u[l])}if(s||c){var f="function"==typeof e?e.displayName||e.name||"Unknown":e;s&&function(e,t){var n=function(){A||(A=!0,R("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}(a,f),c&&function(e,t){var n=function(){j||(j=!0,R("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}(a,f)}return function(e,t,r,o,i,l,a){var s={$$typeof:n,type:e,key:t,ref:r,props:a,_owner:l,_store:{}};return Object.defineProperty(s._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(s,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(s,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(s.props),Object.freeze(s)),s}(e,s,c,i,o,L.current,a)}var F,$=x.ReactCurrentOwner;function I(e){O=e}function W(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}function H(){if($.current){var e=T($.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}x.ReactDebugCurrentFrame,F=!1;var B={};function U(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var t=H();if(!t){var n="string"==typeof e?e:e.displayName||e.name;n&&(t="\n\nCheck the top-level render call using <"+n+">.")}return t}(t);if(!B[n]){B[n]=!0;var r="";e&&e._owner&&e._owner!==$.current&&(r=" It was passed a child from "+T(e._owner.type)+"."),I(e),R('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,r),I(null)}}}function M(e,t){if("object"==typeof e)if(Array.isArray(e))for(var n=0;n<e.length;n++){var r=e[n];W(r)&&U(r,t)}else if(W(e))e._store&&(e._store.validated=!0);else if(e){var o=function(e){if(null===e||"object"!=typeof e)return null;var t=b&&e[b]||e["@@iterator"];return"function"==typeof t?t:null}(e);if("function"==typeof o&&o!==e.entries)for(var i,l=o.call(e);!(i=l.next()).done;)W(i.value)&&U(i.value,t)}}function V(e){var t,n=e.type;if(null!=n&&"string"!=typeof n){if("function"==typeof n)t=n.propTypes;else{if("object"!=typeof n||n.$$typeof!==c&&n.$$typeof!==p)return;t=n.propTypes}if(t){var r=T(n);!function(e,t,n,r,o){var i=Function.call.bind(Object.prototype.hasOwnProperty);for(var l in e)if(i(e,l)){var a=void 0;try{if("function"!=typeof e[l]){var s=Error((r||"React class")+": "+n+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw s.name="Invariant Violation",s}a=e[l](t,l,r,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){a=e}!a||a instanceof Error||(E(o),R("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",r||"React class",n,l,typeof a),E(null)),a instanceof Error&&!(a.message in k)&&(k[a.message]=!0,E(o),R("Failed %s type: %s",n,a.message),E(null))}}(t,e.props,"prop",r,e)}else if(void 0!==n.PropTypes&&!F){F=!0,R("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",T(n)||"Unknown")}"function"!=typeof n.getDefaultProps||n.getDefaultProps.isReactClassApproved||R("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function z(t,r,o,w,b,x){var S=function(t){return"string"==typeof t||"function"==typeof t||t===e.Fragment||t===l||t===g||t===i||t===u||t===f||t===v||"object"==typeof t&&null!==t&&(t.$$typeof===d||t.$$typeof===p||t.$$typeof===a||t.$$typeof===s||t.$$typeof===c||t.$$typeof===h||t.$$typeof===y||t[0]===m)}(t);if(!S){var _="";(void 0===t||"object"==typeof t&&null!==t&&0===Object.keys(t).length)&&(_+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var k,O=function(e){return void 0!==e?"\n\nCheck your code at "+e.fileName.replace(/^.*[\\\/]/,"")+":"+e.lineNumber+".":""}(b);_+=O||H(),null===t?k="null":Array.isArray(t)?k="array":void 0!==t&&t.$$typeof===n?(k="<"+(T(t.type)||"Unknown")+" />",_=" Did you accidentally export a JSX literal instead of a component?"):k=typeof t,R("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",k,_)}var E=D(t,r,o,b,x);if(null==E)return E;if(S){var A=r.children;if(void 0!==A)if(w)if(Array.isArray(A)){for(var j=0;j<A.length;j++)M(A[j],t);Object.freeze&&Object.freeze(A)}else R("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else M(A,t)}return t===e.Fragment?function(e){for(var t=Object.keys(e.props),n=0;n<t.length;n++){var r=t[n];if("children"!==r&&"key"!==r){I(e),R("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",r),I(null);break}}null!==e.ref&&(I(e),R("Invalid attribute `ref` supplied to `React.Fragment`."),I(null))}(E):V(E),E}var q=function(e,t,n){return z(e,t,n,!1)},Y=function(e,t,n){return z(e,t,n,!0)};e.jsx=q,e.jsxs=Y}()}(ie),function(e){e.exports=ie}(oe);var le={exports:{}};
10
+ !function(e){!function(){var t=r.default,n=60103,o=60106;e.Fragment=60107;var i=60108,l=60114,a=60109,s=60110,c=60112,u=60113,f=60120,p=60115,d=60116,y=60121,m=60122,h=60117,g=60129,v=60131;if("function"==typeof Symbol&&Symbol.for){var w=Symbol.for;n=w("react.element"),o=w("react.portal"),e.Fragment=w("react.fragment"),i=w("react.strict_mode"),l=w("react.profiler"),a=w("react.provider"),s=w("react.context"),c=w("react.forward_ref"),u=w("react.suspense"),f=w("react.suspense_list"),p=w("react.memo"),d=w("react.lazy"),y=w("react.block"),m=w("react.server.block"),h=w("react.fundamental"),w("react.scope"),w("react.opaque.id"),g=w("react.debug_trace_mode"),w("react.offscreen"),v=w("react.legacy_hidden")}var b="function"==typeof Symbol&&Symbol.iterator;var x=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function R(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];S("error",e,n)}function S(e,t,n){var r=x.ReactDebugCurrentFrame,o="";if(O){var i=T(O.type),l=O._owner;o+=function(e,t,n){var r="";if(t){var o=t.fileName,i=o.replace(_,"");if(/^index\./.test(i)){var l=o.match(_);if(l){var a=l[1];if(a)i=a.replace(_,"")+"/"+i}}r=" (at "+i+":"+t.lineNumber+")"}else n&&(r=" (created by "+n+")");return"\n in "+(e||"Unknown")+r}(i,O._source,l&&T(l.type))}""!==(o+=r.getStackAddendum())&&(t+="%s",n=n.concat([o]));var a=n.map((function(e){return""+e}));a.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,a)}var _=/^(.*)[\\\/]/;function T(t){if(null==t)return null;if("number"==typeof t.tag&&R("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),"function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t;switch(t){case e.Fragment:return"Fragment";case o:return"Portal";case l:return"Profiler";case i:return"StrictMode";case u:return"Suspense";case f:return"SuspenseList"}if("object"==typeof t)switch(t.$$typeof){case s:return"Context.Consumer";case a:return"Context.Provider";case c:return m=t,h=t.render,g="ForwardRef",v=h.displayName||h.name||"",m.displayName||(""!==v?g+"("+v+")":g);case p:return T(t.type);case y:return T(t.render);case d:var n=1===(r=t)._status?r._result:null;if(n)return T(n)}var r,m,h,g,v;return null}var k={};x.ReactDebugCurrentFrame;var O=null;function E(e){O=e}var A,j,P,L=x.ReactCurrentOwner,N=Object.prototype.hasOwnProperty,C={key:!0,ref:!0,__self:!0,__source:!0};P={};function D(e,t,r,o,i){var l,a={},s=null,c=null;for(l in void 0!==r&&(s=""+r),function(e){if(N.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(t)&&(s=""+t.key),function(e){if(N.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}(t)&&(c=t.ref,function(e,t){if("string"==typeof e.ref&&L.current&&t&&L.current.stateNode!==t){var n=T(L.current.type);P[n]||(R('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',T(L.current.type),e.ref),P[n]=!0)}}(t,i)),t)N.call(t,l)&&!C.hasOwnProperty(l)&&(a[l]=t[l]);if(e&&e.defaultProps){var u=e.defaultProps;for(l in u)void 0===a[l]&&(a[l]=u[l])}if(s||c){var f="function"==typeof e?e.displayName||e.name||"Unknown":e;s&&function(e,t){var n=function(){A||(A=!0,R("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}(a,f),c&&function(e,t){var n=function(){j||(j=!0,R("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}(a,f)}return function(e,t,r,o,i,l,a){var s={$$typeof:n,type:e,key:t,ref:r,props:a,_owner:l,_store:{}};return Object.defineProperty(s._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(s,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(s,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(s.props),Object.freeze(s)),s}(e,s,c,i,o,L.current,a)}var F,$=x.ReactCurrentOwner;function I(e){O=e}function W(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}function B(){if($.current){var e=T($.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}x.ReactDebugCurrentFrame,F=!1;var H={};function U(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var t=B();if(!t){var n="string"==typeof e?e:e.displayName||e.name;n&&(t="\n\nCheck the top-level render call using <"+n+">.")}return t}(t);if(!H[n]){H[n]=!0;var r="";e&&e._owner&&e._owner!==$.current&&(r=" It was passed a child from "+T(e._owner.type)+"."),I(e),R('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,r),I(null)}}}function M(e,t){if("object"==typeof e)if(Array.isArray(e))for(var n=0;n<e.length;n++){var r=e[n];W(r)&&U(r,t)}else if(W(e))e._store&&(e._store.validated=!0);else if(e){var o=function(e){if(null===e||"object"!=typeof e)return null;var t=b&&e[b]||e["@@iterator"];return"function"==typeof t?t:null}(e);if("function"==typeof o&&o!==e.entries)for(var i,l=o.call(e);!(i=l.next()).done;)W(i.value)&&U(i.value,t)}}function V(e){var t,n=e.type;if(null!=n&&"string"!=typeof n){if("function"==typeof n)t=n.propTypes;else{if("object"!=typeof n||n.$$typeof!==c&&n.$$typeof!==p)return;t=n.propTypes}if(t){var r=T(n);!function(e,t,n,r,o){var i=Function.call.bind(Object.prototype.hasOwnProperty);for(var l in e)if(i(e,l)){var a=void 0;try{if("function"!=typeof e[l]){var s=Error((r||"React class")+": "+n+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw s.name="Invariant Violation",s}a=e[l](t,l,r,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){a=e}!a||a instanceof Error||(E(o),R("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",r||"React class",n,l,typeof a),E(null)),a instanceof Error&&!(a.message in k)&&(k[a.message]=!0,E(o),R("Failed %s type: %s",n,a.message),E(null))}}(t,e.props,"prop",r,e)}else if(void 0!==n.PropTypes&&!F){F=!0,R("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",T(n)||"Unknown")}"function"!=typeof n.getDefaultProps||n.getDefaultProps.isReactClassApproved||R("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function z(t,r,o,w,b,x){var S=function(t){return"string"==typeof t||"function"==typeof t||t===e.Fragment||t===l||t===g||t===i||t===u||t===f||t===v||"object"==typeof t&&null!==t&&(t.$$typeof===d||t.$$typeof===p||t.$$typeof===a||t.$$typeof===s||t.$$typeof===c||t.$$typeof===h||t.$$typeof===y||t[0]===m)}(t);if(!S){var _="";(void 0===t||"object"==typeof t&&null!==t&&0===Object.keys(t).length)&&(_+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var k,O=function(e){return void 0!==e?"\n\nCheck your code at "+e.fileName.replace(/^.*[\\\/]/,"")+":"+e.lineNumber+".":""}(b);_+=O||B(),null===t?k="null":Array.isArray(t)?k="array":void 0!==t&&t.$$typeof===n?(k="<"+(T(t.type)||"Unknown")+" />",_=" Did you accidentally export a JSX literal instead of a component?"):k=typeof t,R("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",k,_)}var E=D(t,r,o,b,x);if(null==E)return E;if(S){var A=r.children;if(void 0!==A)if(w)if(Array.isArray(A)){for(var j=0;j<A.length;j++)M(A[j],t);Object.freeze&&Object.freeze(A)}else R("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else M(A,t)}return t===e.Fragment?function(e){for(var t=Object.keys(e.props),n=0;n<t.length;n++){var r=t[n];if("children"!==r&&"key"!==r){I(e),R("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",r),I(null);break}}null!==e.ref&&(I(e),R("Invalid attribute `ref` supplied to `React.Fragment`."),I(null))}(E):V(E),E}var q=function(e,t,n){return z(e,t,n,!1)},Y=function(e,t,n){return z(e,t,n,!0)};e.jsx=q,e.jsxs=Y}()}(ie),function(e){e.exports=ie}(oe);var le={exports:{}};
11
11
  /*!
12
12
  Copyright (c) 2018 Jed Watson.
13
13
  Licensed under the MIT License (MIT), see
14
14
  http://jedwatson.github.io/classnames
15
- */!function(e){!function(){var t={}.hasOwnProperty;function n(){for(var e=[],r=0;r<arguments.length;r++){var o=arguments[r];if(o){var i=typeof o;if("string"===i||"number"===i)e.push(o);else if(Array.isArray(o)){if(o.length){var l=n.apply(null,o);l&&e.push(l)}}else if("object"===i){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){e.push(o.toString());continue}for(var a in o)t.call(o,a)&&o[a]&&e.push(a)}}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n}()}(le);var ae=le.exports;const se=(e,t,n)=>{let r=null;return function(...o){r&&clearTimeout(r),r=setTimeout((()=>{r=null,n||e.apply(this,o)}),t)}},ce=({content:e})=>oe.exports.jsx("span",{dangerouslySetInnerHTML:{__html:e}}),ue="DEFAULT_TOOLTIP_ID",fe={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},pe={getTooltipData:()=>fe},de=t.createContext(pe);function ye(e=ue){return t.useContext(de).getTooltipData(e)}const me=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:n=null,place:r="top",offset:l=10,strategy:s="absolute",middlewares:u=[R(Number(l)),x(),S({padding:5})]})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{}};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{}};const f=u;return n?(f.push({name:"arrow",options:p={element:n,padding:5},async fn(e){const{element:t,padding:n=0}=p||{},{x:r,y:l,placement:s,rects:u,platform:f}=e;if(null==t)return console.warn("Floating UI: No `element` was passed to the `arrow` middleware."),{};const d=c(n),m={x:r,y:l},h=a(s),g=i(h),v=await f.getDimensions(t),w="y"===h?"top":"left",b="y"===h?"bottom":"right",x=u.reference[g]+u.reference[h]-m[h]-u.floating[g],R=m[h]-u.reference[h],S=await(null==f.getOffsetParent?void 0:f.getOffsetParent(t));let _=S?"y"===h?S.clientHeight||0:S.clientWidth||0:0;0===_&&(_=u.floating[g]);const T=x/2-R/2,k=d[w],O=_-v[g]-d[b],E=_/2-v[g]/2+T,A=y(k,E,O),j=null!=o(s)&&E!=A&&u.reference[g]/2-(E<k?d[w]:d[b])-v[g]/2<0;return{[h]:m[h]-(j?E<k?k-E:O-E:0),data:{[h]:A,centerOffset:E-A}}}}),re(e,t,{placement:r,strategy:s,middleware:f}).then((({x:e,y:t,placement:n,middlewareData:r})=>{var o,i;const l={left:`${e}px`,top:`${t}px`},{x:a,y:s}=null!==(o=r.arrow)&&void 0!==o?o:{x:0,y:0};return{tooltipStyles:l,tooltipArrowStyles:{left:null!=a?`${a}px`:"",top:null!=s?`${s}px`:"",right:"",bottom:"",[null!==(i={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==i?i:"bottom"]:"-4px"}}}))):re(e,t,{placement:"bottom",strategy:s,middleware:f}).then((({x:e,y:t})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{}})));var p};var he={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 ge=({id:e,className:n,classNameArrow:r,variant:o="dark",anchorId:i,place:l="top",offset:a=10,events:s=["hover"],positionStrategy:c="absolute",middlewares:u,wrapper:f,children:p=null,delayShow:d=0,delayHide:y=0,float:m=!1,noArrow:h=!1,clickable:g=!1,closeOnEsc:v=!1,style:w,position:b,afterShow:x,afterHide:R,content:S,html:_,isOpen:T,setIsOpen:k})=>{const O=t.useRef(null),E=t.useRef(null),A=t.useRef(null),j=t.useRef(null),[P,L]=t.useState({}),[N,C]=t.useState({}),[D,F]=t.useState(!1),$=t.useRef(!1),[I,W]=t.useState(!1),H=t.useRef(null),{anchorRefs:B,setActiveAnchor:U}=ye(e),[M,V]=t.useState({current:null}),z=t.useRef(!1),q=e=>{k?k(e):void 0===T&&F(e)};t.useEffect((()=>{D!==$.current&&($.current=D,D?null==x||x():null==R||R())}),[D]);const Y=(e=y)=>{j.current&&clearTimeout(j.current),j.current=setTimeout((()=>{z.current||q(!1)}),e)},X=e=>{var t;if(!e)return;d?(A.current&&clearTimeout(A.current),A.current=setTimeout((()=>{q(!0)}),d)):q(!0);const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;V((e=>e.current===n?e:{current:n})),U({current:n}),j.current&&clearTimeout(j.current)},K=()=>{g?Y(y||50):y?Y():q(!1),A.current&&clearTimeout(A.current)},J=({x:e,y:t})=>{const n={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};W(!0),me({place:l,offset:a,elementReference:n,tooltipReference:O.current,tooltipArrowReference:E.current,strategy:c,middlewares:u}).then((e=>{W(!1),Object.keys(e.tooltipStyles).length&&L(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&C(e.tooltipArrowStyles)}))},Z=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};J(n),H.current=n},G=e=>{X(e),y&&Y()},Q=e=>{var t;(null===(t=M.current)||void 0===t?void 0:t.contains(e.target))||q(!1)},ee=e=>{"Escape"===e.key&&q(!1)},te=se(X,50),ne=se(K,50);t.useEffect((()=>{var e,t;const n=new Set(B),r=document.querySelector(`[id='${i}']`);if(r&&(V((e=>e.current===r?e:{current:r})),n.add({current:r})),!n.size)return()=>null;v&&window.addEventListener("keydown",ee);const o=[];s.find((e=>"click"===e))&&(window.addEventListener("click",Q),o.push({event:"click",listener:G})),s.find((e=>"hover"===e))&&(o.push({event:"mouseenter",listener:te},{event:"mouseleave",listener:ne},{event:"focus",listener:te},{event:"blur",listener:ne}),m&&o.push({event:"mousemove",listener:Z}));const l=()=>{z.current=!0},a=()=>{z.current=!1,K()};g&&(null===(e=O.current)||void 0===e||e.addEventListener("mouseenter",l),null===(t=O.current)||void 0===t||t.addEventListener("mouseleave",a)),o.forEach((({event:e,listener:t})=>{n.forEach((n=>{var r;null===(r=n.current)||void 0===r||r.addEventListener(e,t)}))}));const c=null!=r?r:M.current,u=new MutationObserver((e=>{c&&e.some((e=>"childList"===e.type&&[...e.removedNodes].some((e=>!!e.contains(c)&&(q(!1),!0)))))}));return u.observe(document.body,{attributes:!1,childList:!0,subtree:!0}),()=>{var e,t;s.find((e=>"click"===e))&&window.removeEventListener("click",Q),v&&window.removeEventListener("keydown",ee),g&&(null===(e=O.current)||void 0===e||e.removeEventListener("mouseenter",l),null===(t=O.current)||void 0===t||t.removeEventListener("mouseleave",a)),o.forEach((({event:e,listener:t})=>{n.forEach((n=>{var r;null===(r=n.current)||void 0===r||r.removeEventListener(e,t)}))})),u.disconnect()}}),[B,M,v,i,s,y,d]),t.useEffect((()=>{if(b)return J(b),()=>null;if(m)return H.current&&J(H.current),()=>null;let e=M.current;i&&(e=document.querySelector(`[id='${i}']`)),W(!0);let t=!0;return me({place:l,offset:a,elementReference:e,tooltipReference:O.current,tooltipArrowReference:E.current,strategy:c,middlewares:u}).then((e=>{t&&(W(!1),Object.keys(e.tooltipStyles).length&&L(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&C(e.tooltipArrowStyles))})),()=>{t=!1}}),[D,T,i,M,S,_,l,a,c,b]),t.useEffect((()=>()=>{A.current&&clearTimeout(A.current),j.current&&clearTimeout(j.current)}),[]);const re=Boolean(_||S||p);return oe.exports.jsxs(f,{id:e,role:"tooltip",className:ae("react-tooltip",he.tooltip,he[o],n,{[he.show]:re&&!I&&(T||D),[he.fixed]:"fixed"===c,[he.clickable]:g}),style:{...w,...P},ref:O,children:[p||_&&oe.exports.jsx(ce,{content:_})||S,oe.exports.jsx(f,{className:ae("react-tooltip-arrow",he.arrow,r,{[he["no-arrow"]]:h}),style:N,ref:E})]})};e.Tooltip=({id:e,anchorId:n,content:r,html:o,className:i,classNameArrow:l,variant:a="dark",place:s="top",offset:c=10,wrapper:u="div",children:f=null,events:p=["hover"],positionStrategy:d="absolute",middlewares:y,delayShow:m=0,delayHide:h=0,float:g=!1,noArrow:v=!1,clickable:w=!1,closeOnEsc:b=!1,style:x,position:R,isOpen:S,setIsOpen:_,afterShow:T,afterHide:k})=>{const[O,E]=t.useState(r),[A,j]=t.useState(o),[P,L]=t.useState(s),[N,C]=t.useState(a),[D,F]=t.useState(c),[$,I]=t.useState(m),[W,H]=t.useState(h),[B,U]=t.useState(g),[M,V]=t.useState(u),[z,q]=t.useState(p),[Y,X]=t.useState(d),{anchorRefs:K,activeAnchor:J}=ye(e),Z=e=>null==e?void 0:e.getAttributeNames().reduce(((t,n)=>{var r;if(n.startsWith("data-tooltip-")){t[n.replace(/^data-tooltip-/,"")]=null!==(r=null==e?void 0:e.getAttribute(n))&&void 0!==r?r:null}return t}),{}),G=e=>{const t={place:e=>{var t;L(null!==(t=e)&&void 0!==t?t:s)},content:e=>{E(null!=e?e:r)},html:e=>{j(null!=e?e:o)},variant:e=>{var t;C(null!==(t=e)&&void 0!==t?t:a)},offset:e=>{F(null===e?c:Number(e))},wrapper:e=>{var t;V(null!==(t=e)&&void 0!==t?t:u)},events:e=>{const t=null==e?void 0:e.split(" ");q(null!=t?t:p)},"position-strategy":e=>{var t;X(null!==(t=e)&&void 0!==t?t:d)},"delay-show":e=>{I(null===e?m:Number(e))},"delay-hide":e=>{H(null===e?h:Number(e))},float:e=>{U(null===e?g:Boolean(e))}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,n])=>{var r;null===(r=t[e])||void 0===r||r.call(t,n)}))};t.useEffect((()=>{E(r)}),[r]),t.useEffect((()=>{j(o)}),[o]),t.useEffect((()=>{var e;const t=new Set(K),r=document.querySelector(`[id='${n}']`);if(r&&t.add({current:r}),!t.size)return()=>null;const o=null!==(e=J.current)&&void 0!==e?e:r,i=new MutationObserver((e=>{e.forEach((e=>{var t;if(!o||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=Z(o);G(n)}))})),l={attributes:!0,childList:!1,subtree:!1};if(o){const e=Z(o);G(e),i.observe(o,l)}return()=>{i.disconnect()}}),[K,J,n]);const Q={id:e,anchorId:n,className:i,classNameArrow:l,content:O,html:A,place:P,variant:N,offset:D,wrapper:M,events:z,positionStrategy:Y,middlewares:y,delayShow:$,delayHide:W,float:B,noArrow:v,clickable:w,closeOnEsc:b,style:x,position:R,isOpen:S,setIsOpen:_,afterShow:T,afterHide:k};return f?oe.exports.jsx(ge,{...Q,children:f}):oe.exports.jsx(ge,{...Q})},e.TooltipProvider=({children:e})=>{const[n,r]=t.useState({[ue]:new Set}),[o,i]=t.useState({[ue]:{current:null}}),l=(e,...t)=>{r((n=>{var r;const o=null!==(r=n[e])&&void 0!==r?r:new Set;return t.forEach((e=>o.add(e))),{...n,[e]:new Set(o)}}))},a=(e,...t)=>{r((n=>{const r=n[e];return r?(t.forEach((e=>r.delete(e))),{...n}):n}))},s=t.useCallback(((e=ue)=>{var t,r;return{anchorRefs:null!==(t=n[e])&&void 0!==t?t:new Set,activeAnchor:null!==(r=o[e])&&void 0!==r?r:{current:null},attach:(...t)=>l(e,...t),detach:(...t)=>a(e,...t),setActiveAnchor:t=>((e,t)=>{i((n=>{var r;return(null===(r=n[e])||void 0===r?void 0:r.current)===t.current?n:{...n,[e]:t}}))})(e,t)}}),[n,o,l,a]),c=t.useMemo((()=>({getTooltipData:s})),[s]);return oe.exports.jsx(de.Provider,{value:c,children:e})},e.TooltipWrapper=({tooltipId:e,children:n,className:r,place:o,content:i,html:l,variant:a,offset:s,wrapper:c,events:u,positionStrategy:f,delayShow:p,delayHide:d})=>{const{attach:y,detach:m}=ye(e),h=t.useRef(null);return t.useEffect((()=>(y(h),()=>{m(h)})),[]),oe.exports.jsx("span",{ref:h,className:ae("react-tooltip-wrapper",r),"data-tooltip-place":o,"data-tooltip-content":i,"data-tooltip-html":l,"data-tooltip-variant":a,"data-tooltip-offset":s,"data-tooltip-wrapper":c,"data-tooltip-events":u,"data-tooltip-position-strategy":f,"data-tooltip-delay-show":p,"data-tooltip-delay-hide":d,children:n})},e.autoPlacement=function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,i;const{rects:a,middlewareData:s,placement:c,platform:u,elements:p}=t,{alignment:d,allowedPlacements:y=m,autoAlignment:h=!0,...g}=e,w=void 0!==d||y===m?function(e,t,n){return(e?[...n.filter((t=>o(t)===e)),...n.filter((t=>o(t)!==e))]:n.filter((e=>l(e)===e))).filter((n=>!e||o(n)===e||!!t&&b(n)!==n))}(d||null,h,y):y,x=await f(t,g),R=(null==(n=s.autoPlacement)?void 0:n.index)||0,S=w[R];if(null==S)return{};const{main:_,cross:T}=v(S,a,await(null==u.isRTL?void 0:u.isRTL(p.floating)));if(c!==S)return{reset:{placement:w[0]}};const k=[x[l(S)],x[_],x[T]],O=[...(null==(r=s.autoPlacement)?void 0:r.overflows)||[],{placement:S,overflows:k}],E=w[R+1];if(E)return{data:{index:R+1,overflows:O},reset:{placement:E}};const A=O.slice().sort(((e,t)=>e.overflows[0]-t.overflows[0])),j=null==(i=A.find((e=>{let{overflows:t}=e;return t.every((e=>e<=0))})))?void 0:i.placement,P=j||A[0].placement;return P!==c?{data:{index:R+1,overflows:O},reset:{placement:P}}:{}}}},e.flip=x,e.inline=function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){const{placement:n,elements:r,rects:o,platform:i,strategy:s}=t,{padding:f=2,x:y,y:m}=e,h=u(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:o.reference,offsetParent:await(null==i.getOffsetParent?void 0:i.getOffsetParent(r.floating)),strategy:s}):o.reference),g=await(null==i.getClientRects?void 0:i.getClientRects(r.reference))||[],v=c(f);const w=await i.getElementRects({reference:{getBoundingClientRect:function(){if(2===g.length&&g[0].left>g[1].right&&null!=y&&null!=m)return g.find((e=>y>e.left-v.left&&y<e.right+v.right&&m>e.top-v.top&&m<e.bottom+v.bottom))||h;if(g.length>=2){if("x"===a(n)){const e=g[0],t=g[g.length-1],r="top"===l(n),o=e.top,i=t.bottom,a=r?e.left:t.left,s=r?e.right:t.right;return{top:o,bottom:i,left:a,right:s,width:s-a,height:i-o,x:a,y:o}}const e="left"===l(n),t=d(...g.map((e=>e.right))),r=p(...g.map((e=>e.left))),o=g.filter((n=>e?n.left===r:n.right===t)),i=o[0].top,s=o[o.length-1].bottom;return{top:i,bottom:s,left:r,right:t,width:t-r,height:s-i,x:r,y:i}}return h}},floating:r.floating,strategy:s});return o.reference.x!==w.reference.x||o.reference.y!==w.reference.y||o.reference.width!==w.reference.width||o.reference.height!==w.reference.height?{reset:{rects:w}}:{}}}},e.offset=R,e.shift=S,e.size=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:i,elements:a}=t,{apply:s=(()=>{}),...c}=e,u=await f(t,c),p=l(n),y=o(n);let m,h;"top"===p||"bottom"===p?(m=p,h=y===(await(null==i.isRTL?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(h=p,m="end"===y?"top":"bottom");const g=d(u.left,0),v=d(u.right,0),w=d(u.top,0),b=d(u.bottom,0),x={availableHeight:r.floating.height-(["left","right"].includes(n)?2*(0!==w||0!==b?w+b:d(u.top,u.bottom)):u[m]),availableWidth:r.floating.width-(["top","bottom"].includes(n)?2*(0!==g||0!==v?g+v:d(u.left,u.right)):u[h])};await s({...t,...x});const R=await i.getDimensions(a.floating);return r.floating.width!==R.width||r.floating.height!==R.height?{reset:{rects:!0}}:{}}}},Object.defineProperty(e,"__esModule",{value:!0})}));
15
+ */!function(e){!function(){var t={}.hasOwnProperty;function n(){for(var e=[],r=0;r<arguments.length;r++){var o=arguments[r];if(o){var i=typeof o;if("string"===i||"number"===i)e.push(o);else if(Array.isArray(o)){if(o.length){var l=n.apply(null,o);l&&e.push(l)}}else if("object"===i){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){e.push(o.toString());continue}for(var a in o)t.call(o,a)&&o[a]&&e.push(a)}}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n}()}(le);var ae=le.exports;const se=(e,t,n)=>{let r=null;return function(...o){r&&clearTimeout(r),r=setTimeout((()=>{r=null,n||e.apply(this,o)}),t)}},ce=({content:e})=>oe.exports.jsx("span",{dangerouslySetInnerHTML:{__html:e}}),ue="DEFAULT_TOOLTIP_ID",fe={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},pe={getTooltipData:()=>fe},de=t.createContext(pe);function ye(e=ue){return t.useContext(de).getTooltipData(e)}const me=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:n=null,place:r="top",offset:l=10,strategy:s="absolute",middlewares:u=[R(Number(l)),x(),S({padding:5})]})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{}};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{}};const f=u;return n?(f.push({name:"arrow",options:p={element:n,padding:5},async fn(e){const{element:t,padding:n=0}=p||{},{x:r,y:l,placement:s,rects:u,platform:f}=e;if(null==t)return console.warn("Floating UI: No `element` was passed to the `arrow` middleware."),{};const d=c(n),m={x:r,y:l},h=a(s),g=i(h),v=await f.getDimensions(t),w="y"===h?"top":"left",b="y"===h?"bottom":"right",x=u.reference[g]+u.reference[h]-m[h]-u.floating[g],R=m[h]-u.reference[h],S=await(null==f.getOffsetParent?void 0:f.getOffsetParent(t));let _=S?"y"===h?S.clientHeight||0:S.clientWidth||0:0;0===_&&(_=u.floating[g]);const T=x/2-R/2,k=d[w],O=_-v[g]-d[b],E=_/2-v[g]/2+T,A=y(k,E,O),j=null!=o(s)&&E!=A&&u.reference[g]/2-(E<k?d[w]:d[b])-v[g]/2<0;return{[h]:m[h]-(j?E<k?k-E:O-E:0),data:{[h]:A,centerOffset:E-A}}}}),re(e,t,{placement:r,strategy:s,middleware:f}).then((({x:e,y:t,placement:n,middlewareData:r})=>{var o,i;const l={left:`${e}px`,top:`${t}px`},{x:a,y:s}=null!==(o=r.arrow)&&void 0!==o?o:{x:0,y:0};return{tooltipStyles:l,tooltipArrowStyles:{left:null!=a?`${a}px`:"",top:null!=s?`${s}px`:"",right:"",bottom:"",[null!==(i={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==i?i:"bottom"]:"-4px"}}}))):re(e,t,{placement:"bottom",strategy:s,middleware:f}).then((({x:e,y:t})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{}})));var p};var he={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 ge=({id:e,className:n,classNameArrow:r,variant:o="dark",anchorId:i,place:l="top",offset:a=10,events:s=["hover"],positionStrategy:c="absolute",middlewares:u,wrapper:f,children:p=null,delayShow:d=0,delayHide:y=0,float:m=!1,noArrow:h=!1,clickable:g=!1,closeOnEsc:v=!1,style:w,position:b,afterShow:x,afterHide:R,content:S,html:_,isOpen:T,setIsOpen:k})=>{const O=t.useRef(null),E=t.useRef(null),A=t.useRef(null),j=t.useRef(null),[P,L]=t.useState({}),[N,C]=t.useState({}),[D,F]=t.useState(!1),[$,I]=t.useState(!1),W=t.useRef(!1),B=t.useRef(null),{anchorRefs:H,setActiveAnchor:U}=ye(e),[M,V]=t.useState({current:null}),z=t.useRef(!1);t.useEffect((()=>{D||I(!1)}),[D]);const q=e=>{I(!0),setTimeout((()=>{null==k||k(e),void 0===T&&F(e)}),10)};t.useEffect((()=>{if(void 0===T)return()=>null;T&&I(!0);const e=setTimeout((()=>{F(T)}),10);return()=>{clearTimeout(e)}}),[T]),t.useEffect((()=>{D!==W.current&&(W.current=D,D?null==x||x():null==R||R())}),[D]);const Y=(e=y)=>{j.current&&clearTimeout(j.current),j.current=setTimeout((()=>{z.current||q(!1)}),e)},X=e=>{var t;if(!e)return;d?(A.current&&clearTimeout(A.current),A.current=setTimeout((()=>{q(!0)}),d)):q(!0);const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;V((e=>e.current===n?e:{current:n})),U({current:n}),j.current&&clearTimeout(j.current)},K=()=>{g?Y(y||100):y?Y():q(!1),A.current&&clearTimeout(A.current)},J=({x:e,y:t})=>{me({place:l,offset:a,elementReference:{getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})},tooltipReference:O.current,tooltipArrowReference:E.current,strategy:c,middlewares:u}).then((e=>{Object.keys(e.tooltipStyles).length&&L(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&C(e.tooltipArrowStyles)}))},Z=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};J(n),B.current=n},G=e=>{X(e),y&&Y()},Q=e=>{var t;(null===(t=M.current)||void 0===t?void 0:t.contains(e.target))||q(!1)},ee=e=>{"Escape"===e.key&&q(!1)},te=se(X,50),ne=se(K,50);t.useEffect((()=>{var e,t;const n=new Set(H),r=document.querySelector(`[id='${i}']`);if(r&&(V((e=>e.current===r?e:{current:r})),n.add({current:r})),!n.size)return()=>null;v&&window.addEventListener("keydown",ee);const o=[];s.find((e=>"click"===e))&&(window.addEventListener("click",Q),o.push({event:"click",listener:G})),s.find((e=>"hover"===e))&&(o.push({event:"mouseenter",listener:te},{event:"mouseleave",listener:ne},{event:"focus",listener:te},{event:"blur",listener:ne}),m&&o.push({event:"mousemove",listener:Z}));const l=()=>{z.current=!0},a=()=>{z.current=!1,K()};g&&(null===(e=O.current)||void 0===e||e.addEventListener("mouseenter",l),null===(t=O.current)||void 0===t||t.addEventListener("mouseleave",a)),o.forEach((({event:e,listener:t})=>{n.forEach((n=>{var r;null===(r=n.current)||void 0===r||r.addEventListener(e,t)}))}));const c=null!=r?r:M.current,u=new MutationObserver((e=>{c&&e.some((e=>"childList"===e.type&&[...e.removedNodes].some((e=>!!e.contains(c)&&(q(!1),!0)))))}));return u.observe(document.body,{attributes:!1,childList:!0,subtree:!0}),()=>{var e,t;s.find((e=>"click"===e))&&window.removeEventListener("click",Q),v&&window.removeEventListener("keydown",ee),g&&(null===(e=O.current)||void 0===e||e.removeEventListener("mouseenter",l),null===(t=O.current)||void 0===t||t.removeEventListener("mouseleave",a)),o.forEach((({event:e,listener:t})=>{n.forEach((n=>{var r;null===(r=n.current)||void 0===r||r.removeEventListener(e,t)}))})),u.disconnect()}}),[$,H,M,v,i,s,y,d]),t.useEffect((()=>{if(b)return J(b),()=>null;if(m)return B.current&&J(B.current),()=>null;let e=M.current;i&&(e=document.querySelector(`[id='${i}']`));let t=!0;return me({place:l,offset:a,elementReference:e,tooltipReference:O.current,tooltipArrowReference:E.current,strategy:c,middlewares:u}).then((e=>{t&&(Object.keys(e.tooltipStyles).length&&L(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&C(e.tooltipArrowStyles))})),()=>{t=!1}}),[D,i,M,S,_,l,a,c,b]),t.useEffect((()=>()=>{A.current&&clearTimeout(A.current),j.current&&clearTimeout(j.current)}),[]);const re=Boolean(_||S||p),ie=Boolean(re&&D&&Object.keys(P).length>0);return $?oe.exports.jsxs(f,{id:e,role:"tooltip",className:ae("react-tooltip",he.tooltip,he[o],n,{[he.show]:ie,[he.fixed]:"fixed"===c,[he.clickable]:g}),style:{...w,...P},ref:O,children:[p||_&&oe.exports.jsx(ce,{content:_})||S,oe.exports.jsx(f,{className:ae("react-tooltip-arrow",he.arrow,r,{[he["no-arrow"]]:h}),style:N,ref:E})]}):null};e.Tooltip=({id:e,anchorId:n,content:r,html:o,className:i,classNameArrow:l,variant:a="dark",place:s="top",offset:c=10,wrapper:u="div",children:f=null,events:p=["hover"],positionStrategy:d="absolute",middlewares:y,delayShow:m=0,delayHide:h=0,float:g=!1,noArrow:v=!1,clickable:w=!1,closeOnEsc:b=!1,style:x,position:R,isOpen:S,setIsOpen:_,afterShow:T,afterHide:k})=>{const[O,E]=t.useState(r),[A,j]=t.useState(o),[P,L]=t.useState(s),[N,C]=t.useState(a),[D,F]=t.useState(c),[$,I]=t.useState(m),[W,B]=t.useState(h),[H,U]=t.useState(g),[M,V]=t.useState(u),[z,q]=t.useState(p),[Y,X]=t.useState(d),{anchorRefs:K,activeAnchor:J}=ye(e),Z=e=>null==e?void 0:e.getAttributeNames().reduce(((t,n)=>{var r;if(n.startsWith("data-tooltip-")){t[n.replace(/^data-tooltip-/,"")]=null!==(r=null==e?void 0:e.getAttribute(n))&&void 0!==r?r:null}return t}),{}),G=e=>{const t={place:e=>{var t;L(null!==(t=e)&&void 0!==t?t:s)},content:e=>{E(null!=e?e:r)},html:e=>{j(null!=e?e:o)},variant:e=>{var t;C(null!==(t=e)&&void 0!==t?t:a)},offset:e=>{F(null===e?c:Number(e))},wrapper:e=>{var t;V(null!==(t=e)&&void 0!==t?t:u)},events:e=>{const t=null==e?void 0:e.split(" ");q(null!=t?t:p)},"position-strategy":e=>{var t;X(null!==(t=e)&&void 0!==t?t:d)},"delay-show":e=>{I(null===e?m:Number(e))},"delay-hide":e=>{B(null===e?h:Number(e))},float:e=>{U(null===e?g:Boolean(e))}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,n])=>{var r;null===(r=t[e])||void 0===r||r.call(t,n)}))};t.useEffect((()=>{E(r)}),[r]),t.useEffect((()=>{j(o)}),[o]),t.useEffect((()=>{var e;const t=new Set(K),r=document.querySelector(`[id='${n}']`);if(r&&t.add({current:r}),!t.size)return()=>null;const o=null!==(e=J.current)&&void 0!==e?e:r,i=new MutationObserver((e=>{e.forEach((e=>{var t;if(!o||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=Z(o);G(n)}))})),l={attributes:!0,childList:!1,subtree:!1};if(o){const e=Z(o);G(e),i.observe(o,l)}return()=>{i.disconnect()}}),[K,J,n]);const Q={id:e,anchorId:n,className:i,classNameArrow:l,content:O,html:A,place:P,variant:N,offset:D,wrapper:M,events:z,positionStrategy:Y,middlewares:y,delayShow:$,delayHide:W,float:H,noArrow:v,clickable:w,closeOnEsc:b,style:x,position:R,isOpen:S,setIsOpen:_,afterShow:T,afterHide:k};return f?oe.exports.jsx(ge,{...Q,children:f}):oe.exports.jsx(ge,{...Q})},e.TooltipProvider=({children:e})=>{const[n,r]=t.useState({[ue]:new Set}),[o,i]=t.useState({[ue]:{current:null}}),l=(e,...t)=>{r((n=>{var r;const o=null!==(r=n[e])&&void 0!==r?r:new Set;return t.forEach((e=>o.add(e))),{...n,[e]:new Set(o)}}))},a=(e,...t)=>{r((n=>{const r=n[e];return r?(t.forEach((e=>r.delete(e))),{...n}):n}))},s=t.useCallback(((e=ue)=>{var t,r;return{anchorRefs:null!==(t=n[e])&&void 0!==t?t:new Set,activeAnchor:null!==(r=o[e])&&void 0!==r?r:{current:null},attach:(...t)=>l(e,...t),detach:(...t)=>a(e,...t),setActiveAnchor:t=>((e,t)=>{i((n=>{var r;return(null===(r=n[e])||void 0===r?void 0:r.current)===t.current?n:{...n,[e]:t}}))})(e,t)}}),[n,o,l,a]),c=t.useMemo((()=>({getTooltipData:s})),[s]);return oe.exports.jsx(de.Provider,{value:c,children:e})},e.TooltipWrapper=({tooltipId:e,children:n,className:r,place:o,content:i,html:l,variant:a,offset:s,wrapper:c,events:u,positionStrategy:f,delayShow:p,delayHide:d})=>{const{attach:y,detach:m}=ye(e),h=t.useRef(null);return t.useEffect((()=>(y(h),()=>{m(h)})),[]),oe.exports.jsx("span",{ref:h,className:ae("react-tooltip-wrapper",r),"data-tooltip-place":o,"data-tooltip-content":i,"data-tooltip-html":l,"data-tooltip-variant":a,"data-tooltip-offset":s,"data-tooltip-wrapper":c,"data-tooltip-events":u,"data-tooltip-position-strategy":f,"data-tooltip-delay-show":p,"data-tooltip-delay-hide":d,children:n})},e.autoPlacement=function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,i;const{rects:a,middlewareData:s,placement:c,platform:u,elements:p}=t,{alignment:d,allowedPlacements:y=m,autoAlignment:h=!0,...g}=e,w=void 0!==d||y===m?function(e,t,n){return(e?[...n.filter((t=>o(t)===e)),...n.filter((t=>o(t)!==e))]:n.filter((e=>l(e)===e))).filter((n=>!e||o(n)===e||!!t&&b(n)!==n))}(d||null,h,y):y,x=await f(t,g),R=(null==(n=s.autoPlacement)?void 0:n.index)||0,S=w[R];if(null==S)return{};const{main:_,cross:T}=v(S,a,await(null==u.isRTL?void 0:u.isRTL(p.floating)));if(c!==S)return{reset:{placement:w[0]}};const k=[x[l(S)],x[_],x[T]],O=[...(null==(r=s.autoPlacement)?void 0:r.overflows)||[],{placement:S,overflows:k}],E=w[R+1];if(E)return{data:{index:R+1,overflows:O},reset:{placement:E}};const A=O.slice().sort(((e,t)=>e.overflows[0]-t.overflows[0])),j=null==(i=A.find((e=>{let{overflows:t}=e;return t.every((e=>e<=0))})))?void 0:i.placement,P=j||A[0].placement;return P!==c?{data:{index:R+1,overflows:O},reset:{placement:P}}:{}}}},e.flip=x,e.inline=function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){const{placement:n,elements:r,rects:o,platform:i,strategy:s}=t,{padding:f=2,x:y,y:m}=e,h=u(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:o.reference,offsetParent:await(null==i.getOffsetParent?void 0:i.getOffsetParent(r.floating)),strategy:s}):o.reference),g=await(null==i.getClientRects?void 0:i.getClientRects(r.reference))||[],v=c(f);const w=await i.getElementRects({reference:{getBoundingClientRect:function(){if(2===g.length&&g[0].left>g[1].right&&null!=y&&null!=m)return g.find((e=>y>e.left-v.left&&y<e.right+v.right&&m>e.top-v.top&&m<e.bottom+v.bottom))||h;if(g.length>=2){if("x"===a(n)){const e=g[0],t=g[g.length-1],r="top"===l(n),o=e.top,i=t.bottom,a=r?e.left:t.left,s=r?e.right:t.right;return{top:o,bottom:i,left:a,right:s,width:s-a,height:i-o,x:a,y:o}}const e="left"===l(n),t=d(...g.map((e=>e.right))),r=p(...g.map((e=>e.left))),o=g.filter((n=>e?n.left===r:n.right===t)),i=o[0].top,s=o[o.length-1].bottom;return{top:i,bottom:s,left:r,right:t,width:t-r,height:s-i,x:r,y:i}}return h}},floating:r.floating,strategy:s});return o.reference.x!==w.reference.x||o.reference.y!==w.reference.y||o.reference.width!==w.reference.width||o.reference.height!==w.reference.height?{reset:{rects:w}}:{}}}},e.offset=R,e.shift=S,e.size=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:i,elements:a}=t,{apply:s=(()=>{}),...c}=e,u=await f(t,c),p=l(n),y=o(n);let m,h;"top"===p||"bottom"===p?(m=p,h=y===(await(null==i.isRTL?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(h=p,m="end"===y?"top":"bottom");const g=d(u.left,0),v=d(u.right,0),w=d(u.top,0),b=d(u.bottom,0),x={availableHeight:r.floating.height-(["left","right"].includes(n)?2*(0!==w||0!==b?w+b:d(u.top,u.bottom)):u[m]),availableWidth:r.floating.width-(["top","bottom"].includes(n)?2*(0!==g||0!==v?g+v:d(u.left,u.right)):u[h])};await s({...t,...x});const R=await i.getDimensions(a.floating);return r.floating.width!==R.width||r.floating.height!==R.height?{reset:{rects:!0}}:{}}}},Object.defineProperty(e,"__esModule",{value:!0})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-tooltip",
3
- "version": "5.7.4-beta.0",
3
+ "version": "5.7.5",
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",
@@ -117,7 +117,7 @@
117
117
  ]
118
118
  },
119
119
  "dependencies": {
120
- "@floating-ui/dom": "^1.0.4",
120
+ "@floating-ui/dom": "1.1.1",
121
121
  "classnames": "^2.3.2"
122
122
  }
123
123
  }