@smwb/ui-solid 0.6.0 → 0.8.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 (43) hide show
  1. package/dist/assets/styles/less/components/confirmDialog/confirmDialog.entry.css +1 -0
  2. package/dist/components/feedBack/confirmDialog/confirmDialog.d.ts +27 -0
  3. package/dist/components/feedBack/confirmDialog/confirmDialog.js +108 -0
  4. package/dist/components/feedBack/confirmDialog/confirmDialog.js.map +1 -0
  5. package/dist/components/feedBack/confirmDialog/index.d.ts +2 -0
  6. package/dist/headless/components/feedBack/confirmDialog/confirmDialog.js +107 -0
  7. package/dist/headless/components/feedBack/confirmDialog/confirmDialog.js.map +1 -0
  8. package/dist/headless/index.js +294 -288
  9. package/dist/headless/index.js.map +1 -1
  10. package/dist/headless/primitives/createMediaQuery.js +13 -0
  11. package/dist/headless/primitives/createMediaQuery.js.map +1 -0
  12. package/dist/headless/primitives/createPersistedJson.js +27 -0
  13. package/dist/headless/primitives/createPersistedJson.js.map +1 -0
  14. package/dist/headless/source/components/feedBack/confirmDialog/confirmDialog.jsx +76 -0
  15. package/dist/headless/source/components/feedBack/confirmDialog/confirmDialog.jsx.map +1 -0
  16. package/dist/headless/source/components/feedBack/confirmDialog/index.js +5 -0
  17. package/dist/headless/source/components/feedBack/confirmDialog/index.js.map +7 -0
  18. package/dist/headless/source/index.js +6 -0
  19. package/dist/headless/source/index.js.map +2 -2
  20. package/dist/headless/source/primitives/createMediaQuery.js +19 -0
  21. package/dist/headless/source/primitives/createMediaQuery.js.map +7 -0
  22. package/dist/headless/source/primitives/createPersistedJson.js +27 -0
  23. package/dist/headless/source/primitives/createPersistedJson.js.map +7 -0
  24. package/dist/index.d.ts +5 -0
  25. package/dist/index.js +294 -288
  26. package/dist/index.js.map +1 -1
  27. package/dist/primitives/createMediaQuery.d.ts +11 -0
  28. package/dist/primitives/createMediaQuery.js +13 -0
  29. package/dist/primitives/createMediaQuery.js.map +1 -0
  30. package/dist/primitives/createPersistedJson.d.ts +18 -0
  31. package/dist/primitives/createPersistedJson.js +27 -0
  32. package/dist/primitives/createPersistedJson.js.map +1 -0
  33. package/dist/source/components/feedBack/confirmDialog/confirmDialog.jsx +77 -0
  34. package/dist/source/components/feedBack/confirmDialog/confirmDialog.jsx.map +1 -0
  35. package/dist/source/components/feedBack/confirmDialog/index.js +5 -0
  36. package/dist/source/components/feedBack/confirmDialog/index.js.map +7 -0
  37. package/dist/source/index.js +6 -0
  38. package/dist/source/index.js.map +2 -2
  39. package/dist/source/primitives/createMediaQuery.js +19 -0
  40. package/dist/source/primitives/createMediaQuery.js.map +7 -0
  41. package/dist/source/primitives/createPersistedJson.js +27 -0
  42. package/dist/source/primitives/createPersistedJson.js.map +7 -0
  43. package/package.json +21 -3
