@logora/debate 0.3.32 → 0.3.33
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,88 +1,65 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { useIntl as
|
|
4
|
-
import
|
|
5
|
-
import { SectionBox as
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
title: y,
|
|
14
|
-
subtitle: g
|
|
1
|
+
import { jsxs as p, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { useIntl as y } from "react-intl";
|
|
4
|
+
import u from "./Summary.module.scss.js";
|
|
5
|
+
import { SectionBox as h } from "../../section/section_box/SectionBox.js";
|
|
6
|
+
import { SummaryBox as n } from "../summary_box/SummaryBox.js";
|
|
7
|
+
const v = ({
|
|
8
|
+
summary: r,
|
|
9
|
+
tags: o = [],
|
|
10
|
+
tagClassNames: l = [],
|
|
11
|
+
title: c,
|
|
12
|
+
subtitle: d
|
|
15
13
|
}) => {
|
|
16
|
-
const
|
|
14
|
+
const s = y(), f = () => {
|
|
15
|
+
if (!r) return {};
|
|
16
|
+
if (typeof r == "object") return r;
|
|
17
17
|
try {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
return (await m.json()).data?.content?.arguments || [];
|
|
22
|
-
} catch (o) {
|
|
23
|
-
console.error(o);
|
|
18
|
+
return JSON.parse(r);
|
|
19
|
+
} catch {
|
|
20
|
+
return { global: r };
|
|
24
21
|
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
const r = {};
|
|
30
|
-
if (t.length === 0)
|
|
31
|
-
r["no-position"] = await u(a);
|
|
32
|
-
else {
|
|
33
|
-
const o = await Promise.all(
|
|
34
|
-
t.map((m) => u(a, m.id))
|
|
35
|
-
);
|
|
36
|
-
t.forEach((m, c) => {
|
|
37
|
-
r[m.id] = o[c];
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
x(r);
|
|
41
|
-
} catch (r) {
|
|
42
|
-
console.error(r);
|
|
43
|
-
}
|
|
44
|
-
})();
|
|
45
|
-
}, [a, t]), /* @__PURE__ */ S(
|
|
46
|
-
B,
|
|
22
|
+
}, i = (e) => e ? e.split(`
|
|
23
|
+
`).map((a) => a.trim()).filter(Boolean) : [], m = f();
|
|
24
|
+
return /* @__PURE__ */ p(
|
|
25
|
+
h,
|
|
47
26
|
{
|
|
48
27
|
isCollapsible: !0,
|
|
49
28
|
isCollapsedByDefault: !0,
|
|
50
|
-
title:
|
|
51
|
-
subtitle:
|
|
29
|
+
title: c,
|
|
30
|
+
subtitle: d,
|
|
52
31
|
children: [
|
|
53
|
-
/* @__PURE__ */
|
|
32
|
+
/* @__PURE__ */ t("div", { className: u.description, children: s.formatMessage({
|
|
54
33
|
id: "summary.description.argument_summary",
|
|
55
34
|
defaultMessage: "Our algorithm produces comprehensive, well-structured summaries of the most recurrent arguments. Each published argument influences the content of this summary. The better structured the argument, the more weight it carries."
|
|
56
35
|
}) }),
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
-
|
|
36
|
+
/* @__PURE__ */ t("div", { className: u.summaryContainer, children: o.length > 0 ? o.map((e, a) => /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
|
|
37
|
+
n,
|
|
59
38
|
{
|
|
60
|
-
summaryItems: (
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
emptySummaryText:
|
|
39
|
+
summaryItems: i(m[e.id]),
|
|
40
|
+
tag: e.name,
|
|
41
|
+
tagClassName: l[a],
|
|
42
|
+
emptySummaryText: s.formatMessage({
|
|
64
43
|
id: "info.emptysummary",
|
|
65
44
|
defaultMessage: "No resume found."
|
|
66
45
|
})
|
|
67
46
|
}
|
|
68
|
-
) }
|
|
69
|
-
|
|
47
|
+
) }, e.id)) : /* @__PURE__ */ t(
|
|
48
|
+
n,
|
|
70
49
|
{
|
|
71
|
-
summaryItems: (
|
|
72
|
-
|
|
50
|
+
summaryItems: i(
|
|
51
|
+
m.global || m.untagged || Object.values(m)[0]
|
|
73
52
|
),
|
|
74
|
-
|
|
75
|
-
tagClassName: p[r],
|
|
76
|
-
emptySummaryText: i.formatMessage({
|
|
53
|
+
emptySummaryText: s.formatMessage({
|
|
77
54
|
id: "info.emptysummary",
|
|
78
55
|
defaultMessage: "No resume found."
|
|
79
56
|
})
|
|
80
57
|
}
|
|
81
|
-
) }
|
|
58
|
+
) })
|
|
82
59
|
]
|
|
83
60
|
}
|
|
84
61
|
);
|
|
85
62
|
};
|
|
86
63
|
export {
|
|
87
|
-
|
|
64
|
+
v as Summary
|
|
88
65
|
};
|