cubing 0.66.0 → 0.66.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.
Files changed (106) hide show
  1. package/dist/bin/chunks/{chunk-VTD7RU7S.js → chunk-HS7R54XN.js} +2 -2
  2. package/dist/bin/order.js +1 -1
  3. package/dist/bin/puzzle-geometry-bin.js +1 -1
  4. package/dist/bin/scramble.js +1 -1
  5. package/dist/bin/svg.js +1 -1
  6. package/dist/lib/cubing/alg/index.d.ts +1 -1
  7. package/dist/lib/cubing/alg/index.js +1 -2
  8. package/dist/lib/cubing/bluetooth/index.d.ts +2 -2
  9. package/dist/lib/cubing/bluetooth/index.js +5 -6
  10. package/dist/lib/cubing/chunks/{big-puzzle-orientation-KCHMEEM7.js → big-puzzle-orientation-KJL4OFV2.js} +1 -2
  11. package/dist/lib/cubing/chunks/{chunk-XAOXLHYH.js → chunk-6R47S6MP.js} +24 -25
  12. package/dist/lib/cubing/chunks/{chunk-ZCZVKGKB.js → chunk-7LEVC3YR.js} +1 -2
  13. package/dist/lib/cubing/chunks/{chunk-7GUL3OBQ.js → chunk-BHVTDDUY.js} +0 -1
  14. package/dist/lib/cubing/chunks/{chunk-JL5REGXZ.js → chunk-IIJFVP3K.js} +6 -7
  15. package/dist/lib/cubing/chunks/{chunk-6RZGNWLS.js → chunk-KH2MQ7KY.js} +2 -3
  16. package/dist/lib/cubing/chunks/{chunk-L6OQRJJX.js → chunk-LBER75W4.js} +1 -2
  17. package/dist/lib/cubing/chunks/{chunk-ZV7PYR2S.js → chunk-NJ66FRKF.js} +3 -4
  18. package/dist/lib/cubing/chunks/{chunk-CAQY24I5.js → chunk-QOLD6GH2.js} +5 -6
  19. package/dist/lib/cubing/chunks/{chunk-CFZLXDM6.js → chunk-QZK3M7IM.js} +0 -1
  20. package/dist/lib/cubing/chunks/chunk-RDKH6CDA.js +0 -0
  21. package/dist/lib/cubing/chunks/{chunk-4KLW7Y6J.js → chunk-T5M3DY5P.js} +2 -3
  22. package/dist/lib/cubing/chunks/{chunk-K237RIQJ.js → chunk-UKAXYOG2.js} +2 -3
  23. package/dist/lib/cubing/chunks/{chunk-GHFBZYSV.js → chunk-YJH5LHFN.js} +0 -1
  24. package/dist/lib/cubing/chunks/{inside-BAQGCKLY.js → inside-UWSZBO4Y.js} +14 -15
  25. package/dist/lib/cubing/chunks/{puzzles-dynamic-3x3x3-FYXD7SIU.js → puzzles-dynamic-3x3x3-CMH2HHH5.js} +0 -1
  26. package/dist/lib/cubing/chunks/{puzzles-dynamic-4x4x4-AIGABOAR.js → puzzles-dynamic-4x4x4-UFAQS3QG.js} +0 -1
  27. package/dist/lib/cubing/chunks/{puzzles-dynamic-megaminx-2LVHIDL4.js → puzzles-dynamic-megaminx-EFR4GQFA.js} +0 -1
  28. package/dist/lib/cubing/chunks/{puzzles-dynamic-side-events-653A7JCM.js → puzzles-dynamic-side-events-KF3PEOJN.js} +0 -1
  29. package/dist/lib/cubing/chunks/{puzzles-dynamic-unofficial-2CY6GVZ4.js → puzzles-dynamic-unofficial-6BF3EWTI.js} +0 -1
  30. package/dist/lib/cubing/chunks/{search-dynamic-sgs-side-events-KPAPKICT.js → search-dynamic-sgs-side-events-5GQDHSJR.js} +5 -6
  31. package/dist/lib/cubing/chunks/{search-dynamic-sgs-unofficial-WJZ2CWX5.js → search-dynamic-sgs-unofficial-YM23KVCN.js} +90 -78
  32. package/dist/lib/cubing/chunks/{search-dynamic-solve-3x3x3-B2L4IN34.js → search-dynamic-solve-3x3x3-6UMZH4WB.js} +3 -6
  33. package/dist/lib/cubing/chunks/{search-dynamic-solve-4x4x4-OLWUV6G6.js → search-dynamic-solve-4x4x4-KNSBAM7Q.js} +14 -17
  34. package/dist/lib/cubing/chunks/{search-dynamic-solve-fto-WLOW7LAM.js → search-dynamic-solve-fto-CSXJYISF.js} +200 -90
  35. package/dist/lib/cubing/chunks/{search-dynamic-solve-kilominx-KKUOVW5Y.js → search-dynamic-solve-kilominx-EHAUQJXS.js} +105 -113
  36. package/dist/lib/cubing/chunks/{search-dynamic-solve-master_tetraminx-GIS7T5B7.js → search-dynamic-solve-master_tetraminx-ZQ25QK7E.js} +99 -100
  37. package/dist/lib/cubing/chunks/search-worker-entry.js +2 -3
  38. package/dist/lib/cubing/chunks/{twips-J732JDZJ.js → twips-IMF5RNH5.js} +3 -4
  39. package/dist/lib/cubing/chunks/{twips_wasm_bg-TJNYGA2C-AP2O4LGG.js → twips_wasm_bg-TJNYGA2C-4JIZWC6Q.js} +1 -2
  40. package/dist/lib/cubing/chunks/{twisty-dynamic-3d-SFR3X64P.js → twisty-dynamic-3d-HSYJR5CM.js} +5 -6
  41. package/dist/lib/cubing/{index-Bfranlt_.d.ts → index-lAUL_nRN.d.ts} +1 -1
  42. package/dist/lib/cubing/{index-B2nOJwLe.d.ts → index-nWspzjVK.d.ts} +43 -39
  43. package/dist/lib/cubing/kpuzzle/index.d.ts +1 -1
  44. package/dist/lib/cubing/kpuzzle/index.js +2 -3
  45. package/dist/lib/cubing/notation/index.d.ts +1 -1
  46. package/dist/lib/cubing/notation/index.js +4 -5
  47. package/dist/lib/cubing/{outside-BdYfq43N.d.ts → outside-CD19aDjE.d.ts} +1 -1
  48. package/dist/lib/cubing/protocol/index.d.ts +1 -1
  49. package/dist/lib/cubing/protocol/index.js +4 -5
  50. package/dist/lib/cubing/puzzle-geometry/index.d.ts +1 -1
  51. package/dist/lib/cubing/puzzle-geometry/index.js +375 -375
  52. package/dist/lib/cubing/puzzles/index.d.ts +1 -1
  53. package/dist/lib/cubing/puzzles/index.js +4 -5
  54. package/dist/lib/cubing/scramble/index.d.ts +1 -1
  55. package/dist/lib/cubing/scramble/index.js +8 -9
  56. package/dist/lib/cubing/search/index.d.ts +1 -1
  57. package/dist/lib/cubing/search/index.js +7 -8
  58. package/dist/lib/cubing/stream/index.d.ts +1 -1
  59. package/dist/lib/cubing/stream/index.js +1 -2
  60. package/dist/lib/cubing/twisty/index.d.ts +1 -1
  61. package/dist/lib/cubing/twisty/index.js +6 -7
  62. package/package.json +1 -1
  63. package/dist/lib/cubing/alg/index.js.map +0 -7
  64. package/dist/lib/cubing/bluetooth/index.js.map +0 -7
  65. package/dist/lib/cubing/chunks/big-puzzle-orientation-KCHMEEM7.js.map +0 -7
  66. package/dist/lib/cubing/chunks/chunk-4KLW7Y6J.js.map +0 -7
  67. package/dist/lib/cubing/chunks/chunk-6RZGNWLS.js.map +0 -7
  68. package/dist/lib/cubing/chunks/chunk-7GUL3OBQ.js.map +0 -7
  69. package/dist/lib/cubing/chunks/chunk-CAQY24I5.js.map +0 -7
  70. package/dist/lib/cubing/chunks/chunk-CFZLXDM6.js.map +0 -7
  71. package/dist/lib/cubing/chunks/chunk-GHFBZYSV.js.map +0 -7
  72. package/dist/lib/cubing/chunks/chunk-JL5REGXZ.js.map +0 -7
  73. package/dist/lib/cubing/chunks/chunk-K237RIQJ.js.map +0 -7
  74. package/dist/lib/cubing/chunks/chunk-L6OQRJJX.js.map +0 -7
  75. package/dist/lib/cubing/chunks/chunk-NAPITA3L.js +0 -1
  76. package/dist/lib/cubing/chunks/chunk-NAPITA3L.js.map +0 -7
  77. package/dist/lib/cubing/chunks/chunk-XAOXLHYH.js.map +0 -7
  78. package/dist/lib/cubing/chunks/chunk-ZCZVKGKB.js.map +0 -7
  79. package/dist/lib/cubing/chunks/chunk-ZV7PYR2S.js.map +0 -7
  80. package/dist/lib/cubing/chunks/inside-BAQGCKLY.js.map +0 -7
  81. package/dist/lib/cubing/chunks/puzzles-dynamic-3x3x3-FYXD7SIU.js.map +0 -7
  82. package/dist/lib/cubing/chunks/puzzles-dynamic-4x4x4-AIGABOAR.js.map +0 -7
  83. package/dist/lib/cubing/chunks/puzzles-dynamic-megaminx-2LVHIDL4.js.map +0 -7
  84. package/dist/lib/cubing/chunks/puzzles-dynamic-side-events-653A7JCM.js.map +0 -7
  85. package/dist/lib/cubing/chunks/puzzles-dynamic-unofficial-2CY6GVZ4.js.map +0 -7
  86. package/dist/lib/cubing/chunks/search-dynamic-sgs-side-events-KPAPKICT.js.map +0 -7
  87. package/dist/lib/cubing/chunks/search-dynamic-sgs-unofficial-WJZ2CWX5.js.map +0 -7
  88. package/dist/lib/cubing/chunks/search-dynamic-solve-3x3x3-B2L4IN34.js.map +0 -7
  89. package/dist/lib/cubing/chunks/search-dynamic-solve-4x4x4-OLWUV6G6.js.map +0 -7
  90. package/dist/lib/cubing/chunks/search-dynamic-solve-fto-WLOW7LAM.js.map +0 -7
  91. package/dist/lib/cubing/chunks/search-dynamic-solve-kilominx-KKUOVW5Y.js.map +0 -7
  92. package/dist/lib/cubing/chunks/search-dynamic-solve-master_tetraminx-GIS7T5B7.js.map +0 -7
  93. package/dist/lib/cubing/chunks/search-worker-entry.js.map +0 -7
  94. package/dist/lib/cubing/chunks/twips-J732JDZJ.js.map +0 -7
  95. package/dist/lib/cubing/chunks/twips_wasm_bg-TJNYGA2C-AP2O4LGG.js.map +0 -7
  96. package/dist/lib/cubing/chunks/twisty-dynamic-3d-SFR3X64P.js.map +0 -7
  97. package/dist/lib/cubing/kpuzzle/index.js.map +0 -7
  98. package/dist/lib/cubing/notation/index.js.map +0 -7
  99. package/dist/lib/cubing/protocol/index.js.map +0 -7
  100. package/dist/lib/cubing/puzzle-geometry/index.js.map +0 -7
  101. package/dist/lib/cubing/puzzles/index.js.map +0 -7
  102. package/dist/lib/cubing/scramble/index.js.map +0 -7
  103. package/dist/lib/cubing/search/index.js.map +0 -7
  104. package/dist/lib/cubing/stream/index.js.map +0 -7
  105. package/dist/lib/cubing/twisty/index.js.map +0 -7
  106. /package/dist/bin/chunks/{chunk-VTD7RU7S.js.map → chunk-HS7R54XN.js.map} +0 -0
