react-toastify
Advanced tools
Comparing version 10.0.1 to 10.0.2-debug
@@ -8,3 +8,3 @@ 'use client'; | ||
function injectStyle() { | ||
var style = ":root{--toastify-color-light:#fff;--toastify-color-dark:#121212;--toastify-color-info:#3498db;--toastify-color-success:#07bc0c;--toastify-color-warning:#f1c40f;--toastify-color-error:#e74c3c;--toastify-color-transparent:hsla(0,0%,100%,.7);--toastify-icon-color-info:var(--toastify-color-info);--toastify-icon-color-success:var(--toastify-color-success);--toastify-icon-color-warning:var(--toastify-color-warning);--toastify-icon-color-error:var(--toastify-color-error);--toastify-toast-width:320px;--toastify-toast-offset:16px;--toastify-toast-top:max(var(--toastify-toast-offset),env(safe-area-inset-top));--toastify-toast-right:max(var(--toastify-toast-offset),env(safe-area-inset-right));--toastify-toast-left:max(var(--toastify-toast-offset),env(safe-area-inset-left));--toastify-toast-bottom:max(var(--toastify-toast-offset),env(safe-area-inset-bottom));--toastify-toast-background:#fff;--toastify-toast-min-height:64px;--toastify-toast-max-height:800px;--toastify-toast-bd-radius:6px;--toastify-font-family:sans-serif;--toastify-z-index:9999;--toastify-text-color-light:#757575;--toastify-text-color-dark:#fff;--toastify-text-color-info:#fff;--toastify-text-color-success:#fff;--toastify-text-color-warning:#fff;--toastify-text-color-error:#fff;--toastify-spinner-color:#616161;--toastify-spinner-color-empty-area:#e0e0e0;--toastify-color-progress-light:linear-gradient(90deg,#4cd964,#5ac8fa,#007aff,#34aadc,#5856d6,#ff2d55);--toastify-color-progress-dark:#bb86fc;--toastify-color-progress-info:var(--toastify-color-info);--toastify-color-progress-success:var(--toastify-color-success);--toastify-color-progress-warning:var(--toastify-color-warning);--toastify-color-progress-error:var(--toastify-color-error);--toastify-color-progress-bgo:0.2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translateZ(var(--toastify-z-index));position:fixed;padding:4px;width:var(--toastify-toast-width);box-sizing:border-box;color:#fff}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translateX(-50%)}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right)}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translateX(-50%)}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right)}@media only screen and (max-width:480px){.Toastify__toast-container{width:100vw;padding:0;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-center,.Toastify__toast-container--top-left,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translateX(0)}.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translateX(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:auto}}.Toastify__toast{--y:0;position:relative;-ms-touch-action:none;touch-action:none;min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:8px;border-radius:var(--toastify-toast-bd-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);cursor:default;direction:ltr;z-index:0;overflow:hidden}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__close-button,.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-body{margin:auto 0;-ms-flex:1 1 auto;flex:1 1 auto;padding:6px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.Toastify__toast-body>div:last-child{word-break:break-word;-ms-flex:1;flex:1}.Toastify__toast-icon{-webkit-margin-end:10px;margin-inline-end:10px;width:20px;-ms-flex-negative:0;flex-shrink:0;display:-ms-flexbox;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}@media only screen and (max-width:480px){.Toastify__toast{margin-bottom:0;border-radius:0}}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--colored.Toastify__toast--default,.Toastify__toast-theme--light{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;-ms-flex-item-align:start;align-self:flex-start;z-index:1}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:focus,.Toastify__close-button:hover{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:var(--toastify-z-index);opacity:.7;transform-origin:left;border-bottom-left-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:auto;transform-origin:right;border-bottom-left-radius:0;border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp{position:absolute;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--bottom-left,.Toastify__bounce-enter--top-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--bottom-right,.Toastify__bounce-enter--top-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--bottom-left,.Toastify__bounce-exit--top-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--bottom-right,.Toastify__bounce-exit--top-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--bottom-left,.Toastify__slide-enter--top-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--bottom-right,.Toastify__slide-enter--top-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--bottom-left,.Toastify__slide-exit--top-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-right,.Toastify__slide-exit--top-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}"; | ||
var style = `:root{--toastify-color-light:#fff;--toastify-color-dark:#121212;--toastify-color-info:#3498db;--toastify-color-success:#07bc0c;--toastify-color-warning:#f1c40f;--toastify-color-error:#e74c3c;--toastify-color-transparent:hsla(0,0%,100%,.7);--toastify-icon-color-info:var(--toastify-color-info);--toastify-icon-color-success:var(--toastify-color-success);--toastify-icon-color-warning:var(--toastify-color-warning);--toastify-icon-color-error:var(--toastify-color-error);--toastify-toast-width:320px;--toastify-toast-offset:16px;--toastify-toast-top:max(var(--toastify-toast-offset),env(safe-area-inset-top));--toastify-toast-right:max(var(--toastify-toast-offset),env(safe-area-inset-right));--toastify-toast-left:max(var(--toastify-toast-offset),env(safe-area-inset-left));--toastify-toast-bottom:max(var(--toastify-toast-offset),env(safe-area-inset-bottom));--toastify-toast-background:#fff;--toastify-toast-min-height:64px;--toastify-toast-max-height:800px;--toastify-toast-bd-radius:6px;--toastify-font-family:sans-serif;--toastify-z-index:9999;--toastify-text-color-light:#757575;--toastify-text-color-dark:#fff;--toastify-text-color-info:#fff;--toastify-text-color-success:#fff;--toastify-text-color-warning:#fff;--toastify-text-color-error:#fff;--toastify-spinner-color:#616161;--toastify-spinner-color-empty-area:#e0e0e0;--toastify-color-progress-light:linear-gradient(90deg,#4cd964,#5ac8fa,#007aff,#34aadc,#5856d6,#ff2d55);--toastify-color-progress-dark:#bb86fc;--toastify-color-progress-info:var(--toastify-color-info);--toastify-color-progress-success:var(--toastify-color-success);--toastify-color-progress-warning:var(--toastify-color-warning);--toastify-color-progress-error:var(--toastify-color-error);--toastify-color-progress-bgo:0.2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translateZ(var(--toastify-z-index));position:fixed;padding:4px;width:var(--toastify-toast-width);box-sizing:border-box;color:#fff}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translateX(-50%)}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right)}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translateX(-50%)}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right)}@media only screen and (max-width:480px){.Toastify__toast-container{width:100vw;padding:0;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-center,.Toastify__toast-container--top-left,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translateX(0)}.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translateX(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:auto}}.Toastify__toast{--y:0;position:relative;-ms-touch-action:none;touch-action:none;min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:8px;border-radius:var(--toastify-toast-bd-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);cursor:default;direction:ltr;z-index:0;overflow:hidden}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__close-button,.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-body{margin:auto 0;-ms-flex:1 1 auto;flex:1 1 auto;padding:6px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.Toastify__toast-body>div:last-child{word-break:break-word;-ms-flex:1;flex:1}.Toastify__toast-icon{-webkit-margin-end:10px;margin-inline-end:10px;width:20px;-ms-flex-negative:0;flex-shrink:0;display:-ms-flexbox;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}@media only screen and (max-width:480px){.Toastify__toast{margin-bottom:0;border-radius:0}}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--colored.Toastify__toast--default,.Toastify__toast-theme--light{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;-ms-flex-item-align:start;align-self:flex-start;z-index:1}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:focus,.Toastify__close-button:hover{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:var(--toastify-z-index);opacity:.7;transform-origin:left;border-bottom-left-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:auto;transform-origin:right;border-bottom-left-radius:0;border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp{position:absolute;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--bottom-left,.Toastify__bounce-enter--top-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--bottom-right,.Toastify__bounce-enter--top-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--bottom-left,.Toastify__bounce-exit--top-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--bottom-right,.Toastify__bounce-exit--top-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--bottom-left,.Toastify__slide-enter--top-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--bottom-right,.Toastify__slide-enter--top-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--bottom-left,.Toastify__slide-exit--top-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-right,.Toastify__slide-exit--top-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}`; | ||
var css = document.createElement('style'); | ||
@@ -11,0 +11,0 @@ css.innerText = style; |
'use client'; | ||
var e=require("react"),t=require("clsx");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=/*#__PURE__*/n(e),a=/*#__PURE__*/n(t);const s=e=>"number"==typeof e&&!isNaN(e),r=e=>"string"==typeof e,l=e=>"function"==typeof e,i=e=>r(e)||l(e)?e:null,c=t=>e.isValidElement(t)||r(t)||l(t)||s(t);function d(e,t,n){void 0===n&&(n=300);const{scrollHeight:o,style:a}=e;requestAnimationFrame(()=>{a.minHeight="initial",a.height=o+"px",a.transition=`all ${n}ms`,requestAnimationFrame(()=>{a.height="0",a.padding="0",a.margin="0",setTimeout(t,n)})})}function u(t){let{enter:n,exit:a,appendPosition:s=!1,collapse:r=!0,collapseDuration:l=300}=t;return function(t){let{children:i,position:c,preventExitTransition:u,done:p,nodeRef:f,isIn:m,playToast:g}=t;const y=s?`${n}--${c}`:n,v=s?`${a}--${c}`:a,h=e.useRef(0);return e.useLayoutEffect(()=>{const e=f.current,t=y.split(" "),n=o=>{o.target===f.current&&(g(),e.removeEventListener("animationend",n),e.removeEventListener("animationcancel",n),0===h.current&&"animationcancel"!==o.type&&e.classList.remove(...t))};e.classList.add(...t),e.addEventListener("animationend",n),e.addEventListener("animationcancel",n)},[]),e.useEffect(()=>{const e=f.current,t=()=>{e.removeEventListener("animationend",t),r?d(e,p,l):p()};m||(u?t():(h.current=1,e.className+=` ${v}`,e.addEventListener("animationend",t)))},[m]),o.default.createElement(o.default.Fragment,null,i)}}function p(e,t){return null!=e?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}const f=new Map;let m=[];const g=new Set,y=e=>g.forEach(t=>t(e)),v=()=>f.size>0;function h(e,t){var n;if(t)return!(null==(n=f.get(t))||!n.isToastActive(e));let o=!1;return f.forEach(t=>{t.isToastActive(e)&&(o=!0)}),o}function T(e,t){c(e)&&(v()||m.push({content:e,options:t}),f.forEach(n=>{n.buildToast(e,t)}))}function E(e,t){f.forEach(n=>{null!=t&&null!=t&&t.containerId?(null==t?void 0:t.containerId)===n.id&&n.toggle(e,null==t?void 0:t.id):n.toggle(e,null==t?void 0:t.id)})}function b(t){const{subscribe:n,getSnapshot:o,setProps:a}=e.useRef(function(t){const n=t.containerId||1;return{subscribe(o){const a=function(t,n,o){let a=1,d=0,u=[],f=[],m=[],g=n;const y=new Map,v=new Set,h=()=>{m=Array.from(y.values()),v.forEach(e=>e())},T=e=>{f=null==e?[]:f.filter(t=>t!==e),h()},E=t=>{const{toastId:n,onOpen:a,updateId:s,children:r}=t.props,i=null==s;t.staleId&&y.delete(t.staleId),y.set(n,t),f=[...f,t.props.toastId].filter(e=>e!==t.staleId),h(),o(p(t,i?"added":"updated")),i&&l(a)&&a(e.isValidElement(r)&&r.props)};return{id:t,props:g,observe:e=>(v.add(e),()=>v.delete(e)),toggle:(e,t)=>{y.forEach(n=>{null!=t&&t!==n.props.toastId||l(n.toggle)&&n.toggle(e)})},removeToast:T,toasts:y,clearQueue:()=>{d-=u.length,u=[]},buildToast:(n,f)=>{if((e=>{let{containerId:n,toastId:o,updateId:a}=e;const s=n?n!==t:1!==t,r=y.has(o)&&null==a;return s||r})(f))return;const{toastId:m,updateId:v,data:b,staleId:I,delay:_}=f,C=()=>{T(m)},L=null==v;L&&d++;const N={...g,style:g.toastStyle,key:a++,...Object.fromEntries(Object.entries(f).filter(e=>{let[t,n]=e;return null!=n})),toastId:m,updateId:v,data:b,closeToast:C,isIn:!1,className:i(f.className||g.toastClassName),bodyClassName:i(f.bodyClassName||g.bodyClassName),progressClassName:i(f.progressClassName||g.progressClassName),autoClose:!f.isLoading&&(x=f.autoClose,$=g.autoClose,!1===x||s(x)&&x>0?x:$),deleteToast(){const t=y.get(m),{onClose:n,children:a}=t.props;l(n)&&n(e.isValidElement(a)&&a.props),o(p(t,"removed")),y.delete(m),d--,d<0&&(d=0),u.length>0?E(u.shift()):h()}};var x,$;N.closeButton=g.closeButton,!1===f.closeButton||c(f.closeButton)?N.closeButton=f.closeButton:!0===f.closeButton&&(N.closeButton=!c(g.closeButton)||g.closeButton);let k=n;e.isValidElement(n)&&!r(n.type)?k=e.cloneElement(n,{closeToast:C,toastProps:N,data:b}):l(n)&&(k=n({closeToast:C,toastProps:N,data:b}));const P={content:k,props:N,staleId:I};g.limit&&g.limit>0&&d>g.limit&&L?u.push(P):s(_)?setTimeout(()=>{E(P)},_):E(P)},setProps(e){g=e},setToggle:(e,t)=>{y.get(e).toggle=t},isToastActive:e=>f.some(t=>t===e),getSnapshot:()=>g.newestOnTop?m.reverse():m}}(n,t,y);f.set(n,a);const d=a.observe(o);return m.forEach(e=>T(e.content,e.options)),m=[],()=>{d(),f.delete(n)}},setProps(e){var t;null==(t=f.get(n))||t.setProps(e)},getSnapshot(){var e;return null==(e=f.get(n))?void 0:e.getSnapshot()}}}(t)).current;a(t);const d=e.useSyncExternalStore(n,o,o);return{getToastToRender:function(e){if(!d)return[];const t=new Map;return d.forEach(e=>{const{position:n}=e.props;t.has(n)||t.set(n,[]),t.get(n).push(e)}),Array.from(t,t=>e(t[0],t[1]))},isToastActive:h,count:null==d?void 0:d.length}}function I(t){const[n,o]=e.useState(!1),[a,s]=e.useState(!1),r=e.useRef(null),l=e.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:i,pauseOnHover:c,closeToast:d,onClick:u,closeOnClick:p}=t;var m,g;function y(){o(!0)}function v(){o(!1)}function h(e){const o=r.current;l.canDrag&&o&&(l.didMove=!0,n&&v(),l.delta="x"===t.draggableDirection?e.clientX-l.start:e.clientY-l.start,l.start!==e.clientX&&(l.canCloseOnClick=!1),o.style.transform=`translate3d(${"x"===t.draggableDirection?`${l.delta}px, var(--y)`:`0, calc(${l.delta}px + var(--y))`},0)`,o.style.opacity=""+(1-Math.abs(l.delta/l.removalDistance)))}function T(){document.removeEventListener("pointermove",h),document.removeEventListener("pointerup",T);const e=r.current;if(l.canDrag&&l.didMove&&e){if(l.canDrag=!1,Math.abs(l.delta)>l.removalDistance)return s(!0),t.closeToast(),void t.collapseAll();e.style.transition="transform 0.2s, opacity 0.2s",e.style.removeProperty("transform"),e.style.removeProperty("opacity")}}null==(g=f.get((m={id:t.toastId,containerId:t.containerId,fn:o}).containerId||1))||g.setToggle(m.id,m.fn),e.useEffect(()=>{if(t.pauseOnFocusLoss)return document.hasFocus()||v(),window.addEventListener("focus",y),window.addEventListener("blur",v),()=>{window.removeEventListener("focus",y),window.removeEventListener("blur",v)}},[t.pauseOnFocusLoss]);const E={onPointerDown:function(e){if(!0===t.draggable||t.draggable===e.pointerType){l.didMove=!1,document.addEventListener("pointermove",h),document.addEventListener("pointerup",T);const n=r.current;l.canCloseOnClick=!0,l.canDrag=!0,n.style.transition="none","x"===t.draggableDirection?(l.start=e.clientX,l.removalDistance=n.offsetWidth*(t.draggablePercent/100)):(l.start=e.clientY,l.removalDistance=n.offsetHeight*(80===t.draggablePercent?1.5*t.draggablePercent:t.draggablePercent)/100)}},onPointerUp:function(e){const{top:n,bottom:o,left:a,right:s}=r.current.getBoundingClientRect();"touchend"!==e.nativeEvent.type&&t.pauseOnHover&&e.clientX>=a&&e.clientX<=s&&e.clientY>=n&&e.clientY<=o?v():y()}};return i&&c&&(E.onMouseEnter=v,t.stacked||(E.onMouseLeave=y)),p&&(E.onClick=e=>{u&&u(e),l.canCloseOnClick&&d()}),{playToast:y,pauseToast:v,isRunning:n,preventExitTransition:a,toastRef:r,eventHandlers:E}}function _(e){let{delay:t,isRunning:n,closeToast:s,type:r="default",hide:i,className:c,style:d,controlledProgress:u,progress:p,rtl:f,isIn:m,theme:g}=e;const y=i||u&&0===p,v={...d,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused"};u&&(v.transform=`scaleX(${p})`);const h=a.default("Toastify__progress-bar",u?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${g}`,`Toastify__progress-bar--${r}`,{"Toastify__progress-bar--rtl":f}),T=l(c)?c({rtl:f,type:r,defaultClassName:h}):a.default(h,c),E={[u&&p>=1?"onTransitionEnd":"onAnimationEnd"]:u&&p<1?null:()=>{m&&s()}};return o.default.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":y},o.default.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${g} Toastify__progress-bar--${r}`}),o.default.createElement("div",{role:"progressbar","aria-hidden":y?"true":"false","aria-label":"notification timer",className:T,style:v,...E}))}let C=1;const L=()=>""+C++;function N(e){return e&&(r(e.toastId)||s(e.toastId))?e.toastId:L()}function x(e,t){return T(e,t),t.toastId}function $(e,t){return{...t,type:t&&t.type||e,toastId:N(t)}}function k(e){return(t,n)=>x(t,$(e,n))}function P(e,t){return x(e,$("default",t))}P.loading=(e,t)=>x(e,$("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),P.promise=function(e,t,n){let o,{pending:a,error:s,success:i}=t;a&&(o=r(a)?P.loading(a,n):P.loading(a.render,{...n,...a}));const c={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},d=(e,t,a)=>{if(null==t)return void P.dismiss(o);const s={type:e,...c,...n,data:a},l=r(t)?{render:t}:t;return o?P.update(o,{...s,...l}):P(l.render,{...s,...l}),a},u=l(e)?e():e;return u.then(e=>d("success",i,e)).catch(e=>d("error",s,e)),u},P.success=k("success"),P.info=k("info"),P.error=k("error"),P.warning=k("warning"),P.warn=P.warning,P.dark=(e,t)=>x(e,$("default",{theme:"dark",...t})),P.dismiss=function(e){!function(e){var t;if(v()){if(null==e||r(t=e)||s(t))f.forEach(t=>{t.removeToast(e)});else if(e&&("containerId"in e||"id"in e)){var n;(null==(n=f.get(e.containerId))?void 0:n.removeToast(e.id))||f.forEach(t=>{t.removeToast(e.id)})}}else m=m.filter(t=>null!=e&&t.options.toastId!==e)}(e)},P.clearWaitingQueue=function(e){void 0===e&&(e={}),f.forEach(t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()})},P.isActive=h,P.update=function(e,t){void 0===t&&(t={});const n=((e,t)=>{var n;let{containerId:o}=t;return null==(n=f.get(o||1))?void 0:n.toasts.get(e)})(e,t);if(n){const{props:o,content:a}=n,s={delay:100,...o,...t,toastId:t.toastId||e,updateId:L()};s.toastId!==e&&(s.staleId=e);const r=s.render||a;delete s.render,x(r,s)}},P.done=e=>{P.update(e,{progress:1})},P.onChange=function(e){return g.add(e),()=>{g.delete(e)}},P.play=e=>E(!0,e),P.pause=e=>E(!1,e);const w=e=>{let{theme:t,type:n,isLoading:a,...s}=e;return o.default.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:"colored"===t?"currentColor":`var(--toastify-icon-color-${n})`,...s})},M={info:function(e){return o.default.createElement(w,{...e},o.default.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return o.default.createElement(w,{...e},o.default.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return o.default.createElement(w,{...e},o.default.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return o.default.createElement(w,{...e},o.default.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return o.default.createElement("div",{className:"Toastify__spinner"})}},A=t=>{const{isRunning:n,preventExitTransition:s,toastRef:r,eventHandlers:i,playToast:c}=I(t),{closeButton:d,children:u,autoClose:p,onClick:f,type:m,hideProgressBar:g,closeToast:y,transition:v,position:h,className:T,style:E,bodyClassName:b,bodyStyle:C,progressClassName:L,progressStyle:N,updateId:x,role:$,progress:k,rtl:P,toastId:w,deleteToast:A,isIn:B,isLoading:O,closeOnClick:D,theme:R}=t,S=a.default("Toastify__toast",`Toastify__toast-theme--${R}`,`Toastify__toast--${m}`,{"Toastify__toast--rtl":P},{"Toastify__toast--close-on-click":D}),z=l(T)?T({rtl:P,position:h,type:m,defaultClassName:S}):a.default(S,T),H=function(t){let{theme:n,type:o,isLoading:a,icon:s}=t,r=null;const i={theme:n,type:o,isLoading:a};return!1===s||(l(s)?r=s(i):e.isValidElement(s)?r=e.cloneElement(s,i):a?r=M.spinner():(e=>e in M)(o)&&(r=M[o](i))),r}(t),F=!!k||!p,V={closeToast:y,type:m,theme:R};let X=null;return!1===d||(X=l(d)?d(V):e.isValidElement(d)?e.cloneElement(d,V):function(e){let{closeToast:t,theme:n,ariaLabel:a="close"}=e;return o.default.createElement("button",{className:`Toastify__close-button Toastify__close-button--${n}`,type:"button",onClick:e=>{e.stopPropagation(),t(e)},"aria-label":a},o.default.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},o.default.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}(V)),o.default.createElement(v,{isIn:B,done:A,position:h,preventExitTransition:s,nodeRef:r,playToast:c},o.default.createElement("div",{id:w,onClick:f,"data-in":B,className:z,...i,style:E,ref:r},o.default.createElement("div",{...B&&{role:$},className:l(b)?b({type:m}):a.default("Toastify__toast-body",b),style:C},null!=H&&o.default.createElement("div",{className:a.default("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!O})},H),o.default.createElement("div",null,u)),X,o.default.createElement(_,{...x&&!F?{key:`pb-${x}`}:{},rtl:P,theme:R,delay:p,isRunning:n,isIn:B,closeToast:y,hide:g,type:m,style:N,className:L,controlledProgress:F,progress:k||0})))},B=function(e,t){return void 0===t&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},O=u(B("bounce",!0)),D=u(B("slide",!0)),R=u(B("zoom")),S=u(B("flip")),z={position:"top-right",transition:O,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};exports.Bounce=O,exports.Flip=S,exports.Icons=M,exports.Slide=D,exports.ToastContainer=function(t){let n={...z,...t};const s=t.stacked,[r,c]=e.useState(!0),d=e.useRef(null),{getToastToRender:u,isToastActive:p,count:f}=b(n),{className:m,style:g,rtl:y,containerId:v}=n;function h(e){const t=a.default("Toastify__toast-container",`Toastify__toast-container--${e}`,{"Toastify__toast-container--rtl":y});return l(m)?m({position:e,rtl:y,defaultClassName:t}):a.default(t,i(m))}function T(){s&&(c(!0),P.play())}return e.useLayoutEffect(()=>{if(s){var e;const t=d.current.querySelectorAll('[data-in="true"]'),o=12,a=null==(e=n.position)?void 0:e.includes("top");let s=0,l=0;Array.from(t).reverse().forEach((e,t)=>{const n=e;n.classList.add("Toastify__toast--stacked"),t>0&&(n.dataset.collapsed=`${r}`),n.dataset.pos||(n.dataset.pos=a?"top":"bot");const i=s*(r?.2:1)+(r?0:o*t);n.style.setProperty("--y",`${a?i:-1*i}px`),n.style.setProperty("--g",`${o}`),n.style.setProperty("--s",""+(1-(r?l:0))),s+=n.offsetHeight,l+=.025})}},[r,f,s]),o.default.createElement("div",{ref:d,className:"Toastify",id:v,onMouseEnter:()=>{s&&(c(!1),P.pause())},onMouseLeave:T},u((e,t)=>{const n=t.length?{...g}:{...g,pointerEvents:"none"};return o.default.createElement("div",{className:h(e),style:n,key:`container-${e}`},t.map(e=>{let{content:t,props:n}=e;return o.default.createElement(A,{...n,stacked:s,collapseAll:T,isIn:p(n.toastId,n.containerId),style:n.style,key:`toast-${n.key}`},t)}))}))},exports.Zoom=R,exports.collapseToast=d,exports.cssTransition=u,exports.toast=P,exports.useToast=I,exports.useToastContainer=b; | ||
var e=require("react"),t=require("clsx");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=/*#__PURE__*/n(e),a=/*#__PURE__*/n(t);const s=e=>"number"==typeof e&&!isNaN(e),r=e=>"string"==typeof e,l=e=>"function"==typeof e,i=e=>r(e)||l(e)?e:null,c=t=>e.isValidElement(t)||r(t)||l(t)||s(t);function d(e,t,n){void 0===n&&(n=300);const{scrollHeight:o,style:a}=e;requestAnimationFrame(()=>{a.minHeight="initial",a.height=o+"px",a.transition=`all ${n}ms`,requestAnimationFrame(()=>{a.height="0",a.padding="0",a.margin="0",setTimeout(t,n)})})}function u(t){let{enter:n,exit:a,appendPosition:s=!1,collapse:r=!0,collapseDuration:l=300}=t;return function(t){let{children:i,position:c,preventExitTransition:u,done:p,nodeRef:f,isIn:m,playToast:g}=t;const y=s?`${n}--${c}`:n,v=s?`${a}--${c}`:a,h=e.useRef(0);return e.useLayoutEffect(()=>{const e=f.current,t=y.split(" "),n=o=>{o.target===f.current&&(g(),e.removeEventListener("animationend",n),e.removeEventListener("animationcancel",n),0===h.current&&"animationcancel"!==o.type&&e.classList.remove(...t))};e.classList.add(...t),e.addEventListener("animationend",n),e.addEventListener("animationcancel",n)},[]),e.useEffect(()=>{const e=f.current,t=()=>{e.removeEventListener("animationend",t),r?d(e,p,l):p()};m||(u?t():(h.current=1,e.className+=` ${v}`,e.addEventListener("animationend",t)))},[m]),o.default.createElement(o.default.Fragment,null,i)}}function p(e,t){return null!=e?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}const f=new Map;let m=[];const g=new Set,y=e=>g.forEach(t=>t(e)),v=()=>f.size>0;function h(e,t){var n;if(t)return!(null==(n=f.get(t))||!n.isToastActive(e));let o=!1;return f.forEach(t=>{t.isToastActive(e)&&(o=!0)}),o}function T(e,t){c(e)&&(v()||m.push({content:e,options:t}),f.forEach(n=>{n.buildToast(e,t)}))}function E(e,t){f.forEach(n=>{null!=t&&null!=t&&t.containerId?(null==t?void 0:t.containerId)===n.id&&n.toggle(e,null==t?void 0:t.id):n.toggle(e,null==t?void 0:t.id)})}function b(t){const{subscribe:n,getSnapshot:o,setProps:a}=e.useRef(function(t){const n=t.containerId||1;return{subscribe(o){const a=function(t,n,o){let a=1,d=0,u=[],f=[],m=[],g=n;const y=new Map,v=new Set,h=()=>{m=Array.from(y.values()),v.forEach(e=>e())},T=e=>{f=null==e?[]:f.filter(t=>t!==e),h()},E=t=>{const{toastId:n,onOpen:a,updateId:s,children:r}=t.props,i=null==s;t.staleId&&y.delete(t.staleId),y.set(n,t),f=[...f,t.props.toastId].filter(e=>e!==t.staleId),h(),o(p(t,i?"added":"updated")),i&&l(a)&&a(e.isValidElement(r)&&r.props)};return{id:t,props:g,observe:e=>(v.add(e),()=>v.delete(e)),toggle:(e,t)=>{y.forEach(n=>{null!=t&&t!==n.props.toastId||l(n.toggle)&&n.toggle(e)})},removeToast:T,toasts:y,clearQueue:()=>{d-=u.length,u=[]},buildToast:(n,f)=>{if((e=>{let{containerId:n,toastId:o,updateId:a}=e;const s=n?n!==t:1!==t,r=y.has(o)&&null==a;return s||r})(f))return;const{toastId:m,updateId:v,data:b,staleId:I,delay:_}=f,C=()=>{T(m)},L=null==v;L&&d++;const N={...g,style:g.toastStyle,key:a++,...Object.fromEntries(Object.entries(f).filter(e=>{let[t,n]=e;return null!=n})),toastId:m,updateId:v,data:b,closeToast:C,isIn:!1,className:i(f.className||g.toastClassName),bodyClassName:i(f.bodyClassName||g.bodyClassName),progressClassName:i(f.progressClassName||g.progressClassName),autoClose:!f.isLoading&&(x=f.autoClose,$=g.autoClose,!1===x||s(x)&&x>0?x:$),deleteToast(){const t=y.get(m),{onClose:n,children:a}=t.props;l(n)&&n(e.isValidElement(a)&&a.props),o(p(t,"removed")),y.delete(m),d--,d<0&&(d=0),u.length>0?E(u.shift()):h()}};var x,$;N.closeButton=g.closeButton,!1===f.closeButton||c(f.closeButton)?N.closeButton=f.closeButton:!0===f.closeButton&&(N.closeButton=!c(g.closeButton)||g.closeButton);let w=n;e.isValidElement(n)&&!r(n.type)?w=e.cloneElement(n,{closeToast:C,toastProps:N,data:b}):l(n)&&(w=n({closeToast:C,toastProps:N,data:b}));const k={content:w,props:N,staleId:I};g.limit&&g.limit>0&&d>g.limit&&L?u.push(k):s(_)?setTimeout(()=>{E(k)},_):E(k)},setProps(e){g=e},setToggle:(e,t)=>{y.get(e).toggle=t},isToastActive:e=>f.some(t=>t===e),getSnapshot:()=>g.newestOnTop?m.reverse():m}}(n,t,y);f.set(n,a);const d=a.observe(o);return m.forEach(e=>T(e.content,e.options)),m=[],()=>{d(),f.delete(n)}},setProps(e){var t;null==(t=f.get(n))||t.setProps(e)},getSnapshot(){var e;return null==(e=f.get(n))?void 0:e.getSnapshot()}}}(t)).current;a(t);const d=e.useSyncExternalStore(n,o,o);return{getToastToRender:function(e){if(!d)return[];const t=new Map;return d.forEach(e=>{const{position:n}=e.props;t.has(n)||t.set(n,[]),t.get(n).push(e)}),Array.from(t,t=>e(t[0],t[1]))},isToastActive:h,count:null==d?void 0:d.length}}function I(t){const[n,o]=e.useState(!1),[a,s]=e.useState(!1),r=e.useRef(null),l=e.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:i,pauseOnHover:c,closeToast:d,onClick:u,closeOnClick:p}=t;var m,g;function y(){o(!0)}function v(){o(!1)}function h(e){const o=r.current;l.canDrag&&o&&(l.didMove=!0,n&&v(),l.delta="x"===t.draggableDirection?e.clientX-l.start:e.clientY-l.start,l.start!==e.clientX&&(l.canCloseOnClick=!1),o.style.transform=`translate3d(${"x"===t.draggableDirection?`${l.delta}px, var(--y)`:`0, calc(${l.delta}px + var(--y))`},0)`,o.style.opacity=""+(1-Math.abs(l.delta/l.removalDistance)))}function T(){document.removeEventListener("pointermove",h),document.removeEventListener("pointerup",T);const e=r.current;if(l.canDrag&&l.didMove&&e){if(l.canDrag=!1,Math.abs(l.delta)>l.removalDistance)return s(!0),t.closeToast(),void t.collapseAll();e.style.transition="transform 0.2s, opacity 0.2s",e.style.removeProperty("transform"),e.style.removeProperty("opacity")}}null==(g=f.get((m={id:t.toastId,containerId:t.containerId,fn:o}).containerId||1))||g.setToggle(m.id,m.fn),e.useEffect(()=>{if(t.pauseOnFocusLoss)return document.hasFocus()||v(),window.addEventListener("focus",y),window.addEventListener("blur",v),()=>{window.removeEventListener("focus",y),window.removeEventListener("blur",v)}},[t.pauseOnFocusLoss]);const E={onPointerDown:function(e){if(!0===t.draggable||t.draggable===e.pointerType){l.didMove=!1,document.addEventListener("pointermove",h),document.addEventListener("pointerup",T);const n=r.current;l.canCloseOnClick=!0,l.canDrag=!0,n.style.transition="none","x"===t.draggableDirection?(l.start=e.clientX,l.removalDistance=n.offsetWidth*(t.draggablePercent/100)):(l.start=e.clientY,l.removalDistance=n.offsetHeight*(80===t.draggablePercent?1.5*t.draggablePercent:t.draggablePercent)/100)}},onPointerUp:function(e){const{top:n,bottom:o,left:a,right:s}=r.current.getBoundingClientRect();"touchend"!==e.nativeEvent.type&&t.pauseOnHover&&e.clientX>=a&&e.clientX<=s&&e.clientY>=n&&e.clientY<=o?v():y()}};return i&&c&&(E.onMouseEnter=v,t.stacked||(E.onMouseLeave=y)),p&&(E.onClick=e=>{u&&u(e),l.canCloseOnClick&&d()}),{playToast:y,pauseToast:v,isRunning:n,preventExitTransition:a,toastRef:r,eventHandlers:E}}function _(e){let{delay:t,isRunning:n,closeToast:s,type:r="default",hide:i,className:c,style:d,controlledProgress:u,progress:p,rtl:f,isIn:m,theme:g}=e;const y=i||u&&0===p,v={...d,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused"};u&&(v.transform=`scaleX(${p})`);const h=a.default("Toastify__progress-bar",u?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${g}`,`Toastify__progress-bar--${r}`,{"Toastify__progress-bar--rtl":f}),T=l(c)?c({rtl:f,type:r,defaultClassName:h}):a.default(h,c),E={[u&&p>=1?"onTransitionEnd":"onAnimationEnd"]:u&&p<1?null:()=>{m&&s()}};return o.default.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":y},o.default.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${g} Toastify__progress-bar--${r}`}),o.default.createElement("div",{role:"progressbar","aria-hidden":y?"true":"false","aria-label":"notification timer",className:T,style:v,...E}))}let C=1;const L=()=>""+C++;function N(e){return e&&(r(e.toastId)||s(e.toastId))?e.toastId:L()}function x(e,t){return T(e,t),t.toastId}function $(e,t){return{...t,type:t&&t.type||e,toastId:N(t)}}function w(e){return(t,n)=>x(t,$(e,n))}function k(e,t){return x(e,$("default",t))}k.loading=(e,t)=>x(e,$("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),k.promise=function(e,t,n){let o,{pending:a,error:s,success:i}=t;a&&(o=r(a)?k.loading(a,n):k.loading(a.render,{...n,...a}));const c={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},d=(e,t,a)=>{if(null==t)return void k.dismiss(o);const s={type:e,...c,...n,data:a},l=r(t)?{render:t}:t;return o?k.update(o,{...s,...l}):k(l.render,{...s,...l}),a},u=l(e)?e():e;return u.then(e=>d("success",i,e)).catch(e=>d("error",s,e)),u},k.success=w("success"),k.info=w("info"),k.error=w("error"),k.warning=w("warning"),k.warn=k.warning,k.dark=(e,t)=>x(e,$("default",{theme:"dark",...t})),k.dismiss=function(e){!function(e){var t;if(v()){if(null==e||r(t=e)||s(t))f.forEach(t=>{t.removeToast(e)});else if(e&&("containerId"in e||"id"in e)){var n;(null==(n=f.get(e.containerId))?void 0:n.removeToast(e.id))||f.forEach(t=>{t.removeToast(e.id)})}}else m=m.filter(t=>null!=e&&t.options.toastId!==e)}(e)},k.clearWaitingQueue=function(e){void 0===e&&(e={}),f.forEach(t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()})},k.isActive=h,k.update=function(e,t){void 0===t&&(t={});const n=((e,t)=>{var n;let{containerId:o}=t;return null==(n=f.get(o||1))?void 0:n.toasts.get(e)})(e,t);if(n){const{props:o,content:a}=n,s={delay:100,...o,...t,toastId:t.toastId||e,updateId:L()};s.toastId!==e&&(s.staleId=e);const r=s.render||a;delete s.render,x(r,s)}},k.done=e=>{k.update(e,{progress:1})},k.onChange=function(e){return g.add(e),()=>{g.delete(e)}},k.play=e=>E(!0,e),k.pause=e=>E(!1,e);const P="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,M=e=>{let{theme:t,type:n,isLoading:a,...s}=e;return o.default.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:"colored"===t?"currentColor":`var(--toastify-icon-color-${n})`,...s})},A={info:function(e){return o.default.createElement(M,{...e},o.default.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return o.default.createElement(M,{...e},o.default.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return o.default.createElement(M,{...e},o.default.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return o.default.createElement(M,{...e},o.default.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return o.default.createElement("div",{className:"Toastify__spinner"})}},B=t=>{const{isRunning:n,preventExitTransition:s,toastRef:r,eventHandlers:i,playToast:c}=I(t),{closeButton:d,children:u,autoClose:p,onClick:f,type:m,hideProgressBar:g,closeToast:y,transition:v,position:h,className:T,style:E,bodyClassName:b,bodyStyle:C,progressClassName:L,progressStyle:N,updateId:x,role:$,progress:w,rtl:k,toastId:P,deleteToast:M,isIn:B,isLoading:O,closeOnClick:D,theme:R}=t,S=a.default("Toastify__toast",`Toastify__toast-theme--${R}`,`Toastify__toast--${m}`,{"Toastify__toast--rtl":k},{"Toastify__toast--close-on-click":D}),z=l(T)?T({rtl:k,position:h,type:m,defaultClassName:S}):a.default(S,T),H=function(t){let{theme:n,type:o,isLoading:a,icon:s}=t,r=null;const i={theme:n,type:o,isLoading:a};return!1===s||(l(s)?r=s(i):e.isValidElement(s)?r=e.cloneElement(s,i):a?r=A.spinner():(e=>e in A)(o)&&(r=A[o](i))),r}(t),F=!!w||!p,V={closeToast:y,type:m,theme:R};let X=null;return!1===d||(X=l(d)?d(V):e.isValidElement(d)?e.cloneElement(d,V):function(e){let{closeToast:t,theme:n,ariaLabel:a="close"}=e;return o.default.createElement("button",{className:`Toastify__close-button Toastify__close-button--${n}`,type:"button",onClick:e=>{e.stopPropagation(),t(e)},"aria-label":a},o.default.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},o.default.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}(V)),o.default.createElement(v,{isIn:B,done:M,position:h,preventExitTransition:s,nodeRef:r,playToast:c},o.default.createElement("div",{id:P,onClick:f,"data-in":B,className:z,...i,style:E,ref:r},o.default.createElement("div",{...B&&{role:$},className:l(b)?b({type:m}):a.default("Toastify__toast-body",b),style:C},null!=H&&o.default.createElement("div",{className:a.default("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!O})},H),o.default.createElement("div",null,u)),X,o.default.createElement(_,{...x&&!F?{key:`pb-${x}`}:{},rtl:k,theme:R,delay:p,isRunning:n,isIn:B,closeToast:y,hide:g,type:m,style:N,className:L,controlledProgress:F,progress:w||0})))},O=function(e,t){return void 0===t&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},D=u(O("bounce",!0)),R=u(O("slide",!0)),S=u(O("zoom")),z=u(O("flip")),H={position:"top-right",transition:D,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};exports.Bounce=D,exports.Flip=z,exports.Icons=A,exports.Slide=R,exports.ToastContainer=function(t){let n={...H,...t};const s=t.stacked,[r,c]=e.useState(!0),d=e.useRef(null),{getToastToRender:u,isToastActive:p,count:f}=b(n),{className:m,style:g,rtl:y,containerId:v}=n;function h(e){const t=a.default("Toastify__toast-container",`Toastify__toast-container--${e}`,{"Toastify__toast-container--rtl":y});return l(m)?m({position:e,rtl:y,defaultClassName:t}):a.default(t,i(m))}function T(){s&&(c(!0),k.play())}return P(()=>{if(s){var e;const t=d.current.querySelectorAll('[data-in="true"]'),o=12,a=null==(e=n.position)?void 0:e.includes("top");let s=0,l=0;Array.from(t).reverse().forEach((e,t)=>{const n=e;n.classList.add("Toastify__toast--stacked"),t>0&&(n.dataset.collapsed=`${r}`),n.dataset.pos||(n.dataset.pos=a?"top":"bot");const i=s*(r?.2:1)+(r?0:o*t);n.style.setProperty("--y",`${a?i:-1*i}px`),n.style.setProperty("--g",`${o}`),n.style.setProperty("--s",""+(1-(r?l:0))),s+=n.offsetHeight,l+=.025})}},[r,f,s]),o.default.createElement("div",{ref:d,className:"Toastify",id:v,onMouseEnter:()=>{s&&(c(!1),k.pause())},onMouseLeave:T},u((e,t)=>{const n=t.length?{...g}:{...g,pointerEvents:"none"};return o.default.createElement("div",{className:h(e),style:n,key:`container-${e}`},t.map(e=>{let{content:t,props:n}=e;return o.default.createElement(B,{...n,stacked:s,collapseAll:T,isIn:p(n.toastId,n.containerId),style:n.style,key:`toast-${n.key}`},t)}))}))},exports.Zoom=S,exports.collapseToast=d,exports.cssTransition=u,exports.toast=k,exports.useToast=I,exports.useToastContainer=b; | ||
//# sourceMappingURL=react-toastify.js.map |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("clsx")):"function"==typeof define&&define.amd?define(["exports","react","clsx"],t):t((e||self).reactToastify={},e.react,e.clsx)}(this,function(e,t,n){function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=/*#__PURE__*/o(t),s=/*#__PURE__*/o(n);const r=e=>"number"==typeof e&&!isNaN(e),l=e=>"string"==typeof e,i=e=>"function"==typeof e,c=e=>l(e)||i(e)?e:null,d=e=>t.isValidElement(e)||l(e)||i(e)||r(e);function u(e,t,n){void 0===n&&(n=300);const{scrollHeight:o,style:a}=e;requestAnimationFrame(()=>{a.minHeight="initial",a.height=o+"px",a.transition=`all ${n}ms`,requestAnimationFrame(()=>{a.height="0",a.padding="0",a.margin="0",setTimeout(t,n)})})}function f(e){let{enter:n,exit:o,appendPosition:s=!1,collapse:r=!0,collapseDuration:l=300}=e;return function(e){let{children:i,position:c,preventExitTransition:d,done:f,nodeRef:p,isIn:m,playToast:g}=e;const y=s?`${n}--${c}`:n,v=s?`${o}--${c}`:o,h=t.useRef(0);return t.useLayoutEffect(()=>{const e=p.current,t=y.split(" "),n=o=>{o.target===p.current&&(g(),e.removeEventListener("animationend",n),e.removeEventListener("animationcancel",n),0===h.current&&"animationcancel"!==o.type&&e.classList.remove(...t))};e.classList.add(...t),e.addEventListener("animationend",n),e.addEventListener("animationcancel",n)},[]),t.useEffect(()=>{const e=p.current,t=()=>{e.removeEventListener("animationend",t),r?u(e,f,l):f()};m||(d?t():(h.current=1,e.className+=` ${v}`,e.addEventListener("animationend",t)))},[m]),a.default.createElement(a.default.Fragment,null,i)}}function p(e,t){return null!=e?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}const m=new Map;let g=[];const y=new Set,v=e=>y.forEach(t=>t(e)),h=()=>m.size>0;function T(e,t){var n;if(t)return!(null==(n=m.get(t))||!n.isToastActive(e));let o=!1;return m.forEach(t=>{t.isToastActive(e)&&(o=!0)}),o}function E(e,t){d(e)&&(h()||g.push({content:e,options:t}),m.forEach(n=>{n.buildToast(e,t)}))}function b(e,t){m.forEach(n=>{null!=t&&null!=t&&t.containerId?(null==t?void 0:t.containerId)===n.id&&n.toggle(e,null==t?void 0:t.id):n.toggle(e,null==t?void 0:t.id)})}function I(e){const{subscribe:n,getSnapshot:o,setProps:a}=t.useRef(function(e){const n=e.containerId||1;return{subscribe(o){const a=function(e,n,o){let a=1,s=0,u=[],f=[],m=[],g=n;const y=new Map,v=new Set,h=()=>{m=Array.from(y.values()),v.forEach(e=>e())},T=e=>{f=null==e?[]:f.filter(t=>t!==e),h()},E=e=>{const{toastId:n,onOpen:a,updateId:s,children:r}=e.props,l=null==s;e.staleId&&y.delete(e.staleId),y.set(n,e),f=[...f,e.props.toastId].filter(t=>t!==e.staleId),h(),o(p(e,l?"added":"updated")),l&&i(a)&&a(t.isValidElement(r)&&r.props)};return{id:e,props:g,observe:e=>(v.add(e),()=>v.delete(e)),toggle:(e,t)=>{y.forEach(n=>{null!=t&&t!==n.props.toastId||i(n.toggle)&&n.toggle(e)})},removeToast:T,toasts:y,clearQueue:()=>{s-=u.length,u=[]},buildToast:(n,f)=>{if((t=>{let{containerId:n,toastId:o,updateId:a}=t;const s=n?n!==e:1!==e,r=y.has(o)&&null==a;return s||r})(f))return;const{toastId:m,updateId:v,data:b,staleId:I,delay:_}=f,C=()=>{T(m)},L=null==v;L&&s++;const N={...g,style:g.toastStyle,key:a++,...Object.fromEntries(Object.entries(f).filter(e=>{let[t,n]=e;return null!=n})),toastId:m,updateId:v,data:b,closeToast:C,isIn:!1,className:c(f.className||g.toastClassName),bodyClassName:c(f.bodyClassName||g.bodyClassName),progressClassName:c(f.progressClassName||g.progressClassName),autoClose:!f.isLoading&&($=f.autoClose,k=g.autoClose,!1===$||r($)&&$>0?$:k),deleteToast(){const e=y.get(m),{onClose:n,children:a}=e.props;i(n)&&n(t.isValidElement(a)&&a.props),o(p(e,"removed")),y.delete(m),s--,s<0&&(s=0),u.length>0?E(u.shift()):h()}};var $,k;N.closeButton=g.closeButton,!1===f.closeButton||d(f.closeButton)?N.closeButton=f.closeButton:!0===f.closeButton&&(N.closeButton=!d(g.closeButton)||g.closeButton);let P=n;t.isValidElement(n)&&!l(n.type)?P=t.cloneElement(n,{closeToast:C,toastProps:N,data:b}):i(n)&&(P=n({closeToast:C,toastProps:N,data:b}));const w={content:P,props:N,staleId:I};g.limit&&g.limit>0&&s>g.limit&&L?u.push(w):r(_)?setTimeout(()=>{E(w)},_):E(w)},setProps(e){g=e},setToggle:(e,t)=>{y.get(e).toggle=t},isToastActive:e=>f.some(t=>t===e),getSnapshot:()=>g.newestOnTop?m.reverse():m}}(n,e,v);m.set(n,a);const s=a.observe(o);return g.forEach(e=>E(e.content,e.options)),g=[],()=>{s(),m.delete(n)}},setProps(e){var t;null==(t=m.get(n))||t.setProps(e)},getSnapshot(){var e;return null==(e=m.get(n))?void 0:e.getSnapshot()}}}(e)).current;a(e);const s=t.useSyncExternalStore(n,o,o);return{getToastToRender:function(e){if(!s)return[];const t=new Map;return s.forEach(e=>{const{position:n}=e.props;t.has(n)||t.set(n,[]),t.get(n).push(e)}),Array.from(t,t=>e(t[0],t[1]))},isToastActive:T,count:null==s?void 0:s.length}}function _(e){const[n,o]=t.useState(!1),[a,s]=t.useState(!1),r=t.useRef(null),l=t.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:i,pauseOnHover:c,closeToast:d,onClick:u,closeOnClick:f}=e;var p,g;function y(){o(!0)}function v(){o(!1)}function h(t){const o=r.current;l.canDrag&&o&&(l.didMove=!0,n&&v(),l.delta="x"===e.draggableDirection?t.clientX-l.start:t.clientY-l.start,l.start!==t.clientX&&(l.canCloseOnClick=!1),o.style.transform=`translate3d(${"x"===e.draggableDirection?`${l.delta}px, var(--y)`:`0, calc(${l.delta}px + var(--y))`},0)`,o.style.opacity=""+(1-Math.abs(l.delta/l.removalDistance)))}function T(){document.removeEventListener("pointermove",h),document.removeEventListener("pointerup",T);const t=r.current;if(l.canDrag&&l.didMove&&t){if(l.canDrag=!1,Math.abs(l.delta)>l.removalDistance)return s(!0),e.closeToast(),void e.collapseAll();t.style.transition="transform 0.2s, opacity 0.2s",t.style.removeProperty("transform"),t.style.removeProperty("opacity")}}null==(g=m.get((p={id:e.toastId,containerId:e.containerId,fn:o}).containerId||1))||g.setToggle(p.id,p.fn),t.useEffect(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||v(),window.addEventListener("focus",y),window.addEventListener("blur",v),()=>{window.removeEventListener("focus",y),window.removeEventListener("blur",v)}},[e.pauseOnFocusLoss]);const E={onPointerDown:function(t){if(!0===e.draggable||e.draggable===t.pointerType){l.didMove=!1,document.addEventListener("pointermove",h),document.addEventListener("pointerup",T);const n=r.current;l.canCloseOnClick=!0,l.canDrag=!0,n.style.transition="none","x"===e.draggableDirection?(l.start=t.clientX,l.removalDistance=n.offsetWidth*(e.draggablePercent/100)):(l.start=t.clientY,l.removalDistance=n.offsetHeight*(80===e.draggablePercent?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(t){const{top:n,bottom:o,left:a,right:s}=r.current.getBoundingClientRect();"touchend"!==t.nativeEvent.type&&e.pauseOnHover&&t.clientX>=a&&t.clientX<=s&&t.clientY>=n&&t.clientY<=o?v():y()}};return i&&c&&(E.onMouseEnter=v,e.stacked||(E.onMouseLeave=y)),f&&(E.onClick=e=>{u&&u(e),l.canCloseOnClick&&d()}),{playToast:y,pauseToast:v,isRunning:n,preventExitTransition:a,toastRef:r,eventHandlers:E}}function C(e){let{delay:t,isRunning:n,closeToast:o,type:r="default",hide:l,className:c,style:d,controlledProgress:u,progress:f,rtl:p,isIn:m,theme:g}=e;const y=l||u&&0===f,v={...d,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused"};u&&(v.transform=`scaleX(${f})`);const h=s.default("Toastify__progress-bar",u?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${g}`,`Toastify__progress-bar--${r}`,{"Toastify__progress-bar--rtl":p}),T=i(c)?c({rtl:p,type:r,defaultClassName:h}):s.default(h,c),E={[u&&f>=1?"onTransitionEnd":"onAnimationEnd"]:u&&f<1?null:()=>{m&&o()}};return a.default.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":y},a.default.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${g} Toastify__progress-bar--${r}`}),a.default.createElement("div",{role:"progressbar","aria-hidden":y?"true":"false","aria-label":"notification timer",className:T,style:v,...E}))}let L=1;const N=()=>""+L++;function $(e){return e&&(l(e.toastId)||r(e.toastId))?e.toastId:N()}function k(e,t){return E(e,t),t.toastId}function P(e,t){return{...t,type:t&&t.type||e,toastId:$(t)}}function w(e){return(t,n)=>k(t,P(e,n))}function x(e,t){return k(e,P("default",t))}x.loading=(e,t)=>k(e,P("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),x.promise=function(e,t,n){let o,{pending:a,error:s,success:r}=t;a&&(o=l(a)?x.loading(a,n):x.loading(a.render,{...n,...a}));const c={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},d=(e,t,a)=>{if(null==t)return void x.dismiss(o);const s={type:e,...c,...n,data:a},r=l(t)?{render:t}:t;return o?x.update(o,{...s,...r}):x(r.render,{...s,...r}),a},u=i(e)?e():e;return u.then(e=>d("success",r,e)).catch(e=>d("error",s,e)),u},x.success=w("success"),x.info=w("info"),x.error=w("error"),x.warning=w("warning"),x.warn=x.warning,x.dark=(e,t)=>k(e,P("default",{theme:"dark",...t})),x.dismiss=function(e){!function(e){var t;if(h()){if(null==e||l(t=e)||r(t))m.forEach(t=>{t.removeToast(e)});else if(e&&("containerId"in e||"id"in e)){var n;(null==(n=m.get(e.containerId))?void 0:n.removeToast(e.id))||m.forEach(t=>{t.removeToast(e.id)})}}else g=g.filter(t=>null!=e&&t.options.toastId!==e)}(e)},x.clearWaitingQueue=function(e){void 0===e&&(e={}),m.forEach(t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()})},x.isActive=T,x.update=function(e,t){void 0===t&&(t={});const n=((e,t)=>{var n;let{containerId:o}=t;return null==(n=m.get(o||1))?void 0:n.toasts.get(e)})(e,t);if(n){const{props:o,content:a}=n,s={delay:100,...o,...t,toastId:t.toastId||e,updateId:N()};s.toastId!==e&&(s.staleId=e);const r=s.render||a;delete s.render,k(r,s)}},x.done=e=>{x.update(e,{progress:1})},x.onChange=function(e){return y.add(e),()=>{y.delete(e)}},x.play=e=>b(!0,e),x.pause=e=>b(!1,e);const M=e=>{let{theme:t,type:n,isLoading:o,...s}=e;return a.default.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:"colored"===t?"currentColor":`var(--toastify-icon-color-${n})`,...s})},A={info:function(e){return a.default.createElement(M,{...e},a.default.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return a.default.createElement(M,{...e},a.default.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return a.default.createElement(M,{...e},a.default.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return a.default.createElement(M,{...e},a.default.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return a.default.createElement("div",{className:"Toastify__spinner"})}},B=e=>{const{isRunning:n,preventExitTransition:o,toastRef:r,eventHandlers:l,playToast:c}=_(e),{closeButton:d,children:u,autoClose:f,onClick:p,type:m,hideProgressBar:g,closeToast:y,transition:v,position:h,className:T,style:E,bodyClassName:b,bodyStyle:I,progressClassName:L,progressStyle:N,updateId:$,role:k,progress:P,rtl:w,toastId:x,deleteToast:M,isIn:B,isLoading:O,closeOnClick:D,theme:R}=e,S=s.default("Toastify__toast",`Toastify__toast-theme--${R}`,`Toastify__toast--${m}`,{"Toastify__toast--rtl":w},{"Toastify__toast--close-on-click":D}),z=i(T)?T({rtl:w,position:h,type:m,defaultClassName:S}):s.default(S,T),H=function(e){let{theme:n,type:o,isLoading:a,icon:s}=e,r=null;const l={theme:n,type:o,isLoading:a};return!1===s||(i(s)?r=s(l):t.isValidElement(s)?r=t.cloneElement(s,l):a?r=A.spinner():(e=>e in A)(o)&&(r=A[o](l))),r}(e),F=!!P||!f,V={closeToast:y,type:m,theme:R};let X=null;return!1===d||(X=i(d)?d(V):t.isValidElement(d)?t.cloneElement(d,V):function(e){let{closeToast:t,theme:n,ariaLabel:o="close"}=e;return a.default.createElement("button",{className:`Toastify__close-button Toastify__close-button--${n}`,type:"button",onClick:e=>{e.stopPropagation(),t(e)},"aria-label":o},a.default.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},a.default.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}(V)),a.default.createElement(v,{isIn:B,done:M,position:h,preventExitTransition:o,nodeRef:r,playToast:c},a.default.createElement("div",{id:x,onClick:p,"data-in":B,className:z,...l,style:E,ref:r},a.default.createElement("div",{...B&&{role:k},className:i(b)?b({type:m}):s.default("Toastify__toast-body",b),style:I},null!=H&&a.default.createElement("div",{className:s.default("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!O})},H),a.default.createElement("div",null,u)),X,a.default.createElement(C,{...$&&!F?{key:`pb-${$}`}:{},rtl:w,theme:R,delay:f,isRunning:n,isIn:B,closeToast:y,hide:g,type:m,style:N,className:L,controlledProgress:F,progress:P||0})))},O=function(e,t){return void 0===t&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},D=f(O("bounce",!0)),R=f(O("slide",!0)),S=f(O("zoom")),z=f(O("flip")),H={position:"top-right",transition:D,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};e.Bounce=D,e.Flip=z,e.Icons=A,e.Slide=R,e.ToastContainer=function(e){let n={...H,...e};const o=e.stacked,[r,l]=t.useState(!0),d=t.useRef(null),{getToastToRender:u,isToastActive:f,count:p}=I(n),{className:m,style:g,rtl:y,containerId:v}=n;function h(e){const t=s.default("Toastify__toast-container",`Toastify__toast-container--${e}`,{"Toastify__toast-container--rtl":y});return i(m)?m({position:e,rtl:y,defaultClassName:t}):s.default(t,c(m))}function T(){o&&(l(!0),x.play())}return t.useLayoutEffect(()=>{if(o){var e;const t=d.current.querySelectorAll('[data-in="true"]'),o=12,a=null==(e=n.position)?void 0:e.includes("top");let s=0,l=0;Array.from(t).reverse().forEach((e,t)=>{const n=e;n.classList.add("Toastify__toast--stacked"),t>0&&(n.dataset.collapsed=`${r}`),n.dataset.pos||(n.dataset.pos=a?"top":"bot");const i=s*(r?.2:1)+(r?0:o*t);n.style.setProperty("--y",`${a?i:-1*i}px`),n.style.setProperty("--g",`${o}`),n.style.setProperty("--s",""+(1-(r?l:0))),s+=n.offsetHeight,l+=.025})}},[r,p,o]),a.default.createElement("div",{ref:d,className:"Toastify",id:v,onMouseEnter:()=>{o&&(l(!1),x.pause())},onMouseLeave:T},u((e,t)=>{const n=t.length?{...g}:{...g,pointerEvents:"none"};return a.default.createElement("div",{className:h(e),style:n,key:`container-${e}`},t.map(e=>{let{content:t,props:n}=e;return a.default.createElement(B,{...n,stacked:o,collapseAll:T,isIn:f(n.toastId,n.containerId),style:n.style,key:`toast-${n.key}`},t)}))}))},e.Zoom=S,e.collapseToast=u,e.cssTransition=f,e.toast=x,e.useToast=_,e.useToastContainer=I}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("clsx")):"function"==typeof define&&define.amd?define(["exports","react","clsx"],t):t((e||self).reactToastify={},e.react,e.clsx)}(this,function(e,t,n){function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=/*#__PURE__*/o(t),s=/*#__PURE__*/o(n);const r=e=>"number"==typeof e&&!isNaN(e),l=e=>"string"==typeof e,i=e=>"function"==typeof e,c=e=>l(e)||i(e)?e:null,d=e=>t.isValidElement(e)||l(e)||i(e)||r(e);function u(e,t,n){void 0===n&&(n=300);const{scrollHeight:o,style:a}=e;requestAnimationFrame(()=>{a.minHeight="initial",a.height=o+"px",a.transition=`all ${n}ms`,requestAnimationFrame(()=>{a.height="0",a.padding="0",a.margin="0",setTimeout(t,n)})})}function f(e){let{enter:n,exit:o,appendPosition:s=!1,collapse:r=!0,collapseDuration:l=300}=e;return function(e){let{children:i,position:c,preventExitTransition:d,done:f,nodeRef:p,isIn:m,playToast:g}=e;const y=s?`${n}--${c}`:n,v=s?`${o}--${c}`:o,h=t.useRef(0);return t.useLayoutEffect(()=>{const e=p.current,t=y.split(" "),n=o=>{o.target===p.current&&(g(),e.removeEventListener("animationend",n),e.removeEventListener("animationcancel",n),0===h.current&&"animationcancel"!==o.type&&e.classList.remove(...t))};e.classList.add(...t),e.addEventListener("animationend",n),e.addEventListener("animationcancel",n)},[]),t.useEffect(()=>{const e=p.current,t=()=>{e.removeEventListener("animationend",t),r?u(e,f,l):f()};m||(d?t():(h.current=1,e.className+=` ${v}`,e.addEventListener("animationend",t)))},[m]),a.default.createElement(a.default.Fragment,null,i)}}function p(e,t){return null!=e?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}const m=new Map;let g=[];const y=new Set,v=e=>y.forEach(t=>t(e)),h=()=>m.size>0;function T(e,t){var n;if(t)return!(null==(n=m.get(t))||!n.isToastActive(e));let o=!1;return m.forEach(t=>{t.isToastActive(e)&&(o=!0)}),o}function E(e,t){d(e)&&(h()||g.push({content:e,options:t}),m.forEach(n=>{n.buildToast(e,t)}))}function b(e,t){m.forEach(n=>{null!=t&&null!=t&&t.containerId?(null==t?void 0:t.containerId)===n.id&&n.toggle(e,null==t?void 0:t.id):n.toggle(e,null==t?void 0:t.id)})}function I(e){const{subscribe:n,getSnapshot:o,setProps:a}=t.useRef(function(e){const n=e.containerId||1;return{subscribe(o){const a=function(e,n,o){let a=1,s=0,u=[],f=[],m=[],g=n;const y=new Map,v=new Set,h=()=>{m=Array.from(y.values()),v.forEach(e=>e())},T=e=>{f=null==e?[]:f.filter(t=>t!==e),h()},E=e=>{const{toastId:n,onOpen:a,updateId:s,children:r}=e.props,l=null==s;e.staleId&&y.delete(e.staleId),y.set(n,e),f=[...f,e.props.toastId].filter(t=>t!==e.staleId),h(),o(p(e,l?"added":"updated")),l&&i(a)&&a(t.isValidElement(r)&&r.props)};return{id:e,props:g,observe:e=>(v.add(e),()=>v.delete(e)),toggle:(e,t)=>{y.forEach(n=>{null!=t&&t!==n.props.toastId||i(n.toggle)&&n.toggle(e)})},removeToast:T,toasts:y,clearQueue:()=>{s-=u.length,u=[]},buildToast:(n,f)=>{if((t=>{let{containerId:n,toastId:o,updateId:a}=t;const s=n?n!==e:1!==e,r=y.has(o)&&null==a;return s||r})(f))return;const{toastId:m,updateId:v,data:b,staleId:I,delay:_}=f,C=()=>{T(m)},L=null==v;L&&s++;const N={...g,style:g.toastStyle,key:a++,...Object.fromEntries(Object.entries(f).filter(e=>{let[t,n]=e;return null!=n})),toastId:m,updateId:v,data:b,closeToast:C,isIn:!1,className:c(f.className||g.toastClassName),bodyClassName:c(f.bodyClassName||g.bodyClassName),progressClassName:c(f.progressClassName||g.progressClassName),autoClose:!f.isLoading&&($=f.autoClose,w=g.autoClose,!1===$||r($)&&$>0?$:w),deleteToast(){const e=y.get(m),{onClose:n,children:a}=e.props;i(n)&&n(t.isValidElement(a)&&a.props),o(p(e,"removed")),y.delete(m),s--,s<0&&(s=0),u.length>0?E(u.shift()):h()}};var $,w;N.closeButton=g.closeButton,!1===f.closeButton||d(f.closeButton)?N.closeButton=f.closeButton:!0===f.closeButton&&(N.closeButton=!d(g.closeButton)||g.closeButton);let k=n;t.isValidElement(n)&&!l(n.type)?k=t.cloneElement(n,{closeToast:C,toastProps:N,data:b}):i(n)&&(k=n({closeToast:C,toastProps:N,data:b}));const P={content:k,props:N,staleId:I};g.limit&&g.limit>0&&s>g.limit&&L?u.push(P):r(_)?setTimeout(()=>{E(P)},_):E(P)},setProps(e){g=e},setToggle:(e,t)=>{y.get(e).toggle=t},isToastActive:e=>f.some(t=>t===e),getSnapshot:()=>g.newestOnTop?m.reverse():m}}(n,e,v);m.set(n,a);const s=a.observe(o);return g.forEach(e=>E(e.content,e.options)),g=[],()=>{s(),m.delete(n)}},setProps(e){var t;null==(t=m.get(n))||t.setProps(e)},getSnapshot(){var e;return null==(e=m.get(n))?void 0:e.getSnapshot()}}}(e)).current;a(e);const s=t.useSyncExternalStore(n,o,o);return{getToastToRender:function(e){if(!s)return[];const t=new Map;return s.forEach(e=>{const{position:n}=e.props;t.has(n)||t.set(n,[]),t.get(n).push(e)}),Array.from(t,t=>e(t[0],t[1]))},isToastActive:T,count:null==s?void 0:s.length}}function _(e){const[n,o]=t.useState(!1),[a,s]=t.useState(!1),r=t.useRef(null),l=t.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:i,pauseOnHover:c,closeToast:d,onClick:u,closeOnClick:f}=e;var p,g;function y(){o(!0)}function v(){o(!1)}function h(t){const o=r.current;l.canDrag&&o&&(l.didMove=!0,n&&v(),l.delta="x"===e.draggableDirection?t.clientX-l.start:t.clientY-l.start,l.start!==t.clientX&&(l.canCloseOnClick=!1),o.style.transform=`translate3d(${"x"===e.draggableDirection?`${l.delta}px, var(--y)`:`0, calc(${l.delta}px + var(--y))`},0)`,o.style.opacity=""+(1-Math.abs(l.delta/l.removalDistance)))}function T(){document.removeEventListener("pointermove",h),document.removeEventListener("pointerup",T);const t=r.current;if(l.canDrag&&l.didMove&&t){if(l.canDrag=!1,Math.abs(l.delta)>l.removalDistance)return s(!0),e.closeToast(),void e.collapseAll();t.style.transition="transform 0.2s, opacity 0.2s",t.style.removeProperty("transform"),t.style.removeProperty("opacity")}}null==(g=m.get((p={id:e.toastId,containerId:e.containerId,fn:o}).containerId||1))||g.setToggle(p.id,p.fn),t.useEffect(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||v(),window.addEventListener("focus",y),window.addEventListener("blur",v),()=>{window.removeEventListener("focus",y),window.removeEventListener("blur",v)}},[e.pauseOnFocusLoss]);const E={onPointerDown:function(t){if(!0===e.draggable||e.draggable===t.pointerType){l.didMove=!1,document.addEventListener("pointermove",h),document.addEventListener("pointerup",T);const n=r.current;l.canCloseOnClick=!0,l.canDrag=!0,n.style.transition="none","x"===e.draggableDirection?(l.start=t.clientX,l.removalDistance=n.offsetWidth*(e.draggablePercent/100)):(l.start=t.clientY,l.removalDistance=n.offsetHeight*(80===e.draggablePercent?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(t){const{top:n,bottom:o,left:a,right:s}=r.current.getBoundingClientRect();"touchend"!==t.nativeEvent.type&&e.pauseOnHover&&t.clientX>=a&&t.clientX<=s&&t.clientY>=n&&t.clientY<=o?v():y()}};return i&&c&&(E.onMouseEnter=v,e.stacked||(E.onMouseLeave=y)),f&&(E.onClick=e=>{u&&u(e),l.canCloseOnClick&&d()}),{playToast:y,pauseToast:v,isRunning:n,preventExitTransition:a,toastRef:r,eventHandlers:E}}function C(e){let{delay:t,isRunning:n,closeToast:o,type:r="default",hide:l,className:c,style:d,controlledProgress:u,progress:f,rtl:p,isIn:m,theme:g}=e;const y=l||u&&0===f,v={...d,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused"};u&&(v.transform=`scaleX(${f})`);const h=s.default("Toastify__progress-bar",u?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${g}`,`Toastify__progress-bar--${r}`,{"Toastify__progress-bar--rtl":p}),T=i(c)?c({rtl:p,type:r,defaultClassName:h}):s.default(h,c),E={[u&&f>=1?"onTransitionEnd":"onAnimationEnd"]:u&&f<1?null:()=>{m&&o()}};return a.default.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":y},a.default.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${g} Toastify__progress-bar--${r}`}),a.default.createElement("div",{role:"progressbar","aria-hidden":y?"true":"false","aria-label":"notification timer",className:T,style:v,...E}))}let L=1;const N=()=>""+L++;function $(e){return e&&(l(e.toastId)||r(e.toastId))?e.toastId:N()}function w(e,t){return E(e,t),t.toastId}function k(e,t){return{...t,type:t&&t.type||e,toastId:$(t)}}function P(e){return(t,n)=>w(t,k(e,n))}function x(e,t){return w(e,k("default",t))}x.loading=(e,t)=>w(e,k("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),x.promise=function(e,t,n){let o,{pending:a,error:s,success:r}=t;a&&(o=l(a)?x.loading(a,n):x.loading(a.render,{...n,...a}));const c={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},d=(e,t,a)=>{if(null==t)return void x.dismiss(o);const s={type:e,...c,...n,data:a},r=l(t)?{render:t}:t;return o?x.update(o,{...s,...r}):x(r.render,{...s,...r}),a},u=i(e)?e():e;return u.then(e=>d("success",r,e)).catch(e=>d("error",s,e)),u},x.success=P("success"),x.info=P("info"),x.error=P("error"),x.warning=P("warning"),x.warn=x.warning,x.dark=(e,t)=>w(e,k("default",{theme:"dark",...t})),x.dismiss=function(e){!function(e){var t;if(h()){if(null==e||l(t=e)||r(t))m.forEach(t=>{t.removeToast(e)});else if(e&&("containerId"in e||"id"in e)){var n;(null==(n=m.get(e.containerId))?void 0:n.removeToast(e.id))||m.forEach(t=>{t.removeToast(e.id)})}}else g=g.filter(t=>null!=e&&t.options.toastId!==e)}(e)},x.clearWaitingQueue=function(e){void 0===e&&(e={}),m.forEach(t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()})},x.isActive=T,x.update=function(e,t){void 0===t&&(t={});const n=((e,t)=>{var n;let{containerId:o}=t;return null==(n=m.get(o||1))?void 0:n.toasts.get(e)})(e,t);if(n){const{props:o,content:a}=n,s={delay:100,...o,...t,toastId:t.toastId||e,updateId:N()};s.toastId!==e&&(s.staleId=e);const r=s.render||a;delete s.render,w(r,s)}},x.done=e=>{x.update(e,{progress:1})},x.onChange=function(e){return y.add(e),()=>{y.delete(e)}},x.play=e=>b(!0,e),x.pause=e=>b(!1,e);const M="undefined"!=typeof window?t.useLayoutEffect:t.useEffect,A=e=>{let{theme:t,type:n,isLoading:o,...s}=e;return a.default.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:"colored"===t?"currentColor":`var(--toastify-icon-color-${n})`,...s})},B={info:function(e){return a.default.createElement(A,{...e},a.default.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return a.default.createElement(A,{...e},a.default.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return a.default.createElement(A,{...e},a.default.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return a.default.createElement(A,{...e},a.default.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return a.default.createElement("div",{className:"Toastify__spinner"})}},O=e=>{const{isRunning:n,preventExitTransition:o,toastRef:r,eventHandlers:l,playToast:c}=_(e),{closeButton:d,children:u,autoClose:f,onClick:p,type:m,hideProgressBar:g,closeToast:y,transition:v,position:h,className:T,style:E,bodyClassName:b,bodyStyle:I,progressClassName:L,progressStyle:N,updateId:$,role:w,progress:k,rtl:P,toastId:x,deleteToast:M,isIn:A,isLoading:O,closeOnClick:D,theme:R}=e,S=s.default("Toastify__toast",`Toastify__toast-theme--${R}`,`Toastify__toast--${m}`,{"Toastify__toast--rtl":P},{"Toastify__toast--close-on-click":D}),z=i(T)?T({rtl:P,position:h,type:m,defaultClassName:S}):s.default(S,T),H=function(e){let{theme:n,type:o,isLoading:a,icon:s}=e,r=null;const l={theme:n,type:o,isLoading:a};return!1===s||(i(s)?r=s(l):t.isValidElement(s)?r=t.cloneElement(s,l):a?r=B.spinner():(e=>e in B)(o)&&(r=B[o](l))),r}(e),F=!!k||!f,V={closeToast:y,type:m,theme:R};let X=null;return!1===d||(X=i(d)?d(V):t.isValidElement(d)?t.cloneElement(d,V):function(e){let{closeToast:t,theme:n,ariaLabel:o="close"}=e;return a.default.createElement("button",{className:`Toastify__close-button Toastify__close-button--${n}`,type:"button",onClick:e=>{e.stopPropagation(),t(e)},"aria-label":o},a.default.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},a.default.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}(V)),a.default.createElement(v,{isIn:A,done:M,position:h,preventExitTransition:o,nodeRef:r,playToast:c},a.default.createElement("div",{id:x,onClick:p,"data-in":A,className:z,...l,style:E,ref:r},a.default.createElement("div",{...A&&{role:w},className:i(b)?b({type:m}):s.default("Toastify__toast-body",b),style:I},null!=H&&a.default.createElement("div",{className:s.default("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!O})},H),a.default.createElement("div",null,u)),X,a.default.createElement(C,{...$&&!F?{key:`pb-${$}`}:{},rtl:P,theme:R,delay:f,isRunning:n,isIn:A,closeToast:y,hide:g,type:m,style:N,className:L,controlledProgress:F,progress:k||0})))},D=function(e,t){return void 0===t&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},R=f(D("bounce",!0)),S=f(D("slide",!0)),z=f(D("zoom")),H=f(D("flip")),F={position:"top-right",transition:R,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};e.Bounce=R,e.Flip=H,e.Icons=B,e.Slide=S,e.ToastContainer=function(e){let n={...F,...e};const o=e.stacked,[r,l]=t.useState(!0),d=t.useRef(null),{getToastToRender:u,isToastActive:f,count:p}=I(n),{className:m,style:g,rtl:y,containerId:v}=n;function h(e){const t=s.default("Toastify__toast-container",`Toastify__toast-container--${e}`,{"Toastify__toast-container--rtl":y});return i(m)?m({position:e,rtl:y,defaultClassName:t}):s.default(t,c(m))}function T(){o&&(l(!0),x.play())}return M(()=>{if(o){var e;const t=d.current.querySelectorAll('[data-in="true"]'),o=12,a=null==(e=n.position)?void 0:e.includes("top");let s=0,l=0;Array.from(t).reverse().forEach((e,t)=>{const n=e;n.classList.add("Toastify__toast--stacked"),t>0&&(n.dataset.collapsed=`${r}`),n.dataset.pos||(n.dataset.pos=a?"top":"bot");const i=s*(r?.2:1)+(r?0:o*t);n.style.setProperty("--y",`${a?i:-1*i}px`),n.style.setProperty("--g",`${o}`),n.style.setProperty("--s",""+(1-(r?l:0))),s+=n.offsetHeight,l+=.025})}},[r,p,o]),a.default.createElement("div",{ref:d,className:"Toastify",id:v,onMouseEnter:()=>{o&&(l(!1),x.pause())},onMouseLeave:T},u((e,t)=>{const n=t.length?{...g}:{...g,pointerEvents:"none"};return a.default.createElement("div",{className:h(e),style:n,key:`container-${e}`},t.map(e=>{let{content:t,props:n}=e;return a.default.createElement(O,{...n,stacked:o,collapseAll:T,isIn:f(n.toastId,n.containerId),style:n.style,key:`toast-${n.key}`},t)}))}))},e.Zoom=z,e.collapseToast=u,e.cssTransition=f,e.toast=x,e.useToast=_,e.useToastContainer=I}); | ||
//# sourceMappingURL=react-toastify.umd.js.map |
{ | ||
"version": "10.0.1", | ||
"version": "10.0.2-debug", | ||
"license": "MIT", | ||
@@ -94,3 +94,3 @@ "typings": "dist/index.d.ts", | ||
"sass": "^1.69.7", | ||
"style2js": "^1.0.1", | ||
"style2js": "^1.0.3", | ||
"ts-jest": "^29.1.0", | ||
@@ -97,0 +97,0 @@ "tslib": "^2.5.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
406816
61
1986
3