spree_backend 4.2.5 → 4.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (261) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +1 -1
  3. data/app/assets/config/spree_backend_manifest.js +129 -0
  4. data/app/assets/images/backend-arrows-fullscreen.svg +3 -0
  5. data/app/assets/images/backend-box.svg +3 -0
  6. data/app/assets/images/backend-circle-fill.svg +3 -0
  7. data/app/assets/images/backend-circle.svg +3 -0
  8. data/app/assets/images/backend-default-layout.svg +6 -0
  9. data/app/assets/images/backend-eye-slash-fill.svg +4 -0
  10. data/app/assets/images/backend-file-richtext.svg +4 -0
  11. data/app/assets/images/backend-fullscreen-exit.svg +3 -0
  12. data/app/assets/images/backend-fullscreen.svg +3 -0
  13. data/app/assets/images/backend-mobile.svg +5 -0
  14. data/app/assets/images/backend-pages.svg +10 -0
  15. data/app/assets/images/backend-phone.svg +4 -0
  16. data/app/assets/images/backend-reversed-layout.svg +6 -0
  17. data/app/assets/images/backend-spree-icon.svg +1 -0
  18. data/app/assets/images/backend-spree-logo.svg +6 -0
  19. data/app/assets/images/backend-store.svg +2 -13
  20. data/app/assets/images/backend-translate.svg +4 -0
  21. data/app/assets/images/backend-users.svg +2 -5
  22. data/app/assets/images/backend-window-sidebar.svg +4 -0
  23. data/app/assets/images/noimage/backend-missing-image.svg +4 -0
  24. data/app/assets/images/noimage/large.png +0 -0
  25. data/app/assets/images/noimage/mini.png +0 -0
  26. data/app/assets/images/noimage/product.png +0 -0
  27. data/app/assets/images/noimage/small.png +0 -0
  28. data/app/assets/javascripts/spree/backend/address_states.es6 +44 -0
  29. data/app/assets/javascripts/spree/backend/admin.js +45 -307
  30. data/app/assets/javascripts/spree/backend/checkouts/edit.js +22 -13
  31. data/app/assets/javascripts/spree/backend/cms/_index.es6 +4 -0
  32. data/app/assets/javascripts/spree/backend/cms/links.es6 +25 -0
  33. data/app/assets/javascripts/spree/backend/cms/live_preview.es6 +34 -0
  34. data/app/assets/javascripts/spree/backend/cms/page.es6 +133 -0
  35. data/app/assets/javascripts/spree/backend/cms/section.es6 +43 -0
  36. data/app/assets/javascripts/spree/backend/global/_index.js +11 -0
  37. data/app/assets/javascripts/spree/backend/global/alerts.es6 +66 -0
  38. data/app/assets/javascripts/spree/backend/global/api_functions.es6 +5 -0
  39. data/app/assets/javascripts/spree/backend/global/bootstrap.es6 +15 -0
  40. data/app/assets/javascripts/spree/backend/global/flatpickr.es6 +22 -0
  41. data/app/assets/javascripts/spree/backend/global/info_alert.es6 +38 -0
  42. data/app/assets/javascripts/spree/backend/global/radio_panel_toggle.es6 +18 -0
  43. data/app/assets/javascripts/spree/backend/global/ransack.es6 +108 -0
  44. data/app/assets/javascripts/spree/backend/global/responsive_menus.es6 +56 -0
  45. data/app/assets/javascripts/spree/backend/global/select2_autocomplete.es6 +132 -0
  46. data/app/assets/javascripts/spree/backend/global/select2_populate.es6 +87 -0
  47. data/app/assets/javascripts/spree/backend/global/side_scroll_indication.es6 +137 -0
  48. data/app/assets/javascripts/spree/backend/global/sortable.es6 +35 -0
  49. data/app/assets/javascripts/spree/backend/global/tinymce.es6 +11 -0
  50. data/app/assets/javascripts/spree/backend/menus/_index.es6 +2 -0
  51. data/app/assets/javascripts/spree/backend/menus/menu.es6 +57 -0
  52. data/app/assets/javascripts/spree/backend/menus/menu_item.es6 +26 -0
  53. data/app/assets/javascripts/spree/backend/option_type_autocomplete.js +13 -17
  54. data/app/assets/javascripts/spree/backend/option_value_picker.js +10 -22
  55. data/app/assets/javascripts/spree/backend/payments/edit.js +1 -1
  56. data/app/assets/javascripts/spree/backend/payments/new.js +18 -5
  57. data/app/assets/javascripts/spree/backend/spree-select2.js +19 -1
  58. data/app/assets/javascripts/spree/backend/stock_location.js +1 -2
  59. data/app/assets/javascripts/spree/backend/taxon_autocomplete.js +7 -1
  60. data/app/assets/javascripts/spree/backend/taxons.js +74 -73
  61. data/app/assets/javascripts/spree/backend/user_picker.js +7 -10
  62. data/app/assets/javascripts/spree/backend.js +28 -1
  63. data/app/assets/javascripts/spree.js +78 -0
  64. data/app/assets/stylesheets/spree/backend/components/_filters.scss +1 -3
  65. data/app/assets/stylesheets/spree/backend/components/_main.scss +0 -1
  66. data/app/assets/stylesheets/spree/backend/components/_navbar.scss +35 -0
  67. data/app/assets/stylesheets/spree/backend/components/_navigation.scss +13 -0
  68. data/app/assets/stylesheets/spree/backend/components/_sidebar.scss +0 -1
  69. data/app/assets/stylesheets/spree/backend/components/_tables.scss +4 -5
  70. data/app/assets/stylesheets/spree/backend/global/_mixins.scss +59 -0
  71. data/app/assets/stylesheets/spree/backend/plugins/_nav_x.scss +95 -0
  72. data/app/assets/stylesheets/spree/backend/plugins/{select2_bootstrap4.scss → _select2_bootstrap4.scss} +0 -0
  73. data/app/assets/stylesheets/spree/backend/plugins/_sweetalert2_custom.scss +100 -0
  74. data/app/assets/stylesheets/spree/backend/plugins/_tinymce_custom.scss +4 -0
  75. data/app/assets/stylesheets/spree/backend/shared/_base.scss +79 -25
  76. data/app/assets/stylesheets/spree/backend/shared/_forms.scss +8 -0
  77. data/app/assets/stylesheets/spree/backend/spree_admin.css.scss +5 -0
  78. data/app/assets/stylesheets/spree/backend/views/_cms_pages.scss +148 -0
  79. data/app/assets/stylesheets/spree/backend/views/_menus.scss +61 -0
  80. data/app/controllers/concerns/spree/admin/order_concern.rb +24 -0
  81. data/app/controllers/concerns/spree/admin/product_concern.rb +11 -0
  82. data/app/controllers/spree/admin/base_controller.rb +63 -3
  83. data/app/controllers/spree/admin/cms_pages_controller.rb +29 -0
  84. data/app/controllers/spree/admin/cms_sections_controller.rb +15 -0
  85. data/app/controllers/spree/admin/customer_returns_controller.rb +4 -5
  86. data/app/controllers/spree/admin/errors_controller.rb +11 -0
  87. data/app/controllers/spree/admin/general_settings_controller.rb +1 -1
  88. data/app/controllers/spree/admin/images_controller.rb +19 -16
  89. data/app/controllers/spree/admin/log_entries_controller.rb +4 -3
  90. data/app/controllers/spree/admin/menu_items_controller.rb +33 -0
  91. data/app/controllers/spree/admin/menus_controller.rb +32 -0
  92. data/app/controllers/spree/admin/option_types_controller.rb +1 -1
  93. data/app/controllers/spree/admin/orders/customer_details_controller.rb +6 -11
  94. data/app/controllers/spree/admin/orders_controller.rb +23 -31
  95. data/app/controllers/spree/admin/payment_methods_controller.rb +17 -4
  96. data/app/controllers/spree/admin/payments_controller.rb +5 -10
  97. data/app/controllers/spree/admin/prices_controller.rb +2 -2
  98. data/app/controllers/spree/admin/products_controller.rb +21 -10
  99. data/app/controllers/spree/admin/promotion_actions_controller.rb +1 -1
  100. data/app/controllers/spree/admin/promotion_rules_controller.rb +1 -1
  101. data/app/controllers/spree/admin/promotions_controller.rb +3 -3
  102. data/app/controllers/spree/admin/prototypes_controller.rb +1 -1
  103. data/app/controllers/spree/admin/reimbursements_controller.rb +1 -1
  104. data/app/controllers/spree/admin/reports_controller.rb +5 -1
  105. data/app/controllers/spree/admin/resource_controller.rb +32 -5
  106. data/app/controllers/spree/admin/return_index_controller.rb +1 -1
  107. data/app/controllers/spree/admin/state_changes_controller.rb +2 -7
  108. data/app/controllers/spree/admin/stock_items_controller.rb +2 -2
  109. data/app/controllers/spree/admin/stock_locations_controller.rb +2 -2
  110. data/app/controllers/spree/admin/stock_movements_controller.rb +1 -1
  111. data/app/controllers/spree/admin/stock_transfers_controller.rb +1 -1
  112. data/app/controllers/spree/admin/store_credits_controller.rb +13 -8
  113. data/app/controllers/spree/admin/stores_controller.rb +14 -17
  114. data/app/controllers/spree/admin/taxons_controller.rb +9 -5
  115. data/app/controllers/spree/admin/users_controller.rb +9 -7
  116. data/app/controllers/spree/admin/variants_controller.rb +16 -15
  117. data/app/helpers/spree/admin/base_helper.rb +52 -14
  118. data/app/helpers/spree/admin/cms_helper.rb +15 -0
  119. data/app/helpers/spree/admin/menu_helper.rb +30 -0
  120. data/app/helpers/spree/admin/stores_helper.rb +21 -0
  121. data/app/models/spree/backend_configuration.rb +2 -0
  122. data/app/views/spree/admin/adjustments/_adjustment.html.erb +7 -5
  123. data/app/views/spree/admin/cms_pages/_form.html.erb +135 -0
  124. data/app/views/spree/admin/cms_pages/_live_preview_area.html.erb +61 -0
  125. data/app/views/spree/admin/cms_pages/_section_template.html.erb +16 -0
  126. data/app/views/spree/admin/cms_pages/edit.html.erb +21 -0
  127. data/app/views/spree/admin/cms_pages/index.html.erb +84 -0
  128. data/app/views/spree/admin/cms_pages/new.html.erb +8 -0
  129. data/app/views/spree/admin/cms_sections/_form.html.erb +69 -0
  130. data/app/views/spree/admin/cms_sections/edit.html.erb +19 -0
  131. data/app/views/spree/admin/cms_sections/new.html.erb +11 -0
  132. data/app/views/spree/admin/cms_sections/types/_featured_article.html.erb +50 -0
  133. data/app/views/spree/admin/cms_sections/types/_hero_image.html.erb +61 -0
  134. data/app/views/spree/admin/cms_sections/types/_image_gallery.html.erb +174 -0
  135. data/app/views/spree/admin/cms_sections/types/_product_carousel.html.erb +5 -0
  136. data/app/views/spree/admin/cms_sections/types/_rich_text_content.html.erb +4 -0
  137. data/app/views/spree/admin/cms_sections/types/_side_by_side_images.html.erb +121 -0
  138. data/app/views/spree/admin/countries/index.html.erb +5 -3
  139. data/app/views/spree/admin/customer_returns/_reimbursements_table.html.erb +6 -4
  140. data/app/views/spree/admin/customer_returns/_return_item_decision.html.erb +9 -7
  141. data/app/views/spree/admin/customer_returns/index.html.erb +4 -2
  142. data/app/views/spree/admin/errors/forbidden.html.erb +0 -0
  143. data/app/views/spree/admin/images/index.html.erb +8 -4
  144. data/app/views/spree/admin/menu_items/_form.html.erb +115 -0
  145. data/app/views/spree/admin/menu_items/edit.html.erb +11 -0
  146. data/app/views/spree/admin/menu_items/new.html.erb +11 -0
  147. data/app/views/spree/admin/menus/_form.html.erb +19 -0
  148. data/app/views/spree/admin/menus/edit.html.erb +57 -0
  149. data/app/views/spree/admin/menus/index.html.erb +90 -0
  150. data/app/views/spree/admin/menus/nested_menu_items/_item_bar.html.erb +30 -0
  151. data/app/views/spree/admin/menus/new.html.erb +22 -0
  152. data/app/views/spree/admin/option_types/_form.html.erb +3 -0
  153. data/app/views/spree/admin/option_types/_option_value_fields.html.erb +5 -1
  154. data/app/views/spree/admin/option_types/index.html.erb +5 -3
  155. data/app/views/spree/admin/orders/_channel_form.html.erb +2 -2
  156. data/app/views/spree/admin/orders/_line_items.html.erb +10 -8
  157. data/app/views/spree/admin/orders/_shipment.html.erb +26 -18
  158. data/app/views/spree/admin/orders/_shipment_manifest.html.erb +11 -9
  159. data/app/views/spree/admin/orders/customer_details/_autocomplete.js.erb +2 -2
  160. data/app/views/spree/admin/orders/index.html.erb +100 -101
  161. data/app/views/spree/admin/payment_methods/_form.html.erb +6 -4
  162. data/app/views/spree/admin/payment_methods/edit.html.erb +1 -1
  163. data/app/views/spree/admin/payment_methods/index.html.erb +22 -3
  164. data/app/views/spree/admin/payment_methods/new.html.erb +1 -1
  165. data/app/views/spree/admin/payments/_list.html.erb +9 -7
  166. data/app/views/spree/admin/prices/_variant_prices.html.erb +7 -14
  167. data/app/views/spree/admin/product_properties/_product_property_fields.html.erb +9 -7
  168. data/app/views/spree/admin/products/_autocomplete.js.erb +10 -6
  169. data/app/views/spree/admin/products/_form.html.erb +35 -5
  170. data/app/views/spree/admin/products/index.html.erb +15 -14
  171. data/app/views/spree/admin/products/new.html.erb +6 -1
  172. data/app/views/spree/admin/products/stock.html.erb +71 -68
  173. data/app/views/spree/admin/promotion_categories/index.html.erb +5 -3
  174. data/app/views/spree/admin/promotions/_form.html.erb +7 -0
  175. data/app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb +1 -0
  176. data/app/views/spree/admin/promotions/calculators/_default_fields.html.erb +2 -1
  177. data/app/views/spree/admin/promotions/index.html.erb +33 -34
  178. data/app/views/spree/admin/properties/_form.html.erb +6 -0
  179. data/app/views/spree/admin/properties/index.html.erb +19 -3
  180. data/app/views/spree/admin/prototypes/_form.html.erb +1 -1
  181. data/app/views/spree/admin/prototypes/_prototypes.html.erb +8 -6
  182. data/app/views/spree/admin/prototypes/index.html.erb +5 -3
  183. data/app/views/spree/admin/reimbursement_types/index.html.erb +5 -3
  184. data/app/views/spree/admin/reports/index.html.erb +1 -1
  185. data/app/views/spree/admin/reports/sales_total.html.erb +1 -1
  186. data/app/views/spree/admin/return_authorizations/_form.html.erb +2 -2
  187. data/app/views/spree/admin/return_authorizations/index.html.erb +7 -5
  188. data/app/views/spree/admin/return_index/customer_returns.html.erb +4 -2
  189. data/app/views/spree/admin/return_index/return_authorizations.html.erb +5 -3
  190. data/app/views/spree/admin/roles/index.html.erb +5 -3
  191. data/app/views/spree/admin/shared/_account_nav.html.erb +5 -5
  192. data/app/views/spree/admin/shared/_address_form.html.erb +5 -4
  193. data/app/views/spree/admin/shared/_content_header.html.erb +20 -6
  194. data/app/views/spree/admin/shared/_head.html.erb +2 -1
  195. data/app/views/spree/admin/shared/_header.html.erb +7 -10
  196. data/app/views/spree/admin/shared/_link_fields.html.erb +22 -0
  197. data/app/views/spree/admin/shared/_main_menu.html.erb +19 -4
  198. data/app/views/spree/admin/shared/_order_tabs.html.erb +1 -10
  199. data/app/views/spree/admin/shared/_paths.html.erb +8 -0
  200. data/app/views/spree/admin/shared/_refunds.html.erb +4 -2
  201. data/app/views/spree/admin/shared/_sidebar.html.erb +1 -1
  202. data/app/views/spree/admin/shared/_store_switcher.html.erb +23 -0
  203. data/app/views/spree/admin/shared/_table_filter.html.erb +6 -6
  204. data/app/views/spree/admin/shared/_translations.html.erb +2 -0
  205. data/app/views/spree/admin/shared/cms/_spree_product.html.erb +27 -0
  206. data/app/views/spree/admin/shared/cms/_spree_taxon.html.erb +27 -0
  207. data/app/views/spree/admin/shared/linkables/_home_page.html.erb +3 -0
  208. data/app/views/spree/admin/shared/linkables/_spree_cms_page.erb +23 -0
  209. data/app/views/spree/admin/shared/linkables/_spree_product.html.erb +20 -0
  210. data/app/views/spree/admin/shared/linkables/_spree_taxon.html.erb +22 -0
  211. data/app/views/spree/admin/shared/linkables/_url.html.erb +16 -0
  212. data/app/views/spree/admin/shared/named_types/_index.html.erb +7 -5
  213. data/app/views/spree/admin/shared/sub_menu/_configuration.html.erb +1 -3
  214. data/app/views/spree/admin/shared/sub_menu/_content.html.erb +4 -0
  215. data/app/views/spree/admin/shared/sub_menu/_stock.html.erb +4 -0
  216. data/app/views/spree/admin/shipping_categories/index.html.erb +5 -3
  217. data/app/views/spree/admin/shipping_methods/index.html.erb +5 -3
  218. data/app/views/spree/admin/states/_state_list.html.erb +5 -3
  219. data/app/views/spree/admin/stock_locations/index.html.erb +5 -3
  220. data/app/views/spree/admin/stock_transfers/index.html.erb +5 -4
  221. data/app/views/spree/admin/stock_transfers/new.html.erb +9 -7
  222. data/app/views/spree/admin/store_credit_categories/index.html.erb +5 -3
  223. data/app/views/spree/admin/store_credits/index.html.erb +7 -5
  224. data/app/views/spree/admin/stores/_form.html.erb +12 -2
  225. data/app/views/spree/admin/stores/index.html.erb +12 -10
  226. data/app/views/spree/admin/tax_categories/index.html.erb +5 -3
  227. data/app/views/spree/admin/tax_rates/index.html.erb +5 -3
  228. data/app/views/spree/admin/taxonomies/_list.html.erb +5 -3
  229. data/app/views/spree/admin/taxons/_form.html.erb +1 -1
  230. data/app/views/spree/admin/users/_addresses_form.html.erb +2 -4
  231. data/app/views/spree/admin/users/_lifetime_stats.html.erb +16 -4
  232. data/app/views/spree/admin/users/index.html.erb +5 -3
  233. data/app/views/spree/admin/users/items.html.erb +1 -1
  234. data/app/views/spree/admin/variants/_autocomplete.js.erb +6 -2
  235. data/app/views/spree/admin/variants/_autocomplete_line_items_stock.js.erb +18 -12
  236. data/app/views/spree/admin/variants/_autocomplete_stock.js.erb +12 -8
  237. data/app/views/spree/admin/variants/_split.js.erb +9 -7
  238. data/app/views/spree/admin/variants/index.html.erb +8 -5
  239. data/app/views/spree/admin/zones/index.html.erb +5 -3
  240. data/app/views/spree/layouts/admin.html.erb +16 -16
  241. data/config/initializers/assets.rb +5 -1
  242. data/config/routes.rb +14 -2
  243. data/lib/generators/spree/backend/install/install_generator.rb +22 -0
  244. data/lib/generators/spree/backend/install/templates/vendor/assets/javascripts/spree/backend/all.js +8 -0
  245. data/lib/generators/spree/backend/install/templates/vendor/assets/stylesheets/spree/backend/all.css +9 -0
  246. data/lib/spree/backend/engine.rb +4 -11
  247. data/lib/spree/backend.rb +7 -4
  248. data/lib/spree_backend.rb +0 -2
  249. data/spec/fixtures/files/favicon.ico +0 -0
  250. data/spec/fixtures/files/icon_512x512.png +0 -0
  251. data/spree_backend.gemspec +10 -5
  252. data/vendor/assets/javascripts/cleave.js +8 -0
  253. data/vendor/assets/javascripts/jsonapi-serializer.min.js +8 -0
  254. data/vendor/assets/javascripts/jsuri.js +458 -0
  255. data/vendor/assets/javascripts/sortable.js +2 -3709
  256. data/vendor/assets/javascripts/sweetalert2.js +2 -0
  257. metadata +193 -21
  258. data/app/assets/javascripts/spree/backend/address_states.js +0 -44
  259. data/app/assets/javascripts/spree/frontend/backend.js +0 -1
  260. data/app/assets/stylesheets/spree/frontend/backend.css +0 -1
  261. data/app/views/spree/admin/orders/_store_form.html.erb +0 -18
