@siemens/ix 1.0.0-beta.2

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 (703) hide show
  1. package/LICENSE +21 -0
  2. package/dist/cjs/_commonjsHelpers-1a0c346f.js +23 -0
  3. package/dist/cjs/animation-dfe01edc.js +19 -0
  4. package/dist/cjs/anime.es-8822f296.js +1311 -0
  5. package/dist/cjs/base-button-eb1d47db.js +33 -0
  6. package/dist/cjs/default-tree-item-4597cd84.js +22 -0
  7. package/dist/cjs/flip-tile-state-c95639e5.js +18 -0
  8. package/dist/cjs/index-1e4a348f.js +1849 -0
  9. package/dist/cjs/index.cjs.js +96 -0
  10. package/dist/cjs/ix-animated-tab_2.cjs.entry.js +217 -0
  11. package/dist/cjs/ix-application-header.cjs.entry.js +19 -0
  12. package/dist/cjs/ix-basic-navigation.cjs.entry.js +44 -0
  13. package/dist/cjs/ix-blind.cjs.entry.js +89 -0
  14. package/dist/cjs/ix-breadcrumb_2.cjs.entry.js +155 -0
  15. package/dist/cjs/ix-button.cjs.entry.js +50 -0
  16. package/dist/cjs/ix-category-filter.cjs.entry.js +399 -0
  17. package/dist/cjs/ix-chip.cjs.entry.js +47 -0
  18. package/dist/cjs/ix-counter-pill.cjs.entry.js +40 -0
  19. package/dist/cjs/ix-date-picker_2.cjs.entry.js +8881 -0
  20. package/dist/cjs/ix-date-time-card.cjs.entry.js +36 -0
  21. package/dist/cjs/ix-datetime-picker.cjs.entry.js +44 -0
  22. package/dist/cjs/ix-drawer.cjs.entry.js +122 -0
  23. package/dist/cjs/ix-dropdown_2.cjs.entry.js +203 -0
  24. package/dist/cjs/ix-event-list_2.cjs.entry.js +151 -0
  25. package/dist/cjs/ix-expanding-search.cjs.entry.js +91 -0
  26. package/dist/cjs/ix-filter-chip.cjs.entry.js +30 -0
  27. package/dist/cjs/ix-flip-tile_2.cjs.entry.js +79 -0
  28. package/dist/cjs/ix-group_3.cjs.entry.js +174 -0
  29. package/dist/cjs/ix-icon-button.cjs.entry.js +40 -0
  30. package/dist/cjs/ix-icon.cjs.entry.js +33 -0
  31. package/dist/cjs/ix-input-group.cjs.entry.js +40 -0
  32. package/dist/cjs/ix-kpi.cjs.entry.js +50 -0
  33. package/dist/cjs/ix-map-navigation_2.cjs.entry.js +190 -0
  34. package/dist/cjs/ix-menu_9.cjs.entry.js +872 -0
  35. package/dist/cjs/ix-message-bar.cjs.entry.js +58 -0
  36. package/dist/cjs/ix-modal-example.cjs.entry.js +24 -0
  37. package/dist/cjs/ix-modal_2.cjs.entry.js +14 -0
  38. package/dist/cjs/ix-pill.cjs.entry.js +40 -0
  39. package/dist/cjs/ix-select_2.cjs.entry.js +309 -0
  40. package/dist/cjs/ix-spinner.cjs.entry.js +30 -0
  41. package/dist/cjs/ix-split-button_2.cjs.entry.js +114 -0
  42. package/dist/cjs/ix-tab-item.cjs.entry.js +67 -0
  43. package/dist/cjs/ix-tabs.cjs.entry.js +187 -0
  44. package/dist/cjs/ix-tile.cjs.entry.js +27 -0
  45. package/dist/cjs/ix-toast_2.cjs.entry.js +155 -0
  46. package/dist/cjs/ix-toggle.cjs.entry.js +82 -0
  47. package/dist/cjs/ix-tree_2.cjs.entry.js +690 -0
  48. package/dist/cjs/ix-upload.cjs.entry.js +139 -0
  49. package/dist/cjs/ix-validation-tooltip.cjs.entry.js +107 -0
  50. package/dist/cjs/ix-workflow-step.cjs.entry.js +114 -0
  51. package/dist/cjs/ix-workflow-steps.cjs.entry.js +83 -0
  52. package/dist/cjs/loader.cjs.js +21 -0
  53. package/dist/cjs/logical-filter-operator-467e2faf.js +35 -0
  54. package/dist/cjs/modal-5be2b1a3.js +221 -0
  55. package/dist/cjs/modal-utils-5d7bb217.js +42 -0
  56. package/dist/cjs/mutation-observer-29bedada.js +13 -0
  57. package/dist/cjs/my-component.cjs.entry.js +19 -0
  58. package/dist/cjs/popper-d7a0f999.js +1801 -0
  59. package/dist/cjs/rwd.util-482d41d4.js +42 -0
  60. package/dist/cjs/siemens-ix.cjs.js +19 -0
  61. package/dist/cjs/typed-event-8f5a32a2.js +46 -0
  62. package/dist/cjs/upload-file-state-923b2c65.js +17 -0
  63. package/dist/collection/collection-manifest.json +258 -0
  64. package/dist/collection/components/animated-tab/animated-tab.css +14 -0
  65. package/dist/collection/components/animated-tab/animated-tab.js +59 -0
  66. package/dist/collection/components/animated-tabs/animated-tabs.css +158 -0
  67. package/dist/collection/components/animated-tabs/animated-tabs.js +303 -0
  68. package/dist/collection/components/application-header/application-header.css +29 -0
  69. package/dist/collection/components/application-header/application-header.js +45 -0
  70. package/dist/collection/components/basic-navigation/basic-navigation.css +29 -0
  71. package/dist/collection/components/basic-navigation/basic-navigation.js +91 -0
  72. package/dist/collection/components/blind/blind.css +146 -0
  73. package/dist/collection/components/blind/blind.js +152 -0
  74. package/dist/collection/components/breadcrumb/breadcrumb.css +228 -0
  75. package/dist/collection/components/breadcrumb/breadcrumb.js +252 -0
  76. package/dist/collection/components/breadcrumb-item/breadcrumb-item.css +11 -0
  77. package/dist/collection/components/breadcrumb-item/breadcrumb-item.js +59 -0
  78. package/dist/collection/components/button/base-button.js +29 -0
  79. package/dist/collection/components/button/button.css +12 -0
  80. package/dist/collection/components/button/button.js +192 -0
  81. package/dist/collection/components/category-filter/category-filter.css +189 -0
  82. package/dist/collection/components/category-filter/category-filter.js +704 -0
  83. package/dist/collection/components/category-filter/filter-state.js +10 -0
  84. package/dist/collection/components/category-filter/input-state.js +17 -0
  85. package/dist/collection/components/category-filter/logical-filter-operator.js +13 -0
  86. package/dist/collection/components/chip/chip.css +475 -0
  87. package/dist/collection/components/chip/chip.js +197 -0
  88. package/dist/collection/components/counter-pill/counter-pill.css +313 -0
  89. package/dist/collection/components/counter-pill/counter-pill.js +137 -0
  90. package/dist/collection/components/date-picker/date-picker.css +222 -0
  91. package/dist/collection/components/date-picker/date-picker.js +365 -0
  92. package/dist/collection/components/date-time-card/date-time-card.css +49 -0
  93. package/dist/collection/components/date-time-card/date-time-card.js +89 -0
  94. package/dist/collection/components/datetime-picker/datetime-picker.css +35 -0
  95. package/dist/collection/components/datetime-picker/datetime-picker.js +161 -0
  96. package/dist/collection/components/drawer/drawer.css +78 -0
  97. package/dist/collection/components/drawer/drawer.js +300 -0
  98. package/dist/collection/components/dropdown/dropdown.css +536 -0
  99. package/dist/collection/components/dropdown/dropdown.js +392 -0
  100. package/dist/collection/components/dropdown-item/dropdown-item.css +61 -0
  101. package/dist/collection/components/dropdown-item/dropdown-item.js +187 -0
  102. package/dist/collection/components/event-list/event-list.css +58 -0
  103. package/dist/collection/components/event-list/event-list.js +197 -0
  104. package/dist/collection/components/event-list-item/event-list-item.css +109 -0
  105. package/dist/collection/components/event-list-item/event-list-item.js +162 -0
  106. package/dist/collection/components/expanding-search/expanding-search.css +124 -0
  107. package/dist/collection/components/expanding-search/expanding-search.js +177 -0
  108. package/dist/collection/components/filter-chip/filter-chip.css +82 -0
  109. package/dist/collection/components/filter-chip/filter-chip.js +74 -0
  110. package/dist/collection/components/flip-tile/flip-tile-state.js +16 -0
  111. package/dist/collection/components/flip-tile/flip-tile.css +143 -0
  112. package/dist/collection/components/flip-tile/flip-tile.js +125 -0
  113. package/dist/collection/components/flip-tile-content/flip-tile-content.css +12 -0
  114. package/dist/collection/components/flip-tile-content/flip-tile-content.js +23 -0
  115. package/dist/collection/components/group/group.css +170 -0
  116. package/dist/collection/components/group/group.js +329 -0
  117. package/dist/collection/components/group-dropdown-item/group-dropdown-item.css +11 -0
  118. package/dist/collection/components/group-dropdown-item/group-dropdown-item.js +60 -0
  119. package/dist/collection/components/group-item/group-item.css +116 -0
  120. package/dist/collection/components/group-item/group-item.js +200 -0
  121. package/dist/collection/components/icon/icon.css +45 -0
  122. package/dist/collection/components/icon/icon.js +91 -0
  123. package/dist/collection/components/icon-button/icon-button.js +242 -0
  124. package/dist/collection/components/input-group/input-group.css +27 -0
  125. package/dist/collection/components/input-group/input-group.js +48 -0
  126. package/dist/collection/components/kpi/kpi.css +131 -0
  127. package/dist/collection/components/kpi/kpi.js +151 -0
  128. package/dist/collection/components/map-navigation/map-navigation.css +161 -0
  129. package/dist/collection/components/map-navigation/map-navigation.js +355 -0
  130. package/dist/collection/components/map-navigation-overlay/map-navigation-overlay.css +237 -0
  131. package/dist/collection/components/map-navigation-overlay/map-navigation-overlay.js +105 -0
  132. package/dist/collection/components/menu/menu.css +128 -0
  133. package/dist/collection/components/menu/menu.js +969 -0
  134. package/dist/collection/components/menu-about/menu-about.css +207 -0
  135. package/dist/collection/components/menu-about/menu-about.js +188 -0
  136. package/dist/collection/components/menu-about-item/menu-about-item.css +12 -0
  137. package/dist/collection/components/menu-about-item/menu-about-item.js +42 -0
  138. package/dist/collection/components/menu-about-news/menu-about-news.css +99 -0
  139. package/dist/collection/components/menu-about-news/menu-about-news.js +204 -0
  140. package/dist/collection/components/menu-avatar/menu-avatar.css +91 -0
  141. package/dist/collection/components/menu-avatar/menu-avatar.js +136 -0
  142. package/dist/collection/components/menu-avatar-item/menu-avatar-item.css +12 -0
  143. package/dist/collection/components/menu-avatar-item/menu-avatar-item.js +79 -0
  144. package/dist/collection/components/menu-item/menu-item.css +140 -0
  145. package/dist/collection/components/menu-item/menu-item.js +166 -0
  146. package/dist/collection/components/menu-settings/menu-settings.css +204 -0
  147. package/dist/collection/components/menu-settings/menu-settings.js +151 -0
  148. package/dist/collection/components/menu-settings-item/menu-settings-item.css +13 -0
  149. package/dist/collection/components/menu-settings-item/menu-settings-item.js +42 -0
  150. package/dist/collection/components/message-bar/message-bar.css +68 -0
  151. package/dist/collection/components/message-bar/message-bar.js +125 -0
  152. package/dist/collection/components/modal/modal-utils.js +36 -0
  153. package/dist/collection/components/modal/modal.css +96 -0
  154. package/dist/collection/components/modal/modal.js +540 -0
  155. package/dist/collection/components/modal-container/modal-container.css +14 -0
  156. package/dist/collection/components/modal-container/modal-container.js +107 -0
  157. package/dist/collection/components/my-component/example-modal.js +31 -0
  158. package/dist/collection/components/my-component/my-component.css +34 -0
  159. package/dist/collection/components/my-component/my-component.js +22 -0
  160. package/dist/collection/components/pill/pill.css +269 -0
  161. package/dist/collection/components/pill/pill.js +155 -0
  162. package/dist/collection/components/select/select.css +176 -0
  163. package/dist/collection/components/select/select.js +509 -0
  164. package/dist/collection/components/select-item/select-item.css +14 -0
  165. package/dist/collection/components/select-item/select-item.js +169 -0
  166. package/dist/collection/components/spinner/spinner.css +42 -0
  167. package/dist/collection/components/spinner/spinner.js +137 -0
  168. package/dist/collection/components/split-button/split-button.css +11 -0
  169. package/dist/collection/components/split-button/split-button.js +310 -0
  170. package/dist/collection/components/split-button-item/split-button-item.css +12 -0
  171. package/dist/collection/components/split-button-item/split-button-item.js +79 -0
  172. package/dist/collection/components/tab-item/tab-item.css +195 -0
  173. package/dist/collection/components/tab-item/tab-item.js +219 -0
  174. package/dist/collection/components/tabs/tabs.css +84 -0
  175. package/dist/collection/components/tabs/tabs.js +305 -0
  176. package/dist/collection/components/tile/tile.css +92 -0
  177. package/dist/collection/components/tile/tile.js +60 -0
  178. package/dist/collection/components/time-picker/time-picker.css +94 -0
  179. package/dist/collection/components/time-picker/time-picker.js +274 -0
  180. package/dist/collection/components/toast/toast-container.js +170 -0
  181. package/dist/collection/components/toast/toast-utils.js +40 -0
  182. package/dist/collection/components/toast/toast.css +110 -0
  183. package/dist/collection/components/toast/toast.js +232 -0
  184. package/dist/collection/components/toggle/toggle.css +226 -0
  185. package/dist/collection/components/toggle/toggle.js +263 -0
  186. package/dist/collection/components/tree/tree-model.js +9 -0
  187. package/dist/collection/components/tree/tree.css +12 -0
  188. package/dist/collection/components/tree/tree.js +296 -0
  189. package/dist/collection/components/tree-item/default-tree-item.js +18 -0
  190. package/dist/collection/components/tree-item/tree-item.css +80 -0
  191. package/dist/collection/components/tree-item/tree-item.js +124 -0
  192. package/dist/collection/components/upload/upload-file-state.js +15 -0
  193. package/dist/collection/components/upload/upload.css +120 -0
  194. package/dist/collection/components/upload/upload.js +413 -0
  195. package/dist/collection/components/utils/animation.js +15 -0
  196. package/dist/collection/components/utils/button-variants.js +9 -0
  197. package/dist/collection/components/utils/mutation-observer.js +9 -0
  198. package/dist/collection/components/utils/notification-color.js +9 -0
  199. package/dist/collection/components/utils/popover.util.js +33 -0
  200. package/dist/collection/components/utils/rwd.util.js +37 -0
  201. package/dist/collection/components/utils/toggle-theme.js +24 -0
  202. package/dist/collection/components/utils/typed-event.js +42 -0
  203. package/dist/collection/components/validation-tooltip/validation-tooltip.css +235 -0
  204. package/dist/collection/components/validation-tooltip/validation-tooltip.js +167 -0
  205. package/dist/collection/components/workflow-step/workflow-step.css +131 -0
  206. package/dist/collection/components/workflow-step/workflow-step.js +249 -0
  207. package/dist/collection/components/workflow-steps/workflow-steps.css +29 -0
  208. package/dist/collection/components/workflow-steps/workflow-steps.js +182 -0
  209. package/dist/collection/env.js +9 -0
  210. package/dist/collection/exports.js +13 -0
  211. package/dist/collection/index.js +16 -0
  212. package/dist/collection/utils/test/index.js +9 -0
  213. package/dist/collection/utils/test/page.js +29 -0
  214. package/dist/components/_commonjsHelpers.js +19 -0
  215. package/dist/components/animation.js +17 -0
  216. package/dist/components/anime.es.js +1309 -0
  217. package/dist/components/application-header.js +32 -0
  218. package/dist/components/base-button.js +31 -0
  219. package/dist/components/button.js +68 -0
  220. package/dist/components/date-picker.js +268 -0
  221. package/dist/components/date-time-card.js +49 -0
  222. package/dist/components/default-tree-item.js +20 -0
  223. package/dist/components/dropdown-item.js +73 -0
  224. package/dist/components/dropdown.js +181 -0
  225. package/dist/components/filter-chip.js +48 -0
  226. package/dist/components/flip-tile-state.js +18 -0
  227. package/dist/components/group-item.js +63 -0
  228. package/dist/components/icon-button.js +68 -0
  229. package/dist/components/icon.js +47 -0
  230. package/dist/components/index.d.ts +26 -0
  231. package/dist/components/index.js +62 -0
  232. package/dist/components/ix-animated-tab.d.ts +11 -0
  233. package/dist/components/ix-animated-tab.js +35 -0
  234. package/dist/components/ix-animated-tabs.d.ts +11 -0
  235. package/dist/components/ix-animated-tabs.js +229 -0
  236. package/dist/components/ix-application-header.d.ts +11 -0
  237. package/dist/components/ix-application-header.js +6 -0
  238. package/dist/components/ix-basic-navigation.d.ts +11 -0
  239. package/dist/components/ix-basic-navigation.js +66 -0
  240. package/dist/components/ix-blind.d.ts +11 -0
  241. package/dist/components/ix-blind.js +105 -0
  242. package/dist/components/ix-breadcrumb-item.d.ts +11 -0
  243. package/dist/components/ix-breadcrumb-item.js +35 -0
  244. package/dist/components/ix-breadcrumb.d.ts +11 -0
  245. package/dist/components/ix-breadcrumb.js +180 -0
  246. package/dist/components/ix-button.d.ts +11 -0
  247. package/dist/components/ix-button.js +6 -0
  248. package/dist/components/ix-category-filter.d.ts +11 -0
  249. package/dist/components/ix-category-filter.js +447 -0
  250. package/dist/components/ix-chip.d.ts +11 -0
  251. package/dist/components/ix-chip.js +74 -0
  252. package/dist/components/ix-counter-pill.d.ts +11 -0
  253. package/dist/components/ix-counter-pill.js +59 -0
  254. package/dist/components/ix-date-picker.d.ts +11 -0
  255. package/dist/components/ix-date-picker.js +6 -0
  256. package/dist/components/ix-date-time-card.d.ts +11 -0
  257. package/dist/components/ix-date-time-card.js +6 -0
  258. package/dist/components/ix-datetime-picker.d.ts +11 -0
  259. package/dist/components/ix-datetime-picker.js +105 -0
  260. package/dist/components/ix-drawer.d.ts +11 -0
  261. package/dist/components/ix-drawer.js +155 -0
  262. package/dist/components/ix-dropdown-item.d.ts +11 -0
  263. package/dist/components/ix-dropdown-item.js +6 -0
  264. package/dist/components/ix-dropdown.d.ts +11 -0
  265. package/dist/components/ix-dropdown.js +6 -0
  266. package/dist/components/ix-event-list-item.d.ts +11 -0
  267. package/dist/components/ix-event-list-item.js +59 -0
  268. package/dist/components/ix-event-list.d.ts +11 -0
  269. package/dist/components/ix-event-list.js +135 -0
  270. package/dist/components/ix-expanding-search.d.ts +11 -0
  271. package/dist/components/ix-expanding-search.js +123 -0
  272. package/dist/components/ix-filter-chip.d.ts +11 -0
  273. package/dist/components/ix-filter-chip.js +6 -0
  274. package/dist/components/ix-flip-tile-content.d.ts +11 -0
  275. package/dist/components/ix-flip-tile-content.js +33 -0
  276. package/dist/components/ix-flip-tile.d.ts +11 -0
  277. package/dist/components/ix-flip-tile.js +96 -0
  278. package/dist/components/ix-group-dropdown-item.d.ts +11 -0
  279. package/dist/components/ix-group-dropdown-item.js +47 -0
  280. package/dist/components/ix-group-item.d.ts +11 -0
  281. package/dist/components/ix-group-item.js +6 -0
  282. package/dist/components/ix-group.d.ts +11 -0
  283. package/dist/components/ix-group.js +174 -0
  284. package/dist/components/ix-icon-button.d.ts +11 -0
  285. package/dist/components/ix-icon-button.js +6 -0
  286. package/dist/components/ix-icon.d.ts +11 -0
  287. package/dist/components/ix-icon.js +6 -0
  288. package/dist/components/ix-input-group.d.ts +11 -0
  289. package/dist/components/ix-input-group.js +53 -0
  290. package/dist/components/ix-kpi.d.ts +11 -0
  291. package/dist/components/ix-kpi.js +75 -0
  292. package/dist/components/ix-map-navigation-overlay.d.ts +11 -0
  293. package/dist/components/ix-map-navigation-overlay.js +6 -0
  294. package/dist/components/ix-map-navigation.d.ts +11 -0
  295. package/dist/components/ix-map-navigation.js +227 -0
  296. package/dist/components/ix-menu-about-item.d.ts +11 -0
  297. package/dist/components/ix-menu-about-item.js +34 -0
  298. package/dist/components/ix-menu-about-news.d.ts +11 -0
  299. package/dist/components/ix-menu-about-news.js +78 -0
  300. package/dist/components/ix-menu-about.d.ts +11 -0
  301. package/dist/components/ix-menu-about.js +6 -0
  302. package/dist/components/ix-menu-avatar-item.d.ts +11 -0
  303. package/dist/components/ix-menu-avatar-item.js +6 -0
  304. package/dist/components/ix-menu-avatar.d.ts +11 -0
  305. package/dist/components/ix-menu-avatar.js +83 -0
  306. package/dist/components/ix-menu-item.d.ts +11 -0
  307. package/dist/components/ix-menu-item.js +6 -0
  308. package/dist/components/ix-menu-settings-item.d.ts +11 -0
  309. package/dist/components/ix-menu-settings-item.js +34 -0
  310. package/dist/components/ix-menu-settings.d.ts +11 -0
  311. package/dist/components/ix-menu-settings.js +107 -0
  312. package/dist/components/ix-menu.d.ts +11 -0
  313. package/dist/components/ix-menu.js +601 -0
  314. package/dist/components/ix-message-bar.d.ts +11 -0
  315. package/dist/components/ix-message-bar.js +88 -0
  316. package/dist/components/ix-modal-container.d.ts +11 -0
  317. package/dist/components/ix-modal-container.js +6 -0
  318. package/dist/components/ix-modal-example.d.ts +11 -0
  319. package/dist/components/ix-modal-example.js +67 -0
  320. package/dist/components/ix-modal.d.ts +11 -0
  321. package/dist/components/ix-modal.js +6 -0
  322. package/dist/components/ix-pill.d.ts +11 -0
  323. package/dist/components/ix-pill.js +66 -0
  324. package/dist/components/ix-select-item.d.ts +11 -0
  325. package/dist/components/ix-select-item.js +6 -0
  326. package/dist/components/ix-select.d.ts +11 -0
  327. package/dist/components/ix-select.js +339 -0
  328. package/dist/components/ix-spinner.d.ts +11 -0
  329. package/dist/components/ix-spinner.js +6 -0
  330. package/dist/components/ix-split-button-item.d.ts +11 -0
  331. package/dist/components/ix-split-button-item.js +49 -0
  332. package/dist/components/ix-split-button.d.ts +11 -0
  333. package/dist/components/ix-split-button.js +135 -0
  334. package/dist/components/ix-tab-item.d.ts +11 -0
  335. package/dist/components/ix-tab-item.js +6 -0
  336. package/dist/components/ix-tabs.d.ts +11 -0
  337. package/dist/components/ix-tabs.js +6 -0
  338. package/dist/components/ix-tile.d.ts +11 -0
  339. package/dist/components/ix-tile.js +42 -0
  340. package/dist/components/ix-time-picker.d.ts +11 -0
  341. package/dist/components/ix-time-picker.js +6 -0
  342. package/dist/components/ix-toast-container.d.ts +11 -0
  343. package/dist/components/ix-toast-container.js +110 -0
  344. package/dist/components/ix-toast.d.ts +11 -0
  345. package/dist/components/ix-toast.js +6 -0
  346. package/dist/components/ix-toggle.d.ts +11 -0
  347. package/dist/components/ix-toggle.js +104 -0
  348. package/dist/components/ix-tree-item.d.ts +11 -0
  349. package/dist/components/ix-tree-item.js +6 -0
  350. package/dist/components/ix-tree.d.ts +11 -0
  351. package/dist/components/ix-tree.js +694 -0
  352. package/dist/components/ix-upload.d.ts +11 -0
  353. package/dist/components/ix-upload.js +178 -0
  354. package/dist/components/ix-validation-tooltip.d.ts +11 -0
  355. package/dist/components/ix-validation-tooltip.js +124 -0
  356. package/dist/components/ix-workflow-step.d.ts +11 -0
  357. package/dist/components/ix-workflow-step.js +142 -0
  358. package/dist/components/ix-workflow-steps.d.ts +11 -0
  359. package/dist/components/ix-workflow-steps.js +101 -0
  360. package/dist/components/logical-filter-operator.js +33 -0
  361. package/dist/components/luxon.js +8584 -0
  362. package/dist/components/map-navigation-overlay.js +53 -0
  363. package/dist/components/menu-about.js +120 -0
  364. package/dist/components/menu-avatar-item.js +46 -0
  365. package/dist/components/menu-item.js +65 -0
  366. package/dist/components/modal-container.js +99 -0
  367. package/dist/components/modal-utils.js +38 -0
  368. package/dist/components/modal.js +189 -0
  369. package/dist/components/mutation-observer.js +11 -0
  370. package/dist/components/my-component.d.ts +11 -0
  371. package/dist/components/my-component.js +32 -0
  372. package/dist/components/popover.util.js +36 -0
  373. package/dist/components/popper.js +1799 -0
  374. package/dist/components/rwd.util.js +39 -0
  375. package/dist/components/select-item.js +71 -0
  376. package/dist/components/spinner.js +43 -0
  377. package/dist/components/tab-item.js +86 -0
  378. package/dist/components/tabs.js +207 -0
  379. package/dist/components/time-picker.js +140 -0
  380. package/dist/components/toast.js +119 -0
  381. package/dist/components/tree-item.js +52 -0
  382. package/dist/components/typed-event.js +44 -0
  383. package/dist/components/upload-file-state.js +17 -0
  384. package/dist/esm/_commonjsHelpers-4bc7200a.js +19 -0
  385. package/dist/esm/animation-b667a4c4.js +17 -0
  386. package/dist/esm/anime.es-185e9087.js +1309 -0
  387. package/dist/esm/base-button-7bfb747f.js +31 -0
  388. package/dist/esm/default-tree-item-638c435a.js +20 -0
  389. package/dist/esm/flip-tile-state-28a1f8ce.js +18 -0
  390. package/dist/esm/index-55cfd20d.js +1819 -0
  391. package/dist/esm/index.js +64 -0
  392. package/dist/esm/ix-animated-tab_2.entry.js +212 -0
  393. package/dist/esm/ix-application-header.entry.js +15 -0
  394. package/dist/esm/ix-basic-navigation.entry.js +40 -0
  395. package/dist/esm/ix-blind.entry.js +85 -0
  396. package/dist/esm/ix-breadcrumb_2.entry.js +150 -0
  397. package/dist/esm/ix-button.entry.js +46 -0
  398. package/dist/esm/ix-category-filter.entry.js +395 -0
  399. package/dist/esm/ix-chip.entry.js +43 -0
  400. package/dist/esm/ix-counter-pill.entry.js +36 -0
  401. package/dist/esm/ix-date-picker_2.entry.js +8876 -0
  402. package/dist/esm/ix-date-time-card.entry.js +32 -0
  403. package/dist/esm/ix-datetime-picker.entry.js +40 -0
  404. package/dist/esm/ix-drawer.entry.js +118 -0
  405. package/dist/esm/ix-dropdown_2.entry.js +198 -0
  406. package/dist/esm/ix-event-list_2.entry.js +146 -0
  407. package/dist/esm/ix-expanding-search.entry.js +87 -0
  408. package/dist/esm/ix-filter-chip.entry.js +26 -0
  409. package/dist/esm/ix-flip-tile_2.entry.js +74 -0
  410. package/dist/esm/ix-group_3.entry.js +168 -0
  411. package/dist/esm/ix-icon-button.entry.js +36 -0
  412. package/dist/esm/ix-icon.entry.js +29 -0
  413. package/dist/esm/ix-input-group.entry.js +36 -0
  414. package/dist/esm/ix-kpi.entry.js +46 -0
  415. package/dist/esm/ix-map-navigation_2.entry.js +185 -0
  416. package/dist/esm/ix-menu_9.entry.js +860 -0
  417. package/dist/esm/ix-message-bar.entry.js +54 -0
  418. package/dist/esm/ix-modal-example.entry.js +20 -0
  419. package/dist/esm/ix-modal_2.entry.js +5 -0
  420. package/dist/esm/ix-pill.entry.js +36 -0
  421. package/dist/esm/ix-select_2.entry.js +304 -0
  422. package/dist/esm/ix-spinner.entry.js +26 -0
  423. package/dist/esm/ix-split-button_2.entry.js +109 -0
  424. package/dist/esm/ix-tab-item.entry.js +63 -0
  425. package/dist/esm/ix-tabs.entry.js +183 -0
  426. package/dist/esm/ix-tile.entry.js +23 -0
  427. package/dist/esm/ix-toast_2.entry.js +150 -0
  428. package/dist/esm/ix-toggle.entry.js +78 -0
  429. package/dist/esm/ix-tree_2.entry.js +685 -0
  430. package/dist/esm/ix-upload.entry.js +135 -0
  431. package/dist/esm/ix-validation-tooltip.entry.js +103 -0
  432. package/dist/esm/ix-workflow-step.entry.js +110 -0
  433. package/dist/esm/ix-workflow-steps.entry.js +79 -0
  434. package/dist/esm/loader.js +17 -0
  435. package/dist/esm/logical-filter-operator-1bf83315.js +33 -0
  436. package/dist/esm/modal-8ed87a6c.js +218 -0
  437. package/dist/esm/modal-utils-ec39c1bc.js +38 -0
  438. package/dist/esm/mutation-observer-379959bb.js +11 -0
  439. package/dist/esm/my-component.entry.js +15 -0
  440. package/dist/esm/polyfills/core-js.js +11 -0
  441. package/dist/esm/polyfills/css-shim.js +1 -0
  442. package/dist/esm/polyfills/dom.js +79 -0
  443. package/dist/esm/polyfills/es5-html-element.js +1 -0
  444. package/dist/esm/polyfills/index.js +34 -0
  445. package/dist/esm/polyfills/system.js +6 -0
  446. package/dist/esm/popper-42db9fbd.js +1799 -0
  447. package/dist/esm/rwd.util-33a69d24.js +39 -0
  448. package/dist/esm/siemens-ix.js +17 -0
  449. package/dist/esm/typed-event-dd6c83dd.js +44 -0
  450. package/dist/esm/upload-file-state-631bb8a2.js +17 -0
  451. package/dist/index.cjs.js +1 -0
  452. package/dist/index.js +1 -0
  453. package/dist/siemens-ix/index.esm.js +1 -0
  454. package/dist/siemens-ix/p-03d95feb.entry.js +1 -0
  455. package/dist/siemens-ix/p-0a12b3df.js +1 -0
  456. package/dist/siemens-ix/p-0bf04780.js +1 -0
  457. package/dist/siemens-ix/p-0e315bd7.entry.js +1 -0
  458. package/dist/siemens-ix/p-1c82637e.js +1 -0
  459. package/dist/siemens-ix/p-1d30454e.js +1 -0
  460. package/dist/siemens-ix/p-235606b2.entry.js +1 -0
  461. package/dist/siemens-ix/p-240d22b6.entry.js +1 -0
  462. package/dist/siemens-ix/p-2cda7278.entry.js +1 -0
  463. package/dist/siemens-ix/p-2ce29bcd.entry.js +1 -0
  464. package/dist/siemens-ix/p-301ddeb7.js +1 -0
  465. package/dist/siemens-ix/p-3613be96.entry.js +1 -0
  466. package/dist/siemens-ix/p-37417714.js +1 -0
  467. package/dist/siemens-ix/p-3f809fb3.entry.js +1 -0
  468. package/dist/siemens-ix/p-40842bea.entry.js +1 -0
  469. package/dist/siemens-ix/p-47ea9884.js +1 -0
  470. package/dist/siemens-ix/p-4ffec6ae.entry.js +1 -0
  471. package/dist/siemens-ix/p-504927a0.entry.js +1 -0
  472. package/dist/siemens-ix/p-5990f0cb.entry.js +1 -0
  473. package/dist/siemens-ix/p-59c81e2a.entry.js +1 -0
  474. package/dist/siemens-ix/p-5a1dcc74.js +1 -0
  475. package/dist/siemens-ix/p-5f9f25ef.entry.js +1 -0
  476. package/dist/siemens-ix/p-61b032bf.entry.js +1 -0
  477. package/dist/siemens-ix/p-662d756f.entry.js +1 -0
  478. package/dist/siemens-ix/p-6726f740.entry.js +1 -0
  479. package/dist/siemens-ix/p-67c2bca6.entry.js +1 -0
  480. package/dist/siemens-ix/p-6f625f0e.js +1 -0
  481. package/dist/siemens-ix/p-78df1e46.entry.js +1 -0
  482. package/dist/siemens-ix/p-7a4c744e.entry.js +1 -0
  483. package/dist/siemens-ix/p-7d667916.entry.js +1 -0
  484. package/dist/siemens-ix/p-7ec8a00e.entry.js +1 -0
  485. package/dist/siemens-ix/p-7f5a2e3c.entry.js +1 -0
  486. package/dist/siemens-ix/p-810b5232.js +1 -0
  487. package/dist/siemens-ix/p-81e46337.entry.js +1 -0
  488. package/dist/siemens-ix/p-8239c3a1.entry.js +1 -0
  489. package/dist/siemens-ix/p-9d9b8ad1.entry.js +1 -0
  490. package/dist/siemens-ix/p-ab715295.entry.js +1 -0
  491. package/dist/siemens-ix/p-b4003026.entry.js +1 -0
  492. package/dist/siemens-ix/p-bbcee9fb.entry.js +1 -0
  493. package/dist/siemens-ix/p-bd15d8ca.entry.js +1 -0
  494. package/dist/siemens-ix/p-bdd294d2.js +1 -0
  495. package/dist/siemens-ix/p-be1ec062.entry.js +1 -0
  496. package/dist/siemens-ix/p-c3738ffc.entry.js +1 -0
  497. package/dist/siemens-ix/p-ca71538c.entry.js +1 -0
  498. package/dist/siemens-ix/p-caf856f2.entry.js +1 -0
  499. package/dist/siemens-ix/p-cde8f20e.entry.js +1 -0
  500. package/dist/siemens-ix/p-d23706a7.js +1 -0
  501. package/dist/siemens-ix/p-d31bf6db.entry.js +1 -0
  502. package/dist/siemens-ix/p-da2cae32.js +1 -0
  503. package/dist/siemens-ix/p-df43662b.entry.js +1 -0
  504. package/dist/siemens-ix/p-e1f54836.entry.js +1 -0
  505. package/dist/siemens-ix/p-e4d1a964.entry.js +1 -0
  506. package/dist/siemens-ix/p-f2636faf.entry.js +1 -0
  507. package/dist/siemens-ix/p-f6da7e07.entry.js +1 -0
  508. package/dist/siemens-ix/p-f86fcdf4.js +1 -0
  509. package/dist/siemens-ix/p-fbe40498.js +1 -0
  510. package/dist/siemens-ix/p-fe020fa3.entry.js +1 -0
  511. package/dist/siemens-ix/p-fe5db4d1.entry.js +1 -0
  512. package/dist/siemens-ix/siemens-ix.css +19243 -0
  513. package/dist/siemens-ix/siemens-ix.esm.js +1 -0
  514. package/dist/types/components/animated-tab/animated-tab.d.ts +11 -0
  515. package/dist/types/components/animated-tabs/animated-tabs.d.ts +44 -0
  516. package/dist/types/components/application-header/application-header.d.ts +7 -0
  517. package/dist/types/components/basic-navigation/basic-navigation.d.ts +16 -0
  518. package/dist/types/components/blind/blind.d.ts +26 -0
  519. package/dist/types/components/breadcrumb/breadcrumb.d.ts +48 -0
  520. package/dist/types/components/breadcrumb-item/breadcrumb-item.d.ts +11 -0
  521. package/dist/types/components/button/base-button.d.ts +13 -0
  522. package/dist/types/components/button/button.d.ts +34 -0
  523. package/dist/types/components/category-filter/category-filter.d.ts +129 -0
  524. package/dist/types/components/category-filter/filter-state.d.ts +9 -0
  525. package/dist/types/components/category-filter/input-state.d.ts +6 -0
  526. package/dist/types/components/category-filter/logical-filter-operator.d.ts +4 -0
  527. package/dist/types/components/chip/chip.d.ts +38 -0
  528. package/dist/types/components/counter-pill/counter-pill.d.ts +24 -0
  529. package/dist/types/components/date-picker/date-picker.d.ts +56 -0
  530. package/dist/types/components/date-time-card/date-time-card.d.ts +14 -0
  531. package/dist/types/components/datetime-picker/datetime-picker.d.ts +31 -0
  532. package/dist/types/components/drawer/drawer.d.ts +49 -0
  533. package/dist/types/components/dropdown/dropdown.d.ts +70 -0
  534. package/dist/types/components/dropdown-item/dropdown-item.d.ts +33 -0
  535. package/dist/types/components/event-list/event-list.d.ts +31 -0
  536. package/dist/types/components/event-list-item/event-list-item.d.ts +34 -0
  537. package/dist/types/components/expanding-search/expanding-search.d.ts +31 -0
  538. package/dist/types/components/filter-chip/filter-chip.d.ts +14 -0
  539. package/dist/types/components/flip-tile/flip-tile-state.d.ts +7 -0
  540. package/dist/types/components/flip-tile/flip-tile.d.ts +22 -0
  541. package/dist/types/components/flip-tile-content/flip-tile-content.d.ts +3 -0
  542. package/dist/types/components/group/group.d.ts +59 -0
  543. package/dist/types/components/group-dropdown-item/group-dropdown-item.d.ts +11 -0
  544. package/dist/types/components/group-item/group-item.d.ts +39 -0
  545. package/dist/types/components/icon/icon.d.ts +15 -0
  546. package/dist/types/components/icon-button/icon-button.d.ts +51 -0
  547. package/dist/types/components/input-group/input-group.d.ts +5 -0
  548. package/dist/types/components/kpi/kpi.d.ts +25 -0
  549. package/dist/types/components/map-navigation/map-navigation.d.ts +59 -0
  550. package/dist/types/components/map-navigation-overlay/map-navigation-overlay.d.ts +20 -0
  551. package/dist/types/components/menu/menu.d.ts +143 -0
  552. package/dist/types/components/menu-about/menu-about.d.ts +34 -0
  553. package/dist/types/components/menu-about-item/menu-about-item.d.ts +7 -0
  554. package/dist/types/components/menu-about-news/menu-about-news.d.ts +36 -0
  555. package/dist/types/components/menu-avatar/menu-avatar.d.ts +26 -0
  556. package/dist/types/components/menu-avatar-item/menu-avatar-item.d.ts +17 -0
  557. package/dist/types/components/menu-item/menu-item.d.ts +31 -0
  558. package/dist/types/components/menu-settings/menu-settings.d.ts +27 -0
  559. package/dist/types/components/menu-settings-item/menu-settings-item.d.ts +7 -0
  560. package/dist/types/components/message-bar/message-bar.d.ts +23 -0
  561. package/dist/types/components/modal/modal-utils.d.ts +26 -0
  562. package/dist/types/components/modal/modal.d.ts +99 -0
  563. package/dist/types/components/modal-container/modal-container.d.ts +15 -0
  564. package/dist/types/components/my-component/example-modal.d.ts +6 -0
  565. package/dist/types/components/my-component/my-component.d.ts +3 -0
  566. package/dist/types/components/pill/pill.d.ts +28 -0
  567. package/dist/types/components/select/select.d.ts +83 -0
  568. package/dist/types/components/select-item/select-item.d.ts +31 -0
  569. package/dist/types/components/spinner/spinner.d.ts +11 -0
  570. package/dist/types/components/split-button/split-button.d.ts +57 -0
  571. package/dist/types/components/split-button-item/split-button-item.d.ts +17 -0
  572. package/dist/types/components/tab-item/tab-item.d.ts +36 -0
  573. package/dist/types/components/tabs/tabs.d.ts +46 -0
  574. package/dist/types/components/tile/tile.d.ts +7 -0
  575. package/dist/types/components/time-picker/time-picker.d.ts +46 -0
  576. package/dist/types/components/toast/toast-container.d.ts +25 -0
  577. package/dist/types/components/toast/toast-utils.d.ts +33 -0
  578. package/dist/types/components/toast/toast.d.ts +39 -0
  579. package/dist/types/components/toggle/toggle.d.ts +45 -0
  580. package/dist/types/components/tree/tree-model.d.ts +17 -0
  581. package/dist/types/components/tree/tree.d.ts +44 -0
  582. package/dist/types/components/tree-item/default-tree-item.d.ts +6 -0
  583. package/dist/types/components/tree-item/tree-item.d.ts +25 -0
  584. package/dist/types/components/upload/upload-file-state.d.ts +6 -0
  585. package/dist/types/components/upload/upload.d.ts +70 -0
  586. package/dist/types/components/utils/animation.d.ts +7 -0
  587. package/dist/types/components/utils/button-variants.d.ts +1 -0
  588. package/dist/types/components/utils/mutation-observer.d.ts +1 -0
  589. package/dist/types/components/utils/notification-color.d.ts +4 -0
  590. package/dist/types/components/utils/popover.util.d.ts +9 -0
  591. package/dist/types/components/utils/rwd.util.d.ts +2 -0
  592. package/dist/types/components/utils/toggle-theme.d.ts +1 -0
  593. package/dist/types/components/utils/typed-event.d.ts +15 -0
  594. package/dist/types/components/validation-tooltip/validation-tooltip.d.ts +31 -0
  595. package/dist/types/components/workflow-step/workflow-step.d.ts +35 -0
  596. package/dist/types/components/workflow-steps/workflow-steps.d.ts +29 -0
  597. package/dist/types/components.d.ts +3453 -0
  598. package/dist/types/env.d.ts +1 -0
  599. package/dist/types/exports.d.ts +5 -0
  600. package/dist/types/index.d.ts +11 -0
  601. package/dist/types/stencil-public-runtime.d.ts +1565 -0
  602. package/dist/types/utils/test/index.d.ts +1 -0
  603. package/dist/types/utils/test/page.d.ts +3 -0
  604. package/loader/cdn.js +3 -0
  605. package/loader/index.cjs.js +3 -0
  606. package/loader/index.d.ts +12 -0
  607. package/loader/index.es2017.js +3 -0
  608. package/loader/index.js +4 -0
  609. package/loader/package.json +10 -0
  610. package/package.json +86 -0
  611. package/scss/_common-variables.scss +60 -0
  612. package/scss/_fonts.scss +70 -0
  613. package/scss/_z-index.scss +18 -0
  614. package/scss/components/_button-group.scss +24 -0
  615. package/scss/components/_buttons.scss +150 -0
  616. package/scss/components/_checkboxes.scss +177 -0
  617. package/scss/components/_dropdown.scss +175 -0
  618. package/scss/components/_forms.scss +146 -0
  619. package/scss/components/_input-group.scss +34 -0
  620. package/scss/components/_links.scss +31 -0
  621. package/scss/components/_modal.scss +41 -0
  622. package/scss/components/_radiobuttons.scss +169 -0
  623. package/scss/components/_shadows.scss +35 -0
  624. package/scss/components/_table.scss +27 -0
  625. package/scss/ix.scss +95 -0
  626. package/scss/mixins/_animations.scss +30 -0
  627. package/scss/mixins/_fonts.scss +166 -0
  628. package/scss/mixins/_hover.scss +59 -0
  629. package/scss/mixins/_shadows.scss +12 -0
  630. package/scss/mixins/_text-truncation.scss +14 -0
  631. package/scss/theme/_define-theme-colors.scss +22 -0
  632. package/scss/theme/_define-theme-variable.scss +12 -0
  633. package/scss/theme/_define-theme.scss +36 -0
  634. package/scss/theme/_static-colors.scss +19 -0
  635. package/scss/theme/classic-dark/_sizes.scss +66 -0
  636. package/scss/theme/classic-dark/_variables.scss +827 -0
  637. package/scss/theme/classic-dark/index.scss +15 -0
  638. package/scss/theme/classic-light/_sizes.scss +66 -0
  639. package/scss/theme/classic-light/_variables.scss +830 -0
  640. package/scss/theme/classic-light/index.scss +15 -0
  641. package/src/components/animated-tab/readme.md +24 -0
  642. package/src/components/animated-tabs/readme.md +32 -0
  643. package/src/components/application-header/readme.md +21 -0
  644. package/src/components/basic-navigation/readme.md +22 -0
  645. package/src/components/blind/readme.md +29 -0
  646. package/src/components/breadcrumb/readme.md +33 -0
  647. package/src/components/breadcrumb-item/readme.md +22 -0
  648. package/src/components/button/readme.md +27 -0
  649. package/src/components/category-filter/readme.md +40 -0
  650. package/src/components/chip/readme.md +36 -0
  651. package/src/components/counter-pill/readme.md +25 -0
  652. package/src/components/date-picker/readme.md +32 -0
  653. package/src/components/date-time-card/readme.md +22 -0
  654. package/src/components/datetime-picker/readme.md +32 -0
  655. package/src/components/drawer/readme.md +47 -0
  656. package/src/components/dropdown/readme.md +49 -0
  657. package/src/components/dropdown-item/readme.md +45 -0
  658. package/src/components/event-list/readme.md +24 -0
  659. package/src/components/event-list-item/readme.md +32 -0
  660. package/src/components/expanding-search/readme.md +32 -0
  661. package/src/components/filter-chip/readme.md +30 -0
  662. package/src/components/flip-tile/readme.md +22 -0
  663. package/src/components/flip-tile-content/readme.md +14 -0
  664. package/src/components/group/readme.md +36 -0
  665. package/src/components/group-dropdown-item/readme.md +22 -0
  666. package/src/components/group-item/readme.md +34 -0
  667. package/src/components/icon/readme.md +23 -0
  668. package/src/components/icon-button/readme.md +31 -0
  669. package/src/components/input-group/readme.md +14 -0
  670. package/src/components/kpi/readme.md +27 -0
  671. package/src/components/map-navigation/readme.md +54 -0
  672. package/src/components/map-navigation-overlay/readme.md +30 -0
  673. package/src/components/menu/readme.md +86 -0
  674. package/src/components/menu-about/readme.md +31 -0
  675. package/src/components/menu-about-item/readme.md +21 -0
  676. package/src/components/menu-about-news/readme.md +34 -0
  677. package/src/components/menu-avatar/readme.md +30 -0
  678. package/src/components/menu-avatar-item/readme.md +29 -0
  679. package/src/components/menu-item/readme.md +26 -0
  680. package/src/components/menu-settings/readme.md +30 -0
  681. package/src/components/menu-settings-item/readme.md +21 -0
  682. package/src/components/message-bar/readme.md +31 -0
  683. package/src/components/modal/readme.md +67 -0
  684. package/src/components/modal-container/readme.md +29 -0
  685. package/src/components/my-component/readme.md +16 -0
  686. package/src/components/pill/readme.md +26 -0
  687. package/src/components/select/readme.md +37 -0
  688. package/src/components/select-item/readme.md +44 -0
  689. package/src/components/spinner/readme.md +22 -0
  690. package/src/components/split-button/readme.md +36 -0
  691. package/src/components/split-button-item/readme.md +29 -0
  692. package/src/components/tab-item/readme.md +28 -0
  693. package/src/components/tabs/readme.md +25 -0
  694. package/src/components/tile/readme.md +21 -0
  695. package/src/components/time-picker/readme.md +34 -0
  696. package/src/components/toast/readme.md +36 -0
  697. package/src/components/toggle/readme.md +35 -0
  698. package/src/components/tree/readme.md +32 -0
  699. package/src/components/tree-item/readme.md +31 -0
  700. package/src/components/upload/readme.md +51 -0
  701. package/src/components/validation-tooltip/readme.md +31 -0
  702. package/src/components/workflow-step/readme.md +28 -0
  703. package/src/components/workflow-steps/readme.md +33 -0
