@dpuse/dpuse-shared 0.3.815 → 0.3.821

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/README.md +45 -9
  2. package/dist/{componentConfig.schema-Dxqinpxy.js → componentConfig.schema-DT3mO5rS.js} +80 -64
  3. package/dist/componentConfig.schema-DT3mO5rS.js.map +1 -0
  4. package/dist/dpuse-shared-component.es.js +2 -2
  5. package/dist/dpuse-shared-component.es.js.map +1 -0
  6. package/dist/dpuse-shared-componentDataView.es.js +1 -1
  7. package/dist/dpuse-shared-componentDataView.es.js.map +1 -0
  8. package/dist/dpuse-shared-componentModuleConnector.es.js +31 -31
  9. package/dist/dpuse-shared-componentModuleConnector.es.js.map +1 -0
  10. package/dist/dpuse-shared-componentModuleCookbook.es.js +5 -5
  11. package/dist/dpuse-shared-componentModuleCookbook.es.js.map +1 -0
  12. package/dist/dpuse-shared-componentModulePresenter.es.js +6 -6
  13. package/dist/dpuse-shared-componentModulePresenter.es.js.map +1 -0
  14. package/dist/dpuse-shared-componentModuleTool.es.js.map +1 -0
  15. package/dist/dpuse-shared-componentRecipe.es.js.map +1 -0
  16. package/dist/dpuse-shared-encoding.es.js +229 -121
  17. package/dist/dpuse-shared-encoding.es.js.map +1 -0
  18. package/dist/dpuse-shared-errors.es.js.map +1 -0
  19. package/dist/dpuse-shared-locale.es.js +8 -24
  20. package/dist/dpuse-shared-locale.es.js.map +1 -0
  21. package/dist/dpuse-shared-utilities.es.js +4 -11
  22. package/dist/dpuse-shared-utilities.es.js.map +1 -0
  23. package/dist/label-DexpXrnC.js +19 -0
  24. package/dist/label-DexpXrnC.js.map +1 -0
  25. package/dist/moduleConfig.schema-aYmFWSrn.js +22 -0
  26. package/dist/moduleConfig.schema-aYmFWSrn.js.map +1 -0
  27. package/dist/types/src/baseConfig.schema.d.ts +2 -2
  28. package/dist/types/src/component/componentConfig.schema.d.ts +13 -14
  29. package/dist/types/src/component/connection/index.d.ts +1 -1
  30. package/dist/types/src/component/context/model/dimension/hierarchy/index.d.ts +1 -1
  31. package/dist/types/src/component/context/model/entity/dataItem/index.d.ts +1 -1
  32. package/dist/types/src/component/context/model/entity/event/index.d.ts +1 -1
  33. package/dist/types/src/component/context/model/entity/index.d.ts +1 -1
  34. package/dist/types/src/component/context/model/entity/primaryMeasure/index.d.ts +1 -1
  35. package/dist/types/src/component/index.d.ts +3 -3
  36. package/dist/types/src/component/module/connector/connectorConfig.schema.d.ts +14 -14
  37. package/dist/types/src/component/module/cookbook/cookbookConfig.schema.d.ts +7 -7
  38. package/dist/types/src/component/module/engine/index.d.ts +3 -2
  39. package/dist/types/src/component/module/moduleConfig.schema.d.ts +7 -7
  40. package/dist/types/src/component/module/presenter/presenterConfig.schema.d.ts +7 -7
  41. package/dist/types/src/encoding/index.d.ts +22 -6
  42. package/dist/types/src/index.d.ts +2 -2
  43. package/dist/types/src/locale/index.d.ts +2 -14
  44. package/dist/types/src/locale/label.d.ts +13 -0
  45. package/dist/types/src/locale/locale.schema.d.ts +3 -3
  46. package/package.json +15 -9
  47. package/dist/moduleConfig.schema-B_EBeUaj.js +0 -22
  48. package/dist/types/eslint.config.d.ts +0 -3
  49. package/dist/types/tests/errors/index.test.d.ts +0 -1
  50. package/dist/types/tests/locale/index.test.d.ts +0 -1
  51. package/dist/types/tests/schema/index.test.d.ts +0 -1
  52. package/dist/types/tests/utilities/index.test.d.ts +0 -1
  53. package/dist/types/vite.config.d.ts +0 -2
  54. package/dist/types/vitest.config.d.ts +0 -2
