spree_storefront 5.0.0.rc1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (341) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.md +13 -0
  3. data/Rakefile +15 -0
  4. data/app/assets/config/spree_storefront_manifest.js +6 -0
  5. data/app/assets/stylesheets/storefront_page_builder.css +51 -0
  6. data/app/controllers/concerns/spree/cart_methods.rb +40 -0
  7. data/app/controllers/concerns/spree/locale_urls.rb +23 -0
  8. data/app/controllers/concerns/spree/password_protected.rb +17 -0
  9. data/app/controllers/concerns/spree/theme_concern.rb +29 -0
  10. data/app/controllers/spree/account/addresses_controller.rb +16 -0
  11. data/app/controllers/spree/account/base_controller.rb +20 -0
  12. data/app/controllers/spree/account/newsletter_controller.rb +34 -0
  13. data/app/controllers/spree/account/orders_controller.rb +34 -0
  14. data/app/controllers/spree/account/profile_controller.rb +23 -0
  15. data/app/controllers/spree/account/store_credits_controller.rb +23 -0
  16. data/app/controllers/spree/account/wished_items_controller.rb +45 -0
  17. data/app/controllers/spree/addresses_controller.rb +101 -0
  18. data/app/controllers/spree/checkout_controller.rb +365 -0
  19. data/app/controllers/spree/contacts_controller.rb +46 -0
  20. data/app/controllers/spree/digital_links_controller.rb +48 -0
  21. data/app/controllers/spree/home_controller.rb +5 -0
  22. data/app/controllers/spree/line_items_controller.rb +96 -0
  23. data/app/controllers/spree/newsletter_subscribers_controller.rb +43 -0
  24. data/app/controllers/spree/order_status_controller.rb +32 -0
  25. data/app/controllers/spree/orders_controller.rb +104 -0
  26. data/app/controllers/spree/page_sections_controller.rb +17 -0
  27. data/app/controllers/spree/pages_controller.rb +13 -0
  28. data/app/controllers/spree/password_controller.rb +21 -0
  29. data/app/controllers/spree/policies_controller.rb +17 -0
  30. data/app/controllers/spree/posts_controller.rb +76 -0
  31. data/app/controllers/spree/products_controller.rb +99 -0
  32. data/app/controllers/spree/search_controller.rb +39 -0
  33. data/app/controllers/spree/seo_controller.rb +25 -0
  34. data/app/controllers/spree/settings_controller.rb +68 -0
  35. data/app/controllers/spree/store_controller.rb +247 -0
  36. data/app/controllers/spree/taxonomies_controller.rb +30 -0
  37. data/app/controllers/spree/taxons_controller.rb +46 -0
  38. data/app/controllers/spree/wishlists_controller.rb +19 -0
  39. data/app/finders/spree/storefront/variant_finder.rb +80 -0
  40. data/app/helpers/spree/analytics_helper.rb +28 -0
  41. data/app/helpers/spree/cart_helper.rb +48 -0
  42. data/app/helpers/spree/checkout_analytics_helper.rb +77 -0
  43. data/app/helpers/spree/checkout_helper.rb +58 -0
  44. data/app/helpers/spree/filters_helper.rb +180 -0
  45. data/app/helpers/spree/fonts_helper.rb +58 -0
  46. data/app/helpers/spree/orders_helper.rb +7 -0
  47. data/app/helpers/spree/page_helper.rb +67 -0
  48. data/app/helpers/spree/posts_helper.rb +42 -0
  49. data/app/helpers/spree/products_helper.rb +205 -0
  50. data/app/helpers/spree/storefront_helper.rb +86 -0
  51. data/app/helpers/spree/storefront_locale_helper.rb +42 -0
  52. data/app/helpers/spree/theme_helper.rb +244 -0
  53. data/app/helpers/spree/turbo_helper.rb +13 -0
  54. data/app/helpers/spree/turbo_stream_actions_helper.rb +13 -0
  55. data/app/helpers/spree/wishlist_helper.rb +7 -0
  56. data/app/javascript/spree/storefront/application.js +156 -0
  57. data/app/javascript/spree/storefront/controllers/accordion_controller.js +25 -0
  58. data/app/javascript/spree/storefront/controllers/account_nav_controller.js +10 -0
  59. data/app/javascript/spree/storefront/controllers/card_validation_controller.js +103 -0
  60. data/app/javascript/spree/storefront/controllers/carousel_controller.js +44 -0
  61. data/app/javascript/spree/storefront/controllers/cart_controller.js +10 -0
  62. data/app/javascript/spree/storefront/controllers/checkout_address_book_controller.js +28 -0
  63. data/app/javascript/spree/storefront/controllers/checkout_delivery_controller.js +39 -0
  64. data/app/javascript/spree/storefront/controllers/checkout_promotions_controller.js +28 -0
  65. data/app/javascript/spree/storefront/controllers/checkout_summary_controller.js +46 -0
  66. data/app/javascript/spree/storefront/controllers/clear_input_controller.js +23 -0
  67. data/app/javascript/spree/storefront/controllers/copy_input_controller.js +19 -0
  68. data/app/javascript/spree/storefront/controllers/dropdown_controller.js +14 -0
  69. data/app/javascript/spree/storefront/controllers/header_controller.js +33 -0
  70. data/app/javascript/spree/storefront/controllers/infinite_scroll_controller.js +31 -0
  71. data/app/javascript/spree/storefront/controllers/lightbox_controller.js +138 -0
  72. data/app/javascript/spree/storefront/controllers/mobile_nav_controller.js +17 -0
  73. data/app/javascript/spree/storefront/controllers/modal_controller.js +15 -0
  74. data/app/javascript/spree/storefront/controllers/no_ui_slider_controller.js +55 -0
  75. data/app/javascript/spree/storefront/controllers/pdp_desktop_gallery_controller.js +28 -0
  76. data/app/javascript/spree/storefront/controllers/plp_variant_picker_controller.js +151 -0
  77. data/app/javascript/spree/storefront/controllers/product_form_controller.js +136 -0
  78. data/app/javascript/spree/storefront/controllers/quantity_picker_controller.js +43 -0
  79. data/app/javascript/spree/storefront/controllers/search_suggestions_controller.js +61 -0
  80. data/app/javascript/spree/storefront/controllers/searchable_list_controller.js +25 -0
  81. data/app/javascript/spree/storefront/controllers/slideover_controller.js +40 -0
  82. data/app/javascript/spree/storefront/controllers/sticky_button_controller.js +32 -0
  83. data/app/javascript/spree/storefront/controllers/toggle_menu_controller.js +32 -0
  84. data/app/javascript/spree/storefront/controllers/turbo_stream_form_controller.js +51 -0
  85. data/app/javascript/spree/storefront/controllers/wished_item_controller.js +69 -0
  86. data/app/javascript/spree/storefront/helpers/lazy_load_controllers_with_manifest.js +78 -0
  87. data/app/javascript/spree/storefront/helpers/show_flash_message.js +25 -0
  88. data/app/models/spree/color_names.rb +35 -0
  89. data/app/models/spree/contact.rb +24 -0
  90. data/app/presenters/spree/colors_preview_styles_presenter.rb +84 -0
  91. data/app/presenters/spree/featured_product_presenter.rb +42 -0
  92. data/app/presenters/spree/mega_nav_presenter.rb +55 -0
  93. data/app/views/devise/passwords/edit.html.erb +22 -0
  94. data/app/views/devise/passwords/new.html.erb +16 -0
  95. data/app/views/devise/registrations/_form.html.erb +21 -0
  96. data/app/views/devise/registrations/edit.html.erb +24 -0
  97. data/app/views/devise/registrations/new.html.erb +27 -0
  98. data/app/views/devise/sessions/new.html.erb +25 -0
  99. data/app/views/devise/shared/_links.html.erb +22 -0
  100. data/app/views/layouts/spree/checkout.html.erb +58 -0
  101. data/app/views/layouts/spree/password.html.erb +34 -0
  102. data/app/views/layouts/spree/storefront.html.erb +38 -0
  103. data/app/views/spree/account/wished_items/create.turbo_stream.erb +8 -0
  104. data/app/views/spree/account/wished_items/destroy.turbo_stream.erb +20 -0
  105. data/app/views/spree/addresses/destroy.turbo_stream.erb +1 -0
  106. data/app/views/spree/addresses/edit.html.erb +57 -0
  107. data/app/views/spree/addresses/new.html.erb +71 -0
  108. data/app/views/spree/checkout/_address.html.erb +153 -0
  109. data/app/views/spree/checkout/_button_processing.html.erb +7 -0
  110. data/app/views/spree/checkout/_coupon_code.html.erb +55 -0
  111. data/app/views/spree/checkout/_credit_card.html.erb +12 -0
  112. data/app/views/spree/checkout/_delivery.html.erb +70 -0
  113. data/app/views/spree/checkout/_line_item.html.erb +26 -0
  114. data/app/views/spree/checkout/_line_items.html.erb +7 -0
  115. data/app/views/spree/checkout/_missing_all_line_items.html.erb +17 -0
  116. data/app/views/spree/checkout/_missing_line_items.html.erb +28 -0
  117. data/app/views/spree/checkout/_payment.html.erb +35 -0
  118. data/app/views/spree/checkout/_payment_methods.html.erb +72 -0
  119. data/app/views/spree/checkout/_payment_sources.html.erb +24 -0
  120. data/app/views/spree/checkout/_quick_checkout.html.erb +1 -0
  121. data/app/views/spree/checkout/_sidebar.html.erb +34 -0
  122. data/app/views/spree/checkout/_store_credit.html.erb +21 -0
  123. data/app/views/spree/checkout/_summary.html.erb +116 -0
  124. data/app/views/spree/checkout/_user_account.html.erb +9 -0
  125. data/app/views/spree/checkout/apply_coupon_code.turbo_stream.erb +45 -0
  126. data/app/views/spree/checkout/apply_store_credit.turbo_stream.erb +19 -0
  127. data/app/views/spree/checkout/edit.html.erb +98 -0
  128. data/app/views/spree/checkout/payment/_check.html.erb +0 -0
  129. data/app/views/spree/checkout/payment/_gateway.html.erb +74 -0
  130. data/app/views/spree/checkout/payment/_store_credit.html.erb +13 -0
  131. data/app/views/spree/checkout/remove_coupon_code.turbo_stream.erb +34 -0
  132. data/app/views/spree/checkout/remove_store_credit.turbo_stream.erb +19 -0
  133. data/app/views/spree/checkout/update.turbo_stream.erb +25 -0
  134. data/app/views/spree/home/index.html.erb +1 -0
  135. data/app/views/spree/line_items/create.turbo_stream.erb +13 -0
  136. data/app/views/spree/line_items/destroy.turbo_stream.erb +11 -0
  137. data/app/views/spree/line_items/update.turbo_stream.erb +10 -0
  138. data/app/views/spree/newsletter_subscribers/create.turbo_stream.erb +7 -0
  139. data/app/views/spree/order_status/new.html.erb +16 -0
  140. data/app/views/spree/page_sections/show.html.erb +3 -0
  141. data/app/views/spree/pages/show.html.erb +1 -0
  142. data/app/views/spree/password/show.html.erb +1 -0
  143. data/app/views/spree/posts/index.html.erb +1 -0
  144. data/app/views/spree/posts/related_products.html.erb +7 -0
  145. data/app/views/spree/posts/show.html.erb +1 -0
  146. data/app/views/spree/products/index.html.erb +1 -0
  147. data/app/views/spree/products/index.turbo_stream.erb +1 -0
  148. data/app/views/spree/products/related.html.erb +3 -0
  149. data/app/views/spree/products/show.html.erb +1 -0
  150. data/app/views/spree/search/show.html.erb +6 -0
  151. data/app/views/spree/search/show.turbo_stream.erb +1 -0
  152. data/app/views/spree/search/suggestions.turbo_stream.erb +8 -0
  153. data/app/views/spree/seo/robots.text.erb +31 -0
  154. data/app/views/spree/seo/sitemap.xml.erb +25 -0
  155. data/app/views/spree/shared/_fonts.html.erb +14 -0
  156. data/app/views/spree/shared/_head.html.erb +36 -0
  157. data/app/views/spree/shared/_load_more_products.turbo_stream.erb +7 -0
  158. data/app/views/spree/shared/_product_listing_page.html.erb +11 -0
  159. data/app/views/spree/shared/_products.html.erb +1 -0
  160. data/app/views/spree/taxonomies/show.html.erb +1 -0
  161. data/app/views/spree/taxons/show.html.erb +1 -0
  162. data/app/views/spree/taxons/show.turbo_stream.erb +1 -0
  163. data/app/views/spree/waitlists/create.turbo_stream.erb +9 -0
  164. data/app/views/themes/default/kaminari/storefront/_first_page.html.erb +8 -0
  165. data/app/views/themes/default/kaminari/storefront/_gap.html.erb +8 -0
  166. data/app/views/themes/default/kaminari/storefront/_last_page.html.erb +8 -0
  167. data/app/views/themes/default/kaminari/storefront/_next_page.html.erb +13 -0
  168. data/app/views/themes/default/kaminari/storefront/_page.html.erb +10 -0
  169. data/app/views/themes/default/kaminari/storefront/_paginator.html.erb +27 -0
  170. data/app/views/themes/default/kaminari/storefront/_prev_page.html.erb +13 -0
  171. data/app/views/themes/default/spree/account/_account_nav.html.erb +46 -0
  172. data/app/views/themes/default/spree/account/_order.html.erb +39 -0
  173. data/app/views/themes/default/spree/account/_orders.html.erb +16 -0
  174. data/app/views/themes/default/spree/account/addresses/_address.html.erb +42 -0
  175. data/app/views/themes/default/spree/account/addresses/index.html.erb +28 -0
  176. data/app/views/themes/default/spree/account/newsletter/_newsletter_settings.html.erb +13 -0
  177. data/app/views/themes/default/spree/account/newsletter/edit.html.erb +16 -0
  178. data/app/views/themes/default/spree/account/newsletter/update.html.erb +1 -0
  179. data/app/views/themes/default/spree/account/orders/index.html.erb +24 -0
  180. data/app/views/themes/default/spree/account/orders/show.html.erb +22 -0
  181. data/app/views/themes/default/spree/account/profile/edit.html.erb +36 -0
  182. data/app/views/themes/default/spree/account/store_credits/_store_credit_event.html.erb +29 -0
  183. data/app/views/themes/default/spree/account/store_credits/index.html.erb +31 -0
  184. data/app/views/themes/default/spree/checkout/_footer.html.erb +10 -0
  185. data/app/views/themes/default/spree/checkout/complete.html.erb +84 -0
  186. data/app/views/themes/default/spree/contacts/new.html.erb +23 -0
  187. data/app/views/themes/default/spree/orders/_cart.html.erb +14 -0
  188. data/app/views/themes/default/spree/orders/_empty.html.erb +11 -0
  189. data/app/views/themes/default/spree/orders/_line_item.html.erb +47 -0
  190. data/app/views/themes/default/spree/orders/_line_item_quantity.html.erb +11 -0
  191. data/app/views/themes/default/spree/orders/_summary.html.erb +41 -0
  192. data/app/views/themes/default/spree/orders/edit.html.erb +18 -0
  193. data/app/views/themes/default/spree/orders/show.html.erb +6 -0
  194. data/app/views/themes/default/spree/page_sections/_announcement_bar.html.erb +10 -0
  195. data/app/views/themes/default/spree/page_sections/_custom_code.html.erb +5 -0
  196. data/app/views/themes/default/spree/page_sections/_featured_product.html.erb +136 -0
  197. data/app/views/themes/default/spree/page_sections/_featured_taxon.html.erb +116 -0
  198. data/app/views/themes/default/spree/page_sections/_featured_taxons.html.erb +71 -0
  199. data/app/views/themes/default/spree/page_sections/_footer.html.erb +62 -0
  200. data/app/views/themes/default/spree/page_sections/_header.html.erb +166 -0
  201. data/app/views/themes/default/spree/page_sections/_image_banner.html.erb +57 -0
  202. data/app/views/themes/default/spree/page_sections/_image_with_text.html.erb +66 -0
  203. data/app/views/themes/default/spree/page_sections/_main_password_footer.html.erb +64 -0
  204. data/app/views/themes/default/spree/page_sections/_main_password_header.html.erb +54 -0
  205. data/app/views/themes/default/spree/page_sections/_newsletter.html.erb +47 -0
  206. data/app/views/themes/default/spree/page_sections/_page_title.html.erb +7 -0
  207. data/app/views/themes/default/spree/page_sections/_post_details.html.erb +19 -0
  208. data/app/views/themes/default/spree/page_sections/_post_grid.html.erb +11 -0
  209. data/app/views/themes/default/spree/page_sections/_product_details.html.erb +102 -0
  210. data/app/views/themes/default/spree/page_sections/_product_grid.html.erb +52 -0
  211. data/app/views/themes/default/spree/page_sections/_related_products.html.erb +15 -0
  212. data/app/views/themes/default/spree/page_sections/_rich_text.html.erb +18 -0
  213. data/app/views/themes/default/spree/page_sections/_taxon_banner.html.erb +37 -0
  214. data/app/views/themes/default/spree/page_sections/_taxon_grid.html.erb +103 -0
  215. data/app/views/themes/default/spree/page_sections/_video.html.erb +27 -0
  216. data/app/views/themes/default/spree/page_sections/nav/_desktop.html.erb +49 -0
  217. data/app/views/themes/default/spree/page_sections/nav/_mobile.html.erb +136 -0
  218. data/app/views/themes/default/spree/policies/show.html.erb +11 -0
  219. data/app/views/themes/default/spree/posts/_json_ld.html.erb +20 -0
  220. data/app/views/themes/default/spree/posts/_pagination.html.erb +1 -0
  221. data/app/views/themes/default/spree/posts/_post.html.erb +13 -0
  222. data/app/views/themes/default/spree/products/_add_to_cart_button.html.erb +58 -0
  223. data/app/views/themes/default/spree/products/_add_to_waitlist.html.erb +36 -0
  224. data/app/views/themes/default/spree/products/_add_to_wishlist.html.erb +33 -0
  225. data/app/views/themes/default/spree/products/_breadcrumbs.html.erb +23 -0
  226. data/app/views/themes/default/spree/products/_color_picker.html.erb +19 -0
  227. data/app/views/themes/default/spree/products/_color_swatches.html.erb +61 -0
  228. data/app/views/themes/default/spree/products/_details.html.erb +55 -0
  229. data/app/views/themes/default/spree/products/_featured_image.html.erb +37 -0
  230. data/app/views/themes/default/spree/products/_filters.html.erb +45 -0
  231. data/app/views/themes/default/spree/products/_json_ld.html.erb +38 -0
  232. data/app/views/themes/default/spree/products/_json_ld_list.html.erb +9 -0
  233. data/app/views/themes/default/spree/products/_json_ld_variant.html.erb +10 -0
  234. data/app/views/themes/default/spree/products/_label.html.erb +26 -0
  235. data/app/views/themes/default/spree/products/_media_gallery.html.erb +94 -0
  236. data/app/views/themes/default/spree/products/_price.html.erb +59 -0
  237. data/app/views/themes/default/spree/products/_product.html.erb +62 -0
  238. data/app/views/themes/default/spree/products/_quantity_selector.html.erb +32 -0
  239. data/app/views/themes/default/spree/products/_returns_policy_modal.html.erb +22 -0
  240. data/app/views/themes/default/spree/products/_show_more_button.html.erb +8 -0
  241. data/app/views/themes/default/spree/products/_sort.html.erb +45 -0
  242. data/app/views/themes/default/spree/products/_swiper.html.erb +85 -0
  243. data/app/views/themes/default/spree/products/_tags.html.erb +0 -0
  244. data/app/views/themes/default/spree/products/_variant_options.html.erb +71 -0
  245. data/app/views/themes/default/spree/products/_variant_picker.html.erb +50 -0
  246. data/app/views/themes/default/spree/products/filters/_availability.html.erb +32 -0
  247. data/app/views/themes/default/spree/products/filters/_colors.html.erb +23 -0
  248. data/app/views/themes/default/spree/products/filters/_generic.html.erb +75 -0
  249. data/app/views/themes/default/spree/products/filters/_price.html.erb +35 -0
  250. data/app/views/themes/default/spree/products/filters/_taxons.erb +78 -0
  251. data/app/views/themes/default/spree/search/_suggestions.html.erb +92 -0
  252. data/app/views/themes/default/spree/settings/show.html.erb +32 -0
  253. data/app/views/themes/default/spree/shared/_account_pane.html.erb +28 -0
  254. data/app/views/themes/default/spree/shared/_address.html.erb +35 -0
  255. data/app/views/themes/default/spree/shared/_cart_icon.html.erb +13 -0
  256. data/app/views/themes/default/spree/shared/_cart_pane.html.erb +38 -0
  257. data/app/views/themes/default/spree/shared/_css_variables.html.erb +54 -0
  258. data/app/views/themes/default/spree/shared/_custom_head.html.erb +0 -0
  259. data/app/views/themes/default/spree/shared/_error_messages.html.erb +9 -0
  260. data/app/views/themes/default/spree/shared/_error_messages_without_base_attribute.html.erb +15 -0
  261. data/app/views/themes/default/spree/shared/_flash.html.erb +16 -0
  262. data/app/views/themes/default/spree/shared/_flashes.html.erb +10 -0
  263. data/app/views/themes/default/spree/shared/_json_ld.html.erb +32 -0
  264. data/app/views/themes/default/spree/shared/_line_item_options.html.erb +18 -0
  265. data/app/views/themes/default/spree/shared/_logo.html.erb +42 -0
  266. data/app/views/themes/default/spree/shared/_meta_tags.html.erb +45 -0
  267. data/app/views/themes/default/spree/shared/_order_details.html.erb +106 -0
  268. data/app/views/themes/default/spree/shared/_order_line_item.html.erb +65 -0
  269. data/app/views/themes/default/spree/shared/_order_shipment.html.erb +71 -0
  270. data/app/views/themes/default/spree/shared/_search.html.erb +32 -0
  271. data/app/views/themes/default/spree/shared/_title.html.erb +3 -0
  272. data/app/views/themes/default/spree/shared/_wishlist_icon.html.erb +13 -0
  273. data/app/views/themes/default/spree/shared/icons/_account.html.erb +17 -0
  274. data/app/views/themes/default/spree/shared/icons/_arrow-left.html.erb +8 -0
  275. data/app/views/themes/default/spree/shared/icons/_arrow-right.html.erb +3 -0
  276. data/app/views/themes/default/spree/shared/icons/_bell.html.erb +9 -0
  277. data/app/views/themes/default/spree/shared/icons/_cart.html.erb +10 -0
  278. data/app/views/themes/default/spree/shared/icons/_cart_48.html.erb +6 -0
  279. data/app/views/themes/default/spree/shared/icons/_check.html.erb +4 -0
  280. data/app/views/themes/default/spree/shared/icons/_chevron.html.erb +15 -0
  281. data/app/views/themes/default/spree/shared/icons/_chevron_down.html.erb +5 -0
  282. data/app/views/themes/default/spree/shared/icons/_chevron_right.html.erb +15 -0
  283. data/app/views/themes/default/spree/shared/icons/_chevron_up.html.erb +3 -0
  284. data/app/views/themes/default/spree/shared/icons/_close.html.erb +9 -0
  285. data/app/views/themes/default/spree/shared/icons/_cross.html.erb +16 -0
  286. data/app/views/themes/default/spree/shared/icons/_delete.html.erb +3 -0
  287. data/app/views/themes/default/spree/shared/icons/_delivery.html.erb +5 -0
  288. data/app/views/themes/default/spree/shared/icons/_disabled.html.erb +13 -0
  289. data/app/views/themes/default/spree/shared/icons/_edit.html.erb +3 -0
  290. data/app/views/themes/default/spree/shared/icons/_facebook.html.erb +16 -0
  291. data/app/views/themes/default/spree/shared/icons/_filter.html.erb +8 -0
  292. data/app/views/themes/default/spree/shared/icons/_heart.html.erb +12 -0
  293. data/app/views/themes/default/spree/shared/icons/_info.html.erb +7 -0
  294. data/app/views/themes/default/spree/shared/icons/_instagram.html.erb +18 -0
  295. data/app/views/themes/default/spree/shared/icons/_lock.html.erb +13 -0
  296. data/app/views/themes/default/spree/shared/icons/_menu.html.erb +10 -0
  297. data/app/views/themes/default/spree/shared/icons/_minus.html.erb +5 -0
  298. data/app/views/themes/default/spree/shared/icons/_pinch.html.erb +6 -0
  299. data/app/views/themes/default/spree/shared/icons/_pinterest.html.erb +8 -0
  300. data/app/views/themes/default/spree/shared/icons/_plus.html.erb +17 -0
  301. data/app/views/themes/default/spree/shared/icons/_return.html.erb +11 -0
  302. data/app/views/themes/default/spree/shared/icons/_search.html.erb +17 -0
  303. data/app/views/themes/default/spree/shared/icons/_spinner.html.erb +1 -0
  304. data/app/views/themes/default/spree/shared/icons/_spotify.html.erb +8 -0
  305. data/app/views/themes/default/spree/shared/icons/_tiktok.html.erb +9 -0
  306. data/app/views/themes/default/spree/shared/icons/_twitter.html.erb +16 -0
  307. data/app/views/themes/default/spree/shared/icons/_youtube.html.erb +9 -0
  308. data/app/views/themes/default/spree/shared/icons/_zoom.html.erb +10 -0
  309. data/app/views/themes/default/spree/wishlists/_no_wished_items.html.erb +10 -0
  310. data/app/views/themes/default/spree/wishlists/_wished_item.html.erb +38 -0
  311. data/app/views/themes/default/spree/wishlists/show.html.erb +17 -0
  312. data/config/i18n-tasks.yml +176 -0
  313. data/config/importmap.rb +22 -0
  314. data/config/initializers/assets.rb +1 -0
  315. data/config/initializers/heroicon.rb +10 -0
  316. data/config/locales/en.yml +76 -0
  317. data/config/routes.rb +88 -0
  318. data/lib/generators/spree/storefront/install/install_generator.rb +45 -0
  319. data/lib/generators/spree/storefront/install/templates/application.tailwind.css +1760 -0
  320. data/lib/generators/spree/storefront/install/templates/dev +16 -0
  321. data/lib/generators/spree/storefront/install/templates/tailwind.config.js +128 -0
  322. data/lib/generators/spree/storefront/theme/templates/model.rb.tt +12 -0
  323. data/lib/generators/spree/storefront/theme/theme_generator.rb +41 -0
  324. data/lib/spree/storefront/configuration.rb +11 -0
  325. data/lib/spree/storefront/engine.rb +51 -0
  326. data/lib/spree/storefront/testing_support/capybara_utils.rb +13 -0
  327. data/lib/spree/storefront.rb +16 -0
  328. data/lib/spree_storefront.rb +1 -0
  329. data/vendor/colornames.json +1 -0
  330. data/vendor/javascript/@kanety--stimulus-accordion.js +4 -0
  331. data/vendor/javascript/@stimulus-components--carousel.js +4 -0
  332. data/vendor/javascript/card-validator.js +4 -0
  333. data/vendor/javascript/credit-card-type.js +4 -0
  334. data/vendor/javascript/headroom.js.js +19 -0
  335. data/vendor/javascript/nouislider.js +4 -0
  336. data/vendor/javascript/photoswipe--dist--photoswipe-lightbox.esm.js.js +667 -0
  337. data/vendor/javascript/photoswipe.js +1675 -0
  338. data/vendor/javascript/stimulus-read-more.js +4 -0
  339. data/vendor/javascript/stimulus-scroll-to.js +4 -0
  340. data/vendor/javascript/swiper--bundle.js +4 -0
  341. metadata +567 -0
