@versini/sassysaint 8.126.7 → 8.128.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.
Files changed (84) hide show
  1. package/dist/chunks/{AboutChangelog.CW-Izs66.js → AboutChangelog.BaCzQIqD.js} +2 -2
  2. package/dist/chunks/{AboutEntry.DBy-y5Ti.js → AboutEntry.eW1BM9CA.js} +8 -8
  3. package/dist/chunks/{App.B-md2rcu.js → App.CC33vL5i.js} +2402 -2428
  4. package/dist/chunks/{BubbleActions.B8rq1SsN.js → BubbleActions.es9LLF18.js} +9 -12
  5. package/dist/chunks/{ButtonIconDelete.JtVTVoIm.js → ButtonIconDelete.90PiEjs7.js} +4 -4
  6. package/dist/chunks/{Chart.CtxoFzUx.js → Chart.DUt_7vIL.js} +2 -2
  7. package/dist/chunks/{ChatBubbleAssistant.BtzJwzIk.js → ChatBubbleAssistant.B5jxh8vW.js} +5 -5
  8. package/dist/chunks/{ChatBubbleUser.C34kYYGx.js → ChatBubbleUser.D5XEunyx.js} +4 -4
  9. package/dist/chunks/{GenericPanel.etdBsslu.js → GenericPanel.Bf-hQWg5.js} +1 -1
  10. package/dist/chunks/{HistoryEntry.CECnIGUg.js → HistoryEntry.BcJRi9F8.js} +82 -86
  11. package/dist/chunks/{LoginEntry.BYfbRBYg.js → LoginEntry.D3t0yZDn.js} +4 -4
  12. package/dist/chunks/{LogoEntry.CRQF4cxX.js → LogoEntry.BMOnjgmn.js} +191 -192
  13. package/dist/chunks/{MemoriesEntry.Pbp4i_A_.js → MemoriesEntry.CT7Tg3DJ.js} +6 -6
  14. package/dist/chunks/{ProfileEntry.CI9p9RFG.js → ProfileEntry.BJr9XGP9.js} +45 -50
  15. package/dist/chunks/{SettingsEntry.CLssrhX8.js → SettingsEntry.DvfCS9tj.js} +6 -6
  16. package/dist/chunks/{UsageEntry.w73jBoTN.js → UsageEntry.CBUbgFys.js} +6 -6
  17. package/dist/chunks/{_baseUniq.Cd1UQpLO.js → _baseUniq.C05YPW9C.js} +1 -1
  18. package/dist/chunks/{arc.D4c8to6F.js → arc.Cf5K6vl_.js} +1 -1
  19. package/dist/chunks/{architecture-U656AL7Q.B9lITtMs.js → architecture-U656AL7Q.CZy-Pdvp.js} +1 -1
  20. package/dist/chunks/{architectureDiagram-VXUJARFQ.BIC6ZHca.js → architectureDiagram-VXUJARFQ.BIs2ud_G.js} +4 -4
  21. package/dist/chunks/{blockDiagram-VD42YOAC.BBMb6Nqs.js → blockDiagram-VD42YOAC.BPoyL5aF.js} +5 -5
  22. package/dist/chunks/{browser.D7OX3j7D.js → browser.DObrbMlL.js} +1 -1
  23. package/dist/chunks/{c4Diagram-YG6GDRKO.DaMxCrVF.js → c4Diagram-YG6GDRKO.BB9IW_Rn.js} +2 -2
  24. package/dist/chunks/{channel.CnlPlGuY.js → channel.CgqWkmba.js} +1 -1
  25. package/dist/chunks/{chunk-4BX2VUAB.l1nq9vFq.js → chunk-4BX2VUAB.Cmc7-DdG.js} +1 -1
  26. package/dist/chunks/{chunk-55IACEB6.BF4RUrON.js → chunk-55IACEB6.CN2uBDDO.js} +1 -1
  27. package/dist/chunks/{chunk-B4BG7PRW.BK7fKwGA.js → chunk-B4BG7PRW.DBDBMwjU.js} +4 -4
  28. package/dist/chunks/{chunk-DI55MBZ5.BKjbItc8.js → chunk-DI55MBZ5.Cz3LdADZ.js} +3 -3
  29. package/dist/chunks/{chunk-FMBD7UC4.BE5Woiu7.js → chunk-FMBD7UC4.DapfiQi4.js} +1 -1
  30. package/dist/chunks/{chunk-QN33PNHL.gPNHlIzJ.js → chunk-QN33PNHL.Dvmk9wzi.js} +1 -1
  31. package/dist/chunks/{chunk-QZHKN3VN.5wNS8trN.js → chunk-QZHKN3VN.BwMfpp5t.js} +1 -1
  32. package/dist/chunks/{chunk-TZMSLE5B.BKh2yO_r.js → chunk-TZMSLE5B.BB9VNFNe.js} +1 -1
  33. package/dist/chunks/{classDiagram-2ON5EDUG.kipwuaZZ.js → classDiagram-2ON5EDUG.CoSYun8e.js} +2 -2
  34. package/dist/chunks/{classDiagram-v2-WZHVMYZB.kipwuaZZ.js → classDiagram-v2-WZHVMYZB.CoSYun8e.js} +2 -2
  35. package/dist/chunks/{clone.CCFxMO0c.js → clone.7t5Injbh.js} +1 -1
  36. package/dist/chunks/{cose-bilkent-S5V4N54A.CkCCiu8R.js → cose-bilkent-S5V4N54A.DcgFw2nC.js} +2 -2
  37. package/dist/chunks/{dagre-6UL2VRFP.Beoz6gTt.js → dagre-6UL2VRFP.stVQNin0.js} +5 -5
  38. package/dist/chunks/{diagram-PSM6KHXK.8RPMv7wd.js → diagram-PSM6KHXK.Bfp-k4dp.js} +4 -4
  39. package/dist/chunks/{diagram-QEK2KX5R.BnhMDTJF.js → diagram-QEK2KX5R.Dn4JXePy.js} +3 -3
  40. package/dist/chunks/{diagram-S2PKOQOG.Ug0j7YIr.js → diagram-S2PKOQOG.XP_j_ZFC.js} +3 -3
  41. package/dist/chunks/{erDiagram-Q2GNP2WA.C8rnB1TI.js → erDiagram-Q2GNP2WA.DvkJcNF9.js} +4 -4
  42. package/dist/chunks/{flowDiagram-NV44I4VS.BMqo2W_h.js → flowDiagram-NV44I4VS.Hn0PROgU.js} +5 -5
  43. package/dist/chunks/{ganttDiagram-JELNMOA3.CGcayHSs.js → ganttDiagram-JELNMOA3.Bf2PkTYR.js} +2 -2
  44. package/dist/chunks/{gitGraph-F6HP7TQM.oMl7XYpx.js → gitGraph-F6HP7TQM.BAL9tPb8.js} +1 -1
  45. package/dist/chunks/{gitGraphDiagram-NY62KEGX.B4aBo3Ma.js → gitGraphDiagram-NY62KEGX.D-INdXxg.js} +4 -4
  46. package/dist/chunks/{graph.P_jhAD76.js → graph.BdKcquxL.js} +2 -2
  47. package/dist/chunks/{index.DWQE2iX-.js → index.0JHn1e2U.js} +432 -457
  48. package/dist/chunks/{index.DwHqn9k5.js → index.5fyUtTLH.js} +1 -1
  49. package/dist/chunks/{index.DmPS0LKW.js → index.6L4XnWtC.js} +1 -1
  50. package/dist/chunks/{index.DdhYWjUr.js → index.B4AUmI6b.js} +1 -1
  51. package/dist/chunks/index.BPJsF71r.js +778 -0
  52. package/dist/chunks/{index.Du1LYe4A.js → index.Bc_G-sOy.js} +1 -1
  53. package/dist/chunks/{index.BEVp3tQU.js → index.DI-kWtZC.js} +1 -1
  54. package/dist/chunks/{index.DbzrE5oY.js → index.WIzP-Pra.js} +1 -1
  55. package/dist/chunks/{index.CgYK85eC.js → index.X8Fsvrzr.js} +3 -3
  56. package/dist/chunks/{index.kvM5mFnS.js → index.cfsSIuD8.js} +3 -3
  57. package/dist/chunks/{index.CIRTMm47.js → index.k2KcXUHd.js} +1 -1
  58. package/dist/chunks/{info-NVLQJR56.DUhWWJrK.js → info-NVLQJR56.DcGA1jrE.js} +1 -1
  59. package/dist/chunks/{infoDiagram-WHAUD3N6.DCcSzT7y.js → infoDiagram-WHAUD3N6.P7BalyWy.js} +2 -2
  60. package/dist/chunks/{journeyDiagram-XKPGCS4Q.qrZHRTxm.js → journeyDiagram-XKPGCS4Q.Bz2aO32S.js} +4 -4
  61. package/dist/chunks/{kanban-definition-3W4ZIXB7.BFukrzhr.js → kanban-definition-3W4ZIXB7.B6Xoovxx.js} +2 -2
  62. package/dist/chunks/{layout.BqCTDG8Y.js → layout.CCpEwh-_.js} +4 -4
  63. package/dist/chunks/{mermaid-parser.core.CondFBax.js → mermaid-parser.core.D_GFlU1z.js} +10 -10
  64. package/dist/chunks/{min.lZGJAA1K.js → min.DTnSBUC_.js} +2 -2
  65. package/dist/chunks/{mindmap-definition-VGOIOE7T.CT54E3Sw.js → mindmap-definition-VGOIOE7T.DHQdU4lr.js} +3 -3
  66. package/dist/chunks/{packet-BFZMPI3H.iK3_CF5T.js → packet-BFZMPI3H.D1zjOFZd.js} +1 -1
  67. package/dist/chunks/{pie-7BOR55EZ.D1Qq3bYW.js → pie-7BOR55EZ.CeO5-_U1.js} +1 -1
  68. package/dist/chunks/{pieDiagram-ADFJNKIX.DXGCDAKy.js → pieDiagram-ADFJNKIX.vlumWtQJ.js} +4 -4
  69. package/dist/chunks/{quadrantDiagram-AYHSOK5B.ojRkTS5g.js → quadrantDiagram-AYHSOK5B.C-pd5lvj.js} +1 -1
  70. package/dist/chunks/{radar-NHE76QYJ.DkDiAIKY.js → radar-NHE76QYJ.CnAfsBzR.js} +1 -1
  71. package/dist/chunks/{rehype-mermaid.RyRyGhWJ.js → rehype-mermaid.BnWXv7Wc.js} +33 -33
  72. package/dist/chunks/{requirementDiagram-UZGBJVZJ.BFd3U9DZ.js → requirementDiagram-UZGBJVZJ.CmVyiL7B.js} +3 -3
  73. package/dist/chunks/{sankeyDiagram-TZEHDZUN.pQuaGohB.js → sankeyDiagram-TZEHDZUN.BQjhJ4Tg.js} +1 -1
  74. package/dist/chunks/{sequenceDiagram-WL72ISMW.4Yva7tjD.js → sequenceDiagram-WL72ISMW.BtL6Q2gQ.js} +3 -3
  75. package/dist/chunks/{stateDiagram-FKZM4ZOC.ow8Ua1so.js → stateDiagram-FKZM4ZOC.ky8Am5SK.js} +4 -4
  76. package/dist/chunks/{stateDiagram-v2-4FDKWEC3.CzZfEcrx.js → stateDiagram-v2-4FDKWEC3.CKnfbP2Y.js} +2 -2
  77. package/dist/chunks/{timeline-definition-IT6M3QCI.B64DUZm1.js → timeline-definition-IT6M3QCI.BK4Qztez.js} +2 -2
  78. package/dist/chunks/{treemap-KMMF4GRG.CZ3EzCMU.js → treemap-KMMF4GRG.BdCfmZGD.js} +1 -1
  79. package/dist/chunks/{useMarkdown.CTShtPKa.js → useMarkdown.BF1KYabA.js} +8 -8
  80. package/dist/chunks/{xychartDiagram-PRI3JC2R.DT-Jxd2g.js → xychartDiagram-PRI3JC2R.X4OHZ3WQ.js} +1 -1
  81. package/dist/components/SassySaint/SassySaint.js +1 -1
  82. package/dist/index.js +3 -3
  83. package/package.json +3 -3
  84. package/dist/chunks/index.ri2Dr1rJ.js +0 -389
