"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";
var _chunkIW3D5V6Lcjs = require('./chunk-IW3D5V6L.cjs');var _chunkQKFOJTGFcjs = require('./chunk-QKFOJTGF.cjs');var _chunk5KRCPBZRcjs = require('./chunk-5KRCPBZR.cjs');var _chunk3CNSKST2cjs = require('./chunk-3CNSKST2.cjs');var _react = require('react');var _clsx = require('clsx'); var _clsx2 = _interopRequireDefault(_clsx);var q=_chunk3CNSKST2cjs.a.call(void 0, "EulTooltip",["anchorEl","open","content","panel","placementBottom","placementBottomEnd","placementBottomStart","placementLeft","placementLeftEnd","placementLeftStart","placementRight","placementRightEnd","placementRightStart","placementTop","placementTopEnd","placementTopStart","popper","root","tip"]),C=t=>_chunk5KRCPBZRcjs.e.call(void 0, "EulTooltip",{anchorEl:["anchorEl"],content:["content"],popper:["popper",t.placement&&`placement${_chunk3CNSKST2cjs.d.call(void 0, _chunk3CNSKST2cjs.c.call(void 0, t.placement))}`,_optionalChain([t, 'access', _2 => _2.placement, 'optionalAccess', _3 => _3.indexOf, 'call', _4 => _4("bottom")])!==-1&&"placementBottom",_optionalChain([t, 'access', _5 => _5.placement, 'optionalAccess', _6 => _6.indexOf, 'call', _7 => _7("top")])!==-1&&"placementTop",_optionalChain([t, 'access', _8 => _8.placement, 'optionalAccess', _9 => _9.indexOf, 'call', _10 => _10("left")])!==-1&&"placementLeft",_optionalChain([t, 'access', _11 => _11.placement, 'optionalAccess', _12 => _12.indexOf, 'call', _13 => _13("right")])!==-1&&"placementRight",t.isPanel&&"panel"],root:["root",t.open&&"open"],tip:["tip"]}),p= exports.a =q;var _jsxruntime = require('react/jsx-runtime');var G=_react.forwardRef.call(void 0, ({className:t},s)=>{let o=_chunk3CNSKST2cjs.n.call(void 0, );return _jsxruntime.jsxs.call(void 0, "svg",{className:t,fill:"none",height:"10",ref:s,viewBox:"0 0 34 10",width:"34",xmlns:"http://www.w3.org/2000/svg",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M0 0H34H26.8873C26.0072 0 25.1715 0.386467 24.6015 1.05705L19.2858 7.3108C18.0878 8.72021 15.9122 8.72021 14.7142 7.3108L9.3985 1.05706C8.8285 0.386469 7.99278 0 7.11268 0H0Z",fill:o.palette.background[500]}),_jsxruntime.jsx.call(void 0, "path",{d:"M7.11268 1H6V0H7.11268C7.96751 0 8.78047 0.364595 9.34875 1C9.36555 1.01878 9.38213 1.0378 9.3985 1.05706L14.7142 7.3108C15.9122 8.72021 18.0878 8.72021 19.2858 7.3108L24.6015 1.05705C24.6179 1.0378 24.6345 1.01878 24.6513 1C25.2195 0.364594 26.0325 0 26.8873 0H28V1H26.8873C26.3006 1 25.7434 1.25765 25.3634 1.7047L20.0478 7.95845C18.4504 9.83766 15.5496 9.83766 13.9522 7.95845L8.63656 1.7047C8.25656 1.25765 7.69942 1 7.11268 1Z",fill:o.palette.background[600]})]})});G.displayName="Tip";var v=G;var _react3 = require('@emotion/react');var I=_chunk3CNSKST2cjs.m.call(void 0, "div")`
  .${p.anchorEl} {
    cursor: pointer;
  }
`,z=_chunk3CNSKST2cjs.m.call(void 0, "div")(({theme:t})=>_react3.css`
    position: relative;
    display: flex;
    gap: ${t.spacing(4)};
    padding: ${t.spacing(2)} ${t.spacing(3)};
    color: ${t.palette.background[900]};
    font-size: ${t.typography.pxToRem(12)};
    line-height: ${t.typography.pxToRem(16)};
    background: ${t.palette.background[500]};
    border: 1px solid ${t.palette.background[600]};
    border-radius: ${t.spacing(1.5)};

    > svg {
      position: absolute;

      .${p.popper}[data-popper-placement*="top"]  & {
        top: 100%;
      }

      .${p.popper}[data-popper-placement*="bottom"] & {
        bottom: 100%;
        transform: rotate(180deg);
      }

      .${p.popper}[data-popper-placement*="left"] & {
        left: calc(100% - 12px);
        transform: rotate(-90deg);
      }

      .${p.popper}[data-popper-placement*="right"] & {
        right: calc(100% - 12px);
        transform: rotate(90deg);
      }
    }

    .${p.popper}[data-popper-placement*="top"] & {
      margin-bottom: ${t.spacing(3)};
    }

    .${p.popper}[data-popper-placement*="bottom"] & {
      margin-top: ${t.spacing(3)};
    }

    .${p.popper}[data-popper-placement*="left"] & {
      margin-right: ${t.spacing(3)};
    }

    .${p.popper}[data-popper-placement*="right"] & {
      margin-left: ${t.spacing(3)};
    }

    .${p.popper}.${p.panel} & {
      padding: ${t.spacing(3)};
      margin: ${t.spacing(1)} 0 0;
      background: ${t.palette.background[300]};
      border: 1px solid ${t.palette.background[500]};
      border-radius: ${t.spacing(2)};
    }
  `),W=_chunk3CNSKST2cjs.m.call(void 0, (0, _chunkIW3D5V6Lcjs.c))(({theme:t})=>({zIndex:t.zIndex.tooltip}));var _=t=>{let{anchorEl:s,children:o,className:S,content:i,id:T,isPanel:c=!1,open:m=!1,placement:l="bottom"}=t,d=_chunk3CNSKST2cjs.n.call(void 0, ),n=C(t),g=r=>{setTimeout(()=>{if(s&&_optionalChain([r, 'optionalAccess', _14 => _14.parentElement, 'optionalAccess', _15 => _15.parentElement])){let f=s.getBoundingClientRect(),e=r.parentElement.parentElement.getBoundingClientRect(),h=r.getBoundingClientRect(),a;r.style.opacity="0",l.includes("bottom")||l.includes("top")?(a=f.left+f.width/2-(e.left+h.width/2),a=Math.max(8,a),a=Math.min(e.width-h.width-8,a),r.style.left=`${a}px`):(a=f.top+f.height/2-(e.top+h.height/2),a=Math.min(e.height-h.height/2-5,Math.max(a,h.height/2+5)),r.style.top=`${a}px`),r.style.opacity="1"}},100)},u=_react.cloneElement.call(void 0, o,{...o.props,className:_clsx2.default.call(void 0, o.props.className,n.anchorEl)}),y=i&&_react.isValidElement.call(void 0, i)?_react.cloneElement.call(void 0, i,{...i.props,className:_clsx2.default.call(void 0, i.props.className,n.content)}):i;return _jsxruntime.jsxs.call(void 0, I,{className:_clsx2.default.call(void 0, n.root,S),children:[u,_jsxruntime.jsx.call(void 0, W,{anchorEl:s,className:_clsx2.default.call(void 0, n.popper),open:m,placement:l,transition:!0,children:({TransitionProps:r})=>_jsxruntime.jsx.call(void 0, _chunkQKFOJTGFcjs.a,{timeout:d.transitions.duration.shorter,...r,children:_jsxruntime.jsxs.call(void 0, z,{className:_clsx2.default.call(void 0, n.content),id:T,children:[y,!c&&_jsxruntime.jsx.call(void 0, v,{className:_clsx2.default.call(void 0, n.tip),ref:g})]})})})]})},$= exports.b =_;function k({onClose:t,onOpen:s,touchDelay:o,touchEndDelay:S}){let[i,T]=_react.useState.call(void 0, !1),c=_react.useRef.call(void 0, "initial"),m=_react.useRef.call(void 0, !1),l=_react.useRef.call(void 0, ),d=_react.useRef.call(void 0, ),n=_react.useCallback.call(void 0, ()=>{c.current!=="initial"&&(document.body.style.webkitUserSelect=c.current,c.current="initial"),clearTimeout(d.current)},[]);_react.useEffect.call(void 0, ()=>()=>{clearTimeout(l.current),n()},[n]);let g=e=>{T(!0),_optionalChain([s, 'optionalCall', _16 => _16(e)])},u=e=>{T(!1),m.current=!1,_optionalChain([t, 'optionalCall', _17 => _17(e)])},y=e=>{m.current&&e.type!=="touchstart"||(clearTimeout(l.current),g(e))};return{handleClose:u,handleEnter:y,handleTouchEnd:e=>{n(),clearTimeout(l.current),l.current=setTimeout(()=>{u(e)},S)},handleTouchStart:e=>{m.current=!0,clearTimeout(l.current),n(),c.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",d.current=setTimeout(()=>{document.body.style.webkitUserSelect=c.current,y(e)},o)},open:i}}var w=_react.forwardRef.call(void 0, (t,s)=>{let{children:o,content:S,id:i,isPanel:T,open:c,placement:m}=t,l=_chunk5KRCPBZRcjs.j.call(void 0, ),[d,n]=_react.useState.call(void 0, null),{handleClose:g,handleEnter:u,handleTouchEnd:y,handleTouchStart:r,open:f}=k(t),e=_chunk5KRCPBZRcjs.i.call(void 0, o.props.ref,n,s),h=C(t),a=o&&_react.cloneElement.call(void 0, o,{...o.props,className:_clsx2.default.call(void 0, o.props.className,h.anchorEl),key:"tooltip-child",onBlur:g,onFocus:A=>{l==="keyboard"&&u(A)},onMouseEnter:u,onMouseLeave:g,onTouchEnd:y,onTouchStart:r,ref:e});return _jsxruntime.jsx.call(void 0, $,{anchorEl:d,content:S,id:i,isPanel:T,open:c||f&&Boolean(d),placement:m,children:a})});w.displayName="Tooltip";w.defaultProps={placement:"bottom",touchDelay:700,touchEndDelay:1500};var at=w;exports.a = p; exports.b = $; exports.c = at;
