cubing 0.42.1 → 0.43.1
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 +1 -1
- package/dist/bin/order.js +22 -0
- package/dist/bin/order.js.map +7 -0
- package/dist/bin/puzzle-geometry-bin.js +284 -0
- package/dist/bin/puzzle-geometry-bin.js.map +7 -0
- package/dist/bin/scramble.js +124 -0
- package/dist/bin/scramble.js.map +7 -0
- package/dist/{cubing/KPattern-12e23b1f.d.ts → lib/cubing/KPattern-60960997.d.ts} +1 -1
- package/dist/{cubing/TwizzleLink-8eaf164c.d.ts → lib/cubing/TwizzleLink-3c302469.d.ts} +1 -1
- package/dist/{cubing → lib/cubing}/alg/index.js +1 -1
- package/dist/{cubing → lib/cubing}/bluetooth/index.d.ts +3 -3
- package/dist/{cubing → lib/cubing}/bluetooth/index.js +48 -45
- package/dist/{cubing → lib/cubing}/bluetooth/index.js.map +2 -2
- package/dist/{cubing/bluetooth-puzzle-91e73b7f.d.ts → lib/cubing/bluetooth-puzzle-c3224834.d.ts} +1 -1
- package/dist/{cubing/chunk-Y6TQYMMT.js → lib/cubing/chunks/chunk-2N56G6TG.js} +5 -5
- package/dist/{cubing/chunk-Y6TQYMMT.js.map → lib/cubing/chunks/chunk-2N56G6TG.js.map} +2 -2
- package/dist/{cubing/chunk-AU3TSTCA.js → lib/cubing/chunks/chunk-32CXD7UA.js} +31 -32
- package/dist/{cubing/chunk-AU3TSTCA.js.map → lib/cubing/chunks/chunk-32CXD7UA.js.map} +2 -2
- package/dist/{cubing/chunk-7QE2OVHX.js → lib/cubing/chunks/chunk-7GUL3OBQ.js} +1 -1
- package/dist/{cubing/chunk-7QE2OVHX.js.map → lib/cubing/chunks/chunk-7GUL3OBQ.js.map} +1 -1
- package/dist/{cubing/chunk-ULQMFOA2.js → lib/cubing/chunks/chunk-7X47IY3P.js} +15 -13
- package/dist/{cubing/chunk-ULQMFOA2.js.map → lib/cubing/chunks/chunk-7X47IY3P.js.map} +2 -2
- package/dist/{cubing/chunk-VSFPWTDH.js → lib/cubing/chunks/chunk-DYHU7CO7.js} +616 -34
- package/dist/lib/cubing/chunks/chunk-DYHU7CO7.js.map +7 -0
- package/dist/{cubing/chunk-QLTH326B.js → lib/cubing/chunks/chunk-KDMCYBSC.js} +2 -2
- package/dist/{cubing/chunk-QLTH326B.js.map → lib/cubing/chunks/chunk-KDMCYBSC.js.map} +1 -1
- package/dist/lib/cubing/chunks/chunk-NAPITA3L.js +1 -0
- package/dist/{cubing/chunk-3ON3T3OH.js → lib/cubing/chunks/chunk-NB6OOT2E.js} +3 -3
- package/dist/{cubing/chunk-3ON3T3OH.js.map → lib/cubing/chunks/chunk-NB6OOT2E.js.map} +1 -1
- package/dist/{cubing/chunk-6OUID4YZ.js → lib/cubing/chunks/chunk-NEAVVKH5.js} +2 -2
- package/dist/{cubing/chunk-6OUID4YZ.js.map → lib/cubing/chunks/chunk-NEAVVKH5.js.map} +1 -1
- package/dist/{cubing/chunk-OLH526Y4.js → lib/cubing/chunks/chunk-QF4HTZYW.js} +11 -10
- package/dist/lib/cubing/chunks/chunk-QF4HTZYW.js.map +7 -0
- package/dist/{cubing/chunk-KF2JGMZA.js → lib/cubing/chunks/chunk-RS62HLA5.js} +21 -19
- package/dist/{cubing/chunk-KF2JGMZA.js.map → lib/cubing/chunks/chunk-RS62HLA5.js.map} +2 -2
- package/dist/{cubing/chunk-ZYCJIZDN.js → lib/cubing/chunks/chunk-VL22SFND.js} +1 -1
- package/dist/{cubing/chunk-ZYCJIZDN.js.map → lib/cubing/chunks/chunk-VL22SFND.js.map} +1 -1
- package/dist/{cubing/chunk-FCRM3RQU.js → lib/cubing/chunks/chunk-Z2CCB3XX.js} +61 -76
- package/dist/{cubing/chunk-FCRM3RQU.js.map → lib/cubing/chunks/chunk-Z2CCB3XX.js.map} +2 -2
- package/dist/{cubing/chunk-YEOYXOGB.js → lib/cubing/chunks/chunk-ZUPLJQAD.js} +3 -3
- package/dist/{cubing/chunk-YEOYXOGB.js.map → lib/cubing/chunks/chunk-ZUPLJQAD.js.map} +1 -1
- package/dist/lib/cubing/chunks/inside-7XZ5YPBP.js +16 -0
- package/dist/{cubing/inside-AZHBOSXQ.js.map → lib/cubing/chunks/inside-7XZ5YPBP.js.map} +2 -2
- package/dist/{cubing/puzzles-dynamic-3x3x3-JFZVE27C.js → lib/cubing/chunks/puzzles-dynamic-3x3x3-NSCZM77Q.js} +1 -1
- package/dist/{cubing/puzzles-dynamic-3x3x3-JFZVE27C.js.map → lib/cubing/chunks/puzzles-dynamic-3x3x3-NSCZM77Q.js.map} +1 -1
- package/dist/{cubing/puzzles-dynamic-4x4x4-DT42HVIY.js → lib/cubing/chunks/puzzles-dynamic-4x4x4-REUXFQJ4.js} +1 -1
- package/dist/{cubing/puzzles-dynamic-4x4x4-DT42HVIY.js.map → lib/cubing/chunks/puzzles-dynamic-4x4x4-REUXFQJ4.js.map} +1 -1
- package/dist/{cubing/puzzles-dynamic-megaminx-QQYC32WM.js → lib/cubing/chunks/puzzles-dynamic-megaminx-2LVHIDL4.js} +1 -1
- package/dist/{cubing/puzzles-dynamic-megaminx-QQYC32WM.js.map → lib/cubing/chunks/puzzles-dynamic-megaminx-2LVHIDL4.js.map} +1 -1
- package/dist/{cubing/puzzles-dynamic-side-events-42Q52YAB.js → lib/cubing/chunks/puzzles-dynamic-side-events-HEMWSAMQ.js} +11 -329
- package/dist/lib/cubing/chunks/puzzles-dynamic-side-events-HEMWSAMQ.js.map +7 -0
- package/dist/{cubing/puzzles-dynamic-unofficial-PCHNKY4Y.js → lib/cubing/chunks/puzzles-dynamic-unofficial-RETSTRRW.js} +1 -1
- package/dist/{cubing/puzzles-dynamic-unofficial-PCHNKY4Y.js.map → lib/cubing/chunks/puzzles-dynamic-unofficial-RETSTRRW.js.map} +1 -1
- package/dist/{cubing/search-dynamic-sgs-side-events-5U7NX34Z.js → lib/cubing/chunks/search-dynamic-sgs-side-events-67TCU227.js} +14 -14
- package/dist/{cubing/search-dynamic-sgs-side-events-5U7NX34Z.js.map → lib/cubing/chunks/search-dynamic-sgs-side-events-67TCU227.js.map} +2 -2
- package/dist/{cubing/search-dynamic-sgs-unofficial-YA6LSNFG.js → lib/cubing/chunks/search-dynamic-sgs-unofficial-OUTZD5Y2.js} +7 -7
- package/dist/{cubing/search-dynamic-sgs-unofficial-YA6LSNFG.js.map → lib/cubing/chunks/search-dynamic-sgs-unofficial-OUTZD5Y2.js.map} +2 -2
- package/dist/{cubing/search-dynamic-solve-3x3x3-HM7RKVEM.js → lib/cubing/chunks/search-dynamic-solve-3x3x3-5UOUZX2V.js} +1 -1
- package/dist/{cubing/search-dynamic-solve-3x3x3-HM7RKVEM.js.map → lib/cubing/chunks/search-dynamic-solve-3x3x3-5UOUZX2V.js.map} +1 -1
- package/dist/{cubing/search-dynamic-solve-4x4x4-Z26CIIGT.js → lib/cubing/chunks/search-dynamic-solve-4x4x4-7NWGTCEG.js} +12 -9
- package/dist/lib/cubing/chunks/search-dynamic-solve-4x4x4-7NWGTCEG.js.map +7 -0
- package/dist/{cubing/search-dynamic-solve-fto-GGEYM3K6.js → lib/cubing/chunks/search-dynamic-solve-fto-EY5ZVAGO.js} +1 -1
- package/dist/{cubing/search-dynamic-solve-fto-GGEYM3K6.js.map → lib/cubing/chunks/search-dynamic-solve-fto-EY5ZVAGO.js.map} +1 -1
- package/dist/{cubing/search-dynamic-solve-kilominx-VUT2DIRQ.js → lib/cubing/chunks/search-dynamic-solve-kilominx-WREDL6AE.js} +2 -2
- package/dist/{cubing/search-dynamic-solve-kilominx-VUT2DIRQ.js.map → lib/cubing/chunks/search-dynamic-solve-kilominx-WREDL6AE.js.map} +1 -1
- package/dist/{cubing/search-dynamic-solve-master_tetraminx-WJWLROFP.js → lib/cubing/chunks/search-dynamic-solve-master_tetraminx-3D4MBF3V.js} +1 -1
- package/dist/{cubing/search-dynamic-solve-master_tetraminx-WJWLROFP.js.map → lib/cubing/chunks/search-dynamic-solve-master_tetraminx-3D4MBF3V.js.map} +1 -1
- package/dist/{cubing/search-dynamic-solve-sq1-TO7UHE6Y.js → lib/cubing/chunks/search-dynamic-solve-sq1-INOYNRSJ.js} +1 -1
- package/dist/{cubing/search-dynamic-solve-sq1-TO7UHE6Y.js.map → lib/cubing/chunks/search-dynamic-solve-sq1-INOYNRSJ.js.map} +1 -1
- package/dist/{cubing → lib/cubing/chunks}/search-worker-entry.js +4 -4
- package/dist/{cubing → lib/cubing/chunks}/search-worker-entry.js.map +1 -1
- package/dist/{cubing/twisty-dynamic-3d-NTZMGNOB.js → lib/cubing/chunks/twisty-dynamic-3d-EKFIEPIM.js} +78 -37
- package/dist/{cubing/twisty-dynamic-3d-NTZMGNOB.js.map → lib/cubing/chunks/twisty-dynamic-3d-EKFIEPIM.js.map} +2 -2
- package/dist/{cubing/twsearch-BDAXZGZU-SJCPOVWW.js → lib/cubing/chunks/twsearch-BDAXZGZU-Q2YC2EQ6.js} +1 -1
- package/dist/{cubing/twsearch-BDAXZGZU-SJCPOVWW.js.map → lib/cubing/chunks/twsearch-BDAXZGZU-Q2YC2EQ6.js.map} +1 -1
- package/dist/{cubing/twsearch-INIYLWAM.js → lib/cubing/chunks/twsearch-SLVE4NQH.js} +3 -3
- package/dist/{cubing/twsearch-INIYLWAM.js.map → lib/cubing/chunks/twsearch-SLVE4NQH.js.map} +1 -1
- package/dist/{cubing → lib/cubing}/kpuzzle/index.d.ts +1 -1
- package/dist/{cubing → lib/cubing}/kpuzzle/index.js +2 -2
- package/dist/{cubing → lib/cubing}/notation/index.d.ts +2 -2
- package/dist/{cubing → lib/cubing}/notation/index.js +4 -4
- package/dist/{cubing/outside-deaac55d.d.ts → lib/cubing/outside-2f424d30.d.ts} +1 -1
- package/dist/{cubing → lib/cubing}/protocol/index.d.ts +1 -1
- package/dist/{cubing → lib/cubing}/protocol/index.js +4 -4
- package/dist/lib/cubing/puzzle-geometry/index.d.ts +7 -0
- package/dist/{cubing → lib/cubing}/puzzle-geometry/index.js +142 -62
- package/dist/lib/cubing/puzzle-geometry/index.js.map +7 -0
- package/dist/{cubing → lib/cubing}/puzzles/index.d.ts +3 -3
- package/dist/{cubing → lib/cubing}/puzzles/index.js +4 -4
- package/dist/lib/cubing/scramble/index.d.ts +3 -0
- package/dist/lib/cubing/scramble/index.js +16 -0
- package/dist/{cubing → lib/cubing}/search/index.d.ts +2 -2
- package/dist/{cubing → lib/cubing}/search/index.js +9 -10
- package/dist/lib/cubing/search/index.js.map +7 -0
- package/dist/{cubing → lib/cubing}/stream/index.d.ts +2 -2
- package/dist/{cubing → lib/cubing}/stream/index.js +4 -1
- package/dist/{cubing → lib/cubing}/stream/index.js.map +2 -2
- package/dist/{cubing → lib/cubing}/twisty/index.d.ts +3 -3
- package/dist/{cubing → lib/cubing}/twisty/index.js +310 -313
- package/dist/{cubing → lib/cubing}/twisty/index.js.map +3 -3
- package/package.json +40 -41
- package/dist/cubing/chunk-E4S4UDA6.js +0 -615
- package/dist/cubing/chunk-E4S4UDA6.js.map +0 -7
- package/dist/cubing/chunk-OLH526Y4.js.map +0 -7
- package/dist/cubing/chunk-VSFPWTDH.js.map +0 -7
- package/dist/cubing/inside-AZHBOSXQ.js +0 -17
- package/dist/cubing/puzzle-geometry/index.d.ts +0 -7
- package/dist/cubing/puzzle-geometry/index.js.map +0 -7
- package/dist/cubing/puzzles-dynamic-side-events-42Q52YAB.js.map +0 -7
- package/dist/cubing/scramble/index.d.ts +0 -3
- package/dist/cubing/scramble/index.js +0 -16
- package/dist/cubing/search-dynamic-solve-4x4x4-Z26CIIGT.js.map +0 -7
- package/src/README.md +0 -10
- /package/dist/{cubing → lib/cubing}/Alg-c6770822.d.ts +0 -0
- /package/dist/{cubing → lib/cubing}/alg/index.d.ts +0 -0
- /package/dist/{cubing → lib/cubing}/alg/index.js.map +0 -0
- /package/dist/{cubing/kpuzzle/index.js.map → lib/cubing/chunks/chunk-NAPITA3L.js.map} +0 -0
- /package/dist/{cubing/notation → lib/cubing/kpuzzle}/index.js.map +0 -0
- /package/dist/{cubing/protocol → lib/cubing/notation}/index.js.map +0 -0
- /package/dist/{cubing → lib/cubing}/parseAlg-d2c83795.d.ts +0 -0
- /package/dist/{cubing/puzzles → lib/cubing/protocol}/index.js.map +0 -0
- /package/dist/{cubing/scramble → lib/cubing/puzzles}/index.js.map +0 -0
- /package/dist/{cubing/search → lib/cubing/scramble}/index.js.map +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Alg
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7X47IY3P.js";
|
|
4
4
|
|
|
5
5
|
// src/cubing/vendor/mpl/twsearch/index.js
|
|
6
6
|
console.info("Loading twsearch v0.4.2");
|
|
7
7
|
async function importOnce() {
|
|
8
|
-
const fn = (await import("./twsearch-BDAXZGZU-
|
|
8
|
+
const fn = (await import("./twsearch-BDAXZGZU-Q2YC2EQ6.js")).default;
|
|
9
9
|
return await fn();
|
|
10
10
|
}
|
|
11
11
|
var cachedEmscriptenModule = null;
|
|
@@ -138,4 +138,4 @@ export {
|
|
|
138
138
|
solvePattern,
|
|
139
139
|
solveScramble
|
|
140
140
|
};
|
|
141
|
-
//# sourceMappingURL=twsearch-
|
|
141
|
+
//# sourceMappingURL=twsearch-SLVE4NQH.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
3
|
+
"sources": ["../../../../src/cubing/vendor/mpl/twsearch/index.js"],
|
|
4
4
|
"sourcesContent": ["console.info(\"Loading twsearch v0.4.2\");\n// src/js/api.ts\nimport { Alg } from \"../../../alg\";\nasync function importOnce() {\n const fn = (await import(\"./twsearch-BDAXZGZU.js\")).default;\n return await fn();\n}\nvar cachedEmscriptenModule = null;\nasync function emscriptenModule() {\n return cachedEmscriptenModule ?? (cachedEmscriptenModule = importOnce());\n}\nfunction cwrap(fn, returnType, argTypes, processReturnValue = (v) => v) {\n const wrapped = (async () => (await emscriptenModule()).cwrap(fn, returnType, argTypes))();\n return async (...args) => {\n return processReturnValue((await wrapped)(...args));\n };\n}\nvar NoSolutionError = class extends Error {\n};\nfunction parseResult(s) {\n if (s === \"--no solution--\") {\n throw new NoSolutionError(\"\");\n }\n return Alg.fromString(s);\n}\nvar stringArg = [\"string\"];\nvar setArg = cwrap(\n \"w_arg\",\n \"void\",\n stringArg\n);\nvar setKPuzzleDefString = cwrap(\n \"w_setksolve\",\n \"void\",\n stringArg\n);\nvar solveScramble = cwrap(\n \"w_solvescramble\",\n \"string\",\n stringArg,\n parseResult\n);\nvar solvePattern = cwrap(\n \"w_solveposition\",\n \"string\",\n stringArg,\n parseResult\n);\n\n// src/js/serialize.ts\nvar BLANK_LINE = \"\";\nvar END = \"End\";\nfunction sanitize(s) {\n return s.replaceAll(/[^A-Za-z0-9]/g, \"_\");\n}\nfunction serializeMoveTransformation(name, t) {\n const outputLines = [];\n outputLines.push(`MoveTransformation ${sanitize(name)}`);\n for (const [orbitName, orbitData] of Object.entries(t)) {\n outputLines.push(sanitize(orbitName));\n outputLines.push(orbitData.permutation.join(\" \"));\n outputLines.push(orbitData.orientationDelta.join(\" \"));\n }\n outputLines.push(END);\n outputLines.push(BLANK_LINE);\n return outputLines.join(\"\\n\");\n}\nfunction serializeScramblePattern(name, t) {\n const outputLines = [];\n outputLines.push(`ScrambleState ${sanitize(name)}`);\n for (const [orbitName, orbitData] of Object.entries(t)) {\n outputLines.push(sanitize(orbitName));\n outputLines.push(orbitData.pieces.join(\" \"));\n outputLines.push(orbitData.orientation.join(\" \"));\n }\n outputLines.push(END);\n outputLines.push(BLANK_LINE);\n return outputLines.join(\"\\n\");\n}\nfunction serializeDefToTws(kpuzzle, options) {\n let outputLines = [];\n const def = kpuzzle.definition;\n outputLines.push(`Name ${sanitize(def.name ?? \"CustomPuzzle\")}`);\n outputLines.push(BLANK_LINE);\n for (const orbitDefinition of def.orbits) {\n outputLines.push(\n `Set ${sanitize(orbitDefinition.orbitName)} ${orbitDefinition.numPieces} ${orbitDefinition.numOrientations}`\n );\n }\n outputLines.push(BLANK_LINE);\n outputLines.push(\"StartState\");\n if (options?.startPattern) {\n outputLines.push(options?.startPattern);\n } else {\n for (const [orbitName, orbitData] of Object.entries(def.defaultPattern)) {\n outputLines.push(sanitize(orbitName));\n outputLines.push(orbitData.pieces.join(\" \"));\n outputLines.push(orbitData.orientation.join(\" \"));\n }\n }\n outputLines.push(END);\n outputLines.push(BLANK_LINE);\n function include(moveName) {\n if (options?.moveSubset) {\n return options.moveSubset.includes(moveName);\n } else {\n return true;\n }\n }\n for (const [moveName, moveDef] of Object.entries(def.moves)) {\n if (include(moveName)) {\n outputLines.push(serializeMoveTransformation(moveName, moveDef));\n }\n }\n for (const [moveName, moveAlgDef] of Object.entries(\n def.derivedMoves ?? {}\n )) {\n if (include(moveName)) {\n const transformation = kpuzzle.algToTransformation(moveAlgDef);\n outputLines.push(\n serializeMoveTransformation(\n moveName,\n transformation.transformationData\n )\n );\n }\n }\n return outputLines.join(\"\\n\");\n}\nexport {\n NoSolutionError,\n serializeDefToTws,\n serializeMoveTransformation,\n serializeScramblePattern,\n setArg,\n setKPuzzleDefString,\n solveScramble,\n solvePattern\n};\n"],
|
|
5
5
|
"mappings": ";;;;;AAAA,QAAQ,KAAK,yBAAyB;AAGtC,eAAe,aAAa;AAC1B,QAAM,MAAM,MAAM,OAAO,iCAAwB,GAAG;AACpD,SAAO,MAAM,GAAG;AAClB;AACA,IAAI,yBAAyB;AAC7B,eAAe,mBAAmB;AAChC,SAAO,2BAA2B,yBAAyB,WAAW;AACxE;AACA,SAAS,MAAM,IAAI,YAAY,UAAU,qBAAqB,CAAC,MAAM,GAAG;AACtE,QAAM,WAAW,aAAa,MAAM,iBAAiB,GAAG,MAAM,IAAI,YAAY,QAAQ,GAAG;AACzF,SAAO,UAAU,SAAS;AACxB,WAAO,oBAAoB,MAAM,SAAS,GAAG,IAAI,CAAC;AAAA,EACpD;AACF;AACA,IAAI,kBAAkB,cAAc,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AI,QAAQ,QAAQ,GAAG;AACrB,YAAM,iBAAiB,QAAQ,oBAAoB,UAAU;AAC7D,kBAAY;AAAA,QACV;AAAA,UACE;AAAA,UACA,eAAe;AAAA,QACjB;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACA,SAAO,YAAY,KAAK,IAAI;AAC9B;",
|
|
6
6
|
"names": []
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { K as KPattern, c as KPatternData, d as KPatternOrbitData, a as KPuzzle, b as KPuzzleDefinition, g as KTransformation, e as KTransformationData, f as KTransformationOrbitData } from '../KPattern-
|
|
1
|
+
export { K as KPattern, c as KPatternData, d as KPatternOrbitData, a as KPuzzle, b as KPuzzleDefinition, g as KTransformation, e as KTransformationData, f as KTransformationOrbitData } from '../KPattern-60960997.js';
|
|
2
2
|
import '../Alg-c6770822.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as Alg } from '../Alg-c6770822.js';
|
|
2
|
-
import { P as PuzzleLoader } from '../TwizzleLink-
|
|
2
|
+
import { P as PuzzleLoader } from '../TwizzleLink-3c302469.js';
|
|
3
3
|
import 'three';
|
|
4
4
|
import '../parseAlg-d2c83795.js';
|
|
5
|
-
import '../KPattern-
|
|
5
|
+
import '../KPattern-60960997.js';
|
|
6
6
|
|
|
7
7
|
declare enum CommonMetric {
|
|
8
8
|
OuterBlockTurnMetric = "OBTM",
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
countMetricMoves,
|
|
6
6
|
countMoves,
|
|
7
7
|
countMovesETM
|
|
8
|
-
} from "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
8
|
+
} from "../chunks/chunk-ZUPLJQAD.js";
|
|
9
|
+
import "../chunks/chunk-RS62HLA5.js";
|
|
10
|
+
import "../chunks/chunk-QF4HTZYW.js";
|
|
11
|
+
import "../chunks/chunk-7X47IY3P.js";
|
|
12
12
|
export {
|
|
13
13
|
CommonMetric as ExperimentalCommonMetric,
|
|
14
14
|
CommonMetricAlias as ExperimentalCommonMetricAlias,
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
spacedHexToBuffer,
|
|
6
6
|
twizzleBinaryToBinaryComponents,
|
|
7
7
|
twizzleBinaryToReid3x3x3
|
|
8
|
-
} from "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
8
|
+
} from "../chunks/chunk-NB6OOT2E.js";
|
|
9
|
+
import "../chunks/chunk-RS62HLA5.js";
|
|
10
|
+
import "../chunks/chunk-QF4HTZYW.js";
|
|
11
|
+
import "../chunks/chunk-7X47IY3P.js";
|
|
12
12
|
export {
|
|
13
13
|
binaryComponentsToReid3x3x3 as experimentalBinaryComponentsToReid3x3x3,
|
|
14
14
|
bufferToSpacedHex as experimentalBufferToSpacedHex,
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { i as Perm } from '../KPattern-60960997.js';
|
|
2
|
+
export { y as EXPERIMENTAL_PUZZLE_BASE_SHAPES, w as EXPERIMENTAL_PUZZLE_CUT_TYPES, t as ExperimentalPGNotation, z as ExperimentalPuzzleBaseShape, u as ExperimentalPuzzleCutDescription, x as ExperimentalPuzzleCutType, v as ExperimentalPuzzleDescription, s as ExperimentalPuzzleGeometryOptions, P as PuzzleGeometry, Q as Quat, S as StickerDat, n as StickerDatAxis, o as StickerDatFace, q as StickerDatSticker, m as getPG3DNamedPuzzles, j as getPuzzleDescriptionString, k as getPuzzleGeometryByDesc, l as getPuzzleGeometryByName, r as parseOptions, p as parsePuzzleDescription } from '../KPattern-60960997.js';
|
|
3
|
+
import '../Alg-c6770822.js';
|
|
4
|
+
|
|
5
|
+
declare function schreierSims(g: Perm[], disp: (s: string) => void): bigint;
|
|
6
|
+
|
|
7
|
+
export { schreierSims };
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Move,
|
|
3
3
|
QuantumMove
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunks/chunk-7X47IY3P.js";
|
|
5
5
|
|
|
6
6
|
// src/cubing/puzzle-geometry/FaceNameSwizzler.ts
|
|
7
7
|
var FaceNameSwizzler = class {
|
|
8
8
|
constructor(facenames, gripnames_arg) {
|
|
9
9
|
this.facenames = facenames;
|
|
10
|
-
this.prefixFree = true;
|
|
11
|
-
this.gripnames = [];
|
|
12
10
|
if (gripnames_arg) {
|
|
13
11
|
this.gripnames = gripnames_arg;
|
|
14
12
|
}
|
|
@@ -20,6 +18,8 @@ var FaceNameSwizzler = class {
|
|
|
20
18
|
}
|
|
21
19
|
}
|
|
22
20
|
}
|
|
21
|
+
prefixFree = true;
|
|
22
|
+
gripnames = [];
|
|
23
23
|
setGripNames(names) {
|
|
24
24
|
this.gripnames = names;
|
|
25
25
|
}
|
|
@@ -422,9 +422,9 @@ var pyraminxInternalQuantumY = new QuantumMove("Dv");
|
|
|
422
422
|
var PyraminxNotationMapper = class {
|
|
423
423
|
constructor(child) {
|
|
424
424
|
this.child = child;
|
|
425
|
-
this.wcaHack = false;
|
|
426
|
-
this.map = pyraminxFamilyMap;
|
|
427
425
|
}
|
|
426
|
+
wcaHack = false;
|
|
427
|
+
map = pyraminxFamilyMap;
|
|
428
428
|
notationToInternal(move) {
|
|
429
429
|
if (this.wcaHack && move.innerLayer === 2 && move.outerLayer === null) {
|
|
430
430
|
const newFamilyWCA = pyraminxFamilyMapWCA[move.family];
|
|
@@ -475,9 +475,9 @@ var PyraminxNotationMapper = class {
|
|
|
475
475
|
}
|
|
476
476
|
};
|
|
477
477
|
var TetraminxNotationMapper = class extends PyraminxNotationMapper {
|
|
478
|
+
wcaHack = true;
|
|
478
479
|
constructor(child) {
|
|
479
480
|
super(child);
|
|
480
|
-
this.wcaHack = true;
|
|
481
481
|
this.map = tetraminxFamilyMap;
|
|
482
482
|
}
|
|
483
483
|
};
|
|
@@ -651,47 +651,49 @@ function parseOptions(argv) {
|
|
|
651
651
|
return { puzzleDescription, options };
|
|
652
652
|
}
|
|
653
653
|
var PuzzleGeometryFullOptions = class {
|
|
654
|
+
verbosity = 0;
|
|
655
|
+
// verbosity (console.log)
|
|
656
|
+
allMoves = false;
|
|
657
|
+
// generate all slice moves in ksolve
|
|
658
|
+
outerBlockMoves;
|
|
659
|
+
// generate outer block moves
|
|
660
|
+
vertexMoves = false;
|
|
661
|
+
// generate vertex moves
|
|
662
|
+
addRotations = false;
|
|
663
|
+
// add symmetry information to ksolve output
|
|
664
|
+
moveList = null;
|
|
665
|
+
// move list to generate
|
|
666
|
+
fixedOrientation = false;
|
|
667
|
+
// eliminate any orientations
|
|
668
|
+
fixedPieceType = null;
|
|
669
|
+
// fix a piece?
|
|
670
|
+
orientCenters = false;
|
|
671
|
+
// orient centers?
|
|
672
|
+
// TODO: Group these into a single object?
|
|
673
|
+
includeCornerOrbits = true;
|
|
674
|
+
// include corner orbits
|
|
675
|
+
includeCenterOrbits = true;
|
|
676
|
+
// include center orbits
|
|
677
|
+
includeEdgeOrbits = true;
|
|
678
|
+
// include edge orbits
|
|
679
|
+
// Overrides the previous options.
|
|
680
|
+
excludeOrbits = [];
|
|
681
|
+
// exclude these orbits
|
|
682
|
+
optimizeOrbits = false;
|
|
683
|
+
// optimize PermOri
|
|
684
|
+
grayCorners = false;
|
|
685
|
+
// make corner sets gray
|
|
686
|
+
grayCenters = false;
|
|
687
|
+
// make center sets gray
|
|
688
|
+
grayEdges = false;
|
|
689
|
+
// make edge sets gray
|
|
690
|
+
puzzleOrientation = null;
|
|
691
|
+
// single puzzle orientation from options
|
|
692
|
+
puzzleOrientations = null;
|
|
693
|
+
// puzzle orientation override object from options // TODO: is this needed?
|
|
694
|
+
scrambleAmount = 0;
|
|
654
695
|
// scramble?
|
|
655
696
|
constructor(options = {}) {
|
|
656
|
-
this.verbosity = 0;
|
|
657
|
-
// verbosity (console.log)
|
|
658
|
-
this.allMoves = false;
|
|
659
|
-
// generate outer block moves
|
|
660
|
-
this.vertexMoves = false;
|
|
661
|
-
// generate vertex moves
|
|
662
|
-
this.addRotations = false;
|
|
663
|
-
// add symmetry information to ksolve output
|
|
664
|
-
this.moveList = null;
|
|
665
|
-
// move list to generate
|
|
666
|
-
this.fixedOrientation = false;
|
|
667
|
-
// eliminate any orientations
|
|
668
|
-
this.fixedPieceType = null;
|
|
669
|
-
// fix a piece?
|
|
670
|
-
this.orientCenters = false;
|
|
671
|
-
// orient centers?
|
|
672
|
-
// TODO: Group these into a single object?
|
|
673
|
-
this.includeCornerOrbits = true;
|
|
674
|
-
// include corner orbits
|
|
675
|
-
this.includeCenterOrbits = true;
|
|
676
|
-
// include center orbits
|
|
677
|
-
this.includeEdgeOrbits = true;
|
|
678
|
-
// include edge orbits
|
|
679
|
-
// Overrides the previous options.
|
|
680
|
-
this.excludeOrbits = [];
|
|
681
|
-
// exclude these orbits
|
|
682
|
-
this.optimizeOrbits = false;
|
|
683
|
-
// optimize PermOri
|
|
684
|
-
this.grayCorners = false;
|
|
685
|
-
// make corner sets gray
|
|
686
|
-
this.grayCenters = false;
|
|
687
|
-
// make center sets gray
|
|
688
|
-
this.grayEdges = false;
|
|
689
|
-
// make edge sets gray
|
|
690
|
-
this.puzzleOrientation = null;
|
|
691
|
-
// single puzzle orientation from options
|
|
692
|
-
this.puzzleOrientations = null;
|
|
693
|
-
// puzzle orientation override object from options // TODO: is this needed?
|
|
694
|
-
this.scrambleAmount = 0;
|
|
695
697
|
Object.assign(this, options);
|
|
696
698
|
}
|
|
697
699
|
};
|
|
@@ -747,6 +749,9 @@ function lcm(a, b) {
|
|
|
747
749
|
return a / gcd(a, b) * b;
|
|
748
750
|
}
|
|
749
751
|
var Perm = class _Perm {
|
|
752
|
+
n;
|
|
753
|
+
// length
|
|
754
|
+
p;
|
|
750
755
|
// The permutation itself
|
|
751
756
|
constructor(a) {
|
|
752
757
|
this.n = a.length;
|
|
@@ -1156,12 +1161,13 @@ var PGOrbitsDef = class _PGOrbitsDef {
|
|
|
1156
1161
|
return n;
|
|
1157
1162
|
}
|
|
1158
1163
|
};
|
|
1159
|
-
var
|
|
1164
|
+
var PGOrbit = class _PGOrbit {
|
|
1160
1165
|
constructor(perm, ori, orimod) {
|
|
1161
1166
|
this.perm = perm;
|
|
1162
1167
|
this.ori = ori;
|
|
1163
1168
|
this.orimod = orimod;
|
|
1164
1169
|
}
|
|
1170
|
+
static ktransformationCache = [];
|
|
1165
1171
|
static e(n, mod) {
|
|
1166
1172
|
return new _PGOrbit(iota(n), zeros(n), mod);
|
|
1167
1173
|
}
|
|
@@ -1336,8 +1342,6 @@ var _PGOrbit = class _PGOrbit {
|
|
|
1336
1342
|
};
|
|
1337
1343
|
}
|
|
1338
1344
|
};
|
|
1339
|
-
_PGOrbit.ktransformationCache = [];
|
|
1340
|
-
var PGOrbit = _PGOrbit;
|
|
1341
1345
|
var PGTransformBase = class {
|
|
1342
1346
|
constructor(orbits) {
|
|
1343
1347
|
this.orbits = orbits;
|
|
@@ -1464,6 +1468,7 @@ var DisjointUnion = class {
|
|
|
1464
1468
|
this.heads[i] = i;
|
|
1465
1469
|
}
|
|
1466
1470
|
}
|
|
1471
|
+
heads;
|
|
1467
1472
|
find(v) {
|
|
1468
1473
|
let h = this.heads[v];
|
|
1469
1474
|
if (this.heads[h] === h) {
|
|
@@ -1955,6 +1960,7 @@ function getface(planes) {
|
|
|
1955
1960
|
|
|
1956
1961
|
// src/cubing/puzzle-geometry/SchreierSims.ts
|
|
1957
1962
|
var FactoredNumber = class {
|
|
1963
|
+
mult;
|
|
1958
1964
|
constructor() {
|
|
1959
1965
|
this.mult = [];
|
|
1960
1966
|
}
|
|
@@ -2100,6 +2106,8 @@ function tstart(s) {
|
|
|
2100
2106
|
function tend(_) {
|
|
2101
2107
|
}
|
|
2102
2108
|
var Face = class _Face {
|
|
2109
|
+
coords;
|
|
2110
|
+
length;
|
|
2103
2111
|
constructor(q) {
|
|
2104
2112
|
this.coords = new Array(q.length * 3);
|
|
2105
2113
|
for (let i = 0; i < q.length; i++) {
|
|
@@ -2610,20 +2618,6 @@ function toFaceCoords(q, maxdist) {
|
|
|
2610
2618
|
var PuzzleGeometry = class {
|
|
2611
2619
|
constructor(puzzleDescription, options) {
|
|
2612
2620
|
this.puzzleDescription = puzzleDescription;
|
|
2613
|
-
// cubies in each cubie set
|
|
2614
|
-
this.cmovesbyslice = [];
|
|
2615
|
-
// parsed move list
|
|
2616
|
-
this.duplicatedFaces = [];
|
|
2617
|
-
// which faces are duplicated
|
|
2618
|
-
this.duplicatedCubies = [];
|
|
2619
|
-
// which cubies are duplicated
|
|
2620
|
-
this.fixedCubie = -1;
|
|
2621
|
-
// fixed cubie, if any
|
|
2622
|
-
this.net = [];
|
|
2623
|
-
this.colors = [];
|
|
2624
|
-
this.notationMapper = new NullMapper();
|
|
2625
|
-
this.addNotationMapper = "";
|
|
2626
|
-
this.setReidOrder = false;
|
|
2627
2621
|
const t1 = tstart("genperms");
|
|
2628
2622
|
this.options = new PuzzleGeometryFullOptions(options);
|
|
2629
2623
|
if (this.options.verbosity > 0) {
|
|
@@ -2632,6 +2626,91 @@ var PuzzleGeometry = class {
|
|
|
2632
2626
|
this.create(puzzleDescription);
|
|
2633
2627
|
tend(t1);
|
|
2634
2628
|
}
|
|
2629
|
+
rotations;
|
|
2630
|
+
// all members of the rotation group
|
|
2631
|
+
baseplanerot;
|
|
2632
|
+
// unique rotations of the baseplane
|
|
2633
|
+
baseplanes;
|
|
2634
|
+
// planes, corresponding to faces
|
|
2635
|
+
facenames;
|
|
2636
|
+
// face names
|
|
2637
|
+
faceplanes;
|
|
2638
|
+
// face planes
|
|
2639
|
+
edgenames;
|
|
2640
|
+
// edge names
|
|
2641
|
+
vertexnames;
|
|
2642
|
+
// vertexnames
|
|
2643
|
+
geonormals;
|
|
2644
|
+
// all geometric directions, with names and types
|
|
2645
|
+
moveplanes;
|
|
2646
|
+
// the planes that split moves
|
|
2647
|
+
moveplanes2;
|
|
2648
|
+
// the planes that split moves, filtered
|
|
2649
|
+
moveplanesets;
|
|
2650
|
+
// the move planes, in parallel sets
|
|
2651
|
+
moveplanenormals;
|
|
2652
|
+
// one move plane
|
|
2653
|
+
movesetorders;
|
|
2654
|
+
// the order of rotations for each move set
|
|
2655
|
+
movesetgeos;
|
|
2656
|
+
// geometric feature information for move sets
|
|
2657
|
+
basefaces;
|
|
2658
|
+
// polytope faces before cuts
|
|
2659
|
+
faces;
|
|
2660
|
+
// all the stickers
|
|
2661
|
+
facecentermass;
|
|
2662
|
+
// center of mass of all faces
|
|
2663
|
+
baseFaceCount;
|
|
2664
|
+
// number of base faces
|
|
2665
|
+
stickersperface;
|
|
2666
|
+
// number of stickers per face
|
|
2667
|
+
shortedge;
|
|
2668
|
+
// number of stickers per face
|
|
2669
|
+
markedface;
|
|
2670
|
+
// given a bitmap of faces, identify the marked one
|
|
2671
|
+
cubies;
|
|
2672
|
+
// the cubies
|
|
2673
|
+
vertexdistance;
|
|
2674
|
+
// vertex distance
|
|
2675
|
+
edgedistance;
|
|
2676
|
+
// edge distance
|
|
2677
|
+
facetocubie;
|
|
2678
|
+
// map a face to a cubie index
|
|
2679
|
+
facetoord;
|
|
2680
|
+
// map a face to a cubie ord
|
|
2681
|
+
moverotations;
|
|
2682
|
+
// move rotations
|
|
2683
|
+
facelisthash;
|
|
2684
|
+
// face list by key
|
|
2685
|
+
cubiesetnames;
|
|
2686
|
+
// cubie set names
|
|
2687
|
+
cubieords;
|
|
2688
|
+
// the size of each orbit
|
|
2689
|
+
cubiesetnums;
|
|
2690
|
+
cubieordnums;
|
|
2691
|
+
orbitoris;
|
|
2692
|
+
// the orientation size of each orbit
|
|
2693
|
+
cubievaluemap;
|
|
2694
|
+
// the map for identical cubies
|
|
2695
|
+
cubiesetcubies;
|
|
2696
|
+
// cubies in each cubie set
|
|
2697
|
+
cmovesbyslice = [];
|
|
2698
|
+
// cmoves as perms by slice
|
|
2699
|
+
parsedmovelist;
|
|
2700
|
+
// parsed move list
|
|
2701
|
+
duplicatedFaces = [];
|
|
2702
|
+
// which faces are duplicated
|
|
2703
|
+
duplicatedCubies = [];
|
|
2704
|
+
// which cubies are duplicated
|
|
2705
|
+
fixedCubie = -1;
|
|
2706
|
+
// fixed cubie, if any
|
|
2707
|
+
net = [];
|
|
2708
|
+
colors = [];
|
|
2709
|
+
swizzler;
|
|
2710
|
+
notationMapper = new NullMapper();
|
|
2711
|
+
addNotationMapper = "";
|
|
2712
|
+
setReidOrder = false;
|
|
2713
|
+
options;
|
|
2635
2714
|
create(puzzleDescription) {
|
|
2636
2715
|
const { shape, cuts } = puzzleDescription;
|
|
2637
2716
|
this.moveplanes = [];
|
|
@@ -4755,6 +4834,7 @@ var PGNotation = class {
|
|
|
4755
4834
|
this.pg = pg;
|
|
4756
4835
|
this.orbitNames = od.orbitnames;
|
|
4757
4836
|
}
|
|
4837
|
+
orbitNames;
|
|
4758
4838
|
lookupMove(move) {
|
|
4759
4839
|
const mv = this.pg.parseMove(move);
|
|
4760
4840
|
if (this.pg.parsedmovelist) {
|