spree_frontend 4.2.3.1 → 4.3.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +1 -1
- data/app/assets/config/spree_frontend_manifest.js +4 -0
- data/app/assets/images/card-image.svg +4 -0
- data/app/assets/images/file-image.svg +4 -0
- data/app/assets/images/image.svg +4 -0
- data/app/assets/images/noimage/large.png +0 -0
- data/app/assets/images/noimage/mini.png +0 -0
- data/app/assets/images/noimage/plp.svg +23 -0
- data/app/assets/images/noimage/product.png +0 -0
- data/app/assets/images/noimage/small.png +0 -0
- data/app/assets/javascripts/spree/api/main.js +36 -0
- data/app/assets/javascripts/spree/api/storefront/cart.js +49 -0
- data/app/assets/javascripts/spree/frontend/checkout/payment.js +18 -5
- data/app/assets/javascripts/spree/frontend/checkout.js +16 -0
- data/app/assets/javascripts/spree/frontend/currency.js +11 -9
- data/app/assets/javascripts/spree/frontend/locale.es6 +13 -0
- data/app/assets/javascripts/spree/frontend/views/spree/home/product_carousels.js +3 -3
- data/app/assets/javascripts/spree/frontend/views/spree/products/index.js +0 -9
- data/app/assets/javascripts/spree/frontend/views/spree/products/price_filters.es6 +46 -0
- data/app/assets/javascripts/spree/frontend.js +3 -0
- data/app/assets/javascripts/spree.js +78 -0
- data/app/assets/stylesheets/spree/frontend/application.scss +1 -0
- data/app/assets/stylesheets/spree/frontend/components-bootstrap/button.scss +8 -0
- data/app/assets/stylesheets/spree/frontend/helpers/spree/frontend_helper.scss +41 -0
- data/app/assets/stylesheets/spree/frontend/variables/variables.scss +2 -2
- data/app/assets/stylesheets/spree/frontend/views/spree/checkout/edit.scss +17 -5
- data/app/assets/stylesheets/spree/frontend/views/spree/cms_sections/_index.scss +1 -0
- data/app/assets/stylesheets/spree/frontend/views/spree/cms_sections/product_buy_bar.scss +20 -0
- data/app/assets/stylesheets/spree/frontend/views/spree/home/index.scss +54 -67
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/category_nav_bar.scss +3 -3
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/footer.scss +4 -0
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/main_nav_bar.scss +12 -1
- data/app/controllers/spree/addresses_controller.rb +14 -19
- data/app/controllers/spree/checkout_controller.rb +5 -3
- data/app/controllers/spree/cms_pages_controller.rb +29 -0
- data/app/controllers/spree/content_controller.rb +0 -2
- data/app/controllers/spree/errors_controller.rb +11 -0
- data/app/controllers/spree/home_controller.rb +34 -1
- data/app/controllers/spree/locale_controller.rb +7 -1
- data/app/controllers/spree/orders_controller.rb +9 -7
- data/app/controllers/spree/products_controller.rb +14 -13
- data/app/controllers/spree/store_controller.rb +25 -1
- data/app/controllers/spree/taxons_controller.rb +12 -5
- data/app/helpers/spree/addresses_helper.rb +9 -4
- data/app/helpers/spree/cms_pages_helper.rb +23 -0
- data/app/helpers/spree/frontend_helper.rb +109 -10
- data/app/helpers/spree/navigation_helper.rb +73 -4
- data/app/helpers/spree/products_filters_helper.rb +168 -0
- data/app/helpers/spree/store_helper.rb +3 -1
- data/app/views/spree/checkout/_address.html.erb +1 -1
- data/app/views/spree/checkout/_credit_card.html.erb +1 -0
- data/app/views/spree/cms_pages/show.html.erb +16 -0
- data/app/views/spree/errors/forbidden.html.erb +0 -0
- data/app/views/spree/errors/unauthorized.html.erb +0 -0
- data/app/views/spree/home/index.html.erb +19 -118
- data/app/views/spree/layouts/spree_application.html.erb +2 -2
- data/app/views/spree/products/_description.html.erb +16 -19
- data/app/views/spree/products/_filters_desktop.html.erb +50 -15
- data/app/views/spree/products/_filters_mobile.html.erb +38 -10
- data/app/views/spree/products/_sort_desktop.html.erb +17 -11
- data/app/views/spree/products/_sort_mobile.html.erb +16 -0
- data/app/views/spree/products/index.html.erb +1 -1
- data/app/views/spree/shared/_carousel_4_products.html.erb +8 -8
- data/app/views/spree/shared/_checkout_header.html.erb +22 -21
- data/app/views/spree/shared/_copyright.html.erb +1 -1
- data/app/views/spree/shared/_footer.html.erb +18 -12
- data/app/views/spree/shared/_head.html.erb +1 -1
- data/app/views/spree/shared/_header.html.erb +3 -3
- data/app/views/spree/shared/_main_nav_bar.html.erb +61 -43
- data/app/views/spree/shared/_mobile_navigation.html.erb +30 -19
- data/app/views/spree/shared/_nav_bar.html.erb +1 -1
- data/app/views/spree/shared/_option_values.html.erb +2 -21
- data/app/views/spree/shared/_order_details.html.erb +1 -1
- data/app/views/spree/shared/_paths.html.erb +8 -0
- data/app/views/spree/shared/_properties.html.erb +4 -0
- data/app/views/spree/shared/_translations.html.erb +2 -1
- data/app/views/spree/shared/carousel/_single.html.erb +1 -1
- data/app/views/spree/shared/carousel/_thumbnails.html.erb +1 -1
- data/app/views/spree/shared/cms/pages/_edit_mode.html.erb +13 -0
- data/app/views/spree/shared/cms/sections/_featured_article.html.erb +27 -0
- data/app/views/spree/shared/cms/sections/_hero_image.html.erb +60 -0
- data/app/views/spree/shared/cms/sections/_image_gallery.html.erb +171 -0
- data/app/views/spree/shared/cms/sections/_product_carousel.html.erb +5 -0
- data/app/views/spree/shared/cms/sections/_rich_text_content.html.erb +3 -0
- data/app/views/spree/shared/cms/sections/_side_by_side_images.html.erb +118 -0
- data/app/views/spree/taxons/_header.html.erb +6 -1
- data/app/views/spree/users/show.html.erb +4 -1
- data/config/initializers/assets.rb +4 -13
- data/config/routes.rb +9 -3
- data/lib/generators/spree/frontend/install/install_generator.rb +5 -5
- data/lib/generators/spree/frontend/install/templates/app/assets/config/manifest.js +2 -0
- data/lib/generators/spree/frontend/install/templates/vendor/assets/javascripts/spree/frontend/all.js +8 -0
- data/lib/generators/spree/frontend/install/templates/vendor/assets/stylesheets/spree/frontend/all.css +9 -0
- data/lib/spree/frontend/engine.rb +6 -0
- data/lib/spree/frontend.rb +6 -3
- data/spec/fixtures/files/store_favicon.ico +0 -0
- data/spree_frontend.gemspec +13 -9
- data/vendor/assets/javascripts/cleave.js +8 -0
- data/vendor/assets/javascripts/fetch.umd.js +531 -0
- data/vendor/assets/javascripts/jquery.payment.js +652 -0
- data/vendor/assets/javascripts/jsuri.js +458 -0
- data/vendor/assets/javascripts/polyfill.min.js +1 -0
- metadata +132 -86
- data/app/assets/images/homepage/big_category_banner.jpg +0 -0
- data/app/assets/images/homepage/big_category_banner_mobile.jpg +0 -0
- data/app/assets/images/homepage/big_category_banner_tablet_landscape.jpg +0 -0
- data/app/assets/images/homepage/big_category_banner_tablet_portrait.jpg +0 -0
- data/app/assets/images/homepage/category_banner_lower.jpg +0 -0
- data/app/assets/images/homepage/category_banner_lower_mobile.jpg +0 -0
- data/app/assets/images/homepage/category_banner_lower_tablet_landscape.jpg +0 -0
- data/app/assets/images/homepage/category_banner_lower_tablet_portrait.jpg +0 -0
- data/app/assets/images/homepage/category_banner_upper.jpg +0 -0
- data/app/assets/images/homepage/category_banner_upper_mobile.jpg +0 -0
- data/app/assets/images/homepage/category_banner_upper_tablet_landscape.jpg +0 -0
- data/app/assets/images/homepage/category_banner_upper_tablet_portrait.jpg +0 -0
- data/app/assets/images/homepage/main_banner.jpg +0 -0
- data/app/assets/images/homepage/main_banner_mobile.jpg +0 -0
- data/app/assets/images/homepage/main_banner_tablet_landscape.jpg +0 -0
- data/app/assets/images/homepage/main_banner_tablet_portrait.jpg +0 -0
- data/app/assets/images/homepage/promo_banner_left.jpg +0 -0
- data/app/assets/images/homepage/promo_banner_left_mobile.jpg +0 -0
- data/app/assets/images/homepage/promo_banner_left_tablet_landscape.jpg +0 -0
- data/app/assets/images/homepage/promo_banner_left_tablet_portrait.jpg +0 -0
- data/app/assets/images/homepage/promo_banner_right.jpg +0 -0
- data/app/assets/images/homepage/promo_banner_right_mobile.jpg +0 -0
- data/app/assets/images/homepage/promo_banner_right_tablet_landscape.jpg +0 -0
- data/app/assets/images/homepage/promo_banner_right_tablet_portrait.jpg +0 -0
- data/app/assets/images/meganav/promo_banner_left-first-category.jpg +0 -0
- data/app/assets/images/meganav/promo_banner_left-second-category.jpg +0 -0
- data/app/assets/images/meganav/promo_banner_left-third-category.jpg +0 -0
- data/app/assets/images/meganav/promo_banner_right-first-category.jpg +0 -0
- data/app/assets/images/meganav/promo_banner_right-second-category.jpg +0 -0
- data/app/assets/images/meganav/promo_banner_right-third-category.jpg +0 -0
- data/app/assets/images/noimage/big_category_banner.jpg +0 -0
- data/app/assets/images/noimage/big_category_banner_mobile.jpg +0 -0
- data/app/assets/images/noimage/big_category_banner_tablet_landscape.jpg +0 -0
- data/app/assets/images/noimage/big_category_banner_tablet_portrait.jpg +0 -0
- data/app/assets/images/noimage/category_banner.jpg +0 -0
- data/app/assets/images/noimage/category_banner_mobile.jpg +0 -0
- data/app/assets/images/noimage/category_banner_plp.jpg +0 -0
- data/app/assets/images/noimage/category_banner_tablet_landscape.jpg +0 -0
- data/app/assets/images/noimage/category_banner_tablet_portrait.jpg +0 -0
- data/app/assets/images/noimage/main_banner.jpg +0 -0
- data/app/assets/images/noimage/main_banner_mobile.jpg +0 -0
- data/app/assets/images/noimage/main_banner_tablet_landscape.jpg +0 -0
- data/app/assets/images/noimage/main_banner_tablet_portrait.jpg +0 -0
- data/app/assets/images/noimage/product_photo.jpg +0 -0
- data/app/assets/images/noimage/promo_banner.jpg +0 -0
- data/app/assets/images/noimage/promo_banner_megamenu.jpg +0 -0
- data/app/assets/images/noimage/promo_banner_mobile.jpg +0 -0
- data/app/assets/images/noimage/promo_banner_tablet_landscape.jpg +0 -0
- data/app/assets/images/noimage/promo_banner_tablet_portrait.jpg +0 -0
- data/app/assets/javascripts/spree/frontend/locale.js +0 -13
- data/app/assets/javascripts/spree/frontend/multi_currency.js +0 -13
- data/lib/generators/spree/frontend/install/templates/config/initializers/spree_storefront.rb +0 -1
- data/lib/generators/spree/frontend/install/templates/config/spree_storefront.yml +0 -99
@@ -3,7 +3,12 @@
|
|
3
3
|
<%= @taxon.name %>
|
4
4
|
</div>
|
5
5
|
<% unless @taxon.description.blank? %>
|
6
|
-
<div class="py-3 py-md-0 taxon-description"
|
6
|
+
<div class="py-3 py-md-0 taxon-description">
|
7
|
+
<% if taxon_wysiwyg_editor_enabled? %>
|
8
|
+
<%= raw @taxon.description %>
|
9
|
+
<% else %>
|
10
|
+
<%= @taxon.description %>
|
11
|
+
<% end %>
|
7
12
|
<% end %>
|
8
13
|
<% if @taxon.icon&.attachment %>
|
9
14
|
<div class="d-none d-md-block pt-4 taxon-icon">
|
@@ -13,7 +13,10 @@
|
|
13
13
|
|
14
14
|
<div class="d-lg-inline-block account-page-user-info-item-store-credits">
|
15
15
|
<p class="my-0 text-uppercase text-center">
|
16
|
-
<%= Spree.t(:store_credit_name)
|
16
|
+
<%= Spree.t(:store_credit_name) %>
|
17
|
+
<% @user.available_store_credits(current_store).each do |value| %>
|
18
|
+
<br><b class="account-page-user-info-item-store-credits-amount"><%= value %></b>
|
19
|
+
<% end %>
|
17
20
|
</p>
|
18
21
|
</div>
|
19
22
|
</div>
|
@@ -1,13 +1,4 @@
|
|
1
|
-
Rails.application.config.assets.precompile
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
homepage/*
|
6
|
-
meganav/*
|
7
|
-
noimage/*
|
8
|
-
logo@3x.png
|
9
|
-
spark-logo@3x.png
|
10
|
-
arrow.svg
|
11
|
-
check-mark-circle.svg
|
12
|
-
error.svg
|
13
|
-
)
|
1
|
+
Rails.application.config.assets.precompile << 'spree_frontend_manifest.js'
|
2
|
+
Rails.application.config.assets.configure do |env|
|
3
|
+
env.export_concurrent = false
|
4
|
+
end
|
data/config/routes.rb
CHANGED
@@ -2,10 +2,11 @@ Spree::Core::Engine.add_routes do
|
|
2
2
|
scope '(:locale)', locale: /#{Spree.available_locales.join('|')}/, defaults: { locale: nil } do
|
3
3
|
root to: 'home#index'
|
4
4
|
|
5
|
-
resources :products, only: [:index, :show]
|
6
|
-
|
5
|
+
resources :products, only: [:index, :show], path: "/#{Spree::Config[:storefront_products_path]}"
|
6
|
+
|
7
|
+
get "/#{Spree::Config[:storefront_products_path]}/:id/related", to: 'products#related'
|
7
8
|
# route globbing for pretty nested taxon and product paths
|
8
|
-
get
|
9
|
+
get "/#{Spree::Config[:storefront_taxons_path]}/*id", to: 'taxons#show', as: :nested_taxons
|
9
10
|
get '/product_carousel/:id', to: 'taxons#product_carousel'
|
10
11
|
|
11
12
|
# non-restful checkout stuff
|
@@ -32,5 +33,10 @@ Spree::Core::Engine.add_routes do
|
|
32
33
|
|
33
34
|
get '/api_tokens', to: 'store#api_tokens'
|
34
35
|
post '/ensure_cart', to: 'store#ensure_cart'
|
36
|
+
|
37
|
+
get "#{Spree::Config[:storefront_pages_path]}/:slug", to: 'cms_pages#show', as: :page
|
38
|
+
|
39
|
+
get '/forbidden', to: 'errors#forbidden', as: :forbidden
|
40
|
+
get '/unauthorized', to: 'errors#unauthorized', as: :unauthorized
|
35
41
|
end
|
36
42
|
end
|
@@ -2,7 +2,7 @@ module Spree
|
|
2
2
|
module Frontend
|
3
3
|
module Generators
|
4
4
|
class InstallGenerator < Rails::Generators::Base
|
5
|
-
desc '
|
5
|
+
desc 'Installs Spree rails storefront'
|
6
6
|
|
7
7
|
def self.source_paths
|
8
8
|
[
|
@@ -16,15 +16,15 @@ module Spree
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def install
|
19
|
-
|
20
|
-
template '
|
21
|
-
template 'config/spree_storefront.yml', 'config/spree_storefront.yml'
|
19
|
+
template 'vendor/assets/javascripts/spree/frontend/all.js'
|
20
|
+
template 'vendor/assets/stylesheets/spree/frontend/all.css'
|
22
21
|
# static images
|
23
22
|
directory 'noimage', './app/assets/images/noimage'
|
24
23
|
directory 'homepage', './app/assets/images/homepage'
|
25
|
-
directory 'meganav', './app/assets/images/meganav'
|
26
24
|
# SCSS theming
|
27
25
|
template 'variables.scss', './app/assets/stylesheets/spree/frontend/variables/variables.scss'
|
26
|
+
# Sprockets 4 manifest
|
27
|
+
template 'app/assets/config/manifest.js'
|
28
28
|
# home page template
|
29
29
|
directory 'home', './app/views/spree/home'
|
30
30
|
end
|
data/lib/generators/spree/frontend/install/templates/vendor/assets/javascripts/spree/frontend/all.js
ADDED
@@ -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/frontend
|
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/frontend
|
7
|
+
*= require_self
|
8
|
+
*= require_tree .
|
9
|
+
*/
|
@@ -17,6 +17,12 @@ module Spree
|
|
17
17
|
initializer 'spree.frontend.environment', before: :load_config_initializers do |_app|
|
18
18
|
Spree::Frontend::Config = Spree::FrontendConfiguration.new
|
19
19
|
end
|
20
|
+
|
21
|
+
initializer 'spree.frontend.checking_deprecated_preferences' do
|
22
|
+
Spree::Frontend::Config.deprecated_preferences.each do |pref|
|
23
|
+
warn "[DEPRECATION] Spree::Frontend::Config[:#{pref[:name]}] is deprecated. #{pref[:message]}"
|
24
|
+
end
|
25
|
+
end
|
20
26
|
end
|
21
27
|
end
|
22
28
|
end
|
data/lib/spree/frontend.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
|
-
require '
|
2
|
-
require '
|
1
|
+
require 'spree_core'
|
2
|
+
require 'spree_api'
|
3
|
+
|
4
|
+
require 'sprockets/railtie'
|
3
5
|
|
4
6
|
require 'bootstrap'
|
5
7
|
require 'glyphicons'
|
@@ -8,6 +10,7 @@ require 'popper_js'
|
|
8
10
|
require 'canonical-rails'
|
9
11
|
require 'jquery-rails'
|
10
12
|
require 'turbolinks'
|
11
|
-
require '
|
13
|
+
require 'responders'
|
14
|
+
|
12
15
|
require 'spree/frontend/middleware/seo_assist'
|
13
16
|
require 'spree/frontend/engine'
|
Binary file
|
data/spree_frontend.gemspec
CHANGED
@@ -7,7 +7,7 @@ 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 = '
|
10
|
+
s.summary = 'The default Storefront built with Rails and Turbolinks for Spree eCommerce platform'
|
11
11
|
s.description = s.summary
|
12
12
|
s.homepage = 'https://spreecommerce.org'
|
13
13
|
s.license = 'BSD-3-Clause'
|
@@ -15,25 +15,29 @@ Gem::Specification.new do |s|
|
|
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://
|
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
|
|
22
|
-
s.required_ruby_version = '>= 2.5
|
22
|
+
s.required_ruby_version = '>= 2.5'
|
23
23
|
|
24
24
|
s.files = `git ls-files`.split("\n").reject { |f| f.match(/^spec/) && !f.match(/^spec\/fixtures/) }
|
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 '
|
32
|
-
s.add_dependency '
|
33
|
-
s.add_dependency '
|
31
|
+
s.add_dependency 'babel-transpiler', '~> 0.7'
|
32
|
+
s.add_dependency 'bootstrap', '~> 4.0'
|
33
|
+
s.add_dependency 'glyphicons', '~> 1.0'
|
34
|
+
s.add_dependency 'canonical-rails', '~> 0.2', '>= 0.2.10'
|
34
35
|
s.add_dependency 'inline_svg', '~> 1.5'
|
35
36
|
s.add_dependency 'jquery-rails', '~> 4.3'
|
36
|
-
s.add_dependency '
|
37
|
+
s.add_dependency 'sass-rails', '>= 5'
|
38
|
+
s.add_dependency 'turbolinks', '~> 5.2'
|
39
|
+
s.add_dependency 'responders'
|
40
|
+
s.add_dependency 'sprockets', '~> 4.0'
|
37
41
|
|
38
42
|
s.add_development_dependency 'capybara-accessible'
|
39
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,531 @@
|
|
1
|
+
(function (global, factory) {
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
4
|
+
(factory((global.WHATWGFetch = {})));
|
5
|
+
}(this, (function (exports) { 'use strict';
|
6
|
+
|
7
|
+
var support = {
|
8
|
+
searchParams: 'URLSearchParams' in self,
|
9
|
+
iterable: 'Symbol' in self && 'iterator' in Symbol,
|
10
|
+
blob:
|
11
|
+
'FileReader' in self &&
|
12
|
+
'Blob' in self &&
|
13
|
+
(function() {
|
14
|
+
try {
|
15
|
+
new Blob();
|
16
|
+
return true
|
17
|
+
} catch (e) {
|
18
|
+
return false
|
19
|
+
}
|
20
|
+
})(),
|
21
|
+
formData: 'FormData' in self,
|
22
|
+
arrayBuffer: 'ArrayBuffer' in self
|
23
|
+
};
|
24
|
+
|
25
|
+
function isDataView(obj) {
|
26
|
+
return obj && DataView.prototype.isPrototypeOf(obj)
|
27
|
+
}
|
28
|
+
|
29
|
+
if (support.arrayBuffer) {
|
30
|
+
var viewClasses = [
|
31
|
+
'[object Int8Array]',
|
32
|
+
'[object Uint8Array]',
|
33
|
+
'[object Uint8ClampedArray]',
|
34
|
+
'[object Int16Array]',
|
35
|
+
'[object Uint16Array]',
|
36
|
+
'[object Int32Array]',
|
37
|
+
'[object Uint32Array]',
|
38
|
+
'[object Float32Array]',
|
39
|
+
'[object Float64Array]'
|
40
|
+
];
|
41
|
+
|
42
|
+
var isArrayBufferView =
|
43
|
+
ArrayBuffer.isView ||
|
44
|
+
function(obj) {
|
45
|
+
return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1
|
46
|
+
};
|
47
|
+
}
|
48
|
+
|
49
|
+
function normalizeName(name) {
|
50
|
+
if (typeof name !== 'string') {
|
51
|
+
name = String(name);
|
52
|
+
}
|
53
|
+
if (/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(name)) {
|
54
|
+
throw new TypeError('Invalid character in header field name')
|
55
|
+
}
|
56
|
+
return name.toLowerCase()
|
57
|
+
}
|
58
|
+
|
59
|
+
function normalizeValue(value) {
|
60
|
+
if (typeof value !== 'string') {
|
61
|
+
value = String(value);
|
62
|
+
}
|
63
|
+
return value
|
64
|
+
}
|
65
|
+
|
66
|
+
// Build a destructive iterator for the value list
|
67
|
+
function iteratorFor(items) {
|
68
|
+
var iterator = {
|
69
|
+
next: function() {
|
70
|
+
var value = items.shift();
|
71
|
+
return {done: value === undefined, value: value}
|
72
|
+
}
|
73
|
+
};
|
74
|
+
|
75
|
+
if (support.iterable) {
|
76
|
+
iterator[Symbol.iterator] = function() {
|
77
|
+
return iterator
|
78
|
+
};
|
79
|
+
}
|
80
|
+
|
81
|
+
return iterator
|
82
|
+
}
|
83
|
+
|
84
|
+
function Headers(headers) {
|
85
|
+
this.map = {};
|
86
|
+
|
87
|
+
if (headers instanceof Headers) {
|
88
|
+
headers.forEach(function(value, name) {
|
89
|
+
this.append(name, value);
|
90
|
+
}, this);
|
91
|
+
} else if (Array.isArray(headers)) {
|
92
|
+
headers.forEach(function(header) {
|
93
|
+
this.append(header[0], header[1]);
|
94
|
+
}, this);
|
95
|
+
} else if (headers) {
|
96
|
+
Object.getOwnPropertyNames(headers).forEach(function(name) {
|
97
|
+
this.append(name, headers[name]);
|
98
|
+
}, this);
|
99
|
+
}
|
100
|
+
}
|
101
|
+
|
102
|
+
Headers.prototype.append = function(name, value) {
|
103
|
+
name = normalizeName(name);
|
104
|
+
value = normalizeValue(value);
|
105
|
+
var oldValue = this.map[name];
|
106
|
+
this.map[name] = oldValue ? oldValue + ', ' + value : value;
|
107
|
+
};
|
108
|
+
|
109
|
+
Headers.prototype['delete'] = function(name) {
|
110
|
+
delete this.map[normalizeName(name)];
|
111
|
+
};
|
112
|
+
|
113
|
+
Headers.prototype.get = function(name) {
|
114
|
+
name = normalizeName(name);
|
115
|
+
return this.has(name) ? this.map[name] : null
|
116
|
+
};
|
117
|
+
|
118
|
+
Headers.prototype.has = function(name) {
|
119
|
+
return this.map.hasOwnProperty(normalizeName(name))
|
120
|
+
};
|
121
|
+
|
122
|
+
Headers.prototype.set = function(name, value) {
|
123
|
+
this.map[normalizeName(name)] = normalizeValue(value);
|
124
|
+
};
|
125
|
+
|
126
|
+
Headers.prototype.forEach = function(callback, thisArg) {
|
127
|
+
for (var name in this.map) {
|
128
|
+
if (this.map.hasOwnProperty(name)) {
|
129
|
+
callback.call(thisArg, this.map[name], name, this);
|
130
|
+
}
|
131
|
+
}
|
132
|
+
};
|
133
|
+
|
134
|
+
Headers.prototype.keys = function() {
|
135
|
+
var items = [];
|
136
|
+
this.forEach(function(value, name) {
|
137
|
+
items.push(name);
|
138
|
+
});
|
139
|
+
return iteratorFor(items)
|
140
|
+
};
|
141
|
+
|
142
|
+
Headers.prototype.values = function() {
|
143
|
+
var items = [];
|
144
|
+
this.forEach(function(value) {
|
145
|
+
items.push(value);
|
146
|
+
});
|
147
|
+
return iteratorFor(items)
|
148
|
+
};
|
149
|
+
|
150
|
+
Headers.prototype.entries = function() {
|
151
|
+
var items = [];
|
152
|
+
this.forEach(function(value, name) {
|
153
|
+
items.push([name, value]);
|
154
|
+
});
|
155
|
+
return iteratorFor(items)
|
156
|
+
};
|
157
|
+
|
158
|
+
if (support.iterable) {
|
159
|
+
Headers.prototype[Symbol.iterator] = Headers.prototype.entries;
|
160
|
+
}
|
161
|
+
|
162
|
+
function consumed(body) {
|
163
|
+
if (body.bodyUsed) {
|
164
|
+
return Promise.reject(new TypeError('Already read'))
|
165
|
+
}
|
166
|
+
body.bodyUsed = true;
|
167
|
+
}
|
168
|
+
|
169
|
+
function fileReaderReady(reader) {
|
170
|
+
return new Promise(function(resolve, reject) {
|
171
|
+
reader.onload = function() {
|
172
|
+
resolve(reader.result);
|
173
|
+
};
|
174
|
+
reader.onerror = function() {
|
175
|
+
reject(reader.error);
|
176
|
+
};
|
177
|
+
})
|
178
|
+
}
|
179
|
+
|
180
|
+
function readBlobAsArrayBuffer(blob) {
|
181
|
+
var reader = new FileReader();
|
182
|
+
var promise = fileReaderReady(reader);
|
183
|
+
reader.readAsArrayBuffer(blob);
|
184
|
+
return promise
|
185
|
+
}
|
186
|
+
|
187
|
+
function readBlobAsText(blob) {
|
188
|
+
var reader = new FileReader();
|
189
|
+
var promise = fileReaderReady(reader);
|
190
|
+
reader.readAsText(blob);
|
191
|
+
return promise
|
192
|
+
}
|
193
|
+
|
194
|
+
function readArrayBufferAsText(buf) {
|
195
|
+
var view = new Uint8Array(buf);
|
196
|
+
var chars = new Array(view.length);
|
197
|
+
|
198
|
+
for (var i = 0; i < view.length; i++) {
|
199
|
+
chars[i] = String.fromCharCode(view[i]);
|
200
|
+
}
|
201
|
+
return chars.join('')
|
202
|
+
}
|
203
|
+
|
204
|
+
function bufferClone(buf) {
|
205
|
+
if (buf.slice) {
|
206
|
+
return buf.slice(0)
|
207
|
+
} else {
|
208
|
+
var view = new Uint8Array(buf.byteLength);
|
209
|
+
view.set(new Uint8Array(buf));
|
210
|
+
return view.buffer
|
211
|
+
}
|
212
|
+
}
|
213
|
+
|
214
|
+
function Body() {
|
215
|
+
this.bodyUsed = false;
|
216
|
+
|
217
|
+
this._initBody = function(body) {
|
218
|
+
this._bodyInit = body;
|
219
|
+
if (!body) {
|
220
|
+
this._bodyText = '';
|
221
|
+
} else if (typeof body === 'string') {
|
222
|
+
this._bodyText = body;
|
223
|
+
} else if (support.blob && Blob.prototype.isPrototypeOf(body)) {
|
224
|
+
this._bodyBlob = body;
|
225
|
+
} else if (support.formData && FormData.prototype.isPrototypeOf(body)) {
|
226
|
+
this._bodyFormData = body;
|
227
|
+
} else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
|
228
|
+
this._bodyText = body.toString();
|
229
|
+
} else if (support.arrayBuffer && support.blob && isDataView(body)) {
|
230
|
+
this._bodyArrayBuffer = bufferClone(body.buffer);
|
231
|
+
// IE 10-11 can't handle a DataView body.
|
232
|
+
this._bodyInit = new Blob([this._bodyArrayBuffer]);
|
233
|
+
} else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {
|
234
|
+
this._bodyArrayBuffer = bufferClone(body);
|
235
|
+
} else {
|
236
|
+
this._bodyText = body = Object.prototype.toString.call(body);
|
237
|
+
}
|
238
|
+
|
239
|
+
if (!this.headers.get('content-type')) {
|
240
|
+
if (typeof body === 'string') {
|
241
|
+
this.headers.set('content-type', 'text/plain;charset=UTF-8');
|
242
|
+
} else if (this._bodyBlob && this._bodyBlob.type) {
|
243
|
+
this.headers.set('content-type', this._bodyBlob.type);
|
244
|
+
} else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
|
245
|
+
this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');
|
246
|
+
}
|
247
|
+
}
|
248
|
+
};
|
249
|
+
|
250
|
+
if (support.blob) {
|
251
|
+
this.blob = function() {
|
252
|
+
var rejected = consumed(this);
|
253
|
+
if (rejected) {
|
254
|
+
return rejected
|
255
|
+
}
|
256
|
+
|
257
|
+
if (this._bodyBlob) {
|
258
|
+
return Promise.resolve(this._bodyBlob)
|
259
|
+
} else if (this._bodyArrayBuffer) {
|
260
|
+
return Promise.resolve(new Blob([this._bodyArrayBuffer]))
|
261
|
+
} else if (this._bodyFormData) {
|
262
|
+
throw new Error('could not read FormData body as blob')
|
263
|
+
} else {
|
264
|
+
return Promise.resolve(new Blob([this._bodyText]))
|
265
|
+
}
|
266
|
+
};
|
267
|
+
|
268
|
+
this.arrayBuffer = function() {
|
269
|
+
if (this._bodyArrayBuffer) {
|
270
|
+
return consumed(this) || Promise.resolve(this._bodyArrayBuffer)
|
271
|
+
} else {
|
272
|
+
return this.blob().then(readBlobAsArrayBuffer)
|
273
|
+
}
|
274
|
+
};
|
275
|
+
}
|
276
|
+
|
277
|
+
this.text = function() {
|
278
|
+
var rejected = consumed(this);
|
279
|
+
if (rejected) {
|
280
|
+
return rejected
|
281
|
+
}
|
282
|
+
|
283
|
+
if (this._bodyBlob) {
|
284
|
+
return readBlobAsText(this._bodyBlob)
|
285
|
+
} else if (this._bodyArrayBuffer) {
|
286
|
+
return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))
|
287
|
+
} else if (this._bodyFormData) {
|
288
|
+
throw new Error('could not read FormData body as text')
|
289
|
+
} else {
|
290
|
+
return Promise.resolve(this._bodyText)
|
291
|
+
}
|
292
|
+
};
|
293
|
+
|
294
|
+
if (support.formData) {
|
295
|
+
this.formData = function() {
|
296
|
+
return this.text().then(decode)
|
297
|
+
};
|
298
|
+
}
|
299
|
+
|
300
|
+
this.json = function() {
|
301
|
+
return this.text().then(JSON.parse)
|
302
|
+
};
|
303
|
+
|
304
|
+
return this
|
305
|
+
}
|
306
|
+
|
307
|
+
// HTTP methods whose capitalization should be normalized
|
308
|
+
var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT'];
|
309
|
+
|
310
|
+
function normalizeMethod(method) {
|
311
|
+
var upcased = method.toUpperCase();
|
312
|
+
return methods.indexOf(upcased) > -1 ? upcased : method
|
313
|
+
}
|
314
|
+
|
315
|
+
function Request(input, options) {
|
316
|
+
options = options || {};
|
317
|
+
var body = options.body;
|
318
|
+
|
319
|
+
if (input instanceof Request) {
|
320
|
+
if (input.bodyUsed) {
|
321
|
+
throw new TypeError('Already read')
|
322
|
+
}
|
323
|
+
this.url = input.url;
|
324
|
+
this.credentials = input.credentials;
|
325
|
+
if (!options.headers) {
|
326
|
+
this.headers = new Headers(input.headers);
|
327
|
+
}
|
328
|
+
this.method = input.method;
|
329
|
+
this.mode = input.mode;
|
330
|
+
this.signal = input.signal;
|
331
|
+
if (!body && input._bodyInit != null) {
|
332
|
+
body = input._bodyInit;
|
333
|
+
input.bodyUsed = true;
|
334
|
+
}
|
335
|
+
} else {
|
336
|
+
this.url = String(input);
|
337
|
+
}
|
338
|
+
|
339
|
+
this.credentials = options.credentials || this.credentials || 'same-origin';
|
340
|
+
if (options.headers || !this.headers) {
|
341
|
+
this.headers = new Headers(options.headers);
|
342
|
+
}
|
343
|
+
this.method = normalizeMethod(options.method || this.method || 'GET');
|
344
|
+
this.mode = options.mode || this.mode || null;
|
345
|
+
this.signal = options.signal || this.signal;
|
346
|
+
this.referrer = null;
|
347
|
+
|
348
|
+
if ((this.method === 'GET' || this.method === 'HEAD') && body) {
|
349
|
+
throw new TypeError('Body not allowed for GET or HEAD requests')
|
350
|
+
}
|
351
|
+
this._initBody(body);
|
352
|
+
}
|
353
|
+
|
354
|
+
Request.prototype.clone = function() {
|
355
|
+
return new Request(this, {body: this._bodyInit})
|
356
|
+
};
|
357
|
+
|
358
|
+
function decode(body) {
|
359
|
+
var form = new FormData();
|
360
|
+
body
|
361
|
+
.trim()
|
362
|
+
.split('&')
|
363
|
+
.forEach(function(bytes) {
|
364
|
+
if (bytes) {
|
365
|
+
var split = bytes.split('=');
|
366
|
+
var name = split.shift().replace(/\+/g, ' ');
|
367
|
+
var value = split.join('=').replace(/\+/g, ' ');
|
368
|
+
form.append(decodeURIComponent(name), decodeURIComponent(value));
|
369
|
+
}
|
370
|
+
});
|
371
|
+
return form
|
372
|
+
}
|
373
|
+
|
374
|
+
function parseHeaders(rawHeaders) {
|
375
|
+
var headers = new Headers();
|
376
|
+
// Replace instances of \r\n and \n followed by at least one space or horizontal tab with a space
|
377
|
+
// https://tools.ietf.org/html/rfc7230#section-3.2
|
378
|
+
var preProcessedHeaders = rawHeaders.replace(/\r?\n[\t ]+/g, ' ');
|
379
|
+
preProcessedHeaders.split(/\r?\n/).forEach(function(line) {
|
380
|
+
var parts = line.split(':');
|
381
|
+
var key = parts.shift().trim();
|
382
|
+
if (key) {
|
383
|
+
var value = parts.join(':').trim();
|
384
|
+
headers.append(key, value);
|
385
|
+
}
|
386
|
+
});
|
387
|
+
return headers
|
388
|
+
}
|
389
|
+
|
390
|
+
Body.call(Request.prototype);
|
391
|
+
|
392
|
+
function Response(bodyInit, options) {
|
393
|
+
if (!options) {
|
394
|
+
options = {};
|
395
|
+
}
|
396
|
+
|
397
|
+
this.type = 'default';
|
398
|
+
this.status = options.status === undefined ? 200 : options.status;
|
399
|
+
this.ok = this.status >= 200 && this.status < 300;
|
400
|
+
this.statusText = 'statusText' in options ? options.statusText : 'OK';
|
401
|
+
this.headers = new Headers(options.headers);
|
402
|
+
this.url = options.url || '';
|
403
|
+
this._initBody(bodyInit);
|
404
|
+
}
|
405
|
+
|
406
|
+
Body.call(Response.prototype);
|
407
|
+
|
408
|
+
Response.prototype.clone = function() {
|
409
|
+
return new Response(this._bodyInit, {
|
410
|
+
status: this.status,
|
411
|
+
statusText: this.statusText,
|
412
|
+
headers: new Headers(this.headers),
|
413
|
+
url: this.url
|
414
|
+
})
|
415
|
+
};
|
416
|
+
|
417
|
+
Response.error = function() {
|
418
|
+
var response = new Response(null, {status: 0, statusText: ''});
|
419
|
+
response.type = 'error';
|
420
|
+
return response
|
421
|
+
};
|
422
|
+
|
423
|
+
var redirectStatuses = [301, 302, 303, 307, 308];
|
424
|
+
|
425
|
+
Response.redirect = function(url, status) {
|
426
|
+
if (redirectStatuses.indexOf(status) === -1) {
|
427
|
+
throw new RangeError('Invalid status code')
|
428
|
+
}
|
429
|
+
|
430
|
+
return new Response(null, {status: status, headers: {location: url}})
|
431
|
+
};
|
432
|
+
|
433
|
+
exports.DOMException = self.DOMException;
|
434
|
+
try {
|
435
|
+
new exports.DOMException();
|
436
|
+
} catch (err) {
|
437
|
+
exports.DOMException = function(message, name) {
|
438
|
+
this.message = message;
|
439
|
+
this.name = name;
|
440
|
+
var error = Error(message);
|
441
|
+
this.stack = error.stack;
|
442
|
+
};
|
443
|
+
exports.DOMException.prototype = Object.create(Error.prototype);
|
444
|
+
exports.DOMException.prototype.constructor = exports.DOMException;
|
445
|
+
}
|
446
|
+
|
447
|
+
function fetch(input, init) {
|
448
|
+
return new Promise(function(resolve, reject) {
|
449
|
+
var request = new Request(input, init);
|
450
|
+
|
451
|
+
if (request.signal && request.signal.aborted) {
|
452
|
+
return reject(new exports.DOMException('Aborted', 'AbortError'))
|
453
|
+
}
|
454
|
+
|
455
|
+
var xhr = new XMLHttpRequest();
|
456
|
+
|
457
|
+
function abortXhr() {
|
458
|
+
xhr.abort();
|
459
|
+
}
|
460
|
+
|
461
|
+
xhr.onload = function() {
|
462
|
+
var options = {
|
463
|
+
status: xhr.status,
|
464
|
+
statusText: xhr.statusText,
|
465
|
+
headers: parseHeaders(xhr.getAllResponseHeaders() || '')
|
466
|
+
};
|
467
|
+
options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL');
|
468
|
+
var body = 'response' in xhr ? xhr.response : xhr.responseText;
|
469
|
+
resolve(new Response(body, options));
|
470
|
+
};
|
471
|
+
|
472
|
+
xhr.onerror = function() {
|
473
|
+
reject(new TypeError('Network request failed'));
|
474
|
+
};
|
475
|
+
|
476
|
+
xhr.ontimeout = function() {
|
477
|
+
reject(new TypeError('Network request failed'));
|
478
|
+
};
|
479
|
+
|
480
|
+
xhr.onabort = function() {
|
481
|
+
reject(new exports.DOMException('Aborted', 'AbortError'));
|
482
|
+
};
|
483
|
+
|
484
|
+
xhr.open(request.method, request.url, true);
|
485
|
+
|
486
|
+
if (request.credentials === 'include') {
|
487
|
+
xhr.withCredentials = true;
|
488
|
+
} else if (request.credentials === 'omit') {
|
489
|
+
xhr.withCredentials = false;
|
490
|
+
}
|
491
|
+
|
492
|
+
if ('responseType' in xhr && support.blob) {
|
493
|
+
xhr.responseType = 'blob';
|
494
|
+
}
|
495
|
+
|
496
|
+
request.headers.forEach(function(value, name) {
|
497
|
+
xhr.setRequestHeader(name, value);
|
498
|
+
});
|
499
|
+
|
500
|
+
if (request.signal) {
|
501
|
+
request.signal.addEventListener('abort', abortXhr);
|
502
|
+
|
503
|
+
xhr.onreadystatechange = function() {
|
504
|
+
// DONE (success or failure)
|
505
|
+
if (xhr.readyState === 4) {
|
506
|
+
request.signal.removeEventListener('abort', abortXhr);
|
507
|
+
}
|
508
|
+
};
|
509
|
+
}
|
510
|
+
|
511
|
+
xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit);
|
512
|
+
})
|
513
|
+
}
|
514
|
+
|
515
|
+
fetch.polyfill = true;
|
516
|
+
|
517
|
+
if (!self.fetch) {
|
518
|
+
self.fetch = fetch;
|
519
|
+
self.Headers = Headers;
|
520
|
+
self.Request = Request;
|
521
|
+
self.Response = Response;
|
522
|
+
}
|
523
|
+
|
524
|
+
exports.Headers = Headers;
|
525
|
+
exports.Request = Request;
|
526
|
+
exports.Response = Response;
|
527
|
+
exports.fetch = fetch;
|
528
|
+
|
529
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
530
|
+
|
531
|
+
})));
|