diff --git a/assets/sounds/metronome/high.mp3 b/assets/sounds/metronome/high.mp3 new file mode 100644 index 0000000..d243b37 Binary files /dev/null and b/assets/sounds/metronome/high.mp3 differ diff --git a/assets/sounds/metronome/low.mp3 b/assets/sounds/metronome/low.mp3 new file mode 100644 index 0000000..578107e Binary files /dev/null and b/assets/sounds/metronome/low.mp3 differ diff --git a/assets/sounds/ui/menu_ding.mp3 b/assets/sounds/ui/menu_ding.mp3 new file mode 100644 index 0000000..9e8345e Binary files /dev/null and b/assets/sounds/ui/menu_ding.mp3 differ diff --git a/assets/sounds/ui/menu_ding.ogg b/assets/sounds/ui/menu_ding.ogg new file mode 100644 index 0000000..4cbf3bf Binary files /dev/null and b/assets/sounds/ui/menu_ding.ogg differ diff --git a/assets/sounds/ui/menu_ding.wav b/assets/sounds/ui/menu_ding.wav deleted file mode 100644 index 11fd7c5..0000000 Binary files a/assets/sounds/ui/menu_ding.wav and /dev/null differ diff --git a/index.html b/index.html index f2e8a7f..08f5b60 100644 --- a/index.html +++ b/index.html @@ -6,4 +6,4 @@ background-color: black; overflow: hidden; -webkit-app-region: drag; - } \ No newline at end of file + } \ No newline at end of file diff --git a/levels/Birthday Vibes/bass/aSharp.mp3 b/levels/Birthday Vibes/bass/aSharp.mp3 new file mode 100644 index 0000000..3508eec Binary files /dev/null and b/levels/Birthday Vibes/bass/aSharp.mp3 differ diff --git a/levels/Birthday Vibes/bass/c.mp3 b/levels/Birthday Vibes/bass/c.mp3 new file mode 100644 index 0000000..970d810 Binary files /dev/null and b/levels/Birthday Vibes/bass/c.mp3 differ diff --git a/levels/Birthday Vibes/bass/d.mp3 b/levels/Birthday Vibes/bass/d.mp3 new file mode 100644 index 0000000..d831298 Binary files /dev/null and b/levels/Birthday Vibes/bass/d.mp3 differ diff --git a/levels/Birthday Vibes/bass/dSharp.mp3 b/levels/Birthday Vibes/bass/dSharp.mp3 new file mode 100644 index 0000000..1880419 Binary files /dev/null and b/levels/Birthday Vibes/bass/dSharp.mp3 differ diff --git a/levels/Birthday Vibes/bass/f.mp3 b/levels/Birthday Vibes/bass/f.mp3 new file mode 100644 index 0000000..8a4df47 Binary files /dev/null and b/levels/Birthday Vibes/bass/f.mp3 differ diff --git a/levels/Birthday Vibes/bass/g.mp3 b/levels/Birthday Vibes/bass/g.mp3 new file mode 100644 index 0000000..45e29c8 Binary files /dev/null and b/levels/Birthday Vibes/bass/g.mp3 differ diff --git a/levels/Birthday Vibes/bass/loop115.mp3 b/levels/Birthday Vibes/bass/loop115.mp3 new file mode 100644 index 0000000..09dc705 Binary files /dev/null and b/levels/Birthday Vibes/bass/loop115.mp3 differ diff --git a/levels/Birthday Vibes/bass/loop130.mp3 b/levels/Birthday Vibes/bass/loop130.mp3 new file mode 100644 index 0000000..b5ec6eb Binary files /dev/null and b/levels/Birthday Vibes/bass/loop130.mp3 differ diff --git a/levels/Birthday Vibes/bass/loop90.mp3 b/levels/Birthday Vibes/bass/loop90.mp3 new file mode 100644 index 0000000..645b99b Binary files /dev/null and b/levels/Birthday Vibes/bass/loop90.mp3 differ diff --git a/levels/Birthday Vibes/chords/chord1.mp3 b/levels/Birthday Vibes/chords/chord1.mp3 new file mode 100644 index 0000000..347f666 Binary files /dev/null and b/levels/Birthday Vibes/chords/chord1.mp3 differ diff --git a/levels/Birthday Vibes/chords/chord2.mp3 b/levels/Birthday Vibes/chords/chord2.mp3 new file mode 100644 index 0000000..f09878d Binary files /dev/null and b/levels/Birthday Vibes/chords/chord2.mp3 differ diff --git a/levels/Birthday Vibes/chords/chord3.mp3 b/levels/Birthday Vibes/chords/chord3.mp3 new file mode 100644 index 0000000..fca0e54 Binary files /dev/null and b/levels/Birthday Vibes/chords/chord3.mp3 differ diff --git a/levels/Birthday Vibes/chords/chord4.mp3 b/levels/Birthday Vibes/chords/chord4.mp3 new file mode 100644 index 0000000..9bb866a Binary files /dev/null and b/levels/Birthday Vibes/chords/chord4.mp3 differ diff --git a/levels/Birthday Vibes/chords/loop115.mp3 b/levels/Birthday Vibes/chords/loop115.mp3 new file mode 100644 index 0000000..3963c33 Binary files /dev/null and b/levels/Birthday Vibes/chords/loop115.mp3 differ diff --git a/levels/Birthday Vibes/chords/loop130.mp3 b/levels/Birthday Vibes/chords/loop130.mp3 new file mode 100644 index 0000000..4f95da3 Binary files /dev/null and b/levels/Birthday Vibes/chords/loop130.mp3 differ diff --git a/levels/Birthday Vibes/chords/loop90.mp3 b/levels/Birthday Vibes/chords/loop90.mp3 new file mode 100644 index 0000000..23b68a5 Binary files /dev/null and b/levels/Birthday Vibes/chords/loop90.mp3 differ diff --git a/levels/Birthday Vibes/drums/loop115.mp3 b/levels/Birthday Vibes/drums/loop115.mp3 new file mode 100644 index 0000000..1156d9d Binary files /dev/null and b/levels/Birthday Vibes/drums/loop115.mp3 differ diff --git a/levels/Birthday Vibes/drums/loop130.mp3 b/levels/Birthday Vibes/drums/loop130.mp3 new file mode 100644 index 0000000..94a36a8 Binary files /dev/null and b/levels/Birthday Vibes/drums/loop130.mp3 differ diff --git a/levels/Birthday Vibes/drums/loop90.mp3 b/levels/Birthday Vibes/drums/loop90.mp3 new file mode 100644 index 0000000..92f8060 Binary files /dev/null and b/levels/Birthday Vibes/drums/loop90.mp3 differ diff --git a/levels/Birthday Vibes/lead/aSharp.mp3 b/levels/Birthday Vibes/lead/aSharp.mp3 new file mode 100644 index 0000000..30d9c13 Binary files /dev/null and b/levels/Birthday Vibes/lead/aSharp.mp3 differ diff --git a/levels/Birthday Vibes/lead/c.mp3 b/levels/Birthday Vibes/lead/c.mp3 new file mode 100644 index 0000000..9dba86d Binary files /dev/null and b/levels/Birthday Vibes/lead/c.mp3 differ diff --git a/levels/Birthday Vibes/lead/d.mp3 b/levels/Birthday Vibes/lead/d.mp3 new file mode 100644 index 0000000..cb56e9c Binary files /dev/null and b/levels/Birthday Vibes/lead/d.mp3 differ diff --git a/levels/Birthday Vibes/lead/f.mp3 b/levels/Birthday Vibes/lead/f.mp3 new file mode 100644 index 0000000..94dbe83 Binary files /dev/null and b/levels/Birthday Vibes/lead/f.mp3 differ diff --git a/levels/Birthday Vibes/lead/g.mp3 b/levels/Birthday Vibes/lead/g.mp3 new file mode 100644 index 0000000..d7f93bd Binary files /dev/null and b/levels/Birthday Vibes/lead/g.mp3 differ diff --git a/levels/Birthday Vibes/lead/loop115.mp3 b/levels/Birthday Vibes/lead/loop115.mp3 new file mode 100644 index 0000000..bc3a650 Binary files /dev/null and b/levels/Birthday Vibes/lead/loop115.mp3 differ diff --git a/levels/Birthday Vibes/lead/loop130.mp3 b/levels/Birthday Vibes/lead/loop130.mp3 new file mode 100644 index 0000000..041a58e Binary files /dev/null and b/levels/Birthday Vibes/lead/loop130.mp3 differ diff --git a/levels/Birthday Vibes/lead/loop90.mp3 b/levels/Birthday Vibes/lead/loop90.mp3 new file mode 100644 index 0000000..67c83a4 Binary files /dev/null and b/levels/Birthday Vibes/lead/loop90.mp3 differ diff --git a/levels/Cheerful Bliss/bass/a_2.mp3 b/levels/Cheerful Bliss/bass/a_2.mp3 new file mode 100644 index 0000000..f75f5e8 Binary files /dev/null and b/levels/Cheerful Bliss/bass/a_2.mp3 differ diff --git a/levels/Cheerful Bliss/bass/c_4.mp3 b/levels/Cheerful Bliss/bass/c_4.mp3 new file mode 100644 index 0000000..5edb05a Binary files /dev/null and b/levels/Cheerful Bliss/bass/c_4.mp3 differ diff --git a/levels/Cheerful Bliss/bass/c_6.mp3 b/levels/Cheerful Bliss/bass/c_6.mp3 new file mode 100644 index 0000000..91a95c8 Binary files /dev/null and b/levels/Cheerful Bliss/bass/c_6.mp3 differ diff --git a/levels/Cheerful Bliss/bass/d_2.mp3 b/levels/Cheerful Bliss/bass/d_2.mp3 new file mode 100644 index 0000000..3b1451b Binary files /dev/null and b/levels/Cheerful Bliss/bass/d_2.mp3 differ diff --git a/levels/Cheerful Bliss/bass/d_4.mp3 b/levels/Cheerful Bliss/bass/d_4.mp3 new file mode 100644 index 0000000..ef90850 Binary files /dev/null and b/levels/Cheerful Bliss/bass/d_4.mp3 differ diff --git a/levels/Cheerful Bliss/bass/d_6.mp3 b/levels/Cheerful Bliss/bass/d_6.mp3 new file mode 100644 index 0000000..b59883b Binary files /dev/null and b/levels/Cheerful Bliss/bass/d_6.mp3 differ diff --git a/levels/Cheerful Bliss/bass/e_4.mp3 b/levels/Cheerful Bliss/bass/e_4.mp3 new file mode 100644 index 0000000..cc4e3ec Binary files /dev/null and b/levels/Cheerful Bliss/bass/e_4.mp3 differ diff --git a/levels/Cheerful Bliss/bass/e_6.mp3 b/levels/Cheerful Bliss/bass/e_6.mp3 new file mode 100644 index 0000000..4906b15 Binary files /dev/null and b/levels/Cheerful Bliss/bass/e_6.mp3 differ diff --git a/levels/Cheerful Bliss/bass/e_8.mp3 b/levels/Cheerful Bliss/bass/e_8.mp3 new file mode 100644 index 0000000..a6b8237 Binary files /dev/null and b/levels/Cheerful Bliss/bass/e_8.mp3 differ diff --git a/levels/Cheerful Bliss/bass/f_4.mp3 b/levels/Cheerful Bliss/bass/f_4.mp3 new file mode 100644 index 0000000..8211311 Binary files /dev/null and b/levels/Cheerful Bliss/bass/f_4.mp3 differ diff --git a/levels/Cheerful Bliss/bass/f_6.mp3 b/levels/Cheerful Bliss/bass/f_6.mp3 new file mode 100644 index 0000000..30c1000 Binary files /dev/null and b/levels/Cheerful Bliss/bass/f_6.mp3 differ diff --git a/levels/Cheerful Bliss/bass/f_8.mp3 b/levels/Cheerful Bliss/bass/f_8.mp3 new file mode 100644 index 0000000..502d55d Binary files /dev/null and b/levels/Cheerful Bliss/bass/f_8.mp3 differ diff --git a/levels/Cheerful Bliss/bass/g_2.mp3 b/levels/Cheerful Bliss/bass/g_2.mp3 new file mode 100644 index 0000000..d186177 Binary files /dev/null and b/levels/Cheerful Bliss/bass/g_2.mp3 differ diff --git a/levels/Cheerful Bliss/bass/g_4.mp3 b/levels/Cheerful Bliss/bass/g_4.mp3 new file mode 100644 index 0000000..d186177 Binary files /dev/null and b/levels/Cheerful Bliss/bass/g_4.mp3 differ diff --git a/levels/Cheerful Bliss/bass/loop115.mp3 b/levels/Cheerful Bliss/bass/loop115.mp3 new file mode 100644 index 0000000..294133b Binary files /dev/null and b/levels/Cheerful Bliss/bass/loop115.mp3 differ diff --git a/levels/Cheerful Bliss/bass/loop130.mp3 b/levels/Cheerful Bliss/bass/loop130.mp3 new file mode 100644 index 0000000..d30c7a5 Binary files /dev/null and b/levels/Cheerful Bliss/bass/loop130.mp3 differ diff --git a/levels/Cheerful Bliss/bass/loop90.mp3 b/levels/Cheerful Bliss/bass/loop90.mp3 new file mode 100644 index 0000000..00c0028 Binary files /dev/null and b/levels/Cheerful Bliss/bass/loop90.mp3 differ diff --git a/levels/Cheerful Bliss/chords/chord1.mp3 b/levels/Cheerful Bliss/chords/chord1.mp3 new file mode 100644 index 0000000..2a010dd Binary files /dev/null and b/levels/Cheerful Bliss/chords/chord1.mp3 differ diff --git a/levels/Cheerful Bliss/chords/chord25.mp3 b/levels/Cheerful Bliss/chords/chord25.mp3 new file mode 100644 index 0000000..7ac3f85 Binary files /dev/null and b/levels/Cheerful Bliss/chords/chord25.mp3 differ diff --git a/levels/Cheerful Bliss/chords/chord3.mp3 b/levels/Cheerful Bliss/chords/chord3.mp3 new file mode 100644 index 0000000..4c91da9 Binary files /dev/null and b/levels/Cheerful Bliss/chords/chord3.mp3 differ diff --git a/levels/Cheerful Bliss/chords/chord4.mp3 b/levels/Cheerful Bliss/chords/chord4.mp3 new file mode 100644 index 0000000..fc5f7c8 Binary files /dev/null and b/levels/Cheerful Bliss/chords/chord4.mp3 differ diff --git a/levels/Cheerful Bliss/chords/chord6.mp3 b/levels/Cheerful Bliss/chords/chord6.mp3 new file mode 100644 index 0000000..dc65457 Binary files /dev/null and b/levels/Cheerful Bliss/chords/chord6.mp3 differ diff --git a/levels/Cheerful Bliss/chords/chord7.mp3 b/levels/Cheerful Bliss/chords/chord7.mp3 new file mode 100644 index 0000000..0453a55 Binary files /dev/null and b/levels/Cheerful Bliss/chords/chord7.mp3 differ diff --git a/levels/Cheerful Bliss/chords/chord8.mp3 b/levels/Cheerful Bliss/chords/chord8.mp3 new file mode 100644 index 0000000..bde26bf Binary files /dev/null and b/levels/Cheerful Bliss/chords/chord8.mp3 differ diff --git a/levels/Cheerful Bliss/chords/loop115.mp3 b/levels/Cheerful Bliss/chords/loop115.mp3 new file mode 100644 index 0000000..ee8b2a8 Binary files /dev/null and b/levels/Cheerful Bliss/chords/loop115.mp3 differ diff --git a/levels/Cheerful Bliss/chords/loop130.mp3 b/levels/Cheerful Bliss/chords/loop130.mp3 new file mode 100644 index 0000000..0cd6c38 Binary files /dev/null and b/levels/Cheerful Bliss/chords/loop130.mp3 differ diff --git a/levels/Cheerful Bliss/chords/loop90.mp3 b/levels/Cheerful Bliss/chords/loop90.mp3 new file mode 100644 index 0000000..bffee2f Binary files /dev/null and b/levels/Cheerful Bliss/chords/loop90.mp3 differ diff --git a/levels/Cheerful Bliss/drums/loop115.mp3 b/levels/Cheerful Bliss/drums/loop115.mp3 new file mode 100644 index 0000000..0cc53b4 Binary files /dev/null and b/levels/Cheerful Bliss/drums/loop115.mp3 differ diff --git a/levels/Cheerful Bliss/drums/loop130.mp3 b/levels/Cheerful Bliss/drums/loop130.mp3 new file mode 100644 index 0000000..8691958 Binary files /dev/null and b/levels/Cheerful Bliss/drums/loop130.mp3 differ diff --git a/levels/Cheerful Bliss/drums/loop90.mp3 b/levels/Cheerful Bliss/drums/loop90.mp3 new file mode 100644 index 0000000..c8dec30 Binary files /dev/null and b/levels/Cheerful Bliss/drums/loop90.mp3 differ diff --git a/levels/Cheerful Bliss/lead/a5_4.mp3 b/levels/Cheerful Bliss/lead/a5_4.mp3 new file mode 100644 index 0000000..2feb85a Binary files /dev/null and b/levels/Cheerful Bliss/lead/a5_4.mp3 differ diff --git a/levels/Cheerful Bliss/lead/a6_4.mp3 b/levels/Cheerful Bliss/lead/a6_4.mp3 new file mode 100644 index 0000000..405b879 Binary files /dev/null and b/levels/Cheerful Bliss/lead/a6_4.mp3 differ diff --git a/levels/Cheerful Bliss/lead/a6_6.mp3 b/levels/Cheerful Bliss/lead/a6_6.mp3 new file mode 100644 index 0000000..6e6992f Binary files /dev/null and b/levels/Cheerful Bliss/lead/a6_6.mp3 differ diff --git a/levels/Cheerful Bliss/lead/a6_8.mp3 b/levels/Cheerful Bliss/lead/a6_8.mp3 new file mode 100644 index 0000000..92e6197 Binary files /dev/null and b/levels/Cheerful Bliss/lead/a6_8.mp3 differ diff --git a/levels/Cheerful Bliss/lead/b5_4.mp3 b/levels/Cheerful Bliss/lead/b5_4.mp3 new file mode 100644 index 0000000..c27864d Binary files /dev/null and b/levels/Cheerful Bliss/lead/b5_4.mp3 differ diff --git a/levels/Cheerful Bliss/lead/b5_6.mp3 b/levels/Cheerful Bliss/lead/b5_6.mp3 new file mode 100644 index 0000000..dafaf75 Binary files /dev/null and b/levels/Cheerful Bliss/lead/b5_6.mp3 differ diff --git a/levels/Cheerful Bliss/lead/b6_4.mp3 b/levels/Cheerful Bliss/lead/b6_4.mp3 new file mode 100644 index 0000000..e0f2e3e Binary files /dev/null and b/levels/Cheerful Bliss/lead/b6_4.mp3 differ diff --git a/levels/Cheerful Bliss/lead/b6_6.mp3 b/levels/Cheerful Bliss/lead/b6_6.mp3 new file mode 100644 index 0000000..d6aba5a Binary files /dev/null and b/levels/Cheerful Bliss/lead/b6_6.mp3 differ diff --git a/levels/Cheerful Bliss/lead/c_2.mp3 b/levels/Cheerful Bliss/lead/c_2.mp3 new file mode 100644 index 0000000..fd638d3 Binary files /dev/null and b/levels/Cheerful Bliss/lead/c_2.mp3 differ diff --git a/levels/Cheerful Bliss/lead/c_4.mp3 b/levels/Cheerful Bliss/lead/c_4.mp3 new file mode 100644 index 0000000..81da2de Binary files /dev/null and b/levels/Cheerful Bliss/lead/c_4.mp3 differ diff --git a/levels/Cheerful Bliss/lead/c_6.mp3 b/levels/Cheerful Bliss/lead/c_6.mp3 new file mode 100644 index 0000000..d152b21 Binary files /dev/null and b/levels/Cheerful Bliss/lead/c_6.mp3 differ diff --git a/levels/Cheerful Bliss/lead/d_2.mp3 b/levels/Cheerful Bliss/lead/d_2.mp3 new file mode 100644 index 0000000..d97fe29 Binary files /dev/null and b/levels/Cheerful Bliss/lead/d_2.mp3 differ diff --git a/levels/Cheerful Bliss/lead/d_4.mp3 b/levels/Cheerful Bliss/lead/d_4.mp3 new file mode 100644 index 0000000..386a661 Binary files /dev/null and b/levels/Cheerful Bliss/lead/d_4.mp3 differ diff --git a/levels/Cheerful Bliss/lead/e_12.mp3 b/levels/Cheerful Bliss/lead/e_12.mp3 new file mode 100644 index 0000000..2d82459 Binary files /dev/null and b/levels/Cheerful Bliss/lead/e_12.mp3 differ diff --git a/levels/Cheerful Bliss/lead/e_2.mp3 b/levels/Cheerful Bliss/lead/e_2.mp3 new file mode 100644 index 0000000..5316731 Binary files /dev/null and b/levels/Cheerful Bliss/lead/e_2.mp3 differ diff --git a/levels/Cheerful Bliss/lead/e_4.mp3 b/levels/Cheerful Bliss/lead/e_4.mp3 new file mode 100644 index 0000000..a2f6ab2 Binary files /dev/null and b/levels/Cheerful Bliss/lead/e_4.mp3 differ diff --git a/levels/Cheerful Bliss/lead/f_6.mp3 b/levels/Cheerful Bliss/lead/f_6.mp3 new file mode 100644 index 0000000..9273490 Binary files /dev/null and b/levels/Cheerful Bliss/lead/f_6.mp3 differ diff --git a/levels/Cheerful Bliss/lead/g_6.mp3 b/levels/Cheerful Bliss/lead/g_6.mp3 new file mode 100644 index 0000000..c48a230 Binary files /dev/null and b/levels/Cheerful Bliss/lead/g_6.mp3 differ diff --git a/levels/Cheerful Bliss/lead/loop115.mp3 b/levels/Cheerful Bliss/lead/loop115.mp3 new file mode 100644 index 0000000..18e8463 Binary files /dev/null and b/levels/Cheerful Bliss/lead/loop115.mp3 differ diff --git a/levels/Cheerful Bliss/lead/loop130.mp3 b/levels/Cheerful Bliss/lead/loop130.mp3 new file mode 100644 index 0000000..c3dc53a Binary files /dev/null and b/levels/Cheerful Bliss/lead/loop130.mp3 differ diff --git a/levels/Cheerful Bliss/lead/loop90.mp3 b/levels/Cheerful Bliss/lead/loop90.mp3 new file mode 100644 index 0000000..323957b Binary files /dev/null and b/levels/Cheerful Bliss/lead/loop90.mp3 differ diff --git a/levels/Slow Elegance/bass/dSharp_2.mp3 b/levels/Slow Elegance/bass/dSharp_2.mp3 new file mode 100644 index 0000000..b6ef6ca Binary files /dev/null and b/levels/Slow Elegance/bass/dSharp_2.mp3 differ diff --git a/levels/Slow Elegance/bass/dSharp_6.mp3 b/levels/Slow Elegance/bass/dSharp_6.mp3 new file mode 100644 index 0000000..584968f Binary files /dev/null and b/levels/Slow Elegance/bass/dSharp_6.mp3 differ diff --git a/levels/Slow Elegance/bass/f_2.mp3 b/levels/Slow Elegance/bass/f_2.mp3 new file mode 100644 index 0000000..9f5e7f6 Binary files /dev/null and b/levels/Slow Elegance/bass/f_2.mp3 differ diff --git a/levels/Slow Elegance/bass/f_6.mp3 b/levels/Slow Elegance/bass/f_6.mp3 new file mode 100644 index 0000000..c3c3477 Binary files /dev/null and b/levels/Slow Elegance/bass/f_6.mp3 differ diff --git a/levels/Slow Elegance/bass/gSharp_2.mp3 b/levels/Slow Elegance/bass/gSharp_2.mp3 new file mode 100644 index 0000000..f0bab81 Binary files /dev/null and b/levels/Slow Elegance/bass/gSharp_2.mp3 differ diff --git a/levels/Slow Elegance/bass/gSharp_6.mp3 b/levels/Slow Elegance/bass/gSharp_6.mp3 new file mode 100644 index 0000000..d3e9470 Binary files /dev/null and b/levels/Slow Elegance/bass/gSharp_6.mp3 differ diff --git a/levels/Slow Elegance/bass/loop115.mp3 b/levels/Slow Elegance/bass/loop115.mp3 new file mode 100644 index 0000000..baf9ecc Binary files /dev/null and b/levels/Slow Elegance/bass/loop115.mp3 differ diff --git a/levels/Slow Elegance/bass/loop130.mp3 b/levels/Slow Elegance/bass/loop130.mp3 new file mode 100644 index 0000000..49fec50 Binary files /dev/null and b/levels/Slow Elegance/bass/loop130.mp3 differ diff --git a/levels/Slow Elegance/bass/loop90.mp3 b/levels/Slow Elegance/bass/loop90.mp3 new file mode 100644 index 0000000..06c8deb Binary files /dev/null and b/levels/Slow Elegance/bass/loop90.mp3 differ diff --git a/levels/Slow Elegance/chords/chord1.mp3 b/levels/Slow Elegance/chords/chord1.mp3 new file mode 100644 index 0000000..1de8dcb Binary files /dev/null and b/levels/Slow Elegance/chords/chord1.mp3 differ diff --git a/levels/Slow Elegance/chords/chord278.mp3 b/levels/Slow Elegance/chords/chord278.mp3 new file mode 100644 index 0000000..1c9737e Binary files /dev/null and b/levels/Slow Elegance/chords/chord278.mp3 differ diff --git a/levels/Slow Elegance/chords/chord3.mp3 b/levels/Slow Elegance/chords/chord3.mp3 new file mode 100644 index 0000000..6b2f2fe Binary files /dev/null and b/levels/Slow Elegance/chords/chord3.mp3 differ diff --git a/levels/Slow Elegance/chords/chord4.mp3 b/levels/Slow Elegance/chords/chord4.mp3 new file mode 100644 index 0000000..477ab56 Binary files /dev/null and b/levels/Slow Elegance/chords/chord4.mp3 differ diff --git a/levels/Slow Elegance/chords/chord5.mp3 b/levels/Slow Elegance/chords/chord5.mp3 new file mode 100644 index 0000000..12b50ea Binary files /dev/null and b/levels/Slow Elegance/chords/chord5.mp3 differ diff --git a/levels/Slow Elegance/chords/chord6.mp3 b/levels/Slow Elegance/chords/chord6.mp3 new file mode 100644 index 0000000..fdff160 Binary files /dev/null and b/levels/Slow Elegance/chords/chord6.mp3 differ diff --git a/levels/Slow Elegance/chords/loop115.mp3 b/levels/Slow Elegance/chords/loop115.mp3 new file mode 100644 index 0000000..438e42f Binary files /dev/null and b/levels/Slow Elegance/chords/loop115.mp3 differ diff --git a/levels/Slow Elegance/chords/loop130.mp3 b/levels/Slow Elegance/chords/loop130.mp3 new file mode 100644 index 0000000..c41a9ec Binary files /dev/null and b/levels/Slow Elegance/chords/loop130.mp3 differ diff --git a/levels/Slow Elegance/chords/loop90.mp3 b/levels/Slow Elegance/chords/loop90.mp3 new file mode 100644 index 0000000..fec736b Binary files /dev/null and b/levels/Slow Elegance/chords/loop90.mp3 differ diff --git a/levels/Slow Elegance/drums/loop115.mp3 b/levels/Slow Elegance/drums/loop115.mp3 new file mode 100644 index 0000000..5208f36 Binary files /dev/null and b/levels/Slow Elegance/drums/loop115.mp3 differ diff --git a/levels/Slow Elegance/drums/loop130.mp3 b/levels/Slow Elegance/drums/loop130.mp3 new file mode 100644 index 0000000..5cffec8 Binary files /dev/null and b/levels/Slow Elegance/drums/loop130.mp3 differ diff --git a/levels/Slow Elegance/drums/loop90.mp3 b/levels/Slow Elegance/drums/loop90.mp3 new file mode 100644 index 0000000..755d550 Binary files /dev/null and b/levels/Slow Elegance/drums/loop90.mp3 differ diff --git a/levels/Slow Elegance/lead/dSharp.mp3 b/levels/Slow Elegance/lead/dSharp.mp3 new file mode 100644 index 0000000..3b1b688 Binary files /dev/null and b/levels/Slow Elegance/lead/dSharp.mp3 differ diff --git a/levels/Slow Elegance/lead/f.mp3 b/levels/Slow Elegance/lead/f.mp3 new file mode 100644 index 0000000..28ed0e6 Binary files /dev/null and b/levels/Slow Elegance/lead/f.mp3 differ diff --git a/levels/Slow Elegance/lead/gSharp.mp3 b/levels/Slow Elegance/lead/gSharp.mp3 new file mode 100644 index 0000000..a796365 Binary files /dev/null and b/levels/Slow Elegance/lead/gSharp.mp3 differ diff --git a/levels/Slow Elegance/lead/loop115.mp3 b/levels/Slow Elegance/lead/loop115.mp3 new file mode 100644 index 0000000..98fa546 Binary files /dev/null and b/levels/Slow Elegance/lead/loop115.mp3 differ diff --git a/levels/Slow Elegance/lead/loop130.mp3 b/levels/Slow Elegance/lead/loop130.mp3 new file mode 100644 index 0000000..75519a1 Binary files /dev/null and b/levels/Slow Elegance/lead/loop130.mp3 differ diff --git a/levels/Slow Elegance/lead/loop90.mp3 b/levels/Slow Elegance/lead/loop90.mp3 new file mode 100644 index 0000000..7603bda Binary files /dev/null and b/levels/Slow Elegance/lead/loop90.mp3 differ diff --git a/main.131f5081d4ac12d25c3e.bundle.js b/main.131f5081d4ac12d25c3e.bundle.js deleted file mode 100644 index 36c96fd..0000000 --- a/main.131f5081d4ac12d25c3e.bundle.js +++ /dev/null @@ -1 +0,0 @@ -(()=>{"use strict";var t,e={852:(t,e,s)=>{var i=s(440),n=s.n(i);function a(t){let e="layerID,noteID,loopNumber,playerTime,correctTime,classification\n";for(const s of t.layersStats){const i=t.layersStats.indexOf(s);for(const t of s.hits)e+=`${i},${t.noteID},${t.loopNumber},${o(t.playerTime)},${o(t.correctTime)},${t.classification}\n`}return e}function o(t,e=3){return parseFloat((t/1e3).toFixed(e))}const r=Phaser.Math.Vector2,h=Phaser.GameObjects.Group,l=Phaser.GameObjects.Graphics,c=Phaser.Time.TimerEvent,d=Phaser.GameObjects.GameObject,u=Phaser.Geom.Rectangle,g=(Phaser.Geom.Circle,Phaser.Input.Pointer,Phaser.GameObjects.Text),p=(Phaser.GameObjects.Sprite,Phaser.GameObjects.Video,Phaser.GameObjects.RenderTexture,Phaser.Events.EventEmitter,Phaser.GameObjects.Image,Phaser.Scene),v=(Phaser.Tilemaps.Tile,Phaser.Tweens.Tween,Phaser.GameObjects.Particles.ParticleEmitter,Phaser.Physics.Matter.Sprite),m=(Phaser.Physics.Arcade.Sprite,!0),y="finger",f="previewVideoBackground",b="songNameBackground",w="layerScoreBackground",T="scoreboardBackground",x="menuCalibrateButton",k="menuSelectButton",S="optionsButton",P="targetInner",L="background1",C="mainBackground",B="playButton",D="easyButton",O="mediumButton",H="hardButton",_="backButton",M="buttonDing",V="calibrationBackground",I="menuLogo",A="resetButton",E="muteButton",F="unmuteButton",K="leftArrow",j="rightArrow",N="saveCSVButton",W="defaultLevelbackground",z="defaultPreviewbackground",R="assets/sprites/defaultTargetInner.png",G="assets/ui/back_button.png",q="assets/sounds/ui/menu_ding.wav",$="assets/ui/mute_button.png",J="assets/ui/unmute_button.png",U="levels/",X=U+"list.json",Q=".ogg",Y="data/config.json",Z="data/default_config.json",tt={thumb:16777215,index:14948892,middle:9981603,ring:3636920,pinky:16220607},et={lineWidth:5,color:11393254,alpha:.5},st={lineWidth:5,color:11393254,alpha:1,radius:.1},it="thumb",nt="index",at=nt,ot=16777215,rt=14948892,ht=P,lt="targetOuter",ct=R,dt={scale:1.03,color:16777215,ease:"linear"},ut={scale:.78,color:5091146,ease:"linear"},gt={scale:.3,color:16744192,ease:"linear"},pt={scale:0,color:8421504,ease:"cubic.in"},vt="keydown-ESC",mt={font:"32px Courier",color:"#00ff00"},yt={position:ne(new r(.05,.05)),color:"white",scale:1,font:"30px Arial",depth:40,strokeThickness:0,shadowOffset:new r(2,2),shadowColor:"black",shadowBlurRadius:2},ft={color:[16436258,16291840,16266752,10421252],colorEase:"quad.out",lifespan:500,scale:{start:.7,end:0,ease:"sine.out"},speed:200,advance:500,frequency:50,blendMode:"ADD",duration:0},bt="flare",wt={position:ne(new r(.5,0)),size:ne(new r(.4,.04)),requiredTint:524543,completedRequiredTint:2840741,completedTint:ut.color,extraTint:ut.color,path:"assets/ui/progress_bar_segment.png",key:"segment",tintByNode:!1},Tt="metronome/high",xt="metronome/low",kt="countdown",St={position:ne(new r(.5,.5)),color:"white",scale:1,ease:"Power0",font:"240px Arial",depth:30},Pt={position:ne(new r(.835,0)),size:new r(.16*window.innerWidth,.2684*window.innerHeight),textureKey:"infoBackground",opacity:.3,path:"assets/ui/info_background.png"},Lt={position:ne(new r(.93,.9)),scale:new r(.3,.3),soundKey:M,textureKey:"skipButton",path:"assets/ui/skip_button.png"},Ct={position:ne(new r(.85,.02)),color:"white",font:"20px Arial",scale:1,depth:40},Bt={position:ne(new r(.85,.07)),color:"white",font:"20px Arial",scale:1,depth:40},Dt={position:ne(new r(.85,.12)),color:"white",font:"20px Arial",scale:1,depth:40},Ot={position:ne(new r(.85,.17)),color:"white",font:"20px Arial",scale:1,depth:40},Ht={position:ne(new r(.85,.22)),color:"white",font:"20px Arial",scale:1,depth:40},_t=new r(.5,.5),Mt=new r(.6,.6),Vt=new r(1.5,1.5),It=new r(-32,-32),At=new r(32,-32),Et=.07,Ft=.71,Kt=.75,jt="loading",Nt="level",Wt="scoreboard",zt="mainMenu",Rt="levelSelect",Gt="calibration",qt="options",$t=zt,Jt={visible:!1,flip:!0,opacity:0,width:window.innerWidth,height:window.innerHeight,objectFit:"fill"},Ut={video:{width:{ideal:640},height:{ideal:360}},audio:!1},Xt={baseOptions:{delegate:"GPU"},runningMode:"VIDEO",numHands:1,minHandDetectionConfidence:.5,minHandPresenceConfidence:.5,minTrackingConfidence:.5},Qt="UNDEFINED";var Yt=function(t,e,s,i){return new(s||(s=Promise))((function(n,a){function o(t){try{h(i.next(t))}catch(t){a(t)}}function r(t){try{h(i.throw(t))}catch(t){a(t)}}function h(t){var e;t.done?n(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(o,r)}h((i=i.apply(t,e||[])).next())}))};function Zt(t){return new Promise(((e,s)=>Yt(this,void 0,void 0,(function*(){var i;yield("GET",i=t,new Promise((function(t,e){let s=new XMLHttpRequest;s.open("GET",i),s.onload=function(){this.status>=200&&this.status<300?t(s):e({status:this.status,statusText:s.statusText})},s.onerror=function(){e({status:this.status,statusText:s.statusText})},s.send()}))).then((t=>{e(JSON.parse(t.responseText.toString("utf8")))})).catch((()=>{s()}))}))))}function te(t,e="no error message provided"){if(m&&!t)throw new Error("Assertion failed: "+e)}function ee(t,e=""){const s="".replace(/\\/g,"/")+e;return t=t.replace(/\\/g,"/"),"/"==Array.from(t)[0]?s+t:s+"/"+t}function se(t){return ee(t,"")}function ie(t){return se(t),!0}function ne(t){return t instanceof r?new r(t.x*window.innerWidth,t.y*window.innerHeight):new r(t[0]*window.innerWidth,t[1]*window.innerHeight)}const ae=s(213);let oe;function re(t){oe=t}function he(t){return new Promise(((e,s)=>{return i=this,n=void 0,o=function*(){yield Zt(se(t)).then((t=>{const s=t;re(s),e(s)})).catch((()=>{s()}))},new((a=void 0)||(a=Promise))((function(t,e){function s(t){try{h(o.next(t))}catch(t){e(t)}}function r(t){try{h(o.throw(t))}catch(t){e(t)}}function h(e){var i;e.done?t(e.value):(i=e.value,i instanceof a?i:new a((function(t){t(i)}))).then(s,r)}h((o=o.apply(i,n||[])).next())}));var i,n,a,o}))}var le=function(t,e,s,i){return new(s||(s=Promise))((function(n,a){function o(t){try{h(i.next(t))}catch(t){a(t)}}function r(t){try{h(i.throw(t))}catch(t){a(t)}}function h(t){var e;t.done?n(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(o,r)}h((i=i.apply(t,e||[])).next())}))};const ce=new class{init(t,e){return le(this,void 0,void 0,(function*(){return new Promise(((s,i)=>le(this,void 0,void 0,(function*(){e("Loading webcam..."),this.setupVideoElement(t),yield navigator.mediaDevices.getUserMedia(Ut).then((t=>{"srcObject"in this.video?(this.video.srcObject=t,this.video.addEventListener("loadeddata",(()=>{s(!0)}))):i("srcObject does not exist on older browsers")})).catch((t=>{i(t)}))}))))}))}found(){return null!=this.video.srcObject}setVisibility(t){this.video.style.visibility="",this.video.style.visibility=t?"shown":"hidden"}setWidth(t){this.video.width=t}setHeight(t){this.video.height=t}setupVideoElement(t){this.video=document.body.appendChild(document.createElement("video")),this.video.autoplay=!0,this.video.muted=!0,this.video.playsInline=!0,this.video.style.position="absolute",this.video.style.top="0",this.video.style.left="0",this.video.style.bottom="0",this.video.style.zIndex="-1",this.video.style.pointerEvents="none",this.video.style.objectFit=t.objectFit,this.setWidth(t.width),this.setHeight(t.height),t.flip&&(this.video.style.cssText+="-moz-transform: scale(-1, 1); -webkit-transform: scale(-1, 1); -o-transform: scale(-1, 1); transform: scale(-1, 1); filter: FlipH;"),this.setVisibility(!1)}get video(){return te(null!=this.video_),this.video_}set video(t){this.video_=t}};var de=s(260),ue=function(t,e,s,i){return new(s||(s=Promise))((function(n,a){function o(t){try{h(i.next(t))}catch(t){a(t)}}function r(t){try{h(i.throw(t))}catch(t){a(t)}}function h(t){var e;t.done?n(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(o,r)}h((i=i.apply(t,e||[])).next())}))};const ge=new class{constructor(){this.lastVideoTime=-1}init(t){return ue(this,void 0,void 0,(function*(){return new Promise(((e,s)=>ue(this,void 0,void 0,(function*(){let i;yield de.Ps.forVisionTasks(ee("models/wasm")).then((t=>i=t)).catch((t=>{s(t)})),t("Loading hand landmarker..."),Xt.baseOptions.modelAssetPath=se("models/hand_landmarker.task"),yield de.Vb.createFromOptions(i,Xt).then((t=>this.handLandmarker_=t)).catch((t=>{t instanceof Event&&"error"==t.type&&s("Failed to fetch vision_wasm_internal.js in specified wasm directory"),t instanceof TypeError&&s("Failed to fetch hand_landmark.task file"),s(t)})),e(!0)}))))}))}precache(t){t("Pre-caching landmarks..."),this.update()}found(){return null!=this.handLandmarker_}update(){this.lastVideoTime!=ce.video.currentTime&&(this.lastVideoTime=ce.video.currentTime,this.results_=this.handLandmarker.detectForVideo(ce.video,performance.now()))}get results(){return te(null!=this.results_),this.results_}get handLandmarker(){return te(null!=this.handLandmarker_),this.handLandmarker_}landmarksFound(t=0){return null!=this.results&&t=0&&s.x<=1&&s.y>=0&&s.y<=1}getLandmarkPosition(t,e=0){if(!this.landmarksFound(e))return;const s=this.results.landmarks[e][t],i=ne(new r(s.x,s.y));return new r(window.innerWidth-i.x,i.y)}forEachLandmarkPosition(t,e=0){for(let s=0;s<21;++s){const i=this.getLandmarkPosition(s,e);void 0!==i&&t(i)}}};var pe=function(t,e,s,i){return new(s||(s=Promise))((function(n,a){function o(t){try{h(i.next(t))}catch(t){a(t)}}function r(t){try{h(i.throw(t))}catch(t){a(t)}}function h(t){var e;t.done?n(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(o,r)}h((i=i.apply(t,e||[])).next())}))};let ve;function me(t,e){null!=t&&(t.setVisible(e),e?t.setInteractive():t.disableInteractive())}class ye extends v{constructor(t,e,s,i,n){super(t.matter.world,0,0,e,void 0,{render:{visible:!0}}),this.name=s,this.landmarkIndex=i,this.scene.add.existing(this),this.setScale(n),this.setTint(tt[this.name]),this.setDepth(100),this.setCircle(this.displayWidth/2,{label:this.name}),this.setSensor(!0),me(this,!1)}}var fe,be;!function(t){t[t.hover=0]="hover",t[t.pinch=1]="pinch"}(fe||(fe={})),function(t){t[t.start=0]="start",t[t.continue=1]="continue",t[t.end=2]="end"}(be||(be={}));class we extends d{getFinger(t){const e=this.fingers.findIndex((e=>e.name==t));if(-1!==e)return this.fingers[e]}get observers(){return this.observers_}isObserver(t){return void 0!==this.observers_.find((e=>e.fingerName===t.fingerName&&e.object==t.object))}wasObserverHovering(t){return te(this.isObserver(t)),this.observers_.find((e=>e.fingerName===t.fingerName&&e.object==t.object)).wasHovering}setObserverHover(t,e){const s=this.observers_.findIndex((e=>e.fingerName===t.fingerName&&e.object==t.object));te(-1!==s,"Cannot set observer hover before observer is pushed"),this.observers_[s].wasHovering=e}pushNewObserversOnly(t){this.isObserver(t)||(this.observers.push(t),this.setObserverHover(t,!1))}removeObserver(t){const e=this.observers_.findIndex((e=>e.fingerName===t.fingerName&&e.object==t.object));e>-1&&this.observers_.splice(e,1)}constructor(t){super(t,"hand"),this.fingers=[],this.observers_=[],this.fingers=[],this.observers_=[];const e=(t,e)=>{const s=new ye(this.scene,y,t,e,.3*oe.fingerSize);return this.fingers.push(s),s},s=e(it,4),i=(e(nt,8),e("middle",12),e("ring",16),e("pinky",20),(t,e)=>{t((t=>{const i=this.getFinger(t.bodyB.label);if(void 0!==i)for(const t of this.observers)t.fingerName==i.name&&null!=t.object&&t.object.input&&t.object.input.enabled&&t.object.emit(i.name+fe.pinch+e);else if(t.bodyB.gameObject){const i=t.bodyB.gameObject;for(const n of this.fingers){if(n==s)continue;const a={object:i,fingerName:n.name};if(!this.isObserver(a))continue;const o=this.scene.matter.overlap(t.bodyB,[n]);if(e===be.start&&o)i.emit(n.name+fe.hover+be.start),this.setObserverHover(a,!0);else if(e===be.continue){const t=this.wasObserverHovering(a);o&&t?(i.emit(n.name+fe.hover+be.continue),this.setObserverHover(a,!0)):o&&!t?(i.emit(n.name+fe.hover+be.start),this.setObserverHover(a,!0)):!o&&t&&(i.emit(n.name+fe.hover+be.end),this.setObserverHover(a,!1))}else e===be.end&&this.wasObserverHovering(a)&&(i.emit(n.name+fe.hover+be.end),this.setObserverHover(a,!1))}}}))});i(s.setOnCollide.bind(s),be.start),i(s.setOnCollideActive.bind(s),be.continue),i(s.setOnCollideEnd.bind(s),be.end)}setFingerScale(t){for(const e of this.fingers)e.setScale(.3*t)}addPinchCheck(t,e,s){this.pushNewObserversOnly({object:e,fingerName:t});const i=t=>{const s=this.getFinger(it),i=this.getFinger(t);if(void 0===s)return!1;if(void 0===i)return!1;const n=this.scene.matter.overlap(e,[s]),a=this.scene.matter.overlap(e,[i]);return n&&a};null!=s.startPinch&&e.on(t+fe.pinch+be.start,(()=>{var e;i(t)&&(null===(e=s.startPinch)||void 0===e||e.call(s))})),null!=s.pinched&&e.on(t+fe.pinch+be.continue,(()=>{var e;i(t)&&(null===(e=s.pinched)||void 0===e||e.call(s))})),null!=s.endPinch&&e.on(t+fe.pinch+be.end,(()=>{var e;i(t)&&(null===(e=s.endPinch)||void 0===e||e.call(s))})),null!=s.startHover&&e.on(t+fe.hover+be.start,(()=>{var t;null===(t=s.startHover)||void 0===t||t.call(s)})),null!=s.hovering&&e.on(t+fe.hover+be.continue,(()=>{var t;null===(t=s.hovering)||void 0===t||t.call(s)})),null!=s.endHover&&e.on(t+fe.hover+be.end,(()=>{var t;null===(t=s.endHover)||void 0===t||t.call(s)}))}removePinchCheck(t,e){this.removeObserver({fingerName:t,object:e}),e.off(t+fe.pinch+be.start),e.off(t+fe.pinch+be.continue),e.off(t+fe.pinch+be.end),e.off(t+fe.hover+be.start),e.off(t+fe.hover+be.continue),e.off(t+fe.hover+be.end)}update(){this.observers_=this.observers_.filter((t=>null!=t)),ge.update();const t=this.scene.matter.add.circle(this.scene.input.mousePointer.x,this.scene.input.mousePointer.y,1,{circleRadius:1,isSensor:!0,render:{visible:!1}});for(const e of this.fingers){const s=ge.getLandmarkPosition(e.landmarkIndex),i=void 0!==s;if(i&&e.setPosition(s.x,s.y),me(e,i),!i&&null!=t)for(const s of this.observers)null!=t&&null!=s.object&&s.object.active&&null!=this.scene&&(s.object.emit(e.name+fe.pinch+be.end),this.scene.matter.overlap(t,[s.object])||s.object.emit(e.name+fe.hover+be.end))}this.scene.matter.world.remove(t)}calculateHandDistance(t=0){const e=ge.getLandmarkPosition(5,t),s=ge.getLandmarkPosition(17,t),i=ge.getLandmarkPosition(0,t);let n=0,a=0;const o=innerWidth*innerHeight;if(void 0!==e&&void 0!==s){const t=new r((e.x+s.x)/2,(e.y+s.y)/2);n=Math.sqrt(Math.pow((s.x-e.x)/o,2)+Math.pow((s.y-e.y)/o,2)),void 0!==i&&(a=Math.sqrt(Math.pow((i.x-t.x)/o,2)+Math.pow((i.y-t.y)/o,2)))}return 0==n||0==a?0:8.2*.7/Math.max(n/8.2,a/10)/o*100}}const Te=new Set([[0,1],[0,5],[9,13],[13,17],[5,9],[0,17],[1,2],[2,3],[3,4],[5,6],[6,7],[7,8],[9,10],[10,11],[11,12],[13,14],[14,15],[15,16],[17,18],[18,19],[19,20]]);class xe extends p{constructor(t){super(t)}preload(){}create(t=oe.enableCameraVisibility,e=oe.cameraOpacity){ce.setVisibility(t),ve.setVisible(!0),this.clearBackgroundTint(),this.setBackgroundTexture(C),this.setOpacity(e),this.sound.pauseOnBlur=!1,this.graphics=this.add.graphics(),this.graphics.setDepth(99),this.hand=new we(this)}update(t,e){this.graphics.clear(),this.hand.update(),function(t,e,s=0){t.setDepth(99),ge.forEachLandmarkPosition((s=>{t.lineStyle(e.lineWidth,e.color,e.alpha),t.strokeCircle(s.x,s.y,e.radius)}),s)}(this.graphics,st,0),function(t,e,s=0){t.setDepth(98),Te.forEach((i=>{const n=ge.getLandmarkPosition(i[0],s);if(void 0!==n){const a=ge.getLandmarkPosition(i[1],s);void 0!==a&&(t.lineStyle(e.lineWidth,e.color,e.alpha),t.lineBetween(n.x,n.y,a.x,a.y))}}))}(this.graphics,et,0),ve.setDisplaySize(document.body.clientWidth,document.body.clientHeight+1)}setOpacity(t){null!=t&&(te(t>=0&&t<=1),ve.setAlpha(1-t))}setBackgroundTexture(t){ve.setTexture(t)}setBackgroundTint(t){ve.setTint(t)}clearBackgroundTint(){ve.clearTint()}}class ke extends v{constructor(t,e,s,i,n,a){super(t.matter.world,e.x,e.y,i,void 0,{render:{visible:!0},label:"button-"+i}),this.scene=t,this.scene.add.existing(this),this.sound=this.scene.sound.add(n,{volume:oe.sonificationLevel}),this.setSensor(!0),this.setOrigin(.5,.5),this.setScale(s.x,s.y),this.setDepth(93),me(this,a),this.on("destroy",(()=>{this.scene.hand.removePinchCheck(at,this)}))}removePinchCallbacks(){this.scene.hand.removePinchCheck(at,this)}addPinchCallbacks(t){const e={startPinch:()=>{var e;null===(e=t.startPinch)||void 0===e||e.call(t),this.sound.play({volume:oe.sonificationLevel})},pinched:t.pinched,endPinch:t.endPinch,startHover:t.startHover,endHover:t.endHover};this.scene.hand.addPinchCheck(at,this,e),this.on("pointerdown",e.startPinch),e.startHover&&this.on("pointermove",e.startHover),e.endHover&&this.on("pointerout",e.endHover)}}class Se{constructor(t){this.trackKey=Qt,this.bpm=0,this.beatLength_=1,this.trackKey=t}get beatLength(){return this.beatLength_}setBPM(t){te(null!=this.data,"preload JSON before setting BPM"),te(t{e.nodes.forEach(((s,i)=>{const n=this.getSoundKey(e,s.soundKey),a=this.trackDir+e.id+"/"+s.soundKey+Q;t.cache.audio.exists(n)||""===s.soundKey||t.load.audio(n,se(a))}))}))}unloadNotes(t){this.forEachLayer(void 0,(e=>{e.nodes.forEach(((s,i)=>{t.cache.audio.remove(this.getSoundKey(e,s.soundKey))}))}))}preloadLoops(t){this.forEachLayer((e=>{te(void 0!==e.soundLoopKeys),te(e.soundLoopKeys.length>0),e.soundLoopKeys.forEach((s=>{const i=this.getSoundKey(e,s),n=this.trackDir+e.id+"/"+s+Q;t.cache.audio.exists(i)||""===s||t.load.audio(i,se(n))}))}))}unloadLoops(t){this.forEachLayer((e=>{e.soundLoopKeys.forEach((s=>{t.cache.audio.remove(this.getSoundKey(e,s))}))}))}getSoundKey(t,e){return te(void 0!==e),this.trackKey+"/"+t.id+"/"+e}forEachLayer(t,e){te(null!=this.data,"JSON has not finished preloading");let s=0;this.data.layers.forEach(((i,n)=>{i.playable||s++,null==t||t(i,n),i.playable&&(null==e||e(i,n-s))}))}addBackgroundAudioTracks(t,e,s,i){const n=[];return this.forEachLayer(((a,o)=>{(null==i||i(a,o))&&(te(void 0!==a.soundLoopKeys),te(s{this.data=i,this.parseJson(),this.preloadLoops(t)};t.cache.json.exists(this.trackKey)?s(0,0,t.cache.json.get(this.trackKey)):(t.load.json(this.trackKey,se(e+"info.json")),t.load.on("filecomplete-json-"+this.trackKey,s,this))}unloadJson(t){this.unloadLoops(t),t.cache.json.remove(this.trackKey)}parseJson(){this.setTimePositionDefaults(),this.sortNodes()}setTimePositionDefaults(){this.forEachLayer(void 0,(t=>{const e=(t,e,s,i)=>{t.bar||(t.bar=e),t.step||(t.step=s),t.tick||(t.tick=i)};te(t.progressCount<=t.nodes.length,"Progress count threshold for layer '"+t.id+"' of track '"+this.trackKey+"' cannot be higher than the node count."),e(t.previewTime,0,0,0),t.nodes.forEach((t=>{e(t.timePosition,1,1,0)}))}))}sortNodes(){this.forEachLayer(void 0,(t=>{t.nodes.sort(((t,e)=>t.timePosition.bar!==e.timePosition.bar?t.timePosition.bar-e.timePosition.bar:t.timePosition.step!==e.timePosition.step?t.timePosition.step-e.timePosition.step:t.timePosition.tick-e.timePosition.tick))}))}}class Pe extends v{static preload(t){t.load.image(ht,se(ct)),t.load.image(lt,se("assets/sprites/defaultTargetOuter.png"))}static unload(t){t.textures.remove(ht),t.textures.remove(lt)}constructor(t,e,s,i,n,a,o,r){super(t.matter.world,s.x,s.y,a.data.spriteKeyInner,void 0,{render:{visible:!0}}),this.scene=t,this.lifetime=i,this.fingerId=o,this.nodeIndex=r,this.spriteScale=oe.targetSize,this.scene.add.existing(this),this.songTime=this.lifetime+e,this.lateDuration=oe.lateTimeDuration,this.onTimeDuration=oe.onTimeDuration,this.earlyDuration=this.lifetime-this.onTimeDuration/2,this.sound=this.scene.sound.add(n,{volume:oe.sonificationLevel}),this.setScale(this.spriteScale),this.setTint(tt[this.fingerId]),this.setDepth(95),me(this,!0),this.setCircle(this.displayWidth/2,{label:a.level.trackKey+"-"+a.data.id+"-node-"+r.toString()}),this.setSensor(!0),oe.fancyEffectsDisabled||(this.glow=this.postFX.addGlow(16777215,0,0,!1,.05,24)),this.outerRing=this.scene.add.sprite(s.x,s.y,a.data.spriteKeyOuter),this.outerRing.setScale(.5*this.spriteScale),this.outerRing.setDepth(96),this.targetText=new g(this.scene,0,0,Qt,{}),this.addTargetText(),this.setupTweens()}setOnTargetMiss(t){this.onTargetMiss=t}setOnTargetHit(t){this.scene.hand.addPinchCheck(this.fingerId,this,{startPinch:t}),this.once("pointerdown",t)}addTargetText(){this.targetText=this.scene.add.text(this.x,this.y,(this.nodeIndex+1).toString(),{font:"20px Arial",color:"white"}),this.targetText.setOrigin(.5,.5),this.targetText.setDepth(97)}createTween(t,e,s){for(const s of t)s.tint=e.color;return this.scene.tweens.add({targets:t,displayWidth:this.displayWidth*e.scale,displayHeight:this.displayHeight*e.scale,ease:e.ease,duration:s,repeat:0})}setupTweens(){oe.fancyEffectsDisabled||(this.rotateTween=this.scene.tweens.add({targets:[this],rotation:2*Math.PI,ease:"linear",duration:1e3,repeat:-1})),this.earlyTween=this.createTween([this.outerRing],dt,this.earlyDuration),this.earlyTween.on("complete",(()=>{this.onTimeTween=this.createTween([this],Object.assign(Object.assign({},ut),{scale:1}),this.onTimeDuration),oe.fancyEffectsDisabled||null==this.glow||(this.glowTween=this.scene.tweens.add({targets:this.glow,outerStrength:4,yoyo:!0,duration:this.onTimeDuration/2,ease:"linear"})),this.onTimeTween.on("complete",(()=>{null!=this.glow&&this.glow.destroy(),this.lateTween=this.createTween([this,this.outerRing],Object.assign(Object.assign({},gt),{scale:1}),this.lateDuration),this.lateTween.on("complete",(()=>{me(this,!1),this.deathTween=this.createTween([this,this.outerRing,this.targetText],pt,400),null!=this.onTargetMiss&&this.deathTween.on("complete",this.onTargetMiss)}))}))}))}destroyTarget(){this.scene.hand.removePinchCheck(this.fingerId,this),this.off("pointerdown"),null!=this.rotateTween&&this.scene.tweens.remove(this.rotateTween),null!=this.earlyTween&&this.scene.tweens.remove(this.earlyTween),null!=this.onTimeTween&&this.scene.tweens.remove(this.onTimeTween),null!=this.lateTween&&this.scene.tweens.remove(this.lateTween),null!=this.deathTween&&this.scene.tweens.remove(this.deathTween),null!=this.glowTween&&this.scene.tweens.remove(this.glowTween),null!=this.glow&&this.glow.destroy(),null!=this.targetText&&this.targetText.destroy(),this.outerRing.destroy(),this.destroy()}}class Le extends d{constructor(t){super(t,"metronome"),this.beat=0,this.timer=new c({}),this.countdownText=this.scene.add.text(St.position.x,St.position.y,Qt,{font:St.font,color:St.color}).setOrigin(.5,.5).setScale(St.scale).setDepth(St.depth),this.setVisible(!1)}preload(){this.scene.load.image(kt,se("assets/sprites/countdown.png")),this.scene.load.audio(Tt,se("assets/sounds/metronome/high.ogg")),this.scene.load.audio(xt,se("assets/sounds/metronome/low.ogg"))}unload(){this.scene.cache.audio.remove(Tt),this.scene.cache.audio.remove(xt)}setup(){this.countdownTexture=this.scene.add.sprite(St.position.x,St.position.y,kt).setScale(1).setVisible(!1).setOrigin(.5,.5).setAlpha(.3).setDepth(30)}setVisible(t){null!=this.countdownText&&this.countdownText.setVisible(t),null!=this.countdownTexture&&this.countdownTexture.setVisible(t)}stop(){this.setVisible(!1),null!=this.scene&&(this.scene.time.removeEvent(this.timer),this.scene.sound.stopByKey(Tt),this.scene.sound.stopByKey(xt),null!=this.shrinkTween&&this.scene.tweens.remove(this.shrinkTween))}play(t,e,s){this.beat=0,this.stop(),this.timer=this.scene.time.addEvent({callback:this.tick.bind(this,t,e,s),delay:e,loop:!0,startAt:e})}tick(t,e,s){te(s>=1,"Cannot display metronome for less than minimum bar count");const i=t*s,n=this.beat%t,a=0==n?Tt:xt;this.beat>=i?this.setVisible(!1):(this.countdownText.active&&this.scene.sound.play(a,{volume:oe.backgroundMusicLevel}),te(i-t>=0),this.beat>=i-t&&this.countdownText.active&&!oe.disableVisualMetronome&&this.display(n+1,e),this.beat++)}display(t,e){this.countdownText.setText(t.toString()),this.countdownText.setScale(St.scale),this.countdownTexture.setScale(1),this.setVisible(!0),this.shrinkTween=this.scene.tweens.add({targets:[this.countdownText,this.countdownTexture],ease:St.ease,duration:.9*e,scale:0,repeat:0})}}class Ce extends h{constructor(t){super(t),this.current_=0,this.requiredProgress=-1,this.nodeCount=1,this.tints=[],te(this.current_>=0),this.tints=[],this.scene.add.existing(this),this.setVisible(!1)}preload(){this.scene.load.image(wt.key,se(wt.path))}setup(t,e,s,i){te(s<=e),te(i.length===e,"Must pass tints equal in number to nodes"),te(e>0),te(s>0),te(t>=0),this.current_=t,this.nodeCount=e,this.tints=i,this.requiredProgress=s;const n=wt.size.x/this.nodeCount;this.clear(),this.createMultiple({quantity:this.nodeCount,key:wt.key,visible:!0,setXY:{x:wt.position.x-wt.size.x/2+n/2,y:wt.position.y+wt.size.y/2,stepX:n}}),this.propertyValueSet("displayWidth",n),this.propertyValueSet("displayHeight",wt.size.y),this.setDepth(61),this.redraw()}setToStarting(){this.current_=0,te(this.current_>=0),this.redraw()}redraw(){if(this.current<=this.nodeCount){this.getChildren().forEach(((t,e)=>{t.clearTint()}));const t=-1===this.requiredProgress?this.nodeCount:this.requiredProgress-1,e=this.current;this.getChildren().forEach(((s,i)=>{const n=s;wt.tintByNode&&n.setTint(this.tints[i]),it?n.setTint(wt.completedRequiredTint):n.setTint(wt.requiredTint))}),this)}}canProgress(){const t=-1===this.requiredProgress;return t&&this.current>=this.nodeCount||!t&&this.current>=this.requiredProgress}changeBy(t){this.current_=Math.max(0,Math.min(this.current+t,this.nodeCount))}get current(){return this.current_}}class Be extends d{constructor(t,e){super(t,"infoHUD"),this.scene=t,this.level=e}setup(){this.addTexts(),this.addSkipButton(),this.setVisible(!1)}addSkipButton(){this.skipButton=new ke(this.scene,Lt.position,Lt.scale,Lt.textureKey,Lt.soundKey,!1),this.skipButton.addPinchCallbacks({startPinch:()=>{me(this.skipButton,!1),this.level.transitionLayers()},startHover:()=>{this.skipButton.setTintFill(ot)},endHover:()=>{this.skipButton.clearTint()}}),this.updateSkipButtonAvailability(!1)}preload(){this.scene.load.image(Lt.textureKey,se(Lt.path)),this.scene.load.image(Pt.textureKey,se(Pt.path))}setVisible(t){null!=this.trackText&&this.trackText.setVisible(t),null!=this.difficultyText&&this.difficultyText.setVisible(t),null!=this.bpmText&&this.bpmText.setVisible(t),null!=this.layerText&&this.layerText.setVisible(t),null!=this.loopText&&this.loopText.setVisible(t),null!=this.infoBackground&&this.infoBackground.setVisible(t),this.updateSkipButtonAvailability(t)}addText(t,e){return this.scene.add.text(t.position.x,t.position.y,e,{font:t.font,color:t.color}).setScale(t.scale).setDepth(t.depth)}getLoopText(){return"Loop: "+this.level.score.getLoopCount().toString()}addTexts(){this.loopText=this.addText(Ht,this.getLoopText());const t="Track: "+this.level.track.data.displayName;this.trackText=this.addText(Ct,t);const e="Layer: "+(this.level.activeLayerIndex+1).toString()+"/"+this.level.playableLayers.length.toString();let s=Qt;switch(this.level.bpmIndex){case 0:s="Easy";break;case 1:s="Medium";break;case 2:s="Hard"}te(s!=Qt,"Extend the switch statement to have a difficulty text for the given track bpmIndex"),this.difficultyText=this.addText(Bt,"Difficulty: "+s),this.bpmText=this.addText(Dt,"BPM: "+this.level.track.getBPM()),this.layerText=this.addText(Ot,e),this.infoBackground=this.scene.add.sprite(Pt.position.x,Pt.position.y,Pt.textureKey).setAlpha(Pt.opacity).setOrigin(0,0).setDisplaySize(Pt.size.x,Pt.size.y)}updateLoopText(){this.loopText.setText(this.getLoopText()),this.updateSkipButtonAvailability(!0)}updateSkipButtonAvailability(t){const e=oe.enableSkipButton&&this.level.score.getLoopCount()>=oe.skipLoopThreshold&&t;null!=this.skipButton&&me(this.skipButton,e)}}class De{constructor(){this.targets=[]}start(){this.destroyTargets()}destroyTarget(t){t.destroyTarget();const e=this.targets.indexOf(t,0);e>-1&&this.targets.splice(e,1)}destroyTargets(){const t=[...this.targets];for(const e of t)this.destroyTarget(e)}addTarget(t){this.targets.push(t)}getPreviousTargets(t){return this.targets.filter((e=>e.songTime{const i=oe.indexFingerOnly?nt:t.finger;s.push(tt[i])})),this.progress.setup(0,this.data.nodes.length,this.data.progressCount,s),this.metronome.setup(),this.infoHud.setup(),this.progress.setVisible(!0),this.infoHud.setVisible(!0),this.metronome.play(this.level.track.data.timeSignatureNumerator,this.level.track.beatLength,e)}createTarget(t,e,s){const i=oe.indexFingerOnly?nt:t.finger,n=new Pe(this.scene,this.songTime_,ne(t.normalizedPosition),this.getPreviewTime(),this.level.track.getSoundKey(this.data,t.soundKey),this,i,s);n.setOnTargetMiss((()=>{this.level.score.missedPinch(n),this.progress.changeBy(-1),this.progress.redraw(),this.level.streak.stop(),this.targetManager.destroyTarget(n),this.checkForTransition(e,s)})),n.setOnTargetHit((()=>{const t=this.targetManager.getPreviousTargets(n);for(const e of t)te(e!=n),this.progress.changeBy(-1),this.level.score.skippedPinch(e),this.targetManager.destroyTarget(e);t.length>0&&this.level.streak.stop();const i=this.songTime-n.songTime,a=n.onTimeDuration/2,o=i>a;i<-a?(this.level.streak.stop(),this.progress.changeBy(0),this.level.score.earlyPinch(n,this.songTime)):o?(this.level.streak.stop(),this.progress.changeBy(0),this.level.score.latePinch(n,this.songTime)):(this.level.streak.changeBy(1),this.progress.changeBy(1),this.level.score.onTimePinch(n,this.songTime,this.level.streak.current)),this.progress.redraw(),this.level.streak.check(),oe.disableSonification||n.sound.play({volume:oe.sonificationLevel}),this.targetManager.destroyTarget(n),this.checkForTransition(e,s)})),this.targetManager.addTarget(n)}checkForTransition(t,e){e==this.data.nodes.length-1&&this.level.activeLayerIndex==t&&(oe.enableAutoSkip&&this.level.score.getLoopCount()>=oe.autoSkipThreshold||this.progress.canProgress()&&!oe.disableLayerProgression?this.level.transitionLayers():(this.level.score.incrementLoopCount(),this.progress.setToStarting(),this.infoHud.updateLoopText(),oe.autoSaveCSV&&this.level.score.levelStats))}handleTargetCreation(){if(!this.ready)return;const t=this.getDuration();let e=this.songTime_+this.getPreviewTime();if(this.songTime_>0&&(e%=t),this.data.nodes.length<=this.nextNodeIndex){if(!(e1?this.continue():this.stop()}updateStreakText(){this.streakText.setText("Streak: "+this.current_.toString())}start(){this.updateStreakText(),this.streakText.setVisible(!0)}stop(){this.current_=0,this.onFire=!1,null!=this.onFireTween&&this.scene.tweens.remove(this.onFireTween),null!=this.streakText&&this.streakText.clearTint(),null!=this.streakText&&this.streakText.setVisible(!1),null!=this.flame&&this.flame.destroy()}continue(){this.updateStreakText();const t=this.onFire;this.onFire=this.current_>=2,!t&&this.onFire&&(te(!0,"Streak color wheel extent must be from 1 to 255"),this.onFireTween=this.scene.tweens.addCounter({from:0,to:30,duration:1e3,yoyo:!0,onUpdate:t=>{if(null!=this&&null!=this.hsv){const e=Math.floor(t.getValue()),s=this.hsv[e].color,i=this.hsv[30-e].color;null!=this.streakText&&this.streakText.setTint(s,s,i,i)}},onStop:()=>{null!=this.onFireTween&&this.scene.tweens.remove(this.onFireTween)}}),oe.fancyEffectsDisabled||(null!=this.flame&&this.flame.destroy(),null!=this.streakText&&(this.flame=this.scene.add.particles(this.streakText.x,this.streakText.y,bt,ft),te(0!=yt.depth),this.flame.setDepth(yt.depth-1))))}}class Me{constructor(){this.total=1,this.required=1,this.correct=0,this.early=0,this.late=0,this.miss=0,this.loop=1,this.hits=[]}}class Ve{constructor(t){this.maxStreak=0,this.layersStats=[],this.id=`${t.data.displayName.replace(/\s/g,"")}@${t.getBPM()}bpm_${(new Date).toLocaleString("en-GB").replace(/\s/g,"").replace(/,/g,"_").replace(/[:/]/g,"-")}`}}class Ie{constructor(t){this.levelStats=new Ve(t),this.layerStats=new Me}getLoopCount(){return this.layerStats.loop}incrementLoopCount(){this.layerStats.correct=0,this.layerStats.early=0,this.layerStats.late=0,this.layerStats.miss=0,this.layerStats.loop++}saveLayerScores(){this.levelStats.layersStats.push(this.layerStats)}resetLayerScores(t,e){this.layerStats=new Me,this.layerStats.total=t,this.layerStats.required=e}addHit(t,e,s){this.layerStats.hits.push({loopNumber:this.getLoopCount(),noteID:t.nodeIndex+1,correctTime:t.songTime+this.delay,playerTime:e,classification:s})}onTimePinch(t,e,s){this.addHit(t,e+this.delay,"correct"),this.layerStats.correct++,this.levelStats.maxStreak=Math.max(s,this.levelStats.maxStreak)}earlyPinch(t,e){this.addHit(t,e+this.delay,"early"),this.layerStats.early++}latePinch(t,e){this.addHit(t,e+this.delay,"late"),this.layerStats.late++}skippedPinch(t){this.addHit(t,-1e3,"skipped"),this.layerStats.miss++}missedPinch(t){this.addHit(t,-1e3,"missed"),this.layerStats.miss++}}class Ae{constructor(t){this.trackKey_=Qt,this.finishCallback=()=>{},this.abortCallback=()=>{},this.activeLayerIndex=0,this.playableLayers=[],this.activeAudioTracks=[],this.bpmIndex_=-1,this.trackKey_=t,this.track=new Se(this.trackKey_)}setBPM(t){te(-1!=t,"BPM must be set before starting the level"),this.track.setBPM(t),this.bpmIndex_=t}get bpmIndex(){return this.bpmIndex_}get trackKey(){return this.trackKey_}init(t){this.scene=t,this.streak=new _e(this.scene),this.score=new Ie(this.track),this.preloadLayers()}hasCustomBackground(){return ie(U+this.getBackgroundTextureKey())}hasPreviewVideo(){return ie(U+this.getPreviewVideoKey())}getBackgroundTextureKey(){return this.trackKey+"/background.png"}getPreviewVideoKey(){return this.trackKey+"/preview.mp4"}preloadTrack(t){const e=U+this.getPreviewVideoKey(),s=U+this.getBackgroundTextureKey();ie(e)&&t.load.video(this.getPreviewVideoKey(),se(e),!0),ie(s)&&t.load.image(this.getBackgroundTextureKey(),se(s)),this.track.preload(t)}unloadTrack(t){this.track.unload(t)}preloadLayers(){this.track.preloadNotes(this.scene),Pe.preload(this.scene),this.streak.preload(),this.playableLayers=[],this.track.forEachLayer(void 0,((t,e)=>{const s=new He(this.scene,this,t);s.preload(),this.playableLayers.push(s)}))}unloadLayers(){this.playableLayers.forEach((t=>{t.unload()})),this.track.unloadNotes(this.scene),Pe.unload(this.scene),this.streak.unload()}start(t,e){this.activeLayerIndex=0,this.removeBackgroundAudio(this.scene),this.playableLayers.forEach((t=>{t.stop()})),this.streak.stop(),this.setBPM(this.bpmIndex_),this.finishCallback=t,this.abortCallback=e,this.scene.time.delayedCall(1e3,(()=>{this.startLayer()}))}addBackgroundAudio(t,e,s){te(-1!=this.bpmIndex_,"Set BPM before adding background audio to level"),this.removeBackgroundAudio(t),this.activeAudioTracks=this.track.addBackgroundAudioTracks(t,e,this.bpmIndex_,s)}removeBackgroundAudio(t){this.activeAudioTracks.forEach((e=>{e.stop(),t.sound.remove(e)})),this.activeAudioTracks=[]}playBackgroundAudio(){this.activeAudioTracks.forEach((t=>{t.setMute(!1),t.play()}))}setBackgroundAudioMute(t){this.activeAudioTracks.forEach((e=>{e.setMute(t)}))}startLayer(){const t=this.getActiveLayer(),e=this.activeLayerIndex;this.score.resetLayerScores(t.data.nodes.length,t.data.progressCount);const s=this.track.songTimePositionToTime({bar:2,step:1,tick:0}),i=Math.max(s,t.getPreviewTime());t.start(i);const n=[...t.data.backgroundLayers];oe.disableSonification&&n.push(t.data.id),this.addBackgroundAudio(this.scene,{loop:!0,volume:oe.backgroundMusicLevel},((t,e)=>n.includes(t.id))),this.scene.time.delayedCall(i,(()=>{this.activeLayerIndex==e&&this.playBackgroundAudio()}))}getActiveLayer(){return te(this.activeLayerIndex=this.playableLayers.length)return this.score.saveLayerScores(),t.postDelayStop(),void this.end();this.scene.time.delayedCall(1e3,(()=>{this.activeLayerIndex==e&&(this.score.saveLayerScores(),t.postDelayStop(),this.startLayer())}))}}stop(){this.removeBackgroundAudio(this.scene),this.streak.stop(),this.unloadLayers()}end(){this.stop(),this.finishCallback()}abort(){this.stop(),this.abortCallback()}update(t){this.activeLayerIndex{this.bpmText.destroy()}))}updateTint(){this.toggleState?(this.bpmText.setTintFill(rt),this.setTintFill(rt)):(this.bpmText.setTintFill(this.bpmTextOptions.color),this.clearTint())}get bpmIndex(){return this.bpmIndex_}}var Ke=n().Math.Vector2,je=n().Math.RoundTo;class Ne extends l{constructor(t,e,s,i,n,a,o,r){super(t),this.isDragging=!1,this.range=new Ke(0,1),this.isInteger=!1,this.x=e.x,this.y=e.y,this.width=s.x,this.height=s.y,this.key=a,this.updateSliderCallback=r,this.range=o,this.value=.5,this.box=new u(0,0,s.x,s.y),this.handle=new u(0,0,s.y,s.y),this.updateHandle(),null!=i&&(this.label=this.scene.add.text(this.x+i.x,this.y+i.y,Qt,{color:"#ffffff",fontSize:"24px"})),this.setInteractive(this.box,u.Contains),this.on("pointerdown",this.startDrag,this),this.scene.input.on("pointerup",this.stopDrag,this),this.scene.input.on("pointermove",this.doDrag,this),te("number"==typeof n[this.key]),this.setValue(n[this.key]),this.draw()}reset(t){te("number"==typeof t[this.key]),this.setValue(t[this.key]),this.draw()}startDrag(){this.isDragging=!0}doDrag(t){this.isDragging&&(this.value=n().Math.Clamp((t.x-this.x-this.handle.width/2)/(this.width-this.handle.width),0,1),this.updateHandle(),this.draw())}stopDrag(){this.isDragging=!1}updateHandle(){this.handle.x=this.value*(this.width-this.handle.width)}draw(){this.clear(),null!=this.input&&(this.input.enabled||this.setInteractive(this.box,u.Contains),this.updateSliderCallback(this)),this.fillStyle(11184810),this.fillRectShape(this.box),this.fillStyle(16777215),this.fillRectShape(this.handle)}getStringValue(){const t=this.getValue();return this.isInteger?t.toFixed(0):t.toFixed(2)}getValue(){const t=this.value*(this.range.y-this.range.x)+this.range.x;return this.isInteger?je(t,0):t}setIsInteger(t){return this.isInteger=t,this.draw(),this}setValue(t){this.value=(t-this.range.x)/(this.range.y-this.range.x),this.updateHandle(),this.draw()}hide(t){return this.clear(),null!=this.input&&this.disableInteractive(),null!=this.label&&null!=this.label&&this.label.active&&(null!=t?this.label.setText(t):this.label.setText("")),this}}class We extends l{constructor(t,e,s,i,n,a,o,r){super(t),this.labelText=Qt,this.x=e.x,this.y=e.y,this.key=o,null!=i&&(this.labelText=n,this.label=this.scene.add.text(e.x+i.x,e.y+i.y,this.labelText,{color:"#ffffff",fontSize:"24px"})),this.toggleCallback=r,te("boolean"==typeof a[this.key]),this.isChecked_=a[this.key],this.box=new u(0,0,s,s),this.check=new u(.25*s,.25*s,.5*s,.5*s),this.setInteractive(this.box,u.Contains),this.toggleCallback(this),this.on("pointerdown",this.toggleCheck,this),this.draw()}reset(t){te("boolean"==typeof t[this.key]),this.isChecked_=t[this.key],this.toggleCallback(this),this.draw()}resetLabel(){null!=this.label&&this.label.setText(this.labelText)}setLabel(t){null!=this.label&&this.label.setText(t),this.draw()}toggleCheck(){this.isChecked_=!this.isChecked_,this.toggleCallback(this),this.draw()}draw(){this.clear(),null==this.input||this.input.enabled||this.setInteractive(this.box,u.Contains),this.lineStyle(2,16777215),this.strokeRectShape(this.box),this.isChecked_&&(this.fillStyle(16777215),this.fillRectShape(this.check))}setToggled(t){"boolean"==typeof t&&(this.isChecked_=t,this.toggleCallback(this),this.draw())}hide(){return this.clear(),this.disableInteractive(),null!=this.label&&this.label.setText(""),this}get isChecked(){return this.isChecked_}}var ze=function(t,e,s,i){return new(s||(s=Promise))((function(n,a){function o(t){try{h(i.next(t))}catch(t){a(t)}}function r(t){try{h(i.throw(t))}catch(t){a(t)}}function h(t){var e;t.done?n(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(o,r)}h((i=i.apply(t,e||[])).next())}))};const Re=window.innerWidth,Ge=window.innerHeight,qe=.5*Re,$e=.1*Re,Je=.64*Re,Ue=.1*Ge,Xe=.08*Ge,Qe=.32*Ge,Ye=.08*Ge,Ze=.57*Ge,ts=.08*Ge,es=new r(.26*Re,.03*Ge),ss={type:n().WEBGL,scale:{mode:n().Scale.RESIZE},transparent:!0,physics:{default:"matter",matter:{debug:!1,gravity:{x:0,y:0}}},scene:[class extends p{constructor(){super("electron")}create(){return pe(this,void 0,void 0,(function*(){yield new Promise(((t,e)=>{t()})).then((()=>{this.scene.start(jt)}))}))}},class extends p{constructor(){super(jt)}preload(){this.load.image(y,se("assets/sprites/finger.png")),this.load.image(C,se("assets/ui/menu_background.png"))}create(){return pe(this,void 0,void 0,(function*(){ve=this.add.sprite(0,0,C).setOrigin(0,0).setAlpha(.9).setDisplaySize(window.innerWidth,window.innerHeight);const t=this.add.text(this.cameras.main.worldView.x+this.cameras.main.width/2,this.cameras.main.worldView.y+this.cameras.main.height/2,"",mt).setShadow(1,1).setDepth(1e3).setOrigin(.5);yield ce.init(Jt,this.updateText.bind(this,t)).catch((e=>{this.updateText(t,e)})),ce.found()&&(this.updateText(t,"Loading config data..."),yield he(Y),yield ge.init(this.updateText.bind(this,t)).catch((e=>this.updateText(t,e))),ge.found()&&(ce.setVisibility(Jt.visible),this.scene.launch($t),ge.precache(this.updateText.bind(this,t)),this.updateText(t,"Loading game..."),this.scene.get($t).load.on("complete",(()=>{t.destroy()}))))}))}updateText(t,e){console.info("INFO: "+e);let s=e;e instanceof DOMException&&(s="NotFoundError"==e.name?"Webcam not found":"PermissionError"==e.name?"Permission denied":"NotADirectoryError"==e.name?e.message:e.name+": "+e.message),t.setText(s)}},class extends xe{constructor(){super(zt),this.levels=[]}preload(){const t=Object.create(null,{preload:{get:()=>super.preload}});return e=this,s=void 0,n=function*(){t.preload.call(this),this.load.audio(M,se(q)),this.load.image(I,se("assets/ui/menu_logo.png")),this.load.image(S,se("assets/ui/menu_options.png")),this.load.image(k,se("assets/ui/menu_select_level.png")),this.load.image(x,se("assets/ui/menu_setup_camera.png")),yield function(t){return new Promise(((e,s)=>Yt(this,void 0,void 0,(function*(){yield Zt(se(t)).then((t=>{e(t)})).catch((()=>{s([])}))}))))}(se(X)).then((t=>{t.forEach(((t,e)=>{this.levels.push(new Ae(t))})),this.levels.forEach((t=>{t.preloadTrack(this)}))}))},new((i=void 0)||(i=Promise))((function(t,a){function o(t){try{h(n.next(t))}catch(t){a(t)}}function r(t){try{h(n.throw(t))}catch(t){a(t)}}function h(e){var s;e.done?t(e.value):(s=e.value,s instanceof i?s:new i((function(t){t(s)}))).then(o,r)}h((n=n.apply(e,s||[])).next())}));var e,s,i,n}create(){super.create(),this.levels.forEach((t=>{t.setBPM(0)}));const t=window.innerWidth,e=window.innerHeight,s=.5*t;this.menuCalibrate=new ke(this,new r(s-.25*t,Kt*e),Mt,x,M,!0),this.levels.length>0&&(this.menuSelectLevel=new ke(this,new r(s,Kt*e),Mt,k,M,!0),this.menuSelectLevel.addPinchCallbacks({startPinch:()=>{this.scene.start(Rt,this.levels)},startHover:()=>{this.menuSelectLevel.setTintFill(ot)},endHover:()=>{this.menuSelectLevel.clearTint()}})),this.menuOptions=new ke(this,new r(s+.25*t,Kt*e),Mt,S,M,!0),this.menuLogo=this.add.sprite(0,0,I).setOrigin(0,0).setScale(.7,.7),this.menuLogo.setPosition(s-this.menuLogo.displayWidth/2,.25*e),this.menuCalibrate.addPinchCallbacks({startPinch:()=>{this.scene.start(Gt)},startHover:()=>{this.menuCalibrate.setTintFill(ot)},endHover:()=>{this.menuCalibrate.clearTint()}}),this.menuOptions.addPinchCallbacks({startPinch:()=>{this.scene.start(qt)},startHover:()=>{this.menuOptions.setTintFill(ot)},endHover:()=>{this.menuOptions.clearTint()}})}update(t,e){super.update(t,e)}},class extends xe{constructor(){super(qt),this.options=[],he(Y).then((t=>ze(this,void 0,void 0,(function*(){this.configData=t,yield he(Z).then((t=>{this.defaultData=t}))}))))}saveAndExit(){var t;t=this.configData,se(Y),JSON.stringify(t),re(t),ce.setVisibility(this.configData.enableCameraVisibility),null!=this.rotateTween&&this.rotateTween.destroy(),this.scene.start(zt)}preload(){return ze(this,void 0,void 0,(function*(){this.load.audio(M,se(q)),this.load.image(L,se("assets/ui/options_background.png")),this.load.image(_,se(G)),this.load.image(A,se("assets/ui/reset_button.png")),this.load.image(P,se(R))}))}create(){const t=Object.create(null,{create:{get:()=>super.create}});return ze(this,void 0,void 0,(function*(){t.create.call(this),this.createOptions()}))}createOptions(){this.backToMenu=new ke(this,new r(qe-.1*Re,.9*Ge),Mt,_,M,!0),this.resetConfig=new ke(this,new r(qe+.1*Re,.9*Ge),Mt,A,M,!0),this.input.keyboard.on(vt,(()=>{this.saveAndExit()})),this.add.sprite(.09*Re,.05*Ge,L).setOrigin(0,0).setAlpha(.8).setDisplaySize(.28*Re,.185*Ge),this.add.sprite(.09*Re,.26*Ge,L).setOrigin(0,0).setAlpha(.8).setDisplaySize(.28*Re,.27*Ge),this.add.sprite(.09*Re,.55*Ge,L).setOrigin(0,0).setAlpha(.8).setDisplaySize(.28*Re,.23*Ge),this.add.sprite(.63*Re,.05*Ge,L).setOrigin(0,0).setAlpha(.8).setDisplaySize(.28*Re,.185*Ge),this.add.sprite(.63*Re,.26*Ge,L).setOrigin(0,0).setAlpha(.8).setDisplaySize(.28*Re,.27*Ge),this.add.sprite(.63*Re,.55*Ge,L).setOrigin(0,0).setAlpha(.8).setDisplaySize(.28*Re,.23*Ge);const t=this.add.sprite(.5*Re,Ue+0*Xe+.15*Ge,P).setTint(tt[it]).setScale(this.configData.targetSize);this.rotateTween=this.tweens.add({targets:[t],rotation:2*Math.PI,ease:"Power0",duration:1e3,repeat:-1}),this.configData.fancyEffectsDisabled&&null!=this.rotateTween&&this.rotateTween.pause();const e=new Ne(this,new r($e,Ue+0*Xe),es,new r(0,At.y),this.configData,"targetSize",new r(.5,3),(e=>{e.label.setText("Target Scale: "+e.getStringValue());const s=e.getValue();this.configData[e.key]=s,t.setScale(s)}));this.options.push(e),this.add.existing(e);const s=new Ne(this,new r($e,Ue+1*Xe),es,new r(0,At.y),this.configData,"fingerSize",new r(.5,3),(t=>{null!=t.label&&t.label.setText("Finger Scale: "+t.getStringValue());const e=t.getValue();this.configData[t.key]=e,this.hand.setFingerScale(e)}));this.options.push(s),this.add.existing(s);const i=t=>{null!=t&&t.active&&(null!=t.label&&t.label.active&&t.label.setText("Camera Opacity: "+t.getStringValue()),this.configData[t.key]=t.getValue(),this.setOpacity(this.configData[t.key]))},n=new Ne(this,new r($e,Qe+0*Ye),es,At,this.configData,"cameraOpacity",new r(.01,1),i),a=new We(this,new r($e,Qe+0*Ye+It.y),25,void 0,Qt,this.configData,"enableCameraVisibility",(t=>{this.configData[t.key]=t.isChecked,ce.setVisibility(t.isChecked),t.isChecked?n.draw():(n.setValue(this.defaultData.cameraOpacity),i(n),this.setOpacity(0),n.hide("Show Camera"))}));this.options.push(n),this.options.push(a),this.add.existing(n),this.add.existing(a);const o=new Ne(this,new r($e,Qe+1*Ye),es,At,this.configData,"skipLoopThreshold",new r(1,16),(t=>{t.label.setText("Skip Button After Loop: "+t.getStringValue()),this.configData[t.key]=t.getValue()})).setIsInteger(!0),h=new We(this,new r($e,Qe+1*Ye+It.y),25,void 0,Qt,this.configData,"enableSkipButton",(t=>{this.configData[t.key]=t.isChecked,t.isChecked?o.draw():o.hide("Show Layer Skip Button")}));this.options.push(o),this.options.push(h),this.add.existing(o),this.add.existing(h);const l=new Ne(this,new r($e,Qe+2*Ye),es,At,this.configData,"autoSkipThreshold",new r(1,16),(t=>{t.label.setText("Skip Layers After Loop: "+t.getStringValue()),this.configData[t.key]=t.getValue()})).setIsInteger(!0),c=new We(this,new r($e,Qe+2*Ye+It.y),25,void 0,Qt,this.configData,"enableAutoSkip",(t=>{this.configData[t.key]=t.isChecked,t.isChecked?l.draw():l.hide("Skip Layers Automatically")}));this.options.push(l),this.options.push(c),this.add.existing(l),this.add.existing(c);const d=new We(this,new r($e,Ze+0*ts),25,new r(-It.x,0),"Disable Layer Progression",this.configData,"disableLayerProgression",(t=>{this.configData[t.key]=t.isChecked}));this.options.push(d),this.add.existing(d);const u=new We(this,new r($e,Ze+1*ts),25,new r(-It.x,0),"Index Finger Pinches Only",this.configData,"indexFingerOnly",(t=>{this.configData[t.key]=t.isChecked}));this.options.push(u),this.add.existing(u);const g=new We(this,new r($e,Ze+2*ts),25,new r(-It.x,0),"Disable Fancy Effects",this.configData,"fancyEffectsDisabled",(e=>{this.configData[e.key]=e.isChecked,e.isChecked?null!=this.rotateTween&&this.rotateTween.pause():e.isChecked||null!=this.rotateTween&&null!=t&&this.rotateTween.resume()}));this.options.push(g),this.add.existing(g);const p=new Ne(this,new r(Je,Ue+0*Xe),es,new r(0,At.y),this.configData,"onTimeDuration",new r(50,1e3),(t=>{t.label.setText("On Time Duration: "+t.getStringValue()+" ms"),this.configData[t.key]=t.getValue()})).setIsInteger(!0);this.options.push(p),this.add.existing(p);const v=new Ne(this,new r(Je,Ue+1*Xe),es,new r(0,At.y),this.configData,"lateTimeDuration",new r(50,1e3),(t=>{t.label.setText("Late Time Duration: "+t.getStringValue()+" ms"),this.configData[t.key]=t.getValue()})).setIsInteger(!0);this.options.push(v),this.add.existing(v);const m=new Ne(this,new r(Je,Qe+0*Ye),es,new r(0,At.y),this.configData,"sonificationLevel",new r(0,1),(t=>{t.label.setText("Pinch Volume: "+t.getStringValue()),this.configData[t.key]=t.getValue()}));this.options.push(m),this.add.existing(m);const y=new Ne(this,new r(Je,Qe+1*Ye),es,new r(0,At.y),this.configData,"backgroundMusicLevel",new r(0,1),(t=>{t.label.setText("Track Volume: "+t.getStringValue()),this.configData[t.key]=t.getValue()}));this.options.push(y),this.add.existing(y);const f=new We(this,new r(Je,Ze+0*ts),25,new r(-It.x,0),"Disable Visual Metronome",this.configData,"disableVisualMetronome",(t=>{this.configData[t.key]=t.isChecked}));this.options.push(f),this.add.existing(f);const b=new We(this,new r(Je,Ze+1*ts),25,new r(-It.x,0),"Disable Sonification",this.configData,"disableSonification",(t=>{this.configData[t.key]=t.isChecked}));this.options.push(b),this.add.existing(b),this.backToMenu.addPinchCallbacks({startPinch:()=>{this.saveAndExit()},startHover:()=>{this.backToMenu.setTintFill(ot)},endHover:()=>{this.backToMenu.clearTint()}}),this.resetConfig.addPinchCallbacks({startPinch:()=>ze(this,void 0,void 0,(function*(){this.configData=yield he(Z);for(const t of this.options)t.reset(this.configData)})),startHover:()=>{this.resetConfig.setTintFill(ot)},endHover:()=>{this.resetConfig.clearTint()}})}update(t,e){super.update(t,e)}},class extends xe{constructor(){super(Rt),this.currentLevelIndex=0,this.difficultyButtons=[],this.levels=[],te(this.currentLevelIndex>=0,"Level select default level must be >= 0")}preload(){this.levels=this.scene.settings.data,te(this.currentLevelIndex{this.scene.start(zt),this.exit()})),this.add.sprite(.5*window.innerWidth,.5*window.innerHeight-.1*window.innerHeight,f).setScale(_t.x,_t.y).setOrigin(.5,.5),this.backToMenu.addPinchCallbacks({startPinch:()=>{this.scene.start(zt),this.exit()},startHover:()=>{this.backToMenu.setTintFill(ot)},endHover:()=>{this.backToMenu.clearTint()}}),this.play.addPinchCallbacks({startPinch:()=>{this.startLevel(this.getCurrentLevel())},startHover:()=>{this.play.setTintFill(ot)},endHover:()=>{this.play.clearTint()}}),this.add.sprite(s,e*Et,b).setTintFill(0).setScale(.4,.4).setOrigin(.5,.5),this.songName=this.add.text(s,e*Et,Qt,{font:"50px Courier New"}).setColor("white").setOrigin(.5,.5),this.updateLevel(0),this.previousLevel.addPinchCallbacks({startPinch:()=>{this.updateLevel(-1)},startHover:()=>{this.previousLevel.setTintFill(ot)},endHover:()=>{this.previousLevel.clearTint()}}),this.nextLevel.addPinchCallbacks({startPinch:()=>{this.updateLevel(1)},startHover:()=>{this.nextLevel.setTintFill(ot)},endHover:()=>{this.nextLevel.clearTint()}}),this.muteButton.addToggleCallback((t=>{this.setBackgroundAudioMute(!t)})),this.muteButton.addPinchCallbacks({startPinch:()=>{this.muteButton.toggle()},startHover:()=>{this.muteButton.setTintFill(ot)},endHover:()=>{this.muteButton.clearTint()}})}exit(){this.stopAudio()}startLevel(t){this.exit(),this.scene.start(Nt,t)}createDifficultyButtons(t){const e=window.innerWidth,s=window.innerHeight,i=.5*e;for(const t of this.difficultyButtons)t.destroy();this.difficultyButtons=[];const n=t.track.data.bpm,a=[D,O,H],o=[new r(i-.2*e,Ft*s),new r(i,Ft*s),new r(i+.2*e,Ft*s)];te(a.length>=n.length,"buttonKeys array length must at least match the number of track bpms"),te(o.length>=n.length,"positions array length must at least match the number of track bpms");for(let e=0;e{c.updateTint(),e&&(t.setBPM(c.bpmIndex),this.startPreview(t))})),c.addPinchCallbacks({startPinch:()=>{for(const t of this.getDifficultyButtons())t!=c&&t.setToggleState(!1);c.setToggleState(!0)},startHover:()=>{c.setTintFill(ot)},endHover:()=>{c.updateTint()}}),this.difficultyButtons.push(c)}}getDifficultyButtons(){return this.difficultyButtons}setBackgroundAudioMute(t){for(const e of this.levels)e.setBackgroundAudioMute(t)}startVideo(t){if(null!=this.videoPreview&&this.videoPreview.destroy(),t.hasPreviewVideo()){this.videoPreview=this.add.video(.5*window.innerWidth,.5*window.innerHeight-.1*window.innerHeight,t.getPreviewVideoKey()).setScale(_t.x,_t.y).setOrigin(.5,.5);const e=t.track.data.bpm[t.bpmIndex]/t.track.data.bpm[0];this.videoPreview.video&&(this.videoPreview.video.playbackRate=e),this.videoPreview.play(!0)}else this.videoPreview=this.add.sprite(.5*window.innerWidth,.5*window.innerHeight-.1*window.innerHeight,z).setScale(_t.x,_t.y).setOrigin(.5,.5)}startPreview(t){this.stopAudio(),t.addBackgroundAudio(this,{loop:!0,volume:.5*oe.backgroundMusicLevel}),t.playBackgroundAudio(),t.setBackgroundAudioMute(!this.muteButton.getToggleState());const e=1e3*t.getAudioLoopTime();this.videoRefreshEvent=this.time.addEvent({delay:e,callback:()=>{this.startVideo(t)},callbackScope:this,loop:!0,startAt:e})}stopAudio(){this.videoRefreshEvent&&this.videoRefreshEvent.destroy();for(const t of this.levels)t.removeBackgroundAudio(this)}updateLevel(t){this.cycleLevel(t);const e=this.getCurrentLevel();this.songName.setText(e.track.data.displayName),this.startPreview(e),this.createDifficultyButtons(e)}cycleLevel(t){const e=this.levels.length;this.currentLevelIndex=((this.currentLevelIndex+t)%e+e)%e}getCurrentLevel(){return te(this.currentLevelIndex{this.level.abort()})),this.level.start((()=>{this.scene.start(Wt,this.level)}),(()=>{this.scene.start(zt)}))}update(t,e){super.update(t,e),this.level.update(t)}},class extends xe{constructor(){super(Wt)}exit(){this.level.removeBackgroundAudio(this),this.scene.start(zt)}preload(){this.load.audio(M,se(q)),this.load.image(_,se(G)),this.load.image(E,se($)),this.load.image(F,se(J)),this.load.image(N,se("assets/ui/save_csv_button.png")),this.load.image(w,se("assets/ui/layer_score_background.png")),this.load.image(T,se("assets/ui/scoreboard_background.png")),this.level=this.scene.settings.data,this.levelStats=this.level.score.levelStats,oe.autoSaveCSV&&this.level.score.levelStats}create(){super.create();const t=window.innerWidth,e=window.innerHeight,s=.5*t,i=Math.min(t/1920,e/1080);this.backToMenu=new ke(this,new r(s,.9*e),Mt,_,M,!0),this.muteButton=new Ee(this,new r(s+.45*t,.9*e),Vt,E,F,M,!0,!0),this.level.addBackgroundAudio(this,{loop:!0,volume:.5*oe.backgroundMusicLevel}),this.level.playBackgroundAudio(),this.muteButton.addToggleCallback((t=>{this.level.setBackgroundAudioMute(!t)})),this.muteButton.addPinchCallbacks({startPinch:()=>{this.muteButton.toggle()},startHover:()=>{this.muteButton.setTintFill(ot)},endHover:()=>{this.muteButton.clearTint()}}),this.input.keyboard.on(vt,(()=>{this.exit()})),oe.autoSaveCSV||(this.saveButton=new ke(this,new r(s-.4*t,.9*e),new r(.6,.6),N,M,!0),this.saveButton.addPinchCallbacks({startPinch:()=>{var t,e;t=this.levelStats,e=new Blob([a(t)],{type:"text/plain;charset=utf-8"}),ae.saveAs(e,t.id+".csv")},startHover:()=>{this.saveButton.setTintFill(ot)},endHover:()=>{this.saveButton.clearTint()}})),this.add.sprite(0,0,T).setOrigin(.5,.5).setScale(1.35*i,1.25*i).setAlpha(.6).setPosition(s,.25*e);const n=this.add.text(s,0,"Scoreboard",{color:"#01c303",font:96*i+"px Arial"});n.setStroke("#000",6*i),n.setPosition(s-n.width/2,.07*e);const o=this.levelStats.layersStats.reduce(((t,e)=>t+e.total),0),h=this.levelStats.layersStats.reduce(((t,e)=>t+e.correct),0),l=this.levelStats.layersStats.reduce(((t,e)=>t+e.miss),0),c=this.levelStats.layersStats.reduce(((t,e)=>t+e.early),0),d=this.levelStats.layersStats.reduce(((t,e)=>t+e.late),0),u=this.add.text(s,0,`Total Correct: ${h.toString()}/${o.toString()}\nLongest Streak: ${this.levelStats.maxStreak}\nMissed: ${l}\nEarly: ${c}\nLate: ${d}`,{color:"#ffffff",align:"center",font:48*i+"px Arial"});u.setPosition(s-u.width/2,.19*e);const g=[.25,.5,.75],p=g;this.level.track.forEachLayer(void 0,((s,n)=>{this.add.sprite(0,0,w).setOrigin(.5,.5).setScale(1.35*i,1.15*i).setAlpha(.6).setPosition(t*g[n],.63*e);const a=this.add.text(0,0,`${o=s.id,o&&o[0].toUpperCase()+o.slice(1)||""}`,{color:"#01c303",align:"center",font:72*i+"px Arial",fontStyle:"bold"});var o;a.setStroke("#000",4*i),a.setPosition(t*p[n]-a.width/2,.53*e);const r=this.levelStats.layersStats[n];let h=0,l=0,c=0;null!=r&&(h=r.correct,l=r.total,c=r.loop);const d=this.add.text(0,0,`\nCorrect: ${h.toString()}/${l.toString()}\nLoops: ${c.toString()}`,{color:"#ffffff",align:"center",font:48*i+"px Arial"});d.setPosition(t*p[n]-d.width/2,.575*e+.01)})),this.backToMenu.addPinchCallbacks({startPinch:()=>{this.exit()},startHover:()=>{this.backToMenu.setTintFill(ot)},endHover:()=>{this.backToMenu.clearTint()}})}update(t,e){super.update(t,e)}},class extends xe{constructor(){super(Gt)}exit(){this.scene.start(zt)}preload(){this.load.image(_,se(G)),this.load.audio(M,se(q)),this.load.image(V,se("assets/ui/calibration_background.png"))}create(){super.create(!0,.8);const t=window.innerWidth,e=window.innerHeight,s=.5*t;this.backToMenu=new ke(this,new r(s,.9*e),Mt,_,M,!0),this.setBackgroundTexture(V),this.input.keyboard.on(vt,(()=>{this.exit()})),this.distanceText=this.add.text(s,.1*e,Qt,{color:"white",font:"60px Arial"}).setShadow(5,5,"rgba(0,0,0,0.5)",15).setOrigin(.5,.5),this.backToMenu.addPinchCallbacks({startPinch:()=>{this.exit()},startHover:()=>{this.backToMenu.setTintFill(ot)},endHover:()=>{this.backToMenu.clearTint()}})}update(t,e){super.update(t,e);const s=this.hand.calculateHandDistance();let i="Hand Not Recognized";if(s>0){let t=65280;s>40?(i="Too Far - Estimated Distance: ",t=16711680):s<20?(i="Too Close - Estimated Distance: ",t=255):i="Just Right - Estimated Distance: ",this.setBackgroundTint(t),i+=s.toFixed(0)+" cm"}else this.clearBackgroundTint();null!=this.distanceText&&this.distanceText.active&&this.distanceText.setText(i)}}]};new(n().Game)(ss)}},s={};function i(t){var n=s[t];if(void 0!==n)return n.exports;var a=s[t]={exports:{}};return e[t].call(a.exports,a,a.exports,i),a.exports}i.m=e,t=[],i.O=(e,s,n,a)=>{if(!s){var o=1/0;for(c=0;c=a)&&Object.keys(i.O).every((t=>i.O[t](s[h])))?s.splice(h--,1):(r=!1,a0&&t[c-1][2]>a;c--)t[c]=t[c-1];t[c]=[s,n,a]},i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var s in e)i.o(e,s)&&!i.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{var t={792:0};i.O.j=e=>0===t[e];var e=(e,s)=>{var n,a,[o,r,h]=s,l=0;if(o.some((e=>0!==t[e]))){for(n in r)i.o(r,n)&&(i.m[n]=r[n]);if(h)var c=h(i)}for(e&&e(s);li(852)));n=i.O(n)})(); \ No newline at end of file diff --git a/main.6f0758792536e9441643.bundle.js b/main.6f0758792536e9441643.bundle.js new file mode 100644 index 0000000..9407671 --- /dev/null +++ b/main.6f0758792536e9441643.bundle.js @@ -0,0 +1 @@ +(()=>{"use strict";var t,e={852:(t,e,s)=>{var i=s(440),n=s.n(i);function a(t){let e="layerID,noteID,loopNumber,playerTime,correctTime,classification\n";for(const s of t.layersStats){const i=t.layersStats.indexOf(s);for(const t of s.hits)e+=`${i},${t.noteID},${t.loopNumber},${o(t.playerTime)},${o(t.correctTime)},${t.classification}\n`}return e}function o(t,e=3){return parseFloat((t/1e3).toFixed(e))}const r=Phaser.Math.Vector2,h=Phaser.GameObjects.Group,l=Phaser.GameObjects.Graphics,c=Phaser.Time.TimerEvent,d=Phaser.GameObjects.GameObject,u=Phaser.Geom.Rectangle,g=(Phaser.Geom.Circle,Phaser.Input.Pointer,Phaser.GameObjects.Text),p=(Phaser.GameObjects.Sprite,Phaser.GameObjects.Video,Phaser.GameObjects.RenderTexture,Phaser.Events.EventEmitter,Phaser.GameObjects.Image,Phaser.Scene),v=(Phaser.Tilemaps.Tile,Phaser.Tweens.Tween,Phaser.GameObjects.Particles.ParticleEmitter,Phaser.Physics.Matter.Sprite),m=(Phaser.Physics.Arcade.Sprite,!0),y="levels/",f=y+"list.json",b=".mp3",w="assets/sounds/ui/menu_ding"+b,T="finger",x="previewVideoBackground",k="songNameBackground",S="layerScoreBackground",P="scoreboardBackground",L="menuCalibrateButton",C="menuSelectButton",B="optionsButton",D="targetInner",O="background1",H="mainBackground",_="playButton",M="easyButton",V="mediumButton",I="hardButton",A="backButton",E="buttonDing",K="calibrationBackground",F="menuLogo",j="resetButton",N="muteButton",W="unmuteButton",z="leftArrow",R="rightArrow",G="saveCSVButton",q="defaultLevelbackground",$="defaultPreviewbackground",J="assets/sprites/defaultTargetInner.png",U="assets/ui/back_button.png",X="assets/ui/mute_button.png",Q="assets/ui/unmute_button.png",Y="data/config.json",Z="data/default_config.json",tt={thumb:16777215,index:14948892,middle:38655,ring:16771584,pinky:14315734},et={lineWidth:5,color:11393254,alpha:.5},st={lineWidth:5,color:11393254,alpha:1,radius:.1},it="thumb",nt="index",at=nt,ot=16777215,rt=14948892,ht=D,lt="targetOuter",ct=J,dt={scale:1.03,color:16777215,ease:"linear"},ut={scale:.78,color:5091146,ease:"linear"},gt={scale:.3,color:16744192,ease:"linear"},pt={scale:0,color:8421504,ease:"cubic.in"},vt="keydown-ESC",mt={font:"32px Courier",color:"#00ff00"},yt={position:ne(new r(.05,.05)),color:"white",scale:1,font:"30px Arial",depth:40,strokeThickness:0,shadowOffset:new r(2,2),shadowColor:"black",shadowBlurRadius:2},ft={color:[16436258,16291840,16266752,10421252],colorEase:"quad.out",lifespan:500,scale:{start:.7,end:0,ease:"sine.out"},speed:200,advance:500,frequency:50,blendMode:"ADD",duration:0},bt="flare",wt={position:ne(new r(.5,0)),size:ne(new r(.4,.04)),requiredTint:524543,completedRequiredTint:2840741,completedTint:ut.color,extraTint:ut.color,path:"assets/ui/progress_bar_segment.png",key:"segment",tintByNode:!1},Tt={highKey:"metronome/high",highPath:"assets/sounds/metronome/high"+b,lowKey:"metronome/low",lowPath:"assets/sounds/metronome/low"+b},xt="countdown",kt={position:ne(new r(.5,.5)),color:"white",scale:1,ease:"Power0",font:"240px Arial",depth:30},St={position:ne(new r(.835,0)),size:new r(.16*window.innerWidth,.2684*window.innerHeight),textureKey:"infoBackground",opacity:.3,path:"assets/ui/info_background.png"},Pt={position:ne(new r(.93,.9)),scale:new r(.3,.3),soundKey:E,textureKey:"skipButton",path:"assets/ui/skip_button.png"},Lt={position:ne(new r(.85,.02)),color:"white",font:"20px Arial",scale:1,depth:40},Ct={position:ne(new r(.85,.07)),color:"white",font:"20px Arial",scale:1,depth:40},Bt={position:ne(new r(.85,.12)),color:"white",font:"20px Arial",scale:1,depth:40},Dt={position:ne(new r(.85,.17)),color:"white",font:"20px Arial",scale:1,depth:40},Ot={position:ne(new r(.85,.22)),color:"white",font:"20px Arial",scale:1,depth:40},Ht=.115,_t=new r(.43,.43),Mt=new r(.6,.6),Vt=new r(1.5,1.5),It=new r(-32,-32),At=new r(32,-32),Et=.07,Kt=.71,Ft=.75,jt="loading",Nt="level",Wt="scoreboard",zt="mainMenu",Rt="levelSelect",Gt="calibration",qt="options",$t=zt,Jt={visible:!1,flip:!0,opacity:0,width:window.innerWidth,height:window.innerHeight,objectFit:"fill"},Ut={video:{width:{ideal:640},height:{ideal:360}},audio:!1},Xt={baseOptions:{delegate:"GPU"},runningMode:"VIDEO",numHands:1,minHandDetectionConfidence:.5,minHandPresenceConfidence:.5,minTrackingConfidence:.5},Qt="UNDEFINED";var Yt=function(t,e,s,i){return new(s||(s=Promise))((function(n,a){function o(t){try{h(i.next(t))}catch(t){a(t)}}function r(t){try{h(i.throw(t))}catch(t){a(t)}}function h(t){var e;t.done?n(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(o,r)}h((i=i.apply(t,e||[])).next())}))};function Zt(t){return new Promise(((e,s)=>Yt(this,void 0,void 0,(function*(){var i;yield("GET",i=t,new Promise((function(t,e){let s=new XMLHttpRequest;s.open("GET",i),s.onload=function(){this.status>=200&&this.status<300?t(s):e({status:this.status,statusText:s.statusText})},s.onerror=function(){e({status:this.status,statusText:s.statusText})},s.send()}))).then((t=>{e(JSON.parse(t.responseText.toString("utf8")))})).catch((()=>{s()}))}))))}function te(t,e="no error message provided"){if(m&&!t)throw new Error("Assertion failed: "+e)}function ee(t,e=""){const s="".replace(/\\/g,"/")+e;return t=t.replace(/\\/g,"/"),"/"==Array.from(t)[0]?s+t:s+"/"+t}function se(t){return ee(t,"")}function ie(t){return se(t),!0}function ne(t){return t instanceof r?new r(t.x*window.innerWidth,t.y*window.innerHeight):new r(t[0]*window.innerWidth,t[1]*window.innerHeight)}const ae=s(213);let oe;function re(t){oe=t}function he(t){return new Promise(((e,s)=>{return i=this,n=void 0,o=function*(){yield Zt(se(t)).then((t=>{const s=t;re(s),e(s)})).catch((()=>{s()}))},new((a=void 0)||(a=Promise))((function(t,e){function s(t){try{h(o.next(t))}catch(t){e(t)}}function r(t){try{h(o.throw(t))}catch(t){e(t)}}function h(e){var i;e.done?t(e.value):(i=e.value,i instanceof a?i:new a((function(t){t(i)}))).then(s,r)}h((o=o.apply(i,n||[])).next())}));var i,n,a,o}))}var le=function(t,e,s,i){return new(s||(s=Promise))((function(n,a){function o(t){try{h(i.next(t))}catch(t){a(t)}}function r(t){try{h(i.throw(t))}catch(t){a(t)}}function h(t){var e;t.done?n(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(o,r)}h((i=i.apply(t,e||[])).next())}))};const ce=new class{init(t,e){return le(this,void 0,void 0,(function*(){return new Promise(((s,i)=>le(this,void 0,void 0,(function*(){e("Loading webcam..."),this.setupVideoElement(t),yield navigator.mediaDevices.getUserMedia(Ut).then((t=>{"srcObject"in this.video?(this.video.srcObject=t,this.video.addEventListener("loadeddata",(()=>{s(!0)}))):i("srcObject does not exist on older browsers")})).catch((t=>{i(t)}))}))))}))}found(){return null!=this.video.srcObject}setVisibility(t){this.video.style.visibility="",this.video.style.visibility=t?"shown":"hidden"}setWidth(t){this.video.width=t}setHeight(t){this.video.height=t}setupVideoElement(t){this.video=document.body.appendChild(document.createElement("video")),this.video.autoplay=!0,this.video.muted=!0,this.video.playsInline=!0,this.video.style.position="absolute",this.video.style.top="0",this.video.style.left="0",this.video.style.bottom="0",this.video.style.zIndex="-1",this.video.style.pointerEvents="none",this.video.style.objectFit=t.objectFit,this.setWidth(t.width),this.setHeight(t.height),t.flip&&(this.video.style.cssText+="-moz-transform: scale(-1, 1); -webkit-transform: scale(-1, 1); -o-transform: scale(-1, 1); transform: scale(-1, 1); filter: FlipH;"),this.setVisibility(!1)}get video(){return te(null!=this.video_),this.video_}set video(t){this.video_=t}};var de=s(260),ue=function(t,e,s,i){return new(s||(s=Promise))((function(n,a){function o(t){try{h(i.next(t))}catch(t){a(t)}}function r(t){try{h(i.throw(t))}catch(t){a(t)}}function h(t){var e;t.done?n(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(o,r)}h((i=i.apply(t,e||[])).next())}))};const ge=new class{constructor(){this.lastVideoTime=-1}init(t){return ue(this,void 0,void 0,(function*(){return new Promise(((e,s)=>ue(this,void 0,void 0,(function*(){let i;yield de.Ps.forVisionTasks(ee("models/wasm")).then((t=>i=t)).catch((t=>{s(t)})),t("Loading hand landmarker..."),Xt.baseOptions.modelAssetPath=se("models/hand_landmarker.task"),yield de.Vb.createFromOptions(i,Xt).then((t=>this.handLandmarker_=t)).catch((t=>{t instanceof Event&&"error"==t.type&&s("Failed to fetch vision_wasm_internal.js in specified wasm directory"),t instanceof TypeError&&s("Failed to fetch hand_landmark.task file"),s(t)})),e(!0)}))))}))}precache(t){t("Pre-caching landmarks..."),this.update()}found(){return null!=this.handLandmarker_}update(){this.lastVideoTime!=ce.video.currentTime&&(this.lastVideoTime=ce.video.currentTime,this.results_=this.handLandmarker.detectForVideo(ce.video,performance.now()))}get results(){return te(null!=this.results_),this.results_}get handLandmarker(){return te(null!=this.handLandmarker_),this.handLandmarker_}landmarksFound(t=0){return null!=this.results&&t=0&&s.x<=1&&s.y>=0&&s.y<=1}getLandmarkPosition(t,e=0){if(!this.landmarksFound(e))return;const s=this.results.landmarks[e][t],i=ne(new r(s.x,s.y));return new r(window.innerWidth-i.x,i.y)}forEachLandmarkPosition(t,e=0){for(let s=0;s<21;++s){const i=this.getLandmarkPosition(s,e);void 0!==i&&t(i)}}};var pe=function(t,e,s,i){return new(s||(s=Promise))((function(n,a){function o(t){try{h(i.next(t))}catch(t){a(t)}}function r(t){try{h(i.throw(t))}catch(t){a(t)}}function h(t){var e;t.done?n(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(o,r)}h((i=i.apply(t,e||[])).next())}))};let ve;function me(t,e){null!=t&&(t.setVisible(e),e?t.setInteractive():t.disableInteractive())}class ye extends v{constructor(t,e,s,i,n){super(t.matter.world,0,0,e,void 0,{render:{visible:!0}}),this.name=s,this.landmarkIndex=i,this.scene.add.existing(this),this.setScale(n),this.setTint(tt[this.name]),this.setDepth(100),this.setCircle(this.displayWidth/2,{label:this.name}),this.setSensor(!0),me(this,!1)}}var fe,be;!function(t){t[t.hover=0]="hover",t[t.pinch=1]="pinch"}(fe||(fe={})),function(t){t[t.start=0]="start",t[t.continue=1]="continue",t[t.end=2]="end"}(be||(be={}));class we extends d{getFinger(t){const e=this.fingers.findIndex((e=>e.name==t));if(-1!==e)return this.fingers[e]}get observers(){return this.observers_}isObserver(t){return void 0!==this.observers_.find((e=>e.fingerName===t.fingerName&&e.object==t.object))}wasObserverHovering(t){return te(this.isObserver(t)),this.observers_.find((e=>e.fingerName===t.fingerName&&e.object==t.object)).wasHovering}setObserverHover(t,e){const s=this.observers_.findIndex((e=>e.fingerName===t.fingerName&&e.object==t.object));te(-1!==s,"Cannot set observer hover before observer is pushed"),this.observers_[s].wasHovering=e}pushNewObserversOnly(t){this.isObserver(t)||(this.observers.push(t),this.setObserverHover(t,!1))}removeObserver(t){const e=this.observers_.findIndex((e=>e.fingerName===t.fingerName&&e.object==t.object));e>-1&&this.observers_.splice(e,1)}constructor(t){super(t,"hand"),this.fingers=[],this.observers_=[],this.fingers=[],this.observers_=[];const e=(t,e)=>{const s=new ye(this.scene,T,t,e,.3*oe.fingerSize);return this.fingers.push(s),s},s=e(it,4),i=(e(nt,8),e("middle",12),e("ring",16),e("pinky",20),(t,e)=>{t((t=>{const i=this.getFinger(t.bodyB.label);if(void 0!==i)for(const t of this.observers)t.fingerName==i.name&&null!=t.object&&t.object.input&&t.object.input.enabled&&t.object.emit(i.name+fe.pinch+e);else if(t.bodyB.gameObject){const i=t.bodyB.gameObject;for(const n of this.fingers){if(n==s)continue;const a={object:i,fingerName:n.name};if(!this.isObserver(a))continue;const o=this.scene.matter.overlap(t.bodyB,[n]);if(e===be.start&&o)i.emit(n.name+fe.hover+be.start),this.setObserverHover(a,!0);else if(e===be.continue){const t=this.wasObserverHovering(a);o&&t?(i.emit(n.name+fe.hover+be.continue),this.setObserverHover(a,!0)):o&&!t?(i.emit(n.name+fe.hover+be.start),this.setObserverHover(a,!0)):!o&&t&&(i.emit(n.name+fe.hover+be.end),this.setObserverHover(a,!1))}else e===be.end&&this.wasObserverHovering(a)&&(i.emit(n.name+fe.hover+be.end),this.setObserverHover(a,!1))}}}))});i(s.setOnCollide.bind(s),be.start),i(s.setOnCollideActive.bind(s),be.continue),i(s.setOnCollideEnd.bind(s),be.end)}setFingerScale(t){for(const e of this.fingers)e.setScale(.3*t)}addPinchCheck(t,e,s){this.pushNewObserversOnly({object:e,fingerName:t});const i=t=>{const s=this.getFinger(it),i=this.getFinger(t);if(void 0===s)return!1;if(void 0===i)return!1;const n=this.scene.matter.overlap(e,[s]),a=this.scene.matter.overlap(e,[i]);return n&&a};null!=s.startPinch&&e.on(t+fe.pinch+be.start,(()=>{var e;i(t)&&(null===(e=s.startPinch)||void 0===e||e.call(s))})),null!=s.pinched&&e.on(t+fe.pinch+be.continue,(()=>{var e;i(t)&&(null===(e=s.pinched)||void 0===e||e.call(s))})),null!=s.endPinch&&e.on(t+fe.pinch+be.end,(()=>{var e;i(t)&&(null===(e=s.endPinch)||void 0===e||e.call(s))})),null!=s.startHover&&e.on(t+fe.hover+be.start,(()=>{var t;null===(t=s.startHover)||void 0===t||t.call(s)})),null!=s.hovering&&e.on(t+fe.hover+be.continue,(()=>{var t;null===(t=s.hovering)||void 0===t||t.call(s)})),null!=s.endHover&&e.on(t+fe.hover+be.end,(()=>{var t;null===(t=s.endHover)||void 0===t||t.call(s)}))}removePinchCheck(t,e){this.removeObserver({fingerName:t,object:e}),e.off(t+fe.pinch+be.start),e.off(t+fe.pinch+be.continue),e.off(t+fe.pinch+be.end),e.off(t+fe.hover+be.start),e.off(t+fe.hover+be.continue),e.off(t+fe.hover+be.end)}update(){this.observers_=this.observers_.filter((t=>null!=t)),ge.update();const t=this.scene.matter.add.circle(this.scene.input.mousePointer.x,this.scene.input.mousePointer.y,1,{circleRadius:1,isSensor:!0,render:{visible:!1}});for(const e of this.fingers){const s=ge.getLandmarkPosition(e.landmarkIndex),i=void 0!==s;if(i&&e.setPosition(s.x,s.y),me(e,i),!i&&null!=t)for(const s of this.observers)null!=t&&null!=s.object&&s.object.active&&null!=this.scene&&(s.object.emit(e.name+fe.pinch+be.end),this.scene.matter.overlap(t,[s.object])||s.object.emit(e.name+fe.hover+be.end))}this.scene.matter.world.remove(t)}calculateHandDistance(t=0){const e=ge.getLandmarkPosition(5,t),s=ge.getLandmarkPosition(17,t),i=ge.getLandmarkPosition(0,t);let n=0,a=0;const o=innerWidth*innerHeight;if(void 0!==e&&void 0!==s){const t=new r((e.x+s.x)/2,(e.y+s.y)/2);n=Math.sqrt(Math.pow((s.x-e.x)/o,2)+Math.pow((s.y-e.y)/o,2)),void 0!==i&&(a=Math.sqrt(Math.pow((i.x-t.x)/o,2)+Math.pow((i.y-t.y)/o,2)))}return 0==n||0==a?0:8.2*.7/Math.max(n/8.2,a/10)/o*100}}const Te=new Set([[0,1],[0,5],[9,13],[13,17],[5,9],[0,17],[1,2],[2,3],[3,4],[5,6],[6,7],[7,8],[9,10],[10,11],[11,12],[13,14],[14,15],[15,16],[17,18],[18,19],[19,20]]);class xe extends p{constructor(t){super(t)}preload(){}create(t=oe.enableCameraVisibility,e=oe.cameraOpacity){ce.setVisibility(t),ve.setVisible(!0),this.clearBackgroundTint(),this.setBackgroundTexture(H),this.setOpacity(e),this.sound.pauseOnBlur=!1,this.graphics=this.add.graphics(),this.graphics.setDepth(99),this.hand=new we(this)}update(t,e){this.graphics.clear(),this.hand.update(),function(t,e,s=0){t.setDepth(99),ge.forEachLandmarkPosition((s=>{t.lineStyle(e.lineWidth,e.color,e.alpha),t.strokeCircle(s.x,s.y,e.radius)}),s)}(this.graphics,st,0),function(t,e,s=0){t.setDepth(98),Te.forEach((i=>{const n=ge.getLandmarkPosition(i[0],s);if(void 0!==n){const a=ge.getLandmarkPosition(i[1],s);void 0!==a&&(t.lineStyle(e.lineWidth,e.color,e.alpha),t.lineBetween(n.x,n.y,a.x,a.y))}}))}(this.graphics,et,0),ve.setDisplaySize(document.body.clientWidth,document.body.clientHeight+1)}setOpacity(t){null!=t&&(te(t>=0&&t<=1),ve.setAlpha(1-t))}setBackgroundTexture(t){ve.setTexture(t)}setBackgroundTint(t){ve.setTint(t)}clearBackgroundTint(){ve.clearTint()}}class ke extends v{constructor(t,e,s,i,n,a){super(t.matter.world,e.x,e.y,i,void 0,{render:{visible:!0},label:"button-"+i}),this.scene=t,this.scene.add.existing(this),this.sound=this.scene.sound.add(n,{volume:oe.sonificationLevel}),this.setSensor(!0),this.setOrigin(.5,.5),this.setScale(s.x,s.y),this.setDepth(93),me(this,a),this.on("destroy",(()=>{this.scene.hand.removePinchCheck(at,this)}))}removePinchCallbacks(){this.scene.hand.removePinchCheck(at,this)}addPinchCallbacks(t){const e={startPinch:()=>{var e;null===(e=t.startPinch)||void 0===e||e.call(t),this.sound.play({volume:oe.sonificationLevel})},pinched:t.pinched,endPinch:t.endPinch,startHover:t.startHover,endHover:t.endHover};this.scene.hand.addPinchCheck(at,this,e),this.on("pointerdown",e.startPinch),e.startHover&&this.on("pointermove",e.startHover),e.endHover&&this.on("pointerout",e.endHover)}}class Se{constructor(t){this.trackKey=Qt,this.bpm=0,this.beatLength_=1,this.trackKey=t}get beatLength(){return this.beatLength_}setBPM(t){te(null!=this.data,"preload JSON before setting BPM"),te(t{e.nodes.forEach(((s,i)=>{const n=this.getSoundKey(e,s.soundKey),a=this.trackDir+e.id+"/"+s.soundKey+b;t.cache.audio.exists(n)||""===s.soundKey||t.load.audio(n,se(a))}))}))}unloadNotes(t){this.forEachLayer(void 0,(e=>{e.nodes.forEach(((s,i)=>{t.cache.audio.remove(this.getSoundKey(e,s.soundKey))}))}))}preloadLoops(t){this.forEachLayer((e=>{te(void 0!==e.soundLoopKeys),te(e.soundLoopKeys.length>0),e.soundLoopKeys.forEach((s=>{const i=this.getSoundKey(e,s),n=this.trackDir+e.id+"/"+s+b;t.cache.audio.exists(i)||""===s||t.load.audio(i,se(n))}))}))}unloadLoops(t){this.forEachLayer((e=>{e.soundLoopKeys.forEach((s=>{t.cache.audio.remove(this.getSoundKey(e,s))}))}))}getSoundKey(t,e){return te(void 0!==e),this.trackKey+"/"+t.id+"/"+e}forEachLayer(t,e){te(null!=this.data,"JSON has not finished preloading");let s=0;this.data.layers.forEach(((i,n)=>{i.playable||s++,null==t||t(i,n),i.playable&&(null==e||e(i,n-s))}))}addBackgroundAudioTracks(t,e,s,i){const n=[];return this.forEachLayer(((a,o)=>{(null==i||i(a,o))&&(te(void 0!==a.soundLoopKeys),te(s{this.data=i,this.parseJson(),this.preloadLoops(t)};t.cache.json.exists(this.trackKey)?s(0,0,t.cache.json.get(this.trackKey)):(t.load.json(this.trackKey,se(e+"info.json")),t.load.on("filecomplete-json-"+this.trackKey,s,this))}unloadJson(t){this.unloadLoops(t),t.cache.json.remove(this.trackKey)}parseJson(){this.setTimePositionDefaults(),this.sortNodes()}setTimePositionDefaults(){this.forEachLayer(void 0,(t=>{const e=(t,e,s,i)=>{t.bar||(t.bar=e),t.step||(t.step=s),t.tick||(t.tick=i)};te(t.progressCount<=t.nodes.length,"Progress count threshold for layer '"+t.id+"' of track '"+this.trackKey+"' cannot be higher than the node count."),e(t.previewTime,0,0,0),t.nodes.forEach((t=>{e(t.timePosition,1,1,0)}))}))}sortNodes(){this.forEachLayer(void 0,(t=>{t.nodes.sort(((t,e)=>t.timePosition.bar!==e.timePosition.bar?t.timePosition.bar-e.timePosition.bar:t.timePosition.step!==e.timePosition.step?t.timePosition.step-e.timePosition.step:t.timePosition.tick-e.timePosition.tick))}))}}class Pe extends v{static preload(t){t.load.image(ht,se(ct)),t.load.image(lt,se("assets/sprites/defaultTargetOuter.png"))}static unload(t){t.textures.remove(ht),t.textures.remove(lt)}constructor(t,e,s,i,n,a,o,r){super(t.matter.world,s.x,s.y,a.data.spriteKeyInner,void 0,{render:{visible:!0}}),this.scene=t,this.lifetime=i,this.fingerId=o,this.nodeIndex=r,this.spriteScale=oe.targetSize,this.scene.add.existing(this),this.songTime=this.lifetime+e,this.lateDuration=oe.lateTimeDuration,this.onTimeDuration=oe.onTimeDuration,this.earlyDuration=this.lifetime-this.onTimeDuration/2,this.sound=this.scene.sound.add(n,{volume:oe.sonificationLevel}),this.setScale(this.spriteScale),this.setTint(tt[this.fingerId]),this.setDepth(95),me(this,!0),this.setCircle(this.displayWidth/2,{label:a.level.trackKey+"-"+a.data.id+"-node-"+r.toString()}),this.setSensor(!0),oe.fancyEffectsDisabled||(this.glow=this.postFX.addGlow(16777215,0,0,!1,.05,24)),this.outerRing=this.scene.add.sprite(s.x,s.y,a.data.spriteKeyOuter),this.outerRing.setScale(.5*this.spriteScale),this.outerRing.setDepth(96),this.targetText=new g(this.scene,0,0,Qt,{}),this.addTargetText(),this.setupTweens()}setOnTargetMiss(t){this.onTargetMiss=t}setOnTargetHit(t){this.scene.hand.addPinchCheck(this.fingerId,this,{startPinch:t}),this.once("pointerdown",t)}addTargetText(){this.targetText=this.scene.add.text(this.x,this.y,(this.nodeIndex+1).toString(),{font:"20px Arial",color:"white"}),this.targetText.setOrigin(.5,.5),this.targetText.setDepth(97)}createTween(t,e,s){for(const s of t)s.tint=e.color;return this.scene.tweens.add({targets:t,displayWidth:this.displayWidth*e.scale,displayHeight:this.displayHeight*e.scale,ease:e.ease,duration:s,repeat:0})}setupTweens(){oe.fancyEffectsDisabled||(this.rotateTween=this.scene.tweens.add({targets:[this],rotation:2*Math.PI,ease:"linear",duration:1e3,repeat:-1})),this.earlyTween=this.createTween([this.outerRing],dt,this.earlyDuration),this.earlyTween.on("complete",(()=>{this.onTimeTween=this.createTween([this],Object.assign(Object.assign({},ut),{scale:1}),this.onTimeDuration),oe.fancyEffectsDisabled||null==this.glow||(this.glowTween=this.scene.tweens.add({targets:this.glow,outerStrength:4,yoyo:!0,duration:this.onTimeDuration/2,ease:"linear"})),this.onTimeTween.on("complete",(()=>{null!=this.glow&&this.glow.destroy(),this.lateTween=this.createTween([this,this.outerRing],Object.assign(Object.assign({},gt),{scale:1}),this.lateDuration),this.lateTween.on("complete",(()=>{me(this,!1),this.deathTween=this.createTween([this,this.outerRing,this.targetText],pt,400),null!=this.onTargetMiss&&this.deathTween.on("complete",this.onTargetMiss)}))}))}))}destroyTarget(){this.scene.hand.removePinchCheck(this.fingerId,this),this.off("pointerdown"),null!=this.rotateTween&&this.scene.tweens.remove(this.rotateTween),null!=this.earlyTween&&this.scene.tweens.remove(this.earlyTween),null!=this.onTimeTween&&this.scene.tweens.remove(this.onTimeTween),null!=this.lateTween&&this.scene.tweens.remove(this.lateTween),null!=this.deathTween&&this.scene.tweens.remove(this.deathTween),null!=this.glowTween&&this.scene.tweens.remove(this.glowTween),null!=this.glow&&this.glow.destroy(),null!=this.targetText&&this.targetText.destroy(),this.outerRing.destroy(),this.destroy()}}class Le extends d{constructor(t){super(t,"metronome"),this.beat=0,this.timer=new c({}),this.countdownText=this.scene.add.text(kt.position.x,kt.position.y,Qt,{font:kt.font,color:kt.color}).setOrigin(.5,.5).setScale(kt.scale).setDepth(kt.depth),this.setVisible(!1)}preload(){this.scene.load.image(xt,se("assets/sprites/countdown.png")),this.scene.load.audio(Tt.highKey,se(Tt.highPath)),this.scene.load.audio(Tt.lowKey,se(Tt.lowPath))}unload(){this.scene.cache.audio.remove(Tt.highKey),this.scene.cache.audio.remove(Tt.lowKey)}setup(){this.countdownTexture=this.scene.add.sprite(kt.position.x,kt.position.y,xt).setScale(1).setVisible(!1).setOrigin(.5,.5).setAlpha(.3).setDepth(30)}setVisible(t){null!=this.countdownText&&this.countdownText.setVisible(t),null!=this.countdownTexture&&this.countdownTexture.setVisible(t)}stop(){this.setVisible(!1),null!=this.scene&&(this.scene.time.removeEvent(this.timer),this.scene.sound.stopByKey(Tt.highKey),this.scene.sound.stopByKey(Tt.lowKey),null!=this.shrinkTween&&this.scene.tweens.remove(this.shrinkTween))}play(t,e,s){this.beat=0,this.stop(),this.timer=this.scene.time.addEvent({callback:this.tick.bind(this,t,e,s),delay:e,loop:!0,startAt:e})}tick(t,e,s){te(s>=1,"Cannot display metronome for less than minimum bar count");const i=t*s,n=this.beat%t,a=0==n?Tt.highKey:Tt.lowKey;this.beat>=i?this.setVisible(!1):(this.countdownText.active&&this.scene.sound.play(a,{volume:oe.backgroundMusicLevel}),te(i-t>=0),this.beat>=i-t&&this.countdownText.active&&!oe.disableVisualMetronome&&this.display(n+1,e),this.beat++)}display(t,e){this.countdownText.setText(t.toString()),this.countdownText.setScale(kt.scale),this.countdownTexture.setScale(1),this.setVisible(!0),this.shrinkTween=this.scene.tweens.add({targets:[this.countdownText,this.countdownTexture],ease:kt.ease,duration:.9*e,scale:0,repeat:0})}}class Ce extends h{constructor(t){super(t),this.current_=0,this.requiredProgress=-1,this.nodeCount=1,this.tints=[],te(this.current_>=0),this.tints=[],this.scene.add.existing(this),this.setVisible(!1)}preload(){this.scene.load.image(wt.key,se(wt.path))}setup(t,e,s,i){te(s<=e),te(i.length===e,"Must pass tints equal in number to nodes"),te(e>0),te(s>0),te(t>=0),this.current_=t,this.nodeCount=e,this.tints=i,this.requiredProgress=s;const n=wt.size.x/this.nodeCount;this.clear(),this.createMultiple({quantity:this.nodeCount,key:wt.key,visible:!0,setXY:{x:wt.position.x-wt.size.x/2+n/2,y:wt.position.y+wt.size.y/2,stepX:n}}),this.propertyValueSet("displayWidth",n),this.propertyValueSet("displayHeight",wt.size.y),this.setDepth(61),this.redraw()}setToStarting(){this.current_=0,te(this.current_>=0),this.redraw()}redraw(){if(this.current<=this.nodeCount){this.getChildren().forEach(((t,e)=>{t.clearTint()}));const t=-1===this.requiredProgress?this.nodeCount:this.requiredProgress-1,e=this.current;this.getChildren().forEach(((s,i)=>{const n=s;wt.tintByNode&&n.setTint(this.tints[i]),it?n.setTint(wt.completedRequiredTint):n.setTint(wt.requiredTint))}),this)}}canProgress(){const t=-1===this.requiredProgress;return t&&this.current>=this.nodeCount||!t&&this.current>=this.requiredProgress}changeBy(t){this.current_=Math.max(0,Math.min(this.current+t,this.nodeCount))}get current(){return this.current_}}class Be extends d{constructor(t,e){super(t,"infoHUD"),this.scene=t,this.level=e}setup(){this.addTexts(),this.addSkipButton(),this.setVisible(!1)}addSkipButton(){this.skipButton=new ke(this.scene,Pt.position,Pt.scale,Pt.textureKey,Pt.soundKey,!1),this.skipButton.addPinchCallbacks({startPinch:()=>{me(this.skipButton,!1),this.level.transitionLayers()},startHover:()=>{this.skipButton.setTintFill(ot)},endHover:()=>{this.skipButton.clearTint()}}),this.updateSkipButtonAvailability(!1)}preload(){this.scene.load.image(Pt.textureKey,se(Pt.path)),this.scene.load.image(St.textureKey,se(St.path))}setVisible(t){null!=this.trackText&&this.trackText.setVisible(t),null!=this.difficultyText&&this.difficultyText.setVisible(t),null!=this.bpmText&&this.bpmText.setVisible(t),null!=this.layerText&&this.layerText.setVisible(t),null!=this.loopText&&this.loopText.setVisible(t),null!=this.infoBackground&&this.infoBackground.setVisible(t),this.updateSkipButtonAvailability(t)}addText(t,e){return this.scene.add.text(t.position.x,t.position.y,e,{font:t.font,color:t.color}).setScale(t.scale).setDepth(t.depth)}getLoopText(){return"Loop: "+this.level.score.getLoopCount().toString()}addTexts(){this.loopText=this.addText(Ot,this.getLoopText());const t="Track: "+this.level.track.data.displayName;this.trackText=this.addText(Lt,t);const e="Layer: "+(this.level.activeLayerIndex+1).toString()+"/"+this.level.playableLayers.length.toString();let s=Qt;switch(this.level.bpmIndex){case 0:s="Easy";break;case 1:s="Medium";break;case 2:s="Hard"}te(s!=Qt,"Extend the switch statement to have a difficulty text for the given track bpmIndex"),this.difficultyText=this.addText(Ct,"Difficulty: "+s),this.bpmText=this.addText(Bt,"BPM: "+this.level.track.getBPM()),this.layerText=this.addText(Dt,e),this.infoBackground=this.scene.add.sprite(St.position.x,St.position.y,St.textureKey).setAlpha(St.opacity).setOrigin(0,0).setDisplaySize(St.size.x,St.size.y)}updateLoopText(){this.loopText.setText(this.getLoopText()),this.updateSkipButtonAvailability(!0)}updateSkipButtonAvailability(t){const e=oe.enableSkipButton&&this.level.score.getLoopCount()>=oe.skipLoopThreshold&&t;null!=this.skipButton&&me(this.skipButton,e)}}class De{constructor(){this.targets=[]}start(){this.destroyTargets()}destroyTarget(t){t.destroyTarget();const e=this.targets.indexOf(t,0);e>-1&&this.targets.splice(e,1)}destroyTargets(){const t=[...this.targets];for(const e of t)this.destroyTarget(e)}addTarget(t){this.targets.push(t)}getPreviousTargets(t){return this.targets.filter((e=>e.songTime{const i=oe.indexFingerOnly?nt:t.finger;s.push(tt[i])})),this.progress.setup(0,this.data.nodes.length,this.data.progressCount,s),this.metronome.setup(),this.infoHud.setup(),this.progress.setVisible(!0),this.infoHud.setVisible(!0),this.metronome.play(this.level.track.data.timeSignatureNumerator,this.level.track.beatLength,e)}createTarget(t,e,s){const i=oe.indexFingerOnly?nt:t.finger,n=new Pe(this.scene,this.songTime_,ne(t.normalizedPosition),this.getPreviewTime(),this.level.track.getSoundKey(this.data,t.soundKey),this,i,s);n.setOnTargetMiss((()=>{this.level.score.missedPinch(n),this.progress.changeBy(-1),this.progress.redraw(),this.level.streak.stop(),this.targetManager.destroyTarget(n),this.checkForTransition(e,s)})),n.setOnTargetHit((()=>{const t=this.targetManager.getPreviousTargets(n);for(const e of t)te(e!=n),this.progress.changeBy(-1),this.level.score.skippedPinch(e),this.targetManager.destroyTarget(e);t.length>0&&this.level.streak.stop();const i=this.songTime-n.songTime,a=n.onTimeDuration/2,o=i>a;i<-a?(this.level.streak.stop(),this.progress.changeBy(0),this.level.score.earlyPinch(n,this.songTime)):o?(this.level.streak.stop(),this.progress.changeBy(0),this.level.score.latePinch(n,this.songTime)):(this.level.streak.changeBy(1),this.progress.changeBy(1),this.level.score.onTimePinch(n,this.songTime,this.level.streak.current)),this.progress.redraw(),this.level.streak.check(),oe.disableSonification||n.sound.play({volume:oe.sonificationLevel}),this.targetManager.destroyTarget(n),this.checkForTransition(e,s)})),this.targetManager.addTarget(n)}checkForTransition(t,e){e==this.data.nodes.length-1&&this.level.activeLayerIndex==t&&(oe.enableAutoSkip&&this.level.score.getLoopCount()>=oe.autoSkipThreshold||this.progress.canProgress()&&!oe.disableLayerProgression?this.level.transitionLayers():(this.level.score.incrementLoopCount(),this.progress.setToStarting(),this.infoHud.updateLoopText(),oe.autoSaveCSV&&this.level.score.levelStats))}handleTargetCreation(){if(!this.ready)return;const t=this.getDuration();let e=this.songTime_+this.getPreviewTime();if(this.songTime_>0&&(e%=t),this.data.nodes.length<=this.nextNodeIndex){if(!(e1?this.continue():this.stop()}updateStreakText(){this.streakText.setText("Streak: "+this.current_.toString())}start(){this.updateStreakText(),this.streakText.setVisible(!0)}stop(){this.current_=0,this.onFire=!1,null!=this.onFireTween&&this.scene.tweens.remove(this.onFireTween),null!=this.streakText&&this.streakText.clearTint(),null!=this.streakText&&this.streakText.setVisible(!1),null!=this.flame&&this.flame.destroy()}continue(){this.updateStreakText();const t=this.onFire;this.onFire=this.current_>=2,!t&&this.onFire&&(te(!0,"Streak color wheel extent must be from 1 to 255"),this.onFireTween=this.scene.tweens.addCounter({from:0,to:30,duration:1e3,yoyo:!0,onUpdate:t=>{if(null!=this&&null!=this.hsv){const e=Math.floor(t.getValue()),s=this.hsv[e].color,i=this.hsv[30-e].color;null!=this.streakText&&this.streakText.setTint(s,s,i,i)}},onStop:()=>{null!=this.onFireTween&&this.scene.tweens.remove(this.onFireTween)}}),oe.fancyEffectsDisabled||(null!=this.flame&&this.flame.destroy(),null!=this.streakText&&(this.flame=this.scene.add.particles(this.streakText.x,this.streakText.y,bt,ft),te(0!=yt.depth),this.flame.setDepth(yt.depth-1))))}}class Me{constructor(){this.total=1,this.required=1,this.correct=0,this.early=0,this.late=0,this.miss=0,this.loop=1,this.hits=[]}}class Ve{constructor(t){this.maxStreak=0,this.layersStats=[],this.id=`${t.data.displayName.replace(/\s/g,"")}@${t.getBPM()}bpm_${(new Date).toLocaleString("en-GB").replace(/\s/g,"").replace(/,/g,"_").replace(/[:/]/g,"-")}`}}class Ie{constructor(t){this.levelStats=new Ve(t),this.layerStats=new Me}getLoopCount(){return this.layerStats.loop}incrementLoopCount(){this.layerStats.correct=0,this.layerStats.early=0,this.layerStats.late=0,this.layerStats.miss=0,this.layerStats.loop++}saveLayerScores(){this.levelStats.layersStats.push(this.layerStats)}resetLayerScores(t,e){this.layerStats=new Me,this.layerStats.total=t,this.layerStats.required=e}addHit(t,e,s){this.layerStats.hits.push({loopNumber:this.getLoopCount(),noteID:t.nodeIndex+1,correctTime:t.songTime+this.delay,playerTime:e,classification:s})}onTimePinch(t,e,s){this.addHit(t,e+this.delay,"correct"),this.layerStats.correct++,this.levelStats.maxStreak=Math.max(s,this.levelStats.maxStreak)}earlyPinch(t,e){this.addHit(t,e+this.delay,"early"),this.layerStats.early++}latePinch(t,e){this.addHit(t,e+this.delay,"late"),this.layerStats.late++}skippedPinch(t){this.addHit(t,-1e3,"skipped"),this.layerStats.miss++}missedPinch(t){this.addHit(t,-1e3,"missed"),this.layerStats.miss++}}class Ae{constructor(t){this.trackKey_=Qt,this.finishCallback=()=>{},this.abortCallback=()=>{},this.activeLayerIndex=0,this.playableLayers=[],this.activeAudioTracks=[],this.bpmIndex_=-1,this.trackKey_=t,this.track=new Se(this.trackKey_)}setBPM(t){te(-1!=t,"BPM must be set before starting the level"),this.track.setBPM(t),this.bpmIndex_=t}get bpmIndex(){return this.bpmIndex_}get trackKey(){return this.trackKey_}init(t){this.scene=t,this.streak=new _e(this.scene),this.score=new Ie(this.track),this.preloadLayers()}hasCustomBackground(){return ie(y+this.getBackgroundTextureKey())}hasPreviewVideo(){return ie(y+this.getPreviewVideoKey())}getBackgroundTextureKey(){return this.trackKey+"/background.png"}getPreviewVideoKey(){return this.trackKey+"/preview.mp4"}preloadTrack(t){const e=y+this.getPreviewVideoKey(),s=y+this.getBackgroundTextureKey();ie(e)&&t.load.video(this.getPreviewVideoKey(),se(e),!0),ie(s)&&t.load.image(this.getBackgroundTextureKey(),se(s)),this.track.preload(t)}unloadTrack(t){this.track.unload(t)}preloadLayers(){this.track.preloadNotes(this.scene),Pe.preload(this.scene),this.streak.preload(),this.playableLayers=[],this.track.forEachLayer(void 0,((t,e)=>{const s=new He(this.scene,this,t);s.preload(),this.playableLayers.push(s)}))}unloadLayers(){this.playableLayers.forEach((t=>{t.unload()})),this.track.unloadNotes(this.scene),Pe.unload(this.scene),this.streak.unload()}start(t,e){this.activeLayerIndex=0,this.removeBackgroundAudio(this.scene),this.playableLayers.forEach((t=>{t.stop()})),this.streak.stop(),this.setBPM(this.bpmIndex_),this.finishCallback=t,this.abortCallback=e,this.scene.time.delayedCall(1e3,(()=>{this.startLayer()}))}addBackgroundAudio(t,e,s){te(-1!=this.bpmIndex_,"Set BPM before adding background audio to level"),this.removeBackgroundAudio(t),this.activeAudioTracks=this.track.addBackgroundAudioTracks(t,e,this.bpmIndex_,s)}removeBackgroundAudio(t){this.activeAudioTracks.forEach((e=>{e.stop(),t.sound.remove(e)})),this.activeAudioTracks=[]}playBackgroundAudio(){this.activeAudioTracks.forEach((t=>{t.setMute(!1),t.play()}))}setBackgroundAudioMute(t){this.activeAudioTracks.forEach((e=>{e.setMute(t)}))}startLayer(){const t=this.getActiveLayer(),e=this.activeLayerIndex;this.score.resetLayerScores(t.data.nodes.length,t.data.progressCount);const s=this.track.songTimePositionToTime({bar:2,step:1,tick:0}),i=Math.max(s,t.getPreviewTime());t.start(i);const n=[...t.data.backgroundLayers];oe.disableSonification&&n.push(t.data.id),this.addBackgroundAudio(this.scene,{loop:!0,volume:oe.backgroundMusicLevel},((t,e)=>n.includes(t.id))),this.scene.time.delayedCall(i,(()=>{this.activeLayerIndex==e&&this.playBackgroundAudio()}))}getActiveLayer(){return te(this.activeLayerIndex=this.playableLayers.length)return this.score.saveLayerScores(),t.postDelayStop(),void this.end();this.scene.time.delayedCall(1e3,(()=>{this.activeLayerIndex==e&&(this.score.saveLayerScores(),t.postDelayStop(),this.startLayer())}))}}stop(){this.removeBackgroundAudio(this.scene),this.streak.stop(),this.unloadLayers()}end(){this.stop(),this.finishCallback()}abort(){this.stop(),this.abortCallback()}update(t){this.activeLayerIndex{this.bpmText.destroy()}))}updateTint(){this.toggleState?(this.bpmText.setTintFill(rt),this.setTintFill(rt)):(this.bpmText.setTintFill(this.bpmTextOptions.color),this.clearTint())}get bpmIndex(){return this.bpmIndex_}}var Fe=n().Math.Vector2,je=n().Math.RoundTo;class Ne extends l{constructor(t,e,s,i,n,a,o,r){super(t),this.isDragging=!1,this.range=new Fe(0,1),this.isInteger=!1,this.x=e.x,this.y=e.y,this.width=s.x,this.height=s.y,this.key=a,this.updateSliderCallback=r,this.range=o,this.value=.5,this.box=new u(0,0,s.x,s.y),this.handle=new u(0,0,s.y,s.y),this.updateHandle(),null!=i&&(this.label=this.scene.add.text(this.x+i.x,this.y+i.y,Qt,{color:"#ffffff",fontSize:"24px"})),this.setInteractive(this.box,u.Contains),this.on("pointerdown",this.startDrag,this),this.scene.input.on("pointerup",this.stopDrag,this),this.scene.input.on("pointermove",this.doDrag,this),te("number"==typeof n[this.key]),this.setValue(n[this.key]),this.draw()}reset(t){te("number"==typeof t[this.key]),this.setValue(t[this.key]),this.draw()}startDrag(){this.isDragging=!0}doDrag(t){this.isDragging&&(this.value=n().Math.Clamp((t.x-this.x-this.handle.width/2)/(this.width-this.handle.width),0,1),this.updateHandle(),this.draw())}stopDrag(){this.isDragging=!1}updateHandle(){this.handle.x=this.value*(this.width-this.handle.width)}draw(){this.clear(),null!=this.input&&(this.input.enabled||this.setInteractive(this.box,u.Contains),this.updateSliderCallback(this)),this.fillStyle(11184810),this.fillRectShape(this.box),this.fillStyle(16777215),this.fillRectShape(this.handle)}getStringValue(){const t=this.getValue();return this.isInteger?t.toFixed(0):t.toFixed(2)}getValue(){const t=this.value*(this.range.y-this.range.x)+this.range.x;return this.isInteger?je(t,0):t}setIsInteger(t){return this.isInteger=t,this.draw(),this}setValue(t){this.value=(t-this.range.x)/(this.range.y-this.range.x),this.updateHandle(),this.draw()}hide(t){return this.clear(),null!=this.input&&this.disableInteractive(),null!=this.label&&null!=this.label&&this.label.active&&(null!=t?this.label.setText(t):this.label.setText("")),this}}class We extends l{constructor(t,e,s,i,n,a,o,r){super(t),this.labelText=Qt,this.x=e.x,this.y=e.y,this.key=o,null!=i&&(this.labelText=n,this.label=this.scene.add.text(e.x+i.x,e.y+i.y,this.labelText,{color:"#ffffff",fontSize:"24px"})),this.toggleCallback=r,te("boolean"==typeof a[this.key]),this.isChecked_=a[this.key],this.box=new u(0,0,s,s),this.check=new u(.25*s,.25*s,.5*s,.5*s),this.setInteractive(this.box,u.Contains),this.toggleCallback(this),this.on("pointerdown",this.toggleCheck,this),this.draw()}reset(t){te("boolean"==typeof t[this.key]),this.isChecked_=t[this.key],this.toggleCallback(this),this.draw()}resetLabel(){null!=this.label&&this.label.setText(this.labelText)}setLabel(t){null!=this.label&&this.label.setText(t),this.draw()}toggleCheck(){this.isChecked_=!this.isChecked_,this.toggleCallback(this),this.draw()}draw(){this.clear(),null==this.input||this.input.enabled||this.setInteractive(this.box,u.Contains),this.lineStyle(2,16777215),this.strokeRectShape(this.box),this.isChecked_&&(this.fillStyle(16777215),this.fillRectShape(this.check))}setToggled(t){"boolean"==typeof t&&(this.isChecked_=t,this.toggleCallback(this),this.draw())}hide(){return this.clear(),this.disableInteractive(),null!=this.label&&this.label.setText(""),this}get isChecked(){return this.isChecked_}}var ze=function(t,e,s,i){return new(s||(s=Promise))((function(n,a){function o(t){try{h(i.next(t))}catch(t){a(t)}}function r(t){try{h(i.throw(t))}catch(t){a(t)}}function h(t){var e;t.done?n(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(o,r)}h((i=i.apply(t,e||[])).next())}))};const Re=window.innerWidth,Ge=window.innerHeight,qe=.5*Re,$e=.1*Re,Je=.64*Re,Ue=.1*Ge,Xe=.08*Ge,Qe=.32*Ge,Ye=.08*Ge,Ze=.57*Ge,ts=.08*Ge,es=new r(.26*Re,.03*Ge),ss={type:n().WEBGL,scale:{mode:n().Scale.RESIZE},transparent:!0,physics:{default:"matter",matter:{debug:!1,gravity:{x:0,y:0}}},scene:[class extends p{constructor(){super("electron")}create(){return pe(this,void 0,void 0,(function*(){yield new Promise(((t,e)=>{t()})).then((()=>{this.scene.start(jt)}))}))}},class extends p{constructor(){super(jt)}preload(){this.load.image(T,se("assets/sprites/finger.png")),this.load.image(H,se("assets/ui/menu_background.png"))}create(){return pe(this,void 0,void 0,(function*(){ve=this.add.sprite(0,0,H).setOrigin(0,0).setAlpha(.9).setDisplaySize(window.innerWidth,window.innerHeight);const t=this.add.text(this.cameras.main.worldView.x+this.cameras.main.width/2,this.cameras.main.worldView.y+this.cameras.main.height/2,"",mt).setShadow(1,1).setDepth(1e3).setOrigin(.5);yield ce.init(Jt,this.updateText.bind(this,t)).catch((e=>{this.updateText(t,e)})),ce.found()&&(this.updateText(t,"Loading config data..."),yield he(Y),yield ge.init(this.updateText.bind(this,t)).catch((e=>this.updateText(t,e))),ge.found()&&(ce.setVisibility(Jt.visible),this.scene.launch($t),ge.precache(this.updateText.bind(this,t)),this.updateText(t,"Loading game..."),this.scene.get($t).load.on("complete",(()=>{t.destroy()}))))}))}updateText(t,e){console.info("INFO: "+e);let s=e;e instanceof DOMException&&(s="NotFoundError"==e.name?"Webcam not found":"PermissionError"==e.name?"Permission denied":"NotADirectoryError"==e.name?e.message:e.name+": "+e.message),t.setText(s)}},class extends xe{constructor(){super(zt),this.levels=[]}preload(){const t=Object.create(null,{preload:{get:()=>super.preload}});return e=this,s=void 0,n=function*(){t.preload.call(this),this.load.audio(E,se(w)),this.load.image(F,se("assets/ui/menu_logo.png")),this.load.image(B,se("assets/ui/menu_options.png")),this.load.image(C,se("assets/ui/menu_select_level.png")),this.load.image(L,se("assets/ui/menu_setup_camera.png")),yield function(t){return new Promise(((e,s)=>Yt(this,void 0,void 0,(function*(){yield Zt(se(t)).then((t=>{e(t)})).catch((()=>{s([])}))}))))}(se(f)).then((t=>{t.forEach(((t,e)=>{this.levels.push(new Ae(t))})),this.levels.forEach((t=>{t.preloadTrack(this)}))}))},new((i=void 0)||(i=Promise))((function(t,a){function o(t){try{h(n.next(t))}catch(t){a(t)}}function r(t){try{h(n.throw(t))}catch(t){a(t)}}function h(e){var s;e.done?t(e.value):(s=e.value,s instanceof i?s:new i((function(t){t(s)}))).then(o,r)}h((n=n.apply(e,s||[])).next())}));var e,s,i,n}create(){super.create(),this.levels.forEach((t=>{t.setBPM(0)}));const t=window.innerWidth,e=window.innerHeight,s=.5*t;this.menuCalibrate=new ke(this,new r(s-.25*t,Ft*e),Mt,L,E,!0),this.levels.length>0&&(this.menuSelectLevel=new ke(this,new r(s,Ft*e),Mt,C,E,!0),this.menuSelectLevel.addPinchCallbacks({startPinch:()=>{this.scene.start(Rt,this.levels)},startHover:()=>{this.menuSelectLevel.setTintFill(ot)},endHover:()=>{this.menuSelectLevel.clearTint()}})),this.menuOptions=new ke(this,new r(s+.25*t,Ft*e),Mt,B,E,!0),this.menuLogo=this.add.sprite(0,0,F).setOrigin(0,0).setScale(.7,.7),this.menuLogo.setPosition(s-this.menuLogo.displayWidth/2,.25*e),this.menuCalibrate.addPinchCallbacks({startPinch:()=>{this.scene.start(Gt)},startHover:()=>{this.menuCalibrate.setTintFill(ot)},endHover:()=>{this.menuCalibrate.clearTint()}}),this.menuOptions.addPinchCallbacks({startPinch:()=>{this.scene.start(qt)},startHover:()=>{this.menuOptions.setTintFill(ot)},endHover:()=>{this.menuOptions.clearTint()}})}update(t,e){super.update(t,e)}},class extends xe{constructor(){super(qt),this.options=[],he(Y).then((t=>ze(this,void 0,void 0,(function*(){this.configData=t,yield he(Z).then((t=>{this.defaultData=t}))}))))}saveAndExit(){var t;t=this.configData,se(Y),JSON.stringify(t),re(t),ce.setVisibility(this.configData.enableCameraVisibility),null!=this.rotateTween&&this.rotateTween.destroy(),this.scene.start(zt)}preload(){return ze(this,void 0,void 0,(function*(){this.load.audio(E,se(w)),this.load.image(O,se("assets/ui/options_background.png")),this.load.image(A,se(U)),this.load.image(j,se("assets/ui/reset_button.png")),this.load.image(D,se(J))}))}create(){const t=Object.create(null,{create:{get:()=>super.create}});return ze(this,void 0,void 0,(function*(){t.create.call(this),this.createOptions()}))}createOptions(){this.backToMenu=new ke(this,new r(qe-.1*Re,.9*Ge),Mt,A,E,!0),this.resetConfig=new ke(this,new r(qe+.1*Re,.9*Ge),Mt,j,E,!0),this.input.keyboard.on(vt,(()=>{this.saveAndExit()})),this.add.sprite(.09*Re,.05*Ge,O).setOrigin(0,0).setAlpha(.8).setDisplaySize(.28*Re,.185*Ge),this.add.sprite(.09*Re,.26*Ge,O).setOrigin(0,0).setAlpha(.8).setDisplaySize(.28*Re,.27*Ge),this.add.sprite(.09*Re,.55*Ge,O).setOrigin(0,0).setAlpha(.8).setDisplaySize(.28*Re,.23*Ge),this.add.sprite(.63*Re,.05*Ge,O).setOrigin(0,0).setAlpha(.8).setDisplaySize(.28*Re,.185*Ge),this.add.sprite(.63*Re,.26*Ge,O).setOrigin(0,0).setAlpha(.8).setDisplaySize(.28*Re,.27*Ge),this.add.sprite(.63*Re,.55*Ge,O).setOrigin(0,0).setAlpha(.8).setDisplaySize(.28*Re,.23*Ge);const t=this.add.sprite(.5*Re,Ue+0*Xe+.15*Ge,D).setTint(tt[it]).setScale(this.configData.targetSize);this.rotateTween=this.tweens.add({targets:[t],rotation:2*Math.PI,ease:"Power0",duration:1e3,repeat:-1}),this.configData.fancyEffectsDisabled&&null!=this.rotateTween&&this.rotateTween.pause();const e=new Ne(this,new r($e,Ue+0*Xe),es,new r(0,At.y),this.configData,"targetSize",new r(.5,3),(e=>{e.label.setText("Target Scale: "+e.getStringValue());const s=e.getValue();this.configData[e.key]=s,t.setScale(s)}));this.options.push(e),this.add.existing(e);const s=new Ne(this,new r($e,Ue+1*Xe),es,new r(0,At.y),this.configData,"fingerSize",new r(.5,3),(t=>{null!=t.label&&t.label.setText("Finger Scale: "+t.getStringValue());const e=t.getValue();this.configData[t.key]=e,this.hand.setFingerScale(e)}));this.options.push(s),this.add.existing(s);const i=t=>{null!=t&&t.active&&(null!=t.label&&t.label.active&&t.label.setText("Camera Opacity: "+t.getStringValue()),this.configData[t.key]=t.getValue(),this.setOpacity(this.configData[t.key]))},n=new Ne(this,new r($e,Qe+0*Ye),es,At,this.configData,"cameraOpacity",new r(.01,1),i),a=new We(this,new r($e,Qe+0*Ye+It.y),25,void 0,Qt,this.configData,"enableCameraVisibility",(t=>{this.configData[t.key]=t.isChecked,ce.setVisibility(t.isChecked),t.isChecked?n.draw():(n.setValue(this.defaultData.cameraOpacity),i(n),this.setOpacity(0),n.hide("Show Camera"))}));this.options.push(n),this.options.push(a),this.add.existing(n),this.add.existing(a);const o=new Ne(this,new r($e,Qe+1*Ye),es,At,this.configData,"skipLoopThreshold",new r(1,16),(t=>{t.label.setText("Skip Button After Loop: "+t.getStringValue()),this.configData[t.key]=t.getValue()})).setIsInteger(!0),h=new We(this,new r($e,Qe+1*Ye+It.y),25,void 0,Qt,this.configData,"enableSkipButton",(t=>{this.configData[t.key]=t.isChecked,t.isChecked?o.draw():o.hide("Show Layer Skip Button")}));this.options.push(o),this.options.push(h),this.add.existing(o),this.add.existing(h);const l=new Ne(this,new r($e,Qe+2*Ye),es,At,this.configData,"autoSkipThreshold",new r(1,16),(t=>{t.label.setText("Skip Layers After Loop: "+t.getStringValue()),this.configData[t.key]=t.getValue()})).setIsInteger(!0),c=new We(this,new r($e,Qe+2*Ye+It.y),25,void 0,Qt,this.configData,"enableAutoSkip",(t=>{this.configData[t.key]=t.isChecked,t.isChecked?l.draw():l.hide("Skip Layers Automatically")}));this.options.push(l),this.options.push(c),this.add.existing(l),this.add.existing(c);const d=new We(this,new r($e,Ze+0*ts),25,new r(-It.x,0),"Disable Layer Progression",this.configData,"disableLayerProgression",(t=>{this.configData[t.key]=t.isChecked}));this.options.push(d),this.add.existing(d);const u=new We(this,new r($e,Ze+1*ts),25,new r(-It.x,0),"Index Finger Pinches Only",this.configData,"indexFingerOnly",(t=>{this.configData[t.key]=t.isChecked}));this.options.push(u),this.add.existing(u);const g=new We(this,new r($e,Ze+2*ts),25,new r(-It.x,0),"Disable Fancy Effects",this.configData,"fancyEffectsDisabled",(e=>{this.configData[e.key]=e.isChecked,e.isChecked?null!=this.rotateTween&&this.rotateTween.pause():e.isChecked||null!=this.rotateTween&&null!=t&&this.rotateTween.resume()}));this.options.push(g),this.add.existing(g);const p=new Ne(this,new r(Je,Ue+0*Xe),es,new r(0,At.y),this.configData,"onTimeDuration",new r(50,1e3),(t=>{t.label.setText("On Time Duration: "+t.getStringValue()+" ms"),this.configData[t.key]=t.getValue()})).setIsInteger(!0);this.options.push(p),this.add.existing(p);const v=new Ne(this,new r(Je,Ue+1*Xe),es,new r(0,At.y),this.configData,"lateTimeDuration",new r(50,1e3),(t=>{t.label.setText("Late Time Duration: "+t.getStringValue()+" ms"),this.configData[t.key]=t.getValue()})).setIsInteger(!0);this.options.push(v),this.add.existing(v);const m=new Ne(this,new r(Je,Qe+0*Ye),es,new r(0,At.y),this.configData,"sonificationLevel",new r(0,1),(t=>{t.label.setText("Pinch Volume: "+t.getStringValue()),this.configData[t.key]=t.getValue()}));this.options.push(m),this.add.existing(m);const y=new Ne(this,new r(Je,Qe+1*Ye),es,new r(0,At.y),this.configData,"backgroundMusicLevel",new r(0,1),(t=>{t.label.setText("Track Volume: "+t.getStringValue()),this.configData[t.key]=t.getValue()}));this.options.push(y),this.add.existing(y);const f=new We(this,new r(Je,Ze+0*ts),25,new r(-It.x,0),"Disable Visual Metronome",this.configData,"disableVisualMetronome",(t=>{this.configData[t.key]=t.isChecked}));this.options.push(f),this.add.existing(f);const b=new We(this,new r(Je,Ze+1*ts),25,new r(-It.x,0),"Disable Sonification",this.configData,"disableSonification",(t=>{this.configData[t.key]=t.isChecked}));this.options.push(b),this.add.existing(b),this.backToMenu.addPinchCallbacks({startPinch:()=>{this.saveAndExit()},startHover:()=>{this.backToMenu.setTintFill(ot)},endHover:()=>{this.backToMenu.clearTint()}}),this.resetConfig.addPinchCallbacks({startPinch:()=>ze(this,void 0,void 0,(function*(){this.configData=yield he(Z);for(const t of this.options)t.reset(this.configData)})),startHover:()=>{this.resetConfig.setTintFill(ot)},endHover:()=>{this.resetConfig.clearTint()}})}update(t,e){super.update(t,e)}},class extends xe{constructor(){super(Rt),this.currentLevelIndex=0,this.difficultyButtons=[],this.levels=[],te(this.currentLevelIndex>=0,"Level select default level must be >= 0")}preload(){this.levels=this.scene.settings.data,te(this.currentLevelIndex{this.scene.start(zt),this.exit()})),this.add.sprite(.5*window.innerWidth,.5*window.innerHeight-window.innerHeight*Ht,x).setScale(_t.x,_t.y).setOrigin(.5,.5),this.backToMenu.addPinchCallbacks({startPinch:()=>{this.scene.start(zt),this.exit()},startHover:()=>{this.backToMenu.setTintFill(ot)},endHover:()=>{this.backToMenu.clearTint()}}),this.play.addPinchCallbacks({startPinch:()=>{this.startLevel(this.getCurrentLevel())},startHover:()=>{this.play.setTintFill(ot)},endHover:()=>{this.play.clearTint()}}),this.add.sprite(s,e*Et,k).setTintFill(0).setScale(.4,.4).setOrigin(.5,.5),this.songName=this.add.text(s,e*Et,Qt,{font:"50px Courier New"}).setColor("white").setOrigin(.5,.5),this.updateLevel(0),this.previousLevel.addPinchCallbacks({startPinch:()=>{this.updateLevel(-1)},startHover:()=>{this.previousLevel.setTintFill(ot)},endHover:()=>{this.previousLevel.clearTint()}}),this.nextLevel.addPinchCallbacks({startPinch:()=>{this.updateLevel(1)},startHover:()=>{this.nextLevel.setTintFill(ot)},endHover:()=>{this.nextLevel.clearTint()}}),this.muteButton.addToggleCallback((t=>{this.setBackgroundAudioMute(!t)})),this.muteButton.addPinchCallbacks({startPinch:()=>{this.muteButton.toggle()},startHover:()=>{this.muteButton.setTintFill(ot)},endHover:()=>{this.muteButton.clearTint()}})}exit(){this.stopAudio()}startLevel(t){this.exit(),this.scene.start(Nt,t)}createDifficultyButtons(t){const e=window.innerWidth,s=window.innerHeight,i=.5*e;for(const t of this.difficultyButtons)t.destroy();this.difficultyButtons=[];const n=t.track.data.bpm,a=[M,V,I],o=[new r(i-.2*e,Kt*s),new r(i,Kt*s),new r(i+.2*e,Kt*s)];te(a.length>=n.length,"buttonKeys array length must at least match the number of track bpms"),te(o.length>=n.length,"positions array length must at least match the number of track bpms");for(let e=0;e{c.updateTint(),e&&(t.setBPM(c.bpmIndex),this.startPreview(t))})),c.addPinchCallbacks({startPinch:()=>{for(const t of this.getDifficultyButtons())t!=c&&t.setToggleState(!1);c.setToggleState(!0)},startHover:()=>{c.setTintFill(ot)},endHover:()=>{c.updateTint()}}),this.difficultyButtons.push(c)}}getDifficultyButtons(){return this.difficultyButtons}setBackgroundAudioMute(t){for(const e of this.levels)e.setBackgroundAudioMute(t)}startVideo(t){if(null!=this.videoPreview&&this.videoPreview.destroy(),t.hasPreviewVideo()){this.videoPreview=this.add.video(.5*window.innerWidth,.5*window.innerHeight-window.innerHeight*Ht,t.getPreviewVideoKey()).setScale(_t.x,_t.y).setOrigin(.5,.5);const e=t.track.data.bpm[t.bpmIndex]/t.track.data.bpm[0];this.videoPreview.video&&(this.videoPreview.video.playbackRate=e),this.videoPreview.play(!0)}else this.videoPreview=this.add.sprite(.5*window.innerWidth,.5*window.innerHeight-window.innerHeight*Ht,$).setScale(_t.x,_t.y).setOrigin(.5,.5)}startPreview(t){this.stopAudio(),t.addBackgroundAudio(this,{loop:!0,volume:.5*oe.backgroundMusicLevel}),t.playBackgroundAudio(),t.setBackgroundAudioMute(!this.muteButton.getToggleState());const e=1e3*t.getAudioLoopTime();this.videoRefreshEvent=this.time.addEvent({delay:e,callback:()=>{this.startVideo(t)},callbackScope:this,loop:!0,startAt:e})}stopAudio(){this.videoRefreshEvent&&this.videoRefreshEvent.destroy();for(const t of this.levels)t.removeBackgroundAudio(this)}updateLevel(t){this.cycleLevel(t);const e=this.getCurrentLevel();this.songName.setText(e.track.data.displayName),te(0{this.level.abort()})),this.level.start((()=>{this.scene.start(Wt,this.level)}),(()=>{this.scene.start(zt)}))}update(t,e){super.update(t,e),this.level.update(t)}},class extends xe{constructor(){super(Wt)}exit(){this.level.removeBackgroundAudio(this),this.scene.start(zt)}preload(){this.load.audio(E,se(w)),this.load.image(A,se(U)),this.load.image(N,se(X)),this.load.image(W,se(Q)),this.load.image(G,se("assets/ui/save_csv_button.png")),this.load.image(S,se("assets/ui/layer_score_background.png")),this.load.image(P,se("assets/ui/scoreboard_background.png")),this.level=this.scene.settings.data,this.levelStats=this.level.score.levelStats,oe.autoSaveCSV&&this.level.score.levelStats}create(){super.create();const t=window.innerWidth,e=window.innerHeight,s=.5*t,i=Math.min(t/1920,e/1080);this.backToMenu=new ke(this,new r(s,.9*e),Mt,A,E,!0),this.muteButton=new Ee(this,new r(s+.45*t,.9*e),Vt,N,W,E,!0,!0),this.level.addBackgroundAudio(this,{loop:!0,volume:.5*oe.backgroundMusicLevel}),this.level.playBackgroundAudio(),this.muteButton.addToggleCallback((t=>{this.level.setBackgroundAudioMute(!t)})),this.muteButton.addPinchCallbacks({startPinch:()=>{this.muteButton.toggle()},startHover:()=>{this.muteButton.setTintFill(ot)},endHover:()=>{this.muteButton.clearTint()}}),this.input.keyboard.on(vt,(()=>{this.exit()})),oe.autoSaveCSV||(this.saveButton=new ke(this,new r(s-.4*t,.9*e),new r(.6,.6),G,E,!0),this.saveButton.addPinchCallbacks({startPinch:()=>{var t,e;t=this.levelStats,e=new Blob([a(t)],{type:"text/plain;charset=utf-8"}),ae.saveAs(e,t.id+".csv")},startHover:()=>{this.saveButton.setTintFill(ot)},endHover:()=>{this.saveButton.clearTint()}})),this.add.sprite(0,0,P).setOrigin(.5,.5).setScale(1.35*i,1.25*i).setAlpha(.6).setPosition(s,.25*e);const n=this.add.text(s,0,"Scoreboard",{color:"#01c303",font:96*i+"px Arial"});n.setStroke("#000",6*i),n.setPosition(s-n.width/2,.07*e);const o=this.levelStats.layersStats.reduce(((t,e)=>t+e.total),0),h=this.levelStats.layersStats.reduce(((t,e)=>t+e.correct),0),l=this.levelStats.layersStats.reduce(((t,e)=>t+e.miss),0),c=this.levelStats.layersStats.reduce(((t,e)=>t+e.early),0),d=this.levelStats.layersStats.reduce(((t,e)=>t+e.late),0),u=this.add.text(s,0,`Total Correct: ${h.toString()}/${o.toString()}\nLongest Streak: ${this.levelStats.maxStreak}\nMissed: ${l}\nEarly: ${c}\nLate: ${d}`,{color:"#ffffff",align:"center",font:48*i+"px Arial"});u.setPosition(s-u.width/2,.19*e);const g=[.25,.5,.75],p=g;this.level.track.forEachLayer(void 0,((s,n)=>{this.add.sprite(0,0,S).setOrigin(.5,.5).setScale(1.35*i,1.15*i).setAlpha(.6).setPosition(t*g[n],.63*e);const a=this.add.text(0,0,`${o=s.id,o&&o[0].toUpperCase()+o.slice(1)||""}`,{color:"#01c303",align:"center",font:72*i+"px Arial",fontStyle:"bold"});var o;a.setStroke("#000",4*i),a.setPosition(t*p[n]-a.width/2,.53*e);const r=this.levelStats.layersStats[n];let h=0,l=0,c=0;null!=r&&(h=r.correct,l=r.total,c=r.loop);const d=this.add.text(0,0,`\nCorrect: ${h.toString()}/${l.toString()}\nLoops: ${c.toString()}`,{color:"#ffffff",align:"center",font:48*i+"px Arial"});d.setPosition(t*p[n]-d.width/2,.575*e+.01)})),this.backToMenu.addPinchCallbacks({startPinch:()=>{this.exit()},startHover:()=>{this.backToMenu.setTintFill(ot)},endHover:()=>{this.backToMenu.clearTint()}})}update(t,e){super.update(t,e)}},class extends xe{constructor(){super(Gt)}exit(){this.scene.start(zt)}preload(){this.load.image(A,se(U)),this.load.audio(E,se(w)),this.load.image(K,se("assets/ui/calibration_background.png"))}create(){super.create(!0,.8);const t=window.innerWidth,e=window.innerHeight,s=.5*t;this.backToMenu=new ke(this,new r(s,.9*e),Mt,A,E,!0),this.setBackgroundTexture(K),this.input.keyboard.on(vt,(()=>{this.exit()})),this.distanceText=this.add.text(s,.1*e,Qt,{color:"white",font:"60px Arial"}).setShadow(5,5,"rgba(0,0,0,0.5)",15).setOrigin(.5,.5),this.backToMenu.addPinchCallbacks({startPinch:()=>{this.exit()},startHover:()=>{this.backToMenu.setTintFill(ot)},endHover:()=>{this.backToMenu.clearTint()}})}update(t,e){super.update(t,e);const s=this.hand.calculateHandDistance();let i="Hand Not Recognized";if(s>0){let t=65280;s>40?(i="Too Far - Estimated Distance: ",t=16711680):s<20?(i="Too Close - Estimated Distance: ",t=255):i="Just Right - Estimated Distance: ",this.setBackgroundTint(t),i+=s.toFixed(0)+" cm"}else this.clearBackgroundTint();null!=this.distanceText&&this.distanceText.active&&this.distanceText.setText(i)}}]};new(n().Game)(ss)}},s={};function i(t){var n=s[t];if(void 0!==n)return n.exports;var a=s[t]={exports:{}};return e[t].call(a.exports,a,a.exports,i),a.exports}i.m=e,t=[],i.O=(e,s,n,a)=>{if(!s){var o=1/0;for(c=0;c=a)&&Object.keys(i.O).every((t=>i.O[t](s[h])))?s.splice(h--,1):(r=!1,a0&&t[c-1][2]>a;c--)t[c]=t[c-1];t[c]=[s,n,a]},i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var s in e)i.o(e,s)&&!i.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{var t={792:0};i.O.j=e=>0===t[e];var e=(e,s)=>{var n,a,[o,r,h]=s,l=0;if(o.some((e=>0!==t[e]))){for(n in r)i.o(r,n)&&(i.m[n]=r[n]);if(h)var c=h(i)}for(e&&e(s);li(852)));n=i.O(n)})(); \ No newline at end of file diff --git a/sw.js b/sw.js index 88ba60f..7b0d7b4 100644 --- a/sw.js +++ b/sw.js @@ -1 +1 @@ -(()=>{"use strict";var e={136:()=>{try{self["workbox:core:7.0.0"]&&_()}catch(e){}},447:()=>{try{self["workbox:precaching:7.0.0"]&&_()}catch(e){}},227:()=>{try{self["workbox:routing:7.0.0"]&&_()}catch(e){}},390:()=>{try{self["workbox:strategies:7.0.0"]&&_()}catch(e){}}},t={};function s(a){var n=t[a];if(void 0!==n)return n.exports;var r=t[a]={exports:{}};return e[a](r,r.exports,s),r.exports}(()=>{s(136);class e extends Error{constructor(e,t){super(((e,...t)=>{let s=e;return t.length>0&&(s+=` :: ${JSON.stringify(t)}`),s})(e,t)),this.name=e,this.details=t}}const t={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!=typeof registration?registration.scope:""},a=e=>[t.prefix,e,t.suffix].filter((e=>e&&e.length>0)).join("-"),n=e=>e||a(t.precache);function r(e,t){const s=t();return e.waitUntil(s),s}function i(t){if(!t)throw new e("add-to-cache-list-unexpected-type",{entry:t});if("string"==typeof t){const e=new URL(t,location.href);return{cacheKey:e.href,url:e.href}}const{revision:s,url:a}=t;if(!a)throw new e("add-to-cache-list-unexpected-type",{entry:t});if(!s){const e=new URL(a,location.href);return{cacheKey:e.href,url:e.href}}const n=new URL(a,location.href),r=new URL(a,location.href);return n.searchParams.set("__WB_REVISION__",s),{cacheKey:n.href,url:r.href}}s(447);class c{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:e,state:t})=>{t&&(t.originalRequest=e)},this.cachedResponseWillBeUsed=async({event:e,state:t,cachedResponse:s})=>{if("install"===e.type&&t&&t.originalRequest&&t.originalRequest instanceof Request){const e=t.originalRequest.url;s?this.notUpdatedURLs.push(e):this.updatedURLs.push(e)}return s}}}class o{constructor({precacheController:e}){this.cacheKeyWillBeUsed=async({request:e,params:t})=>{const s=(null==t?void 0:t.cacheKey)||this._precacheController.getCacheKeyForURL(e.url);return s?new Request(s,{headers:e.headers}):e},this._precacheController=e}}let h;function l(e,t){const s=new URL(e);for(const e of t)s.searchParams.delete(e);return s.href}class u{constructor(){this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}}const d=new Set;function f(e){return"string"==typeof e?new Request(e):e}s(390);class p{constructor(e,t){this._cacheKeys={},Object.assign(this,t),this.event=t.event,this._strategy=e,this._handlerDeferred=new u,this._extendLifetimePromises=[],this._plugins=[...e.plugins],this._pluginStateMap=new Map;for(const e of this._plugins)this._pluginStateMap.set(e,{});this.event.waitUntil(this._handlerDeferred.promise)}async fetch(t){const{event:s}=this;let a=f(t);if("navigate"===a.mode&&s instanceof FetchEvent&&s.preloadResponse){const e=await s.preloadResponse;if(e)return e}const n=this.hasCallback("fetchDidFail")?a.clone():null;try{for(const e of this.iterateCallbacks("requestWillFetch"))a=await e({request:a.clone(),event:s})}catch(t){if(t instanceof Error)throw new e("plugin-error-request-will-fetch",{thrownErrorMessage:t.message})}const r=a.clone();try{let e;e=await fetch(a,"navigate"===a.mode?void 0:this._strategy.fetchOptions);for(const t of this.iterateCallbacks("fetchDidSucceed"))e=await t({event:s,request:r,response:e});return e}catch(e){throw n&&await this.runCallbacks("fetchDidFail",{error:e,event:s,originalRequest:n.clone(),request:r.clone()}),e}}async fetchAndCachePut(e){const t=await this.fetch(e),s=t.clone();return this.waitUntil(this.cachePut(e,s)),t}async cacheMatch(e){const t=f(e);let s;const{cacheName:a,matchOptions:n}=this._strategy,r=await this.getCacheKey(t,"read"),i=Object.assign(Object.assign({},n),{cacheName:a});s=await caches.match(r,i);for(const e of this.iterateCallbacks("cachedResponseWillBeUsed"))s=await e({cacheName:a,matchOptions:n,cachedResponse:s,request:r,event:this.event})||void 0;return s}async cachePut(t,s){const a=f(t);await(0,new Promise((e=>setTimeout(e,0))));const n=await this.getCacheKey(a,"write");if(!s)throw new e("cache-put-with-no-response",{url:(r=n.url,new URL(String(r),location.href).href.replace(new RegExp(`^${location.origin}`),""))});var r;const i=await this._ensureResponseSafeToCache(s);if(!i)return!1;const{cacheName:c,matchOptions:o}=this._strategy,h=await self.caches.open(c),u=this.hasCallback("cacheDidUpdate"),p=u?await async function(e,t,s,a){const n=l(t.url,s);if(t.url===n)return e.match(t,a);const r=Object.assign(Object.assign({},a),{ignoreSearch:!0}),i=await e.keys(t,r);for(const t of i)if(n===l(t.url,s))return e.match(t,a)}(h,n.clone(),["__WB_REVISION__"],o):null;try{await h.put(n,u?i.clone():i)}catch(e){if(e instanceof Error)throw"QuotaExceededError"===e.name&&await async function(){for(const e of d)await e()}(),e}for(const e of this.iterateCallbacks("cacheDidUpdate"))await e({cacheName:c,oldResponse:p,newResponse:i.clone(),request:n,event:this.event});return!0}async getCacheKey(e,t){const s=`${e.url} | ${t}`;if(!this._cacheKeys[s]){let a=e;for(const e of this.iterateCallbacks("cacheKeyWillBeUsed"))a=f(await e({mode:t,request:a,event:this.event,params:this.params}));this._cacheKeys[s]=a}return this._cacheKeys[s]}hasCallback(e){for(const t of this._strategy.plugins)if(e in t)return!0;return!1}async runCallbacks(e,t){for(const s of this.iterateCallbacks(e))await s(t)}*iterateCallbacks(e){for(const t of this._strategy.plugins)if("function"==typeof t[e]){const s=this._pluginStateMap.get(t),a=a=>{const n=Object.assign(Object.assign({},a),{state:s});return t[e](n)};yield a}}waitUntil(e){return this._extendLifetimePromises.push(e),e}async doneWaiting(){let e;for(;e=this._extendLifetimePromises.shift();)await e}destroy(){this._handlerDeferred.resolve(null)}async _ensureResponseSafeToCache(e){let t=e,s=!1;for(const e of this.iterateCallbacks("cacheWillUpdate"))if(t=await e({request:this.request,response:t,event:this.event})||void 0,s=!0,!t)break;return s||t&&200!==t.status&&(t=void 0),t}}class g{constructor(e={}){this.cacheName=e.cacheName||a(t.runtime),this.plugins=e.plugins||[],this.fetchOptions=e.fetchOptions,this.matchOptions=e.matchOptions}handle(e){const[t]=this.handleAll(e);return t}handleAll(e){e instanceof FetchEvent&&(e={event:e,request:e.request});const t=e.event,s="string"==typeof e.request?new Request(e.request):e.request,a="params"in e?e.params:void 0,n=new p(this,{event:t,request:s,params:a}),r=this._getResponse(n,s,t);return[r,this._awaitComplete(r,n,s,t)]}async _getResponse(t,s,a){let n;await t.runCallbacks("handlerWillStart",{event:a,request:s});try{if(n=await this._handle(s,t),!n||"error"===n.type)throw new e("no-response",{url:s.url})}catch(e){if(e instanceof Error)for(const r of t.iterateCallbacks("handlerDidError"))if(n=await r({error:e,event:a,request:s}),n)break;if(!n)throw e}for(const e of t.iterateCallbacks("handlerWillRespond"))n=await e({event:a,request:s,response:n});return n}async _awaitComplete(e,t,s,a){let n,r;try{n=await e}catch(r){}try{await t.runCallbacks("handlerDidRespond",{event:a,request:s,response:n}),await t.doneWaiting()}catch(e){e instanceof Error&&(r=e)}if(await t.runCallbacks("handlerDidComplete",{event:a,request:s,response:n,error:r}),t.destroy(),r)throw r}}class y extends g{constructor(e={}){e.cacheName=n(e.cacheName),super(e),this._fallbackToNetwork=!1!==e.fallbackToNetwork,this.plugins.push(y.copyRedirectedCacheableResponsesPlugin)}async _handle(e,t){return await t.cacheMatch(e)||(t.event&&"install"===t.event.type?await this._handleInstall(e,t):await this._handleFetch(e,t))}async _handleFetch(t,s){let a;const n=s.params||{};if(!this._fallbackToNetwork)throw new e("missing-precache-entry",{cacheName:this.cacheName,url:t.url});{const e=n.integrity,r=t.integrity,i=!r||r===e;a=await s.fetch(new Request(t,{integrity:"no-cors"!==t.mode?r||e:void 0})),e&&i&&"no-cors"!==t.mode&&(this._useDefaultCacheabilityPluginIfNeeded(),await s.cachePut(t,a.clone()))}return a}async _handleInstall(t,s){this._useDefaultCacheabilityPluginIfNeeded();const a=await s.fetch(t);if(!await s.cachePut(t,a.clone()))throw new e("bad-precaching-response",{url:t.url,status:a.status});return a}_useDefaultCacheabilityPluginIfNeeded(){let e=null,t=0;for(const[s,a]of this.plugins.entries())a!==y.copyRedirectedCacheableResponsesPlugin&&(a===y.defaultPrecacheCacheabilityPlugin&&(e=s),a.cacheWillUpdate&&t++);0===t?this.plugins.push(y.defaultPrecacheCacheabilityPlugin):t>1&&null!==e&&this.plugins.splice(e,1)}}y.defaultPrecacheCacheabilityPlugin={cacheWillUpdate:async({response:e})=>!e||e.status>=400?null:e},y.copyRedirectedCacheableResponsesPlugin={cacheWillUpdate:async({response:t})=>t.redirected?await async function(t,s){let a=null;if(t.url&&(a=new URL(t.url).origin),a!==self.location.origin)throw new e("cross-origin-copy-response",{origin:a});const n=t.clone(),r={headers:new Headers(n.headers),status:n.status,statusText:n.statusText},i=s?s(r):r,c=function(){if(void 0===h){const e=new Response("");if("body"in e)try{new Response(e.body),h=!0}catch(e){h=!1}h=!1}return h}()?n.body:await n.blob();return new Response(c,i)}(t):t};class w{constructor({cacheName:e,plugins:t=[],fallbackToNetwork:s=!0}={}){this._urlsToCacheKeys=new Map,this._urlsToCacheModes=new Map,this._cacheKeysToIntegrities=new Map,this._strategy=new y({cacheName:n(e),plugins:[...t,new o({precacheController:this})],fallbackToNetwork:s}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this._strategy}precache(e){this.addToCacheList(e),this._installAndActiveListenersAdded||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this._installAndActiveListenersAdded=!0)}addToCacheList(t){const s=[];for(const a of t){"string"==typeof a?s.push(a):a&&void 0===a.revision&&s.push(a.url);const{cacheKey:t,url:n}=i(a),r="string"!=typeof a&&a.revision?"reload":"default";if(this._urlsToCacheKeys.has(n)&&this._urlsToCacheKeys.get(n)!==t)throw new e("add-to-cache-list-conflicting-entries",{firstEntry:this._urlsToCacheKeys.get(n),secondEntry:t});if("string"!=typeof a&&a.integrity){if(this._cacheKeysToIntegrities.has(t)&&this._cacheKeysToIntegrities.get(t)!==a.integrity)throw new e("add-to-cache-list-conflicting-integrities",{url:n});this._cacheKeysToIntegrities.set(t,a.integrity)}if(this._urlsToCacheKeys.set(n,t),this._urlsToCacheModes.set(n,r),s.length>0){const e=`Workbox is precaching URLs without revision info: ${s.join(", ")}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(e)}}}install(e){return r(e,(async()=>{const t=new c;this.strategy.plugins.push(t);for(const[t,s]of this._urlsToCacheKeys){const a=this._cacheKeysToIntegrities.get(s),n=this._urlsToCacheModes.get(t),r=new Request(t,{integrity:a,cache:n,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:s},request:r,event:e}))}const{updatedURLs:s,notUpdatedURLs:a}=t;return{updatedURLs:s,notUpdatedURLs:a}}))}activate(e){return r(e,(async()=>{const e=await self.caches.open(this.strategy.cacheName),t=await e.keys(),s=new Set(this._urlsToCacheKeys.values()),a=[];for(const n of t)s.has(n.url)||(await e.delete(n),a.push(n.url));return{deletedURLs:a}}))}getURLsToCacheKeys(){return this._urlsToCacheKeys}getCachedURLs(){return[...this._urlsToCacheKeys.keys()]}getCacheKeyForURL(e){const t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}getIntegrityForCacheKey(e){return this._cacheKeysToIntegrities.get(e)}async matchPrecache(e){const t=e instanceof Request?e.url:e,s=this.getCacheKeyForURL(t);if(s)return(await self.caches.open(this.strategy.cacheName)).match(s)}createHandlerBoundToURL(t){const s=this.getCacheKeyForURL(t);if(!s)throw new e("non-precached-url",{url:t});return e=>(e.request=new Request(t),e.params=Object.assign({cacheKey:s},e.params),this.strategy.handle(e))}}let m;const _=()=>(m||(m=new w),m);s(227);const R=e=>e&&"object"==typeof e?e:{handle:e};class v{constructor(e,t,s="GET"){this.handler=R(t),this.match=e,this.method=s}setCatchHandler(e){this.catchHandler=R(e)}}class C extends v{constructor(e,t,s){super((({url:t})=>{const s=e.exec(t.href);if(s&&(t.origin===location.origin||0===s.index))return s.slice(1)}),t,s)}}class b{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener("fetch",(e=>{const{request:t}=e,s=this.handleRequest({request:t,event:e});s&&e.respondWith(s)}))}addCacheListener(){self.addEventListener("message",(e=>{if(e.data&&"CACHE_URLS"===e.data.type){const{payload:t}=e.data,s=Promise.all(t.urlsToCache.map((t=>{"string"==typeof t&&(t=[t]);const s=new Request(...t);return this.handleRequest({request:s,event:e})})));e.waitUntil(s),e.ports&&e.ports[0]&&s.then((()=>e.ports[0].postMessage(!0)))}}))}handleRequest({request:e,event:t}){const s=new URL(e.url,location.href);if(!s.protocol.startsWith("http"))return;const a=s.origin===location.origin,{params:n,route:r}=this.findMatchingRoute({event:t,request:e,sameOrigin:a,url:s});let i=r&&r.handler;const c=e.method;if(!i&&this._defaultHandlerMap.has(c)&&(i=this._defaultHandlerMap.get(c)),!i)return;let o;try{o=i.handle({url:s,request:e,event:t,params:n})}catch(e){o=Promise.reject(e)}const h=r&&r.catchHandler;return o instanceof Promise&&(this._catchHandler||h)&&(o=o.catch((async a=>{if(h)try{return await h.handle({url:s,request:e,event:t,params:n})}catch(e){e instanceof Error&&(a=e)}if(this._catchHandler)return this._catchHandler.handle({url:s,request:e,event:t});throw a}))),o}findMatchingRoute({url:e,sameOrigin:t,request:s,event:a}){const n=this._routes.get(s.method)||[];for(const r of n){let n;const i=r.match({url:e,sameOrigin:t,request:s,event:a});if(i)return n=i,(Array.isArray(n)&&0===n.length||i.constructor===Object&&0===Object.keys(i).length||"boolean"==typeof i)&&(n=void 0),{route:r,params:n}}return{}}setDefaultHandler(e,t="GET"){this._defaultHandlerMap.set(t,R(e))}setCatchHandler(e){this._catchHandler=R(e)}registerRoute(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}unregisterRoute(t){if(!this._routes.has(t.method))throw new e("unregister-route-but-not-found-with-method",{method:t.method});const s=this._routes.get(t.method).indexOf(t);if(!(s>-1))throw new e("unregister-route-route-not-registered");this._routes.get(t.method).splice(s,1)}}let q;class U extends v{constructor(e,t){super((({request:s})=>{const a=e.getURLsToCacheKeys();for(const n of function*(e,{ignoreURLParametersMatching:t=[/^utm_/,/^fbclid$/],directoryIndex:s="index.html",cleanURLs:a=!0,urlManipulation:n}={}){const r=new URL(e,location.href);r.hash="",yield r.href;const i=function(e,t=[]){for(const s of[...e.searchParams.keys()])t.some((e=>e.test(s)))&&e.searchParams.delete(s);return e}(r,t);if(yield i.href,s&&i.pathname.endsWith("/")){const e=new URL(i.href);e.pathname+=s,yield e.href}if(a){const e=new URL(i.href);e.pathname+=".html",yield e.href}if(n){const e=n({url:r});for(const t of e)yield t.href}}(s.url,t)){const t=a.get(n);if(t)return{cacheKey:t,integrity:e.getIntegrityForCacheKey(t)}}}),e.strategy)}}var L;L=[{'revision':'c681780dee3654fd502c3cb1ed0bc958','url':'assets/icon.ico'},{'revision':'04baf0bd96c51061ade72019b276fa19','url':'assets/sounds/metronome/high.ogg'},{'revision':'82865f2b16a02de26df27adfaf024c55','url':'assets/sounds/metronome/low.ogg'},{'revision':'bab1bdb2f931d06af797b70faa356929','url':'assets/sounds/ui/menu_ding.wav'},{'revision':'cb8affb1812fc1591726a1740df2077f','url':'assets/sprites/countdown.png'},{'revision':'d204b9ac18869eb2dc5ade226678cb66','url':'assets/sprites/defaultTargetInner.png'},{'revision':'729fdd6f562ede8ae64b974c1b016d32','url':'assets/sprites/defaultTargetOuter.png'},{'revision':'2a7efd9cf2addb4d8c7b95267fcf2657','url':'assets/sprites/finger.png'},{'revision':'b0f665df8751c5a2aa39e7c535153d17','url':'assets/sprites/flare.png'},{'revision':'51e0571fbe4415db8dac79283fa20d85','url':'assets/ui/back_button.png'},{'revision':'2bb7a1584e2953224f6a7fe0dd79dddf','url':'assets/ui/calibration_background.png'},{'revision':'8c382d7ff3e652d67252ea30e7494b52','url':'assets/ui/default_level_background.png'},{'revision':'a60af6fc7fffb6a40650837a3e24d8dd','url':'assets/ui/default_preview_background.png'},{'revision':'e8f3412d336637cdfc9a48e213a09684','url':'assets/ui/easy_button.png'},{'revision':'ac839e30a9d4d642193d46ed54b4b97a','url':'assets/ui/empty_button.png'},{'revision':'a85231dbe5674905de23fccc44fad923','url':'assets/ui/hard_button.png'},{'revision':'c32ec8851cf5d8f66c547da52bcd0918','url':'assets/ui/info_background.png'},{'revision':'1989d155533325e4fcb4d08819b06e6b','url':'assets/ui/layer_score_background.png'},{'revision':'86d1a3566f11f28474ddb11f45bbf3ad','url':'assets/ui/left_arrow.png'},{'revision':'9081f9850823341d67211edf61330bfe','url':'assets/ui/medium_button.png'},{'revision':'4da8a2009798f052d5d49fc8446adef8','url':'assets/ui/menu_background.png'},{'revision':'52725945a4a6359f7a6a714be0ed5802','url':'assets/ui/menu_background_old.png'},{'revision':'c78af9c46a95daadbc8b4bb9d979ed13','url':'assets/ui/menu_logo.png'},{'revision':'3106244610ace2a29d54a78eac220c8c','url':'assets/ui/menu_options.png'},{'revision':'050f45e70e72aa8f724b7f7d35af230c','url':'assets/ui/menu_select_level.png'},{'revision':'47bb01c1e6ac1f4e0ba7275a3b21abb1','url':'assets/ui/menu_setup_camera.png'},{'revision':'d4278df95f99e0b68ca5598290f309af','url':'assets/ui/mute_button.png'},{'revision':'015692ea211877dfc12d305d3221b973','url':'assets/ui/options_background.png'},{'revision':'f8c919718c9f65591314d888f655e29f','url':'assets/ui/play_button.png'},{'revision':'de37ef4d2dfedc82df26a3bec80cabc1','url':'assets/ui/progress_bar_segment.png'},{'revision':'89c18f572e2170101d889e80f89f826c','url':'assets/ui/reset_button.png'},{'revision':'dda36e38b015753c42ae6e5ada19ab22','url':'assets/ui/right_arrow.png'},{'revision':'d5f4614987321c5380c6137f301e9667','url':'assets/ui/save_csv_button.png'},{'revision':'53feaa7ade2b2d35b5b9f7f0e5985aa5','url':'assets/ui/scoreboard_background.png'},{'revision':'30946fd16b96c40d948d064a35af235f','url':'assets/ui/skip_button.png'},{'revision':'21bc625a9d475c384f820ca1d3d535d4','url':'assets/ui/song_name_background.png'},{'revision':'d956352eef1e98efd783e2c57f33c783','url':'assets/ui/unmute_button.png'},{'revision':'761afc4b84de59f7c9207964ceecc5e6','url':'assets/ui/video_background.png'},{'revision':'ac7c0657751250603e4469977db9c283','url':'data/config.json'},{'revision':'ac7c0657751250603e4469977db9c283','url':'data/default_config.json'},{'revision':'c681780dee3654fd502c3cb1ed0bc958','url':'icon.ico'},{'revision':'c681780dee3654fd502c3cb1ed0bc958','url':'icons/icon.ico'},{'revision':'5506e7d2dc3e0cb57cfc9f7cea715948','url':'index.html'},{'revision':'91cc0ea23ae645329b44bb99aee8219c','url':'levels/Birthday Vibes/background.png'},{'revision':'e36bb98c4966db215c2b8622f2a7ca9d','url':'levels/Birthday Vibes/bass/aSharp.ogg'},{'revision':'f03f404bc5d0565a517d18efb5c78c88','url':'levels/Birthday Vibes/bass/c.ogg'},{'revision':'9c97fc36c5b3cc1bca9eb6307520517d','url':'levels/Birthday Vibes/bass/d.ogg'},{'revision':'6e3e4de57f241cd0125161aa86be6cf5','url':'levels/Birthday Vibes/bass/dSharp.ogg'},{'revision':'769965b9d363e53297934d9b58b7d971','url':'levels/Birthday Vibes/bass/f.ogg'},{'revision':'6cfbeb319c80227a526e7fcd4d0986bf','url':'levels/Birthday Vibes/bass/g.ogg'},{'revision':'2954faf816f19648eb9d07c4c7d001c4','url':'levels/Birthday Vibes/bass/loop115.ogg'},{'revision':'e9cc89da6644958763f45b41591a252e','url':'levels/Birthday Vibes/bass/loop130.ogg'},{'revision':'56639388804acd365cde79f391dcebe3','url':'levels/Birthday Vibes/bass/loop90.ogg'},{'revision':'2d3b6bf55c61e4f848ec2f4429e6ccd7','url':'levels/Birthday Vibes/chords/chord1.ogg'},{'revision':'87818dab244c453c227ccdc8b69e9070','url':'levels/Birthday Vibes/chords/chord2.ogg'},{'revision':'9029f41da89a503862edbfced0782a23','url':'levels/Birthday Vibes/chords/chord3.ogg'},{'revision':'1eeb4f4b10f7c7ab2c1de496b06eb343','url':'levels/Birthday Vibes/chords/chord4.ogg'},{'revision':'9b76a5999ef6c41aa7e86df0a145a45c','url':'levels/Birthday Vibes/chords/loop115.ogg'},{'revision':'ebedb61cc4c7c33fb8aa542bfef09e73','url':'levels/Birthday Vibes/chords/loop130.ogg'},{'revision':'496c339b2ee8b40b7633d546b67cfae0','url':'levels/Birthday Vibes/chords/loop90.ogg'},{'revision':'18ef50099354c264a0bd7393bfa78d72','url':'levels/Birthday Vibes/drums/loop115.ogg'},{'revision':'0505ea764e9cc3447d7b1449a9b22abe','url':'levels/Birthday Vibes/drums/loop130.ogg'},{'revision':'fd0cb60d0ec7ae1c14fbfff81b457e6e','url':'levels/Birthday Vibes/drums/loop90.ogg'},{'revision':'668b12c7c58b56b79930a98af41c5142','url':'levels/Birthday Vibes/info.json'},{'revision':'09461d99ddcfe8ab90cac446cc885f41','url':'levels/Birthday Vibes/lead/aSharp.ogg'},{'revision':'808ae6c59ed3b2921a92d30138b11ff3','url':'levels/Birthday Vibes/lead/c.ogg'},{'revision':'39b00f2242535dccf96f6d08e43f2193','url':'levels/Birthday Vibes/lead/d.ogg'},{'revision':'e490eb41abf5f2732f21cd2447df8e7b','url':'levels/Birthday Vibes/lead/f.ogg'},{'revision':'bed79fa63308fd0cc2a3900ce7ed3fd0','url':'levels/Birthday Vibes/lead/g.ogg'},{'revision':'d36071dec9c01a558570656269df91c5','url':'levels/Birthday Vibes/lead/loop115.ogg'},{'revision':'5ab47584d43dd93738a18b4d50d04ffb','url':'levels/Birthday Vibes/lead/loop130.ogg'},{'revision':'a4d69d7140d3cf720c25cbcb2f0f484e','url':'levels/Birthday Vibes/lead/loop90.ogg'},{'revision':'14c27cd558ae8bd762c8b2e9e6a9f9ad','url':'levels/Cheerful Bliss/background.png'},{'revision':'07a973a9d19d92ccf89da72f79c88fa5','url':'levels/Cheerful Bliss/bass/a_2.ogg'},{'revision':'89a012c062ef57ba204de0f41a2a06be','url':'levels/Cheerful Bliss/bass/c_4.ogg'},{'revision':'37bd9234c3754f928596915c1d933b6d','url':'levels/Cheerful Bliss/bass/c_6.ogg'},{'revision':'60b1c56a677e6e5ec2c3d367b0489580','url':'levels/Cheerful Bliss/bass/d_2.ogg'},{'revision':'fad311d497c8162db1768f2fc1142cd2','url':'levels/Cheerful Bliss/bass/d_4.ogg'},{'revision':'631f24ff453b1dfce2526af63f836de3','url':'levels/Cheerful Bliss/bass/d_6.ogg'},{'revision':'7e7393c367c1db6d83e8de7bc38a0925','url':'levels/Cheerful Bliss/bass/e_4.ogg'},{'revision':'17e7a8bdced7502659c4c1c9bebacf01','url':'levels/Cheerful Bliss/bass/e_6.ogg'},{'revision':'2e99bcadf6971cbc860200b9978bc272','url':'levels/Cheerful Bliss/bass/e_8.ogg'},{'revision':'fe6c5e3a7649d11f6a94c055157b05ca','url':'levels/Cheerful Bliss/bass/f_4.ogg'},{'revision':'71e6f11d0a6f647276db5bc0018ae47f','url':'levels/Cheerful Bliss/bass/f_6.ogg'},{'revision':'22aaa8b34a46ec4e06c3b20c054aa476','url':'levels/Cheerful Bliss/bass/f_8.ogg'},{'revision':'4fec011463a2f6712860a3158f73376d','url':'levels/Cheerful Bliss/bass/g_2.ogg'},{'revision':'ef0bc7b422872c057df5c8156e866f1f','url':'levels/Cheerful Bliss/bass/g_4.ogg'},{'revision':'5dc54227e051e6bc248c78b94be6afc0','url':'levels/Cheerful Bliss/bass/loop115.ogg'},{'revision':'548357122c5acb58e60d2c752ee2ab65','url':'levels/Cheerful Bliss/bass/loop130.ogg'},{'revision':'946c0140b302fe7a464ff0b6cd44e3b1','url':'levels/Cheerful Bliss/bass/loop90.ogg'},{'revision':'7c26650ba4def7fc6f44dad6c10d32d3','url':'levels/Cheerful Bliss/chords/chord1.ogg'},{'revision':'cf0d0d6c90c964a16fa25711faf80059','url':'levels/Cheerful Bliss/chords/chord25.ogg'},{'revision':'93681c88742fb5709ccc25c7d4b1243f','url':'levels/Cheerful Bliss/chords/chord3.ogg'},{'revision':'e53f2c311483be153f046f66647945ab','url':'levels/Cheerful Bliss/chords/chord4.ogg'},{'revision':'dd6d02a162f588a03e501702eb538dd7','url':'levels/Cheerful Bliss/chords/chord6.ogg'},{'revision':'596c8b04f33e07ab548916e296efb07e','url':'levels/Cheerful Bliss/chords/chord7.ogg'},{'revision':'ae71669a0e61c7a49d2e4eb5db2b3670','url':'levels/Cheerful Bliss/chords/chord8.ogg'},{'revision':'9b877e271ed4f1ec1477f0c19a9a57a9','url':'levels/Cheerful Bliss/chords/loop115.ogg'},{'revision':'ec45003ffa95e1ea3da31c29ea58bb56','url':'levels/Cheerful Bliss/chords/loop130.ogg'},{'revision':'7867203adb517bcea0a08d4e498161f0','url':'levels/Cheerful Bliss/chords/loop90.ogg'},{'revision':'12458982bc1b46f76a51318891ea3633','url':'levels/Cheerful Bliss/drums/loop115.ogg'},{'revision':'0171ad237e329ac55b73bfd746c3e8e7','url':'levels/Cheerful Bliss/drums/loop130.ogg'},{'revision':'2dac94a241b368764775f633d44de613','url':'levels/Cheerful Bliss/drums/loop90.ogg'},{'revision':'d27b799933952354f26573be55a0cd72','url':'levels/Cheerful Bliss/info.json'},{'revision':'849f32a41d7c859b68879919b46d292b','url':'levels/Cheerful Bliss/lead/a5_4.ogg'},{'revision':'1059d3b8462ab4a89bbe1dade63717b2','url':'levels/Cheerful Bliss/lead/a6_4.ogg'},{'revision':'97f04b22450c4f1e4bc7628f83a71d68','url':'levels/Cheerful Bliss/lead/a6_6.ogg'},{'revision':'ee88d3a026315e20a4e97aeb6794f29c','url':'levels/Cheerful Bliss/lead/a6_8.ogg'},{'revision':'ff804e1146bc8257655d9ff684f19bd6','url':'levels/Cheerful Bliss/lead/b5_4.ogg'},{'revision':'05ebce42dc8eb8a4aa11ee552134e12b','url':'levels/Cheerful Bliss/lead/b5_6.ogg'},{'revision':'54a5e4073c64ddb5a53f18eaf7cff616','url':'levels/Cheerful Bliss/lead/b6_4.ogg'},{'revision':'a0d8c4cf886b2fed74259c32853bfe62','url':'levels/Cheerful Bliss/lead/b6_6.ogg'},{'revision':'7dfed1d9764492a5f71439d67ba22c24','url':'levels/Cheerful Bliss/lead/c_2.ogg'},{'revision':'a1b93f86f6682154f081af23f98d33a5','url':'levels/Cheerful Bliss/lead/c_4.ogg'},{'revision':'dcab39c62537f34bc4282b4e8a238eeb','url':'levels/Cheerful Bliss/lead/c_6.ogg'},{'revision':'2a51ae64766eaa1e43a2e9a05b20b923','url':'levels/Cheerful Bliss/lead/d_2.ogg'},{'revision':'4975d6a7b1ae3a4d3a33412ec0815ff9','url':'levels/Cheerful Bliss/lead/d_4.ogg'},{'revision':'58bcd985eddc7fa0ed9ce6775b40a983','url':'levels/Cheerful Bliss/lead/e_12.ogg'},{'revision':'67d2884e9b196bc12e086cb1a5721c74','url':'levels/Cheerful Bliss/lead/e_2.ogg'},{'revision':'b49c04c46c92dbf9f2974123f9a71fc8','url':'levels/Cheerful Bliss/lead/e_4.ogg'},{'revision':'e5817ae87828e55f1daf478df329f5dd','url':'levels/Cheerful Bliss/lead/f_6.ogg'},{'revision':'f4b374b721a3d74a77ddb2d57b823d69','url':'levels/Cheerful Bliss/lead/g_6.ogg'},{'revision':'eca66f02ad758df9a5f2594227956424','url':'levels/Cheerful Bliss/lead/loop115.ogg'},{'revision':'5a3a87524351a8016154631fc59467c0','url':'levels/Cheerful Bliss/lead/loop130.ogg'},{'revision':'3b8cb9f03ce82ec6b6974b076f3cb4fa','url':'levels/Cheerful Bliss/lead/loop90.ogg'},{'revision':'8c382d7ff3e652d67252ea30e7494b52','url':'levels/Slow Elegance/background.png'},{'revision':'056c74631114c05f31a873d4716b8333','url':'levels/Slow Elegance/bass/dSharp_2.ogg'},{'revision':'665c119a6ba5012b710a4b52d2cfc433','url':'levels/Slow Elegance/bass/dSharp_6.ogg'},{'revision':'4a90c6f02c3d01d6327680544cfdf3b5','url':'levels/Slow Elegance/bass/f_2.ogg'},{'revision':'f52e75cd172c482e85f97eb4d20b4c3d','url':'levels/Slow Elegance/bass/f_6.ogg'},{'revision':'f9597565917ec75a91e4f7e7fe108b2b','url':'levels/Slow Elegance/bass/gSharp_2.ogg'},{'revision':'f75905f2127540f69d66976fb8759f03','url':'levels/Slow Elegance/bass/gSharp_6.ogg'},{'revision':'c63620e89c687f3e7bf63a125c550cd5','url':'levels/Slow Elegance/bass/loop115.ogg'},{'revision':'7ab5e763e4728a99a87fa82f4badedea','url':'levels/Slow Elegance/bass/loop130.ogg'},{'revision':'e6e80a470e78fe57858f952b4ff7b253','url':'levels/Slow Elegance/bass/loop90.ogg'},{'revision':'a8c517a8030e657c7fabdd9767a53223','url':'levels/Slow Elegance/chords/chord1.ogg'},{'revision':'7b9bfd7dd90baeb491dfb5cadb3fc53b','url':'levels/Slow Elegance/chords/chord278.ogg'},{'revision':'0e05b1d77a7f74bb6f0edfbfe0ffa6c2','url':'levels/Slow Elegance/chords/chord3.ogg'},{'revision':'be2262ae377c935d4a9ccc6afe323e66','url':'levels/Slow Elegance/chords/chord4.ogg'},{'revision':'05830c1990ebbd467a135ce603621503','url':'levels/Slow Elegance/chords/chord5.ogg'},{'revision':'499a575af7a1227d3d35dede48d26591','url':'levels/Slow Elegance/chords/chord6.ogg'},{'revision':'3b6df5720bfaa4b41a6fdfeff971aad7','url':'levels/Slow Elegance/chords/loop115.ogg'},{'revision':'25c215e8b2fc4e54e071f26b61f2932e','url':'levels/Slow Elegance/chords/loop130.ogg'},{'revision':'38b3bbfbebaf9fa2dd9d6b5035fa3dfb','url':'levels/Slow Elegance/chords/loop90.ogg'},{'revision':'39bcea003867cebf677e07ea42965d1f','url':'levels/Slow Elegance/drums/loop115.ogg'},{'revision':'7043d3c3409a1cdaf58346e41854156e','url':'levels/Slow Elegance/drums/loop130.ogg'},{'revision':'810d6336f63471aa63aa9e774cf16393','url':'levels/Slow Elegance/drums/loop90.ogg'},{'revision':'8507c62fa3071335f15501d1530d2fb2','url':'levels/Slow Elegance/info.json'},{'revision':'6c943b72c3132a9ea2b7511b5a37244f','url':'levels/Slow Elegance/lead/dSharp.ogg'},{'revision':'505fa45b1cd9a78f466c163ec827213c','url':'levels/Slow Elegance/lead/f.ogg'},{'revision':'bd4d127d96d4b5ac0f8ed53e7e1edbb8','url':'levels/Slow Elegance/lead/gSharp.ogg'},{'revision':'4a9850fa003d9b9421f85c441f103003','url':'levels/Slow Elegance/lead/loop115.ogg'},{'revision':'8fd04ba9b3754b56e0ff82bad227fa8e','url':'levels/Slow Elegance/lead/loop130.ogg'},{'revision':'397dcccb47b07ee0f8951c52f72ba75b','url':'levels/Slow Elegance/lead/loop90.ogg'},{'revision':'869fd552b0e41b4d94851e6d1e319a8a','url':'levels/list.json'},{'revision':null,'url':'main.131f5081d4ac12d25c3e.bundle.js'},{'revision':'eefa45f41147cedadc0700b2322d241d','url':'manifest.json'},{'revision':'caecf0a6f4811ca5d516b869077f0348','url':'models/wasm/vision_wasm_internal.js'},{'revision':'f6d409524b3f0fcfbb23c525af4d8b9e','url':'models/wasm/vision_wasm_nosimd_internal.js'},{'revision':null,'url':'vendors.10ca8e881e09faa4d661.bundle.js'},{'revision':'bd5b234274f46d53c26c6a2587d17163','url':'vendors.10ca8e881e09faa4d661.bundle.js.LICENSE.txt'}],_().precache(L),function(t){const s=_();!function(t,s,a){let n;if("string"==typeof t){const e=new URL(t,location.href);n=new v((({url:t})=>t.href===e.href),s,a)}else if(t instanceof RegExp)n=new C(t,s,a);else if("function"==typeof t)n=new v(t,s,a);else{if(!(t instanceof v))throw new e("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});n=t}(q||(q=new b,q.addFetchListener(),q.addCacheListener()),q).registerRoute(n)}(new U(s,t))}(undefined)})()})(); \ No newline at end of file +(()=>{"use strict";var e={136:()=>{try{self["workbox:core:7.0.0"]&&_()}catch(e){}},447:()=>{try{self["workbox:precaching:7.0.0"]&&_()}catch(e){}},227:()=>{try{self["workbox:routing:7.0.0"]&&_()}catch(e){}},390:()=>{try{self["workbox:strategies:7.0.0"]&&_()}catch(e){}}},t={};function s(a){var n=t[a];if(void 0!==n)return n.exports;var r=t[a]={exports:{}};return e[a](r,r.exports,s),r.exports}(()=>{s(136);class e extends Error{constructor(e,t){super(((e,...t)=>{let s=e;return t.length>0&&(s+=` :: ${JSON.stringify(t)}`),s})(e,t)),this.name=e,this.details=t}}const t={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!=typeof registration?registration.scope:""},a=e=>[t.prefix,e,t.suffix].filter((e=>e&&e.length>0)).join("-"),n=e=>e||a(t.precache);function r(e,t){const s=t();return e.waitUntil(s),s}function i(t){if(!t)throw new e("add-to-cache-list-unexpected-type",{entry:t});if("string"==typeof t){const e=new URL(t,location.href);return{cacheKey:e.href,url:e.href}}const{revision:s,url:a}=t;if(!a)throw new e("add-to-cache-list-unexpected-type",{entry:t});if(!s){const e=new URL(a,location.href);return{cacheKey:e.href,url:e.href}}const n=new URL(a,location.href),r=new URL(a,location.href);return n.searchParams.set("__WB_REVISION__",s),{cacheKey:n.href,url:r.href}}s(447);class c{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:e,state:t})=>{t&&(t.originalRequest=e)},this.cachedResponseWillBeUsed=async({event:e,state:t,cachedResponse:s})=>{if("install"===e.type&&t&&t.originalRequest&&t.originalRequest instanceof Request){const e=t.originalRequest.url;s?this.notUpdatedURLs.push(e):this.updatedURLs.push(e)}return s}}}class o{constructor({precacheController:e}){this.cacheKeyWillBeUsed=async({request:e,params:t})=>{const s=(null==t?void 0:t.cacheKey)||this._precacheController.getCacheKeyForURL(e.url);return s?new Request(s,{headers:e.headers}):e},this._precacheController=e}}let h;function l(e,t){const s=new URL(e);for(const e of t)s.searchParams.delete(e);return s.href}class u{constructor(){this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}}const d=new Set;function f(e){return"string"==typeof e?new Request(e):e}s(390);class p{constructor(e,t){this._cacheKeys={},Object.assign(this,t),this.event=t.event,this._strategy=e,this._handlerDeferred=new u,this._extendLifetimePromises=[],this._plugins=[...e.plugins],this._pluginStateMap=new Map;for(const e of this._plugins)this._pluginStateMap.set(e,{});this.event.waitUntil(this._handlerDeferred.promise)}async fetch(t){const{event:s}=this;let a=f(t);if("navigate"===a.mode&&s instanceof FetchEvent&&s.preloadResponse){const e=await s.preloadResponse;if(e)return e}const n=this.hasCallback("fetchDidFail")?a.clone():null;try{for(const e of this.iterateCallbacks("requestWillFetch"))a=await e({request:a.clone(),event:s})}catch(t){if(t instanceof Error)throw new e("plugin-error-request-will-fetch",{thrownErrorMessage:t.message})}const r=a.clone();try{let e;e=await fetch(a,"navigate"===a.mode?void 0:this._strategy.fetchOptions);for(const t of this.iterateCallbacks("fetchDidSucceed"))e=await t({event:s,request:r,response:e});return e}catch(e){throw n&&await this.runCallbacks("fetchDidFail",{error:e,event:s,originalRequest:n.clone(),request:r.clone()}),e}}async fetchAndCachePut(e){const t=await this.fetch(e),s=t.clone();return this.waitUntil(this.cachePut(e,s)),t}async cacheMatch(e){const t=f(e);let s;const{cacheName:a,matchOptions:n}=this._strategy,r=await this.getCacheKey(t,"read"),i=Object.assign(Object.assign({},n),{cacheName:a});s=await caches.match(r,i);for(const e of this.iterateCallbacks("cachedResponseWillBeUsed"))s=await e({cacheName:a,matchOptions:n,cachedResponse:s,request:r,event:this.event})||void 0;return s}async cachePut(t,s){const a=f(t);await(0,new Promise((e=>setTimeout(e,0))));const n=await this.getCacheKey(a,"write");if(!s)throw new e("cache-put-with-no-response",{url:(r=n.url,new URL(String(r),location.href).href.replace(new RegExp(`^${location.origin}`),""))});var r;const i=await this._ensureResponseSafeToCache(s);if(!i)return!1;const{cacheName:c,matchOptions:o}=this._strategy,h=await self.caches.open(c),u=this.hasCallback("cacheDidUpdate"),p=u?await async function(e,t,s,a){const n=l(t.url,s);if(t.url===n)return e.match(t,a);const r=Object.assign(Object.assign({},a),{ignoreSearch:!0}),i=await e.keys(t,r);for(const t of i)if(n===l(t.url,s))return e.match(t,a)}(h,n.clone(),["__WB_REVISION__"],o):null;try{await h.put(n,u?i.clone():i)}catch(e){if(e instanceof Error)throw"QuotaExceededError"===e.name&&await async function(){for(const e of d)await e()}(),e}for(const e of this.iterateCallbacks("cacheDidUpdate"))await e({cacheName:c,oldResponse:p,newResponse:i.clone(),request:n,event:this.event});return!0}async getCacheKey(e,t){const s=`${e.url} | ${t}`;if(!this._cacheKeys[s]){let a=e;for(const e of this.iterateCallbacks("cacheKeyWillBeUsed"))a=f(await e({mode:t,request:a,event:this.event,params:this.params}));this._cacheKeys[s]=a}return this._cacheKeys[s]}hasCallback(e){for(const t of this._strategy.plugins)if(e in t)return!0;return!1}async runCallbacks(e,t){for(const s of this.iterateCallbacks(e))await s(t)}*iterateCallbacks(e){for(const t of this._strategy.plugins)if("function"==typeof t[e]){const s=this._pluginStateMap.get(t),a=a=>{const n=Object.assign(Object.assign({},a),{state:s});return t[e](n)};yield a}}waitUntil(e){return this._extendLifetimePromises.push(e),e}async doneWaiting(){let e;for(;e=this._extendLifetimePromises.shift();)await e}destroy(){this._handlerDeferred.resolve(null)}async _ensureResponseSafeToCache(e){let t=e,s=!1;for(const e of this.iterateCallbacks("cacheWillUpdate"))if(t=await e({request:this.request,response:t,event:this.event})||void 0,s=!0,!t)break;return s||t&&200!==t.status&&(t=void 0),t}}class g{constructor(e={}){this.cacheName=e.cacheName||a(t.runtime),this.plugins=e.plugins||[],this.fetchOptions=e.fetchOptions,this.matchOptions=e.matchOptions}handle(e){const[t]=this.handleAll(e);return t}handleAll(e){e instanceof FetchEvent&&(e={event:e,request:e.request});const t=e.event,s="string"==typeof e.request?new Request(e.request):e.request,a="params"in e?e.params:void 0,n=new p(this,{event:t,request:s,params:a}),r=this._getResponse(n,s,t);return[r,this._awaitComplete(r,n,s,t)]}async _getResponse(t,s,a){let n;await t.runCallbacks("handlerWillStart",{event:a,request:s});try{if(n=await this._handle(s,t),!n||"error"===n.type)throw new e("no-response",{url:s.url})}catch(e){if(e instanceof Error)for(const r of t.iterateCallbacks("handlerDidError"))if(n=await r({error:e,event:a,request:s}),n)break;if(!n)throw e}for(const e of t.iterateCallbacks("handlerWillRespond"))n=await e({event:a,request:s,response:n});return n}async _awaitComplete(e,t,s,a){let n,r;try{n=await e}catch(r){}try{await t.runCallbacks("handlerDidRespond",{event:a,request:s,response:n}),await t.doneWaiting()}catch(e){e instanceof Error&&(r=e)}if(await t.runCallbacks("handlerDidComplete",{event:a,request:s,response:n,error:r}),t.destroy(),r)throw r}}class y extends g{constructor(e={}){e.cacheName=n(e.cacheName),super(e),this._fallbackToNetwork=!1!==e.fallbackToNetwork,this.plugins.push(y.copyRedirectedCacheableResponsesPlugin)}async _handle(e,t){return await t.cacheMatch(e)||(t.event&&"install"===t.event.type?await this._handleInstall(e,t):await this._handleFetch(e,t))}async _handleFetch(t,s){let a;const n=s.params||{};if(!this._fallbackToNetwork)throw new e("missing-precache-entry",{cacheName:this.cacheName,url:t.url});{const e=n.integrity,r=t.integrity,i=!r||r===e;a=await s.fetch(new Request(t,{integrity:"no-cors"!==t.mode?r||e:void 0})),e&&i&&"no-cors"!==t.mode&&(this._useDefaultCacheabilityPluginIfNeeded(),await s.cachePut(t,a.clone()))}return a}async _handleInstall(t,s){this._useDefaultCacheabilityPluginIfNeeded();const a=await s.fetch(t);if(!await s.cachePut(t,a.clone()))throw new e("bad-precaching-response",{url:t.url,status:a.status});return a}_useDefaultCacheabilityPluginIfNeeded(){let e=null,t=0;for(const[s,a]of this.plugins.entries())a!==y.copyRedirectedCacheableResponsesPlugin&&(a===y.defaultPrecacheCacheabilityPlugin&&(e=s),a.cacheWillUpdate&&t++);0===t?this.plugins.push(y.defaultPrecacheCacheabilityPlugin):t>1&&null!==e&&this.plugins.splice(e,1)}}y.defaultPrecacheCacheabilityPlugin={cacheWillUpdate:async({response:e})=>!e||e.status>=400?null:e},y.copyRedirectedCacheableResponsesPlugin={cacheWillUpdate:async({response:t})=>t.redirected?await async function(t,s){let a=null;if(t.url&&(a=new URL(t.url).origin),a!==self.location.origin)throw new e("cross-origin-copy-response",{origin:a});const n=t.clone(),r={headers:new Headers(n.headers),status:n.status,statusText:n.statusText},i=s?s(r):r,c=function(){if(void 0===h){const e=new Response("");if("body"in e)try{new Response(e.body),h=!0}catch(e){h=!1}h=!1}return h}()?n.body:await n.blob();return new Response(c,i)}(t):t};class w{constructor({cacheName:e,plugins:t=[],fallbackToNetwork:s=!0}={}){this._urlsToCacheKeys=new Map,this._urlsToCacheModes=new Map,this._cacheKeysToIntegrities=new Map,this._strategy=new y({cacheName:n(e),plugins:[...t,new o({precacheController:this})],fallbackToNetwork:s}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this._strategy}precache(e){this.addToCacheList(e),this._installAndActiveListenersAdded||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this._installAndActiveListenersAdded=!0)}addToCacheList(t){const s=[];for(const a of t){"string"==typeof a?s.push(a):a&&void 0===a.revision&&s.push(a.url);const{cacheKey:t,url:n}=i(a),r="string"!=typeof a&&a.revision?"reload":"default";if(this._urlsToCacheKeys.has(n)&&this._urlsToCacheKeys.get(n)!==t)throw new e("add-to-cache-list-conflicting-entries",{firstEntry:this._urlsToCacheKeys.get(n),secondEntry:t});if("string"!=typeof a&&a.integrity){if(this._cacheKeysToIntegrities.has(t)&&this._cacheKeysToIntegrities.get(t)!==a.integrity)throw new e("add-to-cache-list-conflicting-integrities",{url:n});this._cacheKeysToIntegrities.set(t,a.integrity)}if(this._urlsToCacheKeys.set(n,t),this._urlsToCacheModes.set(n,r),s.length>0){const e=`Workbox is precaching URLs without revision info: ${s.join(", ")}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(e)}}}install(e){return r(e,(async()=>{const t=new c;this.strategy.plugins.push(t);for(const[t,s]of this._urlsToCacheKeys){const a=this._cacheKeysToIntegrities.get(s),n=this._urlsToCacheModes.get(t),r=new Request(t,{integrity:a,cache:n,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:s},request:r,event:e}))}const{updatedURLs:s,notUpdatedURLs:a}=t;return{updatedURLs:s,notUpdatedURLs:a}}))}activate(e){return r(e,(async()=>{const e=await self.caches.open(this.strategy.cacheName),t=await e.keys(),s=new Set(this._urlsToCacheKeys.values()),a=[];for(const n of t)s.has(n.url)||(await e.delete(n),a.push(n.url));return{deletedURLs:a}}))}getURLsToCacheKeys(){return this._urlsToCacheKeys}getCachedURLs(){return[...this._urlsToCacheKeys.keys()]}getCacheKeyForURL(e){const t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}getIntegrityForCacheKey(e){return this._cacheKeysToIntegrities.get(e)}async matchPrecache(e){const t=e instanceof Request?e.url:e,s=this.getCacheKeyForURL(t);if(s)return(await self.caches.open(this.strategy.cacheName)).match(s)}createHandlerBoundToURL(t){const s=this.getCacheKeyForURL(t);if(!s)throw new e("non-precached-url",{url:t});return e=>(e.request=new Request(t),e.params=Object.assign({cacheKey:s},e.params),this.strategy.handle(e))}}let m;const _=()=>(m||(m=new w),m);s(227);const R=e=>e&&"object"==typeof e?e:{handle:e};class v{constructor(e,t,s="GET"){this.handler=R(t),this.match=e,this.method=s}setCatchHandler(e){this.catchHandler=R(e)}}class C extends v{constructor(e,t,s){super((({url:t})=>{const s=e.exec(t.href);if(s&&(t.origin===location.origin||0===s.index))return s.slice(1)}),t,s)}}class b{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener("fetch",(e=>{const{request:t}=e,s=this.handleRequest({request:t,event:e});s&&e.respondWith(s)}))}addCacheListener(){self.addEventListener("message",(e=>{if(e.data&&"CACHE_URLS"===e.data.type){const{payload:t}=e.data,s=Promise.all(t.urlsToCache.map((t=>{"string"==typeof t&&(t=[t]);const s=new Request(...t);return this.handleRequest({request:s,event:e})})));e.waitUntil(s),e.ports&&e.ports[0]&&s.then((()=>e.ports[0].postMessage(!0)))}}))}handleRequest({request:e,event:t}){const s=new URL(e.url,location.href);if(!s.protocol.startsWith("http"))return;const a=s.origin===location.origin,{params:n,route:r}=this.findMatchingRoute({event:t,request:e,sameOrigin:a,url:s});let i=r&&r.handler;const c=e.method;if(!i&&this._defaultHandlerMap.has(c)&&(i=this._defaultHandlerMap.get(c)),!i)return;let o;try{o=i.handle({url:s,request:e,event:t,params:n})}catch(e){o=Promise.reject(e)}const h=r&&r.catchHandler;return o instanceof Promise&&(this._catchHandler||h)&&(o=o.catch((async a=>{if(h)try{return await h.handle({url:s,request:e,event:t,params:n})}catch(e){e instanceof Error&&(a=e)}if(this._catchHandler)return this._catchHandler.handle({url:s,request:e,event:t});throw a}))),o}findMatchingRoute({url:e,sameOrigin:t,request:s,event:a}){const n=this._routes.get(s.method)||[];for(const r of n){let n;const i=r.match({url:e,sameOrigin:t,request:s,event:a});if(i)return n=i,(Array.isArray(n)&&0===n.length||i.constructor===Object&&0===Object.keys(i).length||"boolean"==typeof i)&&(n=void 0),{route:r,params:n}}return{}}setDefaultHandler(e,t="GET"){this._defaultHandlerMap.set(t,R(e))}setCatchHandler(e){this._catchHandler=R(e)}registerRoute(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}unregisterRoute(t){if(!this._routes.has(t.method))throw new e("unregister-route-but-not-found-with-method",{method:t.method});const s=this._routes.get(t.method).indexOf(t);if(!(s>-1))throw new e("unregister-route-route-not-registered");this._routes.get(t.method).splice(s,1)}}let q;class U extends v{constructor(e,t){super((({request:s})=>{const a=e.getURLsToCacheKeys();for(const n of function*(e,{ignoreURLParametersMatching:t=[/^utm_/,/^fbclid$/],directoryIndex:s="index.html",cleanURLs:a=!0,urlManipulation:n}={}){const r=new URL(e,location.href);r.hash="",yield r.href;const i=function(e,t=[]){for(const s of[...e.searchParams.keys()])t.some((e=>e.test(s)))&&e.searchParams.delete(s);return e}(r,t);if(yield i.href,s&&i.pathname.endsWith("/")){const e=new URL(i.href);e.pathname+=s,yield e.href}if(a){const e=new URL(i.href);e.pathname+=".html",yield e.href}if(n){const e=n({url:r});for(const t of e)yield t.href}}(s.url,t)){const t=a.get(n);if(t)return{cacheKey:t,integrity:e.getIntegrityForCacheKey(t)}}}),e.strategy)}}var L;L=[{'revision':'c681780dee3654fd502c3cb1ed0bc958','url':'assets/icon.ico'},{'revision':'d704d13f9fcc90736834700f3084aecc','url':'assets/sounds/metronome/high.mp3'},{'revision':'04baf0bd96c51061ade72019b276fa19','url':'assets/sounds/metronome/high.ogg'},{'revision':'d9cac49f7f09556fa353fb50ac140139','url':'assets/sounds/metronome/low.mp3'},{'revision':'82865f2b16a02de26df27adfaf024c55','url':'assets/sounds/metronome/low.ogg'},{'revision':'63ac7db39423346cdeb5577012df6aff','url':'assets/sounds/ui/menu_ding.mp3'},{'revision':'ac6eb1e15207c8e5d272926777b68f6f','url':'assets/sounds/ui/menu_ding.ogg'},{'revision':'cb8affb1812fc1591726a1740df2077f','url':'assets/sprites/countdown.png'},{'revision':'d204b9ac18869eb2dc5ade226678cb66','url':'assets/sprites/defaultTargetInner.png'},{'revision':'729fdd6f562ede8ae64b974c1b016d32','url':'assets/sprites/defaultTargetOuter.png'},{'revision':'2a7efd9cf2addb4d8c7b95267fcf2657','url':'assets/sprites/finger.png'},{'revision':'b0f665df8751c5a2aa39e7c535153d17','url':'assets/sprites/flare.png'},{'revision':'51e0571fbe4415db8dac79283fa20d85','url':'assets/ui/back_button.png'},{'revision':'2bb7a1584e2953224f6a7fe0dd79dddf','url':'assets/ui/calibration_background.png'},{'revision':'8c382d7ff3e652d67252ea30e7494b52','url':'assets/ui/default_level_background.png'},{'revision':'a60af6fc7fffb6a40650837a3e24d8dd','url':'assets/ui/default_preview_background.png'},{'revision':'e8f3412d336637cdfc9a48e213a09684','url':'assets/ui/easy_button.png'},{'revision':'ac839e30a9d4d642193d46ed54b4b97a','url':'assets/ui/empty_button.png'},{'revision':'a85231dbe5674905de23fccc44fad923','url':'assets/ui/hard_button.png'},{'revision':'c32ec8851cf5d8f66c547da52bcd0918','url':'assets/ui/info_background.png'},{'revision':'1989d155533325e4fcb4d08819b06e6b','url':'assets/ui/layer_score_background.png'},{'revision':'86d1a3566f11f28474ddb11f45bbf3ad','url':'assets/ui/left_arrow.png'},{'revision':'9081f9850823341d67211edf61330bfe','url':'assets/ui/medium_button.png'},{'revision':'4da8a2009798f052d5d49fc8446adef8','url':'assets/ui/menu_background.png'},{'revision':'52725945a4a6359f7a6a714be0ed5802','url':'assets/ui/menu_background_old.png'},{'revision':'c78af9c46a95daadbc8b4bb9d979ed13','url':'assets/ui/menu_logo.png'},{'revision':'3106244610ace2a29d54a78eac220c8c','url':'assets/ui/menu_options.png'},{'revision':'050f45e70e72aa8f724b7f7d35af230c','url':'assets/ui/menu_select_level.png'},{'revision':'47bb01c1e6ac1f4e0ba7275a3b21abb1','url':'assets/ui/menu_setup_camera.png'},{'revision':'d4278df95f99e0b68ca5598290f309af','url':'assets/ui/mute_button.png'},{'revision':'015692ea211877dfc12d305d3221b973','url':'assets/ui/options_background.png'},{'revision':'f8c919718c9f65591314d888f655e29f','url':'assets/ui/play_button.png'},{'revision':'de37ef4d2dfedc82df26a3bec80cabc1','url':'assets/ui/progress_bar_segment.png'},{'revision':'89c18f572e2170101d889e80f89f826c','url':'assets/ui/reset_button.png'},{'revision':'dda36e38b015753c42ae6e5ada19ab22','url':'assets/ui/right_arrow.png'},{'revision':'d5f4614987321c5380c6137f301e9667','url':'assets/ui/save_csv_button.png'},{'revision':'53feaa7ade2b2d35b5b9f7f0e5985aa5','url':'assets/ui/scoreboard_background.png'},{'revision':'30946fd16b96c40d948d064a35af235f','url':'assets/ui/skip_button.png'},{'revision':'21bc625a9d475c384f820ca1d3d535d4','url':'assets/ui/song_name_background.png'},{'revision':'d956352eef1e98efd783e2c57f33c783','url':'assets/ui/unmute_button.png'},{'revision':'761afc4b84de59f7c9207964ceecc5e6','url':'assets/ui/video_background.png'},{'revision':'ac7c0657751250603e4469977db9c283','url':'data/config.json'},{'revision':'ac7c0657751250603e4469977db9c283','url':'data/default_config.json'},{'revision':'c681780dee3654fd502c3cb1ed0bc958','url':'icon.ico'},{'revision':'c681780dee3654fd502c3cb1ed0bc958','url':'icons/icon.ico'},{'revision':'8f17306ccc5c479492df0eb2b002a7b6','url':'index.html'},{'revision':'91cc0ea23ae645329b44bb99aee8219c','url':'levels/Birthday Vibes/background.png'},{'revision':'529c8edda4de329e0b14c0ce7c705013','url':'levels/Birthday Vibes/bass/aSharp.mp3'},{'revision':'e36bb98c4966db215c2b8622f2a7ca9d','url':'levels/Birthday Vibes/bass/aSharp.ogg'},{'revision':'fa92b705dfc974bb7c4f97aa257e5a58','url':'levels/Birthday Vibes/bass/c.mp3'},{'revision':'f03f404bc5d0565a517d18efb5c78c88','url':'levels/Birthday Vibes/bass/c.ogg'},{'revision':'348155dedf11d565527bde21741c5160','url':'levels/Birthday Vibes/bass/d.mp3'},{'revision':'9c97fc36c5b3cc1bca9eb6307520517d','url':'levels/Birthday Vibes/bass/d.ogg'},{'revision':'3ed0a68216057df284928398eeee5482','url':'levels/Birthday Vibes/bass/dSharp.mp3'},{'revision':'6e3e4de57f241cd0125161aa86be6cf5','url':'levels/Birthday Vibes/bass/dSharp.ogg'},{'revision':'e42f5b77b86b63b10da5d8deed664d8e','url':'levels/Birthday Vibes/bass/f.mp3'},{'revision':'769965b9d363e53297934d9b58b7d971','url':'levels/Birthday Vibes/bass/f.ogg'},{'revision':'53364dba1a5f8deb44f4c4874486fa95','url':'levels/Birthday Vibes/bass/g.mp3'},{'revision':'6cfbeb319c80227a526e7fcd4d0986bf','url':'levels/Birthday Vibes/bass/g.ogg'},{'revision':'f4b5f6e89d02193c7d90bc6af39b14e4','url':'levels/Birthday Vibes/bass/loop115.mp3'},{'revision':'2954faf816f19648eb9d07c4c7d001c4','url':'levels/Birthday Vibes/bass/loop115.ogg'},{'revision':'a9af773acaad2ef20c73438f453ad123','url':'levels/Birthday Vibes/bass/loop130.mp3'},{'revision':'e9cc89da6644958763f45b41591a252e','url':'levels/Birthday Vibes/bass/loop130.ogg'},{'revision':'28f1a9fcf6c154e7221b46644aeec7c4','url':'levels/Birthday Vibes/bass/loop90.mp3'},{'revision':'56639388804acd365cde79f391dcebe3','url':'levels/Birthday Vibes/bass/loop90.ogg'},{'revision':'3bb3a2c5ce29853254b7e3790abb7b46','url':'levels/Birthday Vibes/chords/chord1.mp3'},{'revision':'2d3b6bf55c61e4f848ec2f4429e6ccd7','url':'levels/Birthday Vibes/chords/chord1.ogg'},{'revision':'09d3ed7f11aae494b95ca7a56e45cf0a','url':'levels/Birthday Vibes/chords/chord2.mp3'},{'revision':'87818dab244c453c227ccdc8b69e9070','url':'levels/Birthday Vibes/chords/chord2.ogg'},{'revision':'c371d2edd4aa1735cb6657088098213d','url':'levels/Birthday Vibes/chords/chord3.mp3'},{'revision':'9029f41da89a503862edbfced0782a23','url':'levels/Birthday Vibes/chords/chord3.ogg'},{'revision':'2fc5d2eefa32e9ce5de048b75ac7acc9','url':'levels/Birthday Vibes/chords/chord4.mp3'},{'revision':'1eeb4f4b10f7c7ab2c1de496b06eb343','url':'levels/Birthday Vibes/chords/chord4.ogg'},{'revision':'e9461024cfcb2a008692ca8e2cf3e87a','url':'levels/Birthday Vibes/chords/loop115.mp3'},{'revision':'9b76a5999ef6c41aa7e86df0a145a45c','url':'levels/Birthday Vibes/chords/loop115.ogg'},{'revision':'7f7987e6edfbedaeedad7dbcfe22db15','url':'levels/Birthday Vibes/chords/loop130.mp3'},{'revision':'ebedb61cc4c7c33fb8aa542bfef09e73','url':'levels/Birthday Vibes/chords/loop130.ogg'},{'revision':'1c485f71c080e55fb25107e6d90abfca','url':'levels/Birthday Vibes/chords/loop90.mp3'},{'revision':'496c339b2ee8b40b7633d546b67cfae0','url':'levels/Birthday Vibes/chords/loop90.ogg'},{'revision':'fc34a69b1e9b77cdf28368a90c2fff57','url':'levels/Birthday Vibes/drums/loop115.mp3'},{'revision':'18ef50099354c264a0bd7393bfa78d72','url':'levels/Birthday Vibes/drums/loop115.ogg'},{'revision':'9241cfd854a4e5aff219962dba81fbc6','url':'levels/Birthday Vibes/drums/loop130.mp3'},{'revision':'0505ea764e9cc3447d7b1449a9b22abe','url':'levels/Birthday Vibes/drums/loop130.ogg'},{'revision':'366d6c2136ed8cecfb87543d384936f9','url':'levels/Birthday Vibes/drums/loop90.mp3'},{'revision':'fd0cb60d0ec7ae1c14fbfff81b457e6e','url':'levels/Birthday Vibes/drums/loop90.ogg'},{'revision':'668b12c7c58b56b79930a98af41c5142','url':'levels/Birthday Vibes/info.json'},{'revision':'db8775167f7a5266033e4ff59e6af9c9','url':'levels/Birthday Vibes/lead/aSharp.mp3'},{'revision':'09461d99ddcfe8ab90cac446cc885f41','url':'levels/Birthday Vibes/lead/aSharp.ogg'},{'revision':'090da01d58b7774f530857294ee8a214','url':'levels/Birthday Vibes/lead/c.mp3'},{'revision':'808ae6c59ed3b2921a92d30138b11ff3','url':'levels/Birthday Vibes/lead/c.ogg'},{'revision':'bea0f87fbb3ad0545773760edbe2aa6e','url':'levels/Birthday Vibes/lead/d.mp3'},{'revision':'39b00f2242535dccf96f6d08e43f2193','url':'levels/Birthday Vibes/lead/d.ogg'},{'revision':'c01433486066f6d2ade0878f79c4d70b','url':'levels/Birthday Vibes/lead/f.mp3'},{'revision':'e490eb41abf5f2732f21cd2447df8e7b','url':'levels/Birthday Vibes/lead/f.ogg'},{'revision':'d485b5136adda6edcfe7048781bc136e','url':'levels/Birthday Vibes/lead/g.mp3'},{'revision':'bed79fa63308fd0cc2a3900ce7ed3fd0','url':'levels/Birthday Vibes/lead/g.ogg'},{'revision':'c0cc43d3bceb08269de59c632aafb8f3','url':'levels/Birthday Vibes/lead/loop115.mp3'},{'revision':'d36071dec9c01a558570656269df91c5','url':'levels/Birthday Vibes/lead/loop115.ogg'},{'revision':'9320eafdc0d323987a313fdcdf206d74','url':'levels/Birthday Vibes/lead/loop130.mp3'},{'revision':'5ab47584d43dd93738a18b4d50d04ffb','url':'levels/Birthday Vibes/lead/loop130.ogg'},{'revision':'4b7e79c247bcb453a859ef00bebcae55','url':'levels/Birthday Vibes/lead/loop90.mp3'},{'revision':'a4d69d7140d3cf720c25cbcb2f0f484e','url':'levels/Birthday Vibes/lead/loop90.ogg'},{'revision':'14c27cd558ae8bd762c8b2e9e6a9f9ad','url':'levels/Cheerful Bliss/background.png'},{'revision':'c91bde7621f10c26aadbac3fa169c582','url':'levels/Cheerful Bliss/bass/a_2.mp3'},{'revision':'07a973a9d19d92ccf89da72f79c88fa5','url':'levels/Cheerful Bliss/bass/a_2.ogg'},{'revision':'03169be0fa6bf93d8dbade3762e8da3f','url':'levels/Cheerful Bliss/bass/c_4.mp3'},{'revision':'89a012c062ef57ba204de0f41a2a06be','url':'levels/Cheerful Bliss/bass/c_4.ogg'},{'revision':'f0894a424e68a74f5c15fe6e37a31677','url':'levels/Cheerful Bliss/bass/c_6.mp3'},{'revision':'37bd9234c3754f928596915c1d933b6d','url':'levels/Cheerful Bliss/bass/c_6.ogg'},{'revision':'27debf24d26fdaccc63ac6934403854a','url':'levels/Cheerful Bliss/bass/d_2.mp3'},{'revision':'60b1c56a677e6e5ec2c3d367b0489580','url':'levels/Cheerful Bliss/bass/d_2.ogg'},{'revision':'e3bac198c13f7e9c68018ace16938483','url':'levels/Cheerful Bliss/bass/d_4.mp3'},{'revision':'fad311d497c8162db1768f2fc1142cd2','url':'levels/Cheerful Bliss/bass/d_4.ogg'},{'revision':'224f6398fb51b8d612d5b46611d1dde7','url':'levels/Cheerful Bliss/bass/d_6.mp3'},{'revision':'631f24ff453b1dfce2526af63f836de3','url':'levels/Cheerful Bliss/bass/d_6.ogg'},{'revision':'0af3a4cb724cf8a349cf18fa47c243de','url':'levels/Cheerful Bliss/bass/e_4.mp3'},{'revision':'7e7393c367c1db6d83e8de7bc38a0925','url':'levels/Cheerful Bliss/bass/e_4.ogg'},{'revision':'2a0910e1e19f2ee3fe001b61bf6b50e0','url':'levels/Cheerful Bliss/bass/e_6.mp3'},{'revision':'17e7a8bdced7502659c4c1c9bebacf01','url':'levels/Cheerful Bliss/bass/e_6.ogg'},{'revision':'8901f6d7d3948ca3fc60ffa3bc8d2932','url':'levels/Cheerful Bliss/bass/e_8.mp3'},{'revision':'2e99bcadf6971cbc860200b9978bc272','url':'levels/Cheerful Bliss/bass/e_8.ogg'},{'revision':'a9363c1a0ed355d7ceb3724a29f84877','url':'levels/Cheerful Bliss/bass/f_4.mp3'},{'revision':'fe6c5e3a7649d11f6a94c055157b05ca','url':'levels/Cheerful Bliss/bass/f_4.ogg'},{'revision':'aaa64486c52133114a7ddb48dc371546','url':'levels/Cheerful Bliss/bass/f_6.mp3'},{'revision':'71e6f11d0a6f647276db5bc0018ae47f','url':'levels/Cheerful Bliss/bass/f_6.ogg'},{'revision':'b1d6b6d954a9a4a18ed8fe689df11373','url':'levels/Cheerful Bliss/bass/f_8.mp3'},{'revision':'22aaa8b34a46ec4e06c3b20c054aa476','url':'levels/Cheerful Bliss/bass/f_8.ogg'},{'revision':'ad655f7e16084bb538492485104d84e0','url':'levels/Cheerful Bliss/bass/g_2.mp3'},{'revision':'4fec011463a2f6712860a3158f73376d','url':'levels/Cheerful Bliss/bass/g_2.ogg'},{'revision':'ad655f7e16084bb538492485104d84e0','url':'levels/Cheerful Bliss/bass/g_4.mp3'},{'revision':'ef0bc7b422872c057df5c8156e866f1f','url':'levels/Cheerful Bliss/bass/g_4.ogg'},{'revision':'a67213ef7d818da73a34bd53ee3e4b26','url':'levels/Cheerful Bliss/bass/loop115.mp3'},{'revision':'5dc54227e051e6bc248c78b94be6afc0','url':'levels/Cheerful Bliss/bass/loop115.ogg'},{'revision':'8bde8f5325a9e6616b7636589a332ccb','url':'levels/Cheerful Bliss/bass/loop130.mp3'},{'revision':'548357122c5acb58e60d2c752ee2ab65','url':'levels/Cheerful Bliss/bass/loop130.ogg'},{'revision':'5d0c4d8fafdd43274838e6b71c066d08','url':'levels/Cheerful Bliss/bass/loop90.mp3'},{'revision':'946c0140b302fe7a464ff0b6cd44e3b1','url':'levels/Cheerful Bliss/bass/loop90.ogg'},{'revision':'9f4ade50eec9b9f8308f37002fd72393','url':'levels/Cheerful Bliss/chords/chord1.mp3'},{'revision':'7c26650ba4def7fc6f44dad6c10d32d3','url':'levels/Cheerful Bliss/chords/chord1.ogg'},{'revision':'35b4516ad17debb97672bbe8cf2c83b8','url':'levels/Cheerful Bliss/chords/chord25.mp3'},{'revision':'cf0d0d6c90c964a16fa25711faf80059','url':'levels/Cheerful Bliss/chords/chord25.ogg'},{'revision':'45ea9092f492cb0799a7b90cbc4e0c6e','url':'levels/Cheerful Bliss/chords/chord3.mp3'},{'revision':'93681c88742fb5709ccc25c7d4b1243f','url':'levels/Cheerful Bliss/chords/chord3.ogg'},{'revision':'c9143b18a30cbc97d099e9ac15067c8e','url':'levels/Cheerful Bliss/chords/chord4.mp3'},{'revision':'e53f2c311483be153f046f66647945ab','url':'levels/Cheerful Bliss/chords/chord4.ogg'},{'revision':'880c6bb9097857a430d70d7d7ee6305c','url':'levels/Cheerful Bliss/chords/chord6.mp3'},{'revision':'dd6d02a162f588a03e501702eb538dd7','url':'levels/Cheerful Bliss/chords/chord6.ogg'},{'revision':'08c900b2aea280256648811c6f0842a5','url':'levels/Cheerful Bliss/chords/chord7.mp3'},{'revision':'596c8b04f33e07ab548916e296efb07e','url':'levels/Cheerful Bliss/chords/chord7.ogg'},{'revision':'1b4a27fcf04e366818ba236aaee1d16e','url':'levels/Cheerful Bliss/chords/chord8.mp3'},{'revision':'ae71669a0e61c7a49d2e4eb5db2b3670','url':'levels/Cheerful Bliss/chords/chord8.ogg'},{'revision':'7081a4da0b5bb3bacbabab110790b36c','url':'levels/Cheerful Bliss/chords/loop115.mp3'},{'revision':'9b877e271ed4f1ec1477f0c19a9a57a9','url':'levels/Cheerful Bliss/chords/loop115.ogg'},{'revision':'2dc920ebe9b711f70b464f8c6893ccc0','url':'levels/Cheerful Bliss/chords/loop130.mp3'},{'revision':'ec45003ffa95e1ea3da31c29ea58bb56','url':'levels/Cheerful Bliss/chords/loop130.ogg'},{'revision':'f94659a5d2f0418fc7e9389fe2de49bf','url':'levels/Cheerful Bliss/chords/loop90.mp3'},{'revision':'7867203adb517bcea0a08d4e498161f0','url':'levels/Cheerful Bliss/chords/loop90.ogg'},{'revision':'5ee404d1cd010b22e71572d9eb5e3363','url':'levels/Cheerful Bliss/drums/loop115.mp3'},{'revision':'12458982bc1b46f76a51318891ea3633','url':'levels/Cheerful Bliss/drums/loop115.ogg'},{'revision':'f81d2c4363f50af8ebc24003e4519a58','url':'levels/Cheerful Bliss/drums/loop130.mp3'},{'revision':'0171ad237e329ac55b73bfd746c3e8e7','url':'levels/Cheerful Bliss/drums/loop130.ogg'},{'revision':'5e777a7917af0041e48a18abc7642527','url':'levels/Cheerful Bliss/drums/loop90.mp3'},{'revision':'2dac94a241b368764775f633d44de613','url':'levels/Cheerful Bliss/drums/loop90.ogg'},{'revision':'d27b799933952354f26573be55a0cd72','url':'levels/Cheerful Bliss/info.json'},{'revision':'dce14d61ed094e77cfd314e9cbbb8e13','url':'levels/Cheerful Bliss/lead/a5_4.mp3'},{'revision':'849f32a41d7c859b68879919b46d292b','url':'levels/Cheerful Bliss/lead/a5_4.ogg'},{'revision':'e60716dc3c6ddc908a420bd704bfaf64','url':'levels/Cheerful Bliss/lead/a6_4.mp3'},{'revision':'1059d3b8462ab4a89bbe1dade63717b2','url':'levels/Cheerful Bliss/lead/a6_4.ogg'},{'revision':'543c2b1ec363237f2f9d59de76af6ab4','url':'levels/Cheerful Bliss/lead/a6_6.mp3'},{'revision':'97f04b22450c4f1e4bc7628f83a71d68','url':'levels/Cheerful Bliss/lead/a6_6.ogg'},{'revision':'98a647de7995dd368d05fcb99b7ed97e','url':'levels/Cheerful Bliss/lead/a6_8.mp3'},{'revision':'ee88d3a026315e20a4e97aeb6794f29c','url':'levels/Cheerful Bliss/lead/a6_8.ogg'},{'revision':'b84875235e208a91e4e6394906b1e2ea','url':'levels/Cheerful Bliss/lead/b5_4.mp3'},{'revision':'ff804e1146bc8257655d9ff684f19bd6','url':'levels/Cheerful Bliss/lead/b5_4.ogg'},{'revision':'6046811c6180575d8023952422d8ee4c','url':'levels/Cheerful Bliss/lead/b5_6.mp3'},{'revision':'05ebce42dc8eb8a4aa11ee552134e12b','url':'levels/Cheerful Bliss/lead/b5_6.ogg'},{'revision':'0b274e1b11c97edb9c9032a3d75a7246','url':'levels/Cheerful Bliss/lead/b6_4.mp3'},{'revision':'54a5e4073c64ddb5a53f18eaf7cff616','url':'levels/Cheerful Bliss/lead/b6_4.ogg'},{'revision':'8f8c2025dc8cefefb6537bfb748e1e2f','url':'levels/Cheerful Bliss/lead/b6_6.mp3'},{'revision':'a0d8c4cf886b2fed74259c32853bfe62','url':'levels/Cheerful Bliss/lead/b6_6.ogg'},{'revision':'df6d0b546b07459e39767e292a67abb2','url':'levels/Cheerful Bliss/lead/c_2.mp3'},{'revision':'7dfed1d9764492a5f71439d67ba22c24','url':'levels/Cheerful Bliss/lead/c_2.ogg'},{'revision':'809293fd97f05e58f06cd3e7de9a2a4f','url':'levels/Cheerful Bliss/lead/c_4.mp3'},{'revision':'a1b93f86f6682154f081af23f98d33a5','url':'levels/Cheerful Bliss/lead/c_4.ogg'},{'revision':'63ffa554895814c450c5c4513c19250c','url':'levels/Cheerful Bliss/lead/c_6.mp3'},{'revision':'dcab39c62537f34bc4282b4e8a238eeb','url':'levels/Cheerful Bliss/lead/c_6.ogg'},{'revision':'6e7d694f878d7f90a0c55579d5b42823','url':'levels/Cheerful Bliss/lead/d_2.mp3'},{'revision':'2a51ae64766eaa1e43a2e9a05b20b923','url':'levels/Cheerful Bliss/lead/d_2.ogg'},{'revision':'af176d7970fe89894457e56b8377b486','url':'levels/Cheerful Bliss/lead/d_4.mp3'},{'revision':'4975d6a7b1ae3a4d3a33412ec0815ff9','url':'levels/Cheerful Bliss/lead/d_4.ogg'},{'revision':'ff1012e336faf048d004f2a4db8f29ca','url':'levels/Cheerful Bliss/lead/e_12.mp3'},{'revision':'58bcd985eddc7fa0ed9ce6775b40a983','url':'levels/Cheerful Bliss/lead/e_12.ogg'},{'revision':'052a13398dc53d967655f8dcae144acd','url':'levels/Cheerful Bliss/lead/e_2.mp3'},{'revision':'67d2884e9b196bc12e086cb1a5721c74','url':'levels/Cheerful Bliss/lead/e_2.ogg'},{'revision':'5e93adb0bc5e478200a52405d9063f99','url':'levels/Cheerful Bliss/lead/e_4.mp3'},{'revision':'b49c04c46c92dbf9f2974123f9a71fc8','url':'levels/Cheerful Bliss/lead/e_4.ogg'},{'revision':'2e1bf32e93a601d4b62c423b0835db0b','url':'levels/Cheerful Bliss/lead/f_6.mp3'},{'revision':'e5817ae87828e55f1daf478df329f5dd','url':'levels/Cheerful Bliss/lead/f_6.ogg'},{'revision':'f61c321f455e9bec4cd0e2afdf5c9a7d','url':'levels/Cheerful Bliss/lead/g_6.mp3'},{'revision':'f4b374b721a3d74a77ddb2d57b823d69','url':'levels/Cheerful Bliss/lead/g_6.ogg'},{'revision':'c621e5ba2693fd0cd39ffd9cbabe6f7b','url':'levels/Cheerful Bliss/lead/loop115.mp3'},{'revision':'eca66f02ad758df9a5f2594227956424','url':'levels/Cheerful Bliss/lead/loop115.ogg'},{'revision':'1ee9d000c1713e1a0f55cfc3b4f09c82','url':'levels/Cheerful Bliss/lead/loop130.mp3'},{'revision':'5a3a87524351a8016154631fc59467c0','url':'levels/Cheerful Bliss/lead/loop130.ogg'},{'revision':'5a0c9a26ffc0123a0f588aad444e83d3','url':'levels/Cheerful Bliss/lead/loop90.mp3'},{'revision':'3b8cb9f03ce82ec6b6974b076f3cb4fa','url':'levels/Cheerful Bliss/lead/loop90.ogg'},{'revision':'8c382d7ff3e652d67252ea30e7494b52','url':'levels/Slow Elegance/background.png'},{'revision':'263fdca45506cd893c2a59adf4b8fda0','url':'levels/Slow Elegance/bass/dSharp_2.mp3'},{'revision':'056c74631114c05f31a873d4716b8333','url':'levels/Slow Elegance/bass/dSharp_2.ogg'},{'revision':'959f3f9dd2e6a664300a3684ce67a672','url':'levels/Slow Elegance/bass/dSharp_6.mp3'},{'revision':'665c119a6ba5012b710a4b52d2cfc433','url':'levels/Slow Elegance/bass/dSharp_6.ogg'},{'revision':'d942250f0491bae39a8772a7ea2faf52','url':'levels/Slow Elegance/bass/f_2.mp3'},{'revision':'4a90c6f02c3d01d6327680544cfdf3b5','url':'levels/Slow Elegance/bass/f_2.ogg'},{'revision':'7531a7889b3de400114d460684635875','url':'levels/Slow Elegance/bass/f_6.mp3'},{'revision':'f52e75cd172c482e85f97eb4d20b4c3d','url':'levels/Slow Elegance/bass/f_6.ogg'},{'revision':'a97c559f988cc6e391c87eeb1f17988b','url':'levels/Slow Elegance/bass/gSharp_2.mp3'},{'revision':'f9597565917ec75a91e4f7e7fe108b2b','url':'levels/Slow Elegance/bass/gSharp_2.ogg'},{'revision':'c640b53e05e666be146deb3f19f2b713','url':'levels/Slow Elegance/bass/gSharp_6.mp3'},{'revision':'f75905f2127540f69d66976fb8759f03','url':'levels/Slow Elegance/bass/gSharp_6.ogg'},{'revision':'b1e823a4968a7f9be031015ff51ea5f4','url':'levels/Slow Elegance/bass/loop115.mp3'},{'revision':'c63620e89c687f3e7bf63a125c550cd5','url':'levels/Slow Elegance/bass/loop115.ogg'},{'revision':'34bdeb5045241299fab2eb7c8209d19d','url':'levels/Slow Elegance/bass/loop130.mp3'},{'revision':'7ab5e763e4728a99a87fa82f4badedea','url':'levels/Slow Elegance/bass/loop130.ogg'},{'revision':'bed8aa967ecc817e712e9a6777e45d88','url':'levels/Slow Elegance/bass/loop90.mp3'},{'revision':'e6e80a470e78fe57858f952b4ff7b253','url':'levels/Slow Elegance/bass/loop90.ogg'},{'revision':'dc59995bd5d441f28b18050f648808f9','url':'levels/Slow Elegance/chords/chord1.mp3'},{'revision':'a8c517a8030e657c7fabdd9767a53223','url':'levels/Slow Elegance/chords/chord1.ogg'},{'revision':'cd1eeca7de2b38576026a353dce22eae','url':'levels/Slow Elegance/chords/chord278.mp3'},{'revision':'7b9bfd7dd90baeb491dfb5cadb3fc53b','url':'levels/Slow Elegance/chords/chord278.ogg'},{'revision':'56caa6a586dbc8eda78d5187b8ebe85f','url':'levels/Slow Elegance/chords/chord3.mp3'},{'revision':'0e05b1d77a7f74bb6f0edfbfe0ffa6c2','url':'levels/Slow Elegance/chords/chord3.ogg'},{'revision':'fa8c1e7b1e7f5ccee3e9ee55b2d18f09','url':'levels/Slow Elegance/chords/chord4.mp3'},{'revision':'be2262ae377c935d4a9ccc6afe323e66','url':'levels/Slow Elegance/chords/chord4.ogg'},{'revision':'4a513d34a3086fa4af9b0439435db7c6','url':'levels/Slow Elegance/chords/chord5.mp3'},{'revision':'05830c1990ebbd467a135ce603621503','url':'levels/Slow Elegance/chords/chord5.ogg'},{'revision':'f571033f6754caa33d53354c0c898c5e','url':'levels/Slow Elegance/chords/chord6.mp3'},{'revision':'499a575af7a1227d3d35dede48d26591','url':'levels/Slow Elegance/chords/chord6.ogg'},{'revision':'56c06d60f43f09ff77ac674edacfa009','url':'levels/Slow Elegance/chords/loop115.mp3'},{'revision':'3b6df5720bfaa4b41a6fdfeff971aad7','url':'levels/Slow Elegance/chords/loop115.ogg'},{'revision':'d7932d627704a3cdbdf6cad41d612fbe','url':'levels/Slow Elegance/chords/loop130.mp3'},{'revision':'25c215e8b2fc4e54e071f26b61f2932e','url':'levels/Slow Elegance/chords/loop130.ogg'},{'revision':'835d6c93f9dcd15f2e89bc6ad6531e57','url':'levels/Slow Elegance/chords/loop90.mp3'},{'revision':'38b3bbfbebaf9fa2dd9d6b5035fa3dfb','url':'levels/Slow Elegance/chords/loop90.ogg'},{'revision':'19a416f119fc4d1e9fc1617b2c9d43d3','url':'levels/Slow Elegance/drums/loop115.mp3'},{'revision':'39bcea003867cebf677e07ea42965d1f','url':'levels/Slow Elegance/drums/loop115.ogg'},{'revision':'cfd6f2ec9e40b992dbf8d0f8b7b22bf2','url':'levels/Slow Elegance/drums/loop130.mp3'},{'revision':'7043d3c3409a1cdaf58346e41854156e','url':'levels/Slow Elegance/drums/loop130.ogg'},{'revision':'0d527cbb3ac33567d1d0c7ffcf2c7cec','url':'levels/Slow Elegance/drums/loop90.mp3'},{'revision':'810d6336f63471aa63aa9e774cf16393','url':'levels/Slow Elegance/drums/loop90.ogg'},{'revision':'8507c62fa3071335f15501d1530d2fb2','url':'levels/Slow Elegance/info.json'},{'revision':'1790fd16d017ca50bbd799106205a5d9','url':'levels/Slow Elegance/lead/dSharp.mp3'},{'revision':'6c943b72c3132a9ea2b7511b5a37244f','url':'levels/Slow Elegance/lead/dSharp.ogg'},{'revision':'1cf4aed2ec880a146b0e579c075a035a','url':'levels/Slow Elegance/lead/f.mp3'},{'revision':'505fa45b1cd9a78f466c163ec827213c','url':'levels/Slow Elegance/lead/f.ogg'},{'revision':'ae556f20c2499c9e5129a518e12b1727','url':'levels/Slow Elegance/lead/gSharp.mp3'},{'revision':'bd4d127d96d4b5ac0f8ed53e7e1edbb8','url':'levels/Slow Elegance/lead/gSharp.ogg'},{'revision':'ba534b724ba47282338f93f372558673','url':'levels/Slow Elegance/lead/loop115.mp3'},{'revision':'4a9850fa003d9b9421f85c441f103003','url':'levels/Slow Elegance/lead/loop115.ogg'},{'revision':'fa6535f2f6d488ce501d285fabd7da61','url':'levels/Slow Elegance/lead/loop130.mp3'},{'revision':'8fd04ba9b3754b56e0ff82bad227fa8e','url':'levels/Slow Elegance/lead/loop130.ogg'},{'revision':'6603cce48d0fb6876f7ad456546dd0b0','url':'levels/Slow Elegance/lead/loop90.mp3'},{'revision':'397dcccb47b07ee0f8951c52f72ba75b','url':'levels/Slow Elegance/lead/loop90.ogg'},{'revision':'869fd552b0e41b4d94851e6d1e319a8a','url':'levels/list.json'},{'revision':null,'url':'main.6f0758792536e9441643.bundle.js'},{'revision':'eefa45f41147cedadc0700b2322d241d','url':'manifest.json'},{'revision':'caecf0a6f4811ca5d516b869077f0348','url':'models/wasm/vision_wasm_internal.js'},{'revision':'f6d409524b3f0fcfbb23c525af4d8b9e','url':'models/wasm/vision_wasm_nosimd_internal.js'},{'revision':null,'url':'vendors.10ca8e881e09faa4d661.bundle.js'},{'revision':'bd5b234274f46d53c26c6a2587d17163','url':'vendors.10ca8e881e09faa4d661.bundle.js.LICENSE.txt'}],_().precache(L),function(t){const s=_();!function(t,s,a){let n;if("string"==typeof t){const e=new URL(t,location.href);n=new v((({url:t})=>t.href===e.href),s,a)}else if(t instanceof RegExp)n=new C(t,s,a);else if("function"==typeof t)n=new v(t,s,a);else{if(!(t instanceof v))throw new e("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});n=t}(q||(q=new b,q.addFetchListener(),q.addCacheListener()),q).registerRoute(n)}(new U(s,t))}(undefined)})()})(); \ No newline at end of file