@@ -0,0 +1,778 @@
1
+ import a from "react";
2
+ import wt from "react-dom";
3
+ function Xt(r) {
4
+ if (typeof document > "u") return;
5
+ let o = document.head || document.getElementsByTagName("head")[0], e = document.createElement("style");
6
+ e.type = "text/css", o.appendChild(e), e.styleSheet ? e.styleSheet.cssText = r : e.appendChild(document.createTextNode(r));
7
+ }
8
+ const Wt = (r) => {
9
+ switch (r) {
10
+ case "success":
11
+ return Gt;
12
+ case "info":
13
+ return Jt;
14
+ case "warning":
15
+ return Qt;
16
+ case "error":
17
+ return Zt;
18
+ default:
19
+ return null;
20
+ }
21
+ }, Kt = Array(12).fill(0), qt = ({ visible: r, className: o }) => /* @__PURE__ */ a.createElement("div", {
22
+ className: [
23
+ "sonner-loading-wrapper",
24
+ o
25
+ ].filter(Boolean).join(" "),
26
+ "data-visible": r
27
+ }, /* @__PURE__ */ a.createElement("div", {
28
+ className: "sonner-spinner"
29
+ }, Kt.map((e, s) => /* @__PURE__ */ a.createElement("div", {
30
+ className: "sonner-loading-bar",
31
+ key: `spinner-bar-${s}`
32
+ })))), Gt = /* @__PURE__ */ a.createElement("svg", {
33
+ xmlns: "http://www.w3.org/2000/svg",
34
+ viewBox: "0 0 20 20",
35
+ fill: "currentColor",
36
+ height: "20",
37
+ width: "20"
38
+ }, /* @__PURE__ */ a.createElement("path", {
39
+ fillRule: "evenodd",
40
+ 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",
41
+ clipRule: "evenodd"
42
+ })), Qt = /* @__PURE__ */ a.createElement("svg", {
43
+ xmlns: "http://www.w3.org/2000/svg",
44
+ viewBox: "0 0 24 24",
45
+ fill: "currentColor",
46
+ height: "20",
47
+ width: "20"
48
+ }, /* @__PURE__ */ a.createElement("path", {
49
+ fillRule: "evenodd",
50
+ 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",
51
+ clipRule: "evenodd"
52
+ })), Jt = /* @__PURE__ */ a.createElement("svg", {
53
+ xmlns: "http://www.w3.org/2000/svg",
54
+ viewBox: "0 0 20 20",
55
+ fill: "currentColor",
56
+ height: "20",
57
+ width: "20"
58
+ }, /* @__PURE__ */ a.createElement("path", {
59
+ fillRule: "evenodd",
60
+ 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",
61
+ clipRule: "evenodd"
62
+ })), Zt = /* @__PURE__ */ a.createElement("svg", {
63
+ xmlns: "http://www.w3.org/2000/svg",
64
+ viewBox: "0 0 20 20",
65
+ fill: "currentColor",
66
+ height: "20",
67
+ width: "20"
68
+ }, /* @__PURE__ */ a.createElement("path", {
69
+ fillRule: "evenodd",
70
+ 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",
71
+ clipRule: "evenodd"
72
+ })), te = /* @__PURE__ */ a.createElement("svg", {
73
+ xmlns: "http://www.w3.org/2000/svg",
74
+ width: "12",
75
+ height: "12",
76
+ viewBox: "0 0 24 24",
77
+ fill: "none",
78
+ stroke: "currentColor",
79
+ strokeWidth: "1.5",
80
+ strokeLinecap: "round",
81
+ strokeLinejoin: "round"
82
+ }, /* @__PURE__ */ a.createElement("line", {
83
+ x1: "18",
84
+ y1: "6",
85
+ x2: "6",
86
+ y2: "18"
87
+ }), /* @__PURE__ */ a.createElement("line", {
88
+ x1: "6",
89
+ y1: "6",
90
+ x2: "18",
91
+ y2: "18"
92
+ })), ee = () => {
93
+ const [r, o] = a.useState(document.hidden);
94
+ return a.useEffect(() => {
95
+ const e = () => {
96
+ o(document.hidden);
97
+ };
98
+ return document.addEventListener("visibilitychange", e), () => window.removeEventListener("visibilitychange", e);
99
+ }, []), r;
100
+ };
101
+ let Et = 1;
102
+ class ae {
103
+ constructor() {
104
+ this.subscribe = (o) => (this.subscribers.push(o), () => {
105
+ const e = this.subscribers.indexOf(o);
106
+ this.subscribers.splice(e, 1);
107
+ }), this.publish = (o) => {
108
+ this.subscribers.forEach((e) => e(o));
109
+ }, this.addToast = (o) => {
110
+ this.publish(o), this.toasts = [
111
+ ...this.toasts,
112
+ o
113
+ ];
114
+ }, this.create = (o) => {
115
+ var e;
116
+ const { message: s, ...b } = o, c = typeof o?.id == "number" || ((e = o.id) == null ? void 0 : e.length) > 0 ? o.id : Et++, g = this.toasts.find((v) => v.id === c), D = o.dismissible === void 0 ? !0 : o.dismissible;
117
+ return this.dismissedToasts.has(c) && this.dismissedToasts.delete(c), g ? this.toasts = this.toasts.map((v) => v.id === c ? (this.publish({
118
+ ...v,
119
+ ...o,
120
+ id: c,
121
+ title: s
122
+ }), {
123
+ ...v,
124
+ ...o,
125
+ id: c,
126
+ dismissible: D,
127
+ title: s
128
+ }) : v) : this.addToast({
129
+ title: s,
130
+ ...b,
131
+ dismissible: D,
132
+ id: c
133
+ }), c;
134
+ }, this.dismiss = (o) => (o ? (this.dismissedToasts.add(o), requestAnimationFrame(() => this.subscribers.forEach((e) => e({
135
+ id: o,
136
+ dismiss: !0
137
+ })))) : this.toasts.forEach((e) => {
138
+ this.subscribers.forEach((s) => s({
139
+ id: e.id,
140
+ dismiss: !0
141
+ }));
142
+ }), o), this.message = (o, e) => this.create({
143
+ ...e,
144
+ message: o
145
+ }), this.error = (o, e) => this.create({
146
+ ...e,
147
+ message: o,
148
+ type: "error"
149
+ }), this.success = (o, e) => this.create({
150
+ ...e,
151
+ type: "success",
152
+ message: o
153
+ }), this.info = (o, e) => this.create({
154
+ ...e,
155
+ type: "info",
156
+ message: o
157
+ }), this.warning = (o, e) => this.create({
158
+ ...e,
159
+ type: "warning",
160
+ message: o
161
+ }), this.loading = (o, e) => this.create({
162
+ ...e,
163
+ type: "loading",
164
+ message: o
165
+ }), this.promise = (o, e) => {
166
+ if (!e)
167
+ return;
168
+ let s;
169
+ e.loading !== void 0 && (s = this.create({
170
+ ...e,
171
+ promise: o,
172
+ type: "loading",
173
+ message: e.loading,
174
+ description: typeof e.description != "function" ? e.description : void 0
175
+ }));
176
+ const b = Promise.resolve(o instanceof Function ? o() : o);
177
+ let c = s !== void 0, g;
178
+ const D = b.then(async (i) => {
179
+ if (g = [
180
+ "resolve",
181
+ i
182
+ ], a.isValidElement(i))
183
+ c = !1, this.create({
184
+ id: s,
185
+ type: "default",
186
+ message: i
187
+ });
188
+ else if (se(i) && !i.ok) {
189
+ c = !1;
190
+ const t = typeof e.error == "function" ? await e.error(`HTTP error! status: ${i.status}`) : e.error, E = typeof e.description == "function" ? await e.description(`HTTP error! status: ${i.status}`) : e.description, T = typeof t == "object" && !a.isValidElement(t) ? t : {
191
+ message: t
192
+ };
193
+ this.create({
194
+ id: s,
195
+ type: "error",
196
+ description: E,
197
+ ...T
198
+ });
199
+ } else if (i instanceof Error) {
200
+ c = !1;
201
+ const t = typeof e.error == "function" ? await e.error(i) : e.error, E = typeof e.description == "function" ? await e.description(i) : e.description, T = typeof t == "object" && !a.isValidElement(t) ? t : {
202
+ message: t
203
+ };
204
+ this.create({
205
+ id: s,
206
+ type: "error",
207
+ description: E,
208
+ ...T
209
+ });
210
+ } else if (e.success !== void 0) {
211
+ c = !1;
212
+ const t = typeof e.success == "function" ? await e.success(i) : e.success, E = typeof e.description == "function" ? await e.description(i) : e.description, T = typeof t == "object" && !a.isValidElement(t) ? t : {
213
+ message: t
214
+ };
215
+ this.create({
216
+ id: s,
217
+ type: "success",
218
+ description: E,
219
+ ...T
220
+ });
221
+ }
222
+ }).catch(async (i) => {
223
+ if (g = [
224
+ "reject",
225
+ i
226
+ ], e.error !== void 0) {
227
+ c = !1;
228
+ const N = typeof e.error == "function" ? await e.error(i) : e.error, t = typeof e.description == "function" ? await e.description(i) : e.description, O = typeof N == "object" && !a.isValidElement(N) ? N : {
229
+ message: N
230
+ };
231
+ this.create({
232
+ id: s,
233
+ type: "error",
234
+ description: t,
235
+ ...O
236
+ });
237
+ }
238
+ }).finally(() => {
239
+ c && (this.dismiss(s), s = void 0), e.finally == null || e.finally.call(e);
240
+ }), v = () => new Promise((i, N) => D.then(() => g[0] === "reject" ? N(g[1]) : i(g[1])).catch(N));
241
+ return typeof s != "string" && typeof s != "number" ? {
242
+ unwrap: v
243
+ } : Object.assign(s, {
244
+ unwrap: v
245
+ });
246
+ }, this.custom = (o, e) => {
247
+ const s = e?.id || Et++;
248
+ return this.create({
249
+ jsx: o(s),
250
+ id: s,
251
+ ...e
252
+ }), s;
253
+ }, this.getActiveToasts = () => this.toasts.filter((o) => !this.dismissedToasts.has(o.id)), this.subscribers = [], this.toasts = [], this.dismissedToasts = /* @__PURE__ */ new Set();
254
+ }
255
+ }
256
+ const S = new ae(), oe = (r, o) => {
257
+ const e = o?.id || Et++;
258
+ return S.addToast({
259
+ title: r,
260
+ ...o,
261
+ id: e
262
+ }), e;
263
+ }, se = (r) => r && typeof r == "object" && "ok" in r && typeof r.ok == "boolean" && "status" in r && typeof r.status == "number", ne = oe, re = () => S.toasts, ie = () => S.getActiveToasts(), we = Object.assign(ne, {
264
+ success: S.success,
265
+ info: S.info,
266
+ warning: S.warning,
267
+ error: S.error,
268
+ custom: S.custom,
269
+ message: S.message,
270
+ promise: S.promise,
271
+ dismiss: S.dismiss,
272
+ loading: S.loading
273
+ }, {
274
+ getHistory: re,
275
+ getToasts: ie
276
+ });
277
+ Xt("[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}[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(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);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]{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%)}");
278
+ function mt(r) {
279
+ return r.label !== void 0;
280
+ }
281
+ const le = 3, de = "24px", ce = "16px", It = 4e3, ue = 356, fe = 14, me = 45, pe = 200;
282
+ function H(...r) {
283
+ return r.filter(Boolean).join(" ");
284
+ }
285
+ function ge(r) {
286
+ const [o, e] = r.split("-"), s = [];
287
+ return o && s.push(o), e && s.push(e), s;
288
+ }
289
+ const he = (r) => {
290
+ var o, e, s, b, c, g, D, v, i;
291
+ const { invert: N, toast: t, unstyled: E, interacting: O, setHeights: T, visibleToasts: pt, heights: U, index: d, toasts: ot, expanded: X, removeToast: st, defaultRichColors: gt, closeButton: z, style: Z, cancelButtonStyle: Y, actionButtonStyle: ht, className: nt = "", descriptionClassName: bt = "", duration: tt, position: A, gap: rt, expandByDefault: et, classNames: u, icons: y, closeButtonAriaLabel: j = "Close toast" } = r, [$, M] = a.useState(null), [F, it] = a.useState(null), [l, p] = a.useState(!1), [m, R] = a.useState(!1), [W, f] = a.useState(!1), [K, lt] = a.useState(!1), [dt, q] = a.useState(!1), [At, vt] = a.useState(0), [Ht, Tt] = a.useState(0), at = a.useRef(t.duration || tt || It), St = a.useRef(null), P = a.useRef(null), Ot = d === 0, zt = d + 1 <= pt, k = t.type, G = t.dismissible !== !1, Pt = t.className || "", jt = t.descriptionClassName || "", ct = a.useMemo(() => U.findIndex((n) => n.toastId === t.id) || 0, [
292
+ U,
293
+ t.id
294
+ ]), Lt = a.useMemo(() => {
295
+ var n;
296
+ return (n = t.closeButton) != null ? n : z;
297
+ }, [
298
+ t.closeButton,
299
+ z
300
+ ]), Nt = a.useMemo(() => t.duration || tt || It, [
301
+ t.duration,
302
+ tt
303
+ ]), yt = a.useRef(0), Q = a.useRef(0), kt = a.useRef(0), J = a.useRef(null), [Yt, $t] = A.split("-"), _t = a.useMemo(() => U.reduce((n, h, w) => w >= ct ? n : n + h.height, 0), [
304
+ U,
305
+ ct
306
+ ]), Dt = ee(), Ft = t.invert || N, xt = k === "loading";
307
+ Q.current = a.useMemo(() => ct * rt + _t, [
308
+ ct,
309
+ _t
310
+ ]), a.useEffect(() => {
311
+ at.current = Nt;
312
+ }, [
313
+ Nt
314
+ ]), a.useEffect(() => {
315
+ p(!0);
316
+ }, []), a.useEffect(() => {
317
+ const n = P.current;
318
+ if (n) {
319
+ const h = n.getBoundingClientRect().height;
320
+ return Tt(h), T((w) => [
321
+ {
322
+ toastId: t.id,
323
+ height: h,
324
+ position: t.position
325
+ },
326
+ ...w
327
+ ]), () => T((w) => w.filter((_) => _.toastId !== t.id));
328
+ }
329
+ }, [
330
+ T,
331
+ t.id
332
+ ]), a.useLayoutEffect(() => {
333
+ if (!l) return;
334
+ const n = P.current, h = n.style.height;
335
+ n.style.height = "auto";
336
+ const w = n.getBoundingClientRect().height;
337
+ n.style.height = h, Tt(w), T((_) => _.find((x) => x.toastId === t.id) ? _.map((x) => x.toastId === t.id ? {
338
+ ...x,
339
+ height: w
340
+ } : x) : [
341
+ {
342
+ toastId: t.id,
343
+ height: w,
344
+ position: t.position
345
+ },
346
+ ..._
347
+ ]);
348
+ }, [
349
+ l,
350
+ t.title,
351
+ t.description,
352
+ T,
353
+ t.id,
354
+ t.jsx,
355
+ t.action,
356
+ t.cancel
357
+ ]);
358
+ const L = a.useCallback(() => {
359
+ R(!0), vt(Q.current), T((n) => n.filter((h) => h.toastId !== t.id)), setTimeout(() => {
360
+ st(t);
361
+ }, pe);
362
+ }, [
363
+ t,
364
+ st,
365
+ T,
366
+ Q
367
+ ]);
368
+ a.useEffect(() => {
369
+ if (t.promise && k === "loading" || t.duration === 1 / 0 || t.type === "loading") return;
370
+ let n;
371
+ return X || O || Dt ? (() => {
372
+ if (kt.current < yt.current) {
373
+ const _ = (/* @__PURE__ */ new Date()).getTime() - yt.current;
374
+ at.current = at.current - _;
375
+ }
376
+ kt.current = (/* @__PURE__ */ new Date()).getTime();
377
+ })() : at.current !== 1 / 0 && (yt.current = (/* @__PURE__ */ new Date()).getTime(), n = setTimeout(() => {
378
+ t.onAutoClose == null || t.onAutoClose.call(t, t), L();
379
+ }, at.current)), () => clearTimeout(n);
380
+ }, [
381
+ X,
382
+ O,
383
+ t,
384
+ k,
385
+ Dt,
386
+ L
387
+ ]), a.useEffect(() => {
388
+ t.delete && (L(), t.onDismiss == null || t.onDismiss.call(t, t));
389
+ }, [
390
+ L,
391
+ t.delete
392
+ ]);
393
+ function Vt() {
394
+ var n;
395
+ if (y?.loading) {
396
+ var h;
397
+ return /* @__PURE__ */ a.createElement("div", {
398
+ className: H(u?.loader, t == null || (h = t.classNames) == null ? void 0 : h.loader, "sonner-loader"),
399
+ "data-visible": k === "loading"
400
+ }, y.loading);
401
+ }
402
+ return /* @__PURE__ */ a.createElement(qt, {
403
+ className: H(u?.loader, t == null || (n = t.classNames) == null ? void 0 : n.loader),
404
+ visible: k === "loading"
405
+ });
406
+ }
407
+ const Ut = t.icon || y?.[k] || Wt(k);
408
+ var Rt, Bt;
409
+ return /* @__PURE__ */ a.createElement("li", {
410
+ tabIndex: 0,
411
+ ref: P,
412
+ className: H(nt, Pt, u?.toast, t == null || (o = t.classNames) == null ? void 0 : o.toast, u?.default, u?.[k], t == null || (e = t.classNames) == null ? void 0 : e[k]),
413
+ "data-sonner-toast": "",
414
+ "data-rich-colors": (Rt = t.richColors) != null ? Rt : gt,
415
+ "data-styled": !(t.jsx || t.unstyled || E),
416
+ "data-mounted": l,
417
+ "data-promise": !!t.promise,
418
+ "data-swiped": dt,
419
+ "data-removed": m,
420
+ "data-visible": zt,
421
+ "data-y-position": Yt,
422
+ "data-x-position": $t,
423
+ "data-index": d,
424
+ "data-front": Ot,
425
+ "data-swiping": W,
426
+ "data-dismissible": G,
427
+ "data-type": k,
428
+ "data-invert": Ft,
429
+ "data-swipe-out": K,
430
+ "data-swipe-direction": F,
431
+ "data-expanded": !!(X || et && l),
432
+ "data-testid": t.testId,
433
+ style: {
434
+ "--index": d,
435
+ "--toasts-before": d,
436
+ "--z-index": ot.length - d,
437
+ "--offset": `${m ? At : Q.current}px`,
438
+ "--initial-height": et ? "auto" : `${Ht}px`,
439
+ ...Z,
440
+ ...t.style
441
+ },
442
+ onDragEnd: () => {
443
+ f(!1), M(null), J.current = null;
444
+ },
445
+ onPointerDown: (n) => {
446
+ n.button !== 2 && (xt || !G || (St.current = /* @__PURE__ */ new Date(), vt(Q.current), n.target.setPointerCapture(n.pointerId), n.target.tagName !== "BUTTON" && (f(!0), J.current = {
447
+ x: n.clientX,
448
+ y: n.clientY
449
+ })));
450
+ },
451
+ onPointerUp: () => {
452
+ var n, h, w;
453
+ if (K || !G) return;
454
+ J.current = null;
455
+ const _ = Number(((n = P.current) == null ? void 0 : n.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), ut = Number(((h = P.current) == null ? void 0 : h.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), x = (/* @__PURE__ */ new Date()).getTime() - ((w = St.current) == null ? void 0 : w.getTime()), B = $ === "x" ? _ : ut, ft = Math.abs(B) / x;
456
+ if (Math.abs(B) >= me || ft > 0.11) {
457
+ vt(Q.current), t.onDismiss == null || t.onDismiss.call(t, t), it($ === "x" ? _ > 0 ? "right" : "left" : ut > 0 ? "down" : "up"), L(), lt(!0);
458
+ return;
459
+ } else {
460
+ var I, C;
461
+ (I = P.current) == null || I.style.setProperty("--swipe-amount-x", "0px"), (C = P.current) == null || C.style.setProperty("--swipe-amount-y", "0px");
462
+ }
463
+ q(!1), f(!1), M(null);
464
+ },
465
+ onPointerMove: (n) => {
466
+ var h, w, _;
467
+ if (!J.current || !G || ((h = window.getSelection()) == null ? void 0 : h.toString().length) > 0) return;
468
+ const x = n.clientY - J.current.y, B = n.clientX - J.current.x;
469
+ var ft;
470
+ const I = (ft = r.swipeDirections) != null ? ft : ge(A);
471
+ !$ && (Math.abs(B) > 1 || Math.abs(x) > 1) && M(Math.abs(B) > Math.abs(x) ? "x" : "y");
472
+ let C = {
473
+ x: 0,
474
+ y: 0
475
+ };
476
+ const Mt = (V) => 1 / (1.5 + Math.abs(V) / 20);
477
+ if ($ === "y") {
478
+ if (I.includes("top") || I.includes("bottom"))
479
+ if (I.includes("top") && x < 0 || I.includes("bottom") && x > 0)
480
+ C.y = x;
481
+ else {
482
+ const V = x * Mt(x);
483
+ C.y = Math.abs(V) < Math.abs(x) ? V : x;
484
+ }
485
+ } else if ($ === "x" && (I.includes("left") || I.includes("right")))
486
+ if (I.includes("left") && B < 0 || I.includes("right") && B > 0)
487
+ C.x = B;
488
+ else {
489
+ const V = B * Mt(B);
490
+ C.x = Math.abs(V) < Math.abs(B) ? V : B;
491
+ }
492
+ (Math.abs(C.x) > 0 || Math.abs(C.y) > 0) && q(!0), (w = P.current) == null || w.style.setProperty("--swipe-amount-x", `${C.x}px`), (_ = P.current) == null || _.style.setProperty("--swipe-amount-y", `${C.y}px`);
493
+ }
494
+ }, Lt && !t.jsx && k !== "loading" ? /* @__PURE__ */ a.createElement("button", {
495
+ "aria-label": j,
496
+ "data-disabled": xt,
497
+ "data-close-button": !0,
498
+ onClick: xt || !G ? () => {
499
+ } : () => {
500
+ L(), t.onDismiss == null || t.onDismiss.call(t, t);
501
+ },
502
+ className: H(u?.closeButton, t == null || (s = t.classNames) == null ? void 0 : s.closeButton)
503
+ }, (Bt = y?.close) != null ? Bt : te) : null, (k || t.icon || t.promise) && t.icon !== null && (y?.[k] !== null || t.icon) ? /* @__PURE__ */ a.createElement("div", {
504
+ "data-icon": "",
505
+ className: H(u?.icon, t == null || (b = t.classNames) == null ? void 0 : b.icon)
506
+ }, t.promise || t.type === "loading" && !t.icon ? t.icon || Vt() : null, t.type !== "loading" ? Ut : null) : null, /* @__PURE__ */ a.createElement("div", {
507
+ "data-content": "",
508
+ className: H(u?.content, t == null || (c = t.classNames) == null ? void 0 : c.content)
509
+ }, /* @__PURE__ */ a.createElement("div", {
510
+ "data-title": "",
511
+ className: H(u?.title, t == null || (g = t.classNames) == null ? void 0 : g.title)
512
+ }, t.jsx ? t.jsx : typeof t.title == "function" ? t.title() : t.title), t.description ? /* @__PURE__ */ a.createElement("div", {
513
+ "data-description": "",
514
+ className: H(bt, jt, u?.description, t == null || (D = t.classNames) == null ? void 0 : D.description)
515
+ }, typeof t.description == "function" ? t.description() : t.description) : null), /* @__PURE__ */ a.isValidElement(t.cancel) ? t.cancel : t.cancel && mt(t.cancel) ? /* @__PURE__ */ a.createElement("button", {
516
+ "data-button": !0,
517
+ "data-cancel": !0,
518
+ style: t.cancelButtonStyle || Y,
519
+ onClick: (n) => {
520
+ mt(t.cancel) && G && (t.cancel.onClick == null || t.cancel.onClick.call(t.cancel, n), L());
521
+ },
522
+ className: H(u?.cancelButton, t == null || (v = t.classNames) == null ? void 0 : v.cancelButton)
523
+ }, t.cancel.label) : null, /* @__PURE__ */ a.isValidElement(t.action) ? t.action : t.action && mt(t.action) ? /* @__PURE__ */ a.createElement("button", {
524
+ "data-button": !0,
525
+ "data-action": !0,
526
+ style: t.actionButtonStyle || ht,
527
+ onClick: (n) => {
528
+ mt(t.action) && (t.action.onClick == null || t.action.onClick.call(t.action, n), !n.defaultPrevented && L());
529
+ },
530
+ className: H(u?.actionButton, t == null || (i = t.classNames) == null ? void 0 : i.actionButton)
531
+ }, t.action.label) : null);
532
+ };
533
+ function Ct() {
534
+ if (typeof window > "u" || typeof document > "u") return "ltr";
535
+ const r = document.documentElement.getAttribute("dir");
536
+ return r === "auto" || !r ? window.getComputedStyle(document.documentElement).direction : r;
537
+ }
538
+ function be(r, o) {
539
+ const e = {};
540
+ return [
541
+ r,
542
+ o
543
+ ].forEach((s, b) => {
544
+ const c = b === 1, g = c ? "--mobile-offset" : "--offset", D = c ? ce : de;
545
+ function v(i) {
546
+ [
547
+ "top",
548
+ "right",
549
+ "bottom",
550
+ "left"
551
+ ].forEach((N) => {
552
+ e[`${g}-${N}`] = typeof i == "number" ? `${i}px` : i;
553
+ });
554
+ }
555
+ typeof s == "number" || typeof s == "string" ? v(s) : typeof s == "object" ? [
556
+ "top",
557
+ "right",
558
+ "bottom",
559
+ "left"
560
+ ].forEach((i) => {
561
+ s[i] === void 0 ? e[`${g}-${i}`] = D : e[`${g}-${i}`] = typeof s[i] == "number" ? `${s[i]}px` : s[i];
562
+ }) : v(D);
563
+ }), e;
564
+ }
565
+ function Ee() {
566
+ const [r, o] = a.useState([]);
567
+ return a.useEffect(() => S.subscribe((e) => {
568
+ if (e.dismiss) {
569
+ setTimeout(() => {
570
+ wt.flushSync(() => {
571
+ o((s) => s.filter((b) => b.id !== e.id));
572
+ });
573
+ });
574
+ return;
575
+ }
576
+ setTimeout(() => {
577
+ wt.flushSync(() => {
578
+ o((s) => {
579
+ const b = s.findIndex((c) => c.id === e.id);
580
+ return b !== -1 ? [
581
+ ...s.slice(0, b),
582
+ {
583
+ ...s[b],
584
+ ...e
585
+ },
586
+ ...s.slice(b + 1)
587
+ ] : [
588
+ e,
589
+ ...s
590
+ ];
591
+ });
592
+ });
593
+ });
594
+ }), []), {
595
+ toasts: r
596
+ };
597
+ }
598
+ const Te = /* @__PURE__ */ a.forwardRef(function(o, e) {
599
+ const { id: s, invert: b, position: c = "bottom-right", hotkey: g = [
600
+ "altKey",
601
+ "KeyT"
602
+ ], expand: D, closeButton: v, className: i, offset: N, mobileOffset: t, theme: E = "light", richColors: O, duration: T, style: pt, visibleToasts: U = le, toastOptions: d, dir: ot = Ct(), gap: X = fe, icons: st, containerAriaLabel: gt = "Notifications" } = o, [z, Z] = a.useState([]), Y = a.useMemo(() => s ? z.filter((l) => l.toasterId === s) : z.filter((l) => !l.toasterId), [
603
+ z,
604
+ s
605
+ ]), ht = a.useMemo(() => Array.from(new Set([
606
+ c
607
+ ].concat(Y.filter((l) => l.position).map((l) => l.position)))), [
608
+ Y,
609
+ c
610
+ ]), [nt, bt] = a.useState([]), [tt, A] = a.useState(!1), [rt, et] = a.useState(!1), [u, y] = a.useState(E !== "system" ? E : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), j = a.useRef(null), $ = g.join("+").replace(/Key/g, "").replace(/Digit/g, ""), M = a.useRef(null), F = a.useRef(!1), it = a.useCallback((l) => {
611
+ Z((p) => {
612
+ var m;
613
+ return (m = p.find((R) => R.id === l.id)) != null && m.delete || S.dismiss(l.id), p.filter(({ id: R }) => R !== l.id);
614
+ });
615
+ }, []);
616
+ return a.useEffect(() => S.subscribe((l) => {
617
+ if (l.dismiss) {
618
+ requestAnimationFrame(() => {
619
+ Z((p) => p.map((m) => m.id === l.id ? {
620
+ ...m,
621
+ delete: !0
622
+ } : m));
623
+ });
624
+ return;
625
+ }
626
+ setTimeout(() => {
627
+ wt.flushSync(() => {
628
+ Z((p) => {
629
+ const m = p.findIndex((R) => R.id === l.id);
630
+ return m !== -1 ? [
631
+ ...p.slice(0, m),
632
+ {
633
+ ...p[m],
634
+ ...l
635
+ },
636
+ ...p.slice(m + 1)
637
+ ] : [
638
+ l,
639
+ ...p
640
+ ];
641
+ });
642
+ });
643
+ });
644
+ }), [
645
+ z
646
+ ]), a.useEffect(() => {
647
+ if (E !== "system") {
648
+ y(E);
649
+ return;
650
+ }
651
+ if (E === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? y("dark") : y("light")), typeof window > "u") return;
652
+ const l = window.matchMedia("(prefers-color-scheme: dark)");
653
+ try {
654
+ l.addEventListener("change", ({ matches: p }) => {
655
+ y(p ? "dark" : "light");
656
+ });
657
+ } catch {
658
+ l.addListener(({ matches: m }) => {
659
+ try {
660
+ y(m ? "dark" : "light");
661
+ } catch (R) {
662
+ console.error(R);
663
+ }
664
+ });
665
+ }
666
+ }, [
667
+ E
668
+ ]), a.useEffect(() => {
669
+ z.length <= 1 && A(!1);
670
+ }, [
671
+ z
672
+ ]), a.useEffect(() => {
673
+ const l = (p) => {
674
+ var m;
675
+ if (g.every((f) => p[f] || p.code === f)) {
676
+ var W;
677
+ A(!0), (W = j.current) == null || W.focus();
678
+ }
679
+ p.code === "Escape" && (document.activeElement === j.current || (m = j.current) != null && m.contains(document.activeElement)) && A(!1);
680
+ };
681
+ return document.addEventListener("keydown", l), () => document.removeEventListener("keydown", l);
682
+ }, [
683
+ g
684
+ ]), a.useEffect(() => {
685
+ if (j.current)
686
+ return () => {
687
+ M.current && (M.current.focus({
688
+ preventScroll: !0
689
+ }), M.current = null, F.current = !1);
690
+ };
691
+ }, [
692
+ j.current
693
+ ]), // Remove item from normal navigation flow, only available via hotkey
694
+ /* @__PURE__ */ a.createElement("section", {
695
+ ref: e,
696
+ "aria-label": `${gt} ${$}`,
697
+ tabIndex: -1,
698
+ "aria-live": "polite",
699
+ "aria-relevant": "additions text",
700
+ "aria-atomic": "false",
701
+ suppressHydrationWarning: !0
702
+ }, ht.map((l, p) => {
703
+ var m;
704
+ const [R, W] = l.split("-");
705
+ return Y.length ? /* @__PURE__ */ a.createElement("ol", {
706
+ key: l,
707
+ dir: ot === "auto" ? Ct() : ot,
708
+ tabIndex: -1,
709
+ ref: j,
710
+ className: i,
711
+ "data-sonner-toaster": !0,
712
+ "data-sonner-theme": u,
713
+ "data-y-position": R,
714
+ "data-x-position": W,
715
+ style: {
716
+ "--front-toast-height": `${((m = nt[0]) == null ? void 0 : m.height) || 0}px`,
717
+ "--width": `${ue}px`,
718
+ "--gap": `${X}px`,
719
+ ...pt,
720
+ ...be(N, t)
721
+ },
722
+ onBlur: (f) => {
723
+ F.current && !f.currentTarget.contains(f.relatedTarget) && (F.current = !1, M.current && (M.current.focus({
724
+ preventScroll: !0
725
+ }), M.current = null));
726
+ },
727
+ onFocus: (f) => {
728
+ f.target instanceof HTMLElement && f.target.dataset.dismissible === "false" || F.current || (F.current = !0, M.current = f.relatedTarget);
729
+ },
730
+ onMouseEnter: () => A(!0),
731
+ onMouseMove: () => A(!0),
732
+ onMouseLeave: () => {
733
+ rt || A(!1);
734
+ },
735
+ onDragEnd: () => A(!1),
736
+ onPointerDown: (f) => {
737
+ f.target instanceof HTMLElement && f.target.dataset.dismissible === "false" || et(!0);
738
+ },
739
+ onPointerUp: () => et(!1)
740
+ }, Y.filter((f) => !f.position && p === 0 || f.position === l).map((f, K) => {
741
+ var lt, dt;
742
+ return /* @__PURE__ */ a.createElement(he, {
743
+ key: f.id,
744
+ icons: st,
745
+ index: K,
746
+ toast: f,
747
+ defaultRichColors: O,
748
+ duration: (lt = d?.duration) != null ? lt : T,
749
+ className: d?.className,
750
+ descriptionClassName: d?.descriptionClassName,
751
+ invert: b,
752
+ visibleToasts: U,
753
+ closeButton: (dt = d?.closeButton) != null ? dt : v,
754
+ interacting: rt,
755
+ position: l,
756
+ style: d?.style,
757
+ unstyled: d?.unstyled,
758
+ classNames: d?.classNames,
759
+ cancelButtonStyle: d?.cancelButtonStyle,
760
+ actionButtonStyle: d?.actionButtonStyle,
761
+ closeButtonAriaLabel: d?.closeButtonAriaLabel,
762
+ removeToast: it,
763
+ toasts: Y.filter((q) => q.position == f.position),
764
+ heights: nt.filter((q) => q.position == f.position),
765
+ setHeights: bt,
766
+ expandByDefault: D,
767
+ gap: X,
768
+ expanded: tt,
769
+ swipeDirections: o.swipeDirections
770
+ });
771
+ })) : null;
772
+ }));
773
+ });
774
+ export {
775
+ Te as Toaster,
776
+ we as toast,
777
+ Ee as useSonner
778
+ };