@esri/calcite-components 1.0.0-next.290 → 1.0.0-next.294

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