diff --git a/.env.testing b/.env.testing index b5b8726aa..299f945da 100644 --- a/.env.testing +++ b/.env.testing @@ -13,6 +13,7 @@ DB_PORT=3306 DB_DATABASE=bagisto_testing DB_USERNAME=bagisto DB_PASSWORD=secret +DB_PREFIX= BROADCAST_DRIVER=log CACHE_DRIVER=file diff --git a/.gitignore b/.gitignore index 0728f2f3d..f8f0d01e0 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ /public/js /public/vendor /public/themes +/public/fonts /vendor /.idea /.vscode diff --git a/app/Console/Commands/GenerateProducts.php b/app/Console/Commands/GenerateProducts.php index f72681fb1..b1899c0b5 100644 --- a/app/Console/Commands/GenerateProducts.php +++ b/app/Console/Commands/GenerateProducts.php @@ -61,6 +61,7 @@ class GenerateProducts extends Command try { $result = $this->generateProduct->create(); } catch (\Exception $e) { + report($e); continue; } diff --git a/bin/codecept b/bin/codecept new file mode 120000 index 000000000..a43e3ac1e --- /dev/null +++ b/bin/codecept @@ -0,0 +1 @@ +../vendor/bin/codecept \ No newline at end of file diff --git a/bin/test.sh b/bin/test.sh new file mode 100755 index 000000000..6f82ff04a --- /dev/null +++ b/bin/test.sh @@ -0,0 +1,49 @@ +#!/bin/bash + +printf "### start preparation ###\n" + + WORKPATH=$(dirname ${0}) + printf ">> workpath is %s\n" ${WORKPATH} + + LOG_DIR="${WORKPATH}/../storage/logs/tests" + printf ">> log-dir is %s\n" ${LOG_DIR} + + printf ">> create and truncate log dir\n" + mkdir -p ${LOG_DIR} + rm -rf ${LOG_DIR}/* + + printf ">> truncate and migrate database\n" + php artisan migrate:fresh --env=testing --quiet + +printf "### finish preparation ###\n" + +printf "### start tests ###\n" + + SUCCESS=1 + execSuite() { + ${WORKPATH}/../vendor/bin/codecept run ${1} \ + --xml report_${1}.xml ${CODECEPT_OPTIONS} | tee ${LOG_DIR}/tests_${1}.log + if [[ ${PIPESTATUS[0]} -ne 0 ]] + then + SUCCESS=0 + fi + } + + execSuite unit + execSuite functional + + if [[ ${?} -ne 0 ]] + then + SUCCESS=0 + fi + +printf "### finish tests ###\n" + +if [[ ${SUCCESS} -eq 1 ]] +then + printf ">> all tests are \e[01;32mgreen\e[0m\n" + exit 0 +else + printf ">> at least one test is \e[01;31mred\e[0m\n" + exit 1 +fi diff --git a/package.json b/package.json index 103d618f3..dc5c0e6c3 100755 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "resolve-url-loader": "^3.1.0", "sass": "^1.24.5", "sass-loader": "^8.0.2", - "vue": "^2.5.7", + "vue": "^2.6.11", "vue-template-compiler": "^2.6.11" }, "dependencies": { diff --git a/packages/Webkul/Admin/src/DataGrids/AddressDataGrid.php b/packages/Webkul/Admin/src/DataGrids/AddressDataGrid.php index b9db127b1..e41c82191 100644 --- a/packages/Webkul/Admin/src/DataGrids/AddressDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/AddressDataGrid.php @@ -52,7 +52,7 @@ class AddressDataGrid extends DataGrid $queryBuilder = DB::table('customer_addresses as ca') ->leftJoin('countries', 'ca.country', '=', 'countries.code') ->leftJoin('customers as c', 'ca.customer_id', '=', 'c.id') - ->addSelect('ca.id as address_id', 'ca.address1', 'ca.country', DB::raw('' . DB::getTablePrefix() . 'countries.name as country_name'), 'ca.state', 'ca.city', 'ca.postcode', 'ca.phone', 'ca.default_address') + ->addSelect('ca.id as address_id', 'ca.company_name', 'ca.vat_id', 'ca.address1', 'ca.country', DB::raw('' . DB::getTablePrefix() . 'countries.name as country_name'), 'ca.state', 'ca.city', 'ca.postcode', 'ca.phone', 'ca.default_address') ->where('c.id', $customer->id); $queryBuilder = $queryBuilder->leftJoin('country_states', function($qb) { @@ -65,6 +65,8 @@ class AddressDataGrid extends DataGrid ->addSelect(DB::raw(DB::getTablePrefix() . 'country_states.default_name as state_name')); $this->addFilter('address_id', 'ca.id'); + $this->addFilter('company_name', 'ca.company_name'); + $this->addFilter('vat_id', 'ca.vat_id'); $this->addFilter('address1', 'ca.address1'); $this->addFilter('city', 'ca.city'); $this->addFilter('state_name', DB::raw(DB::getTablePrefix() . 'country_states.default_name')); @@ -77,6 +79,7 @@ class AddressDataGrid extends DataGrid public function addColumns() { + $this->addColumn([ 'index' => 'address_id', 'label' => trans('admin::app.customers.addresses.address-id'), @@ -131,6 +134,15 @@ class AddressDataGrid extends DataGrid 'filterable' => true ]); + $this->addColumn([ + 'index' => 'vat_id', + 'label' => trans('admin::app.customers.addresses.vat_id'), + 'type' => 'string', + 'searchable' => true, + 'sortable' => true, + 'filterable' => true + ]); + $this->addColumn([ 'index' => 'default_address', 'label' => trans('admin::app.customers.addresses.default-address'), diff --git a/packages/Webkul/Admin/src/Http/Controllers/Customer/AddressController.php b/packages/Webkul/Admin/src/Http/Controllers/Customer/AddressController.php index 2f89fa8d6..d44921463 100644 --- a/packages/Webkul/Admin/src/Http/Controllers/Customer/AddressController.php +++ b/packages/Webkul/Admin/src/Http/Controllers/Customer/AddressController.php @@ -2,6 +2,7 @@ namespace Webkul\Admin\Http\Controllers\Customer; +use Webkul\Customer\Rules\VatIdRule; use Webkul\Admin\Http\Controllers\Controller; use Webkul\Customer\Repositories\CustomerRepository as Customer; use Webkul\Customer\Repositories\CustomerAddressRepository as CustomerAddress; @@ -20,25 +21,26 @@ class AddressController extends Controller * @var array */ protected $_config; - + /** * Customer Repository object * * @var object - */ + */ protected $customer; - + /** * CustomerAddress Repository object * * @var object - */ + */ protected $customerAddress; - + /** * Create a new controller instance. * - * @param Webkul\Customer\Repositories\CustomerAddressRepository $customerAddress + * @param Webkul\Customer\Repositories\CustomerAddressRepository $customerAddress + * * @return void */ public function __construct( @@ -59,7 +61,7 @@ class AddressController extends Controller * @return Mixed */ public function index($id) - { + { $customer = $this->customer->find($id); return view($this->_config['view'], compact('customer')); @@ -84,20 +86,24 @@ class AddressController extends Controller */ public function store() { - request()->merge(['address1' => implode(PHP_EOL, array_filter(request()->input('address1')))]); + request()->merge([ + 'address1' => implode(PHP_EOL, array_filter(request()->input('address1'))), + ]); $data = collect(request()->input())->except('_token')->toArray(); $this->validate(request(), [ - 'address1' => 'string|required', - 'country' => 'string|required', - 'state' => 'string|required', - 'city' => 'string|required', - 'postcode' => 'required', - 'phone' => 'required' + 'company_name' => 'string', + 'address1' => 'string|required', + 'country' => 'string|required', + 'state' => 'string|required', + 'city' => 'string|required', + 'postcode' => 'required', + 'phone' => 'required', + 'vat_id' => new VatIdRule(), ]); - if ( $this->customerAddress->create($data) ) { + if ($this->customerAddress->create($data)) { session()->flash('success', trans('admin::app.customers.addresses.success-create')); return redirect()->route('admin.customer.addresses.index', ['id' => $data['customer_id']]); @@ -131,19 +137,21 @@ class AddressController extends Controller request()->merge(['address1' => implode(PHP_EOL, array_filter(request()->input('address1')))]); $this->validate(request(), [ - 'address1' => 'string|required', - 'country' => 'string|required', - 'state' => 'string|required', - 'city' => 'string|required', - 'postcode' => 'required', - 'phone' => 'required' + 'company_name' => 'string', + 'address1' => 'string|required', + 'country' => 'string|required', + 'state' => 'string|required', + 'city' => 'string|required', + 'postcode' => 'required', + 'phone' => 'required', + 'vat_id' => new VatIdRule(), ]); $data = collect(request()->input())->except('_token')->toArray(); $address = $this->customerAddress->find($id); - if ( $address ) { + if ($address) { $this->customerAddress->update($data, $id); @@ -157,7 +165,8 @@ class AddressController extends Controller /** * Remove the specified resource from storage. * - * @param int $id + * @param int $id + * * @return \Illuminate\Http\Response */ public function destroy($id) diff --git a/packages/Webkul/Admin/src/Http/Controllers/Customer/CustomerController.php b/packages/Webkul/Admin/src/Http/Controllers/Customer/CustomerController.php index 5c9930e84..20a9a6205 100755 --- a/packages/Webkul/Admin/src/Http/Controllers/Customer/CustomerController.php +++ b/packages/Webkul/Admin/src/Http/Controllers/Customer/CustomerController.php @@ -31,14 +31,14 @@ class CustomerController extends Controller */ protected $customerRepository; - /** + /** * CustomerGroupRepository object * * @var array */ protected $customerGroupRepository; - /** + /** * ChannelRepository object * * @var array @@ -74,13 +74,13 @@ class CustomerController extends Controller * Display a listing of the resource. * * @return \Illuminate\View\View - */ + */ public function index() { return view($this->_config['view']); } - /** + /** * Show the form for creating a new resource. * * @return \Illuminate\View\View @@ -91,10 +91,10 @@ class CustomerController extends Controller $channelName = $this->channelRepository->all(); - return view($this->_config['view'], compact('customerGroup','channelName')); + return view($this->_config['view'], compact('customerGroup', 'channelName')); } - /** + /** * Store a newly created resource in storage. * * @return \Illuminate\Http\Response @@ -102,16 +102,16 @@ class CustomerController extends Controller public function store() { $this->validate(request(), [ - 'first_name' => 'string|required', - 'last_name' => 'string|required', - 'gender' => 'required', - 'email' => 'required|unique:customers,email', - 'date_of_birth' => 'date|before:today' + 'first_name' => 'string|required', + 'last_name' => 'string|required', + 'gender' => 'required', + 'email' => 'required|unique:customers,email', + 'date_of_birth' => 'date|before:today', ]); $data = request()->all(); - $password = rand(100000,10000000); + $password = rand(100000, 10000000); $data['password'] = bcrypt($password); @@ -122,7 +122,7 @@ class CustomerController extends Controller try { Mail::queue(new NewCustomerNotification($customer, $password)); } catch (\Exception $e) { - + report($e); } session()->flash('success', trans('admin::app.response.create-success', ['name' => 'Customer'])); @@ -133,7 +133,8 @@ class CustomerController extends Controller /** * Show the form for editing the specified resource. * - * @param int $id + * @param int $id + * * @return \Illuminate\View\View */ public function edit($id) @@ -147,20 +148,21 @@ class CustomerController extends Controller return view($this->_config['view'], compact('customer', 'customerGroup', 'channelName')); } - /** + /** * Update the specified resource in storage. * - * @param int $id + * @param int $id + * * @return \Illuminate\Http\Response */ public function update($id) { $this->validate(request(), [ - 'first_name' => 'string|required', - 'last_name' => 'string|required', - 'gender' => 'required', - 'email' => 'required|unique:customers,email,'. $id, - 'date_of_birth' => 'date|before:today' + 'first_name' => 'string|required', + 'last_name' => 'string|required', + 'gender' => 'required', + 'email' => 'required|unique:customers,email,' . $id, + 'date_of_birth' => 'date|before:today', ]); $this->customerRepository->update(request()->all(), $id); @@ -173,7 +175,8 @@ class CustomerController extends Controller /** * Remove the specified resource from storage. * - * @param int $id + * @param int $id + * * @return \Illuminate\Http\Response */ public function destroy($id) @@ -186,7 +189,7 @@ class CustomerController extends Controller session()->flash('success', trans('admin::app.response.delete-success', ['name' => 'Customer'])); return response()->json(['message' => true], 200); - } catch(\Exception $e) { + } catch (\Exception $e) { session()->flash('error', trans('admin::app.response.delete-failed', ['name' => 'Customer'])); } @@ -213,13 +216,13 @@ class CustomerController extends Controller public function storeNote() { $this->validate(request(), [ - 'notes' => 'string|nullable' + 'notes' => 'string|nullable', ]); $customer = $this->customerRepository->find(request()->input('_customer')); $noteTaken = $customer->update([ - 'notes' => request()->input('notes') + 'notes' => request()->input('notes'), ]); if ($noteTaken) { @@ -245,7 +248,7 @@ class CustomerController extends Controller $customer = $this->customerRepository->find($customerId); $customer->update([ - 'status' => $updateOption + 'status' => $updateOption, ]); } @@ -265,7 +268,7 @@ class CustomerController extends Controller foreach ($customerIds as $customerId) { $this->customerRepository->deleteWhere([ - 'id' => $customerId + 'id' => $customerId, ]); } diff --git a/packages/Webkul/Admin/src/Listeners/Order.php b/packages/Webkul/Admin/src/Listeners/Order.php index 895c05539..5b8495589 100755 --- a/packages/Webkul/Admin/src/Listeners/Order.php +++ b/packages/Webkul/Admin/src/Listeners/Order.php @@ -10,13 +10,15 @@ use Webkul\Admin\Mail\NewShipmentNotification; use Webkul\Admin\Mail\NewInventorySourceNotification; use Webkul\Admin\Mail\CancelOrderNotification; use Webkul\Admin\Mail\NewRefundNotification; + /** * Order event handler * * @author Jitendra Singh * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) */ -class Order { +class Order +{ /** * @param mixed $order @@ -30,7 +32,7 @@ class Order { Mail::queue(new NewAdminNotification($order)); } catch (\Exception $e) { - + report($e); } } @@ -42,12 +44,13 @@ class Order { public function sendNewInvoiceMail($invoice) { try { - if ($invoice->email_sent) + if ($invoice->email_sent) { return; + } Mail::queue(new NewInvoiceNotification($invoice)); } catch (\Exception $e) { - + report($e); } } @@ -61,7 +64,7 @@ class Order { try { Mail::queue(new NewRefundNotification($refund)); } catch (\Exception $e) { - + report($e); } } @@ -73,25 +76,28 @@ class Order { public function sendNewShipmentMail($shipment) { try { - if ($shipment->email_sent) + if ($shipment->email_sent) { return; + } Mail::queue(new NewShipmentNotification($shipment)); Mail::queue(new NewInventorySourceNotification($shipment)); } catch (\Exception $e) { - + report($e); } } - /* + /** * @param mixed $order - * */ - public function sendCancelOrderMail($order){ - try{ + * + */ + public function sendCancelOrderMail($order) + { + try { Mail::queue(new CancelOrderNotification($order)); - }catch (\Exception $e){ - \Log::error('Error occured when sending email '.$e->getMessage()); + } catch (\Exception $e) { + report($e); } } } \ No newline at end of file diff --git a/packages/Webkul/Admin/src/Resources/lang/en/app.php b/packages/Webkul/Admin/src/Resources/lang/en/app.php index d6be9724c..becd483f0 100755 --- a/packages/Webkul/Admin/src/Resources/lang/en/app.php +++ b/packages/Webkul/Admin/src/Resources/lang/en/app.php @@ -867,6 +867,7 @@ return [ 'addresses' => [ 'title' => ':customer_name\'s Addresses List', + 'vat_id' => 'Vat id', 'create-title' => 'Create Customer\'s Address', 'edit-title' => 'Update Customer\'s Address', 'title-orders' => ':customer_name\'s Orders List', diff --git a/packages/Webkul/Admin/src/Resources/views/catalog/categories/create.blade.php b/packages/Webkul/Admin/src/Resources/views/catalog/categories/create.blade.php index 39c5df661..2642a4591 100755 --- a/packages/Webkul/Admin/src/Resources/views/catalog/categories/create.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/catalog/categories/create.blade.php @@ -39,7 +39,7 @@
- + @{{ errors.first('name') }}
diff --git a/packages/Webkul/Admin/src/Resources/views/catalog/categories/edit.blade.php b/packages/Webkul/Admin/src/Resources/views/catalog/categories/edit.blade.php index d0d3b9e4c..07bcc7809 100755 --- a/packages/Webkul/Admin/src/Resources/views/catalog/categories/edit.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/catalog/categories/edit.blade.php @@ -52,7 +52,7 @@
- + @{{ errors.first('{!!$locale!!}[name]') }}
diff --git a/packages/Webkul/Admin/src/Resources/views/catalog/products/field-types/text.blade.php b/packages/Webkul/Admin/src/Resources/views/catalog/products/field-types/text.blade.php index c6c9520eb..025627a0d 100755 --- a/packages/Webkul/Admin/src/Resources/views/catalog/products/field-types/text.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/catalog/products/field-types/text.blade.php @@ -1 +1,4 @@ -code, ['sku', 'url_key']) ? 'v-slugify' : '' }}/> \ No newline at end of file +code, ['sku', 'url_key']) ? 'v-slugify' : '' }} data-vv-as=""{{ $attribute->admin_name }}"" {{ $attribute->code == 'name' ? 'v-slugify-target=\'url_key\'' : '' }} /> + + + diff --git a/packages/Webkul/Admin/src/Resources/views/customers/addresses/create.blade.php b/packages/Webkul/Admin/src/Resources/views/customers/addresses/create.blade.php index f327a4e48..0b216c13f 100644 --- a/packages/Webkul/Admin/src/Resources/views/customers/addresses/create.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/customers/addresses/create.blade.php @@ -36,6 +36,18 @@
+
+ + + @{{ errors.first('company_name') }} +
+ +
+ + + @{{ errors.first('vat_id') }} +
+
diff --git a/packages/Webkul/Admin/src/Resources/views/customers/addresses/edit.blade.php b/packages/Webkul/Admin/src/Resources/views/customers/addresses/edit.blade.php index 4cc97b69f..30a2e7d62 100644 --- a/packages/Webkul/Admin/src/Resources/views/customers/addresses/edit.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/customers/addresses/edit.blade.php @@ -15,17 +15,17 @@

{{ __('admin::app.customers.addresses.edit-title') }}

