col-browser 2.6.6 → 2.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.
package/es/taxon.js CHANGED
@@ -1,76 +1,76 @@
1
- var e2 = Object.defineProperty;
2
- var o2 = (n, i, a) => i in n ? e2(n, i, { enumerable: !0, configurable: !0, writable: !0, value: a }) : n[i] = a;
3
- var _ = (n, i, a) => o2(n, typeof i != "symbol" ? i + "" : i, a);
1
+ var a2 = Object.defineProperty;
2
+ var o2 = (r, s, a) => s in r ? a2(r, s, { enumerable: !0, configurable: !0, writable: !0, value: a }) : r[s] = a;
3
+ var _ = (r, s, a) => o2(r, typeof s != "symbol" ? s + "" : s, a);
4
4
  import { a as n2 } from "./chunks/withDatasetKey-BgMY05XE.js";
5
5
  import { w as r2 } from "./chunks/withTheme-Dh6PRuII.js";
6
6
  import { j as t } from "./chunks/jsx-runtime-BzflLqGi.js";
7
7
  import * as r3 from "react";
8
- import n3, { useRef as l2, useState as Q, useEffect as C3 } from "react";
9
- import { c as Y } from "./chunks/config--bs_09I6.js";
8
+ import n3, { useRef as l2, useState as X, useEffect as C3 } from "react";
9
+ import { c as R } from "./chunks/config--bs_09I6.js";
10
10
  import { g as s2 } from "./chunks/sector-ucUgPp75.js";
11
11
  import { b as R3 } from "./chunks/dataset-BZpjo3Yq.js";
12
12
  import h3 from "dataloader";
13
- import { c as U, L as p3, p as i2, R as Y3, s as p2, b as d2 } from "./chunks/router-CssZk5qZ.js";
14
- import { Row as d3, Col as V, Popover as H3, Tag as u3, Space as c2, Tooltip as F3, Table as y2, message as g2, Form as y3, Modal as f2, Alert as i3, Spin as m2, Input as w3, Button as M3, Rate as C2 } from "antd";
15
- import { isArray as u2, get as s, capitalize as D3, values as E2, startCase as P3 } from "lodash-es";
13
+ import { c as P, L as p3, p as i2, R as Y3, s as p2, b as d2 } from "./chunks/router-CssZk5qZ.js";
14
+ import { Row as d3, Col as U, Popover as H3, Tag as u3, Space as c2, Tooltip as F3, Table as y2, message as f2, Form as y3, Modal as g2, Alert as i3, Spin as m2, Input as w3, Button as M3, Rate as C2 } from "antd";
15
+ import { isArray as u2, get as l, capitalize as D3, values as E2, startCase as P3 } from "lodash-es";
16
16
  import h2 from "react-jss";
17
- import { w as F2, P as L, g as z3 } from "./chunks/PresentationItem-C4yZ555-.js";
18
- import { a as W3, R as Z3, D as B2 } from "./chunks/Distributions-CHjEIZ3F.js";
17
+ import { w as F2, P as $, g as z3 } from "./chunks/PresentationItem-C4yZ555-.js";
18
+ import { a as W3, R as Z3, D as B2 } from "./chunks/Distributions-DKMGoRMJ.js";
19
19
  import { X as l3 } from "./chunks/XrGutter-nBDDl_Lq.js";
20
20
  import E3 from "linkify-html";
21
21
  import { R as B3 } from "./chunks/LinkOutlined-2IkQWTV7.js";
22
22
  import { I as j3 } from "./chunks/AntdIcon-B1nMlqyh.js";
23
23
  import { b as k2, g as x2, a as S2 } from "./chunks/enumeration-nKPV2qHV.js";
24
- import A3 from "dompurify";
25
- import { E as g3, M as I3 } from "./chunks/ErrorMsg-D5nALHuK.js";
24
+ import b3 from "dompurify";
25
+ import { E as f3, M as I3 } from "./chunks/ErrorMsg-D5nALHuK.js";
26
26
  import { D as j2 } from "./chunks/DatasetlogoWithFallback-Bb-kmHts.js";
