"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[16],{28:function(e,t,o){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Modal=void 0;const l=o(0),r=(o(1),o(86)),c=o(98),s=o(2),i=o(4),u=o(99),a=n(o(24)),{wrapper:d,wrapperContent:p,wrapperShow:h,wrapperContentModal:m,wrapperContentMobileFullScreen:f,wrapperContentModalMobileFullScreen:w}=a.default;t.Modal=function({show:e,curtainClose:t=!0,onClose:o,children:n,className:a="",curtainColor:b="black",width:v,mode:C="default"}){const g="mobileFullScreen"===C;return g||(0,u.usePreventBackgroundScrolling)(e),(0,l.jsx)(c.Portal,{children:(0,l.jsxs)("div",Object.assign({className:(0,s.cx)(d,a)},{children:[(0,l.jsx)(r.Curtain,{show:e,onClose:o,curtainClose:t,curtainColor:b}),(0,l.jsxs)("div",Object.assign({className:(0,s.cx)(p,g&&f,e&&h),style:`width: ${v?v+"px":"100%"}${v?";max-width:"+v+"px":""}`,onClick:e=>e.stopPropagation()},{children:[!g&&(0,l.jsx)(i.Icons.CloseButton,{onClick:o}),(0,l.jsx)("div",Object.assign({className:(0,s.cx)(m,g&&w)},{children:n}))]}))]}))})}},99:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.usePreventBackgroundScrolling=t.restoreScrollbar=t.hideScrollbar=void 0;const n=o(3);let l=0;function r(){l=window.pageYOffset;const e=document.querySelector(".app");null==e||e.setAttribute("style","position: fixed; overflow: hidden; width: 100%");const t=function(){const e=document.documentElement.clientWidth;return window.innerWidth-e}();document.documentElement.style.marginRight=`${t}px`}function c(){const e=document.querySelector(".app");null==e||e.removeAttribute("style"),document.documentElement.style.marginRight="";const t=document.querySelector("html");t.style.scrollBehavior="auto",window.scrollTo(0,l),t.style.scrollBehavior=""}t.hideScrollbar=r,t.restoreScrollbar=c,t.usePreventBackgroundScrolling=function(e){const[t,o]=(0,n.useState)(!0);(0,n.useEffect)((()=>{if(e)r(),t&&o(!1);else{if(t)return void o(!1);c()}}),[e])}}}]);