@notificationapi/react 0.0.33 → 0.0.35

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 (30) hide show
  1. package/README.md +1 -1
  2. package/dist/assets/AntdIcon.js +1 -1
  3. package/dist/assets/CloseOutlined.js +13 -0
  4. package/dist/assets/Notification.js +17 -16
  5. package/dist/assets/PreferenceInput.js +1470 -0
  6. package/dist/assets/PurePanel.js +32 -42
  7. package/dist/assets/WebPushOptInMessage.js +478 -0
  8. package/dist/assets/button.js +50 -50
  9. package/dist/assets/colors.js +25 -20840
  10. package/dist/assets/compact-item.js +860 -0
  11. package/dist/assets/index.js +11 -9
  12. package/dist/assets/index2.js +10 -9
  13. package/dist/assets/index3.js +2303 -3150
  14. package/dist/assets/presets.js +22 -22
  15. package/dist/assets/reactNode.js +20821 -0
  16. package/dist/components/Notifications/Inbox.js +81 -78
  17. package/dist/components/Notifications/NotificationFeed.js +59 -31
  18. package/dist/components/Notifications/NotificationLauncher.js +61 -41
  19. package/dist/components/Notifications/NotificationPopup.js +72 -65
  20. package/dist/components/Preferences/NotificationPreferencesInline.d.ts +1 -1
  21. package/dist/components/Preferences/NotificationPreferencesInline.js +39 -5
  22. package/dist/components/Preferences/NotificationPreferencesPopup.d.ts +1 -1
  23. package/dist/components/Preferences/NotificationPreferencesPopup.js +463 -464
  24. package/dist/components/Preferences/PreferenceInput.js +5 -1466
  25. package/dist/components/Preferences/Preferences.js +24 -23
  26. package/dist/components/Provider/index.d.ts +9 -1
  27. package/dist/components/Provider/index.js +214 -156
  28. package/dist/components/WebPush/WebPushOptInMessage.d.ts +14 -0
  29. package/dist/components/WebPush/WebPushOptInMessage.js +8 -0
  30. package/package.json +2 -2
@@ -1,69 +1,59 @@
1
- import { a as R } from "./presets.js";
2
1
  import * as e from "react";
