alchemy_cms 7.0.8 → 7.1.0.pre.b2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (394) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +162 -0
  3. data/Gemfile +9 -11
  4. data/README.md +11 -9
  5. data/alchemy_cms.gemspec +4 -3
  6. data/app/assets/config/alchemy_manifest.js +3 -5
  7. data/app/assets/images/alchemy/missing-image.svg +1 -1
  8. data/app/assets/javascripts/alchemy/admin.js +1 -23
  9. data/app/assets/javascripts/alchemy/alchemy.confirm_dialog.js.coffee +2 -3
  10. data/app/assets/javascripts/alchemy/alchemy.dialog.js.coffee +19 -34
  11. data/app/assets/javascripts/alchemy/alchemy.elements_window.js.coffee +38 -13
  12. data/app/assets/javascripts/alchemy/alchemy.file_progress.js.coffee +1 -1
  13. data/app/assets/javascripts/alchemy/alchemy.fixed_elements.js +32 -25
  14. data/app/assets/javascripts/alchemy/alchemy.growler.js.coffee +1 -1
  15. data/app/assets/javascripts/alchemy/alchemy.image_overlay.coffee +3 -5
  16. data/app/assets/javascripts/alchemy/alchemy.initializer.js.coffee +0 -57
  17. data/app/assets/javascripts/alchemy/alchemy.link_dialog.js.coffee +24 -65
  18. data/app/assets/javascripts/alchemy/alchemy.list_filter.js.coffee +2 -2
  19. data/app/assets/javascripts/alchemy/alchemy.preview.js.coffee +5 -4
  20. data/app/assets/javascripts/alchemy/alchemy.preview_window.js.coffee +5 -5
  21. data/app/assets/javascripts/alchemy/templates/index.js +0 -2
  22. data/app/assets/javascripts/alchemy/templates/node_folder.hbs +1 -1
  23. data/app/assets/javascripts/alchemy/templates/page.hbs +1 -1
  24. data/app/assets/javascripts/alchemy/templates/page_folder.hbs +2 -2
  25. data/app/assets/javascripts/tinymce/icons/remixicons/icons.js +93 -0
  26. data/app/assets/javascripts/tinymce/plugins/alchemy_link/plugin.min.js +37 -18
  27. data/app/assets/stylesheets/alchemy/_custom-properties.scss +82 -0
  28. data/app/assets/stylesheets/alchemy/_mixins.scss +38 -30
  29. data/app/assets/stylesheets/alchemy/_variables.scss +23 -8
  30. data/app/assets/stylesheets/alchemy/admin.scss +3 -4
  31. data/app/assets/stylesheets/alchemy/archive.scss +110 -50
  32. data/app/assets/stylesheets/alchemy/attachments.scss +5 -4
  33. data/app/assets/stylesheets/alchemy/buttons.scss +41 -166
  34. data/app/assets/stylesheets/alchemy/dashboard.scss +31 -6
  35. data/app/assets/stylesheets/alchemy/dialogs.scss +12 -28
  36. data/app/assets/stylesheets/alchemy/elements.scss +272 -282
  37. data/app/assets/stylesheets/alchemy/flash.scss +20 -12
  38. data/app/assets/stylesheets/alchemy/forms.scss +21 -34
  39. data/app/assets/stylesheets/alchemy/frame.scss +11 -32
  40. data/app/assets/stylesheets/alchemy/hints.scss +4 -62
  41. data/app/assets/stylesheets/alchemy/image_library.scss +36 -33
  42. data/app/assets/stylesheets/alchemy/menubar.scss +7 -6
  43. data/app/assets/stylesheets/alchemy/navigation.scss +27 -15
  44. data/app/assets/stylesheets/alchemy/nodes.scss +11 -7
  45. data/app/assets/stylesheets/alchemy/notices.scss +16 -4
  46. data/app/assets/stylesheets/alchemy/page-select.scss +10 -2
  47. data/app/assets/stylesheets/alchemy/pagination.scss +22 -13
  48. data/app/assets/stylesheets/alchemy/resource_info.scss +7 -5
  49. data/app/assets/stylesheets/alchemy/selects.scss +49 -42
  50. data/app/assets/stylesheets/alchemy/shoelace.scss +345 -0
  51. data/app/assets/stylesheets/alchemy/sitemap.scss +24 -14
  52. data/app/assets/stylesheets/alchemy/spinner.scss +9 -19
  53. data/app/assets/stylesheets/alchemy/tables.scss +16 -24
  54. data/app/assets/stylesheets/alchemy/tags.scss +4 -0
  55. data/app/assets/stylesheets/alchemy/toolbar.scss +29 -25
  56. data/app/assets/stylesheets/alchemy/upload.scss +140 -89
  57. data/app/assets/stylesheets/tinymce/skins/content/alchemy/content.min.scss +69 -0
  58. data/app/assets/stylesheets/tinymce/skins/skintool.json +38 -0
  59. data/app/assets/stylesheets/tinymce/skins/ui/alchemy/content.css +711 -0
  60. data/app/assets/stylesheets/tinymce/skins/ui/alchemy/content.inline.css +705 -0
  61. data/app/assets/stylesheets/tinymce/skins/ui/alchemy/content.inline.min.css +7 -0
  62. data/app/assets/stylesheets/tinymce/skins/ui/alchemy/content.min.css +7 -0
  63. data/app/assets/stylesheets/tinymce/skins/ui/alchemy/content.mobile.css +29 -0
  64. data/app/assets/stylesheets/tinymce/skins/ui/alchemy/content.mobile.min.css +7 -0
  65. data/app/assets/stylesheets/tinymce/skins/ui/alchemy/fonts/tinymce-mobile.woff +0 -0
  66. data/app/assets/stylesheets/tinymce/skins/ui/alchemy/skin.min.scss +3798 -0
  67. data/app/assets/stylesheets/tinymce/skins/ui/alchemy/skin.mobile.css +677 -0
  68. data/app/assets/stylesheets/tinymce/skins/ui/alchemy/skin.mobile.min.css +7 -0
  69. data/app/components/alchemy/admin/node_select.rb +39 -0
  70. data/app/components/alchemy/admin/page_select.rb +42 -0
  71. data/app/controllers/alchemy/admin/base_controller.rb +5 -6
  72. data/app/controllers/alchemy/admin/elements_controller.rb +63 -35
  73. data/app/controllers/alchemy/admin/pages_controller.rb +9 -4
  74. data/app/controllers/alchemy/base_controller.rb +4 -2
  75. data/app/controllers/concerns/alchemy/admin/uploader_responses.rb +1 -1
  76. data/app/controllers/concerns/alchemy/site_redirects.rb +1 -1
  77. data/app/decorators/alchemy/element_editor.rb +0 -2
  78. data/app/helpers/alchemy/admin/attachments_helper.rb +6 -5
  79. data/app/helpers/alchemy/admin/base_helper.rb +17 -12
  80. data/app/helpers/alchemy/admin/ingredients_helper.rb +4 -1
  81. data/app/helpers/alchemy/admin/pages_helper.rb +5 -11
  82. data/app/helpers/alchemy/base_helper.rb +47 -13
  83. data/app/javascript/alchemy_admin/clipboard.js +16 -0
  84. data/app/javascript/alchemy_admin/components/alchemy_html_element.js +129 -0
  85. data/app/javascript/alchemy_admin/components/button.js +59 -0
  86. data/app/javascript/alchemy_admin/components/char_counter.js +40 -0
  87. data/app/javascript/alchemy_admin/components/datepicker.js +39 -0
  88. data/app/javascript/alchemy_admin/components/dialog_link.js +45 -0
  89. data/app/javascript/alchemy_admin/components/element_editor/publish_element_button.js +36 -0
  90. data/app/javascript/alchemy_admin/components/element_editor.js +553 -0
  91. data/app/javascript/alchemy_admin/components/ingredient_group.js +54 -0
  92. data/app/javascript/alchemy_admin/components/link_buttons/link_button.js +48 -0
  93. data/app/javascript/alchemy_admin/components/link_buttons/unlink_button.js +38 -0
  94. data/app/javascript/alchemy_admin/components/link_buttons.js +79 -0
  95. data/app/javascript/alchemy_admin/components/node_select.js +45 -0
  96. data/app/javascript/alchemy_admin/components/overlay.js +18 -0
  97. data/app/javascript/alchemy_admin/components/page_select.js +63 -0
  98. data/app/javascript/alchemy_admin/components/remote_select.js +134 -0
  99. data/app/javascript/alchemy_admin/components/select.js +12 -0
  100. data/app/javascript/alchemy_admin/components/spinner.js +31 -0
  101. data/app/javascript/alchemy_admin/components/tinymce.js +134 -0
  102. data/app/javascript/alchemy_admin/components/uploader/file_upload.js +266 -0
  103. data/app/javascript/alchemy_admin/components/uploader/progress.js +258 -0
  104. data/app/javascript/alchemy_admin/components/uploader.js +132 -0
  105. data/app/javascript/alchemy_admin/dirty.js +49 -0
  106. data/app/javascript/alchemy_admin/file_editors.js +1 -1
  107. data/app/javascript/alchemy_admin/gui.js +14 -0
  108. data/app/javascript/alchemy_admin/i18n.js +12 -8
  109. data/app/javascript/alchemy_admin/image_cropper.js +6 -3
  110. data/app/javascript/alchemy_admin/image_loader.js +7 -15
  111. data/app/javascript/alchemy_admin/ingredient_anchor_link.js +2 -5
  112. data/app/javascript/alchemy_admin/initializer.js +65 -0
  113. data/app/javascript/alchemy_admin/locales/en.js +31 -0
  114. data/app/javascript/alchemy_admin/picture_editors.js +6 -4
  115. data/app/javascript/alchemy_admin/picture_selector.js +38 -0
  116. data/app/javascript/alchemy_admin/please_wait_overlay.js +8 -0
  117. data/app/javascript/alchemy_admin/sortable_elements.js +78 -0
  118. data/app/javascript/alchemy_admin/spinner.js +36 -0
  119. data/app/javascript/alchemy_admin/tags_autocomplete.js +46 -0
  120. data/app/javascript/alchemy_admin/utils/ajax.js +6 -5
  121. data/app/javascript/alchemy_admin/utils/debounce.js +10 -0
  122. data/app/javascript/alchemy_admin/utils/dom_helpers.js +20 -0
  123. data/app/javascript/alchemy_admin/utils/format.js +11 -0
  124. data/app/javascript/alchemy_admin/utils/max.js +3 -0
  125. data/app/javascript/alchemy_admin/utils/string_conversions.js +10 -0
  126. data/app/javascript/alchemy_admin.js +64 -13
  127. data/app/javascript/menubar.js +10 -0
  128. data/app/models/alchemy/attachment.rb +9 -11
  129. data/app/models/alchemy/element.rb +11 -0
  130. data/app/models/alchemy/ingredients/richtext.rb +1 -10
  131. data/app/models/alchemy/node.rb +4 -0
  132. data/app/models/alchemy/page/page_naming.rb +7 -0
  133. data/app/models/alchemy/page/page_natures.rb +10 -2
  134. data/app/models/alchemy/page.rb +11 -51
  135. data/app/models/alchemy/picture/url.rb +1 -9
  136. data/app/models/alchemy/picture_variant.rb +11 -2
  137. data/app/models/concerns/alchemy/picture_thumbnails.rb +1 -1
  138. data/app/serializers/alchemy/page_tree_serializer.rb +2 -1
  139. data/app/services/alchemy/copy_page.rb +98 -0
  140. data/app/views/alchemy/_menubar.html.erb +17 -13
  141. data/app/views/alchemy/admin/attachments/_archive_overlay.html.erb +14 -10
  142. data/app/views/alchemy/admin/attachments/_attachment.html.erb +44 -36
  143. data/app/views/alchemy/admin/attachments/_replace_button.html.erb +15 -21
  144. data/app/views/alchemy/admin/attachments/archive_overlay.js.erb +0 -1
  145. data/app/views/alchemy/admin/attachments/assign.js.erb +1 -1
  146. data/app/views/alchemy/admin/attachments/index.html.erb +6 -4
  147. data/app/views/alchemy/admin/attachments/show.html.erb +10 -23
  148. data/app/views/alchemy/admin/clipboard/clear.js.erb +1 -1
  149. data/app/views/alchemy/admin/clipboard/index.html.erb +3 -7
  150. data/app/views/alchemy/admin/clipboard/insert.js.erb +1 -1
  151. data/app/views/alchemy/admin/crop.html.erb +1 -1
  152. data/app/views/alchemy/admin/dashboard/_locked_pages.html.erb +1 -1
  153. data/app/views/alchemy/admin/dashboard/index.html.erb +13 -11
  154. data/app/views/alchemy/admin/dashboard/info.html.erb +7 -7
  155. data/app/views/alchemy/admin/elements/_add_nested_element_form.html.erb +21 -23
  156. data/app/views/alchemy/admin/elements/_element.html.erb +52 -44
  157. data/app/views/alchemy/admin/elements/_footer.html.erb +1 -1
  158. data/app/views/alchemy/admin/elements/_form.html.erb +1 -1
  159. data/app/views/alchemy/admin/elements/_header.html.erb +11 -12
  160. data/app/views/alchemy/admin/elements/_toolbar.html.erb +33 -45
  161. data/app/views/alchemy/admin/elements/create.js.erb +7 -15
  162. data/app/views/alchemy/admin/elements/destroy.js.erb +0 -2
  163. data/app/views/alchemy/admin/elements/index.html.erb +27 -24
  164. data/app/views/alchemy/admin/elements/new.html.erb +9 -11
  165. data/app/views/alchemy/admin/ingredients/_file_fields.html.erb +2 -2
  166. data/app/views/alchemy/admin/ingredients/_picture_fields.html.erb +3 -3
  167. data/app/views/alchemy/admin/ingredients/_video_fields.html.erb +1 -2
  168. data/app/views/alchemy/admin/languages/_form.html.erb +2 -3
  169. data/app/views/alchemy/admin/languages/_language.html.erb +15 -8
  170. data/app/views/alchemy/admin/languages/_table.html.erb +1 -0
  171. data/app/views/alchemy/admin/layoutpages/_layoutpage.html.erb +28 -16
  172. data/app/views/alchemy/admin/layoutpages/index.html.erb +2 -2
  173. data/app/views/alchemy/admin/legacy_page_urls/_legacy_page_url.html.erb +12 -8
  174. data/app/views/alchemy/admin/legacy_page_urls/_new.html.erb +1 -1
  175. data/app/views/alchemy/admin/nodes/_form.html.erb +20 -21
  176. data/app/views/alchemy/admin/nodes/_node.html.erb +39 -34
  177. data/app/views/alchemy/admin/nodes/index.html.erb +1 -1
  178. data/app/views/alchemy/admin/pages/_anchor_link.html.erb +4 -4
  179. data/app/views/alchemy/admin/pages/_create_language_form.html.erb +2 -2
  180. data/app/views/alchemy/admin/pages/_current_page.html.erb +1 -1
  181. data/app/views/alchemy/admin/pages/_external_link.html.erb +4 -4
  182. data/app/views/alchemy/admin/pages/_file_link.html.erb +5 -5
  183. data/app/views/alchemy/admin/pages/_form.html.erb +10 -21
  184. data/app/views/alchemy/admin/pages/_internal_link.html.erb +4 -4
  185. data/app/views/alchemy/admin/pages/_locked_page.html.erb +2 -2
  186. data/app/views/alchemy/admin/pages/_new_page_form.html.erb +4 -17
  187. data/app/views/alchemy/admin/pages/_page.html.erb +76 -72
  188. data/app/views/alchemy/admin/pages/_page_infos.html.erb +23 -7
  189. data/app/views/alchemy/admin/pages/_page_layout_filter.html.erb +2 -1
  190. data/app/views/alchemy/admin/pages/_page_status.html.erb +11 -21
  191. data/app/views/alchemy/admin/pages/_publication_fields.html.erb +2 -5
  192. data/app/views/alchemy/admin/pages/_table.html.erb +1 -1
  193. data/app/views/alchemy/admin/pages/_table_row.html.erb +43 -39
  194. data/app/views/alchemy/admin/pages/_toolbar.html.erb +43 -38
  195. data/app/views/alchemy/admin/pages/configure.html.erb +12 -14
  196. data/app/views/alchemy/admin/pages/edit.html.erb +80 -103
  197. data/app/views/alchemy/admin/pages/info.html.erb +20 -11
  198. data/app/views/alchemy/admin/pages/link.html.erb +22 -16
  199. data/app/views/alchemy/admin/pages/new.html.erb +9 -11
  200. data/app/views/alchemy/admin/pages/unlock.js.erb +10 -3
  201. data/app/views/alchemy/admin/partials/_language_tree_select.html.erb +15 -13
  202. data/app/views/alchemy/admin/partials/_main_navigation_entry.html.erb +3 -5
  203. data/app/views/alchemy/admin/partials/_routes.html.erb +10 -2
  204. data/app/views/alchemy/admin/partials/_site_select.html.erb +6 -5
  205. data/app/views/alchemy/admin/partials/_toolbar_button.html.erb +28 -23
  206. data/app/views/alchemy/admin/pictures/_archive.html.erb +5 -5
  207. data/app/views/alchemy/admin/pictures/_archive_overlay.html.erb +1 -1
  208. data/app/views/alchemy/admin/pictures/_filter_and_size_bar.html.erb +21 -23
  209. data/app/views/alchemy/admin/pictures/_infos.html.erb +2 -6
  210. data/app/views/alchemy/admin/pictures/_picture.html.erb +17 -21
  211. data/app/views/alchemy/admin/pictures/_picture_to_assign.html.erb +17 -16
  212. data/app/views/alchemy/admin/pictures/_tag_list.html.erb +1 -1
  213. data/app/views/alchemy/admin/pictures/archive_overlay.js.erb +1 -1
  214. data/app/views/alchemy/admin/pictures/assign.js.erb +1 -1
  215. data/app/views/alchemy/admin/pictures/index.html.erb +34 -30
  216. data/app/views/alchemy/admin/pictures/show.html.erb +3 -3
  217. data/app/views/alchemy/admin/resources/_filter.html.erb +2 -2
  218. data/app/views/alchemy/admin/resources/_form.html.erb +2 -2
  219. data/app/views/alchemy/admin/resources/_per_page_select.html.erb +1 -1
  220. data/app/views/alchemy/admin/resources/_resource.html.erb +16 -9
  221. data/app/views/alchemy/admin/resources/_table.html.erb +4 -1
  222. data/app/views/alchemy/admin/resources/index.html.erb +22 -19
  223. data/app/views/alchemy/admin/sites/index.html.erb +2 -1
  224. data/app/views/alchemy/admin/styleguide/index.html.erb +54 -28
  225. data/app/views/alchemy/admin/tags/_tag.html.erb +16 -14
  226. data/app/views/alchemy/admin/tags/index.html.erb +15 -12
  227. data/app/views/alchemy/admin/tinymce/_setup.html.erb +28 -0
  228. data/app/views/alchemy/admin/uploader/_button.html.erb +23 -29
  229. data/app/views/alchemy/admin/uploader/_setup.html.erb +3 -8
  230. data/app/views/alchemy/base/500.html.erb +1 -1
  231. data/app/views/alchemy/base/error_notice.js.erb +0 -1
  232. data/app/views/alchemy/ingredients/_boolean_editor.html.erb +1 -1
  233. data/app/views/alchemy/ingredients/_datetime_editor.html.erb +1 -1
  234. data/app/views/alchemy/ingredients/_file_editor.html.erb +5 -5
  235. data/app/views/alchemy/ingredients/_link_editor.html.erb +1 -1
  236. data/app/views/alchemy/ingredients/_node_editor.html.erb +6 -19
  237. data/app/views/alchemy/ingredients/_page_editor.html.erb +7 -19
  238. data/app/views/alchemy/ingredients/_picture_editor.html.erb +2 -2
  239. data/app/views/alchemy/ingredients/_richtext_editor.html.erb +6 -15
  240. data/app/views/alchemy/ingredients/_select_editor.html.erb +2 -1
  241. data/app/views/alchemy/ingredients/_text_editor.html.erb +1 -1
  242. data/app/views/alchemy/ingredients/shared/_anchor.html.erb +1 -1
  243. data/app/views/alchemy/ingredients/shared/_link_tools.html.erb +10 -20
  244. data/app/views/alchemy/ingredients/shared/_picture_tools.html.erb +42 -49
  245. data/app/views/kaminari/alchemy/_first_page.html.erb +4 -2
  246. data/app/views/kaminari/alchemy/_gap.html.erb +1 -1
  247. data/app/views/kaminari/alchemy/_last_page.html.erb +4 -2
  248. data/app/views/kaminari/alchemy/_next_page.html.erb +4 -2
  249. data/app/views/kaminari/alchemy/_prev_page.html.erb +4 -2
  250. data/app/views/layouts/alchemy/admin.html.erb +10 -29
  251. data/bundles/shoelace.js +10 -0
  252. data/bundles/tinymce.js +20 -0
  253. data/config/alchemy/config.yml +11 -10
  254. data/config/alchemy/modules.yml +30 -30
  255. data/config/brakeman.ignore +0 -34
  256. data/config/importmap.rb +9 -5
  257. data/config/initializers/dragonfly.rb +1 -0
  258. data/config/initializers/rails_live_reload.rb +13 -0
  259. data/config/locales/alchemy.en.yml +25 -9
  260. data/config/routes.rb +2 -1
  261. data/lib/alchemy/auth_accessors.rb +6 -1
  262. data/lib/alchemy/config.rb +24 -2
  263. data/lib/alchemy/dev_support/live_reload_watcher.rb +5 -0
  264. data/lib/alchemy/engine.rb +10 -3
  265. data/lib/alchemy/forms/builder.rb +18 -12
  266. data/lib/alchemy/resources_helper.rb +3 -3
  267. data/lib/alchemy/test_support/capybara_helpers.rb +8 -5
  268. data/lib/alchemy/test_support/having_picture_thumbnails_examples.rb +6 -6
  269. data/lib/alchemy/test_support/rspec_matchers.rb +14 -0
  270. data/lib/alchemy/test_support/shared_uploader_examples.rb +1 -1
  271. data/lib/alchemy/tinymce.rb +19 -3
  272. data/lib/alchemy/version.rb +1 -1
  273. data/package.json +30 -9
  274. data/rollup.config.mjs +65 -0
  275. data/vendor/assets/fonts/remixicon.eot +0 -0
  276. data/vendor/assets/fonts/remixicon.svg +7816 -0
  277. data/vendor/assets/fonts/remixicon.ttf +0 -0
  278. data/vendor/assets/fonts/remixicon.woff +0 -0
  279. data/vendor/assets/fonts/remixicon.woff2 +0 -0
  280. data/vendor/assets/stylesheets/remixicon.scss +10480 -0
  281. data/vendor/assets/stylesheets/tinymce/skins/content/default/content.min.css +1 -0
  282. data/vendor/javascript/clipboard.min.js +7 -0
  283. data/vendor/javascript/flatpickr.min.js +1 -0
  284. data/vendor/javascript/keymaster.min.js +1 -0
  285. data/vendor/javascript/rails-ujs.min.js +1 -0
  286. data/vendor/javascript/shoelace.min.js +995 -0
  287. data/vendor/javascript/sortable.min.js +7 -0
  288. data/vendor/javascript/tinymce.min.js +1 -0
  289. data/vendor/javascript/ungap-custom-elements.min.js +3 -0
  290. metadata +111 -124
  291. data/.codeclimate.yml +0 -35
  292. data/.editorconfig +0 -23
  293. data/.github/FUNDING.yml +0 -4
  294. data/.github/ISSUE_TEMPLATE/Bug_report.md +0 -22
  295. data/.github/ISSUE_TEMPLATE/Feature_request.md +0 -17
  296. data/.github/PULL_REQUEST_TEMPLATE.md +0 -18
  297. data/.github/workflows/brakeman-analysis.yml +0 -46
  298. data/.github/workflows/lint.yml +0 -37
  299. data/.github/workflows/stale.yml +0 -33
  300. data/.github/workflows/test.yml +0 -124
  301. data/.gitignore +0 -31
  302. data/.hound.yml +0 -9
  303. data/.localeapp/config.rb +0 -8
  304. data/.prettierrc +0 -6
  305. data/.rspec +0 -1
  306. data/.rubocop.yml +0 -7
  307. data/.standard.yml +0 -4
  308. data/.yardopts +0 -5
  309. data/app/assets/javascripts/alchemy/alchemy.autocomplete.js.coffee +0 -30
  310. data/app/assets/javascripts/alchemy/alchemy.base.js.coffee +0 -53
  311. data/app/assets/javascripts/alchemy/alchemy.buttons.js.coffee +0 -45
  312. data/app/assets/javascripts/alchemy/alchemy.char_counter.js.coffee +0 -19
  313. data/app/assets/javascripts/alchemy/alchemy.dirty.js.coffee +0 -59
  314. data/app/assets/javascripts/alchemy/alchemy.dragndrop.js.coffee +0 -79
  315. data/app/assets/javascripts/alchemy/alchemy.element_editors.js.coffee +0 -267
  316. data/app/assets/javascripts/alchemy/alchemy.gui.js.coffee +0 -27
  317. data/app/assets/javascripts/alchemy/alchemy.spinner.js +0 -32
  318. data/app/assets/javascripts/alchemy/alchemy.tooltips.coffee +0 -10
  319. data/app/assets/javascripts/alchemy/alchemy.uploader.js.coffee +0 -131
  320. data/app/assets/javascripts/alchemy/menubar.js.coffee +0 -8
  321. data/app/assets/javascripts/alchemy/node_select.js +0 -39
  322. data/app/assets/javascripts/alchemy/page_select.js +0 -46
  323. data/app/assets/javascripts/alchemy/templates/node.hbs +0 -16
  324. data/app/assets/javascripts/alchemy/templates/spinner.hbs +0 -7
  325. data/app/assets/stylesheets/alchemy/jquery-ui.scss +0 -435
  326. data/app/assets/stylesheets/tinymce/skins/alchemy/content.min.css.scss +0 -94
  327. data/app/assets/stylesheets/tinymce/skins/alchemy/fonts/tinymce-small.svg +0 -63
  328. data/app/assets/stylesheets/tinymce/skins/alchemy/fonts/tinymce-small.ttf +0 -0
  329. data/app/assets/stylesheets/tinymce/skins/alchemy/fonts/tinymce-small.woff +0 -0
  330. data/app/assets/stylesheets/tinymce/skins/alchemy/fonts/tinymce.svg +0 -129
  331. data/app/assets/stylesheets/tinymce/skins/alchemy/fonts/tinymce.ttf +0 -0
  332. data/app/assets/stylesheets/tinymce/skins/alchemy/fonts/tinymce.woff +0 -0
  333. data/app/assets/stylesheets/tinymce/skins/alchemy/img/anchor.gif +0 -0
  334. data/app/assets/stylesheets/tinymce/skins/alchemy/img/loader.gif +0 -0
  335. data/app/assets/stylesheets/tinymce/skins/alchemy/img/object.gif +0 -0
  336. data/app/assets/stylesheets/tinymce/skins/alchemy/img/trans.gif +0 -0
  337. data/app/assets/stylesheets/tinymce/skins/alchemy/skin.min.css.scss +0 -2105
  338. data/app/javascript/alchemy_admin/datepicker.js +0 -33
  339. data/app/javascript/alchemy_admin/tinymce.js +0 -146
  340. data/app/javascript/alchemy_admin/translations.js +0 -32
  341. data/app/views/alchemy/admin/elements/fold.js.erb +0 -33
  342. data/app/views/alchemy/admin/elements/order.js.erb +0 -11
  343. data/app/views/alchemy/admin/elements/publish.js.erb +0 -21
  344. data/app/views/alchemy/admin/elements/update.js.erb +0 -27
  345. data/vendor/assets/fonts/fa-regular-400.eot +0 -0
  346. data/vendor/assets/fonts/fa-regular-400.svg +0 -803
  347. data/vendor/assets/fonts/fa-regular-400.ttf +0 -0
  348. data/vendor/assets/fonts/fa-regular-400.woff +0 -0
  349. data/vendor/assets/fonts/fa-regular-400.woff2 +0 -0
  350. data/vendor/assets/fonts/fa-solid-900.eot +0 -0
  351. data/vendor/assets/fonts/fa-solid-900.svg +0 -4938
  352. data/vendor/assets/fonts/fa-solid-900.ttf +0 -0
  353. data/vendor/assets/fonts/fa-solid-900.woff +0 -0
  354. data/vendor/assets/fonts/fa-solid-900.woff2 +0 -0
  355. data/vendor/assets/javascripts/clipboard.min.js +0 -7
  356. data/vendor/assets/javascripts/fileupload/jquery.fileupload-process.js +0 -178
  357. data/vendor/assets/javascripts/fileupload/jquery.fileupload-validate.js +0 -125
  358. data/vendor/assets/javascripts/fileupload/jquery.fileupload.js +0 -1502
  359. data/vendor/assets/javascripts/fileupload/jquery.iframe-transport.js +0 -224
  360. data/vendor/assets/javascripts/jquery-ui/data.js +0 -45
  361. data/vendor/assets/javascripts/jquery-ui/ie.js +0 -20
  362. data/vendor/assets/javascripts/jquery-ui/keycode.js +0 -51
  363. data/vendor/assets/javascripts/jquery-ui/plugin.js +0 -49
  364. data/vendor/assets/javascripts/jquery-ui/safe-active-element.js +0 -46
  365. data/vendor/assets/javascripts/jquery-ui/safe-blur.js +0 -27
  366. data/vendor/assets/javascripts/jquery-ui/scroll-parent.js +0 -50
  367. data/vendor/assets/javascripts/jquery-ui/unique-id.js +0 -54
  368. data/vendor/assets/javascripts/jquery-ui/version.js +0 -20
  369. data/vendor/assets/javascripts/jquery-ui/widget.js +0 -754
  370. data/vendor/assets/javascripts/jquery-ui/widgets/draggable.js +0 -1268
  371. data/vendor/assets/javascripts/jquery-ui/widgets/mouse.js +0 -241
  372. data/vendor/assets/javascripts/jquery-ui/widgets/sortable.js +0 -1623
  373. data/vendor/assets/javascripts/jquery-ui/widgets/tabs.js +0 -931
  374. data/vendor/assets/javascripts/jquery_plugins/jquery.scrollTo.min.js +0 -7
  375. data/vendor/assets/javascripts/jquery_plugins/jquery.ui.tabspaging.js +0 -296
  376. data/vendor/assets/javascripts/keymaster.js +0 -296
  377. data/vendor/assets/javascripts/requestAnimationFrame.js +0 -31
  378. data/vendor/assets/javascripts/tinymce/license.txt +0 -504
  379. data/vendor/assets/javascripts/tinymce/tinymce.min.js +0 -2
  380. data/vendor/assets/stylesheets/fontawesome/_animated.scss +0 -20
  381. data/vendor/assets/stylesheets/fontawesome/_bordered-pulled.scss +0 -20
  382. data/vendor/assets/stylesheets/fontawesome/_core.scss +0 -21
  383. data/vendor/assets/stylesheets/fontawesome/_fixed-width.scss +0 -6
  384. data/vendor/assets/stylesheets/fontawesome/_icons.scss +0 -1441
  385. data/vendor/assets/stylesheets/fontawesome/_larger.scss +0 -23
  386. data/vendor/assets/stylesheets/fontawesome/_list.scss +0 -18
  387. data/vendor/assets/stylesheets/fontawesome/_mixins.scss +0 -56
  388. data/vendor/assets/stylesheets/fontawesome/_rotated-flipped.scss +0 -24
  389. data/vendor/assets/stylesheets/fontawesome/_screen-reader.scss +0 -5
  390. data/vendor/assets/stylesheets/fontawesome/_stacked.scss +0 -31
  391. data/vendor/assets/stylesheets/fontawesome/_variables.scss +0 -1458
  392. data/vendor/assets/stylesheets/fontawesome/fontawesome.scss +0 -16
  393. data/vendor/assets/stylesheets/fontawesome/regular.scss +0 -23
  394. data/vendor/assets/stylesheets/fontawesome/solid.scss +0 -24