@@ -899,4 +899,3 @@ export {
899
899
  rediCubeJSON,
900
900
  rediCubeSVG
901
901
  };
902
- //# sourceMappingURL=puzzles-dynamic-unofficial-2CY6GVZ4.js.map
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  parseSGS
3
- } from "./chunk-ZCZVKGKB.js";
3
+ } from "./chunk-7LEVC3YR.js";
4
4
  import {
5
5
  cube2x2x2,
6
6
  puzzles
7
- } from "./chunk-XAOXLHYH.js";
8
- import "./chunk-JL5REGXZ.js";
7
+ } from "./chunk-6R47S6MP.js";
8
+ import "./chunk-IIJFVP3K.js";
9
9
  import {
10
10
  KPuzzle
11
- } from "./chunk-L6OQRJJX.js";
12
- import "./chunk-CFZLXDM6.js";
11
+ } from "./chunk-LBER75W4.js";
12
+ import "./chunk-QZK3M7IM.js";
13
13
 
14
14
  // src/cubing/search/inside/solve/puzzles/dynamic/sgs-side-events/2x2x2.sgs.ts
15
15
  var cachedData = null;
@@ -1888,4 +1888,3 @@ export {
1888
1888
  sgsDataSkewbFixedCorner,
1889
1889
  skewbKPuzzleWithoutMOCached
1890
1890
  };