@@ -0,0 +1,1309 @@
1
+ /*
2
+ * anime.js v3.2.1
3
+ * (c) 2020 Julian Garnier
4
+ * Released under the MIT license
5
+ * animejs.com
6
+ */
7
+
8
+ // Defaults
9
+
10
+ var defaultInstanceSettings = {
11
+ update: null,
12
+ begin: null,
13
+ loopBegin: null,
14
+ changeBegin: null,
15
+ change: null,
16
+ changeComplete: null,
17
+ loopComplete: null,
18
+ complete: null,
19
+ loop: 1,
20
+ direction: 'normal',
21
+ autoplay: true,
22
+ timelineOffset: 0
23
+ };
24
+
25
+ var defaultTweenSettings = {
26
+ duration: 1000,
27
+ delay: 0,
28
+ endDelay: 0,
29
+ easing: 'easeOutElastic(1, .5)',
30
+ round: 0
31
+ };
32
+
33
+ var validTransforms = ['translateX', 'translateY', 'translateZ', 'rotate', 'rotateX', 'rotateY', 'rotateZ', 'scale', 'scaleX', 'scaleY', 'scaleZ', 'skew', 'skewX', 'skewY', 'perspective', 'matrix', 'matrix3d'];
34
+
35
+ // Caching
36
+
37
+ var cache = {
38
+ CSS: {},
39
+ springs: {}
40
+ };
41
+
42
+ // Utils
43
+
44
+ function minMax(val, min, max) {
45
+ return Math.min(Math.max(val, min), max);
46
+ }
47
+
48
+ function stringContains(str, text) {
49
+ return str.indexOf(text) > -1;
50
+ }
51
+
52
+ function applyArguments(func, args) {
53
+ return func.apply(null, args);
54
+ }
55
+
56
+ var is = {
57
+ arr: function (a) { return Array.isArray(a); },
58
+ obj: function (a) { return stringContains(Object.prototype.toString.call(a), 'Object'); },
59
+ pth: function (a) { return is.obj(a) && a.hasOwnProperty('totalLength'); },
60
+ svg: function (a) { return a instanceof SVGElement; },
61
+ inp: function (a) { return a instanceof HTMLInputElement; },
62
+ dom: function (a) { return a.nodeType || is.svg(a); },
63
+ str: function (a) { return typeof a === 'string'; },
64
+ fnc: function (a) { return typeof a === 'function'; },
65
+ und: function (a) { return typeof a === 'undefined'; },
66
+ nil: function (a) { return is.und(a) || a === null; },
67
+ hex: function (a) { return /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(a); },
68
+ rgb: function (a) { return /^rgb/.test(a); },
69
+ hsl: function (a) { return /^hsl/.test(a); },
70
+ col: function (a) { return (is.hex(a) || is.rgb(a) || is.hsl(a)); },
71
+ key: function (a) { return !defaultInstanceSettings.hasOwnProperty(a) && !defaultTweenSettings.hasOwnProperty(a) && a !== 'targets' && a !== 'keyframes'; },
72
+ };
73
+
74
+ // Easings
75
+
76
+ function parseEasingParameters(string) {
77
+ var match = /\(([^)]+)\)/.exec(string);
78
+ return match ? match[1].split(',').map(function (p) { return parseFloat(p); }) : [];
79
+ }
80
+
81
+ // Spring solver inspired by Webkit Copyright © 2016 Apple Inc. All rights reserved. https://webkit.org/demos/spring/spring.js
82
+
83
+ function spring(string, duration) {
84
+
85
+ var params = parseEasingParameters(string);
86
+ var mass = minMax(is.und(params[0]) ? 1 : params[0], .1, 100);
87
+ var stiffness = minMax(is.und(params[1]) ? 100 : params[1], .1, 100);
88
+ var damping = minMax(is.und(params[2]) ? 10 : params[2], .1, 100);
89
+ var velocity = minMax(is.und(params[3]) ? 0 : params[3], .1, 100);
90
+ var w0 = Math.sqrt(stiffness / mass);
91
+ var zeta = damping / (2 * Math.sqrt(stiffness * mass));
92
+ var wd = zeta < 1 ? w0 * Math.sqrt(1 - zeta * zeta) : 0;
93
+ var a = 1;
94
+ var b = zeta < 1 ? (zeta * w0 + -velocity) / wd : -velocity + w0;
95
+
96
+ function solver(t) {
97
+ var progress = duration ? (duration * t) / 1000 : t;
98
+ if (zeta < 1) {
99
+ progress = Math.exp(-progress * zeta * w0) * (a * Math.cos(wd * progress) + b * Math.sin(wd * progress));
100
+ } else {
101
+ progress = (a + b * progress) * Math.exp(-progress * w0);
102
+ }
103
+ if (t === 0 || t === 1) { return t; }
104
+ return 1 - progress;
105
+ }
106
+
107
+ function getDuration() {
108
+ var cached = cache.springs[string];
109
+ if (cached) { return cached; }
110
+ var frame = 1/6;
111
+ var elapsed = 0;
112
+ var rest = 0;
113
+ while(true) {
114
+ elapsed += frame;
115
+ if (solver(elapsed) === 1) {
116
+ rest++;
117
+ if (rest >= 16) { break; }
118
+ } else {
119
+ rest = 0;
120
+ }
121
+ }
122
+ var duration = elapsed * frame * 1000;
123
+ cache.springs[string] = duration;
124
+ return duration;
125
+ }
126
+
127
+ return duration ? solver : getDuration;
128
+
129
+ }
130
+
131
+ // Basic steps easing implementation https://developer.mozilla.org/fr/docs/Web/CSS/transition-timing-function
132
+
133
+ function steps(steps) {
134
+ if ( steps === void 0 ) steps = 10;
135
+
136
+ return function (t) { return Math.ceil((minMax(t, 0.000001, 1)) * steps) * (1 / steps); };
137
+ }
138
+
139
+ // BezierEasing https://github.com/gre/bezier-easing
140
+
141
+ var bezier = (function () {
142
+
143
+ var kSplineTableSize = 11;
144
+ var kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);
145
+
146
+ function A(aA1, aA2) { return 1.0 - 3.0 * aA2 + 3.0 * aA1 }
147
+ function B(aA1, aA2) { return 3.0 * aA2 - 6.0 * aA1 }
148
+ function C(aA1) { return 3.0 * aA1 }
149
+
150
+ function calcBezier(aT, aA1, aA2) { return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT }
151
+ function getSlope(aT, aA1, aA2) { return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1) }
152
+
153
+ function binarySubdivide(aX, aA, aB, mX1, mX2) {
154
+ var currentX, currentT, i = 0;
155
+ do {
156
+ currentT = aA + (aB - aA) / 2.0;
157
+ currentX = calcBezier(currentT, mX1, mX2) - aX;
158
+ if (currentX > 0.0) { aB = currentT; } else { aA = currentT; }
159
+ } while (Math.abs(currentX) > 0.0000001 && ++i < 10);
160
+ return currentT;
161
+ }
162
+
163
+ function newtonRaphsonIterate(aX, aGuessT, mX1, mX2) {
164
+ for (var i = 0; i < 4; ++i) {
165
+ var currentSlope = getSlope(aGuessT, mX1, mX2);
166
+ if (currentSlope === 0.0) { return aGuessT; }
167
+ var currentX = calcBezier(aGuessT, mX1, mX2) - aX;
168
+ aGuessT -= currentX / currentSlope;
169
+ }
170
+ return aGuessT;
171
+ }
172
+
173
+ function bezier(mX1, mY1, mX2, mY2) {
174
+
175
+ if (!(0 <= mX1 && mX1 <= 1 && 0 <= mX2 && mX2 <= 1)) { return; }
176
+ var sampleValues = new Float32Array(kSplineTableSize);
177
+
178
+ if (mX1 !== mY1 || mX2 !== mY2) {
179
+ for (var i = 0; i < kSplineTableSize; ++i) {
180
+ sampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);
181
+ }
182
+ }
183
+
184
+ function getTForX(aX) {
185
+
186
+ var intervalStart = 0;
187
+ var currentSample = 1;
188
+ var lastSample = kSplineTableSize - 1;
189
+
190
+ for (; currentSample !== lastSample && sampleValues[currentSample] <= aX; ++currentSample) {
191
+ intervalStart += kSampleStepSize;
192
+ }
193
+
194
+ --currentSample;
195
+
196
+ var dist = (aX - sampleValues[currentSample]) / (sampleValues[currentSample + 1] - sampleValues[currentSample]);
197
+ var guessForT = intervalStart + dist * kSampleStepSize;
198
+ var initialSlope = getSlope(guessForT, mX1, mX2);
199
+
200
+ if (initialSlope >= 0.001) {
201
+ return newtonRaphsonIterate(aX, guessForT, mX1, mX2);
202
+ } else if (initialSlope === 0.0) {
203
+ return guessForT;
204
+ } else {
205
+ return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);
206
+ }
207
+
208
+ }
209
+
210
+ return function (x) {
211
+ if (mX1 === mY1 && mX2 === mY2) { return x; }
212
+ if (x === 0 || x === 1) { return x; }
213
+ return calcBezier(getTForX(x), mY1, mY2);
214
+ }
215
+
216
+ }
217
+
218
+ return bezier;
219
+
220
+ })();
221
+
222
+ var penner = (function () {
223
+
224
+ // Based on jQuery UI's implemenation of easing equations from Robert Penner (http://www.robertpenner.com/easing)
225
+
226
+ var eases = { linear: function () { return function (t) { return t; }; } };
227
+
228
+ var functionEasings = {
229
+ Sine: function () { return function (t) { return 1 - Math.cos(t * Math.PI / 2); }; },
230
+ Circ: function () { return function (t) { return 1 - Math.sqrt(1 - t * t); }; },
231
+ Back: function () { return function (t) { return t * t * (3 * t - 2); }; },
232
+ Bounce: function () { return function (t) {
233
+ var pow2, b = 4;
234
+ while (t < (( pow2 = Math.pow(2, --b)) - 1) / 11) {}
235
+ return 1 / Math.pow(4, 3 - b) - 7.5625 * Math.pow(( pow2 * 3 - 2 ) / 22 - t, 2)
236
+ }; },
237
+ Elastic: function (amplitude, period) {
238
+ if ( amplitude === void 0 ) amplitude = 1;
239
+ if ( period === void 0 ) period = .5;
240
+
241
+ var a = minMax(amplitude, 1, 10);
242
+ var p = minMax(period, .1, 2);
243
+ return function (t) {
244
+ return (t === 0 || t === 1) ? t :
245
+ -a * Math.pow(2, 10 * (t - 1)) * Math.sin((((t - 1) - (p / (Math.PI * 2) * Math.asin(1 / a))) * (Math.PI * 2)) / p);
246
+ }
247
+ }
248
+ };
249
+
250
+ var baseEasings = ['Quad', 'Cubic', 'Quart', 'Quint', 'Expo'];
251
+
252
+ baseEasings.forEach(function (name, i) {
253
+ functionEasings[name] = function () { return function (t) { return Math.pow(t, i + 2); }; };
254
+ });
255
+
256
+ Object.keys(functionEasings).forEach(function (name) {
257
+ var easeIn = functionEasings[name];
258
+ eases['easeIn' + name] = easeIn;
259
+ eases['easeOut' + name] = function (a, b) { return function (t) { return 1 - easeIn(a, b)(1 - t); }; };
260
+ eases['easeInOut' + name] = function (a, b) { return function (t) { return t < 0.5 ? easeIn(a, b)(t * 2) / 2 :
261
+ 1 - easeIn(a, b)(t * -2 + 2) / 2; }; };
262
+ eases['easeOutIn' + name] = function (a, b) { return function (t) { return t < 0.5 ? (1 - easeIn(a, b)(1 - t * 2)) / 2 :
263
+ (easeIn(a, b)(t * 2 - 1) + 1) / 2; }; };
264
+ });
265
+
266
+ return eases;
267
+
268
+ })();
269
+
270
+ function parseEasings(easing, duration) {
271
+ if (is.fnc(easing)) { return easing; }
272
+ var name = easing.split('(')[0];
273
+ var ease = penner[name];
274
+ var args = parseEasingParameters(easing);
275
+ switch (name) {
276
+ case 'spring' : return spring(easing, duration);
277
+ case 'cubicBezier' : return applyArguments(bezier, args);
278
+ case 'steps' : return applyArguments(steps, args);
279
+ default : return applyArguments(ease, args);
280
+ }
281
+ }
282
+
283
+ // Strings
284
+
285
+ function selectString(str) {
286
+ try {
287
+ var nodes = document.querySelectorAll(str);
288
+ return nodes;
289
+ } catch(e) {
290
+ return;
291
+ }
292
+ }
293
+
294
+ // Arrays
295
+
296
+ function filterArray(arr, callback) {
297
+ var len = arr.length;
298
+ var thisArg = arguments.length >= 2 ? arguments[1] : void 0;
299
+ var result = [];
300
+ for (var i = 0; i < len; i++) {
301
+ if (i in arr) {
302
+ var val = arr[i];
303
+ if (callback.call(thisArg, val, i, arr)) {
304
+ result.push(val);
305
+ }
306
+ }
307
+ }
308
+ return result;
309
+ }
310
+
311
+ function flattenArray(arr) {
312
+ return arr.reduce(function (a, b) { return a.concat(is.arr(b) ? flattenArray(b) : b); }, []);
313
+ }
314
+
315
+ function toArray(o) {
316
+ if (is.arr(o)) { return o; }
317
+ if (is.str(o)) { o = selectString(o) || o; }
318
+ if (o instanceof NodeList || o instanceof HTMLCollection) { return [].slice.call(o); }
319
+ return [o];
320
+ }
321
+
322
+ function arrayContains(arr, val) {
323
+ return arr.some(function (a) { return a === val; });
324
+ }
325
+
326
+ // Objects
327
+
328
+ function cloneObject(o) {
329
+ var clone = {};
330
+ for (var p in o) { clone[p] = o[p]; }
331
+ return clone;
332
+ }
333
+
334
+ function replaceObjectProps(o1, o2) {
335
+ var o = cloneObject(o1);
336
+ for (var p in o1) { o[p] = o2.hasOwnProperty(p) ? o2[p] : o1[p]; }
337
+ return o;
338
+ }
339
+
340
+ function mergeObjects(o1, o2) {
341
+ var o = cloneObject(o1);
342
+ for (var p in o2) { o[p] = is.und(o1[p]) ? o2[p] : o1[p]; }
343
+ return o;
344
+ }
345
+
346
+ // Colors
347
+
348
+ function rgbToRgba(rgbValue) {
349
+ var rgb = /rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(rgbValue);
350
+ return rgb ? ("rgba(" + (rgb[1]) + ",1)") : rgbValue;
351
+ }
352
+
353
+ function hexToRgba(hexValue) {
354
+ var rgx = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
355
+ var hex = hexValue.replace(rgx, function (m, r, g, b) { return r + r + g + g + b + b; } );
356
+ var rgb = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
357
+ var r = parseInt(rgb[1], 16);
358
+ var g = parseInt(rgb[2], 16);
359
+ var b = parseInt(rgb[3], 16);
360
+ return ("rgba(" + r + "," + g + "," + b + ",1)");
361
+ }
362
+
363
+ function hslToRgba(hslValue) {
364
+ var hsl = /hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(hslValue) || /hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(hslValue);
365
+ var h = parseInt(hsl[1], 10) / 360;
366
+ var s = parseInt(hsl[2], 10) / 100;
367
+ var l = parseInt(hsl[3], 10) / 100;
368
+ var a = hsl[4] || 1;
369
+ function hue2rgb(p, q, t) {
370
+ if (t < 0) { t += 1; }
371
+ if (t > 1) { t -= 1; }
372
+ if (t < 1/6) { return p + (q - p) * 6 * t; }
373
+ if (t < 1/2) { return q; }
374
+ if (t < 2/3) { return p + (q - p) * (2/3 - t) * 6; }
375
+ return p;
376
+ }
377
+ var r, g, b;
378
+ if (s == 0) {
379
+ r = g = b = l;
380
+ } else {
381
+ var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
382
+ var p = 2 * l - q;
383
+ r = hue2rgb(p, q, h + 1/3);
384
+ g = hue2rgb(p, q, h);
385
+ b = hue2rgb(p, q, h - 1/3);
386
+ }
387
+ return ("rgba(" + (r * 255) + "," + (g * 255) + "," + (b * 255) + "," + a + ")");
388
+ }
389
+
390
+ function colorToRgb(val) {
391
+ if (is.rgb(val)) { return rgbToRgba(val); }
392
+ if (is.hex(val)) { return hexToRgba(val); }
393
+ if (is.hsl(val)) { return hslToRgba(val); }
394
+ }
395
+
396
+ // Units
397
+
398
+ function getUnit(val) {
399
+ var split = /[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(val);
400
+ if (split) { return split[1]; }
401
+ }
402
+
403
+ function getTransformUnit(propName) {
404
+ if (stringContains(propName, 'translate') || propName === 'perspective') { return 'px'; }
405
+ if (stringContains(propName, 'rotate') || stringContains(propName, 'skew')) { return 'deg'; }
406
+ }
407
+
408
+ // Values
409
+
410
+ function getFunctionValue(val, animatable) {
411
+ if (!is.fnc(val)) { return val; }
412
+ return val(animatable.target, animatable.id, animatable.total);
413
+ }
414
+
415
+ function getAttribute(el, prop) {
416
+ return el.getAttribute(prop);
417
+ }
418
+
419
+ function convertPxToUnit(el, value, unit) {
420
+ var valueUnit = getUnit(value);
421
+ if (arrayContains([unit, 'deg', 'rad', 'turn'], valueUnit)) { return value; }
422
+ var cached = cache.CSS[value + unit];
423
+ if (!is.und(cached)) { return cached; }
424
+ var baseline = 100;
425
+ var tempEl = document.createElement(el.tagName);
426
+ var parentEl = (el.parentNode && (el.parentNode !== document)) ? el.parentNode : document.body;
427
+ parentEl.appendChild(tempEl);
428
+ tempEl.style.position = 'absolute';
429
+ tempEl.style.width = baseline + unit;
430
+ var factor = baseline / tempEl.offsetWidth;
431
+ parentEl.removeChild(tempEl);
432
+ var convertedUnit = factor * parseFloat(value);
433
+ cache.CSS[value + unit] = convertedUnit;
434
+ return convertedUnit;
435
+ }
436
+
437
+ function getCSSValue(el, prop, unit) {
438
+ if (prop in el.style) {
439
+ var uppercasePropName = prop.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
440
+ var value = el.style[prop] || getComputedStyle(el).getPropertyValue(uppercasePropName) || '0';
441
+ return unit ? convertPxToUnit(el, value, unit) : value;
442
+ }
443
+ }
444
+
445
+ function getAnimationType(el, prop) {
446
+ if (is.dom(el) && !is.inp(el) && (!is.nil(getAttribute(el, prop)) || (is.svg(el) && el[prop]))) { return 'attribute'; }
447
+ if (is.dom(el) && arrayContains(validTransforms, prop)) { return 'transform'; }
448
+ if (is.dom(el) && (prop !== 'transform' && getCSSValue(el, prop))) { return 'css'; }
449
+ if (el[prop] != null) { return 'object'; }
450
+ }
451
+
452
+ function getElementTransforms(el) {
453
+ if (!is.dom(el)) { return; }
454
+ var str = el.style.transform || '';
455
+ var reg = /(\w+)\(([^)]*)\)/g;
456
+ var transforms = new Map();
457
+ var m; while (m = reg.exec(str)) { transforms.set(m[1], m[2]); }
458
+ return transforms;
459
+ }
460
+
461
+ function getTransformValue(el, propName, animatable, unit) {
462
+ var defaultVal = stringContains(propName, 'scale') ? 1 : 0 + getTransformUnit(propName);
463
+ var value = getElementTransforms(el).get(propName) || defaultVal;
464
+ if (animatable) {
465
+ animatable.transforms.list.set(propName, value);
466
+ animatable.transforms['last'] = propName;
467
+ }
468
+ return unit ? convertPxToUnit(el, value, unit) : value;
469
+ }
470
+
471
+ function getOriginalTargetValue(target, propName, unit, animatable) {
472
+ switch (getAnimationType(target, propName)) {
473
+ case 'transform': return getTransformValue(target, propName, animatable, unit);
474
+ case 'css': return getCSSValue(target, propName, unit);
475
+ case 'attribute': return getAttribute(target, propName);
476
+ default: return target[propName] || 0;
477
+ }
478
+ }
479
+
480
+ function getRelativeValue(to, from) {
481
+ var operator = /^(\*=|\+=|-=)/.exec(to);
482
+ if (!operator) { return to; }
483
+ var u = getUnit(to) || 0;
484
+ var x = parseFloat(from);
485
+ var y = parseFloat(to.replace(operator[0], ''));
486
+ switch (operator[0][0]) {
487
+ case '+': return x + y + u;
488
+ case '-': return x - y + u;
489
+ case '*': return x * y + u;
490
+ }
491
+ }
492
+
493
+ function validateValue(val, unit) {
494
+ if (is.col(val)) { return colorToRgb(val); }
495
+ if (/\s/g.test(val)) { return val; }
496
+ var originalUnit = getUnit(val);
497
+ var unitLess = originalUnit ? val.substr(0, val.length - originalUnit.length) : val;
498
+ if (unit) { return unitLess + unit; }
499
+ return unitLess;
500
+ }
501
+
502
+ // getTotalLength() equivalent for circle, rect, polyline, polygon and line shapes
503
+ // adapted from https://gist.github.com/SebLambla/3e0550c496c236709744
504
+
505
+ function getDistance(p1, p2) {
506
+ return Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2));
507
+ }
508
+
509
+ function getCircleLength(el) {
510
+ return Math.PI * 2 * getAttribute(el, 'r');
511
+ }
512
+
513
+ function getRectLength(el) {
514
+ return (getAttribute(el, 'width') * 2) + (getAttribute(el, 'height') * 2);
515
+ }
516
+
517
+ function getLineLength(el) {
518
+ return getDistance(
519
+ {x: getAttribute(el, 'x1'), y: getAttribute(el, 'y1')},
520
+ {x: getAttribute(el, 'x2'), y: getAttribute(el, 'y2')}
521
+ );
522
+ }
523
+
524
+ function getPolylineLength(el) {
525
+ var points = el.points;
526
+ var totalLength = 0;
527
+ var previousPos;
528
+ for (var i = 0 ; i < points.numberOfItems; i++) {
529
+ var currentPos = points.getItem(i);
530
+ if (i > 0) { totalLength += getDistance(previousPos, currentPos); }
531
+ previousPos = currentPos;
532
+ }
533
+ return totalLength;
534
+ }
535
+
536
+ function getPolygonLength(el) {
537
+ var points = el.points;
538
+ return getPolylineLength(el) + getDistance(points.getItem(points.numberOfItems - 1), points.getItem(0));
539
+ }
540
+
541
+ // Path animation
542
+
543
+ function getTotalLength(el) {
544
+ if (el.getTotalLength) { return el.getTotalLength(); }
545
+ switch(el.tagName.toLowerCase()) {
546
+ case 'circle': return getCircleLength(el);
547
+ case 'rect': return getRectLength(el);
548
+ case 'line': return getLineLength(el);
549
+ case 'polyline': return getPolylineLength(el);
550
+ case 'polygon': return getPolygonLength(el);
551
+ }
552
+ }
553
+
554
+ function setDashoffset(el) {
555
+ var pathLength = getTotalLength(el);
556
+ el.setAttribute('stroke-dasharray', pathLength);
557
+ return pathLength;
558
+ }
559
+
560
+ // Motion path
561
+
562
+ function getParentSvgEl(el) {
563
+ var parentEl = el.parentNode;
564
+ while (is.svg(parentEl)) {
565
+ if (!is.svg(parentEl.parentNode)) { break; }
566
+ parentEl = parentEl.parentNode;
567
+ }
568
+ return parentEl;
569
+ }
570
+
571
+ function getParentSvg(pathEl, svgData) {
572
+ var svg = svgData || {};
573
+ var parentSvgEl = svg.el || getParentSvgEl(pathEl);
574
+ var rect = parentSvgEl.getBoundingClientRect();
575
+ var viewBoxAttr = getAttribute(parentSvgEl, 'viewBox');
576
+ var width = rect.width;
577
+ var height = rect.height;
578
+ var viewBox = svg.viewBox || (viewBoxAttr ? viewBoxAttr.split(' ') : [0, 0, width, height]);
579
+ return {
580
+ el: parentSvgEl,
581
+ viewBox: viewBox,
582
+ x: viewBox[0] / 1,
583
+ y: viewBox[1] / 1,
584
+ w: width,
585
+ h: height,
586
+ vW: viewBox[2],
587
+ vH: viewBox[3]
588
+ }
589
+ }
590
+
591
+ function getPath(path, percent) {
592
+ var pathEl = is.str(path) ? selectString(path)[0] : path;
593
+ var p = percent || 100;
594
+ return function(property) {
595
+ return {
596
+ property: property,
597
+ el: pathEl,
598
+ svg: getParentSvg(pathEl),
599
+ totalLength: getTotalLength(pathEl) * (p / 100)
600
+ }
601
+ }
602
+ }
603
+
604
+ function getPathProgress(path, progress, isPathTargetInsideSVG) {
605
+ function point(offset) {
606
+ if ( offset === void 0 ) offset = 0;
607
+
608
+ var l = progress + offset >= 1 ? progress + offset : 0;
609
+ return path.el.getPointAtLength(l);
610
+ }
611
+ var svg = getParentSvg(path.el, path.svg);
612
+ var p = point();
613
+ var p0 = point(-1);
614
+ var p1 = point(+1);
615
+ var scaleX = isPathTargetInsideSVG ? 1 : svg.w / svg.vW;
616
+ var scaleY = isPathTargetInsideSVG ? 1 : svg.h / svg.vH;
617
+ switch (path.property) {
618
+ case 'x': return (p.x - svg.x) * scaleX;
619
+ case 'y': return (p.y - svg.y) * scaleY;
620
+ case 'angle': return Math.atan2(p1.y - p0.y, p1.x - p0.x) * 180 / Math.PI;
621
+ }
622
+ }
623
+
624
+ // Decompose value
625
+
626
+ function decomposeValue(val, unit) {
627
+ // const rgx = /-?\d*\.?\d+/g; // handles basic numbers
628
+ // const rgx = /[+-]?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/g; // handles exponents notation
629
+ var rgx = /[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/g; // handles exponents notation
630
+ var value = validateValue((is.pth(val) ? val.totalLength : val), unit) + '';
631
+ return {
632
+ original: value,
633
+ numbers: value.match(rgx) ? value.match(rgx).map(Number) : [0],
634
+ strings: (is.str(val) || unit) ? value.split(rgx) : []
635
+ }
636
+ }
637
+
638
+ // Animatables
639
+
640
+ function parseTargets(targets) {
641
+ var targetsArray = targets ? (flattenArray(is.arr(targets) ? targets.map(toArray) : toArray(targets))) : [];
642
+ return filterArray(targetsArray, function (item, pos, self) { return self.indexOf(item) === pos; });
643
+ }
644
+
645
+ function getAnimatables(targets) {
646
+ var parsed = parseTargets(targets);
647
+ return parsed.map(function (t, i) {
648
+ return {target: t, id: i, total: parsed.length, transforms: { list: getElementTransforms(t) } };
649
+ });
650
+ }
651
+
652
+ // Properties
653
+
654
+ function normalizePropertyTweens(prop, tweenSettings) {
655
+ var settings = cloneObject(tweenSettings);
656
+ // Override duration if easing is a spring
657
+ if (/^spring/.test(settings.easing)) { settings.duration = spring(settings.easing); }
658
+ if (is.arr(prop)) {
659
+ var l = prop.length;
660
+ var isFromTo = (l === 2 && !is.obj(prop[0]));
661
+ if (!isFromTo) {
662
+ // Duration divided by the number of tweens
663
+ if (!is.fnc(tweenSettings.duration)) { settings.duration = tweenSettings.duration / l; }
664
+ } else {
665
+ // Transform [from, to] values shorthand to a valid tween value
666
+ prop = {value: prop};
667
+ }
668
+ }
669
+ var propArray = is.arr(prop) ? prop : [prop];
670
+ return propArray.map(function (v, i) {
671
+ var obj = (is.obj(v) && !is.pth(v)) ? v : {value: v};
672
+ // Default delay value should only be applied to the first tween
673
+ if (is.und(obj.delay)) { obj.delay = !i ? tweenSettings.delay : 0; }
674
+ // Default endDelay value should only be applied to the last tween
675
+ if (is.und(obj.endDelay)) { obj.endDelay = i === propArray.length - 1 ? tweenSettings.endDelay : 0; }
676
+ return obj;
677
+ }).map(function (k) { return mergeObjects(k, settings); });
678
+ }
679
+
680
+
681
+ function flattenKeyframes(keyframes) {
682
+ var propertyNames = filterArray(flattenArray(keyframes.map(function (key) { return Object.keys(key); })), function (p) { return is.key(p); })
683
+ .reduce(function (a,b) { if (a.indexOf(b) < 0) { a.push(b); } return a; }, []);
684
+ var properties = {};
685
+ var loop = function ( i ) {
686
+ var propName = propertyNames[i];
687
+ properties[propName] = keyframes.map(function (key) {
688
+ var newKey = {};
689
+ for (var p in key) {
690
+ if (is.key(p)) {
691
+ if (p == propName) { newKey.value = key[p]; }
692
+ } else {
693
+ newKey[p] = key[p];
694
+ }
695
+ }
696
+ return newKey;
697
+ });
698
+ };
699
+
700
+ for (var i = 0; i < propertyNames.length; i++) loop( i );
701
+ return properties;
702
+ }
703
+
704
+ function getProperties(tweenSettings, params) {
705
+ var properties = [];
706
+ var keyframes = params.keyframes;
707
+ if (keyframes) { params = mergeObjects(flattenKeyframes(keyframes), params); }
708
+ for (var p in params) {
709
+ if (is.key(p)) {
710
+ properties.push({
711
+ name: p,
712
+ tweens: normalizePropertyTweens(params[p], tweenSettings)
713
+ });
714
+ }
715
+ }
716
+ return properties;
717
+ }
718
+
719
+ // Tweens
720
+
721
+ function normalizeTweenValues(tween, animatable) {
722
+ var t = {};
723
+ for (var p in tween) {
724
+ var value = getFunctionValue(tween[p], animatable);
725
+ if (is.arr(value)) {
726
+ value = value.map(function (v) { return getFunctionValue(v, animatable); });
727
+ if (value.length === 1) { value = value[0]; }
728
+ }
729
+ t[p] = value;
730
+ }
731
+ t.duration = parseFloat(t.duration);
732
+ t.delay = parseFloat(t.delay);
733
+ return t;
734
+ }
735
+
736
+ function normalizeTweens(prop, animatable) {
737
+ var previousTween;
738
+ return prop.tweens.map(function (t) {
739
+ var tween = normalizeTweenValues(t, animatable);
740
+ var tweenValue = tween.value;
741
+ var to = is.arr(tweenValue) ? tweenValue[1] : tweenValue;
742
+ var toUnit = getUnit(to);
743
+ var originalValue = getOriginalTargetValue(animatable.target, prop.name, toUnit, animatable);
744
+ var previousValue = previousTween ? previousTween.to.original : originalValue;
745
+ var from = is.arr(tweenValue) ? tweenValue[0] : previousValue;
746
+ var fromUnit = getUnit(from) || getUnit(originalValue);
747
+ var unit = toUnit || fromUnit;
748
+ if (is.und(to)) { to = previousValue; }
749
+ tween.from = decomposeValue(from, unit);
750
+ tween.to = decomposeValue(getRelativeValue(to, from), unit);
751
+ tween.start = previousTween ? previousTween.end : 0;
752
+ tween.end = tween.start + tween.delay + tween.duration + tween.endDelay;
753
+ tween.easing = parseEasings(tween.easing, tween.duration);
754
+ tween.isPath = is.pth(tweenValue);
755
+ tween.isPathTargetInsideSVG = tween.isPath && is.svg(animatable.target);
756
+ tween.isColor = is.col(tween.from.original);
757
+ if (tween.isColor) { tween.round = 1; }
758
+ previousTween = tween;
759
+ return tween;
760
+ });
761
+ }
762
+
763
+ // Tween progress
764
+
765
+ var setProgressValue = {
766
+ css: function (t, p, v) { return t.style[p] = v; },
767
+ attribute: function (t, p, v) { return t.setAttribute(p, v); },
768
+ object: function (t, p, v) { return t[p] = v; },
769
+ transform: function (t, p, v, transforms, manual) {
770
+ transforms.list.set(p, v);
771
+ if (p === transforms.last || manual) {
772
+ var str = '';
773
+ transforms.list.forEach(function (value, prop) { str += prop + "(" + value + ") "; });
774
+ t.style.transform = str;
775
+ }
776
+ }
777
+ };
778
+
779
+ // Set Value helper
780
+
781
+ function setTargetsValue(targets, properties) {
782
+ var animatables = getAnimatables(targets);
783
+ animatables.forEach(function (animatable) {
784
+ for (var property in properties) {
785
+ var value = getFunctionValue(properties[property], animatable);
786
+ var target = animatable.target;
787
+ var valueUnit = getUnit(value);
788
+ var originalValue = getOriginalTargetValue(target, property, valueUnit, animatable);
789
+ var unit = valueUnit || getUnit(originalValue);
790
+ var to = getRelativeValue(validateValue(value, unit), originalValue);
791
+ var animType = getAnimationType(target, property);
792
+ setProgressValue[animType](target, property, to, animatable.transforms, true);
793
+ }
794
+ });
795
+ }
796
+
797
+ // Animations
798
+
799
+ function createAnimation(animatable, prop) {
800
+ var animType = getAnimationType(animatable.target, prop.name);
801
+ if (animType) {
802
+ var tweens = normalizeTweens(prop, animatable);
803
+ var lastTween = tweens[tweens.length - 1];
804
+ return {
805
+ type: animType,
806
+ property: prop.name,
807
+ animatable: animatable,
808
+ tweens: tweens,
809
+ duration: lastTween.end,
810
+ delay: tweens[0].delay,
811
+ endDelay: lastTween.endDelay
812
+ }
813
+ }
814
+ }
815
+
816
+ function getAnimations(animatables, properties) {
817
+ return filterArray(flattenArray(animatables.map(function (animatable) {
818
+ return properties.map(function (prop) {
819
+ return createAnimation(animatable, prop);
820
+ });
821
+ })), function (a) { return !is.und(a); });
822
+ }
823
+
824
+ // Create Instance
825
+
826
+ function getInstanceTimings(animations, tweenSettings) {
827
+ var animLength = animations.length;
828
+ var getTlOffset = function (anim) { return anim.timelineOffset ? anim.timelineOffset : 0; };
829
+ var timings = {};
830
+ timings.duration = animLength ? Math.max.apply(Math, animations.map(function (anim) { return getTlOffset(anim) + anim.duration; })) : tweenSettings.duration;
831
+ timings.delay = animLength ? Math.min.apply(Math, animations.map(function (anim) { return getTlOffset(anim) + anim.delay; })) : tweenSettings.delay;
832
+ timings.endDelay = animLength ? timings.duration - Math.max.apply(Math, animations.map(function (anim) { return getTlOffset(anim) + anim.duration - anim.endDelay; })) : tweenSettings.endDelay;
833
+ return timings;
834
+ }
835
+
836
+ var instanceID = 0;
837
+
838
+ function createNewInstance(params) {
839
+ var instanceSettings = replaceObjectProps(defaultInstanceSettings, params);
840
+ var tweenSettings = replaceObjectProps(defaultTweenSettings, params);
841
+ var properties = getProperties(tweenSettings, params);
842
+ var animatables = getAnimatables(params.targets);
843
+ var animations = getAnimations(animatables, properties);
844
+ var timings = getInstanceTimings(animations, tweenSettings);
845
+ var id = instanceID;
846
+ instanceID++;
847
+ return mergeObjects(instanceSettings, {
848
+ id: id,
849
+ children: [],
850
+ animatables: animatables,
851
+ animations: animations,
852
+ duration: timings.duration,
853
+ delay: timings.delay,
854
+ endDelay: timings.endDelay
855
+ });
856
+ }
857
+
858
+ // Core
859
+
860
+ var activeInstances = [];
861
+
862
+ var engine = (function () {
863
+ var raf;
864
+
865
+ function play() {
866
+ if (!raf && (!isDocumentHidden() || !anime.suspendWhenDocumentHidden) && activeInstances.length > 0) {
867
+ raf = requestAnimationFrame(step);
868
+ }
869
+ }
870
+ function step(t) {
871
+ // memo on algorithm issue:
872
+ // dangerous iteration over mutable `activeInstances`
873
+ // (that collection may be updated from within callbacks of `tick`-ed animation instances)
874
+ var activeInstancesLength = activeInstances.length;
875
+ var i = 0;
876
+ while (i < activeInstancesLength) {
877
+ var activeInstance = activeInstances[i];
878
+ if (!activeInstance.paused) {
879
+ activeInstance.tick(t);
880
+ i++;
881
+ } else {
882
+ activeInstances.splice(i, 1);
883
+ activeInstancesLength--;
884
+ }
885
+ }
886
+ raf = i > 0 ? requestAnimationFrame(step) : undefined;
887
+ }
888
+
889
+ function handleVisibilityChange() {
890
+ if (!anime.suspendWhenDocumentHidden) { return; }
891
+
892
+ if (isDocumentHidden()) {
893
+ // suspend ticks
894
+ raf = cancelAnimationFrame(raf);
895
+ } else { // is back to active tab
896
+ // first adjust animations to consider the time that ticks were suspended
897
+ activeInstances.forEach(
898
+ function (instance) { return instance ._onDocumentVisibility(); }
899
+ );
900
+ engine();
901
+ }
902
+ }
903
+ if (typeof document !== 'undefined') {
904
+ document.addEventListener('visibilitychange', handleVisibilityChange);
905
+ }
906
+
907
+ return play;
908
+ })();
909
+
910
+ function isDocumentHidden() {
911
+ return !!document && document.hidden;
912
+ }
913
+
914
+ // Public Instance
915
+
916
+ function anime(params) {
917
+ if ( params === void 0 ) params = {};
918
+
919
+
920
+ var startTime = 0, lastTime = 0, now = 0;
921
+ var children, childrenLength = 0;
922
+ var resolve = null;
923
+
924
+ function makePromise(instance) {
925
+ var promise = window.Promise && new Promise(function (_resolve) { return resolve = _resolve; });
926
+ instance.finished = promise;
927
+ return promise;
928
+ }
929
+
930
+ var instance = createNewInstance(params);
931
+ makePromise(instance);
932
+
933
+ function toggleInstanceDirection() {
934
+ var direction = instance.direction;
935
+ if (direction !== 'alternate') {
936
+ instance.direction = direction !== 'normal' ? 'normal' : 'reverse';
937
+ }
938
+ instance.reversed = !instance.reversed;
939
+ children.forEach(function (child) { return child.reversed = instance.reversed; });
940
+ }
941
+
942
+ function adjustTime(time) {
943
+ return instance.reversed ? instance.duration - time : time;
944
+ }
945
+
946
+ function resetTime() {
947
+ startTime = 0;
948
+ lastTime = adjustTime(instance.currentTime) * (1 / anime.speed);
949
+ }
950
+
951
+ function seekChild(time, child) {
952
+ if (child) { child.seek(time - child.timelineOffset); }
953
+ }
954
+
955
+ function syncInstanceChildren(time) {
956
+ if (!instance.reversePlayback) {
957
+ for (var i = 0; i < childrenLength; i++) { seekChild(time, children[i]); }
958
+ } else {
959
+ for (var i$1 = childrenLength; i$1--;) { seekChild(time, children[i$1]); }
960
+ }
961
+ }
962
+
963
+ function setAnimationsProgress(insTime) {
964
+ var i = 0;
965
+ var animations = instance.animations;
966
+ var animationsLength = animations.length;
967
+ while (i < animationsLength) {
968
+ var anim = animations[i];
969
+ var animatable = anim.animatable;
970
+ var tweens = anim.tweens;
971
+ var tweenLength = tweens.length - 1;
972
+ var tween = tweens[tweenLength];
973
+ // Only check for keyframes if there is more than one tween
974
+ if (tweenLength) { tween = filterArray(tweens, function (t) { return (insTime < t.end); })[0] || tween; }
975
+ var elapsed = minMax(insTime - tween.start - tween.delay, 0, tween.duration) / tween.duration;
976
+ var eased = isNaN(elapsed) ? 1 : tween.easing(elapsed);
977
+ var strings = tween.to.strings;
978
+ var round = tween.round;
979
+ var numbers = [];
980
+ var toNumbersLength = tween.to.numbers.length;
981
+ var progress = (void 0);
982
+ for (var n = 0; n < toNumbersLength; n++) {
983
+ var value = (void 0);
984
+ var toNumber = tween.to.numbers[n];
985
+ var fromNumber = tween.from.numbers[n] || 0;
986
+ if (!tween.isPath) {
987
+ value = fromNumber + (eased * (toNumber - fromNumber));
988
+ } else {
989
+ value = getPathProgress(tween.value, eased * toNumber, tween.isPathTargetInsideSVG);
990
+ }
991
+ if (round) {
992
+ if (!(tween.isColor && n > 2)) {
993
+ value = Math.round(value * round) / round;
994
+ }
995
+ }
996
+ numbers.push(value);
997
+ }
998
+ // Manual Array.reduce for better performances
999
+ var stringsLength = strings.length;
1000
+ if (!stringsLength) {
1001
+ progress = numbers[0];
1002
+ } else {
1003
+ progress = strings[0];
1004
+ for (var s = 0; s < stringsLength; s++) {
1005
+ var b = strings[s + 1];
1006
+ var n$1 = numbers[s];
1007
+ if (!isNaN(n$1)) {
1008
+ if (!b) {
1009
+ progress += n$1 + ' ';
1010
+ } else {
1011
+ progress += n$1 + b;
1012
+ }
1013
+ }
1014
+ }
1015
+ }
1016
+ setProgressValue[anim.type](animatable.target, anim.property, progress, animatable.transforms);
1017
+ anim.currentValue = progress;
1018
+ i++;
1019
+ }
1020
+ }
1021
+
1022
+ function setCallback(cb) {
1023
+ if (instance[cb] && !instance.passThrough) { instance[cb](instance); }
1024
+ }
1025
+
1026
+ function countIteration() {
1027
+ if (instance.remaining && instance.remaining !== true) {
1028
+ instance.remaining--;
1029
+ }
1030
+ }
1031
+
1032
+ function setInstanceProgress(engineTime) {
1033
+ var insDuration = instance.duration;
1034
+ var insDelay = instance.delay;
1035
+ var insEndDelay = insDuration - instance.endDelay;
1036
+ var insTime = adjustTime(engineTime);
1037
+ instance.progress = minMax((insTime / insDuration) * 100, 0, 100);
1038
+ instance.reversePlayback = insTime < instance.currentTime;
1039
+ if (children) { syncInstanceChildren(insTime); }
1040
+ if (!instance.began && instance.currentTime > 0) {
1041
+ instance.began = true;
1042
+ setCallback('begin');
1043
+ }
1044
+ if (!instance.loopBegan && instance.currentTime > 0) {
1045
+ instance.loopBegan = true;
1046
+ setCallback('loopBegin');
1047
+ }
1048
+ if (insTime <= insDelay && instance.currentTime !== 0) {
1049
+ setAnimationsProgress(0);
1050
+ }
1051
+ if ((insTime >= insEndDelay && instance.currentTime !== insDuration) || !insDuration) {
1052
+ setAnimationsProgress(insDuration);
1053
+ }
1054
+ if (insTime > insDelay && insTime < insEndDelay) {
1055
+ if (!instance.changeBegan) {
1056
+ instance.changeBegan = true;
1057
+ instance.changeCompleted = false;
1058
+ setCallback('changeBegin');
1059
+ }
1060
+ setCallback('change');
1061
+ setAnimationsProgress(insTime);
1062
+ } else {
1063
+ if (instance.changeBegan) {
1064
+ instance.changeCompleted = true;
1065
+ instance.changeBegan = false;
1066
+ setCallback('changeComplete');
1067
+ }
1068
+ }
1069
+ instance.currentTime = minMax(insTime, 0, insDuration);
1070
+ if (instance.began) { setCallback('update'); }
1071
+ if (engineTime >= insDuration) {
1072
+ lastTime = 0;
1073
+ countIteration();
1074
+ if (!instance.remaining) {
1075
+ instance.paused = true;
1076
+ if (!instance.completed) {
1077
+ instance.completed = true;
1078
+ setCallback('loopComplete');
1079
+ setCallback('complete');
1080
+ if (!instance.passThrough && 'Promise' in window) {
1081
+ resolve();
1082
+ makePromise(instance);
1083
+ }
1084
+ }
1085
+ } else {
1086
+ startTime = now;
1087
+ setCallback('loopComplete');
1088
+ instance.loopBegan = false;
1089
+ if (instance.direction === 'alternate') {
1090
+ toggleInstanceDirection();
1091
+ }
1092
+ }
1093
+ }
1094
+ }
1095
+
1096
+ instance.reset = function() {
1097
+ var direction = instance.direction;
1098
+ instance.passThrough = false;
1099
+ instance.currentTime = 0;
1100
+ instance.progress = 0;
1101
+ instance.paused = true;
1102
+ instance.began = false;
1103
+ instance.loopBegan = false;
1104
+ instance.changeBegan = false;
1105
+ instance.completed = false;
1106
+ instance.changeCompleted = false;
1107
+ instance.reversePlayback = false;
1108
+ instance.reversed = direction === 'reverse';
1109
+ instance.remaining = instance.loop;
1110
+ children = instance.children;
1111
+ childrenLength = children.length;
1112
+ for (var i = childrenLength; i--;) { instance.children[i].reset(); }
1113
+ if (instance.reversed && instance.loop !== true || (direction === 'alternate' && instance.loop === 1)) { instance.remaining++; }
1114
+ setAnimationsProgress(instance.reversed ? instance.duration : 0);
1115
+ };
1116
+
1117
+ // internal method (for engine) to adjust animation timings before restoring engine ticks (rAF)
1118
+ instance._onDocumentVisibility = resetTime;
1119
+
1120
+ // Set Value helper
1121
+
1122
+ instance.set = function(targets, properties) {
1123
+ setTargetsValue(targets, properties);
1124
+ return instance;
1125
+ };
1126
+
1127
+ instance.tick = function(t) {
1128
+ now = t;
1129
+ if (!startTime) { startTime = now; }
1130
+ setInstanceProgress((now + (lastTime - startTime)) * anime.speed);
1131
+ };
1132
+
1133
+ instance.seek = function(time) {
1134
+ setInstanceProgress(adjustTime(time));
1135
+ };
1136
+
1137
+ instance.pause = function() {
1138
+ instance.paused = true;
1139
+ resetTime();
1140
+ };
1141
+
1142
+ instance.play = function() {
1143
+ if (!instance.paused) { return; }
1144
+ if (instance.completed) { instance.reset(); }
1145
+ instance.paused = false;
1146
+ activeInstances.push(instance);
1147
+ resetTime();
1148
+ engine();
1149
+ };
1150
+
1151
+ instance.reverse = function() {
1152
+ toggleInstanceDirection();
1153
+ instance.completed = instance.reversed ? false : true;
1154
+ resetTime();
1155
+ };
1156
+
1157
+ instance.restart = function() {
1158
+ instance.reset();
1159
+ instance.play();
1160
+ };
1161
+
1162
+ instance.remove = function(targets) {
1163
+ var targetsArray = parseTargets(targets);
1164
+ removeTargetsFromInstance(targetsArray, instance);
1165
+ };
1166
+
1167
+ instance.reset();
1168
+
1169
+ if (instance.autoplay) { instance.play(); }
1170
+
1171
+ return instance;
1172
+
1173
+ }
1174
+
1175
+ // Remove targets from animation
1176
+
1177
+ function removeTargetsFromAnimations(targetsArray, animations) {
1178
+ for (var a = animations.length; a--;) {
1179
+ if (arrayContains(targetsArray, animations[a].animatable.target)) {
1180
+ animations.splice(a, 1);
1181
+ }
1182
+ }
1183
+ }
1184
+
1185
+ function removeTargetsFromInstance(targetsArray, instance) {
1186
+ var animations = instance.animations;
1187
+ var children = instance.children;
1188
+ removeTargetsFromAnimations(targetsArray, animations);
1189
+ for (var c = children.length; c--;) {
1190
+ var child = children[c];
1191
+ var childAnimations = child.animations;
1192
+ removeTargetsFromAnimations(targetsArray, childAnimations);
1193
+ if (!childAnimations.length && !child.children.length) { children.splice(c, 1); }
1194
+ }
1195
+ if (!animations.length && !children.length) { instance.pause(); }
1196
+ }
1197
+
1198
+ function removeTargetsFromActiveInstances(targets) {
1199
+ var targetsArray = parseTargets(targets);
1200
+ for (var i = activeInstances.length; i--;) {
1201
+ var instance = activeInstances[i];
1202
+ removeTargetsFromInstance(targetsArray, instance);
1203
+ }
1204
+ }
1205
+
1206
+ // Stagger helpers
1207
+
1208
+ function stagger(val, params) {
1209
+ if ( params === void 0 ) params = {};
1210
+
1211
+ var direction = params.direction || 'normal';
1212
+ var easing = params.easing ? parseEasings(params.easing) : null;
1213
+ var grid = params.grid;
1214
+ var axis = params.axis;
1215
+ var fromIndex = params.from || 0;
1216
+ var fromFirst = fromIndex === 'first';
1217
+ var fromCenter = fromIndex === 'center';
1218
+ var fromLast = fromIndex === 'last';
1219
+ var isRange = is.arr(val);
1220
+ var val1 = isRange ? parseFloat(val[0]) : parseFloat(val);
1221
+ var val2 = isRange ? parseFloat(val[1]) : 0;
1222
+ var unit = getUnit(isRange ? val[1] : val) || 0;
1223
+ var start = params.start || 0 + (isRange ? val1 : 0);
1224
+ var values = [];
1225
+ var maxValue = 0;
1226
+ return function (el, i, t) {
1227
+ if (fromFirst) { fromIndex = 0; }
1228
+ if (fromCenter) { fromIndex = (t - 1) / 2; }
1229
+ if (fromLast) { fromIndex = t - 1; }
1230
+ if (!values.length) {
1231
+ for (var index = 0; index < t; index++) {
1232
+ if (!grid) {
1233
+ values.push(Math.abs(fromIndex - index));
1234
+ } else {
1235
+ var fromX = !fromCenter ? fromIndex%grid[0] : (grid[0]-1)/2;
1236
+ var fromY = !fromCenter ? Math.floor(fromIndex/grid[0]) : (grid[1]-1)/2;
1237
+ var toX = index%grid[0];
1238
+ var toY = Math.floor(index/grid[0]);
1239
+ var distanceX = fromX - toX;
1240
+ var distanceY = fromY - toY;
1241
+ var value = Math.sqrt(distanceX * distanceX + distanceY * distanceY);
1242
+ if (axis === 'x') { value = -distanceX; }
1243
+ if (axis === 'y') { value = -distanceY; }
1244
+ values.push(value);
1245
+ }
1246
+ maxValue = Math.max.apply(Math, values);
1247
+ }
1248
+ if (easing) { values = values.map(function (val) { return easing(val / maxValue) * maxValue; }); }
1249
+ if (direction === 'reverse') { values = values.map(function (val) { return axis ? (val < 0) ? val * -1 : -val : Math.abs(maxValue - val); }); }
1250
+ }
1251
+ var spacing = isRange ? (val2 - val1) / maxValue : val1;
1252
+ return start + (spacing * (Math.round(values[i] * 100) / 100)) + unit;
1253
+ }
1254
+ }
1255
+
1256
+ // Timeline
1257
+
1258
+ function timeline(params) {
1259
+ if ( params === void 0 ) params = {};
1260
+
1261
+ var tl = anime(params);
1262
+ tl.duration = 0;
1263
+ tl.add = function(instanceParams, timelineOffset) {
1264
+ var tlIndex = activeInstances.indexOf(tl);
1265
+ var children = tl.children;
1266
+ if (tlIndex > -1) { activeInstances.splice(tlIndex, 1); }
1267
+ function passThrough(ins) { ins.passThrough = true; }
1268
+ for (var i = 0; i < children.length; i++) { passThrough(children[i]); }
1269
+ var insParams = mergeObjects(instanceParams, replaceObjectProps(defaultTweenSettings, params));
1270
+ insParams.targets = insParams.targets || params.targets;
1271
+ var tlDuration = tl.duration;
1272
+ insParams.autoplay = false;
1273
+ insParams.direction = tl.direction;
1274
+ insParams.timelineOffset = is.und(timelineOffset) ? tlDuration : getRelativeValue(timelineOffset, tlDuration);
1275
+ passThrough(tl);
1276
+ tl.seek(insParams.timelineOffset);
1277
+ var ins = anime(insParams);
1278
+ passThrough(ins);
1279
+ children.push(ins);
1280
+ var timings = getInstanceTimings(children, params);
1281
+ tl.delay = timings.delay;
1282
+ tl.endDelay = timings.endDelay;
1283
+ tl.duration = timings.duration;
1284
+ tl.seek(0);
1285
+ tl.reset();
1286
+ if (tl.autoplay) { tl.play(); }
1287
+ return tl;
1288
+ };
1289
+ return tl;
1290
+ }
1291
+
1292
+ anime.version = '3.2.1';
1293
+ anime.speed = 1;
1294
+ // TODO:#review: naming, documentation
1295
+ anime.suspendWhenDocumentHidden = true;
1296
+ anime.running = activeInstances;
1297
+ anime.remove = removeTargetsFromActiveInstances;
1298
+ anime.get = getOriginalTargetValue;
1299
+ anime.set = setTargetsValue;
1300
+ anime.convertPx = convertPxToUnit;
1301
+ anime.path = getPath;
1302
+ anime.setDashoffset = setDashoffset;
1303
+ anime.stagger = stagger;
1304
+ anime.timeline = timeline;
1305
+ anime.easing = parseEasings;
1306
+ anime.penner = penner;
1307
+ anime.random = function (min, max) { return Math.floor(Math.random() * (max - min + 1)) + min; };
1308
+
1309
+ export { anime as a };