cubing 0.24.0-pre4 → 0.24.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.
Files changed (71) hide show
  1. package/dist/esm/{2x2x2.sgs.json-5IQQFXW7.js → 2x2x2.sgs.json-5MCXGXA6.js} +3 -3
  2. package/dist/esm/{2x2x2.sgs.json-5IQQFXW7.js.map → 2x2x2.sgs.json-5MCXGXA6.js.map} +0 -0
  3. package/dist/esm/{3d-dynamic-inside-OGANXBOW.js → 3d-dynamic-inside-XYXXTULQ.js} +4 -4
  4. package/dist/esm/{3d-dynamic-inside-OGANXBOW.js.map → 3d-dynamic-inside-XYXXTULQ.js.map} +0 -0
  5. package/dist/esm/bluetooth/index.js +3 -3
  6. package/dist/esm/{chunk-2IHGN4YF.js → chunk-2CGRUO5X.js} +120 -96
  7. package/dist/esm/chunk-2CGRUO5X.js.map +7 -0
  8. package/dist/esm/{chunk-NMODRU23.js → chunk-2I3MTSRM.js} +3 -3
  9. package/dist/esm/{chunk-NMODRU23.js.map → chunk-2I3MTSRM.js.map} +0 -0
  10. package/dist/esm/{chunk-Z36TNZT2.js → chunk-B27E6KTE.js} +9 -4
  11. package/dist/esm/chunk-B27E6KTE.js.map +7 -0
  12. package/dist/esm/{chunk-QBSUFYNB.js → chunk-BBEJTW6Z.js} +2 -2
  13. package/dist/esm/{chunk-QBSUFYNB.js.map → chunk-BBEJTW6Z.js.map} +0 -0
  14. package/dist/esm/{chunk-VSR6KPDV.js → chunk-GBIDMAJS.js} +2 -2
  15. package/dist/esm/{chunk-VSR6KPDV.js.map → chunk-GBIDMAJS.js.map} +0 -0
  16. package/dist/esm/{chunk-5HKJRHTE.js → chunk-HU55EGD6.js} +2 -2
  17. package/dist/esm/{chunk-5HKJRHTE.js.map → chunk-HU55EGD6.js.map} +0 -0
  18. package/dist/esm/{chunk-WOZD7WE6.js → chunk-LR6VCMD2.js} +2 -2
  19. package/dist/esm/{chunk-WOZD7WE6.js.map → chunk-LR6VCMD2.js.map} +0 -0
  20. package/dist/esm/{chunk-UYT3253Q.js → chunk-TOPMNZ57.js} +2 -2
  21. package/dist/esm/{chunk-UYT3253Q.js.map → chunk-TOPMNZ57.js.map} +0 -0
  22. package/dist/esm/{chunk-Z7Z3EXTF.js → chunk-UZTY6GHM.js} +3 -3
  23. package/dist/esm/chunk-UZTY6GHM.js.map +7 -0
  24. package/dist/esm/{entry-JFJRMSLA.js → entry-FOASJVBZ.js} +14 -14
  25. package/dist/esm/{entry-JFJRMSLA.js.map → entry-FOASJVBZ.js.map} +0 -0
  26. package/dist/esm/{fto.sgs.json-7I3SDUV5.js → fto.sgs.json-USK5JCKN.js} +3 -3
  27. package/dist/esm/{fto.sgs.json-7I3SDUV5.js.map → fto.sgs.json-USK5JCKN.js.map} +0 -0
  28. package/dist/esm/kpuzzle/index.js +3 -1
  29. package/dist/esm/{megaminx.sgs.json-H4UHRFJ6.js → megaminx.sgs.json-3UELYHNZ.js} +3 -3
  30. package/dist/esm/{megaminx.sgs.json-H4UHRFJ6.js.map → megaminx.sgs.json-3UELYHNZ.js.map} +0 -0
  31. package/dist/esm/{module-entry-4JHVVJZL.js → module-entry-DBPFVUZH.js} +2 -2
  32. package/dist/esm/{module-entry-4JHVVJZL.js.map → module-entry-DBPFVUZH.js.map} +0 -0
  33. package/dist/esm/protocol/index.js +2 -2
  34. package/dist/esm/puzzles/index.js +2 -2
  35. package/dist/esm/{pyraminx.sgs.json-ADZX6JEQ.js → pyraminx.sgs.json-ARYGZ7E4.js} +4 -4
  36. package/dist/esm/{pyraminx.sgs.json-ADZX6JEQ.js.map → pyraminx.sgs.json-ARYGZ7E4.js.map} +0 -0
  37. package/dist/esm/scramble/index.js +4 -4
  38. package/dist/esm/{scramble_444-QWIUGTEG.js → scramble_444-HZ7HJLTT.js} +6 -5
  39. package/dist/esm/scramble_444-HZ7HJLTT.js.map +7 -0
  40. package/dist/esm/search/index.js +4 -4
  41. package/dist/esm/{skewb.sgs.json-KZUPZ744.js → skewb.sgs.json-QVGBEYZV.js} +3 -3
  42. package/dist/esm/{skewb.sgs.json-KZUPZ744.js.map → skewb.sgs.json-QVGBEYZV.js.map} +0 -0
  43. package/dist/esm/twisty/index.js +404 -205
  44. package/dist/esm/twisty/index.js.map +3 -3
  45. package/dist/esm/{worker-inside-generated-string-MFGRIFCG.js → worker-inside-generated-string-OWBTRAXR.js} +21 -21
  46. package/dist/esm/worker-inside-generated-string-OWBTRAXR.js.map +7 -0
  47. package/dist/types/kpuzzle/index.d.ts +2 -2
  48. package/dist/types/puzzles/async/async-pg3d.d.ts +23 -6
  49. package/dist/types/puzzles/async/lazy-cached.d.ts +1 -0
  50. package/dist/types/puzzles/implementations/fto/index.d.ts +11 -2
  51. package/dist/types/puzzles/implementations/megaminx/index.d.ts +11 -2
  52. package/dist/types/puzzles/implementations/pyraminx/index.d.ts +7 -2
  53. package/dist/types/search/worker-inside-generated-string.d.ts +1 -1
  54. package/dist/types/twisty/index.d.ts +1 -0
  55. package/dist/types/twisty/model/TwistyPlayerModel.d.ts +44 -42
  56. package/dist/types/twisty/model/props/puzzle/state/AlgTransformationProp.d.ts +1 -1
  57. package/dist/types/twisty/model/props/puzzle/state/{AnchoredStartProp.d.ts → AnchorTransformationProp.d.ts} +3 -3
  58. package/dist/types/twisty/model/props/puzzle/state/PuzzleAlgProp.d.ts +1 -0
  59. package/dist/types/twisty/model/props/viewer/ViewerLinkProp.d.ts +1 -0
  60. package/dist/types/twisty/views/ManagedCustomElement.d.ts +1 -1
  61. package/dist/types/twisty/views/TwistyAlgEditor/TwistyAlgEditor.d.ts +1 -1
  62. package/dist/types/twisty/views/twizzle/TwizzleLink.css.d.ts +2 -0
  63. package/dist/types/twisty/views/twizzle/TwizzleLink.d.ts +11 -0
  64. package/dist/types/twisty/views/twizzle/url-params.d.ts +18 -0
  65. package/package.json +2 -1
  66. package/dist/esm/chunk-2IHGN4YF.js.map +0 -7
  67. package/dist/esm/chunk-Z36TNZT2.js.map +0 -7
  68. package/dist/esm/chunk-Z7Z3EXTF.js.map +0 -7
  69. package/dist/esm/scramble_444-QWIUGTEG.js.map +0 -7
  70. package/dist/esm/worker-inside-generated-string-MFGRIFCG.js.map +0 -7
  71. package/dist/types/puzzles/async/lazy-cached-kpuzzle.d.ts +0 -2
@@ -3,8 +3,8 @@ import {
3
3
  } from "./chunk-27KJGD3S.js";
4
4
  import {
5
5
  cube2x2x2
6
- } from "./chunk-2IHGN4YF.js";
7
- import "./chunk-Z36TNZT2.js";
6
+ } from "./chunk-2CGRUO5X.js";
7
+ import "./chunk-B27E6KTE.js";
8
8
  import "./chunk-EWRBHQFX.js";
9
9
  import "./chunk-WO2AXYFE.js";
10
10
 
@@ -119,4 +119,4 @@ export {
119
119
  cachedData222,
120
120
  data222
121
121
  };
122
- //# sourceMappingURL=2x2x2.sgs.json-5IQQFXW7.js.map
122
+ //# sourceMappingURL=2x2x2.sgs.json-5MCXGXA6.js.map
@@ -3,13 +3,13 @@ import {
3
3
  THREEJS,
4
4
  experimentalStickerings,
5
5
  hintFaceletStyles
6
- } from "./chunk-UYT3253Q.js";
6
+ } from "./chunk-TOPMNZ57.js";
7
7
  import {
8
8
  cube3x3x3,
9
9
  getFaceletAppearance,
10
10
  puzzles
11
- } from "./chunk-2IHGN4YF.js";
12
- import "./chunk-Z36TNZT2.js";
11
+ } from "./chunk-2CGRUO5X.js";
12
+ import "./chunk-B27E6KTE.js";
13
13
  import {
14
14
  Move
15
15
  } from "./chunk-EWRBHQFX.js";
@@ -1495,4 +1495,4 @@ export {
1495
1495
  cube3DShim,
1496
1496
  pg3dShim
1497
1497
  };
1498
- //# sourceMappingURL=3d-dynamic-inside-OGANXBOW.js.map
1498
+ //# sourceMappingURL=3d-dynamic-inside-XYXXTULQ.js.map
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  binaryComponentsToReid3x3x3,
3
3
  twizzleBinaryToBinaryComponents
