@epam/statgpt-sdmx-toolkit 0.2.0-rc.46 → 0.2.0-rc.48
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/api/availability-api.d.ts +1 -1
- package/api/dataset-api.d.ts +1 -1
- package/api/sdmx-api-client.d.ts +2 -2
- package/api/sdmx-config.d.ts +1 -0
- package/index.cjs +2 -2
- package/index.mjs +424 -376
- package/models/index.d.ts +3 -2
- package/models/structural-metadata/codelist.d.ts +1 -1
- package/models/structural-metadata/common-artefact-properties.d.ts +1 -1
- package/models/structural-metadata/concept-scheme.d.ts +1 -1
- package/models/structural-metadata/constraints-v3.d.ts +16 -0
- package/models/structural-metadata/data-structure.d.ts +1 -1
- package/models/structural-metadata/structural-metadata-v3.d.ts +16 -0
- package/models/structural-metadata/structural-metadata.d.ts +16 -0
- package/package.json +3 -3
- package/utils/constraint.d.ts +1 -1
- package/utils/get-dimensions.d.ts +1 -1
- package/utils/get-structure-components.d.ts +2 -2
- package/utils/map-availability.d.ts +3 -0
- package/utils/time-series-count.d.ts +1 -1
- package/models/structural-metadata.d.ts +0 -16
- /package/models/{structural-metadata-base.d.ts → structural-metadata/structural-metadata-base.d.ts} +0 -0
package/index.mjs
CHANGED
|
@@ -20,8 +20,44 @@ const v = (e) => {
|
|
|
20
20
|
return `${n}:${e}${s}`;
|
|
21
21
|
};
|
|
22
22
|
var L = /* @__PURE__ */ ((e) => (e.DESCENDANTS = "descendants", e.NONE = "none", e.ALL = "all", e))(L || {}), me = /* @__PURE__ */ ((e) => (e.EXACT = "exact", e.AVAILABLE = "available", e))(me || {});
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
function Ne(e) {
|
|
24
|
+
return {
|
|
25
|
+
data: {
|
|
26
|
+
codelists: e.data.codelists,
|
|
27
|
+
conceptSchemes: e.data.conceptSchemes,
|
|
28
|
+
dataConstraints: e.data.dataConstraints?.map($e),
|
|
29
|
+
dataflows: e.data.dataflows,
|
|
30
|
+
dataStructures: e.data.dataStructures,
|
|
31
|
+
metadataStructures: e.data.metadataStructures
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
function $e(e) {
|
|
36
|
+
return {
|
|
37
|
+
...e,
|
|
38
|
+
cubeRegions: e.cubeRegions?.map(Pe)
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function Pe(e) {
|
|
42
|
+
return {
|
|
43
|
+
isIncluded: e.include,
|
|
44
|
+
memberSelection: e.keyValues.map(be)
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
function be(e) {
|
|
48
|
+
return {
|
|
49
|
+
included: e.include,
|
|
50
|
+
componentId: e.id,
|
|
51
|
+
selectionValues: e.values.map(_e)
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
function _e(e) {
|
|
55
|
+
return {
|
|
56
|
+
memberValue: e.value
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
const Oe = (e = "", t = "", n = "") => `sdmx/3.0/availability/dataflow/${e}/${t}/${n}`;
|
|
60
|
+
class yn {
|
|
25
61
|
constructor(t) {
|
|
26
62
|
this.client = t;
|
|
27
63
|
}
|
|
@@ -30,24 +66,36 @@ class En {
|
|
|
30
66
|
filters: n || [],
|
|
31
67
|
mode: me.AVAILABLE,
|
|
32
68
|
references: L.NONE
|
|
33
|
-
},
|
|
34
|
-
|
|
69
|
+
}, a = Oe(s, r, o);
|
|
70
|
+
if (this.client.config.sdmxProxyUrl) {
|
|
71
|
+
const c = await this.client.postRequest(
|
|
72
|
+
a,
|
|
73
|
+
{ body: i },
|
|
74
|
+
this.client.config.sdmxProxyUrl
|
|
75
|
+
);
|
|
76
|
+
return Ne(c);
|
|
77
|
+
}
|
|
78
|
+
return await this.client.postRequest(
|
|
79
|
+
a,
|
|
80
|
+
{ body: i },
|
|
81
|
+
this.client.config.constrainsApiUrl || this.client.config.apiUrl
|
|
82
|
+
);
|
|
35
83
|
}
|
|
36
84
|
}
|
|
37
|
-
var
|
|
38
|
-
const
|
|
85
|
+
var y = /* @__PURE__ */ ((e) => (e.CSV = "csv", e.JSON = "json", e.XML = "xml", e))(y || {}), Le = /* @__PURE__ */ ((e) => (e.ID = "id", e.NAME = "name", e.ID_NAME = "both", e))(Le || {}), Me = /* @__PURE__ */ ((e) => (e.FULL_DATASET = "full", e.DATA_IN_TABLE = "query", e))(Me || {});
|
|
86
|
+
const Ce = (e, t) => {
|
|
39
87
|
switch (e) {
|
|
40
|
-
case
|
|
88
|
+
case y.CSV:
|
|
41
89
|
return A(
|
|
42
90
|
"application/vnd.sdmx.data+csv;version=2.0.0",
|
|
43
91
|
t
|
|
44
92
|
);
|
|
45
|
-
case
|
|
93
|
+
case y.XML:
|
|
46
94
|
return A(
|
|
47
95
|
"application/vnd.sdmx.data+xml;version=3.0.0",
|
|
48
96
|
t
|
|
49
97
|
);
|
|
50
|
-
case
|
|
98
|
+
case y.JSON:
|
|
51
99
|
return A(`application/${e}`, t);
|
|
52
100
|
default:
|
|
53
101
|
return A(
|
|
@@ -57,43 +105,43 @@ const be = (e, t) => {
|
|
|
57
105
|
}
|
|
58
106
|
}, A = (e, t) => `${e}; labels=${t}`;
|
|
59
107
|
var fe = /* @__PURE__ */ ((e) => (e.REFERENCE_PARTIAL = "referencepartial", e.FULL = "full", e))(fe || {});
|
|
60
|
-
const
|
|
61
|
-
const { filterKey: s, timeFilter: r } = n, { agency: o, id: i, version:
|
|
62
|
-
return `${`${
|
|
63
|
-
},
|
|
64
|
-
class
|
|
108
|
+
const Ue = "all", xe = "sdmx/3.0/data/dataflow", ge = "&", J = ":", Ye = "=", We = "+", Tn = ",", Ve = "*", X = (e, t, n) => {
|
|
109
|
+
const { filterKey: s, timeFilter: r } = n, { agency: o, id: i, version: a } = D(e), c = [r || "", t].filter((d) => !!d).join(ge);
|
|
110
|
+
return `${`${xe}/${o}/${i}/${a}`}/${s || Ve}?${c}`;
|
|
111
|
+
}, ke = (e = "", t = "", n = "", s = L.DESCENDANTS) => `sdmx/3.0/structure/dataflow/${e}/${t}/${n}?references=${s}&detail=${fe.REFERENCE_PARTIAL}`;
|
|
112
|
+
class vn {
|
|
65
113
|
constructor(t) {
|
|
66
114
|
this.client = t;
|
|
67
115
|
}
|
|
68
116
|
async getDataSet(t, n) {
|
|
69
117
|
const { agency: s, id: r, version: o } = D(t);
|
|
70
118
|
return await this.client.getRequest(
|
|
71
|
-
|
|
119
|
+
ke(s, r, o, n)
|
|
72
120
|
);
|
|
73
121
|
}
|
|
74
122
|
async getDatasetData(t, n) {
|
|
75
123
|
const s = new URLSearchParams({
|
|
76
124
|
includeHistory: "false",
|
|
77
125
|
limit: "1000",
|
|
78
|
-
attributes:
|
|
126
|
+
attributes: Ue,
|
|
79
127
|
dimensionAtObservation: "TIME_PERIOD"
|
|
80
128
|
// TODO: use time dimensions
|
|
81
129
|
}).toString(), r = X(t, s, n);
|
|
82
130
|
return await this.client.getRequest(r);
|
|
83
131
|
}
|
|
84
|
-
async downloadDataSet(t, n, s, r, o, i,
|
|
85
|
-
const
|
|
132
|
+
async downloadDataSet(t, n, s, r, o, i, a = !1) {
|
|
133
|
+
const c = new URLSearchParams({
|
|
86
134
|
format: n,
|
|
87
135
|
compress: "false",
|
|
88
|
-
attributes:
|
|
136
|
+
attributes: a ? "all" : "none",
|
|
89
137
|
limit: "1000"
|
|
90
|
-
}).toString(), u = X(t,
|
|
138
|
+
}).toString(), u = X(t, c, o);
|
|
91
139
|
return this.client.streamRequest(
|
|
92
140
|
u,
|
|
93
141
|
{
|
|
94
142
|
method: "GET",
|
|
95
143
|
headers: {
|
|
96
|
-
Accept:
|
|
144
|
+
Accept: Ce(n, r),
|
|
97
145
|
"Accept-language": s
|
|
98
146
|
}
|
|
99
147
|
},
|
|
@@ -101,44 +149,44 @@ class Dn {
|
|
|
101
149
|
);
|
|
102
150
|
}
|
|
103
151
|
}
|
|
104
|
-
const
|
|
152
|
+
const qe = (e, t) => e.error || e.message || `${t.status} ${t.statusText}`, Qe = "application/json", Be = "Content-Type", P = "Api-Key", Fe = "X-CONVERSATION-ID", T = "Ocp-Apim-Subscription-Key";
|
|
105
153
|
class Z extends Error {
|
|
106
154
|
constructor(t) {
|
|
107
155
|
super(t.message), this.isHttpError = !0, this.name = "HttpError", this.code = t.code, this.status = t.status, this.details = t.details;
|
|
108
156
|
}
|
|
109
157
|
}
|
|
110
|
-
const
|
|
158
|
+
const S = (e) => isNaN(Date.parse(e)) ? null : new Date(e), b = (e, t, n) => {
|
|
111
159
|
const s = {
|
|
112
|
-
[
|
|
160
|
+
[Be]: t?.contentType || Qe
|
|
113
161
|
};
|
|
114
|
-
return t?.jwt && (s.Authorization = `Bearer ${t.jwt}`), t?.chatReference && (s[
|
|
115
|
-
},
|
|
162
|
+
return t?.jwt && (s.Authorization = `Bearer ${t.jwt}`), t?.chatReference && (s[Fe] = t.chatReference), { ...s, ...n };
|
|
163
|
+
}, Ge = (e) => {
|
|
116
164
|
const t = { ...e };
|
|
117
165
|
return t[P] && (t[P] = t[P].substring(0, 8) + "...[REDACTED]"), t.Authorization && (t.Authorization = "Bearer [REDACTED]"), t[T] && (t[T] = t[T].substring(0, 8) + "...[REDACTED]"), t;
|
|
118
166
|
}, ee = async (e, t, n) => await fetch(e, {
|
|
119
167
|
method: n.method || "GET",
|
|
120
168
|
headers: t,
|
|
121
169
|
body: n.body ? JSON.stringify(n.body) : void 0
|
|
122
|
-
}),
|
|
170
|
+
}), Ke = async (e, t, n) => await fetch(e, {
|
|
123
171
|
method: n.method,
|
|
124
172
|
headers: t,
|
|
125
173
|
body: n?.isFormData && typeof n?.body == "string" ? n.body : JSON.stringify(n.body),
|
|
126
174
|
signal: n?.signal
|
|
127
175
|
});
|
|
128
|
-
class
|
|
176
|
+
class je {
|
|
129
177
|
constructor() {
|
|
130
178
|
this.decoder = new TextDecoder();
|
|
131
179
|
}
|
|
132
180
|
async streamChat(t, n, s = {}, r) {
|
|
133
|
-
const { onMessage: o, onError: i, onComplete:
|
|
181
|
+
const { onMessage: o, onError: i, onComplete: a, signal: c } = s;
|
|
134
182
|
try {
|
|
135
183
|
const u = await this.initializeStreamRequest(
|
|
136
184
|
t,
|
|
137
185
|
n,
|
|
138
|
-
|
|
186
|
+
c,
|
|
139
187
|
r
|
|
140
188
|
);
|
|
141
|
-
await this.processStreamData(u, o),
|
|
189
|
+
await this.processStreamData(u, o), a?.();
|
|
142
190
|
} catch (u) {
|
|
143
191
|
this.handleStreamError(u, i);
|
|
144
192
|
}
|
|
@@ -146,7 +194,7 @@ class Ve {
|
|
|
146
194
|
async initializeStreamRequest(t, n, s, r) {
|
|
147
195
|
const o = b(void 0, {
|
|
148
196
|
jwt: r
|
|
149
|
-
}), i = await
|
|
197
|
+
}), i = await Ke(
|
|
150
198
|
t,
|
|
151
199
|
{
|
|
152
200
|
Accept: "text/event-stream",
|
|
@@ -159,16 +207,16 @@ class Ve {
|
|
|
159
207
|
}
|
|
160
208
|
);
|
|
161
209
|
if (!i.ok) {
|
|
162
|
-
const
|
|
163
|
-
let
|
|
210
|
+
const a = await i.text();
|
|
211
|
+
let c = {};
|
|
164
212
|
try {
|
|
165
|
-
|
|
213
|
+
c = JSON.parse(a);
|
|
166
214
|
} catch {
|
|
167
|
-
|
|
215
|
+
c.error = "Failed to parse error body";
|
|
168
216
|
}
|
|
169
217
|
throw new Z({
|
|
170
218
|
status: i.status,
|
|
171
|
-
message:
|
|
219
|
+
message: c.error ?? "No response body"
|
|
172
220
|
});
|
|
173
221
|
}
|
|
174
222
|
if (!i.body)
|
|
@@ -189,11 +237,11 @@ class Ve {
|
|
|
189
237
|
}
|
|
190
238
|
const i = this.decoder.decode(o, { stream: !0 });
|
|
191
239
|
s += i;
|
|
192
|
-
const
|
|
240
|
+
const a = s.split(`
|
|
193
241
|
`);
|
|
194
|
-
s =
|
|
195
|
-
for (const
|
|
196
|
-
this.parseSSEDataLine(
|
|
242
|
+
s = a.pop() || "";
|
|
243
|
+
for (const c of a)
|
|
244
|
+
this.parseSSEDataLine(c, n);
|
|
197
245
|
}
|
|
198
246
|
} finally {
|
|
199
247
|
t.releaseLock();
|
|
@@ -221,8 +269,8 @@ class Ve {
|
|
|
221
269
|
}
|
|
222
270
|
}
|
|
223
271
|
}
|
|
224
|
-
new
|
|
225
|
-
class
|
|
272
|
+
new je();
|
|
273
|
+
class Rn {
|
|
226
274
|
constructor(t) {
|
|
227
275
|
this.config = t, console.info("SdmxApiClient initialized", {
|
|
228
276
|
apiUrl: t.apiUrl || "NOT SET"
|
|
@@ -231,8 +279,8 @@ class An {
|
|
|
231
279
|
async getRequest(t, n) {
|
|
232
280
|
return this.request(t, { ...n, method: "GET" });
|
|
233
281
|
}
|
|
234
|
-
async postRequest(t, n) {
|
|
235
|
-
return this.request(t, { ...n, method: "POST" });
|
|
282
|
+
async postRequest(t, n, s) {
|
|
283
|
+
return this.request(t, { ...n, method: "POST" }, s);
|
|
236
284
|
}
|
|
237
285
|
async streamRequest(t, n, s) {
|
|
238
286
|
const r = `${this.config.apiUrl}/${t}`, o = {
|
|
@@ -243,7 +291,7 @@ class An {
|
|
|
243
291
|
};
|
|
244
292
|
this.config.apiKey != null && (o[T] = this.config.apiKey);
|
|
245
293
|
const i = new ReadableStream({
|
|
246
|
-
async start(
|
|
294
|
+
async start(c) {
|
|
247
295
|
try {
|
|
248
296
|
const u = await ee(r, o, n);
|
|
249
297
|
if (!u.ok) {
|
|
@@ -255,69 +303,69 @@ class An {
|
|
|
255
303
|
const d = u.body?.getReader();
|
|
256
304
|
if (!d) throw new Error("Failed to create stream reader");
|
|
257
305
|
const l = new Uint8Array([239, 187, 191]);
|
|
258
|
-
|
|
306
|
+
c.enqueue(l);
|
|
259
307
|
const m = async () => {
|
|
260
|
-
const { done: f, value:
|
|
261
|
-
f ?
|
|
308
|
+
const { done: f, value: p } = await d.read();
|
|
309
|
+
f ? c.close() : (c.enqueue(p), await m());
|
|
262
310
|
};
|
|
263
311
|
m();
|
|
264
312
|
} catch (u) {
|
|
265
|
-
|
|
313
|
+
c.error(u);
|
|
266
314
|
}
|
|
267
315
|
}
|
|
268
|
-
}),
|
|
316
|
+
}), a = new Headers({
|
|
269
317
|
"Content-Disposition": `attachment; filename=${encodeURIComponent(s)}`
|
|
270
318
|
});
|
|
271
|
-
return new Response(i, { headers:
|
|
319
|
+
return new Response(i, { headers: a });
|
|
272
320
|
}
|
|
273
|
-
async request(t, n) {
|
|
274
|
-
const
|
|
321
|
+
async request(t, n, s) {
|
|
322
|
+
const r = Date.now(), o = `${s || this.config.apiUrl}/${t}`, i = {
|
|
275
323
|
...b(void 0, {
|
|
276
324
|
jwt: this.config.jwt
|
|
277
325
|
}),
|
|
278
326
|
...n.headers
|
|
279
327
|
};
|
|
280
|
-
this.config.apiKey != null && (
|
|
328
|
+
this.config.apiKey != null && (i["Ocp-Apim-Subscription-Key"] = this.config.apiKey), this.addInfoRequestLog("API Request", o, n, i);
|
|
281
329
|
try {
|
|
282
|
-
const
|
|
283
|
-
let
|
|
284
|
-
const
|
|
330
|
+
const a = await ee(o, i, n), c = Date.now() - r;
|
|
331
|
+
let u;
|
|
332
|
+
const d = await a.text();
|
|
285
333
|
try {
|
|
286
|
-
|
|
334
|
+
u = d ? JSON.parse(d) : {};
|
|
287
335
|
} catch {
|
|
288
336
|
if (this.addErrorRequestParsing(
|
|
289
|
-
|
|
337
|
+
o,
|
|
290
338
|
n,
|
|
291
|
-
|
|
339
|
+
a,
|
|
292
340
|
c,
|
|
293
|
-
|
|
294
|
-
), !
|
|
341
|
+
d
|
|
342
|
+
), !a.ok)
|
|
295
343
|
throw new Error(
|
|
296
|
-
`API request failed: ${
|
|
344
|
+
`API request failed: ${a.status} ${a.statusText} - ${d.substring(0, 100)}`
|
|
297
345
|
);
|
|
298
|
-
|
|
346
|
+
u = { data: d };
|
|
299
347
|
}
|
|
300
|
-
if (!
|
|
301
|
-
this.addErrorRequestLog(
|
|
302
|
-
const
|
|
303
|
-
throw new Error(`API request failed: ${
|
|
348
|
+
if (!a.ok) {
|
|
349
|
+
this.addErrorRequestLog(o, n, a, c, u);
|
|
350
|
+
const l = qe(u, a);
|
|
351
|
+
throw new Error(`API request failed: ${l}`);
|
|
304
352
|
}
|
|
305
|
-
return
|
|
306
|
-
} catch (
|
|
307
|
-
const c = Date.now() -
|
|
353
|
+
return u;
|
|
354
|
+
} catch (a) {
|
|
355
|
+
const c = Date.now() - r;
|
|
308
356
|
throw console.error("API Request Exception", {
|
|
309
357
|
method: n.method,
|
|
310
|
-
url:
|
|
358
|
+
url: o,
|
|
311
359
|
duration: `${c}ms`,
|
|
312
|
-
error:
|
|
313
|
-
}),
|
|
360
|
+
error: a instanceof Error ? a.message : String(a)
|
|
361
|
+
}), a;
|
|
314
362
|
}
|
|
315
363
|
}
|
|
316
364
|
addInfoRequestLog(t, n, s, r) {
|
|
317
365
|
const o = {
|
|
318
366
|
method: s.method || "GET",
|
|
319
367
|
url: n,
|
|
320
|
-
headers:
|
|
368
|
+
headers: Ge(r)
|
|
321
369
|
};
|
|
322
370
|
s.body && (o.body = s.body), console.info(t, o);
|
|
323
371
|
}
|
|
@@ -343,17 +391,17 @@ class An {
|
|
|
343
391
|
});
|
|
344
392
|
}
|
|
345
393
|
}
|
|
346
|
-
const
|
|
347
|
-
var
|
|
348
|
-
const
|
|
394
|
+
const wn = ["FREQ", "FREQUENCY"];
|
|
395
|
+
var He = /* @__PURE__ */ ((e) => (e.CONDITIONAL = "Conditional", e.MANDATORY = "Mandatory", e))(He || {}), M = /* @__PURE__ */ ((e) => (e.DIMENSION = "Dimension", e.MEASURE_DIMENSION = "MeasureDimension", e.TIME_DIMENSION = "TimeDimension", e))(M || {}), ze = /* @__PURE__ */ ((e) => (e.UNBOUNDED = "unbounded", e))(ze || {});
|
|
396
|
+
const Je = (e, t) => {
|
|
349
397
|
const n = e?.data?.dataSets?.[0], r = e?.data?.structures?.[0]?.attributes?.dimensionGroup || [], o = n?.dimensionGroupAttributes, i = {};
|
|
350
|
-
for (const
|
|
351
|
-
const
|
|
398
|
+
for (const a of r) {
|
|
399
|
+
const c = a.relationship.dimensions, { codedSeriesKey: u, decodedSeriesKey: d } = he(
|
|
352
400
|
e,
|
|
353
401
|
t,
|
|
354
|
-
|
|
402
|
+
c
|
|
355
403
|
);
|
|
356
|
-
i[
|
|
404
|
+
i[a.id] = {
|
|
357
405
|
values: o?.[u] || [],
|
|
358
406
|
decodedSeriesKey: d,
|
|
359
407
|
codedSeriesKey: u
|
|
@@ -365,54 +413,54 @@ const Ge = (e, t) => {
|
|
|
365
413
|
...s?.dimensions.series || [],
|
|
366
414
|
...s?.dimensions.observation || []
|
|
367
415
|
], o = new Array(r?.length), i = new Array(r?.length);
|
|
368
|
-
return n?.forEach((
|
|
369
|
-
const
|
|
416
|
+
return n?.forEach((a) => {
|
|
417
|
+
const c = r?.findIndex((l) => l.id === a) || 0, u = t[c], d = r[c].values.findIndex(
|
|
370
418
|
(l) => l.id === u || l.value === u
|
|
371
419
|
) || 0;
|
|
372
|
-
o[
|
|
420
|
+
o[c] = d >= 0 ? d : u, i[c] = u;
|
|
373
421
|
}), {
|
|
374
422
|
codedSeriesKey: o.join(":"),
|
|
375
423
|
decodedSeriesKey: i.join(":")
|
|
376
424
|
};
|
|
377
|
-
},
|
|
425
|
+
}, In = (e, t, n) => {
|
|
378
426
|
const s = e?.data?.dataSets?.[0], r = e?.data?.structures?.[0], o = (r?.attributes?.dimensionGroup || []).filter(
|
|
379
427
|
(l) => l.relationship.dimensions?.length === 1 && l.relationship.dimensions.includes(t || "")
|
|
380
|
-
), i = s?.dimensionGroupAttributes,
|
|
428
|
+
), i = s?.dimensionGroupAttributes, a = [
|
|
381
429
|
...r?.dimensions.series || [],
|
|
382
430
|
...r?.dimensions.observation || []
|
|
383
|
-
],
|
|
384
|
-
u[
|
|
431
|
+
], c = a?.findIndex((l) => l.id === t), u = new Array(a?.length);
|
|
432
|
+
u[c] = n || "";
|
|
385
433
|
const d = {};
|
|
386
434
|
for (const l of o) {
|
|
387
|
-
const m = l.relationship.dimensions, { codedSeriesKey: f, decodedSeriesKey:
|
|
435
|
+
const m = l.relationship.dimensions, { codedSeriesKey: f, decodedSeriesKey: p } = he(
|
|
388
436
|
e,
|
|
389
437
|
u,
|
|
390
438
|
m
|
|
391
439
|
);
|
|
392
440
|
d[l.id] = {
|
|
393
441
|
values: i?.[f] || [],
|
|
394
|
-
decodedSeriesKey:
|
|
442
|
+
decodedSeriesKey: p,
|
|
395
443
|
codedSeriesKey: f
|
|
396
444
|
};
|
|
397
445
|
}
|
|
398
446
|
return d;
|
|
399
|
-
},
|
|
447
|
+
}, Xe = (e, t) => {
|
|
400
448
|
if (t == null)
|
|
401
449
|
return;
|
|
402
450
|
const n = e.values?.[t];
|
|
403
451
|
return n ?? (t instanceof Array ? { values: t } : { value: t.toString() });
|
|
404
|
-
},
|
|
452
|
+
}, Ze = "Observation", Nn = (e) => {
|
|
405
453
|
const t = e?.data?.dataSets, n = e?.data?.structures?.[0];
|
|
406
454
|
if (!t || !n)
|
|
407
455
|
return [];
|
|
408
|
-
const s = n.attributes, r = n.dimensions, o = s?.dimensionGroup || [], i = t[0].series || t[0].observations,
|
|
456
|
+
const s = n.attributes, r = n.dimensions, o = s?.dimensionGroup || [], i = t[0].series || t[0].observations, a = r.series?.length ? r.series : r.observation, c = [];
|
|
409
457
|
for (const u in i) {
|
|
410
|
-
const d = [], { name: l, parsedTimeSeriesValue: m } =
|
|
458
|
+
const d = [], { name: l, parsedTimeSeriesValue: m } = et(
|
|
411
459
|
u,
|
|
412
|
-
|
|
413
|
-
), f = i[u],
|
|
460
|
+
a
|
|
461
|
+
), f = i[u], p = f.attributes || [];
|
|
414
462
|
if (Object.keys(f).length === 0) {
|
|
415
|
-
|
|
463
|
+
c.push({
|
|
416
464
|
name: l,
|
|
417
465
|
parsedTimeSeriesValue: m,
|
|
418
466
|
values: d,
|
|
@@ -422,29 +470,29 @@ const Ge = (e, t) => {
|
|
|
422
470
|
continue;
|
|
423
471
|
}
|
|
424
472
|
d.push(
|
|
425
|
-
...
|
|
473
|
+
...rt(f, n)
|
|
426
474
|
);
|
|
427
475
|
const w = _(
|
|
428
476
|
s?.series || [],
|
|
429
|
-
(
|
|
430
|
-
), I =
|
|
477
|
+
(E) => p[E]
|
|
478
|
+
), I = ot(
|
|
431
479
|
n.attributes?.dataSet || [],
|
|
432
|
-
t[0].attributes?.filter((
|
|
433
|
-
), N =
|
|
480
|
+
t[0].attributes?.filter((E) => E != null) || []
|
|
481
|
+
), N = Je(
|
|
434
482
|
e,
|
|
435
483
|
m
|
|
436
|
-
), $ = o.map((
|
|
437
|
-
const z = N[
|
|
438
|
-
|
|
484
|
+
), $ = o.map((E, ve) => {
|
|
485
|
+
const z = N[E.id], Re = Xe(
|
|
486
|
+
E,
|
|
439
487
|
z.values[ve]
|
|
440
488
|
);
|
|
441
489
|
return {
|
|
442
|
-
attribute:
|
|
490
|
+
attribute: E,
|
|
443
491
|
dimensionGroupValue: Re,
|
|
444
492
|
dimensionGroupData: z
|
|
445
493
|
};
|
|
446
494
|
});
|
|
447
|
-
|
|
495
|
+
c.push({
|
|
448
496
|
name: l,
|
|
449
497
|
parsedTimeSeriesValue: m,
|
|
450
498
|
values: d,
|
|
@@ -453,38 +501,38 @@ const Ge = (e, t) => {
|
|
|
453
501
|
dimensionGroupAttributes: $
|
|
454
502
|
});
|
|
455
503
|
}
|
|
456
|
-
return
|
|
457
|
-
},
|
|
504
|
+
return c;
|
|
505
|
+
}, et = (e, t) => {
|
|
458
506
|
const n = e.split(new RegExp("(?<!\\|):(?!\\||$)")), s = [];
|
|
459
507
|
for (let r = 0; r < n.length; r++) {
|
|
460
508
|
const o = t?.[r], i = Number(n[r]);
|
|
461
509
|
if (i < 0 || o == null)
|
|
462
510
|
continue;
|
|
463
|
-
const
|
|
464
|
-
if (
|
|
511
|
+
const a = o.values[i];
|
|
512
|
+
if (a == null) {
|
|
465
513
|
s.push(n[r].replace("|:", ":"));
|
|
466
514
|
continue;
|
|
467
515
|
}
|
|
468
|
-
s.push(
|
|
516
|
+
s.push(a?.id || a?.value || "");
|
|
469
517
|
}
|
|
470
518
|
return {
|
|
471
|
-
name:
|
|
519
|
+
name: nt(s),
|
|
472
520
|
parsedTimeSeriesValue: s
|
|
473
521
|
};
|
|
474
522
|
}, _ = (e, t) => {
|
|
475
523
|
const n = [];
|
|
476
524
|
for (let s = 0; s < e.length; s++) {
|
|
477
|
-
const r = e[s], o = t(s), i = o != null && r.values != null ?
|
|
525
|
+
const r = e[s], o = t(s), i = o != null && r.values != null ? tt(o, r) : void 0;
|
|
478
526
|
n.push({
|
|
479
527
|
name: r.id,
|
|
480
528
|
value: i
|
|
481
529
|
});
|
|
482
530
|
}
|
|
483
531
|
return n;
|
|
484
|
-
},
|
|
532
|
+
}, tt = (e, t) => {
|
|
485
533
|
const n = t.values[e];
|
|
486
534
|
return n == null ? typeof e == "object" ? e : e.toString() : n?.id || n?.value || n?.ids || n?.values;
|
|
487
|
-
},
|
|
535
|
+
}, nt = (e) => e.map((t) => t ? st(t) : "").join("."), st = (e) => e.replace(/\./g, "|.").replace(/:/g, "|:"), rt = (e, t) => {
|
|
488
536
|
const n = t.measures?.observation?.length;
|
|
489
537
|
if (e.observations == null)
|
|
490
538
|
return [
|
|
@@ -494,38 +542,38 @@ const Ge = (e, t) => {
|
|
|
494
542
|
t.attributes?.observation || [],
|
|
495
543
|
(i) => e[i + n]
|
|
496
544
|
),
|
|
497
|
-
dimensionAtObservation:
|
|
545
|
+
dimensionAtObservation: Ze
|
|
498
546
|
}
|
|
499
547
|
];
|
|
500
548
|
const s = e.observations, r = t.dimensions.observation?.[0], o = [];
|
|
501
549
|
for (const i in s) {
|
|
502
|
-
const
|
|
550
|
+
const a = r?.values[i];
|
|
503
551
|
o.push({
|
|
504
|
-
dimensionAtObservation:
|
|
552
|
+
dimensionAtObservation: a?.value || a?.id,
|
|
505
553
|
values: te(
|
|
506
554
|
s[i],
|
|
507
555
|
t.measures
|
|
508
556
|
),
|
|
509
557
|
obsAttributes: _(
|
|
510
558
|
t.attributes?.observation || [],
|
|
511
|
-
(
|
|
559
|
+
(c) => s[i][c + n]
|
|
512
560
|
)
|
|
513
561
|
});
|
|
514
562
|
}
|
|
515
563
|
return o;
|
|
516
|
-
}, te = (e, t) => t?.observation?.map((n, s) => ({ name: n.id, value: e[s] })) || [],
|
|
564
|
+
}, te = (e, t) => t?.observation?.map((n, s) => ({ name: n.id, value: e[s] })) || [], ot = (e, t) => e.reduce(
|
|
517
565
|
(n, s, r) => {
|
|
518
566
|
const o = t[r];
|
|
519
|
-
return
|
|
567
|
+
return it(n, s, o, ""), n;
|
|
520
568
|
},
|
|
521
569
|
[]
|
|
522
|
-
),
|
|
570
|
+
), it = (e, t, n, s) => {
|
|
523
571
|
const r = n != null ? t?.values?.length > 0 ? t.values[n]?.id || t.values[n]?.value : String(n) : s;
|
|
524
572
|
e.push({
|
|
525
573
|
name: t.id,
|
|
526
574
|
value: r || ""
|
|
527
575
|
});
|
|
528
|
-
},
|
|
576
|
+
}, at = /^[0-9][0-9][0-9][0-9]-Q[1-4]$/, ct = /^[0-9][0-9][0-9][0-9]-W[0-9][0-9]?$/, ut = /^[0-9][0-9][0-9][0-9]-S[1-2]$/, dt = /^[0-9][0-9][0-9][0-9]$/, lt = /^[0-9][0-9][0-9][0-9]-(0[1-9]|1[0-2])-[0-9][0-9]$/, mt = /^[0-9][0-9][0-9][0-9]-M(0[1-9]|(1[0-2]))$/, C = (e) => dt.exec(e), U = (e) => !!C(e), ft = (e) => ut.exec(e), x = (e) => !!ft(e), Y = (e) => mt.exec(e), W = (e) => !!Y(e), V = (e) => at.exec(e), k = (e) => !!V(e), gt = (e) => lt.exec(e), ht = (e) => !!gt(e), pt = (e) => ct.exec(e), q = (e) => !!pt(e), Q = 1440 * 60 * 1e3, B = 7 * Q;
|
|
529
577
|
function F(e) {
|
|
530
578
|
const t = `${e}-01-01`, n = new Date(t);
|
|
531
579
|
if (n.getDay() !== 4) {
|
|
@@ -534,7 +582,7 @@ function F(e) {
|
|
|
534
582
|
}
|
|
535
583
|
return n;
|
|
536
584
|
}
|
|
537
|
-
function
|
|
585
|
+
function Et(e) {
|
|
538
586
|
const t = new Date(e), s = -((t.getDay() + 6) % 7) + 3;
|
|
539
587
|
return t.setDate(t.getDate() + s), new Date(t.valueOf());
|
|
540
588
|
}
|
|
@@ -545,44 +593,44 @@ function ne(e, t = "W") {
|
|
|
545
593
|
const r = `${e}-12-24`;
|
|
546
594
|
return R(new Date(r), t).weekNumber;
|
|
547
595
|
}
|
|
548
|
-
function
|
|
596
|
+
function pe(e, t, n = "W") {
|
|
549
597
|
return `${e}-${n}${t < 10 ? "0" + t : t}`;
|
|
550
598
|
}
|
|
551
599
|
function R(e, t = "W") {
|
|
552
|
-
const n =
|
|
600
|
+
const n = Et(e), s = n.getFullYear(), r = F(s), o = 1 + Math.ceil(
|
|
553
601
|
(n.getTime() - r.getTime()) / B
|
|
554
602
|
);
|
|
555
603
|
return {
|
|
556
|
-
code:
|
|
604
|
+
code: pe(s, o, t),
|
|
557
605
|
weekNumber: o,
|
|
558
606
|
weekYear: s
|
|
559
607
|
};
|
|
560
608
|
}
|
|
561
|
-
function
|
|
562
|
-
const [t, n] = e.split("-W"), r = F(+t).getTime() + (+n - 1) * B - 3 *
|
|
609
|
+
function Dt(e) {
|
|
610
|
+
const [t, n] = e.split("-W"), r = F(+t).getTime() + (+n - 1) * B - 3 * Q;
|
|
563
611
|
return new Date(r);
|
|
564
612
|
}
|
|
565
|
-
function
|
|
566
|
-
const [t, n] = e.split("-W"), r = F(+t).getTime() + (+n - 1) * B + 3 *
|
|
613
|
+
function At(e) {
|
|
614
|
+
const [t, n] = e.split("-W"), r = F(+t).getTime() + (+n - 1) * B + 3 * Q;
|
|
567
615
|
return new Date(r);
|
|
568
616
|
}
|
|
569
|
-
function
|
|
570
|
-
return U(e) ?
|
|
617
|
+
function Ee(e) {
|
|
618
|
+
return U(e) ? St(e) : x(e) ? Tt(e) : k(e) ? Rt(e) : W(e) ? It(e) : q(e) ? Dt(e) : $t(e);
|
|
571
619
|
}
|
|
572
620
|
function De(e) {
|
|
573
|
-
return U(e) ?
|
|
621
|
+
return U(e) ? yt(e) : x(e) ? vt(e) : k(e) ? wt(e) : W(e) ? Nt(e) : q(e) ? At(e) : Pt(e);
|
|
574
622
|
}
|
|
575
|
-
function
|
|
623
|
+
function St(e) {
|
|
576
624
|
const t = C(e);
|
|
577
625
|
if (t)
|
|
578
626
|
return new Date(Number(t[0]), 0, 1);
|
|
579
627
|
}
|
|
580
|
-
function
|
|
628
|
+
function yt(e) {
|
|
581
629
|
const t = C(e);
|
|
582
630
|
if (t)
|
|
583
631
|
return new Date(Number(t[0]) + 1, 0, 1);
|
|
584
632
|
}
|
|
585
|
-
function
|
|
633
|
+
function Tt(e) {
|
|
586
634
|
const [t, n] = e.split("-S");
|
|
587
635
|
switch (+n) {
|
|
588
636
|
case 1:
|
|
@@ -591,7 +639,7 @@ function pt(e) {
|
|
|
591
639
|
return new Date(+t, 6, 1);
|
|
592
640
|
}
|
|
593
641
|
}
|
|
594
|
-
function
|
|
642
|
+
function vt(e) {
|
|
595
643
|
const [t, n] = e.split("-S");
|
|
596
644
|
switch (+n) {
|
|
597
645
|
case 1:
|
|
@@ -600,8 +648,8 @@ function Dt(e) {
|
|
|
600
648
|
return new Date(+t + 1, 0, 1);
|
|
601
649
|
}
|
|
602
650
|
}
|
|
603
|
-
function
|
|
604
|
-
const t =
|
|
651
|
+
function Rt(e) {
|
|
652
|
+
const t = V(e);
|
|
605
653
|
if (!t)
|
|
606
654
|
return;
|
|
607
655
|
const [n, s] = t[0].split("-Q");
|
|
@@ -616,8 +664,8 @@ function At(e) {
|
|
|
616
664
|
return new Date(+n, 9, 1);
|
|
617
665
|
}
|
|
618
666
|
}
|
|
619
|
-
function
|
|
620
|
-
const t =
|
|
667
|
+
function wt(e) {
|
|
668
|
+
const t = V(e);
|
|
621
669
|
if (!t)
|
|
622
670
|
return;
|
|
623
671
|
const [n, s] = t[0].split("-Q");
|
|
@@ -632,45 +680,45 @@ function yt(e) {
|
|
|
632
680
|
return new Date(+n + 1, 0, 1);
|
|
633
681
|
}
|
|
634
682
|
}
|
|
635
|
-
function
|
|
683
|
+
function It(e) {
|
|
636
684
|
const t = Y(e);
|
|
637
685
|
if (!t)
|
|
638
686
|
return;
|
|
639
687
|
const [n, s] = t[0].split("-M");
|
|
640
688
|
return new Date(+n, +s - 1, 1);
|
|
641
689
|
}
|
|
642
|
-
function
|
|
690
|
+
function Nt(e) {
|
|
643
691
|
const t = Y(e);
|
|
644
692
|
if (!t)
|
|
645
693
|
return;
|
|
646
694
|
const [n, s] = t[0].split("-M");
|
|
647
695
|
return new Date(+n, +s, 1);
|
|
648
696
|
}
|
|
649
|
-
const
|
|
697
|
+
const $t = (e) => /* @__PURE__ */ new Date(`${e}T00:00:00`), Pt = (e) => {
|
|
650
698
|
const t = /* @__PURE__ */ new Date(`${e}T23:59:00`);
|
|
651
699
|
return t.setMinutes(t.getMinutes() + 1), t;
|
|
652
|
-
},
|
|
653
|
-
const o = [], i = t && t > 3 ?
|
|
654
|
-
for (let
|
|
655
|
-
o.push(`${e}-${r}${
|
|
700
|
+
}, bt = 1, _t = (e, t, n, s = !0, r = "Q") => {
|
|
701
|
+
const o = [], i = t && t > 3 ? Yt(t, s) : 1, a = n ? Math.floor((n - 1) / 3) : 4;
|
|
702
|
+
for (let c = i; c <= a; c++)
|
|
703
|
+
o.push(`${e}-${r}${c}`);
|
|
656
704
|
return o;
|
|
657
|
-
},
|
|
705
|
+
}, Ot = (e, t, n, s = "S") => {
|
|
658
706
|
const r = [];
|
|
659
707
|
return (t || 1) < 7 && (n || 12) > 6 && r.push(`${e}-${s}1`), n == null && r.push(`${e}-${s}2`), r;
|
|
660
|
-
},
|
|
708
|
+
}, $n = (e) => Math.ceil(e / 3), Ae = (e, t, n = "M") => `${e}-${n}${t.toString().padStart(2, "0")}`, Lt = (e, t, n = "M") => {
|
|
661
709
|
const s = [];
|
|
662
710
|
for (let r = t; r <= 12; r++)
|
|
663
711
|
s.push(Ae(e, r, n));
|
|
664
712
|
return s;
|
|
665
|
-
},
|
|
713
|
+
}, Mt = (e, t, n, s = "M") => {
|
|
666
714
|
const r = [];
|
|
667
715
|
for (let o = t; o < n; o++)
|
|
668
716
|
r.push(Ae(e, o, s));
|
|
669
717
|
return r;
|
|
670
|
-
},
|
|
718
|
+
}, Ct = (e, t, n, s = "M") => {
|
|
671
719
|
const r = t || 1, o = n == null, i = n || 12;
|
|
672
|
-
return o ?
|
|
673
|
-
},
|
|
720
|
+
return o ? Lt(e, r, s) : Mt(e, r, i, s);
|
|
721
|
+
}, Pn = (e, t, n = "M") => {
|
|
674
722
|
switch (t) {
|
|
675
723
|
case 0:
|
|
676
724
|
return [
|
|
@@ -699,165 +747,165 @@ const vt = (e) => /* @__PURE__ */ new Date(`${e}T00:00:00`), Rt = (e) => {
|
|
|
699
747
|
default:
|
|
700
748
|
return [];
|
|
701
749
|
}
|
|
702
|
-
},
|
|
703
|
-
const n = g(t, !0), s = g(e), r = n.getFullYear(), o = s.getFullYear(), i = n.getTime() <= s.getTime() ? o +
|
|
704
|
-
return Array.from({ length: i }, (
|
|
750
|
+
}, Ut = (e, t) => {
|
|
751
|
+
const n = g(t, !0), s = g(e), r = n.getFullYear(), o = s.getFullYear(), i = n.getTime() <= s.getTime() ? o + bt - r : 0;
|
|
752
|
+
return Array.from({ length: i }, (c, u) => r + u);
|
|
705
753
|
}, g = (e, t = !1) => {
|
|
706
|
-
const n =
|
|
754
|
+
const n = xt(e, t);
|
|
707
755
|
return n ? (n.getTimezoneOffset() > 0 && n.setMinutes(n.getMinutes() + n.getTimezoneOffset()), n) : /* @__PURE__ */ new Date();
|
|
708
|
-
},
|
|
756
|
+
}, xt = (e, t = !1) => {
|
|
709
757
|
const n = Number(e);
|
|
710
|
-
return e.toString().length !== 13 ? t ?
|
|
711
|
-
},
|
|
758
|
+
return e.toString().length !== 13 ? t ? Ee(e) : De(e) : isNaN(n) ? /* @__PURE__ */ new Date(`${e}T00:00:00.000Z`) : new Date(n);
|
|
759
|
+
}, Yt = (e, t) => t ? Math.floor((e + 1) / 3) : Math.ceil((e + 1) / 3), bn = (e, t) => {
|
|
712
760
|
const n = re(e) - re(t);
|
|
713
761
|
if (n === 0 && e !== t) {
|
|
714
762
|
const s = se(e), r = se(t);
|
|
715
763
|
return s - r;
|
|
716
764
|
}
|
|
717
765
|
return n;
|
|
718
|
-
}, se = (e) => U(e) ? 6 : x(e) ? 5 :
|
|
719
|
-
var G = /* @__PURE__ */ ((e) => (e.LAST_UPDATE_AT = "lastUpdatedAt", e.SERIES_COUNT = "series_count", e))(G || {}),
|
|
720
|
-
function
|
|
766
|
+
}, se = (e) => U(e) ? 6 : x(e) ? 5 : k(e) ? 4 : W(e) ? 3 : q(e) ? 2 : ht(e) ? 1 : 0, re = (e, t = !1) => (t ? Ee(e) : De(e))?.getTime() || 0;
|
|
767
|
+
var G = /* @__PURE__ */ ((e) => (e.LAST_UPDATE_AT = "lastUpdatedAt", e.SERIES_COUNT = "series_count", e))(G || {}), Wt = /* @__PURE__ */ ((e) => (e.C = "c", e))(Wt || {}), h = /* @__PURE__ */ ((e) => (e.EQUALS = "eq", e.NOT_EQUALS = "ne", e.LESS = "lt", e.LESS_OR_EQUAL = "le", e.GREATER = "gt", e.GREATER_OR_EQUAL = "ge", e.CONTAINS = "co", e.NOT_CONTAINS = "nc", e.STARTS = "sw", e.ENDS = "ew", e))(h || {}), Vt = /* @__PURE__ */ ((e) => (e.BOOLEAN = "Boolean", e.DATE_TIME = "DateTime", e.DECIMAL = "Decimal", e.INTEGER = "Integer", e.OBSERVATION_TIME_PERIOD = "ObservationalTimePeriod", e.STRING = "String", e.TIME = "Time", e.TIME_RANGE = "TimeRange", e.URI = "URI", e))(Vt || {}), kt = /* @__PURE__ */ ((e) => (e.ANNUAL = "A", e.QUARTERLY = "Q", e.MONTHLY = "M", e))(kt || {});
|
|
768
|
+
function _n(e) {
|
|
721
769
|
return e?.annotations?.find((t) => {
|
|
722
770
|
if (t.id === G.LAST_UPDATE_AT)
|
|
723
771
|
return t;
|
|
724
772
|
})?.value;
|
|
725
773
|
}
|
|
726
|
-
const K = (e, t) => e?.names && e?.names[t] || e?.name,
|
|
774
|
+
const K = (e, t) => e?.names && e?.names[t] || e?.name, Se = (e, t, n) => {
|
|
727
775
|
if (!(!e || t?.has(e?.id)) && (t?.set(e?.id, e), e?.parent)) {
|
|
728
776
|
const s = n?.get(e?.parent);
|
|
729
|
-
|
|
777
|
+
Se(s, t, n);
|
|
730
778
|
}
|
|
731
|
-
},
|
|
779
|
+
}, qt = (e, t) => {
|
|
732
780
|
const n = /* @__PURE__ */ new Map(), s = new Map(e?.map((r) => [r.id, r]));
|
|
733
781
|
return t?.forEach((r) => {
|
|
734
|
-
|
|
782
|
+
Se(r, n, s);
|
|
735
783
|
}), Array.from(n?.values());
|
|
736
|
-
},
|
|
784
|
+
}, Qt = "time_period_end", Bt = "time_period_start", Ft = "TIME_PERIOD", On = (e) => {
|
|
737
785
|
const t = e?.find(
|
|
738
|
-
(o) => o.id ===
|
|
786
|
+
(o) => o.id === Bt
|
|
739
787
|
), n = e?.find(
|
|
740
|
-
(o) => o.id ===
|
|
788
|
+
(o) => o.id === Qt
|
|
741
789
|
), s = n?.title ? new Date(n?.title) : null;
|
|
742
790
|
return {
|
|
743
791
|
startPeriod: t?.title ? new Date(t?.title) : null,
|
|
744
792
|
endPeriod: s
|
|
745
793
|
};
|
|
746
|
-
},
|
|
747
|
-
const n = new Array(e.length), s = e.map((i,
|
|
794
|
+
}, Gt = (e, t) => e.id.localeCompare(t.id), Kt = (e, t) => e.memberValue.localeCompare(t.memberValue), jt = (e, t) => {
|
|
795
|
+
const n = new Array(e.length), s = e.map((i, a) => [i, a]);
|
|
748
796
|
s.sort(
|
|
749
|
-
(i,
|
|
797
|
+
(i, a) => Gt(i[0], a[0])
|
|
750
798
|
);
|
|
751
799
|
const r = [...t];
|
|
752
|
-
r.sort(
|
|
800
|
+
r.sort(Kt);
|
|
753
801
|
let o = 0;
|
|
754
802
|
for (const i of s) {
|
|
755
|
-
const
|
|
756
|
-
for (; o < r.length && r[o].memberValue.localeCompare(
|
|
803
|
+
const a = i[0];
|
|
804
|
+
for (; o < r.length && r[o].memberValue.localeCompare(a.id) < 0; )
|
|
757
805
|
o += 1;
|
|
758
|
-
o < r.length && r[o].memberValue ===
|
|
806
|
+
o < r.length && r[o].memberValue === a.id && (n[i[1]] = i[0]);
|
|
759
807
|
}
|
|
760
808
|
return n.filter((i) => i != null);
|
|
761
|
-
},
|
|
809
|
+
}, Ht = (e) => !!e?.some((t) => t.parent), Ln = (e, t, n, s, r = []) => {
|
|
762
810
|
let o = e || [];
|
|
763
|
-
if (
|
|
811
|
+
if (zt(n || [], t || "")) {
|
|
764
812
|
const i = (n || [])[0].cubeRegions?.find(
|
|
765
|
-
({ isIncluded:
|
|
813
|
+
({ isIncluded: a }) => a
|
|
766
814
|
);
|
|
767
815
|
if (i) {
|
|
768
|
-
const
|
|
769
|
-
({ componentId:
|
|
816
|
+
const a = i.memberSelection?.find(
|
|
817
|
+
({ componentId: c }) => c === t
|
|
770
818
|
);
|
|
771
|
-
|
|
772
|
-
id:
|
|
773
|
-
name:
|
|
774
|
-
})) :
|
|
819
|
+
a ? o = o.length === 0 ? (a.selectionValues || []).map(({ memberValue: c }) => ({
|
|
820
|
+
id: c,
|
|
821
|
+
name: c
|
|
822
|
+
})) : jt(o, a.selectionValues) : o = [];
|
|
775
823
|
}
|
|
776
824
|
} else r.length !== 0 && (o = o.filter(({ id: i }) => r.includes(i)));
|
|
777
|
-
return
|
|
825
|
+
return Ht(e) && (o = qt(e, o)), o?.map((i) => ({
|
|
778
826
|
...i,
|
|
779
827
|
name: s ? K(i, s) : i?.name
|
|
780
828
|
}));
|
|
781
|
-
},
|
|
829
|
+
}, zt = (e, t) => e != null && e.length > 0 && t != null, Mn = (e) => {
|
|
782
830
|
const t = [];
|
|
783
831
|
return e?.filters?.forEach((n) => {
|
|
784
|
-
n.componentCode !==
|
|
832
|
+
n.componentCode !== Ft && t.push({
|
|
785
833
|
componentCode: n.componentCode,
|
|
786
834
|
operator: h.EQUALS,
|
|
787
835
|
value: n.values.join(",")
|
|
788
836
|
});
|
|
789
837
|
}), t;
|
|
790
|
-
},
|
|
838
|
+
}, Jt = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i, oe = (e) => {
|
|
791
839
|
if (typeof e != "string")
|
|
792
840
|
throw new TypeError("Invalid argument expected string");
|
|
793
|
-
const t = e.match(
|
|
841
|
+
const t = e.match(Jt);
|
|
794
842
|
if (!t)
|
|
795
843
|
throw new Error(`Invalid argument not valid semver ('${e}' received)`);
|
|
796
844
|
return t.shift(), t;
|
|
797
845
|
}, ie = (e) => e === "*" || e === "x" || e === "X", ae = (e) => {
|
|
798
846
|
const t = parseInt(e, 10);
|
|
799
847
|
return isNaN(t) ? e : t;
|
|
800
|
-
},
|
|
848
|
+
}, Xt = (e, t) => typeof e != typeof t ? [String(e), String(t)] : [e, t], Zt = (e, t) => {
|
|
801
849
|
if (ie(e) || ie(t))
|
|
802
850
|
return 0;
|
|
803
|
-
const [n, s] =
|
|
851
|
+
const [n, s] = Xt(ae(e), ae(t));
|
|
804
852
|
return n > s ? 1 : n < s ? -1 : 0;
|
|
805
853
|
}, ce = (e, t) => {
|
|
806
854
|
for (let n = 0; n < Math.max(e.length, t.length); n++) {
|
|
807
|
-
const s =
|
|
855
|
+
const s = Zt(e[n] || "0", t[n] || "0");
|
|
808
856
|
if (s !== 0)
|
|
809
857
|
return s;
|
|
810
858
|
}
|
|
811
859
|
return 0;
|
|
812
|
-
},
|
|
860
|
+
}, en = (e, t) => {
|
|
813
861
|
const n = oe(e), s = oe(t), r = n.pop(), o = s.pop(), i = ce(n, s);
|
|
814
862
|
return i !== 0 ? i : r && o ? ce(r.split("."), o.split(".")) : r || o ? r ? -1 : 1 : 0;
|
|
815
|
-
},
|
|
816
|
-
|
|
817
|
-
const s =
|
|
818
|
-
return
|
|
819
|
-
},
|
|
863
|
+
}, tn = (e, t, n) => {
|
|
864
|
+
nn(n);
|
|
865
|
+
const s = en(e, t);
|
|
866
|
+
return ye[n].includes(s);
|
|
867
|
+
}, ye = {
|
|
820
868
|
">": [1],
|
|
821
869
|
">=": [0, 1],
|
|
822
870
|
"=": [0],
|
|
823
871
|
"<=": [-1, 0],
|
|
824
872
|
"<": [-1],
|
|
825
873
|
"!=": [-1, 1]
|
|
826
|
-
}, ue = Object.keys(
|
|
874
|
+
}, ue = Object.keys(ye), nn = (e) => {
|
|
827
875
|
if (ue.indexOf(e) === -1)
|
|
828
876
|
throw new Error(`Invalid operator, expected one of ${ue.join("|")}`);
|
|
829
877
|
}, O = "+", j = (e, t) => {
|
|
830
878
|
const { agency: n, id: s, version: r } = D(e), o = t.filter(
|
|
831
|
-
(
|
|
879
|
+
(c) => c.agencyID === n && c.id === s && !c?.version?.includes(O)
|
|
832
880
|
);
|
|
833
881
|
if (o.length === 1)
|
|
834
882
|
return o[0];
|
|
835
883
|
if (!r?.includes(O))
|
|
836
|
-
return o.find((
|
|
884
|
+
return o.find((c) => c.version === r);
|
|
837
885
|
const i = o.map(
|
|
838
|
-
(
|
|
839
|
-
),
|
|
886
|
+
(c) => c.version
|
|
887
|
+
), a = sn(r, i);
|
|
840
888
|
return o.find(
|
|
841
|
-
(
|
|
889
|
+
(c) => c.version === a[0]
|
|
842
890
|
);
|
|
843
|
-
},
|
|
844
|
-
const n =
|
|
891
|
+
}, sn = (e, t) => {
|
|
892
|
+
const n = rn(e, t);
|
|
845
893
|
return n.length > 0 ? [n[0]] : [];
|
|
846
|
-
},
|
|
894
|
+
}, rn = (e, t) => {
|
|
847
895
|
const n = [];
|
|
848
896
|
return t.forEach((s) => {
|
|
849
|
-
|
|
897
|
+
an(e, s) && n.push(s);
|
|
850
898
|
}), n;
|
|
851
|
-
},
|
|
899
|
+
}, on = (e) => {
|
|
852
900
|
const t = e.trim().replace(/\d+\+/, "*"), [n] = t.split("*");
|
|
853
901
|
return new RegExp(`^${n}`);
|
|
854
|
-
},
|
|
902
|
+
}, an = (e, t) => {
|
|
855
903
|
const n = e.trim().replace(/\+/, "");
|
|
856
|
-
return
|
|
904
|
+
return on(e).test(t) && tn(t, n, ">=");
|
|
857
905
|
}, H = (e, t) => {
|
|
858
|
-
const { concept: n } =
|
|
906
|
+
const { concept: n } = cn(e, t);
|
|
859
907
|
return n;
|
|
860
|
-
},
|
|
908
|
+
}, cn = (e, t) => {
|
|
861
909
|
if (e == null)
|
|
862
910
|
return {
|
|
863
911
|
concept: void 0,
|
|
@@ -875,7 +923,7 @@ const K = (e, t) => e?.names && e?.names[t] || e?.name, ye = (e, t, n) => {
|
|
|
875
923
|
};
|
|
876
924
|
}
|
|
877
925
|
for (const i of t)
|
|
878
|
-
if (
|
|
926
|
+
if (un(i, r, s, o))
|
|
879
927
|
return {
|
|
880
928
|
concept: de(i?.concepts || [], n),
|
|
881
929
|
scheme: i
|
|
@@ -884,15 +932,15 @@ const K = (e, t) => e?.names && e?.names[t] || e?.name, ye = (e, t, n) => {
|
|
|
884
932
|
concept: void 0,
|
|
885
933
|
scheme: void 0
|
|
886
934
|
};
|
|
887
|
-
}, de = (e, t) => e?.find((n) => n.id === t),
|
|
935
|
+
}, de = (e, t) => e?.find((n) => n.id === t), un = (e, t, n, s) => e.id === t && e.agencyID === n && e.version === s, Cn = (e = [], t = [], n) => {
|
|
888
936
|
const s = n?.conceptIdentity || "", r = H(s, t), o = v(
|
|
889
937
|
n?.localRepresentation?.enumeration
|
|
890
938
|
), i = v(
|
|
891
939
|
r?.coreRepresentation?.enumeration
|
|
892
|
-
),
|
|
893
|
-
if (
|
|
894
|
-
return j(
|
|
895
|
-
},
|
|
940
|
+
), a = o || i;
|
|
941
|
+
if (a != null)
|
|
942
|
+
return j(a, e);
|
|
943
|
+
}, Un = (e, t, n, s) => {
|
|
896
944
|
const r = t?.find(
|
|
897
945
|
(o) => o?.id === e?.id
|
|
898
946
|
)?.values;
|
|
@@ -900,7 +948,7 @@ const K = (e, t) => e?.names && e?.names[t] || e?.name, ye = (e, t, n) => {
|
|
|
900
948
|
...o,
|
|
901
949
|
name: s ? K(o, s) : o?.name
|
|
902
950
|
})) || [];
|
|
903
|
-
},
|
|
951
|
+
}, dn = (e, t) => {
|
|
904
952
|
const n = t?.dataStructureComponents?.attributeList, s = e?.metadataStructureComponents?.metadataAttributeList;
|
|
905
953
|
return n?.metadataAttributeUsages?.map((r) => {
|
|
906
954
|
const o = s?.metadataAttributes?.find(
|
|
@@ -912,55 +960,55 @@ const K = (e, t) => e?.names && e?.names[t] || e?.name, ye = (e, t, n) => {
|
|
|
912
960
|
isMandatory: Number(o?.minOccurs) > 0
|
|
913
961
|
};
|
|
914
962
|
});
|
|
915
|
-
},
|
|
963
|
+
}, xn = (e = [], t, n) => {
|
|
916
964
|
const s = v(t?.conceptIdentity) || "", r = H(s, e);
|
|
917
965
|
return n ? K(r, n) : r?.name ?? r?.id ?? t?.id;
|
|
918
966
|
};
|
|
919
967
|
function le(e) {
|
|
920
968
|
return e?.dataStructures?.[0]?.dataStructureComponents?.dimensionList;
|
|
921
969
|
}
|
|
922
|
-
function
|
|
970
|
+
function Yn(e) {
|
|
923
971
|
return e?.data?.structures?.[0]?.dimensions?.series || [];
|
|
924
972
|
}
|
|
925
|
-
function
|
|
973
|
+
function Wn(e) {
|
|
926
974
|
return e?.data?.structures?.[0]?.dimensions?.observation?.[0].values.map((t) => t.value).filter((t) => t != null) || [];
|
|
927
975
|
}
|
|
928
|
-
function
|
|
976
|
+
function Vn(e) {
|
|
929
977
|
return e.find(
|
|
930
978
|
(t) => t.type === M.TIME_DIMENSION
|
|
931
979
|
);
|
|
932
980
|
}
|
|
933
|
-
const
|
|
981
|
+
const kn = (e) => {
|
|
934
982
|
const t = /* @__PURE__ */ new Map(), n = e?.dataStructures?.[0], s = e?.metadataStructures?.[0], r = e?.conceptSchemes || [], o = e?.codelists || [];
|
|
935
983
|
return e && [
|
|
936
984
|
...le(e)?.dimensions || [],
|
|
937
985
|
...le(e)?.timeDimensions || [],
|
|
938
|
-
...
|
|
986
|
+
...dn(s, n),
|
|
939
987
|
...n?.dataStructureComponents?.attributeList?.attributes || []
|
|
940
988
|
].forEach(
|
|
941
|
-
(
|
|
942
|
-
const
|
|
943
|
-
|
|
989
|
+
(a) => {
|
|
990
|
+
const c = H(
|
|
991
|
+
a?.conceptIdentity,
|
|
944
992
|
r
|
|
945
|
-
), u =
|
|
993
|
+
), u = a?.localRepresentation?.enumeration || c?.coreRepresentation?.enumeration, d = j(
|
|
946
994
|
u,
|
|
947
995
|
o
|
|
948
996
|
);
|
|
949
|
-
|
|
997
|
+
a?.id && (u ? t.set(a?.id, {
|
|
950
998
|
...d,
|
|
951
|
-
name:
|
|
952
|
-
names:
|
|
953
|
-
}) : t.set(
|
|
954
|
-
id:
|
|
955
|
-
name:
|
|
956
|
-
names:
|
|
999
|
+
name: c?.name,
|
|
1000
|
+
names: c?.names
|
|
1001
|
+
}) : t.set(a?.id, {
|
|
1002
|
+
id: a?.id,
|
|
1003
|
+
name: c?.name,
|
|
1004
|
+
names: c?.names
|
|
957
1005
|
}));
|
|
958
1006
|
}
|
|
959
1007
|
), t;
|
|
960
|
-
},
|
|
1008
|
+
}, qn = (e) => e?.find(
|
|
961
1009
|
(t) => t.id === G.SERIES_COUNT
|
|
962
|
-
)?.title || "",
|
|
963
|
-
const
|
|
1010
|
+
)?.title || "", ln = "/api/download", Qn = (e, t, n, s, r, o, i) => {
|
|
1011
|
+
const a = new URLSearchParams({
|
|
964
1012
|
urn: e,
|
|
965
1013
|
format: t,
|
|
966
1014
|
compress: "false",
|
|
@@ -969,18 +1017,18 @@ const Un = (e) => {
|
|
|
969
1017
|
attribute: s,
|
|
970
1018
|
language: n,
|
|
971
1019
|
isMetadata: i ? "true" : "none"
|
|
972
|
-
}).toString(),
|
|
973
|
-
window.open(
|
|
974
|
-
},
|
|
1020
|
+
}).toString(), c = `${ln}?${a}`;
|
|
1021
|
+
window.open(c, "_blank");
|
|
1022
|
+
}, Bn = (e, t) => {
|
|
975
1023
|
const n = [];
|
|
976
1024
|
for (const s of e) {
|
|
977
1025
|
if (s.type !== M.DIMENSION)
|
|
978
1026
|
continue;
|
|
979
1027
|
const r = t.find((o) => o.componentCode === s.id);
|
|
980
|
-
r != null && r.values?.length > 0 ? n.push(r.values?.join(
|
|
1028
|
+
r != null && r.values?.length > 0 ? n.push(r.values?.join(We)) : n.push("*");
|
|
981
1029
|
}
|
|
982
1030
|
return n.join(".");
|
|
983
|
-
},
|
|
1031
|
+
}, mn = (e, t) => {
|
|
984
1032
|
if (!e || !e.startPeriod && !e.endPeriod)
|
|
985
1033
|
return null;
|
|
986
1034
|
const n = [], { startPeriod: s, endPeriod: r } = e;
|
|
@@ -992,46 +1040,46 @@ const Un = (e) => {
|
|
|
992
1040
|
return null;
|
|
993
1041
|
const o = t;
|
|
994
1042
|
return n.map(
|
|
995
|
-
(i) => `${encodeURIComponent(`c[${o}]`)}${
|
|
1043
|
+
(i) => `${encodeURIComponent(`c[${o}]`)}${Ye}${encodeURIComponent(i)}`
|
|
996
1044
|
).join(ge);
|
|
997
|
-
},
|
|
998
|
-
const n =
|
|
999
|
-
return n ?
|
|
1000
|
-
},
|
|
1045
|
+
}, Fn = (e, t) => {
|
|
1046
|
+
const n = fn(e, t) || null;
|
|
1047
|
+
return n ? mn(n, t?.id) : null;
|
|
1048
|
+
}, fn = (e, t) => {
|
|
1001
1049
|
const n = t.id, s = e?.filters?.find(
|
|
1002
|
-
(
|
|
1050
|
+
(c) => c.componentCode === n
|
|
1003
1051
|
);
|
|
1004
1052
|
if (!s || !s.values)
|
|
1005
1053
|
return null;
|
|
1006
|
-
const r = s.values?.filter((
|
|
1054
|
+
const r = s.values?.filter((c) => !!c);
|
|
1007
1055
|
if (!r.length)
|
|
1008
1056
|
return null;
|
|
1009
1057
|
const o = s.operator;
|
|
1010
1058
|
if (o === h.LESS_OR_EQUAL || o === h.LESS)
|
|
1011
|
-
return { startPeriod: null, endPeriod:
|
|
1059
|
+
return { startPeriod: null, endPeriod: S(r[0]) };
|
|
1012
1060
|
if (o === h.GREATER_OR_EQUAL || o === h.GREATER)
|
|
1013
|
-
return { startPeriod:
|
|
1014
|
-
const i =
|
|
1015
|
-
return { startPeriod: i, endPeriod:
|
|
1061
|
+
return { startPeriod: S(r[0]), endPeriod: null };
|
|
1062
|
+
const i = S(r[0]), a = S(r[1]);
|
|
1063
|
+
return { startPeriod: i, endPeriod: a };
|
|
1016
1064
|
}, Te = (e, t, n) => {
|
|
1017
|
-
const s = g(t, !0), r = g(n), o = g(e, !0), i = g(e),
|
|
1065
|
+
const s = g(t, !0), r = g(n), o = g(e, !0), i = g(e), a = s.getTime() > o.getTime() ? s : o, c = r.getTime() < i.getTime() ? r : i;
|
|
1018
1066
|
return {
|
|
1019
|
-
start:
|
|
1020
|
-
end:
|
|
1067
|
+
start: a,
|
|
1068
|
+
end: c
|
|
1021
1069
|
};
|
|
1022
|
-
},
|
|
1070
|
+
}, gn = (e, t, n, s = "W") => {
|
|
1023
1071
|
const r = +e, { start: o, end: i } = Te(e, t, n);
|
|
1024
1072
|
if (o.getTime() > i.getTime())
|
|
1025
1073
|
return [];
|
|
1026
|
-
const
|
|
1027
|
-
if (
|
|
1028
|
-
for (let m =
|
|
1029
|
-
l.push(
|
|
1074
|
+
const a = R(o, s), c = a.weekYear === r ? a.weekNumber : a.weekYear < r ? 1 : ne(r, s), u = R(i, s), d = u.weekYear === r ? u.weekNumber : u.weekYear > r ? ne(r, s) : 1, l = [];
|
|
1075
|
+
if (c < d)
|
|
1076
|
+
for (let m = c; m <= d; m++)
|
|
1077
|
+
l.push(pe(r, m, s));
|
|
1030
1078
|
return l;
|
|
1031
|
-
},
|
|
1079
|
+
}, hn = (e) => {
|
|
1032
1080
|
const t = new Date(e);
|
|
1033
1081
|
return t.setMinutes(t.getMinutes() - t.getTimezoneOffset()), t.toISOString().slice(0, 10);
|
|
1034
|
-
},
|
|
1082
|
+
}, pn = (e, t, n) => {
|
|
1035
1083
|
const { start: s, end: r } = Te(e, t, n);
|
|
1036
1084
|
if (s.getTime() > r.getTime())
|
|
1037
1085
|
return [];
|
|
@@ -1039,13 +1087,13 @@ const Un = (e) => {
|
|
|
1039
1087
|
s.getFullYear(),
|
|
1040
1088
|
s.getMonth(),
|
|
1041
1089
|
s.getDate()
|
|
1042
|
-
),
|
|
1043
|
-
for (; i.getTime() <
|
|
1044
|
-
const
|
|
1045
|
-
o.push(
|
|
1090
|
+
), a = new Date(r.getFullYear(), r.getMonth(), r.getDate());
|
|
1091
|
+
for (; i.getTime() < a.getTime(); ) {
|
|
1092
|
+
const c = hn(i);
|
|
1093
|
+
o.push(c), i.setDate(i.getDate() + 1);
|
|
1046
1094
|
}
|
|
1047
1095
|
return o;
|
|
1048
|
-
},
|
|
1096
|
+
}, En = (e) => ({
|
|
1049
1097
|
isDailyExist: !!e?.some(({ memberValue: t }) => t === "D"),
|
|
1050
1098
|
isWeeklyExist: !!e?.some(({ memberValue: t }) => t === "W"),
|
|
1051
1099
|
isMonthlyExist: !!e?.some(({ memberValue: t }) => t === "M"),
|
|
@@ -1054,157 +1102,157 @@ const Un = (e) => {
|
|
|
1054
1102
|
isYearlyExist: !!e?.some(
|
|
1055
1103
|
({ memberValue: t }) => t === "A" || t === "Y"
|
|
1056
1104
|
)
|
|
1057
|
-
}),
|
|
1105
|
+
}), Dn = (e, t, n, s) => {
|
|
1058
1106
|
const r = s === 0 ? g(t.toString(), !0)?.getMonth() + 1 : void 0, o = s === e.length - 1 ? g(n.toString())?.getMonth() + 1 || 1 : void 0;
|
|
1059
1107
|
return { startMonth: r, endMonth: o };
|
|
1060
|
-
},
|
|
1108
|
+
}, An = ["FREQUENCY", "FREQ"], Gn = (e, t) => {
|
|
1061
1109
|
const n = e?.[0]?.cubeRegions?.[0]?.memberSelection?.find(
|
|
1062
|
-
(
|
|
1063
|
-
)?.selectionValues, s =
|
|
1064
|
-
return i.forEach((
|
|
1065
|
-
const d = [], { startMonth: l, endMonth: m } =
|
|
1110
|
+
(c) => An.includes(c.componentId)
|
|
1111
|
+
)?.selectionValues, s = En(n || []), r = t?.startPeriod?.getTime() || 1, o = t?.endPeriod?.getTime() || 1, i = Ut(o, r), a = [];
|
|
1112
|
+
return i.forEach((c, u) => {
|
|
1113
|
+
const d = [], { startMonth: l, endMonth: m } = Dn(
|
|
1066
1114
|
i,
|
|
1067
1115
|
new Date(r),
|
|
1068
1116
|
new Date(o),
|
|
1069
1117
|
u
|
|
1070
1118
|
), {
|
|
1071
1119
|
isDailyExist: f,
|
|
1072
|
-
isWeeklyExist:
|
|
1120
|
+
isWeeklyExist: p,
|
|
1073
1121
|
isMonthlyExist: w,
|
|
1074
1122
|
isQuarterlyExist: I,
|
|
1075
1123
|
isSemiAnnualExist: N,
|
|
1076
1124
|
isYearlyExist: $
|
|
1077
1125
|
} = s;
|
|
1078
|
-
$ && d.push(
|
|
1079
|
-
...
|
|
1080
|
-
), w && d.push(...
|
|
1081
|
-
...
|
|
1126
|
+
$ && d.push(c.toString()), N && d.push(...Ot(c, l, m)), I && d.push(
|
|
1127
|
+
..._t(c, l, m, !1)
|
|
1128
|
+
), w && d.push(...Ct(c, l, m)), p && d.push(
|
|
1129
|
+
...gn(c, r.toString(), o.toString())
|
|
1082
1130
|
), f && d.push(
|
|
1083
|
-
...
|
|
1084
|
-
),
|
|
1085
|
-
}),
|
|
1131
|
+
...pn(c, r.toString(), o.toString())
|
|
1132
|
+
), a.push(...d);
|
|
1133
|
+
}), a;
|
|
1086
1134
|
};
|
|
1087
|
-
function
|
|
1135
|
+
function Sn(e) {
|
|
1088
1136
|
const { urn: t } = e.details;
|
|
1089
1137
|
return Ie(t.resourceId, t.version, t.agencyId);
|
|
1090
1138
|
}
|
|
1091
|
-
function
|
|
1139
|
+
function Kn(e) {
|
|
1092
1140
|
const t = {};
|
|
1093
1141
|
for (const n of e.datasets) {
|
|
1094
|
-
const s = n.dataset, r =
|
|
1142
|
+
const s = n.dataset, r = Sn(s);
|
|
1095
1143
|
t[r] = s.details.dimensions;
|
|
1096
1144
|
}
|
|
1097
1145
|
return t;
|
|
1098
1146
|
}
|
|
1099
1147
|
export {
|
|
1100
1148
|
G as Annotations,
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1149
|
+
He as AssignmentStatus,
|
|
1150
|
+
yn as AvailabilityApi,
|
|
1151
|
+
xe as DATASET_DATA_URL,
|
|
1152
|
+
vn as DatasetApi,
|
|
1105
1153
|
M as DimensionType,
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1154
|
+
Me as DownloadType,
|
|
1155
|
+
wn as FREQUENCY_DIMENSION_ID,
|
|
1156
|
+
An as FREQUENCY_DIM_ID,
|
|
1157
|
+
Le as FileColumnsAttribute,
|
|
1158
|
+
Ve as GET_v3_FILTER_ALL,
|
|
1159
|
+
Tn as GET_v3_FILTER_AND,
|
|
1160
|
+
We as GET_v3_FILTER_OR,
|
|
1161
|
+
Ze as OBSERVATION_KEY,
|
|
1162
|
+
ze as OccurrenceType,
|
|
1163
|
+
kt as Periods,
|
|
1164
|
+
Vt as RepresentationTextType,
|
|
1165
|
+
Wt as SDMX_DATA_QUERY_PARAMS,
|
|
1118
1166
|
O as SINGLE_WILDCARD_SYMBOL,
|
|
1119
|
-
|
|
1167
|
+
Rn as SdmxApiClient,
|
|
1120
1168
|
me as SdmxAvailabilityMode,
|
|
1121
|
-
|
|
1169
|
+
y as SdmxDataFormat,
|
|
1122
1170
|
fe as SdmxDetails,
|
|
1123
1171
|
L as SdmxReferences,
|
|
1124
1172
|
h as SeriesFilterOperator,
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1173
|
+
Ft as TIME_PERIOD,
|
|
1174
|
+
Qt as TIME_PERIOD_END,
|
|
1175
|
+
Bt as TIME_PERIOD_START,
|
|
1176
|
+
Kn as buildDatasetDimensionsMetadataMap,
|
|
1177
|
+
lt as dailyPattern,
|
|
1178
|
+
st as decodeDimensionId,
|
|
1179
|
+
Cn as findCodelistByDimension,
|
|
1132
1180
|
X as generateDatasetDataRequest,
|
|
1133
1181
|
Ie as generateShortUrn,
|
|
1134
|
-
|
|
1135
|
-
|
|
1182
|
+
Gn as getAdditionalColumns,
|
|
1183
|
+
On as getAnnotationPeriod,
|
|
1136
1184
|
j as getArtifactByUrnWithWildCard,
|
|
1137
|
-
|
|
1138
|
-
|
|
1185
|
+
In as getAttachedDimensionsSeriesByDimension,
|
|
1186
|
+
Je as getAttachedDimensionsSeriesByTsId,
|
|
1139
1187
|
he as getAttachedDimensionsSeriesKey,
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1188
|
+
Xe as getAttributeValueFromDataQueryResponse,
|
|
1189
|
+
Un as getAvailableCodes,
|
|
1190
|
+
Ln as getAvailableCodesFromConstrains,
|
|
1143
1191
|
we as getChildParsedUrn,
|
|
1144
1192
|
H as getConcept,
|
|
1145
1193
|
de as getConceptByUrn,
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1194
|
+
cn as getConceptWithScheme,
|
|
1195
|
+
dn as getConvertedMetaAttributes,
|
|
1196
|
+
gt as getDailyRegExp,
|
|
1197
|
+
pn as getDaysColumns,
|
|
1198
|
+
xn as getDimensionTitle,
|
|
1151
1199
|
le as getDimensions,
|
|
1152
|
-
|
|
1153
|
-
|
|
1200
|
+
qt as getFilteredItemsWithParents,
|
|
1201
|
+
Mn as getFiltersDtoFromDataQuery,
|
|
1154
1202
|
R as getISOWeek,
|
|
1155
1203
|
v as getKeyFromUrn,
|
|
1156
|
-
|
|
1204
|
+
_n as getLastUpdatedTime,
|
|
1157
1205
|
ne as getLastWeekNumberOfYear,
|
|
1158
1206
|
K as getLocalizedName,
|
|
1159
|
-
|
|
1160
|
-
|
|
1207
|
+
Ct as getMonthlyData,
|
|
1208
|
+
Pn as getMonthlyDataByQuarter,
|
|
1161
1209
|
Y as getMonthlyRegExp,
|
|
1162
1210
|
De as getParsedEndPeriodDate,
|
|
1163
|
-
|
|
1164
|
-
|
|
1211
|
+
Nn as getParsedResponse,
|
|
1212
|
+
Ee as getParsedStartPeriodDate,
|
|
1165
1213
|
g as getPeriodDate,
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1214
|
+
En as getPeriods,
|
|
1215
|
+
$n as getQuarterByMonth,
|
|
1216
|
+
V as getQuarterlyRegExp,
|
|
1217
|
+
_t as getQuartersData,
|
|
1218
|
+
mn as getQueryTimePeriodFilters,
|
|
1219
|
+
Ce as getRequestAcceptHeader,
|
|
1220
|
+
sn as getResolvedVersionBySingleWildcard,
|
|
1221
|
+
Ot as getSemiAnnualData,
|
|
1222
|
+
ft as getSemiAnnuallyRegExp,
|
|
1175
1223
|
_ as getSeriesAttributes,
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1224
|
+
et as getSeriesName,
|
|
1225
|
+
kn as getStructureComponentsMap,
|
|
1226
|
+
Yn as getStructureDimensions,
|
|
1227
|
+
Vn as getTimeDimension,
|
|
1228
|
+
Wn as getTimePeriods,
|
|
1229
|
+
Fn as getTimeQueryFilter,
|
|
1230
|
+
fn as getTimeRangeFromAttachment,
|
|
1231
|
+
qn as getTimeSeriesCount,
|
|
1232
|
+
Bn as getTimeSeriesFilterKey,
|
|
1233
|
+
nt as getTimeSeriesId,
|
|
1234
|
+
pe as getWeekCode,
|
|
1235
|
+
At as getWeeklyPeriodEndDate,
|
|
1236
|
+
Dt as getWeeklyPeriodStartDate,
|
|
1237
|
+
pt as getWeeklyRegExp,
|
|
1238
|
+
gn as getWeeksColumns,
|
|
1239
|
+
on as getWildCardRegexp,
|
|
1192
1240
|
Te as getYearPeriod,
|
|
1193
1241
|
C as getYearlyRegExp,
|
|
1194
|
-
|
|
1195
|
-
|
|
1242
|
+
Ut as getYears,
|
|
1243
|
+
ht as isDaily,
|
|
1196
1244
|
W as isMonthly,
|
|
1197
|
-
|
|
1245
|
+
k as isQuarterly,
|
|
1198
1246
|
x as isSemiAnnually,
|
|
1199
|
-
|
|
1200
|
-
|
|
1247
|
+
q as isWeekly,
|
|
1248
|
+
an as isWildCardVersionCorrect,
|
|
1201
1249
|
U as isYearly,
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1250
|
+
mt as monthlyPattern,
|
|
1251
|
+
Qn as openDownloadWindow,
|
|
1252
|
+
at as quarterPattern,
|
|
1253
|
+
ut as semiAnnuallyPattern,
|
|
1254
|
+
bn as sortPeriods,
|
|
1207
1255
|
D as splitUrn,
|
|
1208
|
-
|
|
1209
|
-
|
|
1256
|
+
ct as weeklyPattern,
|
|
1257
|
+
dt as yearlyPattern
|
|
1210
1258
|
};
|