mc-shell 0.6.3__tar.gz → 0.6.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (202) hide show
  1. {mc_shell-0.6.3 → mc_shell-0.6.5}/PKG-INFO +3 -2
  2. {mc_shell-0.6.3 → mc_shell-0.6.5}/mcshell/Vec3.py +5 -0
  3. {mc_shell-0.6.3 → mc_shell-0.6.5}/mcshell/__init__.py +5 -0
  4. {mc_shell-0.6.3 → mc_shell-0.6.5}/mcshell/constants.py +5 -4
  5. mc_shell-0.6.5/mcshell/data/app/control.b03e9afc.js +2 -0
  6. mc_shell-0.6.5/mcshell/data/app/control.b03e9afc.js.map +1 -0
  7. {mc_shell-0.6.3 → mc_shell-0.6.5}/mcshell/data/app/control.html +2 -2
  8. {mc_shell-0.6.3 → mc_shell-0.6.5}/mcshell/data/app/index.html +2 -2
  9. mc_shell-0.6.5/mcshell/data/app/mced.a4de160c.js +4 -0
  10. mc_shell-0.6.5/mcshell/data/app/mced.a4de160c.js.map +1 -0
  11. mc_shell-0.6.5/mcshell/data/app/mced.c71c0778.js +368 -0
  12. mc_shell-0.6.5/mcshell/data/app/mced.c71c0778.js.map +1 -0
  13. mc_shell-0.6.3/mcshell/data/app/toolbox.e4c2b296.xml → mc_shell-0.6.5/mcshell/data/app/toolbox.f17a15a5.xml +59 -15
  14. {mc_shell-0.6.3 → mc_shell-0.6.5}/mcshell/data/doc/command_docs.pkl +0 -0
  15. {mc_shell-0.6.3 → mc_shell-0.6.5}/mcshell/data/materials/colourables.json +145 -145
  16. mc_shell-0.6.5/mcshell/data/materials/materials.pkl +0 -0
  17. {mc_shell-0.6.3 → mc_shell-0.6.5}/mcshell/data/materials/pickers.json +159 -159
  18. {mc_shell-0.6.3 → mc_shell-0.6.5}/mcshell/data/materials/singles.json +111 -1
  19. mc_shell-0.6.5/mcshell/data/paper-global-template.yaml +153 -0
  20. mc_shell-0.6.5/mcshell/data/powers/stdlib.json +12998 -0
  21. mc_shell-0.6.5/mcshell/data/webpage-cache/%3F.pkl +0 -0
  22. mc_shell-0.6.5/mcshell/data/webpage-cache/Commands.pkl +0 -0
  23. {mc_shell-0.6.3/mcshell/data → mc_shell-0.6.5/mcshell/data/webpage-cache}/EntityType.java.pkl +0 -0
  24. {mc_shell-0.6.3/mcshell/data → mc_shell-0.6.5/mcshell/data/webpage-cache}/Material.html.pkl +0 -0
  25. mc_shell-0.6.5/mcshell/data/webpage-cache/ability.pkl +0 -0
  26. mc_shell-0.6.5/mcshell/data/webpage-cache/advancement.pkl +0 -0
  27. mc_shell-0.6.5/mcshell/data/webpage-cache/alwaysday.pkl +0 -0
  28. mc_shell-0.6.5/mcshell/data/webpage-cache/attribute.pkl +0 -0
  29. mc_shell-0.6.5/mcshell/data/webpage-cache/ban-ip.pkl +0 -0
  30. mc_shell-0.6.5/mcshell/data/webpage-cache/ban.pkl +0 -0
  31. mc_shell-0.6.5/mcshell/data/webpage-cache/banlist.pkl +0 -0
  32. mc_shell-0.6.5/mcshell/data/webpage-cache/bossbar.pkl +0 -0
  33. mc_shell-0.6.5/mcshell/data/webpage-cache/camera.pkl +0 -0
  34. mc_shell-0.6.5/mcshell/data/webpage-cache/camerashake.pkl +0 -0
  35. mc_shell-0.6.5/mcshell/data/webpage-cache/changesetting.pkl +0 -0
  36. mc_shell-0.6.5/mcshell/data/webpage-cache/clear.pkl +0 -0
  37. mc_shell-0.6.5/mcshell/data/webpage-cache/clearspawnpoint.pkl +0 -0
  38. mc_shell-0.6.5/mcshell/data/webpage-cache/clone.pkl +0 -0
  39. mc_shell-0.6.5/mcshell/data/webpage-cache/connect.pkl +0 -0
  40. mc_shell-0.6.5/mcshell/data/webpage-cache/damage.pkl +0 -0
  41. mc_shell-0.6.5/mcshell/data/webpage-cache/data.pkl +0 -0
  42. mc_shell-0.6.5/mcshell/data/webpage-cache/datapack.pkl +0 -0
  43. mc_shell-0.6.5/mcshell/data/webpage-cache/daylock.pkl +0 -0
  44. mc_shell-0.6.5/mcshell/data/webpage-cache/debug.pkl +0 -0
  45. mc_shell-0.6.5/mcshell/data/webpage-cache/dedicatedwsserver.pkl +0 -0
  46. mc_shell-0.6.5/mcshell/data/webpage-cache/defaultgamemode.pkl +0 -0
  47. mc_shell-0.6.5/mcshell/data/webpage-cache/deop.pkl +0 -0
  48. mc_shell-0.6.5/mcshell/data/webpage-cache/dialogue.pkl +0 -0
  49. mc_shell-0.6.5/mcshell/data/webpage-cache/difficulty.pkl +0 -0
  50. mc_shell-0.6.5/mcshell/data/webpage-cache/effect.pkl +0 -0
  51. mc_shell-0.6.5/mcshell/data/webpage-cache/enchant.pkl +0 -0
  52. mc_shell-0.6.5/mcshell/data/webpage-cache/event.pkl +0 -0
  53. mc_shell-0.6.5/mcshell/data/webpage-cache/execute.pkl +0 -0
  54. mc_shell-0.6.5/mcshell/data/webpage-cache/experience.pkl +0 -0
  55. mc_shell-0.6.5/mcshell/data/webpage-cache/fill.pkl +0 -0
  56. mc_shell-0.6.5/mcshell/data/webpage-cache/fillbiome.pkl +0 -0
  57. mc_shell-0.6.5/mcshell/data/webpage-cache/fog.pkl +0 -0
  58. mc_shell-0.6.5/mcshell/data/webpage-cache/forceload.pkl +0 -0
  59. mc_shell-0.6.5/mcshell/data/webpage-cache/function.pkl +0 -0
  60. mc_shell-0.6.5/mcshell/data/webpage-cache/gamemode.pkl +0 -0
  61. mc_shell-0.6.5/mcshell/data/webpage-cache/gamerule.pkl +0 -0
  62. mc_shell-0.6.5/mcshell/data/webpage-cache/gametest.pkl +0 -0
  63. mc_shell-0.6.5/mcshell/data/webpage-cache/give.pkl +0 -0
  64. mc_shell-0.6.5/mcshell/data/webpage-cache/help.pkl +0 -0
  65. mc_shell-0.6.5/mcshell/data/webpage-cache/immutableworld.pkl +0 -0
  66. mc_shell-0.6.5/mcshell/data/webpage-cache/item.pkl +0 -0
  67. mc_shell-0.6.5/mcshell/data/webpage-cache/jfr.pkl +0 -0
  68. mc_shell-0.6.5/mcshell/data/webpage-cache/kick.pkl +0 -0
  69. mc_shell-0.6.5/mcshell/data/webpage-cache/kill.pkl +0 -0
  70. mc_shell-0.6.5/mcshell/data/webpage-cache/list.pkl +0 -0
  71. mc_shell-0.6.5/mcshell/data/webpage-cache/locate.pkl +0 -0
  72. mc_shell-0.6.5/mcshell/data/webpage-cache/loot.pkl +0 -0
  73. mc_shell-0.6.5/mcshell/data/webpage-cache/me.pkl +0 -0
  74. mc_shell-0.6.5/mcshell/data/webpage-cache/mobevent.pkl +0 -0
  75. mc_shell-0.6.5/mcshell/data/webpage-cache/msg.pkl +0 -0
  76. mc_shell-0.6.5/mcshell/data/webpage-cache/music.pkl +0 -0
  77. mc_shell-0.6.5/mcshell/data/webpage-cache/op.pkl +0 -0
  78. mc_shell-0.6.5/mcshell/data/webpage-cache/ops.pkl +0 -0
  79. mc_shell-0.6.5/mcshell/data/webpage-cache/pardon-ip.pkl +0 -0
  80. mc_shell-0.6.5/mcshell/data/webpage-cache/pardon.pkl +0 -0
  81. mc_shell-0.6.5/mcshell/data/webpage-cache/particle.pkl +0 -0
  82. mc_shell-0.6.5/mcshell/data/webpage-cache/perf.pkl +0 -0
  83. mc_shell-0.6.5/mcshell/data/webpage-cache/permission.pkl +0 -0
  84. mc_shell-0.6.5/mcshell/data/webpage-cache/place_(Java_Edition).pkl +0 -0
  85. mc_shell-0.6.5/mcshell/data/webpage-cache/playanimation.pkl +0 -0
  86. mc_shell-0.6.5/mcshell/data/webpage-cache/playsound.pkl +0 -0
  87. mc_shell-0.6.5/mcshell/data/webpage-cache/publish.pkl +0 -0
  88. mc_shell-0.6.5/mcshell/data/webpage-cache/random.pkl +0 -0
  89. mc_shell-0.6.5/mcshell/data/webpage-cache/recipe.pkl +0 -0
  90. mc_shell-0.6.5/mcshell/data/webpage-cache/reload.pkl +0 -0
  91. mc_shell-0.6.5/mcshell/data/webpage-cache/remove.pkl +0 -0
  92. mc_shell-0.6.5/mcshell/data/webpage-cache/replaceitem.pkl +0 -0
  93. mc_shell-0.6.5/mcshell/data/webpage-cache/return.pkl +0 -0
  94. mc_shell-0.6.5/mcshell/data/webpage-cache/ride.pkl +0 -0
  95. mc_shell-0.6.5/mcshell/data/webpage-cache/save-all.pkl +0 -0
  96. mc_shell-0.6.5/mcshell/data/webpage-cache/save-off.pkl +0 -0
  97. mc_shell-0.6.5/mcshell/data/webpage-cache/save-on.pkl +0 -0
  98. mc_shell-0.6.5/mcshell/data/webpage-cache/save.pkl +0 -0
  99. mc_shell-0.6.5/mcshell/data/webpage-cache/say.pkl +0 -0
  100. mc_shell-0.6.5/mcshell/data/webpage-cache/schedule.pkl +0 -0
  101. mc_shell-0.6.5/mcshell/data/webpage-cache/scoreboard.pkl +0 -0
  102. mc_shell-0.6.5/mcshell/data/webpage-cache/script.pkl +0 -0
  103. mc_shell-0.6.5/mcshell/data/webpage-cache/scriptevent.pkl +0 -0
  104. mc_shell-0.6.5/mcshell/data/webpage-cache/seed.pkl +0 -0
  105. mc_shell-0.6.5/mcshell/data/webpage-cache/setblock.pkl +0 -0
  106. mc_shell-0.6.5/mcshell/data/webpage-cache/setidletimeout.pkl +0 -0
  107. mc_shell-0.6.5/mcshell/data/webpage-cache/setmaxplayers.pkl +0 -0
  108. mc_shell-0.6.5/mcshell/data/webpage-cache/setworldspawn.pkl +0 -0
  109. mc_shell-0.6.5/mcshell/data/webpage-cache/spawnpoint.pkl +0 -0
  110. mc_shell-0.6.5/mcshell/data/webpage-cache/spectate.pkl +0 -0
  111. mc_shell-0.6.5/mcshell/data/webpage-cache/spreadplayers.pkl +0 -0
  112. mc_shell-0.6.5/mcshell/data/webpage-cache/stop.pkl +0 -0
  113. mc_shell-0.6.5/mcshell/data/webpage-cache/stopsound.pkl +0 -0
  114. mc_shell-0.6.5/mcshell/data/webpage-cache/structure.pkl +0 -0
  115. mc_shell-0.6.5/mcshell/data/webpage-cache/summon.pkl +0 -0
  116. mc_shell-0.6.5/mcshell/data/webpage-cache/tag.pkl +0 -0
  117. mc_shell-0.6.5/mcshell/data/webpage-cache/team.pkl +0 -0
  118. mc_shell-0.6.5/mcshell/data/webpage-cache/teammsg.pkl +0 -0
  119. mc_shell-0.6.5/mcshell/data/webpage-cache/teleport.pkl +0 -0
  120. mc_shell-0.6.5/mcshell/data/webpage-cache/tell.pkl +0 -0
  121. mc_shell-0.6.5/mcshell/data/webpage-cache/tellraw.pkl +0 -0
  122. mc_shell-0.6.5/mcshell/data/webpage-cache/testfor.pkl +0 -0
  123. mc_shell-0.6.5/mcshell/data/webpage-cache/testforblock.pkl +0 -0
  124. mc_shell-0.6.5/mcshell/data/webpage-cache/testforblocks.pkl +0 -0
  125. mc_shell-0.6.5/mcshell/data/webpage-cache/tickingarea.pkl +0 -0
  126. mc_shell-0.6.5/mcshell/data/webpage-cache/time.pkl +0 -0
  127. mc_shell-0.6.5/mcshell/data/webpage-cache/title.pkl +0 -0
  128. mc_shell-0.6.5/mcshell/data/webpage-cache/titleraw.pkl +0 -0
  129. mc_shell-0.6.5/mcshell/data/webpage-cache/tm.pkl +0 -0
  130. mc_shell-0.6.5/mcshell/data/webpage-cache/toggledownfall.pkl +0 -0
  131. mc_shell-0.6.5/mcshell/data/webpage-cache/tp.pkl +0 -0
  132. mc_shell-0.6.5/mcshell/data/webpage-cache/transferserver.pkl +0 -0
  133. mc_shell-0.6.5/mcshell/data/webpage-cache/trigger.pkl +0 -0
  134. mc_shell-0.6.5/mcshell/data/webpage-cache/volumearea.pkl +0 -0
  135. mc_shell-0.6.5/mcshell/data/webpage-cache/w.pkl +0 -0
  136. mc_shell-0.6.5/mcshell/data/webpage-cache/wb.pkl +0 -0
  137. mc_shell-0.6.5/mcshell/data/webpage-cache/weather.pkl +0 -0
  138. mc_shell-0.6.5/mcshell/data/webpage-cache/whitelist.pkl +0 -0
  139. mc_shell-0.6.5/mcshell/data/webpage-cache/worldborder.pkl +0 -0
  140. mc_shell-0.6.5/mcshell/data/webpage-cache/worldbuilder.pkl +0 -0
  141. mc_shell-0.6.5/mcshell/data/webpage-cache/wsserver.pkl +0 -0
  142. mc_shell-0.6.5/mcshell/data/webpage-cache/xp.pkl +0 -0
  143. mc_shell-0.6.5/mcshell/mcactions.py +434 -0
  144. mc_shell-0.6.5/mcshell/mcactions_base.py +309 -0
  145. {mc_shell-0.6.3 → mc_shell-0.6.5}/mcshell/mcblockly.py +32 -5
  146. {mc_shell-0.6.3 → mc_shell-0.6.5}/mcshell/mcclient.py +4 -0
  147. mc_shell-0.6.5/mcshell/mceventactions.py +64 -0
  148. {mc_shell-0.6.3 → mc_shell-0.6.5}/mcshell/mcplayer.py +45 -14
  149. mc_shell-0.6.5/mcshell/mcscraper.py +238 -0
  150. {mc_shell-0.6.3 → mc_shell-0.6.5}/mcshell/ppmanager.py +15 -15
  151. mc_shell-0.6.5/mcshell/pyncactions.py +254 -0
  152. mc_shell-0.6.5/mcshell/serveractions.py +204 -0
  153. {mc_shell-0.6.3 → mc_shell-0.6.5}/pyproject.toml +2 -2
  154. mc_shell-0.6.3/mcshell/data/app/control.56151c5e.js +0 -2
  155. mc_shell-0.6.3/mcshell/data/app/control.56151c5e.js.map +0 -1
  156. mc_shell-0.6.3/mcshell/data/app/mced.0b09cd54.js +0 -413
  157. mc_shell-0.6.3/mcshell/data/app/mced.0b09cd54.js.map +0 -1
  158. mc_shell-0.6.3/mcshell/data/app/mced.129f97f9.js +0 -4
  159. mc_shell-0.6.3/mcshell/data/app/mced.129f97f9.js.map +0 -1
  160. mc_shell-0.6.3/mcshell/data/materials/materials.pkl +0 -0
  161. mc_shell-0.6.3/mcshell/data/powers/stdlib.json +0 -0
  162. mc_shell-0.6.3/mcshell/mcactions.py +0 -684
  163. mc_shell-0.6.3/mcshell/mcscraper.py +0 -128
  164. {mc_shell-0.6.3 → mc_shell-0.6.5}/LICENSE +0 -0
  165. {mc_shell-0.6.3 → mc_shell-0.6.5}/README.md +0 -0
  166. {mc_shell-0.6.3 → mc_shell-0.6.5}/mcshell/Matrix3.py +0 -0
  167. {mc_shell-0.6.3 → mc_shell-0.6.5}/mcshell/blueprints/control_api.py +0 -0
  168. {mc_shell-0.6.3 → mc_shell-0.6.5}/mcshell/blueprints/ipython_api.py +0 -0
  169. {mc_shell-0.6.3 → mc_shell-0.6.5}/mcshell/blueprints/powers_api.py +0 -0
  170. {mc_shell-0.6.3 → mc_shell-0.6.5}/mcshell/data/FruitJuice-0.3.0.jar +0 -0
  171. {mc_shell-0.6.3 → mc_shell-0.6.5}/mcshell/data/FruitJuice-0.4.0.jar +0 -0
  172. {mc_shell-0.6.3 → mc_shell-0.6.5}/mcshell/data/FruitJuice-0.4.1.jar +0 -0
  173. {mc_shell-0.6.3 → mc_shell-0.6.5}/mcshell/data/app/control.a8439284.css +0 -0
  174. {mc_shell-0.6.3 → mc_shell-0.6.5}/mcshell/data/app/control.a8439284.css.map +0 -0
  175. {mc_shell-0.6.3 → mc_shell-0.6.5}/mcshell/data/app/mced.9b908af4.css +0 -0
  176. {mc_shell-0.6.3 → mc_shell-0.6.5}/mcshell/data/app/mced.9b908af4.css.map +0 -0
  177. {mc_shell-0.6.3 → mc_shell-0.6.5}/mcshell/data/app/mced.b6ed8b22.css +0 -0
  178. {mc_shell-0.6.3 → mc_shell-0.6.5}/mcshell/data/app/mced.b6ed8b22.css.map +0 -0
  179. {mc_shell-0.6.3 → mc_shell-0.6.5}/mcshell/data/control_layout.json +0 -0
  180. {mc_shell-0.6.3 → mc_shell-0.6.5}/mcshell/data/entities/entity_id_map.pkl +0 -0
  181. {mc_shell-0.6.3 → mc_shell-0.6.5}/mcshell/data/entities/generate_entity_blocks.mjs +0 -0
  182. {mc_shell-0.6.3 → mc_shell-0.6.5}/mcshell/data/entities/pickers.json +0 -0
  183. {mc_shell-0.6.3 → mc_shell-0.6.5}/mcshell/data/materials/generate_material_blocks.mjs +0 -0
  184. {mc_shell-0.6.3 → mc_shell-0.6.5}/mcshell/data/materials/mcblocks.csv +0 -0
  185. {mc_shell-0.6.3 → mc_shell-0.6.5}/mcshell/data/toolbox_template.xml +0 -0
  186. {mc_shell-0.6.3 → mc_shell-0.6.5}/mcshell/mclsystem.py +0 -0
  187. {mc_shell-0.6.3 → mc_shell-0.6.5}/mcshell/mcrepo.py +0 -0
  188. {mc_shell-0.6.3 → mc_shell-0.6.5}/mcshell/mcserver.py +0 -0
  189. {mc_shell-0.6.3 → mc_shell-0.6.5}/mcshell/mcshell.py +0 -0
  190. {mc_shell-0.6.3 → mc_shell-0.6.5}/mcshell/mcturtle.py +0 -0
  191. {mc_shell-0.6.3 → mc_shell-0.6.5}/mcshell/mcvoxel.py +0 -0
  192. {mc_shell-0.6.3 → mc_shell-0.6.5}/mcshell/mcvoxel_original.py +0 -0
  193. {mc_shell-0.6.3 → mc_shell-0.6.5}/mcshell/ppdownloader.py +0 -0
  194. {mc_shell-0.6.3 → mc_shell-0.6.5}/mcshell/vendored/pyncraft/__init__.py +0 -0
  195. {mc_shell-0.6.3 → mc_shell-0.6.5}/mcshell/vendored/pyncraft/block.py +0 -0
  196. {mc_shell-0.6.3 → mc_shell-0.6.5}/mcshell/vendored/pyncraft/connection.py +0 -0
  197. {mc_shell-0.6.3 → mc_shell-0.6.5}/mcshell/vendored/pyncraft/entity.py +0 -0
  198. {mc_shell-0.6.3 → mc_shell-0.6.5}/mcshell/vendored/pyncraft/event.py +0 -0
  199. {mc_shell-0.6.3 → mc_shell-0.6.5}/mcshell/vendored/pyncraft/logger.py +0 -0
  200. {mc_shell-0.6.3 → mc_shell-0.6.5}/mcshell/vendored/pyncraft/minecraft.py +0 -0
  201. {mc_shell-0.6.3 → mc_shell-0.6.5}/mcshell/vendored/pyncraft/util.py +0 -0
  202. {mc_shell-0.6.3 → mc_shell-0.6.5}/mcshell/vendored/pyncraft/vec3.py +0 -0
