cubing 0.20.2 → 0.21.0-pre12

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 (770) hide show
  1. package/README.md +6 -9
  2. package/dist/.DS_Store +0 -0
  3. package/dist/bin/puzzle-geometry-bin.js +1124 -1128
  4. package/dist/bin/puzzle-geometry-bin.js.map +3 -3
  5. package/dist/bundle-global/cubing.bundle-global.js +3978 -3587
  6. package/dist/esm/.DS_Store +0 -0
  7. package/dist/esm/{2x2x2.kpuzzle.json_-ZLJSYD5K.js → 2x2x2.kpuzzle.json-JOGUSQ4N.js} +3 -3
  8. package/dist/esm/{2x2x2.kpuzzle.json_-ZLJSYD5K.js.map → 2x2x2.kpuzzle.json-JOGUSQ4N.js.map} +1 -1
  9. package/dist/esm/{2x2x2.kpuzzle.svg-BNXPAM3A.js → 2x2x2.kpuzzle.svg-CQF2FTV7.js} +2 -2
  10. package/dist/esm/{2x2x2.kpuzzle.svg-BNXPAM3A.js.map → 2x2x2.kpuzzle.svg-CQF2FTV7.js.map} +0 -0
  11. package/dist/esm/3d-JZD3V366.js +39 -0
  12. package/dist/esm/3d-JZD3V366.js.map +7 -0
  13. package/dist/esm/{3x3x3-ll.kpuzzle.svg-EC42JHOH.js → 3x3x3-ll.kpuzzle.svg-53CBPG5O.js} +2 -2
  14. package/dist/esm/{3x3x3-ll.kpuzzle.svg-EC42JHOH.js.map → 3x3x3-ll.kpuzzle.svg-53CBPG5O.js.map} +0 -0
  15. package/dist/esm/{3x3x3.kpuzzle.svg-DUKG2WHC.js → 3x3x3.kpuzzle.svg-ERSSH66P.js} +2 -2
  16. package/dist/esm/{3x3x3.kpuzzle.svg-DUKG2WHC.js.map → 3x3x3.kpuzzle.svg-ERSSH66P.js.map} +0 -0
  17. package/dist/esm/alg/index.js +2 -2
  18. package/dist/esm/bluetooth/index.js +13 -11
  19. package/dist/esm/bluetooth/index.js.map +2 -2
  20. package/dist/esm/chunk-5DN4DAAX.js +2512 -0
  21. package/dist/esm/chunk-5DN4DAAX.js.map +7 -0
  22. package/dist/esm/{chunk-KKSDHNLH.js → chunk-7GADUDIG.js} +49 -71
  23. package/dist/esm/chunk-7GADUDIG.js.map +7 -0
  24. package/dist/esm/{chunk-YNB7QLBF.js → chunk-BU5PUJK3.js} +9 -10
  25. package/dist/esm/chunk-BU5PUJK3.js.map +7 -0
  26. package/dist/esm/chunk-CQS6JZ7G.js +762 -0
  27. package/dist/esm/chunk-CQS6JZ7G.js.map +7 -0
  28. package/dist/esm/{chunk-2GRKPQQL.js → chunk-RE7MIN5R.js} +2 -2
  29. package/dist/esm/{chunk-2GRKPQQL.js.map → chunk-RE7MIN5R.js.map} +0 -0
  30. package/dist/esm/{chunk-WJ7AVUI7.js → chunk-WO2AXYFE.js} +12 -1
  31. package/dist/esm/{chunk-WJ7AVUI7.js.map → chunk-WO2AXYFE.js.map} +0 -0
  32. package/dist/esm/{chunk-CWVB5RRW.js → chunk-YV3RT5PX.js} +625 -1282
  33. package/dist/esm/chunk-YV3RT5PX.js.map +7 -0
  34. package/dist/esm/{clock.kpuzzle.json_-PXORG6YF.js → clock.kpuzzle.json-EKWRMHJM.js} +3 -3
  35. package/dist/esm/{clock.kpuzzle.json_-PXORG6YF.js.map → clock.kpuzzle.json-EKWRMHJM.js.map} +1 -1
  36. package/dist/esm/{clock.kpuzzle.svg-E52B5OQV.js → clock.kpuzzle.svg-B7TMN3SY.js} +2 -2
  37. package/dist/esm/{clock.kpuzzle.svg-E52B5OQV.js.map → clock.kpuzzle.svg-B7TMN3SY.js.map} +0 -0
  38. package/dist/esm/esm-test-worker.js +2 -2
  39. package/dist/esm/esm-test-worker.js.map +1 -1
  40. package/dist/esm/kpuzzle/index.js +5 -3
  41. package/dist/esm/{node-SIGYKAZG.js → node-BSAQKO3G.js} +2 -2
  42. package/dist/esm/{node-SIGYKAZG.js.map → node-BSAQKO3G.js.map} +0 -0
  43. package/dist/esm/{node-BHGOVUN3.js → node-WEHVBEKP.js} +2 -2
  44. package/dist/esm/{node-BHGOVUN3.js.map → node-WEHVBEKP.js.map} +0 -0
  45. package/dist/esm/notation/index.js +3 -3
  46. package/dist/esm/protocol/index.js +3 -3
  47. package/dist/esm/puzzle-geometry/index.js +1085 -1179
  48. package/dist/esm/puzzle-geometry/index.js.map +3 -3
  49. package/dist/esm/puzzles/index.js +10 -4
  50. package/dist/esm/{pyraminx.kpuzzle.svg-QKUJX37T.js → pyraminx.kpuzzle.svg-QBBMZVDY.js} +2 -2
  51. package/dist/esm/{pyraminx.kpuzzle.svg-QKUJX37T.js.map → pyraminx.kpuzzle.svg-QBBMZVDY.js.map} +0 -0
  52. package/dist/esm/scramble/index.js +5 -4
  53. package/dist/esm/search/index.js +7 -4
  54. package/dist/esm/{sq1-hyperorbit.kpuzzle.json_-7KW5LSXC.js → sq1-hyperorbit.kpuzzle.json-N3FGCPML.js} +3 -3
  55. package/dist/esm/{sq1-hyperorbit.kpuzzle.json_-7KW5LSXC.js.map → sq1-hyperorbit.kpuzzle.json-N3FGCPML.js.map} +1 -1
  56. package/dist/esm/{sq1-hyperorbit.kpuzzle.svg-7Y7N37NN.js → sq1-hyperorbit.kpuzzle.svg-ID57EER7.js} +2 -2
  57. package/dist/esm/{sq1-hyperorbit.kpuzzle.svg-7Y7N37NN.js.map → sq1-hyperorbit.kpuzzle.svg-ID57EER7.js.map} +0 -0
  58. package/dist/esm/stream/index.js +3 -3
  59. package/dist/esm/stream/index.js.map +2 -2
  60. package/dist/esm/twisty/index.js +4442 -3214
  61. package/dist/esm/twisty/index.js.map +3 -3
  62. package/dist/esm/worker-inside-generated-string-KDZOUGJF.js +2831 -0
  63. package/dist/esm/worker-inside-generated-string-KDZOUGJF.js.map +7 -0
  64. package/dist/types/alg/Alg.d.ts +88 -0
  65. package/dist/types/alg/Alg.d.ts.map +1 -1
  66. package/dist/types/alg/Alg.spec.d.ts +2 -0
  67. package/dist/types/alg/Alg.spec.d.ts.map +1 -0
  68. package/dist/types/alg/common.d.ts.map +1 -1
  69. package/dist/types/alg/operation.spec.d.ts +2 -0
  70. package/dist/types/alg/operation.spec.d.ts.map +1 -0
  71. package/dist/types/alg/parse.spec.d.ts +2 -0
  72. package/dist/types/alg/parse.spec.d.ts.map +1 -0
  73. package/dist/types/alg/test/alg-comparison.d.ts.map +1 -1
  74. package/dist/types/alg/test/alg.spec.d.ts +2 -0
  75. package/dist/types/alg/test/alg.spec.d.ts.map +1 -0
  76. package/dist/types/alg/units/leaves/LineComment.spec.d.ts +2 -0
  77. package/dist/types/alg/units/leaves/LineComment.spec.d.ts.map +1 -0
  78. package/dist/types/alg/units/leaves/Move.spec.d.ts +2 -0
  79. package/dist/types/alg/units/leaves/Move.spec.d.ts.map +1 -0
  80. package/dist/types/alg/url.spec.d.ts +2 -0
  81. package/dist/types/alg/url.spec.d.ts.map +1 -0
  82. package/dist/types/bluetooth/smart-puzzle/bluetooth-puzzle.d.ts +1 -1
  83. package/dist/types/bluetooth/smart-puzzle/bluetooth-puzzle.d.ts.map +1 -1
  84. package/dist/types/bluetooth/smart-puzzle/giiker.spec.d.ts +5 -0
  85. package/dist/types/bluetooth/smart-puzzle/giiker.spec.d.ts.map +1 -0
  86. package/dist/types/kpuzzle/3x3x3/3x3x3.kpuzzle.json.d.ts +3 -0
  87. package/dist/types/kpuzzle/3x3x3/3x3x3.kpuzzle.json.d.ts.map +1 -0
  88. package/dist/types/kpuzzle/3x3x3/3x3x3.kpuzzle.json.spec.d.ts +2 -0
  89. package/dist/types/kpuzzle/3x3x3/3x3x3.kpuzzle.json.spec.d.ts.map +1 -0
  90. package/dist/types/kpuzzle/canon.spec.d.ts +2 -0
  91. package/dist/types/kpuzzle/canon.spec.d.ts.map +1 -0
  92. package/dist/types/kpuzzle/index.d.ts +1 -0
  93. package/dist/types/kpuzzle/index.d.ts.map +1 -1
  94. package/dist/types/kpuzzle/kpuzzle.spec.d.ts +2 -0
  95. package/dist/types/kpuzzle/kpuzzle.spec.d.ts.map +1 -0
  96. package/dist/types/kpuzzle/prunetable.spec.d.ts +2 -0
  97. package/dist/types/kpuzzle/prunetable.spec.d.ts.map +1 -0
  98. package/dist/types/kpuzzle/svg.d.ts.map +1 -1
  99. package/dist/types/kpuzzle/transformations.spec.d.ts +2 -0
  100. package/dist/types/kpuzzle/transformations.spec.d.ts.map +1 -0
  101. package/dist/types/protocol/binary/binary3x3x3.spec.d.ts +2 -0
  102. package/dist/types/protocol/binary/binary3x3x3.spec.d.ts.map +1 -0
  103. package/dist/types/protocol/binary/hex.spec.d.ts +2 -0
  104. package/dist/types/protocol/binary/hex.spec.d.ts.map +1 -0
  105. package/dist/types/protocol/binary/orbit-indexing.spec.d.ts +2 -0
  106. package/dist/types/protocol/binary/orbit-indexing.spec.d.ts.map +1 -0
  107. package/dist/types/puzzle-geometry/Options.d.ts +45 -1
  108. package/dist/types/puzzle-geometry/Options.d.ts.map +1 -1
  109. package/dist/types/puzzle-geometry/PGPuzzles.spec.d.ts +2 -0
  110. package/dist/types/puzzle-geometry/PGPuzzles.spec.d.ts.map +1 -0
  111. package/dist/types/puzzle-geometry/PermOriSet.d.ts +39 -39
  112. package/dist/types/puzzle-geometry/PermOriSet.d.ts.map +1 -1
  113. package/dist/types/puzzle-geometry/PuzzleGeometry.d.ts +118 -110
  114. package/dist/types/puzzle-geometry/PuzzleGeometry.d.ts.map +1 -1
  115. package/dist/types/puzzle-geometry/Quat.d.ts +0 -11
  116. package/dist/types/puzzle-geometry/Quat.d.ts.map +1 -1
  117. package/dist/types/puzzle-geometry/Quat.spec.d.ts +2 -0
  118. package/dist/types/puzzle-geometry/Quat.spec.d.ts.map +1 -0
  119. package/dist/types/puzzle-geometry/SchreierSims.d.ts.map +1 -1
  120. package/dist/types/puzzle-geometry/index.d.ts +2 -4
  121. package/dist/types/puzzle-geometry/index.d.ts.map +1 -1
  122. package/dist/types/puzzle-geometry/interfaces.d.ts +1 -21
  123. package/dist/types/puzzle-geometry/interfaces.d.ts.map +1 -1
  124. package/dist/types/puzzle-geometry/orientcenters.spec.d.ts +2 -0
  125. package/dist/types/puzzle-geometry/orientcenters.spec.d.ts.map +1 -0
  126. package/dist/types/puzzles/async/async-pg3d.d.ts.map +1 -1
  127. package/dist/types/puzzles/customPGPuzzleLoader.d.ts +12 -0
  128. package/dist/types/puzzles/customPGPuzzleLoader.d.ts.map +1 -0
  129. package/dist/types/puzzles/implementations/2x2x2/{2x2x2.kpuzzle.json_.d.ts → 2x2x2.kpuzzle.json.d.ts} +1 -1
  130. package/dist/types/puzzles/implementations/2x2x2/2x2x2.kpuzzle.json.d.ts.map +1 -0
  131. package/dist/types/puzzles/implementations/3x3x3/index.d.ts.map +1 -1
  132. package/dist/types/puzzles/implementations/clock/{clock.kpuzzle.json_.d.ts → clock.kpuzzle.json.d.ts} +1 -1
  133. package/dist/types/puzzles/implementations/clock/clock.kpuzzle.json.d.ts.map +1 -0
  134. package/dist/types/puzzles/implementations/fto/index.d.ts +2 -2
  135. package/dist/types/puzzles/implementations/fto/index.d.ts.map +1 -1
  136. package/dist/types/puzzles/implementations/pyraminx/{pyraminx.kpuzzle.json_.d.ts → pyraminx.kpuzzle.json.d.ts} +1 -1
  137. package/dist/types/puzzles/implementations/pyraminx/pyraminx.kpuzzle.json.d.ts.map +1 -0
  138. package/dist/types/puzzles/implementations/square1/index.d.ts.map +1 -1
  139. package/dist/types/puzzles/implementations/square1/{sq1-hyperorbit.kpuzzle.json_.d.ts → sq1-hyperorbit.kpuzzle.json.d.ts} +1 -1
  140. package/dist/types/puzzles/implementations/square1/sq1-hyperorbit.kpuzzle.json.d.ts.map +1 -0
  141. package/dist/types/puzzles/index.d.ts +4 -2
  142. package/dist/types/puzzles/index.d.ts.map +1 -1
  143. package/dist/types/puzzles/stickerings/appearance.d.ts +9 -9
  144. package/dist/types/puzzles/stickerings/appearance.d.ts.map +1 -1
  145. package/dist/types/puzzles/stickerings/cube-stickerings.d.ts.map +1 -1
  146. package/dist/types/puzzles/stickerings/fto-stickerings.d.ts.map +1 -1
  147. package/dist/types/puzzles/stickerings/global-custom-stickering-hack.d.ts +3 -0
  148. package/dist/types/puzzles/stickerings/global-custom-stickering-hack.d.ts.map +1 -0
  149. package/dist/types/search/index.d.ts +1 -1
  150. package/dist/types/search/index.d.ts.map +1 -1
  151. package/dist/types/search/inside/api.d.ts +2 -1
  152. package/dist/types/search/inside/api.d.ts.map +1 -1
  153. package/dist/types/search/inside/api.spec.d.ts +2 -0
  154. package/dist/types/search/inside/api.spec.d.ts.map +1 -0
  155. package/dist/types/search/inside/solve/parseSGS.d.ts.map +1 -1
  156. package/dist/types/search/inside/solve/puzzles/3x3x3/filter.d.ts.map +1 -1
  157. package/dist/types/search/inside/solve/puzzles/3x3x3/index.d.ts.map +1 -1
  158. package/dist/types/search/inside/solve/puzzles/megaminx.sgs.json.d.ts.map +1 -1
  159. package/dist/types/search/inside/solve/puzzles/sgs-defs.spec.d.ts +2 -0
  160. package/dist/types/search/inside/solve/puzzles/sgs-defs.spec.d.ts.map +1 -0
  161. package/dist/types/search/inside/solve/puzzles/skewb.sgs.json.d.ts.map +1 -1
  162. package/dist/types/search/inside/solve/tremble.d.ts.map +1 -1
  163. package/dist/types/search/inside/solve/vendor/cstimer/src/js/lib/mathlib.d.ts +4 -31
  164. package/dist/types/search/inside/solve/vendor/cstimer/src/js/lib/mathlib.d.ts.map +1 -1
  165. package/dist/types/search/inside/solve/vendor/cstimer/src/js/scramble/scramble_444.d.ts.map +1 -1
  166. package/dist/types/search/inside/solve/vendor/min2phase/gwt.d.ts +3 -0
  167. package/dist/types/search/inside/solve/vendor/min2phase/gwt.d.ts.map +1 -0
  168. package/dist/types/search/inside/solve/vendor/random-uint-below/get-random-values.d.ts.map +1 -1
  169. package/dist/types/search/inside/solve/vendor/random-uint-below/random-int.d.ts.map +1 -1
  170. package/dist/types/search/inside/solve/vendor/sq12phase/scramble_sq1.d.ts.map +1 -1
  171. package/dist/types/search/instantiator.d.ts.map +1 -1
  172. package/dist/types/search/outside.d.ts +4 -2
  173. package/dist/types/search/outside.d.ts.map +1 -1
  174. package/dist/types/search/worker-inside-generated-string.d.ts +1 -1
  175. package/dist/types/search/worker-inside-generated-string.d.ts.map +1 -1
  176. package/dist/types/stream/twizzle/TwizzleStream.d.ts +9 -8
  177. package/dist/types/stream/twizzle/TwizzleStream.d.ts.map +1 -1
  178. package/dist/types/stream/websocket-proxy.d.ts +1 -1
  179. package/dist/types/stream/websocket-proxy.d.ts.map +1 -1
  180. package/dist/types/twisty/controllers/TwistyAnimationController.d.ts +34 -0
  181. package/dist/types/twisty/controllers/TwistyAnimationController.d.ts.map +1 -0
  182. package/dist/types/twisty/controllers/TwistyPlayerController.d.ts +16 -0
  183. package/dist/types/twisty/controllers/TwistyPlayerController.d.ts.map +1 -0
  184. package/dist/types/twisty/heavy-code-imports/3d.d.ts +3 -0
  185. package/dist/types/twisty/heavy-code-imports/3d.d.ts.map +1 -0
  186. package/dist/types/twisty/heavy-code-imports/dynamic-entries/3d.d.ts +12 -0
  187. package/dist/types/twisty/heavy-code-imports/dynamic-entries/3d.d.ts.map +1 -0
  188. package/dist/types/twisty/index.d.ts +20 -15
  189. package/dist/types/twisty/index.d.ts.map +1 -1
  190. package/dist/types/twisty/model/PromiseFreshener.d.ts +14 -0
  191. package/dist/types/twisty/model/PromiseFreshener.d.ts.map +1 -0
  192. package/dist/types/twisty/model/TwistyPlayerModel.d.ts +84 -0
  193. package/dist/types/twisty/model/TwistyPlayerModel.d.ts.map +1 -0
  194. package/dist/types/twisty/model/UserVisibleErrorTracker.d.ts +11 -0
  195. package/dist/types/twisty/model/UserVisibleErrorTracker.d.ts.map +1 -0
  196. package/dist/types/twisty/model/helpers.d.ts +5 -0
  197. package/dist/types/twisty/model/helpers.d.ts.map +1 -0
  198. package/dist/types/twisty/model/props/TwistyProp.d.ts +60 -0
  199. package/dist/types/twisty/model/props/TwistyProp.d.ts.map +1 -0
  200. package/dist/types/twisty/model/props/TwistyProp.spec.d.ts +5 -0
  201. package/dist/types/twisty/model/props/TwistyProp.spec.d.ts.map +1 -0
  202. package/dist/types/twisty/model/props/TwistyPropDebugger.d.ts +28 -0
  203. package/dist/types/twisty/model/props/TwistyPropDebugger.d.ts.map +1 -0
  204. package/dist/types/twisty/model/props/general/URLProp.d.ts +6 -0
  205. package/dist/types/twisty/model/props/general/URLProp.d.ts.map +1 -0
  206. package/dist/types/twisty/model/props/puzzle/display/HintFaceletProp.d.ts +7 -0
  207. package/dist/types/twisty/model/props/puzzle/display/HintFaceletProp.d.ts.map +1 -0
  208. package/dist/types/twisty/model/props/puzzle/display/SpriteProp.d.ts +10 -0
  209. package/dist/types/twisty/model/props/puzzle/display/SpriteProp.d.ts.map +1 -0
  210. package/dist/types/twisty/model/props/puzzle/display/StickeringProp.d.ts +6 -0
  211. package/dist/types/twisty/model/props/puzzle/display/StickeringProp.d.ts.map +1 -0
  212. package/dist/types/twisty/model/props/puzzle/state/AlgProp.d.ts +27 -0
  213. package/dist/types/twisty/model/props/puzzle/state/AlgProp.d.ts.map +1 -0
  214. package/dist/types/twisty/model/props/puzzle/state/AlgTransformationProp.d.ts +14 -0
  215. package/dist/types/twisty/model/props/puzzle/state/AlgTransformationProp.d.ts.map +1 -0
  216. package/dist/types/twisty/model/props/puzzle/state/AnchoredStartProp.d.ts +15 -0
  217. package/dist/types/twisty/model/props/puzzle/state/AnchoredStartProp.d.ts.map +1 -0
  218. package/dist/types/twisty/model/props/puzzle/state/CurrentLeavesProp.d.ts +12 -0
  219. package/dist/types/twisty/model/props/puzzle/state/CurrentLeavesProp.d.ts.map +1 -0
  220. package/dist/types/twisty/model/props/puzzle/state/CurrentLeavesSimplified.d.ts +17 -0
  221. package/dist/types/twisty/model/props/puzzle/state/CurrentLeavesSimplified.d.ts.map +1 -0
  222. package/dist/types/twisty/model/props/puzzle/state/CurrentTransformationProp.d.ts +15 -0
  223. package/dist/types/twisty/model/props/puzzle/state/CurrentTransformationProp.d.ts.map +1 -0
  224. package/dist/types/twisty/model/props/puzzle/state/IndexerConstructorProp.d.ts +17 -0
  225. package/dist/types/twisty/model/props/puzzle/state/IndexerConstructorProp.d.ts.map +1 -0
  226. package/dist/types/twisty/model/props/puzzle/state/IndexerConstructorRequestProp.d.ts +12 -0
  227. package/dist/types/twisty/model/props/puzzle/state/IndexerConstructorRequestProp.d.ts.map +1 -0
  228. package/dist/types/twisty/model/props/puzzle/state/IndexerProp.d.ts +15 -0
  229. package/dist/types/twisty/model/props/puzzle/state/IndexerProp.d.ts.map +1 -0
  230. package/dist/types/twisty/model/props/puzzle/state/LegacyPositionProp.d.ts +12 -0
  231. package/dist/types/twisty/model/props/puzzle/state/LegacyPositionProp.d.ts.map +1 -0
  232. package/dist/types/twisty/model/props/puzzle/state/PuzzleAlgProp.d.ts +13 -0
  233. package/dist/types/twisty/model/props/puzzle/state/PuzzleAlgProp.d.ts.map +1 -0
  234. package/dist/types/twisty/model/props/puzzle/state/SetupAnchorProp.d.ts +6 -0
  235. package/dist/types/twisty/model/props/puzzle/state/SetupAnchorProp.d.ts.map +1 -0
  236. package/dist/types/twisty/model/props/puzzle/structure/PuzzleDefProp.d.ts +11 -0
  237. package/dist/types/twisty/model/props/puzzle/structure/PuzzleDefProp.d.ts.map +1 -0
  238. package/dist/types/twisty/model/props/puzzle/structure/PuzzleDescriptionProp.d.ts +6 -0
  239. package/dist/types/twisty/model/props/puzzle/structure/PuzzleDescriptionProp.d.ts.map +1 -0
  240. package/dist/types/twisty/model/props/puzzle/structure/PuzzleIDProp.d.ts +11 -0
  241. package/dist/types/twisty/model/props/puzzle/structure/PuzzleIDProp.d.ts.map +1 -0
  242. package/dist/types/twisty/model/props/puzzle/structure/PuzzleIDRequestProp.d.ts +6 -0
  243. package/dist/types/twisty/model/props/puzzle/structure/PuzzleIDRequestProp.d.ts.map +1 -0
  244. package/dist/types/twisty/model/props/puzzle/structure/PuzzleLoaderProp.d.ts +13 -0
  245. package/dist/types/twisty/model/props/puzzle/structure/PuzzleLoaderProp.d.ts.map +1 -0
  246. package/dist/types/twisty/model/props/timeline/CoarseTimelineInfoProp.d.ts +25 -0
  247. package/dist/types/twisty/model/props/timeline/CoarseTimelineInfoProp.d.ts.map +1 -0
  248. package/dist/types/twisty/model/props/timeline/DetailedTimelineInfoProp.d.ts +23 -0
  249. package/dist/types/twisty/model/props/timeline/DetailedTimelineInfoProp.d.ts.map +1 -0
  250. package/dist/types/twisty/model/props/timeline/PlayingInfoProp.d.ts +15 -0
  251. package/dist/types/twisty/model/props/timeline/PlayingInfoProp.d.ts.map +1 -0
  252. package/dist/types/twisty/model/props/timeline/TempoScaleProp.d.ts +6 -0
  253. package/dist/types/twisty/model/props/timeline/TempoScaleProp.d.ts.map +1 -0
  254. package/dist/types/twisty/model/props/timeline/TimestampRequestProp.d.ts +16 -0
  255. package/dist/types/twisty/model/props/timeline/TimestampRequestProp.d.ts.map +1 -0
  256. package/dist/types/twisty/model/props/viewer/BackViewProp.d.ts +7 -0
  257. package/dist/types/twisty/model/props/viewer/BackViewProp.d.ts.map +1 -0
  258. package/dist/types/twisty/model/props/viewer/BackgroundProp.d.ts +7 -0
  259. package/dist/types/twisty/model/props/viewer/BackgroundProp.d.ts.map +1 -0
  260. package/dist/types/twisty/model/props/viewer/ButtonAppearanceProp.d.ts +22 -0
  261. package/dist/types/twisty/model/props/viewer/ButtonAppearanceProp.d.ts.map +1 -0
  262. package/dist/types/twisty/model/props/viewer/ControlPanelProp.d.ts +7 -0
  263. package/dist/types/twisty/model/props/viewer/ControlPanelProp.d.ts.map +1 -0
  264. package/dist/types/twisty/model/props/viewer/LatitudeLimit.d.ts +6 -0
  265. package/dist/types/twisty/model/props/viewer/LatitudeLimit.d.ts.map +1 -0
  266. package/dist/types/twisty/model/props/viewer/OrbitCoordinatesProp.d.ts +16 -0
  267. package/dist/types/twisty/model/props/viewer/OrbitCoordinatesProp.d.ts.map +1 -0
  268. package/dist/types/twisty/model/props/viewer/OrbitCoordinatesRequestProp.d.ts +15 -0
  269. package/dist/types/twisty/model/props/viewer/OrbitCoordinatesRequestProp.d.ts.map +1 -0
  270. package/dist/types/twisty/model/props/viewer/TimeRangeProp.d.ts +11 -0
  271. package/dist/types/twisty/model/props/viewer/TimeRangeProp.d.ts.map +1 -0
  272. package/dist/types/twisty/model/props/viewer/ViewerLinkProp.d.ts +7 -0
  273. package/dist/types/twisty/model/props/viewer/ViewerLinkProp.d.ts.map +1 -0
  274. package/dist/types/twisty/model/props/viewer/VisualizationProp.d.ts +7 -0
  275. package/dist/types/twisty/model/props/viewer/VisualizationProp.d.ts.map +1 -0
  276. package/dist/types/twisty/model/props/viewer/VisualizationStrategyProp.d.ts +13 -0
  277. package/dist/types/twisty/model/props/viewer/VisualizationStrategyProp.d.ts.map +1 -0
  278. package/dist/types/twisty/{animation → old/animation}/RenderScheduler.d.ts +3 -0
  279. package/dist/types/twisty/old/animation/RenderScheduler.d.ts.map +1 -0
  280. package/dist/types/twisty/{animation → old/animation}/Timeline.d.ts +0 -0
  281. package/dist/types/twisty/old/animation/Timeline.d.ts.map +1 -0
  282. package/dist/types/twisty/{animation → old/animation}/cursor/AlgCursor.d.ts +4 -4
  283. package/dist/types/twisty/old/animation/cursor/AlgCursor.d.ts.map +1 -0
  284. package/dist/types/twisty/{animation → old/animation}/cursor/CursorTypes.d.ts +4 -4
  285. package/dist/types/twisty/old/animation/cursor/CursorTypes.d.ts.map +1 -0
  286. package/dist/types/twisty/{animation → old/animation}/easing.d.ts +0 -0
  287. package/dist/types/twisty/old/animation/easing.d.ts.map +1 -0
  288. package/dist/types/twisty/{animation → old/animation}/indexer/AlgDuration.d.ts +1 -1
  289. package/dist/types/twisty/old/animation/indexer/AlgDuration.d.ts.map +1 -0
  290. package/dist/types/twisty/old/animation/indexer/AlgIndexer.d.ts +36 -0
  291. package/dist/types/twisty/old/animation/indexer/AlgIndexer.d.ts.map +1 -0
  292. package/dist/types/twisty/{animation → old/animation}/indexer/SimpleAlgIndexer.d.ts +3 -3
  293. package/dist/types/twisty/old/animation/indexer/SimpleAlgIndexer.d.ts.map +1 -0
  294. package/dist/types/twisty/{animation → old/animation}/indexer/simultaneous-moves/SimultaneousMoveIndexer.d.ts +6 -5
  295. package/dist/types/twisty/old/animation/indexer/simultaneous-moves/SimultaneousMoveIndexer.d.ts.map +1 -0
  296. package/dist/types/twisty/old/animation/indexer/simultaneous-moves/SimultaneousMoveIndexerV2.d.ts +22 -0
  297. package/dist/types/twisty/old/animation/indexer/simultaneous-moves/SimultaneousMoveIndexerV2.d.ts.map +1 -0
  298. package/dist/types/twisty/old/animation/indexer/simultaneous-moves/simul-moves.d.ts +26 -0
  299. package/dist/types/twisty/old/animation/indexer/simultaneous-moves/simul-moves.d.ts.map +1 -0
  300. package/dist/types/twisty/{animation → old/animation}/indexer/tree/AlgWalker.d.ts +2 -2
  301. package/dist/types/twisty/old/animation/indexer/tree/AlgWalker.d.ts.map +1 -0
  302. package/dist/types/twisty/{animation → old/animation}/indexer/tree/TreeAlgIndexer.d.ts +3 -3
  303. package/dist/types/twisty/old/animation/indexer/tree/TreeAlgIndexer.d.ts.map +1 -0
  304. package/dist/types/twisty/old/animation/indexer/tree/chunkAlgs.d.ts +3 -0
  305. package/dist/types/twisty/old/animation/indexer/tree/chunkAlgs.d.ts.map +1 -0
  306. package/dist/types/twisty/{animation → old/animation}/stream/timeline-move-calculation-draft.d.ts +1 -1
  307. package/dist/types/twisty/old/animation/stream/timeline-move-calculation-draft.d.ts.map +1 -0
  308. package/dist/types/twisty/{dom/TwistyAlgViewer.css_.d.ts → old/dom/TwistyAlgViewerV1.css.d.ts} +1 -1
  309. package/dist/types/twisty/old/dom/TwistyAlgViewerV1.css.d.ts.map +1 -0
  310. package/dist/types/twisty/old/dom/TwistyAlgViewerV1.d.ts +52 -0
  311. package/dist/types/twisty/old/dom/TwistyAlgViewerV1.d.ts.map +1 -0
  312. package/dist/types/twisty/{dom/TwistyPlayer.css_.d.ts → old/dom/TwistyPlayer.css.d.ts} +1 -1
  313. package/dist/types/twisty/old/dom/TwistyPlayer.css.d.ts.map +1 -0
  314. package/dist/types/twisty/{dom → old/dom}/TwistyPlayer.d.ts +8 -8
  315. package/dist/types/twisty/old/dom/TwistyPlayer.d.ts.map +1 -0
  316. package/dist/types/twisty/old/dom/TwistyPlayer.spec.d.ts +5 -0
  317. package/dist/types/twisty/old/dom/TwistyPlayer.spec.d.ts.map +1 -0
  318. package/dist/types/twisty/{dom → old/dom}/TwistyPlayerConfig.d.ts +10 -5
  319. package/dist/types/twisty/old/dom/TwistyPlayerConfig.d.ts.map +1 -0
  320. package/dist/types/twisty/old/dom/controls/TwistyControlElement.d.ts +2 -0
  321. package/dist/types/twisty/old/dom/controls/TwistyControlElement.d.ts.map +1 -0
  322. package/dist/types/twisty/{dom/controls/TwistyScrubber.css_.d.ts → old/dom/controls/TwistyScrubber.css.d.ts} +1 -1
  323. package/dist/types/twisty/old/dom/controls/TwistyScrubber.css.d.ts.map +1 -0
  324. package/dist/types/twisty/{dom → old/dom}/controls/TwistyScrubber.d.ts +1 -1
  325. package/dist/types/twisty/old/dom/controls/TwistyScrubber.d.ts.map +1 -0
  326. package/dist/types/twisty/{dom/controls/buttons.css_.d.ts → old/dom/controls/buttons.css.d.ts} +1 -1
  327. package/dist/types/twisty/old/dom/controls/buttons.css.d.ts.map +1 -0
  328. package/dist/types/twisty/{dom → old/dom}/controls/buttons.d.ts +1 -1
  329. package/dist/types/twisty/old/dom/controls/buttons.d.ts.map +1 -0
  330. package/dist/types/twisty/old/dom/controls/buttons.spec.d.ts +5 -0
  331. package/dist/types/twisty/old/dom/controls/buttons.spec.d.ts.map +1 -0
  332. package/dist/types/twisty/{dom → old/dom}/element/ClassListManager.d.ts +0 -0
  333. package/dist/types/twisty/old/dom/element/ClassListManager.d.ts.map +1 -0
  334. package/dist/types/twisty/{dom → old/dom}/element/ElementConfig.d.ts +1 -1
  335. package/dist/types/twisty/old/dom/element/ElementConfig.d.ts.map +1 -0
  336. package/dist/types/twisty/{dom → old/dom}/element/ManagedCustomElement.d.ts +0 -0
  337. package/dist/types/twisty/old/dom/element/ManagedCustomElement.d.ts.map +1 -0
  338. package/dist/types/twisty/{dom → old/dom}/element/node-custom-element-shims.d.ts +0 -0
  339. package/dist/types/twisty/old/dom/element/node-custom-element-shims.d.ts.map +1 -0
  340. package/dist/types/twisty/{dom/stream/TwistyStreamSource.css_.d.ts → old/dom/stream/TwistyStreamSource.css.d.ts} +1 -1
  341. package/dist/types/twisty/old/dom/stream/TwistyStreamSource.css.d.ts.map +1 -0
  342. package/dist/types/twisty/{dom → old/dom}/stream/TwistyStreamSource.d.ts +0 -0
  343. package/dist/types/twisty/old/dom/stream/TwistyStreamSource.d.ts.map +1 -0
  344. package/dist/types/twisty/{dom → old/dom}/viewers/Twisty2DSVG.d.ts +2 -2
  345. package/dist/types/twisty/old/dom/viewers/Twisty2DSVG.d.ts.map +1 -0
  346. package/dist/types/twisty/{dom/viewers/Twisty2DSVGView.css_.d.ts → old/dom/viewers/Twisty2DSVGView.css.d.ts} +1 -1
  347. package/dist/types/twisty/old/dom/viewers/Twisty2DSVGView.css.d.ts.map +1 -0
  348. package/dist/types/twisty/{dom/viewers/Twisty3DCanvas.css_.d.ts → old/dom/viewers/Twisty3DCanvas.css.d.ts} +1 -1
  349. package/dist/types/twisty/old/dom/viewers/Twisty3DCanvas.css.d.ts.map +1 -0
  350. package/dist/types/twisty/{dom → old/dom}/viewers/Twisty3DCanvas.d.ts +1 -2
  351. package/dist/types/twisty/old/dom/viewers/Twisty3DCanvas.d.ts.map +1 -0
  352. package/dist/types/twisty/{dom → old/dom}/viewers/TwistyOrbitControls.d.ts +0 -0
  353. package/dist/types/twisty/old/dom/viewers/TwistyOrbitControls.d.ts.map +1 -0
  354. package/dist/types/twisty/old/dom/viewers/TwistyViewerElement.d.ts +4 -0
  355. package/dist/types/twisty/old/dom/viewers/TwistyViewerElement.d.ts.map +1 -0
  356. package/dist/types/twisty/{dom/viewers/TwistyViewerWrapper.css_.d.ts → old/dom/viewers/TwistyViewerWrapper.css.d.ts} +1 -1
  357. package/dist/types/twisty/old/dom/viewers/TwistyViewerWrapper.css.d.ts.map +1 -0
  358. package/dist/types/twisty/{dom → old/dom}/viewers/TwistyViewerWrapper.d.ts +0 -0
  359. package/dist/types/twisty/old/dom/viewers/TwistyViewerWrapper.d.ts.map +1 -0
  360. package/dist/types/twisty/old/dom/viewers/canvas.d.ts +3 -0
  361. package/dist/types/twisty/old/dom/viewers/canvas.d.ts.map +1 -0
  362. package/dist/types/twisty/views/2D/Twisty2DPuzzle.d.ts +29 -0
  363. package/dist/types/twisty/views/2D/Twisty2DPuzzle.d.ts.map +1 -0
  364. package/dist/types/twisty/views/2D/Twisty2DPuzzleWrapper.d.ts +16 -0
  365. package/dist/types/twisty/views/2D/Twisty2DPuzzleWrapper.d.ts.map +1 -0
  366. package/dist/types/twisty/views/2D/Twisty2DSceneWrapper.d.ts +20 -0
  367. package/dist/types/twisty/views/2D/Twisty2DSceneWrapper.d.ts.map +1 -0
  368. package/dist/types/twisty/views/3D/RendererPool.d.ts +4 -0
  369. package/dist/types/twisty/views/3D/RendererPool.d.ts.map +1 -0
  370. package/dist/types/twisty/{3D → views/3D}/TAU.d.ts +0 -0
  371. package/dist/types/twisty/views/3D/TAU.d.ts.map +1 -0
  372. package/dist/types/twisty/views/3D/Twisty3DPuzzleWrapper.d.ts +17 -0
  373. package/dist/types/twisty/views/3D/Twisty3DPuzzleWrapper.d.ts.map +1 -0
  374. package/dist/types/twisty/{3D → views/3D}/Twisty3DRenderTarget.d.ts +0 -0
  375. package/dist/types/twisty/views/3D/Twisty3DRenderTarget.d.ts.map +1 -0
  376. package/dist/types/twisty/{3D → views/3D}/Twisty3DScene.d.ts +0 -0
  377. package/dist/types/twisty/views/3D/Twisty3DScene.d.ts.map +1 -0
  378. package/dist/types/twisty/views/3D/Twisty3DSceneWrapper.d.ts +28 -0
  379. package/dist/types/twisty/views/3D/Twisty3DSceneWrapper.d.ts.map +1 -0
  380. package/dist/types/twisty/views/3D/Twisty3DVantage.d.ts +32 -0
  381. package/dist/types/twisty/views/3D/Twisty3DVantage.d.ts.map +1 -0
  382. package/dist/types/twisty/views/3D/TwistyOrbitControlsV2.d.ts +41 -0
  383. package/dist/types/twisty/views/3D/TwistyOrbitControlsV2.d.ts.map +1 -0
  384. package/dist/types/twisty/views/3D/TwistyOrbitControlsV2.spec.d.ts +5 -0
  385. package/dist/types/twisty/views/3D/TwistyOrbitControlsV2.spec.d.ts.map +1 -0
  386. package/dist/types/twisty/{3D → views/3D}/puzzles/Cube3D.d.ts +11 -7
  387. package/dist/types/twisty/views/3D/puzzles/Cube3D.d.ts.map +1 -0
  388. package/dist/types/twisty/{3D → views/3D}/puzzles/KPuzzleWrapper.d.ts +2 -2
  389. package/dist/types/twisty/views/3D/puzzles/KPuzzleWrapper.d.ts.map +1 -0
  390. package/dist/types/twisty/views/3D/puzzles/PG3D.d.ts +57 -0
  391. package/dist/types/twisty/views/3D/puzzles/PG3D.d.ts.map +1 -0
  392. package/dist/types/twisty/{3D → views/3D}/puzzles/Twisty3DPuzzle.d.ts +1 -1
  393. package/dist/types/twisty/views/3D/puzzles/Twisty3DPuzzle.d.ts.map +1 -0
  394. package/dist/types/twisty/{3D → views/3D}/puzzles/TwistyTestBox.d.ts +2 -2
  395. package/dist/types/twisty/views/3D/puzzles/TwistyTestBox.d.ts.map +1 -0
  396. package/dist/types/twisty/views/TwistyAlgEditor/LeafTokens.d.ts +18 -0
  397. package/dist/types/twisty/views/TwistyAlgEditor/LeafTokens.d.ts.map +1 -0
  398. package/dist/types/twisty/views/TwistyAlgEditor/TwistyAlgEditor.css.d.ts +3 -0
  399. package/dist/types/twisty/views/TwistyAlgEditor/TwistyAlgEditor.css.d.ts.map +1 -0
  400. package/dist/types/twisty/views/TwistyAlgEditor/TwistyAlgEditor.d.ts +40 -0
  401. package/dist/types/twisty/views/TwistyAlgEditor/TwistyAlgEditor.d.ts.map +1 -0
  402. package/dist/types/twisty/views/TwistyAlgEditor/TwistyAlgEditor.spec.d.ts +5 -0
  403. package/dist/types/twisty/views/TwistyAlgEditor/TwistyAlgEditor.spec.d.ts.map +1 -0
  404. package/dist/types/twisty/views/TwistyAlgEditor/model.d.ts +61 -0
  405. package/dist/types/twisty/views/TwistyAlgEditor/model.d.ts.map +1 -0
  406. package/dist/types/twisty/views/TwistyAlgViewer.css.d.ts +3 -0
  407. package/dist/types/twisty/views/TwistyAlgViewer.css.d.ts.map +1 -0
  408. package/dist/types/twisty/{dom → views}/TwistyAlgViewer.d.ts +6 -6
  409. package/dist/types/twisty/views/TwistyAlgViewer.d.ts.map +1 -0
  410. package/dist/types/twisty/views/TwistyPlayer.d.ts +97 -0
  411. package/dist/types/twisty/views/TwistyPlayer.d.ts.map +1 -0
  412. package/dist/types/twisty/views/TwistyPlayerSettable.d.ts +71 -0
  413. package/dist/types/twisty/views/TwistyPlayerSettable.d.ts.map +1 -0
  414. package/dist/types/twisty/views/control-panel/TwistyButtonsV2.d.ts +33 -0
  415. package/dist/types/twisty/views/control-panel/TwistyButtonsV2.d.ts.map +1 -0
  416. package/dist/types/twisty/views/control-panel/TwistyScrubberV2.d.ts +14 -0
  417. package/dist/types/twisty/views/control-panel/TwistyScrubberV2.d.ts.map +1 -0
  418. package/dist/types/twisty/views/control-panel/webkit-fullscreen.d.ts +15 -0
  419. package/dist/types/twisty/views/control-panel/webkit-fullscreen.d.ts.map +1 -0
  420. package/dist/types/twisty/views/document.d.ts +2 -0
  421. package/dist/types/twisty/views/document.d.ts.map +1 -0
  422. package/dist/types/twisty/views/screenshot.d.ts +12 -0
  423. package/dist/types/twisty/views/screenshot.d.ts.map +1 -0
  424. package/dist/types/vendor/p-lazy/p-lazy.d.ts +10 -0
  425. package/dist/types/vendor/p-lazy/p-lazy.d.ts.map +1 -0
  426. package/dist/types/vendor/three/examples/jsm/libs/stats.modified.module.d.ts +33 -0
  427. package/dist/types/vendor/three/examples/jsm/libs/stats.modified.module.d.ts.map +1 -0
  428. package/docs/.DS_Store +0 -0
  429. package/docs/cubing/.DS_Store +0 -0
  430. package/docs/cubing/alg/index.html +37 -23
  431. package/docs/cubing/index.html +56 -252
  432. package/docs/cubing/scramble/index.html +122 -0
  433. package/docs/cubing/twisty/index.html +329 -0
  434. package/docs/main.css +15 -3
  435. package/package.json +83 -57
  436. package/src/cubing/.DS_Store +0 -0
  437. package/src/cubing/alg/.DS_Store +0 -0
  438. package/src/cubing/alg/Alg.ts +89 -0
  439. package/src/cubing/alg/common.ts +4 -2
  440. package/src/cubing/alg/iteration.ts +1 -1
  441. package/src/cubing/alg/parse.ts +2 -0
  442. package/src/cubing/alg/test/alg-comparison.ts +1 -0
  443. package/src/cubing/alg/units/.DS_Store +0 -0
  444. package/src/cubing/alg/units/Unit.ts +0 -3
  445. package/src/cubing/alg/units/containers/Commutator.ts +1 -1
  446. package/src/cubing/alg/units/leaves/Move.ts +4 -4
  447. package/src/cubing/bluetooth/.DS_Store +0 -0
  448. package/src/cubing/bluetooth/connect/index.ts +1 -1
  449. package/src/cubing/bluetooth/smart-puzzle/Heykube.ts +1 -1
  450. package/src/cubing/bluetooth/smart-puzzle/bluetooth-puzzle.ts +1 -1
  451. package/src/cubing/bluetooth/smart-puzzle/gan.ts +5 -5
  452. package/src/cubing/bluetooth/smart-puzzle/giiker.ts +2 -2
  453. package/src/cubing/bluetooth/smart-puzzle/gocube.ts +5 -5
  454. package/src/cubing/bluetooth/smart-robot/GanRobot.ts +5 -5
  455. package/src/cubing/bluetooth/smart-timer/GanTimer.ts +2 -2
  456. package/src/cubing/kpuzzle/.DS_Store +0 -0
  457. package/src/cubing/kpuzzle/3x3x3/3x3x3.kpuzzle.json.spec.ts +40 -0
  458. package/src/cubing/{puzzles/implementations/3x3x3/3x3x3.kpuzzle.json_.ts → kpuzzle/3x3x3/3x3x3.kpuzzle.json.ts} +11 -6
  459. package/src/cubing/kpuzzle/canon.spec.ts +6 -11
  460. package/src/cubing/kpuzzle/canonicalize.ts +1 -1
  461. package/src/cubing/kpuzzle/definition_types.ts +0 -3
  462. package/src/cubing/kpuzzle/index.ts +1 -0
  463. package/src/cubing/kpuzzle/prunetable.spec.ts +2 -4
  464. package/src/cubing/kpuzzle/puzzle-orientation.ts +1 -1
  465. package/src/cubing/kpuzzle/svg.ts +4 -9
  466. package/src/cubing/kpuzzle/transformations.ts +1 -1
  467. package/src/cubing/protocol/binary/binary3x3x3.spec.ts +5 -2
  468. package/src/cubing/protocol/binary/hex.ts +4 -4
  469. package/src/cubing/protocol/binary/orbit-indexing.ts +2 -2
  470. package/src/cubing/protocol/binary/puzzle-orientation.ts +2 -2
  471. package/src/cubing/puzzle-geometry/Options.ts +151 -22
  472. package/src/cubing/puzzle-geometry/PGPuzzles.spec.ts +24 -28
  473. package/src/cubing/puzzle-geometry/PermOriSet.ts +99 -98
  474. package/src/cubing/puzzle-geometry/PlatonicGenerator.ts +1 -1
  475. package/src/cubing/puzzle-geometry/PuzzleGeometry.ts +836 -867
  476. package/src/cubing/puzzle-geometry/Quat.ts +1 -68
  477. package/src/cubing/puzzle-geometry/SchreierSims.ts +2 -13
  478. package/src/cubing/puzzle-geometry/index.ts +2 -11
  479. package/src/cubing/puzzle-geometry/interfaces.ts +1 -27
  480. package/src/cubing/puzzle-geometry/orientcenters.spec.ts +24 -30
  481. package/src/cubing/puzzles/.DS_Store +0 -0
  482. package/src/cubing/puzzles/PuzzleLoader.ts +1 -1
  483. package/src/cubing/puzzles/async/async-pg3d.ts +5 -8
  484. package/src/cubing/puzzles/customPGPuzzleLoader.ts +60 -0
  485. package/src/cubing/puzzles/implementations/.DS_Store +0 -0
  486. package/src/cubing/puzzles/implementations/2x2x2/{2x2x2.kpuzzle.json_.ts → 2x2x2.kpuzzle.json.ts} +0 -0
  487. package/src/cubing/puzzles/implementations/2x2x2/index.ts +1 -1
  488. package/src/cubing/puzzles/implementations/3x3x3/index.ts +2 -3
  489. package/src/cubing/puzzles/implementations/clock/{clock.kpuzzle.json_.ts → clock.kpuzzle.json.ts} +0 -0
  490. package/src/cubing/puzzles/implementations/clock/index.ts +1 -1
  491. package/src/cubing/puzzles/implementations/fto/index.ts +19 -11
  492. package/src/cubing/puzzles/implementations/pyraminx/{pyraminx.kpuzzle.json_.ts → pyraminx.kpuzzle.json.ts} +0 -0
  493. package/src/cubing/puzzles/implementations/square1/index.ts +1 -2
  494. package/src/cubing/puzzles/implementations/square1/{sq1-hyperorbit.kpuzzle.json_.ts → sq1-hyperorbit.kpuzzle.json.ts} +0 -0
  495. package/src/cubing/puzzles/index.ts +30 -20
  496. package/src/cubing/puzzles/stickerings/appearance.ts +10 -9
  497. package/src/cubing/puzzles/stickerings/cube-stickerings.ts +8 -0
  498. package/src/cubing/puzzles/stickerings/fto-stickerings.ts +9 -0
  499. package/src/cubing/puzzles/stickerings/global-custom-stickering-hack.ts +61 -0
  500. package/src/cubing/search/.DS_Store +0 -0
  501. package/src/cubing/search/.gitignore +1 -2
  502. package/src/cubing/search/esm-test-worker.js +1 -1
  503. package/src/cubing/search/index.ts +1 -0
  504. package/src/cubing/search/inside/api.spec.ts +1 -0
  505. package/src/cubing/search/inside/api.ts +6 -1
  506. package/src/cubing/search/inside/solve/parseSGS.ts +7 -11
  507. package/src/cubing/search/inside/solve/puzzles/2x2x2.ts +3 -3
  508. package/src/cubing/search/inside/solve/puzzles/3x3x3/filter.ts +0 -6
  509. package/src/cubing/search/inside/solve/puzzles/3x3x3/index.ts +0 -2
  510. package/src/cubing/search/inside/solve/puzzles/FTO.sgs +264 -0
  511. package/src/cubing/search/inside/solve/puzzles/megaminx.sgs.json.ts +4 -6
  512. package/src/cubing/search/inside/solve/puzzles/skewb.sgs.json.ts +4 -6
  513. package/src/cubing/search/inside/solve/tremble.ts +6 -9
  514. package/src/cubing/search/inside/solve/vendor/cstimer/src/js/lib/mathlib.ts +20 -822
  515. package/src/cubing/search/inside/solve/vendor/cstimer/src/js/scramble/scramble_444.ts +177 -252
  516. package/src/cubing/search/inside/solve/vendor/min2phase/gwt.js +62 -222
  517. package/src/cubing/search/inside/solve/vendor/random-uint-below/get-random-values.ts +4 -5
  518. package/src/cubing/search/inside/solve/vendor/random-uint-below/random-int.ts +9 -11
  519. package/src/cubing/search/inside/solve/vendor/sq12phase/scramble_sq1.js +13 -582
  520. package/src/cubing/search/instantiator.ts +11 -7
  521. package/src/cubing/search/outside.ts +8 -2
  522. package/src/cubing/search/worker-inside-generated-string.js +1 -1
  523. package/src/cubing/stream/.DS_Store +0 -0
  524. package/src/cubing/stream/process/ReorientedStream.ts +1 -1
  525. package/src/cubing/stream/twizzle/TwizzleStream.ts +11 -8
  526. package/src/cubing/stream/websocket-proxy.ts +1 -3
  527. package/src/cubing/twisty/.DS_Store +0 -0
  528. package/src/cubing/twisty/controllers/TwistyAnimationController.ts +248 -0
  529. package/src/cubing/twisty/controllers/TwistyPlayerController.ts +38 -0
  530. package/src/cubing/twisty/heavy-code-imports/3d.ts +18 -0
  531. package/src/cubing/twisty/heavy-code-imports/dynamic-entries/3d.ts +41 -0
  532. package/src/cubing/twisty/index.ts +24 -17
  533. package/src/cubing/twisty/model/.DS_Store +0 -0
  534. package/src/cubing/twisty/model/PromiseFreshener.ts +49 -0
  535. package/src/cubing/twisty/model/TwistyPlayerModel.ts +222 -0
  536. package/src/cubing/twisty/model/UserVisibleErrorTracker.ts +22 -0
  537. package/src/cubing/twisty/model/helpers.ts +47 -0
  538. package/src/cubing/{search/vendor → twisty/model/props}/.DS_Store +0 -0
  539. package/src/cubing/twisty/model/props/TwistyProp.spec.ts +38 -0
  540. package/src/cubing/twisty/model/props/TwistyProp.ts +366 -0
  541. package/src/cubing/twisty/model/props/TwistyPropDebugger.ts +370 -0
  542. package/src/cubing/twisty/model/props/general/URLProp.ts +14 -0
  543. package/src/cubing/{solve → twisty/model/props/puzzle}/.DS_Store +0 -0
  544. package/src/cubing/twisty/model/props/puzzle/display/HintFaceletProp.ts +10 -0
  545. package/src/cubing/twisty/model/props/puzzle/display/SpriteProp.ts +43 -0
  546. package/src/cubing/twisty/model/props/puzzle/display/StickeringProp.ts +8 -0
  547. package/src/cubing/twisty/model/props/puzzle/state/AlgProp.ts +91 -0
  548. package/src/cubing/twisty/model/props/puzzle/state/AlgTransformationProp.ts +28 -0
  549. package/src/cubing/twisty/model/props/puzzle/state/AnchoredStartProp.ts +44 -0
  550. package/src/cubing/twisty/model/props/puzzle/state/CurrentLeavesProp.ts +91 -0
  551. package/src/cubing/twisty/model/props/puzzle/state/CurrentLeavesSimplified.ts +48 -0
  552. package/src/cubing/twisty/model/props/puzzle/state/CurrentTransformationProp.ts +46 -0
  553. package/src/cubing/twisty/model/props/puzzle/state/IndexerConstructorProp.ts +46 -0
  554. package/src/cubing/twisty/model/props/puzzle/state/IndexerConstructorRequestProp.ts +15 -0
  555. package/src/cubing/twisty/model/props/puzzle/state/IndexerProp.ts +24 -0
  556. package/src/cubing/twisty/model/props/puzzle/state/LegacyPositionProp.ts +22 -0
  557. package/src/cubing/twisty/model/props/puzzle/state/PuzzleAlgProp.ts +28 -0
  558. package/src/cubing/twisty/model/props/puzzle/state/SetupAnchorProp.ts +8 -0
  559. package/src/cubing/twisty/model/props/puzzle/structure/PuzzleDefProp.ts +14 -0
  560. package/src/cubing/twisty/model/props/puzzle/structure/PuzzleDescriptionProp.ts +14 -0
  561. package/src/cubing/twisty/model/props/puzzle/structure/PuzzleIDProp.ts +12 -0
  562. package/src/cubing/twisty/model/props/puzzle/structure/PuzzleIDRequestProp.ts +17 -0
  563. package/src/cubing/twisty/model/props/puzzle/structure/PuzzleLoaderProp.ts +38 -0
  564. package/src/cubing/twisty/model/props/timeline/CoarseTimelineInfoProp.ts +45 -0
  565. package/src/cubing/twisty/model/props/timeline/DetailedTimelineInfoProp.ts +76 -0
  566. package/src/cubing/twisty/model/props/timeline/PlayingInfoProp.ts +51 -0
  567. package/src/cubing/twisty/model/props/timeline/TempoScaleProp.ts +13 -0
  568. package/src/cubing/twisty/model/props/timeline/TimestampRequestProp.ts +38 -0
  569. package/src/cubing/twisty/model/props/viewer/BackViewProp.ts +10 -0
  570. package/src/cubing/twisty/model/props/viewer/BackgroundProp.ts +10 -0
  571. package/src/cubing/twisty/model/props/viewer/ButtonAppearanceProp.ts +86 -0
  572. package/src/cubing/twisty/model/props/viewer/ControlPanelProp.ts +10 -0
  573. package/src/cubing/twisty/model/props/viewer/LatitudeLimit.ts +11 -0
  574. package/src/cubing/twisty/model/props/viewer/OrbitCoordinatesProp.ts +56 -0
  575. package/src/cubing/twisty/model/props/viewer/OrbitCoordinatesRequestProp.ts +69 -0
  576. package/src/cubing/twisty/model/props/viewer/TimeRangeProp.ts +15 -0
  577. package/src/cubing/twisty/model/props/viewer/ViewerLinkProp.ts +10 -0
  578. package/src/cubing/twisty/model/props/viewer/VisualizationProp.ts +10 -0
  579. package/src/cubing/twisty/model/props/viewer/VisualizationStrategyProp.ts +45 -0
  580. package/src/cubing/twisty/old/.DS_Store +0 -0
  581. package/src/cubing/twisty/old/animation/.DS_Store +0 -0
  582. package/src/cubing/twisty/{animation → old/animation}/RenderScheduler.ts +5 -0
  583. package/src/cubing/twisty/{animation → old/animation}/Timeline.ts +0 -0
  584. package/src/cubing/twisty/{animation → old/animation}/cursor/AlgCursor.ts +15 -8
  585. package/src/cubing/twisty/{animation → old/animation}/cursor/CursorTypes.ts +4 -4
  586. package/src/cubing/twisty/{animation → old/animation}/easing.ts +0 -0
  587. package/src/cubing/{search/inside → twisty/old/animation/indexer}/.DS_Store +0 -0
  588. package/src/cubing/twisty/{animation → old/animation}/indexer/AlgDuration.ts +1 -1
  589. package/src/cubing/twisty/old/animation/indexer/AlgIndexer.ts +86 -0
  590. package/src/cubing/twisty/{animation → old/animation}/indexer/SimpleAlgIndexer.ts +9 -6
  591. package/src/cubing/twisty/old/animation/indexer/simultaneous-moves/SimultaneousMoveIndexer.ts +181 -0
  592. package/src/cubing/twisty/old/animation/indexer/simultaneous-moves/SimultaneousMoveIndexerV2.ts +243 -0
  593. package/src/cubing/twisty/{animation → old/animation}/indexer/simultaneous-moves/simul-moves.ts +46 -34
  594. package/src/cubing/twisty/{animation → old/animation}/indexer/tree/AlgWalker.ts +6 -3
  595. package/src/cubing/twisty/{animation → old/animation}/indexer/tree/TreeAlgIndexer.ts +8 -5
  596. package/src/cubing/twisty/{animation → old/animation}/indexer/tree/chunkAlgs.ts +2 -2
  597. package/src/cubing/twisty/{animation → old/animation}/stream/timeline-move-calculation-draft.spec.ts.TODO +0 -0
  598. package/src/cubing/twisty/{animation → old/animation}/stream/timeline-move-calculation-draft.ts +2 -2
  599. package/src/cubing/twisty/old/dom/.DS_Store +0 -0
  600. package/src/cubing/twisty/{dom/TwistyAlgViewer.css_.ts → old/dom/TwistyAlgViewerV1.css.ts} +0 -0
  601. package/src/cubing/twisty/{dom/TwistyAlgViewer.ts → old/dom/TwistyAlgViewerV1.ts} +43 -36
  602. package/src/cubing/twisty/{dom/TwistyPlayer.css_.ts → old/dom/TwistyPlayer.css.ts} +28 -1
  603. package/src/cubing/twisty/{dom → old/dom}/TwistyPlayer.spec.ts +5 -6
  604. package/src/cubing/twisty/{dom → old/dom}/TwistyPlayer.ts +36 -43
  605. package/src/cubing/twisty/{dom → old/dom}/TwistyPlayerConfig.ts +27 -10
  606. package/src/cubing/twisty/{dom/controls/TwistyControlElement.ts.ts → old/dom/controls/TwistyControlElement.ts} +0 -0
  607. package/src/cubing/twisty/{dom/controls/TwistyScrubber.css_.ts → old/dom/controls/TwistyScrubber.css.ts} +0 -0
  608. package/src/cubing/twisty/{dom → old/dom}/controls/TwistyScrubber.ts +3 -3
  609. package/src/cubing/twisty/{dom/controls/buttons.css_.ts → old/dom/controls/buttons.css.ts} +14 -1
  610. package/src/cubing/twisty/{dom → old/dom}/controls/buttons.spec.ts +1 -1
  611. package/src/cubing/twisty/{dom → old/dom}/controls/buttons.ts +15 -15
  612. package/src/cubing/twisty/{dom → old/dom}/element/ClassListManager.ts +0 -0
  613. package/src/cubing/twisty/{dom → old/dom}/element/ElementConfig.ts +1 -1
  614. package/src/cubing/twisty/{dom → old/dom}/element/ManagedCustomElement.ts +0 -0
  615. package/src/cubing/twisty/{dom → old/dom}/element/node-custom-element-shims.ts +0 -0
  616. package/src/cubing/twisty/{dom/stream/TwistyStreamSource.css_.ts → old/dom/stream/TwistyStreamSource.css.ts} +0 -0
  617. package/src/cubing/twisty/{dom → old/dom}/stream/TwistyStreamSource.ts +8 -8
  618. package/src/cubing/twisty/{dom → old/dom}/viewers/Twisty2DSVG.ts +7 -9
  619. package/src/cubing/twisty/{dom/viewers/Twisty2DSVGView.css_.ts → old/dom/viewers/Twisty2DSVGView.css.ts} +0 -0
  620. package/src/cubing/twisty/{dom/viewers/Twisty3DCanvas.css_.ts → old/dom/viewers/Twisty3DCanvas.css.ts} +0 -0
  621. package/src/cubing/twisty/{dom → old/dom}/viewers/Twisty3DCanvas.ts +5 -12
  622. package/src/cubing/twisty/{dom → old/dom}/viewers/TwistyOrbitControls.ts +53 -20
  623. package/src/cubing/twisty/{dom → old/dom}/viewers/TwistyViewerElement.ts +1 -1
  624. package/src/cubing/twisty/{dom/viewers/TwistyViewerWrapper.css_.ts → old/dom/viewers/TwistyViewerWrapper.css.ts} +0 -0
  625. package/src/cubing/twisty/{dom → old/dom}/viewers/TwistyViewerWrapper.ts +1 -1
  626. package/src/cubing/twisty/old/dom/viewers/canvas.ts +9 -0
  627. package/src/cubing/twisty/views/.DS_Store +0 -0
  628. package/src/cubing/twisty/views/2D/Twisty2DPuzzle.ts +150 -0
  629. package/src/cubing/twisty/views/2D/Twisty2DPuzzleWrapper.ts +52 -0
  630. package/src/cubing/twisty/views/2D/Twisty2DSceneWrapper.ts +77 -0
  631. package/src/cubing/twisty/views/3D/RendererPool.ts +53 -0
  632. package/src/cubing/twisty/{3D → views/3D}/TAU.ts +0 -0
  633. package/src/cubing/twisty/views/3D/Twisty3DPuzzleWrapper.ts +168 -0
  634. package/src/cubing/twisty/{3D → views/3D}/Twisty3DRenderTarget.ts +0 -0
  635. package/src/cubing/twisty/{3D → views/3D}/Twisty3DScene.ts +0 -0
  636. package/src/cubing/twisty/views/3D/Twisty3DSceneWrapper.ts +144 -0
  637. package/src/cubing/twisty/views/3D/Twisty3DVantage.ts +244 -0
  638. package/src/cubing/twisty/views/3D/TwistyOrbitControlsV2.spec.ts +209 -0
  639. package/src/cubing/twisty/views/3D/TwistyOrbitControlsV2.ts +270 -0
  640. package/src/cubing/twisty/{3D → views/3D}/puzzles/Cube3D.ts +36 -15
  641. package/src/cubing/twisty/{3D → views/3D}/puzzles/KPuzzleWrapper.ts +4 -5
  642. package/src/cubing/twisty/views/3D/puzzles/PG3D.ts +988 -0
  643. package/src/cubing/twisty/views/3D/puzzles/Twisty3DPuzzle.ts +6 -0
  644. package/src/cubing/twisty/{3D → views/3D}/puzzles/TwistyTestBox.ts +2 -2
  645. package/src/cubing/twisty/views/TwistyAlgEditor/LeafTokens.ts +116 -0
  646. package/src/cubing/twisty/{dom/TwistyAlgEditor.css_.ts → views/TwistyAlgEditor/TwistyAlgEditor.css.ts} +3 -1
  647. package/src/cubing/twisty/{dom → views/TwistyAlgEditor}/TwistyAlgEditor.spec.ts +7 -6
  648. package/src/cubing/twisty/views/TwistyAlgEditor/TwistyAlgEditor.ts +360 -0
  649. package/src/cubing/twisty/views/TwistyAlgEditor/model.ts +179 -0
  650. package/src/cubing/twisty/views/TwistyAlgViewer.css.ts +25 -0
  651. package/src/cubing/twisty/views/TwistyAlgViewer.ts +502 -0
  652. package/src/cubing/twisty/views/TwistyPlayer.ts +327 -0
  653. package/src/cubing/twisty/views/TwistyPlayerSettable.ts +111 -0
  654. package/src/cubing/twisty/views/control-panel/TwistyButtonsV2.ts +159 -0
  655. package/src/cubing/twisty/views/control-panel/TwistyScrubberV2.ts +145 -0
  656. package/src/cubing/twisty/views/control-panel/webkit-fullscreen.ts +44 -0
  657. package/src/cubing/twisty/views/document.ts +4 -0
  658. package/src/cubing/twisty/views/screenshot.ts +90 -0
  659. package/src/cubing/vendor/.DS_Store +0 -0
  660. package/src/cubing/vendor/p-lazy/license +9 -0
  661. package/src/cubing/vendor/p-lazy/p-lazy.ts +52 -0
  662. package/src/cubing/vendor/p-lazy/readme.md +54 -0
  663. package/src/cubing/vendor/three/examples/jsm/libs/stats.modified.module.ts +179 -0
  664. package/dist/esm/chunk-CWVB5RRW.js.map +0 -7
  665. package/dist/esm/chunk-KKSDHNLH.js.map +0 -7
  666. package/dist/esm/chunk-YNB7QLBF.js.map +0 -7
  667. package/dist/esm/worker-inside-generated-string-LT4NV55Q.js +0 -2826
  668. package/dist/esm/worker-inside-generated-string-LT4NV55Q.js.map +0 -7
  669. package/dist/types/puzzles/implementations/2x2x2/2x2x2.kpuzzle.json_.d.ts.map +0 -1
  670. package/dist/types/puzzles/implementations/3x3x3/3x3x3.kpuzzle.json_.d.ts +0 -3
  671. package/dist/types/puzzles/implementations/3x3x3/3x3x3.kpuzzle.json_.d.ts.map +0 -1
  672. package/dist/types/puzzles/implementations/clock/clock.kpuzzle.json_.d.ts.map +0 -1
  673. package/dist/types/puzzles/implementations/pyraminx/pyraminx.kpuzzle.json_.d.ts.map +0 -1
  674. package/dist/types/puzzles/implementations/square1/sq1-hyperorbit.kpuzzle.json_.d.ts.map +0 -1
  675. package/dist/types/search/inside/solve/vendor/cstimer/src/js/lgarron-additions-for-typescript/shim-lib.d.ts +0 -3
  676. package/dist/types/search/inside/solve/vendor/cstimer/src/js/lgarron-additions-for-typescript/shim-lib.d.ts.map +0 -1
  677. package/dist/types/twisty/3D/TAU.d.ts.map +0 -1
  678. package/dist/types/twisty/3D/Twisty3DRenderTarget.d.ts.map +0 -1
  679. package/dist/types/twisty/3D/Twisty3DScene.d.ts.map +0 -1
  680. package/dist/types/twisty/3D/puzzles/Cube3D.d.ts.map +0 -1
  681. package/dist/types/twisty/3D/puzzles/KPuzzleWrapper.d.ts.map +0 -1
  682. package/dist/types/twisty/3D/puzzles/PG3D.d.ts +0 -51
  683. package/dist/types/twisty/3D/puzzles/PG3D.d.ts.map +0 -1
  684. package/dist/types/twisty/3D/puzzles/Twisty3DPuzzle.d.ts.map +0 -1
  685. package/dist/types/twisty/3D/puzzles/TwistyTestBox.d.ts.map +0 -1
  686. package/dist/types/twisty/animation/RenderScheduler.d.ts.map +0 -1
  687. package/dist/types/twisty/animation/Timeline.d.ts.map +0 -1
  688. package/dist/types/twisty/animation/cursor/AlgCursor.d.ts.map +0 -1
  689. package/dist/types/twisty/animation/cursor/CursorTypes.d.ts.map +0 -1
  690. package/dist/types/twisty/animation/easing.d.ts.map +0 -1
  691. package/dist/types/twisty/animation/indexer/AlgDuration.d.ts.map +0 -1
  692. package/dist/types/twisty/animation/indexer/AlgIndexer.d.ts +0 -15
  693. package/dist/types/twisty/animation/indexer/AlgIndexer.d.ts.map +0 -1
  694. package/dist/types/twisty/animation/indexer/SimpleAlgIndexer.d.ts.map +0 -1
  695. package/dist/types/twisty/animation/indexer/simultaneous-moves/SimultaneousMoveIndexer.d.ts.map +0 -1
  696. package/dist/types/twisty/animation/indexer/simultaneous-moves/simul-moves.d.ts +0 -25
  697. package/dist/types/twisty/animation/indexer/simultaneous-moves/simul-moves.d.ts.map +0 -1
  698. package/dist/types/twisty/animation/indexer/tree/AlgWalker.d.ts.map +0 -1
  699. package/dist/types/twisty/animation/indexer/tree/TreeAlgIndexer.d.ts.map +0 -1
  700. package/dist/types/twisty/animation/indexer/tree/chunkAlgs.d.ts +0 -3
  701. package/dist/types/twisty/animation/indexer/tree/chunkAlgs.d.ts.map +0 -1
  702. package/dist/types/twisty/animation/stream/timeline-move-calculation-draft.d.ts.map +0 -1
  703. package/dist/types/twisty/dom/TwistyAlgEditor.css_.d.ts +0 -3
  704. package/dist/types/twisty/dom/TwistyAlgEditor.css_.d.ts.map +0 -1
  705. package/dist/types/twisty/dom/TwistyAlgEditor.d.ts +0 -27
  706. package/dist/types/twisty/dom/TwistyAlgEditor.d.ts.map +0 -1
  707. package/dist/types/twisty/dom/TwistyAlgEditorStartCharSearch.d.ts +0 -26
  708. package/dist/types/twisty/dom/TwistyAlgEditorStartCharSearch.d.ts.map +0 -1
  709. package/dist/types/twisty/dom/TwistyAlgViewer.css_.d.ts.map +0 -1
  710. package/dist/types/twisty/dom/TwistyAlgViewer.d.ts.map +0 -1
  711. package/dist/types/twisty/dom/TwistyPlayer.css_.d.ts.map +0 -1
  712. package/dist/types/twisty/dom/TwistyPlayer.d.ts.map +0 -1
  713. package/dist/types/twisty/dom/TwistyPlayerConfig.d.ts.map +0 -1
  714. package/dist/types/twisty/dom/controls/TwistyControlElement.ts.d.ts +0 -2
  715. package/dist/types/twisty/dom/controls/TwistyControlElement.ts.d.ts.map +0 -1
  716. package/dist/types/twisty/dom/controls/TwistyScrubber.css_.d.ts.map +0 -1
  717. package/dist/types/twisty/dom/controls/TwistyScrubber.d.ts.map +0 -1
  718. package/dist/types/twisty/dom/controls/buttons.css_.d.ts.map +0 -1
  719. package/dist/types/twisty/dom/controls/buttons.d.ts.map +0 -1
  720. package/dist/types/twisty/dom/element/ClassListManager.d.ts.map +0 -1
  721. package/dist/types/twisty/dom/element/ElementConfig.d.ts.map +0 -1
  722. package/dist/types/twisty/dom/element/ManagedCustomElement.d.ts.map +0 -1
  723. package/dist/types/twisty/dom/element/node-custom-element-shims.d.ts.map +0 -1
  724. package/dist/types/twisty/dom/stream/TwistyStreamSource.css_.d.ts.map +0 -1
  725. package/dist/types/twisty/dom/stream/TwistyStreamSource.d.ts.map +0 -1
  726. package/dist/types/twisty/dom/viewers/Twisty2DSVG.d.ts.map +0 -1
  727. package/dist/types/twisty/dom/viewers/Twisty2DSVGView.css_.d.ts.map +0 -1
  728. package/dist/types/twisty/dom/viewers/Twisty3DCanvas.css_.d.ts.map +0 -1
  729. package/dist/types/twisty/dom/viewers/Twisty3DCanvas.d.ts.map +0 -1
  730. package/dist/types/twisty/dom/viewers/TwistyOrbitControls.d.ts.map +0 -1
  731. package/dist/types/twisty/dom/viewers/TwistyViewerElement.d.ts +0 -4
  732. package/dist/types/twisty/dom/viewers/TwistyViewerElement.d.ts.map +0 -1
  733. package/dist/types/twisty/dom/viewers/TwistyViewerWrapper.css_.d.ts.map +0 -1
  734. package/dist/types/twisty/dom/viewers/TwistyViewerWrapper.d.ts.map +0 -1
  735. package/dist/types/twisty/dom/viewers/canvas.d.ts +0 -2
  736. package/dist/types/twisty/dom/viewers/canvas.d.ts.map +0 -1
  737. package/dist/types/vendor/three/examples/jsm/libs/stats.module.d.ts +0 -2
  738. package/dist/types/vendor/three/examples/jsm/libs/stats.module.d.ts.map +0 -1
  739. package/dist/types/vendor/three/examples/jsm/libs/stats.module.wrapped.d.ts +0 -21
  740. package/dist/types/vendor/three/examples/jsm/libs/stats.module.wrapped.d.ts.map +0 -1
  741. package/src/cubing/protocol/.DS_Store +0 -0
  742. package/src/cubing/puzzle-geometry/.DS_Store +0 -0
  743. package/src/cubing/search/inside/solve/.DS_Store +0 -0
  744. package/src/cubing/search/inside/solve/puzzles/.DS_Store +0 -0
  745. package/src/cubing/search/inside/solve/puzzles/3x3x3/.DS_Store +0 -0
  746. package/src/cubing/search/inside/solve/vendor/.DS_Store +0 -0
  747. package/src/cubing/search/inside/solve/vendor/cstimer/.DS_Store +0 -0
  748. package/src/cubing/search/inside/solve/vendor/cstimer/src/.DS_Store +0 -0
  749. package/src/cubing/search/inside/solve/vendor/cstimer/src/js/.DS_Store +0 -0
  750. package/src/cubing/search/inside/solve/vendor/cstimer/src/js/lgarron-additions-for-typescript/.DS_Store +0 -0
  751. package/src/cubing/search/inside/solve/vendor/cstimer/src/js/lgarron-additions-for-typescript/shim-lib.ts +0 -13
  752. package/src/cubing/search/inside/solve/vendor/cstimer/src/js/lib/.DS_Store +0 -0
  753. package/src/cubing/search/inside/solve/vendor/cstimer/src/js/scramble/.DS_Store +0 -0
  754. package/src/cubing/search/inside/solve/vendor/sgs/.DS_Store +0 -0
  755. package/src/cubing/search/inside/solve/vendor/sgs/src/.DS_Store +0 -0
  756. package/src/cubing/search/inside/solve/vendor/sgs/src/test/.DS_Store +0 -0
  757. package/src/cubing/search/vendor/comlink-everywhere/.DS_Store +0 -0
  758. package/src/cubing/twisty/3D/puzzles/PG3D.ts +0 -600
  759. package/src/cubing/twisty/3D/puzzles/Twisty3DPuzzle.ts +0 -9
  760. package/src/cubing/twisty/3D/puzzles/mkbhd.svg +0 -5
  761. package/src/cubing/twisty/animation/indexer/AlgIndexer.ts +0 -25
  762. package/src/cubing/twisty/animation/indexer/simultaneous-moves/SimultaneousMoveIndexer.ts +0 -168
  763. package/src/cubing/twisty/dom/TwistyAlgEditor.ts +0 -373
  764. package/src/cubing/twisty/dom/TwistyAlgEditorStartCharSearch.ts +0 -138
  765. package/src/cubing/twisty/dom/viewers/canvas.ts +0 -4
  766. package/src/cubing/twisty/views/3D/.DS_Store +0 -0
  767. package/src/cubing/vendor/three/.DS_Store +0 -0
  768. package/src/cubing/vendor/three/examples/jsm/libs/stats.module.ts +0 -2
  769. package/src/cubing/vendor/three/examples/jsm/libs/stats.module.wrapped.d.ts +0 -24
  770. package/src/cubing/vendor/three/examples/jsm/libs/stats.module.wrapped.js +0 -178
