solidus_backend 2.1.1 → 2.2.0.beta1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of solidus_backend might be problematic. Click here for more details.

Files changed (544) hide show
  1. checksums.yaml +4 -4
  2. data/.eslintrc +21 -0
  3. data/Gemfile +3 -0
  4. data/Rakefile +30 -1
  5. data/app/assets/config/solidus_backend_manifest.js +6 -0
  6. data/app/assets/javascripts/spree/backend.js +11 -7
  7. data/app/assets/javascripts/spree/backend/address_states.js +1 -1
  8. data/app/assets/javascripts/spree/backend/admin.js +11 -11
  9. data/app/assets/javascripts/spree/backend/calculator.js +24 -14
  10. data/app/assets/javascripts/spree/backend/checkouts/edit.js +9 -96
  11. data/app/assets/javascripts/spree/backend/collections/index.js +2 -0
  12. data/app/assets/javascripts/spree/backend/collections/line_items.js +9 -0
  13. data/app/assets/javascripts/spree/backend/collections/states.js +13 -0
  14. data/app/assets/javascripts/spree/backend/components/number_with_currency.js +12 -0
  15. data/app/assets/javascripts/spree/backend/components/tooltips.js +2 -1
  16. data/app/assets/javascripts/spree/backend/format_money.js +11 -0
  17. data/app/assets/javascripts/spree/backend/handlebars_extensions.js +18 -0
  18. data/app/assets/javascripts/spree/backend/images/upload.js +1 -1
  19. data/app/assets/javascripts/spree/backend/models/address.js +2 -0
  20. data/app/assets/javascripts/spree/backend/models/index.js +2 -0
  21. data/app/assets/javascripts/spree/backend/models/line_item.js +7 -0
  22. data/app/assets/javascripts/spree/backend/models/order.js +37 -0
  23. data/app/assets/javascripts/spree/backend/namespaces.js +9 -0
  24. data/app/assets/javascripts/spree/backend/orders/cart.js +55 -0
  25. data/app/assets/javascripts/spree/backend/orders/index.js +2 -0
  26. data/app/assets/javascripts/spree/backend/payments/edit.js.coffee +0 -1
  27. data/app/assets/javascripts/spree/backend/payments/new.js +0 -11
  28. data/app/assets/javascripts/spree/backend/promotions.js.coffee +48 -50
  29. data/app/assets/javascripts/spree/backend/promotions/activation.js +26 -0
  30. data/app/assets/javascripts/spree/backend/returns/return_item_selection.js +16 -16
  31. data/app/assets/javascripts/spree/backend/shipments.js +1 -1
  32. data/app/assets/javascripts/spree/backend/spree-select2.js +1 -6
  33. data/app/assets/javascripts/spree/backend/stock_transfers/variant_form.coffee +1 -1
  34. data/app/assets/javascripts/spree/backend/taxon_autocomplete.js +0 -5
  35. data/app/assets/javascripts/spree/backend/taxonomy.js.coffee +9 -9
  36. data/app/assets/javascripts/spree/backend/taxons.js.coffee +7 -7
  37. data/app/assets/javascripts/spree/backend/templates/_image.hbs +5 -0
  38. data/app/assets/javascripts/spree/backend/templates/index.js +3 -0
  39. data/app/assets/javascripts/spree/backend/templates/orders/details_adjustment_row.hbs +4 -0
  40. data/app/assets/javascripts/spree/backend/templates/orders/line_item.hbs +42 -0
  41. data/app/assets/javascripts/spree/backend/templates/promotions/calculators/fields/tiered_flat_rate.hbs +2 -2
  42. data/app/assets/javascripts/spree/backend/templates/promotions/calculators/fields/tiered_percent.hbs +2 -2
  43. data/app/assets/javascripts/spree/backend/templates/promotions/rules/option_values.hbs +2 -2
  44. data/app/assets/javascripts/spree/backend/templates/stock_transfers/{transfer_item.hbs.erb → transfer_item.hbs} +1 -5
  45. data/app/assets/javascripts/spree/backend/templates/variants/{autocomplete.hbs.erb → autocomplete.hbs} +1 -5
  46. data/app/assets/javascripts/spree/backend/templates/variants/line_items_autocomplete_stock.hbs +18 -59
  47. data/app/assets/javascripts/spree/backend/translation.js +29 -0
  48. data/app/assets/javascripts/spree/backend/variant_autocomplete.js.coffee +5 -4
  49. data/app/assets/javascripts/spree/backend/views/cart/add_line_item_button.js +19 -0
  50. data/app/assets/javascripts/spree/backend/views/cart/line_item_row.js +88 -0
  51. data/app/assets/javascripts/spree/backend/views/cart/line_item_table.js +11 -0
  52. data/app/assets/javascripts/spree/backend/views/index.js +12 -0
  53. data/app/assets/javascripts/spree/backend/views/number_with_currency.js +31 -0
  54. data/app/assets/javascripts/spree/backend/views/order/address.js +52 -0
  55. data/app/assets/javascripts/spree/backend/views/order/customer_details.js +68 -0
  56. data/app/assets/javascripts/spree/backend/views/order/customer_select.js +55 -0
  57. data/app/assets/javascripts/spree/backend/views/order/details_adjustments.js +39 -0
  58. data/app/assets/javascripts/spree/backend/views/order/details_total.js +12 -0
  59. data/app/assets/javascripts/spree/backend/views/order/summary.js +36 -0
  60. data/app/assets/javascripts/spree/backend/views/state_select.js +71 -0
  61. data/app/assets/javascripts/spree/backend/views/zones/form.js +16 -0
  62. data/app/assets/javascripts/spree/backend/zone.js +8 -0
  63. data/app/assets/stylesheets/spree/backend.css +1 -1
  64. data/app/assets/stylesheets/spree/backend/_bootstrap_custom.scss +542 -246
  65. data/app/assets/stylesheets/spree/backend/components/_date-picker.scss +5 -7
  66. data/app/assets/stylesheets/spree/backend/components/_image_placeholder.scss +24 -0
  67. data/app/assets/stylesheets/spree/backend/components/_messages.scss +8 -8
  68. data/app/assets/stylesheets/spree/backend/components/_navigation.scss +6 -15
  69. data/app/assets/stylesheets/spree/backend/components/_number_with_currency.scss +39 -0
  70. data/app/assets/stylesheets/spree/backend/components/_progress.scss +5 -5
  71. data/app/assets/stylesheets/spree/backend/components/_states.scss +6 -6
  72. data/app/assets/stylesheets/spree/backend/components/_stock_table.scss +1 -2
  73. data/app/assets/stylesheets/spree/backend/components/_tabs.scss +9 -9
  74. data/app/assets/stylesheets/spree/backend/globals/_deprecation.scss +17 -0
  75. data/app/assets/stylesheets/spree/backend/globals/_variables.scss +25 -4
  76. data/app/assets/stylesheets/spree/backend/globals/mixins/_line_through.scss +1 -1
  77. data/app/assets/stylesheets/spree/backend/plugins/_bootstrap_tooltip.scss +4 -4
  78. data/app/assets/stylesheets/spree/backend/plugins/_select2.scss +64 -187
  79. data/app/assets/stylesheets/spree/backend/sections/_log_entries.scss +3 -3
  80. data/app/assets/stylesheets/spree/backend/sections/_orders.scss +16 -20
  81. data/app/assets/stylesheets/spree/backend/sections/_products.scss +2 -2
  82. data/app/assets/stylesheets/spree/backend/sections/_promotions.scss +7 -2
  83. data/app/assets/stylesheets/spree/backend/sections/_return_authorizations.scss +0 -14
  84. data/app/assets/stylesheets/spree/backend/sections/_stock_management.scss +2 -2
  85. data/app/assets/stylesheets/spree/backend/sections/_store_credits.scss +0 -6
  86. data/app/assets/stylesheets/spree/backend/sections/_style_guide.scss +6 -6
  87. data/app/assets/stylesheets/spree/backend/sections/_taxonomies.scss +1 -1
  88. data/app/assets/stylesheets/spree/backend/shared/_forms.scss +31 -123
  89. data/app/assets/stylesheets/spree/backend/shared/_header.scss +5 -4
  90. data/app/assets/stylesheets/spree/backend/shared/_icons.scss +1 -1
  91. data/app/assets/stylesheets/spree/backend/shared/_images.scss +7 -0
  92. data/app/assets/stylesheets/spree/backend/shared/_layout.scss +4 -14
  93. data/app/assets/stylesheets/spree/backend/shared/_tables.scss +21 -32
  94. data/app/assets/stylesheets/spree/backend/shared/_typography.scss +14 -47
  95. data/app/assets/stylesheets/spree/backend/spree_admin.scss +4 -0
  96. data/app/controllers/spree/admin/adjustments_controller.rb +1 -1
  97. data/app/controllers/spree/admin/base_controller.rb +1 -1
  98. data/app/controllers/spree/admin/cancellations_controller.rb +1 -1
  99. data/app/controllers/spree/admin/customer_returns_controller.rb +2 -0
  100. data/app/controllers/spree/admin/general_settings_controller.rb +1 -27
  101. data/app/controllers/spree/admin/images_controller.rb +1 -1
  102. data/app/controllers/spree/admin/option_types_controller.rb +4 -4
  103. data/app/controllers/spree/admin/orders/customer_details_controller.rb +2 -2
  104. data/app/controllers/spree/admin/orders_controller.rb +2 -2
  105. data/app/controllers/spree/admin/payment_methods_controller.rb +1 -1
  106. data/app/controllers/spree/admin/payments_controller.rb +4 -4
  107. data/app/controllers/spree/admin/products_controller.rb +6 -6
  108. data/app/controllers/spree/admin/promotion_code_batches_controller.rb +28 -0
  109. data/app/controllers/spree/admin/promotion_codes_controller.rb +7 -3
  110. data/app/controllers/spree/admin/promotions_controller.rb +13 -23
  111. data/app/controllers/spree/admin/refunds_controller.rb +1 -1
  112. data/app/controllers/spree/admin/reimbursements_controller.rb +4 -2
  113. data/app/controllers/spree/admin/search_controller.rb +2 -2
  114. data/app/controllers/spree/admin/shipping_methods_controller.rb +2 -2
  115. data/app/controllers/spree/admin/states_controller.rb +1 -1
  116. data/app/controllers/spree/admin/stock_items_controller.rb +3 -3
  117. data/app/controllers/spree/admin/stock_transfers_controller.rb +2 -2
  118. data/app/controllers/spree/admin/store_credits_controller.rb +8 -2
  119. data/app/controllers/spree/admin/stores_controller.rb +23 -0
  120. data/app/controllers/spree/admin/tax_rates_controller.rb +3 -3
  121. data/app/controllers/spree/admin/taxons_controller.rb +5 -5
  122. data/app/controllers/spree/admin/users_controller.rb +1 -8
  123. data/app/controllers/spree/admin/variants_controller.rb +9 -2
  124. data/app/controllers/spree/admin/zones_controller.rb +3 -3
  125. data/app/helpers/spree/admin/base_helper.rb +2 -1
  126. data/app/helpers/spree/admin/navigation_helper.rb +2 -2
  127. data/app/models/spree/backend_configuration.rb +3 -3
  128. data/app/views/spree/admin/adjustment_reasons/edit.html.erb +3 -3
  129. data/app/views/spree/admin/adjustment_reasons/index.html.erb +1 -1
  130. data/app/views/spree/admin/adjustment_reasons/new.html.erb +3 -3
  131. data/app/views/spree/admin/adjustment_reasons/shared/_form.html.erb +3 -3
  132. data/app/views/spree/admin/adjustments/_adjustment.html.erb +2 -2
  133. data/app/views/spree/admin/adjustments/_adjustments_table.html.erb +1 -1
  134. data/app/views/spree/admin/adjustments/_form.html.erb +3 -3
  135. data/app/views/spree/admin/adjustments/edit.html.erb +5 -5
  136. data/app/views/spree/admin/adjustments/index.html.erb +4 -4
  137. data/app/views/spree/admin/adjustments/new.html.erb +4 -4
  138. data/app/views/spree/admin/cancellations/index.html.erb +1 -1
  139. data/app/views/spree/admin/countries/_form.html.erb +5 -5
  140. data/app/views/spree/admin/countries/edit.html.erb +3 -3
  141. data/app/views/spree/admin/countries/index.html.erb +3 -3
  142. data/app/views/spree/admin/countries/new.html.erb +3 -3
  143. data/app/views/spree/admin/customer_returns/_return_item_decision.html.erb +6 -6
  144. data/app/views/spree/admin/customer_returns/_return_item_selection.html.erb +5 -5
  145. data/app/views/spree/admin/customer_returns/edit.html.erb +1 -1
  146. data/app/views/spree/admin/customer_returns/index.html.erb +2 -2
  147. data/app/views/spree/admin/customer_returns/new.html.erb +5 -5
  148. data/app/views/spree/admin/images/_form.html.erb +2 -2
  149. data/app/views/spree/admin/images/_image_row.html.erb +5 -3
  150. data/app/views/spree/admin/images/edit.html.erb +7 -7
  151. data/app/views/spree/admin/images/index.html.erb +3 -3
  152. data/app/views/spree/admin/images/new.html.erb +3 -3
  153. data/app/views/spree/admin/log_entries/index.html.erb +1 -1
  154. data/app/views/spree/admin/option_types/_form.html.erb +4 -4
  155. data/app/views/spree/admin/option_types/_option_value_fields.html.erb +1 -1
  156. data/app/views/spree/admin/option_types/edit.html.erb +5 -5
  157. data/app/views/spree/admin/option_types/index.html.erb +4 -4
  158. data/app/views/spree/admin/option_types/new.html.erb +3 -3
  159. data/app/views/spree/admin/option_types/new.js.erb +1 -1
  160. data/app/views/spree/admin/orders/_add_line_item.html.erb +2 -2
  161. data/app/views/spree/admin/orders/_add_product.html.erb +3 -6
  162. data/app/views/spree/admin/orders/_adjustments.html.erb +18 -20
  163. data/app/views/spree/admin/orders/_carton_manifest.html.erb +1 -1
  164. data/app/views/spree/admin/orders/_form.html.erb +5 -29
  165. data/app/views/spree/admin/orders/_line_items.html.erb +22 -48
  166. data/app/views/spree/admin/orders/_line_items_edit_form.html.erb +6 -31
  167. data/app/views/spree/admin/orders/_order_details.html.erb +32 -0
  168. data/app/views/spree/admin/orders/_shipment.html.erb +10 -13
  169. data/app/views/spree/admin/orders/_shipment_manifest.html.erb +3 -3
  170. data/app/views/spree/admin/orders/cart.html.erb +4 -14
  171. data/app/views/spree/admin/orders/confirm.html.erb +3 -3
  172. data/app/views/spree/admin/orders/confirm/_customer_details.html.erb +2 -2
  173. data/app/views/spree/admin/orders/confirm/_payments.html.erb +1 -1
  174. data/app/views/spree/admin/orders/confirm/_shipment_manifest.html.erb +1 -1
  175. data/app/views/spree/admin/orders/customer_details/_form.html.erb +24 -20
  176. data/app/views/spree/admin/orders/customer_details/edit.html.erb +13 -11
  177. data/app/views/spree/admin/orders/customer_details/show.html.erb +2 -2
  178. data/app/views/spree/admin/orders/edit.html.erb +2 -1
  179. data/app/views/spree/admin/orders/index.html.erb +22 -20
  180. data/app/views/spree/admin/payment_methods/_form.html.erb +6 -6
  181. data/app/views/spree/admin/payment_methods/edit.html.erb +3 -3
  182. data/app/views/spree/admin/payment_methods/index.html.erb +4 -4
  183. data/app/views/spree/admin/payment_methods/new.html.erb +3 -3
  184. data/app/views/spree/admin/payments/_form.html.erb +10 -8
  185. data/app/views/spree/admin/payments/_list.html.erb +2 -2
  186. data/app/views/spree/admin/payments/credit.html.erb +1 -1
  187. data/app/views/spree/admin/payments/index.html.erb +3 -3
  188. data/app/views/spree/admin/payments/new.html.erb +4 -4
  189. data/app/views/spree/admin/payments/show.html.erb +3 -3
  190. data/app/views/spree/admin/payments/source_forms/_gateway.html.erb +6 -9
  191. data/app/views/spree/admin/payments/source_views/_gateway.html.erb +1 -1
  192. data/app/views/spree/admin/payments/source_views/_storecredit.html.erb +1 -1
  193. data/app/views/spree/admin/prices/_form.html.erb +4 -15
  194. data/app/views/spree/admin/prices/_master_variant_table.html.erb +3 -3
  195. data/app/views/spree/admin/prices/_table.html.erb +2 -2
  196. data/app/views/spree/admin/prices/edit.html.erb +1 -1
  197. data/app/views/spree/admin/prices/index.html.erb +6 -6
  198. data/app/views/spree/admin/prices/new.html.erb +2 -2
  199. data/app/views/spree/admin/prices/new.js.erb +1 -1
  200. data/app/views/spree/admin/product_properties/index.html.erb +5 -5
  201. data/app/views/spree/admin/products/_form.html.erb +21 -27
  202. data/app/views/spree/admin/products/edit.html.erb +6 -6
  203. data/app/views/spree/admin/products/index.html.erb +15 -15
  204. data/app/views/spree/admin/products/new.html.erb +14 -14
  205. data/app/views/spree/admin/products/new.js.erb +1 -1
  206. data/app/views/spree/admin/promotion_actions/create.js.erb +3 -2
  207. data/app/views/spree/admin/promotion_categories/_form.html.erb +4 -4
  208. data/app/views/spree/admin/promotion_categories/edit.html.erb +3 -3
  209. data/app/views/spree/admin/promotion_categories/index.html.erb +2 -2
  210. data/app/views/spree/admin/promotion_categories/new.html.erb +3 -3
  211. data/app/views/spree/admin/promotion_code_batches/download.csv.ruby +6 -0
  212. data/app/views/spree/admin/promotion_code_batches/index.html.erb +65 -0
  213. data/app/views/spree/admin/promotion_code_batches/new.html.erb +23 -0
  214. data/app/views/spree/admin/promotion_codes/index.csv.ruby +1 -1
  215. data/app/views/spree/admin/promotion_codes/index.html.erb +28 -0
  216. data/app/views/spree/admin/promotion_rules/create.js.erb +1 -1
  217. data/app/views/spree/admin/promotions/_actions.html.erb +4 -4
  218. data/app/views/spree/admin/promotions/_activations_edit.html.erb +22 -0
  219. data/app/views/spree/admin/promotions/_activations_new.html.erb +66 -0
  220. data/app/views/spree/admin/promotions/_form.html.erb +51 -64
  221. data/app/views/spree/admin/promotions/_promotion_action.html.erb +4 -4
  222. data/app/views/spree/admin/promotions/_promotion_rule.html.erb +4 -4
  223. data/app/views/spree/admin/promotions/_rules.html.erb +6 -8
  224. data/app/views/spree/admin/promotions/actions/_create_quantity_adjustments.html.erb +2 -2
  225. data/app/views/spree/admin/promotions/actions/_promotion_calculators_with_custom_fields.html.erb +21 -22
  226. data/app/views/spree/admin/promotions/calculators/flat_rate/_fields.html.erb +4 -0
  227. data/app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb +8 -6
  228. data/app/views/spree/admin/promotions/calculators/tiered_percent/_fields.html.erb +8 -6
  229. data/app/views/spree/admin/promotions/edit.html.erb +15 -12
  230. data/app/views/spree/admin/promotions/index.html.erb +9 -9
  231. data/app/views/spree/admin/promotions/new.html.erb +5 -6
  232. data/app/views/spree/admin/promotions/rules/_first_repeat_purchase_since.html.erb +3 -3
  233. data/app/views/spree/admin/promotions/rules/_item_total.html.erb +7 -10
  234. data/app/views/spree/admin/promotions/rules/_landing_page.html.erb +2 -2
  235. data/app/views/spree/admin/promotions/rules/_nth_order.html.erb +4 -4
  236. data/app/views/spree/admin/promotions/rules/_option_value.html.erb +3 -3
  237. data/app/views/spree/admin/promotions/rules/_product.html.erb +4 -4
  238. data/app/views/spree/admin/promotions/rules/_taxon.html.erb +4 -4
  239. data/app/views/spree/admin/promotions/rules/_user.html.erb +1 -1
  240. data/app/views/spree/admin/properties/_form.html.erb +4 -4
  241. data/app/views/spree/admin/properties/edit.html.erb +3 -3
  242. data/app/views/spree/admin/properties/index.html.erb +7 -7
  243. data/app/views/spree/admin/properties/new.html.erb +3 -3
  244. data/app/views/spree/admin/properties/new.js.erb +1 -1
  245. data/app/views/spree/admin/refund_reasons/edit.html.erb +3 -3
  246. data/app/views/spree/admin/refund_reasons/index.html.erb +1 -1
  247. data/app/views/spree/admin/refund_reasons/new.html.erb +3 -3
  248. data/app/views/spree/admin/refund_reasons/shared/_form.html.erb +3 -3
  249. data/app/views/spree/admin/refunds/edit.html.erb +2 -2
  250. data/app/views/spree/admin/refunds/new.html.erb +4 -4
  251. data/app/views/spree/admin/reimbursements/edit.html.erb +6 -6
  252. data/app/views/spree/admin/reimbursements/index.html.erb +2 -2
  253. data/app/views/spree/admin/reimbursements/show.html.erb +6 -6
  254. data/app/views/spree/admin/reports/sales_total.html.erb +1 -1
  255. data/app/views/spree/admin/return_authorizations/_form.html.erb +3 -7
  256. data/app/views/spree/admin/return_authorizations/edit.html.erb +3 -3
  257. data/app/views/spree/admin/return_authorizations/index.html.erb +3 -3
  258. data/app/views/spree/admin/return_authorizations/new.html.erb +3 -3
  259. data/app/views/spree/admin/shared/_address_form.html.erb +12 -20
  260. data/app/views/spree/admin/shared/_calculator_fields.html.erb +10 -13
  261. data/app/views/spree/admin/shared/_configuration_menu.html.erb +2 -2
  262. data/app/views/spree/admin/shared/_head.html.erb +1 -1
  263. data/app/views/spree/admin/shared/_image.html.erb +7 -0
  264. data/app/views/spree/admin/shared/_js_locale_data.html.erb +47 -0
  265. data/app/views/spree/admin/shared/_new_resource_links.html.erb +1 -1
  266. data/app/views/spree/admin/shared/_number_with_currency.html.erb +16 -0
  267. data/app/views/spree/admin/shared/_order_submenu.html.erb +1 -1
  268. data/app/views/spree/admin/shared/_order_summary.html.erb +16 -17
  269. data/app/views/spree/admin/shared/_product_tabs.html.erb +6 -6
  270. data/app/views/spree/admin/shared/_report_criteria.html.erb +7 -7
  271. data/app/views/spree/admin/shared/_report_order_criteria.html.erb +9 -9
  272. data/app/views/spree/admin/shared/_settings_sub_menu.html.erb +2 -2
  273. data/app/views/spree/admin/shared/_sidebar.html.erb +1 -1
  274. data/app/views/spree/admin/shared/_variant_search.html.erb +4 -4
  275. data/app/views/spree/admin/shared/named_types/_edit.html.erb +3 -3
  276. data/app/views/spree/admin/shared/named_types/_form.html.erb +8 -10
  277. data/app/views/spree/admin/shared/named_types/_index.html.erb +1 -1
  278. data/app/views/spree/admin/shared/named_types/_new.html.erb +3 -3
  279. data/app/views/spree/admin/shipping_categories/edit.html.erb +3 -3
  280. data/app/views/spree/admin/shipping_categories/index.html.erb +3 -3
  281. data/app/views/spree/admin/shipping_categories/new.html.erb +3 -3
  282. data/app/views/spree/admin/shipping_methods/_form.html.erb +15 -15
  283. data/app/views/spree/admin/shipping_methods/edit.html.erb +3 -3
  284. data/app/views/spree/admin/shipping_methods/index.html.erb +4 -4
  285. data/app/views/spree/admin/shipping_methods/new.html.erb +3 -3
  286. data/app/views/spree/admin/states/_form.html.erb +4 -4
  287. data/app/views/spree/admin/states/_new.html.erb +2 -2
  288. data/app/views/spree/admin/states/_state_list.html.erb +2 -2
  289. data/app/views/spree/admin/states/edit.html.erb +3 -3
  290. data/app/views/spree/admin/states/index.html.erb +6 -6
  291. data/app/views/spree/admin/states/new.html.erb +3 -3
  292. data/app/views/spree/admin/stock_items/_stock_management.html.erb +3 -3
  293. data/app/views/spree/admin/stock_items/index.html.erb +4 -4
  294. data/app/views/spree/admin/stock_locations/_form.html.erb +10 -10
  295. data/app/views/spree/admin/stock_locations/_transfer_stock_form.html.erb +5 -5
  296. data/app/views/spree/admin/stock_locations/edit.html.erb +3 -3
  297. data/app/views/spree/admin/stock_locations/index.html.erb +4 -4
  298. data/app/views/spree/admin/stock_locations/new.html.erb +3 -3
  299. data/app/views/spree/admin/stock_movements/index.html.erb +2 -8
  300. data/app/views/spree/admin/stock_transfers/_stock_movements.html.erb +1 -1
  301. data/app/views/spree/admin/stock_transfers/_transfer_item_table.html.erb +1 -1
  302. data/app/views/spree/admin/stock_transfers/edit.html.erb +1 -1
  303. data/app/views/spree/admin/stock_transfers/index.html.erb +9 -9
  304. data/app/views/spree/admin/stock_transfers/receive.html.erb +1 -1
  305. data/app/views/spree/admin/stock_transfers/show.html.erb +5 -5
  306. data/app/views/spree/admin/store_credits/_form.html.erb +7 -6
  307. data/app/views/spree/admin/store_credits/_update_reason_field.html.erb +1 -1
  308. data/app/views/spree/admin/store_credits/edit_amount.html.erb +1 -1
  309. data/app/views/spree/admin/store_credits/index.html.erb +14 -11
  310. data/app/views/spree/admin/store_credits/new.html.erb +2 -2
  311. data/app/views/spree/admin/stores/_form.html.erb +51 -0
  312. data/app/views/spree/admin/stores/edit.html.erb +19 -0
  313. data/app/views/spree/admin/stores/index.html.erb +41 -0
  314. data/app/views/spree/admin/stores/new.html.erb +15 -0
  315. data/app/views/spree/admin/style_guide/topics/forms/_building_forms.html.erb +10 -8
  316. data/app/views/spree/admin/style_guide/topics/tables/_building_tables.html.erb +23 -4
  317. data/app/views/spree/admin/tax_categories/_form.html.erb +8 -8
  318. data/app/views/spree/admin/tax_categories/edit.html.erb +3 -3
  319. data/app/views/spree/admin/tax_categories/index.html.erb +4 -4
  320. data/app/views/spree/admin/tax_categories/new.html.erb +3 -3
  321. data/app/views/spree/admin/tax_rates/_form.html.erb +7 -7
  322. data/app/views/spree/admin/tax_rates/edit.html.erb +3 -3
  323. data/app/views/spree/admin/tax_rates/index.html.erb +3 -3
  324. data/app/views/spree/admin/tax_rates/new.html.erb +3 -3
  325. data/app/views/spree/admin/taxonomies/_form.html.erb +1 -1
  326. data/app/views/spree/admin/taxonomies/_list.html.erb +2 -2
  327. data/app/views/spree/admin/taxonomies/_taxon.html.erb +1 -1
  328. data/app/views/spree/admin/taxonomies/edit.erb +1 -1
  329. data/app/views/spree/admin/taxonomies/index.html.erb +2 -2
  330. data/app/views/spree/admin/taxonomies/new.html.erb +1 -1
  331. data/app/views/spree/admin/taxons/_form.html.erb +10 -10
  332. data/app/views/spree/admin/taxons/_taxon_table.html.erb +1 -1
  333. data/app/views/spree/admin/taxons/edit.html.erb +2 -2
  334. data/app/views/spree/admin/taxons/index.html.erb +2 -2
  335. data/app/views/spree/admin/users/_addresses_form.html.erb +4 -4
  336. data/app/views/spree/admin/users/_form.html.erb +8 -7
  337. data/app/views/spree/admin/users/addresses.html.erb +5 -5
  338. data/app/views/spree/admin/users/edit.html.erb +15 -15
  339. data/app/views/spree/admin/users/index.html.erb +5 -5
  340. data/app/views/spree/admin/users/items.html.erb +7 -7
  341. data/app/views/spree/admin/users/new.html.erb +3 -3
  342. data/app/views/spree/admin/users/orders.html.erb +7 -7
  343. data/app/views/spree/admin/variants/_form.html.erb +14 -14
  344. data/app/views/spree/admin/variants/_table.html.erb +2 -2
  345. data/app/views/spree/admin/variants/_table_filter.html.erb +3 -3
  346. data/app/views/spree/admin/variants/edit.html.erb +4 -4
  347. data/app/views/spree/admin/variants/index.html.erb +2 -2
  348. data/app/views/spree/admin/variants/new.html.erb +4 -4
  349. data/app/views/spree/admin/variants/new.js.erb +1 -1
  350. data/app/views/spree/admin/zones/_country_members.html.erb +1 -1
  351. data/app/views/spree/admin/zones/_form.html.erb +9 -9
  352. data/app/views/spree/admin/zones/_state_members.html.erb +1 -1
  353. data/app/views/spree/admin/zones/edit.html.erb +3 -3
  354. data/app/views/spree/admin/zones/index.html.erb +6 -6
  355. data/app/views/spree/admin/zones/new.html.erb +3 -3
  356. data/app/views/spree/layouts/admin.html.erb +3 -3
  357. data/app/views/spree/layouts/admin_style_guide.html.erb +1 -1
  358. data/config/initializers/assets.rb +1 -7
  359. data/config/routes.rb +6 -2
  360. data/lib/spree/backend.rb +0 -1
  361. data/lib/spree/backend/engine.rb +0 -5
  362. data/solidus_backend.gemspec +0 -1
  363. data/spec/controllers/spree/admin/payments_controller_spec.rb +21 -7
  364. data/spec/controllers/spree/admin/promotions_controller_spec.rb +30 -36
  365. data/spec/controllers/spree/admin/store_credits_controller_spec.rb +1 -0
  366. data/spec/controllers/spree/admin/users_controller_spec.rb +9 -1
  367. data/spec/features/admin/configuration/payment_methods_spec.rb +1 -1
  368. data/spec/features/admin/configuration/shipping_methods_spec.rb +21 -13
  369. data/spec/features/admin/configuration/stock_locations_spec.rb +3 -2
  370. data/spec/features/admin/configuration/{general_settings_spec.rb → store_spec.rb} +8 -9
  371. data/spec/features/admin/javascript_format_money_spec.rb +20 -0
  372. data/spec/features/admin/orders/customer_details_spec.rb +16 -12
  373. data/spec/features/admin/orders/line_items_spec.rb +2 -2
  374. data/spec/features/admin/orders/listing_spec.rb +25 -10
  375. data/spec/features/admin/orders/new_order_spec.rb +18 -31
  376. data/spec/features/admin/orders/order_details_spec.rb +22 -27
  377. data/spec/features/admin/orders/payments_spec.rb +5 -12
  378. data/spec/features/admin/orders/shipments_spec.rb +36 -2
  379. data/spec/features/admin/products/edit/images_spec.rb +1 -1
  380. data/spec/features/admin/products/edit/products_spec.rb +3 -3
  381. data/spec/features/admin/products/pricing_spec.rb +1 -1
  382. data/spec/features/admin/promotion_adjustments_spec.rb +42 -20
  383. data/spec/features/admin/stock_transfer_spec.rb +4 -4
  384. data/spec/features/admin/users_spec.rb +14 -0
  385. data/spec/javascripts/fixtures/_boot.html.erb +8 -0
  386. data/spec/javascripts/fixtures/number_with_currency/with_currency_select.html.erb +3 -0
  387. data/spec/javascripts/fixtures/number_with_currency/without_select.html.erb +3 -0
  388. data/spec/javascripts/format_money_spec.js +48 -0
  389. data/spec/javascripts/spec_helper.js +11 -0
  390. data/spec/javascripts/support/show_errors.js +8 -0
  391. data/spec/javascripts/support/with_translations.js +11 -0
  392. data/spec/javascripts/translation_spec.js +50 -0
  393. data/spec/javascripts/views/number_with_currency_spec.js +72 -0
  394. data/spec/spec_helper.rb +1 -0
  395. data/spec/support/feature/order_feature_helper.rb +8 -0
  396. data/spec/teaspoon_env.rb +17 -0
  397. data/vendor/assets/images/solidus_admin/select2-spinner.gif +0 -0
  398. data/vendor/assets/images/solidus_admin/select2.png +0 -0
  399. data/vendor/assets/images/solidus_admin/select2x2.png +0 -0
  400. data/vendor/assets/javascripts/solidus_admin/accounting.js +4 -0
  401. data/vendor/assets/javascripts/solidus_admin/backbone-nested-models.js +193 -0
  402. data/vendor/assets/javascripts/solidus_admin/bootstrap.js +1775 -1800
  403. data/vendor/assets/javascripts/solidus_admin/select2.js +3729 -0
  404. data/vendor/assets/javascripts/solidus_admin/select2_locales/index.js +1 -0
  405. data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_ar.js +19 -0
  406. data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_az.js +20 -0
  407. data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_bg.js +20 -0
  408. data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_ca.js +19 -0
  409. data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_cs.js +51 -0
  410. data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_da.js +19 -0
  411. data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_de.js +18 -0
  412. data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_el.js +19 -0
  413. data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_es.js +19 -0
  414. data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_et.js +19 -0
  415. data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_eu.js +45 -0
  416. data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_fa.js +21 -0
  417. data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_fi.js +30 -0
  418. data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_fr.js +18 -0
  419. data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_gl.js +45 -0
  420. data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_he.js +19 -0
  421. data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_hr.js +24 -0
  422. data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_hu.js +17 -0
  423. data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_id.js +21 -0
  424. data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_is.js +17 -0
  425. data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_it.js +17 -0
  426. data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_ja.js +17 -0
  427. data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_ka.js +19 -0
  428. data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_ko.js +19 -0
  429. data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_lt.js +26 -0
  430. data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_lv.js +19 -0
  431. data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_mk.js +19 -0
  432. data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_ms.js +21 -0
  433. data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_nb.js +22 -0
  434. data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_nl.js +17 -0
  435. data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_pl.js +54 -0
  436. data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_pt-BR.js +18 -0
  437. data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_pt-PT.js +17 -0
  438. data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_ro.js +17 -0
  439. data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_rs.js +19 -0
  440. data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_ru.js +23 -0
  441. data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_sk.js +50 -0
  442. data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_sv.js +19 -0
  443. data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_th.js +19 -0
  444. data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_tr.js +20 -0
  445. data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_ug-CN.js +16 -0
  446. data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_uk.js +25 -0
  447. data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_vi.js +20 -0
  448. data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_zh-CN.js +16 -0
  449. data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_zh-TW.js +16 -0
  450. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_alert.scss +5 -15
  451. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_badge.scss +77 -0
  452. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_breadcrumb.scss +25 -10
  453. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_button-group.scss +38 -60
  454. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_buttons.scss +27 -30
  455. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_card.scss +66 -82
  456. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_carousel.scss +99 -173
  457. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_close.scss +6 -3
  458. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_code.scss +13 -7
  459. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_custom-forms.scss +151 -114
  460. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_custom.scss +4 -0
  461. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_dropdown.scss +28 -60
  462. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_forms.scss +154 -218
  463. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_grid.scss +22 -46
  464. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_images.scss +7 -17
  465. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_input-group.scss +43 -54
  466. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_list-group.scss +80 -79
  467. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_media.scss +6 -84
  468. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_mixins.scss +9 -7
  469. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_modal.scss +38 -42
  470. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_nav.scss +41 -84
  471. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_navbar.scss +171 -133
  472. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_normalize.scss +230 -197
  473. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_pagination.scss +16 -22
  474. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_popover.scss +87 -56
  475. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_print.scss +96 -65
  476. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_progress.scss +17 -141
  477. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_reboot.scss +76 -34
  478. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_responsive-embed.scss +18 -5
  479. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_tables.scss +26 -66
  480. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_tooltip.scss +23 -18
  481. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_transitions.scss +34 -0
  482. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_type.scss +16 -30
  483. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_utilities.scss +13 -95
  484. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_variables.scss +542 -247
  485. data/vendor/assets/stylesheets/solidus_admin/bootstrap/bootstrap-grid.scss +20 -39
  486. data/vendor/assets/stylesheets/solidus_admin/bootstrap/bootstrap-reboot.scss +2 -2
  487. data/vendor/assets/stylesheets/solidus_admin/bootstrap/bootstrap.scss +6 -8
  488. data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_background-variant.scss +1 -2
  489. data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/{_label.scss → _badge.scss} +2 -2
  490. data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_breakpoints.scss +25 -16
  491. data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_buttons.scss +39 -53
  492. data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_cards.scss +11 -2
  493. data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_clearfix.scss +1 -1
  494. data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_float.scss +9 -0
  495. data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_forms.scss +11 -21
  496. data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_gradients.scss +5 -11
  497. data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_grid-framework.scss +39 -18
  498. data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_grid.scss +52 -27
  499. data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_hover.scss +10 -9
  500. data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_image.scss +6 -4
  501. data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_list-group.scss +3 -5
  502. data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_pagination.scss +2 -3
  503. data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_reset-text.scss +3 -4
  504. data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_screen-reader.scss +2 -2
  505. data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_text-emphasis.scss +1 -1
  506. data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_text-hide.scss +1 -1
  507. data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_transforms.scss +14 -0
  508. data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_visibility.scss +5 -0
  509. data/vendor/assets/stylesheets/solidus_admin/bootstrap/utilities/_align.scss +6 -0
  510. data/vendor/assets/stylesheets/solidus_admin/bootstrap/{_utilities-background.scss → utilities/_background.scss} +3 -8
  511. data/vendor/assets/stylesheets/solidus_admin/bootstrap/utilities/_borders.scss +37 -0
  512. data/vendor/assets/stylesheets/solidus_admin/bootstrap/utilities/_clearfix.scss +3 -0
  513. data/vendor/assets/stylesheets/solidus_admin/bootstrap/utilities/_display.scss +18 -0
  514. data/vendor/assets/stylesheets/solidus_admin/bootstrap/utilities/_flex.scss +48 -0
  515. data/vendor/assets/stylesheets/solidus_admin/bootstrap/utilities/_float.scss +9 -0
  516. data/vendor/assets/stylesheets/solidus_admin/bootstrap/utilities/_position.scss +23 -0
  517. data/vendor/assets/stylesheets/solidus_admin/bootstrap/utilities/_screenreaders.scss +11 -0
  518. data/vendor/assets/stylesheets/solidus_admin/bootstrap/utilities/_sizing.scss +10 -0
  519. data/vendor/assets/stylesheets/solidus_admin/bootstrap/utilities/_spacing.scss +43 -0
  520. data/vendor/assets/stylesheets/solidus_admin/bootstrap/utilities/_text.scss +61 -0
  521. data/vendor/assets/stylesheets/solidus_admin/bootstrap/{_utilities-responsive.scss → utilities/_visibility.scss} +7 -1
  522. data/vendor/assets/stylesheets/solidus_admin/select2.scss +692 -0
  523. metadata +149 -48
  524. data/app/assets/javascripts/spree/backend/handlebars_extensions.coffee +0 -19
  525. data/app/assets/javascripts/spree/backend/line_items.js.coffee +0 -55
  526. data/app/assets/javascripts/spree/backend/line_items_on_order_edit.js +0 -62
  527. data/app/assets/javascripts/spree/backend/returns/expedited_exchanges_warning.coffee +0 -4
  528. data/app/assets/javascripts/spree/backend/stock_movement.js.coffee +0 -21
  529. data/app/assets/javascripts/spree/backend/variant_management.js.coffee +0 -10
  530. data/app/assets/javascripts/spree/backend/zone.js.coffee +0 -43
  531. data/app/views/spree/admin/general_settings/edit.html.erb +0 -80
  532. data/app/views/spree/admin/shared/_translations.html.erb +0 -29
  533. data/app/views/spree/admin/stock_movements/_form.html.erb +0 -12
  534. data/app/views/spree/admin/stock_movements/new.html.erb +0 -15
  535. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_animation.scss +0 -27
  536. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_labels.scss +0 -77
  537. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_pager.scss +0 -57
  538. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_utilities-spacing.scss +0 -39
  539. data/vendor/assets/stylesheets/solidus_admin/bootstrap/bootstrap-flex.scss +0 -8
  540. data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_center-block.scss +0 -7
  541. data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_progress.scss +0 -18
  542. data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_pulls.scss +0 -6
  543. data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_reset-filter.scss +0 -8
  544. data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_tab-focus.scss +0 -9
