@versini/sassysaint 8.24.7 → 8.24.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{AboutChangelog.BUqeJ2k-.js → AboutChangelog.DlLSjExD.js} +2 -2
- package/dist/chunks/AboutEntry.DNuypnSn.js +55 -0
- package/dist/chunks/{App.PPFbshfq.js → App.CU8DPgBK.js} +3258 -5084
- package/dist/chunks/{Chart.JdBXYRNk.js → Chart.CUrSaDT3.js} +2 -2
- package/dist/chunks/{ChatBubbleAssistant.BkpYlRoE.js → ChatBubbleAssistant.2TUzypYP.js} +3 -3
- package/dist/chunks/HistoryEntry.DQcqMjle.js +432 -0
- package/dist/chunks/{I3HPI4QX.ClLSUs8_.js → I3HPI4QX.DlQpQsgt.js} +1 -1
- package/dist/chunks/ProfileEntry.Iwbm1rap.js +57 -0
- package/dist/chunks/SettingsEntry.D9S_YV-z.js +969 -0
- package/dist/chunks/UsageEntry.BRpaSd7j.js +96 -0
- package/dist/chunks/index.B8EJY2WR.js +389 -0
- package/dist/chunks/{index.izWDheuH.js → index.BmP4cAmg.js} +3 -3
- package/dist/chunks/{index.BdkwBvzN.js → index.CRbaU3g8.js} +2591 -3715
- package/dist/chunks/{index.kEWQ679F.js → index.CRciMWyd.js} +654 -656
- package/dist/chunks/{index.BZVa__fH.js → index.CkC1cqoG.js} +1 -1
- package/dist/chunks/{index.Caz1Erk_.js → index.CxVK8gmr.js} +1789 -1675
- package/dist/chunks/{index.Dma3NBqH.js → index.D4ynJuQN.js} +1 -1
- package/dist/chunks/{useMarkdown.iTIG3u9x.js → useMarkdown.BP64kEQI.js} +1275 -1231
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/dist/style.css +1 -1
- package/package.json +3 -3
@@ -0,0 +1,96 @@
|
|
1
|
+
import { jsxs as c, jsx as e } from "react/jsx-runtime";
|
2
|
+
import { n as f, USAGE_TITLE as U, S as T, renderDataAsList as v, CARDS as n, L as E, j as M, C as m, isProbablyMobile as L, pluralize as i } from "./index.CxVK8gmr.js";
|
3
|
+
import { i as _, useUserChatStats as D, useChatsUsage as P, rr as z } from "./App.CU8DPgBK.js";
|
4
|
+
import { useState as O, Suspense as b, lazy as j } from "react";
|
5
|
+
const s = [0, 3, 6, 9], G = j(() => import(
|
6
|
+
/* webpackChunkName: "LazyChart" */
|
7
|
+
"./Chart.CUrSaDT3.js"
|
8
|
+
)), w = ({
|
9
|
+
open: S,
|
10
|
+
onOpenChange: I
|
11
|
+
}) => {
|
12
|
+
const { getAccessToken: d, user: u } = f(), p = _(), { data: t, isSuccess: A } = D({
|
13
|
+
user: u?.username,
|
14
|
+
getAccessToken: d
|
15
|
+
}), { data: r, isSuccess: g } = P({
|
16
|
+
user: u?.username,
|
17
|
+
getAccessToken: d
|
18
|
+
}), C = Math.floor((/* @__PURE__ */ new Date()).getMonth() / 3) * 3, [a, h] = O(C), x = (o) => {
|
19
|
+
o.preventDefault();
|
20
|
+
const l = (s.indexOf(a) + 1) % s.length;
|
21
|
+
h(s[l]);
|
22
|
+
}, k = (o) => {
|
23
|
+
o.preventDefault();
|
24
|
+
const l = (s.indexOf(a) - 1 + s.length) % s.length;
|
25
|
+
h(s[l]);
|
26
|
+
};
|
27
|
+
return /* @__PURE__ */ c(
|
28
|
+
z,
|
29
|
+
{
|
30
|
+
animation: !L(),
|
31
|
+
open: S,
|
32
|
+
onOpenChange: I,
|
33
|
+
title: U,
|
34
|
+
children: [
|
35
|
+
/* @__PURE__ */ e(
|
36
|
+
T,
|
37
|
+
{
|
38
|
+
header: n.MAIN_STATISTICS.TITLE,
|
39
|
+
className: "prose-dark dark:prose-lighter min-h-[170px]",
|
40
|
+
children: A ? v(
|
41
|
+
p,
|
42
|
+
{
|
43
|
+
[i(n.MAIN_STATISTICS.TOTAL, t.totalChats)]: t.totalChats,
|
44
|
+
[i(
|
45
|
+
n.MAIN_STATISTICS.TOTAL_PRIVATE,
|
46
|
+
t.privateChats
|
47
|
+
)]: t.privateChats,
|
48
|
+
[i(
|
49
|
+
n.MAIN_STATISTICS.TOTAL_DELETED,
|
50
|
+
t.deletedChats
|
51
|
+
)]: t.deletedChats
|
52
|
+
},
|
53
|
+
!0
|
54
|
+
) : null
|
55
|
+
}
|
56
|
+
),
|
57
|
+
/* @__PURE__ */ e(
|
58
|
+
T,
|
59
|
+
{
|
60
|
+
header: n.MAIN_STATISTICS.USAGE,
|
61
|
+
className: "prose-dark dark:prose-lighter mt-4 min-h-[535px]",
|
62
|
+
children: g && r && r.tokenUsage && r.tokenUsage.series && r.tokenUsage.series.length ? /* @__PURE__ */ c(b, { fallback: /* @__PURE__ */ e("div", {}), children: [
|
63
|
+
/* @__PURE__ */ e("div", { className: "pt-4" }),
|
64
|
+
/* @__PURE__ */ e(G, { tokenUsage: r.tokenUsage.series, page: a }),
|
65
|
+
/* @__PURE__ */ e(E, { className: "mt-2", alignHorizontal: "center", children: /* @__PURE__ */ c(M, { children: [
|
66
|
+
/* @__PURE__ */ e(
|
67
|
+
m,
|
68
|
+
{
|
69
|
+
onClick: k,
|
70
|
+
className: "mr-2",
|
71
|
+
size: "small",
|
72
|
+
noBorder: !0,
|
73
|
+
children: "Previous"
|
74
|
+
}
|
75
|
+
),
|
76
|
+
/* @__PURE__ */ e(
|
77
|
+
m,
|
78
|
+
{
|
79
|
+
onClick: x,
|
80
|
+
className: "mr-2",
|
81
|
+
size: "small",
|
82
|
+
noBorder: !0,
|
83
|
+
children: "Next"
|
84
|
+
}
|
85
|
+
)
|
86
|
+
] }) })
|
87
|
+
] }) : null
|
88
|
+
}
|
89
|
+
)
|
90
|
+
]
|
91
|
+
}
|
92
|
+
);
|
93
|
+
};
|
94
|
+
export {
|
95
|
+
w as Usage
|
96
|
+
};
|
@@ -0,0 +1,389 @@
|
|
1
|
+
import T, { useState as j, useRef as A, useLayoutEffect as st, useEffect as H, useSyncExternalStore as yt, isValidElement as U, cloneElement as tt } from "react";
|
2
|
+
import N from "clsx";
|
3
|
+
function ut(t) {
|
4
|
+
if (typeof document > "u") return;
|
5
|
+
let e = document.head || document.getElementsByTagName("head")[0], a = document.createElement("style");
|
6
|
+
a.type = "text/css", e.firstChild ? e.insertBefore(a, e.firstChild) : e.appendChild(a), a.styleSheet ? a.styleSheet.cssText = t : a.appendChild(document.createTextNode(t));
|
7
|
+
}
|
8
|
+
ut(`:root{--toastify-color-light: #fff;--toastify-color-dark: #121212;--toastify-color-info: #3498db;--toastify-color-success: #07bc0c;--toastify-color-warning: #f1c40f;--toastify-color-error: hsl(6, 78%, 57%);--toastify-color-transparent: rgba(255, 255, 255, .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-container-width: fit-content;--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-padding: 14px;--toastify-toast-min-height: 64px;--toastify-toast-max-height: 800px;--toastify-toast-bd-radius: 6px;--toastify-toast-shadow: 0px 4px 12px rgba(0, 0, 0, .1);--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(to right, #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: .2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translate3d(0,0,var(--toastify-z-index));position:fixed;width:var(--toastify-container-width);box-sizing:border-box;color:#fff;display:flex;flex-direction:column}.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:translate(-50%);align-items:center}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right);align-items:end}.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:translate(-50%);align-items:center}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right);align-items:end}.Toastify__toast{--y: 0;position:relative;touch-action:none;width:var(--toastify-toast-width);min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:var(--toastify-toast-padding);border-radius:var(--toastify-toast-bd-radius);box-shadow:var(--toastify-toast-shadow);max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);z-index:0;display:flex;flex:1 auto;align-items:center;word-break:break-word}@media only screen and (max-width: 480px){.Toastify__toast-container{width:100vw;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-left,.Toastify__toast-container--top-center,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translate(0)}.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translate(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:initial}.Toastify__toast{--toastify-toast-width: 100%;margin-bottom:0;border-radius:0}}.Toastify__toast-container[data-stacked=true]{width:var(--toastify-toast-width)}.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__toast-body,.Toastify__toast--stacked[data-collapsed] .Toastify__close-button{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-icon{margin-inline-end:10px;width:22px;flex-shrink:0;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--light,.Toastify__toast-theme--colored.Toastify__toast--default{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--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;position:absolute;top:6px;right:6px;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;z-index:1}.Toastify__toast--rtl .Toastify__close-button{left:6px;right:unset}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:hover,.Toastify__close-button:focus{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:1;opacity:.7;transform-origin:left}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:initial;transform-origin:right;border-bottom-left-radius:initial}.Toastify__progress-bar--wrp{position:absolute;overflow:hidden;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius);border-bottom-right-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--top-left,.Toastify__bounce-enter--bottom-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--top-right,.Toastify__bounce-enter--bottom-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--top-left,.Toastify__bounce-exit--bottom-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--top-right,.Toastify__bounce-exit--bottom-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--top-left,.Toastify__slide-enter--bottom-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--top-right,.Toastify__slide-enter--bottom-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--top-left,.Toastify__slide-exit--bottom-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-right,.Toastify__slide-exit--bottom-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(0)}to{transform:rotate(360deg)}}
|
9
|
+
`);
|
10
|
+
var M = (t) => typeof t == "number" && !isNaN(t), D = (t) => typeof t == "string", z = (t) => typeof t == "function", pt = (t) => D(t) || M(t), V = (t) => D(t) || z(t) ? t : null, mt = (t, e) => t === !1 || M(t) && t > 0 ? t : e, Z = (t) => U(t) || D(t) || z(t) || M(t);
|
11
|
+
function _t(t, e, a = 300) {
|
12
|
+
let { scrollHeight: r, style: n } = t;
|
13
|
+
requestAnimationFrame(() => {
|
14
|
+
n.minHeight = "initial", n.height = r + "px", n.transition = `all ${a}ms`, requestAnimationFrame(() => {
|
15
|
+
n.height = "0", n.padding = "0", n.margin = "0", setTimeout(e, a);
|
16
|
+
});
|
17
|
+
});
|
18
|
+
}
|
19
|
+
function F({ enter: t, exit: e, appendPosition: a = !1, collapse: r = !0, collapseDuration: n = 300 }) {
|
20
|
+
return function({ children: l, position: o, preventExitTransition: d, done: f, nodeRef: u, isIn: _, playToast: x }) {
|
21
|
+
let E = a ? `${t}--${o}` : t, k = a ? `${e}--${o}` : e, I = A(0);
|
22
|
+
return st(() => {
|
23
|
+
let b = u.current, m = E.split(" "), p = (s) => {
|
24
|
+
s.target === u.current && (x(), b.removeEventListener("animationend", p), b.removeEventListener("animationcancel", p), I.current === 0 && s.type !== "animationcancel" && b.classList.remove(...m));
|
25
|
+
};
|
26
|
+
b.classList.add(...m), b.addEventListener("animationend", p), b.addEventListener("animationcancel", p);
|
27
|
+
}, []), H(() => {
|
28
|
+
let b = u.current, m = () => {
|
29
|
+
b.removeEventListener("animationend", m), r ? _t(b, f, n) : f();
|
30
|
+
};
|
31
|
+
_ || (d ? m() : (I.current = 1, b.className += ` ${k}`, b.addEventListener("animationend", m)));
|
32
|
+
}, [_]), T.createElement(T.Fragment, null, l);
|
33
|
+
};
|
34
|
+
}
|
35
|
+
function ot(t, e) {
|
36
|
+
return { content: rt(t.content, t.props), containerId: t.props.containerId, id: t.props.toastId, theme: t.props.theme, type: t.props.type, data: t.props.data || {}, isLoading: t.props.isLoading, icon: t.props.icon, reason: t.removalReason, status: e };
|
37
|
+
}
|
38
|
+
function rt(t, e, a = !1) {
|
39
|
+
return U(t) && !D(t.type) ? tt(t, { closeToast: e.closeToast, toastProps: e, data: e.data, isPaused: a }) : z(t) ? t({ closeToast: e.closeToast, toastProps: e, data: e.data, isPaused: a }) : t;
|
40
|
+
}
|
41
|
+
function gt({ closeToast: t, theme: e, ariaLabel: a = "close" }) {
|
42
|
+
return T.createElement("button", { className: `Toastify__close-button Toastify__close-button--${e}`, type: "button", onClick: (r) => {
|
43
|
+
r.stopPropagation(), t(!0);
|
44
|
+
}, "aria-label": a }, T.createElement("svg", { "aria-hidden": "true", viewBox: "0 0 14 16" }, T.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" })));
|
45
|
+
}
|
46
|
+
function vt({ delay: t, isRunning: e, closeToast: a, type: r = "default", hide: n, className: l, controlledProgress: o, progress: d, rtl: f, isIn: u, theme: _ }) {
|
47
|
+
let x = n || o && d === 0, E = { animationDuration: `${t}ms`, animationPlayState: e ? "running" : "paused" };
|
48
|
+
o && (E.transform = `scaleX(${d})`);
|
49
|
+
let k = N("Toastify__progress-bar", o ? "Toastify__progress-bar--controlled" : "Toastify__progress-bar--animated", `Toastify__progress-bar-theme--${_}`, `Toastify__progress-bar--${r}`, { "Toastify__progress-bar--rtl": f }), I = z(l) ? l({ rtl: f, type: r, defaultClassName: k }) : N(k, l), b = { [o && d >= 1 ? "onTransitionEnd" : "onAnimationEnd"]: o && d < 1 ? null : () => {
|
50
|
+
u && a();
|
51
|
+
} };
|
52
|
+
return T.createElement("div", { className: "Toastify__progress-bar--wrp", "data-hidden": x }, T.createElement("div", { className: `Toastify__progress-bar--bg Toastify__progress-bar-theme--${_} Toastify__progress-bar--${r}` }), T.createElement("div", { role: "progressbar", "aria-hidden": x ? "true" : "false", "aria-label": "notification timer", className: I, style: E, ...b }));
|
53
|
+
}
|
54
|
+
var bt = 1, it = () => `${bt++}`;
|
55
|
+
function Tt(t, e, a) {
|
56
|
+
let r = 1, n = 0, l = [], o = [], d = e, f = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Set(), _ = (s) => (u.add(s), () => u.delete(s)), x = () => {
|
57
|
+
o = Array.from(f.values()), u.forEach((s) => s());
|
58
|
+
}, E = ({ containerId: s, toastId: i, updateId: c }) => {
|
59
|
+
let h = s ? s !== t : t !== 1, C = f.has(i) && c == null;
|
60
|
+
return h || C;
|
61
|
+
}, k = (s, i) => {
|
62
|
+
f.forEach((c) => {
|
63
|
+
var h;
|
64
|
+
(i == null || i === c.props.toastId) && ((h = c.toggle) == null || h.call(c, s));
|
65
|
+
});
|
66
|
+
}, I = (s) => {
|
67
|
+
var i, c;
|
68
|
+
(c = (i = s.props) == null ? void 0 : i.onClose) == null || c.call(i, s.removalReason), s.isActive = !1;
|
69
|
+
}, b = (s) => {
|
70
|
+
if (s == null) f.forEach(I);
|
71
|
+
else {
|
72
|
+
let i = f.get(s);
|
73
|
+
i && I(i);
|
74
|
+
}
|
75
|
+
x();
|
76
|
+
}, m = () => {
|
77
|
+
n -= l.length, l = [];
|
78
|
+
}, p = (s) => {
|
79
|
+
var i, c;
|
80
|
+
let { toastId: h, updateId: C } = s.props, y = C == null;
|
81
|
+
s.staleId && f.delete(s.staleId), s.isActive = !0, f.set(h, s), x(), a(ot(s, y ? "added" : "updated")), y && ((c = (i = s.props).onOpen) == null || c.call(i));
|
82
|
+
};
|
83
|
+
return { id: t, props: d, observe: _, toggle: k, removeToast: b, toasts: f, clearQueue: m, buildToast: (s, i) => {
|
84
|
+
if (E(i)) return;
|
85
|
+
let { toastId: c, updateId: h, data: C, staleId: y, delay: v } = i, L = h == null;
|
86
|
+
L && n++;
|
87
|
+
let $ = { ...d, style: d.toastStyle, key: r++, ...Object.fromEntries(Object.entries(i).filter(([P, S]) => S != null)), toastId: c, updateId: h, data: C, isIn: !1, className: V(i.className || d.toastClassName), progressClassName: V(i.progressClassName || d.progressClassName), autoClose: i.isLoading ? !1 : mt(i.autoClose, d.autoClose), closeToast(P) {
|
88
|
+
f.get(c).removalReason = P, b(c);
|
89
|
+
}, deleteToast() {
|
90
|
+
let P = f.get(c);
|
91
|
+
if (P != null) {
|
92
|
+
if (a(ot(P, "removed")), f.delete(c), n--, n < 0 && (n = 0), l.length > 0) {
|
93
|
+
p(l.shift());
|
94
|
+
return;
|
95
|
+
}
|
96
|
+
x();
|
97
|
+
}
|
98
|
+
} };
|
99
|
+
$.closeButton = d.closeButton, i.closeButton === !1 || Z(i.closeButton) ? $.closeButton = i.closeButton : i.closeButton === !0 && ($.closeButton = Z(d.closeButton) ? d.closeButton : !0);
|
100
|
+
let O = { content: s, props: $, staleId: y };
|
101
|
+
d.limit && d.limit > 0 && n > d.limit && L ? l.push(O) : M(v) ? setTimeout(() => {
|
102
|
+
p(O);
|
103
|
+
}, v) : p(O);
|
104
|
+
}, setProps(s) {
|
105
|
+
d = s;
|
106
|
+
}, setToggle: (s, i) => {
|
107
|
+
let c = f.get(s);
|
108
|
+
c && (c.toggle = i);
|
109
|
+
}, isToastActive: (s) => {
|
110
|
+
var i;
|
111
|
+
return (i = f.get(s)) == null ? void 0 : i.isActive;
|
112
|
+
}, getSnapshot: () => o };
|
113
|
+
}
|
114
|
+
var w = /* @__PURE__ */ new Map(), R = [], G = /* @__PURE__ */ new Set(), ht = (t) => G.forEach((e) => e(t)), nt = () => w.size > 0;
|
115
|
+
function xt() {
|
116
|
+
R.forEach((t) => ft(t.content, t.options)), R = [];
|
117
|
+
}
|
118
|
+
var kt = (t, { containerId: e }) => {
|
119
|
+
var a;
|
120
|
+
return (a = w.get(e || 1)) == null ? void 0 : a.toasts.get(t);
|
121
|
+
};
|
122
|
+
function lt(t, e) {
|
123
|
+
var a;
|
124
|
+
if (e) return !!((a = w.get(e)) != null && a.isToastActive(t));
|
125
|
+
let r = !1;
|
126
|
+
return w.forEach((n) => {
|
127
|
+
n.isToastActive(t) && (r = !0);
|
128
|
+
}), r;
|
129
|
+
}
|
130
|
+
function Et(t) {
|
131
|
+
if (!nt()) {
|
132
|
+
R = R.filter((e) => t != null && e.options.toastId !== t);
|
133
|
+
return;
|
134
|
+
}
|
135
|
+
if (t == null || pt(t)) w.forEach((e) => {
|
136
|
+
e.removeToast(t);
|
137
|
+
});
|
138
|
+
else if (t && ("containerId" in t || "id" in t)) {
|
139
|
+
let e = w.get(t.containerId);
|
140
|
+
e ? e.removeToast(t.id) : w.forEach((a) => {
|
141
|
+
a.removeToast(t.id);
|
142
|
+
});
|
143
|
+
}
|
144
|
+
}
|
145
|
+
var wt = (t = {}) => {
|
146
|
+
w.forEach((e) => {
|
147
|
+
e.props.limit && (!t.containerId || e.id === t.containerId) && e.clearQueue();
|
148
|
+
});
|
149
|
+
};
|
150
|
+
function ft(t, e) {
|
151
|
+
Z(t) && (nt() || R.push({ content: t, options: e }), w.forEach((a) => {
|
152
|
+
a.buildToast(t, e);
|
153
|
+
}));
|
154
|
+
}
|
155
|
+
function It(t) {
|
156
|
+
var e;
|
157
|
+
(e = w.get(t.containerId || 1)) == null || e.setToggle(t.id, t.fn);
|
158
|
+
}
|
159
|
+
function ct(t, e) {
|
160
|
+
w.forEach((a) => {
|
161
|
+
(e == null || !(e != null && e.containerId) || e?.containerId === a.id) && a.toggle(t, e?.id);
|
162
|
+
});
|
163
|
+
}
|
164
|
+
function Ct(t) {
|
165
|
+
let e = t.containerId || 1;
|
166
|
+
return { subscribe(a) {
|
167
|
+
let r = Tt(e, t, ht);
|
168
|
+
w.set(e, r);
|
169
|
+
let n = r.observe(a);
|
170
|
+
return xt(), () => {
|
171
|
+
n(), w.delete(e);
|
172
|
+
};
|
173
|
+
}, setProps(a) {
|
174
|
+
var r;
|
175
|
+
(r = w.get(e)) == null || r.setProps(a);
|
176
|
+
}, getSnapshot() {
|
177
|
+
var a;
|
178
|
+
return (a = w.get(e)) == null ? void 0 : a.getSnapshot();
|
179
|
+
} };
|
180
|
+
}
|
181
|
+
function Lt(t) {
|
182
|
+
return G.add(t), () => {
|
183
|
+
G.delete(t);
|
184
|
+
};
|
185
|
+
}
|
186
|
+
function Ot(t) {
|
187
|
+
return t && (D(t.toastId) || M(t.toastId)) ? t.toastId : it();
|
188
|
+
}
|
189
|
+
function B(t, e) {
|
190
|
+
return ft(t, e), e.toastId;
|
191
|
+
}
|
192
|
+
function Y(t, e) {
|
193
|
+
return { ...e, type: e && e.type || t, toastId: Ot(e) };
|
194
|
+
}
|
195
|
+
function q(t) {
|
196
|
+
return (e, a) => B(e, Y(t, a));
|
197
|
+
}
|
198
|
+
function g(t, e) {
|
199
|
+
return B(t, Y("default", e));
|
200
|
+
}
|
201
|
+
g.loading = (t, e) => B(t, Y("default", { isLoading: !0, autoClose: !1, closeOnClick: !1, closeButton: !1, draggable: !1, ...e }));
|
202
|
+
function zt(t, { pending: e, error: a, success: r }, n) {
|
203
|
+
let l;
|
204
|
+
e && (l = D(e) ? g.loading(e, n) : g.loading(e.render, { ...n, ...e }));
|
205
|
+
let o = { isLoading: null, autoClose: null, closeOnClick: null, closeButton: null, draggable: null }, d = (u, _, x) => {
|
206
|
+
if (_ == null) {
|
207
|
+
g.dismiss(l);
|
208
|
+
return;
|
209
|
+
}
|
210
|
+
let E = { type: u, ...o, ...n, data: x }, k = D(_) ? { render: _ } : _;
|
211
|
+
return l ? g.update(l, { ...E, ...k }) : g(k.render, { ...E, ...k }), x;
|
212
|
+
}, f = z(t) ? t() : t;
|
213
|
+
return f.then((u) => d("success", r, u)).catch((u) => d("error", a, u)), f;
|
214
|
+
}
|
215
|
+
g.promise = zt;
|
216
|
+
g.success = q("success");
|
217
|
+
g.info = q("info");
|
218
|
+
g.error = q("error");
|
219
|
+
g.warning = q("warning");
|
220
|
+
g.warn = g.warning;
|
221
|
+
g.dark = (t, e) => B(t, Y("default", { theme: "dark", ...e }));
|
222
|
+
function $t(t) {
|
223
|
+
Et(t);
|
224
|
+
}
|
225
|
+
g.dismiss = $t;
|
226
|
+
g.clearWaitingQueue = wt;
|
227
|
+
g.isActive = lt;
|
228
|
+
g.update = (t, e = {}) => {
|
229
|
+
let a = kt(t, e);
|
230
|
+
if (a) {
|
231
|
+
let { props: r, content: n } = a, l = { delay: 100, ...r, ...e, toastId: e.toastId || t, updateId: it() };
|
232
|
+
l.toastId !== t && (l.staleId = t);
|
233
|
+
let o = l.render || n;
|
234
|
+
delete l.render, B(o, l);
|
235
|
+
}
|
236
|
+
};
|
237
|
+
g.done = (t) => {
|
238
|
+
g.update(t, { progress: 1 });
|
239
|
+
};
|
240
|
+
g.onChange = Lt;
|
241
|
+
g.play = (t) => ct(!0, t);
|
242
|
+
g.pause = (t) => ct(!1, t);
|
243
|
+
function Pt(t) {
|
244
|
+
var e;
|
245
|
+
let { subscribe: a, getSnapshot: r, setProps: n } = A(Ct(t)).current;
|
246
|
+
n(t);
|
247
|
+
let l = (e = yt(a, r, r)) == null ? void 0 : e.slice();
|
248
|
+
function o(d) {
|
249
|
+
if (!l) return [];
|
250
|
+
let f = /* @__PURE__ */ new Map();
|
251
|
+
return t.newestOnTop && l.reverse(), l.forEach((u) => {
|
252
|
+
let { position: _ } = u.props;
|
253
|
+
f.has(_) || f.set(_, []), f.get(_).push(u);
|
254
|
+
}), Array.from(f, (u) => d(u[0], u[1]));
|
255
|
+
}
|
256
|
+
return { getToastToRender: o, isToastActive: lt, count: l?.length };
|
257
|
+
}
|
258
|
+
function Nt(t) {
|
259
|
+
let [e, a] = j(!1), [r, n] = j(!1), l = A(null), o = A({ start: 0, delta: 0, removalDistance: 0, canCloseOnClick: !0, canDrag: !1, didMove: !1 }).current, { autoClose: d, pauseOnHover: f, closeToast: u, onClick: _, closeOnClick: x } = t;
|
260
|
+
It({ id: t.toastId, containerId: t.containerId, fn: a }), H(() => {
|
261
|
+
if (t.pauseOnFocusLoss) return E(), () => {
|
262
|
+
k();
|
263
|
+
};
|
264
|
+
}, [t.pauseOnFocusLoss]);
|
265
|
+
function E() {
|
266
|
+
document.hasFocus() || p(), window.addEventListener("focus", m), window.addEventListener("blur", p);
|
267
|
+
}
|
268
|
+
function k() {
|
269
|
+
window.removeEventListener("focus", m), window.removeEventListener("blur", p);
|
270
|
+
}
|
271
|
+
function I(y) {
|
272
|
+
if (t.draggable === !0 || t.draggable === y.pointerType) {
|
273
|
+
s();
|
274
|
+
let v = l.current;
|
275
|
+
o.canCloseOnClick = !0, o.canDrag = !0, v.style.transition = "none", t.draggableDirection === "x" ? (o.start = y.clientX, o.removalDistance = v.offsetWidth * (t.draggablePercent / 100)) : (o.start = y.clientY, o.removalDistance = v.offsetHeight * (t.draggablePercent === 80 ? t.draggablePercent * 1.5 : t.draggablePercent) / 100);
|
276
|
+
}
|
277
|
+
}
|
278
|
+
function b(y) {
|
279
|
+
let { top: v, bottom: L, left: $, right: O } = l.current.getBoundingClientRect();
|
280
|
+
y.nativeEvent.type !== "touchend" && t.pauseOnHover && y.clientX >= $ && y.clientX <= O && y.clientY >= v && y.clientY <= L ? p() : m();
|
281
|
+
}
|
282
|
+
function m() {
|
283
|
+
a(!0);
|
284
|
+
}
|
285
|
+
function p() {
|
286
|
+
a(!1);
|
287
|
+
}
|
288
|
+
function s() {
|
289
|
+
o.didMove = !1, document.addEventListener("pointermove", c), document.addEventListener("pointerup", h);
|
290
|
+
}
|
291
|
+
function i() {
|
292
|
+
document.removeEventListener("pointermove", c), document.removeEventListener("pointerup", h);
|
293
|
+
}
|
294
|
+
function c(y) {
|
295
|
+
let v = l.current;
|
296
|
+
if (o.canDrag && v) {
|
297
|
+
o.didMove = !0, e && p(), t.draggableDirection === "x" ? o.delta = y.clientX - o.start : o.delta = y.clientY - o.start, o.start !== y.clientX && (o.canCloseOnClick = !1);
|
298
|
+
let L = t.draggableDirection === "x" ? `${o.delta}px, var(--y)` : `0, calc(${o.delta}px + var(--y))`;
|
299
|
+
v.style.transform = `translate3d(${L},0)`, v.style.opacity = `${1 - Math.abs(o.delta / o.removalDistance)}`;
|
300
|
+
}
|
301
|
+
}
|
302
|
+
function h() {
|
303
|
+
i();
|
304
|
+
let y = l.current;
|
305
|
+
if (o.canDrag && o.didMove && y) {
|
306
|
+
if (o.canDrag = !1, Math.abs(o.delta) > o.removalDistance) {
|
307
|
+
n(!0), t.closeToast(!0), t.collapseAll();
|
308
|
+
return;
|
309
|
+
}
|
310
|
+
y.style.transition = "transform 0.2s, opacity 0.2s", y.style.removeProperty("transform"), y.style.removeProperty("opacity");
|
311
|
+
}
|
312
|
+
}
|
313
|
+
let C = { onPointerDown: I, onPointerUp: b };
|
314
|
+
return d && f && (C.onMouseEnter = p, t.stacked || (C.onMouseLeave = m)), x && (C.onClick = (y) => {
|
315
|
+
_ && _(y), o.canCloseOnClick && u(!0);
|
316
|
+
}), { playToast: m, pauseToast: p, isRunning: e, preventExitTransition: r, toastRef: l, eventHandlers: C };
|
317
|
+
}
|
318
|
+
var Dt = typeof window < "u" ? st : H, K = ({ theme: t, type: e, isLoading: a, ...r }) => T.createElement("svg", { viewBox: "0 0 24 24", width: "100%", height: "100%", fill: t === "colored" ? "currentColor" : `var(--toastify-icon-color-${e})`, ...r });
|
319
|
+
function At(t) {
|
320
|
+
return T.createElement(K, { ...t }, T.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" }));
|
321
|
+
}
|
322
|
+
function Rt(t) {
|
323
|
+
return T.createElement(K, { ...t }, T.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" }));
|
324
|
+
}
|
325
|
+
function Mt(t) {
|
326
|
+
return T.createElement(K, { ...t }, T.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" }));
|
327
|
+
}
|
328
|
+
function Bt(t) {
|
329
|
+
return T.createElement(K, { ...t }, T.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" }));
|
330
|
+
}
|
331
|
+
function St() {
|
332
|
+
return T.createElement("div", { className: "Toastify__spinner" });
|
333
|
+
}
|
334
|
+
var J = { info: Rt, warning: At, success: Mt, error: Bt, spinner: St }, Xt = (t) => t in J;
|
335
|
+
function Ht({ theme: t, type: e, isLoading: a, icon: r }) {
|
336
|
+
let n = null, l = { theme: t, type: e };
|
337
|
+
return r === !1 || (z(r) ? n = r({ ...l, isLoading: a }) : U(r) ? n = tt(r, l) : a ? n = J.spinner() : Xt(e) && (n = J[e](l))), n;
|
338
|
+
}
|
339
|
+
var Ut = (t) => {
|
340
|
+
let { isRunning: e, preventExitTransition: a, toastRef: r, eventHandlers: n, playToast: l } = Nt(t), { closeButton: o, children: d, autoClose: f, onClick: u, type: _, hideProgressBar: x, closeToast: E, transition: k, position: I, className: b, style: m, progressClassName: p, updateId: s, role: i, progress: c, rtl: h, toastId: C, deleteToast: y, isIn: v, isLoading: L, closeOnClick: $, theme: O, ariaLabel: P } = t, S = N("Toastify__toast", `Toastify__toast-theme--${O}`, `Toastify__toast--${_}`, { "Toastify__toast--rtl": h }, { "Toastify__toast--close-on-click": $ }), dt = z(b) ? b({ rtl: h, position: I, type: _, defaultClassName: S }) : N(S, b), et = Ht(t), at = !!c || !f, W = { closeToast: E, type: _, theme: O }, X = null;
|
341
|
+
return o === !1 || (z(o) ? X = o(W) : U(o) ? X = tt(o, W) : X = gt(W)), T.createElement(k, { isIn: v, done: y, position: I, preventExitTransition: a, nodeRef: r, playToast: l }, T.createElement("div", { id: C, tabIndex: 0, onClick: u, "data-in": v, className: dt, ...n, style: m, ref: r, ...v && { role: i, "aria-label": P } }, et != null && T.createElement("div", { className: N("Toastify__toast-icon", { "Toastify--animate-icon Toastify__zoom-enter": !L }) }, et), rt(d, t, !e), X, !t.customProgressBar && T.createElement(vt, { ...s && !at ? { key: `p-${s}` } : {}, rtl: h, theme: O, delay: f, isRunning: e, isIn: v, closeToast: E, hide: x, type: _, className: p, controlledProgress: at, progress: c || 0 })));
|
342
|
+
}, Q = (t, e = !1) => ({ enter: `Toastify--animate Toastify__${t}-enter`, exit: `Toastify--animate Toastify__${t}-exit`, appendPosition: e }), Ft = F(Q("bounce", !0)), Qt = F(Q("slide", !0)), Wt = F(Q("zoom")), jt = F(Q("flip")), Yt = { position: "top-right", transition: Ft, autoClose: 5e3, closeButton: !0, pauseOnHover: !0, pauseOnFocusLoss: !0, draggable: "touch", draggablePercent: 80, draggableDirection: "x", role: "alert", theme: "light", "aria-label": "Notifications Alt+T", hotKeys: (t) => t.altKey && t.code === "KeyT" };
|
343
|
+
function Vt(t) {
|
344
|
+
let e = { ...Yt, ...t }, a = t.stacked, [r, n] = j(!0), l = A(null), { getToastToRender: o, isToastActive: d, count: f } = Pt(e), { className: u, style: _, rtl: x, containerId: E, hotKeys: k } = e;
|
345
|
+
function I(m) {
|
346
|
+
let p = N("Toastify__toast-container", `Toastify__toast-container--${m}`, { "Toastify__toast-container--rtl": x });
|
347
|
+
return z(u) ? u({ position: m, rtl: x, defaultClassName: p }) : N(p, V(u));
|
348
|
+
}
|
349
|
+
function b() {
|
350
|
+
a && (n(!0), g.play());
|
351
|
+
}
|
352
|
+
return Dt(() => {
|
353
|
+
var m;
|
354
|
+
if (a) {
|
355
|
+
let p = l.current.querySelectorAll('[data-in="true"]'), s = 12, i = (m = e.position) == null ? void 0 : m.includes("top"), c = 0, h = 0;
|
356
|
+
Array.from(p).reverse().forEach((C, y) => {
|
357
|
+
let v = C;
|
358
|
+
v.classList.add("Toastify__toast--stacked"), y > 0 && (v.dataset.collapsed = `${r}`), v.dataset.pos || (v.dataset.pos = i ? "top" : "bot");
|
359
|
+
let L = c * (r ? 0.2 : 1) + (r ? 0 : s * y);
|
360
|
+
v.style.setProperty("--y", `${i ? L : L * -1}px`), v.style.setProperty("--g", `${s}`), v.style.setProperty("--s", `${1 - (r ? h : 0)}`), c += v.offsetHeight, h += 0.025;
|
361
|
+
});
|
362
|
+
}
|
363
|
+
}, [r, f, a]), H(() => {
|
364
|
+
function m(p) {
|
365
|
+
var s;
|
366
|
+
let i = l.current;
|
367
|
+
k(p) && ((s = i.querySelector('[tabIndex="0"]')) == null || s.focus(), n(!1), g.pause()), p.key === "Escape" && (document.activeElement === i || i != null && i.contains(document.activeElement)) && (n(!0), g.play());
|
368
|
+
}
|
369
|
+
return document.addEventListener("keydown", m), () => {
|
370
|
+
document.removeEventListener("keydown", m);
|
371
|
+
};
|
372
|
+
}, [k]), T.createElement("section", { ref: l, className: "Toastify", id: E, onMouseEnter: () => {
|
373
|
+
a && (n(!1), g.pause());
|
374
|
+
}, onMouseLeave: b, "aria-live": "polite", "aria-atomic": "false", "aria-relevant": "additions text", "aria-label": e["aria-label"] }, o((m, p) => {
|
375
|
+
let s = p.length ? { ..._ } : { ..._, pointerEvents: "none" };
|
376
|
+
return T.createElement("div", { tabIndex: -1, className: I(m), "data-stacked": a, style: s, key: `c-${m}` }, p.map(({ content: i, props: c }) => T.createElement(Ut, { ...c, stacked: a, collapseAll: b, isIn: d(c.toastId, c.containerId), key: `t-${c.key}` }, i)));
|
377
|
+
}));
|
378
|
+
}
|
379
|
+
export {
|
380
|
+
Ft as Bounce,
|
381
|
+
jt as Flip,
|
382
|
+
J as Icons,
|
383
|
+
Qt as Slide,
|
384
|
+
Vt as ToastContainer,
|
385
|
+
Wt as Zoom,
|
386
|
+
_t as collapseToast,
|
387
|
+
F as cssTransition,
|
388
|
+
g as toast
|
389
|
+
};
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { getDefaultExportFromCjs as kn } from "./App.
|
2
|
-
import { visit as In } from "./useMarkdown.
|
3
|
-
import { toText as Cn } from "./index.
|
1
|
+
import { getDefaultExportFromCjs as kn } from "./App.CU8DPgBK.js";
|
2
|
+
import { visit as In } from "./useMarkdown.BP64kEQI.js";
|
3
|
+
import { toText as Cn } from "./index.CkC1cqoG.js";
|
4
4
|
function xn(e) {
|
5
5
|
const t = e.regex, i = e.COMMENT("//", "$", { contains: [{ begin: /\\\n/ }] }), a = "decltype\\(auto\\)", r = "[a-zA-Z_]\\w*::", d = "(?!struct)(" + a + "|" + t.optional(r) + "[a-zA-Z_]\\w*" + t.optional("<[^<>]+>") + ")", c = {
|
6
6
|
className: "type",
|