@cbortech/cbor 0.26.5 → 0.26.6
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/README.ja.md +95 -34
- package/README.md +99 -38
- package/dist/ast/index.cjs +1 -1
- package/dist/ast/index.js +2 -2
- package/dist/cbor.d.ts +8 -0
- package/dist/cddl/ast.d.ts +196 -0
- package/dist/cddl/controls.d.ts +28 -0
- package/dist/cddl/equal.d.ts +19 -0
- package/dist/cddl/errors.d.ts +91 -0
- package/dist/cddl/index.cjs +3 -0
- package/dist/cddl/index.cjs.map +1 -0
- package/dist/cddl/index.d.ts +52 -0
- package/dist/cddl/index.js +67 -0
- package/dist/cddl/index.js.map +1 -0
- package/dist/cddl/parser.d.ts +13 -0
- package/dist/cddl/position.d.ts +13 -0
- package/dist/cddl/prelude.d.ts +5 -0
- package/dist/cddl/schema.d.ts +90 -0
- package/dist/cddl/tokenizer.d.ts +138 -0
- package/dist/cddl/validator.d.ts +30 -0
- package/dist/cddl/writer.d.ts +23 -0
- package/dist/index.cjs +7 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +104 -77
- package/dist/index.js.map +1 -1
- package/dist/mapEntries-BhMlCwYo.cjs +15 -0
- package/dist/mapEntries-BhMlCwYo.cjs.map +1 -0
- package/dist/{mapEntries-Clr-oNtQ.js → mapEntries-Czxt-cmd.js} +427 -422
- package/dist/mapEntries-Czxt-cmd.js.map +1 -0
- package/dist/schema-BmGsaEaW.cjs +63 -0
- package/dist/schema-BmGsaEaW.cjs.map +1 -0
- package/dist/schema-BxkgvUY6.js +1977 -0
- package/dist/schema-BxkgvUY6.js.map +1 -0
- package/dist/types.d.ts +89 -0
- package/dist/utils/base64.d.ts +12 -0
- package/package.json +23 -6
- package/dist/mapEntries-6hy7UgeN.cjs +0 -15
- package/dist/mapEntries-6hy7UgeN.cjs.map +0 -1
- package/dist/mapEntries-Clr-oNtQ.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { o as e } from "./tokenizer-CeuixxXi.js";
|
|
2
|
-
import {
|
|
2
|
+
import { n as t, s as n } from "./schema-BxkgvUY6.js";
|
|
3
|
+
import { B as r, H as i, L as a, R as o, V as s, _ as c, a as l, c as u, d, f, h as p, i as m, k as h, l as g, m as _, n as v, o as y, p as b, r as x, s as S, t as C, u as w, z as T } from "./mapEntries-Czxt-cmd.js";
|
|
3
4
|
//#region src/extensions/b32.ts
|
|
4
|
-
var
|
|
5
|
-
function
|
|
5
|
+
var E = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567", D = "0123456789ABCDEFGHIJKLMNOPQRSTUV";
|
|
6
|
+
function O(e) {
|
|
6
7
|
let t = e.length;
|
|
7
8
|
for (; t > 0 && e.charCodeAt(t - 1) === 61;) t--;
|
|
8
9
|
return e.slice(0, t);
|
|
9
10
|
}
|
|
10
|
-
function
|
|
11
|
-
let r =
|
|
11
|
+
function k(e, t, n) {
|
|
12
|
+
let r = O(e).toUpperCase(), i = r.length % 8;
|
|
12
13
|
if (i === 1 || i === 3 || i === 6) throw SyntaxError(`invalid base32 length: ${r.length} characters`);
|
|
13
14
|
let a = (/* @__PURE__ */ new Uint8Array(128)).fill(255);
|
|
14
15
|
for (let e = 0; e < t.length; e++) a[t.charCodeAt(e)] = e;
|
|
@@ -25,43 +26,59 @@ function D(e, t, n) {
|
|
|
25
26
|
}
|
|
26
27
|
return o;
|
|
27
28
|
}
|
|
28
|
-
var
|
|
29
|
+
var A = {
|
|
29
30
|
appStringPrefixes: ["b32"],
|
|
30
|
-
parseAppString(e,
|
|
31
|
-
return new
|
|
31
|
+
parseAppString(e, t, n) {
|
|
32
|
+
return new h(k(y(t), E, n), { ednEncoding: "base32" });
|
|
32
33
|
}
|
|
33
|
-
},
|
|
34
|
+
}, j = {
|
|
34
35
|
appStringPrefixes: ["h32"],
|
|
35
|
-
parseAppString(e,
|
|
36
|
-
return new
|
|
36
|
+
parseAppString(e, t, n) {
|
|
37
|
+
return new h(k(y(t), D, n), { ednEncoding: "base32hex" });
|
|
37
38
|
}
|
|
38
39
|
};
|
|
39
40
|
//#endregion
|
|
40
41
|
//#region src/extensions/same.ts
|
|
41
|
-
function
|
|
42
|
+
function M(e, t) {
|
|
42
43
|
if (e.length !== t.length) return !1;
|
|
43
44
|
for (let n = 0; n < e.length; n++) if (e[n] !== t[n]) return !1;
|
|
44
45
|
return !0;
|
|
45
46
|
}
|
|
46
|
-
var
|
|
47
|
+
var N = {
|
|
47
48
|
appStringPrefixes: ["same"],
|
|
48
49
|
preserveAppSeqSource: !0,
|
|
49
50
|
parseAppSequence(e, t, n) {
|
|
50
51
|
if (t.length === 0) throw SyntaxError("same<<...>> requires at least one item");
|
|
51
52
|
let r = t[0], i = r.toCBOR();
|
|
52
|
-
for (let e = 1; e < t.length; e++) if (!
|
|
53
|
+
for (let e = 1; e < t.length; e++) if (!M(i, t[e].toCBOR())) {
|
|
53
54
|
let t = `same<<...>>: item ${e} produces different CBOR bytes than item 0`;
|
|
54
55
|
if (n) n(t);
|
|
55
56
|
else throw SyntaxError(t);
|
|
56
57
|
}
|
|
57
58
|
return r;
|
|
58
59
|
}
|
|
59
|
-
},
|
|
60
|
+
}, P = /* @__PURE__ */ new Map(), F = 64;
|
|
61
|
+
function I(e) {
|
|
62
|
+
if (typeof e != "string") return e;
|
|
63
|
+
let n = P.get(e);
|
|
64
|
+
return n || (n = t(e), P.size >= F && P.delete(P.keys().next().value), P.set(e, n)), n;
|
|
65
|
+
}
|
|
66
|
+
function L(e, t, r) {
|
|
67
|
+
if (t) {
|
|
68
|
+
let i = t.validate(e, r);
|
|
69
|
+
if (!i.valid) throw new n(i.errors, i.warnings);
|
|
70
|
+
}
|
|
71
|
+
return e;
|
|
72
|
+
}
|
|
73
|
+
function R(e, t) {
|
|
74
|
+
return L(e, I(t?.cddl), t?.cddlValidationOptions);
|
|
75
|
+
}
|
|
76
|
+
var z = class t {
|
|
60
77
|
static OMIT = o;
|
|
61
|
-
static TAG =
|
|
62
|
-
static Tag =
|
|
78
|
+
static TAG = T;
|
|
79
|
+
static Tag = s;
|
|
63
80
|
static Simple = a;
|
|
64
|
-
static MapEntries =
|
|
81
|
+
static MapEntries = C;
|
|
65
82
|
static dt_as_Date = p;
|
|
66
83
|
#e;
|
|
67
84
|
constructor(e) {
|
|
@@ -153,7 +170,7 @@ var j = {
|
|
|
153
170
|
stringify(e, n, r) {
|
|
154
171
|
if (typeof n == "function" || Array.isArray(n) || n === null || n === void 0 && r !== void 0) {
|
|
155
172
|
let i = { ...this.#e };
|
|
156
|
-
return n === null ? i.replacer = void 0 : (typeof n == "function" || Array.isArray(n)) && (i.replacer = n), r !== void 0 && (i.indent =
|
|
173
|
+
return n === null ? i.replacer = void 0 : (typeof n == "function" || Array.isArray(n)) && (i.replacer = n), r !== void 0 && (i.indent = K(r)), t.stringify(e, i);
|
|
157
174
|
}
|
|
158
175
|
return t.stringify(e, this.#t(n ?? void 0));
|
|
159
176
|
}
|
|
@@ -161,73 +178,73 @@ var j = {
|
|
|
161
178
|
return t.format(e, this.#t(n));
|
|
162
179
|
}
|
|
163
180
|
static fromCBOR(e, t) {
|
|
164
|
-
return d(e, t);
|
|
181
|
+
return R(d(e, t), t);
|
|
165
182
|
}
|
|
166
183
|
static fromCDN(e, t) {
|
|
167
|
-
return c(e, t);
|
|
184
|
+
return R(c(e, t), t);
|
|
168
185
|
}
|
|
169
186
|
static fromEDN(e, n) {
|
|
170
187
|
return t.fromCDN(e, n);
|
|
171
188
|
}
|
|
172
189
|
static *fromHexDumpSeq(e, n) {
|
|
173
|
-
let r = [], i =
|
|
190
|
+
let r = [], i = B(e).trim().split(/\s+/).filter(Boolean);
|
|
174
191
|
for (let e of i) if (/^[0-9A-Fa-f]{2}$/.test(e)) r.push(parseInt(e, 16));
|
|
175
192
|
else if (/^[0-9A-Fa-f]+$/.test(e) && e.length % 2 == 0) for (let t = 0; t < e.length; t += 2) r.push(parseInt(e.slice(t, t + 2), 16));
|
|
176
193
|
else throw SyntaxError(`Invalid hex token in dump: ${JSON.stringify(e)}`);
|
|
177
194
|
yield* t.fromCBORSeq(new Uint8Array(r), n);
|
|
178
195
|
}
|
|
179
196
|
static *fromCBORSeq(e, t) {
|
|
180
|
-
let n = e instanceof ArrayBuffer || typeof SharedArrayBuffer < "u" && e instanceof SharedArrayBuffer ? new Uint8Array(e) : new Uint8Array(e.buffer, e.byteOffset, e.byteLength),
|
|
181
|
-
for (;
|
|
182
|
-
let e = d(
|
|
197
|
+
let n = I(t?.cddl), r = e instanceof ArrayBuffer || typeof SharedArrayBuffer < "u" && e instanceof SharedArrayBuffer ? new Uint8Array(e) : new Uint8Array(e.buffer, e.byteOffset, e.byteLength), i = 0;
|
|
198
|
+
for (; i < r.byteLength;) {
|
|
199
|
+
let e = d(r, {
|
|
183
200
|
...t,
|
|
184
|
-
offset:
|
|
201
|
+
offset: i,
|
|
185
202
|
allowTrailing: !0
|
|
186
203
|
});
|
|
187
|
-
yield e,
|
|
204
|
+
yield L(e, n, t?.cddlValidationOptions), i = e.end;
|
|
188
205
|
}
|
|
189
206
|
}
|
|
190
207
|
static *fromCDNSeq(t, n) {
|
|
191
|
-
let r = !!n?.preserveComments,
|
|
208
|
+
let r = I(n?.cddl), i = !!n?.preserveComments, a = 0, o = !0;
|
|
192
209
|
for (;;) {
|
|
193
|
-
let { offset:
|
|
194
|
-
if (
|
|
210
|
+
let { offset: s, hadSeparator: l, commaOffset: u } = G(t, a, n, i ? o ? "all" : "after-newline" : "none");
|
|
211
|
+
if (o && u >= 0) {
|
|
195
212
|
let e = "leading comma in CDN sequence";
|
|
196
213
|
if (n?.strict !== !1) throw SyntaxError(e);
|
|
197
|
-
|
|
214
|
+
U(e, u, n);
|
|
198
215
|
}
|
|
199
|
-
if (
|
|
200
|
-
if (!
|
|
216
|
+
if (s >= t.length || i && W(t, s) && G(t, s, n).offset >= t.length) break;
|
|
217
|
+
if (!o && !l) {
|
|
201
218
|
let e = "CDN sequence items must be separated by whitespace, comma, or comment";
|
|
202
219
|
if (n?.strict !== !1) throw SyntaxError(e);
|
|
203
|
-
|
|
220
|
+
U(e, s, n);
|
|
204
221
|
}
|
|
205
|
-
|
|
206
|
-
let
|
|
222
|
+
a = s;
|
|
223
|
+
let d;
|
|
207
224
|
try {
|
|
208
|
-
|
|
225
|
+
d = c(t, {
|
|
209
226
|
...n,
|
|
210
|
-
offset:
|
|
227
|
+
offset: a,
|
|
211
228
|
allowTrailing: !0,
|
|
212
229
|
_skipRS: !0
|
|
213
230
|
});
|
|
214
231
|
} catch (t) {
|
|
215
232
|
if (n?.strict !== !1) throw t;
|
|
216
|
-
|
|
233
|
+
U(t instanceof Error ? t.message : String(t), a, n, !0, t instanceof e ? t : void 0);
|
|
217
234
|
break;
|
|
218
235
|
}
|
|
219
|
-
yield
|
|
236
|
+
yield L(d, r, n?.cddlValidationOptions), a = d.end, o = !1;
|
|
220
237
|
}
|
|
221
238
|
}
|
|
222
239
|
static fromJS(e, t) {
|
|
223
|
-
return
|
|
240
|
+
return R(x(e, t), t);
|
|
224
241
|
}
|
|
225
242
|
static fromHexDump(e, t) {
|
|
226
|
-
let n = [], r =
|
|
243
|
+
let n = [], r = B(e).trim().split(/\s+/).filter(Boolean);
|
|
227
244
|
for (let e of r) if (/^[0-9A-Fa-f]{2}$/.test(e)) n.push(parseInt(e, 16));
|
|
228
245
|
else if (/^[0-9A-Fa-f]+$/.test(e) && e.length % 2 == 0) for (let t = 0; t < e.length; t += 2) n.push(parseInt(e.slice(t, t + 2), 16));
|
|
229
246
|
else throw SyntaxError(`Invalid hex token in dump: ${JSON.stringify(e)}`);
|
|
230
|
-
return d(new Uint8Array(n), t);
|
|
247
|
+
return R(d(new Uint8Array(n), t), t);
|
|
231
248
|
}
|
|
232
249
|
static decode(e, n) {
|
|
233
250
|
return t.fromCBOR(e, n).toJS(n);
|
|
@@ -273,7 +290,14 @@ var j = {
|
|
|
273
290
|
}
|
|
274
291
|
i.push(e);
|
|
275
292
|
}
|
|
276
|
-
}, c =
|
|
293
|
+
}, c = I(r?.cddl), l = [], u = [], d = (e) => {
|
|
294
|
+
if (!c) return;
|
|
295
|
+
let t = c.validate(e, r?.cddlValidationOptions);
|
|
296
|
+
l.push(...t.errors), t.warnings && u.push(...t.warnings);
|
|
297
|
+
}, f = c ? {
|
|
298
|
+
cddlErrors: l,
|
|
299
|
+
cddlWarnings: u
|
|
300
|
+
} : {}, p = 0;
|
|
277
301
|
try {
|
|
278
302
|
let e = r?.type ?? "cbor";
|
|
279
303
|
if (e === "cdn") {
|
|
@@ -281,33 +305,36 @@ var j = {
|
|
|
281
305
|
...s,
|
|
282
306
|
unresolvedExtension: r?.unresolvedExtension
|
|
283
307
|
};
|
|
284
|
-
for (let r of t.fromCDNSeq(n, e))
|
|
285
|
-
} else if (e === "hex") for (let e of t.fromHexDumpSeq(n, s))
|
|
286
|
-
else for (let e of t.fromCBORSeq(n, s))
|
|
308
|
+
for (let r of t.fromCDNSeq(n, e)) p++, d(r);
|
|
309
|
+
} else if (e === "hex") for (let e of t.fromHexDumpSeq(n, s)) p++, d(e);
|
|
310
|
+
else for (let e of t.fromCBORSeq(n, s)) p++, d(e);
|
|
287
311
|
} catch (e) {
|
|
288
312
|
return {
|
|
289
313
|
valid: !1,
|
|
290
|
-
count:
|
|
314
|
+
count: p,
|
|
291
315
|
warnings: i,
|
|
292
316
|
hints: a,
|
|
293
|
-
error: e instanceof Error ? e : Error(String(e))
|
|
317
|
+
error: e instanceof Error ? e : Error(String(e)),
|
|
318
|
+
...f
|
|
294
319
|
};
|
|
295
320
|
}
|
|
296
321
|
if (o) {
|
|
297
322
|
let t = o.cause instanceof Error ? o.cause : new e(o.message, { offset: o.offset });
|
|
298
323
|
return {
|
|
299
324
|
valid: !1,
|
|
300
|
-
count:
|
|
325
|
+
count: p,
|
|
301
326
|
warnings: i,
|
|
302
327
|
hints: a,
|
|
303
|
-
error: t
|
|
328
|
+
error: t,
|
|
329
|
+
...f
|
|
304
330
|
};
|
|
305
331
|
}
|
|
306
332
|
return {
|
|
307
|
-
valid: i.length === 0,
|
|
308
|
-
count:
|
|
333
|
+
valid: i.length === 0 && l.length === 0,
|
|
334
|
+
count: p,
|
|
309
335
|
warnings: i,
|
|
310
|
-
hints: a
|
|
336
|
+
hints: a,
|
|
337
|
+
...f
|
|
311
338
|
};
|
|
312
339
|
}
|
|
313
340
|
static cborToCdn(e, n) {
|
|
@@ -327,81 +354,81 @@ var j = {
|
|
|
327
354
|
}
|
|
328
355
|
static stringify(e, t, n) {
|
|
329
356
|
if (typeof t == "function" || Array.isArray(t) || t === null || t === void 0 && n !== void 0) {
|
|
330
|
-
let r = typeof t == "function" || Array.isArray(t) ? t : void 0, i =
|
|
357
|
+
let r = typeof t == "function" || Array.isArray(t) ? t : void 0, i = K(n);
|
|
331
358
|
if (r) {
|
|
332
|
-
let t =
|
|
333
|
-
return t === void 0 || t === o ? void 0 :
|
|
359
|
+
let t = v(e, r);
|
|
360
|
+
return t === void 0 || t === o ? void 0 : x(t).toCDN(i === void 0 ? void 0 : { indent: i });
|
|
334
361
|
}
|
|
335
|
-
return
|
|
362
|
+
return x(e).toCDN(i === void 0 ? void 0 : { indent: i });
|
|
336
363
|
}
|
|
337
364
|
let r = t;
|
|
338
365
|
if (r?.replacer) {
|
|
339
|
-
let t =
|
|
366
|
+
let t = v(e, r.replacer, r.extensions, r.undefinedOmits, r.builtinExtensions);
|
|
340
367
|
if (t === void 0 || t === o) return;
|
|
341
368
|
let { replacer: n, ...i } = r;
|
|
342
|
-
return
|
|
369
|
+
return R(x(t, Object.keys(i).length > 0 ? i : void 0), r).toCDN(r);
|
|
343
370
|
}
|
|
344
|
-
return
|
|
371
|
+
return R(x(e, r), r).toCDN(r);
|
|
345
372
|
}
|
|
346
373
|
static format(e, n) {
|
|
347
374
|
return t.fromCDN(e, n).toCDN(n);
|
|
348
375
|
}
|
|
349
376
|
};
|
|
350
|
-
function
|
|
377
|
+
function B(e) {
|
|
351
378
|
let t = "", n = 0;
|
|
352
379
|
for (; n < e.length;) {
|
|
353
380
|
let r = e[n], i = e[n + 1] ?? "";
|
|
354
381
|
if (r === "-" && i === "-") {
|
|
355
|
-
n =
|
|
382
|
+
n = V(e, n + 2), t += " ";
|
|
356
383
|
continue;
|
|
357
384
|
}
|
|
358
385
|
if (r === "—") {
|
|
359
|
-
n =
|
|
386
|
+
n = V(e, n + 1), t += " ";
|
|
360
387
|
continue;
|
|
361
388
|
}
|
|
362
389
|
if (r === "#") {
|
|
363
|
-
n =
|
|
390
|
+
n = V(e, n + 1), t += " ";
|
|
364
391
|
continue;
|
|
365
392
|
}
|
|
366
393
|
if (r === "/" && i === "/") {
|
|
367
|
-
n =
|
|
394
|
+
n = V(e, n + 2), t += " ";
|
|
368
395
|
continue;
|
|
369
396
|
}
|
|
370
397
|
if (r === "/" && i === "*") {
|
|
371
398
|
let r = e.indexOf("*/", n + 2);
|
|
372
399
|
if (r < 0) throw SyntaxError("Unterminated comment in hex dump");
|
|
373
|
-
t +=
|
|
400
|
+
t += H(e.slice(n, r + 2)), n = r + 2;
|
|
374
401
|
continue;
|
|
375
402
|
}
|
|
376
403
|
if (r === "/") {
|
|
377
404
|
let r = e.indexOf("/", n + 1);
|
|
378
405
|
if (r < 0) throw SyntaxError("Unterminated comment in hex dump");
|
|
379
|
-
t +=
|
|
406
|
+
t += H(e.slice(n, r + 1)), n = r + 1;
|
|
380
407
|
continue;
|
|
381
408
|
}
|
|
382
409
|
t += r, n++;
|
|
383
410
|
}
|
|
384
411
|
return t;
|
|
385
412
|
}
|
|
386
|
-
function
|
|
413
|
+
function V(e, t) {
|
|
387
414
|
let n = e.indexOf("\n", t);
|
|
388
415
|
return n < 0 ? e.length : n;
|
|
389
416
|
}
|
|
390
|
-
function
|
|
417
|
+
function H(e) {
|
|
391
418
|
return e.replace(/[^\r\n]/g, " ");
|
|
392
419
|
}
|
|
393
|
-
function
|
|
420
|
+
function U(e, t, n, r, i) {
|
|
394
421
|
let a = i?.offset ?? t, o = {
|
|
395
422
|
message: e,
|
|
396
423
|
offset: a
|
|
397
424
|
};
|
|
398
425
|
r && (o.fatal = !0), i && (o.cause = i), i?.offset !== void 0 && (o.line = i.line, o.column = i.column, o.endOffset = i.endOffset), n?.onWarning ? n.onWarning(o) : n?.silent || console.warn(`CDN sequence warning at offset ${a}: ${e}`);
|
|
399
426
|
}
|
|
400
|
-
function
|
|
427
|
+
function W(e, t) {
|
|
401
428
|
let n = e[t];
|
|
402
429
|
return n === "#" || n === "/";
|
|
403
430
|
}
|
|
404
|
-
function
|
|
431
|
+
function G(e, t, n, r = "none") {
|
|
405
432
|
let i = t, a = !1, o = !1, s = !1, c = -1, l = () => r === "all" || r === "after-newline" && s;
|
|
406
433
|
for (; i < e.length;) {
|
|
407
434
|
let t = e[i];
|
|
@@ -431,7 +458,7 @@ function R(e, t, n, r = "none") {
|
|
|
431
458
|
if (t < 0) {
|
|
432
459
|
let t = "unterminated /* comment in CDN sequence";
|
|
433
460
|
if (n?.strict !== !1) throw SyntaxError(t);
|
|
434
|
-
|
|
461
|
+
U(t, i, n, !0), i = e.length;
|
|
435
462
|
} else e.slice(i, t).includes("\n") && (s = !0), i = t + 2;
|
|
436
463
|
continue;
|
|
437
464
|
}
|
|
@@ -441,7 +468,7 @@ function R(e, t, n, r = "none") {
|
|
|
441
468
|
if (t < 0) {
|
|
442
469
|
let t = "unterminated / comment in CDN sequence";
|
|
443
470
|
if (n?.strict !== !1) throw SyntaxError(t);
|
|
444
|
-
|
|
471
|
+
U(t, i, n, !0), i = e.length;
|
|
445
472
|
} else e.slice(i, t).includes("\n") && (s = !0), i = t + 1;
|
|
446
473
|
continue;
|
|
447
474
|
}
|
|
@@ -457,7 +484,7 @@ function R(e, t, n, r = "none") {
|
|
|
457
484
|
commaOffset: c
|
|
458
485
|
};
|
|
459
486
|
}
|
|
460
|
-
function
|
|
487
|
+
function K(e) {
|
|
461
488
|
if (typeof e == "number") {
|
|
462
489
|
let t = Math.floor(Math.min(10, Math.max(0, e)));
|
|
463
490
|
return t === 0 ? void 0 : t;
|
|
@@ -465,6 +492,6 @@ function z(e) {
|
|
|
465
492
|
if (typeof e == "string") return e.slice(0, 10) || void 0;
|
|
466
493
|
}
|
|
467
494
|
//#endregion
|
|
468
|
-
export { m as BUILTIN_EXTENSIONS,
|
|
495
|
+
export { m as BUILTIN_EXTENSIONS, z as CBOR, z as default, o as CBOR_OMIT, T as CBOR_TAG, n as CddlMismatchError, e as CdnSyntaxError, C as MapEntries, r as Null, a as Simple, s as Tag, i as Undefined, g as b1, A as b32, f as cri, _ as dt, p as dt_as_Date, l as float, j as h32, S as ilbs, u as ilts, b as ip, N as same, w as t1 };
|
|
469
496
|
|
|
470
497
|
//# sourceMappingURL=index.js.map
|