@piveau/dpi 0.2.0-alpha.13 → 0.2.0-alpha.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/dist/assets/dpi.css +1 -1
  2. package/dist/packages/dpi/src/data-provider-interface/DataProviderInterface.vue2.js +48 -47
  3. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/AboutProject.vue.js +46 -48
  4. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/DPIHome.vue.js +48 -31
  5. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/HomeTable.vue.js +101 -79
  6. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ProjectTable.vue.js +4 -94
  7. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ProjectTable.vue2.js +128 -0
  8. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/services/dpiV3_apis.js +36 -68
  9. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Autocomplete/AutocompleteVocab.vue.js +2 -2
  10. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Autocomplete/AutocompleteVocab.vue2.js +64 -52
  11. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/BasicInfosStep/ProjectDescriptionStep.vue.js +14 -14
  12. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/BasicInfosStep/ProjectNameStep.vue.js +9 -6
  13. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/BasicInfosStep/ProjectOrganisationStep.vue.js +2 -2
  14. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/BasicInfosStep/ProjectOrganisationStep.vue2.js +26 -27
  15. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/BasicInfosStep/ProjectStatusStep.vue.js +8 -8
  16. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/DataCollection/BasicInformationStep.vue.js +2 -2
  17. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/DataCollection/BasicInformationStep.vue2.js +19 -19
  18. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/DataProcessing/BasicInformationStep.vue.js +2 -2
  19. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/DataProcessing/BasicInformationStep.vue2.js +38 -39
  20. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/DataSimulation/BasicInformationStep.vue.js +2 -2
  21. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/DataSimulation/BasicInformationStep.vue2.js +72 -67
  22. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/DataVisualisation/BasicInformationStep.vue.js +1 -1
  23. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/DataVisualisation/BasicInformationStep.vue2.js +84 -97
  24. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/DpiModalBase.vue.js +2 -2
  25. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/DpiModalBase.vue2.js +1 -1
  26. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Dropdown.vue.js +103 -88
  27. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Findability/ApplicationsStep.vue.js +1 -1
  28. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Findability/ApplicationsStep.vue2.js +18 -17
  29. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Findability/CategoriesStep.vue.js +1 -1
  30. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Findability/CategoriesStep.vue2.js +35 -28
  31. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Findability/DiscoverabilityStep.vue.js +11 -10
  32. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/InputField/InputFieldDefinition.js +4 -3
  33. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/InputField/InputFieldFormKit.vue.js +46 -40
  34. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/InputField.vue.js +144 -134
  35. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/OptionalDataStep/OptionalDataStep.vue.js +2 -2
  36. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/OptionalDataStep/OptionalDataStep.vue2.js +190 -156
  37. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/DatasetForm.vue.js +2 -2
  38. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/DatasetForm.vue2.js +44 -38
  39. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/DatasetStep.vue.js +2 -2
  40. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/DatasetStep.vue2.js +73 -71
  41. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/GetResource.vue.js +4 -4
  42. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/HardwareForm.vue.js +2 -2
  43. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/HardwareForm.vue2.js +128 -123
  44. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/HardwareStep.vue.js +2 -2
  45. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/HardwareStep.vue2.js +133 -131
  46. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/SoftwareForm.vue.js +2 -2
  47. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/SoftwareForm.vue2.js +50 -45
  48. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/SoftwareStep.vue.js +2 -2
  49. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/SoftwareStep.vue2.js +85 -83
  50. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/utils.js +17 -17
  51. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ReviewStep/ReviewStep.vue.js +2 -2
  52. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ReviewStep/ReviewStep.vue2.js +341 -341
  53. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/SectionItems/CoverageModal.vue.js +38 -71
  54. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/SectionItems/CoverageModal.vue2.js +4 -0
  55. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/TableRowV3.vue.js +205 -143
  56. package/dist/packages/dpi/src/data-provider-interface/components/Spatial.vue.js +7 -0
  57. package/dist/packages/dpi/src/data-provider-interface/components/Spatial.vue2.js +172 -0
  58. package/dist/packages/dpi/src/data-provider-interface/components/SpatialPage.vue.js +7 -0
  59. package/dist/packages/dpi/src/data-provider-interface/components/SpatialPage.vue2.js +44 -0
  60. package/dist/packages/dpi/src/data-provider-interface/components/StepActionsSection.vue.js +2 -2
  61. package/dist/packages/dpi/src/data-provider-interface/components/StepActionsSection.vue2.js +111 -91
  62. package/dist/packages/dpi/src/data-provider-interface/components/TheCancelConfirmationDialog.vue.js +3 -3
  63. package/dist/packages/dpi/src/data-provider-interface/components/TheCancelConfirmationDialog.vue2.js +24 -19
  64. package/dist/packages/dpi/src/data-provider-interface/components/TheErrorDialog.vue.js +57 -46
  65. package/dist/packages/dpi/src/data-provider-interface/components/dev-tools/ProjectDpiDevTools.vue.js +2 -2
  66. package/dist/packages/dpi/src/data-provider-interface/components/dev-tools/ProjectDpiDevTools.vue2.js +137 -94
  67. package/dist/packages/dpi/src/data-provider-interface/composables/project-transformer/decodeProject.js +152 -135
  68. package/dist/packages/dpi/src/data-provider-interface/composables/project-transformer/encodeProject.js +202 -167
  69. package/dist/packages/dpi/src/data-provider-interface/composables/useDpiContext.js +9 -10
  70. package/dist/packages/dpi/src/data-provider-interface/composables/useDpiEditMode.js +89 -65
  71. package/dist/packages/dpi/src/data-provider-interface/composables/useDpiSimpleLoader.js +287 -281
  72. package/dist/packages/dpi/src/data-provider-interface/composables/useDpiStepper.js +82 -82
  73. package/dist/packages/dpi/src/data-provider-interface/composables/useDpiUtils.js +18 -9
  74. package/dist/packages/dpi/src/data-provider-interface/composables/useProjectActions.js +95 -0
  75. package/dist/packages/dpi/src/data-provider-interface/composables/useTwinbyHome.js +83 -0
  76. package/dist/packages/dpi/src/data-provider-interface/composables/useTwinbyUser.js +85 -0
  77. package/dist/packages/dpi/src/data-provider-interface/config/dcatapdeHappyFlow/converter.js +19 -19
  78. package/dist/packages/dpi/src/data-provider-interface/schema/projectLdSchema.js +48 -45
  79. package/dist/packages/dpi/src/data-provider-interface/views/InputPage.vue.js +333 -308
  80. package/dist/packages/dpi/src/data-provider-interface/views/InputPageProject.vue.js +405 -409
  81. package/dist/packages/dpi/src/form/inputDefinitions.js +52 -53
  82. package/dist/packages/dpi/src/stories/components/PartnerCard.vue.js +2 -2
  83. package/dist/packages/dpi/src/stories/components/PartnerCard.vue2.js +14 -14
  84. package/dist/packages/dpi/src/stories/components/ScreenshotCard.vue.js +2 -2
  85. package/dist/packages/dpi/src/stories/components/ScreenshotCard.vue2.js +9 -8
  86. package/dist/packages/dpi/src/utils/schema/schemaProject.js +210 -0
  87. package/dist/packages/dpi/src/utils/schema/shared.js +23 -0
  88. package/package.json +5 -5
  89. package/dist/packages/dpi/src/data-provider-interface/components/PolGeoUriPage.vue.js +0 -124
  90. package/dist/packages/dpi/src/data-provider-interface/composables/project-transformer/__tests__/fixtures/theProjectForm.js +0 -281