@@ -0,0 +1 @@
1
+ .smwb-confirm-dialog__body{display:flex;flex-direction:column;gap:8px;min-width:280px}
@@ -0,0 +1,27 @@
1
+ import { type JSX } from "solid-js";
2
+ export interface ConfirmDialogProps {
3
+ open: boolean;
4
+ title: string;
5
+ /** The subject of the action, shown emphasised on its own line (e.g. the asset name). */
6
+ subject?: string;
7
+ /** A secondary explanatory line (e.g. "can't be undone"). */
8
+ message?: string;
9
+ confirmLabel: string;
10
+ cancelLabel?: string;
11
+ /** Style the confirm button as destructive (red). */
12
+ danger?: boolean;
13
+ /** Disable the actions + gate Esc/outside-click while a confirm is in flight. */
14
+ busy?: boolean;
15
+ onConfirm: () => void;
16
+ onCancel: () => void;
17
+ class?: string;
18
+ }
19
+ /**
20
+ * An alert/confirm dialog built on {@link Modal}: a title, an optional emphasised subject + secondary
21
+ * message, and Cancel / Confirm actions. `role="alertdialog"` with the subject + message wired to
22
+ * `aria-describedby` so a screen reader announces the consequence, not just the title. While `busy`,
23
+ * Escape + outside-click are gated and the buttons disabled. Pure presentation — the caller owns the
24
+ * open state and the confirm/cancel handlers (and supplies localised labels).
25
+ */
26
+ export declare function ConfirmDialog(props: ConfirmDialogProps): JSX.Element;
27
+ export default ConfirmDialog;
@@ -0,0 +1,108 @@
1
+ import { createComponent as r, mergeProps as d, insert as l, effect as g, className as b, template as p } from "solid-js/web";
2
+ import '../../../assets/styles/less/components/confirmDialog/confirmDialog.entry.css';/* empty css */
3
+ import { splitProps as f, createUniqueId as i, Show as c } from "solid-js";
4
+ import y from "clsx";
5
+ import { Modal as n } from "../modal/modal.js";
6
+ import { Typography as s } from "../../dataDisplay/typography/typography.js";
7
+ import { Button as m } from "../../inputs/button/button.js";
8
+ var C = /* @__PURE__ */ p("<div>");
9
+ function z(u) {
10
+ const [e] = f(u, ["open", "title", "subject", "message", "confirmLabel", "cancelLabel", "danger", "busy", "onConfirm", "onCancel", "class"]), o = i(), a = i();
11
+ return r(n, d({
12
+ get open() {
13
+ return e.open;
14
+ },
15
+ onClose: () => e.onCancel(),
16
+ size: "small",
17
+ role: "alertdialog",
18
+ backdrop: "dark",
19
+ get closeOnEsc() {
20
+ return !e.busy;
21
+ },
22
+ get closeOnOutsideClick() {
23
+ return !e.busy;
24
+ },
25
+ get "aria-label"() {
26
+ return e.title;
27
+ }
28
+ }, () => {
29
+ const t = [e.subject ? o : "", e.message ? a : ""].filter(Boolean).join(" ");
30
+ return t ? {
31
+ "aria-describedby": t
32
+ } : {};
33
+ }, {
34
+ get children() {
35
+ return [r(n.Header, {
36
+ get children() {
37
+ return e.title;
38
+ }
39
+ }), r(n.Content, {
40
+ get children() {
41
+ var t = C();
42
+ return l(t, r(c, {
43
+ get when() {
44
+ return e.subject;
45
+ },
46
+ get children() {
47
+ return r(s, {
48
+ id: o,
49
+ variant: "body2",
50
+ color: "textPrimary",
51
+ component: "span",
52
+ get children() {
53
+ return e.subject;
54
+ }
55
+ });
56
+ }
57
+ }), null), l(t, r(c, {
58
+ get when() {
59
+ return e.message;
60
+ },
61
+ get children() {
62
+ return r(s, {
63
+ id: a,
64
+ variant: "caption",
65
+ color: "textSecondary",
66
+ component: "span",
67
+ get children() {
68
+ return e.message;
69
+ }
70
+ });
71
+ }
72
+ }), null), g(() => b(t, y("smwb-confirm-dialog__body", e.class))), t;
73
+ }
74
+ }), r(n.Footer, {
75
+ get children() {
76
+ return [r(m, {
77
+ variant: "text",
78
+ size: "small",
79
+ get disabled() {
80
+ return !!e.busy;
81
+ },
82
+ onClick: () => e.onCancel(),
83
+ get label() {
84
+ return e.cancelLabel ?? "Cancel";
85
+ }
86
+ }), r(m, {
87
+ variant: "contained",
88
+ size: "small",
89
+ get color() {
90
+ return e.danger ? "error" : "primary";
91
+ },
92
+ get disabled() {
93
+ return !!e.busy;
94
+ },
95
+ onClick: () => e.onConfirm(),
96
+ get label() {
97
+ return e.confirmLabel;
98
+ }
99
+ })];
100
+ }
101
+ })];
102
+ }
103
+ }));
104
+ }
105
+ export {
106
+ z as ConfirmDialog
107
+ };
108
+ //# sourceMappingURL=confirmDialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"confirmDialog.js","sources":["../../../../src/components/feedBack/confirmDialog/confirmDialog.tsx"],"sourcesContent":["import { type JSX, Show, splitProps, createUniqueId } from \"solid-js\";\nimport cn from \"clsx\";\nimport { Modal } from \"../modal\";\nimport { Button } from \"../../inputs/button\";\nimport { Typography } from \"../../dataDisplay/typography\";\n\nexport interface ConfirmDialogProps {\n open: boolean;\n title: string;\n /** The subject of the action, shown emphasised on its own line (e.g. the asset name). */\n subject?: string;\n /** A secondary explanatory line (e.g. \"can't be undone\"). */\n message?: string;\n confirmLabel: string;\n cancelLabel?: string;\n /** Style the confirm button as destructive (red). */\n danger?: boolean;\n /** Disable the actions + gate Esc/outside-click while a confirm is in flight. */\n busy?: boolean;\n onConfirm: () => void;\n onCancel: () => void;\n class?: string;\n}\n\n/**\n * An alert/confirm dialog built on {@link Modal}: a title, an optional emphasised subject + secondary\n * message, and Cancel / Confirm actions. `role=\"alertdialog\"` with the subject + message wired to\n * `aria-describedby` so a screen reader announces the consequence, not just the title. While `busy`,\n * Escape + outside-click are gated and the buttons disabled. Pure presentation — the caller owns the\n * open state and the confirm/cancel handlers (and supplies localised labels).\n */\nexport function ConfirmDialog(props: ConfirmDialogProps): JSX.Element {\n const [local] = splitProps(props, [\n \"open\",\n \"title\",\n \"subject\",\n \"message\",\n \"confirmLabel\",\n \"cancelLabel\",\n \"danger\",\n \"busy\",\n \"onConfirm\",\n \"onCancel\",\n \"class\",\n ]);\n const subjectId = createUniqueId();\n const messageId = createUniqueId();\n // Only include aria-describedby when there's something to describe (the lib's exactOptionalPropertyTypes\n // forbids passing an explicit `undefined` to Modal's optional prop, so spread a precisely-typed object).\n const ariaDescribed = (): { \"aria-describedby\"?: string } => {\n const ids = [local.subject ? subjectId : \"\", local.message ? messageId : \"\"].filter(Boolean).join(\" \");\n return ids ? { \"aria-describedby\": ids } : {};\n };\n\n return (\n <Modal\n open={local.open}\n onClose={() => local.onCancel()}\n size=\"small\"\n role=\"alertdialog\"\n backdrop=\"dark\"\n closeOnEsc={!local.busy}\n closeOnOutsideClick={!local.busy}\n aria-label={local.title}\n {...ariaDescribed()}\n >\n <Modal.Header>{local.title}</Modal.Header>\n <Modal.Content>\n <div class={cn(\"smwb-confirm-dialog__body\", local.class)}>\n <Show when={local.subject}>\n <Typography id={subjectId} variant=\"body2\" color=\"textPrimary\" component=\"span\">\n {local.subject}\n </Typography>\n </Show>\n <Show when={local.message}>\n <Typography id={messageId} variant=\"caption\" color=\"textSecondary\" component=\"span\">\n {local.message}\n </Typography>\n </Show>\n </div>\n </Modal.Content>\n <Modal.Footer>\n <Button\n variant=\"text\"\n size=\"small\"\n disabled={!!local.busy}\n onClick={() => local.onCancel()}\n label={local.cancelLabel ?? \"Cancel\"}\n />\n <Button\n variant=\"contained\"\n size=\"small\"\n color={local.danger ? \"error\" : \"primary\"}\n disabled={!!local.busy}\n onClick={() => local.onConfirm()}\n label={local.confirmLabel}\n />\n </Modal.Footer>\n </Modal>\n );\n}\n\nexport default ConfirmDialog;\n"],"names":["ConfirmDialog","props","local","splitProps","subjectId","createUniqueId","messageId","_$createComponent","Modal","_$mergeProps","open","onClose","onCancel","size","role","backdrop","closeOnEsc","busy","closeOnOutsideClick","title","ariaDescribed","ids","subject","message","filter","Boolean","join","children","Header","Content","_el$","_tmpl$","_$insert","Show","when","Typography","id","variant","color","component","_$effect","_$className","cn","class","Footer","Button","disabled","onClick","label","cancelLabel","danger","onConfirm","confirmLabel"],"mappings":";;;;;;;;AAgCO,SAASA,EAAcC,GAAwC;AACpE,QAAM,CAACC,CAAK,IAAIC,EAAWF,GAAO,CAChC,QACA,SACA,WACA,WACA,gBACA,eACA,UACA,QACA,aACA,YACA,OAAO,CACR,GACKG,IAAYC,EAAAA,GACZC,IAAYD,EAAAA;AAQlB,SAAAE,EACGC,GAAKC,EAAA;AAAA,IAAA,IACJC,OAAI;AAAA,aAAER,EAAMQ;AAAAA,IAAI;AAAA,IAChBC,SAASA,MAAMT,EAAMU,SAAAA;AAAAA,IACrBC,MAAI;AAAA,IACJC,MAAI;AAAA,IACJC,UAAQ;AAAA,IAAA,IACRC,aAAU;AAAA,aAAE,CAACd,EAAMe;AAAAA,IAAI;AAAA,IAAA,IACvBC,sBAAmB;AAAA,aAAE,CAAChB,EAAMe;AAAAA,IAAI;AAAA,IAAA,IAAA,eAAA;AAAA,aACpBf,EAAMiB;AAAAA,IAAK;AAAA,EAAA,GAdLC,MAAuC;AAC3D,UAAMC,IAAM,CAACnB,EAAMoB,UAAUlB,IAAY,IAAIF,EAAMqB,UAAUjB,IAAY,EAAE,EAAEkB,OAAOC,OAAO,EAAEC,KAAK,GAAG;AACrG,WAAOL,IAAM;AAAA,MAAE,oBAAoBA;AAAAA,IAAAA,IAAQ,CAAA;AAAA,EAC7C,GAYqB;AAAA,IAAA,IAAAM,WAAA;AAAA,aAAA,CAAApB,EAEhBC,EAAMoB,QAAM;AAAA,QAAA,IAAAD,WAAA;AAAA,iBAAEzB,EAAMiB;AAAAA,QAAK;AAAA,MAAA,CAAA,GAAAZ,EACzBC,EAAMqB,SAAO;AAAA,QAAA,IAAAF,WAAA;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C,GAAM;AAAA,YACLR,SAAO;AAAA,YACPxB,MAAI;AAAA,YAAA,IACJyB,QAAK;AAAA,qBAAEpC,EAAMgD,SAAS,UAAU;AAAA,YAAS;AAAA,YAAA,IACzCJ,WAAQ;AAAA,qBAAE,CAAC,CAAC5C,EAAMe;AAAAA,YAAI;AAAA,YACtB8B,SAASA,MAAM7C,EAAMiD,UAAAA;AAAAA,YAAW,IAChCH,QAAK;AAAA,qBAAE9C,EAAMkD;AAAAA,YAAY;AAAA,UAAA,CAAA,CAAA;AAAA,QAAA;AAAA,MAAA,CAAA,CAAA;AAAA,IAAA;AAAA,EAAA,CAAA,CAAA;AAKnC;"}
@@ -0,0 +1,2 @@
1
+ export { ConfirmDialog } from "./confirmDialog";
2
+ export type { ConfirmDialogProps } from "./confirmDialog";
@@ -0,0 +1,107 @@
1
+ import { createComponent as r, mergeProps as m, insert as l, effect as g, className as b, template as p } from "solid-js/web";
2
+ import { splitProps as f, createUniqueId as i, Show as c } from "solid-js";
3
+ import y from "clsx";
4
+ import { Modal as n } from "../modal/modal.js";
5
+ import { Typography as s } from "../../dataDisplay/typography/typography.js";
6
+ import { Button as u } from "../../inputs/button/button.js";
7
+ var C = /* @__PURE__ */ p("<div>");
8
+ function _(d) {
9
+ const [e] = f(d, ["open", "title", "subject", "message", "confirmLabel", "cancelLabel", "danger", "busy", "onConfirm", "onCancel", "class"]), o = i(), a = i();
10
+ return r(n, m({
11
+ get open() {
12
+ return e.open;
13
+ },
14
+ onClose: () => e.onCancel(),
15
+ size: "small",
16
+ role: "alertdialog",
17
+ backdrop: "dark",
18
+ get closeOnEsc() {
19
+ return !e.busy;
20
+ },
21
+ get closeOnOutsideClick() {
22
+ return !e.busy;
23
+ },
24
+ get "aria-label"() {
25
+ return e.title;
26
+ }
27
+ }, () => {
28
+ const t = [e.subject ? o : "", e.message ? a : ""].filter(Boolean).join(" ");
29
+ return t ? {
30
+ "aria-describedby": t
31
+ } : {};
32
+ }, {
33
+ get children() {
34
+ return [r(n.Header, {
35
+ get children() {
36
+ return e.title;
37
+ }
38
+ }), r(n.Content, {
39
+ get children() {
40
+ var t = C();
41
+ return l(t, r(c, {
42
+ get when() {
43
+ return e.subject;
44
+ },
45
+ get children() {
46
+ return r(s, {
47
+ id: o,
48
+ variant: "body2",
49
+ color: "textPrimary",
50
+ component: "span",
51
+ get children() {
52
+ return e.subject;
53
+ }
54
+ });
55
+ }
56
+ }), null), l(t, r(c, {
57
+ get when() {
58
+ return e.message;
59
+ },
60
+ get children() {
61
+ return r(s, {
62
+ id: a,
63
+ variant: "caption",
64
+ color: "textSecondary",
65
+ component: "span",
66
+ get children() {
67
+ return e.message;
68
+ }
69
+ });
70
+ }
71
+ }), null), g(() => b(t, y("smwb-confirm-dialog__body", e.class))), t;
72
+ }
73
+ }), r(n.Footer, {
74
+ get children() {
75
+ return [r(u, {
76
+ variant: "text",
77
+ size: "small",
78
+ get disabled() {
79
+ return !!e.busy;
80
+ },
81
+ onClick: () => e.onCancel(),
82
+ get label() {
83
+ return e.cancelLabel ?? "Cancel";
84
+ }
85
+ }), r(u, {
86
+ variant: "contained",
87
+ size: "small",
88
+ get color() {
89
+ return e.danger ? "error" : "primary";
90
+ },
91
+ get disabled() {
92
+ return !!e.busy;
93
+ },
94
+ onClick: () => e.onConfirm(),
95
+ get label() {
96
+ return e.confirmLabel;
97
+ }
98
+ })];
99
+ }
100
+ })];
101
+ }
102
+ }));
103
+ }
104
+ export {
105
+ _ as ConfirmDialog
106
+ };
107
+ //# sourceMappingURL=confirmDialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"confirmDialog.js","sources":["../../../../../src/components/feedBack/confirmDialog/confirmDialog.tsx"],"sourcesContent":["import { type JSX, Show, splitProps, createUniqueId } from \"solid-js\";\nimport cn from \"clsx\";\nimport { Modal } from \"../modal\";\nimport { Button } from \"../../inputs/button\";\nimport { Typography } from \"../../dataDisplay/typography\";\n\nexport interface ConfirmDialogProps {\n open: boolean;\n title: string;\n /** The subject of the action, shown emphasised on its own line (e.g. the asset name). */\n subject?: string;\n /** A secondary explanatory line (e.g. \"can't be undone\"). */\n message?: string;\n confirmLabel: string;\n cancelLabel?: string;\n /** Style the confirm button as destructive (red). */\n danger?: boolean;\n /** Disable the actions + gate Esc/outside-click while a confirm is in flight. */\n busy?: boolean;\n onConfirm: () => void;\n onCancel: () => void;\n class?: string;\n}\n\n/**\n * An alert/confirm dialog built on {@link Modal}: a title, an optional emphasised subject + secondary\n * message, and Cancel / Confirm actions. `role=\"alertdialog\"` with the subject + message wired to\n * `aria-describedby` so a screen reader announces the consequence, not just the title. While `busy`,\n * Escape + outside-click are gated and the buttons disabled. Pure presentation — the caller owns the\n * open state and the confirm/cancel handlers (and supplies localised labels).\n */\nexport function ConfirmDialog(props: ConfirmDialogProps): JSX.Element {\n const [local] = splitProps(props, [\n \"open\",\n \"title\",\n \"subject\",\n \"message\",\n \"confirmLabel\",\n \"cancelLabel\",\n \"danger\",\n \"busy\",\n \"onConfirm\",\n \"onCancel\",\n \"class\",\n ]);\n const subjectId = createUniqueId();\n const messageId = createUniqueId();\n // Only include aria-describedby when there's something to describe (the lib's exactOptionalPropertyTypes\n // forbids passing an explicit `undefined` to Modal's optional prop, so spread a precisely-typed object).\n const ariaDescribed = (): { \"aria-describedby\"?: string } => {\n const ids = [local.subject ? subjectId : \"\", local.message ? messageId : \"\"].filter(Boolean).join(\" \");\n return ids ? { \"aria-describedby\": ids } : {};\n };\n\n return (\n <Modal\n open={local.open}\n onClose={() => local.onCancel()}\n size=\"small\"\n role=\"alertdialog\"\n backdrop=\"dark\"\n closeOnEsc={!local.busy}\n closeOnOutsideClick={!local.busy}\n aria-label={local.title}\n {...ariaDescribed()}\n >\n <Modal.Header>{local.title}</Modal.Header>\n <Modal.Content>\n <div class={cn(\"smwb-confirm-dialog__body\", local.class)}>\n <Show when={local.subject}>\n <Typography id={subjectId} variant=\"body2\" color=\"textPrimary\" component=\"span\">\n {local.subject}\n </Typography>\n </Show>\n <Show when={local.message}>\n <Typography id={messageId} variant=\"caption\" color=\"textSecondary\" component=\"span\">\n {local.message}\n </Typography>\n </Show>\n </div>\n </Modal.Content>\n <Modal.Footer>\n <Button\n variant=\"text\"\n size=\"small\"\n disabled={!!local.busy}\n onClick={() => local.onCancel()}\n label={local.cancelLabel ?? \"Cancel\"}\n />\n <Button\n variant=\"contained\"\n size=\"small\"\n color={local.danger ? \"error\" : \"primary\"}\n disabled={!!local.busy}\n onClick={() => local.onConfirm()}\n label={local.confirmLabel}\n />\n </Modal.Footer>\n </Modal>\n );\n}\n\nexport default ConfirmDialog;\n"],"names":["ConfirmDialog","props","local","splitProps","subjectId","createUniqueId","messageId","_$createComponent","Modal","_$mergeProps","open","onClose","onCancel","size","role","backdrop","closeOnEsc","busy","closeOnOutsideClick","title","ariaDescribed","ids","subject","message","filter","Boolean","join","children","Header","Content","_el$","_tmpl$","_$insert","Show","when","Typography","id","variant","color","component","_$effect","_$className","cn","class","Footer","Button","disabled","onClick","label","cancelLabel","danger","onConfirm","confirmLabel"],"mappings":";;;;;;;AA+BO,SAASA,EAAcC,GAAwC;AACpE,QAAM,CAACC,CAAK,IAAIC,EAAWF,GAAO,CAChC,QACA,SACA,WACA,WACA,gBACA,eACA,UACA,QACA,aACA,YACA,OAAO,CACR,GACKG,IAAYC,EAAAA,GACZC,IAAYD,EAAAA;AAQlB,SAAAE,EACGC,GAAKC,EAAA;AAAA,IAAA,IACJC,OAAI;AAAA,aAAER,EAAMQ;AAAAA,IAAI;AAAA,IAChBC,SAASA,MAAMT,EAAMU,SAAAA;AAAAA,IACrBC,MAAI;AAAA,IACJC,MAAI;AAAA,IACJC,UAAQ;AAAA,IAAA,IACRC,aAAU;AAAA,aAAE,CAACd,EAAMe;AAAAA,IAAI;AAAA,IAAA,IACvBC,sBAAmB;AAAA,aAAE,CAAChB,EAAMe;AAAAA,IAAI;AAAA,IAAA,IAAA,eAAA;AAAA,aACpBf,EAAMiB;AAAAA,IAAK;AAAA,EAAA,GAdLC,MAAu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