@@ -21,13 +21,15 @@
21
21
  <td>
22
22
  <input class="quantity form-control" id="item_quantity" type="number" min="1" value="1" max="{{max_quantity}}">
23
23
  </td>
24
- <td class='actions text-center'>
25
- <a href='#' class='cancel-split with-tip btn btn-sm btn-outline-secondary' title='Cancel'>
26
- <%= svg_icon name: "cancel", classes: 'icon-cancel', width: '16', height: '16' %>
27
- </a>
28
- <a href='#' class='icon-save-split save-split with-tip btn btn-sm btn-success' title='Save'>
29
- <%= svg_icon name: "split", classes: 'icon-save', width: '16', height: '16' %>
30
- </a>
24
+ <td class='actions'>
25
+ <span class='d-flex justify-content-center'>
26
+ <a href='#' class='cancel-split with-tip btn btn-sm btn-outline-secondary' title='Cancel'>
27
+ <%= svg_icon name: "cancel", classes: 'icon-cancel', width: '16', height: '16' %>
28
+ </a>
29
+ <a href='#' class='icon-save-split save-split with-tip btn btn-sm btn-success' title='Save'>
30
+ <%= svg_icon name: "split", classes: 'icon-save', width: '16', height: '16' %>
31
+ </a>
32
+ </span>
31
33
  </td>
32
34
  </tr>
33
35
  </script>
@@ -10,7 +10,7 @@
10
10
  <tr>
11
11
  <th colspan="2"><%= Spree.t(:options) %></th>
12
12
  <th><%= Spree.t(:price) %></th>
13
- <th><%= Spree.t(:sku) %></th>
13
+ <th><%= sort_link @search, :sku, Spree.t(:sku) %></th>
14
14
  <th class="actions"></th>
15
15
  </tr>
16
16
  </thead>
@@ -25,9 +25,11 @@
25
25
  <td><%= variant.options_text %></td>
26
26
  <td><%= display_price(variant) %></td>
27
27
  <td><%= variant.sku %></td>
28
- <td class="actions actions-2 text-right">
29
- <%= link_to_edit(variant, no_text: true) if can?(:edit, variant) && !variant.deleted? %>
30
- <%= link_to_delete(variant, no_text: true) if can?(:destroy, variant) && !variant.deleted? %>
28
+ <td class="actions">
29
+ <span class="d-flex justify-content-end">
30
+ <%= link_to_edit(variant, no_text: true) if can?(:edit, variant) && !variant.deleted? %>
31
+ <%= link_to_delete(variant, no_text: true) if can?(:destroy, variant) && !variant.deleted? %>
32
+ </span>
31
33
  </td>
32
34
  </tr>
33
35
  <% end %>
@@ -63,6 +65,7 @@
63
65
  <% content_for :page_actions do %>
64
66
  <%= product_preview_link(@product) %>
65
67
  <%= button_link_to(Spree.t(:new_variant), spree.new_admin_product_variant_url(@product), { icon: 'add.svg', :'data-update' => 'new_variant', class: 'btn-success', id: 'new_var_link' }) if can? :create, Spree::Variant %>
66
- <%= button_link_to (@deleted.blank? ? Spree.t(:show_deleted) : Spree.t(:show_active)), spree.admin_product_variants_url(@product, deleted: @deleted.blank? ? "on" : "off"), { class: 'btn-outline-secondary', icon: 'filter.svg' } %>
68
+ <%= button_link_to (@deleted == '1' ? Spree.t(:show_active) : Spree.t(:show_deleted)), spree.admin_product_variants_url(@product, { q: { deleted_at_null: @deleted == '1' ? "0" : "1" } }), { class: 'btn-outline-secondary', icon: 'filter.svg' } %>
67
69
  <% end %>
68
70
  <% end %>
71
+ <%= render partial: 'spree/admin/shared/index_table_options', locals: { collection: @collection } %>
@@ -25,9 +25,11 @@
25
25
  <td><%= zone.name %></td>
26
26
  <td><%= zone.description %></td>
27
27
  <td><%= active_badge(zone.default_tax?) %></td>
28
- <td class="actions actions-2 text-right">
29
- <%= link_to_edit(zone, no_text: true) if can? :edit, zone %>
30
- <%= link_to_delete(zone, no_text: true) if can? :delete, zone %>
28
+ <td class="actions">
29
+ <span class="d-flex justify-content-end">
30
+ <%= link_to_edit(zone, no_text: true) if can? :edit, zone %>
31
+ <%= link_to_delete(zone, no_text: true) if can? :delete, zone %>
32
+ </span>
31
33
  </td>
32
34
  </tr>
33
35
  <% end %>
@@ -5,17 +5,6 @@
5
5
  </head>
6
6
 
7
7
  <body class="admin">
8
-
9
- <%#-------------------------------------------------%>
10
- <%# Loading progress bars %>
11
- <%#-------------------------------------------------%>
12
- <div id="progress">
13
- <div class="alert alert-info alert-progress">
14
- <div class="spinner"><%= Spree.t(:loading) %>...</div>
15
- <div class="progress-message"><%= Spree.t(:loading) %>...</div>
16
- </div>
17
- </div>
18
-
19
8
  <%#-------------------------------------------------%>
20
9
  <%# Header navbar %>
21
10
  <%#-------------------------------------------------%>
@@ -38,15 +27,14 @@
38
27
  id="main-sidebar"
39
28
  data-hook="admin_tabs">
40
29
  <%= render partial: 'spree/admin/shared/main_menu' %>
41
-
42
30
  <%= render partial: 'spree/admin/shared/version' %>
43
31
  </aside>
44
32
 
45
33
  <%#-------------------------------------------------%>
46
34
  <%# Content %>
47
35
  <%#-------------------------------------------------%>
48
- <main class="col-12 col-lg-9 col-xl-10 offset-lg-3 offset-xl-2 main" id="main-part">
49
- <div class="container">
36
+ <main class="col-12 col-lg-9 col-xl-10 offset-lg-3 offset-xl-2 main pt-2" id="main-part">
37
+ <div class="container-lg">
50
38
 
51
39
  <%#-------------------------------------------------%>
52
40
  <%# Content header (page title/actions) %>
@@ -57,7 +45,7 @@
57
45
  <%#-------------------------------------------------%>
58
46
  <%# Main content %>
59
47
  <%#-------------------------------------------------%>
60
- <div class="<%= content_for?(:sidebar) ? 'with-sidebar col-12 col-lg-9' : 'col-12' %>" id="content" data-hook>
48
+ <div class="<%= content_for?(:sidebar) ? 'with-sidebar col-12 col-lg-9 px-0' : 'col-12 px-0' %>" id="content" data-hook>
61
49
  <%= render partial: 'spree/admin/shared/table_filter' if content_for?(:table_filter) %>
62
50
  <%= yield %>
63
51
  </div>
@@ -86,6 +74,18 @@
86
74
  <%#-------------------------------------------------%>
87
75
  <%# Alerts %>
88
76
  <%#-------------------------------------------------%>
89
- <%= flash_alert(flash) %>
77
+ <div id="FlashAlertsContainer" class="d-none">
78
+ <%= flash_alert(flash) %>
79
+ </div>
80
+
81
+ <%#-------------------------------------------------%>
82
+ <%# Loading progress bars %>
83
+ <%#-------------------------------------------------%>
84
+ <div id="progress">
85
+ <div class="alert alert-info alert-progress">
86
+ <div class="spinner"><%= Spree.t(:loading) %>...</div>
87
+ <div class="progress-message"><%= Spree.t(:loading) %>...</div>
88
+ </div>
89
+ </div>
90
90
  </body>
91
91
  </html>
