"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2471],{42471:function(t,e,n){n.d(e,{T:function(){return Notifications}});var i=n(67294),o=n(63366),r=n(75068),a=n(73935),s={disabled:!1},l=i.createContext(null),u="unmounted",c="exited",p="entering",f="entered",d="exiting",h=function(t){function Transition(e,n){i=t.call(this,e,n)||this;var i,o,r=n&&!n.isMounting?e.enter:e.appear;return i.appearStatus=null,e.in?r?(o=c,i.appearStatus=p):o=f:o=e.unmountOnExit||e.mountOnEnter?u:c,i.state={status:o},i.nextCallback=null,i}(0,r.Z)(Transition,t),Transition.getDerivedStateFromProps=function(t,e){return t.in&&e.status===u?{status:c}:null};var e=Transition.prototype;return e.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},e.componentDidUpdate=function(t){var e=null;if(t!==this.props){var n=this.state.status;this.props.in?n!==p&&n!==f&&(e=p):(n===p||n===f)&&(e=d)}this.updateStatus(!1,e)},e.componentWillUnmount=function(){this.cancelNextCallback()},e.getTimeouts=function(){var t,e,n,i=this.props.timeout;return t=e=n=i,null!=i&&"number"!=typeof i&&(t=i.exit,e=i.enter,n=void 0!==i.appear?i.appear:e),{exit:t,enter:e,appear:n}},e.updateStatus=function(t,e){void 0===t&&(t=!1),null!==e?(this.cancelNextCallback(),e===p?this.performEnter(t):this.performExit()):this.props.unmountOnExit&&this.state.status===c&&this.setState({status:u})},e.performEnter=function(t){var e=this,n=this.props.enter,i=this.context?this.context.isMounting:t,o=this.props.nodeRef?[i]:[a.findDOMNode(this),i],r=o[0],l=o[1],u=this.getTimeouts(),c=i?u.appear:u.enter;if(!t&&!n||s.disabled){this.safeSetState({status:f},function(){e.props.onEntered(r)});return}this.props.onEnter(r,l),this.safeSetState({status:p},function(){e.props.onEntering(r,l),e.onTransitionEnd(c,function(){e.safeSetState({status:f},function(){e.props.onEntered(r,l)})})})},e.performExit=function(){var t=this,e=this.props.exit,n=this.getTimeouts(),i=this.props.nodeRef?void 0:a.findDOMNode(this);if(!e||s.disabled){this.safeSetState({status:c},function(){t.props.onExited(i)});return}this.props.onExit(i),this.safeSetState({status:d},function(){t.props.onExiting(i),t.onTransitionEnd(n.exit,function(){t.safeSetState({status:c},function(){t.props.onExited(i)})})})},e.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},e.safeSetState=function(t,e){e=this.setNextCallback(e),this.setState(t,e)},e.setNextCallback=function(t){var e=this,n=!0;return this.nextCallback=function(i){n&&(n=!1,e.nextCallback=null,t(i))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},e.onTransitionEnd=function(t,e){this.setNextCallback(e);var n=this.props.nodeRef?this.props.nodeRef.current:a.findDOMNode(this),i=null==t&&!this.props.addEndListener;if(!n||i){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],r=o[0],s=o[1];this.props.addEndListener(r,s)}null!=t&&setTimeout(this.nextCallback,t)},e.render=function(){var t=this.state.status;if(t===u)return null;var e=this.props,n=e.children,r=(e.in,e.mountOnEnter,e.unmountOnExit,e.appear,e.enter,e.exit,e.timeout,e.addEndListener,e.onEnter,e.onEntering,e.onEntered,e.onExit,e.onExiting,e.onExited,e.nodeRef,(0,o.Z)(e,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return i.createElement(l.Provider,{value:null},"function"==typeof n?n(t,r):i.cloneElement(i.Children.only(n),r))},Transition}(i.Component);function noop(){}h.contextType=l,h.propTypes={},h.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:noop,onEntering:noop,onEntered:noop,onExit:noop,onExiting:noop,onExited:noop},h.UNMOUNTED=u,h.EXITED=c,h.ENTERING=p,h.ENTERED=f,h.EXITING=d;var m=n(87462);function getChildMapping(t,e){var n=Object.create(null);return t&&i.Children.map(t,function(t){return t}).forEach(function(t){n[t.key]=e&&(0,i.isValidElement)(t)?e(t):t}),n}function getProp(t,e,n){return null!=n[e]?n[e]:t.props[e]}var E=Object.values||function(t){return Object.keys(t).map(function(e){return t[e]})},b=function(t){function TransitionGroup(e,n){var i,o=(i=t.call(this,e,n)||this).handleExited.bind(function(t){if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i));return i.state={contextValue:{isMounting:!0},handleExited:o,firstRender:!0},i}(0,r.Z)(TransitionGroup,t);var e=TransitionGroup.prototype;return e.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},e.componentWillUnmount=function(){this.mounted=!1},TransitionGroup.getDerivedStateFromProps=function(t,e){var n,o,r=e.children,a=e.handleExited;return{children:e.firstRender?getChildMapping(t.children,function(e){return(0,i.cloneElement)(e,{onExited:a.bind(null,e),in:!0,appear:getProp(e,"appear",t),enter:getProp(e,"enter",t),exit:getProp(e,"exit",t)})}):(Object.keys(o=function(t,e){function getValueForKey(n){return n in e?e[n]:t[n]}t=t||{},e=e||{};var n,i=Object.create(null),o=[];for(var r in t)r in e?o.length&&(i[r]=o,o=[]):o.push(r);var a={};for(var s in e){if(i[s])for(n=0;n(t+1)%1e6;var v=n(73678),N=n(37048),O=n(33575),get_position_styles=function([t,e],n){let i={};return"top"===t&&(i.top=n),"bottom"===t&&(i.bottom=n),"left"===e&&(i.left=n),"right"===e&&(i.right=n),"center"===e&&(i.left="50%",i.transform="translateX(-50%)"),i},P=Object.defineProperty,C=Object.getOwnPropertySymbols,w=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable,__defNormalProp=(t,e,n)=>e in t?P(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,__spreadValues=(t,e)=>{for(var n in e||(e={}))w.call(e,n)&&__defNormalProp(t,n,e[n]);if(C)for(var n of C(e))j.call(e,n)&&__defNormalProp(t,n,e[n]);return t};let k={left:"translateX(-100%)",right:"translateX(100%)","top-center":"translateY(-100%)","bottom-center":"translateY(100%)"},S={left:"translateX(0)",right:"translateX(0)","top-center":"translateY(0)","bottom-center":"translateY(0)"};var get_notification_state_styles=function({state:t,maxHeight:e,positioning:n,transitionDuration:i}){let[o,r]=n,a="center"===r?`${o}-center`:r,s={opacity:0,maxHeight:e,transform:k[a],transitionDuration:`${i}ms, ${i}ms, ${i}ms`,transitionTimingFunction:"cubic-bezier(.51,.3,0,1.21), cubic-bezier(.51,.3,0,1.21), linear",transitionProperty:"opacity, transform, max-height"},l={opacity:1,transform:S[a]},u={opacity:0,maxHeight:0,transform:k[a]};return __spreadValues(__spreadValues({},s),{entering:l,entered:l,exiting:u,exited:u}[t])},T=n(12593),R=Object.defineProperty,V=Object.defineProperties,D=Object.getOwnPropertyDescriptors,M=Object.getOwnPropertySymbols,H=Object.prototype.hasOwnProperty,L=Object.prototype.propertyIsEnumerable,NotificationContainer_defNormalProp=(t,e,n)=>e in t?R(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,NotificationContainer_spreadValues=(t,e)=>{for(var n in e||(e={}))H.call(e,n)&&NotificationContainer_defNormalProp(t,n,e[n]);if(M)for(var n of M(e))L.call(e,n)&&NotificationContainer_defNormalProp(t,n,e[n]);return t},__spreadProps=(t,e)=>V(t,D(e)),__objRest=(t,e)=>{var n={};for(var i in t)H.call(t,i)&&0>e.indexOf(i)&&(n[i]=t[i]);if(null!=t&&M)for(var i of M(t))0>e.indexOf(i)&&L.call(t,i)&&(n[i]=t[i]);return n};function NotificationContainer(t){var{notification:e,autoClose:n,onHide:o,innerRef:r}=t,a=__objRest(t,["notification","autoClose","onHide","innerRef"]);let{autoClose:s,message:l}=e,u=__objRest(e,["autoClose","message"]),c="number"==typeof s?s:!1!==s&&!1!==n&&n,p=(0,i.useRef)(),handleHide=()=>{o(e.id),window.clearTimeout(p.current)},cancelDelayedHide=()=>{clearTimeout(p.current)},handleDelayedHide=()=>{"number"==typeof c&&(p.current=window.setTimeout(handleHide,c))};return(0,i.useEffect)(()=>{"function"==typeof e.onOpen&&e.onOpen(e)},[]),(0,i.useEffect)(()=>(handleDelayedHide(),cancelDelayedHide),[n,e.autoClose]),i.createElement(T.P,__spreadProps(NotificationContainer_spreadValues(NotificationContainer_spreadValues({},u),a),{onClose:handleHide,onMouseEnter:cancelDelayedHide,onMouseLeave:handleDelayedHide,ref:r}),l)}NotificationContainer.displayName="@mantine/notifications/NotificationContainer";var F=(0,n(56817).k)((t,{zIndex:e})=>({notifications:{width:`calc(100% - ${t.spacing.md} * 2)`,boxSizing:"border-box",position:"fixed",zIndex:e},notification:{"&:not(:first-of-type)":{marginTop:t.spacing.sm}}})),I=n(89058),G=Object.defineProperty,$=Object.defineProperties,X=Object.getOwnPropertyDescriptors,q=Object.getOwnPropertySymbols,Z=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable,use_notifications_state_defNormalProp=(t,e,n)=>e in t?G(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,use_notifications_state_spreadValues=(t,e)=>{for(var n in e||(e={}))Z.call(e,n)&&use_notifications_state_defNormalProp(t,n,e[n]);if(q)for(var n of q(e))Q.call(e,n)&&use_notifications_state_defNormalProp(t,n,e[n]);return t},use_notifications_state_spreadProps=(t,e)=>$(t,X(e)),use_notifications_state=function({limit:t}){let{state:e,queue:n,update:o,cleanQueue:r}=function({initialValues:t=[],limit:e}){let[{state:n,queue:o},r]=(0,i.useState)({state:t.slice(0,e),queue:t.slice(e)});return{state:n,queue:o,add:(...t)=>r(n=>{let i=[...n.state,...n.queue,...t];return{state:i.slice(0,e),queue:i.slice(e)}}),update:t=>r(n=>{let i=t([...n.state,...n.queue]);return{state:i.slice(0,e),queue:i.slice(e)}}),cleanQueue:()=>r(t=>({state:t.state,queue:[]}))}}({initialValues:[],limit:t});return{notifications:e,queue:n,showNotification:t=>{let e=t.id||(0,I.k)();return o(n=>t.id&&n.some(e=>e.id===t.id)?n:[...n,use_notifications_state_spreadProps(use_notifications_state_spreadValues({},t),{id:e})]),e},updateNotification:t=>o(e=>{let n=e.findIndex(e=>e.id===t.id);if(-1===n)return e;let i=[...e];return i[n]=t,i}),hideNotification:t=>o(e=>e.filter(e=>e.id!==t||("function"==typeof e.onClose&&e.onClose(e),!1))),cleanQueue:r,clean:()=>o(()=>[])}},U=Object.defineProperty,z=Object.getOwnPropertySymbols,K=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable,Notifications_defNormalProp=(t,e,n)=>e in t?U(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Notifications_spreadValues=(t,e)=>{for(var n in e||(e={}))K.call(e,n)&&Notifications_defNormalProp(t,n,e[n]);if(z)for(var n of z(e))W.call(e,n)&&Notifications_defNormalProp(t,n,e[n]);return t},Notifications_objRest=(t,e)=>{var n={};for(var i in t)K.call(t,i)&&0>e.indexOf(i)&&(n[i]=t[i]);if(null!=t&&z)for(var i of z(t))0>e.indexOf(i)&&W.call(t,i)&&(n[i]=t[i]);return n};let Y=["top-left","top-right","top-center","bottom-left","bottom-right","bottom-center"],Notifications=t=>{var{className:e,position:n="bottom-right",autoClose:o=4e3,transitionDuration:r=250,containerWidth:a=(0,x.h)(440),notificationMaxHeight:s=(0,x.h)(200),limit:l=5,zIndex:u=(0,y.w)("overlay"),style:c,children:p,target:f}=t,d=Notifications_objRest(t,["className","position","autoClose","transitionDuration","containerWidth","notificationMaxHeight","limit","zIndex","style","children","target"]);let m=function(){let[,t]=(0,i.useReducer)(reducer,0);return t}(),E=(0,i.useRef)({}),P=(0,i.useRef)(0),{notifications:C,showNotification:w,updateNotification:j,hideNotification:k,clean:S,cleanQueue:T}=use_notifications_state({limit:l}),{classes:R,cx:V,theme:D}=F({zIndex:u}),M=(0,v.J)(),H=!!D.respectReducedMotion&&M,L=H?1:r,I=(Y.includes(n)?n:"bottom-right").split("-");(0,N.l)(()=>{C.length>P.current&&setTimeout(()=>m(),0),P.current=C.length},[C]),(0,O.Gy)({show:w,hide:k,update:j,clean:S,cleanQueue:T});let G=C.map(t=>i.createElement(h,{key:t.id,timeout:L,onEnter:()=>E.current[t.id].offsetHeight,nodeRef:{current:E.current[t.id]}},e=>i.createElement(NotificationContainer,{innerRef:e=>{E.current[t.id]=e},notification:t,onHide:k,className:R.notification,autoClose:o,sx:[Notifications_spreadValues({},get_notification_state_styles({state:e,positioning:I,transitionDuration:L,maxHeight:s})),...Array.isArray(t.sx)?t.sx:[t.sx]]})));return i.createElement(_.h,{target:f},i.createElement(g.x,Notifications_spreadValues({className:V(R.notifications,e),style:c,sx:Notifications_spreadValues({maxWidth:a},get_position_styles(I,D.spacing.md))},d),i.createElement(b,null,G)))};Notifications.displayName="@mantine/notifications/Notifications",Notifications.show=O.N9.show,Notifications.hide=O.N9.hide,Notifications.update=O.N9.update,Notifications.clean=O.N9.clean,Notifications.cleanQueue=O.N9.cleanQueue},33575:function(t,e,n){n.d(e,{N9:function(){return d},Gy:function(){return a}});var i,o=n(67294);let r="undefined"!=typeof window?o.useLayoutEffect:o.useEffect,[a,s]=(i="mantine-notifications",[function(t){let e=Object.keys(t).reduce((e,n)=>(e[`${i}:${n}`]=e=>t[n](e.detail),e),{});r(()=>(Object.keys(e).forEach(t=>{window.removeEventListener(t,e[t]),window.addEventListener(t,e[t])}),()=>Object.keys(e).forEach(t=>{window.removeEventListener(t,e[t])})),[e])},function(t){return(...e)=>{var n,o;return n=`${i}:${String(t)}`,o=e[0],void window.dispatchEvent(new CustomEvent(n,{detail:o}))}}]),l=s("show"),u=s("hide"),c=s("clean"),p=s("cleanQueue"),f=s("update"),d={show:l,hide:u,clean:c,cleanQueue:p,update:f}},75068:function(t,e,n){function _setPrototypeOf(t,e){return(_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function _inheritsLoose(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,_setPrototypeOf(t,e)}n.d(e,{Z:function(){return _inheritsLoose}})}}]);