@@ -0,0 +1,4 @@
1
+ // @kanety/stimulus-accordion@1.1.0 downloaded from https://ga.jspm.io/npm:@kanety/stimulus-accordion@1.1.0/dist/index.module.js
2
+
3
+ import{Controller as t}from"@hotwired/stimulus";class e{constructor(t){this.controller=t}get togglers(){return this.controller.togglers}get openedTogglers(){return this.controller.openedTogglers}get key(){return this.controller.storeKeyValue}load(){if(this.key){var t=this.constructor.load(this.key);if(t){var i=new Set(t);this.togglers.forEach((t=>{var o=this.controller.findContent(t);i.has(this.controller.getID(t))?this.controller.show(t,o):this.controller.hide(t,o)}))}}}save(){if(this.key){var t=this.openedTogglers.map((t=>this.controller.getID(t)));this.constructor.save(this.key,t)}}static load(t){var i=sessionStorage.getItem(t);try{return JSON.parse(i)}catch(t){return console.error(t),null}}static save(t,i){try{sessionStorage.setItem(t,JSON.stringify(i))}catch(t){return console.error(t),null}}}class s extends t{get togglers(){return this.context.bindingObserver.bindings.filter((t=>"toggle"==t.action.methodName)).map((t=>t.action.element))}get openedTogglers(){return this.togglers.filter((t=>this.isOpened(t)))}get contents(){return this.scope.findAllElements("[data-accordion-id]")}connect(){this.init(),this.store=new e(this),this.store.load()}init(){this.togglers.forEach((t=>{var i=this.findContent(t);this.isOpened(t)?this.show(t,i,!1):this.hide(t,i,!1)}))}toggle(t){this.togglers.forEach((i=>{i.contains(t.target)?this.isOpened(i)?this.close(i):this.open(i):this.isOpened(i)&&this.close(i)})),t.preventDefault()}open(t){var i=this.findContent(t);this.show(t,i),this.store.save(),this.dispatch("opened",{detail:{toggler:t,content:i}})}close(t){var i=this.findContent(t);this.hide(t,i),this.store.save(),this.dispatch("closed",{detail:{toggler:t,content:i}})}show(t,i,o){void 0===o&&(o=!0),o&&(i.style.height="0px",i.removeEventListener("transitionend",this.transitionEnd),i.addEventListener("transitionend",this.transitionEnd),setTimeout((()=>{i.style.height=i.scrollHeight+"px"}))),this.toggleClass(t,i,!0),this.toggleText(t,!0)}hide(t,i,o){void 0===o&&(o=!0),o&&(i.style.height=i.scrollHeight+"px",i.removeEventListener("transitionend",this.transitionEnd),i.addEventListener("transitionend",this.transitionEnd),setTimeout((()=>{i.style.height="0px"}))),this.toggleClass(t,i,!1),this.toggleText(t,!1)}transitionEnd(t){t.target.style.height=""}toggleClass(t,i,o){o?(t.classList.add("st-accordion__icon--opened"),i.classList.add("st-accordion__content--visible")):(t.classList.remove("st-accordion__icon--opened"),i.classList.remove("st-accordion__content--visible"))}toggleText(t,i){var o;(o=t.getAttribute(i?"data-accordion-opened-text-param":"data-accordion-closed-text-param"))&&(t.innerHTML=o)}isOpened(t){return t.matches(".st-accordion__icon--opened")}findContent(t){var i=this.getID(t);return this.scope.findElement('[data-accordion-id="'+i+'"]')}getID(t){return t.getAttribute("href").replace(/^#/,"")}}s.values={storeKey:String};export{s as default};
4
+
@@ -0,0 +1,4 @@
1
+ // @stimulus-components/carousel@6.0.0 downloaded from https://ga.jspm.io/npm:@stimulus-components/carousel@6.0.0/dist/stimulus-carousel.mjs
2
+
3
+ import{Controller as t}from"@hotwired/stimulus";import e from"swiper/bundle";const s=class _Carousel extends t{connect(){this.swiper=new e(this.element,{...this.defaultOptions,...this.optionsValue})}disconnect(){this.swiper.destroy(),this.swiper=void 0}get defaultOptions(){return{}}};s.values={options:Object};let i=s;export{i as default};
4
+
@@ -0,0 +1,4 @@
1
+ // card-validator@10.0.2 downloaded from https://ga.jspm.io/npm:card-validator@10.0.2/dist/index.js
2
+
3
+ import*as e from"credit-card-type";var r={};Object.defineProperty(r,"__esModule",{value:true});r.cardholderName=void 0;var t=/^[\d\s-]*$/;var i=255;function verification$6(e,r){return{isValid:e,isPotentiallyValid:r}}function cardholderName(e){return typeof e!=="string"?verification$6(false,false):e.length===0?verification$6(false,true):e.length>i?verification$6(false,false):t.test(e)?verification$6(false,true):verification$6(true,true)}r.cardholderName=cardholderName;var a={};function luhn10$1(e){var r=0;var t=false;var i=e.length-1;var a;while(i>=0){a=parseInt(e.charAt(i),10);if(t){a*=2;a>9&&(a=a%10+1)}t=!t;r+=a;i--}return r%10===0}a=luhn10$1;var n=a;var l=e;try{"default"in e&&(l=e.default)}catch(e){}var o={};Object.defineProperty(o,"__esModule",{value:true});o.cardNumber=void 0;var f=n;var u=l;function verification$5(e,r,t){return{card:e,isPotentiallyValid:r,isValid:t}}function cardNumber(e,r){r===void 0&&(r={});var t,i,a;if(typeof e!=="string"&&typeof e!=="number")return verification$5(null,false,false);var n=String(e).replace(/-|\s/g,"");if(!/^\d*$/.test(n))return verification$5(null,false,false);var l=u(n);if(l.length===0)return verification$5(null,false,false);if(l.length!==1)return verification$5(null,true,false);var o=l[0];if(r.maxLength&&n.length>r.maxLength)return verification$5(o,false,false);i=r.skipLuhnValidation===true||o.type===u.types.UNIONPAY&&r.luhnValidateUnionPay!==true||f(n);a=Math.max.apply(null,o.lengths);r.maxLength&&(a=Math.min(r.maxLength,a));for(var s=0;s<o.lengths.length;s++)if(o.lengths[s]===n.length){t=n.length<a||i;return verification$5(o,t,i)}return verification$5(o,n.length<a,false)}o.cardNumber=cardNumber;var s={};Object.defineProperty(s,"__esModule",{value:true});s.expirationYear=void 0;var v=19;function verification$4(e,r,t){return{isValid:e,isPotentiallyValid:r,isCurrentYear:t||false}}function expirationYear(e,r){r===void 0&&(r=v);var t;if(typeof e!=="string")return verification$4(false,false);if(e.replace(/\s/g,"")==="")return verification$4(false,true);if(!/^\d*$/.test(e))return verification$4(false,false);var i=e.length;if(i<2)return verification$4(false,true);var a=(new Date).getFullYear();if(i===3){var n=e.slice(0,2);var l=String(a).slice(0,2);return verification$4(false,n===l)}if(i>4)return verification$4(false,false);var o=parseInt(e,10);var f=Number(String(a).substr(2,2));var u=false;if(i===2){if(String(a).substr(0,2)===e)return verification$4(false,true);t=f===o;u=o>=f&&o<=f+r}else if(i===4){t=a===o;u=o>=a&&o<=a+r}return verification$4(u,u,t)}s.expirationYear=expirationYear;var c={};Object.defineProperty(c,"__esModule",{value:true});c.isArray=void 0;c.isArray=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"};var d={};Object.defineProperty(d,"__esModule",{value:true});d.parseDate=void 0;var p=s;var h=c;function getNumberOfMonthDigitsInDateString(e){var r=Number(e[0]);var t;if(r===0)return 2;if(r>1)return 1;if(r===1&&Number(e[1])>2)return 1;if(r===1){t=e.substr(1);return(0,p.expirationYear)(t).isPotentiallyValid?1:2}return e.length===5?1:e.length>5?2:1}function parseDate(e){var r;/^\d{4}-\d{1,2}$/.test(e)?r=e.split("-").reverse():/\//.test(e)?r=e.split(/\s*\/\s*/g):/\s/.test(e)&&(r=e.split(/ +/g));if((0,h.isArray)(r))return{month:r[0]||"",year:r.slice(1).join()};var t=getNumberOfMonthDigitsInDateString(e);var i=e.substr(0,t);return{month:i,year:e.substr(i.length)}}d.parseDate=parseDate;var g={};Object.defineProperty(g,"__esModule",{value:true});g.expirationMonth=void 0;function verification$3(e,r,t){return{isValid:e,isPotentiallyValid:r,isValidForThisYear:t||false}}function expirationMonth(e){var r=(new Date).getMonth()+1;if(typeof e!=="string")return verification$3(false,false);if(e.replace(/\s/g,"")===""||e==="0")return verification$3(false,true);if(!/^\d*$/.test(e))return verification$3(false,false);var t=parseInt(e,10);if(isNaN(Number(e)))return verification$3(false,false);var i=t>0&&t<13;return verification$3(i,i,i&&t>=r)}g.expirationMonth=expirationMonth;var y={};var $=y&&y.__assign||function(){$=Object.assign||function(e){for(var r,t=1,i=arguments.length;t<i;t++){r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e};return $.apply(this,arguments)};Object.defineProperty(y,"__esModule",{value:true});y.expirationDate=void 0;var m=d;var b=g;var x=s;function verification$2(e,r,t,i){return{isValid:e,isPotentiallyValid:r,month:t,year:i}}function expirationDate(e,r){var t;if(typeof e==="string"){e=e.replace(/^(\d\d) (\d\d(\d\d)?)$/,"$1/$2");t=(0,m.parseDate)(String(e))}else{if(e===null||typeof e!=="object")return verification$2(false,false,null,null);var i=$({},e);t={month:String(i.month),year:String(i.year)}}var a=(0,b.expirationMonth)(t.month);var n=(0,x.expirationYear)(t.year,r);if(a.isValid){if(n.isCurrentYear){var l=a.isValidForThisYear;return verification$2(l,l,t.month,t.year)}if(n.isValid)return verification$2(true,true,t.month,t.year)}return a.isPotentiallyValid&&n.isPotentiallyValid?verification$2(false,true,null,null):verification$2(false,false,null,null)}y.expirationDate=expirationDate;var _={};Object.defineProperty(_,"__esModule",{value:true});_.cvv=void 0;var P=3;function includes(e,r){for(var t=0;t<e.length;t++)if(r===e[t])return true;return false}function max(e){var r=P;var t=0;for(;t<e.length;t++)r=e[t]>r?e[t]:r;return r}function verification$1(e,r){return{isValid:e,isPotentiallyValid:r}}function cvv(e,r){r===void 0&&(r=P);r=r instanceof Array?r:[r];return typeof e!=="string"?verification$1(false,false):/^\d*$/.test(e)?includes(r,e.length)?verification$1(true,true):e.length<Math.min.apply(null,r)?verification$1(false,true):e.length>max(r)?verification$1(false,false):verification$1(true,true):verification$1(false,false)}_.cvv=cvv;var M={};Object.defineProperty(M,"__esModule",{value:true});M.postalCode=void 0;var O=3;var V=new RegExp(/^[a-z0-9]+$/i);function verification(e,r){return{isValid:e,isPotentiallyValid:r}}function postalCode(e,r){r===void 0&&(r={});var t=r.minLength||O;return typeof e!=="string"?verification(false,false):e.length<t?verification(false,true):V.test(e.trim().slice(0,t))?verification(true,true):verification(false,true)}M.postalCode=postalCode;var j=e;try{"default"in e&&(j=e.default)}catch(e){}var N={};var D=N&&N.__createBinding||(Object.create?function(e,r,t,i){i===void 0&&(i=t);var a=Object.getOwnPropertyDescriptor(r,t);a&&!("get"in a?!r.__esModule:a.writable||a.configurable)||(a={enumerable:true,get:function(){return r[t]}});Object.defineProperty(e,i,a)}:function(e,r,t,i){i===void 0&&(i=t);e[i]=r[t]});var Y=N&&N.__setModuleDefault||(Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:true,value:r})}:function(e,r){e.default=r});var S=N&&N.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var t in e)t!=="default"&&Object.prototype.hasOwnProperty.call(e,t)&&D(r,e,t);Y(r,e);return r};var A=S(j);var C=r;var w=o;var I=y;var L=g;var F=s;var T=_;var U=M;var k={creditCardType:A,cardholderName:C.cardholderName,number:w.cardNumber,expirationDate:I.expirationDate,expirationMonth:L.expirationMonth,expirationYear:F.expirationYear,cvv:T.cvv,postalCode:U.postalCode};N=k;var z=N;export{z as default};
4
+
@@ -0,0 +1,4 @@
1
+ // credit-card-type@10.0.2 downloaded from https://ga.jspm.io/npm:credit-card-type@10.0.2/dist/index.js
2
+
3
+ var e={};var t={visa:{niceType:"Visa",type:"visa",patterns:[4],gaps:[4,8,12],lengths:[16,18,19],code:{name:"CVV",size:3}},mastercard:{niceType:"Mastercard",type:"mastercard",patterns:[[51,55],[2221,2229],[223,229],[23,26],[270,271],2720],gaps:[4,8,12],lengths:[16],code:{name:"CVC",size:3}},"american-express":{niceType:"American Express",type:"american-express",patterns:[34,37],gaps:[4,10],lengths:[15],code:{name:"CID",size:4}},"diners-club":{niceType:"Diners Club",type:"diners-club",patterns:[[300,305],36,38,39],gaps:[4,10],lengths:[14,16,19],code:{name:"CVV",size:3}},discover:{niceType:"Discover",type:"discover",patterns:[6011,[644,649],65],gaps:[4,8,12],lengths:[16,19],code:{name:"CID",size:3}},jcb:{niceType:"JCB",type:"jcb",patterns:[2131,1800,[3528,3589]],gaps:[4,8,12],lengths:[16,17,18,19],code:{name:"CVV",size:3}},unionpay:{niceType:"UnionPay",type:"unionpay",patterns:[620,[62100,62182],[62184,62187],[62185,62197],[62200,62205],[622010,622999],622018,[62207,62209],[623,626],6270,6272,6276,[627700,627779],[627781,627799],[6282,6289],6291,6292,810,[8110,8131],[8132,8151],[8152,8163],[8164,8171]],gaps:[4,8,12],lengths:[14,15,16,17,18,19],code:{name:"CVN",size:3}},maestro:{niceType:"Maestro",type:"maestro",patterns:[493698,[5e5,504174],[504176,506698],[506779,508999],[56,59],63,67,6],gaps:[4,8,12],lengths:[12,13,14,15,16,17,18,19],code:{name:"CVC",size:3}},elo:{niceType:"Elo",type:"elo",patterns:[401178,401179,438935,457631,457632,431274,451416,457393,504175,[506699,506778],[509e3,509999],627780,636297,636368,[650031,650033],[650035,650051],[650405,650439],[650485,650538],[650541,650598],[650700,650718],[650720,650727],[650901,650978],[651652,651679],[655e3,655019],[655021,655058]],gaps:[4,8,12],lengths:[16],code:{name:"CVE",size:3}},mir:{niceType:"Mir",type:"mir",patterns:[[2200,2204]],gaps:[4,8,12],lengths:[16,17,18,19],code:{name:"CVP2",size:3}},hiper:{niceType:"Hiper",type:"hiper",patterns:[637095,63737423,63743358,637568,637599,637609,637612],gaps:[4,8,12],lengths:[16],code:{name:"CVC",size:3}},hipercard:{niceType:"Hipercard",type:"hipercard",patterns:[606282],gaps:[4,8,12],lengths:[16],code:{name:"CVC",size:3}}};e=t;var r=e;var n={};Object.defineProperty(n,"__esModule",{value:true});n.clone=void 0;function clone(e){return e?JSON.parse(JSON.stringify(e)):null}n.clone=clone;var a={};Object.defineProperty(a,"__esModule",{value:true});a.matches=void 0;function matchesRange(e,t,r){var n=String(t).length;var a=e.substr(0,n);var i=parseInt(a,10);t=parseInt(String(t).substr(0,a.length),10);r=parseInt(String(r).substr(0,a.length),10);return i>=t&&i<=r}function matchesPattern(e,t){t=String(t);return t.substring(0,e.length)===e.substring(0,t.length)}function matches(e,t){return Array.isArray(t)?matchesRange(e,t[0],t[1]):matchesPattern(e,t)}a.matches=matches;var i={};Object.defineProperty(i,"__esModule",{value:true});i.addMatchingCardsToResults=void 0;var s=n;var c=a;function addMatchingCardsToResults(e,t,r){var n,a;for(n=0;n<t.patterns.length;n++){var i=t.patterns[n];if((0,c.matches)(e,i)){var p=(0,s.clone)(t);a=Array.isArray(i)?String(i[0]).length:String(i).length;e.length>=a&&(p.matchStrength=a);r.push(p);break}}}i.addMatchingCardsToResults=addMatchingCardsToResults;var p={};Object.defineProperty(p,"__esModule",{value:true});p.isValidInputType=void 0;function isValidInputType(e){return typeof e==="string"||e instanceof String}p.isValidInputType=isValidInputType;var o={};Object.defineProperty(o,"__esModule",{value:true});o.findBestMatch=void 0;function hasEnoughResultsToDetermineBestMatch(e){var t=e.filter((function(e){return e.matchStrength})).length;return t>0&&t===e.length}function findBestMatch(e){return hasEnoughResultsToDetermineBestMatch(e)?e.reduce((function(e,t){return e?Number(e.matchStrength)<Number(t.matchStrength)?t:e:t})):null}o.findBestMatch=findBestMatch;var d={};var u=d&&d.__assign||function(){u=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e};return u.apply(this,arguments)};var l=r;var y=i;var h=p;var g=o;var v=n;var f={};var C={VISA:"visa",MASTERCARD:"mastercard",AMERICAN_EXPRESS:"american-express",DINERS_CLUB:"diners-club",DISCOVER:"discover",JCB:"jcb",UNIONPAY:"unionpay",MAESTRO:"maestro",ELO:"elo",MIR:"mir",HIPER:"hiper",HIPERCARD:"hipercard"};var m=[C.VISA,C.MASTERCARD,C.AMERICAN_EXPRESS,C.DINERS_CLUB,C.DISCOVER,C.JCB,C.UNIONPAY,C.MAESTRO,C.ELO,C.MIR,C.HIPER,C.HIPERCARD];var T=(0,v.clone)(m);function findType(e){return f[e]||l[e]}function getAllCardTypes(){return T.map((function(e){return(0,v.clone)(findType(e))}))}function getCardPosition(e,t){t===void 0&&(t=false);var r=T.indexOf(e);if(!t&&r===-1)throw new Error('"'+e+'" is not a supported card type.');return r}function creditCardType(e){var t=[];if(!(0,h.isValidInputType)(e))return t;if(e.length===0)return getAllCardTypes();T.forEach((function(r){var n=findType(r);(0,y.addMatchingCardsToResults)(e,n,t)}));var r=(0,g.findBestMatch)(t);return r?[r]:t}creditCardType.getTypeInfo=function(e){return(0,v.clone)(findType(e))};creditCardType.removeCard=function(e){var t=getCardPosition(e);T.splice(t,1)};creditCardType.addCard=function(e){var t=getCardPosition(e.type,true);f[e.type]=e;t===-1&&T.push(e.type)};creditCardType.updateCard=function(e,t){var r=f[e]||l[e];if(!r)throw new Error('"'.concat(e,"\" is not a recognized type. Use `addCard` instead.'"));if(t.type&&r.type!==t.type)throw new Error("Cannot overwrite type parameter.");var n=(0,v.clone)(r);n=u(u({},n),t);f[n.type]=n};creditCardType.changeOrder=function(e,t){var r=getCardPosition(e);T.splice(r,1);T.splice(t,0,e)};creditCardType.resetModifications=function(){T=(0,v.clone)(m);f={}};creditCardType.types=C;d=creditCardType;var R=d;export{R as default};
4
+
@@ -0,0 +1,19 @@
1
+ // headroom.js@0.12.0 downloaded from https://ga.jspm.io/npm:headroom.js@0.12.0/dist/headroom.js
2
+
3
+ var t="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:global;var e={};(function(t,o){e=o()})(e,(function(){function isBrowser(){return"undefined"!==typeof window}function passiveEventsSupported(){var t=false;try{var e={get passive(){t=true}};window.addEventListener("test",e,e);window.removeEventListener("test",e,e)}catch(e){t=false}return t}function isSupported(){return!!(isBrowser()&&function(){}.bind&&"classList"in document.documentElement&&Object.assign&&Object.keys&&requestAnimationFrame)}function isDocument(t){return 9===t.nodeType}function isWindow(t){return t&&t.document&&isDocument(t.document)}function windowScroller(t){var e=t.document;var o=e.body;var s=e.documentElement;return{scrollHeight:function(){return Math.max(o.scrollHeight,s.scrollHeight,o.offsetHeight,s.offsetHeight,o.clientHeight,s.clientHeight)},height:function(){return t.innerHeight||s.clientHeight||o.clientHeight},scrollY:function(){return void 0!==t.pageYOffset?t.pageYOffset:(s||o.parentNode||o).scrollTop}}}function elementScroller(t){return{scrollHeight:function(){return Math.max(t.scrollHeight,t.offsetHeight,t.clientHeight)},height:function(){return Math.max(t.offsetHeight,t.clientHeight)},scrollY:function(){return t.scrollTop}}}function createScroller(t){return isWindow(t)?windowScroller(t):elementScroller(t)}
4
+ /**
5
+ * @param element EventTarget
6
+ */function trackScroll(t,e,o){var s=passiveEventsSupported();var n;var i=false;var r=createScroller(t);var a=r.scrollY();var l={};function update(){var t=Math.round(r.scrollY());var s=r.height();var n=r.scrollHeight();l.scrollY=t;l.lastScrollY=a;l.direction=t>a?"down":"up";l.distance=Math.abs(t-a);l.isOutOfBounds=t<0||t+s>n;l.top=t<=e.offset[l.direction];l.bottom=t+s>=n;l.toleranceExceeded=l.distance>e.tolerance[l.direction];o(l);a=t;i=false}function handleScroll(){if(!i){i=true;n=requestAnimationFrame(update)}}var c=!!s&&{passive:true,capture:false};t.addEventListener("scroll",handleScroll,c);update();return{destroy:function(){cancelAnimationFrame(n);t.removeEventListener("scroll",handleScroll,c)}}}function normalizeUpDown(t){return t===Object(t)?t:{down:t,up:t}}
7
+ /**
8
+ * UI enhancement for fixed headers.
9
+ * Hides header when scrolling down
10
+ * Shows header when scrolling up
11
+ * @constructor
12
+ * @param {DOMElement} elem the header element
13
+ * @param {Object} options options for the widget
14
+ */function Headroom(e,o){o=o||{};Object.assign(this||t,Headroom.options,o);(this||t).classes=Object.assign({},Headroom.options.classes,o.classes);(this||t).elem=e;(this||t).tolerance=normalizeUpDown((this||t).tolerance);(this||t).offset=normalizeUpDown((this||t).offset);(this||t).initialised=false;(this||t).frozen=false}Headroom.prototype={constructor:Headroom,init:function(){if(Headroom.cutsTheMustard&&!(this||t).initialised){this.addClass("initial");(this||t).initialised=true;setTimeout((function(t){t.scrollTracker=trackScroll(t.scroller,{offset:t.offset,tolerance:t.tolerance},t.update.bind(t))}),100,this||t)}return this||t},destroy:function(){(this||t).initialised=false;Object.keys((this||t).classes).forEach((this||t).removeClass,this||t);(this||t).scrollTracker.destroy()},unpin:function(){if(this.hasClass("pinned")||!this.hasClass("unpinned")){this.addClass("unpinned");this.removeClass("pinned");(this||t).onUnpin&&(this||t).onUnpin.call(this||t)}},pin:function(){if(this.hasClass("unpinned")){this.addClass("pinned");this.removeClass("unpinned");(this||t).onPin&&(this||t).onPin.call(this||t)}},freeze:function(){(this||t).frozen=true;this.addClass("frozen")},unfreeze:function(){(this||t).frozen=false;this.removeClass("frozen")},top:function(){if(!this.hasClass("top")){this.addClass("top");this.removeClass("notTop");(this||t).onTop&&(this||t).onTop.call(this||t)}},notTop:function(){if(!this.hasClass("notTop")){this.addClass("notTop");this.removeClass("top");(this||t).onNotTop&&(this||t).onNotTop.call(this||t)}},bottom:function(){if(!this.hasClass("bottom")){this.addClass("bottom");this.removeClass("notBottom");(this||t).onBottom&&(this||t).onBottom.call(this||t)}},notBottom:function(){if(!this.hasClass("notBottom")){this.addClass("notBottom");this.removeClass("bottom");(this||t).onNotBottom&&(this||t).onNotBottom.call(this||t)}},shouldUnpin:function(t){var e="down"===t.direction;return e&&!t.top&&t.toleranceExceeded},shouldPin:function(t){var e="up"===t.direction;return e&&t.toleranceExceeded||t.top},addClass:function(e){(this||t).elem.classList.add.apply((this||t).elem.classList,(this||t).classes[e].split(" "))},removeClass:function(e){(this||t).elem.classList.remove.apply((this||t).elem.classList,(this||t).classes[e].split(" "))},hasClass:function(e){return(this||t).classes[e].split(" ").every((function(e){return(this||t).classList.contains(e)}),(this||t).elem)},update:function(e){if(!e.isOutOfBounds&&true!==(this||t).frozen){e.top?this.top():this.notTop();e.bottom?this.bottom():this.notBottom();this.shouldUnpin(e)?this.unpin():this.shouldPin(e)&&this.pin()}}};
15
+ /**
16
+ * Default options
17
+ * @type {Object}
18
+ */Headroom.options={tolerance:{up:0,down:0},offset:0,scroller:isBrowser()?window:null,classes:{frozen:"headroom--frozen",pinned:"headroom--pinned",unpinned:"headroom--unpinned",top:"headroom--top",notTop:"headroom--not-top",bottom:"headroom--bottom",notBottom:"headroom--not-bottom",initial:"headroom"}};Headroom.cutsTheMustard=isSupported();return Headroom}));var o=e;export default o;
19
+
@@ -0,0 +1,4 @@
1
+ // nouislider@15.8.1 downloaded from https://ga.jspm.io/npm:nouislider@15.8.1/dist/nouislider.mjs
2
+
3
+ var e;(function(e){e.Range="range";e.Steps="steps";e.Positions="positions";e.Count="count";e.Values="values"})(e||(e={}));var t;(function(e){e[e.None=-1]="None";e[e.NoValue=0]="NoValue";e[e.LargeValue=1]="LargeValue";e[e.SmallValue=2]="SmallValue"})(t||(t={}));function isValidFormatter(e){return isValidPartialFormatter(e)&&typeof e.from==="function"}function isValidPartialFormatter(e){return typeof e==="object"&&typeof e.to==="function"}function removeElement(e){e.parentElement.removeChild(e)}function isSet(e){return e!==null&&e!==void 0}function preventDefault(e){e.preventDefault()}function unique(e){return e.filter((function(e){return!this[e]&&(this[e]=true)}),{})}function closest(e,t){return Math.round(e/t)*t}function offset(e,t){var r=e.getBoundingClientRect();var a=e.ownerDocument;var n=a.documentElement;var i=getPageOffset(a);/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(i.x=0);return t?r.top+i.y-n.clientTop:r.left+i.x-n.clientLeft}function isNumeric(e){return typeof e==="number"&&!isNaN(e)&&isFinite(e)}function addClassFor(e,t,r){if(r>0){addClass(e,t);setTimeout((function(){removeClass(e,t)}),r)}}function limit(e){return Math.max(Math.min(e,100),0)}function asArray(e){return Array.isArray(e)?e:[e]}function countDecimals(e){e=String(e);var t=e.split(".");return t.length>1?t[1].length:0}function addClass(e,t){e.classList&&!/\s/.test(t)?e.classList.add(t):e.className+=" "+t}function removeClass(e,t){e.classList&&!/\s/.test(t)?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")}function hasClass(e,t){return e.classList?e.classList.contains(t):new RegExp("\\b"+t+"\\b").test(e.className)}function getPageOffset(e){var t=window.pageXOffset!==void 0;var r=(e.compatMode||"")==="CSS1Compat";var a=t?window.pageXOffset:r?e.documentElement.scrollLeft:e.body.scrollLeft;var n=t?window.pageYOffset:r?e.documentElement.scrollTop:e.body.scrollTop;return{x:a,y:n}}function getActions(){return window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"}}function getSupportsPassive(){var e=false;try{var t=Object.defineProperty({},"passive",{get:function(){e=true}});window.addEventListener("test",null,t)}catch(e){}return e}function getSupportsTouchActionNone(){return window.CSS&&CSS.supports&&CSS.supports("touch-action","none")}function subRangeRatio(e,t){return 100/(t-e)}function fromPercentage(e,t,r){return t*100/(e[r+1]-e[r])}function toPercentage(e,t){return fromPercentage(e,e[0]<0?t+Math.abs(e[0]):t-e[0],0)}function isPercentage(e,t){return t*(e[1]-e[0])/100+e[0]}function getJ(e,t){var r=1;while(e>=t[r])r+=1;return r}function toStepping(e,t,r){if(r>=e.slice(-1)[0])return 100;var a=getJ(r,e);var n=e[a-1];var i=e[a];var s=t[a-1];var o=t[a];return s+toPercentage([n,i],r)/subRangeRatio(s,o)}function fromStepping(e,t,r){if(r>=100)return e.slice(-1)[0];var a=getJ(r,t);var n=e[a-1];var i=e[a];var s=t[a-1];var o=t[a];return isPercentage([n,i],(r-s)*subRangeRatio(s,o))}function getStep(e,t,r,a){if(a===100)return a;var n=getJ(a,e);var i=e[n-1];var s=e[n];return r?a-i>(s-i)/2?s:i:t[n-1]?e[n-1]+closest(a-e[n-1],t[n-1]):a}var r=function(){function Spectrum(e,t,r){this.xPct=[];this.xVal=[];this.xSteps=[];this.xNumSteps=[];this.xHighestCompleteStep=[];this.xSteps=[r||false];this.xNumSteps=[false];this.snap=t;var a;var n=[];Object.keys(e).forEach((function(t){n.push([asArray(e[t]),t])}));n.sort((function(e,t){return e[0][0]-t[0][0]}));for(a=0;a<n.length;a++)this.handleEntryPoint(n[a][1],n[a][0]);this.xNumSteps=this.xSteps.slice(0);for(a=0;a<this.xNumSteps.length;a++)this.handleStepPoint(a,this.xNumSteps[a])}Spectrum.prototype.getDistance=function(e){var t=[];for(var r=0;r<this.xNumSteps.length-1;r++)t[r]=fromPercentage(this.xVal,e,r);return t};Spectrum.prototype.getAbsoluteDistance=function(e,t,r){var a=0;if(e<this.xPct[this.xPct.length-1])while(e>this.xPct[a+1])a++;else e===this.xPct[this.xPct.length-1]&&(a=this.xPct.length-2);r||e!==this.xPct[a+1]||a++;t===null&&(t=[]);var n;var i=1;var s=t[a];var o=0;var l=0;var u=0;var c=0;n=r?(e-this.xPct[a])/(this.xPct[a+1]-this.xPct[a]):(this.xPct[a+1]-e)/(this.xPct[a+1]-this.xPct[a]);while(s>0){o=this.xPct[a+1+c]-this.xPct[a+c];if(t[a+c]*i+100-n*100>100){l=o*n;i=(s-100*n)/t[a+c];n=1}else{l=t[a+c]*o/100*i;i=0}if(r){u-=l;this.xPct.length+c>=1&&c--}else{u+=l;this.xPct.length-c>=1&&c++}s=t[a+c]*i}return e+u};Spectrum.prototype.toStepping=function(e){e=toStepping(this.xVal,this.xPct,e);return e};Spectrum.prototype.fromStepping=function(e){return fromStepping(this.xVal,this.xPct,e)};Spectrum.prototype.getStep=function(e){e=getStep(this.xPct,this.xSteps,this.snap,e);return e};Spectrum.prototype.getDefaultStep=function(e,t,r){var a=getJ(e,this.xPct);(e===100||t&&e===this.xPct[a-1])&&(a=Math.max(a-1,1));return(this.xVal[a]-this.xVal[a-1])/r};Spectrum.prototype.getNearbySteps=function(e){var t=getJ(e,this.xPct);return{stepBefore:{startValue:this.xVal[t-2],step:this.xNumSteps[t-2],highestStep:this.xHighestCompleteStep[t-2]},thisStep:{startValue:this.xVal[t-1],step:this.xNumSteps[t-1],highestStep:this.xHighestCompleteStep[t-1]},stepAfter:{startValue:this.xVal[t],step:this.xNumSteps[t],highestStep:this.xHighestCompleteStep[t]}}};Spectrum.prototype.countStepDecimals=function(){var e=this.xNumSteps.map(countDecimals);return Math.max.apply(null,e)};Spectrum.prototype.hasNoSize=function(){return this.xVal[0]===this.xVal[this.xVal.length-1]};Spectrum.prototype.convert=function(e){return this.getStep(this.toStepping(e))};Spectrum.prototype.handleEntryPoint=function(e,t){var r;r=e==="min"?0:e==="max"?100:parseFloat(e);if(!isNumeric(r)||!isNumeric(t[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");this.xPct.push(r);this.xVal.push(t[0]);var a=Number(t[1]);r?this.xSteps.push(!isNaN(a)&&a):isNaN(a)||(this.xSteps[0]=a);this.xHighestCompleteStep.push(0)};Spectrum.prototype.handleStepPoint=function(e,t){if(t)if(this.xVal[e]!==this.xVal[e+1]){this.xSteps[e]=fromPercentage([this.xVal[e],this.xVal[e+1]],t,0)/subRangeRatio(this.xPct[e],this.xPct[e+1]);var r=(this.xVal[e+1]-this.xVal[e])/this.xNumSteps[e];var a=Math.ceil(Number(r.toFixed(3))-1);var n=this.xVal[e]+this.xNumSteps[e]*a;this.xHighestCompleteStep[e]=n}else this.xSteps[e]=this.xHighestCompleteStep[e]=this.xVal[e]};return Spectrum}();var a={to:function(e){return e===void 0?"":e.toFixed(2)},from:Number};var n={target:"target",base:"base",origin:"origin",handle:"handle",handleLower:"handle-lower",handleUpper:"handle-upper",touchArea:"touch-area",horizontal:"horizontal",vertical:"vertical",background:"background",connect:"connect",connects:"connects",ltr:"ltr",rtl:"rtl",textDirectionLtr:"txt-dir-ltr",textDirectionRtl:"txt-dir-rtl",draggable:"draggable",drag:"state-drag",tap:"state-tap",active:"active",tooltip:"tooltip",pips:"pips",pipsHorizontal:"pips-horizontal",pipsVertical:"pips-vertical",marker:"marker",markerHorizontal:"marker-horizontal",markerVertical:"marker-vertical",markerNormal:"marker-normal",markerLarge:"marker-large",markerSub:"marker-sub",value:"value",valueHorizontal:"value-horizontal",valueVertical:"value-vertical",valueNormal:"value-normal",valueLarge:"value-large",valueSub:"value-sub"};var i={tooltips:".__tooltips",aria:".__aria"};function testStep(e,t){if(!isNumeric(t))throw new Error("noUiSlider: 'step' is not numeric.");e.singleStep=t}function testKeyboardPageMultiplier(e,t){if(!isNumeric(t))throw new Error("noUiSlider: 'keyboardPageMultiplier' is not numeric.");e.keyboardPageMultiplier=t}function testKeyboardMultiplier(e,t){if(!isNumeric(t))throw new Error("noUiSlider: 'keyboardMultiplier' is not numeric.");e.keyboardMultiplier=t}function testKeyboardDefaultStep(e,t){if(!isNumeric(t))throw new Error("noUiSlider: 'keyboardDefaultStep' is not numeric.");e.keyboardDefaultStep=t}function testRange(e,t){if(typeof t!=="object"||Array.isArray(t))throw new Error("noUiSlider: 'range' is not an object.");if(t.min===void 0||t.max===void 0)throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");e.spectrum=new r(t,e.snap||false,e.singleStep)}function testStart(e,t){t=asArray(t);if(!Array.isArray(t)||!t.length)throw new Error("noUiSlider: 'start' option is incorrect.");e.handles=t.length;e.start=t}function testSnap(e,t){if(typeof t!=="boolean")throw new Error("noUiSlider: 'snap' option must be a boolean.");e.snap=t}function testAnimate(e,t){if(typeof t!=="boolean")throw new Error("noUiSlider: 'animate' option must be a boolean.");e.animate=t}function testAnimationDuration(e,t){if(typeof t!=="number")throw new Error("noUiSlider: 'animationDuration' option must be a number.");e.animationDuration=t}function testConnect(e,t){var r=[false];var a;t==="lower"?t=[true,false]:t==="upper"&&(t=[false,true]);if(t===true||t===false){for(a=1;a<e.handles;a++)r.push(t);r.push(false)}else{if(!Array.isArray(t)||!t.length||t.length!==e.handles+1)throw new Error("noUiSlider: 'connect' option doesn't match handle count.");r=t}e.connect=r}function testOrientation(e,t){switch(t){case"horizontal":e.ort=0;break;case"vertical":e.ort=1;break;default:throw new Error("noUiSlider: 'orientation' option is invalid.")}}function testMargin(e,t){if(!isNumeric(t))throw new Error("noUiSlider: 'margin' option must be numeric.");t!==0&&(e.margin=e.spectrum.getDistance(t))}function testLimit(e,t){if(!isNumeric(t))throw new Error("noUiSlider: 'limit' option must be numeric.");e.limit=e.spectrum.getDistance(t);if(!e.limit||e.handles<2)throw new Error("noUiSlider: 'limit' option is only supported on linear sliders with 2 or more handles.")}function testPadding(e,t){var r;if(!isNumeric(t)&&!Array.isArray(t))throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");if(Array.isArray(t)&&!(t.length===2||isNumeric(t[0])||isNumeric(t[1])))throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");if(t!==0){Array.isArray(t)||(t=[t,t]);e.padding=[e.spectrum.getDistance(t[0]),e.spectrum.getDistance(t[1])];for(r=0;r<e.spectrum.xNumSteps.length-1;r++)if(e.padding[0][r]<0||e.padding[1][r]<0)throw new Error("noUiSlider: 'padding' option must be a positive number(s).");var a=t[0]+t[1];var n=e.spectrum.xVal[0];var i=e.spectrum.xVal[e.spectrum.xVal.length-1];if(a/(i-n)>1)throw new Error("noUiSlider: 'padding' option must not exceed 100% of the range.")}}function testDirection(e,t){switch(t){case"ltr":e.dir=0;break;case"rtl":e.dir=1;break;default:throw new Error("noUiSlider: 'direction' option was not recognized.")}}function testBehaviour(e,t){if(typeof t!=="string")throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var r=t.indexOf("tap")>=0;var a=t.indexOf("drag")>=0;var n=t.indexOf("fixed")>=0;var i=t.indexOf("snap")>=0;var s=t.indexOf("hover")>=0;var o=t.indexOf("unconstrained")>=0;var l=t.indexOf("invert-connects")>=0;var u=t.indexOf("drag-all")>=0;var c=t.indexOf("smooth-steps")>=0;if(n){if(e.handles!==2)throw new Error("noUiSlider: 'fixed' behaviour must be used with 2 handles");testMargin(e,e.start[1]-e.start[0])}if(l&&e.handles!==2)throw new Error("noUiSlider: 'invert-connects' behaviour must be used with 2 handles");if(o&&(e.margin||e.limit))throw new Error("noUiSlider: 'unconstrained' behaviour cannot be used with margin or limit");e.events={tap:r||i,drag:a,dragAll:u,smoothSteps:c,fixed:n,snap:i,hover:s,unconstrained:o,invertConnects:l}}function testTooltips(e,t){if(t!==false)if(t===true||isValidPartialFormatter(t)){e.tooltips=[];for(var r=0;r<e.handles;r++)e.tooltips.push(t)}else{t=asArray(t);if(t.length!==e.handles)throw new Error("noUiSlider: must pass a formatter for all handles.");t.forEach((function(e){if(typeof e!=="boolean"&&!isValidPartialFormatter(e))throw new Error("noUiSlider: 'tooltips' must be passed a formatter or 'false'.")}));e.tooltips=t}}function testHandleAttributes(e,t){if(t.length!==e.handles)throw new Error("noUiSlider: must pass a attributes for all handles.");e.handleAttributes=t}function testAriaFormat(e,t){if(!isValidPartialFormatter(t))throw new Error("noUiSlider: 'ariaFormat' requires 'to' method.");e.ariaFormat=t}function testFormat(e,t){if(!isValidFormatter(t))throw new Error("noUiSlider: 'format' requires 'to' and 'from' methods.");e.format=t}function testKeyboardSupport(e,t){if(typeof t!=="boolean")throw new Error("noUiSlider: 'keyboardSupport' option must be a boolean.");e.keyboardSupport=t}function testDocumentElement(e,t){e.documentElement=t}function testCssPrefix(e,t){if(typeof t!=="string"&&t!==false)throw new Error("noUiSlider: 'cssPrefix' must be a string or `false`.");e.cssPrefix=t}function testCssClasses(e,t){if(typeof t!=="object")throw new Error("noUiSlider: 'cssClasses' must be an object.");if(typeof e.cssPrefix==="string"){e.cssClasses={};Object.keys(t).forEach((function(r){e.cssClasses[r]=e.cssPrefix+t[r]}))}else e.cssClasses=t}function testOptions(e){var t={margin:null,limit:null,padding:null,animate:true,animationDuration:300,ariaFormat:a,format:a};var r={step:{r:false,t:testStep},keyboardPageMultiplier:{r:false,t:testKeyboardPageMultiplier},keyboardMultiplier:{r:false,t:testKeyboardMultiplier},keyboardDefaultStep:{r:false,t:testKeyboardDefaultStep},start:{r:true,t:testStart},connect:{r:true,t:testConnect},direction:{r:true,t:testDirection},snap:{r:false,t:testSnap},animate:{r:false,t:testAnimate},animationDuration:{r:false,t:testAnimationDuration},range:{r:true,t:testRange},orientation:{r:false,t:testOrientation},margin:{r:false,t:testMargin},limit:{r:false,t:testLimit},padding:{r:false,t:testPadding},behaviour:{r:true,t:testBehaviour},ariaFormat:{r:false,t:testAriaFormat},format:{r:false,t:testFormat},tooltips:{r:false,t:testTooltips},keyboardSupport:{r:true,t:testKeyboardSupport},documentElement:{r:false,t:testDocumentElement},cssPrefix:{r:true,t:testCssPrefix},cssClasses:{r:true,t:testCssClasses},handleAttributes:{r:false,t:testHandleAttributes}};var i={connect:false,direction:"ltr",behaviour:"tap",orientation:"horizontal",keyboardSupport:true,cssPrefix:"noUi-",cssClasses:n,keyboardPageMultiplier:5,keyboardMultiplier:1,keyboardDefaultStep:10};e.format&&!e.ariaFormat&&(e.ariaFormat=e.format);Object.keys(r).forEach((function(a){if(isSet(e[a])||i[a]!==void 0)r[a].t(t,isSet(e[a])?e[a]:i[a]);else if(r[a].r)throw new Error("noUiSlider: '"+a+"' is required.")}));t.pips=e.pips;var s=document.createElement("div");var o=s.style.msTransform!==void 0;var l=s.style.transform!==void 0;t.transformRule=l?"transform":o?"msTransform":"webkitTransform";var u=[["left","top"],["right","bottom"]];t.style=u[t.dir][t.ort];return t}function scope(r,a,n){var s=getActions();var o=getSupportsTouchActionNone();var l=o&&getSupportsPassive();var u=r;var c;var f;var d;var p;var v;var h;var m=a.spectrum;var g=[];var S=[];var b=[];var x=0;var E={};var y=false;var C=r.ownerDocument;var w=a.documentElement||C.documentElement;var N=C.body;var P=C.dir==="rtl"||a.ort===1?0:100;function addNodeTo(e,t){var r=C.createElement("div");t&&addClass(r,t);e.appendChild(r);return r}function addOrigin(e,t){var r=addNodeTo(e,a.cssClasses.origin);var n=addNodeTo(r,a.cssClasses.handle);addNodeTo(n,a.cssClasses.touchArea);n.setAttribute("data-handle",String(t));if(a.keyboardSupport){n.setAttribute("tabindex","0");n.addEventListener("keydown",(function(e){return eventKeydown(e,t)}))}if(a.handleAttributes!==void 0){var i=a.handleAttributes[t];Object.keys(i).forEach((function(e){n.setAttribute(e,i[e])}))}n.setAttribute("role","slider");n.setAttribute("aria-orientation",a.ort?"vertical":"horizontal");t===0?addClass(n,a.cssClasses.handleLower):t===a.handles-1&&addClass(n,a.cssClasses.handleUpper);r.handle=n;return r}function addConnect(e,t){return!!t&&addNodeTo(e,a.cssClasses.connect)}function addElements(e,t){f=addNodeTo(t,a.cssClasses.connects);d=[];p=[];p.push(addConnect(f,e[0]));for(var r=0;r<a.handles;r++){d.push(addOrigin(t,r));b[r]=r;p.push(addConnect(f,e[r+1]))}}function addSlider(e){addClass(e,a.cssClasses.target);a.dir===0?addClass(e,a.cssClasses.ltr):addClass(e,a.cssClasses.rtl);a.ort===0?addClass(e,a.cssClasses.horizontal):addClass(e,a.cssClasses.vertical);var t=getComputedStyle(e).direction;addClass(e,t==="rtl"?a.cssClasses.textDirectionRtl:a.cssClasses.textDirectionLtr);return addNodeTo(e,a.cssClasses.base)}function addTooltip(e,t){return!(!a.tooltips||!a.tooltips[t])&&addNodeTo(e.firstChild,a.cssClasses.tooltip)}function isSliderDisabled(){return u.hasAttribute("disabled")}function isHandleDisabled(e){var t=d[e];return t.hasAttribute("disabled")}function disable(e){if(e!==null&&e!==void 0){d[e].setAttribute("disabled","");d[e].handle.removeAttribute("tabindex")}else{u.setAttribute("disabled","");d.forEach((function(e){e.handle.removeAttribute("tabindex")}))}}function enable(e){if(e!==null&&e!==void 0){d[e].removeAttribute("disabled");d[e].handle.setAttribute("tabindex","0")}else{u.removeAttribute("disabled");d.forEach((function(e){e.removeAttribute("disabled");e.handle.setAttribute("tabindex","0")}))}}function removeTooltips(){if(h){removeEvent("update"+i.tooltips);h.forEach((function(e){e&&removeElement(e)}));h=null}}function tooltips(){removeTooltips();h=d.map(addTooltip);bindEvent("update"+i.tooltips,(function(e,t,r){if(h&&a.tooltips&&h[t]!==false){var n=e[t];a.tooltips[t]!==true&&(n=a.tooltips[t].to(r[t]));h[t].innerHTML=n}}))}function aria(){removeEvent("update"+i.aria);bindEvent("update"+i.aria,(function(e,t,r,n,i){b.forEach((function(e){var t=d[e];var n=checkHandlePosition(S,e,0,true,true,true);var s=checkHandlePosition(S,e,100,true,true,true);var o=i[e];var l=String(a.ariaFormat.to(r[e]));n=m.fromStepping(n).toFixed(1);s=m.fromStepping(s).toFixed(1);o=m.fromStepping(o).toFixed(1);t.children[0].setAttribute("aria-valuemin",n);t.children[0].setAttribute("aria-valuemax",s);t.children[0].setAttribute("aria-valuenow",o);t.children[0].setAttribute("aria-valuetext",l)}))}))}function getGroup(t){if(t.mode===e.Range||t.mode===e.Steps)return m.xVal;if(t.mode===e.Count){if(t.values<2)throw new Error("noUiSlider: 'values' (>= 2) required for mode 'count'.");var r=t.values-1;var a=100/r;var n=[];while(r--)n[r]=r*a;n.push(100);return mapToRange(n,t.stepped)}return t.mode===e.Positions?mapToRange(t.values,t.stepped):t.mode===e.Values?t.stepped?t.values.map((function(e){return m.fromStepping(m.getStep(m.toStepping(e)))})):t.values:[]}function mapToRange(e,t){return e.map((function(e){return m.fromStepping(t?m.getStep(e):e)}))}function generateSpread(r){function safeIncrement(e,t){return Number((e+t).toFixed(7))}var a=getGroup(r);var n={};var i=m.xVal[0];var s=m.xVal[m.xVal.length-1];var o=false;var l=false;var u=0;a=unique(a.slice().sort((function(e,t){return e-t})));if(a[0]!==i){a.unshift(i);o=true}if(a[a.length-1]!==s){a.push(s);l=true}a.forEach((function(i,s){var c;var f;var d;var p=i;var v=a[s+1];var h;var g;var S;var b;var x;var E;var y;var C=r.mode===e.Steps;C&&(c=m.xNumSteps[s]);c||(c=v-p);v===void 0&&(v=p);c=Math.max(c,1e-7);for(f=p;f<=v;f=safeIncrement(f,c)){h=m.toStepping(f);g=h-u;x=g/(r.density||1);E=Math.round(x);y=g/E;for(d=1;d<=E;d+=1){S=u+d*y;n[S.toFixed(5)]=[m.fromStepping(S),0]}b=a.indexOf(f)>-1?t.LargeValue:C?t.SmallValue:t.NoValue;!s&&o&&f!==v&&(b=0);f===v&&l||(n[h.toFixed(5)]=[f,b]);u=h}}));return n}function addMarking(e,r,n){var i,s;var o=C.createElement("div");var l=(i={},i[t.None]="",i[t.NoValue]=a.cssClasses.valueNormal,i[t.LargeValue]=a.cssClasses.valueLarge,i[t.SmallValue]=a.cssClasses.valueSub,i);var u=(s={},s[t.None]="",s[t.NoValue]=a.cssClasses.markerNormal,s[t.LargeValue]=a.cssClasses.markerLarge,s[t.SmallValue]=a.cssClasses.markerSub,s);var c=[a.cssClasses.valueHorizontal,a.cssClasses.valueVertical];var f=[a.cssClasses.markerHorizontal,a.cssClasses.markerVertical];addClass(o,a.cssClasses.pips);addClass(o,a.ort===0?a.cssClasses.pipsHorizontal:a.cssClasses.pipsVertical);function getClasses(e,t){var r=t===a.cssClasses.value;var n=r?c:f;var i=r?l:u;return t+" "+n[a.ort]+" "+i[e]}function addSpread(e,i,s){s=r?r(i,s):s;if(s!==t.None){var l=addNodeTo(o,false);l.className=getClasses(s,a.cssClasses.marker);l.style[a.style]=e+"%";if(s>t.NoValue){l=addNodeTo(o,false);l.className=getClasses(s,a.cssClasses.value);l.setAttribute("data-value",String(i));l.style[a.style]=e+"%";l.innerHTML=String(n.to(i))}}}Object.keys(e).forEach((function(t){addSpread(t,e[t][0],e[t][1])}));return o}function removePips(){if(v){removeElement(v);v=null}}function pips(e){removePips();var t=generateSpread(e);var r=e.filter;var a=e.format||{to:function(e){return String(Math.round(e))}};v=u.appendChild(addMarking(t,r,a));return v}function baseSize(){var e=c.getBoundingClientRect();var t="offset"+["Width","Height"][a.ort];return a.ort===0?e.width||c[t]:e.height||c[t]}function attachEvent(e,t,r,n){var method=function(i){var o=fixEvent(i,n.pageOffset,n.target||t);if(!o)return false;if(isSliderDisabled()&&!n.doNotReject)return false;if(hasClass(u,a.cssClasses.tap)&&!n.doNotReject)return false;if(e===s.start&&o.buttons!==void 0&&o.buttons>1)return false;if(n.hover&&o.buttons)return false;l||o.preventDefault();o.calcPoint=o.points[a.ort];r(o,n)};var i=[];e.split(" ").forEach((function(e){t.addEventListener(e,method,!!l&&{passive:true});i.push([e,method])}));return i}function fixEvent(e,t,r){var a=e.type.indexOf("touch")===0;var n=e.type.indexOf("mouse")===0;var i=e.type.indexOf("pointer")===0;var s=0;var o=0;e.type.indexOf("MSPointer")===0&&(i=true);if(e.type==="mousedown"&&!e.buttons&&!e.touches)return false;if(a){var isTouchOnTarget=function(t){var a=t.target;return a===r||r.contains(a)||e.composed&&e.composedPath().shift()===r};if(e.type==="touchstart"){var l=Array.prototype.filter.call(e.touches,isTouchOnTarget);if(l.length>1)return false;s=l[0].pageX;o=l[0].pageY}else{var u=Array.prototype.find.call(e.changedTouches,isTouchOnTarget);if(!u)return false;s=u.pageX;o=u.pageY}}t=t||getPageOffset(C);if(n||i){s=e.clientX+t.x;o=e.clientY+t.y}e.pageOffset=t;e.points=[s,o];e.cursor=n||i;return e}function calcPointToPercentage(e){var t=e-offset(c,a.ort);var r=t*100/baseSize();r=limit(r);return a.dir?100-r:r}function getClosestHandle(e){var t=100;var r=false;d.forEach((function(a,n){if(!isHandleDisabled(n)){var i=S[n];var s=Math.abs(i-e);var o=s===100&&t===100;var l=s<t;var u=s<=t&&e>i;if(l||u||o){r=n;t=s}}}));return r}function documentLeave(e,t){e.type==="mouseout"&&e.target.nodeName==="HTML"&&e.relatedTarget===null&&eventEnd(e,t)}function eventMove(e,t){if(navigator.appVersion.indexOf("MSIE 9")===-1&&e.buttons===0&&t.buttonsProperty!==0)return eventEnd(e,t);var r=(a.dir?-1:1)*(e.calcPoint-t.startCalcPoint);var n=r*100/t.baseSize;moveHandles(r>0,n,t.locations,t.handleNumbers,t.connect)}function eventEnd(e,t){if(t.handle){removeClass(t.handle,a.cssClasses.active);x-=1}t.listeners.forEach((function(e){w.removeEventListener(e[0],e[1])}));if(x===0){removeClass(u,a.cssClasses.drag);setZindex();if(e.cursor){N.style.cursor="";N.removeEventListener("selectstart",preventDefault)}}if(a.events.smoothSteps){t.handleNumbers.forEach((function(e){setHandle(e,S[e],true,true,false,false)}));t.handleNumbers.forEach((function(e){fireEvent("update",e)}))}t.handleNumbers.forEach((function(e){fireEvent("change",e);fireEvent("set",e);fireEvent("end",e)}))}function eventStart(e,t){if(!t.handleNumbers.some(isHandleDisabled)){var r;if(t.handleNumbers.length===1){var n=d[t.handleNumbers[0]];r=n.children[0];x+=1;addClass(r,a.cssClasses.active)}e.stopPropagation();var i=[];var o=attachEvent(s.move,w,eventMove,{target:e.target,handle:r,connect:t.connect,listeners:i,startCalcPoint:e.calcPoint,baseSize:baseSize(),pageOffset:e.pageOffset,handleNumbers:t.handleNumbers,buttonsProperty:e.buttons,locations:S.slice()});var l=attachEvent(s.end,w,eventEnd,{target:e.target,handle:r,listeners:i,doNotReject:true,handleNumbers:t.handleNumbers});var c=attachEvent("mouseout",w,documentLeave,{target:e.target,handle:r,listeners:i,doNotReject:true,handleNumbers:t.handleNumbers});i.push.apply(i,o.concat(l,c));if(e.cursor){N.style.cursor=getComputedStyle(e.target).cursor;d.length>1&&addClass(u,a.cssClasses.drag);N.addEventListener("selectstart",preventDefault,false)}t.handleNumbers.forEach((function(e){fireEvent("start",e)}))}}function eventTap(e){e.stopPropagation();var t=calcPointToPercentage(e.calcPoint);var r=getClosestHandle(t);if(r!==false){a.events.snap||addClassFor(u,a.cssClasses.tap,a.animationDuration);setHandle(r,t,true,true);setZindex();fireEvent("slide",r,true);fireEvent("update",r,true);if(a.events.snap)eventStart(e,{handleNumbers:[r]});else{fireEvent("change",r,true);fireEvent("set",r,true)}}}function eventHover(e){var t=calcPointToPercentage(e.calcPoint);var r=m.getStep(t);var a=m.fromStepping(r);Object.keys(E).forEach((function(e){"hover"===e.split(".")[0]&&E[e].forEach((function(e){e.call(A,a)}))}))}function eventKeydown(e,t){if(isSliderDisabled()||isHandleDisabled(t))return false;var r=["Left","Right"];var n=["Down","Up"];var i=["PageDown","PageUp"];var s=["Home","End"];if(a.dir&&!a.ort)r.reverse();else if(a.ort&&!a.dir){n.reverse();i.reverse()}var o=e.key.replace("Arrow","");var l=o===i[0];var u=o===i[1];var c=o===n[0]||o===r[0]||l;var f=o===n[1]||o===r[1]||u;var d=o===s[0];var p=o===s[1];if(!c&&!f&&!d&&!p)return true;e.preventDefault();var v;if(f||c){var h=c?0:1;var b=getNextStepsForHandle(t);var x=b[h];if(x===null)return false;x===false&&(x=m.getDefaultStep(S[t],c,a.keyboardDefaultStep));x*=u||l?a.keyboardPageMultiplier:a.keyboardMultiplier;x=Math.max(x,1e-7);x*=c?-1:1;v=g[t]+x}else v=p?a.spectrum.xVal[a.spectrum.xVal.length-1]:a.spectrum.xVal[0];setHandle(t,m.toStepping(v),true,true);fireEvent("slide",t);fireEvent("update",t);fireEvent("change",t);fireEvent("set",t);return false}function bindSliderEvents(e){e.fixed||d.forEach((function(e,t){attachEvent(s.start,e.children[0],eventStart,{handleNumbers:[t]})}));e.tap&&attachEvent(s.start,c,eventTap,{});e.hover&&attachEvent(s.move,c,eventHover,{hover:true});e.drag&&p.forEach((function(t,r){if(t!==false&&r!==0&&r!==p.length-1){var n=d[r-1];var i=d[r];var o=[t];var l=[n,i];var u=[r-1,r];addClass(t,a.cssClasses.draggable);if(e.fixed){o.push(n.children[0]);o.push(i.children[0])}if(e.dragAll){l=d;u=b}o.forEach((function(e){attachEvent(s.start,e,eventStart,{handles:l,handleNumbers:u,connect:t})}))}}))}function bindEvent(e,t){E[e]=E[e]||[];E[e].push(t);e.split(".")[0]==="update"&&d.forEach((function(e,t){fireEvent("update",t)}))}function isInternalNamespace(e){return e===i.aria||e===i.tooltips}function removeEvent(e){var t=e&&e.split(".")[0];var r=t?e.substring(t.length):e;Object.keys(E).forEach((function(e){var a=e.split(".")[0];var n=e.substring(a.length);t&&t!==a||r&&r!==n||isInternalNamespace(n)&&r!==n||delete E[e]}))}function fireEvent(e,t,r){Object.keys(E).forEach((function(n){var i=n.split(".")[0];e===i&&E[n].forEach((function(e){e.call(A,g.map(a.format.to),t,g.slice(),r||false,S.slice(),A)}))}))}function checkHandlePosition(e,t,r,n,i,s,o){var l;if(d.length>1&&!a.events.unconstrained){if(n&&t>0){l=m.getAbsoluteDistance(e[t-1],a.margin,false);r=Math.max(r,l)}if(i&&t<d.length-1){l=m.getAbsoluteDistance(e[t+1],a.margin,true);r=Math.min(r,l)}}if(d.length>1&&a.limit){if(n&&t>0){l=m.getAbsoluteDistance(e[t-1],a.limit,false);r=Math.min(r,l)}if(i&&t<d.length-1){l=m.getAbsoluteDistance(e[t+1],a.limit,true);r=Math.max(r,l)}}if(a.padding){if(t===0){l=m.getAbsoluteDistance(0,a.padding[0],false);r=Math.max(r,l)}if(t===d.length-1){l=m.getAbsoluteDistance(100,a.padding[1],true);r=Math.min(r,l)}}o||(r=m.getStep(r));r=limit(r);return!(r===e[t]&&!s)&&r}function inRuleOrder(e,t){var r=a.ort;return(r?t:e)+", "+(r?e:t)}function moveHandles(e,t,r,n,i){var s=r.slice();var o=n[0];var l=a.events.smoothSteps;var u=[!e,e];var c=[e,!e];n=n.slice();e&&n.reverse();n.length>1?n.forEach((function(e,r){var a=checkHandlePosition(s,e,s[e]+t,u[r],c[r],false,l);if(a===false)t=0;else{t=a-s[e];s[e]=a}})):u=c=[true];var f=false;n.forEach((function(e,a){f=setHandle(e,r[e]+t,u[a],c[a],false,l)||f}));if(f){n.forEach((function(e){fireEvent("update",e);fireEvent("slide",e)}));i!=void 0&&fireEvent("drag",o)}}function transformDirection(e,t){return a.dir?100-e-t:e}function updateHandlePosition(e,t){S[e]=t;g[e]=m.fromStepping(t);var r=transformDirection(t,0)-P;var n="translate("+inRuleOrder(r+"%","0")+")";d[e].style[a.transformRule]=n;if(a.events.invertConnects&&S.length>1){var i=S.every((function(e,t,r){return t===0||e>=r[t-1]}));if(y!==!i){invertConnects();return}}updateConnect(e);updateConnect(e+1);if(y){updateConnect(e-1);updateConnect(e+2)}}function setZindex(){b.forEach((function(e){var t=S[e]>50?-1:1;var r=3+(d.length+t*e);d[e].style.zIndex=String(r)}))}function setHandle(e,t,r,a,n,i){n||(t=checkHandlePosition(S,e,t,r,a,false,i));if(t===false)return false;updateHandlePosition(e,t);return true}function updateConnect(e){if(p[e]){var t=S.slice();y&&t.sort((function(e,t){return e-t}));var r=0;var n=100;e!==0&&(r=t[e-1]);e!==p.length-1&&(n=t[e]);var i=n-r;var s="translate("+inRuleOrder(transformDirection(r,i)+"%","0")+")";var o="scale("+inRuleOrder(i/100,"1")+")";p[e].style[a.transformRule]=s+" "+o}}function resolveToValue(e,t){if(e===null||e===false||e===void 0)return S[t];typeof e==="number"&&(e=String(e));e=a.format.from(e);e!==false&&(e=m.toStepping(e));return e===false||isNaN(e)?S[t]:e}function valueSet(e,t,r){var n=asArray(e);var i=S[0]===void 0;t=t===void 0||t;a.animate&&!i&&addClassFor(u,a.cssClasses.tap,a.animationDuration);b.forEach((function(e){setHandle(e,resolveToValue(n[e],e),true,false,r)}));var s=b.length===1?0:1;if(i&&m.hasNoSize()){r=true;S[0]=0;if(b.length>1){var o=100/(b.length-1);b.forEach((function(e){S[e]=e*o}))}}for(;s<b.length;++s)b.forEach((function(e){setHandle(e,S[e],true,true,r)}));setZindex();b.forEach((function(e){fireEvent("update",e);n[e]!==null&&t&&fireEvent("set",e)}))}function valueReset(e){valueSet(a.start,e)}function valueSetHandle(e,t,r,a){e=Number(e);if(!(e>=0&&e<b.length))throw new Error("noUiSlider: invalid handle number, got: "+e);setHandle(e,resolveToValue(t,e),true,true,a);fireEvent("update",e);r&&fireEvent("set",e)}function valueGet(e){e===void 0&&(e=false);if(e)return g.length===1?g[0]:g.slice(0);var t=g.map(a.format.to);return t.length===1?t[0]:t}function destroy(){removeEvent(i.aria);removeEvent(i.tooltips);Object.keys(a.cssClasses).forEach((function(e){removeClass(u,a.cssClasses[e])}));while(u.firstChild)u.removeChild(u.firstChild);delete u.noUiSlider}function getNextStepsForHandle(e){var t=S[e];var r=m.getNearbySteps(t);var n=g[e];var i=r.thisStep.step;var s=null;if(a.snap)return[n-r.stepBefore.startValue||null,r.stepAfter.startValue-n||null];i!==false&&n+i>r.stepAfter.startValue&&(i=r.stepAfter.startValue-n);s=n>r.thisStep.startValue?r.thisStep.step:r.stepBefore.step!==false&&n-r.stepBefore.highestStep;t===100?i=null:t===0&&(s=null);var o=m.countStepDecimals();i!==null&&i!==false&&(i=Number(i.toFixed(o)));s!==null&&s!==false&&(s=Number(s.toFixed(o)));return[s,i]}function getNextSteps(){return b.map(getNextStepsForHandle)}function updateOptions(e,t){var r=valueGet();var i=["margin","limit","padding","range","animate","snap","step","format","pips","tooltips","connect"];i.forEach((function(t){e[t]!==void 0&&(n[t]=e[t])}));var s=testOptions(n);i.forEach((function(t){e[t]!==void 0&&(a[t]=s[t])}));m=s.spectrum;a.margin=s.margin;a.limit=s.limit;a.padding=s.padding;a.pips?pips(a.pips):removePips();a.tooltips?tooltips():removeTooltips();S=[];valueSet(isSet(e.start)?e.start:r,t);e.connect&&updateConnectOption()}function updateConnectOption(){while(f.firstChild)f.removeChild(f.firstChild);for(var e=0;e<=a.handles;e++){p[e]=addConnect(f,a.connect[e]);updateConnect(e)}bindSliderEvents({drag:a.events.drag,fixed:true})}function invertConnects(){y=!y;testConnect(a,a.connect.map((function(e){return!e})));updateConnectOption()}function setupSlider(){c=addSlider(u);addElements(a.connect,c);bindSliderEvents(a.events);valueSet(a.start);a.pips&&pips(a.pips);a.tooltips&&tooltips();aria()}setupSlider();var A={destroy:destroy,steps:getNextSteps,on:bindEvent,off:removeEvent,get:valueGet,set:valueSet,setHandle:valueSetHandle,reset:valueReset,disable:disable,enable:enable,__moveHandles:function(e,t,r){moveHandles(e,t,S,r)},options:n,updateOptions:updateOptions,target:u,removePips:removePips,removeTooltips:removeTooltips,getPositions:function(){return S.slice()},getTooltips:function(){return h},getOrigins:function(){return d},pips:pips};return A}function initialize(e,t){if(!e||!e.nodeName)throw new Error("noUiSlider: create requires a single element, got: "+e);if(e.noUiSlider)throw new Error("noUiSlider: Slider was already initialized.");var r=testOptions(t);var a=scope(e,r,t);e.noUiSlider=a;return a}var s={__spectrum:r,cssClasses:n,create:initialize};export{e as PipsMode,t as PipsType,initialize as create,n as cssClasses,s as default};
4
+