@@ -1,9 +1,10 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mc-shell
3
- Version: 0.6.3
3
+ Version: 0.6.5
4
4
  Summary: An interactive shell and editor for controlling Minecraft servers and creating powers.
5
5
  License-File: LICENSE
6
- Author: jeff@thinkae.org
6
+ Author: Jeff
7
+ Author-email: jeff@thinkae.org
7
8
  Requires-Python: >=3.9,<4.0
8
9
  Classifier: Programming Language :: Python :: 3
9
10
  Classifier: Programming Language :: Python :: 3.9
@@ -12,6 +12,11 @@ class Vec3:
12
12
  self.y = 0.0
13
13
  self.z = 0.0
14
14
 
15
+ def __eq__(self, other):
16
+ if self.x == other.x and self.y == other.y and self.z == other.z:
17
+ return True
18
+ return False
19
+
15
20
  def __repr__(self):
16
21
  return f"Vec3({self.x}, {self.y}, {self.z})"
17
22
 
@@ -179,6 +179,7 @@ class MCShell(Magics):
179
179
  "motd": f"MC-ED World: {world_name}",
180
180
  "enable-rcon": "true",
181
181
  "server-port": self.server_data.get('port', MC_SERVER_PORT),
182
+ "query.port": self.server_data.get('port', MC_SERVER_PORT),
182
183
  "rcon.port": self.server_data.get('rcon_port', MC_RCON_PORT),
183
184
  "rcon.password": self.server_data.get('password', 'minecraft'),
184
185
  "enable-command-block":'true',
@@ -258,6 +259,10 @@ class MCShell(Magics):
258
259
  # Start the Paper server
259
260
  self.active_paper_server = PaperServerManager(world_name, world_directory)
260
261
  self.active_paper_server.start()
262
+ # now start it after files are generated and it is terminated once
263
+ if not self.active_paper_server.is_alive():
264
+ self.active_paper_server = PaperServerManager(world_name, world_directory)
265
+ self.active_paper_server.start()
261
266
 
262
267
  if not self.active_paper_server.is_alive():
263
268
  print("Could not start Paper server. Aborting.")
@@ -47,10 +47,10 @@ try:
47
47
  except ImportError: # Graceful fallback if IceCream isn't installed.
48
48
  ic = lambda *a: None if not a else (a[0] if len(a) == 1 else a) # noqa
49
49
 
50
- # default server data
51
-
52
- MC_VERSION = '1.21.4' # this must match the client version
50
+ # the default version when using %pp_create_world
51
+ MC_VERSION = '1.21.11' # this must match the client version
53
52
 
53
+ # default server data
54
54
  MC_SERVER_HOST = 'localhost'
55
55
  MC_RCON_PORT = 25575
56
56
  MC_SERVER_PORT = 25565
@@ -66,9 +66,10 @@ MC_SERVER_DATA = {
66
66
  }
67
67
 
68
68
  MC_DATA_DIR = pathlib.Path(__file__).parent.joinpath('data')
69
-
69
+ MC_PAPER_GLOBAL_TEMPLATE = MC_DATA_DIR / 'paper-global-template.yaml'
70
70
  FJ_JAR_PATH = MC_DATA_DIR.joinpath('FruitJuice-0.4.1.jar')
71
71
 
72
+ MC_WEBPAGE_CACHE = MC_DATA_DIR.joinpath('webpage-cache')
72
73
  MC_DOC_URL = yarl.URL("https://minecraft.fandom.com/wiki/Commands")
73
74
  MC_DOC_DIR = MC_DATA_DIR.joinpath('doc')
74
75
  MC_DOC_PATH = MC_DOC_DIR.joinpath('command_docs.pkl')
