cubing 0.22.0 → 0.24.0-pre2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -8
- package/alg/package.json +1 -3
- package/bluetooth/package.json +1 -3
- package/dist/esm/{2x2x2.kpuzzle.json-JOGUSQ4N.js → 2x2x2.kpuzzle.json-U5KOZCMU.js} +11 -11
- package/dist/esm/2x2x2.kpuzzle.json-U5KOZCMU.js.map +7 -0
- package/{src/cubing/search/inside/solve/puzzles/2x2x2.sgs.json.ts → dist/esm/2x2x2.sgs.json-UAYPCQVL.js} +21 -13
- package/dist/esm/2x2x2.sgs.json-UAYPCQVL.js.map +7 -0
- package/dist/esm/{3d-3WQVOHX5.js → 3d-NFF7OGTI.js} +4 -4
- package/dist/esm/{3d-3WQVOHX5.js.map → 3d-NFF7OGTI.js.map} +0 -0
- package/dist/esm/bluetooth/index.d.ts +1 -1
- package/dist/esm/bluetooth/index.js +46 -38
- package/dist/esm/bluetooth/index.js.map +3 -3
- package/dist/esm/chunk-27KJGD3S.js +84 -0
- package/dist/esm/chunk-27KJGD3S.js.map +7 -0
- package/dist/esm/chunk-37EHU3GZ.js +66 -0
- package/dist/esm/chunk-37EHU3GZ.js.map +7 -0
- package/dist/esm/chunk-7OPCF2OL.js +274 -0
- package/dist/esm/chunk-7OPCF2OL.js.map +7 -0
- package/dist/esm/chunk-BJIOROQC.js +18 -0
- package/dist/esm/chunk-BJIOROQC.js.map +7 -0
- package/dist/{bin/puzzle-geometry-bin.js → esm/chunk-J2U2GRS4.js} +104 -1488
- package/dist/esm/chunk-J2U2GRS4.js.map +7 -0
- package/dist/esm/chunk-KCRFOAR4.js +122 -0
- package/dist/esm/chunk-KCRFOAR4.js.map +7 -0
- package/{src/cubing/search/inside/solve/puzzles/pyraminx.sgs.json.ts → dist/esm/chunk-NPK6Z4AU.js} +22 -17
- package/dist/esm/chunk-NPK6Z4AU.js.map +7 -0
- package/dist/esm/chunk-NV5ESXTN.js +505 -0
- package/dist/esm/chunk-NV5ESXTN.js.map +7 -0
- package/dist/esm/{chunk-DLN5QS4V.js → chunk-REMJV2GO.js} +38 -51
- package/dist/esm/chunk-REMJV2GO.js.map +7 -0
- package/dist/esm/chunk-TB4D4E2W.js +226 -0
- package/dist/esm/chunk-TB4D4E2W.js.map +7 -0
- package/dist/esm/chunk-TNRZDNGH.js +822 -0
- package/dist/esm/chunk-TNRZDNGH.js.map +7 -0
- package/{src/cubing/search/inside/solve/puzzles/megaminx.sgs.json.ts → dist/esm/chunk-YN7E5RGM.js} +36 -24
- package/dist/esm/chunk-YN7E5RGM.js.map +7 -0
- package/dist/esm/{chunk-HXKINJ7U.js → chunk-ZLIK3DZT.js} +79 -57
- package/dist/esm/chunk-ZLIK3DZT.js.map +7 -0
- package/dist/esm/{clock.kpuzzle.json-EKWRMHJM.js → clock.kpuzzle.json-J3YBOI3G.js} +7 -45
- package/dist/esm/clock.kpuzzle.json-J3YBOI3G.js.map +7 -0
- package/dist/esm/entry-PHAJAE4E.js +536 -0
- package/dist/esm/entry-PHAJAE4E.js.map +7 -0
- package/dist/esm/esm-test-worker.js +3 -14
- package/dist/esm/esm-test-worker.js.map +3 -3
- package/dist/esm/fto.sgs.json-VO6HST2V.js +641 -0
- package/dist/esm/fto.sgs.json-VO6HST2V.js.map +7 -0
- package/{src/cubing/search/inside/solve/vendor/min2phase/gwt.js → dist/esm/gwt-B7CBESZR.js} +350 -1380
- package/dist/esm/gwt-B7CBESZR.js.map +7 -0
- package/dist/esm/kpuzzle/index.js +5 -35
- package/dist/esm/megaminx.sgs.json-R3MK4HXM.js +16 -0
- package/dist/esm/megaminx.sgs.json-R3MK4HXM.js.map +7 -0
- package/dist/esm/module-entry-UYTOFYBC.js +18 -0
- package/dist/esm/module-entry-UYTOFYBC.js.map +7 -0
- package/dist/esm/{node-BSAQKO3G.js → node-SP4L2AKI.js} +2 -2
- package/dist/esm/{node-BSAQKO3G.js.map → node-SP4L2AKI.js.map} +1 -1
- package/dist/esm/{node-WEHVBEKP.js → node-W3AD4HBK.js} +3 -2
- package/dist/esm/node-W3AD4HBK.js.map +7 -0
- package/dist/esm/protocol/index.js +2 -1
- package/dist/esm/puzzle-geometry/index.js +15 -4053
- package/dist/esm/puzzle-geometry/index.js.map +3 -3
- package/dist/esm/puzzles/index.js +4 -4
- package/dist/esm/pyraminx.sgs.json-R3J3JHMV.js +14 -0
- package/dist/esm/pyraminx.sgs.json-R3J3JHMV.js.map +7 -0
- package/dist/esm/scramble/index.js +5 -3
- package/{src/cubing/search/inside/solve/vendor/cstimer/src/js/scramble/scramble_444.ts → dist/esm/scramble_444-F3YANDPO.js} +367 -586
- package/dist/esm/scramble_444-F3YANDPO.js.map +7 -0
- package/{src/cubing/search/inside/solve/vendor/sq12phase/scramble_sq1.js → dist/esm/scramble_sq1-PQ2AYBFW.js} +143 -290
- package/dist/esm/scramble_sq1-PQ2AYBFW.js.map +7 -0
- package/dist/esm/search/index.js +7 -4
- package/dist/esm/skewb.sgs.json-T6CO36WU.js +16 -0
- package/dist/esm/skewb.sgs.json-T6CO36WU.js.map +7 -0
- package/dist/esm/{sq1-hyperorbit.kpuzzle.json-N3FGCPML.js → sq1-hyperorbit.kpuzzle.json-AWDGN4ZW.js} +6 -6
- package/dist/esm/sq1-hyperorbit.kpuzzle.json-AWDGN4ZW.js.map +7 -0
- package/dist/esm/twisty/index.js +342 -231
- package/dist/esm/twisty/index.js.map +3 -3
- package/dist/esm/worker-inside-generated-string-6YDSDSRJ.js +3447 -0
- package/dist/esm/worker-inside-generated-string-6YDSDSRJ.js.map +7 -0
- package/dist/{esm → types}/.DS_Store +0 -0
- package/dist/types/alg/Alg.d.ts +0 -1
- package/dist/types/alg/Alg.spec.d.ts +0 -1
- package/dist/types/alg/AlgBuilder.d.ts +0 -1
- package/dist/types/alg/Serializable.d.ts +0 -1
- package/dist/types/alg/common.d.ts +0 -1
- package/dist/types/alg/debug.d.ts +0 -1
- package/dist/types/alg/example.d.ts +0 -1
- package/dist/types/alg/index.d.ts +0 -1
- package/dist/types/alg/is.d.ts +0 -1
- package/dist/types/alg/iteration.d.ts +0 -1
- package/dist/types/alg/keyboard.d.ts +0 -1
- package/dist/types/alg/limits.d.ts +0 -1
- package/dist/types/alg/operation.d.ts +0 -1
- package/dist/types/alg/operation.spec.d.ts +0 -1
- package/dist/types/alg/parse.d.ts +0 -1
- package/dist/types/alg/parse.spec.d.ts +0 -1
- package/dist/types/alg/test/alg-comparison.d.ts +0 -1
- package/dist/types/alg/test/alg.spec.d.ts +0 -1
- package/dist/types/alg/traversal.d.ts +0 -1
- package/dist/types/alg/units/QuantumWithAmount.d.ts +0 -1
- package/dist/types/alg/units/Unit.d.ts +0 -1
- package/dist/types/alg/units/containers/Commutator.d.ts +0 -1
- package/dist/types/alg/units/containers/Conjugate.d.ts +0 -1
- package/dist/types/alg/units/containers/Grouping.d.ts +0 -1
- package/dist/types/alg/units/index.d.ts +0 -1
- package/dist/types/alg/units/leaves/LineComment.d.ts +0 -1
- package/dist/types/alg/units/leaves/LineComment.spec.d.ts +0 -1
- package/dist/types/alg/units/leaves/Move.d.ts +0 -1
- package/dist/types/alg/units/leaves/Move.spec.d.ts +0 -1
- package/dist/types/alg/units/leaves/Newline.d.ts +0 -1
- package/dist/types/alg/units/leaves/Pause.d.ts +0 -1
- package/dist/types/alg/url.d.ts +0 -1
- package/dist/types/alg/url.spec.d.ts +0 -1
- package/dist/types/alg/validation.d.ts +0 -1
- package/dist/types/alg/warnOnce.d.ts +0 -1
- package/dist/types/bluetooth/connect/index.d.ts +0 -1
- package/dist/types/bluetooth/debug.d.ts +0 -1
- package/dist/types/bluetooth/index.d.ts +0 -1
- package/dist/types/bluetooth/keyboard.d.ts +5 -5
- package/dist/types/bluetooth/smart-puzzle/Heykube.d.ts +3 -3
- package/dist/types/bluetooth/smart-puzzle/bluetooth-puzzle.d.ts +3 -5
- package/dist/types/bluetooth/smart-puzzle/connect.d.ts +0 -1
- package/dist/types/bluetooth/smart-puzzle/endianness.d.ts +0 -1
- package/dist/types/bluetooth/smart-puzzle/gan.d.ts +5 -4
- package/dist/types/bluetooth/smart-puzzle/giiker.d.ts +3 -3
- package/dist/types/bluetooth/smart-puzzle/giiker.spec.d.ts +0 -1
- package/dist/types/bluetooth/smart-puzzle/gocube.d.ts +0 -1
- package/dist/types/bluetooth/smart-robot/GanRobot.d.ts +0 -1
- package/dist/types/bluetooth/smart-robot/index.d.ts +0 -1
- package/dist/types/bluetooth/smart-timer/GanTimer.d.ts +0 -1
- package/dist/types/bluetooth/smart-timer/index.d.ts +0 -1
- package/dist/types/bluetooth/transformer.d.ts +0 -1
- package/dist/types/cubing.bundle-global.d.ts +0 -1
- package/{src/cubing/cubing.bundle-global.ts → dist/types/cubing.bundle-global.exports.d.ts} +12 -19
- package/dist/types/esm-test-worker.d.ts +0 -1
- package/dist/types/kpuzzle/3x3x3/3x3x3.kpuzzle.json.d.ts +2 -3
- package/dist/types/kpuzzle/3x3x3/3x3x3.kpuzzle.json.spec.d.ts +0 -1
- package/dist/types/kpuzzle/3x3x3/puzzle-orientation.d.ts +4 -0
- package/dist/types/kpuzzle/KPuzzle.d.ts +25 -0
- package/dist/types/kpuzzle/KPuzzleDefinition.d.ts +20 -0
- package/dist/types/kpuzzle/KState.d.ts +16 -0
- package/dist/types/kpuzzle/KTransformation.d.ts +20 -0
- package/dist/types/kpuzzle/calculate.d.ts +16 -0
- package/dist/types/kpuzzle/combine.d.ts +3 -0
- package/dist/types/kpuzzle/construct.d.ts +5 -0
- package/dist/types/kpuzzle/index.d.ts +6 -10
- package/dist/types/notation/CountAnimatedLeaves.d.ts +0 -1
- package/dist/types/notation/CountMoves.d.ts +0 -1
- package/dist/types/notation/index.d.ts +0 -1
- package/dist/types/protocol/binary/binary3x3x3.d.ts +5 -6
- package/dist/types/protocol/binary/binary3x3x3.spec.d.ts +0 -1
- package/dist/types/protocol/binary/hex.d.ts +0 -1
- package/dist/types/protocol/binary/hex.spec.d.ts +0 -1
- package/dist/types/protocol/binary/orbit-indexing.d.ts +0 -1
- package/dist/types/protocol/binary/orbit-indexing.spec.d.ts +0 -1
- package/dist/types/protocol/binary/puzzle-orientation.d.ts +4 -5
- package/dist/types/protocol/index.d.ts +0 -1
- package/dist/types/puzzle-geometry/FaceNameSwizzler.d.ts +0 -1
- package/dist/types/puzzle-geometry/Options.d.ts +0 -1
- package/dist/types/puzzle-geometry/PGPuzzles.d.ts +0 -1
- package/dist/types/puzzle-geometry/PGPuzzles.spec.d.ts +0 -1
- package/dist/types/puzzle-geometry/Perm.d.ts +0 -1
- package/dist/types/puzzle-geometry/PermOriSet.d.ts +4 -5
- package/dist/types/puzzle-geometry/PlatonicGenerator.d.ts +0 -1
- package/dist/types/puzzle-geometry/PuzzleGeometry.d.ts +11 -5
- package/dist/types/puzzle-geometry/Quat.d.ts +0 -1
- package/dist/types/puzzle-geometry/Quat.spec.d.ts +0 -1
- package/dist/types/puzzle-geometry/SchreierSims.d.ts +0 -1
- package/dist/types/puzzle-geometry/index.d.ts +2 -2
- package/dist/types/puzzle-geometry/notation-mapping/FTONotationMapper.d.ts +0 -1
- package/dist/types/puzzle-geometry/notation-mapping/FaceRenamingMapper.d.ts +0 -1
- package/dist/types/puzzle-geometry/notation-mapping/MegaminxScramblingNotationMapper.d.ts +0 -1
- package/dist/types/puzzle-geometry/notation-mapping/NotationMapper.d.ts +3 -2
- package/dist/types/puzzle-geometry/notation-mapping/NullMapper.d.ts +0 -1
- package/dist/types/puzzle-geometry/notation-mapping/NxNxNCubeMapper.d.ts +0 -1
- package/dist/types/puzzle-geometry/notation-mapping/PyraminxNotationMapper.d.ts +0 -1
- package/dist/types/puzzle-geometry/notation-mapping/SkewbNotationMapper.d.ts +0 -1
- package/dist/types/puzzle-geometry/notation-mapping/index.d.ts +0 -1
- package/dist/types/puzzle-geometry/orientcenters.spec.d.ts +0 -1
- package/dist/types/puzzles/PuzzleLoader.d.ts +3 -3
- package/dist/types/puzzles/async/async-pg3d.d.ts +3 -3
- package/dist/types/puzzles/async/lazy-cached-kpuzzle.d.ts +2 -0
- package/dist/types/puzzles/customPGPuzzleLoader.d.ts +2 -3
- package/dist/types/puzzles/implementations/2x2x2/2x2x2.kpuzzle.json.d.ts +1 -2
- package/dist/types/puzzles/implementations/2x2x2/2x2x2.kpuzzle.svg.d.ts +0 -1
- package/dist/types/puzzles/implementations/2x2x2/index.d.ts +0 -1
- package/dist/types/puzzles/implementations/3x3x3/3x3x3-ll.kpuzzle.svg.d.ts +0 -1
- package/dist/types/puzzles/implementations/3x3x3/3x3x3.kpuzzle.svg.d.ts +0 -1
- package/dist/types/puzzles/implementations/3x3x3/index.d.ts +0 -1
- package/dist/types/puzzles/implementations/clock/clock.kpuzzle.json.d.ts +1 -2
- package/dist/types/puzzles/implementations/clock/clock.kpuzzle.svg.d.ts +0 -1
- package/dist/types/puzzles/implementations/clock/index.d.ts +0 -1
- package/dist/types/puzzles/implementations/fto/index.d.ts +0 -1
- package/dist/types/puzzles/implementations/megaminx/index.d.ts +0 -1
- package/dist/types/puzzles/implementations/pyraminx/index.d.ts +0 -1
- package/dist/types/puzzles/implementations/pyraminx/pyraminx.kpuzzle.json.d.ts +0 -1
- package/dist/types/puzzles/implementations/pyraminx/pyraminx.kpuzzle.svg.d.ts +0 -1
- package/dist/types/puzzles/implementations/square1/index.d.ts +0 -1
- package/dist/types/puzzles/implementations/square1/sq1-hyperorbit.kpuzzle.json.d.ts +1 -2
- package/dist/types/puzzles/implementations/square1/sq1-hyperorbit.kpuzzle.svg.d.ts +0 -1
- package/dist/types/puzzles/index.d.ts +1 -2
- package/dist/types/puzzles/stickerings/appearance.d.ts +6 -7
- package/dist/types/puzzles/stickerings/cube-stickerings.d.ts +0 -1
- package/dist/types/puzzles/stickerings/fto-stickerings.d.ts +0 -1
- package/dist/types/puzzles/stickerings/global-custom-stickering-hack.d.ts +0 -1
- package/dist/types/puzzles/stickerings/megaminx-stickerings.d.ts +0 -1
- package/dist/types/scramble/index.d.ts +0 -1
- package/dist/types/search/esm-test-worker.d.ts +0 -1
- package/dist/types/search/index.d.ts +0 -1
- package/dist/types/search/inside/api.d.ts +6 -7
- package/dist/types/search/inside/api.spec.d.ts +0 -1
- package/dist/types/search/inside/entry.d.ts +0 -1
- package/dist/types/search/inside/inside-worker.d.ts +0 -1
- package/dist/types/search/inside/module-entry-path-getter.d.ts +1 -0
- package/dist/types/search/inside/module-entry.d.ts +1 -0
- package/dist/types/search/inside/solve/addOrientationSuffix.d.ts +0 -1
- package/dist/types/search/inside/solve/parseSGS.d.ts +3 -4
- package/dist/types/search/inside/solve/puzzles/2x2x2.d.ts +3 -4
- package/dist/types/search/inside/solve/puzzles/2x2x2.sgs.json.d.ts +0 -1
- package/dist/types/search/inside/solve/puzzles/3x3x3/convert.d.ts +2 -3
- package/dist/types/search/inside/solve/puzzles/3x3x3/filter.d.ts +4 -4
- package/dist/types/search/inside/solve/puzzles/3x3x3/index.d.ts +3 -4
- package/dist/types/search/inside/solve/puzzles/3x3x3/legacy-sgs.d.ts +0 -1
- package/dist/types/search/inside/solve/puzzles/3x3x3-inefficient.sgs.json.d.ts +0 -1
- package/dist/types/search/inside/solve/puzzles/4x4x4.d.ts +2 -2
- package/dist/types/search/inside/solve/puzzles/5x5x5.d.ts +0 -1
- package/dist/types/search/inside/solve/puzzles/big-cubes.d.ts +0 -1
- package/dist/types/search/inside/solve/puzzles/clock.d.ts +0 -1
- package/dist/types/search/inside/solve/puzzles/fto.d.ts +5 -0
- package/dist/types/search/inside/solve/puzzles/fto.sgs.json.d.ts +2 -0
- package/dist/types/search/inside/solve/puzzles/megaminx.d.ts +2 -3
- package/dist/types/search/inside/solve/puzzles/megaminx.sgs.json.d.ts +2 -3
- package/dist/types/search/inside/solve/puzzles/pyraminx.d.ts +3 -4
- package/dist/types/search/inside/solve/puzzles/pyraminx.sgs.json.d.ts +0 -1
- package/dist/types/search/inside/solve/puzzles/sgs-defs.spec.d.ts +0 -1
- package/dist/types/search/inside/solve/puzzles/skewb.d.ts +3 -4
- package/dist/types/search/inside/solve/puzzles/skewb.sgs.json.d.ts +2 -3
- package/dist/types/search/inside/solve/puzzles/sq1.d.ts +0 -1
- package/dist/types/search/inside/solve/puzzles/wca-minx.d.ts +0 -1
- package/dist/types/search/inside/solve/tremble.d.ts +6 -6
- package/dist/types/search/instantiator.d.ts +1 -3
- package/dist/types/search/outside.d.ts +6 -7
- package/dist/types/search/worker-inside-generated-string.d.ts +1 -2
- package/dist/types/stream/index.d.ts +0 -1
- package/dist/types/stream/process/ReorientedStream.d.ts +1 -3
- package/dist/types/stream/proxy-event.d.ts +0 -1
- package/dist/types/stream/twizzle/TwizzleStream.d.ts +0 -1
- package/dist/types/stream/twizzle/stream-types.d.ts +0 -1
- package/dist/types/stream/websocket-proxy.d.ts +0 -1
- package/dist/types/twisty/controllers/AnimationTypes.d.ts +2 -3
- package/dist/types/twisty/controllers/RenderScheduler.d.ts +0 -1
- package/dist/types/twisty/controllers/TwistyAnimationController.d.ts +0 -1
- package/dist/types/twisty/controllers/TwistyPlayerController.d.ts +0 -1
- package/dist/types/twisty/controllers/easing.d.ts +0 -1
- package/dist/types/twisty/controllers/indexer/AlgDuration.d.ts +0 -1
- package/dist/types/twisty/controllers/indexer/AlgIndexer.d.ts +6 -6
- package/dist/types/twisty/controllers/indexer/SimpleAlgIndexer.d.ts +7 -7
- package/dist/types/twisty/controllers/indexer/simultaneous-moves/SimultaneousMoveIndexer.d.ts +8 -8
- package/dist/types/twisty/controllers/indexer/simultaneous-moves/SimultaneousMoveIndexerV2.d.ts +9 -9
- package/dist/types/twisty/controllers/indexer/simultaneous-moves/simul-moves.d.ts +0 -1
- package/dist/types/twisty/controllers/indexer/tree/AlgWalker.d.ts +36 -37
- package/dist/types/twisty/controllers/indexer/tree/TreeAlgIndexer.d.ts +7 -7
- package/dist/types/twisty/controllers/indexer/tree/chunkAlgs.d.ts +0 -1
- package/dist/types/twisty/controllers/stream/timeline-move-calculation-draft.d.ts +0 -1
- package/dist/types/twisty/heavy-code-imports/3d.d.ts +0 -1
- package/dist/types/twisty/heavy-code-imports/dynamic-entries/3d.d.ts +0 -1
- package/dist/types/twisty/index.d.ts +1 -2
- package/dist/types/twisty/model/PromiseFreshener.d.ts +0 -1
- package/dist/types/twisty/model/TwistyPlayerModel.d.ts +6 -7
- package/dist/types/twisty/model/UserVisibleErrorTracker.d.ts +0 -1
- package/dist/types/twisty/model/helpers.d.ts +0 -1
- package/dist/types/twisty/model/props/TwistyProp.d.ts +0 -1
- package/dist/types/twisty/model/props/TwistyProp.spec.d.ts +0 -1
- package/dist/types/twisty/model/props/TwistyPropDebugger.d.ts +0 -1
- package/dist/types/twisty/model/props/general/URLProp.d.ts +0 -1
- package/dist/types/twisty/model/props/puzzle/display/FoundationDisplayProp.d.ts +0 -1
- package/dist/types/twisty/model/props/puzzle/display/HintFaceletProp.d.ts +0 -1
- package/dist/types/twisty/model/props/puzzle/display/SpriteProp.d.ts +0 -1
- package/dist/types/twisty/model/props/puzzle/display/StickeringProp.d.ts +2 -1
- package/dist/types/twisty/model/props/puzzle/state/AlgProp.d.ts +0 -1
- package/dist/types/twisty/model/props/puzzle/state/AlgTransformationProp.d.ts +5 -8
- package/dist/types/twisty/model/props/puzzle/state/AnchoredStartProp.d.ts +5 -7
- package/dist/types/twisty/model/props/puzzle/state/CatchUpMoveProp.d.ts +0 -1
- package/dist/types/twisty/model/props/puzzle/state/CurrentLeavesSimplified.d.ts +0 -1
- package/dist/types/twisty/model/props/puzzle/state/{CurrentLeavesProp.d.ts → CurrentMoveInfoProp.d.ts} +2 -3
- package/dist/types/twisty/model/props/puzzle/state/CurrentStateProp.d.ts +14 -0
- package/dist/types/twisty/model/props/puzzle/state/IndexerConstructorProp.d.ts +7 -8
- package/dist/types/twisty/model/props/puzzle/state/IndexerConstructorRequestProp.d.ts +0 -1
- package/dist/types/twisty/model/props/puzzle/state/IndexerProp.d.ts +5 -6
- package/dist/types/twisty/model/props/puzzle/state/LegacyPositionProp.d.ts +2 -3
- package/dist/types/twisty/model/props/puzzle/state/MovePressInputProp.d.ts +6 -2
- package/dist/types/twisty/model/props/puzzle/state/NaiveMoveCountProp.d.ts +0 -1
- package/dist/types/twisty/model/props/puzzle/state/PuzzleAlgProp.d.ts +4 -5
- package/dist/types/twisty/model/props/puzzle/state/SetupAnchorProp.d.ts +0 -1
- package/dist/types/twisty/model/props/puzzle/structure/KPuzzleProp.d.ts +10 -0
- package/dist/types/twisty/model/props/puzzle/structure/PuzzleDescriptionProp.d.ts +0 -1
- package/dist/types/twisty/model/props/puzzle/structure/PuzzleIDProp.d.ts +0 -1
- package/dist/types/twisty/model/props/puzzle/structure/PuzzleIDRequestProp.d.ts +0 -1
- package/dist/types/twisty/model/props/puzzle/structure/PuzzleLoaderProp.d.ts +0 -1
- package/dist/types/twisty/model/props/timeline/CoarseTimelineInfoProp.d.ts +0 -1
- package/dist/types/twisty/model/props/timeline/DetailedTimelineInfoProp.d.ts +0 -1
- package/dist/types/twisty/model/props/timeline/PlayingInfoProp.d.ts +0 -1
- package/dist/types/twisty/model/props/timeline/TempoScaleProp.d.ts +0 -1
- package/dist/types/twisty/model/props/timeline/TimestampRequestProp.d.ts +0 -1
- package/dist/types/twisty/model/props/viewer/BackViewProp.d.ts +0 -1
- package/dist/types/twisty/model/props/viewer/BackgroundProp.d.ts +0 -1
- package/dist/types/twisty/model/props/viewer/ButtonAppearanceProp.d.ts +0 -1
- package/dist/types/twisty/model/props/viewer/ControlPanelProp.d.ts +0 -1
- package/dist/types/twisty/model/props/viewer/LatitudeLimit.d.ts +0 -1
- package/dist/types/twisty/model/props/viewer/OrbitCoordinatesProp.d.ts +0 -1
- package/dist/types/twisty/model/props/viewer/OrbitCoordinatesRequestProp.d.ts +0 -1
- package/dist/types/twisty/model/props/viewer/TimeRangeProp.d.ts +2 -3
- package/dist/types/twisty/model/props/viewer/ViewerLinkProp.d.ts +0 -1
- package/dist/types/twisty/model/props/viewer/VisualizationProp.d.ts +0 -1
- package/dist/types/twisty/model/props/viewer/VisualizationStrategyProp.d.ts +0 -1
- package/dist/types/twisty/views/2D/KPuzzleSVGWrapper.d.ts +17 -0
- package/dist/types/twisty/views/2D/Twisty2DPuzzle.css.d.ts +0 -1
- package/dist/types/twisty/views/2D/Twisty2DPuzzle.d.ts +4 -4
- package/dist/types/twisty/views/2D/Twisty2DPuzzleWrapper.d.ts +0 -1
- package/dist/types/twisty/views/2D/Twisty2DSceneWrapper.d.ts +0 -1
- package/dist/types/twisty/views/3D/DragTracker.d.ts +0 -1
- package/dist/types/twisty/views/3D/RendererPool.d.ts +0 -1
- package/dist/types/twisty/views/3D/TAU.d.ts +0 -1
- package/dist/types/twisty/views/3D/Twisty3DPuzzleWrapper.d.ts +0 -1
- package/dist/types/twisty/views/3D/Twisty3DRenderTarget.d.ts +0 -1
- package/dist/types/twisty/views/3D/Twisty3DScene.d.ts +0 -1
- package/dist/types/twisty/views/3D/Twisty3DSceneWrapper.d.ts +0 -1
- package/dist/types/twisty/views/3D/Twisty3DVantage.css.d.ts +0 -1
- package/dist/types/twisty/views/3D/Twisty3DVantage.d.ts +0 -1
- package/dist/types/twisty/views/3D/TwistyOrbitControls.d.ts +0 -1
- package/dist/types/twisty/views/3D/TwistyOrbitControls.spec.d.ts +0 -1
- package/dist/types/twisty/views/3D/puzzles/Cube3D.d.ts +4 -5
- package/dist/types/twisty/views/3D/puzzles/PG3D.d.ts +5 -6
- package/dist/types/twisty/views/3D/puzzles/Twisty3DPuzzle.d.ts +0 -1
- package/dist/types/twisty/views/ClassListManager.d.ts +0 -1
- package/dist/types/twisty/views/ManagedCustomElement.d.ts +0 -1
- package/dist/types/twisty/views/TwistyAlgEditor/LeafTokens.d.ts +0 -1
- package/dist/types/twisty/views/TwistyAlgEditor/TwistyAlgEditor.css.d.ts +0 -1
- package/dist/types/twisty/views/TwistyAlgEditor/TwistyAlgEditor.d.ts +0 -1
- package/dist/types/twisty/views/TwistyAlgEditor/TwistyAlgEditor.spec.d.ts +0 -1
- package/dist/types/twisty/views/TwistyAlgEditor/model.d.ts +0 -1
- package/dist/types/twisty/views/TwistyAlgViewer.css.d.ts +0 -1
- package/dist/types/twisty/views/TwistyAlgViewer.d.ts +0 -1
- package/dist/types/twisty/views/TwistyPlayer.css.d.ts +0 -1
- package/dist/types/twisty/views/TwistyPlayer.d.ts +0 -1
- package/dist/types/twisty/views/TwistyPlayerSettable.d.ts +0 -1
- package/dist/types/twisty/views/TwistyViewerWrapper.css.d.ts +0 -1
- package/dist/types/twisty/views/canvas.d.ts +0 -1
- package/dist/types/twisty/views/control-panel/TwistyButtonsV2.css.d.ts +0 -1
- package/dist/types/twisty/views/control-panel/TwistyButtonsV2.d.ts +0 -1
- package/dist/types/twisty/views/control-panel/TwistyScrubber.css.d.ts +0 -1
- package/dist/types/twisty/views/control-panel/TwistyScrubberV2.d.ts +0 -1
- package/dist/types/twisty/views/control-panel/webkit-fullscreen.d.ts +0 -1
- package/dist/types/twisty/views/document.d.ts +0 -1
- package/dist/types/twisty/views/node-custom-element-shims.d.ts +0 -1
- package/dist/types/twisty/views/screenshot.d.ts +0 -1
- package/dist/types/twisty/views/stream/TwistyStreamSource.css.d.ts +0 -1
- package/dist/types/twisty/views/stream/TwistyStreamSource.d.ts +0 -1
- package/{src/cubing/search → dist/types}/vendor/comlink-everywhere/inside/index.d.ts +0 -0
- package/dist/types/{search/vendor → vendor}/comlink-everywhere/inside/node.d.ts +0 -1
- package/dist/types/{search/vendor → vendor}/comlink-everywhere/outside/index.d.ts +0 -1
- package/dist/types/{search/vendor → vendor}/comlink-everywhere/outside/node.d.ts +0 -1
- package/dist/types/{search/inside/solve/vendor → vendor}/cstimer/src/js/lib/mathlib.d.ts +0 -1
- package/dist/types/{search/inside/solve/vendor → vendor}/cstimer/src/js/scramble/scramble_444.d.ts +1 -2
- package/dist/types/{search/inside/solve/vendor → vendor}/min2phase/gwt.d.ts +0 -1
- package/dist/types/vendor/p-lazy/p-lazy.d.ts +0 -1
- package/dist/types/{search/inside/solve/vendor → vendor}/random-uint-below/get-random-values.d.ts +0 -1
- package/dist/types/{search/inside/solve/vendor → vendor}/random-uint-below/index.d.ts +1 -2
- package/dist/types/{search/inside/solve/vendor → vendor}/random-uint-below/random-choice.d.ts +0 -1
- package/dist/types/{search/inside/solve/vendor/random-uint-below/random-int.d.ts → vendor/random-uint-below/random53BitValue.d.ts} +0 -1
- package/dist/types/{search/inside/solve/vendor → vendor}/sq12phase/scramble_sq1.d.ts +0 -1
- package/dist/types/vendor/three/examples/jsm/libs/stats.modified.module.d.ts +0 -1
- package/dist/types/{bluetooth/smart-puzzle → vendor/unsafe-raw-aes}/unsafe-raw-aes.d.ts +0 -1
- package/kpuzzle/package.json +1 -3
- package/notation/package.json +1 -3
- package/package.json +11 -17
- package/protocol/package.json +1 -3
- package/puzzle-geometry/package.json +1 -3
- package/puzzles/package.json +1 -3
- package/scramble/package.json +1 -3
- package/search/package.json +1 -3
- package/stream/package.json +1 -3
- package/twisty/package.json +1 -3
- package/alg/index.d.ts +0 -1
- package/bluetooth/index.d.ts +0 -1
- package/dist/.DS_Store +0 -0
- package/dist/bin/puzzle-geometry-bin.js.map +0 -7
- package/dist/bundle-global/cubing.bundle-global.js +0 -7419
- package/dist/esm/2x2x2.kpuzzle.json-JOGUSQ4N.js.map +0 -7
- package/dist/esm/chunk-7KI3I3Y7.js +0 -1379
- package/dist/esm/chunk-7KI3I3Y7.js.map +0 -7
- package/dist/esm/chunk-DLN5QS4V.js.map +0 -7
- package/dist/esm/chunk-HXKINJ7U.js.map +0 -7
- package/dist/esm/chunk-X6JHXPDX.js +0 -2359
- package/dist/esm/chunk-X6JHXPDX.js.map +0 -7
- package/dist/esm/clock.kpuzzle.json-EKWRMHJM.js.map +0 -7
- package/dist/esm/index.d.ts +0 -1
- package/dist/esm/node-WEHVBEKP.js.map +0 -7
- package/dist/esm/sq1-hyperorbit.kpuzzle.json-N3FGCPML.js.map +0 -7
- package/dist/esm/worker-inside-generated-string-ZA6E6672.js +0 -2831
- package/dist/esm/worker-inside-generated-string-ZA6E6672.js.map +0 -7
- package/dist/types/alg/Alg.d.ts.map +0 -1
- package/dist/types/alg/Alg.spec.d.ts.map +0 -1
- package/dist/types/alg/AlgBuilder.d.ts.map +0 -1
- package/dist/types/alg/Serializable.d.ts.map +0 -1
- package/dist/types/alg/common.d.ts.map +0 -1
- package/dist/types/alg/debug.d.ts.map +0 -1
- package/dist/types/alg/example.d.ts.map +0 -1
- package/dist/types/alg/index.d.ts.map +0 -1
- package/dist/types/alg/is.d.ts.map +0 -1
- package/dist/types/alg/iteration.d.ts.map +0 -1
- package/dist/types/alg/keyboard.d.ts.map +0 -1
- package/dist/types/alg/limits.d.ts.map +0 -1
- package/dist/types/alg/operation.d.ts.map +0 -1
- package/dist/types/alg/operation.spec.d.ts.map +0 -1
- package/dist/types/alg/parse.d.ts.map +0 -1
- package/dist/types/alg/parse.spec.d.ts.map +0 -1
- package/dist/types/alg/test/alg-comparison.d.ts.map +0 -1
- package/dist/types/alg/test/alg.spec.d.ts.map +0 -1
- package/dist/types/alg/traversal.d.ts.map +0 -1
- package/dist/types/alg/units/QuantumWithAmount.d.ts.map +0 -1
- package/dist/types/alg/units/Unit.d.ts.map +0 -1
- package/dist/types/alg/units/containers/Commutator.d.ts.map +0 -1
- package/dist/types/alg/units/containers/Conjugate.d.ts.map +0 -1
- package/dist/types/alg/units/containers/Grouping.d.ts.map +0 -1
- package/dist/types/alg/units/index.d.ts.map +0 -1
- package/dist/types/alg/units/leaves/LineComment.d.ts.map +0 -1
- package/dist/types/alg/units/leaves/LineComment.spec.d.ts.map +0 -1
- package/dist/types/alg/units/leaves/Move.d.ts.map +0 -1
- package/dist/types/alg/units/leaves/Move.spec.d.ts.map +0 -1
- package/dist/types/alg/units/leaves/Newline.d.ts.map +0 -1
- package/dist/types/alg/units/leaves/Pause.d.ts.map +0 -1
- package/dist/types/alg/url.d.ts.map +0 -1
- package/dist/types/alg/url.spec.d.ts.map +0 -1
- package/dist/types/alg/validation.d.ts.map +0 -1
- package/dist/types/alg/warnOnce.d.ts.map +0 -1
- package/dist/types/bluetooth/connect/index.d.ts.map +0 -1
- package/dist/types/bluetooth/debug.d.ts.map +0 -1
- package/dist/types/bluetooth/index.d.ts.map +0 -1
- package/dist/types/bluetooth/keyboard.d.ts.map +0 -1
- package/dist/types/bluetooth/smart-puzzle/Heykube.d.ts.map +0 -1
- package/dist/types/bluetooth/smart-puzzle/bluetooth-puzzle.d.ts.map +0 -1
- package/dist/types/bluetooth/smart-puzzle/connect.d.ts.map +0 -1
- package/dist/types/bluetooth/smart-puzzle/endianness.d.ts.map +0 -1
- package/dist/types/bluetooth/smart-puzzle/gan.d.ts.map +0 -1
- package/dist/types/bluetooth/smart-puzzle/giiker.d.ts.map +0 -1
- package/dist/types/bluetooth/smart-puzzle/giiker.spec.d.ts.map +0 -1
- package/dist/types/bluetooth/smart-puzzle/gocube.d.ts.map +0 -1
- package/dist/types/bluetooth/smart-puzzle/unsafe-raw-aes.d.ts.map +0 -1
- package/dist/types/bluetooth/smart-robot/GanRobot.d.ts.map +0 -1
- package/dist/types/bluetooth/smart-robot/index.d.ts.map +0 -1
- package/dist/types/bluetooth/smart-timer/GanTimer.d.ts.map +0 -1
- package/dist/types/bluetooth/smart-timer/index.d.ts.map +0 -1
- package/dist/types/bluetooth/transformer.d.ts.map +0 -1
- package/dist/types/cubing.bundle-global.d.ts.map +0 -1
- package/dist/types/esm-test-worker.d.ts.map +0 -1
- package/dist/types/kpuzzle/3x3x3/3x3x3.kpuzzle.json.d.ts.map +0 -1
- package/dist/types/kpuzzle/3x3x3/3x3x3.kpuzzle.json.spec.d.ts.map +0 -1
- package/dist/types/kpuzzle/canon.spec.d.ts +0 -2
- package/dist/types/kpuzzle/canon.spec.d.ts.map +0 -1
- package/dist/types/kpuzzle/canonicalize.d.ts +0 -55
- package/dist/types/kpuzzle/canonicalize.d.ts.map +0 -1
- package/dist/types/kpuzzle/definition_types.d.ts +0 -19
- package/dist/types/kpuzzle/definition_types.d.ts.map +0 -1
- package/dist/types/kpuzzle/index.d.ts.map +0 -1
- package/dist/types/kpuzzle/kpuzzle.d.ts +0 -17
- package/dist/types/kpuzzle/kpuzzle.d.ts.map +0 -1
- package/dist/types/kpuzzle/kpuzzle.spec.d.ts +0 -2
- package/dist/types/kpuzzle/kpuzzle.spec.d.ts.map +0 -1
- package/dist/types/kpuzzle/move_notation.d.ts +0 -6
- package/dist/types/kpuzzle/move_notation.d.ts.map +0 -1
- package/dist/types/kpuzzle/parser/index.d.ts +0 -2
- package/dist/types/kpuzzle/parser/index.d.ts.map +0 -1
- package/dist/types/kpuzzle/parser/parser-peggy.d.ts +0 -15
- package/dist/types/kpuzzle/parser/parser-peggy.d.ts.map +0 -1
- package/dist/types/kpuzzle/parser/parser-shim.d.ts +0 -4
- package/dist/types/kpuzzle/parser/parser-shim.d.ts.map +0 -1
- package/dist/types/kpuzzle/parser/parser.d.ts +0 -1
- package/dist/types/kpuzzle/parser/parser.d.ts.map +0 -1
- package/dist/types/kpuzzle/prunetable.spec.d.ts +0 -2
- package/dist/types/kpuzzle/prunetable.spec.d.ts.map +0 -1
- package/dist/types/kpuzzle/pruningtable.d.ts +0 -16
- package/dist/types/kpuzzle/pruningtable.d.ts.map +0 -1
- package/dist/types/kpuzzle/puzzle-orientation.d.ts +0 -5
- package/dist/types/kpuzzle/puzzle-orientation.d.ts.map +0 -1
- package/dist/types/kpuzzle/svg.d.ts +0 -18
- package/dist/types/kpuzzle/svg.d.ts.map +0 -1
- package/dist/types/kpuzzle/transformations.d.ts +0 -13
- package/dist/types/kpuzzle/transformations.d.ts.map +0 -1
- package/dist/types/kpuzzle/transformations.spec.d.ts +0 -2
- package/dist/types/kpuzzle/transformations.spec.d.ts.map +0 -1
- package/dist/types/notation/CountAnimatedLeaves.d.ts.map +0 -1
- package/dist/types/notation/CountMoves.d.ts.map +0 -1
- package/dist/types/notation/index.d.ts.map +0 -1
- package/dist/types/protocol/binary/binary3x3x3.d.ts.map +0 -1
- package/dist/types/protocol/binary/binary3x3x3.spec.d.ts.map +0 -1
- package/dist/types/protocol/binary/hex.d.ts.map +0 -1
- package/dist/types/protocol/binary/hex.spec.d.ts.map +0 -1
- package/dist/types/protocol/binary/orbit-indexing.d.ts.map +0 -1
- package/dist/types/protocol/binary/orbit-indexing.spec.d.ts.map +0 -1
- package/dist/types/protocol/binary/puzzle-orientation.d.ts.map +0 -1
- package/dist/types/protocol/index.d.ts.map +0 -1
- package/dist/types/puzzle-geometry/FaceNameSwizzler.d.ts.map +0 -1
- package/dist/types/puzzle-geometry/Options.d.ts.map +0 -1
- package/dist/types/puzzle-geometry/PGPuzzles.d.ts.map +0 -1
- package/dist/types/puzzle-geometry/PGPuzzles.spec.d.ts.map +0 -1
- package/dist/types/puzzle-geometry/Perm.d.ts.map +0 -1
- package/dist/types/puzzle-geometry/PermOriSet.d.ts.map +0 -1
- package/dist/types/puzzle-geometry/PlatonicGenerator.d.ts.map +0 -1
- package/dist/types/puzzle-geometry/PuzzleGeometry.d.ts.map +0 -1
- package/dist/types/puzzle-geometry/Quat.d.ts.map +0 -1
- package/dist/types/puzzle-geometry/Quat.spec.d.ts.map +0 -1
- package/dist/types/puzzle-geometry/SchreierSims.d.ts.map +0 -1
- package/dist/types/puzzle-geometry/index.d.ts.map +0 -1
- package/dist/types/puzzle-geometry/interfaces.d.ts +0 -6
- package/dist/types/puzzle-geometry/interfaces.d.ts.map +0 -1
- package/dist/types/puzzle-geometry/notation-mapping/FTONotationMapper.d.ts.map +0 -1
- package/dist/types/puzzle-geometry/notation-mapping/FaceRenamingMapper.d.ts.map +0 -1
- package/dist/types/puzzle-geometry/notation-mapping/MegaminxScramblingNotationMapper.d.ts.map +0 -1
- package/dist/types/puzzle-geometry/notation-mapping/NotationMapper.d.ts.map +0 -1
- package/dist/types/puzzle-geometry/notation-mapping/NullMapper.d.ts.map +0 -1
- package/dist/types/puzzle-geometry/notation-mapping/NxNxNCubeMapper.d.ts.map +0 -1
- package/dist/types/puzzle-geometry/notation-mapping/PyraminxNotationMapper.d.ts.map +0 -1
- package/dist/types/puzzle-geometry/notation-mapping/SkewbNotationMapper.d.ts.map +0 -1
- package/dist/types/puzzle-geometry/notation-mapping/index.d.ts.map +0 -1
- package/dist/types/puzzle-geometry/orientcenters.spec.d.ts.map +0 -1
- package/dist/types/puzzles/PuzzleLoader.d.ts.map +0 -1
- package/dist/types/puzzles/async/async-pg3d.d.ts.map +0 -1
- package/dist/types/puzzles/customPGPuzzleLoader.d.ts.map +0 -1
- package/dist/types/puzzles/implementations/2x2x2/2x2x2.kpuzzle.json.d.ts.map +0 -1
- package/dist/types/puzzles/implementations/2x2x2/2x2x2.kpuzzle.svg.d.ts.map +0 -1
- package/dist/types/puzzles/implementations/2x2x2/index.d.ts.map +0 -1
- package/dist/types/puzzles/implementations/3x3x3/3x3x3-ll.kpuzzle.svg.d.ts.map +0 -1
- package/dist/types/puzzles/implementations/3x3x3/3x3x3.kpuzzle.svg.d.ts.map +0 -1
- package/dist/types/puzzles/implementations/3x3x3/index.d.ts.map +0 -1
- package/dist/types/puzzles/implementations/clock/clock.kpuzzle.json.d.ts.map +0 -1
- package/dist/types/puzzles/implementations/clock/clock.kpuzzle.svg.d.ts.map +0 -1
- package/dist/types/puzzles/implementations/clock/index.d.ts.map +0 -1
- package/dist/types/puzzles/implementations/fto/index.d.ts.map +0 -1
- package/dist/types/puzzles/implementations/megaminx/index.d.ts.map +0 -1
- package/dist/types/puzzles/implementations/pyraminx/index.d.ts.map +0 -1
- package/dist/types/puzzles/implementations/pyraminx/pyraminx.kpuzzle.json.d.ts.map +0 -1
- package/dist/types/puzzles/implementations/pyraminx/pyraminx.kpuzzle.svg.d.ts.map +0 -1
- package/dist/types/puzzles/implementations/square1/index.d.ts.map +0 -1
- package/dist/types/puzzles/implementations/square1/sq1-hyperorbit.kpuzzle.json.d.ts.map +0 -1
- package/dist/types/puzzles/implementations/square1/sq1-hyperorbit.kpuzzle.svg.d.ts.map +0 -1
- package/dist/types/puzzles/index.d.ts.map +0 -1
- package/dist/types/puzzles/stickerings/appearance.d.ts.map +0 -1
- package/dist/types/puzzles/stickerings/cube-stickerings.d.ts.map +0 -1
- package/dist/types/puzzles/stickerings/fto-stickerings.d.ts.map +0 -1
- package/dist/types/puzzles/stickerings/global-custom-stickering-hack.d.ts.map +0 -1
- package/dist/types/puzzles/stickerings/megaminx-stickerings.d.ts.map +0 -1
- package/dist/types/scramble/index.d.ts.map +0 -1
- package/dist/types/search/esm-test-worker.d.ts.map +0 -1
- package/dist/types/search/index.d.ts.map +0 -1
- package/dist/types/search/inside/api.d.ts.map +0 -1
- package/dist/types/search/inside/api.spec.d.ts.map +0 -1
- package/dist/types/search/inside/entry.d.ts.map +0 -1
- package/dist/types/search/inside/inside-worker.d.ts.map +0 -1
- package/dist/types/search/inside/solve/addOrientationSuffix.d.ts.map +0 -1
- package/dist/types/search/inside/solve/parseSGS.d.ts.map +0 -1
- package/dist/types/search/inside/solve/puzzles/2x2x2.d.ts.map +0 -1
- package/dist/types/search/inside/solve/puzzles/2x2x2.sgs.json.d.ts.map +0 -1
- package/dist/types/search/inside/solve/puzzles/3x3x3/convert.d.ts.map +0 -1
- package/dist/types/search/inside/solve/puzzles/3x3x3/filter.d.ts.map +0 -1
- package/dist/types/search/inside/solve/puzzles/3x3x3/index.d.ts.map +0 -1
- package/dist/types/search/inside/solve/puzzles/3x3x3/legacy-sgs.d.ts.map +0 -1
- package/dist/types/search/inside/solve/puzzles/3x3x3-inefficient.sgs.json.d.ts.map +0 -1
- package/dist/types/search/inside/solve/puzzles/4x4x4.d.ts.map +0 -1
- package/dist/types/search/inside/solve/puzzles/5x5x5.d.ts.map +0 -1
- package/dist/types/search/inside/solve/puzzles/big-cubes.d.ts.map +0 -1
- package/dist/types/search/inside/solve/puzzles/clock.d.ts.map +0 -1
- package/dist/types/search/inside/solve/puzzles/megaminx.d.ts.map +0 -1
- package/dist/types/search/inside/solve/puzzles/megaminx.sgs.json.d.ts.map +0 -1
- package/dist/types/search/inside/solve/puzzles/pyraminx.d.ts.map +0 -1
- package/dist/types/search/inside/solve/puzzles/pyraminx.sgs.json.d.ts.map +0 -1
- package/dist/types/search/inside/solve/puzzles/sgs-defs.spec.d.ts.map +0 -1
- package/dist/types/search/inside/solve/puzzles/skewb.d.ts.map +0 -1
- package/dist/types/search/inside/solve/puzzles/skewb.sgs.json.d.ts.map +0 -1
- package/dist/types/search/inside/solve/puzzles/sq1.d.ts.map +0 -1
- package/dist/types/search/inside/solve/puzzles/wca-minx.d.ts.map +0 -1
- package/dist/types/search/inside/solve/tremble.d.ts.map +0 -1
- package/dist/types/search/inside/solve/vendor/cstimer/src/js/lib/mathlib.d.ts.map +0 -1
- package/dist/types/search/inside/solve/vendor/cstimer/src/js/scramble/scramble_444.d.ts.map +0 -1
- package/dist/types/search/inside/solve/vendor/min2phase/gwt.d.ts.map +0 -1
- package/dist/types/search/inside/solve/vendor/random-uint-below/get-random-values.d.ts.map +0 -1
- package/dist/types/search/inside/solve/vendor/random-uint-below/index.d.ts.map +0 -1
- package/dist/types/search/inside/solve/vendor/random-uint-below/random-choice.d.ts.map +0 -1
- package/dist/types/search/inside/solve/vendor/random-uint-below/random-int.d.ts.map +0 -1
- package/dist/types/search/inside/solve/vendor/sq12phase/scramble_sq1.d.ts.map +0 -1
- package/dist/types/search/instantiator.d.ts.map +0 -1
- package/dist/types/search/outside.d.ts.map +0 -1
- package/dist/types/search/vendor/comlink-everywhere/inside/index.d.ts +0 -2
- package/dist/types/search/vendor/comlink-everywhere/inside/index.d.ts.map +0 -1
- package/dist/types/search/vendor/comlink-everywhere/inside/node.d.ts.map +0 -1
- package/dist/types/search/vendor/comlink-everywhere/outside/index.d.ts.map +0 -1
- package/dist/types/search/vendor/comlink-everywhere/outside/node.d.ts.map +0 -1
- package/dist/types/search/worker-inside-generated-string.d.ts.map +0 -1
- package/dist/types/stream/index.d.ts.map +0 -1
- package/dist/types/stream/process/ReorientedStream.d.ts.map +0 -1
- package/dist/types/stream/proxy-event.d.ts.map +0 -1
- package/dist/types/stream/twizzle/TwizzleStream.d.ts.map +0 -1
- package/dist/types/stream/twizzle/stream-types.d.ts.map +0 -1
- package/dist/types/stream/websocket-proxy.d.ts.map +0 -1
- package/dist/types/twisty/controllers/AnimationTypes.d.ts.map +0 -1
- package/dist/types/twisty/controllers/RenderScheduler.d.ts.map +0 -1
- package/dist/types/twisty/controllers/TwistyAnimationController.d.ts.map +0 -1
- package/dist/types/twisty/controllers/TwistyPlayerController.d.ts.map +0 -1
- package/dist/types/twisty/controllers/easing.d.ts.map +0 -1
- package/dist/types/twisty/controllers/indexer/AlgDuration.d.ts.map +0 -1
- package/dist/types/twisty/controllers/indexer/AlgIndexer.d.ts.map +0 -1
- package/dist/types/twisty/controllers/indexer/SimpleAlgIndexer.d.ts.map +0 -1
- package/dist/types/twisty/controllers/indexer/simultaneous-moves/SimultaneousMoveIndexer.d.ts.map +0 -1
- package/dist/types/twisty/controllers/indexer/simultaneous-moves/SimultaneousMoveIndexerV2.d.ts.map +0 -1
- package/dist/types/twisty/controllers/indexer/simultaneous-moves/simul-moves.d.ts.map +0 -1
- package/dist/types/twisty/controllers/indexer/tree/AlgWalker.d.ts.map +0 -1
- package/dist/types/twisty/controllers/indexer/tree/TreeAlgIndexer.d.ts.map +0 -1
- package/dist/types/twisty/controllers/indexer/tree/chunkAlgs.d.ts.map +0 -1
- package/dist/types/twisty/controllers/stream/timeline-move-calculation-draft.d.ts.map +0 -1
- package/dist/types/twisty/heavy-code-imports/3d.d.ts.map +0 -1
- package/dist/types/twisty/heavy-code-imports/dynamic-entries/3d.d.ts.map +0 -1
- package/dist/types/twisty/index.d.ts.map +0 -1
- package/dist/types/twisty/model/PromiseFreshener.d.ts.map +0 -1
- package/dist/types/twisty/model/TwistyPlayerModel.d.ts.map +0 -1
- package/dist/types/twisty/model/UserVisibleErrorTracker.d.ts.map +0 -1
- package/dist/types/twisty/model/helpers.d.ts.map +0 -1
- package/dist/types/twisty/model/props/TwistyProp.d.ts.map +0 -1
- package/dist/types/twisty/model/props/TwistyProp.spec.d.ts.map +0 -1
- package/dist/types/twisty/model/props/TwistyPropDebugger.d.ts.map +0 -1
- package/dist/types/twisty/model/props/general/URLProp.d.ts.map +0 -1
- package/dist/types/twisty/model/props/puzzle/display/FoundationDisplayProp.d.ts.map +0 -1
- package/dist/types/twisty/model/props/puzzle/display/HintFaceletProp.d.ts.map +0 -1
- package/dist/types/twisty/model/props/puzzle/display/SpriteProp.d.ts.map +0 -1
- package/dist/types/twisty/model/props/puzzle/display/StickeringProp.d.ts.map +0 -1
- package/dist/types/twisty/model/props/puzzle/state/AlgProp.d.ts.map +0 -1
- package/dist/types/twisty/model/props/puzzle/state/AlgTransformationProp.d.ts.map +0 -1
- package/dist/types/twisty/model/props/puzzle/state/AnchoredStartProp.d.ts.map +0 -1
- package/dist/types/twisty/model/props/puzzle/state/CatchUpMoveProp.d.ts.map +0 -1
- package/dist/types/twisty/model/props/puzzle/state/CurrentLeavesProp.d.ts.map +0 -1
- package/dist/types/twisty/model/props/puzzle/state/CurrentLeavesSimplified.d.ts.map +0 -1
- package/dist/types/twisty/model/props/puzzle/state/CurrentTransformationProp.d.ts +0 -15
- package/dist/types/twisty/model/props/puzzle/state/CurrentTransformationProp.d.ts.map +0 -1
- package/dist/types/twisty/model/props/puzzle/state/IndexerConstructorProp.d.ts.map +0 -1
- package/dist/types/twisty/model/props/puzzle/state/IndexerConstructorRequestProp.d.ts.map +0 -1
- package/dist/types/twisty/model/props/puzzle/state/IndexerProp.d.ts.map +0 -1
- package/dist/types/twisty/model/props/puzzle/state/LegacyPositionProp.d.ts.map +0 -1
- package/dist/types/twisty/model/props/puzzle/state/MovePressInputProp.d.ts.map +0 -1
- package/dist/types/twisty/model/props/puzzle/state/NaiveMoveCountProp.d.ts.map +0 -1
- package/dist/types/twisty/model/props/puzzle/state/PuzzleAlgProp.d.ts.map +0 -1
- package/dist/types/twisty/model/props/puzzle/state/SetupAnchorProp.d.ts.map +0 -1
- package/dist/types/twisty/model/props/puzzle/structure/PuzzleDefProp.d.ts +0 -11
- package/dist/types/twisty/model/props/puzzle/structure/PuzzleDefProp.d.ts.map +0 -1
- package/dist/types/twisty/model/props/puzzle/structure/PuzzleDescriptionProp.d.ts.map +0 -1
- package/dist/types/twisty/model/props/puzzle/structure/PuzzleIDProp.d.ts.map +0 -1
- package/dist/types/twisty/model/props/puzzle/structure/PuzzleIDRequestProp.d.ts.map +0 -1
- package/dist/types/twisty/model/props/puzzle/structure/PuzzleLoaderProp.d.ts.map +0 -1
- package/dist/types/twisty/model/props/timeline/CoarseTimelineInfoProp.d.ts.map +0 -1
- package/dist/types/twisty/model/props/timeline/DetailedTimelineInfoProp.d.ts.map +0 -1
- package/dist/types/twisty/model/props/timeline/PlayingInfoProp.d.ts.map +0 -1
- package/dist/types/twisty/model/props/timeline/TempoScaleProp.d.ts.map +0 -1
- package/dist/types/twisty/model/props/timeline/TimestampRequestProp.d.ts.map +0 -1
- package/dist/types/twisty/model/props/viewer/BackViewProp.d.ts.map +0 -1
- package/dist/types/twisty/model/props/viewer/BackgroundProp.d.ts.map +0 -1
- package/dist/types/twisty/model/props/viewer/ButtonAppearanceProp.d.ts.map +0 -1
- package/dist/types/twisty/model/props/viewer/ControlPanelProp.d.ts.map +0 -1
- package/dist/types/twisty/model/props/viewer/LatitudeLimit.d.ts.map +0 -1
- package/dist/types/twisty/model/props/viewer/OrbitCoordinatesProp.d.ts.map +0 -1
- package/dist/types/twisty/model/props/viewer/OrbitCoordinatesRequestProp.d.ts.map +0 -1
- package/dist/types/twisty/model/props/viewer/TimeRangeProp.d.ts.map +0 -1
- package/dist/types/twisty/model/props/viewer/ViewerLinkProp.d.ts.map +0 -1
- package/dist/types/twisty/model/props/viewer/VisualizationProp.d.ts.map +0 -1
- package/dist/types/twisty/model/props/viewer/VisualizationStrategyProp.d.ts.map +0 -1
- package/dist/types/twisty/views/2D/Twisty2DPuzzle.css.d.ts.map +0 -1
- package/dist/types/twisty/views/2D/Twisty2DPuzzle.d.ts.map +0 -1
- package/dist/types/twisty/views/2D/Twisty2DPuzzleWrapper.d.ts.map +0 -1
- package/dist/types/twisty/views/2D/Twisty2DSceneWrapper.d.ts.map +0 -1
- package/dist/types/twisty/views/3D/DragTracker.d.ts.map +0 -1
- package/dist/types/twisty/views/3D/RendererPool.d.ts.map +0 -1
- package/dist/types/twisty/views/3D/TAU.d.ts.map +0 -1
- package/dist/types/twisty/views/3D/Twisty3DPuzzleWrapper.d.ts.map +0 -1
- package/dist/types/twisty/views/3D/Twisty3DRenderTarget.d.ts.map +0 -1
- package/dist/types/twisty/views/3D/Twisty3DScene.d.ts.map +0 -1
- package/dist/types/twisty/views/3D/Twisty3DSceneWrapper.d.ts.map +0 -1
- package/dist/types/twisty/views/3D/Twisty3DVantage.css.d.ts.map +0 -1
- package/dist/types/twisty/views/3D/Twisty3DVantage.d.ts.map +0 -1
- package/dist/types/twisty/views/3D/TwistyOrbitControls.d.ts.map +0 -1
- package/dist/types/twisty/views/3D/TwistyOrbitControls.spec.d.ts.map +0 -1
- package/dist/types/twisty/views/3D/puzzles/Cube3D.d.ts.map +0 -1
- package/dist/types/twisty/views/3D/puzzles/KPuzzleWrapper.d.ts +0 -48
- package/dist/types/twisty/views/3D/puzzles/KPuzzleWrapper.d.ts.map +0 -1
- package/dist/types/twisty/views/3D/puzzles/PG3D.d.ts.map +0 -1
- package/dist/types/twisty/views/3D/puzzles/Twisty3DPuzzle.d.ts.map +0 -1
- package/dist/types/twisty/views/ClassListManager.d.ts.map +0 -1
- package/dist/types/twisty/views/ManagedCustomElement.d.ts.map +0 -1
- package/dist/types/twisty/views/TwistyAlgEditor/LeafTokens.d.ts.map +0 -1
- package/dist/types/twisty/views/TwistyAlgEditor/TwistyAlgEditor.css.d.ts.map +0 -1
- package/dist/types/twisty/views/TwistyAlgEditor/TwistyAlgEditor.d.ts.map +0 -1
- package/dist/types/twisty/views/TwistyAlgEditor/TwistyAlgEditor.spec.d.ts.map +0 -1
- package/dist/types/twisty/views/TwistyAlgEditor/model.d.ts.map +0 -1
- package/dist/types/twisty/views/TwistyAlgViewer.css.d.ts.map +0 -1
- package/dist/types/twisty/views/TwistyAlgViewer.d.ts.map +0 -1
- package/dist/types/twisty/views/TwistyPlayer.css.d.ts.map +0 -1
- package/dist/types/twisty/views/TwistyPlayer.d.ts.map +0 -1
- package/dist/types/twisty/views/TwistyPlayerSettable.d.ts.map +0 -1
- package/dist/types/twisty/views/TwistyViewerWrapper.css.d.ts.map +0 -1
- package/dist/types/twisty/views/canvas.d.ts.map +0 -1
- package/dist/types/twisty/views/control-panel/TwistyButtonsV2.css.d.ts.map +0 -1
- package/dist/types/twisty/views/control-panel/TwistyButtonsV2.d.ts.map +0 -1
- package/dist/types/twisty/views/control-panel/TwistyScrubber.css.d.ts.map +0 -1
- package/dist/types/twisty/views/control-panel/TwistyScrubberV2.d.ts.map +0 -1
- package/dist/types/twisty/views/control-panel/webkit-fullscreen.d.ts.map +0 -1
- package/dist/types/twisty/views/document.d.ts.map +0 -1
- package/dist/types/twisty/views/node-custom-element-shims.d.ts.map +0 -1
- package/dist/types/twisty/views/screenshot.d.ts.map +0 -1
- package/dist/types/twisty/views/stream/TwistyStreamSource.css.d.ts.map +0 -1
- package/dist/types/twisty/views/stream/TwistyStreamSource.d.ts.map +0 -1
- package/dist/types/vendor/p-lazy/p-lazy.d.ts.map +0 -1
- package/dist/types/vendor/three/examples/jsm/libs/stats.modified.module.d.ts.map +0 -1
- package/docs/.DS_Store +0 -0
- package/docs/CNAME +0 -1
- package/docs/cubing/.DS_Store +0 -0
- package/docs/cubing/alg/index.html +0 -174
- package/docs/cubing/api/index.html +0 -158
- package/docs/cubing/index.html +0 -151
- package/docs/cubing/scramble/index.html +0 -138
- package/docs/cubing/twisty/index.html +0 -329
- package/docs/favicon.ico +0 -0
- package/docs/index.html +0 -20
- package/docs/main.css +0 -192
- package/kpuzzle/index.d.ts +0 -1
- package/notation/index.d.ts +0 -1
- package/protocol/index.d.ts +0 -1
- package/puzzle-geometry/index.d.ts +0 -1
- package/puzzles/index.d.ts +0 -1
- package/scramble/index.d.ts +0 -1
- package/search/index.d.ts +0 -1
- package/src/cubing/.DS_Store +0 -0
- package/src/cubing/alg/Alg.spec.ts +0 -10
- package/src/cubing/alg/Alg.ts +0 -290
- package/src/cubing/alg/AlgBuilder.ts +0 -33
- package/src/cubing/alg/Serializable.ts +0 -29
- package/src/cubing/alg/common.ts +0 -59
- package/src/cubing/alg/debug.ts +0 -27
- package/src/cubing/alg/example.ts +0 -152
- package/src/cubing/alg/index.ts +0 -21
- package/src/cubing/alg/is.ts +0 -38
- package/src/cubing/alg/iteration.ts +0 -45
- package/src/cubing/alg/keyboard.ts +0 -48
- package/src/cubing/alg/limits.ts +0 -4
- package/src/cubing/alg/operation.spec.ts +0 -48
- package/src/cubing/alg/operation.ts +0 -36
- package/src/cubing/alg/parse.spec.ts +0 -75
- package/src/cubing/alg/parse.ts +0 -408
- package/src/cubing/alg/test/alg-comparison.ts +0 -23
- package/src/cubing/alg/test/alg.spec.ts +0 -348
- package/src/cubing/alg/traversal.ts +0 -284
- package/src/cubing/alg/units/QuantumWithAmount.ts +0 -55
- package/src/cubing/alg/units/Unit.ts +0 -11
- package/src/cubing/alg/units/containers/Commutator.ts +0 -85
- package/src/cubing/alg/units/containers/Conjugate.ts +0 -53
- package/src/cubing/alg/units/containers/Grouping.ts +0 -116
- package/src/cubing/alg/units/index.ts +0 -8
- package/src/cubing/alg/units/leaves/LineComment.spec.ts +0 -35
- package/src/cubing/alg/units/leaves/LineComment.ts +0 -48
- package/src/cubing/alg/units/leaves/Move.spec.ts +0 -15
- package/src/cubing/alg/units/leaves/Move.ts +0 -265
- package/src/cubing/alg/units/leaves/Newline.ts +0 -24
- package/src/cubing/alg/units/leaves/Pause.ts +0 -24
- package/src/cubing/alg/url.spec.ts +0 -10
- package/src/cubing/alg/url.ts +0 -133
- package/src/cubing/alg/validation.ts +0 -62
- package/src/cubing/alg/warnOnce.ts +0 -7
- package/src/cubing/bluetooth/connect/index.ts +0 -93
- package/src/cubing/bluetooth/debug.ts +0 -18
- package/src/cubing/bluetooth/docs/gan-robot.md +0 -60
- package/src/cubing/bluetooth/docs/gan356i.md +0 -309
- package/src/cubing/bluetooth/index.ts +0 -19
- package/src/cubing/bluetooth/keyboard.ts +0 -55
- package/src/cubing/bluetooth/smart-puzzle/Heykube.ts +0 -165
- package/src/cubing/bluetooth/smart-puzzle/bluetooth-puzzle.ts +0 -95
- package/src/cubing/bluetooth/smart-puzzle/connect.ts +0 -19
- package/src/cubing/bluetooth/smart-puzzle/endianness.ts +0 -15
- package/src/cubing/bluetooth/smart-puzzle/gan.ts +0 -481
- package/src/cubing/bluetooth/smart-puzzle/giiker.spec.ts +0 -28
- package/src/cubing/bluetooth/smart-puzzle/giiker.ts +0 -277
- package/src/cubing/bluetooth/smart-puzzle/gocube.ts +0 -167
- package/src/cubing/bluetooth/smart-puzzle/unsafe-raw-aes.ts +0 -66
- package/src/cubing/bluetooth/smart-robot/GanRobot.ts +0 -311
- package/src/cubing/bluetooth/smart-robot/index.ts +0 -13
- package/src/cubing/bluetooth/smart-timer/GanTimer.ts +0 -141
- package/src/cubing/bluetooth/smart-timer/index.ts +0 -13
- package/src/cubing/bluetooth/transformer.ts +0 -74
- package/src/cubing/esm-test-worker.js +0 -5
- package/src/cubing/kpuzzle/3x3x3/3x3x3.kpuzzle.json.spec.ts +0 -40
- package/src/cubing/kpuzzle/3x3x3/3x3x3.kpuzzle.json.ts +0 -339
- package/src/cubing/kpuzzle/canon.spec.ts +0 -48
- package/src/cubing/kpuzzle/canonicalize.ts +0 -325
- package/src/cubing/kpuzzle/definition_types.ts +0 -23
- package/src/cubing/kpuzzle/index.ts +0 -33
- package/src/cubing/kpuzzle/kpuzzle.spec.ts +0 -12
- package/src/cubing/kpuzzle/kpuzzle.ts +0 -124
- package/src/cubing/kpuzzle/move_notation.ts +0 -9
- package/src/cubing/kpuzzle/parser/index.ts +0 -1
- package/src/cubing/kpuzzle/parser/parser-peggy.js +0 -1221
- package/src/cubing/kpuzzle/parser/parser-peggy.peggy +0 -72
- package/src/cubing/kpuzzle/parser/parser-shim.ts +0 -11
- package/src/cubing/kpuzzle/parser/parser.js +0 -0
- package/src/cubing/kpuzzle/prunetable.spec.ts +0 -19
- package/src/cubing/kpuzzle/pruningtable.ts +0 -99
- package/src/cubing/kpuzzle/puzzle-orientation.ts +0 -34
- package/src/cubing/kpuzzle/svg.ts +0 -290
- package/src/cubing/kpuzzle/transformations.spec.ts +0 -75
- package/src/cubing/kpuzzle/transformations.ts +0 -258
- package/src/cubing/notation/CountAnimatedLeaves.ts +0 -56
- package/src/cubing/notation/CountMoves.ts +0 -89
- package/src/cubing/notation/index.ts +0 -4
- package/src/cubing/protocol/binary/binary3x3x3.spec.ts +0 -143
- package/src/cubing/protocol/binary/binary3x3x3.ts +0 -226
- package/src/cubing/protocol/binary/hex.spec.ts +0 -17
- package/src/cubing/protocol/binary/hex.ts +0 -12
- package/src/cubing/protocol/binary/orbit-indexing.spec.ts +0 -49
- package/src/cubing/protocol/binary/orbit-indexing.ts +0 -68
- package/src/cubing/protocol/binary/puzzle-orientation.ts +0 -69
- package/src/cubing/protocol/index.ts +0 -12
- package/src/cubing/puzzle-geometry/FaceNameSwizzler.ts +0 -148
- package/src/cubing/puzzle-geometry/Options.ts +0 -179
- package/src/cubing/puzzle-geometry/PGPuzzles.spec.ts +0 -127
- package/src/cubing/puzzle-geometry/PGPuzzles.ts +0 -80
- package/src/cubing/puzzle-geometry/Perm.ts +0 -154
- package/src/cubing/puzzle-geometry/PermOriSet.ts +0 -765
- package/src/cubing/puzzle-geometry/PlatonicGenerator.ts +0 -146
- package/src/cubing/puzzle-geometry/PuzzleGeometry.ts +0 -3009
- package/src/cubing/puzzle-geometry/Quat.spec.ts +0 -10
- package/src/cubing/puzzle-geometry/Quat.ts +0 -325
- package/src/cubing/puzzle-geometry/SchreierSims.ts +0 -144
- package/src/cubing/puzzle-geometry/index.ts +0 -17
- package/src/cubing/puzzle-geometry/interfaces.ts +0 -6
- package/src/cubing/puzzle-geometry/notation-mapping/FTONotationMapper.ts +0 -38
- package/src/cubing/puzzle-geometry/notation-mapping/FaceRenamingMapper.ts +0 -59
- package/src/cubing/puzzle-geometry/notation-mapping/MegaminxScramblingNotationMapper.ts +0 -50
- package/src/cubing/puzzle-geometry/notation-mapping/NotationMapper.ts +0 -6
- package/src/cubing/puzzle-geometry/notation-mapping/NullMapper.ts +0 -12
- package/src/cubing/puzzle-geometry/notation-mapping/NxNxNCubeMapper.ts +0 -77
- package/src/cubing/puzzle-geometry/notation-mapping/PyraminxNotationMapper.ts +0 -121
- package/src/cubing/puzzle-geometry/notation-mapping/SkewbNotationMapper.ts +0 -103
- package/src/cubing/puzzle-geometry/notation-mapping/index.ts +0 -13
- package/src/cubing/puzzle-geometry/orientcenters.spec.ts +0 -55
- package/src/cubing/puzzles/PuzzleLoader.ts +0 -20
- package/src/cubing/puzzles/async/async-pg3d.ts +0 -73
- package/src/cubing/puzzles/customPGPuzzleLoader.ts +0 -60
- package/src/cubing/puzzles/implementations/2x2x2/2x2x2.kpuzzle.json.ts +0 -92
- package/src/cubing/puzzles/implementations/2x2x2/2x2x2.kpuzzle.svg.ts +0 -45
- package/src/cubing/puzzles/implementations/2x2x2/index.ts +0 -25
- package/src/cubing/puzzles/implementations/2x2x2/svg/2x2x2.kpuzzle.svg +0 -45
- package/src/cubing/puzzles/implementations/3x3x3/3x3x3-ll.kpuzzle.svg.ts +0 -108
- package/src/cubing/puzzles/implementations/3x3x3/3x3x3.kpuzzle.svg.ts +0 -128
- package/src/cubing/puzzles/implementations/3x3x3/index.ts +0 -33
- package/src/cubing/puzzles/implementations/3x3x3/src/3x3x3-ll.kpuzzle.svg +0 -108
- package/src/cubing/puzzles/implementations/3x3x3/src/3x3x3.kpuzzle.svg +0 -128
- package/src/cubing/puzzles/implementations/TODO/svg/alg/3x3x3.kpuzzle.original.svg +0 -128
- package/src/cubing/puzzles/implementations/TODO/svg/alg/3x3x3.kpuzzle.outlined.svg +0 -486
- package/src/cubing/puzzles/implementations/TODO/svg/alg/3x3x3.kpuzzle.spaced.svg +0 -128
- package/src/cubing/puzzles/implementations/clock/clock.kpuzzle.json.ts +0 -241
- package/src/cubing/puzzles/implementations/clock/clock.kpuzzle.svg.ts +0 -369
- package/src/cubing/puzzles/implementations/clock/index.ts +0 -14
- package/src/cubing/puzzles/implementations/clock/src/clock.kpuzzle.svg +0 -369
- package/src/cubing/puzzles/implementations/fto/index.ts +0 -28
- package/src/cubing/puzzles/implementations/megaminx/index.ts +0 -20
- package/src/cubing/puzzles/implementations/pyraminx/index.ts +0 -18
- package/src/cubing/puzzles/implementations/pyraminx/pyraminx.kpuzzle.json.ts +0 -84
- package/src/cubing/puzzles/implementations/pyraminx/pyraminx.kpuzzle.svg.ts +0 -88
- package/src/cubing/puzzles/implementations/pyraminx/src/pyraminx.kpuzzle.svg +0 -87
- package/src/cubing/puzzles/implementations/square1/index.ts +0 -14
- package/src/cubing/puzzles/implementations/square1/sq1-hyperorbit.kpuzzle.json.ts +0 -62
- package/src/cubing/puzzles/implementations/square1/sq1-hyperorbit.kpuzzle.svg.ts +0 -295
- package/src/cubing/puzzles/implementations/square1/src/sq1-hyperorbit.kpuzzle.svg +0 -295
- package/src/cubing/puzzles/implementations/square1/src/sq1-simple.svg +0 -60
- package/src/cubing/puzzles/index.ts +0 -92
- package/src/cubing/puzzles/stickerings/appearance.ts +0 -292
- package/src/cubing/puzzles/stickerings/cube-stickerings.ts +0 -286
- package/src/cubing/puzzles/stickerings/fto-stickerings.ts +0 -105
- package/src/cubing/puzzles/stickerings/global-custom-stickering-hack.ts +0 -61
- package/src/cubing/puzzles/stickerings/megaminx-stickerings.ts +0 -26
- package/src/cubing/scramble/index.ts +0 -1
- package/src/cubing/search/.gitignore +0 -1
- package/src/cubing/search/esm-test-worker.js +0 -14
- package/src/cubing/search/index.ts +0 -12
- package/src/cubing/search/inside/api.spec.ts +0 -37
- package/src/cubing/search/inside/api.ts +0 -171
- package/src/cubing/search/inside/entry.js +0 -4
- package/src/cubing/search/inside/inside-worker.ts +0 -13
- package/src/cubing/search/inside/solve/addOrientationSuffix.ts +0 -17
- package/src/cubing/search/inside/solve/parseSGS.ts +0 -119
- package/src/cubing/search/inside/solve/puzzles/2x2x2.ts +0 -92
- package/src/cubing/search/inside/solve/puzzles/3x3x3/convert.ts +0 -137
- package/src/cubing/search/inside/solve/puzzles/3x3x3/filter.ts +0 -60
- package/src/cubing/search/inside/solve/puzzles/3x3x3/index.ts +0 -57
- package/src/cubing/search/inside/solve/puzzles/3x3x3/legacy-sgs.ts +0 -291
- package/src/cubing/search/inside/solve/puzzles/3x3x3-inefficient.sgs.json.ts +0 -272
- package/src/cubing/search/inside/solve/puzzles/4x4x4.ts +0 -16
- package/src/cubing/search/inside/solve/puzzles/5x5x5.ts +0 -12
- package/src/cubing/search/inside/solve/puzzles/FTO.sgs +0 -264
- package/src/cubing/search/inside/solve/puzzles/big-cubes.ts +0 -78
- package/src/cubing/search/inside/solve/puzzles/clock.ts +0 -48
- package/src/cubing/search/inside/solve/puzzles/megaminx.ts +0 -51
- package/src/cubing/search/inside/solve/puzzles/pyraminx.ts +0 -48
- package/src/cubing/search/inside/solve/puzzles/sgs-defs.spec.ts +0 -27
- package/src/cubing/search/inside/solve/puzzles/skewb.sgs.json.ts +0 -113
- package/src/cubing/search/inside/solve/puzzles/skewb.ts +0 -65
- package/src/cubing/search/inside/solve/puzzles/sq1.ts +0 -6
- package/src/cubing/search/inside/solve/puzzles/wca-minx.ts +0 -32
- package/src/cubing/search/inside/solve/tremble.ts +0 -212
- package/src/cubing/search/inside/solve/vendor/cstimer/LICENSE +0 -674
- package/src/cubing/search/inside/solve/vendor/cstimer/src/js/lib/mathlib.ts +0 -54
- package/src/cubing/search/inside/solve/vendor/min2phase/gwt.d.ts +0 -2
- package/src/cubing/search/inside/solve/vendor/random-uint-below/get-random-values.ts +0 -38
- package/src/cubing/search/inside/solve/vendor/random-uint-below/index.ts +0 -12
- package/src/cubing/search/inside/solve/vendor/random-uint-below/random-choice.ts +0 -9
- package/src/cubing/search/inside/solve/vendor/random-uint-below/random-int.ts +0 -64
- package/src/cubing/search/instantiator.ts +0 -60
- package/src/cubing/search/outside.ts +0 -110
- package/src/cubing/search/vendor/comlink-everywhere/comlink-everywhere.webloc +0 -8
- package/src/cubing/search/vendor/comlink-everywhere/inside/index.js +0 -16
- package/src/cubing/search/vendor/comlink-everywhere/inside/node.js +0 -6
- package/src/cubing/search/vendor/comlink-everywhere/outside/index.d.ts +0 -6
- package/src/cubing/search/vendor/comlink-everywhere/outside/index.js +0 -31
- package/src/cubing/search/vendor/comlink-everywhere/outside/node.js +0 -41
- package/src/cubing/search/worker-inside-generated-string.js +0 -1
- package/src/cubing/stream/index.ts +0 -12
- package/src/cubing/stream/process/ReorientedStream.ts +0 -93
- package/src/cubing/stream/proxy-event.ts +0 -16
- package/src/cubing/stream/twizzle/TwizzleStream.ts +0 -53
- package/src/cubing/stream/twizzle/stream-types.ts +0 -45
- package/src/cubing/stream/websocket-proxy.ts +0 -73
- package/src/cubing/twisty/.DS_Store +0 -0
- package/src/cubing/twisty/controllers/.DS_Store +0 -0
- package/src/cubing/twisty/controllers/AnimationTypes.ts +0 -50
- package/src/cubing/twisty/controllers/RenderScheduler.ts +0 -28
- package/src/cubing/twisty/controllers/TwistyAnimationController.ts +0 -325
- package/src/cubing/twisty/controllers/TwistyPlayerController.ts +0 -38
- package/src/cubing/twisty/controllers/animation/.DS_Store +0 -0
- package/src/cubing/twisty/controllers/easing.ts +0 -3
- package/src/cubing/twisty/controllers/indexer/.DS_Store +0 -0
- package/src/cubing/twisty/controllers/indexer/AlgDuration.ts +0 -94
- package/src/cubing/twisty/controllers/indexer/AlgIndexer.ts +0 -87
- package/src/cubing/twisty/controllers/indexer/SimpleAlgIndexer.ts +0 -76
- package/src/cubing/twisty/controllers/indexer/simultaneous-moves/SimultaneousMoveIndexer.ts +0 -181
- package/src/cubing/twisty/controllers/indexer/simultaneous-moves/SimultaneousMoveIndexerV2.ts +0 -243
- package/src/cubing/twisty/controllers/indexer/simultaneous-moves/simul-moves.ts +0 -193
- package/src/cubing/twisty/controllers/indexer/tree/AlgWalker.ts +0 -439
- package/src/cubing/twisty/controllers/indexer/tree/TreeAlgIndexer.ts +0 -97
- package/src/cubing/twisty/controllers/indexer/tree/chunkAlgs.ts +0 -81
- package/src/cubing/twisty/controllers/stream/timeline-move-calculation-draft.spec.ts.TODO +0 -59
- package/src/cubing/twisty/controllers/stream/timeline-move-calculation-draft.ts +0 -162
- package/src/cubing/twisty/heavy-code-imports/.DS_Store +0 -0
- package/src/cubing/twisty/heavy-code-imports/3d.ts +0 -18
- package/src/cubing/twisty/heavy-code-imports/dynamic-entries/3d.ts +0 -31
- package/src/cubing/twisty/index.ts +0 -24
- package/src/cubing/twisty/model/.DS_Store +0 -0
- package/src/cubing/twisty/model/PromiseFreshener.ts +0 -49
- package/src/cubing/twisty/model/TwistyPlayerModel.ts +0 -254
- package/src/cubing/twisty/model/UserVisibleErrorTracker.ts +0 -22
- package/src/cubing/twisty/model/helpers.ts +0 -47
- package/src/cubing/twisty/model/props/.DS_Store +0 -0
- package/src/cubing/twisty/model/props/TwistyProp.spec.ts +0 -38
- package/src/cubing/twisty/model/props/TwistyProp.ts +0 -366
- package/src/cubing/twisty/model/props/TwistyPropDebugger.ts +0 -370
- package/src/cubing/twisty/model/props/general/URLProp.ts +0 -14
- package/src/cubing/twisty/model/props/puzzle/.DS_Store +0 -0
- package/src/cubing/twisty/model/props/puzzle/display/FoundationDisplayProp.ts +0 -9
- package/src/cubing/twisty/model/props/puzzle/display/HintFaceletProp.ts +0 -15
- package/src/cubing/twisty/model/props/puzzle/display/SpriteProp.ts +0 -43
- package/src/cubing/twisty/model/props/puzzle/display/StickeringProp.ts +0 -54
- package/src/cubing/twisty/model/props/puzzle/state/AlgProp.ts +0 -91
- package/src/cubing/twisty/model/props/puzzle/state/AlgTransformationProp.ts +0 -28
- package/src/cubing/twisty/model/props/puzzle/state/AnchoredStartProp.ts +0 -44
- package/src/cubing/twisty/model/props/puzzle/state/CatchUpMoveProp.ts +0 -17
- package/src/cubing/twisty/model/props/puzzle/state/CurrentLeavesProp.ts +0 -109
- package/src/cubing/twisty/model/props/puzzle/state/CurrentLeavesSimplified.ts +0 -48
- package/src/cubing/twisty/model/props/puzzle/state/CurrentTransformationProp.ts +0 -46
- package/src/cubing/twisty/model/props/puzzle/state/IndexerConstructorProp.ts +0 -53
- package/src/cubing/twisty/model/props/puzzle/state/IndexerConstructorRequestProp.ts +0 -15
- package/src/cubing/twisty/model/props/puzzle/state/IndexerProp.ts +0 -24
- package/src/cubing/twisty/model/props/puzzle/state/LegacyPositionProp.ts +0 -22
- package/src/cubing/twisty/model/props/puzzle/state/MovePressInputProp.ts +0 -9
- package/src/cubing/twisty/model/props/puzzle/state/NaiveMoveCountProp.ts +0 -20
- package/src/cubing/twisty/model/props/puzzle/state/PuzzleAlgProp.ts +0 -28
- package/src/cubing/twisty/model/props/puzzle/state/SetupAnchorProp.ts +0 -14
- package/src/cubing/twisty/model/props/puzzle/structure/PuzzleDefProp.ts +0 -14
- package/src/cubing/twisty/model/props/puzzle/structure/PuzzleDescriptionProp.ts +0 -14
- package/src/cubing/twisty/model/props/puzzle/structure/PuzzleIDProp.ts +0 -12
- package/src/cubing/twisty/model/props/puzzle/structure/PuzzleIDRequestProp.ts +0 -36
- package/src/cubing/twisty/model/props/puzzle/structure/PuzzleLoaderProp.ts +0 -38
- package/src/cubing/twisty/model/props/timeline/CoarseTimelineInfoProp.ts +0 -45
- package/src/cubing/twisty/model/props/timeline/DetailedTimelineInfoProp.ts +0 -78
- package/src/cubing/twisty/model/props/timeline/PlayingInfoProp.ts +0 -48
- package/src/cubing/twisty/model/props/timeline/TempoScaleProp.ts +0 -13
- package/src/cubing/twisty/model/props/timeline/TimestampRequestProp.ts +0 -38
- package/src/cubing/twisty/model/props/viewer/BackViewProp.ts +0 -16
- package/src/cubing/twisty/model/props/viewer/BackgroundProp.ts +0 -15
- package/src/cubing/twisty/model/props/viewer/ButtonAppearanceProp.ts +0 -86
- package/src/cubing/twisty/model/props/viewer/ControlPanelProp.ts +0 -14
- package/src/cubing/twisty/model/props/viewer/LatitudeLimit.ts +0 -11
- package/src/cubing/twisty/model/props/viewer/OrbitCoordinatesProp.ts +0 -127
- package/src/cubing/twisty/model/props/viewer/OrbitCoordinatesRequestProp.ts +0 -69
- package/src/cubing/twisty/model/props/viewer/TimeRangeProp.ts +0 -15
- package/src/cubing/twisty/model/props/viewer/ViewerLinkProp.ts +0 -14
- package/src/cubing/twisty/model/props/viewer/VisualizationProp.ts +0 -17
- package/src/cubing/twisty/model/props/viewer/VisualizationStrategyProp.ts +0 -45
- package/src/cubing/twisty/old/.DS_Store +0 -0
- package/src/cubing/twisty/old/animation/.DS_Store +0 -0
- package/src/cubing/twisty/old/dom/.DS_Store +0 -0
- package/src/cubing/twisty/views/.DS_Store +0 -0
- package/src/cubing/twisty/views/2D/Twisty2DPuzzle.css.ts +0 -26
- package/src/cubing/twisty/views/2D/Twisty2DPuzzle.ts +0 -146
- package/src/cubing/twisty/views/2D/Twisty2DPuzzleWrapper.ts +0 -52
- package/src/cubing/twisty/views/2D/Twisty2DSceneWrapper.ts +0 -77
- package/src/cubing/twisty/views/3D/.DS_Store +0 -0
- package/src/cubing/twisty/views/3D/DragTracker.ts +0 -184
- package/src/cubing/twisty/views/3D/RendererPool.ts +0 -54
- package/src/cubing/twisty/views/3D/TAU.ts +0 -2
- package/src/cubing/twisty/views/3D/Twisty3DPuzzleWrapper.ts +0 -214
- package/src/cubing/twisty/views/3D/Twisty3DRenderTarget.ts +0 -5
- package/src/cubing/twisty/views/3D/Twisty3DScene.ts +0 -42
- package/src/cubing/twisty/views/3D/Twisty3DSceneWrapper.ts +0 -189
- package/src/cubing/twisty/views/3D/Twisty3DVantage.css.ts +0 -32
- package/src/cubing/twisty/views/3D/Twisty3DVantage.ts +0 -312
- package/src/cubing/twisty/views/3D/TwistyOrbitControls.spec.ts +0 -213
- package/src/cubing/twisty/views/3D/TwistyOrbitControls.ts +0 -176
- package/src/cubing/twisty/views/3D/puzzles/Cube3D.ts +0 -966
- package/src/cubing/twisty/views/3D/puzzles/KPuzzleWrapper.ts +0 -142
- package/src/cubing/twisty/views/3D/puzzles/PG3D.ts +0 -1078
- package/src/cubing/twisty/views/3D/puzzles/Twisty3DPuzzle.ts +0 -6
- package/src/cubing/twisty/views/ClassListManager.ts +0 -34
- package/src/cubing/twisty/views/ManagedCustomElement.ts +0 -76
- package/src/cubing/twisty/views/TwistyAlgEditor/LeafTokens.ts +0 -116
- package/src/cubing/twisty/views/TwistyAlgEditor/TwistyAlgEditor.css.ts +0 -72
- package/src/cubing/twisty/views/TwistyAlgEditor/TwistyAlgEditor.spec.ts +0 -57
- package/src/cubing/twisty/views/TwistyAlgEditor/TwistyAlgEditor.ts +0 -368
- package/src/cubing/twisty/views/TwistyAlgEditor/model.ts +0 -179
- package/src/cubing/twisty/views/TwistyAlgViewer.css.ts +0 -25
- package/src/cubing/twisty/views/TwistyAlgViewer.ts +0 -502
- package/src/cubing/twisty/views/TwistyPlayer.css.ts +0 -73
- package/src/cubing/twisty/views/TwistyPlayer.ts +0 -362
- package/src/cubing/twisty/views/TwistyPlayerSettable.ts +0 -115
- package/src/cubing/twisty/views/TwistyViewerWrapper.css.ts +0 -41
- package/src/cubing/twisty/views/canvas.ts +0 -9
- package/src/cubing/twisty/views/control-panel/TwistyButtonsV2.css.ts +0 -127
- package/src/cubing/twisty/views/control-panel/TwistyButtonsV2.ts +0 -156
- package/src/cubing/twisty/views/control-panel/TwistyScrubber.css.ts +0 -48
- package/src/cubing/twisty/views/control-panel/TwistyScrubberV2.ts +0 -145
- package/src/cubing/twisty/views/control-panel/webkit-fullscreen.ts +0 -44
- package/src/cubing/twisty/views/document.ts +0 -4
- package/src/cubing/twisty/views/node-custom-element-shims.ts +0 -30
- package/src/cubing/twisty/views/screenshot.ts +0 -90
- package/src/cubing/twisty/views/stream/TwistyStreamSource.css.ts +0 -17
- package/src/cubing/twisty/views/stream/TwistyStreamSource.ts +0 -155
- package/src/cubing/vendor/p-lazy/license +0 -9
- package/src/cubing/vendor/p-lazy/p-lazy.ts +0 -52
- package/src/cubing/vendor/p-lazy/readme.md +0 -54
- package/src/cubing/vendor/three/examples/jsm/libs/stats.modified.module.ts +0 -179
- package/stream/index.d.ts +0 -1
- package/twisty/index.d.ts +0 -1
|
@@ -1,1210 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
var __privateGet = (obj, member, getter) => {
|
|
6
|
-
__accessCheck(obj, member, "read from private field");
|
|
7
|
-
return getter ? getter.call(obj) : member.get(obj);
|
|
8
|
-
};
|
|
9
|
-
var __privateAdd = (obj, member, value) => {
|
|
10
|
-
if (member.has(obj))
|
|
11
|
-
throw TypeError("Cannot add the same private member more than once");
|
|
12
|
-
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
13
|
-
};
|
|
14
|
-
var __privateSet = (obj, member, value, setter) => {
|
|
15
|
-
__accessCheck(obj, member, "write to private field");
|
|
16
|
-
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
17
|
-
return value;
|
|
18
|
-
};
|
|
19
|
-
var __privateWrapper = (obj, member, setter, getter) => {
|
|
20
|
-
return {
|
|
21
|
-
set _(value) {
|
|
22
|
-
__privateSet(obj, member, value, setter);
|
|
23
|
-
},
|
|
24
|
-
get _() {
|
|
25
|
-
return __privateGet(obj, member, getter);
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
var __privateMethod = (obj, member, method) => {
|
|
30
|
-
__accessCheck(obj, member, "access private method");
|
|
31
|
-
return method;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
// src/cubing/alg/common.ts
|
|
35
|
-
var writeAlgDebugField = false;
|
|
36
|
-
var Comparable = class {
|
|
37
|
-
is(c) {
|
|
38
|
-
return this instanceof c;
|
|
39
|
-
}
|
|
40
|
-
as(c) {
|
|
41
|
-
return this instanceof c ? this : null;
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
var AlgCommon = class extends Comparable {
|
|
45
|
-
constructor() {
|
|
46
|
-
super();
|
|
47
|
-
if (writeAlgDebugField) {
|
|
48
|
-
Object.defineProperty(this, "_debugStr", {
|
|
49
|
-
get: () => {
|
|
50
|
-
return this.toString();
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
get log() {
|
|
56
|
-
return console.log.bind(console, this, this.toString());
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
// src/cubing/alg/iteration.ts
|
|
61
|
-
var IterationDirection;
|
|
62
|
-
(function(IterationDirection3) {
|
|
63
|
-
IterationDirection3[IterationDirection3["Forwards"] = 1] = "Forwards";
|
|
64
|
-
IterationDirection3[IterationDirection3["Backwards"] = -1] = "Backwards";
|
|
65
|
-
})(IterationDirection || (IterationDirection = {}));
|
|
66
|
-
function toggleDirection(iterationDirection, flip = true) {
|
|
67
|
-
if (!flip) {
|
|
68
|
-
return iterationDirection;
|
|
69
|
-
}
|
|
70
|
-
switch (iterationDirection) {
|
|
71
|
-
case 1:
|
|
72
|
-
return -1;
|
|
73
|
-
case -1:
|
|
74
|
-
return 1;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
function direct(g, iterDir) {
|
|
78
|
-
return iterDir === -1 ? Array.from(g).reverse() : g;
|
|
79
|
-
}
|
|
80
|
-
function reverse(g) {
|
|
81
|
-
return Array.from(g).reverse();
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
// src/cubing/alg/limits.ts
|
|
85
|
-
var MAX_INT = 2147483647;
|
|
86
|
-
var MAX_INT_DESCRIPTION = "2^31 - 1";
|
|
87
|
-
var MIN_INT = -2147483648;
|
|
88
|
-
|
|
89
|
-
// src/cubing/alg/AlgBuilder.ts
|
|
90
|
-
var _units;
|
|
91
|
-
var AlgBuilder = class {
|
|
92
|
-
constructor() {
|
|
93
|
-
__privateAdd(this, _units, []);
|
|
94
|
-
}
|
|
95
|
-
push(u) {
|
|
96
|
-
__privateGet(this, _units).push(u);
|
|
97
|
-
}
|
|
98
|
-
experimentalPushAlg(alg) {
|
|
99
|
-
for (const u of alg.units()) {
|
|
100
|
-
this.push(u);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
experimentalNumUnits() {
|
|
104
|
-
return __privateGet(this, _units).length;
|
|
105
|
-
}
|
|
106
|
-
toAlg() {
|
|
107
|
-
return new Alg(__privateGet(this, _units));
|
|
108
|
-
}
|
|
109
|
-
reset() {
|
|
110
|
-
__privateSet(this, _units, []);
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
|
-
_units = new WeakMap();
|
|
114
|
-
|
|
115
|
-
// src/cubing/alg/units/containers/Commutator.ts
|
|
116
|
-
var _A, _B;
|
|
117
|
-
var _Commutator = class extends AlgCommon {
|
|
118
|
-
constructor(aSource, bSource) {
|
|
119
|
-
super();
|
|
120
|
-
__privateAdd(this, _A, void 0);
|
|
121
|
-
__privateAdd(this, _B, void 0);
|
|
122
|
-
__privateSet(this, _A, experimentalEnsureAlg(aSource));
|
|
123
|
-
__privateSet(this, _B, experimentalEnsureAlg(bSource));
|
|
124
|
-
}
|
|
125
|
-
get A() {
|
|
126
|
-
return __privateGet(this, _A);
|
|
127
|
-
}
|
|
128
|
-
get B() {
|
|
129
|
-
return __privateGet(this, _B);
|
|
130
|
-
}
|
|
131
|
-
isIdentical(other) {
|
|
132
|
-
const otherAsCommutator = other.as(_Commutator);
|
|
133
|
-
return !!(otherAsCommutator?.A.isIdentical(this.A) && otherAsCommutator?.B.isIdentical(this.B));
|
|
134
|
-
}
|
|
135
|
-
invert() {
|
|
136
|
-
return new _Commutator(__privateGet(this, _B), __privateGet(this, _A));
|
|
137
|
-
}
|
|
138
|
-
*experimentalExpand(iterDir = IterationDirection.Forwards, depth) {
|
|
139
|
-
depth ?? (depth = Infinity);
|
|
140
|
-
if (depth === 0) {
|
|
141
|
-
yield iterDir === IterationDirection.Forwards ? this : this.invert();
|
|
142
|
-
} else {
|
|
143
|
-
if (iterDir === IterationDirection.Forwards) {
|
|
144
|
-
yield* this.A.experimentalExpand(IterationDirection.Forwards, depth - 1);
|
|
145
|
-
yield* this.B.experimentalExpand(IterationDirection.Forwards, depth - 1);
|
|
146
|
-
yield* this.A.experimentalExpand(IterationDirection.Backwards, depth - 1);
|
|
147
|
-
yield* this.B.experimentalExpand(IterationDirection.Backwards, depth - 1);
|
|
148
|
-
} else {
|
|
149
|
-
yield* this.B.experimentalExpand(IterationDirection.Forwards, depth - 1);
|
|
150
|
-
yield* this.A.experimentalExpand(IterationDirection.Forwards, depth - 1);
|
|
151
|
-
yield* this.B.experimentalExpand(IterationDirection.Backwards, depth - 1);
|
|
152
|
-
yield* this.A.experimentalExpand(IterationDirection.Backwards, depth - 1);
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
toString() {
|
|
157
|
-
return `[${__privateGet(this, _A).toString()}, ${__privateGet(this, _B).toString()}]`;
|
|
158
|
-
}
|
|
159
|
-
};
|
|
160
|
-
var Commutator = _Commutator;
|
|
161
|
-
_A = new WeakMap();
|
|
162
|
-
_B = new WeakMap();
|
|
163
|
-
|
|
164
|
-
// src/cubing/alg/units/containers/Conjugate.ts
|
|
165
|
-
var _A2, _B2;
|
|
166
|
-
var _Conjugate = class extends AlgCommon {
|
|
167
|
-
constructor(aSource, bSource) {
|
|
168
|
-
super();
|
|
169
|
-
__privateAdd(this, _A2, void 0);
|
|
170
|
-
__privateAdd(this, _B2, void 0);
|
|
171
|
-
__privateSet(this, _A2, experimentalEnsureAlg(aSource));
|
|
172
|
-
__privateSet(this, _B2, experimentalEnsureAlg(bSource));
|
|
173
|
-
}
|
|
174
|
-
get A() {
|
|
175
|
-
return __privateGet(this, _A2);
|
|
176
|
-
}
|
|
177
|
-
get B() {
|
|
178
|
-
return __privateGet(this, _B2);
|
|
179
|
-
}
|
|
180
|
-
isIdentical(other) {
|
|
181
|
-
const otherAsConjugate = other.as(_Conjugate);
|
|
182
|
-
return !!(otherAsConjugate?.A.isIdentical(this.A) && otherAsConjugate?.B.isIdentical(this.B));
|
|
183
|
-
}
|
|
184
|
-
invert() {
|
|
185
|
-
return new _Conjugate(__privateGet(this, _A2), __privateGet(this, _B2).invert());
|
|
186
|
-
}
|
|
187
|
-
*experimentalExpand(iterDir, depth) {
|
|
188
|
-
depth ?? (depth = Infinity);
|
|
189
|
-
if (depth === 0) {
|
|
190
|
-
yield iterDir === IterationDirection.Forwards ? this : this.invert();
|
|
191
|
-
} else {
|
|
192
|
-
yield* this.A.experimentalExpand(IterationDirection.Forwards, depth - 1);
|
|
193
|
-
yield* this.B.experimentalExpand(iterDir, depth - 1);
|
|
194
|
-
yield* this.A.experimentalExpand(IterationDirection.Backwards, depth - 1);
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
toString() {
|
|
198
|
-
return `[${this.A}: ${this.B}]`;
|
|
199
|
-
}
|
|
200
|
-
};
|
|
201
|
-
var Conjugate = _Conjugate;
|
|
202
|
-
_A2 = new WeakMap();
|
|
203
|
-
_B2 = new WeakMap();
|
|
204
|
-
|
|
205
|
-
// src/cubing/alg/units/leaves/LineComment.ts
|
|
206
|
-
var _text;
|
|
207
|
-
var _LineComment = class extends AlgCommon {
|
|
208
|
-
constructor(commentText) {
|
|
209
|
-
super();
|
|
210
|
-
__privateAdd(this, _text, void 0);
|
|
211
|
-
if (commentText.includes("\n") || commentText.includes("\r")) {
|
|
212
|
-
throw new Error("LineComment cannot contain newline");
|
|
213
|
-
}
|
|
214
|
-
__privateSet(this, _text, commentText);
|
|
215
|
-
}
|
|
216
|
-
get text() {
|
|
217
|
-
return __privateGet(this, _text);
|
|
218
|
-
}
|
|
219
|
-
isIdentical(other) {
|
|
220
|
-
const otherAsLineComment = other;
|
|
221
|
-
return other.is(_LineComment) && __privateGet(this, _text) === __privateGet(otherAsLineComment, _text);
|
|
222
|
-
}
|
|
223
|
-
invert() {
|
|
224
|
-
return this;
|
|
225
|
-
}
|
|
226
|
-
*experimentalExpand(_iterDir = IterationDirection.Forwards, _depth = Infinity) {
|
|
227
|
-
yield this;
|
|
228
|
-
}
|
|
229
|
-
toString() {
|
|
230
|
-
return `//${__privateGet(this, _text)}`;
|
|
231
|
-
}
|
|
232
|
-
};
|
|
233
|
-
var LineComment = _LineComment;
|
|
234
|
-
_text = new WeakMap();
|
|
235
|
-
|
|
236
|
-
// src/cubing/alg/units/leaves/Newline.ts
|
|
237
|
-
var Newline = class extends AlgCommon {
|
|
238
|
-
toString() {
|
|
239
|
-
return `
|
|
240
|
-
`;
|
|
241
|
-
}
|
|
242
|
-
isIdentical(other) {
|
|
243
|
-
return other.is(Newline);
|
|
244
|
-
}
|
|
245
|
-
invert() {
|
|
246
|
-
return this;
|
|
247
|
-
}
|
|
248
|
-
*experimentalExpand(_iterDir = IterationDirection.Forwards, _depth = Infinity) {
|
|
249
|
-
yield this;
|
|
250
|
-
}
|
|
251
|
-
};
|
|
252
|
-
|
|
253
|
-
// src/cubing/alg/units/leaves/Pause.ts
|
|
254
|
-
var Pause = class extends AlgCommon {
|
|
255
|
-
toString() {
|
|
256
|
-
return `.`;
|
|
257
|
-
}
|
|
258
|
-
isIdentical(other) {
|
|
259
|
-
return other.is(Pause);
|
|
260
|
-
}
|
|
261
|
-
invert() {
|
|
262
|
-
return this;
|
|
263
|
-
}
|
|
264
|
-
*experimentalExpand(_iterDir = IterationDirection.Forwards, _depth = Infinity) {
|
|
265
|
-
yield this;
|
|
266
|
-
}
|
|
267
|
-
};
|
|
268
|
-
|
|
269
|
-
// src/cubing/alg/parse.ts
|
|
270
|
-
function parseIntWithEmptyFallback(n, emptyFallback) {
|
|
271
|
-
return n ? parseInt(n) : emptyFallback;
|
|
272
|
-
}
|
|
273
|
-
var amountRegex = /^(\d+)?('?)/;
|
|
274
|
-
var moveStartRegex = /^[_\dA-Za-z]/;
|
|
275
|
-
var quantumMoveRegex = /^((([1-9]\d*)-)?([1-9]\d*))?([_A-Za-z]+)?/;
|
|
276
|
-
var commentTextRegex = /^[^\n]*/;
|
|
277
|
-
var square1PairStart = /^(-?\d+), ?/;
|
|
278
|
-
var square1PairEnd = /^(-?\d+)\)/;
|
|
279
|
-
function parseAlg(s) {
|
|
280
|
-
return new AlgParser().parseAlg(s);
|
|
281
|
-
}
|
|
282
|
-
function parseMove(s) {
|
|
283
|
-
return new AlgParser().parseMove(s);
|
|
284
|
-
}
|
|
285
|
-
function parseQuantumMove(s) {
|
|
286
|
-
return new AlgParser().parseQuantumMove(s);
|
|
287
|
-
}
|
|
288
|
-
function addCharIndices(t, startCharIndex, endCharIndex) {
|
|
289
|
-
const parsedT = t;
|
|
290
|
-
parsedT.startCharIndex = startCharIndex;
|
|
291
|
-
parsedT.endCharIndex = endCharIndex;
|
|
292
|
-
return parsedT;
|
|
293
|
-
}
|
|
294
|
-
function transferCharIndex(from, to) {
|
|
295
|
-
if ("startCharIndex" in from) {
|
|
296
|
-
to.startCharIndex = from.startCharIndex;
|
|
297
|
-
}
|
|
298
|
-
if ("endCharIndex" in from) {
|
|
299
|
-
to.endCharIndex = from.endCharIndex;
|
|
300
|
-
}
|
|
301
|
-
return to;
|
|
302
|
-
}
|
|
303
|
-
var _input, _idx;
|
|
304
|
-
var AlgParser = class {
|
|
305
|
-
constructor() {
|
|
306
|
-
__privateAdd(this, _input, "");
|
|
307
|
-
__privateAdd(this, _idx, 0);
|
|
308
|
-
}
|
|
309
|
-
parseAlg(input) {
|
|
310
|
-
__privateSet(this, _input, input);
|
|
311
|
-
__privateSet(this, _idx, 0);
|
|
312
|
-
const alg = this.parseAlgWithStopping([]);
|
|
313
|
-
this.mustBeAtEndOfInput();
|
|
314
|
-
return alg;
|
|
315
|
-
}
|
|
316
|
-
parseMove(input) {
|
|
317
|
-
__privateSet(this, _input, input);
|
|
318
|
-
__privateSet(this, _idx, 0);
|
|
319
|
-
const move = this.parseMoveImpl();
|
|
320
|
-
this.mustBeAtEndOfInput();
|
|
321
|
-
return move;
|
|
322
|
-
}
|
|
323
|
-
parseQuantumMove(input) {
|
|
324
|
-
__privateSet(this, _input, input);
|
|
325
|
-
__privateSet(this, _idx, 0);
|
|
326
|
-
const quantumMove = this.parseQuantumMoveImpl();
|
|
327
|
-
this.mustBeAtEndOfInput();
|
|
328
|
-
return quantumMove;
|
|
329
|
-
}
|
|
330
|
-
mustBeAtEndOfInput() {
|
|
331
|
-
if (__privateGet(this, _idx) !== __privateGet(this, _input).length) {
|
|
332
|
-
throw new Error("parsing unexpectedly ended early");
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
parseAlgWithStopping(stopBefore) {
|
|
336
|
-
let algStartIdx = __privateGet(this, _idx);
|
|
337
|
-
let algEndIdx = __privateGet(this, _idx);
|
|
338
|
-
const algBuilder = new AlgBuilder();
|
|
339
|
-
let crowded = false;
|
|
340
|
-
const mustNotBeCrowded = (idx) => {
|
|
341
|
-
if (crowded) {
|
|
342
|
-
throw new Error(`Unexpected character at index ${idx}. Are you missing a space?`);
|
|
343
|
-
}
|
|
344
|
-
};
|
|
345
|
-
mainLoop:
|
|
346
|
-
while (__privateGet(this, _idx) < __privateGet(this, _input).length) {
|
|
347
|
-
const savedCharIndex = __privateGet(this, _idx);
|
|
348
|
-
if (stopBefore.includes(__privateGet(this, _input)[__privateGet(this, _idx)])) {
|
|
349
|
-
return addCharIndices(algBuilder.toAlg(), algStartIdx, algEndIdx);
|
|
350
|
-
}
|
|
351
|
-
if (this.tryConsumeNext(" ")) {
|
|
352
|
-
crowded = false;
|
|
353
|
-
if (algBuilder.experimentalNumUnits() === 0) {
|
|
354
|
-
algStartIdx = __privateGet(this, _idx);
|
|
355
|
-
}
|
|
356
|
-
continue mainLoop;
|
|
357
|
-
} else if (moveStartRegex.test(__privateGet(this, _input)[__privateGet(this, _idx)])) {
|
|
358
|
-
mustNotBeCrowded(savedCharIndex);
|
|
359
|
-
const move = this.parseMoveImpl();
|
|
360
|
-
algBuilder.push(move);
|
|
361
|
-
crowded = true;
|
|
362
|
-
algEndIdx = __privateGet(this, _idx);
|
|
363
|
-
continue mainLoop;
|
|
364
|
-
} else if (this.tryConsumeNext("(")) {
|
|
365
|
-
mustNotBeCrowded(savedCharIndex);
|
|
366
|
-
const sq1PairStartMatch = this.tryRegex(square1PairStart);
|
|
367
|
-
if (sq1PairStartMatch) {
|
|
368
|
-
const topAmountString = sq1PairStartMatch[1];
|
|
369
|
-
const savedCharIndexD = __privateGet(this, _idx);
|
|
370
|
-
const sq1PairEndMatch = this.parseRegex(square1PairEnd);
|
|
371
|
-
const uMove = addCharIndices(new Move(new QuantumMove("U_SQ_"), parseInt(topAmountString)), savedCharIndex + 1, savedCharIndex + 1 + topAmountString.length);
|
|
372
|
-
const dMove = addCharIndices(new Move(new QuantumMove("D_SQ_"), parseInt(sq1PairEndMatch[1])), savedCharIndexD, __privateGet(this, _idx) - 1);
|
|
373
|
-
const alg = addCharIndices(new Alg([uMove, dMove]), savedCharIndex + 1, __privateGet(this, _idx) - 1);
|
|
374
|
-
algBuilder.push(addCharIndices(new Grouping(alg), savedCharIndex, __privateGet(this, _idx)));
|
|
375
|
-
crowded = true;
|
|
376
|
-
algEndIdx = __privateGet(this, _idx);
|
|
377
|
-
continue mainLoop;
|
|
378
|
-
} else {
|
|
379
|
-
const alg = this.parseAlgWithStopping([")"]);
|
|
380
|
-
this.mustConsumeNext(")");
|
|
381
|
-
const amount = this.parseAmount();
|
|
382
|
-
algBuilder.push(addCharIndices(new Grouping(alg, amount), savedCharIndex, __privateGet(this, _idx)));
|
|
383
|
-
crowded = true;
|
|
384
|
-
algEndIdx = __privateGet(this, _idx);
|
|
385
|
-
continue mainLoop;
|
|
386
|
-
}
|
|
387
|
-
} else if (this.tryConsumeNext("[")) {
|
|
388
|
-
mustNotBeCrowded(savedCharIndex);
|
|
389
|
-
const A = this.parseAlgWithStopping([",", ":"]);
|
|
390
|
-
const separator = this.popNext();
|
|
391
|
-
const B = this.parseAlgWithStopping(["]"]);
|
|
392
|
-
this.mustConsumeNext("]");
|
|
393
|
-
switch (separator) {
|
|
394
|
-
case ":":
|
|
395
|
-
algBuilder.push(addCharIndices(new Conjugate(A, B), savedCharIndex, __privateGet(this, _idx)));
|
|
396
|
-
crowded = true;
|
|
397
|
-
algEndIdx = __privateGet(this, _idx);
|
|
398
|
-
continue mainLoop;
|
|
399
|
-
case ",":
|
|
400
|
-
algBuilder.push(addCharIndices(new Commutator(A, B), savedCharIndex, __privateGet(this, _idx)));
|
|
401
|
-
crowded = true;
|
|
402
|
-
algEndIdx = __privateGet(this, _idx);
|
|
403
|
-
continue mainLoop;
|
|
404
|
-
default:
|
|
405
|
-
throw "unexpected parsing error";
|
|
406
|
-
}
|
|
407
|
-
} else if (this.tryConsumeNext("\n")) {
|
|
408
|
-
algBuilder.push(addCharIndices(new Newline(), savedCharIndex, __privateGet(this, _idx)));
|
|
409
|
-
crowded = false;
|
|
410
|
-
algEndIdx = __privateGet(this, _idx);
|
|
411
|
-
continue mainLoop;
|
|
412
|
-
} else if (this.tryConsumeNext("/")) {
|
|
413
|
-
if (this.tryConsumeNext("/")) {
|
|
414
|
-
mustNotBeCrowded(savedCharIndex);
|
|
415
|
-
const [text] = this.parseRegex(commentTextRegex);
|
|
416
|
-
algBuilder.push(addCharIndices(new LineComment(text), savedCharIndex, __privateGet(this, _idx)));
|
|
417
|
-
crowded = false;
|
|
418
|
-
algEndIdx = __privateGet(this, _idx);
|
|
419
|
-
continue mainLoop;
|
|
420
|
-
} else {
|
|
421
|
-
algBuilder.push(addCharIndices(new Move("_SLASH_"), savedCharIndex, __privateGet(this, _idx)));
|
|
422
|
-
crowded = true;
|
|
423
|
-
algEndIdx = __privateGet(this, _idx);
|
|
424
|
-
continue mainLoop;
|
|
425
|
-
}
|
|
426
|
-
} else if (this.tryConsumeNext(".")) {
|
|
427
|
-
mustNotBeCrowded(savedCharIndex);
|
|
428
|
-
algBuilder.push(addCharIndices(new Pause(), savedCharIndex, __privateGet(this, _idx)));
|
|
429
|
-
crowded = true;
|
|
430
|
-
algEndIdx = __privateGet(this, _idx);
|
|
431
|
-
continue mainLoop;
|
|
432
|
-
} else {
|
|
433
|
-
throw new Error(`Unexpected character: ${this.popNext()}`);
|
|
434
|
-
}
|
|
435
|
-
}
|
|
436
|
-
if (__privateGet(this, _idx) !== __privateGet(this, _input).length) {
|
|
437
|
-
throw new Error("did not finish parsing?");
|
|
438
|
-
}
|
|
439
|
-
if (stopBefore.length > 0) {
|
|
440
|
-
throw new Error("expected stopping");
|
|
441
|
-
}
|
|
442
|
-
return addCharIndices(algBuilder.toAlg(), algStartIdx, algEndIdx);
|
|
443
|
-
}
|
|
444
|
-
parseQuantumMoveImpl() {
|
|
445
|
-
const [, , , outerLayerStr, innerLayerStr, family] = this.parseRegex(quantumMoveRegex);
|
|
446
|
-
return new QuantumMove(family, parseIntWithEmptyFallback(innerLayerStr, void 0), parseIntWithEmptyFallback(outerLayerStr, void 0));
|
|
447
|
-
}
|
|
448
|
-
parseMoveImpl() {
|
|
449
|
-
const savedCharIndex = __privateGet(this, _idx);
|
|
450
|
-
if (this.tryConsumeNext("/")) {
|
|
451
|
-
return addCharIndices(new Move("_SLASH_"), savedCharIndex, __privateGet(this, _idx));
|
|
452
|
-
}
|
|
453
|
-
let quantumMove = this.parseQuantumMoveImpl();
|
|
454
|
-
let [amount, hadEmptyAbsAmount] = this.parseAmountAndTrackEmptyAbsAmount();
|
|
455
|
-
const suffix = this.parseMoveSuffix();
|
|
456
|
-
if (suffix) {
|
|
457
|
-
if (amount < 0) {
|
|
458
|
-
throw new Error("uh-oh");
|
|
459
|
-
}
|
|
460
|
-
if ((suffix === "++" || suffix === "--") && amount !== 1) {
|
|
461
|
-
throw new Error("Pochmann ++ or -- moves cannot have an amount other than 1.");
|
|
462
|
-
}
|
|
463
|
-
if ((suffix === "++" || suffix === "--") && !hadEmptyAbsAmount) {
|
|
464
|
-
throw new Error("Pochmann ++ or -- moves cannot have an amount written as a number.");
|
|
465
|
-
}
|
|
466
|
-
if ((suffix === "+" || suffix === "-") && hadEmptyAbsAmount) {
|
|
467
|
-
throw new Error("Clock dial moves must have an amount written as a natural number followed by + or -.");
|
|
468
|
-
}
|
|
469
|
-
if (suffix.startsWith("+")) {
|
|
470
|
-
quantumMove = quantumMove.modified({
|
|
471
|
-
family: `${quantumMove.family}_${suffix === "+" ? "PLUS" : "PLUSPLUS"}_`
|
|
472
|
-
});
|
|
473
|
-
}
|
|
474
|
-
if (suffix.startsWith("-")) {
|
|
475
|
-
quantumMove = quantumMove.modified({
|
|
476
|
-
family: `${quantumMove.family}_${suffix === "-" ? "PLUS" : "PLUSPLUS"}_`
|
|
477
|
-
});
|
|
478
|
-
amount *= -1;
|
|
479
|
-
}
|
|
480
|
-
}
|
|
481
|
-
const move = addCharIndices(new Move(quantumMove, amount), savedCharIndex, __privateGet(this, _idx));
|
|
482
|
-
return move;
|
|
483
|
-
}
|
|
484
|
-
parseMoveSuffix() {
|
|
485
|
-
if (this.tryConsumeNext("+")) {
|
|
486
|
-
if (this.tryConsumeNext("+")) {
|
|
487
|
-
return "++";
|
|
488
|
-
}
|
|
489
|
-
return "+";
|
|
490
|
-
}
|
|
491
|
-
if (this.tryConsumeNext("-")) {
|
|
492
|
-
if (this.tryConsumeNext("-")) {
|
|
493
|
-
return "--";
|
|
494
|
-
}
|
|
495
|
-
return "-";
|
|
496
|
-
}
|
|
497
|
-
return null;
|
|
498
|
-
}
|
|
499
|
-
parseAmountAndTrackEmptyAbsAmount() {
|
|
500
|
-
const savedIdx = __privateGet(this, _idx);
|
|
501
|
-
const [, absAmountStr, primeStr] = this.parseRegex(amountRegex);
|
|
502
|
-
if (absAmountStr?.startsWith("0") && absAmountStr !== "0") {
|
|
503
|
-
throw new Error(`Error at char index ${savedIdx}: An amount can only start with 0 if it's exactly the digit 0.`);
|
|
504
|
-
}
|
|
505
|
-
return [
|
|
506
|
-
parseIntWithEmptyFallback(absAmountStr, 1) * (primeStr === "'" ? -1 : 1),
|
|
507
|
-
!absAmountStr
|
|
508
|
-
];
|
|
509
|
-
}
|
|
510
|
-
parseAmount() {
|
|
511
|
-
const savedIdx = __privateGet(this, _idx);
|
|
512
|
-
const [, absAmountStr, primeStr] = this.parseRegex(amountRegex);
|
|
513
|
-
if (absAmountStr?.startsWith("0") && absAmountStr !== "0") {
|
|
514
|
-
throw new Error(`Error at char index ${savedIdx}: An amount number can only start with 0 if it's exactly the digit 0.`);
|
|
515
|
-
}
|
|
516
|
-
return parseIntWithEmptyFallback(absAmountStr, 1) * (primeStr === "'" ? -1 : 1);
|
|
517
|
-
}
|
|
518
|
-
parseRegex(regex) {
|
|
519
|
-
const arr = regex.exec(this.remaining());
|
|
520
|
-
if (arr === null) {
|
|
521
|
-
throw new Error("internal parsing error");
|
|
522
|
-
}
|
|
523
|
-
__privateSet(this, _idx, __privateGet(this, _idx) + arr[0].length);
|
|
524
|
-
return arr;
|
|
525
|
-
}
|
|
526
|
-
tryRegex(regex) {
|
|
527
|
-
const arr = regex.exec(this.remaining());
|
|
528
|
-
if (arr === null) {
|
|
529
|
-
return null;
|
|
530
|
-
}
|
|
531
|
-
__privateSet(this, _idx, __privateGet(this, _idx) + arr[0].length);
|
|
532
|
-
return arr;
|
|
533
|
-
}
|
|
534
|
-
remaining() {
|
|
535
|
-
return __privateGet(this, _input).slice(__privateGet(this, _idx));
|
|
536
|
-
}
|
|
537
|
-
popNext() {
|
|
538
|
-
const next = __privateGet(this, _input)[__privateGet(this, _idx)];
|
|
539
|
-
__privateWrapper(this, _idx)._++;
|
|
540
|
-
return next;
|
|
541
|
-
}
|
|
542
|
-
tryConsumeNext(expected) {
|
|
543
|
-
if (__privateGet(this, _input)[__privateGet(this, _idx)] === expected) {
|
|
544
|
-
__privateWrapper(this, _idx)._++;
|
|
545
|
-
return true;
|
|
546
|
-
}
|
|
547
|
-
return false;
|
|
548
|
-
}
|
|
549
|
-
mustConsumeNext(expected) {
|
|
550
|
-
const next = this.popNext();
|
|
551
|
-
if (next !== expected) {
|
|
552
|
-
throw new Error(`expected \`${expected}\` while parsing, encountered ${next}`);
|
|
553
|
-
}
|
|
554
|
-
return next;
|
|
555
|
-
}
|
|
556
|
-
};
|
|
557
|
-
_input = new WeakMap();
|
|
558
|
-
_idx = new WeakMap();
|
|
559
|
-
|
|
560
|
-
// src/cubing/alg/warnOnce.ts
|
|
561
|
-
var warned = new Set();
|
|
562
|
-
function warnOnce(s) {
|
|
563
|
-
if (!warned.has(s)) {
|
|
564
|
-
console.warn(s);
|
|
565
|
-
warned.add(s);
|
|
566
|
-
}
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
// src/cubing/alg/units/QuantumWithAmount.ts
|
|
570
|
-
var QuantumWithAmount = class {
|
|
571
|
-
constructor(quantum, amount = 1) {
|
|
572
|
-
this.quantum = quantum;
|
|
573
|
-
this.amount = amount;
|
|
574
|
-
if (!Number.isInteger(this.amount) || this.amount < MIN_INT || this.amount > MAX_INT) {
|
|
575
|
-
throw new Error(`Unit amount absolute value must be a non-negative integer from ${MAX_INT_DESCRIPTION} to ${MAX_INT_DESCRIPTION}.`);
|
|
576
|
-
}
|
|
577
|
-
}
|
|
578
|
-
suffix() {
|
|
579
|
-
let s = "";
|
|
580
|
-
const absAmount = Math.abs(this.amount);
|
|
581
|
-
if (absAmount !== 1) {
|
|
582
|
-
s += absAmount;
|
|
583
|
-
}
|
|
584
|
-
if (this.amount < 0) {
|
|
585
|
-
s += "'";
|
|
586
|
-
}
|
|
587
|
-
return s;
|
|
588
|
-
}
|
|
589
|
-
isIdentical(other) {
|
|
590
|
-
return this.quantum.isIdentical(other.quantum) && this.amount === other.amount;
|
|
591
|
-
}
|
|
592
|
-
*experimentalExpand(iterDir, depth) {
|
|
593
|
-
const absAmount = Math.abs(this.amount);
|
|
594
|
-
const newIterDir = toggleDirection(iterDir, this.amount < 0);
|
|
595
|
-
for (let i = 0; i < absAmount; i++) {
|
|
596
|
-
yield* this.quantum.experimentalExpand(newIterDir, depth);
|
|
597
|
-
}
|
|
598
|
-
}
|
|
599
|
-
};
|
|
600
|
-
|
|
601
|
-
// src/cubing/alg/units/leaves/Move.ts
|
|
602
|
-
var _family, _innerLayer, _outerLayer;
|
|
603
|
-
var _QuantumMove = class extends Comparable {
|
|
604
|
-
constructor(family, innerLayer, outerLayer) {
|
|
605
|
-
super();
|
|
606
|
-
__privateAdd(this, _family, void 0);
|
|
607
|
-
__privateAdd(this, _innerLayer, void 0);
|
|
608
|
-
__privateAdd(this, _outerLayer, void 0);
|
|
609
|
-
__privateSet(this, _family, family);
|
|
610
|
-
__privateSet(this, _innerLayer, innerLayer ?? null);
|
|
611
|
-
__privateSet(this, _outerLayer, outerLayer ?? null);
|
|
612
|
-
Object.freeze(this);
|
|
613
|
-
if (__privateGet(this, _innerLayer) !== null && (!Number.isInteger(__privateGet(this, _innerLayer)) || __privateGet(this, _innerLayer) < 1 || __privateGet(this, _innerLayer) > MAX_INT)) {
|
|
614
|
-
throw new Error(`QuantumMove inner layer must be a positive integer below ${MAX_INT_DESCRIPTION}.`);
|
|
615
|
-
}
|
|
616
|
-
if (__privateGet(this, _outerLayer) !== null && (!Number.isInteger(__privateGet(this, _outerLayer)) || __privateGet(this, _outerLayer) < 1 || __privateGet(this, _outerLayer) > MAX_INT)) {
|
|
617
|
-
throw new Error(`QuantumMove outer layer must be a positive integer below ${MAX_INT_DESCRIPTION}.`);
|
|
618
|
-
}
|
|
619
|
-
if (__privateGet(this, _outerLayer) !== null && __privateGet(this, _innerLayer) !== null && __privateGet(this, _innerLayer) <= __privateGet(this, _outerLayer)) {
|
|
620
|
-
throw new Error("QuantumMove outer layer must be smaller than inner layer.");
|
|
621
|
-
}
|
|
622
|
-
if (__privateGet(this, _outerLayer) !== null && __privateGet(this, _innerLayer) === null) {
|
|
623
|
-
throw new Error("QuantumMove with an outer layer must have an inner layer");
|
|
624
|
-
}
|
|
625
|
-
}
|
|
626
|
-
static fromString(s) {
|
|
627
|
-
return parseQuantumMove(s);
|
|
628
|
-
}
|
|
629
|
-
modified(modifications) {
|
|
630
|
-
return new _QuantumMove(modifications.family ?? __privateGet(this, _family), modifications.innerLayer ?? __privateGet(this, _innerLayer), modifications.outerLayer ?? __privateGet(this, _outerLayer));
|
|
631
|
-
}
|
|
632
|
-
isIdentical(other) {
|
|
633
|
-
const otherAsQuantumMove = other;
|
|
634
|
-
return other.is(_QuantumMove) && __privateGet(this, _family) === __privateGet(otherAsQuantumMove, _family) && __privateGet(this, _innerLayer) === __privateGet(otherAsQuantumMove, _innerLayer) && __privateGet(this, _outerLayer) === __privateGet(otherAsQuantumMove, _outerLayer);
|
|
635
|
-
}
|
|
636
|
-
get family() {
|
|
637
|
-
return __privateGet(this, _family);
|
|
638
|
-
}
|
|
639
|
-
get outerLayer() {
|
|
640
|
-
return __privateGet(this, _outerLayer);
|
|
641
|
-
}
|
|
642
|
-
get innerLayer() {
|
|
643
|
-
return __privateGet(this, _innerLayer);
|
|
644
|
-
}
|
|
645
|
-
experimentalExpand() {
|
|
646
|
-
throw new Error("experimentalExpand() cannot be called on a `QuantumMove` directly.");
|
|
647
|
-
}
|
|
648
|
-
toString() {
|
|
649
|
-
let s = __privateGet(this, _family);
|
|
650
|
-
if (__privateGet(this, _innerLayer) !== null) {
|
|
651
|
-
s = String(__privateGet(this, _innerLayer)) + s;
|
|
652
|
-
if (__privateGet(this, _outerLayer) !== null) {
|
|
653
|
-
s = String(__privateGet(this, _outerLayer)) + "-" + s;
|
|
654
|
-
}
|
|
655
|
-
}
|
|
656
|
-
return s;
|
|
657
|
-
}
|
|
658
|
-
};
|
|
659
|
-
var QuantumMove = _QuantumMove;
|
|
660
|
-
_family = new WeakMap();
|
|
661
|
-
_innerLayer = new WeakMap();
|
|
662
|
-
_outerLayer = new WeakMap();
|
|
663
|
-
var _quantumWithAmount;
|
|
664
|
-
var _Move = class extends AlgCommon {
|
|
665
|
-
constructor(...args) {
|
|
666
|
-
super();
|
|
667
|
-
__privateAdd(this, _quantumWithAmount, void 0);
|
|
668
|
-
if (typeof args[0] === "string") {
|
|
669
|
-
if (args[1] ?? null) {
|
|
670
|
-
__privateSet(this, _quantumWithAmount, new QuantumWithAmount(QuantumMove.fromString(args[0]), args[1]));
|
|
671
|
-
return;
|
|
672
|
-
} else {
|
|
673
|
-
return _Move.fromString(args[0]);
|
|
674
|
-
}
|
|
675
|
-
}
|
|
676
|
-
__privateSet(this, _quantumWithAmount, new QuantumWithAmount(args[0], args[1]));
|
|
677
|
-
}
|
|
678
|
-
isIdentical(other) {
|
|
679
|
-
const otherAsMove = other.as(_Move);
|
|
680
|
-
return !!otherAsMove && __privateGet(this, _quantumWithAmount).isIdentical(__privateGet(otherAsMove, _quantumWithAmount));
|
|
681
|
-
}
|
|
682
|
-
invert() {
|
|
683
|
-
return transferCharIndex(this, new _Move(__privateGet(this, _quantumWithAmount).quantum, -this.amount));
|
|
684
|
-
}
|
|
685
|
-
*experimentalExpand(iterDir = IterationDirection.Forwards) {
|
|
686
|
-
if (iterDir === IterationDirection.Forwards) {
|
|
687
|
-
yield this;
|
|
688
|
-
} else {
|
|
689
|
-
yield this.modified({
|
|
690
|
-
amount: -this.amount
|
|
691
|
-
});
|
|
692
|
-
}
|
|
693
|
-
}
|
|
694
|
-
get quantum() {
|
|
695
|
-
return __privateGet(this, _quantumWithAmount).quantum;
|
|
696
|
-
}
|
|
697
|
-
modified(modifications) {
|
|
698
|
-
return new _Move(__privateGet(this, _quantumWithAmount).quantum.modified(modifications), modifications.amount ?? this.amount);
|
|
699
|
-
}
|
|
700
|
-
static fromString(s) {
|
|
701
|
-
return parseMove(s);
|
|
702
|
-
}
|
|
703
|
-
get amount() {
|
|
704
|
-
return __privateGet(this, _quantumWithAmount).amount;
|
|
705
|
-
}
|
|
706
|
-
get type() {
|
|
707
|
-
warnOnce("deprecated: type");
|
|
708
|
-
return "blockMove";
|
|
709
|
-
}
|
|
710
|
-
get family() {
|
|
711
|
-
return __privateGet(this, _quantumWithAmount).quantum.family ?? void 0;
|
|
712
|
-
}
|
|
713
|
-
get outerLayer() {
|
|
714
|
-
return __privateGet(this, _quantumWithAmount).quantum.outerLayer ?? void 0;
|
|
715
|
-
}
|
|
716
|
-
get innerLayer() {
|
|
717
|
-
return __privateGet(this, _quantumWithAmount).quantum.innerLayer ?? void 0;
|
|
718
|
-
}
|
|
719
|
-
toString() {
|
|
720
|
-
if (this.family === "_SLASH_") {
|
|
721
|
-
return "/";
|
|
722
|
-
}
|
|
723
|
-
if (this.family.endsWith("_PLUS_")) {
|
|
724
|
-
return __privateGet(this, _quantumWithAmount).quantum.toString().slice(0, -6) + Math.abs(this.amount) + (this.amount < 0 ? "-" : "+");
|
|
725
|
-
}
|
|
726
|
-
if (this.family.endsWith("_PLUSPLUS_")) {
|
|
727
|
-
const absAmount = Math.abs(this.amount);
|
|
728
|
-
return __privateGet(this, _quantumWithAmount).quantum.toString().slice(0, -10) + (absAmount === 1 ? "" : absAmount) + (this.amount < 0 ? "--" : "++");
|
|
729
|
-
}
|
|
730
|
-
return __privateGet(this, _quantumWithAmount).quantum.toString() + __privateGet(this, _quantumWithAmount).suffix();
|
|
731
|
-
}
|
|
732
|
-
};
|
|
733
|
-
var Move = _Move;
|
|
734
|
-
_quantumWithAmount = new WeakMap();
|
|
735
|
-
|
|
736
|
-
// src/cubing/alg/units/containers/Grouping.ts
|
|
737
|
-
var Square1TupleFormatter = class {
|
|
738
|
-
constructor() {
|
|
739
|
-
this.quantumU_SQ_ = null;
|
|
740
|
-
this.quantumD_SQ_ = null;
|
|
741
|
-
}
|
|
742
|
-
format(grouping) {
|
|
743
|
-
const amounts = this.tuple(grouping);
|
|
744
|
-
if (!amounts) {
|
|
745
|
-
return null;
|
|
746
|
-
}
|
|
747
|
-
return `(${amounts.map((move) => move.amount).join(", ")})`;
|
|
748
|
-
}
|
|
749
|
-
tuple(grouping) {
|
|
750
|
-
this.quantumU_SQ_ || (this.quantumU_SQ_ = new QuantumMove("U_SQ_"));
|
|
751
|
-
this.quantumD_SQ_ || (this.quantumD_SQ_ = new QuantumMove("D_SQ_"));
|
|
752
|
-
const quantumAlg = grouping.alg;
|
|
753
|
-
if (quantumAlg.experimentalNumUnits() === 2) {
|
|
754
|
-
const [U, D] = quantumAlg.units();
|
|
755
|
-
if (U.as(Move)?.quantum.isIdentical(this.quantumU_SQ_) && D.as(Move)?.quantum.isIdentical(this.quantumD_SQ_)) {
|
|
756
|
-
if (grouping.amount !== 1) {
|
|
757
|
-
throw new Error("Square-1 tuples cannot have an amount other than 1.");
|
|
758
|
-
}
|
|
759
|
-
return [U, D];
|
|
760
|
-
}
|
|
761
|
-
}
|
|
762
|
-
return null;
|
|
763
|
-
}
|
|
764
|
-
};
|
|
765
|
-
var square1TupleFormatterInstance = new Square1TupleFormatter();
|
|
766
|
-
var _quantumWithAmount2;
|
|
767
|
-
var _Grouping = class extends AlgCommon {
|
|
768
|
-
constructor(algSource, amount) {
|
|
769
|
-
super();
|
|
770
|
-
__privateAdd(this, _quantumWithAmount2, void 0);
|
|
771
|
-
const alg = experimentalEnsureAlg(algSource);
|
|
772
|
-
__privateSet(this, _quantumWithAmount2, new QuantumWithAmount(alg, amount));
|
|
773
|
-
}
|
|
774
|
-
isIdentical(other) {
|
|
775
|
-
const otherAsGrouping = other;
|
|
776
|
-
return other.is(_Grouping) && __privateGet(this, _quantumWithAmount2).isIdentical(__privateGet(otherAsGrouping, _quantumWithAmount2));
|
|
777
|
-
}
|
|
778
|
-
get alg() {
|
|
779
|
-
return __privateGet(this, _quantumWithAmount2).quantum;
|
|
780
|
-
}
|
|
781
|
-
get amount() {
|
|
782
|
-
return __privateGet(this, _quantumWithAmount2).amount;
|
|
783
|
-
}
|
|
784
|
-
get experimentalRepetitionSuffix() {
|
|
785
|
-
return __privateGet(this, _quantumWithAmount2).suffix();
|
|
786
|
-
}
|
|
787
|
-
invert() {
|
|
788
|
-
return new _Grouping(__privateGet(this, _quantumWithAmount2).quantum, -__privateGet(this, _quantumWithAmount2).amount);
|
|
789
|
-
}
|
|
790
|
-
*experimentalExpand(iterDir = IterationDirection.Forwards, depth) {
|
|
791
|
-
depth ?? (depth = Infinity);
|
|
792
|
-
if (depth === 0) {
|
|
793
|
-
yield iterDir === IterationDirection.Forwards ? this : this.invert();
|
|
794
|
-
} else {
|
|
795
|
-
yield* __privateGet(this, _quantumWithAmount2).experimentalExpand(iterDir, depth - 1);
|
|
796
|
-
}
|
|
797
|
-
}
|
|
798
|
-
static fromString() {
|
|
799
|
-
throw new Error("unimplemented");
|
|
800
|
-
}
|
|
801
|
-
toString() {
|
|
802
|
-
return square1TupleFormatterInstance.format(this) ?? `(${__privateGet(this, _quantumWithAmount2).quantum.toString()})${__privateGet(this, _quantumWithAmount2).suffix()}`;
|
|
803
|
-
}
|
|
804
|
-
experimentalAsSquare1Tuple() {
|
|
805
|
-
return square1TupleFormatterInstance.tuple(this);
|
|
806
|
-
}
|
|
807
|
-
};
|
|
808
|
-
var Grouping = _Grouping;
|
|
809
|
-
_quantumWithAmount2 = new WeakMap();
|
|
810
|
-
|
|
811
|
-
// src/cubing/alg/is.ts
|
|
812
|
-
function experimentalIs(v, c) {
|
|
813
|
-
return v instanceof c;
|
|
814
|
-
}
|
|
815
|
-
function experimentalIsUnit(v) {
|
|
816
|
-
return experimentalIs(v, Grouping) || experimentalIs(v, LineComment) || experimentalIs(v, Commutator) || experimentalIs(v, Conjugate) || experimentalIs(v, Move) || experimentalIs(v, Newline) || experimentalIs(v, Pause);
|
|
817
|
-
}
|
|
818
|
-
|
|
819
|
-
// src/cubing/alg/traversal.ts
|
|
820
|
-
function dispatch(t, unit, dataDown) {
|
|
821
|
-
if (unit.is(Grouping)) {
|
|
822
|
-
return t.traverseGrouping(unit, dataDown);
|
|
823
|
-
}
|
|
824
|
-
if (unit.is(Move)) {
|
|
825
|
-
return t.traverseMove(unit, dataDown);
|
|
826
|
-
}
|
|
827
|
-
if (unit.is(Commutator)) {
|
|
828
|
-
return t.traverseCommutator(unit, dataDown);
|
|
829
|
-
}
|
|
830
|
-
if (unit.is(Conjugate)) {
|
|
831
|
-
return t.traverseConjugate(unit, dataDown);
|
|
832
|
-
}
|
|
833
|
-
if (unit.is(Pause)) {
|
|
834
|
-
return t.traversePause(unit, dataDown);
|
|
835
|
-
}
|
|
836
|
-
if (unit.is(Newline)) {
|
|
837
|
-
return t.traverseNewline(unit, dataDown);
|
|
838
|
-
}
|
|
839
|
-
if (unit.is(LineComment)) {
|
|
840
|
-
return t.traverseLineComment(unit, dataDown);
|
|
841
|
-
}
|
|
842
|
-
throw new Error(`unknown unit`);
|
|
843
|
-
}
|
|
844
|
-
function assertIsUnit(t) {
|
|
845
|
-
if (t.is(Grouping) || t.is(Move) || t.is(Commutator) || t.is(Conjugate) || t.is(Pause) || t.is(Newline) || t.is(LineComment)) {
|
|
846
|
-
return t;
|
|
847
|
-
}
|
|
848
|
-
throw "internal error: expected unit";
|
|
849
|
-
}
|
|
850
|
-
var TraversalDownUp = class {
|
|
851
|
-
traverseUnit(unit, dataDown) {
|
|
852
|
-
return dispatch(this, unit, dataDown);
|
|
853
|
-
}
|
|
854
|
-
traverseIntoUnit(unit, dataDown) {
|
|
855
|
-
return assertIsUnit(this.traverseUnit(unit, dataDown));
|
|
856
|
-
}
|
|
857
|
-
};
|
|
858
|
-
var _newAmount, newAmount_fn;
|
|
859
|
-
var _Simplify = class extends TraversalDownUp {
|
|
860
|
-
*traverseAlg(alg, options) {
|
|
861
|
-
if (options.depth === 0) {
|
|
862
|
-
yield* alg.units();
|
|
863
|
-
return;
|
|
864
|
-
}
|
|
865
|
-
const newUnits = [];
|
|
866
|
-
let lastUnit = null;
|
|
867
|
-
const collapseMoves = options?.collapseMoves ?? true;
|
|
868
|
-
function appendMoveWithNewAmount(move, deltaAmount) {
|
|
869
|
-
var _a;
|
|
870
|
-
const newAmount = __privateMethod(_a = _Simplify, _newAmount, newAmount_fn).call(_a, move, deltaAmount, options);
|
|
871
|
-
if (newAmount === 0) {
|
|
872
|
-
return false;
|
|
873
|
-
}
|
|
874
|
-
const newMove = new Move(move.quantum, newAmount);
|
|
875
|
-
newUnits.push(newMove);
|
|
876
|
-
lastUnit = newMove;
|
|
877
|
-
return true;
|
|
878
|
-
}
|
|
879
|
-
function appendCollapsed(newUnit) {
|
|
880
|
-
if (collapseMoves && lastUnit?.is(Move) && newUnit.is(Move) && lastUnit.quantum.isIdentical(newUnit.quantum)) {
|
|
881
|
-
newUnits.pop();
|
|
882
|
-
if (!appendMoveWithNewAmount(lastUnit, newUnit.amount)) {
|
|
883
|
-
lastUnit = newUnits.slice(-1)[0];
|
|
884
|
-
}
|
|
885
|
-
} else {
|
|
886
|
-
if (newUnit.is(Move)) {
|
|
887
|
-
appendMoveWithNewAmount(newUnit, 0);
|
|
888
|
-
} else {
|
|
889
|
-
newUnits.push(newUnit);
|
|
890
|
-
lastUnit = newUnit;
|
|
891
|
-
}
|
|
892
|
-
}
|
|
893
|
-
}
|
|
894
|
-
const newOptions = {
|
|
895
|
-
depth: options.depth ? options.depth - 1 : null
|
|
896
|
-
};
|
|
897
|
-
for (const unit of alg.units()) {
|
|
898
|
-
for (const ancestorUnit of this.traverseUnit(unit, newOptions)) {
|
|
899
|
-
appendCollapsed(ancestorUnit);
|
|
900
|
-
}
|
|
901
|
-
}
|
|
902
|
-
for (const unit of newUnits) {
|
|
903
|
-
yield unit;
|
|
904
|
-
}
|
|
905
|
-
}
|
|
906
|
-
*traverseGrouping(grouping, options) {
|
|
907
|
-
if (options.depth === 0) {
|
|
908
|
-
yield grouping;
|
|
909
|
-
return;
|
|
910
|
-
}
|
|
911
|
-
const newOptions = {
|
|
912
|
-
depth: options.depth ? options.depth - 1 : null
|
|
913
|
-
};
|
|
914
|
-
yield new Grouping(this.traverseAlg(grouping.alg, newOptions));
|
|
915
|
-
}
|
|
916
|
-
*traverseMove(move, _options) {
|
|
917
|
-
yield move;
|
|
918
|
-
}
|
|
919
|
-
*traverseCommutator(commutator, options) {
|
|
920
|
-
if (options.depth === 0) {
|
|
921
|
-
yield commutator;
|
|
922
|
-
return;
|
|
923
|
-
}
|
|
924
|
-
const newOptions = {
|
|
925
|
-
depth: options.depth ? options.depth - 1 : null
|
|
926
|
-
};
|
|
927
|
-
yield new Commutator(this.traverseAlg(commutator.A, newOptions), this.traverseAlg(commutator.B, newOptions));
|
|
928
|
-
}
|
|
929
|
-
*traverseConjugate(conjugate, options) {
|
|
930
|
-
if (options.depth === 0) {
|
|
931
|
-
yield conjugate;
|
|
932
|
-
return;
|
|
933
|
-
}
|
|
934
|
-
const newOptions = {
|
|
935
|
-
depth: options.depth ? options.depth - 1 : null
|
|
936
|
-
};
|
|
937
|
-
yield new Conjugate(this.traverseAlg(conjugate.A, newOptions), this.traverseAlg(conjugate.B, newOptions));
|
|
938
|
-
}
|
|
939
|
-
*traversePause(pause, _options) {
|
|
940
|
-
yield pause;
|
|
941
|
-
}
|
|
942
|
-
*traverseNewline(newline, _options) {
|
|
943
|
-
yield newline;
|
|
944
|
-
}
|
|
945
|
-
*traverseLineComment(comment, _options) {
|
|
946
|
-
yield comment;
|
|
947
|
-
}
|
|
948
|
-
};
|
|
949
|
-
var Simplify = _Simplify;
|
|
950
|
-
_newAmount = new WeakSet();
|
|
951
|
-
newAmount_fn = function(move, deltaAmount, options) {
|
|
952
|
-
let newAmount = move.amount + deltaAmount;
|
|
953
|
-
if (options?.quantumMoveOrder) {
|
|
954
|
-
const order = options.quantumMoveOrder(move.quantum);
|
|
955
|
-
const min = Math.floor(order / 2) + 1 - order;
|
|
956
|
-
newAmount = (newAmount % order + order - min) % order + min;
|
|
957
|
-
}
|
|
958
|
-
return newAmount;
|
|
959
|
-
};
|
|
960
|
-
__privateAdd(Simplify, _newAmount);
|
|
961
|
-
var simplifyInstance = new Simplify();
|
|
962
|
-
var simplify = simplifyInstance.traverseAlg.bind(simplifyInstance);
|
|
963
|
-
|
|
964
|
-
// src/cubing/alg/Alg.ts
|
|
965
|
-
function toIterable(input) {
|
|
966
|
-
if (!input) {
|
|
967
|
-
return [];
|
|
968
|
-
}
|
|
969
|
-
if (experimentalIs(input, Alg)) {
|
|
970
|
-
return input.units();
|
|
971
|
-
}
|
|
972
|
-
if (typeof input === "string") {
|
|
973
|
-
return parseAlg(input).units();
|
|
974
|
-
}
|
|
975
|
-
const iter = input;
|
|
976
|
-
if (typeof iter[Symbol.iterator] === "function") {
|
|
977
|
-
return iter;
|
|
978
|
-
}
|
|
979
|
-
throw "Invalid unit";
|
|
980
|
-
}
|
|
981
|
-
function experimentalEnsureAlg(alg) {
|
|
982
|
-
if (experimentalIs(alg, Alg)) {
|
|
983
|
-
return alg;
|
|
984
|
-
}
|
|
985
|
-
return new Alg(alg);
|
|
986
|
-
}
|
|
987
|
-
var _units2;
|
|
988
|
-
var _Alg = class extends AlgCommon {
|
|
989
|
-
constructor(alg) {
|
|
990
|
-
super();
|
|
991
|
-
__privateAdd(this, _units2, void 0);
|
|
992
|
-
__privateSet(this, _units2, Array.from(toIterable(alg)));
|
|
993
|
-
for (const unit of __privateGet(this, _units2)) {
|
|
994
|
-
if (!experimentalIsUnit(unit)) {
|
|
995
|
-
throw new Error("An alg can only contain units.");
|
|
996
|
-
}
|
|
997
|
-
}
|
|
998
|
-
}
|
|
999
|
-
isIdentical(other) {
|
|
1000
|
-
const otherAsAlg = other;
|
|
1001
|
-
if (!other.is(_Alg)) {
|
|
1002
|
-
return false;
|
|
1003
|
-
}
|
|
1004
|
-
const l1 = Array.from(__privateGet(this, _units2));
|
|
1005
|
-
const l2 = Array.from(__privateGet(otherAsAlg, _units2));
|
|
1006
|
-
if (l1.length !== l2.length) {
|
|
1007
|
-
return false;
|
|
1008
|
-
}
|
|
1009
|
-
for (let i = 0; i < l1.length; i++) {
|
|
1010
|
-
if (!l1[i].isIdentical(l2[i])) {
|
|
1011
|
-
return false;
|
|
1012
|
-
}
|
|
1013
|
-
}
|
|
1014
|
-
return true;
|
|
1015
|
-
}
|
|
1016
|
-
invert() {
|
|
1017
|
-
return new _Alg(reverse(Array.from(__privateGet(this, _units2)).map((u) => u.invert())));
|
|
1018
|
-
}
|
|
1019
|
-
*experimentalExpand(iterDir = IterationDirection.Forwards, depth) {
|
|
1020
|
-
depth ?? (depth = Infinity);
|
|
1021
|
-
for (const unit of direct(__privateGet(this, _units2), iterDir)) {
|
|
1022
|
-
yield* unit.experimentalExpand(iterDir, depth);
|
|
1023
|
-
}
|
|
1024
|
-
}
|
|
1025
|
-
expand(options) {
|
|
1026
|
-
return new _Alg(this.experimentalExpand(IterationDirection.Forwards, options?.depth ?? Infinity));
|
|
1027
|
-
}
|
|
1028
|
-
*experimentalLeafMoves() {
|
|
1029
|
-
for (const leaf of this.experimentalExpand()) {
|
|
1030
|
-
if (leaf.is(Move)) {
|
|
1031
|
-
yield leaf;
|
|
1032
|
-
}
|
|
1033
|
-
}
|
|
1034
|
-
}
|
|
1035
|
-
concat(input) {
|
|
1036
|
-
return new _Alg(Array.from(__privateGet(this, _units2)).concat(Array.from(toIterable(input))));
|
|
1037
|
-
}
|
|
1038
|
-
experimentalIsEmpty() {
|
|
1039
|
-
for (const _ of __privateGet(this, _units2)) {
|
|
1040
|
-
return false;
|
|
1041
|
-
}
|
|
1042
|
-
return true;
|
|
1043
|
-
}
|
|
1044
|
-
static fromString(s) {
|
|
1045
|
-
return parseAlg(s);
|
|
1046
|
-
}
|
|
1047
|
-
*units() {
|
|
1048
|
-
for (const unit of __privateGet(this, _units2)) {
|
|
1049
|
-
yield unit;
|
|
1050
|
-
}
|
|
1051
|
-
}
|
|
1052
|
-
experimentalNumUnits() {
|
|
1053
|
-
return Array.from(__privateGet(this, _units2)).length;
|
|
1054
|
-
}
|
|
1055
|
-
get type() {
|
|
1056
|
-
warnOnce("deprecated: type");
|
|
1057
|
-
return "sequence";
|
|
1058
|
-
}
|
|
1059
|
-
toString() {
|
|
1060
|
-
let output = "";
|
|
1061
|
-
let previousUnit = null;
|
|
1062
|
-
for (const unit of __privateGet(this, _units2)) {
|
|
1063
|
-
if (previousUnit) {
|
|
1064
|
-
output += spaceBetween(previousUnit, unit);
|
|
1065
|
-
}
|
|
1066
|
-
output += unit.toString();
|
|
1067
|
-
previousUnit = unit;
|
|
1068
|
-
}
|
|
1069
|
-
return output;
|
|
1070
|
-
}
|
|
1071
|
-
simplify(options) {
|
|
1072
|
-
return new _Alg(simplify(this, options ?? {}));
|
|
1073
|
-
}
|
|
1074
|
-
};
|
|
1075
|
-
var Alg = _Alg;
|
|
1076
|
-
_units2 = new WeakMap();
|
|
1077
|
-
function spaceBetween(u1, u2) {
|
|
1078
|
-
if (u1.is(Newline) || u2.is(Newline)) {
|
|
1079
|
-
return "";
|
|
1080
|
-
}
|
|
1081
|
-
if (u1.is(LineComment) && !u2.is(Newline)) {
|
|
1082
|
-
return "\n";
|
|
1083
|
-
}
|
|
1084
|
-
return " ";
|
|
1085
|
-
}
|
|
1086
|
-
|
|
1087
|
-
// src/cubing/alg/example.ts
|
|
1088
|
-
var Example = {
|
|
1089
|
-
Sune: new Alg([
|
|
1090
|
-
new Move("R", 1),
|
|
1091
|
-
new Move("U", 1),
|
|
1092
|
-
new Move("R", -1),
|
|
1093
|
-
new Move("U", 1),
|
|
1094
|
-
new Move("R", 1),
|
|
1095
|
-
new Move("U", -2),
|
|
1096
|
-
new Move("R", -1)
|
|
1097
|
-
]),
|
|
1098
|
-
AntiSune: new Alg([
|
|
1099
|
-
new Move("R", 1),
|
|
1100
|
-
new Move("U", 2),
|
|
1101
|
-
new Move("R", -1),
|
|
1102
|
-
new Move("U", -1),
|
|
1103
|
-
new Move("R", 1),
|
|
1104
|
-
new Move("U", -1),
|
|
1105
|
-
new Move("R", -1)
|
|
1106
|
-
]),
|
|
1107
|
-
SuneCommutator: new Alg([
|
|
1108
|
-
new Commutator(new Alg([new Move("R", 1), new Move("U", 1), new Move("R", -2)]), new Alg([
|
|
1109
|
-
new Conjugate(new Alg([new Move("R", 1)]), new Alg([new Move("U", 1)]))
|
|
1110
|
-
]))
|
|
1111
|
-
]),
|
|
1112
|
-
Niklas: new Alg([
|
|
1113
|
-
new Move("R", 1),
|
|
1114
|
-
new Move("U", -1),
|
|
1115
|
-
new Move("L", -1),
|
|
1116
|
-
new Move("U", 1),
|
|
1117
|
-
new Move("R", -1),
|
|
1118
|
-
new Move("U", -1),
|
|
1119
|
-
new Move("L", 1),
|
|
1120
|
-
new Move("U", 1)
|
|
1121
|
-
]),
|
|
1122
|
-
EPerm: new Alg([
|
|
1123
|
-
new Move("x", -1),
|
|
1124
|
-
new Commutator(new Alg([
|
|
1125
|
-
new Conjugate(new Alg([new Move("R", 1)]), new Alg([new Move("U", -1)]))
|
|
1126
|
-
]), new Alg([new Move("D", 1)])),
|
|
1127
|
-
new Commutator(new Alg([
|
|
1128
|
-
new Conjugate(new Alg([new Move("R", 1)]), new Alg([new Move("U", 1)]))
|
|
1129
|
-
]), new Alg([new Move("D", 1)])),
|
|
1130
|
-
new Move("x", 1)
|
|
1131
|
-
]),
|
|
1132
|
-
FURURFCompact: new Alg([
|
|
1133
|
-
new Conjugate(new Alg([new Move("F", 1)]), new Alg([
|
|
1134
|
-
new Commutator(new Alg([new Move("U", 1)]), new Alg([new Move("R", 1)]))
|
|
1135
|
-
]))
|
|
1136
|
-
]),
|
|
1137
|
-
APermCompact: new Alg([
|
|
1138
|
-
new Conjugate(new Alg([new Move("R", 2)]), new Alg([
|
|
1139
|
-
new Commutator(new Alg([new Move("F", 2)]), new Alg([new Move("R", -1), new Move("B", -1), new Move("R", 1)]))
|
|
1140
|
-
]))
|
|
1141
|
-
]),
|
|
1142
|
-
FURURFMoves: new Alg([
|
|
1143
|
-
new Move("F", 1),
|
|
1144
|
-
new Move("U", 1),
|
|
1145
|
-
new Move("R", 1),
|
|
1146
|
-
new Move("U", -1),
|
|
1147
|
-
new Move("R", -1),
|
|
1148
|
-
new Move("F", -1)
|
|
1149
|
-
]),
|
|
1150
|
-
TPerm: new Alg([
|
|
1151
|
-
new Move("R", 1),
|
|
1152
|
-
new Move("U", 1),
|
|
1153
|
-
new Move("R", -1),
|
|
1154
|
-
new Move("U", -1),
|
|
1155
|
-
new Move("R", -1),
|
|
1156
|
-
new Move("F", 1),
|
|
1157
|
-
new Move("R", 2),
|
|
1158
|
-
new Move("U", -1),
|
|
1159
|
-
new Move("R", -1),
|
|
1160
|
-
new Move("U", -1),
|
|
1161
|
-
new Move("R", 1),
|
|
1162
|
-
new Move("U", 1),
|
|
1163
|
-
new Move("R", -1),
|
|
1164
|
-
new Move("F", -1)
|
|
1165
|
-
]),
|
|
1166
|
-
HeadlightSwaps: new Alg([
|
|
1167
|
-
new Conjugate(new Alg([new Move("F", 1)]), new Alg([
|
|
1168
|
-
new Grouping(new Alg([
|
|
1169
|
-
new Commutator(new Alg([new Move("R", 1)]), new Alg([new Move("U", 1)]))
|
|
1170
|
-
]), 3)
|
|
1171
|
-
]))
|
|
1172
|
-
]),
|
|
1173
|
-
TriplePause: new Alg([new Pause(), new Pause(), new Pause()])
|
|
1174
|
-
};
|
|
1175
|
-
|
|
1176
|
-
// src/cubing/alg/keyboard.ts
|
|
1177
|
-
var cubeKeyMapping = {
|
|
1178
|
-
73: new Move("R"),
|
|
1179
|
-
75: new Move("R'"),
|
|
1180
|
-
87: new Move("B"),
|
|
1181
|
-
79: new Move("B'"),
|
|
1182
|
-
83: new Move("D"),
|
|
1183
|
-
76: new Move("D'"),
|
|
1184
|
-
68: new Move("L"),
|
|
1185
|
-
69: new Move("L'"),
|
|
1186
|
-
74: new Move("U"),
|
|
1187
|
-
70: new Move("U'"),
|
|
1188
|
-
72: new Move("F"),
|
|
1189
|
-
71: new Move("F'"),
|
|
1190
|
-
78: new Move("x'"),
|
|
1191
|
-
67: new Move("l"),
|
|
1192
|
-
82: new Move("l'"),
|
|
1193
|
-
85: new Move("r"),
|
|
1194
|
-
77: new Move("r'"),
|
|
1195
|
-
88: new Move("d"),
|
|
1196
|
-
188: new Move("d'"),
|
|
1197
|
-
84: new Move("x"),
|
|
1198
|
-
89: new Move("x"),
|
|
1199
|
-
66: new Move("x'"),
|
|
1200
|
-
186: new Move("y"),
|
|
1201
|
-
59: new Move("y"),
|
|
1202
|
-
65: new Move("y'"),
|
|
1203
|
-
80: new Move("z"),
|
|
1204
|
-
81: new Move("z'"),
|
|
1205
|
-
90: new Move("M'"),
|
|
1206
|
-
190: new Move("M'")
|
|
1207
|
-
};
|
|
1
|
+
import {
|
|
2
|
+
Move,
|
|
3
|
+
QuantumMove
|
|
4
|
+
} from "./chunk-EWRBHQFX.js";
|
|
1208
5
|
|
|
1209
6
|
// src/cubing/puzzle-geometry/FaceNameSwizzler.ts
|
|
1210
7
|
var FaceNameSwizzler = class {
|
|
@@ -1648,21 +445,54 @@ var SkewbNotationMapper = class {
|
|
|
1648
445
|
};
|
|
1649
446
|
|
|
1650
447
|
// src/cubing/puzzle-geometry/Options.ts
|
|
1651
|
-
function
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
448
|
+
function parseOptions(argv) {
|
|
449
|
+
let argp = 0;
|
|
450
|
+
const options = {};
|
|
451
|
+
while (argp < argv.length && argv[argp][0] === "-") {
|
|
452
|
+
const option = argv[argp++];
|
|
453
|
+
if (option === "--rotations") {
|
|
454
|
+
options.addRotations = true;
|
|
455
|
+
} else if (option === "--allmoves") {
|
|
456
|
+
options.allMoves = true;
|
|
457
|
+
} else if (option === "--outerblockmoves") {
|
|
458
|
+
options.outerBlockMoves = true;
|
|
459
|
+
} else if (option === "--vertexmoves") {
|
|
460
|
+
options.vertexMoves = true;
|
|
461
|
+
} else if (option === "--nocorners") {
|
|
462
|
+
options.includeCornerOrbits = false;
|
|
463
|
+
} else if (option === "--noedges") {
|
|
464
|
+
options.includeEdgeOrbits = false;
|
|
465
|
+
} else if (option === "--noorientation") {
|
|
466
|
+
options.fixedOrientation = true;
|
|
467
|
+
} else if (option === "--nocenters") {
|
|
468
|
+
options.includeCenterOrbits = false;
|
|
469
|
+
} else if (option === "--omit") {
|
|
470
|
+
options.excludeOrbits = argv[argp].split(",");
|
|
471
|
+
argp++;
|
|
472
|
+
} else if (option === "--moves") {
|
|
473
|
+
options.moveList = argv[argp].split(",");
|
|
474
|
+
argp++;
|
|
475
|
+
} else if (option === "--optimize") {
|
|
476
|
+
options.optimizeOrbits = true;
|
|
477
|
+
} else if (option === "--scramble") {
|
|
478
|
+
options.scrambleAmount = 100;
|
|
479
|
+
} else if (option === "--fixcorner") {
|
|
480
|
+
options.fixedPieceType = "v";
|
|
481
|
+
} else if (option === "--fixedge") {
|
|
482
|
+
options.fixedPieceType = "e";
|
|
483
|
+
} else if (option === "--fixcenter") {
|
|
484
|
+
options.fixedPieceType = "f";
|
|
485
|
+
} else if (option === "--orientcenters") {
|
|
486
|
+
options.orientCenters = true;
|
|
487
|
+
} else if (option === "--puzzleorientation") {
|
|
488
|
+
options.puzzleOrientation = JSON.parse(argv[argp]);
|
|
489
|
+
argp++;
|
|
490
|
+
} else {
|
|
491
|
+
throw new Error("Bad option: " + option);
|
|
1661
492
|
}
|
|
1662
|
-
return true;
|
|
1663
|
-
} else {
|
|
1664
|
-
return v ? true : false;
|
|
1665
493
|
}
|
|
494
|
+
const puzzleDescription = parsePuzzleDescription(argv.slice(argp).join(" "));
|
|
495
|
+
return { puzzleDescription, options };
|
|
1666
496
|
}
|
|
1667
497
|
var PuzzleGeometryFullOptions = class {
|
|
1668
498
|
constructor(options = {}) {
|
|
@@ -1688,62 +518,6 @@ var PuzzleGeometryFullOptions = class {
|
|
|
1688
518
|
Object.assign(this, options);
|
|
1689
519
|
}
|
|
1690
520
|
};
|
|
1691
|
-
function parsePGOptionList(optionlist) {
|
|
1692
|
-
const options = {};
|
|
1693
|
-
if (optionlist !== void 0) {
|
|
1694
|
-
if (optionlist.length % 2 !== 0) {
|
|
1695
|
-
throw new Error("Odd length in option list?");
|
|
1696
|
-
}
|
|
1697
|
-
for (let i = 0; i < optionlist.length; i += 2) {
|
|
1698
|
-
if (optionlist[i] === "verbose") {
|
|
1699
|
-
options.verbosity = (options.verbosity ?? 0) + 1;
|
|
1700
|
-
} else if (optionlist[i] === "quiet") {
|
|
1701
|
-
options.verbosity = 0;
|
|
1702
|
-
} else if (optionlist[i] === "allmoves") {
|
|
1703
|
-
options.allMoves = asboolean(optionlist[i + 1]);
|
|
1704
|
-
} else if (optionlist[i] === "outerblockmoves") {
|
|
1705
|
-
options.outerBlockMoves = asboolean(optionlist[i + 1]);
|
|
1706
|
-
} else if (optionlist[i] === "vertexmoves") {
|
|
1707
|
-
options.vertexMoves = asboolean(optionlist[i + 1]);
|
|
1708
|
-
} else if (optionlist[i] === "rotations") {
|
|
1709
|
-
options.addRotations = asboolean(optionlist[i + 1]);
|
|
1710
|
-
} else if (optionlist[i] === "cornersets") {
|
|
1711
|
-
options.includeCornerOrbits = asboolean(optionlist[i + 1]);
|
|
1712
|
-
} else if (optionlist[i] === "centersets") {
|
|
1713
|
-
options.includeCenterOrbits = asboolean(optionlist[i + 1]);
|
|
1714
|
-
} else if (optionlist[i] === "edgesets") {
|
|
1715
|
-
options.includeEdgeOrbits = asboolean(optionlist[i + 1]);
|
|
1716
|
-
} else if (optionlist[i] === "omit") {
|
|
1717
|
-
options.excludeOrbits = optionlist[i + 1];
|
|
1718
|
-
} else if (optionlist[i] === "graycorners") {
|
|
1719
|
-
options.grayCorners = asboolean(optionlist[i + 1]);
|
|
1720
|
-
} else if (optionlist[i] === "graycenters") {
|
|
1721
|
-
options.grayCenters = asboolean(optionlist[i + 1]);
|
|
1722
|
-
} else if (optionlist[i] === "grayedges") {
|
|
1723
|
-
options.grayEdges = asboolean(optionlist[i + 1]);
|
|
1724
|
-
} else if (optionlist[i] === "movelist") {
|
|
1725
|
-
options.moveList = asstructured(optionlist[i + 1]);
|
|
1726
|
-
} else if (optionlist[i] === "killorientation") {
|
|
1727
|
-
options.fixedOrientation = asboolean(optionlist[i + 1]);
|
|
1728
|
-
} else if (optionlist[i] === "optimize") {
|
|
1729
|
-
options.optimizeOrbits = asboolean(optionlist[i + 1]);
|
|
1730
|
-
} else if (optionlist[i] === "scramble") {
|
|
1731
|
-
options.scrambleAmount = optionlist[i + 1];
|
|
1732
|
-
} else if (optionlist[i] === "fix") {
|
|
1733
|
-
options.fixedPieceType = optionlist[i + 1];
|
|
1734
|
-
} else if (optionlist[i] === "orientcenters") {
|
|
1735
|
-
options.orientCenters = asboolean(optionlist[i + 1]);
|
|
1736
|
-
} else if (optionlist[i] === "puzzleorientation") {
|
|
1737
|
-
options.puzzleOrientation = asstructured(optionlist[i + 1]);
|
|
1738
|
-
} else if (optionlist[i] === "puzzleorientations") {
|
|
1739
|
-
options.puzzleOrientations = asstructured(optionlist[i + 1]);
|
|
1740
|
-
} else {
|
|
1741
|
-
throw new Error("Bad option while processing option list " + optionlist[i]);
|
|
1742
|
-
}
|
|
1743
|
-
}
|
|
1744
|
-
}
|
|
1745
|
-
return options;
|
|
1746
|
-
}
|
|
1747
521
|
|
|
1748
522
|
// src/cubing/puzzle-geometry/Perm.ts
|
|
1749
523
|
var zeroCache = [];
|
|
@@ -1876,6 +650,7 @@ var PGOrbitDef = class {
|
|
|
1876
650
|
return factorial(this.size) * Math.pow(this.mod, this.size);
|
|
1877
651
|
}
|
|
1878
652
|
};
|
|
653
|
+
var lastGlobalDefinitionCounter = 0;
|
|
1879
654
|
function externalName(mapper, moveString) {
|
|
1880
655
|
const mv = Move.fromString(moveString);
|
|
1881
656
|
const mv2 = mapper.notationToExternal(mv);
|
|
@@ -1892,14 +667,14 @@ var PGOrbitsDef = class {
|
|
|
1892
667
|
this.movenames = movenames;
|
|
1893
668
|
this.moveops = moveops;
|
|
1894
669
|
}
|
|
1895
|
-
|
|
670
|
+
transformToKTransformationData(t) {
|
|
1896
671
|
const mp = {};
|
|
1897
672
|
for (let j = 0; j < this.orbitnames.length; j++) {
|
|
1898
673
|
mp[this.orbitnames[j]] = t.orbits[j].toKPuzzle();
|
|
1899
674
|
}
|
|
1900
675
|
return mp;
|
|
1901
676
|
}
|
|
1902
|
-
static
|
|
677
|
+
static transformToKTransformationData(orbitnames, t) {
|
|
1903
678
|
const mp = {};
|
|
1904
679
|
for (let j = 0; j < orbitnames.length; j++) {
|
|
1905
680
|
mp[orbitnames[j]] = t.orbits[j].toKPuzzle();
|
|
@@ -1939,7 +714,7 @@ var PGOrbitsDef = class {
|
|
|
1939
714
|
}
|
|
1940
715
|
return result;
|
|
1941
716
|
}
|
|
1942
|
-
|
|
717
|
+
toKPuzzleDefinition(includemoves) {
|
|
1943
718
|
const orbits = {};
|
|
1944
719
|
const start = {};
|
|
1945
720
|
for (let i = 0; i < this.orbitnames.length; i++) {
|
|
@@ -1947,15 +722,24 @@ var PGOrbitsDef = class {
|
|
|
1947
722
|
numPieces: this.orbitdefs[i].size,
|
|
1948
723
|
orientations: this.orbitdefs[i].mod
|
|
1949
724
|
};
|
|
1950
|
-
|
|
725
|
+
const startTransformation = this.solved.orbits[i].toKPuzzle();
|
|
726
|
+
start[this.orbitnames[i]] = {
|
|
727
|
+
pieces: startTransformation.permutation,
|
|
728
|
+
orientation: startTransformation.orientation
|
|
729
|
+
};
|
|
1951
730
|
}
|
|
1952
731
|
const moves = {};
|
|
1953
732
|
if (includemoves) {
|
|
1954
733
|
for (let i = 0; i < this.movenames.length; i++) {
|
|
1955
|
-
moves[this.movenames[i]] = this.
|
|
734
|
+
moves[this.movenames[i]] = this.transformToKTransformationData(this.moveops[i]);
|
|
1956
735
|
}
|
|
1957
736
|
}
|
|
1958
|
-
return {
|
|
737
|
+
return {
|
|
738
|
+
name: `PG3D #${++lastGlobalDefinitionCounter}`,
|
|
739
|
+
orbits,
|
|
740
|
+
startStateData: start,
|
|
741
|
+
moves
|
|
742
|
+
};
|
|
1959
743
|
}
|
|
1960
744
|
optimize() {
|
|
1961
745
|
const neworbitnames = [];
|
|
@@ -3231,9 +2015,12 @@ function findelement(a, p) {
|
|
|
3231
2015
|
}
|
|
3232
2016
|
throw new Error("Element not found");
|
|
3233
2017
|
}
|
|
3234
|
-
function
|
|
2018
|
+
function getPG3DNamedPuzzles() {
|
|
3235
2019
|
return PGPuzzles;
|
|
3236
2020
|
}
|
|
2021
|
+
function getPuzzleDescriptionString(puzzleName) {
|
|
2022
|
+
return PGPuzzles[puzzleName];
|
|
2023
|
+
}
|
|
3237
2024
|
function parsePuzzleDescription(s) {
|
|
3238
2025
|
const a = s.split(/ /).filter(Boolean);
|
|
3239
2026
|
if (a.length % 2 === 0) {
|
|
@@ -3252,6 +2039,19 @@ function parsePuzzleDescription(s) {
|
|
|
3252
2039
|
}
|
|
3253
2040
|
return { shape, cuts };
|
|
3254
2041
|
}
|
|
2042
|
+
function getPuzzleGeometryByDesc(desc, options = {}) {
|
|
2043
|
+
const parsed = parsePuzzleDescription(desc);
|
|
2044
|
+
if (parsed === null) {
|
|
2045
|
+
throw new Error("Could not parse the puzzle description");
|
|
2046
|
+
}
|
|
2047
|
+
const pg = new PuzzleGeometry(parsed, Object.assign({}, { allMoves: true }, options));
|
|
2048
|
+
pg.allstickers();
|
|
2049
|
+
pg.genperms();
|
|
2050
|
+
return pg;
|
|
2051
|
+
}
|
|
2052
|
+
function getPuzzleGeometryByName(puzzleName, options) {
|
|
2053
|
+
return getPuzzleGeometryByDesc(PGPuzzles[puzzleName], options);
|
|
2054
|
+
}
|
|
3255
2055
|
function getmovename(geo, bits, slices) {
|
|
3256
2056
|
let inverted = false;
|
|
3257
2057
|
if (slices - bits[1] < bits[0]) {
|
|
@@ -3315,6 +2115,7 @@ function toFaceCoords(q, maxdist) {
|
|
|
3315
2115
|
}
|
|
3316
2116
|
var PuzzleGeometry = class {
|
|
3317
2117
|
constructor(puzzleDescription, options) {
|
|
2118
|
+
this.puzzleDescription = puzzleDescription;
|
|
3318
2119
|
this.cmovesbyslice = [];
|
|
3319
2120
|
this.duplicatedFaces = [];
|
|
3320
2121
|
this.duplicatedCubies = [];
|
|
@@ -4550,14 +3351,14 @@ var PuzzleGeometry = class {
|
|
|
4550
3351
|
const od = this.getOrbitsDef(false);
|
|
4551
3352
|
return this.header("# ") + od.toKsolve(name, this.notationMapper).join("\n");
|
|
4552
3353
|
}
|
|
4553
|
-
|
|
3354
|
+
getKPuzzleDefinition(fortwisty = true, includemoves = true) {
|
|
4554
3355
|
const od = this.getOrbitsDef(fortwisty, includemoves);
|
|
4555
|
-
const
|
|
4556
|
-
|
|
3356
|
+
const internalDefinition = od.toKPuzzleDefinition(includemoves);
|
|
3357
|
+
internalDefinition.exprimentalPuzzleDescription = this.puzzleDescription;
|
|
3358
|
+
if (!internalDefinition) {
|
|
4557
3359
|
throw new Error("Missing definition!");
|
|
4558
3360
|
}
|
|
4559
|
-
|
|
4560
|
-
return r;
|
|
3361
|
+
return internalDefinition;
|
|
4561
3362
|
}
|
|
4562
3363
|
getMoveFromBits(moverange, amount, inverted, axiscmoves, setmoves, movesetorder) {
|
|
4563
3364
|
const moveorbits = [];
|
|
@@ -5218,14 +4019,9 @@ Vertex distance ${this.vertexdistance}`;
|
|
|
5218
4019
|
var PGNotation = class {
|
|
5219
4020
|
constructor(pg, od) {
|
|
5220
4021
|
this.pg = pg;
|
|
5221
|
-
this.cache = {};
|
|
5222
4022
|
this.orbitNames = od.orbitnames;
|
|
5223
4023
|
}
|
|
5224
4024
|
lookupMove(move) {
|
|
5225
|
-
const key = this.moveToKeyString(move);
|
|
5226
|
-
if (key in this.cache) {
|
|
5227
|
-
return this.cache[key];
|
|
5228
|
-
}
|
|
5229
4025
|
const mv = this.pg.parseMove(move);
|
|
5230
4026
|
if (this.pg.parsedmovelist) {
|
|
5231
4027
|
let found = false;
|
|
@@ -5235,7 +4031,7 @@ var PGNotation = class {
|
|
|
5235
4031
|
}
|
|
5236
4032
|
}
|
|
5237
4033
|
if (!found) {
|
|
5238
|
-
return
|
|
4034
|
+
return null;
|
|
5239
4035
|
}
|
|
5240
4036
|
}
|
|
5241
4037
|
let bits = [mv[2], mv[3]];
|
|
@@ -5244,201 +4040,21 @@ var PGNotation = class {
|
|
|
5244
4040
|
bits = [slices - mv[3], slices - mv[2]];
|
|
5245
4041
|
}
|
|
5246
4042
|
const pgmv = this.pg.getMoveFromBits(bits, mv[5], !mv[4], this.pg.cmovesbyslice[mv[1]], void 0, this.pg.movesetorders[mv[1]]);
|
|
5247
|
-
const r = PGOrbitsDef.
|
|
5248
|
-
this.cache[key] = r;
|
|
5249
|
-
return r;
|
|
5250
|
-
}
|
|
5251
|
-
moveToKeyString(move) {
|
|
5252
|
-
let r = "";
|
|
5253
|
-
if (move.outerLayer) {
|
|
5254
|
-
r = r + move.outerLayer + ",";
|
|
5255
|
-
}
|
|
5256
|
-
if (move.innerLayer) {
|
|
5257
|
-
r = r + move.innerLayer + ",";
|
|
5258
|
-
}
|
|
5259
|
-
r = r + move.family + "," + move.amount;
|
|
4043
|
+
const r = PGOrbitsDef.transformToKTransformationData(this.orbitNames, pgmv);
|
|
5260
4044
|
return r;
|
|
5261
4045
|
}
|
|
5262
4046
|
};
|
|
5263
4047
|
|
|
5264
|
-
|
|
5265
|
-
|
|
5266
|
-
|
|
5267
|
-
|
|
5268
|
-
|
|
5269
|
-
|
|
5270
|
-
|
|
5271
|
-
|
|
5272
|
-
|
|
5273
|
-
|
|
5274
|
-
|
|
5275
|
-
|
|
5276
|
-
|
|
5277
|
-
--gap: write gap
|
|
5278
|
-
--ss: execute Schrier-Sims calculation
|
|
5279
|
-
--3d: use 3D format for SVG file
|
|
5280
|
-
--canon: write canonical string analysis
|
|
5281
|
-
--rotations: include full-puzzle rotations as moves
|
|
5282
|
-
--allmoves: includes all moves (i.e., slice moves for 3x3x3)
|
|
5283
|
-
--outerblockmoves: use outer block moves rather than slice moves
|
|
5284
|
-
--vertexmoves: for tetrahedral puzzles, prefer vertex moves to face moves
|
|
5285
|
-
--nocorners: ignore all corners
|
|
5286
|
-
--noedges: ignore all edges
|
|
5287
|
-
--nocenters: ignore all centers
|
|
5288
|
-
--noorientation: ignore orientations
|
|
5289
|
-
--orientcenters: give centers an orientation
|
|
5290
|
-
--puzzleorientation: for 3D formats, give puzzle orientation
|
|
5291
|
-
--moves movenames: restrict moves to this list (e.g, U2,F,r)
|
|
5292
|
-
--optimize: optimize tws/ksolve/gap output
|
|
5293
|
-
--scramble: scramble solved position
|
|
5294
|
-
--fixcorner: choose moves to keep one corner fixed
|
|
5295
|
-
--fixedge: choose moves to keep one edge fixed
|
|
5296
|
-
--fixcenter: choose moves to keep one center fixed
|
|
5297
|
-
--verbose (-v): make verbose
|
|
5298
|
-
|
|
5299
|
-
The puzzle can be given as a geometric description or by name.
|
|
5300
|
-
The geometric description starts with c (cube), t (tetrahedron),
|
|
5301
|
-
d (dodecahedron), i (icosahedron), or o (octahedron), then a
|
|
5302
|
-
space, then a series of cuts. Each cut begins with f (for a
|
|
5303
|
-
cut parallel to faces), v (for a cut perpendicular to a ray
|
|
5304
|
-
from the center through a corner), or e (for a cut perpendicular
|
|
5305
|
-
to a ray from the center through an edge) followed by a decimal
|
|
5306
|
-
number giving a distance, where 1 is the distance between the
|
|
5307
|
-
center of the puzzle and the center of a face.
|
|
5308
|
-
|
|
5309
|
-
The puzzle names recognized are 2x2x2 through 13x13x13, 20x20x20,
|
|
5310
|
-
master skewb, professor skewb, compy cube, helicopter, dino,
|
|
5311
|
-
little chop, pyramorphix, mastermorphix, pyraminx, Jing pyraminx,
|
|
5312
|
-
master paramorphix, megaminx, gigaminx, pentultimate, starminx,
|
|
5313
|
-
starminx 2, pyraminx crystal, chopasaurus, big chop, skewb diamond,
|
|
5314
|
-
FTO, Christopher's jewel, octastar, Trajber's octahedron, radio chop,
|
|
5315
|
-
icosamate, icosahedron 2, icosahedron 3, icosahedron static faces,
|
|
5316
|
-
icosahedron moving faces, and Eitan's star.
|
|
5317
|
-
|
|
5318
|
-
Examples:
|
|
5319
|
-
puzzlegeometry --ss 2x2x2
|
|
5320
|
-
puzzlegeometry --ss --fixcorner 2x2x2
|
|
5321
|
-
puzzlegeometry --ss --moves U,F2,r 4x4x4
|
|
5322
|
-
puzzlegeometry --ksolve --optimize --moves U,F,R megaminx
|
|
5323
|
-
puzzlegeometry --gap --noedges megaminx
|
|
5324
|
-
`);
|
|
5325
|
-
}
|
|
5326
|
-
if (typeof process !== "undefined" && process.argv && process.argv.length >= 3) {
|
|
5327
|
-
let desc;
|
|
5328
|
-
const puzzleList = getpuzzles();
|
|
5329
|
-
let argp = 2;
|
|
5330
|
-
const optionlist = [];
|
|
5331
|
-
let showargs = true;
|
|
5332
|
-
while (argp < process.argv.length && process.argv[argp][0] === "-") {
|
|
5333
|
-
const option = process.argv[argp++];
|
|
5334
|
-
if (option === "--verbose" || option === "-v") {
|
|
5335
|
-
optionlist.push("verbose", true);
|
|
5336
|
-
} else if (option === "--quiet" || option === "-q") {
|
|
5337
|
-
optionlist.push("quiet", true);
|
|
5338
|
-
showargs = false;
|
|
5339
|
-
} else if (option === "--ksolve") {
|
|
5340
|
-
doksolve = true;
|
|
5341
|
-
} else if (option === "--svg") {
|
|
5342
|
-
showargs = false;
|
|
5343
|
-
optionlist.push("quiet", true);
|
|
5344
|
-
dosvg = true;
|
|
5345
|
-
} else if (option === "--gap") {
|
|
5346
|
-
dogap = true;
|
|
5347
|
-
} else if (option === "--ss") {
|
|
5348
|
-
doss = true;
|
|
5349
|
-
} else if (option === "--3d") {
|
|
5350
|
-
do3d = true;
|
|
5351
|
-
} else if (option === "--canon") {
|
|
5352
|
-
docanon = true;
|
|
5353
|
-
} else if (option === "--rotations") {
|
|
5354
|
-
optionlist.push("rotations", true);
|
|
5355
|
-
} else if (option === "--allmoves") {
|
|
5356
|
-
optionlist.push("allmoves", true);
|
|
5357
|
-
} else if (option === "--outerblockmoves") {
|
|
5358
|
-
optionlist.push("outerblockmoves", true);
|
|
5359
|
-
} else if (option === "--vertexmoves") {
|
|
5360
|
-
optionlist.push("vertexmoves", true);
|
|
5361
|
-
} else if (option === "--nocorners") {
|
|
5362
|
-
optionlist.push("cornersets", false);
|
|
5363
|
-
} else if (option === "--noedges") {
|
|
5364
|
-
optionlist.push("edgesets", false);
|
|
5365
|
-
} else if (option === "--noorientation") {
|
|
5366
|
-
optionlist.push("killorientation", true);
|
|
5367
|
-
} else if (option === "--nocenters") {
|
|
5368
|
-
optionlist.push("centersets", false);
|
|
5369
|
-
} else if (option === "--omit") {
|
|
5370
|
-
optionlist.push("omit", process.argv[argp].split(","));
|
|
5371
|
-
argp++;
|
|
5372
|
-
} else if (option === "--moves") {
|
|
5373
|
-
optionlist.push("movelist", process.argv[argp].split(","));
|
|
5374
|
-
argp++;
|
|
5375
|
-
} else if (option === "--optimize") {
|
|
5376
|
-
optionlist.push("optimize", true);
|
|
5377
|
-
} else if (option === "--scramble") {
|
|
5378
|
-
optionlist.push("scramble", 100);
|
|
5379
|
-
} else if (option === "--fixcorner") {
|
|
5380
|
-
optionlist.push("fix", "v");
|
|
5381
|
-
} else if (option === "--fixedge") {
|
|
5382
|
-
optionlist.push("fix", "e");
|
|
5383
|
-
} else if (option === "--fixcenter") {
|
|
5384
|
-
optionlist.push("fix", "f");
|
|
5385
|
-
} else if (option === "--orientcenters") {
|
|
5386
|
-
optionlist.push("orientcenters", true);
|
|
5387
|
-
} else if (option === "--puzzleorientation") {
|
|
5388
|
-
optionlist.push("puzzleorientation", process.argv[argp]);
|
|
5389
|
-
argp++;
|
|
5390
|
-
} else {
|
|
5391
|
-
throw new Error("Bad option: " + option);
|
|
5392
|
-
}
|
|
5393
|
-
}
|
|
5394
|
-
for (const [name, curDesc] of Object.entries(puzzleList)) {
|
|
5395
|
-
if (name === process.argv[argp]) {
|
|
5396
|
-
desc = curDesc;
|
|
5397
|
-
break;
|
|
5398
|
-
}
|
|
5399
|
-
}
|
|
5400
|
-
let puzzleDescription;
|
|
5401
|
-
if (showargs) {
|
|
5402
|
-
console.log("# " + process.argv.join(" "));
|
|
5403
|
-
}
|
|
5404
|
-
if (desc !== void 0) {
|
|
5405
|
-
const parsed = parsePuzzleDescription(desc);
|
|
5406
|
-
if (parsed === null) {
|
|
5407
|
-
throw new Error("Could not parse puzzle description!");
|
|
5408
|
-
}
|
|
5409
|
-
puzzleDescription = parsed;
|
|
5410
|
-
argp++;
|
|
5411
|
-
} else {
|
|
5412
|
-
const cuts = [];
|
|
5413
|
-
const cutarg = argp++;
|
|
5414
|
-
while (argp + 1 < process.argv.length && process.argv[argp].length === 1) {
|
|
5415
|
-
cuts.push({
|
|
5416
|
-
cutType: process.argv[argp],
|
|
5417
|
-
distance: parseFloat(process.argv[argp + 1])
|
|
5418
|
-
});
|
|
5419
|
-
argp += 2;
|
|
5420
|
-
}
|
|
5421
|
-
puzzleDescription = { shape: process.argv[cutarg], cuts };
|
|
5422
|
-
}
|
|
5423
|
-
const options = parsePGOptionList(optionlist);
|
|
5424
|
-
const pg = new PuzzleGeometry(puzzleDescription, options);
|
|
5425
|
-
pg.allstickers();
|
|
5426
|
-
pg.genperms();
|
|
5427
|
-
if (argp < process.argv.length) {
|
|
5428
|
-
throw new Error("Unprocessed content at end of command line");
|
|
5429
|
-
}
|
|
5430
|
-
if (dogap) {
|
|
5431
|
-
console.log(pg.writegap());
|
|
5432
|
-
} else if (doksolve) {
|
|
5433
|
-
console.log(pg.writeksolve());
|
|
5434
|
-
} else if (dosvg) {
|
|
5435
|
-
console.log(pg.generatesvg(void 0, void 0, void 0, do3d));
|
|
5436
|
-
} else if (do3d) {
|
|
5437
|
-
console.log(JSON.stringify(pg.get3d()));
|
|
5438
|
-
} else if (doss) {
|
|
5439
|
-
pg.writeSchreierSims(console.log);
|
|
5440
|
-
} else if (docanon) {
|
|
5441
|
-
pg.showcanon((_) => console.log(_));
|
|
5442
|
-
}
|
|
5443
|
-
}
|
|
5444
|
-
//# sourceMappingURL=puzzle-geometry-bin.js.map
|
|
4048
|
+
export {
|
|
4049
|
+
parseOptions,
|
|
4050
|
+
Quat,
|
|
4051
|
+
schreierSims,
|
|
4052
|
+
getPG3DNamedPuzzles,
|
|
4053
|
+
getPuzzleDescriptionString,
|
|
4054
|
+
parsePuzzleDescription,
|
|
4055
|
+
getPuzzleGeometryByDesc,
|
|
4056
|
+
getPuzzleGeometryByName,
|
|
4057
|
+
PuzzleGeometry,
|
|
4058
|
+
PGNotation
|
|
4059
|
+
};
|
|
4060
|
+
//# sourceMappingURL=chunk-J2U2GRS4.js.map
|