@@ -1,41 +1,41 @@
1
1
  /*!
2
- * Bootstrap v4.0.0-alpha.2 (http://getbootstrap.com)
3
- * Copyright 2011-2015 Twitter, Inc.
2
+ * Bootstrap v4.0.0-alpha.6 (https://getbootstrap.com)
3
+ * Copyright 2011-2017 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
4
4
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5
5
  */
6
6
 
7
7
  if (typeof jQuery === 'undefined') {
8
- throw new Error('Bootstrap\'s JavaScript requires jQuery')
8
+ throw new Error('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.')
9
9
  }
10
10
 
11
11
  +function ($) {
12
12
  var version = $.fn.jquery.split(' ')[0].split('.')
13
- if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] >= 3)) {
14
- throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v3.0.0')
13
+ if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] >= 4)) {
14
+ throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0')
15
15
  }
16
16
  }(jQuery);
17
17
 
18
18
 
19
- +function ($) {
19
+ +function () {
20
20
 
21
- /**
22
- * --------------------------------------------------------------------------
23
- * Bootstrap (v4.0.0-alpha.2): util.js
24
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
25
- * --------------------------------------------------------------------------
26
- */
21
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
27
22
 
28
- 'use strict';
23
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
29
24
 
30
- var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
25
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
31
26
 
32
- var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
27
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
33
28
 
34
- function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
29
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
35
30
 
36
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
31
+ /**
32
+ * --------------------------------------------------------------------------
33
+ * Bootstrap (v4.0.0-alpha.6): util.js
34
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
35
+ * --------------------------------------------------------------------------
36
+ */
37
37
 
38
- var Util = (function ($) {
38
+ var Util = function ($) {
39
39
 
40
40
  /**
41
41
  * ------------------------------------------------------------------------
@@ -45,6 +45,8 @@ var Util = (function ($) {
45
45
 
46
46
  var transition = false;
47
47
 
48
+ var MAX_UID = 1000000;
49
+
48
50
  var TransitionEndEvent = {
49
51
  WebkitTransition: 'webkitTransitionEnd',
50
52
  MozTransition: 'transitionend',
@@ -54,7 +56,7 @@ var Util = (function ($) {
54
56
 
55
57
  // shoutout AngusCroll (https://goo.gl/pxwQGp)
56
58
  function toType(obj) {
57
- return ({}).toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase();
59
+ return {}.toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase();
58
60
  }
59
61
 
60
62
  function isElement(obj) {
@@ -67,8 +69,9 @@ var Util = (function ($) {
67
69
  delegateType: transition.end,
68
70
  handle: function handle(event) {
69
71
  if ($(event.target).is(this)) {
70
- return event.handleObj.handler.apply(this, arguments);
72
+ return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params
71
73
  }
74
+ return undefined;
72
75
  }
73
76
  };
74
77
  }
@@ -80,9 +83,11 @@ var Util = (function ($) {
80
83
 
81
84
  var el = document.createElement('bootstrap');
82
85
 
83
- for (var _name in TransitionEndEvent) {
84
- if (el.style[_name] !== undefined) {
85
- return { end: TransitionEndEvent[_name] };
86
+ for (var name in TransitionEndEvent) {
87
+ if (el.style[name] !== undefined) {
88
+ return {
89
+ end: TransitionEndEvent[name]
90
+ };
86
91
  }
87
92
  }
88
93
 
@@ -129,11 +134,11 @@ var Util = (function ($) {
129
134
 
130
135
  getUID: function getUID(prefix) {
131
136
  do {
132
- prefix += ~ ~(Math.random() * 1000000); // "~~" acts like a faster Math.floor() here
137
+ // eslint-disable-next-line no-bitwise
138
+ prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here
133
139
  } while (document.getElementById(prefix));
134
140
  return prefix;
135
141
  },
136
-
137
142
  getSelectorFromElement: function getSelectorFromElement(element) {
138
143
  var selector = element.getAttribute('data-target');
139
144
 
@@ -144,31 +149,21 @@ var Util = (function ($) {
144
149
 
145
150
  return selector;
146
151
  },
147
-
148
152
  reflow: function reflow(element) {
149
- new Function('bs', 'return bs')(element.offsetHeight);
153
+ return element.offsetHeight;
150
154
  },
151
-
152
155
  triggerTransitionEnd: function triggerTransitionEnd(element) {
153
156
  $(element).trigger(transition.end);
154
157
  },
155
-
156
158
  supportsTransitionEnd: function supportsTransitionEnd() {
157
159
  return Boolean(transition);
158
160
  },
159
-
160
161
  typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) {
161
162
  for (var property in configTypes) {
162
163
  if (configTypes.hasOwnProperty(property)) {
163
164
  var expectedTypes = configTypes[property];
164
165
  var value = config[property];
165
- var valueType = undefined;
166
-
167
- if (value && isElement(value)) {
168
- valueType = 'element';
169
- } else {
170
- valueType = toType(value);
171
- }
166
+ var valueType = value && isElement(value) ? 'element' : toType(value);
172
167
 
173
168
  if (!new RegExp(expectedTypes).test(valueType)) {
174
169
  throw new Error(componentName.toUpperCase() + ': ' + ('Option "' + property + '" provided type "' + valueType + '" ') + ('but expected type "' + expectedTypes + '".'));
@@ -181,16 +176,16 @@ var Util = (function ($) {
181
176
  setTransitionEndSupport();
182
177
 
183
178
  return Util;
184
- })(jQuery);
179
+ }(jQuery);
185
180
 
186
181
  /**
187
182
  * --------------------------------------------------------------------------
188
- * Bootstrap (v4.0.0-alpha.2): alert.js
183
+ * Bootstrap (v4.0.0-alpha.6): alert.js
189
184
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
190
185
  * --------------------------------------------------------------------------
191
186
  */
192
187
 
193
- var Alert = (function ($) {
188
+ var Alert = function ($) {
194
189
 
195
190
  /**
196
191
  * ------------------------------------------------------------------------
@@ -199,7 +194,7 @@ var Alert = (function ($) {
199
194
  */
200
195
 
201
196
  var NAME = 'alert';
202
- var VERSION = '4.0.0-alpha';
197
+ var VERSION = '4.0.0-alpha.6';
203
198
  var DATA_KEY = 'bs.alert';
204
199
  var EVENT_KEY = '.' + DATA_KEY;
205
200
  var DATA_API_KEY = '.data-api';
@@ -219,7 +214,7 @@ var Alert = (function ($) {
219
214
  var ClassName = {
220
215
  ALERT: 'alert',
221
216
  FADE: 'fade',
222
- IN: 'in'
217
+ SHOW: 'show'
223
218
  };
224
219
 
225
220
  /**
@@ -228,120 +223,107 @@ var Alert = (function ($) {
228
223
  * ------------------------------------------------------------------------
229
224
  */
230
225
 
231
- var Alert = (function () {
226
+ var Alert = function () {
232
227
  function Alert(element) {
233
228
  _classCallCheck(this, Alert);
234
229
 
235
230
  this._element = element;
236
231
  }
237
232
 
238
- /**
239
- * ------------------------------------------------------------------------
240
- * Data Api implementation
241
- * ------------------------------------------------------------------------
242
- */
243
-
244
233
  // getters
245
234
 
246
- _createClass(Alert, [{
247
- key: 'close',
235
+ // public
236
+
237
+ Alert.prototype.close = function close(element) {
238
+ element = element || this._element;
248
239
 
249
- // public
240
+ var rootElement = this._getRootElement(element);
241
+ var customEvent = this._triggerCloseEvent(rootElement);
250
242
 
251
- value: function close(element) {
252
- element = element || this._element;
243
+ if (customEvent.isDefaultPrevented()) {
244
+ return;
245
+ }
253
246
 
254
- var rootElement = this._getRootElement(element);
255
- var customEvent = this._triggerCloseEvent(rootElement);
247
+ this._removeElement(rootElement);
248
+ };
256
249
 
257
- if (customEvent.isDefaultPrevented()) {
258
- return;
259
- }
250
+ Alert.prototype.dispose = function dispose() {
251
+ $.removeData(this._element, DATA_KEY);
252
+ this._element = null;
253
+ };
254
+
255
+ // private
256
+
257
+ Alert.prototype._getRootElement = function _getRootElement(element) {
258
+ var selector = Util.getSelectorFromElement(element);
259
+ var parent = false;
260
260
 
261
- this._removeElement(rootElement);
261
+ if (selector) {
262
+ parent = $(selector)[0];
262
263
  }
263
- }, {
264
- key: 'dispose',
265
- value: function dispose() {
266
- $.removeData(this._element, DATA_KEY);
267
- this._element = null;
264
+
265
+ if (!parent) {
266
+ parent = $(element).closest('.' + ClassName.ALERT)[0];
268
267
  }
269
268
 
270
- // private
269
+ return parent;
270
+ };
271
271
 
272
- }, {
273
- key: '_getRootElement',
274
- value: function _getRootElement(element) {
275
- var selector = Util.getSelectorFromElement(element);
276
- var parent = false;
272
+ Alert.prototype._triggerCloseEvent = function _triggerCloseEvent(element) {
273
+ var closeEvent = $.Event(Event.CLOSE);
277
274
 
278
- if (selector) {
279
- parent = $(selector)[0];
280
- }
275
+ $(element).trigger(closeEvent);
276
+ return closeEvent;
277
+ };
281
278
 
282
- if (!parent) {
283
- parent = $(element).closest('.' + ClassName.ALERT)[0];
284
- }
279
+ Alert.prototype._removeElement = function _removeElement(element) {
280
+ var _this2 = this;
285
281
 
286
- return parent;
287
- }
288
- }, {
289
- key: '_triggerCloseEvent',
290
- value: function _triggerCloseEvent(element) {
291
- var closeEvent = $.Event(Event.CLOSE);
282
+ $(element).removeClass(ClassName.SHOW);
292
283
 
293
- $(element).trigger(closeEvent);
294
- return closeEvent;
284
+ if (!Util.supportsTransitionEnd() || !$(element).hasClass(ClassName.FADE)) {
285
+ this._destroyElement(element);
286
+ return;
295
287
  }
296
- }, {
297
- key: '_removeElement',
298
- value: function _removeElement(element) {
299
- $(element).removeClass(ClassName.IN);
300
288
 
301
- if (!Util.supportsTransitionEnd() || !$(element).hasClass(ClassName.FADE)) {
302
- this._destroyElement(element);
303
- return;
304
- }
289
+ $(element).one(Util.TRANSITION_END, function (event) {
290
+ return _this2._destroyElement(element, event);
291
+ }).emulateTransitionEnd(TRANSITION_DURATION);
292
+ };
305
293
 
306
- $(element).one(Util.TRANSITION_END, $.proxy(this._destroyElement, this, element)).emulateTransitionEnd(TRANSITION_DURATION);
307
- }
308
- }, {
309
- key: '_destroyElement',
310
- value: function _destroyElement(element) {
311
- $(element).detach().trigger(Event.CLOSED).remove();
312
- }
294
+ Alert.prototype._destroyElement = function _destroyElement(element) {
295
+ $(element).detach().trigger(Event.CLOSED).remove();
296
+ };
313
297
 
314
- // static
298
+ // static
315
299
 
316
- }], [{
317
- key: '_jQueryInterface',
318
- value: function _jQueryInterface(config) {
319
- return this.each(function () {
320
- var $element = $(this);
321
- var data = $element.data(DATA_KEY);
300
+ Alert._jQueryInterface = function _jQueryInterface(config) {
301
+ return this.each(function () {
302
+ var $element = $(this);
303
+ var data = $element.data(DATA_KEY);
322
304
 
323
- if (!data) {
324
- data = new Alert(this);
325
- $element.data(DATA_KEY, data);
326
- }
305
+ if (!data) {
306
+ data = new Alert(this);
307
+ $element.data(DATA_KEY, data);
308
+ }
327
309
 
328
- if (config === 'close') {
329
- data[config](this);
330
- }
331
- });
332
- }
333
- }, {
334
- key: '_handleDismiss',
335
- value: function _handleDismiss(alertInstance) {
336
- return function (event) {
337
- if (event) {
338
- event.preventDefault();
339
- }
310
+ if (config === 'close') {
311
+ data[config](this);
312
+ }
313
+ });
314
+ };
340
315
 
341
- alertInstance.close(this);
342
- };
343
- }
344
- }, {
316
+ Alert._handleDismiss = function _handleDismiss(alertInstance) {
317
+ return function (event) {
318
+ if (event) {
319
+ event.preventDefault();
320
+ }
321
+
322
+ alertInstance.close(this);
323
+ };
324
+ };
325
+
326
+ _createClass(Alert, null, [{
345
327
  key: 'VERSION',
346
328
  get: function get() {
347
329
  return VERSION;
@@ -349,7 +331,13 @@ var Alert = (function ($) {
349
331
  }]);
350
332
 
351
333
  return Alert;
352
- })();
334
+ }();
335
+
336
+ /**
337
+ * ------------------------------------------------------------------------
338
+ * Data Api implementation
339
+ * ------------------------------------------------------------------------
340
+ */
353
341
 
354
342
  $(document).on(Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert()));
355
343
 
@@ -367,16 +355,16 @@ var Alert = (function ($) {
367
355
  };
368
356
 
369
357
  return Alert;
370
- })(jQuery);
358
+ }(jQuery);
371
359
 
372
360
  /**
373
361
  * --------------------------------------------------------------------------
374
- * Bootstrap (v4.0.0-alpha.2): button.js
362
+ * Bootstrap (v4.0.0-alpha.6): button.js
375
363
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
376
364
  * --------------------------------------------------------------------------
377
365
  */
378
366
 
379
- var Button = (function ($) {
367
+ var Button = function ($) {
380
368
 
381
369
  /**
382
370
  * ------------------------------------------------------------------------
@@ -385,7 +373,7 @@ var Button = (function ($) {
385
373
  */
386
374
 
387
375
  var NAME = 'button';
388
- var VERSION = '4.0.0-alpha';
376
+ var VERSION = '4.0.0-alpha.6';
389
377
  var DATA_KEY = 'bs.button';
390
378
  var EVENT_KEY = '.' + DATA_KEY;
391
379
  var DATA_API_KEY = '.data-api';
@@ -416,85 +404,76 @@ var Button = (function ($) {
416
404
  * ------------------------------------------------------------------------
417
405
  */
418
406
 
419
- var Button = (function () {
407
+ var Button = function () {
420
408
  function Button(element) {
421
409
  _classCallCheck(this, Button);
422
410
 
423
411
  this._element = element;
424
412
  }
425
413
 
426
- /**
427
- * ------------------------------------------------------------------------
428
- * Data Api implementation
429
- * ------------------------------------------------------------------------
430
- */
431
-
432
414
  // getters
433
415
 
434
- _createClass(Button, [{
435
- key: 'toggle',
436
-
437
- // public
416
+ // public
438
417
 
439
- value: function toggle() {
440
- var triggerChangeEvent = true;
441
- var rootElement = $(this._element).closest(Selector.DATA_TOGGLE)[0];
418
+ Button.prototype.toggle = function toggle() {
419
+ var triggerChangeEvent = true;
420
+ var rootElement = $(this._element).closest(Selector.DATA_TOGGLE)[0];
442
421
 
443
- if (rootElement) {
444
- var input = $(this._element).find(Selector.INPUT)[0];
422
+ if (rootElement) {
423
+ var input = $(this._element).find(Selector.INPUT)[0];
445
424
 
446
- if (input) {
447
- if (input.type === 'radio') {
448
- if (input.checked && $(this._element).hasClass(ClassName.ACTIVE)) {
449
- triggerChangeEvent = false;
450
- } else {
451
- var activeElement = $(rootElement).find(Selector.ACTIVE)[0];
425
+ if (input) {
426
+ if (input.type === 'radio') {
427
+ if (input.checked && $(this._element).hasClass(ClassName.ACTIVE)) {
428
+ triggerChangeEvent = false;
429
+ } else {
430
+ var activeElement = $(rootElement).find(Selector.ACTIVE)[0];
452
431
 
453
- if (activeElement) {
454
- $(activeElement).removeClass(ClassName.ACTIVE);
455
- }
432
+ if (activeElement) {
433
+ $(activeElement).removeClass(ClassName.ACTIVE);
456
434
  }
457
435
  }
436
+ }
458
437
 
459
- if (triggerChangeEvent) {
460
- input.checked = !$(this._element).hasClass(ClassName.ACTIVE);
461
- $(this._element).trigger('change');
462
- }
438
+ if (triggerChangeEvent) {
439
+ input.checked = !$(this._element).hasClass(ClassName.ACTIVE);
440
+ $(input).trigger('change');
463
441
  }
464
- } else {
465
- this._element.setAttribute('aria-pressed', !$(this._element).hasClass(ClassName.ACTIVE));
466
- }
467
442
 
468
- if (triggerChangeEvent) {
469
- $(this._element).toggleClass(ClassName.ACTIVE);
443
+ input.focus();
470
444
  }
471
445
  }
472
- }, {
473
- key: 'dispose',
474
- value: function dispose() {
475
- $.removeData(this._element, DATA_KEY);
476
- this._element = null;
446
+
447
+ this._element.setAttribute('aria-pressed', !$(this._element).hasClass(ClassName.ACTIVE));
448
+
449
+ if (triggerChangeEvent) {
450
+ $(this._element).toggleClass(ClassName.ACTIVE);
477
451
  }
452
+ };
453
+
454
+ Button.prototype.dispose = function dispose() {
455
+ $.removeData(this._element, DATA_KEY);
456
+ this._element = null;
457
+ };
478
458
 
479
- // static
459
+ // static
480
460
 
481
- }], [{
482
- key: '_jQueryInterface',
483
- value: function _jQueryInterface(config) {
484
- return this.each(function () {
485
- var data = $(this).data(DATA_KEY);
461
+ Button._jQueryInterface = function _jQueryInterface(config) {
462
+ return this.each(function () {
463
+ var data = $(this).data(DATA_KEY);
486
464
 
487
- if (!data) {
488
- data = new Button(this);
489
- $(this).data(DATA_KEY, data);
490
- }
465
+ if (!data) {
466
+ data = new Button(this);
467
+ $(this).data(DATA_KEY, data);
468
+ }
491
469
 
492
- if (config === 'toggle') {
493
- data[config]();
494
- }
495
- });
496
- }
497
- }, {
470
+ if (config === 'toggle') {
471
+ data[config]();
472
+ }
473
+ });
474
+ };
475
+
476
+ _createClass(Button, null, [{
498
477
  key: 'VERSION',
499
478
  get: function get() {
500
479
  return VERSION;
@@ -502,7 +481,13 @@ var Button = (function ($) {
502
481
  }]);
503
482
 
504
483
  return Button;
505
- })();
484
+ }();
485
+
486
+ /**
487
+ * ------------------------------------------------------------------------
488
+ * Data Api implementation
489
+ * ------------------------------------------------------------------------
490
+ */
506
491
 
507
492
  $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {
508
493
  event.preventDefault();
@@ -533,16 +518,16 @@ var Button = (function ($) {
533
518
  };
534
519
 
535
520
  return Button;
536
- })(jQuery);
521
+ }(jQuery);
537
522
 
538
523
  /**
539
524
  * --------------------------------------------------------------------------
540
- * Bootstrap (v4.0.0-alpha.2): carousel.js
525
+ * Bootstrap (v4.0.0-alpha.6): carousel.js
541
526
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
542
527
  * --------------------------------------------------------------------------
543
528
  */
544
529
 
545
- var Carousel = (function ($) {
530
+ var Carousel = function ($) {
546
531
 
547
532
  /**
548
533
  * ------------------------------------------------------------------------
@@ -551,12 +536,14 @@ var Carousel = (function ($) {
551
536
  */
552
537
 
553
538
  var NAME = 'carousel';
554
- var VERSION = '4.0.0-alpha';
539
+ var VERSION = '4.0.0-alpha.6';
555
540
  var DATA_KEY = 'bs.carousel';
556
541
  var EVENT_KEY = '.' + DATA_KEY;
557
542
  var DATA_API_KEY = '.data-api';
558
543
  var JQUERY_NO_CONFLICT = $.fn[NAME];
559
544
  var TRANSITION_DURATION = 600;
545
+ var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key
546
+ var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key
560
547
 
561
548
  var Default = {
562
549
  interval: 5000,
@@ -576,7 +563,9 @@ var Carousel = (function ($) {
576
563
 
577
564
  var Direction = {
578
565
  NEXT: 'next',
579
- PREVIOUS: 'prev'
566
+ PREV: 'prev',
567
+ LEFT: 'left',
568
+ RIGHT: 'right'
580
569
  };
581
570
 
582
571
  var Event = {
@@ -593,8 +582,10 @@ var Carousel = (function ($) {
593
582
  CAROUSEL: 'carousel',
594
583
  ACTIVE: 'active',
595
584
  SLIDE: 'slide',
596
- RIGHT: 'right',
597
- LEFT: 'left',
585
+ RIGHT: 'carousel-item-right',
586
+ LEFT: 'carousel-item-left',
587
+ NEXT: 'carousel-item-next',
588
+ PREV: 'carousel-item-prev',
598
589
  ITEM: 'carousel-item'
599
590
  };
600
591
 
@@ -602,7 +593,7 @@ var Carousel = (function ($) {
602
593
  ACTIVE: '.active',
603
594
  ACTIVE_ITEM: '.active.carousel-item',
604
595
  ITEM: '.carousel-item',
605
- NEXT_PREV: '.next, .prev',
596
+ NEXT_PREV: '.carousel-item-next, .carousel-item-prev',
606
597
  INDICATORS: '.carousel-indicators',
607
598
  DATA_SLIDE: '[data-slide], [data-slide-to]',
608
599
  DATA_RIDE: '[data-ride="carousel"]'
@@ -614,7 +605,7 @@ var Carousel = (function ($) {
614
605
  * ------------------------------------------------------------------------
615
606
  */
616
607
 
617
- var Carousel = (function () {
608
+ var Carousel = function () {
618
609
  function Carousel(element, config) {
619
610
  _classCallCheck(this, Carousel);
620
611
 
@@ -632,342 +623,338 @@ var Carousel = (function ($) {
632
623
  this._addEventListeners();
633
624
  }
634
625
 
635
- /**
636
- * ------------------------------------------------------------------------
637
- * Data Api implementation
638
- * ------------------------------------------------------------------------
639
- */
640
-
641
626
  // getters
642
627
 
643
- _createClass(Carousel, [{
644
- key: 'next',
628
+ // public
645
629
 
646
- // public
630
+ Carousel.prototype.next = function next() {
631
+ if (this._isSliding) {
632
+ throw new Error('Carousel is sliding');
633
+ }
634
+ this._slide(Direction.NEXT);
635
+ };
647
636
 
648
- value: function next() {
649
- if (!this._isSliding) {
650
- this._slide(Direction.NEXT);
651
- }
637
+ Carousel.prototype.nextWhenVisible = function nextWhenVisible() {
638
+ // Don't call next when the page isn't visible
639
+ if (!document.hidden) {
640
+ this.next();
652
641
  }
653
- }, {
654
- key: 'nextWhenVisible',
655
- value: function nextWhenVisible() {
656
- // Don't call next when the page isn't visible
657
- if (!document.hidden) {
658
- this.next();
659
- }
642
+ };
643
+
644
+ Carousel.prototype.prev = function prev() {
645
+ if (this._isSliding) {
646
+ throw new Error('Carousel is sliding');
660
647
  }
661
- }, {
662
- key: 'prev',
663
- value: function prev() {
664
- if (!this._isSliding) {
665
- this._slide(Direction.PREVIOUS);
666
- }
648
+ this._slide(Direction.PREVIOUS);
649
+ };
650
+
651
+ Carousel.prototype.pause = function pause(event) {
652
+ if (!event) {
653
+ this._isPaused = true;
667
654
  }
668
- }, {
669
- key: 'pause',
670
- value: function pause(event) {
671
- if (!event) {
672
- this._isPaused = true;
673
- }
674
655
 
675
- if ($(this._element).find(Selector.NEXT_PREV)[0] && Util.supportsTransitionEnd()) {
676
- Util.triggerTransitionEnd(this._element);
677
- this.cycle(true);
678
- }
656
+ if ($(this._element).find(Selector.NEXT_PREV)[0] && Util.supportsTransitionEnd()) {
657
+ Util.triggerTransitionEnd(this._element);
658
+ this.cycle(true);
659
+ }
660
+
661
+ clearInterval(this._interval);
662
+ this._interval = null;
663
+ };
664
+
665
+ Carousel.prototype.cycle = function cycle(event) {
666
+ if (!event) {
667
+ this._isPaused = false;
668
+ }
679
669
 
670
+ if (this._interval) {
680
671
  clearInterval(this._interval);
681
672
  this._interval = null;
682
673
  }
683
- }, {
684
- key: 'cycle',
685
- value: function cycle(event) {
686
- if (!event) {
687
- this._isPaused = false;
688
- }
689
674
 
690
- if (this._interval) {
691
- clearInterval(this._interval);
692
- this._interval = null;
693
- }
675
+ if (this._config.interval && !this._isPaused) {
676
+ this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);
677
+ }
678
+ };
694
679
 
695
- if (this._config.interval && !this._isPaused) {
696
- this._interval = setInterval($.proxy(document.visibilityState ? this.nextWhenVisible : this.next, this), this._config.interval);
697
- }
680
+ Carousel.prototype.to = function to(index) {
681
+ var _this3 = this;
682
+
683
+ this._activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0];
684
+
685
+ var activeIndex = this._getItemIndex(this._activeElement);
686
+
687
+ if (index > this._items.length - 1 || index < 0) {
688
+ return;
698
689
  }
699
- }, {
700
- key: 'to',
701
- value: function to(index) {
702
- var _this2 = this;
703
690
 
704
- this._activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0];
691
+ if (this._isSliding) {
692
+ $(this._element).one(Event.SLID, function () {
693
+ return _this3.to(index);
694
+ });
695
+ return;
696
+ }
705
697
 
706
- var activeIndex = this._getItemIndex(this._activeElement);
698
+ if (activeIndex === index) {
699
+ this.pause();
700
+ this.cycle();
701
+ return;
702
+ }
707
703
 
708
- if (index > this._items.length - 1 || index < 0) {
709
- return;
710
- }
704
+ var direction = index > activeIndex ? Direction.NEXT : Direction.PREVIOUS;
711
705
 
712
- if (this._isSliding) {
713
- $(this._element).one(Event.SLID, function () {
714
- return _this2.to(index);
715
- });
716
- return;
717
- }
706
+ this._slide(direction, this._items[index]);
707
+ };
718
708
 
719
- if (activeIndex === index) {
720
- this.pause();
721
- this.cycle();
722
- return;
723
- }
709
+ Carousel.prototype.dispose = function dispose() {
710
+ $(this._element).off(EVENT_KEY);
711
+ $.removeData(this._element, DATA_KEY);
724
712
 
725
- var direction = index > activeIndex ? Direction.NEXT : Direction.PREVIOUS;
713
+ this._items = null;
714
+ this._config = null;
715
+ this._element = null;
716
+ this._interval = null;
717
+ this._isPaused = null;
718
+ this._isSliding = null;
719
+ this._activeElement = null;
720
+ this._indicatorsElement = null;
721
+ };
726
722
 
727
- this._slide(direction, this._items[index]);
728
- }
729
- }, {
730
- key: 'dispose',
731
- value: function dispose() {
732
- $(this._element).off(EVENT_KEY);
733
- $.removeData(this._element, DATA_KEY);
734
-
735
- this._items = null;
736
- this._config = null;
737
- this._element = null;
738
- this._interval = null;
739
- this._isPaused = null;
740
- this._isSliding = null;
741
- this._activeElement = null;
742
- this._indicatorsElement = null;
743
- }
723
+ // private
744
724
 
745
- // private
725
+ Carousel.prototype._getConfig = function _getConfig(config) {
726
+ config = $.extend({}, Default, config);
727
+ Util.typeCheckConfig(NAME, config, DefaultType);
728
+ return config;
729
+ };
746
730
 
747
- }, {
748
- key: '_getConfig',
749
- value: function _getConfig(config) {
750
- config = $.extend({}, Default, config);
751
- Util.typeCheckConfig(NAME, config, DefaultType);
752
- return config;
753
- }
754
- }, {
755
- key: '_addEventListeners',
756
- value: function _addEventListeners() {
757
- if (this._config.keyboard) {
758
- $(this._element).on(Event.KEYDOWN, $.proxy(this._keydown, this));
759
- }
731
+ Carousel.prototype._addEventListeners = function _addEventListeners() {
732
+ var _this4 = this;
760
733
 
761
- if (this._config.pause === 'hover' && !('ontouchstart' in document.documentElement)) {
762
- $(this._element).on(Event.MOUSEENTER, $.proxy(this.pause, this)).on(Event.MOUSELEAVE, $.proxy(this.cycle, this));
763
- }
734
+ if (this._config.keyboard) {
735
+ $(this._element).on(Event.KEYDOWN, function (event) {
736
+ return _this4._keydown(event);
737
+ });
764
738
  }
765
- }, {
766
- key: '_keydown',
767
- value: function _keydown(event) {
768
- event.preventDefault();
769
739
 
770
- if (/input|textarea/i.test(event.target.tagName)) {
771
- return;
772
- }
740
+ if (this._config.pause === 'hover' && !('ontouchstart' in document.documentElement)) {
741
+ $(this._element).on(Event.MOUSEENTER, function (event) {
742
+ return _this4.pause(event);
743
+ }).on(Event.MOUSELEAVE, function (event) {
744
+ return _this4.cycle(event);
745
+ });
746
+ }
747
+ };
773
748
 
774
- switch (event.which) {
775
- case 37:
776
- this.prev();break;
777
- case 39:
778
- this.next();break;
779
- default:
780
- return;
781
- }
749
+ Carousel.prototype._keydown = function _keydown(event) {
750
+ if (/input|textarea/i.test(event.target.tagName)) {
751
+ return;
782
752
  }
783
- }, {
784
- key: '_getItemIndex',
785
- value: function _getItemIndex(element) {
786
- this._items = $.makeArray($(element).parent().find(Selector.ITEM));
787
- return this._items.indexOf(element);
753
+
754
+ switch (event.which) {
755
+ case ARROW_LEFT_KEYCODE:
756
+ event.preventDefault();
757
+ this.prev();
758
+ break;
759
+ case ARROW_RIGHT_KEYCODE:
760
+ event.preventDefault();
761
+ this.next();
762
+ break;
763
+ default:
764
+ return;
788
765
  }
789
- }, {
790
- key: '_getItemByDirection',
791
- value: function _getItemByDirection(direction, activeElement) {
792
- var isNextDirection = direction === Direction.NEXT;
793
- var isPrevDirection = direction === Direction.PREVIOUS;
794
- var activeIndex = this._getItemIndex(activeElement);
795
- var lastItemIndex = this._items.length - 1;
796
- var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex;
766
+ };
797
767
 
798
- if (isGoingToWrap && !this._config.wrap) {
799
- return activeElement;
800
- }
768
+ Carousel.prototype._getItemIndex = function _getItemIndex(element) {
769
+ this._items = $.makeArray($(element).parent().find(Selector.ITEM));
770
+ return this._items.indexOf(element);
771
+ };
801
772
 
802
- var delta = direction === Direction.PREVIOUS ? -1 : 1;
803
- var itemIndex = (activeIndex + delta) % this._items.length;
773
+ Carousel.prototype._getItemByDirection = function _getItemByDirection(direction, activeElement) {
774
+ var isNextDirection = direction === Direction.NEXT;
775
+ var isPrevDirection = direction === Direction.PREVIOUS;
776
+ var activeIndex = this._getItemIndex(activeElement);
777
+ var lastItemIndex = this._items.length - 1;
778
+ var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex;
804
779
 
805
- return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];
780
+ if (isGoingToWrap && !this._config.wrap) {
781
+ return activeElement;
806
782
  }
807
- }, {
808
- key: '_triggerSlideEvent',
809
- value: function _triggerSlideEvent(relatedTarget, directionalClassname) {
810
- var slideEvent = $.Event(Event.SLIDE, {
811
- relatedTarget: relatedTarget,
812
- direction: directionalClassname
813
- });
814
783
 
815
- $(this._element).trigger(slideEvent);
784
+ var delta = direction === Direction.PREVIOUS ? -1 : 1;
785
+ var itemIndex = (activeIndex + delta) % this._items.length;
816
786
 
817
- return slideEvent;
818
- }
819
- }, {
820
- key: '_setActiveIndicatorElement',
821
- value: function _setActiveIndicatorElement(element) {
822
- if (this._indicatorsElement) {
823
- $(this._indicatorsElement).find(Selector.ACTIVE).removeClass(ClassName.ACTIVE);
787
+ return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];
788
+ };
824
789
 
825
- var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];
790
+ Carousel.prototype._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) {
791
+ var slideEvent = $.Event(Event.SLIDE, {
792
+ relatedTarget: relatedTarget,
793
+ direction: eventDirectionName
794
+ });
826
795
 
827
- if (nextIndicator) {
828
- $(nextIndicator).addClass(ClassName.ACTIVE);
829
- }
796
+ $(this._element).trigger(slideEvent);
797
+
798
+ return slideEvent;
799
+ };
800
+
801
+ Carousel.prototype._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {
802
+ if (this._indicatorsElement) {
803
+ $(this._indicatorsElement).find(Selector.ACTIVE).removeClass(ClassName.ACTIVE);
804
+
805
+ var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];
806
+
807
+ if (nextIndicator) {
808
+ $(nextIndicator).addClass(ClassName.ACTIVE);
830
809
  }
831
810
  }
832
- }, {
833
- key: '_slide',
834
- value: function _slide(direction, element) {
835
- var _this3 = this;
811
+ };
836
812
 
837
- var activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0];
838
- var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement);
813
+ Carousel.prototype._slide = function _slide(direction, element) {
814
+ var _this5 = this;
839
815
 
840
- var isCycling = Boolean(this._interval);
816
+ var activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0];
817
+ var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement);
841
818
 
842
- var directionalClassName = direction === Direction.NEXT ? ClassName.LEFT : ClassName.RIGHT;
819
+ var isCycling = Boolean(this._interval);
843
820
 
844
- if (nextElement && $(nextElement).hasClass(ClassName.ACTIVE)) {
845
- this._isSliding = false;
846
- return;
847
- }
821
+ var directionalClassName = void 0;
822
+ var orderClassName = void 0;
823
+ var eventDirectionName = void 0;
848
824
 
849
- var slideEvent = this._triggerSlideEvent(nextElement, directionalClassName);
850
- if (slideEvent.isDefaultPrevented()) {
851
- return;
852
- }
825
+ if (direction === Direction.NEXT) {
826
+ directionalClassName = ClassName.LEFT;
827
+ orderClassName = ClassName.NEXT;
828
+ eventDirectionName = Direction.LEFT;
829
+ } else {
830
+ directionalClassName = ClassName.RIGHT;
831
+ orderClassName = ClassName.PREV;
832
+ eventDirectionName = Direction.RIGHT;
833
+ }
853
834
 
854
- if (!activeElement || !nextElement) {
855
- // some weirdness is happening, so we bail
856
- return;
857
- }
835
+ if (nextElement && $(nextElement).hasClass(ClassName.ACTIVE)) {
836
+ this._isSliding = false;
837
+ return;
838
+ }
858
839
 
859
- this._isSliding = true;
840
+ var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);
841
+ if (slideEvent.isDefaultPrevented()) {
842
+ return;
843
+ }
860
844
 
861
- if (isCycling) {
862
- this.pause();
863
- }
845
+ if (!activeElement || !nextElement) {
846
+ // some weirdness is happening, so we bail
847
+ return;
848
+ }
864
849
 
865
- this._setActiveIndicatorElement(nextElement);
850
+ this._isSliding = true;
866
851
 
867
- var slidEvent = $.Event(Event.SLID, {
868
- relatedTarget: nextElement,
869
- direction: directionalClassName
870
- });
852
+ if (isCycling) {
853
+ this.pause();
854
+ }
871
855
 
872
- if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.SLIDE)) {
856
+ this._setActiveIndicatorElement(nextElement);
873
857
 
874
- $(nextElement).addClass(direction);
858
+ var slidEvent = $.Event(Event.SLID, {
859
+ relatedTarget: nextElement,
860
+ direction: eventDirectionName
861
+ });
875
862
 
876
- Util.reflow(nextElement);
863
+ if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.SLIDE)) {
877
864
 
878
- $(activeElement).addClass(directionalClassName);
879
- $(nextElement).addClass(directionalClassName);
865
+ $(nextElement).addClass(orderClassName);
880
866
 
881
- $(activeElement).one(Util.TRANSITION_END, function () {
882
- $(nextElement).removeClass(directionalClassName).removeClass(direction);
867
+ Util.reflow(nextElement);
883
868
 
884
- $(nextElement).addClass(ClassName.ACTIVE);
869
+ $(activeElement).addClass(directionalClassName);
870
+ $(nextElement).addClass(directionalClassName);
885
871
 
886
- $(activeElement).removeClass(ClassName.ACTIVE).removeClass(direction).removeClass(directionalClassName);
872
+ $(activeElement).one(Util.TRANSITION_END, function () {
873
+ $(nextElement).removeClass(directionalClassName + ' ' + orderClassName).addClass(ClassName.ACTIVE);
887
874
 
888
- _this3._isSliding = false;
875
+ $(activeElement).removeClass(ClassName.ACTIVE + ' ' + orderClassName + ' ' + directionalClassName);
889
876
 
890
- setTimeout(function () {
891
- return $(_this3._element).trigger(slidEvent);
892
- }, 0);
893
- }).emulateTransitionEnd(TRANSITION_DURATION);
894
- } else {
895
- $(activeElement).removeClass(ClassName.ACTIVE);
896
- $(nextElement).addClass(ClassName.ACTIVE);
877
+ _this5._isSliding = false;
897
878
 
898
- this._isSliding = false;
899
- $(this._element).trigger(slidEvent);
900
- }
879
+ setTimeout(function () {
880
+ return $(_this5._element).trigger(slidEvent);
881
+ }, 0);
882
+ }).emulateTransitionEnd(TRANSITION_DURATION);
883
+ } else {
884
+ $(activeElement).removeClass(ClassName.ACTIVE);
885
+ $(nextElement).addClass(ClassName.ACTIVE);
901
886
 
902
- if (isCycling) {
903
- this.cycle();
904
- }
887
+ this._isSliding = false;
888
+ $(this._element).trigger(slidEvent);
889
+ }
890
+
891
+ if (isCycling) {
892
+ this.cycle();
905
893
  }
894
+ };
906
895
 
907
- // static
896
+ // static
908
897
 
909
- }], [{
910
- key: '_jQueryInterface',
911
- value: function _jQueryInterface(config) {
912
- return this.each(function () {
913
- var data = $(this).data(DATA_KEY);
914
- var _config = $.extend({}, Default, $(this).data());
898
+ Carousel._jQueryInterface = function _jQueryInterface(config) {
899
+ return this.each(function () {
900
+ var data = $(this).data(DATA_KEY);
901
+ var _config = $.extend({}, Default, $(this).data());
915
902
 
916
- if (typeof config === 'object') {
917
- $.extend(_config, config);
918
- }
903
+ if ((typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object') {
904
+ $.extend(_config, config);
905
+ }
919
906
 
920
- var action = typeof config === 'string' ? config : _config.slide;
907
+ var action = typeof config === 'string' ? config : _config.slide;
921
908
 
922
- if (!data) {
923
- data = new Carousel(this, _config);
924
- $(this).data(DATA_KEY, data);
925
- }
909
+ if (!data) {
910
+ data = new Carousel(this, _config);
911
+ $(this).data(DATA_KEY, data);
912
+ }
926
913
 
927
- if (typeof config === 'number') {
928
- data.to(config);
929
- } else if (typeof action === 'string') {
930
- if (data[action] === undefined) {
931
- throw new Error('No method named "' + action + '"');
932
- }
933
- data[action]();
934
- } else if (_config.interval) {
935
- data.pause();
936
- data.cycle();
914
+ if (typeof config === 'number') {
915
+ data.to(config);
916
+ } else if (typeof action === 'string') {
917
+ if (data[action] === undefined) {
918
+ throw new Error('No method named "' + action + '"');
937
919
  }
938
- });
939
- }
940
- }, {
941
- key: '_dataApiClickHandler',
942
- value: function _dataApiClickHandler(event) {
943
- var selector = Util.getSelectorFromElement(this);
944
-
945
- if (!selector) {
946
- return;
920
+ data[action]();
921
+ } else if (_config.interval) {
922
+ data.pause();
923
+ data.cycle();
947
924
  }
925
+ });
926
+ };
948
927
 
949
- var target = $(selector)[0];
928
+ Carousel._dataApiClickHandler = function _dataApiClickHandler(event) {
929
+ var selector = Util.getSelectorFromElement(this);
950
930
 
951
- if (!target || !$(target).hasClass(ClassName.CAROUSEL)) {
952
- return;
953
- }
931
+ if (!selector) {
932
+ return;
933
+ }
954
934
 
955
- var config = $.extend({}, $(target).data(), $(this).data());
956
- var slideIndex = this.getAttribute('data-slide-to');
935
+ var target = $(selector)[0];
957
936
 
958
- if (slideIndex) {
959
- config.interval = false;
960
- }
937
+ if (!target || !$(target).hasClass(ClassName.CAROUSEL)) {
938
+ return;
939
+ }
961
940
 
962
- Carousel._jQueryInterface.call($(target), config);
941
+ var config = $.extend({}, $(target).data(), $(this).data());
942
+ var slideIndex = this.getAttribute('data-slide-to');
963
943
 
964
- if (slideIndex) {
965
- $(target).data(DATA_KEY).to(slideIndex);
966
- }
944
+ if (slideIndex) {
945
+ config.interval = false;
946
+ }
967
947
 
968
- event.preventDefault();
948
+ Carousel._jQueryInterface.call($(target), config);
949
+
950
+ if (slideIndex) {
951
+ $(target).data(DATA_KEY).to(slideIndex);
969
952
  }
970
- }, {
953
+
954
+ event.preventDefault();
955
+ };
956
+
957
+ _createClass(Carousel, null, [{
971
958
  key: 'VERSION',
972
959
  get: function get() {
973
960
  return VERSION;
@@ -980,9 +967,15 @@ var Carousel = (function ($) {
980
967
  }]);
981
968
 
982
969
  return Carousel;
983
- })();
970
+ }();
984
971
 
985
- $(document).on(Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel._dataApiClickHandler);
972
+ /**
973
+ * ------------------------------------------------------------------------
974
+ * Data Api implementation
975
+ * ------------------------------------------------------------------------
976
+ */
977
+
978
+ $(document).on(Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel._dataApiClickHandler);
986
979
 
987
980
  $(window).on(Event.LOAD_DATA_API, function () {
988
981
  $(Selector.DATA_RIDE).each(function () {
@@ -1005,16 +998,16 @@ var Carousel = (function ($) {
1005
998
  };
1006
999
 
1007
1000
  return Carousel;
1008
- })(jQuery);
1001
+ }(jQuery);
1009
1002
 
1010
1003
  /**
1011
1004
  * --------------------------------------------------------------------------
1012
- * Bootstrap (v4.0.0-alpha.2): collapse.js
1005
+ * Bootstrap (v4.0.0-alpha.6): collapse.js
1013
1006
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1014
1007
  * --------------------------------------------------------------------------
1015
1008
  */
1016
1009
 
1017
- var Collapse = (function ($) {
1010
+ var Collapse = function ($) {
1018
1011
 
1019
1012
  /**
1020
1013
  * ------------------------------------------------------------------------
@@ -1023,7 +1016,7 @@ var Collapse = (function ($) {
1023
1016
  */
1024
1017
 
1025
1018
  var NAME = 'collapse';
1026
- var VERSION = '4.0.0-alpha';
1019
+ var VERSION = '4.0.0-alpha.6';
1027
1020
  var DATA_KEY = 'bs.collapse';
1028
1021
  var EVENT_KEY = '.' + DATA_KEY;
1029
1022
  var DATA_API_KEY = '.data-api';
@@ -1049,7 +1042,7 @@ var Collapse = (function ($) {
1049
1042
  };
1050
1043
 
1051
1044
  var ClassName = {
1052
- IN: 'in',
1045
+ SHOW: 'show',
1053
1046
  COLLAPSE: 'collapse',
1054
1047
  COLLAPSING: 'collapsing',
1055
1048
  COLLAPSED: 'collapsed'
@@ -1061,7 +1054,7 @@ var Collapse = (function ($) {
1061
1054
  };
1062
1055
 
1063
1056
  var Selector = {
1064
- ACTIVES: '.panel > .in, .panel > .collapsing',
1057
+ ACTIVES: '.card > .show, .card > .collapsing',
1065
1058
  DATA_TOGGLE: '[data-toggle="collapse"]'
1066
1059
  };
1067
1060
 
@@ -1071,7 +1064,7 @@ var Collapse = (function ($) {
1071
1064
  * ------------------------------------------------------------------------
1072
1065
  */
1073
1066
 
1074
- var Collapse = (function () {
1067
+ var Collapse = function () {
1075
1068
  function Collapse(element, config) {
1076
1069
  _classCallCheck(this, Collapse);
1077
1070
 
@@ -1091,240 +1084,228 @@ var Collapse = (function ($) {
1091
1084
  }
1092
1085
  }
1093
1086
 
1094
- /**
1095
- * ------------------------------------------------------------------------
1096
- * Data Api implementation
1097
- * ------------------------------------------------------------------------
1098
- */
1099
-
1100
1087
  // getters
1101
1088
 
1102
- _createClass(Collapse, [{
1103
- key: 'toggle',
1089
+ // public
1104
1090
 
1105
- // public
1091
+ Collapse.prototype.toggle = function toggle() {
1092
+ if ($(this._element).hasClass(ClassName.SHOW)) {
1093
+ this.hide();
1094
+ } else {
1095
+ this.show();
1096
+ }
1097
+ };
1106
1098
 
1107
- value: function toggle() {
1108
- if ($(this._element).hasClass(ClassName.IN)) {
1109
- this.hide();
1110
- } else {
1111
- this.show();
1099
+ Collapse.prototype.show = function show() {
1100
+ var _this6 = this;
1101
+
1102
+ if (this._isTransitioning) {
1103
+ throw new Error('Collapse is transitioning');
1104
+ }
1105
+
1106
+ if ($(this._element).hasClass(ClassName.SHOW)) {
1107
+ return;
1108
+ }
1109
+
1110
+ var actives = void 0;
1111
+ var activesData = void 0;
1112
+
1113
+ if (this._parent) {
1114
+ actives = $.makeArray($(this._parent).find(Selector.ACTIVES));
1115
+ if (!actives.length) {
1116
+ actives = null;
1112
1117
  }
1113
1118
  }
1114
- }, {
1115
- key: 'show',
1116
- value: function show() {
1117
- var _this4 = this;
1118
1119
 
1119
- if (this._isTransitioning || $(this._element).hasClass(ClassName.IN)) {
1120
+ if (actives) {
1121
+ activesData = $(actives).data(DATA_KEY);
1122
+ if (activesData && activesData._isTransitioning) {
1120
1123
  return;
1121
1124
  }
1125
+ }
1122
1126
 
1123
- var actives = undefined;
1124
- var activesData = undefined;
1127
+ var startEvent = $.Event(Event.SHOW);
1128
+ $(this._element).trigger(startEvent);
1129
+ if (startEvent.isDefaultPrevented()) {
1130
+ return;
1131
+ }
1125
1132
 
1126
- if (this._parent) {
1127
- actives = $.makeArray($(Selector.ACTIVES));
1128
- if (!actives.length) {
1129
- actives = null;
1130
- }
1133
+ if (actives) {
1134
+ Collapse._jQueryInterface.call($(actives), 'hide');
1135
+ if (!activesData) {
1136
+ $(actives).data(DATA_KEY, null);
1131
1137
  }
1138
+ }
1132
1139
 
1133
- if (actives) {
1134
- activesData = $(actives).data(DATA_KEY);
1135
- if (activesData && activesData._isTransitioning) {
1136
- return;
1137
- }
1138
- }
1140
+ var dimension = this._getDimension();
1139
1141
 
1140
- var startEvent = $.Event(Event.SHOW);
1141
- $(this._element).trigger(startEvent);
1142
- if (startEvent.isDefaultPrevented()) {
1143
- return;
1144
- }
1142
+ $(this._element).removeClass(ClassName.COLLAPSE).addClass(ClassName.COLLAPSING);
1145
1143
 
1146
- if (actives) {
1147
- Collapse._jQueryInterface.call($(actives), 'hide');
1148
- if (!activesData) {
1149
- $(actives).data(DATA_KEY, null);
1150
- }
1151
- }
1144
+ this._element.style[dimension] = 0;
1145
+ this._element.setAttribute('aria-expanded', true);
1152
1146
 
1153
- var dimension = this._getDimension();
1147
+ if (this._triggerArray.length) {
1148
+ $(this._triggerArray).removeClass(ClassName.COLLAPSED).attr('aria-expanded', true);
1149
+ }
1154
1150
 
1155
- $(this._element).removeClass(ClassName.COLLAPSE).addClass(ClassName.COLLAPSING);
1151
+ this.setTransitioning(true);
1156
1152
 
1157
- this._element.style[dimension] = 0;
1158
- this._element.setAttribute('aria-expanded', true);
1153
+ var complete = function complete() {
1154
+ $(_this6._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.SHOW);
1159
1155
 
1160
- if (this._triggerArray.length) {
1161
- $(this._triggerArray).removeClass(ClassName.COLLAPSED).attr('aria-expanded', true);
1162
- }
1156
+ _this6._element.style[dimension] = '';
1163
1157
 
1164
- this.setTransitioning(true);
1158
+ _this6.setTransitioning(false);
1165
1159
 
1166
- var complete = function complete() {
1167
- $(_this4._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.IN);
1160
+ $(_this6._element).trigger(Event.SHOWN);
1161
+ };
1168
1162
 
1169
- _this4._element.style[dimension] = '';
1163
+ if (!Util.supportsTransitionEnd()) {
1164
+ complete();
1165
+ return;
1166
+ }
1170
1167
 
1171
- _this4.setTransitioning(false);
1168
+ var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
1169
+ var scrollSize = 'scroll' + capitalizedDimension;
1172
1170
 
1173
- $(_this4._element).trigger(Event.SHOWN);
1174
- };
1171
+ $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
1175
1172
 
1176
- if (!Util.supportsTransitionEnd()) {
1177
- complete();
1178
- return;
1179
- }
1173
+ this._element.style[dimension] = this._element[scrollSize] + 'px';
1174
+ };
1180
1175
 
1181
- var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
1182
- var scrollSize = 'scroll' + capitalizedDimension;
1176
+ Collapse.prototype.hide = function hide() {
1177
+ var _this7 = this;
1183
1178
 
1184
- $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
1179
+ if (this._isTransitioning) {
1180
+ throw new Error('Collapse is transitioning');
1181
+ }
1185
1182
 
1186
- this._element.style[dimension] = this._element[scrollSize] + 'px';
1183
+ if (!$(this._element).hasClass(ClassName.SHOW)) {
1184
+ return;
1187
1185
  }
1188
- }, {
1189
- key: 'hide',
1190
- value: function hide() {
1191
- var _this5 = this;
1192
1186
 
1193
- if (this._isTransitioning || !$(this._element).hasClass(ClassName.IN)) {
1194
- return;
1195
- }
1187
+ var startEvent = $.Event(Event.HIDE);
1188
+ $(this._element).trigger(startEvent);
1189
+ if (startEvent.isDefaultPrevented()) {
1190
+ return;
1191
+ }
1196
1192
 
1197
- var startEvent = $.Event(Event.HIDE);
1198
- $(this._element).trigger(startEvent);
1199
- if (startEvent.isDefaultPrevented()) {
1200
- return;
1201
- }
1193
+ var dimension = this._getDimension();
1194
+ var offsetDimension = dimension === Dimension.WIDTH ? 'offsetWidth' : 'offsetHeight';
1202
1195
 
1203
- var dimension = this._getDimension();
1204
- var offsetDimension = dimension === Dimension.WIDTH ? 'offsetWidth' : 'offsetHeight';
1196
+ this._element.style[dimension] = this._element[offsetDimension] + 'px';
1205
1197
 
1206
- this._element.style[dimension] = this._element[offsetDimension] + 'px';
1198
+ Util.reflow(this._element);
1207
1199
 
1208
- Util.reflow(this._element);
1200
+ $(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.SHOW);
1209
1201
 
1210
- $(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.IN);
1202
+ this._element.setAttribute('aria-expanded', false);
1211
1203
 
1212
- this._element.setAttribute('aria-expanded', false);
1204
+ if (this._triggerArray.length) {
1205
+ $(this._triggerArray).addClass(ClassName.COLLAPSED).attr('aria-expanded', false);
1206
+ }
1213
1207
 
1214
- if (this._triggerArray.length) {
1215
- $(this._triggerArray).addClass(ClassName.COLLAPSED).attr('aria-expanded', false);
1216
- }
1208
+ this.setTransitioning(true);
1217
1209
 
1218
- this.setTransitioning(true);
1210
+ var complete = function complete() {
1211
+ _this7.setTransitioning(false);
1212
+ $(_this7._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).trigger(Event.HIDDEN);
1213
+ };
1219
1214
 
1220
- var complete = function complete() {
1221
- _this5.setTransitioning(false);
1222
- $(_this5._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).trigger(Event.HIDDEN);
1223
- };
1215
+ this._element.style[dimension] = '';
1224
1216
 
1225
- this._element.style[dimension] = 0;
1217
+ if (!Util.supportsTransitionEnd()) {
1218
+ complete();
1219
+ return;
1220
+ }
1226
1221
 
1227
- if (!Util.supportsTransitionEnd()) {
1228
- complete();
1229
- return;
1230
- }
1222
+ $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
1223
+ };
1231
1224
 
1232
- $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
1233
- }
1234
- }, {
1235
- key: 'setTransitioning',
1236
- value: function setTransitioning(isTransitioning) {
1237
- this._isTransitioning = isTransitioning;
1238
- }
1239
- }, {
1240
- key: 'dispose',
1241
- value: function dispose() {
1242
- $.removeData(this._element, DATA_KEY);
1225
+ Collapse.prototype.setTransitioning = function setTransitioning(isTransitioning) {
1226
+ this._isTransitioning = isTransitioning;
1227
+ };
1243
1228
 
1244
- this._config = null;
1245
- this._parent = null;
1246
- this._element = null;
1247
- this._triggerArray = null;
1248
- this._isTransitioning = null;
1249
- }
1229
+ Collapse.prototype.dispose = function dispose() {
1230
+ $.removeData(this._element, DATA_KEY);
1250
1231
 
1251
- // private
1232
+ this._config = null;
1233
+ this._parent = null;
1234
+ this._element = null;
1235
+ this._triggerArray = null;
1236
+ this._isTransitioning = null;
1237
+ };
1252
1238
 
1253
- }, {
1254
- key: '_getConfig',
1255
- value: function _getConfig(config) {
1256
- config = $.extend({}, Default, config);
1257
- config.toggle = Boolean(config.toggle); // coerce string values
1258
- Util.typeCheckConfig(NAME, config, DefaultType);
1259
- return config;
1260
- }
1261
- }, {
1262
- key: '_getDimension',
1263
- value: function _getDimension() {
1264
- var hasWidth = $(this._element).hasClass(Dimension.WIDTH);
1265
- return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT;
1266
- }
1267
- }, {
1268
- key: '_getParent',
1269
- value: function _getParent() {
1270
- var _this6 = this;
1239
+ // private
1271
1240
 
1272
- var parent = $(this._config.parent)[0];
1273
- var selector = '[data-toggle="collapse"][data-parent="' + this._config.parent + '"]';
1241
+ Collapse.prototype._getConfig = function _getConfig(config) {
1242
+ config = $.extend({}, Default, config);
1243
+ config.toggle = Boolean(config.toggle); // coerce string values
1244
+ Util.typeCheckConfig(NAME, config, DefaultType);
1245
+ return config;
1246
+ };
1274
1247
 
1275
- $(parent).find(selector).each(function (i, element) {
1276
- _this6._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]);
1277
- });
1248
+ Collapse.prototype._getDimension = function _getDimension() {
1249
+ var hasWidth = $(this._element).hasClass(Dimension.WIDTH);
1250
+ return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT;
1251
+ };
1278
1252
 
1279
- return parent;
1280
- }
1281
- }, {
1282
- key: '_addAriaAndCollapsedClass',
1283
- value: function _addAriaAndCollapsedClass(element, triggerArray) {
1284
- if (element) {
1285
- var isOpen = $(element).hasClass(ClassName.IN);
1286
- element.setAttribute('aria-expanded', isOpen);
1287
-
1288
- if (triggerArray.length) {
1289
- $(triggerArray).toggleClass(ClassName.COLLAPSED, !isOpen).attr('aria-expanded', isOpen);
1290
- }
1253
+ Collapse.prototype._getParent = function _getParent() {
1254
+ var _this8 = this;
1255
+
1256
+ var parent = $(this._config.parent)[0];
1257
+ var selector = '[data-toggle="collapse"][data-parent="' + this._config.parent + '"]';
1258
+
1259
+ $(parent).find(selector).each(function (i, element) {
1260
+ _this8._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]);
1261
+ });
1262
+
1263
+ return parent;
1264
+ };
1265
+
1266
+ Collapse.prototype._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) {
1267
+ if (element) {
1268
+ var isOpen = $(element).hasClass(ClassName.SHOW);
1269
+ element.setAttribute('aria-expanded', isOpen);
1270
+
1271
+ if (triggerArray.length) {
1272
+ $(triggerArray).toggleClass(ClassName.COLLAPSED, !isOpen).attr('aria-expanded', isOpen);
1291
1273
  }
1292
1274
  }
1275
+ };
1293
1276
 
1294
- // static
1277
+ // static
1295
1278
 
1296
- }], [{
1297
- key: '_getTargetFromElement',
1298
- value: function _getTargetFromElement(element) {
1299
- var selector = Util.getSelectorFromElement(element);
1300
- return selector ? $(selector)[0] : null;
1301
- }
1302
- }, {
1303
- key: '_jQueryInterface',
1304
- value: function _jQueryInterface(config) {
1305
- return this.each(function () {
1306
- var $this = $(this);
1307
- var data = $this.data(DATA_KEY);
1308
- var _config = $.extend({}, Default, $this.data(), typeof config === 'object' && config);
1309
-
1310
- if (!data && _config.toggle && /show|hide/.test(config)) {
1311
- _config.toggle = false;
1312
- }
1279
+ Collapse._getTargetFromElement = function _getTargetFromElement(element) {
1280
+ var selector = Util.getSelectorFromElement(element);
1281
+ return selector ? $(selector)[0] : null;
1282
+ };
1313
1283
 
1314
- if (!data) {
1315
- data = new Collapse(this, _config);
1316
- $this.data(DATA_KEY, data);
1317
- }
1284
+ Collapse._jQueryInterface = function _jQueryInterface(config) {
1285
+ return this.each(function () {
1286
+ var $this = $(this);
1287
+ var data = $this.data(DATA_KEY);
1288
+ var _config = $.extend({}, Default, $this.data(), (typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object' && config);
1318
1289
 
1319
- if (typeof config === 'string') {
1320
- if (data[config] === undefined) {
1321
- throw new Error('No method named "' + config + '"');
1322
- }
1323
- data[config]();
1290
+ if (!data && _config.toggle && /show|hide/.test(config)) {
1291
+ _config.toggle = false;
1292
+ }
1293
+
1294
+ if (!data) {
1295
+ data = new Collapse(this, _config);
1296
+ $this.data(DATA_KEY, data);
1297
+ }
1298
+
1299
+ if (typeof config === 'string') {
1300
+ if (data[config] === undefined) {
1301
+ throw new Error('No method named "' + config + '"');
1324
1302
  }
1325
- });
1326
- }
1327
- }, {
1303
+ data[config]();
1304
+ }
1305
+ });
1306
+ };
1307
+
1308
+ _createClass(Collapse, null, [{
1328
1309
  key: 'VERSION',
1329
1310
  get: function get() {
1330
1311
  return VERSION;
@@ -1337,7 +1318,13 @@ var Collapse = (function ($) {
1337
1318
  }]);
1338
1319
 
1339
1320
  return Collapse;
1340
- })();
1321
+ }();
1322
+
1323
+ /**
1324
+ * ------------------------------------------------------------------------
1325
+ * Data Api implementation
1326
+ * ------------------------------------------------------------------------
1327
+ */
1341
1328
 
1342
1329
  $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
1343
1330
  event.preventDefault();
@@ -1363,16 +1350,16 @@ var Collapse = (function ($) {
1363
1350
  };
1364
1351
 
1365
1352
  return Collapse;
1366
- })(jQuery);
1353
+ }(jQuery);
1367
1354
 
1368
1355
  /**
1369
1356
  * --------------------------------------------------------------------------
1370
- * Bootstrap (v4.0.0-alpha.2): dropdown.js
1357
+ * Bootstrap (v4.0.0-alpha.6): dropdown.js
1371
1358
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1372
1359
  * --------------------------------------------------------------------------
1373
1360
  */
1374
1361
 
1375
- var Dropdown = (function ($) {
1362
+ var Dropdown = function ($) {
1376
1363
 
1377
1364
  /**
1378
1365
  * ------------------------------------------------------------------------
@@ -1381,11 +1368,15 @@ var Dropdown = (function ($) {
1381
1368
  */
1382
1369
 
1383
1370
  var NAME = 'dropdown';
1384
- var VERSION = '4.0.0-alpha';
1371
+ var VERSION = '4.0.0-alpha.6';
1385
1372
  var DATA_KEY = 'bs.dropdown';
1386
1373
  var EVENT_KEY = '.' + DATA_KEY;
1387
1374
  var DATA_API_KEY = '.data-api';
1388
1375
  var JQUERY_NO_CONFLICT = $.fn[NAME];
1376
+ var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key
1377
+ var ARROW_UP_KEYCODE = 38; // KeyboardEvent.which value for up arrow key
1378
+ var ARROW_DOWN_KEYCODE = 40; // KeyboardEvent.which value for down arrow key
1379
+ var RIGHT_MOUSE_BUTTON_WHICH = 3; // MouseEvent.which value for the right button (assuming a right-handed mouse)
1389
1380
 
1390
1381
  var Event = {
1391
1382
  HIDE: 'hide' + EVENT_KEY,
@@ -1394,13 +1385,14 @@ var Dropdown = (function ($) {
1394
1385
  SHOWN: 'shown' + EVENT_KEY,
1395
1386
  CLICK: 'click' + EVENT_KEY,
1396
1387
  CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY,
1388
+ FOCUSIN_DATA_API: 'focusin' + EVENT_KEY + DATA_API_KEY,
1397
1389
  KEYDOWN_DATA_API: 'keydown' + EVENT_KEY + DATA_API_KEY
1398
1390
  };
1399
1391
 
1400
1392
  var ClassName = {
1401
1393
  BACKDROP: 'dropdown-backdrop',
1402
1394
  DISABLED: 'disabled',
1403
- OPEN: 'open'
1395
+ SHOW: 'show'
1404
1396
  };
1405
1397
 
1406
1398
  var Selector = {
@@ -1419,7 +1411,7 @@ var Dropdown = (function ($) {
1419
1411
  * ------------------------------------------------------------------------
1420
1412
  */
1421
1413
 
1422
- var Dropdown = (function () {
1414
+ var Dropdown = function () {
1423
1415
  function Dropdown(element) {
1424
1416
  _classCallCheck(this, Dropdown);
1425
1417
 
@@ -1428,201 +1420,186 @@ var Dropdown = (function ($) {
1428
1420
  this._addEventListeners();
1429
1421
  }
1430
1422
 
1431
- /**
1432
- * ------------------------------------------------------------------------
1433
- * Data Api implementation
1434
- * ------------------------------------------------------------------------
1435
- */
1436
-
1437
1423
  // getters
1438
1424
 
1439
- _createClass(Dropdown, [{
1440
- key: 'toggle',
1425
+ // public
1441
1426
 
1442
- // public
1443
-
1444
- value: function toggle() {
1445
- if (this.disabled || $(this).hasClass(ClassName.DISABLED)) {
1446
- return false;
1447
- }
1427
+ Dropdown.prototype.toggle = function toggle() {
1428
+ if (this.disabled || $(this).hasClass(ClassName.DISABLED)) {
1429
+ return false;
1430
+ }
1448
1431
 
1449
- var parent = Dropdown._getParentFromElement(this);
1450
- var isActive = $(parent).hasClass(ClassName.OPEN);
1432
+ var parent = Dropdown._getParentFromElement(this);
1433
+ var isActive = $(parent).hasClass(ClassName.SHOW);
1451
1434
 
1452
- Dropdown._clearMenus();
1435
+ Dropdown._clearMenus();
1453
1436
 
1454
- if (isActive) {
1455
- return false;
1456
- }
1437
+ if (isActive) {
1438
+ return false;
1439
+ }
1457
1440
 
1458
- if ('ontouchstart' in document.documentElement && !$(parent).closest(Selector.NAVBAR_NAV).length) {
1441
+ if ('ontouchstart' in document.documentElement && !$(parent).closest(Selector.NAVBAR_NAV).length) {
1459
1442
 
1460
- // if mobile we use a backdrop because click events don't delegate
1461
- var dropdown = document.createElement('div');
1462
- dropdown.className = ClassName.BACKDROP;
1463
- $(dropdown).insertBefore(this);
1464
- $(dropdown).on('click', Dropdown._clearMenus);
1465
- }
1443
+ // if mobile we use a backdrop because click events don't delegate
1444
+ var dropdown = document.createElement('div');
1445
+ dropdown.className = ClassName.BACKDROP;
1446
+ $(dropdown).insertBefore(this);
1447
+ $(dropdown).on('click', Dropdown._clearMenus);
1448
+ }
1466
1449
 
1467
- var relatedTarget = { relatedTarget: this };
1468
- var showEvent = $.Event(Event.SHOW, relatedTarget);
1450
+ var relatedTarget = {
1451
+ relatedTarget: this
1452
+ };
1453
+ var showEvent = $.Event(Event.SHOW, relatedTarget);
1469
1454
 
1470
- $(parent).trigger(showEvent);
1455
+ $(parent).trigger(showEvent);
1471
1456
 
1472
- if (showEvent.isDefaultPrevented()) {
1473
- return false;
1474
- }
1457
+ if (showEvent.isDefaultPrevented()) {
1458
+ return false;
1459
+ }
1475
1460
 
1476
- this.focus();
1477
- this.setAttribute('aria-expanded', 'true');
1461
+ this.focus();
1462
+ this.setAttribute('aria-expanded', true);
1478
1463
 
1479
- $(parent).toggleClass(ClassName.OPEN);
1480
- $(parent).trigger($.Event(Event.SHOWN, relatedTarget));
1464
+ $(parent).toggleClass(ClassName.SHOW);
1465
+ $(parent).trigger($.Event(Event.SHOWN, relatedTarget));
1481
1466
 
1482
- return false;
1483
- }
1484
- }, {
1485
- key: 'dispose',
1486
- value: function dispose() {
1487
- $.removeData(this._element, DATA_KEY);
1488
- $(this._element).off(EVENT_KEY);
1489
- this._element = null;
1490
- }
1467
+ return false;
1468
+ };
1491
1469
 
1492
- // private
1470
+ Dropdown.prototype.dispose = function dispose() {
1471
+ $.removeData(this._element, DATA_KEY);
1472
+ $(this._element).off(EVENT_KEY);
1473
+ this._element = null;
1474
+ };
1493
1475
 
1494
- }, {
1495
- key: '_addEventListeners',
1496
- value: function _addEventListeners() {
1497
- $(this._element).on(Event.CLICK, this.toggle);
1498
- }
1476
+ // private
1499
1477
 
1500
- // static
1478
+ Dropdown.prototype._addEventListeners = function _addEventListeners() {
1479
+ $(this._element).on(Event.CLICK, this.toggle);
1480
+ };
1501
1481
 
1502
- }], [{
1503
- key: '_jQueryInterface',
1504
- value: function _jQueryInterface(config) {
1505
- return this.each(function () {
1506
- var data = $(this).data(DATA_KEY);
1482
+ // static
1507
1483
 
1508
- if (!data) {
1509
- $(this).data(DATA_KEY, data = new Dropdown(this));
1510
- }
1484
+ Dropdown._jQueryInterface = function _jQueryInterface(config) {
1485
+ return this.each(function () {
1486
+ var data = $(this).data(DATA_KEY);
1511
1487
 
1512
- if (typeof config === 'string') {
1513
- if (data[config] === undefined) {
1514
- throw new Error('No method named "' + config + '"');
1515
- }
1516
- data[config].call(this);
1517
- }
1518
- });
1519
- }
1520
- }, {
1521
- key: '_clearMenus',
1522
- value: function _clearMenus(event) {
1523
- if (event && event.which === 3) {
1524
- return;
1488
+ if (!data) {
1489
+ data = new Dropdown(this);
1490
+ $(this).data(DATA_KEY, data);
1525
1491
  }
1526
1492
 
1527
- var backdrop = $(Selector.BACKDROP)[0];
1528
- if (backdrop) {
1529
- backdrop.parentNode.removeChild(backdrop);
1493
+ if (typeof config === 'string') {
1494
+ if (data[config] === undefined) {
1495
+ throw new Error('No method named "' + config + '"');
1496
+ }
1497
+ data[config].call(this);
1530
1498
  }
1499
+ });
1500
+ };
1531
1501
 
1532
- var toggles = $.makeArray($(Selector.DATA_TOGGLE));
1533
-
1534
- for (var i = 0; i < toggles.length; i++) {
1535
- var _parent = Dropdown._getParentFromElement(toggles[i]);
1536
- var relatedTarget = { relatedTarget: toggles[i] };
1502
+ Dropdown._clearMenus = function _clearMenus(event) {
1503
+ if (event && event.which === RIGHT_MOUSE_BUTTON_WHICH) {
1504
+ return;
1505
+ }
1537
1506
 
1538
- if (!$(_parent).hasClass(ClassName.OPEN)) {
1539
- continue;
1540
- }
1507
+ var backdrop = $(Selector.BACKDROP)[0];
1508
+ if (backdrop) {
1509
+ backdrop.parentNode.removeChild(backdrop);
1510
+ }
1541
1511
 
1542
- if (event && event.type === 'click' && /input|textarea/i.test(event.target.tagName) && $.contains(_parent, event.target)) {
1543
- continue;
1544
- }
1512
+ var toggles = $.makeArray($(Selector.DATA_TOGGLE));
1545
1513
 
1546
- var hideEvent = $.Event(Event.HIDE, relatedTarget);
1547
- $(_parent).trigger(hideEvent);
1548
- if (hideEvent.isDefaultPrevented()) {
1549
- continue;
1550
- }
1514
+ for (var i = 0; i < toggles.length; i++) {
1515
+ var parent = Dropdown._getParentFromElement(toggles[i]);
1516
+ var relatedTarget = {
1517
+ relatedTarget: toggles[i]
1518
+ };
1551
1519
 
1552
- toggles[i].setAttribute('aria-expanded', 'false');
1520
+ if (!$(parent).hasClass(ClassName.SHOW)) {
1521
+ continue;
1522
+ }
1553
1523
 
1554
- $(_parent).removeClass(ClassName.OPEN).trigger($.Event(Event.HIDDEN, relatedTarget));
1524
+ if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'focusin') && $.contains(parent, event.target)) {
1525
+ continue;
1555
1526
  }
1556
- }
1557
- }, {
1558
- key: '_getParentFromElement',
1559
- value: function _getParentFromElement(element) {
1560
- var parent = undefined;
1561
- var selector = Util.getSelectorFromElement(element);
1562
1527
 
1563
- if (selector) {
1564
- parent = $(selector)[0];
1528
+ var hideEvent = $.Event(Event.HIDE, relatedTarget);
1529
+ $(parent).trigger(hideEvent);
1530
+ if (hideEvent.isDefaultPrevented()) {
1531
+ continue;
1565
1532
  }
1566
1533
 
1567
- return parent || element.parentNode;
1534
+ toggles[i].setAttribute('aria-expanded', 'false');
1535
+
1536
+ $(parent).removeClass(ClassName.SHOW).trigger($.Event(Event.HIDDEN, relatedTarget));
1568
1537
  }
1569
- }, {
1570
- key: '_dataApiKeydownHandler',
1571
- value: function _dataApiKeydownHandler(event) {
1572
- if (!/(38|40|27|32)/.test(event.which) || /input|textarea/i.test(event.target.tagName)) {
1573
- return;
1574
- }
1538
+ };
1575
1539
 
1576
- event.preventDefault();
1577
- event.stopPropagation();
1540
+ Dropdown._getParentFromElement = function _getParentFromElement(element) {
1541
+ var parent = void 0;
1542
+ var selector = Util.getSelectorFromElement(element);
1578
1543
 
1579
- if (this.disabled || $(this).hasClass(ClassName.DISABLED)) {
1580
- return;
1581
- }
1544
+ if (selector) {
1545
+ parent = $(selector)[0];
1546
+ }
1582
1547
 
1583
- var parent = Dropdown._getParentFromElement(this);
1584
- var isActive = $(parent).hasClass(ClassName.OPEN);
1548
+ return parent || element.parentNode;
1549
+ };
1585
1550
 
1586
- if (!isActive && event.which !== 27 || isActive && event.which === 27) {
1551
+ Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) {
1552
+ if (!/(38|40|27|32)/.test(event.which) || /input|textarea/i.test(event.target.tagName)) {
1553
+ return;
1554
+ }
1587
1555
 
1588
- if (event.which === 27) {
1589
- var toggle = $(parent).find(Selector.DATA_TOGGLE)[0];
1590
- $(toggle).trigger('focus');
1591
- }
1556
+ event.preventDefault();
1557
+ event.stopPropagation();
1592
1558
 
1593
- $(this).trigger('click');
1594
- return;
1595
- }
1559
+ if (this.disabled || $(this).hasClass(ClassName.DISABLED)) {
1560
+ return;
1561
+ }
1596
1562
 
1597
- var items = $.makeArray($(Selector.VISIBLE_ITEMS));
1563
+ var parent = Dropdown._getParentFromElement(this);
1564
+ var isActive = $(parent).hasClass(ClassName.SHOW);
1598
1565
 
1599
- items = items.filter(function (item) {
1600
- return item.offsetWidth || item.offsetHeight;
1601
- });
1566
+ if (!isActive && event.which !== ESCAPE_KEYCODE || isActive && event.which === ESCAPE_KEYCODE) {
1602
1567
 
1603
- if (!items.length) {
1604
- return;
1568
+ if (event.which === ESCAPE_KEYCODE) {
1569
+ var toggle = $(parent).find(Selector.DATA_TOGGLE)[0];
1570
+ $(toggle).trigger('focus');
1605
1571
  }
1606
1572
 
1607
- var index = items.indexOf(event.target);
1573
+ $(this).trigger('click');
1574
+ return;
1575
+ }
1608
1576
 
1609
- if (event.which === 38 && index > 0) {
1610
- // up
1611
- index--;
1612
- }
1577
+ var items = $(parent).find(Selector.VISIBLE_ITEMS).get();
1613
1578
 
1614
- if (event.which === 40 && index < items.length - 1) {
1615
- // down
1616
- index++;
1617
- }
1579
+ if (!items.length) {
1580
+ return;
1581
+ }
1618
1582
 
1619
- if (! ~index) {
1620
- index = 0;
1621
- }
1583
+ var index = items.indexOf(event.target);
1622
1584
 
1623
- items[index].focus();
1585
+ if (event.which === ARROW_UP_KEYCODE && index > 0) {
1586
+ // up
1587
+ index--;
1624
1588
  }
1625
- }, {
1589
+
1590
+ if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) {
1591
+ // down
1592
+ index++;
1593
+ }
1594
+
1595
+ if (index < 0) {
1596
+ index = 0;
1597
+ }
1598
+
1599
+ items[index].focus();
1600
+ };
1601
+
1602
+ _createClass(Dropdown, null, [{
1626
1603
  key: 'VERSION',
1627
1604
  get: function get() {
1628
1605
  return VERSION;
@@ -1630,9 +1607,15 @@ var Dropdown = (function ($) {
1630
1607
  }]);
1631
1608
 
1632
1609
  return Dropdown;
1633
- })();
1610
+ }();
1611
+
1612
+ /**
1613
+ * ------------------------------------------------------------------------
1614
+ * Data Api implementation
1615
+ * ------------------------------------------------------------------------
1616
+ */
1634
1617
 
1635
- $(document).on(Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.ROLE_MENU, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.ROLE_LISTBOX, Dropdown._dataApiKeydownHandler).on(Event.CLICK_DATA_API, Dropdown._clearMenus).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, Dropdown.prototype.toggle).on(Event.CLICK_DATA_API, Selector.FORM_CHILD, function (e) {
1618
+ $(document).on(Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.ROLE_MENU, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.ROLE_LISTBOX, Dropdown._dataApiKeydownHandler).on(Event.CLICK_DATA_API + ' ' + Event.FOCUSIN_DATA_API, Dropdown._clearMenus).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, Dropdown.prototype.toggle).on(Event.CLICK_DATA_API, Selector.FORM_CHILD, function (e) {
1636
1619
  e.stopPropagation();
1637
1620
  });
1638
1621
 
@@ -1650,16 +1633,16 @@ var Dropdown = (function ($) {
1650
1633
  };
1651
1634
 
1652
1635
  return Dropdown;
1653
- })(jQuery);
1636
+ }(jQuery);
1654
1637
 
1655
1638
  /**
1656
1639
  * --------------------------------------------------------------------------
1657
- * Bootstrap (v4.0.0-alpha.2): modal.js
1640
+ * Bootstrap (v4.0.0-alpha.6): modal.js
1658
1641
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1659
1642
  * --------------------------------------------------------------------------
1660
1643
  */
1661
1644
 
1662
- var Modal = (function ($) {
1645
+ var Modal = function ($) {
1663
1646
 
1664
1647
  /**
1665
1648
  * ------------------------------------------------------------------------
@@ -1668,13 +1651,14 @@ var Modal = (function ($) {
1668
1651
  */
1669
1652
 
1670
1653
  var NAME = 'modal';
1671
- var VERSION = '4.0.0-alpha';
1654
+ var VERSION = '4.0.0-alpha.6';
1672
1655
  var DATA_KEY = 'bs.modal';
1673
1656
  var EVENT_KEY = '.' + DATA_KEY;
1674
1657
  var DATA_API_KEY = '.data-api';
1675
1658
  var JQUERY_NO_CONFLICT = $.fn[NAME];
1676
1659
  var TRANSITION_DURATION = 300;
1677
1660
  var BACKDROP_TRANSITION_DURATION = 150;
1661
+ var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key
1678
1662
 
1679
1663
  var Default = {
1680
1664
  backdrop: true,
@@ -1709,14 +1693,14 @@ var Modal = (function ($) {
1709
1693
  BACKDROP: 'modal-backdrop',
1710
1694
  OPEN: 'modal-open',
1711
1695
  FADE: 'fade',
1712
- IN: 'in'
1696
+ SHOW: 'show'
1713
1697
  };
1714
1698
 
1715
1699
  var Selector = {
1716
1700
  DIALOG: '.modal-dialog',
1717
1701
  DATA_TOGGLE: '[data-toggle="modal"]',
1718
1702
  DATA_DISMISS: '[data-dismiss="modal"]',
1719
- FIXED_CONTENT: '.navbar-fixed-top, .navbar-fixed-bottom, .is-fixed'
1703
+ FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top'
1720
1704
  };
1721
1705
 
1722
1706
  /**
@@ -1725,7 +1709,7 @@ var Modal = (function ($) {
1725
1709
  * ------------------------------------------------------------------------
1726
1710
  */
1727
1711
 
1728
- var Modal = (function () {
1712
+ var Modal = function () {
1729
1713
  function Modal(element, config) {
1730
1714
  _classCallCheck(this, Modal);
1731
1715
 
@@ -1736,390 +1720,382 @@ var Modal = (function ($) {
1736
1720
  this._isShown = false;
1737
1721
  this._isBodyOverflowing = false;
1738
1722
  this._ignoreBackdropClick = false;
1723
+ this._isTransitioning = false;
1739
1724
  this._originalBodyPadding = 0;
1740
1725
  this._scrollbarWidth = 0;
1741
1726
  }
1742
1727
 
1743
- /**
1744
- * ------------------------------------------------------------------------
1745
- * Data Api implementation
1746
- * ------------------------------------------------------------------------
1747
- */
1748
-
1749
1728
  // getters
1750
1729
 
1751
- _createClass(Modal, [{
1752
- key: 'toggle',
1730
+ // public
1731
+
1732
+ Modal.prototype.toggle = function toggle(relatedTarget) {
1733
+ return this._isShown ? this.hide() : this.show(relatedTarget);
1734
+ };
1753
1735
 
1754
- // public
1736
+ Modal.prototype.show = function show(relatedTarget) {
1737
+ var _this9 = this;
1755
1738
 
1756
- value: function toggle(relatedTarget) {
1757
- return this._isShown ? this.hide() : this.show(relatedTarget);
1739
+ if (this._isTransitioning) {
1740
+ throw new Error('Modal is transitioning');
1758
1741
  }
1759
- }, {
1760
- key: 'show',
1761
- value: function show(relatedTarget) {
1762
- var _this7 = this;
1763
1742
 
1764
- var showEvent = $.Event(Event.SHOW, {
1765
- relatedTarget: relatedTarget
1766
- });
1743
+ if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) {
1744
+ this._isTransitioning = true;
1745
+ }
1746
+ var showEvent = $.Event(Event.SHOW, {
1747
+ relatedTarget: relatedTarget
1748
+ });
1767
1749
 
1768
- $(this._element).trigger(showEvent);
1750
+ $(this._element).trigger(showEvent);
1769
1751
 
1770
- if (this._isShown || showEvent.isDefaultPrevented()) {
1771
- return;
1772
- }
1752
+ if (this._isShown || showEvent.isDefaultPrevented()) {
1753
+ return;
1754
+ }
1773
1755
 
1774
- this._isShown = true;
1756
+ this._isShown = true;
1775
1757
 
1776
- this._checkScrollbar();
1777
- this._setScrollbar();
1758
+ this._checkScrollbar();
1759
+ this._setScrollbar();
1778
1760
 
1779
- $(document.body).addClass(ClassName.OPEN);
1761
+ $(document.body).addClass(ClassName.OPEN);
1780
1762
 
1781
- this._setEscapeEvent();
1782
- this._setResizeEvent();
1763
+ this._setEscapeEvent();
1764
+ this._setResizeEvent();
1783
1765
 
1784
- $(this._element).on(Event.CLICK_DISMISS, Selector.DATA_DISMISS, $.proxy(this.hide, this));
1766
+ $(this._element).on(Event.CLICK_DISMISS, Selector.DATA_DISMISS, function (event) {
1767
+ return _this9.hide(event);
1768
+ });
1785
1769
 
1786
- $(this._dialog).on(Event.MOUSEDOWN_DISMISS, function () {
1787
- $(_this7._element).one(Event.MOUSEUP_DISMISS, function (event) {
1788
- if ($(event.target).is(_this7._element)) {
1789
- _this7._ignoreBackdropClick = true;
1790
- }
1791
- });
1770
+ $(this._dialog).on(Event.MOUSEDOWN_DISMISS, function () {
1771
+ $(_this9._element).one(Event.MOUSEUP_DISMISS, function (event) {
1772
+ if ($(event.target).is(_this9._element)) {
1773
+ _this9._ignoreBackdropClick = true;
1774
+ }
1792
1775
  });
1776
+ });
1793
1777
 
1794
- this._showBackdrop($.proxy(this._showElement, this, relatedTarget));
1795
- }
1796
- }, {
1797
- key: 'hide',
1798
- value: function hide(event) {
1799
- if (event) {
1800
- event.preventDefault();
1801
- }
1778
+ this._showBackdrop(function () {
1779
+ return _this9._showElement(relatedTarget);
1780
+ });
1781
+ };
1802
1782
 
1803
- var hideEvent = $.Event(Event.HIDE);
1783
+ Modal.prototype.hide = function hide(event) {
1784
+ var _this10 = this;
1804
1785
 
1805
- $(this._element).trigger(hideEvent);
1786
+ if (event) {
1787
+ event.preventDefault();
1788
+ }
1806
1789
 
1807
- if (!this._isShown || hideEvent.isDefaultPrevented()) {
1808
- return;
1809
- }
1790
+ if (this._isTransitioning) {
1791
+ throw new Error('Modal is transitioning');
1792
+ }
1810
1793
 
1811
- this._isShown = false;
1794
+ var transition = Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE);
1795
+ if (transition) {
1796
+ this._isTransitioning = true;
1797
+ }
1812
1798
 
1813
- this._setEscapeEvent();
1814
- this._setResizeEvent();
1799
+ var hideEvent = $.Event(Event.HIDE);
1800
+ $(this._element).trigger(hideEvent);
1815
1801
 
1816
- $(document).off(Event.FOCUSIN);
1802
+ if (!this._isShown || hideEvent.isDefaultPrevented()) {
1803
+ return;
1804
+ }
1817
1805
 
1818
- $(this._element).removeClass(ClassName.IN);
1806
+ this._isShown = false;
1819
1807
 
1820
- $(this._element).off(Event.CLICK_DISMISS);
1821
- $(this._dialog).off(Event.MOUSEDOWN_DISMISS);
1808
+ this._setEscapeEvent();
1809
+ this._setResizeEvent();
1822
1810
 
1823
- if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) {
1811
+ $(document).off(Event.FOCUSIN);
1824
1812
 
1825
- $(this._element).one(Util.TRANSITION_END, $.proxy(this._hideModal, this)).emulateTransitionEnd(TRANSITION_DURATION);
1826
- } else {
1827
- this._hideModal();
1828
- }
1829
- }
1830
- }, {
1831
- key: 'dispose',
1832
- value: function dispose() {
1833
- $.removeData(this._element, DATA_KEY);
1834
-
1835
- $(window).off(EVENT_KEY);
1836
- $(document).off(EVENT_KEY);
1837
- $(this._element).off(EVENT_KEY);
1838
- $(this._backdrop).off(EVENT_KEY);
1839
-
1840
- this._config = null;
1841
- this._element = null;
1842
- this._dialog = null;
1843
- this._backdrop = null;
1844
- this._isShown = null;
1845
- this._isBodyOverflowing = null;
1846
- this._ignoreBackdropClick = null;
1847
- this._originalBodyPadding = null;
1848
- this._scrollbarWidth = null;
1849
- }
1813
+ $(this._element).removeClass(ClassName.SHOW);
1850
1814
 
1851
- // private
1815
+ $(this._element).off(Event.CLICK_DISMISS);
1816
+ $(this._dialog).off(Event.MOUSEDOWN_DISMISS);
1852
1817
 
1853
- }, {
1854
- key: '_getConfig',
1855
- value: function _getConfig(config) {
1856
- config = $.extend({}, Default, config);
1857
- Util.typeCheckConfig(NAME, config, DefaultType);
1858
- return config;
1818
+ if (transition) {
1819
+ $(this._element).one(Util.TRANSITION_END, function (event) {
1820
+ return _this10._hideModal(event);
1821
+ }).emulateTransitionEnd(TRANSITION_DURATION);
1822
+ } else {
1823
+ this._hideModal();
1859
1824
  }
1860
- }, {
1861
- key: '_showElement',
1862
- value: function _showElement(relatedTarget) {
1863
- var _this8 = this;
1825
+ };
1864
1826
 
1865
- var transition = Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE);
1827
+ Modal.prototype.dispose = function dispose() {
1828
+ $.removeData(this._element, DATA_KEY);
1866
1829
 
1867
- if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
1868
- // don't move modals dom position
1869
- document.body.appendChild(this._element);
1870
- }
1830
+ $(window, document, this._element, this._backdrop).off(EVENT_KEY);
1871
1831
 
1872
- this._element.style.display = 'block';
1873
- this._element.scrollTop = 0;
1832
+ this._config = null;
1833
+ this._element = null;
1834
+ this._dialog = null;
1835
+ this._backdrop = null;
1836
+ this._isShown = null;
1837
+ this._isBodyOverflowing = null;
1838
+ this._ignoreBackdropClick = null;
1839
+ this._originalBodyPadding = null;
1840
+ this._scrollbarWidth = null;
1841
+ };
1874
1842
 
1875
- if (transition) {
1876
- Util.reflow(this._element);
1877
- }
1843
+ // private
1878
1844
 
1879
- $(this._element).addClass(ClassName.IN);
1845
+ Modal.prototype._getConfig = function _getConfig(config) {
1846
+ config = $.extend({}, Default, config);
1847
+ Util.typeCheckConfig(NAME, config, DefaultType);
1848
+ return config;
1849
+ };
1880
1850
 
1881
- if (this._config.focus) {
1882
- this._enforceFocus();
1883
- }
1851
+ Modal.prototype._showElement = function _showElement(relatedTarget) {
1852
+ var _this11 = this;
1884
1853
 
1885
- var shownEvent = $.Event(Event.SHOWN, {
1886
- relatedTarget: relatedTarget
1887
- });
1854
+ var transition = Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE);
1888
1855
 
1889
- var transitionComplete = function transitionComplete() {
1890
- if (_this8._config.focus) {
1891
- _this8._element.focus();
1892
- }
1893
- $(_this8._element).trigger(shownEvent);
1894
- };
1856
+ if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
1857
+ // don't move modals dom position
1858
+ document.body.appendChild(this._element);
1859
+ }
1895
1860
 
1896
- if (transition) {
1897
- $(this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(TRANSITION_DURATION);
1898
- } else {
1899
- transitionComplete();
1900
- }
1861
+ this._element.style.display = 'block';
1862
+ this._element.removeAttribute('aria-hidden');
1863
+ this._element.scrollTop = 0;
1864
+
1865
+ if (transition) {
1866
+ Util.reflow(this._element);
1901
1867
  }
1902
- }, {
1903
- key: '_enforceFocus',
1904
- value: function _enforceFocus() {
1905
- var _this9 = this;
1906
-
1907
- $(document).off(Event.FOCUSIN) // guard against infinite focus loop
1908
- .on(Event.FOCUSIN, function (event) {
1909
- if (_this9._element !== event.target && !$(_this9._element).has(event.target).length) {
1910
- _this9._element.focus();
1911
- }
1912
- });
1868
+
1869
+ $(this._element).addClass(ClassName.SHOW);
1870
+
1871
+ if (this._config.focus) {
1872
+ this._enforceFocus();
1913
1873
  }
1914
- }, {
1915
- key: '_setEscapeEvent',
1916
- value: function _setEscapeEvent() {
1917
- var _this10 = this;
1918
-
1919
- if (this._isShown && this._config.keyboard) {
1920
- $(this._element).on(Event.KEYDOWN_DISMISS, function (event) {
1921
- if (event.which === 27) {
1922
- _this10.hide();
1923
- }
1924
- });
1925
- } else if (!this._isShown) {
1926
- $(this._element).off(Event.KEYDOWN_DISMISS);
1874
+
1875
+ var shownEvent = $.Event(Event.SHOWN, {
1876
+ relatedTarget: relatedTarget
1877
+ });
1878
+
1879
+ var transitionComplete = function transitionComplete() {
1880
+ if (_this11._config.focus) {
1881
+ _this11._element.focus();
1927
1882
  }
1883
+ _this11._isTransitioning = false;
1884
+ $(_this11._element).trigger(shownEvent);
1885
+ };
1886
+
1887
+ if (transition) {
1888
+ $(this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(TRANSITION_DURATION);
1889
+ } else {
1890
+ transitionComplete();
1928
1891
  }
1929
- }, {
1930
- key: '_setResizeEvent',
1931
- value: function _setResizeEvent() {
1932
- if (this._isShown) {
1933
- $(window).on(Event.RESIZE, $.proxy(this._handleUpdate, this));
1934
- } else {
1935
- $(window).off(Event.RESIZE);
1892
+ };
1893
+
1894
+ Modal.prototype._enforceFocus = function _enforceFocus() {
1895
+ var _this12 = this;
1896
+
1897
+ $(document).off(Event.FOCUSIN) // guard against infinite focus loop
1898
+ .on(Event.FOCUSIN, function (event) {
1899
+ if (document !== event.target && _this12._element !== event.target && !$(_this12._element).has(event.target).length) {
1900
+ _this12._element.focus();
1936
1901
  }
1937
- }
1938
- }, {
1939
- key: '_hideModal',
1940
- value: function _hideModal() {
1941
- var _this11 = this;
1942
-
1943
- this._element.style.display = 'none';
1944
- this._showBackdrop(function () {
1945
- $(document.body).removeClass(ClassName.OPEN);
1946
- _this11._resetAdjustments();
1947
- _this11._resetScrollbar();
1948
- $(_this11._element).trigger(Event.HIDDEN);
1902
+ });
1903
+ };
1904
+
1905
+ Modal.prototype._setEscapeEvent = function _setEscapeEvent() {
1906
+ var _this13 = this;
1907
+
1908
+ if (this._isShown && this._config.keyboard) {
1909
+ $(this._element).on(Event.KEYDOWN_DISMISS, function (event) {
1910
+ if (event.which === ESCAPE_KEYCODE) {
1911
+ _this13.hide();
1912
+ }
1949
1913
  });
1914
+ } else if (!this._isShown) {
1915
+ $(this._element).off(Event.KEYDOWN_DISMISS);
1950
1916
  }
1951
- }, {
1952
- key: '_removeBackdrop',
1953
- value: function _removeBackdrop() {
1954
- if (this._backdrop) {
1955
- $(this._backdrop).remove();
1956
- this._backdrop = null;
1957
- }
1917
+ };
1918
+
1919
+ Modal.prototype._setResizeEvent = function _setResizeEvent() {
1920
+ var _this14 = this;
1921
+
1922
+ if (this._isShown) {
1923
+ $(window).on(Event.RESIZE, function (event) {
1924
+ return _this14._handleUpdate(event);
1925
+ });
1926
+ } else {
1927
+ $(window).off(Event.RESIZE);
1958
1928
  }
1959
- }, {
1960
- key: '_showBackdrop',
1961
- value: function _showBackdrop(callback) {
1962
- var _this12 = this;
1929
+ };
1963
1930
 
1964
- var animate = $(this._element).hasClass(ClassName.FADE) ? ClassName.FADE : '';
1931
+ Modal.prototype._hideModal = function _hideModal() {
1932
+ var _this15 = this;
1965
1933
 
1966
- if (this._isShown && this._config.backdrop) {
1967
- var doAnimate = Util.supportsTransitionEnd() && animate;
1934
+ this._element.style.display = 'none';
1935
+ this._element.setAttribute('aria-hidden', 'true');
1936
+ this._isTransitioning = false;
1937
+ this._showBackdrop(function () {
1938
+ $(document.body).removeClass(ClassName.OPEN);
1939
+ _this15._resetAdjustments();
1940
+ _this15._resetScrollbar();
1941
+ $(_this15._element).trigger(Event.HIDDEN);
1942
+ });
1943
+ };
1968
1944
 
1969
- this._backdrop = document.createElement('div');
1970
- this._backdrop.className = ClassName.BACKDROP;
1945
+ Modal.prototype._removeBackdrop = function _removeBackdrop() {
1946
+ if (this._backdrop) {
1947
+ $(this._backdrop).remove();
1948
+ this._backdrop = null;
1949
+ }
1950
+ };
1971
1951
 
1972
- if (animate) {
1973
- $(this._backdrop).addClass(animate);
1974
- }
1952
+ Modal.prototype._showBackdrop = function _showBackdrop(callback) {
1953
+ var _this16 = this;
1975
1954
 
1976
- $(this._backdrop).appendTo(document.body);
1955
+ var animate = $(this._element).hasClass(ClassName.FADE) ? ClassName.FADE : '';
1977
1956
 
1978
- $(this._element).on(Event.CLICK_DISMISS, function (event) {
1979
- if (_this12._ignoreBackdropClick) {
1980
- _this12._ignoreBackdropClick = false;
1981
- return;
1982
- }
1983
- if (event.target !== event.currentTarget) {
1984
- return;
1985
- }
1986
- if (_this12._config.backdrop === 'static') {
1987
- _this12._element.focus();
1988
- } else {
1989
- _this12.hide();
1990
- }
1991
- });
1957
+ if (this._isShown && this._config.backdrop) {
1958
+ var doAnimate = Util.supportsTransitionEnd() && animate;
1992
1959
 
1993
- if (doAnimate) {
1994
- Util.reflow(this._backdrop);
1995
- }
1960
+ this._backdrop = document.createElement('div');
1961
+ this._backdrop.className = ClassName.BACKDROP;
1962
+
1963
+ if (animate) {
1964
+ $(this._backdrop).addClass(animate);
1965
+ }
1996
1966
 
1997
- $(this._backdrop).addClass(ClassName.IN);
1967
+ $(this._backdrop).appendTo(document.body);
1998
1968
 
1999
- if (!callback) {
1969
+ $(this._element).on(Event.CLICK_DISMISS, function (event) {
1970
+ if (_this16._ignoreBackdropClick) {
1971
+ _this16._ignoreBackdropClick = false;
2000
1972
  return;
2001
1973
  }
2002
-
2003
- if (!doAnimate) {
2004
- callback();
1974
+ if (event.target !== event.currentTarget) {
2005
1975
  return;
2006
1976
  }
1977
+ if (_this16._config.backdrop === 'static') {
1978
+ _this16._element.focus();
1979
+ } else {
1980
+ _this16.hide();
1981
+ }
1982
+ });
2007
1983
 
2008
- $(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION);
2009
- } else if (!this._isShown && this._backdrop) {
2010
- $(this._backdrop).removeClass(ClassName.IN);
1984
+ if (doAnimate) {
1985
+ Util.reflow(this._backdrop);
1986
+ }
2011
1987
 
2012
- var callbackRemove = function callbackRemove() {
2013
- _this12._removeBackdrop();
2014
- if (callback) {
2015
- callback();
2016
- }
2017
- };
1988
+ $(this._backdrop).addClass(ClassName.SHOW);
2018
1989
 
2019
- if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) {
2020
- $(this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION);
2021
- } else {
2022
- callbackRemove();
2023
- }
2024
- } else if (callback) {
1990
+ if (!callback) {
1991
+ return;
1992
+ }
1993
+
1994
+ if (!doAnimate) {
2025
1995
  callback();
1996
+ return;
2026
1997
  }
2027
- }
2028
1998
 
2029
- // ----------------------------------------------------------------------
2030
- // the following methods are used to handle overflowing modals
2031
- // todo (fat): these should probably be refactored out of modal.js
2032
- // ----------------------------------------------------------------------
1999
+ $(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION);
2000
+ } else if (!this._isShown && this._backdrop) {
2001
+ $(this._backdrop).removeClass(ClassName.SHOW);
2033
2002
 
2034
- }, {
2035
- key: '_handleUpdate',
2036
- value: function _handleUpdate() {
2037
- this._adjustDialog();
2038
- }
2039
- }, {
2040
- key: '_adjustDialog',
2041
- value: function _adjustDialog() {
2042
- var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
2003
+ var callbackRemove = function callbackRemove() {
2004
+ _this16._removeBackdrop();
2005
+ if (callback) {
2006
+ callback();
2007
+ }
2008
+ };
2043
2009
 
2044
- if (!this._isBodyOverflowing && isModalOverflowing) {
2045
- this._element.style.paddingLeft = this._scrollbarWidth + 'px';
2010
+ if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) {
2011
+ $(this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION);
2012
+ } else {
2013
+ callbackRemove();
2046
2014
  }
2015
+ } else if (callback) {
2016
+ callback();
2017
+ }
2018
+ };
2047
2019
 
2048
- if (this._isBodyOverflowing && !isModalOverflowing) {
2049
- this._element.style.paddingRight = this._scrollbarWidth + 'px~';
2050
- }
2020
+ // ----------------------------------------------------------------------
2021
+ // the following methods are used to handle overflowing modals
2022
+ // todo (fat): these should probably be refactored out of modal.js
2023
+ // ----------------------------------------------------------------------
2024
+
2025
+ Modal.prototype._handleUpdate = function _handleUpdate() {
2026
+ this._adjustDialog();
2027
+ };
2028
+
2029
+ Modal.prototype._adjustDialog = function _adjustDialog() {
2030
+ var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
2031
+
2032
+ if (!this._isBodyOverflowing && isModalOverflowing) {
2033
+ this._element.style.paddingLeft = this._scrollbarWidth + 'px';
2051
2034
  }
2052
- }, {
2053
- key: '_resetAdjustments',
2054
- value: function _resetAdjustments() {
2055
- this._element.style.paddingLeft = '';
2056
- this._element.style.paddingRight = '';
2035
+
2036
+ if (this._isBodyOverflowing && !isModalOverflowing) {
2037
+ this._element.style.paddingRight = this._scrollbarWidth + 'px';
2057
2038
  }
2058
- }, {
2059
- key: '_checkScrollbar',
2060
- value: function _checkScrollbar() {
2061
- var fullWindowWidth = window.innerWidth;
2062
- if (!fullWindowWidth) {
2063
- // workaround for missing window.innerWidth in IE8
2064
- var documentElementRect = document.documentElement.getBoundingClientRect();
2065
- fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left);
2066
- }
2067
- this._isBodyOverflowing = document.body.clientWidth < fullWindowWidth;
2068
- this._scrollbarWidth = this._getScrollbarWidth();
2039
+ };
2040
+
2041
+ Modal.prototype._resetAdjustments = function _resetAdjustments() {
2042
+ this._element.style.paddingLeft = '';
2043
+ this._element.style.paddingRight = '';
2044
+ };
2045
+
2046
+ Modal.prototype._checkScrollbar = function _checkScrollbar() {
2047
+ this._isBodyOverflowing = document.body.clientWidth < window.innerWidth;
2048
+ this._scrollbarWidth = this._getScrollbarWidth();
2049
+ };
2050
+
2051
+ Modal.prototype._setScrollbar = function _setScrollbar() {
2052
+ var bodyPadding = parseInt($(Selector.FIXED_CONTENT).css('padding-right') || 0, 10);
2053
+
2054
+ this._originalBodyPadding = document.body.style.paddingRight || '';
2055
+
2056
+ if (this._isBodyOverflowing) {
2057
+ document.body.style.paddingRight = bodyPadding + this._scrollbarWidth + 'px';
2069
2058
  }
2070
- }, {
2071
- key: '_setScrollbar',
2072
- value: function _setScrollbar() {
2073
- var bodyPadding = parseInt($(Selector.FIXED_CONTENT).css('padding-right') || 0, 10);
2059
+ };
2060
+
2061
+ Modal.prototype._resetScrollbar = function _resetScrollbar() {
2062
+ document.body.style.paddingRight = this._originalBodyPadding;
2063
+ };
2064
+
2065
+ Modal.prototype._getScrollbarWidth = function _getScrollbarWidth() {
2066
+ // thx d.walsh
2067
+ var scrollDiv = document.createElement('div');
2068
+ scrollDiv.className = ClassName.SCROLLBAR_MEASURER;
2069
+ document.body.appendChild(scrollDiv);
2070
+ var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;
2071
+ document.body.removeChild(scrollDiv);
2072
+ return scrollbarWidth;
2073
+ };
2074
+
2075
+ // static
2074
2076
 
2075
- this._originalBodyPadding = document.body.style.paddingRight || '';
2077
+ Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) {
2078
+ return this.each(function () {
2079
+ var data = $(this).data(DATA_KEY);
2080
+ var _config = $.extend({}, Modal.Default, $(this).data(), (typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object' && config);
2076
2081
 
2077
- if (this._isBodyOverflowing) {
2078
- document.body.style.paddingRight = bodyPadding + this._scrollbarWidth + 'px';
2082
+ if (!data) {
2083
+ data = new Modal(this, _config);
2084
+ $(this).data(DATA_KEY, data);
2079
2085
  }
2080
- }
2081
- }, {
2082
- key: '_resetScrollbar',
2083
- value: function _resetScrollbar() {
2084
- document.body.style.paddingRight = this._originalBodyPadding;
2085
- }
2086
- }, {
2087
- key: '_getScrollbarWidth',
2088
- value: function _getScrollbarWidth() {
2089
- // thx d.walsh
2090
- var scrollDiv = document.createElement('div');
2091
- scrollDiv.className = ClassName.SCROLLBAR_MEASURER;
2092
- document.body.appendChild(scrollDiv);
2093
- var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;
2094
- document.body.removeChild(scrollDiv);
2095
- return scrollbarWidth;
2096
- }
2097
-
2098
- // static
2099
-
2100
- }], [{
2101
- key: '_jQueryInterface',
2102
- value: function _jQueryInterface(config, relatedTarget) {
2103
- return this.each(function () {
2104
- var data = $(this).data(DATA_KEY);
2105
- var _config = $.extend({}, Modal.Default, $(this).data(), typeof config === 'object' && config);
2106
-
2107
- if (!data) {
2108
- data = new Modal(this, _config);
2109
- $(this).data(DATA_KEY, data);
2110
- }
2111
2086
 
2112
- if (typeof config === 'string') {
2113
- if (data[config] === undefined) {
2114
- throw new Error('No method named "' + config + '"');
2115
- }
2116
- data[config](relatedTarget);
2117
- } else if (_config.show) {
2118
- data.show(relatedTarget);
2087
+ if (typeof config === 'string') {
2088
+ if (data[config] === undefined) {
2089
+ throw new Error('No method named "' + config + '"');
2119
2090
  }
2120
- });
2121
- }
2122
- }, {
2091
+ data[config](relatedTarget);
2092
+ } else if (_config.show) {
2093
+ data.show(relatedTarget);
2094
+ }
2095
+ });
2096
+ };
2097
+
2098
+ _createClass(Modal, null, [{
2123
2099
  key: 'VERSION',
2124
2100
  get: function get() {
2125
2101
  return VERSION;
@@ -2132,12 +2108,18 @@ var Modal = (function ($) {
2132
2108
  }]);
2133
2109
 
2134
2110
  return Modal;
2135
- })();
2111
+ }();
2112
+
2113
+ /**
2114
+ * ------------------------------------------------------------------------
2115
+ * Data Api implementation
2116
+ * ------------------------------------------------------------------------
2117
+ */
2136
2118
 
2137
2119
  $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
2138
- var _this13 = this;
2120
+ var _this17 = this;
2139
2121
 
2140
- var target = undefined;
2122
+ var target = void 0;
2141
2123
  var selector = Util.getSelectorFromElement(this);
2142
2124
 
2143
2125
  if (selector) {
@@ -2146,7 +2128,7 @@ var Modal = (function ($) {
2146
2128
 
2147
2129
  var config = $(target).data(DATA_KEY) ? 'toggle' : $.extend({}, $(target).data(), $(this).data());
2148
2130
 
2149
- if (this.tagName === 'A') {
2131
+ if (this.tagName === 'A' || this.tagName === 'AREA') {
2150
2132
  event.preventDefault();
2151
2133
  }
2152
2134
 
@@ -2157,8 +2139,8 @@ var Modal = (function ($) {
2157
2139
  }
2158
2140
 
2159
2141
  $target.one(Event.HIDDEN, function () {
2160
- if ($(_this13).is(':visible')) {
2161
- _this13.focus();
2142
+ if ($(_this17).is(':visible')) {
2143
+ _this17.focus();
2162
2144
  }
2163
2145
  });
2164
2146
  });
@@ -2180,16 +2162,16 @@ var Modal = (function ($) {
2180
2162
  };
2181
2163
 
2182
2164
  return Modal;
2183
- })(jQuery);
2165
+ }(jQuery);
2184
2166
 
2185
2167
  /**
2186
2168
  * --------------------------------------------------------------------------
2187
- * Bootstrap (v4.0.0-alpha.2): scrollspy.js
2169
+ * Bootstrap (v4.0.0-alpha.6): scrollspy.js
2188
2170
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
2189
2171
  * --------------------------------------------------------------------------
2190
2172
  */
2191
2173
 
2192
- var ScrollSpy = (function ($) {
2174
+ var ScrollSpy = function ($) {
2193
2175
 
2194
2176
  /**
2195
2177
  * ------------------------------------------------------------------------
@@ -2198,7 +2180,7 @@ var ScrollSpy = (function ($) {
2198
2180
  */
2199
2181
 
2200
2182
  var NAME = 'scrollspy';
2201
- var VERSION = '4.0.0-alpha';
2183
+ var VERSION = '4.0.0-alpha.6';
2202
2184
  var DATA_KEY = 'bs.scrollspy';
2203
2185
  var EVENT_KEY = '.' + DATA_KEY;
2204
2186
  var DATA_API_KEY = '.data-api';
@@ -2253,8 +2235,10 @@ var ScrollSpy = (function ($) {
2253
2235
  * ------------------------------------------------------------------------
2254
2236
  */
2255
2237
 
2256
- var ScrollSpy = (function () {
2238
+ var ScrollSpy = function () {
2257
2239
  function ScrollSpy(element, config) {
2240
+ var _this18 = this;
2241
+
2258
2242
  _classCallCheck(this, ScrollSpy);
2259
2243
 
2260
2244
  this._element = element;
@@ -2266,197 +2250,187 @@ var ScrollSpy = (function ($) {
2266
2250
  this._activeTarget = null;
2267
2251
  this._scrollHeight = 0;
2268
2252
 
2269
- $(this._scrollElement).on(Event.SCROLL, $.proxy(this._process, this));
2253
+ $(this._scrollElement).on(Event.SCROLL, function (event) {
2254
+ return _this18._process(event);
2255
+ });
2270
2256
 
2271
2257
  this.refresh();
2272
2258
  this._process();
2273
2259
  }
2274
2260
 
2275
- /**
2276
- * ------------------------------------------------------------------------
2277
- * Data Api implementation
2278
- * ------------------------------------------------------------------------
2279
- */
2280
-
2281
2261
  // getters
2282
2262
 
2283
- _createClass(ScrollSpy, [{
2284
- key: 'refresh',
2263
+ // public
2285
2264
 
2286
- // public
2265
+ ScrollSpy.prototype.refresh = function refresh() {
2266
+ var _this19 = this;
2287
2267
 
2288
- value: function refresh() {
2289
- var _this14 = this;
2268
+ var autoMethod = this._scrollElement !== this._scrollElement.window ? OffsetMethod.POSITION : OffsetMethod.OFFSET;
2290
2269
 
2291
- var autoMethod = this._scrollElement !== this._scrollElement.window ? OffsetMethod.POSITION : OffsetMethod.OFFSET;
2270
+ var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method;
2292
2271
 
2293
- var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method;
2272
+ var offsetBase = offsetMethod === OffsetMethod.POSITION ? this._getScrollTop() : 0;
2294
2273
 
2295
- var offsetBase = offsetMethod === OffsetMethod.POSITION ? this._getScrollTop() : 0;
2274
+ this._offsets = [];
2275
+ this._targets = [];
2296
2276
 
2297
- this._offsets = [];
2298
- this._targets = [];
2277
+ this._scrollHeight = this._getScrollHeight();
2299
2278
 
2300
- this._scrollHeight = this._getScrollHeight();
2279
+ var targets = $.makeArray($(this._selector));
2301
2280
 
2302
- var targets = $.makeArray($(this._selector));
2281
+ targets.map(function (element) {
2282
+ var target = void 0;
2283
+ var targetSelector = Util.getSelectorFromElement(element);
2303
2284
 
2304
- targets.map(function (element) {
2305
- var target = undefined;
2306
- var targetSelector = Util.getSelectorFromElement(element);
2285
+ if (targetSelector) {
2286
+ target = $(targetSelector)[0];
2287
+ }
2307
2288
 
2308
- if (targetSelector) {
2309
- target = $(targetSelector)[0];
2310
- }
2289
+ if (target && (target.offsetWidth || target.offsetHeight)) {
2290
+ // todo (fat): remove sketch reliance on jQuery position/offset
2291
+ return [$(target)[offsetMethod]().top + offsetBase, targetSelector];
2292
+ }
2293
+ return null;
2294
+ }).filter(function (item) {
2295
+ return item;
2296
+ }).sort(function (a, b) {
2297
+ return a[0] - b[0];
2298
+ }).forEach(function (item) {
2299
+ _this19._offsets.push(item[0]);
2300
+ _this19._targets.push(item[1]);
2301
+ });
2302
+ };
2311
2303
 
2312
- if (target && (target.offsetWidth || target.offsetHeight)) {
2313
- // todo (fat): remove sketch reliance on jQuery position/offset
2314
- return [$(target)[offsetMethod]().top + offsetBase, targetSelector];
2315
- }
2316
- }).filter(function (item) {
2317
- return item;
2318
- }).sort(function (a, b) {
2319
- return a[0] - b[0];
2320
- }).forEach(function (item) {
2321
- _this14._offsets.push(item[0]);
2322
- _this14._targets.push(item[1]);
2323
- });
2324
- }
2325
- }, {
2326
- key: 'dispose',
2327
- value: function dispose() {
2328
- $.removeData(this._element, DATA_KEY);
2329
- $(this._scrollElement).off(EVENT_KEY);
2330
-
2331
- this._element = null;
2332
- this._scrollElement = null;
2333
- this._config = null;
2334
- this._selector = null;
2335
- this._offsets = null;
2336
- this._targets = null;
2337
- this._activeTarget = null;
2338
- this._scrollHeight = null;
2339
- }
2304
+ ScrollSpy.prototype.dispose = function dispose() {
2305
+ $.removeData(this._element, DATA_KEY);
2306
+ $(this._scrollElement).off(EVENT_KEY);
2340
2307
 
2341
- // private
2308
+ this._element = null;
2309
+ this._scrollElement = null;
2310
+ this._config = null;
2311
+ this._selector = null;
2312
+ this._offsets = null;
2313
+ this._targets = null;
2314
+ this._activeTarget = null;
2315
+ this._scrollHeight = null;
2316
+ };
2342
2317
 
2343
- }, {
2344
- key: '_getConfig',
2345
- value: function _getConfig(config) {
2346
- config = $.extend({}, Default, config);
2347
-
2348
- if (typeof config.target !== 'string') {
2349
- var id = $(config.target).attr('id');
2350
- if (!id) {
2351
- id = Util.getUID(NAME);
2352
- $(config.target).attr('id', id);
2353
- }
2354
- config.target = '#' + id;
2355
- }
2318
+ // private
2356
2319
 
2357
- Util.typeCheckConfig(NAME, config, DefaultType);
2320
+ ScrollSpy.prototype._getConfig = function _getConfig(config) {
2321
+ config = $.extend({}, Default, config);
2358
2322
 
2359
- return config;
2360
- }
2361
- }, {
2362
- key: '_getScrollTop',
2363
- value: function _getScrollTop() {
2364
- return this._scrollElement === window ? this._scrollElement.scrollY : this._scrollElement.scrollTop;
2365
- }
2366
- }, {
2367
- key: '_getScrollHeight',
2368
- value: function _getScrollHeight() {
2369
- return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
2323
+ if (typeof config.target !== 'string') {
2324
+ var id = $(config.target).attr('id');
2325
+ if (!id) {
2326
+ id = Util.getUID(NAME);
2327
+ $(config.target).attr('id', id);
2328
+ }
2329
+ config.target = '#' + id;
2370
2330
  }
2371
- }, {
2372
- key: '_process',
2373
- value: function _process() {
2374
- var scrollTop = this._getScrollTop() + this._config.offset;
2375
- var scrollHeight = this._getScrollHeight();
2376
- var maxScroll = this._config.offset + scrollHeight - this._scrollElement.offsetHeight;
2377
2331
 
2378
- if (this._scrollHeight !== scrollHeight) {
2379
- this.refresh();
2380
- }
2332
+ Util.typeCheckConfig(NAME, config, DefaultType);
2381
2333
 
2382
- if (scrollTop >= maxScroll) {
2383
- var target = this._targets[this._targets.length - 1];
2334
+ return config;
2335
+ };
2384
2336
 
2385
- if (this._activeTarget !== target) {
2386
- this._activate(target);
2387
- }
2388
- }
2337
+ ScrollSpy.prototype._getScrollTop = function _getScrollTop() {
2338
+ return this._scrollElement === window ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop;
2339
+ };
2389
2340
 
2390
- if (this._activeTarget && scrollTop < this._offsets[0]) {
2391
- this._activeTarget = null;
2392
- this._clear();
2393
- return;
2394
- }
2341
+ ScrollSpy.prototype._getScrollHeight = function _getScrollHeight() {
2342
+ return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
2343
+ };
2344
+
2345
+ ScrollSpy.prototype._getOffsetHeight = function _getOffsetHeight() {
2346
+ return this._scrollElement === window ? window.innerHeight : this._scrollElement.offsetHeight;
2347
+ };
2395
2348
 
2396
- for (var i = this._offsets.length; i--;) {
2397
- var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (this._offsets[i + 1] === undefined || scrollTop < this._offsets[i + 1]);
2349
+ ScrollSpy.prototype._process = function _process() {
2350
+ var scrollTop = this._getScrollTop() + this._config.offset;
2351
+ var scrollHeight = this._getScrollHeight();
2352
+ var maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight();
2398
2353
 
2399
- if (isActiveTarget) {
2400
- this._activate(this._targets[i]);
2401
- }
2354
+ if (this._scrollHeight !== scrollHeight) {
2355
+ this.refresh();
2356
+ }
2357
+
2358
+ if (scrollTop >= maxScroll) {
2359
+ var target = this._targets[this._targets.length - 1];
2360
+
2361
+ if (this._activeTarget !== target) {
2362
+ this._activate(target);
2402
2363
  }
2364
+ return;
2403
2365
  }
2404
- }, {
2405
- key: '_activate',
2406
- value: function _activate(target) {
2407
- this._activeTarget = target;
2408
2366
 
2367
+ if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) {
2368
+ this._activeTarget = null;
2409
2369
  this._clear();
2370
+ return;
2371
+ }
2410
2372
 
2411
- var queries = this._selector.split(',');
2412
- queries = queries.map(function (selector) {
2413
- return selector + '[data-target="' + target + '"],' + (selector + '[href="' + target + '"]');
2414
- });
2415
-
2416
- var $link = $(queries.join(','));
2373
+ for (var i = this._offsets.length; i--;) {
2374
+ var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (this._offsets[i + 1] === undefined || scrollTop < this._offsets[i + 1]);
2417
2375
 
2418
- if ($link.hasClass(ClassName.DROPDOWN_ITEM)) {
2419
- $link.closest(Selector.DROPDOWN).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE);
2420
- $link.addClass(ClassName.ACTIVE);
2421
- } else {
2422
- // todo (fat) this is kinda sus…
2423
- // recursively add actives to tested nav-links
2424
- $link.parents(Selector.LI).find(Selector.NAV_LINKS).addClass(ClassName.ACTIVE);
2376
+ if (isActiveTarget) {
2377
+ this._activate(this._targets[i]);
2425
2378
  }
2426
-
2427
- $(this._scrollElement).trigger(Event.ACTIVATE, {
2428
- relatedTarget: target
2429
- });
2430
2379
  }
2431
- }, {
2432
- key: '_clear',
2433
- value: function _clear() {
2434
- $(this._selector).filter(Selector.ACTIVE).removeClass(ClassName.ACTIVE);
2380
+ };
2381
+
2382
+ ScrollSpy.prototype._activate = function _activate(target) {
2383
+ this._activeTarget = target;
2384
+
2385
+ this._clear();
2386
+
2387
+ var queries = this._selector.split(',');
2388
+ queries = queries.map(function (selector) {
2389
+ return selector + '[data-target="' + target + '"],' + (selector + '[href="' + target + '"]');
2390
+ });
2391
+
2392
+ var $link = $(queries.join(','));
2393
+
2394
+ if ($link.hasClass(ClassName.DROPDOWN_ITEM)) {
2395
+ $link.closest(Selector.DROPDOWN).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE);
2396
+ $link.addClass(ClassName.ACTIVE);
2397
+ } else {
2398
+ // todo (fat) this is kinda sus...
2399
+ // recursively add actives to tested nav-links
2400
+ $link.parents(Selector.LI).find('> ' + Selector.NAV_LINKS).addClass(ClassName.ACTIVE);
2435
2401
  }
2436
2402
 
2437
- // static
2403
+ $(this._scrollElement).trigger(Event.ACTIVATE, {
2404
+ relatedTarget: target
2405
+ });
2406
+ };
2407
+
2408
+ ScrollSpy.prototype._clear = function _clear() {
2409
+ $(this._selector).filter(Selector.ACTIVE).removeClass(ClassName.ACTIVE);
2410
+ };
2438
2411
 
2439
- }], [{
2440
- key: '_jQueryInterface',
2441
- value: function _jQueryInterface(config) {
2442
- return this.each(function () {
2443
- var data = $(this).data(DATA_KEY);
2444
- var _config = typeof config === 'object' && config || null;
2412
+ // static
2445
2413
 
2446
- if (!data) {
2447
- data = new ScrollSpy(this, _config);
2448
- $(this).data(DATA_KEY, data);
2449
- }
2414
+ ScrollSpy._jQueryInterface = function _jQueryInterface(config) {
2415
+ return this.each(function () {
2416
+ var data = $(this).data(DATA_KEY);
2417
+ var _config = (typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object' && config;
2450
2418
 
2451
- if (typeof config === 'string') {
2452
- if (data[config] === undefined) {
2453
- throw new Error('No method named "' + config + '"');
2454
- }
2455
- data[config]();
2419
+ if (!data) {
2420
+ data = new ScrollSpy(this, _config);
2421
+ $(this).data(DATA_KEY, data);
2422
+ }
2423
+
2424
+ if (typeof config === 'string') {
2425
+ if (data[config] === undefined) {
2426
+ throw new Error('No method named "' + config + '"');
2456
2427
  }
2457
- });
2458
- }
2459
- }, {
2428
+ data[config]();
2429
+ }
2430
+ });
2431
+ };
2432
+
2433
+ _createClass(ScrollSpy, null, [{
2460
2434
  key: 'VERSION',
2461
2435
  get: function get() {
2462
2436
  return VERSION;
@@ -2469,7 +2443,13 @@ var ScrollSpy = (function ($) {
2469
2443
  }]);
2470
2444
 
2471
2445
  return ScrollSpy;
2472
- })();
2446
+ }();
2447
+
2448
+ /**
2449
+ * ------------------------------------------------------------------------
2450
+ * Data Api implementation
2451
+ * ------------------------------------------------------------------------
2452
+ */
2473
2453
 
2474
2454
  $(window).on(Event.LOAD_DATA_API, function () {
2475
2455
  var scrollSpys = $.makeArray($(Selector.DATA_SPY));
@@ -2494,16 +2474,16 @@ var ScrollSpy = (function ($) {
2494
2474
  };
2495
2475
 
2496
2476
  return ScrollSpy;
2497
- })(jQuery);
2477
+ }(jQuery);
2498
2478
 
2499
2479
  /**
2500
2480
  * --------------------------------------------------------------------------
2501
- * Bootstrap (v4.0.0-alpha.2): tab.js
2481
+ * Bootstrap (v4.0.0-alpha.6): tab.js
2502
2482
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
2503
2483
  * --------------------------------------------------------------------------
2504
2484
  */
2505
2485
 
2506
- var Tab = (function ($) {
2486
+ var Tab = function ($) {
2507
2487
 
2508
2488
  /**
2509
2489
  * ------------------------------------------------------------------------
@@ -2512,7 +2492,7 @@ var Tab = (function ($) {
2512
2492
  */
2513
2493
 
2514
2494
  var NAME = 'tab';
2515
- var VERSION = '4.0.0-alpha';
2495
+ var VERSION = '4.0.0-alpha.6';
2516
2496
  var DATA_KEY = 'bs.tab';
2517
2497
  var EVENT_KEY = '.' + DATA_KEY;
2518
2498
  var DATA_API_KEY = '.data-api';
@@ -2530,15 +2510,16 @@ var Tab = (function ($) {
2530
2510
  var ClassName = {
2531
2511
  DROPDOWN_MENU: 'dropdown-menu',
2532
2512
  ACTIVE: 'active',
2513
+ DISABLED: 'disabled',
2533
2514
  FADE: 'fade',
2534
- IN: 'in'
2515
+ SHOW: 'show'
2535
2516
  };
2536
2517
 
2537
2518
  var Selector = {
2538
2519
  A: 'a',
2539
2520
  LI: 'li',
2540
2521
  DROPDOWN: '.dropdown',
2541
- UL: 'ul:not(.dropdown-menu)',
2522
+ LIST: 'ul:not(.dropdown-menu), ol:not(.dropdown-menu), nav:not(.dropdown-menu)',
2542
2523
  FADE_CHILD: '> .nav-item .fade, > .fade',
2543
2524
  ACTIVE: '.active',
2544
2525
  ACTIVE_CHILD: '> .nav-item > .active, > .active',
@@ -2553,176 +2534,166 @@ var Tab = (function ($) {
2553
2534
  * ------------------------------------------------------------------------
2554
2535
  */
2555
2536
 
2556
- var Tab = (function () {
2537
+ var Tab = function () {
2557
2538
  function Tab(element) {
2558
2539
  _classCallCheck(this, Tab);
2559
2540
 
2560
2541
  this._element = element;
2561
2542
  }
2562
2543
 
2563
- /**
2564
- * ------------------------------------------------------------------------
2565
- * Data Api implementation
2566
- * ------------------------------------------------------------------------
2567
- */
2568
-
2569
2544
  // getters
2570
2545
 
2571
- _createClass(Tab, [{
2572
- key: 'show',
2546
+ // public
2547
+
2548
+ Tab.prototype.show = function show() {
2549
+ var _this20 = this;
2550
+
2551
+ if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $(this._element).hasClass(ClassName.ACTIVE) || $(this._element).hasClass(ClassName.DISABLED)) {
2552
+ return;
2553
+ }
2573
2554
 
2574
- // public
2555
+ var target = void 0;
2556
+ var previous = void 0;
2557
+ var listElement = $(this._element).closest(Selector.LIST)[0];
2558
+ var selector = Util.getSelectorFromElement(this._element);
2575
2559
 
2576
- value: function show() {
2577
- var _this15 = this;
2560
+ if (listElement) {
2561
+ previous = $.makeArray($(listElement).find(Selector.ACTIVE));
2562
+ previous = previous[previous.length - 1];
2563
+ }
2578
2564
 
2579
- if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $(this._element).hasClass(ClassName.ACTIVE)) {
2580
- return;
2581
- }
2565
+ var hideEvent = $.Event(Event.HIDE, {
2566
+ relatedTarget: this._element
2567
+ });
2582
2568
 
2583
- var target = undefined;
2584
- var previous = undefined;
2585
- var ulElement = $(this._element).closest(Selector.UL)[0];
2586
- var selector = Util.getSelectorFromElement(this._element);
2569
+ var showEvent = $.Event(Event.SHOW, {
2570
+ relatedTarget: previous
2571
+ });
2587
2572
 
2588
- if (ulElement) {
2589
- previous = $.makeArray($(ulElement).find(Selector.ACTIVE));
2590
- previous = previous[previous.length - 1];
2591
- }
2573
+ if (previous) {
2574
+ $(previous).trigger(hideEvent);
2575
+ }
2576
+
2577
+ $(this._element).trigger(showEvent);
2578
+
2579
+ if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) {
2580
+ return;
2581
+ }
2582
+
2583
+ if (selector) {
2584
+ target = $(selector)[0];
2585
+ }
2586
+
2587
+ this._activate(this._element, listElement);
2592
2588
 
2593
- var hideEvent = $.Event(Event.HIDE, {
2594
- relatedTarget: this._element
2589
+ var complete = function complete() {
2590
+ var hiddenEvent = $.Event(Event.HIDDEN, {
2591
+ relatedTarget: _this20._element
2595
2592
  });
2596
2593
 
2597
- var showEvent = $.Event(Event.SHOW, {
2594
+ var shownEvent = $.Event(Event.SHOWN, {
2598
2595
  relatedTarget: previous
2599
2596
  });
2600
2597
 
2601
- if (previous) {
2602
- $(previous).trigger(hideEvent);
2603
- }
2604
-
2605
- $(this._element).trigger(showEvent);
2598
+ $(previous).trigger(hiddenEvent);
2599
+ $(_this20._element).trigger(shownEvent);
2600
+ };
2606
2601
 
2607
- if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) {
2608
- return;
2609
- }
2602
+ if (target) {
2603
+ this._activate(target, target.parentNode, complete);
2604
+ } else {
2605
+ complete();
2606
+ }
2607
+ };
2610
2608
 
2611
- if (selector) {
2612
- target = $(selector)[0];
2613
- }
2609
+ Tab.prototype.dispose = function dispose() {
2610
+ $.removeClass(this._element, DATA_KEY);
2611
+ this._element = null;
2612
+ };
2614
2613
 
2615
- this._activate(this._element, ulElement);
2614
+ // private
2616
2615
 
2617
- var complete = function complete() {
2618
- var hiddenEvent = $.Event(Event.HIDDEN, {
2619
- relatedTarget: _this15._element
2620
- });
2616
+ Tab.prototype._activate = function _activate(element, container, callback) {
2617
+ var _this21 = this;
2621
2618
 
2622
- var shownEvent = $.Event(Event.SHOWN, {
2623
- relatedTarget: previous
2624
- });
2619
+ var active = $(container).find(Selector.ACTIVE_CHILD)[0];
2620
+ var isTransitioning = callback && Util.supportsTransitionEnd() && (active && $(active).hasClass(ClassName.FADE) || Boolean($(container).find(Selector.FADE_CHILD)[0]));
2625
2621
 
2626
- $(previous).trigger(hiddenEvent);
2627
- $(_this15._element).trigger(shownEvent);
2628
- };
2622
+ var complete = function complete() {
2623
+ return _this21._transitionComplete(element, active, isTransitioning, callback);
2624
+ };
2629
2625
 
2630
- if (target) {
2631
- this._activate(target, target.parentNode, complete);
2632
- } else {
2633
- complete();
2634
- }
2635
- }
2636
- }, {
2637
- key: 'dispose',
2638
- value: function dispose() {
2639
- $.removeClass(this._element, DATA_KEY);
2640
- this._element = null;
2626
+ if (active && isTransitioning) {
2627
+ $(active).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
2628
+ } else {
2629
+ complete();
2641
2630
  }
2642
2631
 
2643
- // private
2632
+ if (active) {
2633
+ $(active).removeClass(ClassName.SHOW);
2634
+ }
2635
+ };
2644
2636
 
2645
- }, {
2646
- key: '_activate',
2647
- value: function _activate(element, container, callback) {
2648
- var active = $(container).find(Selector.ACTIVE_CHILD)[0];
2649
- var isTransitioning = callback && Util.supportsTransitionEnd() && (active && $(active).hasClass(ClassName.FADE) || Boolean($(container).find(Selector.FADE_CHILD)[0]));
2637
+ Tab.prototype._transitionComplete = function _transitionComplete(element, active, isTransitioning, callback) {
2638
+ if (active) {
2639
+ $(active).removeClass(ClassName.ACTIVE);
2650
2640
 
2651
- var complete = $.proxy(this._transitionComplete, this, element, active, isTransitioning, callback);
2641
+ var dropdownChild = $(active.parentNode).find(Selector.DROPDOWN_ACTIVE_CHILD)[0];
2652
2642
 
2653
- if (active && isTransitioning) {
2654
- $(active).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
2655
- } else {
2656
- complete();
2643
+ if (dropdownChild) {
2644
+ $(dropdownChild).removeClass(ClassName.ACTIVE);
2657
2645
  }
2658
2646
 
2659
- if (active) {
2660
- $(active).removeClass(ClassName.IN);
2661
- }
2647
+ active.setAttribute('aria-expanded', false);
2662
2648
  }
2663
- }, {
2664
- key: '_transitionComplete',
2665
- value: function _transitionComplete(element, active, isTransitioning, callback) {
2666
- if (active) {
2667
- $(active).removeClass(ClassName.ACTIVE);
2668
2649
 
2669
- var dropdownChild = $(active).find(Selector.DROPDOWN_ACTIVE_CHILD)[0];
2650
+ $(element).addClass(ClassName.ACTIVE);
2651
+ element.setAttribute('aria-expanded', true);
2670
2652
 
2671
- if (dropdownChild) {
2672
- $(dropdownChild).removeClass(ClassName.ACTIVE);
2673
- }
2653
+ if (isTransitioning) {
2654
+ Util.reflow(element);
2655
+ $(element).addClass(ClassName.SHOW);
2656
+ } else {
2657
+ $(element).removeClass(ClassName.FADE);
2658
+ }
2674
2659
 
2675
- active.setAttribute('aria-expanded', false);
2660
+ if (element.parentNode && $(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)) {
2661
+
2662
+ var dropdownElement = $(element).closest(Selector.DROPDOWN)[0];
2663
+ if (dropdownElement) {
2664
+ $(dropdownElement).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE);
2676
2665
  }
2677
2666
 
2678
- $(element).addClass(ClassName.ACTIVE);
2679
2667
  element.setAttribute('aria-expanded', true);
2668
+ }
2680
2669
 
2681
- if (isTransitioning) {
2682
- Util.reflow(element);
2683
- $(element).addClass(ClassName.IN);
2684
- } else {
2685
- $(element).removeClass(ClassName.FADE);
2686
- }
2687
-
2688
- if (element.parentNode && $(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)) {
2670
+ if (callback) {
2671
+ callback();
2672
+ }
2673
+ };
2689
2674
 
2690
- var dropdownElement = $(element).closest(Selector.DROPDOWN)[0];
2691
- if (dropdownElement) {
2692
- $(dropdownElement).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE);
2693
- }
2675
+ // static
2694
2676
 
2695
- element.setAttribute('aria-expanded', true);
2696
- }
2677
+ Tab._jQueryInterface = function _jQueryInterface(config) {
2678
+ return this.each(function () {
2679
+ var $this = $(this);
2680
+ var data = $this.data(DATA_KEY);
2697
2681
 
2698
- if (callback) {
2699
- callback();
2682
+ if (!data) {
2683
+ data = new Tab(this);
2684
+ $this.data(DATA_KEY, data);
2700
2685
  }
2701
- }
2702
-
2703
- // static
2704
-
2705
- }], [{
2706
- key: '_jQueryInterface',
2707
- value: function _jQueryInterface(config) {
2708
- return this.each(function () {
2709
- var $this = $(this);
2710
- var data = $this.data(DATA_KEY);
2711
2686
 
2712
- if (!data) {
2713
- data = data = new Tab(this);
2714
- $this.data(DATA_KEY, data);
2687
+ if (typeof config === 'string') {
2688
+ if (data[config] === undefined) {
2689
+ throw new Error('No method named "' + config + '"');
2715
2690
  }
2691
+ data[config]();
2692
+ }
2693
+ });
2694
+ };
2716
2695
 
2717
- if (typeof config === 'string') {
2718
- if (data[config] === undefined) {
2719
- throw new Error('No method named "' + config + '"');
2720
- }
2721
- data[config]();
2722
- }
2723
- });
2724
- }
2725
- }, {
2696
+ _createClass(Tab, null, [{
2726
2697
  key: 'VERSION',
2727
2698
  get: function get() {
2728
2699
  return VERSION;
@@ -2730,7 +2701,13 @@ var Tab = (function ($) {
2730
2701
  }]);
2731
2702
 
2732
2703
  return Tab;
2733
- })();
2704
+ }();
2705
+
2706
+ /**
2707
+ * ------------------------------------------------------------------------
2708
+ * Data Api implementation
2709
+ * ------------------------------------------------------------------------
2710
+ */
2734
2711
 
2735
2712
  $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
2736
2713
  event.preventDefault();
@@ -2751,25 +2728,25 @@ var Tab = (function ($) {
2751
2728
  };
2752
2729
 
2753
2730
  return Tab;
2754
- })(jQuery);
2731
+ }(jQuery);
2755
2732
 
2756
2733
  /* global Tether */
2757
2734
 
2758
2735
  /**
2759
2736
  * --------------------------------------------------------------------------
2760
- * Bootstrap (v4.0.0-alpha.2): tooltip.js
2737
+ * Bootstrap (v4.0.0-alpha.6): tooltip.js
2761
2738
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
2762
2739
  * --------------------------------------------------------------------------
2763
2740
  */
2764
2741
 
2765
- var Tooltip = (function ($) {
2742
+ var Tooltip = function ($) {
2766
2743
 
2767
2744
  /**
2768
2745
  * Check for Tether dependency
2769
- * Tether - http://github.hubspot.com/tether/
2746
+ * Tether - http://tether.io/
2770
2747
  */
2771
- if (window.Tether === undefined) {
2772
- throw new Error('Bootstrap tooltips require Tether (http://github.hubspot.com/tether/)');
2748
+ if (typeof Tether === 'undefined') {
2749
+ throw new Error('Bootstrap tooltips require Tether (http://tether.io/)');
2773
2750
  }
2774
2751
 
2775
2752
  /**
@@ -2779,7 +2756,7 @@ var Tooltip = (function ($) {
2779
2756
  */
2780
2757
 
2781
2758
  var NAME = 'tooltip';
2782
- var VERSION = '4.0.0-alpha';
2759
+ var VERSION = '4.0.0-alpha.6';
2783
2760
  var DATA_KEY = 'bs.tooltip';
2784
2761
  var EVENT_KEY = '.' + DATA_KEY;
2785
2762
  var JQUERY_NO_CONFLICT = $.fn[NAME];
@@ -2788,7 +2765,7 @@ var Tooltip = (function ($) {
2788
2765
 
2789
2766
  var Default = {
2790
2767
  animation: true,
2791
- template: '<div class="tooltip" role="tooltip">' + '<div class="tooltip-arrow"></div>' + '<div class="tooltip-inner"></div></div>',
2768
+ template: '<div class="tooltip" role="tooltip">' + '<div class="tooltip-inner"></div></div>',
2792
2769
  trigger: 'hover focus',
2793
2770
  title: '',
2794
2771
  delay: 0,
@@ -2796,7 +2773,8 @@ var Tooltip = (function ($) {
2796
2773
  selector: false,
2797
2774
  placement: 'top',
2798
2775
  offset: '0 0',
2799
- constraints: []
2776
+ constraints: [],
2777
+ container: false
2800
2778
  };
2801
2779
 
2802
2780
  var DefaultType = {
@@ -2809,7 +2787,8 @@ var Tooltip = (function ($) {
2809
2787
  selector: '(string|boolean)',
2810
2788
  placement: '(string|function)',
2811
2789
  offset: 'string',
2812
- constraints: 'array'
2790
+ constraints: 'array',
2791
+ container: '(string|element|boolean)'
2813
2792
  };
2814
2793
 
2815
2794
  var AttachmentMap = {
@@ -2820,7 +2799,7 @@ var Tooltip = (function ($) {
2820
2799
  };
2821
2800
 
2822
2801
  var HoverState = {
2823
- IN: 'in',
2802
+ SHOW: 'show',
2824
2803
  OUT: 'out'
2825
2804
  };
2826
2805
 
@@ -2839,7 +2818,7 @@ var Tooltip = (function ($) {
2839
2818
 
2840
2819
  var ClassName = {
2841
2820
  FADE: 'fade',
2842
- IN: 'in'
2821
+ SHOW: 'show'
2843
2822
  };
2844
2823
 
2845
2824
  var Selector = {
@@ -2865,7 +2844,7 @@ var Tooltip = (function ($) {
2865
2844
  * ------------------------------------------------------------------------
2866
2845
  */
2867
2846
 
2868
- var Tooltip = (function () {
2847
+ var Tooltip = function () {
2869
2848
  function Tooltip(element, config) {
2870
2849
  _classCallCheck(this, Tooltip);
2871
2850
 
@@ -2874,6 +2853,7 @@ var Tooltip = (function ($) {
2874
2853
  this._timeout = 0;
2875
2854
  this._hoverState = '';
2876
2855
  this._activeTrigger = {};
2856
+ this._isTransitioning = false;
2877
2857
  this._tether = null;
2878
2858
 
2879
2859
  // protected
@@ -2884,439 +2864,436 @@ var Tooltip = (function ($) {
2884
2864
  this._setListeners();
2885
2865
  }
2886
2866
 
2887
- /**
2888
- * ------------------------------------------------------------------------
2889
- * jQuery
2890
- * ------------------------------------------------------------------------
2891
- */
2892
-
2893
2867
  // getters
2894
2868
 
2895
- _createClass(Tooltip, [{
2896
- key: 'enable',
2869
+ // public
2897
2870
 
2898
- // public
2871
+ Tooltip.prototype.enable = function enable() {
2872
+ this._isEnabled = true;
2873
+ };
2899
2874
 
2900
- value: function enable() {
2901
- this._isEnabled = true;
2902
- }
2903
- }, {
2904
- key: 'disable',
2905
- value: function disable() {
2906
- this._isEnabled = false;
2907
- }
2908
- }, {
2909
- key: 'toggleEnabled',
2910
- value: function toggleEnabled() {
2911
- this._isEnabled = !this._isEnabled;
2912
- }
2913
- }, {
2914
- key: 'toggle',
2915
- value: function toggle(event) {
2916
- if (event) {
2917
- var dataKey = this.constructor.DATA_KEY;
2918
- var context = $(event.currentTarget).data(dataKey);
2875
+ Tooltip.prototype.disable = function disable() {
2876
+ this._isEnabled = false;
2877
+ };
2919
2878
 
2920
- if (!context) {
2921
- context = new this.constructor(event.currentTarget, this._getDelegateConfig());
2922
- $(event.currentTarget).data(dataKey, context);
2923
- }
2879
+ Tooltip.prototype.toggleEnabled = function toggleEnabled() {
2880
+ this._isEnabled = !this._isEnabled;
2881
+ };
2924
2882
 
2925
- context._activeTrigger.click = !context._activeTrigger.click;
2883
+ Tooltip.prototype.toggle = function toggle(event) {
2884
+ if (event) {
2885
+ var dataKey = this.constructor.DATA_KEY;
2886
+ var context = $(event.currentTarget).data(dataKey);
2926
2887
 
2927
- if (context._isWithActiveTrigger()) {
2928
- context._enter(null, context);
2929
- } else {
2930
- context._leave(null, context);
2931
- }
2932
- } else {
2888
+ if (!context) {
2889
+ context = new this.constructor(event.currentTarget, this._getDelegateConfig());
2890
+ $(event.currentTarget).data(dataKey, context);
2891
+ }
2933
2892
 
2934
- if ($(this.getTipElement()).hasClass(ClassName.IN)) {
2935
- this._leave(null, this);
2936
- return;
2937
- }
2893
+ context._activeTrigger.click = !context._activeTrigger.click;
2938
2894
 
2939
- this._enter(null, this);
2895
+ if (context._isWithActiveTrigger()) {
2896
+ context._enter(null, context);
2897
+ } else {
2898
+ context._leave(null, context);
2940
2899
  }
2941
- }
2942
- }, {
2943
- key: 'dispose',
2944
- value: function dispose() {
2945
- clearTimeout(this._timeout);
2900
+ } else {
2946
2901
 
2947
- this.cleanupTether();
2902
+ if ($(this.getTipElement()).hasClass(ClassName.SHOW)) {
2903
+ this._leave(null, this);
2904
+ return;
2905
+ }
2948
2906
 
2949
- $.removeData(this.element, this.constructor.DATA_KEY);
2907
+ this._enter(null, this);
2908
+ }
2909
+ };
2950
2910
 
2951
- $(this.element).off(this.constructor.EVENT_KEY);
2911
+ Tooltip.prototype.dispose = function dispose() {
2912
+ clearTimeout(this._timeout);
2952
2913
 
2953
- if (this.tip) {
2954
- $(this.tip).remove();
2955
- }
2914
+ this.cleanupTether();
2956
2915
 
2957
- this._isEnabled = null;
2958
- this._timeout = null;
2959
- this._hoverState = null;
2960
- this._activeTrigger = null;
2961
- this._tether = null;
2916
+ $.removeData(this.element, this.constructor.DATA_KEY);
2962
2917
 
2963
- this.element = null;
2964
- this.config = null;
2965
- this.tip = null;
2966
- }
2967
- }, {
2968
- key: 'show',
2969
- value: function show() {
2970
- var _this16 = this;
2918
+ $(this.element).off(this.constructor.EVENT_KEY);
2919
+ $(this.element).closest('.modal').off('hide.bs.modal');
2971
2920
 
2972
- var showEvent = $.Event(this.constructor.Event.SHOW);
2921
+ if (this.tip) {
2922
+ $(this.tip).remove();
2923
+ }
2973
2924
 
2974
- if (this.isWithContent() && this._isEnabled) {
2975
- $(this.element).trigger(showEvent);
2925
+ this._isEnabled = null;
2926
+ this._timeout = null;
2927
+ this._hoverState = null;
2928
+ this._activeTrigger = null;
2929
+ this._tether = null;
2976
2930
 
2977
- var isInTheDom = $.contains(this.element.ownerDocument.documentElement, this.element);
2931
+ this.element = null;
2932
+ this.config = null;
2933
+ this.tip = null;
2934
+ };
2978
2935
 
2979
- if (showEvent.isDefaultPrevented() || !isInTheDom) {
2980
- return;
2981
- }
2936
+ Tooltip.prototype.show = function show() {
2937
+ var _this22 = this;
2982
2938
 
2983
- var tip = this.getTipElement();
2984
- var tipId = Util.getUID(this.constructor.NAME);
2939
+ if ($(this.element).css('display') === 'none') {
2940
+ throw new Error('Please use show on visible elements');
2941
+ }
2985
2942
 
2986
- tip.setAttribute('id', tipId);
2987
- this.element.setAttribute('aria-describedby', tipId);
2943
+ var showEvent = $.Event(this.constructor.Event.SHOW);
2944
+ if (this.isWithContent() && this._isEnabled) {
2945
+ if (this._isTransitioning) {
2946
+ throw new Error('Tooltip is transitioning');
2947
+ }
2948
+ $(this.element).trigger(showEvent);
2988
2949
 
2989
- this.setContent();
2950
+ var isInTheDom = $.contains(this.element.ownerDocument.documentElement, this.element);
2990
2951
 
2991
- if (this.config.animation) {
2992
- $(tip).addClass(ClassName.FADE);
2993
- }
2952
+ if (showEvent.isDefaultPrevented() || !isInTheDom) {
2953
+ return;
2954
+ }
2994
2955
 
2995
- var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;
2956
+ var tip = this.getTipElement();
2957
+ var tipId = Util.getUID(this.constructor.NAME);
2996
2958
 
2997
- var attachment = this._getAttachment(placement);
2959
+ tip.setAttribute('id', tipId);
2960
+ this.element.setAttribute('aria-describedby', tipId);
2998
2961
 
2999
- $(tip).data(this.constructor.DATA_KEY, this).appendTo(document.body);
2962
+ this.setContent();
3000
2963
 
3001
- $(this.element).trigger(this.constructor.Event.INSERTED);
2964
+ if (this.config.animation) {
2965
+ $(tip).addClass(ClassName.FADE);
2966
+ }
3002
2967
 
3003
- this._tether = new Tether({
3004
- attachment: attachment,
3005
- element: tip,
3006
- target: this.element,
3007
- classes: TetherClass,
3008
- classPrefix: CLASS_PREFIX,
3009
- offset: this.config.offset,
3010
- constraints: this.config.constraints,
3011
- addTargetClasses: false
3012
- });
2968
+ var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;
3013
2969
 
3014
- Util.reflow(tip);
3015
- this._tether.position();
2970
+ var attachment = this._getAttachment(placement);
3016
2971
 
3017
- $(tip).addClass(ClassName.IN);
2972
+ var container = this.config.container === false ? document.body : $(this.config.container);
3018
2973
 
3019
- var complete = function complete() {
3020
- var prevHoverState = _this16._hoverState;
3021
- _this16._hoverState = null;
2974
+ $(tip).data(this.constructor.DATA_KEY, this).appendTo(container);
3022
2975
 
3023
- $(_this16.element).trigger(_this16.constructor.Event.SHOWN);
2976
+ $(this.element).trigger(this.constructor.Event.INSERTED);
3024
2977
 
3025
- if (prevHoverState === HoverState.OUT) {
3026
- _this16._leave(null, _this16);
3027
- }
3028
- };
2978
+ this._tether = new Tether({
2979
+ attachment: attachment,
2980
+ element: tip,
2981
+ target: this.element,
2982
+ classes: TetherClass,
2983
+ classPrefix: CLASS_PREFIX,
2984
+ offset: this.config.offset,
2985
+ constraints: this.config.constraints,
2986
+ addTargetClasses: false
2987
+ });
3029
2988
 
3030
- if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) {
3031
- $(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(Tooltip._TRANSITION_DURATION);
3032
- return;
3033
- }
2989
+ Util.reflow(tip);
2990
+ this._tether.position();
3034
2991
 
3035
- complete();
3036
- }
3037
- }
3038
- }, {
3039
- key: 'hide',
3040
- value: function hide(callback) {
3041
- var _this17 = this;
2992
+ $(tip).addClass(ClassName.SHOW);
3042
2993
 
3043
- var tip = this.getTipElement();
3044
- var hideEvent = $.Event(this.constructor.Event.HIDE);
3045
2994
  var complete = function complete() {
3046
- if (_this17._hoverState !== HoverState.IN && tip.parentNode) {
3047
- tip.parentNode.removeChild(tip);
3048
- }
2995
+ var prevHoverState = _this22._hoverState;
2996
+ _this22._hoverState = null;
2997
+ _this22._isTransitioning = false;
3049
2998
 
3050
- _this17.element.removeAttribute('aria-describedby');
3051
- $(_this17.element).trigger(_this17.constructor.Event.HIDDEN);
3052
- _this17.cleanupTether();
2999
+ $(_this22.element).trigger(_this22.constructor.Event.SHOWN);
3053
3000
 
3054
- if (callback) {
3055
- callback();
3001
+ if (prevHoverState === HoverState.OUT) {
3002
+ _this22._leave(null, _this22);
3056
3003
  }
3057
3004
  };
3058
3005
 
3059
- $(this.element).trigger(hideEvent);
3060
-
3061
- if (hideEvent.isDefaultPrevented()) {
3006
+ if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) {
3007
+ this._isTransitioning = true;
3008
+ $(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(Tooltip._TRANSITION_DURATION);
3062
3009
  return;
3063
3010
  }
3064
3011
 
3065
- $(tip).removeClass(ClassName.IN);
3012
+ complete();
3013
+ }
3014
+ };
3066
3015
 
3067
- if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) {
3016
+ Tooltip.prototype.hide = function hide(callback) {
3017
+ var _this23 = this;
3068
3018
 
3069
- $(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
3070
- } else {
3071
- complete();
3019
+ var tip = this.getTipElement();
3020
+ var hideEvent = $.Event(this.constructor.Event.HIDE);
3021
+ if (this._isTransitioning) {
3022
+ throw new Error('Tooltip is transitioning');
3023
+ }
3024
+ var complete = function complete() {
3025
+ if (_this23._hoverState !== HoverState.SHOW && tip.parentNode) {
3026
+ tip.parentNode.removeChild(tip);
3072
3027
  }
3073
3028
 
3074
- this._hoverState = '';
3075
- }
3029
+ _this23.element.removeAttribute('aria-describedby');
3030
+ $(_this23.element).trigger(_this23.constructor.Event.HIDDEN);
3031
+ _this23._isTransitioning = false;
3032
+ _this23.cleanupTether();
3076
3033
 
3077
- // protected
3034
+ if (callback) {
3035
+ callback();
3036
+ }
3037
+ };
3078
3038
 
3079
- }, {
3080
- key: 'isWithContent',
3081
- value: function isWithContent() {
3082
- return Boolean(this.getTitle());
3083
- }
3084
- }, {
3085
- key: 'getTipElement',
3086
- value: function getTipElement() {
3087
- return this.tip = this.tip || $(this.config.template)[0];
3039
+ $(this.element).trigger(hideEvent);
3040
+
3041
+ if (hideEvent.isDefaultPrevented()) {
3042
+ return;
3088
3043
  }
3089
- }, {
3090
- key: 'setContent',
3091
- value: function setContent() {
3092
- var $tip = $(this.getTipElement());
3093
3044
 
3094
- this.setElementContent($tip.find(Selector.TOOLTIP_INNER), this.getTitle());
3045
+ $(tip).removeClass(ClassName.SHOW);
3095
3046
 
3096
- $tip.removeClass(ClassName.FADE).removeClass(ClassName.IN);
3047
+ this._activeTrigger[Trigger.CLICK] = false;
3048
+ this._activeTrigger[Trigger.FOCUS] = false;
3049
+ this._activeTrigger[Trigger.HOVER] = false;
3097
3050
 
3098
- this.cleanupTether();
3051
+ if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) {
3052
+ this._isTransitioning = true;
3053
+ $(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
3054
+ } else {
3055
+ complete();
3099
3056
  }
3100
- }, {
3101
- key: 'setElementContent',
3102
- value: function setElementContent($element, content) {
3103
- var html = this.config.html;
3104
- if (typeof content === 'object' && (content.nodeType || content.jquery)) {
3105
- // content is a DOM node or a jQuery
3106
- if (html) {
3107
- if (!$(content).parent().is($element)) {
3108
- $element.empty().append(content);
3109
- }
3110
- } else {
3111
- $element.text($(content).text());
3057
+
3058
+ this._hoverState = '';
3059
+ };
3060
+
3061
+ // protected
3062
+
3063
+ Tooltip.prototype.isWithContent = function isWithContent() {
3064
+ return Boolean(this.getTitle());
3065
+ };
3066
+
3067
+ Tooltip.prototype.getTipElement = function getTipElement() {
3068
+ return this.tip = this.tip || $(this.config.template)[0];
3069
+ };
3070
+
3071
+ Tooltip.prototype.setContent = function setContent() {
3072
+ var $tip = $(this.getTipElement());
3073
+
3074
+ this.setElementContent($tip.find(Selector.TOOLTIP_INNER), this.getTitle());
3075
+
3076
+ $tip.removeClass(ClassName.FADE + ' ' + ClassName.SHOW);
3077
+
3078
+ this.cleanupTether();
3079
+ };
3080
+
3081
+ Tooltip.prototype.setElementContent = function setElementContent($element, content) {
3082
+ var html = this.config.html;
3083
+ if ((typeof content === 'undefined' ? 'undefined' : _typeof(content)) === 'object' && (content.nodeType || content.jquery)) {
3084
+ // content is a DOM node or a jQuery
3085
+ if (html) {
3086
+ if (!$(content).parent().is($element)) {
3087
+ $element.empty().append(content);
3112
3088
  }
3113
3089
  } else {
3114
- $element[html ? 'html' : 'text'](content);
3090
+ $element.text($(content).text());
3115
3091
  }
3092
+ } else {
3093
+ $element[html ? 'html' : 'text'](content);
3116
3094
  }
3117
- }, {
3118
- key: 'getTitle',
3119
- value: function getTitle() {
3120
- var title = this.element.getAttribute('data-original-title');
3095
+ };
3121
3096
 
3122
- if (!title) {
3123
- title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title;
3124
- }
3097
+ Tooltip.prototype.getTitle = function getTitle() {
3098
+ var title = this.element.getAttribute('data-original-title');
3125
3099
 
3126
- return title;
3127
- }
3128
- }, {
3129
- key: 'cleanupTether',
3130
- value: function cleanupTether() {
3131
- if (this._tether) {
3132
- this._tether.destroy();
3133
- }
3100
+ if (!title) {
3101
+ title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title;
3134
3102
  }
3135
3103
 
3136
- // private
3104
+ return title;
3105
+ };
3137
3106
 
3138
- }, {
3139
- key: '_getAttachment',
3140
- value: function _getAttachment(placement) {
3141
- return AttachmentMap[placement.toUpperCase()];
3107
+ Tooltip.prototype.cleanupTether = function cleanupTether() {
3108
+ if (this._tether) {
3109
+ this._tether.destroy();
3142
3110
  }
3143
- }, {
3144
- key: '_setListeners',
3145
- value: function _setListeners() {
3146
- var _this18 = this;
3111
+ };
3147
3112
 
3148
- var triggers = this.config.trigger.split(' ');
3113
+ // private
3149
3114
 
3150
- triggers.forEach(function (trigger) {
3151
- if (trigger === 'click') {
3152
- $(_this18.element).on(_this18.constructor.Event.CLICK, _this18.config.selector, $.proxy(_this18.toggle, _this18));
3153
- } else if (trigger !== Trigger.MANUAL) {
3154
- var eventIn = trigger === Trigger.HOVER ? _this18.constructor.Event.MOUSEENTER : _this18.constructor.Event.FOCUSIN;
3155
- var eventOut = trigger === Trigger.HOVER ? _this18.constructor.Event.MOUSELEAVE : _this18.constructor.Event.FOCUSOUT;
3115
+ Tooltip.prototype._getAttachment = function _getAttachment(placement) {
3116
+ return AttachmentMap[placement.toUpperCase()];
3117
+ };
3156
3118
 
3157
- $(_this18.element).on(eventIn, _this18.config.selector, $.proxy(_this18._enter, _this18)).on(eventOut, _this18.config.selector, $.proxy(_this18._leave, _this18));
3158
- }
3159
- });
3119
+ Tooltip.prototype._setListeners = function _setListeners() {
3120
+ var _this24 = this;
3160
3121
 
3161
- if (this.config.selector) {
3162
- this.config = $.extend({}, this.config, {
3163
- trigger: 'manual',
3164
- selector: ''
3122
+ var triggers = this.config.trigger.split(' ');
3123
+
3124
+ triggers.forEach(function (trigger) {
3125
+ if (trigger === 'click') {
3126
+ $(_this24.element).on(_this24.constructor.Event.CLICK, _this24.config.selector, function (event) {
3127
+ return _this24.toggle(event);
3128
+ });
3129
+ } else if (trigger !== Trigger.MANUAL) {
3130
+ var eventIn = trigger === Trigger.HOVER ? _this24.constructor.Event.MOUSEENTER : _this24.constructor.Event.FOCUSIN;
3131
+ var eventOut = trigger === Trigger.HOVER ? _this24.constructor.Event.MOUSELEAVE : _this24.constructor.Event.FOCUSOUT;
3132
+
3133
+ $(_this24.element).on(eventIn, _this24.config.selector, function (event) {
3134
+ return _this24._enter(event);
3135
+ }).on(eventOut, _this24.config.selector, function (event) {
3136
+ return _this24._leave(event);
3165
3137
  });
3166
- } else {
3167
- this._fixTitle();
3168
3138
  }
3139
+
3140
+ $(_this24.element).closest('.modal').on('hide.bs.modal', function () {
3141
+ return _this24.hide();
3142
+ });
3143
+ });
3144
+
3145
+ if (this.config.selector) {
3146
+ this.config = $.extend({}, this.config, {
3147
+ trigger: 'manual',
3148
+ selector: ''
3149
+ });
3150
+ } else {
3151
+ this._fixTitle();
3169
3152
  }
3170
- }, {
3171
- key: '_fixTitle',
3172
- value: function _fixTitle() {
3173
- var titleType = typeof this.element.getAttribute('data-original-title');
3174
- if (this.element.getAttribute('title') || titleType !== 'string') {
3175
- this.element.setAttribute('data-original-title', this.element.getAttribute('title') || '');
3176
- this.element.setAttribute('title', '');
3177
- }
3153
+ };
3154
+
3155
+ Tooltip.prototype._fixTitle = function _fixTitle() {
3156
+ var titleType = _typeof(this.element.getAttribute('data-original-title'));
3157
+ if (this.element.getAttribute('title') || titleType !== 'string') {
3158
+ this.element.setAttribute('data-original-title', this.element.getAttribute('title') || '');
3159
+ this.element.setAttribute('title', '');
3178
3160
  }
3179
- }, {
3180
- key: '_enter',
3181
- value: function _enter(event, context) {
3182
- var dataKey = this.constructor.DATA_KEY;
3161
+ };
3183
3162
 
3184
- context = context || $(event.currentTarget).data(dataKey);
3163
+ Tooltip.prototype._enter = function _enter(event, context) {
3164
+ var dataKey = this.constructor.DATA_KEY;
3185
3165
 
3186
- if (!context) {
3187
- context = new this.constructor(event.currentTarget, this._getDelegateConfig());
3188
- $(event.currentTarget).data(dataKey, context);
3189
- }
3166
+ context = context || $(event.currentTarget).data(dataKey);
3190
3167
 
3191
- if (event) {
3192
- context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true;
3193
- }
3168
+ if (!context) {
3169
+ context = new this.constructor(event.currentTarget, this._getDelegateConfig());
3170
+ $(event.currentTarget).data(dataKey, context);
3171
+ }
3194
3172
 
3195
- if ($(context.getTipElement()).hasClass(ClassName.IN) || context._hoverState === HoverState.IN) {
3196
- context._hoverState = HoverState.IN;
3197
- return;
3198
- }
3173
+ if (event) {
3174
+ context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true;
3175
+ }
3176
+
3177
+ if ($(context.getTipElement()).hasClass(ClassName.SHOW) || context._hoverState === HoverState.SHOW) {
3178
+ context._hoverState = HoverState.SHOW;
3179
+ return;
3180
+ }
3199
3181
 
3200
- clearTimeout(context._timeout);
3182
+ clearTimeout(context._timeout);
3201
3183
 
3202
- context._hoverState = HoverState.IN;
3184
+ context._hoverState = HoverState.SHOW;
3203
3185
 
3204
- if (!context.config.delay || !context.config.delay.show) {
3186
+ if (!context.config.delay || !context.config.delay.show) {
3187
+ context.show();
3188
+ return;
3189
+ }
3190
+
3191
+ context._timeout = setTimeout(function () {
3192
+ if (context._hoverState === HoverState.SHOW) {
3205
3193
  context.show();
3206
- return;
3207
3194
  }
3195
+ }, context.config.delay.show);
3196
+ };
3208
3197
 
3209
- context._timeout = setTimeout(function () {
3210
- if (context._hoverState === HoverState.IN) {
3211
- context.show();
3212
- }
3213
- }, context.config.delay.show);
3214
- }
3215
- }, {
3216
- key: '_leave',
3217
- value: function _leave(event, context) {
3218
- var dataKey = this.constructor.DATA_KEY;
3198
+ Tooltip.prototype._leave = function _leave(event, context) {
3199
+ var dataKey = this.constructor.DATA_KEY;
3219
3200
 
3220
- context = context || $(event.currentTarget).data(dataKey);
3201
+ context = context || $(event.currentTarget).data(dataKey);
3221
3202
 
3222
- if (!context) {
3223
- context = new this.constructor(event.currentTarget, this._getDelegateConfig());
3224
- $(event.currentTarget).data(dataKey, context);
3225
- }
3203
+ if (!context) {
3204
+ context = new this.constructor(event.currentTarget, this._getDelegateConfig());
3205
+ $(event.currentTarget).data(dataKey, context);
3206
+ }
3226
3207
 
3227
- if (event) {
3228
- context._activeTrigger[event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER] = false;
3229
- }
3208
+ if (event) {
3209
+ context._activeTrigger[event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER] = false;
3210
+ }
3230
3211
 
3231
- if (context._isWithActiveTrigger()) {
3232
- return;
3233
- }
3212
+ if (context._isWithActiveTrigger()) {
3213
+ return;
3214
+ }
3234
3215
 
3235
- clearTimeout(context._timeout);
3216
+ clearTimeout(context._timeout);
3236
3217
 
3237
- context._hoverState = HoverState.OUT;
3218
+ context._hoverState = HoverState.OUT;
3219
+
3220
+ if (!context.config.delay || !context.config.delay.hide) {
3221
+ context.hide();
3222
+ return;
3223
+ }
3238
3224
 
3239
- if (!context.config.delay || !context.config.delay.hide) {
3225
+ context._timeout = setTimeout(function () {
3226
+ if (context._hoverState === HoverState.OUT) {
3240
3227
  context.hide();
3241
- return;
3242
3228
  }
3229
+ }, context.config.delay.hide);
3230
+ };
3243
3231
 
3244
- context._timeout = setTimeout(function () {
3245
- if (context._hoverState === HoverState.OUT) {
3246
- context.hide();
3247
- }
3248
- }, context.config.delay.hide);
3249
- }
3250
- }, {
3251
- key: '_isWithActiveTrigger',
3252
- value: function _isWithActiveTrigger() {
3253
- for (var trigger in this._activeTrigger) {
3254
- if (this._activeTrigger[trigger]) {
3255
- return true;
3256
- }
3232
+ Tooltip.prototype._isWithActiveTrigger = function _isWithActiveTrigger() {
3233
+ for (var trigger in this._activeTrigger) {
3234
+ if (this._activeTrigger[trigger]) {
3235
+ return true;
3257
3236
  }
3258
-
3259
- return false;
3260
3237
  }
3261
- }, {
3262
- key: '_getConfig',
3263
- value: function _getConfig(config) {
3264
- config = $.extend({}, this.constructor.Default, $(this.element).data(), config);
3265
3238
 
3266
- if (config.delay && typeof config.delay === 'number') {
3267
- config.delay = {
3268
- show: config.delay,
3269
- hide: config.delay
3270
- };
3271
- }
3239
+ return false;
3240
+ };
3272
3241
 
3273
- Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
3242
+ Tooltip.prototype._getConfig = function _getConfig(config) {
3243
+ config = $.extend({}, this.constructor.Default, $(this.element).data(), config);
3274
3244
 
3275
- return config;
3245
+ if (config.delay && typeof config.delay === 'number') {
3246
+ config.delay = {
3247
+ show: config.delay,
3248
+ hide: config.delay
3249
+ };
3276
3250
  }
3277
- }, {
3278
- key: '_getDelegateConfig',
3279
- value: function _getDelegateConfig() {
3280
- var config = {};
3281
-
3282
- if (this.config) {
3283
- for (var key in this.config) {
3284
- if (this.constructor.Default[key] !== this.config[key]) {
3285
- config[key] = this.config[key];
3286
- }
3251
+
3252
+ Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
3253
+
3254
+ return config;
3255
+ };
3256
+
3257
+ Tooltip.prototype._getDelegateConfig = function _getDelegateConfig() {
3258
+ var config = {};
3259
+
3260
+ if (this.config) {
3261
+ for (var key in this.config) {
3262
+ if (this.constructor.Default[key] !== this.config[key]) {
3263
+ config[key] = this.config[key];
3287
3264
  }
3288
3265
  }
3289
-
3290
- return config;
3291
3266
  }
3292
3267
 
3293
- // static
3268
+ return config;
3269
+ };
3294
3270
 
3295
- }], [{
3296
- key: '_jQueryInterface',
3297
- value: function _jQueryInterface(config) {
3298
- return this.each(function () {
3299
- var data = $(this).data(DATA_KEY);
3300
- var _config = typeof config === 'object' ? config : null;
3271
+ // static
3301
3272
 
3302
- if (!data && /destroy|hide/.test(config)) {
3303
- return;
3304
- }
3273
+ Tooltip._jQueryInterface = function _jQueryInterface(config) {
3274
+ return this.each(function () {
3275
+ var data = $(this).data(DATA_KEY);
3276
+ var _config = (typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object' && config;
3305
3277
 
3306
- if (!data) {
3307
- data = new Tooltip(this, _config);
3308
- $(this).data(DATA_KEY, data);
3309
- }
3278
+ if (!data && /dispose|hide/.test(config)) {
3279
+ return;
3280
+ }
3310
3281
 
3311
- if (typeof config === 'string') {
3312
- if (data[config] === undefined) {
3313
- throw new Error('No method named "' + config + '"');
3314
- }
3315
- data[config]();
3282
+ if (!data) {
3283
+ data = new Tooltip(this, _config);
3284
+ $(this).data(DATA_KEY, data);
3285
+ }
3286
+
3287
+ if (typeof config === 'string') {
3288
+ if (data[config] === undefined) {
3289
+ throw new Error('No method named "' + config + '"');
3316
3290
  }
3317
- });
3318
- }
3319
- }, {
3291
+ data[config]();
3292
+ }
3293
+ });
3294
+ };
3295
+
3296
+ _createClass(Tooltip, null, [{
3320
3297
  key: 'VERSION',
3321
3298
  get: function get() {
3322
3299
  return VERSION;
@@ -3354,7 +3331,13 @@ var Tooltip = (function ($) {
3354
3331
  }]);
3355
3332
 
3356
3333
  return Tooltip;
3357
- })();
3334
+ }();
3335
+
3336
+ /**
3337
+ * ------------------------------------------------------------------------
3338
+ * jQuery
3339
+ * ------------------------------------------------------------------------
3340
+ */
3358
3341
 
3359
3342
  $.fn[NAME] = Tooltip._jQueryInterface;
3360
3343
  $.fn[NAME].Constructor = Tooltip;
@@ -3364,16 +3347,16 @@ var Tooltip = (function ($) {
3364
3347
  };
3365
3348
 
3366
3349
  return Tooltip;
3367
- })(jQuery);
3350
+ }(jQuery);
3368
3351
 
3369
3352
  /**
3370
3353
  * --------------------------------------------------------------------------
3371
- * Bootstrap (v4.0.0-alpha.2): popover.js
3354
+ * Bootstrap (v4.0.0-alpha.6): popover.js
3372
3355
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
3373
3356
  * --------------------------------------------------------------------------
3374
3357
  */
3375
3358
 
3376
- var Popover = (function ($) {
3359
+ var Popover = function ($) {
3377
3360
 
3378
3361
  /**
3379
3362
  * ------------------------------------------------------------------------
@@ -3382,7 +3365,7 @@ var Popover = (function ($) {
3382
3365
  */
3383
3366
 
3384
3367
  var NAME = 'popover';
3385
- var VERSION = '4.0.0-alpha';
3368
+ var VERSION = '4.0.0-alpha.6';
3386
3369
  var DATA_KEY = 'bs.popover';
3387
3370
  var EVENT_KEY = '.' + DATA_KEY;
3388
3371
  var JQUERY_NO_CONFLICT = $.fn[NAME];
@@ -3391,7 +3374,7 @@ var Popover = (function ($) {
3391
3374
  placement: 'right',
3392
3375
  trigger: 'click',
3393
3376
  content: '',
3394
- template: '<div class="popover" role="tooltip">' + '<div class="popover-arrow"></div>' + '<h3 class="popover-title"></h3>' + '<div class="popover-content"></div></div>'
3377
+ template: '<div class="popover" role="tooltip">' + '<h3 class="popover-title"></h3>' + '<div class="popover-content"></div></div>'
3395
3378
  });
3396
3379
 
3397
3380
  var DefaultType = $.extend({}, Tooltip.DefaultType, {
@@ -3400,13 +3383,12 @@ var Popover = (function ($) {
3400
3383
 
3401
3384
  var ClassName = {
3402
3385
  FADE: 'fade',
3403
- IN: 'in'
3386
+ SHOW: 'show'
3404
3387
  };
3405
3388
 
3406
3389
  var Selector = {
3407
3390
  TITLE: '.popover-title',
3408
- CONTENT: '.popover-content',
3409
- ARROW: '.popover-arrow'
3391
+ CONTENT: '.popover-content'
3410
3392
  };
3411
3393
 
3412
3394
  var Event = {
@@ -3428,85 +3410,72 @@ var Popover = (function ($) {
3428
3410
  * ------------------------------------------------------------------------
3429
3411
  */
3430
3412
 
3431
- var Popover = (function (_Tooltip) {
3413
+ var Popover = function (_Tooltip) {
3432
3414
  _inherits(Popover, _Tooltip);
3433
3415
 
3434
3416
  function Popover() {
3435
3417
  _classCallCheck(this, Popover);
3436
3418
 
3437
- _get(Object.getPrototypeOf(Popover.prototype), 'constructor', this).apply(this, arguments);
3419
+ return _possibleConstructorReturn(this, _Tooltip.apply(this, arguments));
3438
3420
  }
3439
3421
 
3440
- /**
3441
- * ------------------------------------------------------------------------
3442
- * jQuery
3443
- * ------------------------------------------------------------------------
3444
- */
3422
+ // overrides
3445
3423
 
3446
- _createClass(Popover, [{
3447
- key: 'isWithContent',
3424
+ Popover.prototype.isWithContent = function isWithContent() {
3425
+ return this.getTitle() || this._getContent();
3426
+ };
3448
3427
 
3449
- // overrides
3428
+ Popover.prototype.getTipElement = function getTipElement() {
3429
+ return this.tip = this.tip || $(this.config.template)[0];
3430
+ };
3450
3431
 
3451
- value: function isWithContent() {
3452
- return this.getTitle() || this._getContent();
3453
- }
3454
- }, {
3455
- key: 'getTipElement',
3456
- value: function getTipElement() {
3457
- return this.tip = this.tip || $(this.config.template)[0];
3458
- }
3459
- }, {
3460
- key: 'setContent',
3461
- value: function setContent() {
3462
- var $tip = $(this.getTipElement());
3432
+ Popover.prototype.setContent = function setContent() {
3433
+ var $tip = $(this.getTipElement());
3463
3434
 
3464
- // we use append for html objects to maintain js events
3465
- this.setElementContent($tip.find(Selector.TITLE), this.getTitle());
3466
- this.setElementContent($tip.find(Selector.CONTENT), this._getContent());
3435
+ // we use append for html objects to maintain js events
3436
+ this.setElementContent($tip.find(Selector.TITLE), this.getTitle());
3437
+ this.setElementContent($tip.find(Selector.CONTENT), this._getContent());
3467
3438
 
3468
- $tip.removeClass(ClassName.FADE).removeClass(ClassName.IN);
3439
+ $tip.removeClass(ClassName.FADE + ' ' + ClassName.SHOW);
3469
3440
 
3470
- this.cleanupTether();
3471
- }
3441
+ this.cleanupTether();
3442
+ };
3472
3443
 
3473
- // private
3444
+ // private
3474
3445
 
3475
- }, {
3476
- key: '_getContent',
3477
- value: function _getContent() {
3478
- return this.element.getAttribute('data-content') || (typeof this.config.content === 'function' ? this.config.content.call(this.element) : this.config.content);
3479
- }
3446
+ Popover.prototype._getContent = function _getContent() {
3447
+ return this.element.getAttribute('data-content') || (typeof this.config.content === 'function' ? this.config.content.call(this.element) : this.config.content);
3448
+ };
3480
3449
 
3481
- // static
3450
+ // static
3482
3451
 
3483
- }], [{
3484
- key: '_jQueryInterface',
3485
- value: function _jQueryInterface(config) {
3486
- return this.each(function () {
3487
- var data = $(this).data(DATA_KEY);
3488
- var _config = typeof config === 'object' ? config : null;
3452
+ Popover._jQueryInterface = function _jQueryInterface(config) {
3453
+ return this.each(function () {
3454
+ var data = $(this).data(DATA_KEY);
3455
+ var _config = (typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object' ? config : null;
3489
3456
 
3490
- if (!data && /destroy|hide/.test(config)) {
3491
- return;
3492
- }
3457
+ if (!data && /destroy|hide/.test(config)) {
3458
+ return;
3459
+ }
3493
3460
 
3494
- if (!data) {
3495
- data = new Popover(this, _config);
3496
- $(this).data(DATA_KEY, data);
3497
- }
3461
+ if (!data) {
3462
+ data = new Popover(this, _config);
3463
+ $(this).data(DATA_KEY, data);
3464
+ }
3498
3465
 
3499
- if (typeof config === 'string') {
3500
- if (data[config] === undefined) {
3501
- throw new Error('No method named "' + config + '"');
3502
- }
3503
- data[config]();
3466
+ if (typeof config === 'string') {
3467
+ if (data[config] === undefined) {
3468
+ throw new Error('No method named "' + config + '"');
3504
3469
  }
3505
- });
3506
- }
3507
- }, {
3470
+ data[config]();
3471
+ }
3472
+ });
3473
+ };
3474
+
3475
+ _createClass(Popover, null, [{
3508
3476
  key: 'VERSION',
3509
3477
 
3478
+
3510
3479
  // getters
3511
3480
 
3512
3481
  get: function get() {
@@ -3545,7 +3514,13 @@ var Popover = (function ($) {
3545
3514
  }]);
3546
3515
 
3547
3516
  return Popover;
3548
- })(Tooltip);
3517
+ }(Tooltip);
3518
+
3519
+ /**
3520
+ * ------------------------------------------------------------------------
3521
+ * jQuery
3522
+ * ------------------------------------------------------------------------
3523
+ */
3549
3524
 
3550
3525
  $.fn[NAME] = Popover._jQueryInterface;
3551
3526
  $.fn[NAME].Constructor = Popover;
@@ -3555,6 +3530,6 @@ var Popover = (function ($) {
3555
3530
  };
3556
3531
 
3557
3532
  return Popover;
3558
- })(jQuery);
3559
-
3560
3533
  }(jQuery);
3534
+
3535
+ }();