4
- } from "../chunk-VSR6KPDV.js";
4
+ } from "../chunk-GBIDMAJS.js";
5
5
  import {
6
6
  puzzles
7
- } from "../chunk-2IHGN4YF.js";
7
+ } from "../chunk-2CGRUO5X.js";
8
8
  import {
9
9
  KState,
10
10
  experimental3x3x3KPuzzle
11
- } from "../chunk-Z36TNZT2.js";
11
+ } from "../chunk-B27E6KTE.js";
12
12
  import {
13
13
  Alg,
14
14
  Move,
@@ -1,7 +1,12 @@
1
1
  import {
2
2
  KPuzzle,
3
3
  experimental3x3x3KPuzzle
4
- } from "./chunk-Z36TNZT2.js";
4
+ } from "./chunk-B27E6KTE.js";
5
+ import {
6
+ __privateAdd,
7
+ __privateGet,
8
+ __privateSet
9
+ } from "./chunk-WO2AXYFE.js";
5
10
 
6
11
  // src/cubing/puzzles/customPGPuzzleLoader.ts
7
12
  async function descAsyncGetPuzzleGeometry(desc) {
@@ -247,7 +252,7 @@ function setGlobalCustomStickerer(stickerer) {
247
252
  const successPromises = [];
248
253
  for (const player of players) {
249
254
  successPromises.push((async () => {
250
- const stickering = await player.experimentalModel.stickeringProp.get();
255
+ const stickering = await player.experimentalModel.stickering.get();
251
256
  player.experimentalStickering = stickering === "experimental-global-custom-1" ? "experimental-global-custom-2" : "experimental-global-custom-1";
252
257
  })());
253
258
  }
@@ -477,17 +482,15 @@ async function cubeStickerings() {
477
482
  "Void Cube",
478
483
  "picture",
479
484
  "invisible",
480
- "centers-only",
481
- "experimental-global-custom-1",
482
- "experimental-global-custom-2"
485
+ "centers-only"
483
486
  ];
484
487
  }
485
488
 
486
- // src/cubing/puzzles/async/lazy-cached-kpuzzle.ts
487
- function lazyKPuzzle(getKPuzzle) {
488
- let cachedKPuzzlePromise = null;
489
+ // src/cubing/puzzles/async/lazy-cached.ts
490
+ function getCached(getValue) {
491
+ let cachedPromise = null;
489
492
  return () => {
490
- return cachedKPuzzlePromise ?? (cachedKPuzzlePromise = getKPuzzle());
493
+ return cachedPromise ?? (cachedPromise = getValue());
491
494
  };
492
495
  }
493
496
 
@@ -500,8 +503,8 @@ async function asyncGetPuzzleGeometry(puzzleName) {
500
503
  addRotations: true
501
504
  });
502
505
  }
503
- async function asyncGetKPuzzle2(puzzleName) {
504
- const pg = await asyncGetPuzzleGeometry(puzzleName);
506
+ async function asyncGetKPuzzle2(pgPromise, puzzleName) {
507
+ const pg = await pgPromise;
505
508
  const kpuzzleDefinition = pg.getKPuzzleDefinition(true);
506
509
  kpuzzleDefinition.name = puzzleName;
507
510
  const puzzleGeometry = await import("./puzzle-geometry/index.js");
@@ -510,48 +513,52 @@ async function asyncGetKPuzzle2(puzzleName) {
510
513
  experimentalPGNotation: pgNotation
511
514
  });
512
515
  }