@@ -1,355 +1,463 @@
1
- //#endregion
2
- //#region src/encoding/index.ts
1
+ import "./label-DexpXrnC.js";
3
2
  var e = {
3
+ arabic: {
4
+ id: "arabic",
5
+ label: {
6
+ en: "Arabic",
7
+ es: "Árabe"
8
+ }
9
+ },
10
+ baltic: {
11
+ id: "baltic",
12
+ label: {
13
+ en: "Baltic",
14
+ es: "Báltico"
15
+ }
16
+ },
17
+ celtic: {
18
+ id: "celtic",
19
+ label: {
20
+ en: "Celtic",
21
+ es: "Celta"
22
+ }
23
+ },
24
+ centralEuropean: {
25
+ id: "centralEuropean",
26
+ label: {
27
+ en: "Central European",
28
+ es: "Centroeuropeo"
29
+ }
30
+ },
31
+ chineseSimplified: {
32
+ id: "chineseSimplified",
33
+ label: {
34
+ en: "Chinese Simplified",
35
+ es: "Chino simplificado"
36
+ }
37
+ },
38
+ chineseTraditional: {
39
+ id: "chineseTraditional",
40
+ label: {
41
+ en: "Chinese Traditional",
42
+ es: "Chino tradicional"
43
+ }
44
+ },
45
+ cyrillic: {
46
+ id: "cyrillic",
47
+ label: {
48
+ en: "Cyrillic",
49
+ es: "Cirílico"
50
+ }
51
+ },
52
+ greek: {
53
+ id: "greek",
54
+ label: {
55
+ en: "Greek",
56
+ es: "Griego"
57
+ }
58
+ },
59
+ hebrew: {
60
+ id: "hebrew",
61
+ label: {
62
+ en: "Hebrew",
63
+ es: "Hebreo"
64
+ }
65
+ },
66
+ japanese: {
67
+ id: "japanese",
68
+ label: {
69
+ en: "Japanese",
70
+ es: "Japonés"
71
+ }
72
+ },
73
+ korean: {
74
+ id: "korean",
75
+ label: {
76
+ en: "Korean",
77
+ es: "Coreano"
78
+ }
79
+ },
80
+ nordic: {
81
+ id: "nordic",
82
+ label: {
83
+ en: "Nordic",
84
+ es: "Nórdico"
85
+ }
86
+ },
87
+ other: {
88
+ id: "other",
89
+ label: {
90
+ en: "Other",
91
+ es: "Otro"
92
+ }
93
+ },
94
+ romanian: {
95
+ id: "romanian",
96
+ label: {
97
+ en: "Romanian",
98
+ es: "Rumano"
99
+ }
100
+ },
101
+ southernEuropean: {
102
+ id: "southernEuropean",
103
+ label: {
104
+ en: "Southern European",
105
+ es: "Europeo meridional"
106
+ }
107
+ },
108
+ thai: {
109
+ id: "thai",
110
+ label: {
111
+ en: "Thai",
112
+ es: "Tailandés"
113
+ }
114
+ },
115
+ turkish: {
116
+ id: "turkish",
117
+ label: {
118
+ en: "Turkish",
119
+ es: "Turco"
120
+ }
121
+ },
122
+ unicode16: {
123
+ id: "unicode16",
124
+ label: {
125
+ en: "Unicode 16",
126
+ es: "Unicode 16"
127
+ }
128
+ },
129
+ unicode32: {
130
+ id: "unicode32",
131
+ label: {
132
+ en: "Unicode 32",
133
+ es: "Unicode 32"
134
+ }
135
+ },
136
+ vietnamese: {
137
+ id: "vietnamese",
138
+ label: {
139
+ en: "Vietnamese",
140
+ es: "Vietnamita"
141
+ }
142
+ },
143
+ western: {
144
+ id: "western",
145
+ label: {
146
+ en: "Western",
147
+ es: "Occidental"
148
+ }
149
+ }
150
+ }, t = {
4
151
  ascii: {
5
152
  id: "ascii",
6
- groupLabel: "",
7
- label: "ascii",
153
+ groupId: null,
8
154
  isDetectable: !1,
9
155
  isDecodable: !0
10
156
  },
11
157
  big5: {
12
158
  id: "big5",
13
- groupLabel: "Chinese Traditional",
14
- label: "Chinese Traditional (big5)",
159
+ groupId: "chineseTraditional",
15
160
  isDetectable: !0,
16
161
  isDecodable: !0
17
162
  },
18
163
  "euc-jp": {
19
164
  id: "euc-jp",
20
- groupLabel: "Japanese",
21
- label: "Japanese (euc-jp)",
165
+ groupId: "japanese",
22
166
  isDetectable: !0,
23
167
  isDecodable: !0
24
168
  },
25
169
  "euc-kr": {
26
170
  id: "euc-kr",
27
- groupLabel: "Korean",
28
- label: "Korean (euc-kr)",
171
+ groupId: "korean",
29
172
  isDetectable: !0,
30
173
  isDecodable: !0
31
174
  },
32
175
  gb18030: {
33
176
  id: "gb18030",
34
- groupLabel: "Chinese Simplified",
35
- label: "Chinese Simplified (gb18030)",
177
+ groupId: "chineseSimplified",
36
178
  isDetectable: !0,
37
179
  isDecodable: !0
38
180
  },
39
181
  gbk: {
40
182
  id: "gbk",
41
- groupLabel: "Chinese Simplified",
42
- label: "Chinese Simplified (gbk)",
183
+ groupId: "chineseSimplified",
43
184
  isDetectable: !1,
44
185
  isDecodable: !0
45
186
  },
46
187
  ibm866: {
47
188
  id: "ibm866",
48
- groupLabel: "Cyrillic",
49
- label: "Cyrillic (ibm866)",
189
+ groupId: "cyrillic",
50
190
  isDetectable: !1,
51
191
  isDecodable: !0
52
192
  },
53
193
  "iso-2022-cn": {
54
194
  id: "iso-2022-cn",
55
- groupLabel: "Japanese",
56
- label: "Japanese (iso-2022-cn)",
195
+ groupId: "chineseSimplified",
57
196
  isDetectable: !0,
58
197
  isDecodable: !1
59
198
  },
60
199
  "iso-2022-jp": {
61
200
  id: "iso-2022-jp",
62
- groupLabel: "Japanese",
63
- label: "Japanese (iso-2022-jp)",
201
+ groupId: "japanese",
64
202
  isDetectable: !0,
65
203
  isDecodable: !0
66
204
  },
67
205
  "iso-2022-kr": {
68
206
  id: "iso-2022-kr",
69
- groupLabel: "Korean",
70
- label: "Korean (iso-2022-kr)",
207
+ groupId: "korean",
71
208
  isDetectable: !0,
72
209
  isDecodable: !1
73
210
  },
74
211
  "iso-8859-1": {
75
212
  id: "iso-8859-1",
76
- groupLabel: "Western",
77
- label: "Western (iso-8859-1)",
213
+ groupId: "western",
78
214
  isDetectable: !0,
79
215
  isDecodable: !0
80
216
  },
81
217
  "iso-8859-2": {
82
218
  id: "iso-8859-2",
83
- groupLabel: "Central European",
84
- label: "Central European (iso-8859-2)",
219
+ groupId: "centralEuropean",
85
220
  isDetectable: !0,
86
221
  isDecodable: !0
87
222
  },
88
223
  "iso-8859-3": {
89
224
  id: "iso-8859-3",
90
- groupLabel: "Southern European",
91
- label: "Southern European (iso-8859-3)",
225
+ groupId: "southernEuropean",
92
226
  isDetectable: !1,
93
227
  isDecodable: !0
94
228
  },
95
229
  "iso-8859-4": {
96
230
  id: "iso-8859-4",
97
- groupLabel: "Baltic",
98
- label: "Baltic (iso-8859-4)",
231
+ groupId: "baltic",
99
232
  isDetectable: !1,
100
233
  isDecodable: !0
101
234
  },
102
235
  "iso-8859-5": {
103
236
  id: "iso-8859-5",
104
- groupLabel: "Cyrillic",
105
- label: "Cyrillic (iso-8859-5)",
237
+ groupId: "cyrillic",
106
238
  isDetectable: !0,
107
239
  isDecodable: !0
108
240
  },
109
241
  "iso-8859-6": {
110
242
  id: "iso-8859-6",
111
- groupLabel: "Arabic",
112
- label: "Arabic (iso-8859-6)",
243
+ groupId: "arabic",
113
244
  isDetectable: !0,
114
245
  isDecodable: !0
115
246
  },
116
247
  "iso-8859-7": {
117
248
  id: "iso-8859-7",
118
- groupLabel: "Greek",
119
- label: "Greek (iso-8859-7)",
249
+ groupId: "greek",
120
250
  isDetectable: !0,
121
251
  isDecodable: !0
122
252
  },
123
253
  "iso-8859-8": {
124
254
  id: "iso-8859-8",
125
- groupLabel: "Hebrew",
126
- label: "Hebrew (iso-8859-8)",
255
+ groupId: "hebrew",
127
256
  isDetectable: !0,
128
257
  isDecodable: !0
129
258
  },
130
259
  "iso-8859-9": {
131
260
  id: "iso-8859-9",
132
- groupLabel: "Turkish",
133
- label: "Turkish (iso-8859-9)",
261
+ groupId: "turkish",
134
262
  isDetectable: !0,
135
263
  isDecodable: !0
136
264
  },
137
265
  "iso-8859-10": {
138
266
  id: "iso-8859-10",
139
- groupLabel: "Nordic",
140
- label: "Nordic (iso-8859-10)",
267
+ groupId: "nordic",
141
268
  isDetectable: !1,
142
269
  isDecodable: !0
143
270
  },
144
271
  "iso-8859-11": {
145
272
  id: "iso-8859-11",
146
- groupLabel: "Thai",
147
- label: "Thai (iso-8859-11)",
273
+ groupId: "thai",
148
274
  isDetectable: !1,
149
275
  isDecodable: !0
150
276
  },
151
277
  "iso-8859-13": {
152
278
  id: "iso-8859-13",
153
- groupLabel: "Baltic",
154
- label: "Baltic (iso-8859-13)",
279
+ groupId: "baltic",
155
280
  isDetectable: !1,
156
281
  isDecodable: !0
157
282
  },
158
283
  "iso-8859-14": {
159
284
  id: "iso-8859-14",
160
- groupLabel: "Celtic",
161
- label: "Celtic (iso-8859-14)",
285
+ groupId: "celtic",
162
286
  isDetectable: !1,
163
287
  isDecodable: !0
164
288
  },
165
289
  "iso-8859-15": {
166
290
  id: "iso-8859-15",
167
- groupLabel: "Western",
168
- label: "Western (iso-8859-15)",
291
+ groupId: "western",
169
292
  isDetectable: !1,
170
293
  isDecodable: !0
171
294
  },
172
295
  "iso-8859-16": {
173
296
  id: "iso-8859-16",
174
- groupLabel: "Romanian",
175
- label: "Romanian (iso-8859-16)",
297
+ groupId: "romanian",
176
298
  isDetectable: !1,
177
299
  isDecodable: !0
178
300
  },
179
- "kOi8-r": {
301
+ "koi8-r": {
180
302
  id: "koi8-r",
181
- groupLabel: "Cyrillic",
182
- label: "Cyrillic (koi8-r)",
303
+ groupId: "cyrillic",
183
304
  isDetectable: !0,
184
305
  isDecodable: !0
185
306
  },
186
- "kOi8-u": {
307
+ "koi8-u": {
187
308
  id: "koi8-u",
188
- groupLabel: "Cyrillic",
189
- label: "Cyrillic (koi8-u)",
309
+ groupId: "cyrillic",
190
310
  isDetectable: !1,
191
311
  isDecodable: !0
192
312
  },
193
313
  latin1: {
194
314
  id: "latin1",
195
- groupLabel: "Western",
196
- label: "Western (latin1)",
315
+ groupId: "western",
197
316
  isDetectable: !1,
198
317
  isDecodable: !0
199
318
  },
200
319
  macintosh: {
201
320
  id: "macintosh",
202
- groupLabel: "Western",
203
- label: "Western (macintosh)",
321
+ groupId: "western",
204
322
  isDetectable: !1,
205
323
  isDecodable: !0
206
324
  },
207
325
  shift_jis: {
208
326
  id: "shift_jis",
209
- groupLabel: "Japanese",
210
- label: "Japanese (shift_jis)",
327
+ groupId: "japanese",
211
328
  isDetectable: !0,
212
329
  isDecodable: !0
213
330
  },
214
331
  "tis-620": {
215
332
  id: "tis-620",
216
- groupLabel: "Thai",
217
- label: "Thai (tis-620)",
333
+ groupId: "thai",
218
334
  isDetectable: !1,
219
335
  isDecodable: !0
220
336
  },
221
- utf16: {
222
- id: "utf16",
223
- groupLabel: "Unicode 16",
224
- label: "Unicode 16 (utf16)",
337
+ "utf-16": {
338
+ id: "utf-16",
339
+ groupId: "unicode16",
225
340
  isDetectable: !1,
226
341
  isDecodable: !0
227
342
  },
228
- utf16be: {
229
- id: "utf16be",
230
- groupLabel: "Unicode 16",
231
- label: "Unicode 16 (utf16be)",
343
+ "utf-16be": {
344
+ id: "utf-16be",
345
+ groupId: "unicode16",
232
346
  isDetectable: !0,
233
347
  isDecodable: !0
234
348
  },
235
- utf16le: {
236
- id: "utf16le",
237
- groupLabel: "Unicode 16",
238
- label: "Unicode 16 (utf16le)",
349
+ "utf-16le": {
350
+ id: "utf-16le",
351
+ groupId: "unicode16",
239
352
  isDetectable: !0,
240
353
  isDecodable: !0
241
354
  },
242
- utf32be: {
243
- id: "utf32be",
244
- groupLabel: "Unicode 32",
245
- label: "Unicode 32 (utf32be)",
355
+ "utf-32be": {
356
+ id: "utf-32be",
357
+ groupId: "unicode32",
246
358
  isDetectable: !0,
247
359
  isDecodable: !1
248
360
  },
249
- utf32le: {
250
- id: "utf32le",
251
- groupLabel: "Unicode 32",
252
- label: "Unicode 32 (utf32le)",
361
+ "utf-32le": {
362
+ id: "utf-32le",
363
+ groupId: "unicode32",
253
364
  isDetectable: !0,
254
365
  isDecodable: !1
255
366
  },
256
- utf8: {
257
- id: "utf8",
258
- groupLabel: "",
259
- label: "utf8",
367
+ "utf-8": {
368
+ id: "utf-8",
369
+ groupId: null,
260
370
  isDetectable: !0,
261
371
  isDecodable: !0
262
372
  },
263
373
  "windows-1250": {
264
374
  id: "windows-1250",
265
- groupLabel: "Central European",
266
- label: "Central European (windows-1250)",
375
+ groupId: "centralEuropean",
267
376
  isDetectable: !0,
268
377
  isDecodable: !0
269
378
  },
270
379
  "windows-1251": {
271
380
  id: "windows-1251",
272
- groupLabel: "Cyrillic",
273
- label: "Cyrillic (windows-1251)",
381
+ groupId: "cyrillic",
274
382
  isDetectable: !0,
275
383
  isDecodable: !0
276
384
  },
277
385
  "windows-1252": {
278
386
  id: "windows-1252",
279
- groupLabel: "Western",
280
- label: "Western (windows-1252)",
387
+ groupId: "western",
281
388
  isDetectable: !0,
282
389
  isDecodable: !0
283
390
  },
284
391
  "windows-1253": {
285
392
  id: "windows-1253",
286
- groupLabel: "Greek",
287
- label: "Greek (windows-1253)",
393
+ groupId: "greek",
288
394
  isDetectable: !0,
289
395
  isDecodable: !0
290
396
  },
291
397
  "windows-1254": {
292
398
  id: "windows-1254",
293
- groupLabel: "Turkish",
294
- label: "Turkish (windows-1254)",
399
+ groupId: "turkish",
295
400
  isDetectable: !0,
296
401
  isDecodable: !0
297
402
  },
298
403
  "windows-1255": {
299
404
  id: "windows-1255",
300
- groupLabel: "Hebrew",
301
- label: "Hebrew (windows-1255)",
405
+ groupId: "hebrew",
302
406
  isDetectable: !0,
303
407
  isDecodable: !0
304
408
  },
305
409
  "windows-1256": {
306
410
  id: "windows-1256",
307
- groupLabel: "Arabic",
308
- label: "Arabic (windows-1256)",
411
+ groupId: "arabic",
309
412
  isDetectable: !0,
310
413
  isDecodable: !0
311
414
  },
312
415
  "windows-1257": {
313
416
  id: "windows-1257",
314
- groupLabel: "Baltic",
315
- label: "Baltic (windows-1257)",
417
+ groupId: "baltic",
316
418
  isDetectable: !1,
317
419
  isDecodable: !0
318
420
  },
319
421
  "windows-1258": {
320
422
  id: "windows-1258",
321
- groupLabel: "Vietnamese",
322
- label: "Vietnamese (windows-1258)",
423
+ groupId: "vietnamese",
323
424
  isDetectable: !1,
324
425
  isDecodable: !0
325
426
  },
326
427
  "windows-874": {
327
428
  id: "windows-874",
328
- groupLabel: "Thai",
329
- label: "Thai (windows-874)",
429
+ groupId: "thai",
330
430
  isDetectable: !1,
331
431
  isDecodable: !0
332
432
  },
333
433
  "x-mac-cyrillic": {
334
434
  id: "x-mac-cyrillic",
335
- groupLabel: "Cyrillic",
336
- label: "Cyrillic (x-mac-cyrillic)",
435
+ groupId: "cyrillic",
337
436
  isDetectable: !1,
338
437
  isDecodable: !0
339
438
  },
340
439
  "x-user-defined": {
341
440
  id: "x-user-defined",
342
- groupLabel: "Other",
343
- label: "Other (x-user-defined)",
441
+ groupId: "other",
344
442
  isDetectable: !1,
345
443
  isDecodable: !0
346
444
  }
347
- };
348
- function t(t = "en") {
349
- return Array.from(Object.values(e), (e) => ({
350
- ...e,
351
- label: e.label || e.id
352
- })).toSorted((e, t) => e.groupLabel.localeCompare(t.groupLabel) || e.label.localeCompare(t.label));
445
+ }, n = e, r = t;
446
+ function i(e = "en") {
447
+ return Array.from(Object.values(r), ({ groupId: t, id: n, isDecodable: r, isDetectable: i }) => {
448
+ let o = t == null ? "" : a(t, e);
449
+ return {
450
+ id: n,
451
+ groupLabel: o,
452
+ label: o ? `${o} (${n})` : n,
453
+ isDetectable: i,
454
+ isDecodable: r
455
+ };
456
+ }).toSorted((t, n) => t.groupLabel.localeCompare(n.groupLabel, e) || t.label.localeCompare(n.label, e));
457
+ }
458
+ function a(e, t) {
459
+ let r = n[e].label;
460
+ return r[t] ?? r.en ?? e;
353
461
  }
354
462
  //#endregion
355
- export { e as encodingConfigMap, t as getEncodingTypeConfigs };
463
+ export { n as ENCODING_GROUP_CONFIG_MAP, r as ENCODING_TYPE_CONFIG_MAP, i as getEncodingTypeConfigs };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dpuse-shared-encoding.es.js","names":[],"sources":["../src/encoding/encodingGroupConfigs.json","../src/encoding/encodingTypeConfigs.json","../src/encoding/index.ts"],"sourcesContent":["{\n \"arabic\": { \"id\": \"arabic\", \"label\": { \"en\": \"Arabic\", \"es\": \"Árabe\" } },\n \"baltic\": { \"id\": \"baltic\", \"label\": { \"en\": \"Baltic\", \"es\": \"Báltico\" } },\n \"celtic\": { \"id\": \"celtic\", \"label\": { \"en\": \"Celtic\", \"es\": \"Celta\" } },\n \"centralEuropean\": { \"id\": \"centralEuropean\", \"label\": { \"en\": \"Central European\", \"es\": \"Centroeuropeo\" } },\n \"chineseSimplified\": { \"id\": \"chineseSimplified\", \"label\": { \"en\": \"Chinese Simplified\", \"es\": \"Chino simplificado\" } },\n \"chineseTraditional\": { \"id\": \"chineseTraditional\", \"label\": { \"en\": \"Chinese Traditional\", \"es\": \"Chino tradicional\" } },\n \"cyrillic\": { \"id\": \"cyrillic\", \"label\": { \"en\": \"Cyrillic\", \"es\": \"Cirílico\" } },\n \"greek\": { \"id\": \"greek\", \"label\": { \"en\": \"Greek\", \"es\": \"Griego\" } },\n \"hebrew\": { \"id\": \"hebrew\", \"label\": { \"en\": \"Hebrew\", \"es\": \"Hebreo\" } },\n \"japanese\": { \"id\": \"japanese\", \"label\": { \"en\": \"Japanese\", \"es\": \"Japonés\" } },\n \"korean\": { \"id\": \"korean\", \"label\": { \"en\": \"Korean\", \"es\": \"Coreano\" } },\n \"nordic\": { \"id\": \"nordic\", \"label\": { \"en\": \"Nordic\", \"es\": \"Nórdico\" } },\n \"other\": { \"id\": \"other\", \"label\": { \"en\": \"Other\", \"es\": \"Otro\" } },\n \"romanian\": { \"id\": \"romanian\", \"label\": { \"en\": \"Romanian\", \"es\": \"Rumano\" } },\n \"southernEuropean\": { \"id\": \"southernEuropean\", \"label\": { \"en\": \"Southern European\", \"es\": \"Europeo meridional\" } },\n \"thai\": { \"id\": \"thai\", \"label\": { \"en\": \"Thai\", \"es\": \"Tailandés\" } },\n \"turkish\": { \"id\": \"turkish\", \"label\": { \"en\": \"Turkish\", \"es\": \"Turco\" } },\n \"unicode16\": { \"id\": \"unicode16\", \"label\": { \"en\": \"Unicode 16\", \"es\": \"Unicode 16\" } },\n \"unicode32\": { \"id\": \"unicode32\", \"label\": { \"en\": \"Unicode 32\", \"es\": \"Unicode 32\" } },\n \"vietnamese\": { \"id\": \"vietnamese\", \"label\": { \"en\": \"Vietnamese\", \"es\": \"Vietnamita\" } },\n \"western\": { \"id\": \"western\", \"label\": { \"en\": \"Western\", \"es\": \"Occidental\" } }\n}\n","{\n \"ascii\": { \"id\": \"ascii\", \"groupId\": null, \"isDetectable\": false, \"isDecodable\": true },\n \"big5\": { \"id\": \"big5\", \"groupId\": \"chineseTraditional\", \"isDetectable\": true, \"isDecodable\": true },\n \"euc-jp\": { \"id\": \"euc-jp\", \"groupId\": \"japanese\", \"isDetectable\": true, \"isDecodable\": true },\n \"euc-kr\": { \"id\": \"euc-kr\", \"groupId\": \"korean\", \"isDetectable\": true, \"isDecodable\": true },\n \"gb18030\": { \"id\": \"gb18030\", \"groupId\": \"chineseSimplified\", \"isDetectable\": true, \"isDecodable\": true },\n \"gbk\": { \"id\": \"gbk\", \"groupId\": \"chineseSimplified\", \"isDetectable\": false, \"isDecodable\": true },\n \"ibm866\": { \"id\": \"ibm866\", \"groupId\": \"cyrillic\", \"isDetectable\": false, \"isDecodable\": true },\n \"iso-2022-cn\": { \"id\": \"iso-2022-cn\", \"groupId\": \"chineseSimplified\", \"isDetectable\": true, \"isDecodable\": false },\n \"iso-2022-jp\": { \"id\": \"iso-2022-jp\", \"groupId\": \"japanese\", \"isDetectable\": true, \"isDecodable\": true },\n \"iso-2022-kr\": { \"id\": \"iso-2022-kr\", \"groupId\": \"korean\", \"isDetectable\": true, \"isDecodable\": false },\n \"iso-8859-1\": { \"id\": \"iso-8859-1\", \"groupId\": \"western\", \"isDetectable\": true, \"isDecodable\": true },\n \"iso-8859-2\": { \"id\": \"iso-8859-2\", \"groupId\": \"centralEuropean\", \"isDetectable\": true, \"isDecodable\": true },\n \"iso-8859-3\": { \"id\": \"iso-8859-3\", \"groupId\": \"southernEuropean\", \"isDetectable\": false, \"isDecodable\": true },\n \"iso-8859-4\": { \"id\": \"iso-8859-4\", \"groupId\": \"baltic\", \"isDetectable\": false, \"isDecodable\": true },\n \"iso-8859-5\": { \"id\": \"iso-8859-5\", \"groupId\": \"cyrillic\", \"isDetectable\": true, \"isDecodable\": true },\n \"iso-8859-6\": { \"id\": \"iso-8859-6\", \"groupId\": \"arabic\", \"isDetectable\": true, \"isDecodable\": true },\n \"iso-8859-7\": { \"id\": \"iso-8859-7\", \"groupId\": \"greek\", \"isDetectable\": true, \"isDecodable\": true },\n \"iso-8859-8\": { \"id\": \"iso-8859-8\", \"groupId\": \"hebrew\", \"isDetectable\": true, \"isDecodable\": true },\n \"iso-8859-9\": { \"id\": \"iso-8859-9\", \"groupId\": \"turkish\", \"isDetectable\": true, \"isDecodable\": true },\n \"iso-8859-10\": { \"id\": \"iso-8859-10\", \"groupId\": \"nordic\", \"isDetectable\": false, \"isDecodable\": true },\n \"iso-8859-11\": { \"id\": \"iso-8859-11\", \"groupId\": \"thai\", \"isDetectable\": false, \"isDecodable\": true },\n \"iso-8859-13\": { \"id\": \"iso-8859-13\", \"groupId\": \"baltic\", \"isDetectable\": false, \"isDecodable\": true },\n \"iso-8859-14\": { \"id\": \"iso-8859-14\", \"groupId\": \"celtic\", \"isDetectable\": false, \"isDecodable\": true },\n \"iso-8859-15\": { \"id\": \"iso-8859-15\", \"groupId\": \"western\", \"isDetectable\": false, \"isDecodable\": true },\n \"iso-8859-16\": { \"id\": \"iso-8859-16\", \"groupId\": \"romanian\", \"isDetectable\": false, \"isDecodable\": true },\n \"koi8-r\": { \"id\": \"koi8-r\", \"groupId\": \"cyrillic\", \"isDetectable\": true, \"isDecodable\": true },\n \"koi8-u\": { \"id\": \"koi8-u\", \"groupId\": \"cyrillic\", \"isDetectable\": false, \"isDecodable\": true },\n \"latin1\": { \"id\": \"latin1\", \"groupId\": \"western\", \"isDetectable\": false, \"isDecodable\": true },\n \"macintosh\": { \"id\": \"macintosh\", \"groupId\": \"western\", \"isDetectable\": false, \"isDecodable\": true },\n \"shift_jis\": { \"id\": \"shift_jis\", \"groupId\": \"japanese\", \"isDetectable\": true, \"isDecodable\": true },\n \"tis-620\": { \"id\": \"tis-620\", \"groupId\": \"thai\", \"isDetectable\": false, \"isDecodable\": true },\n \"utf-16\": { \"id\": \"utf-16\", \"groupId\": \"unicode16\", \"isDetectable\": false, \"isDecodable\": true },\n \"utf-16be\": { \"id\": \"utf-16be\", \"groupId\": \"unicode16\", \"isDetectable\": true, \"isDecodable\": true },\n \"utf-16le\": { \"id\": \"utf-16le\", \"groupId\": \"unicode16\", \"isDetectable\": true, \"isDecodable\": true },\n \"utf-32be\": { \"id\": \"utf-32be\", \"groupId\": \"unicode32\", \"isDetectable\": true, \"isDecodable\": false },\n \"utf-32le\": { \"id\": \"utf-32le\", \"groupId\": \"unicode32\", \"isDetectable\": true, \"isDecodable\": false },\n \"utf-8\": { \"id\": \"utf-8\", \"groupId\": null, \"isDetectable\": true, \"isDecodable\": true },\n \"windows-1250\": { \"id\": \"windows-1250\", \"groupId\": \"centralEuropean\", \"isDetectable\": true, \"isDecodable\": true },\n \"windows-1251\": { \"id\": \"windows-1251\", \"groupId\": \"cyrillic\", \"isDetectable\": true, \"isDecodable\": true },\n \"windows-1252\": { \"id\": \"windows-1252\", \"groupId\": \"western\", \"isDetectable\": true, \"isDecodable\": true },\n \"windows-1253\": { \"id\": \"windows-1253\", \"groupId\": \"greek\", \"isDetectable\": true, \"isDecodable\": true },\n \"windows-1254\": { \"id\": \"windows-1254\", \"groupId\": \"turkish\", \"isDetectable\": true, \"isDecodable\": true },\n \"windows-1255\": { \"id\": \"windows-1255\", \"groupId\": \"hebrew\", \"isDetectable\": true, \"isDecodable\": true },\n \"windows-1256\": { \"id\": \"windows-1256\", \"groupId\": \"arabic\", \"isDetectable\": true, \"isDecodable\": true },\n \"windows-1257\": { \"id\": \"windows-1257\", \"groupId\": \"baltic\", \"isDetectable\": false, \"isDecodable\": true },\n \"windows-1258\": { \"id\": \"windows-1258\", \"groupId\": \"vietnamese\", \"isDetectable\": false, \"isDecodable\": true },\n \"windows-874\": { \"id\": \"windows-874\", \"groupId\": \"thai\", \"isDetectable\": false, \"isDecodable\": true },\n \"x-mac-cyrillic\": { \"id\": \"x-mac-cyrillic\", \"groupId\": \"cyrillic\", \"isDetectable\": false, \"isDecodable\": true },\n \"x-user-defined\": { \"id\": \"x-user-defined\", \"groupId\": \"other\", \"isDetectable\": false, \"isDecodable\": true }\n}\n","// ── DPUse Framework\nimport { DEFAULT_LOCALE_ID, type LocaleId, type LocaleLabel } from '@/locale/label';\n\n// ── Data\nimport encodingGroupConfigData from './encodingGroupConfigs.json';\nimport encodingTypeConfigData from './encodingTypeConfigs.json';\n\n// ── Types ────────────────────────────────────────────────────────────────────────────────────────────────────────────\n\nexport type EncodingGroupId = keyof typeof encodingGroupConfigData;\nexport type EncodingTypeId = keyof typeof encodingTypeConfigData;\n\nexport interface EncodingGroupConfig {\n id: EncodingGroupId;\n label: LocaleLabel;\n}\n\nexport interface EncodingTypeConfig {\n id: EncodingTypeId;\n groupId: EncodingGroupId | null; // Null for encodings that belong to no group, e.g. 'ascii' and 'utf-8'.\n isDetectable: boolean;\n isDecodable: boolean;\n}\nexport interface EncodingTypeConfigLocalised {\n id: EncodingTypeId;\n groupLabel: string;\n label: string;\n isDetectable: boolean;\n isDecodable: boolean;\n}\n\nexport interface EncodingDetectionConfig {\n id: EncodingTypeId;\n confidenceLevel: number | undefined;\n}\n\n// ── Constants ────────────────────────────────────────────────────────────────────────────────────────────────────────\n\nexport const ENCODING_GROUP_CONFIG_MAP = encodingGroupConfigData as Record<EncodingGroupId, EncodingGroupConfig>;\nexport const ENCODING_TYPE_CONFIG_MAP = encodingTypeConfigData as Record<string, EncodingTypeConfig>; // Keyed by string, not 'EncodingTypeId', because it is looked up with names detected at runtime.\n\n// ── Actions ──────────────────────────────────────────────────────────────────────────────────────────────────────────\n\nexport function getEncodingTypeConfigs(localeId: LocaleId = DEFAULT_LOCALE_ID): EncodingTypeConfigLocalised[] {\n const encodingTypeConfigs: EncodingTypeConfigLocalised[] = Array.from(Object.values(ENCODING_TYPE_CONFIG_MAP), ({ groupId, id, isDecodable, isDetectable }) => {\n const groupLabel = groupId == null ? '' : resolveGroupLabel(groupId, localeId);\n return { id, groupLabel, label: groupLabel ? `${groupLabel} (${id})` : id, isDetectable, isDecodable };\n });\n return encodingTypeConfigs.toSorted((left, right) => left.groupLabel.localeCompare(right.groupLabel, localeId) || left.label.localeCompare(right.label, localeId));\n}\n\n// ── Helpers ──────────────────────────────────────────────────────────────────────────────────────────────────────────\n\nfunction resolveGroupLabel(groupId: EncodingGroupId, localeId: LocaleId): string {\n const labels =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js","names":[],"sources":["../src/errors/index.ts"],"sourcesContent":["// ── Types ────────────────────────────────────────────────────────────────────────────────────────────────────────────\n\n// Serializable representation of an error; used for transporting errors across api and worker boundaries\nexport interface SerialisedError {\n data: Record<string, unknown> | undefined;\n locator: string; // Error locator 'package.module.method'\n message: string; // Human-readable error message\n name: string; // Error class or type name\n stack: string | undefined; // Stack trace if available\n}\n\n// ── Constants ───────────────────────────────────────────────────────────────────────────────────────────────────────\n\nconst RESPONSE_ERROR_BODY_LIMIT = 2048;\n\n// ── Errors ───────────────────────────────────────────────────────────────────────────────────────────────────────────\n\n// Base class for all DPUse errors; includes a locator for the error; never thrown directly\nexport class DPUseError extends Error {\n readonly data: Record<string, unknown> | undefined;\n readonly locator: string; // Error locator 'package.module.method'\n constructor(message: string, locator: string, data?: Record<string, unknown>, options?: ErrorOptions) {\n super(message, options);\n this.name = 'DPUseError';\n this.data = data;\n this.locator = locator;\n }\n}\n\n// Thrown when an app (studio/assistant) error occurs\nexport class AppError extends DPUseError {\n constructor(message: string, locator: string, data?: Record<string, unknown>, options?: ErrorOptions) {\n super(message, locator, data, options);\n this.name = 'AppError';\n }\n}\n\n// Thrown when an API request fails\nexport class APIError extends DPUseError {\n constructor(message: string, locator: string, data?: Record<string, unknown>, options?: ErrorOptions) {\n super(message, locator, data, options);\n this.name = 'APIError';\n }\n}\n\n// Thrown when an engine request fails\nexport class EngineError extends DPUseError {\n constructor(message: string, locator: string, data?: Record<string, unknown>, options?: ErrorOptions) {\n super(message, locator, data, options);\n this.name = 'EngineError';\n }\n}\n\n// Thrown when an connector operation fails; will always be wrapped in an engine error\nexport class ConnectorError extends DPUseError {\n constructor(message: string, locator: string, data?: Record<string, unknown>, options?: ErrorOptions) {\n super(message, locator, data, options);\n this.name = 'ConnectorError';\n }\n}\n\n// Thrown when an HTTP request fails; may include a sanitized portion of the response body for diagnostic purposes\nexport class FetchError extends DPUseError {\n constructor(message: string, locator: string, data?: Record<string, unknown>, options?: ErrorOptions) {\n super(message, locator, data, options);\n this.name = 'FetchError';\n }\n}\n\n// ── Actions ──────────────────────────────────────────────────────────────────────────────────────────────────────────\n\n// Builds a fetch error from an HTTP response; includes a text copy of the response body\nexport async function buildFetchError(response: { status: number; statusText: string; text: () => Promise<string> }, message: string, locator: string): Promise<FetchError> {\n const responseStatusStuff = ` - ${response.statusText}`;\n const fetchMessage = `${message} Response status '${String(response.status)}${response.statusText ? responseStatusStuff : ''}' received.`;\n let bodyText: string;\n try {\n bodyText = await response.text();\n } catch (error) {\n const normalised = normalizeToError(error);\n bodyText = `<body unavailable: ${normalised.message}>`;\n }\n return new FetchError(fetchMessage, locator, { body: sanitizeResponseErrorBody(bodyText) });\n}\n\n// Concatenates serialized error messages into a single string\nexport function concatenateSerialisedErrorMessages(serialisedErrors: SerialisedError[]): string {\n return serialisedErrors.map((serialisedError) => serialisedError.message).join(' ');\n}\n\n// Ignore best-effort cleanup errors to keep teardown noise-free\nexport function ignoreErrors(action: () => void): void {\n try {\n action();\n } catch {\n // Intentionally ignore errors\n }\n}\n\n// Normalizes an unknown thrown value into an error\nexport function normalizeToError(value: unknown): Error {\n if (value instanceof Error) return value;\n if (typeof value === 'string') return new Error(value);\n if (typeof value === 'number' || typeof value === 'boolean' || typeof value === 'bigint') return new Error(String(value));\n if (typeof value === 'symbol') return new Error(value.description ?? 'Unknown error');\n if (typeof value === 'object') {\n try {\n return new Error(JSON.stringify(value));\n } catch {\n return new Error('Unknown error');\n }\n }\n return new Error('Unknown error');\n}\n\n// Serializes an error and its cause chain into a array of serialised error objects;\n// errors are ordered from outermost to root cause;\n// cycles in the cause chain are safely ignored;\n// messages are normalized to end with punctuation\nexport function serialiseError(error?: unknown): SerialisedError[] {\n const seenCauses = new Set();\n const serialisedErrors: SerialisedError[] = [];\n let cause: Error | null = normalizeToError(error);\n while (cause != null && !seenCauses.has(cause)) {\n seenCauses.add(cause);\n const [serialisedError, nextCause] = serialiseSingleError(cause);\n if (!/(?:\\.{3}|[.!?])$/.test(serialisedError.message)) serialisedError.message += '.';\n serialisedErrors.push(serialisedError);\n cause = nextCause;\n }\n return serialisedErrors;\n}\n\n// Unserialises an array of serialised error objects back into an error with a cause chain;\n// reconstructs the appropriate error class based on serialized properties;\n// chains errors from outermost to root cause using the `cause` option;\n// returns a placeholder error if the input array is empty\nexport function unserialiseError(serialisedErrors: SerialisedError[]): Error {\n // Build the error chain from root cause (end) to outermost (start)\n let rebuiltError: Error | undefined;\n for (const serialised of serialisedErrors.toReversed()) {\n const error = reconstructError(serialised, rebuiltError);\n if (serialised.stack !== undefined) error.stack = serialised.stack; // Restore stack trace if available\n rebuiltError = error;\n }\n return rebuiltError ?? new Error('No error to unserialise.');\n}\n\n// ── Helpers ──────────────────────────────────────────────────────────────────────────────────────────────────────────\n\n// Builds a fallback message for non-error throwables\nfunction buildFallbackMessage(cause: unknown): string {\n let fallbackMessage: string;\n try {\n fallbackMessage = JSON.stringify(cause);\n } catch {\n if (typeof cause === 'symbol') fallbackMessage = cause.description ?? 'Unknown error';\n else if (typeof cause === 'bigint') fallbackMessage = cause.toString();\n else fallbackMessage = 'Unknown error';\n }\n if (fallbackMessage === '') fallbackMessage = 'Unknown error';\n return fallbackMessage;\n}\n\nfunction reconstructError(serialised: SerialisedError, cause: Error | undefined): Error {\n switch (serialised.name) {\n case 'APIError':\n return new APIError(serialised.message, serialised.locator, serialised.data, { cause });\n case 'AppError':\n return new AppError(serialised.message, serialised.locator, serialised.data, { cause });\n case 'ConnectorError':\n return new ConnectorError(serialised.message, serialised.locator, serialised.data, { cause });\n case 'EngineError':\n return new EngineError(serialised.message, serialised.locator, serialised.data, { cause });\n case 'FetchError':\n return new FetchError(serialised.message, serialised.locator, serialised.data, { cause });\n default: {\n const name = serialised.name;\n return new (class extends Error {\n override name = name;\n })(serialised.message, { cause });\n }\n }\n}\n\n// Sanitizes a response body; limits body size to avoid excessive payloads when logging\nfunction sanitizeResponseErrorBody(body?: string): string | undefined {\n if (body == null || body === '') return undefined;\n return body.length > RESPONSE_ERROR_BODY_LIMIT ? `${body.slice(0, RESPONSE_ERROR_BODY_LIMIT)}... [truncated]` : body;\n}\n\nfunction serialiseSingleError(cause: Error): [SerialisedError, Error | null] {\n const nextCause = cause.cause == null ? null : normalizeToError(cause.cause);\n if (cause instanceof DPUseError) {\n return [{ data: cause.data, locator: cause.locator, message: cause.message, name: cause.name, stack: cause.stack }, nextCause];\n }\n const customProperties = Object.fromEntries(Object.entries(cause).filter(([k]) => k !== 'cause'));\n return cause.name\n ? [{ data: customProperties, locator: '', message: cause.message, name: cause.name, stack: cause.stack }, nextCause]\n : [{ data: customProperties, locator: '', message: buildFallbackMessage(cause), name: 'Error', stack: undefined }, null];\n}\n"],"mappings":";AAaA,IAAM,IAA4B,MAKrB,IAAb,cAAgC,MAAM;CAClC;CACA;CACA,YAAY,GAAiB,GAAiB,GAAgC,GAAwB;EAIlG,AAHA,MAAM,GAAS,CAAO,GACtB,KAAK,OAAO,cACZ,KAAK,OAAO,GACZ,KAAK,UAAU;CACnB;AACJ,GAGa,IAAb,cAA8B,EAAW;CACrC,YAAY,GAAiB,GAAiB,GAAgC,GAAwB;EAElG,AADA,MAAM,GAAS,GAAS,GAAM,CAAO,GACrC,KAAK,OAAO;CAChB;AACJ,GAGa,IAAb,cAA8B,EAAW;CACrC,YAAY,GAAiB,GAAiB,GAAgC,GAAwB;EAElG,AADA,MAAM,GAAS,GAAS,GAAM,CAAO,GACrC,KAAK,OAAO;CAChB;AACJ,GAGa,IAAb,cAAiC,EAAW;CACxC,YAAY,GAAiB,GAAiB,GAAgC,GAAwB;EAElG,AADA,MAAM,GAAS,GAAS,GAAM,CAAO,GACrC,KAAK,OAAO;CAChB;AACJ,GAGa,IAAb,cAAoC,EAAW;CAC3C,YAAY,GAAiB,GAAiB,GAAgC,GAAwB;EAElG,AADA,MAAM,GAAS,GAAS,GAAM,CAAO,GACrC,KAAK,OAAO;CAChB;AACJ,GAGa,IAAb,cAAgC,EAAW;CACvC,YAAY,GAAiB,GAAiB,GA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