@@ -0,0 +1,7 @@
1
+ /**!
2
+ * Sortable 1.15.1
3
+ * @author RubaXa <trash@rubaxa.org>
4
+ * @author owenm <owen23355@gmail.com>
5
+ * @license MIT
6
+ */
7
+ function t(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 e(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?t(Object(i),!0).forEach((function(t){o(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):t(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function n(t){return n="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},n(t)}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(){return i=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},i.apply(this,arguments)}function r(t,e){if(null==t)return{};var n,o,i=function(t,e){if(null==t)return{};var n,o,i={},r=Object.keys(t);for(o=0;o<r.length;o++)n=r[o],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(o=0;o<r.length;o++)n=r[o],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function a(t){return function(t){if(Array.isArray(t))return l(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return l(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function s(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var c=s(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),u=s(/Edge/i),d=s(/firefox/i),h=s(/safari/i)&&!s(/chrome/i)&&!s(/android/i),f=s(/iP(ad|od|hone)/i),p=s(/chrome/i)&&s(/android/i),g={capture:!1,passive:!1};function v(t,e,n){t.addEventListener(e,n,!c&&g)}function m(t,e,n){t.removeEventListener(e,n,!c&&g)}function b(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}return!1}}function y(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function w(t,e,n,o){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&b(t,e):b(t,e))||o&&t===n)return t;if(t===n)break}while(t=y(t))}return null}var E,D=/\s+/g;function S(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(D," ").replace(" "+e+" "," ");t.className=(o+(n?" "+e:"")).replace(D," ")}}function _(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];e in o||-1!==e.indexOf("webkit")||(e="-webkit-"+e),o[e]=n+("string"==typeof n?"":"px")}}function C(t,e){var n="";if("string"==typeof t)n=t;else do{var o=_(t,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function T(t,e,n){if(t){var o=t.getElementsByTagName(e),i=0,r=o.length;if(n)for(;i<r;i++)n(o[i],i);return o}return[]}function x(){var t=document.scrollingElement;return t||document.documentElement}function O(t,e,n,o,i){if(t.getBoundingClientRect||t===window){var r,a,l,s,u,d,h;if(t!==window&&t.parentNode&&t!==x()?(a=(r=t.getBoundingClientRect()).top,l=r.left,s=r.bottom,u=r.right,d=r.height,h=r.width):(a=0,l=0,s=window.innerHeight,u=window.innerWidth,d=window.innerHeight,h=window.innerWidth),(e||n)&&t!==window&&(i=i||t.parentNode,!c))do{if(i&&i.getBoundingClientRect&&("none"!==_(i,"transform")||n&&"static"!==_(i,"position"))){var f=i.getBoundingClientRect();a-=f.top+parseInt(_(i,"border-top-width")),l-=f.left+parseInt(_(i,"border-left-width")),s=a+r.height,u=l+r.width;break}}while(i=i.parentNode);if(o&&t!==window){var p=C(i||t),g=p&&p.a,v=p&&p.d;p&&(s=(a/=v)+(d/=v),u=(l/=g)+(h/=g))}return{top:a,left:l,bottom:s,right:u,width:h,height:d}}}function M(t){var e=O(t),n=parseInt(_(t,"padding-left")),o=parseInt(_(t,"padding-top")),i=parseInt(_(t,"padding-right")),r=parseInt(_(t,"padding-bottom"));return e.top+=o+parseInt(_(t,"border-top-width")),e.left+=n+parseInt(_(t,"border-left-width")),e.width=t.clientWidth-n-i,e.height=t.clientHeight-o-r,e.bottom=e.top+e.height,e.right=e.left+e.width,e}function A(t,e,n){for(var o=R(t,!0),i=O(t)[e];o;){var r=O(o)[n];if(!("top"===n||"left"===n?i>=r:i<=r))return o;if(o===x())break;o=R(o,!1)}return!1}function I(t,e,n,o){for(var i=0,r=0,a=t.children;r<a.length;){if("none"!==a[r].style.display&&a[r]!==jt.ghost&&(o||a[r]!==jt.dragged)&&w(a[r],n.draggable,t,!1)){if(i===e)return a[r];i++}r++}return null}function N(t,e){for(var n=t.lastElementChild;n&&(n===jt.ghost||"none"===_(n,"display")||e&&!b(n,e));)n=n.previousElementSibling;return n||null}function P(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===jt.clone||e&&!b(t,e)||n++;return n}function k(t){var e=0,n=0,o=x();if(t)do{var i=C(t),r=i.a,a=i.d;e+=t.scrollLeft*r,n+=t.scrollTop*a}while(t!==o&&(t=t.parentNode));return[e,n]}function R(t,e){if(!t||!t.getBoundingClientRect)return x();var n=t,o=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=_(n);if(n.clientWidth<n.scrollWidth&&("auto"==i.overflowX||"scroll"==i.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==i.overflowY||"scroll"==i.overflowY)){if(!n.getBoundingClientRect||n===document.body)return x();if(o||e)return n;o=!0}}}while(n=n.parentNode);return x()}function X(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 Y(t,e){return function(){if(!E){var n=arguments;1===n.length?t.call(this,n[0]):t.apply(this,n),E=setTimeout((function(){E=void 0}),e)}}}function B(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function F(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 H(t,e){_(t,"position","absolute"),_(t,"top",e.top),_(t,"left",e.left),_(t,"width",e.width),_(t,"height",e.height)}function j(t){_(t,"position",""),_(t,"top",""),_(t,"left",""),_(t,"width",""),_(t,"height","")}var L="Sortable"+(new Date).getTime();function W(){var t,n=[];return{captureAnimationState:function(){(n=[],this.options.animation)&&[].slice.call(this.el.children).forEach((function(t){if("none"!==_(t,"display")&&t!==jt.ghost){n.push({target:t,rect:O(t)});var o=e({},n[n.length-1].rect);if(t.thisAnimationDuration){var i=C(t,!0);i&&(o.top-=i.f,o.left-=i.e)}t.fromRect=o}}))},addAnimationState:function(t){n.push(t)},removeAnimationState:function(t){n.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}(n,{target:t}),1)},animateAll:function(e){var o=this;if(!this.options.animation)return clearTimeout(t),void("function"==typeof e&&e());var i=!1,r=0;n.forEach((function(t){var e=0,n=t.target,a=n.fromRect,l=O(n),s=n.prevFromRect,c=n.prevToRect,u=t.rect,d=C(n,!0);d&&(l.top-=d.f,l.left-=d.e),n.toRect=l,n.thisAnimationDuration&&X(s,l)&&!X(a,l)&&(u.top-l.top)/(u.left-l.left)==(a.top-l.top)/(a.left-l.left)&&(e=function(t,e,n,o){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*o.animation}(u,s,c,o.options)),X(l,a)||(n.prevFromRect=a,n.prevToRect=l,e||(e=o.options.animation),o.animate(n,u,l,e)),e&&(i=!0,r=Math.max(r,e),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout((function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null}),e),n.thisAnimationDuration=e)})),clearTimeout(t),i?t=setTimeout((function(){"function"==typeof e&&e()}),r):"function"==typeof e&&e(),n=[]},animate:function(t,e,n,o){if(o){_(t,"transition",""),_(t,"transform","");var i=C(this.el),r=i&&i.a,a=i&&i.d,l=(e.left-n.left)/(r||1),s=(e.top-n.top)/(a||1);t.animatingX=!!l,t.animatingY=!!s,_(t,"transform","translate3d("+l+"px,"+s+"px,0)"),this.forRepaintDummy=function(t){return t.offsetWidth}(t),_(t,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),_(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){_(t,"transition",""),_(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),o)}}}}var K=[],z={initializeByDefault:!0},G={mount:function(t){for(var e in z)z.hasOwnProperty(e)&&!(e in t)&&(t[e]=z[e]);K.forEach((function(e){if(e.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")})),K.push(t)},pluginEvent:function(t,n,o){var i=this;this.eventCanceled=!1,o.cancel=function(){i.eventCanceled=!0};var r=t+"Global";K.forEach((function(i){n[i.pluginName]&&(n[i.pluginName][r]&&n[i.pluginName][r](e({sortable:n},o)),n.options[i.pluginName]&&n[i.pluginName][t]&&n[i.pluginName][t](e({sortable:n},o)))}))},initializePlugins:function(t,e,n,o){for(var r in K.forEach((function(o){var r=o.pluginName;if(t.options[r]||o.initializeByDefault){var a=new o(t,e,t.options);a.sortable=t,a.options=t.options,t[r]=a,i(n,a.defaults)}})),t.options)if(t.options.hasOwnProperty(r)){var a=this.modifyOption(t,r,t.options[r]);void 0!==a&&(t.options[r]=a)}},getEventProperties:function(t,e){var n={};return K.forEach((function(o){"function"==typeof o.eventProperties&&i(n,o.eventProperties.call(e[o.pluginName],t))})),n},modifyOption:function(t,e,n){var o;return K.forEach((function(i){t[i.pluginName]&&i.optionListeners&&"function"==typeof i.optionListeners[e]&&(o=i.optionListeners[e].call(t[i.pluginName],n))})),o}};function U(t){var n=t.sortable,o=t.rootEl,i=t.name,r=t.targetEl,a=t.cloneEl,l=t.toEl,s=t.fromEl,d=t.oldIndex,h=t.newIndex,f=t.oldDraggableIndex,p=t.newDraggableIndex,g=t.originalEvent,v=t.putSortable,m=t.extraEventProperties;if(n=n||o&&o[L]){var b,y=n.options,w="on"+i.charAt(0).toUpperCase()+i.substr(1);!window.CustomEvent||c||u?(b=document.createEvent("Event")).initEvent(i,!0,!0):b=new CustomEvent(i,{bubbles:!0,cancelable:!0}),b.to=l||o,b.from=s||o,b.item=r||o,b.clone=a,b.oldIndex=d,b.newIndex=h,b.oldDraggableIndex=f,b.newDraggableIndex=p,b.originalEvent=g,b.pullMode=v?v.lastPutMode:void 0;var E=e(e({},m),G.getEventProperties(i,n));for(var D in E)b[D]=E[D];o&&o.dispatchEvent(b),y[w]&&y[w].call(n,b)}}var q=["evt"],V=function(t,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=o.evt,a=r(o,q);G.pluginEvent.bind(jt)(t,n,e({dragEl:$,parentEl:Q,ghostEl:J,rootEl:tt,nextEl:et,lastDownEl:nt,cloneEl:ot,cloneHidden:it,dragStarted:mt,putSortable:ut,activeSortable:jt.active,originalEvent:i,oldIndex:rt,oldDraggableIndex:lt,newIndex:at,newDraggableIndex:st,hideGhostForTarget:Yt,unhideGhostForTarget:Bt,cloneNowHidden:function(){it=!0},cloneNowShown:function(){it=!1},dispatchSortableEvent:function(t){Z({sortable:n,name:t,originalEvent:i})}},a))};function Z(t){U(e({putSortable:ut,cloneEl:ot,targetEl:$,rootEl:tt,oldIndex:rt,oldDraggableIndex:lt,newIndex:at,newDraggableIndex:st},t))}var $,Q,J,tt,et,nt,ot,it,rt,at,lt,st,ct,ut,dt,ht,ft,pt,gt,vt,mt,bt,yt,wt,Et,Dt=!1,St=!1,_t=[],Ct=!1,Tt=!1,xt=[],Ot=!1,Mt=[],At="undefined"!=typeof document,It=f,Nt=u||c?"cssFloat":"float",Pt=At&&!p&&!f&&"draggable"in document.createElement("div"),kt=function(){if(At){if(c)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Rt=function(t,e){var n=_(t),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=I(t,0,e),r=I(t,1,e),a=i&&_(i),l=r&&_(r),s=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+O(i).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+O(r).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(i&&a.float&&"none"!==a.float){var u="left"===a.float?"left":"right";return!r||"both"!==l.clear&&l.clear!==u?"horizontal":"vertical"}return i&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||s>=o&&"none"===n[Nt]||r&&"none"===n[Nt]&&s+c>o)?"vertical":"horizontal"},Xt=function(t){function e(t,n){return function(o,i,r,a){var l=o.options.group.name&&i.options.group.name&&o.options.group.name===i.options.group.name;if(null==t&&(n||l))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"==typeof t)return e(t(o,i,r,a),n)(o,i,r,a);var s=(n?o:i).options.group.name;return!0===t||"string"==typeof t&&t===s||t.join&&t.indexOf(s)>-1}}var o={},i=t.group;i&&"object"==n(i)||(i={name:i}),o.name=i.name,o.checkPull=e(i.pull,!0),o.checkPut=e(i.put),o.revertClone=i.revertClone,t.group=o},Yt=function(){!kt&&J&&_(J,"display","none")},Bt=function(){!kt&&J&&_(J,"display","")};At&&!p&&document.addEventListener("click",(function(t){if(St)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),St=!1,!1}),!0);var Ft=function(t){if($){t=t.touches?t.touches[0]:t;var e=(i=t.clientX,r=t.clientY,_t.some((function(t){var e=t[L].options.emptyInsertThreshold;if(e&&!N(t)){var n=O(t),o=i>=n.left-e&&i<=n.right+e,l=r>=n.top-e&&r<=n.bottom+e;return o&&l?a=t:void 0}})),a);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[L]._onDragOver(n)}}var i,r,a},Ht=function(t){$&&$.parentNode[L]._isOutsideThisEl(t.target)};function jt(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=i({},e),t[L]=this;var n={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 Rt(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!==jt.supportPointer&&"PointerEvent"in window&&!h,emptyInsertThreshold:5};for(var o in G.initializePlugins(this,t,n),n)!(o in e)&&(e[o]=n[o]);for(var r in Xt(e),this)"_"===r.charAt(0)&&"function"==typeof this[r]&&(this[r]=this[r].bind(this));this.nativeDraggable=!e.forceFallback&&Pt,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?v(t,"pointerdown",this._onTapStart):(v(t,"mousedown",this._onTapStart),v(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(v(t,"dragover",this),v(t,"dragenter",this)),_t.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),i(this,W())}function Lt(t,e,n,o,i,r,a,l){var s,d,h=t[L],f=h.options.onMove;return!window.CustomEvent||c||u?(s=document.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=e,s.from=t,s.dragged=n,s.draggedRect=o,s.related=i||e,s.relatedRect=r||O(e),s.willInsertAfter=l,s.originalEvent=a,t.dispatchEvent(s),f&&(d=f.call(h,s,a)),d}function Wt(t){t.draggable=!1}function Kt(){Ot=!1}function zt(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)}function Gt(t){return setTimeout(t,0)}function Ut(t){return clearTimeout(t)}jt.prototype={constructor:jt,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(bt=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,$):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,o=this.options,i=o.preventOnFilter,r=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,l=(a||t).target,s=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,c=o.filter;if(function(t){Mt.length=0;var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var o=e[n];o.checked&&Mt.push(o)}}(n),!$&&!(/mousedown|pointerdown/.test(r)&&0!==t.button||o.disabled)&&!s.isContentEditable&&(this.nativeDraggable||!h||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=w(l,o.draggable,n,!1))&&l.animated||nt===l)){if(rt=P(l),lt=P(l,o.draggable),"function"==typeof c){if(c.call(this,t,l,this))return Z({sortable:e,rootEl:s,name:"filter",targetEl:l,toEl:n,fromEl:n}),V("filter",e,{evt:t}),void(i&&t.cancelable&&t.preventDefault())}else if(c&&(c=c.split(",").some((function(o){if(o=w(s,o.trim(),n,!1))return Z({sortable:e,rootEl:o,name:"filter",targetEl:l,fromEl:n,toEl:n}),V("filter",e,{evt:t}),!0}))))return void(i&&t.cancelable&&t.preventDefault());o.handle&&!w(s,o.handle,n,!1)||this._prepareDragStart(t,a,l)}}},_prepareDragStart:function(t,e,n){var o,i=this,r=i.el,a=i.options,l=r.ownerDocument;if(n&&!$&&n.parentNode===r){var s=O(n);if(tt=r,Q=($=n).parentNode,et=$.nextSibling,nt=n,ct=a.group,jt.dragged=$,dt={target:$,clientX:(e||t).clientX,clientY:(e||t).clientY},gt=dt.clientX-s.left,vt=dt.clientY-s.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,$.style["will-change"]="all",o=function(){V("delayEnded",i,{evt:t}),jt.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!d&&i.nativeDraggable&&($.draggable=!0),i._triggerDragStart(t,e),Z({sortable:i,name:"choose",originalEvent:t}),S($,a.chosenClass,!0))},a.ignore.split(",").forEach((function(t){T($,t.trim(),Wt)})),v(l,"dragover",Ft),v(l,"mousemove",Ft),v(l,"touchmove",Ft),v(l,"mouseup",i._onDrop),v(l,"touchend",i._onDrop),v(l,"touchcancel",i._onDrop),d&&this.nativeDraggable&&(this.options.touchStartThreshold=4,$.draggable=!0),V("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(u||c))o();else{if(jt.eventCanceled)return void this._onDrop();v(l,"mouseup",i._disableDelayedDrag),v(l,"touchend",i._disableDelayedDrag),v(l,"touchcancel",i._disableDelayedDrag),v(l,"mousemove",i._delayedDragTouchMoveHandler),v(l,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&v(l,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(o,a.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(){$&&Wt($),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;m(t,"mouseup",this._disableDelayedDrag),m(t,"touchend",this._disableDelayedDrag),m(t,"touchcancel",this._disableDelayedDrag),m(t,"mousemove",this._delayedDragTouchMoveHandler),m(t,"touchmove",this._delayedDragTouchMoveHandler),m(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?v(document,"pointermove",this._onTouchMove):v(document,e?"touchmove":"mousemove",this._onTouchMove):(v($,"dragend",this),v(tt,"dragstart",this._onDragStart));try{document.selection?Gt((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(Dt=!1,tt&&$){V("dragStarted",this,{evt:e}),this.nativeDraggable&&v(document,"dragover",Ht);var n=this.options;!t&&S($,n.dragClass,!1),S($,n.ghostClass,!0),jt.active=this,t&&this._appendGhost(),Z({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(ht){this._lastX=ht.clientX,this._lastY=ht.clientY,Yt();for(var t=document.elementFromPoint(ht.clientX,ht.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(ht.clientX,ht.clientY))!==e;)e=t;if($.parentNode[L]._isOutsideThisEl(t),e)do{if(e[L]){if(e[L]._onDragOver({clientX:ht.clientX,clientY:ht.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);Bt()}},_onTouchMove:function(t){if(dt){var e=this.options,n=e.fallbackTolerance,o=e.fallbackOffset,i=t.touches?t.touches[0]:t,r=J&&C(J,!0),a=J&&r&&r.a,l=J&&r&&r.d,s=It&&Et&&k(Et),c=(i.clientX-dt.clientX+o.x)/(a||1)+(s?s[0]-xt[0]:0)/(a||1),u=(i.clientY-dt.clientY+o.y)/(l||1)+(s?s[1]-xt[1]:0)/(l||1);if(!jt.active&&!Dt){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(J){r?(r.e+=c-(ft||0),r.f+=u-(pt||0)):r={a:1,b:0,c:0,d:1,e:c,f:u};var d="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")");_(J,"webkitTransform",d),_(J,"mozTransform",d),_(J,"msTransform",d),_(J,"transform",d),ft=c,pt=u,ht=i}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!J){var t=this.options.fallbackOnBody?document.body:tt,e=O($,!0,It,!0,t),n=this.options;if(It){for(Et=t;"static"===_(Et,"position")&&"none"===_(Et,"transform")&&Et!==document;)Et=Et.parentNode;Et!==document.body&&Et!==document.documentElement?(Et===document&&(Et=x()),e.top+=Et.scrollTop,e.left+=Et.scrollLeft):Et=x(),xt=k(Et)}S(J=$.cloneNode(!0),n.ghostClass,!1),S(J,n.fallbackClass,!0),S(J,n.dragClass,!0),_(J,"transition",""),_(J,"transform",""),_(J,"box-sizing","border-box"),_(J,"margin",0),_(J,"top",e.top),_(J,"left",e.left),_(J,"width",e.width),_(J,"height",e.height),_(J,"opacity","0.8"),_(J,"position",It?"absolute":"fixed"),_(J,"zIndex","100000"),_(J,"pointerEvents","none"),jt.ghost=J,t.appendChild(J),_(J,"transform-origin",gt/parseInt(J.style.width)*100+"% "+vt/parseInt(J.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,o=t.dataTransfer,i=n.options;V("dragStart",this,{evt:t}),jt.eventCanceled?this._onDrop():(V("setupClone",this),jt.eventCanceled||((ot=F($)).removeAttribute("id"),ot.draggable=!1,ot.style["will-change"]="",this._hideClone(),S(ot,this.options.chosenClass,!1),jt.clone=ot),n.cloneId=Gt((function(){V("clone",n),jt.eventCanceled||(n.options.removeCloneOnHide||tt.insertBefore(ot,$),n._hideClone(),Z({sortable:n,name:"clone"}))})),!e&&S($,i.dragClass,!0),e?(St=!0,n._loopId=setInterval(n._emulateDragOver,50)):(m(document,"mouseup",n._onDrop),m(document,"touchend",n._onDrop),m(document,"touchcancel",n._onDrop),o&&(o.effectAllowed="move",i.setData&&i.setData.call(n,o,$)),v(document,"drop",n),_($,"transform","translateZ(0)")),Dt=!0,n._dragStartId=Gt(n._dragStarted.bind(n,e,t)),v(document,"selectstart",n),mt=!0,h&&_(document.body,"user-select","none"))},_onDragOver:function(t){var n,o,i,r,a=this.el,l=t.target,s=this.options,c=s.group,u=jt.active,d=ct===c,h=s.sort,f=ut||u,p=this,g=!1;if(!Ot){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),l=w(l,s.draggable,a,!0),H("dragOver"),jt.eventCanceled)return g;if($.contains(t.target)||l.animated&&l.animatingX&&l.animatingY||p._ignoreWhileAnimating===l)return W(!1);if(St=!1,u&&!s.disabled&&(d?h||(i=Q!==tt):ut===this||(this.lastPutMode=ct.checkPull(this,u,$,t))&&c.checkPut(this,u,$,t))){if(r="vertical"===this._getDirection(t,l),n=O($),H("dragOverValid"),jt.eventCanceled)return g;if(i)return Q=tt,j(),this._hideClone(),H("revert"),jt.eventCanceled||(et?tt.insertBefore($,et):tt.appendChild($)),W(!0);var v=N(a,s.draggable);if(!v||function(t,e,n){var o=O(N(n.el,n.options.draggable)),i=M(n.el),r=10;return e?t.clientX>i.right+r||t.clientY>o.bottom&&t.clientX>o.left:t.clientY>i.bottom+r||t.clientX>o.right&&t.clientY>o.top}(t,r,this)&&!v.animated){if(v===$)return W(!1);if(v&&a===t.target&&(l=v),l&&(o=O(l)),!1!==Lt(tt,a,$,n,l,o,t,!!l))return j(),v&&v.nextSibling?a.insertBefore($,v.nextSibling):a.appendChild($),Q=a,K(),W(!0)}else if(v&&function(t,e,n){var o=O(I(n.el,0,n.options,!0)),i=M(n.el),r=10;return e?t.clientX<i.left-r||t.clientY<o.top&&t.clientX<o.right:t.clientY<i.top-r||t.clientY<o.bottom&&t.clientX<o.left}(t,r,this)){var m=I(a,0,s,!0);if(m===$)return W(!1);if(o=O(l=m),!1!==Lt(tt,a,$,n,l,o,t,!1))return j(),a.insertBefore($,m),Q=a,K(),W(!0)}else if(l.parentNode===a){o=O(l);var b,y,E,D=$.parentNode!==a,C=!function(t,e,n){var o=n?t.left:t.top,i=n?t.right:t.bottom,r=n?t.width:t.height,a=n?e.left:e.top,l=n?e.right:e.bottom,s=n?e.width:e.height;return o===a||i===l||o+r/2===a+s/2}($.animated&&$.toRect||n,l.animated&&l.toRect||o,r),T=r?"top":"left",x=A(l,"top","top")||A($,"top","top"),k=x?x.scrollTop:void 0;if(bt!==l&&(y=o[T],Ct=!1,Tt=!C&&s.invertSwap||D),b=function(t,e,n,o,i,r,a,l){var s=o?t.clientY:t.clientX,c=o?n.height:n.width,u=o?n.top:n.left,d=o?n.bottom:n.right,h=!1;if(!a)if(l&&wt<c*i){if(!Ct&&(1===yt?s>u+c*r/2:s<d-c*r/2)&&(Ct=!0),Ct)h=!0;else if(1===yt?s<u+wt:s>d-wt)return-yt}else if(s>u+c*(1-i)/2&&s<d-c*(1-i)/2)return function(t){return P($)<P(t)?1:-1}(e);if((h=h||a)&&(s<u+c*r/2||s>d-c*r/2))return s>u+c/2?1:-1;return 0}(t,l,o,r,C?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,Tt,bt===l),0!==b){var R=P($);do{R-=b,E=Q.children[R]}while(E&&("none"===_(E,"display")||E===J))}if(0===b||E===l)return W(!1);bt=l,yt=b;var X=l.nextElementSibling,Y=!1,F=Lt(tt,a,$,n,l,o,t,Y=1===b);if(!1!==F)return 1!==F&&-1!==F||(Y=1===F),Ot=!0,setTimeout(Kt,30),j(),Y&&!X?a.appendChild($):l.parentNode.insertBefore($,Y?X:l),x&&B(x,0,k-x.scrollTop),Q=$.parentNode,void 0===y||Tt||(wt=Math.abs(y-O(l)[T])),K(),W(!0)}if(a.contains($))return W(!1)}return!1}function H(s,c){V(s,p,e({evt:t,isOwner:d,axis:r?"vertical":"horizontal",revert:i,dragRect:n,targetRect:o,canSort:h,fromSortable:f,target:l,completed:W,onMove:function(e,o){return Lt(tt,a,$,n,e,O(e),t,o)},changed:K},c))}function j(){H("dragOverAnimationCapture"),p.captureAnimationState(),p!==f&&f.captureAnimationState()}function W(e){return H("dragOverCompleted",{insertion:e}),e&&(d?u._hideClone():u._showClone(p),p!==f&&(S($,ut?ut.options.ghostClass:u.options.ghostClass,!1),S($,s.ghostClass,!0)),ut!==p&&p!==jt.active?ut=p:p===jt.active&&ut&&(ut=null),f===p&&(p._ignoreWhileAnimating=l),p.animateAll((function(){H("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(l===$&&!$.animated||l===a&&!l.animated)&&(bt=null),s.dragoverBubble||t.rootEl||l===document||($.parentNode[L]._isOutsideThisEl(t.target),!e&&Ft(t)),!s.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),g=!0}function K(){at=P($),st=P($,s.draggable),Z({sortable:p,name:"change",toEl:a,newIndex:at,newDraggableIndex:st,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){m(document,"mousemove",this._onTouchMove),m(document,"touchmove",this._onTouchMove),m(document,"pointermove",this._onTouchMove),m(document,"dragover",Ft),m(document,"mousemove",Ft),m(document,"touchmove",Ft)},_offUpEvents:function(){var t=this.el.ownerDocument;m(t,"mouseup",this._onDrop),m(t,"touchend",this._onDrop),m(t,"pointerup",this._onDrop),m(t,"touchcancel",this._onDrop),m(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;at=P($),st=P($,n.draggable),V("drop",this,{evt:t}),Q=$&&$.parentNode,at=P($),st=P($,n.draggable),jt.eventCanceled||(Dt=!1,Tt=!1,Ct=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Ut(this.cloneId),Ut(this._dragStartId),this.nativeDraggable&&(m(document,"drop",this),m(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),h&&_(document.body,"user-select",""),_($,"transform",""),t&&(mt&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),J&&J.parentNode&&J.parentNode.removeChild(J),(tt===Q||ut&&"clone"!==ut.lastPutMode)&&ot&&ot.parentNode&&ot.parentNode.removeChild(ot),$&&(this.nativeDraggable&&m($,"dragend",this),Wt($),$.style["will-change"]="",mt&&!Dt&&S($,ut?ut.options.ghostClass:this.options.ghostClass,!1),S($,this.options.chosenClass,!1),Z({sortable:this,name:"unchoose",toEl:Q,newIndex:null,newDraggableIndex:null,originalEvent:t}),tt!==Q?(at>=0&&(Z({rootEl:Q,name:"add",toEl:Q,fromEl:tt,originalEvent:t}),Z({sortable:this,name:"remove",toEl:Q,originalEvent:t}),Z({rootEl:Q,name:"sort",toEl:Q,fromEl:tt,originalEvent:t}),Z({sortable:this,name:"sort",toEl:Q,originalEvent:t})),ut&&ut.save()):at!==rt&&at>=0&&(Z({sortable:this,name:"update",toEl:Q,originalEvent:t}),Z({sortable:this,name:"sort",toEl:Q,originalEvent:t})),jt.active&&(null!=at&&-1!==at||(at=rt,st=lt),Z({sortable:this,name:"end",toEl:Q,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){V("nulling",this),tt=$=Q=J=et=ot=nt=it=dt=ht=mt=at=st=rt=lt=bt=yt=ut=ct=jt.dragged=jt.ghost=jt.clone=jt.active=null,Mt.forEach((function(t){t.checked=!0})),Mt.length=ft=pt=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":$&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,o=0,i=n.length,r=this.options;o<i;o++)w(t=n[o],r.draggable,this.el,!1)&&e.push(t.getAttribute(r.dataIdAttr)||zt(t));return e},sort:function(t,e){var n={},o=this.el;this.toArray().forEach((function(t,e){var i=o.children[e];w(i,this.options.draggable,o,!1)&&(n[t]=i)}),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 w(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=G.modifyOption(this,t,e);n[t]=void 0!==o?o:e,"group"===t&&Xt(n)},destroy:function(){V("destroy",this);var t=this.el;t[L]=null,m(t,"mousedown",this._onTapStart),m(t,"touchstart",this._onTapStart),m(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(m(t,"dragover",this),m(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),_t.splice(_t.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!it){if(V("hideClone",this),jt.eventCanceled)return;_(ot,"display","none"),this.options.removeCloneOnHide&&ot.parentNode&&ot.parentNode.removeChild(ot),it=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(it){if(V("showClone",this),jt.eventCanceled)return;$.parentNode!=tt||this.options.group.revertClone?et?tt.insertBefore(ot,et):tt.appendChild(ot):tt.insertBefore(ot,$),this.options.group.revertClone&&this.animate($,ot),_(ot,"display",""),it=!1}}else this._hideClone()}},At&&v(document,"touchmove",(function(t){(jt.active||Dt)&&t.cancelable&&t.preventDefault()})),jt.utils={on:v,off:m,css:_,find:T,is:function(t,e){return!!w(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:Y,closest:w,toggleClass:S,clone:F,index:P,nextTick:Gt,cancelNextTick:Ut,detectDirection:Rt,getChild:I},jt.get=function(t){return t[L]},jt.mount=function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];n[0].constructor===Array&&(n=n[0]),n.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&&(jt.utils=e(e({},jt.utils),t.utils)),G.mount(t)}))},jt.create=function(t,e){return new jt(t,e)},jt.version="1.15.1";var qt,Vt,Zt,$t,Qt,Jt,te=[],ee=!1;function ne(){te.forEach((function(t){clearInterval(t.pid)})),te=[]}function oe(){clearInterval(Jt)}var ie,re=Y((function(t,e,n,o){if(e.scroll){var i,r=(t.touches?t.touches[0]:t).clientX,a=(t.touches?t.touches[0]:t).clientY,l=e.scrollSensitivity,s=e.scrollSpeed,c=x(),u=!1;Vt!==n&&(Vt=n,ne(),qt=e.scroll,i=e.scrollFn,!0===qt&&(qt=R(n,!0)));var d=0,h=qt;do{var f=h,p=O(f),g=p.top,v=p.bottom,m=p.left,b=p.right,y=p.width,w=p.height,E=void 0,D=void 0,S=f.scrollWidth,C=f.scrollHeight,T=_(f),M=f.scrollLeft,A=f.scrollTop;f===c?(E=y<S&&("auto"===T.overflowX||"scroll"===T.overflowX||"visible"===T.overflowX),D=w<C&&("auto"===T.overflowY||"scroll"===T.overflowY||"visible"===T.overflowY)):(E=y<S&&("auto"===T.overflowX||"scroll"===T.overflowX),D=w<C&&("auto"===T.overflowY||"scroll"===T.overflowY));var I=E&&(Math.abs(b-r)<=l&&M+y<S)-(Math.abs(m-r)<=l&&!!M),N=D&&(Math.abs(v-a)<=l&&A+w<C)-(Math.abs(g-a)<=l&&!!A);if(!te[d])for(var P=0;P<=d;P++)te[P]||(te[P]={});te[d].vx==I&&te[d].vy==N&&te[d].el===f||(te[d].el=f,te[d].vx=I,te[d].vy=N,clearInterval(te[d].pid),0==I&&0==N||(u=!0,te[d].pid=setInterval(function(){o&&0===this.layer&&jt.active._onTouchMove(Qt);var e=te[this.layer].vy?te[this.layer].vy*s:0,n=te[this.layer].vx?te[this.layer].vx*s:0;"function"==typeof i&&"continue"!==i.call(jt.dragged.parentNode[L],n,e,t,Qt,te[this.layer].el)||B(te[this.layer].el,n,e)}.bind({layer:d}),24))),d++}while(e.bubbleScroll&&h!==c&&(h=R(h,!1)));ee=u}}),30),ae=function(t){var e=t.originalEvent,n=t.putSortable,o=t.dragEl,i=t.activeSortable,r=t.dispatchSortableEvent,a=t.hideGhostForTarget,l=t.unhideGhostForTarget;if(e){var s=n||i;a();var c=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,u=document.elementFromPoint(c.clientX,c.clientY);l(),s&&!s.el.contains(u)&&(r("spill"),this.onSpill({dragEl:o,putSortable:n}))}};function le(){}function se(){}function ce(){function t(){this.defaults={swapClass:"sortable-swap-highlight"}}return t.prototype={dragStart:function(t){var e=t.dragEl;ie=e},dragOverValid:function(t){var e=t.completed,n=t.target,o=t.onMove,i=t.activeSortable,r=t.changed,a=t.cancel;if(i.options.swap){var l=this.sortable.el,s=this.options;if(n&&n!==l){var c=ie;!1!==o(n)?(S(n,s.swapClass,!0),ie=n):ie=null,c&&c!==ie&&S(c,s.swapClass,!1)}r(),e(!0),a()}},drop:function(t){var e=t.activeSortable,n=t.putSortable,o=t.dragEl,i=n||this.sortable,r=this.options;ie&&S(ie,r.swapClass,!1),ie&&(r.swap||n&&n.options.swap)&&o!==ie&&(i.captureAnimationState(),i!==e&&e.captureAnimationState(),function(t,e){var n,o,i=t.parentNode,r=e.parentNode;if(!i||!r||i.isEqualNode(e)||r.isEqualNode(t))return;n=P(t),o=P(e),i.isEqualNode(r)&&n<o&&o++;i.insertBefore(e,i.children[n]),r.insertBefore(t,r.children[o])}(o,ie),i.animateAll(),i!==e&&e.animateAll())},nulling:function(){ie=null}},i(t,{pluginName:"swap",eventProperties:function(){return{swapItem:ie}}})}le.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=I(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:ae},i(le,{pluginName:"revertOnSpill"}),se.prototype={onSpill:function(t){var e=t.dragEl,n=t.putSortable||this.sortable;n.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),n.animateAll()},drop:ae},i(se,{pluginName:"removeOnSpill"});var ue,de,he,fe,pe,ge=[],ve=[],me=!1,be=!1,ye=!1;function we(){function t(t){for(var e in this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this));t.options.avoidImplicitDeselect||(t.options.supportPointer?v(document,"pointerup",this._deselectMultiDrag):(v(document,"mouseup",this._deselectMultiDrag),v(document,"touchend",this._deselectMultiDrag))),v(document,"keydown",this._checkKeyDown),v(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,avoidImplicitDeselect:!1,setData:function(e,n){var o="";ge.length&&de===t?ge.forEach((function(t,e){o+=(e?", ":"")+t.textContent})):o=n.textContent,e.setData("Text",o)}}}return t.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(t){var e=t.dragEl;he=e},delayEnded:function(){this.isMultiDrag=~ge.indexOf(he)},setupClone:function(t){var e=t.sortable,n=t.cancel;if(this.isMultiDrag){for(var o=0;o<ge.length;o++)ve.push(F(ge[o])),ve[o].sortableIndex=ge[o].sortableIndex,ve[o].draggable=!1,ve[o].style["will-change"]="",S(ve[o],this.options.selectedClass,!1),ge[o]===he&&S(ve[o],this.options.chosenClass,!1);e._hideClone(),n()}},clone:function(t){var e=t.sortable,n=t.rootEl,o=t.dispatchSortableEvent,i=t.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||ge.length&&de===e&&(Ee(!0,n),o("clone"),i()))},showClone:function(t){var e=t.cloneNowShown,n=t.rootEl,o=t.cancel;this.isMultiDrag&&(Ee(!1,n),ve.forEach((function(t){_(t,"display","")})),e(),pe=!1,o())},hideClone:function(t){var e=this;t.sortable;var n=t.cloneNowHidden,o=t.cancel;this.isMultiDrag&&(ve.forEach((function(t){_(t,"display","none"),e.options.removeCloneOnHide&&t.parentNode&&t.parentNode.removeChild(t)})),n(),pe=!0,o())},dragStartGlobal:function(t){t.sortable,!this.isMultiDrag&&de&&de.multiDrag._deselectMultiDrag(),ge.forEach((function(t){t.sortableIndex=P(t)})),ge=ge.sort((function(t,e){return t.sortableIndex-e.sortableIndex})),ye=!0},dragStarted:function(t){var e=this,n=t.sortable;if(this.isMultiDrag){if(this.options.sort&&(n.captureAnimationState(),this.options.animation)){ge.forEach((function(t){t!==he&&_(t,"position","absolute")}));var o=O(he,!1,!0,!0);ge.forEach((function(t){t!==he&&H(t,o)})),be=!0,me=!0}n.animateAll((function(){be=!1,me=!1,e.options.animation&&ge.forEach((function(t){j(t)})),e.options.sort&&De()}))}},dragOver:function(t){var e=t.target,n=t.completed,o=t.cancel;be&&~ge.indexOf(e)&&(n(!1),o())},revert:function(t){var e=t.fromSortable,n=t.rootEl,o=t.sortable,i=t.dragRect;ge.length>1&&(ge.forEach((function(t){o.addAnimationState({target:t,rect:be?O(t):i}),j(t),t.fromRect=i,e.removeAnimationState(t)})),be=!1,function(t,e){ge.forEach((function(n,o){var i=e.children[n.sortableIndex+(t?Number(o):0)];i?e.insertBefore(n,i):e.appendChild(n)}))}(!this.options.removeCloneOnHide,n))},dragOverCompleted:function(t){var e=t.sortable,n=t.isOwner,o=t.insertion,i=t.activeSortable,r=t.parentEl,a=t.putSortable,l=this.options;if(o){if(n&&i._hideClone(),me=!1,l.animation&&ge.length>1&&(be||!n&&!i.options.sort&&!a)){var s=O(he,!1,!0,!0);ge.forEach((function(t){t!==he&&(H(t,s),r.appendChild(t))})),be=!0}if(!n)if(be||De(),ge.length>1){var c=pe;i._showClone(e),i.options.animation&&!pe&&c&&ve.forEach((function(t){i.addAnimationState({target:t,rect:fe}),t.fromRect=fe,t.thisAnimationDuration=null}))}else i._showClone(e)}},dragOverAnimationCapture:function(t){var e=t.dragRect,n=t.isOwner,o=t.activeSortable;if(ge.forEach((function(t){t.thisAnimationDuration=null})),o.options.animation&&!n&&o.multiDrag.isMultiDrag){fe=i({},e);var r=C(he,!0);fe.top-=r.f,fe.left-=r.e}},dragOverAnimationComplete:function(){be&&(be=!1,De())},drop:function(t){var e=t.originalEvent,n=t.rootEl,o=t.parentEl,i=t.sortable,r=t.dispatchSortableEvent,a=t.oldIndex,l=t.putSortable,s=l||this.sortable;if(e){var c=this.options,u=o.children;if(!ye)if(c.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),S(he,c.selectedClass,!~ge.indexOf(he)),~ge.indexOf(he))ge.splice(ge.indexOf(he),1),ue=null,U({sortable:i,rootEl:n,name:"deselect",targetEl:he,originalEvent:e});else{if(ge.push(he),U({sortable:i,rootEl:n,name:"select",targetEl:he,originalEvent:e}),e.shiftKey&&ue&&i.el.contains(ue)){var d,h,f=P(ue),p=P(he);if(~f&&~p&&f!==p)for(p>f?(h=f,d=p):(h=p,d=f+1);h<d;h++)~ge.indexOf(u[h])||(S(u[h],c.selectedClass,!0),ge.push(u[h]),U({sortable:i,rootEl:n,name:"select",targetEl:u[h],originalEvent:e}))}else ue=he;de=s}if(ye&&this.isMultiDrag){if(be=!1,(o[L].options.sort||o!==n)&&ge.length>1){var g=O(he),v=P(he,":not(."+this.options.selectedClass+")");if(!me&&c.animation&&(he.thisAnimationDuration=null),s.captureAnimationState(),!me&&(c.animation&&(he.fromRect=g,ge.forEach((function(t){if(t.thisAnimationDuration=null,t!==he){var e=be?O(t):g;t.fromRect=e,s.addAnimationState({target:t,rect:e})}}))),De(),ge.forEach((function(t){u[v]?o.insertBefore(t,u[v]):o.appendChild(t),v++})),a===P(he))){var m=!1;ge.forEach((function(t){t.sortableIndex===P(t)||(m=!0)})),m&&(r("update"),r("sort"))}ge.forEach((function(t){j(t)})),s.animateAll()}de=s}(n===o||l&&"clone"!==l.lastPutMode)&&ve.forEach((function(t){t.parentNode&&t.parentNode.removeChild(t)}))}},nullingGlobal:function(){this.isMultiDrag=ye=!1,ve.length=0},destroyGlobal:function(){this._deselectMultiDrag(),m(document,"pointerup",this._deselectMultiDrag),m(document,"mouseup",this._deselectMultiDrag),m(document,"touchend",this._deselectMultiDrag),m(document,"keydown",this._checkKeyDown),m(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(t){if(!(void 0!==ye&&ye||de!==this.sortable||t&&w(t.target,this.options.draggable,this.sortable.el,!1)||t&&0!==t.button))for(;ge.length;){var e=ge[0];S(e,this.options.selectedClass,!1),ge.shift(),U({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:e,originalEvent:t})}},_checkKeyDown:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},i(t,{pluginName:"multiDrag",utils:{select:function(t){var e=t.parentNode[L];e&&e.options.multiDrag&&!~ge.indexOf(t)&&(de&&de!==e&&(de.multiDrag._deselectMultiDrag(),de=e),S(t,e.options.selectedClass,!0),ge.push(t))},deselect:function(t){var e=t.parentNode[L],n=ge.indexOf(t);e&&e.options.multiDrag&&~n&&(S(t,e.options.selectedClass,!1),ge.splice(n,1))}},eventProperties:function(){var t=this,e=[],n=[];return ge.forEach((function(o){var i;e.push({multiDragElement:o,index:o.sortableIndex}),i=be&&o!==he?-1:be?P(o,":not(."+t.options.selectedClass+")"):P(o),n.push({multiDragElement:o,index:i})})),{items:a(ge),clones:[].concat(ve),oldIndicies:e,newIndicies:n}},optionListeners:{multiDragKey:function(t){return"ctrl"===(t=t.toLowerCase())?t="Control":t.length>1&&(t=t.charAt(0).toUpperCase()+t.substr(1)),t}}})}function Ee(t,e){ve.forEach((function(n,o){var i=e.children[n.sortableIndex+(t?Number(o):0)];i?e.insertBefore(n,i):e.appendChild(n)}))}function De(){ge.forEach((function(t){t!==he&&t.parentNode&&t.parentNode.removeChild(t)}))}jt.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?v(document,"dragover",this._handleAutoScroll):this.options.supportPointer?v(document,"pointermove",this._handleFallbackAutoScroll):e.touches?v(document,"touchmove",this._handleFallbackAutoScroll):v(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?m(document,"dragover",this._handleAutoScroll):(m(document,"pointermove",this._handleFallbackAutoScroll),m(document,"touchmove",this._handleFallbackAutoScroll),m(document,"mousemove",this._handleFallbackAutoScroll)),oe(),ne(),clearTimeout(E),E=void 0},nulling:function(){Qt=Vt=qt=ee=Jt=Zt=$t=null,te.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var n=this,o=(t.touches?t.touches[0]:t).clientX,i=(t.touches?t.touches[0]:t).clientY,r=document.elementFromPoint(o,i);if(Qt=t,e||this.options.forceAutoScrollFallback||u||c||h){re(t,this.options,r,e);var a=R(r,!0);!ee||Jt&&o===Zt&&i===$t||(Jt&&oe(),Jt=setInterval((function(){var r=R(document.elementFromPoint(o,i),!0);r!==a&&(a=r,ne()),re(t,n.options,r,e)}),10),Zt=o,$t=i)}else{if(!this.options.bubbleScroll||R(r,!0)===x())return void ne();re(t,this.options,R(r,!1),!1)}}},i(t,{pluginName:"scroll",initializeByDefault:!0})}),jt.mount(se,le);export{we as MultiDrag,jt as Sortable,ce as Swap,jt as default};