genesys-spark-components 4.0.0-beta.33 → 4.0.0-beta.35

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 (295) hide show
  1. package/dist/cjs/en-14558544.js +24 -0
  2. package/dist/cjs/genesys-webcomponents.cjs.js +1 -1
  3. package/dist/cjs/gux-accordion.cjs.entry.js +1 -1
  4. package/dist/cjs/gux-action-button.cjs.entry.js +1 -1
  5. package/dist/cjs/gux-action-toast-legacy.cjs.entry.js +1 -1
  6. package/dist/cjs/gux-advanced-dropdown-legacy.cjs.entry.js +1 -1
  7. package/dist/cjs/gux-announce-beta.cjs.entry.js +1 -1
  8. package/dist/cjs/gux-badge.cjs.entry.js +1 -1
  9. package/dist/cjs/gux-blank-state.cjs.entry.js +1 -1
  10. package/dist/cjs/gux-breadcrumbs.cjs.entry.js +1 -1
  11. package/dist/cjs/gux-button-multi.cjs.entry.js +1 -1
  12. package/dist/cjs/gux-button-slot.cjs.entry.js +1 -1
  13. package/dist/cjs/gux-button.cjs.entry.js +1 -1
  14. package/dist/cjs/gux-calendar.cjs.entry.js +1 -1
  15. package/dist/cjs/gux-card.cjs.entry.js +1 -1
  16. package/dist/cjs/gux-column-manager.cjs.entry.js +1 -1
  17. package/dist/cjs/gux-content-search.cjs.entry.js +1 -1
  18. package/dist/cjs/gux-context-menu.cjs.entry.js +1 -1
  19. package/dist/cjs/gux-copy-to-clipboard.cjs.entry.js +1 -1
  20. package/dist/cjs/gux-date-beta.cjs.entry.js +1 -1
  21. package/dist/cjs/gux-date-time-beta.cjs.entry.js +1 -1
  22. package/dist/cjs/gux-datepicker.cjs.entry.js +1 -1
  23. package/dist/cjs/gux-disclosure-button-legacy.cjs.entry.js +1 -1
  24. package/dist/cjs/gux-dismiss-button.cjs.entry.js +1 -1
  25. package/dist/cjs/gux-dropdown-multi.cjs.entry.js +1 -1
  26. package/dist/cjs/gux-dropdown_3.cjs.entry.js +1 -1
  27. package/dist/cjs/gux-flyout-menu.cjs.entry.js +1 -1
  28. package/dist/cjs/gux-form-field-checkbox.cjs.entry.js +1 -1
  29. package/dist/cjs/gux-form-field-color.cjs.entry.js +1 -1
  30. package/dist/cjs/gux-form-field-dropdown.cjs.entry.js +1 -1
  31. package/dist/cjs/gux-form-field-input-clear-button.cjs.entry.js +1 -1
  32. package/dist/cjs/gux-form-field-number_3.cjs.entry.js +1 -1
  33. package/dist/cjs/gux-form-field-phone.cjs.entry.js +1 -1
  34. package/dist/cjs/gux-form-field-radio.cjs.entry.js +1 -1
  35. package/dist/cjs/gux-form-field-range.cjs.entry.js +1 -1
  36. package/dist/cjs/gux-form-field-search.cjs.entry.js +1 -1
  37. package/dist/cjs/gux-form-field-select.cjs.entry.js +1 -1
  38. package/dist/cjs/gux-form-field-text-like.cjs.entry.js +1 -1
  39. package/dist/cjs/gux-form-field-textarea.cjs.entry.js +1 -1
  40. package/dist/cjs/gux-form-field-time-picker.cjs.entry.js +1 -1
  41. package/dist/cjs/gux-icon.cjs.entry.js +1 -1
  42. package/dist/cjs/gux-inline-alert.cjs.entry.js +1 -1
  43. package/dist/cjs/gux-list.cjs.entry.js +1 -1
  44. package/dist/cjs/gux-listbox-multi.cjs.entry.js +1 -1
  45. package/dist/cjs/gux-loading-message.cjs.entry.js +1 -1
  46. package/dist/cjs/gux-modal.cjs.entry.js +1 -1
  47. package/dist/cjs/gux-month-calendar.cjs.entry.js +6 -2
  48. package/dist/cjs/gux-month-picker-beta.cjs.entry.js +1 -1
  49. package/dist/cjs/gux-notification-toast-legacy.cjs.entry.js +1 -1
  50. package/dist/cjs/gux-page-loading-spinner.cjs.entry.js +1 -1
  51. package/dist/cjs/gux-pagination-cursor.cjs.entry.js +1 -1
  52. package/dist/cjs/gux-pagination-legacy.cjs.entry.js +1 -1
  53. package/dist/cjs/gux-pagination.cjs.entry.js +1 -1
  54. package/dist/cjs/gux-phone-input-beta.cjs.entry.js +1 -1
  55. package/dist/cjs/gux-popover-list.cjs.entry.js +1 -1
  56. package/dist/cjs/gux-radial-loading.cjs.entry.js +1 -1
  57. package/dist/cjs/gux-radial-progress.cjs.entry.js +1 -1
  58. package/dist/cjs/gux-rating.cjs.entry.js +1 -1
  59. package/dist/cjs/gux-region-icon.cjs.entry.js +1 -1
  60. package/dist/cjs/gux-screen-reader-beta.cjs.entry.js +1 -1
  61. package/dist/cjs/gux-segmented-control-beta.cjs.entry.js +1 -1
  62. package/dist/cjs/gux-simple-toast-legacy.cjs.entry.js +1 -1
  63. package/dist/cjs/gux-skip-navigation-list.cjs.entry.js +1 -1
  64. package/dist/cjs/gux-sort-control.cjs.entry.js +1 -1
  65. package/dist/cjs/gux-switch-legacy.cjs.entry.js +1 -1
  66. package/dist/cjs/gux-tab-advanced-legacy.cjs.entry.js +157 -0
  67. package/dist/cjs/gux-tab-advanced-list-legacy.cjs.entry.js +470 -0
  68. package/dist/cjs/gux-tab-advanced-list.cjs.entry.js +19 -3038
  69. package/dist/cjs/gux-tab-advanced-panel-legacy.cjs.entry.js +34 -0
  70. package/dist/cjs/gux-table-toolbar-action.cjs.entry.js +1 -1
  71. package/dist/cjs/gux-table-toolbar-custom-action.cjs.entry.js +1 -1
  72. package/dist/cjs/gux-table-toolbar-menu-button.cjs.entry.js +1 -1
  73. package/dist/cjs/gux-table-toolbar.cjs.entry.js +1 -1
  74. package/dist/cjs/gux-table.cjs.entry.js +1 -1
  75. package/dist/cjs/gux-tabs-advanced-legacy.cjs.entry.js +63 -0
  76. package/dist/cjs/gux-tabs-advanced.cjs.entry.js +1 -1
  77. package/dist/cjs/gux-tabs.cjs.entry.js +1 -1
  78. package/dist/cjs/gux-tag.cjs.entry.js +1 -1
  79. package/dist/cjs/gux-text-highlight.cjs.entry.js +1 -1
  80. package/dist/cjs/gux-time-beta.cjs.entry.js +1 -1
  81. package/dist/cjs/gux-time-picker.cjs.entry.js +1 -1
  82. package/dist/cjs/gux-time-zone-picker-beta.cjs.entry.js +1 -1
  83. package/dist/cjs/gux-toast.cjs.entry.js +1 -1
  84. package/dist/cjs/gux-toggle.cjs.entry.js +1 -1
  85. package/dist/cjs/gux-tooltip.cjs.entry.js +1 -1
  86. package/dist/cjs/index-0d0fdb85.js +20 -4
  87. package/dist/cjs/loader.cjs.js +1 -1
  88. package/dist/cjs/sortable.esm-73cf219b.js +3023 -0
  89. package/dist/cjs/{usage-9520c06b.js → usage-7e2e71dc.js} +1 -1
  90. package/dist/collection/collection-manifest.json +4 -0
  91. package/dist/collection/components/beta/gux-month-picker/gux-month-calendar/gux-month-calendar.css +7 -0
  92. package/dist/collection/components/beta/gux-month-picker/gux-month-calendar/gux-month-calendar.js +5 -1
  93. package/dist/collection/components/legacy/gux-tabs-advanced-legacy/gux-tab-advanced/gux-tab-advanced.css +117 -0
  94. package/dist/collection/components/legacy/gux-tabs-advanced-legacy/gux-tab-advanced/gux-tab-advanced.js +317 -0
  95. package/dist/collection/components/legacy/gux-tabs-advanced-legacy/gux-tab-advanced-list/gux-tab-advanced-list.css +211 -0
  96. package/dist/collection/components/legacy/gux-tabs-advanced-legacy/gux-tab-advanced-list/gux-tab-advanced-list.js +623 -0
  97. package/dist/collection/components/legacy/gux-tabs-advanced-legacy/gux-tab-advanced-panel/gux-tab-advanced-panel.css +48 -0
  98. package/dist/collection/components/legacy/gux-tabs-advanced-legacy/gux-tab-advanced-panel/gux-tab-advanced-panel.js +106 -0
  99. package/dist/collection/components/legacy/gux-tabs-advanced-legacy/gux-tabs-advanced.css +3 -0
  100. package/dist/collection/components/legacy/gux-tabs-advanced-legacy/gux-tabs-advanced.js +147 -0
  101. package/dist/collection/components/stable/gux-icon/gux-icon.js +1 -1
  102. package/dist/collection/components/stable/gux-icon/icons/custom/face-smile-hearts-regular.svg +1 -0
  103. package/dist/component-specs.json +10 -0
  104. package/dist/deploy-info.json +3 -3
  105. package/dist/esm/en-5b8ff4c7.js +22 -0
  106. package/dist/esm/genesys-webcomponents.js +1 -1
  107. package/dist/esm/gux-accordion.entry.js +1 -1
  108. package/dist/esm/gux-action-button.entry.js +1 -1
  109. package/dist/esm/gux-action-toast-legacy.entry.js +1 -1
  110. package/dist/esm/gux-advanced-dropdown-legacy.entry.js +1 -1
  111. package/dist/esm/gux-announce-beta.entry.js +1 -1
  112. package/dist/esm/gux-badge.entry.js +1 -1
  113. package/dist/esm/gux-blank-state.entry.js +1 -1
  114. package/dist/esm/gux-breadcrumbs.entry.js +1 -1
  115. package/dist/esm/gux-button-multi.entry.js +1 -1
  116. package/dist/esm/gux-button-slot.entry.js +1 -1
  117. package/dist/esm/gux-button.entry.js +1 -1
  118. package/dist/esm/gux-calendar.entry.js +1 -1
  119. package/dist/esm/gux-card.entry.js +1 -1
  120. package/dist/esm/gux-column-manager.entry.js +1 -1
  121. package/dist/esm/gux-content-search.entry.js +1 -1
  122. package/dist/esm/gux-context-menu.entry.js +1 -1
  123. package/dist/esm/gux-copy-to-clipboard.entry.js +1 -1
  124. package/dist/esm/gux-date-beta.entry.js +1 -1
  125. package/dist/esm/gux-date-time-beta.entry.js +1 -1
  126. package/dist/esm/gux-datepicker.entry.js +1 -1
  127. package/dist/esm/gux-disclosure-button-legacy.entry.js +1 -1
  128. package/dist/esm/gux-dismiss-button.entry.js +1 -1
  129. package/dist/esm/gux-dropdown-multi.entry.js +1 -1
  130. package/dist/esm/gux-dropdown_3.entry.js +1 -1
  131. package/dist/esm/gux-flyout-menu.entry.js +1 -1
  132. package/dist/esm/gux-form-field-checkbox.entry.js +1 -1
  133. package/dist/esm/gux-form-field-color.entry.js +1 -1
  134. package/dist/esm/gux-form-field-dropdown.entry.js +1 -1
  135. package/dist/esm/gux-form-field-input-clear-button.entry.js +1 -1
  136. package/dist/esm/gux-form-field-number_3.entry.js +1 -1
  137. package/dist/esm/gux-form-field-phone.entry.js +1 -1
  138. package/dist/esm/gux-form-field-radio.entry.js +1 -1
  139. package/dist/esm/gux-form-field-range.entry.js +1 -1
  140. package/dist/esm/gux-form-field-search.entry.js +1 -1
  141. package/dist/esm/gux-form-field-select.entry.js +1 -1
  142. package/dist/esm/gux-form-field-text-like.entry.js +1 -1
  143. package/dist/esm/gux-form-field-textarea.entry.js +1 -1
  144. package/dist/esm/gux-form-field-time-picker.entry.js +1 -1
  145. package/dist/esm/gux-icon.entry.js +1 -1
  146. package/dist/esm/gux-inline-alert.entry.js +1 -1
  147. package/dist/esm/gux-list.entry.js +1 -1
  148. package/dist/esm/gux-listbox-multi.entry.js +1 -1
  149. package/dist/esm/gux-loading-message.entry.js +1 -1
  150. package/dist/esm/gux-modal.entry.js +1 -1
  151. package/dist/esm/gux-month-calendar.entry.js +6 -2
  152. package/dist/esm/gux-month-picker-beta.entry.js +1 -1
  153. package/dist/esm/gux-notification-toast-legacy.entry.js +1 -1
  154. package/dist/esm/gux-page-loading-spinner.entry.js +1 -1
  155. package/dist/esm/gux-pagination-cursor.entry.js +1 -1
  156. package/dist/esm/gux-pagination-legacy.entry.js +1 -1
  157. package/dist/esm/gux-pagination.entry.js +1 -1
  158. package/dist/esm/gux-phone-input-beta.entry.js +1 -1
  159. package/dist/esm/gux-popover-list.entry.js +1 -1
  160. package/dist/esm/gux-radial-loading.entry.js +1 -1
  161. package/dist/esm/gux-radial-progress.entry.js +1 -1
  162. package/dist/esm/gux-rating.entry.js +1 -1
  163. package/dist/esm/gux-region-icon.entry.js +1 -1
  164. package/dist/esm/gux-screen-reader-beta.entry.js +1 -1
  165. package/dist/esm/gux-segmented-control-beta.entry.js +1 -1
  166. package/dist/esm/gux-simple-toast-legacy.entry.js +1 -1
  167. package/dist/esm/gux-skip-navigation-list.entry.js +1 -1
  168. package/dist/esm/gux-sort-control.entry.js +1 -1
  169. package/dist/esm/gux-switch-legacy.entry.js +1 -1
  170. package/dist/esm/gux-tab-advanced-legacy.entry.js +153 -0
  171. package/dist/esm/gux-tab-advanced-list-legacy.entry.js +466 -0
  172. package/dist/esm/gux-tab-advanced-list.entry.js +1 -3020
  173. package/dist/esm/gux-tab-advanced-panel-legacy.entry.js +30 -0
  174. package/dist/esm/gux-table-toolbar-action.entry.js +1 -1
  175. package/dist/esm/gux-table-toolbar-custom-action.entry.js +1 -1
  176. package/dist/esm/gux-table-toolbar-menu-button.entry.js +1 -1
  177. package/dist/esm/gux-table-toolbar.entry.js +1 -1
  178. package/dist/esm/gux-table.entry.js +1 -1
  179. package/dist/esm/gux-tabs-advanced-legacy.entry.js +59 -0
  180. package/dist/esm/gux-tabs-advanced.entry.js +1 -1
  181. package/dist/esm/gux-tabs.entry.js +1 -1
  182. package/dist/esm/gux-tag.entry.js +1 -1
  183. package/dist/esm/gux-text-highlight.entry.js +1 -1
  184. package/dist/esm/gux-time-beta.entry.js +1 -1
  185. package/dist/esm/gux-time-picker.entry.js +1 -1
  186. package/dist/esm/gux-time-zone-picker-beta.entry.js +1 -1
  187. package/dist/esm/gux-toast.entry.js +1 -1
  188. package/dist/esm/gux-toggle.entry.js +1 -1
  189. package/dist/esm/gux-tooltip.entry.js +1 -1
  190. package/dist/esm/index-0b66fe2c.js +20 -4
  191. package/dist/esm/loader.js +1 -1
  192. package/dist/esm/sortable.esm-8c3d5856.js +3021 -0
  193. package/dist/esm/{usage-03c766e9.js → usage-cd252d08.js} +1 -1
  194. package/dist/genesys-webcomponents/genesys-webcomponents.esm.js +1 -1
  195. package/dist/genesys-webcomponents/i18n/genesys-webcomponents.i18n.en.json +1 -1
  196. package/dist/genesys-webcomponents/icons/custom/face-smile-hearts-regular.svg +1 -0
  197. package/dist/genesys-webcomponents/{p-c24ada31.entry.js → p-0249b669.entry.js} +1 -1
  198. package/dist/genesys-webcomponents/{p-ac151156.entry.js → p-078d3c75.entry.js} +1 -1
  199. package/dist/genesys-webcomponents/{p-02a95985.entry.js → p-0ca229eb.entry.js} +1 -1
  200. package/dist/genesys-webcomponents/{p-30f91270.entry.js → p-0d276dc9.entry.js} +1 -1
  201. package/dist/genesys-webcomponents/p-1486d7ea.js +7 -0
  202. package/dist/genesys-webcomponents/{p-fa8b060e.entry.js → p-197d4153.entry.js} +1 -1
  203. package/dist/genesys-webcomponents/p-1e4c80e5.entry.js +1 -0
  204. package/dist/genesys-webcomponents/{p-72dfb14e.entry.js → p-2176b2e3.entry.js} +1 -1
  205. package/dist/genesys-webcomponents/{p-4664b32a.entry.js → p-23ef4850.entry.js} +1 -1
  206. package/dist/genesys-webcomponents/{p-3e77a562.entry.js → p-2795474f.entry.js} +1 -1
  207. package/dist/genesys-webcomponents/{p-d853fc68.entry.js → p-280ec994.entry.js} +1 -1
  208. package/dist/genesys-webcomponents/{p-6078f7ff.entry.js → p-29bb65b6.entry.js} +1 -1
  209. package/dist/genesys-webcomponents/{p-95e92240.entry.js → p-2b46c949.entry.js} +1 -1
  210. package/dist/genesys-webcomponents/{p-7e39ea90.entry.js → p-2c9c3cea.entry.js} +1 -1
  211. package/dist/genesys-webcomponents/{p-d2e1fea1.entry.js → p-3493b6c1.entry.js} +1 -1
  212. package/dist/genesys-webcomponents/{p-cce60954.entry.js → p-359d6b16.entry.js} +1 -1
  213. package/dist/genesys-webcomponents/{p-68fc5577.entry.js → p-39151f6f.entry.js} +1 -1
  214. package/dist/genesys-webcomponents/{p-e3bb70a8.entry.js → p-3d15a15a.entry.js} +1 -1
  215. package/dist/genesys-webcomponents/{p-034e6c4d.entry.js → p-3d3fea51.entry.js} +1 -1
  216. package/dist/genesys-webcomponents/{p-c5b07020.entry.js → p-3fc64f89.entry.js} +1 -1
  217. package/dist/genesys-webcomponents/{p-f5b2d539.entry.js → p-409a2aed.entry.js} +1 -1
  218. package/dist/genesys-webcomponents/p-41617814.entry.js +1 -0
  219. package/dist/genesys-webcomponents/p-44835bc5.entry.js +1 -0
  220. package/dist/genesys-webcomponents/{p-bc563e6a.entry.js → p-45baa064.entry.js} +1 -1
  221. package/dist/genesys-webcomponents/{p-a68578ce.entry.js → p-45bcb54b.entry.js} +1 -1
  222. package/dist/genesys-webcomponents/{p-70df8d96.entry.js → p-53c4a7f7.entry.js} +1 -1
  223. package/dist/genesys-webcomponents/p-572aec19.entry.js +1 -0
  224. package/dist/genesys-webcomponents/{p-24131412.entry.js → p-57c82db9.entry.js} +1 -1
  225. package/dist/genesys-webcomponents/{p-f9acf306.entry.js → p-5a94a9bf.entry.js} +1 -1
  226. package/dist/genesys-webcomponents/{p-e1e7a459.entry.js → p-5bbffb5a.entry.js} +1 -1
  227. package/dist/genesys-webcomponents/{p-7f9936a9.entry.js → p-5f96b474.entry.js} +1 -1
  228. package/dist/genesys-webcomponents/{p-2d3e13f9.js → p-605734cc.js} +1 -1
  229. package/dist/genesys-webcomponents/{p-7a26c6e6.entry.js → p-6081375f.entry.js} +1 -1
  230. package/dist/genesys-webcomponents/{p-060cf9a7.entry.js → p-62456443.entry.js} +1 -1
  231. package/dist/genesys-webcomponents/{p-fc24eed4.entry.js → p-67652427.entry.js} +1 -1
  232. package/dist/genesys-webcomponents/{p-b10ec3d3.entry.js → p-6a62e7d1.entry.js} +1 -1
  233. package/dist/genesys-webcomponents/p-6a8e1026.js +1 -0
  234. package/dist/genesys-webcomponents/{p-33221bb2.entry.js → p-75146c5b.entry.js} +1 -1
  235. package/dist/genesys-webcomponents/{p-928eb0b3.entry.js → p-782c1b84.entry.js} +1 -1
  236. package/dist/genesys-webcomponents/{p-92d41ee7.entry.js → p-7adb14d8.entry.js} +1 -1
  237. package/dist/genesys-webcomponents/{p-03c0c703.entry.js → p-7b3f06e0.entry.js} +1 -1
  238. package/dist/genesys-webcomponents/{p-f3195e5d.entry.js → p-7cecc169.entry.js} +1 -1
  239. package/dist/genesys-webcomponents/{p-58c457f5.entry.js → p-7fa0ebcf.entry.js} +1 -1
  240. package/dist/genesys-webcomponents/{p-634a50a3.entry.js → p-8691acc1.entry.js} +1 -1
  241. package/dist/genesys-webcomponents/{p-83c031b7.entry.js → p-8cfed8ab.entry.js} +1 -1
  242. package/dist/genesys-webcomponents/{p-15162b49.entry.js → p-8ef5755c.entry.js} +1 -1
  243. package/dist/genesys-webcomponents/{p-af4067b6.entry.js → p-8f781185.entry.js} +1 -1
  244. package/dist/genesys-webcomponents/{p-7cb046d5.entry.js → p-906dfed6.entry.js} +1 -1
  245. package/dist/genesys-webcomponents/{p-58ec395c.entry.js → p-9381f1a8.entry.js} +1 -1
  246. package/dist/genesys-webcomponents/{p-c6cc4d09.entry.js → p-94f2e2a4.entry.js} +1 -1
  247. package/dist/genesys-webcomponents/{p-998197a4.entry.js → p-9571e673.entry.js} +1 -1
  248. package/dist/genesys-webcomponents/{p-f6e30e40.entry.js → p-95a4e80e.entry.js} +1 -1
  249. package/dist/genesys-webcomponents/{p-afeb7307.entry.js → p-95fcbe0c.entry.js} +1 -1
  250. package/dist/genesys-webcomponents/{p-fa6ecb44.entry.js → p-97d57a71.entry.js} +1 -1
  251. package/dist/genesys-webcomponents/{p-cdf9859f.entry.js → p-98f69d35.entry.js} +1 -1
  252. package/dist/genesys-webcomponents/{p-f78428d6.entry.js → p-993b03b1.entry.js} +1 -1
  253. package/dist/genesys-webcomponents/{p-2527e7d0.entry.js → p-a2cc1e97.entry.js} +1 -1
  254. package/dist/genesys-webcomponents/{p-efd268e2.entry.js → p-a871a9cd.entry.js} +1 -1
  255. package/dist/genesys-webcomponents/p-ac40bdc8.entry.js +1 -0
  256. package/dist/genesys-webcomponents/{p-f49d4768.entry.js → p-ad9c8e01.entry.js} +1 -1
  257. package/dist/genesys-webcomponents/{p-bc97008d.entry.js → p-b1c23548.entry.js} +1 -1
  258. package/dist/genesys-webcomponents/{p-d5e1b1e3.entry.js → p-b5ee1c41.entry.js} +1 -1
  259. package/dist/genesys-webcomponents/{p-92d50194.entry.js → p-b6ec024f.entry.js} +1 -1
  260. package/dist/genesys-webcomponents/{p-a0bf81e5.entry.js → p-bf36d208.entry.js} +1 -1
  261. package/dist/genesys-webcomponents/{p-a62be169.entry.js → p-c27e3e55.entry.js} +1 -1
  262. package/dist/genesys-webcomponents/{p-89cbb6af.entry.js → p-c6d8e1d8.entry.js} +1 -1
  263. package/dist/genesys-webcomponents/{p-5c1fa7a2.entry.js → p-c743441a.entry.js} +1 -1
  264. package/dist/genesys-webcomponents/{p-3336e979.entry.js → p-d2012304.entry.js} +1 -1
  265. package/dist/genesys-webcomponents/{p-6b076b8b.entry.js → p-d3c907fc.entry.js} +1 -1
  266. package/dist/genesys-webcomponents/{p-0c458b58.entry.js → p-d9a38f04.entry.js} +1 -1
  267. package/dist/genesys-webcomponents/{p-b11b5b21.entry.js → p-dab7466b.entry.js} +1 -1
  268. package/dist/genesys-webcomponents/{p-f67ad756.entry.js → p-dfb9c511.entry.js} +1 -1
  269. package/dist/genesys-webcomponents/{p-63dc1c21.entry.js → p-e078f4fa.entry.js} +1 -1
  270. package/dist/genesys-webcomponents/{p-7620a300.entry.js → p-e1030da3.entry.js} +1 -1
  271. package/dist/genesys-webcomponents/{p-d1dfb11f.entry.js → p-e401da19.entry.js} +1 -1
  272. package/dist/genesys-webcomponents/p-e4d54add.entry.js +1 -0
  273. package/dist/genesys-webcomponents/{p-0a6a6a1c.entry.js → p-e511fb43.entry.js} +1 -1
  274. package/dist/genesys-webcomponents/{p-1d144c4d.entry.js → p-e7cab774.entry.js} +1 -1
  275. package/dist/genesys-webcomponents/{p-f32a9587.entry.js → p-ebede868.entry.js} +1 -1
  276. package/dist/genesys-webcomponents/{p-2ecea73a.entry.js → p-ebfa2805.entry.js} +1 -1
  277. package/dist/genesys-webcomponents/{p-0c5fd266.entry.js → p-f242ce05.entry.js} +1 -1
  278. package/dist/genesys-webcomponents/{p-b9e549f3.entry.js → p-f246861a.entry.js} +1 -1
  279. package/dist/genesys-webcomponents/{p-4cb5da55.entry.js → p-f6913d5e.entry.js} +1 -1
  280. package/dist/genesys-webcomponents/p-f6f9039b.entry.js +1 -0
  281. package/dist/genesys-webcomponents/{p-4719c10d.entry.js → p-fab9ff54.entry.js} +1 -1
  282. package/dist/genesys-webcomponents/{p-f9df9b92.entry.js → p-fbc9566f.entry.js} +1 -1
  283. package/dist/stencil-wrapper.js +1 -1
  284. package/dist/types/components/beta/gux-month-picker/gux-month-calendar/gux-month-calendar.d.ts +1 -0
  285. package/dist/types/components/legacy/gux-tabs-advanced-legacy/gux-tab-advanced/gux-tab-advanced.d.ts +45 -0
  286. package/dist/types/components/legacy/gux-tabs-advanced-legacy/gux-tab-advanced-list/gux-tab-advanced-list.d.ts +82 -0
  287. package/dist/types/components/legacy/gux-tabs-advanced-legacy/gux-tab-advanced-panel/gux-tab-advanced-panel.d.ts +12 -0
  288. package/dist/types/components/legacy/gux-tabs-advanced-legacy/gux-tabs-advanced.d.ts +25 -0
  289. package/dist/types/components/stable/gux-icon/gux-icon.types.d.ts +1 -1
  290. package/dist/types/components.d.ts +132 -0
  291. package/dist/types/stencil-wrapper.d.ts +1 -1
  292. package/package.json +1 -1
  293. package/dist/genesys-webcomponents/p-4d34cf6e.entry.js +0 -7
  294. package/dist/genesys-webcomponents/p-9872ae5d.entry.js +0 -1
  295. package/dist/genesys-webcomponents/p-f7e9572a.entry.js +0 -1