@@ -1,515 +1,237 @@
1
1
  import {
2
2
  Alg,
3
- Move,
4
- experimentalIs
5
- } from "./chunk-YNB7QLBF.js";
3
+ Move
4
+ } from "./chunk-BU5PUJK3.js";
6
5
 
7
- // src/cubing/puzzles/implementations/3x3x3/3x3x3.kpuzzle.json_.ts
8
- var cube3x3x3KPuzzle = {
9
- name: "3x3x3",
10
- orbits: {
11
- EDGES: { numPieces: 12, orientations: 2 },
12
- CORNERS: { numPieces: 8, orientations: 3 },
13
- CENTERS: { numPieces: 6, orientations: 4 }
14
- },
15
- startPieces: {
16
- EDGES: {
17
- permutation: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11],
18
- orientation: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
19
- },
20
- CORNERS: {
21
- permutation: [0, 1, 2, 3, 4, 5, 6, 7],
22
- orientation: [0, 0, 0, 0, 0, 0, 0, 0]
23
- },
24
- CENTERS: {
25
- permutation: [0, 1, 2, 3, 4, 5],
26
- orientation: [0, 0, 0, 0, 0, 0]
27
- }
28
- },
29
- moves: {
30
- U: {
31
- EDGES: {
32
- permutation: [1, 2, 3, 0, 4, 5, 6, 7, 8, 9, 10, 11],
33
- orientation: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
34
- },
35
- CORNERS: {
36
- permutation: [1, 2, 3, 0, 4, 5, 6, 7],
37
- orientation: [0, 0, 0, 0, 0, 0, 0, 0]
38
- },
39
- CENTERS: {
40
- permutation: [0, 1, 2, 3, 4, 5],
41
- orientation: [1, 0, 0, 0, 0, 0]
6
+ // src/cubing/protocol/binary/orbit-indexing.ts
7
+ function identityPermutation(numElems) {
8
+ const arr = new Array(numElems);
9
+ for (let i = 0; i < numElems; i++) {
10
+ arr[i] = i;
11
+ }
12
+ return arr;
13
+ }
14
+ function orientationsToMask(radix, orientations) {
15
+ let val = 0;
16
+ for (const orientation of orientations) {
17
+ val *= radix;
18
+ val += orientation;
19
+ }
20
+ return val;
21
+ }
22
+ function maskToOrientations(radix, numElems, mask) {
23
+ const arr = [];
24
+ while (mask > 0) {
25
+ arr.push(mask % radix);
26
+ mask = Math.floor(mask / radix);
27
+ }
28
+ return new Array(numElems - arr.length).fill(0).concat(arr.reverse());
29
+ }
30
+ function permutationToLex(permutation) {
31
+ const n = permutation.length;
32
+ let lexicographicIdx = 0;
33
+ for (let i = 0; i < n - 1; i++) {
34
+ lexicographicIdx = lexicographicIdx * (n - i);
35
+ for (let j = i + 1; j < n; j++) {
36
+ if (permutation[i] > permutation[j]) {
37
+ lexicographicIdx += 1;
42
38
  }
43
- },
44
- y: {
45
- EDGES: {
46
- permutation: [1, 2, 3, 0, 5, 6, 7, 4, 10, 8, 11, 9],
47
- orientation: [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1]
48
- },
49
- CORNERS: {
50
- permutation: [1, 2, 3, 0, 7, 4, 5, 6],
51
- orientation: [0, 0, 0, 0, 0, 0, 0, 0]
52
- },
53
- CENTERS: {
54
- permutation: [0, 2, 3, 4, 1, 5],
55
- orientation: [1, 0, 0, 0, 0, 3]
39
+ }
40
+ }
41
+ return lexicographicIdx;
42
+ }
43
+ function lexToPermutation(numPieces, lexicographicIdx) {
44
+ const permutation = new Array(numPieces);
45
+ permutation[numPieces - 1] = 0;
46
+ for (let i = numPieces - 2; i >= 0; i--) {
47
+ permutation[i] = lexicographicIdx % (numPieces - i);
48
+ lexicographicIdx = Math.floor(lexicographicIdx / (numPieces - i));
49
+ for (let j = i + 1; j < numPieces; j++) {
50
+ if (permutation[j] >= permutation[i]) {
51
+ permutation[j] = permutation[j] + 1;
56
52
  }
57
- },
58
- x: {
59
- EDGES: {
60
- permutation: [4, 8, 0, 9, 6, 10, 2, 11, 5, 7, 1, 3],
61
- orientation: [1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0]
62
- },
63
- CORNERS: {
64
- permutation: [4, 0, 3, 5, 7, 6, 2, 1],
65
- orientation: [2, 1, 2, 1, 1, 2, 1, 2]
66
- },
67
- CENTERS: {
68
- permutation: [2, 1, 5, 3, 0, 4],
69
- orientation: [0, 3, 0, 1, 2, 2]
53
+ }
54
+ }
55
+ return permutation;
56
+ }
57
+
58
+ // src/cubing/kpuzzle/transformations.ts
59
+ var lasto;
60
+ function isIdentity(omod, o) {
61
+ if (o === lasto) {
62
+ return true;
63
+ }
64
+ const perm = o.permutation;
65
+ const n = perm.length;
66
+ for (let idx = 0; idx < n; idx++) {
67
+ if (perm[idx] !== idx) {
68
+ return false;
69
+ }
70
+ }
71
+ if (omod > 1) {
72
+ const ori = o.orientation;
73
+ for (let idx = 0; idx < n; idx++) {
74
+ if (ori[idx] !== 0) {
75
+ return false;
70
76
  }
71
- },
72
- L: {
73
- EDGES: {
74
- permutation: [0, 1, 2, 11, 4, 5, 6, 9, 8, 3, 10, 7],
75
- orientation: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
76
- },
77
- CORNERS: {
78
- permutation: [0, 1, 6, 2, 4, 3, 5, 7],
79
- orientation: [0, 0, 2, 1, 0, 2, 1, 0]
80
- },
81
- CENTERS: {
82
- permutation: [0, 1, 2, 3, 4, 5],
83
- orientation: [0, 1, 0, 0, 0, 0]
77
+ }
78
+ }
79
+ lasto = o;
80
+ return true;
81
+ }
82
+ function combineTransformations(def, t1, t2) {
83
+ const newTrans = {};
84
+ for (const orbitName in def.orbits) {
85
+ const oDef = def.orbits[orbitName];
86
+ const o1 = t1[orbitName];
87
+ const o2 = t2[orbitName];
88
+ if (isIdentity(oDef.orientations, o2)) {
89
+ newTrans[orbitName] = o1;
90
+ } else if (isIdentity(oDef.orientations, o1)) {
91
+ newTrans[orbitName] = o2;
92
+ } else {
93
+ const newPerm = new Array(oDef.numPieces);
94
+ if (oDef.orientations === 1) {
95
+ for (let idx = 0; idx < oDef.numPieces; idx++) {
96
+ newPerm[idx] = o1.permutation[o2.permutation[idx]];
97
+ }
98
+ newTrans[orbitName] = {
99
+ permutation: newPerm,
100
+ orientation: o1.orientation
101
+ };
102
+ } else {
103
+ const newOri = new Array(oDef.numPieces);
104
+ for (let idx = 0; idx < oDef.numPieces; idx++) {
105
+ newOri[idx] = (o1.orientation[o2.permutation[idx]] + o2.orientation[idx]) % oDef.orientations;
106
+ newPerm[idx] = o1.permutation[o2.permutation[idx]];
107
+ }
108
+ newTrans[orbitName] = { permutation: newPerm, orientation: newOri };
84
109
  }
85
- },
86
- F: {
87
- EDGES: {
88
- permutation: [9, 1, 2, 3, 8, 5, 6, 7, 0, 4, 10, 11],
89
- orientation: [1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0]
90
- },
91
- CORNERS: {
92
- permutation: [3, 1, 2, 5, 0, 4, 6, 7],
93
- orientation: [1, 0, 0, 2, 2, 1, 0, 0]
94
- },
95
- CENTERS: {
96
- permutation: [0, 1, 2, 3, 4, 5],
97
- orientation: [0, 0, 1, 0, 0, 0]
110
+ }
111
+ }
112
+ return newTrans;
113
+ }
114
+ function multiplyTransformations(def, t, amount) {
115
+ if (amount < 0) {
116
+ return multiplyTransformations(def, invertTransformation(def, t), -amount);
117
+ }
118
+ if (amount === 0) {
119
+ return identityTransformation(def);
120
+ }
121
+ if (amount === 1) {
122
+ return t;
123
+ }
124
+ let halfish = t;
125
+ if (amount !== 2) {
126
+ halfish = multiplyTransformations(def, t, Math.floor(amount / 2));
127
+ }
128
+ const twiceHalfish = combineTransformations(def, halfish, halfish);
129
+ if (amount % 2 === 0) {
130
+ return twiceHalfish;
131
+ } else {
132
+ return combineTransformations(def, t, twiceHalfish);
133
+ }
134
+ }
135
+ function identityTransformation(definition) {
136
+ const transformation = {};
137
+ for (const orbitName in definition.orbits) {
138
+ const orbitDefinition = definition.orbits[orbitName];
139
+ if (!lasto || lasto.permutation.length !== orbitDefinition.numPieces) {
140
+ const newPermutation = new Array(orbitDefinition.numPieces);
141
+ const newOrientation = new Array(orbitDefinition.numPieces);
142
+ for (let i = 0; i < orbitDefinition.numPieces; i++) {
143
+ newPermutation[i] = i;
144
+ newOrientation[i] = 0;
98
145
  }
99
- },
100
- R: {
101
- EDGES: {
102
- permutation: [0, 8, 2, 3, 4, 10, 6, 7, 5, 9, 1, 11],
103
- orientation: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
104
- },
105
- CORNERS: {
106
- permutation: [4, 0, 2, 3, 7, 5, 6, 1],
107
- orientation: [2, 1, 0, 0, 1, 0, 0, 2]
108
- },
109
- CENTERS: {
110
- permutation: [0, 1, 2, 3, 4, 5],
111
- orientation: [0, 0, 0, 1, 0, 0]
146
+ const orbitTransformation = {
147
+ permutation: newPermutation,
148
+ orientation: newOrientation
149
+ };
150
+ lasto = orbitTransformation;
151
+ }
152
+ transformation[orbitName] = lasto;
153
+ }
154
+ return transformation;
155
+ }
156
+ function invertTransformation(def, t) {
157
+ const newTrans = {};
158
+ for (const orbitName in def.orbits) {
159
+ const oDef = def.orbits[orbitName];
160
+ const o = t[orbitName];
161
+ if (isIdentity(oDef.orientations, o)) {
162
+ newTrans[orbitName] = o;
163
+ } else if (oDef.orientations === 1) {
164
+ const newPerm = new Array(oDef.numPieces);
165
+ for (let idx = 0; idx < oDef.numPieces; idx++) {
166
+ newPerm[o.permutation[idx]] = idx;
112
167
  }
113
- },
114
- B: {
115
- EDGES: {
116
- permutation: [0, 1, 10, 3, 4, 5, 11, 7, 8, 9, 6, 2],
117
- orientation: [0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1]
118
- },
119
- CORNERS: {
120
- permutation: [0, 7, 1, 3, 4, 5, 2, 6],
121
- orientation: [0, 2, 1, 0, 0, 0, 2, 1]
122
- },
123
- CENTERS: {
124
- permutation: [0, 1, 2, 3, 4, 5],
125
- orientation: [0, 0, 0, 0, 1, 0]
126
- }
127
- },
128
- D: {
129
- EDGES: {
130
- permutation: [0, 1, 2, 3, 7, 4, 5, 6, 8, 9, 10, 11],
131
- orientation: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
132
- },
133
- CORNERS: {
134
- permutation: [0, 1, 2, 3, 5, 6, 7, 4],
135
- orientation: [0, 0, 0, 0, 0, 0, 0, 0]
136
- },
137
- CENTERS: {
138
- permutation: [0, 1, 2, 3, 4, 5],
139
- orientation: [0, 0, 0, 0, 0, 1]
140
- }
141
- },
142
- z: {
143
- EDGES: {
144
- permutation: [9, 3, 11, 7, 8, 1, 10, 5, 0, 4, 2, 6],
145
- orientation: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
146
- },
147
- CORNERS: {
148
- permutation: [3, 2, 6, 5, 0, 4, 7, 1],
149
- orientation: [1, 2, 1, 2, 2, 1, 2, 1]
150
- },
151
- CENTERS: {
152
- permutation: [1, 5, 2, 0, 4, 3],
153
- orientation: [1, 1, 1, 1, 3, 1]
154
- }
155
- },
156
- M: {
157
- EDGES: {
158
- permutation: [2, 1, 6, 3, 0, 5, 4, 7, 8, 9, 10, 11],
159
- orientation: [1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0]
160
- },
161
- CORNERS: {
162
- permutation: [0, 1, 2, 3, 4, 5, 6, 7],
163
- orientation: [0, 0, 0, 0, 0, 0, 0, 0]
164
- },
165
- CENTERS: {
166
- permutation: [4, 1, 0, 3, 5, 2],
167
- orientation: [2, 0, 0, 0, 2, 0]
168
- }
169
- },
170
- E: {
171
- EDGES: {
172
- permutation: [0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 8, 10],
173
- orientation: [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1]
174
- },
175
- CORNERS: {
176
- permutation: [0, 1, 2, 3, 4, 5, 6, 7],
177
- orientation: [0, 0, 0, 0, 0, 0, 0, 0]
178
- },
179
- CENTERS: {
180
- permutation: [0, 4, 1, 2, 3, 5],
181
- orientation: [0, 0, 0, 0, 0, 0]
182
- }
183
- },
184
- S: {
185
- EDGES: {
186
- permutation: [0, 3, 2, 7, 4, 1, 6, 5, 8, 9, 10, 11],
187
- orientation: [0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0]
188
- },
189
- CORNERS: {
190
- permutation: [0, 1, 2, 3, 4, 5, 6, 7],
191
- orientation: [0, 0, 0, 0, 0, 0, 0, 0]
192
- },
193
- CENTERS: {
194
- permutation: [1, 5, 2, 0, 4, 3],
195
- orientation: [1, 1, 0, 1, 0, 1]
196
- }
197
- },
198
- u: {
199
- EDGES: {
200
- permutation: [1, 2, 3, 0, 4, 5, 6, 7, 10, 8, 11, 9],
201
- orientation: [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1]
202
- },
203
- CORNERS: {
204
- permutation: [1, 2, 3, 0, 4, 5, 6, 7],
205
- orientation: [0, 0, 0, 0, 0, 0, 0, 0]
206
- },
207
- CENTERS: {
208
- permutation: [0, 2, 3, 4, 1, 5],
209
- orientation: [1, 0, 0, 0, 0, 0]
210
- }
211
- },
212
- l: {
213
- EDGES: {
214
- permutation: [2, 1, 6, 11, 0, 5, 4, 9, 8, 3, 10, 7],
215
- orientation: [1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0]
216
- },
217
- CORNERS: {
218
- permutation: [0, 1, 6, 2, 4, 3, 5, 7],
219
- orientation: [0, 0, 2, 1, 0, 2, 1, 0]
220
- },
221
- CENTERS: {
222
- permutation: [4, 1, 0, 3, 5, 2],
223
- orientation: [2, 1, 0, 0, 2, 0]
224
- }
225
- },
226
- f: {
227
- EDGES: {
228
- permutation: [9, 3, 2, 7, 8, 1, 6, 5, 0, 4, 10, 11],
229
- orientation: [1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0]
230
- },
231
- CORNERS: {
232
- permutation: [3, 1, 2, 5, 0, 4, 6, 7],
233
- orientation: [1, 0, 0, 2, 2, 1, 0, 0]
234
- },
235
- CENTERS: {
236
- permutation: [1, 5, 2, 0, 4, 3],
237
- orientation: [1, 1, 1, 1, 0, 1]
238
- }
239
- },
240
- r: {
241
- EDGES: {
242
- permutation: [4, 8, 0, 3, 6, 10, 2, 7, 5, 9, 1, 11],
243
- orientation: [1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0]
244
- },
245
- CORNERS: {
246
- permutation: [4, 0, 2, 3, 7, 5, 6, 1],
247
- orientation: [2, 1, 0, 0, 1, 0, 0, 2]
248
- },
249
- CENTERS: {
250
- permutation: [2, 1, 5, 3, 0, 4],
251
- orientation: [0, 0, 0, 1, 2, 2]
252
- }
253
- },
254
- b: {
255
- EDGES: {
256
- permutation: [8, 5, 2, 1, 9, 7, 6, 3, 4, 0, 10, 11],
257
- orientation: [1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0]
258
- },
259
- CORNERS: {
260
- permutation: [4, 1, 2, 0, 5, 3, 6, 7],
261
- orientation: [1, 0, 0, 2, 2, 1, 0, 0]
262
- },
263
- CENTERS: {
264
- permutation: [3, 0, 2, 5, 4, 1],
265
- orientation: [3, 3, 3, 3, 0, 3]
266
- }
267
- },
268
- d: {
269
- EDGES: {
270
- permutation: [0, 1, 2, 3, 7, 4, 5, 6, 9, 11, 8, 10],
271
- orientation: [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1]
272
- },
273
- CORNERS: {
274
- permutation: [0, 1, 2, 3, 5, 6, 7, 4],
275
- orientation: [0, 0, 0, 0, 0, 0, 0, 0]
276
- },
277
- CENTERS: {
278
- permutation: [0, 4, 1, 2, 3, 5],
279
- orientation: [0, 0, 0, 0, 0, 1]
168
+ newTrans[orbitName] = {
169
+ permutation: newPerm,
170
+ orientation: o.orientation
171
+ };
172
+ } else {
173
+ const newPerm = new Array(oDef.numPieces);
174
+ const newOri = new Array(oDef.numPieces);
175
+ for (let idx = 0; idx < oDef.numPieces; idx++) {
176
+ const fromIdx = o.permutation[idx];
177
+ newPerm[fromIdx] = idx;
178
+ newOri[fromIdx] = (oDef.orientations - o.orientation[idx] + oDef.orientations) % oDef.orientations;
280
179
  }
180
+ newTrans[orbitName] = { permutation: newPerm, orientation: newOri };
281
181
  }
282
182
  }
283
- };
284
- cube3x3x3KPuzzle.moves["Uw"] = cube3x3x3KPuzzle.moves["u"];
285
- cube3x3x3KPuzzle.moves["Lw"] = cube3x3x3KPuzzle.moves["l"];
286
- cube3x3x3KPuzzle.moves["Fw"] = cube3x3x3KPuzzle.moves["f"];
287
- cube3x3x3KPuzzle.moves["Rw"] = cube3x3x3KPuzzle.moves["r"];
288
- cube3x3x3KPuzzle.moves["Bw"] = cube3x3x3KPuzzle.moves["b"];
289
- cube3x3x3KPuzzle.moves["Dw"] = cube3x3x3KPuzzle.moves["d"];
290
- cube3x3x3KPuzzle.moves["Rv"] = cube3x3x3KPuzzle.moves["x"];
291
- cube3x3x3KPuzzle.moves["Uv"] = cube3x3x3KPuzzle.moves["y"];
292
- cube3x3x3KPuzzle.moves["Fv"] = cube3x3x3KPuzzle.moves["z"];
293
- cube3x3x3KPuzzle.moves["Lv"] = {
294
- EDGES: {
295
- permutation: [2, 10, 6, 11, 0, 8, 4, 9, 1, 3, 5, 7],
296
- orientation: [1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0]
297
- },
298
- CORNERS: {
299
- permutation: [1, 7, 6, 2, 0, 3, 5, 4],
300
- orientation: [2, 1, 2, 1, 1, 2, 1, 2]
301
- },
302
- CENTERS: {
303
- permutation: [4, 1, 0, 3, 5, 2],
304
- orientation: [2, 1, 0, 3, 2, 0]
305
- }
306
- };
307
- cube3x3x3KPuzzle.moves["Dv"] = {
308
- EDGES: {
309
- permutation: [3, 0, 1, 2, 7, 4, 5, 6, 9, 11, 8, 10],
310
- orientation: [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1]
311
- },
312
- CORNERS: {
313
- permutation: [3, 0, 1, 2, 5, 6, 7, 4],
314
- orientation: [0, 0, 0, 0, 0, 0, 0, 0]
315
- },
316
- CENTERS: {
317
- permutation: [0, 4, 1, 2, 3, 5],
318
- orientation: [3, 0, 0, 0, 0, 1]
319
- }
320
- };
321
- cube3x3x3KPuzzle.moves["Bv"] = {
322
- EDGES: {
323
- permutation: [8, 5, 10, 1, 9, 7, 11, 3, 4, 0, 6, 2],
324
- orientation: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
325
- },
326
- CORNERS: {
327
- permutation: [4, 7, 1, 0, 5, 3, 2, 6],
328
- orientation: [1, 2, 1, 2, 2, 1, 2, 1]
329
- },
330
- CENTERS: {
331
- permutation: [3, 0, 2, 5, 4, 1],
332
- orientation: [3, 3, 3, 3, 1, 3]
183
+ return newTrans;
184
+ }
185
+ function gcd(a, b) {
186
+ if (b) {
187
+ return gcd(b, a % b);
333
188
  }
334
- };
335
-
336
- // src/cubing/kpuzzle/transformations.ts
337
- var lasto;
338
- function isIdentity(omod, o2) {
339
- if (o2 === lasto) {
340
- return true;
189
+ return a;
190
+ }
191
+ function transformationOrder(def, t) {
192
+ let r = 1;
193
+ for (const orbitName in def.orbits) {
194
+ const oDef = def.orbits[orbitName];
195
+ const o = t[orbitName];
196
+ const d = new Array(oDef.numPieces);
197
+ for (let idx = 0; idx < oDef.numPieces; idx++) {
198
+ if (!d[idx]) {
199
+ let w = idx;
200
+ let om = 0;
201
+ let pm = 0;
202
+ for (; ; ) {
203
+ d[w] = true;
204
+ om = om + o.orientation[w];
205
+ pm = pm + 1;
206
+ w = o.permutation[w];
207
+ if (w === idx) {
208
+ break;
209
+ }
210
+ }
211
+ if (om !== 0) {
212
+ pm = pm * oDef.orientations / gcd(oDef.orientations, om);
213
+ }
214
+ r = r * pm / gcd(r, pm);
215
+ }
216
+ }
341
217
  }
342
- const perm = o2.permutation;
343
- const n = perm.length;
344
- for (let idx = 0; idx < n; idx++) {
345
- if (perm[idx] !== idx) {
218
+ return r;
219
+ }
220
+ function areOrbitTransformationsEquivalent(def, orbitName, t1, t2, options = {}) {
221
+ const oDef = def.orbits[orbitName];
222
+ const o1 = t1[orbitName];
223
+ const o2 = t2[orbitName];
224
+ for (let idx = 0; idx < oDef.numPieces; idx++) {
225
+ if (!options?.ignoreOrientation && o1.orientation[idx] !== o2.orientation[idx]) {
346
226
  return false;
347
227
  }
348
- }
349
- if (omod > 1) {
350
- const ori = o2.orientation;
351
- for (let idx = 0; idx < n; idx++) {
352
- if (ori[idx] !== 0) {
353
- return false;
354
- }
228
+ if (!options?.ignorePermutation && o1.permutation[idx] !== o2.permutation[idx]) {
229
+ return false;
355
230
  }
356
231
  }
357
- lasto = o2;
358
232
  return true;
359
233
  }
360
- function combineTransformations(def, t1, t2) {
361
- const newTrans = {};
362
- for (const orbitName in def.orbits) {
363
- const oDef = def.orbits[orbitName];
364
- const o1 = t1[orbitName];
365
- const o2 = t2[orbitName];
366
- if (isIdentity(oDef.orientations, o2)) {
367
- newTrans[orbitName] = o1;
368
- } else if (isIdentity(oDef.orientations, o1)) {
369
- newTrans[orbitName] = o2;
370
- } else {
371
- const newPerm = new Array(oDef.numPieces);
372
- if (oDef.orientations === 1) {
373
- for (let idx = 0; idx < oDef.numPieces; idx++) {
374
- newPerm[idx] = o1.permutation[o2.permutation[idx]];
375
- }
376
- newTrans[orbitName] = {
377
- permutation: newPerm,
378
- orientation: o1.orientation
379
- };
380
- } else {
381
- const newOri = new Array(oDef.numPieces);
382
- for (let idx = 0; idx < oDef.numPieces; idx++) {
383
- newOri[idx] = (o1.orientation[o2.permutation[idx]] + o2.orientation[idx]) % oDef.orientations;
384
- newPerm[idx] = o1.permutation[o2.permutation[idx]];
385
- }
386
- newTrans[orbitName] = { permutation: newPerm, orientation: newOri };
387
- }
388
- }
389
- }
390
- return newTrans;
391
- }
392
- function multiplyTransformations(def, t, amount) {
393
- if (amount < 0) {
394
- return multiplyTransformations(def, invertTransformation(def, t), -amount);
395
- }
396
- if (amount === 0) {
397
- return identityTransformation(def);
398
- }
399
- if (amount === 1) {
400
- return t;
401
- }
402
- let halfish = t;
403
- if (amount !== 2) {
404
- halfish = multiplyTransformations(def, t, Math.floor(amount / 2));
405
- }
406
- const twiceHalfish = combineTransformations(def, halfish, halfish);
407
- if (amount % 2 === 0) {
408
- return twiceHalfish;
409
- } else {
410
- return combineTransformations(def, t, twiceHalfish);
411
- }
412
- }
413
- function identityTransformation(definition) {
414
- const transformation = {};
415
- for (const orbitName in definition.orbits) {
416
- const orbitDefinition = definition.orbits[orbitName];
417
- if (!lasto || lasto.permutation.length !== orbitDefinition.numPieces) {
418
- const newPermutation = new Array(orbitDefinition.numPieces);
419
- const newOrientation = new Array(orbitDefinition.numPieces);
420
- for (let i2 = 0; i2 < orbitDefinition.numPieces; i2++) {
421
- newPermutation[i2] = i2;
422
- newOrientation[i2] = 0;
423
- }
424
- const orbitTransformation = {
425
- permutation: newPermutation,
426
- orientation: newOrientation
427
- };
428
- lasto = orbitTransformation;
429
- }
430
- transformation[orbitName] = lasto;
431
- }
432
- return transformation;
433
- }
434
- function invertTransformation(def, t) {
435
- const newTrans = {};
436
- for (const orbitName in def.orbits) {
437
- const oDef = def.orbits[orbitName];
438
- const o2 = t[orbitName];
439
- if (isIdentity(oDef.orientations, o2)) {
440
- newTrans[orbitName] = o2;
441
- } else if (oDef.orientations === 1) {
442
- const newPerm = new Array(oDef.numPieces);
443
- for (let idx = 0; idx < oDef.numPieces; idx++) {
444
- newPerm[o2.permutation[idx]] = idx;
445
- }
446
- newTrans[orbitName] = {
447
- permutation: newPerm,
448
- orientation: o2.orientation
449
- };
450
- } else {
451
- const newPerm = new Array(oDef.numPieces);
452
- const newOri = new Array(oDef.numPieces);
453
- for (let idx = 0; idx < oDef.numPieces; idx++) {
454
- const fromIdx = o2.permutation[idx];
455
- newPerm[fromIdx] = idx;
456
- newOri[fromIdx] = (oDef.orientations - o2.orientation[idx] + oDef.orientations) % oDef.orientations;
457
- }
458
- newTrans[orbitName] = { permutation: newPerm, orientation: newOri };
459
- }
460
- }
461
- return newTrans;
462
- }
463
- function gcd(a, b) {
464
- if (b) {
465
- return gcd(b, a % b);
466
- }
467
- return a;
468
- }
469
- function transformationOrder(def, t) {
470
- let r2 = 1;
471
- for (const orbitName in def.orbits) {
472
- const oDef = def.orbits[orbitName];
473
- const o2 = t[orbitName];
474
- const d2 = new Array(oDef.numPieces);
475
- for (let idx = 0; idx < oDef.numPieces; idx++) {
476
- if (!d2[idx]) {
477
- let w = idx;
478
- let om = 0;
479
- let pm = 0;
480
- for (; ; ) {
481
- d2[w] = true;
482
- om = om + o2.orientation[w];
483
- pm = pm + 1;
484
- w = o2.permutation[w];
485
- if (w === idx) {
486
- break;
487
- }
488
- }
489
- if (om !== 0) {
490
- pm = pm * oDef.orientations / gcd(oDef.orientations, om);
491
- }
492
- r2 = r2 * pm / gcd(r2, pm);
493
- }
494
- }
495
- }
496
- return r2;
497
- }
498
- function areOrbitTransformationsEquivalent(def, orbitName, t1, t2, options = {}) {
499
- const oDef = def.orbits[orbitName];
500
- const o1 = t1[orbitName];
501
- const o2 = t2[orbitName];
502
- for (let idx = 0; idx < oDef.numPieces; idx++) {
503
- if (!options?.ignoreOrientation && o1.orientation[idx] !== o2.orientation[idx]) {
504
- return false;
505
- }
506
- if (!options?.ignorePermutation && o1.permutation[idx] !== o2.permutation[idx]) {
507
- return false;
508
- }
509
- }
510
- return true;
511
- }
512
- function areTransformationsEquivalent(def, t1, t2) {
234
+ function areTransformationsEquivalent(def, t1, t2) {
513
235
  for (const orbitName in def.orbits) {
514
236
  if (!areOrbitTransformationsEquivalent(def, orbitName, t1, t2)) {
515
237
  return false;
@@ -549,28 +271,28 @@ var KPuzzleMoveNotation = class {
549
271
  }
550
272
  lookupMove(move) {
551
273
  const key = move.toString();
552
- let r2 = this.cache[key];
553
- if (r2) {
554
- return r2;
274
+ let r = this.cache[key];
275
+ if (r) {
276
+ return r;
555
277
  }
556
278
  const quantumKey = move.quantum.toString();
557
- r2 = this.def.moves[quantumKey];
558
- if (r2) {
559
- r2 = multiplyTransformations(this.def, r2, move.amount);
560
- this.cache[key] = r2;
279
+ r = this.def.moves[quantumKey];
280
+ if (r) {
281
+ r = multiplyTransformations(this.def, r, move.amount);
282
+ this.cache[key] = r;
561
283
  } else {
562
- r2 = this.def.moves[move.toString()];
563
- if (r2) {
564
- this.cache[key] = r2;
284
+ r = this.def.moves[move.toString()];
285
+ if (r) {
286
+ this.cache[key] = r;
565
287
  } else {
566
- r2 = this.def.moves[move.invert().toString()];
567
- if (r2) {
568
- r2 = multiplyTransformations(this.def, r2, -1);
569
- this.cache[key] = r2;
288
+ r = this.def.moves[move.invert().toString()];
289
+ if (r) {
290
+ r = multiplyTransformations(this.def, r, -1);
291
+ this.cache[key] = r;
570
292
  }
571
293
  }
572
294
  }
573
- return r2;
295
+ return r;
574
296
  }
575
297
  };
576
298
  var KPuzzle = class {
@@ -649,26 +371,26 @@ var Canonicalizer = class {
649
371
  this.transforms.push([id, basemoves[mv1]]);
650
372
  }
651
373
  this.baseMoveCount = this.movenames.length;
652
- for (let i2 = 0; i2 < this.baseMoveCount; i2++) {
374
+ for (let i = 0; i < this.baseMoveCount; i++) {
653
375
  this.commutes.push([]);
654
- const t1 = this.transforms[i2][1];
376
+ const t1 = this.transforms[i][1];
655
377
  for (let j = 0; j < this.baseMoveCount; j++) {
656
378
  const t2 = this.transforms[j][1];
657
379
  const ab = combineTransformations(def, t1, t2);
658
380
  const ba = combineTransformations(def, t2, t1);
659
- this.commutes[i2][j] = areTransformationsEquivalent(def, ab, ba);
381
+ this.commutes[i][j] = areTransformationsEquivalent(def, ab, ba);
660
382
  }
661
383
  }
662
- for (let i2 = 0; i2 < this.baseMoveCount; i2++) {
663
- const t1 = this.transforms[i2][1];
384
+ for (let i = 0; i < this.baseMoveCount; i++) {
385
+ const t1 = this.transforms[i][1];
664
386
  let ct = t1;
665
387
  let order = 1;
666
388
  for (let mult = 2; !areTransformationsEquivalent(def, id, ct); mult++) {
667
389
  order++;
668
390
  ct = combineTransformations(def, ct, t1);
669
- this.transforms[i2].push(ct);
391
+ this.transforms[i].push(ct);
670
392
  }
671
- this.moveorder[i2] = order;
393
+ this.moveorder[i] = order;
672
394
  }
673
395
  }
674
396
  blockMoveToInternalMove(move) {
@@ -710,14 +432,14 @@ var SearchSequence = class {
710
432
  }
711
433
  }
712
434
  clone() {
713
- const r2 = new SearchSequence(this.canon, this.trans);
714
- r2.moveseq = [...this.moveseq];
715
- return r2;
435
+ const r = new SearchSequence(this.canon, this.trans);
436
+ r.moveseq = [...this.moveseq];
437
+ return r;
716
438
  }
717
439
  mergeOneMove(mv) {
718
- const r2 = this.onlyMergeOneMove(mv);
440
+ const r = this.onlyMergeOneMove(mv);
719
441
  this.trans = combineTransformations(this.canon.def, this.trans, mv.getTransformation(this.canon));
720
- return r2;
442
+ return r;
721
443
  }
722
444
  appendOneMove(mv) {
723
445
  this.moveseq.push(mv);
@@ -764,21 +486,21 @@ var SearchSequence = class {
764
486
  return 1;
765
487
  }
766
488
  mergeSequence(seq) {
767
- let r2 = this.moveseq.length;
768
- for (let i2 = 0; i2 < seq.moveseq.length; i2++) {
769
- const mv = seq.moveseq[i2];
770
- const d2 = this.onlyMergeOneMove(mv);
771
- r2 += d2;
489
+ let r = this.moveseq.length;
490
+ for (let i = 0; i < seq.moveseq.length; i++) {
491
+ const mv = seq.moveseq[i];
492
+ const d = this.onlyMergeOneMove(mv);
493
+ r += d;
772
494
  }
773
495
  this.trans = combineTransformations(this.canon.def, this.trans, seq.trans);
774
- return r2;
496
+ return r;
775
497
  }
776
498
  getSequenceAsString() {
777
- const r2 = [];
499
+ const r = [];
778
500
  for (const mv of this.moveseq) {
779
- r2.push(mv.asString(this.canon));
501
+ r.push(mv.asString(this.canon));
780
502
  }
781
- return r2.join(" ");
503
+ return r.join(" ");
782
504
  }
783
505
  };
784
506
  var CanonicalSequenceIterator = class {
@@ -820,13 +542,13 @@ var CanonicalSequenceIterator = class {
820
542
  return null;
821
543
  }
822
544
  *generator() {
823
- for (let d2 = 0; ; d2++) {
824
- yield* this.genSequence(d2, []);
545
+ for (let d = 0; ; d++) {
546
+ yield* this.genSequence(d, []);
825
547
  }
826
548
  }
827
549
  *genSequenceTree(canonstate) {
828
- const r2 = yield this.ss;
829
- if (r2 > 0) {
550
+ const r = yield this.ss;
551
+ if (r > 0) {
830
552
  return null;
831
553
  }
832
554
  for (let base = 0; base < this.canon.baseMoveCount; base++) {
@@ -906,12 +628,12 @@ peg$SyntaxError.buildMessage = function(expected, found) {
906
628
  }
907
629
  function describeExpected(expected2) {
908
630
  var descriptions = expected2.map(describeExpectation);
909
- var i2, j;
631
+ var i, j;
910
632
  descriptions.sort();
911
633
  if (descriptions.length > 0) {
912
- for (i2 = 1, j = 1; i2 < descriptions.length; i2++) {
913
- if (descriptions[i2 - 1] !== descriptions[i2]) {
914
- descriptions[j] = descriptions[i2];
634
+ for (i = 1, j = 1; i < descriptions.length; i++) {
635
+ if (descriptions[i - 1] !== descriptions[i]) {
636
+ descriptions[j] = descriptions[i];
915
637
  j++;
916
638
  }
917
639
  }
@@ -1861,8 +1583,8 @@ function peg$parse(input, options) {
1861
1583
  const oldOrientation = moveOrbit.orientation;
1862
1584
  const perm = moveOrbit.permutation;
1863
1585
  const newOrientation = new Array(oldOrientation.length);
1864
- for (let i2 = 0; i2 < perm.length; i2++) {
1865
- newOrientation[i2] = oldOrientation[perm[i2]];
1586
+ for (let i = 0; i < perm.length; i++) {
1587
+ newOrientation[i] = oldOrientation[perm[i]];
1866
1588
  }
1867
1589
  moveOrbit.orientation = newOrientation;
1868
1590
  }
@@ -2032,85 +1754,372 @@ var KPuzzleSVGWrapper = class {
2032
1754
  }
2033
1755
  }
2034
1756
  }
2035
- newGradient(id, originalColor) {
2036
- const grad = document.createElementNS(xmlns, "radialGradient");
2037
- grad.setAttribute("id", `grad-${this.svgID}-${id}`);
2038
- grad.setAttribute("r", `70.7107%`);
2039
- const stopDefs = [
2040
- { offset: 0, color: originalColor },
2041
- { offset: 0, color: originalColor },
2042
- { offset: 0, color: "black" },
2043
- { offset: 0, color: "black" },
2044
- { offset: 0, color: originalColor },
2045
- { offset: 100, color: originalColor }
2046
- ];
2047
- for (const stopDef of stopDefs) {
2048
- const stop = document.createElementNS(xmlns, "stop");
2049
- stop.setAttribute("offset", `${stopDef.offset}%`);
2050
- stop.setAttribute("stop-color", stopDef.color);
2051
- stop.setAttribute("stop-opacity", "1");
2052
- grad.appendChild(stop);
2053
- }
2054
- return grad;
1757
+ newGradient(id, originalColor) {
1758
+ const grad = document.createElementNS(xmlns, "radialGradient");
1759
+ grad.setAttribute("id", `grad-${this.svgID}-${id}`);
1760
+ grad.setAttribute("r", `70.7107%`);
1761
+ const stopDefs = [
1762
+ { offset: 0, color: originalColor },
1763
+ { offset: 0, color: originalColor },
1764
+ { offset: 0, color: "black" },
1765
+ { offset: 0, color: "black" },
1766
+ { offset: 0, color: originalColor },
1767
+ { offset: 100, color: originalColor }
1768
+ ];
1769
+ for (const stopDef of stopDefs) {
1770
+ const stop = document.createElementNS(xmlns, "stop");
1771
+ stop.setAttribute("offset", `${stopDef.offset}%`);
1772
+ stop.setAttribute("stop-color", stopDef.color);
1773
+ stop.setAttribute("stop-opacity", "1");
1774
+ grad.appendChild(stop);
1775
+ }
1776
+ return grad;
1777
+ }
1778
+ elementID(orbitName, idx, orientation) {
1779
+ return orbitName + "-l" + idx + "-o" + orientation;
1780
+ }
1781
+ elementByID(id) {
1782
+ return this.element.querySelector("#" + id);
1783
+ }
1784
+ };
1785
+
1786
+ // src/cubing/kpuzzle/3x3x3/3x3x3.kpuzzle.json.ts
1787
+ var cube3x3x3KPuzzle = {
1788
+ name: "3x3x3",
1789
+ orbits: {
1790
+ EDGES: { numPieces: 12, orientations: 2 },
1791
+ CORNERS: { numPieces: 8, orientations: 3 },
1792
+ CENTERS: { numPieces: 6, orientations: 4 }
1793
+ },
1794
+ startPieces: {
1795
+ EDGES: {
1796
+ permutation: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11],
1797
+ orientation: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
1798
+ },
1799
+ CORNERS: {
1800
+ permutation: [0, 1, 2, 3, 4, 5, 6, 7],
1801
+ orientation: [0, 0, 0, 0, 0, 0, 0, 0]
1802
+ },
1803
+ CENTERS: {
1804
+ permutation: [0, 1, 2, 3, 4, 5],
1805
+ orientation: [0, 0, 0, 0, 0, 0]
1806
+ }
1807
+ },
1808
+ moves: {
1809
+ U: {
1810
+ EDGES: {
1811
+ permutation: [1, 2, 3, 0, 4, 5, 6, 7, 8, 9, 10, 11],
1812
+ orientation: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
1813
+ },
1814
+ CORNERS: {
1815
+ permutation: [1, 2, 3, 0, 4, 5, 6, 7],
1816
+ orientation: [0, 0, 0, 0, 0, 0, 0, 0]
1817
+ },
1818
+ CENTERS: {
1819
+ permutation: [0, 1, 2, 3, 4, 5],
1820
+ orientation: [1, 0, 0, 0, 0, 0]
1821
+ }
1822
+ },
1823
+ y: {
1824
+ EDGES: {
1825
+ permutation: [1, 2, 3, 0, 5, 6, 7, 4, 10, 8, 11, 9],
1826
+ orientation: [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1]
1827
+ },
1828
+ CORNERS: {
1829
+ permutation: [1, 2, 3, 0, 7, 4, 5, 6],
1830
+ orientation: [0, 0, 0, 0, 0, 0, 0, 0]
1831
+ },
1832
+ CENTERS: {
1833
+ permutation: [0, 2, 3, 4, 1, 5],
1834
+ orientation: [1, 0, 0, 0, 0, 3]
1835
+ }
1836
+ },
1837
+ x: {
1838
+ EDGES: {
1839
+ permutation: [4, 8, 0, 9, 6, 10, 2, 11, 5, 7, 1, 3],
1840
+ orientation: [1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0]
1841
+ },
1842
+ CORNERS: {
1843
+ permutation: [4, 0, 3, 5, 7, 6, 2, 1],
1844
+ orientation: [2, 1, 2, 1, 1, 2, 1, 2]
1845
+ },
1846
+ CENTERS: {
1847
+ permutation: [2, 1, 5, 3, 0, 4],
1848
+ orientation: [0, 3, 0, 1, 2, 2]
1849
+ }
1850
+ },
1851
+ L: {
1852
+ EDGES: {
1853
+ permutation: [0, 1, 2, 11, 4, 5, 6, 9, 8, 3, 10, 7],
1854
+ orientation: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
1855
+ },
1856
+ CORNERS: {
1857
+ permutation: [0, 1, 6, 2, 4, 3, 5, 7],
1858
+ orientation: [0, 0, 2, 1, 0, 2, 1, 0]
1859
+ },
1860
+ CENTERS: {
1861
+ permutation: [0, 1, 2, 3, 4, 5],
1862
+ orientation: [0, 1, 0, 0, 0, 0]
1863
+ }
1864
+ },
1865
+ F: {
1866
+ EDGES: {
1867
+ permutation: [9, 1, 2, 3, 8, 5, 6, 7, 0, 4, 10, 11],
1868
+ orientation: [1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0]
1869
+ },
1870
+ CORNERS: {
1871
+ permutation: [3, 1, 2, 5, 0, 4, 6, 7],
1872
+ orientation: [1, 0, 0, 2, 2, 1, 0, 0]
1873
+ },
1874
+ CENTERS: {
1875
+ permutation: [0, 1, 2, 3, 4, 5],
1876
+ orientation: [0, 0, 1, 0, 0, 0]
1877
+ }
1878
+ },
1879
+ R: {
1880
+ EDGES: {
1881
+ permutation: [0, 8, 2, 3, 4, 10, 6, 7, 5, 9, 1, 11],
1882
+ orientation: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
1883
+ },
1884
+ CORNERS: {
1885
+ permutation: [4, 0, 2, 3, 7, 5, 6, 1],
1886
+ orientation: [2, 1, 0, 0, 1, 0, 0, 2]
1887
+ },
1888
+ CENTERS: {
1889
+ permutation: [0, 1, 2, 3, 4, 5],
1890
+ orientation: [0, 0, 0, 1, 0, 0]
1891
+ }
1892
+ },
1893
+ B: {
1894
+ EDGES: {
1895
+ permutation: [0, 1, 10, 3, 4, 5, 11, 7, 8, 9, 6, 2],
1896
+ orientation: [0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1]
1897
+ },
1898
+ CORNERS: {
1899
+ permutation: [0, 7, 1, 3, 4, 5, 2, 6],
1900
+ orientation: [0, 2, 1, 0, 0, 0, 2, 1]
1901
+ },
1902
+ CENTERS: {
1903
+ permutation: [0, 1, 2, 3, 4, 5],
1904
+ orientation: [0, 0, 0, 0, 1, 0]
1905
+ }
1906
+ },
1907
+ D: {
1908
+ EDGES: {
1909
+ permutation: [0, 1, 2, 3, 7, 4, 5, 6, 8, 9, 10, 11],
1910
+ orientation: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
1911
+ },
1912
+ CORNERS: {
1913
+ permutation: [0, 1, 2, 3, 5, 6, 7, 4],
1914
+ orientation: [0, 0, 0, 0, 0, 0, 0, 0]
1915
+ },
1916
+ CENTERS: {
1917
+ permutation: [0, 1, 2, 3, 4, 5],
1918
+ orientation: [0, 0, 0, 0, 0, 1]
1919
+ }
1920
+ },
1921
+ z: {
1922
+ EDGES: {
1923
+ permutation: [9, 3, 11, 7, 8, 1, 10, 5, 0, 4, 2, 6],
1924
+ orientation: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
1925
+ },
1926
+ CORNERS: {
1927
+ permutation: [3, 2, 6, 5, 0, 4, 7, 1],
1928
+ orientation: [1, 2, 1, 2, 2, 1, 2, 1]
1929
+ },
1930
+ CENTERS: {
1931
+ permutation: [1, 5, 2, 0, 4, 3],
1932
+ orientation: [1, 1, 1, 1, 3, 1]
1933
+ }
1934
+ },
1935
+ M: {
1936
+ EDGES: {
1937
+ permutation: [2, 1, 6, 3, 0, 5, 4, 7, 8, 9, 10, 11],
1938
+ orientation: [1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0]
1939
+ },
1940
+ CORNERS: {
1941
+ permutation: [0, 1, 2, 3, 4, 5, 6, 7],
1942
+ orientation: [0, 0, 0, 0, 0, 0, 0, 0]
1943
+ },
1944
+ CENTERS: {
1945
+ permutation: [4, 1, 0, 3, 5, 2],
1946
+ orientation: [2, 0, 0, 0, 2, 0]
1947
+ }
1948
+ },
1949
+ E: {
1950
+ EDGES: {
1951
+ permutation: [0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 8, 10],
1952
+ orientation: [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1]
1953
+ },
1954
+ CORNERS: {
1955
+ permutation: [0, 1, 2, 3, 4, 5, 6, 7],
1956
+ orientation: [0, 0, 0, 0, 0, 0, 0, 0]
1957
+ },
1958
+ CENTERS: {
1959
+ permutation: [0, 4, 1, 2, 3, 5],
1960
+ orientation: [0, 0, 0, 0, 0, 0]
1961
+ }
1962
+ },
1963
+ S: {
1964
+ EDGES: {
1965
+ permutation: [0, 3, 2, 7, 4, 1, 6, 5, 8, 9, 10, 11],
1966
+ orientation: [0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0]
1967
+ },
1968
+ CORNERS: {
1969
+ permutation: [0, 1, 2, 3, 4, 5, 6, 7],
1970
+ orientation: [0, 0, 0, 0, 0, 0, 0, 0]
1971
+ },
1972
+ CENTERS: {
1973
+ permutation: [1, 5, 2, 0, 4, 3],
1974
+ orientation: [1, 1, 0, 1, 0, 1]
1975
+ }
1976
+ },
1977
+ u: {
1978
+ EDGES: {
1979
+ permutation: [1, 2, 3, 0, 4, 5, 6, 7, 10, 8, 11, 9],
1980
+ orientation: [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1]
1981
+ },
1982
+ CORNERS: {
1983
+ permutation: [1, 2, 3, 0, 4, 5, 6, 7],
1984
+ orientation: [0, 0, 0, 0, 0, 0, 0, 0]
1985
+ },
1986
+ CENTERS: {
1987
+ permutation: [0, 2, 3, 4, 1, 5],
1988
+ orientation: [1, 0, 0, 0, 0, 0]
1989
+ }
1990
+ },
1991
+ l: {
1992
+ EDGES: {
1993
+ permutation: [2, 1, 6, 11, 0, 5, 4, 9, 8, 3, 10, 7],
1994
+ orientation: [1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0]
1995
+ },
1996
+ CORNERS: {
1997
+ permutation: [0, 1, 6, 2, 4, 3, 5, 7],
1998
+ orientation: [0, 0, 2, 1, 0, 2, 1, 0]
1999
+ },
2000
+ CENTERS: {
2001
+ permutation: [4, 1, 0, 3, 5, 2],
2002
+ orientation: [2, 1, 0, 0, 2, 0]
2003
+ }
2004
+ },
2005
+ f: {
2006
+ EDGES: {
2007
+ permutation: [9, 3, 2, 7, 8, 1, 6, 5, 0, 4, 10, 11],
2008
+ orientation: [1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0]
2009
+ },
2010
+ CORNERS: {
2011
+ permutation: [3, 1, 2, 5, 0, 4, 6, 7],
2012
+ orientation: [1, 0, 0, 2, 2, 1, 0, 0]
2013
+ },
2014
+ CENTERS: {
2015
+ permutation: [1, 5, 2, 0, 4, 3],
2016
+ orientation: [1, 1, 1, 1, 0, 1]
2017
+ }
2018
+ },
2019
+ r: {
2020
+ EDGES: {
2021
+ permutation: [4, 8, 0, 3, 6, 10, 2, 7, 5, 9, 1, 11],
2022
+ orientation: [1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0]
2023
+ },
2024
+ CORNERS: {
2025
+ permutation: [4, 0, 2, 3, 7, 5, 6, 1],
2026
+ orientation: [2, 1, 0, 0, 1, 0, 0, 2]
2027
+ },
2028
+ CENTERS: {
2029
+ permutation: [2, 1, 5, 3, 0, 4],
2030
+ orientation: [0, 0, 0, 1, 2, 2]
2031
+ }
2032
+ },
2033
+ b: {
2034
+ EDGES: {
2035
+ permutation: [0, 5, 10, 1, 4, 7, 11, 3, 8, 9, 6, 2],
2036
+ orientation: [0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1]
2037
+ },
2038
+ CORNERS: {
2039
+ permutation: [0, 7, 1, 3, 4, 5, 2, 6],
2040
+ orientation: [0, 2, 1, 0, 0, 0, 2, 1]
2041
+ },
2042
+ CENTERS: {
2043
+ permutation: [3, 0, 2, 5, 4, 1],
2044
+ orientation: [3, 3, 0, 3, 1, 3]
2045
+ }
2046
+ },
2047
+ d: {
2048
+ EDGES: {
2049
+ permutation: [0, 1, 2, 3, 7, 4, 5, 6, 9, 11, 8, 10],
2050
+ orientation: [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1]
2051
+ },
2052
+ CORNERS: {
2053
+ permutation: [0, 1, 2, 3, 5, 6, 7, 4],
2054
+ orientation: [0, 0, 0, 0, 0, 0, 0, 0]
2055
+ },
2056
+ CENTERS: {
2057
+ permutation: [0, 4, 1, 2, 3, 5],
2058
+ orientation: [0, 0, 0, 0, 0, 1]
2059
+ }
2060
+ }
2061
+ }
2062
+ };
2063
+ cube3x3x3KPuzzle.moves["Uw"] = cube3x3x3KPuzzle.moves["u"];
2064
+ cube3x3x3KPuzzle.moves["Lw"] = cube3x3x3KPuzzle.moves["l"];
2065
+ cube3x3x3KPuzzle.moves["Fw"] = cube3x3x3KPuzzle.moves["f"];
2066
+ cube3x3x3KPuzzle.moves["Rw"] = cube3x3x3KPuzzle.moves["r"];
2067
+ cube3x3x3KPuzzle.moves["Bw"] = cube3x3x3KPuzzle.moves["b"];
2068
+ cube3x3x3KPuzzle.moves["Dw"] = cube3x3x3KPuzzle.moves["d"];
2069
+ cube3x3x3KPuzzle.moves["Rv"] = cube3x3x3KPuzzle.moves["x"];
2070
+ cube3x3x3KPuzzle.moves["Uv"] = cube3x3x3KPuzzle.moves["y"];
2071
+ cube3x3x3KPuzzle.moves["Fv"] = cube3x3x3KPuzzle.moves["z"];
2072
+ cube3x3x3KPuzzle.moves["Lv"] = {
2073
+ EDGES: {
2074
+ permutation: [2, 10, 6, 11, 0, 8, 4, 9, 1, 3, 5, 7],
2075
+ orientation: [1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0]
2076
+ },
2077
+ CORNERS: {
2078
+ permutation: [1, 7, 6, 2, 0, 3, 5, 4],
2079
+ orientation: [2, 1, 2, 1, 1, 2, 1, 2]
2080
+ },
2081
+ CENTERS: {
2082
+ permutation: [4, 1, 0, 3, 5, 2],
2083
+ orientation: [2, 1, 0, 3, 2, 0]
2055
2084
  }
2056
- elementID(orbitName, idx, orientation) {
2057
- return orbitName + "-l" + idx + "-o" + orientation;
2085
+ };
2086
+ cube3x3x3KPuzzle.moves["Dv"] = {
2087
+ EDGES: {
2088
+ permutation: [3, 0, 1, 2, 7, 4, 5, 6, 9, 11, 8, 10],
2089
+ orientation: [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1]
2090
+ },
2091
+ CORNERS: {
2092
+ permutation: [3, 0, 1, 2, 5, 6, 7, 4],
2093
+ orientation: [0, 0, 0, 0, 0, 0, 0, 0]
2094
+ },
2095
+ CENTERS: {
2096
+ permutation: [0, 4, 1, 2, 3, 5],
2097
+ orientation: [3, 0, 0, 0, 0, 1]
2058
2098
  }
2059
- elementByID(id) {
2060
- return this.element.querySelector("#" + id);
2099
+ };
2100
+ cube3x3x3KPuzzle.moves["Bv"] = {
2101
+ EDGES: {
2102
+ permutation: [8, 5, 10, 1, 9, 7, 11, 3, 4, 0, 6, 2],
2103
+ orientation: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
2104
+ },
2105
+ CORNERS: {
2106
+ permutation: [4, 7, 1, 0, 5, 3, 2, 6],
2107
+ orientation: [1, 2, 1, 2, 2, 1, 2, 1]
2108
+ },
2109
+ CENTERS: {
2110
+ permutation: [3, 0, 2, 5, 4, 1],
2111
+ orientation: [3, 3, 3, 3, 1, 3]
2061
2112
  }
2062
2113
  };
2063
2114
 
2064
- // src/cubing/protocol/binary/orbit-indexing.ts
2065
- function identityPermutation(numElems) {
2066
- const arr = new Array(numElems);
2067
- for (let i2 = 0; i2 < numElems; i2++) {
2068
- arr[i2] = i2;
2069
- }
2070
- return arr;
2071
- }
2072
- function orientationsToMask(radix, orientations) {
2073
- let val = 0;
2074
- for (const orientation of orientations) {
2075
- val *= radix;
2076
- val += orientation;
2077
- }
2078
- return val;
2079
- }
2080
- function maskToOrientations(radix, numElems, mask) {
2081
- const arr = [];
2082
- while (mask > 0) {
2083
- arr.push(mask % radix);
2084
- mask = Math.floor(mask / radix);
2085
- }
2086
- return new Array(numElems - arr.length).fill(0).concat(arr.reverse());
2087
- }
2088
- function permutationToLex(permutation) {
2089
- const n = permutation.length;
2090
- let lexicographicIdx = 0;
2091
- for (let i2 = 0; i2 < n - 1; i2++) {
2092
- lexicographicIdx = lexicographicIdx * (n - i2);
2093
- for (let j = i2 + 1; j < n; j++) {
2094
- if (permutation[i2] > permutation[j]) {
2095
- lexicographicIdx += 1;
2096
- }
2097
- }
2098
- }
2099
- return lexicographicIdx;
2100
- }
2101
- function lexToPermutation(numPieces, lexicographicIdx) {
2102
- const permutation = new Array(numPieces);
2103
- permutation[numPieces - 1] = 0;
2104
- for (let i2 = numPieces - 2; i2 >= 0; i2--) {
2105
- permutation[i2] = lexicographicIdx % (numPieces - i2);
2106
- lexicographicIdx = Math.floor(lexicographicIdx / (numPieces - i2));
2107
- for (let j = i2 + 1; j < numPieces; j++) {
2108
- if (permutation[j] >= permutation[i2]) {
2109
- permutation[j] = permutation[j] + 1;
2110
- }
2111
- }
2115
+ // src/cubing/kpuzzle/puzzle-orientation.ts
2116
+ function experimentalIs3x3x3Solved(transformation, options) {
2117
+ const normalized = normalizePuzzleOrientation(transformation);
2118
+ if (options.ignoreCenterOrientation) {
2119
+ return areOrbitTransformationsEquivalent(cube3x3x3KPuzzle, "EDGES", normalized, cube3x3x3KPuzzle.startPieces) && areOrbitTransformationsEquivalent(cube3x3x3KPuzzle, "CORNERS", normalized, cube3x3x3KPuzzle.startPieces);
2120
+ } else {
2121
+ return areTransformationsEquivalent(cube3x3x3KPuzzle, normalized, cube3x3x3KPuzzle.startPieces);
2112
2122
  }
2113
- return permutation;
2114
2123
  }
2115
2124
 
2116
2125
  // src/cubing/protocol/binary/puzzle-orientation.ts
@@ -2137,7 +2146,7 @@ var puzzleOrientationCache = new Array(6).fill(0).map(() => {
2137
2146
  for (const uAlg of uAlgs) {
2138
2147
  orientationKpuzzle.reset();
2139
2148
  orientationKpuzzle.applyAlg(uAlg);
2140
- for (let i2 = 0; i2 < 4; i2++) {
2149
+ for (let i = 0; i < 4; i++) {
2141
2150
  orientationKpuzzle.applyAlg(yAlg);
2142
2151
  const [idxU, idxL] = puzzleOrientationIdx(orientationKpuzzle.state);
2143
2152
  puzzleOrientationCache[idxU][idxL] = invertTransformation(cube3x3x3KPuzzle, orientationKpuzzle.state);
@@ -2184,9 +2193,9 @@ function concatBinary(bitLengths, values) {
2184
2193
  let at = 0;
2185
2194
  let bits = 0;
2186
2195
  let accum = 0;
2187
- for (let i2 = 0; i2 < bitLengths.length; i2++) {
2188
- accum = accum << bitLengths[i2] | values[i2];
2189
- bits += bitLengths[i2];
2196
+ for (let i = 0; i < bitLengths.length; i++) {
2197
+ accum = accum << bitLengths[i] | values[i];
2198
+ bits += bitLengths[i];
2190
2199
  while (bits >= 8) {
2191
2200
  buffy[at++] = accum >> bits - 8;
2192
2201
  bits -= 8;
@@ -2320,667 +2329,6 @@ function spacedHexToBuffer(hex) {
2320
2329
  return new Uint8Array(hex.split(" ").map((c) => parseInt(c, 16)));
2321
2330
  }
2322
2331
 
2323
- // src/cubing/kpuzzle/puzzle-orientation.ts
2324
- function experimentalIs3x3x3Solved(transformation, options) {
2325
- const normalized = normalizePuzzleOrientation(transformation);
2326
- if (options.ignoreCenterOrientation) {
2327
- return areOrbitTransformationsEquivalent(cube3x3x3KPuzzle, "EDGES", normalized, cube3x3x3KPuzzle.startPieces) && areOrbitTransformationsEquivalent(cube3x3x3KPuzzle, "CORNERS", normalized, cube3x3x3KPuzzle.startPieces);
2328
- } else {
2329
- return areTransformationsEquivalent(cube3x3x3KPuzzle, normalized, cube3x3x3KPuzzle.startPieces);
2330
- }
2331
- }
2332
-
2333
- // src/cubing/puzzles/stickerings/appearance.ts
2334
- function getFaceletAppearance(appearance, orbitName, pieceIdx, faceletIdx, hint) {
2335
- const orbitAppearance = appearance.orbits[orbitName];
2336
- const pieceAppearance = orbitAppearance.pieces[pieceIdx];
2337
- if (pieceAppearance === null) {
2338
- return regular;
2339
- }
2340
- const faceletAppearance = pieceAppearance.facelets[faceletIdx];
2341
- if (faceletAppearance === null) {
2342
- return regular;
2343
- }
2344
- if (typeof faceletAppearance === "string") {
2345
- return faceletAppearance;
2346
- }
2347
- if (hint) {
2348
- return faceletAppearance.hintAppearance ?? faceletAppearance.appearance;
2349
- }
2350
- return faceletAppearance.appearance;
2351
- }
2352
- var PieceStickering;
2353
- (function(PieceStickering2) {
2354
- PieceStickering2[PieceStickering2["Regular"] = 0] = "Regular";
2355
- PieceStickering2[PieceStickering2["Dim"] = 1] = "Dim";
2356
- PieceStickering2[PieceStickering2["Ignored"] = 2] = "Ignored";
2357
- PieceStickering2[PieceStickering2["OrientationStickers"] = 3] = "OrientationStickers";
2358
- PieceStickering2[PieceStickering2["Invisible"] = 4] = "Invisible";
2359
- PieceStickering2[PieceStickering2["Ignoriented"] = 5] = "Ignoriented";
2360
- PieceStickering2[PieceStickering2["IgnoreNonPrimary"] = 6] = "IgnoreNonPrimary";
2361
- PieceStickering2[PieceStickering2["PermuteNonPrimary"] = 7] = "PermuteNonPrimary";
2362
- PieceStickering2[PieceStickering2["OrientationWithoutPermutation"] = 8] = "OrientationWithoutPermutation";
2363
- })(PieceStickering || (PieceStickering = {}));
2364
- var PieceAnnotation = class {
2365
- constructor(def, defaultValue) {
2366
- this.stickerings = new Map();
2367
- for (const [orbitName, orbitDef] of Object.entries(def.orbits)) {
2368
- this.stickerings.set(orbitName, new Array(orbitDef.numPieces).fill(defaultValue));
2369
- }
2370
- }
2371
- };
2372
- var regular = "regular";
2373
- var ignored = "ignored";
2374
- var oriented = "oriented";
2375
- var invisible = "invisible";
2376
- var dim = "dim";
2377
- var r = {
2378
- facelets: [regular, regular, regular, regular, regular]
2379
- };
2380
- var i = {
2381
- facelets: [ignored, ignored, ignored, ignored, ignored]
2382
- };
2383
- var o = {
2384
- facelets: [oriented, oriented, oriented, oriented, oriented]
2385
- };
2386
- var invisiblePiece = {
2387
- facelets: [invisible, invisible, invisible, invisible]
2388
- };
2389
- var riiii = {
2390
- facelets: [regular, ignored, ignored, ignored, ignored]
2391
- };
2392
- var drrrr = {
2393
- facelets: [dim, regular, regular, regular, regular]
2394
- };
2395
- var d = {
2396
- facelets: [dim, dim, dim, dim, dim]
2397
- };
2398
- var diiii = {
2399
- facelets: [dim, ignored, ignored, ignored, ignored]
2400
- };
2401
- var oiiii = {
2402
- facelets: [oriented, ignored, ignored, ignored, ignored]
2403
- };
2404
- function getPieceAppearance(pieceStickering) {
2405
- switch (pieceStickering) {
2406
- case 0:
2407
- return r;
2408
- case 1:
2409
- return d;
2410
- case 2:
2411
- return i;
2412
- case 3:
2413
- return o;
2414
- case 4:
2415
- return invisiblePiece;
2416
- case 6:
2417
- return riiii;
2418
- case 7:
2419
- return drrrr;
2420
- case 5:
2421
- return diiii;
2422
- case 8:
2423
- return oiiii;
2424
- }
2425
- }
2426
- var PuzzleStickering = class extends PieceAnnotation {
2427
- constructor(def) {
2428
- super(def, 0);
2429
- }
2430
- set(pieceSet, pieceStickering) {
2431
- for (const [orbitName, pieces] of this.stickerings.entries()) {
2432
- for (let i2 = 0; i2 < pieces.length; i2++) {
2433
- if (pieceSet.stickerings.get(orbitName)[i2]) {
2434
- pieces[i2] = pieceStickering;
2435
- }
2436
- }
2437
- }
2438
- return this;
2439
- }
2440
- toAppearance() {
2441
- const appearance = { orbits: {} };
2442
- for (const [orbitName, pieceStickerings] of this.stickerings.entries()) {
2443
- const pieces = [];
2444
- const orbitAppearance = {
2445
- pieces
2446
- };
2447
- appearance.orbits[orbitName] = orbitAppearance;
2448
- for (const pieceStickering of pieceStickerings) {
2449
- pieces.push(getPieceAppearance(pieceStickering));
2450
- }
2451
- }
2452
- return appearance;
2453
- }
2454
- };
2455
- var StickeringManager = class {
2456
- constructor(def) {
2457
- this.def = def;
2458
- }
2459
- and(pieceSets) {
2460
- const newPieceSet = new PieceAnnotation(this.def, false);
2461
- for (const [orbitName, orbitDef] of Object.entries(this.def.orbits)) {
2462
- pieceLoop:
2463
- for (let i2 = 0; i2 < orbitDef.numPieces; i2++) {
2464
- newPieceSet.stickerings.get(orbitName)[i2] = true;
2465
- for (const pieceSet of pieceSets) {
2466
- if (!pieceSet.stickerings.get(orbitName)[i2]) {
2467
- newPieceSet.stickerings.get(orbitName)[i2] = false;
2468
- continue pieceLoop;
2469
- }
2470
- }
2471
- }
2472
- }
2473
- return newPieceSet;
2474
- }
2475
- or(pieceSets) {
2476
- const newPieceSet = new PieceAnnotation(this.def, false);
2477
- for (const [orbitName, orbitDef] of Object.entries(this.def.orbits)) {
2478
- pieceLoop:
2479
- for (let i2 = 0; i2 < orbitDef.numPieces; i2++) {
2480
- newPieceSet.stickerings.get(orbitName)[i2] = false;
2481
- for (const pieceSet of pieceSets) {
2482
- if (pieceSet.stickerings.get(orbitName)[i2]) {
2483
- newPieceSet.stickerings.get(orbitName)[i2] = true;
2484
- continue pieceLoop;
2485
- }
2486
- }
2487
- }
2488
- }
2489
- return newPieceSet;
2490
- }
2491
- not(pieceSet) {
2492
- const newPieceSet = new PieceAnnotation(this.def, false);
2493
- for (const [orbitName, orbitDef] of Object.entries(this.def.orbits)) {
2494
- for (let i2 = 0; i2 < orbitDef.numPieces; i2++) {
2495
- newPieceSet.stickerings.get(orbitName)[i2] = !pieceSet.stickerings.get(orbitName)[i2];
2496
- }
2497
- }
2498
- return newPieceSet;
2499
- }
2500
- all() {
2501
- return this.and(this.moves([]));
2502
- }
2503
- move(moveSource) {
2504
- const transformation = transformationForMove(this.def, experimentalIs(moveSource, Move) ? moveSource : Move.fromString(moveSource));
2505
- const newPieceSet = new PieceAnnotation(this.def, false);
2506
- for (const [orbitName, orbitDef] of Object.entries(this.def.orbits)) {
2507
- for (let i2 = 0; i2 < orbitDef.numPieces; i2++) {
2508
- if (transformation[orbitName].permutation[i2] !== i2 || transformation[orbitName].orientation[i2] !== 0) {
2509
- newPieceSet.stickerings.get(orbitName)[i2] = true;
2510
- }
2511
- }
2512
- }
2513
- return newPieceSet;
2514
- }
2515
- moves(moveSources) {
2516
- return moveSources.map((moveSource) => this.move(moveSource));
2517
- }
2518
- };
2519
-
2520
- // src/cubing/puzzles/stickerings/cube-stickerings.ts
2521
- async function cubeAppearance(puzzleLoader, stickering) {
2522
- const def = await puzzleLoader.def();
2523
- const puzzleStickering = new PuzzleStickering(def);
2524
- const m = new StickeringManager(def);
2525
- const LL = () => m.move("U");
2526
- const orUD = () => m.or(m.moves(["U", "D"]));
2527
- const E = () => m.not(orUD());
2528
- const orLR = () => m.or(m.moves(["L", "R"]));
2529
- const M = () => m.not(orLR());
2530
- const orFB = () => m.or(m.moves(["F", "B"]));
2531
- const S = () => m.not(orFB());
2532
- const F2L = () => m.not(LL());
2533
- const centerU = () => m.and([LL(), M(), S()]);
2534
- const edgeFR = () => m.and([m.and(m.moves(["F", "R"])), m.not(orUD())]);
2535
- const cornerDFR = () => m.and(m.moves(["D", "R", "F"]));
2536
- const slotFR = () => m.or([cornerDFR(), edgeFR()]);
2537
- const CENTERS = () => m.or([m.and([M(), E()]), m.and([M(), S()]), m.and([E(), S()])]);
2538
- const EDGES = () => m.or([
2539
- m.and([M(), orUD(), orFB()]),
2540
- m.and([E(), orLR(), orFB()]),
2541
- m.and([S(), orUD(), orLR()])
2542
- ]);
2543
- const CORNERS = () => m.not(m.or([CENTERS(), EDGES()]));
2544
- const L6E = () => m.or([M(), m.and([LL(), EDGES()])]);
2545
- function dimF2L() {
2546
- puzzleStickering.set(F2L(), PieceStickering.Dim);
2547
- }
2548
- function setPLL() {
2549
- puzzleStickering.set(LL(), PieceStickering.PermuteNonPrimary);
2550
- puzzleStickering.set(centerU(), PieceStickering.Dim);
2551
- }
2552
- function setOLL() {
2553
- puzzleStickering.set(LL(), PieceStickering.IgnoreNonPrimary);
2554
- puzzleStickering.set(centerU(), PieceStickering.Regular);
2555
- }
2556
- function dimOLL() {
2557
- puzzleStickering.set(LL(), PieceStickering.Ignoriented);
2558
- puzzleStickering.set(centerU(), PieceStickering.Dim);
2559
- }
2560
- switch (stickering) {
2561
- case "full":
2562
- break;
2563
- case "PLL":
2564
- dimF2L();
2565
- setPLL();
2566
- break;
2567
- case "CLS":
2568
- dimF2L();
2569
- puzzleStickering.set(m.and(m.moves(["D", "R", "F"])), PieceStickering.Regular);
2570
- puzzleStickering.set(LL(), PieceStickering.Ignoriented);
2571
- puzzleStickering.set(m.and([LL(), CORNERS()]), PieceStickering.IgnoreNonPrimary);
2572
- break;
2573
- case "OLL":
2574
- dimF2L();
2575
- setOLL();
2576
- break;
2577
- case "COLL":
2578
- dimF2L();
2579
- setPLL();
2580
- puzzleStickering.set(m.and([LL(), CORNERS()]), PieceStickering.Regular);
2581
- break;
2582
- case "OCLL":
2583
- dimF2L();
2584
- dimOLL();
2585
- puzzleStickering.set(m.and([LL(), CORNERS()]), PieceStickering.IgnoreNonPrimary);
2586
- break;
2587
- case "CLL":
2588
- dimF2L();
2589
- puzzleStickering.set(m.not(m.and([CORNERS(), LL()])), PieceStickering.Dim);
2590
- break;
2591
- case "ELL":
2592
- dimF2L();
2593
- puzzleStickering.set(LL(), PieceStickering.Dim);
2594
- puzzleStickering.set(m.and([LL(), EDGES()]), PieceStickering.Regular);
2595
- break;
2596
- case "ELS":
2597
- dimF2L();
2598
- setOLL();
2599
- puzzleStickering.set(m.and([LL(), CORNERS()]), PieceStickering.Ignored);
2600
- puzzleStickering.set(edgeFR(), PieceStickering.Regular);
2601
- puzzleStickering.set(cornerDFR(), PieceStickering.Ignored);
2602
- break;
2603
- case "LL":
2604
- dimF2L();
2605
- break;
2606
- case "F2L":
2607
- puzzleStickering.set(LL(), PieceStickering.Ignored);
2608
- break;
2609
- case "ZBLL":
2610
- dimF2L();
2611
- puzzleStickering.set(LL(), PieceStickering.PermuteNonPrimary);
2612
- puzzleStickering.set(centerU(), PieceStickering.Dim);
2613
- puzzleStickering.set(m.and([LL(), CORNERS()]), PieceStickering.Regular);
2614
- break;
2615
- case "ZBLS":
2616
- dimF2L();
2617
- puzzleStickering.set(slotFR(), PieceStickering.Regular);
2618
- setOLL();
2619
- puzzleStickering.set(m.and([LL(), CORNERS()]), PieceStickering.Ignored);
2620
- break;
2621
- case "WVLS":
2622
- case "VLS":
2623
- dimF2L();
2624
- puzzleStickering.set(slotFR(), PieceStickering.Regular);
2625
- setOLL();
2626
- break;
2627
- case "LS":
2628
- dimF2L();
2629
- puzzleStickering.set(slotFR(), PieceStickering.Regular);
2630
- puzzleStickering.set(LL(), PieceStickering.Ignored);
2631
- puzzleStickering.set(centerU(), PieceStickering.Dim);
2632
- break;
2633
- case "EO":
2634
- puzzleStickering.set(CORNERS(), PieceStickering.Ignored);
2635
- puzzleStickering.set(EDGES(), PieceStickering.OrientationWithoutPermutation);
2636
- break;
2637
- case "CMLL":
2638
- puzzleStickering.set(F2L(), PieceStickering.Dim);
2639
- puzzleStickering.set(L6E(), PieceStickering.Ignored);
2640
- puzzleStickering.set(m.and([LL(), CORNERS()]), PieceStickering.Regular);
2641
- break;
2642
- case "L6E":
2643
- puzzleStickering.set(m.not(L6E()), PieceStickering.Dim);
2644
- break;
2645
- case "L6EO":
2646
- puzzleStickering.set(m.not(L6E()), PieceStickering.Dim);
2647
- puzzleStickering.set(L6E(), PieceStickering.OrientationWithoutPermutation);
2648
- puzzleStickering.set(m.and([CENTERS(), orUD()]), PieceStickering.OrientationStickers);
2649
- break;
2650
- case "Daisy":
2651
- puzzleStickering.set(m.all(), PieceStickering.Ignored);
2652
- puzzleStickering.set(CENTERS(), PieceStickering.Dim);
2653
- puzzleStickering.set(m.and([m.move("D"), CENTERS()]), PieceStickering.Regular);
2654
- puzzleStickering.set(m.and([m.move("U"), EDGES()]), PieceStickering.IgnoreNonPrimary);
2655
- break;
2656
- case "Cross":
2657
- puzzleStickering.set(m.all(), PieceStickering.Ignored);
2658
- puzzleStickering.set(CENTERS(), PieceStickering.Dim);
2659
- puzzleStickering.set(m.and([m.move("D"), CENTERS()]), PieceStickering.Regular);
2660
- puzzleStickering.set(m.and([m.move("D"), EDGES()]), PieceStickering.Regular);
2661
- break;
2662
- case "2x2x2":
2663
- puzzleStickering.set(m.or(m.moves(["U", "F", "R"])), PieceStickering.Ignored);
2664
- puzzleStickering.set(m.and([m.or(m.moves(["U", "F", "R"])), CENTERS()]), PieceStickering.Dim);
2665
- break;
2666
- case "2x2x3":
2667
- puzzleStickering.set(m.all(), PieceStickering.Dim);
2668
- puzzleStickering.set(m.or(m.moves(["U", "F", "R"])), PieceStickering.Ignored);
2669
- puzzleStickering.set(m.and([m.or(m.moves(["U", "F", "R"])), CENTERS()]), PieceStickering.Dim);
2670
- puzzleStickering.set(m.and([m.move("F"), m.not(m.or(m.moves(["U", "R"])))]), PieceStickering.Regular);
2671
- break;
2672
- case "Void Cube":
2673
- puzzleStickering.set(CENTERS(), PieceStickering.Invisible);
2674
- break;
2675
- case "picture":
2676
- case "invisible":
2677
- puzzleStickering.set(m.all(), PieceStickering.Invisible);
2678
- break;
2679
- case "centers-only":
2680
- puzzleStickering.set(m.not(CENTERS()), PieceStickering.Ignored);
2681
- break;
2682
- default:
2683
- console.warn(`Unsupported stickering for ${puzzleLoader.id}: ${stickering}. Setting all pieces to dim.`);
2684
- puzzleStickering.set(m.and(m.moves([])), PieceStickering.Dim);
2685
- }
2686
- return puzzleStickering.toAppearance();
2687
- }
2688
- async function cubeStickerings() {
2689
- return [
2690
- "full",
2691
- "PLL",
2692
- "CLS",
2693
- "OLL",
2694
- "COLL",
2695
- "OCLL",
2696
- "ELL",
2697
- "ELS",
2698
- "LL",
2699
- "F2L",
2700
- "ZBLL",
2701
- "ZBLS",
2702
- "WVLS",
2703
- "VLS",
2704
- "LS",
2705
- "EO",
2706
- "CMLL",
2707
- "L6E",
2708
- "L6EO",
2709
- "Daisy",
2710
- "Cross",
2711
- "2x2x2",
2712
- "2x2x3",
2713
- "Void Cube",
2714
- "picture",
2715
- "invisible",
2716
- "centers-only"
2717
- ];
2718
- }
2719
-
2720
- // src/cubing/puzzles/async/async-pg3d.ts
2721
- async function asyncGetPuzzleGeometry(puzzleName) {
2722
- const puzzleGeometry = await import("./puzzle-geometry/index.js");
2723
- return puzzleGeometry.getPuzzleGeometryByName(puzzleName, [
2724
- "allmoves",
2725
- "true",
2726
- "orientcenters",
2727
- "true",
2728
- "rotations",
2729
- "true"
2730
- ]);
2731
- }
2732
- async function asyncGetDef(puzzleName) {
2733
- return (await asyncGetPuzzleGeometry(puzzleName)).writekpuzzle(true);
2734
- }
2735
- function genericPGPuzzleLoader(id, fullName, info) {
2736
- const puzzleLoader = {
2737
- id,
2738
- fullName,
2739
- def: async () => {
2740
- return asyncGetDef(id);
2741
- },
2742
- svg: async () => {
2743
- const pg = await asyncGetPuzzleGeometry(id);
2744
- return pg.generatesvg();
2745
- },
2746
- pg: async () => {
2747
- return asyncGetPuzzleGeometry(id);
2748
- }
2749
- };
2750
- if (info?.inventedBy) {
2751
- puzzleLoader.inventedBy = info.inventedBy;
2752
- }
2753
- if (info?.inventionYear) {
2754
- puzzleLoader.inventionYear = info.inventionYear;
2755
- }
2756
- return puzzleLoader;
2757
- }
2758
- function cubePGPuzzleLoader(id, fullName, info) {
2759
- const puzzleLoader = genericPGPuzzleLoader(id, fullName, info);
2760
- puzzleLoader.appearance = cubeAppearance.bind(cubeAppearance, puzzleLoader);
2761
- puzzleLoader.stickerings = cubeStickerings;
2762
- return puzzleLoader;
2763
- }
2764
-
2765
- // src/cubing/puzzles/implementations/2x2x2/index.ts
2766
- var cube2x2x2 = {
2767
- id: "2x2x2",
2768
- fullName: "2\xD72\xD72 Cube",
2769
- def: async () => {
2770
- return (await import("./2x2x2.kpuzzle.json_-ZLJSYD5K.js")).cube2x2x2KPuzzle;
2771
- },
2772
- svg: async () => {
2773
- return (await import("./2x2x2.kpuzzle.svg-BNXPAM3A.js")).default;
2774
- },
2775
- pg: async () => {
2776
- return asyncGetPuzzleGeometry("2x2x2");
2777
- },
2778
- appearance: (stickering) => cubeAppearance(cube2x2x2, stickering),
2779
- stickerings: cubeStickerings
2780
- };
2781
-
2782
- // src/cubing/puzzles/implementations/3x3x3/index.ts
2783
- var cube3x3x3 = {
2784
- id: "3x3x3",
2785
- fullName: "3\xD73\xD73 Cube",
2786
- inventedBy: ["Ern\u0151 Rubik"],
2787
- inventionYear: 1974,
2788
- def: async () => {
2789
- return cube3x3x3KPuzzle;
2790
- },
2791
- svg: async () => {
2792
- return (await import("./3x3x3.kpuzzle.svg-DUKG2WHC.js")).default;
2793
- },
2794
- llSVG: async () => {
2795
- return (await import("./3x3x3-ll.kpuzzle.svg-EC42JHOH.js")).default;
2796
- },
2797
- pg: async () => {
2798
- return asyncGetPuzzleGeometry("3x3x3");
2799
- },
2800
- appearance: (stickering) => cubeAppearance(cube3x3x3, stickering),
2801
- stickerings: cubeStickerings
2802
- };
2803
-
2804
- // src/cubing/puzzles/implementations/clock/index.ts
2805
- var clock = {
2806
- id: "clock",
2807
- fullName: "Clock",
2808
- inventedBy: ["Christopher C. Wiggs", "Christopher J. Taylor"],
2809
- inventionYear: 1988,
2810
- def: async () => {
2811
- return (await import("./clock.kpuzzle.json_-PXORG6YF.js")).clockKPuzzle;
2812
- },
2813
- svg: async () => {
2814
- return (await import("./clock.kpuzzle.svg-E52B5OQV.js")).default;
2815
- }
2816
- };
2817
-
2818
- // src/cubing/puzzles/stickerings/fto-stickerings.ts
2819
- async function ftoStickering(puzzleLoader, stickering) {
2820
- const def = await puzzleLoader.def();
2821
- const puzzleStickering = new PuzzleStickering(def);
2822
- const m = new StickeringManager(def);
2823
- const experimentalFTO_FC = () => m.and([m.move("U"), m.not(m.or(m.moves(["F", "BL", "BR"])))]);
2824
- const experimentalFTO_F2T = () => m.and([m.move("U"), m.not(m.move("F"))]);
2825
- const experimentalFTO_SC = () => m.or([
2826
- experimentalFTO_F2T(),
2827
- m.and([m.move("F"), m.not(m.or(m.moves(["U", "BL", "BR"])))])
2828
- ]);
2829
- const experimentalFTO_L2C = () => m.not(m.or([
2830
- m.and([m.move("U"), m.move("F")]),
2831
- m.and([m.move("F"), m.move("BL")]),
2832
- m.and([m.move("F"), m.move("BR")]),
2833
- m.and([m.move("BL"), m.move("BR")])
2834
- ]));
2835
- const experimentalFTO_LBT = () => m.not(m.or([
2836
- m.and([m.move("F"), m.move("BL")]),
2837
- m.and([m.move("F"), m.move("BR")])
2838
- ]));
2839
- switch (stickering) {
2840
- case "full":
2841
- break;
2842
- case "experimental-fto-fc":
2843
- puzzleStickering.set(m.not(experimentalFTO_FC()), PieceStickering.Ignored);
2844
- break;
2845
- case "experimental-fto-f2t":
2846
- puzzleStickering.set(m.not(experimentalFTO_F2T()), PieceStickering.Ignored);
2847
- break;
2848
- case "experimental-fto-sc":
2849
- puzzleStickering.set(m.not(experimentalFTO_SC()), PieceStickering.Ignored);
2850
- break;
2851
- case "experimental-fto-l2c":
2852
- puzzleStickering.set(m.not(experimentalFTO_L2C()), PieceStickering.Ignored);
2853
- break;
2854
- case "experimental-fto-lbt":
2855
- puzzleStickering.set(m.not(experimentalFTO_LBT()), PieceStickering.Ignored);
2856
- break;
2857
- default:
2858
- console.warn(`Unsupported stickering for ${puzzleLoader.id}: ${stickering}. Setting all pieces to dim.`);
2859
- puzzleStickering.set(m.and(m.moves([])), PieceStickering.Dim);
2860
- }
2861
- return puzzleStickering.toAppearance();
2862
- }
2863
- async function ftoStickerings() {
2864
- return [
2865
- "full",
2866
- "experimental-fto-fc",
2867
- "experimental-fto-f2t",
2868
- "experimental-fto-sc",
2869
- "experimental-fto-l2c",
2870
- "experimental-fto-lbt"
2871
- ];
2872
- }
2873
-
2874
- // src/cubing/puzzles/implementations/fto/index.ts
2875
- var fto = genericPGPuzzleLoader("FTO", "Face-Turning Octahedron", {
2876
- inventedBy: ["Karl Rohrbach", "David Pitcher"],
2877
- inventionYear: 1983
2878
- });
2879
- fto.appearance = (stickering) => ftoStickering(fto, stickering);
2880
- fto.stickerings = ftoStickerings;
2881
-
2882
- // src/cubing/puzzles/stickerings/megaminx-stickerings.ts
2883
- async function megaminxAppearance(puzzleLoader, stickering) {
2884
- switch (stickering) {
2885
- case "full":
2886
- case "F2L":
2887
- case "LL":
2888
- return cubeAppearance(puzzleLoader, stickering);
2889
- default:
2890
- console.warn(`Unsupported stickering for ${puzzleLoader.id}: ${stickering}. Setting all pieces to dim.`);
2891
- }
2892
- return cubeAppearance(puzzleLoader, "full");
2893
- }
2894
- async function megaminxStickerings() {
2895
- return ["full", "F2L", "LL"];
2896
- }
2897
-
2898
- // src/cubing/puzzles/implementations/megaminx/index.ts
2899
- var megaminx = genericPGPuzzleLoader("megaminx", "Megaminx", {
2900
- inventionYear: 1981
2901
- });
2902
- megaminx.appearance = (stickering) => megaminxAppearance(megaminx, stickering);
2903
- megaminx.stickerings = megaminxStickerings;
2904
-
2905
- // src/cubing/puzzles/implementations/pyraminx/index.ts
2906
- var pyraminx = {
2907
- id: "pyraminx",
2908
- fullName: "Pyraminx",
2909
- inventedBy: ["Uwe Meffert"],
2910
- inventionYear: 1970,
2911
- def: async () => {
2912
- return asyncGetDef("pyraminx");
2913
- },
2914
- svg: async () => {
2915
- return (await import("./pyraminx.kpuzzle.svg-QKUJX37T.js")).default;
2916
- },
2917
- pg: async () => {
2918
- return asyncGetPuzzleGeometry("pyraminx");
2919
- }
2920
- };
2921
-
2922
- // src/cubing/puzzles/implementations/square1/index.ts
2923
- var square1 = {
2924
- id: "square1",
2925
- fullName: "Square-1",
2926
- inventedBy: ["Karel Hr\u0161el", "Vojtech Kopsk\xFD"],
2927
- inventionYear: 1990,
2928
- def: async () => {
2929
- return (await import("./sq1-hyperorbit.kpuzzle.json_-7KW5LSXC.js")).sq1HyperOrbitKPuzzle;
2930
- },
2931
- svg: async () => {
2932
- return (await import("./sq1-hyperorbit.kpuzzle.svg-7Y7N37NN.js")).default;
2933
- }
2934
- };
2935
-
2936
- // src/cubing/puzzles/index.ts
2937
- var puzzles = {
2938
- "3x3x3": cube3x3x3,
2939
- "2x2x2": cube2x2x2,
2940
- "4x4x4": cubePGPuzzleLoader("4x4x4", "4\xD74\xD74 Cube"),
2941
- "5x5x5": cubePGPuzzleLoader("5x5x5", "5\xD75\xD75 Cube"),
2942
- "6x6x6": cubePGPuzzleLoader("6x6x6", "6\xD76\xD76 Cube"),
2943
- "7x7x7": cubePGPuzzleLoader("7x7x7", "7\xD77\xD77 Cube"),
2944
- "40x40x40": cubePGPuzzleLoader("40x40x40", "40\xD740\xD740 Cube"),
2945
- clock,
2946
- "megaminx": megaminx,
2947
- pyraminx,
2948
- "skewb": genericPGPuzzleLoader("skewb", "Skewb", {
2949
- inventedBy: ["Tony Durham"]
2950
- }),
2951
- square1,
2952
- "fto": fto,
2953
- "gigaminx": genericPGPuzzleLoader("gigaminx", "Gigaminx", {
2954
- inventedBy: ["Tyler Fox"],
2955
- inventionYear: 2006
2956
- }),
2957
- "master_tetraminx": genericPGPuzzleLoader("master tetraminx", "Master Tetraminx", {
2958
- inventedBy: ["Katsuhiko Okamoto"],
2959
- inventionYear: 2002
2960
- })
2961
- };
2962
- var wcaEvents = {
2963
- "333": "3x3x3",
2964
- "222": "2x2x2",
2965
- "444": "4x4x4",
2966
- "555": "5x5x5",
2967
- "666": "6x6x6",
2968
- "777": "7x7x7",
2969
- "333bf": "3x3x3",
2970
- "333fm": "3x3x3",
2971
- "333oh": "3x3x3",
2972
- "clock": "clock",
2973
- "minx": "megaminx",
2974
- "pyram": "pyraminx",
2975
- "skewb": "skewb",
2976
- "sq1": "square1",
2977
- "444bf": "4x4x4",
2978
- "555bf": "5x5x5"
2979
- };
2980
- function puzzleIDForWCAEvent(event) {
2981
- return wcaEvents[event] ?? null;
2982
- }
2983
-
2984
2332
  export {
2985
2333
  combineTransformations,
2986
2334
  multiplyTransformations,
@@ -2999,11 +2347,6 @@ export {
2999
2347
  pegParseKPuzzleDefinition,
3000
2348
  KPuzzleSVGWrapper,
3001
2349
  cube3x3x3KPuzzle,
3002
- getFaceletAppearance,
3003
- cube2x2x2,
3004
- cube3x3x3,
3005
- puzzles,
3006
- puzzleIDForWCAEvent,
3007
2350
  normalizePuzzleOrientation,
3008
2351
  reid3x3x3ToTwizzleBinary,
3009
2352
  twizzleBinaryToBinaryComponents,
@@ -3013,4 +2356,4 @@ export {
3013
2356
  spacedHexToBuffer,
3014
2357
  experimentalIs3x3x3Solved
3015
2358
  };
3016
- //# sourceMappingURL=chunk-CWVB5RRW.js.map
2359
+ //# sourceMappingURL=chunk-YV3RT5PX.js.map