@piveau/dpi 0.2.0-alpha.72 → 0.2.0-alpha.74

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.
@@ -2,7 +2,7 @@ import { datasetResolvers as ee, defineJsonldResolver as te, dcatDatasetTransfor
2
2
  import { useAsyncState as ie } from "@vueuse/core";
3
3
  import { isEmpty as ae } from "lodash-es";
4
4
  import { toRef as oe, ref as ne, toValue as k, computed as E, watch as N } from "vue";
5
- function z(e) {
5
+ function F(e) {
6
6
  return e == null ? [] : Array.isArray(e) ? e : [e];
7
7
  }
8
8
  function a(e) {
@@ -20,12 +20,12 @@ function ce(e) {
20
20
  );
21
21
  }
22
22
  function Te(e, t) {
23
- const { enabled: r, hubSearchUrl: i } = t, o = oe(r), b = [...ee()].filter((f) => f.name !== "licence"), { safeTransform: l } = te({
23
+ const { enabled: r, hubSearchUrl: i } = t, n = oe(r), g = [...ee()].filter((f) => f.name !== "licence"), { safeTransform: l } = te({
24
24
  baseUrl: i,
25
- resolvers: b,
25
+ resolvers: g,
26
26
  transformer: re
27
27
  }), s = ne([]), {
28
- state: p,
28
+ state: m,
29
29
  isReady: y,
30
30
  isLoading: h,
31
31
  error: v,
@@ -90,25 +90,25 @@ function Te(e, t) {
90
90
  null,
91
91
  { immediate: !1 }
92
92
  ), L = E(
93
- () => o.value && !h.value && !!y.value
93
+ () => n.value && !h.value && !!y.value
94
94
  ), B = E(
95
- () => o.value && !!L.value
95
+ () => n.value && !!L.value
96
96
  ), U = E(() => B.value), I = E(() => {
97
97
  var f;
98
- return (f = p.value) == null ? void 0 : f.dpiData;
98
+ return (f = m.value) == null ? void 0 : f.dpiData;
99
99
  }), S = E(() => {
100
100
  var f;
101
- return (f = p.value) == null ? void 0 : f.data;
101
+ return (f = m.value) == null ? void 0 : f.data;
102
102
  });
103
103
  return N(
104
104
  () => k(e),
105
- (f) => f && o.value ? T() : null
105
+ (f) => f && n.value ? T() : null
106
106
  ), N(S, (f) => {
107
107
  console.log("jsonld resolved result:", f);
108
108
  }), N(v, (f) => {
109
109
  console.log("jsonld error:", f);
110
110
  }), {
111
- processedInput: p,
111
+ processedInput: m,
112
112
  isProcessedInputReady: L,
113
113
  result: I,
114
114
  isMaterialized: B,
@@ -116,7 +116,7 @@ function Te(e, t) {
116
116
  errors: s
117
117
  };
118
118
  }
119
- function m(e) {
119
+ function b(e) {
120
120
  if (typeof e == "string")
121
121
  return e;
122
122
  if (e && typeof e == "object") {
@@ -136,14 +136,14 @@ function d(e, t = "de") {
136
136
  return e[t] || (e == null ? void 0 : e.en) || Object.values(e)[0] || "";
137
137
  if (Array.isArray(e)) {
138
138
  const r = e.find(
139
- (o) => o["@language"] === t
139
+ (n) => n["@language"] === t
140
140
  );
141
141
  if (r)
142
142
  return r["@value"] || "";
143
143
  const i = e[0];
144
- return (i == null ? void 0 : i["@value"]) || m(i) || "";
144
+ return (i == null ? void 0 : i["@value"]) || b(i) || "";
145
145
  }
146
- return e["@language"] && e["@value"] ? e["@value"] : m(e);
146
+ return e["@language"] && e["@value"] ? e["@value"] : b(e);
147
147
  }
148
148
  function q(e) {
149
149
  return {
@@ -163,39 +163,39 @@ function H(e) {
163
163
  "@value": e
164
164
  } : e;
165
165
  }
166
- function F(e, t = !0) {
166
+ function _(e, t = !0) {
167
167
  return {
168
168
  isValid: t,
169
169
  ...e
170
170
  };
171
171
  }
172
172
  function X(e, t = "de") {
173
- return e ? z(e).map((i) => typeof i == "string" ? F({
173
+ return e ? F(e).map((i) => typeof i == "string" ? _({
174
174
  "@value": i,
175
175
  "@language": t
176
- }) : i && typeof i == "object" ? i["@language"] && i["@value"] ? F({
176
+ }) : i && typeof i == "object" ? i["@language"] && i["@value"] ? _({
177
177
  "@value": i["@value"],
178
178
  "@language": i["@language"]
179
- }) : F({
180
- "@value": m(i),
179
+ }) : _({
180
+ "@value": b(i),
181
181
  "@language": t
182
- }) : F({
182
+ }) : _({
183
183
  "@value": "",
184
184
  "@language": t
185
185
  })) : [];
186
186
  }
187
187
  function de(e, t) {
188
- return e ? z(e).map(
189
- (i) => F({
188
+ return e ? F(e).map(
189
+ (i) => _({
190
190
  "@type": t,
191
- "@value": m(i)
191
+ "@value": b(i)
192
192
  })
193
193
  ) : [];
194
194
  }
195
195
  function Y(e, t) {
196
196
  const r = { isValid: !0 };
197
- for (const [i, o] of Object.entries(t))
198
- r[i] = m(e == null ? void 0 : e[o]);
197
+ for (const [i, n] of Object.entries(t))
198
+ r[i] = b(e == null ? void 0 : e[n]);
199
199
  return r;
200
200
  }
201
201
  function le(e) {
@@ -208,22 +208,22 @@ function se(e, t) {
208
208
  discoverabilityPage: [{ isValid: !0 }]
209
209
  };
210
210
  if (e["dcatap:hvdCategory"]) {
211
- const i = z(e["dcatap:hvdCategory"]).filter(Boolean);
212
- r.hvdPage = i == null ? void 0 : i.map((o) => ({
211
+ const i = F(e["dcatap:hvdCategory"]).filter(Boolean);
212
+ r.hvdPage = i == null ? void 0 : i.map((n) => ({
213
213
  isValid: !0,
214
- uri: o["@id"],
215
- label: d(o.prefLabel)
214
+ uri: n["@id"],
215
+ label: d(n.prefLabel)
216
216
  }));
217
217
  }
218
218
  if (e["dcat:theme"]) {
219
- const i = z(e["dcat:theme"]);
219
+ const i = F(e["dcat:theme"]);
220
220
  r.discoverabilityPage = [
221
221
  { isValid: !0 },
222
222
  ...i.map(
223
- (o) => F({
224
- id: m(o).split("/").pop(),
225
- uri: m(o),
226
- label: d(o.prefLabel)
223
+ (n) => _({
224
+ id: b(n).split("/").pop(),
225
+ uri: b(n),
226
+ label: d(n.prefLabel)
227
227
  })
228
228
  )
229
229
  ];
@@ -251,9 +251,9 @@ function fe(e) {
251
251
  e["dct:modified"],
252
252
  "http://www.w3.org/2001/XMLSchema#date"
253
253
  )), e["dct:publisher"]) {
254
- const o = a(e["dct:publisher"]);
254
+ const n = a(e["dct:publisher"]);
255
255
  r["dct:publisher"] = [
256
- Y(o, {
256
+ Y(n, {
257
257
  "foaf:name": "foaf:name",
258
258
  "foaf:mbox": "foaf:mbox",
259
259
  "foaf:homepage": "foaf:homepage"
@@ -261,9 +261,9 @@ function fe(e) {
261
261
  ];
262
262
  }
263
263
  if (e["dcat:contactPoint"]) {
264
- const o = a(e["dcat:contactPoint"]);
264
+ const n = a(e["dcat:contactPoint"]);
265
265
  r["dcat:contactPoint"] = [
266
- Y(o, {
266
+ Y(n, {
267
267
  "vcard:fn": "vcard:fn",
268
268
  "vcard:hasEmail": "vcard:hasEmail",
269
269
  "vcard:hasTelephone": "vcard:hasTelephone"
@@ -277,7 +277,7 @@ function ue(e) {
277
277
  return {
278
278
  "dcatde:politicalGeocodingURI": (t = e["dcatapde:politicalGeocodingURI"]) == null ? void 0 : t.map((i) => {
279
279
  var s;
280
- const b = {
280
+ const g = {
281
281
  districtKey: "Kreis",
282
282
  governmentDistrictKey: "Bezirk",
283
283
  municipalityKey: "Gemeindeschlüssel",
@@ -286,7 +286,7 @@ function ue(e) {
286
286
  regionalKey: "Regionalschlüssel"
287
287
  };
288
288
  let l = i["@id"].split("/").slice(-2, -1)[0];
289
- return l = b[l] || l, {
289
+ return l = g[l] || l, {
290
290
  isValid: !0,
291
291
  uri: i["@id"],
292
292
  id: ((s = i.prefLabel) == null ? void 0 : s.de) || i["@id"].split("/").pop(),
@@ -294,8 +294,8 @@ function ue(e) {
294
294
  inVoc: l
295
295
  };
296
296
  }),
297
- "dcat:temporalResolution": (r = e["dct:temporal"]) == null ? void 0 : r.reduce((i, o) => {
298
- const l = a(o["dcat:startDate"]), s = a(o["dcat:endDate"]), p = m(l) || "", y = m(s) || "", h = typeof l != "string" && (l == null ? void 0 : l["@type"]) === "http://www.w3.org/2001/XMLSchema#dateTime" ? "dateTime" : "date", v = h === "date" ? p : p.split("T")[0], T = h === "date" ? y : y.split("T")[0], L = h === "dateTime" ? p.split("T")[1] : "", B = h === "dateTime" ? y.split("T")[1] : "";
297
+ "dcat:temporalResolution": (r = e["dct:temporal"]) == null ? void 0 : r.reduce((i, n) => {
298
+ const l = a(n["dcat:startDate"]), s = a(n["dcat:endDate"]), m = b(l) || "", y = b(s) || "", h = typeof l != "string" && (l == null ? void 0 : l["@type"]) === "http://www.w3.org/2001/XMLSchema#dateTime" ? "dateTime" : "date", v = h === "date" ? m : m.split("T")[0], T = h === "date" ? y : y.split("T")[0], L = h === "dateTime" ? m.split("T")[1] : "", B = h === "dateTime" ? y.split("T")[1] : "";
299
299
  return {
300
300
  isValid: !0,
301
301
  type: "dct:PeriodOfTime",
@@ -313,34 +313,34 @@ function ue(e) {
313
313
  };
314
314
  }
315
315
  function pe(e, t) {
316
- var i, o, b, l, s, p, y, h, v, T, L, B, U, I, S, f, D, A, P, c, R, x, M, j, G;
316
+ var i, n, g, l, s, m, y, h, v, T, L, B, U, I, S, f, D, A, P, c, R, x, z, M, j, G;
317
317
  if (!e)
318
318
  return {};
319
319
  const r = a(e["spdx:checksum"]);
320
320
  return {
321
321
  isValid: !0,
322
322
  id: t + 1,
323
- "dcat:accessURL": m(a(e["dcat:accessURL"])) || "",
324
- "dcat:downloadURL": ((i = e["dcat:downloadURL"]) == null ? void 0 : i.map((g) => ({
325
- "@id": m(g)
323
+ "dcat:accessURL": b(a(e["dcat:accessURL"])) || "",
324
+ "dcat:downloadURL": ((i = e["dcat:downloadURL"]) == null ? void 0 : i.map((p) => ({
325
+ "@id": b(p)
326
326
  }))) || [{ "@id": "" }],
327
327
  "dct:format": {
328
328
  // redundancy in label and title for better compatibility
329
- label: ((o = a(e["dct:format"])) == null ? void 0 : o["purl:identifier"]) || "",
330
- title: ((b = a(e["dct:format"])) == null ? void 0 : b["purl:identifier"]) || "",
329
+ label: ((n = a(e["dct:format"])) == null ? void 0 : n["purl:identifier"]) || "",
330
+ title: ((g = a(e["dct:format"])) == null ? void 0 : g["purl:identifier"]) || "",
331
331
  uri: ((l = a(e["dct:format"])) == null ? void 0 : l["@id"]) || ""
332
332
  },
333
333
  "dct:title": d(e["dct:title"]),
334
334
  "dct:description": d(e["dct:description"]),
335
- "dct:modified": m(a(e["dct:modified"])),
336
- "dct:issued": m(a(e["dct:issued"])),
337
- "dcat:byteSize": m(a(e["dcat:byteSize"])),
335
+ "dct:modified": b(a(e["dct:modified"])),
336
+ "dct:issued": b(a(e["dct:issued"])),
337
+ "dcat:byteSize": b(a(e["dcat:byteSize"])),
338
338
  "dcatde:licenseAttributionByText": d(e["dcatapde:licenseAttributionByText"]) || "",
339
339
  "dct:license": e["dct:license"] ? {
340
340
  isValid: !0,
341
341
  uri: ((s = a(e["dct:license"])) == null ? void 0 : s["@id"]) || "",
342
342
  "dcterms:license": d(
343
- (p = a(e["dct:license"])) == null ? void 0 : p.altLabel
343
+ (m = a(e["dct:license"])) == null ? void 0 : m.altLabel
344
344
  ) || "",
345
345
  label: d(
346
346
  (y = a(e["dct:license"])) == null ? void 0 : y.prefLabel
@@ -357,66 +357,69 @@ function pe(e, t) {
357
357
  title: ((L = a(e["dcatap:availability"])) == null ? void 0 : L.prefLabel) || "",
358
358
  uri: ((B = a(e["dcatap:availability"])) == null ? void 0 : B["@id"]) || ""
359
359
  },
360
- "dct:language": ((U = e["dct:language"]) == null ? void 0 : U.map((g) => V(g)).filter(Boolean)) || [],
360
+ "dct:language": ((I = (U = e["dct:language"]) == null ? void 0 : U.map((p) => V(p))) == null ? void 0 : I.map((p) => ({
361
+ ...p,
362
+ label: p["@value"] || p.label || ""
363
+ })).filter(Boolean)) || [],
361
364
  "dcat:mediaType": q({
362
365
  label: d(
363
- (I = a(e["dcat:mediaType"])) == null ? void 0 : I.prefLabel
366
+ (S = a(e["dcat:mediaType"])) == null ? void 0 : S.prefLabel
364
367
  ) || "",
365
- uri: ((S = a(e["dcat:mediaType"])) == null ? void 0 : S["@id"]) || ""
368
+ uri: ((f = a(e["dcat:mediaType"])) == null ? void 0 : f["@id"]) || ""
366
369
  }),
367
370
  "dcat:compressFormat": q({
368
371
  label: d(
369
- (f = a(e["dcat:compressFormat"])) == null ? void 0 : f.prefLabel
372
+ (D = a(e["dcat:compressFormat"])) == null ? void 0 : D.prefLabel
370
373
  ) || "",
371
- uri: ((D = a(e["dcat:compressFormat"])) == null ? void 0 : D["@id"]) || ""
374
+ uri: ((A = a(e["dcat:compressFormat"])) == null ? void 0 : A["@id"]) || ""
372
375
  }),
373
376
  "dcat:packageFormat": q({
374
377
  label: d(
375
- (A = a(e["dcat:packageFormat"])) == null ? void 0 : A.prefLabel
378
+ (P = a(e["dcat:packageFormat"])) == null ? void 0 : P.prefLabel
376
379
  ) || "",
377
- uri: ((P = a(e["dcat:packageFormat"])) == null ? void 0 : P["@id"]) || ""
380
+ uri: ((c = a(e["dcat:packageFormat"])) == null ? void 0 : c["@id"]) || ""
378
381
  }),
379
382
  "adms:status": {
380
- uri: ((c = a(e["adms:status"])) == null ? void 0 : c["@id"]) || "",
381
- "@value": d((R = a(e["adms:status"])) == null ? void 0 : R.prefLabel) || ""
383
+ uri: ((R = a(e["adms:status"])) == null ? void 0 : R["@id"]) || "",
384
+ "@value": d((x = a(e["adms:status"])) == null ? void 0 : x.prefLabel) || ""
382
385
  },
383
386
  checksum: {
384
- title: m(a(r == null ? void 0 : r["spdx:checksumValue"])),
385
- "spdx:checksum": ((x = m(a(r == null ? void 0 : r["spdx:algorithm"]))) == null ? void 0 : x.split("_").pop()) || "",
386
- uri: (M = m(
387
+ title: b(a(r == null ? void 0 : r["spdx:checksumValue"])),
388
+ "spdx:checksum": ((z = b(a(r == null ? void 0 : r["spdx:algorithm"]))) == null ? void 0 : z.split("_").pop()) || "",
389
+ uri: (M = b(
387
390
  a(r == null ? void 0 : r["spdx:algorithm"])
388
391
  )) == null ? void 0 : M.replace("spdx:", "http://spdx.org/rdf/terms#")
389
392
  },
390
393
  accessServices: he(e["dcat:accessService"] || []),
391
- conformsToItems: (j = e["dct:conformsTo"]) == null ? void 0 : j.map((g, _) => ({
394
+ conformsToItems: (j = e["dct:conformsTo"]) == null ? void 0 : j.map((p, o) => ({
392
395
  // for some reason dct:conformsTo is different from the one on dcat:dataset level
393
- id: _ + 1,
394
- "dcat:accessURL": g["@id"],
395
- "dct:title": d(g["rdfs:label"]) || "",
396
- "dcat:downloadURL": g["@id"],
396
+ id: o + 1,
397
+ "dcat:accessURL": p["@id"],
398
+ "dct:title": d(p["rdfs:label"]) || "",
399
+ "dcat:downloadURL": p["@id"],
397
400
  // redundancy to match properties on dcat:dataset level
398
- "rdfs:label": d(g["rdfs:label"]) || "",
399
- uri: g["@id"]
401
+ "rdfs:label": d(p["rdfs:label"]) || "",
402
+ uri: p["@id"]
400
403
  })).filter(Boolean),
401
- policyItems: ((G = e["odrl:hasPolicy"]) == null ? void 0 : G.map((g, _) => ({
404
+ policyItems: ((G = e["odrl:hasPolicy"]) == null ? void 0 : G.map((p, o) => ({
402
405
  // don't ask
403
- id: _ + 1,
404
- "dcat:downloadURL": g["@id"],
405
- "dcat:accessURL": g["@id"]
406
+ id: o + 1,
407
+ "dcat:downloadURL": p["@id"],
408
+ "dcat:accessURL": p["@id"]
406
409
  }))) || [{ id: 1, "dcat:downloadURL": "", "dcat:accessURL": "" }],
407
410
  documentations: Re(e["foaf:page"] || [])
408
411
  };
409
412
  }
410
413
  function me(e) {
411
- var r, i, o, b, l;
414
+ var r, i, n, g, l;
412
415
  const t = {
413
416
  "dcat:distribution": []
414
417
  };
415
418
  if (e["dcat:distribution"]) {
416
- const s = z(e["dcat:distribution"]);
417
- t["dcat:distribution"] = s.map((p, y) => pe(p, y)).filter((p) => Object.keys(p).length > 0);
419
+ const s = F(e["dcat:distribution"]);
420
+ t["dcat:distribution"] = s.map((m, y) => pe(m, y)).filter((m) => Object.keys(m).length > 0);
418
421
  }
419
- return t["dct:license"] = [{ ...(i = (r = e["dcat:distribution"]) == null ? void 0 : r[0]) == null ? void 0 : i["dct:license"], "dcterms:license": d((l = (b = (o = e["dcat:distribution"]) == null ? void 0 : o[0]) == null ? void 0 : b["dct:license"]) == null ? void 0 : l.altLabel) }], console.log(t), t;
422
+ return t["dct:license"] = [{ ...(i = (r = e["dcat:distribution"]) == null ? void 0 : r[0]) == null ? void 0 : i["dct:license"], "dcterms:license": d((l = (g = (n = e["dcat:distribution"]) == null ? void 0 : n[0]) == null ? void 0 : g["dct:license"]) == null ? void 0 : l.altLabel) }], console.log(t), t;
420
423
  }
421
424
  function be(e) {
422
425
  return {
@@ -424,28 +427,28 @@ function be(e) {
424
427
  };
425
428
  }
426
429
  function ge(e) {
427
- var r, i, o, b, l, s, p, y, h, v, T, L, B, U, I, S, f, D, A, P, c, R, x, M, j, G, g, _;
430
+ var r, i, n, g, l, s, m, y, h, v, T, L, B, U, I, S, f, D, A, P, c, R, x, z, M, j, G, p;
428
431
  const t = {
429
- "dct:language": (r = e["dct:language"]) == null ? void 0 : r.map((n) => V(n)).filter(Boolean),
430
- "dcatde:politicalGeocodingLevelURI": (i = e["dcatapde:politicalGeocodingLevelURI"]) == null ? void 0 : i.map((n) => ({
431
- uri: n["@id"],
432
- "@value": d(n.prefLabel)
432
+ "dct:language": (r = e["dct:language"]) == null ? void 0 : r.map((o) => V(o)).filter(Boolean),
433
+ "dcatde:politicalGeocodingLevelURI": (i = e["dcatapde:politicalGeocodingLevelURI"]) == null ? void 0 : i.map((o) => ({
434
+ uri: o["@id"],
435
+ "@value": d(o.prefLabel)
433
436
  })),
434
- "dct:conformsTo": (o = e["dct:conformsTo"]) == null ? void 0 : o.map((n) => ({
435
- "rdfs:label": d(n["rdfs:label"]) || "",
436
- "@id": n["@id"]
437
+ "dct:conformsTo": (n = e["dct:conformsTo"]) == null ? void 0 : n.map((o) => ({
438
+ "rdfs:label": d(o["rdfs:label"]) || "",
439
+ "@id": o["@id"]
437
440
  })).filter(Boolean),
438
441
  "dct:accessRights": e["dct:accessRights"] ? u(V(e["dct:accessRights"])) : [],
439
- "dct:issued": z(e["dct:issued"]),
440
- "dct:provenance": (b = e["dct:provenance"]) == null ? void 0 : b.map((n) => ({
441
- "rdfs:label": d(n["rdfs:label"]) || "",
442
- uri: n["@id"]
442
+ "dct:issued": F(e["dct:issued"]),
443
+ "dct:provenance": (g = e["dct:provenance"]) == null ? void 0 : g.map((o) => ({
444
+ "rdfs:label": d(o["rdfs:label"]) || "",
445
+ uri: o["@id"]
443
446
  })).filter(Boolean),
444
447
  "dct:accrualPeriodicity": e["dct:accrualPeriodicity"] ? u(V(e["dct:accrualPeriodicity"])) : [],
445
- "dct:type": (l = e["dct:type"]) == null ? void 0 : l.map((n) => V(n)).filter(Boolean),
448
+ "dct:type": (l = e["dct:type"]) == null ? void 0 : l.map((o) => V(o)).filter(Boolean),
446
449
  "dcat:spatialResolutionInMeters": ((s = e["dcat:spatialResolutionInMeters"]) == null ? void 0 : s.map(H)) || void 0,
447
- "dcat:temporalResolution": e["dcat:temporalResolution"] ? e["dcat:temporalResolution"].map(H).map((n) => {
448
- const O = n["@value"].match(
450
+ "dcat:temporalResolution": e["dcat:temporalResolution"] ? e["dcat:temporalResolution"].map(H).map((o) => {
451
+ const O = o["@value"].match(
449
452
  /^P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?)?$/
450
453
  );
451
454
  if (O) {
@@ -462,21 +465,21 @@ function ge(e) {
462
465
  ];
463
466
  }
464
467
  }).filter(Boolean).flat() : void 0,
465
- "dcat:qualifiedRelation": (p = u(
468
+ "dcat:qualifiedRelation": (m = u(
466
469
  e["dcat:qualifiedRelation"]
467
- )) == null ? void 0 : p.filter(Boolean),
470
+ )) == null ? void 0 : m.filter(Boolean),
468
471
  "dct:creator": (y = u(e["dct:creator"])) == null ? void 0 : y.filter(Boolean),
469
472
  "dct:contributor": (h = u(e["dct:contributor"])) == null ? void 0 : h.filter(Boolean),
470
- "dcatde:contributorID": (v = e["dcatapde:contributorID"]) == null ? void 0 : v.map((n) => V(n)).filter(Boolean),
473
+ "dcatde:contributorID": (v = e["dcatapde:contributorID"]) == null ? void 0 : v.map((o) => V(o)).filter(Boolean),
471
474
  "dcatde:geocodingDescription": (T = u(
472
475
  e["dcatapde:geocodingDescription"]
473
476
  )) == null ? void 0 : T.filter(Boolean),
474
- "dct:identifier": (L = e["dct:identifier"]) == null ? void 0 : L.map((n) => ({
475
- "@value": n
477
+ "dct:identifier": (L = e["dct:identifier"]) == null ? void 0 : L.map((o) => ({
478
+ "@value": o
476
479
  })),
477
480
  "adms:identifier": (B = u(e["adms:identifier"])) == null ? void 0 : B.filter(Boolean),
478
- "owl:versionInfo": (U = e["owl:versionInfo"]) == null ? void 0 : U.map((n) => ({
479
- "@value": n
481
+ "owl:versionInfo": (U = e["owl:versionInfo"]) == null ? void 0 : U.map((o) => ({
482
+ "@value": o
480
483
  })),
481
484
  "adms:versionNotes": e["adms:versionNotes"],
482
485
  "dcatde:legalBasis": (I = u(e["dcatapde:legalBasis"])) == null ? void 0 : I.filter(
@@ -498,32 +501,32 @@ function ge(e) {
498
501
  "prov:qualifiedAttribution": (x = u(
499
502
  e["prov:qualifiedAttribution"]
500
503
  )) == null ? void 0 : x.filter(Boolean),
501
- "dcat:keyword": (M = u(e["dcat:keyword"])) == null ? void 0 : M.filter(Boolean),
502
- "dct:spatial": (j = u(e["dct:spatial"])) == null ? void 0 : j.filter((n) => n ? !n["@id"].startsWith(
504
+ "dcat:keyword": (z = u(e["dcat:keyword"])) == null ? void 0 : z.filter(Boolean),
505
+ "dct:spatial": (M = u(e["dct:spatial"])) == null ? void 0 : M.filter((o) => o ? !o["@id"].startsWith(
503
506
  "http://dcat-ap.de/def/politicalGeocoding/"
504
507
  ) : !1).filter(Boolean),
505
- "dct:references": (G = u(e["dct:references"])) == null ? void 0 : G.filter(Boolean),
506
- "foaf:page": (g = u(e["foaf:page"])) == null ? void 0 : g.filter(Boolean).map((n) => {
507
- if (!n)
508
+ "dct:references": (j = u(e["dct:references"])) == null ? void 0 : j.filter(Boolean),
509
+ "foaf:page": (G = u(e["foaf:page"])) == null ? void 0 : G.filter(Boolean).map((o) => {
510
+ if (!o)
508
511
  return;
509
- const w = a(n["dct:format"]);
512
+ const w = a(o["dct:format"]);
510
513
  return {
511
- "dct:title": a(n["dct:title"]),
512
- "dct:description": a(n["dct:description"]),
514
+ "dct:title": a(o["dct:title"]),
515
+ "dct:description": a(o["dct:description"]),
513
516
  "@value": w ? d(w.prefLabel) : "",
514
517
  uri: w ? w["@id"] : "",
515
- "foaf:homepage": a(n["foaf:homepage"]) || ""
518
+ "foaf:homepage": a(o["foaf:homepage"]) || ""
516
519
  };
517
520
  }),
518
- "dcatap:availability": (_ = e["dcatap:availability"]) == null ? void 0 : _.map(
519
- (n) => {
521
+ "dcatap:availability": (p = e["dcatap:availability"]) == null ? void 0 : p.map(
522
+ (o) => {
520
523
  var w, O, K, C;
521
524
  return {
522
525
  // Redundant label and title for better compatibility
523
- label: ((w = a(n)) == null ? void 0 : w.prefLabel) || "",
524
- title: ((O = a(n)) == null ? void 0 : O.prefLabel) || "",
525
- uri: ((K = a(n)) == null ? void 0 : K["@id"]) || "",
526
- "@value": d((C = a(n)) == null ? void 0 : C.prefLabel) || ""
526
+ label: ((w = a(o)) == null ? void 0 : w.prefLabel) || "",
527
+ title: ((O = a(o)) == null ? void 0 : O.prefLabel) || "",
528
+ uri: ((K = a(o)) == null ? void 0 : K["@id"]) || "",
529
+ "@value": d((C = a(o)) == null ? void 0 : C.prefLabel) || ""
527
530
  };
528
531
  }
529
532
  )
@@ -543,11 +546,11 @@ function ye(e, t) {
543
546
  }
544
547
  function he(e) {
545
548
  return !e || !Array.isArray(e) || e.length === 0 ? [] : e.map((t, r) => {
546
- var i, o;
549
+ var i, n;
547
550
  return {
548
551
  id: r + 1,
549
552
  "dcat:downloadURL": ((i = a(t["dcat:endpointURL"])) == null ? void 0 : i["@id"]) || "",
550
- "dcat:endpointURL": ((o = a(t["dcat:endpointURL"])) == null ? void 0 : o["@id"]) || "",
553
+ "dcat:endpointURL": ((n = a(t["dcat:endpointURL"])) == null ? void 0 : n["@id"]) || "",
551
554
  "dct:description": d(t["dct:description"]) || "",
552
555
  "dct:title": d(t["dct:title"]) || ""
553
556
  };
@@ -555,24 +558,24 @@ function he(e) {
555
558
  }
556
559
  function Re(e) {
557
560
  return !e || !Array.isArray(e) || e.length === 0 ? [] : e.map((t, r) => {
558
- var i, o, b;
561
+ var i, n, g;
559
562
  return {
560
563
  id: r + 1,
561
564
  "dcat:downloadURL": ((i = a(t["dcat:accessURL"])) == null ? void 0 : i["@id"]) || "",
562
- "dcat:accessURL": ((o = a(t["dcat:accessURL"])) == null ? void 0 : o["@id"]) || "",
565
+ "dcat:accessURL": ((n = a(t["dcat:accessURL"])) == null ? void 0 : n["@id"]) || "",
563
566
  "dct:description": d(t["dct:description"]) || "",
564
567
  "dct:title": d(t["dct:title"]) || "",
565
568
  "dct:format": t["dct:format"] ? d(a(t["dct:format"]).prefLabel) : "",
566
- formatUri: t["dct:format"] && ((b = V(a(t["dct:format"]))) == null ? void 0 : b.uri) || ""
569
+ formatUri: t["dct:format"] && ((g = V(a(t["dct:format"]))) == null ? void 0 : g.uri) || ""
567
570
  };
568
571
  });
569
572
  }
570
573
  export {
571
574
  u as asSomeArray,
572
575
  d as extractLocalizedString,
573
- m as extractStringValue,
576
+ b as extractStringValue,
574
577
  a as getFirstItem,
575
- z as normalizeToArray,
578
+ F as normalizeToArray,
576
579
  ce as purgeNullishAndEmptyProperties,
577
580
  he as toAccessService,
578
581
  Re as toDocument,