@limetech/lime-elements 38.31.1 → 38.32.0

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 (225) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +1 -1
  3. package/dist/cjs/lime-elements.cjs.js +1 -1
  4. package/dist/cjs/limel-action-bar_2.cjs.entry.js +1 -1
  5. package/dist/cjs/limel-ai-avatar.cjs.entry.js +1 -1
  6. package/dist/cjs/limel-callout.cjs.entry.js +1 -1
  7. package/dist/cjs/limel-chart.cjs.entry.js +1 -1
  8. package/dist/cjs/limel-checkbox.cjs.entry.js.map +1 -1
  9. package/dist/cjs/limel-chip_2.cjs.entry.js +1 -1
  10. package/dist/cjs/limel-collapsible-section.cjs.entry.js +1 -1
  11. package/dist/cjs/limel-color-picker.cjs.entry.js.map +1 -1
  12. package/dist/cjs/limel-drag-handle.cjs.entry.js +34 -0
  13. package/dist/cjs/limel-drag-handle.cjs.entry.js.map +1 -0
  14. package/dist/cjs/limel-file-viewer.cjs.entry.js +1 -1
  15. package/dist/cjs/limel-file.cjs.entry.js +1 -1
  16. package/dist/cjs/limel-flatpickr-adapter.cjs.entry.js +1 -1
  17. package/dist/cjs/limel-form.cjs.entry.js +3227 -307
  18. package/dist/cjs/limel-form.cjs.entry.js.map +1 -1
  19. package/dist/cjs/limel-info-tile.cjs.entry.js +1 -1
  20. package/dist/cjs/limel-info-tile.cjs.entry.js.map +1 -1
  21. package/dist/cjs/limel-linear-progress.cjs.entry.js +1 -1
  22. package/dist/cjs/limel-list-item.cjs.entry.js +1 -1
  23. package/dist/cjs/limel-portal_3.cjs.entry.js.map +1 -1
  24. package/dist/cjs/limel-profile-picture.cjs.entry.js +1 -1
  25. package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +1 -1
  26. package/dist/cjs/limel-snackbar.cjs.entry.js +1 -1
  27. package/dist/cjs/limel-snackbar.cjs.entry.js.map +1 -1
  28. package/dist/cjs/limel-switch.cjs.entry.js.map +1 -1
  29. package/dist/cjs/limel-table.cjs.entry.js +1 -1
  30. package/dist/cjs/loader.cjs.js +1 -1
  31. package/dist/cjs/{translations-d2be6dd7.js → translations-a42886f2.js} +17 -1
  32. package/dist/cjs/translations-a42886f2.js.map +1 -0
  33. package/dist/collection/collection-manifest.json +1 -0
  34. package/dist/collection/components/action-bar/action-bar-item/action-bar-item.css +3 -0
  35. package/dist/collection/components/action-bar/action-bar.css +3 -0
  36. package/dist/collection/components/badge/badge.css +3 -0
  37. package/dist/collection/components/breadcrumbs/breadcrumbs.css +3 -0
  38. package/dist/collection/components/button/button.css +3 -0
  39. package/dist/collection/components/button-group/button-group.css +3 -0
  40. package/dist/collection/components/card/card.css +3 -0
  41. package/dist/collection/components/chart/chart.css +6 -0
  42. package/dist/collection/components/checkbox/checkbox.css +3 -0
  43. package/dist/collection/components/checkbox/checkbox.js +1 -1
  44. package/dist/collection/components/checkbox/checkbox.js.map +1 -1
  45. package/dist/collection/components/chip/chip.css +3 -0
  46. package/dist/collection/components/chip-set/chip-set.css +6 -0
  47. package/dist/collection/components/circular-progress/circular-progress.css +3 -0
  48. package/dist/collection/components/code-editor/code-editor.css +3 -0
  49. package/dist/collection/components/collapsible-section/collapsible-section.css +3 -0
  50. package/dist/collection/components/color-picker/color-picker-palette.css +3 -0
  51. package/dist/collection/components/color-picker/color-picker.css +3 -0
  52. package/dist/collection/components/color-picker/color-picker.js +1 -1
  53. package/dist/collection/components/color-picker/color-picker.js.map +1 -1
  54. package/dist/collection/components/date-picker/flatpickr-adapter/flatpickr-adapter.css +3 -0
  55. package/dist/collection/components/dialog/dialog.css +3 -0
  56. package/dist/collection/components/dock/dock-button/dock-button.css +3 -0
  57. package/dist/collection/components/dock/dock.css +3 -0
  58. package/dist/collection/components/drag-handle/drag-handle.css +174 -0
  59. package/dist/collection/components/drag-handle/drag-handle.js +125 -0
  60. package/dist/collection/components/drag-handle/drag-handle.js.map +1 -0
  61. package/dist/collection/components/file/file.css +3 -0
  62. package/dist/collection/components/file-viewer/file-viewer.css +3 -0
  63. package/dist/collection/components/form/form.css +147 -20
  64. package/dist/collection/components/form/row/row.js +4 -1
  65. package/dist/collection/components/form/row/row.js.map +1 -1
  66. package/dist/collection/components/form/templates/array-field-collapsible-item.js +13 -16
  67. package/dist/collection/components/form/templates/array-field-collapsible-item.js.map +1 -1
  68. package/dist/collection/components/form/templates/array-field-simple-item.js +16 -49
  69. package/dist/collection/components/form/templates/array-field-simple-item.js.map +1 -1
  70. package/dist/collection/components/form/templates/array-field.js +306 -19
  71. package/dist/collection/components/form/templates/array-field.js.map +1 -1
  72. package/dist/collection/components/form/templates/common.js +3 -1
  73. package/dist/collection/components/form/templates/common.js.map +1 -1
  74. package/dist/collection/components/header/header.css +3 -0
  75. package/dist/collection/components/help/help.css +3 -0
  76. package/dist/collection/components/help/limel-help-content.css +3 -0
  77. package/dist/collection/components/icon-button/icon-button.css +3 -0
  78. package/dist/collection/components/info-tile/info-tile.css +3 -0
  79. package/dist/collection/components/input-field/input-field.css +3 -0
  80. package/dist/collection/components/list/list.css +6 -0
  81. package/dist/collection/components/list-item/list-item.css +3 -0
  82. package/dist/collection/components/list-item/menu-item-meta/menu-item-meta.css +3 -0
  83. package/dist/collection/components/markdown/markdown.css +3 -0
  84. package/dist/collection/components/menu-list/menu-list.css +6 -0
  85. package/dist/collection/components/notched-outline/notched-outline.css +3 -0
  86. package/dist/collection/components/popover-surface/popover-surface.css +3 -0
  87. package/dist/collection/components/profile-picture/profile-picture.css +3 -0
  88. package/dist/collection/components/progress-flow/progress-flow-item/progress-flow-item.css +3 -0
  89. package/dist/collection/components/radio-button-group/radio-button.css +3 -0
  90. package/dist/collection/components/select/select.css +6 -0
  91. package/dist/collection/components/shortcut/shortcut.css +3 -0
  92. package/dist/collection/components/slider/slider.css +3 -0
  93. package/dist/collection/components/snackbar/snackbar.js +2 -2
  94. package/dist/collection/components/snackbar/snackbar.js.map +1 -1
  95. package/dist/collection/components/split-button/split-button.css +3 -0
  96. package/dist/collection/components/switch/switch.css +3 -0
  97. package/dist/collection/components/switch/switch.js +1 -1
  98. package/dist/collection/components/switch/switch.js.map +1 -1
  99. package/dist/collection/components/tab-bar/tab-bar.css +3 -0
  100. package/dist/collection/components/table/table.css +12 -0
  101. package/dist/collection/components/text-editor/prosemirror-adapter/prosemirror-adapter.css +3 -0
  102. package/dist/collection/components/text-editor/text-editor.css +3 -0
  103. package/dist/collection/components/tooltip/tooltip.js +2 -2
  104. package/dist/collection/components/tooltip/tooltip.js.map +1 -1
  105. package/dist/collection/style/mixins.scss +53 -0
  106. package/dist/collection/translations/da.js +2 -0
  107. package/dist/collection/translations/da.js.map +1 -1
  108. package/dist/collection/translations/de.js +2 -0
  109. package/dist/collection/translations/de.js.map +1 -1
  110. package/dist/collection/translations/en.js +2 -0
  111. package/dist/collection/translations/en.js.map +1 -1
  112. package/dist/collection/translations/fi.js +2 -0
  113. package/dist/collection/translations/fi.js.map +1 -1
  114. package/dist/collection/translations/fr.js +2 -0
  115. package/dist/collection/translations/fr.js.map +1 -1
  116. package/dist/collection/translations/nl.js +2 -0
  117. package/dist/collection/translations/nl.js.map +1 -1
  118. package/dist/collection/translations/no.js +2 -0
  119. package/dist/collection/translations/no.js.map +1 -1
  120. package/dist/collection/translations/sv.js +2 -0
  121. package/dist/collection/translations/sv.js.map +1 -1
  122. package/dist/esm/lime-elements.js +1 -1
  123. package/dist/esm/limel-action-bar_2.entry.js +1 -1
  124. package/dist/esm/limel-ai-avatar.entry.js +1 -1
  125. package/dist/esm/limel-callout.entry.js +1 -1
  126. package/dist/esm/limel-chart.entry.js +1 -1
  127. package/dist/esm/limel-checkbox.entry.js.map +1 -1
  128. package/dist/esm/limel-chip_2.entry.js +1 -1
  129. package/dist/esm/limel-collapsible-section.entry.js +1 -1
  130. package/dist/esm/limel-color-picker.entry.js.map +1 -1
  131. package/dist/esm/limel-drag-handle.entry.js +30 -0
  132. package/dist/esm/limel-drag-handle.entry.js.map +1 -0
  133. package/dist/esm/limel-file-viewer.entry.js +1 -1
  134. package/dist/esm/limel-file.entry.js +1 -1
  135. package/dist/esm/limel-flatpickr-adapter.entry.js +1 -1
  136. package/dist/esm/limel-form.entry.js +3221 -301
  137. package/dist/esm/limel-form.entry.js.map +1 -1
  138. package/dist/esm/limel-info-tile.entry.js +1 -1
  139. package/dist/esm/limel-info-tile.entry.js.map +1 -1
  140. package/dist/esm/limel-linear-progress.entry.js +1 -1
  141. package/dist/esm/limel-list-item.entry.js +1 -1
  142. package/dist/esm/limel-portal_3.entry.js.map +1 -1
  143. package/dist/esm/limel-profile-picture.entry.js +1 -1
  144. package/dist/esm/limel-prosemirror-adapter.entry.js +1 -1
  145. package/dist/esm/limel-snackbar.entry.js +1 -1
  146. package/dist/esm/limel-snackbar.entry.js.map +1 -1
  147. package/dist/esm/limel-switch.entry.js.map +1 -1
  148. package/dist/esm/limel-table.entry.js +1 -1
  149. package/dist/esm/loader.js +1 -1
  150. package/dist/esm/{translations-91c611da.js → translations-9bfde9f4.js} +17 -1
  151. package/dist/esm/translations-9bfde9f4.js.map +1 -0
  152. package/dist/lime-elements/lime-elements.esm.js +1 -1
  153. package/dist/lime-elements/lime-elements.esm.js.map +1 -1
  154. package/dist/lime-elements/p-309d0652.entry.js +2 -0
  155. package/dist/lime-elements/{p-e6245ef7.entry.js.map → p-309d0652.entry.js.map} +1 -1
  156. package/dist/lime-elements/{p-f507000e.entry.js → p-31f1cb08.entry.js} +2 -2
  157. package/dist/lime-elements/{p-cc7f4c81.entry.js → p-3311eaf3.entry.js} +2 -2
  158. package/dist/lime-elements/{p-aeba4aa4.entry.js → p-40542ccc.entry.js} +2 -2
  159. package/dist/lime-elements/p-40542ccc.entry.js.map +1 -0
  160. package/dist/lime-elements/{p-d349e355.entry.js → p-42e889d8.entry.js} +2 -2
  161. package/dist/lime-elements/p-489d7f63.entry.js.map +1 -1
  162. package/dist/lime-elements/p-51d475d8.entry.js.map +1 -1
  163. package/dist/lime-elements/p-5df2361b.js +2 -0
  164. package/dist/lime-elements/p-5df2361b.js.map +1 -0
  165. package/dist/lime-elements/{p-b5abf284.entry.js → p-5e976a59.entry.js} +2 -2
  166. package/dist/lime-elements/{p-6c60172e.entry.js → p-787be044.entry.js} +2 -2
  167. package/dist/lime-elements/p-8539647d.entry.js.map +1 -1
  168. package/dist/lime-elements/p-8ea3b80a.entry.js +2 -0
  169. package/dist/lime-elements/p-8ea3b80a.entry.js.map +1 -0
  170. package/dist/lime-elements/{p-d1aa44e1.entry.js → p-92aa9610.entry.js} +2 -2
  171. package/dist/lime-elements/p-a1a32893.entry.js +27 -0
  172. package/dist/lime-elements/p-a1a32893.entry.js.map +1 -0
  173. package/dist/lime-elements/{p-8e3c4418.entry.js → p-aa1e7319.entry.js} +2 -2
  174. package/dist/lime-elements/{p-ed04acfc.entry.js → p-b0acf522.entry.js} +2 -2
  175. package/dist/lime-elements/p-b5a96409.entry.js.map +1 -1
  176. package/dist/lime-elements/{p-f83ebd28.entry.js → p-b7bbb6a5.entry.js} +2 -2
  177. package/dist/lime-elements/{p-eb396630.entry.js → p-cd2f780a.entry.js} +2 -2
  178. package/dist/lime-elements/{p-aae161ef.entry.js → p-d79c85e2.entry.js} +2 -2
  179. package/dist/lime-elements/{p-1b036add.entry.js → p-e00465fa.entry.js} +2 -2
  180. package/dist/lime-elements/{p-29c2cdc6.entry.js → p-ee5c4112.entry.js} +2 -2
  181. package/dist/lime-elements/{p-e6bb4d1a.entry.js → p-fbac230b.entry.js} +2 -2
  182. package/dist/lime-elements/style/mixins.scss +53 -0
  183. package/dist/scss/mixins.scss +53 -0
  184. package/dist/types/components/checkbox/checkbox.d.ts +1 -1
  185. package/dist/types/components/color-picker/color-picker.d.ts +1 -1
  186. package/dist/types/components/drag-handle/drag-handle.d.ts +46 -0
  187. package/dist/types/components/form/templates/array-field-collapsible-item.d.ts +3 -1
  188. package/dist/types/components/form/templates/array-field-simple-item.d.ts +5 -9
  189. package/dist/types/components/form/templates/array-field.d.ts +35 -4
  190. package/dist/types/components/form/templates/common.d.ts +3 -3
  191. package/dist/types/components/snackbar/snackbar.d.ts +2 -2
  192. package/dist/types/components/switch/switch.d.ts +1 -1
  193. package/dist/types/components/tooltip/tooltip.d.ts +2 -2
  194. package/dist/types/components.d.ts +141 -28
  195. package/dist/types/translations/da.d.ts +2 -0
  196. package/dist/types/translations/de.d.ts +2 -0
  197. package/dist/types/translations/en.d.ts +2 -0
  198. package/dist/types/translations/fi.d.ts +2 -0
  199. package/dist/types/translations/fr.d.ts +2 -0
  200. package/dist/types/translations/nl.d.ts +2 -0
  201. package/dist/types/translations/no.d.ts +2 -0
  202. package/dist/types/translations/sv.d.ts +2 -0
  203. package/package.json +5 -2
  204. package/dist/cjs/translations-d2be6dd7.js.map +0 -1
  205. package/dist/esm/translations-91c611da.js.map +0 -1
  206. package/dist/lime-elements/p-4c88e5d3.js +0 -2
  207. package/dist/lime-elements/p-4c88e5d3.js.map +0 -1
  208. package/dist/lime-elements/p-aeba4aa4.entry.js.map +0 -1
  209. package/dist/lime-elements/p-d6d66daa.entry.js +0 -21
  210. package/dist/lime-elements/p-d6d66daa.entry.js.map +0 -1
  211. package/dist/lime-elements/p-e6245ef7.entry.js +0 -2
  212. /package/dist/lime-elements/{p-f507000e.entry.js.map → p-31f1cb08.entry.js.map} +0 -0
  213. /package/dist/lime-elements/{p-cc7f4c81.entry.js.map → p-3311eaf3.entry.js.map} +0 -0
  214. /package/dist/lime-elements/{p-d349e355.entry.js.map → p-42e889d8.entry.js.map} +0 -0
  215. /package/dist/lime-elements/{p-b5abf284.entry.js.map → p-5e976a59.entry.js.map} +0 -0
  216. /package/dist/lime-elements/{p-6c60172e.entry.js.map → p-787be044.entry.js.map} +0 -0
  217. /package/dist/lime-elements/{p-d1aa44e1.entry.js.map → p-92aa9610.entry.js.map} +0 -0
  218. /package/dist/lime-elements/{p-8e3c4418.entry.js.map → p-aa1e7319.entry.js.map} +0 -0
  219. /package/dist/lime-elements/{p-ed04acfc.entry.js.map → p-b0acf522.entry.js.map} +0 -0
  220. /package/dist/lime-elements/{p-f83ebd28.entry.js.map → p-b7bbb6a5.entry.js.map} +0 -0
  221. /package/dist/lime-elements/{p-eb396630.entry.js.map → p-cd2f780a.entry.js.map} +0 -0
  222. /package/dist/lime-elements/{p-aae161ef.entry.js.map → p-d79c85e2.entry.js.map} +0 -0
  223. /package/dist/lime-elements/{p-1b036add.entry.js.map → p-e00465fa.entry.js.map} +0 -0
  224. /package/dist/lime-elements/{p-29c2cdc6.entry.js.map → p-ee5c4112.entry.js.map} +0 -0
  225. /package/dist/lime-elements/{p-e6bb4d1a.entry.js.map → p-fbac230b.entry.js.map} +0 -0
