@telia-ace/widget-components-not-found 1.0.13 → 1.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { createReactComponent } from "@telia-ace/widget-ui";
2
- const NotFoundComponent = (container) => {
3
- return createReactComponent(container, "not-found", import("./not-found.js"));
1
+ import { createReactComponent as t } from "@telia-ace/widget-ui";
2
+ const e = (o) => t(o, "not-found", import("./not-found.baad3a4d.js"));
3
+ export {
4
+ e as default
4
5
  };
5
- export { NotFoundComponent as default };
6
6
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/not-found-component.tsx"],"sourcesContent":["import { createReactComponent } from '@telia-ace/widget-ui';\r\nimport { Container } from '@webprovisions/platform';\r\n\r\nexport type NotFoundComponentProps = {\r\n header?: string;\r\n linkLabel?: string;\r\n suggestionHeader?: string;\r\n suggestionLabel?: string;\r\n showSearch?: boolean;\r\n};\r\n\r\nconst NotFoundComponent = (container: Container) => {\r\n return createReactComponent(container, 'not-found', import('./not-found'));\r\n};\r\n\r\nexport default NotFoundComponent;\r\n"],"names":[],"mappings":";AAWM,MAAA,oBAAoB,CAAC,cAAyB;AAChD,SAAO,qBAAqB,WAAW,aAAa,OAAO,iBAAc;AAC7E;;"}
1
+ {"version":3,"file":"index.js","sources":["../src/not-found-component.tsx"],"sourcesContent":["import { createReactComponent } from '@telia-ace/widget-ui';\r\nimport { Container } from '@webprovisions/platform';\r\n\r\nexport type NotFoundComponentProps = {\r\n header?: string;\r\n linkLabel?: string;\r\n suggestionHeader?: string;\r\n suggestionLabel?: string;\r\n showSearch?: boolean;\r\n};\r\n\r\nconst NotFoundComponent = (container: Container) => {\r\n return createReactComponent(container, 'not-found', import('./not-found'));\r\n};\r\n\r\nexport default NotFoundComponent;\r\n"],"names":[],"mappings":";AAWM,MAAA,IAAoB,CAAC,MAChB,EAAqB,GAAW,aAAa,OAAO,0BAAc;"}
@@ -0,0 +1,103 @@
1
+ var z = Object.defineProperty;
2
+ var u = Object.getOwnPropertySymbols;
3
+ var b = Object.prototype.hasOwnProperty, v = Object.prototype.propertyIsEnumerable;
4
+ var d = (t, e, n) => e in t ? z(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, p = (t, e) => {
5
+ for (var n in e || (e = {}))
6
+ b.call(e, n) && d(t, n, e[n]);
7
+ if (u)
8
+ for (var n of u(e))
9
+ v.call(e, n) && d(t, n, e[n]);
10
+ return t;
11
+ };
12
+ import { DetachedComponent as C } from "@telia-ace/widget-types-grid";
13
+ import { contentBox as N, headingElement as f, Typography as h, TextLink as L, useProperties as k, useContainer as F } from "@telia-ace/widget-ui";
14
+ import r, { useContext as P } from "react";
15
+ import o, { css as g, ThemeContext as T } from "styled-components";
16
+ const j = ({
17
+ header: t = "",
18
+ link: e = "",
19
+ suggestionHeader: n = "",
20
+ suggestion: a = ""
21
+ }) => /* @__PURE__ */ r.createElement(B, null, /* @__PURE__ */ r.createElement(H, null, /* @__PURE__ */ r.createElement(h, {
22
+ variant: "h2"
23
+ }, "404")), /* @__PURE__ */ r.createElement(S, null, /* @__PURE__ */ r.createElement(h, {
24
+ variant: "h3"
25
+ }, t), /* @__PURE__ */ r.createElement(L, {
26
+ routeName: "index",
27
+ "aria-label": e,
28
+ text: e
29
+ })), /* @__PURE__ */ r.createElement(D, null, /* @__PURE__ */ r.createElement("span", null, n), /* @__PURE__ */ r.createElement("ul", null, /* @__PURE__ */ r.createElement("li", null, a)))), B = o.div`
30
+ ${N}
31
+ display: flex;
32
+ flex-wrap: wrap;
33
+ flex-direction: row;
34
+ justify-content: flex-start;
35
+ padding: ${(t) => {
36
+ var e;
37
+ return (e = t.theme.sizes) == null ? void 0 : e.medium;
38
+ }};
39
+ `, H = o.div`
40
+ ${f("h2", g`
41
+ padding: 0;
42
+ margin: 0;
43
+ color: gray;
44
+ font-size: ${(t) => {
45
+ var e;
46
+ return (e = t.theme.fonts) == null ? void 0 : e.huge;
47
+ }};
48
+ `)}
49
+ `, S = o.div`
50
+ margin-left: ${(t) => {
51
+ var e;
52
+ return (e = t.theme.sizes) == null ? void 0 : e.medium;
53
+ }};
54
+
55
+ ${f("h3", g`
56
+ text-transform: uppercase;
57
+ font-size: ${(t) => {
58
+ var e;
59
+ return (e = t.theme.fonts) == null ? void 0 : e.normal;
60
+ }};
61
+ `)}
62
+
63
+ a {
64
+ color: ${(t) => {
65
+ var e;
66
+ return (e = t.theme.colors) == null ? void 0 : e.link;
67
+ }};
68
+ font-size: ${(t) => {
69
+ var e;
70
+ return (e = t.theme.fonts) == null ? void 0 : e.small;
71
+ }};
72
+ }
73
+ `, D = o.div`
74
+ margin-top: ${(t) => {
75
+ var e;
76
+ return (e = t.theme.sizes) == null ? void 0 : e.medium;
77
+ }};
78
+ min-width: 100%;
79
+
80
+ span {
81
+ font-weight: bold;
82
+ }
83
+ `, G = () => {
84
+ const { header: t, linkLabel: e, suggestionHeader: n, suggestionLabel: a, showSearch: E } = k(), x = F(), s = P(T);
85
+ return /* @__PURE__ */ r.createElement(r.Fragment, null, E && /* @__PURE__ */ r.createElement(C, {
86
+ builder: ($) => x.get("settings").then((l) => {
87
+ var m;
88
+ const w = Object.keys(l.components).reduce((y, c) => l.components[c].type === "search" ? l.components[c].properties : y, {}), i = $.createNode("search", { detached: !0 });
89
+ return i.writeLayout({ size: "full" }), i.writeProperties(p({
90
+ "css-margin-bottom": ((m = s == null ? void 0 : s.sizes) == null ? void 0 : m.normal) || "15px"
91
+ }, w)), i;
92
+ })
93
+ }), /* @__PURE__ */ r.createElement(j, {
94
+ header: t,
95
+ link: e,
96
+ suggestionHeader: n,
97
+ suggestion: a
98
+ }));
99
+ };
100
+ export {
101
+ G as default
102
+ };
103
+ //# sourceMappingURL=not-found.baad3a4d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"not-found.baad3a4d.js","sources":["../src/not-found-base.tsx","../src/not-found.tsx"],"sourcesContent":["import { contentBox, headingElement, TextLink, Typography } from '@telia-ace/widget-ui';\r\nimport React from 'react';\r\nimport styled, { css } from 'styled-components';\r\n\r\ntype Props = {\r\n header?: string;\r\n link?: string;\r\n suggestionHeader?: string;\r\n suggestion?: string;\r\n};\r\n\r\nconst NotFoundBase: React.FC<Props> = ({\r\n header = '',\r\n link = '',\r\n suggestionHeader = '',\r\n suggestion = '',\r\n}) => {\r\n return (\r\n <Wrapper>\r\n <Status>\r\n <Typography variant=\"h2\">404</Typography>\r\n </Status>\r\n <Header>\r\n <Typography variant=\"h3\">{header}</Typography>\r\n <TextLink routeName=\"index\" aria-label={link} text={link} />\r\n </Header>\r\n <Content>\r\n <span>{suggestionHeader}</span>\r\n <ul>\r\n <li>{suggestion}</li>\r\n </ul>\r\n </Content>\r\n </Wrapper>\r\n );\r\n};\r\n\r\nexport default NotFoundBase;\r\n\r\nconst Wrapper = styled.div`\r\n ${contentBox}\r\n display: flex;\r\n flex-wrap: wrap;\r\n flex-direction: row;\r\n justify-content: flex-start;\r\n padding: ${(p) => p.theme.sizes?.medium};\r\n`;\r\n\r\nconst Status = styled.div`\r\n ${headingElement(\r\n 'h2',\r\n css`\r\n padding: 0;\r\n margin: 0;\r\n color: gray;\r\n font-size: ${(p) => p.theme.fonts?.huge};\r\n `\r\n )}\r\n`;\r\n\r\nconst Header = styled.div`\r\n margin-left: ${(p) => p.theme.sizes?.medium};\r\n\r\n ${headingElement(\r\n 'h3',\r\n css`\r\n text-transform: uppercase;\r\n font-size: ${(p) => p.theme.fonts?.normal};\r\n `\r\n )}\r\n\r\n a {\r\n color: ${(p) => p.theme.colors?.link};\r\n font-size: ${(p) => p.theme.fonts?.small};\r\n }\r\n`;\r\n\r\nconst Content = styled.div`\r\n margin-top: ${(p) => p.theme.sizes?.medium};\r\n min-width: 100%;\r\n\r\n span {\r\n font-weight: bold;\r\n }\r\n`;\r\n","import { ComponentPlatform } from '@telia-ace/widget-core';\r\nimport { DetachedComponent } from '@telia-ace/widget-types-grid';\r\nimport { useContainer, useProperties } from '@telia-ace/widget-ui';\r\nimport React, { useContext } from 'react';\r\nimport { ThemeContext } from 'styled-components';\r\nimport NotFoundBase from './not-found-base';\r\nimport { NotFoundComponentProps } from './not-found-component';\r\n\r\ntype Props = {};\r\n\r\nconst NotFound: React.FC<Props> = () => {\r\n const { header, linkLabel, suggestionHeader, suggestionLabel, showSearch } =\r\n useProperties<NotFoundComponentProps>();\r\n const container = useContainer();\r\n const themeContext = useContext(ThemeContext);\r\n\r\n return (\r\n <>\r\n {showSearch && (\r\n <DetachedComponent\r\n builder={(components: ComponentPlatform) => {\r\n return container.get('settings').then((settings: any) => {\r\n const searchComponentProps = Object.keys(settings.components).reduce(\r\n (acc, key) => {\r\n if (settings.components[key].type === 'search') {\r\n return settings.components[key].properties;\r\n }\r\n\r\n return acc;\r\n },\r\n {}\r\n );\r\n const searchNode = components.createNode('search', { detached: true });\r\n searchNode.writeLayout({ size: 'full' });\r\n searchNode.writeProperties({\r\n 'css-margin-bottom': themeContext?.sizes?.normal || '15px',\r\n ...searchComponentProps,\r\n });\r\n\r\n return searchNode;\r\n });\r\n }}\r\n />\r\n )}\r\n <NotFoundBase\r\n header={header}\r\n link={linkLabel}\r\n suggestionHeader={suggestionHeader}\r\n suggestion={suggestionLabel}\r\n />\r\n </>\r\n );\r\n};\r\n\r\nexport default NotFound;\r\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAWA,MAAM,IAAgC,CAAC;AAAA,EACnC,YAAS;AAAA,EACT,UAAO;AAAA,EACP,sBAAmB;AAAA,EACnB,gBAAa;AAAA,MAGR,kBAAA,cAAA,GAAA,MACI,kBAAA,cAAA,GAAA,MACI,kBAAA,cAAA,GAAA;AAAA,EAAW,SAAQ;AAAA,GAAK,KAAG,CAChC,GACA,kBAAA,cAAC,SACI,kBAAA,cAAA,GAAA;AAAA,EAAW,SAAQ;AAAM,GAAA,CAAO,GAChC,kBAAA,cAAA,GAA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U,EAAE,OAC1D,CAAC,GAAK,MACE,EAAS,WAAW,GAAK,SAAS,WAC3B,EAAS,WAAW,GAAK,aAG7B,GAEX,CACJ,CAAA,GACM,IAAa,EAAW,WAAW,UAAU,EAAE,UAAU,IAAM;AACrE,eAAW,YAAY,EAAE,MAAM,OAAQ,CAAA,GACvC,EAAW,gBAAgB;AAAA,QACvB,qBAAqB,6BAAc,UAAd,kBAAqB,WAAU;AAAA,SACjD,EACN,GAEM;AAAA,IAAA,CACV;AAAA,EACL,CACJ,GAEH,kBAAA,cAAA,GAAA;AAAA,IACG;AAAA,IACA,MAAM;AAAA,IACN;AAAA,IACA,YAAY;AAAA,EAChB,CAAA,CACJ;AAER;"}
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@telia-ace/widget-components-not-found",
3
- "version": "1.0.13",
3
+ "version": "1.0.16",
4
4
  "description": "Not found component for ACE Widgets.",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "author": "Telia Company AB",
7
7
  "keywords": [
8
8
  "telia"
9
9
  ],
10
- "source": "src/index.ts",
11
- "module": "dist/index.js",
10
+ "main": "dist/index.js",
11
+ "type": "module",
12
12
  "types": "dist/index.d.ts",
13
13
  "files": [
14
14
  "LICENSE.txt",
@@ -25,9 +25,9 @@
25
25
  },
26
26
  "sideEffects": false,
27
27
  "dependencies": {
28
- "@telia-ace/widget-core": "^1.0.10",
29
- "@telia-ace/widget-types-grid": "^1.0.17",
30
- "@telia-ace/widget-ui": "^1.0.17",
28
+ "@telia-ace/widget-core": "^1.0.13",
29
+ "@telia-ace/widget-types-grid": "^1.0.20",
30
+ "@telia-ace/widget-ui": "^1.0.20",
31
31
  "@webprovisions/platform": "^1.1.2"
32
32
  },
33
33
  "peerDependencies": {
@@ -40,5 +40,5 @@
40
40
  "@types/react-dom": "^16.8.0",
41
41
  "@types/styled-components": "^5.1.7"
42
42
  },
43
- "gitHead": "b6c2eb6fec7cd0c8e4334ab7a8e0087422fe1964"
43
+ "gitHead": "3884b26fc8ea8cafc93d37709cceb66742671918"
44
44
  }
package/dist/not-found.js DELETED
@@ -1,125 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
3
- var __hasOwnProp = Object.prototype.hasOwnProperty;
4
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
5
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6
- var __spreadValues = (a, b) => {
7
- for (var prop in b || (b = {}))
8
- if (__hasOwnProp.call(b, prop))
9
- __defNormalProp(a, prop, b[prop]);
10
- if (__getOwnPropSymbols)
11
- for (var prop of __getOwnPropSymbols(b)) {
12
- if (__propIsEnum.call(b, prop))
13
- __defNormalProp(a, prop, b[prop]);
14
- }
15
- return a;
16
- };
17
- import { DetachedComponent } from "@telia-ace/widget-types-grid";
18
- import { contentBox, headingElement, Typography, TextLink, useProperties, useContainer } from "@telia-ace/widget-ui";
19
- import React, { useContext } from "react";
20
- import styled, { css, ThemeContext } from "styled-components";
21
- const NotFoundBase = ({
22
- header = "",
23
- link = "",
24
- suggestionHeader = "",
25
- suggestion = ""
26
- }) => {
27
- return /* @__PURE__ */ React.createElement(Wrapper, null, /* @__PURE__ */ React.createElement(Status, null, /* @__PURE__ */ React.createElement(Typography, {
28
- variant: "h2"
29
- }, "404")), /* @__PURE__ */ React.createElement(Header, null, /* @__PURE__ */ React.createElement(Typography, {
30
- variant: "h3"
31
- }, header), /* @__PURE__ */ React.createElement(TextLink, {
32
- routeName: "index",
33
- "aria-label": link,
34
- text: link
35
- })), /* @__PURE__ */ React.createElement(Content, null, /* @__PURE__ */ React.createElement("span", null, suggestionHeader), /* @__PURE__ */ React.createElement("ul", null, /* @__PURE__ */ React.createElement("li", null, suggestion))));
36
- };
37
- const Wrapper = styled.div`
38
- ${contentBox}
39
- display: flex;
40
- flex-wrap: wrap;
41
- flex-direction: row;
42
- justify-content: flex-start;
43
- padding: ${(p) => {
44
- var _a;
45
- return (_a = p.theme.sizes) == null ? void 0 : _a.medium;
46
- }};
47
- `;
48
- const Status = styled.div`
49
- ${headingElement("h2", css`
50
- padding: 0;
51
- margin: 0;
52
- color: gray;
53
- font-size: ${(p) => {
54
- var _a;
55
- return (_a = p.theme.fonts) == null ? void 0 : _a.huge;
56
- }};
57
- `)}
58
- `;
59
- const Header = styled.div`
60
- margin-left: ${(p) => {
61
- var _a;
62
- return (_a = p.theme.sizes) == null ? void 0 : _a.medium;
63
- }};
64
-
65
- ${headingElement("h3", css`
66
- text-transform: uppercase;
67
- font-size: ${(p) => {
68
- var _a;
69
- return (_a = p.theme.fonts) == null ? void 0 : _a.normal;
70
- }};
71
- `)}
72
-
73
- a {
74
- color: ${(p) => {
75
- var _a;
76
- return (_a = p.theme.colors) == null ? void 0 : _a.link;
77
- }};
78
- font-size: ${(p) => {
79
- var _a;
80
- return (_a = p.theme.fonts) == null ? void 0 : _a.small;
81
- }};
82
- }
83
- `;
84
- const Content = styled.div`
85
- margin-top: ${(p) => {
86
- var _a;
87
- return (_a = p.theme.sizes) == null ? void 0 : _a.medium;
88
- }};
89
- min-width: 100%;
90
-
91
- span {
92
- font-weight: bold;
93
- }
94
- `;
95
- const NotFound = () => {
96
- const { header, linkLabel, suggestionHeader, suggestionLabel, showSearch } = useProperties();
97
- const container = useContainer();
98
- const themeContext = useContext(ThemeContext);
99
- return /* @__PURE__ */ React.createElement(React.Fragment, null, showSearch && /* @__PURE__ */ React.createElement(DetachedComponent, {
100
- builder: (components) => {
101
- return container.get("settings").then((settings) => {
102
- var _a;
103
- const searchComponentProps = Object.keys(settings.components).reduce((acc, key) => {
104
- if (settings.components[key].type === "search") {
105
- return settings.components[key].properties;
106
- }
107
- return acc;
108
- }, {});
109
- const searchNode = components.createNode("search", { detached: true });
110
- searchNode.writeLayout({ size: "full" });
111
- searchNode.writeProperties(__spreadValues({
112
- "css-margin-bottom": ((_a = themeContext == null ? void 0 : themeContext.sizes) == null ? void 0 : _a.normal) || "15px"
113
- }, searchComponentProps));
114
- return searchNode;
115
- });
116
- }
117
- }), /* @__PURE__ */ React.createElement(NotFoundBase, {
118
- header,
119
- link: linkLabel,
120
- suggestionHeader,
121
- suggestion: suggestionLabel
122
- }));
123
- };
124
- export { NotFound as default };
125
- //# sourceMappingURL=not-found.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"not-found.js","sources":["../src/not-found-base.tsx","../src/not-found.tsx"],"sourcesContent":["import { contentBox, headingElement, TextLink, Typography } from '@telia-ace/widget-ui';\r\nimport React from 'react';\r\nimport styled, { css } from 'styled-components';\r\n\r\ntype Props = {\r\n header?: string;\r\n link?: string;\r\n suggestionHeader?: string;\r\n suggestion?: string;\r\n};\r\n\r\nconst NotFoundBase: React.FC<Props> = ({\r\n header = '',\r\n link = '',\r\n suggestionHeader = '',\r\n suggestion = '',\r\n}) => {\r\n return (\r\n <Wrapper>\r\n <Status>\r\n <Typography variant=\"h2\">404</Typography>\r\n </Status>\r\n <Header>\r\n <Typography variant=\"h3\">{header}</Typography>\r\n <TextLink routeName=\"index\" aria-label={link} text={link} />\r\n </Header>\r\n <Content>\r\n <span>{suggestionHeader}</span>\r\n <ul>\r\n <li>{suggestion}</li>\r\n </ul>\r\n </Content>\r\n </Wrapper>\r\n );\r\n};\r\n\r\nexport default NotFoundBase;\r\n\r\nconst Wrapper = styled.div`\r\n ${contentBox}\r\n display: flex;\r\n flex-wrap: wrap;\r\n flex-direction: row;\r\n justify-content: flex-start;\r\n padding: ${(p) => p.theme.sizes?.medium};\r\n`;\r\n\r\nconst Status = styled.div`\r\n ${headingElement(\r\n 'h2',\r\n css`\r\n padding: 0;\r\n margin: 0;\r\n color: gray;\r\n font-size: ${(p) => p.theme.fonts?.huge};\r\n `\r\n )}\r\n`;\r\n\r\nconst Header = styled.div`\r\n margin-left: ${(p) => p.theme.sizes?.medium};\r\n\r\n ${headingElement(\r\n 'h3',\r\n css`\r\n text-transform: uppercase;\r\n font-size: ${(p) => p.theme.fonts?.normal};\r\n `\r\n )}\r\n\r\n a {\r\n color: ${(p) => p.theme.colors?.link};\r\n font-size: ${(p) => p.theme.fonts?.small};\r\n }\r\n`;\r\n\r\nconst Content = styled.div`\r\n margin-top: ${(p) => p.theme.sizes?.medium};\r\n min-width: 100%;\r\n\r\n span {\r\n font-weight: bold;\r\n }\r\n`;\r\n","import { ComponentPlatform } from '@telia-ace/widget-core';\r\nimport { DetachedComponent } from '@telia-ace/widget-types-grid';\r\nimport { useContainer, useProperties } from '@telia-ace/widget-ui';\r\nimport React, { useContext } from 'react';\r\nimport { ThemeContext } from 'styled-components';\r\nimport NotFoundBase from './not-found-base';\r\nimport { NotFoundComponentProps } from './not-found-component';\r\n\r\ntype Props = {};\r\n\r\nconst NotFound: React.FC<Props> = () => {\r\n const { header, linkLabel, suggestionHeader, suggestionLabel, showSearch } =\r\n useProperties<NotFoundComponentProps>();\r\n const container = useContainer();\r\n const themeContext = useContext(ThemeContext);\r\n\r\n return (\r\n <>\r\n {showSearch && (\r\n <DetachedComponent\r\n builder={(components: ComponentPlatform) => {\r\n return container.get('settings').then((settings: any) => {\r\n const searchComponentProps = Object.keys(settings.components).reduce(\r\n (acc, key) => {\r\n if (settings.components[key].type === 'search') {\r\n return settings.components[key].properties;\r\n }\r\n\r\n return acc;\r\n },\r\n {}\r\n );\r\n const searchNode = components.createNode('search', { detached: true });\r\n searchNode.writeLayout({ size: 'full' });\r\n searchNode.writeProperties({\r\n 'css-margin-bottom': themeContext?.sizes?.normal || '15px',\r\n ...searchComponentProps,\r\n });\r\n\r\n return searchNode;\r\n });\r\n }}\r\n />\r\n )}\r\n <NotFoundBase\r\n header={header}\r\n link={linkLabel}\r\n suggestionHeader={suggestionHeader}\r\n suggestion={suggestionLabel}\r\n />\r\n </>\r\n );\r\n};\r\n\r\nexport default NotFound;\r\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAWA,MAAM,eAAgC,CAAC;AAAA,EACnC,S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