cubing 0.22.1 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/README.md +1 -1
  2. package/alg/package.json +1 -3
  3. package/bluetooth/package.json +1 -3
  4. package/dist/bundle-global/cubing.bundle-global.js +2979 -242
  5. package/dist/esm/2x2x2.sgs.json-FRBWMMA7.js +122 -0
  6. package/dist/esm/2x2x2.sgs.json-FRBWMMA7.js.map +7 -0
  7. package/dist/esm/{3d-M7GBIT3X.js → 3d-Q4WSD4BC.js} +3 -3
  8. package/dist/esm/{3d-M7GBIT3X.js.map → 3d-Q4WSD4BC.js.map} +0 -0
  9. package/dist/esm/bluetooth/index.d.ts +1 -1
  10. package/dist/esm/bluetooth/index.js +1 -1
  11. package/dist/esm/chunk-37EHU3GZ.js +66 -0
  12. package/dist/esm/chunk-37EHU3GZ.js.map +7 -0
  13. package/dist/esm/chunk-BJIOROQC.js +18 -0
  14. package/dist/esm/chunk-BJIOROQC.js.map +7 -0
  15. package/dist/esm/{chunk-R3HRHYIW.js → chunk-DK6PXBB2.js} +1 -1
  16. package/dist/esm/{chunk-R3HRHYIW.js.map → chunk-DK6PXBB2.js.map} +0 -0
  17. package/dist/esm/chunk-DPMEZY7V.js +1552 -0
  18. package/dist/esm/chunk-DPMEZY7V.js.map +7 -0
  19. package/dist/esm/chunk-FK2SCC3Z.js +499 -0
  20. package/dist/esm/chunk-FK2SCC3Z.js.map +7 -0
  21. package/dist/esm/chunk-JZWB7AIU.js +115 -0
  22. package/dist/esm/chunk-JZWB7AIU.js.map +7 -0
  23. package/dist/esm/chunk-MLOCDLUF.js +226 -0
  24. package/dist/esm/chunk-MLOCDLUF.js.map +7 -0
  25. package/dist/esm/{chunk-GF76PWEV.js → chunk-N3RNWU5T.js} +2 -2
  26. package/dist/esm/{chunk-GF76PWEV.js.map → chunk-N3RNWU5T.js.map} +0 -0
  27. package/dist/esm/chunk-PUPUQWJC.js +4065 -0
  28. package/dist/esm/chunk-PUPUQWJC.js.map +7 -0
  29. package/dist/esm/chunk-XVZOMB6J.js +89 -0
  30. package/dist/esm/chunk-XVZOMB6J.js.map +7 -0
  31. package/dist/esm/chunk-Z6X7HTPP.js +103 -0
  32. package/dist/esm/chunk-Z6X7HTPP.js.map +7 -0
  33. package/dist/esm/entry-L6CE2HLF.js +531 -0
  34. package/dist/esm/entry-L6CE2HLF.js.map +7 -0
  35. package/dist/esm/esm-test-worker.js +3 -14
  36. package/dist/esm/esm-test-worker.js.map +3 -3
  37. package/dist/esm/fto.sgs.json-62YNULOK.js +649 -0
  38. package/dist/esm/fto.sgs.json-62YNULOK.js.map +7 -0
  39. package/dist/esm/gwt-B7CBESZR.js +1669 -0
  40. package/dist/esm/gwt-B7CBESZR.js.map +7 -0
  41. package/dist/esm/megaminx.sgs.json-PRL46G5J.js +16 -0
  42. package/dist/esm/megaminx.sgs.json-PRL46G5J.js.map +7 -0
  43. package/dist/esm/module-entry-J2N3UZP7.js +18 -0
  44. package/dist/esm/module-entry-J2N3UZP7.js.map +7 -0
  45. package/dist/esm/{node-HFBX5WHK.js → node-W3AD4HBK.js} +2 -1
  46. package/dist/esm/node-W3AD4HBK.js.map +7 -0
  47. package/dist/esm/puzzle-geometry/index.js +11 -4051
  48. package/dist/esm/puzzle-geometry/index.js.map +3 -3
  49. package/dist/esm/puzzles/index.js +1 -1
  50. package/dist/esm/pyraminx.sgs.json-7QMPT5XP.js +14 -0
  51. package/dist/esm/pyraminx.sgs.json-7QMPT5XP.js.map +7 -0
  52. package/dist/esm/scramble/index.js +4 -2
  53. package/dist/esm/scramble_444-JP3CWLJM.js +2572 -0
  54. package/dist/esm/scramble_444-JP3CWLJM.js.map +7 -0
  55. package/dist/esm/scramble_sq1-PQ2AYBFW.js +706 -0
  56. package/dist/esm/scramble_sq1-PQ2AYBFW.js.map +7 -0
  57. package/dist/esm/search/index.js +6 -3
  58. package/dist/esm/skewb.sgs.json-FWHYACJG.js +16 -0
  59. package/dist/esm/skewb.sgs.json-FWHYACJG.js.map +7 -0
  60. package/dist/esm/twisty/index.js +3 -3
  61. package/dist/esm/worker-inside-generated-string-OWJA5IIQ.js +3450 -0
  62. package/dist/esm/worker-inside-generated-string-OWJA5IIQ.js.map +7 -0
  63. package/dist/types/search/inside/module-entry-path-getter.d.ts +2 -0
  64. package/dist/types/search/inside/module-entry-path-getter.d.ts.map +1 -0
  65. package/dist/types/search/inside/module-entry.d.ts +2 -0
  66. package/dist/types/search/inside/module-entry.d.ts.map +1 -0
  67. package/dist/types/search/inside/solve/puzzles/3x3x3/index.d.ts.map +1 -1
  68. package/dist/types/search/inside/solve/puzzles/4x4x4.d.ts +2 -1
  69. package/dist/types/search/inside/solve/puzzles/4x4x4.d.ts.map +1 -1
  70. package/dist/types/search/inside/solve/puzzles/sq1.d.ts.map +1 -1
  71. package/dist/types/search/instantiator.d.ts +1 -2
  72. package/dist/types/search/instantiator.d.ts.map +1 -1
  73. package/dist/types/search/worker-inside-generated-string.d.ts +1 -1
  74. package/dist/types/search/worker-inside-generated-string.d.ts.map +1 -1
  75. package/dist/types/vendor/comlink-everywhere/outside/node.d.ts.map +1 -1
  76. package/docs/.DS_Store +0 -0
  77. package/docs/cubing/.DS_Store +0 -0
  78. package/docs/cubing/index.html +1 -1
  79. package/kpuzzle/package.json +1 -3
  80. package/notation/package.json +1 -3
  81. package/package.json +2 -6
  82. package/protocol/package.json +1 -3
  83. package/puzzle-geometry/package.json +1 -3
  84. package/puzzles/package.json +1 -3
  85. package/scramble/package.json +1 -3
  86. package/search/package.json +1 -3
  87. package/src/cubing/.DS_Store +0 -0
  88. package/src/cubing/search/.DS_Store +0 -0
  89. package/src/cubing/search/inside/.DS_Store +0 -0
  90. package/src/cubing/search/inside/module-entry-path-getter.ts +5 -0
  91. package/src/cubing/search/inside/module-entry.ts +20 -0
  92. package/src/cubing/search/inside/solve/puzzles/3x3x3/index.ts +13 -3
  93. package/src/cubing/search/inside/solve/puzzles/4x4x4.ts +19 -5
  94. package/src/cubing/search/inside/solve/puzzles/fto.sgs.json.ts +356 -13
  95. package/src/cubing/search/inside/solve/puzzles/sq1.ts +12 -2
  96. package/src/cubing/search/instantiator.ts +75 -40
  97. package/src/cubing/search/worker-inside-generated-string.js +1 -1
  98. package/src/cubing/vendor/.DS_Store +0 -0
  99. package/src/cubing/vendor/comlink-everywhere/.DS_Store +0 -0
  100. package/src/cubing/vendor/comlink-everywhere/outside/node.js +1 -0
  101. package/src/cubing/vendor/cstimer/.DS_Store +0 -0
  102. package/src/cubing/{search/inside/solve/puzzles → vendor/cstimer/src}/.DS_Store +0 -0
  103. package/src/cubing/vendor/random-uint-below/random53BitValue.ts +1 -1
  104. package/src/cubing/vendor/sq12phase/scramble_sq1.js +2 -2
  105. package/src/cubing/{twisty/heavy-code-imports → vendor/three}/.DS_Store +0 -0
  106. package/src/cubing/{twisty/old/animation → vendor/three/examples}/.DS_Store +0 -0
  107. package/stream/package.json +1 -3
  108. package/twisty/package.json +1 -3
  109. package/alg/index.d.ts +0 -1
  110. package/bluetooth/index.d.ts +0 -1
  111. package/dist/.DS_Store +0 -0
  112. package/dist/esm/chunk-6BZSKSG7.js +0 -1368
  113. package/dist/esm/chunk-6BZSKSG7.js.map +0 -7
  114. package/dist/esm/index.d.ts +0 -1
  115. package/dist/esm/node-HFBX5WHK.js.map +0 -7
  116. package/dist/esm/worker-inside-generated-string-RQYYANYQ.js +0 -3107
  117. package/dist/esm/worker-inside-generated-string-RQYYANYQ.js.map +0 -7
  118. package/kpuzzle/index.d.ts +0 -1
  119. package/notation/index.d.ts +0 -1
  120. package/protocol/index.d.ts +0 -1
  121. package/puzzle-geometry/index.d.ts +0 -1
  122. package/puzzles/index.d.ts +0 -1
  123. package/scramble/index.d.ts +0 -1
  124. package/search/index.d.ts +0 -1
  125. package/src/cubing/puzzles/.DS_Store +0 -0
  126. package/src/cubing/puzzles/implementations/.DS_Store +0 -0
  127. package/src/cubing/search/inside/solve/.DS_Store +0 -0
  128. package/src/cubing/search/inside/solve/vendor/.DS_Store +0 -0
  129. package/src/cubing/twisty/.DS_Store +0 -0
  130. package/src/cubing/twisty/controllers/.DS_Store +0 -0
  131. package/src/cubing/twisty/controllers/animation/.DS_Store +0 -0
  132. package/src/cubing/twisty/controllers/indexer/.DS_Store +0 -0
  133. package/src/cubing/twisty/model/.DS_Store +0 -0
  134. package/src/cubing/twisty/model/props/.DS_Store +0 -0
  135. package/src/cubing/twisty/model/props/puzzle/.DS_Store +0 -0
  136. package/src/cubing/twisty/old/.DS_Store +0 -0
  137. package/src/cubing/twisty/old/dom/.DS_Store +0 -0
  138. package/src/cubing/twisty/views/.DS_Store +0 -0
  139. package/src/cubing/twisty/views/3D/.DS_Store +0 -0
  140. package/stream/index.d.ts +0 -1
  141. package/twisty/index.d.ts +0 -1