3
- import { I as w } from "./AntdIcon.js";
4
- import { u as E } from "./index3.js";
5
- import { C as y, a as I } from "./colors.js";
6
- var j = { icon: { tag: "svg", attrs: { "fill-rule": "evenodd", viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z" } }] }, name: "close", theme: "outlined" }, z = function(s, l) {
7
- return /* @__PURE__ */ e.createElement(w, R({}, s, {
8
- ref: l,
9
- icon: j
10
- }));
11
- }, S = /* @__PURE__ */ e.forwardRef(z);
12
- process.env.NODE_ENV !== "production" && (S.displayName = "CloseOutlined");
13
- function L(n) {
14
- return (s) => /* @__PURE__ */ e.createElement(y, {
2
+ import { u as x } from "./compact-item.js";
3
+ import { C as j, a as w } from "./reactNode.js";
4
+ function y(n) {
5
+ return (i) => /* @__PURE__ */ e.createElement(j, {
15
6
  theme: {
16
7
  token: {
17
8
  motion: !1,
18
9
  zIndexPopupBase: 0
19
10
  }
20
11
  }
21
- }, /* @__PURE__ */ e.createElement(n, Object.assign({}, s)));
12
+ }, /* @__PURE__ */ e.createElement(n, Object.assign({}, i)));
22
13
  }
23
- const M = (n, s, l, W) => L((r) => {
14
+ const W = (n, i, R, z) => y((r) => {
24
15
  const {
25
- prefixCls: f,
26
- style: p
27
- } = r, a = e.useRef(null), [m, g] = e.useState(0), [v, C] = e.useState(0), [c, P] = E(!1, {
16
+ prefixCls: p,
17
+ style: f
18
+ } = r, o = e.useRef(null), [d, g] = e.useState(0), [m, P] = e.useState(0), [a, v] = x(!1, {
28
19
  value: r.open
29
20
  }), {
30
- getPrefixCls: O
31
- } = e.useContext(I), h = O("select", f);
21
+ getPrefixCls: C
22
+ } = e.useContext(w), b = C("select", p);
32
23
  e.useEffect(() => {
33
- if (P(!0), typeof ResizeObserver < "u") {
34
- const i = new ResizeObserver((t) => {
35
- const o = t[0].target;
36
- g(o.offsetHeight + 8), C(o.offsetWidth);
37
- }), u = setInterval(() => {
24
+ if (v(!0), typeof ResizeObserver < "u") {
25
+ const l = new ResizeObserver((t) => {
26
+ const s = t[0].target;
27
+ g(s.offsetHeight + 8), P(s.offsetWidth);
28
+ }), c = setInterval(() => {
38
29
  var t;
39
- const o = `.${h}-dropdown`, d = (t = a.current) === null || t === void 0 ? void 0 : t.querySelector(o);
40
- d && (clearInterval(u), i.observe(d));
30
+ const s = `.${b}-dropdown`, u = (t = o.current) === null || t === void 0 ? void 0 : t.querySelector(s);
31
+ u && (clearInterval(c), l.observe(u));
41
32
  }, 10);
42
33
  return () => {
43
- clearInterval(u), i.disconnect();
34
+ clearInterval(c), l.disconnect();
44
35
  };
45
36
  }
46
37
  }, []);
47
- let b = Object.assign(Object.assign({}, r), {
48
- style: Object.assign(Object.assign({}, p), {
38
+ let h = Object.assign(Object.assign({}, r), {
39
+ style: Object.assign(Object.assign({}, f), {
49
40
  margin: 0
50
41
  }),
51
- open: c,
52
- visible: c,
53
- getPopupContainer: () => a.current
42
+ open: a,
43
+ visible: a,
44
+ getPopupContainer: () => o.current
54
45
  });
55
- const x = {
56
- paddingBottom: m,
46
+ const O = {
47
+ paddingBottom: d,
57
48
  position: "relative",
58
- minWidth: v
49
+ minWidth: m
59
50
  };
60
51
  return /* @__PURE__ */ e.createElement("div", {
61
- ref: a,
62
- style: x
63
- }, /* @__PURE__ */ e.createElement(n, Object.assign({}, b)));
52
+ ref: o,
53
+ style: O
54
+ }, /* @__PURE__ */ e.createElement(n, Object.assign({}, h)));
64
55
  });
65
56
  export {
66
- S as R,
67
- M as g,
68
- L as w
57
+ W as g,
58
+ y as w
69
59
  };
@@ -0,0 +1,478 @@
1
+ import { jsx as S, jsxs as P } from "react/jsx-runtime";
2
+ import * as i from "react";
3
+ import { useContext as ie } from "react";
4
+ import { NotificationAPIContext as le } from "../components/Provider/index.js";
5
+ import { a as $, c as z } from "./presets.js";
6
+ import { I as E } from "./AntdIcon.js";
7
+ import { R as ce } from "./compact-item.js";
8
+ import { R as se } from "./CloseOutlined.js";
9
+ import { g as ae, r as de, u as V, f as ue, a as pe, e as me, i as fe, j as ge, k as _, l as ve, n as ye, o as Ce, _ as he, b as be } from "./reactNode.js";
10
+ import { p as Ie } from "./pickAttrs.js";
11
+ import { B as H } from "./button.js";
12
+ var Se = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z" } }] }, name: "check-circle", theme: "filled" }, xe = function(e, n) {
13
+ return /* @__PURE__ */ i.createElement(E, $({}, e, {
14
+ ref: n,
15
+ icon: Se
16
+ }));
17
+ }, k = /* @__PURE__ */ i.forwardRef(xe);
18
+ process.env.NODE_ENV !== "production" && (k.displayName = "CheckCircleFilled");
19
+ var $e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, name: "exclamation-circle", theme: "filled" }, Ee = function(e, n) {
20
+ return /* @__PURE__ */ i.createElement(E, $({}, e, {
21
+ ref: n,
22
+ icon: $e
23
+ }));
24
+ }, D = /* @__PURE__ */ i.forwardRef(Ee);
25
+ process.env.NODE_ENV !== "production" && (D.displayName = "ExclamationCircleFilled");
26
+ var ze = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, name: "info-circle", theme: "filled" }, Ne = function(e, n) {
27
+ return /* @__PURE__ */ i.createElement(E, $({}, e, {
28
+ ref: n,
29
+ icon: ze
30
+ }));
31
+ }, W = /* @__PURE__ */ i.forwardRef(Ne);
32
+ process.env.NODE_ENV !== "production" && (W.displayName = "InfoCircleFilled");
33
+ const x = (o, e, n, t, l) => ({
34
+ background: o,
35
+ border: `${V(t.lineWidth)} ${t.lineType} ${e}`,
36
+ [`${l}-icon`]: {
37
+ color: n
38
+ }
39
+ }), we = (o) => {
40
+ const {
41
+ componentCls: e,
42
+ motionDurationSlow: n,
43
+ marginXS: t,
44
+ marginSM: l,
45
+ fontSize: c,
46
+ fontSizeLG: a,
47
+ lineHeight: p,
48
+ borderRadiusLG: d,
49
+ motionEaseInOutCirc: m,
50
+ withDescriptionIconSize: v,
51
+ colorText: y,
52
+ colorTextHeading: C,
53
+ withDescriptionPadding: h,
54
+ defaultPadding: s
55
+ } = o;
56
+ return {
57
+ [e]: Object.assign(Object.assign({}, de(o)), {
58
+ position: "relative",
59
+ display: "flex",
60
+ alignItems: "center",
61
+ padding: s,
62
+ wordWrap: "break-word",
63
+ borderRadius: d,
64
+ [`&${e}-rtl`]: {
65
+ direction: "rtl"
66
+ },
67
+ [`${e}-content`]: {
68
+ flex: 1,
69
+ minWidth: 0
70
+ },
71
+ [`${e}-icon`]: {
72
+ marginInlineEnd: t,
73
+ lineHeight: 0
74
+ },
75
+ "&-description": {
76
+ display: "none",
77
+ fontSize: c,
78
+ lineHeight: p
79
+ },
80
+ "&-message": {
81
+ color: C
82
+ },
83
+ [`&${e}-motion-leave`]: {
84
+ overflow: "hidden",
85
+ opacity: 1,
86
+ transition: `max-height ${n} ${m}, opacity ${n} ${m},
87
+ padding-top ${n} ${m}, padding-bottom ${n} ${m},
88
+ margin-bottom ${n} ${m}`
89
+ },
90
+ [`&${e}-motion-leave-active`]: {
91
+ maxHeight: 0,
92
+ marginBottom: "0 !important",
93
+ paddingTop: 0,
94
+ paddingBottom: 0,
95
+ opacity: 0
96
+ }
97
+ }),
98
+ [`${e}-with-description`]: {
99
+ alignItems: "flex-start",
100
+ padding: h,
101
+ [`${e}-icon`]: {
102
+ marginInlineEnd: l,
103
+ fontSize: v,
104
+ lineHeight: 0
105
+ },
106
+ [`${e}-message`]: {
107
+ display: "block",
108
+ marginBottom: t,
109
+ color: C,
110
+ fontSize: a
111
+ },
112
+ [`${e}-description`]: {
113
+ display: "block",
114
+ color: y
115
+ }
116
+ },
117
+ [`${e}-banner`]: {
118
+ marginBottom: 0,
119
+ border: "0 !important",
120
+ borderRadius: 0
121
+ }
122
+ };
123
+ }, Oe = (o) => {
124
+ const {
125
+ componentCls: e,
126
+ colorSuccess: n,
127
+ colorSuccessBorder: t,
128
+ colorSuccessBg: l,
129
+ colorWarning: c,
130
+ colorWarningBorder: a,
131
+ colorWarningBg: p,
132
+ colorError: d,
133
+ colorErrorBorder: m,
134
+ colorErrorBg: v,
135
+ colorInfo: y,
136
+ colorInfoBorder: C,
137
+ colorInfoBg: h
138
+ } = o;
139
+ return {
140
+ [e]: {
141
+ "&-success": x(l, t, n, o, e),
142
+ "&-info": x(h, C, y, o, e),
143
+ "&-warning": x(p, a, c, o, e),
144
+ "&-error": Object.assign(Object.assign({}, x(v, m, d, o, e)), {
145
+ [`${e}-description > pre`]: {
146
+ margin: 0,
147
+ padding: 0
148
+ }
149
+ })
150
+ }
151
+ };
152
+ }, Me = (o) => {
153
+ const {
154
+ componentCls: e,
155
+ iconCls: n,
156
+ motionDurationMid: t,
157
+ marginXS: l,
158
+ fontSizeIcon: c,
159
+ colorIcon: a,
160
+ colorIconHover: p
161
+ } = o;
162
+ return {
163
+ [e]: {
164
+ "&-action": {
165
+ marginInlineStart: l
166
+ },
167
+ [`${e}-close-icon`]: {
168
+ marginInlineStart: l,
169
+ padding: 0,
170
+ overflow: "hidden",
171
+ fontSize: c,
172
+ lineHeight: V(c),
173
+ backgroundColor: "transparent",
174
+ border: "none",
175
+ outline: "none",
176
+ cursor: "pointer",
177
+ [`${n}-close`]: {
178
+ color: a,
179
+ transition: `color ${t}`,
180
+ "&:hover": {
181
+ color: p
182
+ }
183
+ }
184
+ },
185
+ "&-close-text": {
186
+ color: a,
187
+ transition: `color ${t}`,
188
+ "&:hover": {
189
+ color: p
190
+ }
191
+ }
192
+ }
193
+ };
194
+ }, Be = (o) => ({
195
+ withDescriptionIconSize: o.fontSizeHeading3,
196
+ defaultPadding: `${o.paddingContentVerticalSM}px 12px`,
197
+ withDescriptionPadding: `${o.paddingMD}px ${o.paddingContentHorizontalLG}px`
198
+ }), Re = ae("Alert", (o) => [we(o), Oe(o), Me(o)], Be);
199
+ var j = function(o, e) {
200
+ var n = {};
201
+ for (var t in o) Object.prototype.hasOwnProperty.call(o, t) && e.indexOf(t) < 0 && (n[t] = o[t]);
202
+ if (o != null && typeof Object.getOwnPropertySymbols == "function") for (var l = 0, t = Object.getOwnPropertySymbols(o); l < t.length; l++)
203
+ e.indexOf(t[l]) < 0 && Object.prototype.propertyIsEnumerable.call(o, t[l]) && (n[t[l]] = o[t[l]]);
204
+ return n;
205
+ };
206
+ const Pe = {
207
+ success: k,
208
+ info: W,
209
+ error: ce,
210
+ warning: D
211
+ }, _e = (o) => {
212
+ const {
213
+ icon: e,
214
+ prefixCls: n,
215
+ type: t
216
+ } = o, l = Pe[t] || null;
217
+ return e ? ge(e, /* @__PURE__ */ i.createElement("span", {
218
+ className: `${n}-icon`
219
+ }, e), () => ({
220
+ className: z(`${n}-icon`, {
221
+ [e.props.className]: e.props.className
222
+ })
223
+ })) : /* @__PURE__ */ i.createElement(l, {
224
+ className: `${n}-icon`
225
+ });
226
+ }, He = (o) => {
227
+ const {
228
+ isClosable: e,
229
+ prefixCls: n,
230
+ closeIcon: t,
231
+ handleClose: l,
232
+ ariaProps: c
233
+ } = o, a = t === !0 || t === void 0 ? /* @__PURE__ */ i.createElement(se, null) : t;
234
+ return e ? /* @__PURE__ */ i.createElement("button", Object.assign({
235
+ type: "button",
236
+ onClick: l,
237
+ className: `${n}-close-icon`,
238
+ tabIndex: 0
239
+ }, c), a) : null;
240
+ }, N = /* @__PURE__ */ i.forwardRef((o, e) => {
241
+ const {
242
+ description: n,
243
+ prefixCls: t,
244
+ message: l,
245
+ banner: c,
246
+ className: a,
247
+ rootClassName: p,
248
+ style: d,
249
+ onMouseEnter: m,
250
+ onMouseLeave: v,
251
+ onClick: y,
252
+ afterClose: C,
253
+ showIcon: h,
254
+ closable: s,
255
+ closeText: I,
256
+ closeIcon: b,
257
+ action: w,
258
+ id: T
259
+ } = o, L = j(o, ["description", "prefixCls", "message", "banner", "className", "rootClassName", "style", "onMouseEnter", "onMouseLeave", "onClick", "afterClose", "showIcon", "closable", "closeText", "closeIcon", "action", "id"]), [O, G] = i.useState(!1);
260
+ process.env.NODE_ENV !== "production" && ue("Alert").deprecated(!I, "closeText", "closable.closeIcon");
261
+ const M = i.useRef(null);
262
+ i.useImperativeHandle(e, () => ({
263
+ nativeElement: M.current
264
+ }));
265
+ const {
266
+ getPrefixCls: X,
267
+ direction: U,
268
+ alert: r
269
+ } = i.useContext(pe), u = X("alert", t), [Y, q, J] = Re(u), K = (f) => {
270
+ var g;
271
+ G(!0), (g = o.onClose) === null || g === void 0 || g.call(o, f);
272
+ }, B = i.useMemo(() => o.type !== void 0 ? o.type : c ? "warning" : "info", [o.type, c]), Q = i.useMemo(() => typeof s == "object" && s.closeIcon || I ? !0 : typeof s == "boolean" ? s : b !== !1 && b !== null && b !== void 0 ? !0 : !!(r != null && r.closable), [I, b, s, r == null ? void 0 : r.closable]), R = c && h === void 0 ? !0 : h, Z = z(u, `${u}-${B}`, {
273
+ [`${u}-with-description`]: !!n,
274
+ [`${u}-no-icon`]: !R,
275
+ [`${u}-banner`]: !!c,
276
+ [`${u}-rtl`]: U === "rtl"
277
+ }, r == null ? void 0 : r.className, a, p, J, q), ee = Ie(L, {
278
+ aria: !0,
279
+ data: !0
280
+ }), oe = i.useMemo(() => {
281
+ var f, g;
282
+ return typeof s == "object" && s.closeIcon ? s.closeIcon : I || (b !== void 0 ? b : typeof (r == null ? void 0 : r.closable) == "object" && (!((f = r == null ? void 0 : r.closable) === null || f === void 0) && f.closeIcon) ? (g = r == null ? void 0 : r.closable) === null || g === void 0 ? void 0 : g.closeIcon : r == null ? void 0 : r.closeIcon);
283
+ }, [b, s, I, r == null ? void 0 : r.closeIcon]), ne = i.useMemo(() => {
284
+ const f = s ?? (r == null ? void 0 : r.closable);
285
+ return typeof f == "object" ? j(f, ["closeIcon"]) : {};
286
+ }, [s, r == null ? void 0 : r.closable]);
287
+ return Y(/* @__PURE__ */ i.createElement(me, {
288
+ visible: !O,
289
+ motionName: `${u}-motion`,
290
+ motionAppear: !1,
291
+ motionEnter: !1,
292
+ onLeaveStart: (f) => ({
293
+ maxHeight: f.offsetHeight
294
+ }),
295
+ onLeaveEnd: C
296
+ }, (f, g) => {
297
+ let {
298
+ className: te,
299
+ style: re
300
+ } = f;
301
+ return /* @__PURE__ */ i.createElement("div", Object.assign({
302
+ id: T,
303
+ ref: fe(M, g),
304
+ "data-show": !O,
305
+ className: z(Z, te),
306
+ style: Object.assign(Object.assign(Object.assign({}, r == null ? void 0 : r.style), d), re),
307
+ onMouseEnter: m,
308
+ onMouseLeave: v,
309
+ onClick: y,
310
+ role: "alert"
311
+ }, ee), R ? /* @__PURE__ */ i.createElement(_e, {
312
+ description: n,
313
+ icon: o.icon,
314
+ prefixCls: u,
315
+ type: B
316
+ }) : null, /* @__PURE__ */ i.createElement("div", {
317
+ className: `${u}-content`
318
+ }, l ? /* @__PURE__ */ i.createElement("div", {
319
+ className: `${u}-message`
320
+ }, l) : null, n ? /* @__PURE__ */ i.createElement("div", {
321
+ className: `${u}-description`
322
+ }, n) : null), w ? /* @__PURE__ */ i.createElement("div", {
323
+ className: `${u}-action`
324
+ }, w) : null, /* @__PURE__ */ i.createElement(He, {
325
+ isClosable: Q,
326
+ prefixCls: u,
327
+ closeIcon: oe,
328
+ handleClose: K,
329
+ ariaProps: ne
330
+ }));
331
+ }));
332
+ });
333
+ process.env.NODE_ENV !== "production" && (N.displayName = "Alert");
334
+ function je(o, e, n) {
335
+ return e = _(e), ve(o, ye() ? Reflect.construct(e, n || [], _(o).constructor) : e.apply(o, n));
336
+ }
337
+ let Ve = /* @__PURE__ */ function(o) {
338
+ function e() {
339
+ var n;
340
+ return be(this, e), n = je(this, e, arguments), n.state = {
341
+ error: void 0,
342
+ info: {
343
+ componentStack: ""
344
+ }
345
+ }, n;
346
+ }
347
+ return Ce(e, o), he(e, [{
348
+ key: "componentDidCatch",
349
+ value: function(t, l) {
350
+ this.setState({
351
+ error: t,
352
+ info: l
353
+ });
354
+ }
355
+ }, {
356
+ key: "render",
357
+ value: function() {
358
+ const {
359
+ message: t,
360
+ description: l,
361
+ id: c,
362
+ children: a
363
+ } = this.props, {
364
+ error: p,
365
+ info: d
366
+ } = this.state, m = (d == null ? void 0 : d.componentStack) || null, v = typeof t > "u" ? (p || "").toString() : t, y = typeof l > "u" ? m : l;
367
+ return p ? /* @__PURE__ */ i.createElement(N, {
368
+ id: c,
369
+ type: "error",
370
+ message: v,
371
+ description: /* @__PURE__ */ i.createElement("pre", {
372
+ style: {
373
+ fontSize: "0.9em",
374
+ overflowX: "auto"
375
+ }
376
+ }, y)
377
+ }) : a;
378
+ }
379
+ }]);
380
+ }(i.Component);
381
+ const A = N;
382
+ A.ErrorBoundary = Ve;
383
+ var ke = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M854.4 800.9c.2-.3.5-.6.7-.9C920.6 722.1 960 621.7 960 512s-39.4-210.1-104.8-288c-.2-.3-.5-.5-.7-.8-1.1-1.3-2.1-2.5-3.2-3.7-.4-.5-.8-.9-1.2-1.4l-4.1-4.7-.1-.1c-1.5-1.7-3.1-3.4-4.6-5.1l-.1-.1c-3.2-3.4-6.4-6.8-9.7-10.1l-.1-.1-4.8-4.8-.3-.3c-1.5-1.5-3-2.9-4.5-4.3-.5-.5-1-1-1.6-1.5-1-1-2-1.9-3-2.8-.3-.3-.7-.6-1-1C736.4 109.2 629.5 64 512 64s-224.4 45.2-304.3 119.2c-.3.3-.7.6-1 1-1 .9-2 1.9-3 2.9-.5.5-1 1-1.6 1.5-1.5 1.4-3 2.9-4.5 4.3l-.3.3-4.8 4.8-.1.1c-3.3 3.3-6.5 6.7-9.7 10.1l-.1.1c-1.6 1.7-3.1 3.4-4.6 5.1l-.1.1c-1.4 1.5-2.8 3.1-4.1 4.7-.4.5-.8.9-1.2 1.4-1.1 1.2-2.1 2.5-3.2 3.7-.2.3-.5.5-.7.8C103.4 301.9 64 402.3 64 512s39.4 210.1 104.8 288c.2.3.5.6.7.9l3.1 3.7c.4.5.8.9 1.2 1.4l4.1 4.7c0 .1.1.1.1.2 1.5 1.7 3 3.4 4.6 5l.1.1c3.2 3.4 6.4 6.8 9.6 10.1l.1.1c1.6 1.6 3.1 3.2 4.7 4.7l.3.3c3.3 3.3 6.7 6.5 10.1 9.6 80.1 74 187 119.2 304.5 119.2s224.4-45.2 304.3-119.2a300 300 0 0010-9.6l.3-.3c1.6-1.6 3.2-3.1 4.7-4.7l.1-.1c3.3-3.3 6.5-6.7 9.6-10.1l.1-.1c1.5-1.7 3.1-3.3 4.6-5 0-.1.1-.1.1-.2 1.4-1.5 2.8-3.1 4.1-4.7.4-.5.8-.9 1.2-1.4a99 99 0 003.3-3.7zm4.1-142.6c-13.8 32.6-32 62.8-54.2 90.2a444.07 444.07 0 00-81.5-55.9c11.6-46.9 18.8-98.4 20.7-152.6H887c-3 40.9-12.6 80.6-28.5 118.3zM887 484H743.5c-1.9-54.2-9.1-105.7-20.7-152.6 29.3-15.6 56.6-34.4 81.5-55.9A373.86 373.86 0 01887 484zM658.3 165.5c39.7 16.8 75.8 40 107.6 69.2a394.72 394.72 0 01-59.4 41.8c-15.7-45-35.8-84.1-59.2-115.4 3.7 1.4 7.4 2.9 11 4.4zm-90.6 700.6c-9.2 7.2-18.4 12.7-27.7 16.4V697a389.1 389.1 0 01115.7 26.2c-8.3 24.6-17.9 47.3-29 67.8-17.4 32.4-37.8 58.3-59 75.1zm59-633.1c11 20.6 20.7 43.3 29 67.8A389.1 389.1 0 01540 327V141.6c9.2 3.7 18.5 9.1 27.7 16.4 21.2 16.7 41.6 42.6 59 75zM540 640.9V540h147.5c-1.6 44.2-7.1 87.1-16.3 127.8l-.3 1.2A445.02 445.02 0 00540 640.9zm0-156.9V383.1c45.8-2.8 89.8-12.5 130.9-28.1l.3 1.2c9.2 40.7 14.7 83.5 16.3 127.8H540zm-56 56v100.9c-45.8 2.8-89.8 12.5-130.9 28.1l-.3-1.2c-9.2-40.7-14.7-83.5-16.3-127.8H484zm-147.5-56c1.6-44.2 7.1-87.1 16.3-127.8l.3-1.2c41.1 15.6 85 25.3 130.9 28.1V484H336.5zM484 697v185.4c-9.2-3.7-18.5-9.1-27.7-16.4-21.2-16.7-41.7-42.7-59.1-75.1-11-20.6-20.7-43.3-29-67.8 37.2-14.6 75.9-23.3 115.8-26.1zm0-370a389.1 389.1 0 01-115.7-26.2c8.3-24.6 17.9-47.3 29-67.8 17.4-32.4 37.8-58.4 59.1-75.1 9.2-7.2 18.4-12.7 27.7-16.4V327zM365.7 165.5c3.7-1.5 7.3-3 11-4.4-23.4 31.3-43.5 70.4-59.2 115.4-21-12-40.9-26-59.4-41.8 31.8-29.2 67.9-52.4 107.6-69.2zM165.5 365.7c13.8-32.6 32-62.8 54.2-90.2 24.9 21.5 52.2 40.3 81.5 55.9-11.6 46.9-18.8 98.4-20.7 152.6H137c3-40.9 12.6-80.6 28.5-118.3zM137 540h143.5c1.9 54.2 9.1 105.7 20.7 152.6a444.07 444.07 0 00-81.5 55.9A373.86 373.86 0 01137 540zm228.7 318.5c-39.7-16.8-75.8-40-107.6-69.2 18.5-15.8 38.4-29.7 59.4-41.8 15.7 45 35.8 84.1 59.2 115.4-3.7-1.4-7.4-2.9-11-4.4zm292.6 0c-3.7 1.5-7.3 3-11 4.4 23.4-31.3 43.5-70.4 59.2-115.4 21 12 40.9 26 59.4 41.8a373.81 373.81 0 01-107.6 69.2z" } }] }, name: "global", theme: "outlined" }, De = function(e, n) {
384
+ return /* @__PURE__ */ i.createElement(E, $({}, e, {
385
+ ref: n,
386
+ icon: ke
387
+ }));
388
+ }, F = /* @__PURE__ */ i.forwardRef(De);
389
+ process.env.NODE_ENV !== "production" && (F.displayName = "GlobalOutlined");
390
+ const Je = ({
391
+ hideAfterInteraction: o,
392
+ alertContainerStyle: e,
393
+ descriptionStyle: n,
394
+ buttonContainerStyle: t,
395
+ yesButtonStyle: l,
396
+ cancelButtonStyle: c,
397
+ description: a,
398
+ icon: p
399
+ }) => {
400
+ const d = ie(le);
401
+ if (!d)
402
+ return null;
403
+ const m = {
404
+ marginBottom: "10px",
405
+ borderRadius: "5px",
406
+ padding: "10px",
407
+ fontSize: "12px",
408
+ // Smaller font size
409
+ margin: "10px auto",
410
+ // Center if width is more than 500px
411
+ display: "flex",
412
+ alignItems: "center",
413
+ // Align items vertically
414
+ ...e
415
+ }, v = {
416
+ display: "flex",
417
+ justifyContent: "space-between",
418
+ alignItems: "center",
419
+ // Align items vertically
420
+ fontSize: "12px",
421
+ width: "100%",
422
+ ...n
423
+ }, y = {
424
+ display: "flex",
425
+ alignItems: "center",
426
+ ...t
427
+ }, C = {
428
+ marginLeft: "10px",
429
+ marginRight: "10px",
430
+ fontSize: "10px",
431
+ ...l
432
+ }, h = {
433
+ fontSize: "10px",
434
+ ...c
435
+ };
436
+ return /* @__PURE__ */ S(
437
+ A,
438
+ {
439
+ type: "info",
440
+ showIcon: !0,
441
+ icon: p ?? /* @__PURE__ */ S(F, { type: "text" }),
442
+ style: m,
443
+ description: /* @__PURE__ */ P("div", { style: v, children: [
444
+ /* @__PURE__ */ S("span", { children: a ?? "Would you like to enable web push notifications to stay updated?" }),
445
+ /* @__PURE__ */ P("div", { style: y, children: [
446
+ /* @__PURE__ */ S(
447
+ H,
448
+ {
449
+ type: "primary",
450
+ style: C,
451
+ onClick: () => {
452
+ o && localStorage.setItem("hideWebPushOptInMessage", "true"), d.setWebPushOptIn(!0), d.setWebPushOptInMessage(!1);
453
+ },
454
+ children: "Yes"
455
+ }
456
+ ),
457
+ /* @__PURE__ */ S(
458
+ H,
459
+ {
460
+ style: h,
461
+ onClick: () => {
462
+ o && localStorage.setItem("hideWebPushOptInMessage", "true"), d.setWebPushOptInMessage(!1);
463
+ },
464
+ children: "No"
465
+ }
466
+ )
467
+ ] })
468
+ ] })
469
+ }
470
+ );
471
+ };
472
+ export {
473
+ F as R,
474
+ Je as W,
475
+ D as a,
476
+ k as b,
477
+ W as c
478
+ };