@@ -0,0 +1,2 @@
1
+ let t,e,n;import"./mced.a4de160c.js";function o(t,e,n,o){Object.defineProperty(t,e,{get:n,set:o,enumerable:!0,configurable:!0})}var r,i,s=globalThis,a={},l={},c=s.parcelRequirea483;null==c&&((c=function(t){if(t in a)return a[t].exports;if(t in l){var e=l[t];delete l[t];var n={id:t,exports:{}};return a[t]=n,e.call(n.exports,n,n.exports),n.exports}var o=Error("Cannot find module '"+t+"'");throw o.code="MODULE_NOT_FOUND",o}).register=function(t,e){l[t]=e},s.parcelRequirea483=c),c.register;var h=c("hKdZU");function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,o)}return n}function d(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach(function(e){var o,r,i;o=t,r=e,i=n[e],r in o?Object.defineProperty(o,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):o[r]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function p(t){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function f(){return(f=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t}).apply(this,arguments)}function g(t){if("u">typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var m=g(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),v=g(/Edge/i),y=g(/firefox/i),b=g(/safari/i)&&!g(/chrome/i)&&!g(/android/i),w=g(/iP(ad|od|hone)/i),_=g(/chrome/i)&&g(/android/i),E={capture:!1,passive:!1};function S(t,e,n){t.addEventListener(e,n,!m&&E)}function k(t,e,n){t.removeEventListener(e,n,!m&&E)}function T(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){}return!1}}function C(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function x(t,e,n,o){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&T(t,e):T(t,e))||o&&t===n)return t;if(t===n)break}while(t=C(t))}return null}var O=/\s+/g;function A(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(O," ").replace(" "+e+" "," ");t.className=(o+(n?" "+e:"")).replace(O," ")}}function D(t,e,n){var o=t&&t.style;if(o)if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];else e in o||-1!==e.indexOf("webkit")||(e="-webkit-"+e),o[e]=n+("string"==typeof n?"":"px")}function N(t,e){var n="";if("string"==typeof t)n=t;else do{var o=D(t,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!e&&(t=t.parentNode))var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(n)}function R(t,e,n){if(t){var o=t.getElementsByTagName(e),r=0,i=o.length;if(n)for(;r<i;r++)n(o[r],r);return o}return[]}function P(){var t=document.scrollingElement;return t||document.documentElement}function B(t,e,n,o,r){if(t.getBoundingClientRect||t===window){if(t!==window&&t.parentNode&&t!==P()?(s=(i=t.getBoundingClientRect()).top,a=i.left,l=i.bottom,c=i.right,h=i.height,u=i.width):(s=0,a=0,l=window.innerHeight,c=window.innerWidth,h=window.innerHeight,u=window.innerWidth),(e||n)&&t!==window&&(r=r||t.parentNode,!m))do if(r&&r.getBoundingClientRect&&("none"!==D(r,"transform")||n&&"static"!==D(r,"position"))){var i,s,a,l,c,h,u,d=r.getBoundingClientRect();s-=d.top+parseInt(D(r,"border-top-width")),a-=d.left+parseInt(D(r,"border-left-width")),l=s+i.height,c=a+i.width;break}while(r=r.parentNode)if(o&&t!==window){var p=N(r||t),f=p&&p.a,g=p&&p.d;p&&(s/=g,a/=f,u/=f,h/=g,l=s+h,c=a+u)}return{top:s,left:a,bottom:l,right:c,width:u,height:h}}}function I(t,e,n){for(var o=F(t,!0),r=B(t)[e];o;){var i=B(o)[n];if(!("top"===n||"left"===n?r>=i:r<=i))return o;if(o===P())break;o=F(o,!1)}return!1}function L(t,e,n,o){for(var r=0,i=0,s=t.children;i<s.length;){if("none"!==s[i].style.display&&s[i]!==tW.ghost&&(o||s[i]!==tW.dragged)&&x(s[i],n.draggable,t,!1)){if(r===e)return s[i];r++}i++}return null}function M(t,e){for(var n=t.lastElementChild;n&&(n===tW.ghost||"none"===D(n,"display")||e&&!T(n,e));)n=n.previousElementSibling;return n||null}function j(t,e){var n=0;if(!t||!t.parentNode)return -1;for(;t=t.previousElementSibling;)"TEMPLATE"!==t.nodeName.toUpperCase()&&t!==tW.clone&&(!e||T(t,e))&&n++;return n}function q(t){var e=0,n=0,o=P();if(t)do{var r=N(t),i=r.a,s=r.d;e+=t.scrollLeft*i,n+=t.scrollTop*s}while(t!==o&&(t=t.parentNode))return[e,n]}function F(t,e){if(!t||!t.getBoundingClientRect)return P();var n=t,o=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var r=D(n);if(n.clientWidth<n.scrollWidth&&("auto"==r.overflowX||"scroll"==r.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==r.overflowY||"scroll"==r.overflowY)){if(!n.getBoundingClientRect||n===document.body)return P();if(o||e)return n;o=!0}}while(n=n.parentNode)return P()}function Y(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}function U(t,e){return function(){if(!Z){var n=arguments;1===n.length?t.call(this,n[0]):t.apply(this,n),Z=setTimeout(function(){Z=void 0},e)}}}function X(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function H(t){var e=window.Polymer,n=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):n?n(t).clone(!0)[0]:t.cloneNode(!0)}function W(t,e,n){var o={};return Array.from(t.children).forEach(function(r){if(x(r,e.draggable,t,!1)&&!r.animated&&r!==n){var i,s,a,l,c=B(r);o.left=Math.min(null!=(i=o.left)?i:1/0,c.left),o.top=Math.min(null!=(s=o.top)?s:1/0,c.top),o.right=Math.max(null!=(a=o.right)?a:-1/0,c.right),o.bottom=Math.max(null!=(l=o.bottom)?l:-1/0,c.bottom)}}),o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}var V="Sortable"+new Date().getTime(),$=[],z={initializeByDefault:!0},K={mount:function(t){for(var e in z)!z.hasOwnProperty(e)||e in t||(t[e]=z[e]);$.forEach(function(e){if(e.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),$.push(t)},pluginEvent:function(t,e,n){var o=this;this.eventCanceled=!1,n.cancel=function(){o.eventCanceled=!0};var r=t+"Global";$.forEach(function(o){e[o.pluginName]&&(e[o.pluginName][r]&&e[o.pluginName][r](d({sortable:e},n)),e.options[o.pluginName]&&e[o.pluginName][t]&&e[o.pluginName][t](d({sortable:e},n)))})},initializePlugins:function(t,e,n,o){for(var r in $.forEach(function(o){var r=o.pluginName;if(t.options[r]||o.initializeByDefault){var i=new o(t,e,t.options);i.sortable=t,i.options=t.options,t[r]=i,f(n,i.defaults)}}),t.options)if(t.options.hasOwnProperty(r)){var i=this.modifyOption(t,r,t.options[r]);void 0!==i&&(t.options[r]=i)}},getEventProperties:function(t,e){var n={};return $.forEach(function(o){"function"==typeof o.eventProperties&&f(n,o.eventProperties.call(e[o.pluginName],t))}),n},modifyOption:function(t,e,n){var o;return $.forEach(function(r){t[r.pluginName]&&r.optionListeners&&"function"==typeof r.optionListeners[e]&&(o=r.optionListeners[e].call(t[r.pluginName],n))}),o}},J=["evt"],G=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.evt,r=function(t,e){if(null==t)return{};var n,o,r=function(t,e){if(null==t)return{};var n,o,r={},i=Object.keys(t);for(o=0;o<i.length;o++)n=i[o],e.indexOf(n)>=0||(r[n]=t[n]);return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(o=0;o<i.length;o++)n=i[o],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}(n,J);K.pluginEvent.bind(tW)(t,e,d({dragEl:tt,parentEl:te,ghostEl:tn,rootEl:to,nextEl:tr,lastDownEl:ti,cloneEl:ts,cloneHidden:ta,dragStarted:tw,putSortable:tp,activeSortable:tW.active,originalEvent:o,oldIndex:tl,oldDraggableIndex:th,newIndex:tc,newDraggableIndex:tu,hideGhostForTarget:tY,unhideGhostForTarget:tU,cloneNowHidden:function(){ta=!0},cloneNowShown:function(){ta=!1},dispatchSortableEvent:function(t){Q({sortable:e,name:t,originalEvent:o})}},r))};function Q(t){!function(t){var e=t.sortable,n=t.rootEl,o=t.name,r=t.targetEl,i=t.cloneEl,s=t.toEl,a=t.fromEl,l=t.oldIndex,c=t.newIndex,h=t.oldDraggableIndex,u=t.newDraggableIndex,p=t.originalEvent,f=t.putSortable,g=t.extraEventProperties;if(e=e||n&&n[V]){var y,b=e.options,w="on"+o.charAt(0).toUpperCase()+o.substr(1);!window.CustomEvent||m||v?(y=document.createEvent("Event")).initEvent(o,!0,!0):y=new CustomEvent(o,{bubbles:!0,cancelable:!0}),y.to=s||n,y.from=a||n,y.item=r||n,y.clone=i,y.oldIndex=l,y.newIndex=c,y.oldDraggableIndex=h,y.newDraggableIndex=u,y.originalEvent=p,y.pullMode=f?f.lastPutMode:void 0;var _=d(d({},g),K.getEventProperties(o,e));for(var E in _)y[E]=_[E];n&&n.dispatchEvent(y),b[w]&&b[w].call(e,y)}}(d({putSortable:tp,cloneEl:ts,targetEl:tt,rootEl:to,oldIndex:tl,oldDraggableIndex:th,newIndex:tc,newDraggableIndex:tu},t))}var Z,tt,te,tn,to,tr,ti,ts,ta,tl,tc,th,tu,td,tp,tf,tg,tm,tv,ty,tb,tw,t_,tE,tS,tk,tT=!1,tC=!1,tx=[],tO=!1,tA=!1,tD=[],tN=!1,tR=[],tP="u">typeof document,tB=v||m?"cssFloat":"float",tI=tP&&!_&&!w&&"draggable"in document.createElement("div"),tL=function(){if(tP){if(m)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),tM=function(t,e){var n=D(t),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),r=L(t,0,e),i=L(t,1,e),s=r&&D(r),a=i&&D(i),l=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+B(r).width,c=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+B(i).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&s.float&&"none"!==s.float){var h="left"===s.float?"left":"right";return i&&("both"===a.clear||a.clear===h)?"vertical":"horizontal"}return r&&("block"===s.display||"flex"===s.display||"table"===s.display||"grid"===s.display||l>=o&&"none"===n[tB]||i&&"none"===n[tB]&&l+c>o)?"vertical":"horizontal"},tj=function(t,e,n){var o=n?t.left:t.top,r=n?t.right:t.bottom,i=n?t.width:t.height,s=n?e.left:e.top,a=n?e.right:e.bottom,l=n?e.width:e.height;return o===s||r===a||o+i/2===s+l/2},tq=function(t,e){var n;return tx.some(function(o){var r=o[V].options.emptyInsertThreshold;if(!(!r||M(o))){var i=B(o),s=t>=i.left-r&&t<=i.right+r,a=e>=i.top-r&&e<=i.bottom+r;if(s&&a)return n=o}}),n},tF=function(t){function e(t,n){return function(o,r,i,s){var a=o.options.group.name&&r.options.group.name&&o.options.group.name===r.options.group.name;if(null==t&&(n||a))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"==typeof t)return e(t(o,r,i,s),n)(o,r,i,s);var l=(n?o:r).options.group.name;return!0===t||"string"==typeof t&&t===l||t.join&&t.indexOf(l)>-1}}var n={},o=t.group;o&&"object"==p(o)||(o={name:o}),n.name=o.name,n.checkPull=e(o.pull,!0),n.checkPut=e(o.put),n.revertClone=o.revertClone,t.group=n},tY=function(){!tL&&tn&&D(tn,"display","none")},tU=function(){!tL&&tn&&D(tn,"display","")};tP&&!_&&document.addEventListener("click",function(t){if(tC)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),tC=!1,!1},!0);var tX=function(t){if(tt){var e=tq((t=t.touches?t.touches[0]:t).clientX,t.clientY);if(e){var n={};for(var o in t)t.hasOwnProperty(o)&&(n[o]=t[o]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[V]._onDragOver(n)}}},tH=function(t){tt&&tt.parentNode[V]._isOutsideThisEl(t.target)};function tW(t,e){if(!(t&&t.nodeType&&1===t.nodeType))throw"Sortable: `el` must be an HTMLElement, not ".concat(({}).toString.call(t));this.el=t,this.options=e=f({},e),t[V]=this;var n,o,r={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return tM(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==tW.supportPointer&&"PointerEvent"in window&&(!b||w),emptyInsertThreshold:5};for(var i in K.initializePlugins(this,t,r),r)i in e||(e[i]=r[i]);for(var s in tF(e),this)"_"===s.charAt(0)&&"function"==typeof this[s]&&(this[s]=this[s].bind(this));this.nativeDraggable=!e.forceFallback&&tI,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?S(t,"pointerdown",this._onTapStart):(S(t,"mousedown",this._onTapStart),S(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(S(t,"dragover",this),S(t,"dragenter",this)),tx.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),f(this,(o=[],{captureAnimationState:function(){o=[],this.options.animation&&[].slice.call(this.el.children).forEach(function(t){if("none"!==D(t,"display")&&t!==tW.ghost){o.push({target:t,rect:B(t)});var e=d({},o[o.length-1].rect);if(t.thisAnimationDuration){var n=N(t,!0);n&&(e.top-=n.f,e.left-=n.e)}t.fromRect=e}})},addAnimationState:function(t){o.push(t)},removeAnimationState:function(t){o.splice(function(t,e){for(var n in t)if(t.hasOwnProperty(n)){for(var o in e)if(e.hasOwnProperty(o)&&e[o]===t[n][o])return Number(n)}return -1}(o,{target:t}),1)},animateAll:function(t){var e=this;if(!this.options.animation){clearTimeout(n),"function"==typeof t&&t();return}var r=!1,i=0;o.forEach(function(t){var n,o,s,a,l=0,c=t.target,h=c.fromRect,u=B(c),d=c.prevFromRect,p=c.prevToRect,f=t.rect,g=N(c,!0);g&&(u.top-=g.f,u.left-=g.e),c.toRect=u,c.thisAnimationDuration&&Y(d,u)&&!Y(h,u)&&(f.top-u.top)/(f.left-u.left)==(h.top-u.top)/(h.left-u.left)&&(n=f,o=d,s=p,a=e.options,l=Math.sqrt(Math.pow(o.top-n.top,2)+Math.pow(o.left-n.left,2))/Math.sqrt(Math.pow(o.top-s.top,2)+Math.pow(o.left-s.left,2))*a.animation),Y(u,h)||(c.prevFromRect=h,c.prevToRect=u,l||(l=e.options.animation),e.animate(c,f,u,l)),l&&(r=!0,i=Math.max(i,l),clearTimeout(c.animationResetTimer),c.animationResetTimer=setTimeout(function(){c.animationTime=0,c.prevFromRect=null,c.fromRect=null,c.prevToRect=null,c.thisAnimationDuration=null},l),c.thisAnimationDuration=l)}),clearTimeout(n),r?n=setTimeout(function(){"function"==typeof t&&t()},i):"function"==typeof t&&t(),o=[]},animate:function(t,e,n,o){if(o){D(t,"transition",""),D(t,"transform","");var r=N(this.el),i=r&&r.a,s=r&&r.d,a=(e.left-n.left)/(i||1),l=(e.top-n.top)/(s||1);t.animatingX=!!a,t.animatingY=!!l,D(t,"transform","translate3d("+a+"px,"+l+"px,0)"),this.forRepaintDummy=t.offsetWidth,D(t,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),D(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout(function(){D(t,"transition",""),D(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1},o)}}}))}function tV(t,e,n,o,r,i,s,a){var l,c,h=t[V],u=h.options.onMove;return!window.CustomEvent||m||v?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=e,l.from=t,l.dragged=n,l.draggedRect=o,l.related=r||e,l.relatedRect=i||B(e),l.willInsertAfter=a,l.originalEvent=s,t.dispatchEvent(l),u&&(c=u.call(h,l,s)),c}function t$(t){t.draggable=!1}function tz(){tN=!1}function tK(t){return setTimeout(t,0)}function tJ(t){return clearTimeout(t)}tW.prototype={constructor:tW,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(t_=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,tt):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,o=this.options,r=o.preventOnFilter,i=t.type,s=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,a=(s||t).target,l=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||a,c=o.filter;if(function(t){tR.length=0;for(var e=t.getElementsByTagName("input"),n=e.length;n--;){var o=e[n];o.checked&&tR.push(o)}}(n),!(tt||/mousedown|pointerdown/.test(i)&&0!==t.button||o.disabled||l.isContentEditable||!this.nativeDraggable&&b&&a&&"SELECT"===a.tagName.toUpperCase()||(a=x(a,o.draggable,n,!1))&&a.animated)&&ti!==a){if(tl=j(a),th=j(a,o.draggable),"function"==typeof c){if(c.call(this,t,a,this)){Q({sortable:e,rootEl:l,name:"filter",targetEl:a,toEl:n,fromEl:n}),G("filter",e,{evt:t}),r&&t.preventDefault();return}}else if(c&&(c=c.split(",").some(function(o){if(o=x(l,o.trim(),n,!1))return Q({sortable:e,rootEl:o,name:"filter",targetEl:a,fromEl:n,toEl:n}),G("filter",e,{evt:t}),!0}))){r&&t.preventDefault();return}(!o.handle||x(l,o.handle,n,!1))&&this._prepareDragStart(t,s,a)}}},_prepareDragStart:function(t,e,n){var o,r=this,i=r.el,s=r.options,a=i.ownerDocument;if(n&&!tt&&n.parentNode===i){var l=B(n);if(to=i,te=(tt=n).parentNode,tr=tt.nextSibling,ti=n,td=s.group,tW.dragged=tt,ty=(tf={target:tt,clientX:(e||t).clientX,clientY:(e||t).clientY}).clientX-l.left,tb=tf.clientY-l.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,tt.style["will-change"]="all",o=function(){(G("delayEnded",r,{evt:t}),tW.eventCanceled)?r._onDrop():(r._disableDelayedDragEvents(),!y&&r.nativeDraggable&&(tt.draggable=!0),r._triggerDragStart(t,e),Q({sortable:r,name:"choose",originalEvent:t}),A(tt,s.chosenClass,!0))},s.ignore.split(",").forEach(function(t){R(tt,t.trim(),t$)}),S(a,"dragover",tX),S(a,"mousemove",tX),S(a,"touchmove",tX),s.supportPointer?(S(a,"pointerup",r._onDrop),this.nativeDraggable||S(a,"pointercancel",r._onDrop)):(S(a,"mouseup",r._onDrop),S(a,"touchend",r._onDrop),S(a,"touchcancel",r._onDrop)),y&&this.nativeDraggable&&(this.options.touchStartThreshold=4,tt.draggable=!0),G("delayStart",this,{evt:t}),!s.delay||s.delayOnTouchOnly&&!e||this.nativeDraggable&&(v||m))o();else{if(tW.eventCanceled)return void this._onDrop();s.supportPointer?(S(a,"pointerup",r._disableDelayedDrag),S(a,"pointercancel",r._disableDelayedDrag)):(S(a,"mouseup",r._disableDelayedDrag),S(a,"touchend",r._disableDelayedDrag),S(a,"touchcancel",r._disableDelayedDrag)),S(a,"mousemove",r._delayedDragTouchMoveHandler),S(a,"touchmove",r._delayedDragTouchMoveHandler),s.supportPointer&&S(a,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(o,s.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){tt&&t$(tt),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;k(t,"mouseup",this._disableDelayedDrag),k(t,"touchend",this._disableDelayedDrag),k(t,"touchcancel",this._disableDelayedDrag),k(t,"pointerup",this._disableDelayedDrag),k(t,"pointercancel",this._disableDelayedDrag),k(t,"mousemove",this._delayedDragTouchMoveHandler),k(t,"touchmove",this._delayedDragTouchMoveHandler),k(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?S(document,"pointermove",this._onTouchMove):e?S(document,"touchmove",this._onTouchMove):S(document,"mousemove",this._onTouchMove):(S(tt,"dragend",this),S(to,"dragstart",this._onDragStart));try{document.selection?tK(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(tT=!1,to&&tt){G("dragStarted",this,{evt:e}),this.nativeDraggable&&S(document,"dragover",tH);var n=this.options;t||A(tt,n.dragClass,!1),A(tt,n.ghostClass,!0),tW.active=this,t&&this._appendGhost(),Q({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(tg){this._lastX=tg.clientX,this._lastY=tg.clientY,tY();for(var t=document.elementFromPoint(tg.clientX,tg.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(tg.clientX,tg.clientY))!==e;)e=t;if(tt.parentNode[V]._isOutsideThisEl(t),e)do{if(e[V]&&e[V]._onDragOver({clientX:tg.clientX,clientY:tg.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break;t=e}while(e=C(e))tU()}},_onTouchMove:function(t){if(tf){var e=this.options,n=e.fallbackTolerance,o=e.fallbackOffset,r=t.touches?t.touches[0]:t,i=tn&&N(tn,!0),s=tn&&i&&i.a,a=tn&&i&&i.d,l=w&&tk&&q(tk),c=(r.clientX-tf.clientX+o.x)/(s||1)+(l?l[0]-tD[0]:0)/(s||1),h=(r.clientY-tf.clientY+o.y)/(a||1)+(l?l[1]-tD[1]:0)/(a||1);if(!tW.active&&!tT){if(n&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(tn){i?(i.e+=c-(tm||0),i.f+=h-(tv||0)):i={a:1,b:0,c:0,d:1,e:c,f:h};var u="matrix(".concat(i.a,",").concat(i.b,",").concat(i.c,",").concat(i.d,",").concat(i.e,",").concat(i.f,")");D(tn,"webkitTransform",u),D(tn,"mozTransform",u),D(tn,"msTransform",u),D(tn,"transform",u),tm=c,tv=h,tg=r}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!tn){var t=this.options.fallbackOnBody?document.body:to,e=B(tt,!0,w,!0,t),n=this.options;if(w){for(tk=t;"static"===D(tk,"position")&&"none"===D(tk,"transform")&&tk!==document;)tk=tk.parentNode;tk!==document.body&&tk!==document.documentElement?(tk===document&&(tk=P()),e.top+=tk.scrollTop,e.left+=tk.scrollLeft):tk=P(),tD=q(tk)}A(tn=tt.cloneNode(!0),n.ghostClass,!1),A(tn,n.fallbackClass,!0),A(tn,n.dragClass,!0),D(tn,"transition",""),D(tn,"transform",""),D(tn,"box-sizing","border-box"),D(tn,"margin",0),D(tn,"top",e.top),D(tn,"left",e.left),D(tn,"width",e.width),D(tn,"height",e.height),D(tn,"opacity","0.8"),D(tn,"position",w?"absolute":"fixed"),D(tn,"zIndex","100000"),D(tn,"pointerEvents","none"),tW.ghost=tn,t.appendChild(tn),D(tn,"transform-origin",ty/parseInt(tn.style.width)*100+"% "+tb/parseInt(tn.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,o=t.dataTransfer,r=n.options;(G("dragStart",this,{evt:t}),tW.eventCanceled)?this._onDrop():(G("setupClone",this),tW.eventCanceled||((ts=H(tt)).removeAttribute("id"),ts.draggable=!1,ts.style["will-change"]="",this._hideClone(),A(ts,this.options.chosenClass,!1),tW.clone=ts),n.cloneId=tK(function(){G("clone",n),tW.eventCanceled||(n.options.removeCloneOnHide||to.insertBefore(ts,tt),n._hideClone(),Q({sortable:n,name:"clone"}))}),e||A(tt,r.dragClass,!0),e?(tC=!0,n._loopId=setInterval(n._emulateDragOver,50)):(k(document,"mouseup",n._onDrop),k(document,"touchend",n._onDrop),k(document,"touchcancel",n._onDrop),o&&(o.effectAllowed="move",r.setData&&r.setData.call(n,o,tt)),S(document,"drop",n),D(tt,"transform","translateZ(0)")),tT=!0,n._dragStartId=tK(n._dragStarted.bind(n,e,t)),S(document,"selectstart",n),tw=!0,window.getSelection().removeAllRanges(),b&&D(document.body,"user-select","none"))},_onDragOver:function(t){var e,n,o,r,i=this.el,s=t.target,a=this.options,l=a.group,c=tW.active,h=td===l,u=a.sort,p=tp||c,f=this,g=!1;if(!tN){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),s=x(s,a.draggable,i,!0),Z("dragOver"),tW.eventCanceled)return g;if(tt.contains(t.target)||s.animated&&s.animatingX&&s.animatingY||f._ignoreWhileAnimating===s)return ts(!1);if(tC=!1,c&&!a.disabled&&(h?u||(o=te!==to):tp===this||(this.lastPutMode=td.checkPull(this,c,tt,t))&&l.checkPut(this,c,tt,t))){if(r="vertical"===this._getDirection(t,s),e=B(tt),Z("dragOverValid"),tW.eventCanceled)return g;if(o)return te=to,ti(),this._hideClone(),Z("revert"),tW.eventCanceled||(tr?to.insertBefore(tt,tr):to.appendChild(tt)),ts(!0);var m=M(i,a.draggable);if(!m||(y=t,b=r,w=this,_=B(M(w.el,w.options.draggable)),E=W(w.el,w.options,tn),(b?y.clientX>E.right+10||y.clientY>_.bottom&&y.clientX>_.left:y.clientY>E.bottom+10||y.clientX>_.right&&y.clientY>_.top)&&!m.animated)){if(m===tt)return ts(!1);if(m&&i===t.target&&(s=m),s&&(n=B(s)),!1!==tV(to,i,tt,e,s,n,t,!!s))return ti(),m&&m.nextSibling?i.insertBefore(tt,m.nextSibling):i.appendChild(tt),te=i,ta(),ts(!0)}else if(m&&(S=t,k=r,T=this,C=B(L(T.el,0,T.options,!0)),O=W(T.el,T.options,tn),k?S.clientX<O.left-10||S.clientY<C.top&&S.clientX<C.right:S.clientY<O.top-10||S.clientY<C.bottom&&S.clientX<C.left)){var v=L(i,0,a,!0);if(v===tt)return ts(!1);if(n=B(s=v),!1!==tV(to,i,tt,e,s,n,t,!1))return ti(),i.insertBefore(tt,v),te=i,ta(),ts(!0)}else if(s.parentNode===i){n=B(s);var y,b,w,_,E,S,k,T,C,O,N,R,P=0,q=tt.parentNode!==i,F=!tj(tt.animated&&tt.toRect||e,s.animated&&s.toRect||n,r),Y=r?"top":"left",U=I(s,"top","top")||I(tt,"top","top"),H=U?U.scrollTop:void 0;if(t_!==s&&(R=n[Y],tO=!1,tA=!F&&a.invertSwap||q),0!==(P=function(t,e,n,o,r,i,s,a){var l,c=o?t.clientY:t.clientX,h=o?n.height:n.width,u=o?n.top:n.left,d=o?n.bottom:n.right,p=!1;if(!s){if(a&&tS<h*r){if(!tO&&(1===tE?c>u+h*i/2:c<d-h*i/2)&&(tO=!0),tO)p=!0;else if(1===tE?c<u+tS:c>d-tS)return-tE}else if(c>u+h*(1-r)/2&&c<d-h*(1-r)/2){return l=e,j(tt)<j(l)?1:-1}}return(p=p||s)&&(c<u+h*i/2||c>d-h*i/2)?c>u+h/2?1:-1:0}(t,s,n,r,F?1:a.swapThreshold,null==a.invertedSwapThreshold?a.swapThreshold:a.invertedSwapThreshold,tA,t_===s))){var $=j(tt);do $-=P,N=te.children[$];while(N&&("none"===D(N,"display")||N===tn))}if(0===P||N===s)return ts(!1);t_=s,tE=P;var z=s.nextElementSibling,K=!1,J=tV(to,i,tt,e,s,n,t,K=1===P);if(!1!==J)return(1===J||-1===J)&&(K=1===J),tN=!0,setTimeout(tz,30),ti(),K&&!z?i.appendChild(tt):s.parentNode.insertBefore(tt,K?z:s),U&&X(U,0,H-U.scrollTop),te=tt.parentNode,void 0===R||tA||(tS=Math.abs(R-B(s)[Y])),ta(),ts(!0)}if(i.contains(tt))return ts(!1)}return!1}function Z(a,l){G(a,f,d({evt:t,isOwner:h,axis:r?"vertical":"horizontal",revert:o,dragRect:e,targetRect:n,canSort:u,fromSortable:p,target:s,completed:ts,onMove:function(n,o){return tV(to,i,tt,e,n,B(n),t,o)},changed:ta},l))}function ti(){Z("dragOverAnimationCapture"),f.captureAnimationState(),f!==p&&p.captureAnimationState()}function ts(e){return Z("dragOverCompleted",{insertion:e}),e&&(h?c._hideClone():c._showClone(f),f!==p&&(A(tt,tp?tp.options.ghostClass:c.options.ghostClass,!1),A(tt,a.ghostClass,!0)),tp!==f&&f!==tW.active?tp=f:f===tW.active&&tp&&(tp=null),p===f&&(f._ignoreWhileAnimating=s),f.animateAll(function(){Z("dragOverAnimationComplete"),f._ignoreWhileAnimating=null}),f!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(s!==tt||tt.animated)&&(s!==i||s.animated)||(t_=null),a.dragoverBubble||t.rootEl||s===document||(tt.parentNode[V]._isOutsideThisEl(t.target),e||tX(t)),!a.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),g=!0}function ta(){tc=j(tt),tu=j(tt,a.draggable),Q({sortable:f,name:"change",toEl:i,newIndex:tc,newDraggableIndex:tu,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){k(document,"mousemove",this._onTouchMove),k(document,"touchmove",this._onTouchMove),k(document,"pointermove",this._onTouchMove),k(document,"dragover",tX),k(document,"mousemove",tX),k(document,"touchmove",tX)},_offUpEvents:function(){var t=this.el.ownerDocument;k(t,"mouseup",this._onDrop),k(t,"touchend",this._onDrop),k(t,"pointerup",this._onDrop),k(t,"pointercancel",this._onDrop),k(t,"touchcancel",this._onDrop),k(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;tc=j(tt),tu=j(tt,n.draggable),G("drop",this,{evt:t}),te=tt&&tt.parentNode,tc=j(tt),tu=j(tt,n.draggable),tW.eventCanceled||(tT=!1,tA=!1,tO=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),tJ(this.cloneId),tJ(this._dragStartId),this.nativeDraggable&&(k(document,"drop",this),k(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),b&&D(document.body,"user-select",""),D(tt,"transform",""),t&&(tw&&(t.cancelable&&t.preventDefault(),n.dropBubble||t.stopPropagation()),tn&&tn.parentNode&&tn.parentNode.removeChild(tn),(to===te||tp&&"clone"!==tp.lastPutMode)&&ts&&ts.parentNode&&ts.parentNode.removeChild(ts),tt&&(this.nativeDraggable&&k(tt,"dragend",this),t$(tt),tt.style["will-change"]="",tw&&!tT&&A(tt,tp?tp.options.ghostClass:this.options.ghostClass,!1),A(tt,this.options.chosenClass,!1),Q({sortable:this,name:"unchoose",toEl:te,newIndex:null,newDraggableIndex:null,originalEvent:t}),to!==te?(tc>=0&&(Q({rootEl:te,name:"add",toEl:te,fromEl:to,originalEvent:t}),Q({sortable:this,name:"remove",toEl:te,originalEvent:t}),Q({rootEl:te,name:"sort",toEl:te,fromEl:to,originalEvent:t}),Q({sortable:this,name:"sort",toEl:te,originalEvent:t})),tp&&tp.save()):tc!==tl&&tc>=0&&(Q({sortable:this,name:"update",toEl:te,originalEvent:t}),Q({sortable:this,name:"sort",toEl:te,originalEvent:t})),tW.active&&((null==tc||-1===tc)&&(tc=tl,tu=th),Q({sortable:this,name:"end",toEl:te,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){G("nulling",this),to=tt=te=tn=tr=ts=ti=ta=tf=tg=tw=tc=tu=tl=th=t_=tE=tp=td=tW.dragged=tW.ghost=tW.clone=tW.active=null,tR.forEach(function(t){t.checked=!0}),tR.length=tm=tv=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":var e;tt&&(this._onDragOver(t),(e=t).dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault());break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,o=0,r=n.length,i=this.options;o<r;o++)x(t=n[o],i.draggable,this.el,!1)&&e.push(t.getAttribute(i.dataIdAttr)||function(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,o=0;n--;)o+=e.charCodeAt(n);return o.toString(36)}(t));return e},sort:function(t,e){var n={},o=this.el;this.toArray().forEach(function(t,e){var r=o.children[e];x(r,this.options.draggable,o,!1)&&(n[t]=r)},this),e&&this.captureAnimationState(),t.forEach(function(t){n[t]&&(o.removeChild(n[t]),o.appendChild(n[t]))}),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return x(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var n=this.options;if(void 0===e)return n[t];var o=K.modifyOption(this,t,e);void 0!==o?n[t]=o:n[t]=e,"group"===t&&tF(n)},destroy:function(){G("destroy",this);var t=this.el;t[V]=null,k(t,"mousedown",this._onTapStart),k(t,"touchstart",this._onTapStart),k(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(k(t,"dragover",this),k(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),tx.splice(tx.indexOf(this.el),1),this.el=null},_hideClone:function(){!ta&&(G("hideClone",this),tW.eventCanceled||(D(ts,"display","none"),this.options.removeCloneOnHide&&ts.parentNode&&ts.parentNode.removeChild(ts),ta=!0))},_showClone:function(t){if("clone"!==t.lastPutMode)return void this._hideClone();if(ta){if(G("showClone",this),tW.eventCanceled)return;tt.parentNode!=to||this.options.group.revertClone?tr?to.insertBefore(ts,tr):to.appendChild(ts):to.insertBefore(ts,tt),this.options.group.revertClone&&this.animate(tt,ts),D(ts,"display",""),ta=!1}}},tP&&S(document,"touchmove",function(t){(tW.active||tT)&&t.cancelable&&t.preventDefault()}),tW.utils={on:S,off:k,css:D,find:R,is:function(t,e){return!!x(t,e,t,!1)},extend:function(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},throttle:U,closest:x,toggleClass:A,clone:H,index:j,nextTick:tK,cancelNextTick:tJ,detectDirection:tM,getChild:L,expando:V},tW.get=function(t){return t[V]},tW.mount=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];e[0].constructor===Array&&(e=e[0]),e.forEach(function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat(({}).toString.call(t));t.utils&&(tW.utils=d(d({},tW.utils),t.utils)),K.mount(t)})},tW.create=function(t,e){return new tW(t,e)},tW.version="1.15.6";var tG,tQ,tZ,t0,t1,t2,t4=[],t3=!1;function t8(){t4.forEach(function(t){clearInterval(t.pid)}),t4=[]}function t6(){clearInterval(t2)}var t5=U(function(t,e,n,o){if(e.scroll){var r,i=(t.touches?t.touches[0]:t).clientX,s=(t.touches?t.touches[0]:t).clientY,a=e.scrollSensitivity,l=e.scrollSpeed,c=P(),h=!1;tQ!==n&&(tQ=n,t8(),tG=e.scroll,r=e.scrollFn,!0===tG&&(tG=F(n,!0)));var u=0,d=tG;do{var p=d,f=B(p),g=f.top,m=f.bottom,v=f.left,y=f.right,b=f.width,w=f.height,_=void 0,E=void 0,S=p.scrollWidth,k=p.scrollHeight,T=D(p),C=p.scrollLeft,x=p.scrollTop;p===c?(_=b<S&&("auto"===T.overflowX||"scroll"===T.overflowX||"visible"===T.overflowX),E=w<k&&("auto"===T.overflowY||"scroll"===T.overflowY||"visible"===T.overflowY)):(_=b<S&&("auto"===T.overflowX||"scroll"===T.overflowX),E=w<k&&("auto"===T.overflowY||"scroll"===T.overflowY));var O=_&&(Math.abs(y-i)<=a&&C+b<S)-(Math.abs(v-i)<=a&&!!C),A=E&&(Math.abs(m-s)<=a&&x+w<k)-(Math.abs(g-s)<=a&&!!x);if(!t4[u])for(var N=0;N<=u;N++)t4[N]||(t4[N]={});(t4[u].vx!=O||t4[u].vy!=A||t4[u].el!==p)&&(t4[u].el=p,t4[u].vx=O,t4[u].vy=A,clearInterval(t4[u].pid),(0!=O||0!=A)&&(h=!0,t4[u].pid=setInterval((function(){o&&0===this.layer&&tW.active._onTouchMove(t1);var e=t4[this.layer].vy?t4[this.layer].vy*l:0,n=t4[this.layer].vx?t4[this.layer].vx*l:0;("function"!=typeof r||"continue"===r.call(tW.dragged.parentNode[V],n,e,t,t1,t4[this.layer].el))&&X(t4[this.layer].el,n,e)}).bind({layer:u}),24))),u++}while(e.bubbleScroll&&d!==c&&(d=F(d,!1)))t3=h}},30),t9=function(t){var e=t.originalEvent,n=t.putSortable,o=t.dragEl,r=t.activeSortable,i=t.dispatchSortableEvent,s=t.hideGhostForTarget,a=t.unhideGhostForTarget;if(e){var l=n||r;s();var c=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,h=document.elementFromPoint(c.clientX,c.clientY);a(),l&&!l.el.contains(h)&&(i("spill"),this.onSpill({dragEl:o,putSortable:n}))}};function t7(){}function et(){}t7.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var o=L(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(e,o):this.sortable.el.appendChild(e),this.sortable.animateAll(),n&&n.animateAll()},drop:t9},f(t7,{pluginName:"revertOnSpill"}),et.prototype={onSpill:function(t){var e=t.dragEl,n=t.putSortable||this.sortable;n.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),n.animateAll()},drop:t9},f(et,{pluginName:"removeOnSpill"}),tW.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?S(document,"dragover",this._handleAutoScroll):this.options.supportPointer?S(document,"pointermove",this._handleFallbackAutoScroll):e.touches?S(document,"touchmove",this._handleFallbackAutoScroll):S(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?k(document,"dragover",this._handleAutoScroll):(k(document,"pointermove",this._handleFallbackAutoScroll),k(document,"touchmove",this._handleFallbackAutoScroll),k(document,"mousemove",this._handleFallbackAutoScroll)),t6(),t8(),clearTimeout(Z),Z=void 0},nulling:function(){t1=tQ=tG=t3=t2=tZ=t0=null,t4.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var n=this,o=(t.touches?t.touches[0]:t).clientX,r=(t.touches?t.touches[0]:t).clientY,i=document.elementFromPoint(o,r);if(t1=t,e||this.options.forceAutoScrollFallback||v||m||b){t5(t,this.options,i,e);var s=F(i,!0);t3&&(!t2||o!==tZ||r!==t0)&&(t2&&t6(),t2=setInterval(function(){var i=F(document.elementFromPoint(o,r),!0);i!==s&&(s=i,t8()),t5(t,n.options,i,e)},10),tZ=o,t0=r)}else{if(!this.options.bubbleScroll||F(i,!0)===P())return void t8();t5(t,this.options,F(i,!1),!1)}}},f(t,{pluginName:"scroll",initializeByDefault:!0})}),tW.mount(et,t7);var ee=c("7nxqN");let en=Object.create(null);en.open="0",en.close="1",en.ping="2",en.pong="3",en.message="4",en.upgrade="5",en.noop="6";let eo=Object.create(null);Object.keys(en).forEach(t=>{eo[en[t]]=t});let er={type:"error",data:"parser error"},ei="function"==typeof Blob||"u">typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),es="function"==typeof ArrayBuffer,ea=t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,el=({type:t,data:e},n,o)=>{if(ei&&e instanceof Blob)if(n)return o(e);else return ec(e,o);if(es&&(e instanceof ArrayBuffer||ea(e)))if(n)return o(e);else return ec(new Blob([e]),o);return o(en[t]+(e||""))},ec=(t,e)=>{let n=new FileReader;return n.onload=function(){e("b"+(n.result.split(",")[1]||""))},n.readAsDataURL(t)};function eh(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let eu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ed="u"<typeof Uint8Array?[]:new Uint8Array(256);for(let t=0;t<eu.length;t++)ed[eu.charCodeAt(t)]=t;let ep="function"==typeof ArrayBuffer,ef=(t,e)=>{if("string"!=typeof t)return{type:"message",data:em(t,e)};let n=t.charAt(0);return"b"===n?{type:"message",data:eg(t.substring(1),e)}:eo[n]?t.length>1?{type:eo[n],data:t.substring(1)}:{type:eo[n]}:er},eg=(t,e)=>ep?em((t=>{let e=.75*t.length,n=t.length,o,r=0,i,s,a,l;"="===t[t.length-1]&&(e--,"="===t[t.length-2]&&e--);let c=new ArrayBuffer(e),h=new Uint8Array(c);for(o=0;o<n;o+=4)i=ed[t.charCodeAt(o)],s=ed[t.charCodeAt(o+1)],a=ed[t.charCodeAt(o+2)],l=ed[t.charCodeAt(o+3)],h[r++]=i<<2|s>>4,h[r++]=(15&s)<<4|a>>2,h[r++]=(3&a)<<6|63&l;return c})(t),e):{base64:!0,data:t},em=(t,e)=>"blob"===e?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer;function ev(t){return t.reduce((t,e)=>t+e.length,0)}function ey(t,e){if(t[0].length===e)return t.shift();let n=new Uint8Array(e),o=0;for(let r=0;r<e;r++)n[r]=t[0][o++],o===t[0].length&&(t.shift(),o=0);return t.length&&o<t[0].length&&(t[0]=t[0].slice(o)),n}function eb(t){if(t){var e=t;for(var n in eb.prototype)e[n]=eb.prototype[n];return e}}eb.prototype.on=eb.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},eb.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},eb.prototype.off=eb.prototype.removeListener=eb.prototype.removeAllListeners=eb.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,o=this._callbacks["$"+t];if(!o)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var r=0;r<o.length;r++)if((n=o[r])===e||n.fn===e){o.splice(r,1);break}return 0===o.length&&delete this._callbacks["$"+t],this},eb.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=Array(arguments.length-1),n=this._callbacks["$"+t],o=1;o<arguments.length;o++)e[o-1]=arguments[o];if(n){n=n.slice(0);for(var o=0,r=n.length;o<r;++o)n[o].apply(this,e)}return this},eb.prototype.emitReserved=eb.prototype.emit,eb.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},eb.prototype.hasListeners=function(t){return!!this.listeners(t).length};let ew="function"==typeof Promise&&"function"==typeof Promise.resolve?t=>Promise.resolve().then(t):(t,e)=>e(t,0),e_="u">typeof self?self:"u">typeof window?window:Function("return this")();function eE(t,...e){return e.reduce((e,n)=>(t.hasOwnProperty(n)&&(e[n]=t[n]),e),{})}let eS=e_.setTimeout,ek=e_.clearTimeout;function eT(t,e){e.useNativeTimers?(t.setTimeoutFn=eS.bind(e_),t.clearTimeoutFn=ek.bind(e_)):(t.setTimeoutFn=e_.setTimeout.bind(e_),t.clearTimeoutFn=e_.clearTimeout.bind(e_))}function eC(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}class ex extends Error{constructor(t,e,n){super(t),this.description=e,this.context=n,this.type="TransportError"}}class eO extends eb{constructor(t){super(),this.writable=!1,eT(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,e,n){return super.emitReserved("error",new ex(t,e,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return("opening"===this.readyState||"open"===this.readyState)&&(this.doClose(),this.onClose()),this}send(t){"open"===this.readyState&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){let e=ef(t,this.socket.binaryType);this.onPacket(e)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,e={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(e)}_hostname(){let t=this.opts.hostname;return -1===t.indexOf(":")?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(t){let e=function(t){let e="";for(let n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e}(t);return e.length?"?"+e:""}}class eA extends eO{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";let e=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let t=0;this._polling&&(t++,this.once("pollComplete",function(){--t||e()})),this.writable||(t++,this.once("drain",function(){--t||e()}))}else e()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){let e=t=>{if("opening"===this.readyState&&"open"===t.type&&this.onOpen(),"close"===t.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(t)};((t,e)=>{let n=t.split("\x1e"),o=[];for(let t=0;t<n.length;t++){let r=ef(n[t],e);if(o.push(r),"error"===r.type)break}return o})(t,this.socket.binaryType).forEach(e),"closed"!==this.readyState&&(this._polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this._poll())}doClose(){let t=()=>{this.write([{type:"close"}])};"open"===this.readyState?t():this.once("open",t)}write(t){var e;let n,o,r;this.writable=!1,e=t=>{this.doWrite(t,()=>{this.writable=!0,this.emitReserved("drain")})},o=Array(n=t.length),r=0,t.forEach((t,i)=>{el(t,!1,t=>{o[i]=t,++r===n&&e(o.join("\x1e"))})})}uri(){let t=this.opts.secure?"https":"http",e=this.query||{};return!1!==this.opts.timestampRequests&&(e[this.opts.timestampParam]=eC()),this.supportsBinary||e.sid||(e.b64=1),this.createUri(t,e)}}let eD=!1;try{eD="u">typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){}let eN=eD;function eR(){}class eP extends eA{constructor(t){if(super(t),"u">typeof location){let e="https:"===location.protocol,n=location.port;n||(n=e?"443":"80"),this.xd="u">typeof location&&t.hostname!==location.hostname||n!==t.port}}doWrite(t,e){let n=this.request({method:"POST",data:t});n.on("success",e),n.on("error",(t,e)=>{this.onError("xhr post error",t,e)})}doPoll(){let t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(t,e)=>{this.onError("xhr poll error",t,e)}),this.pollXhr=t}}class eB extends eb{constructor(t,e,n){super(),this.createRequest=t,eT(this,n),this._opts=n,this._method=n.method||"GET",this._uri=e,this._data=void 0!==n.data?n.data:null,this._create()}_create(){var t;let e=eE(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");e.xdomain=!!this._opts.xd;let n=this._xhr=this.createRequest(e);try{n.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders)for(let t in n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0),this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(t)&&n.setRequestHeader(t,this._opts.extraHeaders[t])}catch(t){}if("POST"===this._method)try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{n.setRequestHeader("Accept","*/*")}catch(t){}null==(t=this._opts.cookieJar)||t.addCookies(n),"withCredentials"in n&&(n.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(n.timeout=this._opts.requestTimeout),n.onreadystatechange=()=>{var t;3===n.readyState&&(null==(t=this._opts.cookieJar)||t.parseCookies(n.getResponseHeader("set-cookie"))),4===n.readyState&&(200===n.status||1223===n.status?this._onLoad():this.setTimeoutFn(()=>{this._onError("number"==typeof n.status?n.status:0)},0))},n.send(this._data)}catch(t){this.setTimeoutFn(()=>{this._onError(t)},0);return}"u">typeof document&&(this._index=eB.requestsCount++,eB.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(void 0!==this._xhr&&null!==this._xhr){if(this._xhr.onreadystatechange=eR,t)try{this._xhr.abort()}catch(t){}"u">typeof document&&delete eB.requests[this._index],this._xhr=null}}_onLoad(){let t=this._xhr.responseText;null!==t&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}function eI(){for(let t in eB.requests)eB.requests.hasOwnProperty(t)&&eB.requests[t].abort()}eB.requestsCount=0,eB.requests={},"u">typeof document&&("function"==typeof attachEvent?attachEvent("onunload",eI):"function"==typeof addEventListener&&addEventListener("onpagehide"in e_?"pagehide":"unload",eI,!1));let eL=(n=eM({xdomain:!1}))&&null!==n.responseType;function eM(t){let e=t.xdomain;try{if("u">typeof XMLHttpRequest&&(!e||eN))return new XMLHttpRequest}catch(t){}if(!e)try{return new e_[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(t){}}let ej="u">typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class eq extends eO{get name(){return"websocket"}doOpen(){let t=this.uri(),e=this.opts.protocols,n=ej?{}:eE(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,e,n)}catch(t){return this.emitReserved("error",t)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let e=0;e<t.length;e++){let n=t[e],o=e===t.length-1;el(n,this.supportsBinary,t=>{try{this.doWrite(n,t)}catch(t){}o&&ew(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){void 0!==this.ws&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let t=this.opts.secure?"wss":"ws",e=this.query||{};return this.opts.timestampRequests&&(e[this.opts.timestampParam]=eC()),this.supportsBinary||(e.b64=1),this.createUri(t,e)}}let eF=e_.WebSocket||e_.MozWebSocket,eY={websocket:class extends eq{createSocket(t,e,n){return ej?new eF(t,e,n):e?new eF(t,e):new eF(t)}doWrite(t,e){this.ws.send(e)}},webtransport:class extends eO{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(n=>{var o,r;let i,s,a,l,c=(o=Number.MAX_SAFE_INTEGER,r=this.socket.binaryType,e||(e=new TextDecoder),i=[],s=0,a=-1,l=!1,new TransformStream({transform(t,n){for(i.push(t);;){if(0===s){if(1>ev(i))break;let t=ey(i,1);l=(128&t[0])==128,s=(a=127&t[0])<126?3:126===a?1:2}else if(1===s){if(2>ev(i))break;let t=ey(i,2);a=new DataView(t.buffer,t.byteOffset,t.length).getUint16(0),s=3}else if(2===s){if(8>ev(i))break;let t=ey(i,8),e=new DataView(t.buffer,t.byteOffset,t.length),o=e.getUint32(0);if(o>2097151){n.enqueue(er);break}a=0x100000000*o+e.getUint32(4),s=3}else{if(ev(i)<a)break;let t=ey(i,a);n.enqueue(ef(l?t:e.decode(t),r)),s=0}if(0===a||a>o){n.enqueue(er);break}}}})),h=n.readable.pipeThrough(c).getReader(),u=new TransformStream({transform(e,n){var o;o=t=>{let o,r=t.length;if(r<126)new DataView((o=new Uint8Array(1)).buffer).setUint8(0,r);else if(r<65536){let t=new DataView((o=new Uint8Array(3)).buffer);t.setUint8(0,126),t.setUint16(1,r)}else{let t=new DataView((o=new Uint8Array(9)).buffer);t.setUint8(0,127),t.setBigUint64(1,BigInt(r))}e.data&&"string"!=typeof e.data&&(o[0]|=128),n.enqueue(o),n.enqueue(t)},ei&&e.data instanceof Blob?e.data.arrayBuffer().then(eh).then(o):es&&(e.data instanceof ArrayBuffer||ea(e.data))?o(eh(e.data)):el(e,!1,e=>{t||(t=new TextEncoder),o(t.encode(e))})}});u.readable.pipeTo(n.writable),this._writer=u.writable.getWriter();let d=()=>{h.read().then(({done:t,value:e})=>{t||(this.onPacket(e),d())}).catch(t=>{})};d();let p={type:"open"};this.query.sid&&(p.data=`{"sid":"${this.query.sid}"}`),this._writer.write(p).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let e=0;e<t.length;e++){let n=t[e],o=e===t.length-1;this._writer.write(n).then(()=>{o&&ew(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;null==(t=this._transport)||t.close()}},polling:class extends eP{constructor(t){super(t);let e=t&&t.forceBase64;this.supportsBinary=eL&&!e}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new eB(eM,this.uri(),t)}}},eU=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,eX=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function eH(t){var e,n;let o,r;if(t.length>8e3)throw"URI too long";let i=t,s=t.indexOf("["),a=t.indexOf("]");-1!=s&&-1!=a&&(t=t.substring(0,s)+t.substring(s,a).replace(/:/g,";")+t.substring(a,t.length));let l=eU.exec(t||""),c={},h=14;for(;h--;)c[eX[h]]=l[h]||"";return -1!=s&&-1!=a&&(c.source=i,c.host=c.host.substring(1,c.host.length-1).replace(/;/g,":"),c.authority=c.authority.replace("[","").replace("]","").replace(/;/g,":"),c.ipv6uri=!0),o=(e=c.path).replace(/\/{2,9}/g,"/").split("/"),("/"==e.slice(0,1)||0===e.length)&&o.splice(0,1),"/"==e.slice(-1)&&o.splice(o.length-1,1),c.pathNames=o,n=c.query,r={},n.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(t,e,n){e&&(r[e]=n)}),c.queryKey=r,c}let eW="function"==typeof addEventListener&&"function"==typeof removeEventListener,eV=[];eW&&addEventListener("offline",()=>{eV.forEach(t=>t())},!1);class e$ extends eb{constructor(t,e){if(super(),this.binaryType="arraybuffer",this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&"object"==typeof t&&(e=t,t=null),t){let n=eH(t);e.hostname=n.host,e.secure="https"===n.protocol||"wss"===n.protocol,e.port=n.port,n.query&&(e.query=n.query)}else e.host&&(e.hostname=eH(e.host).host);eT(this,e),this.secure=null!=e.secure?e.secure:"u">typeof location&&"https:"===location.protocol,e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.hostname=e.hostname||("u">typeof location?location.hostname:"localhost"),this.port=e.port||("u">typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},e.transports.forEach(t=>{let e=t.prototype.name;this.transports.push(e),this._transportsByName[e]=t}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},e),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=function(t){let e={},n=t.split("&");for(let t=0,o=n.length;t<o;t++){let o=n[t].split("=");e[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return e}(this.opts.query)),eW&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},eV.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){let e=Object.assign({},this.opts.query);e.EIO=4,e.transport=t,this.id&&(e.sid=this.id);let n=Object.assign({},this.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](n)}_open(){if(0===this.transports.length)return void this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);let t=this.opts.rememberUpgrade&&e$.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket")?"websocket":this.transports[0];this.readyState="opening";let e=this.createTransport(t);e.open(),this.setTransport(e)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",t=>this._onClose("transport close",t))}onOpen(){this.readyState="open",e$.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush()}_onPacket(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":let e=Error("server error");e.code=t.data,this._onError(e);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data)}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),"closed"!==this.readyState&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let e=0;e<this.writeBuffer.length;e++){let n=this.writeBuffer[e].data;if(n&&(t+="string"==typeof n?function(t){let e=0,n=0;for(let o=0,r=t.length;o<r;o++)(e=t.charCodeAt(o))<128?n+=1:e<2048?n+=2:e<55296||e>=57344?n+=3:(o++,n+=4);return n}(n):Math.ceil(1.33*(n.byteLength||n.size))),e>0&&t>this._maxPayload)return this.writeBuffer.slice(0,e);t+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,ew(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,e,n){return this._sendPacket("message",t,e,n),this}send(t,e,n){return this._sendPacket("message",t,e,n),this}_sendPacket(t,e,n,o){if("function"==typeof e&&(o=e,e=void 0),"function"==typeof n&&(o=n,n=null),"closing"===this.readyState||"closed"===this.readyState)return;(n=n||{}).compress=!1!==n.compress;let r={type:t,data:e,options:n};this.emitReserved("packetCreate",r),this.writeBuffer.push(r),o&&this.once("flush",o),this.flush()}close(){let t=()=>{this._onClose("forced close"),this.transport.close()},e=()=>{this.off("upgrade",e),this.off("upgradeError",e),t()},n=()=>{this.once("upgrade",e),this.once("upgradeError",e)};return("opening"===this.readyState||"open"===this.readyState)&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():t()}):this.upgrading?n():t()),this}_onError(t){if(e$.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&"opening"===this.readyState)return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),eW&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let t=eV.indexOf(this._offlineEventListener);-1!==t&&eV.splice(t,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,e),this.writeBuffer=[],this._prevBufferLen=0}}}e$.protocol=4;class ez extends e${constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),"open"===this.readyState&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let e=this.createTransport(t),n=!1;e$.priorWebsocketSuccess=!1;let o=()=>{n||(e.send([{type:"ping",data:"probe"}]),e.once("packet",t=>{if(!n)if("pong"===t.type&&"probe"===t.data){if(this.upgrading=!0,this.emitReserved("upgrading",e),!e)return;e$.priorWebsocketSuccess="websocket"===e.name,this.transport.pause(()=>{n||"closed"!==this.readyState&&(c(),this.setTransport(e),e.send([{type:"upgrade"}]),this.emitReserved("upgrade",e),e=null,this.upgrading=!1,this.flush())})}else{let t=Error("probe error");t.transport=e.name,this.emitReserved("upgradeError",t)}}))};function r(){n||(n=!0,c(),e.close(),e=null)}let i=t=>{let n=Error("probe error: "+t);n.transport=e.name,r(),this.emitReserved("upgradeError",n)};function s(){i("transport closed")}function a(){i("socket closed")}function l(t){e&&t.name!==e.name&&r()}let c=()=>{e.removeListener("open",o),e.removeListener("error",i),e.removeListener("close",s),this.off("close",a),this.off("upgrading",l)};e.once("open",o),e.once("error",i),e.once("close",s),this.once("close",a),this.once("upgrading",l),-1!==this._upgrades.indexOf("webtransport")&&"webtransport"!==t?this.setTimeoutFn(()=>{n||e.open()},200):e.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){let e=[];for(let n=0;n<t.length;n++)~this.transports.indexOf(t[n])&&e.push(t[n]);return e}}class eK extends ez{constructor(t,e={}){let n="object"==typeof t?t:e;(!n.transports||n.transports&&"string"==typeof n.transports[0])&&(n.transports=(n.transports||["polling","websocket","webtransport"]).map(t=>eY[t]).filter(t=>!!t)),super(t,n)}}eK.protocol;var eJ={};o(eJ,"protocol",()=>e4),o(eJ,"PacketType",()=>i),o(eJ,"Encoder",()=>e3),o(eJ,"Decoder",()=>e6);let eG="function"==typeof ArrayBuffer,eQ=Object.prototype.toString,eZ="function"==typeof Blob||"u">typeof Blob&&"[object BlobConstructor]"===eQ.call(Blob),e0="function"==typeof File||"u">typeof File&&"[object FileConstructor]"===eQ.call(File);function e1(t){return eG&&(t instanceof ArrayBuffer||("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer))||eZ&&t instanceof Blob||e0&&t instanceof File}let e2=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],e4=5;(r=i||(i={}))[r.CONNECT=0]="CONNECT",r[r.DISCONNECT=1]="DISCONNECT",r[r.EVENT=2]="EVENT",r[r.ACK=3]="ACK",r[r.CONNECT_ERROR=4]="CONNECT_ERROR",r[r.BINARY_EVENT=5]="BINARY_EVENT",r[r.BINARY_ACK=6]="BINARY_ACK";class e3{constructor(t){this.replacer=t}encode(t){return(t.type===i.EVENT||t.type===i.ACK)&&function t(e,n){if(!e||"object"!=typeof e)return!1;if(Array.isArray(e)){for(let n=0,o=e.length;n<o;n++)if(t(e[n]))return!0;return!1}if(e1(e))return!0;if(e.toJSON&&"function"==typeof e.toJSON&&1==arguments.length)return t(e.toJSON(),!0);for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return!0;return!1}(t)?this.encodeAsBinary({type:t.type===i.EVENT?i.BINARY_EVENT:i.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let e=""+t.type;return(t.type===i.BINARY_EVENT||t.type===i.BINARY_ACK)&&(e+=t.attachments+"-"),t.nsp&&"/"!==t.nsp&&(e+=t.nsp+","),null!=t.id&&(e+=t.id),null!=t.data&&(e+=JSON.stringify(t.data,this.replacer)),e}encodeAsBinary(t){let e,n,o=(e=[],n=t.data,t.data=function t(e,n){if(!e)return e;if(e1(e)){let t={_placeholder:!0,num:n.length};return n.push(e),t}if(Array.isArray(e)){let o=Array(e.length);for(let r=0;r<e.length;r++)o[r]=t(e[r],n);return o}if("object"==typeof e&&!(e instanceof Date)){let o={};for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(o[r]=t(e[r],n));return o}return e}(n,e),t.attachments=e.length,{packet:t,buffers:e}),r=this.encodeAsString(o.packet),i=o.buffers;return i.unshift(r),i}}function e8(t){return"[object Object]"===Object.prototype.toString.call(t)}class e6 extends eb{constructor(t){super(),this.reviver=t}add(t){let e;if("string"==typeof t){if(this.reconstructor)throw Error("got plaintext data when reconstructing a packet");let n=(e=this.decodeString(t)).type===i.BINARY_EVENT;n||e.type===i.BINARY_ACK?(e.type=n?i.EVENT:i.ACK,this.reconstructor=new e5(e),0===e.attachments&&super.emitReserved("decoded",e)):super.emitReserved("decoded",e)}else if(e1(t)||t.base64)if(this.reconstructor)(e=this.reconstructor.takeBinaryData(t))&&(this.reconstructor=null,super.emitReserved("decoded",e));else throw Error("got binary data when not reconstructing a packet");else throw Error("Unknown type: "+t)}decodeString(t){let e=0,n={type:Number(t.charAt(0))};if(void 0===i[n.type])throw Error("unknown packet type "+n.type);if(n.type===i.BINARY_EVENT||n.type===i.BINARY_ACK){let o=e+1;for(;"-"!==t.charAt(++e)&&e!=t.length;);let r=t.substring(o,e);if(r!=Number(r)||"-"!==t.charAt(e))throw Error("Illegal attachments");n.attachments=Number(r)}if("/"===t.charAt(e+1)){let o=e+1;for(;++e&&","!==t.charAt(e)&&e!==t.length;);n.nsp=t.substring(o,e)}else n.nsp="/";let o=t.charAt(e+1);if(""!==o&&Number(o)==o){let o=e+1;for(;++e;){let n=t.charAt(e);if(null==n||Number(n)!=n){--e;break}if(e===t.length)break}n.id=Number(t.substring(o,e+1))}if(t.charAt(++e)){let o=this.tryParse(t.substr(e));if(e6.isPayloadValid(n.type,o))n.data=o;else throw Error("invalid payload")}return n}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(t){return!1}}static isPayloadValid(t,e){switch(t){case i.CONNECT:return e8(e);case i.DISCONNECT:return void 0===e;case i.CONNECT_ERROR:return"string"==typeof e||e8(e);case i.EVENT:case i.BINARY_EVENT:return Array.isArray(e)&&("number"==typeof e[0]||"string"==typeof e[0]&&-1===e2.indexOf(e[0]));case i.ACK:case i.BINARY_ACK:return Array.isArray(e)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class e5{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){var e,n;let t=(e=this.reconPack,n=this.buffers,e.data=function t(e,n){if(!e)return e;if(e&&!0===e._placeholder){if("number"==typeof e.num&&e.num>=0&&e.num<n.length)return n[e.num];throw Error("illegal attachments")}if(Array.isArray(e))for(let o=0;o<e.length;o++)e[o]=t(e[o],n);else if("object"==typeof e)for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&(e[o]=t(e[o],n));return e}(e.data,n),delete e.attachments,e);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function e9(t,e,n){return t.on(e,n),function(){t.off(e,n)}}let e7=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class nt extends eb{constructor(t,e,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=e,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let t=this.io;this.subs=[e9(t,"open",this.onopen.bind(this)),e9(t,"packet",this.onpacket.bind(this)),e9(t,"error",this.onerror.bind(this)),e9(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...e){var n,o,r;if(e7.hasOwnProperty(t))throw Error('"'+t.toString()+'" is a reserved event name');if(e.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(e),this;let s={type:i.EVENT,data:e};if(s.options={},s.options.compress=!1!==this.flags.compress,"function"==typeof e[e.length-1]){let t=this.ids++,n=e.pop();this._registerAckCallback(t,n),s.id=t}let a=null==(o=null==(n=this.io.engine)?void 0:n.transport)?void 0:o.writable,l=this.connected&&!(null==(r=this.io.engine)?void 0:r._hasPingExpired());return this.flags.volatile&&!a||(l?(this.notifyOutgoingListeners(s),this.packet(s)):this.sendBuffer.push(s)),this.flags={},this}_registerAckCallback(t,e){var n;let o=null!=(n=this.flags.timeout)?n:this._opts.ackTimeout;if(void 0===o){this.acks[t]=e;return}let r=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let e=0;e<this.sendBuffer.length;e++)this.sendBuffer[e].id===t&&this.sendBuffer.splice(e,1);e.call(this,Error("operation has timed out"))},o),i=(...t)=>{this.io.clearTimeoutFn(r),e.apply(this,t)};i.withError=!0,this.acks[t]=i}emitWithAck(t,...e){return new Promise((n,o)=>{let r=(t,e)=>t?o(t):n(e);r.withError=!0,e.push(r),this.emit(t,...e)})}_addToQueue(t){let e;"function"==typeof t[t.length-1]&&(e=t.pop());let n={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((t,...o)=>{if(n===this._queue[0])return null!==t?n.tryCount>this._opts.retries&&(this._queue.shift(),e&&e(t)):(this._queue.shift(),e&&e(null,...o)),n.pending=!1,this._drainQueue()}),this._queue.push(n),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||0===this._queue.length)return;let e=this._queue[0];(!e.pending||t)&&(e.pending=!0,e.tryCount++,this.flags=e.flags,this.emit.apply(this,e.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){"function"==typeof this.auth?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:i.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,e){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,e),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(e=>String(e.id)===t)){let e=this.acks[t];delete this.acks[t],e.withError&&e.call(this,Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case i.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case i.EVENT:case i.BINARY_EVENT:this.onevent(t);break;case i.ACK:case i.BINARY_ACK:this.onack(t);break;case i.DISCONNECT:this.ondisconnect();break;case i.CONNECT_ERROR:this.destroy();let e=Error(t.data.message);e.data=t.data.data,this.emitReserved("connect_error",e)}}onevent(t){let e=t.data||[];null!=t.id&&e.push(this.ack(t.id)),this.connected?this.emitEvent(e):this.receiveBuffer.push(Object.freeze(e))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length)for(let e of this._anyListeners.slice())e.apply(this,t);super.emit.apply(this,t),this._pid&&t.length&&"string"==typeof t[t.length-1]&&(this._lastOffset=t[t.length-1])}ack(t){let e=this,n=!1;return function(...o){n||(n=!0,e.packet({type:i.ACK,id:t,data:o}))}}onack(t){let e=this.acks[t.id];"function"==typeof e&&(delete this.acks[t.id],e.withError&&t.data.unshift(null),e.apply(this,t.data))}onconnect(t,e){this.id=t,this.recovered=e&&this._pid===e,this._pid=e,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:i.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){let e=this._anyListeners;for(let n=0;n<e.length;n++)if(t===e[n]){e.splice(n,1);break}}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){let e=this._anyOutgoingListeners;for(let n=0;n<e.length;n++)if(t===e[n]){e.splice(n,1);break}}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length)for(let e of this._anyOutgoingListeners.slice())e.apply(this,t.data)}}function ne(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}ne.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=(1&Math.floor(10*e))==0?t-n:t+n}return 0|Math.min(t,this.max)},ne.prototype.reset=function(){this.attempts=0},ne.prototype.setMin=function(t){this.ms=t},ne.prototype.setMax=function(t){this.max=t},ne.prototype.setJitter=function(t){this.jitter=t};class nn extends eb{constructor(t,e){var n;super(),this.nsps={},this.subs=[],t&&"object"==typeof t&&(e=t,t=void 0),(e=e||{}).path=e.path||"/socket.io",this.opts=e,eT(this,e),this.reconnection(!1!==e.reconnection),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor(null!=(n=e.randomizationFactor)?n:.5),this.backoff=new ne({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==e.timeout?2e4:e.timeout),this._readyState="closed",this.uri=t;let o=e.parser||eJ;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=!1!==e.autoConnect,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return void 0===t?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var e;return void 0===t?this._reconnectionDelay:(this._reconnectionDelay=t,null==(e=this.backoff)||e.setMin(t),this)}randomizationFactor(t){var e;return void 0===t?this._randomizationFactor:(this._randomizationFactor=t,null==(e=this.backoff)||e.setJitter(t),this)}reconnectionDelayMax(t){var e;return void 0===t?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,null==(e=this.backoff)||e.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new eK(this.uri,this.opts);let e=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;let o=e9(e,"open",function(){n.onopen(),t&&t()}),r=e=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",e),t?t(e):this.maybeReconnectOnOpen()},i=e9(e,"error",r);if(!1!==this._timeout){let t=this._timeout,n=this.setTimeoutFn(()=>{o(),r(Error("timeout")),e.close()},t);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}return this.subs.push(o),this.subs.push(i),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");let t=this.engine;this.subs.push(e9(t,"ping",this.onping.bind(this)),e9(t,"data",this.ondata.bind(this)),e9(t,"error",this.onerror.bind(this)),e9(t,"close",this.onclose.bind(this)),e9(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(t){this.onclose("parse error",t)}}ondecoded(t){ew(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,e){let n=this.nsps[t];return n?this._autoConnect&&!n.active&&n.connect():(n=new nt(this,t,e),this.nsps[t]=n),n}_destroy(t){for(let t of Object.keys(this.nsps))if(this.nsps[t].active)return;this._close()}_packet(t){let e=this.encoder.encode(t);for(let n=0;n<e.length;n++)this.engine.write(e[n],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,e){var n;this.cleanup(),null==(n=this.engine)||n.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,e),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{let e=this.backoff.duration();this._reconnecting=!0;let n=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),t.skipReconnect||t.open(e=>{e?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",e)):t.onreconnect()}))},e);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){let t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}let no={};function nr(t,e){let n;"object"==typeof t&&(e=t,t=void 0);let o=function(t,e="",n){let o=t;n=n||"u">typeof location&&location,null==t&&(t=n.protocol+"//"+n.host),"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?n.protocol+t:n.host+t),/^(https?|wss?):\/\//.test(t)||(t=void 0!==n?n.protocol+"//"+t:"https://"+t),o=eH(t)),!o.port&&(/^(http|ws)$/.test(o.protocol)?o.port="80":/^(http|ws)s$/.test(o.protocol)&&(o.port="443")),o.path=o.path||"/";let r=-1!==o.host.indexOf(":")?"["+o.host+"]":o.host;return o.id=o.protocol+"://"+r+":"+o.port+e,o.href=o.protocol+"://"+r+(n&&n.port===o.port?"":":"+o.port),o}(t,(e=e||{}).path||"/socket.io"),r=o.source,i=o.id,s=o.path,a=no[i]&&s in no[i].nsps;return e.forceNew||e["force new connection"]||!1===e.multiplex||a?n=new nn(r,e):(no[i]||(no[i]=new nn(r,e)),n=no[i]),o.query&&!e.query&&(e.query=o.queryKey),n.socket(o.path,e)}Object.assign(nr,{Manager:nn,Socket:nt,io:nr,connect:nr});let ni=nr();ni.on("connect",()=>{console.log("Control UI connected to backend server with Socket.IO:",ni.id),ni.on("power_status",t=>{console.log("Received power status update:",JSON.stringify(t));let e=ns[t.id];e?e.updateStatus(t.status,t.execution_id,t.message||""):console.warn(`Could not find a registered widget for power ID: ${t.id}`)})}),ni.on("disconnect",t=>{console.log("Control UI disconnected from Socket.IO server. Reason:",t)});let ns={};document.addEventListener("alpine:init",()=>{h.default.store("materials",{groups:{},load(){fetch("/api/block_materials").then(t=>t.json()).then(t=>{this.groups=t,console.log("Shared material data loaded into Alpine store.")})}})}),window.materialPicker=function(t,e){return{isOpen:!1,selected:t||"STONE",filter:"",paramName:e}},window.powerWidget=function(t){return{power:t,formValues:{},showAdminControls:!1,currentExecutionId:null,init(){this.power&&this.power.parameters&&this.power.parameters.forEach(t=>{this.formValues[t.name]=t.default}),window.addEventListener("control-mode-changed",t=>{this.showAdminControls=t.detail.editing}),ns[this.power.power_id]=this},removeWidget(){this.$dispatch("remove-widget-from-grid",{powerId:this.power.power_id}),ns[this.power.power_id]=null},updateStatus(t,e,n=""){console.log(`updateStatus called with: status=${t}, executionId=${e}`),this.status=t,this.errorMessage=n,"running"===t?this.currentExecutionId=e:this.currentExecutionId=null},executePower(){let t=this.$refs.paramsForm;if(!t)return void console.error("Could not find the parameters form for this widget!");let e=Object.fromEntries(new FormData(t).entries());e.power_id=this.power.power_id,this.status="running",fetch("/api/execute_power",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}).then(t=>t.json()).then(t=>{t.execution_id?(this.currentExecutionId=t.execution_id,console.log(`Power execution started with ID: ${this.currentExecutionId}`)):this.updateStatus("error",null,t.error||"Failed to start execution.")}).catch(t=>{console.error("Fetch error during execution:",t),this.updateStatus("error",null,"Network error.")})},cancelPower(){this.currentExecutionId&&(console.log("Preparing to send 'cancel_power' event."),console.log(`Is socket connected? --> ${ni.connected}`),console.log(`Sending 'cancel_power' event for execution ID: ${this.currentExecutionId}`),ni.emit("cancel_power",{execution_id:this.currentExecutionId},t=>{console.log("Server acknowledged cancel request:",t)}))}}},window.socket=ni,window.controlPanel=function(){return{powers:{},layout:{grid:{columns:4},widgets:[]},isEditing:!1,sortableInstance:null,powerStatuses:{},init(){h.default.store("materials").load(),console.log("Initializing control panel..."),window.socket&&ni.on("power_status",t=>{if(console.log("Received power status update:",t),this.powerStatuses[t.id]={status:t.status,message:t.message||"",execution_id:t.execution_id||null},"dispatched"!==t.status){let e=ns[t.id];e?e.updateStatus(t.status,t.execution_id,t.message||""):console.warn(`Could not find a registered widget for power ID: ${t.id}`)}}),this.$watch("isEditing",t=>{console.log(`Edit mode changed to: ${t}`),this.sortableInstance&&(console.log(`Setting drag-and-drop to ${t?"ENABLED":"DISABLED"}.`),this.sortableInstance.option("disabled",!t)),console.log(`Broadcasting event: control-mode-changed, editing: ${t}`),window.dispatchEvent(new CustomEvent("control-mode-changed",{detail:{editing:t}}))}),Promise.all([fetch("/api/control/layout").then(t=>t.json()),fetch("/api/powers?view=control").then(t=>t.json())]).then(([t,e,n])=>{this.layout=t,this.powers=e,console.log("Layout, powers, and material data loaded."),this.$nextTick(()=>{let t=document.getElementById("power-grid");t?(console.log("Alpine has rendered the widgets. Now processing them with htmx..."),window.Alpine.initTree(t),ee.default.process(t),this.sortableInstance=new tW(t,{animation:150,onStart:e=>{t.setAttribute("x-ignore",""),console.log("Drag started: Applying x-ignore to grid.")},onEnd:e=>{t.removeAttribute("x-ignore"),console.log("Drag ended: Removing x-ignore from grid.")}}),this.sortableInstance.option("disabled",!0)):console.error("Could not find #power-grid to initialize SortableJS.")})})},getStatusForWidget(t){return this.powerStatuses[t]||{status:"Idle",message:"",execution_id:null}},refreshPowersData(){console.log("Refreshing full powers data from server..."),fetch("/api/powers?view=control").then(t=>t.json()).then(t=>{this.powers=t,console.log("Powers data has been updated.")})},getPowerData(t){return this.powers[t.power_id]||{name:"Unknown Power",parameters:[]}},addWidget(t){if(!t||this.layout.widgets.some(e=>e.power_id===t)){this.layout.widgets.some(e=>e.power_id===t)&&alert("This power is already on your control grid.");return}console.log(`Adding widget for power ID: ${t} to layout data.`),this.layout.widgets.push({power_id:t,position:[]}),this.$nextTick(()=>{console.log("Alpine has updated the DOM. Now processing the new widget with htmx.");let t=document.getElementById("power-grid");t&&t.lastElementChild&&(ee.default.process(t.lastElementChild),console.log("New widget processed by htmx."))})},removeWidget(t){this.layout.widgets=this.layout.widgets.filter(e=>e.power_id!==t),console.log(`Removed widget for power: ${t}`)}}},window.Alpine=h.default,h.default.start();
2
+ //# sourceMappingURL=control.b03e9afc.js.map