-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
83910-1f612910cdbbc53.js.download
1 lines (1 loc) · 8.87 KB
/
83910-1f612910cdbbc53.js.download
1
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[83910],{9476:function(e,n,t){"use strict";t.d(n,{k:function(){return o}});var r={},o=function(e){return"[object Array]"===r.toString.apply(e)}},83910:function(e,n,t){"use strict";t.d(n,{Z:function(){return O}});var r=t(62230),o=t(85244),i=t(98240),a=t(22386),u=t(52322),c=t(84061),s=t(92416),l=t(75580),d=t(98172),f=t(2784),p=t(41131),v=t(72779),h=t.n(v),m=t(19850),g=t(47372);function w(e){return(0,g.Re)(e.target)&&"BUTTON"===e.target.tagName}function y(e){return(0,m.j7)(e)}function x(e){return"data-floating-ui-".concat(e)}var b=t(76409),k=t(81541),_=t(9476),E=t(74640),R=t.n(E),M=t(22710),P=t(5163),N=function(e){return{name:"PopoverCustomInitMiddleware",options:e,fn:function(n){return(0,M.Z)((function(){return(0,P.__generator)(this,(function(n){return e&&e.fn&&e.fn(),[2,{}]}))}))()}}},C=t(39439),F=function(e,n){var t=e.content,v=e.arrow,E=void 0===v||v,M=e.open,P=e.root,F=void 0!==P&&P,O=e.defaultOpen,D=void 0!==O&&O,W=e.shift,Z=void 0!==W&&W,j=e.onChange,S=(e.interactive,e.popperProps,e.followCursor,e.positionStrategy),T=void 0===S?"absolute":S,L=e.openDelay,A=void 0===L?0:L,B=(e.leaveDelay,e.triggerType),H=void 0===B?"hover":B,I=e.needFocusManager,K=void 0!==I&&I,Y=e.autoWidth,z=void 0!==Y&&Y,U=e.allowedPlacements,V=void 0===U?["top","bottom","top-start","bottom-start","top-end","bottom-end"]:U,q=e.contentClassName,X=e.children,J=e.arrowWidth,Q=void 0===J?16:J,$=e.arrowHeight,G=void 0===$?8:$,ee=e.arrowTipRadius,ne=void 0===ee?4:ee,te=e.bestFit,re=void 0===te||te,oe=e.zIndex,ie=e.initialFocus,ae=void 0===ie?0:ie,ue=e.canKeyboardClickWay,ce=void 0===ue||ue,se=e.focusMode,le=void 0!==se&&se,de=e.focusTriggerSupportLevel,fe=void 0===de?C.p.ALL:de,pe=e.mobileFullscreen,ve=void 0!==pe&&pe,he=((0,i.Z)(e,["content","arrow","open","root","defaultOpen","shift","onChange","interactive","popperProps","followCursor","positionStrategy","openDelay","leaveDelay","triggerType","needFocusManager","autoWidth","allowedPlacements","contentClassName","children","arrowWidth","arrowHeight","arrowTipRadius","bestFit","zIndex","initialFocus","canKeyboardClickWay","focusMode","focusTriggerSupportLevel","mobileFullscreen"]),(0,a.Z)(f.useState(!!D),2)),me=he[0],ge=he[1],we=null!=M?M:me,ye=(0,f.useRef)(null),xe=le?"fixed":T,be=(0,f.useRef)({});(0,f.useImperativeHandle)(n,(function(){return{open:function(){null!=M?j&&j(!0):ge(!0)},close:function(){null!=M?j&&j(!1):ge(!1)}}}));var ke=(0,f.useMemo)((function(){return function(e){var n=[R().base];return h()(n)}()}),[E]),_e=(0,f.useMemo)((function(){return function(e){var n=e.hasArrow,t=e.extraClassName,r=void 0===t?"":t,o=[R()["content-wrapper"]];if(n&&o.push(R()["with-arrow"]),r)if("string"==typeof r)o.push(r);else if((0,_.k)(r)){var i;(i=o).push.apply(i,(0,k.Z)(r))}return h()(o)}({hasArrow:E,extraClassName:q})}),[E,q]),Ee=E?2*G:6,Re={open:we,onOpenChange:function(e,n){ge(e),j&&j(e)},middleware:(0,f.useMemo)((function(){var e=[(0,c.cv)(Ee),N({fn:function(){be.current={}}})];Z&&e.push((0,c.uY)());var n={};return n.allowedPlacements=V,e.push((0,c.X5)(n)),E&&e.push((0,s.x7)({element:ye,padding:6})),e.push((0,c.RR)()),e.push((0,c.dp)({padding:16,apply:function(e){var n=e.rects,t=e.availableWidth,r=e.availableHeight;re&&(be.current.maxWidth=t,be.current.maxHeight=r),z&&(be.current.width=n.reference.width)}})),e}),[E,Z,z,re]),whileElementsMounted:l.Me,strategy:xe},Me=(0,d.YF)(Re),Pe=Me.refs,Ne=Me.context,Ce=(0,d.hU)(Ne,{duration:250}),Fe=Ce.isMounted,Oe=Ce.status,De=(0,d.XI)(Ne,{enabled:"hover"===H,move:!1,handleClose:(0,d.xp)({requireIntent:!1}),delay:{open:A,close:0}}),We=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=e.open,r=e.onOpenChange,o=e.dataRef,i=e.elements.domReference,a=n.enabled,u=void 0===a||a,c=n.event,s=void 0===c?"click":c,l=n.toggle,d=void 0===l||l,p=n.ignoreMouse,v=void 0!==p&&p,h=n.keyboardHandlers,g=void 0===h||h,x=f.useRef(),b=f.useRef(!1);return f.useMemo((function(){return u?{reference:{onPointerDown:function(e){x.current=e.pointerType},onMouseDown:function(e){0===e.button&&((0,m.r)(x.current,!0)&&v||"click"!==s&&(!t||!d||o.current.openEvent&&"mousedown"!==o.current.openEvent.type?(e.preventDefault(),r(!0,e.nativeEvent)):r(!1,e.nativeEvent)))},onClick:function(e){"mousedown"===s&&x.current?x.current=void 0:(0,m.r)(x.current,!0)&&v||(!t||!d||o.current.openEvent&&"click"!==o.current.openEvent.type?r(!0,e.nativeEvent):r(!1,e.nativeEvent))},onKeyDown:function(e){x.current=void 0,e.defaultPrevented||!g||w(e)||(" "!==e.key||y(i)||(e.preventDefault(),b.current=!0),"Enter"===e.key&&r(!t||!d,e.nativeEvent))},onKeyUp:function(e){e.defaultPrevented||!g||w(e)||y(i)||" "===e.key&&b.current&&(b.current=!1,r(!t||!d,e.nativeEvent))}}}:{}}),[u,o,s,v,g,i,d,t,r])}(Ne,{event:"click",toggle:!1,ignoreMouse:"hover"===H,keyboardHandlers:ce}),Ze=(0,f.useMemo)((function(){return K?d.wD:f.Fragment}),[K]),je=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=e.open,r=e.onOpenChange,o=e.dataRef,i=e.events,a=e.refs,u=e.elements,c=u.floating,s=u.domReference,l=n.enabled,d=void 0===l||l,p=n.keyboardOnly,v=void 0===p||p,h=(0,f.useRef)(""),w=(0,f.useRef)(!1),y=(0,f.useRef)();return(0,f.useEffect)((function(){var e=function(){!t&&(0,g.Re)(s)&&s===(0,m.AW)((0,m.Me)(s))&&(w.current=!0)};if(d){var n=(0,m.Me)(c).defaultView||window;return n.addEventListener("blur",e),function(){n.removeEventListener("blur",e)}}}),[c,s,t,d]),(0,f.useEffect)((function(){var e=function(e){"referencePress"!==e.type&&"escapeKey"!==e.type||(w.current=!0)};if(d)return i.on("dismiss",e),function(){i.off("dismiss",e)}}),[i,d]),(0,f.useEffect)((function(){return function(){clearTimeout(y.current)}}),[]),(0,f.useMemo)((function(){return d?{reference:{onPointerDown:function(e){var n=e.pointerType;h.current=n,w.current=!(!n||!v)},onMouseLeave:function(){w.current=!1},onFocus:function(e){var n;w.current||"focus"===e.type&&"mousedown"===(null===(n=o.current.openEvent)||void 0===n?void 0:n.type)&&(0,m.Pe)(o.current.openEvent,s)||r(!0,e.nativeEvent)},onBlur:function(e){w.current=!1;var n=e.relatedTarget,t=(0,g.kK)(n)&&n.hasAttribute(x("focus-guard"))&&"outside"===n.getAttribute("data-type");y.current=setTimeout((function(){(0,m.r3)(a.floating.current,n)||(0,m.r3)(s,n)||t||r(!1,e.nativeEvent)}))}}}:{}}),[d,v,s,a,o,r])}(Ne,{keyboardOnly:fe===C.p.KEYBOARD_ONLY}),Se=[De,je,(0,d.bQ)(Ne,{}),(0,d.qs)(Ne,{role:"tooltip"})];"click"===H&&Se.push(We);var Te,Le=(0,d.NI)(Se),Ae=Le.getReferenceProps,Be=Le.getFloatingProps,He=(0,r.Z)({className:ke,ref:Pe.setReference},Ae()),Ie=f.Fragment;if("fixed"==xe&&(Ie=d.ll),t){var Ke,Ye=f.Children.only(X);if(F&&Ye){var ze,Ue=[];He.className&&Ue.push(He.className),(null===(ze=Ye.props)||void 0===ze?void 0:ze.className)&&Ue.push(Ye.props.className),Ke=(0,f.cloneElement)(Ye,(0,o.Z)((0,r.Z)({},Ye.props,He),{className:h()(Ue)}))}else Ke=(0,u.jsx)("div",(0,o.Z)((0,r.Z)({},He),{children:X}));var Ve=function(e,n,t){if(!e&&!n)return{};t||(t={});var r={},o={},i={},u=e.x,c=e.y,s=e.strategy,l=e.placement,d=e.middlewareData,f=n.maxHeight,p=n.maxWidth,v=n.width,h=t.isMobileFullscreen,m=(0,a.Z)(l.split("-"),2),g=m[0],w=(m[1],"center"),y="center";if(d&&d.arrow){var x=d.arrow.x;t.arrowWidth&&(x+=t.arrowWidth/2),"left"===g||"right"===g?(w="left"===g?"100%":"0",y="".concat(x,"px")):"top"!=g&&"bottom"!=g||(w="".concat(x,"px"),y="top"===g?"100%":"0")}return r.position=s,r.left=0,r.top=0,r.willChange="transform",r.transform="translate3d(".concat(u,"px, ").concat(c,"px, 0)"),i.transformOrigin="".concat(w," ").concat(y),(f||p)&&(o.overflow="auto"),h?o.height="100vh":null!=f&&(o.maxHeight="".concat(f,"px")),null!=p&&(o.maxWidth="".concat(p,"px")),null!=v&&(o.width="".concat(v,"px")),{wrapperSx:r,innerSx:o,contentSx:i}}(Ne,be.current,{arrowWidth:Q,arrowHeight:G,isMobileFullscreen:ve}),qe=Ve.wrapperSx,Xe=Ve.innerSx,Je=Ve.contentSx;Te=(0,u.jsxs)(u.Fragment,{children:[Ke,Fe&&(0,u.jsx)(Ie,{children:(0,u.jsx)(b.Z,{value:oe||p.Z.POPOVER,children:function(e){var n=qe;return n.zIndex=e,(0,u.jsxs)(Ze,{context:Ne,modal:!1,initialFocus:ae,children:[(0,u.jsx)("div",{"data-status":Oe,ref:Pe.setFloating,className:_e,style:n,children:(0,u.jsxs)("div",(0,o.Z)((0,r.Z)({},Be()),{className:R()["content-container"],style:Je,children:[(0,u.jsx)("div",{className:h()([R().content,"pp-main-content"]),style:Xe,children:t}),(0,u.jsx)(d.Y$,{"data-role":"arrow-icon",tipRadius:ne,width:Q,height:G,ref:ye,context:Ne})]}))}),le?(0,u.jsx)("div",{className:R()["focus-mask"],style:{zIndex:e-1}}):null]})}})})]})}else Te=X;return(0,u.jsx)(u.Fragment,{children:Te})};F.displayName="UikitV2Tooltip";var O=f.memo(f.forwardRef(F))},39439:function(e,n,t){"use strict";var r;t.d(n,{p:function(){return r}}),function(e){e.ALL="all",e.KEYBOARD_ONLY="keyboard_only"}(r||(r={}))},74640:function(e){e.exports={base:"BasePopover_base__tgkdS","content-wrapper":"BasePopover_content-wrapper__tIDnM","content-container":"BasePopover_content-container__So512","with-arrow":"BasePopover_with-arrow__wjYLJ",content:"BasePopover_content__8fPWu","focus-mask":"BasePopover_focus-mask___zOVk"}}}]);