@industry-theme/principal-view-panels 0.2.4 → 0.2.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.
@@ -1,1078 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __typeError = (msg) => {
3
- throw TypeError(msg);
4
- };
5
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6
- var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
7
- var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
8
- var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
9
- var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
10
- var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
11
- /*!
12
- * Copyright (c) Squirrel Chat et al., All rights reserved.
13
- * SPDX-License-Identifier: BSD-3-Clause
14
- *
15
- * Redistribution and use in source and binary forms, with or without
16
- * modification, are permitted provided that the following conditions are met:
17
- *
18
- * 1. Redistributions of source code must retain the above copyright notice, this
19
- * list of conditions and the following disclaimer.
20
- * 2. Redistributions in binary form must reproduce the above copyright notice,
21
- * this list of conditions and the following disclaimer in the
22
- * documentation and/or other materials provided with the distribution.
23
- * 3. Neither the name of the copyright holder nor the names of its contributors
24
- * may be used to endorse or promote products derived from this software without
25
- * specific prior written permission.
26
- *
27
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
28
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
29
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
30
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
31
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
33
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
34
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
35
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
36
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37
- */
38
- var _hasDate, _hasTime, _offset;
39
- function getLineColFromPtr(string, ptr) {
40
- let lines = string.slice(0, ptr).split(/\r\n|\n|\r/g);
41
- return [lines.length, lines.pop().length + 1];
42
- }
43
- function makeCodeBlock(string, line, column) {
44
- let lines = string.split(/\r\n|\n|\r/g);
45
- let codeblock = "";
46
- let numberLen = (Math.log10(line + 1) | 0) + 1;
47
- for (let i = line - 1; i <= line + 1; i++) {
48
- let l = lines[i - 1];
49
- if (!l)
50
- continue;
51
- codeblock += i.toString().padEnd(numberLen, " ");
52
- codeblock += ": ";
53
- codeblock += l;
54
- codeblock += "\n";
55
- if (i === line) {
56
- codeblock += " ".repeat(numberLen + column + 2);
57
- codeblock += "^\n";
58
- }
59
- }
60
- return codeblock;
61
- }
62
- class TomlError extends Error {
63
- constructor(message, options) {
64
- const [line, column] = getLineColFromPtr(options.toml, options.ptr);
65
- const codeblock = makeCodeBlock(options.toml, line, column);
66
- super(`Invalid TOML document: ${message}
67
-
68
- ${codeblock}`, options);
69
- __publicField(this, "line");
70
- __publicField(this, "column");
71
- __publicField(this, "codeblock");
72
- this.line = line;
73
- this.column = column;
74
- this.codeblock = codeblock;
75
- }
76
- }
77
- /*!
78
- * Copyright (c) Squirrel Chat et al., All rights reserved.
79
- * SPDX-License-Identifier: BSD-3-Clause
80
- *
81
- * Redistribution and use in source and binary forms, with or without
82
- * modification, are permitted provided that the following conditions are met:
83
- *
84
- * 1. Redistributions of source code must retain the above copyright notice, this
85
- * list of conditions and the following disclaimer.
86
- * 2. Redistributions in binary form must reproduce the above copyright notice,
87
- * this list of conditions and the following disclaimer in the
88
- * documentation and/or other materials provided with the distribution.
89
- * 3. Neither the name of the copyright holder nor the names of its contributors
90
- * may be used to endorse or promote products derived from this software without
91
- * specific prior written permission.
92
- *
93
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
94
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
95
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
96
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
97
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
98
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
99
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
100
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
101
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
102
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
103
- */
104
- function isEscaped(str, ptr) {
105
- let i = 0;
106
- while (str[ptr - ++i] === "\\")
107
- ;
108
- return --i && i % 2;
109
- }
110
- function indexOfNewline(str, start = 0, end = str.length) {
111
- let idx = str.indexOf("\n", start);
112
- if (str[idx - 1] === "\r")
113
- idx--;
114
- return idx <= end ? idx : -1;
115
- }
116
- function skipComment(str, ptr) {
117
- for (let i = ptr; i < str.length; i++) {
118
- let c = str[i];
119
- if (c === "\n")
120
- return i;
121
- if (c === "\r" && str[i + 1] === "\n")
122
- return i + 1;
123
- if (c < " " && c !== " " || c === "") {
124
- throw new TomlError("control characters are not allowed in comments", {
125
- toml: str,
126
- ptr
127
- });
128
- }
129
- }
130
- return str.length;
131
- }
132
- function skipVoid(str, ptr, banNewLines, banComments) {
133
- let c;
134
- while ((c = str[ptr]) === " " || c === " " || !banNewLines && (c === "\n" || c === "\r" && str[ptr + 1] === "\n"))
135
- ptr++;
136
- return banComments || c !== "#" ? ptr : skipVoid(str, skipComment(str, ptr), banNewLines);
137
- }
138
- function skipUntil(str, ptr, sep, end, banNewLines = false) {
139
- if (!end) {
140
- ptr = indexOfNewline(str, ptr);
141
- return ptr < 0 ? str.length : ptr;
142
- }
143
- for (let i = ptr; i < str.length; i++) {
144
- let c = str[i];
145
- if (c === "#") {
146
- i = indexOfNewline(str, i);
147
- } else if (c === sep) {
148
- return i + 1;
149
- } else if (c === end || banNewLines && (c === "\n" || c === "\r" && str[i + 1] === "\n")) {
150
- return i;
151
- }
152
- }
153
- throw new TomlError("cannot find end of structure", {
154
- toml: str,
155
- ptr
156
- });
157
- }
158
- function getStringEnd(str, seek) {
159
- let first = str[seek];
160
- let target = first === str[seek + 1] && str[seek + 1] === str[seek + 2] ? str.slice(seek, seek + 3) : first;
161
- seek += target.length - 1;
162
- do
163
- seek = str.indexOf(target, ++seek);
164
- while (seek > -1 && first !== "'" && isEscaped(str, seek));
165
- if (seek > -1) {
166
- seek += target.length;
167
- if (target.length > 1) {
168
- if (str[seek] === first)
169
- seek++;
170
- if (str[seek] === first)
171
- seek++;
172
- }
173
- }
174
- return seek;
175
- }
176
- /*!
177
- * Copyright (c) Squirrel Chat et al., All rights reserved.
178
- * SPDX-License-Identifier: BSD-3-Clause
179
- *
180
- * Redistribution and use in source and binary forms, with or without
181
- * modification, are permitted provided that the following conditions are met:
182
- *
183
- * 1. Redistributions of source code must retain the above copyright notice, this
184
- * list of conditions and the following disclaimer.
185
- * 2. Redistributions in binary form must reproduce the above copyright notice,
186
- * this list of conditions and the following disclaimer in the
187
- * documentation and/or other materials provided with the distribution.
188
- * 3. Neither the name of the copyright holder nor the names of its contributors
189
- * may be used to endorse or promote products derived from this software without
190
- * specific prior written permission.
191
- *
192
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
193
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
194
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
195
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
196
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
197
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
198
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
199
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
200
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
201
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
202
- */
203
- let DATE_TIME_RE = /^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i;
204
- const _TomlDate = class _TomlDate extends Date {
205
- constructor(date) {
206
- let hasDate = true;
207
- let hasTime = true;
208
- let offset = "Z";
209
- if (typeof date === "string") {
210
- let match = date.match(DATE_TIME_RE);
211
- if (match) {
212
- if (!match[1]) {
213
- hasDate = false;
214
- date = `0000-01-01T${date}`;
215
- }
216
- hasTime = !!match[2];
217
- hasTime && date[10] === " " && (date = date.replace(" ", "T"));
218
- if (match[2] && +match[2] > 23) {
219
- date = "";
220
- } else {
221
- offset = match[3] || null;
222
- date = date.toUpperCase();
223
- if (!offset && hasTime)
224
- date += "Z";
225
- }
226
- } else {
227
- date = "";
228
- }
229
- }
230
- super(date);
231
- __privateAdd(this, _hasDate, false);
232
- __privateAdd(this, _hasTime, false);
233
- __privateAdd(this, _offset, null);
234
- if (!isNaN(this.getTime())) {
235
- __privateSet(this, _hasDate, hasDate);
236
- __privateSet(this, _hasTime, hasTime);
237
- __privateSet(this, _offset, offset);
238
- }
239
- }
240
- isDateTime() {
241
- return __privateGet(this, _hasDate) && __privateGet(this, _hasTime);
242
- }
243
- isLocal() {
244
- return !__privateGet(this, _hasDate) || !__privateGet(this, _hasTime) || !__privateGet(this, _offset);
245
- }
246
- isDate() {
247
- return __privateGet(this, _hasDate) && !__privateGet(this, _hasTime);
248
- }
249
- isTime() {
250
- return __privateGet(this, _hasTime) && !__privateGet(this, _hasDate);
251
- }
252
- isValid() {
253
- return __privateGet(this, _hasDate) || __privateGet(this, _hasTime);
254
- }
255
- toISOString() {
256
- let iso = super.toISOString();
257
- if (this.isDate())
258
- return iso.slice(0, 10);
259
- if (this.isTime())
260
- return iso.slice(11, 23);
261
- if (__privateGet(this, _offset) === null)
262
- return iso.slice(0, -1);
263
- if (__privateGet(this, _offset) === "Z")
264
- return iso;
265
- let offset = +__privateGet(this, _offset).slice(1, 3) * 60 + +__privateGet(this, _offset).slice(4, 6);
266
- offset = __privateGet(this, _offset)[0] === "-" ? offset : -offset;
267
- let offsetDate = new Date(this.getTime() - offset * 6e4);
268
- return offsetDate.toISOString().slice(0, -1) + __privateGet(this, _offset);
269
- }
270
- static wrapAsOffsetDateTime(jsDate, offset = "Z") {
271
- let date = new _TomlDate(jsDate);
272
- __privateSet(date, _offset, offset);
273
- return date;
274
- }
275
- static wrapAsLocalDateTime(jsDate) {
276
- let date = new _TomlDate(jsDate);
277
- __privateSet(date, _offset, null);
278
- return date;
279
- }
280
- static wrapAsLocalDate(jsDate) {
281
- let date = new _TomlDate(jsDate);
282
- __privateSet(date, _hasTime, false);
283
- __privateSet(date, _offset, null);
284
- return date;
285
- }
286
- static wrapAsLocalTime(jsDate) {
287
- let date = new _TomlDate(jsDate);
288
- __privateSet(date, _hasDate, false);
289
- __privateSet(date, _offset, null);
290
- return date;
291
- }
292
- };
293
- _hasDate = new WeakMap();
294
- _hasTime = new WeakMap();
295
- _offset = new WeakMap();
296
- let TomlDate = _TomlDate;
297
- /*!
298
- * Copyright (c) Squirrel Chat et al., All rights reserved.
299
- * SPDX-License-Identifier: BSD-3-Clause
300
- *
301
- * Redistribution and use in source and binary forms, with or without
302
- * modification, are permitted provided that the following conditions are met:
303
- *
304
- * 1. Redistributions of source code must retain the above copyright notice, this
305
- * list of conditions and the following disclaimer.
306
- * 2. Redistributions in binary form must reproduce the above copyright notice,
307
- * this list of conditions and the following disclaimer in the
308
- * documentation and/or other materials provided with the distribution.
309
- * 3. Neither the name of the copyright holder nor the names of its contributors
310
- * may be used to endorse or promote products derived from this software without
311
- * specific prior written permission.
312
- *
313
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
314
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
315
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
316
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
317
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
318
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
319
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
320
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
321
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
322
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
323
- */
324
- let INT_REGEX = /^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/;
325
- let FLOAT_REGEX = /^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/;
326
- let LEADING_ZERO = /^[+-]?0[0-9_]/;
327
- let ESCAPE_REGEX = /^[0-9a-f]{2,8}$/i;
328
- let ESC_MAP = {
329
- b: "\b",
330
- t: " ",
331
- n: "\n",
332
- f: "\f",
333
- r: "\r",
334
- e: "\x1B",
335
- '"': '"',
336
- "\\": "\\"
337
- };
338
- function parseString(str, ptr = 0, endPtr = str.length) {
339
- let isLiteral = str[ptr] === "'";
340
- let isMultiline = str[ptr++] === str[ptr] && str[ptr] === str[ptr + 1];
341
- if (isMultiline) {
342
- endPtr -= 2;
343
- if (str[ptr += 2] === "\r")
344
- ptr++;
345
- if (str[ptr] === "\n")
346
- ptr++;
347
- }
348
- let tmp = 0;
349
- let isEscape;
350
- let parsed = "";
351
- let sliceStart = ptr;
352
- while (ptr < endPtr - 1) {
353
- let c = str[ptr++];
354
- if (c === "\n" || c === "\r" && str[ptr] === "\n") {
355
- if (!isMultiline) {
356
- throw new TomlError("newlines are not allowed in strings", {
357
- toml: str,
358
- ptr: ptr - 1
359
- });
360
- }
361
- } else if (c < " " && c !== " " || c === "") {
362
- throw new TomlError("control characters are not allowed in strings", {
363
- toml: str,
364
- ptr: ptr - 1
365
- });
366
- }
367
- if (isEscape) {
368
- isEscape = false;
369
- if (c === "x" || c === "u" || c === "U") {
370
- let code = str.slice(ptr, ptr += c === "x" ? 2 : c === "u" ? 4 : 8);
371
- if (!ESCAPE_REGEX.test(code)) {
372
- throw new TomlError("invalid unicode escape", {
373
- toml: str,
374
- ptr: tmp
375
- });
376
- }
377
- try {
378
- parsed += String.fromCodePoint(parseInt(code, 16));
379
- } catch {
380
- throw new TomlError("invalid unicode escape", {
381
- toml: str,
382
- ptr: tmp
383
- });
384
- }
385
- } else if (isMultiline && (c === "\n" || c === " " || c === " " || c === "\r")) {
386
- ptr = skipVoid(str, ptr - 1, true);
387
- if (str[ptr] !== "\n" && str[ptr] !== "\r") {
388
- throw new TomlError("invalid escape: only line-ending whitespace may be escaped", {
389
- toml: str,
390
- ptr: tmp
391
- });
392
- }
393
- ptr = skipVoid(str, ptr);
394
- } else if (c in ESC_MAP) {
395
- parsed += ESC_MAP[c];
396
- } else {
397
- throw new TomlError("unrecognized escape sequence", {
398
- toml: str,
399
- ptr: tmp
400
- });
401
- }
402
- sliceStart = ptr;
403
- } else if (!isLiteral && c === "\\") {
404
- tmp = ptr - 1;
405
- isEscape = true;
406
- parsed += str.slice(sliceStart, tmp);
407
- }
408
- }
409
- return parsed + str.slice(sliceStart, endPtr - 1);
410
- }
411
- function parseValue(value, toml, ptr, integersAsBigInt) {
412
- if (value === "true")
413
- return true;
414
- if (value === "false")
415
- return false;
416
- if (value === "-inf")
417
- return -Infinity;
418
- if (value === "inf" || value === "+inf")
419
- return Infinity;
420
- if (value === "nan" || value === "+nan" || value === "-nan")
421
- return NaN;
422
- if (value === "-0")
423
- return integersAsBigInt ? 0n : 0;
424
- let isInt = INT_REGEX.test(value);
425
- if (isInt || FLOAT_REGEX.test(value)) {
426
- if (LEADING_ZERO.test(value)) {
427
- throw new TomlError("leading zeroes are not allowed", {
428
- toml,
429
- ptr
430
- });
431
- }
432
- value = value.replace(/_/g, "");
433
- let numeric = +value;
434
- if (isNaN(numeric)) {
435
- throw new TomlError("invalid number", {
436
- toml,
437
- ptr
438
- });
439
- }
440
- if (isInt) {
441
- if ((isInt = !Number.isSafeInteger(numeric)) && !integersAsBigInt) {
442
- throw new TomlError("integer value cannot be represented losslessly", {
443
- toml,
444
- ptr
445
- });
446
- }
447
- if (isInt || integersAsBigInt === true)
448
- numeric = BigInt(value);
449
- }
450
- return numeric;
451
- }
452
- const date = new TomlDate(value);
453
- if (!date.isValid()) {
454
- throw new TomlError("invalid value", {
455
- toml,
456
- ptr
457
- });
458
- }
459
- return date;
460
- }
461
- /*!
462
- * Copyright (c) Squirrel Chat et al., All rights reserved.
463
- * SPDX-License-Identifier: BSD-3-Clause
464
- *
465
- * Redistribution and use in source and binary forms, with or without
466
- * modification, are permitted provided that the following conditions are met:
467
- *
468
- * 1. Redistributions of source code must retain the above copyright notice, this
469
- * list of conditions and the following disclaimer.
470
- * 2. Redistributions in binary form must reproduce the above copyright notice,
471
- * this list of conditions and the following disclaimer in the
472
- * documentation and/or other materials provided with the distribution.
473
- * 3. Neither the name of the copyright holder nor the names of its contributors
474
- * may be used to endorse or promote products derived from this software without
475
- * specific prior written permission.
476
- *
477
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
478
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
479
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
480
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
481
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
482
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
483
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
484
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
485
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
486
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
487
- */
488
- function sliceAndTrimEndOf(str, startPtr, endPtr) {
489
- let value = str.slice(startPtr, endPtr);
490
- let commentIdx = value.indexOf("#");
491
- if (commentIdx > -1) {
492
- skipComment(str, commentIdx);
493
- value = value.slice(0, commentIdx);
494
- }
495
- return [value.trimEnd(), commentIdx];
496
- }
497
- function extractValue(str, ptr, end, depth, integersAsBigInt) {
498
- if (depth === 0) {
499
- throw new TomlError("document contains excessively nested structures. aborting.", {
500
- toml: str,
501
- ptr
502
- });
503
- }
504
- let c = str[ptr];
505
- if (c === "[" || c === "{") {
506
- let [value, endPtr2] = c === "[" ? parseArray(str, ptr, depth, integersAsBigInt) : parseInlineTable(str, ptr, depth, integersAsBigInt);
507
- if (end) {
508
- endPtr2 = skipVoid(str, endPtr2);
509
- if (str[endPtr2] === ",")
510
- endPtr2++;
511
- else if (str[endPtr2] !== end) {
512
- throw new TomlError("expected comma or end of structure", {
513
- toml: str,
514
- ptr: endPtr2
515
- });
516
- }
517
- }
518
- return [value, endPtr2];
519
- }
520
- let endPtr;
521
- if (c === '"' || c === "'") {
522
- endPtr = getStringEnd(str, ptr);
523
- let parsed = parseString(str, ptr, endPtr);
524
- if (end) {
525
- endPtr = skipVoid(str, endPtr);
526
- if (str[endPtr] && str[endPtr] !== "," && str[endPtr] !== end && str[endPtr] !== "\n" && str[endPtr] !== "\r") {
527
- throw new TomlError("unexpected character encountered", {
528
- toml: str,
529
- ptr: endPtr
530
- });
531
- }
532
- endPtr += +(str[endPtr] === ",");
533
- }
534
- return [parsed, endPtr];
535
- }
536
- endPtr = skipUntil(str, ptr, ",", end);
537
- let slice = sliceAndTrimEndOf(str, ptr, endPtr - +(str[endPtr - 1] === ","));
538
- if (!slice[0]) {
539
- throw new TomlError("incomplete key-value declaration: no value specified", {
540
- toml: str,
541
- ptr
542
- });
543
- }
544
- if (end && slice[1] > -1) {
545
- endPtr = skipVoid(str, ptr + slice[1]);
546
- endPtr += +(str[endPtr] === ",");
547
- }
548
- return [
549
- parseValue(slice[0], str, ptr, integersAsBigInt),
550
- endPtr
551
- ];
552
- }
553
- /*!
554
- * Copyright (c) Squirrel Chat et al., All rights reserved.
555
- * SPDX-License-Identifier: BSD-3-Clause
556
- *
557
- * Redistribution and use in source and binary forms, with or without
558
- * modification, are permitted provided that the following conditions are met:
559
- *
560
- * 1. Redistributions of source code must retain the above copyright notice, this
561
- * list of conditions and the following disclaimer.
562
- * 2. Redistributions in binary form must reproduce the above copyright notice,
563
- * this list of conditions and the following disclaimer in the
564
- * documentation and/or other materials provided with the distribution.
565
- * 3. Neither the name of the copyright holder nor the names of its contributors
566
- * may be used to endorse or promote products derived from this software without
567
- * specific prior written permission.
568
- *
569
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
570
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
571
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
572
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
573
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
574
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
575
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
576
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
577
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
578
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
579
- */
580
- let KEY_PART_RE = /^[a-zA-Z0-9-_]+[ \t]*$/;
581
- function parseKey(str, ptr, end = "=") {
582
- let dot = ptr - 1;
583
- let parsed = [];
584
- let endPtr = str.indexOf(end, ptr);
585
- if (endPtr < 0) {
586
- throw new TomlError("incomplete key-value: cannot find end of key", {
587
- toml: str,
588
- ptr
589
- });
590
- }
591
- do {
592
- let c = str[ptr = ++dot];
593
- if (c !== " " && c !== " ") {
594
- if (c === '"' || c === "'") {
595
- if (c === str[ptr + 1] && c === str[ptr + 2]) {
596
- throw new TomlError("multiline strings are not allowed in keys", {
597
- toml: str,
598
- ptr
599
- });
600
- }
601
- let eos = getStringEnd(str, ptr);
602
- if (eos < 0) {
603
- throw new TomlError("unfinished string encountered", {
604
- toml: str,
605
- ptr
606
- });
607
- }
608
- dot = str.indexOf(".", eos);
609
- let strEnd = str.slice(eos, dot < 0 || dot > endPtr ? endPtr : dot);
610
- let newLine = indexOfNewline(strEnd);
611
- if (newLine > -1) {
612
- throw new TomlError("newlines are not allowed in keys", {
613
- toml: str,
614
- ptr: ptr + dot + newLine
615
- });
616
- }
617
- if (strEnd.trimStart()) {
618
- throw new TomlError("found extra tokens after the string part", {
619
- toml: str,
620
- ptr: eos
621
- });
622
- }
623
- if (endPtr < eos) {
624
- endPtr = str.indexOf(end, eos);
625
- if (endPtr < 0) {
626
- throw new TomlError("incomplete key-value: cannot find end of key", {
627
- toml: str,
628
- ptr
629
- });
630
- }
631
- }
632
- parsed.push(parseString(str, ptr, eos));
633
- } else {
634
- dot = str.indexOf(".", ptr);
635
- let part = str.slice(ptr, dot < 0 || dot > endPtr ? endPtr : dot);
636
- if (!KEY_PART_RE.test(part)) {
637
- throw new TomlError("only letter, numbers, dashes and underscores are allowed in keys", {
638
- toml: str,
639
- ptr
640
- });
641
- }
642
- parsed.push(part.trimEnd());
643
- }
644
- }
645
- } while (dot + 1 && dot < endPtr);
646
- return [parsed, skipVoid(str, endPtr + 1, true, true)];
647
- }
648
- function parseInlineTable(str, ptr, depth, integersAsBigInt) {
649
- let res = {};
650
- let seen = /* @__PURE__ */ new Set();
651
- let c;
652
- ptr++;
653
- while ((c = str[ptr++]) !== "}" && c) {
654
- if (c === ",") {
655
- throw new TomlError("expected value, found comma", {
656
- toml: str,
657
- ptr: ptr - 1
658
- });
659
- } else if (c === "#")
660
- ptr = skipComment(str, ptr);
661
- else if (c !== " " && c !== " " && c !== "\n" && c !== "\r") {
662
- let k;
663
- let t = res;
664
- let hasOwn = false;
665
- let [key, keyEndPtr] = parseKey(str, ptr - 1);
666
- for (let i = 0; i < key.length; i++) {
667
- if (i)
668
- t = hasOwn ? t[k] : t[k] = {};
669
- k = key[i];
670
- if ((hasOwn = Object.hasOwn(t, k)) && (typeof t[k] !== "object" || seen.has(t[k]))) {
671
- throw new TomlError("trying to redefine an already defined value", {
672
- toml: str,
673
- ptr
674
- });
675
- }
676
- if (!hasOwn && k === "__proto__") {
677
- Object.defineProperty(t, k, { enumerable: true, configurable: true, writable: true });
678
- }
679
- }
680
- if (hasOwn) {
681
- throw new TomlError("trying to redefine an already defined value", {
682
- toml: str,
683
- ptr
684
- });
685
- }
686
- let [value, valueEndPtr] = extractValue(str, keyEndPtr, "}", depth - 1, integersAsBigInt);
687
- seen.add(value);
688
- t[k] = value;
689
- ptr = valueEndPtr;
690
- }
691
- }
692
- if (!c) {
693
- throw new TomlError("unfinished table encountered", {
694
- toml: str,
695
- ptr
696
- });
697
- }
698
- return [res, ptr];
699
- }
700
- function parseArray(str, ptr, depth, integersAsBigInt) {
701
- let res = [];
702
- let c;
703
- ptr++;
704
- while ((c = str[ptr++]) !== "]" && c) {
705
- if (c === ",") {
706
- throw new TomlError("expected value, found comma", {
707
- toml: str,
708
- ptr: ptr - 1
709
- });
710
- } else if (c === "#")
711
- ptr = skipComment(str, ptr);
712
- else if (c !== " " && c !== " " && c !== "\n" && c !== "\r") {
713
- let e = extractValue(str, ptr - 1, "]", depth - 1, integersAsBigInt);
714
- res.push(e[0]);
715
- ptr = e[1];
716
- }
717
- }
718
- if (!c) {
719
- throw new TomlError("unfinished array encountered", {
720
- toml: str,
721
- ptr
722
- });
723
- }
724
- return [res, ptr];
725
- }
726
- /*!
727
- * Copyright (c) Squirrel Chat et al., All rights reserved.
728
- * SPDX-License-Identifier: BSD-3-Clause
729
- *
730
- * Redistribution and use in source and binary forms, with or without
731
- * modification, are permitted provided that the following conditions are met:
732
- *
733
- * 1. Redistributions of source code must retain the above copyright notice, this
734
- * list of conditions and the following disclaimer.
735
- * 2. Redistributions in binary form must reproduce the above copyright notice,
736
- * this list of conditions and the following disclaimer in the
737
- * documentation and/or other materials provided with the distribution.
738
- * 3. Neither the name of the copyright holder nor the names of its contributors
739
- * may be used to endorse or promote products derived from this software without
740
- * specific prior written permission.
741
- *
742
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
743
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
744
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
745
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
746
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
747
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
748
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
749
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
750
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
751
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
752
- */
753
- function peekTable(key, table, meta, type) {
754
- var _a, _b;
755
- let t = table;
756
- let m = meta;
757
- let k;
758
- let hasOwn = false;
759
- let state;
760
- for (let i = 0; i < key.length; i++) {
761
- if (i) {
762
- t = hasOwn ? t[k] : t[k] = {};
763
- m = (state = m[k]).c;
764
- if (type === 0 && (state.t === 1 || state.t === 2)) {
765
- return null;
766
- }
767
- if (state.t === 2) {
768
- let l = t.length - 1;
769
- t = t[l];
770
- m = m[l].c;
771
- }
772
- }
773
- k = key[i];
774
- if ((hasOwn = Object.hasOwn(t, k)) && ((_a = m[k]) == null ? void 0 : _a.t) === 0 && ((_b = m[k]) == null ? void 0 : _b.d)) {
775
- return null;
776
- }
777
- if (!hasOwn) {
778
- if (k === "__proto__") {
779
- Object.defineProperty(t, k, { enumerable: true, configurable: true, writable: true });
780
- Object.defineProperty(m, k, { enumerable: true, configurable: true, writable: true });
781
- }
782
- m[k] = {
783
- t: i < key.length - 1 && type === 2 ? 3 : type,
784
- d: false,
785
- i: 0,
786
- c: {}
787
- };
788
- }
789
- }
790
- state = m[k];
791
- if (state.t !== type && !(type === 1 && state.t === 3)) {
792
- return null;
793
- }
794
- if (type === 2) {
795
- if (!state.d) {
796
- state.d = true;
797
- t[k] = [];
798
- }
799
- t[k].push(t = {});
800
- state.c[state.i++] = state = { t: 1, d: false, i: 0, c: {} };
801
- }
802
- if (state.d) {
803
- return null;
804
- }
805
- state.d = true;
806
- if (type === 1) {
807
- t = hasOwn ? t[k] : t[k] = {};
808
- } else if (type === 0 && hasOwn) {
809
- return null;
810
- }
811
- return [k, t, state.c];
812
- }
813
- function parse(toml, { maxDepth = 1e3, integersAsBigInt } = {}) {
814
- let res = {};
815
- let meta = {};
816
- let tbl = res;
817
- let m = meta;
818
- for (let ptr = skipVoid(toml, 0); ptr < toml.length; ) {
819
- if (toml[ptr] === "[") {
820
- let isTableArray = toml[++ptr] === "[";
821
- let k = parseKey(toml, ptr += +isTableArray, "]");
822
- if (isTableArray) {
823
- if (toml[k[1] - 1] !== "]") {
824
- throw new TomlError("expected end of table declaration", {
825
- toml,
826
- ptr: k[1] - 1
827
- });
828
- }
829
- k[1]++;
830
- }
831
- let p = peekTable(
832
- k[0],
833
- res,
834
- meta,
835
- isTableArray ? 2 : 1
836
- /* Type.EXPLICIT */
837
- );
838
- if (!p) {
839
- throw new TomlError("trying to redefine an already defined table or value", {
840
- toml,
841
- ptr
842
- });
843
- }
844
- m = p[2];
845
- tbl = p[1];
846
- ptr = k[1];
847
- } else {
848
- let k = parseKey(toml, ptr);
849
- let p = peekTable(
850
- k[0],
851
- tbl,
852
- m,
853
- 0
854
- /* Type.DOTTED */
855
- );
856
- if (!p) {
857
- throw new TomlError("trying to redefine an already defined table or value", {
858
- toml,
859
- ptr
860
- });
861
- }
862
- let v = extractValue(toml, k[1], void 0, maxDepth, integersAsBigInt);
863
- p[1][p[0]] = v[0];
864
- ptr = v[1];
865
- }
866
- ptr = skipVoid(toml, ptr, true);
867
- if (toml[ptr] && toml[ptr] !== "\n" && toml[ptr] !== "\r") {
868
- throw new TomlError("each key-value declaration must be followed by an end-of-line", {
869
- toml,
870
- ptr
871
- });
872
- }
873
- ptr = skipVoid(toml, ptr);
874
- }
875
- return res;
876
- }
877
- /*!
878
- * Copyright (c) Squirrel Chat et al., All rights reserved.
879
- * SPDX-License-Identifier: BSD-3-Clause
880
- *
881
- * Redistribution and use in source and binary forms, with or without
882
- * modification, are permitted provided that the following conditions are met:
883
- *
884
- * 1. Redistributions of source code must retain the above copyright notice, this
885
- * list of conditions and the following disclaimer.
886
- * 2. Redistributions in binary form must reproduce the above copyright notice,
887
- * this list of conditions and the following disclaimer in the
888
- * documentation and/or other materials provided with the distribution.
889
- * 3. Neither the name of the copyright holder nor the names of its contributors
890
- * may be used to endorse or promote products derived from this software without
891
- * specific prior written permission.
892
- *
893
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
894
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
895
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
896
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
897
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
898
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
899
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
900
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
901
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
902
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
903
- */
904
- let BARE_KEY = /^[a-z0-9-_]+$/i;
905
- function extendedTypeOf(obj) {
906
- let type = typeof obj;
907
- if (type === "object") {
908
- if (Array.isArray(obj))
909
- return "array";
910
- if (obj instanceof Date)
911
- return "date";
912
- }
913
- return type;
914
- }
915
- function isArrayOfTables(obj) {
916
- for (let i = 0; i < obj.length; i++) {
917
- if (extendedTypeOf(obj[i]) !== "object")
918
- return false;
919
- }
920
- return obj.length != 0;
921
- }
922
- function formatString(s) {
923
- return JSON.stringify(s).replace(/\x7f/g, "\\u007f");
924
- }
925
- function stringifyValue(val, type, depth, numberAsFloat) {
926
- if (depth === 0) {
927
- throw new Error("Could not stringify the object: maximum object depth exceeded");
928
- }
929
- if (type === "number") {
930
- if (isNaN(val))
931
- return "nan";
932
- if (val === Infinity)
933
- return "inf";
934
- if (val === -Infinity)
935
- return "-inf";
936
- if (numberAsFloat && Number.isInteger(val))
937
- return val.toFixed(1);
938
- return val.toString();
939
- }
940
- if (type === "bigint" || type === "boolean") {
941
- return val.toString();
942
- }
943
- if (type === "string") {
944
- return formatString(val);
945
- }
946
- if (type === "date") {
947
- if (isNaN(val.getTime())) {
948
- throw new TypeError("cannot serialize invalid date");
949
- }
950
- return val.toISOString();
951
- }
952
- if (type === "object") {
953
- return stringifyInlineTable(val, depth, numberAsFloat);
954
- }
955
- if (type === "array") {
956
- return stringifyArray(val, depth, numberAsFloat);
957
- }
958
- }
959
- function stringifyInlineTable(obj, depth, numberAsFloat) {
960
- let keys = Object.keys(obj);
961
- if (keys.length === 0)
962
- return "{}";
963
- let res = "{ ";
964
- for (let i = 0; i < keys.length; i++) {
965
- let k = keys[i];
966
- if (i)
967
- res += ", ";
968
- res += BARE_KEY.test(k) ? k : formatString(k);
969
- res += " = ";
970
- res += stringifyValue(obj[k], extendedTypeOf(obj[k]), depth - 1, numberAsFloat);
971
- }
972
- return res + " }";
973
- }
974
- function stringifyArray(array, depth, numberAsFloat) {
975
- if (array.length === 0)
976
- return "[]";
977
- let res = "[ ";
978
- for (let i = 0; i < array.length; i++) {
979
- if (i)
980
- res += ", ";
981
- if (array[i] === null || array[i] === void 0) {
982
- throw new TypeError("arrays cannot contain null or undefined values");
983
- }
984
- res += stringifyValue(array[i], extendedTypeOf(array[i]), depth - 1, numberAsFloat);
985
- }
986
- return res + " ]";
987
- }
988
- function stringifyArrayTable(array, key, depth, numberAsFloat) {
989
- if (depth === 0) {
990
- throw new Error("Could not stringify the object: maximum object depth exceeded");
991
- }
992
- let res = "";
993
- for (let i = 0; i < array.length; i++) {
994
- res += `${res && "\n"}[[${key}]]
995
- `;
996
- res += stringifyTable(0, array[i], key, depth, numberAsFloat);
997
- }
998
- return res;
999
- }
1000
- function stringifyTable(tableKey, obj, prefix, depth, numberAsFloat) {
1001
- if (depth === 0) {
1002
- throw new Error("Could not stringify the object: maximum object depth exceeded");
1003
- }
1004
- let preamble = "";
1005
- let tables = "";
1006
- let keys = Object.keys(obj);
1007
- for (let i = 0; i < keys.length; i++) {
1008
- let k = keys[i];
1009
- if (obj[k] !== null && obj[k] !== void 0) {
1010
- let type = extendedTypeOf(obj[k]);
1011
- if (type === "symbol" || type === "function") {
1012
- throw new TypeError(`cannot serialize values of type '${type}'`);
1013
- }
1014
- let key = BARE_KEY.test(k) ? k : formatString(k);
1015
- if (type === "array" && isArrayOfTables(obj[k])) {
1016
- tables += (tables && "\n") + stringifyArrayTable(obj[k], prefix ? `${prefix}.${key}` : key, depth - 1, numberAsFloat);
1017
- } else if (type === "object") {
1018
- let tblKey = prefix ? `${prefix}.${key}` : key;
1019
- tables += (tables && "\n") + stringifyTable(tblKey, obj[k], tblKey, depth - 1, numberAsFloat);
1020
- } else {
1021
- preamble += key;
1022
- preamble += " = ";
1023
- preamble += stringifyValue(obj[k], type, depth, numberAsFloat);
1024
- preamble += "\n";
1025
- }
1026
- }
1027
- }
1028
- if (tableKey && (preamble || !tables))
1029
- preamble = preamble ? `[${tableKey}]
1030
- ${preamble}` : `[${tableKey}]`;
1031
- return preamble && tables ? `${preamble}
1032
- ${tables}` : preamble || tables;
1033
- }
1034
- function stringify(obj, { maxDepth = 1e3, numbersAsFloat = false } = {}) {
1035
- if (extendedTypeOf(obj) !== "object") {
1036
- throw new TypeError("stringify can only be called with an object");
1037
- }
1038
- let str = stringifyTable(0, obj, "", maxDepth, numbersAsFloat);
1039
- if (str[str.length - 1] !== "\n")
1040
- return str + "\n";
1041
- return str;
1042
- }
1043
- /*!
1044
- * Copyright (c) Squirrel Chat et al., All rights reserved.
1045
- * SPDX-License-Identifier: BSD-3-Clause
1046
- *
1047
- * Redistribution and use in source and binary forms, with or without
1048
- * modification, are permitted provided that the following conditions are met:
1049
- *
1050
- * 1. Redistributions of source code must retain the above copyright notice, this
1051
- * list of conditions and the following disclaimer.
1052
- * 2. Redistributions in binary form must reproduce the above copyright notice,
1053
- * this list of conditions and the following disclaimer in the
1054
- * documentation and/or other materials provided with the distribution.
1055
- * 3. Neither the name of the copyright holder nor the names of its contributors
1056
- * may be used to endorse or promote products derived from this software without
1057
- * specific prior written permission.
1058
- *
1059
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
1060
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1061
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1062
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
1063
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1064
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
1065
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
1066
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
1067
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1068
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1069
- */
1070
- const index = { parse, stringify, TomlDate, TomlError };
1071
- export {
1072
- TomlDate,
1073
- TomlError,
1074
- index as default,
1075
- parse,
1076
- stringify
1077
- };
1078
- //# sourceMappingURL=index-DYqj9jLR.js.map