@@ -1 +1,5 @@
1
- Rails.application.config.assets.precompile += %w(admin/* credit_cards/credit_card.gif flatpickr/l10n*)
1
+ Rails.application.config.assets.precompile << 'spree_backend_manifest.js'
2
+
3
+ Rails.application.config.assets.configure do |env|
4
+ env.export_concurrent = false
5
+ end
data/config/routes.rb CHANGED
@@ -84,8 +84,6 @@ Spree::Core::Engine.add_routes do
84
84
  put :approve
85
85
  put :cancel
86
86
  put :resume
87
- get :store
88
- put :set_store
89
87
  get :channel
90
88
  put :set_channel
91
89
  end
@@ -187,6 +185,20 @@ Spree::Core::Engine.add_routes do
187
185
  end
188
186
  resources :store_credits
189
187
  end
188
+
189
+ resources :cms_pages do
190
+ resources :cms_sections, except: :index
191
+ end
192
+
193
+ resources :menus do
194
+ resources :menu_items, except: :index do
195
+ member do
196
+ delete :remove_icon
197
+ end
198
+ end
199
+ end
200
+
201
+ get '/forbidden', to: 'errors#forbidden', as: :forbidden
190
202
  end
191
203
 
192
204
  spree_path = Rails.application.routes.url_helpers.try(:spree_path, trailing_slash: true) || '/'
@@ -0,0 +1,22 @@
1
+ module Spree
2
+ module Backend
3
+ module Generators
4
+ class InstallGenerator < Rails::Generators::Base
5
+ desc 'Installs spree rails admin panel'
6
+
7
+ def self.source_paths
8
+ [
9
+ File.expand_path('templates', __dir__),
10
+ File.expand_path('../templates', "../#{__FILE__}"),
11
+ File.expand_path('../templates', "../../#{__FILE__}"),
12
+ ]
13
+ end
14
+
15
+ def install
16
+ template 'vendor/assets/javascripts/spree/backend/all.js'
17
+ template 'vendor/assets/stylesheets/spree/backend/all.css'
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,8 @@
1
+ // This is a manifest file that'll be compiled into including all the files listed below.
2
+ // Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
3
+ // be included in the compiled file accessible from http://example.com/assets/application.js
4
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
5
+ // the compiled file.
6
+ //
7
+ //= require spree/backend
8
+ //= require_tree .
@@ -0,0 +1,9 @@
1
+ /*
2
+ * This is a manifest file that'll automatically include all the stylesheets available in this directory
3
+ * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
4
+ * the top of the compiled file, but it's generally better to create a new file per style scope.
5
+ *
6
+ *= require spree/backend
7
+ *= require_self
8
+ *= require_tree .
9
+ */
@@ -12,17 +12,10 @@ module Spree
12
12
  app.config.filter_parameters += [:password, :password_confirmation, :number]
13
13
  end
14
14
 
15
- # sets the manifests / assets to be precompiled, even when initialize_on_precompile is false
16
- initializer 'spree.assets.precompile', group: :all do |app|
17
- app.config.assets.paths << "#{Rails.root}/app/assets/fonts"
18
- app.config.assets.precompile << /\.(?:svg|eot|woff|ttf)$/
19
-
20
- app.config.assets.precompile += %w[
21
- spree/backend/all*
22
- spree/backend/address_states.js
23
- jquery.jstree/themes/spree/*
24
- select2_locale*
25
- ]
15
+ initializer 'spree.backend.checking_deprecated_preferences' do
16
+ Spree::Backend::Config.deprecated_preferences.each do |pref|
17
+ warn "[DEPRECATION] Spree::Backend::Config[:#{pref[:name]}] is deprecated. #{pref[:message]}"
18
+ end
26
19
  end
27
20
  end
28
21
  end
data/lib/spree/backend.rb CHANGED
@@ -1,4 +1,8 @@
1
- require 'rails/all'
1
+ require 'spree_core'
2
+ require 'spree_api'
3
+
4
+ require 'sprockets/railtie'
5
+
2
6
  require 'jquery-rails'
3
7
  require 'jquery-ui-rails'
4
8
  require 'select2-rails'
@@ -7,9 +11,8 @@ require 'bootstrap'
7
11
  require 'glyphicons'
8
12
  require 'popper_js'
9
13
  require 'inline_svg'
10
-
11
- require 'spree_core'
12
- require 'spree_api'
14
+ require 'responders'
15
+ require 'tinymce-rails'
13
16
 
14
17
  require 'spree/backend/action_callbacks'
15
18
  require 'spree/backend/callbacks'
data/lib/spree_backend.rb CHANGED
@@ -1,3 +1 @@
1
1
  require 'spree/backend'
2
- require 'sprockets/rails'
3
- require 'bootstrap'
Binary file
@@ -7,15 +7,15 @@ Gem::Specification.new do |s|
7
7
  s.version = Spree.version
8
8
  s.authors = ['Sean Schofield', 'Spark Solutions']
9
9
  s.email = 'hello@spreecommerce.org'
10
- s.summary = 'backend e-commerce functionality for the Spree project.'
11
- s.description = 'Required dependency for Spree'
10
+ s.summary = 'Admin Dashboard for Spree eCommerce platform'
11
+ s.description = 'Admin Dashboard for Spree eCommerce platform'
12
12
  s.homepage = 'https://spreecommerce.org'
13
13
  s.license = 'BSD-3-Clause'
14
14
 
15
15
  s.metadata = {
16
16
  "bug_tracker_uri" => "https://github.com/spree/spree/issues",
17
17
  "changelog_uri" => "https://github.com/spree/spree/releases/tag/v#{s.version}",
18
- "documentation_uri" => "https://guides.spreecommerce.org/",
18
+ "documentation_uri" => "https://dev-docs.spreecommerce.org/",
19
19
  "source_code_uri" => "https://github.com/spree/spree/tree/v#{s.version}",
20
20
  }
21
21
 
@@ -25,14 +25,19 @@ Gem::Specification.new do |s|
25
25
  s.require_path = 'lib'
26
26
  s.requirements << 'none'
27
27
 
28
- s.add_dependency 'spree_api', s.version
29
- s.add_dependency 'spree_core', s.version
28
+ s.add_dependency 'spree_api', ">= #{s.version}"
29
+ s.add_dependency 'spree_core', ">= #{s.version}"
30
30
 
31
+ s.add_dependency 'babel-transpiler', '~> 0.7'
31
32
  s.add_dependency 'bootstrap', '~> 4.0'
32
33
  s.add_dependency 'glyphicons', '~> 1.0'
33
34
  s.add_dependency 'flatpickr', '~> 4.6'
34
35
  s.add_dependency 'inline_svg', '~> 1.5'
35
36
  s.add_dependency 'jquery-rails', '~> 4.3'
36
37
  s.add_dependency 'jquery-ui-rails', '~> 6.0'
38
+ s.add_dependency 'responders'
39
+ s.add_dependency 'sass-rails', '>= 5'
37
40
  s.add_dependency 'select2-rails', '~> 4.0'
41
+ s.add_dependency 'sprockets', '~> 4.0'
42
+ s.add_dependency 'tinymce-rails'
38
43
  end
@@ -0,0 +1,8 @@
1
+ /*!
2
+ * cleave.js - 1.6.0
3
+ * https://github.com/nosir/cleave.js
4
+ * Apache License Version 2.0
5
+ *
6
+ * Copyright (C) 2012-2020 Max Huang https://github.com/nosir/
7
+ */
8
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Cleave=t():e.Cleave=t()}(this,function(){return function(e){function t(i){if(r[i])return r[i].exports;var n=r[i]={exports:{},id:i,loaded:!1};return e[i].call(n.exports,n,n.exports,t),n.loaded=!0,n.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){(function(t){"use strict";var i=function(e,t){var r=this,n=!1;if("string"==typeof e?(r.element=document.querySelector(e),n=document.querySelectorAll(e).length>1):"undefined"!=typeof e.length&&e.length>0?(r.element=e[0],n=e.length>1):r.element=e,!r.element)throw new Error("[cleave.js] Please check the element");if(n)try{console.warn("[cleave.js] Multiple input fields matched, cleave.js will only take the first one.")}catch(a){}t.initValue=r.element.value,r.properties=i.DefaultProperties.assign({},t),r.init()};i.prototype={init:function(){var e=this,t=e.properties;return t.numeral||t.phone||t.creditCard||t.time||t.date||0!==t.blocksLength||t.prefix?(t.maxLength=i.Util.getMaxLength(t.blocks),e.isAndroid=i.Util.isAndroid(),e.lastInputValue="",e.isBackward="",e.onChangeListener=e.onChange.bind(e),e.onKeyDownListener=e.onKeyDown.bind(e),e.onFocusListener=e.onFocus.bind(e),e.onCutListener=e.onCut.bind(e),e.onCopyListener=e.onCopy.bind(e),e.initSwapHiddenInput(),e.element.addEventListener("input",e.onChangeListener),e.element.addEventListener("keydown",e.onKeyDownListener),e.element.addEventListener("focus",e.onFocusListener),e.element.addEventListener("cut",e.onCutListener),e.element.addEventListener("copy",e.onCopyListener),e.initPhoneFormatter(),e.initDateFormatter(),e.initTimeFormatter(),e.initNumeralFormatter(),void((t.initValue||t.prefix&&!t.noImmediatePrefix)&&e.onInput(t.initValue))):void e.onInput(t.initValue)},initSwapHiddenInput:function(){var e=this,t=e.properties;if(t.swapHiddenInput){var r=e.element.cloneNode(!0);e.element.parentNode.insertBefore(r,e.element),e.elementSwapHidden=e.element,e.elementSwapHidden.type="hidden",e.element=r,e.element.id=""}},initNumeralFormatter:function(){var e=this,t=e.properties;t.numeral&&(t.numeralFormatter=new i.NumeralFormatter(t.numeralDecimalMark,t.numeralIntegerScale,t.numeralDecimalScale,t.numeralThousandsGroupStyle,t.numeralPositiveOnly,t.stripLeadingZeroes,t.prefix,t.signBeforePrefix,t.tailPrefix,t.delimiter))},initTimeFormatter:function(){var e=this,t=e.properties;t.time&&(t.timeFormatter=new i.TimeFormatter(t.timePattern,t.timeFormat),t.blocks=t.timeFormatter.getBlocks(),t.blocksLength=t.blocks.length,t.maxLength=i.Util.getMaxLength(t.blocks))},initDateFormatter:function(){var e=this,t=e.properties;t.date&&(t.dateFormatter=new i.DateFormatter(t.datePattern,t.dateMin,t.dateMax),t.blocks=t.dateFormatter.getBlocks(),t.blocksLength=t.blocks.length,t.maxLength=i.Util.getMaxLength(t.blocks))},initPhoneFormatter:function(){var e=this,t=e.properties;if(t.phone)try{t.phoneFormatter=new i.PhoneFormatter(new t.root.Cleave.AsYouTypeFormatter(t.phoneRegionCode),t.delimiter)}catch(r){throw new Error("[cleave.js] Please include phone-type-formatter.{country}.js lib")}},onKeyDown:function(e){var t=this,r=e.which||e.keyCode;t.lastInputValue=t.element.value,t.isBackward=8===r},onChange:function(e){var t=this,r=t.properties,n=i.Util;t.isBackward=t.isBackward||"deleteContentBackward"===e.inputType;var a=n.getPostDelimiter(t.lastInputValue,r.delimiter,r.delimiters);t.isBackward&&a?r.postDelimiterBackspace=a:r.postDelimiterBackspace=!1,this.onInput(this.element.value)},onFocus:function(){var e=this,t=e.properties;e.lastInputValue=e.element.value,t.prefix&&t.noImmediatePrefix&&!e.element.value&&this.onInput(t.prefix),i.Util.fixPrefixCursor(e.element,t.prefix,t.delimiter,t.delimiters)},onCut:function(e){i.Util.checkFullSelection(this.element.value)&&(this.copyClipboardData(e),this.onInput(""))},onCopy:function(e){i.Util.checkFullSelection(this.element.value)&&this.copyClipboardData(e)},copyClipboardData:function(e){var t=this,r=t.properties,n=i.Util,a=t.element.value,o="";o=r.copyDelimiter?a:n.stripDelimiters(a,r.delimiter,r.delimiters);try{e.clipboardData?e.clipboardData.setData("Text",o):window.clipboardData.setData("Text",o),e.preventDefault()}catch(l){}},onInput:function(e){var t=this,r=t.properties,n=i.Util,a=n.getPostDelimiter(e,r.delimiter,r.delimiters);return r.numeral||!r.postDelimiterBackspace||a||(e=n.headStr(e,e.length-r.postDelimiterBackspace.length)),r.phone?(!r.prefix||r.noImmediatePrefix&&!e.length?r.result=r.phoneFormatter.format(e):r.result=r.prefix+r.phoneFormatter.format(e).slice(r.prefix.length),void t.updateValueState()):r.numeral?(r.prefix&&r.noImmediatePrefix&&0===e.length?r.result="":r.result=r.numeralFormatter.format(e),void t.updateValueState()):(r.date&&(e=r.dateFormatter.getValidatedDate(e)),r.time&&(e=r.timeFormatter.getValidatedTime(e)),e=n.stripDelimiters(e,r.delimiter,r.delimiters),e=n.getPrefixStrippedValue(e,r.prefix,r.prefixLength,r.result,r.delimiter,r.delimiters,r.noImmediatePrefix,r.tailPrefix,r.signBeforePrefix),e=r.numericOnly?n.strip(e,/[^\d]/g):e,e=r.uppercase?e.toUpperCase():e,e=r.lowercase?e.toLowerCase():e,r.prefix&&(r.tailPrefix?e+=r.prefix:e=r.prefix+e,0===r.blocksLength)?(r.result=e,void t.updateValueState()):(r.creditCard&&t.updateCreditCardPropsByValue(e),e=n.headStr(e,r.maxLength),r.result=n.getFormattedValue(e,r.blocks,r.blocksLength,r.delimiter,r.delimiters,r.delimiterLazyShow),void t.updateValueState()))},updateCreditCardPropsByValue:function(e){var t,r=this,n=r.properties,a=i.Util;a.headStr(n.result,4)!==a.headStr(e,4)&&(t=i.CreditCardDetector.getInfo(e,n.creditCardStrictMode),n.blocks=t.blocks,n.blocksLength=n.blocks.length,n.maxLength=a.getMaxLength(n.blocks),n.creditCardType!==t.type&&(n.creditCardType=t.type,n.onCreditCardTypeChanged.call(r,n.creditCardType)))},updateValueState:function(){var e=this,t=i.Util,r=e.properties;if(e.element){var n=e.element.selectionEnd,a=e.element.value,o=r.result;if(n=t.getNextCursorPosition(n,a,o,r.delimiter,r.delimiters),e.isAndroid)return void window.setTimeout(function(){e.element.value=o,t.setSelection(e.element,n,r.document,!1),e.callOnValueChanged()},1);e.element.value=o,r.swapHiddenInput&&(e.elementSwapHidden.value=e.getRawValue()),t.setSelection(e.element,n,r.document,!1),e.callOnValueChanged()}},callOnValueChanged:function(){var e=this,t=e.properties;t.onValueChanged.call(e,{target:{name:e.element.name,value:t.result,rawValue:e.getRawValue()}})},setPhoneRegionCode:function(e){var t=this,r=t.properties;r.phoneRegionCode=e,t.initPhoneFormatter(),t.onChange()},setRawValue:function(e){var t=this,r=t.properties;e=void 0!==e&&null!==e?e.toString():"",r.numeral&&(e=e.replace(".",r.numeralDecimalMark)),r.postDelimiterBackspace=!1,t.element.value=e,t.onInput(e)},getRawValue:function(){var e=this,t=e.properties,r=i.Util,n=e.element.value;return t.rawValueTrimPrefix&&(n=r.getPrefixStrippedValue(n,t.prefix,t.prefixLength,t.result,t.delimiter,t.delimiters,t.noImmediatePrefix,t.tailPrefix,t.signBeforePrefix)),n=t.numeral?t.numeralFormatter.getRawValue(n):r.stripDelimiters(n,t.delimiter,t.delimiters)},getISOFormatDate:function(){var e=this,t=e.properties;return t.date?t.dateFormatter.getISOFormatDate():""},getISOFormatTime:function(){var e=this,t=e.properties;return t.time?t.timeFormatter.getISOFormatTime():""},getFormattedValue:function(){return this.element.value},destroy:function(){var e=this;e.element.removeEventListener("input",e.onChangeListener),e.element.removeEventListener("keydown",e.onKeyDownListener),e.element.removeEventListener("focus",e.onFocusListener),e.element.removeEventListener("cut",e.onCutListener),e.element.removeEventListener("copy",e.onCopyListener)},toString:function(){return"[Cleave Object]"}},i.NumeralFormatter=r(1),i.DateFormatter=r(2),i.TimeFormatter=r(3),i.PhoneFormatter=r(4),i.CreditCardDetector=r(5),i.Util=r(6),i.DefaultProperties=r(7),("object"==typeof t&&t?t:window).Cleave=i,e.exports=i}).call(t,function(){return this}())},function(e,t){"use strict";var r=function(e,t,i,n,a,o,l,s,c,u){var d=this;d.numeralDecimalMark=e||".",d.numeralIntegerScale=t>0?t:0,d.numeralDecimalScale=i>=0?i:2,d.numeralThousandsGroupStyle=n||r.groupStyle.thousand,d.numeralPositiveOnly=!!a,d.stripLeadingZeroes=o!==!1,d.prefix=l||""===l?l:"",d.signBeforePrefix=!!s,d.tailPrefix=!!c,d.delimiter=u||""===u?u:",",d.delimiterRE=u?new RegExp("\\"+u,"g"):""};r.groupStyle={thousand:"thousand",lakh:"lakh",wan:"wan",none:"none"},r.prototype={getRawValue:function(e){return e.replace(this.delimiterRE,"").replace(this.numeralDecimalMark,".")},format:function(e){var t,i,n,a,o=this,l="";switch(e=e.replace(/[A-Za-z]/g,"").replace(o.numeralDecimalMark,"M").replace(/[^\dM-]/g,"").replace(/^\-/,"N").replace(/\-/g,"").replace("N",o.numeralPositiveOnly?"":"-").replace("M",o.numeralDecimalMark),o.stripLeadingZeroes&&(e=e.replace(/^(-)?0+(?=\d)/,"$1")),i="-"===e.slice(0,1)?"-":"",n="undefined"!=typeof o.prefix?o.signBeforePrefix?i+o.prefix:o.prefix+i:i,a=e,e.indexOf(o.numeralDecimalMark)>=0&&(t=e.split(o.numeralDecimalMark),a=t[0],l=o.numeralDecimalMark+t[1].slice(0,o.numeralDecimalScale)),"-"===i&&(a=a.slice(1)),o.numeralIntegerScale>0&&(a=a.slice(0,o.numeralIntegerScale)),o.numeralThousandsGroupStyle){case r.groupStyle.lakh:a=a.replace(/(\d)(?=(\d\d)+\d$)/g,"$1"+o.delimiter);break;case r.groupStyle.wan:a=a.replace(/(\d)(?=(\d{4})+$)/g,"$1"+o.delimiter);break;case r.groupStyle.thousand:a=a.replace(/(\d)(?=(\d{3})+$)/g,"$1"+o.delimiter)}return o.tailPrefix?i+a.toString()+(o.numeralDecimalScale>0?l.toString():"")+o.prefix:n+a.toString()+(o.numeralDecimalScale>0?l.toString():"")}},e.exports=r},function(e,t){"use strict";var r=function(e,t,r){var i=this;i.date=[],i.blocks=[],i.datePattern=e,i.dateMin=t.split("-").reverse().map(function(e){return parseInt(e,10)}),2===i.dateMin.length&&i.dateMin.unshift(0),i.dateMax=r.split("-").reverse().map(function(e){return parseInt(e,10)}),2===i.dateMax.length&&i.dateMax.unshift(0),i.initBlocks()};r.prototype={initBlocks:function(){var e=this;e.datePattern.forEach(function(t){"Y"===t?e.blocks.push(4):e.blocks.push(2)})},getISOFormatDate:function(){var e=this,t=e.date;return t[2]?t[2]+"-"+e.addLeadingZero(t[1])+"-"+e.addLeadingZero(t[0]):""},getBlocks:function(){return this.blocks},getValidatedDate:function(e){var t=this,r="";return e=e.replace(/[^\d]/g,""),t.blocks.forEach(function(i,n){if(e.length>0){var a=e.slice(0,i),o=a.slice(0,1),l=e.slice(i);switch(t.datePattern[n]){case"d":"00"===a?a="01":parseInt(o,10)>3?a="0"+o:parseInt(a,10)>31&&(a="31");break;case"m":"00"===a?a="01":parseInt(o,10)>1?a="0"+o:parseInt(a,10)>12&&(a="12")}r+=a,e=l}}),this.getFixedDateString(r)},getFixedDateString:function(e){var t,r,i,n=this,a=n.datePattern,o=[],l=0,s=0,c=0,u=0,d=0,m=0,p=!1;4===e.length&&"y"!==a[0].toLowerCase()&&"y"!==a[1].toLowerCase()&&(u="d"===a[0]?0:2,d=2-u,t=parseInt(e.slice(u,u+2),10),r=parseInt(e.slice(d,d+2),10),o=this.getFixedDate(t,r,0)),8===e.length&&(a.forEach(function(e,t){switch(e){case"d":l=t;break;case"m":s=t;break;default:c=t}}),m=2*c,u=l<=c?2*l:2*l+2,d=s<=c?2*s:2*s+2,t=parseInt(e.slice(u,u+2),10),r=parseInt(e.slice(d,d+2),10),i=parseInt(e.slice(m,m+4),10),p=4===e.slice(m,m+4).length,o=this.getFixedDate(t,r,i)),4!==e.length||"y"!==a[0]&&"y"!==a[1]||(d="m"===a[0]?0:2,m=2-d,r=parseInt(e.slice(d,d+2),10),i=parseInt(e.slice(m,m+2),10),p=2===e.slice(m,m+2).length,o=[0,r,i]),6!==e.length||"Y"!==a[0]&&"Y"!==a[1]||(d="m"===a[0]?0:4,m=2-.5*d,r=parseInt(e.slice(d,d+2),10),i=parseInt(e.slice(m,m+4),10),p=4===e.slice(m,m+4).length,o=[0,r,i]),o=n.getRangeFixedDate(o),n.date=o;var h=0===o.length?e:a.reduce(function(e,t){switch(t){case"d":return e+(0===o[0]?"":n.addLeadingZero(o[0]));case"m":return e+(0===o[1]?"":n.addLeadingZero(o[1]));case"y":return e+(p?n.addLeadingZeroForYear(o[2],!1):"");case"Y":return e+(p?n.addLeadingZeroForYear(o[2],!0):"")}},"");return h},getRangeFixedDate:function(e){var t=this,r=t.datePattern,i=t.dateMin||[],n=t.dateMax||[];return!e.length||i.length<3&&n.length<3?e:r.find(function(e){return"y"===e.toLowerCase()})&&0===e[2]?e:n.length&&(n[2]<e[2]||n[2]===e[2]&&(n[1]<e[1]||n[1]===e[1]&&n[0]<e[0]))?n:i.length&&(i[2]>e[2]||i[2]===e[2]&&(i[1]>e[1]||i[1]===e[1]&&i[0]>e[0]))?i:e},getFixedDate:function(e,t,r){return e=Math.min(e,31),t=Math.min(t,12),r=parseInt(r||0,10),(t<7&&t%2===0||t>8&&t%2===1)&&(e=Math.min(e,2===t?this.isLeapYear(r)?29:28:30)),[e,t,r]},isLeapYear:function(e){return e%4===0&&e%100!==0||e%400===0},addLeadingZero:function(e){return(e<10?"0":"")+e},addLeadingZeroForYear:function(e,t){return t?(e<10?"000":e<100?"00":e<1e3?"0":"")+e:(e<10?"0":"")+e}},e.exports=r},function(e,t){"use strict";var r=function(e,t){var r=this;r.time=[],r.blocks=[],r.timePattern=e,r.timeFormat=t,r.initBlocks()};r.prototype={initBlocks:function(){var e=this;e.timePattern.forEach(function(){e.blocks.push(2)})},getISOFormatTime:function(){var e=this,t=e.time;return t[2]?e.addLeadingZero(t[0])+":"+e.addLeadingZero(t[1])+":"+e.addLeadingZero(t[2]):""},getBlocks:function(){return this.blocks},getTimeFormatOptions:function(){var e=this;return"12"===String(e.timeFormat)?{maxHourFirstDigit:1,maxHours:12,maxMinutesFirstDigit:5,maxMinutes:60}:{maxHourFirstDigit:2,maxHours:23,maxMinutesFirstDigit:5,maxMinutes:60}},getValidatedTime:function(e){var t=this,r="";e=e.replace(/[^\d]/g,"");var i=t.getTimeFormatOptions();return t.blocks.forEach(function(n,a){if(e.length>0){var o=e.slice(0,n),l=o.slice(0,1),s=e.slice(n);switch(t.timePattern[a]){case"h":parseInt(l,10)>i.maxHourFirstDigit?o="0"+l:parseInt(o,10)>i.maxHours&&(o=i.maxHours+"");break;case"m":case"s":parseInt(l,10)>i.maxMinutesFirstDigit?o="0"+l:parseInt(o,10)>i.maxMinutes&&(o=i.maxMinutes+"")}r+=o,e=s}}),this.getFixedTimeString(r)},getFixedTimeString:function(e){var t,r,i,n=this,a=n.timePattern,o=[],l=0,s=0,c=0,u=0,d=0,m=0;return 6===e.length&&(a.forEach(function(e,t){switch(e){case"s":l=2*t;break;case"m":s=2*t;break;case"h":c=2*t}}),m=c,d=s,u=l,t=parseInt(e.slice(u,u+2),10),r=parseInt(e.slice(d,d+2),10),i=parseInt(e.slice(m,m+2),10),o=this.getFixedTime(i,r,t)),4===e.length&&n.timePattern.indexOf("s")<0&&(a.forEach(function(e,t){switch(e){case"m":s=2*t;break;case"h":c=2*t}}),m=c,d=s,t=0,r=parseInt(e.slice(d,d+2),10),i=parseInt(e.slice(m,m+2),10),o=this.getFixedTime(i,r,t)),n.time=o,0===o.length?e:a.reduce(function(e,t){switch(t){case"s":return e+n.addLeadingZero(o[2]);case"m":return e+n.addLeadingZero(o[1]);case"h":return e+n.addLeadingZero(o[0])}},"")},getFixedTime:function(e,t,r){return r=Math.min(parseInt(r||0,10),60),t=Math.min(t,60),e=Math.min(e,60),[e,t,r]},addLeadingZero:function(e){return(e<10?"0":"")+e}},e.exports=r},function(e,t){"use strict";var r=function(e,t){var r=this;r.delimiter=t||""===t?t:" ",r.delimiterRE=t?new RegExp("\\"+t,"g"):"",r.formatter=e};r.prototype={setFormatter:function(e){this.formatter=e},format:function(e){var t=this;t.formatter.clear(),e=e.replace(/[^\d+]/g,""),e=e.replace(/^\+/,"B").replace(/\+/g,"").replace("B","+"),e=e.replace(t.delimiterRE,"");for(var r,i="",n=!1,a=0,o=e.length;a<o;a++)r=t.formatter.inputDigit(e.charAt(a)),/[\s()-]/g.test(r)?(i=r,n=!0):n||(i=r);return i=i.replace(/[()]/g,""),i=i.replace(/[\s-]/g,t.delimiter)}},e.exports=r},function(e,t){"use strict";var r={blocks:{uatp:[4,5,6],amex:[4,6,5],diners:[4,6,4],discover:[4,4,4,4],mastercard:[4,4,4,4],dankort:[4,4,4,4],instapayment:[4,4,4,4],jcb15:[4,6,5],jcb:[4,4,4,4],maestro:[4,4,4,4],visa:[4,4,4,4],mir:[4,4,4,4],unionPay:[4,4,4,4],general:[4,4,4,4]},re:{uatp:/^(?!1800)1\d{0,14}/,amex:/^3[47]\d{0,13}/,discover:/^(?:6011|65\d{0,2}|64[4-9]\d?)\d{0,12}/,diners:/^3(?:0([0-5]|9)|[689]\d?)\d{0,11}/,mastercard:/^(5[1-5]\d{0,2}|22[2-9]\d{0,1}|2[3-7]\d{0,2})\d{0,12}/,dankort:/^(5019|4175|4571)\d{0,12}/,instapayment:/^63[7-9]\d{0,13}/,jcb15:/^(?:2131|1800)\d{0,11}/,jcb:/^(?:35\d{0,2})\d{0,12}/,maestro:/^(?:5[0678]\d{0,2}|6304|67\d{0,2})\d{0,12}/,mir:/^220[0-4]\d{0,12}/,visa:/^4\d{0,15}/,unionPay:/^(62|81)\d{0,14}/},getStrictBlocks:function(e){var t=e.reduce(function(e,t){return e+t},0);return e.concat(19-t)},getInfo:function(e,t){var i=r.blocks,n=r.re;t=!!t;for(var a in n)if(n[a].test(e)){var o=i[a];return{type:a,blocks:t?this.getStrictBlocks(o):o}}return{type:"unknown",blocks:t?this.getStrictBlocks(i.general):i.general}}};e.exports=r},function(e,t){"use strict";var r={noop:function(){},strip:function(e,t){return e.replace(t,"")},getPostDelimiter:function(e,t,r){if(0===r.length)return e.slice(-t.length)===t?t:"";var i="";return r.forEach(function(t){e.slice(-t.length)===t&&(i=t)}),i},getDelimiterREByDelimiter:function(e){return new RegExp(e.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1"),"g")},getNextCursorPosition:function(e,t,r,i,n){return t.length===e?r.length:e+this.getPositionOffset(e,t,r,i,n)},getPositionOffset:function(e,t,r,i,n){var a,o,l;return a=this.stripDelimiters(t.slice(0,e),i,n),o=this.stripDelimiters(r.slice(0,e),i,n),l=a.length-o.length,0!==l?l/Math.abs(l):0},stripDelimiters:function(e,t,r){var i=this;if(0===r.length){var n=t?i.getDelimiterREByDelimiter(t):"";return e.replace(n,"")}return r.forEach(function(t){t.split("").forEach(function(t){e=e.replace(i.getDelimiterREByDelimiter(t),"")})}),e},headStr:function(e,t){return e.slice(0,t)},getMaxLength:function(e){return e.reduce(function(e,t){return e+t},0)},getPrefixStrippedValue:function(e,t,r,i,n,a,o,l,s){if(0===r)return e;if(e===t&&""!==e)return"";if(s&&"-"==e.slice(0,1)){var c="-"==i.slice(0,1)?i.slice(1):i;return"-"+this.getPrefixStrippedValue(e.slice(1),t,r,c,n,a,o,l,s)}if(i.slice(0,r)!==t&&!l)return o&&!i&&e?e:"";if(i.slice(-r)!==t&&l)return o&&!i&&e?e:"";var u=this.stripDelimiters(i,n,a);return e.slice(0,r)===t||l?e.slice(-r)!==t&&l?u.slice(0,-r-1):l?e.slice(0,-r):e.slice(r):u.slice(r)},getFirstDiffIndex:function(e,t){for(var r=0;e.charAt(r)===t.charAt(r);)if(""===e.charAt(r++))return-1;return r},getFormattedValue:function(e,t,r,i,n,a){var o="",l=n.length>0,s="";return 0===r?e:(t.forEach(function(t,c){if(e.length>0){var u=e.slice(0,t),d=e.slice(t);s=l?n[a?c-1:c]||s:i,a?(c>0&&(o+=s),o+=u):(o+=u,u.length===t&&c<r-1&&(o+=s)),e=d}}),o)},fixPrefixCursor:function(e,t,r,i){if(e){var n=e.value,a=r||i[0]||" ";if(e.setSelectionRange&&t&&!(t.length+a.length<=n.length)){var o=2*n.length;setTimeout(function(){e.setSelectionRange(o,o)},1)}}},checkFullSelection:function(e){try{var t=window.getSelection()||document.getSelection()||{};return t.toString().length===e.length}catch(r){}return!1},setSelection:function(e,t,r){if(e===this.getActiveElement(r)&&!(e&&e.value.length<=t))if(e.createTextRange){var i=e.createTextRange();i.move("character",t),i.select()}else try{e.setSelectionRange(t,t)}catch(n){console.warn("The input element type does not support selection")}},getActiveElement:function(e){var t=e.activeElement;return t&&t.shadowRoot?this.getActiveElement(t.shadowRoot):t},isAndroid:function(){return navigator&&/android/i.test(navigator.userAgent)},isAndroidBackspaceKeydown:function(e,t){return!!(this.isAndroid()&&e&&t)&&t===e.slice(0,-1)}};e.exports=r},function(e,t){(function(t){"use strict";var r={assign:function(e,r){return e=e||{},r=r||{},e.creditCard=!!r.creditCard,e.creditCardStrictMode=!!r.creditCardStrictMode,e.creditCardType="",e.onCreditCardTypeChanged=r.onCreditCardTypeChanged||function(){},e.phone=!!r.phone,e.phoneRegionCode=r.phoneRegionCode||"AU",e.phoneFormatter={},e.time=!!r.time,e.timePattern=r.timePattern||["h","m","s"],e.timeFormat=r.timeFormat||"24",e.timeFormatter={},e.date=!!r.date,e.datePattern=r.datePattern||["d","m","Y"],e.dateMin=r.dateMin||"",e.dateMax=r.dateMax||"",e.dateFormatter={},e.numeral=!!r.numeral,e.numeralIntegerScale=r.numeralIntegerScale>0?r.numeralIntegerScale:0,e.numeralDecimalScale=r.numeralDecimalScale>=0?r.numeralDecimalScale:2,e.numeralDecimalMark=r.numeralDecimalMark||".",e.numeralThousandsGroupStyle=r.numeralThousandsGroupStyle||"thousand",e.numeralPositiveOnly=!!r.numeralPositiveOnly,e.stripLeadingZeroes=r.stripLeadingZeroes!==!1,e.signBeforePrefix=!!r.signBeforePrefix,e.tailPrefix=!!r.tailPrefix,e.swapHiddenInput=!!r.swapHiddenInput,e.numericOnly=e.creditCard||e.date||!!r.numericOnly,e.uppercase=!!r.uppercase,e.lowercase=!!r.lowercase,e.prefix=e.creditCard||e.date?"":r.prefix||"",e.noImmediatePrefix=!!r.noImmediatePrefix,e.prefixLength=e.prefix.length,e.rawValueTrimPrefix=!!r.rawValueTrimPrefix,e.copyDelimiter=!!r.copyDelimiter,e.initValue=void 0!==r.initValue&&null!==r.initValue?r.initValue.toString():"",e.delimiter=r.delimiter||""===r.delimiter?r.delimiter:r.date?"/":r.time?":":r.numeral?",":(r.phone," "),e.delimiterLength=e.delimiter.length,e.delimiterLazyShow=!!r.delimiterLazyShow,e.delimiters=r.delimiters||[],e.blocks=r.blocks||[],e.blocksLength=e.blocks.length,e.root="object"==typeof t&&t?t:window,e.document=r.document||e.root.document,e.maxLength=0,e.backspace=!1,e.result="",e.onValueChanged=r.onValueChanged||function(){},e}};e.exports=r}).call(t,function(){return this}())}])});
@@ -0,0 +1,8 @@
1
+ /*!
2
+ * JSON API Serializer 3.6.7
3
+ * https://github.com/SeyZ/jsonapi-serializer
4
+ *
5
+ * Copyright (c) 2015 Sandro Munda
6
+ * Released under the MIT license
7
+ */
8
+ require=function(){return function e(t,r,n){function i(o,s){if(!r[o]){if(!t[o]){var u="function"==typeof require&&require;if(!s&&u)return u(o,!0);if(a)return a(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var l=r[o]={exports:{}};t[o][0].call(l.exports,function(e){return i(t[o][1][e]||e)},l,l.exports,e,t,r,n)}return r[o].exports}for(var a="function"==typeof require&&require,o=0;o<n.length;o++)i(n[o]);return i}}()({1:[function(e,t,r){"use strict";var n=e("lodash/isPlainObject"),i=e("lodash/isFunction"),a=e("lodash/find"),o=e("lodash/extend"),s=e("lodash/transform"),u=e("./inflector");t.exports=function(e,t,r){function c(e){return Array.isArray(e)||n(e)}function l(e){return n(e)?s(e,function(e,t,r){c(t)?e[l(r)]=l(t):e[l(r)]=t}):Array.isArray(e)?e.map(function(e){return c(e)?l(e):e}):i(r.keyForAttribute)?r.keyForAttribute(e):u.caserize(e,r)}function f(e){var t=l(e.attributes||{});return"id"in e&&(t[r.id||"id"]=e.id),r.typeAsAttribute&&"type"in e&&(t.type=e.type),"meta"in e&&(t.meta=l(e.meta||{})),t}function p(e,t){if(e.relationships){var r={};return Promise.all(Object.keys(e.relationships).map(function(n){var i=e.relationships[n];if(null!==i.data)return Array.isArray(i.data)?Promise.all(i.data.map(function(e){return _(e,t)})).then(function(e){e&&(r[l(n)]=e)}):_(i.data,t).then(function(e){e&&(r[l(n)]=e)});r[l(n)]=null})).then(function(){return r})}}function _(t,n){return function(t,r){return new Promise(function(n){e.included&&t||n(null);var i=a(e.included,{id:t.id,type:t.type});return i?r.indexOf(i.type)>-1?Promise.all([f(i)]).then(function(e){var t=e[0],r=e[1];n(o(t,r))}):Promise.all([f(i),p(i,r+":"+i.type+i.id)]).then(function(e){var t=e[0],r=e[1];n(o(t,r))}):n(null)})}(t,n).then(function(e){var n=function(e,t){return r&&e&&r[e.type]?(0,r[e.type].valueForRelationship)(e,t):t}(t,e);return n&&i(n.then)?n.then(function(e){return e}):n})}this.perform=function(){return Promise.all([f(t),p(t,t.type+t.id)]).then(function(t){var n=t[0],i=t[1],a=o(n,i);return e.links&&(a.links=e.links),r&&r.transform&&(a=r.transform(a)),a})}}},{"./inflector":5,"lodash/extend":158,"lodash/find":159,"lodash/isFunction":171,"lodash/isPlainObject":176,"lodash/transform":195}],2:[function(e,t,r){"use strict";var n=e("lodash/isFunction"),i=e("./deserializer-utils");t.exports=function(e){e||(e={}),this.deserialize=function(t,r){return Array.isArray(t.data)?Promise.all(t.data.map(function(r){return new i(t,r,e).perform()})).then(function(e){return n(r)&&r(null,e),e}):new i(t,t.data,e).perform().then(function(e){return n(r)&&r(null,e),e})}}},{"./deserializer-utils":1,"lodash/isFunction":171}],3:[function(e,t,r){"use strict";t.exports=function(e){var t={errors:[]};return e.forEach(function(e){var r={};e.id&&(r.id=e.id),e.status&&(r.status=e.status),e.code&&(r.code=e.code),e.title&&(r.title=e.title),e.detail&&(r.detail=e.detail),e.source&&(r.source={},e.source.pointer&&(r.source.pointer=e.source.pointer),e.source.parameter&&(r.source.parameter=e.source.parameter)),e.links&&(r.links={about:e.links.about}),e.meta&&(r.meta=e.meta),t.errors.push(r)}),t}},{}],4:[function(e,t,r){"use strict";var n=e("./error-utils");t.exports=function(e){return e||(e=[]),Array.isArray(e)?new n(e):new n([e])}},{"./error-utils":3}],5:[function(e,t,r){"use strict";var n=e("inflected");t.exports={caserize:function(e,t){switch(e=n.underscore(e),t.keyForAttribute){case"dash-case":case"lisp-case":case"spinal-case":case"kebab-case":return n.dasherize(e);case"underscore_case":case"snake_case":return e;case"CamelCase":return n.camelize(e);case"camelCase":return n.camelize(e,!1);default:return n.dasherize(e)}},pluralize:function(e){return n.pluralize(e)}}},{inflected:8}],6:[function(e,t,r){"use strict";var n=e("lodash/isPlainObject"),i=e("lodash/isFunction"),a=e("lodash/find"),o=e("lodash/merge"),s=e("lodash/identity"),u=e("lodash/transform"),c=e("lodash/mapValues"),l=e("lodash/mapKeys"),f=e("lodash/pick"),p=e("lodash/pickBy"),_=(e("lodash/keys"),e("lodash/each")),h=e("lodash/isNil"),y=e("./inflector");t.exports=function(e,t,r,v){function b(e){return Array.isArray(e)||n(e)}function d(e){return n(e)?u(e,function(e,t,r){b(t)?e[d(r)]=d(t):e[d(r)]=t}):Array.isArray(e)?e.map(function(e){return b(e)?d(e):e}):i(v.keyForAttribute)?v.keyForAttribute(e):y.caserize(e,v)}function g(){return v.id||"id"}function x(e,t){var r;return t=t||{},i(v.typeForAttribute)&&(r=v.typeForAttribute(e,t)),void 0!==v.pluralizeType&&!v.pluralizeType||void 0!==r||(r=y.pluralize(e)),void 0===r&&(r=e),r}function m(e,r,n){return c(r,function(r){return i(r)?r(t,e,n):r})}function A(e,r){return i(r)?r(t):c(r,function(r){return i(r)?r(t,e):r})}function j(e,t){return l(f(e,t),function(e,t){return d(t)})}function O(e,t){var n,i=(n=t,a(r.included,{id:n.id,type:n.type}));i?(i.relationships=o(i.relationships,p(t.relationships,s)),i.attributes=o(i.attributes,p(t.attributes,s))):(e.included||(e.included=[]),e.included.push(t))}this.serialize=function(e,t,r,i){var a=this,o=null;if(i&&i.ref){if(e.relationships||(e.relationships={}),o=Array.isArray(t[r])?t[r].map(function(e){return a.serializeRef(e,t,r,i)}):a.serializeRef(t[r],t,r,i),e.relationships[d(r)]={},i.ignoreRelationshipData||(e.relationships[d(r)].data=o),i.relationshipLinks){var s=m(t[r],i.relationshipLinks,e);s.related&&(e.relationships[d(r)].links=s)}i.relationshipMeta&&(e.relationships[d(r)].meta=A(t[r],i.relationshipMeta))}else Array.isArray(t[r])?(o=t[r].length&&n(t[r][0])?t[r].map(function(e){return a.serializeNested(e,t,r,i)}):t[r],e.attributes[d(r)]=o):n(t[r])?(o=a.serializeNested(t[r],t,r,i),e.attributes[d(r)]=o):e.attributes[d(r)]=t[r]},this.serializeRef=function(e,t,n,a){var o=this,s=function(e,t,r){if(i(r.ref))return r.ref(e,t);if(!0===r.ref){if(Array.isArray(t))return t.map(function(e){return String(e)});if(t)return String(t)}else if(t&&t[r.ref])return String(t[r.ref])}(t,e,a),u=x(n,e),c=[],l=[];a.attributes&&(e&&a.attributes.forEach(function(t){a[t]&&!e[t]&&a[t].nullIfMissing&&(e[t]=null)}),c=a.attributes.filter(function(e){return a[e]}),l=a.attributes.filter(function(e){return!a[e]}));var f={type:u,id:s};return l&&(f.attributes=j(e,l)),c.forEach(function(t){e&&(b(e[t])||null===e[t])&&o.serialize(f,e,t,a[t])}),l.length&&(void 0===a.included||a.included)&&(a.includedLinks&&(f.links=m(e,a.includedLinks)),void 0!==s&&O(r,f)),void 0!==s?{type:u,id:s}:null},this.serializeNested=function(e,t,r,n){var i=this,a=[],o=[],s={};return n&&n.attributes?(a=n.attributes.filter(function(e){return n[e]}),(o=n.attributes.filter(function(e){return!n[e]}))&&(s.attributes=j(e,o)),a.forEach(function(t){b(e[t])&&i.serialize(s,e,t,n[t])})):s.attributes=e,s.attributes},this.perform=function(){var r=this;if(null===t)return null;v&&v.transform&&(t=v.transform(t));var n={type:x(e,t)};return h(t[g()])||(n.id=String(t[g()])),v.dataLinks&&(n.links=m(t,v.dataLinks)),v.dataMeta&&(n.meta=A(t,v.dataMeta)),_(v.attributes,function(e){var i=e.split(":");if(v[e]&&!t[e]&&v[e].nullIfMissing&&(t[e]=null),i[0]in t){n.attributes||(n.attributes={});var a=e;i.length>1&&(e=i[0],a=i[1]),r.serialize(n,t,e,v[a])}}),n}}},{"./inflector":5,"lodash/each":156,"lodash/find":159,"lodash/identity":165,"lodash/isFunction":171,"lodash/isNil":173,"lodash/isPlainObject":176,"lodash/keys":179,"lodash/mapKeys":181,"lodash/mapValues":182,"lodash/merge":184,"lodash/pick":185,"lodash/pickBy":186,"lodash/transform":195}],7:[function(e,t,r){"use strict";var n=e("lodash/isFunction"),i=e("lodash/mapValues"),a=e("./serializer-utils");t.exports=function(e,t,r){if(this.serialize=function(e){var t,r=this,o={};return r.opts.topLevelLinks&&(o.links=(t=r.opts.topLevelLinks,i(t,function(t){return n(t)?t(e):t}))),r.opts.meta&&(o.meta=i(r.opts.meta,function(t){return n(t)?t(e):t})),Array.isArray(e)?(o.data=[],e.forEach(function(e){var t=new a(r.collectionName,e,o,r.opts);o.data.push(t.perform())}),o):(o.data=new a(r.collectionName,e,o,r.opts).perform(e),o)},3===arguments.length)return this.collectionName=e,this.opts=r,this.serialize(t);this.collectionName=e,this.opts=t}},{"./serializer-utils":6,"lodash/isFunction":171,"lodash/mapValues":182}],8:[function(e,t,r){"use strict";t.exports=e("./lib/Inflector")},{"./lib/Inflector":10}],9:[function(e,t,r){(function(r,n){"use strict";var i=e("./hasProp"),a=e("./remove"),o=e("./icPart");function s(){this.plurals=[],this.singulars=[],this.uncountables=[],this.humans=[],this.acronyms={},this.acronymRegex=/(?=a)b/}s.getInstance=function(e){var t=void 0!==r?r:n;return t.__Inflector_Inflections=t.__Inflector_Inflections||{},t.__Inflector_Inflections[e]=t.__Inflector_Inflections[e]||new s,t.__Inflector_Inflections[e]},s.prototype.acronym=function(e){this.acronyms[e.toLowerCase()]=e;var t=[];for(var r in this.acronyms)i(this.acronyms,r)&&t.push(this.acronyms[r]);this.acronymRegex=new RegExp(t.join("|"))},s.prototype.plural=function(e,t){"string"==typeof e&&a(this.uncountables,e),a(this.uncountables,t),this.plurals.unshift([e,t])},s.prototype.singular=function(e,t){"string"==typeof e&&a(this.uncountables,e),a(this.uncountables,t),this.singulars.unshift([e,t])},s.prototype.irregular=function(e,t){a(this.uncountables,e),a(this.uncountables,t);var r=e[0],n=e.substr(1),i=t[0],s=t.substr(1);if(r.toUpperCase()===i.toUpperCase())this.plural(new RegExp("("+r+")"+n+"$","i"),"$1"+s),this.plural(new RegExp("("+i+")"+s+"$","i"),"$1"+s),this.singular(new RegExp("("+r+")"+n+"$","i"),"$1"+n),this.singular(new RegExp("("+i+")"+s+"$","i"),"$1"+n);else{var u=o(n),c=o(s);this.plural(new RegExp(r.toUpperCase()+u+"$"),i.toUpperCase()+s),this.plural(new RegExp(r.toLowerCase()+u+"$"),i.toLowerCase()+s),this.plural(new RegExp(i.toUpperCase()+c+"$"),i.toUpperCase()+s),this.plural(new RegExp(i.toLowerCase()+c+"$"),i.toLowerCase()+s),this.singular(new RegExp(r.toUpperCase()+u+"$"),r.toUpperCase()+n),this.singular(new RegExp(r.toLowerCase()+u+"$"),r.toLowerCase()+n),this.singular(new RegExp(i.toUpperCase()+c+"$"),r.toUpperCase()+n),this.singular(new RegExp(i.toLowerCase()+c+"$"),r.toLowerCase()+n)}},s.prototype.uncountable=function(){var e=Array.prototype.slice.call(arguments,0);this.uncountables=this.uncountables.concat(e)},s.prototype.human=function(e,t){this.humans.unshift([e,t])},s.prototype.clear=function(e){"all"===(e=e||"all")?(this.plurals=[],this.singulars=[],this.uncountables=[],this.humans=[]):this[e]=[]},t.exports=s}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./hasProp":14,"./icPart":15,"./remove":17,_process:196}],10:[function(e,t,r){"use strict";var n=e("./Inflections"),i=e("./Transliterator"),a=e("./Methods"),o=e("./defaults"),s=e("./isFunc"),u=a;for(var c in u.inflections=function(e,t){if(s(e)&&(t=e,e=null),e=e||"en",!t)return n.getInstance(e);t(n.getInstance(e))},u.transliterations=function(e,t){if(s(e)&&(t=e,e=null),e=e||"en",!t)return i.getInstance(e);t(i.getInstance(e))},o)u.inflections(c,o[c]);t.exports=u},{"./Inflections":9,"./Methods":11,"./Transliterator":12,"./defaults":13,"./isFunc":16}],11:[function(e,t,r){"use strict";var n={pluralize:function(e,t){return t=t||"en",this._applyInflections(e,this.inflections(t).plurals)},singularize:function(e,t){return t=t||"en",this._applyInflections(e,this.inflections(t).singulars)},camelize:function(e,t){null==t&&(t=!0);var r=""+e,n=this;return r=(r=t?r.replace(/^[a-z\d]*/,function(e){return n.inflections().acronyms[e]||n.capitalize(e)}):r.replace(new RegExp("^(?:"+this.inflections().acronymRegex.source+"(?=\\b|[A-Z_])|\\w)"),function(e){return e.toLowerCase()})).replace(/(?:_|(\/))([a-z\d]*)/gi,function(e,t,r,i,a){return t||(t=""),""+t+(n.inflections().acronyms[r]||n.capitalize(r))})},underscore:function(e){var t=""+e;return(t=(t=(t=(t=t.replace(new RegExp("(?:([A-Za-z\\d])|^)("+this.inflections().acronymRegex.source+")(?=\\b|[^a-z])","g"),function(e,t,r){return(t||"")+(t?"_":"")+r.toLowerCase()})).replace(/([A-Z\d]+)([A-Z][a-z])/g,"$1_$2")).replace(/([a-z\d])([A-Z])/g,"$1_$2")).replace(/-/g,"_")).toLowerCase()},humanize:function(e,t){var r,n,i,a=""+e,o=this.inflections().humans,s=this;null!==(t=t||{}).capitalize&&void 0!==t.capitalize||(t.capitalize=!0);for(var u=0,c=o.length;u<c;u++)if(n=(r=o[u])[0],i=r[1],n.test&&n.test(a)||a.indexOf(n)>-1){a=a.replace(n,i);break}return a=(a=(a=a.replace(/_id$/,"")).replace(/_/g," ")).replace(/([a-z\d]*)/gi,function(e){return s.inflections().acronyms[e]||e.toLowerCase()}),t.capitalize&&(a=a.replace(/^\w/,function(e){return e.toUpperCase()})),a},capitalize:function(e){var t=null==e?"":String(e);return t.charAt(0).toUpperCase()+t.slice(1)},titleize:function(e){return this.humanize(this.underscore(e)).replace(/(^|[\s¿\/]+)([a-z])/g,function(e,t,r,n,i){return e.replace(r,r.toUpperCase())})},tableize:function(e){return this.pluralize(this.underscore(e))},classify:function(e){return this.camelize(this.singularize(e.replace(/.*\./g,"")))},dasherize:function(e){return e.replace(/_/g,"-")},foreignKey:function(e,t){return null==t&&(t=!0),this.underscore(e)+(t?"_id":"id")},ordinal:function(e){var t=Math.abs(Number(e)),r=t%100;if(11===r||12===r||13===r)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},ordinalize:function(e){return""+e+this.ordinal(e)},transliterate:function(e,t){var r=(t=t||{}).locale||"en",n=t.replacement||"?";return this.transliterations(r).transliterate(e,n)},parameterize:function(e,t){void 0===(t=t||{}).separator&&(t.separator="-"),null===t.separator&&(t.separator="");var r=this.transliterate(e,t);if(r=r.replace(/[^a-z0-9\-_]+/gi,t.separator),t.separator.length){var n=new RegExp(t.separator);r=(r=r.replace(new RegExp(n.source+"{2,}"),t.separator)).replace(new RegExp("^"+n.source+"|"+n.source+"$","i"),"")}return r.toLowerCase()},_applyInflections:function(e,t){var r,n,i,a=""+e;if(0===a.length)return a;var o=a.toLowerCase().match(/\b\w+$/);if(o&&this.inflections().uncountables.indexOf(o[0])>-1)return a;for(var s=0,u=t.length;s<u;s++)if(n=(r=t[s])[0],i=r[1],a.match(n)){a=a.replace(n,i);break}return a}};t.exports=n},{}],12:[function(e,t,r){(function(e,r){"use strict";var n={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","×":"x","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","Þ":"Th","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Ĉ":"C","ĉ":"c","Ċ":"C","ċ":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"D","đ":"d","Ē":"E","ē":"e","Ĕ":"E","ĕ":"e","Ė":"E","ė":"e","Ę":"E","ę":"e","Ě":"E","ě":"e","Ĝ":"G","ĝ":"g","Ğ":"G","ğ":"g","Ġ":"G","ġ":"g","Ģ":"G","ģ":"g","Ĥ":"H","ĥ":"h","Ħ":"H","ħ":"h","Ĩ":"I","ĩ":"i","Ī":"I","ī":"i","Ĭ":"I","ĭ":"i","Į":"I","į":"i","İ":"I","ı":"i","IJ":"IJ","ij":"ij","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","ĺ":"l","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ŀ":"L","ŀ":"l","Ł":"L","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","ʼn":"'n","Ŋ":"NG","ŋ":"ng","Ō":"O","ō":"o","Ŏ":"O","ŏ":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ŗ":"R","ŗ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ŝ":"S","ŝ":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ŧ":"T","ŧ":"t","Ũ":"U","ũ":"u","Ū":"U","ū":"u","Ŭ":"U","ŭ":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z"};function i(){for(var e in this.approximations={},n)this.approximate(e,n[e])}i.getInstance=function(t){var n=void 0!==e?e:r;return n.__Inflector_Transliterator=n.__Inflector_Transliterator||{},n.__Inflector_Transliterator[t]=n.__Inflector_Transliterator[t]||new i,n.__Inflector_Transliterator[t]},i.prototype.approximate=function(e,t){this.approximations[e]=t},i.prototype.transliterate=function(e,t){var r=this;return e.replace(/[^\u0000-\u007f]/g,function(e){return r.approximations[e]||t||"?"})},t.exports=i}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:196}],13:[function(e,t,r){"use strict";t.exports={en:function(e){e.plural(/$/,"s"),e.plural(/s$/i,"s"),e.plural(/^(ax|test)is$/i,"$1es"),e.plural(/(octop|vir)us$/i,"$1i"),e.plural(/(octop|vir)i$/i,"$1i"),e.plural(/(alias|status)$/i,"$1es"),e.plural(/(bu)s$/i,"$1ses"),e.plural(/(buffal|tomat)o$/i,"$1oes"),e.plural(/([ti])um$/i,"$1a"),e.plural(/([ti])a$/i,"$1a"),e.plural(/sis$/i,"ses"),e.plural(/(?:([^f])fe|([lr])f)$/i,"$1$2ves"),e.plural(/(hive)$/i,"$1s"),e.plural(/([^aeiouy]|qu)y$/i,"$1ies"),e.plural(/(x|ch|ss|sh)$/i,"$1es"),e.plural(/(matr|vert|ind)(?:ix|ex)$/i,"$1ices"),e.plural(/^(m|l)ouse$/i,"$1ice"),e.plural(/^(m|l)ice$/i,"$1ice"),e.plural(/^(ox)$/i,"$1en"),e.plural(/^(oxen)$/i,"$1"),e.plural(/(quiz)$/i,"$1zes"),e.singular(/s$/i,""),e.singular(/(ss)$/i,"$1"),e.singular(/(n)ews$/i,"$1ews"),e.singular(/([ti])a$/i,"$1um"),e.singular(/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)(sis|ses)$/i,"$1sis"),e.singular(/(^analy)(sis|ses)$/i,"$1sis"),e.singular(/([^f])ves$/i,"$1fe"),e.singular(/(hive)s$/i,"$1"),e.singular(/(tive)s$/i,"$1"),e.singular(/([lr])ves$/i,"$1f"),e.singular(/([^aeiouy]|qu)ies$/i,"$1y"),e.singular(/(s)eries$/i,"$1eries"),e.singular(/(m)ovies$/i,"$1ovie"),e.singular(/(x|ch|ss|sh)es$/i,"$1"),e.singular(/^(m|l)ice$/i,"$1ouse"),e.singular(/(bus)(es)?$/i,"$1"),e.singular(/(o)es$/i,"$1"),e.singular(/(shoe)s$/i,"$1"),e.singular(/(cris|test)(is|es)$/i,"$1is"),e.singular(/^(a)x[ie]s$/i,"$1xis"),e.singular(/(octop|vir)(us|i)$/i,"$1us"),e.singular(/(alias|status)(es)?$/i,"$1"),e.singular(/^(ox)en/i,"$1"),e.singular(/(vert|ind)ices$/i,"$1ex"),e.singular(/(matr)ices$/i,"$1ix"),e.singular(/(quiz)zes$/i,"$1"),e.singular(/(database)s$/i,"$1"),e.irregular("person","people"),e.irregular("man","men"),e.irregular("child","children"),e.irregular("sex","sexes"),e.irregular("move","moves"),e.irregular("zombie","zombies"),e.uncountable("equipment","information","rice","money","species","series","fish","sheep","jeans","police")}}},{}],14:[function(e,t,r){"use strict";var n=Object.prototype.hasOwnProperty;t.exports=function(e,t){return n.call(e,t)}},{}],15:[function(e,t,r){"use strict";t.exports=function(e){return e.split("").map(function(e){return"(?:"+[e.toUpperCase(),e.toLowerCase()].join("|")+")"}).join("")}},{}],16:[function(e,t,r){"use strict";var n=Object.prototype.toString;t.exports=function(e){return"[object Function]"===n.call(e)}},{}],17:[function(e,t,r){"use strict";var n=Array.prototype.splice;t.exports=function(e,t){for(var r=e.length-1;r>=0;r--)e[r]===t&&n.call(e,r,1)}},{}],18:[function(e,t,r){var n=e("./_getNative")(e("./_root"),"DataView");t.exports=n},{"./_getNative":97,"./_root":139}],19:[function(e,t,r){var n=e("./_hashClear"),i=e("./_hashDelete"),a=e("./_hashGet"),o=e("./_hashHas"),s=e("./_hashSet");function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=a,u.prototype.has=o,u.prototype.set=s,t.exports=u},{"./_hashClear":105,"./_hashDelete":106,"./_hashGet":107,"./_hashHas":108,"./_hashSet":109}],20:[function(e,t,r){var n=e("./_listCacheClear"),i=e("./_listCacheDelete"),a=e("./_listCacheGet"),o=e("./_listCacheHas"),s=e("./_listCacheSet");function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=a,u.prototype.has=o,u.prototype.set=s,t.exports=u},{"./_listCacheClear":119,"./_listCacheDelete":120,"./_listCacheGet":121,"./_listCacheHas":122,"./_listCacheSet":123}],21:[function(e,t,r){var n=e("./_getNative")(e("./_root"),"Map");t.exports=n},{"./_getNative":97,"./_root":139}],22:[function(e,t,r){var n=e("./_mapCacheClear"),i=e("./_mapCacheDelete"),a=e("./_mapCacheGet"),o=e("./_mapCacheHas"),s=e("./_mapCacheSet");function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=a,u.prototype.has=o,u.prototype.set=s,t.exports=u},{"./_mapCacheClear":124,"./_mapCacheDelete":125,"./_mapCacheGet":126,"./_mapCacheHas":127,"./_mapCacheSet":128}],23:[function(e,t,r){var n=e("./_getNative")(e("./_root"),"Promise");t.exports=n},{"./_getNative":97,"./_root":139}],24:[function(e,t,r){var n=e("./_getNative")(e("./_root"),"Set");t.exports=n},{"./_getNative":97,"./_root":139}],25:[function(e,t,r){var n=e("./_MapCache"),i=e("./_setCacheAdd"),a=e("./_setCacheHas");function o(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new n;++t<r;)this.add(e[t])}o.prototype.add=o.prototype.push=i,o.prototype.has=a,t.exports=o},{"./_MapCache":22,"./_setCacheAdd":141,"./_setCacheHas":142}],26:[function(e,t,r){var n=e("./_ListCache"),i=e("./_stackClear"),a=e("./_stackDelete"),o=e("./_stackGet"),s=e("./_stackHas"),u=e("./_stackSet");function c(e){var t=this.__data__=new n(e);this.size=t.size}c.prototype.clear=i,c.prototype.delete=a,c.prototype.get=o,c.prototype.has=s,c.prototype.set=u,t.exports=c},{"./_ListCache":20,"./_stackClear":146,"./_stackDelete":147,"./_stackGet":148,"./_stackHas":149,"./_stackSet":150}],27:[function(e,t,r){var n=e("./_root").Symbol;t.exports=n},{"./_root":139}],28:[function(e,t,r){var n=e("./_root").Uint8Array;t.exports=n},{"./_root":139}],29:[function(e,t,r){var n=e("./_getNative")(e("./_root"),"WeakMap");t.exports=n},{"./_getNative":97,"./_root":139}],30:[function(e,t,r){t.exports=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}},{}],31:[function(e,t,r){t.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}},{}],32:[function(e,t,r){t.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,i=0,a=[];++r<n;){var o=e[r];t(o,r,e)&&(a[i++]=o)}return a}},{}],33:[function(e,t,r){var n=e("./_baseTimes"),i=e("./isArguments"),a=e("./isArray"),o=e("./isBuffer"),s=e("./_isIndex"),u=e("./isTypedArray"),c=Object.prototype.hasOwnProperty;t.exports=function(e,t){var r=a(e),l=!r&&i(e),f=!r&&!l&&o(e),p=!r&&!l&&!f&&u(e),_=r||l||f||p,h=_?n(e.length,String):[],y=h.length;for(var v in e)!t&&!c.call(e,v)||_&&("length"==v||f&&("offset"==v||"parent"==v)||p&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||s(v,y))||h.push(v);return h}},{"./_baseTimes":71,"./_isIndex":112,"./isArguments":166,"./isArray":167,"./isBuffer":170,"./isTypedArray":178}],34:[function(e,t,r){t.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}},{}],35:[function(e,t,r){t.exports=function(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}},{}],36:[function(e,t,r){t.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}},{}],37:[function(e,t,r){var n=e("./_baseAssignValue"),i=e("./eq");t.exports=function(e,t,r){(void 0===r||i(e[t],r))&&(void 0!==r||t in e)||n(e,t,r)}},{"./_baseAssignValue":40,"./eq":157}],38:[function(e,t,r){var n=e("./_baseAssignValue"),i=e("./eq"),a=Object.prototype.hasOwnProperty;t.exports=function(e,t,r){var o=e[t];a.call(e,t)&&i(o,r)&&(void 0!==r||t in e)||n(e,t,r)}},{"./_baseAssignValue":40,"./eq":157}],39:[function(e,t,r){var n=e("./eq");t.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}},{"./eq":157}],40:[function(e,t,r){var n=e("./_defineProperty");t.exports=function(e,t,r){"__proto__"==t&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}},{"./_defineProperty":87}],41:[function(e,t,r){var n=e("./isObject"),i=Object.create,a=function(){function e(){}return function(t){if(!n(t))return{};if(i)return i(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();t.exports=a},{"./isObject":174}],42:[function(e,t,r){var n=e("./_baseForOwn"),i=e("./_createBaseEach")(n);t.exports=i},{"./_baseForOwn":46,"./_createBaseEach":84}],43:[function(e,t,r){t.exports=function(e,t,r,n){for(var i=e.length,a=r+(n?1:-1);n?a--:++a<i;)if(t(e[a],a,e))return a;return-1}},{}],44:[function(e,t,r){var n=e("./_arrayPush"),i=e("./_isFlattenable");t.exports=function e(t,r,a,o,s){var u=-1,c=t.length;for(a||(a=i),s||(s=[]);++u<c;){var l=t[u];r>0&&a(l)?r>1?e(l,r-1,a,o,s):n(s,l):o||(s[s.length]=l)}return s}},{"./_arrayPush":35,"./_isFlattenable":111}],45:[function(e,t,r){var n=e("./_createBaseFor")();t.exports=n},{"./_createBaseFor":85}],46:[function(e,t,r){var n=e("./_baseFor"),i=e("./keys");t.exports=function(e,t){return e&&n(e,t,i)}},{"./_baseFor":45,"./keys":179}],47:[function(e,t,r){var n=e("./_castPath"),i=e("./_toKey");t.exports=function(e,t){for(var r=0,a=(t=n(t,e)).length;null!=e&&r<a;)e=e[i(t[r++])];return r&&r==a?e:void 0}},{"./_castPath":76,"./_toKey":152}],48:[function(e,t,r){var n=e("./_arrayPush"),i=e("./isArray");t.exports=function(e,t,r){var a=t(e);return i(e)?a:n(a,r(e))}},{"./_arrayPush":35,"./isArray":167}],49:[function(e,t,r){var n=e("./_Symbol"),i=e("./_getRawTag"),a=e("./_objectToString"),o="[object Null]",s="[object Undefined]",u=n?n.toStringTag:void 0;t.exports=function(e){return null==e?void 0===e?s:o:u&&u in Object(e)?i(e):a(e)}},{"./_Symbol":27,"./_getRawTag":99,"./_objectToString":136}],50:[function(e,t,r){t.exports=function(e,t){return null!=e&&t in Object(e)}},{}],51:[function(e,t,r){var n=e("./_baseGetTag"),i=e("./isObjectLike"),a="[object Arguments]";t.exports=function(e){return i(e)&&n(e)==a}},{"./_baseGetTag":49,"./isObjectLike":175}],52:[function(e,t,r){var n=e("./_baseIsEqualDeep"),i=e("./isObjectLike");t.exports=function e(t,r,a,o,s){return t===r||(null==t||null==r||!i(t)&&!i(r)?t!=t&&r!=r:n(t,r,a,o,e,s))}},{"./_baseIsEqualDeep":53,"./isObjectLike":175}],53:[function(e,t,r){var n=e("./_Stack"),i=e("./_equalArrays"),a=e("./_equalByTag"),o=e("./_equalObjects"),s=e("./_getTag"),u=e("./isArray"),c=e("./isBuffer"),l=e("./isTypedArray"),f=1,p="[object Arguments]",_="[object Array]",h="[object Object]",y=Object.prototype.hasOwnProperty;t.exports=function(e,t,r,v,b,d){var g=u(e),x=u(t),m=g?_:s(e),A=x?_:s(t),j=(m=m==p?h:m)==h,O=(A=A==p?h:A)==h,w=m==A;if(w&&c(e)){if(!c(t))return!1;g=!0,j=!1}if(w&&!j)return d||(d=new n),g||l(e)?i(e,t,r,v,b,d):a(e,t,m,r,v,b,d);if(!(r&f)){var $=j&&y.call(e,"__wrapped__"),k=O&&y.call(t,"__wrapped__");if($||k){var I=$?e.value():e,C=k?t.value():t;return d||(d=new n),b(I,C,r,v,d)}}return!!w&&(d||(d=new n),o(e,t,r,v,b,d))}},{"./_Stack":26,"./_equalArrays":88,"./_equalByTag":89,"./_equalObjects":90,"./_getTag":102,"./isArray":167,"./isBuffer":170,"./isTypedArray":178}],54:[function(e,t,r){var n=e("./_Stack"),i=e("./_baseIsEqual"),a=1,o=2;t.exports=function(e,t,r,s){var u=r.length,c=u,l=!s;if(null==e)return!c;for(e=Object(e);u--;){var f=r[u];if(l&&f[2]?f[1]!==e[f[0]]:!(f[0]in e))return!1}for(;++u<c;){var p=(f=r[u])[0],_=e[p],h=f[1];if(l&&f[2]){if(void 0===_&&!(p in e))return!1}else{var y=new n;if(s)var v=s(_,h,p,e,t,y);if(!(void 0===v?i(h,_,a|o,s,y):v))return!1}}return!0}},{"./_Stack":26,"./_baseIsEqual":52}],55:[function(e,t,r){var n=e("./isFunction"),i=e("./_isMasked"),a=e("./isObject"),o=e("./_toSource"),s=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,l=u.toString,f=c.hasOwnProperty,p=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(e){return!(!a(e)||i(e))&&(n(e)?p:s).test(o(e))}},{"./_isMasked":116,"./_toSource":153,"./isFunction":171,"./isObject":174}],56:[function(e,t,r){var n=e("./_baseGetTag"),i=e("./isLength"),a=e("./isObjectLike"),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1,t.exports=function(e){return a(e)&&i(e.length)&&!!o[n(e)]}},{"./_baseGetTag":49,"./isLength":172,"./isObjectLike":175}],57:[function(e,t,r){var n=e("./_baseMatches"),i=e("./_baseMatchesProperty"),a=e("./identity"),o=e("./isArray"),s=e("./property");t.exports=function(e){return"function"==typeof e?e:null==e?a:"object"==typeof e?o(e)?i(e[0],e[1]):n(e):s(e)}},{"./_baseMatches":60,"./_baseMatchesProperty":61,"./identity":165,"./isArray":167,"./property":187}],58:[function(e,t,r){var n=e("./_isPrototype"),i=e("./_nativeKeys"),a=Object.prototype.hasOwnProperty;t.exports=function(e){if(!n(e))return i(e);var t=[];for(var r in Object(e))a.call(e,r)&&"constructor"!=r&&t.push(r);return t}},{"./_isPrototype":117,"./_nativeKeys":133}],59:[function(e,t,r){var n=e("./isObject"),i=e("./_isPrototype"),a=e("./_nativeKeysIn"),o=Object.prototype.hasOwnProperty;t.exports=function(e){if(!n(e))return a(e);var t=i(e),r=[];for(var s in e)("constructor"!=s||!t&&o.call(e,s))&&r.push(s);return r}},{"./_isPrototype":117,"./_nativeKeysIn":134,"./isObject":174}],60:[function(e,t,r){var n=e("./_baseIsMatch"),i=e("./_getMatchData"),a=e("./_matchesStrictComparable");t.exports=function(e){var t=i(e);return 1==t.length&&t[0][2]?a(t[0][0],t[0][1]):function(r){return r===e||n(r,e,t)}}},{"./_baseIsMatch":54,"./_getMatchData":96,"./_matchesStrictComparable":130}],61:[function(e,t,r){var n=e("./_baseIsEqual"),i=e("./get"),a=e("./hasIn"),o=e("./_isKey"),s=e("./_isStrictComparable"),u=e("./_matchesStrictComparable"),c=e("./_toKey"),l=1,f=2;t.exports=function(e,t){return o(e)&&s(t)?u(c(e),t):function(r){var o=i(r,e);return void 0===o&&o===t?a(r,e):n(t,o,l|f)}}},{"./_baseIsEqual":52,"./_isKey":114,"./_isStrictComparable":118,"./_matchesStrictComparable":130,"./_toKey":152,"./get":163,"./hasIn":164}],62:[function(e,t,r){var n=e("./_Stack"),i=e("./_assignMergeValue"),a=e("./_baseFor"),o=e("./_baseMergeDeep"),s=e("./isObject"),u=e("./keysIn"),c=e("./_safeGet");t.exports=function e(t,r,l,f,p){t!==r&&a(r,function(a,u){if(s(a))p||(p=new n),o(t,r,u,l,e,f,p);else{var _=f?f(c(t,u),a,u+"",t,r,p):void 0;void 0===_&&(_=a),i(t,u,_)}},u)}},{"./_Stack":26,"./_assignMergeValue":37,"./_baseFor":45,"./_baseMergeDeep":63,"./_safeGet":140,"./isObject":174,"./keysIn":180}],63:[function(e,t,r){var n=e("./_assignMergeValue"),i=e("./_cloneBuffer"),a=e("./_cloneTypedArray"),o=e("./_copyArray"),s=e("./_initCloneObject"),u=e("./isArguments"),c=e("./isArray"),l=e("./isArrayLikeObject"),f=e("./isBuffer"),p=e("./isFunction"),_=e("./isObject"),h=e("./isPlainObject"),y=e("./isTypedArray"),v=e("./_safeGet"),b=e("./toPlainObject");t.exports=function(e,t,r,d,g,x,m){var A=v(e,r),j=v(t,r),O=m.get(j);if(O)n(e,r,O);else{var w=x?x(A,j,r+"",e,t,m):void 0,$=void 0===w;if($){var k=c(j),I=!k&&f(j),C=!k&&!I&&y(j);w=j,k||I||C?c(A)?w=A:l(A)?w=o(A):I?($=!1,w=i(j,!0)):C?($=!1,w=a(j,!0)):w=[]:h(j)||u(j)?(w=A,u(A)?w=b(A):_(A)&&!p(A)||(w=s(j))):$=!1}$&&(m.set(j,w),g(w,j,d,x,m),m.delete(j)),n(e,r,w)}}},{"./_assignMergeValue":37,"./_cloneBuffer":78,"./_cloneTypedArray":79,"./_copyArray":80,"./_initCloneObject":110,"./_safeGet":140,"./isArguments":166,"./isArray":167,"./isArrayLikeObject":169,"./isBuffer":170,"./isFunction":171,"./isObject":174,"./isPlainObject":176,"./isTypedArray":178,"./toPlainObject":193}],64:[function(e,t,r){var n=e("./_basePickBy"),i=e("./hasIn");t.exports=function(e,t){return n(e,t,function(t,r){return i(e,r)})}},{"./_basePickBy":65,"./hasIn":164}],65:[function(e,t,r){var n=e("./_baseGet"),i=e("./_baseSet"),a=e("./_castPath");t.exports=function(e,t,r){for(var o=-1,s=t.length,u={};++o<s;){var c=t[o],l=n(e,c);r(l,c)&&i(u,a(c,e),l)}return u}},{"./_baseGet":47,"./_baseSet":69,"./_castPath":76}],66:[function(e,t,r){t.exports=function(e){return function(t){return null==t?void 0:t[e]}}},{}],67:[function(e,t,r){var n=e("./_baseGet");t.exports=function(e){return function(t){return n(t,e)}}},{"./_baseGet":47}],68:[function(e,t,r){var n=e("./identity"),i=e("./_overRest"),a=e("./_setToString");t.exports=function(e,t){return a(i(e,t,n),e+"")}},{"./_overRest":138,"./_setToString":144,"./identity":165}],69:[function(e,t,r){var n=e("./_assignValue"),i=e("./_castPath"),a=e("./_isIndex"),o=e("./isObject"),s=e("./_toKey");t.exports=function(e,t,r,u){if(!o(e))return e;for(var c=-1,l=(t=i(t,e)).length,f=l-1,p=e;null!=p&&++c<l;){var _=s(t[c]),h=r;if(c!=f){var y=p[_];void 0===(h=u?u(y,_,p):void 0)&&(h=o(y)?y:a(t[c+1])?[]:{})}n(p,_,h),p=p[_]}return e}},{"./_assignValue":38,"./_castPath":76,"./_isIndex":112,"./_toKey":152,"./isObject":174}],70:[function(e,t,r){var n=e("./constant"),i=e("./_defineProperty"),a=e("./identity"),o=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:a;t.exports=o},{"./_defineProperty":87,"./constant":155,"./identity":165}],71:[function(e,t,r){t.exports=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}},{}],72:[function(e,t,r){var n=e("./_Symbol"),i=e("./_arrayMap"),a=e("./isArray"),o=e("./isSymbol"),s=1/0,u=n?n.prototype:void 0,c=u?u.toString:void 0;t.exports=function e(t){if("string"==typeof t)return t;if(a(t))return i(t,e)+"";if(o(t))return c?c.call(t):"";var r=t+"";return"0"==r&&1/t==-s?"-0":r}},{"./_Symbol":27,"./_arrayMap":34,"./isArray":167,"./isSymbol":177}],73:[function(e,t,r){t.exports=function(e){return function(t){return e(t)}}},{}],74:[function(e,t,r){t.exports=function(e,t){return e.has(t)}},{}],75:[function(e,t,r){var n=e("./identity");t.exports=function(e){return"function"==typeof e?e:n}},{"./identity":165}],76:[function(e,t,r){var n=e("./isArray"),i=e("./_isKey"),a=e("./_stringToPath"),o=e("./toString");t.exports=function(e,t){return n(e)?e:i(e,t)?[e]:a(o(e))}},{"./_isKey":114,"./_stringToPath":151,"./isArray":167,"./toString":194}],77:[function(e,t,r){var n=e("./_Uint8Array");t.exports=function(e){var t=new e.constructor(e.byteLength);return new n(t).set(new n(e)),t}},{"./_Uint8Array":28}],78:[function(e,t,r){var n=e("./_root"),i="object"==typeof r&&r&&!r.nodeType&&r,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,o=a&&a.exports===i?n.Buffer:void 0,s=o?o.allocUnsafe:void 0;t.exports=function(e,t){if(t)return e.slice();var r=e.length,n=s?s(r):new e.constructor(r);return e.copy(n),n}},{"./_root":139}],79:[function(e,t,r){var n=e("./_cloneArrayBuffer");t.exports=function(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}},{"./_cloneArrayBuffer":77}],80:[function(e,t,r){t.exports=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}},{}],81:[function(e,t,r){var n=e("./_assignValue"),i=e("./_baseAssignValue");t.exports=function(e,t,r,a){var o=!r;r||(r={});for(var s=-1,u=t.length;++s<u;){var c=t[s],l=a?a(r[c],e[c],c,r,e):void 0;void 0===l&&(l=e[c]),o?i(r,c,l):n(r,c,l)}return r}},{"./_assignValue":38,"./_baseAssignValue":40}],82:[function(e,t,r){var n=e("./_root")["__core-js_shared__"];t.exports=n},{"./_root":139}],83:[function(e,t,r){var n=e("./_baseRest"),i=e("./_isIterateeCall");t.exports=function(e){return n(function(t,r){var n=-1,a=r.length,o=a>1?r[a-1]:void 0,s=a>2?r[2]:void 0;for(o=e.length>3&&"function"==typeof o?(a--,o):void 0,s&&i(r[0],r[1],s)&&(o=a<3?void 0:o,a=1),t=Object(t);++n<a;){var u=r[n];u&&e(t,u,n,o)}return t})}},{"./_baseRest":68,"./_isIterateeCall":113}],84:[function(e,t,r){var n=e("./isArrayLike");t.exports=function(e,t){return function(r,i){if(null==r)return r;if(!n(r))return e(r,i);for(var a=r.length,o=t?a:-1,s=Object(r);(t?o--:++o<a)&&!1!==i(s[o],o,s););return r}}},{"./isArrayLike":168}],85:[function(e,t,r){t.exports=function(e){return function(t,r,n){for(var i=-1,a=Object(t),o=n(t),s=o.length;s--;){var u=o[e?s:++i];if(!1===r(a[u],u,a))break}return t}}},{}],86:[function(e,t,r){var n=e("./_baseIteratee"),i=e("./isArrayLike"),a=e("./keys");t.exports=function(e){return function(t,r,o){var s=Object(t);if(!i(t)){var u=n(r,3);t=a(t),r=function(e){return u(s[e],e,s)}}var c=e(t,r,o);return c>-1?s[u?t[c]:c]:void 0}}},{"./_baseIteratee":57,"./isArrayLike":168,"./keys":179}],87:[function(e,t,r){var n=e("./_getNative"),i=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();t.exports=i},{"./_getNative":97}],88:[function(e,t,r){var n=e("./_SetCache"),i=e("./_arraySome"),a=e("./_cacheHas"),o=1,s=2;t.exports=function(e,t,r,u,c,l){var f=r&o,p=e.length,_=t.length;if(p!=_&&!(f&&_>p))return!1;var h=l.get(e);if(h&&l.get(t))return h==t;var y=-1,v=!0,b=r&s?new n:void 0;for(l.set(e,t),l.set(t,e);++y<p;){var d=e[y],g=t[y];if(u)var x=f?u(g,d,y,t,e,l):u(d,g,y,e,t,l);if(void 0!==x){if(x)continue;v=!1;break}if(b){if(!i(t,function(e,t){if(!a(b,t)&&(d===e||c(d,e,r,u,l)))return b.push(t)})){v=!1;break}}else if(d!==g&&!c(d,g,r,u,l)){v=!1;break}}return l.delete(e),l.delete(t),v}},{"./_SetCache":25,"./_arraySome":36,"./_cacheHas":74}],89:[function(e,t,r){var n=e("./_Symbol"),i=e("./_Uint8Array"),a=e("./eq"),o=e("./_equalArrays"),s=e("./_mapToArray"),u=e("./_setToArray"),c=1,l=2,f="[object Boolean]",p="[object Date]",_="[object Error]",h="[object Map]",y="[object Number]",v="[object RegExp]",b="[object Set]",d="[object String]",g="[object Symbol]",x="[object ArrayBuffer]",m="[object DataView]",A=n?n.prototype:void 0,j=A?A.valueOf:void 0;t.exports=function(e,t,r,n,A,O,w){switch(r){case m:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case x:return!(e.byteLength!=t.byteLength||!O(new i(e),new i(t)));case f:case p:case y:return a(+e,+t);case _:return e.name==t.name&&e.message==t.message;case v:case d:return e==t+"";case h:var $=s;case b:var k=n&c;if($||($=u),e.size!=t.size&&!k)return!1;var I=w.get(e);if(I)return I==t;n|=l,w.set(e,t);var C=o($(e),$(t),n,A,O,w);return w.delete(e),C;case g:if(j)return j.call(e)==j.call(t)}return!1}},{"./_Symbol":27,"./_Uint8Array":28,"./_equalArrays":88,"./_mapToArray":129,"./_setToArray":143,"./eq":157}],90:[function(e,t,r){var n=e("./_getAllKeys"),i=1,a=Object.prototype.hasOwnProperty;t.exports=function(e,t,r,o,s,u){var c=r&i,l=n(e),f=l.length;if(f!=n(t).length&&!c)return!1;for(var p=f;p--;){var _=l[p];if(!(c?_ in t:a.call(t,_)))return!1}var h=u.get(e);if(h&&u.get(t))return h==t;var y=!0;u.set(e,t),u.set(t,e);for(var v=c;++p<f;){var b=e[_=l[p]],d=t[_];if(o)var g=c?o(d,b,_,t,e,u):o(b,d,_,e,t,u);if(!(void 0===g?b===d||s(b,d,r,o,u):g)){y=!1;break}v||(v="constructor"==_)}if(y&&!v){var x=e.constructor,m=t.constructor;x!=m&&"constructor"in e&&"constructor"in t&&!("function"==typeof x&&x instanceof x&&"function"==typeof m&&m instanceof m)&&(y=!1)}return u.delete(e),u.delete(t),y}},{"./_getAllKeys":93}],91:[function(e,t,r){var n=e("./flatten"),i=e("./_overRest"),a=e("./_setToString");t.exports=function(e){return a(i(e,void 0,n),e+"")}},{"./_overRest":138,"./_setToString":144,"./flatten":161}],92:[function(e,t,r){(function(e){var r="object"==typeof e&&e&&e.Object===Object&&e;t.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],93:[function(e,t,r){var n=e("./_baseGetAllKeys"),i=e("./_getSymbols"),a=e("./keys");t.exports=function(e){return n(e,a,i)}},{"./_baseGetAllKeys":48,"./_getSymbols":100,"./keys":179}],94:[function(e,t,r){var n=e("./_baseGetAllKeys"),i=e("./_getSymbolsIn"),a=e("./keysIn");t.exports=function(e){return n(e,a,i)}},{"./_baseGetAllKeys":48,"./_getSymbolsIn":101,"./keysIn":180}],95:[function(e,t,r){var n=e("./_isKeyable");t.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}},{"./_isKeyable":115}],96:[function(e,t,r){var n=e("./_isStrictComparable"),i=e("./keys");t.exports=function(e){for(var t=i(e),r=t.length;r--;){var a=t[r],o=e[a];t[r]=[a,o,n(o)]}return t}},{"./_isStrictComparable":118,"./keys":179}],97:[function(e,t,r){var n=e("./_baseIsNative"),i=e("./_getValue");t.exports=function(e,t){var r=i(e,t);return n(r)?r:void 0}},{"./_baseIsNative":55,"./_getValue":103}],98:[function(e,t,r){var n=e("./_overArg")(Object.getPrototypeOf,Object);t.exports=n},{"./_overArg":137}],99:[function(e,t,r){var n=e("./_Symbol"),i=Object.prototype,a=i.hasOwnProperty,o=i.toString,s=n?n.toStringTag:void 0;t.exports=function(e){var t=a.call(e,s),r=e[s];try{e[s]=void 0;var n=!0}catch(e){}var i=o.call(e);return n&&(t?e[s]=r:delete e[s]),i}},{"./_Symbol":27}],100:[function(e,t,r){var n=e("./_arrayFilter"),i=e("./stubArray"),a=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols,s=o?function(e){return null==e?[]:(e=Object(e),n(o(e),function(t){return a.call(e,t)}))}:i;t.exports=s},{"./_arrayFilter":32,"./stubArray":188}],101:[function(e,t,r){var n=e("./_arrayPush"),i=e("./_getPrototype"),a=e("./_getSymbols"),o=e("./stubArray"),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)n(t,a(e)),e=i(e);return t}:o;t.exports=s},{"./_arrayPush":35,"./_getPrototype":98,"./_getSymbols":100,"./stubArray":188}],102:[function(e,t,r){var n=e("./_DataView"),i=e("./_Map"),a=e("./_Promise"),o=e("./_Set"),s=e("./_WeakMap"),u=e("./_baseGetTag"),c=e("./_toSource"),l=c(n),f=c(i),p=c(a),_=c(o),h=c(s),y=u;(n&&"[object DataView]"!=y(new n(new ArrayBuffer(1)))||i&&"[object Map]"!=y(new i)||a&&"[object Promise]"!=y(a.resolve())||o&&"[object Set]"!=y(new o)||s&&"[object WeakMap]"!=y(new s))&&(y=function(e){var t=u(e),r="[object Object]"==t?e.constructor:void 0,n=r?c(r):"";if(n)switch(n){case l:return"[object DataView]";case f:return"[object Map]";case p:return"[object Promise]";case _:return"[object Set]";case h:return"[object WeakMap]"}return t}),t.exports=y},{"./_DataView":18,"./_Map":21,"./_Promise":23,"./_Set":24,"./_WeakMap":29,"./_baseGetTag":49,"./_toSource":153}],103:[function(e,t,r){t.exports=function(e,t){return null==e?void 0:e[t]}},{}],104:[function(e,t,r){var n=e("./_castPath"),i=e("./isArguments"),a=e("./isArray"),o=e("./_isIndex"),s=e("./isLength"),u=e("./_toKey");t.exports=function(e,t,r){for(var c=-1,l=(t=n(t,e)).length,f=!1;++c<l;){var p=u(t[c]);if(!(f=null!=e&&r(e,p)))break;e=e[p]}return f||++c!=l?f:!!(l=null==e?0:e.length)&&s(l)&&o(p,l)&&(a(e)||i(e))}},{"./_castPath":76,"./_isIndex":112,"./_toKey":152,"./isArguments":166,"./isArray":167,"./isLength":172}],105:[function(e,t,r){var n=e("./_nativeCreate");t.exports=function(){this.__data__=n?n(null):{},this.size=0}},{"./_nativeCreate":132}],106:[function(e,t,r){t.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},{}],107:[function(e,t,r){var n=e("./_nativeCreate"),i="__lodash_hash_undefined__",a=Object.prototype.hasOwnProperty;t.exports=function(e){var t=this.__data__;if(n){var r=t[e];return r===i?void 0:r}return a.call(t,e)?t[e]:void 0}},{"./_nativeCreate":132}],108:[function(e,t,r){var n=e("./_nativeCreate"),i=Object.prototype.hasOwnProperty;t.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:i.call(t,e)}},{"./_nativeCreate":132}],109:[function(e,t,r){var n=e("./_nativeCreate"),i="__lodash_hash_undefined__";t.exports=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?i:t,this}},{"./_nativeCreate":132}],110:[function(e,t,r){var n=e("./_baseCreate"),i=e("./_getPrototype"),a=e("./_isPrototype");t.exports=function(e){return"function"!=typeof e.constructor||a(e)?{}:n(i(e))}},{"./_baseCreate":41,"./_getPrototype":98,"./_isPrototype":117}],111:[function(e,t,r){var n=e("./_Symbol"),i=e("./isArguments"),a=e("./isArray"),o=n?n.isConcatSpreadable:void 0;t.exports=function(e){return a(e)||i(e)||!!(o&&e&&e[o])}},{"./_Symbol":27,"./isArguments":166,"./isArray":167}],112:[function(e,t,r){var n=9007199254740991,i=/^(?:0|[1-9]\d*)$/;t.exports=function(e,t){var r=typeof e;return!!(t=null==t?n:t)&&("number"==r||"symbol"!=r&&i.test(e))&&e>-1&&e%1==0&&e<t}},{}],113:[function(e,t,r){var n=e("./eq"),i=e("./isArrayLike"),a=e("./_isIndex"),o=e("./isObject");t.exports=function(e,t,r){if(!o(r))return!1;var s=typeof t;return!!("number"==s?i(r)&&a(t,r.length):"string"==s&&t in r)&&n(r[t],e)}},{"./_isIndex":112,"./eq":157,"./isArrayLike":168,"./isObject":174}],114:[function(e,t,r){var n=e("./isArray"),i=e("./isSymbol"),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;t.exports=function(e,t){if(n(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!i(e))||o.test(e)||!a.test(e)||null!=t&&e in Object(t)}},{"./isArray":167,"./isSymbol":177}],115:[function(e,t,r){t.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},{}],116:[function(e,t,r){var n,i=e("./_coreJsData"),a=(n=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";t.exports=function(e){return!!a&&a in e}},{"./_coreJsData":82}],117:[function(e,t,r){var n=Object.prototype;t.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},{}],118:[function(e,t,r){var n=e("./isObject");t.exports=function(e){return e==e&&!n(e)}},{"./isObject":174}],119:[function(e,t,r){t.exports=function(){this.__data__=[],this.size=0}},{}],120:[function(e,t,r){var n=e("./_assocIndexOf"),i=Array.prototype.splice;t.exports=function(e){var t=this.__data__,r=n(t,e);return!(r<0||(r==t.length-1?t.pop():i.call(t,r,1),--this.size,0))}},{"./_assocIndexOf":39}],121:[function(e,t,r){var n=e("./_assocIndexOf");t.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},{"./_assocIndexOf":39}],122:[function(e,t,r){var n=e("./_assocIndexOf");t.exports=function(e){return n(this.__data__,e)>-1}},{"./_assocIndexOf":39}],123:[function(e,t,r){var n=e("./_assocIndexOf");t.exports=function(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}},{"./_assocIndexOf":39}],124:[function(e,t,r){var n=e("./_Hash"),i=e("./_ListCache"),a=e("./_Map");t.exports=function(){this.size=0,this.__data__={hash:new n,map:new(a||i),string:new n}}},{"./_Hash":19,"./_ListCache":20,"./_Map":21}],125:[function(e,t,r){var n=e("./_getMapData");t.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},{"./_getMapData":95}],126:[function(e,t,r){var n=e("./_getMapData");t.exports=function(e){return n(this,e).get(e)}},{"./_getMapData":95}],127:[function(e,t,r){var n=e("./_getMapData");t.exports=function(e){return n(this,e).has(e)}},{"./_getMapData":95}],128:[function(e,t,r){var n=e("./_getMapData");t.exports=function(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}},{"./_getMapData":95}],129:[function(e,t,r){t.exports=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}},{}],130:[function(e,t,r){t.exports=function(e,t){return function(r){return null!=r&&r[e]===t&&(void 0!==t||e in Object(r))}}},{}],131:[function(e,t,r){var n=e("./memoize"),i=500;t.exports=function(e){var t=n(e,function(e){return r.size===i&&r.clear(),e}),r=t.cache;return t}},{"./memoize":183}],132:[function(e,t,r){var n=e("./_getNative")(Object,"create");t.exports=n},{"./_getNative":97}],133:[function(e,t,r){var n=e("./_overArg")(Object.keys,Object);t.exports=n},{"./_overArg":137}],134:[function(e,t,r){t.exports=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}},{}],135:[function(e,t,r){var n=e("./_freeGlobal"),i="object"==typeof r&&r&&!r.nodeType&&r,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,o=a&&a.exports===i&&n.process,s=function(){try{var e=a&&a.require&&a.require("util").types;return e||o&&o.binding&&o.binding("util")}catch(e){}}();t.exports=s},{"./_freeGlobal":92}],136:[function(e,t,r){var n=Object.prototype.toString;t.exports=function(e){return n.call(e)}},{}],137:[function(e,t,r){t.exports=function(e,t){return function(r){return e(t(r))}}},{}],138:[function(e,t,r){var n=e("./_apply"),i=Math.max;t.exports=function(e,t,r){return t=i(void 0===t?e.length-1:t,0),function(){for(var a=arguments,o=-1,s=i(a.length-t,0),u=Array(s);++o<s;)u[o]=a[t+o];o=-1;for(var c=Array(t+1);++o<t;)c[o]=a[o];return c[t]=r(u),n(e,this,c)}}},{"./_apply":30}],139:[function(e,t,r){var n=e("./_freeGlobal"),i="object"==typeof self&&self&&self.Object===Object&&self,a=n||i||Function("return this")();t.exports=a},{"./_freeGlobal":92}],140:[function(e,t,r){t.exports=function(e,t){if("__proto__"!=t)return e[t]}},{}],141:[function(e,t,r){var n="__lodash_hash_undefined__";t.exports=function(e){return this.__data__.set(e,n),this}},{}],142:[function(e,t,r){t.exports=function(e){return this.__data__.has(e)}},{}],143:[function(e,t,r){t.exports=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}},{}],144:[function(e,t,r){var n=e("./_baseSetToString"),i=e("./_shortOut")(n);t.exports=i},{"./_baseSetToString":70,"./_shortOut":145}],145:[function(e,t,r){var n=800,i=16,a=Date.now;t.exports=function(e){var t=0,r=0;return function(){var o=a(),s=i-(o-r);if(r=o,s>0){if(++t>=n)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}},{}],146:[function(e,t,r){var n=e("./_ListCache");t.exports=function(){this.__data__=new n,this.size=0}},{"./_ListCache":20}],147:[function(e,t,r){t.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},{}],148:[function(e,t,r){t.exports=function(e){return this.__data__.get(e)}},{}],149:[function(e,t,r){t.exports=function(e){return this.__data__.has(e)}},{}],150:[function(e,t,r){var n=e("./_ListCache"),i=e("./_Map"),a=e("./_MapCache"),o=200;t.exports=function(e,t){var r=this.__data__;if(r instanceof n){var s=r.__data__;if(!i||s.length<o-1)return s.push([e,t]),this.size=++r.size,this;r=this.__data__=new a(s)}return r.set(e,t),this.size=r.size,this}},{"./_ListCache":20,"./_Map":21,"./_MapCache":22}],151:[function(e,t,r){var n=e("./_memoizeCapped"),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,o=n(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,function(e,r,n,i){t.push(n?i.replace(a,"$1"):r||e)}),t});t.exports=o},{"./_memoizeCapped":131}],152:[function(e,t,r){var n=e("./isSymbol"),i=1/0;t.exports=function(e){if("string"==typeof e||n(e))return e;var t=e+"";return"0"==t&&1/e==-i?"-0":t}},{"./isSymbol":177}],153:[function(e,t,r){var n=Function.prototype.toString;t.exports=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},{}],154:[function(e,t,r){var n=e("./_copyObject"),i=e("./_createAssigner"),a=e("./keysIn"),o=i(function(e,t){n(t,a(t),e)});t.exports=o},{"./_copyObject":81,"./_createAssigner":83,"./keysIn":180}],155:[function(e,t,r){t.exports=function(e){return function(){return e}}},{}],156:[function(e,t,r){t.exports=e("./forEach")},{"./forEach":162}],157:[function(e,t,r){t.exports=function(e,t){return e===t||e!=e&&t!=t}},{}],158:[function(e,t,r){t.exports=e("./assignIn")},{"./assignIn":154}],159:[function(e,t,r){var n=e("./_createFind")(e("./findIndex"));t.exports=n},{"./_createFind":86,"./findIndex":160}],160:[function(e,t,r){var n=e("./_baseFindIndex"),i=e("./_baseIteratee"),a=e("./toInteger"),o=Math.max;t.exports=function(e,t,r){var s=null==e?0:e.length;if(!s)return-1;var u=null==r?0:a(r);return u<0&&(u=o(s+u,0)),n(e,i(t,3),u)}},{"./_baseFindIndex":43,"./_baseIteratee":57,"./toInteger":191}],161:[function(e,t,r){var n=e("./_baseFlatten");t.exports=function(e){return null!=e&&e.length?n(e,1):[]}},{"./_baseFlatten":44}],162:[function(e,t,r){var n=e("./_arrayEach"),i=e("./_baseEach"),a=e("./_castFunction"),o=e("./isArray");t.exports=function(e,t){return(o(e)?n:i)(e,a(t))}},{"./_arrayEach":31,"./_baseEach":42,"./_castFunction":75,"./isArray":167}],163:[function(e,t,r){var n=e("./_baseGet");t.exports=function(e,t,r){var i=null==e?void 0:n(e,t);return void 0===i?r:i}},{"./_baseGet":47}],164:[function(e,t,r){var n=e("./_baseHasIn"),i=e("./_hasPath");t.exports=function(e,t){return null!=e&&i(e,t,n)}},{"./_baseHasIn":50,"./_hasPath":104}],165:[function(e,t,r){t.exports=function(e){return e}},{}],166:[function(e,t,r){var n=e("./_baseIsArguments"),i=e("./isObjectLike"),a=Object.prototype,o=a.hasOwnProperty,s=a.propertyIsEnumerable,u=n(function(){return arguments}())?n:function(e){return i(e)&&o.call(e,"callee")&&!s.call(e,"callee")};t.exports=u},{"./_baseIsArguments":51,"./isObjectLike":175}],167:[function(e,t,r){var n=Array.isArray;t.exports=n},{}],168:[function(e,t,r){var n=e("./isFunction"),i=e("./isLength");t.exports=function(e){return null!=e&&i(e.length)&&!n(e)}},{"./isFunction":171,"./isLength":172}],169:[function(e,t,r){var n=e("./isArrayLike"),i=e("./isObjectLike");t.exports=function(e){return i(e)&&n(e)}},{"./isArrayLike":168,"./isObjectLike":175}],170:[function(e,t,r){var n=e("./_root"),i=e("./stubFalse"),a="object"==typeof r&&r&&!r.nodeType&&r,o=a&&"object"==typeof t&&t&&!t.nodeType&&t,s=o&&o.exports===a?n.Buffer:void 0,u=(s?s.isBuffer:void 0)||i;t.exports=u},{"./_root":139,"./stubFalse":189}],171:[function(e,t,r){var n=e("./_baseGetTag"),i=e("./isObject"),a="[object AsyncFunction]",o="[object Function]",s="[object GeneratorFunction]",u="[object Proxy]";t.exports=function(e){if(!i(e))return!1;var t=n(e);return t==o||t==s||t==a||t==u}},{"./_baseGetTag":49,"./isObject":174}],172:[function(e,t,r){var n=9007199254740991;t.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}},{}],173:[function(e,t,r){t.exports=function(e){return null==e}},{}],174:[function(e,t,r){t.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},{}],175:[function(e,t,r){t.exports=function(e){return null!=e&&"object"==typeof e}},{}],176:[function(e,t,r){var n=e("./_baseGetTag"),i=e("./_getPrototype"),a=e("./isObjectLike"),o="[object Object]",s=Function.prototype,u=Object.prototype,c=s.toString,l=u.hasOwnProperty,f=c.call(Object);t.exports=function(e){if(!a(e)||n(e)!=o)return!1;var t=i(e);if(null===t)return!0;var r=l.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&c.call(r)==f}},{"./_baseGetTag":49,"./_getPrototype":98,"./isObjectLike":175}],177:[function(e,t,r){var n=e("./_baseGetTag"),i=e("./isObjectLike"),a="[object Symbol]";t.exports=function(e){return"symbol"==typeof e||i(e)&&n(e)==a}},{"./_baseGetTag":49,"./isObjectLike":175}],178:[function(e,t,r){var n=e("./_baseIsTypedArray"),i=e("./_baseUnary"),a=e("./_nodeUtil"),o=a&&a.isTypedArray,s=o?i(o):n;t.exports=s},{"./_baseIsTypedArray":56,"./_baseUnary":73,"./_nodeUtil":135}],179:[function(e,t,r){var n=e("./_arrayLikeKeys"),i=e("./_baseKeys"),a=e("./isArrayLike");t.exports=function(e){return a(e)?n(e):i(e)}},{"./_arrayLikeKeys":33,"./_baseKeys":58,"./isArrayLike":168}],180:[function(e,t,r){var n=e("./_arrayLikeKeys"),i=e("./_baseKeysIn"),a=e("./isArrayLike");t.exports=function(e){return a(e)?n(e,!0):i(e)}},{"./_arrayLikeKeys":33,"./_baseKeysIn":59,"./isArrayLike":168}],181:[function(e,t,r){var n=e("./_baseAssignValue"),i=e("./_baseForOwn"),a=e("./_baseIteratee");t.exports=function(e,t){var r={};return t=a(t,3),i(e,function(e,i,a){n(r,t(e,i,a),e)}),r}},{"./_baseAssignValue":40,"./_baseForOwn":46,"./_baseIteratee":57}],182:[function(e,t,r){var n=e("./_baseAssignValue"),i=e("./_baseForOwn"),a=e("./_baseIteratee");t.exports=function(e,t){var r={};return t=a(t,3),i(e,function(e,i,a){n(r,i,t(e,i,a))}),r}},{"./_baseAssignValue":40,"./_baseForOwn":46,"./_baseIteratee":57}],183:[function(e,t,r){var n=e("./_MapCache"),i="Expected a function";function a(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(i);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=e.apply(this,n);return r.cache=a.set(i,o)||a,o};return r.cache=new(a.Cache||n),r}a.Cache=n,t.exports=a},{"./_MapCache":22}],184:[function(e,t,r){var n=e("./_baseMerge"),i=e("./_createAssigner")(function(e,t,r){n(e,t,r)});t.exports=i},{"./_baseMerge":62,"./_createAssigner":83}],185:[function(e,t,r){var n=e("./_basePick"),i=e("./_flatRest")(function(e,t){return null==e?{}:n(e,t)});t.exports=i},{"./_basePick":64,"./_flatRest":91}],186:[function(e,t,r){var n=e("./_arrayMap"),i=e("./_baseIteratee"),a=e("./_basePickBy"),o=e("./_getAllKeysIn");t.exports=function(e,t){if(null==e)return{};var r=n(o(e),function(e){return[e]});return t=i(t),a(e,r,function(e,r){return t(e,r[0])})}},{"./_arrayMap":34,"./_baseIteratee":57,"./_basePickBy":65,"./_getAllKeysIn":94}],187:[function(e,t,r){var n=e("./_baseProperty"),i=e("./_basePropertyDeep"),a=e("./_isKey"),o=e("./_toKey");t.exports=function(e){return a(e)?n(o(e)):i(e)}},{"./_baseProperty":66,"./_basePropertyDeep":67,"./_isKey":114,"./_toKey":152}],188:[function(e,t,r){t.exports=function(){return[]}},{}],189:[function(e,t,r){t.exports=function(){return!1}},{}],190:[function(e,t,r){var n=e("./toNumber"),i=1/0,a=1.7976931348623157e308;t.exports=function(e){return e?(e=n(e))===i||e===-i?(e<0?-1:1)*a:e==e?e:0:0===e?e:0}},{"./toNumber":192}],191:[function(e,t,r){var n=e("./toFinite");t.exports=function(e){var t=n(e),r=t%1;return t==t?r?t-r:t:0}},{"./toFinite":190}],192:[function(e,t,r){var n=e("./isObject"),i=e("./isSymbol"),a=NaN,o=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt;t.exports=function(e){if("number"==typeof e)return e;if(i(e))return a;if(n(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=n(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var r=u.test(e);return r||c.test(e)?l(e.slice(2),r?2:8):s.test(e)?a:+e}},{"./isObject":174,"./isSymbol":177}],193:[function(e,t,r){var n=e("./_copyObject"),i=e("./keysIn");t.exports=function(e){return n(e,i(e))}},{"./_copyObject":81,"./keysIn":180}],194:[function(e,t,r){var n=e("./_baseToString");t.exports=function(e){return null==e?"":n(e)}},{"./_baseToString":72}],195:[function(e,t,r){var n=e("./_arrayEach"),i=e("./_baseCreate"),a=e("./_baseForOwn"),o=e("./_baseIteratee"),s=e("./_getPrototype"),u=e("./isArray"),c=e("./isBuffer"),l=e("./isFunction"),f=e("./isObject"),p=e("./isTypedArray");t.exports=function(e,t,r){var _=u(e),h=_||c(e)||p(e);if(t=o(t,4),null==r){var y=e&&e.constructor;r=h?_?new y:[]:f(e)&&l(y)?i(s(e)):{}}return(h?n:a)(e,function(e,n,i){return t(r,e,n,i)}),r}},{"./_arrayEach":31,"./_baseCreate":41,"./_baseForOwn":46,"./_baseIteratee":57,"./_getPrototype":98,"./isArray":167,"./isBuffer":170,"./isFunction":171,"./isObject":174,"./isTypedArray":178}],196:[function(e,t,r){var n,i,a=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(e){i=s}}();var c,l=[],f=!1,p=-1;function _(){f&&c&&(f=!1,c.length?l=c.concat(l):p=-1,l.length&&h())}function h(){if(!f){var e=u(_);f=!0;for(var t=l.length;t;){for(c=l,l=[];++p<t;)c&&c[p].run();p=-1,t=l.length}c=null,f=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function y(e,t){this.fun=e,this.array=t}function v(){}a.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new y(e,t)),1!==l.length||f||u(h)},y.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=v,a.addListener=v,a.once=v,a.off=v,a.removeListener=v,a.removeAllListeners=v,a.emit=v,a.prependListener=v,a.prependOnceListener=v,a.listeners=function(e){return[]},a.binding=function(e){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(e){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},{}],"jsonapi-serializer":[function(e,t,r){t.exports={Serializer:e("./lib/serializer"),Deserializer:e("./lib/deserializer"),Error:e("./lib/error")}},{"./lib/deserializer":2,"./lib/error":4,"./lib/serializer":7}]},{},["jsonapi-serializer"]);
@@ -0,0 +1,458 @@
1
+ /*!
2
+ * jsUri
3
+ * https://github.com/derek-watson/jsUri
4
+ *
5
+ * Copyright 2013, Derek Watson
6
+ * Released under the MIT license.
7
+ *
8
+ * Includes parseUri regular expressions
9
+ * http://blog.stevenlevithan.com/archives/parseuri
10
+ * Copyright 2007, Steven Levithan
11
+ * Released under the MIT license.
12
+ */
13
+
14
+ /*globals define, module */
15
+
16
+ (function(global) {
17
+
18
+ var re = {
19
+ starts_with_slashes: /^\/+/,
20
+ ends_with_slashes: /\/+$/,
21
+ pluses: /\+/g,
22
+ query_separator: /[&;]/,
23
+ uri_parser: /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*)(?::([^:@]*))?)?@)?(\[[0-9a-fA-F:.]+\]|[^:\/?#]*)(?::(\d+|(?=:)))?(:)?)((((?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/
24
+ };
25
+
26
+ /**
27
+ * Define forEach for older js environments
28
+ * @see https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/forEach#Compatibility
29
+ */
30
+ if (!Array.prototype.forEach) {
31
+ Array.prototype.forEach = function(callback, thisArg) {
32
+ var T, k;
33
+
34
+ if (this == null) {
35
+ throw new TypeError(' this is null or not defined');
36
+ }
37
+
38
+ var O = Object(this);
39
+ var len = O.length >>> 0;
40
+
41
+ if (typeof callback !== "function") {
42
+ throw new TypeError(callback + ' is not a function');
43
+ }
44
+
45
+ if (arguments.length > 1) {
46
+ T = thisArg;
47
+ }
48
+
49
+ k = 0;
50
+
51
+ while (k < len) {
52
+ var kValue;
53
+ if (k in O) {
54
+ kValue = O[k];
55
+ callback.call(T, kValue, k, O);
56
+ }
57
+ k++;
58
+ }
59
+ };
60
+ }
61
+
62
+ /**
63
+ * unescape a query param value
64
+ * @param {string} s encoded value
65
+ * @return {string} decoded value
66
+ */
67
+ function decode(s) {
68
+ if (s) {
69
+ s = s.toString().replace(re.pluses, '%20');
70
+ s = decodeURIComponent(s);
71
+ }
72
+ return s;
73
+ }
74
+
75
+ /**
76
+ * Breaks a uri string down into its individual parts
77
+ * @param {string} str uri
78
+ * @return {object} parts
79
+ */
80
+ function parseUri(str) {
81
+ var parser = re.uri_parser;
82
+ var parserKeys = ["source", "protocol", "authority", "userInfo", "user", "password", "host", "port", "isColonUri", "relative", "path", "directory", "file", "query", "anchor"];
83
+ var m = parser.exec(str || '');
84
+ var parts = {};
85
+
86
+ parserKeys.forEach(function(key, i) {
87
+ parts[key] = m[i] || '';
88
+ });
89
+
90
+ return parts;
91
+ }
92
+
93
+ /**
94
+ * Breaks a query string down into an array of key/value pairs
95
+ * @param {string} str query
96
+ * @return {array} array of arrays (key/value pairs)
97
+ */
98
+ function parseQuery(str) {
99
+ var i, ps, p, n, k, v, l;
100
+ var pairs = [];
101
+
102
+ if (typeof(str) === 'undefined' || str === null || str === '') {
103
+ return pairs;
104
+ }
105
+
106
+ if (str.indexOf('?') === 0) {
107
+ str = str.substring(1);
108
+ }
109
+
110
+ ps = str.toString().split(re.query_separator);
111
+
112
+ for (i = 0, l = ps.length; i < l; i++) {
113
+ p = ps[i];
114
+ n = p.indexOf('=');
115
+
116
+ if (n !== 0) {
117
+ k = decode(p.substring(0, n));
118
+ v = decode(p.substring(n + 1));
119
+ pairs.push(n === -1 ? [p, null] : [k, v]);
120
+ }
121
+
122
+ }
123
+ return pairs;
124
+ }
125
+
126
+ /**
127
+ * Creates a new Uri object
128
+ * @constructor
129
+ * @param {string} str
130
+ */
131
+ function Uri(str) {
132
+ this.uriParts = parseUri(str);
133
+ this.queryPairs = parseQuery(this.uriParts.query);
134
+ this.hasAuthorityPrefixUserPref = null;
135
+ }
136
+
137
+ /**
138
+ * Define getter/setter methods
139
+ */
140
+ ['protocol', 'userInfo', 'host', 'port', 'path', 'anchor'].forEach(function(key) {
141
+ Uri.prototype[key] = function(val) {
142
+ if (typeof val !== 'undefined') {
143
+ this.uriParts[key] = val;
144
+ }
145
+ return this.uriParts[key];
146
+ };
147
+ });
148
+
149
+ /**
150
+ * if there is no protocol, the leading // can be enabled or disabled
151
+ * @param {Boolean} val
152
+ * @return {Boolean}
153
+ */
154
+ Uri.prototype.hasAuthorityPrefix = function(val) {
155
+ if (typeof val !== 'undefined') {
156
+ this.hasAuthorityPrefixUserPref = val;
157
+ }
158
+
159
+ if (this.hasAuthorityPrefixUserPref === null) {
160
+ return (this.uriParts.source.indexOf('//') !== -1);
161
+ } else {
162
+ return this.hasAuthorityPrefixUserPref;
163
+ }
164
+ };
165
+
166
+ Uri.prototype.isColonUri = function (val) {
167
+ if (typeof val !== 'undefined') {
168
+ this.uriParts.isColonUri = !!val;
169
+ } else {
170
+ return !!this.uriParts.isColonUri;
171
+ }
172
+ };
173
+
174
+ /**
175
+ * Serializes the internal state of the query pairs
176
+ * @param {string} [val] set a new query string
177
+ * @return {string} query string
178
+ */
179
+ Uri.prototype.query = function(val) {
180
+ var s = '', i, param, l;
181
+
182
+ if (typeof val !== 'undefined') {
183
+ this.queryPairs = parseQuery(val);
184
+ }
185
+
186
+ for (i = 0, l = this.queryPairs.length; i < l; i++) {
187
+ param = this.queryPairs[i];
188
+ if (s.length > 0) {
189
+ s += '&';
190
+ }
191
+ if (param[1] === null) {
192
+ s += param[0];
193
+ } else {
194
+ s += param[0];
195
+ s += '=';
196
+ if (typeof param[1] !== 'undefined') {
197
+ s += encodeURIComponent(param[1]);
198
+ }
199
+ }
200
+ }
201
+ return s.length > 0 ? '?' + s : s;
202
+ };
203
+
204
+ /**
205
+ * returns the first query param value found for the key
206
+ * @param {string} key query key
207
+ * @return {string} first value found for key
208
+ */
209
+ Uri.prototype.getQueryParamValue = function (key) {
210
+ var param, i, l;
211
+ for (i = 0, l = this.queryPairs.length; i < l; i++) {
212
+ param = this.queryPairs[i];
213
+ if (key === param[0]) {
214
+ return param[1];
215
+ }
216
+ }
217
+ };
218
+
219
+ /**
220
+ * returns an array of query param values for the key
221
+ * @param {string} key query key
222
+ * @return {array} array of values
223
+ */
224
+ Uri.prototype.getQueryParamValues = function (key) {
225
+ var arr = [], i, param, l;
226
+ for (i = 0, l = this.queryPairs.length; i < l; i++) {
227
+ param = this.queryPairs[i];
228
+ if (key === param[0]) {
229
+ arr.push(param[1]);
230
+ }
231
+ }
232
+ return arr;
233
+ };
234
+
235
+ /**
236
+ * removes query parameters
237
+ * @param {string} key remove values for key
238
+ * @param {val} [val] remove a specific value, otherwise removes all
239
+ * @return {Uri} returns self for fluent chaining
240
+ */
241
+ Uri.prototype.deleteQueryParam = function (key, val) {
242
+ var arr = [], i, param, keyMatchesFilter, valMatchesFilter, l;
243
+
244
+ for (i = 0, l = this.queryPairs.length; i < l; i++) {
245
+
246
+ param = this.queryPairs[i];
247
+ keyMatchesFilter = decode(param[0]) === decode(key);
248
+ valMatchesFilter = param[1] === val;
249
+
250
+ if ((arguments.length === 1 && !keyMatchesFilter) || (arguments.length === 2 && (!keyMatchesFilter || !valMatchesFilter))) {
251
+ arr.push(param);
252
+ }
253
+ }
254
+
255
+ this.queryPairs = arr;
256
+
257
+ return this;
258
+ };
259
+
260
+ /**
261
+ * adds a query parameter
262
+ * @param {string} key add values for key
263
+ * @param {string} val value to add
264
+ * @param {integer} [index] specific index to add the value at
265
+ * @return {Uri} returns self for fluent chaining
266
+ */
267
+ Uri.prototype.addQueryParam = function (key, val, index) {
268
+ if (arguments.length === 3 && index !== -1) {
269
+ index = Math.min(index, this.queryPairs.length);
270
+ this.queryPairs.splice(index, 0, [key, val]);
271
+ } else if (arguments.length > 0) {
272
+ this.queryPairs.push([key, val]);
273
+ }
274
+ return this;
275
+ };
276
+
277
+ /**
278
+ * test for the existence of a query parameter
279
+ * @param {string} key check values for key
280
+ * @return {Boolean} true if key exists, otherwise false
281
+ */
282
+ Uri.prototype.hasQueryParam = function (key) {
283
+ var i, len = this.queryPairs.length;
284
+ for (i = 0; i < len; i++) {
285
+ if (this.queryPairs[i][0] == key)
286
+ return true;
287
+ }
288
+ return false;
289
+ };
290
+
291
+ /**
292
+ * replaces query param values
293
+ * @param {string} key key to replace value for
294
+ * @param {string} newVal new value
295
+ * @param {string} [oldVal] replace only one specific value (otherwise replaces all)
296
+ * @return {Uri} returns self for fluent chaining
297
+ */
298
+ Uri.prototype.replaceQueryParam = function (key, newVal, oldVal) {
299
+ var index = -1, len = this.queryPairs.length, i, param;
300
+
301
+ if (arguments.length === 3) {
302
+ for (i = 0; i < len; i++) {
303
+ param = this.queryPairs[i];
304
+ if (decode(param[0]) === decode(key) && decodeURIComponent(param[1]) === decode(oldVal)) {
305
+ index = i;
306
+ break;
307
+ }
308
+ }
309
+ if (index >= 0) {
310
+ this.deleteQueryParam(key, decode(oldVal)).addQueryParam(key, newVal, index);
311
+ }
312
+ } else {
313
+ for (i = 0; i < len; i++) {
314
+ param = this.queryPairs[i];
315
+ if (decode(param[0]) === decode(key)) {
316
+ index = i;
317
+ break;
318
+ }
319
+ }
320
+ this.deleteQueryParam(key);
321
+ this.addQueryParam(key, newVal, index);
322
+ }
323
+ return this;
324
+ };
325
+
326
+ /**
327
+ * Define fluent setter methods (setProtocol, setHasAuthorityPrefix, etc)
328
+ */
329
+ ['protocol', 'hasAuthorityPrefix', 'isColonUri', 'userInfo', 'host', 'port', 'path', 'query', 'anchor'].forEach(function(key) {
330
+ var method = 'set' + key.charAt(0).toUpperCase() + key.slice(1);
331
+ Uri.prototype[method] = function(val) {
332
+ this[key](val);
333
+ return this;
334
+ };
335
+ });
336
+
337
+ /**
338
+ * Scheme name, colon and doubleslash, as required
339
+ * @return {string} http:// or possibly just //
340
+ */
341
+ Uri.prototype.scheme = function() {
342
+ var s = '';
343
+
344
+ if (this.protocol()) {
345
+ s += this.protocol();
346
+ if (this.protocol().indexOf(':') !== this.protocol().length - 1) {
347
+ s += ':';
348
+ }
349
+ s += '//';
350
+ } else {
351
+ if (this.hasAuthorityPrefix() && this.host()) {
352
+ s += '//';
353
+ }
354
+ }
355
+
356
+ return s;
357
+ };
358
+
359
+ /**
360
+ * Same as Mozilla nsIURI.prePath
361
+ * @return {string} scheme://user:password@host:port
362
+ * @see https://developer.mozilla.org/en/nsIURI
363
+ */
364
+ Uri.prototype.origin = function() {
365
+ var s = this.scheme();
366
+
367
+ if (this.userInfo() && this.host()) {
368
+ s += this.userInfo();
369
+ if (this.userInfo().indexOf('@') !== this.userInfo().length - 1) {
370
+ s += '@';
371
+ }
372
+ }
373
+
374
+ if (this.host()) {
375
+ s += this.host();
376
+ if (this.port() || (this.path() && this.path().substr(0, 1).match(/[0-9]/))) {
377
+ s += ':' + this.port();
378
+ }
379
+ }
380
+
381
+ return s;
382
+ };
383
+
384
+ /**
385
+ * Adds a trailing slash to the path
386
+ */
387
+ Uri.prototype.addTrailingSlash = function() {
388
+ var path = this.path() || '';
389
+
390
+ if (path.substr(-1) !== '/') {
391
+ this.path(path + '/');
392
+ }
393
+
394
+ return this;
395
+ };
396
+
397
+ /**
398
+ * Serializes the internal state of the Uri object
399
+ * @return {string}
400
+ */
401
+ Uri.prototype.toString = function() {
402
+ var path, s = this.origin();
403
+
404
+ if (this.isColonUri()) {
405
+ if (this.path()) {
406
+ s += ':'+this.path();
407
+ }
408
+ } else if (this.path()) {
409
+ path = this.path();
410
+ if (!(re.ends_with_slashes.test(s) || re.starts_with_slashes.test(path))) {
411
+ s += '/';
412
+ } else {
413
+ if (s) {
414
+ s.replace(re.ends_with_slashes, '/');
415
+ }
416
+ path = path.replace(re.starts_with_slashes, '/');
417
+ }
418
+ s += path;
419
+ } else {
420
+ if (this.host() && (this.query().toString() || this.anchor())) {
421
+ s += '/';
422
+ }
423
+ }
424
+ if (this.query().toString()) {
425
+ s += this.query().toString();
426
+ }
427
+
428
+ if (this.anchor()) {
429
+ if (this.anchor().indexOf('#') !== 0) {
430
+ s += '#';
431
+ }
432
+ s += this.anchor();
433
+ }
434
+
435
+ return s;
436
+ };
437
+
438
+ /**
439
+ * Clone a Uri object
440
+ * @return {Uri} duplicate copy of the Uri
441
+ */
442
+ Uri.prototype.clone = function() {
443
+ return new Uri(this.toString());
444
+ };
445
+
446
+ /**
447
+ * export via AMD or CommonJS, otherwise leak a global
448
+ */
449
+ if (typeof define === 'function' && define.amd) {
450
+ define(function() {
451
+ return Uri;
452
+ });
453
+ } else if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') {
454
+ module.exports = Uri;
455
+ } else {
456
+ global.Uri = Uri;
457
+ }
458
+ }(this));