@@ -972,7 +972,7 @@ var useSyncExternalStore = function (
972
972
  var useTransition = function () {
973
973
  return ReactSharedInternals$2.H.useTransition();
974
974
  };
975
- var version$3 = "19.1.1";
975
+ var version$4 = "19.1.1";
976
976
 
977
977
  var react_production = {
978
978
  Children: Children,
@@ -1013,7 +1013,7 @@ var react_production = {
1013
1013
  useState: useState,
1014
1014
  useSyncExternalStore: useSyncExternalStore,
1015
1015
  useTransition: useTransition,
1016
- version: version$3
1016
+ version: version$4
1017
1017
  };
1018
1018
 
1019
1019
  createCommonjsModule(function (module, exports) {
@@ -1565,7 +1565,7 @@ var useFormState = function (action, initialState, permalink) {
1565
1565
  var useFormStatus = function () {
1566
1566
  return ReactSharedInternals$1.H.useHostTransitionStatus();
1567
1567
  };
1568
- var version$2 = "19.1.1";
1568
+ var version$3 = "19.1.1";
1569
1569
 
1570
1570
  var reactDom_production = {
1571
1571
  __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE: __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
@@ -1581,7 +1581,7 @@ var reactDom_production = {
1581
1581
  unstable_batchedUpdates: unstable_batchedUpdates,
1582
1582
  useFormState: useFormState,
1583
1583
  useFormStatus: useFormStatus,
1584
- version: version$2
1584
+ version: version$3
1585
1585
  };
1586
1586
 
1587
1587
  createCommonjsModule(function (module, exports) {
@@ -1832,17 +1832,17 @@ var isArrayImpl = Array.isArray,
1832
1832
  action: null
1833
1833
  },
1834
1834
  valueStack = [],
1835
- index = -1;
1835
+ index$1 = -1;
1836
1836
  function createCursor(defaultValue) {
1837
1837
  return { current: defaultValue };
1838
1838
  }
1839
1839
  function pop(cursor) {
1840
- 0 > index ||
1841
- ((cursor.current = valueStack[index]), (valueStack[index] = null), index--);
1840
+ 0 > index$1 ||
1841
+ ((cursor.current = valueStack[index$1]), (valueStack[index$1] = null), index$1--);
1842
1842
  }
1843
1843
  function push(cursor, value) {
1844
- index++;
1845
- valueStack[index] = cursor.current;
1844
+ index$1++;
1845
+ valueStack[index$1] = cursor.current;
1846
1846
  cursor.current = value;
1847
1847
  }
1848
1848
  var contextStackCursor = createCursor(null),
@@ -13507,7 +13507,7 @@ function addTrappedEventListener(
13507
13507
  listenerWrapper = dispatchContinuousEvent;
13508
13508
  break;
13509
13509
  default:
13510
- listenerWrapper = dispatchEvent$1;
13510
+ listenerWrapper = dispatchEvent$2;
13511
13511
  }
13512
13512
  eventSystemFlags = listenerWrapper.bind(
13513
13513
  null,
@@ -16252,7 +16252,7 @@ function dispatchDiscreteEvent(
16252
16252
  var previousPriority = ReactDOMSharedInternals.p;
16253
16253
  try {
16254
16254
  (ReactDOMSharedInternals.p = 2),
16255
- dispatchEvent$1(domEventName, eventSystemFlags, container, nativeEvent);
16255
+ dispatchEvent$2(domEventName, eventSystemFlags, container, nativeEvent);
16256
16256
  } finally {
16257
16257
  (ReactDOMSharedInternals.p = previousPriority),
16258
16258
  (ReactSharedInternals.T = prevTransition);
@@ -16269,13 +16269,13 @@ function dispatchContinuousEvent(
16269
16269
  var previousPriority = ReactDOMSharedInternals.p;
16270
16270
  try {
16271
16271
  (ReactDOMSharedInternals.p = 8),
16272
- dispatchEvent$1(domEventName, eventSystemFlags, container, nativeEvent);
16272
+ dispatchEvent$2(domEventName, eventSystemFlags, container, nativeEvent);
16273
16273
  } finally {
16274
16274
  (ReactDOMSharedInternals.p = previousPriority),
16275
16275
  (ReactSharedInternals.T = prevTransition);
16276
16276
  }
16277
16277
  }
16278
- function dispatchEvent$1(
16278
+ function dispatchEvent$2(
16279
16279
  domEventName,
16280
16280
  eventSystemFlags,
16281
16281
  targetContainer,
@@ -16978,12 +16978,12 @@ var hydrateRoot = function (container, initialChildren, options) {
16978
16978
  listenToAllSupportedEvents(container);
16979
16979
  return new ReactDOMHydrationRoot(initialChildren);
16980
16980
  };
16981
- var version$1 = "19.1.1";
16981
+ var version$2 = "19.1.1";
16982
16982
 
16983
16983
  var reactDomClient_production = {
16984
16984
  createRoot: createRoot,
16985
16985
  hydrateRoot: hydrateRoot,
16986
- version: version$1
16986
+ version: version$2
16987
16987
  };
16988
16988
 
16989
16989
  createCommonjsModule(function (module, exports) {
@@ -18030,24 +18030,24 @@ for (var i = 0; i < DOMIterables.length; i++) {
18030
18030
 
18031
18031
  var iterator = _wksExt.f('iterator');
18032
18032
 
18033
- function _typeof(o) {
18033
+ function _typeof$1(o) {
18034
18034
  "@babel/helpers - typeof";
18035
18035
 
18036
- return _typeof = "function" == typeof symbol && "symbol" == typeof iterator ? function (o) {
18036
+ return _typeof$1 = "function" == typeof symbol && "symbol" == typeof iterator ? function (o) {
18037
18037
  return typeof o;
18038
18038
  } : function (o) {
18039
18039
  return o && "function" == typeof symbol && o.constructor === symbol && o !== symbol.prototype ? "symbol" : typeof o;
18040
- }, _typeof(o);
18040
+ }, _typeof$1(o);
18041
18041
  }
18042
18042
 
18043
18043
  var toPrimitive$2 = _wksExt.f('toPrimitive');
18044
18044
 
18045
18045
  function toPrimitive$1(t, r) {
18046
- if ("object" != _typeof(t) || !t) return t;
18046
+ if ("object" != _typeof$1(t) || !t) return t;
18047
18047
  var e = t[toPrimitive$2];
18048
18048
  if (void 0 !== e) {
18049
18049
  var i = e.call(t, r || "default");
18050
- if ("object" != _typeof(i)) return i;
18050
+ if ("object" != _typeof$1(i)) return i;
18051
18051
  throw new TypeError("@@toPrimitive must return a primitive value.");
18052
18052
  }
18053
18053
  return ("string" === r ? String : Number)(t);
@@ -18055,10 +18055,10 @@ function toPrimitive$1(t, r) {
18055
18055
 
18056
18056
  function toPropertyKey(t) {
18057
18057
  var i = toPrimitive$1(t, "string");
18058
- return "symbol" == _typeof(i) ? i : i + "";
18058
+ return "symbol" == _typeof$1(i) ? i : i + "";
18059
18059
  }
18060
18060
 
18061
- function _defineProperty$1(e, r, t) {
18061
+ function _defineProperty$2(e, r, t) {
18062
18062
  return (r = toPropertyKey(r)) in e ? defineProperty$1(e, r, {
18063
18063
  value: t,
18064
18064
  enumerable: !0,
@@ -18074,7 +18074,7 @@ function _objectSpread(e) {
18074
18074
  "function" == typeof getOwnPropertySymbols && o.push.apply(o, getOwnPropertySymbols(t).filter(function (e) {
18075
18075
  return getOwnPropertyDescriptor(t, e).enumerable;
18076
18076
  })), o.forEach(function (r) {
18077
- _defineProperty$1(e, r, t[r]);
18077
+ _defineProperty$2(e, r, t[r]);
18078
18078
  });
18079
18079
  }
18080
18080
  return e;
@@ -18113,7 +18113,7 @@ function _assertThisInitialized(e) {
18113
18113
  }
18114
18114
 
18115
18115
  function _possibleConstructorReturn(t, e) {
18116
- if (e && ("object" == _typeof(e) || "function" == typeof e)) return e;
18116
+ if (e && ("object" == _typeof$1(e) || "function" == typeof e)) return e;
18117
18117
  if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
18118
18118
  return _assertThisInitialized(t);
18119
18119
  }
@@ -19493,7 +19493,7 @@ var defineProperty = (function() {
19493
19493
  } catch (e) {}
19494
19494
  }());
19495
19495
 
19496
- var _defineProperty = defineProperty;
19496
+ var _defineProperty$1 = defineProperty;
19497
19497
 
19498
19498
  /**
19499
19499
  * The base implementation of `assignValue` and `assignMergeValue` without
@@ -19505,8 +19505,8 @@ var _defineProperty = defineProperty;
19505
19505
  * @param {*} value The value to assign.
19506
19506
  */
19507
19507
  function baseAssignValue(object, key, value) {
19508
- if (key == '__proto__' && _defineProperty) {
19509
- _defineProperty(object, key, {
19508
+ if (key == '__proto__' && _defineProperty$1) {
19509
+ _defineProperty$1(object, key, {
19510
19510
  'configurable': true,
19511
19511
  'enumerable': true,
19512
19512
  'value': value,
@@ -20035,8 +20035,8 @@ var identity_1 = identity;
20035
20035
  * @param {Function} string The `toString` result.
20036
20036
  * @returns {Function} Returns `func`.
20037
20037
  */
20038
- var baseSetToString = !_defineProperty ? identity_1 : function(func, string) {
20039
- return _defineProperty(func, 'toString', {
20038
+ var baseSetToString = !_defineProperty$1 ? identity_1 : function(func, string) {
20039
+ return _defineProperty$1(func, 'toString', {
20040
20040
  'configurable': true,
20041
20041
  'enumerable': false,
20042
20042
  'value': constant_1(string),
@@ -21203,17 +21203,17 @@ _export(_export.S + _export.F, 'Object', { assign: _objectAssign });
21203
21203
 
21204
21204
  var assign = _core.Object.assign;
21205
21205
 
21206
- function _extends() {
21207
- return _extends = assign ? assign.bind() : function (n) {
21206
+ function _extends$1() {
21207
+ return _extends$1 = assign ? assign.bind() : function (n) {
21208
21208
  for (var e = 1; e < arguments.length; e++) {
21209
21209
  var t = arguments[e];
21210
21210
  for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
21211
21211
  }
21212
21212
  return n;
21213
- }, _extends.apply(null, arguments);
21213
+ }, _extends$1.apply(null, arguments);
21214
21214
  }
21215
21215
 
21216
- function _objectWithoutPropertiesLoose(r, e) {
21216
+ function _objectWithoutPropertiesLoose$1(r, e) {
21217
21217
  if (null == r) return {};
21218
21218
  var t = {};
21219
21219
  for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
@@ -21223,11 +21223,11 @@ function _objectWithoutPropertiesLoose(r, e) {
21223
21223
  return t;
21224
21224
  }
21225
21225
 
21226
- function _objectWithoutProperties(e, t) {
21226
+ function _objectWithoutProperties$1(e, t) {
21227
21227
  if (null == e) return {};
21228
21228
  var o,
21229
21229
  r,
21230
- i = _objectWithoutPropertiesLoose(e, t);
21230
+ i = _objectWithoutPropertiesLoose$1(e, t);
21231
21231
  if (getOwnPropertySymbols) {
21232
21232
  var n = getOwnPropertySymbols(e);
21233
21233
  for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
@@ -23768,7 +23768,7 @@ var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
23768
23768
  * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
23769
23769
  * // => { 'a': 1, 'b': 2 }
23770
23770
  */
23771
- var defaults = _baseRest(function(object, sources) {
23771
+ var defaults$1 = _baseRest(function(object, sources) {
23772
23772
  object = Object(object);
23773
23773
 
23774
23774
  var index = -1;
@@ -23799,7 +23799,7 @@ var defaults = _baseRest(function(object, sources) {
23799
23799
  return object;
23800
23800
  });
23801
23801
 
23802
- var defaults_1 = defaults;
23802
+ var defaults_1 = defaults$1;
23803
23803
 
23804
23804
  /* Built-in method references for those with the same name as other `lodash` methods. */
23805
23805
  var nativeMin = Math.min;
@@ -26036,9 +26036,9 @@ function IconButton$1(props) {
26036
26036
  type = _props$type === void 0 ? "default" : _props$type,
26037
26037
  icon = props.icon,
26038
26038
  className = props.className,
26039
- otherProps = _objectWithoutProperties(props, ["type", "icon", "className"]);
26039
+ otherProps = _objectWithoutProperties$1(props, ["type", "icon", "className"]);
26040
26040
 
26041
- return react.createElement("button", _extends({
26041
+ return react.createElement("button", _extends$1({
26042
26042
  type: "button",
26043
26043
  className: "btn btn-".concat(type, " ").concat(className)
26044
26044
  }, otherProps), react.createElement("i", {
@@ -26326,7 +26326,7 @@ var REDUCE_TIME = 1567752802062;
26326
26326
 
26327
26327
  // don't change unless we change the algos or REDUCE_TIME
26328
26328
  // must be an integer and less than 16
26329
- var version = 7;
26329
+ var version$1 = 7;
26330
26330
 
26331
26331
  // Counter is used when shortid is called multiple times in one second.
26332
26332
  var counter$1;
@@ -26350,7 +26350,7 @@ function build(clusterWorkerId) {
26350
26350
  previousSeconds = seconds;
26351
26351
  }
26352
26352
 
26353
- str = str + generate_1(version);
26353
+ str = str + generate_1(version$1);
26354
26354
  str = str + generate_1(clusterWorkerId);
26355
26355
  if (counter$1 > 0) {
26356
26356
  str = str + generate_1(counter$1);
@@ -26604,7 +26604,7 @@ function (_Component) {
26604
26604
 
26605
26605
  _this = _possibleConstructorReturn(this, _getPrototypeOf(ArrayField).call(this, props));
26606
26606
 
26607
- _defineProperty$1(_assertThisInitialized(_this), "_getNewFormDataRow", function () {
26607
+ _defineProperty$2(_assertThisInitialized(_this), "_getNewFormDataRow", function () {
26608
26608
  var _this$props = _this.props,
26609
26609
  schema = _this$props.schema,
26610
26610
  _this$props$registry = _this$props.registry,
@@ -26619,7 +26619,7 @@ function (_Component) {
26619
26619
  return getDefaultFormState$1(itemSchema, undefined, rootSchema);
26620
26620
  });
26621
26621
 
26622
- _defineProperty$1(_assertThisInitialized(_this), "onAddClick", function (event) {
26622
+ _defineProperty$2(_assertThisInitialized(_this), "onAddClick", function (event) {
26623
26623
  if (event) {
26624
26624
  event.preventDefault();
26625
26625
  }
@@ -26639,7 +26639,7 @@ function (_Component) {
26639
26639
  });
26640
26640
  });
26641
26641
 
26642
- _defineProperty$1(_assertThisInitialized(_this), "onAddIndexClick", function (index) {
26642
+ _defineProperty$2(_assertThisInitialized(_this), "onAddIndexClick", function (index) {
26643
26643
  return function (event) {
26644
26644
  if (event) {
26645
26645
  event.preventDefault();
@@ -26664,7 +26664,7 @@ function (_Component) {
26664
26664
  };
26665
26665
  });
26666
26666
 
26667
- _defineProperty$1(_assertThisInitialized(_this), "onDropIndexClick", function (index) {
26667
+ _defineProperty$2(_assertThisInitialized(_this), "onDropIndexClick", function (index) {
26668
26668
  return function (event) {
26669
26669
  if (event) {
26670
26670
  event.preventDefault();
@@ -26703,7 +26703,7 @@ function (_Component) {
26703
26703
  };
26704
26704
  });
26705
26705
 
26706
- _defineProperty$1(_assertThisInitialized(_this), "onReorderClick", function (index, newIndex) {
26706
+ _defineProperty$2(_assertThisInitialized(_this), "onReorderClick", function (index, newIndex) {
26707
26707
  return function (event) {
26708
26708
  if (event) {
26709
26709
  event.preventDefault();
@@ -26752,7 +26752,7 @@ function (_Component) {
26752
26752
  };
26753
26753
  });
26754
26754
 
26755
- _defineProperty$1(_assertThisInitialized(_this), "onChangeForIndex", function (index) {
26755
+ _defineProperty$2(_assertThisInitialized(_this), "onChangeForIndex", function (index) {
26756
26756
  return function (value, errorSchema) {
26757
26757
  var _this$props2 = _this.props,
26758
26758
  formData = _this$props2.formData,
@@ -26763,11 +26763,11 @@ function (_Component) {
26763
26763
  var jsonValue = typeof value === "undefined" ? null : value;
26764
26764
  return index === i ? jsonValue : item;
26765
26765
  });
26766
- onChange(newFormData, errorSchema && _this.props.errorSchema && _objectSpread({}, _this.props.errorSchema, _defineProperty$1({}, index, errorSchema)));
26766
+ onChange(newFormData, errorSchema && _this.props.errorSchema && _objectSpread({}, _this.props.errorSchema, _defineProperty$2({}, index, errorSchema)));
26767
26767
  };
26768
26768
  });
26769
26769
 
26770
- _defineProperty$1(_assertThisInitialized(_this), "onSelectChange", function (value) {
26770
+ _defineProperty$2(_assertThisInitialized(_this), "onSelectChange", function (value) {
26771
26771
  _this.props.onChange(value);
26772
26772
  });
26773
26773
 
@@ -26956,7 +26956,7 @@ function (_Component) {
26956
26956
  }),
26957
26957
  _getUiOptions$enumOpt2 = _getUiOptions$enumOpt.widget,
26958
26958
  widget = _getUiOptions$enumOpt2 === void 0 ? "select" : _getUiOptions$enumOpt2,
26959
- options = _objectWithoutProperties(_getUiOptions$enumOpt, ["widget"]);
26959
+ options = _objectWithoutProperties$1(_getUiOptions$enumOpt, ["widget"]);
26960
26960
 
26961
26961
  var Widget = getWidget$1(schema, widget, widgets);
26962
26962
  return react.createElement(Widget, {
@@ -27003,7 +27003,7 @@ function (_Component) {
27003
27003
  var _getUiOptions2 = getUiOptions$1(uiSchema),
27004
27004
  _getUiOptions2$widget = _getUiOptions2.widget,
27005
27005
  widget = _getUiOptions2$widget === void 0 ? "files" : _getUiOptions2$widget,
27006
- options = _objectWithoutProperties(_getUiOptions2, ["widget"]);
27006
+ options = _objectWithoutProperties$1(_getUiOptions2, ["widget"]);
27007
27007
 
27008
27008
  var Widget = getWidget$1(schema, widget, widgets);
27009
27009
  return react.createElement(Widget, {
@@ -27217,7 +27217,7 @@ function (_Component) {
27217
27217
  return ArrayField;
27218
27218
  }(react.Component);
27219
27219
 
27220
- _defineProperty$1(ArrayField$2, "defaultProps", {
27220
+ _defineProperty$2(ArrayField$2, "defaultProps", {
27221
27221
  uiSchema: {},
27222
27222
  formData: [],
27223
27223
  idSchema: {},
@@ -27251,7 +27251,7 @@ function BooleanField$1(props) {
27251
27251
  var _getUiOptions = getUiOptions$1(uiSchema),
27252
27252
  _getUiOptions$widget = _getUiOptions.widget,
27253
27253
  widget = _getUiOptions$widget === void 0 ? "checkbox" : _getUiOptions$widget,
27254
- options = _objectWithoutProperties(_getUiOptions, ["widget"]);
27254
+ options = _objectWithoutProperties$1(_getUiOptions, ["widget"]);
27255
27255
 
27256
27256
  var Widget = getWidget$1(schema, widget, widgets);
27257
27257
  var enumOptions;
@@ -27343,7 +27343,7 @@ function (_Component) {
27343
27343
 
27344
27344
  _this = _possibleConstructorReturn(this, _getPrototypeOf(AnyOfField).call(this, props));
27345
27345
 
27346
- _defineProperty$1(_assertThisInitialized(_this), "onOptionChange", function (option) {
27346
+ _defineProperty$2(_assertThisInitialized(_this), "onOptionChange", function (option) {
27347
27347
  var selectedOption = _parseInt(option, 10);
27348
27348
 
27349
27349
  var _this$props = _this.props,
@@ -27358,7 +27358,7 @@ function (_Component) {
27358
27358
  var newFormData = undefined;
27359
27359
 
27360
27360
  if (guessType$1(formData) === "object" && (newOption.type === "object" || newOption.properties)) {
27361
- newFormData = _extends({}, formData);
27361
+ newFormData = _extends$1({}, formData);
27362
27362
  var optionsToDiscard = options.slice();
27363
27363
  optionsToDiscard.splice(selectedOption, 1); // Discard any data added using other options
27364
27364
 
@@ -27464,7 +27464,7 @@ function (_Component) {
27464
27464
  var _getUiOptions = getUiOptions$1(uiSchema),
27465
27465
  _getUiOptions$widget = _getUiOptions.widget,
27466
27466
  widget = _getUiOptions$widget === void 0 ? "select" : _getUiOptions$widget,
27467
- uiOptions = _objectWithoutProperties(_getUiOptions, ["widget"]);
27467
+ uiOptions = _objectWithoutProperties$1(_getUiOptions, ["widget"]);
27468
27468
 
27469
27469
  var Widget = getWidget$1({
27470
27470
  type: "number"
@@ -27475,7 +27475,7 @@ function (_Component) {
27475
27475
  if (option) {
27476
27476
  // If the subschema doesn't declare a type, infer the type from the
27477
27477
  // parent schema
27478
- optionSchema = option.type ? option : _extends({}, option, {
27478
+ optionSchema = option.type ? option : _extends$1({}, option, {
27479
27479
  type: baseType
27480
27480
  });
27481
27481
  }
@@ -27490,7 +27490,7 @@ function (_Component) {
27490
27490
  className: "panel panel-default panel-body"
27491
27491
  }, react.createElement("div", {
27492
27492
  className: "form-group"
27493
- }, react.createElement(Widget, _extends({
27493
+ }, react.createElement(Widget, _extends$1({
27494
27494
  id: "".concat(idSchema.$id).concat(schema.oneOf ? "__oneof_select" : "__anyof_select"),
27495
27495
  schema: {
27496
27496
  type: "number",
@@ -27569,7 +27569,7 @@ function (_React$Component) {
27569
27569
 
27570
27570
  _this = _possibleConstructorReturn(this, _getPrototypeOf(NumberField).call(this, props));
27571
27571
 
27572
- _defineProperty$1(_assertThisInitialized(_this), "handleChange", function (value) {
27572
+ _defineProperty$2(_assertThisInitialized(_this), "handleChange", function (value) {
27573
27573
  // Cache the original value in component state
27574
27574
  _this.setState({
27575
27575
  lastValue: value
@@ -27602,7 +27602,7 @@ function (_React$Component) {
27602
27602
 
27603
27603
  var _this$props = this.props,
27604
27604
  formData = _this$props.formData,
27605
- props = _objectWithoutProperties(_this$props, ["formData"]);
27605
+ props = _objectWithoutProperties$1(_this$props, ["formData"]);
27606
27606
 
27607
27607
  var lastValue = this.state.lastValue;
27608
27608
  var value = formData;
@@ -27619,7 +27619,7 @@ function (_React$Component) {
27619
27619
  }
27620
27620
  }
27621
27621
 
27622
- return react.createElement(StringField, _extends({}, props, {
27622
+ return react.createElement(StringField, _extends$1({}, props, {
27623
27623
  formData: value,
27624
27624
  onChange: this.handleChange
27625
27625
  }));
@@ -27681,12 +27681,12 @@ function (_Component) {
27681
27681
 
27682
27682
  _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(ObjectField)).call.apply(_getPrototypeOf2, [this].concat(args)));
27683
27683
 
27684
- _defineProperty$1(_assertThisInitialized(_this), "state", {
27684
+ _defineProperty$2(_assertThisInitialized(_this), "state", {
27685
27685
  wasPropertyKeyModified: false,
27686
27686
  additionalProperties: {}
27687
27687
  });
27688
27688
 
27689
- _defineProperty$1(_assertThisInitialized(_this), "onPropertyChange", function (name) {
27689
+ _defineProperty$2(_assertThisInitialized(_this), "onPropertyChange", function (name) {
27690
27690
  var addedByAdditionalProperties = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
27691
27691
  return function (value, errorSchema) {
27692
27692
  if (!value && addedByAdditionalProperties) {
@@ -27700,13 +27700,13 @@ function (_Component) {
27700
27700
  value = "";
27701
27701
  }
27702
27702
 
27703
- var newFormData = _objectSpread({}, _this.props.formData, _defineProperty$1({}, name, value));
27703
+ var newFormData = _objectSpread({}, _this.props.formData, _defineProperty$2({}, name, value));
27704
27704
 
27705
- _this.props.onChange(newFormData, errorSchema && _this.props.errorSchema && _objectSpread({}, _this.props.errorSchema, _defineProperty$1({}, name, errorSchema)));
27705
+ _this.props.onChange(newFormData, errorSchema && _this.props.errorSchema && _objectSpread({}, _this.props.errorSchema, _defineProperty$2({}, name, errorSchema)));
27706
27706
  };
27707
27707
  });
27708
27708
 
27709
- _defineProperty$1(_assertThisInitialized(_this), "onDropPropertyClick", function (key) {
27709
+ _defineProperty$2(_assertThisInitialized(_this), "onDropPropertyClick", function (key) {
27710
27710
  return function (event) {
27711
27711
  event.preventDefault();
27712
27712
  var _this$props = _this.props,
@@ -27720,7 +27720,7 @@ function (_Component) {
27720
27720
  };
27721
27721
  });
27722
27722
 
27723
- _defineProperty$1(_assertThisInitialized(_this), "getAvailableKey", function (preferredKey, formData) {
27723
+ _defineProperty$2(_assertThisInitialized(_this), "getAvailableKey", function (preferredKey, formData) {
27724
27724
  var index = 0;
27725
27725
  var newKey = preferredKey;
27726
27726
 
@@ -27731,7 +27731,7 @@ function (_Component) {
27731
27731
  return newKey;
27732
27732
  });
27733
27733
 
27734
- _defineProperty$1(_assertThisInitialized(_this), "onKeyChange", function (oldValue) {
27734
+ _defineProperty$2(_assertThisInitialized(_this), "onKeyChange", function (oldValue) {
27735
27735
  return function (value, errorSchema) {
27736
27736
  if (oldValue === value) {
27737
27737
  return;
@@ -27741,24 +27741,24 @@ function (_Component) {
27741
27741
 
27742
27742
  var newFormData = _objectSpread({}, _this.props.formData);
27743
27743
 
27744
- var newKeys = _defineProperty$1({}, oldValue, value);
27744
+ var newKeys = _defineProperty$2({}, oldValue, value);
27745
27745
 
27746
27746
  var keyValues = keys$3(newFormData).map(function (key) {
27747
27747
  var newKey = newKeys[key] || key;
27748
- return _defineProperty$1({}, newKey, newFormData[key]);
27748
+ return _defineProperty$2({}, newKey, newFormData[key]);
27749
27749
  });
27750
27750
 
27751
- var renamedObj = _extends.apply(void 0, [{}].concat(_toConsumableArray(keyValues)));
27751
+ var renamedObj = _extends$1.apply(void 0, [{}].concat(_toConsumableArray(keyValues)));
27752
27752
 
27753
27753
  _this.setState({
27754
27754
  wasPropertyKeyModified: true
27755
27755
  });
27756
27756
 
27757
- _this.props.onChange(renamedObj, errorSchema && _this.props.errorSchema && _objectSpread({}, _this.props.errorSchema, _defineProperty$1({}, value, errorSchema)));
27757
+ _this.props.onChange(renamedObj, errorSchema && _this.props.errorSchema && _objectSpread({}, _this.props.errorSchema, _defineProperty$2({}, value, errorSchema)));
27758
27758
  };
27759
27759
  });
27760
27760
 
27761
- _defineProperty$1(_assertThisInitialized(_this), "handleAddClick", function (schema) {
27761
+ _defineProperty$2(_assertThisInitialized(_this), "handleAddClick", function (schema) {
27762
27762
  return function () {
27763
27763
  var type = schema.additionalProperties.type;
27764
27764
 
@@ -27902,7 +27902,7 @@ function (_Component) {
27902
27902
  formData: formData,
27903
27903
  formContext: formContext
27904
27904
  };
27905
- return react.createElement(Template, _extends({}, templateProps, {
27905
+ return react.createElement(Template, _extends$1({}, templateProps, {
27906
27906
  onAddClick: this.handleAddClick
27907
27907
  }));
27908
27908
  }
@@ -27911,7 +27911,7 @@ function (_Component) {
27911
27911
  return ObjectField;
27912
27912
  }(react.Component);
27913
27913
 
27914
- _defineProperty$1(ObjectField$2, "defaultProps", {
27914
+ _defineProperty$2(ObjectField$2, "defaultProps", {
27915
27915
  uiSchema: {},
27916
27916
  formData: {},
27917
27917
  errorSchema: {},
@@ -28151,10 +28151,10 @@ function SchemaFieldRender$1(props) {
28151
28151
  var displayLabel = getDisplayLabel$1(schema, uiSchema, rootSchema);
28152
28152
 
28153
28153
  var __errors = errorSchema.__errors,
28154
- fieldErrorSchema = _objectWithoutProperties(errorSchema, ["__errors"]); // See #439: uiSchema: Don't pass consumed class names to child components
28154
+ fieldErrorSchema = _objectWithoutProperties$1(errorSchema, ["__errors"]); // See #439: uiSchema: Don't pass consumed class names to child components
28155
28155
 
28156
28156
 
28157
- var field = react.createElement(FieldComponent, _extends({}, props, {
28157
+ var field = react.createElement(FieldComponent, _extends$1({}, props, {
28158
28158
  idSchema: idSchema,
28159
28159
  schema: schema,
28160
28160
  uiSchema: _objectSpread({}, uiSchema, {
@@ -28315,7 +28315,7 @@ function StringField$1(props) {
28315
28315
  widget = _getUiOptions$widget === void 0 ? defaultWidget : _getUiOptions$widget,
28316
28316
  _getUiOptions$placeho = _getUiOptions.placeholder,
28317
28317
  placeholder = _getUiOptions$placeho === void 0 ? "" : _getUiOptions$placeho,
28318
- options = _objectWithoutProperties(_getUiOptions, ["widget", "placeholder"]);
28318
+ options = _objectWithoutProperties$1(_getUiOptions, ["widget", "placeholder"]);
28319
28319
 
28320
28320
  var Widget = getWidget$1(schema, widget, widgets);
28321
28321
  return react.createElement(Widget, {
@@ -28478,8 +28478,8 @@ function (_Component) {
28478
28478
 
28479
28479
  _this = _possibleConstructorReturn(this, _getPrototypeOf(AltDateWidget).call(this, props));
28480
28480
 
28481
- _defineProperty$1(_assertThisInitialized(_this), "onChange", function (property, value) {
28482
- _this.setState(_defineProperty$1({}, property, typeof value === "undefined" ? -1 : value), function () {
28481
+ _defineProperty$2(_assertThisInitialized(_this), "onChange", function (property, value) {
28482
+ _this.setState(_defineProperty$2({}, property, typeof value === "undefined" ? -1 : value), function () {
28483
28483
  // Only propagate to parent state if we have a complete date{time}
28484
28484
  if (readyForChange$1(_this.state)) {
28485
28485
  _this.props.onChange(toDateString$1(_this.state, _this.props.time));
@@ -28487,7 +28487,7 @@ function (_Component) {
28487
28487
  });
28488
28488
  });
28489
28489
 
28490
- _defineProperty$1(_assertThisInitialized(_this), "setNow", function (event) {
28490
+ _defineProperty$2(_assertThisInitialized(_this), "setNow", function (event) {
28491
28491
  event.preventDefault();
28492
28492
  var _this$props = _this.props,
28493
28493
  time = _this$props.time,
@@ -28506,7 +28506,7 @@ function (_Component) {
28506
28506
  });
28507
28507
  });
28508
28508
 
28509
- _defineProperty$1(_assertThisInitialized(_this), "clear", function (event) {
28509
+ _defineProperty$2(_assertThisInitialized(_this), "clear", function (event) {
28510
28510
  event.preventDefault();
28511
28511
  var _this$props2 = _this.props,
28512
28512
  time = _this$props2.time,
@@ -28555,7 +28555,7 @@ function (_Component) {
28555
28555
  }, this.dateElementProps.map(function (elemProps, i) {
28556
28556
  return react.createElement("li", {
28557
28557
  key: i
28558
- }, react.createElement(DateElement$1, _extends({
28558
+ }, react.createElement(DateElement$1, _extends$1({
28559
28559
  rootId: id,
28560
28560
  select: _this2.onChange
28561
28561
  }, elemProps, {
@@ -28625,7 +28625,7 @@ function (_Component) {
28625
28625
  return AltDateWidget;
28626
28626
  }(react.Component);
28627
28627
 
28628
- _defineProperty$1(AltDateWidget$1, "defaultProps", {
28628
+ _defineProperty$2(AltDateWidget$1, "defaultProps", {
28629
28629
  time: false,
28630
28630
  disabled: false,
28631
28631
  readonly: false,
@@ -28637,7 +28637,7 @@ _defineProperty$1(AltDateWidget$1, "defaultProps", {
28637
28637
 
28638
28638
  function AltDateTimeWidget$1(props) {
28639
28639
  var AltDateWidget = props.registry.widgets.AltDateWidget;
28640
- return react.createElement(AltDateWidget, _extends({
28640
+ return react.createElement(AltDateWidget, _extends$1({
28641
28641
  time: true
28642
28642
  }, props));
28643
28643
  }
@@ -28662,7 +28662,7 @@ function BaseInput$1(props) {
28662
28662
  onFocus = props.onFocus,
28663
28663
  options = props.options,
28664
28664
  schema = props.schema,
28665
- inputProps = _objectWithoutProperties(props, ["value", "readonly", "disabled", "autofocus", "onBlur", "onFocus", "options", "schema", "uiSchema", "formContext", "registry", "rawErrors"]); // If options.inputType is set use that as the input type
28665
+ inputProps = _objectWithoutProperties$1(props, ["value", "readonly", "disabled", "autofocus", "onBlur", "onFocus", "options", "schema", "uiSchema", "formContext", "registry", "rawErrors"]); // If options.inputType is set use that as the input type
28666
28666
 
28667
28667
 
28668
28668
  if (options.inputType) {
@@ -28707,7 +28707,7 @@ function BaseInput$1(props) {
28707
28707
  return props.onChange(value === "" ? options.emptyValue : value);
28708
28708
  };
28709
28709
 
28710
- return [react.createElement("input", _extends({
28710
+ return [react.createElement("input", _extends$1({
28711
28711
  key: inputProps.id,
28712
28712
  className: "form-control",
28713
28713
  readOnly: readonly,
@@ -28857,7 +28857,7 @@ function ColorWidget$1(props) {
28857
28857
  var disabled = props.disabled,
28858
28858
  readonly = props.readonly,
28859
28859
  BaseInput = props.registry.widgets.BaseInput;
28860
- return react.createElement(BaseInput, _extends({
28860
+ return react.createElement(BaseInput, _extends$1({
28861
28861
  type: "color"
28862
28862
  }, props, {
28863
28863
  disabled: disabled || readonly
@@ -28867,7 +28867,7 @@ function ColorWidget$1(props) {
28867
28867
  function DateWidget$1(props) {
28868
28868
  var _onChange = props.onChange,
28869
28869
  BaseInput = props.registry.widgets.BaseInput;
28870
- return react.createElement(BaseInput, _extends({
28870
+ return react.createElement(BaseInput, _extends$1({
28871
28871
  type: "date"
28872
28872
  }, props, {
28873
28873
  onChange: function onChange(value) {
@@ -28880,7 +28880,7 @@ function DateTimeWidget$1(props) {
28880
28880
  var value = props.value,
28881
28881
  _onChange = props.onChange,
28882
28882
  BaseInput = props.registry.widgets.BaseInput;
28883
- return react.createElement(BaseInput, _extends({
28883
+ return react.createElement(BaseInput, _extends$1({
28884
28884
  type: "datetime-local"
28885
28885
  }, props, {
28886
28886
  value: utcToLocal$1(value),
@@ -28892,7 +28892,7 @@ function DateTimeWidget$1(props) {
28892
28892
 
28893
28893
  function EmailWidget$1(props) {
28894
28894
  var BaseInput = props.registry.widgets.BaseInput;
28895
- return react.createElement(BaseInput, _extends({
28895
+ return react.createElement(BaseInput, _extends$1({
28896
28896
  type: "email"
28897
28897
  }, props));
28898
28898
  }
@@ -29497,7 +29497,7 @@ function (_Component) {
29497
29497
 
29498
29498
  _this = _possibleConstructorReturn(this, _getPrototypeOf(FileWidget).call(this, props));
29499
29499
 
29500
- _defineProperty$1(_assertThisInitialized(_this), "onChange", function (event) {
29500
+ _defineProperty$2(_assertThisInitialized(_this), "onChange", function (event) {
29501
29501
  var _this$props = _this.props,
29502
29502
  multiple = _this$props.multiple,
29503
29503
  onChange = _this$props.onChange;
@@ -29583,7 +29583,7 @@ function HiddenWidget$1(_ref) {
29583
29583
 
29584
29584
  function PasswordWidget$1(props) {
29585
29585
  var BaseInput = props.registry.widgets.BaseInput;
29586
- return react.createElement(BaseInput, _extends({
29586
+ return react.createElement(BaseInput, _extends$1({
29587
29587
  type: "password"
29588
29588
  }, props));
29589
29589
  }
@@ -29651,7 +29651,7 @@ function RangeWidget$1(props) {
29651
29651
  BaseInput = props.registry.widgets.BaseInput;
29652
29652
  return react.createElement("div", {
29653
29653
  className: "field-range-wrapper"
29654
- }, react.createElement(BaseInput, _extends({
29654
+ }, react.createElement(BaseInput, _extends$1({
29655
29655
  type: "range"
29656
29656
  }, props, rangeSpec$1(schema))), react.createElement("span", {
29657
29657
  className: "range-view"
@@ -29814,14 +29814,14 @@ function TextWidget$1(props) {
29814
29814
 
29815
29815
  function URLWidget$1(props) {
29816
29816
  var BaseInput = props.registry.widgets.BaseInput;
29817
- return react.createElement(BaseInput, _extends({
29817
+ return react.createElement(BaseInput, _extends$1({
29818
29818
  type: "url"
29819
29819
  }, props));
29820
29820
  }
29821
29821
 
29822
29822
  function UpDownWidget$1(props) {
29823
29823
  var BaseInput = props.registry.widgets.BaseInput;
29824
- return react.createElement(BaseInput, _extends({
29824
+ return react.createElement(BaseInput, _extends$1({
29825
29825
  type: "number"
29826
29826
  }, props, rangeSpec$1(props.schema)));
29827
29827
  }
@@ -37098,13 +37098,13 @@ function createErrorHandler$1(formData) {
37098
37098
 
37099
37099
  if (isObject$1(formData)) {
37100
37100
  return keys$3(formData).reduce(function (acc, key) {
37101
- return _objectSpread({}, acc, _defineProperty$1({}, key, createErrorHandler$1(formData[key])));
37101
+ return _objectSpread({}, acc, _defineProperty$2({}, key, createErrorHandler$1(formData[key])));
37102
37102
  }, handler);
37103
37103
  }
37104
37104
 
37105
37105
  if (isArray$2(formData)) {
37106
37106
  return formData.reduce(function (acc, value, key) {
37107
- return _objectSpread({}, acc, _defineProperty$1({}, key, createErrorHandler$1(value)));
37107
+ return _objectSpread({}, acc, _defineProperty$2({}, key, createErrorHandler$1(value)));
37108
37108
  }, handler);
37109
37109
  }
37110
37110
 
@@ -37116,10 +37116,10 @@ function unwrapErrorHandler$1(errorHandler) {
37116
37116
  if (key === "addError") {
37117
37117
  return acc;
37118
37118
  } else if (key === "__errors") {
37119
- return _objectSpread({}, acc, _defineProperty$1({}, key, errorHandler[key]));
37119
+ return _objectSpread({}, acc, _defineProperty$2({}, key, errorHandler[key]));
37120
37120
  }
37121
37121
 
37122
- return _objectSpread({}, acc, _defineProperty$1({}, key, unwrapErrorHandler$1(errorHandler[key])));
37122
+ return _objectSpread({}, acc, _defineProperty$2({}, key, unwrapErrorHandler$1(errorHandler[key])));
37123
37123
  }, {});
37124
37124
  }
37125
37125
  /**
@@ -37255,9 +37255,9 @@ function isValid$1(schema, data) {
37255
37255
  }
37256
37256
  }
37257
37257
 
37258
- function _toPropertyKey$1(arg) { var key = _toPrimitive$1(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
37258
+ function _toPropertyKey$1(arg) { var key = _toPrimitive$1(arg, "string"); return _typeof$1(key) === "symbol" ? key : String(key); }
37259
37259
 
37260
- function _toPrimitive$1(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
37260
+ function _toPrimitive$1(input, hint) { if (_typeof$1(input) !== "object" || input === null) return input; var prim = input[toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof$1(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
37261
37261
  var ADDITIONAL_PROPERTY_FLAG$1 = "__additional_property";
37262
37262
  var widgetMap$1 = {
37263
37263
  "boolean": {
@@ -37376,9 +37376,9 @@ function getWidget$1(schema, widget) {
37376
37376
  Widget.MergedWidget = function (_ref) {
37377
37377
  var _ref$options = _ref.options,
37378
37378
  options = _ref$options === void 0 ? {} : _ref$options,
37379
- props = _objectWithoutProperties(_ref, ["options"]);
37379
+ props = _objectWithoutProperties$1(_ref, ["options"]);
37380
37380
 
37381
- return react.createElement(Widget, _extends({
37381
+ return react.createElement(Widget, _extends$1({
37382
37382
  options: _objectSpread({}, defaultOptions, options)
37383
37383
  }, props));
37384
37384
  };
@@ -37392,7 +37392,7 @@ function getWidget$1(schema, widget) {
37392
37392
  }
37393
37393
 
37394
37394
  if (typeof widget !== "string") {
37395
- throw new Error("Unsupported widget definition: ".concat(_typeof(widget)));
37395
+ throw new Error("Unsupported widget definition: ".concat(_typeof$1(widget)));
37396
37396
  }
37397
37397
 
37398
37398
  if (registeredWidgets.hasOwnProperty(widget)) {
@@ -37565,7 +37565,7 @@ function mergeDefaultsWithFormData$1(defaults, formData) {
37565
37565
  return value;
37566
37566
  });
37567
37567
  } else if (isObject$1(formData)) {
37568
- var acc = _extends({}, defaults); // Prevent mutation of source object.
37568
+ var acc = _extends$1({}, defaults); // Prevent mutation of source object.
37569
37569
 
37570
37570
 
37571
37571
  return keys$3(formData).reduce(function (acc, key) {
@@ -37594,7 +37594,7 @@ function getUiOptions$1(uiSchema) {
37594
37594
  return _objectSpread({}, options, value);
37595
37595
  }
37596
37596
 
37597
- return _objectSpread({}, options, _defineProperty$1({}, key.substring(3), value));
37597
+ return _objectSpread({}, options, _defineProperty$2({}, key.substring(3), value));
37598
37598
  }, {});
37599
37599
  }
37600
37600
  function getDisplayLabel$1(schema, uiSchema, rootSchema) {
@@ -37625,13 +37625,13 @@ function isObject$1(thing) {
37625
37625
  return false;
37626
37626
  }
37627
37627
 
37628
- return _typeof(thing) === "object" && thing !== null && !isArray$2(thing);
37628
+ return _typeof$1(thing) === "object" && thing !== null && !isArray$2(thing);
37629
37629
  }
37630
37630
  function mergeObjects$1(obj1, obj2) {
37631
37631
  var concatArrays = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
37632
37632
 
37633
37633
  // Recursively merge deeply nested objects.
37634
- var acc = _extends({}, obj1); // Prevent mutation of source object.
37634
+ var acc = _extends$1({}, obj1); // Prevent mutation of source object.
37635
37635
 
37636
37636
 
37637
37637
  return keys$3(obj2).reduce(function (acc, key) {
@@ -37847,7 +37847,7 @@ var guessType$1 = function guessType(value) {
37847
37847
  return "boolean";
37848
37848
  } else if (!isNaN(value)) {
37849
37849
  return "number";
37850
- } else if (_typeof(value) === "object") {
37850
+ } else if (_typeof$1(value) === "object") {
37851
37851
  return "object";
37852
37852
  } // Default to string if we can't figure it out
37853
37853
 
@@ -37916,7 +37916,7 @@ function resolveReference$1(schema, rootSchema, formData) {
37916
37916
  // Retrieve the referenced schema definition.
37917
37917
  var $refSchema = findSchemaDefinition$1(schema.$ref, rootSchema); // Drop the $ref property of the source schema.
37918
37918
 
37919
- var localSchema = _objectWithoutProperties(schema, ["$ref"]); // Update referenced schema definition with local schema properties.
37919
+ var localSchema = _objectWithoutProperties$1(schema, ["$ref"]); // Update referenced schema definition with local schema properties.
37920
37920
 
37921
37921
 
37922
37922
  return retrieveSchema$1(_objectSpread({}, $refSchema, localSchema), rootSchema, formData);
@@ -37941,7 +37941,7 @@ function retrieveSchema$1(schema) {
37941
37941
  console.warn("could not merge subschemas in allOf:\n" + e);
37942
37942
 
37943
37943
  var _resolvedSchema = resolvedSchema,
37944
- resolvedSchemaWithoutAllOf = _objectWithoutProperties(_resolvedSchema, ["allOf"]);
37944
+ resolvedSchemaWithoutAllOf = _objectWithoutProperties$1(_resolvedSchema, ["allOf"]);
37945
37945
 
37946
37946
  return resolvedSchemaWithoutAllOf;
37947
37947
  }
@@ -37960,7 +37960,7 @@ function resolveDependencies$1(schema, rootSchema, formData) {
37960
37960
  // Drop the dependencies from the source schema.
37961
37961
  var _schema$dependencies = schema.dependencies,
37962
37962
  dependencies = _schema$dependencies === void 0 ? {} : _schema$dependencies,
37963
- resolvedSchema = _objectWithoutProperties(schema, ["dependencies"]);
37963
+ resolvedSchema = _objectWithoutProperties$1(schema, ["dependencies"]);
37964
37964
 
37965
37965
  if ("oneOf" in resolvedSchema) {
37966
37966
  resolvedSchema = resolvedSchema.oneOf[getMatchingOption$1(formData, resolvedSchema.oneOf)];
@@ -37985,7 +37985,7 @@ function processDependencies$1(dependencies, resolvedSchema, rootSchema, formDat
37985
37985
  }
37986
37986
 
37987
37987
  var dependencyValue = dependencies[dependencyKey],
37988
- remainingDependencies = _objectWithoutProperties(dependencies, [dependencyKey].map(_toPropertyKey$1));
37988
+ remainingDependencies = _objectWithoutProperties$1(dependencies, [dependencyKey].map(_toPropertyKey$1));
37989
37989
 
37990
37990
  if (isArray$2(dependencyValue)) {
37991
37991
  resolvedSchema = withDependentProperties$1(resolvedSchema, dependencyValue);
@@ -38013,14 +38013,14 @@ function withDependentProperties$1(schema, additionallyRequired) {
38013
38013
  function withDependentSchema$1(schema, rootSchema, formData, dependencyKey, dependencyValue) {
38014
38014
  var _retrieveSchema = retrieveSchema$1(dependencyValue, rootSchema, formData),
38015
38015
  oneOf = _retrieveSchema.oneOf,
38016
- dependentSchema = _objectWithoutProperties(_retrieveSchema, ["oneOf"]);
38016
+ dependentSchema = _objectWithoutProperties$1(_retrieveSchema, ["oneOf"]);
38017
38017
 
38018
38018
  schema = mergeSchemas$1(schema, dependentSchema); // Since it does not contain oneOf, we return the original schema.
38019
38019
 
38020
38020
  if (oneOf === undefined) {
38021
38021
  return schema;
38022
38022
  } else if (!isArray$2(oneOf)) {
38023
- throw new Error("invalid: it is some ".concat(_typeof(oneOf), " instead of an array"));
38023
+ throw new Error("invalid: it is some ".concat(_typeof$1(oneOf), " instead of an array"));
38024
38024
  } // Resolve $refs inside oneOf.
38025
38025
 
38026
38026
 
@@ -38041,7 +38041,7 @@ function withExactlyOneSubschema$1(schema, rootSchema, formData, dependencyKey,
38041
38041
  if (conditionPropertySchema) {
38042
38042
  var conditionSchema = {
38043
38043
  type: "object",
38044
- properties: _defineProperty$1({}, dependencyKey, conditionPropertySchema)
38044
+ properties: _defineProperty$2({}, dependencyKey, conditionPropertySchema)
38045
38045
  };
38046
38046
 
38047
38047
  var _validateFormData = validateFormData$1(formData, conditionSchema),
@@ -38059,7 +38059,7 @@ function withExactlyOneSubschema$1(schema, rootSchema, formData, dependencyKey,
38059
38059
  var subschema = validSubschemas[0];
38060
38060
 
38061
38061
  var _subschema$properties = subschema.properties,
38062
- dependentSubschema = _objectWithoutProperties(_subschema$properties, [dependencyKey].map(_toPropertyKey$1));
38062
+ dependentSubschema = _objectWithoutProperties$1(_subschema$properties, [dependencyKey].map(_toPropertyKey$1));
38063
38063
 
38064
38064
  var dependentSchema = _objectSpread({}, subschema, {
38065
38065
  properties: dependentSubschema
@@ -38074,7 +38074,7 @@ function withExactlyOneSubschema$1(schema, rootSchema, formData, dependencyKey,
38074
38074
 
38075
38075
 
38076
38076
  function mergeSchemas$1(obj1, obj2) {
38077
- var acc = _extends({}, obj1); // Prevent mutation of source object.
38077
+ var acc = _extends$1({}, obj1); // Prevent mutation of source object.
38078
38078
 
38079
38079
 
38080
38080
  return keys$3(obj2).reduce(function (acc, key) {
@@ -38112,7 +38112,7 @@ function deepEquals$1(a, b) {
38112
38112
  // Assume all functions are equivalent
38113
38113
  // see https://github.com/rjsf-team/react-jsonschema-form/issues/255
38114
38114
  return true;
38115
- } else if (_typeof(a) !== "object" || _typeof(b) !== "object") {
38115
+ } else if (_typeof$1(a) !== "object" || _typeof$1(b) !== "object") {
38116
38116
  return false;
38117
38117
  } else if (a === null || b === null) {
38118
38118
  return false;
@@ -38406,7 +38406,7 @@ function getMatchingOption$1(formData, options, rootSchema) {
38406
38406
 
38407
38407
  if (option.anyOf) {
38408
38408
  // Create a shallow clone of the option
38409
- var shallowClone = _extends({}, option);
38409
+ var shallowClone = _extends$1({}, option);
38410
38410
 
38411
38411
  if (!shallowClone.allOf) {
38412
38412
  shallowClone.allOf = [];
@@ -38418,7 +38418,7 @@ function getMatchingOption$1(formData, options, rootSchema) {
38418
38418
  shallowClone.allOf.push(requiresAnyOf);
38419
38419
  augmentedSchema = shallowClone;
38420
38420
  } else {
38421
- augmentedSchema = _extends({}, option, requiresAnyOf);
38421
+ augmentedSchema = _extends$1({}, option, requiresAnyOf);
38422
38422
  } // Remove the "required" field as it's likely that not all fields have
38423
38423
  // been filled in yet, which will mean that the schema is not valid
38424
38424
 
@@ -38478,9 +38478,9 @@ function (_Component) {
38478
38478
 
38479
38479
  _this = _possibleConstructorReturn(this, _getPrototypeOf(Form).call(this, props));
38480
38480
 
38481
- _defineProperty$1(_assertThisInitialized(_this), "getUsedFormData", function (formData, fields) {
38481
+ _defineProperty$2(_assertThisInitialized(_this), "getUsedFormData", function (formData, fields) {
38482
38482
  //for the case of a single input form
38483
- if (fields.length === 0 && _typeof(formData) !== "object") {
38483
+ if (fields.length === 0 && _typeof$1(formData) !== "object") {
38484
38484
  return formData;
38485
38485
  }
38486
38486
 
@@ -38495,13 +38495,13 @@ function (_Component) {
38495
38495
  return data;
38496
38496
  });
38497
38497
 
38498
- _defineProperty$1(_assertThisInitialized(_this), "getFieldNames", function (pathSchema, formData) {
38498
+ _defineProperty$2(_assertThisInitialized(_this), "getFieldNames", function (pathSchema, formData) {
38499
38499
  var getAllPaths = function getAllPaths(_obj) {
38500
38500
  var acc = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
38501
38501
  var paths = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [""];
38502
38502
 
38503
38503
  keys$3(_obj).forEach(function (key) {
38504
- if (_typeof(_obj[key]) === "object") {
38504
+ if (_typeof$1(_obj[key]) === "object") {
38505
38505
  var newPaths = paths.map(function (path) {
38506
38506
  return "".concat(path, ".").concat(key);
38507
38507
  }); // If an object is marked with additionalProperties, all its keys are valid
@@ -38519,7 +38519,7 @@ function (_Component) {
38519
38519
  // or an empty object/array
38520
38520
 
38521
38521
 
38522
- if (_typeof(formValue) !== "object" || isEmpty_1(formValue)) {
38522
+ if (_typeof$1(formValue) !== "object" || isEmpty_1(formValue)) {
38523
38523
  acc.push(path);
38524
38524
  }
38525
38525
  });
@@ -38532,7 +38532,7 @@ function (_Component) {
38532
38532
  return getAllPaths(pathSchema);
38533
38533
  });
38534
38534
 
38535
- _defineProperty$1(_assertThisInitialized(_this), "onChange", function (formData, newErrorSchema) {
38535
+ _defineProperty$2(_assertThisInitialized(_this), "onChange", function (formData, newErrorSchema) {
38536
38536
  if (isObject$1(formData) || isArray$2(formData)) {
38537
38537
  var newState = _this.getStateFromProps(_this.props, formData);
38538
38538
 
@@ -38592,7 +38592,7 @@ function (_Component) {
38592
38592
  });
38593
38593
  });
38594
38594
 
38595
- _defineProperty$1(_assertThisInitialized(_this), "onBlur", function () {
38595
+ _defineProperty$2(_assertThisInitialized(_this), "onBlur", function () {
38596
38596
  if (_this.props.onBlur) {
38597
38597
  var _this$props;
38598
38598
 
@@ -38600,7 +38600,7 @@ function (_Component) {
38600
38600
  }
38601
38601
  });
38602
38602
 
38603
- _defineProperty$1(_assertThisInitialized(_this), "onFocus", function () {
38603
+ _defineProperty$2(_assertThisInitialized(_this), "onFocus", function () {
38604
38604
  if (_this.props.onFocus) {
38605
38605
  var _this$props2;
38606
38606
 
@@ -38608,7 +38608,7 @@ function (_Component) {
38608
38608
  }
38609
38609
  });
38610
38610
 
38611
- _defineProperty$1(_assertThisInitialized(_this), "onSubmit", function (event) {
38611
+ _defineProperty$2(_assertThisInitialized(_this), "onSubmit", function (event) {
38612
38612
  event.preventDefault();
38613
38613
 
38614
38614
  if (event.target !== event.currentTarget) {
@@ -38928,7 +38928,7 @@ function (_Component) {
38928
38928
  return Form;
38929
38929
  }(react.Component);
38930
38930
 
38931
- _defineProperty$1(Form$1, "defaultProps", {
38931
+ _defineProperty$2(Form$1, "defaultProps", {
38932
38932
  uiSchema: {},
38933
38933
  noValidate: false,
38934
38934
  liveValidate: false,
@@ -38982,11 +38982,11 @@ var reactShadowDomRetargetEvents = function retargetEvents(shadowRoot) {
38982
38982
  }
38983
38983
 
38984
38984
  if (reactComponent && props) {
38985
- dispatchEvent(event, reactEventName, props);
38985
+ dispatchEvent$1(event, reactEventName, props);
38986
38986
  }
38987
38987
 
38988
38988
  if (reactComponent && props && mimickedReactEvents[reactEventName]) {
38989
- dispatchEvent(event, mimickedReactEvents[reactEventName], props);
38989
+ dispatchEvent$1(event, mimickedReactEvents[reactEventName], props);
38990
38990
  }
38991
38991
 
38992
38992
  if (event.cancelBubble) {
@@ -39036,7 +39036,7 @@ function findReactProps(component) {
39036
39036
 
39037
39037
  }
39038
39038
 
39039
- function dispatchEvent(event, eventType, componentProps) {
39039
+ function dispatchEvent$1(event, eventType, componentProps) {
39040
39040
  event.persist = function() {
39041
39041
  event.isPersistent = function(){ return true};
39042
39042
  };
@@ -39153,7 +39153,9 @@ function renderDescription(description) {
39153
39153
  if (!description) {
39154
39154
  return;
39155
39155
  }
39156
- return react.createElement('p', { className: 'mdc-typography mdc-typography--body1' }, description);
39156
+ return react.createElement('limel-markdown', {
39157
+ value: description,
39158
+ });
39157
39159
  }
39158
39160
  /**
39159
39161
  * Find a suitable title for a nested structure.
@@ -39284,31 +39286,28 @@ class CollapsibleItemTemplate extends react.Component {
39284
39286
  if (this.state.isOpen) {
39285
39287
  children = this.props.item.children;
39286
39288
  }
39289
+ const dragHandle = this.props.allowItemReorder
39290
+ ? react.createElement('limel-drag-handle', {
39291
+ slot: 'header',
39292
+ class: 'drag-handle',
39293
+ })
39294
+ : null;
39287
39295
  return react.createElement('limel-collapsible-section', {
39288
39296
  header: findTitle(data, schema, formSchema) || 'New item',
39289
- class: 'limel-form-array-item--object',
39297
+ class: 'array-item limel-form-array-item--object',
39290
39298
  ref: (section) => {
39291
39299
  this.section = section;
39292
39300
  },
39293
39301
  'is-open': this.state.isOpen,
39294
- }, children);
39302
+ 'data-reorder-id': String(this.props.index),
39303
+ 'data-reorderable': this.props.allowItemReorder
39304
+ ? 'true'
39305
+ : 'false',
39306
+ }, dragHandle, children);
39295
39307
  }
39296
39308
  setActions(element) {
39297
- const { item, index, allowItemRemoval, allowItemReorder } = this.props;
39309
+ const { item, index, allowItemRemoval } = this.props;
39298
39310
  const actions = [];
39299
- if (allowItemReorder) {
39300
- actions.push({
39301
- id: 'down',
39302
- icon: 'down_arrow',
39303
- disabled: !item.hasMoveDown,
39304
- run: item.onReorderClick(index, index + 1),
39305
- }, {
39306
- id: 'up',
39307
- icon: 'up_arrow',
39308
- disabled: !item.hasMoveUp,
39309
- run: item.onReorderClick(index, index - 1),
39310
- });
39311
- }
39312
39311
  if (allowItemRemoval) {
39313
39312
  actions.push({
39314
39313
  id: 'remove',
@@ -39343,14 +39342,6 @@ class SimpleItemTemplate extends react.Component {
39343
39342
  const { item, index } = this.props;
39344
39343
  item.onDropIndexClick(index)(event);
39345
39344
  };
39346
- this.handleMoveUp = (event) => {
39347
- const { item, index } = this.props;
39348
- item.onReorderClick(index, index - 1)(event);
39349
- };
39350
- this.handleMoveDown = (event) => {
39351
- const { item, index } = this.props;
39352
- item.onReorderClick(index, index + 1)(event);
39353
- };
39354
39345
  this.setRemoveButton = (button) => {
39355
39346
  if (this.removeButton) {
39356
39347
  this.removeButton.removeEventListener('click', this.handleRemove);
@@ -39360,39 +39351,30 @@ class SimpleItemTemplate extends react.Component {
39360
39351
  this.removeButton.addEventListener('click', this.handleRemove);
39361
39352
  }
39362
39353
  };
39363
- this.setMoveUpButton = (button) => {
39364
- if (this.moveUpButton) {
39365
- this.moveUpButton.removeEventListener('click', this.handleMoveUp);
39366
- }
39367
- this.moveUpButton = button || undefined;
39368
- if (this.moveUpButton) {
39369
- this.moveUpButton.addEventListener('click', this.handleMoveUp);
39370
- }
39371
- };
39372
- this.setMoveDownButton = (button) => {
39373
- if (this.moveDownButton) {
39374
- this.moveDownButton.removeEventListener('click', this.handleMoveDown);
39375
- }
39376
- this.moveDownButton = button || undefined;
39377
- if (this.moveDownButton) {
39378
- this.moveDownButton.addEventListener('click', this.handleMoveDown);
39379
- }
39380
- };
39381
39354
  }
39382
39355
  componentWillUnmount() {
39383
39356
  this.setRemoveButton(undefined);
39384
- this.setMoveUpButton(undefined);
39385
- this.setMoveDownButton(undefined);
39386
39357
  }
39387
39358
  render() {
39388
- const { item } = this.props;
39359
+ const { item, allowItemReorder } = this.props;
39389
39360
  return react.createElement('div', {
39390
- className: 'limel-form-array-item--simple',
39391
- }, this.props.item.children, this.props.allowItemReorder
39392
- ? this.renderMoveDownButton(item)
39393
- : null, this.props.allowItemReorder ? this.renderMoveUpButton(item) : null, this.props.allowItemRemoval ? this.renderRemoveButton(item) : null);
39361
+ className: 'array-item limel-form-array-item--simple',
39362
+ 'data-reorder-id': String(this.props.dataIndex),
39363
+ 'data-reorderable': allowItemReorder ? 'true' : 'false',
39364
+ }, this.props.item.children, this.renderRemoveButton(item), this.renderDragHandle());
39365
+ }
39366
+ renderDragHandle() {
39367
+ if (!this.props.allowItemReorder) {
39368
+ return;
39369
+ }
39370
+ return react.createElement('limel-drag-handle', {
39371
+ class: 'drag-handle',
39372
+ });
39394
39373
  }
39395
39374
  renderRemoveButton(item) {
39375
+ if (!this.props.allowItemRemoval) {
39376
+ return;
39377
+ }
39396
39378
  const props = {
39397
39379
  icon: 'trash',
39398
39380
  disabled: !item.hasRemove,
@@ -39400,33 +39382,2794 @@ class SimpleItemTemplate extends react.Component {
39400
39382
  };
39401
39383
  return react.createElement(LIMEL_ICON_BUTTON, props);
39402
39384
  }
39403
- renderMoveUpButton(item) {
39404
- const props = {
39405
- icon: 'up_arrow',
39406
- disabled: !item.hasMoveUp,
39407
- ref: this.setMoveUpButton,
39385
+ }
39386
+
39387
+ /**!
39388
+ * Sortable 1.15.6
39389
+ * @author RubaXa <trash@rubaxa.org>
39390
+ * @author owenm <owen23355@gmail.com>
39391
+ * @license MIT
39392
+ */
39393
+ function ownKeys(object, enumerableOnly) {
39394
+ var keys = Object.keys(object);
39395
+ if (Object.getOwnPropertySymbols) {
39396
+ var symbols = Object.getOwnPropertySymbols(object);
39397
+ if (enumerableOnly) {
39398
+ symbols = symbols.filter(function (sym) {
39399
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
39400
+ });
39401
+ }
39402
+ keys.push.apply(keys, symbols);
39403
+ }
39404
+ return keys;
39405
+ }
39406
+ function _objectSpread2(target) {
39407
+ for (var i = 1; i < arguments.length; i++) {
39408
+ var source = arguments[i] != null ? arguments[i] : {};
39409
+ if (i % 2) {
39410
+ ownKeys(Object(source), true).forEach(function (key) {
39411
+ _defineProperty(target, key, source[key]);
39412
+ });
39413
+ } else if (Object.getOwnPropertyDescriptors) {
39414
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
39415
+ } else {
39416
+ ownKeys(Object(source)).forEach(function (key) {
39417
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
39418
+ });
39419
+ }
39420
+ }
39421
+ return target;
39422
+ }
39423
+ function _typeof(obj) {
39424
+ "@babel/helpers - typeof";
39425
+
39426
+ if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
39427
+ _typeof = function (obj) {
39428
+ return typeof obj;
39429
+ };
39430
+ } else {
39431
+ _typeof = function (obj) {
39432
+ return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
39408
39433
  };
39409
- return react.createElement(LIMEL_ICON_BUTTON, props);
39410
39434
  }
39411
- renderMoveDownButton(item) {
39412
- const props = {
39413
- icon: 'down_arrow',
39414
- disabled: !item.hasMoveDown,
39415
- ref: this.setMoveDownButton,
39435
+ return _typeof(obj);
39436
+ }
39437
+ function _defineProperty(obj, key, value) {
39438
+ if (key in obj) {
39439
+ Object.defineProperty(obj, key, {
39440
+ value: value,
39441
+ enumerable: true,
39442
+ configurable: true,
39443
+ writable: true
39444
+ });
39445
+ } else {
39446
+ obj[key] = value;
39447
+ }
39448
+ return obj;
39449
+ }
39450
+ function _extends() {
39451
+ _extends = Object.assign || function (target) {
39452
+ for (var i = 1; i < arguments.length; i++) {
39453
+ var source = arguments[i];
39454
+ for (var key in source) {
39455
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
39456
+ target[key] = source[key];
39457
+ }
39458
+ }
39459
+ }
39460
+ return target;
39461
+ };
39462
+ return _extends.apply(this, arguments);
39463
+ }
39464
+ function _objectWithoutPropertiesLoose(source, excluded) {
39465
+ if (source == null) return {};
39466
+ var target = {};
39467
+ var sourceKeys = Object.keys(source);
39468
+ var key, i;
39469
+ for (i = 0; i < sourceKeys.length; i++) {
39470
+ key = sourceKeys[i];
39471
+ if (excluded.indexOf(key) >= 0) continue;
39472
+ target[key] = source[key];
39473
+ }
39474
+ return target;
39475
+ }
39476
+ function _objectWithoutProperties(source, excluded) {
39477
+ if (source == null) return {};
39478
+ var target = _objectWithoutPropertiesLoose(source, excluded);
39479
+ var key, i;
39480
+ if (Object.getOwnPropertySymbols) {
39481
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
39482
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
39483
+ key = sourceSymbolKeys[i];
39484
+ if (excluded.indexOf(key) >= 0) continue;
39485
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
39486
+ target[key] = source[key];
39487
+ }
39488
+ }
39489
+ return target;
39490
+ }
39491
+
39492
+ var version = "1.15.6";
39493
+
39494
+ function userAgent(pattern) {
39495
+ if (typeof window !== 'undefined' && window.navigator) {
39496
+ return !! /*@__PURE__*/navigator.userAgent.match(pattern);
39497
+ }
39498
+ }
39499
+ var IE11OrLess = userAgent(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i);
39500
+ var Edge = userAgent(/Edge/i);
39501
+ var FireFox = userAgent(/firefox/i);
39502
+ var Safari = userAgent(/safari/i) && !userAgent(/chrome/i) && !userAgent(/android/i);
39503
+ var IOS = userAgent(/iP(ad|od|hone)/i);
39504
+ var ChromeForAndroid = userAgent(/chrome/i) && userAgent(/android/i);
39505
+
39506
+ var captureMode = {
39507
+ capture: false,
39508
+ passive: false
39509
+ };
39510
+ function on(el, event, fn) {
39511
+ el.addEventListener(event, fn, !IE11OrLess && captureMode);
39512
+ }
39513
+ function off(el, event, fn) {
39514
+ el.removeEventListener(event, fn, !IE11OrLess && captureMode);
39515
+ }
39516
+ function matches( /**HTMLElement*/el, /**String*/selector) {
39517
+ if (!selector) return;
39518
+ selector[0] === '>' && (selector = selector.substring(1));
39519
+ if (el) {
39520
+ try {
39521
+ if (el.matches) {
39522
+ return el.matches(selector);
39523
+ } else if (el.msMatchesSelector) {
39524
+ return el.msMatchesSelector(selector);
39525
+ } else if (el.webkitMatchesSelector) {
39526
+ return el.webkitMatchesSelector(selector);
39527
+ }
39528
+ } catch (_) {
39529
+ return false;
39530
+ }
39531
+ }
39532
+ return false;
39533
+ }
39534
+ function getParentOrHost(el) {
39535
+ return el.host && el !== document && el.host.nodeType ? el.host : el.parentNode;
39536
+ }
39537
+ function closest( /**HTMLElement*/el, /**String*/selector, /**HTMLElement*/ctx, includeCTX) {
39538
+ if (el) {
39539
+ ctx = ctx || document;
39540
+ do {
39541
+ if (selector != null && (selector[0] === '>' ? el.parentNode === ctx && matches(el, selector) : matches(el, selector)) || includeCTX && el === ctx) {
39542
+ return el;
39543
+ }
39544
+ if (el === ctx) break;
39545
+ /* jshint boss:true */
39546
+ } while (el = getParentOrHost(el));
39547
+ }
39548
+ return null;
39549
+ }
39550
+ var R_SPACE = /\s+/g;
39551
+ function toggleClass(el, name, state) {
39552
+ if (el && name) {
39553
+ if (el.classList) {
39554
+ el.classList[state ? 'add' : 'remove'](name);
39555
+ } else {
39556
+ var className = (' ' + el.className + ' ').replace(R_SPACE, ' ').replace(' ' + name + ' ', ' ');
39557
+ el.className = (className + (state ? ' ' + name : '')).replace(R_SPACE, ' ');
39558
+ }
39559
+ }
39560
+ }
39561
+ function css(el, prop, val) {
39562
+ var style = el && el.style;
39563
+ if (style) {
39564
+ if (val === void 0) {
39565
+ if (document.defaultView && document.defaultView.getComputedStyle) {
39566
+ val = document.defaultView.getComputedStyle(el, '');
39567
+ } else if (el.currentStyle) {
39568
+ val = el.currentStyle;
39569
+ }
39570
+ return prop === void 0 ? val : val[prop];
39571
+ } else {
39572
+ if (!(prop in style) && prop.indexOf('webkit') === -1) {
39573
+ prop = '-webkit-' + prop;
39574
+ }
39575
+ style[prop] = val + (typeof val === 'string' ? '' : 'px');
39576
+ }
39577
+ }
39578
+ }
39579
+ function matrix(el, selfOnly) {
39580
+ var appliedTransforms = '';
39581
+ if (typeof el === 'string') {
39582
+ appliedTransforms = el;
39583
+ } else {
39584
+ do {
39585
+ var transform = css(el, 'transform');
39586
+ if (transform && transform !== 'none') {
39587
+ appliedTransforms = transform + ' ' + appliedTransforms;
39588
+ }
39589
+ /* jshint boss:true */
39590
+ } while (!selfOnly && (el = el.parentNode));
39591
+ }
39592
+ var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
39593
+ /*jshint -W056 */
39594
+ return matrixFn && new matrixFn(appliedTransforms);
39595
+ }
39596
+ function find(ctx, tagName, iterator) {
39597
+ if (ctx) {
39598
+ var list = ctx.getElementsByTagName(tagName),
39599
+ i = 0,
39600
+ n = list.length;
39601
+ if (iterator) {
39602
+ for (; i < n; i++) {
39603
+ iterator(list[i], i);
39604
+ }
39605
+ }
39606
+ return list;
39607
+ }
39608
+ return [];
39609
+ }
39610
+ function getWindowScrollingElement() {
39611
+ var scrollingElement = document.scrollingElement;
39612
+ if (scrollingElement) {
39613
+ return scrollingElement;
39614
+ } else {
39615
+ return document.documentElement;
39616
+ }
39617
+ }
39618
+
39619
+ /**
39620
+ * Returns the "bounding client rect" of given element
39621
+ * @param {HTMLElement} el The element whose boundingClientRect is wanted
39622
+ * @param {[Boolean]} relativeToContainingBlock Whether the rect should be relative to the containing block of (including) the container
39623
+ * @param {[Boolean]} relativeToNonStaticParent Whether the rect should be relative to the relative parent of (including) the contaienr
39624
+ * @param {[Boolean]} undoScale Whether the container's scale() should be undone
39625
+ * @param {[HTMLElement]} container The parent the element will be placed in
39626
+ * @return {Object} The boundingClientRect of el, with specified adjustments
39627
+ */
39628
+ function getRect(el, relativeToContainingBlock, relativeToNonStaticParent, undoScale, container) {
39629
+ if (!el.getBoundingClientRect && el !== window) return;
39630
+ var elRect, top, left, bottom, right, height, width;
39631
+ if (el !== window && el.parentNode && el !== getWindowScrollingElement()) {
39632
+ elRect = el.getBoundingClientRect();
39633
+ top = elRect.top;
39634
+ left = elRect.left;
39635
+ bottom = elRect.bottom;
39636
+ right = elRect.right;
39637
+ height = elRect.height;
39638
+ width = elRect.width;
39639
+ } else {
39640
+ top = 0;
39641
+ left = 0;
39642
+ bottom = window.innerHeight;
39643
+ right = window.innerWidth;
39644
+ height = window.innerHeight;
39645
+ width = window.innerWidth;
39646
+ }
39647
+ if ((relativeToContainingBlock || relativeToNonStaticParent) && el !== window) {
39648
+ // Adjust for translate()
39649
+ container = container || el.parentNode;
39650
+
39651
+ // solves #1123 (see: https://stackoverflow.com/a/37953806/6088312)
39652
+ // Not needed on <= IE11
39653
+ if (!IE11OrLess) {
39654
+ do {
39655
+ if (container && container.getBoundingClientRect && (css(container, 'transform') !== 'none' || relativeToNonStaticParent && css(container, 'position') !== 'static')) {
39656
+ var containerRect = container.getBoundingClientRect();
39657
+
39658
+ // Set relative to edges of padding box of container
39659
+ top -= containerRect.top + parseInt(css(container, 'border-top-width'));
39660
+ left -= containerRect.left + parseInt(css(container, 'border-left-width'));
39661
+ bottom = top + elRect.height;
39662
+ right = left + elRect.width;
39663
+ break;
39664
+ }
39665
+ /* jshint boss:true */
39666
+ } while (container = container.parentNode);
39667
+ }
39668
+ }
39669
+ if (undoScale && el !== window) {
39670
+ // Adjust for scale()
39671
+ var elMatrix = matrix(container || el),
39672
+ scaleX = elMatrix && elMatrix.a,
39673
+ scaleY = elMatrix && elMatrix.d;
39674
+ if (elMatrix) {
39675
+ top /= scaleY;
39676
+ left /= scaleX;
39677
+ width /= scaleX;
39678
+ height /= scaleY;
39679
+ bottom = top + height;
39680
+ right = left + width;
39681
+ }
39682
+ }
39683
+ return {
39684
+ top: top,
39685
+ left: left,
39686
+ bottom: bottom,
39687
+ right: right,
39688
+ width: width,
39689
+ height: height
39690
+ };
39691
+ }
39692
+
39693
+ /**
39694
+ * Checks if a side of an element is scrolled past a side of its parents
39695
+ * @param {HTMLElement} el The element who's side being scrolled out of view is in question
39696
+ * @param {String} elSide Side of the element in question ('top', 'left', 'right', 'bottom')
39697
+ * @param {String} parentSide Side of the parent in question ('top', 'left', 'right', 'bottom')
39698
+ * @return {HTMLElement} The parent scroll element that the el's side is scrolled past, or null if there is no such element
39699
+ */
39700
+ function isScrolledPast(el, elSide, parentSide) {
39701
+ var parent = getParentAutoScrollElement(el, true),
39702
+ elSideVal = getRect(el)[elSide];
39703
+
39704
+ /* jshint boss:true */
39705
+ while (parent) {
39706
+ var parentSideVal = getRect(parent)[parentSide],
39707
+ visible = void 0;
39708
+ if (parentSide === 'top' || parentSide === 'left') {
39709
+ visible = elSideVal >= parentSideVal;
39710
+ } else {
39711
+ visible = elSideVal <= parentSideVal;
39712
+ }
39713
+ if (!visible) return parent;
39714
+ if (parent === getWindowScrollingElement()) break;
39715
+ parent = getParentAutoScrollElement(parent, false);
39716
+ }
39717
+ return false;
39718
+ }
39719
+
39720
+ /**
39721
+ * Gets nth child of el, ignoring hidden children, sortable's elements (does not ignore clone if it's visible)
39722
+ * and non-draggable elements
39723
+ * @param {HTMLElement} el The parent element
39724
+ * @param {Number} childNum The index of the child
39725
+ * @param {Object} options Parent Sortable's options
39726
+ * @return {HTMLElement} The child at index childNum, or null if not found
39727
+ */
39728
+ function getChild(el, childNum, options, includeDragEl) {
39729
+ var currentChild = 0,
39730
+ i = 0,
39731
+ children = el.children;
39732
+ while (i < children.length) {
39733
+ if (children[i].style.display !== 'none' && children[i] !== Sortable.ghost && (includeDragEl || children[i] !== Sortable.dragged) && closest(children[i], options.draggable, el, false)) {
39734
+ if (currentChild === childNum) {
39735
+ return children[i];
39736
+ }
39737
+ currentChild++;
39738
+ }
39739
+ i++;
39740
+ }
39741
+ return null;
39742
+ }
39743
+
39744
+ /**
39745
+ * Gets the last child in the el, ignoring ghostEl or invisible elements (clones)
39746
+ * @param {HTMLElement} el Parent element
39747
+ * @param {selector} selector Any other elements that should be ignored
39748
+ * @return {HTMLElement} The last child, ignoring ghostEl
39749
+ */
39750
+ function lastChild(el, selector) {
39751
+ var last = el.lastElementChild;
39752
+ while (last && (last === Sortable.ghost || css(last, 'display') === 'none' || selector && !matches(last, selector))) {
39753
+ last = last.previousElementSibling;
39754
+ }
39755
+ return last || null;
39756
+ }
39757
+
39758
+ /**
39759
+ * Returns the index of an element within its parent for a selected set of
39760
+ * elements
39761
+ * @param {HTMLElement} el
39762
+ * @param {selector} selector
39763
+ * @return {number}
39764
+ */
39765
+ function index(el, selector) {
39766
+ var index = 0;
39767
+ if (!el || !el.parentNode) {
39768
+ return -1;
39769
+ }
39770
+
39771
+ /* jshint boss:true */
39772
+ while (el = el.previousElementSibling) {
39773
+ if (el.nodeName.toUpperCase() !== 'TEMPLATE' && el !== Sortable.clone && (!selector || matches(el, selector))) {
39774
+ index++;
39775
+ }
39776
+ }
39777
+ return index;
39778
+ }
39779
+
39780
+ /**
39781
+ * Returns the scroll offset of the given element, added with all the scroll offsets of parent elements.
39782
+ * The value is returned in real pixels.
39783
+ * @param {HTMLElement} el
39784
+ * @return {Array} Offsets in the format of [left, top]
39785
+ */
39786
+ function getRelativeScrollOffset(el) {
39787
+ var offsetLeft = 0,
39788
+ offsetTop = 0,
39789
+ winScroller = getWindowScrollingElement();
39790
+ if (el) {
39791
+ do {
39792
+ var elMatrix = matrix(el),
39793
+ scaleX = elMatrix.a,
39794
+ scaleY = elMatrix.d;
39795
+ offsetLeft += el.scrollLeft * scaleX;
39796
+ offsetTop += el.scrollTop * scaleY;
39797
+ } while (el !== winScroller && (el = el.parentNode));
39798
+ }
39799
+ return [offsetLeft, offsetTop];
39800
+ }
39801
+
39802
+ /**
39803
+ * Returns the index of the object within the given array
39804
+ * @param {Array} arr Array that may or may not hold the object
39805
+ * @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
39806
+ * @return {Number} The index of the object in the array, or -1
39807
+ */
39808
+ function indexOfObject(arr, obj) {
39809
+ for (var i in arr) {
39810
+ if (!arr.hasOwnProperty(i)) continue;
39811
+ for (var key in obj) {
39812
+ if (obj.hasOwnProperty(key) && obj[key] === arr[i][key]) return Number(i);
39813
+ }
39814
+ }
39815
+ return -1;
39816
+ }
39817
+ function getParentAutoScrollElement(el, includeSelf) {
39818
+ // skip to window
39819
+ if (!el || !el.getBoundingClientRect) return getWindowScrollingElement();
39820
+ var elem = el;
39821
+ var gotSelf = false;
39822
+ do {
39823
+ // we don't need to get elem css if it isn't even overflowing in the first place (performance)
39824
+ if (elem.clientWidth < elem.scrollWidth || elem.clientHeight < elem.scrollHeight) {
39825
+ var elemCSS = css(elem);
39826
+ if (elem.clientWidth < elem.scrollWidth && (elemCSS.overflowX == 'auto' || elemCSS.overflowX == 'scroll') || elem.clientHeight < elem.scrollHeight && (elemCSS.overflowY == 'auto' || elemCSS.overflowY == 'scroll')) {
39827
+ if (!elem.getBoundingClientRect || elem === document.body) return getWindowScrollingElement();
39828
+ if (gotSelf || includeSelf) return elem;
39829
+ gotSelf = true;
39830
+ }
39831
+ }
39832
+ /* jshint boss:true */
39833
+ } while (elem = elem.parentNode);
39834
+ return getWindowScrollingElement();
39835
+ }
39836
+ function extend(dst, src) {
39837
+ if (dst && src) {
39838
+ for (var key in src) {
39839
+ if (src.hasOwnProperty(key)) {
39840
+ dst[key] = src[key];
39841
+ }
39842
+ }
39843
+ }
39844
+ return dst;
39845
+ }
39846
+ function isRectEqual(rect1, rect2) {
39847
+ 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);
39848
+ }
39849
+ var _throttleTimeout;
39850
+ function throttle(callback, ms) {
39851
+ return function () {
39852
+ if (!_throttleTimeout) {
39853
+ var args = arguments,
39854
+ _this = this;
39855
+ if (args.length === 1) {
39856
+ callback.call(_this, args[0]);
39857
+ } else {
39858
+ callback.apply(_this, args);
39859
+ }
39860
+ _throttleTimeout = setTimeout(function () {
39861
+ _throttleTimeout = void 0;
39862
+ }, ms);
39863
+ }
39864
+ };
39865
+ }
39866
+ function cancelThrottle() {
39867
+ clearTimeout(_throttleTimeout);
39868
+ _throttleTimeout = void 0;
39869
+ }
39870
+ function scrollBy(el, x, y) {
39871
+ el.scrollLeft += x;
39872
+ el.scrollTop += y;
39873
+ }
39874
+ function clone(el) {
39875
+ var Polymer = window.Polymer;
39876
+ var $ = window.jQuery || window.Zepto;
39877
+ if (Polymer && Polymer.dom) {
39878
+ return Polymer.dom(el).cloneNode(true);
39879
+ } else if ($) {
39880
+ return $(el).clone(true)[0];
39881
+ } else {
39882
+ return el.cloneNode(true);
39883
+ }
39884
+ }
39885
+ function getChildContainingRectFromElement(container, options, ghostEl) {
39886
+ var rect = {};
39887
+ Array.from(container.children).forEach(function (child) {
39888
+ var _rect$left, _rect$top, _rect$right, _rect$bottom;
39889
+ if (!closest(child, options.draggable, container, false) || child.animated || child === ghostEl) return;
39890
+ var childRect = getRect(child);
39891
+ rect.left = Math.min((_rect$left = rect.left) !== null && _rect$left !== void 0 ? _rect$left : Infinity, childRect.left);
39892
+ rect.top = Math.min((_rect$top = rect.top) !== null && _rect$top !== void 0 ? _rect$top : Infinity, childRect.top);
39893
+ rect.right = Math.max((_rect$right = rect.right) !== null && _rect$right !== void 0 ? _rect$right : -Infinity, childRect.right);
39894
+ rect.bottom = Math.max((_rect$bottom = rect.bottom) !== null && _rect$bottom !== void 0 ? _rect$bottom : -Infinity, childRect.bottom);
39895
+ });
39896
+ rect.width = rect.right - rect.left;
39897
+ rect.height = rect.bottom - rect.top;
39898
+ rect.x = rect.left;
39899
+ rect.y = rect.top;
39900
+ return rect;
39901
+ }
39902
+ var expando = 'Sortable' + new Date().getTime();
39903
+
39904
+ function AnimationStateManager() {
39905
+ var animationStates = [],
39906
+ animationCallbackId;
39907
+ return {
39908
+ captureAnimationState: function captureAnimationState() {
39909
+ animationStates = [];
39910
+ if (!this.options.animation) return;
39911
+ var children = [].slice.call(this.el.children);
39912
+ children.forEach(function (child) {
39913
+ if (css(child, 'display') === 'none' || child === Sortable.ghost) return;
39914
+ animationStates.push({
39915
+ target: child,
39916
+ rect: getRect(child)
39917
+ });
39918
+ var fromRect = _objectSpread2({}, animationStates[animationStates.length - 1].rect);
39919
+
39920
+ // If animating: compensate for current animation
39921
+ if (child.thisAnimationDuration) {
39922
+ var childMatrix = matrix(child, true);
39923
+ if (childMatrix) {
39924
+ fromRect.top -= childMatrix.f;
39925
+ fromRect.left -= childMatrix.e;
39926
+ }
39927
+ }
39928
+ child.fromRect = fromRect;
39929
+ });
39930
+ },
39931
+ addAnimationState: function addAnimationState(state) {
39932
+ animationStates.push(state);
39933
+ },
39934
+ removeAnimationState: function removeAnimationState(target) {
39935
+ animationStates.splice(indexOfObject(animationStates, {
39936
+ target: target
39937
+ }), 1);
39938
+ },
39939
+ animateAll: function animateAll(callback) {
39940
+ var _this = this;
39941
+ if (!this.options.animation) {
39942
+ clearTimeout(animationCallbackId);
39943
+ if (typeof callback === 'function') callback();
39944
+ return;
39945
+ }
39946
+ var animating = false,
39947
+ animationTime = 0;
39948
+ animationStates.forEach(function (state) {
39949
+ var time = 0,
39950
+ target = state.target,
39951
+ fromRect = target.fromRect,
39952
+ toRect = getRect(target),
39953
+ prevFromRect = target.prevFromRect,
39954
+ prevToRect = target.prevToRect,
39955
+ animatingRect = state.rect,
39956
+ targetMatrix = matrix(target, true);
39957
+ if (targetMatrix) {
39958
+ // Compensate for current animation
39959
+ toRect.top -= targetMatrix.f;
39960
+ toRect.left -= targetMatrix.e;
39961
+ }
39962
+ target.toRect = toRect;
39963
+ if (target.thisAnimationDuration) {
39964
+ // Could also check if animatingRect is between fromRect and toRect
39965
+ if (isRectEqual(prevFromRect, toRect) && !isRectEqual(fromRect, toRect) &&
39966
+ // Make sure animatingRect is on line between toRect & fromRect
39967
+ (animatingRect.top - toRect.top) / (animatingRect.left - toRect.left) === (fromRect.top - toRect.top) / (fromRect.left - toRect.left)) {
39968
+ // If returning to same place as started from animation and on same axis
39969
+ time = calculateRealTime(animatingRect, prevFromRect, prevToRect, _this.options);
39970
+ }
39971
+ }
39972
+
39973
+ // if fromRect != toRect: animate
39974
+ if (!isRectEqual(toRect, fromRect)) {
39975
+ target.prevFromRect = fromRect;
39976
+ target.prevToRect = toRect;
39977
+ if (!time) {
39978
+ time = _this.options.animation;
39979
+ }
39980
+ _this.animate(target, animatingRect, toRect, time);
39981
+ }
39982
+ if (time) {
39983
+ animating = true;
39984
+ animationTime = Math.max(animationTime, time);
39985
+ clearTimeout(target.animationResetTimer);
39986
+ target.animationResetTimer = setTimeout(function () {
39987
+ target.animationTime = 0;
39988
+ target.prevFromRect = null;
39989
+ target.fromRect = null;
39990
+ target.prevToRect = null;
39991
+ target.thisAnimationDuration = null;
39992
+ }, time);
39993
+ target.thisAnimationDuration = time;
39994
+ }
39995
+ });
39996
+ clearTimeout(animationCallbackId);
39997
+ if (!animating) {
39998
+ if (typeof callback === 'function') callback();
39999
+ } else {
40000
+ animationCallbackId = setTimeout(function () {
40001
+ if (typeof callback === 'function') callback();
40002
+ }, animationTime);
40003
+ }
40004
+ animationStates = [];
40005
+ },
40006
+ animate: function animate(target, currentRect, toRect, duration) {
40007
+ if (duration) {
40008
+ css(target, 'transition', '');
40009
+ css(target, 'transform', '');
40010
+ var elMatrix = matrix(this.el),
40011
+ scaleX = elMatrix && elMatrix.a,
40012
+ scaleY = elMatrix && elMatrix.d,
40013
+ translateX = (currentRect.left - toRect.left) / (scaleX || 1),
40014
+ translateY = (currentRect.top - toRect.top) / (scaleY || 1);
40015
+ target.animatingX = !!translateX;
40016
+ target.animatingY = !!translateY;
40017
+ css(target, 'transform', 'translate3d(' + translateX + 'px,' + translateY + 'px,0)');
40018
+ this.forRepaintDummy = repaint(target); // repaint
40019
+
40020
+ css(target, 'transition', 'transform ' + duration + 'ms' + (this.options.easing ? ' ' + this.options.easing : ''));
40021
+ css(target, 'transform', 'translate3d(0,0,0)');
40022
+ typeof target.animated === 'number' && clearTimeout(target.animated);
40023
+ target.animated = setTimeout(function () {
40024
+ css(target, 'transition', '');
40025
+ css(target, 'transform', '');
40026
+ target.animated = false;
40027
+ target.animatingX = false;
40028
+ target.animatingY = false;
40029
+ }, duration);
40030
+ }
40031
+ }
40032
+ };
40033
+ }
40034
+ function repaint(target) {
40035
+ return target.offsetWidth;
40036
+ }
40037
+ function calculateRealTime(animatingRect, fromRect, toRect, options) {
40038
+ 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;
40039
+ }
40040
+
40041
+ var plugins = [];
40042
+ var defaults = {
40043
+ initializeByDefault: true
40044
+ };
40045
+ var PluginManager = {
40046
+ mount: function mount(plugin) {
40047
+ // Set default static properties
40048
+ for (var option in defaults) {
40049
+ if (defaults.hasOwnProperty(option) && !(option in plugin)) {
40050
+ plugin[option] = defaults[option];
40051
+ }
40052
+ }
40053
+ plugins.forEach(function (p) {
40054
+ if (p.pluginName === plugin.pluginName) {
40055
+ throw "Sortable: Cannot mount plugin ".concat(plugin.pluginName, " more than once");
40056
+ }
40057
+ });
40058
+ plugins.push(plugin);
40059
+ },
40060
+ pluginEvent: function pluginEvent(eventName, sortable, evt) {
40061
+ var _this = this;
40062
+ this.eventCanceled = false;
40063
+ evt.cancel = function () {
40064
+ _this.eventCanceled = true;
39416
40065
  };
39417
- return react.createElement(LIMEL_ICON_BUTTON, props);
40066
+ var eventNameGlobal = eventName + 'Global';
40067
+ plugins.forEach(function (plugin) {
40068
+ if (!sortable[plugin.pluginName]) return;
40069
+ // Fire global events if it exists in this sortable
40070
+ if (sortable[plugin.pluginName][eventNameGlobal]) {
40071
+ sortable[plugin.pluginName][eventNameGlobal](_objectSpread2({
40072
+ sortable: sortable
40073
+ }, evt));
40074
+ }
40075
+
40076
+ // Only fire plugin event if plugin is enabled in this sortable,
40077
+ // and plugin has event defined
40078
+ if (sortable.options[plugin.pluginName] && sortable[plugin.pluginName][eventName]) {
40079
+ sortable[plugin.pluginName][eventName](_objectSpread2({
40080
+ sortable: sortable
40081
+ }, evt));
40082
+ }
40083
+ });
40084
+ },
40085
+ initializePlugins: function initializePlugins(sortable, el, defaults, options) {
40086
+ plugins.forEach(function (plugin) {
40087
+ var pluginName = plugin.pluginName;
40088
+ if (!sortable.options[pluginName] && !plugin.initializeByDefault) return;
40089
+ var initialized = new plugin(sortable, el, sortable.options);
40090
+ initialized.sortable = sortable;
40091
+ initialized.options = sortable.options;
40092
+ sortable[pluginName] = initialized;
40093
+
40094
+ // Add default options from plugin
40095
+ _extends(defaults, initialized.defaults);
40096
+ });
40097
+ for (var option in sortable.options) {
40098
+ if (!sortable.options.hasOwnProperty(option)) continue;
40099
+ var modified = this.modifyOption(sortable, option, sortable.options[option]);
40100
+ if (typeof modified !== 'undefined') {
40101
+ sortable.options[option] = modified;
40102
+ }
40103
+ }
40104
+ },
40105
+ getEventProperties: function getEventProperties(name, sortable) {
40106
+ var eventProperties = {};
40107
+ plugins.forEach(function (plugin) {
40108
+ if (typeof plugin.eventProperties !== 'function') return;
40109
+ _extends(eventProperties, plugin.eventProperties.call(sortable[plugin.pluginName], name));
40110
+ });
40111
+ return eventProperties;
40112
+ },
40113
+ modifyOption: function modifyOption(sortable, name, value) {
40114
+ var modifiedValue;
40115
+ plugins.forEach(function (plugin) {
40116
+ // Plugin must exist on the Sortable
40117
+ if (!sortable[plugin.pluginName]) return;
40118
+
40119
+ // If static option listener exists for this option, call in the context of the Sortable's instance of this plugin
40120
+ if (plugin.optionListeners && typeof plugin.optionListeners[name] === 'function') {
40121
+ modifiedValue = plugin.optionListeners[name].call(sortable[plugin.pluginName], value);
40122
+ }
40123
+ });
40124
+ return modifiedValue;
40125
+ }
40126
+ };
40127
+
40128
+ function dispatchEvent(_ref) {
40129
+ var sortable = _ref.sortable,
40130
+ rootEl = _ref.rootEl,
40131
+ name = _ref.name,
40132
+ targetEl = _ref.targetEl,
40133
+ cloneEl = _ref.cloneEl,
40134
+ toEl = _ref.toEl,
40135
+ fromEl = _ref.fromEl,
40136
+ oldIndex = _ref.oldIndex,
40137
+ newIndex = _ref.newIndex,
40138
+ oldDraggableIndex = _ref.oldDraggableIndex,
40139
+ newDraggableIndex = _ref.newDraggableIndex,
40140
+ originalEvent = _ref.originalEvent,
40141
+ putSortable = _ref.putSortable,
40142
+ extraEventProperties = _ref.extraEventProperties;
40143
+ sortable = sortable || rootEl && rootEl[expando];
40144
+ if (!sortable) return;
40145
+ var evt,
40146
+ options = sortable.options,
40147
+ onName = 'on' + name.charAt(0).toUpperCase() + name.substr(1);
40148
+ // Support for new CustomEvent feature
40149
+ if (window.CustomEvent && !IE11OrLess && !Edge) {
40150
+ evt = new CustomEvent(name, {
40151
+ bubbles: true,
40152
+ cancelable: true
40153
+ });
40154
+ } else {
40155
+ evt = document.createEvent('Event');
40156
+ evt.initEvent(name, true, true);
40157
+ }
40158
+ evt.to = toEl || rootEl;
40159
+ evt.from = fromEl || rootEl;
40160
+ evt.item = targetEl || rootEl;
40161
+ evt.clone = cloneEl;
40162
+ evt.oldIndex = oldIndex;
40163
+ evt.newIndex = newIndex;
40164
+ evt.oldDraggableIndex = oldDraggableIndex;
40165
+ evt.newDraggableIndex = newDraggableIndex;
40166
+ evt.originalEvent = originalEvent;
40167
+ evt.pullMode = putSortable ? putSortable.lastPutMode : undefined;
40168
+ var allEventProperties = _objectSpread2(_objectSpread2({}, extraEventProperties), PluginManager.getEventProperties(name, sortable));
40169
+ for (var option in allEventProperties) {
40170
+ evt[option] = allEventProperties[option];
40171
+ }
40172
+ if (rootEl) {
40173
+ rootEl.dispatchEvent(evt);
40174
+ }
40175
+ if (options[onName]) {
40176
+ options[onName].call(sortable, evt);
40177
+ }
40178
+ }
40179
+
40180
+ var _excluded = ["evt"];
40181
+ var pluginEvent = function pluginEvent(eventName, sortable) {
40182
+ var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
40183
+ originalEvent = _ref.evt,
40184
+ data = _objectWithoutProperties(_ref, _excluded);
40185
+ PluginManager.pluginEvent.bind(Sortable)(eventName, sortable, _objectSpread2({
40186
+ dragEl: dragEl,
40187
+ parentEl: parentEl,
40188
+ ghostEl: ghostEl,
40189
+ rootEl: rootEl,
40190
+ nextEl: nextEl,
40191
+ lastDownEl: lastDownEl,
40192
+ cloneEl: cloneEl,
40193
+ cloneHidden: cloneHidden,
40194
+ dragStarted: moved,
40195
+ putSortable: putSortable,
40196
+ activeSortable: Sortable.active,
40197
+ originalEvent: originalEvent,
40198
+ oldIndex: oldIndex,
40199
+ oldDraggableIndex: oldDraggableIndex,
40200
+ newIndex: newIndex,
40201
+ newDraggableIndex: newDraggableIndex,
40202
+ hideGhostForTarget: _hideGhostForTarget,
40203
+ unhideGhostForTarget: _unhideGhostForTarget,
40204
+ cloneNowHidden: function cloneNowHidden() {
40205
+ cloneHidden = true;
40206
+ },
40207
+ cloneNowShown: function cloneNowShown() {
40208
+ cloneHidden = false;
40209
+ },
40210
+ dispatchSortableEvent: function dispatchSortableEvent(name) {
40211
+ _dispatchEvent({
40212
+ sortable: sortable,
40213
+ name: name,
40214
+ originalEvent: originalEvent
40215
+ });
40216
+ }
40217
+ }, data));
40218
+ };
40219
+ function _dispatchEvent(info) {
40220
+ dispatchEvent(_objectSpread2({
40221
+ putSortable: putSortable,
40222
+ cloneEl: cloneEl,
40223
+ targetEl: dragEl,
40224
+ rootEl: rootEl,
40225
+ oldIndex: oldIndex,
40226
+ oldDraggableIndex: oldDraggableIndex,
40227
+ newIndex: newIndex,
40228
+ newDraggableIndex: newDraggableIndex
40229
+ }, info));
40230
+ }
40231
+ var dragEl,
40232
+ parentEl,
40233
+ ghostEl,
40234
+ rootEl,
40235
+ nextEl,
40236
+ lastDownEl,
40237
+ cloneEl,
40238
+ cloneHidden,
40239
+ oldIndex,
40240
+ newIndex,
40241
+ oldDraggableIndex,
40242
+ newDraggableIndex,
40243
+ activeGroup,
40244
+ putSortable,
40245
+ awaitingDragStarted = false,
40246
+ ignoreNextClick = false,
40247
+ sortables = [],
40248
+ tapEvt,
40249
+ touchEvt,
40250
+ lastDx,
40251
+ lastDy,
40252
+ tapDistanceLeft,
40253
+ tapDistanceTop,
40254
+ moved,
40255
+ lastTarget,
40256
+ lastDirection,
40257
+ pastFirstInvertThresh = false,
40258
+ isCircumstantialInvert = false,
40259
+ targetMoveDistance,
40260
+ // For positioning ghost absolutely
40261
+ ghostRelativeParent,
40262
+ ghostRelativeParentInitialScroll = [],
40263
+ // (left, top)
40264
+
40265
+ _silent = false,
40266
+ savedInputChecked = [];
40267
+
40268
+ /** @const */
40269
+ var documentExists = typeof document !== 'undefined',
40270
+ PositionGhostAbsolutely = IOS,
40271
+ CSSFloatProperty = Edge || IE11OrLess ? 'cssFloat' : 'float',
40272
+ // This will not pass for IE9, because IE9 DnD only works on anchors
40273
+ supportDraggable = documentExists && !ChromeForAndroid && !IOS && 'draggable' in document.createElement('div'),
40274
+ supportCssPointerEvents = function () {
40275
+ if (!documentExists) return;
40276
+ // false when <= IE11
40277
+ if (IE11OrLess) {
40278
+ return false;
40279
+ }
40280
+ var el = document.createElement('x');
40281
+ el.style.cssText = 'pointer-events:auto';
40282
+ return el.style.pointerEvents === 'auto';
40283
+ }(),
40284
+ _detectDirection = function _detectDirection(el, options) {
40285
+ var elCSS = css(el),
40286
+ elWidth = parseInt(elCSS.width) - parseInt(elCSS.paddingLeft) - parseInt(elCSS.paddingRight) - parseInt(elCSS.borderLeftWidth) - parseInt(elCSS.borderRightWidth),
40287
+ child1 = getChild(el, 0, options),
40288
+ child2 = getChild(el, 1, options),
40289
+ firstChildCSS = child1 && css(child1),
40290
+ secondChildCSS = child2 && css(child2),
40291
+ firstChildWidth = firstChildCSS && parseInt(firstChildCSS.marginLeft) + parseInt(firstChildCSS.marginRight) + getRect(child1).width,
40292
+ secondChildWidth = secondChildCSS && parseInt(secondChildCSS.marginLeft) + parseInt(secondChildCSS.marginRight) + getRect(child2).width;
40293
+ if (elCSS.display === 'flex') {
40294
+ return elCSS.flexDirection === 'column' || elCSS.flexDirection === 'column-reverse' ? 'vertical' : 'horizontal';
40295
+ }
40296
+ if (elCSS.display === 'grid') {
40297
+ return elCSS.gridTemplateColumns.split(' ').length <= 1 ? 'vertical' : 'horizontal';
40298
+ }
40299
+ if (child1 && firstChildCSS["float"] && firstChildCSS["float"] !== 'none') {
40300
+ var touchingSideChild2 = firstChildCSS["float"] === 'left' ? 'left' : 'right';
40301
+ return child2 && (secondChildCSS.clear === 'both' || secondChildCSS.clear === touchingSideChild2) ? 'vertical' : 'horizontal';
40302
+ }
40303
+ 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';
40304
+ },
40305
+ _dragElInRowColumn = function _dragElInRowColumn(dragRect, targetRect, vertical) {
40306
+ var dragElS1Opp = vertical ? dragRect.left : dragRect.top,
40307
+ dragElS2Opp = vertical ? dragRect.right : dragRect.bottom,
40308
+ dragElOppLength = vertical ? dragRect.width : dragRect.height,
40309
+ targetS1Opp = vertical ? targetRect.left : targetRect.top,
40310
+ targetS2Opp = vertical ? targetRect.right : targetRect.bottom,
40311
+ targetOppLength = vertical ? targetRect.width : targetRect.height;
40312
+ return dragElS1Opp === targetS1Opp || dragElS2Opp === targetS2Opp || dragElS1Opp + dragElOppLength / 2 === targetS1Opp + targetOppLength / 2;
40313
+ },
40314
+ /**
40315
+ * Detects first nearest empty sortable to X and Y position using emptyInsertThreshold.
40316
+ * @param {Number} x X position
40317
+ * @param {Number} y Y position
40318
+ * @return {HTMLElement} Element of the first found nearest Sortable
40319
+ */
40320
+ _detectNearestEmptySortable = function _detectNearestEmptySortable(x, y) {
40321
+ var ret;
40322
+ sortables.some(function (sortable) {
40323
+ var threshold = sortable[expando].options.emptyInsertThreshold;
40324
+ if (!threshold || lastChild(sortable)) return;
40325
+ var rect = getRect(sortable),
40326
+ insideHorizontally = x >= rect.left - threshold && x <= rect.right + threshold,
40327
+ insideVertically = y >= rect.top - threshold && y <= rect.bottom + threshold;
40328
+ if (insideHorizontally && insideVertically) {
40329
+ return ret = sortable;
40330
+ }
40331
+ });
40332
+ return ret;
40333
+ },
40334
+ _prepareGroup = function _prepareGroup(options) {
40335
+ function toFn(value, pull) {
40336
+ return function (to, from, dragEl, evt) {
40337
+ var sameGroup = to.options.group.name && from.options.group.name && to.options.group.name === from.options.group.name;
40338
+ if (value == null && (pull || sameGroup)) {
40339
+ // Default pull value
40340
+ // Default pull and put value if same group
40341
+ return true;
40342
+ } else if (value == null || value === false) {
40343
+ return false;
40344
+ } else if (pull && value === 'clone') {
40345
+ return value;
40346
+ } else if (typeof value === 'function') {
40347
+ return toFn(value(to, from, dragEl, evt), pull)(to, from, dragEl, evt);
40348
+ } else {
40349
+ var otherGroup = (pull ? to : from).options.group.name;
40350
+ return value === true || typeof value === 'string' && value === otherGroup || value.join && value.indexOf(otherGroup) > -1;
40351
+ }
40352
+ };
40353
+ }
40354
+ var group = {};
40355
+ var originalGroup = options.group;
40356
+ if (!originalGroup || _typeof(originalGroup) != 'object') {
40357
+ originalGroup = {
40358
+ name: originalGroup
40359
+ };
40360
+ }
40361
+ group.name = originalGroup.name;
40362
+ group.checkPull = toFn(originalGroup.pull, true);
40363
+ group.checkPut = toFn(originalGroup.put);
40364
+ group.revertClone = originalGroup.revertClone;
40365
+ options.group = group;
40366
+ },
40367
+ _hideGhostForTarget = function _hideGhostForTarget() {
40368
+ if (!supportCssPointerEvents && ghostEl) {
40369
+ css(ghostEl, 'display', 'none');
40370
+ }
40371
+ },
40372
+ _unhideGhostForTarget = function _unhideGhostForTarget() {
40373
+ if (!supportCssPointerEvents && ghostEl) {
40374
+ css(ghostEl, 'display', '');
40375
+ }
40376
+ };
40377
+
40378
+ // #1184 fix - Prevent click event on fallback if dragged but item not changed position
40379
+ if (documentExists && !ChromeForAndroid) {
40380
+ document.addEventListener('click', function (evt) {
40381
+ if (ignoreNextClick) {
40382
+ evt.preventDefault();
40383
+ evt.stopPropagation && evt.stopPropagation();
40384
+ evt.stopImmediatePropagation && evt.stopImmediatePropagation();
40385
+ ignoreNextClick = false;
40386
+ return false;
40387
+ }
40388
+ }, true);
40389
+ }
40390
+ var nearestEmptyInsertDetectEvent = function nearestEmptyInsertDetectEvent(evt) {
40391
+ if (dragEl) {
40392
+ evt = evt.touches ? evt.touches[0] : evt;
40393
+ var nearest = _detectNearestEmptySortable(evt.clientX, evt.clientY);
40394
+ if (nearest) {
40395
+ // Create imitation event
40396
+ var event = {};
40397
+ for (var i in evt) {
40398
+ if (evt.hasOwnProperty(i)) {
40399
+ event[i] = evt[i];
40400
+ }
40401
+ }
40402
+ event.target = event.rootEl = nearest;
40403
+ event.preventDefault = void 0;
40404
+ event.stopPropagation = void 0;
40405
+ nearest[expando]._onDragOver(event);
40406
+ }
40407
+ }
40408
+ };
40409
+ var _checkOutsideTargetEl = function _checkOutsideTargetEl(evt) {
40410
+ if (dragEl) {
40411
+ dragEl.parentNode[expando]._isOutsideThisEl(evt.target);
40412
+ }
40413
+ };
40414
+
40415
+ /**
40416
+ * @class Sortable
40417
+ * @param {HTMLElement} el
40418
+ * @param {Object} [options]
40419
+ */
40420
+ function Sortable(el, options) {
40421
+ if (!(el && el.nodeType && el.nodeType === 1)) {
40422
+ throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(el));
40423
+ }
40424
+ this.el = el; // root element
40425
+ this.options = options = _extends({}, options);
40426
+
40427
+ // Export instance
40428
+ el[expando] = this;
40429
+ var defaults = {
40430
+ group: null,
40431
+ sort: true,
40432
+ disabled: false,
40433
+ store: null,
40434
+ handle: null,
40435
+ draggable: /^[uo]l$/i.test(el.nodeName) ? '>li' : '>*',
40436
+ swapThreshold: 1,
40437
+ // percentage; 0 <= x <= 1
40438
+ invertSwap: false,
40439
+ // invert always
40440
+ invertedSwapThreshold: null,
40441
+ // will be set to same as swapThreshold if default
40442
+ removeCloneOnHide: true,
40443
+ direction: function direction() {
40444
+ return _detectDirection(el, this.options);
40445
+ },
40446
+ ghostClass: 'sortable-ghost',
40447
+ chosenClass: 'sortable-chosen',
40448
+ dragClass: 'sortable-drag',
40449
+ ignore: 'a, img',
40450
+ filter: null,
40451
+ preventOnFilter: true,
40452
+ animation: 0,
40453
+ easing: null,
40454
+ setData: function setData(dataTransfer, dragEl) {
40455
+ dataTransfer.setData('Text', dragEl.textContent);
40456
+ },
40457
+ dropBubble: false,
40458
+ dragoverBubble: false,
40459
+ dataIdAttr: 'data-id',
40460
+ delay: 0,
40461
+ delayOnTouchOnly: false,
40462
+ touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,
40463
+ forceFallback: false,
40464
+ fallbackClass: 'sortable-fallback',
40465
+ fallbackOnBody: false,
40466
+ fallbackTolerance: 0,
40467
+ fallbackOffset: {
40468
+ x: 0,
40469
+ y: 0
40470
+ },
40471
+ // Disabled on Safari: #1571; Enabled on Safari IOS: #2244
40472
+ supportPointer: Sortable.supportPointer !== false && 'PointerEvent' in window && (!Safari || IOS),
40473
+ emptyInsertThreshold: 5
40474
+ };
40475
+ PluginManager.initializePlugins(this, el, defaults);
40476
+
40477
+ // Set default options
40478
+ for (var name in defaults) {
40479
+ !(name in options) && (options[name] = defaults[name]);
40480
+ }
40481
+ _prepareGroup(options);
40482
+
40483
+ // Bind all private methods
40484
+ for (var fn in this) {
40485
+ if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
40486
+ this[fn] = this[fn].bind(this);
40487
+ }
40488
+ }
40489
+
40490
+ // Setup drag mode
40491
+ this.nativeDraggable = options.forceFallback ? false : supportDraggable;
40492
+ if (this.nativeDraggable) {
40493
+ // Touch start threshold cannot be greater than the native dragstart threshold
40494
+ this.options.touchStartThreshold = 1;
40495
+ }
40496
+
40497
+ // Bind events
40498
+ if (options.supportPointer) {
40499
+ on(el, 'pointerdown', this._onTapStart);
40500
+ } else {
40501
+ on(el, 'mousedown', this._onTapStart);
40502
+ on(el, 'touchstart', this._onTapStart);
40503
+ }
40504
+ if (this.nativeDraggable) {
40505
+ on(el, 'dragover', this);
40506
+ on(el, 'dragenter', this);
40507
+ }
40508
+ sortables.push(this.el);
40509
+
40510
+ // Restore sorting
40511
+ options.store && options.store.get && this.sort(options.store.get(this) || []);
40512
+
40513
+ // Add animation state manager
40514
+ _extends(this, AnimationStateManager());
40515
+ }
40516
+ Sortable.prototype = /** @lends Sortable.prototype */{
40517
+ constructor: Sortable,
40518
+ _isOutsideThisEl: function _isOutsideThisEl(target) {
40519
+ if (!this.el.contains(target) && target !== this.el) {
40520
+ lastTarget = null;
40521
+ }
40522
+ },
40523
+ _getDirection: function _getDirection(evt, target) {
40524
+ return typeof this.options.direction === 'function' ? this.options.direction.call(this, evt, target, dragEl) : this.options.direction;
40525
+ },
40526
+ _onTapStart: function _onTapStart( /** Event|TouchEvent */evt) {
40527
+ if (!evt.cancelable) return;
40528
+ var _this = this,
40529
+ el = this.el,
40530
+ options = this.options,
40531
+ preventOnFilter = options.preventOnFilter,
40532
+ type = evt.type,
40533
+ touch = evt.touches && evt.touches[0] || evt.pointerType && evt.pointerType === 'touch' && evt,
40534
+ target = (touch || evt).target,
40535
+ originalTarget = evt.target.shadowRoot && (evt.path && evt.path[0] || evt.composedPath && evt.composedPath()[0]) || target,
40536
+ filter = options.filter;
40537
+ _saveInputCheckedState(el);
40538
+
40539
+ // Don't trigger start event when an element is been dragged, otherwise the evt.oldindex always wrong when set option.group.
40540
+ if (dragEl) {
40541
+ return;
40542
+ }
40543
+ if (/mousedown|pointerdown/.test(type) && evt.button !== 0 || options.disabled) {
40544
+ return; // only left button and enabled
40545
+ }
40546
+
40547
+ // cancel dnd if original target is content editable
40548
+ if (originalTarget.isContentEditable) {
40549
+ return;
40550
+ }
40551
+
40552
+ // Safari ignores further event handling after mousedown
40553
+ if (!this.nativeDraggable && Safari && target && target.tagName.toUpperCase() === 'SELECT') {
40554
+ return;
40555
+ }
40556
+ target = closest(target, options.draggable, el, false);
40557
+ if (target && target.animated) {
40558
+ return;
40559
+ }
40560
+ if (lastDownEl === target) {
40561
+ // Ignoring duplicate `down`
40562
+ return;
40563
+ }
40564
+
40565
+ // Get the index of the dragged element within its parent
40566
+ oldIndex = index(target);
40567
+ oldDraggableIndex = index(target, options.draggable);
40568
+
40569
+ // Check filter
40570
+ if (typeof filter === 'function') {
40571
+ if (filter.call(this, evt, target, this)) {
40572
+ _dispatchEvent({
40573
+ sortable: _this,
40574
+ rootEl: originalTarget,
40575
+ name: 'filter',
40576
+ targetEl: target,
40577
+ toEl: el,
40578
+ fromEl: el
40579
+ });
40580
+ pluginEvent('filter', _this, {
40581
+ evt: evt
40582
+ });
40583
+ preventOnFilter && evt.preventDefault();
40584
+ return; // cancel dnd
40585
+ }
40586
+ } else if (filter) {
40587
+ filter = filter.split(',').some(function (criteria) {
40588
+ criteria = closest(originalTarget, criteria.trim(), el, false);
40589
+ if (criteria) {
40590
+ _dispatchEvent({
40591
+ sortable: _this,
40592
+ rootEl: criteria,
40593
+ name: 'filter',
40594
+ targetEl: target,
40595
+ fromEl: el,
40596
+ toEl: el
40597
+ });
40598
+ pluginEvent('filter', _this, {
40599
+ evt: evt
40600
+ });
40601
+ return true;
40602
+ }
40603
+ });
40604
+ if (filter) {
40605
+ preventOnFilter && evt.preventDefault();
40606
+ return; // cancel dnd
40607
+ }
40608
+ }
40609
+ if (options.handle && !closest(originalTarget, options.handle, el, false)) {
40610
+ return;
40611
+ }
40612
+
40613
+ // Prepare `dragstart`
40614
+ this._prepareDragStart(evt, touch, target);
40615
+ },
40616
+ _prepareDragStart: function _prepareDragStart( /** Event */evt, /** Touch */touch, /** HTMLElement */target) {
40617
+ var _this = this,
40618
+ el = _this.el,
40619
+ options = _this.options,
40620
+ ownerDocument = el.ownerDocument,
40621
+ dragStartFn;
40622
+ if (target && !dragEl && target.parentNode === el) {
40623
+ var dragRect = getRect(target);
40624
+ rootEl = el;
40625
+ dragEl = target;
40626
+ parentEl = dragEl.parentNode;
40627
+ nextEl = dragEl.nextSibling;
40628
+ lastDownEl = target;
40629
+ activeGroup = options.group;
40630
+ Sortable.dragged = dragEl;
40631
+ tapEvt = {
40632
+ target: dragEl,
40633
+ clientX: (touch || evt).clientX,
40634
+ clientY: (touch || evt).clientY
40635
+ };
40636
+ tapDistanceLeft = tapEvt.clientX - dragRect.left;
40637
+ tapDistanceTop = tapEvt.clientY - dragRect.top;
40638
+ this._lastX = (touch || evt).clientX;
40639
+ this._lastY = (touch || evt).clientY;
40640
+ dragEl.style['will-change'] = 'all';
40641
+ dragStartFn = function dragStartFn() {
40642
+ pluginEvent('delayEnded', _this, {
40643
+ evt: evt
40644
+ });
40645
+ if (Sortable.eventCanceled) {
40646
+ _this._onDrop();
40647
+ return;
40648
+ }
40649
+ // Delayed drag has been triggered
40650
+ // we can re-enable the events: touchmove/mousemove
40651
+ _this._disableDelayedDragEvents();
40652
+ if (!FireFox && _this.nativeDraggable) {
40653
+ dragEl.draggable = true;
40654
+ }
40655
+
40656
+ // Bind the events: dragstart/dragend
40657
+ _this._triggerDragStart(evt, touch);
40658
+
40659
+ // Drag start event
40660
+ _dispatchEvent({
40661
+ sortable: _this,
40662
+ name: 'choose',
40663
+ originalEvent: evt
40664
+ });
40665
+
40666
+ // Chosen item
40667
+ toggleClass(dragEl, options.chosenClass, true);
40668
+ };
40669
+
40670
+ // Disable "draggable"
40671
+ options.ignore.split(',').forEach(function (criteria) {
40672
+ find(dragEl, criteria.trim(), _disableDraggable);
40673
+ });
40674
+ on(ownerDocument, 'dragover', nearestEmptyInsertDetectEvent);
40675
+ on(ownerDocument, 'mousemove', nearestEmptyInsertDetectEvent);
40676
+ on(ownerDocument, 'touchmove', nearestEmptyInsertDetectEvent);
40677
+ if (options.supportPointer) {
40678
+ on(ownerDocument, 'pointerup', _this._onDrop);
40679
+ // Native D&D triggers pointercancel
40680
+ !this.nativeDraggable && on(ownerDocument, 'pointercancel', _this._onDrop);
40681
+ } else {
40682
+ on(ownerDocument, 'mouseup', _this._onDrop);
40683
+ on(ownerDocument, 'touchend', _this._onDrop);
40684
+ on(ownerDocument, 'touchcancel', _this._onDrop);
40685
+ }
40686
+
40687
+ // Make dragEl draggable (must be before delay for FireFox)
40688
+ if (FireFox && this.nativeDraggable) {
40689
+ this.options.touchStartThreshold = 4;
40690
+ dragEl.draggable = true;
40691
+ }
40692
+ pluginEvent('delayStart', this, {
40693
+ evt: evt
40694
+ });
40695
+
40696
+ // Delay is impossible for native DnD in Edge or IE
40697
+ if (options.delay && (!options.delayOnTouchOnly || touch) && (!this.nativeDraggable || !(Edge || IE11OrLess))) {
40698
+ if (Sortable.eventCanceled) {
40699
+ this._onDrop();
40700
+ return;
40701
+ }
40702
+ // If the user moves the pointer or let go the click or touch
40703
+ // before the delay has been reached:
40704
+ // disable the delayed drag
40705
+ if (options.supportPointer) {
40706
+ on(ownerDocument, 'pointerup', _this._disableDelayedDrag);
40707
+ on(ownerDocument, 'pointercancel', _this._disableDelayedDrag);
40708
+ } else {
40709
+ on(ownerDocument, 'mouseup', _this._disableDelayedDrag);
40710
+ on(ownerDocument, 'touchend', _this._disableDelayedDrag);
40711
+ on(ownerDocument, 'touchcancel', _this._disableDelayedDrag);
40712
+ }
40713
+ on(ownerDocument, 'mousemove', _this._delayedDragTouchMoveHandler);
40714
+ on(ownerDocument, 'touchmove', _this._delayedDragTouchMoveHandler);
40715
+ options.supportPointer && on(ownerDocument, 'pointermove', _this._delayedDragTouchMoveHandler);
40716
+ _this._dragStartTimer = setTimeout(dragStartFn, options.delay);
40717
+ } else {
40718
+ dragStartFn();
40719
+ }
40720
+ }
40721
+ },
40722
+ _delayedDragTouchMoveHandler: function _delayedDragTouchMoveHandler( /** TouchEvent|PointerEvent **/e) {
40723
+ var touch = e.touches ? e.touches[0] : e;
40724
+ 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))) {
40725
+ this._disableDelayedDrag();
40726
+ }
40727
+ },
40728
+ _disableDelayedDrag: function _disableDelayedDrag() {
40729
+ dragEl && _disableDraggable(dragEl);
40730
+ clearTimeout(this._dragStartTimer);
40731
+ this._disableDelayedDragEvents();
40732
+ },
40733
+ _disableDelayedDragEvents: function _disableDelayedDragEvents() {
40734
+ var ownerDocument = this.el.ownerDocument;
40735
+ off(ownerDocument, 'mouseup', this._disableDelayedDrag);
40736
+ off(ownerDocument, 'touchend', this._disableDelayedDrag);
40737
+ off(ownerDocument, 'touchcancel', this._disableDelayedDrag);
40738
+ off(ownerDocument, 'pointerup', this._disableDelayedDrag);
40739
+ off(ownerDocument, 'pointercancel', this._disableDelayedDrag);
40740
+ off(ownerDocument, 'mousemove', this._delayedDragTouchMoveHandler);
40741
+ off(ownerDocument, 'touchmove', this._delayedDragTouchMoveHandler);
40742
+ off(ownerDocument, 'pointermove', this._delayedDragTouchMoveHandler);
40743
+ },
40744
+ _triggerDragStart: function _triggerDragStart( /** Event */evt, /** Touch */touch) {
40745
+ touch = touch || evt.pointerType == 'touch' && evt;
40746
+ if (!this.nativeDraggable || touch) {
40747
+ if (this.options.supportPointer) {
40748
+ on(document, 'pointermove', this._onTouchMove);
40749
+ } else if (touch) {
40750
+ on(document, 'touchmove', this._onTouchMove);
40751
+ } else {
40752
+ on(document, 'mousemove', this._onTouchMove);
40753
+ }
40754
+ } else {
40755
+ on(dragEl, 'dragend', this);
40756
+ on(rootEl, 'dragstart', this._onDragStart);
40757
+ }
40758
+ try {
40759
+ if (document.selection) {
40760
+ _nextTick(function () {
40761
+ document.selection.empty();
40762
+ });
40763
+ } else {
40764
+ window.getSelection().removeAllRanges();
40765
+ }
40766
+ } catch (err) {}
40767
+ },
40768
+ _dragStarted: function _dragStarted(fallback, evt) {
40769
+ awaitingDragStarted = false;
40770
+ if (rootEl && dragEl) {
40771
+ pluginEvent('dragStarted', this, {
40772
+ evt: evt
40773
+ });
40774
+ if (this.nativeDraggable) {
40775
+ on(document, 'dragover', _checkOutsideTargetEl);
40776
+ }
40777
+ var options = this.options;
40778
+
40779
+ // Apply effect
40780
+ !fallback && toggleClass(dragEl, options.dragClass, false);
40781
+ toggleClass(dragEl, options.ghostClass, true);
40782
+ Sortable.active = this;
40783
+ fallback && this._appendGhost();
40784
+
40785
+ // Drag start event
40786
+ _dispatchEvent({
40787
+ sortable: this,
40788
+ name: 'start',
40789
+ originalEvent: evt
40790
+ });
40791
+ } else {
40792
+ this._nulling();
40793
+ }
40794
+ },
40795
+ _emulateDragOver: function _emulateDragOver() {
40796
+ if (touchEvt) {
40797
+ this._lastX = touchEvt.clientX;
40798
+ this._lastY = touchEvt.clientY;
40799
+ _hideGhostForTarget();
40800
+ var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY);
40801
+ var parent = target;
40802
+ while (target && target.shadowRoot) {
40803
+ target = target.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY);
40804
+ if (target === parent) break;
40805
+ parent = target;
40806
+ }
40807
+ dragEl.parentNode[expando]._isOutsideThisEl(target);
40808
+ if (parent) {
40809
+ do {
40810
+ if (parent[expando]) {
40811
+ var inserted = void 0;
40812
+ inserted = parent[expando]._onDragOver({
40813
+ clientX: touchEvt.clientX,
40814
+ clientY: touchEvt.clientY,
40815
+ target: target,
40816
+ rootEl: parent
40817
+ });
40818
+ if (inserted && !this.options.dragoverBubble) {
40819
+ break;
40820
+ }
40821
+ }
40822
+ target = parent; // store last element
40823
+ }
40824
+ /* jshint boss:true */ while (parent = getParentOrHost(parent));
40825
+ }
40826
+ _unhideGhostForTarget();
40827
+ }
40828
+ },
40829
+ _onTouchMove: function _onTouchMove( /**TouchEvent*/evt) {
40830
+ if (tapEvt) {
40831
+ var options = this.options,
40832
+ fallbackTolerance = options.fallbackTolerance,
40833
+ fallbackOffset = options.fallbackOffset,
40834
+ touch = evt.touches ? evt.touches[0] : evt,
40835
+ ghostMatrix = ghostEl && matrix(ghostEl, true),
40836
+ scaleX = ghostEl && ghostMatrix && ghostMatrix.a,
40837
+ scaleY = ghostEl && ghostMatrix && ghostMatrix.d,
40838
+ relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent),
40839
+ dx = (touch.clientX - tapEvt.clientX + fallbackOffset.x) / (scaleX || 1) + (relativeScrollOffset ? relativeScrollOffset[0] - ghostRelativeParentInitialScroll[0] : 0) / (scaleX || 1),
40840
+ dy = (touch.clientY - tapEvt.clientY + fallbackOffset.y) / (scaleY || 1) + (relativeScrollOffset ? relativeScrollOffset[1] - ghostRelativeParentInitialScroll[1] : 0) / (scaleY || 1);
40841
+
40842
+ // only set the status to dragging, when we are actually dragging
40843
+ if (!Sortable.active && !awaitingDragStarted) {
40844
+ if (fallbackTolerance && Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) < fallbackTolerance) {
40845
+ return;
40846
+ }
40847
+ this._onDragStart(evt, true);
40848
+ }
40849
+ if (ghostEl) {
40850
+ if (ghostMatrix) {
40851
+ ghostMatrix.e += dx - (lastDx || 0);
40852
+ ghostMatrix.f += dy - (lastDy || 0);
40853
+ } else {
40854
+ ghostMatrix = {
40855
+ a: 1,
40856
+ b: 0,
40857
+ c: 0,
40858
+ d: 1,
40859
+ e: dx,
40860
+ f: dy
40861
+ };
40862
+ }
40863
+ var cssMatrix = "matrix(".concat(ghostMatrix.a, ",").concat(ghostMatrix.b, ",").concat(ghostMatrix.c, ",").concat(ghostMatrix.d, ",").concat(ghostMatrix.e, ",").concat(ghostMatrix.f, ")");
40864
+ css(ghostEl, 'webkitTransform', cssMatrix);
40865
+ css(ghostEl, 'mozTransform', cssMatrix);
40866
+ css(ghostEl, 'msTransform', cssMatrix);
40867
+ css(ghostEl, 'transform', cssMatrix);
40868
+ lastDx = dx;
40869
+ lastDy = dy;
40870
+ touchEvt = touch;
40871
+ }
40872
+ evt.cancelable && evt.preventDefault();
40873
+ }
40874
+ },
40875
+ _appendGhost: function _appendGhost() {
40876
+ // Bug if using scale(): https://stackoverflow.com/questions/2637058
40877
+ // Not being adjusted for
40878
+ if (!ghostEl) {
40879
+ var container = this.options.fallbackOnBody ? document.body : rootEl,
40880
+ rect = getRect(dragEl, true, PositionGhostAbsolutely, true, container),
40881
+ options = this.options;
40882
+
40883
+ // Position absolutely
40884
+ if (PositionGhostAbsolutely) {
40885
+ // Get relatively positioned parent
40886
+ ghostRelativeParent = container;
40887
+ while (css(ghostRelativeParent, 'position') === 'static' && css(ghostRelativeParent, 'transform') === 'none' && ghostRelativeParent !== document) {
40888
+ ghostRelativeParent = ghostRelativeParent.parentNode;
40889
+ }
40890
+ if (ghostRelativeParent !== document.body && ghostRelativeParent !== document.documentElement) {
40891
+ if (ghostRelativeParent === document) ghostRelativeParent = getWindowScrollingElement();
40892
+ rect.top += ghostRelativeParent.scrollTop;
40893
+ rect.left += ghostRelativeParent.scrollLeft;
40894
+ } else {
40895
+ ghostRelativeParent = getWindowScrollingElement();
40896
+ }
40897
+ ghostRelativeParentInitialScroll = getRelativeScrollOffset(ghostRelativeParent);
40898
+ }
40899
+ ghostEl = dragEl.cloneNode(true);
40900
+ toggleClass(ghostEl, options.ghostClass, false);
40901
+ toggleClass(ghostEl, options.fallbackClass, true);
40902
+ toggleClass(ghostEl, options.dragClass, true);
40903
+ css(ghostEl, 'transition', '');
40904
+ css(ghostEl, 'transform', '');
40905
+ css(ghostEl, 'box-sizing', 'border-box');
40906
+ css(ghostEl, 'margin', 0);
40907
+ css(ghostEl, 'top', rect.top);
40908
+ css(ghostEl, 'left', rect.left);
40909
+ css(ghostEl, 'width', rect.width);
40910
+ css(ghostEl, 'height', rect.height);
40911
+ css(ghostEl, 'opacity', '0.8');
40912
+ css(ghostEl, 'position', PositionGhostAbsolutely ? 'absolute' : 'fixed');
40913
+ css(ghostEl, 'zIndex', '100000');
40914
+ css(ghostEl, 'pointerEvents', 'none');
40915
+ Sortable.ghost = ghostEl;
40916
+ container.appendChild(ghostEl);
40917
+
40918
+ // Set transform-origin
40919
+ css(ghostEl, 'transform-origin', tapDistanceLeft / parseInt(ghostEl.style.width) * 100 + '% ' + tapDistanceTop / parseInt(ghostEl.style.height) * 100 + '%');
40920
+ }
40921
+ },
40922
+ _onDragStart: function _onDragStart( /**Event*/evt, /**boolean*/fallback) {
40923
+ var _this = this;
40924
+ var dataTransfer = evt.dataTransfer;
40925
+ var options = _this.options;
40926
+ pluginEvent('dragStart', this, {
40927
+ evt: evt
40928
+ });
40929
+ if (Sortable.eventCanceled) {
40930
+ this._onDrop();
40931
+ return;
40932
+ }
40933
+ pluginEvent('setupClone', this);
40934
+ if (!Sortable.eventCanceled) {
40935
+ cloneEl = clone(dragEl);
40936
+ cloneEl.removeAttribute("id");
40937
+ cloneEl.draggable = false;
40938
+ cloneEl.style['will-change'] = '';
40939
+ this._hideClone();
40940
+ toggleClass(cloneEl, this.options.chosenClass, false);
40941
+ Sortable.clone = cloneEl;
40942
+ }
40943
+
40944
+ // #1143: IFrame support workaround
40945
+ _this.cloneId = _nextTick(function () {
40946
+ pluginEvent('clone', _this);
40947
+ if (Sortable.eventCanceled) return;
40948
+ if (!_this.options.removeCloneOnHide) {
40949
+ rootEl.insertBefore(cloneEl, dragEl);
40950
+ }
40951
+ _this._hideClone();
40952
+ _dispatchEvent({
40953
+ sortable: _this,
40954
+ name: 'clone'
40955
+ });
40956
+ });
40957
+ !fallback && toggleClass(dragEl, options.dragClass, true);
40958
+
40959
+ // Set proper drop events
40960
+ if (fallback) {
40961
+ ignoreNextClick = true;
40962
+ _this._loopId = setInterval(_this._emulateDragOver, 50);
40963
+ } else {
40964
+ // Undo what was set in _prepareDragStart before drag started
40965
+ off(document, 'mouseup', _this._onDrop);
40966
+ off(document, 'touchend', _this._onDrop);
40967
+ off(document, 'touchcancel', _this._onDrop);
40968
+ if (dataTransfer) {
40969
+ dataTransfer.effectAllowed = 'move';
40970
+ options.setData && options.setData.call(_this, dataTransfer, dragEl);
40971
+ }
40972
+ on(document, 'drop', _this);
40973
+
40974
+ // #1276 fix:
40975
+ css(dragEl, 'transform', 'translateZ(0)');
40976
+ }
40977
+ awaitingDragStarted = true;
40978
+ _this._dragStartId = _nextTick(_this._dragStarted.bind(_this, fallback, evt));
40979
+ on(document, 'selectstart', _this);
40980
+ moved = true;
40981
+ window.getSelection().removeAllRanges();
40982
+ if (Safari) {
40983
+ css(document.body, 'user-select', 'none');
40984
+ }
40985
+ },
40986
+ // Returns true - if no further action is needed (either inserted or another condition)
40987
+ _onDragOver: function _onDragOver( /**Event*/evt) {
40988
+ var el = this.el,
40989
+ target = evt.target,
40990
+ dragRect,
40991
+ targetRect,
40992
+ revert,
40993
+ options = this.options,
40994
+ group = options.group,
40995
+ activeSortable = Sortable.active,
40996
+ isOwner = activeGroup === group,
40997
+ canSort = options.sort,
40998
+ fromSortable = putSortable || activeSortable,
40999
+ vertical,
41000
+ _this = this,
41001
+ completedFired = false;
41002
+ if (_silent) return;
41003
+ function dragOverEvent(name, extra) {
41004
+ pluginEvent(name, _this, _objectSpread2({
41005
+ evt: evt,
41006
+ isOwner: isOwner,
41007
+ axis: vertical ? 'vertical' : 'horizontal',
41008
+ revert: revert,
41009
+ dragRect: dragRect,
41010
+ targetRect: targetRect,
41011
+ canSort: canSort,
41012
+ fromSortable: fromSortable,
41013
+ target: target,
41014
+ completed: completed,
41015
+ onMove: function onMove(target, after) {
41016
+ return _onMove(rootEl, el, dragEl, dragRect, target, getRect(target), evt, after);
41017
+ },
41018
+ changed: changed
41019
+ }, extra));
41020
+ }
41021
+
41022
+ // Capture animation state
41023
+ function capture() {
41024
+ dragOverEvent('dragOverAnimationCapture');
41025
+ _this.captureAnimationState();
41026
+ if (_this !== fromSortable) {
41027
+ fromSortable.captureAnimationState();
41028
+ }
41029
+ }
41030
+
41031
+ // Return invocation when dragEl is inserted (or completed)
41032
+ function completed(insertion) {
41033
+ dragOverEvent('dragOverCompleted', {
41034
+ insertion: insertion
41035
+ });
41036
+ if (insertion) {
41037
+ // Clones must be hidden before folding animation to capture dragRectAbsolute properly
41038
+ if (isOwner) {
41039
+ activeSortable._hideClone();
41040
+ } else {
41041
+ activeSortable._showClone(_this);
41042
+ }
41043
+ if (_this !== fromSortable) {
41044
+ // Set ghost class to new sortable's ghost class
41045
+ toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : activeSortable.options.ghostClass, false);
41046
+ toggleClass(dragEl, options.ghostClass, true);
41047
+ }
41048
+ if (putSortable !== _this && _this !== Sortable.active) {
41049
+ putSortable = _this;
41050
+ } else if (_this === Sortable.active && putSortable) {
41051
+ putSortable = null;
41052
+ }
41053
+
41054
+ // Animation
41055
+ if (fromSortable === _this) {
41056
+ _this._ignoreWhileAnimating = target;
41057
+ }
41058
+ _this.animateAll(function () {
41059
+ dragOverEvent('dragOverAnimationComplete');
41060
+ _this._ignoreWhileAnimating = null;
41061
+ });
41062
+ if (_this !== fromSortable) {
41063
+ fromSortable.animateAll();
41064
+ fromSortable._ignoreWhileAnimating = null;
41065
+ }
41066
+ }
41067
+
41068
+ // Null lastTarget if it is not inside a previously swapped element
41069
+ if (target === dragEl && !dragEl.animated || target === el && !target.animated) {
41070
+ lastTarget = null;
41071
+ }
41072
+
41073
+ // no bubbling and not fallback
41074
+ if (!options.dragoverBubble && !evt.rootEl && target !== document) {
41075
+ dragEl.parentNode[expando]._isOutsideThisEl(evt.target);
41076
+
41077
+ // Do not detect for empty insert if already inserted
41078
+ !insertion && nearestEmptyInsertDetectEvent(evt);
41079
+ }
41080
+ !options.dragoverBubble && evt.stopPropagation && evt.stopPropagation();
41081
+ return completedFired = true;
41082
+ }
41083
+
41084
+ // Call when dragEl has been inserted
41085
+ function changed() {
41086
+ newIndex = index(dragEl);
41087
+ newDraggableIndex = index(dragEl, options.draggable);
41088
+ _dispatchEvent({
41089
+ sortable: _this,
41090
+ name: 'change',
41091
+ toEl: el,
41092
+ newIndex: newIndex,
41093
+ newDraggableIndex: newDraggableIndex,
41094
+ originalEvent: evt
41095
+ });
41096
+ }
41097
+ if (evt.preventDefault !== void 0) {
41098
+ evt.cancelable && evt.preventDefault();
41099
+ }
41100
+ target = closest(target, options.draggable, el, true);
41101
+ dragOverEvent('dragOver');
41102
+ if (Sortable.eventCanceled) return completedFired;
41103
+ if (dragEl.contains(evt.target) || target.animated && target.animatingX && target.animatingY || _this._ignoreWhileAnimating === target) {
41104
+ return completed(false);
41105
+ }
41106
+ ignoreNextClick = false;
41107
+ if (activeSortable && !options.disabled && (isOwner ? canSort || (revert = parentEl !== rootEl) // Reverting item into the original list
41108
+ : putSortable === this || (this.lastPutMode = activeGroup.checkPull(this, activeSortable, dragEl, evt)) && group.checkPut(this, activeSortable, dragEl, evt))) {
41109
+ vertical = this._getDirection(evt, target) === 'vertical';
41110
+ dragRect = getRect(dragEl);
41111
+ dragOverEvent('dragOverValid');
41112
+ if (Sortable.eventCanceled) return completedFired;
41113
+ if (revert) {
41114
+ parentEl = rootEl; // actualization
41115
+ capture();
41116
+ this._hideClone();
41117
+ dragOverEvent('revert');
41118
+ if (!Sortable.eventCanceled) {
41119
+ if (nextEl) {
41120
+ rootEl.insertBefore(dragEl, nextEl);
41121
+ } else {
41122
+ rootEl.appendChild(dragEl);
41123
+ }
41124
+ }
41125
+ return completed(true);
41126
+ }
41127
+ var elLastChild = lastChild(el, options.draggable);
41128
+ if (!elLastChild || _ghostIsLast(evt, vertical, this) && !elLastChild.animated) {
41129
+ // Insert to end of list
41130
+
41131
+ // If already at end of list: Do not insert
41132
+ if (elLastChild === dragEl) {
41133
+ return completed(false);
41134
+ }
41135
+
41136
+ // if there is a last element, it is the target
41137
+ if (elLastChild && el === evt.target) {
41138
+ target = elLastChild;
41139
+ }
41140
+ if (target) {
41141
+ targetRect = getRect(target);
41142
+ }
41143
+ if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, !!target) !== false) {
41144
+ capture();
41145
+ if (elLastChild && elLastChild.nextSibling) {
41146
+ // the last draggable element is not the last node
41147
+ el.insertBefore(dragEl, elLastChild.nextSibling);
41148
+ } else {
41149
+ el.appendChild(dragEl);
41150
+ }
41151
+ parentEl = el; // actualization
41152
+
41153
+ changed();
41154
+ return completed(true);
41155
+ }
41156
+ } else if (elLastChild && _ghostIsFirst(evt, vertical, this)) {
41157
+ // Insert to start of list
41158
+ var firstChild = getChild(el, 0, options, true);
41159
+ if (firstChild === dragEl) {
41160
+ return completed(false);
41161
+ }
41162
+ target = firstChild;
41163
+ targetRect = getRect(target);
41164
+ if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, false) !== false) {
41165
+ capture();
41166
+ el.insertBefore(dragEl, firstChild);
41167
+ parentEl = el; // actualization
41168
+
41169
+ changed();
41170
+ return completed(true);
41171
+ }
41172
+ } else if (target.parentNode === el) {
41173
+ targetRect = getRect(target);
41174
+ var direction = 0,
41175
+ targetBeforeFirstSwap,
41176
+ differentLevel = dragEl.parentNode !== el,
41177
+ differentRowCol = !_dragElInRowColumn(dragEl.animated && dragEl.toRect || dragRect, target.animated && target.toRect || targetRect, vertical),
41178
+ side1 = vertical ? 'top' : 'left',
41179
+ scrolledPastTop = isScrolledPast(target, 'top', 'top') || isScrolledPast(dragEl, 'top', 'top'),
41180
+ scrollBefore = scrolledPastTop ? scrolledPastTop.scrollTop : void 0;
41181
+ if (lastTarget !== target) {
41182
+ targetBeforeFirstSwap = targetRect[side1];
41183
+ pastFirstInvertThresh = false;
41184
+ isCircumstantialInvert = !differentRowCol && options.invertSwap || differentLevel;
41185
+ }
41186
+ direction = _getSwapDirection(evt, target, targetRect, vertical, differentRowCol ? 1 : options.swapThreshold, options.invertedSwapThreshold == null ? options.swapThreshold : options.invertedSwapThreshold, isCircumstantialInvert, lastTarget === target);
41187
+ var sibling;
41188
+ if (direction !== 0) {
41189
+ // Check if target is beside dragEl in respective direction (ignoring hidden elements)
41190
+ var dragIndex = index(dragEl);
41191
+ do {
41192
+ dragIndex -= direction;
41193
+ sibling = parentEl.children[dragIndex];
41194
+ } while (sibling && (css(sibling, 'display') === 'none' || sibling === ghostEl));
41195
+ }
41196
+ // If dragEl is already beside target: Do not insert
41197
+ if (direction === 0 || sibling === target) {
41198
+ return completed(false);
41199
+ }
41200
+ lastTarget = target;
41201
+ lastDirection = direction;
41202
+ var nextSibling = target.nextElementSibling,
41203
+ after = false;
41204
+ after = direction === 1;
41205
+ var moveVector = _onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, after);
41206
+ if (moveVector !== false) {
41207
+ if (moveVector === 1 || moveVector === -1) {
41208
+ after = moveVector === 1;
41209
+ }
41210
+ _silent = true;
41211
+ setTimeout(_unsilent, 30);
41212
+ capture();
41213
+ if (after && !nextSibling) {
41214
+ el.appendChild(dragEl);
41215
+ } else {
41216
+ target.parentNode.insertBefore(dragEl, after ? nextSibling : target);
41217
+ }
41218
+
41219
+ // Undo chrome's scroll adjustment (has no effect on other browsers)
41220
+ if (scrolledPastTop) {
41221
+ scrollBy(scrolledPastTop, 0, scrollBefore - scrolledPastTop.scrollTop);
41222
+ }
41223
+ parentEl = dragEl.parentNode; // actualization
41224
+
41225
+ // must be done before animation
41226
+ if (targetBeforeFirstSwap !== undefined && !isCircumstantialInvert) {
41227
+ targetMoveDistance = Math.abs(targetBeforeFirstSwap - getRect(target)[side1]);
41228
+ }
41229
+ changed();
41230
+ return completed(true);
41231
+ }
41232
+ }
41233
+ if (el.contains(dragEl)) {
41234
+ return completed(false);
41235
+ }
41236
+ }
41237
+ return false;
41238
+ },
41239
+ _ignoreWhileAnimating: null,
41240
+ _offMoveEvents: function _offMoveEvents() {
41241
+ off(document, 'mousemove', this._onTouchMove);
41242
+ off(document, 'touchmove', this._onTouchMove);
41243
+ off(document, 'pointermove', this._onTouchMove);
41244
+ off(document, 'dragover', nearestEmptyInsertDetectEvent);
41245
+ off(document, 'mousemove', nearestEmptyInsertDetectEvent);
41246
+ off(document, 'touchmove', nearestEmptyInsertDetectEvent);
41247
+ },
41248
+ _offUpEvents: function _offUpEvents() {
41249
+ var ownerDocument = this.el.ownerDocument;
41250
+ off(ownerDocument, 'mouseup', this._onDrop);
41251
+ off(ownerDocument, 'touchend', this._onDrop);
41252
+ off(ownerDocument, 'pointerup', this._onDrop);
41253
+ off(ownerDocument, 'pointercancel', this._onDrop);
41254
+ off(ownerDocument, 'touchcancel', this._onDrop);
41255
+ off(document, 'selectstart', this);
41256
+ },
41257
+ _onDrop: function _onDrop( /**Event*/evt) {
41258
+ var el = this.el,
41259
+ options = this.options;
41260
+
41261
+ // Get the index of the dragged element within its parent
41262
+ newIndex = index(dragEl);
41263
+ newDraggableIndex = index(dragEl, options.draggable);
41264
+ pluginEvent('drop', this, {
41265
+ evt: evt
41266
+ });
41267
+ parentEl = dragEl && dragEl.parentNode;
41268
+
41269
+ // Get again after plugin event
41270
+ newIndex = index(dragEl);
41271
+ newDraggableIndex = index(dragEl, options.draggable);
41272
+ if (Sortable.eventCanceled) {
41273
+ this._nulling();
41274
+ return;
41275
+ }
41276
+ awaitingDragStarted = false;
41277
+ isCircumstantialInvert = false;
41278
+ pastFirstInvertThresh = false;
41279
+ clearInterval(this._loopId);
41280
+ clearTimeout(this._dragStartTimer);
41281
+ _cancelNextTick(this.cloneId);
41282
+ _cancelNextTick(this._dragStartId);
41283
+
41284
+ // Unbind events
41285
+ if (this.nativeDraggable) {
41286
+ off(document, 'drop', this);
41287
+ off(el, 'dragstart', this._onDragStart);
41288
+ }
41289
+ this._offMoveEvents();
41290
+ this._offUpEvents();
41291
+ if (Safari) {
41292
+ css(document.body, 'user-select', '');
41293
+ }
41294
+ css(dragEl, 'transform', '');
41295
+ if (evt) {
41296
+ if (moved) {
41297
+ evt.cancelable && evt.preventDefault();
41298
+ !options.dropBubble && evt.stopPropagation();
41299
+ }
41300
+ ghostEl && ghostEl.parentNode && ghostEl.parentNode.removeChild(ghostEl);
41301
+ if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {
41302
+ // Remove clone(s)
41303
+ cloneEl && cloneEl.parentNode && cloneEl.parentNode.removeChild(cloneEl);
41304
+ }
41305
+ if (dragEl) {
41306
+ if (this.nativeDraggable) {
41307
+ off(dragEl, 'dragend', this);
41308
+ }
41309
+ _disableDraggable(dragEl);
41310
+ dragEl.style['will-change'] = '';
41311
+
41312
+ // Remove classes
41313
+ // ghostClass is added in dragStarted
41314
+ if (moved && !awaitingDragStarted) {
41315
+ toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : this.options.ghostClass, false);
41316
+ }
41317
+ toggleClass(dragEl, this.options.chosenClass, false);
41318
+
41319
+ // Drag stop event
41320
+ _dispatchEvent({
41321
+ sortable: this,
41322
+ name: 'unchoose',
41323
+ toEl: parentEl,
41324
+ newIndex: null,
41325
+ newDraggableIndex: null,
41326
+ originalEvent: evt
41327
+ });
41328
+ if (rootEl !== parentEl) {
41329
+ if (newIndex >= 0) {
41330
+ // Add event
41331
+ _dispatchEvent({
41332
+ rootEl: parentEl,
41333
+ name: 'add',
41334
+ toEl: parentEl,
41335
+ fromEl: rootEl,
41336
+ originalEvent: evt
41337
+ });
41338
+
41339
+ // Remove event
41340
+ _dispatchEvent({
41341
+ sortable: this,
41342
+ name: 'remove',
41343
+ toEl: parentEl,
41344
+ originalEvent: evt
41345
+ });
41346
+
41347
+ // drag from one list and drop into another
41348
+ _dispatchEvent({
41349
+ rootEl: parentEl,
41350
+ name: 'sort',
41351
+ toEl: parentEl,
41352
+ fromEl: rootEl,
41353
+ originalEvent: evt
41354
+ });
41355
+ _dispatchEvent({
41356
+ sortable: this,
41357
+ name: 'sort',
41358
+ toEl: parentEl,
41359
+ originalEvent: evt
41360
+ });
41361
+ }
41362
+ putSortable && putSortable.save();
41363
+ } else {
41364
+ if (newIndex !== oldIndex) {
41365
+ if (newIndex >= 0) {
41366
+ // drag & drop within the same list
41367
+ _dispatchEvent({
41368
+ sortable: this,
41369
+ name: 'update',
41370
+ toEl: parentEl,
41371
+ originalEvent: evt
41372
+ });
41373
+ _dispatchEvent({
41374
+ sortable: this,
41375
+ name: 'sort',
41376
+ toEl: parentEl,
41377
+ originalEvent: evt
41378
+ });
41379
+ }
41380
+ }
41381
+ }
41382
+ if (Sortable.active) {
41383
+ /* jshint eqnull:true */
41384
+ if (newIndex == null || newIndex === -1) {
41385
+ newIndex = oldIndex;
41386
+ newDraggableIndex = oldDraggableIndex;
41387
+ }
41388
+ _dispatchEvent({
41389
+ sortable: this,
41390
+ name: 'end',
41391
+ toEl: parentEl,
41392
+ originalEvent: evt
41393
+ });
41394
+
41395
+ // Save sorting
41396
+ this.save();
41397
+ }
41398
+ }
41399
+ }
41400
+ this._nulling();
41401
+ },
41402
+ _nulling: function _nulling() {
41403
+ pluginEvent('nulling', this);
41404
+ 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;
41405
+ savedInputChecked.forEach(function (el) {
41406
+ el.checked = true;
41407
+ });
41408
+ savedInputChecked.length = lastDx = lastDy = 0;
41409
+ },
41410
+ handleEvent: function handleEvent( /**Event*/evt) {
41411
+ switch (evt.type) {
41412
+ case 'drop':
41413
+ case 'dragend':
41414
+ this._onDrop(evt);
41415
+ break;
41416
+ case 'dragenter':
41417
+ case 'dragover':
41418
+ if (dragEl) {
41419
+ this._onDragOver(evt);
41420
+ _globalDragOver(evt);
41421
+ }
41422
+ break;
41423
+ case 'selectstart':
41424
+ evt.preventDefault();
41425
+ break;
41426
+ }
41427
+ },
41428
+ /**
41429
+ * Serializes the item into an array of string.
41430
+ * @returns {String[]}
41431
+ */
41432
+ toArray: function toArray() {
41433
+ var order = [],
41434
+ el,
41435
+ children = this.el.children,
41436
+ i = 0,
41437
+ n = children.length,
41438
+ options = this.options;
41439
+ for (; i < n; i++) {
41440
+ el = children[i];
41441
+ if (closest(el, options.draggable, this.el, false)) {
41442
+ order.push(el.getAttribute(options.dataIdAttr) || _generateId(el));
41443
+ }
41444
+ }
41445
+ return order;
41446
+ },
41447
+ /**
41448
+ * Sorts the elements according to the array.
41449
+ * @param {String[]} order order of the items
41450
+ */
41451
+ sort: function sort(order, useAnimation) {
41452
+ var items = {},
41453
+ rootEl = this.el;
41454
+ this.toArray().forEach(function (id, i) {
41455
+ var el = rootEl.children[i];
41456
+ if (closest(el, this.options.draggable, rootEl, false)) {
41457
+ items[id] = el;
41458
+ }
41459
+ }, this);
41460
+ useAnimation && this.captureAnimationState();
41461
+ order.forEach(function (id) {
41462
+ if (items[id]) {
41463
+ rootEl.removeChild(items[id]);
41464
+ rootEl.appendChild(items[id]);
41465
+ }
41466
+ });
41467
+ useAnimation && this.animateAll();
41468
+ },
41469
+ /**
41470
+ * Save the current sorting
41471
+ */
41472
+ save: function save() {
41473
+ var store = this.options.store;
41474
+ store && store.set && store.set(this);
41475
+ },
41476
+ /**
41477
+ * 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.
41478
+ * @param {HTMLElement} el
41479
+ * @param {String} [selector] default: `options.draggable`
41480
+ * @returns {HTMLElement|null}
41481
+ */
41482
+ closest: function closest$1(el, selector) {
41483
+ return closest(el, selector || this.options.draggable, this.el, false);
41484
+ },
41485
+ /**
41486
+ * Set/get option
41487
+ * @param {string} name
41488
+ * @param {*} [value]
41489
+ * @returns {*}
41490
+ */
41491
+ option: function option(name, value) {
41492
+ var options = this.options;
41493
+ if (value === void 0) {
41494
+ return options[name];
41495
+ } else {
41496
+ var modifiedValue = PluginManager.modifyOption(this, name, value);
41497
+ if (typeof modifiedValue !== 'undefined') {
41498
+ options[name] = modifiedValue;
41499
+ } else {
41500
+ options[name] = value;
41501
+ }
41502
+ if (name === 'group') {
41503
+ _prepareGroup(options);
41504
+ }
41505
+ }
41506
+ },
41507
+ /**
41508
+ * Destroy
41509
+ */
41510
+ destroy: function destroy() {
41511
+ pluginEvent('destroy', this);
41512
+ var el = this.el;
41513
+ el[expando] = null;
41514
+ off(el, 'mousedown', this._onTapStart);
41515
+ off(el, 'touchstart', this._onTapStart);
41516
+ off(el, 'pointerdown', this._onTapStart);
41517
+ if (this.nativeDraggable) {
41518
+ off(el, 'dragover', this);
41519
+ off(el, 'dragenter', this);
41520
+ }
41521
+ // Remove draggable attributes
41522
+ Array.prototype.forEach.call(el.querySelectorAll('[draggable]'), function (el) {
41523
+ el.removeAttribute('draggable');
41524
+ });
41525
+ this._onDrop();
41526
+ this._disableDelayedDragEvents();
41527
+ sortables.splice(sortables.indexOf(this.el), 1);
41528
+ this.el = el = null;
41529
+ },
41530
+ _hideClone: function _hideClone() {
41531
+ if (!cloneHidden) {
41532
+ pluginEvent('hideClone', this);
41533
+ if (Sortable.eventCanceled) return;
41534
+ css(cloneEl, 'display', 'none');
41535
+ if (this.options.removeCloneOnHide && cloneEl.parentNode) {
41536
+ cloneEl.parentNode.removeChild(cloneEl);
41537
+ }
41538
+ cloneHidden = true;
41539
+ }
41540
+ },
41541
+ _showClone: function _showClone(putSortable) {
41542
+ if (putSortable.lastPutMode !== 'clone') {
41543
+ this._hideClone();
41544
+ return;
41545
+ }
41546
+ if (cloneHidden) {
41547
+ pluginEvent('showClone', this);
41548
+ if (Sortable.eventCanceled) return;
41549
+
41550
+ // show clone at dragEl or original position
41551
+ if (dragEl.parentNode == rootEl && !this.options.group.revertClone) {
41552
+ rootEl.insertBefore(cloneEl, dragEl);
41553
+ } else if (nextEl) {
41554
+ rootEl.insertBefore(cloneEl, nextEl);
41555
+ } else {
41556
+ rootEl.appendChild(cloneEl);
41557
+ }
41558
+ if (this.options.group.revertClone) {
41559
+ this.animate(dragEl, cloneEl);
41560
+ }
41561
+ css(cloneEl, 'display', '');
41562
+ cloneHidden = false;
41563
+ }
41564
+ }
41565
+ };
41566
+ function _globalDragOver( /**Event*/evt) {
41567
+ if (evt.dataTransfer) {
41568
+ evt.dataTransfer.dropEffect = 'move';
41569
+ }
41570
+ evt.cancelable && evt.preventDefault();
41571
+ }
41572
+ function _onMove(fromEl, toEl, dragEl, dragRect, targetEl, targetRect, originalEvent, willInsertAfter) {
41573
+ var evt,
41574
+ sortable = fromEl[expando],
41575
+ onMoveFn = sortable.options.onMove,
41576
+ retVal;
41577
+ // Support for new CustomEvent feature
41578
+ if (window.CustomEvent && !IE11OrLess && !Edge) {
41579
+ evt = new CustomEvent('move', {
41580
+ bubbles: true,
41581
+ cancelable: true
41582
+ });
41583
+ } else {
41584
+ evt = document.createEvent('Event');
41585
+ evt.initEvent('move', true, true);
41586
+ }
41587
+ evt.to = toEl;
41588
+ evt.from = fromEl;
41589
+ evt.dragged = dragEl;
41590
+ evt.draggedRect = dragRect;
41591
+ evt.related = targetEl || toEl;
41592
+ evt.relatedRect = targetRect || getRect(toEl);
41593
+ evt.willInsertAfter = willInsertAfter;
41594
+ evt.originalEvent = originalEvent;
41595
+ fromEl.dispatchEvent(evt);
41596
+ if (onMoveFn) {
41597
+ retVal = onMoveFn.call(sortable, evt, originalEvent);
41598
+ }
41599
+ return retVal;
41600
+ }
41601
+ function _disableDraggable(el) {
41602
+ el.draggable = false;
41603
+ }
41604
+ function _unsilent() {
41605
+ _silent = false;
41606
+ }
41607
+ function _ghostIsFirst(evt, vertical, sortable) {
41608
+ var firstElRect = getRect(getChild(sortable.el, 0, sortable.options, true));
41609
+ var childContainingRect = getChildContainingRectFromElement(sortable.el, sortable.options, ghostEl);
41610
+ var spacer = 10;
41611
+ return vertical ? evt.clientX < childContainingRect.left - spacer || evt.clientY < firstElRect.top && evt.clientX < firstElRect.right : evt.clientY < childContainingRect.top - spacer || evt.clientY < firstElRect.bottom && evt.clientX < firstElRect.left;
41612
+ }
41613
+ function _ghostIsLast(evt, vertical, sortable) {
41614
+ var lastElRect = getRect(lastChild(sortable.el, sortable.options.draggable));
41615
+ var childContainingRect = getChildContainingRectFromElement(sortable.el, sortable.options, ghostEl);
41616
+ var spacer = 10;
41617
+ return vertical ? evt.clientX > childContainingRect.right + spacer || evt.clientY > lastElRect.bottom && evt.clientX > lastElRect.left : evt.clientY > childContainingRect.bottom + spacer || evt.clientX > lastElRect.right && evt.clientY > lastElRect.top;
41618
+ }
41619
+ function _getSwapDirection(evt, target, targetRect, vertical, swapThreshold, invertedSwapThreshold, invertSwap, isLastTarget) {
41620
+ var mouseOnAxis = vertical ? evt.clientY : evt.clientX,
41621
+ targetLength = vertical ? targetRect.height : targetRect.width,
41622
+ targetS1 = vertical ? targetRect.top : targetRect.left,
41623
+ targetS2 = vertical ? targetRect.bottom : targetRect.right,
41624
+ invert = false;
41625
+ if (!invertSwap) {
41626
+ // Never invert or create dragEl shadow when target movemenet causes mouse to move past the end of regular swapThreshold
41627
+ if (isLastTarget && targetMoveDistance < targetLength * swapThreshold) {
41628
+ // multiplied only by swapThreshold because mouse will already be inside target by (1 - threshold) * targetLength / 2
41629
+ // check if past first invert threshold on side opposite of lastDirection
41630
+ if (!pastFirstInvertThresh && (lastDirection === 1 ? mouseOnAxis > targetS1 + targetLength * invertedSwapThreshold / 2 : mouseOnAxis < targetS2 - targetLength * invertedSwapThreshold / 2)) {
41631
+ // past first invert threshold, do not restrict inverted threshold to dragEl shadow
41632
+ pastFirstInvertThresh = true;
41633
+ }
41634
+ if (!pastFirstInvertThresh) {
41635
+ // dragEl shadow (target move distance shadow)
41636
+ if (lastDirection === 1 ? mouseOnAxis < targetS1 + targetMoveDistance // over dragEl shadow
41637
+ : mouseOnAxis > targetS2 - targetMoveDistance) {
41638
+ return -lastDirection;
41639
+ }
41640
+ } else {
41641
+ invert = true;
41642
+ }
41643
+ } else {
41644
+ // Regular
41645
+ if (mouseOnAxis > targetS1 + targetLength * (1 - swapThreshold) / 2 && mouseOnAxis < targetS2 - targetLength * (1 - swapThreshold) / 2) {
41646
+ return _getInsertDirection(target);
41647
+ }
41648
+ }
41649
+ }
41650
+ invert = invert || invertSwap;
41651
+ if (invert) {
41652
+ // Invert of regular
41653
+ if (mouseOnAxis < targetS1 + targetLength * invertedSwapThreshold / 2 || mouseOnAxis > targetS2 - targetLength * invertedSwapThreshold / 2) {
41654
+ return mouseOnAxis > targetS1 + targetLength / 2 ? 1 : -1;
41655
+ }
39418
41656
  }
41657
+ return 0;
39419
41658
  }
39420
41659
 
41660
+ /**
41661
+ * Gets the direction dragEl must be swapped relative to target in order to make it
41662
+ * seem that dragEl has been "inserted" into that element's position
41663
+ * @param {HTMLElement} target The target whose position dragEl is being inserted at
41664
+ * @return {Number} Direction dragEl must be swapped
41665
+ */
41666
+ function _getInsertDirection(target) {
41667
+ if (index(dragEl) < index(target)) {
41668
+ return 1;
41669
+ } else {
41670
+ return -1;
41671
+ }
41672
+ }
41673
+
41674
+ /**
41675
+ * Generate id
41676
+ * @param {HTMLElement} el
41677
+ * @returns {String}
41678
+ * @private
41679
+ */
41680
+ function _generateId(el) {
41681
+ var str = el.tagName + el.className + el.src + el.href + el.textContent,
41682
+ i = str.length,
41683
+ sum = 0;
41684
+ while (i--) {
41685
+ sum += str.charCodeAt(i);
41686
+ }
41687
+ return sum.toString(36);
41688
+ }
41689
+ function _saveInputCheckedState(root) {
41690
+ savedInputChecked.length = 0;
41691
+ var inputs = root.getElementsByTagName('input');
41692
+ var idx = inputs.length;
41693
+ while (idx--) {
41694
+ var el = inputs[idx];
41695
+ el.checked && savedInputChecked.push(el);
41696
+ }
41697
+ }
41698
+ function _nextTick(fn) {
41699
+ return setTimeout(fn, 0);
41700
+ }
41701
+ function _cancelNextTick(id) {
41702
+ return clearTimeout(id);
41703
+ }
41704
+
41705
+ // Fixed #973:
41706
+ if (documentExists) {
41707
+ on(document, 'touchmove', function (evt) {
41708
+ if ((Sortable.active || awaitingDragStarted) && evt.cancelable) {
41709
+ evt.preventDefault();
41710
+ }
41711
+ });
41712
+ }
41713
+
41714
+ // Export utils
41715
+ Sortable.utils = {
41716
+ on: on,
41717
+ off: off,
41718
+ css: css,
41719
+ find: find,
41720
+ is: function is(el, selector) {
41721
+ return !!closest(el, selector, el, false);
41722
+ },
41723
+ extend: extend,
41724
+ throttle: throttle,
41725
+ closest: closest,
41726
+ toggleClass: toggleClass,
41727
+ clone: clone,
41728
+ index: index,
41729
+ nextTick: _nextTick,
41730
+ cancelNextTick: _cancelNextTick,
41731
+ detectDirection: _detectDirection,
41732
+ getChild: getChild,
41733
+ expando: expando
41734
+ };
41735
+
41736
+ /**
41737
+ * Get the Sortable instance of an element
41738
+ * @param {HTMLElement} element The element
41739
+ * @return {Sortable|undefined} The instance of Sortable
41740
+ */
41741
+ Sortable.get = function (element) {
41742
+ return element[expando];
41743
+ };
41744
+
41745
+ /**
41746
+ * Mount a plugin to Sortable
41747
+ * @param {...SortablePlugin|SortablePlugin[]} plugins Plugins being mounted
41748
+ */
41749
+ Sortable.mount = function () {
41750
+ for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) {
41751
+ plugins[_key] = arguments[_key];
41752
+ }
41753
+ if (plugins[0].constructor === Array) plugins = plugins[0];
41754
+ plugins.forEach(function (plugin) {
41755
+ if (!plugin.prototype || !plugin.prototype.constructor) {
41756
+ throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(plugin));
41757
+ }
41758
+ if (plugin.utils) Sortable.utils = _objectSpread2(_objectSpread2({}, Sortable.utils), plugin.utils);
41759
+ PluginManager.mount(plugin);
41760
+ });
41761
+ };
41762
+
41763
+ /**
41764
+ * Create sortable instance
41765
+ * @param {HTMLElement} el
41766
+ * @param {Object} [options]
41767
+ */
41768
+ Sortable.create = function (el, options) {
41769
+ return new Sortable(el, options);
41770
+ };
41771
+
41772
+ // Export
41773
+ Sortable.version = version;
41774
+
41775
+ var autoScrolls = [],
41776
+ scrollEl,
41777
+ scrollRootEl,
41778
+ scrolling = false,
41779
+ lastAutoScrollX,
41780
+ lastAutoScrollY,
41781
+ touchEvt$1,
41782
+ pointerElemChangedInterval;
41783
+ function AutoScrollPlugin() {
41784
+ function AutoScroll() {
41785
+ this.defaults = {
41786
+ scroll: true,
41787
+ forceAutoScrollFallback: false,
41788
+ scrollSensitivity: 30,
41789
+ scrollSpeed: 10,
41790
+ bubbleScroll: true
41791
+ };
41792
+
41793
+ // Bind all private methods
41794
+ for (var fn in this) {
41795
+ if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
41796
+ this[fn] = this[fn].bind(this);
41797
+ }
41798
+ }
41799
+ }
41800
+ AutoScroll.prototype = {
41801
+ dragStarted: function dragStarted(_ref) {
41802
+ var originalEvent = _ref.originalEvent;
41803
+ if (this.sortable.nativeDraggable) {
41804
+ on(document, 'dragover', this._handleAutoScroll);
41805
+ } else {
41806
+ if (this.options.supportPointer) {
41807
+ on(document, 'pointermove', this._handleFallbackAutoScroll);
41808
+ } else if (originalEvent.touches) {
41809
+ on(document, 'touchmove', this._handleFallbackAutoScroll);
41810
+ } else {
41811
+ on(document, 'mousemove', this._handleFallbackAutoScroll);
41812
+ }
41813
+ }
41814
+ },
41815
+ dragOverCompleted: function dragOverCompleted(_ref2) {
41816
+ var originalEvent = _ref2.originalEvent;
41817
+ // For when bubbling is canceled and using fallback (fallback 'touchmove' always reached)
41818
+ if (!this.options.dragOverBubble && !originalEvent.rootEl) {
41819
+ this._handleAutoScroll(originalEvent);
41820
+ }
41821
+ },
41822
+ drop: function drop() {
41823
+ if (this.sortable.nativeDraggable) {
41824
+ off(document, 'dragover', this._handleAutoScroll);
41825
+ } else {
41826
+ off(document, 'pointermove', this._handleFallbackAutoScroll);
41827
+ off(document, 'touchmove', this._handleFallbackAutoScroll);
41828
+ off(document, 'mousemove', this._handleFallbackAutoScroll);
41829
+ }
41830
+ clearPointerElemChangedInterval();
41831
+ clearAutoScrolls();
41832
+ cancelThrottle();
41833
+ },
41834
+ nulling: function nulling() {
41835
+ touchEvt$1 = scrollRootEl = scrollEl = scrolling = pointerElemChangedInterval = lastAutoScrollX = lastAutoScrollY = null;
41836
+ autoScrolls.length = 0;
41837
+ },
41838
+ _handleFallbackAutoScroll: function _handleFallbackAutoScroll(evt) {
41839
+ this._handleAutoScroll(evt, true);
41840
+ },
41841
+ _handleAutoScroll: function _handleAutoScroll(evt, fallback) {
41842
+ var _this = this;
41843
+ var x = (evt.touches ? evt.touches[0] : evt).clientX,
41844
+ y = (evt.touches ? evt.touches[0] : evt).clientY,
41845
+ elem = document.elementFromPoint(x, y);
41846
+ touchEvt$1 = evt;
41847
+
41848
+ // IE does not seem to have native autoscroll,
41849
+ // Edge's autoscroll seems too conditional,
41850
+ // MACOS Safari does not have autoscroll,
41851
+ // Firefox and Chrome are good
41852
+ if (fallback || this.options.forceAutoScrollFallback || Edge || IE11OrLess || Safari) {
41853
+ autoScroll(evt, this.options, elem, fallback);
41854
+
41855
+ // Listener for pointer element change
41856
+ var ogElemScroller = getParentAutoScrollElement(elem, true);
41857
+ if (scrolling && (!pointerElemChangedInterval || x !== lastAutoScrollX || y !== lastAutoScrollY)) {
41858
+ pointerElemChangedInterval && clearPointerElemChangedInterval();
41859
+ // Detect for pointer elem change, emulating native DnD behaviour
41860
+ pointerElemChangedInterval = setInterval(function () {
41861
+ var newElem = getParentAutoScrollElement(document.elementFromPoint(x, y), true);
41862
+ if (newElem !== ogElemScroller) {
41863
+ ogElemScroller = newElem;
41864
+ clearAutoScrolls();
41865
+ }
41866
+ autoScroll(evt, _this.options, newElem, fallback);
41867
+ }, 10);
41868
+ lastAutoScrollX = x;
41869
+ lastAutoScrollY = y;
41870
+ }
41871
+ } else {
41872
+ // if DnD is enabled (and browser has good autoscrolling), first autoscroll will already scroll, so get parent autoscroll of first autoscroll
41873
+ if (!this.options.bubbleScroll || getParentAutoScrollElement(elem, true) === getWindowScrollingElement()) {
41874
+ clearAutoScrolls();
41875
+ return;
41876
+ }
41877
+ autoScroll(evt, this.options, getParentAutoScrollElement(elem, false), false);
41878
+ }
41879
+ }
41880
+ };
41881
+ return _extends(AutoScroll, {
41882
+ pluginName: 'scroll',
41883
+ initializeByDefault: true
41884
+ });
41885
+ }
41886
+ function clearAutoScrolls() {
41887
+ autoScrolls.forEach(function (autoScroll) {
41888
+ clearInterval(autoScroll.pid);
41889
+ });
41890
+ autoScrolls = [];
41891
+ }
41892
+ function clearPointerElemChangedInterval() {
41893
+ clearInterval(pointerElemChangedInterval);
41894
+ }
41895
+ var autoScroll = throttle(function (evt, options, rootEl, isFallback) {
41896
+ // Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=505521
41897
+ if (!options.scroll) return;
41898
+ var x = (evt.touches ? evt.touches[0] : evt).clientX,
41899
+ y = (evt.touches ? evt.touches[0] : evt).clientY,
41900
+ sens = options.scrollSensitivity,
41901
+ speed = options.scrollSpeed,
41902
+ winScroller = getWindowScrollingElement();
41903
+ var scrollThisInstance = false,
41904
+ scrollCustomFn;
41905
+
41906
+ // New scroll root, set scrollEl
41907
+ if (scrollRootEl !== rootEl) {
41908
+ scrollRootEl = rootEl;
41909
+ clearAutoScrolls();
41910
+ scrollEl = options.scroll;
41911
+ scrollCustomFn = options.scrollFn;
41912
+ if (scrollEl === true) {
41913
+ scrollEl = getParentAutoScrollElement(rootEl, true);
41914
+ }
41915
+ }
41916
+ var layersOut = 0;
41917
+ var currentParent = scrollEl;
41918
+ do {
41919
+ var el = currentParent,
41920
+ rect = getRect(el),
41921
+ top = rect.top,
41922
+ bottom = rect.bottom,
41923
+ left = rect.left,
41924
+ right = rect.right,
41925
+ width = rect.width,
41926
+ height = rect.height,
41927
+ canScrollX = void 0,
41928
+ canScrollY = void 0,
41929
+ scrollWidth = el.scrollWidth,
41930
+ scrollHeight = el.scrollHeight,
41931
+ elCSS = css(el),
41932
+ scrollPosX = el.scrollLeft,
41933
+ scrollPosY = el.scrollTop;
41934
+ if (el === winScroller) {
41935
+ canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll' || elCSS.overflowX === 'visible');
41936
+ canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll' || elCSS.overflowY === 'visible');
41937
+ } else {
41938
+ canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll');
41939
+ canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll');
41940
+ }
41941
+ var vx = canScrollX && (Math.abs(right - x) <= sens && scrollPosX + width < scrollWidth) - (Math.abs(left - x) <= sens && !!scrollPosX);
41942
+ var vy = canScrollY && (Math.abs(bottom - y) <= sens && scrollPosY + height < scrollHeight) - (Math.abs(top - y) <= sens && !!scrollPosY);
41943
+ if (!autoScrolls[layersOut]) {
41944
+ for (var i = 0; i <= layersOut; i++) {
41945
+ if (!autoScrolls[i]) {
41946
+ autoScrolls[i] = {};
41947
+ }
41948
+ }
41949
+ }
41950
+ if (autoScrolls[layersOut].vx != vx || autoScrolls[layersOut].vy != vy || autoScrolls[layersOut].el !== el) {
41951
+ autoScrolls[layersOut].el = el;
41952
+ autoScrolls[layersOut].vx = vx;
41953
+ autoScrolls[layersOut].vy = vy;
41954
+ clearInterval(autoScrolls[layersOut].pid);
41955
+ if (vx != 0 || vy != 0) {
41956
+ scrollThisInstance = true;
41957
+ /* jshint loopfunc:true */
41958
+ autoScrolls[layersOut].pid = setInterval(function () {
41959
+ // emulate drag over during autoscroll (fallback), emulating native DnD behaviour
41960
+ if (isFallback && this.layer === 0) {
41961
+ Sortable.active._onTouchMove(touchEvt$1); // To move ghost if it is positioned absolutely
41962
+ }
41963
+ var scrollOffsetY = autoScrolls[this.layer].vy ? autoScrolls[this.layer].vy * speed : 0;
41964
+ var scrollOffsetX = autoScrolls[this.layer].vx ? autoScrolls[this.layer].vx * speed : 0;
41965
+ if (typeof scrollCustomFn === 'function') {
41966
+ if (scrollCustomFn.call(Sortable.dragged.parentNode[expando], scrollOffsetX, scrollOffsetY, evt, touchEvt$1, autoScrolls[this.layer].el) !== 'continue') {
41967
+ return;
41968
+ }
41969
+ }
41970
+ scrollBy(autoScrolls[this.layer].el, scrollOffsetX, scrollOffsetY);
41971
+ }.bind({
41972
+ layer: layersOut
41973
+ }), 24);
41974
+ }
41975
+ }
41976
+ layersOut++;
41977
+ } while (options.bubbleScroll && currentParent !== winScroller && (currentParent = getParentAutoScrollElement(currentParent, false)));
41978
+ scrolling = scrollThisInstance; // in case another function catches scrolling as false in between when it is not
41979
+ }, 30);
41980
+
41981
+ var drop = function drop(_ref) {
41982
+ var originalEvent = _ref.originalEvent,
41983
+ putSortable = _ref.putSortable,
41984
+ dragEl = _ref.dragEl,
41985
+ activeSortable = _ref.activeSortable,
41986
+ dispatchSortableEvent = _ref.dispatchSortableEvent,
41987
+ hideGhostForTarget = _ref.hideGhostForTarget,
41988
+ unhideGhostForTarget = _ref.unhideGhostForTarget;
41989
+ if (!originalEvent) return;
41990
+ var toSortable = putSortable || activeSortable;
41991
+ hideGhostForTarget();
41992
+ var touch = originalEvent.changedTouches && originalEvent.changedTouches.length ? originalEvent.changedTouches[0] : originalEvent;
41993
+ var target = document.elementFromPoint(touch.clientX, touch.clientY);
41994
+ unhideGhostForTarget();
41995
+ if (toSortable && !toSortable.el.contains(target)) {
41996
+ dispatchSortableEvent('spill');
41997
+ this.onSpill({
41998
+ dragEl: dragEl,
41999
+ putSortable: putSortable
42000
+ });
42001
+ }
42002
+ };
42003
+ function Revert() {}
42004
+ Revert.prototype = {
42005
+ startIndex: null,
42006
+ dragStart: function dragStart(_ref2) {
42007
+ var oldDraggableIndex = _ref2.oldDraggableIndex;
42008
+ this.startIndex = oldDraggableIndex;
42009
+ },
42010
+ onSpill: function onSpill(_ref3) {
42011
+ var dragEl = _ref3.dragEl,
42012
+ putSortable = _ref3.putSortable;
42013
+ this.sortable.captureAnimationState();
42014
+ if (putSortable) {
42015
+ putSortable.captureAnimationState();
42016
+ }
42017
+ var nextSibling = getChild(this.sortable.el, this.startIndex, this.options);
42018
+ if (nextSibling) {
42019
+ this.sortable.el.insertBefore(dragEl, nextSibling);
42020
+ } else {
42021
+ this.sortable.el.appendChild(dragEl);
42022
+ }
42023
+ this.sortable.animateAll();
42024
+ if (putSortable) {
42025
+ putSortable.animateAll();
42026
+ }
42027
+ },
42028
+ drop: drop
42029
+ };
42030
+ _extends(Revert, {
42031
+ pluginName: 'revertOnSpill'
42032
+ });
42033
+ function Remove() {}
42034
+ Remove.prototype = {
42035
+ onSpill: function onSpill(_ref4) {
42036
+ var dragEl = _ref4.dragEl,
42037
+ putSortable = _ref4.putSortable;
42038
+ var parentSortable = putSortable || this.sortable;
42039
+ parentSortable.captureAnimationState();
42040
+ dragEl.parentNode && dragEl.parentNode.removeChild(dragEl);
42041
+ parentSortable.animateAll();
42042
+ },
42043
+ drop: drop
42044
+ };
42045
+ _extends(Remove, {
42046
+ pluginName: 'removeOnSpill'
42047
+ });
42048
+
42049
+ Sortable.mount(new AutoScrollPlugin());
42050
+ Sortable.mount(Remove, Revert);
42051
+
42052
+ const DRAG_HANDLE_SELECTOR = '[data-drag-handle]';
42053
+ const DRAGGABLE_ITEM_SELECTOR = '.array-item[data-reorderable="true"]';
42054
+ const DEFAULT_CONTAINER_CLASS = 'has-an-item-which-is-being-dragged';
42055
+ const DEFAULT_DROP_ELEVATION_CLASS = 'is-elevated';
42056
+ const DROP_ELEVATION_DURATION = 1000;
42057
+ const TOUCH_DRAG_DELAY_MS = 200; // Adds a short hold on touch (long-press) so scroll gestures do not reorder items.
39421
42058
  class ArrayFieldTemplate extends react.Component {
39422
42059
  constructor(props) {
39423
42060
  super(props);
39424
- this.props = props;
39425
- this.renderItem = this.renderItem.bind(this);
39426
- this.handleAddClick = this.handleAddClick.bind(this);
42061
+ this.itemByIndex = new Map();
42062
+ this.handleAddClick = (event) => {
42063
+ event.stopPropagation();
42064
+ this.props.onAddClick(event);
42065
+ };
42066
+ this.setContainer = (element) => {
42067
+ if (this.container === element) {
42068
+ return;
42069
+ }
42070
+ this.teardownDragController();
42071
+ this.container = element !== null && element !== void 0 ? element : undefined;
42072
+ this.setupDragController();
42073
+ };
42074
+ this.handleSortStart = (event) => {
42075
+ if (!this.canReorderItems()) {
42076
+ return;
42077
+ }
42078
+ this.dragSnapshot = [...this.state.order];
42079
+ this.draggedItemIndex = this.getReorderId(event.item);
42080
+ if (this.container) {
42081
+ this.container.classList.add(DEFAULT_CONTAINER_CLASS);
42082
+ }
42083
+ if (event.item instanceof HTMLElement) {
42084
+ this.applyDropElevation(event.item);
42085
+ }
42086
+ };
42087
+ this.handleSortEnd = (event) => {
42088
+ var _a;
42089
+ if (!this.canReorderItems()) {
42090
+ return;
42091
+ }
42092
+ if (this.container) {
42093
+ this.container.classList.remove(DEFAULT_CONTAINER_CLASS);
42094
+ }
42095
+ const snapshot = this.dragSnapshot;
42096
+ const draggedItemIndex = this.draggedItemIndex;
42097
+ this.dragSnapshot = undefined;
42098
+ this.draggedItemIndex = undefined;
42099
+ if (event.item instanceof HTMLElement) {
42100
+ this.dropElevationTarget = event.item;
42101
+ }
42102
+ const finalOrder = this.readOrderFromDom();
42103
+ if (!this.arraysEqual(this.state.order, finalOrder)) {
42104
+ this.setState({ order: finalOrder });
42105
+ }
42106
+ if (snapshot === undefined ||
42107
+ draggedItemIndex === undefined ||
42108
+ !(event.item instanceof HTMLElement)) {
42109
+ this.scheduleDropElevationRemoval();
42110
+ return;
42111
+ }
42112
+ const fromPosition = snapshot.indexOf(draggedItemIndex);
42113
+ const toPosition = finalOrder.indexOf(draggedItemIndex);
42114
+ if (fromPosition === -1 ||
42115
+ toPosition === -1 ||
42116
+ fromPosition === toPosition) {
42117
+ this.scheduleDropElevationRemoval();
42118
+ return;
42119
+ }
42120
+ const targetItem = ((_a = this.props.items) !== null && _a !== void 0 ? _a : []).find((entry) => {
42121
+ var _a;
42122
+ return ((_a = entry.index) !== null && _a !== void 0 ? _a : -1) === draggedItemIndex;
42123
+ });
42124
+ if (!targetItem || typeof targetItem.onReorderClick !== 'function') {
42125
+ this.scheduleDropElevationRemoval();
42126
+ return;
42127
+ }
42128
+ requestAnimationFrame(() => {
42129
+ const reorder = targetItem.onReorderClick(draggedItemIndex, toPosition);
42130
+ if (typeof reorder === 'function') {
42131
+ reorder();
42132
+ }
42133
+ });
42134
+ this.scheduleDropElevationRemoval();
42135
+ };
42136
+ this.state = {
42137
+ order: this.extractIndices(props.items),
42138
+ };
42139
+ }
42140
+ componentWillUnmount() {
42141
+ this.teardownDragController();
42142
+ }
42143
+ componentDidMount() {
42144
+ this.setupDragController();
42145
+ }
42146
+ componentDidUpdate(previousProps) {
42147
+ if (previousProps.items !== this.props.items) {
42148
+ const nextOrder = this.extractIndices(this.props.items);
42149
+ if (!this.arraysEqual(this.state.order, nextOrder)) {
42150
+ this.setState({
42151
+ order: nextOrder,
42152
+ }, () => {
42153
+ this.setupDragController();
42154
+ });
42155
+ return;
42156
+ }
42157
+ }
42158
+ if (previousProps.items !== this.props.items ||
42159
+ previousProps.schema !== this.props.schema ||
42160
+ previousProps.disabled !== this.props.disabled ||
42161
+ previousProps.readonly !== this.props.readonly) {
42162
+ this.setupDragController();
42163
+ }
39427
42164
  }
39428
42165
  render() {
39429
- return react.createElement('div', {}, renderTitle(this.props.title), renderDescription(this.props.schema.description), this.props.items.map(this.renderItem), this.renderAddButton());
42166
+ const controls = this.getItemControls();
42167
+ const { ordered: orderedItems, byIndex } = this.getOrderedItems();
42168
+ this.itemByIndex = byIndex;
42169
+ return react.createElement('div', {}, renderTitle(this.props.title), renderDescription(this.props.schema.description), react.createElement('div', {
42170
+ className: 'array-items',
42171
+ ref: this.setContainer,
42172
+ }, orderedItems.map((item, index) => this.renderItem(item, index, controls))), this.renderAddButton());
39430
42173
  }
39431
42174
  renderAddButton() {
39432
42175
  if (!this.props.canAdd) {
@@ -39439,40 +42182,214 @@ class ArrayFieldTemplate extends react.Component {
39439
42182
  class: 'button-add-new',
39440
42183
  });
39441
42184
  }
39442
- renderItem(item, index) {
42185
+ getItemControls() {
42186
+ return {
42187
+ allowItemRemoval: this.canRemoveItems(),
42188
+ };
42189
+ }
42190
+ renderItem(item, index, controls) {
42191
+ var _a;
39443
42192
  const { schema, formData, formContext } = this.props;
39444
- const controls = this.getItemControls();
42193
+ const itemIndex = (_a = item.index) !== null && _a !== void 0 ? _a : index;
42194
+ const allowItemReorder = this.isItemReorderable(item);
39445
42195
  if (isObjectType(schema.items)) {
39446
42196
  return react.createElement(CollapsibleItemTemplate, {
39447
42197
  key: item.key,
39448
42198
  item: item,
39449
- data: formData[index],
42199
+ data: Array.isArray(formData) ? formData[itemIndex] : undefined,
39450
42200
  schema: schema,
39451
42201
  formSchema: formContext.schema,
39452
- index: index,
42202
+ index: itemIndex,
39453
42203
  allowItemRemoval: controls.allowItemRemoval,
39454
- allowItemReorder: controls.allowItemReorder,
42204
+ allowItemReorder: allowItemReorder,
39455
42205
  });
39456
42206
  }
39457
42207
  return react.createElement(SimpleItemTemplate, {
39458
42208
  key: item.key,
39459
42209
  item: item,
39460
- index: index,
42210
+ index: itemIndex,
42211
+ dataIndex: itemIndex,
39461
42212
  allowItemRemoval: controls.allowItemRemoval,
39462
- allowItemReorder: controls.allowItemReorder,
42213
+ allowItemReorder: allowItemReorder,
39463
42214
  });
39464
42215
  }
39465
- getItemControls() {
39466
- var _a;
39467
- const limeOptions = ((_a = this.props.schema) === null || _a === void 0 ? void 0 : _a.lime) || {};
42216
+ getOrderedItems() {
42217
+ var _a, _b;
42218
+ const items = (_a = this.props.items) !== null && _a !== void 0 ? _a : [];
42219
+ const byIndex = new Map();
42220
+ let entryIndex = 0;
42221
+ for (const entry of items) {
42222
+ byIndex.set((_b = entry.index) !== null && _b !== void 0 ? _b : entryIndex, entry);
42223
+ entryIndex += 1;
42224
+ }
42225
+ const ordered = [];
42226
+ const used = new Set();
42227
+ for (const index of this.state.order) {
42228
+ const entry = byIndex.get(index);
42229
+ if (!entry) {
42230
+ continue;
42231
+ }
42232
+ ordered.push(entry);
42233
+ used.add(index);
42234
+ }
42235
+ for (const [index, entry] of byIndex.entries()) {
42236
+ if (!used.has(index)) {
42237
+ ordered.push(entry);
42238
+ }
42239
+ }
39468
42240
  return {
39469
- allowItemRemoval: limeOptions.allowItemRemoval !== false,
39470
- allowItemReorder: limeOptions.allowItemReorder !== false,
42241
+ ordered,
42242
+ byIndex,
39471
42243
  };
39472
42244
  }
39473
- handleAddClick(event) {
39474
- event.stopPropagation();
39475
- this.props.onAddClick(event);
42245
+ setupDragController() {
42246
+ if (!this.container || !this.canReorderItems()) {
42247
+ this.teardownDragController();
42248
+ return;
42249
+ }
42250
+ const reorderableCount = this.getReorderableOrder().length;
42251
+ if (reorderableCount < 2) {
42252
+ this.teardownDragController();
42253
+ return;
42254
+ }
42255
+ if (this.sortable) {
42256
+ this.sortable.option('handle', DRAG_HANDLE_SELECTOR);
42257
+ this.sortable.option('draggable', DRAGGABLE_ITEM_SELECTOR);
42258
+ this.sortable.option('disabled', false);
42259
+ this.sortable.option('delay', TOUCH_DRAG_DELAY_MS);
42260
+ this.sortable.option('delayOnTouchOnly', true);
42261
+ return;
42262
+ }
42263
+ this.sortable = Sortable.create(this.container, {
42264
+ animation: 150,
42265
+ handle: DRAG_HANDLE_SELECTOR,
42266
+ draggable: DRAGGABLE_ITEM_SELECTOR,
42267
+ delay: TOUCH_DRAG_DELAY_MS,
42268
+ delayOnTouchOnly: true,
42269
+ onStart: this.handleSortStart,
42270
+ onEnd: this.handleSortEnd,
42271
+ });
42272
+ }
42273
+ teardownDragController() {
42274
+ if (this.sortable) {
42275
+ this.sortable.destroy();
42276
+ this.sortable = undefined;
42277
+ }
42278
+ this.clearDropElevationTimer();
42279
+ if (this.dropElevationTarget) {
42280
+ this.dropElevationTarget.classList.remove(DEFAULT_DROP_ELEVATION_CLASS);
42281
+ this.dropElevationTarget = undefined;
42282
+ }
42283
+ if (this.container) {
42284
+ this.container.classList.remove(DEFAULT_CONTAINER_CLASS);
42285
+ }
42286
+ this.dragSnapshot = undefined;
42287
+ this.draggedItemIndex = undefined;
42288
+ }
42289
+ canReorderItems() {
42290
+ if (this.props.disabled || this.props.readonly) {
42291
+ return false;
42292
+ }
42293
+ const schema = this.props.schema;
42294
+ const limeOptions = (schema === null || schema === void 0 ? void 0 : schema.lime) || {};
42295
+ return limeOptions.allowItemReorder !== false;
42296
+ }
42297
+ canRemoveItems() {
42298
+ const schema = this.props.schema;
42299
+ const limeOptions = (schema === null || schema === void 0 ? void 0 : schema.lime) || {};
42300
+ return limeOptions.allowItemRemoval !== false;
42301
+ }
42302
+ isItemReorderable(item) {
42303
+ return (this.canReorderItems() &&
42304
+ Boolean((item === null || item === void 0 ? void 0 : item.hasMoveDown) || (item === null || item === void 0 ? void 0 : item.hasMoveUp)));
42305
+ }
42306
+ isIndexReorderable(index) {
42307
+ const item = this.itemByIndex.get(index);
42308
+ if (!item) {
42309
+ return false;
42310
+ }
42311
+ return this.isItemReorderable(item);
42312
+ }
42313
+ getReorderableOrder(order = this.state.order) {
42314
+ const result = [];
42315
+ for (const index of order) {
42316
+ if (this.isIndexReorderable(index)) {
42317
+ result.push(index);
42318
+ }
42319
+ }
42320
+ return result;
42321
+ }
42322
+ readOrderFromDom() {
42323
+ if (!this.container) {
42324
+ return [];
42325
+ }
42326
+ const items = [...this.container.querySelectorAll('.array-item')];
42327
+ const order = [];
42328
+ for (const element of items) {
42329
+ const index = this.getReorderId(element);
42330
+ if (index !== undefined) {
42331
+ order.push(index);
42332
+ }
42333
+ }
42334
+ return order;
42335
+ }
42336
+ getReorderId(element) {
42337
+ if (!element) {
42338
+ return undefined;
42339
+ }
42340
+ if (!(element instanceof HTMLElement)) {
42341
+ return undefined;
42342
+ }
42343
+ const value = element.dataset.reorderId;
42344
+ if (value === undefined) {
42345
+ return undefined;
42346
+ }
42347
+ const parsed = Number.parseInt(value, 10);
42348
+ return Number.isNaN(parsed) ? undefined : parsed;
42349
+ }
42350
+ applyDropElevation(item) {
42351
+ if (this.dropElevationTarget && this.dropElevationTarget !== item) {
42352
+ this.dropElevationTarget.classList.remove(DEFAULT_DROP_ELEVATION_CLASS);
42353
+ }
42354
+ this.clearDropElevationTimer();
42355
+ item.classList.add(DEFAULT_DROP_ELEVATION_CLASS);
42356
+ this.dropElevationTarget = item;
42357
+ }
42358
+ scheduleDropElevationRemoval() {
42359
+ if (!this.dropElevationTarget) {
42360
+ return;
42361
+ }
42362
+ const target = this.dropElevationTarget;
42363
+ this.clearDropElevationTimer();
42364
+ this.dropElevationTimeout = globalThis.setTimeout(() => {
42365
+ target.classList.remove(DEFAULT_DROP_ELEVATION_CLASS);
42366
+ if (this.dropElevationTarget === target) {
42367
+ this.dropElevationTarget = undefined;
42368
+ }
42369
+ this.dropElevationTimeout = undefined;
42370
+ }, DROP_ELEVATION_DURATION);
42371
+ }
42372
+ clearDropElevationTimer() {
42373
+ if (this.dropElevationTimeout !== undefined) {
42374
+ clearTimeout(this.dropElevationTimeout);
42375
+ this.dropElevationTimeout = undefined;
42376
+ }
42377
+ }
42378
+ arraysEqual(a, b) {
42379
+ if (a.length !== b.length) {
42380
+ return false;
42381
+ }
42382
+ let index = 0;
42383
+ for (const value of a) {
42384
+ if (value !== b[index]) {
42385
+ return false;
42386
+ }
42387
+ index += 1;
42388
+ }
42389
+ return true;
42390
+ }
42391
+ extractIndices(items = []) {
42392
+ return (items !== null && items !== void 0 ? items : []).map((item, index) => { var _a; return (_a = item.index) !== null && _a !== void 0 ? _a : index; });
39476
42393
  }
39477
42394
  }
39478
42395
 
@@ -39576,7 +42493,10 @@ class Row extends react.Component {
39576
42493
  renderDescription() {
39577
42494
  var _a;
39578
42495
  if ((_a = this.schema) === null || _a === void 0 ? void 0 : _a.description) {
39579
- return react.createElement('p', { className: 'description' }, this.schema.description);
42496
+ return react.createElement('limel-markdown', {
42497
+ class: 'description',
42498
+ value: this.schema.description,
42499
+ });
39580
42500
  }
39581
42501
  }
39582
42502
  renderChildren() {
@@ -39680,9 +42600,9 @@ function IconButton(props) {
39680
42600
  type = _props$type === void 0 ? "default" : _props$type,
39681
42601
  icon = props.icon,
39682
42602
  className = props.className,
39683
- otherProps = _objectWithoutProperties(props, ["type", "icon", "className"]);
42603
+ otherProps = _objectWithoutProperties$1(props, ["type", "icon", "className"]);
39684
42604
 
39685
- return react.createElement("button", _extends({
42605
+ return react.createElement("button", _extends$1({
39686
42606
  type: "button",
39687
42607
  className: "btn btn-".concat(type, " ").concat(className)
39688
42608
  }, otherProps), react.createElement("i", {
@@ -39906,7 +42826,7 @@ function (_Component) {
39906
42826
 
39907
42827
  _this = _possibleConstructorReturn(this, _getPrototypeOf(ArrayField).call(this, props));
39908
42828
 
39909
- _defineProperty$1(_assertThisInitialized(_this), "_getNewFormDataRow", function () {
42829
+ _defineProperty$2(_assertThisInitialized(_this), "_getNewFormDataRow", function () {
39910
42830
  var _this$props = _this.props,
39911
42831
  schema = _this$props.schema,
39912
42832
  _this$props$registry = _this$props.registry,
@@ -39921,7 +42841,7 @@ function (_Component) {
39921
42841
  return getDefaultFormState(itemSchema, undefined, rootSchema);
39922
42842
  });
39923
42843
 
39924
- _defineProperty$1(_assertThisInitialized(_this), "onAddClick", function (event) {
42844
+ _defineProperty$2(_assertThisInitialized(_this), "onAddClick", function (event) {
39925
42845
  if (event) {
39926
42846
  event.preventDefault();
39927
42847
  }
@@ -39941,7 +42861,7 @@ function (_Component) {
39941
42861
  });
39942
42862
  });
39943
42863
 
39944
- _defineProperty$1(_assertThisInitialized(_this), "onAddIndexClick", function (index) {
42864
+ _defineProperty$2(_assertThisInitialized(_this), "onAddIndexClick", function (index) {
39945
42865
  return function (event) {
39946
42866
  if (event) {
39947
42867
  event.preventDefault();
@@ -39966,7 +42886,7 @@ function (_Component) {
39966
42886
  };
39967
42887
  });
39968
42888
 
39969
- _defineProperty$1(_assertThisInitialized(_this), "onDropIndexClick", function (index) {
42889
+ _defineProperty$2(_assertThisInitialized(_this), "onDropIndexClick", function (index) {
39970
42890
  return function (event) {
39971
42891
  if (event) {
39972
42892
  event.preventDefault();
@@ -40005,7 +42925,7 @@ function (_Component) {
40005
42925
  };
40006
42926
  });
40007
42927
 
40008
- _defineProperty$1(_assertThisInitialized(_this), "onReorderClick", function (index, newIndex) {
42928
+ _defineProperty$2(_assertThisInitialized(_this), "onReorderClick", function (index, newIndex) {
40009
42929
  return function (event) {
40010
42930
  if (event) {
40011
42931
  event.preventDefault();
@@ -40054,7 +42974,7 @@ function (_Component) {
40054
42974
  };
40055
42975
  });
40056
42976
 
40057
- _defineProperty$1(_assertThisInitialized(_this), "onChangeForIndex", function (index) {
42977
+ _defineProperty$2(_assertThisInitialized(_this), "onChangeForIndex", function (index) {
40058
42978
  return function (value, errorSchema) {
40059
42979
  var _this$props2 = _this.props,
40060
42980
  formData = _this$props2.formData,
@@ -40065,11 +42985,11 @@ function (_Component) {
40065
42985
  var jsonValue = typeof value === "undefined" ? null : value;
40066
42986
  return index === i ? jsonValue : item;
40067
42987
  });
40068
- onChange(newFormData, errorSchema && _this.props.errorSchema && _objectSpread({}, _this.props.errorSchema, _defineProperty$1({}, index, errorSchema)));
42988
+ onChange(newFormData, errorSchema && _this.props.errorSchema && _objectSpread({}, _this.props.errorSchema, _defineProperty$2({}, index, errorSchema)));
40069
42989
  };
40070
42990
  });
40071
42991
 
40072
- _defineProperty$1(_assertThisInitialized(_this), "onSelectChange", function (value) {
42992
+ _defineProperty$2(_assertThisInitialized(_this), "onSelectChange", function (value) {
40073
42993
  _this.props.onChange(value);
40074
42994
  });
40075
42995
 
@@ -40258,7 +43178,7 @@ function (_Component) {
40258
43178
  }),
40259
43179
  _getUiOptions$enumOpt2 = _getUiOptions$enumOpt.widget,
40260
43180
  widget = _getUiOptions$enumOpt2 === void 0 ? "select" : _getUiOptions$enumOpt2,
40261
- options = _objectWithoutProperties(_getUiOptions$enumOpt, ["widget"]);
43181
+ options = _objectWithoutProperties$1(_getUiOptions$enumOpt, ["widget"]);
40262
43182
 
40263
43183
  var Widget = getWidget(schema, widget, widgets);
40264
43184
  return react.createElement(Widget, {
@@ -40305,7 +43225,7 @@ function (_Component) {
40305
43225
  var _getUiOptions2 = getUiOptions(uiSchema),
40306
43226
  _getUiOptions2$widget = _getUiOptions2.widget,
40307
43227
  widget = _getUiOptions2$widget === void 0 ? "files" : _getUiOptions2$widget,
40308
- options = _objectWithoutProperties(_getUiOptions2, ["widget"]);
43228
+ options = _objectWithoutProperties$1(_getUiOptions2, ["widget"]);
40309
43229
 
40310
43230
  var Widget = getWidget(schema, widget, widgets);
40311
43231
  return react.createElement(Widget, {
@@ -40519,7 +43439,7 @@ function (_Component) {
40519
43439
  return ArrayField;
40520
43440
  }(react.Component);
40521
43441
 
40522
- _defineProperty$1(ArrayField$1, "defaultProps", {
43442
+ _defineProperty$2(ArrayField$1, "defaultProps", {
40523
43443
  uiSchema: {},
40524
43444
  formData: [],
40525
43445
  idSchema: {},
@@ -40553,7 +43473,7 @@ function BooleanField(props) {
40553
43473
  var _getUiOptions = getUiOptions(uiSchema),
40554
43474
  _getUiOptions$widget = _getUiOptions.widget,
40555
43475
  widget = _getUiOptions$widget === void 0 ? "checkbox" : _getUiOptions$widget,
40556
- options = _objectWithoutProperties(_getUiOptions, ["widget"]);
43476
+ options = _objectWithoutProperties$1(_getUiOptions, ["widget"]);
40557
43477
 
40558
43478
  var Widget = getWidget(schema, widget, widgets);
40559
43479
  var enumOptions;
@@ -40635,7 +43555,7 @@ function (_Component) {
40635
43555
 
40636
43556
  _this = _possibleConstructorReturn(this, _getPrototypeOf(AnyOfField).call(this, props));
40637
43557
 
40638
- _defineProperty$1(_assertThisInitialized(_this), "onOptionChange", function (option) {
43558
+ _defineProperty$2(_assertThisInitialized(_this), "onOptionChange", function (option) {
40639
43559
  var selectedOption = _parseInt(option, 10);
40640
43560
 
40641
43561
  var _this$props = _this.props,
@@ -40650,7 +43570,7 @@ function (_Component) {
40650
43570
  var newFormData = undefined;
40651
43571
 
40652
43572
  if (guessType(formData) === "object" && (newOption.type === "object" || newOption.properties)) {
40653
- newFormData = _extends({}, formData);
43573
+ newFormData = _extends$1({}, formData);
40654
43574
  var optionsToDiscard = options.slice();
40655
43575
  optionsToDiscard.splice(selectedOption, 1); // Discard any data added using other options
40656
43576
 
@@ -40756,7 +43676,7 @@ function (_Component) {
40756
43676
  var _getUiOptions = getUiOptions(uiSchema),
40757
43677
  _getUiOptions$widget = _getUiOptions.widget,
40758
43678
  widget = _getUiOptions$widget === void 0 ? "select" : _getUiOptions$widget,
40759
- uiOptions = _objectWithoutProperties(_getUiOptions, ["widget"]);
43679
+ uiOptions = _objectWithoutProperties$1(_getUiOptions, ["widget"]);
40760
43680
 
40761
43681
  var Widget = getWidget({
40762
43682
  type: "number"
@@ -40767,7 +43687,7 @@ function (_Component) {
40767
43687
  if (option) {
40768
43688
  // If the subschema doesn't declare a type, infer the type from the
40769
43689
  // parent schema
40770
- optionSchema = option.type ? option : _extends({}, option, {
43690
+ optionSchema = option.type ? option : _extends$1({}, option, {
40771
43691
  type: baseType
40772
43692
  });
40773
43693
  }
@@ -40782,7 +43702,7 @@ function (_Component) {
40782
43702
  className: "panel panel-default panel-body"
40783
43703
  }, react.createElement("div", {
40784
43704
  className: "form-group"
40785
- }, react.createElement(Widget, _extends({
43705
+ }, react.createElement(Widget, _extends$1({
40786
43706
  id: "".concat(idSchema.$id).concat(schema.oneOf ? "__oneof_select" : "__anyof_select"),
40787
43707
  schema: {
40788
43708
  type: "number",
@@ -40861,7 +43781,7 @@ function (_React$Component) {
40861
43781
 
40862
43782
  _this = _possibleConstructorReturn(this, _getPrototypeOf(NumberField).call(this, props));
40863
43783
 
40864
- _defineProperty$1(_assertThisInitialized(_this), "handleChange", function (value) {
43784
+ _defineProperty$2(_assertThisInitialized(_this), "handleChange", function (value) {
40865
43785
  // Cache the original value in component state
40866
43786
  _this.setState({
40867
43787
  lastValue: value
@@ -40894,7 +43814,7 @@ function (_React$Component) {
40894
43814
 
40895
43815
  var _this$props = this.props,
40896
43816
  formData = _this$props.formData,
40897
- props = _objectWithoutProperties(_this$props, ["formData"]);
43817
+ props = _objectWithoutProperties$1(_this$props, ["formData"]);
40898
43818
 
40899
43819
  var lastValue = this.state.lastValue;
40900
43820
  var value = formData;
@@ -40911,7 +43831,7 @@ function (_React$Component) {
40911
43831
  }
40912
43832
  }
40913
43833
 
40914
- return react.createElement(StringField, _extends({}, props, {
43834
+ return react.createElement(StringField, _extends$1({}, props, {
40915
43835
  formData: value,
40916
43836
  onChange: this.handleChange
40917
43837
  }));
@@ -40966,12 +43886,12 @@ function (_Component) {
40966
43886
 
40967
43887
  _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(ObjectField)).call.apply(_getPrototypeOf2, [this].concat(args)));
40968
43888
 
40969
- _defineProperty$1(_assertThisInitialized(_this), "state", {
43889
+ _defineProperty$2(_assertThisInitialized(_this), "state", {
40970
43890
  wasPropertyKeyModified: false,
40971
43891
  additionalProperties: {}
40972
43892
  });
40973
43893
 
40974
- _defineProperty$1(_assertThisInitialized(_this), "onPropertyChange", function (name) {
43894
+ _defineProperty$2(_assertThisInitialized(_this), "onPropertyChange", function (name) {
40975
43895
  var addedByAdditionalProperties = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
40976
43896
  return function (value, errorSchema) {
40977
43897
  if (!value && addedByAdditionalProperties) {
@@ -40985,13 +43905,13 @@ function (_Component) {
40985
43905
  value = "";
40986
43906
  }
40987
43907
 
40988
- var newFormData = _objectSpread({}, _this.props.formData, _defineProperty$1({}, name, value));
43908
+ var newFormData = _objectSpread({}, _this.props.formData, _defineProperty$2({}, name, value));
40989
43909
 
40990
- _this.props.onChange(newFormData, errorSchema && _this.props.errorSchema && _objectSpread({}, _this.props.errorSchema, _defineProperty$1({}, name, errorSchema)));
43910
+ _this.props.onChange(newFormData, errorSchema && _this.props.errorSchema && _objectSpread({}, _this.props.errorSchema, _defineProperty$2({}, name, errorSchema)));
40991
43911
  };
40992
43912
  });
40993
43913
 
40994
- _defineProperty$1(_assertThisInitialized(_this), "onDropPropertyClick", function (key) {
43914
+ _defineProperty$2(_assertThisInitialized(_this), "onDropPropertyClick", function (key) {
40995
43915
  return function (event) {
40996
43916
  event.preventDefault();
40997
43917
  var _this$props = _this.props,
@@ -41005,7 +43925,7 @@ function (_Component) {
41005
43925
  };
41006
43926
  });
41007
43927
 
41008
- _defineProperty$1(_assertThisInitialized(_this), "getAvailableKey", function (preferredKey, formData) {
43928
+ _defineProperty$2(_assertThisInitialized(_this), "getAvailableKey", function (preferredKey, formData) {
41009
43929
  var index = 0;
41010
43930
  var newKey = preferredKey;
41011
43931
 
@@ -41016,7 +43936,7 @@ function (_Component) {
41016
43936
  return newKey;
41017
43937
  });
41018
43938
 
41019
- _defineProperty$1(_assertThisInitialized(_this), "onKeyChange", function (oldValue) {
43939
+ _defineProperty$2(_assertThisInitialized(_this), "onKeyChange", function (oldValue) {
41020
43940
  return function (value, errorSchema) {
41021
43941
  if (oldValue === value) {
41022
43942
  return;
@@ -41026,24 +43946,24 @@ function (_Component) {
41026
43946
 
41027
43947
  var newFormData = _objectSpread({}, _this.props.formData);
41028
43948
 
41029
- var newKeys = _defineProperty$1({}, oldValue, value);
43949
+ var newKeys = _defineProperty$2({}, oldValue, value);
41030
43950
 
41031
43951
  var keyValues = keys$3(newFormData).map(function (key) {
41032
43952
  var newKey = newKeys[key] || key;
41033
- return _defineProperty$1({}, newKey, newFormData[key]);
43953
+ return _defineProperty$2({}, newKey, newFormData[key]);
41034
43954
  });
41035
43955
 
41036
- var renamedObj = _extends.apply(void 0, [{}].concat(_toConsumableArray(keyValues)));
43956
+ var renamedObj = _extends$1.apply(void 0, [{}].concat(_toConsumableArray(keyValues)));
41037
43957
 
41038
43958
  _this.setState({
41039
43959
  wasPropertyKeyModified: true
41040
43960
  });
41041
43961
 
41042
- _this.props.onChange(renamedObj, errorSchema && _this.props.errorSchema && _objectSpread({}, _this.props.errorSchema, _defineProperty$1({}, value, errorSchema)));
43962
+ _this.props.onChange(renamedObj, errorSchema && _this.props.errorSchema && _objectSpread({}, _this.props.errorSchema, _defineProperty$2({}, value, errorSchema)));
41043
43963
  };
41044
43964
  });
41045
43965
 
41046
- _defineProperty$1(_assertThisInitialized(_this), "handleAddClick", function (schema) {
43966
+ _defineProperty$2(_assertThisInitialized(_this), "handleAddClick", function (schema) {
41047
43967
  return function () {
41048
43968
  var type = schema.additionalProperties.type;
41049
43969
 
@@ -41187,7 +44107,7 @@ function (_Component) {
41187
44107
  formData: formData,
41188
44108
  formContext: formContext
41189
44109
  };
41190
- return react.createElement(Template, _extends({}, templateProps, {
44110
+ return react.createElement(Template, _extends$1({}, templateProps, {
41191
44111
  onAddClick: this.handleAddClick
41192
44112
  }));
41193
44113
  }
@@ -41196,7 +44116,7 @@ function (_Component) {
41196
44116
  return ObjectField;
41197
44117
  }(react.Component);
41198
44118
 
41199
- _defineProperty$1(ObjectField$1, "defaultProps", {
44119
+ _defineProperty$2(ObjectField$1, "defaultProps", {
41200
44120
  uiSchema: {},
41201
44121
  formData: {},
41202
44122
  errorSchema: {},
@@ -41238,7 +44158,7 @@ function StringField(props) {
41238
44158
  widget = _getUiOptions$widget === void 0 ? defaultWidget : _getUiOptions$widget,
41239
44159
  _getUiOptions$placeho = _getUiOptions.placeholder,
41240
44160
  placeholder = _getUiOptions$placeho === void 0 ? "" : _getUiOptions$placeho,
41241
- options = _objectWithoutProperties(_getUiOptions, ["widget", "placeholder"]);
44161
+ options = _objectWithoutProperties$1(_getUiOptions, ["widget", "placeholder"]);
41242
44162
 
41243
44163
  var Widget = getWidget(schema, widget, widgets);
41244
44164
  return react.createElement(Widget, {
@@ -41401,8 +44321,8 @@ function (_Component) {
41401
44321
 
41402
44322
  _this = _possibleConstructorReturn(this, _getPrototypeOf(AltDateWidget).call(this, props));
41403
44323
 
41404
- _defineProperty$1(_assertThisInitialized(_this), "onChange", function (property, value) {
41405
- _this.setState(_defineProperty$1({}, property, typeof value === "undefined" ? -1 : value), function () {
44324
+ _defineProperty$2(_assertThisInitialized(_this), "onChange", function (property, value) {
44325
+ _this.setState(_defineProperty$2({}, property, typeof value === "undefined" ? -1 : value), function () {
41406
44326
  // Only propagate to parent state if we have a complete date{time}
41407
44327
  if (readyForChange(_this.state)) {
41408
44328
  _this.props.onChange(toDateString(_this.state, _this.props.time));
@@ -41410,7 +44330,7 @@ function (_Component) {
41410
44330
  });
41411
44331
  });
41412
44332
 
41413
- _defineProperty$1(_assertThisInitialized(_this), "setNow", function (event) {
44333
+ _defineProperty$2(_assertThisInitialized(_this), "setNow", function (event) {
41414
44334
  event.preventDefault();
41415
44335
  var _this$props = _this.props,
41416
44336
  time = _this$props.time,
@@ -41429,7 +44349,7 @@ function (_Component) {
41429
44349
  });
41430
44350
  });
41431
44351
 
41432
- _defineProperty$1(_assertThisInitialized(_this), "clear", function (event) {
44352
+ _defineProperty$2(_assertThisInitialized(_this), "clear", function (event) {
41433
44353
  event.preventDefault();
41434
44354
  var _this$props2 = _this.props,
41435
44355
  time = _this$props2.time,
@@ -41478,7 +44398,7 @@ function (_Component) {
41478
44398
  }, this.dateElementProps.map(function (elemProps, i) {
41479
44399
  return react.createElement("li", {
41480
44400
  key: i
41481
- }, react.createElement(DateElement, _extends({
44401
+ }, react.createElement(DateElement, _extends$1({
41482
44402
  rootId: id,
41483
44403
  select: _this2.onChange
41484
44404
  }, elemProps, {
@@ -41548,7 +44468,7 @@ function (_Component) {
41548
44468
  return AltDateWidget;
41549
44469
  }(react.Component);
41550
44470
 
41551
- _defineProperty$1(AltDateWidget, "defaultProps", {
44471
+ _defineProperty$2(AltDateWidget, "defaultProps", {
41552
44472
  time: false,
41553
44473
  disabled: false,
41554
44474
  readonly: false,
@@ -41560,7 +44480,7 @@ _defineProperty$1(AltDateWidget, "defaultProps", {
41560
44480
 
41561
44481
  function AltDateTimeWidget(props) {
41562
44482
  var AltDateWidget = props.registry.widgets.AltDateWidget;
41563
- return react.createElement(AltDateWidget, _extends({
44483
+ return react.createElement(AltDateWidget, _extends$1({
41564
44484
  time: true
41565
44485
  }, props));
41566
44486
  }
@@ -41585,7 +44505,7 @@ function BaseInput(props) {
41585
44505
  onFocus = props.onFocus,
41586
44506
  options = props.options,
41587
44507
  schema = props.schema,
41588
- inputProps = _objectWithoutProperties(props, ["value", "readonly", "disabled", "autofocus", "onBlur", "onFocus", "options", "schema", "uiSchema", "formContext", "registry", "rawErrors"]); // If options.inputType is set use that as the input type
44508
+ inputProps = _objectWithoutProperties$1(props, ["value", "readonly", "disabled", "autofocus", "onBlur", "onFocus", "options", "schema", "uiSchema", "formContext", "registry", "rawErrors"]); // If options.inputType is set use that as the input type
41589
44509
 
41590
44510
 
41591
44511
  if (options.inputType) {
@@ -41630,7 +44550,7 @@ function BaseInput(props) {
41630
44550
  return props.onChange(value === "" ? options.emptyValue : value);
41631
44551
  };
41632
44552
 
41633
- return [react.createElement("input", _extends({
44553
+ return [react.createElement("input", _extends$1({
41634
44554
  key: inputProps.id,
41635
44555
  className: "form-control",
41636
44556
  readOnly: readonly,
@@ -41780,7 +44700,7 @@ function ColorWidget(props) {
41780
44700
  var disabled = props.disabled,
41781
44701
  readonly = props.readonly,
41782
44702
  BaseInput = props.registry.widgets.BaseInput;
41783
- return react.createElement(BaseInput, _extends({
44703
+ return react.createElement(BaseInput, _extends$1({
41784
44704
  type: "color"
41785
44705
  }, props, {
41786
44706
  disabled: disabled || readonly
@@ -41790,7 +44710,7 @@ function ColorWidget(props) {
41790
44710
  function DateWidget(props) {
41791
44711
  var _onChange = props.onChange,
41792
44712
  BaseInput = props.registry.widgets.BaseInput;
41793
- return react.createElement(BaseInput, _extends({
44713
+ return react.createElement(BaseInput, _extends$1({
41794
44714
  type: "date"
41795
44715
  }, props, {
41796
44716
  onChange: function onChange(value) {
@@ -41803,7 +44723,7 @@ function DateTimeWidget(props) {
41803
44723
  var value = props.value,
41804
44724
  _onChange = props.onChange,
41805
44725
  BaseInput = props.registry.widgets.BaseInput;
41806
- return react.createElement(BaseInput, _extends({
44726
+ return react.createElement(BaseInput, _extends$1({
41807
44727
  type: "datetime-local"
41808
44728
  }, props, {
41809
44729
  value: utcToLocal(value),
@@ -41815,7 +44735,7 @@ function DateTimeWidget(props) {
41815
44735
 
41816
44736
  function EmailWidget(props) {
41817
44737
  var BaseInput = props.registry.widgets.BaseInput;
41818
- return react.createElement(BaseInput, _extends({
44738
+ return react.createElement(BaseInput, _extends$1({
41819
44739
  type: "email"
41820
44740
  }, props));
41821
44741
  }
@@ -41896,7 +44816,7 @@ function (_Component) {
41896
44816
 
41897
44817
  _this = _possibleConstructorReturn(this, _getPrototypeOf(FileWidget).call(this, props));
41898
44818
 
41899
- _defineProperty$1(_assertThisInitialized(_this), "onChange", function (event) {
44819
+ _defineProperty$2(_assertThisInitialized(_this), "onChange", function (event) {
41900
44820
  var _this$props = _this.props,
41901
44821
  multiple = _this$props.multiple,
41902
44822
  onChange = _this$props.onChange;
@@ -41982,7 +44902,7 @@ function HiddenWidget(_ref) {
41982
44902
 
41983
44903
  function PasswordWidget(props) {
41984
44904
  var BaseInput = props.registry.widgets.BaseInput;
41985
- return react.createElement(BaseInput, _extends({
44905
+ return react.createElement(BaseInput, _extends$1({
41986
44906
  type: "password"
41987
44907
  }, props));
41988
44908
  }
@@ -42050,7 +44970,7 @@ function RangeWidget(props) {
42050
44970
  BaseInput = props.registry.widgets.BaseInput;
42051
44971
  return react.createElement("div", {
42052
44972
  className: "field-range-wrapper"
42053
- }, react.createElement(BaseInput, _extends({
44973
+ }, react.createElement(BaseInput, _extends$1({
42054
44974
  type: "range"
42055
44975
  }, props, rangeSpec(schema))), react.createElement("span", {
42056
44976
  className: "range-view"
@@ -42213,14 +45133,14 @@ function TextWidget(props) {
42213
45133
 
42214
45134
  function URLWidget(props) {
42215
45135
  var BaseInput = props.registry.widgets.BaseInput;
42216
- return react.createElement(BaseInput, _extends({
45136
+ return react.createElement(BaseInput, _extends$1({
42217
45137
  type: "url"
42218
45138
  }, props));
42219
45139
  }
42220
45140
 
42221
45141
  function UpDownWidget(props) {
42222
45142
  var BaseInput = props.registry.widgets.BaseInput;
42223
- return react.createElement(BaseInput, _extends({
45143
+ return react.createElement(BaseInput, _extends$1({
42224
45144
  type: "number"
42225
45145
  }, props, rangeSpec(props.schema)));
42226
45146
  }
@@ -42375,13 +45295,13 @@ function createErrorHandler(formData) {
42375
45295
 
42376
45296
  if (isObject(formData)) {
42377
45297
  return keys$3(formData).reduce(function (acc, key) {
42378
- return _objectSpread({}, acc, _defineProperty$1({}, key, createErrorHandler(formData[key])));
45298
+ return _objectSpread({}, acc, _defineProperty$2({}, key, createErrorHandler(formData[key])));
42379
45299
  }, handler);
42380
45300
  }
42381
45301
 
42382
45302
  if (isArray$2(formData)) {
42383
45303
  return formData.reduce(function (acc, value, key) {
42384
- return _objectSpread({}, acc, _defineProperty$1({}, key, createErrorHandler(value)));
45304
+ return _objectSpread({}, acc, _defineProperty$2({}, key, createErrorHandler(value)));
42385
45305
  }, handler);
42386
45306
  }
42387
45307
 
@@ -42393,10 +45313,10 @@ function unwrapErrorHandler(errorHandler) {
42393
45313
  if (key === "addError") {
42394
45314
  return acc;
42395
45315
  } else if (key === "__errors") {
42396
- return _objectSpread({}, acc, _defineProperty$1({}, key, errorHandler[key]));
45316
+ return _objectSpread({}, acc, _defineProperty$2({}, key, errorHandler[key]));
42397
45317
  }
42398
45318
 
42399
- return _objectSpread({}, acc, _defineProperty$1({}, key, unwrapErrorHandler(errorHandler[key])));
45319
+ return _objectSpread({}, acc, _defineProperty$2({}, key, unwrapErrorHandler(errorHandler[key])));
42400
45320
  }, {});
42401
45321
  }
42402
45322
  /**
@@ -42532,9 +45452,9 @@ function isValid(schema, data) {
42532
45452
  }
42533
45453
  }
42534
45454
 
42535
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
45455
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof$1(key) === "symbol" ? key : String(key); }
42536
45456
 
42537
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
45457
+ function _toPrimitive(input, hint) { if (_typeof$1(input) !== "object" || input === null) return input; var prim = input[toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof$1(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
42538
45458
  var ADDITIONAL_PROPERTY_FLAG = "__additional_property";
42539
45459
  var widgetMap = {
42540
45460
  "boolean": {
@@ -42653,9 +45573,9 @@ function getWidget(schema, widget) {
42653
45573
  Widget.MergedWidget = function (_ref) {
42654
45574
  var _ref$options = _ref.options,
42655
45575
  options = _ref$options === void 0 ? {} : _ref$options,
42656
- props = _objectWithoutProperties(_ref, ["options"]);
45576
+ props = _objectWithoutProperties$1(_ref, ["options"]);
42657
45577
 
42658
- return react.createElement(Widget, _extends({
45578
+ return react.createElement(Widget, _extends$1({
42659
45579
  options: _objectSpread({}, defaultOptions, options)
42660
45580
  }, props));
42661
45581
  };
@@ -42669,7 +45589,7 @@ function getWidget(schema, widget) {
42669
45589
  }
42670
45590
 
42671
45591
  if (typeof widget !== "string") {
42672
- throw new Error("Unsupported widget definition: ".concat(_typeof(widget)));
45592
+ throw new Error("Unsupported widget definition: ".concat(_typeof$1(widget)));
42673
45593
  }
42674
45594
 
42675
45595
  if (registeredWidgets.hasOwnProperty(widget)) {
@@ -42842,7 +45762,7 @@ function mergeDefaultsWithFormData(defaults, formData) {
42842
45762
  return value;
42843
45763
  });
42844
45764
  } else if (isObject(formData)) {
42845
- var acc = _extends({}, defaults); // Prevent mutation of source object.
45765
+ var acc = _extends$1({}, defaults); // Prevent mutation of source object.
42846
45766
 
42847
45767
 
42848
45768
  return keys$3(formData).reduce(function (acc, key) {
@@ -42871,7 +45791,7 @@ function getUiOptions(uiSchema) {
42871
45791
  return _objectSpread({}, options, value);
42872
45792
  }
42873
45793
 
42874
- return _objectSpread({}, options, _defineProperty$1({}, key.substring(3), value));
45794
+ return _objectSpread({}, options, _defineProperty$2({}, key.substring(3), value));
42875
45795
  }, {});
42876
45796
  }
42877
45797
  function getDisplayLabel(schema, uiSchema, rootSchema) {
@@ -42902,13 +45822,13 @@ function isObject(thing) {
42902
45822
  return false;
42903
45823
  }
42904
45824
 
42905
- return _typeof(thing) === "object" && thing !== null && !isArray$2(thing);
45825
+ return _typeof$1(thing) === "object" && thing !== null && !isArray$2(thing);
42906
45826
  }
42907
45827
  function mergeObjects(obj1, obj2) {
42908
45828
  var concatArrays = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
42909
45829
 
42910
45830
  // Recursively merge deeply nested objects.
42911
- var acc = _extends({}, obj1); // Prevent mutation of source object.
45831
+ var acc = _extends$1({}, obj1); // Prevent mutation of source object.
42912
45832
 
42913
45833
 
42914
45834
  return keys$3(obj2).reduce(function (acc, key) {
@@ -43124,7 +46044,7 @@ var guessType = function guessType(value) {
43124
46044
  return "boolean";
43125
46045
  } else if (!isNaN(value)) {
43126
46046
  return "number";
43127
- } else if (_typeof(value) === "object") {
46047
+ } else if (_typeof$1(value) === "object") {
43128
46048
  return "object";
43129
46049
  } // Default to string if we can't figure it out
43130
46050
 
@@ -43193,7 +46113,7 @@ function resolveReference(schema, rootSchema, formData) {
43193
46113
  // Retrieve the referenced schema definition.
43194
46114
  var $refSchema = findSchemaDefinition(schema.$ref, rootSchema); // Drop the $ref property of the source schema.
43195
46115
 
43196
- var localSchema = _objectWithoutProperties(schema, ["$ref"]); // Update referenced schema definition with local schema properties.
46116
+ var localSchema = _objectWithoutProperties$1(schema, ["$ref"]); // Update referenced schema definition with local schema properties.
43197
46117
 
43198
46118
 
43199
46119
  return retrieveSchema(_objectSpread({}, $refSchema, localSchema), rootSchema, formData);
@@ -43218,7 +46138,7 @@ function retrieveSchema(schema) {
43218
46138
  console.warn("could not merge subschemas in allOf:\n" + e);
43219
46139
 
43220
46140
  var _resolvedSchema = resolvedSchema,
43221
- resolvedSchemaWithoutAllOf = _objectWithoutProperties(_resolvedSchema, ["allOf"]);
46141
+ resolvedSchemaWithoutAllOf = _objectWithoutProperties$1(_resolvedSchema, ["allOf"]);
43222
46142
 
43223
46143
  return resolvedSchemaWithoutAllOf;
43224
46144
  }
@@ -43237,7 +46157,7 @@ function resolveDependencies(schema, rootSchema, formData) {
43237
46157
  // Drop the dependencies from the source schema.
43238
46158
  var _schema$dependencies = schema.dependencies,
43239
46159
  dependencies = _schema$dependencies === void 0 ? {} : _schema$dependencies,
43240
- resolvedSchema = _objectWithoutProperties(schema, ["dependencies"]);
46160
+ resolvedSchema = _objectWithoutProperties$1(schema, ["dependencies"]);
43241
46161
 
43242
46162
  if ("oneOf" in resolvedSchema) {
43243
46163
  resolvedSchema = resolvedSchema.oneOf[getMatchingOption(formData, resolvedSchema.oneOf)];
@@ -43262,7 +46182,7 @@ function processDependencies(dependencies, resolvedSchema, rootSchema, formData)
43262
46182
  }
43263
46183
 
43264
46184
  var dependencyValue = dependencies[dependencyKey],
43265
- remainingDependencies = _objectWithoutProperties(dependencies, [dependencyKey].map(_toPropertyKey));
46185
+ remainingDependencies = _objectWithoutProperties$1(dependencies, [dependencyKey].map(_toPropertyKey));
43266
46186
 
43267
46187
  if (isArray$2(dependencyValue)) {
43268
46188
  resolvedSchema = withDependentProperties(resolvedSchema, dependencyValue);
@@ -43290,14 +46210,14 @@ function withDependentProperties(schema, additionallyRequired) {
43290
46210
  function withDependentSchema(schema, rootSchema, formData, dependencyKey, dependencyValue) {
43291
46211
  var _retrieveSchema = retrieveSchema(dependencyValue, rootSchema, formData),
43292
46212
  oneOf = _retrieveSchema.oneOf,
43293
- dependentSchema = _objectWithoutProperties(_retrieveSchema, ["oneOf"]);
46213
+ dependentSchema = _objectWithoutProperties$1(_retrieveSchema, ["oneOf"]);
43294
46214
 
43295
46215
  schema = mergeSchemas(schema, dependentSchema); // Since it does not contain oneOf, we return the original schema.
43296
46216
 
43297
46217
  if (oneOf === undefined) {
43298
46218
  return schema;
43299
46219
  } else if (!isArray$2(oneOf)) {
43300
- throw new Error("invalid: it is some ".concat(_typeof(oneOf), " instead of an array"));
46220
+ throw new Error("invalid: it is some ".concat(_typeof$1(oneOf), " instead of an array"));
43301
46221
  } // Resolve $refs inside oneOf.
43302
46222
 
43303
46223
 
@@ -43318,7 +46238,7 @@ function withExactlyOneSubschema(schema, rootSchema, formData, dependencyKey, on
43318
46238
  if (conditionPropertySchema) {
43319
46239
  var conditionSchema = {
43320
46240
  type: "object",
43321
- properties: _defineProperty$1({}, dependencyKey, conditionPropertySchema)
46241
+ properties: _defineProperty$2({}, dependencyKey, conditionPropertySchema)
43322
46242
  };
43323
46243
 
43324
46244
  var _validateFormData = validateFormData(formData, conditionSchema),
@@ -43336,7 +46256,7 @@ function withExactlyOneSubschema(schema, rootSchema, formData, dependencyKey, on
43336
46256
  var subschema = validSubschemas[0];
43337
46257
 
43338
46258
  var _subschema$properties = subschema.properties,
43339
- dependentSubschema = _objectWithoutProperties(_subschema$properties, [dependencyKey].map(_toPropertyKey));
46259
+ dependentSubschema = _objectWithoutProperties$1(_subschema$properties, [dependencyKey].map(_toPropertyKey));
43340
46260
 
43341
46261
  var dependentSchema = _objectSpread({}, subschema, {
43342
46262
  properties: dependentSubschema
@@ -43351,7 +46271,7 @@ function withExactlyOneSubschema(schema, rootSchema, formData, dependencyKey, on
43351
46271
 
43352
46272
 
43353
46273
  function mergeSchemas(obj1, obj2) {
43354
- var acc = _extends({}, obj1); // Prevent mutation of source object.
46274
+ var acc = _extends$1({}, obj1); // Prevent mutation of source object.
43355
46275
 
43356
46276
 
43357
46277
  return keys$3(obj2).reduce(function (acc, key) {
@@ -43389,7 +46309,7 @@ function deepEquals(a, b) {
43389
46309
  // Assume all functions are equivalent
43390
46310
  // see https://github.com/rjsf-team/react-jsonschema-form/issues/255
43391
46311
  return true;
43392
- } else if (_typeof(a) !== "object" || _typeof(b) !== "object") {
46312
+ } else if (_typeof$1(a) !== "object" || _typeof$1(b) !== "object") {
43393
46313
  return false;
43394
46314
  } else if (a === null || b === null) {
43395
46315
  return false;
@@ -43651,7 +46571,7 @@ function getMatchingOption(formData, options, rootSchema) {
43651
46571
 
43652
46572
  if (option.anyOf) {
43653
46573
  // Create a shallow clone of the option
43654
- var shallowClone = _extends({}, option);
46574
+ var shallowClone = _extends$1({}, option);
43655
46575
 
43656
46576
  if (!shallowClone.allOf) {
43657
46577
  shallowClone.allOf = [];
@@ -43663,7 +46583,7 @@ function getMatchingOption(formData, options, rootSchema) {
43663
46583
  shallowClone.allOf.push(requiresAnyOf);
43664
46584
  augmentedSchema = shallowClone;
43665
46585
  } else {
43666
- augmentedSchema = _extends({}, option, requiresAnyOf);
46586
+ augmentedSchema = _extends$1({}, option, requiresAnyOf);
43667
46587
  } // Remove the "required" field as it's likely that not all fields have
43668
46588
  // been filled in yet, which will mean that the schema is not valid
43669
46589
 
@@ -43941,10 +46861,10 @@ function SchemaFieldRender(props) {
43941
46861
  var displayLabel = getDisplayLabel(schema, uiSchema, rootSchema);
43942
46862
 
43943
46863
  var __errors = errorSchema.__errors,
43944
- fieldErrorSchema = _objectWithoutProperties(errorSchema, ["__errors"]); // See #439: uiSchema: Don't pass consumed class names to child components
46864
+ fieldErrorSchema = _objectWithoutProperties$1(errorSchema, ["__errors"]); // See #439: uiSchema: Don't pass consumed class names to child components
43945
46865
 
43946
46866
 
43947
- var field = react.createElement(FieldComponent, _extends({}, props, {
46867
+ var field = react.createElement(FieldComponent, _extends$1({}, props, {
43948
46868
  idSchema: idSchema,
43949
46869
  schema: schema,
43950
46870
  uiSchema: _objectSpread({}, uiSchema, {
@@ -44940,7 +47860,7 @@ function isInteger(data) {
44940
47860
  return Number.isInteger(Number(data));
44941
47861
  }
44942
47862
 
44943
- const formCss = "@charset \"UTF-8\";.form-group{min-width:0}.limel-form-array-item--simple{display:flex;align-items:center;padding-bottom:var(--form-row-gap, 1rem)}.limel-form-array-item--simple *:first-child{flex-grow:1}limel-code-editor{margin-bottom:0.75rem}.limel-form-array-item--object{margin-bottom:0.25rem}.limel-form-layout--default{display:grid;column-gap:var(--form-column-gap, 1rem);row-gap:var(--form-row-gap, 1rem);padding:var(--form-body-padding, 1rem)}.limel-form-layout--grid{--min-height-of-one-row:2.5rem;display:grid;column-gap:var(--form-column-gap, 1rem);row-gap:var(--form-row-gap, 1rem);padding:var(--form-body-padding, 1rem);grid-template-columns:repeat(var(--number-of-columns), minmax(0, 1fr))}.limel-form-layout--grid.auto-reorder-to-avoid-empty-cells{grid-auto-flow:dense}.limel-form-layout--grid.layout-1-columns .limel-form-layout-colspan--1,.limel-form-layout--grid.layout-1-columns .limel-form-layout-colspan--2,.limel-form-layout--grid.layout-1-columns .limel-form-layout-colspan--3,.limel-form-layout--grid.layout-1-columns .limel-form-layout-colspan--4,.limel-form-layout--grid.layout-1-columns .limel-form-layout-colspan--5{grid-column:span 1}.limel-form-layout--grid.layout-2-columns .limel-form-layout-colspan--1{grid-column:span 1}.limel-form-layout--grid.layout-2-columns .limel-form-layout-colspan--2,.limel-form-layout--grid.layout-2-columns .limel-form-layout-colspan--3,.limel-form-layout--grid.layout-2-columns .limel-form-layout-colspan--4,.limel-form-layout--grid.layout-2-columns .limel-form-layout-colspan--5{grid-column:span 2}.limel-form-layout--grid.layout-3-columns .limel-form-layout-colspan--1{grid-column:span 1}.limel-form-layout--grid.layout-3-columns .limel-form-layout-colspan--2{grid-column:span 2}.limel-form-layout--grid.layout-3-columns .limel-form-layout-colspan--3,.limel-form-layout--grid.layout-3-columns .limel-form-layout-colspan--4,.limel-form-layout--grid.layout-3-columns .limel-form-layout-colspan--5{grid-column:span 3}.limel-form-layout--grid.layout-4-columns .limel-form-layout-colspan--1{grid-column:span 1}.limel-form-layout--grid.layout-4-columns .limel-form-layout-colspan--2{grid-column:span 2}.limel-form-layout--grid.layout-4-columns .limel-form-layout-colspan--3{grid-column:span 3}.limel-form-layout--grid.layout-4-columns .limel-form-layout-colspan--4,.limel-form-layout--grid.layout-4-columns .limel-form-layout-colspan--5{grid-column:span 4}.limel-form-layout--grid.layout-5-columns .limel-form-layout-colspan--1{grid-column:span 1}.limel-form-layout--grid.layout-5-columns .limel-form-layout-colspan--2{grid-column:span 2}.limel-form-layout--grid.layout-5-columns .limel-form-layout-colspan--3{grid-column:span 3}.limel-form-layout--grid.layout-5-columns .limel-form-layout-colspan--4{grid-column:span 4}.limel-form-layout--grid.layout-5-columns .limel-form-layout-colspan--5{grid-column:span 5}.limel-form-layout--grid .limel-form-layout-colspan--all{grid-column:1/-1}.limel-form-layout--grid limel-checkbox,.limel-form-layout--grid limel-switch{min-height:var(--min-height-of-one-row)}.limel-form-layout--grid limel-checkbox{display:block}.limel-form-layout--grid limel-switch{margin-left:0.5rem}.form-error{color:var(--limel-theme-error-color);font-size:0.6875rem;line-height:1.5;visibility:inherit;padding-right:1rem;padding-left:1rem;padding-top:0.25rem}.button-add-new{margin-top:0.5rem;width:100%}h1{position:relative;margin-top:0;margin-bottom:0;word-break:break-word;hyphens:auto;-webkit-hyphens:auto;text-wrap:balance;font-size:var(--limel-form-h1-font-size);line-height:calc(var(--limel-form-h1-font-size) * 1.42857);letter-spacing:-0.01rem;font-weight:500}p{margin-top:0;margin-bottom:0.75rem;font-size:var(--limel-theme-default-font-size)}p+limel-collapsible-section,p+.limel-form-array-item--simple,h1+limel-collapsible-section,h1+.limel-form-array-item--simple{margin-top:1rem}.form-group{position:relative}.form-group limel-help{position:absolute;top:calc(var(--form-row-gap, 1rem) * -0.5);left:calc(var(--form-column-gap, 1rem) * -0.5)}.form-group h1,.form-group p{color:rgb(var(--contrast-1400), 0.8)}.form-group h1{--limel-form-h1-font-size:1.476rem;font-weight:800}.form-group .form-group h1{--limel-form-h1-font-size:1.383rem;font-weight:700}.form-group .form-group h1:before{content:\"\";display:block;position:absolute;top:0;bottom:0;margin:auto;left:-0.75rem;background-color:var(--lime-primary-color, var(--limel-theme-primary-color));width:0.125rem;height:1.5rem;border-radius:0.125rem;opacity:0.6}.form-group .form-group .form-group h1{--limel-form-h1-font-size:1.296rem;font-weight:600}.form-group .form-group .form-group h1:before{display:none}.form-group .form-group .form-group .form-group h1{--limel-form-h1-font-size:1.215rem}.form-group .form-group .form-group .form-group h1:before{display:none}.form-group .form-group .form-group .form-group .form-group h1{--limel-form-h1-font-size:1.138rem}.form-group .form-group .form-group .form-group .form-group h1:before{display:none}.form-group .form-group .form-group .form-group .form-group .form-group h1{--limel-form-h1-font-size:1.067rem}.form-group .form-group .form-group .form-group .form-group .form-group h1:before{display:none}.limel-form-row--layout{--limel-form-row-border-radius:0.375rem;--limel-form-row-icon-size:1.75rem;--limel-form-row-main-information-gap:0.5rem;display:flex;flex-direction:column}.limel-form-row--layout .row{display:flex;gap:0.5rem;flex-direction:column;padding:0.5rem 1rem}.limel-form-row--layout .row:nth-child(odd){background-color:var(--form-background-color-of-odd-rows, rgb(var(--contrast-200)))}.limel-form-row--layout .row:nth-child(even){background-color:var(--form-background-color-of-even-rows, transparent)}.limel-form-row--layout .row:first-child{border-radius:var(--limel-form-row-border-radius) var(--limel-form-row-border-radius) 0 0}.limel-form-row--layout .row:last-child{border-radius:0 0 var(--limel-form-row-border-radius) var(--limel-form-row-border-radius)}.limel-form-row--layout .main-information{position:relative;display:flex;flex-direction:row;align-items:center;gap:var(--limel-form-row-main-information-gap);min-width:0}.limel-form-row--layout .main-information{position:relative}.limel-form-row--layout .main-information>.form-group.field{position:unset}.limel-form-row--layout .main-information>.form-group.field limel-help{top:0}.limel-form-row--layout limel-icon{color:rgb(var(--contrast-1200));width:var(--limel-form-row-icon-size);flex-shrink:0;min-width:0}.limel-form-row--layout .title{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin:0;font-weight:normal;flex-grow:1;color:var(--limel-theme-on-surface-color);font-size:0.875rem}.limel-form-row--layout .description{margin:0;color:var(--limel-theme-text-secondary-on-background-color);font-size:var(--limel-theme-default-small-font-size);line-height:1.5}.limel-form-row--layout .has-icon .description{padding-left:calc(var(--limel-form-row-icon-size) + var(--limel-form-row-main-information-gap))}.limel-form-row--layout .form-group.field{flex-shrink:0;display:flex;align-content:center}.limel-form-row--layout .form-group.field limel-slider{min-width:8rem;display:block}";
47863
+ const formCss = "@charset \"UTF-8\";*,*::after,*::before{box-sizing:border-box}.form-group{min-width:0}.limel-form-array-item--simple{display:flex;align-items:center;padding:0.25rem}.limel-form-array-item--simple>*:first-child{flex:1;min-width:0}.array-items{isolation:isolate;display:flex;flex-direction:column;row-gap:var(--form-row-gap, 0.5rem);margin-top:1rem}.array-items.has-an-item-which-is-being-dragged limel-collapsible-section{--limel-cs-grid-template-rows:0fr;--limel-cs-opacity-transition-speed:0.2s;--limel-cs-grid-template-rows-transition-speed:0.2s;--limel-cs-open-header-bottom-border-radius:0.75rem}.array-item:has(limel-drag-handle:hover),.array-item:has(limel-drag-handle:focus-within),.array-item.is-elevated,.array-item.sortable-chosen{will-change:transform, box-shadow, border-radius, background-color}.array-item.sortable-ghost{border-radius:0.5rem;box-shadow:var(--shadow-depth-64), 0 0.65rem 0.75rem -0.425rem rgb(var(--color-black), 0.3)}.array-item.sortable-chosen{border-radius:0.5rem;background-color:var(--lime-elevated-surface-background-color)}.array-item.is-elevated[draggable=false]{animation:sit-here 0.8s forwards}@keyframes sit-here{0%{border-radius:0.5rem;background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--shadow-depth-64), 0 0.65rem 0.75rem -0.425rem rgb(var(--color-black), 0.3)}100%{box-shadow:none}}limel-drag-handle{order:10}limel-collapsible-section.is-being-dragged{border-radius:0.75rem !important}.limel-form-layout--default{display:grid;column-gap:var(--form-column-gap, 1rem);row-gap:var(--form-row-gap, 1rem);padding:var(--form-body-padding, 1rem)}.limel-form-layout--grid{--min-height-of-one-row:2.5rem;display:grid;column-gap:var(--form-column-gap, 1rem);row-gap:var(--form-row-gap, 1rem);padding:var(--form-body-padding, 1rem);grid-template-columns:repeat(var(--number-of-columns), minmax(0, 1fr))}.limel-form-layout--grid.auto-reorder-to-avoid-empty-cells{grid-auto-flow:dense}.limel-form-layout--grid.layout-1-columns .limel-form-layout-colspan--1,.limel-form-layout--grid.layout-1-columns .limel-form-layout-colspan--2,.limel-form-layout--grid.layout-1-columns .limel-form-layout-colspan--3,.limel-form-layout--grid.layout-1-columns .limel-form-layout-colspan--4,.limel-form-layout--grid.layout-1-columns .limel-form-layout-colspan--5{grid-column:span 1}.limel-form-layout--grid.layout-2-columns .limel-form-layout-colspan--1{grid-column:span 1}.limel-form-layout--grid.layout-2-columns .limel-form-layout-colspan--2,.limel-form-layout--grid.layout-2-columns .limel-form-layout-colspan--3,.limel-form-layout--grid.layout-2-columns .limel-form-layout-colspan--4,.limel-form-layout--grid.layout-2-columns .limel-form-layout-colspan--5{grid-column:span 2}.limel-form-layout--grid.layout-3-columns .limel-form-layout-colspan--1{grid-column:span 1}.limel-form-layout--grid.layout-3-columns .limel-form-layout-colspan--2{grid-column:span 2}.limel-form-layout--grid.layout-3-columns .limel-form-layout-colspan--3,.limel-form-layout--grid.layout-3-columns .limel-form-layout-colspan--4,.limel-form-layout--grid.layout-3-columns .limel-form-layout-colspan--5{grid-column:span 3}.limel-form-layout--grid.layout-4-columns .limel-form-layout-colspan--1{grid-column:span 1}.limel-form-layout--grid.layout-4-columns .limel-form-layout-colspan--2{grid-column:span 2}.limel-form-layout--grid.layout-4-columns .limel-form-layout-colspan--3{grid-column:span 3}.limel-form-layout--grid.layout-4-columns .limel-form-layout-colspan--4,.limel-form-layout--grid.layout-4-columns .limel-form-layout-colspan--5{grid-column:span 4}.limel-form-layout--grid.layout-5-columns .limel-form-layout-colspan--1{grid-column:span 1}.limel-form-layout--grid.layout-5-columns .limel-form-layout-colspan--2{grid-column:span 2}.limel-form-layout--grid.layout-5-columns .limel-form-layout-colspan--3{grid-column:span 3}.limel-form-layout--grid.layout-5-columns .limel-form-layout-colspan--4{grid-column:span 4}.limel-form-layout--grid.layout-5-columns .limel-form-layout-colspan--5{grid-column:span 5}.limel-form-layout--grid .limel-form-layout-colspan--all{grid-column:1/-1}.limel-form-layout--grid limel-checkbox,.limel-form-layout--grid limel-switch{min-height:var(--min-height-of-one-row)}.limel-form-layout--grid limel-checkbox{display:block}.limel-form-layout--grid limel-switch{margin-left:0.5rem}.form-error{color:var(--limel-theme-error-color);font-size:0.6875rem;line-height:1.5;visibility:inherit;padding-right:1rem;padding-left:1rem;padding-top:0.25rem}.button-add-new{margin-top:0.5rem;width:100%}h1{position:relative;margin-top:0;margin-bottom:0;word-break:break-word;hyphens:auto;-webkit-hyphens:auto;text-wrap:balance;font-size:var(--limel-form-h1-font-size);line-height:calc(var(--limel-form-h1-font-size) * 1.42857);letter-spacing:-0.01rem;font-weight:500}limel-markdown{display:block;margin-bottom:0.5rem}.form-group{position:relative}.form-group limel-help{position:absolute;top:calc(var(--form-row-gap, 1rem) * -0.5);left:calc(var(--form-column-gap, 1rem) * -0.5)}.form-group h1{color:rgb(var(--contrast-1400), 0.8)}.form-group h1{--limel-form-h1-font-size:1.476rem;font-weight:800}.form-group .form-group h1{--limel-form-h1-font-size:1.383rem;font-weight:700}.form-group .form-group h1:before{content:\"\";display:block;position:absolute;top:0;bottom:0;margin:auto;left:-0.75rem;background-color:var(--lime-primary-color, var(--limel-theme-primary-color));width:0.125rem;height:1.5rem;border-radius:0.125rem;opacity:0.6}.form-group .form-group .form-group h1{--limel-form-h1-font-size:1.296rem;font-weight:600}.form-group .form-group .form-group h1:before{display:none}.form-group .form-group .form-group .form-group h1{--limel-form-h1-font-size:1.215rem}.form-group .form-group .form-group .form-group h1:before{display:none}.form-group .form-group .form-group .form-group .form-group h1{--limel-form-h1-font-size:1.138rem}.form-group .form-group .form-group .form-group .form-group h1:before{display:none}.form-group .form-group .form-group .form-group .form-group .form-group h1{--limel-form-h1-font-size:1.067rem}.form-group .form-group .form-group .form-group .form-group .form-group h1:before{display:none}.limel-form-row--layout{--limel-form-row-border-radius:0.375rem;--limel-form-row-icon-size:1.75rem;--limel-form-row-main-information-gap:0.5rem;display:flex;flex-direction:column}.limel-form-row--layout .row{display:flex;gap:0.5rem;flex-direction:column;padding:0.5rem 1rem}.limel-form-row--layout .row:nth-child(odd){background-color:var(--form-background-color-of-odd-rows, rgb(var(--contrast-200)))}.limel-form-row--layout .row:nth-child(even){background-color:var(--form-background-color-of-even-rows, transparent)}.limel-form-row--layout .row:first-child{border-radius:var(--limel-form-row-border-radius) var(--limel-form-row-border-radius) 0 0}.limel-form-row--layout .row:last-child{border-radius:0 0 var(--limel-form-row-border-radius) var(--limel-form-row-border-radius)}.limel-form-row--layout .main-information{position:relative;display:flex;flex-direction:row;align-items:center;gap:var(--limel-form-row-main-information-gap);min-width:0}.limel-form-row--layout .main-information{position:relative}.limel-form-row--layout .main-information>.form-group.field{position:unset}.limel-form-row--layout .main-information>.form-group.field limel-help{top:0}.limel-form-row--layout limel-icon{color:rgb(var(--contrast-1200));width:var(--limel-form-row-icon-size);flex-shrink:0;min-width:0}.limel-form-row--layout .title{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin:0;font-weight:normal;flex-grow:1;color:var(--limel-theme-on-surface-color);font-size:0.875rem}.limel-form-row--layout .description{margin:0;color:var(--limel-theme-text-secondary-on-background-color);font-size:var(--limel-theme-default-small-font-size);line-height:1.5}.limel-form-row--layout .has-icon .description{padding-left:calc(var(--limel-form-row-icon-size) + var(--limel-form-row-main-information-gap))}.limel-form-row--layout .form-group.field{flex-shrink:0;display:flex;align-content:center}.limel-form-row--layout .form-group.field limel-slider{min-width:8rem;display:block}";
44944
47864
 
44945
47865
  const Form = class {
44946
47866
  constructor(hostRef) {