513
- function asyncLazyKPuzzleGetter(puzzleName) {
514
- return lazyKPuzzle(() => asyncGetKPuzzle2(puzzleName));
515
- }
516
- function genericPGPuzzleLoader(id, fullName, info) {
517
- const puzzleLoader = {
518
- id,
519
- fullName,
520
- kpuzzle: asyncLazyKPuzzleGetter(id),
521
- svg: async () => {
522
- const pg = await asyncGetPuzzleGeometry(id);
523
- return pg.generatesvg();
524
- },
525
- pg: async () => {
526
- return asyncGetPuzzleGeometry(id);
527
- }
528
- };
529
- if (info?.inventedBy) {
530
- puzzleLoader.inventedBy = info.inventedBy;
516
+ var _cachedPG, _cachedKPuzzle, _cachedSVG;
517
+ var PGPuzzleLoader = class {
518
+ constructor(info) {
519
+ __privateAdd(this, _cachedPG, void 0);
520
+ __privateAdd(this, _cachedKPuzzle, void 0);
521
+ __privateAdd(this, _cachedSVG, void 0);
522
+ this.id = info.id;
523
+ this.fullName = info.fullName;
524
+ this.inventedBy = info.inventedBy;
525
+ this.inventionYear = info.inventionYear;
531
526
  }
532
- if (info?.inventionYear) {
533
- puzzleLoader.inventionYear = info.inventionYear;
527
+ pg() {
528
+ const id = this.id === "fto" ? "FTO" : this.id;
529
+ return __privateGet(this, _cachedPG) ?? __privateSet(this, _cachedPG, asyncGetPuzzleGeometry(id));
534
530
  }
535
- return puzzleLoader;
536
- }
537
- function cubePGPuzzleLoader(id, fullName, info) {
538
- const puzzleLoader = genericPGPuzzleLoader(id, fullName, info);
539
- puzzleLoader.appearance = cubeAppearance.bind(cubeAppearance, puzzleLoader);
540
- puzzleLoader.stickerings = cubeStickerings;
541
- return puzzleLoader;
542
- }
531
+ kpuzzle() {
532
+ return __privateGet(this, _cachedKPuzzle) ?? __privateSet(this, _cachedKPuzzle, asyncGetKPuzzle2(this.pg(), this.id));
533
+ }
534
+ svg() {
535
+ return __privateGet(this, _cachedSVG) ?? __privateSet(this, _cachedSVG, (async () => (await this.pg()).generatesvg())());
536
+ }
537
+ };
538
+ _cachedPG = new WeakMap();
539
+ _cachedKPuzzle = new WeakMap();
540
+ _cachedSVG = new WeakMap();
541
+ var CubePGPuzzleLoader = class extends PGPuzzleLoader {
542
+ constructor() {
543
+ super(...arguments);
544
+ this.stickerings = cubeStickerings;
545
+ }
546
+ appearance(stickering) {
547
+ return cubeAppearance(this, stickering);
548
+ }
549
+ };
543
550
 
544
551
  // src/cubing/puzzles/implementations/2x2x2/index.ts
545
552
  var cube2x2x2 = {
546
553
  id: "2x2x2",
547
554
  fullName: "2\xD72\xD72 Cube",
548
- kpuzzle: lazyKPuzzle(async () => new KPuzzle((await import("./2x2x2.kpuzzle.json-RUB44MJV.js")).cube2x2x2KPuzzleDefinition)),
555
+ kpuzzle: getCached(async () => new KPuzzle((await import("./2x2x2.kpuzzle.json-RUB44MJV.js")).cube2x2x2KPuzzleDefinition)),
549
556
  svg: async () => {
550
557
  return (await import("./2x2x2.kpuzzle.svg-CQF2FTV7.js")).default;
551
558
  },
552
- pg: async () => {
559
+ pg: getCached(async () => {
553
560
  return asyncGetPuzzleGeometry("2x2x2");
554
- },
561
+ }),
555
562
  appearance: (stickering) => cubeAppearance(cube2x2x2, stickering),
556
563
  stickerings: cubeStickerings
557
564
  };
@@ -562,18 +569,18 @@ var cube3x3x3 = {
562
569
  fullName: "3\xD73\xD73 Cube",
563
570
  inventedBy: ["Ern\u0151 Rubik"],
564
571
  inventionYear: 1974,
565
- kpuzzle: async () => {
572
+ kpuzzle: getCached(async () => {
566
573
  return experimental3x3x3KPuzzle;
567
- },
568
- svg: async () => {
574
+ }),
575
+ svg: getCached(async () => {
569
576
  return (await import("./3x3x3.kpuzzle.svg-ERSSH66P.js")).default;
570
- },
571
- llSVG: async () => {
577
+ }),
578
+ llSVG: getCached(async () => {
572
579
  return (await import("./3x3x3-ll.kpuzzle.svg-53CBPG5O.js")).default;
573
- },
574
- pg: async () => {
580
+ }),
581
+ pg: getCached(async () => {
575
582
  return asyncGetPuzzleGeometry("3x3x3");
576
- },
583
+ }),
577
584
  appearance: (stickering) => cubeAppearance(cube3x3x3, stickering),
578
585
  stickerings: cubeStickerings
579
586
  };
@@ -584,10 +591,10 @@ var clock = {
584
591
  fullName: "Clock",
585
592
  inventedBy: ["Christopher C. Wiggs", "Christopher J. Taylor"],
586
593
  inventionYear: 1988,
587
- kpuzzle: lazyKPuzzle(async () => new KPuzzle((await import("./clock.kpuzzle.json-BQKNKV3G.js")).clockKPuzzleDefinition)),
588
- svg: async () => {
594
+ kpuzzle: getCached(async () => new KPuzzle((await import("./clock.kpuzzle.json-BQKNKV3G.js")).clockKPuzzleDefinition)),
595
+ svg: getCached(async () => {
589
596
  return (await import("./clock.kpuzzle.svg-B7TMN3SY.js")).default;
590
- }
597
+ })
591
598
  };
592
599
 
593
600
  // src/cubing/puzzles/stickerings/fto-stickerings.ts
@@ -656,22 +663,21 @@ async function ftoStickerings() {
656
663
  }
657
664
 
658
665
  // src/cubing/puzzles/implementations/fto/index.ts
659
- var fto = {
660
- id: "fto",
661
- fullName: "Face-Turning Octahedron",
662
- inventedBy: ["Karl Rohrbach", "David Pitcher"],
663
- inventionYear: 1983,
664
- kpuzzle: asyncLazyKPuzzleGetter("FTO"),
665
- svg: async () => {
666
- const pg = await asyncGetPuzzleGeometry("FTO");
667
- return pg.generatesvg();
668
- },
669
- pg: async () => {
670
- return asyncGetPuzzleGeometry("FTO");
671
- },
672
- appearance: (stickering) => ftoStickering(fto, stickering),
673
- stickerings: ftoStickerings
666
+ var FTOPuzzleLoader = class extends PGPuzzleLoader {
667
+ constructor() {
668
+ super({
669
+ id: "fto",
670
+ fullName: "Face-Turning Octahedron",
671
+ inventedBy: ["Karl Rohrbach", "David Pitcher"],
672
+ inventionYear: 1983
673
+ });
674
+ this.stickerings = ftoStickerings;
675
+ }
676
+ appearance(stickering) {
677
+ return ftoStickering(this, stickering);
678
+ }
674
679
  };
680
+ var fto = new FTOPuzzleLoader();
675
681
 
676
682
  // src/cubing/puzzles/stickerings/megaminx-stickerings.ts
677
683
  async function megaminxAppearance(puzzleLoader, stickering) {
@@ -690,26 +696,35 @@ async function megaminxStickerings() {
690
696
  }
691
697
 
692
698
  // src/cubing/puzzles/implementations/megaminx/index.ts
693
- var megaminx = genericPGPuzzleLoader("megaminx", "Megaminx", {
694
- inventionYear: 1981
695
- });
696
- megaminx.appearance = (stickering) => megaminxAppearance(megaminx, stickering);
697
- megaminx.stickerings = megaminxStickerings;
699
+ var MegaminxPuzzleLoader = class extends PGPuzzleLoader {
700
+ constructor() {
701
+ super({
702
+ id: "megaminx",
703
+ fullName: "Megaminx",
704
+ inventionYear: 1981
705
+ });
706
+ this.stickerings = megaminxStickerings;
707
+ }
708
+ appearance(stickering) {
709
+ return megaminxAppearance(this, stickering);
710
+ }
711
+ };
712
+ var megaminx = new MegaminxPuzzleLoader();
698
713
 
699
714
  // src/cubing/puzzles/implementations/pyraminx/index.ts
700
- var pyraminx = {
701
- id: "pyraminx",
702
- fullName: "Pyraminx",
703
- inventedBy: ["Uwe Meffert"],
704
- inventionYear: 1970,
705
- kpuzzle: asyncLazyKPuzzleGetter("pyraminx"),
706
- svg: async () => {
707
- return (await import("./pyraminx.kpuzzle.svg-QBBMZVDY.js")).default;
708
- },
709
- pg: async () => {
710
- return asyncGetPuzzleGeometry("pyraminx");
715
+ var PyraminxPuzzleLoader = class extends PGPuzzleLoader {
716
+ constructor() {
717
+ super({
718
+ id: "pyraminx",
719
+ fullName: "Pyraminx",
720
+ inventedBy: ["Uwe Meffert"]
721
+ });
722
+ this.svg = getCached(async () => {
723
+ return (await import("./pyraminx.kpuzzle.svg-QBBMZVDY.js")).default;
724
+ });
711
725
  }
712
726
  };
727
+ var pyraminx = new PyraminxPuzzleLoader();
713
728
 
714
729
  // src/cubing/puzzles/implementations/square1/index.ts
715
730
  var square1 = {
@@ -717,34 +732,43 @@ var square1 = {
717
732
  fullName: "Square-1",
718
733
  inventedBy: ["Karel Hr\u0161el", "Vojtech Kopsk\xFD"],
719
734
  inventionYear: 1990,
720
- kpuzzle: lazyKPuzzle(async () => new KPuzzle((await import("./sq1-hyperorbit.kpuzzle.json-4XS5YACO.js")).sq1HyperOrbitKPuzzleDefinition)),
721
- svg: async () => {
735
+ kpuzzle: getCached(async () => new KPuzzle((await import("./sq1-hyperorbit.kpuzzle.json-4XS5YACO.js")).sq1HyperOrbitKPuzzleDefinition)),
736
+ svg: getCached(async () => {
722
737
  return (await import("./sq1-hyperorbit.kpuzzle.svg-ID57EER7.js")).default;
723
- }
738
+ })
724
739
  };
725
740
 
726
741
  // src/cubing/puzzles/index.ts
727
742
  var puzzles = {
728
743
  "3x3x3": cube3x3x3,
729
744
  "2x2x2": cube2x2x2,
730
- "4x4x4": cubePGPuzzleLoader("4x4x4", "4\xD74\xD74 Cube"),
731
- "5x5x5": cubePGPuzzleLoader("5x5x5", "5\xD75\xD75 Cube"),
732
- "6x6x6": cubePGPuzzleLoader("6x6x6", "6\xD76\xD76 Cube"),
733
- "7x7x7": cubePGPuzzleLoader("7x7x7", "7\xD77\xD77 Cube"),
734
- "40x40x40": cubePGPuzzleLoader("40x40x40", "40\xD740\xD740 Cube"),
745
+ "4x4x4": new CubePGPuzzleLoader({ id: "4x4x4", fullName: "4\xD74\xD74 Cube" }),
746
+ "5x5x5": new CubePGPuzzleLoader({ id: "5x5x5", fullName: "5\xD75\xD75 Cube" }),
747
+ "6x6x6": new CubePGPuzzleLoader({ id: "6x6x6", fullName: "6\xD76\xD76 Cube" }),
748
+ "7x7x7": new CubePGPuzzleLoader({ id: "7x7x7", fullName: "7\xD77\xD77 Cube" }),
749
+ "40x40x40": new CubePGPuzzleLoader({
750
+ id: "40x40x40",
751
+ fullName: "40\xD740\xD740 Cube"
752
+ }),
735
753
  clock,
736
754
  "megaminx": megaminx,
737
755
  pyraminx,
738
- "skewb": genericPGPuzzleLoader("skewb", "Skewb", {
756
+ "skewb": new PGPuzzleLoader({
757
+ id: "skewb",
758
+ fullName: "Skewb",
739
759
  inventedBy: ["Tony Durham"]
740
760
  }),
741
761
  square1,
742
762
  "fto": fto,
743
- "gigaminx": genericPGPuzzleLoader("gigaminx", "Gigaminx", {
763
+ "gigaminx": new PGPuzzleLoader({
764
+ id: "gigaminx",
765
+ fullName: "Gigaminx",
744
766
  inventedBy: ["Tyler Fox"],
745
767
  inventionYear: 2006
746
768
  }),
747
- "master_tetraminx": genericPGPuzzleLoader("master tetraminx", "Master Tetraminx", {
769
+ "master_tetraminx": new PGPuzzleLoader({
770
+ id: "master tetraminx",
771
+ fullName: "Master Tetraminx",
748
772
  inventedBy: ["Katsuhiko Okamoto"],
749
773
  inventionYear: 2002
750
774
  })
@@ -781,4 +805,4 @@ export {
781
805
  puzzles,
782
806
  wcaEventInfo
783
807
  };
784
- //# sourceMappingURL=chunk-2IHGN4YF.js.map
808
+ //# sourceMappingURL=chunk-2CGRUO5X.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/cubing/puzzles/customPGPuzzleLoader.ts", "../../src/cubing/puzzles/stickerings/appearance.ts", "../../src/cubing/puzzles/stickerings/global-custom-stickering-hack.ts", "../../src/cubing/puzzles/stickerings/cube-stickerings.ts", "../../src/cubing/puzzles/async/lazy-cached.ts", "../../src/cubing/puzzles/async/async-pg3d.ts", "../../src/cubing/puzzles/implementations/2x2x2/index.ts", "../../src/cubing/puzzles/implementations/3x3x3/index.ts", "../../src/cubing/puzzles/implementations/clock/index.ts", "../../src/cubing/puzzles/stickerings/fto-stickerings.ts", "../../src/cubing/puzzles/implementations/fto/index.ts", "../../src/cubing/puzzles/stickerings/megaminx-stickerings.ts", "../../src/cubing/puzzles/implementations/megaminx/index.ts", "../../src/cubing/puzzles/implementations/pyraminx/index.ts", "../../src/cubing/puzzles/implementations/square1/index.ts", "../../src/cubing/puzzles/index.ts"],
4
+ "sourcesContent": ["import { KPuzzle, KPuzzleDefinition } from \"../kpuzzle\";\nimport type { PuzzleGeometry } from \"../puzzle-geometry\";\nimport type { PuzzleDescriptionString } from \"../puzzle-geometry/PGPuzzles\";\nimport type { PuzzleLoader } from \"./PuzzleLoader\";\n\n// TODO: modify this to handle TwistyPlayer options\nexport async function descAsyncGetPuzzleGeometry(\n desc: PuzzleDescriptionString,\n): Promise<PuzzleGeometry> {\n const puzzleGeometry = await import(\"../puzzle-geometry\");\n return puzzleGeometry.getPuzzleGeometryByDesc(desc, {\n allMoves: true,\n orientCenters: true,\n addRotations: true,\n });\n}\n\n// TODO: dedup with `cubing/puzzles`\nexport async function asyncGetKPuzzle(\n desc: PuzzleDescriptionString,\n): Promise<KPuzzle> {\n const pg = await descAsyncGetPuzzleGeometry(desc);\n const kpuzzleDefinition: KPuzzleDefinition = pg.getKPuzzleDefinition(true);\n kpuzzleDefinition.name = `description: ${desc}`;\n const puzzleGeometry = await import(\"../puzzle-geometry\");\n const pgNotation = new puzzleGeometry.ExperimentalPGNotation(\n pg,\n pg.getOrbitsDef(true),\n );\n return new KPuzzle(kpuzzleDefinition, {\n experimentalPGNotation: pgNotation,\n });\n}\n\n// TODO: Can we avoid relying on IDs to deduplicate work at higher levels?\nlet nextCustomID = 1;\n\nexport function customPGPuzzleLoader(\n desc: PuzzleDescriptionString,\n info?: {\n fullName?: string;\n inventedBy?: string[];\n inventionYear?: number;\n },\n): PuzzleLoader {\n const customID = nextCustomID++;\n let cachedKPuzzle: Promise<KPuzzle> | null = null;\n const puzzleLoader: PuzzleLoader = {\n id: `custom-${customID}`,\n fullName: info?.fullName ?? `Custom Puzzle (instance #${customID})`,\n kpuzzle: async () => {\n return (cachedKPuzzle ??= asyncGetKPuzzle(desc));\n },\n svg: async () => {\n const pg = await descAsyncGetPuzzleGeometry(desc);\n return pg.generatesvg();\n },\n pg: async () => {\n return descAsyncGetPuzzleGeometry(desc);\n },\n };\n if (info?.inventedBy) {\n puzzleLoader.inventedBy = info.inventedBy;\n }\n if (info?.inventionYear) {\n puzzleLoader.inventionYear = info.inventionYear;\n }\n return puzzleLoader;\n}\n", "// TODO: figure out where to house this permanently.\n\nimport type { Move } from \"../../alg\";\nimport type { KPuzzle } from \"../../kpuzzle\";\n\nexport type FaceletMeshAppearance =\n | \"regular\"\n | \"dim\"\n | \"oriented\"\n | \"ignored\"\n | \"invisible\";\n\nexport type FaceletAppearance = {\n appearance: FaceletMeshAppearance;\n hintAppearance?: FaceletMeshAppearance;\n};\n\nexport type PieceAppearance = {\n // TODO: foundation?\n facelets: (FaceletMeshAppearance | FaceletAppearance | null)[];\n};\n\nexport type OrbitAppearance = {\n pieces: (PieceAppearance | null)[];\n};\n\nexport type PuzzleAppearance = {\n name?: string; // TODO\n orbits: Record<string, OrbitAppearance>;\n};\n\nexport function getFaceletAppearance(\n appearance: PuzzleAppearance,\n orbitName: string,\n pieceIdx: number,\n faceletIdx: number,\n hint: boolean,\n): FaceletMeshAppearance {\n const orbitAppearance = appearance.orbits[orbitName];\n const pieceAppearance: PieceAppearance | null =\n orbitAppearance.pieces[pieceIdx];\n if (pieceAppearance === null) {\n return regular;\n }\n const faceletAppearance: FaceletMeshAppearance | FaceletAppearance | null =\n pieceAppearance.facelets[faceletIdx];\n if (faceletAppearance === null) {\n return regular;\n }\n if (typeof faceletAppearance === \"string\") {\n return faceletAppearance;\n }\n if (hint) {\n return faceletAppearance.hintAppearance ?? faceletAppearance.appearance;\n }\n return faceletAppearance.appearance;\n}\n\n// TODO: Revert this to a normal enum, or write a standard to codify the names?\nexport enum PieceStickering {\n Regular = \"Regular\",\n Dim = \"Dim\",\n Ignored = \"Ignored\",\n OrientationStickers = \"OrientationStickers\",\n Invisible = \"Invisible\",\n Ignoriented = \"Ignoriented\",\n IgnoreNonPrimary = \"IgnoreNonPrimary\",\n PermuteNonPrimary = \"PermuteNonPrimary\",\n OrientationWithoutPermutation = \"OrientationWithoutPermutation\",\n}\n\nexport class PieceAnnotation<T> {\n stickerings: Map<string, T[]> = new Map();\n constructor(kpuzzle: KPuzzle, defaultValue: T) {\n for (const [orbitName, orbitDef] of Object.entries(\n kpuzzle.definition.orbits,\n )) {\n this.stickerings.set(\n orbitName,\n new Array(orbitDef.numPieces).fill(defaultValue),\n );\n }\n }\n}\n\nconst regular = \"regular\";\nconst ignored = \"ignored\";\nconst oriented = \"oriented\";\nconst invisible = \"invisible\";\nconst dim = \"dim\";\n\n// regular\nconst r: PieceAppearance = {\n facelets: [regular, regular, regular, regular, regular],\n};\n\n// ignored\nconst i: PieceAppearance = {\n facelets: [ignored, ignored, ignored, ignored, ignored],\n};\n\n// oriented stickers\nconst o: PieceAppearance = {\n facelets: [oriented, oriented, oriented, oriented, oriented],\n};\n\n// invisible\nconst invisiblePiece: PieceAppearance = {\n facelets: [invisible, invisible, invisible, invisible], // TODO: 4th entry is for void cube. Should be handled properly for all stickerings.\n};\n\n// \"OLL\"\nconst riiii: PieceAppearance = {\n facelets: [regular, ignored, ignored, ignored, ignored],\n};\n\n// \"PLL\"\nconst drrrr: PieceAppearance = {\n facelets: [dim, regular, regular, regular, regular],\n};\n\n// ignored\nconst d: PieceAppearance = {\n facelets: [dim, dim, dim, dim, dim],\n};\n\n// \"OLL\"\nconst diiii: PieceAppearance = {\n facelets: [dim, ignored, ignored, ignored, ignored],\n};\n\n// oriented\nconst oiiii: PieceAppearance = {\n facelets: [oriented, ignored, ignored, ignored, ignored],\n};\n\nexport function getPieceAppearance(\n pieceStickering: PieceStickering,\n): PieceAppearance {\n switch (pieceStickering) {\n case PieceStickering.Regular:\n return r;\n case PieceStickering.Dim:\n return d;\n case PieceStickering.Ignored:\n return i;\n case PieceStickering.OrientationStickers: // TODO: Hack for centers. This shouldn't be needed.\n return o;\n case PieceStickering.Invisible: // TODO: Hack for centers. This shouldn't be needed.\n return invisiblePiece;\n case PieceStickering.IgnoreNonPrimary:\n return riiii;\n case PieceStickering.PermuteNonPrimary:\n return drrrr;\n case PieceStickering.Ignoriented:\n return diiii;\n case PieceStickering.OrientationWithoutPermutation:\n return oiiii;\n }\n}\n\nexport class PuzzleStickering extends PieceAnnotation<PieceStickering> {\n constructor(kpuzzle: KPuzzle) {\n super(kpuzzle, PieceStickering.Regular);\n }\n\n set(pieceSet: PieceSet, pieceStickering: PieceStickering): PuzzleStickering {\n for (const [orbitName, pieces] of this.stickerings.entries()) {\n for (let i = 0; i < pieces.length; i++) {\n if (pieceSet.stickerings.get(orbitName)![i]) {\n pieces[i] = pieceStickering;\n }\n }\n }\n return this;\n }\n\n toAppearance(): PuzzleAppearance {\n const appearance: PuzzleAppearance = { orbits: {} };\n for (const [orbitName, pieceStickerings] of this.stickerings.entries()) {\n const pieces: PieceAppearance[] = [];\n const orbitAppearance: OrbitAppearance = {\n pieces,\n };\n appearance.orbits[orbitName] = orbitAppearance;\n for (const pieceStickering of pieceStickerings) {\n pieces.push(getPieceAppearance(pieceStickering));\n }\n }\n return appearance;\n }\n}\n\nexport type PieceSet = PieceAnnotation<boolean>;\n\nexport class StickeringManager {\n constructor(private kpuzzle: KPuzzle) {}\n\n and(pieceSets: PieceSet[]): PieceSet {\n const newPieceSet = new PieceAnnotation<boolean>(this.kpuzzle, false);\n for (const [orbitName, orbitDef] of Object.entries(\n this.kpuzzle.definition.orbits,\n )) {\n pieceLoop: for (let i = 0; i < orbitDef.numPieces; i++) {\n newPieceSet.stickerings.get(orbitName)![i] = true;\n for (const pieceSet of pieceSets) {\n if (!pieceSet.stickerings.get(orbitName)![i]) {\n newPieceSet.stickerings.get(orbitName)![i] = false;\n continue pieceLoop;\n }\n }\n }\n }\n return newPieceSet;\n }\n\n or(pieceSets: PieceSet[]): PieceSet {\n // TODO: unify impl with and?\n const newPieceSet = new PieceAnnotation<boolean>(this.kpuzzle, false);\n for (const [orbitName, orbitDef] of Object.entries(\n this.kpuzzle.definition.orbits,\n )) {\n pieceLoop: for (let i = 0; i < orbitDef.numPieces; i++) {\n newPieceSet.stickerings.get(orbitName)![i] = false;\n for (const pieceSet of pieceSets) {\n if (pieceSet.stickerings.get(orbitName)![i]) {\n newPieceSet.stickerings.get(orbitName)![i] = true;\n continue pieceLoop;\n }\n }\n }\n }\n return newPieceSet;\n }\n\n not(pieceSet: PieceSet): PieceSet {\n const newPieceSet = new PieceAnnotation<boolean>(this.kpuzzle, false);\n for (const [orbitName, orbitDef] of Object.entries(\n this.kpuzzle.definition.orbits,\n )) {\n for (let i = 0; i < orbitDef.numPieces; i++) {\n newPieceSet.stickerings.get(orbitName)![i] =\n !pieceSet.stickerings.get(orbitName)![i];\n }\n }\n return newPieceSet;\n }\n\n all(): PieceSet {\n return this.and(this.moves([])); // TODO: are the degenerate cases for and/or the wrong way around\n }\n\n move(moveSource: Move | string): PieceSet {\n const transformation = this.kpuzzle.moveToTransformation(moveSource);\n const newPieceSet = new PieceAnnotation<boolean>(this.kpuzzle, false);\n for (const [orbitName, orbitDef] of Object.entries(\n this.kpuzzle.definition.orbits,\n )) {\n for (let i = 0; i < orbitDef.numPieces; i++) {\n if (\n transformation.transformationData[orbitName].permutation[i] !== i ||\n transformation.transformationData[orbitName].orientation[i] !== 0\n ) {\n newPieceSet.stickerings.get(orbitName)![i] = true;\n }\n }\n }\n return newPieceSet;\n }\n\n moves(moveSources: (Move | string)[]): PieceSet[] {\n return moveSources.map((moveSource) => this.move(moveSource));\n }\n\n // orbits(orbitNames: string[]): PieceSet {\n // const pieceSet = new PieceAnnotation<boolean>(this.def, false);\n // for (const orbitName of orbitNames) {\n // pieceSet.stickerings.get(orbitName)!.fill(true);\n // }\n // return pieceSet;\n // }\n\n // trueCounts(pieceSet: PieceSet): Record<string, number> {\n // const counts: Record<string, number> = {};\n // for (const [orbitName, orbitDef] of Object.entries(this.def.orbits)) {\n // let count = 0;\n // for (let i = 0; i < orbitDef.numPieces; i++) {\n // if (pieceSet.stickerings.get(orbitName)![i]) {\n // count++;\n // }\n // }\n // counts[orbitName] = count;\n // }\n // return counts;\n // }\n}\n", "import type { TwistyPlayer } from \"../../twisty\";\nimport {\n PieceStickering,\n PuzzleStickering,\n StickeringManager,\n} from \"./appearance\";\n\ntype Stickerer = (\n puzzleStickering: PuzzleStickering,\n m: StickeringManager,\n) => void;\n\nlet globalCustomStickerer: Stickerer = () => {};\n\nfunction setGlobalCustomStickerer(stickerer: Stickerer): void {\n (async () => {\n globalCustomStickerer = stickerer;\n\n const players: TwistyPlayer[] = Array.from(\n document.body.querySelectorAll(\"twisty-player\"),\n );\n console.log(`Setting the custom stickering for ${players.length} players!`);\n const successPromises = [];\n for (const player of players) {\n successPromises.push(\n (async () => {\n const stickering = await player.experimentalModel.stickering.get();\n player.experimentalStickering =\n stickering === \"experimental-global-custom-1\"\n ? \"experimental-global-custom-2\"\n : \"experimental-global-custom-1\";\n })(),\n );\n }\n await Promise.all(successPromises);\n console.log(\"Success!\");\n })();\n}\n\nexport function useGlobalCustomStickerer(\n puzzleStickering: PuzzleStickering,\n m: StickeringManager,\n): void {\n globalCustomStickerer(puzzleStickering, m);\n}\n\nif (\n globalThis.location &&\n new URL(location.href).searchParams.get(\"global-custom-stickerer\") === \"true\"\n) {\n (window as any).setGlobalCustomStickerer = setGlobalCustomStickerer;\n (window as any).PieceStickering = PieceStickering;\n console.log(\n \"Global custom stickerer enabled! (using: global-custom-stickerer=true)\",\n );\n console.log(\n \"Look here for inspiration:\",\n \"https://github.com/cubing/cubing.js/blob/81b5cab3e27d8defb39dd1e0a10bc9e8ba894d26/src/cubing/puzzles/stickerings/cube-stickerings.ts#L67\",\n );\n}\n", "import type { ExperimentalStickering } from \"../../twisty\";\nimport type { PuzzleLoader } from \"../PuzzleLoader\";\nimport {\n PuzzleAppearance,\n PuzzleStickering,\n StickeringManager,\n PieceSet,\n PieceStickering,\n} from \"./appearance\";\nimport { useGlobalCustomStickerer } from \"./global-custom-stickering-hack\";\n\n// TODO: cache calculations?\nexport async function cubeAppearance(\n puzzleLoader: PuzzleLoader,\n stickering: ExperimentalStickering,\n): Promise<PuzzleAppearance> {\n const kpuzzle = await puzzleLoader.kpuzzle();\n const puzzleStickering = new PuzzleStickering(kpuzzle);\n const m = new StickeringManager(kpuzzle);\n\n const LL = (): PieceSet => m.move(\"U\");\n const orUD = (): PieceSet => m.or(m.moves([\"U\", \"D\"]));\n const E = (): PieceSet => m.not(orUD());\n const orLR = (): PieceSet => m.or(m.moves([\"L\", \"R\"]));\n const M = (): PieceSet => m.not(orLR());\n const orFB = (): PieceSet => m.or(m.moves([\"F\", \"B\"]));\n const S = (): PieceSet => m.not(orFB());\n\n const F2L = (): PieceSet => m.not(LL());\n\n const centerU = (): PieceSet => m.and([LL(), M(), S()]);\n\n const edgeFR = (): PieceSet =>\n m.and([m.and(m.moves([\"F\", \"R\"])), m.not(orUD())]);\n const cornerDFR = (): PieceSet => m.and(m.moves([\"D\", \"R\", \"F\"]));\n const slotFR = (): PieceSet => m.or([cornerDFR(), edgeFR()]);\n\n const CENTERS = (): PieceSet =>\n m.or([m.and([M(), E()]), m.and([M(), S()]), m.and([E(), S()])]);\n const EDGES = (): PieceSet =>\n m.or([\n m.and([M(), orUD(), orFB()]),\n m.and([E(), orLR(), orFB()]),\n m.and([S(), orUD(), orLR()]),\n ]);\n const CORNERS = (): PieceSet => m.not(m.or([CENTERS(), EDGES()]));\n const L6E = (): PieceSet => m.or([M(), m.and([LL(), EDGES()])]);\n\n function dimF2L(): void {\n puzzleStickering.set(F2L(), PieceStickering.Dim);\n }\n\n function setPLL(): void {\n puzzleStickering.set(LL(), PieceStickering.PermuteNonPrimary);\n puzzleStickering.set(centerU(), PieceStickering.Dim); // TODO: why is this needed?\n }\n\n function setOLL(): void {\n puzzleStickering.set(LL(), PieceStickering.IgnoreNonPrimary);\n puzzleStickering.set(centerU(), PieceStickering.Regular); // TODO: why is this needed?\n }\n\n function dimOLL(): void {\n puzzleStickering.set(LL(), PieceStickering.Ignoriented);\n puzzleStickering.set(centerU(), PieceStickering.Dim); // TODO: why is this needed?\n }\n\n switch (stickering) {\n case \"full\":\n break;\n case \"PLL\":\n dimF2L();\n setPLL();\n break;\n case \"CLS\":\n dimF2L();\n puzzleStickering.set(\n m.and(m.moves([\"D\", \"R\", \"F\"])),\n PieceStickering.Regular,\n );\n puzzleStickering.set(LL(), PieceStickering.Ignoriented);\n puzzleStickering.set(\n m.and([LL(), CORNERS()]),\n PieceStickering.IgnoreNonPrimary,\n );\n break;\n case \"OLL\":\n dimF2L();\n setOLL();\n break;\n case \"COLL\":\n dimF2L();\n setPLL();\n puzzleStickering.set(m.and([LL(), CORNERS()]), PieceStickering.Regular);\n break;\n case \"OCLL\":\n dimF2L();\n dimOLL();\n puzzleStickering.set(\n m.and([LL(), CORNERS()]),\n PieceStickering.IgnoreNonPrimary,\n );\n break;\n case \"CLL\":\n dimF2L();\n puzzleStickering.set(\n m.not(m.and([CORNERS(), LL()])),\n PieceStickering.Dim,\n );\n break;\n case \"ELL\":\n dimF2L();\n puzzleStickering.set(LL(), PieceStickering.Dim);\n puzzleStickering.set(m.and([LL(), EDGES()]), PieceStickering.Regular);\n break;\n case \"ELS\":\n dimF2L();\n setOLL();\n puzzleStickering.set(m.and([LL(), CORNERS()]), PieceStickering.Ignored);\n puzzleStickering.set(edgeFR(), PieceStickering.Regular);\n puzzleStickering.set(cornerDFR(), PieceStickering.Ignored);\n break;\n case \"LL\":\n dimF2L();\n break;\n case \"F2L\":\n puzzleStickering.set(LL(), PieceStickering.Ignored);\n break;\n case \"ZBLL\":\n dimF2L();\n puzzleStickering.set(LL(), PieceStickering.PermuteNonPrimary);\n puzzleStickering.set(centerU(), PieceStickering.Dim); // why is this needed?\n puzzleStickering.set(m.and([LL(), CORNERS()]), PieceStickering.Regular);\n break;\n case \"ZBLS\":\n dimF2L();\n puzzleStickering.set(slotFR(), PieceStickering.Regular);\n setOLL();\n puzzleStickering.set(m.and([LL(), CORNERS()]), PieceStickering.Ignored);\n break;\n case \"WVLS\":\n // fallthrough\n case \"VLS\":\n dimF2L();\n puzzleStickering.set(slotFR(), PieceStickering.Regular);\n setOLL();\n break;\n case \"LS\":\n dimF2L();\n puzzleStickering.set(slotFR(), PieceStickering.Regular);\n puzzleStickering.set(LL(), PieceStickering.Ignored);\n puzzleStickering.set(centerU(), PieceStickering.Dim);\n break;\n case \"EO\":\n puzzleStickering.set(CORNERS(), PieceStickering.Ignored);\n puzzleStickering.set(\n EDGES(),\n PieceStickering.OrientationWithoutPermutation,\n );\n break;\n case \"EOline\":\n puzzleStickering.set(CORNERS(), PieceStickering.Ignored);\n puzzleStickering.set(\n EDGES(),\n PieceStickering.OrientationWithoutPermutation,\n );\n puzzleStickering.set(m.and(m.moves([\"D\", \"M\"])), PieceStickering.Regular);\n break;\n case \"EOcross\":\n puzzleStickering.set(\n EDGES(),\n PieceStickering.OrientationWithoutPermutation,\n );\n puzzleStickering.set(m.move(\"D\"), PieceStickering.Regular);\n puzzleStickering.set(CORNERS(), PieceStickering.Ignored);\n break;\n case \"CMLL\":\n puzzleStickering.set(F2L(), PieceStickering.Dim);\n puzzleStickering.set(L6E(), PieceStickering.Ignored);\n puzzleStickering.set(m.and([LL(), CORNERS()]), PieceStickering.Regular);\n break;\n case \"L6E\":\n puzzleStickering.set(m.not(L6E()), PieceStickering.Dim);\n break;\n case \"L6EO\":\n puzzleStickering.set(m.not(L6E()), PieceStickering.Dim);\n puzzleStickering.set(\n L6E(),\n PieceStickering.OrientationWithoutPermutation,\n );\n puzzleStickering.set(\n m.and([CENTERS(), orUD()]),\n PieceStickering.OrientationStickers,\n ); // TODO: why is this needed?\n break;\n case \"Daisy\":\n puzzleStickering.set(m.all(), PieceStickering.Ignored);\n puzzleStickering.set(CENTERS(), PieceStickering.Dim);\n puzzleStickering.set(\n m.and([m.move(\"D\"), CENTERS()]),\n PieceStickering.Regular,\n );\n puzzleStickering.set(\n m.and([m.move(\"U\"), EDGES()]),\n PieceStickering.IgnoreNonPrimary,\n );\n break;\n case \"Cross\":\n puzzleStickering.set(m.all(), PieceStickering.Ignored);\n puzzleStickering.set(CENTERS(), PieceStickering.Dim);\n puzzleStickering.set(\n m.and([m.move(\"D\"), CENTERS()]),\n PieceStickering.Regular,\n );\n puzzleStickering.set(\n m.and([m.move(\"D\"), EDGES()]),\n PieceStickering.Regular,\n );\n break;\n case \"2x2x2\":\n puzzleStickering.set(\n m.or(m.moves([\"U\", \"F\", \"R\"])),\n PieceStickering.Ignored,\n );\n puzzleStickering.set(\n m.and([m.or(m.moves([\"U\", \"F\", \"R\"])), CENTERS()]),\n PieceStickering.Dim,\n );\n break;\n case \"2x2x3\":\n puzzleStickering.set(m.all(), PieceStickering.Dim);\n puzzleStickering.set(\n m.or(m.moves([\"U\", \"F\", \"R\"])),\n PieceStickering.Ignored,\n );\n puzzleStickering.set(\n m.and([m.or(m.moves([\"U\", \"F\", \"R\"])), CENTERS()]),\n PieceStickering.Dim,\n );\n puzzleStickering.set(\n m.and([m.move(\"F\"), m.not(m.or(m.moves([\"U\", \"R\"])))]),\n PieceStickering.Regular,\n );\n break;\n case \"Void Cube\":\n puzzleStickering.set(CENTERS(), PieceStickering.Invisible);\n break;\n case \"picture\":\n // fallthrough\n case \"invisible\":\n puzzleStickering.set(m.all(), PieceStickering.Invisible);\n break;\n case \"centers-only\":\n puzzleStickering.set(m.not(CENTERS()), PieceStickering.Ignored);\n break;\n case \"experimental-global-custom-1\":\n // fallthrough\n case \"experimental-global-custom-2\":\n useGlobalCustomStickerer(puzzleStickering, m);\n break;\n default:\n console.warn(\n `Unsupported stickering for ${puzzleLoader.id}: ${stickering}. Setting all pieces to dim.`,\n );\n puzzleStickering.set(m.and(m.moves([])), PieceStickering.Dim);\n }\n return puzzleStickering.toAppearance();\n}\n\nexport async function cubeStickerings(): Promise<ExperimentalStickering[]> {\n return [\n \"full\",\n \"PLL\",\n \"CLS\",\n \"OLL\",\n \"COLL\",\n \"OCLL\",\n \"ELL\",\n \"ELS\",\n \"LL\",\n \"F2L\",\n \"ZBLL\",\n \"ZBLS\",\n \"WVLS\",\n \"VLS\",\n \"LS\",\n \"EO\",\n \"EOline\",\n \"EOcross\",\n \"CMLL\",\n \"L6E\",\n \"L6EO\",\n \"Daisy\",\n \"Cross\",\n \"2x2x2\",\n \"2x2x3\",\n \"Void Cube\",\n \"picture\",\n \"invisible\",\n \"centers-only\",\n ];\n}\n", "export function getCached<T>(getValue: () => Promise<T>): () => Promise<T> {\n let cachedPromise: Promise<T> | null = null;\n return (): Promise<T> => {\n return (cachedPromise ??= getValue());\n };\n}\n", "import { KPuzzle, KPuzzleDefinition } from \"../../kpuzzle\";\nimport type { PuzzleGeometry } from \"../../puzzle-geometry\";\nimport type { ExperimentalStickering } from \"../../twisty\";\nimport type { PuzzleLoader } from \"../PuzzleLoader\";\nimport type { PuzzleAppearance } from \"../stickerings/appearance\";\nimport {\n cubeAppearance,\n cubeStickerings,\n} from \"../stickerings/cube-stickerings\";\nimport { getCached } from \"./lazy-cached\";\n\n// TODO: modify this to handle TwistyPlayer options\nexport async function asyncGetPuzzleGeometry(\n puzzleName: string,\n): Promise<PuzzleGeometry> {\n const puzzleGeometry = await import(\"../../puzzle-geometry\");\n return puzzleGeometry.getPuzzleGeometryByName(puzzleName, {\n allMoves: true,\n orientCenters: true,\n addRotations: true,\n });\n}\n\n// TODO: can we cache the puzzleGeometry to avoid duplicate calls, without\n// wasting memory? Maybe just save the latest one for successive calls about the\n// same puzzle?\nexport async function asyncGetKPuzzle(\n pgPromise: Promise<PuzzleGeometry>,\n puzzleName: string,\n): Promise<KPuzzle> {\n const pg = await pgPromise;\n const kpuzzleDefinition: KPuzzleDefinition = pg.getKPuzzleDefinition(true);\n kpuzzleDefinition.name = puzzleName;\n const puzzleGeometry = await import(\"../../puzzle-geometry\");\n const pgNotation = new puzzleGeometry.ExperimentalPGNotation(\n pg,\n pg.getOrbitsDef(true),\n );\n return new KPuzzle(kpuzzleDefinition, {\n experimentalPGNotation: pgNotation,\n });\n}\n\nexport function asyncLazyKPuzzleGetter(\n pgPromise: Promise<PuzzleGeometry>,\n puzzleName: string,\n): () => Promise<KPuzzle> {\n return getCached(() => asyncGetKPuzzle(pgPromise, puzzleName));\n}\n\ntype PuzzleLoaderConstructorArgs = {\n id: string;\n fullName: string;\n inventedBy?: string[];\n inventionYear?: number;\n};\n\nexport class PGPuzzleLoader implements PuzzleLoader {\n id: string;\n fullName: string;\n inventedBy?: string[];\n inventionYear?: number;\n constructor(info: PuzzleLoaderConstructorArgs) {\n this.id = info.id;\n this.fullName = info.fullName;\n this.inventedBy = info.inventedBy;\n this.inventionYear = info.inventionYear;\n }\n\n #cachedPG: Promise<PuzzleGeometry> | undefined;\n pg(): Promise<PuzzleGeometry> {\n const id = this.id === \"fto\" ? \"FTO\" : this.id;\n return (this.#cachedPG ??= asyncGetPuzzleGeometry(id));\n }\n\n #cachedKPuzzle: Promise<KPuzzle> | undefined;\n kpuzzle(): Promise<KPuzzle> {\n return (this.#cachedKPuzzle ??= asyncGetKPuzzle(this.pg(), this.id));\n }\n\n #cachedSVG: Promise<string> | undefined;\n svg(): Promise<string> {\n return (this.#cachedSVG ??= (async () =>\n (await this.pg()).generatesvg())());\n }\n}\n\nexport class CubePGPuzzleLoader extends PGPuzzleLoader {\n appearance(stickering: ExperimentalStickering): Promise<PuzzleAppearance> {\n return cubeAppearance(this, stickering);\n }\n stickerings = cubeStickerings;\n}\n", "import { KPuzzle } from \"../../../kpuzzle\";\nimport type { ExperimentalStickering } from \"../../../twisty\";\nimport { asyncGetPuzzleGeometry } from \"../../async/async-pg3d\";\nimport { getCached } from \"../../async/lazy-cached\";\nimport type { PuzzleLoader } from \"../../PuzzleLoader\";\nimport type { PuzzleAppearance } from \"../../stickerings/appearance\";\nimport {\n cubeAppearance,\n cubeStickerings,\n} from \"../../stickerings/cube-stickerings\";\n\nexport const cube2x2x2: PuzzleLoader = {\n id: \"2x2x2\",\n fullName: \"2\u00D72\u00D72 Cube\",\n kpuzzle: getCached(\n async () =>\n new KPuzzle(\n (await import(\"./2x2x2.kpuzzle.json\")).cube2x2x2KPuzzleDefinition,\n ),\n ),\n svg: async () => {\n return (await import(\"./2x2x2.kpuzzle.svg\")).default;\n },\n pg: getCached(async () => {\n return asyncGetPuzzleGeometry(\"2x2x2\");\n }),\n appearance: (stickering: ExperimentalStickering): Promise<PuzzleAppearance> =>\n cubeAppearance(cube2x2x2, stickering),\n stickerings: cubeStickerings,\n};\n", "// Include 3x3x3 in the main bundle for better performance.\nimport { experimental3x3x3KPuzzle } from \"../../../kpuzzle\";\nimport type { ExperimentalStickering } from \"../../../twisty\";\nimport { asyncGetPuzzleGeometry } from \"../../async/async-pg3d\";\nimport { getCached } from \"../../async/lazy-cached\";\nimport type { PuzzleLoader } from \"../../PuzzleLoader\";\nimport type { PuzzleAppearance } from \"../../stickerings/appearance\";\nimport {\n cubeAppearance,\n cubeStickerings,\n} from \"../../stickerings/cube-stickerings\";\n\nexport const cube3x3x3: PuzzleLoader = {\n id: \"3x3x3\",\n fullName: \"3\u00D73\u00D73 Cube\",\n inventedBy: [\"Ern\u0151 Rubik\"],\n inventionYear: 1974, // https://en.wikipedia.org/wiki/Rubik%27s_Cube#Conception_and_development\n kpuzzle: getCached(async () => {\n return experimental3x3x3KPuzzle;\n }),\n svg: getCached(async () => {\n return (await import(\"./3x3x3.kpuzzle.svg\")).default;\n }),\n llSVG: getCached(async () => {\n return (await import(\"./3x3x3-ll.kpuzzle.svg\")).default;\n }),\n pg: getCached(async () => {\n return asyncGetPuzzleGeometry(\"3x3x3\");\n }),\n appearance: (stickering: ExperimentalStickering): Promise<PuzzleAppearance> =>\n cubeAppearance(cube3x3x3, stickering),\n stickerings: cubeStickerings,\n};\n", "import { KPuzzle } from \"../../../kpuzzle\";\nimport { getCached } from \"../../async/lazy-cached\";\nimport type { PuzzleLoader } from \"../../PuzzleLoader\";\n\nexport const clock: PuzzleLoader = {\n id: \"clock\",\n fullName: \"Clock\",\n inventedBy: [\"Christopher C. Wiggs\", \"Christopher J. Taylor\"],\n inventionYear: 1988, // Patent application year: https://www.jaapsch.net/puzzles/patents/us4869506.pdf\n kpuzzle: getCached(\n async () =>\n new KPuzzle(\n (await import(\"./clock.kpuzzle.json\")).clockKPuzzleDefinition,\n ),\n ),\n svg: getCached(async () => {\n return (await import(\"./clock.kpuzzle.svg\")).default;\n }),\n};\n", "import type { ExperimentalStickering } from \"../../twisty\";\nimport type { PuzzleLoader } from \"../PuzzleLoader\";\nimport {\n PuzzleAppearance,\n PuzzleStickering,\n StickeringManager,\n PieceSet,\n PieceStickering,\n} from \"./appearance\";\n\nexport async function ftoStickering(\n puzzleLoader: PuzzleLoader,\n stickering: ExperimentalStickering,\n): Promise<PuzzleAppearance> {\n const kpuzzle = await puzzleLoader.kpuzzle();\n const puzzleStickering = new PuzzleStickering(kpuzzle);\n const m = new StickeringManager(kpuzzle);\n\n const experimentalFTO_FC = (): PieceSet =>\n m.and([m.move(\"U\"), m.not(m.or(m.moves([\"F\", \"BL\", \"BR\"])))]);\n const experimentalFTO_F2T = (): PieceSet =>\n m.and([m.move(\"U\"), m.not(m.move(\"F\"))]);\n const experimentalFTO_SC = (): PieceSet =>\n m.or([\n experimentalFTO_F2T(),\n m.and([m.move(\"F\"), m.not(m.or(m.moves([\"U\", \"BL\", \"BR\"])))]),\n ]);\n const experimentalFTO_L2C = (): PieceSet =>\n m.not(\n m.or([\n m.and([m.move(\"U\"), m.move(\"F\")]),\n m.and([m.move(\"F\"), m.move(\"BL\")]),\n m.and([m.move(\"F\"), m.move(\"BR\")]),\n m.and([m.move(\"BL\"), m.move(\"BR\")]),\n ]),\n );\n const experimentalFTO_LBT = (): PieceSet =>\n m.not(\n m.or([\n m.and([m.move(\"F\"), m.move(\"BL\")]),\n m.and([m.move(\"F\"), m.move(\"BR\")]),\n m.and([m.move(\"BL\"), m.move(\"BR\")]),\n ]),\n );\n\n switch (stickering) {\n case \"full\":\n break;\n case \"experimental-fto-fc\":\n puzzleStickering.set(\n m.not(experimentalFTO_FC()),\n PieceStickering.Ignored,\n );\n break;\n case \"experimental-fto-f2t\":\n puzzleStickering.set(\n m.not(experimentalFTO_F2T()),\n PieceStickering.Ignored,\n );\n puzzleStickering.set(experimentalFTO_FC(), PieceStickering.Dim);\n break;\n case \"experimental-fto-sc\":\n puzzleStickering.set(\n m.not(experimentalFTO_SC()),\n PieceStickering.Ignored,\n );\n puzzleStickering.set(experimentalFTO_F2T(), PieceStickering.Dim);\n break;\n case \"experimental-fto-l2c\":\n puzzleStickering.set(\n m.not(experimentalFTO_L2C()),\n PieceStickering.Ignored,\n );\n puzzleStickering.set(experimentalFTO_SC(), PieceStickering.Dim);\n break;\n case \"experimental-fto-lbt\":\n puzzleStickering.set(\n m.not(experimentalFTO_LBT()),\n PieceStickering.Ignored,\n );\n puzzleStickering.set(experimentalFTO_L2C(), PieceStickering.Dim);\n break;\n case \"experimental-fto-l3t\":\n puzzleStickering.set(experimentalFTO_LBT(), PieceStickering.Dim);\n break;\n default:\n console.warn(\n `Unsupported stickering for ${puzzleLoader.id}: ${stickering}. Setting all pieces to dim.`,\n );\n puzzleStickering.set(m.and(m.moves([])), PieceStickering.Dim);\n }\n return puzzleStickering.toAppearance();\n}\n\nexport async function ftoStickerings(): Promise<ExperimentalStickering[]> {\n return [\n \"full\",\n \"experimental-fto-fc\",\n \"experimental-fto-f2t\",\n \"experimental-fto-sc\",\n \"experimental-fto-l2c\",\n \"experimental-fto-lbt\",\n \"experimental-fto-l3t\",\n ];\n}\n", "import type { ExperimentalStickering } from \"../../../twisty\";\nimport { PGPuzzleLoader } from \"../../async/async-pg3d\";\nimport type { PuzzleAppearance } from \"../../stickerings/appearance\";\nimport {\n ftoStickering,\n ftoStickerings,\n} from \"../../stickerings/fto-stickerings\";\n\nclass FTOPuzzleLoader extends PGPuzzleLoader {\n constructor() {\n super({\n id: \"fto\",\n fullName: \"Face-Turning Octahedron\",\n inventedBy: [\"Karl Rohrbach\", \"David Pitcher\"], // http://twistypuzzles.com/cgi-bin/puzzle.cgi?pkey=1663\n inventionYear: 1983, // http://twistypuzzles.com/cgi-bin/puzzle.cgi?pkey=1663\n });\n }\n appearance(stickering: ExperimentalStickering): Promise<PuzzleAppearance> {\n return ftoStickering(this, stickering);\n }\n stickerings = ftoStickerings;\n}\n\nexport const fto = new FTOPuzzleLoader();\n", "import type { ExperimentalStickering } from \"../../twisty\";\nimport type { PuzzleLoader } from \"../PuzzleLoader\";\nimport type { PuzzleAppearance } from \"./appearance\";\nimport { cubeAppearance } from \"./cube-stickerings\";\n\n// TODO: cache calculations?\nexport async function megaminxAppearance(\n puzzleLoader: PuzzleLoader,\n stickering: ExperimentalStickering,\n): Promise<PuzzleAppearance> {\n switch (stickering) {\n case \"full\":\n case \"F2L\":\n case \"LL\":\n return cubeAppearance(puzzleLoader, stickering);\n default:\n console.warn(\n `Unsupported stickering for ${puzzleLoader.id}: ${stickering}. Setting all pieces to dim.`,\n );\n }\n return cubeAppearance(puzzleLoader, \"full\");\n}\n\nexport async function megaminxStickerings(): Promise<ExperimentalStickering[]> {\n return [\"full\", \"F2L\", \"LL\"];\n}\n", "import type { ExperimentalStickering } from \"../../../twisty\";\nimport { PGPuzzleLoader } from \"../../async/async-pg3d\";\nimport type { PuzzleAppearance } from \"../../stickerings/appearance\";\nimport {\n megaminxAppearance,\n megaminxStickerings,\n} from \"../../stickerings/megaminx-stickerings\";\n\nclass MegaminxPuzzleLoader extends PGPuzzleLoader {\n constructor() {\n super({\n id: \"megaminx\",\n fullName: \"Megaminx\",\n // Too many simultaneous inventors to name.\n inventionYear: 1981, // Earliest date from https://www.jaapsch.net/puzzles/megaminx.htm\n });\n }\n appearance(stickering: ExperimentalStickering): Promise<PuzzleAppearance> {\n return megaminxAppearance(this, stickering);\n }\n stickerings = megaminxStickerings;\n}\n\nexport const megaminx = new MegaminxPuzzleLoader();\n", "import { PGPuzzleLoader } from \"../../async/async-pg3d\";\nimport { getCached } from \"../../async/lazy-cached\";\n\nclass PyraminxPuzzleLoader extends PGPuzzleLoader {\n constructor() {\n super({\n id: \"pyraminx\",\n fullName: \"Pyraminx\",\n inventedBy: [\"Uwe Meffert\"],\n });\n }\n svg = getCached(async () => {\n return (await import(\"./pyraminx.kpuzzle.svg\")).default;\n });\n}\n\nexport const pyraminx = new PyraminxPuzzleLoader();\n", "import { KPuzzle } from \"../../../kpuzzle\";\nimport { getCached } from \"../../async/lazy-cached\";\nimport type { PuzzleLoader } from \"../../PuzzleLoader\";\n\nexport const square1: PuzzleLoader = {\n id: \"square1\",\n fullName: \"Square-1\",\n inventedBy: [\"Karel Hr\u0161el\", \"Vojtech Kopsk\u00FD\"],\n inventionYear: 1990, // Czech patent application year: http://spisy.upv.cz/Patents/FullDocuments/277/277266.pdf\n kpuzzle: getCached(\n async () =>\n new KPuzzle(\n (\n await import(\"./sq1-hyperorbit.kpuzzle.json\")\n ).sq1HyperOrbitKPuzzleDefinition,\n ),\n ),\n svg: getCached(async () => {\n return (await import(\"./sq1-hyperorbit.kpuzzle.svg\")).default;\n }),\n};\n", "export { customPGPuzzleLoader as experimentalCustomPGPuzzleLoader } from \"./customPGPuzzleLoader\";\nexport { experimental3x3x3KPuzzle } from \"../kpuzzle\";\n\nexport { cubeAppearance as experimentalCubeAppearance } from \"./stickerings/cube-stickerings\";\n\nimport type { PuzzleID } from \"../twisty\";\nimport { CubePGPuzzleLoader, PGPuzzleLoader } from \"./async/async-pg3d\";\nimport { cube2x2x2 } from \"./implementations/2x2x2\";\nimport { cube3x3x3 } from \"./implementations/3x3x3\";\nimport { clock } from \"./implementations/clock\";\nimport { fto } from \"./implementations/fto\";\nimport { megaminx } from \"./implementations/megaminx\";\nimport { pyraminx } from \"./implementations/pyraminx\";\nimport { square1 } from \"./implementations/square1\";\nimport type { PuzzleLoader } from \"./PuzzleLoader\";\n\nexport type { PuzzleLoader };\n\nexport const puzzles: Record<string, PuzzleLoader> = {\n /******** Start of WCA Puzzles *******/\n \"3x3x3\": cube3x3x3,\n \"2x2x2\": cube2x2x2,\n \"4x4x4\": new CubePGPuzzleLoader({ id: \"4x4x4\", fullName: \"4\u00D74\u00D74 Cube\" }),\n \"5x5x5\": new CubePGPuzzleLoader({ id: \"5x5x5\", fullName: \"5\u00D75\u00D75 Cube\" }),\n \"6x6x6\": new CubePGPuzzleLoader({ id: \"6x6x6\", fullName: \"6\u00D76\u00D76 Cube\" }),\n \"7x7x7\": new CubePGPuzzleLoader({ id: \"7x7x7\", fullName: \"7\u00D77\u00D77 Cube\" }),\n \"40x40x40\": new CubePGPuzzleLoader({\n id: \"40x40x40\",\n fullName: \"40\u00D740\u00D740 Cube\",\n }),\n // 3x3x3 Blindfolded\n // 3x3x3 Fewest Moves\n // 3x3x3 One-Handed\n clock,\n \"megaminx\": megaminx,\n pyraminx,\n \"skewb\": new PGPuzzleLoader({\n id: \"skewb\",\n fullName: \"Skewb\",\n inventedBy: [\"Tony Durham\"], // https://www.jaapsch.net/puzzles/skewb.htm\n // inventionYear: 1982, // 1982 is actually the year of Hofstadter's column.\n }),\n square1,\n // 4x4x4 Blindfolded\n // 5x5x5 Blindfolded\n /******** End of WCA puzzles ********/\n \"fto\": fto,\n \"gigaminx\": new PGPuzzleLoader({\n id: \"gigaminx\",\n fullName: \"Gigaminx\",\n inventedBy: [\"Tyler Fox\"],\n inventionYear: 2006, // Earliest date from https://www.twistypuzzles.com/cgi-bin/puzzle.cgi?pkey=1475\n }),\n \"master_tetraminx\": new PGPuzzleLoader({\n id: \"master tetraminx\",\n fullName: \"Master Tetraminx\",\n inventedBy: [\"Katsuhiko Okamoto\"], // Using master pyraminx: https://twistypuzzles.com/cgi-bin/puzzle.cgi?pkey=1352\n inventionYear: 2002, // Using master pyraminx: https://twistypuzzles.com/cgi-bin/puzzle.cgi?pkey=1352\n }),\n};\n\nexport { cube2x2x2, cube3x3x3 };\n\nexport { getFaceletAppearance as experimentalGetFaceletAppearance } from \"./stickerings/appearance\";\nexport type {\n FaceletMeshAppearance as ExperimentalFaceletMeshAppearance,\n PuzzleAppearance as ExperimentalPuzzleAppearance,\n} from \"./stickerings/appearance\";\n\ninterface WCAEventInfo {\n puzzleID: PuzzleID;\n eventName: string;\n}\n\nconst wcaEvents: Record<string, WCAEventInfo> = {\n \"333\": { puzzleID: \"3x3x3\", eventName: \"3x3x3 Cube\" },\n \"222\": { puzzleID: \"2x2x2\", eventName: \"2x2x2 Cube\" },\n \"444\": { puzzleID: \"4x4x4\", eventName: \"4x4x4 Cube\" },\n \"555\": { puzzleID: \"5x5x5\", eventName: \"5x5x5 Cube\" },\n \"666\": { puzzleID: \"6x6x6\", eventName: \"6x6x6 Cube\" },\n \"777\": { puzzleID: \"7x7x7\", eventName: \"7x7x7 Cube\" },\n \"333bf\": { puzzleID: \"3x3x3\", eventName: \"3x3x3 Blindfolded\" },\n \"333fm\": { puzzleID: \"3x3x3\", eventName: \"3x3x3 Fewest Moves\" },\n \"333oh\": { puzzleID: \"3x3x3\", eventName: \"3x3x3 One-Handed\" },\n \"clock\": { puzzleID: \"clock\", eventName: \"Clock\" },\n \"minx\": { puzzleID: \"megaminx\", eventName: \"Megaminx\" },\n \"pyram\": { puzzleID: \"pyraminx\", eventName: \"Pyraminx\" },\n \"skewb\": { puzzleID: \"skewb\", eventName: \"Skewb\" },\n \"sq1\": { puzzleID: \"square1\", eventName: \"Square-1\" },\n \"444bf\": { puzzleID: \"4x4x4\", eventName: \"4x4x4 Blindfolded\" },\n \"555bf\": { puzzleID: \"5x5x5\", eventName: \"5x5x5 Blindfolded\" },\n \"333mb\": { puzzleID: \"3x3x3\", eventName: \" 3x3x3 Multi-Blind\" },\n};\n\nexport function wcaEventInfo(event: string): WCAEventInfo | null {\n return wcaEvents[event] ?? null;\n}\n"],
5
+ "mappings": ";;;;;;;;;;;AAMA,0CACE,MACyB;AACzB,QAAM,iBAAiB,MAAM,OAAO;AACpC,SAAO,eAAe,wBAAwB,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zC,QAAQ,EAAE,UAAU,YAAY,WAAW;AAAA,EAC3C,SAAS,EAAE,UAAU,YAAY,WAAW;AAAA,EAC5C,SAAS,EAAE,UAAU,SAAS,WAAW;AAAA,EACzC,OAAO,EAAE,UAAU,WAAW,WAAW;AAAA,EACzC,SAAS,EAAE,UAAU,SAAS,WAAW;AAAA,EACzC,SAAS,EAAE,UAAU,SAAS,WAAW;AAAA,EACzC,SAAS,EAAE,UAAU,SAAS,WAAW;AAAA;AAGpC,sBAAsB,OAAoC;AAC/D,SAAO,UAAU,UAAU;AAAA;",
6
+ "names": []
7
+ }
@@ -3,10 +3,10 @@ import {
3
3
  } from "./chunk-37EHU3GZ.js";
4
4
  import {
5
5
  puzzles
6
- } from "./chunk-2IHGN4YF.js";
6
+ } from "./chunk-2CGRUO5X.js";
7
7
  import {
8
8
  KState
9
- } from "./chunk-Z36TNZT2.js";
9
+ } from "./chunk-B27E6KTE.js";
10
10
  import {
11
11
  Alg,
12
12
  AlgBuilder,
@@ -502,4 +502,4 @@ export {
502
502
  random333OrientedScramble,
503
503
  random333FewestMovesScramble
504
504
  };
505
- //# sourceMappingURL=chunk-NMODRU23.js.map
505
+ //# sourceMappingURL=chunk-2I3MTSRM.js.map
@@ -324,11 +324,15 @@ function repeatTransformationUncached(kpuzzle, transformationData, amount) {
324
324
  }
325
325
  var AlgToTransformationTraversal = class extends TraversalDownUp {
326
326
  traverseAlg(alg, kpuzzle) {
327
- let transformation = kpuzzle.identityTransformation();
327
+ let transformation = null;
328
328
  for (const unit of alg.units()) {
329
- transformation = transformation.applyTransformation(this.traverseUnit(unit, kpuzzle));
329
+ if (transformation) {
330
+ transformation = transformation.applyTransformation(this.traverseUnit(unit, kpuzzle));
331
+ } else {
332
+ transformation = this.traverseUnit(unit, kpuzzle);
333
+ }
330
334
  }
331
- return transformation;
335
+ return transformation ?? kpuzzle.identityTransformation();
332
336
  }
333
337
  traverseGrouping(grouping, kpuzzle) {
334
338
  const algTransformation = this.traverseAlg(grouping.alg, kpuzzle);
@@ -817,7 +821,8 @@ var experimental3x3x3KPuzzle = new KPuzzle(cube3x3x3KPuzzleDefinition);
817
821
 
818
822
  export {
819
823
  KState,
824
+ KTransformation,
820
825
  KPuzzle,
821
826
  experimental3x3x3KPuzzle
822
827
  };
823
- //# sourceMappingURL=chunk-Z36TNZT2.js.map
828
+ //# sourceMappingURL=chunk-B27E6KTE.js.map