ingeniuscliq-core 0.1.8 → 0.1.9

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.
@@ -1,758 +0,0 @@
1
- import * as It from "react";
2
- import a from "react";
3
- import Xt from "react-dom";
4
- const xt = 768;
5
- function Te() {
6
- const [r, o] = It.useState(void 0);
7
- return It.useEffect(() => {
8
- const e = window.matchMedia(`(max-width: ${xt - 1}px)`), s = () => {
9
- o(window.innerWidth < xt);
10
- };
11
- return e.addEventListener("change", s), o(window.innerWidth < xt), () => e.removeEventListener("change", s);
12
- }, []), !!r;
13
- }
14
- function Kt(r) {
15
- if (typeof document > "u") return;
16
- let o = document.head || document.getElementsByTagName("head")[0], e = document.createElement("style");
17
- e.type = "text/css", o.appendChild(e), e.styleSheet ? e.styleSheet.cssText = r : e.appendChild(document.createTextNode(r));
18
- }
19
- const qt = (r) => {
20
- switch (r) {
21
- case "success":
22
- return Jt;
23
- case "info":
24
- return te;
25
- case "warning":
26
- return Zt;
27
- case "error":
28
- return ee;
29
- default:
30
- return null;
31
- }
32
- }, Gt = Array(12).fill(0), Qt = ({ visible: r, className: o }) => /* @__PURE__ */ a.createElement("div", {
33
- className: [
34
- "sonner-loading-wrapper",
35
- o
36
- ].filter(Boolean).join(" "),
37
- "data-visible": r
38
- }, /* @__PURE__ */ a.createElement("div", {
39
- className: "sonner-spinner"
40
- }, Gt.map((e, s) => /* @__PURE__ */ a.createElement("div", {
41
- className: "sonner-loading-bar",
42
- key: `spinner-bar-${s}`
43
- })))), Jt = /* @__PURE__ */ a.createElement("svg", {
44
- xmlns: "http://www.w3.org/2000/svg",
45
- viewBox: "0 0 20 20",
46
- fill: "currentColor",
47
- height: "20",
48
- width: "20"
49
- }, /* @__PURE__ */ a.createElement("path", {
50
- fillRule: "evenodd",
51
- 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",
52
- clipRule: "evenodd"
53
- })), Zt = /* @__PURE__ */ a.createElement("svg", {
54
- xmlns: "http://www.w3.org/2000/svg",
55
- viewBox: "0 0 24 24",
56
- fill: "currentColor",
57
- height: "20",
58
- width: "20"
59
- }, /* @__PURE__ */ a.createElement("path", {
60
- fillRule: "evenodd",
61
- 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",
62
- clipRule: "evenodd"
63
- })), te = /* @__PURE__ */ a.createElement("svg", {
64
- xmlns: "http://www.w3.org/2000/svg",
65
- viewBox: "0 0 20 20",
66
- fill: "currentColor",
67
- height: "20",
68
- width: "20"
69
- }, /* @__PURE__ */ a.createElement("path", {
70
- fillRule: "evenodd",
71
- 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",
72
- clipRule: "evenodd"
73
- })), ee = /* @__PURE__ */ a.createElement("svg", {
74
- xmlns: "http://www.w3.org/2000/svg",
75
- viewBox: "0 0 20 20",
76
- fill: "currentColor",
77
- height: "20",
78
- width: "20"
79
- }, /* @__PURE__ */ a.createElement("path", {
80
- fillRule: "evenodd",
81
- 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",
82
- clipRule: "evenodd"
83
- })), ae = /* @__PURE__ */ a.createElement("svg", {
84
- xmlns: "http://www.w3.org/2000/svg",
85
- width: "12",
86
- height: "12",
87
- viewBox: "0 0 24 24",
88
- fill: "none",
89
- stroke: "currentColor",
90
- strokeWidth: "1.5",
91
- strokeLinecap: "round",
92
- strokeLinejoin: "round"
93
- }, /* @__PURE__ */ a.createElement("line", {
94
- x1: "18",
95
- y1: "6",
96
- x2: "6",
97
- y2: "18"
98
- }), /* @__PURE__ */ a.createElement("line", {
99
- x1: "6",
100
- y1: "6",
101
- x2: "18",
102
- y2: "18"
103
- })), oe = () => {
104
- const [r, o] = a.useState(document.hidden);
105
- return a.useEffect(() => {
106
- const e = () => {
107
- o(document.hidden);
108
- };
109
- return document.addEventListener("visibilitychange", e), () => window.removeEventListener("visibilitychange", e);
110
- }, []), r;
111
- };
112
- let Et = 1;
113
- class se {
114
- constructor() {
115
- this.subscribe = (o) => (this.subscribers.push(o), () => {
116
- const e = this.subscribers.indexOf(o);
117
- this.subscribers.splice(e, 1);
118
- }), this.publish = (o) => {
119
- this.subscribers.forEach((e) => e(o));
120
- }, this.addToast = (o) => {
121
- this.publish(o), this.toasts = [
122
- ...this.toasts,
123
- o
124
- ];
125
- }, this.create = (o) => {
126
- var e;
127
- const { message: s, ...C } = o, u = typeof (o == null ? void 0 : o.id) == "number" || ((e = o.id) == null ? void 0 : e.length) > 0 ? o.id : Et++, g = this.toasts.find((b) => b.id === u), _ = o.dismissible === void 0 ? !0 : o.dismissible;
128
- return this.dismissedToasts.has(u) && this.dismissedToasts.delete(u), g ? this.toasts = this.toasts.map((b) => b.id === u ? (this.publish({
129
- ...b,
130
- ...o,
131
- id: u,
132
- title: s
133
- }), {
134
- ...b,
135
- ...o,
136
- id: u,
137
- dismissible: _,
138
- title: s
139
- }) : b) : this.addToast({
140
- title: s,
141
- ...C,
142
- dismissible: _,
143
- id: u
144
- }), u;
145
- }, this.dismiss = (o) => (o ? (this.dismissedToasts.add(o), requestAnimationFrame(() => this.subscribers.forEach((e) => e({
146
- id: o,
147
- dismiss: !0
148
- })))) : this.toasts.forEach((e) => {
149
- this.subscribers.forEach((s) => s({
150
- id: e.id,
151
- dismiss: !0
152
- }));
153
- }), o), this.message = (o, e) => this.create({
154
- ...e,
155
- message: o
156
- }), this.error = (o, e) => this.create({
157
- ...e,
158
- message: o,
159
- type: "error"
160
- }), this.success = (o, e) => this.create({
161
- ...e,
162
- type: "success",
163
- message: o
164
- }), this.info = (o, e) => this.create({
165
- ...e,
166
- type: "info",
167
- message: o
168
- }), this.warning = (o, e) => this.create({
169
- ...e,
170
- type: "warning",
171
- message: o
172
- }), this.loading = (o, e) => this.create({
173
- ...e,
174
- type: "loading",
175
- message: o
176
- }), this.promise = (o, e) => {
177
- if (!e)
178
- return;
179
- let s;
180
- e.loading !== void 0 && (s = this.create({
181
- ...e,
182
- promise: o,
183
- type: "loading",
184
- message: e.loading,
185
- description: typeof e.description != "function" ? e.description : void 0
186
- }));
187
- const C = Promise.resolve(o instanceof Function ? o() : o);
188
- let u = s !== void 0, g;
189
- const _ = C.then(async (i) => {
190
- if (g = [
191
- "resolve",
192
- i
193
- ], a.isValidElement(i))
194
- u = !1, this.create({
195
- id: s,
196
- type: "default",
197
- message: i
198
- });
199
- else if (re(i) && !i.ok) {
200
- u = !1;
201
- const t = typeof e.error == "function" ? await e.error(`HTTP error! status: ${i.status}`) : e.error, x = typeof e.description == "function" ? await e.description(`HTTP error! status: ${i.status}`) : e.description, E = typeof t == "object" && !a.isValidElement(t) ? t : {
202
- message: t
203
- };
204
- this.create({
205
- id: s,
206
- type: "error",
207
- description: x,
208
- ...E
209
- });
210
- } else if (i instanceof Error) {
211
- u = !1;
212
- const t = typeof e.error == "function" ? await e.error(i) : e.error, x = typeof e.description == "function" ? await e.description(i) : e.description, E = typeof t == "object" && !a.isValidElement(t) ? t : {
213
- message: t
214
- };
215
- this.create({
216
- id: s,
217
- type: "error",
218
- description: x,
219
- ...E
220
- });
221
- } else if (e.success !== void 0) {
222
- u = !1;
223
- const t = typeof e.success == "function" ? await e.success(i) : e.success, x = typeof e.description == "function" ? await e.description(i) : e.description, E = typeof t == "object" && !a.isValidElement(t) ? t : {
224
- message: t
225
- };
226
- this.create({
227
- id: s,
228
- type: "success",
229
- description: x,
230
- ...E
231
- });
232
- }
233
- }).catch(async (i) => {
234
- if (g = [
235
- "reject",
236
- i
237
- ], e.error !== void 0) {
238
- u = !1;
239
- const T = typeof e.error == "function" ? await e.error(i) : e.error, t = typeof e.description == "function" ? await e.description(i) : e.description, H = typeof T == "object" && !a.isValidElement(T) ? T : {
240
- message: T
241
- };
242
- this.create({
243
- id: s,
244
- type: "error",
245
- description: t,
246
- ...H
247
- });
248
- }
249
- }).finally(() => {
250
- u && (this.dismiss(s), s = void 0), e.finally == null || e.finally.call(e);
251
- }), b = () => new Promise((i, T) => _.then(() => g[0] === "reject" ? T(g[1]) : i(g[1])).catch(T));
252
- return typeof s != "string" && typeof s != "number" ? {
253
- unwrap: b
254
- } : Object.assign(s, {
255
- unwrap: b
256
- });
257
- }, this.custom = (o, e) => {
258
- const s = (e == null ? void 0 : e.id) || Et++;
259
- return this.create({
260
- jsx: o(s),
261
- id: s,
262
- ...e
263
- }), s;
264
- }, this.getActiveToasts = () => this.toasts.filter((o) => !this.dismissedToasts.has(o.id)), this.subscribers = [], this.toasts = [], this.dismissedToasts = /* @__PURE__ */ new Set();
265
- }
266
- }
267
- const S = new se(), ne = (r, o) => {
268
- const e = (o == null ? void 0 : o.id) || Et++;
269
- return S.addToast({
270
- title: r,
271
- ...o,
272
- id: e
273
- }), e;
274
- }, re = (r) => r && typeof r == "object" && "ok" in r && typeof r.ok == "boolean" && "status" in r && typeof r.status == "number", ie = ne, le = () => S.toasts, de = () => S.getActiveToasts(), Se = Object.assign(ie, {
275
- success: S.success,
276
- info: S.info,
277
- warning: S.warning,
278
- error: S.error,
279
- custom: S.custom,
280
- message: S.message,
281
- promise: S.promise,
282
- dismiss: S.dismiss,
283
- loading: S.loading
284
- }, {
285
- getHistory: le,
286
- getToasts: de
287
- });
288
- Kt("[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%)}");
289
- function mt(r) {
290
- return r.label !== void 0;
291
- }
292
- const ce = 3, ue = "24px", fe = "16px", Ct = 4e3, me = 356, pe = 14, ge = 45, he = 200;
293
- function O(...r) {
294
- return r.filter(Boolean).join(" ");
295
- }
296
- function be(r) {
297
- const [o, e] = r.split("-"), s = [];
298
- return o && s.push(o), e && s.push(e), s;
299
- }
300
- const ve = (r) => {
301
- var o, e, s, C, u, g, _, b, i;
302
- const { invert: T, toast: t, unstyled: x, interacting: H, setHeights: E, visibleToasts: pt, heights: W, index: d, toasts: ot, expanded: U, 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: c, icons: v, closeButtonAriaLabel: P = "Close toast" } = r, [$, B] = a.useState(null), [F, it] = a.useState(null), [l, p] = a.useState(!1), [m, R] = a.useState(!1), [X, f] = a.useState(!1), [K, lt] = a.useState(!1), [dt, q] = a.useState(!1), [Ot, vt] = a.useState(0), [Ht, Tt] = a.useState(0), at = a.useRef(t.duration || tt || Ct), St = a.useRef(null), L = a.useRef(null), zt = d === 0, Lt = d + 1 <= pt, N = t.type, G = t.dismissible !== !1, Pt = t.className || "", jt = t.descriptionClassName || "", ct = a.useMemo(() => W.findIndex((n) => n.toastId === t.id) || 0, [
303
- W,
304
- t.id
305
- ]), Yt = a.useMemo(() => {
306
- var n;
307
- return (n = t.closeButton) != null ? n : z;
308
- }, [
309
- t.closeButton,
310
- z
311
- ]), Nt = a.useMemo(() => t.duration || tt || Ct, [
312
- t.duration,
313
- tt
314
- ]), yt = a.useRef(0), Q = a.useRef(0), kt = a.useRef(0), J = a.useRef(null), [$t, Ft] = A.split("-"), _t = a.useMemo(() => W.reduce((n, h, w) => w >= ct ? n : n + h.height, 0), [
315
- W,
316
- ct
317
- ]), Rt = oe(), Vt = t.invert || T, wt = N === "loading";
318
- Q.current = a.useMemo(() => ct * rt + _t, [
319
- ct,
320
- _t
321
- ]), a.useEffect(() => {
322
- at.current = Nt;
323
- }, [
324
- Nt
325
- ]), a.useEffect(() => {
326
- p(!0);
327
- }, []), a.useEffect(() => {
328
- const n = L.current;
329
- if (n) {
330
- const h = n.getBoundingClientRect().height;
331
- return Tt(h), E((w) => [
332
- {
333
- toastId: t.id,
334
- height: h,
335
- position: t.position
336
- },
337
- ...w
338
- ]), () => E((w) => w.filter((k) => k.toastId !== t.id));
339
- }
340
- }, [
341
- E,
342
- t.id
343
- ]), a.useLayoutEffect(() => {
344
- if (!l) return;
345
- const n = L.current, h = n.style.height;
346
- n.style.height = "auto";
347
- const w = n.getBoundingClientRect().height;
348
- n.style.height = h, Tt(w), E((k) => k.find((y) => y.toastId === t.id) ? k.map((y) => y.toastId === t.id ? {
349
- ...y,
350
- height: w
351
- } : y) : [
352
- {
353
- toastId: t.id,
354
- height: w,
355
- position: t.position
356
- },
357
- ...k
358
- ]);
359
- }, [
360
- l,
361
- t.title,
362
- t.description,
363
- E,
364
- t.id,
365
- t.jsx,
366
- t.action,
367
- t.cancel
368
- ]);
369
- const j = a.useCallback(() => {
370
- R(!0), vt(Q.current), E((n) => n.filter((h) => h.toastId !== t.id)), setTimeout(() => {
371
- st(t);
372
- }, he);
373
- }, [
374
- t,
375
- st,
376
- E,
377
- Q
378
- ]);
379
- a.useEffect(() => {
380
- if (t.promise && N === "loading" || t.duration === 1 / 0 || t.type === "loading") return;
381
- let n;
382
- return U || H || Rt ? (() => {
383
- if (kt.current < yt.current) {
384
- const k = (/* @__PURE__ */ new Date()).getTime() - yt.current;
385
- at.current = at.current - k;
386
- }
387
- kt.current = (/* @__PURE__ */ new Date()).getTime();
388
- })() : (() => {
389
- at.current !== 1 / 0 && (yt.current = (/* @__PURE__ */ new Date()).getTime(), n = setTimeout(() => {
390
- t.onAutoClose == null || t.onAutoClose.call(t, t), j();
391
- }, at.current));
392
- })(), () => clearTimeout(n);
393
- }, [
394
- U,
395
- H,
396
- t,
397
- N,
398
- Rt,
399
- j
400
- ]), a.useEffect(() => {
401
- t.delete && (j(), t.onDismiss == null || t.onDismiss.call(t, t));
402
- }, [
403
- j,
404
- t.delete
405
- ]);
406
- function Wt() {
407
- var n;
408
- if (v != null && v.loading) {
409
- var h;
410
- return /* @__PURE__ */ a.createElement("div", {
411
- className: O(c == null ? void 0 : c.loader, t == null || (h = t.classNames) == null ? void 0 : h.loader, "sonner-loader"),
412
- "data-visible": N === "loading"
413
- }, v.loading);
414
- }
415
- return /* @__PURE__ */ a.createElement(Qt, {
416
- className: O(c == null ? void 0 : c.loader, t == null || (n = t.classNames) == null ? void 0 : n.loader),
417
- visible: N === "loading"
418
- });
419
- }
420
- const Ut = t.icon || (v == null ? void 0 : v[N]) || qt(N);
421
- var Dt, Bt;
422
- return /* @__PURE__ */ a.createElement("li", {
423
- tabIndex: 0,
424
- ref: L,
425
- className: O(nt, Pt, c == null ? void 0 : c.toast, t == null || (o = t.classNames) == null ? void 0 : o.toast, c == null ? void 0 : c.default, c == null ? void 0 : c[N], t == null || (e = t.classNames) == null ? void 0 : e[N]),
426
- "data-sonner-toast": "",
427
- "data-rich-colors": (Dt = t.richColors) != null ? Dt : gt,
428
- "data-styled": !(t.jsx || t.unstyled || x),
429
- "data-mounted": l,
430
- "data-promise": !!t.promise,
431
- "data-swiped": dt,
432
- "data-removed": m,
433
- "data-visible": Lt,
434
- "data-y-position": $t,
435
- "data-x-position": Ft,
436
- "data-index": d,
437
- "data-front": zt,
438
- "data-swiping": X,
439
- "data-dismissible": G,
440
- "data-type": N,
441
- "data-invert": Vt,
442
- "data-swipe-out": K,
443
- "data-swipe-direction": F,
444
- "data-expanded": !!(U || et && l),
445
- "data-testid": t.testId,
446
- style: {
447
- "--index": d,
448
- "--toasts-before": d,
449
- "--z-index": ot.length - d,
450
- "--offset": `${m ? Ot : Q.current}px`,
451
- "--initial-height": et ? "auto" : `${Ht}px`,
452
- ...Z,
453
- ...t.style
454
- },
455
- onDragEnd: () => {
456
- f(!1), B(null), J.current = null;
457
- },
458
- onPointerDown: (n) => {
459
- n.button !== 2 && (wt || !G || (St.current = /* @__PURE__ */ new Date(), vt(Q.current), n.target.setPointerCapture(n.pointerId), n.target.tagName !== "BUTTON" && (f(!0), J.current = {
460
- x: n.clientX,
461
- y: n.clientY
462
- })));
463
- },
464
- onPointerUp: () => {
465
- var n, h, w;
466
- if (K || !G) return;
467
- J.current = null;
468
- const k = Number(((n = L.current) == null ? void 0 : n.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), ut = Number(((h = L.current) == null ? void 0 : h.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), y = (/* @__PURE__ */ new Date()).getTime() - ((w = St.current) == null ? void 0 : w.getTime()), D = $ === "x" ? k : ut, ft = Math.abs(D) / y;
469
- if (Math.abs(D) >= ge || ft > 0.11) {
470
- vt(Q.current), t.onDismiss == null || t.onDismiss.call(t, t), it($ === "x" ? k > 0 ? "right" : "left" : ut > 0 ? "down" : "up"), j(), lt(!0);
471
- return;
472
- } else {
473
- var M, I;
474
- (M = L.current) == null || M.style.setProperty("--swipe-amount-x", "0px"), (I = L.current) == null || I.style.setProperty("--swipe-amount-y", "0px");
475
- }
476
- q(!1), f(!1), B(null);
477
- },
478
- onPointerMove: (n) => {
479
- var h, w, k;
480
- if (!J.current || !G || ((h = window.getSelection()) == null ? void 0 : h.toString().length) > 0) return;
481
- const y = n.clientY - J.current.y, D = n.clientX - J.current.x;
482
- var ft;
483
- const M = (ft = r.swipeDirections) != null ? ft : be(A);
484
- !$ && (Math.abs(D) > 1 || Math.abs(y) > 1) && B(Math.abs(D) > Math.abs(y) ? "x" : "y");
485
- let I = {
486
- x: 0,
487
- y: 0
488
- };
489
- const Mt = (V) => 1 / (1.5 + Math.abs(V) / 20);
490
- if ($ === "y") {
491
- if (M.includes("top") || M.includes("bottom"))
492
- if (M.includes("top") && y < 0 || M.includes("bottom") && y > 0)
493
- I.y = y;
494
- else {
495
- const V = y * Mt(y);
496
- I.y = Math.abs(V) < Math.abs(y) ? V : y;
497
- }
498
- } else if ($ === "x" && (M.includes("left") || M.includes("right")))
499
- if (M.includes("left") && D < 0 || M.includes("right") && D > 0)
500
- I.x = D;
501
- else {
502
- const V = D * Mt(D);
503
- I.x = Math.abs(V) < Math.abs(D) ? V : D;
504
- }
505
- (Math.abs(I.x) > 0 || Math.abs(I.y) > 0) && q(!0), (w = L.current) == null || w.style.setProperty("--swipe-amount-x", `${I.x}px`), (k = L.current) == null || k.style.setProperty("--swipe-amount-y", `${I.y}px`);
506
- }
507
- }, Yt && !t.jsx && N !== "loading" ? /* @__PURE__ */ a.createElement("button", {
508
- "aria-label": P,
509
- "data-disabled": wt,
510
- "data-close-button": !0,
511
- onClick: wt || !G ? () => {
512
- } : () => {
513
- j(), t.onDismiss == null || t.onDismiss.call(t, t);
514
- },
515
- className: O(c == null ? void 0 : c.closeButton, t == null || (s = t.classNames) == null ? void 0 : s.closeButton)
516
- }, (Bt = v == null ? void 0 : v.close) != null ? Bt : ae) : null, (N || t.icon || t.promise) && t.icon !== null && ((v == null ? void 0 : v[N]) !== null || t.icon) ? /* @__PURE__ */ a.createElement("div", {
517
- "data-icon": "",
518
- className: O(c == null ? void 0 : c.icon, t == null || (C = t.classNames) == null ? void 0 : C.icon)
519
- }, t.promise || t.type === "loading" && !t.icon ? t.icon || Wt() : null, t.type !== "loading" ? Ut : null) : null, /* @__PURE__ */ a.createElement("div", {
520
- "data-content": "",
521
- className: O(c == null ? void 0 : c.content, t == null || (u = t.classNames) == null ? void 0 : u.content)
522
- }, /* @__PURE__ */ a.createElement("div", {
523
- "data-title": "",
524
- className: O(c == null ? void 0 : c.title, t == null || (g = t.classNames) == null ? void 0 : g.title)
525
- }, t.jsx ? t.jsx : typeof t.title == "function" ? t.title() : t.title), t.description ? /* @__PURE__ */ a.createElement("div", {
526
- "data-description": "",
527
- className: O(bt, jt, c == null ? void 0 : c.description, t == null || (_ = t.classNames) == null ? void 0 : _.description)
528
- }, 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", {
529
- "data-button": !0,
530
- "data-cancel": !0,
531
- style: t.cancelButtonStyle || Y,
532
- onClick: (n) => {
533
- mt(t.cancel) && G && (t.cancel.onClick == null || t.cancel.onClick.call(t.cancel, n), j());
534
- },
535
- className: O(c == null ? void 0 : c.cancelButton, t == null || (b = t.classNames) == null ? void 0 : b.cancelButton)
536
- }, t.cancel.label) : null, /* @__PURE__ */ a.isValidElement(t.action) ? t.action : t.action && mt(t.action) ? /* @__PURE__ */ a.createElement("button", {
537
- "data-button": !0,
538
- "data-action": !0,
539
- style: t.actionButtonStyle || ht,
540
- onClick: (n) => {
541
- mt(t.action) && (t.action.onClick == null || t.action.onClick.call(t.action, n), !n.defaultPrevented && j());
542
- },
543
- className: O(c == null ? void 0 : c.actionButton, t == null || (i = t.classNames) == null ? void 0 : i.actionButton)
544
- }, t.action.label) : null);
545
- };
546
- function At() {
547
- if (typeof window > "u" || typeof document > "u") return "ltr";
548
- const r = document.documentElement.getAttribute("dir");
549
- return r === "auto" || !r ? window.getComputedStyle(document.documentElement).direction : r;
550
- }
551
- function ye(r, o) {
552
- const e = {};
553
- return [
554
- r,
555
- o
556
- ].forEach((s, C) => {
557
- const u = C === 1, g = u ? "--mobile-offset" : "--offset", _ = u ? fe : ue;
558
- function b(i) {
559
- [
560
- "top",
561
- "right",
562
- "bottom",
563
- "left"
564
- ].forEach((T) => {
565
- e[`${g}-${T}`] = typeof i == "number" ? `${i}px` : i;
566
- });
567
- }
568
- typeof s == "number" || typeof s == "string" ? b(s) : typeof s == "object" ? [
569
- "top",
570
- "right",
571
- "bottom",
572
- "left"
573
- ].forEach((i) => {
574
- s[i] === void 0 ? e[`${g}-${i}`] = _ : e[`${g}-${i}`] = typeof s[i] == "number" ? `${s[i]}px` : s[i];
575
- }) : b(_);
576
- }), e;
577
- }
578
- const Ne = /* @__PURE__ */ a.forwardRef(function(o, e) {
579
- const { id: s, invert: C, position: u = "bottom-right", hotkey: g = [
580
- "altKey",
581
- "KeyT"
582
- ], expand: _, closeButton: b, className: i, offset: T, mobileOffset: t, theme: x = "light", richColors: H, duration: E, style: pt, visibleToasts: W = ce, toastOptions: d, dir: ot = At(), gap: U = pe, 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), [
583
- z,
584
- s
585
- ]), ht = a.useMemo(() => Array.from(new Set([
586
- u
587
- ].concat(Y.filter((l) => l.position).map((l) => l.position)))), [
588
- Y,
589
- u
590
- ]), [nt, bt] = a.useState([]), [tt, A] = a.useState(!1), [rt, et] = a.useState(!1), [c, v] = a.useState(x !== "system" ? x : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), P = a.useRef(null), $ = g.join("+").replace(/Key/g, "").replace(/Digit/g, ""), B = a.useRef(null), F = a.useRef(!1), it = a.useCallback((l) => {
591
- Z((p) => {
592
- var m;
593
- return (m = p.find((R) => R.id === l.id)) != null && m.delete || S.dismiss(l.id), p.filter(({ id: R }) => R !== l.id);
594
- });
595
- }, []);
596
- return a.useEffect(() => S.subscribe((l) => {
597
- if (l.dismiss) {
598
- requestAnimationFrame(() => {
599
- Z((p) => p.map((m) => m.id === l.id ? {
600
- ...m,
601
- delete: !0
602
- } : m));
603
- });
604
- return;
605
- }
606
- setTimeout(() => {
607
- Xt.flushSync(() => {
608
- Z((p) => {
609
- const m = p.findIndex((R) => R.id === l.id);
610
- return m !== -1 ? [
611
- ...p.slice(0, m),
612
- {
613
- ...p[m],
614
- ...l
615
- },
616
- ...p.slice(m + 1)
617
- ] : [
618
- l,
619
- ...p
620
- ];
621
- });
622
- });
623
- });
624
- }), [
625
- z
626
- ]), a.useEffect(() => {
627
- if (x !== "system") {
628
- v(x);
629
- return;
630
- }
631
- if (x === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? v("dark") : v("light")), typeof window > "u") return;
632
- const l = window.matchMedia("(prefers-color-scheme: dark)");
633
- try {
634
- l.addEventListener("change", ({ matches: p }) => {
635
- v(p ? "dark" : "light");
636
- });
637
- } catch {
638
- l.addListener(({ matches: m }) => {
639
- try {
640
- v(m ? "dark" : "light");
641
- } catch (R) {
642
- console.error(R);
643
- }
644
- });
645
- }
646
- }, [
647
- x
648
- ]), a.useEffect(() => {
649
- z.length <= 1 && A(!1);
650
- }, [
651
- z
652
- ]), a.useEffect(() => {
653
- const l = (p) => {
654
- var m;
655
- if (g.every((f) => p[f] || p.code === f)) {
656
- var X;
657
- A(!0), (X = P.current) == null || X.focus();
658
- }
659
- p.code === "Escape" && (document.activeElement === P.current || (m = P.current) != null && m.contains(document.activeElement)) && A(!1);
660
- };
661
- return document.addEventListener("keydown", l), () => document.removeEventListener("keydown", l);
662
- }, [
663
- g
664
- ]), a.useEffect(() => {
665
- if (P.current)
666
- return () => {
667
- B.current && (B.current.focus({
668
- preventScroll: !0
669
- }), B.current = null, F.current = !1);
670
- };
671
- }, [
672
- P.current
673
- ]), // Remove item from normal navigation flow, only available via hotkey
674
- /* @__PURE__ */ a.createElement("section", {
675
- ref: e,
676
- "aria-label": `${gt} ${$}`,
677
- tabIndex: -1,
678
- "aria-live": "polite",
679
- "aria-relevant": "additions text",
680
- "aria-atomic": "false",
681
- suppressHydrationWarning: !0
682
- }, ht.map((l, p) => {
683
- var m;
684
- const [R, X] = l.split("-");
685
- return Y.length ? /* @__PURE__ */ a.createElement("ol", {
686
- key: l,
687
- dir: ot === "auto" ? At() : ot,
688
- tabIndex: -1,
689
- ref: P,
690
- className: i,
691
- "data-sonner-toaster": !0,
692
- "data-sonner-theme": c,
693
- "data-y-position": R,
694
- "data-x-position": X,
695
- style: {
696
- "--front-toast-height": `${((m = nt[0]) == null ? void 0 : m.height) || 0}px`,
697
- "--width": `${me}px`,
698
- "--gap": `${U}px`,
699
- ...pt,
700
- ...ye(T, t)
701
- },
702
- onBlur: (f) => {
703
- F.current && !f.currentTarget.contains(f.relatedTarget) && (F.current = !1, B.current && (B.current.focus({
704
- preventScroll: !0
705
- }), B.current = null));
706
- },
707
- onFocus: (f) => {
708
- f.target instanceof HTMLElement && f.target.dataset.dismissible === "false" || F.current || (F.current = !0, B.current = f.relatedTarget);
709
- },
710
- onMouseEnter: () => A(!0),
711
- onMouseMove: () => A(!0),
712
- onMouseLeave: () => {
713
- rt || A(!1);
714
- },
715
- onDragEnd: () => A(!1),
716
- onPointerDown: (f) => {
717
- f.target instanceof HTMLElement && f.target.dataset.dismissible === "false" || et(!0);
718
- },
719
- onPointerUp: () => et(!1)
720
- }, Y.filter((f) => !f.position && p === 0 || f.position === l).map((f, K) => {
721
- var lt, dt;
722
- return /* @__PURE__ */ a.createElement(ve, {
723
- key: f.id,
724
- icons: st,
725
- index: K,
726
- toast: f,
727
- defaultRichColors: H,
728
- duration: (lt = d == null ? void 0 : d.duration) != null ? lt : E,
729
- className: d == null ? void 0 : d.className,
730
- descriptionClassName: d == null ? void 0 : d.descriptionClassName,
731
- invert: C,
732
- visibleToasts: W,
733
- closeButton: (dt = d == null ? void 0 : d.closeButton) != null ? dt : b,
734
- interacting: rt,
735
- position: l,
736
- style: d == null ? void 0 : d.style,
737
- unstyled: d == null ? void 0 : d.unstyled,
738
- classNames: d == null ? void 0 : d.classNames,
739
- cancelButtonStyle: d == null ? void 0 : d.cancelButtonStyle,
740
- actionButtonStyle: d == null ? void 0 : d.actionButtonStyle,
741
- closeButtonAriaLabel: d == null ? void 0 : d.closeButtonAriaLabel,
742
- removeToast: it,
743
- toasts: Y.filter((q) => q.position == f.position),
744
- heights: nt.filter((q) => q.position == f.position),
745
- setHeights: bt,
746
- expandByDefault: _,
747
- gap: U,
748
- expanded: tt,
749
- swipeDirections: o.swipeDirections
750
- });
751
- })) : null;
752
- }));
753
- });
754
- export {
755
- Ne as T,
756
- Se as t,
757
- Te as u
758
- };