@@ -0,0 +1,3023 @@
1
+ 'use strict';
2
+
3
+ /**!
4
+ * Sortable 1.15.0
5
+ * @author RubaXa <trash@rubaxa.org>
6
+ * @author owenm <owen23355@gmail.com>
7
+ * @license MIT
8
+ */
9
+ function ownKeys(object, enumerableOnly) {
10
+ var keys = Object.keys(object);
11
+
12
+ if (Object.getOwnPropertySymbols) {
13
+ var symbols = Object.getOwnPropertySymbols(object);
14
+
15
+ if (enumerableOnly) {
16
+ symbols = symbols.filter(function (sym) {
17
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
18
+ });
19
+ }
20
+
21
+ keys.push.apply(keys, symbols);
22
+ }
23
+
24
+ return keys;
25
+ }
26
+
27
+ function _objectSpread2(target) {
28
+ for (var i = 1; i < arguments.length; i++) {
29
+ var source = arguments[i] != null ? arguments[i] : {};
30
+
31
+ if (i % 2) {
32
+ ownKeys(Object(source), true).forEach(function (key) {
33
+ _defineProperty(target, key, source[key]);
34
+ });
35
+ } else if (Object.getOwnPropertyDescriptors) {
36
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
37
+ } else {
38
+ ownKeys(Object(source)).forEach(function (key) {
39
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
40
+ });
41
+ }
42
+ }
43
+
44
+ return target;
45
+ }
46
+
47
+ function _typeof(obj) {
48
+ "@babel/helpers - typeof";
49
+
50
+ if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
51
+ _typeof = function (obj) {
52
+ return typeof obj;
53
+ };
54
+ } else {
55
+ _typeof = function (obj) {
56
+ return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
57
+ };
58
+ }
59
+
60
+ return _typeof(obj);
61
+ }
62
+
63
+ function _defineProperty(obj, key, value) {
64
+ if (key in obj) {
65
+ Object.defineProperty(obj, key, {
66
+ value: value,
67
+ enumerable: true,
68
+ configurable: true,
69
+ writable: true
70
+ });
71
+ } else {
72
+ obj[key] = value;
73
+ }
74
+
75
+ return obj;
76
+ }
77
+
78
+ function _extends() {
79
+ _extends = Object.assign || function (target) {
80
+ for (var i = 1; i < arguments.length; i++) {
81
+ var source = arguments[i];
82
+
83
+ for (var key in source) {
84
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
85
+ target[key] = source[key];
86
+ }
87
+ }
88
+ }
89
+
90
+ return target;
91
+ };
92
+
93
+ return _extends.apply(this, arguments);
94
+ }
95
+
96
+ function _objectWithoutPropertiesLoose(source, excluded) {
97
+ if (source == null) return {};
98
+ var target = {};
99
+ var sourceKeys = Object.keys(source);
100
+ var key, i;
101
+
102
+ for (i = 0; i < sourceKeys.length; i++) {
103
+ key = sourceKeys[i];
104
+ if (excluded.indexOf(key) >= 0) continue;
105
+ target[key] = source[key];
106
+ }
107
+
108
+ return target;
109
+ }
110
+
111
+ function _objectWithoutProperties(source, excluded) {
112
+ if (source == null) return {};
113
+
114
+ var target = _objectWithoutPropertiesLoose(source, excluded);
115
+
116
+ var key, i;
117
+
118
+ if (Object.getOwnPropertySymbols) {
119
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
120
+
121
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
122
+ key = sourceSymbolKeys[i];
123
+ if (excluded.indexOf(key) >= 0) continue;
124
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
125
+ target[key] = source[key];
126
+ }
127
+ }
128
+
129
+ return target;
130
+ }
131
+
132
+ var version = "1.15.0";
133
+
134
+ function userAgent(pattern) {
135
+ if (typeof window !== 'undefined' && window.navigator) {
136
+ return !! /*@__PURE__*/navigator.userAgent.match(pattern);
137
+ }
138
+ }
139
+
140
+ var IE11OrLess = userAgent(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i);
141
+ var Edge = userAgent(/Edge/i);
142
+ var FireFox = userAgent(/firefox/i);
143
+ var Safari = userAgent(/safari/i) && !userAgent(/chrome/i) && !userAgent(/android/i);
144
+ var IOS = userAgent(/iP(ad|od|hone)/i);
145
+ var ChromeForAndroid = userAgent(/chrome/i) && userAgent(/android/i);
146
+
147
+ var captureMode = {
148
+ capture: false,
149
+ passive: false
150
+ };
151
+
152
+ function on(el, event, fn) {
153
+ el.addEventListener(event, fn, !IE11OrLess && captureMode);
154
+ }
155
+
156
+ function off(el, event, fn) {
157
+ el.removeEventListener(event, fn, !IE11OrLess && captureMode);
158
+ }
159
+
160
+ function matches(
161
+ /**HTMLElement*/
162
+ el,
163
+ /**String*/
164
+ selector) {
165
+ if (!selector) return;
166
+ selector[0] === '>' && (selector = selector.substring(1));
167
+
168
+ if (el) {
169
+ try {
170
+ if (el.matches) {
171
+ return el.matches(selector);
172
+ } else if (el.msMatchesSelector) {
173
+ return el.msMatchesSelector(selector);
174
+ } else if (el.webkitMatchesSelector) {
175
+ return el.webkitMatchesSelector(selector);
176
+ }
177
+ } catch (_) {
178
+ return false;
179
+ }
180
+ }
181
+
182
+ return false;
183
+ }
184
+
185
+ function getParentOrHost(el) {
186
+ return el.host && el !== document && el.host.nodeType ? el.host : el.parentNode;
187
+ }
188
+
189
+ function closest(
190
+ /**HTMLElement*/
191
+ el,
192
+ /**String*/
193
+ selector,
194
+ /**HTMLElement*/
195
+ ctx, includeCTX) {
196
+ if (el) {
197
+ ctx = ctx || document;
198
+
199
+ do {
200
+ if (selector != null && (selector[0] === '>' ? el.parentNode === ctx && matches(el, selector) : matches(el, selector)) || includeCTX && el === ctx) {
201
+ return el;
202
+ }
203
+
204
+ if (el === ctx) break;
205
+ /* jshint boss:true */
206
+ } while (el = getParentOrHost(el));
207
+ }
208
+
209
+ return null;
210
+ }
211
+
212
+ var R_SPACE = /\s+/g;
213
+
214
+ function toggleClass(el, name, state) {
215
+ if (el && name) {
216
+ if (el.classList) {
217
+ el.classList[state ? 'add' : 'remove'](name);
218
+ } else {
219
+ var className = (' ' + el.className + ' ').replace(R_SPACE, ' ').replace(' ' + name + ' ', ' ');
220
+ el.className = (className + (state ? ' ' + name : '')).replace(R_SPACE, ' ');
221
+ }
222
+ }
223
+ }
224
+
225
+ function css(el, prop, val) {
226
+ var style = el && el.style;
227
+
228
+ if (style) {
229
+ if (val === void 0) {
230
+ if (document.defaultView && document.defaultView.getComputedStyle) {
231
+ val = document.defaultView.getComputedStyle(el, '');
232
+ } else if (el.currentStyle) {
233
+ val = el.currentStyle;
234
+ }
235
+
236
+ return prop === void 0 ? val : val[prop];
237
+ } else {
238
+ if (!(prop in style) && prop.indexOf('webkit') === -1) {
239
+ prop = '-webkit-' + prop;
240
+ }
241
+
242
+ style[prop] = val + (typeof val === 'string' ? '' : 'px');
243
+ }
244
+ }
245
+ }
246
+
247
+ function matrix(el, selfOnly) {
248
+ var appliedTransforms = '';
249
+
250
+ if (typeof el === 'string') {
251
+ appliedTransforms = el;
252
+ } else {
253
+ do {
254
+ var transform = css(el, 'transform');
255
+
256
+ if (transform && transform !== 'none') {
257
+ appliedTransforms = transform + ' ' + appliedTransforms;
258
+ }
259
+ /* jshint boss:true */
260
+
261
+ } while (!selfOnly && (el = el.parentNode));
262
+ }
263
+
264
+ var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
265
+ /*jshint -W056 */
266
+
267
+ return matrixFn && new matrixFn(appliedTransforms);
268
+ }
269
+
270
+ function find(ctx, tagName, iterator) {
271
+ if (ctx) {
272
+ var list = ctx.getElementsByTagName(tagName),
273
+ i = 0,
274
+ n = list.length;
275
+
276
+ if (iterator) {
277
+ for (; i < n; i++) {
278
+ iterator(list[i], i);
279
+ }
280
+ }
281
+
282
+ return list;
283
+ }
284
+
285
+ return [];
286
+ }
287
+
288
+ function getWindowScrollingElement() {
289
+ var scrollingElement = document.scrollingElement;
290
+
291
+ if (scrollingElement) {
292
+ return scrollingElement;
293
+ } else {
294
+ return document.documentElement;
295
+ }
296
+ }
297
+ /**
298
+ * Returns the "bounding client rect" of given element
299
+ * @param {HTMLElement} el The element whose boundingClientRect is wanted
300
+ * @param {[Boolean]} relativeToContainingBlock Whether the rect should be relative to the containing block of (including) the container
301
+ * @param {[Boolean]} relativeToNonStaticParent Whether the rect should be relative to the relative parent of (including) the contaienr
302
+ * @param {[Boolean]} undoScale Whether the container's scale() should be undone
303
+ * @param {[HTMLElement]} container The parent the element will be placed in
304
+ * @return {Object} The boundingClientRect of el, with specified adjustments
305
+ */
306
+
307
+
308
+ function getRect(el, relativeToContainingBlock, relativeToNonStaticParent, undoScale, container) {
309
+ if (!el.getBoundingClientRect && el !== window) return;
310
+ var elRect, top, left, bottom, right, height, width;
311
+
312
+ if (el !== window && el.parentNode && el !== getWindowScrollingElement()) {
313
+ elRect = el.getBoundingClientRect();
314
+ top = elRect.top;
315
+ left = elRect.left;
316
+ bottom = elRect.bottom;
317
+ right = elRect.right;
318
+ height = elRect.height;
319
+ width = elRect.width;
320
+ } else {
321
+ top = 0;
322
+ left = 0;
323
+ bottom = window.innerHeight;
324
+ right = window.innerWidth;
325
+ height = window.innerHeight;
326
+ width = window.innerWidth;
327
+ }
328
+
329
+ if ((relativeToContainingBlock || relativeToNonStaticParent) && el !== window) {
330
+ // Adjust for translate()
331
+ container = container || el.parentNode; // solves #1123 (see: https://stackoverflow.com/a/37953806/6088312)
332
+ // Not needed on <= IE11
333
+
334
+ if (!IE11OrLess) {
335
+ do {
336
+ if (container && container.getBoundingClientRect && (css(container, 'transform') !== 'none' || relativeToNonStaticParent && css(container, 'position') !== 'static')) {
337
+ var containerRect = container.getBoundingClientRect(); // Set relative to edges of padding box of container
338
+
339
+ top -= containerRect.top + parseInt(css(container, 'border-top-width'));
340
+ left -= containerRect.left + parseInt(css(container, 'border-left-width'));
341
+ bottom = top + elRect.height;
342
+ right = left + elRect.width;
343
+ break;
344
+ }
345
+ /* jshint boss:true */
346
+
347
+ } while (container = container.parentNode);
348
+ }
349
+ }
350
+
351
+ if (undoScale && el !== window) {
352
+ // Adjust for scale()
353
+ var elMatrix = matrix(container || el),
354
+ scaleX = elMatrix && elMatrix.a,
355
+ scaleY = elMatrix && elMatrix.d;
356
+
357
+ if (elMatrix) {
358
+ top /= scaleY;
359
+ left /= scaleX;
360
+ width /= scaleX;
361
+ height /= scaleY;
362
+ bottom = top + height;
363
+ right = left + width;
364
+ }
365
+ }
366
+
367
+ return {
368
+ top: top,
369
+ left: left,
370
+ bottom: bottom,
371
+ right: right,
372
+ width: width,
373
+ height: height
374
+ };
375
+ }
376
+ /**
377
+ * Checks if a side of an element is scrolled past a side of its parents
378
+ * @param {HTMLElement} el The element who's side being scrolled out of view is in question
379
+ * @param {String} elSide Side of the element in question ('top', 'left', 'right', 'bottom')
380
+ * @param {String} parentSide Side of the parent in question ('top', 'left', 'right', 'bottom')
381
+ * @return {HTMLElement} The parent scroll element that the el's side is scrolled past, or null if there is no such element
382
+ */
383
+
384
+
385
+ function isScrolledPast(el, elSide, parentSide) {
386
+ var parent = getParentAutoScrollElement(el, true),
387
+ elSideVal = getRect(el)[elSide];
388
+ /* jshint boss:true */
389
+
390
+ while (parent) {
391
+ var parentSideVal = getRect(parent)[parentSide],
392
+ visible = void 0;
393
+
394
+ if (parentSide === 'top' || parentSide === 'left') {
395
+ visible = elSideVal >= parentSideVal;
396
+ } else {
397
+ visible = elSideVal <= parentSideVal;
398
+ }
399
+
400
+ if (!visible) return parent;
401
+ if (parent === getWindowScrollingElement()) break;
402
+ parent = getParentAutoScrollElement(parent, false);
403
+ }
404
+
405
+ return false;
406
+ }
407
+ /**
408
+ * Gets nth child of el, ignoring hidden children, sortable's elements (does not ignore clone if it's visible)
409
+ * and non-draggable elements
410
+ * @param {HTMLElement} el The parent element
411
+ * @param {Number} childNum The index of the child
412
+ * @param {Object} options Parent Sortable's options
413
+ * @return {HTMLElement} The child at index childNum, or null if not found
414
+ */
415
+
416
+
417
+ function getChild(el, childNum, options, includeDragEl) {
418
+ var currentChild = 0,
419
+ i = 0,
420
+ children = el.children;
421
+
422
+ while (i < children.length) {
423
+ if (children[i].style.display !== 'none' && children[i] !== Sortable.ghost && (includeDragEl || children[i] !== Sortable.dragged) && closest(children[i], options.draggable, el, false)) {
424
+ if (currentChild === childNum) {
425
+ return children[i];
426
+ }
427
+
428
+ currentChild++;
429
+ }
430
+
431
+ i++;
432
+ }
433
+
434
+ return null;
435
+ }
436
+ /**
437
+ * Gets the last child in the el, ignoring ghostEl or invisible elements (clones)
438
+ * @param {HTMLElement} el Parent element
439
+ * @param {selector} selector Any other elements that should be ignored
440
+ * @return {HTMLElement} The last child, ignoring ghostEl
441
+ */
442
+
443
+
444
+ function lastChild(el, selector) {
445
+ var last = el.lastElementChild;
446
+
447
+ while (last && (last === Sortable.ghost || css(last, 'display') === 'none' || selector && !matches(last, selector))) {
448
+ last = last.previousElementSibling;
449
+ }
450
+
451
+ return last || null;
452
+ }
453
+ /**
454
+ * Returns the index of an element within its parent for a selected set of
455
+ * elements
456
+ * @param {HTMLElement} el
457
+ * @param {selector} selector
458
+ * @return {number}
459
+ */
460
+
461
+
462
+ function index(el, selector) {
463
+ var index = 0;
464
+
465
+ if (!el || !el.parentNode) {
466
+ return -1;
467
+ }
468
+ /* jshint boss:true */
469
+
470
+
471
+ while (el = el.previousElementSibling) {
472
+ if (el.nodeName.toUpperCase() !== 'TEMPLATE' && el !== Sortable.clone && (!selector || matches(el, selector))) {
473
+ index++;
474
+ }
475
+ }
476
+
477
+ return index;
478
+ }
479
+ /**
480
+ * Returns the scroll offset of the given element, added with all the scroll offsets of parent elements.
481
+ * The value is returned in real pixels.
482
+ * @param {HTMLElement} el
483
+ * @return {Array} Offsets in the format of [left, top]
484
+ */
485
+
486
+
487
+ function getRelativeScrollOffset(el) {
488
+ var offsetLeft = 0,
489
+ offsetTop = 0,
490
+ winScroller = getWindowScrollingElement();
491
+
492
+ if (el) {
493
+ do {
494
+ var elMatrix = matrix(el),
495
+ scaleX = elMatrix.a,
496
+ scaleY = elMatrix.d;
497
+ offsetLeft += el.scrollLeft * scaleX;
498
+ offsetTop += el.scrollTop * scaleY;
499
+ } while (el !== winScroller && (el = el.parentNode));
500
+ }
501
+
502
+ return [offsetLeft, offsetTop];
503
+ }
504
+ /**
505
+ * Returns the index of the object within the given array
506
+ * @param {Array} arr Array that may or may not hold the object
507
+ * @param {Object} obj An object that has a key-value pair unique to and identical to a key-value pair in the object you want to find
508
+ * @return {Number} The index of the object in the array, or -1
509
+ */
510
+
511
+
512
+ function indexOfObject(arr, obj) {
513
+ for (var i in arr) {
514
+ if (!arr.hasOwnProperty(i)) continue;
515
+
516
+ for (var key in obj) {
517
+ if (obj.hasOwnProperty(key) && obj[key] === arr[i][key]) return Number(i);
518
+ }
519
+ }
520
+
521
+ return -1;
522
+ }
523
+
524
+ function getParentAutoScrollElement(el, includeSelf) {
525
+ // skip to window
526
+ if (!el || !el.getBoundingClientRect) return getWindowScrollingElement();
527
+ var elem = el;
528
+ var gotSelf = false;
529
+
530
+ do {
531
+ // we don't need to get elem css if it isn't even overflowing in the first place (performance)
532
+ if (elem.clientWidth < elem.scrollWidth || elem.clientHeight < elem.scrollHeight) {
533
+ var elemCSS = css(elem);
534
+
535
+ if (elem.clientWidth < elem.scrollWidth && (elemCSS.overflowX == 'auto' || elemCSS.overflowX == 'scroll') || elem.clientHeight < elem.scrollHeight && (elemCSS.overflowY == 'auto' || elemCSS.overflowY == 'scroll')) {
536
+ if (!elem.getBoundingClientRect || elem === document.body) return getWindowScrollingElement();
537
+ if (gotSelf || includeSelf) return elem;
538
+ gotSelf = true;
539
+ }
540
+ }
541
+ /* jshint boss:true */
542
+
543
+ } while (elem = elem.parentNode);
544
+
545
+ return getWindowScrollingElement();
546
+ }
547
+
548
+ function extend(dst, src) {
549
+ if (dst && src) {
550
+ for (var key in src) {
551
+ if (src.hasOwnProperty(key)) {
552
+ dst[key] = src[key];
553
+ }
554
+ }
555
+ }
556
+
557
+ return dst;
558
+ }
559
+
560
+ function isRectEqual(rect1, rect2) {
561
+ return Math.round(rect1.top) === Math.round(rect2.top) && Math.round(rect1.left) === Math.round(rect2.left) && Math.round(rect1.height) === Math.round(rect2.height) && Math.round(rect1.width) === Math.round(rect2.width);
562
+ }
563
+
564
+ var _throttleTimeout;
565
+
566
+ function throttle(callback, ms) {
567
+ return function () {
568
+ if (!_throttleTimeout) {
569
+ var args = arguments,
570
+ _this = this;
571
+
572
+ if (args.length === 1) {
573
+ callback.call(_this, args[0]);
574
+ } else {
575
+ callback.apply(_this, args);
576
+ }
577
+
578
+ _throttleTimeout = setTimeout(function () {
579
+ _throttleTimeout = void 0;
580
+ }, ms);
581
+ }
582
+ };
583
+ }
584
+
585
+ function cancelThrottle() {
586
+ clearTimeout(_throttleTimeout);
587
+ _throttleTimeout = void 0;
588
+ }
589
+
590
+ function scrollBy(el, x, y) {
591
+ el.scrollLeft += x;
592
+ el.scrollTop += y;
593
+ }
594
+
595
+ function clone(el) {
596
+ var Polymer = window.Polymer;
597
+ var $ = window.jQuery || window.Zepto;
598
+
599
+ if (Polymer && Polymer.dom) {
600
+ return Polymer.dom(el).cloneNode(true);
601
+ } else if ($) {
602
+ return $(el).clone(true)[0];
603
+ } else {
604
+ return el.cloneNode(true);
605
+ }
606
+ }
607
+
608
+ var expando = 'Sortable' + new Date().getTime();
609
+
610
+ function AnimationStateManager() {
611
+ var animationStates = [],
612
+ animationCallbackId;
613
+ return {
614
+ captureAnimationState: function captureAnimationState() {
615
+ animationStates = [];
616
+ if (!this.options.animation) return;
617
+ var children = [].slice.call(this.el.children);
618
+ children.forEach(function (child) {
619
+ if (css(child, 'display') === 'none' || child === Sortable.ghost) return;
620
+ animationStates.push({
621
+ target: child,
622
+ rect: getRect(child)
623
+ });
624
+
625
+ var fromRect = _objectSpread2({}, animationStates[animationStates.length - 1].rect); // If animating: compensate for current animation
626
+
627
+
628
+ if (child.thisAnimationDuration) {
629
+ var childMatrix = matrix(child, true);
630
+
631
+ if (childMatrix) {
632
+ fromRect.top -= childMatrix.f;
633
+ fromRect.left -= childMatrix.e;
634
+ }
635
+ }
636
+
637
+ child.fromRect = fromRect;
638
+ });
639
+ },
640
+ addAnimationState: function addAnimationState(state) {
641
+ animationStates.push(state);
642
+ },
643
+ removeAnimationState: function removeAnimationState(target) {
644
+ animationStates.splice(indexOfObject(animationStates, {
645
+ target: target
646
+ }), 1);
647
+ },
648
+ animateAll: function animateAll(callback) {
649
+ var _this = this;
650
+
651
+ if (!this.options.animation) {
652
+ clearTimeout(animationCallbackId);
653
+ if (typeof callback === 'function') callback();
654
+ return;
655
+ }
656
+
657
+ var animating = false,
658
+ animationTime = 0;
659
+ animationStates.forEach(function (state) {
660
+ var time = 0,
661
+ target = state.target,
662
+ fromRect = target.fromRect,
663
+ toRect = getRect(target),
664
+ prevFromRect = target.prevFromRect,
665
+ prevToRect = target.prevToRect,
666
+ animatingRect = state.rect,
667
+ targetMatrix = matrix(target, true);
668
+
669
+ if (targetMatrix) {
670
+ // Compensate for current animation
671
+ toRect.top -= targetMatrix.f;
672
+ toRect.left -= targetMatrix.e;
673
+ }
674
+
675
+ target.toRect = toRect;
676
+
677
+ if (target.thisAnimationDuration) {
678
+ // Could also check if animatingRect is between fromRect and toRect
679
+ if (isRectEqual(prevFromRect, toRect) && !isRectEqual(fromRect, toRect) && // Make sure animatingRect is on line between toRect & fromRect
680
+ (animatingRect.top - toRect.top) / (animatingRect.left - toRect.left) === (fromRect.top - toRect.top) / (fromRect.left - toRect.left)) {
681
+ // If returning to same place as started from animation and on same axis
682
+ time = calculateRealTime(animatingRect, prevFromRect, prevToRect, _this.options);
683
+ }
684
+ } // if fromRect != toRect: animate
685
+
686
+
687
+ if (!isRectEqual(toRect, fromRect)) {
688
+ target.prevFromRect = fromRect;
689
+ target.prevToRect = toRect;
690
+
691
+ if (!time) {
692
+ time = _this.options.animation;
693
+ }
694
+
695
+ _this.animate(target, animatingRect, toRect, time);
696
+ }
697
+
698
+ if (time) {
699
+ animating = true;
700
+ animationTime = Math.max(animationTime, time);
701
+ clearTimeout(target.animationResetTimer);
702
+ target.animationResetTimer = setTimeout(function () {
703
+ target.animationTime = 0;
704
+ target.prevFromRect = null;
705
+ target.fromRect = null;
706
+ target.prevToRect = null;
707
+ target.thisAnimationDuration = null;
708
+ }, time);
709
+ target.thisAnimationDuration = time;
710
+ }
711
+ });
712
+ clearTimeout(animationCallbackId);
713
+
714
+ if (!animating) {
715
+ if (typeof callback === 'function') callback();
716
+ } else {
717
+ animationCallbackId = setTimeout(function () {
718
+ if (typeof callback === 'function') callback();
719
+ }, animationTime);
720
+ }
721
+
722
+ animationStates = [];
723
+ },
724
+ animate: function animate(target, currentRect, toRect, duration) {
725
+ if (duration) {
726
+ css(target, 'transition', '');
727
+ css(target, 'transform', '');
728
+ var elMatrix = matrix(this.el),
729
+ scaleX = elMatrix && elMatrix.a,
730
+ scaleY = elMatrix && elMatrix.d,
731
+ translateX = (currentRect.left - toRect.left) / (scaleX || 1),
732
+ translateY = (currentRect.top - toRect.top) / (scaleY || 1);
733
+ target.animatingX = !!translateX;
734
+ target.animatingY = !!translateY;
735
+ css(target, 'transform', 'translate3d(' + translateX + 'px,' + translateY + 'px,0)');
736
+ this.forRepaintDummy = repaint(target); // repaint
737
+
738
+ css(target, 'transition', 'transform ' + duration + 'ms' + (this.options.easing ? ' ' + this.options.easing : ''));
739
+ css(target, 'transform', 'translate3d(0,0,0)');
740
+ typeof target.animated === 'number' && clearTimeout(target.animated);
741
+ target.animated = setTimeout(function () {
742
+ css(target, 'transition', '');
743
+ css(target, 'transform', '');
744
+ target.animated = false;
745
+ target.animatingX = false;
746
+ target.animatingY = false;
747
+ }, duration);
748
+ }
749
+ }
750
+ };
751
+ }
752
+
753
+ function repaint(target) {
754
+ return target.offsetWidth;
755
+ }
756
+
757
+ function calculateRealTime(animatingRect, fromRect, toRect, options) {
758
+ return Math.sqrt(Math.pow(fromRect.top - animatingRect.top, 2) + Math.pow(fromRect.left - animatingRect.left, 2)) / Math.sqrt(Math.pow(fromRect.top - toRect.top, 2) + Math.pow(fromRect.left - toRect.left, 2)) * options.animation;
759
+ }
760
+
761
+ var plugins = [];
762
+ var defaults = {
763
+ initializeByDefault: true
764
+ };
765
+ var PluginManager = {
766
+ mount: function mount(plugin) {
767
+ // Set default static properties
768
+ for (var option in defaults) {
769
+ if (defaults.hasOwnProperty(option) && !(option in plugin)) {
770
+ plugin[option] = defaults[option];
771
+ }
772
+ }
773
+
774
+ plugins.forEach(function (p) {
775
+ if (p.pluginName === plugin.pluginName) {
776
+ throw "Sortable: Cannot mount plugin ".concat(plugin.pluginName, " more than once");
777
+ }
778
+ });
779
+ plugins.push(plugin);
780
+ },
781
+ pluginEvent: function pluginEvent(eventName, sortable, evt) {
782
+ var _this = this;
783
+
784
+ this.eventCanceled = false;
785
+
786
+ evt.cancel = function () {
787
+ _this.eventCanceled = true;
788
+ };
789
+
790
+ var eventNameGlobal = eventName + 'Global';
791
+ plugins.forEach(function (plugin) {
792
+ if (!sortable[plugin.pluginName]) return; // Fire global events if it exists in this sortable
793
+
794
+ if (sortable[plugin.pluginName][eventNameGlobal]) {
795
+ sortable[plugin.pluginName][eventNameGlobal](_objectSpread2({
796
+ sortable: sortable
797
+ }, evt));
798
+ } // Only fire plugin event if plugin is enabled in this sortable,
799
+ // and plugin has event defined
800
+
801
+
802
+ if (sortable.options[plugin.pluginName] && sortable[plugin.pluginName][eventName]) {
803
+ sortable[plugin.pluginName][eventName](_objectSpread2({
804
+ sortable: sortable
805
+ }, evt));
806
+ }
807
+ });
808
+ },
809
+ initializePlugins: function initializePlugins(sortable, el, defaults, options) {
810
+ plugins.forEach(function (plugin) {
811
+ var pluginName = plugin.pluginName;
812
+ if (!sortable.options[pluginName] && !plugin.initializeByDefault) return;
813
+ var initialized = new plugin(sortable, el, sortable.options);
814
+ initialized.sortable = sortable;
815
+ initialized.options = sortable.options;
816
+ sortable[pluginName] = initialized; // Add default options from plugin
817
+
818
+ _extends(defaults, initialized.defaults);
819
+ });
820
+
821
+ for (var option in sortable.options) {
822
+ if (!sortable.options.hasOwnProperty(option)) continue;
823
+ var modified = this.modifyOption(sortable, option, sortable.options[option]);
824
+
825
+ if (typeof modified !== 'undefined') {
826
+ sortable.options[option] = modified;
827
+ }
828
+ }
829
+ },
830
+ getEventProperties: function getEventProperties(name, sortable) {
831
+ var eventProperties = {};
832
+ plugins.forEach(function (plugin) {
833
+ if (typeof plugin.eventProperties !== 'function') return;
834
+
835
+ _extends(eventProperties, plugin.eventProperties.call(sortable[plugin.pluginName], name));
836
+ });
837
+ return eventProperties;
838
+ },
839
+ modifyOption: function modifyOption(sortable, name, value) {
840
+ var modifiedValue;
841
+ plugins.forEach(function (plugin) {
842
+ // Plugin must exist on the Sortable
843
+ if (!sortable[plugin.pluginName]) return; // If static option listener exists for this option, call in the context of the Sortable's instance of this plugin
844
+
845
+ if (plugin.optionListeners && typeof plugin.optionListeners[name] === 'function') {
846
+ modifiedValue = plugin.optionListeners[name].call(sortable[plugin.pluginName], value);
847
+ }
848
+ });
849
+ return modifiedValue;
850
+ }
851
+ };
852
+
853
+ function dispatchEvent(_ref) {
854
+ var sortable = _ref.sortable,
855
+ rootEl = _ref.rootEl,
856
+ name = _ref.name,
857
+ targetEl = _ref.targetEl,
858
+ cloneEl = _ref.cloneEl,
859
+ toEl = _ref.toEl,
860
+ fromEl = _ref.fromEl,
861
+ oldIndex = _ref.oldIndex,
862
+ newIndex = _ref.newIndex,
863
+ oldDraggableIndex = _ref.oldDraggableIndex,
864
+ newDraggableIndex = _ref.newDraggableIndex,
865
+ originalEvent = _ref.originalEvent,
866
+ putSortable = _ref.putSortable,
867
+ extraEventProperties = _ref.extraEventProperties;
868
+ sortable = sortable || rootEl && rootEl[expando];
869
+ if (!sortable) return;
870
+ var evt,
871
+ options = sortable.options,
872
+ onName = 'on' + name.charAt(0).toUpperCase() + name.substr(1); // Support for new CustomEvent feature
873
+
874
+ if (window.CustomEvent && !IE11OrLess && !Edge) {
875
+ evt = new CustomEvent(name, {
876
+ bubbles: true,
877
+ cancelable: true
878
+ });
879
+ } else {
880
+ evt = document.createEvent('Event');
881
+ evt.initEvent(name, true, true);
882
+ }
883
+
884
+ evt.to = toEl || rootEl;
885
+ evt.from = fromEl || rootEl;
886
+ evt.item = targetEl || rootEl;
887
+ evt.clone = cloneEl;
888
+ evt.oldIndex = oldIndex;
889
+ evt.newIndex = newIndex;
890
+ evt.oldDraggableIndex = oldDraggableIndex;
891
+ evt.newDraggableIndex = newDraggableIndex;
892
+ evt.originalEvent = originalEvent;
893
+ evt.pullMode = putSortable ? putSortable.lastPutMode : undefined;
894
+
895
+ var allEventProperties = _objectSpread2(_objectSpread2({}, extraEventProperties), PluginManager.getEventProperties(name, sortable));
896
+
897
+ for (var option in allEventProperties) {
898
+ evt[option] = allEventProperties[option];
899
+ }
900
+
901
+ if (rootEl) {
902
+ rootEl.dispatchEvent(evt);
903
+ }
904
+
905
+ if (options[onName]) {
906
+ options[onName].call(sortable, evt);
907
+ }
908
+ }
909
+
910
+ var _excluded = ["evt"];
911
+
912
+ var pluginEvent = function pluginEvent(eventName, sortable) {
913
+ var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
914
+ originalEvent = _ref.evt,
915
+ data = _objectWithoutProperties(_ref, _excluded);
916
+
917
+ PluginManager.pluginEvent.bind(Sortable)(eventName, sortable, _objectSpread2({
918
+ dragEl: dragEl,
919
+ parentEl: parentEl,
920
+ ghostEl: ghostEl,
921
+ rootEl: rootEl,
922
+ nextEl: nextEl,
923
+ lastDownEl: lastDownEl,
924
+ cloneEl: cloneEl,
925
+ cloneHidden: cloneHidden,
926
+ dragStarted: moved,
927
+ putSortable: putSortable,
928
+ activeSortable: Sortable.active,
929
+ originalEvent: originalEvent,
930
+ oldIndex: oldIndex,
931
+ oldDraggableIndex: oldDraggableIndex,
932
+ newIndex: newIndex,
933
+ newDraggableIndex: newDraggableIndex,
934
+ hideGhostForTarget: _hideGhostForTarget,
935
+ unhideGhostForTarget: _unhideGhostForTarget,
936
+ cloneNowHidden: function cloneNowHidden() {
937
+ cloneHidden = true;
938
+ },
939
+ cloneNowShown: function cloneNowShown() {
940
+ cloneHidden = false;
941
+ },
942
+ dispatchSortableEvent: function dispatchSortableEvent(name) {
943
+ _dispatchEvent({
944
+ sortable: sortable,
945
+ name: name,
946
+ originalEvent: originalEvent
947
+ });
948
+ }
949
+ }, data));
950
+ };
951
+
952
+ function _dispatchEvent(info) {
953
+ dispatchEvent(_objectSpread2({
954
+ putSortable: putSortable,
955
+ cloneEl: cloneEl,
956
+ targetEl: dragEl,
957
+ rootEl: rootEl,
958
+ oldIndex: oldIndex,
959
+ oldDraggableIndex: oldDraggableIndex,
960
+ newIndex: newIndex,
961
+ newDraggableIndex: newDraggableIndex
962
+ }, info));
963
+ }
964
+
965
+ var dragEl,
966
+ parentEl,
967
+ ghostEl,
968
+ rootEl,
969
+ nextEl,
970
+ lastDownEl,
971
+ cloneEl,
972
+ cloneHidden,
973
+ oldIndex,
974
+ newIndex,
975
+ oldDraggableIndex,
976
+ newDraggableIndex,
977
+ activeGroup,
978
+ putSortable,
979
+ awaitingDragStarted = false,
980
+ ignoreNextClick = false,
981
+ sortables = [],
982
+ tapEvt,
983
+ touchEvt,
984
+ lastDx,
985
+ lastDy,
986
+ tapDistanceLeft,
987
+ tapDistanceTop,
988
+ moved,
989
+ lastTarget,
990
+ lastDirection,
991
+ pastFirstInvertThresh = false,
992
+ isCircumstantialInvert = false,
993
+ targetMoveDistance,
994
+ // For positioning ghost absolutely
995
+ ghostRelativeParent,
996
+ ghostRelativeParentInitialScroll = [],
997
+ // (left, top)
998
+ _silent = false,
999
+ savedInputChecked = [];
1000
+ /** @const */
1001
+
1002
+ var documentExists = typeof document !== 'undefined',
1003
+ PositionGhostAbsolutely = IOS,
1004
+ CSSFloatProperty = Edge || IE11OrLess ? 'cssFloat' : 'float',
1005
+ // This will not pass for IE9, because IE9 DnD only works on anchors
1006
+ supportDraggable = documentExists && !ChromeForAndroid && !IOS && 'draggable' in document.createElement('div'),
1007
+ supportCssPointerEvents = function () {
1008
+ if (!documentExists) return; // false when <= IE11
1009
+
1010
+ if (IE11OrLess) {
1011
+ return false;
1012
+ }
1013
+
1014
+ var el = document.createElement('x');
1015
+ el.style.cssText = 'pointer-events:auto';
1016
+ return el.style.pointerEvents === 'auto';
1017
+ }(),
1018
+ _detectDirection = function _detectDirection(el, options) {
1019
+ var elCSS = css(el),
1020
+ elWidth = parseInt(elCSS.width) - parseInt(elCSS.paddingLeft) - parseInt(elCSS.paddingRight) - parseInt(elCSS.borderLeftWidth) - parseInt(elCSS.borderRightWidth),
1021
+ child1 = getChild(el, 0, options),
1022
+ child2 = getChild(el, 1, options),
1023
+ firstChildCSS = child1 && css(child1),
1024
+ secondChildCSS = child2 && css(child2),
1025
+ firstChildWidth = firstChildCSS && parseInt(firstChildCSS.marginLeft) + parseInt(firstChildCSS.marginRight) + getRect(child1).width,
1026
+ secondChildWidth = secondChildCSS && parseInt(secondChildCSS.marginLeft) + parseInt(secondChildCSS.marginRight) + getRect(child2).width;
1027
+
1028
+ if (elCSS.display === 'flex') {
1029
+ return elCSS.flexDirection === 'column' || elCSS.flexDirection === 'column-reverse' ? 'vertical' : 'horizontal';
1030
+ }
1031
+
1032
+ if (elCSS.display === 'grid') {
1033
+ return elCSS.gridTemplateColumns.split(' ').length <= 1 ? 'vertical' : 'horizontal';
1034
+ }
1035
+
1036
+ if (child1 && firstChildCSS["float"] && firstChildCSS["float"] !== 'none') {
1037
+ var touchingSideChild2 = firstChildCSS["float"] === 'left' ? 'left' : 'right';
1038
+ return child2 && (secondChildCSS.clear === 'both' || secondChildCSS.clear === touchingSideChild2) ? 'vertical' : 'horizontal';
1039
+ }
1040
+
1041
+ return child1 && (firstChildCSS.display === 'block' || firstChildCSS.display === 'flex' || firstChildCSS.display === 'table' || firstChildCSS.display === 'grid' || firstChildWidth >= elWidth && elCSS[CSSFloatProperty] === 'none' || child2 && elCSS[CSSFloatProperty] === 'none' && firstChildWidth + secondChildWidth > elWidth) ? 'vertical' : 'horizontal';
1042
+ },
1043
+ _dragElInRowColumn = function _dragElInRowColumn(dragRect, targetRect, vertical) {
1044
+ var dragElS1Opp = vertical ? dragRect.left : dragRect.top,
1045
+ dragElS2Opp = vertical ? dragRect.right : dragRect.bottom,
1046
+ dragElOppLength = vertical ? dragRect.width : dragRect.height,
1047
+ targetS1Opp = vertical ? targetRect.left : targetRect.top,
1048
+ targetS2Opp = vertical ? targetRect.right : targetRect.bottom,
1049
+ targetOppLength = vertical ? targetRect.width : targetRect.height;
1050
+ return dragElS1Opp === targetS1Opp || dragElS2Opp === targetS2Opp || dragElS1Opp + dragElOppLength / 2 === targetS1Opp + targetOppLength / 2;
1051
+ },
1052
+
1053
+ /**
1054
+ * Detects first nearest empty sortable to X and Y position using emptyInsertThreshold.
1055
+ * @param {Number} x X position
1056
+ * @param {Number} y Y position
1057
+ * @return {HTMLElement} Element of the first found nearest Sortable
1058
+ */
1059
+ _detectNearestEmptySortable = function _detectNearestEmptySortable(x, y) {
1060
+ var ret;
1061
+ sortables.some(function (sortable) {
1062
+ var threshold = sortable[expando].options.emptyInsertThreshold;
1063
+ if (!threshold || lastChild(sortable)) return;
1064
+ var rect = getRect(sortable),
1065
+ insideHorizontally = x >= rect.left - threshold && x <= rect.right + threshold,
1066
+ insideVertically = y >= rect.top - threshold && y <= rect.bottom + threshold;
1067
+
1068
+ if (insideHorizontally && insideVertically) {
1069
+ return ret = sortable;
1070
+ }
1071
+ });
1072
+ return ret;
1073
+ },
1074
+ _prepareGroup = function _prepareGroup(options) {
1075
+ function toFn(value, pull) {
1076
+ return function (to, from, dragEl, evt) {
1077
+ var sameGroup = to.options.group.name && from.options.group.name && to.options.group.name === from.options.group.name;
1078
+
1079
+ if (value == null && (pull || sameGroup)) {
1080
+ // Default pull value
1081
+ // Default pull and put value if same group
1082
+ return true;
1083
+ } else if (value == null || value === false) {
1084
+ return false;
1085
+ } else if (pull && value === 'clone') {
1086
+ return value;
1087
+ } else if (typeof value === 'function') {
1088
+ return toFn(value(to, from, dragEl, evt), pull)(to, from, dragEl, evt);
1089
+ } else {
1090
+ var otherGroup = (pull ? to : from).options.group.name;
1091
+ return value === true || typeof value === 'string' && value === otherGroup || value.join && value.indexOf(otherGroup) > -1;
1092
+ }
1093
+ };
1094
+ }
1095
+
1096
+ var group = {};
1097
+ var originalGroup = options.group;
1098
+
1099
+ if (!originalGroup || _typeof(originalGroup) != 'object') {
1100
+ originalGroup = {
1101
+ name: originalGroup
1102
+ };
1103
+ }
1104
+
1105
+ group.name = originalGroup.name;
1106
+ group.checkPull = toFn(originalGroup.pull, true);
1107
+ group.checkPut = toFn(originalGroup.put);
1108
+ group.revertClone = originalGroup.revertClone;
1109
+ options.group = group;
1110
+ },
1111
+ _hideGhostForTarget = function _hideGhostForTarget() {
1112
+ if (!supportCssPointerEvents && ghostEl) {
1113
+ css(ghostEl, 'display', 'none');
1114
+ }
1115
+ },
1116
+ _unhideGhostForTarget = function _unhideGhostForTarget() {
1117
+ if (!supportCssPointerEvents && ghostEl) {
1118
+ css(ghostEl, 'display', '');
1119
+ }
1120
+ }; // #1184 fix - Prevent click event on fallback if dragged but item not changed position
1121
+
1122
+
1123
+ if (documentExists && !ChromeForAndroid) {
1124
+ document.addEventListener('click', function (evt) {
1125
+ if (ignoreNextClick) {
1126
+ evt.preventDefault();
1127
+ evt.stopPropagation && evt.stopPropagation();
1128
+ evt.stopImmediatePropagation && evt.stopImmediatePropagation();
1129
+ ignoreNextClick = false;
1130
+ return false;
1131
+ }
1132
+ }, true);
1133
+ }
1134
+
1135
+ var nearestEmptyInsertDetectEvent = function nearestEmptyInsertDetectEvent(evt) {
1136
+ if (dragEl) {
1137
+ evt = evt.touches ? evt.touches[0] : evt;
1138
+
1139
+ var nearest = _detectNearestEmptySortable(evt.clientX, evt.clientY);
1140
+
1141
+ if (nearest) {
1142
+ // Create imitation event
1143
+ var event = {};
1144
+
1145
+ for (var i in evt) {
1146
+ if (evt.hasOwnProperty(i)) {
1147
+ event[i] = evt[i];
1148
+ }
1149
+ }
1150
+
1151
+ event.target = event.rootEl = nearest;
1152
+ event.preventDefault = void 0;
1153
+ event.stopPropagation = void 0;
1154
+
1155
+ nearest[expando]._onDragOver(event);
1156
+ }
1157
+ }
1158
+ };
1159
+
1160
+ var _checkOutsideTargetEl = function _checkOutsideTargetEl(evt) {
1161
+ if (dragEl) {
1162
+ dragEl.parentNode[expando]._isOutsideThisEl(evt.target);
1163
+ }
1164
+ };
1165
+ /**
1166
+ * @class Sortable
1167
+ * @param {HTMLElement} el
1168
+ * @param {Object} [options]
1169
+ */
1170
+
1171
+
1172
+ function Sortable(el, options) {
1173
+ if (!(el && el.nodeType && el.nodeType === 1)) {
1174
+ throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(el));
1175
+ }
1176
+
1177
+ this.el = el; // root element
1178
+
1179
+ this.options = options = _extends({}, options); // Export instance
1180
+
1181
+ el[expando] = this;
1182
+ var defaults = {
1183
+ group: null,
1184
+ sort: true,
1185
+ disabled: false,
1186
+ store: null,
1187
+ handle: null,
1188
+ draggable: /^[uo]l$/i.test(el.nodeName) ? '>li' : '>*',
1189
+ swapThreshold: 1,
1190
+ // percentage; 0 <= x <= 1
1191
+ invertSwap: false,
1192
+ // invert always
1193
+ invertedSwapThreshold: null,
1194
+ // will be set to same as swapThreshold if default
1195
+ removeCloneOnHide: true,
1196
+ direction: function direction() {
1197
+ return _detectDirection(el, this.options);
1198
+ },
1199
+ ghostClass: 'sortable-ghost',
1200
+ chosenClass: 'sortable-chosen',
1201
+ dragClass: 'sortable-drag',
1202
+ ignore: 'a, img',
1203
+ filter: null,
1204
+ preventOnFilter: true,
1205
+ animation: 0,
1206
+ easing: null,
1207
+ setData: function setData(dataTransfer, dragEl) {
1208
+ dataTransfer.setData('Text', dragEl.textContent);
1209
+ },
1210
+ dropBubble: false,
1211
+ dragoverBubble: false,
1212
+ dataIdAttr: 'data-id',
1213
+ delay: 0,
1214
+ delayOnTouchOnly: false,
1215
+ touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,
1216
+ forceFallback: false,
1217
+ fallbackClass: 'sortable-fallback',
1218
+ fallbackOnBody: false,
1219
+ fallbackTolerance: 0,
1220
+ fallbackOffset: {
1221
+ x: 0,
1222
+ y: 0
1223
+ },
1224
+ supportPointer: Sortable.supportPointer !== false && 'PointerEvent' in window && !Safari,
1225
+ emptyInsertThreshold: 5
1226
+ };
1227
+ PluginManager.initializePlugins(this, el, defaults); // Set default options
1228
+
1229
+ for (var name in defaults) {
1230
+ !(name in options) && (options[name] = defaults[name]);
1231
+ }
1232
+
1233
+ _prepareGroup(options); // Bind all private methods
1234
+
1235
+
1236
+ for (var fn in this) {
1237
+ if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
1238
+ this[fn] = this[fn].bind(this);
1239
+ }
1240
+ } // Setup drag mode
1241
+
1242
+
1243
+ this.nativeDraggable = options.forceFallback ? false : supportDraggable;
1244
+
1245
+ if (this.nativeDraggable) {
1246
+ // Touch start threshold cannot be greater than the native dragstart threshold
1247
+ this.options.touchStartThreshold = 1;
1248
+ } // Bind events
1249
+
1250
+
1251
+ if (options.supportPointer) {
1252
+ on(el, 'pointerdown', this._onTapStart);
1253
+ } else {
1254
+ on(el, 'mousedown', this._onTapStart);
1255
+ on(el, 'touchstart', this._onTapStart);
1256
+ }
1257
+
1258
+ if (this.nativeDraggable) {
1259
+ on(el, 'dragover', this);
1260
+ on(el, 'dragenter', this);
1261
+ }
1262
+
1263
+ sortables.push(this.el); // Restore sorting
1264
+
1265
+ options.store && options.store.get && this.sort(options.store.get(this) || []); // Add animation state manager
1266
+
1267
+ _extends(this, AnimationStateManager());
1268
+ }
1269
+
1270
+ Sortable.prototype =
1271
+ /** @lends Sortable.prototype */
1272
+ {
1273
+ constructor: Sortable,
1274
+ _isOutsideThisEl: function _isOutsideThisEl(target) {
1275
+ if (!this.el.contains(target) && target !== this.el) {
1276
+ lastTarget = null;
1277
+ }
1278
+ },
1279
+ _getDirection: function _getDirection(evt, target) {
1280
+ return typeof this.options.direction === 'function' ? this.options.direction.call(this, evt, target, dragEl) : this.options.direction;
1281
+ },
1282
+ _onTapStart: function _onTapStart(
1283
+ /** Event|TouchEvent */
1284
+ evt) {
1285
+ if (!evt.cancelable) return;
1286
+
1287
+ var _this = this,
1288
+ el = this.el,
1289
+ options = this.options,
1290
+ preventOnFilter = options.preventOnFilter,
1291
+ type = evt.type,
1292
+ touch = evt.touches && evt.touches[0] || evt.pointerType && evt.pointerType === 'touch' && evt,
1293
+ target = (touch || evt).target,
1294
+ originalTarget = evt.target.shadowRoot && (evt.path && evt.path[0] || evt.composedPath && evt.composedPath()[0]) || target,
1295
+ filter = options.filter;
1296
+
1297
+ _saveInputCheckedState(el); // Don't trigger start event when an element is been dragged, otherwise the evt.oldindex always wrong when set option.group.
1298
+
1299
+
1300
+ if (dragEl) {
1301
+ return;
1302
+ }
1303
+
1304
+ if (/mousedown|pointerdown/.test(type) && evt.button !== 0 || options.disabled) {
1305
+ return; // only left button and enabled
1306
+ } // cancel dnd if original target is content editable
1307
+
1308
+
1309
+ if (originalTarget.isContentEditable) {
1310
+ return;
1311
+ } // Safari ignores further event handling after mousedown
1312
+
1313
+
1314
+ if (!this.nativeDraggable && Safari && target && target.tagName.toUpperCase() === 'SELECT') {
1315
+ return;
1316
+ }
1317
+
1318
+ target = closest(target, options.draggable, el, false);
1319
+
1320
+ if (target && target.animated) {
1321
+ return;
1322
+ }
1323
+
1324
+ if (lastDownEl === target) {
1325
+ // Ignoring duplicate `down`
1326
+ return;
1327
+ } // Get the index of the dragged element within its parent
1328
+
1329
+
1330
+ oldIndex = index(target);
1331
+ oldDraggableIndex = index(target, options.draggable); // Check filter
1332
+
1333
+ if (typeof filter === 'function') {
1334
+ if (filter.call(this, evt, target, this)) {
1335
+ _dispatchEvent({
1336
+ sortable: _this,
1337
+ rootEl: originalTarget,
1338
+ name: 'filter',
1339
+ targetEl: target,
1340
+ toEl: el,
1341
+ fromEl: el
1342
+ });
1343
+
1344
+ pluginEvent('filter', _this, {
1345
+ evt: evt
1346
+ });
1347
+ preventOnFilter && evt.cancelable && evt.preventDefault();
1348
+ return; // cancel dnd
1349
+ }
1350
+ } else if (filter) {
1351
+ filter = filter.split(',').some(function (criteria) {
1352
+ criteria = closest(originalTarget, criteria.trim(), el, false);
1353
+
1354
+ if (criteria) {
1355
+ _dispatchEvent({
1356
+ sortable: _this,
1357
+ rootEl: criteria,
1358
+ name: 'filter',
1359
+ targetEl: target,
1360
+ fromEl: el,
1361
+ toEl: el
1362
+ });
1363
+
1364
+ pluginEvent('filter', _this, {
1365
+ evt: evt
1366
+ });
1367
+ return true;
1368
+ }
1369
+ });
1370
+
1371
+ if (filter) {
1372
+ preventOnFilter && evt.cancelable && evt.preventDefault();
1373
+ return; // cancel dnd
1374
+ }
1375
+ }
1376
+
1377
+ if (options.handle && !closest(originalTarget, options.handle, el, false)) {
1378
+ return;
1379
+ } // Prepare `dragstart`
1380
+
1381
+
1382
+ this._prepareDragStart(evt, touch, target);
1383
+ },
1384
+ _prepareDragStart: function _prepareDragStart(
1385
+ /** Event */
1386
+ evt,
1387
+ /** Touch */
1388
+ touch,
1389
+ /** HTMLElement */
1390
+ target) {
1391
+ var _this = this,
1392
+ el = _this.el,
1393
+ options = _this.options,
1394
+ ownerDocument = el.ownerDocument,
1395
+ dragStartFn;
1396
+
1397
+ if (target && !dragEl && target.parentNode === el) {
1398
+ var dragRect = getRect(target);
1399
+ rootEl = el;
1400
+ dragEl = target;
1401
+ parentEl = dragEl.parentNode;
1402
+ nextEl = dragEl.nextSibling;
1403
+ lastDownEl = target;
1404
+ activeGroup = options.group;
1405
+ Sortable.dragged = dragEl;
1406
+ tapEvt = {
1407
+ target: dragEl,
1408
+ clientX: (touch || evt).clientX,
1409
+ clientY: (touch || evt).clientY
1410
+ };
1411
+ tapDistanceLeft = tapEvt.clientX - dragRect.left;
1412
+ tapDistanceTop = tapEvt.clientY - dragRect.top;
1413
+ this._lastX = (touch || evt).clientX;
1414
+ this._lastY = (touch || evt).clientY;
1415
+ dragEl.style['will-change'] = 'all';
1416
+
1417
+ dragStartFn = function dragStartFn() {
1418
+ pluginEvent('delayEnded', _this, {
1419
+ evt: evt
1420
+ });
1421
+
1422
+ if (Sortable.eventCanceled) {
1423
+ _this._onDrop();
1424
+
1425
+ return;
1426
+ } // Delayed drag has been triggered
1427
+ // we can re-enable the events: touchmove/mousemove
1428
+
1429
+
1430
+ _this._disableDelayedDragEvents();
1431
+
1432
+ if (!FireFox && _this.nativeDraggable) {
1433
+ dragEl.draggable = true;
1434
+ } // Bind the events: dragstart/dragend
1435
+
1436
+
1437
+ _this._triggerDragStart(evt, touch); // Drag start event
1438
+
1439
+
1440
+ _dispatchEvent({
1441
+ sortable: _this,
1442
+ name: 'choose',
1443
+ originalEvent: evt
1444
+ }); // Chosen item
1445
+
1446
+
1447
+ toggleClass(dragEl, options.chosenClass, true);
1448
+ }; // Disable "draggable"
1449
+
1450
+
1451
+ options.ignore.split(',').forEach(function (criteria) {
1452
+ find(dragEl, criteria.trim(), _disableDraggable);
1453
+ });
1454
+ on(ownerDocument, 'dragover', nearestEmptyInsertDetectEvent);
1455
+ on(ownerDocument, 'mousemove', nearestEmptyInsertDetectEvent);
1456
+ on(ownerDocument, 'touchmove', nearestEmptyInsertDetectEvent);
1457
+ on(ownerDocument, 'mouseup', _this._onDrop);
1458
+ on(ownerDocument, 'touchend', _this._onDrop);
1459
+ on(ownerDocument, 'touchcancel', _this._onDrop); // Make dragEl draggable (must be before delay for FireFox)
1460
+
1461
+ if (FireFox && this.nativeDraggable) {
1462
+ this.options.touchStartThreshold = 4;
1463
+ dragEl.draggable = true;
1464
+ }
1465
+
1466
+ pluginEvent('delayStart', this, {
1467
+ evt: evt
1468
+ }); // Delay is impossible for native DnD in Edge or IE
1469
+
1470
+ if (options.delay && (!options.delayOnTouchOnly || touch) && (!this.nativeDraggable || !(Edge || IE11OrLess))) {
1471
+ if (Sortable.eventCanceled) {
1472
+ this._onDrop();
1473
+
1474
+ return;
1475
+ } // If the user moves the pointer or let go the click or touch
1476
+ // before the delay has been reached:
1477
+ // disable the delayed drag
1478
+
1479
+
1480
+ on(ownerDocument, 'mouseup', _this._disableDelayedDrag);
1481
+ on(ownerDocument, 'touchend', _this._disableDelayedDrag);
1482
+ on(ownerDocument, 'touchcancel', _this._disableDelayedDrag);
1483
+ on(ownerDocument, 'mousemove', _this._delayedDragTouchMoveHandler);
1484
+ on(ownerDocument, 'touchmove', _this._delayedDragTouchMoveHandler);
1485
+ options.supportPointer && on(ownerDocument, 'pointermove', _this._delayedDragTouchMoveHandler);
1486
+ _this._dragStartTimer = setTimeout(dragStartFn, options.delay);
1487
+ } else {
1488
+ dragStartFn();
1489
+ }
1490
+ }
1491
+ },
1492
+ _delayedDragTouchMoveHandler: function _delayedDragTouchMoveHandler(
1493
+ /** TouchEvent|PointerEvent **/
1494
+ e) {
1495
+ var touch = e.touches ? e.touches[0] : e;
1496
+
1497
+ if (Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1))) {
1498
+ this._disableDelayedDrag();
1499
+ }
1500
+ },
1501
+ _disableDelayedDrag: function _disableDelayedDrag() {
1502
+ dragEl && _disableDraggable(dragEl);
1503
+ clearTimeout(this._dragStartTimer);
1504
+
1505
+ this._disableDelayedDragEvents();
1506
+ },
1507
+ _disableDelayedDragEvents: function _disableDelayedDragEvents() {
1508
+ var ownerDocument = this.el.ownerDocument;
1509
+ off(ownerDocument, 'mouseup', this._disableDelayedDrag);
1510
+ off(ownerDocument, 'touchend', this._disableDelayedDrag);
1511
+ off(ownerDocument, 'touchcancel', this._disableDelayedDrag);
1512
+ off(ownerDocument, 'mousemove', this._delayedDragTouchMoveHandler);
1513
+ off(ownerDocument, 'touchmove', this._delayedDragTouchMoveHandler);
1514
+ off(ownerDocument, 'pointermove', this._delayedDragTouchMoveHandler);
1515
+ },
1516
+ _triggerDragStart: function _triggerDragStart(
1517
+ /** Event */
1518
+ evt,
1519
+ /** Touch */
1520
+ touch) {
1521
+ touch = touch || evt.pointerType == 'touch' && evt;
1522
+
1523
+ if (!this.nativeDraggable || touch) {
1524
+ if (this.options.supportPointer) {
1525
+ on(document, 'pointermove', this._onTouchMove);
1526
+ } else if (touch) {
1527
+ on(document, 'touchmove', this._onTouchMove);
1528
+ } else {
1529
+ on(document, 'mousemove', this._onTouchMove);
1530
+ }
1531
+ } else {
1532
+ on(dragEl, 'dragend', this);
1533
+ on(rootEl, 'dragstart', this._onDragStart);
1534
+ }
1535
+
1536
+ try {
1537
+ if (document.selection) {
1538
+ // Timeout neccessary for IE9
1539
+ _nextTick(function () {
1540
+ document.selection.empty();
1541
+ });
1542
+ } else {
1543
+ window.getSelection().removeAllRanges();
1544
+ }
1545
+ } catch (err) {}
1546
+ },
1547
+ _dragStarted: function _dragStarted(fallback, evt) {
1548
+
1549
+ awaitingDragStarted = false;
1550
+
1551
+ if (rootEl && dragEl) {
1552
+ pluginEvent('dragStarted', this, {
1553
+ evt: evt
1554
+ });
1555
+
1556
+ if (this.nativeDraggable) {
1557
+ on(document, 'dragover', _checkOutsideTargetEl);
1558
+ }
1559
+
1560
+ var options = this.options; // Apply effect
1561
+
1562
+ !fallback && toggleClass(dragEl, options.dragClass, false);
1563
+ toggleClass(dragEl, options.ghostClass, true);
1564
+ Sortable.active = this;
1565
+ fallback && this._appendGhost(); // Drag start event
1566
+
1567
+ _dispatchEvent({
1568
+ sortable: this,
1569
+ name: 'start',
1570
+ originalEvent: evt
1571
+ });
1572
+ } else {
1573
+ this._nulling();
1574
+ }
1575
+ },
1576
+ _emulateDragOver: function _emulateDragOver() {
1577
+ if (touchEvt) {
1578
+ this._lastX = touchEvt.clientX;
1579
+ this._lastY = touchEvt.clientY;
1580
+
1581
+ _hideGhostForTarget();
1582
+
1583
+ var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY);
1584
+ var parent = target;
1585
+
1586
+ while (target && target.shadowRoot) {
1587
+ target = target.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY);
1588
+ if (target === parent) break;
1589
+ parent = target;
1590
+ }
1591
+
1592
+ dragEl.parentNode[expando]._isOutsideThisEl(target);
1593
+
1594
+ if (parent) {
1595
+ do {
1596
+ if (parent[expando]) {
1597
+ var inserted = void 0;
1598
+ inserted = parent[expando]._onDragOver({
1599
+ clientX: touchEvt.clientX,
1600
+ clientY: touchEvt.clientY,
1601
+ target: target,
1602
+ rootEl: parent
1603
+ });
1604
+
1605
+ if (inserted && !this.options.dragoverBubble) {
1606
+ break;
1607
+ }
1608
+ }
1609
+
1610
+ target = parent; // store last element
1611
+ }
1612
+ /* jshint boss:true */
1613
+ while (parent = parent.parentNode);
1614
+ }
1615
+
1616
+ _unhideGhostForTarget();
1617
+ }
1618
+ },
1619
+ _onTouchMove: function _onTouchMove(
1620
+ /**TouchEvent*/
1621
+ evt) {
1622
+ if (tapEvt) {
1623
+ var options = this.options,
1624
+ fallbackTolerance = options.fallbackTolerance,
1625
+ fallbackOffset = options.fallbackOffset,
1626
+ touch = evt.touches ? evt.touches[0] : evt,
1627
+ ghostMatrix = ghostEl && matrix(ghostEl, true),
1628
+ scaleX = ghostEl && ghostMatrix && ghostMatrix.a,
1629
+ scaleY = ghostEl && ghostMatrix && ghostMatrix.d,
1630
+ relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent),
1631
+ dx = (touch.clientX - tapEvt.clientX + fallbackOffset.x) / (scaleX || 1) + (relativeScrollOffset ? relativeScrollOffset[0] - ghostRelativeParentInitialScroll[0] : 0) / (scaleX || 1),
1632
+ dy = (touch.clientY - tapEvt.clientY + fallbackOffset.y) / (scaleY || 1) + (relativeScrollOffset ? relativeScrollOffset[1] - ghostRelativeParentInitialScroll[1] : 0) / (scaleY || 1); // only set the status to dragging, when we are actually dragging
1633
+
1634
+ if (!Sortable.active && !awaitingDragStarted) {
1635
+ if (fallbackTolerance && Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) < fallbackTolerance) {
1636
+ return;
1637
+ }
1638
+
1639
+ this._onDragStart(evt, true);
1640
+ }
1641
+
1642
+ if (ghostEl) {
1643
+ if (ghostMatrix) {
1644
+ ghostMatrix.e += dx - (lastDx || 0);
1645
+ ghostMatrix.f += dy - (lastDy || 0);
1646
+ } else {
1647
+ ghostMatrix = {
1648
+ a: 1,
1649
+ b: 0,
1650
+ c: 0,
1651
+ d: 1,
1652
+ e: dx,
1653
+ f: dy
1654
+ };
1655
+ }
1656
+
1657
+ var cssMatrix = "matrix(".concat(ghostMatrix.a, ",").concat(ghostMatrix.b, ",").concat(ghostMatrix.c, ",").concat(ghostMatrix.d, ",").concat(ghostMatrix.e, ",").concat(ghostMatrix.f, ")");
1658
+ css(ghostEl, 'webkitTransform', cssMatrix);
1659
+ css(ghostEl, 'mozTransform', cssMatrix);
1660
+ css(ghostEl, 'msTransform', cssMatrix);
1661
+ css(ghostEl, 'transform', cssMatrix);
1662
+ lastDx = dx;
1663
+ lastDy = dy;
1664
+ touchEvt = touch;
1665
+ }
1666
+
1667
+ evt.cancelable && evt.preventDefault();
1668
+ }
1669
+ },
1670
+ _appendGhost: function _appendGhost() {
1671
+ // Bug if using scale(): https://stackoverflow.com/questions/2637058
1672
+ // Not being adjusted for
1673
+ if (!ghostEl) {
1674
+ var container = this.options.fallbackOnBody ? document.body : rootEl,
1675
+ rect = getRect(dragEl, true, PositionGhostAbsolutely, true, container),
1676
+ options = this.options; // Position absolutely
1677
+
1678
+ if (PositionGhostAbsolutely) {
1679
+ // Get relatively positioned parent
1680
+ ghostRelativeParent = container;
1681
+
1682
+ while (css(ghostRelativeParent, 'position') === 'static' && css(ghostRelativeParent, 'transform') === 'none' && ghostRelativeParent !== document) {
1683
+ ghostRelativeParent = ghostRelativeParent.parentNode;
1684
+ }
1685
+
1686
+ if (ghostRelativeParent !== document.body && ghostRelativeParent !== document.documentElement) {
1687
+ if (ghostRelativeParent === document) ghostRelativeParent = getWindowScrollingElement();
1688
+ rect.top += ghostRelativeParent.scrollTop;
1689
+ rect.left += ghostRelativeParent.scrollLeft;
1690
+ } else {
1691
+ ghostRelativeParent = getWindowScrollingElement();
1692
+ }
1693
+
1694
+ ghostRelativeParentInitialScroll = getRelativeScrollOffset(ghostRelativeParent);
1695
+ }
1696
+
1697
+ ghostEl = dragEl.cloneNode(true);
1698
+ toggleClass(ghostEl, options.ghostClass, false);
1699
+ toggleClass(ghostEl, options.fallbackClass, true);
1700
+ toggleClass(ghostEl, options.dragClass, true);
1701
+ css(ghostEl, 'transition', '');
1702
+ css(ghostEl, 'transform', '');
1703
+ css(ghostEl, 'box-sizing', 'border-box');
1704
+ css(ghostEl, 'margin', 0);
1705
+ css(ghostEl, 'top', rect.top);
1706
+ css(ghostEl, 'left', rect.left);
1707
+ css(ghostEl, 'width', rect.width);
1708
+ css(ghostEl, 'height', rect.height);
1709
+ css(ghostEl, 'opacity', '0.8');
1710
+ css(ghostEl, 'position', PositionGhostAbsolutely ? 'absolute' : 'fixed');
1711
+ css(ghostEl, 'zIndex', '100000');
1712
+ css(ghostEl, 'pointerEvents', 'none');
1713
+ Sortable.ghost = ghostEl;
1714
+ container.appendChild(ghostEl); // Set transform-origin
1715
+
1716
+ css(ghostEl, 'transform-origin', tapDistanceLeft / parseInt(ghostEl.style.width) * 100 + '% ' + tapDistanceTop / parseInt(ghostEl.style.height) * 100 + '%');
1717
+ }
1718
+ },
1719
+ _onDragStart: function _onDragStart(
1720
+ /**Event*/
1721
+ evt,
1722
+ /**boolean*/
1723
+ fallback) {
1724
+ var _this = this;
1725
+
1726
+ var dataTransfer = evt.dataTransfer;
1727
+ var options = _this.options;
1728
+ pluginEvent('dragStart', this, {
1729
+ evt: evt
1730
+ });
1731
+
1732
+ if (Sortable.eventCanceled) {
1733
+ this._onDrop();
1734
+
1735
+ return;
1736
+ }
1737
+
1738
+ pluginEvent('setupClone', this);
1739
+
1740
+ if (!Sortable.eventCanceled) {
1741
+ cloneEl = clone(dragEl);
1742
+ cloneEl.removeAttribute("id");
1743
+ cloneEl.draggable = false;
1744
+ cloneEl.style['will-change'] = '';
1745
+
1746
+ this._hideClone();
1747
+
1748
+ toggleClass(cloneEl, this.options.chosenClass, false);
1749
+ Sortable.clone = cloneEl;
1750
+ } // #1143: IFrame support workaround
1751
+
1752
+
1753
+ _this.cloneId = _nextTick(function () {
1754
+ pluginEvent('clone', _this);
1755
+ if (Sortable.eventCanceled) return;
1756
+
1757
+ if (!_this.options.removeCloneOnHide) {
1758
+ rootEl.insertBefore(cloneEl, dragEl);
1759
+ }
1760
+
1761
+ _this._hideClone();
1762
+
1763
+ _dispatchEvent({
1764
+ sortable: _this,
1765
+ name: 'clone'
1766
+ });
1767
+ });
1768
+ !fallback && toggleClass(dragEl, options.dragClass, true); // Set proper drop events
1769
+
1770
+ if (fallback) {
1771
+ ignoreNextClick = true;
1772
+ _this._loopId = setInterval(_this._emulateDragOver, 50);
1773
+ } else {
1774
+ // Undo what was set in _prepareDragStart before drag started
1775
+ off(document, 'mouseup', _this._onDrop);
1776
+ off(document, 'touchend', _this._onDrop);
1777
+ off(document, 'touchcancel', _this._onDrop);
1778
+
1779
+ if (dataTransfer) {
1780
+ dataTransfer.effectAllowed = 'move';
1781
+ options.setData && options.setData.call(_this, dataTransfer, dragEl);
1782
+ }
1783
+
1784
+ on(document, 'drop', _this); // #1276 fix:
1785
+
1786
+ css(dragEl, 'transform', 'translateZ(0)');
1787
+ }
1788
+
1789
+ awaitingDragStarted = true;
1790
+ _this._dragStartId = _nextTick(_this._dragStarted.bind(_this, fallback, evt));
1791
+ on(document, 'selectstart', _this);
1792
+ moved = true;
1793
+
1794
+ if (Safari) {
1795
+ css(document.body, 'user-select', 'none');
1796
+ }
1797
+ },
1798
+ // Returns true - if no further action is needed (either inserted or another condition)
1799
+ _onDragOver: function _onDragOver(
1800
+ /**Event*/
1801
+ evt) {
1802
+ var el = this.el,
1803
+ target = evt.target,
1804
+ dragRect,
1805
+ targetRect,
1806
+ revert,
1807
+ options = this.options,
1808
+ group = options.group,
1809
+ activeSortable = Sortable.active,
1810
+ isOwner = activeGroup === group,
1811
+ canSort = options.sort,
1812
+ fromSortable = putSortable || activeSortable,
1813
+ vertical,
1814
+ _this = this,
1815
+ completedFired = false;
1816
+
1817
+ if (_silent) return;
1818
+
1819
+ function dragOverEvent(name, extra) {
1820
+ pluginEvent(name, _this, _objectSpread2({
1821
+ evt: evt,
1822
+ isOwner: isOwner,
1823
+ axis: vertical ? 'vertical' : 'horizontal',
1824
+ revert: revert,
1825
+ dragRect: dragRect,
1826
+ targetRect: targetRect,
1827
+ canSort: canSort,
1828
+ fromSortable: fromSortable,
1829
+ target: target,
1830
+ completed: completed,
1831
+ onMove: function onMove(target, after) {
1832
+ return _onMove(rootEl, el, dragEl, dragRect, target, getRect(target), evt, after);
1833
+ },
1834
+ changed: changed
1835
+ }, extra));
1836
+ } // Capture animation state
1837
+
1838
+
1839
+ function capture() {
1840
+ dragOverEvent('dragOverAnimationCapture');
1841
+
1842
+ _this.captureAnimationState();
1843
+
1844
+ if (_this !== fromSortable) {
1845
+ fromSortable.captureAnimationState();
1846
+ }
1847
+ } // Return invocation when dragEl is inserted (or completed)
1848
+
1849
+
1850
+ function completed(insertion) {
1851
+ dragOverEvent('dragOverCompleted', {
1852
+ insertion: insertion
1853
+ });
1854
+
1855
+ if (insertion) {
1856
+ // Clones must be hidden before folding animation to capture dragRectAbsolute properly
1857
+ if (isOwner) {
1858
+ activeSortable._hideClone();
1859
+ } else {
1860
+ activeSortable._showClone(_this);
1861
+ }
1862
+
1863
+ if (_this !== fromSortable) {
1864
+ // Set ghost class to new sortable's ghost class
1865
+ toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : activeSortable.options.ghostClass, false);
1866
+ toggleClass(dragEl, options.ghostClass, true);
1867
+ }
1868
+
1869
+ if (putSortable !== _this && _this !== Sortable.active) {
1870
+ putSortable = _this;
1871
+ } else if (_this === Sortable.active && putSortable) {
1872
+ putSortable = null;
1873
+ } // Animation
1874
+
1875
+
1876
+ if (fromSortable === _this) {
1877
+ _this._ignoreWhileAnimating = target;
1878
+ }
1879
+
1880
+ _this.animateAll(function () {
1881
+ dragOverEvent('dragOverAnimationComplete');
1882
+ _this._ignoreWhileAnimating = null;
1883
+ });
1884
+
1885
+ if (_this !== fromSortable) {
1886
+ fromSortable.animateAll();
1887
+ fromSortable._ignoreWhileAnimating = null;
1888
+ }
1889
+ } // Null lastTarget if it is not inside a previously swapped element
1890
+
1891
+
1892
+ if (target === dragEl && !dragEl.animated || target === el && !target.animated) {
1893
+ lastTarget = null;
1894
+ } // no bubbling and not fallback
1895
+
1896
+
1897
+ if (!options.dragoverBubble && !evt.rootEl && target !== document) {
1898
+ dragEl.parentNode[expando]._isOutsideThisEl(evt.target); // Do not detect for empty insert if already inserted
1899
+
1900
+
1901
+ !insertion && nearestEmptyInsertDetectEvent(evt);
1902
+ }
1903
+
1904
+ !options.dragoverBubble && evt.stopPropagation && evt.stopPropagation();
1905
+ return completedFired = true;
1906
+ } // Call when dragEl has been inserted
1907
+
1908
+
1909
+ function changed() {
1910
+ newIndex = index(dragEl);
1911
+ newDraggableIndex = index(dragEl, options.draggable);
1912
+
1913
+ _dispatchEvent({
1914
+ sortable: _this,
1915
+ name: 'change',
1916
+ toEl: el,
1917
+ newIndex: newIndex,
1918
+ newDraggableIndex: newDraggableIndex,
1919
+ originalEvent: evt
1920
+ });
1921
+ }
1922
+
1923
+ if (evt.preventDefault !== void 0) {
1924
+ evt.cancelable && evt.preventDefault();
1925
+ }
1926
+
1927
+ target = closest(target, options.draggable, el, true);
1928
+ dragOverEvent('dragOver');
1929
+ if (Sortable.eventCanceled) return completedFired;
1930
+
1931
+ if (dragEl.contains(evt.target) || target.animated && target.animatingX && target.animatingY || _this._ignoreWhileAnimating === target) {
1932
+ return completed(false);
1933
+ }
1934
+
1935
+ ignoreNextClick = false;
1936
+
1937
+ if (activeSortable && !options.disabled && (isOwner ? canSort || (revert = parentEl !== rootEl) // Reverting item into the original list
1938
+ : putSortable === this || (this.lastPutMode = activeGroup.checkPull(this, activeSortable, dragEl, evt)) && group.checkPut(this, activeSortable, dragEl, evt))) {
1939
+ vertical = this._getDirection(evt, target) === 'vertical';
1940
+ dragRect = getRect(dragEl);
1941
+ dragOverEvent('dragOverValid');
1942
+ if (Sortable.eventCanceled) return completedFired;
1943
+
1944
+ if (revert) {
1945
+ parentEl = rootEl; // actualization
1946
+
1947
+ capture();
1948
+
1949
+ this._hideClone();
1950
+
1951
+ dragOverEvent('revert');
1952
+
1953
+ if (!Sortable.eventCanceled) {
1954
+ if (nextEl) {
1955
+ rootEl.insertBefore(dragEl, nextEl);
1956
+ } else {
1957
+ rootEl.appendChild(dragEl);
1958
+ }
1959
+ }
1960
+
1961
+ return completed(true);
1962
+ }
1963
+
1964
+ var elLastChild = lastChild(el, options.draggable);
1965
+
1966
+ if (!elLastChild || _ghostIsLast(evt, vertical, this) && !elLastChild.animated) {
1967
+ // Insert to end of list
1968
+ // If already at end of list: Do not insert
1969
+ if (elLastChild === dragEl) {
1970
+ return completed(false);
1971
+ } // if there is a last element, it is the target
1972
+
1973
+
1974
+ if (elLastChild && el === evt.target) {
1975
+ target = elLastChild;
1976
+ }
1977
+
1978
+ if (target) {
1979
+ targetRect = getRect(target);
1980
+ }
1981
+
1982
+ if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, !!target) !== false) {
1983
+ capture();
1984
+
1985
+ if (elLastChild && elLastChild.nextSibling) {
1986
+ // the last draggable element is not the last node
1987
+ el.insertBefore(dragEl, elLastChild.nextSibling);
1988
+ } else {
1989
+ el.appendChild(dragEl);
1990
+ }
1991
+
1992
+ parentEl = el; // actualization
1993
+
1994
+ changed();
1995
+ return completed(true);
1996
+ }
1997
+ } else if (elLastChild && _ghostIsFirst(evt, vertical, this)) {
1998
+ // Insert to start of list
1999
+ var firstChild = getChild(el, 0, options, true);
2000
+
2001
+ if (firstChild === dragEl) {
2002
+ return completed(false);
2003
+ }
2004
+
2005
+ target = firstChild;
2006
+ targetRect = getRect(target);
2007
+
2008
+ if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, false) !== false) {
2009
+ capture();
2010
+ el.insertBefore(dragEl, firstChild);
2011
+ parentEl = el; // actualization
2012
+
2013
+ changed();
2014
+ return completed(true);
2015
+ }
2016
+ } else if (target.parentNode === el) {
2017
+ targetRect = getRect(target);
2018
+ var direction = 0,
2019
+ targetBeforeFirstSwap,
2020
+ differentLevel = dragEl.parentNode !== el,
2021
+ differentRowCol = !_dragElInRowColumn(dragEl.animated && dragEl.toRect || dragRect, target.animated && target.toRect || targetRect, vertical),
2022
+ side1 = vertical ? 'top' : 'left',
2023
+ scrolledPastTop = isScrolledPast(target, 'top', 'top') || isScrolledPast(dragEl, 'top', 'top'),
2024
+ scrollBefore = scrolledPastTop ? scrolledPastTop.scrollTop : void 0;
2025
+
2026
+ if (lastTarget !== target) {
2027
+ targetBeforeFirstSwap = targetRect[side1];
2028
+ pastFirstInvertThresh = false;
2029
+ isCircumstantialInvert = !differentRowCol && options.invertSwap || differentLevel;
2030
+ }
2031
+
2032
+ direction = _getSwapDirection(evt, target, targetRect, vertical, differentRowCol ? 1 : options.swapThreshold, options.invertedSwapThreshold == null ? options.swapThreshold : options.invertedSwapThreshold, isCircumstantialInvert, lastTarget === target);
2033
+ var sibling;
2034
+
2035
+ if (direction !== 0) {
2036
+ // Check if target is beside dragEl in respective direction (ignoring hidden elements)
2037
+ var dragIndex = index(dragEl);
2038
+
2039
+ do {
2040
+ dragIndex -= direction;
2041
+ sibling = parentEl.children[dragIndex];
2042
+ } while (sibling && (css(sibling, 'display') === 'none' || sibling === ghostEl));
2043
+ } // If dragEl is already beside target: Do not insert
2044
+
2045
+
2046
+ if (direction === 0 || sibling === target) {
2047
+ return completed(false);
2048
+ }
2049
+
2050
+ lastTarget = target;
2051
+ lastDirection = direction;
2052
+ var nextSibling = target.nextElementSibling,
2053
+ after = false;
2054
+ after = direction === 1;
2055
+
2056
+ var moveVector = _onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, after);
2057
+
2058
+ if (moveVector !== false) {
2059
+ if (moveVector === 1 || moveVector === -1) {
2060
+ after = moveVector === 1;
2061
+ }
2062
+
2063
+ _silent = true;
2064
+ setTimeout(_unsilent, 30);
2065
+ capture();
2066
+
2067
+ if (after && !nextSibling) {
2068
+ el.appendChild(dragEl);
2069
+ } else {
2070
+ target.parentNode.insertBefore(dragEl, after ? nextSibling : target);
2071
+ } // Undo chrome's scroll adjustment (has no effect on other browsers)
2072
+
2073
+
2074
+ if (scrolledPastTop) {
2075
+ scrollBy(scrolledPastTop, 0, scrollBefore - scrolledPastTop.scrollTop);
2076
+ }
2077
+
2078
+ parentEl = dragEl.parentNode; // actualization
2079
+ // must be done before animation
2080
+
2081
+ if (targetBeforeFirstSwap !== undefined && !isCircumstantialInvert) {
2082
+ targetMoveDistance = Math.abs(targetBeforeFirstSwap - getRect(target)[side1]);
2083
+ }
2084
+
2085
+ changed();
2086
+ return completed(true);
2087
+ }
2088
+ }
2089
+
2090
+ if (el.contains(dragEl)) {
2091
+ return completed(false);
2092
+ }
2093
+ }
2094
+
2095
+ return false;
2096
+ },
2097
+ _ignoreWhileAnimating: null,
2098
+ _offMoveEvents: function _offMoveEvents() {
2099
+ off(document, 'mousemove', this._onTouchMove);
2100
+ off(document, 'touchmove', this._onTouchMove);
2101
+ off(document, 'pointermove', this._onTouchMove);
2102
+ off(document, 'dragover', nearestEmptyInsertDetectEvent);
2103
+ off(document, 'mousemove', nearestEmptyInsertDetectEvent);
2104
+ off(document, 'touchmove', nearestEmptyInsertDetectEvent);
2105
+ },
2106
+ _offUpEvents: function _offUpEvents() {
2107
+ var ownerDocument = this.el.ownerDocument;
2108
+ off(ownerDocument, 'mouseup', this._onDrop);
2109
+ off(ownerDocument, 'touchend', this._onDrop);
2110
+ off(ownerDocument, 'pointerup', this._onDrop);
2111
+ off(ownerDocument, 'touchcancel', this._onDrop);
2112
+ off(document, 'selectstart', this);
2113
+ },
2114
+ _onDrop: function _onDrop(
2115
+ /**Event*/
2116
+ evt) {
2117
+ var el = this.el,
2118
+ options = this.options; // Get the index of the dragged element within its parent
2119
+
2120
+ newIndex = index(dragEl);
2121
+ newDraggableIndex = index(dragEl, options.draggable);
2122
+ pluginEvent('drop', this, {
2123
+ evt: evt
2124
+ });
2125
+ parentEl = dragEl && dragEl.parentNode; // Get again after plugin event
2126
+
2127
+ newIndex = index(dragEl);
2128
+ newDraggableIndex = index(dragEl, options.draggable);
2129
+
2130
+ if (Sortable.eventCanceled) {
2131
+ this._nulling();
2132
+
2133
+ return;
2134
+ }
2135
+
2136
+ awaitingDragStarted = false;
2137
+ isCircumstantialInvert = false;
2138
+ pastFirstInvertThresh = false;
2139
+ clearInterval(this._loopId);
2140
+ clearTimeout(this._dragStartTimer);
2141
+
2142
+ _cancelNextTick(this.cloneId);
2143
+
2144
+ _cancelNextTick(this._dragStartId); // Unbind events
2145
+
2146
+
2147
+ if (this.nativeDraggable) {
2148
+ off(document, 'drop', this);
2149
+ off(el, 'dragstart', this._onDragStart);
2150
+ }
2151
+
2152
+ this._offMoveEvents();
2153
+
2154
+ this._offUpEvents();
2155
+
2156
+ if (Safari) {
2157
+ css(document.body, 'user-select', '');
2158
+ }
2159
+
2160
+ css(dragEl, 'transform', '');
2161
+
2162
+ if (evt) {
2163
+ if (moved) {
2164
+ evt.cancelable && evt.preventDefault();
2165
+ !options.dropBubble && evt.stopPropagation();
2166
+ }
2167
+
2168
+ ghostEl && ghostEl.parentNode && ghostEl.parentNode.removeChild(ghostEl);
2169
+
2170
+ if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {
2171
+ // Remove clone(s)
2172
+ cloneEl && cloneEl.parentNode && cloneEl.parentNode.removeChild(cloneEl);
2173
+ }
2174
+
2175
+ if (dragEl) {
2176
+ if (this.nativeDraggable) {
2177
+ off(dragEl, 'dragend', this);
2178
+ }
2179
+
2180
+ _disableDraggable(dragEl);
2181
+
2182
+ dragEl.style['will-change'] = ''; // Remove classes
2183
+ // ghostClass is added in dragStarted
2184
+
2185
+ if (moved && !awaitingDragStarted) {
2186
+ toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : this.options.ghostClass, false);
2187
+ }
2188
+
2189
+ toggleClass(dragEl, this.options.chosenClass, false); // Drag stop event
2190
+
2191
+ _dispatchEvent({
2192
+ sortable: this,
2193
+ name: 'unchoose',
2194
+ toEl: parentEl,
2195
+ newIndex: null,
2196
+ newDraggableIndex: null,
2197
+ originalEvent: evt
2198
+ });
2199
+
2200
+ if (rootEl !== parentEl) {
2201
+ if (newIndex >= 0) {
2202
+ // Add event
2203
+ _dispatchEvent({
2204
+ rootEl: parentEl,
2205
+ name: 'add',
2206
+ toEl: parentEl,
2207
+ fromEl: rootEl,
2208
+ originalEvent: evt
2209
+ }); // Remove event
2210
+
2211
+
2212
+ _dispatchEvent({
2213
+ sortable: this,
2214
+ name: 'remove',
2215
+ toEl: parentEl,
2216
+ originalEvent: evt
2217
+ }); // drag from one list and drop into another
2218
+
2219
+
2220
+ _dispatchEvent({
2221
+ rootEl: parentEl,
2222
+ name: 'sort',
2223
+ toEl: parentEl,
2224
+ fromEl: rootEl,
2225
+ originalEvent: evt
2226
+ });
2227
+
2228
+ _dispatchEvent({
2229
+ sortable: this,
2230
+ name: 'sort',
2231
+ toEl: parentEl,
2232
+ originalEvent: evt
2233
+ });
2234
+ }
2235
+
2236
+ putSortable && putSortable.save();
2237
+ } else {
2238
+ if (newIndex !== oldIndex) {
2239
+ if (newIndex >= 0) {
2240
+ // drag & drop within the same list
2241
+ _dispatchEvent({
2242
+ sortable: this,
2243
+ name: 'update',
2244
+ toEl: parentEl,
2245
+ originalEvent: evt
2246
+ });
2247
+
2248
+ _dispatchEvent({
2249
+ sortable: this,
2250
+ name: 'sort',
2251
+ toEl: parentEl,
2252
+ originalEvent: evt
2253
+ });
2254
+ }
2255
+ }
2256
+ }
2257
+
2258
+ if (Sortable.active) {
2259
+ /* jshint eqnull:true */
2260
+ if (newIndex == null || newIndex === -1) {
2261
+ newIndex = oldIndex;
2262
+ newDraggableIndex = oldDraggableIndex;
2263
+ }
2264
+
2265
+ _dispatchEvent({
2266
+ sortable: this,
2267
+ name: 'end',
2268
+ toEl: parentEl,
2269
+ originalEvent: evt
2270
+ }); // Save sorting
2271
+
2272
+
2273
+ this.save();
2274
+ }
2275
+ }
2276
+ }
2277
+
2278
+ this._nulling();
2279
+ },
2280
+ _nulling: function _nulling() {
2281
+ pluginEvent('nulling', this);
2282
+ rootEl = dragEl = parentEl = ghostEl = nextEl = cloneEl = lastDownEl = cloneHidden = tapEvt = touchEvt = moved = newIndex = newDraggableIndex = oldIndex = oldDraggableIndex = lastTarget = lastDirection = putSortable = activeGroup = Sortable.dragged = Sortable.ghost = Sortable.clone = Sortable.active = null;
2283
+ savedInputChecked.forEach(function (el) {
2284
+ el.checked = true;
2285
+ });
2286
+ savedInputChecked.length = lastDx = lastDy = 0;
2287
+ },
2288
+ handleEvent: function handleEvent(
2289
+ /**Event*/
2290
+ evt) {
2291
+ switch (evt.type) {
2292
+ case 'drop':
2293
+ case 'dragend':
2294
+ this._onDrop(evt);
2295
+
2296
+ break;
2297
+
2298
+ case 'dragenter':
2299
+ case 'dragover':
2300
+ if (dragEl) {
2301
+ this._onDragOver(evt);
2302
+
2303
+ _globalDragOver(evt);
2304
+ }
2305
+
2306
+ break;
2307
+
2308
+ case 'selectstart':
2309
+ evt.preventDefault();
2310
+ break;
2311
+ }
2312
+ },
2313
+
2314
+ /**
2315
+ * Serializes the item into an array of string.
2316
+ * @returns {String[]}
2317
+ */
2318
+ toArray: function toArray() {
2319
+ var order = [],
2320
+ el,
2321
+ children = this.el.children,
2322
+ i = 0,
2323
+ n = children.length,
2324
+ options = this.options;
2325
+
2326
+ for (; i < n; i++) {
2327
+ el = children[i];
2328
+
2329
+ if (closest(el, options.draggable, this.el, false)) {
2330
+ order.push(el.getAttribute(options.dataIdAttr) || _generateId(el));
2331
+ }
2332
+ }
2333
+
2334
+ return order;
2335
+ },
2336
+
2337
+ /**
2338
+ * Sorts the elements according to the array.
2339
+ * @param {String[]} order order of the items
2340
+ */
2341
+ sort: function sort(order, useAnimation) {
2342
+ var items = {},
2343
+ rootEl = this.el;
2344
+ this.toArray().forEach(function (id, i) {
2345
+ var el = rootEl.children[i];
2346
+
2347
+ if (closest(el, this.options.draggable, rootEl, false)) {
2348
+ items[id] = el;
2349
+ }
2350
+ }, this);
2351
+ useAnimation && this.captureAnimationState();
2352
+ order.forEach(function (id) {
2353
+ if (items[id]) {
2354
+ rootEl.removeChild(items[id]);
2355
+ rootEl.appendChild(items[id]);
2356
+ }
2357
+ });
2358
+ useAnimation && this.animateAll();
2359
+ },
2360
+
2361
+ /**
2362
+ * Save the current sorting
2363
+ */
2364
+ save: function save() {
2365
+ var store = this.options.store;
2366
+ store && store.set && store.set(this);
2367
+ },
2368
+
2369
+ /**
2370
+ * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
2371
+ * @param {HTMLElement} el
2372
+ * @param {String} [selector] default: `options.draggable`
2373
+ * @returns {HTMLElement|null}
2374
+ */
2375
+ closest: function closest$1(el, selector) {
2376
+ return closest(el, selector || this.options.draggable, this.el, false);
2377
+ },
2378
+
2379
+ /**
2380
+ * Set/get option
2381
+ * @param {string} name
2382
+ * @param {*} [value]
2383
+ * @returns {*}
2384
+ */
2385
+ option: function option(name, value) {
2386
+ var options = this.options;
2387
+
2388
+ if (value === void 0) {
2389
+ return options[name];
2390
+ } else {
2391
+ var modifiedValue = PluginManager.modifyOption(this, name, value);
2392
+
2393
+ if (typeof modifiedValue !== 'undefined') {
2394
+ options[name] = modifiedValue;
2395
+ } else {
2396
+ options[name] = value;
2397
+ }
2398
+
2399
+ if (name === 'group') {
2400
+ _prepareGroup(options);
2401
+ }
2402
+ }
2403
+ },
2404
+
2405
+ /**
2406
+ * Destroy
2407
+ */
2408
+ destroy: function destroy() {
2409
+ pluginEvent('destroy', this);
2410
+ var el = this.el;
2411
+ el[expando] = null;
2412
+ off(el, 'mousedown', this._onTapStart);
2413
+ off(el, 'touchstart', this._onTapStart);
2414
+ off(el, 'pointerdown', this._onTapStart);
2415
+
2416
+ if (this.nativeDraggable) {
2417
+ off(el, 'dragover', this);
2418
+ off(el, 'dragenter', this);
2419
+ } // Remove draggable attributes
2420
+
2421
+
2422
+ Array.prototype.forEach.call(el.querySelectorAll('[draggable]'), function (el) {
2423
+ el.removeAttribute('draggable');
2424
+ });
2425
+
2426
+ this._onDrop();
2427
+
2428
+ this._disableDelayedDragEvents();
2429
+
2430
+ sortables.splice(sortables.indexOf(this.el), 1);
2431
+ this.el = el = null;
2432
+ },
2433
+ _hideClone: function _hideClone() {
2434
+ if (!cloneHidden) {
2435
+ pluginEvent('hideClone', this);
2436
+ if (Sortable.eventCanceled) return;
2437
+ css(cloneEl, 'display', 'none');
2438
+
2439
+ if (this.options.removeCloneOnHide && cloneEl.parentNode) {
2440
+ cloneEl.parentNode.removeChild(cloneEl);
2441
+ }
2442
+
2443
+ cloneHidden = true;
2444
+ }
2445
+ },
2446
+ _showClone: function _showClone(putSortable) {
2447
+ if (putSortable.lastPutMode !== 'clone') {
2448
+ this._hideClone();
2449
+
2450
+ return;
2451
+ }
2452
+
2453
+ if (cloneHidden) {
2454
+ pluginEvent('showClone', this);
2455
+ if (Sortable.eventCanceled) return; // show clone at dragEl or original position
2456
+
2457
+ if (dragEl.parentNode == rootEl && !this.options.group.revertClone) {
2458
+ rootEl.insertBefore(cloneEl, dragEl);
2459
+ } else if (nextEl) {
2460
+ rootEl.insertBefore(cloneEl, nextEl);
2461
+ } else {
2462
+ rootEl.appendChild(cloneEl);
2463
+ }
2464
+
2465
+ if (this.options.group.revertClone) {
2466
+ this.animate(dragEl, cloneEl);
2467
+ }
2468
+
2469
+ css(cloneEl, 'display', '');
2470
+ cloneHidden = false;
2471
+ }
2472
+ }
2473
+ };
2474
+
2475
+ function _globalDragOver(
2476
+ /**Event*/
2477
+ evt) {
2478
+ if (evt.dataTransfer) {
2479
+ evt.dataTransfer.dropEffect = 'move';
2480
+ }
2481
+
2482
+ evt.cancelable && evt.preventDefault();
2483
+ }
2484
+
2485
+ function _onMove(fromEl, toEl, dragEl, dragRect, targetEl, targetRect, originalEvent, willInsertAfter) {
2486
+ var evt,
2487
+ sortable = fromEl[expando],
2488
+ onMoveFn = sortable.options.onMove,
2489
+ retVal; // Support for new CustomEvent feature
2490
+
2491
+ if (window.CustomEvent && !IE11OrLess && !Edge) {
2492
+ evt = new CustomEvent('move', {
2493
+ bubbles: true,
2494
+ cancelable: true
2495
+ });
2496
+ } else {
2497
+ evt = document.createEvent('Event');
2498
+ evt.initEvent('move', true, true);
2499
+ }
2500
+
2501
+ evt.to = toEl;
2502
+ evt.from = fromEl;
2503
+ evt.dragged = dragEl;
2504
+ evt.draggedRect = dragRect;
2505
+ evt.related = targetEl || toEl;
2506
+ evt.relatedRect = targetRect || getRect(toEl);
2507
+ evt.willInsertAfter = willInsertAfter;
2508
+ evt.originalEvent = originalEvent;
2509
+ fromEl.dispatchEvent(evt);
2510
+
2511
+ if (onMoveFn) {
2512
+ retVal = onMoveFn.call(sortable, evt, originalEvent);
2513
+ }
2514
+
2515
+ return retVal;
2516
+ }
2517
+
2518
+ function _disableDraggable(el) {
2519
+ el.draggable = false;
2520
+ }
2521
+
2522
+ function _unsilent() {
2523
+ _silent = false;
2524
+ }
2525
+
2526
+ function _ghostIsFirst(evt, vertical, sortable) {
2527
+ var rect = getRect(getChild(sortable.el, 0, sortable.options, true));
2528
+ var spacer = 10;
2529
+ return vertical ? evt.clientX < rect.left - spacer || evt.clientY < rect.top && evt.clientX < rect.right : evt.clientY < rect.top - spacer || evt.clientY < rect.bottom && evt.clientX < rect.left;
2530
+ }
2531
+
2532
+ function _ghostIsLast(evt, vertical, sortable) {
2533
+ var rect = getRect(lastChild(sortable.el, sortable.options.draggable));
2534
+ var spacer = 10;
2535
+ return vertical ? evt.clientX > rect.right + spacer || evt.clientX <= rect.right && evt.clientY > rect.bottom && evt.clientX >= rect.left : evt.clientX > rect.right && evt.clientY > rect.top || evt.clientX <= rect.right && evt.clientY > rect.bottom + spacer;
2536
+ }
2537
+
2538
+ function _getSwapDirection(evt, target, targetRect, vertical, swapThreshold, invertedSwapThreshold, invertSwap, isLastTarget) {
2539
+ var mouseOnAxis = vertical ? evt.clientY : evt.clientX,
2540
+ targetLength = vertical ? targetRect.height : targetRect.width,
2541
+ targetS1 = vertical ? targetRect.top : targetRect.left,
2542
+ targetS2 = vertical ? targetRect.bottom : targetRect.right,
2543
+ invert = false;
2544
+
2545
+ if (!invertSwap) {
2546
+ // Never invert or create dragEl shadow when target movemenet causes mouse to move past the end of regular swapThreshold
2547
+ if (isLastTarget && targetMoveDistance < targetLength * swapThreshold) {
2548
+ // multiplied only by swapThreshold because mouse will already be inside target by (1 - threshold) * targetLength / 2
2549
+ // check if past first invert threshold on side opposite of lastDirection
2550
+ if (!pastFirstInvertThresh && (lastDirection === 1 ? mouseOnAxis > targetS1 + targetLength * invertedSwapThreshold / 2 : mouseOnAxis < targetS2 - targetLength * invertedSwapThreshold / 2)) {
2551
+ // past first invert threshold, do not restrict inverted threshold to dragEl shadow
2552
+ pastFirstInvertThresh = true;
2553
+ }
2554
+
2555
+ if (!pastFirstInvertThresh) {
2556
+ // dragEl shadow (target move distance shadow)
2557
+ if (lastDirection === 1 ? mouseOnAxis < targetS1 + targetMoveDistance // over dragEl shadow
2558
+ : mouseOnAxis > targetS2 - targetMoveDistance) {
2559
+ return -lastDirection;
2560
+ }
2561
+ } else {
2562
+ invert = true;
2563
+ }
2564
+ } else {
2565
+ // Regular
2566
+ if (mouseOnAxis > targetS1 + targetLength * (1 - swapThreshold) / 2 && mouseOnAxis < targetS2 - targetLength * (1 - swapThreshold) / 2) {
2567
+ return _getInsertDirection(target);
2568
+ }
2569
+ }
2570
+ }
2571
+
2572
+ invert = invert || invertSwap;
2573
+
2574
+ if (invert) {
2575
+ // Invert of regular
2576
+ if (mouseOnAxis < targetS1 + targetLength * invertedSwapThreshold / 2 || mouseOnAxis > targetS2 - targetLength * invertedSwapThreshold / 2) {
2577
+ return mouseOnAxis > targetS1 + targetLength / 2 ? 1 : -1;
2578
+ }
2579
+ }
2580
+
2581
+ return 0;
2582
+ }
2583
+ /**
2584
+ * Gets the direction dragEl must be swapped relative to target in order to make it
2585
+ * seem that dragEl has been "inserted" into that element's position
2586
+ * @param {HTMLElement} target The target whose position dragEl is being inserted at
2587
+ * @return {Number} Direction dragEl must be swapped
2588
+ */
2589
+
2590
+
2591
+ function _getInsertDirection(target) {
2592
+ if (index(dragEl) < index(target)) {
2593
+ return 1;
2594
+ } else {
2595
+ return -1;
2596
+ }
2597
+ }
2598
+ /**
2599
+ * Generate id
2600
+ * @param {HTMLElement} el
2601
+ * @returns {String}
2602
+ * @private
2603
+ */
2604
+
2605
+
2606
+ function _generateId(el) {
2607
+ var str = el.tagName + el.className + el.src + el.href + el.textContent,
2608
+ i = str.length,
2609
+ sum = 0;
2610
+
2611
+ while (i--) {
2612
+ sum += str.charCodeAt(i);
2613
+ }
2614
+
2615
+ return sum.toString(36);
2616
+ }
2617
+
2618
+ function _saveInputCheckedState(root) {
2619
+ savedInputChecked.length = 0;
2620
+ var inputs = root.getElementsByTagName('input');
2621
+ var idx = inputs.length;
2622
+
2623
+ while (idx--) {
2624
+ var el = inputs[idx];
2625
+ el.checked && savedInputChecked.push(el);
2626
+ }
2627
+ }
2628
+
2629
+ function _nextTick(fn) {
2630
+ return setTimeout(fn, 0);
2631
+ }
2632
+
2633
+ function _cancelNextTick(id) {
2634
+ return clearTimeout(id);
2635
+ } // Fixed #973:
2636
+
2637
+
2638
+ if (documentExists) {
2639
+ on(document, 'touchmove', function (evt) {
2640
+ if ((Sortable.active || awaitingDragStarted) && evt.cancelable) {
2641
+ evt.preventDefault();
2642
+ }
2643
+ });
2644
+ } // Export utils
2645
+
2646
+
2647
+ Sortable.utils = {
2648
+ on: on,
2649
+ off: off,
2650
+ css: css,
2651
+ find: find,
2652
+ is: function is(el, selector) {
2653
+ return !!closest(el, selector, el, false);
2654
+ },
2655
+ extend: extend,
2656
+ throttle: throttle,
2657
+ closest: closest,
2658
+ toggleClass: toggleClass,
2659
+ clone: clone,
2660
+ index: index,
2661
+ nextTick: _nextTick,
2662
+ cancelNextTick: _cancelNextTick,
2663
+ detectDirection: _detectDirection,
2664
+ getChild: getChild
2665
+ };
2666
+ /**
2667
+ * Get the Sortable instance of an element
2668
+ * @param {HTMLElement} element The element
2669
+ * @return {Sortable|undefined} The instance of Sortable
2670
+ */
2671
+
2672
+ Sortable.get = function (element) {
2673
+ return element[expando];
2674
+ };
2675
+ /**
2676
+ * Mount a plugin to Sortable
2677
+ * @param {...SortablePlugin|SortablePlugin[]} plugins Plugins being mounted
2678
+ */
2679
+
2680
+
2681
+ Sortable.mount = function () {
2682
+ for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) {
2683
+ plugins[_key] = arguments[_key];
2684
+ }
2685
+
2686
+ if (plugins[0].constructor === Array) plugins = plugins[0];
2687
+ plugins.forEach(function (plugin) {
2688
+ if (!plugin.prototype || !plugin.prototype.constructor) {
2689
+ throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(plugin));
2690
+ }
2691
+
2692
+ if (plugin.utils) Sortable.utils = _objectSpread2(_objectSpread2({}, Sortable.utils), plugin.utils);
2693
+ PluginManager.mount(plugin);
2694
+ });
2695
+ };
2696
+ /**
2697
+ * Create sortable instance
2698
+ * @param {HTMLElement} el
2699
+ * @param {Object} [options]
2700
+ */
2701
+
2702
+
2703
+ Sortable.create = function (el, options) {
2704
+ return new Sortable(el, options);
2705
+ }; // Export
2706
+
2707
+
2708
+ Sortable.version = version;
2709
+
2710
+ var autoScrolls = [],
2711
+ scrollEl,
2712
+ scrollRootEl,
2713
+ scrolling = false,
2714
+ lastAutoScrollX,
2715
+ lastAutoScrollY,
2716
+ touchEvt$1,
2717
+ pointerElemChangedInterval;
2718
+
2719
+ function AutoScrollPlugin() {
2720
+ function AutoScroll() {
2721
+ this.defaults = {
2722
+ scroll: true,
2723
+ forceAutoScrollFallback: false,
2724
+ scrollSensitivity: 30,
2725
+ scrollSpeed: 10,
2726
+ bubbleScroll: true
2727
+ }; // Bind all private methods
2728
+
2729
+ for (var fn in this) {
2730
+ if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
2731
+ this[fn] = this[fn].bind(this);
2732
+ }
2733
+ }
2734
+ }
2735
+
2736
+ AutoScroll.prototype = {
2737
+ dragStarted: function dragStarted(_ref) {
2738
+ var originalEvent = _ref.originalEvent;
2739
+
2740
+ if (this.sortable.nativeDraggable) {
2741
+ on(document, 'dragover', this._handleAutoScroll);
2742
+ } else {
2743
+ if (this.options.supportPointer) {
2744
+ on(document, 'pointermove', this._handleFallbackAutoScroll);
2745
+ } else if (originalEvent.touches) {
2746
+ on(document, 'touchmove', this._handleFallbackAutoScroll);
2747
+ } else {
2748
+ on(document, 'mousemove', this._handleFallbackAutoScroll);
2749
+ }
2750
+ }
2751
+ },
2752
+ dragOverCompleted: function dragOverCompleted(_ref2) {
2753
+ var originalEvent = _ref2.originalEvent;
2754
+
2755
+ // For when bubbling is canceled and using fallback (fallback 'touchmove' always reached)
2756
+ if (!this.options.dragOverBubble && !originalEvent.rootEl) {
2757
+ this._handleAutoScroll(originalEvent);
2758
+ }
2759
+ },
2760
+ drop: function drop() {
2761
+ if (this.sortable.nativeDraggable) {
2762
+ off(document, 'dragover', this._handleAutoScroll);
2763
+ } else {
2764
+ off(document, 'pointermove', this._handleFallbackAutoScroll);
2765
+ off(document, 'touchmove', this._handleFallbackAutoScroll);
2766
+ off(document, 'mousemove', this._handleFallbackAutoScroll);
2767
+ }
2768
+
2769
+ clearPointerElemChangedInterval();
2770
+ clearAutoScrolls();
2771
+ cancelThrottle();
2772
+ },
2773
+ nulling: function nulling() {
2774
+ touchEvt$1 = scrollRootEl = scrollEl = scrolling = pointerElemChangedInterval = lastAutoScrollX = lastAutoScrollY = null;
2775
+ autoScrolls.length = 0;
2776
+ },
2777
+ _handleFallbackAutoScroll: function _handleFallbackAutoScroll(evt) {
2778
+ this._handleAutoScroll(evt, true);
2779
+ },
2780
+ _handleAutoScroll: function _handleAutoScroll(evt, fallback) {
2781
+ var _this = this;
2782
+
2783
+ var x = (evt.touches ? evt.touches[0] : evt).clientX,
2784
+ y = (evt.touches ? evt.touches[0] : evt).clientY,
2785
+ elem = document.elementFromPoint(x, y);
2786
+ touchEvt$1 = evt; // IE does not seem to have native autoscroll,
2787
+ // Edge's autoscroll seems too conditional,
2788
+ // MACOS Safari does not have autoscroll,
2789
+ // Firefox and Chrome are good
2790
+
2791
+ if (fallback || this.options.forceAutoScrollFallback || Edge || IE11OrLess || Safari) {
2792
+ autoScroll(evt, this.options, elem, fallback); // Listener for pointer element change
2793
+
2794
+ var ogElemScroller = getParentAutoScrollElement(elem, true);
2795
+
2796
+ if (scrolling && (!pointerElemChangedInterval || x !== lastAutoScrollX || y !== lastAutoScrollY)) {
2797
+ pointerElemChangedInterval && clearPointerElemChangedInterval(); // Detect for pointer elem change, emulating native DnD behaviour
2798
+
2799
+ pointerElemChangedInterval = setInterval(function () {
2800
+ var newElem = getParentAutoScrollElement(document.elementFromPoint(x, y), true);
2801
+
2802
+ if (newElem !== ogElemScroller) {
2803
+ ogElemScroller = newElem;
2804
+ clearAutoScrolls();
2805
+ }
2806
+
2807
+ autoScroll(evt, _this.options, newElem, fallback);
2808
+ }, 10);
2809
+ lastAutoScrollX = x;
2810
+ lastAutoScrollY = y;
2811
+ }
2812
+ } else {
2813
+ // if DnD is enabled (and browser has good autoscrolling), first autoscroll will already scroll, so get parent autoscroll of first autoscroll
2814
+ if (!this.options.bubbleScroll || getParentAutoScrollElement(elem, true) === getWindowScrollingElement()) {
2815
+ clearAutoScrolls();
2816
+ return;
2817
+ }
2818
+
2819
+ autoScroll(evt, this.options, getParentAutoScrollElement(elem, false), false);
2820
+ }
2821
+ }
2822
+ };
2823
+ return _extends(AutoScroll, {
2824
+ pluginName: 'scroll',
2825
+ initializeByDefault: true
2826
+ });
2827
+ }
2828
+
2829
+ function clearAutoScrolls() {
2830
+ autoScrolls.forEach(function (autoScroll) {
2831
+ clearInterval(autoScroll.pid);
2832
+ });
2833
+ autoScrolls = [];
2834
+ }
2835
+
2836
+ function clearPointerElemChangedInterval() {
2837
+ clearInterval(pointerElemChangedInterval);
2838
+ }
2839
+
2840
+ var autoScroll = throttle(function (evt, options, rootEl, isFallback) {
2841
+ // Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=505521
2842
+ if (!options.scroll) return;
2843
+ var x = (evt.touches ? evt.touches[0] : evt).clientX,
2844
+ y = (evt.touches ? evt.touches[0] : evt).clientY,
2845
+ sens = options.scrollSensitivity,
2846
+ speed = options.scrollSpeed,
2847
+ winScroller = getWindowScrollingElement();
2848
+ var scrollThisInstance = false,
2849
+ scrollCustomFn; // New scroll root, set scrollEl
2850
+
2851
+ if (scrollRootEl !== rootEl) {
2852
+ scrollRootEl = rootEl;
2853
+ clearAutoScrolls();
2854
+ scrollEl = options.scroll;
2855
+ scrollCustomFn = options.scrollFn;
2856
+
2857
+ if (scrollEl === true) {
2858
+ scrollEl = getParentAutoScrollElement(rootEl, true);
2859
+ }
2860
+ }
2861
+
2862
+ var layersOut = 0;
2863
+ var currentParent = scrollEl;
2864
+
2865
+ do {
2866
+ var el = currentParent,
2867
+ rect = getRect(el),
2868
+ top = rect.top,
2869
+ bottom = rect.bottom,
2870
+ left = rect.left,
2871
+ right = rect.right,
2872
+ width = rect.width,
2873
+ height = rect.height,
2874
+ canScrollX = void 0,
2875
+ canScrollY = void 0,
2876
+ scrollWidth = el.scrollWidth,
2877
+ scrollHeight = el.scrollHeight,
2878
+ elCSS = css(el),
2879
+ scrollPosX = el.scrollLeft,
2880
+ scrollPosY = el.scrollTop;
2881
+
2882
+ if (el === winScroller) {
2883
+ canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll' || elCSS.overflowX === 'visible');
2884
+ canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll' || elCSS.overflowY === 'visible');
2885
+ } else {
2886
+ canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll');
2887
+ canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll');
2888
+ }
2889
+
2890
+ var vx = canScrollX && (Math.abs(right - x) <= sens && scrollPosX + width < scrollWidth) - (Math.abs(left - x) <= sens && !!scrollPosX);
2891
+ var vy = canScrollY && (Math.abs(bottom - y) <= sens && scrollPosY + height < scrollHeight) - (Math.abs(top - y) <= sens && !!scrollPosY);
2892
+
2893
+ if (!autoScrolls[layersOut]) {
2894
+ for (var i = 0; i <= layersOut; i++) {
2895
+ if (!autoScrolls[i]) {
2896
+ autoScrolls[i] = {};
2897
+ }
2898
+ }
2899
+ }
2900
+
2901
+ if (autoScrolls[layersOut].vx != vx || autoScrolls[layersOut].vy != vy || autoScrolls[layersOut].el !== el) {
2902
+ autoScrolls[layersOut].el = el;
2903
+ autoScrolls[layersOut].vx = vx;
2904
+ autoScrolls[layersOut].vy = vy;
2905
+ clearInterval(autoScrolls[layersOut].pid);
2906
+
2907
+ if (vx != 0 || vy != 0) {
2908
+ scrollThisInstance = true;
2909
+ /* jshint loopfunc:true */
2910
+
2911
+ autoScrolls[layersOut].pid = setInterval(function () {
2912
+ // emulate drag over during autoscroll (fallback), emulating native DnD behaviour
2913
+ if (isFallback && this.layer === 0) {
2914
+ Sortable.active._onTouchMove(touchEvt$1); // To move ghost if it is positioned absolutely
2915
+
2916
+ }
2917
+
2918
+ var scrollOffsetY = autoScrolls[this.layer].vy ? autoScrolls[this.layer].vy * speed : 0;
2919
+ var scrollOffsetX = autoScrolls[this.layer].vx ? autoScrolls[this.layer].vx * speed : 0;
2920
+
2921
+ if (typeof scrollCustomFn === 'function') {
2922
+ if (scrollCustomFn.call(Sortable.dragged.parentNode[expando], scrollOffsetX, scrollOffsetY, evt, touchEvt$1, autoScrolls[this.layer].el) !== 'continue') {
2923
+ return;
2924
+ }
2925
+ }
2926
+
2927
+ scrollBy(autoScrolls[this.layer].el, scrollOffsetX, scrollOffsetY);
2928
+ }.bind({
2929
+ layer: layersOut
2930
+ }), 24);
2931
+ }
2932
+ }
2933
+
2934
+ layersOut++;
2935
+ } while (options.bubbleScroll && currentParent !== winScroller && (currentParent = getParentAutoScrollElement(currentParent, false)));
2936
+
2937
+ scrolling = scrollThisInstance; // in case another function catches scrolling as false in between when it is not
2938
+ }, 30);
2939
+
2940
+ var drop = function drop(_ref) {
2941
+ var originalEvent = _ref.originalEvent,
2942
+ putSortable = _ref.putSortable,
2943
+ dragEl = _ref.dragEl,
2944
+ activeSortable = _ref.activeSortable,
2945
+ dispatchSortableEvent = _ref.dispatchSortableEvent,
2946
+ hideGhostForTarget = _ref.hideGhostForTarget,
2947
+ unhideGhostForTarget = _ref.unhideGhostForTarget;
2948
+ if (!originalEvent) return;
2949
+ var toSortable = putSortable || activeSortable;
2950
+ hideGhostForTarget();
2951
+ var touch = originalEvent.changedTouches && originalEvent.changedTouches.length ? originalEvent.changedTouches[0] : originalEvent;
2952
+ var target = document.elementFromPoint(touch.clientX, touch.clientY);
2953
+ unhideGhostForTarget();
2954
+
2955
+ if (toSortable && !toSortable.el.contains(target)) {
2956
+ dispatchSortableEvent('spill');
2957
+ this.onSpill({
2958
+ dragEl: dragEl,
2959
+ putSortable: putSortable
2960
+ });
2961
+ }
2962
+ };
2963
+
2964
+ function Revert() {}
2965
+
2966
+ Revert.prototype = {
2967
+ startIndex: null,
2968
+ dragStart: function dragStart(_ref2) {
2969
+ var oldDraggableIndex = _ref2.oldDraggableIndex;
2970
+ this.startIndex = oldDraggableIndex;
2971
+ },
2972
+ onSpill: function onSpill(_ref3) {
2973
+ var dragEl = _ref3.dragEl,
2974
+ putSortable = _ref3.putSortable;
2975
+ this.sortable.captureAnimationState();
2976
+
2977
+ if (putSortable) {
2978
+ putSortable.captureAnimationState();
2979
+ }
2980
+
2981
+ var nextSibling = getChild(this.sortable.el, this.startIndex, this.options);
2982
+
2983
+ if (nextSibling) {
2984
+ this.sortable.el.insertBefore(dragEl, nextSibling);
2985
+ } else {
2986
+ this.sortable.el.appendChild(dragEl);
2987
+ }
2988
+
2989
+ this.sortable.animateAll();
2990
+
2991
+ if (putSortable) {
2992
+ putSortable.animateAll();
2993
+ }
2994
+ },
2995
+ drop: drop
2996
+ };
2997
+
2998
+ _extends(Revert, {
2999
+ pluginName: 'revertOnSpill'
3000
+ });
3001
+
3002
+ function Remove() {}
3003
+
3004
+ Remove.prototype = {
3005
+ onSpill: function onSpill(_ref4) {
3006
+ var dragEl = _ref4.dragEl,
3007
+ putSortable = _ref4.putSortable;
3008
+ var parentSortable = putSortable || this.sortable;
3009
+ parentSortable.captureAnimationState();
3010
+ dragEl.parentNode && dragEl.parentNode.removeChild(dragEl);
3011
+ parentSortable.animateAll();
3012
+ },
3013
+ drop: drop
3014
+ };
3015
+
3016
+ _extends(Remove, {
3017
+ pluginName: 'removeOnSpill'
3018
+ });
3019
+
3020
+ Sortable.mount(new AutoScrollPlugin());
3021
+ Sortable.mount(Remove, Revert);
3022
+
3023
+ exports.Sortable = Sortable;