cubing 0.49.0 → 0.49.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/dist/lib/cubing/{Alg.d-T-vs-GDG.d.ts → Alg.d-B5bAxd5U.d.ts} +1 -1
- package/dist/lib/cubing/{KPattern.d-eWxoJtl0.d.ts → KPattern.d-Iv89gNss.d.ts} +1 -1
- package/dist/lib/cubing/{TwizzleLink.d-S18moNia.d.ts → TwizzleLink.d-DAfRlszz.d.ts} +7 -7
- package/dist/lib/cubing/alg/index.d.ts +3 -3
- package/dist/lib/cubing/alg/index.js +1 -1
- package/dist/lib/cubing/bluetooth/index.d.ts +4 -5
- package/dist/lib/cubing/bluetooth/index.js +7 -6
- package/dist/lib/cubing/bluetooth/index.js.map +2 -2
- package/dist/lib/cubing/{bluetooth-puzzle.d-NEYj0B8F.d.ts → bluetooth-puzzle.d-BfcciXFF.d.ts} +2 -3
- package/dist/lib/cubing/chunks/{chunk-3W5GXH7H.js → chunk-4K67JPLC.js} +4 -4
- package/dist/lib/cubing/chunks/{chunk-YGLO3POD.js → chunk-5QBTMAXK.js} +3 -3
- package/dist/lib/cubing/chunks/{chunk-H5G52ETP.js → chunk-EF6G34T7.js} +139 -140
- package/dist/lib/cubing/chunks/{chunk-H5G52ETP.js.map → chunk-EF6G34T7.js.map} +1 -1
- package/dist/lib/cubing/chunks/{chunk-GEMIB7TF.js → chunk-H57WKFBE.js} +2 -2
- package/dist/lib/cubing/chunks/{chunk-HPIYOMRJ.js → chunk-JNIAXRNE.js} +2 -2
- package/dist/lib/cubing/chunks/{chunk-7WLUEIZX.js → chunk-OW4IHAI4.js} +3 -3
- package/dist/lib/cubing/chunks/{chunk-2ZDYUAXG.js → chunk-RAOTPMYY.js} +3 -3
- package/dist/lib/cubing/chunks/{chunk-Q222EQJR.js → chunk-VVXSTWUD.js} +17 -19
- package/dist/lib/cubing/chunks/{chunk-Q222EQJR.js.map → chunk-VVXSTWUD.js.map} +1 -1
- package/dist/lib/cubing/chunks/{chunk-QYBDWFY6.js → chunk-W2Z7MAP2.js} +5 -5
- package/dist/lib/cubing/chunks/{chunk-VQIVSUL2.js → chunk-Y3BVWVFU.js} +2 -2
- package/dist/lib/cubing/chunks/{inside-XY43FEWJ.js → inside-BKENXSSR.js} +14 -14
- package/dist/lib/cubing/chunks/{search-dynamic-sgs-side-events-2RPLAYOZ.js → search-dynamic-sgs-side-events-OOIOU5SK.js} +6 -6
- package/dist/lib/cubing/chunks/{search-dynamic-sgs-unofficial-SOS5BTCL.js → search-dynamic-sgs-unofficial-COV225SC.js} +6 -6
- package/dist/lib/cubing/chunks/{search-dynamic-solve-4x4x4-R4SVOZSB.js → search-dynamic-solve-4x4x4-EWVB2ON7.js} +57 -59
- package/dist/lib/cubing/chunks/{search-dynamic-solve-4x4x4-R4SVOZSB.js.map → search-dynamic-solve-4x4x4-EWVB2ON7.js.map} +1 -1
- package/dist/lib/cubing/chunks/{search-dynamic-solve-kilominx-BN4POKYF.js → search-dynamic-solve-kilominx-RAZM75GA.js} +2 -2
- package/dist/lib/cubing/chunks/{search-dynamic-solve-sq1-NGOQHFV4.js → search-dynamic-solve-sq1-YESVPPLF.js} +27 -28
- package/dist/lib/cubing/chunks/{search-dynamic-solve-sq1-NGOQHFV4.js.map → search-dynamic-solve-sq1-YESVPPLF.js.map} +1 -1
- package/dist/lib/cubing/chunks/search-worker-entry.js +1 -1
- package/dist/lib/cubing/chunks/{twisty-dynamic-3d-VWNC3JXN.js → twisty-dynamic-3d-TINH44QH.js} +6 -6
- package/dist/lib/cubing/chunks/{twsearch-6KUSKPX2.js → twsearch-XKCR3E3R.js} +2 -2
- package/dist/lib/cubing/{index-t97giMqB.d.ts → index-BhH6DKdK.d.ts} +2 -2
- package/dist/lib/cubing/kpuzzle/index.d.ts +2 -2
- package/dist/lib/cubing/kpuzzle/index.js +2 -2
- package/dist/lib/cubing/notation/index.d.ts +4 -4
- package/dist/lib/cubing/notation/index.js +4 -4
- package/dist/lib/cubing/{parseAlg.d-tIlAma60.d.ts → parseAlg.d-HDV9mtha.d.ts} +1 -1
- package/dist/lib/cubing/protocol/index.d.ts +2 -2
- package/dist/lib/cubing/protocol/index.js +4 -4
- package/dist/lib/cubing/puzzle-geometry/index.d.ts +3 -3
- package/dist/lib/cubing/puzzle-geometry/index.js +1 -1
- package/dist/lib/cubing/puzzles/index.d.ts +4 -875
- package/dist/lib/cubing/puzzles/index.js +4 -4
- package/dist/lib/cubing/scramble/index.d.ts +3 -3
- package/dist/lib/cubing/scramble/index.js +6 -6
- package/dist/lib/cubing/search/index.d.ts +3 -3
- package/dist/lib/cubing/search/index.js +6 -6
- package/dist/lib/cubing/stream/index.d.ts +3 -3
- package/dist/lib/cubing/stream/index.js +1 -1
- package/dist/lib/cubing/twisty/index.d.ts +5 -5
- package/dist/lib/cubing/twisty/index.js +6 -6
- package/package.json +16 -15
- /package/dist/lib/cubing/chunks/{chunk-3W5GXH7H.js.map → chunk-4K67JPLC.js.map} +0 -0
- /package/dist/lib/cubing/chunks/{chunk-YGLO3POD.js.map → chunk-5QBTMAXK.js.map} +0 -0
- /package/dist/lib/cubing/chunks/{chunk-GEMIB7TF.js.map → chunk-H57WKFBE.js.map} +0 -0
- /package/dist/lib/cubing/chunks/{chunk-HPIYOMRJ.js.map → chunk-JNIAXRNE.js.map} +0 -0
- /package/dist/lib/cubing/chunks/{chunk-7WLUEIZX.js.map → chunk-OW4IHAI4.js.map} +0 -0
- /package/dist/lib/cubing/chunks/{chunk-2ZDYUAXG.js.map → chunk-RAOTPMYY.js.map} +0 -0
- /package/dist/lib/cubing/chunks/{chunk-QYBDWFY6.js.map → chunk-W2Z7MAP2.js.map} +0 -0
- /package/dist/lib/cubing/chunks/{chunk-VQIVSUL2.js.map → chunk-Y3BVWVFU.js.map} +0 -0
- /package/dist/lib/cubing/chunks/{inside-XY43FEWJ.js.map → inside-BKENXSSR.js.map} +0 -0
- /package/dist/lib/cubing/chunks/{search-dynamic-sgs-side-events-2RPLAYOZ.js.map → search-dynamic-sgs-side-events-OOIOU5SK.js.map} +0 -0
- /package/dist/lib/cubing/chunks/{search-dynamic-sgs-unofficial-SOS5BTCL.js.map → search-dynamic-sgs-unofficial-COV225SC.js.map} +0 -0
- /package/dist/lib/cubing/chunks/{search-dynamic-solve-kilominx-BN4POKYF.js.map → search-dynamic-solve-kilominx-RAZM75GA.js.map} +0 -0
- /package/dist/lib/cubing/chunks/{twisty-dynamic-3d-VWNC3JXN.js.map → twisty-dynamic-3d-TINH44QH.js.map} +0 -0
- /package/dist/lib/cubing/chunks/{twsearch-6KUSKPX2.js.map → twsearch-XKCR3E3R.js.map} +0 -0
|
@@ -351,169 +351,168 @@ var AlgParser = class {
|
|
|
351
351
|
);
|
|
352
352
|
}
|
|
353
353
|
};
|
|
354
|
-
mainLoop:
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
354
|
+
mainLoop: while (this.#idx < this.#input.length) {
|
|
355
|
+
const savedCharIndex = this.#idx;
|
|
356
|
+
if (stopBefore.includes(this.#input[this.#idx])) {
|
|
357
|
+
return addCharIndices(algBuilder.toAlg(), algStartIdx, algEndIdx);
|
|
358
|
+
}
|
|
359
|
+
if (this.tryConsumeNext(" ")) {
|
|
360
|
+
crowded = false;
|
|
361
|
+
if (algBuilder.experimentalNumAlgNodes() === 0) {
|
|
362
|
+
algStartIdx = this.#idx;
|
|
359
363
|
}
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
364
|
+
continue mainLoop;
|
|
365
|
+
} else if (MOVE_START_REGEX.test(this.#input[this.#idx])) {
|
|
366
|
+
mustNotBeCrowded(savedCharIndex);
|
|
367
|
+
const move = this.parseMoveImpl();
|
|
368
|
+
algBuilder.push(move);
|
|
369
|
+
crowded = true;
|
|
370
|
+
algEndIdx = this.#idx;
|
|
371
|
+
continue mainLoop;
|
|
372
|
+
} else if (this.tryConsumeNext("(")) {
|
|
373
|
+
mustNotBeCrowded(savedCharIndex);
|
|
374
|
+
const sq1PairStartMatch = this.tryRegex(SQUARE1_PAIR_START_REGEX);
|
|
375
|
+
if (sq1PairStartMatch) {
|
|
376
|
+
const topAmountString = sq1PairStartMatch[1];
|
|
377
|
+
const savedCharIndexD = this.#idx;
|
|
378
|
+
const sq1PairEndMatch = this.parseRegex(SQUARE1_PAIR_END_REGEX);
|
|
379
|
+
const uMove = addCharIndices(
|
|
380
|
+
new Move(new QuantumMove("U_SQ_"), parseInt(topAmountString)),
|
|
381
|
+
savedCharIndex + 1,
|
|
382
|
+
savedCharIndex + 1 + topAmountString.length
|
|
383
|
+
);
|
|
384
|
+
const dMove = addCharIndices(
|
|
385
|
+
new Move(new QuantumMove("D_SQ_"), parseInt(sq1PairEndMatch[1])),
|
|
386
|
+
savedCharIndexD,
|
|
387
|
+
this.#idx - 1
|
|
388
|
+
);
|
|
389
|
+
const alg = addCharIndices(
|
|
390
|
+
new Alg([uMove, dMove]),
|
|
391
|
+
savedCharIndex + 1,
|
|
392
|
+
this.#idx - 1
|
|
393
|
+
);
|
|
394
|
+
algBuilder.push(
|
|
395
|
+
addCharIndices(new Grouping(alg), savedCharIndex, this.#idx)
|
|
396
|
+
);
|
|
370
397
|
crowded = true;
|
|
371
398
|
algEndIdx = this.#idx;
|
|
372
399
|
continue mainLoop;
|
|
373
|
-
} else
|
|
374
|
-
mustNotBeCrowded(savedCharIndex);
|
|
375
|
-
const sq1PairStartMatch = this.tryRegex(SQUARE1_PAIR_START_REGEX);
|
|
376
|
-
if (sq1PairStartMatch) {
|
|
377
|
-
const topAmountString = sq1PairStartMatch[1];
|
|
378
|
-
const savedCharIndexD = this.#idx;
|
|
379
|
-
const sq1PairEndMatch = this.parseRegex(SQUARE1_PAIR_END_REGEX);
|
|
380
|
-
const uMove = addCharIndices(
|
|
381
|
-
new Move(new QuantumMove("U_SQ_"), parseInt(topAmountString)),
|
|
382
|
-
savedCharIndex + 1,
|
|
383
|
-
savedCharIndex + 1 + topAmountString.length
|
|
384
|
-
);
|
|
385
|
-
const dMove = addCharIndices(
|
|
386
|
-
new Move(new QuantumMove("D_SQ_"), parseInt(sq1PairEndMatch[1])),
|
|
387
|
-
savedCharIndexD,
|
|
388
|
-
this.#idx - 1
|
|
389
|
-
);
|
|
390
|
-
const alg = addCharIndices(
|
|
391
|
-
new Alg([uMove, dMove]),
|
|
392
|
-
savedCharIndex + 1,
|
|
393
|
-
this.#idx - 1
|
|
394
|
-
);
|
|
395
|
-
algBuilder.push(
|
|
396
|
-
addCharIndices(new Grouping(alg), savedCharIndex, this.#idx)
|
|
397
|
-
);
|
|
398
|
-
crowded = true;
|
|
399
|
-
algEndIdx = this.#idx;
|
|
400
|
-
continue mainLoop;
|
|
401
|
-
} else {
|
|
402
|
-
const alg = this.parseAlgWithStopping([")"]);
|
|
403
|
-
this.mustConsumeNext(")");
|
|
404
|
-
const amount = this.parseAmount();
|
|
405
|
-
algBuilder.push(
|
|
406
|
-
addCharIndices(
|
|
407
|
-
new Grouping(alg, amount),
|
|
408
|
-
savedCharIndex,
|
|
409
|
-
this.#idx
|
|
410
|
-
)
|
|
411
|
-
);
|
|
412
|
-
crowded = true;
|
|
413
|
-
algEndIdx = this.#idx;
|
|
414
|
-
continue mainLoop;
|
|
415
|
-
}
|
|
416
|
-
} else if (this.tryConsumeNext("^")) {
|
|
417
|
-
if (!algDebugGlobals.caretNISSNotationEnabled) {
|
|
418
|
-
throw new Error(
|
|
419
|
-
"Alg contained a caret but caret NISS notation is not enabled."
|
|
420
|
-
);
|
|
421
|
-
}
|
|
422
|
-
this.mustConsumeNext("(");
|
|
400
|
+
} else {
|
|
423
401
|
const alg = this.parseAlgWithStopping([")"]);
|
|
424
|
-
this.
|
|
425
|
-
const grouping = new Grouping(alg, -1);
|
|
426
|
-
const placeholder = new Pause();
|
|
427
|
-
grouping.experimentalNISSPlaceholder = placeholder;
|
|
428
|
-
placeholder.experimentalNISSGrouping = grouping;
|
|
429
|
-
this.#nissQueue.push(grouping);
|
|
430
|
-
algBuilder.push(placeholder);
|
|
431
|
-
} else if (this.tryConsumeNext("[")) {
|
|
432
|
-
mustNotBeCrowded(savedCharIndex);
|
|
433
|
-
const A = this.parseAlgWithStopping([",", ":"]);
|
|
434
|
-
const separator = this.popNext();
|
|
435
|
-
const B = this.parseAlgWithStopping(["]"]);
|
|
436
|
-
this.mustConsumeNext("]");
|
|
437
|
-
let unrepeated;
|
|
438
|
-
switch (separator) {
|
|
439
|
-
case ":": {
|
|
440
|
-
unrepeated = addCharIndices(
|
|
441
|
-
new Conjugate(A, B),
|
|
442
|
-
savedCharIndex,
|
|
443
|
-
this.#idx
|
|
444
|
-
);
|
|
445
|
-
crowded = true;
|
|
446
|
-
algEndIdx = this.#idx;
|
|
447
|
-
break;
|
|
448
|
-
}
|
|
449
|
-
case ",": {
|
|
450
|
-
unrepeated = addCharIndices(
|
|
451
|
-
new Commutator(A, B),
|
|
452
|
-
savedCharIndex,
|
|
453
|
-
this.#idx
|
|
454
|
-
);
|
|
455
|
-
crowded = true;
|
|
456
|
-
algEndIdx = this.#idx;
|
|
457
|
-
break;
|
|
458
|
-
}
|
|
459
|
-
default:
|
|
460
|
-
throw new Error("unexpected parsing error");
|
|
461
|
-
}
|
|
462
|
-
const afterClosingBracketIdx = this.#idx;
|
|
402
|
+
this.mustConsumeNext(")");
|
|
463
403
|
const amount = this.parseAmount();
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
const unrepeatedAlg = addCharIndices(
|
|
468
|
-
new Alg([unrepeated]),
|
|
469
|
-
savedCharIndex,
|
|
470
|
-
afterClosingBracketIdx
|
|
471
|
-
);
|
|
472
|
-
const grouping = addCharIndices(
|
|
473
|
-
new Grouping(unrepeatedAlg, amount),
|
|
404
|
+
algBuilder.push(
|
|
405
|
+
addCharIndices(
|
|
406
|
+
new Grouping(alg, amount),
|
|
474
407
|
savedCharIndex,
|
|
475
408
|
this.#idx
|
|
476
|
-
)
|
|
477
|
-
|
|
478
|
-
}
|
|
409
|
+
)
|
|
410
|
+
);
|
|
479
411
|
crowded = true;
|
|
480
412
|
algEndIdx = this.#idx;
|
|
481
413
|
continue mainLoop;
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
|
|
414
|
+
}
|
|
415
|
+
} else if (this.tryConsumeNext("^")) {
|
|
416
|
+
if (!algDebugGlobals.caretNISSNotationEnabled) {
|
|
417
|
+
throw new Error(
|
|
418
|
+
"Alg contained a caret but caret NISS notation is not enabled."
|
|
485
419
|
);
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
420
|
+
}
|
|
421
|
+
this.mustConsumeNext("(");
|
|
422
|
+
const alg = this.parseAlgWithStopping([")"]);
|
|
423
|
+
this.popNext();
|
|
424
|
+
const grouping = new Grouping(alg, -1);
|
|
425
|
+
const placeholder = new Pause();
|
|
426
|
+
grouping.experimentalNISSPlaceholder = placeholder;
|
|
427
|
+
placeholder.experimentalNISSGrouping = grouping;
|
|
428
|
+
this.#nissQueue.push(grouping);
|
|
429
|
+
algBuilder.push(placeholder);
|
|
430
|
+
} else if (this.tryConsumeNext("[")) {
|
|
431
|
+
mustNotBeCrowded(savedCharIndex);
|
|
432
|
+
const A = this.parseAlgWithStopping([",", ":"]);
|
|
433
|
+
const separator = this.popNext();
|
|
434
|
+
const B = this.parseAlgWithStopping(["]"]);
|
|
435
|
+
this.mustConsumeNext("]");
|
|
436
|
+
let unrepeated;
|
|
437
|
+
switch (separator) {
|
|
438
|
+
case ":": {
|
|
439
|
+
unrepeated = addCharIndices(
|
|
440
|
+
new Conjugate(A, B),
|
|
441
|
+
savedCharIndex,
|
|
442
|
+
this.#idx
|
|
495
443
|
);
|
|
496
|
-
crowded =
|
|
444
|
+
crowded = true;
|
|
497
445
|
algEndIdx = this.#idx;
|
|
498
|
-
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
|
|
446
|
+
break;
|
|
447
|
+
}
|
|
448
|
+
case ",": {
|
|
449
|
+
unrepeated = addCharIndices(
|
|
450
|
+
new Commutator(A, B),
|
|
451
|
+
savedCharIndex,
|
|
452
|
+
this.#idx
|
|
502
453
|
);
|
|
503
454
|
crowded = true;
|
|
504
455
|
algEndIdx = this.#idx;
|
|
505
|
-
|
|
456
|
+
break;
|
|
506
457
|
}
|
|
507
|
-
|
|
458
|
+
default:
|
|
459
|
+
throw new Error("unexpected parsing error");
|
|
460
|
+
}
|
|
461
|
+
const afterClosingBracketIdx = this.#idx;
|
|
462
|
+
const amount = this.parseAmount();
|
|
463
|
+
if (amount === 1) {
|
|
464
|
+
algBuilder.push(unrepeated);
|
|
465
|
+
} else {
|
|
466
|
+
const unrepeatedAlg = addCharIndices(
|
|
467
|
+
new Alg([unrepeated]),
|
|
468
|
+
savedCharIndex,
|
|
469
|
+
afterClosingBracketIdx
|
|
470
|
+
);
|
|
471
|
+
const grouping = addCharIndices(
|
|
472
|
+
new Grouping(unrepeatedAlg, amount),
|
|
473
|
+
savedCharIndex,
|
|
474
|
+
this.#idx
|
|
475
|
+
);
|
|
476
|
+
algBuilder.push(grouping);
|
|
477
|
+
}
|
|
478
|
+
crowded = true;
|
|
479
|
+
algEndIdx = this.#idx;
|
|
480
|
+
continue mainLoop;
|
|
481
|
+
} else if (this.tryConsumeNext("\n")) {
|
|
482
|
+
algBuilder.push(
|
|
483
|
+
addCharIndices(new Newline(), savedCharIndex, this.#idx)
|
|
484
|
+
);
|
|
485
|
+
crowded = false;
|
|
486
|
+
algEndIdx = this.#idx;
|
|
487
|
+
continue mainLoop;
|
|
488
|
+
} else if (this.tryConsumeNext("/")) {
|
|
489
|
+
if (this.tryConsumeNext("/")) {
|
|
508
490
|
mustNotBeCrowded(savedCharIndex);
|
|
509
|
-
|
|
510
|
-
|
|
491
|
+
const [text] = this.parseRegex(COMMENT_TEXT_REGEX);
|
|
492
|
+
algBuilder.push(
|
|
493
|
+
addCharIndices(new LineComment(text), savedCharIndex, this.#idx)
|
|
494
|
+
);
|
|
495
|
+
crowded = false;
|
|
511
496
|
algEndIdx = this.#idx;
|
|
512
497
|
continue mainLoop;
|
|
513
498
|
} else {
|
|
514
|
-
|
|
499
|
+
algBuilder.push(
|
|
500
|
+
addCharIndices(new Move("_SLASH_"), savedCharIndex, this.#idx)
|
|
501
|
+
);
|
|
502
|
+
crowded = true;
|
|
503
|
+
algEndIdx = this.#idx;
|
|
504
|
+
continue mainLoop;
|
|
515
505
|
}
|
|
506
|
+
} else if (this.tryConsumeNext(".")) {
|
|
507
|
+
mustNotBeCrowded(savedCharIndex);
|
|
508
|
+
algBuilder.push(addCharIndices(new Pause(), savedCharIndex, this.#idx));
|
|
509
|
+
crowded = true;
|
|
510
|
+
algEndIdx = this.#idx;
|
|
511
|
+
continue mainLoop;
|
|
512
|
+
} else {
|
|
513
|
+
throw new Error(`Unexpected character: ${this.popNext()}`);
|
|
516
514
|
}
|
|
515
|
+
}
|
|
517
516
|
if (this.#idx !== this.#input.length) {
|
|
518
517
|
throw new Error("did not finish parsing?");
|
|
519
518
|
}
|
|
@@ -1878,4 +1877,4 @@ export {
|
|
|
1878
1877
|
keyToMove,
|
|
1879
1878
|
experimentalAlgCubingNetLink
|
|
1880
1879
|
};
|
|
1881
|
-
//# sourceMappingURL=chunk-
|
|
1880
|
+
//# sourceMappingURL=chunk-EF6G34T7.js.map
|