@@ -1,8 +1,8 @@
1
- import { toRef as Z, ref as ee, toValue as q, computed as j, watch as K } from "vue";
2
- import { useAsyncState as te } from "@vueuse/core";
3
- import { defineJsonldResolver as ie, dcatDatasetTransformer as re, datasetResolvers as oe } from "@piveau/jsonld";
4
- import { isEmpty as ne } from "lodash-es";
5
- function z(e) {
1
+ import { datasetResolvers as Z, defineJsonldResolver as ee, dcatDatasetTransformer as te } from "@piveau/jsonld";
2
+ import { useAsyncState as re } from "@vueuse/core";
3
+ import { isEmpty as ie } from "lodash-es";
4
+ import { toRef as oe, ref as ae, toValue as F, computed as z, watch as K } from "vue";
5
+ function M(e) {
6
6
  return e == null ? [] : Array.isArray(e) ? e : [e];
7
7
  }
8
8
  function o(e) {
@@ -12,72 +12,111 @@ function o(e) {
12
12
  function s(e) {
13
13
  return Array.isArray(e) ? e : e ? [e] : void 0;
14
14
  }
15
- function ae(e) {
15
+ function ne(e) {
16
16
  return Object.fromEntries(
17
17
  Object.entries(e).filter(
18
- ([r, i]) => i != null && !ne(i)
18
+ ([i, r]) => r != null && !ie(r)
19
19
  )
20
20
  );
21
21
  }
22
- function Te(e, r) {
23
- const { enabled: i, hubSearchUrl: t } = r, n = Z(i), { safeTransform: p } = ie({
22
+ function De(e, i) {
23
+ const { enabled: r, hubSearchUrl: t } = i, a = oe(r), R = [...Z()].filter((l) => l.name !== "licence"), { safeTransform: u } = ee({
24
24
  baseUrl: t,
25
- resolvers: oe(),
26
- transformer: re
27
- }), c = ee([]), {
28
- state: u,
29
- isReady: b,
30
- isLoading: g,
31
- error: m,
32
- execute: B
33
- } = te(
25
+ resolvers: R,
26
+ transformer: te
27
+ }), f = ae([]), {
28
+ state: m,
29
+ isReady: g,
30
+ isLoading: b,
31
+ error: L,
32
+ execute: T
33
+ } = re(
34
34
  async () => {
35
- var D;
36
- const l = await p(q(e));
37
- if (l.error)
38
- return c.value.push({
39
- code: "transform_failed",
40
- message: l.error.message
35
+ var A;
36
+ if (!i.preprocess && !i.transform) {
37
+ const n = await u(F(e));
38
+ if (n.error)
39
+ return f.value.push({
40
+ code: "transform_failed",
41
+ message: n.error.message
42
+ }), null;
43
+ const y = n.data;
44
+ return (!y || !((A = y["dpi:isDPIv3"]) != null && A["@value"])) && f.value.push({
45
+ code: "not_dpi_v3",
46
+ message: `The dataset is not a DPI v3 dataset. ID ${y["@id"]}`
47
+ }), {
48
+ dpiData: ge(y, i.visibility || "public"),
49
+ data: y
50
+ };
51
+ }
52
+ let D;
53
+ if (i.preprocess)
54
+ try {
55
+ const n = await i.preprocess(F(e));
56
+ if (n && typeof n == "object" && "error" in n && n.error)
57
+ return f.value.push({
58
+ code: "preprocess_failed",
59
+ message: n.error.message || "Preprocess failed"
60
+ }), null;
61
+ D = n && typeof n == "object" && "data" in n ? n.data : n;
62
+ } catch (n) {
63
+ return f.value.push({
64
+ code: "preprocess_failed",
65
+ message: (n == null ? void 0 : n.message) || String(n)
66
+ }), null;
67
+ }
68
+ else
69
+ D = F(e);
70
+ if (!i.transform)
71
+ return f.value.push({
72
+ code: "missing_transform",
73
+ message: "No transform function provided. Either supply a transform or omit both preprocess and transform to use the default DCAT dataset path."
74
+ }), null;
75
+ let P;
76
+ try {
77
+ const n = i.preprocess ? D : F(e);
78
+ P = await i.transform(n);
79
+ } catch (n) {
80
+ return f.value.push({
81
+ code: "transform_apply_failed",
82
+ message: (n == null ? void 0 : n.message) || String(n)
41
83
  }), null;
42
- const y = l.data;
43
- return (!y || !((D = y["dpi:isDPIv3"]) != null && D["@value"])) && c.value.push({
44
- code: "not_dpi_v3",
45
- message: `The dataset is not a DPI v3 dataset. ID ${y["@id"]}`
46
- }), {
47
- dpiData: ge(y),
48
- data: y
84
+ }
85
+ return {
86
+ dpiData: P,
87
+ data: D
49
88
  };
50
89
  },
51
90
  null,
52
91
  { immediate: !1 }
53
- ), h = j(
54
- () => n.value && !g.value && !!b.value
55
- ), R = j(
56
- () => n.value && !!h.value
57
- ), v = j(() => R.value), P = j(() => {
92
+ ), v = z(
93
+ () => a.value && !b.value && !!g.value
94
+ ), B = z(
95
+ () => a.value && !!v.value
96
+ ), I = z(() => B.value), S = z(() => {
58
97
  var l;
59
- return (l = u.value) == null ? void 0 : l.dpiData;
60
- }), w = j(() => {
98
+ return (l = m.value) == null ? void 0 : l.dpiData;
99
+ }), V = z(() => {
61
100
  var l;
62
- return (l = u.value) == null ? void 0 : l.data;
101
+ return (l = m.value) == null ? void 0 : l.data;
63
102
  });
64
103
  return K(
65
- () => q(e),
66
- (l) => l && n.value ? B() : null
67
- ), K(w, (l) => {
104
+ () => F(e),
105
+ (l) => l && a.value ? T() : null
106
+ ), K(V, (l) => {
68
107
  console.log("jsonld resolved result:", l);
69
- }), K(m, (l) => {
108
+ }), K(L, (l) => {
70
109
  console.log("jsonld error:", l);
71
110
  }), {
72
- processedInput: u,
73
- isProcessedInputReady: h,
74
- result: P,
75
- isMaterialized: R,
76
- isReady: v,
77
- errors: c
111
+ processedInput: m,
112
+ isProcessedInputReady: v,
113
+ result: S,
114
+ isMaterialized: B,
115
+ isReady: I,
116
+ errors: f
78
117
  };
79
118
  }
80
- function f(e) {
119
+ function p(e) {
81
120
  if (typeof e == "string")
82
121
  return e;
83
122
  if (e && typeof e == "object") {
@@ -88,37 +127,35 @@ function f(e) {
88
127
  }
89
128
  return "";
90
129
  }
91
- function d(e, r = "de") {
130
+ function d(e, i = "de") {
92
131
  if (!e)
93
132
  return "";
94
133
  if (typeof e == "string")
95
134
  return e;
96
135
  if (typeof e == "object" && !Array.isArray(e) && !e["@value"] && !e["@id"])
97
- return e[r] || Object.values(e)[0] || "";
136
+ return e[i] || Object.values(e)[0] || "";
98
137
  if (Array.isArray(e)) {
99
- const i = e.find(
100
- (n) => n["@language"] === r
138
+ const r = e.find(
139
+ (a) => a["@language"] === i
101
140
  );
102
- if (i)
103
- return i["@value"] || "";
141
+ if (r)
142
+ return r["@value"] || "";
104
143
  const t = e[0];
105
- return (t == null ? void 0 : t["@value"]) || f(t) || "";
144
+ return (t == null ? void 0 : t["@value"]) || p(t) || "";
106
145
  }
107
- return e["@language"] && e["@value"] ? e["@value"] : f(e);
146
+ return e["@language"] && e["@value"] ? e["@value"] : p(e);
108
147
  }
109
- function k(e) {
148
+ function E(e) {
110
149
  return {
111
150
  uri: e.uri,
112
- label: e.label,
113
- //
114
- "@value": e.label
151
+ label: e.label
115
152
  };
116
153
  }
117
- function T(e, r) {
118
- const i = e.prefLabel;
119
- return k({
154
+ function x(e, i) {
155
+ const r = e.prefLabel;
156
+ return E({
120
157
  uri: e["@id"] || e["purl:identifier"] || "",
121
- label: i ? d(i) : e["purl:identifier"] || ""
158
+ "@value": r ? d(r) : e["purl:identifier"] || ""
122
159
  });
123
160
  }
124
161
  function N(e) {
@@ -126,78 +163,81 @@ function N(e) {
126
163
  "@value": e
127
164
  } : e;
128
165
  }
129
- function S(e, r = !0) {
166
+ function U(e, i = !0) {
130
167
  return {
131
- isValid: r,
168
+ isValid: i,
132
169
  ...e
133
170
  };
134
171
  }
135
- function H(e, r = "de") {
136
- return e ? z(e).map((t) => typeof t == "string" ? S({
172
+ function H(e, i = "de") {
173
+ return e ? M(e).map((t) => typeof t == "string" ? U({
137
174
  "@value": t,
138
- "@language": r
139
- }) : t && typeof t == "object" ? t["@language"] && t["@value"] ? S({
175
+ "@language": i
176
+ }) : t && typeof t == "object" ? t["@language"] && t["@value"] ? U({
140
177
  "@value": t["@value"],
141
178
  "@language": t["@language"]
142
- }) : S({
143
- "@value": f(t),
144
- "@language": r
145
- }) : S({
179
+ }) : U({
180
+ "@value": p(t),
181
+ "@language": i
182
+ }) : U({
146
183
  "@value": "",
147
- "@language": r
184
+ "@language": i
148
185
  })) : [];
149
186
  }
150
- function ce(e, r) {
151
- return e ? z(e).map(
152
- (t) => S({
153
- "@type": r,
154
- "@value": f(t)
187
+ function ce(e, i) {
188
+ return e ? M(e).map(
189
+ (t) => U({
190
+ "@type": i,
191
+ "@value": p(t)
155
192
  })
156
193
  ) : [];
157
194
  }
158
- function X(e, r) {
159
- const i = { isValid: !0 };
160
- for (const [t, n] of Object.entries(r))
161
- i[t] = f(e == null ? void 0 : e[n]);
162
- return i;
195
+ function X(e, i) {
196
+ const r = { isValid: !0 };
197
+ for (const [t, a] of Object.entries(i))
198
+ r[t] = p(e == null ? void 0 : e[a]);
199
+ return r;
163
200
  }
164
201
  function de(e) {
165
202
  return {
166
203
  happyFlowLandingPage: {}
167
204
  };
168
205
  }
169
- function le(e) {
206
+ function le(e, i) {
170
207
  const r = {
171
208
  discoverabilityPage: [{ isValid: !0 }]
172
209
  };
173
210
  if (e["dcatap:hvdCategory"]) {
174
- const i = z(
175
- e["dcatap:hvdCategory"]
176
- ).filter(Boolean);
177
- r.hvdPage = i == null ? void 0 : i.map((t) => ({
211
+ const t = M(e["dcatap:hvdCategory"]).filter(Boolean);
212
+ r.hvdPage = t == null ? void 0 : t.map((a) => ({
178
213
  isValid: !0,
179
- uri: t["@id"],
180
- label: d(t.prefLabel)
214
+ uri: a["@id"],
215
+ label: d(a.prefLabel)
181
216
  }));
182
217
  }
183
218
  if (e["dcat:theme"]) {
184
- const i = z(e["dcat:theme"]);
219
+ const t = M(e["dcat:theme"]);
185
220
  r.discoverabilityPage = [
186
221
  { isValid: !0 },
187
- ...i.map(
188
- (t) => S({
189
- id: f(t).split("/").pop(),
190
- uri: f(t),
191
- label: d(t.prefLabel)
222
+ ...t.map(
223
+ (a) => U({
224
+ id: p(a).split("/").pop(),
225
+ uri: p(a),
226
+ label: d(a.prefLabel)
192
227
  })
193
228
  )
194
229
  ];
195
230
  }
196
- return r;
231
+ return i && (r.visibilityPage = [
232
+ {
233
+ isValid: !0,
234
+ visibility: i
235
+ }
236
+ ]), r;
197
237
  }
198
238
  function se(e) {
199
239
  var t;
200
- const i = {
240
+ const r = {
201
241
  datasetID: ((t = e["@id"]) == null ? void 0 : t.split("/").pop()) || "",
202
242
  "dct:title": [],
203
243
  "dct:description": [],
@@ -205,15 +245,15 @@ function se(e) {
205
245
  "dct:publisher": [],
206
246
  "dcat:contactPoint": []
207
247
  };
208
- if (e["dct:title"] && (i["dct:title"] = H(e["dct:title"])), e["dct:description"] && (i["dct:description"] = H(
248
+ if (e["dct:title"] && (r["dct:title"] = H(e["dct:title"])), e["dct:description"] && (r["dct:description"] = H(
209
249
  e["dct:description"]
210
- )), e["dct:modified"] && (i["dct:modified"] = ce(
250
+ )), e["dct:modified"] && (r["dct:modified"] = ce(
211
251
  e["dct:modified"],
212
252
  "http://www.w3.org/2001/XMLSchema#date"
213
253
  )), e["dct:publisher"]) {
214
- const n = o(e["dct:publisher"]);
215
- i["dct:publisher"] = [
216
- X(n, {
254
+ const a = o(e["dct:publisher"]);
255
+ r["dct:publisher"] = [
256
+ X(a, {
217
257
  "foaf:name": "foaf:name",
218
258
  "foaf:mbox": "foaf:mbox",
219
259
  "foaf:homepage": "foaf:homepage"
@@ -221,23 +261,23 @@ function se(e) {
221
261
  ];
222
262
  }
223
263
  if (e["dcat:contactPoint"]) {
224
- const n = o(e["dcat:contactPoint"]);
225
- i["dcat:contactPoint"] = [
226
- X(n, {
264
+ const a = o(e["dcat:contactPoint"]);
265
+ r["dcat:contactPoint"] = [
266
+ X(a, {
227
267
  "vcard:fn": "vcard:fn",
228
268
  "vcard:hasEmail": "vcard:hasEmail",
229
269
  "vcard:hasTelephone": "vcard:hasTelephone"
230
270
  })
231
271
  ];
232
272
  }
233
- return i;
273
+ return r;
234
274
  }
235
- function fe(e) {
236
- var r, i;
275
+ function ue(e) {
276
+ var i, r;
237
277
  return {
238
- "dcatde:politicalGeocodingURI": (r = e["dcatapde:politicalGeocodingURI"]) == null ? void 0 : r.map((t) => {
239
- var u;
240
- const p = {
278
+ "dcatde:politicalGeocodingURI": (i = e["dcatapde:politicalGeocodingURI"]) == null ? void 0 : i.map((t) => {
279
+ var f;
280
+ const R = {
241
281
  districtKey: "Kreis",
242
282
  governmentDistrictKey: "Bezirk",
243
283
  municipalityKey: "Gemeindeschlüssel",
@@ -245,126 +285,117 @@ function fe(e) {
245
285
  stateKey: "Bundesland",
246
286
  regionalKey: "Regionalschlüssel"
247
287
  };
248
- let c = t["@id"].split("/").slice(-2, -1)[0];
249
- return c = p[c] || c, {
288
+ let u = t["@id"].split("/").slice(-2, -1)[0];
289
+ return u = R[u] || u, {
250
290
  isValid: !0,
251
291
  uri: t["@id"],
252
- id: ((u = t.prefLabel) == null ? void 0 : u.de) || t["@id"].split("/").pop(),
292
+ id: ((f = t.prefLabel) == null ? void 0 : f.de) || t["@id"].split("/").pop(),
253
293
  label: d(t.altLabel),
254
- inVoc: c
294
+ inVoc: u
255
295
  };
256
296
  }),
257
- "dcat:temporalResolution": (i = e["dct:temporal"]) == null ? void 0 : i.reduce((t, n) => {
258
- const c = o(n["dcat:startDate"]), u = o(n["dcat:endDate"]), b = f(c) || "", g = f(u) || "", m = typeof c != "string" && (c == null ? void 0 : c["@type"]) === "http://www.w3.org/2001/XMLSchema#dateTime" ? "dateTime" : "date", B = m === "date" ? b : b.split("T")[0], h = m === "date" ? g : g.split("T")[0], R = m === "dateTime" ? b.split("T")[1] : "", v = m === "dateTime" ? g.split("T")[1] : "";
297
+ "dcat:temporalResolution": (r = e["dct:temporal"]) == null ? void 0 : r.reduce((t, a) => {
298
+ const u = o(a["dcat:startDate"]), f = o(a["dcat:endDate"]), m = p(u) || "", g = p(f) || "", b = typeof u != "string" && (u == null ? void 0 : u["@type"]) === "http://www.w3.org/2001/XMLSchema#dateTime" ? "dateTime" : "date", L = b === "date" ? m : m.split("T")[0], T = b === "date" ? g : g.split("T")[0], v = b === "dateTime" ? m.split("T")[1] : "", B = b === "dateTime" ? g.split("T")[1] : "";
259
299
  return {
260
300
  isValid: !0,
261
301
  type: "dct:PeriodOfTime",
262
302
  "dct:temporal": [
263
303
  {
264
- dataType: m,
265
- "dcat:startDate": B,
266
- "dcat:endDate": h,
267
- startTime: R || "",
268
- endTime: v || ""
304
+ dataType: b,
305
+ "dcat:startDate": L,
306
+ "dcat:endDate": T,
307
+ startTime: v || "",
308
+ endTime: B || ""
269
309
  }
270
310
  ]
271
311
  };
272
312
  }, {})
273
313
  };
274
314
  }
275
- function ue(e, r) {
276
- var t, n, p, c, u, b, g, m, B, h, R, v, P, w, l, y, I, D, U, V, x;
315
+ function fe(e, i) {
316
+ var t, a, R, u, f, m, g, b, L, T, v, B, I, S, V, l, D, P, A, n, y;
277
317
  if (!e)
278
318
  return {};
279
- const i = o(e["spdx:checksum"]);
319
+ const r = o(e["spdx:checksum"]);
280
320
  return {
281
321
  isValid: !0,
282
- id: r + 1,
283
- "dcat:accessURL": f(o(e["dcat:accessURL"])) || "",
322
+ id: i + 1,
323
+ "dcat:accessURL": p(o(e["dcat:accessURL"])) || "",
284
324
  "dct:format": {
285
325
  // redundancy in label and title for better compatibility
286
326
  label: ((t = o(e["dct:format"])) == null ? void 0 : t["purl:identifier"]) || "",
287
- title: ((n = o(e["dct:format"])) == null ? void 0 : n["purl:identifier"]) || "",
288
- uri: ((p = o(e["dct:format"])) == null ? void 0 : p["@id"]) || ""
327
+ title: ((a = o(e["dct:format"])) == null ? void 0 : a["purl:identifier"]) || "",
328
+ uri: ((R = o(e["dct:format"])) == null ? void 0 : R["@id"]) || ""
289
329
  },
290
330
  "dct:title": d(e["dct:title"]),
291
331
  "dct:description": d(e["dct:description"]),
292
- "dct:modified": f(o(e["dct:modified"])),
293
- "dct:issued": f(o(e["dct:issued"])),
294
- "dcat:byteSize": f(o(e["dcat:byteSize"])),
332
+ "dct:modified": p(o(e["dct:modified"])),
333
+ "dct:issued": p(o(e["dct:issued"])),
334
+ "dcat:byteSize": p(o(e["dcat:byteSize"])),
295
335
  "dcatde:licenseAttributionByText": d(e["dcatapde:licenseAttributionByText"]) || "",
296
- "dct:license": e["dct:license"] ? [
297
- {
298
- isValid: !0,
299
- uri: ((c = o(e["dct:license"])) == null ? void 0 : c["@id"]) || "",
300
- "dcterms:license": d(
301
- (u = o(e["dct:license"])) == null ? void 0 : u.altLabel
302
- ) || "",
303
- label: d(
304
- (b = o(e["dct:license"])) == null ? void 0 : b.prefLabel
305
- ) || "",
306
- title: d(
307
- (g = o(e["dct:license"])) == null ? void 0 : g.prefLabel
308
- ) || ""
309
- }
310
- ] : [],
311
- "dct:accessRights": e["dct:accessRights"] ? o(T(e["dct:accessRights"])) : [],
336
+ "dct:license": e["dct:license"] ? [{
337
+ isValid: !0,
338
+ uri: ((u = o(e["dct:license"])) == null ? void 0 : u["@id"]) || "",
339
+ "dcterms:license": d((f = o(e["dct:license"])) == null ? void 0 : f.altLabel) || "",
340
+ label: d((m = o(e["dct:license"])) == null ? void 0 : m.prefLabel) || "",
341
+ title: d((g = o(e["dct:license"])) == null ? void 0 : g.prefLabel) || ""
342
+ }] : [],
343
+ "dct:accessRights": p(o(e["dct:accessRights"])),
312
344
  "dcatap:availability": {
313
345
  // Redundant label and title for better compatibility
314
- label: ((m = o(e["dcatap:availability"])) == null ? void 0 : m.prefLabel) || "",
315
- title: ((B = o(e["dcatap:availability"])) == null ? void 0 : B.prefLabel) || "",
316
- uri: ((h = o(e["dcatap:availability"])) == null ? void 0 : h["@id"]) || ""
346
+ label: ((b = o(e["dcatap:availability"])) == null ? void 0 : b.prefLabel) || "",
347
+ title: ((L = o(e["dcatap:availability"])) == null ? void 0 : L.prefLabel) || "",
348
+ uri: ((T = o(e["dcatap:availability"])) == null ? void 0 : T["@id"]) || ""
317
349
  },
318
- "dct:language": ((R = e["dct:language"]) == null ? void 0 : R.map((L) => T(L)).filter(Boolean)) || [],
319
- "dcat:mediaType": k({
350
+ "dct:language": ((v = e["dct:language"]) == null ? void 0 : v.map((h) => x(h)).filter(Boolean)) || [],
351
+ "dcat:mediaType": E({
320
352
  label: d(
321
- (v = o(e["dcat:mediaType"])) == null ? void 0 : v.prefLabel
353
+ (B = o(e["dcat:mediaType"])) == null ? void 0 : B.prefLabel
322
354
  ) || "",
323
- uri: ((P = o(e["dcat:mediaType"])) == null ? void 0 : P["@id"]) || ""
355
+ uri: ((I = o(e["dcat:mediaType"])) == null ? void 0 : I["@id"]) || ""
324
356
  }),
325
- "dcat:compressFormat": k({
357
+ "dcat:compressFormat": E({
326
358
  label: d(
327
- (w = o(e["dcat:compressFormat"])) == null ? void 0 : w.prefLabel
359
+ (S = o(e["dcat:compressFormat"])) == null ? void 0 : S.prefLabel
328
360
  ) || "",
329
- uri: ((l = o(e["dcat:compressFormat"])) == null ? void 0 : l["@id"]) || ""
361
+ uri: ((V = o(e["dcat:compressFormat"])) == null ? void 0 : V["@id"]) || ""
330
362
  }),
331
- "dcat:packageFormat": k({
363
+ "dcat:packageFormat": E({
332
364
  label: d(
333
- (y = o(e["dcat:packageFormat"])) == null ? void 0 : y.prefLabel
365
+ (l = o(e["dcat:packageFormat"])) == null ? void 0 : l.prefLabel
334
366
  ) || "",
335
- uri: ((I = o(e["dcat:packageFormat"])) == null ? void 0 : I["@id"]) || ""
367
+ uri: ((D = o(e["dcat:packageFormat"])) == null ? void 0 : D["@id"]) || ""
336
368
  }),
337
- "adms:status": ((D = o(e["adms:status"])) == null ? void 0 : D["@id"]) || "",
369
+ "adms:status": ((P = o(e["adms:status"])) == null ? void 0 : P["@id"]) || "",
338
370
  checksum: {
339
- title: f(o(i == null ? void 0 : i["spdx:checksumValue"])),
340
- "spdx:checksum": ((U = f(o(i == null ? void 0 : i["spdx:algorithm"]))) == null ? void 0 : U.split("_").pop()) || "",
341
- uri: (V = f(
342
- o(i == null ? void 0 : i["spdx:algorithm"])
343
- )) == null ? void 0 : V.replace("spdx:", "http://spdx.org/rdf/terms#")
371
+ title: p(o(r == null ? void 0 : r["spdx:checksumValue"])),
372
+ "spdx:checksum": ((A = p(o(r == null ? void 0 : r["spdx:algorithm"]))) == null ? void 0 : A.split("_").pop()) || "",
373
+ uri: (n = p(
374
+ o(r == null ? void 0 : r["spdx:algorithm"])
375
+ )) == null ? void 0 : n.replace("spdx:", "http://spdx.org/rdf/terms#")
344
376
  },
345
377
  accessServices: ye(e["dcat:accessService"] || []),
346
- documentations: he(e["foaf:page"] || []),
347
- conformsToItems: (x = e["dct:conformsTo"]) == null ? void 0 : x.map((L, M) => ({
378
+ conformsToItems: (y = e["dct:conformsTo"]) == null ? void 0 : y.map((h, j) => ({
348
379
  // for some reason dct:conformsTo is different from the one on dcat:dataset level
349
- id: M + 1,
350
- "dcat:accessURL": L["@id"],
351
- "dct:title": d(L["rdfs:label"]) || "",
352
- "dcat:downloadURL": L["@id"],
380
+ id: j + 1,
381
+ "dcat:accessURL": h["@id"],
382
+ "dct:title": d(h["rdfs:label"]) || "",
383
+ "dcat:downloadURL": h["@id"],
353
384
  // redundancy to match properties on dcat:dataset level
354
- "rdfs:label": d(L["rdfs:label"]) || "",
355
- uri: L["@id"]
385
+ "rdfs:label": d(h["rdfs:label"]) || "",
386
+ uri: h["@id"]
356
387
  })).filter(Boolean)
357
388
  };
358
389
  }
359
390
  function pe(e) {
360
- const r = {
391
+ const i = {
361
392
  "dcat:distribution": []
362
393
  };
363
394
  if (e["dcat:distribution"]) {
364
- const i = z(e["dcat:distribution"]);
365
- r["dcat:distribution"] = i.map((t, n) => ue(t, n)).filter((t) => Object.keys(t).length > 0);
395
+ const r = M(e["dcat:distribution"]);
396
+ i["dcat:distribution"] = r.map((t, a) => fe(t, a)).filter((t) => Object.keys(t).length > 0);
366
397
  }
367
- return console.log(r), r;
398
+ return console.log(i), i;
368
399
  }
369
400
  function me(e) {
370
401
  return {
@@ -372,148 +403,123 @@ function me(e) {
372
403
  };
373
404
  }
374
405
  function be(e) {
375
- var i, t, n, p, c, u, b, g, m, B, h, R, v, P, w, l, y, I, D, U, V, x, L, M, E, G, C;
376
- const r = {
377
- "dct:language": (i = e["dct:language"]) == null ? void 0 : i.map((a) => T(a)).filter(Boolean),
378
- "dct:conformsTo": (t = e["dct:conformsTo"]) == null ? void 0 : t.map((a) => ({
379
- "rdfs:label": d(a["rdfs:label"]) || "",
380
- "@id": a["@id"]
406
+ var r, t, a, R, u, f, m, g, b, L, T, v, B, I, S, V, l, D, P, A, n, y, h, j, C, G, q;
407
+ const i = {
408
+ "dct:language": (r = e["dct:language"]) == null ? void 0 : r.map((c) => x(c)).filter(Boolean),
409
+ "dct:conformsTo": (t = e["dct:conformsTo"]) == null ? void 0 : t.map((c) => ({
410
+ "rdfs:label": d(c["rdfs:label"]) || "",
411
+ "@id": c["@id"]
381
412
  })).filter(Boolean),
382
- "dct:accessRights": e["dct:accessRights"] ? s(T(e["dct:accessRights"])) : [],
383
- "dct:provenance": (n = e["dct:provenance"]) == null ? void 0 : n.map((a) => ({
384
- "rdfs:label": d(a["rdfs:label"]) || "",
385
- uri: a["@id"]
413
+ "dct:accessRights": e["dct:accessRights"] ? s(x(e["dct:accessRights"])) : [],
414
+ "dct:provenance": (a = e["dct:provenance"]) == null ? void 0 : a.map((c) => ({
415
+ "rdfs:label": d(c["rdfs:label"]) || "",
416
+ uri: c["@id"]
386
417
  })).filter(Boolean),
387
- "dct:accrualPeriodicity": e["dct:accrualPeriodicity"] ? s(T(e["dct:accrualPeriodicity"])) : [],
388
- "dct:type": (p = e["dct:type"]) == null ? void 0 : p.map((a) => T(a)).filter(Boolean),
389
- "dcat:spatialResolutionInMeters": ((c = e["dcat:spatialResolutionInMeters"]) == null ? void 0 : c.map(N)) || void 0,
390
- "dcat:temporalResolution": e["dcat:temporalResolution"] ? e["dcat:temporalResolution"].map(N).map((a) => {
391
- const F = a["@value"].match(
392
- /^P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?)?$/
393
- );
394
- if (F) {
395
- const [, O, _, Y, $, J, Q] = F.map(
396
- (W) => W || "0"
397
- );
398
- return {
399
- Year: O,
400
- Month: _,
401
- Day: Y,
402
- Hour: $,
403
- Minute: J,
404
- Second: Q
405
- };
418
+ "dct:accrualPeriodicity": e["dct:accrualPeriodicity"] ? s(x(e["dct:accrualPeriodicity"])) : [],
419
+ "dct:type": (R = e["dct:type"]) == null ? void 0 : R.map((c) => x(c)).filter(Boolean),
420
+ "dcat:spatialResolutionInMeters": ((u = e["dcat:spatialResolutionInMeters"]) == null ? void 0 : u.map(N)) || void 0,
421
+ "dcat:temporalResolution": e["dcat:temporalResolution"] ? e["dcat:temporalResolution"].map(N).map((c) => {
422
+ const _ = c["@value"].match(/^P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?)?$/);
423
+ if (_) {
424
+ const [, O, k, Y, $, J, Q] = _.map((W) => W || "0");
425
+ return { Year: O, Month: k, Day: Y, Hour: $, Minute: J, Second: Q };
406
426
  }
407
427
  }).filter(Boolean) : void 0,
408
- "dcat:qualifiedRelation": (u = s(
428
+ "dcat:qualifiedRelation": (f = s(
409
429
  e["dcat:qualifiedRelation"]
410
- )) == null ? void 0 : u.filter(Boolean),
411
- "dct:creator": (b = s(e["dct:creator"])) == null ? void 0 : b.filter(Boolean),
430
+ )) == null ? void 0 : f.filter(Boolean),
431
+ "dct:creator": (m = s(e["dct:creator"])) == null ? void 0 : m.filter(Boolean),
412
432
  "dct:contributor": (g = s(e["dct:contributor"])) == null ? void 0 : g.filter(Boolean),
413
- "dcatde:contributorID": (m = e["dcatapde:contributorID"]) == null ? void 0 : m.map((a) => T(a)).filter(Boolean),
414
- "dcatde:geocodingDescription": (B = s(
433
+ "dcatde:contributorID": (b = e["dcatapde:contributorID"]) == null ? void 0 : b.map((c) => x(c)).filter(Boolean),
434
+ "dcatde:geocodingDescription": (L = s(
415
435
  e["dcatapde:geocodingDescription"]
416
- )) == null ? void 0 : B.filter(Boolean),
417
- "dct:identifier": (h = e["dct:identifier"]) == null ? void 0 : h.map((a) => ({
418
- "@value": a
436
+ )) == null ? void 0 : L.filter(Boolean),
437
+ "dct:identifier": (T = e["dct:identifier"]) == null ? void 0 : T.map((c) => ({
438
+ "@value": c
419
439
  })),
420
- "adms:identifier": (R = s(e["adms:identifier"])) == null ? void 0 : R.filter(Boolean),
421
- "owl:versionInfo": (v = e["owl:versionInfo"]) == null ? void 0 : v.map((a) => ({
422
- "@value": a
440
+ "adms:identifier": (v = s(e["adms:identifier"])) == null ? void 0 : v.filter(Boolean),
441
+ "owl:versionInfo": (B = e["owl:versionInfo"]) == null ? void 0 : B.map((c) => ({
442
+ "@value": c
423
443
  })),
424
444
  "adms:versionNotes": e["adms:versionNotes"],
425
- "dcatde:legalBasis": (P = s(e["dcatapde:legalBasis"])) == null ? void 0 : P.filter(
445
+ "dcatde:legalBasis": (I = s(e["dcatapde:legalBasis"])) == null ? void 0 : I.filter(
426
446
  Boolean
427
447
  ),
428
- "dct:relation": (w = s(e["dct:relation"])) == null ? void 0 : w.filter(Boolean),
429
- "dcat:landingPage": (l = s(e["dcat:landingPage"])) == null ? void 0 : l.filter(
448
+ "dct:relation": (S = s(e["dct:relation"])) == null ? void 0 : S.filter(Boolean),
449
+ "dcat:landingPage": (V = s(e["dcat:landingPage"])) == null ? void 0 : V.filter(
430
450
  Boolean
431
451
  ),
432
- "prov:wasGeneratedBy": (y = s(e["prov:wasGeneratedBy"])) == null ? void 0 : y.filter(
452
+ "prov:wasGeneratedBy": (l = s(e["prov:wasGeneratedBy"])) == null ? void 0 : l.filter(
433
453
  Boolean
434
454
  ),
435
- "dct:isReferencedBy": (I = s(e["dct:isReferencedBy"])) == null ? void 0 : I.filter(
455
+ "dct:isReferencedBy": (D = s(e["dct:isReferencedBy"])) == null ? void 0 : D.filter(
436
456
  Boolean
437
457
  ),
438
- "dct:source": (D = s(e["dct:source"])) == null ? void 0 : D.filter(Boolean),
439
- "dct:hasVersion": (U = s(e["dct:hasVersion"])) == null ? void 0 : U.filter(Boolean),
440
- "dct:isVersionOf": (V = s(e["dct:isVersionOf"])) == null ? void 0 : V.filter(Boolean),
441
- "prov:qualifiedAttribution": (x = s(
458
+ "dct:source": (P = s(e["dct:source"])) == null ? void 0 : P.filter(Boolean),
459
+ "dct:hasVersion": (A = s(e["dct:hasVersion"])) == null ? void 0 : A.filter(Boolean),
460
+ "dct:isVersionOf": (n = s(e["dct:isVersionOf"])) == null ? void 0 : n.filter(Boolean),
461
+ "prov:qualifiedAttribution": (y = s(
442
462
  e["prov:qualifiedAttribution"]
443
- )) == null ? void 0 : x.filter(Boolean),
444
- "dcat:keyword": (L = s(e["dcat:keyword"])) == null ? void 0 : L.filter(Boolean),
445
- "dct:spatial": (M = s(e["dct:spatial"])) == null ? void 0 : M.filter(Boolean),
446
- "dct:references": (E = s(e["dct:references"])) == null ? void 0 : E.filter(Boolean),
447
- "foaf:page": (G = s(e["foaf:page"])) == null ? void 0 : G.filter(Boolean).map((a) => {
448
- if (!a) return;
449
- const A = o(a["dct:format"]);
463
+ )) == null ? void 0 : y.filter(Boolean),
464
+ "dcat:keyword": (h = s(e["dcat:keyword"])) == null ? void 0 : h.filter(Boolean),
465
+ "dct:spatial": (j = s(e["dct:spatial"])) == null ? void 0 : j.filter(Boolean),
466
+ "dct:references": (C = s(e["dct:references"])) == null ? void 0 : C.filter(Boolean),
467
+ "foaf:page": (G = s(e["foaf:page"])) == null ? void 0 : G.filter(Boolean).map((c) => {
468
+ if (!c)
469
+ return;
470
+ const w = o(c["dct:format"]);
450
471
  return {
451
- "dct:title": o(a["dct:title"]),
452
- "dct:description": o(a["dct:description"]),
453
- "@value": A ? d(A.prefLabel) : "",
454
- uri: A ? A["@id"] : "",
455
- "foaf:homepage": o(a["foaf:homepage"]) || ""
472
+ "dct:title": o(c["dct:title"]),
473
+ "dct:description": o(c["dct:description"]),
474
+ "@value": w ? d(w.prefLabel) : "",
475
+ uri: w ? w["@id"] : "",
476
+ "foaf:homepage": o(c["foaf:homepage"]) || ""
456
477
  };
457
478
  }),
458
- "dcatap:availability": (C = e["dcatap:availability"]) == null ? void 0 : C.map((a) => {
459
- var A, F, O, _;
479
+ "dcatap:availability": (q = e["dcatap:availability"]) == null ? void 0 : q.map((c) => {
480
+ var w, _, O, k;
460
481
  return {
461
482
  // Redundant label and title for better compatibility
462
- label: ((A = o(a)) == null ? void 0 : A.prefLabel) || "",
463
- title: ((F = o(a)) == null ? void 0 : F.prefLabel) || "",
464
- uri: ((O = o(a)) == null ? void 0 : O["@id"]) || "",
465
- "@value": d((_ = o(a)) == null ? void 0 : _.prefLabel) || ""
483
+ label: ((w = o(c)) == null ? void 0 : w.prefLabel) || "",
484
+ title: ((_ = o(c)) == null ? void 0 : _.prefLabel) || "",
485
+ uri: ((O = o(c)) == null ? void 0 : O["@id"]) || "",
486
+ "@value": d((k = o(c)) == null ? void 0 : k.prefLabel) || ""
466
487
  };
467
488
  })
468
489
  };
469
- return ae(r);
490
+ return ne(i);
470
491
  }
471
- function ge(e) {
492
+ function ge(e, i) {
472
493
  return {
473
494
  Landing: de(),
474
- Discoverability: le(e),
495
+ Discoverability: le(e, i),
475
496
  BasicInfos: se(e),
476
- Covering: fe(e),
497
+ Covering: ue(e),
477
498
  DistributionSimple: pe(e),
478
499
  ReviewAndPublish: me(),
479
500
  Additionals: be(e)
480
501
  };
481
502
  }
482
503
  function ye(e) {
483
- return !e || !Array.isArray(e) || e.length === 0 ? [] : e.map((r, i) => {
484
- var t, n;
485
- return {
486
- id: i + 1,
487
- "dcat:downloadURL": ((t = o(r["dcat:endpointURL"])) == null ? void 0 : t["@id"]) || "",
488
- "dcat:endpointURL": ((n = o(r["dcat:endpointURL"])) == null ? void 0 : n["@id"]) || "",
489
- "dct:description": d(r["dct:description"]) || "",
490
- "dct:title": d(r["dct:title"]) || ""
491
- };
492
- });
493
- }
494
- function he(e) {
495
- return !e || !Array.isArray(e) || e.length === 0 ? [] : e.map((r, i) => {
496
- var t, n, p, c;
504
+ return !e || !Array.isArray(e) || e.length === 0 ? [] : e.map((i, r) => {
505
+ var t, a;
497
506
  return {
498
- id: i + 1,
499
- "dcat:downloadURL": ((t = o(r["dcat:accessURL"])) == null ? void 0 : t["@id"]) || "",
500
- "dcat:accessURL": ((n = o(r["dcat:accessURL"])) == null ? void 0 : n["@id"]) || "",
501
- "dct:description": d(r["dct:description"]) || "",
502
- "dct:title": d(r["dct:title"]) || "",
503
- "dct:format": r["dct:format"] && ((p = T(o(r["dct:format"]))) == null ? void 0 : p.label) || "",
504
- formatUri: r["dct:format"] && ((c = T(o(r["dct:format"]))) == null ? void 0 : c.uri) || ""
507
+ id: r + 1,
508
+ "dcat:downloadURL": ((t = o(i["dcat:endpointURL"])) == null ? void 0 : t["@id"]) || "",
509
+ "dcat:endpointURL": ((a = o(i["dcat:endpointURL"])) == null ? void 0 : a["@id"]) || "",
510
+ "dct:description": d(i["dct:description"]) || "",
511
+ "dct:title": d(i["dct:title"]) || ""
505
512
  };
506
513
  });
507
514
  }
508
515
  export {
509
516
  s as asSomeArray,
510
517
  d as extractLocalizedString,
511
- f as extractStringValue,
518
+ p as extractStringValue,
512
519
  o as getFirstItem,
513
- z as normalizeToArray,
514
- ae as purgeNullishAndEmptyProperties,
520
+ M as normalizeToArray,
521
+ ne as purgeNullishAndEmptyProperties,
515
522
  ye as toAccessService,
516
- he as toDocument,
517
523
  ge as toDpi,
518
- Te as useDpiSimpleLoader
524
+ De as useDpiSimpleLoader
519
525
  };