1891
- //# sourceMappingURL=search-dynamic-sgs-side-events-KPAPKICT.js.map
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  parseSGS
3
- } from "./chunk-ZCZVKGKB.js";
3
+ } from "./chunk-7LEVC3YR.js";
4
4
  import {
5
5
  puzzles
6
- } from "./chunk-XAOXLHYH.js";
7
- import "./chunk-JL5REGXZ.js";
8
- import "./chunk-L6OQRJJX.js";
6
+ } from "./chunk-6R47S6MP.js";
7
+ import "./chunk-IIJFVP3K.js";
8
+ import "./chunk-LBER75W4.js";
9
9
  import {
10
10
  Alg
11
- } from "./chunk-CFZLXDM6.js";
11
+ } from "./chunk-QZK3M7IM.js";
12
12
 
13
- // src/cubing/vendor/mpl/xyzzy/redi_cube.js
13
+ // src/cubing/vendor/mpl/xyzzy/redi_cube.ts
14
14
  import { randomUIntBelow } from "random-uint-below";
15
15
  function factorial(n) {
16
16
  if (n < 2) {
@@ -42,10 +42,10 @@ function permutation_to_index(perm) {
42
42
  let ind = 0;
43
43
  while (n > 1) {
44
44
  n--;
45
- let e = perm[0];
45
+ const e = perm[0];
46
46
  ind += e * f;
47
47
  for (let i = 0; i < n; i++) {
48
- let x = perm[i + 1];
48
+ const x = perm[i + 1];
49
49
  perm[i] = x - (x > e);
50
50
  }
51
51
  f /= n;
@@ -53,7 +53,7 @@ function permutation_to_index(perm) {
53
53
  return ind;
54
54
  }
55
55
  function index_to_permutation(ind, n) {
56
- let perm = [];
56
+ const perm = [];
57
57
  let f = factorial(n - 1);
58
58
  for (let i = 0; i < n; i++) {
59
59
  perm[i] = ind / f | 0;
@@ -68,7 +68,7 @@ function index_to_permutation(ind, n) {
68
68
  return perm;
69
69
  }
70
70
  function permutation_parity(A) {
71
- let n = A.length;
71
+ const n = A.length;
72
72
  let parity = 0;
73
73
  for (let i = 0; i < n - 1; i++) {
74
74
  for (let j = i; j < n; j++) {
@@ -80,7 +80,7 @@ function permutation_parity(A) {
80
80
  return parity;
81
81
  }
82
82
  function index_to_evenpermutation(ind, n) {
83
- let perm = [];
83
+ const perm = [];
84
84
  let f = factorial(n - 1) / 2;
85
85
  let parity = 0;
86
86
  for (let i = 0; i < n - 1; i++) {
@@ -132,8 +132,8 @@ function comb_to_index(l) {
132
132
  function index_to_comb(ind, ones, bits) {
133
133
  let zeros = bits - ones;
134
134
  let b = C(bits - 1, ones);
135
- let l = [];
136
- let n = bits - 1;
135
+ const l = [];
136
+ const n = bits - 1;
137
137
  for (let i = 0; i < n; i++) {
138
138
  bits--;
139
139
  if (ind < b) {
@@ -149,14 +149,14 @@ function index_to_comb(ind, ones, bits) {
149
149
  return l;
150
150
  }
151
151
  function compose(A, B) {
152
- let C2 = [];
152
+ const C2 = [];
153
153
  for (let i = 0; i < B.length; i++) {
154
154
  C2[i] = A[B[i]];
155
155
  }
156
156
  return C2;
157
157
  }
158
158
  function permutation_from_cycle(cycle, n) {
159
- let perm = [];
159
+ const perm = [];
160
160
  for (let i = 0; i < n; i++) {
161
161
  perm[i] = i;
162
162
  }
@@ -166,14 +166,14 @@ function permutation_from_cycle(cycle, n) {
166
166
  return perm;
167
167
  }
168
168
  function unsparsify_list(d, n) {
169
- let l = Array(n).fill(0);
170
- for (let k in d) {
169
+ const l = Array(n).fill(0);
170
+ for (const k in d) {
171
171
  l[k] = d[k];
172
172
  }
173
173
  return l;
174
174
  }
175
175
  function compose_state(state1, state2) {
176
- let o = Array(8).fill(0);
176
+ const o = Array(8).fill(0);
177
177
  for (let i = 0; i < 8; i++) {
178
178
  o[i] = (state1[1][i] + state2[1][i]) % 3;
179
179
  }
@@ -212,20 +212,29 @@ var move_D = [
212
212
  unsparsify_list({ 7: 2 }, 8)
213
213
  ];
214
214
  var solved = [index_to_permutation(0, 12), Array(8).fill(0)];
215
- var moves = [move_UL, move_U, move_UR, move_F, move_L, move_B, move_R, move_D];
215
+ var moves = [
216
+ move_UL,
217
+ move_U,
218
+ move_UR,
219
+ move_F,
220
+ move_L,
221
+ move_B,
222
+ move_R,
223
+ move_D
224
+ ];
216
225
  var move_names = ["UL", "U", "UR", "F", "L", "B", "R", "D"];
217
226
  var tetrad = [0, 1, 0, 1, 1, 0, 1, 0];
218
227
  function stringify_move_sequence(move_sequence) {
219
- let suffixes = ["0", "", "'"];
220
- let s = move_sequence.map(([m, r]) => move_names[m] + suffixes[r]);
228
+ const suffixes = ["0", "", "'"];
229
+ const s = move_sequence.map(([m, r]) => move_names[m] + suffixes[r]);
221
230
  return s.join(" ");
222
231
  }
223
232
  function generate_random_state() {
224
- let p = index_to_evenpermutation(
233
+ const p = index_to_evenpermutation(
225
234
  Math.floor(randomUIntBelow(factorial(12)) / 2),
226
235
  12
227
236
  );
228
- let o = Array(8);
237
+ const o = Array(8);
229
238
  for (let i = 0; i < 8; i++) {
230
239
  o[i] = randomUIntBelow(3);
231
240
  }
@@ -235,31 +244,35 @@ function generate_random_state_scramble() {
235
244
  return solve(generate_random_state());
236
245
  }
237
246
  function solve(state) {
238
- let phase1_indices = index_phase1(state);
239
- let phase1_mtables = [
247
+ const phase1_indices = index_phase1(state);
248
+ const phase1_mtables = [
240
249
  generate_phase1_edge_mtable(),
241
250
  generate_phase1_separate_mtable()
242
251
  ];
243
- let phase1_ptables = [
252
+ const phase1_ptables = [
244
253
  generate_phase1_edge_ptable(),
245
254
  generate_phase1_separate_ptable()
246
255
  ];
247
- let phase2_mtables = [
256
+ const phase2_mtables = [
248
257
  generate_phase2_edge_mtable(),
249
258
  generate_phase2_corner_mtable()
250
259
  ];
251
- let phase2_ptables = [
260
+ const phase2_ptables = [
252
261
  generate_phase2_edge_ptable(),
253
262
  generate_phase1_corner_ptable()
254
263
  ];
255
- let phase1gen = ida_solve_gen(phase1_indices, phase1_mtables, phase1_ptables);
256
- let best = void 0;
257
- let intermediate_states = /* @__PURE__ */ new Set();
258
- let start_time = +/* @__PURE__ */ new Date();
264
+ const phase1gen = ida_solve_gen(
265
+ phase1_indices,
266
+ phase1_mtables,
267
+ phase1_ptables
268
+ );
269
+ let best;
270
+ const intermediate_states = /* @__PURE__ */ new Set();
271
+ const start_time = +/* @__PURE__ */ new Date();
259
272
  for (let i = 0; i < 25; i++) {
260
- let { value: sol1, done } = phase1gen.next();
273
+ const { value: sol1, done } = phase1gen.next();
261
274
  let new_state = state;
262
- for (let [m, r] of sol1) {
275
+ for (const [m, r] of sol1) {
263
276
  for (let i2 = 0; i2 < r; i2++) {
264
277
  new_state = compose_state(new_state, moves[m]);
265
278
  }
@@ -269,14 +282,14 @@ function solve(state) {
269
282
  } else {
270
283
  intermediate_states.add(new_state.toString());
271
284
  }
272
- let edge_ind = evenpermutation_to_index(new_state[0].slice(0, 8));
285
+ const edge_ind = evenpermutation_to_index(new_state[0].slice(0, 8));
273
286
  let corner_ind = 0;
274
287
  for (let i2 = 0; i2 < 4; i2++) {
275
288
  corner_ind += new_state[1][i2] * 3 ** i2;
276
289
  }
277
- let phase2_indices = [edge_ind, corner_ind];
278
- let moves_left = best ? best.length - sol1.length - 1 : 999999;
279
- let sol2 = ida_solve(
290
+ const phase2_indices = [edge_ind, corner_ind];
291
+ const moves_left = best ? best.length - sol1.length - 1 : 999999;
292
+ const sol2 = ida_solve(
280
293
  phase2_indices,
281
294
  phase2_mtables,
282
295
  phase2_ptables,
@@ -303,8 +316,8 @@ function index_phase1(state) {
303
316
  for (let i = 0; i < 4; i++) {
304
317
  corner_ind += state[1][i + 4] * 3 ** i;
305
318
  }
306
- let filtered = state[0].map((x) => Math.max(-1, x - 8));
307
- let separate_ind = comb_to_index(filtered.map((x) => +(x >= 0))) * 2 + permutation_parity(filtered.filter((x) => x >= 0));
319
+ const filtered = state[0].map((x) => Math.max(-1, x - 8));
320
+ const separate_ind = comb_to_index(filtered.map((x) => +(x >= 0))) * 2 + permutation_parity(filtered.filter((x) => x >= 0));
308
321
  return [edge_ind, corner_ind + 81 * separate_ind];
309
322
  }
310
323
  var tables = {};
@@ -312,10 +325,10 @@ function generate_phase1_corner_mtable() {
312
325
  if (tables.phase1cm) {
313
326
  return tables.phase1cm;
314
327
  }
315
- let mtable = [];
328
+ const mtable = [];
316
329
  for (let i = 0; i < 81; i++) {
317
330
  mtable[i] = Array(8);
318
- let o = [
331
+ const o = [
319
332
  i % 3,
320
333
  Math.floor(i / 3) % 3,
321
334
  Math.floor(i / 9) % 3,
@@ -334,9 +347,9 @@ function generate_phase1_corner_ptable() {
334
347
  if (tables.phase1cp) {
335
348
  return tables.phase1cp;
336
349
  }
337
- let ptable = Array(81);
350
+ const ptable = Array(81);
338
351
  for (let i = 0; i < 81; i++) {
339
- let o = [
352
+ const o = [
340
353
  i % 3,
341
354
  Math.floor(i / 3) % 3,
342
355
  Math.floor(i / 9) % 3,
@@ -350,14 +363,14 @@ function generate_phase1_edge_mtable() {
350
363
  if (tables.phase1em) {
351
364
  return tables.phase1em;
352
365
  }
353
- let mtable_single = [];
366
+ const mtable_single = [];
354
367
  for (let i = 0; i < 12; i++) {
355
368
  mtable_single[i] = [];
356
369
  for (let m = 0; m < 8; m++) {
357
370
  mtable_single[i][m] = moves[m][0].indexOf(i);
358
371
  }
359
372
  }
360
- let mtable = Array(12 ** 4);
373
+ const mtable = Array(12 ** 4);
361
374
  for (let i = 0; i < 12 ** 4; i++) {
362
375
  mtable[i] = Array(8);
363
376
  for (let m = 0; m < 8; m++) {
@@ -383,11 +396,11 @@ function generate_phase1_separate_mtable() {
383
396
  return tables.phase1sm;
384
397
  }
385
398
  const C12_4 = C(12, 4);
386
- let mtable_c = [];
399
+ const mtable_c = [];
387
400
  for (let i = 0; i < C12_4; i++) {
388
401
  mtable_c[i] = [];
389
- let comb = index_to_comb(i, 4, 12);
390
- let perm = [];
402
+ const comb = index_to_comb(i, 4, 12);
403
+ const perm = [];
391
404
  for (let j = 0, k = 0; j < 12; j++) {
392
405
  if (comb[j] === 0) {
393
406
  perm[j] = -1;
@@ -396,18 +409,18 @@ function generate_phase1_separate_mtable() {
396
409
  }
397
410
  }
398
411
  for (let m = 0; m < 8; m++) {
399
- let new_perm = compose(perm, moves[m][0]);
400
- let new_comb = compose(comb, moves[m][0]);
401
- let parity = permutation_parity(new_perm.filter((x) => x >= 0));
412
+ const new_perm = compose(perm, moves[m][0]);
413
+ const new_comb = compose(comb, moves[m][0]);
414
+ const parity = permutation_parity(new_perm.filter((x) => x >= 0));
402
415
  mtable_c[i][m] = comb_to_index(new_comb) * 2 + parity;
403
416
  }
404
417
  }
405
- let mtable_co = generate_phase1_corner_mtable();
406
- let mtable = [];
418
+ const mtable_co = generate_phase1_corner_mtable();
419
+ const mtable = [];
407
420
  for (let j = 0; j < C12_4; j++) {
408
421
  for (let i = 0; i < 81; i++) {
409
- let m0 = mtable[i + 81 * (2 * j)] = [];
410
- let m1 = mtable[i + 81 * (2 * j + 1)] = [];
422
+ const m0 = mtable[i + 81 * (2 * j)] = [];
423
+ const m1 = mtable[i + 81 * (2 * j + 1)] = [];
411
424
  for (let m = 0; m < 8; m++) {
412
425
  m0[m] = mtable_co[i][m] + 81 * mtable_c[j][m];
413
426
  m1[m] = mtable_co[i][m] + 81 * (mtable_c[j][m] ^ 1);
@@ -426,8 +439,8 @@ function generate_phase2_corner_mtable() {
426
439
  if (tables.phase2cm) {
427
440
  return tables.phase2cm;
428
441
  }
429
- let phase1_mtable = generate_phase1_corner_mtable();
430
- let mtable = Array(81);
442
+ const phase1_mtable = generate_phase1_corner_mtable();
443
+ const mtable = Array(81);
431
444
  for (let i = 0; i < 81; i++) {
432
445
  mtable[i] = phase1_mtable[i].slice(4, 8);
433
446
  }
@@ -439,12 +452,12 @@ function generate_phase2_edge_mtable() {
439
452
  }
440
453
  const n = 8;
441
454
  const HALFFACT8 = factorial(n) / 2;
442
- let mtable = Array(HALFFACT8);
443
- let perm = [0, 1, 2, 3, 4, 5, 6, 7];
455
+ const mtable = Array(HALFFACT8);
456
+ const perm = [0, 1, 2, 3, 4, 5, 6, 7];
444
457
  for (let i = 0; i < HALFFACT8; i++) {
445
458
  mtable[i] = Array(4);
446
459
  for (let m = 0; m < 4; m++) {
447
- let new_perm = compose(perm, moves[m][0].slice(0, 8));
460
+ const new_perm = compose(perm, moves[m][0].slice(0, 8));
448
461
  mtable[i][m] = evenpermutation_to_index(new_perm);
449
462
  }
450
463
  if (i === HALFFACT8 - 1) {
@@ -483,15 +496,15 @@ function generate_phase2_edge_ptable() {
483
496
  return tables.phase2ep = bfs(generate_phase2_edge_mtable(), [0]);
484
497
  }
485
498
  function bfs(mtable, goal_states) {
486
- let N = mtable.length;
487
- let nmoves = mtable[0].length;
488
- let ptable = Array(N).fill(-1);
499
+ const N = mtable.length;
500
+ const nmoves = mtable[0].length;
501
+ const ptable = Array(N).fill(-1);
489
502
  let queue = goal_states.slice();
490
503
  let new_queue = [];
491
504
  let depth = 0;
492
505
  while (queue.length > 0) {
493
506
  new_queue.length = 0;
494
- for (let state of queue) {
507
+ for (const state of queue) {
495
508
  if (ptable[state] !== -1) {
496
509
  continue;
497
510
  }
@@ -511,13 +524,13 @@ function bfs(mtable, goal_states) {
511
524
  }
512
525
  function ida_solve(indices, mtables, ptables, max_bound) {
513
526
  max_bound = max_bound || 999999;
514
- let ncoords = indices.length;
527
+ const ncoords = indices.length;
515
528
  let bound = 0;
516
529
  for (let i = 0; i < ncoords; i++) {
517
530
  bound = Math.max(bound, ptables[i][indices[i]]);
518
531
  }
519
532
  while (bound <= max_bound) {
520
- let path = ida_search(indices, mtables, ptables, bound, -1);
533
+ const path = ida_search(indices, mtables, ptables, bound, -1);
521
534
  if (path !== void 0) {
522
535
  return path;
523
536
  }
@@ -525,8 +538,8 @@ function ida_solve(indices, mtables, ptables, max_bound) {
525
538
  }
526
539
  }
527
540
  function ida_search(indices, mtables, ptables, bound, last) {
528
- let ncoords = indices.length;
529
- let nmoves = mtables[0][0].length;
541
+ const ncoords = indices.length;
542
+ const nmoves = mtables[0][0].length;
530
543
  let heuristic = 0;
531
544
  for (let i = 0; i < ncoords; i++) {
532
545
  heuristic = Math.max(heuristic, ptables[i][indices[i]]);
@@ -547,13 +560,13 @@ function ida_search(indices, mtables, ptables, bound, last) {
547
560
  if (m < last && tetrad[m] === tetrad[last]) {
548
561
  continue;
549
562
  }
550
- let new_indices = indices.slice();
563
+ const new_indices = indices.slice();
551
564
  for (let c = 0; c < ncoords; c++) {
552
565
  new_indices[c] = mtables[c][indices[c]][m];
553
566
  }
554
567
  let r = 1;
555
568
  while (indices.some((_, i) => indices[i] !== new_indices[i])) {
556
- let subpath = ida_search(new_indices, mtables, ptables, bound - 1, m);
569
+ const subpath = ida_search(new_indices, mtables, ptables, bound - 1, m);
557
570
  if (subpath !== void 0) {
558
571
  return [[m, r]].concat(subpath);
559
572
  }
@@ -566,7 +579,7 @@ function ida_search(indices, mtables, ptables, bound, last) {
566
579
  return;
567
580
  }
568
581
  function* ida_solve_gen(indices, mtables, ptables) {
569
- let ncoords = indices.length;
582
+ const ncoords = indices.length;
570
583
  let bound = 0;
571
584
  for (let i = 0; i < ncoords; i++) {
572
585
  bound = Math.max(bound, ptables[i][indices[i]]);
@@ -577,8 +590,8 @@ function* ida_solve_gen(indices, mtables, ptables) {
577
590
  }
578
591
  }
579
592
  function* ida_search_gen(indices, mtables, ptables, bound, last) {
580
- let ncoords = indices.length;
581
- let nmoves = mtables[0][0].length;
593
+ const ncoords = indices.length;
594
+ const nmoves = mtables[0][0].length;
582
595
  let heuristic = 0;
583
596
  for (let i = 0; i < ncoords; i++) {
584
597
  heuristic = Math.max(heuristic, ptables[i][indices[i]]);
@@ -600,13 +613,13 @@ function* ida_search_gen(indices, mtables, ptables, bound, last) {
600
613
  if (m < last && tetrad[m] === tetrad[last]) {
601
614
  continue;
602
615
  }
603
- let new_indices = indices.slice();
616
+ const new_indices = indices.slice();
604
617
  for (let c = 0; c < ncoords; c++) {
605
618
  new_indices[c] = mtables[c][indices[c]][m];
606
619
  }
607
620
  let r = 1;
608
621
  while (indices.some((_, i) => indices[i] !== new_indices[i])) {
609
- let subpath_gen = ida_search_gen(
622
+ const subpath_gen = ida_search_gen(
610
623
  new_indices,
611
624
  mtables,
612
625
  ptables,
@@ -614,7 +627,7 @@ function* ida_search_gen(indices, mtables, ptables, bound, last) {
614
627
  m
615
628
  );
616
629
  while (true) {
617
- let { value: subpath, done } = subpath_gen.next();
630
+ const { value: subpath, done } = subpath_gen.next();
618
631
  if (done) {
619
632
  break;
620
633
  }
@@ -1265,4 +1278,3 @@ export {
1265
1278
  getRandomRediCubeScramble,
1266
1279
  sgsDataFTO
1267
1280
  };
1268
- //# sourceMappingURL=search-dynamic-sgs-unofficial-WJZ2CWX5.js.map
@@ -1,4 +1,4 @@
1
- // src/cubing/vendor/mit/cs0x7f/min2phase/3x3x3-min2phase.js
1
+ // src/cubing/vendor/mit/cs0x7f/min2phase/3x3x3-min2phase.ts
2
2
  var $intern_3 = { 3: 1 };
3
3
  var $intern_9 = 4194303;
4
4
  var $intern_10 = 1048575;
@@ -2536,14 +2536,11 @@ var B_classLit = createForPrimitive("byte", "B");
2536
2536
  var J_classLit = createForPrimitive("long", "J");
2537
2537
  var C_classLit = createForPrimitive("char", "C");
2538
2538
  createForClass("com.google.gwt.user.client.rpc", "XsrfToken", null), createForInterface("java.util", "Map/Entry");
2539
- var initialize = function() {
2539
+ var initialize = () => {
2540
2540
  init_0(false);
2541
2541
  };
2542
- var solvePattern = function(s) {
2543
- return $solution(new Search(), s);
2544
- };
2542
+ var solvePattern = (s) => $solution(new Search(), s);
2545
2543
  export {
2546
2544
  initialize,
2547
2545
  solvePattern
2548
2546
  };
2549
- //# sourceMappingURL=search-dynamic-solve-3x3x3-B2L4IN34.js.map
@@ -1,15 +1,18 @@
1
- import "./chunk-NAPITA3L.js";
2
- import "./chunk-ZV7PYR2S.js";
1
+ import "./chunk-RDKH6CDA.js";
2
+ import "./chunk-NJ66FRKF.js";
3
3
  import {
4
4
  random333Scramble
5
- } from "./chunk-CAQY24I5.js";
6
- import "./chunk-7GUL3OBQ.js";
7
- import "./chunk-XAOXLHYH.js";
8
- import "./chunk-JL5REGXZ.js";
9
- import "./chunk-L6OQRJJX.js";
5
+ } from "./chunk-QOLD6GH2.js";
6
+ import "./chunk-BHVTDDUY.js";
7
+ import "./chunk-6R47S6MP.js";
8
+ import "./chunk-IIJFVP3K.js";
9
+ import "./chunk-LBER75W4.js";
10
10
  import {
11
11
  Alg
12
- } from "./chunk-CFZLXDM6.js";
12
+ } from "./chunk-QZK3M7IM.js";
13
+
14
+ // src/cubing/vendor/mit/cs0x7f/cstimer/src/js/scramble/444-solver.ts
15
+ import { randomUIntBelow } from "random-uint-below";
13
16
 
14
17
  // src/cubing/vendor/mit/cs0x7f/cstimer/src/js/lib/mathlib.ts
15
18
  var Cnk = [];
@@ -64,7 +67,6 @@ function set8Perm(arr, idx, n, even) {
64
67
  }
65
68
 
66
69
  // src/cubing/vendor/mit/cs0x7f/cstimer/src/js/scramble/444-solver.ts
67
- import { randomUIntBelow } from "random-uint-below";
68
70
  function createArray(length1, length2) {
69
71
  const result = new Array(length1);
70
72
  if (length2 !== void 0) {
@@ -2308,9 +2310,7 @@ function $doSearch(this$static) {
2308
2310
  0
2309
2311
  )
2310
2312
  );
2311
- p1SolsArr.sort(function(a, b) {
2312
- return a.value - b.value;
2313
- });
2313
+ p1SolsArr.sort((a, b) => a.value - b.value);
2314
2314
  MAX_LENGTH2 = 9;
2315
2315
  do {
2316
2316
  OUT: for (length12 = p1SolsArr[0].value; length12 < 100; ++length12) {
@@ -2338,9 +2338,7 @@ function $doSearch(this$static) {
2338
2338
  }
2339
2339
  ++MAX_LENGTH2;
2340
2340
  } while (length12 === 100);
2341
- this$static.arr2.sort(function(a, b) {
2342
- return a.value - b.value;
2343
- });
2341
+ this$static.arr2.sort((a, b) => a.value - b.value);
2344
2342
  index = 0;
2345
2343
  MAX_LENGTH3 = 13;
2346
2344
  do {
@@ -2703,7 +2701,7 @@ function setClassLiteral(seedId, clazz) {
2703
2701
  if (seed) {
2704
2702
  proto = seed.prototype;
2705
2703
  } else {
2706
- seed = seedTable[seedId] = function() {
2704
+ seed = seedTable[seedId] = () => {
2707
2705
  };
2708
2706
  seed.___clazz$ = clazz;
2709
2707
  return;
@@ -2920,4 +2918,3 @@ export {
2920
2918
  initialize,
2921
2919
  random444Scramble
2922
2920
  };
2923
- //# sourceMappingURL=search-dynamic-solve-4x4x4-OLWUV6G6.js.map