27
- import { T as A2 } from "./chunks/TaxonBreakdown-DqdQ18QM.js";
28
- import { marked as b2 } from "marked";
29
- var v2 = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z" } }] }, name: "download", theme: "outlined" };
27
+ import { T as b2 } from "./chunks/TaxonBreakdown-CyHl1YES.js";
28
+ import { marked as A2 } from "marked";
29
+ var $2 = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z" } }] }, name: "download", theme: "outlined" };
30
30
  function k3() {
31
- return k3 = Object.assign ? Object.assign.bind() : function(n) {
32
- for (var i = 1; i < arguments.length; i++) {
33
- var a = arguments[i];
34
- for (var l in a)
35
- Object.prototype.hasOwnProperty.call(a, l) && (n[l] = a[l]);
31
+ return k3 = Object.assign ? Object.assign.bind() : function(r) {
32
+ for (var s = 1; s < arguments.length; s++) {
33
+ var a = arguments[s];
34
+ for (var n in a)
35
+ Object.prototype.hasOwnProperty.call(a, n) && (r[n] = a[n]);
36
36
  }
37
- return n;
37
+ return r;
38
38
  }, k3.apply(this, arguments);
39
39
  }
40
- const L2 = (n, i) => /* @__PURE__ */ r3.createElement(j3, k3({}, n, {
41
- ref: i,
42
- icon: v2
43
- })), b3 = /* @__PURE__ */ r3.forwardRef(L2);
44
- process.env.NODE_ENV !== "production" && (b3.displayName = "DownloadOutlined");
45
- var $2 = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M924.3 338.4a447.57 447.57 0 00-96.1-143.3 443.09 443.09 0 00-143-96.3A443.91 443.91 0 00512 64h-2c-60.5.3-119 12.3-174.1 35.9a444.08 444.08 0 00-141.7 96.5 445 445 0 00-95 142.8A449.89 449.89 0 0065 514.1c.3 69.4 16.9 138.3 47.9 199.9v152c0 25.4 20.6 46 45.9 46h151.8a447.72 447.72 0 00199.5 48h2.1c59.8 0 117.7-11.6 172.3-34.3A443.2 443.2 0 00827 830.5c41.2-40.9 73.6-88.7 96.3-142 23.5-55.2 35.5-113.9 35.8-174.5.2-60.9-11.6-120-34.8-175.6zM312.4 560c-26.4 0-47.9-21.5-47.9-48s21.5-48 47.9-48 47.9 21.5 47.9 48-21.4 48-47.9 48zm199.6 0c-26.4 0-47.9-21.5-47.9-48s21.5-48 47.9-48 47.9 21.5 47.9 48-21.5 48-47.9 48zm199.6 0c-26.4 0-47.9-21.5-47.9-48s21.5-48 47.9-48 47.9 21.5 47.9 48-21.5 48-47.9 48z" } }] }, name: "message", theme: "filled" };
40
+ const v2 = (r, s) => /* @__PURE__ */ r3.createElement(j3, k3({}, r, {
41
+ ref: s,
42
+ icon: $2
43
+ })), A3 = /* @__PURE__ */ r3.forwardRef(v2);
44
+ process.env.NODE_ENV !== "production" && (A3.displayName = "DownloadOutlined");
45
+ var L2 = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M924.3 338.4a447.57 447.57 0 00-96.1-143.3 443.09 443.09 0 00-143-96.3A443.91 443.91 0 00512 64h-2c-60.5.3-119 12.3-174.1 35.9a444.08 444.08 0 00-141.7 96.5 445 445 0 00-95 142.8A449.89 449.89 0 0065 514.1c.3 69.4 16.9 138.3 47.9 199.9v152c0 25.4 20.6 46 45.9 46h151.8a447.72 447.72 0 00199.5 48h2.1c59.8 0 117.7-11.6 172.3-34.3A443.2 443.2 0 00827 830.5c41.2-40.9 73.6-88.7 96.3-142 23.5-55.2 35.5-113.9 35.8-174.5.2-60.9-11.6-120-34.8-175.6zM312.4 560c-26.4 0-47.9-21.5-47.9-48s21.5-48 47.9-48 47.9 21.5 47.9 48-21.4 48-47.9 48zm199.6 0c-26.4 0-47.9-21.5-47.9-48s21.5-48 47.9-48 47.9 21.5 47.9 48-21.5 48-47.9 48zm199.6 0c-26.4 0-47.9-21.5-47.9-48s21.5-48 47.9-48 47.9 21.5 47.9 48-21.5 48-47.9 48z" } }] }, name: "message", theme: "filled" };
46
46
  function x3() {
47
- return x3 = Object.assign ? Object.assign.bind() : function(n) {
48
- for (var i = 1; i < arguments.length; i++) {
49
- var a = arguments[i];
50
- for (var l in a)
51
- Object.prototype.hasOwnProperty.call(a, l) && (n[l] = a[l]);
47
+ return x3 = Object.assign ? Object.assign.bind() : function(r) {
48
+ for (var s = 1; s < arguments.length; s++) {
49
+ var a = arguments[s];
50
+ for (var n in a)
51
+ Object.prototype.hasOwnProperty.call(a, n) && (r[n] = a[n]);
52
52
  }
53
- return n;
53
+ return r;
54
54
  }, x3.apply(this, arguments);
55
55
  }
56
- const w2 = (n, i) => /* @__PURE__ */ r3.createElement(j3, x3({}, n, {
57
- ref: i,
58
- icon: $2
56
+ const w2 = (r, s) => /* @__PURE__ */ r3.createElement(j3, x3({}, r, {
57
+ ref: s,
58
+ icon: L2
59
59
  })), U3 = /* @__PURE__ */ r3.forwardRef(w2);
60
60
  process.env.NODE_ENV !== "production" && (U3.displayName = "MessageFilled");
61
61
  var M2 = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M938 458.8l-29.6-312.6c-1.5-16.2-14.4-29-30.6-30.6L565.2 86h-.4c-3.2 0-5.7 1-7.6 2.9L88.9 557.2a9.96 9.96 0 000 14.1l363.8 363.8c1.9 1.9 4.4 2.9 7.1 2.9s5.2-1 7.1-2.9l468.3-468.3c2-2.1 3-5 2.8-8zM459.7 834.7L189.3 564.3 589 164.6 836 188l23.4 247-399.7 399.7zM680 256c-48.5 0-88 39.5-88 88s39.5 88 88 88 88-39.5 88-88-39.5-88-88-88zm0 120c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z" } }] }, name: "tag", theme: "outlined" };
62
62
  function S3() {
63
- return S3 = Object.assign ? Object.assign.bind() : function(n) {
64
- for (var i = 1; i < arguments.length; i++) {
65
- var a = arguments[i];
66
- for (var l in a)
67
- Object.prototype.hasOwnProperty.call(a, l) && (n[l] = a[l]);
63
+ return S3 = Object.assign ? Object.assign.bind() : function(r) {
64
+ for (var s = 1; s < arguments.length; s++) {
65
+ var a = arguments[s];
66
+ for (var n in a)
67
+ Object.prototype.hasOwnProperty.call(a, n) && (r[n] = a[n]);
68
68
  }
69
- return n;
69
+ return r;
70
70
  }, S3.apply(this, arguments);
71
71
  }
72
- const D2 = (n, i) => /* @__PURE__ */ r3.createElement(j3, S3({}, n, {
73
- ref: i,
72
+ const D2 = (r, s) => /* @__PURE__ */ r3.createElement(j3, S3({}, r, {
73
+ ref: s,
74
74
  icon: M2
75
75
  })), V3 = /* @__PURE__ */ r3.forwardRef(D2);
76
76
  process.env.NODE_ENV !== "production" && (V3.displayName = "TagOutlined");
@@ -104,28 +104,28 @@ const I2 = {
104
104
  marginBottom: 10,
105
105
  marginTop: 10
106
106
  }
107
- }, T2 = ({ classes: n, children: i, size: a }) => {
108
- const l = () => {
107
+ }, T2 = ({ classes: r, children: s, size: a }) => {
108
+ const n = () => {
109
109
  let p;
110
- return Array.isArray(i) && i.length > 0 ? p = i.map((e, o) => /* @__PURE__ */ t.jsx("span", { className: n.content, children: e }, o)) : !Array.isArray(i) && typeof i < "u" && (p = /* @__PURE__ */ t.jsx("span", { className: n.content, children: i })), p;
111
- }, r = a === "medium" ? n.mediumMargin : n.smallMargin;
112
- return /* @__PURE__ */ t.jsx(d3, { className: n.formItem, children: /* @__PURE__ */ t.jsx(V, { span: 24, className: r, children: l() }) });
113
- }, G3 = F2()(h2(I2)(T2)), q3 = ({ style: n = {}, decision: i, popoverPlacement: a }) => {
114
- const l = l2(Math.random().toString(36).substring(2, 15)), {
115
- subject: r,
110
+ return Array.isArray(s) && s.length > 0 ? p = s.map((e, o) => /* @__PURE__ */ t.jsx("span", { className: r.content, children: e }, o)) : !Array.isArray(s) && typeof s < "u" && (p = /* @__PURE__ */ t.jsx("span", { className: r.content, children: s })), p;
111
+ }, i = a === "medium" ? r.mediumMargin : r.smallMargin;
112
+ return /* @__PURE__ */ t.jsx(d3, { className: r.formItem, children: /* @__PURE__ */ t.jsx(U, { span: 24, className: i, children: n() }) });
113
+ }, G3 = F2()(h2(I2)(T2)), q3 = ({ style: r = {}, decision: s, popoverPlacement: a }) => {
114
+ const n = l2(Math.random().toString(36).substring(2, 15)), {
115
+ subject: i,
116
116
  originalSubjectId: p,
117
117
  subjectDatasetKey: e,
118
118
  datasetKey: o,
119
- created: C,
120
- createdBy: F,
121
- modified: j,
119
+ created: u,
120
+ createdBy: E,
121
+ modified: b,
122
122
  modifiedBy: c,
123
- ...k
124
- } = i;
125
- return /* @__PURE__ */ t.jsx("div", { style: { display: "inline" }, id: l.current, children: /* @__PURE__ */ t.jsx(
123
+ ...B
124
+ } = s;
125
+ return /* @__PURE__ */ t.jsx("div", { style: { display: "inline" }, id: n.current, children: /* @__PURE__ */ t.jsx(
126
126
  H3,
127
127
  {
128
- getPopupContainer: () => document.getElementById(l.current),
128
+ getPopupContainer: () => document.getElementById(n.current),
129
129
  title: "Editorial decision",
130
130
  content: /* @__PURE__ */ t.jsxs("div", { style: { overflow: "scroll" }, children: [
131
131
  " ",
@@ -133,7 +133,7 @@ const I2 = {
133
133
  "pre",
134
134
  {
135
135
  style: { fontSize: "10px", fontFamily: "monospace", width: "400px" },
136
- children: JSON.stringify(k, null, 2)
136
+ children: JSON.stringify(B, null, 2)
137
137
  }
138
138
  )
139
139
  ] }),
@@ -152,98 +152,98 @@ const I2 = {
152
152
  lineHeight: "8px",
153
153
  verticalAlign: "middle",
154
154
  marginRight: "2px",
155
- ...n
155
+ ...r
156
156
  },
157
157
  children: "DC"
158
158
  }
159
159
  )
160
160
  }
161
161
  ) });
162
- }, J3 = (n) => {
163
- const i = n ? n.toUpperCase() : "";
164
- return ["HOLOTYPE", "LECTOTYPE", "NEOTYPE"].includes(i) ? "#e2614a" : ["PARATYPE", "PARALECTOTYPE", "SYNTYPE"].includes(i) ? "#f1eb0b" : ["ALLOTYPE"].includes(i) ? "#7edaff" : null;
165
- }, K2 = (n, i) => {
166
- var r, p;
167
- let a = n != null && n.gbifKey && (n == null ? void 0 : n.gbifPublisherKey) === ((r = Y) == null ? void 0 : r.plaziGbifPublisherKey) ? `https://www.gbif.org/occurrence/${n == null ? void 0 : n.gbifKey}/${i.id}` : "";
168
- !a && ((p = i == null ? void 0 : i.link) != null && p.startsWith("https://www.gbif.org/occurrence/")) && (a = i == null ? void 0 : i.link);
169
- const l = i != null && i.associatedSequences && (i == null ? void 0 : i.associatedSequences.indexOf("ncbi.")) > -1 ? i == null ? void 0 : i.associatedSequences : "";
170
- return (a || l) && /* @__PURE__ */ t.jsx("span", { id: `${i.id}-type-material-links`, children: /* @__PURE__ */ t.jsxs(c2, { children: [
171
- a && /* @__PURE__ */ t.jsx(F3, { title: "Occurrence in GBIF", getPopupContainer: () => document.getElementById(`${i.id}-type-material-links`) || document.body, children: /* @__PURE__ */ t.jsxs("a", { style: { marginLeft: 4 }, href: a, target: "_blank", rel: "noreferrer", children: [
162
+ }, J3 = (r) => {
163
+ const s = r ? r.toUpperCase() : "";
164
+ return ["HOLOTYPE", "LECTOTYPE", "NEOTYPE"].includes(s) ? "#e2614a" : ["PARATYPE", "PARALECTOTYPE", "SYNTYPE"].includes(s) ? "#f1eb0b" : ["ALLOTYPE"].includes(s) ? "#7edaff" : null;
165
+ }, K2 = (r, s) => {
166
+ var i, p;
167
+ let a = r != null && r.gbifKey && (r == null ? void 0 : r.gbifPublisherKey) === ((i = R) == null ? void 0 : i.plaziGbifPublisherKey) ? `https://www.gbif.org/occurrence/${r == null ? void 0 : r.gbifKey}/${s.id}` : "";
168
+ !a && ((p = s == null ? void 0 : s.link) != null && p.startsWith("https://www.gbif.org/occurrence/")) && (a = s == null ? void 0 : s.link);
169
+ const n = s != null && s.associatedSequences && (s == null ? void 0 : s.associatedSequences.indexOf("ncbi.")) > -1 ? s == null ? void 0 : s.associatedSequences : "";
170
+ return (a || n) && /* @__PURE__ */ t.jsx("span", { id: `${s.id}-type-material-links`, children: /* @__PURE__ */ t.jsxs(c2, { children: [
171
+ a && /* @__PURE__ */ t.jsx(F3, { title: "Occurrence in GBIF", getPopupContainer: () => document.getElementById(`${s.id}-type-material-links`) || document.body, children: /* @__PURE__ */ t.jsxs("a", { style: { marginLeft: 4 }, href: a, target: "_blank", rel: "noreferrer", children: [
172
172
  "GBIF ",
173
173
  /* @__PURE__ */ t.jsx(B3, {})
174
174
  ] }) }),
175
- l && /* @__PURE__ */ t.jsx(F3, { title: "DNA sequence in GenBank", children: /* @__PURE__ */ t.jsxs("a", { href: l, target: "_blank", rel: "noreferrer", children: [
175
+ n && /* @__PURE__ */ t.jsx(F3, { title: "DNA sequence in GenBank", children: /* @__PURE__ */ t.jsxs("a", { href: n, target: "_blank", rel: "noreferrer", children: [
176
176
  "GenBank ",
177
177
  /* @__PURE__ */ t.jsx(B3, {})
178
178
  ] }) })
179
179
  ] }) });
180
- }, O2 = ({ dataset: n, data: i, nameID: a, style: l }) => i[a] ? /* @__PURE__ */ t.jsx("div", { style: l, children: i[a].map((r) => /* @__PURE__ */ t.jsx(G3, { children: /* @__PURE__ */ t.jsxs(
180
+ }, O2 = ({ dataset: r, data: s, nameID: a, style: n }) => s[a] ? /* @__PURE__ */ t.jsx("div", { style: n, children: s[a].map(({ status: i, nameId: p, typeMaterial: e }) => /* @__PURE__ */ t.jsx(G3, { children: /* @__PURE__ */ t.jsxs(
181
181
  l3,
182
182
  {
183
- merged: r.merged,
184
- createdBy: r == null ? void 0 : r.createdBy,
185
- datasetKey: r == null ? void 0 : r.datasetKey,
186
- verbatimSourceKey: r == null ? void 0 : r.verbatimSourceKey,
187
- sourceDatasetKey: r == null ? void 0 : r.sourceDatasetKey,
183
+ merged: e.merged,
184
+ createdBy: e == null ? void 0 : e.createdBy,
185
+ datasetKey: e == null ? void 0 : e.datasetKey,
186
+ verbatimSourceKey: e == null ? void 0 : e.verbatimSourceKey,
187
+ sourceDatasetKey: e == null ? void 0 : e.sourceDatasetKey,
188
188
  children: [
189
- /* @__PURE__ */ t.jsx(u3, { color: J3(r == null ? void 0 : r.status), children: r == null ? void 0 : r.status }),
189
+ /* @__PURE__ */ t.jsx(u3, { color: J3(i), children: i }),
190
190
  " ",
191
- K2(n, r),
191
+ K2(r, e),
192
192
  " ",
193
- (r == null ? void 0 : r.citation) && /* @__PURE__ */ t.jsx(
193
+ (e == null ? void 0 : e.citation) && /* @__PURE__ */ t.jsx(
194
194
  "span",
195
195
  {
196
- dangerouslySetInnerHTML: { __html: E3((r == null ? void 0 : r.citation) || "") }
196
+ dangerouslySetInnerHTML: { __html: E3((e == null ? void 0 : e.citation) || "") }
197
197
  }
198
198
  )
199
199
  ]
200
200
  }
201
- ) }, r.id)) }) : null;
201
+ ) }, `${e.id}-${p}`)) }) : null;
202
202
  class _2 extends n3.Component {
203
203
  constructor(a) {
204
204
  super(a);
205
205
  _(this, "getData", () => {
206
- const { nameId: a, datasetKey: l, references: r } = this.props;
206
+ const { nameId: a, datasetKey: n, references: i } = this.props;
207
207
  if (referenceId) {
208
208
  const p = u2(referenceId) ? referenceId : [referenceId], e = [];
209
209
  this.setState({ loading: !0 }), Promise.all(
210
210
  p.map(
211
- (o) => s(r, o) ? Promise.resolve(e.push(r[a])) : U(
212
- `${Y.dataApi}dataset/${l}/name/${encodeURIComponent(a)}/types`
213
- ).then((C) => e.push(C.data))
211
+ (o) => l(i, o) ? Promise.resolve(e.push(i[a])) : P(
212
+ `${R.dataApi}dataset/${n}/name/${encodeURIComponent(a)}/types`
213
+ ).then((u) => e.push(u.data))
214
214
  )
215
215
  ).then(() => this.setState({ typeMaterial: e, loading: !1 }));
216
216
  }
217
217
  });
218
218
  _(this, "getContent", () => {
219
- const { typeMaterial: a, nameId: l } = this.props, r = (a == null ? void 0 : a[l]) || [];
220
- if (r.length > 0)
221
- return /* @__PURE__ */ t.jsx("div", { children: r.map((p) => /* @__PURE__ */ t.jsx("div", { style: { marginBottom: "8px", paddingLeft: "18px" }, children: /* @__PURE__ */ t.jsxs(l3, { merged: p.merged, children: [
222
- /* @__PURE__ */ t.jsx(u3, { color: J3(p == null ? void 0 : p.status), children: p == null ? void 0 : p.status }),
219
+ const { typeMaterial: a, nameId: n } = this.props, i = (a == null ? void 0 : a[n]) || [];
220
+ if (i.length > 0)
221
+ return /* @__PURE__ */ t.jsx("div", { children: i.map(({ status: p, nameId: e, typeMaterial: o }) => /* @__PURE__ */ t.jsx("div", { style: { marginBottom: "8px", paddingLeft: "18px" }, children: /* @__PURE__ */ t.jsxs(l3, { merged: o.merged, children: [
222
+ /* @__PURE__ */ t.jsx(u3, { color: J3(p), children: p }),
223
223
  " ",
224
- (p == null ? void 0 : p.citation) && /* @__PURE__ */ t.jsx(
224
+ (o == null ? void 0 : o.citation) && /* @__PURE__ */ t.jsx(
225
225
  "span",
226
226
  {
227
227
  dangerouslySetInnerHTML: {
228
- __html: E3((p == null ? void 0 : p.citation) || "")
228
+ __html: E3((o == null ? void 0 : o.citation) || "")
229
229
  }
230
230
  }
231
231
  )
232
- ] }) }, p.id)) });
232
+ ] }) }, `${o.id}-${e}`)) });
233
233
  });
234
234
  _(this, "render", () => {
235
- const { typeMaterial: a, nameId: l } = this.props;
236
- return ((a == null ? void 0 : a[l]) || []).length > 0 ? /* @__PURE__ */ t.jsxs(
235
+ const { typeMaterial: a, nameId: n } = this.props;
236
+ return ((a == null ? void 0 : a[n]) || []).length > 0 ? /* @__PURE__ */ t.jsxs(
237
237
  H3,
238
238
  {
239
- getPopupContainer: () => document.getElementById(`type_popover_${l}`),
239
+ getPopupContainer: () => document.getElementById(`type_popover_${n}`),
240
240
  placement: this.props.placement || "left",
241
241
  title: "Type Material",
242
242
  content: /* @__PURE__ */ t.jsx("div", { style: { maxWidth: "500px" }, children: this.getContent() }),
243
243
  trigger: "click",
244
244
  children: [
245
245
  " ",
246
- /* @__PURE__ */ t.jsx(V3, { style: { cursor: "pointer" }, id: `type_popover_${l}` })
246
+ /* @__PURE__ */ t.jsx(V3, { style: { cursor: "pointer" }, id: `type_popover_${n}` })
247
247
  ]
248
248
  }
249
249
  ) : "";
@@ -255,7 +255,7 @@ class _2 extends n3.Component {
255
255
  };
256
256
  }
257
257
  }
258
- const X3 = ({ total: n, visible: i, showAll: a, onChange: l }) => n <= i && !a ? null : /* @__PURE__ */ t.jsx("a", { onClick: () => l(!a), style: { cursor: "pointer" }, children: a ? "Show less" : `Show all (${n})` }), N2 = /* @__PURE__ */ new Set([
258
+ const X3 = ({ total: r, visible: s, showAll: a, onChange: n }) => r <= s && !a ? null : /* @__PURE__ */ t.jsx("a", { onClick: () => n(!a), style: { cursor: "pointer" }, children: a ? "Show less" : `Show all (${r})` }), N2 = /* @__PURE__ */ new Set([
259
259
  "bacterial",
260
260
  "botanical",
261
261
  "cultivars",
@@ -263,66 +263,66 @@ const X3 = ({ total: n, visible: i, showAll: a, onChange: l }) => n <= i && !a ?
263
263
  "phylo",
264
264
  "virus",
265
265
  "zoological"
266
- ]), R2 = (n, i, a) => {
267
- if (!i) return "";
268
- const l = n == null ? void 0 : n[i];
269
- if (!l) return i;
270
- const r = N2.has(a) && typeof l[a] == "string" ? a : "zoological";
271
- return l[r] || l.name || i;
272
- }, Q3 = ({ nomStatus: n, code: i, brackets: a }) => {
273
- const [l, r] = Q(null);
266
+ ]), R2 = (r, s, a) => {
267
+ if (!s) return "";
268
+ const n = r == null ? void 0 : r[s];
269
+ if (!n) return s;
270
+ const i = N2.has(a) && typeof n[a] == "string" ? a : "zoological";
271
+ return n[i] || n.name || s;
272
+ }, Q3 = ({ nomStatus: r, code: s, brackets: a }) => {
273
+ const [n, i] = X(null);
274
274
  if (C3(() => {
275
275
  let e = !1;
276
276
  return k2().then((o) => {
277
- e || r(o);
277
+ e || i(o);
278
278
  }).catch(() => {
279
279
  }), () => {
280
280
  e = !0;
281
281
  };
282
- }, []), !n) return null;
283
- const p = R2(l, n, i);
282
+ }, []), !r) return null;
283
+ const p = R2(n, r, s);
284
284
  return /* @__PURE__ */ t.jsx(t.Fragment, { children: a ? `(${p})` : p });
285
285
  }, T3 = 5, K3 = ({
286
- datasetKey: n,
287
- data: i,
286
+ datasetKey: r,
287
+ data: s,
288
288
  style: a,
289
- references: l,
290
- decisions: r,
289
+ references: n,
290
+ decisions: i,
291
291
  typeMaterial: p,
292
292
  referenceIndexMap: e,
293
293
  primarySource: o,
294
- misapplied: C
294
+ misapplied: u
295
295
  }) => {
296
- const [F, j] = Q(!1), c = (d, B) => s(d, "name.combinationAuthorship.year") && s(B, "name.combinationAuthorship.year") ? s(B, "name.combinationAuthorship.year") - s(d, "name.combinationAuthorship.year") : s(d, "name.scientificName") < s(B, "name.scientificName") ? -1 : 1, k = [];
297
- C ? i.misapplied && [...i.misapplied].sort(c).forEach((d) => {
298
- k.push({ syn: d, homotypic: !1, indent: !1 });
299
- }) : (i.homotypic && [...i.homotypic].sort(c).forEach((d) => {
300
- k.push({ syn: d, homotypic: !0, indent: !1 });
301
- }), i.heterotypicGroups && [...i.heterotypicGroups].sort((d, B) => c(d[0], B[0])).forEach((d) => {
302
- d.forEach((B, M) => {
303
- k.push({ syn: B, homotypic: M > 0, indent: M > 0 });
296
+ const [E, b] = X(!1), c = (d, k) => l(d, "name.combinationAuthorship.year") && l(k, "name.combinationAuthorship.year") ? l(k, "name.combinationAuthorship.year") - l(d, "name.combinationAuthorship.year") : l(d, "name.scientificName") < l(k, "name.scientificName") ? -1 : 1, B = [];
297
+ u ? s.misapplied && [...s.misapplied].sort(c).forEach((d) => {
298
+ B.push({ syn: d, homotypic: !1, indent: !1 });
299
+ }) : (s.homotypic && [...s.homotypic].sort(c).forEach((d) => {
300
+ B.push({ syn: d, homotypic: !0, indent: !1 });
301
+ }), s.heterotypicGroups && [...s.heterotypicGroups].sort((d, k) => c(d[0], k[0])).forEach((d) => {
302
+ d.forEach((k, I) => {
303
+ B.push({ syn: k, homotypic: I > 0, indent: I > 0 });
304
304
  });
305
305
  }));
306
- const $ = k.length, A = F ? k : k.slice(0, T3), w = ({ syn: d, homotypic: B, indent: M }) => /* @__PURE__ */ t.jsxs(G3, { children: [
306
+ const M = B.length, v = E ? B : B.slice(0, T3), D = ({ syn: d, homotypic: k, indent: I }) => /* @__PURE__ */ t.jsxs(G3, { children: [
307
307
  /* @__PURE__ */ t.jsx(
308
308
  l3,
309
309
  {
310
- merged: !!(d != null && d.sourceDatasetKey) && s(o, "key") !== (d == null ? void 0 : d.sourceDatasetKey),
310
+ merged: !!(d != null && d.sourceDatasetKey) && l(o, "key") !== (d == null ? void 0 : d.sourceDatasetKey),
311
311
  createdBy: d == null ? void 0 : d.createdBy,
312
312
  datasetKey: d.datasetKey,
313
313
  sourceDatasetKey: d == null ? void 0 : d.sourceDatasetKey,
314
314
  verbatimSourceKey: d.verbatimSourceKey,
315
- children: /* @__PURE__ */ t.jsxs("span", { style: M ? { marginLeft: "10px" } : null, children: [
316
- C ? "" : B === !0 ? "≡ " : "= ",
315
+ children: /* @__PURE__ */ t.jsxs("span", { style: I ? { marginLeft: "10px" } : null, children: [
316
+ u ? "" : k === !0 ? "≡ " : "= ",
317
317
  " ",
318
- /* @__PURE__ */ t.jsx(p3, { to: "taxon", args: s(d, "id"), children: /* @__PURE__ */ t.jsx(
318
+ /* @__PURE__ */ t.jsx(p3, { to: "taxon", args: l(d, "id"), children: /* @__PURE__ */ t.jsx(
319
319
  "span",
320
320
  {
321
321
  dangerouslySetInnerHTML: {
322
- __html: s(
322
+ __html: l(
323
323
  d,
324
324
  "labelHtml",
325
- `${s(d, "name.scientificName")} ${s(
325
+ `${l(d, "name.scientificName")} ${l(
326
326
  d,
327
327
  "name.authorship",
328
328
  ""
@@ -335,13 +335,13 @@ const X3 = ({ total: n, visible: i, showAll: a, onChange: l }) => n <= i && !a ?
335
335
  }
336
336
  ),
337
337
  " ",
338
- (r == null ? void 0 : r[d == null ? void 0 : d.id]) && /* @__PURE__ */ t.jsx(q3, { decision: r == null ? void 0 : r[d == null ? void 0 : d.id] }),
338
+ (i == null ? void 0 : i[d == null ? void 0 : d.id]) && /* @__PURE__ */ t.jsx(q3, { decision: i == null ? void 0 : i[d == null ? void 0 : d.id] }),
339
339
  /* @__PURE__ */ t.jsx(
340
340
  _2,
341
341
  {
342
- datasetKey: n,
342
+ datasetKey: r,
343
343
  typeMaterial: p,
344
- nameId: s(d, "name.id"),
344
+ nameId: l(d, "name.id"),
345
345
  placement: "top"
346
346
  }
347
347
  ),
@@ -349,35 +349,35 @@ const X3 = ({ total: n, visible: i, showAll: a, onChange: l }) => n <= i && !a ?
349
349
  /* @__PURE__ */ t.jsx(
350
350
  Q3,
351
351
  {
352
- nomStatus: s(d, "name.nomStatus"),
353
- code: s(d, "name.code"),
352
+ nomStatus: l(d, "name.nomStatus"),
353
+ code: l(d, "name.code"),
354
354
  brackets: !0
355
355
  }
356
356
  ),
357
357
  " ",
358
- s(d, "status") === "misapplied" && s(d, "accordingTo") ? s(d, "accordingTo") : "",
359
- s(d, "status") === "ambiguous synonym" && "(Ambiguous)",
358
+ l(d, "status") === "misapplied" && l(d, "accordingTo") ? l(d, "accordingTo") : "",
359
+ l(d, "status") === "ambiguous synonym" && "(Ambiguous)",
360
360
  /* @__PURE__ */ t.jsx(
361
361
  W3,
362
362
  {
363
- datasetKey: n,
364
- references: l,
363
+ datasetKey: r,
364
+ references: n,
365
365
  referenceIndexMap: e,
366
- referenceId: s(d, "name.publishedInId") ? [s(d, "name.publishedInId"), ...d.referenceIds || []] : d.referenceIds,
366
+ referenceId: l(d, "name.publishedInId") ? [l(d, "name.publishedInId"), ...d.referenceIds || []] : d.referenceIds,
367
367
  placement: "top",
368
368
  style: { display: "inline-block" }
369
369
  }
370
370
  )
371
- ] }, s(d, "name.id"));
371
+ ] }, l(d, "name.id"));
372
372
  return /* @__PURE__ */ t.jsxs("div", { style: a, children: [
373
- A.map(w),
373
+ v.map(D),
374
374
  /* @__PURE__ */ t.jsx(
375
375
  X3,
376
376
  {
377
- total: $,
377
+ total: M,
378
378
  visible: T3,
379
- showAll: F,
380
- onChange: j
379
+ showAll: E,
380
+ onChange: b
381
381
  }
382
382
  )
383
383
  ] });
@@ -387,32 +387,32 @@ class Y2 extends n3.Component {
387
387
  super(a);
388
388
  _(this, "componentDidMount", () => {
389
389
  const { data: a } = this.props;
390
- x2().then((l) => {
391
- const r = {}, p = {};
392
- l.forEach((o) => {
393
- r[o.alpha3] = o, p[o.alpha2] = o;
390
+ x2().then((n) => {
391
+ const i = {}, p = {};
392
+ n.forEach((o) => {
393
+ i[o.alpha3] = o, p[o.alpha2] = o;
394
394
  });
395
395
  const e = a.map(
396
- (o) => this.decorateWithCountryByCode(o, p, r)
396
+ (o) => this.decorateWithCountryByCode(o, p, i)
397
397
  );
398
398
  return this.setState({ data: e }), Promise.all(e.map(this.decorateWithLanguageByCode));
399
399
  }).then(() => {
400
400
  this.state.data.sort(
401
- (l, r) => l.languageName > r.languageName ? 1 : -1
401
+ (n, i) => n.languageName > i.languageName ? 1 : -1
402
402
  ), this.setState({ data: [...this.state.data] });
403
403
  });
404
404
  });
405
- _(this, "decorateWithCountryByCode", (a, l, r) => l && a.country && a.country.length === 2 ? {
405
+ _(this, "decorateWithCountryByCode", (a, n, i) => n && a.country && a.country.length === 2 ? {
406
406
  ...a,
407
- countryTitle: s(l, `[${a.country}].title`) || ""
408
- } : r && a.country && a.country.length === 3 ? {
407
+ countryTitle: l(n, `[${a.country}].title`) || ""
408
+ } : i && a.country && a.country.length === 3 ? {
409
409
  ...a,
410
- countryTitle: s(r, `[${a.country}].title`) || ""
410
+ countryTitle: l(i, `[${a.country}].title`) || ""
411
411
  } : a);
412
- _(this, "decorateWithLanguageByCode", (a) => a.language ? U(`${Y.dataApi}vocab/language/${a.language}`).then((l) => {
413
- a.languageName = l.data;
414
- }).catch((l) => console.log(l)) : Promise.resolve());
415
- const { references: l } = this.props;
412
+ _(this, "decorateWithLanguageByCode", (a) => a.language ? P(`${R.dataApi}vocab/language/${a.language}`).then((n) => {
413
+ a.languageName = n.data;
414
+ }).catch((n) => console.log(n)) : Promise.resolve());
415
+ const { references: n } = this.props;
416
416
  this.state = {
417
417
  data: this.props.data ? [...this.props.data] : [],
418
418
  showAll: !1,
@@ -423,7 +423,7 @@ class Y2 extends n3.Component {
423
423
  title: "Original name",
424
424
  dataIndex: "name",
425
425
  key: "name",
426
- render: (r, p) => /* @__PURE__ */ t.jsx(
426
+ render: (i, p) => /* @__PURE__ */ t.jsx(
427
427
  l3,
428
428
  {
429
429
  merged: p == null ? void 0 : p.merged,
@@ -431,7 +431,7 @@ class Y2 extends n3.Component {
431
431
  datasetKey: p == null ? void 0 : p.datasetKey,
432
432
  verbatimSourceKey: p == null ? void 0 : p.verbatimSourceKey,
433
433
  sourceDatasetKey: p == null ? void 0 : p.sourceDatasetKey,
434
- children: r
434
+ children: i
435
435
  }
436
436
  )
437
437
  },
@@ -444,23 +444,23 @@ class Y2 extends n3.Component {
444
444
  title: "Language",
445
445
  dataIndex: "language",
446
446
  key: "language",
447
- render: (r, p) => p.languageName ? p.languageName : r
447
+ render: (i, p) => p.languageName ? p.languageName : i
448
448
  },
449
449
  {
450
450
  title: "Country of use",
451
451
  dataIndex: "country",
452
452
  key: "country",
453
- render: (r, p) => p.countryTitle ? p.countryTitle : r
453
+ render: (i, p) => p.countryTitle ? p.countryTitle : i
454
454
  },
455
455
  {
456
456
  title: "",
457
457
  dataIndex: "referenceId",
458
458
  key: "referenceId",
459
- render: (r, p) => r ? /* @__PURE__ */ t.jsx(
459
+ render: (i, p) => i ? /* @__PURE__ */ t.jsx(
460
460
  W3,
461
461
  {
462
- referenceId: r,
463
- references: l,
462
+ referenceId: i,
463
+ references: n,
464
464
  datasetKey: this.props.datasetKey,
465
465
  placement: "left"
466
466
  }
@@ -470,14 +470,14 @@ class Y2 extends n3.Component {
470
470
  };
471
471
  }
472
472
  render() {
473
- const { style: a } = this.props, { data: l, columns: r, showAll: p } = this.state, e = p ? l : l.slice(0, 5);
473
+ const { style: a } = this.props, { data: n, columns: i, showAll: p } = this.state, e = p ? n : n.slice(0, 5);
474
474
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
475
475
  /* @__PURE__ */ t.jsx(
476
476
  y2,
477
477
  {
478
478
  style: a,
479
479
  className: "colplus-taxon-page-list",
480
- columns: r,
480
+ columns: i,
481
481
  dataSource: e,
482
482
  rowKey: "id",
483
483
  pagination: !1,
@@ -487,7 +487,7 @@ class Y2 extends n3.Component {
487
487
  /* @__PURE__ */ t.jsx(
488
488
  X3,
489
489
  {
490
- total: l.length,
490
+ total: n.length,
491
491
  visible: 5,
492
492
  showAll: p,
493
493
  onChange: (o) => this.setState({ showAll: o })
@@ -499,19 +499,19 @@ class Y2 extends n3.Component {
499
499
  const H2 = {
500
500
  color: "rgba(0, 0, 0, 0.45)",
501
501
  fontSize: "11px"
502
- }, P2 = ({ data: n, style: i }) => /* @__PURE__ */ t.jsxs("div", { style: i, children: [
502
+ }, P2 = ({ data: r, style: s }) => /* @__PURE__ */ t.jsxs("div", { style: s, children: [
503
503
  " ",
504
- n.map((a, l) => /* @__PURE__ */ t.jsxs("div", { style: { float: "left", marginRight: "3px" }, children: [
504
+ r.map((a, n) => /* @__PURE__ */ t.jsxs("div", { style: { float: "left", marginRight: "3px" }, children: [
505
505
  /* @__PURE__ */ t.jsxs("span", { style: H2, children: [
506
506
  a.rank,
507
507
  ": "
508
508
  ] }),
509
509
  /* @__PURE__ */ t.jsx(p3, { to: "taxon", args: a.id, children: /* @__PURE__ */ t.jsx("span", { dangerouslySetInnerHTML: { __html: a.labelHtml } }) }),
510
- l < n.length - 1 && " >"
510
+ n < r.length - 1 && " >"
511
511
  ] }, a.rank))
512
- ] }), z2 = (n, i) => {
513
- if (i)
514
- switch (n.type) {
512
+ ] }), z2 = (r, s) => {
513
+ if (s)
514
+ switch (r.type) {
515
515
  case "spelling correction":
516
516
  return "Has spelling correction";
517
517
  case "based on":
@@ -527,10 +527,10 @@ const H2 = {
527
527
  case "type":
528
528
  return "Type of";
529
529
  default:
530
- return D3(n.type);
530
+ return D3(r.type);
531
531
  }
532
532
  else
533
- switch (n.type) {
533
+ switch (r.type) {
534
534
  case "spelling correction":
535
535
  return "Spelling correction of";
536
536
  case "based on":
@@ -546,20 +546,20 @@ const H2 = {
546
546
  case "type":
547
547
  return "Type";
548
548
  default:
549
- return D3(n.type);
549
+ return D3(r.type);
550
550
  }
551
- }, O3 = ({ data: n, md: i, reverse: a }) => n.map((l, r) => /* @__PURE__ */ t.jsxs(
552
- L,
551
+ }, O3 = ({ data: r, md: s, reverse: a }) => r.map((n, i) => /* @__PURE__ */ t.jsxs(
552
+ $,
553
553
  {
554
- md: i,
555
- label: z2(l, a),
556
- helpText: l.note,
554
+ md: s,
555
+ label: z2(n, a),
556
+ helpText: n.note,
557
557
  children: [
558
558
  !a && /* @__PURE__ */ t.jsx(
559
559
  "span",
560
560
  {
561
561
  dangerouslySetInnerHTML: {
562
- __html: l.relatedName.labelHtml
562
+ __html: n.relatedName.labelHtml
563
563
  }
564
564
  }
565
565
  ),
@@ -567,263 +567,263 @@ const H2 = {
567
567
  "span",
568
568
  {
569
569
  dangerouslySetInnerHTML: {
570
- __html: l.name.labelHtml
570
+ __html: n.name.labelHtml
571
571
  }
572
572
  }
573
573
  )
574
574
  ]
575
575
  },
576
- r
576
+ i
577
577
  )), W2 = ({
578
- data: n,
579
- referenceIndexMap: i,
578
+ data: r,
579
+ referenceIndexMap: s,
580
580
  style: a,
581
- primarySourceDatasetKey: l
581
+ primarySourceDatasetKey: n
582
582
  }) => (C3(() => {
583
- }, [i]), /* @__PURE__ */ t.jsx("div", { style: a, className: "col-reference-link-container", children: E2(n).map((r) => {
583
+ }, [s]), /* @__PURE__ */ t.jsx("div", { style: a, className: "col-reference-link-container", children: E2(r).map((i) => {
584
584
  var p, e;
585
585
  return /* @__PURE__ */ t.jsxs(d3, { children: [
586
- /* @__PURE__ */ t.jsx(V, { style: { paddingRight: "5px" }, children: s(i, r.id) && /* @__PURE__ */ t.jsx("span", { children: `[${s(i, r.id)}]` }) }),
587
- /* @__PURE__ */ t.jsx(V, { span: 20, style: { paddingLeft: "18px" }, children: /* @__PURE__ */ t.jsxs(
586
+ /* @__PURE__ */ t.jsx(U, { style: { paddingRight: "5px" }, children: l(s, i.id) && /* @__PURE__ */ t.jsx("span", { children: `[${l(s, i.id)}]` }) }),
587
+ /* @__PURE__ */ t.jsx(U, { span: 20, style: { paddingLeft: "18px" }, children: /* @__PURE__ */ t.jsxs(
588
588
  l3,
589
589
  {
590
- merged: ((p = r == null ? void 0 : r.sourceDataset) == null ? void 0 : p.key) !== l,
591
- createdBy: r == null ? void 0 : r.createdBy,
592
- datasetKey: r.datasetKey,
593
- verbatimSourceKey: r == null ? void 0 : r.verbatimSourceKey,
594
- sourceDatasetKey: (e = r == null ? void 0 : r.sourceDataset) == null ? void 0 : e.key,
590
+ merged: ((p = i == null ? void 0 : i.sourceDataset) == null ? void 0 : p.key) !== n,
591
+ createdBy: i == null ? void 0 : i.createdBy,
592
+ datasetKey: i.datasetKey,
593
+ verbatimSourceKey: i == null ? void 0 : i.verbatimSourceKey,
594
+ sourceDatasetKey: (e = i == null ? void 0 : i.sourceDataset) == null ? void 0 : e.key,
595
595
  children: [
596
596
  /* @__PURE__ */ t.jsx(
597
597
  "span",
598
598
  {
599
- id: `col-reference-${r.id}`,
599
+ id: `col-reference-${i.id}`,
600
600
  dangerouslySetInnerHTML: {
601
- __html: E3(A3.sanitize(r.citation))
601
+ __html: E3(b3.sanitize(i.citation))
602
602
  }
603
603
  }
604
604
  ),
605
- /* @__PURE__ */ t.jsx(Z3, { reference: r })
605
+ /* @__PURE__ */ t.jsx(Z3, { reference: i })
606
606
  ]
607
607
  }
608
608
  ) })
609
- ] }, r.id);
610
- }) })), Z2 = /^clb(\d+)$/, U2 = (n, i) => {
611
- const a = n.indexOf(":");
612
- if (a < 1) return { value: n };
613
- const l = n.slice(0, a), r = n.slice(a + 1), p = l.match(Z2);
609
+ ] }, i.id);
610
+ }) })), Z2 = /^clb(\d+)$/, U2 = (r, s) => {
611
+ const a = r.indexOf(":");
612
+ if (a < 1) return { value: r };
613
+ const n = r.slice(0, a), i = r.slice(a + 1), p = n.match(Z2);
614
614
  if (p)
615
615
  return {
616
616
  scope: "clb",
617
- value: r,
617
+ value: i,
618
618
  title: `ChecklistBank dataset ${p[1]}`,
619
- href: `${Y.clbPortal}/dataset/${p[1]}/nameusage/${encodeURIComponent(r)}`
619
+ href: `${R.clbPortal}/dataset/${p[1]}/nameusage/${encodeURIComponent(i)}`
620
620
  };
621
- const e = i == null ? void 0 : i[l];
621
+ const e = s == null ? void 0 : s[n];
622
622
  return {
623
- scope: l,
624
- value: r,
625
- title: (e == null ? void 0 : e.title) || l,
626
- href: e != null && e.resolver ? e.resolver.replace("{id}", encodeURIComponent(r)) : void 0
623
+ scope: n,
624
+ value: i,
625
+ title: (e == null ? void 0 : e.title) || n,
626
+ href: e != null && e.resolver ? e.resolver.replace("{id}", encodeURIComponent(i)) : void 0
627
627
  };
628
- }, V2 = ({ scope: n, value: i, title: a, href: l }) => {
629
- const r = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
630
- n && /* @__PURE__ */ t.jsx("span", { className: "col-identifier-scope", children: n }),
631
- /* @__PURE__ */ t.jsx("span", { className: "col-identifier-value", children: i })
628
+ }, V2 = ({ scope: r, value: s, title: a, href: n }) => {
629
+ const i = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
630
+ r && /* @__PURE__ */ t.jsx("span", { className: "col-identifier-scope", children: r }),
631
+ /* @__PURE__ */ t.jsx("span", { className: "col-identifier-value", children: s })
632
632
  ] });
633
- return l ? /* @__PURE__ */ t.jsx(
633
+ return n ? /* @__PURE__ */ t.jsx(
634
634
  "a",
635
635
  {
636
636
  className: "col-identifier",
637
- href: l,
637
+ href: n,
638
638
  target: "_blank",
639
639
  rel: "noopener noreferrer",
640
640
  title: a,
641
- children: r
641
+ children: i
642
642
  }
643
- ) : /* @__PURE__ */ t.jsx("span", { className: "col-identifier", title: a, children: r });
644
- }, G2 = ({ identifiers: n }) => {
645
- const [i, a] = Q(null);
643
+ ) : /* @__PURE__ */ t.jsx("span", { className: "col-identifier", title: a, children: i });
644
+ }, G2 = ({ identifiers: r }) => {
645
+ const [s, a] = X(null);
646
646
  return C3(() => {
647
- let l = !1;
648
- return S2().then((r) => {
649
- l || a(r);
647
+ let n = !1;
648
+ return S2().then((i) => {
649
+ n || a(i);
650
650
  }).catch(() => {
651
651
  }), () => {
652
- l = !0;
652
+ n = !0;
653
653
  };
654
- }, []), /* @__PURE__ */ t.jsx("div", { className: "col-identifier-list", children: n.map((l) => /* @__PURE__ */ t.jsx(V2, { ...U2(String(l), i) }, l)) });
654
+ }, []), /* @__PURE__ */ t.jsx("div", { className: "col-identifier-list", children: r.map((n) => /* @__PURE__ */ t.jsx(V2, { ...U2(String(n), s) }, n)) });
655
655
  };
656
- var f3 = { exports: {} }, q2 = f3.exports, _3;
656
+ var g3 = { exports: {} }, q2 = g3.exports, _3;
657
657
  function J2() {
658
- return _3 || (_3 = 1, (function(n, i) {
659
- (function(a, l) {
660
- n.exports = l();
658
+ return _3 || (_3 = 1, (function(r, s) {
659
+ (function(a, n) {
660
+ r.exports = n();
661
661
  })(q2, (function() {
662
- var a = 1e3, l = 6e4, r = 36e5, p = "millisecond", e = "second", o = "minute", C = "hour", F = "day", j = "week", c = "month", k = "quarter", $ = "year", A = "date", w = "Invalid Date", d = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, B = /\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(u) {
663
- var f = ["th", "st", "nd", "rd"], y = u % 100;
664
- return "[" + u + (f[(y - 20) % 10] || f[y] || f[0]) + "]";
665
- } }, H = function(u, f, y) {
666
- var m = String(u);
667
- return !m || m.length >= f ? u : "" + Array(f + 1 - m.length).join(y) + u;
668
- }, N = { s: H, z: function(u) {
669
- var f = -u.utcOffset(), y = Math.abs(f), m = Math.floor(y / 60), g = y % 60;
670
- return (f <= 0 ? "+" : "-") + H(m, 2, "0") + ":" + H(g, 2, "0");
671
- }, m: function u(f, y) {
672
- if (f.date() < y.date()) return -u(y, f);
673
- var m = 12 * (y.year() - f.year()) + (y.month() - f.month()), g = f.clone().add(m, c), E = y - g < 0, h = f.clone().add(m + (E ? -1 : 1), c);
674
- return +(-(m + (y - g) / (E ? g - h : h - g)) || 0);
675
- }, a: function(u) {
676
- return u < 0 ? Math.ceil(u) || 0 : Math.floor(u);
677
- }, p: function(u) {
678
- return { M: c, y: $, w: j, d: F, D: A, h: C, m: o, s: e, ms: p, Q: k }[u] || String(u || "").toLowerCase().replace(/s$/, "");
679
- }, u: function(u) {
680
- return u === void 0;
681
- } }, z = "en", G = {};
682
- G[z] = M;
683
- var c3 = "$isDayjsObject", o3 = function(u) {
684
- return u instanceof a3 || !(!u || !u[c3]);
685
- }, t3 = function u(f, y, m) {
686
- var g;
687
- if (!f) return z;
688
- if (typeof f == "string") {
689
- var E = f.toLowerCase();
690
- G[E] && (g = E), y && (G[E] = y, g = E);
691
- var h = f.split("-");
692
- if (!g && h.length > 1) return u(h[0]);
662
+ var a = 1e3, n = 6e4, i = 36e5, p = "millisecond", e = "second", o = "minute", u = "hour", E = "day", b = "week", c = "month", B = "quarter", M = "year", v = "date", D = "Invalid Date", d = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, k = /\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, I = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(C) {
663
+ var g = ["th", "st", "nd", "rd"], y = C % 100;
664
+ return "[" + C + (g[(y - 20) % 10] || g[y] || g[0]) + "]";
665
+ } }, z = function(C, g, y) {
666
+ var m = String(C);
667
+ return !m || m.length >= g ? C : "" + Array(g + 1 - m.length).join(y) + C;
668
+ }, Y = { s: z, z: function(C) {
669
+ var g = -C.utcOffset(), y = Math.abs(g), m = Math.floor(y / 60), f = y % 60;
670
+ return (g <= 0 ? "+" : "-") + z(m, 2, "0") + ":" + z(f, 2, "0");
671
+ }, m: function C(g, y) {
672
+ if (g.date() < y.date()) return -C(y, g);
673
+ var m = 12 * (y.year() - g.year()) + (y.month() - g.month()), f = g.clone().add(m, c), h = y - f < 0, F = g.clone().add(m + (h ? -1 : 1), c);
674
+ return +(-(m + (y - f) / (h ? f - F : F - f)) || 0);
675
+ }, a: function(C) {
676
+ return C < 0 ? Math.ceil(C) || 0 : Math.floor(C);
677
+ }, p: function(C) {
678
+ return { M: c, y: M, w: b, d: E, D: v, h: u, m: o, s: e, ms: p, Q: B }[C] || String(C || "").toLowerCase().replace(/s$/, "");
679
+ }, u: function(C) {
680
+ return C === void 0;
681
+ } }, Q = "en", V = {};
682
+ V[Q] = I;
683
+ var c3 = "$isDayjsObject", o3 = function(C) {
684
+ return C instanceof e3 || !(!C || !C[c3]);
685
+ }, t3 = function C(g, y, m) {
686
+ var f;
687
+ if (!g) return Q;
688
+ if (typeof g == "string") {
689
+ var h = g.toLowerCase();
690
+ V[h] && (f = h), y && (V[h] = y, f = h);
691
+ var F = g.split("-");
692
+ if (!f && F.length > 1) return C(F[0]);
693
693
  } else {
694
- var S = f.name;
695
- G[S] = f, g = S;
694
+ var S = g.name;
695
+ V[S] = g, f = S;
696
696
  }
697
- return !m && g && (z = g), g || !m && z;
698
- }, D = function(u, f) {
699
- if (o3(u)) return u.clone();
700
- var y = typeof f == "object" ? f : {};
701
- return y.date = u, y.args = arguments, new a3(y);
702
- }, x = N;
703
- x.l = t3, x.i = o3, x.w = function(u, f) {
704
- return D(u, { locale: f.$L, utc: f.$u, x: f.$x, $offset: f.$offset });
697
+ return !m && f && (Q = f), f || !m && Q;
698
+ }, L = function(C, g) {
699
+ if (o3(C)) return C.clone();
700
+ var y = typeof g == "object" ? g : {};
701
+ return y.date = C, y.args = arguments, new e3(y);
702
+ }, x = Y;
703
+ x.l = t3, x.i = o3, x.w = function(C, g) {
704
+ return L(C, { locale: g.$L, utc: g.$u, x: g.$x, $offset: g.$offset });
705
705
  };
706
- var a3 = (function() {
707
- function u(y) {
706
+ var e3 = (function() {
707
+ function C(y) {
708
708
  this.$L = t3(y.locale, null, !0), this.parse(y), this.$x = this.$x || y.x || {}, this[c3] = !0;
709
709
  }
710
- var f = u.prototype;
711
- return f.parse = function(y) {
710
+ var g = C.prototype;
711
+ return g.parse = function(y) {
712
712
  this.$d = (function(m) {
713
- var g = m.date, E = m.utc;
714
- if (g === null) return /* @__PURE__ */ new Date(NaN);
715
- if (x.u(g)) return /* @__PURE__ */ new Date();
716
- if (g instanceof Date) return new Date(g);
717
- if (typeof g == "string" && !/Z$/i.test(g)) {
718
- var h = g.match(d);
719
- if (h) {
720
- var S = h[2] - 1 || 0, v = (h[7] || "0").substring(0, 3);
721
- return E ? new Date(Date.UTC(h[1], S, h[3] || 1, h[4] || 0, h[5] || 0, h[6] || 0, v)) : new Date(h[1], S, h[3] || 1, h[4] || 0, h[5] || 0, h[6] || 0, v);
713
+ var f = m.date, h = m.utc;
714
+ if (f === null) return /* @__PURE__ */ new Date(NaN);
715
+ if (x.u(f)) return /* @__PURE__ */ new Date();
716
+ if (f instanceof Date) return new Date(f);
717
+ if (typeof f == "string" && !/Z$/i.test(f)) {
718
+ var F = f.match(d);
719
+ if (F) {
720
+ var S = F[2] - 1 || 0, A = (F[7] || "0").substring(0, 3);
721
+ return h ? new Date(Date.UTC(F[1], S, F[3] || 1, F[4] || 0, F[5] || 0, F[6] || 0, A)) : new Date(F[1], S, F[3] || 1, F[4] || 0, F[5] || 0, F[6] || 0, A);
722
722
  }
723
723
  }
724
- return new Date(g);
724
+ return new Date(f);
725
725
  })(y), this.init();
726
- }, f.init = function() {
726
+ }, g.init = function() {
727
727
  var y = this.$d;
728
728
  this.$y = y.getFullYear(), this.$M = y.getMonth(), this.$D = y.getDate(), this.$W = y.getDay(), this.$H = y.getHours(), this.$m = y.getMinutes(), this.$s = y.getSeconds(), this.$ms = y.getMilliseconds();
729
- }, f.$utils = function() {
729
+ }, g.$utils = function() {
730
730
  return x;
731
- }, f.isValid = function() {
732
- return this.$d.toString() !== w;
733
- }, f.isSame = function(y, m) {
734
- var g = D(y);
735
- return this.startOf(m) <= g && g <= this.endOf(m);
736
- }, f.isAfter = function(y, m) {
737
- return D(y) < this.startOf(m);
738
- }, f.isBefore = function(y, m) {
739
- return this.endOf(m) < D(y);
740
- }, f.$g = function(y, m, g) {
741
- return x.u(y) ? this[m] : this.set(g, y);
742
- }, f.unix = function() {
731
+ }, g.isValid = function() {
732
+ return this.$d.toString() !== D;
733
+ }, g.isSame = function(y, m) {
734
+ var f = L(y);
735
+ return this.startOf(m) <= f && f <= this.endOf(m);
736
+ }, g.isAfter = function(y, m) {
737
+ return L(y) < this.startOf(m);
738
+ }, g.isBefore = function(y, m) {
739
+ return this.endOf(m) < L(y);
740
+ }, g.$g = function(y, m, f) {
741
+ return x.u(y) ? this[m] : this.set(f, y);
742
+ }, g.unix = function() {
743
743
  return Math.floor(this.valueOf() / 1e3);
744
- }, f.valueOf = function() {
744
+ }, g.valueOf = function() {
745
745
  return this.$d.getTime();
746
- }, f.startOf = function(y, m) {
747
- var g = this, E = !!x.u(m) || m, h = x.p(y), S = function(Z, K) {
748
- var P = x.w(g.$u ? Date.UTC(g.$y, K, Z) : new Date(g.$y, K, Z), g);
749
- return E ? P : P.endOf(F);
750
- }, v = function(Z, K) {
751
- return x.w(g.toDate()[Z].apply(g.toDate("s"), (E ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(K)), g);
752
- }, I = this.$W, T = this.$M, R = this.$D, q = "set" + (this.$u ? "UTC" : "");
753
- switch (h) {
754
- case $:
755
- return E ? S(1, 0) : S(31, 11);
746
+ }, g.startOf = function(y, m) {
747
+ var f = this, h = !!x.u(m) || m, F = x.p(y), S = function(Z, O) {
748
+ var H = x.w(f.$u ? Date.UTC(f.$y, O, Z) : new Date(f.$y, O, Z), f);
749
+ return h ? H : H.endOf(E);
750
+ }, A = function(Z, O) {
751
+ return x.w(f.toDate()[Z].apply(f.toDate("s"), (h ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(O)), f);
752
+ }, w = this.$W, T = this.$M, N = this.$D, G = "set" + (this.$u ? "UTC" : "");
753
+ switch (F) {
754
+ case M:
755
+ return h ? S(1, 0) : S(31, 11);
756
756
  case c:
757
- return E ? S(1, T) : S(0, T + 1);
758
- case j:
759
- var W = this.$locale().weekStart || 0, J = (I < W ? I + 7 : I) - W;
760
- return S(E ? R - J : R + (6 - J), T);
761
- case F:
762
- case A:
763
- return v(q + "Hours", 0);
764
- case C:
765
- return v(q + "Minutes", 1);
757
+ return h ? S(1, T) : S(0, T + 1);
758
+ case b:
759
+ var W = this.$locale().weekStart || 0, q = (w < W ? w + 7 : w) - W;
760
+ return S(h ? N - q : N + (6 - q), T);
761
+ case E:
762
+ case v:
763
+ return A(G + "Hours", 0);
764
+ case u:
765
+ return A(G + "Minutes", 1);
766
766
  case o:
767
- return v(q + "Seconds", 2);
767
+ return A(G + "Seconds", 2);
768
768
  case e:
769
- return v(q + "Milliseconds", 3);
769
+ return A(G + "Milliseconds", 3);
770
770
  default:
771
771
  return this.clone();
772
772
  }
773
- }, f.endOf = function(y) {
773
+ }, g.endOf = function(y) {
774
774
  return this.startOf(y, !1);
775
- }, f.$set = function(y, m) {
776
- var g, E = x.p(y), h = "set" + (this.$u ? "UTC" : ""), S = (g = {}, g[F] = h + "Date", g[A] = h + "Date", g[c] = h + "Month", g[$] = h + "FullYear", g[C] = h + "Hours", g[o] = h + "Minutes", g[e] = h + "Seconds", g[p] = h + "Milliseconds", g)[E], v = E === F ? this.$D + (m - this.$W) : m;
777
- if (E === c || E === $) {
778
- var I = this.clone().set(A, 1);
779
- I.$d[S](v), I.init(), this.$d = I.set(A, Math.min(this.$D, I.daysInMonth())).$d;
780
- } else S && this.$d[S](v);
775
+ }, g.$set = function(y, m) {
776
+ var f, h = x.p(y), F = "set" + (this.$u ? "UTC" : ""), S = (f = {}, f[E] = F + "Date", f[v] = F + "Date", f[c] = F + "Month", f[M] = F + "FullYear", f[u] = F + "Hours", f[o] = F + "Minutes", f[e] = F + "Seconds", f[p] = F + "Milliseconds", f)[h], A = h === E ? this.$D + (m - this.$W) : m;
777
+ if (h === c || h === M) {
778
+ var w = this.clone().set(v, 1);
779
+ w.$d[S](A), w.init(), this.$d = w.set(v, Math.min(this.$D, w.daysInMonth())).$d;
780
+ } else S && this.$d[S](A);
781
781
  return this.init(), this;
782
- }, f.set = function(y, m) {
782
+ }, g.set = function(y, m) {
783
783
  return this.clone().$set(y, m);
784
- }, f.get = function(y) {
784
+ }, g.get = function(y) {
785
785
  return this[x.p(y)]();
786
- }, f.add = function(y, m) {
787
- var g, E = this;
786
+ }, g.add = function(y, m) {
787
+ var f, h = this;
788
788
  y = Number(y);
789
- var h = x.p(m), S = function(T) {
790
- var R = D(E);
791
- return x.w(R.date(R.date() + Math.round(T * y)), E);
789
+ var F = x.p(m), S = function(T) {
790
+ var N = L(h);
791
+ return x.w(N.date(N.date() + Math.round(T * y)), h);
792
792
  };
793
- if (h === c) return this.set(c, this.$M + y);
794
- if (h === $) return this.set($, this.$y + y);
795
- if (h === F) return S(1);
796
- if (h === j) return S(7);
797
- var v = (g = {}, g[o] = l, g[C] = r, g[e] = a, g)[h] || 1, I = this.$d.getTime() + y * v;
798
- return x.w(I, this);
799
- }, f.subtract = function(y, m) {
793
+ if (F === c) return this.set(c, this.$M + y);
794
+ if (F === M) return this.set(M, this.$y + y);
795
+ if (F === E) return S(1);
796
+ if (F === b) return S(7);
797
+ var A = (f = {}, f[o] = n, f[u] = i, f[e] = a, f)[F] || 1, w = this.$d.getTime() + y * A;
798
+ return x.w(w, this);
799
+ }, g.subtract = function(y, m) {
800
800
  return this.add(-1 * y, m);
801
- }, f.format = function(y) {
802
- var m = this, g = this.$locale();
803
- if (!this.isValid()) return g.invalidDate || w;
804
- var E = y || "YYYY-MM-DDTHH:mm:ssZ", h = x.z(this), S = this.$H, v = this.$m, I = this.$M, T = g.weekdays, R = g.months, q = g.meridiem, W = function(K, P, X, e3) {
805
- return K && (K[P] || K(m, E)) || X[P].slice(0, e3);
806
- }, J = function(K) {
807
- return x.s(S % 12 || 12, K, "0");
808
- }, Z = q || function(K, P, X) {
809
- var e3 = K < 12 ? "AM" : "PM";
810
- return X ? e3.toLowerCase() : e3;
801
+ }, g.format = function(y) {
802
+ var m = this, f = this.$locale();
803
+ if (!this.isValid()) return f.invalidDate || D;
804
+ var h = y || "YYYY-MM-DDTHH:mm:ssZ", F = x.z(this), S = this.$H, A = this.$m, w = this.$M, T = f.weekdays, N = f.months, G = f.meridiem, W = function(O, H, J, a3) {
805
+ return O && (O[H] || O(m, h)) || J[H].slice(0, a3);
806
+ }, q = function(O) {
807
+ return x.s(S % 12 || 12, O, "0");
808
+ }, Z = G || function(O, H, J) {
809
+ var a3 = O < 12 ? "AM" : "PM";
810
+ return J ? a3.toLowerCase() : a3;
811
811
  };
812
- return E.replace(B, (function(K, P) {
813
- return P || (function(X) {
814
- switch (X) {
812
+ return h.replace(k, (function(O, H) {
813
+ return H || (function(J) {
814
+ switch (J) {
815
815
  case "YY":
816
816
  return String(m.$y).slice(-2);
817
817
  case "YYYY":
818
818
  return x.s(m.$y, 4, "0");
819
819
  case "M":
820
- return I + 1;
820
+ return w + 1;
821
821
  case "MM":
822
- return x.s(I + 1, 2, "0");
822
+ return x.s(w + 1, 2, "0");
823
823
  case "MMM":
824
- return W(g.monthsShort, I, R, 3);
824
+ return W(f.monthsShort, w, N, 3);
825
825
  case "MMMM":
826
- return W(R, I);
826
+ return W(N, w);
827
827
  case "D":
828
828
  return m.$D;
829
829
  case "DD":
@@ -831,9 +831,9 @@ function J2() {
831
831
  case "d":
832
832
  return String(m.$W);
833
833
  case "dd":
834
- return W(g.weekdaysMin, m.$W, T, 2);
834
+ return W(f.weekdaysMin, m.$W, T, 2);
835
835
  case "ddd":
836
- return W(g.weekdaysShort, m.$W, T, 3);
836
+ return W(f.weekdaysShort, m.$W, T, 3);
837
837
  case "dddd":
838
838
  return T[m.$W];
839
839
  case "H":
@@ -841,17 +841,17 @@ function J2() {
841
841
  case "HH":
842
842
  return x.s(S, 2, "0");
843
843
  case "h":
844
- return J(1);
844
+ return q(1);
845
845
  case "hh":
846
- return J(2);
846
+ return q(2);
847
847
  case "a":
848
- return Z(S, v, !0);
848
+ return Z(S, A, !0);
849
849
  case "A":
850
- return Z(S, v, !1);
850
+ return Z(S, A, !1);
851
851
  case "m":
852
- return String(v);
852
+ return String(A);
853
853
  case "mm":
854
- return x.s(v, 2, "0");
854
+ return x.s(A, 2, "0");
855
855
  case "s":
856
856
  return String(m.$s);
857
857
  case "ss":
@@ -859,125 +859,125 @@ function J2() {
859
859
  case "SSS":
860
860
  return x.s(m.$ms, 3, "0");
861
861
  case "Z":
862
- return h;
862
+ return F;
863
863
  }
864
864
  return null;
865
- })(K) || h.replace(":", "");
865
+ })(O) || F.replace(":", "");
866
866
  }));
867
- }, f.utcOffset = function() {
867
+ }, g.utcOffset = function() {
868
868
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
869
- }, f.diff = function(y, m, g) {
870
- var E, h = this, S = x.p(m), v = D(y), I = (v.utcOffset() - this.utcOffset()) * l, T = this - v, R = function() {
871
- return x.m(h, v);
869
+ }, g.diff = function(y, m, f) {
870
+ var h, F = this, S = x.p(m), A = L(y), w = (A.utcOffset() - this.utcOffset()) * n, T = this - A, N = function() {
871
+ return x.m(F, A);
872
872
  };
873
873
  switch (S) {
874
- case $:
875
- E = R() / 12;
874
+ case M:
875
+ h = N() / 12;
876
876
  break;
877
877
  case c:
878
- E = R();
878
+ h = N();
879
879
  break;
880
- case k:
881
- E = R() / 3;
880
+ case B:
881
+ h = N() / 3;
882
882
  break;
883
- case j:
884
- E = (T - I) / 6048e5;
883
+ case b:
884
+ h = (T - w) / 6048e5;
885
885
  break;
886
- case F:
887
- E = (T - I) / 864e5;
886
+ case E:
887
+ h = (T - w) / 864e5;
888
888
  break;
889
- case C:
890
- E = T / r;
889
+ case u:
890
+ h = T / i;
891
891
  break;
892
892
  case o:
893
- E = T / l;
893
+ h = T / n;
894
894
  break;
895
895
  case e:
896
- E = T / a;
896
+ h = T / a;
897
897
  break;
898
898
  default:
899
- E = T;
899
+ h = T;
900
900
  }
901
- return g ? E : x.a(E);
902
- }, f.daysInMonth = function() {
901
+ return f ? h : x.a(h);
902
+ }, g.daysInMonth = function() {
903
903
  return this.endOf(c).$D;
904
- }, f.$locale = function() {
905
- return G[this.$L];
906
- }, f.locale = function(y, m) {
904
+ }, g.$locale = function() {
905
+ return V[this.$L];
906
+ }, g.locale = function(y, m) {
907
907
  if (!y) return this.$L;
908
- var g = this.clone(), E = t3(y, m, !0);
909
- return E && (g.$L = E), g;
910
- }, f.clone = function() {
908
+ var f = this.clone(), h = t3(y, m, !0);
909
+ return h && (f.$L = h), f;
910
+ }, g.clone = function() {
911
911
  return x.w(this.$d, this);
912
- }, f.toDate = function() {
912
+ }, g.toDate = function() {
913
913
  return new Date(this.valueOf());
914
- }, f.toJSON = function() {
914
+ }, g.toJSON = function() {
915
915
  return this.isValid() ? this.toISOString() : null;
916
- }, f.toISOString = function() {
916
+ }, g.toISOString = function() {
917
917
  return this.$d.toISOString();
918
- }, f.toString = function() {
918
+ }, g.toString = function() {
919
919
  return this.$d.toUTCString();
920
- }, u;
921
- })(), s3 = a3.prototype;
922
- return D.prototype = s3, [["$ms", p], ["$s", e], ["$m", o], ["$H", C], ["$W", F], ["$M", c], ["$y", $], ["$D", A]].forEach((function(u) {
923
- s3[u[1]] = function(f) {
924
- return this.$g(f, u[0], u[1]);
920
+ }, C;
921
+ })(), s3 = e3.prototype;
922
+ return L.prototype = s3, [["$ms", p], ["$s", e], ["$m", o], ["$H", u], ["$W", E], ["$M", c], ["$y", M], ["$D", v]].forEach((function(C) {
923
+ s3[C[1]] = function(g) {
924
+ return this.$g(g, C[0], C[1]);
925
925
  };
926
- })), D.extend = function(u, f) {
927
- return u.$i || (u(f, a3, D), u.$i = !0), D;
928
- }, D.locale = t3, D.isDayjs = o3, D.unix = function(u) {
929
- return D(1e3 * u);
930
- }, D.en = G[z], D.Ls = G, D.p = {}, D;
926
+ })), L.extend = function(C, g) {
927
+ return C.$i || (C(g, e3, L), C.$i = !0), L;
928
+ }, L.locale = t3, L.isDayjs = o3, L.unix = function(C) {
929
+ return L(1e3 * C);
930
+ }, L.en = V[Q], L.Ls = V, L.p = {}, L;
931
931
  }));
932
- })(f3)), f3.exports;
932
+ })(g3)), g3.exports;
933
933
  }
934
934
  var X2 = J2();
935
935
  const t2 = /* @__PURE__ */ z3(X2);
936
936
  var m3 = { exports: {} }, Q2 = m3.exports, N3;
937
937
  function t1() {
938
- return N3 || (N3 = 1, (function(n, i) {
939
- (function(a, l) {
940
- n.exports = l();
938
+ return N3 || (N3 = 1, (function(r, s) {
939
+ (function(a, n) {
940
+ r.exports = n();
941
941
  })(Q2, (function() {
942
942
  var a = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" };
943
- return function(l, r, p) {
944
- var e = r.prototype, o = e.format;
945
- p.en.formats = a, e.format = function(C) {
946
- C === void 0 && (C = "YYYY-MM-DDTHH:mm:ssZ");
947
- var F = this.$locale().formats, j = (function(c, k) {
948
- return c.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function($, A, w) {
949
- var d = w && w.toUpperCase();
950
- return A || k[w] || a[w] || k[d].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(B, M, H) {
951
- return M || H.slice(1);
943
+ return function(n, i, p) {
944
+ var e = i.prototype, o = e.format;
945
+ p.en.formats = a, e.format = function(u) {
946
+ u === void 0 && (u = "YYYY-MM-DDTHH:mm:ssZ");
947
+ var E = this.$locale().formats, b = (function(c, B) {
948
+ return c.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function(M, v, D) {
949
+ var d = D && D.toUpperCase();
950
+ return v || B[D] || a[D] || B[d].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(k, I, z) {
951
+ return I || z.slice(1);
952
952
  }));
953
953
  }));
954
- })(C, F === void 0 ? {} : F);
955
- return o.call(this, j);
954
+ })(u, E === void 0 ? {} : E);
955
+ return o.call(this, b);
956
956
  };
957
957
  };
958
958
  }));
959
959
  })(m3)), m3.exports;
960
960
  }
961
- var a1 = t1();
962
- const e1 = /* @__PURE__ */ z3(a1), o1 = ({ data: n, style: i, rank: a, taxon: l }) => {
963
- const r = a.reduce(
961
+ var e1 = t1();
962
+ const a1 = /* @__PURE__ */ z3(e1), o1 = ({ data: r, style: s, rank: a, taxon: n }) => {
963
+ const i = a.reduce(
964
964
  (p, e) => (p[e.value] = e.plural, p),
965
965
  {}
966
966
  );
967
- return /* @__PURE__ */ t.jsxs("div", { style: i, children: [
967
+ return /* @__PURE__ */ t.jsxs("div", { style: s, children: [
968
968
  " ",
969
- n.filter((p) => p.value !== l.name.rank).sort((p, e) => a.indexOf(p.value) - a.indexOf(e.value)).map((p) => /* @__PURE__ */ t.jsx(
970
- L,
969
+ r.filter((p) => p.value !== n.name.rank).sort((p, e) => a.indexOf(p.value) - a.indexOf(e.value)).map((p) => /* @__PURE__ */ t.jsx(
970
+ $,
971
971
  {
972
972
  md: 6,
973
- label: P3(r[p.value] || p.value),
973
+ label: P3(i[p.value] || p.value),
974
974
  classes: { formItem: { borderBottom: "none" } },
975
975
  children: /* @__PURE__ */ t.jsx(
976
976
  p3,
977
977
  {
978
978
  to: "search",
979
979
  args: {
980
- TAXON_ID: l.id,
980
+ TAXON_ID: n.id,
981
981
  rank: p.value,
982
982
  status: ["accepted", "provisionally accepted"]
983
983
  },
@@ -1008,67 +1008,72 @@ const e1 = /* @__PURE__ */ z3(a1), o1 = ({ data: n, style: i, rank: a, taxon: l
1008
1008
  /* @__PURE__ */ t.jsx("div", { style: { textAlign: "center", fontWeight: 800 }, children: /* @__PURE__ */ t.jsx("p", { children: "Sorry, this page does not exist." }) })
1009
1009
  ] })
1010
1010
  }
1011
- ) }), l1 = ({ info: n, datasetKey: i }) => {
1011
+ ) }), l1 = (r) => Object.values(
1012
+ Object.entries(r || {}).reduce((s, [a, n]) => {
1013
+ const i = `${n.datasetKey}:${n.id}`;
1014
+ return s[i] = s[i] || { id: i, src: n, keys: [] }, s[i].keys.push(a), s;
1015
+ }, {})
1016
+ ), s1 = ({ info: r, datasetKey: s }) => {
1012
1017
  var e, o;
1013
- const [a, l] = Q({});
1018
+ const [a, n] = X({});
1014
1019
  C3(() => {
1015
- var C;
1016
- (C = n == null ? void 0 : n.source) != null && C.secondarySources && p();
1017
- }, [n]);
1018
- const r = new h3((C) => R3(C, i)), p = async () => {
1019
- var F;
1020
- const C = {};
1020
+ var u;
1021
+ (u = r == null ? void 0 : r.source) != null && u.secondarySources && p();
1022
+ }, [r]);
1023
+ const i = new h3((u) => R3(u, s)), p = async () => {
1024
+ var E;
1025
+ const u = {};
1021
1026
  try {
1022
1027
  await Promise.all(
1023
- Object.keys(((F = n == null ? void 0 : n.source) == null ? void 0 : F.secondarySources) || {}).map(
1024
- (j) => {
1028
+ Object.keys(((E = r == null ? void 0 : r.source) == null ? void 0 : E.secondarySources) || {}).map(
1029
+ (b) => {
1025
1030
  var c;
1026
- return r.load((c = n == null ? void 0 : n.source) == null ? void 0 : c.secondarySources[j].datasetKey).then((k) => {
1027
- C[k.key] = k;
1031
+ return i.load((c = r == null ? void 0 : r.source) == null ? void 0 : c.secondarySources[b].datasetKey).then((B) => {
1032
+ u[B.key] = B;
1028
1033
  });
1029
1034
  }
1030
1035
  )
1031
1036
  );
1032
- } catch (j) {
1033
- console.log(j);
1037
+ } catch (b) {
1038
+ console.log(b);
1034
1039
  }
1035
- l(C);
1040
+ n(u);
1036
1041
  };
1037
- return (e = n == null ? void 0 : n.source) != null && e.secondarySources ? Object.keys(((o = n == null ? void 0 : n.source) == null ? void 0 : o.secondarySources) || {}).map((C) => {
1038
- var F, j, c, k, $, A, w, d, B, M, H, N, z;
1042
+ return (e = r == null ? void 0 : r.source) != null && e.secondarySources ? l1((o = r == null ? void 0 : r.source) == null ? void 0 : o.secondarySources).map(({ id: u, src: E, keys: b }) => {
1043
+ var c;
1039
1044
  return /* @__PURE__ */ t.jsxs(n3.Fragment, { children: [
1040
- P3(C),
1045
+ b.map((B) => P3(B)).join(", "),
1041
1046
  ":",
1042
1047
  " ",
1043
1048
  /* @__PURE__ */ t.jsx(
1044
1049
  "a",
1045
1050
  {
1046
- href: `https://www.checklistbank.org/dataset/${(c = (j = (F = n == null ? void 0 : n.source) == null ? void 0 : F.secondarySources) == null ? void 0 : j[C]) == null ? void 0 : c.datasetKey}/taxon/${encodeURIComponent((A = ($ = (k = n == null ? void 0 : n.source) == null ? void 0 : k.secondarySources) == null ? void 0 : $[C]) == null ? void 0 : A.id)}`,
1047
- children: ((M = a[(B = (d = (w = n == null ? void 0 : n.source) == null ? void 0 : w.secondarySources) == null ? void 0 : d[C]) == null ? void 0 : B.datasetKey]) == null ? void 0 : M.title) || ((z = (N = (H = n == null ? void 0 : n.source) == null ? void 0 : H.secondarySources) == null ? void 0 : N[C]) == null ? void 0 : z.datasetKey)
1051
+ href: `https://www.checklistbank.org/dataset/${E.datasetKey}/taxon/${encodeURIComponent(E.id)}`,
1052
+ children: ((c = a[E.datasetKey]) == null ? void 0 : c.title) || E.datasetKey
1048
1053
  }
1049
1054
  )
1050
- ] }, C);
1055
+ ] }, u);
1051
1056
  }) : null;
1052
1057
  };
1053
- g2.config({
1058
+ f2.config({
1054
1059
  getContainer: () => document.getElementsByClassName("catalogue-of-life")[0]
1055
1060
  });
1056
- const s1 = (n) => {
1057
- var i, a;
1058
- return ((a = (i = n == null ? void 0 : n.response) == null ? void 0 : i.data) == null ? void 0 : a.message) || (n == null ? void 0 : n.message) || "An error occurred";
1059
- }, i1 = ({ error: n }) => /* @__PURE__ */ t.jsx("div", { style: { margin: "6px" }, children: /* @__PURE__ */ t.jsx("span", { children: s1(n) }) }), p1 = ({ datasetKey: n, taxonKey: i }) => {
1060
- const [a] = y3.useForm(), [l, r] = Q(!1), [p, e] = Q(!1), [o, C] = Q(null), [F, j] = Q(null), c = ({ errorFields: A }) => {
1061
- a.scrollToField(A[0].name);
1062
- }, k = (A) => {
1061
+ const i1 = (r) => {
1062
+ var s, a;
1063
+ return ((a = (s = r == null ? void 0 : r.response) == null ? void 0 : s.data) == null ? void 0 : a.message) || (r == null ? void 0 : r.message) || "An error occurred";
1064
+ }, p1 = ({ error: r }) => /* @__PURE__ */ t.jsx("div", { style: { margin: "6px" }, children: /* @__PURE__ */ t.jsx("span", { children: i1(r) }) }), d1 = ({ datasetKey: r, taxonKey: s }) => {
1065
+ const [a] = y3.useForm(), [n, i] = X(!1), [p, e] = X(!1), [o, u] = X(null), [E, b] = X(null), c = ({ errorFields: v }) => {
1066
+ a.scrollToField(v[0].name);
1067
+ }, B = (v) => {
1063
1068
  i2.post(
1064
- `${Y.dataApi}dataset/${n}/nameusage/${i}/feedback`,
1065
- A
1066
- ).then((w) => {
1067
- console.log(w), r(!1), j(w.data);
1068
- }).catch((w) => {
1069
- r(!1), C(w);
1069
+ `${R.dataApi}dataset/${r}/nameusage/${s}/feedback`,
1070
+ v
1071
+ ).then((D) => {
1072
+ console.log(D), i(!1), b(D.data);
1073
+ }).catch((D) => {
1074
+ i(!1), u(D);
1070
1075
  });
1071
- }, $ = {
1076
+ }, M = {
1072
1077
  labelCol: {
1073
1078
  span: 6
1074
1079
  },
@@ -1078,49 +1083,49 @@ const s1 = (n) => {
1078
1083
  };
1079
1084
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1080
1085
  /* @__PURE__ */ t.jsxs(
1081
- f2,
1086
+ g2,
1082
1087
  {
1083
1088
  getContainer: ".catalogue-of-life",
1084
1089
  title: "Feedback",
1085
1090
  open: p,
1086
1091
  destroyOnClose: !0,
1087
1092
  onOk: () => {
1088
- if (F) {
1089
- e(!1), j(null);
1093
+ if (E) {
1094
+ e(!1), b(null);
1090
1095
  return;
1091
1096
  } else
1092
- r(!0), a.validateFields().then((A) => (a.resetFields(), k(A)));
1097
+ i(!0), a.validateFields().then((v) => (a.resetFields(), B(v)));
1093
1098
  },
1094
1099
  onCancel: () => e(!1),
1095
- confirmLoading: l,
1100
+ confirmLoading: n,
1096
1101
  children: [
1097
1102
  o && /* @__PURE__ */ t.jsx(
1098
1103
  i3,
1099
1104
  {
1100
1105
  style: { marginBottom: "10px" },
1101
- message: /* @__PURE__ */ t.jsx(i1, { error: o }),
1106
+ message: /* @__PURE__ */ t.jsx(p1, { error: o }),
1102
1107
  type: "error",
1103
- onClose: () => C(null),
1108
+ onClose: () => u(null),
1104
1109
  closable: !0
1105
1110
  }
1106
1111
  ),
1107
- F && /* @__PURE__ */ t.jsxs("p", { children: [
1112
+ E && /* @__PURE__ */ t.jsxs("p", { children: [
1108
1113
  "Thank you, your feedback was saved. You can follow for progress and further discussion ",
1109
- /* @__PURE__ */ t.jsx("a", { target: "_blank", href: F, children: "here." })
1114
+ /* @__PURE__ */ t.jsx("a", { target: "_blank", href: E, children: "here." })
1110
1115
  ] }),
1111
- !F && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1116
+ !E && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1112
1117
  " ",
1113
1118
  /* @__PURE__ */ t.jsxs("p", { children: [
1114
1119
  "We will create a ",
1115
1120
  /* @__PURE__ */ t.jsx("a", { href: "https://github.com/CatalogueofLife/data/issues", target: "_blank", children: "github issue" }),
1116
1121
  " which you can monitor or use to further discuss with us."
1117
1122
  ] }),
1118
- /* @__PURE__ */ t.jsx(m2, { spinning: l, children: /* @__PURE__ */ t.jsxs(
1123
+ /* @__PURE__ */ t.jsx(m2, { spinning: n, children: /* @__PURE__ */ t.jsxs(
1119
1124
  y3,
1120
1125
  {
1121
- ...$,
1126
+ ...M,
1122
1127
  form: a,
1123
- onFinish: k,
1128
+ onFinish: B,
1124
1129
  onFinishFailed: c,
1125
1130
  children: [
1126
1131
  /* @__PURE__ */ t.jsx(y3.Item, { name: "message", label: "Message", rules: [{ required: !0 }], children: /* @__PURE__ */ t.jsx(w3.TextArea, { rows: 8 }) }),
@@ -1145,11 +1150,11 @@ const s1 = (n) => {
1145
1150
  }
1146
1151
  ),
1147
1152
  /* @__PURE__ */ t.jsxs(d3, { children: [
1148
- /* @__PURE__ */ t.jsx(V, { flex: "auto" }),
1149
- /* @__PURE__ */ t.jsx(V, {}),
1150
- /* @__PURE__ */ t.jsxs(M3, { href: `https://www.checklistbank.org/dataset/${n}/download?taxonID=${i}`, style: { marginTop: "12px", marginRight: "4px" }, size: "small", children: [
1153
+ /* @__PURE__ */ t.jsx(U, { flex: "auto" }),
1154
+ /* @__PURE__ */ t.jsx(U, {}),
1155
+ /* @__PURE__ */ t.jsxs(M3, { href: `https://www.checklistbank.org/dataset/${r}/download?taxonID=${s}`, style: { marginTop: "12px", marginRight: "4px" }, size: "small", children: [
1151
1156
  "Download ",
1152
- /* @__PURE__ */ t.jsx(b3, {})
1157
+ /* @__PURE__ */ t.jsx(A3, {})
1153
1158
  ] }),
1154
1159
  /* @__PURE__ */ t.jsxs(M3, { style: { marginTop: "12px" }, size: "small", onClick: () => e(!0), children: [
1155
1160
  "Feedback ",
@@ -1158,16 +1163,16 @@ const s1 = (n) => {
1158
1163
  ] })
1159
1164
  ] });
1160
1165
  };
1161
- t2.extend(e1);
1162
- const b = 5, d1 = ({ source: n }) => /* @__PURE__ */ t.jsx(
1166
+ t2.extend(a1);
1167
+ const j = 5, c1 = ({ source: r }) => /* @__PURE__ */ t.jsx(
1163
1168
  "span",
1164
1169
  {
1165
1170
  dangerouslySetInnerHTML: {
1166
- __html: A3.sanitize(b2.parse(n))
1171
+ __html: b3.sanitize(A2.parse(r))
1167
1172
  }
1168
1173
  }
1169
1174
  );
1170
- class a2 extends n3.Component {
1175
+ class e2 extends n3.Component {
1171
1176
  constructor(a) {
1172
1177
  super(a);
1173
1178
  _(this, "componentDidMount", () => {
@@ -1176,9 +1181,9 @@ class a2 extends n3.Component {
1176
1181
  });
1177
1182
  _(this, "getCatalogue", () => {
1178
1183
  const { datasetKey: a } = this.props;
1179
- U(`${Y.dataApi}dataset/${a}`).then((l) => {
1180
- this.setState({ catalogue: l.data });
1181
- }).catch((l) => {
1184
+ P(`${R.dataApi}dataset/${a}`).then((n) => {
1185
+ this.setState({ catalogue: n.data });
1186
+ }).catch((n) => {
1182
1187
  });
1183
1188
  });
1184
1189
  _(this, "datasetLoader", new h3(
@@ -1188,14 +1193,14 @@ class a2 extends n3.Component {
1188
1193
  (a) => s2(a, this.props.datasetKey)
1189
1194
  ));
1190
1195
  _(this, "decorateWithSectorsAndDataset", async (a) => {
1191
- const { datasetKey: l } = this.props, r = {};
1196
+ const { datasetKey: n } = this.props, i = {};
1192
1197
  for (const p of ["misapplied", "heterotypic", "homotypic"].filter(
1193
1198
  (e) => !!a[e]
1194
1199
  ))
1195
1200
  await Promise.allSettled(
1196
1201
  a[p].filter((e) => !!e.sectorKey).map(
1197
- (e) => this.sectorLoader.load(e.sectorKey, l).then((o) => (e.sector = o, this.datasetLoader.load(o.subjectDatasetKey).then((C) => {
1198
- e.sourceDatasetKey = C.key, r[C.key] = C;
1202
+ (e) => this.sectorLoader.load(e.sectorKey, n).then((o) => (e.sector = o, this.datasetLoader.load(o.subjectDatasetKey).then((u) => {
1203
+ e.sourceDatasetKey = u.key, i[u.key] = u;
1199
1204
  })))
1200
1205
  )
1201
1206
  );
@@ -1203,106 +1208,114 @@ class a2 extends n3.Component {
1203
1208
  for (const p of a == null ? void 0 : a.heterotypicGroups)
1204
1209
  await Promise.allSettled(
1205
1210
  p.filter((e) => !!e.sectorKey).map(
1206
- (e) => this.sectorLoader.load(e.sectorKey, l).then((o) => (e.sector = o, this.datasetLoader.load(o.subjectDatasetKey).then((C) => {
1207
- e.sourceDatasetKey = C.key, r[C.key] = C;
1211
+ (e) => this.sectorLoader.load(e.sectorKey, n).then((o) => (e.sector = o, this.datasetLoader.load(o.subjectDatasetKey).then((u) => {
1212
+ e.sourceDatasetKey = u.key, i[u.key] = u;
1208
1213
  })))
1209
1214
  )
1210
1215
  );
1211
- return Object.keys(r).length > 0 ? r : null;
1216
+ return Object.keys(i).length > 0 ? i : null;
1212
1217
  });
1213
1218
  _(this, "getInfo", async (a) => {
1214
- var p, e, o, C, F, j;
1215
- const { datasetKey: l, pageTitleTemplate: r } = this.props;
1219
+ var p, e, o, u, E, b;
1220
+ const { datasetKey: n, pageTitleTemplate: i } = this.props;
1216
1221
  try {
1217
- const c = await U(
1218
- `${Y.dataApi}dataset/${l}/taxon/${a}/info`
1219
- ), k = s(c, "data.usage");
1220
- r && s(k, "label") && (document.title = r.replace("__taxon__", k.label));
1221
- const $ = s(k, "name.publishedInId");
1222
- if ($ && k.name) {
1223
- const d = s(c, "data.references") && c.data.references[$];
1222
+ const c = await P(
1223
+ `${R.dataApi}dataset/${n}/taxon/${a}/info`
1224
+ ), B = l(c, "data.usage");
1225
+ i && l(B, "label") && (document.title = i.replace("__taxon__", B.label));
1226
+ const M = l(B, "name.publishedInId");
1227
+ if (M && B.name) {
1228
+ const d = l(c, "data.references") && c.data.references[M];
1224
1229
  if (d)
1225
- k.name.publishedIn = d;
1230
+ B.name.publishedIn = d;
1226
1231
  else
1227
1232
  try {
1228
- const B = await U(
1229
- `${Y.dataApi}dataset/${l}/reference/${$}`
1233
+ const k = await P(
1234
+ `${R.dataApi}dataset/${n}/reference/${M}`
1230
1235
  );
1231
- k.name.publishedIn = B.data;
1236
+ B.name.publishedIn = k.data;
1232
1237
  } catch {
1233
1238
  }
1234
1239
  }
1235
- s(k, "sectorKey") && U(
1236
- `${Y.dataApi}dataset/${l}/sector/${s(k, "sectorKey")}`
1240
+ l(B, "sectorKey") && P(
1241
+ `${R.dataApi}dataset/${n}/sector/${l(B, "sectorKey")}`
1237
1242
  ).then((d) => {
1238
- const B = s(d, "data.subjectDatasetKey");
1239
- U(
1240
- `${Y.dataApi}dataset/${l}/logo/source/${B}`
1243
+ const k = l(d, "data.subjectDatasetKey");
1244
+ P(
1245
+ `${R.dataApi}dataset/${n}/logo/source/${k}`
1241
1246
  ).then(() => {
1242
1247
  this.setState({
1243
- logoUrl: `${Y.dataApi}dataset/${l}/logo/source/${B}?size=MEDIUM`
1248
+ logoUrl: `${R.dataApi}dataset/${n}/logo/source/${k}?size=MEDIUM`
1244
1249
  });
1245
1250
  }).catch(() => {
1246
- }), U(
1247
- `${Y.dataApi}dataset/${l}/source/${B}`
1248
- ).then((M) => {
1249
- this.setState({ sourceDataset: M.data });
1251
+ }), P(
1252
+ `${R.dataApi}dataset/${n}/source/${k}`
1253
+ ).then((I) => {
1254
+ this.setState({ sourceDataset: I.data });
1250
1255
  });
1251
1256
  });
1252
- let A = {};
1253
- s(c, "data.references") && (Object.keys(c.data.references).forEach((d, B) => {
1254
- A[d] = (B + 1).toString();
1257
+ let v = {};
1258
+ l(c, "data.references") && (Object.keys(c.data.references).forEach((d, k) => {
1259
+ v[d] = (k + 1).toString();
1255
1260
  }), await Promise.allSettled(
1256
1261
  Object.keys(c.data.references).map((d) => c.data.references[d]).filter((d) => !!d.sectorKey).map(
1257
- (d) => this.sectorLoader.load(d.sectorKey).then((B) => (d.sector = B, this.datasetLoader.load(B.subjectDatasetKey).then((M) => {
1258
- d.sourceDataset = M;
1262
+ (d) => this.sectorLoader.load(d.sectorKey).then((k) => (d.sector = k, this.datasetLoader.load(k.subjectDatasetKey).then((I) => {
1263
+ d.sourceDataset = I;
1259
1264
  })))
1260
1265
  )
1261
1266
  )), (p = c == null ? void 0 : c.data) != null && p.vernacularNames && await Promise.allSettled(
1262
1267
  c.data.vernacularNames.filter((d) => !!d.sectorKey).map(
1263
- (d) => this.sectorLoader.load(d.sectorKey).then((B) => {
1264
- d.sector = B, d.sourceDatasetKey = B.subjectDatasetKey;
1268
+ (d) => this.sectorLoader.load(d.sectorKey).then((k) => {
1269
+ d.sector = k, d.sourceDatasetKey = k.subjectDatasetKey;
1265
1270
  })
1266
1271
  )
1267
1272
  ), (e = c == null ? void 0 : c.data) != null && e.distributions && await Promise.allSettled(
1268
1273
  c.data.distributions.filter((d) => !!d.sectorKey).map(
1269
- (d) => this.sectorLoader.load(d.sectorKey).then((B) => {
1270
- d.sector = B, d.sourceDatasetKey = B.subjectDatasetKey;
1274
+ (d) => this.sectorLoader.load(d.sectorKey).then((k) => {
1275
+ d.sector = k, d.sourceDatasetKey = k.subjectDatasetKey;
1271
1276
  })
1272
1277
  )
1273
1278
  );
1274
- let w = s(c, "data.synonyms") ? await this.decorateWithSectorsAndDataset(s(c, "data.synonyms")) : null;
1275
- (o = c == null ? void 0 : c.data) != null && o.nameRelations && ((C = c == null ? void 0 : c.data) != null && C.names) && ((F = c == null ? void 0 : c.data) == null || F.nameRelations.forEach((d) => {
1276
- var B, M, H, N;
1277
- d.relatedName = (M = (B = c == null ? void 0 : c.data) == null ? void 0 : B.names) == null ? void 0 : M[d == null ? void 0 : d.relatedNameId], d.name = (N = (H = c == null ? void 0 : c.data) == null ? void 0 : H.names) == null ? void 0 : N[d == null ? void 0 : d.nameId];
1279
+ let D = l(c, "data.synonyms") ? await this.decorateWithSectorsAndDataset(l(c, "data.synonyms")) : null;
1280
+ (o = c == null ? void 0 : c.data) != null && o.nameRelations && ((u = c == null ? void 0 : c.data) != null && u.names) && ((E = c == null ? void 0 : c.data) == null || E.nameRelations.forEach((d) => {
1281
+ var k, I, z, Y;
1282
+ d.relatedName = (I = (k = c == null ? void 0 : c.data) == null ? void 0 : k.names) == null ? void 0 : I[d == null ? void 0 : d.relatedNameId], d.name = (Y = (z = c == null ? void 0 : c.data) == null ? void 0 : z.names) == null ? void 0 : Y[d == null ? void 0 : d.nameId];
1278
1283
  })), this.setState({
1279
1284
  infoLoading: !1,
1280
1285
  info: c.data,
1281
- taxon: k,
1282
- classification: (j = c == null ? void 0 : c.data) == null ? void 0 : j.classification,
1286
+ taxon: B,
1287
+ classification: (b = c == null ? void 0 : c.data) == null ? void 0 : b.classification,
1283
1288
  infoError: null,
1284
- referenceIndexMap: A,
1285
- sourceDatasetKeyMap: w
1289
+ referenceIndexMap: v,
1290
+ sourceDatasetKeyMap: D
1286
1291
  });
1287
1292
  } catch (c) {
1288
- s(c, "response.status") === 404 ? this.setState({ infoLoading: !1, info: null, taxon: null, status: 404 }) : this.setState({ infoLoading: !1, infoError: c, info: null });
1293
+ l(c, "response.status") === 404 ? this.setState({ infoLoading: !1, info: null, taxon: null, status: 404 }) : this.setState({ infoLoading: !1, infoError: c, info: null });
1289
1294
  }
1290
1295
  });
1291
1296
  _(this, "getRank", () => {
1292
- U(`${Y.dataApi}vocab/rank`).then(
1293
- (a) => this.setState({ rank: a.data.map((l) => l.name) })
1297
+ P(`${R.dataApi}vocab/rank`).then(
1298
+ (a) => this.setState({ rank: a.data.map((n) => n.name) })
1294
1299
  );
1295
1300
  });
1301
+ // Accepted descendants by rank. Read from the taxon metrics, a single row
1302
+ // lookup; only datasets without metrics (projects) fall back to a rank
1303
+ // facet search, which costs elasticsearch a lot more.
1296
1304
  _(this, "getIncludes", (a) => {
1297
- const { datasetKey: l } = this.props;
1298
- U(
1299
- `${Y.dataApi}dataset/${l}/nameusage/search?TAXON_ID=${a}&facet=rank&status=accepted&status=provisionally%20accepted&limit=0`
1300
- ).then((r) => {
1301
- this.setState({
1302
- includesLoading: !1,
1303
- includes: s(r, "data.facets.rank") || []
1304
- });
1305
- }).catch((r) => {
1305
+ const { datasetKey: n } = this.props, i = `${R.dataApi}dataset/${n}`;
1306
+ P(`${i}/taxon/${encodeURIComponent(a)}/metrics`).then(
1307
+ (p) => Object.entries(l(p, "data.taxaByRankCount") || {}).map(
1308
+ ([e, o]) => ({ value: e, count: o })
1309
+ )
1310
+ ).catch(
1311
+ () => P(
1312
+ `${i}/nameusage/search?TAXON_ID=${encodeURIComponent(
1313
+ a
1314
+ )}&facet=rank&facetLimit=500&status=accepted&status=provisionally%20accepted&limit=0`
1315
+ ).then((p) => l(p, "data.facets.rank") || [])
1316
+ ).then((p) => {
1317
+ this.setState({ includesLoading: !1, includes: p });
1318
+ }).catch((p) => {
1306
1319
  this.setState({
1307
1320
  includesLoading: !1,
1308
1321
  includes: []
@@ -1331,37 +1344,37 @@ class a2 extends n3.Component {
1331
1344
  }
1332
1345
  componentDidUpdate(a) {
1333
1346
  if (a.taxonKey !== this.props.taxonKey && this.props.taxonKey) {
1334
- const l = this.props.taxonKey;
1335
- this.getInfo(l), this.getRank(l), this.getIncludes(l);
1347
+ const n = this.props.taxonKey;
1348
+ this.getInfo(n), this.getRank(n), this.getIncludes(n);
1336
1349
  }
1337
1350
  }
1338
1351
  render() {
1339
- var o3, t3, D, x, a3, s3, u, f, y, m, g, E, h, S, v, I, T, R, q, W, J, Z, K, P, X, e3, v3, L3, $3;
1352
+ var o3, t3, L, x, e3, s3, C, g, y, m, f, h, F, S, A, w, T, N, G, W, q, Z, O, H, J, a3, $3, v3, L3;
1340
1353
  const {
1341
1354
  datasetKey: a,
1342
- showDistributionMap: l,
1343
- gbifChecklistKey: r,
1355
+ showDistributionMap: n,
1356
+ gbifChecklistKey: i,
1344
1357
  basemapStyle: p
1345
1358
  } = this.props, {
1346
1359
  taxon: e,
1347
1360
  info: o,
1348
- classification: C,
1349
- sourceDataset: F,
1350
- includes: j,
1361
+ classification: u,
1362
+ sourceDataset: E,
1363
+ includes: b,
1351
1364
  rank: c,
1352
- taxonError: k,
1353
- synonymsError: $,
1354
- classificationError: A,
1355
- infoError: w,
1365
+ taxonError: B,
1366
+ synonymsError: M,
1367
+ classificationError: v,
1368
+ infoError: D,
1356
1369
  status: d,
1357
- catalogue: B,
1358
- referenceIndexMap: M
1359
- } = this.state, H = c ? c.indexOf("genus") : -1, N = ["synonym", "ambiguous synonym", "misapplied"].includes(
1360
- s(e, "status")
1361
- ), z = s(o, "synonyms.homotypic", []), G = s(o, "synonyms.heterotypic", []), c3 = s(o, "synonyms.misapplied", []);
1370
+ catalogue: k,
1371
+ referenceIndexMap: I
1372
+ } = this.state, z = c ? c.indexOf("genus") : -1, Y = ["synonym", "ambiguous synonym", "misapplied"].includes(
1373
+ l(e, "status")
1374
+ ), Q = l(o, "synonyms.homotypic", []), V = l(o, "synonyms.heterotypic", []), c3 = l(o, "synonyms.misapplied", []);
1362
1375
  return [
1363
- ...z.map((O) => ({ ...O, __homotypic: !0 })),
1364
- ...G
1376
+ ...Q.map((K) => ({ ...K, __homotypic: !0 })),
1377
+ ...V
1365
1378
  ], d === 404 ? /* @__PURE__ */ t.jsx(r1, {}) : /* @__PURE__ */ t.jsx(n3.Fragment, { children: /* @__PURE__ */ t.jsxs(
1366
1379
  "div",
1367
1380
  {
@@ -1373,18 +1386,18 @@ class a2 extends n3.Component {
1373
1386
  fontSize: "12px"
1374
1387
  },
1375
1388
  children: [
1376
- k && /* @__PURE__ */ t.jsx(i3, { message: /* @__PURE__ */ t.jsx(g3, { error: k }), type: "error" }),
1389
+ B && /* @__PURE__ */ t.jsx(i3, { message: /* @__PURE__ */ t.jsx(f3, { error: B }), type: "error" }),
1377
1390
  e && /* @__PURE__ */ t.jsxs(d3, { align: "bottom", children: [
1378
- /* @__PURE__ */ t.jsx(V, { flex: "auto", children: /* @__PURE__ */ t.jsxs("div", { style: { marginLeft: (o3 = o == null ? void 0 : o.usage) != null && o3.merged ? "-22px" : 0 }, children: [
1391
+ /* @__PURE__ */ t.jsx(U, { flex: "auto", children: /* @__PURE__ */ t.jsxs("div", { style: { marginLeft: (o3 = o == null ? void 0 : o.usage) != null && o3.merged ? "-22px" : 0 }, children: [
1379
1392
  ((t3 = o == null ? void 0 : o.usage) == null ? void 0 : t3.merged) && /* @__PURE__ */ t.jsx(
1380
1393
  I3,
1381
1394
  {
1382
1395
  style: { marginBottom: "10px" },
1383
- createdBy: (D = o == null ? void 0 : o.usage) == null ? void 0 : D.createdBy,
1396
+ createdBy: (L = o == null ? void 0 : o.usage) == null ? void 0 : L.createdBy,
1384
1397
  datasetKey: (x = o == null ? void 0 : o.usage) == null ? void 0 : x.datasetKey,
1385
- verbatimSourceKey: (a3 = o == null ? void 0 : o.usage) == null ? void 0 : a3.verbatimSourceKey,
1398
+ verbatimSourceKey: (e3 = o == null ? void 0 : o.usage) == null ? void 0 : e3.verbatimSourceKey,
1386
1399
  sourceDatasetKey: (s3 = o == null ? void 0 : o.source) == null ? void 0 : s3.sourceDatasetKey,
1387
- sourceId: (u = o == null ? void 0 : o.source) == null ? void 0 : u.sourceId
1400
+ sourceId: (C = o == null ? void 0 : o.source) == null ? void 0 : C.sourceId
1388
1401
  }
1389
1402
  ),
1390
1403
  /* @__PURE__ */ t.jsx(
@@ -1403,11 +1416,11 @@ class a2 extends n3.Component {
1403
1416
  }
1404
1417
  )
1405
1418
  ] }) }),
1406
- /* @__PURE__ */ t.jsxs(V, { span: 1, children: [
1419
+ /* @__PURE__ */ t.jsxs(U, { span: 1, children: [
1407
1420
  /* @__PURE__ */ t.jsx("a", { href: "" }),
1408
1421
  e.provisional && /* @__PURE__ */ t.jsx(u3, { color: "red", children: "Provisional" })
1409
1422
  ] }),
1410
- F && /* @__PURE__ */ t.jsx(V, { span: 5, style: { textAlign: "right" }, children: /* @__PURE__ */ t.jsx(
1423
+ E && /* @__PURE__ */ t.jsx(U, { span: 5, style: { textAlign: "right" }, children: /* @__PURE__ */ t.jsx(
1411
1424
  j2,
1412
1425
  {
1413
1426
  auth: this.props.auth,
@@ -1417,11 +1430,11 @@ class a2 extends n3.Component {
1417
1430
  marginRight: "8px"
1418
1431
  },
1419
1432
  datasetKey: a,
1420
- sourceDatasetKey: F.key
1433
+ sourceDatasetKey: E.key
1421
1434
  }
1422
1435
  ) })
1423
1436
  ] }),
1424
- N && s(e, "accepted.id") && /* @__PURE__ */ t.jsxs(
1437
+ Y && l(e, "accepted.id") && /* @__PURE__ */ t.jsxs(
1425
1438
  "div",
1426
1439
  {
1427
1440
  style: {
@@ -1431,33 +1444,33 @@ class a2 extends n3.Component {
1431
1444
  fontSize: "16px"
1432
1445
  },
1433
1446
  children: [
1434
- s(e, "status"),
1447
+ l(e, "status"),
1435
1448
  " ",
1436
- s(e, "status") === "misapplied" ? "to" : "of",
1449
+ l(e, "status") === "misapplied" ? "to" : "of",
1437
1450
  " ",
1438
- /* @__PURE__ */ t.jsx(p3, { to: "taxon", args: s(e, "accepted.id"), children: /* @__PURE__ */ t.jsx(
1451
+ /* @__PURE__ */ t.jsx(p3, { to: "taxon", args: l(e, "accepted.id"), children: /* @__PURE__ */ t.jsx(
1439
1452
  "span",
1440
1453
  {
1441
1454
  dangerouslySetInnerHTML: {
1442
- __html: s(e, "accepted.labelHtml")
1455
+ __html: l(e, "accepted.labelHtml")
1443
1456
  }
1444
1457
  }
1445
1458
  ) })
1446
1459
  ]
1447
1460
  }
1448
1461
  ),
1449
- s(e, "id") && /* @__PURE__ */ t.jsxs(
1450
- L,
1462
+ l(e, "id") && /* @__PURE__ */ t.jsxs(
1463
+ $,
1451
1464
  {
1452
- md: b,
1453
- label: s(this.props, "identifierLabel", "Identifier"),
1465
+ md: j,
1466
+ label: l(this.props, "identifierLabel", "Identifier"),
1454
1467
  children: [
1455
- s(e, "id"),
1468
+ l(e, "id"),
1456
1469
  " ",
1457
1470
  /* @__PURE__ */ t.jsx(
1458
1471
  "a",
1459
1472
  {
1460
- href: `https://www.checklistbank.org/dataset/${a}/taxon/${s(
1473
+ href: `https://www.checklistbank.org/dataset/${a}/taxon/${l(
1461
1474
  e,
1462
1475
  "id"
1463
1476
  )}`,
@@ -1468,18 +1481,18 @@ class a2 extends n3.Component {
1468
1481
  F3,
1469
1482
  {
1470
1483
  title: "Download data for this taxon and descendants",
1471
- getPopupContainer: () => document.getElementById(`col-download-${s(e, "id")}`) || document.body,
1484
+ getPopupContainer: () => document.getElementById(`col-download-${l(e, "id")}`) || document.body,
1472
1485
  children: /* @__PURE__ */ t.jsx(
1473
1486
  "a",
1474
1487
  {
1475
1488
  style: { marginLeft: "5px" },
1476
- id: `col-download-${s(e, "id")}`,
1489
+ id: `col-download-${l(e, "id")}`,
1477
1490
  target: "_blank",
1478
- href: `http://checklistbank.org/dataset/${a}/download?taxonID=${encodeURIComponent(s(
1491
+ href: `http://checklistbank.org/dataset/${a}/download?taxonID=${encodeURIComponent(l(
1479
1492
  e,
1480
1493
  "id"
1481
1494
  ))}`,
1482
- children: /* @__PURE__ */ t.jsx(b3, {})
1495
+ children: /* @__PURE__ */ t.jsx(A3, {})
1483
1496
  }
1484
1497
  )
1485
1498
  }
@@ -1487,8 +1500,8 @@ class a2 extends n3.Component {
1487
1500
  ]
1488
1501
  }
1489
1502
  ),
1490
- Array.isArray(s(e, "identifier")) && s(e, "identifier").length > 0 && /* @__PURE__ */ t.jsx(L, { md: b, label: "Other identifiers", children: /* @__PURE__ */ t.jsx(G2, { identifiers: s(e, "identifier") }) }),
1491
- s(e, "labelHtml") && /* @__PURE__ */ t.jsx(L, { md: b, label: "Name", children: /* @__PURE__ */ t.jsx(
1503
+ Array.isArray(l(e, "identifier")) && l(e, "identifier").length > 0 && /* @__PURE__ */ t.jsx($, { md: j, label: "Other identifiers", children: /* @__PURE__ */ t.jsx(G2, { identifiers: l(e, "identifier") }) }),
1504
+ l(e, "labelHtml") && /* @__PURE__ */ t.jsx($, { md: j, label: "Name", children: /* @__PURE__ */ t.jsx(
1492
1505
  "span",
1493
1506
  {
1494
1507
  dangerouslySetInnerHTML: {
@@ -1496,12 +1509,12 @@ class a2 extends n3.Component {
1496
1509
  }
1497
1510
  }
1498
1511
  ) }),
1499
- s(e, "name.publishedIn.citation") && /* @__PURE__ */ t.jsxs(L, { md: b, label: "Published in", children: [
1500
- s(o, "source.secondarySources['published in']") && /* @__PURE__ */ t.jsx(
1512
+ l(e, "name.publishedIn.citation") && /* @__PURE__ */ t.jsxs($, { md: j, label: "Published in", children: [
1513
+ l(o, "source.secondarySources['published in']") && /* @__PURE__ */ t.jsx(
1501
1514
  I3,
1502
1515
  {
1503
- sourceDatasetKey: s(o, "source.secondarySources['published in'].datasetKey"),
1504
- sourceId: s(o, "source.secondarySources['published in'].id")
1516
+ sourceDatasetKey: l(o, "source.secondarySources['published in'].datasetKey"),
1517
+ sourceId: l(o, "source.secondarySources['published in'].id")
1505
1518
  }
1506
1519
  ),
1507
1520
  /* @__PURE__ */ t.jsxs("span", { className: "col-published-in", children: [
@@ -1510,17 +1523,17 @@ class a2 extends n3.Component {
1510
1523
  {
1511
1524
  dangerouslySetInnerHTML: {
1512
1525
  __html: E3(
1513
- A3.sanitize(s(e, "name.publishedIn.citation"))
1526
+ b3.sanitize(l(e, "name.publishedIn.citation"))
1514
1527
  )
1515
1528
  }
1516
1529
  }
1517
1530
  ),
1518
- /* @__PURE__ */ t.jsx(Z3, { reference: s(e, "name.publishedIn") })
1531
+ /* @__PURE__ */ t.jsx(Z3, { reference: l(e, "name.publishedIn") })
1519
1532
  ] })
1520
1533
  ] }),
1521
- s(e, "status") && /* @__PURE__ */ t.jsxs(L, { md: b, label: "Checklist status", children: [
1522
- `${s(e, "status")} ${s(e, "name.rank")}`,
1523
- ((f = o == null ? void 0 : o.decisions) == null ? void 0 : f[e == null ? void 0 : e.id]) && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1534
+ l(e, "status") && /* @__PURE__ */ t.jsxs($, { md: j, label: "Checklist status", children: [
1535
+ `${l(e, "status")} ${l(e, "name.rank")}`,
1536
+ ((g = o == null ? void 0 : o.decisions) == null ? void 0 : g[e == null ? void 0 : e.id]) && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1524
1537
  " with",
1525
1538
  " ",
1526
1539
  (m = (y = o == null ? void 0 : o.decisions) == null ? void 0 : y[e == null ? void 0 : e.id]) == null ? void 0 : m.mode,
@@ -1530,151 +1543,150 @@ class a2 extends n3.Component {
1530
1543
  q3,
1531
1544
  {
1532
1545
  style: { marginLeft: "10px" },
1533
- decision: (g = o == null ? void 0 : o.decisions) == null ? void 0 : g[e == null ? void 0 : e.id]
1546
+ decision: (f = o == null ? void 0 : o.decisions) == null ? void 0 : f[e == null ? void 0 : e.id]
1534
1547
  }
1535
1548
  )
1536
1549
  ] })
1537
1550
  ] }),
1538
- s(e, "name.nomStatus") && /* @__PURE__ */ t.jsx(L, { md: b, label: "Nomenclatural Status", children: /* @__PURE__ */ t.jsx(
1551
+ l(e, "name.nomStatus") && /* @__PURE__ */ t.jsx($, { md: j, label: "Nomenclatural Status", children: /* @__PURE__ */ t.jsx(
1539
1552
  Q3,
1540
1553
  {
1541
- nomStatus: s(e, "name.nomStatus"),
1542
- code: s(e, "name.code")
1554
+ nomStatus: l(e, "name.nomStatus"),
1555
+ code: l(e, "name.code")
1543
1556
  }
1544
1557
  ) }),
1545
- w && /* @__PURE__ */ t.jsx(i3, { message: /* @__PURE__ */ t.jsx(g3, { error: w }), type: "error" }),
1546
- !N && s(o, "synonyms") && /* @__PURE__ */ t.jsx(L, { md: b, label: "Synonyms and combinations", children: /* @__PURE__ */ t.jsx(
1558
+ D && /* @__PURE__ */ t.jsx(i3, { message: /* @__PURE__ */ t.jsx(f3, { error: D }), type: "error" }),
1559
+ !Y && l(o, "synonyms") && /* @__PURE__ */ t.jsx($, { md: j, label: "Synonyms and combinations", children: /* @__PURE__ */ t.jsx(
1547
1560
  K3,
1548
1561
  {
1549
- primarySource: F,
1550
- data: s(o, "synonyms"),
1551
- decisions: s(o, "decisions"),
1552
- references: s(o, "references"),
1553
- typeMaterial: s(o, "typeMaterial"),
1554
- referenceIndexMap: M,
1562
+ primarySource: E,
1563
+ data: l(o, "synonyms"),
1564
+ decisions: l(o, "decisions"),
1565
+ references: l(o, "references"),
1566
+ typeMaterial: l(o, "typeMaterial"),
1567
+ referenceIndexMap: I,
1555
1568
  style: { marginTop: "-3px" },
1556
1569
  datasetKey: a
1557
1570
  }
1558
1571
  ) }),
1559
- !N && c3.length > 0 && /* @__PURE__ */ t.jsx(L, { md: b, label: "Misapplied names", children: /* @__PURE__ */ t.jsx(
1572
+ !Y && c3.length > 0 && /* @__PURE__ */ t.jsx($, { md: j, label: "Misapplied names", children: /* @__PURE__ */ t.jsx(
1560
1573
  K3,
1561
1574
  {
1562
1575
  misapplied: !0,
1563
- primarySource: F,
1564
- data: s(o, "synonyms"),
1565
- decisions: s(o, "decisions"),
1566
- references: s(o, "references"),
1567
- typeMaterial: s(o, "typeMaterial"),
1568
- referenceIndexMap: M,
1576
+ primarySource: E,
1577
+ data: l(o, "synonyms"),
1578
+ decisions: l(o, "decisions"),
1579
+ references: l(o, "references"),
1580
+ typeMaterial: l(o, "typeMaterial"),
1581
+ referenceIndexMap: I,
1569
1582
  style: { marginTop: "-3px" },
1570
1583
  datasetKey: a
1571
1584
  }
1572
1585
  ) }),
1573
- s(o, "typeMaterial") && o.typeMaterial[(h = (E = o == null ? void 0 : o.usage) == null ? void 0 : E.name) == null ? void 0 : h.id] && /* @__PURE__ */ t.jsx(L, { md: b, label: "Type material", children: /* @__PURE__ */ t.jsx(
1586
+ l(o, "typeMaterial") && o.typeMaterial[(F = (h = o == null ? void 0 : o.usage) == null ? void 0 : h.name) == null ? void 0 : F.id] && /* @__PURE__ */ t.jsx($, { md: j, label: "Type material", children: /* @__PURE__ */ t.jsx(
1574
1587
  O2,
1575
1588
  {
1576
- data: s(o, "typeMaterial"),
1577
- nameID: s(e, "name.id")
1589
+ data: l(o, "typeMaterial"),
1590
+ nameID: l(e, "name.id")
1578
1591
  }
1579
1592
  ) }),
1580
- s(o, "nameRelations") && o.nameRelations.filter((O) => (O == null ? void 0 : O.usageId) === (e == null ? void 0 : e.id)).length > 0 && /* @__PURE__ */ t.jsx(
1593
+ l(o, "nameRelations") && o.nameRelations.filter((K) => (K == null ? void 0 : K.usageId) === (e == null ? void 0 : e.id)).length > 0 && /* @__PURE__ */ t.jsx(
1581
1594
  O3,
1582
1595
  {
1583
- md: b,
1596
+ md: j,
1584
1597
  style: { marginTop: "-3px" },
1585
1598
  data: o.nameRelations.filter(
1586
- (O) => (O == null ? void 0 : O.usageId) === (e == null ? void 0 : e.id)
1599
+ (K) => (K == null ? void 0 : K.usageId) === (e == null ? void 0 : e.id)
1587
1600
  )
1588
1601
  }
1589
1602
  ),
1590
- s(o, "nameRelations") && o.nameRelations.filter((O) => (O == null ? void 0 : O.usageId) !== (e == null ? void 0 : e.id)).length > 0 && /* @__PURE__ */ t.jsx(
1603
+ l(o, "nameRelations") && o.nameRelations.filter((K) => (K == null ? void 0 : K.usageId) !== (e == null ? void 0 : e.id)).length > 0 && /* @__PURE__ */ t.jsx(
1591
1604
  O3,
1592
1605
  {
1593
- md: b,
1606
+ md: j,
1594
1607
  reverse: !0,
1595
1608
  style: { marginTop: "-3px" },
1596
1609
  data: o.nameRelations.filter(
1597
- (O) => (O == null ? void 0 : O.usageId) !== (e == null ? void 0 : e.id)
1610
+ (K) => (K == null ? void 0 : K.usageId) !== (e == null ? void 0 : e.id)
1598
1611
  )
1599
1612
  }
1600
1613
  ),
1601
- $ && /* @__PURE__ */ t.jsx(i3, { message: /* @__PURE__ */ t.jsx(g3, { error: $ }), type: "error" }),
1602
- A && /* @__PURE__ */ t.jsx(
1614
+ M && /* @__PURE__ */ t.jsx(i3, { message: /* @__PURE__ */ t.jsx(f3, { error: M }), type: "error" }),
1615
+ v && /* @__PURE__ */ t.jsx(
1603
1616
  i3,
1604
1617
  {
1605
- message: /* @__PURE__ */ t.jsx(g3, { error: A }),
1618
+ message: /* @__PURE__ */ t.jsx(f3, { error: v }),
1606
1619
  type: "error"
1607
1620
  }
1608
1621
  ),
1609
- C && /* @__PURE__ */ t.jsx(L, { md: b, label: "Classification", children: /* @__PURE__ */ t.jsx(
1622
+ u && /* @__PURE__ */ t.jsx($, { md: j, label: "Classification", children: /* @__PURE__ */ t.jsx(
1610
1623
  P2,
1611
1624
  {
1612
1625
  style: { marginTop: "-3px", marginLeft: "-3px" },
1613
- data: C,
1626
+ data: u,
1614
1627
  taxon: e,
1615
1628
  datasetKey: a
1616
1629
  }
1617
1630
  ) }),
1618
- !N && (e && c.indexOf(s(e, "name.rank")) < H && c.indexOf(s(e, "name.rank")) > -1 || s(e, "name.rank") === "unranked" && s(e, "name.scientificName") === "Biota") && /* @__PURE__ */ t.jsx(L, { md: b, label: "Breakdown", children: /* @__PURE__ */ t.jsx(
1619
- A2,
1631
+ !Y && (e && c.indexOf(l(e, "name.rank")) < z && c.indexOf(l(e, "name.rank")) > -1 || l(e, "name.rank") === "unranked" && l(e, "name.scientificName") === "Biota") && /* @__PURE__ */ t.jsx($, { md: j, label: "Breakdown", children: /* @__PURE__ */ t.jsx(
1632
+ b2,
1620
1633
  {
1621
1634
  taxon: e,
1622
1635
  datasetKey: a,
1623
- rank: c,
1624
- dataset: B,
1636
+ dataset: k,
1625
1637
  showLevelSwitch: !0
1626
1638
  }
1627
1639
  ) }),
1628
- !N && j.length > 1 && c && e && /* @__PURE__ */ t.jsx(L, { md: b, label: "Statistics", children: /* @__PURE__ */ t.jsx(
1640
+ !Y && c && e && b.some((K) => K.value !== l(e, "name.rank")) && /* @__PURE__ */ t.jsx($, { md: j, label: "Statistics", children: /* @__PURE__ */ t.jsx(
1629
1641
  o1,
1630
1642
  {
1631
1643
  style: { marginTop: "-3px", marginLeft: "-3px" },
1632
- data: j,
1644
+ data: b,
1633
1645
  rank: c,
1634
1646
  taxon: e
1635
1647
  }
1636
1648
  ) }),
1637
- !N && s(o, "vernacularNames") && e && /* @__PURE__ */ t.jsx(L, { md: b, label: "Vernacular names", children: /* @__PURE__ */ t.jsx(
1649
+ !Y && l(o, "vernacularNames") && e && /* @__PURE__ */ t.jsx($, { md: j, label: "Vernacular names", children: /* @__PURE__ */ t.jsx(
1638
1650
  Y2,
1639
1651
  {
1640
1652
  style: { marginTop: "-3px", marginLeft: "-3px" },
1641
1653
  data: o.vernacularNames,
1642
- references: s(o, "references"),
1654
+ references: l(o, "references"),
1643
1655
  datasetKey: e.datasetKey
1644
1656
  }
1645
1657
  ) }),
1646
- !N && (s(o, "distributions") || l && r && e) && // Distributions owns its labelled block so it can hide entirely
1658
+ !Y && (l(o, "distributions") || n && i && e) && // Distributions owns its labelled block so it can hide entirely
1647
1659
  // (label included) when there is nothing to show — including after
1648
1660
  // the async GBIF occurrence lookup comes back empty.
1649
1661
  /* @__PURE__ */ t.jsx(
1650
1662
  B2,
1651
1663
  {
1652
1664
  label: "Distributions",
1653
- md: b,
1665
+ md: j,
1654
1666
  data: (o == null ? void 0 : o.distributions) || [],
1655
1667
  datasetKey: a,
1656
- showDistributionMap: l,
1668
+ showDistributionMap: n,
1657
1669
  focalTaxon: e,
1658
1670
  rankOrder: c,
1659
- gbifChecklistKey: r,
1671
+ gbifChecklistKey: i,
1660
1672
  basemapStyle: p
1661
1673
  }
1662
1674
  ),
1663
- s(e, "environments") && /* @__PURE__ */ t.jsx(L, { md: b, label: "Environment(s)", children: s(e, "environments").join(", ") }),
1664
- (s(e, "remarks") || s(e, "name.remarks")) && /* @__PURE__ */ t.jsx(L, { md: b, label: "Remarks", children: /* @__PURE__ */ t.jsx(
1665
- d1,
1675
+ l(e, "environments") && /* @__PURE__ */ t.jsx($, { md: j, label: "Environment(s)", children: l(e, "environments").join(", ") }),
1676
+ (l(e, "remarks") || l(e, "name.remarks")) && /* @__PURE__ */ t.jsx($, { md: j, label: "Remarks", children: /* @__PURE__ */ t.jsx(
1677
+ c1,
1666
1678
  {
1667
- source: [s(e, "remarks"), s(e, "name.remarks")].filter(Boolean).join(`
1679
+ source: [l(e, "remarks"), l(e, "name.remarks")].filter(Boolean).join(`
1668
1680
 
1669
1681
  `)
1670
1682
  }
1671
1683
  ) }),
1672
- /* @__PURE__ */ t.jsx(d3, { children: s(e, "accordingTo") && /* @__PURE__ */ t.jsx(V, { span: 12, children: /* @__PURE__ */ t.jsxs(L, { md: b * 2, label: "According to", children: [
1673
- `${s(e, "accordingTo")}`,
1674
- s(e, "accordingToDate") && `, ${t2(s(e, "accordingToDate")).format("LL")}`
1684
+ /* @__PURE__ */ t.jsx(d3, { children: l(e, "accordingTo") && /* @__PURE__ */ t.jsx(U, { span: 12, children: /* @__PURE__ */ t.jsxs($, { md: j * 2, label: "According to", children: [
1685
+ `${l(e, "accordingTo")}`,
1686
+ l(e, "accordingToDate") && `, ${t2(l(e, "accordingToDate")).format("LL")}`
1675
1687
  ] }) }) }),
1676
- s(e, "scrutinizer") && /* @__PURE__ */ t.jsx(V, { span: 12, children: /* @__PURE__ */ t.jsx(L, { md: b * 2, label: "Taxonomic scrutiny", children: `${s(e, "scrutinizer")}${s(e, "scrutinizerDate") ? ", " + s(e, "scrutinizerDate") : ""}` }) }),
1677
- s(F, "title") && /* @__PURE__ */ t.jsx(L, { md: b, label: "Source", children: /* @__PURE__ */ t.jsx(
1688
+ l(e, "scrutinizer") && /* @__PURE__ */ t.jsx(U, { span: 12, children: /* @__PURE__ */ t.jsx($, { md: j * 2, label: "Taxonomic scrutiny", children: `${l(e, "scrutinizer")}${l(e, "scrutinizerDate") ? ", " + l(e, "scrutinizerDate") : ""}` }) }),
1689
+ l(E, "title") && /* @__PURE__ */ t.jsx($, { md: j, label: "Source", children: /* @__PURE__ */ t.jsx(
1678
1690
  "div",
1679
1691
  {
1680
1692
  style: {
@@ -1684,28 +1696,28 @@ class a2 extends n3.Component {
1684
1696
  children: /* @__PURE__ */ t.jsxs(
1685
1697
  l3,
1686
1698
  {
1687
- merged: (v = o == null ? void 0 : o.usage) == null ? void 0 : v.merged,
1688
- createdBy: (I = o == null ? void 0 : o.usage) == null ? void 0 : I.createdBy,
1699
+ merged: (A = o == null ? void 0 : o.usage) == null ? void 0 : A.merged,
1700
+ createdBy: (w = o == null ? void 0 : o.usage) == null ? void 0 : w.createdBy,
1689
1701
  datasetKey: (T = o == null ? void 0 : o.usage) == null ? void 0 : T.datasetKey,
1690
- verbatimSourceKey: (R = o == null ? void 0 : o.usage) == null ? void 0 : R.verbatimSourceKey,
1691
- sourceDatasetKey: (q = o == null ? void 0 : o.source) == null ? void 0 : q.sourceDatasetKey,
1702
+ verbatimSourceKey: (N = o == null ? void 0 : o.usage) == null ? void 0 : N.verbatimSourceKey,
1703
+ sourceDatasetKey: (G = o == null ? void 0 : o.source) == null ? void 0 : G.sourceDatasetKey,
1692
1704
  sourceId: (W = o == null ? void 0 : o.source) == null ? void 0 : W.sourceId,
1693
1705
  children: [
1694
- (J = o == null ? void 0 : o.source) != null && J.sourceId ? /* @__PURE__ */ t.jsx(
1706
+ (q = o == null ? void 0 : o.source) != null && q.sourceId ? /* @__PURE__ */ t.jsx(
1695
1707
  "a",
1696
1708
  {
1697
- href: `https://www.checklistbank.org/dataset/${(Z = o == null ? void 0 : o.source) == null ? void 0 : Z.sourceDatasetKey}/taxon/${(K = o == null ? void 0 : o.source) == null ? void 0 : K.sourceId}`,
1698
- children: s(F, "alias")
1709
+ href: `https://www.checklistbank.org/dataset/${(Z = o == null ? void 0 : o.source) == null ? void 0 : Z.sourceDatasetKey}/taxon/${(O = o == null ? void 0 : o.source) == null ? void 0 : O.sourceId}`,
1710
+ children: l(E, "alias")
1699
1711
  }
1700
- ) : s(F, "alias"),
1712
+ ) : l(E, "alias"),
1701
1713
  ": ",
1702
- /* @__PURE__ */ t.jsx(p3, { to: "source", args: s(F, "key"), children: s(F, "title") }),
1703
- /* @__PURE__ */ t.jsx("span", { style: { marginLeft: "10px" }, children: s(F, "completeness") && s(F, "completeness") + "%" }),
1704
- s(F, "confidence") && /* @__PURE__ */ t.jsx(
1714
+ /* @__PURE__ */ t.jsx(p3, { to: "source", args: l(E, "key"), children: l(E, "title") }),
1715
+ /* @__PURE__ */ t.jsx("span", { style: { marginLeft: "10px" }, children: l(E, "completeness") && l(E, "completeness") + "%" }),
1716
+ l(E, "confidence") && /* @__PURE__ */ t.jsx(
1705
1717
  C2,
1706
1718
  {
1707
1719
  style: { marginLeft: "10px" },
1708
- value: s(F, "confidence"),
1720
+ value: l(E, "confidence"),
1709
1721
  disabled: !0
1710
1722
  }
1711
1723
  )
@@ -1714,51 +1726,51 @@ class a2 extends n3.Component {
1714
1726
  )
1715
1727
  }
1716
1728
  ) }),
1717
- s(e, "link") && /* @__PURE__ */ t.jsx(L, { md: b, label: "Original record", children: /* @__PURE__ */ t.jsx("a", { href: s(e, "link"), children: s(e, "link") }) }),
1718
- ((P = o == null ? void 0 : o.source) == null ? void 0 : P.secondarySources) && /* @__PURE__ */ t.jsx(L, { md: b, label: "Secondary Sources", children: /* @__PURE__ */ t.jsx(l1, { info: o, datasetKey: a }) }),
1719
- s(o, "references") && /* @__PURE__ */ t.jsx(L, { md: b, label: "References", children: /* @__PURE__ */ t.jsx(
1729
+ l(e, "link") && /* @__PURE__ */ t.jsx($, { md: j, label: "Original record", children: /* @__PURE__ */ t.jsx("a", { href: l(e, "link"), children: l(e, "link") }) }),
1730
+ ((H = o == null ? void 0 : o.source) == null ? void 0 : H.secondarySources) && /* @__PURE__ */ t.jsx($, { md: j, label: "Secondary Sources", children: /* @__PURE__ */ t.jsx(s1, { info: o, datasetKey: a }) }),
1731
+ l(o, "references") && /* @__PURE__ */ t.jsx($, { md: j, label: "References", children: /* @__PURE__ */ t.jsx(
1720
1732
  W2,
1721
1733
  {
1722
- referenceIndexMap: M,
1723
- primarySourceDatasetKey: (X = o == null ? void 0 : o.source) == null ? void 0 : X.sourceDatasetKey,
1724
- data: s(o, "references"),
1734
+ referenceIndexMap: I,
1735
+ primarySourceDatasetKey: (J = o == null ? void 0 : o.source) == null ? void 0 : J.sourceDatasetKey,
1736
+ data: l(o, "references"),
1725
1737
  style: { marginTop: "-3px" }
1726
1738
  }
1727
1739
  ) }),
1728
- ((v3 = (e3 = window == null ? void 0 : window.location) == null ? void 0 : e3.hostname) == null ? void 0 : v3.endsWith("catalogueoflife.org")) && /* @__PURE__ */ t.jsx(L, { md: b, label: "", children: /* @__PURE__ */ t.jsx(p1, { taxonKey: ($3 = (L3 = this == null ? void 0 : this.state) == null ? void 0 : L3.taxon) == null ? void 0 : $3.id, datasetKey: this.props.datasetKey }) })
1740
+ (($3 = (a3 = window == null ? void 0 : window.location) == null ? void 0 : a3.hostname) == null ? void 0 : $3.endsWith("catalogueoflife.org")) && /* @__PURE__ */ t.jsx($, { md: j, label: "", children: /* @__PURE__ */ t.jsx(d1, { taxonKey: (L3 = (v3 = this == null ? void 0 : this.state) == null ? void 0 : v3.taxon) == null ? void 0 : L3.id, datasetKey: this.props.datasetKey }) })
1729
1741
  ]
1730
1742
  }
1731
1743
  ) });
1732
1744
  }
1733
1745
  }
1734
- _(a2, "contextType", Y3);
1735
- function c1({
1736
- taxonKey: n,
1737
- datasetKey: i,
1746
+ _(e2, "contextType", Y3);
1747
+ function y1({
1748
+ taxonKey: r,
1749
+ datasetKey: s,
1738
1750
  pageTitleTemplate: a,
1739
- identifierLabel: l,
1740
- showDistributionMap: r,
1751
+ identifierLabel: n,
1752
+ showDistributionMap: i,
1741
1753
  gbifChecklistKey: p,
1742
1754
  basemapStyle: e,
1743
1755
  auth: o,
1744
- ...C
1756
+ ...u
1745
1757
  }) {
1746
- return /* @__PURE__ */ t.jsx(Y3.Provider, { value: d2(C), children: /* @__PURE__ */ t.jsx(
1747
- a2,
1758
+ return /* @__PURE__ */ t.jsx(Y3.Provider, { value: d2(u), children: /* @__PURE__ */ t.jsx(
1759
+ e2,
1748
1760
  {
1749
- taxonKey: n,
1750
- datasetKey: i,
1761
+ taxonKey: r,
1762
+ datasetKey: s,
1751
1763
  pageTitleTemplate: a,
1752
- identifierLabel: l,
1753
- showDistributionMap: r,
1764
+ identifierLabel: n,
1765
+ showDistributionMap: i,
1754
1766
  gbifChecklistKey: p,
1755
1767
  basemapStyle: e,
1756
1768
  auth: o
1757
1769
  }
1758
1770
  ) });
1759
1771
  }
1760
- const O1 = r2(n2(c1));
1772
+ const _1 = r2(n2(y1));
1761
1773
  export {
1762
- O1 as Taxon
1774
+ _1 as Taxon
1763
1775
  };
1764
1776
  //# sourceMappingURL=taxon.js.map