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