@pfct/purple 1.16.2 → 1.17.0
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/Accordion.DYya7dTN.js +1 -0
- package/dist/chunks/Accordion.DgWTtf1u.js +716 -0
- package/dist/chunks/Divider.CptJ_x2Y.js +1 -0
- package/dist/chunks/{Divider.DBtnaPqJ.js → Divider.DR-c4z_i.js} +16 -13
- package/dist/chunks/DotLottie.BQNTv0XO.js +5 -0
- package/dist/chunks/DotLottie.qOfU0HjI.js +1993 -0
- package/dist/chunks/Switch.D7T_jbtK.js +207 -0
- package/dist/chunks/Switch.DUWZASi8.js +1 -0
- package/dist/chunks/Toast.Bnm65xmy.js +1 -0
- package/dist/chunks/Toast.C7OnkFjA.js +698 -0
- package/dist/chunks/{bottomSheet.BGKwHjuP.js → bottomSheet.DCURoJ3z.js} +1 -1
- package/dist/chunks/{bottomSheet.C99fAuQK.js → bottomSheet.DqOEMG09.js} +1 -1
- package/dist/chunks/checkbox.DjQsU_Pk.js +1 -0
- package/dist/chunks/{checkbox.DNdnhspb.js → checkbox.Dl8nNqLc.js} +100 -92
- package/dist/chunks/dist.AclwPuO5.js +1 -0
- package/dist/chunks/{dist.BskID78S.js → dist.B0edyUiC.js} +176 -178
- package/dist/chunks/dist.B4GZ3aX4.js +111 -0
- package/dist/chunks/dist.BE2xxxwt.js +96 -0
- package/dist/chunks/dist.Ba6P-3sU.js +1 -0
- package/dist/chunks/dist.BaV_5zx8.js +186 -0
- package/dist/chunks/{dist.CDZCWPu4.js → dist.BnLwXMBJ.js} +8 -4
- package/dist/chunks/dist.BpQ7SpeW.js +227 -0
- package/dist/chunks/dist.Bui5aGSB.js +197 -0
- package/dist/chunks/dist.CBOTGT1c.js +1 -0
- package/dist/chunks/dist.CIvT5XE_.js +1 -0
- package/dist/chunks/dist.CKG-hzoQ.js +1 -0
- package/dist/chunks/{dist.QtpYoD01.js → dist.CVClT59R.js} +8 -3
- package/dist/chunks/dist.CcSbgqVt.js +1 -0
- package/dist/chunks/dist.Cf8FjzvS.js +1 -0
- package/dist/chunks/{dist.DIjdcvlQ.js → dist.Cx1JFVV3.js} +48 -59
- package/dist/chunks/dist.D7s7BenH.js +1 -0
- package/dist/chunks/dist.DQ5uOc4y.js +1 -0
- package/dist/chunks/dist.DWzqVshx.js +16 -0
- package/dist/chunks/dist.DfLaHIBc.js +1 -0
- package/dist/chunks/dist.DomaJxrX.js +1 -0
- package/dist/chunks/dist.e7n2cf43.js +144 -0
- package/dist/chunks/dist.gUJz6qTg.js +185 -0
- package/dist/chunks/dist.zJ3rbM0i.js +1 -0
- package/dist/chunks/drawer.Cots0_ea.js +7 -0
- package/dist/chunks/drawer.ftfBm36h.js +1836 -0
- package/dist/chunks/es2015.CfvYaoE5.js +41 -0
- package/dist/chunks/{es2015.ByVyszJo.js → es2015.DCKfm2VN.js} +168 -187
- package/dist/chunks/{src.D-VoFbup.js → src.BAhu5d2_.js} +1 -1
- package/dist/chunks/{src.CmgILXZE.js → src.DlM6Ki-I.js} +5 -5
- package/dist/chunks/tooltip.8vKL7w2a.js +1 -0
- package/dist/chunks/tooltip.D9PoXwtV.js +448 -0
- package/dist/components/Accordion/index.cjs.js +1 -1
- package/dist/components/Accordion/index.esm.js +1 -1
- package/dist/components/Control/Switch/index.cjs.js +1 -1
- package/dist/components/Control/Switch/index.esm.js +1 -1
- package/dist/components/Control/index.cjs.js +1 -1
- package/dist/components/Control/index.esm.js +2 -2
- package/dist/components/Divider/index.cjs.js +1 -1
- package/dist/components/Divider/index.esm.js +1 -1
- package/dist/components/LegacyModal/index.cjs.js +1 -1
- package/dist/components/LegacyModal/index.esm.js +1 -1
- package/dist/components/MiniButton/IconMiniButton/index.cjs.js +1 -1
- package/dist/components/MiniButton/IconMiniButton/index.esm.js +1 -1
- package/dist/components/MiniButton/UnderLineMiniButton/index.cjs.js +1 -1
- package/dist/components/MiniButton/UnderLineMiniButton/index.esm.js +1 -1
- package/dist/components/Modal/index.cjs.js +1 -1
- package/dist/components/Modal/index.esm.js +1 -1
- package/dist/components/Pagination/index.cjs.js +1 -1
- package/dist/components/Pagination/index.esm.js +1 -1
- package/dist/components/Tabs/FillTabs/index.cjs.js +1 -1
- package/dist/components/Tabs/FillTabs/index.esm.js +1 -1
- package/dist/components/Tabs/index.cjs.js +1 -1
- package/dist/components/Tabs/index.esm.js +1 -1
- package/dist/components/Tag/index.cjs.js +1 -1
- package/dist/components/Tag/index.esm.js +1 -1
- package/dist/components/Terms/index.cjs.js +1 -1
- package/dist/components/Terms/index.esm.js +3 -3
- package/dist/components/Toast/index.cjs.js +1 -1
- package/dist/components/Toast/index.esm.js +1 -1
- package/dist/components/index.cjs.js +1 -1
- package/dist/components/index.esm.js +8 -8
- package/dist/components/ui/bottomSheet.cjs.js +1 -1
- package/dist/components/ui/bottomSheet.esm.js +1 -1
- package/dist/components/ui/button.cjs.js +1 -1
- package/dist/components/ui/button.esm.js +1 -1
- package/dist/components/ui/checkbox.cjs.js +1 -1
- package/dist/components/ui/checkbox.esm.js +1 -1
- package/dist/components/ui/dialog.cjs.js +1 -1
- package/dist/components/ui/dialog.esm.js +1 -1
- package/dist/components/ui/drawer.cjs.js +1 -1
- package/dist/components/ui/drawer.esm.js +1 -1
- package/dist/components/ui/impact-tooltip.cjs.js +1 -1
- package/dist/components/ui/impact-tooltip.esm.js +1 -1
- package/dist/components/ui/select.cjs.js +1 -1
- package/dist/components/ui/select.esm.js +3 -3
- package/dist/components/ui/tooltip.cjs.js +1 -1
- package/dist/components/ui/tooltip.esm.js +1 -1
- package/dist/components/ui/typography.cjs.js +1 -1
- package/dist/components/ui/typography.esm.js +1 -1
- package/dist/icons/src/aliases/aliases.cjs.js +1 -1
- package/dist/icons/src/aliases/aliases.d.ts +1 -1
- package/dist/icons/src/aliases/aliases.d.ts.map +1 -1
- package/dist/icons/src/aliases/aliases.esm.js +3 -3
- package/dist/icons/src/aliases/index.cjs.js +1 -1
- package/dist/icons/src/aliases/index.esm.js +3 -3
- package/dist/icons/src/aliases/prefixed.cjs.js +1 -1
- package/dist/icons/src/aliases/prefixed.d.ts +9 -9
- package/dist/icons/src/aliases/prefixed.d.ts.map +1 -1
- package/dist/icons/src/aliases/prefixed.esm.js +3 -3
- package/dist/icons/src/aliases/suffixed.cjs.js +1 -1
- package/dist/icons/src/aliases/suffixed.d.ts +10 -10
- package/dist/icons/src/aliases/suffixed.d.ts.map +1 -1
- package/dist/icons/src/aliases/suffixed.esm.js +3 -3
- package/dist/icons/src/icons/index.cjs.js +1 -1
- package/dist/icons/src/icons/index.esm.js +3 -3
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +12 -12
- package/dist/library/DotLottie/index.cjs.js +1 -1
- package/dist/library/DotLottie/index.d.ts +13 -0
- package/dist/library/DotLottie/index.d.ts.map +1 -1
- package/dist/library/DotLottie/index.esm.js +1 -1
- package/dist/library/Lottie/index.cjs.js +1 -1
- package/dist/library/Lottie/index.d.ts +13 -0
- package/dist/library/Lottie/index.d.ts.map +1 -1
- package/dist/library/Lottie/index.esm.js +25 -25
- package/dist/library/index.cjs.js +1 -1
- package/dist/library/index.esm.js +1 -1
- package/package.json +4 -4
- package/dist/chunks/Accordion.Cs1f4aQZ.js +0 -373
- package/dist/chunks/Accordion.ZIp0NsA0.js +0 -1
- package/dist/chunks/Divider.BIS4pXEy.js +0 -1
- package/dist/chunks/DotLottie.CaDygpsw.js +0 -73962
- package/dist/chunks/DotLottie.Cf-SL2bJ.js +0 -5
- package/dist/chunks/Switch.C6xwIjJR.js +0 -1
- package/dist/chunks/Switch.D_myxCrS.js +0 -200
- package/dist/chunks/Toast.Cjdk4za6.js +0 -1
- package/dist/chunks/Toast.D1-VfeA2.js +0 -685
- package/dist/chunks/checkbox.CfWB_nqn.js +0 -1
- package/dist/chunks/dist.B2wZmrK1.js +0 -98
- package/dist/chunks/dist.B8tpQk-4.js +0 -1
- package/dist/chunks/dist.BC0-iqKU.js +0 -1
- package/dist/chunks/dist.BGATFz6w.js +0 -1
- package/dist/chunks/dist.BQIeYu70.js +0 -1
- package/dist/chunks/dist.BWsA5f1f.js +0 -1
- package/dist/chunks/dist.BixLWWwb.js +0 -71
- package/dist/chunks/dist.Bxqi8VAi.js +0 -1
- package/dist/chunks/dist.C8FJXTu6.js +0 -10
- package/dist/chunks/dist.C8NniehT.js +0 -1
- package/dist/chunks/dist.C8k7jQIp.js +0 -87
- package/dist/chunks/dist.CEJ-WCY_.js +0 -44
- package/dist/chunks/dist.CIQdvun-.js +0 -1
- package/dist/chunks/dist.Cff8LOoN.js +0 -67
- package/dist/chunks/dist.CmRTDXGG.js +0 -1
- package/dist/chunks/dist.CwMFqhEQ.js +0 -146
- package/dist/chunks/dist.CwWM0zXK.js +0 -25
- package/dist/chunks/dist.CyhalHxz.js +0 -1
- package/dist/chunks/dist.Czpint58.js +0 -1
- package/dist/chunks/dist.D3cPoDZ_.js +0 -194
- package/dist/chunks/dist.D4mQo5QB.js +0 -1
- package/dist/chunks/dist.D5ataprQ.js +0 -1
- package/dist/chunks/dist.D6A3yc_d.js +0 -11
- package/dist/chunks/dist.DKOi9kq6.js +0 -1
- package/dist/chunks/dist.DhCw5vjE.js +0 -1
- package/dist/chunks/dist.DrfVZqiO.js +0 -186
- package/dist/chunks/dist.SHmlpKFY.js +0 -1
- package/dist/chunks/dist.kg7EEYPp.js +0 -12
- package/dist/chunks/drawer.Cji5AtcU.js +0 -1720
- package/dist/chunks/drawer.Gt1AjdVH.js +0 -7
- package/dist/chunks/es2015.D2emqwtq.js +0 -41
- package/dist/chunks/tooltip.DGgNTZ5B.js +0 -444
- package/dist/chunks/tooltip.vEwTtt8v.js +0 -1
|
@@ -0,0 +1,698 @@
|
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
import t from "react";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
import r from "react-dom";
|
|
5
|
+
//#region node_modules/next-themes/dist/index.mjs
|
|
6
|
+
var i = (e, t, n, r, i, a, o, s) => {
|
|
7
|
+
let c = document.documentElement, l = ["light", "dark"];
|
|
8
|
+
function u(t) {
|
|
9
|
+
(Array.isArray(e) ? e : [e]).forEach((e) => {
|
|
10
|
+
let n = e === "class", r = n && a ? i.map((e) => a[e] || e) : i;
|
|
11
|
+
n ? (c.classList.remove(...r), c.classList.add(a && a[t] ? a[t] : t)) : c.setAttribute(e, t);
|
|
12
|
+
}), d(t);
|
|
13
|
+
}
|
|
14
|
+
function d(e) {
|
|
15
|
+
s && l.includes(e) && (c.style.colorScheme = e);
|
|
16
|
+
}
|
|
17
|
+
function f() {
|
|
18
|
+
return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
19
|
+
}
|
|
20
|
+
if (r) u(r);
|
|
21
|
+
else try {
|
|
22
|
+
let e = localStorage.getItem(t) || n;
|
|
23
|
+
u(o && e === "system" ? f() : e);
|
|
24
|
+
} catch {}
|
|
25
|
+
}, a = e.createContext(void 0), o = {
|
|
26
|
+
setTheme: (e) => {},
|
|
27
|
+
themes: []
|
|
28
|
+
}, s = () => e.useContext(a) ?? o;
|
|
29
|
+
e.memo(({ forcedTheme: t, storageKey: n, attribute: r, enableSystem: a, enableColorScheme: o, defaultTheme: s, value: c, themes: l, nonce: u, scriptProps: d }) => {
|
|
30
|
+
let f = JSON.stringify([
|
|
31
|
+
r,
|
|
32
|
+
n,
|
|
33
|
+
s,
|
|
34
|
+
t,
|
|
35
|
+
l,
|
|
36
|
+
c,
|
|
37
|
+
a,
|
|
38
|
+
o
|
|
39
|
+
]).slice(1, -1);
|
|
40
|
+
return e.createElement("script", {
|
|
41
|
+
...d,
|
|
42
|
+
suppressHydrationWarning: !0,
|
|
43
|
+
nonce: typeof window > "u" ? u : "",
|
|
44
|
+
dangerouslySetInnerHTML: { __html: `(${i.toString()})(${f})` }
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
//#endregion
|
|
48
|
+
//#region node_modules/sonner/dist/index.mjs
|
|
49
|
+
function c(e) {
|
|
50
|
+
if (!e || typeof document > "u") return;
|
|
51
|
+
let t = document.head || document.getElementsByTagName("head")[0], n = document.createElement("style");
|
|
52
|
+
n.type = "text/css", t.appendChild(n), n.styleSheet ? n.styleSheet.cssText = e : n.appendChild(document.createTextNode(e));
|
|
53
|
+
}
|
|
54
|
+
var l = (e) => {
|
|
55
|
+
switch (e) {
|
|
56
|
+
case "success": return f;
|
|
57
|
+
case "info": return m;
|
|
58
|
+
case "warning": return p;
|
|
59
|
+
case "error": return h;
|
|
60
|
+
default: return null;
|
|
61
|
+
}
|
|
62
|
+
}, u = Array(12).fill(0), d = ({ visible: e, className: n }) => /*#__PURE__*/ t.createElement("div", {
|
|
63
|
+
className: ["sonner-loading-wrapper", n].filter(Boolean).join(" "),
|
|
64
|
+
"data-visible": e
|
|
65
|
+
}, /*#__PURE__*/ t.createElement("div", { className: "sonner-spinner" }, u.map((e, n) => /*#__PURE__*/ t.createElement("div", {
|
|
66
|
+
className: "sonner-loading-bar",
|
|
67
|
+
key: `spinner-bar-${n}`
|
|
68
|
+
})))), f = /*#__PURE__*/ t.createElement("svg", {
|
|
69
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
70
|
+
viewBox: "0 0 20 20",
|
|
71
|
+
fill: "currentColor",
|
|
72
|
+
height: "20",
|
|
73
|
+
width: "20",
|
|
74
|
+
"aria-hidden": "true"
|
|
75
|
+
}, /*#__PURE__*/ t.createElement("path", {
|
|
76
|
+
fillRule: "evenodd",
|
|
77
|
+
d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",
|
|
78
|
+
clipRule: "evenodd"
|
|
79
|
+
})), p = /*#__PURE__*/ t.createElement("svg", {
|
|
80
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
81
|
+
viewBox: "0 0 24 24",
|
|
82
|
+
fill: "currentColor",
|
|
83
|
+
height: "20",
|
|
84
|
+
width: "20",
|
|
85
|
+
"aria-hidden": "true"
|
|
86
|
+
}, /*#__PURE__*/ t.createElement("path", {
|
|
87
|
+
fillRule: "evenodd",
|
|
88
|
+
d: "M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",
|
|
89
|
+
clipRule: "evenodd"
|
|
90
|
+
})), m = /*#__PURE__*/ t.createElement("svg", {
|
|
91
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
92
|
+
viewBox: "0 0 20 20",
|
|
93
|
+
fill: "currentColor",
|
|
94
|
+
height: "20",
|
|
95
|
+
width: "20",
|
|
96
|
+
"aria-hidden": "true"
|
|
97
|
+
}, /*#__PURE__*/ t.createElement("path", {
|
|
98
|
+
fillRule: "evenodd",
|
|
99
|
+
d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",
|
|
100
|
+
clipRule: "evenodd"
|
|
101
|
+
})), h = /*#__PURE__*/ t.createElement("svg", {
|
|
102
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
103
|
+
viewBox: "0 0 20 20",
|
|
104
|
+
fill: "currentColor",
|
|
105
|
+
height: "20",
|
|
106
|
+
width: "20",
|
|
107
|
+
"aria-hidden": "true"
|
|
108
|
+
}, /*#__PURE__*/ t.createElement("path", {
|
|
109
|
+
fillRule: "evenodd",
|
|
110
|
+
d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",
|
|
111
|
+
clipRule: "evenodd"
|
|
112
|
+
})), ee = /*#__PURE__*/ t.createElement("svg", {
|
|
113
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
114
|
+
width: "12",
|
|
115
|
+
height: "12",
|
|
116
|
+
viewBox: "0 0 24 24",
|
|
117
|
+
fill: "none",
|
|
118
|
+
stroke: "currentColor",
|
|
119
|
+
strokeWidth: "1.5",
|
|
120
|
+
strokeLinecap: "round",
|
|
121
|
+
strokeLinejoin: "round",
|
|
122
|
+
"aria-hidden": "true"
|
|
123
|
+
}, /*#__PURE__*/ t.createElement("line", {
|
|
124
|
+
x1: "18",
|
|
125
|
+
y1: "6",
|
|
126
|
+
x2: "6",
|
|
127
|
+
y2: "18"
|
|
128
|
+
}), /*#__PURE__*/ t.createElement("line", {
|
|
129
|
+
x1: "6",
|
|
130
|
+
y1: "6",
|
|
131
|
+
x2: "18",
|
|
132
|
+
y2: "18"
|
|
133
|
+
})), te = () => {
|
|
134
|
+
let [e, n] = t.useState(document.hidden);
|
|
135
|
+
return t.useEffect(() => {
|
|
136
|
+
let e = () => {
|
|
137
|
+
n(document.hidden);
|
|
138
|
+
};
|
|
139
|
+
return document.addEventListener("visibilitychange", e), () => document.removeEventListener("visibilitychange", e);
|
|
140
|
+
}, []), e;
|
|
141
|
+
}, g = 1, _ = 100, v = (e) => typeof e?.id == "number" || e?.id?.length > 0 ? e.id : g++, y = new class {
|
|
142
|
+
constructor() {
|
|
143
|
+
this.subscribe = (e) => (this.subscribers.push(e), this.getActiveToasts().forEach((t) => e(t)), () => {
|
|
144
|
+
let t = this.subscribers.indexOf(e);
|
|
145
|
+
this.subscribers.splice(t, 1);
|
|
146
|
+
}), this.publish = (e) => {
|
|
147
|
+
this.subscribers.forEach((t) => t(e));
|
|
148
|
+
}, this.addToast = (e) => {
|
|
149
|
+
this.publish(e), this.toasts = [...this.toasts, e], this.trimHistory();
|
|
150
|
+
}, this.trimHistory = () => {
|
|
151
|
+
let e = this.toasts.length - _;
|
|
152
|
+
e <= 0 || (this.toasts = this.toasts.filter((t) => e > 0 && this.dismissedToasts.has(t.id) ? (this.dismissedToasts.delete(t.id), e--, !1) : !0));
|
|
153
|
+
}, this.create = (e) => {
|
|
154
|
+
let { message: t, ...n } = e, r = v(e), i = this.pendingDismissals.get(r);
|
|
155
|
+
i !== void 0 && (cancelAnimationFrame(i), this.pendingDismissals.delete(r), this.dismissedToasts.delete(r));
|
|
156
|
+
let a = this.dismissedToasts.has(r), o = e.dismissible === void 0 ? !0 : e.dismissible;
|
|
157
|
+
return a && (this.dismissedToasts.delete(r), this.toasts = this.toasts.filter((e) => e.id !== r)), !a && this.toasts.find((e) => e.id === r) ? this.toasts = this.toasts.map((n) => n.id === r ? (this.publish({
|
|
158
|
+
...n,
|
|
159
|
+
...e,
|
|
160
|
+
id: r,
|
|
161
|
+
title: t
|
|
162
|
+
}), {
|
|
163
|
+
...n,
|
|
164
|
+
...e,
|
|
165
|
+
id: r,
|
|
166
|
+
dismissible: o,
|
|
167
|
+
title: t
|
|
168
|
+
}) : n) : this.addToast({
|
|
169
|
+
title: t,
|
|
170
|
+
...n,
|
|
171
|
+
dismissible: o,
|
|
172
|
+
id: r
|
|
173
|
+
}), r;
|
|
174
|
+
}, this.dismiss = (e) => {
|
|
175
|
+
if (e == null) return this.getActiveToasts().forEach((e) => {
|
|
176
|
+
this.dismissedToasts.add(e.id), this.subscribers.forEach((t) => t({
|
|
177
|
+
id: e.id,
|
|
178
|
+
dismiss: !0
|
|
179
|
+
}));
|
|
180
|
+
}), e;
|
|
181
|
+
this.dismissedToasts.add(e);
|
|
182
|
+
let t = this.pendingDismissals.get(e);
|
|
183
|
+
return t !== void 0 && cancelAnimationFrame(t), this.pendingDismissals.set(e, requestAnimationFrame(() => {
|
|
184
|
+
this.pendingDismissals.delete(e), this.subscribers.forEach((t) => t({
|
|
185
|
+
id: e,
|
|
186
|
+
dismiss: !0
|
|
187
|
+
}));
|
|
188
|
+
})), e;
|
|
189
|
+
}, this.message = (e, t) => this.create({
|
|
190
|
+
...t,
|
|
191
|
+
message: e,
|
|
192
|
+
type: void 0
|
|
193
|
+
}), this.error = (e, t) => this.create({
|
|
194
|
+
...t,
|
|
195
|
+
message: e,
|
|
196
|
+
type: "error"
|
|
197
|
+
}), this.success = (e, t) => this.create({
|
|
198
|
+
...t,
|
|
199
|
+
type: "success",
|
|
200
|
+
message: e
|
|
201
|
+
}), this.info = (e, t) => this.create({
|
|
202
|
+
...t,
|
|
203
|
+
type: "info",
|
|
204
|
+
message: e
|
|
205
|
+
}), this.warning = (e, t) => this.create({
|
|
206
|
+
...t,
|
|
207
|
+
type: "warning",
|
|
208
|
+
message: e
|
|
209
|
+
}), this.loading = (e, t) => this.create({
|
|
210
|
+
...t,
|
|
211
|
+
type: "loading",
|
|
212
|
+
message: e
|
|
213
|
+
}), this.promise = (e, n) => {
|
|
214
|
+
if (!n) return;
|
|
215
|
+
let r;
|
|
216
|
+
n.loading !== void 0 && (r = this.create({
|
|
217
|
+
...n,
|
|
218
|
+
promise: e,
|
|
219
|
+
type: "loading",
|
|
220
|
+
message: n.loading,
|
|
221
|
+
description: typeof n.description == "function" ? void 0 : n.description
|
|
222
|
+
}));
|
|
223
|
+
let i = Promise.resolve(e instanceof Function ? e() : e), a = r !== void 0, o, s = i.then(async (e) => {
|
|
224
|
+
if (o = ["resolve", e], t.isValidElement(e)) a = !1, this.create({
|
|
225
|
+
id: r,
|
|
226
|
+
type: "default",
|
|
227
|
+
message: e
|
|
228
|
+
});
|
|
229
|
+
else if (b(e) && !e.ok) {
|
|
230
|
+
a = !1;
|
|
231
|
+
let i = typeof n.error == "function" ? await n.error(`HTTP error! status: ${e.status}`) : n.error, o = typeof n.description == "function" ? await n.description(`HTTP error! status: ${e.status}`) : n.description, s = typeof i == "object" && !t.isValidElement(i) ? i : { message: i };
|
|
232
|
+
this.create({
|
|
233
|
+
id: r,
|
|
234
|
+
type: "error",
|
|
235
|
+
description: o,
|
|
236
|
+
...s
|
|
237
|
+
});
|
|
238
|
+
} else if (e instanceof Error) {
|
|
239
|
+
a = !1;
|
|
240
|
+
let i = typeof n.error == "function" ? await n.error(e) : n.error, o = typeof n.description == "function" ? await n.description(e) : n.description, s = typeof i == "object" && !t.isValidElement(i) ? i : { message: i };
|
|
241
|
+
this.create({
|
|
242
|
+
id: r,
|
|
243
|
+
type: "error",
|
|
244
|
+
description: o,
|
|
245
|
+
...s
|
|
246
|
+
});
|
|
247
|
+
} else if (n.success !== void 0) {
|
|
248
|
+
a = !1;
|
|
249
|
+
let i = typeof n.success == "function" ? await n.success(e) : n.success, o = typeof n.description == "function" ? await n.description(e) : n.description, s = typeof i == "object" && !t.isValidElement(i) ? i : { message: i };
|
|
250
|
+
this.create({
|
|
251
|
+
id: r,
|
|
252
|
+
type: "success",
|
|
253
|
+
description: o,
|
|
254
|
+
...s
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
}).catch(async (e) => {
|
|
258
|
+
if (o = ["reject", e], n.error !== void 0) {
|
|
259
|
+
a = !1;
|
|
260
|
+
let i = typeof n.error == "function" ? await n.error(e) : n.error, o = typeof n.description == "function" ? await n.description(e) : n.description, s = typeof i == "object" && !t.isValidElement(i) ? i : { message: i };
|
|
261
|
+
this.create({
|
|
262
|
+
id: r,
|
|
263
|
+
type: "error",
|
|
264
|
+
description: o,
|
|
265
|
+
...s
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
}).finally(() => {
|
|
269
|
+
a && (this.dismiss(r), r = void 0), n.finally == null || n.finally.call(n);
|
|
270
|
+
}), c = () => new Promise((e, t) => s.then(() => o[0] === "reject" ? t(o[1]) : e(o[1])).catch(t));
|
|
271
|
+
return typeof r != "string" && typeof r != "number" ? { unwrap: c } : Object.assign(r, { unwrap: c });
|
|
272
|
+
}, this.custom = (e, t) => {
|
|
273
|
+
let n = v(t);
|
|
274
|
+
return this.create({
|
|
275
|
+
...t,
|
|
276
|
+
jsx: e(n),
|
|
277
|
+
id: n,
|
|
278
|
+
type: void 0
|
|
279
|
+
}), n;
|
|
280
|
+
}, this.getActiveToasts = () => this.toasts.filter((e) => !this.dismissedToasts.has(e.id)), this.subscribers = [], this.toasts = [], this.dismissedToasts = /* @__PURE__ */ new Set(), this.pendingDismissals = /* @__PURE__ */ new Map();
|
|
281
|
+
}
|
|
282
|
+
}(), ne = (e, t) => y.message(e, t), b = (e) => e && typeof e == "object" && "ok" in e && typeof e.ok == "boolean" && "status" in e && typeof e.status == "number", x = Object.assign(ne, {
|
|
283
|
+
success: y.success,
|
|
284
|
+
info: y.info,
|
|
285
|
+
warning: y.warning,
|
|
286
|
+
error: y.error,
|
|
287
|
+
custom: y.custom,
|
|
288
|
+
message: y.message,
|
|
289
|
+
promise: y.promise,
|
|
290
|
+
dismiss: y.dismiss,
|
|
291
|
+
loading: y.loading
|
|
292
|
+
}, {
|
|
293
|
+
getHistory: () => y.toasts,
|
|
294
|
+
getToasts: () => y.getActiveToasts()
|
|
295
|
+
});
|
|
296
|
+
c("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");
|
|
297
|
+
function S(e) {
|
|
298
|
+
return e.label !== void 0;
|
|
299
|
+
}
|
|
300
|
+
var C = 3, w = "24px", T = "16px", E = 4e3, D = 356, O = 14, k = 45, re = 200;
|
|
301
|
+
function A(...e) {
|
|
302
|
+
return e.filter(Boolean).join(" ");
|
|
303
|
+
}
|
|
304
|
+
function j(e) {
|
|
305
|
+
let [t, n] = e.split("-"), r = [];
|
|
306
|
+
return t && r.push(t), n && r.push(n), r;
|
|
307
|
+
}
|
|
308
|
+
var ie = (e) => {
|
|
309
|
+
let { invert: n, toast: r, unstyled: i, interacting: a, setHeights: o, visibleToasts: s, heights: c, index: u, toasts: f, expanded: p, removeToast: m, defaultRichColors: h, closeButton: g, style: _, cancelButtonStyle: v, actionButtonStyle: y, className: ne = "", descriptionClassName: b = "", duration: x, position: C, gap: w, expandByDefault: T, classNames: D, icons: O, closeButtonAriaLabel: ie = "Close toast" } = e, [M, N] = t.useState(null), [P, F] = t.useState(null), [I, L] = t.useState(!1), [R, ae] = t.useState(!1), [z, B] = t.useState(!1), [V, oe] = t.useState(!1), [se, ce] = t.useState(!1), [le, H] = t.useState(0), [ue, de] = t.useState(0), U = t.useRef(r.duration || x || E), fe = t.useRef(null), W = t.useRef(null), pe = u === 0, me = u + 1 <= s, G = r.type, he = G ?? "default", K = r.dismissible !== !1, ge = r.className || "", _e = r.descriptionClassName || "", q = t.useMemo(() => c.findIndex((e) => e.toastId === r.id) || 0, [c, r.id]), ve = t.useMemo(() => r.closeButton ?? g, [r.closeButton, g]), ye = t.useMemo(() => r.duration || x || E, [r.duration, x]), J = t.useRef(0), Y = t.useRef(0), be = t.useRef(0), X = t.useRef(null), [xe, Se] = C.split("-"), Ce = t.useMemo(() => c.reduce((e, t, n) => n >= q ? e : e + t.height, 0), [c, q]), we = te(), Z = t.useMemo(() => e.swipeDirections ?? j(C), [e.swipeDirections, C]), Te = r.invert || n, Q = G === "loading";
|
|
310
|
+
Y.current = t.useMemo(() => q * w + Ce, [q, Ce]), t.useEffect(() => {
|
|
311
|
+
U.current = ye;
|
|
312
|
+
}, [ye]), t.useEffect(() => {
|
|
313
|
+
L(!0);
|
|
314
|
+
}, []), t.useEffect(() => {
|
|
315
|
+
let e = W.current;
|
|
316
|
+
if (e) {
|
|
317
|
+
let t = e.getBoundingClientRect().height;
|
|
318
|
+
return de(t), o((e) => [{
|
|
319
|
+
toastId: r.id,
|
|
320
|
+
height: t,
|
|
321
|
+
position: r.position
|
|
322
|
+
}, ...e]), () => o((e) => e.filter((e) => e.toastId !== r.id));
|
|
323
|
+
}
|
|
324
|
+
}, [o, r.id]), t.useLayoutEffect(() => {
|
|
325
|
+
if (!I) return;
|
|
326
|
+
let e = W.current, t = e.style.height;
|
|
327
|
+
e.style.height = "auto";
|
|
328
|
+
let n = e.getBoundingClientRect().height;
|
|
329
|
+
e.style.height = t, de(n), o((e) => e.find((e) => e.toastId === r.id) ? e.map((e) => e.toastId === r.id ? {
|
|
330
|
+
...e,
|
|
331
|
+
height: n
|
|
332
|
+
} : e) : [{
|
|
333
|
+
toastId: r.id,
|
|
334
|
+
height: n,
|
|
335
|
+
position: r.position
|
|
336
|
+
}, ...e]);
|
|
337
|
+
}, [
|
|
338
|
+
I,
|
|
339
|
+
r.title,
|
|
340
|
+
r.description,
|
|
341
|
+
o,
|
|
342
|
+
r.id,
|
|
343
|
+
r.jsx,
|
|
344
|
+
r.action,
|
|
345
|
+
r.cancel
|
|
346
|
+
]);
|
|
347
|
+
let $ = t.useCallback(() => {
|
|
348
|
+
ae(!0), H(Y.current), o((e) => e.filter((e) => e.toastId !== r.id)), setTimeout(() => {
|
|
349
|
+
m(r);
|
|
350
|
+
}, re);
|
|
351
|
+
}, [
|
|
352
|
+
r,
|
|
353
|
+
m,
|
|
354
|
+
o,
|
|
355
|
+
Y
|
|
356
|
+
]);
|
|
357
|
+
t.useEffect(() => {
|
|
358
|
+
if (r.promise && G === "loading" || r.duration === Infinity || r.type === "loading") return;
|
|
359
|
+
let e;
|
|
360
|
+
return p || a || we ? (() => {
|
|
361
|
+
if (be.current < J.current) {
|
|
362
|
+
let e = (/* @__PURE__ */ new Date()).getTime() - J.current;
|
|
363
|
+
U.current -= e;
|
|
364
|
+
}
|
|
365
|
+
be.current = (/* @__PURE__ */ new Date()).getTime();
|
|
366
|
+
})() : U.current !== Infinity && (J.current = (/* @__PURE__ */ new Date()).getTime(), e = setTimeout(() => {
|
|
367
|
+
r.onAutoClose == null || r.onAutoClose.call(r, r), $();
|
|
368
|
+
}, U.current)), () => clearTimeout(e);
|
|
369
|
+
}, [
|
|
370
|
+
p,
|
|
371
|
+
a,
|
|
372
|
+
r,
|
|
373
|
+
G,
|
|
374
|
+
we,
|
|
375
|
+
$
|
|
376
|
+
]), t.useEffect(() => {
|
|
377
|
+
r.delete && ($(), r.onDismiss == null || r.onDismiss.call(r, r));
|
|
378
|
+
}, [$, r.delete]);
|
|
379
|
+
function Ee() {
|
|
380
|
+
return O?.loading ? /*#__PURE__*/ t.createElement("div", {
|
|
381
|
+
className: A(D?.loader, r?.classNames?.loader, "sonner-loader"),
|
|
382
|
+
"data-visible": G === "loading"
|
|
383
|
+
}, O.loading) : /*#__PURE__*/ t.createElement(d, {
|
|
384
|
+
className: A(D?.loader, r?.classNames?.loader),
|
|
385
|
+
visible: G === "loading"
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
let De = r.icon || O?.[G] || l(G);
|
|
389
|
+
return /*#__PURE__*/ t.createElement("li", {
|
|
390
|
+
tabIndex: 0,
|
|
391
|
+
ref: W,
|
|
392
|
+
className: A(ne, ge, D?.toast, r?.classNames?.toast, D?.[he], r?.classNames?.[he]),
|
|
393
|
+
"data-sonner-toast": "",
|
|
394
|
+
"data-rich-colors": r.richColors ?? h,
|
|
395
|
+
"data-styled": !(r.jsx || r.unstyled || i),
|
|
396
|
+
"data-mounted": I,
|
|
397
|
+
"data-promise": !!r.promise,
|
|
398
|
+
"data-swiped": se,
|
|
399
|
+
"data-removed": R,
|
|
400
|
+
"data-visible": me,
|
|
401
|
+
"data-y-position": xe,
|
|
402
|
+
"data-x-position": Se,
|
|
403
|
+
"data-index": u,
|
|
404
|
+
"data-front": pe,
|
|
405
|
+
"data-swiping": z,
|
|
406
|
+
"data-dismissible": K,
|
|
407
|
+
"data-type": G,
|
|
408
|
+
"data-invert": Te,
|
|
409
|
+
"data-swipe-out": V,
|
|
410
|
+
"data-swipe-direction": P,
|
|
411
|
+
"data-expanded": !!(p || T && I),
|
|
412
|
+
"data-testid": r.testId,
|
|
413
|
+
style: {
|
|
414
|
+
"--index": u,
|
|
415
|
+
"--toasts-before": u,
|
|
416
|
+
"--z-index": f.length - u,
|
|
417
|
+
"--offset": `${R ? le : Y.current}px`,
|
|
418
|
+
"--initial-height": T ? "auto" : `${ue}px`,
|
|
419
|
+
..._,
|
|
420
|
+
...r.style
|
|
421
|
+
},
|
|
422
|
+
onDragEnd: () => {
|
|
423
|
+
B(!1), N(null), X.current = null;
|
|
424
|
+
},
|
|
425
|
+
onPointerDown: (e) => {
|
|
426
|
+
e.button !== 2 && (Q || !K || (fe.current = /* @__PURE__ */ new Date(), H(Y.current), e.target.setPointerCapture(e.pointerId), e.target.tagName !== "BUTTON" && (B(!0), X.current = {
|
|
427
|
+
x: e.clientX,
|
|
428
|
+
y: e.clientY
|
|
429
|
+
})));
|
|
430
|
+
},
|
|
431
|
+
onPointerUp: () => {
|
|
432
|
+
if (V || !K) return;
|
|
433
|
+
X.current = null;
|
|
434
|
+
let e = Number(W.current?.style.getPropertyValue("--swipe-amount-x").replace("px", "") || 0), t = Number(W.current?.style.getPropertyValue("--swipe-amount-y").replace("px", "") || 0), n = (/* @__PURE__ */ new Date()).getTime() - fe.current?.getTime(), i = M === "x" ? e : t, a = Math.abs(i) / n;
|
|
435
|
+
if ((M === "x" ? Z.includes(e > 0 ? "right" : "left") : Z.includes(t > 0 ? "bottom" : "top")) && (Math.abs(i) >= k || a > .11)) {
|
|
436
|
+
H(Y.current), r.onDismiss == null || r.onDismiss.call(r, r), F(M === "x" ? e > 0 ? "right" : "left" : t > 0 ? "down" : "up"), $(), oe(!0);
|
|
437
|
+
return;
|
|
438
|
+
} else {
|
|
439
|
+
var o, s;
|
|
440
|
+
(o = W.current) == null || o.style.setProperty("--swipe-amount-x", "0px"), (s = W.current) == null || s.style.setProperty("--swipe-amount-y", "0px");
|
|
441
|
+
}
|
|
442
|
+
ce(!1), B(!1), N(null);
|
|
443
|
+
},
|
|
444
|
+
onPointerMove: (e) => {
|
|
445
|
+
var t, n;
|
|
446
|
+
if (!X.current || !K || window.getSelection()?.toString().length > 0) return;
|
|
447
|
+
let r = e.clientY - X.current.y, i = e.clientX - X.current.x;
|
|
448
|
+
!M && (Math.abs(i) > 1 || Math.abs(r) > 1) && N(Math.abs(i) > Math.abs(r) ? "x" : "y");
|
|
449
|
+
let a = {
|
|
450
|
+
x: 0,
|
|
451
|
+
y: 0
|
|
452
|
+
}, o = (e) => 1 / (1.5 + Math.abs(e) / 20);
|
|
453
|
+
if (M === "y") {
|
|
454
|
+
if (Z.includes("top") || Z.includes("bottom")) if (Z.includes("top") && r < 0 || Z.includes("bottom") && r > 0) a.y = r;
|
|
455
|
+
else {
|
|
456
|
+
let e = r * o(r);
|
|
457
|
+
a.y = Math.abs(e) < Math.abs(r) ? e : r;
|
|
458
|
+
}
|
|
459
|
+
} else if (M === "x" && (Z.includes("left") || Z.includes("right"))) if (Z.includes("left") && i < 0 || Z.includes("right") && i > 0) a.x = i;
|
|
460
|
+
else {
|
|
461
|
+
let e = i * o(i);
|
|
462
|
+
a.x = Math.abs(e) < Math.abs(i) ? e : i;
|
|
463
|
+
}
|
|
464
|
+
(Math.abs(a.x) > 0 || Math.abs(a.y) > 0) && ce(!0), (t = W.current) == null || t.style.setProperty("--swipe-amount-x", `${a.x}px`), (n = W.current) == null || n.style.setProperty("--swipe-amount-y", `${a.y}px`);
|
|
465
|
+
}
|
|
466
|
+
}, ve && !r.jsx && G !== "loading" ? /*#__PURE__*/ t.createElement("button", {
|
|
467
|
+
"aria-label": ie,
|
|
468
|
+
"data-disabled": Q,
|
|
469
|
+
"data-close-button": !0,
|
|
470
|
+
onClick: Q || !K ? () => {} : () => {
|
|
471
|
+
$(), r.onDismiss == null || r.onDismiss.call(r, r);
|
|
472
|
+
},
|
|
473
|
+
className: A(D?.closeButton, r?.classNames?.closeButton)
|
|
474
|
+
}, O?.close ?? ee) : null, (G || r.icon || r.promise) && r.icon !== null && (O?.[G] !== null || r.icon) ? /*#__PURE__*/ t.createElement("div", {
|
|
475
|
+
"data-icon": "",
|
|
476
|
+
className: A(D?.icon, r?.classNames?.icon)
|
|
477
|
+
}, G === "loading" ? r.icon || Ee() : r.promise ? Ee() : null, G === "loading" ? null : De) : null, /*#__PURE__*/ t.createElement("div", {
|
|
478
|
+
"data-content": "",
|
|
479
|
+
className: A(D?.content, r?.classNames?.content)
|
|
480
|
+
}, /*#__PURE__*/ t.createElement("div", {
|
|
481
|
+
"data-title": "",
|
|
482
|
+
className: A(D?.title, r?.classNames?.title)
|
|
483
|
+
}, r.jsx ? r.jsx : typeof r.title == "function" ? r.title() : r.title), r.description ? /*#__PURE__*/ t.createElement("div", {
|
|
484
|
+
"data-description": "",
|
|
485
|
+
className: A(b, _e, D?.description, r?.classNames?.description)
|
|
486
|
+
}, typeof r.description == "function" ? r.description() : r.description) : null), /*#__PURE__*/ t.isValidElement(r.cancel) ? r.cancel : r.cancel && S(r.cancel) ? /*#__PURE__*/ t.createElement("button", {
|
|
487
|
+
"data-button": !0,
|
|
488
|
+
"data-cancel": !0,
|
|
489
|
+
style: r.cancelButtonStyle || v,
|
|
490
|
+
onClick: (e) => {
|
|
491
|
+
S(r.cancel) && K && (r.cancel.onClick == null || r.cancel.onClick.call(r.cancel, e), $());
|
|
492
|
+
},
|
|
493
|
+
className: A(D?.cancelButton, r?.classNames?.cancelButton)
|
|
494
|
+
}, r.cancel.label) : null, /*#__PURE__*/ t.isValidElement(r.action) ? r.action : r.action && S(r.action) ? /*#__PURE__*/ t.createElement("button", {
|
|
495
|
+
"data-button": !0,
|
|
496
|
+
"data-action": !0,
|
|
497
|
+
style: r.actionButtonStyle || y,
|
|
498
|
+
onClick: (e) => {
|
|
499
|
+
S(r.action) && (r.action.onClick == null || r.action.onClick.call(r.action, e), !e.defaultPrevented && $());
|
|
500
|
+
},
|
|
501
|
+
className: A(D?.actionButton, r?.classNames?.actionButton)
|
|
502
|
+
}, r.action.label) : null);
|
|
503
|
+
};
|
|
504
|
+
function M() {
|
|
505
|
+
if (typeof window > "u" || typeof document > "u") return "ltr";
|
|
506
|
+
let e = document.documentElement.getAttribute("dir");
|
|
507
|
+
return e === "auto" || !e ? window.getComputedStyle(document.documentElement).direction : e;
|
|
508
|
+
}
|
|
509
|
+
function N(e, t) {
|
|
510
|
+
let n = {};
|
|
511
|
+
return [e, t].forEach((e, t) => {
|
|
512
|
+
let r = t === 1, i = r ? "--mobile-offset" : "--offset", a = r ? T : w;
|
|
513
|
+
function o(e) {
|
|
514
|
+
[
|
|
515
|
+
"top",
|
|
516
|
+
"right",
|
|
517
|
+
"bottom",
|
|
518
|
+
"left"
|
|
519
|
+
].forEach((t) => {
|
|
520
|
+
n[`${i}-${t}`] = typeof e == "number" ? `${e}px` : e;
|
|
521
|
+
});
|
|
522
|
+
}
|
|
523
|
+
typeof e == "number" || typeof e == "string" ? o(e) : typeof e == "object" ? [
|
|
524
|
+
"top",
|
|
525
|
+
"right",
|
|
526
|
+
"bottom",
|
|
527
|
+
"left"
|
|
528
|
+
].forEach((t) => {
|
|
529
|
+
e[t] === void 0 ? n[`${i}-${t}`] = a : n[`${i}-${t}`] = typeof e[t] == "number" ? `${e[t]}px` : e[t];
|
|
530
|
+
}) : o(a);
|
|
531
|
+
}), n;
|
|
532
|
+
}
|
|
533
|
+
var P = /*#__PURE__*/ t.forwardRef(function(e, n) {
|
|
534
|
+
let { id: i, invert: a, position: o = "bottom-right", hotkey: s = ["altKey", "KeyT"], expand: c, closeButton: l, className: u, offset: d, mobileOffset: f, theme: p = "light", richColors: m, duration: h, style: ee, visibleToasts: te = C, toastOptions: g, dir: _ = M(), gap: v = O, icons: ne, customAriaLabel: b, containerAriaLabel: x = "Notifications" } = e, [S, w] = t.useState([]), T = t.useMemo(() => i ? S.filter((e) => e.toasterId === i) : S.filter((e) => !e.toasterId), [S, i]), E = t.useMemo(() => Array.from(new Set([o].concat(T.filter((e) => e.position).map((e) => e.position)))), [T, o]), [k, re] = t.useState([]), [A, j] = t.useState(!1), [P, F] = t.useState(!1), [I, L] = t.useState(p === "system" ? typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : p), R = t.useRef(null), ae = s.join("+").replace(/Key/g, "").replace(/Digit/g, ""), z = t.useRef(null), B = t.useRef(!1), V = t.useCallback((e) => {
|
|
535
|
+
w((t) => (t.find((t) => t.id === e.id)?.delete || y.dismiss(e.id), t.filter(({ id: t }) => t !== e.id)));
|
|
536
|
+
}, []);
|
|
537
|
+
return t.useEffect(() => y.subscribe((e) => {
|
|
538
|
+
if (e.dismiss) {
|
|
539
|
+
requestAnimationFrame(() => {
|
|
540
|
+
w((t) => t.map((t) => t.id === e.id ? {
|
|
541
|
+
...t,
|
|
542
|
+
delete: !0
|
|
543
|
+
} : t));
|
|
544
|
+
});
|
|
545
|
+
return;
|
|
546
|
+
}
|
|
547
|
+
setTimeout(() => {
|
|
548
|
+
r.flushSync(() => {
|
|
549
|
+
w((t) => {
|
|
550
|
+
let n = t.findIndex((t) => t.id === e.id);
|
|
551
|
+
return n === -1 ? [e, ...t] : [
|
|
552
|
+
...t.slice(0, n),
|
|
553
|
+
{
|
|
554
|
+
...t[n],
|
|
555
|
+
...e
|
|
556
|
+
},
|
|
557
|
+
...t.slice(n + 1)
|
|
558
|
+
];
|
|
559
|
+
});
|
|
560
|
+
});
|
|
561
|
+
});
|
|
562
|
+
}), []), t.useEffect(() => {
|
|
563
|
+
if (p !== "system") {
|
|
564
|
+
L(p);
|
|
565
|
+
return;
|
|
566
|
+
}
|
|
567
|
+
if (p === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? L("dark") : L("light")), typeof window > "u") return;
|
|
568
|
+
let e = window.matchMedia("(prefers-color-scheme: dark)");
|
|
569
|
+
try {
|
|
570
|
+
e.addEventListener("change", ({ matches: e }) => {
|
|
571
|
+
L(e ? "dark" : "light");
|
|
572
|
+
});
|
|
573
|
+
} catch {
|
|
574
|
+
e.addListener(({ matches: e }) => {
|
|
575
|
+
try {
|
|
576
|
+
L(e ? "dark" : "light");
|
|
577
|
+
} catch (e) {
|
|
578
|
+
console.error(e);
|
|
579
|
+
}
|
|
580
|
+
});
|
|
581
|
+
}
|
|
582
|
+
}, [p]), t.useEffect(() => {
|
|
583
|
+
S.length <= 1 && j(!1);
|
|
584
|
+
}, [S]), t.useEffect(() => {
|
|
585
|
+
let e = (e) => {
|
|
586
|
+
if (s.length > 0 && s.every((t) => e[t] || e.code === t)) {
|
|
587
|
+
var t;
|
|
588
|
+
j(!0), (t = R.current) == null || t.focus();
|
|
589
|
+
}
|
|
590
|
+
e.code === "Escape" && (document.activeElement === R.current || R.current?.contains(document.activeElement)) && j(!1);
|
|
591
|
+
};
|
|
592
|
+
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
593
|
+
}, [s]), t.useEffect(() => {
|
|
594
|
+
if (R.current) return () => {
|
|
595
|
+
z.current && (z.current.focus({ preventScroll: !0 }), z.current = null, B.current = !1);
|
|
596
|
+
};
|
|
597
|
+
}, [R.current]), /*#__PURE__*/ t.createElement("section", {
|
|
598
|
+
ref: n,
|
|
599
|
+
"aria-label": b ?? `${x} ${ae}`,
|
|
600
|
+
tabIndex: -1,
|
|
601
|
+
"aria-live": "polite",
|
|
602
|
+
"aria-relevant": "additions text",
|
|
603
|
+
"aria-atomic": "false",
|
|
604
|
+
suppressHydrationWarning: !0,
|
|
605
|
+
"data-react-aria-top-layer": !0
|
|
606
|
+
}, E.map((n, r) => {
|
|
607
|
+
let [i, o] = n.split("-");
|
|
608
|
+
return T.length ? /*#__PURE__*/ t.createElement("ol", {
|
|
609
|
+
key: n,
|
|
610
|
+
dir: _ === "auto" ? M() : _,
|
|
611
|
+
tabIndex: -1,
|
|
612
|
+
ref: R,
|
|
613
|
+
className: u,
|
|
614
|
+
"data-sonner-toaster": !0,
|
|
615
|
+
"data-sonner-theme": I,
|
|
616
|
+
"data-y-position": i,
|
|
617
|
+
"data-x-position": o,
|
|
618
|
+
style: {
|
|
619
|
+
"--front-toast-height": `${k[0]?.height || 0}px`,
|
|
620
|
+
"--width": `${D}px`,
|
|
621
|
+
"--gap": `${v}px`,
|
|
622
|
+
...ee,
|
|
623
|
+
...N(d, f)
|
|
624
|
+
},
|
|
625
|
+
onBlur: (e) => {
|
|
626
|
+
B.current && !e.currentTarget.contains(e.relatedTarget) && (B.current = !1, z.current &&= (z.current.focus({ preventScroll: !0 }), null));
|
|
627
|
+
},
|
|
628
|
+
onFocus: (e) => {
|
|
629
|
+
e.target instanceof HTMLElement && e.target.dataset.dismissible === "false" || B.current || (B.current = !0, z.current = e.relatedTarget);
|
|
630
|
+
},
|
|
631
|
+
onMouseEnter: () => j(!0),
|
|
632
|
+
onMouseMove: () => j(!0),
|
|
633
|
+
onMouseLeave: () => {
|
|
634
|
+
P || j(!1);
|
|
635
|
+
},
|
|
636
|
+
onDragEnd: () => j(!1),
|
|
637
|
+
onPointerDown: (e) => {
|
|
638
|
+
e.target instanceof HTMLElement && e.target.dataset.dismissible === "false" || F(!0);
|
|
639
|
+
},
|
|
640
|
+
onPointerUp: () => F(!1)
|
|
641
|
+
}, T.filter((e) => !e.position && r === 0 || e.position === n).map((r, i) => /*#__PURE__*/ t.createElement(ie, {
|
|
642
|
+
key: r.id,
|
|
643
|
+
icons: ne,
|
|
644
|
+
index: i,
|
|
645
|
+
toast: r,
|
|
646
|
+
defaultRichColors: m,
|
|
647
|
+
duration: g?.duration ?? h,
|
|
648
|
+
className: g?.className,
|
|
649
|
+
descriptionClassName: g?.descriptionClassName,
|
|
650
|
+
invert: a,
|
|
651
|
+
visibleToasts: te,
|
|
652
|
+
closeButton: g?.closeButton ?? l,
|
|
653
|
+
interacting: P,
|
|
654
|
+
position: n,
|
|
655
|
+
style: g?.style,
|
|
656
|
+
unstyled: g?.unstyled,
|
|
657
|
+
classNames: g?.classNames,
|
|
658
|
+
cancelButtonStyle: g?.cancelButtonStyle,
|
|
659
|
+
actionButtonStyle: g?.actionButtonStyle,
|
|
660
|
+
closeButtonAriaLabel: g?.closeButtonAriaLabel,
|
|
661
|
+
removeToast: V,
|
|
662
|
+
toasts: T.filter((e) => e.position == r.position),
|
|
663
|
+
heights: k.filter((e) => e.position == r.position),
|
|
664
|
+
setHeights: re,
|
|
665
|
+
expandByDefault: c,
|
|
666
|
+
gap: v,
|
|
667
|
+
expanded: A,
|
|
668
|
+
swipeDirections: e.swipeDirections
|
|
669
|
+
}))) : null;
|
|
670
|
+
}));
|
|
671
|
+
}), F = ({ ...e }) => {
|
|
672
|
+
let { theme: t = "system" } = s();
|
|
673
|
+
return typeof window > "u" ? null : /* @__PURE__ */ n(P, {
|
|
674
|
+
className: "toaster group flex justify-center",
|
|
675
|
+
duration: 2e3,
|
|
676
|
+
mobileOffset: {
|
|
677
|
+
top: 25,
|
|
678
|
+
left: 20,
|
|
679
|
+
right: 20,
|
|
680
|
+
bottom: 25
|
|
681
|
+
},
|
|
682
|
+
position: "bottom-center",
|
|
683
|
+
theme: t,
|
|
684
|
+
toastOptions: {
|
|
685
|
+
unstyled: !0,
|
|
686
|
+
className: "w-fit",
|
|
687
|
+
classNames: {
|
|
688
|
+
toast: "flex bg-gray-900/80 rounded-[15px] text-white gap-2.5 justify-between items-center p-2.5 pl-3.75 pb-2 min-h-[55px]",
|
|
689
|
+
title: "typo-t3",
|
|
690
|
+
actionButton: "bg-gray-800 text-white typo-t4 rounded-[8px] px-[10px] py-[9.5px] text-white grid place-items-center active:bg-gray-500"
|
|
691
|
+
}
|
|
692
|
+
},
|
|
693
|
+
visibleToasts: 1,
|
|
694
|
+
...e
|
|
695
|
+
});
|
|
696
|
+
};
|
|
697
|
+
//#endregion
|
|
698
|
+
export { x as n, F as t };
|