@@ -1,1368 +0,0 @@
1
- import {
2
- puzzles
3
- } from "./chunk-R3HRHYIW.js";
4
- import {
5
- KPuzzle,
6
- areOrbitTransformationsEquivalent
7
- } from "./chunk-X6JHXPDX.js";
8
- import {
9
- Alg,
10
- Move
11
- } from "./chunk-EWRBHQFX.js";
12
-
13
- // src/cubing/vendor/random-uint-below/get-random-values.ts
14
- var cryptoPromise = null;
15
- async function getRandomValuesFactory() {
16
- if (!globalThis?.crypto?.getRandomValues) {
17
- const nodeWebcrypto = (await (cryptoPromise ?? (cryptoPromise = import("crypto")))).webcrypto;
18
- return nodeWebcrypto.getRandomValues;
19
- } else {
20
- return crypto.getRandomValues.bind(crypto);
21
- }
22
- }
23
-
24
- // src/cubing/vendor/random-uint-below/random53BitValue.ts
25
- var MAX_JS_PRECISE_INT = 9007199254740992;
26
- var UPPER_HALF_MULTIPLIER = 2097152;
27
- var LOWER_HALF_DIVIDER = 2048;
28
- function random53BitValue(getRandomValues) {
29
- const arr = new Uint32Array(2);
30
- getRandomValues(arr);
31
- const upper = arr[0];
32
- const lower = arr[1];
33
- return Math.floor(upper * UPPER_HALF_MULTIPLIER) + Math.floor(lower / LOWER_HALF_DIVIDER);
34
- }
35
- function validateMax(max) {
36
- if (typeof max !== "number" || max < 0 || Math.floor(max) !== max) {
37
- throw new Error("randomInt.below() not called with a positive integer value.");
38
- }
39
- if (max > MAX_JS_PRECISE_INT) {
40
- throw new Error(`Called randomInt.below() with max == ${max}, which is larger than Javascript can handle with integer precision.`);
41
- }
42
- }
43
- async function randomUIntBelowFactory() {
44
- const getRandomValues = await getRandomValuesFactory();
45
- const randomUIntBelow = (max) => {
46
- validateMax(max);
47
- const val = random53BitValue(getRandomValues);
48
- const maxUniformSamplingRange = Math.floor(MAX_JS_PRECISE_INT / max) * max;
49
- if (val < maxUniformSamplingRange) {
50
- return val % max;
51
- } else {
52
- return randomUIntBelow(max);
53
- }
54
- };
55
- return randomUIntBelow;
56
- }
57
-
58
- // src/cubing/vendor/random-uint-below/random-choice.ts
59
- async function randomChoiceFactory() {
60
- const randomUIntBelow = await randomUIntBelowFactory();
61
- return (arr) => arr[randomUIntBelow(arr.length)];
62
- }
63
-
64
- // src/cubing/vendor/random-uint-below/index.ts
65
- var randomUIntBelowPromise = randomUIntBelowFactory();
66
-
67
- // src/cubing/search/inside/solve/puzzles/clock.ts
68
- var pins = ["UR", "DR", "DL", "UL"];
69
- var backMoves = ["U", "R", "D", "L", "ALL"];
70
- var frontMoves = pins.concat(backMoves);
71
- var randomUIntBelowPromise2 = randomUIntBelowFactory();
72
- async function randomClockScrambleString() {
73
- const randomUIntBelow = await randomUIntBelowPromise2;
74
- let filteringMoveCount = 0;
75
- async function randomSuffix(randomUIntBelow2) {
76
- const amount = randomUIntBelow2(12);
77
- if (amount !== 0) {
78
- filteringMoveCount++;
79
- }
80
- if (amount <= 6) {
81
- return `${amount}+`;
82
- } else {
83
- return `${12 - amount}-`;
84
- }
85
- }
86
- const moves = [];
87
- async function side(families) {
88
- for (const family of families) {
89
- moves.push(`${family}${await randomSuffix(randomUIntBelow)}`);
90
- }
91
- }
92
- await side(frontMoves);
93
- moves.push("y2");
94
- await side(backMoves);
95
- if (filteringMoveCount < 2) {
96
- return randomClockScrambleString();
97
- }
98
- for (const pin of pins) {
99
- if (randomUIntBelow(2) === 0) {
100
- moves.push(pin);
101
- }
102
- }
103
- return moves.join(" ");
104
- }
105
-
106
- // src/cubing/search/inside/solve/puzzles/wca-minx.ts
107
- var randomUIntBelowPromise3 = randomUIntBelowFactory();
108
- var suffixes = ["++", "--"];
109
- async function randomMegaminxScrambleString() {
110
- const randomUIntBelow = await randomUIntBelowPromise3;
111
- function rdPair() {
112
- return `R${suffixes[randomUIntBelow(2)]} D${suffixes[randomUIntBelow(2)]}`;
113
- }
114
- function randomU() {
115
- return `U${["", "'"][randomUIntBelow(2)]}`;
116
- }
117
- function row() {
118
- const chunks2 = [];
119
- for (let i = 0; i < 5; i++) {
120
- chunks2.push(rdPair());
121
- }
122
- chunks2.push(randomU());
123
- return chunks2.join(" ");
124
- }
125
- const chunks = [];
126
- for (let i = 0; i < 6; i++) {
127
- chunks.push(row());
128
- }
129
- return chunks.join("\n");
130
- }
131
-
132
- // src/cubing/vendor/comlink-everywhere/outside/index.js
133
- import { wrap } from "comlink";
134
- var useNodeWorkarounds = typeof globalThis.Worker === "undefined" && typeof globalThis.WorkerNavigator === "undefined";
135
- async function workerFileConstructor() {
136
- if (useNodeWorkarounds) {
137
- return await (await import("./node-HFBX5WHK.js")).NodeWorkerWrapper();
138
- } else {
139
- return globalThis.Worker;
140
- }
141
- }
142
- async function constructWorkerFromString(stringSource, options) {
143
- let worker;
144
- if (useNodeWorkarounds) {
145
- const constructor = await (await import("./node-HFBX5WHK.js")).NodeWorkerStringWrapper();
146
- const worker2 = new constructor(stringSource);
147
- return worker2;
148
- } else {
149
- const blob = new Blob([stringSource], { type: "application/javascript" });
150
- const workerURL = URL.createObjectURL(blob);
151
- worker = new globalThis.Worker(workerURL, {
152
- type: options ? options.type : void 0
153
- });
154
- }
155
- return worker;
156
- }
157
-
158
- // src/cubing/search/instantiator.ts
159
- var TEST_RELATIVE_URL_WORKER = false;
160
- async function instantiateRelativeURLWorker() {
161
- return new Promise(async (resolve, reject) => {
162
- setTimeout(() => {
163
- reject();
164
- }, 1e3);
165
- const Worker = await workerFileConstructor();
166
- const worker = new Worker(new URL("./esm-test-worker.js", import.meta.url));
167
- const api = wrap(worker);
168
- if (await api.test("to worker") === "from worker") {
169
- resolve();
170
- } else {
171
- reject();
172
- }
173
- });
174
- }
175
- async function relativeURLWorkerTest() {
176
- try {
177
- await instantiateRelativeURLWorker();
178
- console.info("Successful relative URL worker instantiation.");
179
- } catch (e) {
180
- console.warn("WARNING: Could not instantiate and communicate with a relative URL worker. This means that your app may have issues with `cubing/solve` in the future.");
181
- }
182
- }
183
- async function instantiateWorker() {
184
- const { workerSource } = await import("./worker-inside-generated-string-RQYYANYQ.js");
185
- const worker = await constructWorkerFromString(workerSource);
186
- if (TEST_RELATIVE_URL_WORKER) {
187
- relativeURLWorkerTest();
188
- }
189
- return wrap(worker);
190
- }
191
-
192
- // src/cubing/search/outside.ts
193
- var cachedWorkerInstance = null;
194
- async function getCachedWorkerInstance() {
195
- return await (cachedWorkerInstance ?? (cachedWorkerInstance = instantiateWorker()));
196
- }
197
- async function randomScrambleForEvent(eventID) {
198
- switch (eventID) {
199
- case "clock":
200
- return Alg.fromString(await randomClockScrambleString());
201
- case "minx":
202
- return Alg.fromString(await randomMegaminxScrambleString());
203
- }
204
- const prom = _randomScrambleStringForEvent(eventID);
205
- const wat = await prom;
206
- return Alg.fromString(wat);
207
- }
208
- async function _randomScrambleStringForEvent(eventID) {
209
- const cwi = await getCachedWorkerInstance();
210
- return cwi.randomScrambleStringForEvent(eventID);
211
- }
212
- async function experimentalSolve3x3x3IgnoringCenters(s) {
213
- const cwi = await getCachedWorkerInstance();
214
- return Alg.fromString(await cwi.solve333ToString(s));
215
- }
216
- async function experimentalSolve2x2x2(s) {
217
- const cwi = await getCachedWorkerInstance();
218
- return Alg.fromString(await cwi.solve222ToString(s));
219
- }
220
- async function solveSkewb(s) {
221
- const cwi = await getCachedWorkerInstance();
222
- return Alg.fromString(await cwi.solveSkewbToString(s));
223
- }
224
- async function solvePyraminx(s) {
225
- const cwi = await getCachedWorkerInstance();
226
- return Alg.fromString(await cwi.solvePyraminxToString(s));
227
- }
228
- async function solveMegaminx(s) {
229
- const cwi = await getCachedWorkerInstance();
230
- return Alg.fromString(await cwi.solveMegaminxToString(s));
231
- }
232
- function setDebug(options) {
233
- const { logPerf } = options;
234
- if (typeof logPerf !== "undefined") {
235
- getCachedWorkerInstance().then((cwi) => cwi.setDebugMeasurePerf(logPerf));
236
- }
237
- }
238
-
239
- // src/cubing/search/inside/solve/puzzles/3x3x3/convert.ts
240
- var reidEdgeOrder = "UF UR UB UL DF DR DB DL FR FL BR BL".split(" ");
241
- var reidCornerOrder = "UFR URB UBL ULF DRF DFL DLB DBR".split(" ");
242
- var centerOrder = "U L F R B D".split(" ");
243
-
244
- // src/cubing/search/inside/solve/puzzles/3x3x3/filter.ts
245
- function isEquivalentTranformationIgnoringCENTERS(def, t1, t2) {
246
- for (const orbitName in def.orbits) {
247
- if (!areOrbitTransformationsEquivalent(def, orbitName, t1, t2, {
248
- ignoreOrientation: orbitName === "CENTERS"
249
- })) {
250
- return false;
251
- }
252
- }
253
- return true;
254
- }
255
- function passesFilter(def, state) {
256
- const kpuzzle = new KPuzzle(def);
257
- if (isEquivalentTranformationIgnoringCENTERS(def, kpuzzle.state, state)) {
258
- return false;
259
- }
260
- for (const face of "ULFRBD") {
261
- for (let amount = 1; amount < 4; amount++) {
262
- kpuzzle.reset();
263
- kpuzzle.applyMove(new Move(face, amount));
264
- if (isEquivalentTranformationIgnoringCENTERS(def, kpuzzle.state, state)) {
265
- return false;
266
- }
267
- }
268
- }
269
- return true;
270
- }
271
-
272
- // src/cubing/search/inside/solve/puzzles/3x3x3/legacy-sgs.ts
273
- var sgs3x3x3 = [
274
- [
275
- "R U'",
276
- "R2 B",
277
- "D2 B2",
278
- "D' L B'",
279
- "R' U'",
280
- "B",
281
- "D B2",
282
- "R' B",
283
- "L' U",
284
- "L2 B'",
285
- "B2",
286
- "D L B'",
287
- "L U",
288
- "B'",
289
- "U'",
290
- "R B",
291
- "D' B2",
292
- "L B'",
293
- "U2",
294
- "U L' B'",
295
- "",
296
- "U' L' B'",
297
- "U",
298
- "L' B'"
299
- ],
300
- [
301
- "F2 L2",
302
- "F' L'",
303
- "R' F L2",
304
- "D' L2",
305
- "F L2",
306
- "F2 L'",
307
- "R' F' L'",
308
- "R2 F L2",
309
- "R2 F2 L'",
310
- "L2",
311
- "F L'",
312
- "D' L",
313
- "D2 L2",
314
- "R2 F' L'",
315
- "D L",
316
- "",
317
- "L2 F L'",
318
- "L F' L2",
319
- "L F L'",
320
- "F' L2",
321
- "L'",
322
- "D L2",
323
- "D F L'",
324
- "L"
325
- ],
326
- [
327
- "R B U2 B'",
328
- "R2 B U' B'",
329
- "F2 B U B'",
330
- "F B2 L' B2",
331
- "B2 L B2",
332
- "B U' B'",
333
- "R2 B U2 B'",
334
- "R' B U' B'",
335
- "B2 L' B2",
336
- "F B U B'",
337
- "B2 U' B2",
338
- "B' L B",
339
- "L F' B D' B'",
340
- "B' U' B2 D B'",
341
- "B U2 B'",
342
- "R B U' B'",
343
- "B2 L2 B2",
344
- "D' B' L B",
345
- "B U B'",
346
- "F' B2 L' B2",
347
- "",
348
- "B2 L' B' U' B'"
349
- ],
350
- [
351
- "U F2 L2 U'",
352
- "F' U L' U'",
353
- "F2 U L' U'",
354
- "U F L2 U'",
355
- "U2 B2 U2",
356
- "R' U' B U",
357
- "D2 U L U'",
358
- "D U2 B' U2",
359
- "U L2 U'",
360
- "F U L' U'",
361
- "D U L U'",
362
- "U2 B' U2",
363
- "",
364
- "U2 B' U' L' U'",
365
- "U2 L' U2",
366
- "U' B U",
367
- "U L U'",
368
- "D' U2 B' U2",
369
- "U L' U'",
370
- "U2 B U2"
371
- ],
372
- [
373
- "R' D' F2",
374
- "F'",
375
- "F2",
376
- "D R F'",
377
- "R D' F2",
378
- "R2 F'",
379
- "D' F2",
380
- "R F'",
381
- "F2 R' D' F2",
382
- "F",
383
- "D2 F2",
384
- "D' R F'",
385
- "R2 D' F2",
386
- "R' F'",
387
- "D F2",
388
- "D2 R F'",
389
- "",
390
- "F R' D' F2"
391
- ],
392
- [
393
- "R' D2 F' D F",
394
- "R F2 R2 F2",
395
- "R2 F' D2 F",
396
- "F' R2 D2 F",
397
- "L D' L'",
398
- "D F' D2 F",
399
- "F2 R2 F2",
400
- "R F' D2 F",
401
- "F' R2 D' F",
402
- "F' R' D2 F",
403
- "F2 R' F2",
404
- "L D L'",
405
- "F' R D' F",
406
- "F2 R F2",
407
- "F' D2 F",
408
- "",
409
- "L D2 R D' L'",
410
- "F' D2 F' R F2",
411
- "D2 R2 F2 R2 F2",
412
- "D F' D' F",
413
- "F' D F"
414
- ],
415
- [
416
- "U F2 U'",
417
- "R U F' U'",
418
- "D R U F2 U'",
419
- "U F U'",
420
- "R2 U F2 U'",
421
- "R' U F' U'",
422
- "R U F2 U'",
423
- "R2 U F' U'",
424
- "",
425
- "U L D L' F U'",
426
- "F2 D' R D F2",
427
- "D2 U F U'",
428
- "R' U F2 U'",
429
- "U F' U'",
430
- "F2 D2 R D2 F2",
431
- "D U F U'"
432
- ],
433
- [
434
- "R2",
435
- "R' B' D B",
436
- "D R'",
437
- "F' R2 F",
438
- "",
439
- "R B' D B",
440
- "R'",
441
- "B' D B",
442
- "D' R'",
443
- "D2 F' R2 F",
444
- "R",
445
- "R2 B' D B",
446
- "D2 R'",
447
- "B' D' B"
448
- ],
449
- [
450
- "R2 D' R2",
451
- "F' R' F R",
452
- "R D' R2 D R'",
453
- "D2 R2 D2 R2",
454
- "R' D' F' R F",
455
- "U F D F' U'",
456
- "",
457
- "R2 D2 B R' B' R'",
458
- "R' F D' F2 R F",
459
- "R2 D R2",
460
- "F2 U F U' F",
461
- "R' D F' R F",
462
- "D R2 D2 R2",
463
- "U F D' F' U'",
464
- "D R' D2 F' R F",
465
- "R2 D2 R2",
466
- "U F D2 F' U'",
467
- "R' D2 F' R F"
468
- ],
469
- [
470
- "B R B'",
471
- "F D F' B R2 B'",
472
- "D B R2 B'",
473
- "D2 B R' B'",
474
- "B R2 B'",
475
- "D B R' B'",
476
- "D' B R2 B'",
477
- "B R' B'",
478
- "",
479
- "B R2 B' D B R' B'",
480
- "D2 B R2 B'",
481
- "D' B R' B'"
482
- ],
483
- [
484
- "",
485
- "R' D R F D2 F'",
486
- "R' D R",
487
- "D F D' F'",
488
- "R F' R' F",
489
- "F D' F'",
490
- "R' D' R",
491
- "F D2 F'",
492
- "R' D2 R",
493
- "F D F'"
494
- ],
495
- [
496
- "",
497
- "F2 D2 R F' R' D2 F' D2 F'",
498
- "F2 D2 F' D' F D' F' D2 F'",
499
- "F2 D F2 D F2 D2 F2",
500
- "D2 F L D2 L' D2 F'",
501
- "D F D2 L D2 L' F'",
502
- "R' D B' D2 B D' R",
503
- "R' D2 B' D2 B R",
504
- "F D2 F' D F D F'",
505
- "F D' L D2 L' D F'",
506
- "B D' F D B' D' F'",
507
- "F D2 L D2 L' F'",
508
- "F D' L D L' D F'",
509
- "F L D2 L' D2 F'",
510
- "R' B' D2 B D2 R"
511
- ],
512
- [
513
- "D'",
514
- "F L D L' D' F'",
515
- "D2",
516
- "L B D B' D' L'",
517
- "D",
518
- "B' L' D' L D B",
519
- "",
520
- "D F L D L' D' F'"
521
- ],
522
- [
523
- "F' D2 F D F' D F",
524
- "F' D' R' D R F",
525
- "F' R' D' R D F",
526
- "B D R D' R' B'",
527
- "",
528
- "D B' D' L' D L B"
529
- ],
530
- [
531
- "D F D F' D F D2 F'",
532
- "F' U2 B' R' B U2 F' L F' L' F'",
533
- "",
534
- "D2 L D L2 F L F2 D F"
535
- ],
536
- [
537
- "L B' L' F L B L' F'",
538
- "F2 U F' D2 F U' F' D2 F'",
539
- "D' F' D B D' F D B'",
540
- "F L2 F R2 F' L2 F R2 F2",
541
- "D B D' F' D B' D' F",
542
- "R F L F' R' F L' F'",
543
- "",
544
- "D2 B L' U2 L B' D2 B L' U2 L B'",
545
- "D2 F R' U2 R F' D2 F R' U2 R F'",
546
- "R F L' F' R' F L F'",
547
- "D F D' B' D F' D' B",
548
- "L2 F2 L' B2 L F2 L' B2 L'"
549
- ],
550
- [
551
- "L B R' B' L' B R B'",
552
- "R' B R F' R' B' R F",
553
- "L D2 L U L' D2 L U' L2",
554
- "",
555
- "D2 B' D2 F D' L2 F L2 F' D2 B D' F'",
556
- "D2 F' R' F R2 B' D2 B D2 R' F D2 F'",
557
- "L B L' F L B' L' F'",
558
- "F' D2 F' U' F D2 F' U F2",
559
- "D' B' D F D' B D F'"
560
- ],
561
- ["", "D2 F' L U2 L' F D2 F' L U2 L' F", "D2 B' R U2 R' B D2 B' R U2 R' B"]
562
- ];
563
-
564
- // src/cubing/vendor/min2phase/gwt.js
565
- var $intern_3 = { 3: 1 };
566
- var $intern_9 = 4194303;
567
- var $intern_10 = 1048575;
568
- var $intern_11 = 524288;
569
- var $intern_26 = { 11: 1, 3: 1 };
570
- var $intern_27 = { 17: 1, 3: 1 };
571
- var $intern_28 = 14540032;
572
- var $intern_30 = { 10: 1, 3: 1 };
573
- var _;
574
- var prototypesByTypeId_0 = {};
575
- function typeMarkerFn() {
576
- }
577
- function portableObjCreate(obj) {
578
- function F() {
579
- }
580
- F.prototype = obj || {};
581
- return new F();
582
- }
583
- function maybeGetClassLiteralFromPlaceHolder_0(entry) {
584
- return entry instanceof Array ? entry[0] : null;
585
- }
586
- function defineClass(typeId, superTypeId, castableTypeMap) {
587
- var prototypesByTypeId = prototypesByTypeId_0;
588
- var createSubclassPrototype = createSubclassPrototype_0;
589
- var maybeGetClassLiteralFromPlaceHolder = maybeGetClassLiteralFromPlaceHolder_0;
590
- var prototype_0 = prototypesByTypeId[typeId];
591
- var clazz = maybeGetClassLiteralFromPlaceHolder(prototype_0);
592
- if (prototype_0 && !clazz) {
593
- _ = prototype_0;
594
- } else {
595
- _ = prototypesByTypeId[typeId] = !superTypeId ? {} : createSubclassPrototype(superTypeId);
596
- _.castableTypeMap$ = castableTypeMap;
597
- _.constructor = _;
598
- !superTypeId && (_.typeMarker$ = typeMarkerFn);
599
- }
600
- for (var i = 3; i < arguments.length; ++i) {
601
- arguments[i].prototype = _;
602
- }
603
- clazz && (_.___clazz$ = clazz);
604
- }
605
- function createSubclassPrototype_0(superTypeId) {
606
- var prototypesByTypeId = prototypesByTypeId_0;
607
- return portableObjCreate(prototypesByTypeId[superTypeId]);
608
- }
609
- function Object_0() {
610
- }
611
- defineClass(1, null, {}, Object_0);
612
- function narrow_byte(x_0) {
613
- return x_0 << 24 >> 24;
614
- }
615
- function Class() {
616
- this.typeName = null;
617
- this.simpleName = null;
618
- this.packageName = null;
619
- this.compoundName = null;
620
- this.canonicalName = null;
621
- this.typeId = null;
622
- this.arrayLiterals = null;
623
- }
624
- function createClassObject(packageName, compoundClassName) {
625
- var clazz;
626
- clazz = new Class();
627
- clazz.packageName = packageName;
628
- clazz.compoundName = compoundClassName;
629
- return clazz;
630
- }
631
- function createForClass(packageName, compoundClassName, typeId) {
632
- var clazz;
633
- clazz = createClassObject(packageName, compoundClassName);
634
- maybeSetClassLiteral(typeId, clazz);
635
- return clazz;
636
- }
637
- function createForInterface(packageName, compoundClassName) {
638
- var clazz;
639
- clazz = createClassObject(packageName, compoundClassName);
640
- clazz.modifiers = 2;
641
- return clazz;
642
- }
643
- function createForPrimitive(className, primitiveTypeId) {
644
- var clazz;
645
- clazz = createClassObject("", className);
646
- clazz.typeId = primitiveTypeId;
647
- clazz.modifiers = 1;
648
- return clazz;
649
- }
650
- function getClassLiteralForArray_0(leafClass, dimensions) {
651
- var arrayLiterals = leafClass.arrayLiterals = leafClass.arrayLiterals || [];
652
- return arrayLiterals[dimensions] || (arrayLiterals[dimensions] = leafClass.createClassLiteralForArray(dimensions));
653
- }
654
- function getPrototypeForClass(clazz) {
655
- if (clazz.isPrimitive()) {
656
- return null;
657
- }
658
- var typeId = clazz.typeId;
659
- var prototype_0 = prototypesByTypeId_0[typeId];
660
- return prototype_0;
661
- }
662
- function maybeSetClassLiteral(typeId, clazz) {
663
- if (!typeId) {
664
- return;
665
- }
666
- clazz.typeId = typeId;
667
- var prototype_0 = getPrototypeForClass(clazz);
668
- if (!prototype_0) {
669
- prototypesByTypeId_0[typeId] = [clazz];
670
- return;
671
- }
672
- prototype_0.___clazz$ = clazz;
673
- }
674
- defineClass(79, 1, {}, Class);
675
- _.createClassLiteralForArray = function createClassLiteralForArray(dimensions) {
676
- var clazz;
677
- clazz = new Class();
678
- clazz.modifiers = 4;
679
- dimensions > 1 ? clazz.componentType = getClassLiteralForArray_0(this, dimensions - 1) : clazz.componentType = this;
680
- return clazz;
681
- };
682
- _.isPrimitive = function isPrimitive() {
683
- return (this.modifiers & 1) != 0;
684
- };
685
- function getClassLiteralForArray(clazz, dimensions) {
686
- return getClassLiteralForArray_0(clazz, dimensions);
687
- }
688
- function initDim(leafClassLiteral, castableTypeMap, elementTypeId, length_0, elementTypeCategory, dimensions) {
689
- var result;
690
- result = initializeArrayElementsWithDefaults(elementTypeCategory, length_0);
691
- initValues(getClassLiteralForArray(leafClassLiteral, dimensions), castableTypeMap, elementTypeId, elementTypeCategory, result);
692
- return result;
693
- }
694
- function initDims(leafClassLiteral, castableTypeMapExprs, elementTypeIds, leafElementTypeCategory, dimExprs, count) {
695
- return initDims_0(leafClassLiteral, castableTypeMapExprs, elementTypeIds, leafElementTypeCategory, dimExprs, 0, count);
696
- }
697
- function initDims_0(leafClassLiteral, castableTypeMapExprs, elementTypeIds, leafElementTypeCategory, dimExprs, index_0, count) {
698
- var elementTypeCategory, i, isLastDim, length_0, result;
699
- length_0 = dimExprs[index_0];
700
- isLastDim = index_0 == count - 1;
701
- elementTypeCategory = isLastDim ? leafElementTypeCategory : 0;
702
- result = initializeArrayElementsWithDefaults(elementTypeCategory, length_0);
703
- initValues(getClassLiteralForArray(leafClassLiteral, count - index_0), castableTypeMapExprs[index_0], elementTypeIds[index_0], elementTypeCategory, result);
704
- if (!isLastDim) {
705
- ++index_0;
706
- for (i = 0; i < length_0; ++i) {
707
- result[i] = initDims_0(leafClassLiteral, castableTypeMapExprs, elementTypeIds, leafElementTypeCategory, dimExprs, index_0, count);
708
- }
709
- }
710
- return result;
711
- }
712
- function initValues(arrayClass, castableTypeMap, elementTypeId, elementTypeCategory, array) {
713
- array.___clazz$ = arrayClass;
714
- array.castableTypeMap$ = castableTypeMap;
715
- array.typeMarker$ = typeMarkerFn;
716
- array.__elementTypeId$ = elementTypeId;
717
- array.__elementTypeCategory$ = elementTypeCategory;
718
- return array;
719
- }
720
- function initializeArrayElementsWithDefaults(elementTypeCategory, length_0) {
721
- var array = new Array(length_0);
722
- var initValue;
723
- switch (elementTypeCategory) {
724
- case 6:
725
- initValue = { l: 0, m: 0, h: 0 };
726
- break;
727
- case 7:
728
- initValue = 0;
729
- break;
730
- case 8:
731
- initValue = false;
732
- break;
733
- default:
734
- return array;
735
- }
736
- for (var i = 0; i < length_0; ++i) {
737
- array[i] = initValue;
738
- }
739
- return array;
740
- }
741
- function create(value_0) {
742
- var a0, a1, a2;
743
- a0 = value_0 & $intern_9;
744
- a1 = value_0 >> 22 & $intern_9;
745
- a2 = value_0 < 0 ? $intern_10 : 0;
746
- return create0(a0, a1, a2);
747
- }
748
- function create0(l, m, h) {
749
- return { l, m, h };
750
- }
751
- function and(a, b) {
752
- return { l: a.l & b.l, m: a.m & b.m, h: a.h & b.h };
753
- }
754
- function fromInt(value_0) {
755
- var rebase, result;
756
- if (value_0 > -129 && value_0 < 128) {
757
- rebase = value_0 + 128;
758
- boxedValues == null && (boxedValues = initDim(Lcom_google_gwt_lang_LongLibBase$LongEmul_2_classLit, $intern_3, 293, 256, 0, 1));
759
- result = boxedValues[rebase];
760
- !result && (result = boxedValues[rebase] = create(value_0));
761
- return result;
762
- }
763
- return create(value_0);
764
- }
765
- function or(a, b) {
766
- return { l: a.l | b.l, m: a.m | b.m, h: a.h | b.h };
767
- }
768
- function shl(a, n) {
769
- var res0, res1, res2;
770
- n &= 63;
771
- if (n < 22) {
772
- res0 = a.l << n;
773
- res1 = a.m << n | a.l >> 22 - n;
774
- res2 = a.h << n | a.m >> 22 - n;
775
- } else if (n < 44) {
776
- res0 = 0;
777
- res1 = a.l << n - 22;
778
- res2 = a.m << n - 22 | a.l >> 44 - n;
779
- } else {
780
- res0 = 0;
781
- res1 = 0;
782
- res2 = a.l << n - 44;
783
- }
784
- return { l: res0 & $intern_9, m: res1 & $intern_9, h: res2 & $intern_10 };
785
- }
786
- function shr(a, n) {
787
- var a2, negative, res0, res1, res2;
788
- n &= 63;
789
- a2 = a.h;
790
- negative = (a2 & $intern_11) != 0;
791
- negative && (a2 |= -1048576);
792
- if (n < 22) {
793
- res2 = a2 >> n;
794
- res1 = a.m >> n | a2 << 22 - n;
795
- res0 = a.l >> n | a.m << 22 - n;
796
- } else if (n < 44) {
797
- res2 = negative ? $intern_10 : 0;
798
- res1 = a2 >> n - 22;
799
- res0 = a.m >> n - 22 | a2 << 44 - n;
800
- } else {
801
- res2 = negative ? $intern_10 : 0;
802
- res1 = negative ? $intern_9 : 0;
803
- res0 = a2 >> n - 44;
804
- }
805
- return { l: res0 & $intern_9, m: res1 & $intern_9, h: res2 & $intern_10 };
806
- }
807
- function sub_0(a, b) {
808
- var sum0, sum1, sum2;
809
- sum0 = a.l - b.l;
810
- sum1 = a.m - b.m + (sum0 >> 22);
811
- sum2 = a.h - b.h + (sum1 >> 22);
812
- return { l: sum0 & $intern_9, m: sum1 & $intern_9, h: sum2 & $intern_10 };
813
- }
814
- function toInt(a) {
815
- return a.l | a.m << 22;
816
- }
817
- var boxedValues;
818
- var Ljava_lang_String_2_classLit = createForClass("java.lang", "String", 2);
819
- function equals_7(array1, array2) {
820
- var i;
821
- if (array1 === array2) {
822
- return true;
823
- }
824
- if (array1.length != array2.length) {
825
- return false;
826
- }
827
- for (i = 0; i < array1.length; ++i) {
828
- if (array1[i] != array2[i]) {
829
- return false;
830
- }
831
- }
832
- return true;
833
- }
834
- var $clinit_CoordCube_ran = false;
835
- function $clinit_CoordCube() {
836
- if ($clinit_CoordCube_ran) {
837
- return;
838
- }
839
- $clinit_CoordCube_ran = true;
840
- UDSliceMove = initDims(C_classLit, [$intern_3, $intern_26], [11, 0], 7, [495, 18], 2);
841
- TwistMove = initDims(C_classLit, [$intern_3, $intern_26], [11, 0], 7, [324, 18], 2);
842
- FlipMove = initDims(C_classLit, [$intern_3, $intern_26], [11, 0], 7, [336, 18], 2);
843
- UDSliceConj = initDims(C_classLit, [$intern_3, $intern_26], [11, 0], 7, [495, 8], 2);
844
- UDSliceTwistPrun = initDim(I_classLit, $intern_27, 0, 20048, 7, 1);
845
- UDSliceFlipPrun = initDim(I_classLit, $intern_27, 0, 20791, 7, 1);
846
- TwistFlipPrun = initDim(I_classLit, $intern_27, 0, 82945, 7, 1);
847
- CPermMove = initDims(C_classLit, [$intern_3, $intern_26], [11, 0], 7, [2768, 10], 2);
848
- EPermMove = initDims(C_classLit, [$intern_3, $intern_26], [11, 0], 7, [2768, 10], 2);
849
- MPermMove = initDims(C_classLit, [$intern_3, $intern_26], [11, 0], 7, [24, 10], 2);
850
- MPermConj = initDims(C_classLit, [$intern_3, $intern_26], [11, 0], 7, [24, 16], 2);
851
- CCombPConj = initDims(C_classLit, [$intern_3, $intern_26], [11, 0], 7, [140, 16], 2);
852
- MCPermPrun = initDim(I_classLit, $intern_27, 0, 8305, 7, 1);
853
- EPermCCombPPrun = initDim(I_classLit, $intern_27, 0, 48441, 7, 1);
854
- }
855
- function CoordCube() {
856
- $clinit_CoordCube();
857
- }
858
- defineClass(31, 1, { 31: 1 }, CoordCube);
859
- _.flip = 0;
860
- _.flipc = 0;
861
- _.fsym = 0;
862
- _.prun = 0;
863
- _.slice_0 = 0;
864
- _.tsym = 0;
865
- _.twist = 0;
866
- _.twistc = 0;
867
- var CCombPConj;
868
- var CPermMove;
869
- var EPermCCombPPrun;
870
- var EPermMove;
871
- var FlipMove;
872
- var MCPermPrun;
873
- var MPermConj;
874
- var MPermMove;
875
- var TwistFlipPrun;
876
- var TwistMove;
877
- var UDSliceConj;
878
- var UDSliceFlipPrun;
879
- var UDSliceMove;
880
- var UDSliceTwistPrun;
881
- var Lorg_cubing_min2phase_client_CoordCube_2_classLit = createForClass("org.cubing.min2phase.client", "CoordCube", 31);
882
- var $clinit_CubieCube_ran = false;
883
- function $clinit_CubieCube() {
884
- if ($clinit_CubieCube_ran) {
885
- return;
886
- }
887
- $clinit_CubieCube_ran = true;
888
- CubeSym = initDim(Lorg_cubing_min2phase_client_CubieCube_2_classLit, $intern_3, 7, 16, 0, 1);
889
- moveCube = initDim(Lorg_cubing_min2phase_client_CubieCube_2_classLit, $intern_3, 7, 18, 0, 1);
890
- moveCubeSym = initDim(J_classLit, $intern_3, 0, 18, 6, 1);
891
- firstMoveSym = initDim(I_classLit, $intern_27, 0, 48, 7, 1);
892
- SymMult = initDims(I_classLit, [$intern_3, $intern_27], [17, 0], 7, [16, 16], 2);
893
- SymMultInv = initDims(I_classLit, [$intern_3, $intern_27], [17, 0], 7, [16, 16], 2);
894
- SymMove_0 = initDims(I_classLit, [$intern_3, $intern_27], [17, 0], 7, [16, 18], 2);
895
- Sym8Move = initDim(I_classLit, $intern_27, 0, 144, 7, 1);
896
- SymMoveUD = initDims(I_classLit, [$intern_3, $intern_27], [17, 0], 7, [16, 18], 2);
897
- FlipS2R = initDim(C_classLit, $intern_26, 0, 336, 7, 1);
898
- TwistS2R = initDim(C_classLit, $intern_26, 0, 324, 7, 1);
899
- EPermS2R = initDim(C_classLit, $intern_26, 0, 2768, 7, 1);
900
- Perm2CombP = initDim(B_classLit, $intern_30, 0, 2768, 7, 1);
901
- PermInvEdgeSym = initDim(C_classLit, $intern_26, 0, 2768, 7, 1);
902
- MPermInv = initDim(B_classLit, $intern_30, 0, 24, 7, 1);
903
- FlipR2S = initDim(C_classLit, $intern_26, 0, 2048, 7, 1);
904
- TwistR2S = initDim(C_classLit, $intern_26, 0, 2187, 7, 1);
905
- EPermR2S = initDim(C_classLit, $intern_26, 0, 40320, 7, 1);
906
- FlipS2RF = initDim(C_classLit, $intern_26, 0, 2688, 7, 1);
907
- urf1 = new CubieCube_0(2531, 1373, 67026819, 1367);
908
- urf2 = new CubieCube_0(2089, 1906, 322752913, 2040);
909
- urfMove = initValues(getClassLiteralForArray(B_classLit, 2), $intern_3, 10, 0, [
910
- initValues(getClassLiteralForArray(B_classLit, 1), $intern_30, 0, 7, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]),
911
- initValues(getClassLiteralForArray(B_classLit, 1), $intern_30, 0, 7, [6, 7, 8, 0, 1, 2, 3, 4, 5, 15, 16, 17, 9, 10, 11, 12, 13, 14]),
912
- initValues(getClassLiteralForArray(B_classLit, 1), $intern_30, 0, 7, [3, 4, 5, 6, 7, 8, 0, 1, 2, 12, 13, 14, 15, 16, 17, 9, 10, 11]),
913
- initValues(getClassLiteralForArray(B_classLit, 1), $intern_30, 0, 7, [2, 1, 0, 5, 4, 3, 8, 7, 6, 11, 10, 9, 14, 13, 12, 17, 16, 15]),
914
- initValues(getClassLiteralForArray(B_classLit, 1), $intern_30, 0, 7, [8, 7, 6, 2, 1, 0, 5, 4, 3, 17, 16, 15, 11, 10, 9, 14, 13, 12]),
915
- initValues(getClassLiteralForArray(B_classLit, 1), $intern_30, 0, 7, [5, 4, 3, 8, 7, 6, 2, 1, 0, 14, 13, 12, 17, 16, 15, 11, 10, 9])
916
- ]);
917
- initMove();
918
- initSym();
919
- }
920
- function $$init(this$static) {
921
- this$static.ca = initValues(getClassLiteralForArray(B_classLit, 1), $intern_30, 0, 7, [0, 1, 2, 3, 4, 5, 6, 7]);
922
- this$static.ea = initValues(getClassLiteralForArray(B_classLit, 1), $intern_30, 0, 7, [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22]);
923
- }
924
- function $URFConjugate(this$static) {
925
- !this$static.temps && (this$static.temps = new CubieCube());
926
- CornMult(urf2, this$static, this$static.temps);
927
- CornMult(this$static.temps, urf1, this$static);
928
- EdgeMult(urf2, this$static, this$static.temps);
929
- EdgeMult(this$static.temps, urf1, this$static);
930
- }
931
- function $copy(this$static, c) {
932
- var i, i0;
933
- for (i0 = 0; i0 < 8; i0++) {
934
- this$static.ca[i0] = c.ca[i0];
935
- }
936
- for (i = 0; i < 12; i++) {
937
- this$static.ea[i] = c.ea[i];
938
- }
939
- }
940
- function $invCubieCube(this$static) {
941
- var corn, edge;
942
- !this$static.temps && (this$static.temps = new CubieCube());
943
- for (edge = 0; edge < 12; edge++) {
944
- this$static.temps.ea[this$static.ea[edge] >> 1] = (edge << 1 | this$static.ea[edge] & 1) << 24 >> 24;
945
- }
946
- for (corn = 0; corn < 8; corn++) {
947
- this$static.temps.ca[this$static.ca[corn] & 7] = (corn | 32 >> (this$static.ca[corn] >> 3) & 24) << 24 >> 24;
948
- }
949
- $copy(this$static, this$static.temps);
950
- }
951
- function $selfSymmetry(this$static) {
952
- var c, cperm, cpermx, d, i, sym, urfInv;
953
- c = new CubieCube_1(this$static);
954
- d = new CubieCube();
955
- cperm = ESym2CSym(EPermR2S[getNPerm(c.ca, 8, false)]) >> 4;
956
- sym = { l: 0, m: 0, h: 0 };
957
- for (urfInv = 0; urfInv < 6; urfInv++) {
958
- cpermx = ESym2CSym(EPermR2S[getNPerm(c.ca, 8, false)]) >> 4;
959
- if (cperm == cpermx) {
960
- for (i = 0; i < 16; i++) {
961
- CornConjugate(c, SymMultInv[0][i], d);
962
- if (equals_7(d.ca, this$static.ca)) {
963
- EdgeConjugate(c, SymMultInv[0][i], d);
964
- equals_7(d.ea, this$static.ea) && (sym = or(sym, shl({ l: 1, m: 0, h: 0 }, (urfInv << 4 | i) < 48 ? urfInv << 4 | i : 48)));
965
- }
966
- }
967
- }
968
- $URFConjugate(c);
969
- urfInv % 3 == 2 && $invCubieCube(c);
970
- }
971
- return sym;
972
- }
973
- function $setFlip(this$static, idx) {
974
- var i, parity, val;
975
- parity = 0;
976
- for (i = 10; i >= 0; --i, idx >>= 1) {
977
- parity ^= val = idx & 1;
978
- this$static.ea[i] = (this$static.ea[i] & -2 | val) << 24 >> 24;
979
- }
980
- this$static.ea[11] = (this$static.ea[11] & -2 | parity) << 24 >> 24;
981
- }
982
- function $setTwist(this$static, idx) {
983
- var i, twst, val;
984
- twst = 15;
985
- for (i = 6; i >= 0; --i, idx = ~~(idx / 3)) {
986
- twst -= val = idx % 3;
987
- this$static.ca[i] = (this$static.ca[i] & 7 | val << 3) << 24 >> 24;
988
- }
989
- this$static.ca[7] = (this$static.ca[7] & 7 | twst % 3 << 3) << 24 >> 24;
990
- }
991
- function CornConjugate(a, idx, b) {
992
- $clinit_CubieCube();
993
- var corn, ori, oriA, oriB, s, sinv;
994
- sinv = CubeSym[SymMultInv[0][idx]];
995
- s = CubeSym[idx];
996
- for (corn = 0; corn < 8; corn++) {
997
- oriA = sinv.ca[a.ca[s.ca[corn] & 7] & 7] >> 3;
998
- oriB = a.ca[s.ca[corn] & 7] >> 3;
999
- ori = oriA < 3 ? oriB : (3 - oriB) % 3;
1000
- b.ca[corn] = (sinv.ca[a.ca[s.ca[corn] & 7] & 7] & 7 | ori << 3) << 24 >> 24;
1001
- }
1002
- }
1003
- function CornMult(a, b, prod) {
1004
- $clinit_CubieCube();
1005
- var corn, oriA, oriB;
1006
- for (corn = 0; corn < 8; corn++) {
1007
- oriA = a.ca[b.ca[corn] & 7] >> 3;
1008
- oriB = b.ca[corn] >> 3;
1009
- prod.ca[corn] = (a.ca[b.ca[corn] & 7] & 7 | (oriA + oriB) % 3 << 3) << 24 >> 24;
1010
- }
1011
- }
1012
- function CornMultFull(a, b, prod) {
1013
- var corn, ori, oriA, oriB;
1014
- for (corn = 0; corn < 8; corn++) {
1015
- oriA = a.ca[b.ca[corn] & 7] >> 3;
1016
- oriB = b.ca[corn] >> 3;
1017
- ori = oriA + (oriA < 3 ? oriB : 6 - oriB);
1018
- ori = ori % 3 + (oriA < 3 == oriB < 3 ? 0 : 3);
1019
- prod.ca[corn] = (a.ca[b.ca[corn] & 7] & 7 | ori << 3) << 24 >> 24;
1020
- }
1021
- }
1022
- function CubieCube() {
1023
- $clinit_CubieCube();
1024
- $$init(this);
1025
- }
1026
- function CubieCube_0(cperm, twist, eperm, flip) {
1027
- $$init(this);
1028
- setNPerm(this.ca, cperm, 8, false);
1029
- $setTwist(this, twist);
1030
- setNPerm(this.ea, eperm, 12, true);
1031
- $setFlip(this, flip);
1032
- }
1033
- function CubieCube_1(c) {
1034
- $$init(this);
1035
- $copy(this, c);
1036
- }
1037
- function ESym2CSym(idx) {
1038
- $clinit_CubieCube();
1039
- return idx ^ $intern_28 >> ((idx & 15) << 1) & 3;
1040
- }
1041
- function EdgeConjugate(a, idx, b) {
1042
- $clinit_CubieCube();
1043
- var ed, s, sinv;
1044
- sinv = CubeSym[SymMultInv[0][idx]];
1045
- s = CubeSym[idx];
1046
- for (ed = 0; ed < 12; ed++) {
1047
- b.ea[ed] = (sinv.ea[a.ea[s.ea[ed] >> 1] >> 1] ^ a.ea[s.ea[ed] >> 1] & 1 ^ s.ea[ed] & 1) << 24 >> 24;
1048
- }
1049
- }
1050
- function EdgeMult(a, b, prod) {
1051
- $clinit_CubieCube();
1052
- var ed;
1053
- for (ed = 0; ed < 12; ed++) {
1054
- prod.ea[ed] = (a.ea[b.ea[ed] >> 1] ^ b.ea[ed] & 1) << 24 >> 24;
1055
- }
1056
- }
1057
- function initMove() {
1058
- var a, p;
1059
- moveCube[0] = new CubieCube_0(15120, 0, 119750400, 0);
1060
- moveCube[3] = new CubieCube_0(21021, 1494, 323403417, 0);
1061
- moveCube[6] = new CubieCube_0(8064, 1236, 29441808, 550);
1062
- moveCube[9] = new CubieCube_0(9, 0, 5880, 0);
1063
- moveCube[12] = new CubieCube_0(1230, 412, 2949660, 0);
1064
- moveCube[15] = new CubieCube_0(224, 137, 328552, 137);
1065
- for (a = 0; a < 18; a += 3) {
1066
- for (p = 0; p < 2; p++) {
1067
- moveCube[a + p + 1] = new CubieCube();
1068
- EdgeMult(moveCube[a + p], moveCube[a], moveCube[a + p + 1]);
1069
- CornMult(moveCube[a + p], moveCube[a], moveCube[a + p + 1]);
1070
- }
1071
- }
1072
- }
1073
- function initSym() {
1074
- var c, d, f2, i, i0, i1, i2, j, j0, j1, k, lr2, m, s, t, u4;
1075
- c = new CubieCube();
1076
- d = new CubieCube();
1077
- f2 = new CubieCube_0(28783, 0, 259268407, 0);
1078
- u4 = new CubieCube_0(15138, 0, 119765538, 7);
1079
- lr2 = new CubieCube_0(5167, 0, 83473207, 0);
1080
- for (i0 = 0; i0 < 8; i0++) {
1081
- lr2.ca[i0] = narrow_byte(lr2.ca[i0] | 24);
1082
- }
1083
- for (i1 = 0; i1 < 16; i1++) {
1084
- CubeSym[i1] = new CubieCube_1(c);
1085
- CornMultFull(c, u4, d);
1086
- EdgeMult(c, u4, d);
1087
- t = d;
1088
- d = c;
1089
- c = t;
1090
- if (i1 % 4 == 3) {
1091
- CornMultFull(t, lr2, d);
1092
- EdgeMult(t, lr2, d);
1093
- t = d;
1094
- d = c;
1095
- c = t;
1096
- }
1097
- if (i1 % 8 == 7) {
1098
- CornMultFull(t, f2, d);
1099
- EdgeMult(t, f2, d);
1100
- t = d;
1101
- d = c;
1102
- c = t;
1103
- }
1104
- }
1105
- for (i2 = 0; i2 < 16; i2++) {
1106
- for (j0 = 0; j0 < 16; j0++) {
1107
- CornMultFull(CubeSym[i2], CubeSym[j0], c);
1108
- for (k = 0; k < 16; k++) {
1109
- if (equals_7(CubeSym[k].ca, c.ca)) {
1110
- SymMult[i2][j0] = k;
1111
- SymMultInv[k][j0] = i2;
1112
- break;
1113
- }
1114
- }
1115
- }
1116
- }
1117
- for (j1 = 0; j1 < 18; j1++) {
1118
- for (s = 0; s < 16; s++) {
1119
- CornConjugate(moveCube[j1], SymMultInv[0][s], c);
1120
- for (m = 0; m < 18; m++) {
1121
- if (equals_7(moveCube[m].ca, c.ca)) {
1122
- SymMove_0[s][j1] = m;
1123
- SymMoveUD[s][($clinit_Util(), std2ud)[j1]] = std2ud[m];
1124
- break;
1125
- }
1126
- }
1127
- s % 2 == 0 && (Sym8Move[j1 << 3 | s >> 1] = SymMove_0[s][j1]);
1128
- }
1129
- }
1130
- for (i = 0; i < 18; i++) {
1131
- moveCubeSym[i] = $selfSymmetry(moveCube[i]);
1132
- j = i;
1133
- for (s = 0; s < 48; s++) {
1134
- SymMove_0[s % 16][j] < i && (firstMoveSym[s] |= 1 << i);
1135
- s % 16 == 15 && (j = urfMove[2][j]);
1136
- }
1137
- }
1138
- }
1139
- var CubeSym;
1140
- var EPermR2S;
1141
- var EPermS2R;
1142
- var FlipR2S;
1143
- var FlipS2R;
1144
- var FlipS2RF;
1145
- var MPermInv;
1146
- var Perm2CombP;
1147
- var PermInvEdgeSym;
1148
- var Sym8Move;
1149
- var SymMove_0;
1150
- var SymMoveUD;
1151
- var SymMult;
1152
- var SymMultInv;
1153
- var TwistR2S;
1154
- var TwistS2R;
1155
- var firstMoveSym;
1156
- var moveCube;
1157
- var moveCubeSym;
1158
- var urf1;
1159
- var urf2;
1160
- var urfMove;
1161
- var Lorg_cubing_min2phase_client_CubieCube_2_classLit = createForClass("org.cubing.min2phase.client", "CubieCube", 7);
1162
- function Search() {
1163
- var i, i0, i1;
1164
- this.move = initDim(I_classLit, $intern_27, 0, 31, 7, 1);
1165
- this.nodeUD = initDim(Lorg_cubing_min2phase_client_CoordCube_2_classLit, $intern_3, 31, 21, 0, 1);
1166
- this.nodeRL = initDim(Lorg_cubing_min2phase_client_CoordCube_2_classLit, $intern_3, 31, 21, 0, 1);
1167
- this.nodeFB = initDim(Lorg_cubing_min2phase_client_CoordCube_2_classLit, $intern_3, 31, 21, 0, 1);
1168
- this.cc = new CubieCube();
1169
- this.urfCubieCube = initDim(Lorg_cubing_min2phase_client_CubieCube_2_classLit, $intern_3, 7, 6, 0, 1);
1170
- this.urfCoordCube = initDim(Lorg_cubing_min2phase_client_CoordCube_2_classLit, $intern_3, 31, 6, 0, 1);
1171
- this.phase1Cubie = initDim(Lorg_cubing_min2phase_client_CubieCube_2_classLit, $intern_3, 7, 21, 0, 1);
1172
- this.preMoveCubes = initDim(Lorg_cubing_min2phase_client_CubieCube_2_classLit, $intern_3, 7, 21, 0, 1);
1173
- this.preMoves = initDim(I_classLit, $intern_27, 0, 20, 7, 1);
1174
- for (i0 = 0; i0 < 21; i0++) {
1175
- this.nodeUD[i0] = new CoordCube();
1176
- this.nodeRL[i0] = new CoordCube();
1177
- this.nodeFB[i0] = new CoordCube();
1178
- this.phase1Cubie[i0] = new CubieCube();
1179
- }
1180
- for (i1 = 0; i1 < 6; i1++) {
1181
- this.urfCubieCube[i1] = new CubieCube();
1182
- this.urfCoordCube[i1] = new CoordCube();
1183
- }
1184
- for (i = 0; i < 20; i++) {
1185
- this.preMoveCubes[i + 1] = new CubieCube();
1186
- }
1187
- }
1188
- defineClass(72, 1, {}, Search);
1189
- _.allowShorter = false;
1190
- _.conjMask = 0;
1191
- _.depth1 = 0;
1192
- _.isRec = false;
1193
- _.length1 = 0;
1194
- _.maxDep2 = 0;
1195
- _.maxPreMoves = 0;
1196
- _.preMoveLen = 0;
1197
- _.probe = { l: 0, m: 0, h: 0 };
1198
- _.probeMax = { l: 0, m: 0, h: 0 };
1199
- _.probeMin = { l: 0, m: 0, h: 0 };
1200
- _.selfSym = { l: 0, m: 0, h: 0 };
1201
- _.solLen = 0;
1202
- _.urfIdx = 0;
1203
- _.valid1 = 0;
1204
- _.verbose = 0;
1205
- var $clinit_Util_ran = false;
1206
- function $clinit_Util() {
1207
- if ($clinit_Util_ran) {
1208
- return;
1209
- }
1210
- $clinit_Util_ran = true;
1211
- var i, i0, i1, ix, j, jx;
1212
- cornerFacelet = initValues(getClassLiteralForArray(B_classLit, 2), $intern_3, 10, 0, [
1213
- initValues(getClassLiteralForArray(B_classLit, 1), $intern_30, 0, 7, [8, 9, 20]),
1214
- initValues(getClassLiteralForArray(B_classLit, 1), $intern_30, 0, 7, [6, 18, 38]),
1215
- initValues(getClassLiteralForArray(B_classLit, 1), $intern_30, 0, 7, [0, 36, 47]),
1216
- initValues(getClassLiteralForArray(B_classLit, 1), $intern_30, 0, 7, [2, 45, 11]),
1217
- initValues(getClassLiteralForArray(B_classLit, 1), $intern_30, 0, 7, [29, 26, 15]),
1218
- initValues(getClassLiteralForArray(B_classLit, 1), $intern_30, 0, 7, [27, 44, 24]),
1219
- initValues(getClassLiteralForArray(B_classLit, 1), $intern_30, 0, 7, [33, 53, 42]),
1220
- initValues(getClassLiteralForArray(B_classLit, 1), $intern_30, 0, 7, [35, 17, 51])
1221
- ]);
1222
- edgeFacelet = initValues(getClassLiteralForArray(B_classLit, 2), $intern_3, 10, 0, [
1223
- initValues(getClassLiteralForArray(B_classLit, 1), $intern_30, 0, 7, [5, 10]),
1224
- initValues(getClassLiteralForArray(B_classLit, 1), $intern_30, 0, 7, [7, 19]),
1225
- initValues(getClassLiteralForArray(B_classLit, 1), $intern_30, 0, 7, [3, 37]),
1226
- initValues(getClassLiteralForArray(B_classLit, 1), $intern_30, 0, 7, [1, 46]),
1227
- initValues(getClassLiteralForArray(B_classLit, 1), $intern_30, 0, 7, [32, 16]),
1228
- initValues(getClassLiteralForArray(B_classLit, 1), $intern_30, 0, 7, [28, 25]),
1229
- initValues(getClassLiteralForArray(B_classLit, 1), $intern_30, 0, 7, [30, 43]),
1230
- initValues(getClassLiteralForArray(B_classLit, 1), $intern_30, 0, 7, [34, 52]),
1231
- initValues(getClassLiteralForArray(B_classLit, 1), $intern_30, 0, 7, [23, 12]),
1232
- initValues(getClassLiteralForArray(B_classLit, 1), $intern_30, 0, 7, [21, 41]),
1233
- initValues(getClassLiteralForArray(B_classLit, 1), $intern_30, 0, 7, [50, 39]),
1234
- initValues(getClassLiteralForArray(B_classLit, 1), $intern_30, 0, 7, [48, 14])
1235
- ]);
1236
- Cnk = initDims(I_classLit, [$intern_3, $intern_27], [17, 0], 7, [13, 13], 2);
1237
- move2str = initValues(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_3, 2, 4, [
1238
- "U ",
1239
- "U2",
1240
- "U'",
1241
- "R ",
1242
- "R2",
1243
- "R'",
1244
- "F ",
1245
- "F2",
1246
- "F'",
1247
- "D ",
1248
- "D2",
1249
- "D'",
1250
- "L ",
1251
- "L2",
1252
- "L'",
1253
- "B ",
1254
- "B2",
1255
- "B'"
1256
- ]);
1257
- ud2std = initValues(getClassLiteralForArray(I_classLit, 1), $intern_27, 0, 7, [0, 1, 2, 4, 7, 9, 10, 11, 13, 16, 3, 5, 6, 8, 12, 14, 15, 17]);
1258
- std2ud = initDim(I_classLit, $intern_27, 0, 18, 7, 1);
1259
- ckmv2bit = initDim(I_classLit, $intern_27, 0, 11, 7, 1);
1260
- for (i0 = 0; i0 < 18; i0++) {
1261
- std2ud[ud2std[i0]] = i0;
1262
- }
1263
- for (i1 = 0; i1 < 10; i1++) {
1264
- ix = ~~(ud2std[i1] / 3);
1265
- ckmv2bit[i1] = 0;
1266
- for (j = 0; j < 10; j++) {
1267
- jx = ~~(ud2std[j] / 3);
1268
- ckmv2bit[i1] |= (ix == jx || ix % 3 == jx % 3 && ix >= jx ? 1 : 0) << j;
1269
- }
1270
- }
1271
- ckmv2bit[10] = 0;
1272
- for (i = 0; i < 13; i++) {
1273
- Cnk[i][0] = Cnk[i][i] = 1;
1274
- for (j = 1; j < i; j++) {
1275
- Cnk[i][j] = Cnk[i - 1][j - 1] + Cnk[i - 1][j];
1276
- }
1277
- }
1278
- }
1279
- function getNPerm(arr, n, isEdge) {
1280
- $clinit_Util();
1281
- var i, idx, v, val;
1282
- idx = 0;
1283
- val = { l: 1323536, m: 2777561, h: 1043915 };
1284
- for (i = 0; i < n - 1; i++) {
1285
- v = getVal(arr[i], isEdge) << 2;
1286
- idx = (n - i) * idx + toInt(and(shr(val, v), { l: 15, m: 0, h: 0 }));
1287
- val = sub_0(val, shl({ l: 1118480, m: 279620, h: 69905 }, v));
1288
- }
1289
- return idx;
1290
- }
1291
- function getVal(val0, isEdge) {
1292
- return isEdge ? val0 >> 1 : val0 & 7;
1293
- }
1294
- function setNPerm(arr, idx, n, isEdge) {
1295
- $clinit_Util();
1296
- var extract, i, m, p, v, val;
1297
- val = { l: 1323536, m: 2777561, h: 1043915 };
1298
- extract = { l: 0, m: 0, h: 0 };
1299
- for (p = 2; p <= n; p++) {
1300
- extract = or(shl(extract, 4), fromInt(idx % p));
1301
- idx = ~~(idx / p);
1302
- }
1303
- for (i = 0; i < n - 1; i++) {
1304
- v = (toInt(extract) & 15) << 2;
1305
- extract = shr(extract, 4);
1306
- arr[i] = setVal(arr[i], toInt(and(shr(val, v), { l: 15, m: 0, h: 0 })), isEdge);
1307
- m = sub_0(shl({ l: 1, m: 0, h: 0 }, v), { l: 1, m: 0, h: 0 });
1308
- val = or(and(val, m), and(shr(val, 4), {
1309
- l: ~m.l & $intern_9,
1310
- m: ~m.m & $intern_9,
1311
- h: ~m.h & $intern_10
1312
- }));
1313
- }
1314
- arr[n - 1] = setVal(arr[n - 1], toInt(and(val, { l: 15, m: 0, h: 0 })), isEdge);
1315
- }
1316
- function setVal(val0, val, isEdge) {
1317
- return (isEdge ? val << 1 | val0 & 1 : val | val0 & -8) << 24 >> 24;
1318
- }
1319
- var Cnk;
1320
- var ckmv2bit;
1321
- var cornerFacelet;
1322
- var edgeFacelet;
1323
- var move2str;
1324
- var std2ud;
1325
- var ud2std;
1326
- function Util$Solution() {
1327
- this.moves = initDim(I_classLit, $intern_27, 0, 31, 7, 1);
1328
- }
1329
- defineClass(150, 1, {}, Util$Solution);
1330
- _.depth1 = 0;
1331
- _.length_0 = 0;
1332
- _.urfIdx = 0;
1333
- _.verbose = 0;
1334
- var I_classLit = createForPrimitive("int", "I");
1335
- createForClass("com.google.gwt.lang", "CollapsedPropertyHolder", 252);
1336
- createForClass("com.google.gwt.lang", "JavaClassHierarchySetupUtil", 254);
1337
- var Lcom_google_gwt_lang_LongLibBase$LongEmul_2_classLit = createForClass("com.google.gwt.lang", "LongLibBase/LongEmul", null);
1338
- createForClass("com.google.gwt.lang", "ModuleUtils", 257);
1339
- var B_classLit = createForPrimitive("byte", "B");
1340
- var J_classLit = createForPrimitive("long", "J");
1341
- var C_classLit = createForPrimitive("char", "C");
1342
- createForClass("com.google.gwt.user.client.rpc", "XsrfToken", null), createForInterface("java.util", "Map/Entry");
1343
-
1344
- // src/cubing/search/inside/solve/puzzles/3x3x3/index.ts
1345
- async function random333State() {
1346
- const def = await puzzles["3x3x3"].def();
1347
- const kpuzzle = new KPuzzle(def);
1348
- for (const piece of sgs3x3x3) {
1349
- kpuzzle.applyAlg(Alg.fromString((await randomChoiceFactory())(piece)));
1350
- }
1351
- if (!passesFilter(def, kpuzzle.state)) {
1352
- return random333State();
1353
- }
1354
- return kpuzzle.state;
1355
- }
1356
- var extraBit = new Alg("R' U' F");
1357
-
1358
- export {
1359
- randomScrambleForEvent,
1360
- experimentalSolve3x3x3IgnoringCenters,
1361
- experimentalSolve2x2x2,
1362
- solveSkewb,
1363
- solvePyraminx,
1364
- solveMegaminx,
1365
- setDebug,
1366
- random333State
1367
- };
1368
- //# sourceMappingURL=chunk-6BZSKSG7.js.map