@legendapp/state 0.18.0 → 0.18.2
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/babel.js +283 -275
- package/babel.js.map +1 -1
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/index.mjs +1 -1
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/react.js +14 -1
- package/react.js.map +1 -1
- package/react.mjs +14 -1
- package/react.mjs.map +1 -1
- package/src/observable.d.ts +2 -6
- package/src/observableInterfaces.d.ts +1 -1
- package/src/react/useObservable.d.ts +2 -5
- package/trace.js +1 -1
- package/trace.js.map +1 -1
- package/trace.mjs +1 -1
- package/trace.mjs.map +1 -1
package/babel.js
CHANGED
|
@@ -5283,331 +5283,339 @@ function isValidIdentifier(name, reserved = true) {
|
|
|
5283
5283
|
|
|
5284
5284
|
var lib = {};
|
|
5285
5285
|
|
|
5286
|
-
|
|
5287
|
-
value: true
|
|
5288
|
-
});
|
|
5289
|
-
lib.readCodePoint = readCodePoint;
|
|
5290
|
-
lib.readInt = readInt;
|
|
5291
|
-
lib.readStringContents = readStringContents;
|
|
5286
|
+
var hasRequiredLib$1;
|
|
5292
5287
|
|
|
5293
|
-
|
|
5294
|
-
|
|
5295
|
-
|
|
5288
|
+
function requireLib$1 () {
|
|
5289
|
+
if (hasRequiredLib$1) return lib;
|
|
5290
|
+
hasRequiredLib$1 = 1;
|
|
5296
5291
|
|
|
5297
|
-
|
|
5298
|
-
|
|
5299
|
-
|
|
5300
|
-
|
|
5301
|
-
|
|
5302
|
-
|
|
5303
|
-
oct: ch => ch >= 48 && ch <= 55,
|
|
5304
|
-
dec: ch => ch >= 48 && ch <= 57,
|
|
5305
|
-
hex: ch => ch >= 48 && ch <= 57 || ch >= 65 && ch <= 70 || ch >= 97 && ch <= 102
|
|
5306
|
-
};
|
|
5292
|
+
Object.defineProperty(lib, "__esModule", {
|
|
5293
|
+
value: true
|
|
5294
|
+
});
|
|
5295
|
+
lib.readCodePoint = readCodePoint;
|
|
5296
|
+
lib.readInt = readInt;
|
|
5297
|
+
lib.readStringContents = readStringContents;
|
|
5307
5298
|
|
|
5308
|
-
|
|
5309
|
-
|
|
5310
|
-
|
|
5311
|
-
const initialCurLine = curLine;
|
|
5312
|
-
let out = "";
|
|
5313
|
-
let containsInvalid = false;
|
|
5314
|
-
let chunkStart = pos;
|
|
5315
|
-
const {
|
|
5316
|
-
length
|
|
5317
|
-
} = input;
|
|
5299
|
+
var _isDigit = function isDigit(code) {
|
|
5300
|
+
return code >= 48 && code <= 57;
|
|
5301
|
+
};
|
|
5318
5302
|
|
|
5319
|
-
|
|
5320
|
-
|
|
5321
|
-
|
|
5322
|
-
|
|
5323
|
-
|
|
5324
|
-
|
|
5303
|
+
const forbiddenNumericSeparatorSiblings = {
|
|
5304
|
+
decBinOct: new Set([46, 66, 69, 79, 95, 98, 101, 111]),
|
|
5305
|
+
hex: new Set([46, 88, 95, 120])
|
|
5306
|
+
};
|
|
5307
|
+
const isAllowedNumericSeparatorSibling = {
|
|
5308
|
+
bin: ch => ch === 48 || ch === 49,
|
|
5309
|
+
oct: ch => ch >= 48 && ch <= 55,
|
|
5310
|
+
dec: ch => ch >= 48 && ch <= 57,
|
|
5311
|
+
hex: ch => ch >= 48 && ch <= 57 || ch >= 65 && ch <= 70 || ch >= 97 && ch <= 102
|
|
5312
|
+
};
|
|
5325
5313
|
|
|
5326
|
-
|
|
5314
|
+
function readStringContents(type, input, pos, lineStart, curLine, errors) {
|
|
5315
|
+
const initialPos = pos;
|
|
5316
|
+
const initialLineStart = lineStart;
|
|
5317
|
+
const initialCurLine = curLine;
|
|
5318
|
+
let out = "";
|
|
5319
|
+
let containsInvalid = false;
|
|
5320
|
+
let chunkStart = pos;
|
|
5321
|
+
const {
|
|
5322
|
+
length
|
|
5323
|
+
} = input;
|
|
5324
|
+
|
|
5325
|
+
for (;;) {
|
|
5326
|
+
if (pos >= length) {
|
|
5327
|
+
errors.unterminated(initialPos, initialLineStart, initialCurLine);
|
|
5328
|
+
out += input.slice(chunkStart, pos);
|
|
5329
|
+
break;
|
|
5330
|
+
}
|
|
5327
5331
|
|
|
5328
|
-
|
|
5329
|
-
out += input.slice(chunkStart, pos);
|
|
5330
|
-
break;
|
|
5331
|
-
}
|
|
5332
|
+
const ch = input.charCodeAt(pos);
|
|
5332
5333
|
|
|
5333
|
-
|
|
5334
|
-
|
|
5335
|
-
|
|
5336
|
-
|
|
5337
|
-
ch: escaped,
|
|
5338
|
-
pos,
|
|
5339
|
-
lineStart,
|
|
5340
|
-
curLine
|
|
5341
|
-
} = readEscapedChar(input, pos, lineStart, curLine, type === "template", errors));
|
|
5334
|
+
if (isStringEnd(type, ch, input, pos)) {
|
|
5335
|
+
out += input.slice(chunkStart, pos);
|
|
5336
|
+
break;
|
|
5337
|
+
}
|
|
5342
5338
|
|
|
5343
|
-
|
|
5344
|
-
|
|
5345
|
-
|
|
5346
|
-
|
|
5347
|
-
|
|
5339
|
+
if (ch === 92) {
|
|
5340
|
+
out += input.slice(chunkStart, pos);
|
|
5341
|
+
let escaped;
|
|
5342
|
+
({
|
|
5343
|
+
ch: escaped,
|
|
5344
|
+
pos,
|
|
5345
|
+
lineStart,
|
|
5346
|
+
curLine
|
|
5347
|
+
} = readEscapedChar(input, pos, lineStart, curLine, type === "template", errors));
|
|
5348
|
+
|
|
5349
|
+
if (escaped === null) {
|
|
5350
|
+
containsInvalid = true;
|
|
5351
|
+
} else {
|
|
5352
|
+
out += escaped;
|
|
5353
|
+
}
|
|
5348
5354
|
|
|
5349
|
-
|
|
5350
|
-
|
|
5351
|
-
|
|
5352
|
-
|
|
5353
|
-
|
|
5354
|
-
|
|
5355
|
-
|
|
5356
|
-
|
|
5357
|
-
|
|
5358
|
-
|
|
5359
|
-
|
|
5360
|
-
|
|
5361
|
-
|
|
5355
|
+
chunkStart = pos;
|
|
5356
|
+
} else if (ch === 8232 || ch === 8233) {
|
|
5357
|
+
++pos;
|
|
5358
|
+
++curLine;
|
|
5359
|
+
lineStart = pos;
|
|
5360
|
+
} else if (ch === 10 || ch === 13) {
|
|
5361
|
+
if (type === "template") {
|
|
5362
|
+
out += input.slice(chunkStart, pos) + "\n";
|
|
5363
|
+
++pos;
|
|
5364
|
+
|
|
5365
|
+
if (ch === 13 && input.charCodeAt(pos) === 10) {
|
|
5366
|
+
++pos;
|
|
5367
|
+
}
|
|
5362
5368
|
|
|
5363
|
-
|
|
5364
|
-
|
|
5365
|
-
|
|
5366
|
-
|
|
5367
|
-
|
|
5368
|
-
|
|
5369
|
-
|
|
5370
|
-
|
|
5371
|
-
|
|
5369
|
+
++curLine;
|
|
5370
|
+
chunkStart = lineStart = pos;
|
|
5371
|
+
} else {
|
|
5372
|
+
errors.unterminated(initialPos, initialLineStart, initialCurLine);
|
|
5373
|
+
}
|
|
5374
|
+
} else {
|
|
5375
|
+
++pos;
|
|
5376
|
+
}
|
|
5377
|
+
}
|
|
5372
5378
|
|
|
5373
|
-
|
|
5374
|
-
|
|
5375
|
-
|
|
5376
|
-
|
|
5377
|
-
|
|
5378
|
-
|
|
5379
|
-
|
|
5380
|
-
}
|
|
5379
|
+
return {
|
|
5380
|
+
pos,
|
|
5381
|
+
str: out,
|
|
5382
|
+
containsInvalid,
|
|
5383
|
+
lineStart,
|
|
5384
|
+
curLine
|
|
5385
|
+
};
|
|
5386
|
+
}
|
|
5381
5387
|
|
|
5382
|
-
function isStringEnd(type, ch, input, pos) {
|
|
5383
|
-
|
|
5384
|
-
|
|
5385
|
-
|
|
5388
|
+
function isStringEnd(type, ch, input, pos) {
|
|
5389
|
+
if (type === "template") {
|
|
5390
|
+
return ch === 96 || ch === 36 && input.charCodeAt(pos + 1) === 123;
|
|
5391
|
+
}
|
|
5386
5392
|
|
|
5387
|
-
|
|
5388
|
-
}
|
|
5393
|
+
return ch === (type === "double" ? 34 : 39);
|
|
5394
|
+
}
|
|
5389
5395
|
|
|
5390
|
-
function readEscapedChar(input, pos, lineStart, curLine, inTemplate, errors) {
|
|
5391
|
-
|
|
5392
|
-
|
|
5396
|
+
function readEscapedChar(input, pos, lineStart, curLine, inTemplate, errors) {
|
|
5397
|
+
const throwOnInvalid = !inTemplate;
|
|
5398
|
+
pos++;
|
|
5393
5399
|
|
|
5394
|
-
|
|
5395
|
-
|
|
5396
|
-
|
|
5397
|
-
|
|
5398
|
-
|
|
5399
|
-
|
|
5400
|
+
const res = ch => ({
|
|
5401
|
+
pos,
|
|
5402
|
+
ch,
|
|
5403
|
+
lineStart,
|
|
5404
|
+
curLine
|
|
5405
|
+
});
|
|
5400
5406
|
|
|
5401
|
-
|
|
5407
|
+
const ch = input.charCodeAt(pos++);
|
|
5402
5408
|
|
|
5403
|
-
|
|
5404
|
-
|
|
5405
|
-
|
|
5409
|
+
switch (ch) {
|
|
5410
|
+
case 110:
|
|
5411
|
+
return res("\n");
|
|
5406
5412
|
|
|
5407
|
-
|
|
5408
|
-
|
|
5413
|
+
case 114:
|
|
5414
|
+
return res("\r");
|
|
5409
5415
|
|
|
5410
|
-
|
|
5411
|
-
|
|
5412
|
-
|
|
5413
|
-
|
|
5414
|
-
|
|
5415
|
-
|
|
5416
|
-
|
|
5417
|
-
|
|
5418
|
-
|
|
5416
|
+
case 120:
|
|
5417
|
+
{
|
|
5418
|
+
let code;
|
|
5419
|
+
({
|
|
5420
|
+
code,
|
|
5421
|
+
pos
|
|
5422
|
+
} = readHexChar(input, pos, lineStart, curLine, 2, false, throwOnInvalid, errors));
|
|
5423
|
+
return res(code === null ? null : String.fromCharCode(code));
|
|
5424
|
+
}
|
|
5419
5425
|
|
|
5420
|
-
|
|
5421
|
-
|
|
5422
|
-
|
|
5423
|
-
|
|
5424
|
-
|
|
5425
|
-
|
|
5426
|
-
|
|
5427
|
-
|
|
5428
|
-
|
|
5426
|
+
case 117:
|
|
5427
|
+
{
|
|
5428
|
+
let code;
|
|
5429
|
+
({
|
|
5430
|
+
code,
|
|
5431
|
+
pos
|
|
5432
|
+
} = readCodePoint(input, pos, lineStart, curLine, throwOnInvalid, errors));
|
|
5433
|
+
return res(code === null ? null : String.fromCodePoint(code));
|
|
5434
|
+
}
|
|
5429
5435
|
|
|
5430
|
-
|
|
5431
|
-
|
|
5436
|
+
case 116:
|
|
5437
|
+
return res("\t");
|
|
5432
5438
|
|
|
5433
|
-
|
|
5434
|
-
|
|
5439
|
+
case 98:
|
|
5440
|
+
return res("\b");
|
|
5435
5441
|
|
|
5436
|
-
|
|
5437
|
-
|
|
5442
|
+
case 118:
|
|
5443
|
+
return res("\u000b");
|
|
5438
5444
|
|
|
5439
|
-
|
|
5440
|
-
|
|
5445
|
+
case 102:
|
|
5446
|
+
return res("\f");
|
|
5441
5447
|
|
|
5442
|
-
|
|
5443
|
-
|
|
5444
|
-
|
|
5445
|
-
|
|
5448
|
+
case 13:
|
|
5449
|
+
if (input.charCodeAt(pos) === 10) {
|
|
5450
|
+
++pos;
|
|
5451
|
+
}
|
|
5446
5452
|
|
|
5447
|
-
|
|
5448
|
-
|
|
5449
|
-
|
|
5453
|
+
case 10:
|
|
5454
|
+
lineStart = pos;
|
|
5455
|
+
++curLine;
|
|
5450
5456
|
|
|
5451
|
-
|
|
5452
|
-
|
|
5453
|
-
|
|
5457
|
+
case 8232:
|
|
5458
|
+
case 8233:
|
|
5459
|
+
return res("");
|
|
5454
5460
|
|
|
5455
|
-
|
|
5456
|
-
|
|
5457
|
-
|
|
5458
|
-
|
|
5459
|
-
|
|
5460
|
-
|
|
5461
|
-
|
|
5461
|
+
case 56:
|
|
5462
|
+
case 57:
|
|
5463
|
+
if (inTemplate) {
|
|
5464
|
+
return res(null);
|
|
5465
|
+
} else {
|
|
5466
|
+
errors.strictNumericEscape(pos - 1, lineStart, curLine);
|
|
5467
|
+
}
|
|
5462
5468
|
|
|
5463
|
-
|
|
5464
|
-
|
|
5465
|
-
|
|
5466
|
-
|
|
5467
|
-
|
|
5468
|
-
|
|
5469
|
+
default:
|
|
5470
|
+
if (ch >= 48 && ch <= 55) {
|
|
5471
|
+
const startPos = pos - 1;
|
|
5472
|
+
const match = input.slice(startPos, pos + 2).match(/^[0-7]+/);
|
|
5473
|
+
let octalStr = match[0];
|
|
5474
|
+
let octal = parseInt(octalStr, 8);
|
|
5469
5475
|
|
|
5470
|
-
|
|
5471
|
-
|
|
5472
|
-
|
|
5473
|
-
|
|
5476
|
+
if (octal > 255) {
|
|
5477
|
+
octalStr = octalStr.slice(0, -1);
|
|
5478
|
+
octal = parseInt(octalStr, 8);
|
|
5479
|
+
}
|
|
5474
5480
|
|
|
5475
|
-
|
|
5476
|
-
|
|
5481
|
+
pos += octalStr.length - 1;
|
|
5482
|
+
const next = input.charCodeAt(pos);
|
|
5477
5483
|
|
|
5478
|
-
|
|
5479
|
-
|
|
5480
|
-
|
|
5481
|
-
|
|
5482
|
-
|
|
5483
|
-
|
|
5484
|
-
|
|
5484
|
+
if (octalStr !== "0" || next === 56 || next === 57) {
|
|
5485
|
+
if (inTemplate) {
|
|
5486
|
+
return res(null);
|
|
5487
|
+
} else {
|
|
5488
|
+
errors.strictNumericEscape(startPos, lineStart, curLine);
|
|
5489
|
+
}
|
|
5490
|
+
}
|
|
5485
5491
|
|
|
5486
|
-
|
|
5487
|
-
|
|
5492
|
+
return res(String.fromCharCode(octal));
|
|
5493
|
+
}
|
|
5488
5494
|
|
|
5489
|
-
|
|
5490
|
-
|
|
5491
|
-
}
|
|
5495
|
+
return res(String.fromCharCode(ch));
|
|
5496
|
+
}
|
|
5497
|
+
}
|
|
5492
5498
|
|
|
5493
|
-
function readHexChar(input, pos, lineStart, curLine, len, forceLen, throwOnInvalid, errors) {
|
|
5494
|
-
|
|
5495
|
-
|
|
5496
|
-
|
|
5497
|
-
|
|
5498
|
-
|
|
5499
|
-
|
|
5499
|
+
function readHexChar(input, pos, lineStart, curLine, len, forceLen, throwOnInvalid, errors) {
|
|
5500
|
+
const initialPos = pos;
|
|
5501
|
+
let n;
|
|
5502
|
+
({
|
|
5503
|
+
n,
|
|
5504
|
+
pos
|
|
5505
|
+
} = readInt(input, pos, lineStart, curLine, 16, len, forceLen, false, errors));
|
|
5500
5506
|
|
|
5501
|
-
|
|
5502
|
-
|
|
5503
|
-
|
|
5504
|
-
|
|
5505
|
-
|
|
5506
|
-
|
|
5507
|
-
|
|
5507
|
+
if (n === null) {
|
|
5508
|
+
if (throwOnInvalid) {
|
|
5509
|
+
errors.invalidEscapeSequence(initialPos, lineStart, curLine);
|
|
5510
|
+
} else {
|
|
5511
|
+
pos = initialPos - 1;
|
|
5512
|
+
}
|
|
5513
|
+
}
|
|
5508
5514
|
|
|
5509
|
-
|
|
5510
|
-
|
|
5511
|
-
|
|
5512
|
-
|
|
5513
|
-
}
|
|
5515
|
+
return {
|
|
5516
|
+
code: n,
|
|
5517
|
+
pos
|
|
5518
|
+
};
|
|
5519
|
+
}
|
|
5514
5520
|
|
|
5515
|
-
function readInt(input, pos, lineStart, curLine, radix, len, forceLen, allowNumSeparator, errors) {
|
|
5516
|
-
|
|
5517
|
-
|
|
5518
|
-
|
|
5519
|
-
|
|
5520
|
-
|
|
5521
|
+
function readInt(input, pos, lineStart, curLine, radix, len, forceLen, allowNumSeparator, errors) {
|
|
5522
|
+
const start = pos;
|
|
5523
|
+
const forbiddenSiblings = radix === 16 ? forbiddenNumericSeparatorSiblings.hex : forbiddenNumericSeparatorSiblings.decBinOct;
|
|
5524
|
+
const isAllowedSibling = radix === 16 ? isAllowedNumericSeparatorSibling.hex : radix === 10 ? isAllowedNumericSeparatorSibling.dec : radix === 8 ? isAllowedNumericSeparatorSibling.oct : isAllowedNumericSeparatorSibling.bin;
|
|
5525
|
+
let invalid = false;
|
|
5526
|
+
let total = 0;
|
|
5521
5527
|
|
|
5522
|
-
|
|
5523
|
-
|
|
5524
|
-
|
|
5528
|
+
for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) {
|
|
5529
|
+
const code = input.charCodeAt(pos);
|
|
5530
|
+
let val;
|
|
5525
5531
|
|
|
5526
|
-
|
|
5527
|
-
|
|
5528
|
-
|
|
5532
|
+
if (code === 95 && allowNumSeparator !== "bail") {
|
|
5533
|
+
const prev = input.charCodeAt(pos - 1);
|
|
5534
|
+
const next = input.charCodeAt(pos + 1);
|
|
5529
5535
|
|
|
5530
|
-
|
|
5531
|
-
|
|
5532
|
-
|
|
5533
|
-
|
|
5534
|
-
|
|
5536
|
+
if (!allowNumSeparator) {
|
|
5537
|
+
errors.numericSeparatorInEscapeSequence(pos, lineStart, curLine);
|
|
5538
|
+
} else if (Number.isNaN(next) || !isAllowedSibling(next) || forbiddenSiblings.has(prev) || forbiddenSiblings.has(next)) {
|
|
5539
|
+
errors.unexpectedNumericSeparator(pos, lineStart, curLine);
|
|
5540
|
+
}
|
|
5535
5541
|
|
|
5536
|
-
|
|
5537
|
-
|
|
5538
|
-
|
|
5542
|
+
++pos;
|
|
5543
|
+
continue;
|
|
5544
|
+
}
|
|
5539
5545
|
|
|
5540
|
-
|
|
5541
|
-
|
|
5542
|
-
|
|
5543
|
-
|
|
5544
|
-
|
|
5545
|
-
|
|
5546
|
-
|
|
5547
|
-
|
|
5548
|
-
|
|
5546
|
+
if (code >= 97) {
|
|
5547
|
+
val = code - 97 + 10;
|
|
5548
|
+
} else if (code >= 65) {
|
|
5549
|
+
val = code - 65 + 10;
|
|
5550
|
+
} else if (_isDigit(code)) {
|
|
5551
|
+
val = code - 48;
|
|
5552
|
+
} else {
|
|
5553
|
+
val = Infinity;
|
|
5554
|
+
}
|
|
5549
5555
|
|
|
5550
|
-
|
|
5551
|
-
|
|
5552
|
-
|
|
5553
|
-
|
|
5554
|
-
|
|
5555
|
-
|
|
5556
|
-
|
|
5557
|
-
|
|
5558
|
-
|
|
5559
|
-
|
|
5556
|
+
if (val >= radix) {
|
|
5557
|
+
if (val <= 9 && errors.invalidDigit(pos, lineStart, curLine, radix)) {
|
|
5558
|
+
val = 0;
|
|
5559
|
+
} else if (forceLen) {
|
|
5560
|
+
val = 0;
|
|
5561
|
+
invalid = true;
|
|
5562
|
+
} else {
|
|
5563
|
+
break;
|
|
5564
|
+
}
|
|
5565
|
+
}
|
|
5560
5566
|
|
|
5561
|
-
|
|
5562
|
-
|
|
5563
|
-
|
|
5567
|
+
++pos;
|
|
5568
|
+
total = total * radix + val;
|
|
5569
|
+
}
|
|
5564
5570
|
|
|
5565
|
-
|
|
5566
|
-
|
|
5567
|
-
|
|
5568
|
-
|
|
5569
|
-
|
|
5570
|
-
|
|
5571
|
+
if (pos === start || len != null && pos - start !== len || invalid) {
|
|
5572
|
+
return {
|
|
5573
|
+
n: null,
|
|
5574
|
+
pos
|
|
5575
|
+
};
|
|
5576
|
+
}
|
|
5571
5577
|
|
|
5572
|
-
|
|
5573
|
-
|
|
5574
|
-
|
|
5575
|
-
|
|
5576
|
-
}
|
|
5578
|
+
return {
|
|
5579
|
+
n: total,
|
|
5580
|
+
pos
|
|
5581
|
+
};
|
|
5582
|
+
}
|
|
5577
5583
|
|
|
5578
|
-
function readCodePoint(input, pos, lineStart, curLine, throwOnInvalid, errors) {
|
|
5579
|
-
|
|
5580
|
-
|
|
5584
|
+
function readCodePoint(input, pos, lineStart, curLine, throwOnInvalid, errors) {
|
|
5585
|
+
const ch = input.charCodeAt(pos);
|
|
5586
|
+
let code;
|
|
5581
5587
|
|
|
5582
|
-
|
|
5583
|
-
|
|
5584
|
-
|
|
5585
|
-
|
|
5586
|
-
|
|
5587
|
-
|
|
5588
|
-
|
|
5588
|
+
if (ch === 123) {
|
|
5589
|
+
++pos;
|
|
5590
|
+
({
|
|
5591
|
+
code,
|
|
5592
|
+
pos
|
|
5593
|
+
} = readHexChar(input, pos, lineStart, curLine, input.indexOf("}", pos) - pos, true, throwOnInvalid, errors));
|
|
5594
|
+
++pos;
|
|
5589
5595
|
|
|
5590
|
-
|
|
5591
|
-
|
|
5592
|
-
|
|
5593
|
-
|
|
5594
|
-
|
|
5595
|
-
|
|
5596
|
-
|
|
5597
|
-
|
|
5598
|
-
|
|
5599
|
-
|
|
5600
|
-
|
|
5601
|
-
|
|
5602
|
-
|
|
5603
|
-
|
|
5604
|
-
|
|
5605
|
-
|
|
5596
|
+
if (code !== null && code > 0x10ffff) {
|
|
5597
|
+
if (throwOnInvalid) {
|
|
5598
|
+
errors.invalidCodePoint(pos, lineStart, curLine);
|
|
5599
|
+
} else {
|
|
5600
|
+
return {
|
|
5601
|
+
code: null,
|
|
5602
|
+
pos
|
|
5603
|
+
};
|
|
5604
|
+
}
|
|
5605
|
+
}
|
|
5606
|
+
} else {
|
|
5607
|
+
({
|
|
5608
|
+
code,
|
|
5609
|
+
pos
|
|
5610
|
+
} = readHexChar(input, pos, lineStart, curLine, 4, false, throwOnInvalid, errors));
|
|
5611
|
+
}
|
|
5606
5612
|
|
|
5607
|
-
|
|
5608
|
-
|
|
5609
|
-
|
|
5610
|
-
|
|
5613
|
+
return {
|
|
5614
|
+
code,
|
|
5615
|
+
pos
|
|
5616
|
+
};
|
|
5617
|
+
}
|
|
5618
|
+
return lib;
|
|
5611
5619
|
}
|
|
5612
5620
|
|
|
5613
5621
|
var constants = {};
|
|
@@ -6029,7 +6037,7 @@ function requireCore () {
|
|
|
6029
6037
|
|
|
6030
6038
|
var _helperValidatorIdentifier = lib$1;
|
|
6031
6039
|
|
|
6032
|
-
var _helperStringParser =
|
|
6040
|
+
var _helperStringParser = requireLib$1();
|
|
6033
6041
|
|
|
6034
6042
|
var _constants = constants;
|
|
6035
6043
|
|