- +
- +
@csrf() - + @@ -35,6 +35,18 @@ address1); ?> +
+ + + @{{ errors.first('company_name') }} +
+ +
+ + + @{{ errors.first('vat_id') }} +
+
@@ -51,7 +63,7 @@
- + @{{ errors.first('city') }}
diff --git a/packages/Webkul/Admin/src/Resources/views/settings/locales/create.blade.php b/packages/Webkul/Admin/src/Resources/views/settings/locales/create.blade.php index 4906a56cb..0b59bc960 100755 --- a/packages/Webkul/Admin/src/Resources/views/settings/locales/create.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/settings/locales/create.blade.php @@ -47,8 +47,8 @@
@{{ errors.first('direction') }}
diff --git a/packages/Webkul/Admin/src/Resources/views/settings/locales/edit.blade.php b/packages/Webkul/Admin/src/Resources/views/settings/locales/edit.blade.php index b0fa3a44e..0f65515bb 100755 --- a/packages/Webkul/Admin/src/Resources/views/settings/locales/edit.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/settings/locales/edit.blade.php @@ -51,8 +51,8 @@
@{{ errors.first('direction') }}
diff --git a/packages/Webkul/Attribute/src/Http/Controllers/AttributeController.php b/packages/Webkul/Attribute/src/Http/Controllers/AttributeController.php index d9958c78c..d5230fca4 100755 --- a/packages/Webkul/Attribute/src/Http/Controllers/AttributeController.php +++ b/packages/Webkul/Attribute/src/Http/Controllers/AttributeController.php @@ -167,6 +167,7 @@ class AttributeController extends Controller $this->attributeRepository->delete($value); } } catch (\Exception $e) { + report($e); $suppressFlash = true; continue; diff --git a/packages/Webkul/Attribute/src/Http/Controllers/AttributeFamilyController.php b/packages/Webkul/Attribute/src/Http/Controllers/AttributeFamilyController.php index 272f0848c..377231045 100755 --- a/packages/Webkul/Attribute/src/Http/Controllers/AttributeFamilyController.php +++ b/packages/Webkul/Attribute/src/Http/Controllers/AttributeFamilyController.php @@ -154,7 +154,8 @@ class AttributeFamilyController extends Controller return response()->json(['message' => true], 200); } catch (\Exception $e) { - session()->flash('error', trans( 'admin::app.response.delete-failed', ['name' => 'Family'])); + report($e); + session()->flash('error', trans('admin::app.response.delete-failed', ['name' => 'Family'])); } } @@ -177,16 +178,18 @@ class AttributeFamilyController extends Controller try { $this->attributeFamilyRepository->delete($value); } catch (\Exception $e) { + report($e); $suppressFlash = true; continue; } } - if (! $suppressFlash) + if (!$suppressFlash) { session()->flash('success', ('admin::app.datagrid.mass-ops.delete-success')); - else + } else { session()->flash('info', trans('admin::app.datagrid.mass-ops.partial-action', ['resource' => 'Attribute Family'])); + } return redirect()->back(); } else { diff --git a/packages/Webkul/Attribute/src/Repositories/AttributeRepository.php b/packages/Webkul/Attribute/src/Repositories/AttributeRepository.php index 1f6dffc56..d5d24ba86 100755 --- a/packages/Webkul/Attribute/src/Repositories/AttributeRepository.php +++ b/packages/Webkul/Attribute/src/Repositories/AttributeRepository.php @@ -144,7 +144,7 @@ class AttributeRepository extends Repository $data['value_per_channel'] = $data['value_per_locale'] = 0; } - if (! in_array($data['type'], ['select', 'multiselect', 'price'])) { + if (! in_array($data['type'], ['select', 'multiselect', 'price', 'checkbox'])) { $data['is_filterable'] = 0; } diff --git a/packages/Webkul/CatalogRule/src/Helpers/CatalogRuleIndex.php b/packages/Webkul/CatalogRule/src/Helpers/CatalogRuleIndex.php index fd9b6cc5f..f9887b4d9 100644 --- a/packages/Webkul/CatalogRule/src/Helpers/CatalogRuleIndex.php +++ b/packages/Webkul/CatalogRule/src/Helpers/CatalogRuleIndex.php @@ -65,7 +65,7 @@ class CatalogRuleIndex $this->catalogRuleProductPriceHelper->indexRuleProductPrice(1000); } catch (\Exception $e) { - + report($e); } } @@ -80,7 +80,7 @@ class CatalogRuleIndex try { if (! $product->getTypeInstance()->priceRuleCanBeApplied()) return; - + $productIds = $product->getTypeInstance()->isComposite() ? $product->getTypeInstance()->getChildrenIds() : [$product->id]; @@ -93,7 +93,7 @@ class CatalogRuleIndex $this->catalogRuleProductPriceHelper->indexRuleProductPrice(1000, $product); } catch (\Exception $e) { - + report($e); } } diff --git a/packages/Webkul/Core/src/Database/Migrations/2020_01_02_201029_add_api_token_columns.php b/packages/Webkul/Core/src/Database/Migrations/2020_01_02_201029_add_api_token_columns.php new file mode 100644 index 000000000..b38f3983a --- /dev/null +++ b/packages/Webkul/Core/src/Database/Migrations/2020_01_02_201029_add_api_token_columns.php @@ -0,0 +1,52 @@ +string('api_token', 80) + ->after('password') + ->unique() + ->nullable() + ->default(null); + }); + + Schema::table('admins', function ($table) { + $table + ->string('api_token', 80) + ->after('password') + ->unique() + ->nullable() + ->default(null); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('customers', function (Blueprint $table) { + $table->dropColumn('api_token'); + }); + + Schema::table('admins', function (Blueprint $table) { + $table->dropColumn('api_token'); + }); + } +} diff --git a/packages/Webkul/Core/src/Http/Controllers/CurrencyController.php b/packages/Webkul/Core/src/Http/Controllers/CurrencyController.php index 9f553068f..2d34ece98 100755 --- a/packages/Webkul/Core/src/Http/Controllers/CurrencyController.php +++ b/packages/Webkul/Core/src/Http/Controllers/CurrencyController.php @@ -144,6 +144,7 @@ class CurrencyController extends Controller return response()->json(['message' => true], 200); } catch (\Exception $e) { + report($e); session()->flash('error', trans('admin::app.response.delete-failed', ['name' => 'Currency'])); } } diff --git a/packages/Webkul/Core/src/Http/Controllers/ExchangeRateController.php b/packages/Webkul/Core/src/Http/Controllers/ExchangeRateController.php index cf05243c2..fbf39969a 100755 --- a/packages/Webkul/Core/src/Http/Controllers/ExchangeRateController.php +++ b/packages/Webkul/Core/src/Http/Controllers/ExchangeRateController.php @@ -200,6 +200,7 @@ class ExchangeRateController extends Controller return response()->json(['message' => true], 200); } catch (\Exception $e) { + report($e); session()->flash('error', trans('admin::app.response.delete-error', ['name' => 'Exchange rate'])); } } diff --git a/packages/Webkul/Core/src/Http/Controllers/SubscriptionController.php b/packages/Webkul/Core/src/Http/Controllers/SubscriptionController.php index c5bff4153..cf94dfeba 100755 --- a/packages/Webkul/Core/src/Http/Controllers/SubscriptionController.php +++ b/packages/Webkul/Core/src/Http/Controllers/SubscriptionController.php @@ -104,6 +104,7 @@ class SubscriptionController extends Controller return response()->json(['message' => true], 200); } catch (\Exception $e) { + report($e); session()->flash('error', trans('admin::app.response.delete-failed', ['name' => 'Subscriber'])); } diff --git a/packages/Webkul/Core/src/Providers/CoreServiceProvider.php b/packages/Webkul/Core/src/Providers/CoreServiceProvider.php index 949e565b4..5aa99381a 100755 --- a/packages/Webkul/Core/src/Providers/CoreServiceProvider.php +++ b/packages/Webkul/Core/src/Providers/CoreServiceProvider.php @@ -24,6 +24,8 @@ class CoreServiceProvider extends ServiceProvider $this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations'); + $this->registerEloquentFactoriesFrom(__DIR__ . '/../Database/Factories'); + $this->loadTranslationsFrom(__DIR__ . '/../Resources/lang', 'core'); Validator::extend('slug', 'Webkul\Core\Contracts\Validations\Slug@passes'); @@ -37,8 +39,6 @@ class CoreServiceProvider extends ServiceProvider ]); SliderProxy::observe(SliderObserver::class); - - $this->registerEloquentFactoriesFrom(__DIR__ . '/../Database/Factories'); } /** @@ -50,6 +50,7 @@ class CoreServiceProvider extends ServiceProvider { $this->registerFacades(); } + /** * Register Bouncer as a singleton. * @@ -68,11 +69,12 @@ class CoreServiceProvider extends ServiceProvider /** * Register factories. * - * @param string $path + * @param string $path + * * @return void */ protected function registerEloquentFactoriesFrom($path): void { $this->app->make(EloquentFactory::class)->load($path); } -} \ No newline at end of file +} diff --git a/packages/Webkul/Customer/src/Database/Factories/CustomerAddressFactory.php b/packages/Webkul/Customer/src/Database/Factories/CustomerAddressFactory.php index 37a59c419..e60f5fe88 100644 --- a/packages/Webkul/Customer/src/Database/Factories/CustomerAddressFactory.php +++ b/packages/Webkul/Customer/src/Database/Factories/CustomerAddressFactory.php @@ -7,11 +7,19 @@ use Webkul\Customer\Models\Customer; use Webkul\Customer\Models\CustomerAddress; $factory->define(CustomerAddress::class, function (Faker $faker) { + $now = date("Y-m-d H:i:s"); + + // use an locale from a country in europe so the vat id can be generated + $fakerIt = \Faker\Factory::create('it_IT'); + return [ 'customer_id' => function () { return factory(Customer::class)->create()->id; }, - 'name' => $faker->name, + 'company_name' => $faker->company, + 'vat_id' => $fakerIt->vatId(), + 'first_name' => $faker->firstName, + 'last_name' => $faker->lastName, 'address1' => $faker->streetAddress, 'country' => $faker->countryCode, 'state' => $faker->state, @@ -19,6 +27,8 @@ $factory->define(CustomerAddress::class, function (Faker $faker) { 'postcode' => $faker->postcode, 'phone' => $faker->e164PhoneNumber, 'default_address' => array_random([0, 1]), + 'created_at' => $now, + 'updated_at' => $now, ]; }); diff --git a/packages/Webkul/Customer/src/Database/Factories/CustomerFactory.php b/packages/Webkul/Customer/src/Database/Factories/CustomerFactory.php index 844cf4178..c51af93c6 100644 --- a/packages/Webkul/Customer/src/Database/Factories/CustomerFactory.php +++ b/packages/Webkul/Customer/src/Database/Factories/CustomerFactory.php @@ -32,5 +32,3 @@ $factory->state(Customer::class, 'male', [ $factory->state(Customer::class, 'female', [ 'gender' => 'Female', ]); - - diff --git a/packages/Webkul/Customer/src/Database/Migrations/2020_01_10_151902_customer_address_improvements.php b/packages/Webkul/Customer/src/Database/Migrations/2020_01_10_151902_customer_address_improvements.php new file mode 100644 index 000000000..16b1766b6 --- /dev/null +++ b/packages/Webkul/Customer/src/Database/Migrations/2020_01_10_151902_customer_address_improvements.php @@ -0,0 +1,44 @@ +string('company_name')->nullable()->after('customer_id'); + $table->string('vat_id')->nullable()->after('company_name'); + }); + + Schema::table('orders', function (Blueprint $table) { + $table->string('customer_company_name')->nullable()->after('customer_last_name'); + $table->string('customer_vat_id')->nullable()->after('customer_company_name'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('customer_addresses', function (Blueprint $table) { + $table->dropColumn('company_name'); + $table->dropColumn('vat_id'); + }); + + Schema::table('orders', function (Blueprint $table) { + $table->dropColumn('customer_company_name'); + $table->dropColumn('customer_vat_id'); + }); + } +} diff --git a/packages/Webkul/Customer/src/Database/Migrations/2020_01_28_102422_add_new_column_and_rename_name_column_in_customer_addresses_table.php b/packages/Webkul/Customer/src/Database/Migrations/2020_01_28_102422_add_new_column_and_rename_name_column_in_customer_addresses_table.php new file mode 100644 index 000000000..21931d6f8 --- /dev/null +++ b/packages/Webkul/Customer/src/Database/Migrations/2020_01_28_102422_add_new_column_and_rename_name_column_in_customer_addresses_table.php @@ -0,0 +1,36 @@ +renameColumn('name', 'first_name')->nullable(); + }); + + Schema::table('customer_addresses', function (Blueprint $table) { + $table->string('last_name')->after('first_name')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('customer_addresses', function (Blueprint $table) { + // + }); + } +} diff --git a/packages/Webkul/Customer/src/Http/Controllers/AddressController.php b/packages/Webkul/Customer/src/Http/Controllers/AddressController.php index 63580b940..0f3124e95 100755 --- a/packages/Webkul/Customer/src/Http/Controllers/AddressController.php +++ b/packages/Webkul/Customer/src/Http/Controllers/AddressController.php @@ -5,6 +5,7 @@ namespace Webkul\Customer\Http\Controllers; use Illuminate\Http\Request; use Illuminate\Http\Response; use Webkul\Customer\Repositories\CustomerAddressRepository; +use Webkul\Customer\Rules\VatIdRule; use Auth; /** @@ -77,15 +78,19 @@ class AddressController extends Controller $data = collect(request()->input())->except('_token')->toArray(); $this->validate(request(), [ - 'address1' => 'string|required', - 'country' => 'string|required', - 'state' => 'string|required', - 'city' => 'string|required', - 'postcode' => 'required', - 'phone' => 'required', + 'company_name' => 'string', + 'address1' => 'string|required', + 'country' => 'string|required', + 'state' => 'string|required', + 'city' => 'string|required', + 'postcode' => 'required', + 'phone' => 'required', + 'vat_id' => new VatIdRule(), ]); $cust_id['customer_id'] = $this->customer->id; + $cust_id['first_name'] = $this->customer->first_name; + $cust_id['last_name'] = $this->customer->last_name; $data = array_merge($cust_id, $data); if ($this->customer->addresses->count() == 0) { @@ -136,12 +141,14 @@ class AddressController extends Controller request()->merge(['address1' => implode(PHP_EOL, array_filter(request()->input('address1')))]); $this->validate(request(), [ - 'address1' => 'string|required', - 'country' => 'string|required', - 'state' => 'string|required', - 'city' => 'string|required', - 'postcode' => 'required', - 'phone' => 'required', + 'company_name' => 'string', + 'address1' => 'string|required', + 'country' => 'string|required', + 'state' => 'string|required', + 'city' => 'string|required', + 'postcode' => 'required', + 'phone' => 'required', + 'vat_id' => new VatIdRule(), ]); $data = collect(request()->input())->except('_token')->toArray(); diff --git a/packages/Webkul/Customer/src/Http/Controllers/CustomerController.php b/packages/Webkul/Customer/src/Http/Controllers/CustomerController.php index e1e50d0b4..614e4d1e7 100755 --- a/packages/Webkul/Customer/src/Http/Controllers/CustomerController.php +++ b/packages/Webkul/Customer/src/Http/Controllers/CustomerController.php @@ -10,7 +10,7 @@ use Webkul\Product\Repositories\ProductReviewRepository; * Customer controlller for the customer basically for the tasks of customers which will be * done after customer authentication. * - * @author Prashant Singh + * @author Prashant Singh * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) */ class CustomerController extends Controller @@ -26,23 +26,24 @@ class CustomerController extends Controller * CustomerRepository object * * @var Object - */ + */ protected $customerRepository; /** * ProductReviewRepository object * * @var array - */ + */ protected $productReviewRepository; /** * Create a new controller instance. * - * @param \Webkul\Customer\Repositories\CustomerRepository $customer - * @param \Webkul\Product\Repositories\ProductReviewRepository $productReview + * @param \Webkul\Customer\Repositories\CustomerRepository $customer + * @param \Webkul\Product\Repositories\ProductReviewRepository $productReview + * * @return void - */ + */ public function __construct(CustomerRepository $customerRepository, ProductReviewRepository $productReviewRepository) { $this->middleware('customer'); @@ -88,31 +89,34 @@ class CustomerController extends Controller $id = auth()->guard('customer')->user()->id; $this->validate(request(), [ - 'first_name' => 'string', - 'last_name' => 'string', - 'gender' => 'required', - 'date_of_birth' => 'date|before:today', - 'email' => 'email|unique:customers,email,'.$id, - 'password' => 'confirmed|min:6|required_with:oldpassword', - 'oldpassword' => 'required_with:password', + 'first_name' => 'string', + 'last_name' => 'string', + 'gender' => 'required', + 'date_of_birth' => 'date|before:today', + 'email' => 'email|unique:customers,email,' . $id, + 'password' => 'confirmed|min:6|required_with:oldpassword', + 'oldpassword' => 'required_with:password', 'password_confirmation' => 'required_with:password', ]); $data = collect(request()->input())->except('_token')->toArray(); - if ($data['date_of_birth'] == "") + if (isset ($data['date_of_birth']) && $data['date_of_birth'] == "") { unset($data['date_of_birth']); + } - if ($data['oldpassword'] != "" || $data['oldpassword'] != null) { - if(Hash::check($data['oldpassword'], auth()->guard('customer')->user()->password)) { - $data['password'] = bcrypt($data['password']); + if (isset ($data['oldpassword'])) { + if ($data['oldpassword'] != "" || $data['oldpassword'] != null) { + if (Hash::check($data['oldpassword'], auth()->guard('customer')->user()->password)) { + $data['password'] = bcrypt($data['password']); + } else { + session()->flash('warning', trans('shop::app.customer.account.profile.unmatch')); + + return redirect()->back(); + } } else { - session()->flash('warning', trans('shop::app.customer.account.profile.unmatch')); - - return redirect()->back(); + unset($data['password']); } - } else { - unset($data['password']); } if ($this->customerRepository->update($data, $id)) { @@ -129,7 +133,8 @@ class CustomerController extends Controller /** * Remove the specified resource from storage. * - * @param int $id + * @param int $id + * * @return \Illuminate\Http\Response */ public function destroy($id) @@ -160,7 +165,7 @@ class CustomerController extends Controller return redirect()->back(); } - } catch(\Exception $e) { + } catch (\Exception $e) { session()->flash('error', trans('admin::app.response.delete-failed', ['name' => 'Customer'])); return redirect()->route($this->_config['redirect']); diff --git a/packages/Webkul/Customer/src/Http/Controllers/ForgotPasswordController.php b/packages/Webkul/Customer/src/Http/Controllers/ForgotPasswordController.php index 9c7c9333b..1519b71d7 100755 --- a/packages/Webkul/Customer/src/Http/Controllers/ForgotPasswordController.php +++ b/packages/Webkul/Customer/src/Http/Controllers/ForgotPasswordController.php @@ -71,6 +71,7 @@ class ForgotPasswordController extends Controller ['email' => trans($response)] ); } catch (\Exception $e) { + report($e); session()->flash('error', trans($e->getMessage())); return redirect()->back(); diff --git a/packages/Webkul/Customer/src/Http/Controllers/RegistrationController.php b/packages/Webkul/Customer/src/Http/Controllers/RegistrationController.php index 7d33eb61b..4acecaee3 100755 --- a/packages/Webkul/Customer/src/Http/Controllers/RegistrationController.php +++ b/packages/Webkul/Customer/src/Http/Controllers/RegistrationController.php @@ -2,6 +2,8 @@ namespace Webkul\Customer\Http\Controllers; +use Illuminate\Support\Str; +use Illuminate\Support\Facades\Hash; use Illuminate\Support\Facades\Event; use Illuminate\Support\Facades\Mail; use Webkul\Customer\Mail\RegistrationEmail; @@ -85,6 +87,7 @@ class RegistrationController extends Controller $data = request()->input(); $data['password'] = bcrypt($data['password']); + $data['api_token'] = Str::random(80); if (core()->getConfigData('customer.settings.email.verification')) { $data['is_verified'] = 0; @@ -111,18 +114,19 @@ class RegistrationController extends Controller session()->flash('success', trans('shop::app.customer.signup-form.success-verify')); } catch (\Exception $e) { + report($e); session()->flash('info', trans('shop::app.customer.signup-form.success-verify-email-unsent')); } } else { - try { + try { Mail::queue(new RegistrationEmail(request()->all())); session()->flash('success', trans('shop::app.customer.signup-form.success-verify')); //customer registered successfully } catch (\Exception $e) { + report($e); session()->flash('info', trans('shop::app.customer.signup-form.success-verify-email-unsent')); } - session()->flash('success', trans('shop::app.customer.signup-form.success')); } @@ -174,6 +178,7 @@ class RegistrationController extends Controller \Cookie::queue(\Cookie::forget('email-for-resend')); } } catch (\Exception $e) { + report($e); session()->flash('error', trans('shop::app.customer.signup-form.verification-not-sent')); return redirect()->back(); diff --git a/packages/Webkul/Customer/src/Http/Controllers/WishlistController.php b/packages/Webkul/Customer/src/Http/Controllers/WishlistController.php index cfdf37c34..48f0e543f 100755 --- a/packages/Webkul/Customer/src/Http/Controllers/WishlistController.php +++ b/packages/Webkul/Customer/src/Http/Controllers/WishlistController.php @@ -172,6 +172,7 @@ class WishlistController extends Controller return redirect()->back(); } catch (\Exception $e) { + report($e); session()->flash('warning', $e->getMessage()); return redirect()->route('shop.productOrCategory.index', $wishlistItem->product->url_key); diff --git a/packages/Webkul/Customer/src/Models/Customer.php b/packages/Webkul/Customer/src/Models/Customer.php index 6e653ca53..c9f4d194c 100755 --- a/packages/Webkul/Customer/src/Models/Customer.php +++ b/packages/Webkul/Customer/src/Models/Customer.php @@ -17,9 +17,9 @@ class Customer extends Authenticatable implements CustomerContract, JWTSubject protected $table = 'customers'; - protected $fillable = ['first_name', 'last_name', 'gender', 'date_of_birth', 'email', 'phone', 'password', 'customer_group_id', 'subscribed_to_news_letter', 'is_verified', 'token', 'notes', 'status']; + protected $fillable = ['first_name', 'last_name', 'gender', 'date_of_birth', 'email', 'phone', 'password', 'api_token', 'customer_group_id', 'subscribed_to_news_letter', 'is_verified', 'token', 'notes', 'status']; - protected $hidden = ['password', 'remember_token']; + protected $hidden = ['password', 'api_token', 'remember_token']; /** * Get the customer full name. diff --git a/packages/Webkul/Customer/src/Models/CustomerAddress.php b/packages/Webkul/Customer/src/Models/CustomerAddress.php index f40fe6caa..b1f49e447 100755 --- a/packages/Webkul/Customer/src/Models/CustomerAddress.php +++ b/packages/Webkul/Customer/src/Models/CustomerAddress.php @@ -1,4 +1,5 @@ first_name . ' ' . $this->last_name; + } } diff --git a/packages/Webkul/Customer/src/Repositories/CustomerAddressRepository.php b/packages/Webkul/Customer/src/Repositories/CustomerAddressRepository.php index cb515af94..30798eeef 100755 --- a/packages/Webkul/Customer/src/Repositories/CustomerAddressRepository.php +++ b/packages/Webkul/Customer/src/Repositories/CustomerAddressRepository.php @@ -6,12 +6,11 @@ use Webkul\Core\Eloquent\Repository; use Illuminate\Support\Facades\Event; /** - * Customer Reposotory + * Customer Repository * * @author Prashant Singh * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) */ - class CustomerAddressRepository extends Repository { /** @@ -27,21 +26,20 @@ class CustomerAddressRepository extends Repository /** * @param array $data + * * @return mixed */ public function create(array $data) { Event::dispatch('customer.addresses.create.before'); - if ( isset($data['default_address']) ) { - $data['default_address'] = 1; - } else { - $data['default_address'] = 0; - } + $data['default_address'] = isset($data['default_address']) ? 1 : 0; - $default_address = $this->findWhere(['customer_id' => $data['customer_id'], 'default_address' => 1])->first(); + $default_address = $this + ->findWhere(['customer_id' => $data['customer_id'], 'default_address' => 1]) + ->first(); - if ( isset($default_address->id) && $data['default_address'] ) { + if (isset($default_address->id) && $data['default_address']) { $default_address->update(['default_address' => 0]); } @@ -54,7 +52,8 @@ class CustomerAddressRepository extends Repository /** * @param array $data - * @param $id + * @param $id + * * @return mixed */ public function update(array $data, $id) @@ -63,16 +62,14 @@ class CustomerAddressRepository extends Repository Event::dispatch('customer.addresses.update.before', $id); - if (isset($data['default_address']) ) { - $data['default_address'] = 1; - } else { - $data['default_address'] = 0; - } + $data['default_address'] = isset($data['default_address']) ? 1 : 0; - $default_address = $this->findWhere(['customer_id' => $address->customer_id, 'default_address' => 1])->first(); + $default_address = $this + ->findWhere(['customer_id' => $address->customer_id, 'default_address' => 1]) + ->first(); - if ( isset($default_address->id) && $data['default_address'] ) { - if ( $default_address->id != $address->id ) { + if (isset($default_address->id) && $data['default_address']) { + if ($default_address->id != $address->id) { $default_address->update(['default_address' => 0]); } $address->update($data); diff --git a/packages/Webkul/Customer/src/Rules/VatIdRule.php b/packages/Webkul/Customer/src/Rules/VatIdRule.php new file mode 100644 index 000000000..5967002a5 --- /dev/null +++ b/packages/Webkul/Customer/src/Rules/VatIdRule.php @@ -0,0 +1,42 @@ +validate($value); + } + + /** + * Get the validation error message. + * + * @return string + */ + public function message() + { + return trans('shop::app.invalid_vat_format'); + } +} diff --git a/packages/Webkul/Customer/src/Rules/VatValidator.php b/packages/Webkul/Customer/src/Rules/VatValidator.php new file mode 100644 index 000000000..92245f08b --- /dev/null +++ b/packages/Webkul/Customer/src/Rules/VatValidator.php @@ -0,0 +1,95 @@ + 'U[A-Z\d]{8}', + 'BE' => '(0\d{9}|\d{10})', + 'BG' => '\d{9,10}', + 'CY' => '\d{8}[A-Z]', + 'CZ' => '\d{8,10}', + 'DE' => '\d{9}', + 'DK' => '(\d{2} ?){3}\d{2}', + 'EE' => '\d{9}', + 'EL' => '\d{9}', + 'ES' => '[A-Z]\d{7}[A-Z]|\d{8}[A-Z]|[A-Z]\d{8}', + 'FI' => '\d{8}', + 'FR' => '([A-Z]{2}|\d{2})\d{9}', + 'GB' => '\d{9}|\d{12}|(GD|HA)\d{3}', + 'HR' => '\d{11}', + 'HU' => '\d{8}', + 'IE' => '[A-Z\d]{8}|[A-Z\d]{9}', + 'IT' => '\d{11}', + 'LT' => '(\d{9}|\d{12})', + 'LU' => '\d{8}', + 'LV' => '\d{11}', + 'MT' => '\d{8}', + 'NL' => '\d{9}B\d{2}', + 'PL' => '\d{10}', + 'PT' => '\d{9}', + 'RO' => '\d{2,10}', + 'SE' => '\d{12}', + 'SI' => '\d{8}', + 'SK' => '\d{10}', + ); + + /** + * Validate a VAT number format. + * + * @param string $vatNumber + * + * @return boolean + */ + public function validate(string $vatNumber): bool + { + $vatNumber = $this->vatCleaner($vatNumber); + list($country, $number) = $this->splitVat($vatNumber); + + if (! isset(self::$pattern_expression[$country])) { + return false; + } + + return preg_match('/^' . self::$pattern_expression[$country] . '$/', $number) > 0; + } + + /** + * @param string $vatNumber + * + * @return string + */ + private function vatCleaner(string $vatNumber): string + { + $vatNumber_no_spaces = trim($vatNumber); + return strtoupper($vatNumber_no_spaces); + } + + /** + * @param string $vatNumber + * + * @return array + */ + private function splitVat(string $vatNumber): array + { + return [ + substr($vatNumber, 0, 2), + substr($vatNumber, 2), + ]; + } +} diff --git a/packages/Webkul/Inventory/src/Http/Controllers/InventorySourceController.php b/packages/Webkul/Inventory/src/Http/Controllers/InventorySourceController.php index a01730c56..7279cfbe1 100755 --- a/packages/Webkul/Inventory/src/Http/Controllers/InventorySourceController.php +++ b/packages/Webkul/Inventory/src/Http/Controllers/InventorySourceController.php @@ -168,6 +168,7 @@ class InventorySourceController extends Controller return response()->json(['message' => true], 200); } catch (\Exception $e) { + report($e); session()->flash('error', trans('admin::app.response.delete-failed', ['name' => 'Inventory source'])); } } diff --git a/packages/Webkul/Payment/src/Config/paymentmethods.php b/packages/Webkul/Payment/src/Config/paymentmethods.php index 864751d7a..5f5b6433c 100755 --- a/packages/Webkul/Payment/src/Config/paymentmethods.php +++ b/packages/Webkul/Payment/src/Config/paymentmethods.php @@ -3,7 +3,7 @@ return [ 'cashondelivery' => [ 'code' => 'cashondelivery', 'title' => 'Cash On Delivery', - 'description' => 'shop::app.checkout.onepage.cash-desc', + 'description' => 'Cash On Delivery', 'class' => 'Webkul\Payment\Payment\CashOnDelivery', 'active' => true, 'sort' => 1 @@ -12,7 +12,7 @@ return [ 'moneytransfer' => [ 'code' => 'moneytransfer', 'title' => 'Money Transfer', - 'description' => 'shop::app.checkout.onepage.money-desc', + 'description' => 'Money Transfer', 'class' => 'Webkul\Payment\Payment\MoneyTransfer', 'active' => true, 'sort' => 2 @@ -21,7 +21,7 @@ return [ 'paypal_standard' => [ 'code' => 'paypal_standard', 'title' => 'Paypal Standard', - 'description' => 'shop::app.checkout.onepage.paypal-desc', + 'description' => 'Paypal Standard', 'class' => 'Webkul\Paypal\Payment\Standard', 'sandbox' => true, 'active' => true, diff --git a/packages/Webkul/Product/src/Helpers/BundleOption.php b/packages/Webkul/Product/src/Helpers/BundleOption.php index b3232ad36..396a83a6e 100644 --- a/packages/Webkul/Product/src/Helpers/BundleOption.php +++ b/packages/Webkul/Product/src/Helpers/BundleOption.php @@ -45,6 +45,14 @@ class BundleOption extends AbstractProduct $options[$option->id] = $this->getOptionItemData($option); } + usort ($options, function($a, $b) { + if ($a['sort_order'] == $b['sort_order']) { + return 0; + } + + return ($a['sort_order'] < $b['sort_order']) ? -1 : 1; + }); + return $options; } @@ -68,7 +76,7 @@ class BundleOption extends AbstractProduct /** * Get formed data from bundle option product - * + * * @param ProductBundleOption $option * @return array */ @@ -83,10 +91,19 @@ class BundleOption extends AbstractProduct 'price' => $bundleOptionProduct->product->getTypeInstance()->getProductPrices(), 'name' => $bundleOptionProduct->product->name, 'product_id' => $bundleOptionProduct->product_id, - 'is_default' => $bundleOptionProduct->is_default + 'is_default' => $bundleOptionProduct->is_default, + 'sort_order' => $bundleOptionProduct->sort_order ]; } + usort ($products, function($a, $b) { + if ($a['sort_order'] == $b['sort_order']) { + return 0; + } + + return ($a['sort_order'] < $b['sort_order']) ? -1 : 1; + }); + return $products; } } \ No newline at end of file diff --git a/packages/Webkul/Product/src/Http/Controllers/ProductController.php b/packages/Webkul/Product/src/Http/Controllers/ProductController.php index 67174f16f..e910a2ae0 100755 --- a/packages/Webkul/Product/src/Http/Controllers/ProductController.php +++ b/packages/Webkul/Product/src/Http/Controllers/ProductController.php @@ -245,6 +245,7 @@ class ProductController extends Controller return response()->json(['message' => true], 200); } catch (\Exception $e) { + report($e); session()->flash('error', trans('admin::app.response.delete-failed', ['name' => 'Product'])); } diff --git a/packages/Webkul/Product/src/Http/Controllers/ReviewController.php b/packages/Webkul/Product/src/Http/Controllers/ReviewController.php index 10f51d987..c0dae2e10 100755 --- a/packages/Webkul/Product/src/Http/Controllers/ReviewController.php +++ b/packages/Webkul/Product/src/Http/Controllers/ReviewController.php @@ -105,6 +105,7 @@ class ReviewController extends Controller return response()->json(['message' => true], 200); } catch (\Exception $e) { + report($e); session()->flash('success', trans('admin::app.response.delete-failed', ['name' => 'Review'])); } diff --git a/packages/Webkul/Product/src/Http/Requests/ProductForm.php b/packages/Webkul/Product/src/Http/Requests/ProductForm.php index 7304c2f82..3cb33842d 100755 --- a/packages/Webkul/Product/src/Http/Requests/ProductForm.php +++ b/packages/Webkul/Product/src/Http/Requests/ProductForm.php @@ -74,7 +74,8 @@ class ProductForm extends FormRequest 'sku' => ['required', 'unique:products,sku,' . $this->id, new \Webkul\Core\Contracts\Validations\Slug], 'images.*' => 'mimes:jpeg,jpg,bmp,png', 'special_price_from' => 'nullable|date', - 'special_price_to' => 'nullable|date|after_or_equal:special_price_from' + 'special_price_to' => 'nullable|date|after_or_equal:special_price_from', + 'special_price' => ['nullable', new \Webkul\Core\Contracts\Validations\Decimal, 'lt:price'] ]); foreach ($product->getEditableAttributes() as $attribute) { diff --git a/packages/Webkul/Product/src/Repositories/ProductBundleOptionProductRepository.php b/packages/Webkul/Product/src/Repositories/ProductBundleOptionProductRepository.php index a05bc7415..ae9f172ce 100644 --- a/packages/Webkul/Product/src/Repositories/ProductBundleOptionProductRepository.php +++ b/packages/Webkul/Product/src/Repositories/ProductBundleOptionProductRepository.php @@ -68,7 +68,7 @@ class ProductBundleOptionProductRepository extends Repository } } - if (! $haveIsDefaulFlag) + if (! $haveIsDefaulFlag && $data['is_required']) $data['products'][key($data['products'])]['is_default'] = 1; } } \ No newline at end of file diff --git a/packages/Webkul/Product/src/Type/Bundle.php b/packages/Webkul/Product/src/Type/Bundle.php index 42bd1f2bb..ea8d8ffad 100644 --- a/packages/Webkul/Product/src/Type/Bundle.php +++ b/packages/Webkul/Product/src/Type/Bundle.php @@ -523,7 +523,7 @@ class Bundle extends AbstractType */ public function getAdditionalOptions($data) { - $bundleOptionQuantities = $data['bundle_option_qty']; + $bundleOptionQuantities = $data['bundle_option_qty'] ?? []; foreach ($data['bundle_options'] as $optionId => $optionProductIds) { $option = $this->productBundleOptionRepository->find($optionId); @@ -535,12 +535,12 @@ class Bundle extends AbstractType continue; $optionProduct = $this->productBundleOptionProductRepository->find($optionProductId); - + $qty = $data['bundle_option_qty'][$optionId] ?? $optionProduct->qty; if (! isset($data['bundle_option_qty'][$optionId])) $bundleOptionQuantities[$optionId] = $qty; - + $labels[] = $qty . ' x ' . $optionProduct->product->name . ' ' . core()->currency($optionProduct->product->getTypeInstance()->getMinimalPrice()); } diff --git a/packages/Webkul/Sales/src/Models/Order.php b/packages/Webkul/Sales/src/Models/Order.php index acf280a90..62842a218 100755 --- a/packages/Webkul/Sales/src/Models/Order.php +++ b/packages/Webkul/Sales/src/Models/Order.php @@ -7,16 +7,26 @@ use Webkul\Sales\Contracts\Order as OrderContract; class Order extends Model implements OrderContract { - protected $guarded = ['id', 'items', 'shipping_address', 'billing_address', 'customer', 'channel', 'payment', 'created_at', 'updated_at']; + protected $guarded = [ + 'id', + 'items', + 'shipping_address', + 'billing_address', + 'customer', + 'channel', + 'payment', + 'created_at', + 'updated_at', + ]; protected $statusLabel = [ - 'pending' => 'Pending', + 'pending' => 'Pending', 'pending_payment' => 'Pending Payment', - 'processing' => 'Processing', - 'completed' => 'Completed', - 'canceled' => 'Canceled', - 'closed' => 'Closed', - 'fraud' => 'Fraud' + 'processing' => 'Processing', + 'completed' => 'Completed', + 'canceled' => 'Canceled', + 'closed' => 'Closed', + 'fraud' => 'Fraud', ]; /** @@ -90,7 +100,7 @@ class Order extends Model implements OrderContract { return $this->hasMany(RefundProxy::modelClass()); } - + /** * Get the customer record associated with the order. */ @@ -193,12 +203,12 @@ class Order extends Model implements OrderContract { if ($this->status == 'fraud') return false; - + foreach ($this->items as $item) { if ($item->canInvoice()) return true; } - + return false; } @@ -209,7 +219,7 @@ class Order extends Model implements OrderContract { if ($this->status == 'fraud') return false; - + foreach ($this->items as $item) { if ($item->canCancel()) return true; @@ -225,7 +235,7 @@ class Order extends Model implements OrderContract { if ($this->status == 'fraud') return false; - + foreach ($this->items as $item) { if ($item->qty_to_refund > 0) return true; diff --git a/packages/Webkul/Shop/src/Database/Migrations/2019_11_21_194608_add_stored_function_to_get_url_path_of_category.php b/packages/Webkul/Shop/src/Database/Migrations/2019_11_21_194608_add_stored_function_to_get_url_path_of_category.php index 72d995819..b84ecfadf 100644 --- a/packages/Webkul/Shop/src/Database/Migrations/2019_11_21_194608_add_stored_function_to_get_url_path_of_category.php +++ b/packages/Webkul/Shop/src/Database/Migrations/2019_11_21_194608_add_stored_function_to_get_url_path_of_category.php @@ -12,6 +12,8 @@ class AddStoredFunctionToGetUrlPathOfCategory extends Migration */ public function up() { + $dbPrefix = DB::getTablePrefix(); + $functionSQL = <<< SQL DROP FUNCTION IF EXISTS `get_url_path_of_category`; CREATE FUNCTION get_url_path_of_category( @@ -21,7 +23,7 @@ class AddStoredFunctionToGetUrlPathOfCategory extends Migration RETURNS VARCHAR(255) DETERMINISTIC BEGIN - + DECLARE urlPath VARCHAR(255); -- Category with id 1 is root by default IF categoryId <> 1 @@ -29,9 +31,9 @@ class AddStoredFunctionToGetUrlPathOfCategory extends Migration SELECT GROUP_CONCAT(parent_translations.slug SEPARATOR '/') INTO urlPath FROM - categories AS node, - categories AS parent - JOIN category_translations AS parent_translations ON parent.id = parent_translations.category_id + ${dbPrefix}categories AS node, + ${dbPrefix}categories AS parent + JOIN ${dbPrefix}category_translations AS parent_translations ON parent.id = parent_translations.category_id WHERE node._lft >= parent._lft AND node._rgt <= parent._rgt @@ -40,15 +42,15 @@ class AddStoredFunctionToGetUrlPathOfCategory extends Migration AND parent_translations.locale = localeCode GROUP BY node.id; - + IF urlPath IS NULL THEN - SET urlPath = (SELECT slug FROM category_translations WHERE category_translations.category_id = categoryId); + SET urlPath = (SELECT slug FROM ${dbPrefix}category_translations WHERE ${dbPrefix}category_translations.category_id = categoryId); END IF; ELSE SET urlPath = ''; END IF; - + RETURN urlPath; END; SQL; diff --git a/packages/Webkul/Shop/src/Database/Migrations/2019_11_21_194627_add_trigger_to_category_translations.php b/packages/Webkul/Shop/src/Database/Migrations/2019_11_21_194627_add_trigger_to_category_translations.php index b62a6133f..b85455a8f 100644 --- a/packages/Webkul/Shop/src/Database/Migrations/2019_11_21_194627_add_trigger_to_category_translations.php +++ b/packages/Webkul/Shop/src/Database/Migrations/2019_11_21_194627_add_trigger_to_category_translations.php @@ -2,6 +2,7 @@ use Illuminate\Support\Facades\DB; use Illuminate\Database\Migrations\Migration; +use Webkul\Category\Models\CategoryTranslation; class AddTriggerToCategoryTranslations extends Migration { @@ -15,11 +16,13 @@ class AddTriggerToCategoryTranslations extends Migration */ public function up() { + $dbPrefix = DB::getTablePrefix(); + $triggerBody = $this->getTriggerBody(); $insertTrigger = <<< SQL CREATE TRIGGER %s - BEFORE INSERT ON category_translations - FOR EACH ROW + BEFORE INSERT ON ${dbPrefix}category_translations + FOR EACH ROW BEGIN $triggerBody END; @@ -27,8 +30,8 @@ SQL; $updateTrigger = <<< SQL CREATE TRIGGER %s - BEFORE UPDATE ON category_translations - FOR EACH ROW + BEFORE UPDATE ON ${dbPrefix}category_translations + FOR EACH ROW BEGIN $triggerBody END; @@ -59,20 +62,22 @@ SQL; */ private function getTriggerBody() { + $dbPrefix = DB::getTablePrefix(); + return << 1 THEN - + SELECT GROUP_CONCAT(parent_translations.slug SEPARATOR '/') INTO parentUrlPath FROM - categories AS node, - categories AS parent - JOIN category_translations AS parent_translations ON parent.id = parent_translations.category_id + ${dbPrefix}categories AS node, + ${dbPrefix}categories AS parent + JOIN ${dbPrefix}category_translations AS parent_translations ON parent.id = parent_translations.category_id WHERE node._lft >= parent._lft AND node._rgt <= parent._rgt @@ -81,16 +86,16 @@ SQL; AND parent_translations.locale = NEW.locale GROUP BY node.id; - - IF parentUrlPath IS NULL + + IF parentUrlPath IS NULL THEN SET urlPath = NEW.slug; ELSE SET urlPath = concat(parentUrlPath, '/', NEW.slug); END IF; - + SET NEW.url_path = urlPath; - + END IF; SQL; diff --git a/packages/Webkul/Shop/src/Database/Migrations/2019_11_21_194703_add_trigger_to_categories.php b/packages/Webkul/Shop/src/Database/Migrations/2019_11_21_194703_add_trigger_to_categories.php index f58739d75..206f4c02b 100644 --- a/packages/Webkul/Shop/src/Database/Migrations/2019_11_21_194703_add_trigger_to_categories.php +++ b/packages/Webkul/Shop/src/Database/Migrations/2019_11_21_194703_add_trigger_to_categories.php @@ -16,10 +16,11 @@ class AddTriggerToCategories extends Migration public function up() { $triggerBody = $this->getTriggerBody(); + $dbPrefix = DB::getTablePrefix(); $insertTrigger = <<< SQL - CREATE TRIGGER %s - AFTER INSERT ON categories + CREATE TRIGGER %s + AFTER INSERT ON ${dbPrefix}categories FOR EACH ROW BEGIN $triggerBody @@ -27,8 +28,8 @@ class AddTriggerToCategories extends Migration SQL; $updateTrigger = <<< SQL - CREATE TRIGGER %s - AFTER UPDATE ON categories + CREATE TRIGGER %s + AFTER UPDATE ON ${dbPrefix}categories FOR EACH ROW BEGIN $triggerBody @@ -60,39 +61,41 @@ SQL; */ private function getTriggerBody(): string { + $dbPrefix = DB::getTablePrefix(); + return <<< SQL DECLARE urlPath VARCHAR(255); DECLARE localeCode VARCHAR(255); DECLARE done INT; - DECLARE curs CURSOR FOR (SELECT category_translations.locale - FROM category_translations + DECLARE curs CURSOR FOR (SELECT ${dbPrefix}category_translations.locale + FROM ${dbPrefix}category_translations WHERE category_id = NEW.id); DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = 1; - + IF EXISTS ( SELECT * - FROM category_translations + FROM ${dbPrefix}category_translations WHERE category_id = NEW.id ) THEN - + OPEN curs; - + SET done = 0; - REPEAT + REPEAT FETCH curs INTO localeCode; - + SELECT get_url_path_of_category(NEW.id, localeCode) INTO urlPath; - - UPDATE category_translations - SET url_path = urlPath - WHERE category_translations.category_id = NEW.id; - + + UPDATE ${dbPrefix}category_translations + SET url_path = urlPath + WHERE ${dbPrefix}category_translations.category_id = NEW.id; + UNTIL done END REPEAT; - + CLOSE curs; - + END IF; SQL; } diff --git a/packages/Webkul/Shop/src/Database/Migrations/2020_01_06_173505_alter_trigger_category_translations.php b/packages/Webkul/Shop/src/Database/Migrations/2020_01_06_173505_alter_trigger_category_translations.php index 1bb0ca0bb..52f043433 100644 --- a/packages/Webkul/Shop/src/Database/Migrations/2020_01_06_173505_alter_trigger_category_translations.php +++ b/packages/Webkul/Shop/src/Database/Migrations/2020_01_06_173505_alter_trigger_category_translations.php @@ -16,10 +16,12 @@ class AlterTriggerCategoryTranslations extends Migration public function up() { $triggerBody = $this->getTriggerBody(); + $dbPrefix = DB::getTablePrefix(); + $insertTrigger = <<< SQL CREATE TRIGGER %s - BEFORE INSERT ON category_translations - FOR EACH ROW + BEFORE INSERT ON ${dbPrefix}category_translations + FOR EACH ROW BEGIN $triggerBody END; @@ -27,8 +29,8 @@ SQL; $updateTrigger = <<< SQL CREATE TRIGGER %s - BEFORE UPDATE ON category_translations - FOR EACH ROW + BEFORE UPDATE ON ${dbPrefix}category_translations + FOR EACH ROW BEGIN $triggerBody END; @@ -66,44 +68,46 @@ SQL; */ private function getTriggerBody() { + $dbPrefix = DB::getTablePrefix(); + return <<= parent._lft AND node._rgt <= parent._rgt - AND node.id = (SELECT parent_id FROM categories WHERE id = NEW.category_id) - AND node.parent_id IS NOT NULL + AND node.id = (SELECT parent_id FROM ${dbPrefix}categories WHERE id = NEW.category_id) + AND node.parent_id IS NOT NULL AND parent.parent_id IS NOT NULL AND parent_translations.locale = NEW.locale GROUP BY node.id; - - IF parentUrlPath IS NULL + + IF parentUrlPath IS NULL THEN SET urlPath = NEW.slug; ELSE SET urlPath = concat(parentUrlPath, '/', NEW.slug); END IF; - + SET NEW.url_path = urlPath; - + END IF; SQL; diff --git a/packages/Webkul/Shop/src/Database/Migrations/2020_01_06_173524_alter_stored_function_url_path_category.php b/packages/Webkul/Shop/src/Database/Migrations/2020_01_06_173524_alter_stored_function_url_path_category.php index fc4714e62..84c7d1135 100644 --- a/packages/Webkul/Shop/src/Database/Migrations/2020_01_06_173524_alter_stored_function_url_path_category.php +++ b/packages/Webkul/Shop/src/Database/Migrations/2020_01_06_173524_alter_stored_function_url_path_category.php @@ -12,6 +12,8 @@ class AlterStoredFunctionUrlPathCategory extends Migration */ public function up() { + $dbPrefix = DB::getTablePrefix(); + $functionSQL = <<< SQL DROP FUNCTION IF EXISTS `get_url_path_of_category`; CREATE FUNCTION get_url_path_of_category( @@ -21,12 +23,12 @@ class AlterStoredFunctionUrlPathCategory extends Migration RETURNS VARCHAR(255) DETERMINISTIC BEGIN - + DECLARE urlPath VARCHAR(255); - + IF NOT EXISTS ( - SELECT id - FROM categories + SELECT id + FROM ${dbPrefix}categories WHERE id = categoryId AND parent_id IS NULL @@ -35,9 +37,9 @@ class AlterStoredFunctionUrlPathCategory extends Migration SELECT GROUP_CONCAT(parent_translations.slug SEPARATOR '/') INTO urlPath FROM - categories AS node, - categories AS parent - JOIN category_translations AS parent_translations ON parent.id = parent_translations.category_id + ${dbPrefix}categories AS node, + ${dbPrefix}categories AS parent + JOIN ${dbPrefix}category_translations AS parent_translations ON parent.id = parent_translations.category_id WHERE node._lft >= parent._lft AND node._rgt <= parent._rgt @@ -47,15 +49,15 @@ class AlterStoredFunctionUrlPathCategory extends Migration AND parent_translations.locale = localeCode GROUP BY node.id; - + IF urlPath IS NULL THEN - SET urlPath = (SELECT slug FROM category_translations WHERE category_translations.category_id = categoryId); + SET urlPath = (SELECT slug FROM ${dbPrefix}category_translations WHERE ${dbPrefix}category_translations.category_id = categoryId); END IF; ELSE SET urlPath = ''; END IF; - + RETURN urlPath; END; SQL; diff --git a/packages/Webkul/Shop/src/Database/Migrations/2020_01_06_195305_alter_trigger_on_categories.php b/packages/Webkul/Shop/src/Database/Migrations/2020_01_06_195305_alter_trigger_on_categories.php index 0131109a7..61722e334 100644 --- a/packages/Webkul/Shop/src/Database/Migrations/2020_01_06_195305_alter_trigger_on_categories.php +++ b/packages/Webkul/Shop/src/Database/Migrations/2020_01_06_195305_alter_trigger_on_categories.php @@ -18,10 +18,11 @@ class AlterTriggerOnCategories extends Migration public function up() { $triggerBody = $this->getTriggerBody(); + $dbPrefix = DB::getTablePrefix(); $insertTrigger = <<< SQL - CREATE TRIGGER %s - AFTER INSERT ON categories + CREATE TRIGGER %s + AFTER INSERT ON ${dbPrefix}categories FOR EACH ROW BEGIN $triggerBody @@ -29,8 +30,8 @@ class AlterTriggerOnCategories extends Migration SQL; $updateTrigger = <<< SQL - CREATE TRIGGER %s - AFTER UPDATE ON categories + CREATE TRIGGER %s + AFTER UPDATE ON ${dbPrefix}categories FOR EACH ROW BEGIN $triggerBody @@ -68,46 +69,48 @@ SQL; */ private function getTriggerBody(): string { + $dbPrefix = DB::getTablePrefix(); + return <<< SQL DECLARE urlPath VARCHAR(255); DECLARE localeCode VARCHAR(255); DECLARE done INT; - DECLARE curs CURSOR FOR (SELECT category_translations.locale - FROM category_translations + DECLARE curs CURSOR FOR (SELECT ${dbPrefix}category_translations.locale + FROM ${dbPrefix}category_translations WHERE category_id = NEW.id); DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = 1; - + IF EXISTS ( SELECT * - FROM category_translations + FROM ${dbPrefix}category_translations WHERE category_id = NEW.id ) THEN - + OPEN curs; - + SET done = 0; - REPEAT + REPEAT FETCH curs INTO localeCode; - + SELECT get_url_path_of_category(NEW.id, localeCode) INTO urlPath; - - IF NEW.parent_id IS NULL + + IF NEW.parent_id IS NULL THEN SET urlPath = ''; END IF; - - UPDATE category_translations - SET url_path = urlPath - WHERE - category_translations.category_id = NEW.id - AND category_translations.locale = localeCode; - + + UPDATE ${dbPrefix}category_translations + SET url_path = urlPath + WHERE + ${dbPrefix}category_translations.category_id = NEW.id + AND ${dbPrefix}category_translations.locale = localeCode; + UNTIL done END REPEAT; - + CLOSE curs; - + END IF; SQL; } diff --git a/packages/Webkul/Shop/src/Http/Controllers/CartController.php b/packages/Webkul/Shop/src/Http/Controllers/CartController.php index 1ca8d90f1..0c6de7e32 100755 --- a/packages/Webkul/Shop/src/Http/Controllers/CartController.php +++ b/packages/Webkul/Shop/src/Http/Controllers/CartController.php @@ -182,6 +182,8 @@ class CartController extends Controller 'message' => trans('shop::app.checkout.total.invalid-coupon') ]); } catch (\Exception $e) { + report($e); + return response()->json([ 'success' => false, 'message' => trans('shop::app.checkout.total.coupon-apply-issue') diff --git a/packages/Webkul/Shop/src/Http/Controllers/SubscriptionController.php b/packages/Webkul/Shop/src/Http/Controllers/SubscriptionController.php index b05a93674..1c75a192a 100755 --- a/packages/Webkul/Shop/src/Http/Controllers/SubscriptionController.php +++ b/packages/Webkul/Shop/src/Http/Controllers/SubscriptionController.php @@ -75,6 +75,7 @@ class SubscriptionController extends Controller session()->flash('success', trans('shop::app.subscription.subscribed')); } catch (\Exception $e) { + report($e); session()->flash('error', trans('shop::app.subscription.not-subscribed')); $mailSent = false; diff --git a/packages/Webkul/Shop/src/Resources/lang/en/app.php b/packages/Webkul/Shop/src/Resources/lang/en/app.php index f4800949c..887c470dd 100755 --- a/packages/Webkul/Shop/src/Resources/lang/en/app.php +++ b/packages/Webkul/Shop/src/Resources/lang/en/app.php @@ -1,6 +1,7 @@ 'The given vat id has a wrong format', 'security-warning' => 'Suspicious activity found!!!', 'nothing-to-delete' => 'Nothing to delete', @@ -219,6 +220,10 @@ return [ 'create' => [ 'page-title' => 'Add Address Form', + 'company_name' => 'Company name', + 'first_name' => 'First name', + 'last_name' => 'Last name', + 'vat_id' => 'Vat id', 'title' => 'Add Address', 'street-address' => 'Street Address', 'country' => 'Country', @@ -234,6 +239,10 @@ return [ 'edit' => [ 'page-title' => 'Edit Address', + 'company_name' => 'Company name', + 'first_name' => 'First name', + 'last_name' => 'Last name', + 'vat_id' => 'Vat id', 'title' => 'Edit Address', 'street-address' => 'Street Address', 'submit' => 'Save Address', diff --git a/packages/Webkul/Shop/src/Resources/views/customers/account/address/create.blade.php b/packages/Webkul/Shop/src/Resources/views/customers/account/address/create.blade.php index 99b8948ae..980c84ae2 100755 --- a/packages/Webkul/Shop/src/Resources/views/customers/account/address/create.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/customers/account/address/create.blade.php @@ -19,13 +19,32 @@ {!! view_render_event('bagisto.shop.customers.account.address.create.before') !!} -
+ @endsection @push('scripts') @endpush diff --git a/packages/Webkul/Shop/src/Resources/views/layouts/footer/footer.blade.php b/packages/Webkul/Shop/src/Resources/views/layouts/footer/footer.blade.php index fd541a7e9..9585429a2 100755 --- a/packages/Webkul/Shop/src/Resources/views/layouts/footer/footer.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/layouts/footer/footer.blade.php @@ -42,13 +42,10 @@ @endif input('term'); - foreach($searchTerm as $term){ - if (strpos($term, 'term') !== false) { - $serachQuery = $term; - } + if (! is_null($term)) { + $serachQuery = 'term='.request()->input('term'); } ?> diff --git a/packages/Webkul/Shop/src/Resources/views/layouts/header/index.blade.php b/packages/Webkul/Shop/src/Resources/views/layouts/header/index.blade.php index a97e90ddc..a707597e5 100755 --- a/packages/Webkul/Shop/src/Resources/views/layouts/header/index.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/layouts/header/index.blade.php @@ -29,13 +29,10 @@
input('term'); - foreach($searchTerm as $term){ - if (strpos($term, 'term') !== false) { - $serachQuery = $term; - } + if (! is_null($term)) { + $serachQuery = 'term='.request()->input('term'); } ?> diff --git a/packages/Webkul/Shop/src/Resources/views/products/view/bundle-options.blade.php b/packages/Webkul/Shop/src/Resources/views/products/view/bundle-options.blade.php index cd7d13fbd..8b2f4b521 100644 --- a/packages/Webkul/Shop/src/Resources/views/products/view/bundle-options.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/products/view/bundle-options.blade.php @@ -182,7 +182,7 @@ data: function() { return { selected_product: (this.option.type == 'checkbox' || this.option.type == 'multiselect') ? [] : null, - + qty_validations: '' } }, diff --git a/packages/Webkul/Tax/src/Http/Controllers/TaxRateController.php b/packages/Webkul/Tax/src/Http/Controllers/TaxRateController.php index 0e321a40e..e54c7f56b 100755 --- a/packages/Webkul/Tax/src/Http/Controllers/TaxRateController.php +++ b/packages/Webkul/Tax/src/Http/Controllers/TaxRateController.php @@ -282,6 +282,7 @@ class TaxRateController extends Controller } } } catch (\Exception $e) { + report($e); $failure = new Failure(1, 'rows', [0 => trans('admin::app.export.enough-row-error')]); session()->flash('error', $failure->errors()[0]); diff --git a/packages/Webkul/Ui/package.json b/packages/Webkul/Ui/package.json index 5afcb9705..8d9956da7 100755 --- a/packages/Webkul/Ui/package.json +++ b/packages/Webkul/Ui/package.json @@ -16,7 +16,10 @@ "jquery": "^3.4.1", "laravel-mix": "^5.0.0", "laravel-mix-merge-manifest": "^0.1.2", - "vue": "^2.6.10" + "sass": "^1.24.4", + "sass-loader": "^8.0.2", + "vue": "^2.6.10", + "vue-template-compiler": "^2.6.11" }, "dependencies": { "@babel/polyfill": "^7.7.0", diff --git a/packages/Webkul/Ui/publishable/assets/js/ui.js b/packages/Webkul/Ui/publishable/assets/js/ui.js index dedd23f01..9793fb9c7 100644 --- a/packages/Webkul/Ui/publishable/assets/js/ui.js +++ b/packages/Webkul/Ui/publishable/assets/js/ui.js @@ -1,2 +1,2 @@ /*! For license information please see ui.js.LICENSE */ -!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s=0)}({"+Xmh":function(t,e,n){n("jm62"),t.exports=n("g3g5").Object.getOwnPropertyDescriptors},"+auO":function(t,e,n){var r=n("XKFU"),i=n("lvtm");r(r.S,"Math",{cbrt:function(t){return i(t=+t)*Math.pow(Math.abs(t),1/3)}})},"+lvF":function(t,e,n){t.exports=n("VTer")("native-function-to-string",Function.toString)},"+oPb":function(t,e,n){"use strict";n("OGtf")("blink",(function(t){return function(){return t(this,"blink","","")}}))},"+rLv":function(t,e,n){var r=n("dyZX").document;t.exports=r&&r.documentElement},"/8Fb":function(t,e,n){var r=n("XKFU"),i=n("UExd")(!0);r(r.S,"Object",{entries:function(t){return i(t)}})},"/KAi":function(t,e,n){var r=n("XKFU"),i=n("dyZX").isFinite;r(r.S,"Number",{isFinite:function(t){return"number"==typeof t&&i(t)}})},"/SS/":function(t,e,n){var r=n("XKFU");r(r.S,"Object",{setPrototypeOf:n("i5dc").set})},"/e88":function(t,e){t.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},0:function(t,e,n){n("uPOf"),n("qg2B"),t.exports=n("w/dW")},"0/R4":function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},"0E+W":function(t,e,n){n("elZq")("Array")},"0LDn":function(t,e,n){"use strict";n("OGtf")("italics",(function(t){return function(){return t(this,"i","","")}}))},"0YWM":function(t,e,n){var r=n("EemH"),i=n("OP3Y"),o=n("aagx"),a=n("XKFU"),s=n("0/R4"),c=n("y3w9");a(a.S,"Reflect",{get:function t(e,n){var a,u,l=arguments.length<3?e:arguments[2];return c(e)===l?e[n]:(a=r.f(e,n))?o(a,"value")?a.value:void 0!==a.get?a.get.call(l):void 0:s(u=i(e))?t(u,n,l):void 0}})},"0l/t":function(t,e,n){"use strict";var r=n("XKFU"),i=n("CkkT")(2);r(r.P+r.F*!n("LyE8")([].filter,!0),"Array",{filter:function(t){return i(this,t,arguments[1])}})},"0mN4":function(t,e,n){"use strict";n("OGtf")("fixed",(function(t){return function(){return t(this,"tt","","")}}))},"0sh+":function(t,e,n){var r=n("quPj"),i=n("vhPU");t.exports=function(t,e,n){if(r(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(i(t))}},"11IZ":function(t,e,n){var r=n("dyZX").parseFloat,i=n("qncB").trim;t.exports=1/r(n("/e88")+"-0")!=-1/0?function(t){var e=i(String(t),3),n=r(e);return 0===n&&"-"==e.charAt(0)?-0:n}:r},"1MBn":function(t,e,n){var r=n("DVgA"),i=n("JiEa"),o=n("UqcF");t.exports=function(t){var e=r(t),n=i.f;if(n)for(var a,s=n(t),c=o.f,u=0;s.length>u;)c.call(t,a=s[u++])&&e.push(a);return e}},"1TsA":function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},"1sa7":function(t,e){t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:Math.log(1+t)}},"25dN":function(t,e,n){var r=n("XKFU");r(r.S,"Object",{is:n("g6HL")})},"2GTP":function(t,e,n){var r=n("eaoh");t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},"2OiF":function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},"2Spj":function(t,e,n){var r=n("XKFU");r(r.P,"Function",{bind:n("8MEG")})},"2atp":function(t,e,n){var r=n("XKFU"),i=Math.atanh;r(r.S+r.F*!(i&&1/i(-0)<0),"Math",{atanh:function(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}})},"2faE":function(t,e,n){var r=n("5K7Z"),i=n("eUtF"),o=n("G8Mo"),a=Object.defineProperty;e.f=n("jmDH")?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},"3Lyj":function(t,e,n){var r=n("KroJ");t.exports=function(t,e,n){for(var i in e)r(t,i,e[i],n);return t}},"3xty":function(t,e,n){var r=n("XKFU"),i=n("2OiF"),o=n("y3w9"),a=(n("dyZX").Reflect||{}).apply,s=Function.apply;r(r.S+r.F*!n("eeVq")((function(){a((function(){}))})),"Reflect",{apply:function(t,e,n){var r=i(t),c=o(n);return a?a(r,e,c):s.call(r,e,c)}})},"4LiD":function(t,e,n){"use strict";var r=n("dyZX"),i=n("XKFU"),o=n("KroJ"),a=n("3Lyj"),s=n("Z6vF"),c=n("SlkY"),u=n("9gX7"),l=n("0/R4"),f=n("eeVq"),p=n("XMVh"),d=n("fyDq"),h=n("Xbzi");t.exports=function(t,e,n,g,v,m){var y=r[t],b=y,w=v?"set":"add",x=b&&b.prototype,_={},k=function(t){var e=x[t];o(x,t,"delete"==t?function(t){return!(m&&!l(t))&&e.call(this,0===t?0:t)}:"has"==t?function(t){return!(m&&!l(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return m&&!l(t)?void 0:e.call(this,0===t?0:t)}:"add"==t?function(t){return e.call(this,0===t?0:t),this}:function(t,n){return e.call(this,0===t?0:t,n),this})};if("function"==typeof b&&(m||x.forEach&&!f((function(){(new b).entries().next()})))){var S=new b,C=S[w](m?{}:-0,1)!=S,E=f((function(){S.has(1)})),F=p((function(t){new b(t)})),D=!m&&f((function(){for(var t=new b,e=5;e--;)t[w](e,e);return!t.has(-0)}));F||((b=e((function(e,n){u(e,b,t);var r=h(new y,e,b);return null!=n&&c(n,v,r[w],r),r}))).prototype=x,x.constructor=b),(E||D)&&(k("delete"),k("has"),v&&k("get")),(D||C)&&k(w),m&&x.clear&&delete x.clear}else b=g.getConstructor(e,t,v,w),a(b.prototype,n),s.NEED=!0;return d(b,t),_[t]=b,i(i.G+i.W+i.F*(b!=y),_),m||g.setStrong(b,t,v),b}},"4R4u":function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},"55Il":function(t,e,n){"use strict";n("g2aq");var r,i=(r=n("VsWn"))&&r.__esModule?r:{default:r};i.default._babelPolyfill&&"undefined"!=typeof console&&console.warn&&console.warn("@babel/polyfill is loaded more than once on this page. This is probably not desirable/intended and may have consequences if different versions of the polyfills are applied sequentially. If you do need to load the polyfill more than once, use @babel/polyfill/noConflict instead to bypass the warning."),i.default._babelPolyfill=!0},"5K7Z":function(t,e,n){var r=n("93I4");t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},"5Pf0":function(t,e,n){var r=n("S/j/"),i=n("OP3Y");n("Xtr8")("getPrototypeOf",(function(){return function(t){return i(r(t))}}))},"5T2Y":function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},"5gfu":function(t,e,n){var r=n("IsTG");"string"==typeof r&&(r=[[t.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n("aET+")(r,i);r.locals&&(t.exports=r.locals)},"694e":function(t,e,n){var r=n("EemH"),i=n("XKFU"),o=n("y3w9");i(i.S,"Reflect",{getOwnPropertyDescriptor:function(t,e){return r.f(o(t),e)}})},"69bn":function(t,e,n){var r=n("y3w9"),i=n("2OiF"),o=n("K0xU")("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||null==(n=r(a)[o])?e:i(n)}},"6AQ9":function(t,e,n){"use strict";var r=n("XKFU"),i=n("8a7r");r(r.S+r.F*n("eeVq")((function(){function t(){}return!(Array.of.call(t)instanceof t)})),"Array",{of:function(){for(var t=0,e=arguments.length,n=new("function"==typeof this?this:Array)(e);e>t;)i(n,t,arguments[t++]);return n.length=e,n}})},"6FMO":function(t,e,n){var r=n("0/R4"),i=n("EWmC"),o=n("K0xU")("species");t.exports=function(t){var e;return i(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!i(e.prototype)||(e=void 0),r(e)&&null===(e=e[o])&&(e=void 0)),void 0===e?Array:e}},"6VaU":function(t,e,n){"use strict";var r=n("XKFU"),i=n("xF/b"),o=n("S/j/"),a=n("ne8i"),s=n("2OiF"),c=n("zRwo");r(r.P,"Array",{flatMap:function(t){var e,n,r=o(this);return s(t),e=a(r.length),n=c(r,0),i(n,r,r,e,0,1,t,arguments[1]),n}}),n("nGyu")("flatMap")},"7DDg":function(t,e,n){"use strict";if(n("nh4g")){var r=n("LQAc"),i=n("dyZX"),o=n("eeVq"),a=n("XKFU"),s=n("D4iV"),c=n("7Qtz"),u=n("m0Pp"),l=n("9gX7"),f=n("RjD/"),p=n("Mukb"),d=n("3Lyj"),h=n("RYi7"),g=n("ne8i"),v=n("Cfrj"),m=n("d/Gc"),y=n("apmT"),b=n("aagx"),w=n("I8a+"),x=n("0/R4"),_=n("S/j/"),k=n("M6Qj"),S=n("Kuth"),C=n("OP3Y"),E=n("kJMx").f,F=n("J+6e"),D=n("ylqs"),M=n("K0xU"),O=n("CkkT"),T=n("w2a5"),P=n("69bn"),I=n("yt8O"),A=n("hPIQ"),j=n("XMVh"),L=n("elZq"),R=n("Nr18"),N=n("upKx"),U=n("hswa"),V=n("EemH"),B=U.f,K=V.f,X=i.RangeError,z=i.TypeError,Y=i.Uint8Array,q=Array.prototype,W=c.ArrayBuffer,H=c.DataView,$=O(0),G=O(2),Z=O(3),J=O(4),Q=O(5),tt=O(6),et=T(!0),nt=T(!1),rt=I.values,it=I.keys,ot=I.entries,at=q.lastIndexOf,st=q.reduce,ct=q.reduceRight,ut=q.join,lt=q.sort,ft=q.slice,pt=q.toString,dt=q.toLocaleString,ht=M("iterator"),gt=M("toStringTag"),vt=D("typed_constructor"),mt=D("def_constructor"),yt=s.CONSTR,bt=s.TYPED,wt=s.VIEW,xt=O(1,(function(t,e){return Et(P(t,t[mt]),e)})),_t=o((function(){return 1===new Y(new Uint16Array([1]).buffer)[0]})),kt=!!Y&&!!Y.prototype.set&&o((function(){new Y(1).set({})})),St=function(t,e){var n=h(t);if(n<0||n%e)throw X("Wrong offset!");return n},Ct=function(t){if(x(t)&&bt in t)return t;throw z(t+" is not a typed array!")},Et=function(t,e){if(!(x(t)&&vt in t))throw z("It is not a typed array constructor!");return new t(e)},Ft=function(t,e){return Dt(P(t,t[mt]),e)},Dt=function(t,e){for(var n=0,r=e.length,i=Et(t,r);r>n;)i[n]=e[n++];return i},Mt=function(t,e,n){B(t,e,{get:function(){return this._d[n]}})},Ot=function(t){var e,n,r,i,o,a,s=_(t),c=arguments.length,l=c>1?arguments[1]:void 0,f=void 0!==l,p=F(s);if(null!=p&&!k(p)){for(a=p.call(s),r=[],e=0;!(o=a.next()).done;e++)r.push(o.value);s=r}for(f&&c>2&&(l=u(l,arguments[2],2)),e=0,n=g(s.length),i=Et(this,n);n>e;e++)i[e]=f?l(s[e],e):s[e];return i},Tt=function(){for(var t=0,e=arguments.length,n=Et(this,e);e>t;)n[t]=arguments[t++];return n},Pt=!!Y&&o((function(){dt.call(new Y(1))})),It=function(){return dt.apply(Pt?ft.call(Ct(this)):Ct(this),arguments)},At={copyWithin:function(t,e){return N.call(Ct(this),t,e,arguments.length>2?arguments[2]:void 0)},every:function(t){return J(Ct(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return R.apply(Ct(this),arguments)},filter:function(t){return Ft(this,G(Ct(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return Q(Ct(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return tt(Ct(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){$(Ct(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return nt(Ct(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return et(Ct(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return ut.apply(Ct(this),arguments)},lastIndexOf:function(t){return at.apply(Ct(this),arguments)},map:function(t){return xt(Ct(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return st.apply(Ct(this),arguments)},reduceRight:function(t){return ct.apply(Ct(this),arguments)},reverse:function(){for(var t,e=Ct(this).length,n=Math.floor(e/2),r=0;r1?arguments[1]:void 0)},sort:function(t){return lt.call(Ct(this),t)},subarray:function(t,e){var n=Ct(this),r=n.length,i=m(t,r);return new(P(n,n[mt]))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,g((void 0===e?r:m(e,r))-i))}},jt=function(t,e){return Ft(this,ft.call(Ct(this),t,e))},Lt=function(t){Ct(this);var e=St(arguments[1],1),n=this.length,r=_(t),i=g(r.length),o=0;if(i+e>n)throw X("Wrong length!");for(;o255?255:255&r),i.v[d](n*e+i.o,r,_t)}(this,n,t)},enumerable:!0})};b?(h=n((function(t,n,r,i){l(t,h,u,"_d");var o,a,s,c,f=0,d=0;if(x(n)){if(!(n instanceof W||"ArrayBuffer"==(c=w(n))||"SharedArrayBuffer"==c))return bt in n?Dt(h,n):Ot.call(h,n);o=n,d=St(r,e);var m=n.byteLength;if(void 0===i){if(m%e)throw X("Wrong length!");if((a=m-d)<0)throw X("Wrong length!")}else if((a=g(i)*e)+d>m)throw X("Wrong length!");s=a/e}else s=v(n),o=new W(a=s*e);for(p(t,"_d",{b:o,o:d,l:a,e:s,v:new H(o)});f>1,l=23===e?F(2,-24)-F(2,-77):0,f=0,p=t<0||0===t&&1/t<0?1:0;for((t=E(t))!=t||t===S?(i=t!=t?1:0,r=c):(r=D(M(t)/O),t*(o=F(2,-r))<1&&(r--,o*=2),(t+=r+u>=1?l/o:l*F(2,1-u))*o>=2&&(r++,o/=2),r+u>=c?(i=0,r=c):r+u>=1?(i=(t*o-1)*F(2,e),r+=u):(i=t*F(2,u-1)*F(2,e),r=0));e>=8;a[f++]=255&i,i/=256,e-=8);for(r=r<0;a[f++]=255&r,r/=256,s-=8);return a[--f]|=128*p,a}function j(t,e,n){var r,i=8*n-e-1,o=(1<>1,s=i-7,c=n-1,u=t[c--],l=127&u;for(u>>=7;s>0;l=256*l+t[c],c--,s-=8);for(r=l&(1<<-s)-1,l>>=-s,s+=e;s>0;r=256*r+t[c],c--,s-=8);if(0===l)l=1-a;else{if(l===o)return r?NaN:u?-S:S;r+=F(2,e),l-=a}return(u?-1:1)*r*F(2,l-e)}function L(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]}function R(t){return[255&t]}function N(t){return[255&t,t>>8&255]}function U(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function V(t){return A(t,52,8)}function B(t){return A(t,23,4)}function K(t,e,n){g(t[y],e,{get:function(){return this[n]}})}function X(t,e,n,r){var i=d(+n);if(i+e>t[P])throw k(b);var o=t[T]._b,a=i+t[I],s=o.slice(a,a+e);return r?s:s.reverse()}function z(t,e,n,r,i,o){var a=d(+n);if(a+e>t[P])throw k(b);for(var s=t[T]._b,c=a+t[I],u=r(+i),l=0;lH;)(Y=W[H++])in w||s(w,Y,C[Y]);o||(q.constructor=w)}var $=new x(new w(2)),G=x[y].setInt8;$.setInt8(0,2147483648),$.setInt8(1,2147483649),!$.getInt8(0)&&$.getInt8(1)||c(x[y],{setInt8:function(t,e){G.call(this,t,e<<24>>24)},setUint8:function(t,e){G.call(this,t,e<<24>>24)}},!0)}else w=function(t){l(this,w,"ArrayBuffer");var e=d(t);this._b=v.call(new Array(e),0),this[P]=e},x=function(t,e,n){l(this,x,"DataView"),l(t,w,"DataView");var r=t[P],i=f(e);if(i<0||i>r)throw k("Wrong offset!");if(i+(n=void 0===n?r-i:p(n))>r)throw k("Wrong length!");this[T]=t,this[I]=i,this[P]=n},i&&(K(w,"byteLength","_l"),K(x,"buffer","_b"),K(x,"byteLength","_l"),K(x,"byteOffset","_o")),c(x[y],{getInt8:function(t){return X(this,1,t)[0]<<24>>24},getUint8:function(t){return X(this,1,t)[0]},getInt16:function(t){var e=X(this,2,t,arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=X(this,2,t,arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return L(X(this,4,t,arguments[1]))},getUint32:function(t){return L(X(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return j(X(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return j(X(this,8,t,arguments[1]),52,8)},setInt8:function(t,e){z(this,1,t,R,e)},setUint8:function(t,e){z(this,1,t,R,e)},setInt16:function(t,e){z(this,2,t,N,e,arguments[2])},setUint16:function(t,e){z(this,2,t,N,e,arguments[2])},setInt32:function(t,e){z(this,4,t,U,e,arguments[2])},setUint32:function(t,e){z(this,4,t,U,e,arguments[2])},setFloat32:function(t,e){z(this,4,t,B,e,arguments[2])},setFloat64:function(t,e){z(this,8,t,V,e,arguments[2])}});m(w,"ArrayBuffer"),m(x,"DataView"),s(x[y],a.VIEW,!0),e.ArrayBuffer=w,e.DataView=x},"7VC1":function(t,e,n){"use strict";var r=n("XKFU"),i=n("Lgjv"),o=n("ol8x"),a=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o);r(r.P+r.F*a,"String",{padEnd:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!1)}})},"7h0T":function(t,e,n){var r=n("XKFU");r(r.S,"Number",{isNaN:function(t){return t!=t}})},"8+KV":function(t,e,n){"use strict";var r=n("XKFU"),i=n("CkkT")(0),o=n("LyE8")([].forEach,!0);r(r.P+r.F*!o,"Array",{forEach:function(t){return i(this,t,arguments[1])}})},"84bF":function(t,e,n){"use strict";n("OGtf")("small",(function(t){return function(){return t(this,"small","","")}}))},"8MEG":function(t,e,n){"use strict";var r=n("2OiF"),i=n("0/R4"),o=n("MfQN"),a=[].slice,s={},c=function(t,e,n){if(!(e in s)){for(var r=[],i=0;i0?arguments[0]:void 0)}}),{get:function(t){var e=r.getEntry(i(this,"Map"),t);return e&&e.v},set:function(t,e){return r.def(i(this,"Map"),0===t?0:t,e)}},r,!0)},"9P93":function(t,e,n){var r=n("XKFU"),i=Math.imul;r(r.S+r.F*n("eeVq")((function(){return-5!=i(4294967295,5)||2!=i.length})),"Math",{imul:function(t,e){var n=+t,r=+e,i=65535&n,o=65535&r;return 0|i*o+((65535&n>>>16)*o+i*(65535&r>>>16)<<16>>>0)}})},"9VmF":function(t,e,n){"use strict";var r=n("XKFU"),i=n("ne8i"),o=n("0sh+"),a="".startsWith;r(r.P+r.F*n("UUeW")("startsWith"),"String",{startsWith:function(t){var e=o(this,t,"startsWith"),n=i(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return a?a.call(e,r,n):e.slice(n,n+r.length)===r}})},"9XZr":function(t,e,n){"use strict";var r=n("XKFU"),i=n("Lgjv"),o=n("ol8x"),a=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o);r(r.P+r.F*a,"String",{padStart:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!0)}})},"9gX7":function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},"9rMk":function(t,e,n){var r=n("XKFU");r(r.S,"Reflect",{has:function(t,e){return e in t}})},"9tPo":function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var n=e.protocol+"//"+e.host,r=n+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(t,e){var i,o=e.trim().replace(/^"(.*)"$/,(function(t,e){return e})).replace(/^'(.*)'$/,(function(t,e){return e}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(o)?t:(i=0===o.indexOf("//")?o:0===o.indexOf("/")?n+o:r+o.replace(/^\.\//,""),"url("+JSON.stringify(i)+")")}))}},A2zW:function(t,e,n){"use strict";var r=n("XKFU"),i=n("RYi7"),o=n("vvmO"),a=n("l0Rn"),s=1..toFixed,c=Math.floor,u=[0,0,0,0,0,0],l="Number.toFixed: incorrect invocation!",f=function(t,e){for(var n=-1,r=e;++n<6;)r+=t*u[n],u[n]=r%1e7,r=c(r/1e7)},p=function(t){for(var e=6,n=0;--e>=0;)n+=u[e],u[e]=c(n/t),n=n%t*1e7},d=function(){for(var t=6,e="";--t>=0;)if(""!==e||0===t||0!==u[t]){var n=String(u[t]);e=""===e?n:e+a.call("0",7-n.length)+n}return e},h=function(t,e,n){return 0===e?n:e%2==1?h(t,e-1,n*t):h(t*t,e/2,n)};r(r.P+r.F*(!!s&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n("eeVq")((function(){s.call({})}))),"Number",{toFixed:function(t){var e,n,r,s,c=o(this,l),u=i(t),g="",v="0";if(u<0||u>20)throw RangeError(l);if(c!=c)return"NaN";if(c<=-1e21||c>=1e21)return String(c);if(c<0&&(g="-",c=-c),c>1e-21)if(n=(e=function(t){for(var e=0,n=t;n>=4096;)e+=12,n/=4096;for(;n>=2;)e+=1,n/=2;return e}(c*h(2,69,1))-69)<0?c*h(2,-e,1):c/h(2,e,1),n*=4503599627370496,(e=52-e)>0){for(f(0,n),r=u;r>=7;)f(1e7,0),r-=7;for(f(h(10,r,1),0),r=e-1;r>=23;)p(1<<23),r-=23;p(1<0?g+((s=v.length)<=u?"0."+a.call("0",u-s)+v:v.slice(0,s-u)+"."+v.slice(s-u)):g+v}})},A5AN:function(t,e,n){"use strict";var r=n("AvRE")(!0);t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},Afnz:function(t,e,n){"use strict";var r=n("LQAc"),i=n("XKFU"),o=n("KroJ"),a=n("Mukb"),s=n("hPIQ"),c=n("QaDb"),u=n("fyDq"),l=n("OP3Y"),f=n("K0xU")("iterator"),p=!([].keys&&"next"in[].keys()),d=function(){return this};t.exports=function(t,e,n,h,g,v,m){c(n,e,h);var y,b,w,x=function(t){if(!p&&t in C)return C[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},_=e+" Iterator",k="values"==g,S=!1,C=t.prototype,E=C[f]||C["@@iterator"]||g&&C[g],F=E||x(g),D=g?k?x("entries"):F:void 0,M="Array"==e&&C.entries||E;if(M&&(w=l(M.call(new t)))!==Object.prototype&&w.next&&(u(w,_,!0),r||"function"==typeof w[f]||a(w,f,d)),k&&E&&"values"!==E.name&&(S=!0,F=function(){return E.call(this)}),r&&!m||!p&&!S&&C[f]||a(C,f,F),s[e]=F,s[_]=d,g)if(y={values:k?F:x("values"),keys:v?F:x("keys"),entries:D},m)for(b in y)b in C||o(C,b,y[b]);else i(i.P+i.F*(p||S),e,y);return y}},AphP:function(t,e,n){"use strict";var r=n("XKFU"),i=n("S/j/"),o=n("apmT");r(r.P+r.F*n("eeVq")((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})})),"Date",{toJSON:function(t){var e=i(this),n=o(e);return"number"!=typeof n||isFinite(n)?e.toISOString():null}})},AvRE:function(t,e,n){var r=n("RYi7"),i=n("vhPU");t.exports=function(t){return function(e,n){var o,a,s=String(i(e)),c=r(n),u=s.length;return c<0||c>=u?t?"":void 0:(o=s.charCodeAt(c))<55296||o>56319||c+1===u||(a=s.charCodeAt(c+1))<56320||a>57343?t?s.charAt(c):o:t?s.slice(c,c+2):a-56320+(o-55296<<10)+65536}}},"B+OT":function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},BC7C:function(t,e,n){var r=n("XKFU");r(r.S,"Math",{fround:n("kcoS")})},"BJ/l":function(t,e,n){var r=n("XKFU");r(r.S,"Math",{log1p:n("1sa7")})},BP8U:function(t,e,n){var r=n("XKFU"),i=n("PKUr");r(r.S+r.F*(Number.parseInt!=i),"Number",{parseInt:i})},Btvt:function(t,e,n){"use strict";var r=n("I8a+"),i={};i[n("K0xU")("toStringTag")]="z",i+""!="[object z]"&&n("KroJ")(Object.prototype,"toString",(function(){return"[object "+r(this)+"]"}),!0)},"C/va":function(t,e,n){"use strict";var r=n("y3w9");t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},CVKz:function(t,e,n){var r=n("cybi");"string"==typeof r&&(r=[[t.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n("aET+")(r,i);r.locals&&(t.exports=r.locals)},CX2u:function(t,e,n){"use strict";var r=n("XKFU"),i=n("g3g5"),o=n("dyZX"),a=n("69bn"),s=n("vKrd");r(r.P+r.R,"Promise",{finally:function(t){var e=a(this,i.Promise||o.Promise),n="function"==typeof t;return this.then(n?function(n){return s(e,t()).then((function(){return n}))}:t,n?function(n){return s(e,t()).then((function(){throw n}))}:t)}})},Cfrj:function(t,e,n){var r=n("RYi7"),i=n("ne8i");t.exports=function(t){if(void 0===t)return 0;var e=r(t),n=i(e);if(e!==n)throw RangeError("Wrong length!");return n}},CkkT:function(t,e,n){var r=n("m0Pp"),i=n("Ymqv"),o=n("S/j/"),a=n("ne8i"),s=n("zRwo");t.exports=function(t,e){var n=1==t,c=2==t,u=3==t,l=4==t,f=6==t,p=5==t||f,d=e||s;return function(e,s,h){for(var g,v,m=o(e),y=i(m),b=r(s,h,3),w=a(y.length),x=0,_=n?d(e,w):c?d(e,0):void 0;w>x;x++)if((p||x in y)&&(v=b(g=y[x],x,m),t))if(n)_[x]=v;else if(v)switch(t){case 3:return!0;case 5:return g;case 6:return x;case 2:_.push(g)}else if(l)return!1;return f?-1:u||l?l:_}}},CyHz:function(t,e,n){var r=n("XKFU");r(r.S,"Math",{sign:n("lvtm")})},D4iV:function(t,e,n){for(var r,i=n("dyZX"),o=n("Mukb"),a=n("ylqs"),s=a("typed_array"),c=a("view"),u=!(!i.ArrayBuffer||!i.DataView),l=u,f=0,p="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");f<9;)(r=i[p[f++]])?(o(r.prototype,s,!0),o(r.prototype,c,!0)):l=!1;t.exports={ABV:u,CONSTR:l,TYPED:s,VIEW:c}},DAlx:function(t,e,n){var r=n("hfxi");"string"==typeof r&&(r=[[t.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n("aET+")(r,i);r.locals&&(t.exports=r.locals)},DNiP:function(t,e,n){"use strict";var r=n("XKFU"),i=n("eyMr");r(r.P+r.F*!n("LyE8")([].reduce,!0),"Array",{reduce:function(t){return i(this,t,arguments.length,arguments[1],!1)}})},DVgA:function(t,e,n){var r=n("zhAb"),i=n("4R4u");t.exports=Object.keys||function(t){return r(t,i)}},DW2E:function(t,e,n){var r=n("0/R4"),i=n("Z6vF").onFreeze;n("Xtr8")("freeze",(function(t){return function(e){return t&&r(e)?t(i(e)):e}}))},EK0E:function(t,e,n){"use strict";var r,i=n("dyZX"),o=n("CkkT")(0),a=n("KroJ"),s=n("Z6vF"),c=n("czNK"),u=n("ZD67"),l=n("0/R4"),f=n("s5qY"),p=n("s5qY"),d=!i.ActiveXObject&&"ActiveXObject"in i,h=s.getWeak,g=Object.isExtensible,v=u.ufstore,m=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},y={get:function(t){if(l(t)){var e=h(t);return!0===e?v(f(this,"WeakMap")).get(t):e?e[this._i]:void 0}},set:function(t,e){return u.def(f(this,"WeakMap"),t,e)}},b=t.exports=n("4LiD")("WeakMap",m,y,u,!0,!0);p&&d&&(c((r=u.getConstructor(m,"WeakMap")).prototype,y),s.NEED=!0,o(["delete","has","get","set"],(function(t){var e=b.prototype,n=e[t];a(e,t,(function(e,i){if(l(e)&&!g(e)){this._f||(this._f=new r);var o=this._f[t](e,i);return"set"==t?this:o}return n.call(this,e,i)}))})))},EWmC:function(t,e,n){var r=n("LZWt");t.exports=Array.isArray||function(t){return"Array"==r(t)}},EemH:function(t,e,n){var r=n("UqcF"),i=n("RjD/"),o=n("aCFj"),a=n("apmT"),s=n("aagx"),c=n("xpql"),u=Object.getOwnPropertyDescriptor;e.f=n("nh4g")?u:function(t,e){if(t=o(t),e=a(e,!0),c)try{return u(t,e)}catch(t){}if(s(t,e))return i(!r.f.call(t,e),t[e])}},"Ew+T":function(t,e,n){var r=n("XKFU"),i=n("GZEu");r(r.G+r.B,{setImmediate:i.set,clearImmediate:i.clear})},FDph:function(t,e,n){n("Z2Ku"),t.exports=n("g3g5").Array.includes},FEjr:function(t,e,n){"use strict";n("OGtf")("strike",(function(t){return function(){return t(this,"strike","","")}}))},FJW5:function(t,e,n){var r=n("hswa"),i=n("y3w9"),o=n("DVgA");t.exports=n("nh4g")?Object.defineProperties:function(t,e){i(t);for(var n,a=o(e),s=a.length,c=0;s>c;)r.f(t,n=a[c++],e[n]);return t}},FLlr:function(t,e,n){var r=n("XKFU");r(r.P,"String",{repeat:n("l0Rn")})},Faw5:function(t,e,n){n("7DDg")("Int16",2,(function(t){return function(e,n,r){return t(this,e,n,r)}}))},FlsD:function(t,e,n){var r=n("0/R4");n("Xtr8")("isExtensible",(function(t){return function(e){return!!r(e)&&(!t||t(e))}}))},FxUG:function(t,e,n){n("R5XZ"),n("Ew+T"),n("rGqo"),t.exports=n("g3g5")},G8Mo:function(t,e,n){var r=n("93I4");t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},GFzJ:function(t,e,n){"use strict";var r=n("DAlx");n.n(r).a},GNAe:function(t,e,n){var r=n("XKFU"),i=n("PKUr");r(r.G+r.F*(parseInt!=i),{parseInt:i})},GZEu:function(t,e,n){var r,i,o,a=n("m0Pp"),s=n("MfQN"),c=n("+rLv"),u=n("Iw71"),l=n("dyZX"),f=l.process,p=l.setImmediate,d=l.clearImmediate,h=l.MessageChannel,g=l.Dispatch,v=0,m={},y=function(){var t=+this;if(m.hasOwnProperty(t)){var e=m[t];delete m[t],e()}},b=function(t){y.call(t.data)};p&&d||(p=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return m[++v]=function(){s("function"==typeof t?t:Function(t),e)},r(v),v},d=function(t){delete m[t]},"process"==n("LZWt")(f)?r=function(t){f.nextTick(a(y,t,1))}:g&&g.now?r=function(t){g.now(a(y,t,1))}:h?(o=(i=new h).port2,i.port1.onmessage=b,r=a(o.postMessage,o,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(r=function(t){l.postMessage(t+"","*")},l.addEventListener("message",b,!1)):r="onreadystatechange"in u("script")?function(t){c.appendChild(u("script")).onreadystatechange=function(){c.removeChild(this),y.call(t)}}:function(t){setTimeout(a(y,t,1),0)}),t.exports={set:p,clear:d}},H6hf:function(t,e,n){var r=n("y3w9");t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&r(o.call(t)),e}}},"HAE/":function(t,e,n){var r=n("XKFU");r(r.S+r.F*!n("nh4g"),"Object",{defineProperty:n("hswa").f})},HEwt:function(t,e,n){"use strict";var r=n("m0Pp"),i=n("XKFU"),o=n("S/j/"),a=n("H6hf"),s=n("M6Qj"),c=n("ne8i"),u=n("8a7r"),l=n("J+6e");i(i.S+i.F*!n("XMVh")((function(t){Array.from(t)})),"Array",{from:function(t){var e,n,i,f,p=o(t),d="function"==typeof this?this:Array,h=arguments.length,g=h>1?arguments[1]:void 0,v=void 0!==g,m=0,y=l(p);if(v&&(g=r(g,h>2?arguments[2]:void 0,2)),null==y||d==Array&&s(y))for(n=new d(e=c(p.length));e>m;m++)u(n,m,v?g(p[m],m):p[m]);else for(f=y.call(p),n=new d;!(i=f.next()).done;m++)u(n,m,v?a(f,g,[i.value,m],!0):i.value);return n.length=m,n}})},Hsns:function(t,e,n){var r=n("93I4"),i=n("5T2Y").document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},I1BE:function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n=t[1]||"",r=t[3];if(!r)return n;if(e&&"function"==typeof btoa){var i=(a=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),o=r.sources.map((function(t){return"/*# sourceURL="+r.sourceRoot+t+" */"}));return[n].concat(o).concat([i]).join("\n")}var a;return[n].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n})).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},i=0;i1?arguments[1]:void 0)}}),n("nGyu")(o)},"IU+Z":function(t,e,n){"use strict";n("sMXx");var r=n("KroJ"),i=n("Mukb"),o=n("eeVq"),a=n("vhPU"),s=n("K0xU"),c=n("Ugos"),u=s("species"),l=!o((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")})),f=function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();t.exports=function(t,e,n){var p=s(t),d=!o((function(){var e={};return e[p]=function(){return 7},7!=""[t](e)})),h=d?!o((function(){var e=!1,n=/a/;return n.exec=function(){return e=!0,null},"split"===t&&(n.constructor={},n.constructor[u]=function(){return n}),n[p](""),!e})):void 0;if(!d||!h||"replace"===t&&!l||"split"===t&&!f){var g=/./[p],v=n(a,p,""[t],(function(t,e,n,r,i){return e.exec===c?d&&!i?{done:!0,value:g.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}})),m=v[0],y=v[1];r(String.prototype,t,m),i(RegExp.prototype,p,2==e?function(t,e){return y.call(t,this,e)}:function(t){return y.call(t,this)})}}},IXt9:function(t,e,n){"use strict";var r=n("0/R4"),i=n("OP3Y"),o=n("K0xU")("hasInstance"),a=Function.prototype;o in a||n("hswa").f(a,o,{value:function(t){if("function"!=typeof this||!r(t))return!1;if(!r(this.prototype))return t instanceof this;for(;t=i(t);)if(this.prototype===t)return!0;return!1}})},IlFx:function(t,e,n){var r=n("XKFU"),i=n("y3w9"),o=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(t){return i(t),!o||o(t)}})},IsTG:function(t,e,n){(t.exports=n("I1BE")(!1)).push([t.i,'fieldset[disabled] .multiselect{pointer-events:none}.multiselect__spinner{position:absolute;right:1px;top:1px;width:48px;height:35px;background:#fff;display:block}.multiselect__spinner:after,.multiselect__spinner:before{position:absolute;content:"";top:50%;left:50%;margin:-8px 0 0 -8px;width:16px;height:16px;border-radius:100%;border:2px solid transparent;border-top-color:#41b883;box-shadow:0 0 0 1px transparent}.multiselect__spinner:before{-webkit-animation:spinning 2.4s cubic-bezier(.41,.26,.2,.62);animation:spinning 2.4s cubic-bezier(.41,.26,.2,.62);-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.multiselect__spinner:after{-webkit-animation:spinning 2.4s cubic-bezier(.51,.09,.21,.8);animation:spinning 2.4s cubic-bezier(.51,.09,.21,.8);-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.multiselect__loading-enter-active,.multiselect__loading-leave-active{-webkit-transition:opacity .4s ease-in-out;transition:opacity .4s ease-in-out;opacity:1}.multiselect__loading-enter,.multiselect__loading-leave-active{opacity:0}.multiselect,.multiselect__input,.multiselect__single{font-family:inherit;font-size:16px;touch-action:manipulation}.multiselect{box-sizing:content-box;display:block;position:relative;width:100%;min-height:40px;text-align:left;color:#35495e}.multiselect *{box-sizing:border-box}.multiselect:focus{outline:none}.multiselect--disabled{background:#ededed;pointer-events:none;opacity:.6}.multiselect--active{z-index:50}.multiselect--active:not(.multiselect--above) .multiselect__current,.multiselect--active:not(.multiselect--above) .multiselect__input,.multiselect--active:not(.multiselect--above) .multiselect__tags{border-bottom-left-radius:0;border-bottom-right-radius:0}.multiselect--active .multiselect__select{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.multiselect--above.multiselect--active .multiselect__current,.multiselect--above.multiselect--active .multiselect__input,.multiselect--above.multiselect--active .multiselect__tags{border-top-left-radius:0;border-top-right-radius:0}.multiselect__input,.multiselect__single{position:relative;display:inline-block;min-height:20px;line-height:20px;border:none;border-radius:5px;background:#fff;padding:0 0 0 5px;width:100%;-webkit-transition:border .1s ease;transition:border .1s ease;box-sizing:border-box;margin-bottom:8px;vertical-align:top}.multiselect__input:-ms-input-placeholder{color:#35495e}.multiselect__input::-webkit-input-placeholder{color:#35495e}.multiselect__input::-moz-placeholder{color:#35495e}.multiselect__input::-ms-input-placeholder{color:#35495e}.multiselect__input::placeholder{color:#35495e}.multiselect__tag~.multiselect__input,.multiselect__tag~.multiselect__single{width:auto}.multiselect__input:hover,.multiselect__single:hover{border-color:#cfcfcf}.multiselect__input:focus,.multiselect__single:focus{border-color:#a8a8a8;outline:none}.multiselect__single{padding-left:5px;margin-bottom:8px}.multiselect__tags-wrap{display:inline}.multiselect__tags{min-height:40px;display:block;padding:8px 40px 0 8px;border-radius:5px;border:1px solid #e8e8e8;background:#fff;font-size:14px}.multiselect__tag{position:relative;display:inline-block;padding:4px 26px 4px 10px;border-radius:5px;margin-right:10px;color:#fff;line-height:1;background:#41b883;margin-bottom:5px;white-space:nowrap;overflow:hidden;max-width:100%;text-overflow:ellipsis}.multiselect__tag-icon{cursor:pointer;margin-left:7px;position:absolute;right:0;top:0;bottom:0;font-weight:700;font-style:normal;width:22px;text-align:center;line-height:22px;-webkit-transition:all .2s ease;transition:all .2s ease;border-radius:5px}.multiselect__tag-icon:after{content:"\\D7";color:#266d4d;font-size:14px}.multiselect__tag-icon:focus,.multiselect__tag-icon:hover{background:#369a6e}.multiselect__tag-icon:focus:after,.multiselect__tag-icon:hover:after{color:#fff}.multiselect__current{min-height:40px;overflow:hidden;padding:8px 30px 0 12px;white-space:nowrap;border-radius:5px;border:1px solid #e8e8e8}.multiselect__current,.multiselect__select{line-height:16px;box-sizing:border-box;display:block;margin:0;text-decoration:none;cursor:pointer}.multiselect__select{position:absolute;width:40px;height:38px;right:1px;top:1px;padding:4px 8px;text-align:center;-webkit-transition:-webkit-transform .2s ease;transition:-webkit-transform .2s ease;transition:transform .2s ease;transition:transform .2s ease, -webkit-transform .2s ease}.multiselect__select:before{position:relative;right:0;top:65%;color:#999;margin-top:4px;border-color:#999 transparent transparent;border-style:solid;border-width:5px 5px 0;content:""}.multiselect__placeholder{color:#adadad;display:inline-block;margin-bottom:10px;padding-top:2px}.multiselect--active .multiselect__placeholder{display:none}.multiselect__content-wrapper{position:absolute;display:block;background:#fff;width:100%;max-height:240px;overflow:auto;border:1px solid #e8e8e8;border-top:none;border-bottom-left-radius:5px;border-bottom-right-radius:5px;z-index:50;-webkit-overflow-scrolling:touch}.multiselect__content{list-style:none;display:inline-block;padding:0;margin:0;min-width:100%;vertical-align:top}.multiselect--above .multiselect__content-wrapper{bottom:100%;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:5px;border-top-right-radius:5px;border-bottom:none;border-top:1px solid #e8e8e8}.multiselect__content::webkit-scrollbar{display:none}.multiselect__element{display:block}.multiselect__option{display:block;padding:12px;min-height:40px;line-height:16px;text-decoration:none;text-transform:none;vertical-align:middle;position:relative;cursor:pointer;white-space:nowrap}.multiselect__option:after{top:0;right:0;position:absolute;line-height:40px;padding-right:12px;padding-left:20px;font-size:13px}.multiselect__option--highlight{background:#41b883;outline:none;color:#fff}.multiselect__option--highlight:after{content:attr(data-select);background:#41b883;color:#fff}.multiselect__option--selected{background:#f3f3f3;color:#35495e;font-weight:700}.multiselect__option--selected:after{content:attr(data-selected);color:silver}.multiselect__option--selected.multiselect__option--highlight{background:#ff6a6a;color:#fff}.multiselect__option--selected.multiselect__option--highlight:after{background:#ff6a6a;content:attr(data-deselect);color:#fff}.multiselect--disabled .multiselect__current,.multiselect--disabled .multiselect__select{background:#ededed;color:#a6a6a6}.multiselect__option--disabled{background:#ededed!important;color:#a6a6a6!important;cursor:text;pointer-events:none}.multiselect__option--group{background:#ededed;color:#35495e}.multiselect__option--group.multiselect__option--highlight{background:#35495e;color:#fff}.multiselect__option--group.multiselect__option--highlight:after{background:#35495e}.multiselect__option--disabled.multiselect__option--highlight{background:#dedede}.multiselect__option--group-selected.multiselect__option--highlight{background:#ff6a6a;color:#fff}.multiselect__option--group-selected.multiselect__option--highlight:after{background:#ff6a6a;content:attr(data-deselect);color:#fff}.multiselect-enter-active,.multiselect-leave-active{-webkit-transition:all .15s ease;transition:all .15s ease}.multiselect-enter,.multiselect-leave-active{opacity:0}.multiselect__strong{margin-bottom:8px;line-height:20px;display:inline-block;vertical-align:top}[dir=rtl] .multiselect{text-align:right}[dir=rtl] .multiselect__select{right:auto;left:1px}[dir=rtl] .multiselect__tags{padding:8px 8px 0 40px}[dir=rtl] .multiselect__content{text-align:right}[dir=rtl] .multiselect__option:after{right:auto;left:0}[dir=rtl] .multiselect__clear{right:auto;left:12px}[dir=rtl] .multiselect__spinner{right:auto;left:1px}@-webkit-keyframes spinning{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(2turn);transform:rotate(2turn)}}@keyframes spinning{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(2turn);transform:rotate(2turn)}}',""])},Iw71:function(t,e,n){var r=n("0/R4"),i=n("dyZX").document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},Izvi:function(t,e,n){n("I74W"),t.exports=n("g3g5").String.trimLeft},"J+6e":function(t,e,n){var r=n("I8a+"),i=n("K0xU")("iterator"),o=n("hPIQ");t.exports=n("g3g5").getIteratorMethod=function(t){if(null!=t)return t[i]||t["@@iterator"]||o[r(t)]}},JCqj:function(t,e,n){"use strict";n("OGtf")("sup",(function(t){return function(){return t(this,"sup","","")}}))},JbTB:function(t,e,n){n("/8Fb"),t.exports=n("g3g5").Object.entries},Jcmo:function(t,e,n){var r=n("XKFU"),i=Math.exp;r(r.S,"Math",{cosh:function(t){return(i(t=+t)+i(-t))/2}})},JduL:function(t,e,n){n("Xtr8")("getOwnPropertyNames",(function(){return n("e7yV").f}))},"Ji/l":function(t,e,n){var r=n("XKFU");r(r.G+r.W+r.F*!n("D4iV").ABV,{DataView:n("7Qtz").DataView})},JiEa:function(t,e){e.f=Object.getOwnPropertySymbols},K0xU:function(t,e,n){var r=n("VTer")("wks"),i=n("ylqs"),o=n("dyZX").Symbol,a="function"==typeof o;(t.exports=function(t){return r[t]||(r[t]=a&&o[t]||(a?o:i)("Symbol."+t))}).store=r},KKXr:function(t,e,n){"use strict";var r=n("quPj"),i=n("y3w9"),o=n("69bn"),a=n("A5AN"),s=n("ne8i"),c=n("Xxuz"),u=n("Ugos"),l=n("eeVq"),f=Math.min,p=[].push,d=!l((function(){RegExp(4294967295,"y")}));n("IU+Z")("split",2,(function(t,e,n,l){var h;return h="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,e){var i=String(this);if(void 0===t&&0===e)return[];if(!r(t))return n.call(i,t,e);for(var o,a,s,c=[],l=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),f=0,d=void 0===e?4294967295:e>>>0,h=new RegExp(t.source,l+"g");(o=u.call(h,i))&&!((a=h.lastIndex)>f&&(c.push(i.slice(f,o.index)),o.length>1&&o.index=d));)h.lastIndex===o.index&&h.lastIndex++;return f===i.length?!s&&h.test("")||c.push(""):c.push(i.slice(f)),c.length>d?c.slice(0,d):c}:"0".split(void 0,0).length?function(t,e){return void 0===t&&0===e?[]:n.call(this,t,e)}:n,[function(n,r){var i=t(this),o=null==n?void 0:n[e];return void 0!==o?o.call(n,i,r):h.call(String(i),n,r)},function(t,e){var r=l(h,t,this,e,h!==n);if(r.done)return r.value;var u=i(t),p=String(this),g=o(u,RegExp),v=u.unicode,m=(u.ignoreCase?"i":"")+(u.multiline?"m":"")+(u.unicode?"u":"")+(d?"y":"g"),y=new g(d?u:"^(?:"+u.source+")",m),b=void 0===e?4294967295:e>>>0;if(0===b)return[];if(0===p.length)return null===c(y,p)?[p]:[];for(var w=0,x=0,_=[];xdocument.F=Object<\/script>"),t.close(),c=t.F;r--;)delete c.prototype[o[r]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(s.prototype=r(t),n=new s,s.prototype=null,n[a]=t):n=c(),void 0===e?n:i(n,e)}},L6xF:function(t,e,n){var r=n("lSZW");"string"==typeof r&&(r=[[t.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n("aET+")(r,i);r.locals&&(t.exports=r.locals)},L9s1:function(t,e,n){"use strict";var r=n("XKFU"),i=n("0sh+");r(r.P+r.F*n("UUeW")("includes"),"String",{includes:function(t){return!!~i(this,t,"includes").indexOf(t,arguments.length>1?arguments[1]:void 0)}})},LK8F:function(t,e,n){var r=n("XKFU");r(r.S,"Array",{isArray:n("EWmC")})},LQAc:function(t,e){t.exports=!1},LTTk:function(t,e,n){var r=n("XKFU"),i=n("OP3Y"),o=n("y3w9");r(r.S,"Reflect",{getPrototypeOf:function(t){return i(o(t))}})},LVwc:function(t,e){var n=Math.expm1;t.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:Math.exp(t)-1}:n},LZWt:function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},Lgjv:function(t,e,n){var r=n("ne8i"),i=n("l0Rn"),o=n("vhPU");t.exports=function(t,e,n,a){var s=String(o(t)),c=s.length,u=void 0===n?" ":String(n),l=r(e);if(l<=c||""==u)return s;var f=l-c,p=i.call(u,Math.ceil(f/u.length));return p.length>f&&(p=p.slice(0,f)),a?p+s:s+p}},Ljet:function(t,e,n){var r=n("XKFU");r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},LyE8:function(t,e,n){"use strict";var r=n("eeVq");t.exports=function(t,e){return!!t&&r((function(){e?t.call(null,(function(){}),1):t.call(null)}))}},M6Qj:function(t,e,n){var r=n("hPIQ"),i=n("K0xU")("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||o[i]===t)}},MfQN:function(t,e){t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},MtdB:function(t,e,n){var r=n("XKFU");r(r.S,"Math",{clz32:function(t){return(t>>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},Mukb:function(t,e,n){var r=n("hswa"),i=n("RjD/");t.exports=n("nh4g")?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},N8g3:function(t,e,n){e.f=n("K0xU")},NO8f:function(t,e,n){n("7DDg")("Uint8",1,(function(t){return function(e,n,r){return t(this,e,n,r)}}))},NegM:function(t,e,n){var r=n("2faE"),i=n("rr1i");t.exports=n("jmDH")?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},Nr18:function(t,e,n){"use strict";var r=n("S/j/"),i=n("d/Gc"),o=n("ne8i");t.exports=function(t){for(var e=r(this),n=o(e.length),a=arguments.length,s=i(a>1?arguments[1]:void 0,n),c=a>2?arguments[2]:void 0,u=void 0===c?n:i(c,n);u>s;)e[s++]=t;return e}},Nz9U:function(t,e,n){"use strict";var r=n("XKFU"),i=n("aCFj"),o=[].join;r(r.P+r.F*(n("Ymqv")!=Object||!n("LyE8")(o)),"Array",{join:function(t){return o.call(i(this),void 0===t?",":t)}})},OEbY:function(t,e,n){n("nh4g")&&"g"!=/./g.flags&&n("hswa").f(RegExp.prototype,"flags",{configurable:!0,get:n("C/va")})},OG14:function(t,e,n){"use strict";var r=n("y3w9"),i=n("g6HL"),o=n("Xxuz");n("IU+Z")("search",1,(function(t,e,n,a){return[function(n){var r=t(this),i=null==n?void 0:n[e];return void 0!==i?i.call(n,r):new RegExp(n)[e](String(r))},function(t){var e=a(n,t,this);if(e.done)return e.value;var s=r(t),c=String(this),u=s.lastIndex;i(u,0)||(s.lastIndex=0);var l=o(s,c);return i(s.lastIndex,u)||(s.lastIndex=u),null===l?-1:l.index}]}))},OGtf:function(t,e,n){var r=n("XKFU"),i=n("eeVq"),o=n("vhPU"),a=/"/g,s=function(t,e,n,r){var i=String(o(t)),s="<"+e;return""!==n&&(s+=" "+n+'="'+String(r).replace(a,""")+'"'),s+">"+i+""};t.exports=function(t,e){var n={};n[t]=e(s),r(r.P+r.F*i((function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3})),"String",n)}},OP3Y:function(t,e,n){var r=n("aagx"),i=n("S/j/"),o=n("YTvA")("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},OnI7:function(t,e,n){var r=n("dyZX"),i=n("g3g5"),o=n("LQAc"),a=n("N8g3"),s=n("hswa").f;t.exports=function(t){var e=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:a.f(t)})}},Oyvg:function(t,e,n){var r=n("dyZX"),i=n("Xbzi"),o=n("hswa").f,a=n("kJMx").f,s=n("quPj"),c=n("C/va"),u=r.RegExp,l=u,f=u.prototype,p=/a/g,d=/a/g,h=new u(p)!==p;if(n("nh4g")&&(!h||n("eeVq")((function(){return d[n("K0xU")("match")]=!1,u(p)!=p||u(d)==d||"/a/i"!=u(p,"i")})))){u=function(t,e){var n=this instanceof u,r=s(t),o=void 0===e;return!n&&r&&t.constructor===u&&o?t:i(h?new l(r&&!o?t.source:t,e):l((r=t instanceof u)?t.source:t,r&&o?c.call(t):e),n?this:f,u)};for(var g=function(t){t in u||o(u,t,{configurable:!0,get:function(){return l[t]},set:function(e){l[t]=e}})},v=a(l),m=0;v.length>m;)g(v[m++]);f.constructor=u,u.prototype=f,n("KroJ")(r,"RegExp",u)}n("elZq")("RegExp")},PKUr:function(t,e,n){var r=n("dyZX").parseInt,i=n("qncB").trim,o=n("/e88"),a=/^[-+]?0[xX]/;t.exports=8!==r(o+"08")||22!==r(o+"0x16")?function(t,e){var n=i(String(t),3);return r(n,e>>>0||(a.test(n)?16:10))}:r},QNwp:function(t,e,n){n("7VC1"),t.exports=n("g3g5").String.padEnd},QaDb:function(t,e,n){"use strict";var r=n("Kuth"),i=n("RjD/"),o=n("fyDq"),a={};n("Mukb")(a,n("K0xU")("iterator"),(function(){return this})),t.exports=function(t,e,n){t.prototype=r(a,{next:i(1,n)}),o(t,e+" Iterator")}},R5XZ:function(t,e,n){var r=n("dyZX"),i=n("XKFU"),o=n("ol8x"),a=[].slice,s=/MSIE .\./.test(o),c=function(t){return function(e,n){var r=arguments.length>2,i=!!r&&a.call(arguments,2);return t(r?function(){("function"==typeof e?e:Function(e)).apply(this,i)}:e,n)}};i(i.G+i.B+i.F*s,{setTimeout:c(r.setTimeout),setInterval:c(r.setInterval)})},RW0V:function(t,e,n){var r=n("S/j/"),i=n("DVgA");n("Xtr8")("keys",(function(){return function(t){return i(r(t))}}))},RYi7:function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},"RjD/":function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},Ro2m:function(t,e,n){window,t.exports=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s=11)}([function(t,e,n){"use strict";e.__esModule=!0;var r,i=(r=n(43))&&r.__esModule?r:{default:r};e.default=i.default||function(t){for(var e=1;e0?r:n)(t)}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(27);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){var r=n(8),i=n(7);t.exports=function(t){return r(i(t))}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),o={basic:{swatches:["#1FBC9C","#1CA085","#2ECC70","#27AF60","#3398DB","#2980B9","#A463BF","#8E43AD","#3D556E","#222F3D","#F2C511","#F39C19","#E84B3C","#C0382B","#DDE6E8","#BDC3C8"],rowLength:4},"text-basic":{swatches:["#CC0001","#E36101","#FFCC00","#009900","#0066CB","#000000","#FFFFFF"],showBorder:!0},"text-advanced":{swatches:[["#000000","#434343","#666666","#999999","#b7b7b7","#cccccc","#d9d9d9","#efefef","#f3f3f3","#ffffff"],["#980000","#ff0000","#ff9900","#ffff00","#00ff00","#00ffff","#4a86e8","#0000ff","#9900ff","#ff00ff"],["#e6b8af","#f4cccc","#fce5cd","#fff2cc","#d9ead3","#d0e0e3","#c9daf8","#cfe2f3","#d9d2e9","#ead1dc"],["#dd7e6b","#ea9999","#f9cb9c","#ffe599","#b6d7a8","#a2c4c9","#a4c2f4","#9fc5e8","#b4a7d6","#d5a6bd"],["#cc4125","#e06666","#f6b26b","#ffd966","#93c47d","#76a5af","#6d9eeb","#6fa8dc","#8e7cc3","#c27ba0"],["#a61c00","#cc0000","#e69138","#f1c232","#6aa84f","#45818e","#3c78d8","#3d85c6","#674ea7","#a64d79"],["#85200c","#990000","#b45f06","#bf9000","#38761d","#134f5c","#1155cc","#0b5394","#351c75","#741b47"],["#5b0f00","#660000","#783f04","#7f6000","#274e13","#0c343d","#1c4587","#073763","#20124d","#4c1130"]],borderRadius:"0",rowLength:10,swatchSize:24,spacingSize:0},"material-basic":{swatches:["#F44336","#E91E63","#9C27B0","#673AB7","#3F51B5","#2196F3","#03A9F4","#00BCD4","#009688","#4CAF50","#8BC34A","#CDDC39","#FFEB3B","#FFC107","#FF9800","#FF5722","#795548","#9E9E9E","#607D8B"]},"material-light":{swatches:["#EF9A9A","#F48FB1","#CE93D8","#B39DDB","#9FA8DA","#90CAF9","#81D4FA","#80DEEA","#80CBC4","#A5D6A7","#C5E1A5","#E6EE9C","#FFF59D","#FFE082","#FFCC80","#FFAB91","#BCAAA4","#EEEEEE","#B0BEC5"]},"material-dark":{swatches:["#D32F2F","#C2185B","#7B1FA2","#512DA8","#303F9F","#1976D2","#0288D1","#0097A7","#00796B","#388E3C","#689F38","#AFB42B","#FBC02D","#FFA000","#F57C00","#E64A19","#5D4037","#616161","#455A64"]}};function a(t,e,n,r,i,o,a,s){var c=typeof(t=t||{}).default;"object"!==c&&"function"!==c||(t=t.default);var u,l="function"==typeof t?t.options:t;if(e&&(l.render=e,l.staticRenderFns=n,l._compiled=!0),r&&(l.functional=!0),o&&(l._scopeId=o),a?(u=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},l._ssrRegister=u):i&&(u=s?function(){i.call(this,this.$root.$options.shadowRoot)}:i),u)if(l.functional){l._injectStyles=u;var f=l.render;l.render=function(t,e){return u.call(e),f(t,e)}}else{var p=l.beforeCreate;l.beforeCreate=p?[].concat(p,u):[u]}return{exports:t,options:l}}var s=a({name:"swatches",components:{Swatch:a({name:"swatch",components:{Check:a({name:"check",data:function(){return{}}},(function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"vue-swatches__check__wrapper vue-swatches--has-children-centered"},[e("div",{staticClass:"vue-swatches__check__circle vue-swatches--has-children-centered"},[e("svg",{staticClass:"check",attrs:{version:"1.1",role:"presentation",width:"12",height:"12",viewBox:"0 0 1792 1792"}},[e("path",{staticClass:"vue-swatches__check__path",attrs:{d:"M1671 566q0 40-28 68l-724 724-136 136q-28 28-68 28t-68-28l-136-136-362-362q-28-28-28-68t28-68l136-136q28-28 68-28t68 28l294 295 656-657q28-28 68-28t68 28l136 136q28 28 28 68z"}})])])])}),[],!1,(function(t){n(13)}),null,null).exports},props:{borderRadius:{type:String},disabled:{type:Boolean},exceptionMode:{type:String},isException:{type:Boolean,default:!1},selected:{type:Boolean,default:!1},showCheckbox:{type:Boolean},showBorder:{type:Boolean},size:{type:Number},spacingSize:{type:Number},swatchColor:{type:String,default:""},swatchStyle:{type:Object}},data:function(){return{}},computed:{computedSwatchStyle:function(){return{display:this.isException&&"hidden"===this.exceptionMode?"none":"inline-block",width:this.size+"px",height:this.size+"px",marginBottom:this.spacingSize+"px",marginRight:this.spacingSize+"px",borderRadius:this.borderRadius,backgroundColor:""!==this.swatchColor?this.swatchColor:"#FFFFFF",cursor:this.cursorStyle}},cursorStyle:function(){return this.disabled?"not-allowed":this.isException&&"disabled"===this.exceptionMode?"not-allowed":"pointer"},swatchStyles:function(){return[this.computedSwatchStyle,this.swatchStyle]}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"vue-swatches__swatch",class:{"vue-swatches__swatch--border":t.showBorder,"vue-swatches__swatch--selected":t.selected,"vue-swatches__swatch--is-exception":t.isException||t.disabled},style:t.swatchStyles},[""===t.swatchColor?n("div",{staticClass:"vue-swatches__diagonal--wrapper vue-swatches--has-children-centered"},[n("div",{staticClass:"vue-swatches__diagonal"})]):t._e(),t._v(" "),n("check",{directives:[{name:"show",rawName:"v-show",value:t.showCheckbox&&t.selected,expression:"showCheckbox && selected"}]})],1)}),[],!1,(function(t){n(15)}),null,null).exports},props:{backgroundColor:{type:String,default:"#ffffff"},closeOnSelect:{type:Boolean,default:!0},colors:{type:[Array,Object,String],default:"basic"},exceptions:{type:Array,default:function(){return[]}},exceptionMode:{type:String,default:"disabled"},disabled:{type:Boolean,default:!1},fallbackInputClass:{type:[Array,Object,String],default:null},fallbackOkClass:{type:[Array,Object,String],default:null},fallbackOkText:{type:String,default:"Ok"},fallbackInputType:{type:String,default:function(){return"text"},validator:function(t){return-1!==["text","color"].indexOf(t)}},inline:{type:Boolean,default:!1},maxHeight:{type:[Number,String],default:null},shapes:{type:String,default:"squares"},popoverTo:{type:String,default:"right"},rowLength:{type:[Number,String],default:null},showBorder:{type:Boolean,default:null},showFallback:{type:Boolean,default:!1},showCheckbox:{type:Boolean,default:!0},swatchSize:{type:[Number,String],default:null},swatchStyle:{type:[Object,Array],default:function(){}},triggerStyle:{type:[Object,Array],default:function(){}},wrapperStyle:{type:[Object,Array],default:function(){}},value:{type:String,default:null}},data:function(){return{presetBorderRadius:null,presetMaxHeight:null,presetRowLength:null,presetShowBorder:null,presetSwatchSize:null,presetSpacingSize:null,internalValue:this.value,internalIsOpen:!1}},computed:{isNested:function(){return!!(this.computedColors&&this.computedColors.length>0&&this.computedColors[0]instanceof Array)},isOpen:function(){return!this.inline&&this.internalIsOpen},isNoColor:function(){return this.checkEquality("",this.value)},computedColors:function(){return this.colors instanceof Array?this.colors:this.extractSwatchesFromPreset(this.colors)},computedBorderRadius:function(){return null!==this.presetBorderRadius?this.presetBorderRadius:this.borderRadius},computedExceptionMode:function(){return"hidden"===this.exceptionMode?this.exceptionMode:"disabled"===this.exceptionMode?this.exceptionMode:void 0},computedMaxHeight:function(){return null!==this.maxHeight?Number(this.maxHeight):null!==this.presetMaxHeight?this.presetMaxHeight:300},computedRowLength:function(){return null!==this.rowLength?Number(this.rowLength):null!==this.presetRowLength?this.presetRowLength:4},computedSwatchSize:function(){return null!==this.swatchSize?Number(this.swatchSize):null!==this.presetSwatchSize?this.presetSwatchSize:42},computedSpacingSize:function(){return null!==this.presetSpacingSize?this.presetSpacingSize:this.spacingSize},computedShowBorder:function(){return null!==this.showBorder?this.showBorder:null!==this.presetShowBorder&&this.presetShowBorder},borderRadius:function(){return"squares"===this.shapes?Math.round(.25*this.computedSwatchSize)+"px":"circles"===this.shapes?"50%":void 0},spacingSize:function(){return Math.round(.25*this.computedSwatchSize)},wrapperWidth:function(){return this.computedRowLength*(this.computedSwatchSize+this.computedSpacingSize)},computedtriggerStyle:function(){return{width:"42px",height:"42px",backgroundColor:this.value?this.value:"#ffffff",borderRadius:"circles"===this.shapes?"50%":"10px"}},triggerStyles:function(){return[this.computedtriggerStyle,this.triggerStyle]},containerStyle:function(){var t={backgroundColor:this.backgroundColor},e={};return this.inline?t:("right"===this.popoverTo?e={left:0}:"left"===this.popoverTo&&(e={right:0}),i()({},e,t,{maxHeight:this.computedMaxHeight+"px"}))},containerStyles:function(){return[this.containerStyle]},computedWrapperStyle:function(){var t={paddingTop:this.computedSpacingSize+"px",paddingLeft:this.computedSpacingSize+"px"};return this.inline?t:i()({},t,{width:this.wrapperWidth+"px"})},wrapperStyles:function(){return[this.computedWrapperStyle,this.wrapperStyle]},computedFallbackWrapperStyle:function(){var t={marginLeft:this.computedSpacingSize+"px",paddingBottom:this.computedSpacingSize+"px"};return this.inline?t:i()({},t,{width:this.wrapperWidth-this.computedSpacingSize+"px"})},computedFallbackWrapperStyles:function(){return[this.computedFallbackWrapperStyle]}},watch:{value:function(t){this.internalValue=t}},methods:{checkEquality:function(t,e){return!(!t&&""!==t||!e&&""!==e)&&t.toUpperCase()===e.toUpperCase()},checkException:function(t){return-1!==this.exceptions.map((function(t){return t.toUpperCase()})).indexOf(t.toUpperCase())},hidePopover:function(){this.internalIsOpen=!1,this.$el.blur(),this.$emit("close",this.internalValue)},onBlur:function(t){this.isOpen&&(null!==t&&this.$el.contains(t)||(this.internalIsOpen=!1,this.$emit("close",this.internalValue)))},onFallbackButtonClick:function(){this.hidePopover()},showPopover:function(){this.isOpen||this.inline||this.disabled||(this.internalIsOpen=!0,this.$el.focus(),this.$emit("open"))},togglePopover:function(){this.isOpen?this.hidePopover():this.showPopover()},updateSwatch:function(t){var e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).fromFallbackInput;this.checkException(t)||this.disabled||(this.internalValue=t,this.$emit("input",t),!this.closeOnSelect||this.inline||e||this.hidePopover())},extractSwatchesFromPreset:function(t){var e;return(e=t instanceof Object?t:o[t]).borderRadius&&(this.presetBorderRadius=e.borderRadius),e.maxHeight&&(this.presetMaxHeight=e.maxHeight),e.rowLength&&(this.presetRowLength=e.rowLength),e.showBorder&&(this.presetShowBorder=e.showBorder),e.swatchSize&&(this.presetSwatchSize=e.swatchSize),(0===e.spacingSize||e.spacingSize)&&(this.presetSpacingSize=e.spacingSize),e.swatches}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"vue-swatches",attrs:{tabindex:"0"},on:{blur:function(e){return e.target!==e.currentTarget?null:(n=e,t.onBlur(n.relatedTarget));var n}}},[t.inline?t._e():n("div",{ref:"trigger-wrapper",on:{click:t.togglePopover}},[t._t("trigger",[n("div",{staticClass:"vue-swatches__trigger",class:{"vue-swatches--is-empty":!t.value,"vue-swatches--is-disabled":t.disabled},style:t.triggerStyles},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.isNoColor,expression:"isNoColor"}],staticClass:"vue-swatches__diagonal--wrapper vue-swatches--has-children-centered"},[n("div",{staticClass:"vue-swatches__diagonal"})])])])],2),t._v(" "),n("transition",{attrs:{name:"vue-swatches-show-hide"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.inline||t.isOpen,expression:"inline || isOpen"}],staticClass:"vue-swatches__container",class:{"vue-swatches--inline":t.inline},style:t.containerStyles},[n("div",{staticClass:"vue-swatches__wrapper",style:t.wrapperStyles},[t.isNested?t._l(t.computedColors,(function(e,r){return n("div",{key:r,staticClass:"vue-swatches__row"},t._l(e,(function(e){return n("swatch",{key:e,attrs:{"border-radius":t.computedBorderRadius,disabled:t.disabled,"exception-mode":t.computedExceptionMode,"is-exception":t.checkException(e),selected:t.checkEquality(e,t.value),size:t.computedSwatchSize,"spacing-size":t.computedSpacingSize,"show-border":t.computedShowBorder,"show-checkbox":t.showCheckbox,"swatch-color":e,"swatch-style":t.swatchStyle},nativeOn:{click:function(n){t.updateSwatch(e)}}})})))})):t._l(t.computedColors,(function(e){return n("swatch",{key:e,attrs:{"border-radius":t.computedBorderRadius,disabled:t.disabled,"exception-mode":t.computedExceptionMode,"is-exception":t.checkException(e),selected:t.checkEquality(e,t.value),size:t.computedSwatchSize,"spacing-size":t.computedSpacingSize,"show-border":t.computedShowBorder,"show-checkbox":t.showCheckbox,"swatch-color":e,"swatch-style":t.swatchStyle},nativeOn:{click:function(n){t.updateSwatch(e)}}})}))],2),t._v(" "),t.showFallback?n("div",{staticClass:"vue-swatches__fallback__wrapper",style:t.computedFallbackWrapperStyles},[n("span",{staticClass:"vue-swatches__fallback__input--wrapper"},[n("input",{ref:"fallbackInput",staticClass:"vue-swatches__fallback__input",class:t.fallbackInputClass,attrs:{type:t.fallbackInputType},domProps:{value:t.internalValue},on:{input:function(e){return t.updateSwatch(e.target.value,{fromFallbackInput:!0})}}})]),t._v(" "),n("button",{staticClass:"vue-swatches__fallback__button",class:t.fallbackOkClass,on:{click:function(e){return e.preventDefault(),t.onFallbackButtonClick(e)}}},[t._v("\n "+t._s(t.fallbackOkText)+"\n ")])]):t._e()])])],1)}),[],!1,(function(t){n(45)}),null,null).exports;n.d(e,"Swatches",(function(){return s})),e.default=s},,function(t,e,n){},,function(t,e,n){},function(t,e,n){var r=n(7);t.exports=function(t){return Object(r(t))}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e){t.exports=!0},function(t,e,n){var r=n(4),i=n(5),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(21)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(t,e,n){var r=n(22)("keys"),i=n(20);t.exports=function(t){return r[t]||(r[t]=i(t))}},function(t,e,n){var r=n(6),i=Math.max,o=Math.min;t.exports=function(t,e){return(t=r(t))<0?i(t+e,0):o(t,e)}},function(t,e,n){var r=n(6),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,e,n){var r=n(9),i=n(25),o=n(24);t.exports=function(t){return function(e,n,a){var s,c=r(e),u=i(c.length),l=o(a,u);if(t&&n!=n){for(;u>l;)if((s=c[l++])!=s)return!0}else for(;u>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var r=n(10),i=n(9),o=n(26)(!1),a=n(23)("IE_PROTO");t.exports=function(t,e){var n,s=i(t),c=0,u=[];for(n in s)n!=a&&r(s,n)&&u.push(n);for(;e.length>c;)r(s,n=e[c++])&&(~o(u,n)||u.push(n));return u}},function(t,e,n){var r=n(28),i=n(19);t.exports=Object.keys||function(t){return r(t,i)}},function(t,e,n){"use strict";var r=n(29),i=n(18),o=n(17),a=n(16),s=n(8),c=Object.assign;t.exports=!c||n(1)((function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!=c({},t)[n]||Object.keys(c({},e)).join("")!=r}))?function(t,e){for(var n=a(t),c=arguments.length,u=1,l=i.f,f=o.f;c>u;)for(var p,d=s(arguments[u++]),h=l?r(d).concat(l(d)):r(d),g=h.length,v=0;g>v;)f.call(d,p=h[v++])&&(n[p]=d[p]);return n}:c},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(3);t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var r=n(3),i=n(5).document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,e,n){t.exports=!n(2)&&!n(1)((function(){return 7!=Object.defineProperty(n(33)("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){var r=n(3);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){var r=n(35),i=n(34),o=n(32),a=Object.defineProperty;e.f=n(2)?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(36),i=n(31);t.exports=n(2)?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var r=n(38);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){var r=n(5),i=n(4),o=n(39),a=n(37),s=n(10),c=function(t,e,n){var u,l,f,p=t&c.F,d=t&c.G,h=t&c.S,g=t&c.P,v=t&c.B,m=t&c.W,y=d?i:i[e]||(i[e]={}),b=y.prototype,w=d?r:h?r[e]:(r[e]||{}).prototype;for(u in d&&(n=e),n)(l=!p&&w&&void 0!==w[u])&&s(y,u)||(f=l?w[u]:n[u],y[u]=d&&"function"!=typeof w[u]?n[u]:v&&l?o(f,r):m&&w[u]==f?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(f):g&&"function"==typeof f?o(Function.call,f):f,g&&((y.virtual||(y.virtual={}))[u]=f,t&c.R&&b&&!b[u]&&a(b,u,f)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,e,n){var r=n(40);r(r.S+r.F,"Object",{assign:n(30)})},function(t,e,n){n(41),t.exports=n(4).Object.assign},function(t,e,n){t.exports={default:n(42),__esModule:!0}},,function(t,e,n){}])},"S/j/":function(t,e,n){var r=n("vhPU");t.exports=function(t){return Object(r(t))}},SMB2:function(t,e,n){"use strict";n("OGtf")("bold",(function(t){return function(){return t(this,"b","","")}}))},SPin:function(t,e,n){"use strict";var r=n("XKFU"),i=n("eyMr");r(r.P+r.F*!n("LyE8")([].reduceRight,!0),"Array",{reduceRight:function(t){return i(this,t,arguments.length,arguments[1],!0)}})},SRfc:function(t,e,n){"use strict";var r=n("y3w9"),i=n("ne8i"),o=n("A5AN"),a=n("Xxuz");n("IU+Z")("match",1,(function(t,e,n,s){return[function(n){var r=t(this),i=null==n?void 0:n[e];return void 0!==i?i.call(n,r):new RegExp(n)[e](String(r))},function(t){var e=s(n,t,this);if(e.done)return e.value;var c=r(t),u=String(this);if(!c.global)return a(c,u);var l=c.unicode;c.lastIndex=0;for(var f,p=[],d=0;null!==(f=a(c,u));){var h=String(f[0]);p[d]=h,""===h&&(c.lastIndex=o(u,i(c.lastIndex),l)),d++}return 0===d?null:p}]}))},SlkY:function(t,e,n){var r=n("m0Pp"),i=n("H6hf"),o=n("M6Qj"),a=n("y3w9"),s=n("ne8i"),c=n("J+6e"),u={},l={};(e=t.exports=function(t,e,n,f,p){var d,h,g,v,m=p?function(){return t}:c(t),y=r(n,f,e?2:1),b=0;if("function"!=typeof m)throw TypeError(t+" is not iterable!");if(o(m)){for(d=s(t.length);d>b;b++)if((v=e?y(a(h=t[b])[0],h[1]):y(t[b]))===u||v===l)return v}else for(g=m.call(t);!(h=g.next()).done;)if((v=i(g,y,h.value,e))===u||v===l)return v}).BREAK=u,e.RETURN=l},T1qB:function(t,e,n){(function(t){!function(t){var e=function(){try{return!!Symbol.iterator}catch(t){return!1}}(),n=function(t){var n={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return e&&(n[Symbol.iterator]=function(){return n}),n},r=function(t){return encodeURIComponent(t).replace(/%20/g,"+")},i=function(t){return decodeURIComponent(String(t).replace(/\+/g," "))};(function(){try{var e=t.URLSearchParams;return"a=1"===new e("?a=1").toString()&&"function"==typeof e.prototype.set}catch(t){return!1}})()||function(){var i=function(t){Object.defineProperty(this,"_entries",{writable:!0,value:{}});var e=typeof t;if("undefined"===e);else if("string"===e)""!==t&&this._fromString(t);else if(t instanceof i){var n=this;t.forEach((function(t,e){n.append(e,t)}))}else{if(null===t||"object"!==e)throw new TypeError("Unsupported input's type for URLSearchParams");if("[object Array]"===Object.prototype.toString.call(t))for(var r=0;re[0]?1:0})),t._entries&&(t._entries={});for(var n=0;n1?i(r[1]):"")}})}(void 0!==t?t:"undefined"!=typeof window?window:"undefined"!=typeof self?self:this),function(t){if(function(){try{var e=new t.URL("b","http://a");return e.pathname="c%20d","http://a/c%20d"===e.href&&e.searchParams}catch(t){return!1}}()||function(){var e=t.URL,n=function(e,n){"string"!=typeof e&&(e=String(e));var r,i=document;if(n&&(void 0===t.location||n!==t.location.href)){(r=(i=document.implementation.createHTMLDocument("")).createElement("base")).href=n,i.head.appendChild(r);try{if(0!==r.href.indexOf(n))throw new Error(r.href)}catch(t){throw new Error("URL unable to set base "+n+" due to "+t)}}var o=i.createElement("a");if(o.href=e,r&&(i.body.appendChild(o),o.href=o.href),":"===o.protocol||!/:/.test(o.href))throw new TypeError("Invalid URL");Object.defineProperty(this,"_anchorElement",{value:o});var a=new t.URLSearchParams(this.search),s=!0,c=!0,u=this;["append","delete","set"].forEach((function(t){var e=a[t];a[t]=function(){e.apply(a,arguments),s&&(c=!1,u.search=a.toString(),c=!0)}})),Object.defineProperty(this,"searchParams",{value:a,enumerable:!0});var l=void 0;Object.defineProperty(this,"_updateSearchParams",{enumerable:!1,configurable:!1,writable:!1,value:function(){this.search!==l&&(l=this.search,c&&(s=!1,this.searchParams._fromString(this.search),s=!0))}})},r=n.prototype;["hash","host","hostname","port","protocol"].forEach((function(t){!function(t){Object.defineProperty(r,t,{get:function(){return this._anchorElement[t]},set:function(e){this._anchorElement[t]=e},enumerable:!0})}(t)})),Object.defineProperty(r,"search",{get:function(){return this._anchorElement.search},set:function(t){this._anchorElement.search=t,this._updateSearchParams()},enumerable:!0}),Object.defineProperties(r,{toString:{get:function(){var t=this;return function(){return t.href}}},href:{get:function(){return this._anchorElement.href.replace(/\?$/,"")},set:function(t){this._anchorElement.href=t,this._updateSearchParams()},enumerable:!0},pathname:{get:function(){return this._anchorElement.pathname.replace(/(^\/?)/,"/")},set:function(t){this._anchorElement.pathname=t},enumerable:!0},origin:{get:function(){var t={"http:":80,"https:":443,"ftp:":21}[this._anchorElement.protocol],e=this._anchorElement.port!=t&&""!==this._anchorElement.port;return this._anchorElement.protocol+"//"+this._anchorElement.hostname+(e?":"+this._anchorElement.port:"")},enumerable:!0},password:{get:function(){return""},set:function(t){},enumerable:!0},username:{get:function(){return""},set:function(t){},enumerable:!0}}),n.createObjectURL=function(t){return e.createObjectURL.apply(e,arguments)},n.revokeObjectURL=function(t){return e.revokeObjectURL.apply(e,arguments)},t.URL=n}(),void 0!==t.location&&!("origin"in t.location)){var e=function(){return t.location.protocol+"//"+t.location.hostname+(t.location.port?":"+t.location.port:"")};try{Object.defineProperty(t.location,"origin",{get:e,enumerable:!0})}catch(n){setInterval((function(){t.location.origin=e()}),100)}}}(void 0!==t?t:"undefined"!=typeof window?window:"undefined"!=typeof self?self:this)}).call(this,n("yLpj"))},T39b:function(t,e,n){"use strict";var r=n("wmvG"),i=n("s5qY");t.exports=n("4LiD")("Set",(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(t){return r.def(i(this,"Set"),t=0===t?0:t,t)}},r)},TIpR:function(t,e,n){"use strict";n("VRzm"),n("CX2u"),t.exports=n("g3g5").Promise.finally},Tdpu:function(t,e,n){n("7DDg")("Float64",8,(function(t){return function(e,n,r){return t(this,e,n,r)}}))},Tze0:function(t,e,n){"use strict";n("qncB")("trim",(function(t){return function(){return t(this,3)}}))},U2t9:function(t,e,n){var r=n("XKFU"),i=Math.asinh;r(r.S+r.F*!(i&&1/i(0)>0),"Math",{asinh:function t(e){return isFinite(e=+e)&&0!=e?e<0?-t(-e):Math.log(e+Math.sqrt(e*e+1)):e}})},UExd:function(t,e,n){var r=n("nh4g"),i=n("DVgA"),o=n("aCFj"),a=n("UqcF").f;t.exports=function(t){return function(e){for(var n,s=o(e),c=i(s),u=c.length,l=0,f=[];u>l;)n=c[l++],r&&!a.call(s,n)||f.push(t?[n,s[n]]:s[n]);return f}}},UUeW:function(t,e,n){var r=n("K0xU")("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,!"/./"[t](e)}catch(t){}}return!0}},Ugos:function(t,e,n){"use strict";var r,i,o=n("C/va"),a=RegExp.prototype.exec,s=String.prototype.replace,c=a,u=(r=/a/,i=/b*/g,a.call(r,"a"),a.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),l=void 0!==/()??/.exec("")[1];(u||l)&&(c=function(t){var e,n,r,i,c=this;return l&&(n=new RegExp("^"+c.source+"$(?!\\s)",o.call(c))),u&&(e=c.lastIndex),r=a.call(c,t),u&&r&&(c.lastIndex=c.global?r.index+r[0].length:e),l&&r&&r.length>1&&s.call(r[0],n,(function(){for(i=1;io;)a(n[o++]);t._c=[],t._n=!1,e&&!t._h&&A(t)}))}},A=function(t){m.call(c,(function(){var e,n,r,i=t._v,o=j(t);if(o&&(e=w((function(){D?S.emit("unhandledRejection",i,t):(n=c.onunhandledrejection)?n({promise:t,reason:i}):(r=c.console)&&r.error&&r.error("Unhandled promise rejection",i)})),t._h=D||j(t)?2:1),t._a=void 0,o&&e.e)throw e.v}))},j=function(t){return 1!==t._h&&0===(t._a||t._c).length},L=function(t){m.call(c,(function(){var e;D?S.emit("rejectionHandled",t):(e=c.onrejectionhandled)&&e({promise:t,reason:t._v})}))},R=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),I(e,!0))},N=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw k("Promise can't be resolved itself");(e=P(t))?y((function(){var r={_w:n,_d:!1};try{e.call(t,u(N,r,1),u(R,r,1))}catch(t){R.call(r,t)}})):(n._v=t,n._s=1,I(n,!1))}catch(t){R.call({_w:n,_d:!1},t)}}};T||(F=function(t){h(this,F,"Promise","_h"),d(t),r.call(this);try{t(u(N,this,1),u(R,this,1))}catch(t){R.call(this,t)}},(r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n("3Lyj")(F.prototype,{then:function(t,e){var n=O(v(this,F));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=D?S.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&I(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new r;this.promise=t,this.resolve=u(N,t,1),this.reject=u(R,t,1)},b.f=O=function(t){return t===F||t===a?new o(t):i(t)}),f(f.G+f.W+f.F*!T,{Promise:F}),n("fyDq")(F,"Promise"),n("elZq")("Promise"),a=n("g3g5").Promise,f(f.S+f.F*!T,"Promise",{reject:function(t){var e=O(this);return(0,e.reject)(t),e.promise}}),f(f.S+f.F*(s||!T),"Promise",{resolve:function(t){return _(s&&this===a?F:this,t)}}),f(f.S+f.F*!(T&&n("XMVh")((function(t){F.all(t).catch(M)}))),"Promise",{all:function(t){var e=this,n=O(e),r=n.resolve,i=n.reject,o=w((function(){var n=[],o=0,a=1;g(t,!1,(function(t){var s=o++,c=!1;n.push(void 0),a++,e.resolve(t).then((function(t){c||(c=!0,n[s]=t,--a||r(n))}),i)})),--a||r(n)}));return o.e&&i(o.v),n.promise},race:function(t){var e=this,n=O(e),r=n.reject,i=w((function(){g(t,!1,(function(t){e.resolve(t).then(n.resolve,r)}))}));return i.e&&r(i.v),n.promise}})},VTer:function(t,e,n){var r=n("g3g5"),i=n("dyZX"),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n("LQAc")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},Vd3H:function(t,e,n){"use strict";var r=n("XKFU"),i=n("2OiF"),o=n("S/j/"),a=n("eeVq"),s=[].sort,c=[1,2,3];r(r.P+r.F*(a((function(){c.sort(void 0)}))||!a((function(){c.sort(null)}))||!n("LyE8")(s)),"Array",{sort:function(t){return void 0===t?s.call(o(this)):s.call(o(this),i(t))}})},VpUO:function(t,e,n){var r=n("XKFU"),i=n("d/Gc"),o=String.fromCharCode,a=String.fromCodePoint;r(r.S+r.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(t){for(var e,n=[],r=arguments.length,a=0;r>a;){if(e=+arguments[a++],i(e,1114111)!==e)throw RangeError(e+" is not a valid code point");n.push(e<65536?o(e):o(55296+((e-=65536)>>10),e%1024+56320))}return n.join("")}})},VsWn:function(t,e,n){n("7PI8"),t.exports=n("WEpk").global},W9dy:function(t,e,n){n("ioFf"),n("hHhE"),n("HAE/"),n("WLL4"),n("mYba"),n("5Pf0"),n("RW0V"),n("JduL"),n("DW2E"),n("z2o2"),n("mura"),n("Zshi"),n("V/DX"),n("FlsD"),n("91GP"),n("25dN"),n("/SS/"),n("Btvt"),n("2Spj"),n("f3/d"),n("IXt9"),n("GNAe"),n("tyy+"),n("xfY5"),n("A2zW"),n("VKir"),n("Ljet"),n("/KAi"),n("fN96"),n("7h0T"),n("sbF8"),n("h/M4"),n("knhD"),n("XfKG"),n("BP8U"),n("fyVe"),n("U2t9"),n("2atp"),n("+auO"),n("MtdB"),n("Jcmo"),n("nzyx"),n("BC7C"),n("x8ZO"),n("9P93"),n("eHKK"),n("BJ/l"),n("pp/T"),n("CyHz"),n("bBoP"),n("x8Yj"),n("hLT2"),n("VpUO"),n("eI33"),n("Tze0"),n("XfO3"),n("oDIu"),n("rvZc"),n("L9s1"),n("FLlr"),n("9VmF"),n("hEkN"),n("nIY7"),n("+oPb"),n("SMB2"),n("0mN4"),n("bDcW"),n("nsiH"),n("0LDn"),n("tUrg"),n("84bF"),n("FEjr"),n("Zz4T"),n("JCqj"),n("eM6i"),n("AphP"),n("jqX0"),n("h7Nl"),n("yM4b"),n("LK8F"),n("HEwt"),n("6AQ9"),n("Nz9U"),n("I78e"),n("Vd3H"),n("8+KV"),n("bWfx"),n("0l/t"),n("dZ+Y"),n("YJVH"),n("DNiP"),n("SPin"),n("V+eJ"),n("mGWK"),n("dE+T"),n("bHtr"),n("dRSK"),n("INYr"),n("0E+W"),n("yt8O"),n("Oyvg"),n("sMXx"),n("a1Th"),n("OEbY"),n("SRfc"),n("pIFo"),n("OG14"),n("KKXr"),n("VRzm"),n("9AAn"),n("T39b"),n("EK0E"),n("wCsR"),n("xm80"),n("Ji/l"),n("sFw1"),n("NO8f"),n("aqI/"),n("Faw5"),n("r1bV"),n("tuSo"),n("nCnK"),n("Y9lz"),n("Tdpu"),n("3xty"),n("I5cv"),n("iMoV"),n("uhZd"),n("f/aN"),n("0YWM"),n("694e"),n("LTTk"),n("9rMk"),n("IlFx"),n("xpiv"),n("oZ/O"),n("klPD"),n("knU9"),t.exports=n("g3g5")},WEpk:function(t,e){var n=t.exports={version:"2.6.10"};"number"==typeof __e&&(__e=n)},WLL4:function(t,e,n){var r=n("XKFU");r(r.S+r.F*!n("nh4g"),"Object",{defineProperties:n("FJW5")})},XKFU:function(t,e,n){var r=n("dyZX"),i=n("g3g5"),o=n("Mukb"),a=n("KroJ"),s=n("m0Pp"),c=function(t,e,n){var u,l,f,p,d=t&c.F,h=t&c.G,g=t&c.S,v=t&c.P,m=t&c.B,y=h?r:g?r[e]||(r[e]={}):(r[e]||{}).prototype,b=h?i:i[e]||(i[e]={}),w=b.prototype||(b.prototype={});for(u in h&&(n=e),n)f=((l=!d&&y&&void 0!==y[u])?y:n)[u],p=m&&l?s(f,r):v&&"function"==typeof f?s(Function.call,f):f,y&&a(y,u,f,t&c.U),b[u]!=f&&o(b,u,p),v&&w[u]!=f&&(w[u]=f)};r.core=i,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},XMVh:function(t,e,n){var r=n("K0xU")("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o=[7],a=o[r]();a.next=function(){return{done:n=!0}},o[r]=function(){return a},t(o)}catch(t){}return n}},Xbzi:function(t,e,n){var r=n("0/R4"),i=n("i5dc").set;t.exports=function(t,e,n){var o,a=e.constructor;return a!==n&&"function"==typeof a&&(o=a.prototype)!==n.prototype&&r(o)&&i&&i(t,o),t}},XfKG:function(t,e,n){var r=n("XKFU"),i=n("11IZ");r(r.S+r.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},XfO3:function(t,e,n){"use strict";var r=n("AvRE")(!0);n("Afnz")(String,"String",(function(t){this._t=String(t),this._i=0}),(function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})}))},Xtr8:function(t,e,n){var r=n("XKFU"),i=n("g3g5"),o=n("eeVq");t.exports=function(t,e){var n=(i.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*o((function(){n(1)})),"Object",a)}},Xxuz:function(t,e,n){"use strict";var r=n("I8a+"),i=RegExp.prototype.exec;t.exports=function(t,e){var n=t.exec;if("function"==typeof n){var o=n.call(t,e);if("object"!=typeof o)throw new TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(t))throw new TypeError("RegExp#exec called on incompatible receiver");return i.call(t,e)}},Y7ZC:function(t,e,n){var r=n("5T2Y"),i=n("WEpk"),o=n("2GTP"),a=n("NegM"),s=n("B+OT"),c=function(t,e,n){var u,l,f,p=t&c.F,d=t&c.G,h=t&c.S,g=t&c.P,v=t&c.B,m=t&c.W,y=d?i:i[e]||(i[e]={}),b=y.prototype,w=d?r:h?r[e]:(r[e]||{}).prototype;for(u in d&&(n=e),n)(l=!p&&w&&void 0!==w[u])&&s(y,u)||(f=l?w[u]:n[u],y[u]=d&&"function"!=typeof w[u]?n[u]:v&&l?o(f,r):m&&w[u]==f?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(f):g&&"function"==typeof f?o(Function.call,f):f,g&&((y.virtual||(y.virtual={}))[u]=f,t&c.R&&b&&!b[u]&&a(b,u,f)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},Y9lz:function(t,e,n){n("7DDg")("Float32",4,(function(t){return function(e,n,r){return t(this,e,n,r)}}))},YJVH:function(t,e,n){"use strict";var r=n("XKFU"),i=n("CkkT")(4);r(r.P+r.F*!n("LyE8")([].every,!0),"Array",{every:function(t){return i(this,t,arguments[1])}})},YTvA:function(t,e,n){var r=n("VTer")("keys"),i=n("ylqs");t.exports=function(t){return r[t]||(r[t]=i(t))}},Ymqv:function(t,e,n){var r=n("LZWt");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},Yp8f:function(t,e,n){n("6VaU"),t.exports=n("g3g5").Array.flatMap},Z2Ku:function(t,e,n){"use strict";var r=n("XKFU"),i=n("w2a5")(!0);r(r.P,"Array",{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n("nGyu")("includes")},Z6vF:function(t,e,n){var r=n("ylqs")("meta"),i=n("0/R4"),o=n("aagx"),a=n("hswa").f,s=0,c=Object.isExtensible||function(){return!0},u=!n("eeVq")((function(){return c(Object.preventExtensions({}))})),l=function(t){a(t,r,{value:{i:"O"+ ++s,w:{}}})},f=t.exports={KEY:r,NEED:!1,fastKey:function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,r)){if(!c(t))return"F";if(!e)return"E";l(t)}return t[r].i},getWeak:function(t,e){if(!o(t,r)){if(!c(t))return!0;if(!e)return!1;l(t)}return t[r].w},onFreeze:function(t){return u&&f.NEED&&c(t)&&!o(t,r)&&l(t),t}}},ZD67:function(t,e,n){"use strict";var r=n("3Lyj"),i=n("Z6vF").getWeak,o=n("y3w9"),a=n("0/R4"),s=n("9gX7"),c=n("SlkY"),u=n("CkkT"),l=n("aagx"),f=n("s5qY"),p=u(5),d=u(6),h=0,g=function(t){return t._l||(t._l=new v)},v=function(){this.a=[]},m=function(t,e){return p(t.a,(function(t){return t[0]===e}))};v.prototype={get:function(t){var e=m(this,t);if(e)return e[1]},has:function(t){return!!m(this,t)},set:function(t,e){var n=m(this,t);n?n[1]=e:this.a.push([t,e])},delete:function(t){var e=d(this.a,(function(e){return e[0]===t}));return~e&&this.a.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,n,o){var u=t((function(t,r){s(t,u,e,"_i"),t._t=e,t._i=h++,t._l=void 0,null!=r&&c(r,n,t[o],t)}));return r(u.prototype,{delete:function(t){if(!a(t))return!1;var n=i(t);return!0===n?g(f(this,e)).delete(t):n&&l(n,this._i)&&delete n[this._i]},has:function(t){if(!a(t))return!1;var n=i(t);return!0===n?g(f(this,e)).has(t):n&&l(n,this._i)}}),u},def:function(t,e,n){var r=i(o(e),!0);return!0===r?g(t).set(e,n):r[t._i]=n,t},ufstore:g}},Zshi:function(t,e,n){var r=n("0/R4");n("Xtr8")("isFrozen",(function(t){return function(e){return!r(e)||!!t&&t(e)}}))},Zz4T:function(t,e,n){"use strict";n("OGtf")("sub",(function(t){return function(){return t(this,"sub","","")}}))},a1Th:function(t,e,n){"use strict";n("OEbY");var r=n("y3w9"),i=n("C/va"),o=n("nh4g"),a=/./.toString,s=function(t){n("KroJ")(RegExp.prototype,"toString",t,!0)};n("eeVq")((function(){return"/a/b"!=a.call({source:"a",flags:"b"})}))?s((function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!o&&t instanceof RegExp?i.call(t):void 0)})):"toString"!=a.name&&s((function(){return a.call(this)}))},aCFj:function(t,e,n){var r=n("Ymqv"),i=n("vhPU");t.exports=function(t){return r(i(t))}},"aET+":function(t,e,n){var r,i,o={},a=(r=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===i&&(i=r.apply(this,arguments)),i}),s=function(t,e){return e?e.querySelector(t):document.querySelector(t)},c=function(t){var e={};return function(t,n){if("function"==typeof t)return t();if(void 0===e[t]){var r=s.call(this,t,n);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(t){r=null}e[t]=r}return e[t]}}(),u=null,l=0,f=[],p=n("9tPo");function d(t,e){for(var n=0;n=0&&f.splice(e,1)}function m(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var r=function(){0;return n.nc}();r&&(t.attrs.nonce=r)}return y(e,t.attrs),g(t,e),e}function y(t,e){Object.keys(e).forEach((function(n){t.setAttribute(n,e[n])}))}function b(t,e){var n,r,i,o;if(e.transform&&t.css){if(!(o="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=o}if(e.singleton){var a=l++;n=u||(u=m(e)),r=_.bind(null,n,a,!1),i=_.bind(null,n,a,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",y(e,t.attrs),g(t,e),e}(e),r=S.bind(null,n,e),i=function(){v(n),n.href&&URL.revokeObjectURL(n.href)}):(n=m(e),r=k.bind(null,n),i=function(){v(n)});return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else i()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=a()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=h(t,e);return d(n,e),function(t){for(var r=[],i=0;il;)for(var d,h=c(arguments[l++]),g=f?i(h).concat(f(h)):i(h),v=g.length,m=0;v>m;)d=g[m++],r&&!p.call(h,d)||(n[d]=h[d]);return n}:u},"d/Gc":function(t,e,n){var r=n("RYi7"),i=Math.max,o=Math.min;t.exports=function(t,e){return(t=r(t))<0?i(t+e,0):o(t,e)}},"dE+T":function(t,e,n){var r=n("XKFU");r(r.P,"Array",{copyWithin:n("upKx")}),n("nGyu")("copyWithin")},dRSK:function(t,e,n){"use strict";var r=n("XKFU"),i=n("CkkT")(5),o=!0;"find"in[]&&Array(1).find((function(){o=!1})),r(r.P+r.F*o,"Array",{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n("nGyu")("find")},"dZ+Y":function(t,e,n){"use strict";var r=n("XKFU"),i=n("CkkT")(3);r(r.P+r.F*!n("LyE8")([].some,!0),"Array",{some:function(t){return i(this,t,arguments[1])}})},dasq:function(t,e,n){(function(t){!function(t){"use strict";var e,n=t.URLSearchParams&&t.URLSearchParams.prototype.get?t.URLSearchParams:null,r=n&&"a=1"===new n({a:1}).toString(),i=n&&"+"===new n("s=%2B").get("s"),o="__URLSearchParams__",a=!n||((e=new n).append("s"," &"),"s=+%26"===e.toString()),s=f.prototype,c=!(!t.Symbol||!t.Symbol.iterator);if(!(n&&r&&i&&a)){s.append=function(t,e){v(this[o],t,e)},s.delete=function(t){delete this[o][t]},s.get=function(t){var e=this[o];return t in e?e[t][0]:null},s.getAll=function(t){var e=this[o];return t in e?e[t].slice(0):[]},s.has=function(t){return t in this[o]},s.set=function(t,e){this[o][t]=[""+e]},s.toString=function(){var t,e,n,r,i=this[o],a=[];for(e in i)for(n=p(e),t=0,r=i[e];ts;)a.push(String(e[s++])),s=0:f>p;p+=d)p in l&&(s=e(s,l[p],p,u));return s}},"f/aN":function(t,e,n){"use strict";var r=n("XKFU"),i=n("y3w9"),o=function(t){this._t=i(t),this._i=0;var e,n=this._k=[];for(e in t)n.push(e)};n("QaDb")(o,"Object",(function(){var t,e=this._k;do{if(this._i>=e.length)return{value:void 0,done:!0}}while(!((t=e[this._i++])in this._t));return{value:t,done:!1}})),r(r.S,"Reflect",{enumerate:function(t){return new o(t)}})},"f3/d":function(t,e,n){var r=n("hswa").f,i=Function.prototype,o=/^\s*function ([^ (]*)/;"name"in i||n("nh4g")&&r(i,"name",{configurable:!0,get:function(){try{return(""+this).match(o)[1]}catch(t){return""}}})},fA63:function(t,e,n){"use strict";n("qncB")("trimRight",(function(t){return function(){return t(this,2)}}),"trimEnd")},fN96:function(t,e,n){var r=n("XKFU");r(r.S,"Number",{isInteger:n("nBIS")})},fyDq:function(t,e,n){var r=n("hswa").f,i=n("aagx"),o=n("K0xU")("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},fyVe:function(t,e,n){var r=n("XKFU"),i=n("1sa7"),o=Math.sqrt,a=Math.acosh;r(r.S+r.F*!(a&&710==Math.floor(a(Number.MAX_VALUE))&&a(1/0)==1/0),"Math",{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?Math.log(t)+Math.LN2:i(t-1+o(t-1)*o(t+1))}})},g2aq:function(t,e,n){"use strict";n("W9dy"),n("FDph"),n("Yp8f"),n("wYy3"),n("QNwp"),n("Izvi"),n("ln0Z"),n("wDwx"),n("+Xmh"),n("zFFn"),n("JbTB"),n("TIpR"),n("FxUG"),n("ls82")},g3g5:function(t,e){var n=t.exports={version:"2.6.10"};"number"==typeof __e&&(__e=n)},g4EE:function(t,e,n){"use strict";var r=n("y3w9"),i=n("apmT");t.exports=function(t){if("string"!==t&&"number"!==t&&"default"!==t)throw TypeError("Incorrect hint");return i(r(this),"number"!=t)}},g6HL:function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},gHnn:function(t,e,n){var r=n("dyZX"),i=n("GZEu").set,o=r.MutationObserver||r.WebKitMutationObserver,a=r.process,s=r.Promise,c="process"==n("LZWt")(a);t.exports=function(){var t,e,n,u=function(){var r,i;for(c&&(r=a.domain)&&r.exit();t;){i=t.fn,t=t.next;try{i()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(c)n=function(){a.nextTick(u)};else if(!o||r.navigator&&r.navigator.standalone)if(s&&s.resolve){var l=s.resolve(void 0);n=function(){l.then(u)}}else n=function(){i.call(r,u)};else{var f=!0,p=document.createTextNode("");new o(u).observe(p,{characterData:!0}),n=function(){p.data=f=!f}}return function(r){var i={fn:r,next:void 0};e&&(e.next=i),t||(t=i,n()),e=i}}},"h/M4":function(t,e,n){var r=n("XKFU");r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},h7Nl:function(t,e,n){var r=Date.prototype,i=r.toString,o=r.getTime;new Date(NaN)+""!="Invalid Date"&&n("KroJ")(r,"toString",(function(){var t=o.call(this);return t==t?i.call(this):"Invalid Date"}))},hEkN:function(t,e,n){"use strict";n("OGtf")("anchor",(function(t){return function(e){return t(this,"a","name",e)}}))},hHhE:function(t,e,n){var r=n("XKFU");r(r.S,"Object",{create:n("Kuth")})},hLT2:function(t,e,n){var r=n("XKFU");r(r.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},hPIQ:function(t,e){t.exports={}},hfxi:function(t,e,n){(t.exports=n("I1BE")(!1)).push([t.i,"\n.preview-wrapper{\n height:200px;\n width:200px;\n padding:5px;\n}\n.image-preview{\n height:190px;\n width:190px;\n}\n",""])},hhXQ:function(t,e,n){var r=n("XKFU"),i=n("UExd")(!1);r(r.S,"Object",{values:function(t){return i(t)}})},hswa:function(t,e,n){var r=n("y3w9"),i=n("xpql"),o=n("apmT"),a=Object.defineProperty;e.f=n("nh4g")?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},i5dc:function(t,e,n){var r=n("0/R4"),i=n("y3w9"),o=function(t,e){if(i(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{(r=n("m0Pp")(Function.call,n("EemH").f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return o(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:o}},iMoV:function(t,e,n){var r=n("hswa"),i=n("XKFU"),o=n("y3w9"),a=n("apmT");i(i.S+i.F*n("eeVq")((function(){Reflect.defineProperty(r.f({},1,{value:1}),1,{value:2})})),"Reflect",{defineProperty:function(t,e,n){o(t),e=a(e,!0),o(n);try{return r.f(t,e,n),!0}catch(t){return!1}}})},ioFf:function(t,e,n){"use strict";var r=n("dyZX"),i=n("aagx"),o=n("nh4g"),a=n("XKFU"),s=n("KroJ"),c=n("Z6vF").KEY,u=n("eeVq"),l=n("VTer"),f=n("fyDq"),p=n("ylqs"),d=n("K0xU"),h=n("N8g3"),g=n("OnI7"),v=n("1MBn"),m=n("EWmC"),y=n("y3w9"),b=n("0/R4"),w=n("S/j/"),x=n("aCFj"),_=n("apmT"),k=n("RjD/"),S=n("Kuth"),C=n("e7yV"),E=n("EemH"),F=n("JiEa"),D=n("hswa"),M=n("DVgA"),O=E.f,T=D.f,P=C.f,I=r.Symbol,A=r.JSON,j=A&&A.stringify,L=d("_hidden"),R=d("toPrimitive"),N={}.propertyIsEnumerable,U=l("symbol-registry"),V=l("symbols"),B=l("op-symbols"),K=Object.prototype,X="function"==typeof I&&!!F.f,z=r.QObject,Y=!z||!z.prototype||!z.prototype.findChild,q=o&&u((function(){return 7!=S(T({},"a",{get:function(){return T(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=O(K,e);r&&delete K[e],T(t,e,n),r&&t!==K&&T(K,e,r)}:T,W=function(t){var e=V[t]=S(I.prototype);return e._k=t,e},H=X&&"symbol"==typeof I.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof I},$=function(t,e,n){return t===K&&$(B,e,n),y(t),e=_(e,!0),y(n),i(V,e)?(n.enumerable?(i(t,L)&&t[L][e]&&(t[L][e]=!1),n=S(n,{enumerable:k(0,!1)})):(i(t,L)||T(t,L,k(1,{})),t[L][e]=!0),q(t,e,n)):T(t,e,n)},G=function(t,e){y(t);for(var n,r=v(e=x(e)),i=0,o=r.length;o>i;)$(t,n=r[i++],e[n]);return t},Z=function(t){var e=N.call(this,t=_(t,!0));return!(this===K&&i(V,t)&&!i(B,t))&&(!(e||!i(this,t)||!i(V,t)||i(this,L)&&this[L][t])||e)},J=function(t,e){if(t=x(t),e=_(e,!0),t!==K||!i(V,e)||i(B,e)){var n=O(t,e);return!n||!i(V,e)||i(t,L)&&t[L][e]||(n.enumerable=!0),n}},Q=function(t){for(var e,n=P(x(t)),r=[],o=0;n.length>o;)i(V,e=n[o++])||e==L||e==c||r.push(e);return r},tt=function(t){for(var e,n=t===K,r=P(n?B:x(t)),o=[],a=0;r.length>a;)!i(V,e=r[a++])||n&&!i(K,e)||o.push(V[e]);return o};X||(s((I=function(){if(this instanceof I)throw TypeError("Symbol is not a constructor!");var t=p(arguments.length>0?arguments[0]:void 0),e=function(n){this===K&&e.call(B,n),i(this,L)&&i(this[L],t)&&(this[L][t]=!1),q(this,t,k(1,n))};return o&&Y&&q(K,t,{configurable:!0,set:e}),W(t)}).prototype,"toString",(function(){return this._k})),E.f=J,D.f=$,n("kJMx").f=C.f=Q,n("UqcF").f=Z,F.f=tt,o&&!n("LQAc")&&s(K,"propertyIsEnumerable",Z,!0),h.f=function(t){return W(d(t))}),a(a.G+a.W+a.F*!X,{Symbol:I});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;et.length>nt;)d(et[nt++]);for(var rt=M(d.store),it=0;rt.length>it;)g(rt[it++]);a(a.S+a.F*!X,"Symbol",{for:function(t){return i(U,t+="")?U[t]:U[t]=I(t)},keyFor:function(t){if(!H(t))throw TypeError(t+" is not a symbol!");for(var e in U)if(U[e]===t)return e},useSetter:function(){Y=!0},useSimple:function(){Y=!1}}),a(a.S+a.F*!X,"Object",{create:function(t,e){return void 0===e?S(t):G(S(t),e)},defineProperty:$,defineProperties:G,getOwnPropertyDescriptor:J,getOwnPropertyNames:Q,getOwnPropertySymbols:tt});var ot=u((function(){F.f(1)}));a(a.S+a.F*ot,"Object",{getOwnPropertySymbols:function(t){return F.f(w(t))}}),A&&a(a.S+a.F*(!X||u((function(){var t=I();return"[null]"!=j([t])||"{}"!=j({a:t})||"{}"!=j(Object(t))}))),"JSON",{stringify:function(t){for(var e,n,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=e=r[1],(b(e)||void 0!==t)&&!H(t))return m(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!H(e))return e}),r[1]=e,j.apply(A,r)}}),I.prototype[R]||n("Mukb")(I.prototype,R,I.prototype.valueOf),f(I,"Symbol"),f(Math,"Math",!0),f(r.JSON,"JSON",!0)},"jl8+":function(t,e,n){t.exports=function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/",e(e.s=60)}([function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){var r=n(49)("wks"),i=n(30),o=n(0).Symbol,a="function"==typeof o;(t.exports=function(t){return r[t]||(r[t]=a&&o[t]||(a?o:i)("Symbol."+t))}).store=r},function(t,e,n){var r=n(5);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){var r=n(0),i=n(10),o=n(8),a=n(6),s=n(11),c=function(t,e,n){var u,l,f,p,d=t&c.F,h=t&c.G,g=t&c.S,v=t&c.P,m=t&c.B,y=h?r:g?r[e]||(r[e]={}):(r[e]||{}).prototype,b=h?i:i[e]||(i[e]={}),w=b.prototype||(b.prototype={});for(u in h&&(n=e),n)f=((l=!d&&y&&void 0!==y[u])?y:n)[u],p=m&&l?s(f,r):v&&"function"==typeof f?s(Function.call,f):f,y&&a(y,u,f,t&c.U),b[u]!=f&&o(b,u,p),v&&w[u]!=f&&(w[u]=f)};r.core=i,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,e,n){t.exports=!n(7)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var r=n(0),i=n(8),o=n(12),a=n(30)("src"),s=Function.toString,c=(""+s).split("toString");n(10).inspectSource=function(t){return s.call(t)},(t.exports=function(t,e,n,s){var u="function"==typeof n;u&&(o(n,"name")||i(n,"name",e)),t[e]!==n&&(u&&(o(n,a)||i(n,a,t[e]?""+t[e]:c.join(String(e)))),t===r?t[e]=n:s?t[e]?t[e]=n:i(t,e,n):(delete t[e],i(t,e,n)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[a]||s.call(this)}))},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var r=n(13),i=n(25);t.exports=n(4)?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){var n=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},function(t,e,n){var r=n(14);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(2),i=n(41),o=n(29),a=Object.defineProperty;e.f=n(4)?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){t.exports={}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){"use strict";var r=n(7);t.exports=function(t,e){return!!t&&r((function(){e?t.call(null,(function(){}),1):t.call(null)}))}},function(t,e,n){var r=n(23),i=n(16);t.exports=function(t){return r(i(t))}},function(t,e,n){var r=n(53),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,e,n){var r=n(11),i=n(23),o=n(28),a=n(19),s=n(64);t.exports=function(t,e){var n=1==t,c=2==t,u=3==t,l=4==t,f=6==t,p=5==t||f,d=e||s;return function(e,s,h){for(var g,v,m=o(e),y=i(m),b=r(s,h,3),w=a(y.length),x=0,_=n?d(e,w):c?d(e,0):void 0;w>x;x++)if((p||x in y)&&(v=b(g=y[x],x,m),t))if(n)_[x]=v;else if(v)switch(t){case 3:return!0;case 5:return g;case 6:return x;case 2:_.push(g)}else if(l)return!1;return f?-1:u||l?l:_}}},function(t,e,n){var r=n(5),i=n(0).document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var r=n(9);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e){t.exports=!1},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(13).f,i=n(12),o=n(1)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},function(t,e,n){var r=n(49)("keys"),i=n(30);t.exports=function(t){return r[t]||(r[t]=i(t))}},function(t,e,n){var r=n(16);t.exports=function(t){return Object(r(t))}},function(t,e,n){var r=n(5);t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e,n){"use strict";var r=n(0),i=n(12),o=n(9),a=n(67),s=n(29),c=n(7),u=n(77).f,l=n(45).f,f=n(13).f,p=n(51).trim,d=r.Number,h=d,g=d.prototype,v="Number"==o(n(44)(g)),m="trim"in String.prototype,y=function(t){var e=s(t,!1);if("string"==typeof e&&e.length>2){var n,r,i,o=(e=m?e.trim():p(e,3)).charCodeAt(0);if(43===o||45===o){if(88===(n=e.charCodeAt(2))||120===n)return NaN}else if(48===o){switch(e.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+e}for(var a,c=e.slice(2),u=0,l=c.length;ui)return NaN;return parseInt(c,r)}}return+e};if(!d(" 0o1")||!d("0b1")||d("+0x1")){d=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof d&&(v?c((function(){g.valueOf.call(n)})):"Number"!=o(n))?a(new h(y(e)),n,d):y(e)};for(var b,w=n(4)?u(h):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),x=0;w.length>x;x++)i(h,b=w[x])&&!i(d,b)&&f(d,b,l(h,b));d.prototype=g,g.constructor=d,n(6)(r,"Number",d)}},function(t,e,n){"use strict";function r(t){return!(0===t||(!Array.isArray(t)||0!==t.length)&&t)}function i(t,e,n,r){return t.filter((function(t){return function(t,e){return void 0===t&&(t="undefined"),null===t&&(t="null"),!1===t&&(t="false"),-1!==t.toString().toLowerCase().indexOf(e.trim())}(r(t,n),e)}))}function o(t){return t.filter((function(t){return!t.$isLabel}))}function a(t,e){return function(n){return n.reduce((function(n,r){return r[t]&&r[t].length?(n.push({$groupLabel:r[e],$isLabel:!0}),n.concat(r[t])):n}),[])}}function s(t,e,r,o,a){return function(s){return s.map((function(s){var c;if(!s[r])return console.warn("Options passed to vue-multiselect do not contain groups, despite the config."),[];var u=i(s[r],t,e,a);return u.length?(c={},n.i(p.a)(c,o,s[o]),n.i(p.a)(c,r,u),c):[]}))}}var c=n(59),u=n(54),l=(n.n(u),n(95)),f=(n.n(l),n(31)),p=(n.n(f),n(58)),d=n(91),h=(n.n(d),n(98)),g=(n.n(h),n(92)),v=(n.n(g),n(88)),m=(n.n(v),n(97)),y=(n.n(m),n(89)),b=(n.n(y),n(96)),w=(n.n(b),n(93)),x=(n.n(w),n(90)),_=(n.n(x),function(){for(var t=arguments.length,e=new Array(t),n=0;n-1},isSelected:function(t){var e=this.trackBy?t[this.trackBy]:t;return this.valueKeys.indexOf(e)>-1},isOptionDisabled:function(t){return!!t.$isDisabled},getOptionLabel:function(t){if(r(t))return"";if(t.isTag)return t.label;if(t.$isLabel)return t.$groupLabel;var e=this.customLabel(t,this.label);return r(e)?"":e},select:function(t,e){if(t.$isLabel&&this.groupSelect)this.selectGroup(t);else if(!(-1!==this.blockKeys.indexOf(e)||this.disabled||t.$isDisabled||t.$isLabel)&&(!this.max||!this.multiple||this.internalValue.length!==this.max)&&("Tab"!==e||this.pointerDirty)){if(t.isTag)this.$emit("tag",t.label,this.id),this.search="",this.closeOnSelect&&!this.multiple&&this.deactivate();else{if(this.isSelected(t))return void("Tab"!==e&&this.removeElement(t));this.$emit("select",t,this.id),this.multiple?this.$emit("input",this.internalValue.concat([t]),this.id):this.$emit("input",t,this.id),this.clearOnSelect&&(this.search="")}this.closeOnSelect&&this.deactivate()}},selectGroup:function(t){var e=this,n=this.options.find((function(n){return n[e.groupLabel]===t.$groupLabel}));if(n)if(this.wholeGroupSelected(n)){this.$emit("remove",n[this.groupValues],this.id);var r=this.internalValue.filter((function(t){return-1===n[e.groupValues].indexOf(t)}));this.$emit("input",r,this.id)}else{var i=n[this.groupValues].filter((function(t){return!(e.isOptionDisabled(t)||e.isSelected(t))}));this.$emit("select",i,this.id),this.$emit("input",this.internalValue.concat(i),this.id)}},wholeGroupSelected:function(t){var e=this;return t[this.groupValues].every((function(t){return e.isSelected(t)||e.isOptionDisabled(t)}))},wholeGroupDisabled:function(t){return t[this.groupValues].every(this.isOptionDisabled)},removeElement:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!this.disabled&&!t.$isDisabled){if(!this.allowEmpty&&this.internalValue.length<=1)return void this.deactivate();var r="object"===n.i(c.a)(t)?this.valueKeys.indexOf(t[this.trackBy]):this.valueKeys.indexOf(t);if(this.$emit("remove",t,this.id),this.multiple){var i=this.internalValue.slice(0,r).concat(this.internalValue.slice(r+1));this.$emit("input",i,this.id)}else this.$emit("input",null,this.id);this.closeOnSelect&&e&&this.deactivate()}},removeLastElement:function(){-1===this.blockKeys.indexOf("Delete")&&0===this.search.length&&Array.isArray(this.internalValue)&&this.internalValue.length&&this.removeElement(this.internalValue[this.internalValue.length-1],!1)},activate:function(){var t=this;this.isOpen||this.disabled||(this.adjustPosition(),this.groupValues&&0===this.pointer&&this.filteredOptions.length&&(this.pointer=1),this.isOpen=!0,this.searchable?(this.preserveSearch||(this.search=""),this.$nextTick((function(){return t.$refs.search.focus()}))):this.$el.focus(),this.$emit("open",this.id))},deactivate:function(){this.isOpen&&(this.isOpen=!1,this.searchable?this.$refs.search.blur():this.$el.blur(),this.preserveSearch||(this.search=""),this.$emit("close",this.getValue(),this.id))},toggle:function(){this.isOpen?this.deactivate():this.activate()},adjustPosition:function(){if("undefined"!=typeof window){var t=this.$el.getBoundingClientRect().top,e=window.innerHeight-this.$el.getBoundingClientRect().bottom;e>this.maxHeight||e>t||"below"===this.openDirection||"bottom"===this.openDirection?(this.preferredOpenDirection="below",this.optimizedHeight=Math.min(e-40,this.maxHeight)):(this.preferredOpenDirection="above",this.optimizedHeight=Math.min(t-40,this.maxHeight))}}}}},function(t,e,n){"use strict";var r=n(54),i=(n.n(r),n(31));n.n(i),e.a={data:function(){return{pointer:0,pointerDirty:!1}},props:{showPointer:{type:Boolean,default:!0},optionHeight:{type:Number,default:40}},computed:{pointerPosition:function(){return this.pointer*this.optionHeight},visibleElements:function(){return this.optimizedHeight/this.optionHeight}},watch:{filteredOptions:function(){this.pointerAdjust()},isOpen:function(){this.pointerDirty=!1}},methods:{optionHighlight:function(t,e){return{"multiselect__option--highlight":t===this.pointer&&this.showPointer,"multiselect__option--selected":this.isSelected(e)}},groupHighlight:function(t,e){var n=this;if(!this.groupSelect)return["multiselect__option--group","multiselect__option--disabled"];var r=this.options.find((function(t){return t[n.groupLabel]===e.$groupLabel}));return r&&!this.wholeGroupDisabled(r)?["multiselect__option--group",{"multiselect__option--highlight":t===this.pointer&&this.showPointer},{"multiselect__option--group-selected":this.wholeGroupSelected(r)}]:"multiselect__option--disabled"},addPointerElement:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Enter",e=t.key;this.filteredOptions.length>0&&this.select(this.filteredOptions[this.pointer],e),this.pointerReset()},pointerForward:function(){this.pointer0?(this.pointer--,this.$refs.list.scrollTop>=this.pointerPosition&&(this.$refs.list.scrollTop=this.pointerPosition),this.filteredOptions[this.pointer]&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerBackward()):this.filteredOptions[this.pointer]&&this.filteredOptions[0].$isLabel&&!this.groupSelect&&this.pointerForward(),this.pointerDirty=!0},pointerReset:function(){this.closeOnSelect&&(this.pointer=0,this.$refs.list&&(this.$refs.list.scrollTop=0))},pointerAdjust:function(){this.pointer>=this.filteredOptions.length-1&&(this.pointer=this.filteredOptions.length?this.filteredOptions.length-1:0),this.filteredOptions.length>0&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerForward()},pointerSet:function(t){this.pointer=t,this.pointerDirty=!0}}}},function(t,e,n){"use strict";var r=n(36),i=n(74),o=n(15),a=n(18);t.exports=n(72)(Array,"Array",(function(t,e){this._t=a(t),this._i=0,this._k=e}),(function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,i(1)):i(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])}),"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(t,e,n){"use strict";var r=n(31),i=(n.n(r),n(32)),o=n(33);e.a={name:"vue-multiselect",mixins:[i.a,o.a],props:{name:{type:String,default:""},selectLabel:{type:String,default:"Press enter to select"},selectGroupLabel:{type:String,default:"Press enter to select group"},selectedLabel:{type:String,default:"Selected"},deselectLabel:{type:String,default:"Press enter to remove"},deselectGroupLabel:{type:String,default:"Press enter to deselect group"},showLabels:{type:Boolean,default:!0},limit:{type:Number,default:99999},maxHeight:{type:Number,default:300},limitText:{type:Function,default:function(t){return"and ".concat(t," more")}},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},openDirection:{type:String,default:""},showNoOptions:{type:Boolean,default:!0},showNoResults:{type:Boolean,default:!0},tabindex:{type:Number,default:0}},computed:{isSingleLabelVisible:function(){return(this.singleValue||0===this.singleValue)&&(!this.isOpen||!this.searchable)&&!this.visibleValues.length},isPlaceholderVisible:function(){return!(this.internalValue.length||this.searchable&&this.isOpen)},visibleValues:function(){return this.multiple?this.internalValue.slice(0,this.limit):[]},singleValue:function(){return this.internalValue[0]},deselectLabelText:function(){return this.showLabels?this.deselectLabel:""},deselectGroupLabelText:function(){return this.showLabels?this.deselectGroupLabel:""},selectLabelText:function(){return this.showLabels?this.selectLabel:""},selectGroupLabelText:function(){return this.showLabels?this.selectGroupLabel:""},selectedLabelText:function(){return this.showLabels?this.selectedLabel:""},inputStyle:function(){if(this.searchable||this.multiple&&this.value&&this.value.length)return this.isOpen?{width:"100%"}:{width:"0",position:"absolute",padding:"0"}},contentStyle:function(){return this.options.length?{display:"inline-block"}:{display:"block"}},isAbove:function(){return"above"===this.openDirection||"top"===this.openDirection||"below"!==this.openDirection&&"bottom"!==this.openDirection&&"above"===this.preferredOpenDirection},showSearchInput:function(){return this.searchable&&(!this.hasSingleSelectedSlot||!this.visibleSingleValue&&0!==this.visibleSingleValue||this.isOpen)}}}},function(t,e,n){var r=n(1)("unscopables"),i=Array.prototype;null==i[r]&&n(8)(i,r,{}),t.exports=function(t){i[r][t]=!0}},function(t,e,n){var r=n(18),i=n(19),o=n(85);t.exports=function(t){return function(e,n,a){var s,c=r(e),u=i(c.length),l=o(a,u);if(t&&n!=n){for(;u>l;)if((s=c[l++])!=s)return!0}else for(;u>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}}},function(t,e,n){var r=n(9),i=n(1)("toStringTag"),o="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),i))?n:o?r(e):"Object"==(a=r(e))&&"function"==typeof e.callee?"Arguments":a}},function(t,e,n){"use strict";var r=n(2);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,n){var r=n(0).document;t.exports=r&&r.documentElement},function(t,e,n){t.exports=!n(4)&&!n(7)((function(){return 7!=Object.defineProperty(n(21)("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){var r=n(9);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){"use strict";function r(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=i(e),this.reject=i(n)}var i=n(14);t.exports.f=function(t){return new r(t)}},function(t,e,n){var r=n(2),i=n(76),o=n(22),a=n(27)("IE_PROTO"),s=function(){},c=function(){var t,e=n(21)("iframe"),r=o.length;for(e.style.display="none",n(40).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write(" \ No newline at end of file diff --git a/packages/Webkul/User/src/Database/Seeders/AdminsTableSeeder.php b/packages/Webkul/User/src/Database/Seeders/AdminsTableSeeder.php index 517d9b4cc..e8a872767 100755 --- a/packages/Webkul/User/src/Database/Seeders/AdminsTableSeeder.php +++ b/packages/Webkul/User/src/Database/Seeders/AdminsTableSeeder.php @@ -2,6 +2,7 @@ namespace Webkul\User\Database\Seeders; +use Illuminate\Support\Str; use Illuminate\Database\Seeder; use DB; @@ -16,6 +17,9 @@ class AdminsTableSeeder extends Seeder 'name' => 'Example', 'email' => 'admin@example.com', 'password' => bcrypt('admin123'), + 'api_token' => Str::random(80), + 'created_at' => date('Y-m-d H:i:s'), + 'updated_at' => date('Y-m-d H:i:s'), 'status' => 1, 'role_id' => 1, ]); diff --git a/packages/Webkul/User/src/Http/Controllers/UserController.php b/packages/Webkul/User/src/Http/Controllers/UserController.php index 8a680fcc6..4ff670d0e 100755 --- a/packages/Webkul/User/src/Http/Controllers/UserController.php +++ b/packages/Webkul/User/src/Http/Controllers/UserController.php @@ -2,6 +2,7 @@ namespace Webkul\User\Http\Controllers; +use Illuminate\Support\Str; use Illuminate\Support\Facades\Event; use Webkul\User\Repositories\AdminRepository; use Webkul\User\Repositories\RoleRepository; @@ -90,8 +91,10 @@ class UserController extends Controller { $data = $request->all(); - if (isset($data['password']) && $data['password']) + if (isset($data['password']) && $data['password']) { $data['password'] = bcrypt($data['password']); + $data['api_token'] = Str::random(80); + } Event::dispatch('user.admin.create.before'); @@ -130,10 +133,11 @@ class UserController extends Controller { $data = $request->all(); - if (! $data['password']) + if (! $data['password']) { unset($data['password']); - else + } else { $data['password'] = bcrypt($data['password']); + } if (isset($data['status'])) { $data['status'] = 1; diff --git a/packages/Webkul/User/src/Models/Admin.php b/packages/Webkul/User/src/Models/Admin.php index 5757e1ff6..a35fce6e1 100755 --- a/packages/Webkul/User/src/Models/Admin.php +++ b/packages/Webkul/User/src/Models/Admin.php @@ -19,7 +19,7 @@ class Admin extends Authenticatable implements AdminContract * @var array */ protected $fillable = [ - 'name', 'email', 'password', 'role_id', 'status', + 'name', 'email', 'password', 'api_token', 'role_id', 'status', ]; /** @@ -28,7 +28,7 @@ class Admin extends Authenticatable implements AdminContract * @var array */ protected $hidden = [ - 'password', 'remember_token', + 'password', 'api_token', 'remember_token', ]; /** diff --git a/public/installer/Email.php b/public/installer/Email.php index a579e99f6..5d535395e 100644 --- a/public/installer/Email.php +++ b/public/installer/Email.php @@ -28,15 +28,15 @@
- +
- +
- +
@@ -71,7 +71,7 @@ var EmailTarget = window.location.href.concat('/EmailConfig.php'); - $.ajax({type : 'POST', url : EmailTarget, data : mailformData, dataType : 'json', encode : true}) + $.ajax({type : 'POST', url : EmailTarget, data : mailformData, dataType : 'json', encode : true}) .done(function(data) { if (!data.success) { // handle errors @@ -112,7 +112,7 @@ } else { $('#admin').hide(); $('#email').hide(); - $('#finish').show(); + $('#finish').show(); } }); // stop the form from submitting the normal way and refreshing the page diff --git a/public/installer/index.php b/public/installer/index.php index c49424f86..395084dbf 100755 --- a/public/installer/index.php +++ b/public/installer/index.php @@ -25,15 +25,7 @@ - +
+ Powered by Bagisto, A Community Project by + Webkul +
+ diff --git a/storage/app/db-blade-compiler/views/.gitignore b/storage/app/db-blade-compiler/views/.gitignore old mode 100755 new mode 100644 diff --git a/tests/_support/FunctionalTester.php b/tests/_support/FunctionalTester.php index 38b53fd7d..41b348f5a 100644 --- a/tests/_support/FunctionalTester.php +++ b/tests/_support/FunctionalTester.php @@ -5,7 +5,7 @@ use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Route; use Webkul\User\Models\Admin; - +use Webkul\Customer\Models\Customer; /** * Inherited Methods @@ -31,26 +31,65 @@ class FunctionalTester extends \Codeception\Actor */ /** - * Login as default administrator + * Set the logged in user to the admin identity. + * + * @param \Webkul\User\Models\Admin|null $admin + * + * @throws \Exception + * @returns Admin */ - public function loginAsAdmin(): void + public function loginAsAdmin(Admin $admin = null): Admin { $I = $this; - Auth::guard('admin')->login($I->grabRecord(Admin::class, ['email' => 'admin@example.com'])); + if (! $admin) { + $admin = $I->grabRecord(Admin::class, ['email' => 'admin@example.com']); + } + + if (! $admin) { + throw new \Exception( + 'Admin user not found in database. Please ensure Seeders are executed'); + } + + Auth::guard('admin') + ->login($admin); + $I->seeAuthentication('admin'); + + return $admin; } /** - * Go to a specific route and check if admin guard is applied on it + * Set the logged in user to the customer identity. * - * @param string $name name of the route - * @param array|null $params params the route will be created with + * @param \Webkul\User\Models\Customer|null $customer + * + * @throws \Exception + * @returns Customer */ - public function amOnAdminRoute(string $name, array $params = null): void + public function loginAsCustomer(Customer $customer = null): Customer { $I = $this; - $I->amOnRoute($name, $params); + + if (! $customer) { + $customer = $I->have(Customer::class); + } + + Auth::guard('customer') + ->login($customer); + + $I->seeAuthentication('customer'); + + return $customer; + } + + /** + * @param string $name + */ + public function amOnAdminRoute(string $name) + { + $I = $this; + $I->amOnRoute($name); $I->seeCurrentRouteIs($name); /** @var RouteCollection $routes */ diff --git a/tests/functional/Admin/Sales/InvoiceCest.php b/tests/functional/Admin/Sales/InvoiceCest.php index 7734db70c..7a82812dd 100644 --- a/tests/functional/Admin/Sales/InvoiceCest.php +++ b/tests/functional/Admin/Sales/InvoiceCest.php @@ -2,12 +2,10 @@ namespace Tests\Functional\Admin\Sales; - use FunctionalTester; use Webkul\Sales\Models\Invoice; use Webkul\Sales\Models\OrderAddress; - class InvoiceCest { public function testIndex(FunctionalTester $I): void @@ -16,7 +14,7 @@ class InvoiceCest $invoice = $I->have(Invoice::class, [ 'order_id' => $orderAddress->order_id, - 'order_address_id' => $orderAddress->id + 'order_address_id' => $orderAddress->id, ]); $I->loginAsAdmin(); diff --git a/tests/functional/Customer/CustomerCest.php b/tests/functional/Customer/CustomerCest.php new file mode 100644 index 000000000..b3c0f9256 --- /dev/null +++ b/tests/functional/Customer/CustomerCest.php @@ -0,0 +1,125 @@ +loginAsCustomer(); + + $I->amOnPage('/'); + + $I->click('Profile'); + + $I->click('Edit'); + + $I->selectOption('gender', 'Other'); + + $I->click('Update Profile'); + + $I->dontSeeInSource('The old password does not match.'); + + $I->seeInSource('Profile updated successfully.'); + + $I->seeRecord(Customer::class, [ + 'id' => $customer->id, + 'gender' => 'Other', + ]); + } + + public function updateCustomerAddress(FunctionalTester $I) + { + $I->wantTo('Instantiate a european faker factory to have the vat provider available'); + $faker = Faker\Factory::create('at_AT'); + + $formCssSelector = '#customer-address-form'; + + $I->loginAsCustomer(); + + $I->amOnPage('/'); + + $I->click('Profile'); + + $I->click('Address'); + + $I->click('Add Address'); + + $this->fields = [ + 'company_name' => $faker->company, + 'vat_id' => 'INVALIDVAT', + 'address1[]' => $faker->streetAddress, + 'country' => $faker->countryCode, + 'state' => $faker->state, + 'city' => $faker->city, + 'postcode' => $faker->postcode, + 'phone' => $faker->phoneNumber, + ]; + + foreach ($this->fields as $key => $value) { + // the following fields are being rendered via javascript so we ignore them: + if (! in_array($key, [ + 'country', + 'state', + ])) { + $selector = 'input[name="' . $key . '"]'; + $I->fillField($selector, $value); + } + } + + $I->wantTo('Ensure that the company_name field is being displayed'); + $I->seeElement('.account-table-content > div:nth-child(2) > input:nth-child(2)'); + + // we need to use this css selector to hit the correct . There is another one at the + // page header (search) + $I->submitForm($formCssSelector, $this->fields); + $I->seeInSource('The given vat id has a wrong format'); + + $I->wantTo('enter a valid vat id'); + $this->fields['vat_id'] = $faker->vat(false); + + $I->submitForm($formCssSelector, $this->fields); + + $I->seeInSource('Address have been successfully added.'); + + $this->assertCustomerAddress($I); + + $I->wantTo('Update the created customer address again'); + + $I->click('Edit'); + + $oldcompany = $this->fields['company_name']; + $this->fields['company_name'] = $faker->company; + + $I->submitForm($formCssSelector, $this->fields); + + $I->seeInSource('Address updated successfully.'); + + $I->dontSeeRecord(CustomerAddress::class, [ + 'company_name' => $oldcompany, + ]); + + $this->assertCustomerAddress($I); + } + + /** + * @param \FunctionalTester $I + * @param array $fields + */ + private function assertCustomerAddress(FunctionalTester $I): void + { + $I->seeRecord(CustomerAddress::class, [ + 'company_name' => $this->fields['company_name'], + 'vat_id' => $this->fields['vat_id'], + 'address1' => $this->fields['address1[]'], + 'country' => $this->fields['country'], + 'state' => $this->fields['state'], + 'city' => $this->fields['city'], + 'phone' => $this->fields['phone'], + 'postcode' => $this->fields['postcode'], + ]); + } +} \ No newline at end of file