diff --git a/.env.example b/.env.example index 4992ca00a007..3b1492054268 100644 --- a/.env.example +++ b/.env.example @@ -5,12 +5,25 @@ APP_DEBUG=true APP_URL=http://localhost +USER_AUTH_PROVIDER=users +CONTACT_AUTH_PROVIDER=contacts + DB_CONNECTION=db-ninja-01 -DB_HOST1=127.0.0.1 +MULTI_DB_ENABLED=true + +DB_HOST1=localhost +DB_DATABASE1=db-ninja-01 +DB_USERNAME1=ninja +DB_PASSWORD1=ninja DB_PORT1=3306 -DB_DATABASE1=homestead -DB_USERNAME1=homestead -DB_PASSWORD1=secret + +DB_HOST2=localhost +DB_DATABASE2=db-ninja-02 +DB_USERNAME2=ninja +DB_PASSWORD2=ninja +DB_PORT1=3306 + + BROADCAST_DRIVER=log LOG_CHANNEL=stack @@ -34,4 +47,3 @@ MULTI_DB_ENABLED=true POSTMARK_API_TOKEN= GOOGLE_MAPS_API_KEY= -COMPANY_SETTINGS='{"timezone_id":"15","currency_id":"1","language_id":"1","payment_terms":"7"}' diff --git a/app/DataMapper/BaseSettings.php b/app/DataMapper/BaseSettings.php index 04e68fac5319..aecf037a290c 100644 --- a/app/DataMapper/BaseSettings.php +++ b/app/DataMapper/BaseSettings.php @@ -7,22 +7,12 @@ namespace App\DataMapper; */ class BaseSettings { - /** - * Migrates properties of the datamapper classes when new properties are added - * - * @param \stdClass $object Datamapper settings object - * @return \stdClass $object Datamapper settings object updated - */ - public function migrate(\stdClass $object) : \stdClass + + public function __construct($obj) { - $properties = self::default(); - - foreach($properties as $property) - { - if(!property_exists($object, $property)) - $object->{$property} = NULL; - } - - return $object; + foreach($obj as $key => $value) + $this->{$key} = $value; } + + } \ No newline at end of file diff --git a/app/DataMapper/ClientSettings.php b/app/DataMapper/ClientSettings.php index 8b309ea34e0e..889336164fc2 100644 --- a/app/DataMapper/ClientSettings.php +++ b/app/DataMapper/ClientSettings.php @@ -2,16 +2,60 @@ namespace App\DataMapper; +use App\DataMapper\ClientSettings; +use App\DataMapper\CompanySettings; +use App\Utils\TranslationHelper; + /** * ClientSettings */ class ClientSettings extends BaseSettings { + /** + * settings which also have a parent company setting + */ public $timezone_id; + public $date_format_id; + public $datetime_format_id; + public $military_time; + public $start_of_week; + public $financial_year_start; + public $language_id; public $currency_id; - + public $default_task_rate; + public $send_reminders; + public $show_tasks_in_portal; + public $custom_message_dashboard; + public $custom_message_unpaid_invoice; + public $custom_message_paid_invoice; + public $custom_message_unapproved_quote; + public $show_currency_symbol; + public $show_currency_code; + /** + * settings which which are unique to client settings + */ + public $industry_id; + public $size_id; + + + /** + * Cast object values and return entire class + * prevents missing properties from not being returned + * and always ensure an up to date class is returned + * + * @return \stdClass + */ + public function __construct($obj) + { + parent::__construct($obj); + } + + /** + * + * Default Client Settings scaffold + * * @return \stdClass * */ @@ -23,10 +67,47 @@ class ClientSettings extends BaseSettings 'language_id' => NULL, 'currency_id' => NULL, 'payment_terms' => NULL, + 'datetime_format_id' => NULL, + 'military_time' => NULL, + 'date_format_id' => NULL, + 'start_of_week' => NULL, + 'financial_year_start' => NULL, + 'default_task_rate' => NULL, + 'send_reminders' => NULL, + 'show_tasks_in_portal' => NULL, + 'show_currency_symbol' => NULL, + 'show_currency_code' => NULL ]; } + /** + * Merges settings from Company to Client + * + * @param \stdClass $company_settings + * @param \stdClass $client_settings + * @return \stdClass of merged settings + */ + public static function buildClientSettings(CompanySettings $company_settings, ClientSettings $client_settings) : ClientSettings + { + + + foreach($client_settings as $key => $value) + { + + if(!isset($client_settings->{$key}) && property_exists($company_settings, $key)) + $client_settings->{$key} = $company_settings->{$key}; + } + + /** Replace ID with Object for presentation in multi-select */ + $client_settings->currency_id = TranslationHelper::getCurrencies()->where('id', $client_settings->currency_id)->first(); + $client_settings->language_id = TranslationHelper::getLanguages()->where('id', $client_settings->language_id)->first(); + $client_settings->payment_terms = TranslationHelper::getPaymentTerms()->where('num_days', $client_settings->payment_terms)->first(); + //todo $client_settings->timezone_id + + return $client_settings; + } + } diff --git a/app/DataMapper/CompanySettings.php b/app/DataMapper/CompanySettings.php index 3ccfbe6859fc..4f03c1c9a6f2 100644 --- a/app/DataMapper/CompanySettings.php +++ b/app/DataMapper/CompanySettings.php @@ -9,9 +9,19 @@ class CompanySettings extends BaseSettings { public $timezone_id; + public $date_format_id; + public $datetime_format_id; + public $military_time; + public $start_of_week; + public $financial_year_start; + public $language_id; public $currency_id; + public $show_currency_symbol; + public $show_currency_code; + public $payment_terms; + public $custom_label1; public $custom_value1; public $custom_label2; @@ -44,6 +54,16 @@ class CompanySettings extends BaseSettings public $custom_expense_label2; public $custom_expense_label3; public $custom_expense_label4; + + public $default_task_rate; + public $send_reminders; + public $show_tasks_in_portal; + + public $custom_message_dashboard; + public $custom_message_unpaid_invoice; + public $custom_message_paid_invoice; + public $custom_message_unapproved_quote; + public $translations; /** @@ -55,25 +75,34 @@ class CompanySettings extends BaseSettings */ public function __construct($obj) { - foreach($obj as $key => $value) - $this->{$key} = $value; + parent::__construct($obj); } /** * Provides class defaults on init * @return object */ - public static function defaults() : object + public static function defaults() : \stdClass { $config = json_decode(config('ninja.settings')); return (object) [ - 'timezone_id' => $config->timezone_id, - 'language_id' => $config->language_id, - 'currency_id' => $config->currency_id, - 'payment_terms' => $config->payment_terms, + 'timezone_id' => config('ninja.i18n.timezone'), + 'language_id' => config('ninja.i18n.language'), + 'currency_id' => config('ninja.i18n.currency'), + 'payment_terms' => config('ninja.i18n.payment_terms'), + 'datetime_format_id' => config('ninja.i18n.datetime_format'), + 'military_time' => config('ninja.i18n.military_time'), + 'date_format_id' => config('ninja.i18n.date_format'), + 'start_of_week' => config('ninja.i18n.start_of_week'), + 'financial_year_start' => config('ninja.i18n.financial_year_start'), + 'default_task_rate' => 0, + 'send_reminders' => 1, + 'show_tasks_in_portal' => 1, + 'show_currency_symbol' => 1, + 'show_currency_code' => 0, + 'translations' => (object) [], ]; } } - diff --git a/app/Http/Controllers/ClientController.php b/app/Http/Controllers/ClientController.php index caf5c0f8dc4c..99ee67eea580 100644 --- a/app/Http/Controllers/ClientController.php +++ b/app/Http/Controllers/ClientController.php @@ -2,6 +2,7 @@ namespace App\Http\Controllers; +use App\DataMapper\ClientSettings; use App\Datatables\ClientDatatable; use App\Datatables\MakesActionMenu; use App\Factory\ClientFactory; @@ -124,7 +125,7 @@ class ClientController extends Controller $data = [ 'client' => $client, - 'settings' => collect($client->settings), + 'settings' => collect(ClientSettings::buildClientSettings(auth()->user()->company()->settings_object, $client->client_settings_object)), 'pills' => $this->makeEntityTabMenu(Client::class), 'hashed_id' => $this->encodePrimarykey($client->id), 'company' => auth()->user()->company(), diff --git a/app/Http/ViewComposers/TranslationComposer.php b/app/Http/ViewComposers/TranslationComposer.php index 1608268df725..18709679401f 100644 --- a/app/Http/ViewComposers/TranslationComposer.php +++ b/app/Http/ViewComposers/TranslationComposer.php @@ -5,6 +5,7 @@ namespace App\Http\ViewComposers; use App\Models\Country; use App\Models\Currency; use App\Models\PaymentTerm; +use App\Utils\TranslationHelper; use Cache; use Illuminate\Support\Str; use Illuminate\View\View; @@ -21,40 +22,17 @@ class TranslationComposer */ public function compose(View $view) :void { - $view->with('industries', Cache::get('industries')->each(function ($industry) { - $industry->name = trans('texts.industry_'.$industry->name); - })->sortBy(function ($industry) { - return $industry->name; - })); + $view->with('industries', TranslationHelper::getIndustries()); - $view->with('countries', Cache::get('countries')->each(function ($country) { - $country->name = trans('texts.country_'.$country->name); - })->sortBy(function ($country) { - return $country->name; - })); + $view->with('countries', TranslationHelper::getCountries()); - $view->with('payment_types', Cache::get('paymentTypes')->each(function ($pType) { - $pType->name = trans('texts.payment_type_'.$pType->name); - })->sortBy(function ($pType) { - return $pType->name; - })); + $view->with('payment_types', TranslationHelper::getPaymentTypes()); - $view->with('languages', Cache::get('languages')->each(function ($lang) { - $lang->name = trans('texts.lang_'.$lang->name); - })->sortBy(function ($lang) { - return $lang->name; - })); + $view->with('languages', TranslationHelper::getLanguages()); - $view->with('currencies', Cache::get('currencies')->each(function ($currency) { - $currency->name = trans('texts.currency_' . Str::slug($currency->name, '_')); - })->sortBy(function ($currency) { - return $currency->name; - })); + $view->with('currencies', TranslationHelper::getCurrencies()); - $view->with('payment_terms', PaymentTerm::getCompanyTerms()->map(function ($term){ - $term['name'] = trans('texts.payment_terms_net') . ' ' . $term['num_days']; - return $term; - })); + $view->with('payment_terms', TranslationHelper::getPaymentTerms()); } diff --git a/app/Jobs/User/CreateUser.php b/app/Jobs/User/CreateUser.php index 52d030ceacb4..c9eb5d9a5834 100644 --- a/app/Jobs/User/CreateUser.php +++ b/app/Jobs/User/CreateUser.php @@ -55,11 +55,15 @@ class CreateUser 'account_id' => $this->account->id, 'is_owner' => 1, 'is_admin' => 1, + 'is_locked' => 0, + 'permissions' => json_encode([]), 'settings' => json_encode(DefaultSettings::userSettings()), ]); + event(new UserCreated($user)); + return $user; } } diff --git a/app/Models/Client.php b/app/Models/Client.php index 32bd02cc8b2e..892ee473db64 100644 --- a/app/Models/Client.php +++ b/app/Models/Client.php @@ -2,6 +2,7 @@ namespace App\Models; +use App\DataMapper\ClientSettings; use App\Models\Company; use App\Models\Country; use App\Utils\Traits\MakesHash; @@ -17,7 +18,9 @@ class Client extends BaseModel protected $presenter = 'App\Models\Presenters\ClientPresenter'; - //protected $appends = ['client_id']; + protected $appends = [ + 'client_settings_object' + ]; protected $guarded = [ 'id', @@ -40,6 +43,11 @@ class Client extends BaseModel //protected $dates = ['deleted_at']; + public function getClientSettingsObjectAttribute() + { + return new ClientSettings($this->settings); + } + public function getHashedIdAttribute() { return $this->encodePrimaryKey($this->id); diff --git a/app/Models/Company.php b/app/Models/Company.php index 0a326c1db4d0..c46bfcff402a 100644 --- a/app/Models/Company.php +++ b/app/Models/Company.php @@ -35,7 +35,9 @@ class Company extends BaseModel 'company_id' ]; - protected $appends = ['settings_object']; + protected $appends = [ + 'settings_object' + ]; protected $casts = [ 'settings' => 'object' diff --git a/app/Utils/TranslationHelper.php b/app/Utils/TranslationHelper.php new file mode 100644 index 000000000000..83bc70659108 --- /dev/null +++ b/app/Utils/TranslationHelper.php @@ -0,0 +1,64 @@ +each(function ($industry) { + $industry->name = ctrans('texts.industry_'.$industry->name); + })->sortBy(function ($industry) { + return $industry->name; + }); + } + + public static function getCountries() + { + return Cache::get('countries')->each(function ($country) { + $country->name = ctrans('texts.country_'.$country->name); + })->sortBy(function ($country) { + return $country->name; + }); + } + + public static function getPaymentTypes() + { + return Cache::get('paymentTypes')->each(function ($pType) { + $pType->name = ctrans('texts.payment_type_'.$pType->name); + })->sortBy(function ($pType) { + return $pType->name; + }); + } + + public static function getLanguages() + { + return Cache::get('languages')->each(function ($lang) { + $lang->name = ctrans('texts.lang_'.$lang->name); + })->sortBy(function ($lang) { + return $lang->name; + }); + } + + public static function getCurrencies() + { + return Cache::get('currencies')->each(function ($currency) { + $currency->name = ctrans('texts.currency_' . Str::slug($currency->name, '_')); + })->sortBy(function ($currency) { + return $currency->name; + }); + } + + public static function getPaymentTerms() + { + return PaymentTerm::getCompanyTerms()->map(function ($term){ + $term['name'] = ctrans('texts.payment_terms_net') . ' ' . $term['num_days']; + return $term; + }); + } +} \ No newline at end of file diff --git a/composer.lock b/composer.lock index bf15f0a1fab7..b7d0bf6c0b99 100644 --- a/composer.lock +++ b/composer.lock @@ -865,16 +865,16 @@ }, { "name": "laravel/framework", - "version": "v5.7.26", + "version": "v5.7.27", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "ca3bc9769969e8af3bd9878a3e0242051c74dae4" + "reference": "688fbfa889d43f392825b381ad3981847120fdfa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/ca3bc9769969e8af3bd9878a3e0242051c74dae4", - "reference": "ca3bc9769969e8af3bd9878a3e0242051c74dae4", + "url": "https://api.github.com/repos/laravel/framework/zipball/688fbfa889d43f392825b381ad3981847120fdfa", + "reference": "688fbfa889d43f392825b381ad3981847120fdfa", "shasum": "" }, "require": { @@ -1007,7 +1007,7 @@ "framework", "laravel" ], - "time": "2019-02-12T14:52:21+00:00" + "time": "2019-02-19T14:37:47+00:00" }, { "name": "laravel/nexmo-notification-channel", @@ -1297,7 +1297,7 @@ { "name": "Luís Otávio Cobucci Oblonczyk", "email": "lcobucci@gmail.com", - "role": "developer" + "role": "Developer" } ], "description": "A simple library to work with JSON Web Token and JSON Web Signature", @@ -1640,16 +1640,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.2.0", + "version": "v4.2.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "594bcae1fc0bccd3993d2f0d61a018e26ac2865a" + "reference": "5221f49a608808c1e4d436df32884cbc1b821ac0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/594bcae1fc0bccd3993d2f0d61a018e26ac2865a", - "reference": "594bcae1fc0bccd3993d2f0d61a018e26ac2865a", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/5221f49a608808c1e4d436df32884cbc1b821ac0", + "reference": "5221f49a608808c1e4d436df32884cbc1b821ac0", "shasum": "" }, "require": { @@ -1687,7 +1687,7 @@ "parser", "php" ], - "time": "2019-01-12T16:31:37+00:00" + "time": "2019-02-16T20:54:15+00:00" }, { "name": "nwidart/laravel-modules", @@ -4974,16 +4974,16 @@ }, { "name": "phpunit/php-timer", - "version": "2.0.0", + "version": "2.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "8b8454ea6958c3dee38453d3bd571e023108c91f" + "reference": "8b389aebe1b8b0578430bda0c7c95a829608e059" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/8b8454ea6958c3dee38453d3bd571e023108c91f", - "reference": "8b8454ea6958c3dee38453d3bd571e023108c91f", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/8b389aebe1b8b0578430bda0c7c95a829608e059", + "reference": "8b389aebe1b8b0578430bda0c7c95a829608e059", "shasum": "" }, "require": { @@ -4995,7 +4995,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "2.1-dev" } }, "autoload": { @@ -5019,7 +5019,7 @@ "keywords": [ "timer" ], - "time": "2018-02-01T13:07:23+00:00" + "time": "2019-02-20T10:12:59+00:00" }, { "name": "phpunit/php-token-stream", @@ -5072,16 +5072,16 @@ }, { "name": "phpunit/phpunit", - "version": "7.5.5", + "version": "7.5.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "23a200a60552cb9ba483a8d1e106c70fb0be0bb9" + "reference": "09c85e14994df92e5ff1f5ec0b481bdb7d3d3df9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/23a200a60552cb9ba483a8d1e106c70fb0be0bb9", - "reference": "23a200a60552cb9ba483a8d1e106c70fb0be0bb9", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/09c85e14994df92e5ff1f5ec0b481bdb7d3d3df9", + "reference": "09c85e14994df92e5ff1f5ec0b481bdb7d3d3df9", "shasum": "" }, "require": { @@ -5152,7 +5152,7 @@ "testing", "xunit" ], - "time": "2019-02-15T14:00:34+00:00" + "time": "2019-02-18T09:24:50+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", diff --git a/config/ninja.php b/config/ninja.php index 14cb13b40f83..0c731c731a86 100644 --- a/config/ninja.php +++ b/config/ninja.php @@ -31,16 +31,20 @@ return [ ], 'i18n' => [ - 'timezone' => env('DEFAULT_TIMEZONE', 'US/Eastern'), + 'timezone' => env('DEFAULT_TIMEZONE', 15), 'country' => env('DEFAULT_COUNTRY', 840), // United Stated 'currency' => env('DEFAULT_CURRENCY', 1), //USD 'language' => env('DEFAULT_LANGUAGE', 1), //en 'date_format' => env('DEFAULT_DATE_FORMAT', 'M j, Y'), 'date_picker_format' => env('DEFAULT_DATE_PICKER_FORMAT', 'M d, yyyy'), 'datetime_format' => env('DEFAULT_DATETIME_FORMAT', 'F j, Y g:i a'), - 'datetime_momemnt_format' => env('DEFAULT_DATETIME_MOMENT_FORMAT', 'MMM D, YYYY h:mm:ss a'), + 'datetime_moment_format' => env('DEFAULT_DATETIME_MOMENT_FORMAT', 'MMM D, YYYY h:mm:ss a'), 'locale' => env('DEFAULT_LOCALE', 'en'), 'map_zoom' => env('DEFAULT_MAP_ZOOM', 10), + 'payment_terms' => env('DEFAULT_PAYMENT_TERMS', 7), + 'military_time' => env('MILITARY_TIME', 0), + 'start_of_week' => env('START_OF_WEEK',1), + 'financial_year_start' => env('FINANCIAL_YEAR_START', '2000-01-01') ], 'testvars' => [ @@ -54,6 +58,5 @@ return [ 'from_name' => env('MAIL_FROM_NAME'), ], - 'settings' => env('COMPANY_SETTINGS', '{"timezone_id":"15","currency_id":"1","language_id":"1","payment_terms":"7"}'), ]; diff --git a/database/seeds/UsersTableSeeder.php b/database/seeds/UsersTableSeeder.php index 5a97432f1286..cae3f9d4040a 100644 --- a/database/seeds/UsersTableSeeder.php +++ b/database/seeds/UsersTableSeeder.php @@ -1,6 +1,5 @@ .nav-dropdown-toggle::before { -webkit-transform: rotate(-90deg); transform: rotate(-90deg); @@ -11910,6 +11941,7 @@ canvas { position: relative; -ms-flex: 0 0 50px; flex: 0 0 50px; + cursor: pointer; background-color: rgba(0, 0, 0, 0.2); border: 0; } @@ -12022,6 +12054,19 @@ canvas { .sidebar-minimized .sidebar .nav-item:hover > .nav-link .nav-icon { color: #fff; } + .sidebar-minimized .sidebar .nav-item:hover .nav-link.disabled, + .sidebar-minimized .sidebar .nav-item:hover .nav-link :disabled { + background: #2f353a; + } + .sidebar-minimized .sidebar .nav-item:hover .nav-link.disabled .nav-icon, + .sidebar-minimized .sidebar .nav-item:hover .nav-link :disabled .nav-icon { + color: #73818f; + } + .sidebar-minimized .sidebar section :not(.nav-dropdown-items) > .nav-item:last-child::after { + display: block; + margin-bottom: 50px; + content: ""; + } .sidebar-minimized .sidebar .nav-link { position: relative; padding-left: 0; @@ -12069,6 +12114,43 @@ canvas { left: 50px; display: inline; } + *[dir="rtl"] .sidebar-minimized .sidebar .nav { + list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"); + } + *[dir="rtl"] .sidebar-minimized .sidebar .nav .divider { + height: 0; + } + *[dir="rtl"] .sidebar-minimized .sidebar .sidebar-minimizer::before { + width: 100%; + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + *[dir="rtl"] .sidebar-minimized .sidebar .nav-link { + padding-right: 0; + } + *[dir="rtl"] .sidebar-minimized .sidebar .nav-link .nav-icon { + float: right; + } + *[dir="rtl"] .sidebar-minimized .sidebar .nav-link .badge { + right: auto; + left: 15px; + } + *[dir="rtl"] .sidebar-minimized .sidebar .nav-link:hover .badge { + display: inline; + } + *[dir="rtl"] .sidebar-minimized .sidebar .nav > .nav-dropdown > .nav-dropdown-items { + display: none; + max-height: 1000px; + background: #2f353a; + } + *[dir="rtl"] .sidebar-minimized .sidebar .nav > .nav-dropdown:hover { + background: #20a8d8; + } + *[dir="rtl"] .sidebar-minimized .sidebar .nav > .nav-dropdown:hover > .nav-dropdown-items { + position: absolute; + left: 0; + display: inline; + } } *[dir="rtl"] .sidebar .nav-dropdown-toggle::before { @@ -12099,41 +12181,12 @@ canvas { } *[dir="rtl"] .sidebar .sidebar-minimizer::before { - right: unset; + right: auto; left: 0; -webkit-transform: rotate(180deg); transform: rotate(180deg); } -*[dir="rtl"] .sidebar-minimized .sidebar .nav { - list-style-type: disc; -} - -*[dir="rtl"] .sidebar-minimized .sidebar .nav-link { - padding-right: 0; -} - -*[dir="rtl"] .sidebar-minimized .sidebar .nav-link .nav-icon { - float: right; - padding: 0; - margin: 0; -} - -*[dir="rtl"] .sidebar-minimized .sidebar .nav-link .badge { - right: auto; - left: 15px; -} - -*[dir="rtl"] .sidebar-minimized .sidebar .nav-dropdown:hover > .nav-dropdown-items { - right: 50px; - left: 0; -} - -*[dir="rtl"] .sidebar-minimized .sidebar .sidebar-minimizer::before { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); -} - *[dir="rtl"] .sidebar-toggler { margin-right: 0 !important; } @@ -12838,94 +12891,26 @@ html[dir="rtl"] .aside-menu { z-index: 1017; } +html:not([dir="rtl"]) .sidebar-show .sidebar, html:not([dir="rtl"]) .sidebar-show .sidebar { margin-left: 0; } -html:not([dir="rtl"]) .sidebar-show.sidebar-fixed .main, -html:not([dir="rtl"]) .sidebar-show.sidebar-fixed .app-footer { - margin-left: 200px; -} - -html:not([dir="rtl"]) .sidebar-show.sidebar-fixed.sidebar-compact .main, -html:not([dir="rtl"]) .sidebar-show.sidebar-fixed.sidebar-compact .app-footer { - margin-left: 150px; -} - -html:not([dir="rtl"]) .sidebar-show.sidebar-fixed.sidebar-minimized .main, -html:not([dir="rtl"]) .sidebar-show.sidebar-fixed.sidebar-minimized .app-footer { - margin-left: 50px; -} - -html:not([dir="rtl"]) .sidebar-show.breadcrumb-fixed .breadcrumb { - left: 200px; -} - -html:not([dir="rtl"]) .sidebar-show.breadcrumb-fixed.sidebar-compact .breadcrumb { - left: 150px; -} - -html:not([dir="rtl"]) .sidebar-show.breadcrumb-fixed.sidebar-minimized .breadcrumb { - left: 50px; -} - +html:not([dir="rtl"]) .aside-menu-show .aside-menu, html:not([dir="rtl"]) .aside-menu-show .aside-menu { margin-right: 0; } -html:not([dir="rtl"]) .aside-menu-show.aside-menu-fixed .main, -html:not([dir="rtl"]) .aside-menu-show.aside-menu-fixed .app-footer { - margin-right: 250px; -} - -html:not([dir="rtl"]) .aside-menu-show.breadcrumb-fixed .breadcrumb { - right: 250px; -} - +html[dir="rtl"] .sidebar-show .sidebar, html[dir="rtl"] .sidebar-show .sidebar { margin-right: 0; } -html[dir="rtl"] .sidebar-show.sidebar-fixed .main, -html[dir="rtl"] .sidebar-show.sidebar-fixed .app-footer { - margin-right: 200px; -} - -html[dir="rtl"] .sidebar-show.sidebar-fixed.sidebar-compact .main, -html[dir="rtl"] .sidebar-show.sidebar-fixed.sidebar-compact .app-footer { - margin-right: 150px; -} - -html[dir="rtl"] .sidebar-show.sidebar-fixed.sidebar-minimized .main, -html[dir="rtl"] .sidebar-show.sidebar-fixed.sidebar-minimized .app-footer { - margin-right: 50px; -} - -html[dir="rtl"] .sidebar-show.breadcrumb-fixed .breadcrumb { - right: 200px; -} - -html[dir="rtl"] .sidebar-show.breadcrumb-fixed.sidebar-compact .breadcrumb { - right: 150px; -} - -html[dir="rtl"] .sidebar-show.breadcrumb-fixed.sidebar-minimized .breadcrumb { - right: 50px; -} - +html[dir="rtl"] .aside-menu-show .aside-menu, html[dir="rtl"] .aside-menu-show .aside-menu { margin-left: 0; } -html[dir="rtl"] .aside-menu-show.aside-menu-fixed .main, -html[dir="rtl"] .aside-menu-show.aside-menu-fixed .app-footer { - margin-left: 250px; -} - -html[dir="rtl"] .aside-menu-show.breadcrumb-fixed .breadcrumb { - left: 250px; -} - @-webkit-keyframes opacity { 0% { opacity: 0; @@ -12965,71 +12950,99 @@ html[dir="rtl"] .aside-menu-show.breadcrumb-fixed .breadcrumb { } @media (min-width: 576px) { - html:not([dir="rtl"]) .sidebar-sm-show .sidebar { + html:not([dir="rtl"]) .sidebar-sm-show .sidebar, + html:not([dir="rtl"]) .sidebar-show .sidebar { margin-left: 0; } html:not([dir="rtl"]) .sidebar-sm-show.sidebar-fixed .main, - html:not([dir="rtl"]) .sidebar-sm-show.sidebar-fixed .app-footer { + html:not([dir="rtl"]) .sidebar-sm-show.sidebar-fixed .app-footer, + html:not([dir="rtl"]) .sidebar-show.sidebar-fixed .main, + html:not([dir="rtl"]) .sidebar-show.sidebar-fixed .app-footer { margin-left: 200px; } html:not([dir="rtl"]) .sidebar-sm-show.sidebar-fixed.sidebar-compact .main, - html:not([dir="rtl"]) .sidebar-sm-show.sidebar-fixed.sidebar-compact .app-footer { + html:not([dir="rtl"]) .sidebar-sm-show.sidebar-fixed.sidebar-compact .app-footer, + html:not([dir="rtl"]) .sidebar-show.sidebar-fixed.sidebar-compact .main, + html:not([dir="rtl"]) .sidebar-show.sidebar-fixed.sidebar-compact .app-footer { margin-left: 150px; } html:not([dir="rtl"]) .sidebar-sm-show.sidebar-fixed.sidebar-minimized .main, - html:not([dir="rtl"]) .sidebar-sm-show.sidebar-fixed.sidebar-minimized .app-footer { - margin-left: 50px; + html:not([dir="rtl"]) .sidebar-sm-show.sidebar-fixed.sidebar-minimized .app-footer, + html:not([dir="rtl"]) .sidebar-show.sidebar-fixed.sidebar-minimized .main, + html:not([dir="rtl"]) .sidebar-show.sidebar-fixed.sidebar-minimized .app-footer { + margin-left: 200px; } - html:not([dir="rtl"]) .sidebar-sm-show.breadcrumb-fixed .breadcrumb { + html:not([dir="rtl"]) .sidebar-sm-show.breadcrumb-fixed .breadcrumb, + html:not([dir="rtl"]) .sidebar-show.breadcrumb-fixed .breadcrumb { left: 200px; } - html:not([dir="rtl"]) .sidebar-sm-show.breadcrumb-fixed.sidebar-compact .breadcrumb { + html:not([dir="rtl"]) .sidebar-sm-show.breadcrumb-fixed.sidebar-compact .breadcrumb, + html:not([dir="rtl"]) .sidebar-show.breadcrumb-fixed.sidebar-compact .breadcrumb { left: 150px; } - html:not([dir="rtl"]) .sidebar-sm-show.breadcrumb-fixed.sidebar-minimized .breadcrumb { + html:not([dir="rtl"]) .sidebar-sm-show.breadcrumb-fixed.sidebar-minimized .breadcrumb, + html:not([dir="rtl"]) .sidebar-show.breadcrumb-fixed.sidebar-minimized .breadcrumb { left: 50px; } + html:not([dir="rtl"]) .aside-menu-show .aside-menu, html:not([dir="rtl"]) .aside-menu-sm-show .aside-menu { margin-right: 0; } + html:not([dir="rtl"]) .aside-menu-show.aside-menu-fixed .main, + html:not([dir="rtl"]) .aside-menu-show.aside-menu-fixed .app-footer, html:not([dir="rtl"]) .aside-menu-sm-show.aside-menu-fixed .main, html:not([dir="rtl"]) .aside-menu-sm-show.aside-menu-fixed .app-footer { margin-right: 250px; } + html:not([dir="rtl"]) .aside-menu-show.breadcrumb-fixed .breadcrumb, html:not([dir="rtl"]) .aside-menu-sm-show.breadcrumb-fixed .breadcrumb { right: 250px; } - html[dir="rtl"] .sidebar-sm-show .sidebar { + html[dir="rtl"] .sidebar-sm-show .sidebar, + html[dir="rtl"] .sidebar-show .sidebar { margin-right: 0; } html[dir="rtl"] .sidebar-sm-show.sidebar-fixed .main, - html[dir="rtl"] .sidebar-sm-show.sidebar-fixed .app-footer { + html[dir="rtl"] .sidebar-sm-show.sidebar-fixed .app-footer, + html[dir="rtl"] .sidebar-show.sidebar-fixed .main, + html[dir="rtl"] .sidebar-show.sidebar-fixed .app-footer { margin-right: 200px; } html[dir="rtl"] .sidebar-sm-show.sidebar-fixed.sidebar-compact .main, - html[dir="rtl"] .sidebar-sm-show.sidebar-fixed.sidebar-compact .app-footer { + html[dir="rtl"] .sidebar-sm-show.sidebar-fixed.sidebar-compact .app-footer, + html[dir="rtl"] .sidebar-show.sidebar-fixed.sidebar-compact .main, + html[dir="rtl"] .sidebar-show.sidebar-fixed.sidebar-compact .app-footer { margin-right: 150px; } html[dir="rtl"] .sidebar-sm-show.sidebar-fixed.sidebar-minimized .main, - html[dir="rtl"] .sidebar-sm-show.sidebar-fixed.sidebar-minimized .app-footer { - margin-right: 50px; + html[dir="rtl"] .sidebar-sm-show.sidebar-fixed.sidebar-minimized .app-footer, + html[dir="rtl"] .sidebar-show.sidebar-fixed.sidebar-minimized .main, + html[dir="rtl"] .sidebar-show.sidebar-fixed.sidebar-minimized .app-footer { + margin-right: 200px; } - html[dir="rtl"] .sidebar-sm-show.breadcrumb-fixed .breadcrumb { + html[dir="rtl"] .sidebar-sm-show.breadcrumb-fixed .breadcrumb, + html[dir="rtl"] .sidebar-show.breadcrumb-fixed .breadcrumb { right: 200px; } - html[dir="rtl"] .sidebar-sm-show.breadcrumb-fixed.sidebar-compact .breadcrumb { + html[dir="rtl"] .sidebar-sm-show.breadcrumb-fixed.sidebar-compact .breadcrumb, + html[dir="rtl"] .sidebar-show.breadcrumb-fixed.sidebar-compact .breadcrumb { right: 150px; } - html[dir="rtl"] .sidebar-sm-show.breadcrumb-fixed.sidebar-minimized .breadcrumb { + html[dir="rtl"] .sidebar-sm-show.breadcrumb-fixed.sidebar-minimized .breadcrumb, + html[dir="rtl"] .sidebar-show.breadcrumb-fixed.sidebar-minimized .breadcrumb { right: 50px; } + html[dir="rtl"] .aside-menu-show .aside-menu, html[dir="rtl"] .aside-menu-sm-show .aside-menu { margin-left: 0; } + html[dir="rtl"] .aside-menu-show.aside-menu-fixed .main, + html[dir="rtl"] .aside-menu-show.aside-menu-fixed .app-footer, html[dir="rtl"] .aside-menu-sm-show.aside-menu-fixed .main, html[dir="rtl"] .aside-menu-sm-show.aside-menu-fixed .app-footer { margin-left: 250px; } + html[dir="rtl"] .aside-menu-show.breadcrumb-fixed .breadcrumb, html[dir="rtl"] .aside-menu-sm-show.breadcrumb-fixed .breadcrumb { left: 250px; } @@ -13051,92 +13064,100 @@ html[dir="rtl"] .aside-menu-show.breadcrumb-fixed .breadcrumb { } } -@media (min-width: 576px) and (max-width: 575.98px) { - .sidebar-sm-show .main, - .aside-menu-sm-show .main { - position: relative; - } - .sidebar-sm-show .main::before, - .aside-menu-sm-show .main::before { - position: absolute; - top: 0; - left: 0; - z-index: 1018; - width: 100%; - height: 100%; - content: ""; - background: rgba(0, 0, 0, 0.7); - -webkit-animation: opacity 0.25s; - animation: opacity 0.25s; - } -} - @media (min-width: 768px) { - html:not([dir="rtl"]) .sidebar-md-show .sidebar { + html:not([dir="rtl"]) .sidebar-md-show .sidebar, + html:not([dir="rtl"]) .sidebar-show .sidebar { margin-left: 0; } html:not([dir="rtl"]) .sidebar-md-show.sidebar-fixed .main, - html:not([dir="rtl"]) .sidebar-md-show.sidebar-fixed .app-footer { + html:not([dir="rtl"]) .sidebar-md-show.sidebar-fixed .app-footer, + html:not([dir="rtl"]) .sidebar-show.sidebar-fixed .main, + html:not([dir="rtl"]) .sidebar-show.sidebar-fixed .app-footer { margin-left: 200px; } html:not([dir="rtl"]) .sidebar-md-show.sidebar-fixed.sidebar-compact .main, - html:not([dir="rtl"]) .sidebar-md-show.sidebar-fixed.sidebar-compact .app-footer { + html:not([dir="rtl"]) .sidebar-md-show.sidebar-fixed.sidebar-compact .app-footer, + html:not([dir="rtl"]) .sidebar-show.sidebar-fixed.sidebar-compact .main, + html:not([dir="rtl"]) .sidebar-show.sidebar-fixed.sidebar-compact .app-footer { margin-left: 150px; } html:not([dir="rtl"]) .sidebar-md-show.sidebar-fixed.sidebar-minimized .main, - html:not([dir="rtl"]) .sidebar-md-show.sidebar-fixed.sidebar-minimized .app-footer { - margin-left: 50px; + html:not([dir="rtl"]) .sidebar-md-show.sidebar-fixed.sidebar-minimized .app-footer, + html:not([dir="rtl"]) .sidebar-show.sidebar-fixed.sidebar-minimized .main, + html:not([dir="rtl"]) .sidebar-show.sidebar-fixed.sidebar-minimized .app-footer { + margin-left: 200px; } - html:not([dir="rtl"]) .sidebar-md-show.breadcrumb-fixed .breadcrumb { + html:not([dir="rtl"]) .sidebar-md-show.breadcrumb-fixed .breadcrumb, + html:not([dir="rtl"]) .sidebar-show.breadcrumb-fixed .breadcrumb { left: 200px; } - html:not([dir="rtl"]) .sidebar-md-show.breadcrumb-fixed.sidebar-compact .breadcrumb { + html:not([dir="rtl"]) .sidebar-md-show.breadcrumb-fixed.sidebar-compact .breadcrumb, + html:not([dir="rtl"]) .sidebar-show.breadcrumb-fixed.sidebar-compact .breadcrumb { left: 150px; } - html:not([dir="rtl"]) .sidebar-md-show.breadcrumb-fixed.sidebar-minimized .breadcrumb { + html:not([dir="rtl"]) .sidebar-md-show.breadcrumb-fixed.sidebar-minimized .breadcrumb, + html:not([dir="rtl"]) .sidebar-show.breadcrumb-fixed.sidebar-minimized .breadcrumb { left: 50px; } + html:not([dir="rtl"]) .aside-menu-show .aside-menu, html:not([dir="rtl"]) .aside-menu-md-show .aside-menu { margin-right: 0; } + html:not([dir="rtl"]) .aside-menu-show.aside-menu-fixed .main, + html:not([dir="rtl"]) .aside-menu-show.aside-menu-fixed .app-footer, html:not([dir="rtl"]) .aside-menu-md-show.aside-menu-fixed .main, html:not([dir="rtl"]) .aside-menu-md-show.aside-menu-fixed .app-footer { margin-right: 250px; } + html:not([dir="rtl"]) .aside-menu-show.breadcrumb-fixed .breadcrumb, html:not([dir="rtl"]) .aside-menu-md-show.breadcrumb-fixed .breadcrumb { right: 250px; } - html[dir="rtl"] .sidebar-md-show .sidebar { + html[dir="rtl"] .sidebar-md-show .sidebar, + html[dir="rtl"] .sidebar-show .sidebar { margin-right: 0; } html[dir="rtl"] .sidebar-md-show.sidebar-fixed .main, - html[dir="rtl"] .sidebar-md-show.sidebar-fixed .app-footer { + html[dir="rtl"] .sidebar-md-show.sidebar-fixed .app-footer, + html[dir="rtl"] .sidebar-show.sidebar-fixed .main, + html[dir="rtl"] .sidebar-show.sidebar-fixed .app-footer { margin-right: 200px; } html[dir="rtl"] .sidebar-md-show.sidebar-fixed.sidebar-compact .main, - html[dir="rtl"] .sidebar-md-show.sidebar-fixed.sidebar-compact .app-footer { + html[dir="rtl"] .sidebar-md-show.sidebar-fixed.sidebar-compact .app-footer, + html[dir="rtl"] .sidebar-show.sidebar-fixed.sidebar-compact .main, + html[dir="rtl"] .sidebar-show.sidebar-fixed.sidebar-compact .app-footer { margin-right: 150px; } html[dir="rtl"] .sidebar-md-show.sidebar-fixed.sidebar-minimized .main, - html[dir="rtl"] .sidebar-md-show.sidebar-fixed.sidebar-minimized .app-footer { - margin-right: 50px; + html[dir="rtl"] .sidebar-md-show.sidebar-fixed.sidebar-minimized .app-footer, + html[dir="rtl"] .sidebar-show.sidebar-fixed.sidebar-minimized .main, + html[dir="rtl"] .sidebar-show.sidebar-fixed.sidebar-minimized .app-footer { + margin-right: 200px; } - html[dir="rtl"] .sidebar-md-show.breadcrumb-fixed .breadcrumb { + html[dir="rtl"] .sidebar-md-show.breadcrumb-fixed .breadcrumb, + html[dir="rtl"] .sidebar-show.breadcrumb-fixed .breadcrumb { right: 200px; } - html[dir="rtl"] .sidebar-md-show.breadcrumb-fixed.sidebar-compact .breadcrumb { + html[dir="rtl"] .sidebar-md-show.breadcrumb-fixed.sidebar-compact .breadcrumb, + html[dir="rtl"] .sidebar-show.breadcrumb-fixed.sidebar-compact .breadcrumb { right: 150px; } - html[dir="rtl"] .sidebar-md-show.breadcrumb-fixed.sidebar-minimized .breadcrumb { + html[dir="rtl"] .sidebar-md-show.breadcrumb-fixed.sidebar-minimized .breadcrumb, + html[dir="rtl"] .sidebar-show.breadcrumb-fixed.sidebar-minimized .breadcrumb { right: 50px; } + html[dir="rtl"] .aside-menu-show .aside-menu, html[dir="rtl"] .aside-menu-md-show .aside-menu { margin-left: 0; } + html[dir="rtl"] .aside-menu-show.aside-menu-fixed .main, + html[dir="rtl"] .aside-menu-show.aside-menu-fixed .app-footer, html[dir="rtl"] .aside-menu-md-show.aside-menu-fixed .main, html[dir="rtl"] .aside-menu-md-show.aside-menu-fixed .app-footer { margin-left: 250px; } + html[dir="rtl"] .aside-menu-show.breadcrumb-fixed .breadcrumb, html[dir="rtl"] .aside-menu-md-show.breadcrumb-fixed .breadcrumb { left: 250px; } @@ -13158,92 +13179,100 @@ html[dir="rtl"] .aside-menu-show.breadcrumb-fixed .breadcrumb { } } -@media (min-width: 768px) and (max-width: 575.98px) { - .sidebar-md-show .main, - .aside-menu-md-show .main { - position: relative; - } - .sidebar-md-show .main::before, - .aside-menu-md-show .main::before { - position: absolute; - top: 0; - left: 0; - z-index: 1018; - width: 100%; - height: 100%; - content: ""; - background: rgba(0, 0, 0, 0.7); - -webkit-animation: opacity 0.25s; - animation: opacity 0.25s; - } -} - @media (min-width: 992px) { - html:not([dir="rtl"]) .sidebar-lg-show .sidebar { + html:not([dir="rtl"]) .sidebar-lg-show .sidebar, + html:not([dir="rtl"]) .sidebar-show .sidebar { margin-left: 0; } html:not([dir="rtl"]) .sidebar-lg-show.sidebar-fixed .main, - html:not([dir="rtl"]) .sidebar-lg-show.sidebar-fixed .app-footer { + html:not([dir="rtl"]) .sidebar-lg-show.sidebar-fixed .app-footer, + html:not([dir="rtl"]) .sidebar-show.sidebar-fixed .main, + html:not([dir="rtl"]) .sidebar-show.sidebar-fixed .app-footer { margin-left: 200px; } html:not([dir="rtl"]) .sidebar-lg-show.sidebar-fixed.sidebar-compact .main, - html:not([dir="rtl"]) .sidebar-lg-show.sidebar-fixed.sidebar-compact .app-footer { + html:not([dir="rtl"]) .sidebar-lg-show.sidebar-fixed.sidebar-compact .app-footer, + html:not([dir="rtl"]) .sidebar-show.sidebar-fixed.sidebar-compact .main, + html:not([dir="rtl"]) .sidebar-show.sidebar-fixed.sidebar-compact .app-footer { margin-left: 150px; } html:not([dir="rtl"]) .sidebar-lg-show.sidebar-fixed.sidebar-minimized .main, - html:not([dir="rtl"]) .sidebar-lg-show.sidebar-fixed.sidebar-minimized .app-footer { + html:not([dir="rtl"]) .sidebar-lg-show.sidebar-fixed.sidebar-minimized .app-footer, + html:not([dir="rtl"]) .sidebar-show.sidebar-fixed.sidebar-minimized .main, + html:not([dir="rtl"]) .sidebar-show.sidebar-fixed.sidebar-minimized .app-footer { margin-left: 50px; } - html:not([dir="rtl"]) .sidebar-lg-show.breadcrumb-fixed .breadcrumb { + html:not([dir="rtl"]) .sidebar-lg-show.breadcrumb-fixed .breadcrumb, + html:not([dir="rtl"]) .sidebar-show.breadcrumb-fixed .breadcrumb { left: 200px; } - html:not([dir="rtl"]) .sidebar-lg-show.breadcrumb-fixed.sidebar-compact .breadcrumb { + html:not([dir="rtl"]) .sidebar-lg-show.breadcrumb-fixed.sidebar-compact .breadcrumb, + html:not([dir="rtl"]) .sidebar-show.breadcrumb-fixed.sidebar-compact .breadcrumb { left: 150px; } - html:not([dir="rtl"]) .sidebar-lg-show.breadcrumb-fixed.sidebar-minimized .breadcrumb { + html:not([dir="rtl"]) .sidebar-lg-show.breadcrumb-fixed.sidebar-minimized .breadcrumb, + html:not([dir="rtl"]) .sidebar-show.breadcrumb-fixed.sidebar-minimized .breadcrumb { left: 50px; } + html:not([dir="rtl"]) .aside-menu-show .aside-menu, html:not([dir="rtl"]) .aside-menu-lg-show .aside-menu { margin-right: 0; } + html:not([dir="rtl"]) .aside-menu-show.aside-menu-fixed .main, + html:not([dir="rtl"]) .aside-menu-show.aside-menu-fixed .app-footer, html:not([dir="rtl"]) .aside-menu-lg-show.aside-menu-fixed .main, html:not([dir="rtl"]) .aside-menu-lg-show.aside-menu-fixed .app-footer { margin-right: 250px; } + html:not([dir="rtl"]) .aside-menu-show.breadcrumb-fixed .breadcrumb, html:not([dir="rtl"]) .aside-menu-lg-show.breadcrumb-fixed .breadcrumb { right: 250px; } - html[dir="rtl"] .sidebar-lg-show .sidebar { + html[dir="rtl"] .sidebar-lg-show .sidebar, + html[dir="rtl"] .sidebar-show .sidebar { margin-right: 0; } html[dir="rtl"] .sidebar-lg-show.sidebar-fixed .main, - html[dir="rtl"] .sidebar-lg-show.sidebar-fixed .app-footer { + html[dir="rtl"] .sidebar-lg-show.sidebar-fixed .app-footer, + html[dir="rtl"] .sidebar-show.sidebar-fixed .main, + html[dir="rtl"] .sidebar-show.sidebar-fixed .app-footer { margin-right: 200px; } html[dir="rtl"] .sidebar-lg-show.sidebar-fixed.sidebar-compact .main, - html[dir="rtl"] .sidebar-lg-show.sidebar-fixed.sidebar-compact .app-footer { + html[dir="rtl"] .sidebar-lg-show.sidebar-fixed.sidebar-compact .app-footer, + html[dir="rtl"] .sidebar-show.sidebar-fixed.sidebar-compact .main, + html[dir="rtl"] .sidebar-show.sidebar-fixed.sidebar-compact .app-footer { margin-right: 150px; } html[dir="rtl"] .sidebar-lg-show.sidebar-fixed.sidebar-minimized .main, - html[dir="rtl"] .sidebar-lg-show.sidebar-fixed.sidebar-minimized .app-footer { + html[dir="rtl"] .sidebar-lg-show.sidebar-fixed.sidebar-minimized .app-footer, + html[dir="rtl"] .sidebar-show.sidebar-fixed.sidebar-minimized .main, + html[dir="rtl"] .sidebar-show.sidebar-fixed.sidebar-minimized .app-footer { margin-right: 50px; } - html[dir="rtl"] .sidebar-lg-show.breadcrumb-fixed .breadcrumb { + html[dir="rtl"] .sidebar-lg-show.breadcrumb-fixed .breadcrumb, + html[dir="rtl"] .sidebar-show.breadcrumb-fixed .breadcrumb { right: 200px; } - html[dir="rtl"] .sidebar-lg-show.breadcrumb-fixed.sidebar-compact .breadcrumb { + html[dir="rtl"] .sidebar-lg-show.breadcrumb-fixed.sidebar-compact .breadcrumb, + html[dir="rtl"] .sidebar-show.breadcrumb-fixed.sidebar-compact .breadcrumb { right: 150px; } - html[dir="rtl"] .sidebar-lg-show.breadcrumb-fixed.sidebar-minimized .breadcrumb { + html[dir="rtl"] .sidebar-lg-show.breadcrumb-fixed.sidebar-minimized .breadcrumb, + html[dir="rtl"] .sidebar-show.breadcrumb-fixed.sidebar-minimized .breadcrumb { right: 50px; } + html[dir="rtl"] .aside-menu-show .aside-menu, html[dir="rtl"] .aside-menu-lg-show .aside-menu { margin-left: 0; } + html[dir="rtl"] .aside-menu-show.aside-menu-fixed .main, + html[dir="rtl"] .aside-menu-show.aside-menu-fixed .app-footer, html[dir="rtl"] .aside-menu-lg-show.aside-menu-fixed .main, html[dir="rtl"] .aside-menu-lg-show.aside-menu-fixed .app-footer { margin-left: 250px; } + html[dir="rtl"] .aside-menu-show.breadcrumb-fixed .breadcrumb, html[dir="rtl"] .aside-menu-lg-show.breadcrumb-fixed .breadcrumb { left: 250px; } @@ -13265,92 +13294,100 @@ html[dir="rtl"] .aside-menu-show.breadcrumb-fixed .breadcrumb { } } -@media (min-width: 992px) and (max-width: 575.98px) { - .sidebar-lg-show .main, - .aside-menu-lg-show .main { - position: relative; - } - .sidebar-lg-show .main::before, - .aside-menu-lg-show .main::before { - position: absolute; - top: 0; - left: 0; - z-index: 1018; - width: 100%; - height: 100%; - content: ""; - background: rgba(0, 0, 0, 0.7); - -webkit-animation: opacity 0.25s; - animation: opacity 0.25s; - } -} - @media (min-width: 1200px) { - html:not([dir="rtl"]) .sidebar-xl-show .sidebar { + html:not([dir="rtl"]) .sidebar-xl-show .sidebar, + html:not([dir="rtl"]) .sidebar-show .sidebar { margin-left: 0; } html:not([dir="rtl"]) .sidebar-xl-show.sidebar-fixed .main, - html:not([dir="rtl"]) .sidebar-xl-show.sidebar-fixed .app-footer { + html:not([dir="rtl"]) .sidebar-xl-show.sidebar-fixed .app-footer, + html:not([dir="rtl"]) .sidebar-show.sidebar-fixed .main, + html:not([dir="rtl"]) .sidebar-show.sidebar-fixed .app-footer { margin-left: 200px; } html:not([dir="rtl"]) .sidebar-xl-show.sidebar-fixed.sidebar-compact .main, - html:not([dir="rtl"]) .sidebar-xl-show.sidebar-fixed.sidebar-compact .app-footer { + html:not([dir="rtl"]) .sidebar-xl-show.sidebar-fixed.sidebar-compact .app-footer, + html:not([dir="rtl"]) .sidebar-show.sidebar-fixed.sidebar-compact .main, + html:not([dir="rtl"]) .sidebar-show.sidebar-fixed.sidebar-compact .app-footer { margin-left: 150px; } html:not([dir="rtl"]) .sidebar-xl-show.sidebar-fixed.sidebar-minimized .main, - html:not([dir="rtl"]) .sidebar-xl-show.sidebar-fixed.sidebar-minimized .app-footer { + html:not([dir="rtl"]) .sidebar-xl-show.sidebar-fixed.sidebar-minimized .app-footer, + html:not([dir="rtl"]) .sidebar-show.sidebar-fixed.sidebar-minimized .main, + html:not([dir="rtl"]) .sidebar-show.sidebar-fixed.sidebar-minimized .app-footer { margin-left: 50px; } - html:not([dir="rtl"]) .sidebar-xl-show.breadcrumb-fixed .breadcrumb { + html:not([dir="rtl"]) .sidebar-xl-show.breadcrumb-fixed .breadcrumb, + html:not([dir="rtl"]) .sidebar-show.breadcrumb-fixed .breadcrumb { left: 200px; } - html:not([dir="rtl"]) .sidebar-xl-show.breadcrumb-fixed.sidebar-compact .breadcrumb { + html:not([dir="rtl"]) .sidebar-xl-show.breadcrumb-fixed.sidebar-compact .breadcrumb, + html:not([dir="rtl"]) .sidebar-show.breadcrumb-fixed.sidebar-compact .breadcrumb { left: 150px; } - html:not([dir="rtl"]) .sidebar-xl-show.breadcrumb-fixed.sidebar-minimized .breadcrumb { + html:not([dir="rtl"]) .sidebar-xl-show.breadcrumb-fixed.sidebar-minimized .breadcrumb, + html:not([dir="rtl"]) .sidebar-show.breadcrumb-fixed.sidebar-minimized .breadcrumb { left: 50px; } + html:not([dir="rtl"]) .aside-menu-show .aside-menu, html:not([dir="rtl"]) .aside-menu-xl-show .aside-menu { margin-right: 0; } + html:not([dir="rtl"]) .aside-menu-show.aside-menu-fixed .main, + html:not([dir="rtl"]) .aside-menu-show.aside-menu-fixed .app-footer, html:not([dir="rtl"]) .aside-menu-xl-show.aside-menu-fixed .main, html:not([dir="rtl"]) .aside-menu-xl-show.aside-menu-fixed .app-footer { margin-right: 250px; } + html:not([dir="rtl"]) .aside-menu-show.breadcrumb-fixed .breadcrumb, html:not([dir="rtl"]) .aside-menu-xl-show.breadcrumb-fixed .breadcrumb { right: 250px; } - html[dir="rtl"] .sidebar-xl-show .sidebar { + html[dir="rtl"] .sidebar-xl-show .sidebar, + html[dir="rtl"] .sidebar-show .sidebar { margin-right: 0; } html[dir="rtl"] .sidebar-xl-show.sidebar-fixed .main, - html[dir="rtl"] .sidebar-xl-show.sidebar-fixed .app-footer { + html[dir="rtl"] .sidebar-xl-show.sidebar-fixed .app-footer, + html[dir="rtl"] .sidebar-show.sidebar-fixed .main, + html[dir="rtl"] .sidebar-show.sidebar-fixed .app-footer { margin-right: 200px; } html[dir="rtl"] .sidebar-xl-show.sidebar-fixed.sidebar-compact .main, - html[dir="rtl"] .sidebar-xl-show.sidebar-fixed.sidebar-compact .app-footer { + html[dir="rtl"] .sidebar-xl-show.sidebar-fixed.sidebar-compact .app-footer, + html[dir="rtl"] .sidebar-show.sidebar-fixed.sidebar-compact .main, + html[dir="rtl"] .sidebar-show.sidebar-fixed.sidebar-compact .app-footer { margin-right: 150px; } html[dir="rtl"] .sidebar-xl-show.sidebar-fixed.sidebar-minimized .main, - html[dir="rtl"] .sidebar-xl-show.sidebar-fixed.sidebar-minimized .app-footer { + html[dir="rtl"] .sidebar-xl-show.sidebar-fixed.sidebar-minimized .app-footer, + html[dir="rtl"] .sidebar-show.sidebar-fixed.sidebar-minimized .main, + html[dir="rtl"] .sidebar-show.sidebar-fixed.sidebar-minimized .app-footer { margin-right: 50px; } - html[dir="rtl"] .sidebar-xl-show.breadcrumb-fixed .breadcrumb { + html[dir="rtl"] .sidebar-xl-show.breadcrumb-fixed .breadcrumb, + html[dir="rtl"] .sidebar-show.breadcrumb-fixed .breadcrumb { right: 200px; } - html[dir="rtl"] .sidebar-xl-show.breadcrumb-fixed.sidebar-compact .breadcrumb { + html[dir="rtl"] .sidebar-xl-show.breadcrumb-fixed.sidebar-compact .breadcrumb, + html[dir="rtl"] .sidebar-show.breadcrumb-fixed.sidebar-compact .breadcrumb { right: 150px; } - html[dir="rtl"] .sidebar-xl-show.breadcrumb-fixed.sidebar-minimized .breadcrumb { + html[dir="rtl"] .sidebar-xl-show.breadcrumb-fixed.sidebar-minimized .breadcrumb, + html[dir="rtl"] .sidebar-show.breadcrumb-fixed.sidebar-minimized .breadcrumb { right: 50px; } + html[dir="rtl"] .aside-menu-show .aside-menu, html[dir="rtl"] .aside-menu-xl-show .aside-menu { margin-left: 0; } + html[dir="rtl"] .aside-menu-show.aside-menu-fixed .main, + html[dir="rtl"] .aside-menu-show.aside-menu-fixed .app-footer, html[dir="rtl"] .aside-menu-xl-show.aside-menu-fixed .main, html[dir="rtl"] .aside-menu-xl-show.aside-menu-fixed .app-footer { margin-left: 250px; } + html[dir="rtl"] .aside-menu-show.breadcrumb-fixed .breadcrumb, html[dir="rtl"] .aside-menu-xl-show.breadcrumb-fixed .breadcrumb { left: 250px; } @@ -13372,26 +13409,6 @@ html[dir="rtl"] .aside-menu-show.breadcrumb-fixed .breadcrumb { } } -@media (min-width: 1200px) and (max-width: 575.98px) { - .sidebar-xl-show .main, - .aside-menu-xl-show .main { - position: relative; - } - .sidebar-xl-show .main::before, - .aside-menu-xl-show .main::before { - position: absolute; - top: 0; - left: 0; - z-index: 1018; - width: 100%; - height: 100%; - content: ""; - background: rgba(0, 0, 0, 0.7); - -webkit-animation: opacity 0.25s; - animation: opacity 0.25s; - } -} - .footer-fixed .app-footer { position: fixed; right: 0; diff --git a/public/css/ninja.min.css b/public/css/ninja.min.css index f7e82fd470b9..27b8490466e6 100644 --- a/public/css/ninja.min.css +++ b/public/css/ninja.min.css @@ -1,7 +1,7 @@ @charset "UTF-8"; /*! * CoreUI - Open Source Dashboard UI Kit - * @version v2.0.18 + * @version v2.1.4 * @link https://coreui.io * Copyright (c) 2018 creativeLabs Łukasz Holeczek * Licensed under MIT (https://coreui.io/license) @@ -10347,10 +10347,6 @@ a.text-dark:hover, a.text-dark:focus { box-shadow: 0 0 0 0.2rem rgba(170, 212, 80, 0.5); } -button { - cursor: pointer; -} - .btn-transparent { color: #fff; background-color: transparent; @@ -11699,6 +11695,28 @@ canvas { background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 14'%3E%3Cpath fill='%23fff' d='M9.148 2.352l-4.148 4.148 4.148 4.148q0.148 0.148 0.148 0.352t-0.148 0.352l-1.297 1.297q-0.148 0.148-0.352 0.148t-0.352-0.148l-5.797-5.797q-0.148-0.148-0.148-0.352t0.148-0.352l5.797-5.797q0.148-0.148 0.352-0.148t0.352 0.148l1.297 1.297q0.148 0.148 0.148 0.352t-0.148 0.352z'/%3E%3C/svg%3E"); } +.sidebar .nav-link.disabled { + color: #b3b3b3; + cursor: default; + background: transparent; +} + +.sidebar .nav-link.disabled .nav-icon { + color: #73818f; +} + +.sidebar .nav-link.disabled:hover { + color: #b3b3b3; +} + +.sidebar .nav-link.disabled:hover .nav-icon { + color: #73818f; +} + +.sidebar .nav-link.disabled:hover.nav-dropdown-toggle::before { + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 14'%3E%3Cpath fill='%23fff' d='M9.148 2.352l-4.148 4.148 4.148 4.148q0.148 0.148 0.148 0.352t-0.148 0.352l-1.297 1.297q-0.148 0.148-0.352 0.148t-0.352-0.148l-5.797-5.797q-0.148-0.148-0.148-0.352t0.148-0.352l5.797-5.797q0.148-0.148 0.352-0.148t0.352 0.148l1.297 1.297q0.148 0.148 0.148 0.352t-0.148 0.352z'/%3E%3C/svg%3E"); +} + .sidebar .nav-link.nav-link-primary { background: #20a8d8; } @@ -11866,6 +11884,19 @@ canvas { border-left: 0; } +.sidebar .nav-dropdown.open .nav-link.disabled { + color: #b3b3b3; + background: transparent; +} + +.sidebar .nav-dropdown.open .nav-link.disabled:hover { + color: #b3b3b3; +} + +.sidebar .nav-dropdown.open .nav-link.disabled:hover .nav-icon { + color: #73818f; +} + .sidebar .nav-dropdown.open > .nav-dropdown-toggle::before { -webkit-transform: rotate(-90deg); transform: rotate(-90deg); @@ -11910,6 +11941,7 @@ canvas { position: relative; -ms-flex: 0 0 50px; flex: 0 0 50px; + cursor: pointer; background-color: rgba(0, 0, 0, 0.2); border: 0; } @@ -12022,6 +12054,19 @@ canvas { .sidebar-minimized .sidebar .nav-item:hover > .nav-link .nav-icon { color: #fff; } + .sidebar-minimized .sidebar .nav-item:hover .nav-link.disabled, + .sidebar-minimized .sidebar .nav-item:hover .nav-link :disabled { + background: #2f353a; + } + .sidebar-minimized .sidebar .nav-item:hover .nav-link.disabled .nav-icon, + .sidebar-minimized .sidebar .nav-item:hover .nav-link :disabled .nav-icon { + color: #73818f; + } + .sidebar-minimized .sidebar section :not(.nav-dropdown-items) > .nav-item:last-child::after { + display: block; + margin-bottom: 50px; + content: ""; + } .sidebar-minimized .sidebar .nav-link { position: relative; padding-left: 0; @@ -12069,6 +12114,43 @@ canvas { left: 50px; display: inline; } + *[dir="rtl"] .sidebar-minimized .sidebar .nav { + list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"); + } + *[dir="rtl"] .sidebar-minimized .sidebar .nav .divider { + height: 0; + } + *[dir="rtl"] .sidebar-minimized .sidebar .sidebar-minimizer::before { + width: 100%; + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + *[dir="rtl"] .sidebar-minimized .sidebar .nav-link { + padding-right: 0; + } + *[dir="rtl"] .sidebar-minimized .sidebar .nav-link .nav-icon { + float: right; + } + *[dir="rtl"] .sidebar-minimized .sidebar .nav-link .badge { + right: auto; + left: 15px; + } + *[dir="rtl"] .sidebar-minimized .sidebar .nav-link:hover .badge { + display: inline; + } + *[dir="rtl"] .sidebar-minimized .sidebar .nav > .nav-dropdown > .nav-dropdown-items { + display: none; + max-height: 1000px; + background: #2f353a; + } + *[dir="rtl"] .sidebar-minimized .sidebar .nav > .nav-dropdown:hover { + background: #20a8d8; + } + *[dir="rtl"] .sidebar-minimized .sidebar .nav > .nav-dropdown:hover > .nav-dropdown-items { + position: absolute; + left: 0; + display: inline; + } } *[dir="rtl"] .sidebar .nav-dropdown-toggle::before { @@ -12099,41 +12181,12 @@ canvas { } *[dir="rtl"] .sidebar .sidebar-minimizer::before { - right: unset; + right: auto; left: 0; -webkit-transform: rotate(180deg); transform: rotate(180deg); } -*[dir="rtl"] .sidebar-minimized .sidebar .nav { - list-style-type: disc; -} - -*[dir="rtl"] .sidebar-minimized .sidebar .nav-link { - padding-right: 0; -} - -*[dir="rtl"] .sidebar-minimized .sidebar .nav-link .nav-icon { - float: right; - padding: 0; - margin: 0; -} - -*[dir="rtl"] .sidebar-minimized .sidebar .nav-link .badge { - right: auto; - left: 15px; -} - -*[dir="rtl"] .sidebar-minimized .sidebar .nav-dropdown:hover > .nav-dropdown-items { - right: 50px; - left: 0; -} - -*[dir="rtl"] .sidebar-minimized .sidebar .sidebar-minimizer::before { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); -} - *[dir="rtl"] .sidebar-toggler { margin-right: 0 !important; } @@ -12838,94 +12891,26 @@ html[dir="rtl"] .aside-menu { z-index: 1017; } +html:not([dir="rtl"]) .sidebar-show .sidebar, html:not([dir="rtl"]) .sidebar-show .sidebar { margin-left: 0; } -html:not([dir="rtl"]) .sidebar-show.sidebar-fixed .main, -html:not([dir="rtl"]) .sidebar-show.sidebar-fixed .app-footer { - margin-left: 200px; -} - -html:not([dir="rtl"]) .sidebar-show.sidebar-fixed.sidebar-compact .main, -html:not([dir="rtl"]) .sidebar-show.sidebar-fixed.sidebar-compact .app-footer { - margin-left: 150px; -} - -html:not([dir="rtl"]) .sidebar-show.sidebar-fixed.sidebar-minimized .main, -html:not([dir="rtl"]) .sidebar-show.sidebar-fixed.sidebar-minimized .app-footer { - margin-left: 50px; -} - -html:not([dir="rtl"]) .sidebar-show.breadcrumb-fixed .breadcrumb { - left: 200px; -} - -html:not([dir="rtl"]) .sidebar-show.breadcrumb-fixed.sidebar-compact .breadcrumb { - left: 150px; -} - -html:not([dir="rtl"]) .sidebar-show.breadcrumb-fixed.sidebar-minimized .breadcrumb { - left: 50px; -} - +html:not([dir="rtl"]) .aside-menu-show .aside-menu, html:not([dir="rtl"]) .aside-menu-show .aside-menu { margin-right: 0; } -html:not([dir="rtl"]) .aside-menu-show.aside-menu-fixed .main, -html:not([dir="rtl"]) .aside-menu-show.aside-menu-fixed .app-footer { - margin-right: 250px; -} - -html:not([dir="rtl"]) .aside-menu-show.breadcrumb-fixed .breadcrumb { - right: 250px; -} - +html[dir="rtl"] .sidebar-show .sidebar, html[dir="rtl"] .sidebar-show .sidebar { margin-right: 0; } -html[dir="rtl"] .sidebar-show.sidebar-fixed .main, -html[dir="rtl"] .sidebar-show.sidebar-fixed .app-footer { - margin-right: 200px; -} - -html[dir="rtl"] .sidebar-show.sidebar-fixed.sidebar-compact .main, -html[dir="rtl"] .sidebar-show.sidebar-fixed.sidebar-compact .app-footer { - margin-right: 150px; -} - -html[dir="rtl"] .sidebar-show.sidebar-fixed.sidebar-minimized .main, -html[dir="rtl"] .sidebar-show.sidebar-fixed.sidebar-minimized .app-footer { - margin-right: 50px; -} - -html[dir="rtl"] .sidebar-show.breadcrumb-fixed .breadcrumb { - right: 200px; -} - -html[dir="rtl"] .sidebar-show.breadcrumb-fixed.sidebar-compact .breadcrumb { - right: 150px; -} - -html[dir="rtl"] .sidebar-show.breadcrumb-fixed.sidebar-minimized .breadcrumb { - right: 50px; -} - +html[dir="rtl"] .aside-menu-show .aside-menu, html[dir="rtl"] .aside-menu-show .aside-menu { margin-left: 0; } -html[dir="rtl"] .aside-menu-show.aside-menu-fixed .main, -html[dir="rtl"] .aside-menu-show.aside-menu-fixed .app-footer { - margin-left: 250px; -} - -html[dir="rtl"] .aside-menu-show.breadcrumb-fixed .breadcrumb { - left: 250px; -} - @-webkit-keyframes opacity { 0% { opacity: 0; @@ -12965,71 +12950,99 @@ html[dir="rtl"] .aside-menu-show.breadcrumb-fixed .breadcrumb { } @media (min-width: 576px) { - html:not([dir="rtl"]) .sidebar-sm-show .sidebar { + html:not([dir="rtl"]) .sidebar-sm-show .sidebar, + html:not([dir="rtl"]) .sidebar-show .sidebar { margin-left: 0; } html:not([dir="rtl"]) .sidebar-sm-show.sidebar-fixed .main, - html:not([dir="rtl"]) .sidebar-sm-show.sidebar-fixed .app-footer { + html:not([dir="rtl"]) .sidebar-sm-show.sidebar-fixed .app-footer, + html:not([dir="rtl"]) .sidebar-show.sidebar-fixed .main, + html:not([dir="rtl"]) .sidebar-show.sidebar-fixed .app-footer { margin-left: 200px; } html:not([dir="rtl"]) .sidebar-sm-show.sidebar-fixed.sidebar-compact .main, - html:not([dir="rtl"]) .sidebar-sm-show.sidebar-fixed.sidebar-compact .app-footer { + html:not([dir="rtl"]) .sidebar-sm-show.sidebar-fixed.sidebar-compact .app-footer, + html:not([dir="rtl"]) .sidebar-show.sidebar-fixed.sidebar-compact .main, + html:not([dir="rtl"]) .sidebar-show.sidebar-fixed.sidebar-compact .app-footer { margin-left: 150px; } html:not([dir="rtl"]) .sidebar-sm-show.sidebar-fixed.sidebar-minimized .main, - html:not([dir="rtl"]) .sidebar-sm-show.sidebar-fixed.sidebar-minimized .app-footer { - margin-left: 50px; + html:not([dir="rtl"]) .sidebar-sm-show.sidebar-fixed.sidebar-minimized .app-footer, + html:not([dir="rtl"]) .sidebar-show.sidebar-fixed.sidebar-minimized .main, + html:not([dir="rtl"]) .sidebar-show.sidebar-fixed.sidebar-minimized .app-footer { + margin-left: 200px; } - html:not([dir="rtl"]) .sidebar-sm-show.breadcrumb-fixed .breadcrumb { + html:not([dir="rtl"]) .sidebar-sm-show.breadcrumb-fixed .breadcrumb, + html:not([dir="rtl"]) .sidebar-show.breadcrumb-fixed .breadcrumb { left: 200px; } - html:not([dir="rtl"]) .sidebar-sm-show.breadcrumb-fixed.sidebar-compact .breadcrumb { + html:not([dir="rtl"]) .sidebar-sm-show.breadcrumb-fixed.sidebar-compact .breadcrumb, + html:not([dir="rtl"]) .sidebar-show.breadcrumb-fixed.sidebar-compact .breadcrumb { left: 150px; } - html:not([dir="rtl"]) .sidebar-sm-show.breadcrumb-fixed.sidebar-minimized .breadcrumb { + html:not([dir="rtl"]) .sidebar-sm-show.breadcrumb-fixed.sidebar-minimized .breadcrumb, + html:not([dir="rtl"]) .sidebar-show.breadcrumb-fixed.sidebar-minimized .breadcrumb { left: 50px; } + html:not([dir="rtl"]) .aside-menu-show .aside-menu, html:not([dir="rtl"]) .aside-menu-sm-show .aside-menu { margin-right: 0; } + html:not([dir="rtl"]) .aside-menu-show.aside-menu-fixed .main, + html:not([dir="rtl"]) .aside-menu-show.aside-menu-fixed .app-footer, html:not([dir="rtl"]) .aside-menu-sm-show.aside-menu-fixed .main, html:not([dir="rtl"]) .aside-menu-sm-show.aside-menu-fixed .app-footer { margin-right: 250px; } + html:not([dir="rtl"]) .aside-menu-show.breadcrumb-fixed .breadcrumb, html:not([dir="rtl"]) .aside-menu-sm-show.breadcrumb-fixed .breadcrumb { right: 250px; } - html[dir="rtl"] .sidebar-sm-show .sidebar { + html[dir="rtl"] .sidebar-sm-show .sidebar, + html[dir="rtl"] .sidebar-show .sidebar { margin-right: 0; } html[dir="rtl"] .sidebar-sm-show.sidebar-fixed .main, - html[dir="rtl"] .sidebar-sm-show.sidebar-fixed .app-footer { + html[dir="rtl"] .sidebar-sm-show.sidebar-fixed .app-footer, + html[dir="rtl"] .sidebar-show.sidebar-fixed .main, + html[dir="rtl"] .sidebar-show.sidebar-fixed .app-footer { margin-right: 200px; } html[dir="rtl"] .sidebar-sm-show.sidebar-fixed.sidebar-compact .main, - html[dir="rtl"] .sidebar-sm-show.sidebar-fixed.sidebar-compact .app-footer { + html[dir="rtl"] .sidebar-sm-show.sidebar-fixed.sidebar-compact .app-footer, + html[dir="rtl"] .sidebar-show.sidebar-fixed.sidebar-compact .main, + html[dir="rtl"] .sidebar-show.sidebar-fixed.sidebar-compact .app-footer { margin-right: 150px; } html[dir="rtl"] .sidebar-sm-show.sidebar-fixed.sidebar-minimized .main, - html[dir="rtl"] .sidebar-sm-show.sidebar-fixed.sidebar-minimized .app-footer { - margin-right: 50px; + html[dir="rtl"] .sidebar-sm-show.sidebar-fixed.sidebar-minimized .app-footer, + html[dir="rtl"] .sidebar-show.sidebar-fixed.sidebar-minimized .main, + html[dir="rtl"] .sidebar-show.sidebar-fixed.sidebar-minimized .app-footer { + margin-right: 200px; } - html[dir="rtl"] .sidebar-sm-show.breadcrumb-fixed .breadcrumb { + html[dir="rtl"] .sidebar-sm-show.breadcrumb-fixed .breadcrumb, + html[dir="rtl"] .sidebar-show.breadcrumb-fixed .breadcrumb { right: 200px; } - html[dir="rtl"] .sidebar-sm-show.breadcrumb-fixed.sidebar-compact .breadcrumb { + html[dir="rtl"] .sidebar-sm-show.breadcrumb-fixed.sidebar-compact .breadcrumb, + html[dir="rtl"] .sidebar-show.breadcrumb-fixed.sidebar-compact .breadcrumb { right: 150px; } - html[dir="rtl"] .sidebar-sm-show.breadcrumb-fixed.sidebar-minimized .breadcrumb { + html[dir="rtl"] .sidebar-sm-show.breadcrumb-fixed.sidebar-minimized .breadcrumb, + html[dir="rtl"] .sidebar-show.breadcrumb-fixed.sidebar-minimized .breadcrumb { right: 50px; } + html[dir="rtl"] .aside-menu-show .aside-menu, html[dir="rtl"] .aside-menu-sm-show .aside-menu { margin-left: 0; } + html[dir="rtl"] .aside-menu-show.aside-menu-fixed .main, + html[dir="rtl"] .aside-menu-show.aside-menu-fixed .app-footer, html[dir="rtl"] .aside-menu-sm-show.aside-menu-fixed .main, html[dir="rtl"] .aside-menu-sm-show.aside-menu-fixed .app-footer { margin-left: 250px; } + html[dir="rtl"] .aside-menu-show.breadcrumb-fixed .breadcrumb, html[dir="rtl"] .aside-menu-sm-show.breadcrumb-fixed .breadcrumb { left: 250px; } @@ -13051,92 +13064,100 @@ html[dir="rtl"] .aside-menu-show.breadcrumb-fixed .breadcrumb { } } -@media (min-width: 576px) and (max-width: 575.98px) { - .sidebar-sm-show .main, - .aside-menu-sm-show .main { - position: relative; - } - .sidebar-sm-show .main::before, - .aside-menu-sm-show .main::before { - position: absolute; - top: 0; - left: 0; - z-index: 1018; - width: 100%; - height: 100%; - content: ""; - background: rgba(0, 0, 0, 0.7); - -webkit-animation: opacity 0.25s; - animation: opacity 0.25s; - } -} - @media (min-width: 768px) { - html:not([dir="rtl"]) .sidebar-md-show .sidebar { + html:not([dir="rtl"]) .sidebar-md-show .sidebar, + html:not([dir="rtl"]) .sidebar-show .sidebar { margin-left: 0; } html:not([dir="rtl"]) .sidebar-md-show.sidebar-fixed .main, - html:not([dir="rtl"]) .sidebar-md-show.sidebar-fixed .app-footer { + html:not([dir="rtl"]) .sidebar-md-show.sidebar-fixed .app-footer, + html:not([dir="rtl"]) .sidebar-show.sidebar-fixed .main, + html:not([dir="rtl"]) .sidebar-show.sidebar-fixed .app-footer { margin-left: 200px; } html:not([dir="rtl"]) .sidebar-md-show.sidebar-fixed.sidebar-compact .main, - html:not([dir="rtl"]) .sidebar-md-show.sidebar-fixed.sidebar-compact .app-footer { + html:not([dir="rtl"]) .sidebar-md-show.sidebar-fixed.sidebar-compact .app-footer, + html:not([dir="rtl"]) .sidebar-show.sidebar-fixed.sidebar-compact .main, + html:not([dir="rtl"]) .sidebar-show.sidebar-fixed.sidebar-compact .app-footer { margin-left: 150px; } html:not([dir="rtl"]) .sidebar-md-show.sidebar-fixed.sidebar-minimized .main, - html:not([dir="rtl"]) .sidebar-md-show.sidebar-fixed.sidebar-minimized .app-footer { - margin-left: 50px; + html:not([dir="rtl"]) .sidebar-md-show.sidebar-fixed.sidebar-minimized .app-footer, + html:not([dir="rtl"]) .sidebar-show.sidebar-fixed.sidebar-minimized .main, + html:not([dir="rtl"]) .sidebar-show.sidebar-fixed.sidebar-minimized .app-footer { + margin-left: 200px; } - html:not([dir="rtl"]) .sidebar-md-show.breadcrumb-fixed .breadcrumb { + html:not([dir="rtl"]) .sidebar-md-show.breadcrumb-fixed .breadcrumb, + html:not([dir="rtl"]) .sidebar-show.breadcrumb-fixed .breadcrumb { left: 200px; } - html:not([dir="rtl"]) .sidebar-md-show.breadcrumb-fixed.sidebar-compact .breadcrumb { + html:not([dir="rtl"]) .sidebar-md-show.breadcrumb-fixed.sidebar-compact .breadcrumb, + html:not([dir="rtl"]) .sidebar-show.breadcrumb-fixed.sidebar-compact .breadcrumb { left: 150px; } - html:not([dir="rtl"]) .sidebar-md-show.breadcrumb-fixed.sidebar-minimized .breadcrumb { + html:not([dir="rtl"]) .sidebar-md-show.breadcrumb-fixed.sidebar-minimized .breadcrumb, + html:not([dir="rtl"]) .sidebar-show.breadcrumb-fixed.sidebar-minimized .breadcrumb { left: 50px; } + html:not([dir="rtl"]) .aside-menu-show .aside-menu, html:not([dir="rtl"]) .aside-menu-md-show .aside-menu { margin-right: 0; } + html:not([dir="rtl"]) .aside-menu-show.aside-menu-fixed .main, + html:not([dir="rtl"]) .aside-menu-show.aside-menu-fixed .app-footer, html:not([dir="rtl"]) .aside-menu-md-show.aside-menu-fixed .main, html:not([dir="rtl"]) .aside-menu-md-show.aside-menu-fixed .app-footer { margin-right: 250px; } + html:not([dir="rtl"]) .aside-menu-show.breadcrumb-fixed .breadcrumb, html:not([dir="rtl"]) .aside-menu-md-show.breadcrumb-fixed .breadcrumb { right: 250px; } - html[dir="rtl"] .sidebar-md-show .sidebar { + html[dir="rtl"] .sidebar-md-show .sidebar, + html[dir="rtl"] .sidebar-show .sidebar { margin-right: 0; } html[dir="rtl"] .sidebar-md-show.sidebar-fixed .main, - html[dir="rtl"] .sidebar-md-show.sidebar-fixed .app-footer { + html[dir="rtl"] .sidebar-md-show.sidebar-fixed .app-footer, + html[dir="rtl"] .sidebar-show.sidebar-fixed .main, + html[dir="rtl"] .sidebar-show.sidebar-fixed .app-footer { margin-right: 200px; } html[dir="rtl"] .sidebar-md-show.sidebar-fixed.sidebar-compact .main, - html[dir="rtl"] .sidebar-md-show.sidebar-fixed.sidebar-compact .app-footer { + html[dir="rtl"] .sidebar-md-show.sidebar-fixed.sidebar-compact .app-footer, + html[dir="rtl"] .sidebar-show.sidebar-fixed.sidebar-compact .main, + html[dir="rtl"] .sidebar-show.sidebar-fixed.sidebar-compact .app-footer { margin-right: 150px; } html[dir="rtl"] .sidebar-md-show.sidebar-fixed.sidebar-minimized .main, - html[dir="rtl"] .sidebar-md-show.sidebar-fixed.sidebar-minimized .app-footer { - margin-right: 50px; + html[dir="rtl"] .sidebar-md-show.sidebar-fixed.sidebar-minimized .app-footer, + html[dir="rtl"] .sidebar-show.sidebar-fixed.sidebar-minimized .main, + html[dir="rtl"] .sidebar-show.sidebar-fixed.sidebar-minimized .app-footer { + margin-right: 200px; } - html[dir="rtl"] .sidebar-md-show.breadcrumb-fixed .breadcrumb { + html[dir="rtl"] .sidebar-md-show.breadcrumb-fixed .breadcrumb, + html[dir="rtl"] .sidebar-show.breadcrumb-fixed .breadcrumb { right: 200px; } - html[dir="rtl"] .sidebar-md-show.breadcrumb-fixed.sidebar-compact .breadcrumb { + html[dir="rtl"] .sidebar-md-show.breadcrumb-fixed.sidebar-compact .breadcrumb, + html[dir="rtl"] .sidebar-show.breadcrumb-fixed.sidebar-compact .breadcrumb { right: 150px; } - html[dir="rtl"] .sidebar-md-show.breadcrumb-fixed.sidebar-minimized .breadcrumb { + html[dir="rtl"] .sidebar-md-show.breadcrumb-fixed.sidebar-minimized .breadcrumb, + html[dir="rtl"] .sidebar-show.breadcrumb-fixed.sidebar-minimized .breadcrumb { right: 50px; } + html[dir="rtl"] .aside-menu-show .aside-menu, html[dir="rtl"] .aside-menu-md-show .aside-menu { margin-left: 0; } + html[dir="rtl"] .aside-menu-show.aside-menu-fixed .main, + html[dir="rtl"] .aside-menu-show.aside-menu-fixed .app-footer, html[dir="rtl"] .aside-menu-md-show.aside-menu-fixed .main, html[dir="rtl"] .aside-menu-md-show.aside-menu-fixed .app-footer { margin-left: 250px; } + html[dir="rtl"] .aside-menu-show.breadcrumb-fixed .breadcrumb, html[dir="rtl"] .aside-menu-md-show.breadcrumb-fixed .breadcrumb { left: 250px; } @@ -13158,92 +13179,100 @@ html[dir="rtl"] .aside-menu-show.breadcrumb-fixed .breadcrumb { } } -@media (min-width: 768px) and (max-width: 575.98px) { - .sidebar-md-show .main, - .aside-menu-md-show .main { - position: relative; - } - .sidebar-md-show .main::before, - .aside-menu-md-show .main::before { - position: absolute; - top: 0; - left: 0; - z-index: 1018; - width: 100%; - height: 100%; - content: ""; - background: rgba(0, 0, 0, 0.7); - -webkit-animation: opacity 0.25s; - animation: opacity 0.25s; - } -} - @media (min-width: 992px) { - html:not([dir="rtl"]) .sidebar-lg-show .sidebar { + html:not([dir="rtl"]) .sidebar-lg-show .sidebar, + html:not([dir="rtl"]) .sidebar-show .sidebar { margin-left: 0; } html:not([dir="rtl"]) .sidebar-lg-show.sidebar-fixed .main, - html:not([dir="rtl"]) .sidebar-lg-show.sidebar-fixed .app-footer { + html:not([dir="rtl"]) .sidebar-lg-show.sidebar-fixed .app-footer, + html:not([dir="rtl"]) .sidebar-show.sidebar-fixed .main, + html:not([dir="rtl"]) .sidebar-show.sidebar-fixed .app-footer { margin-left: 200px; } html:not([dir="rtl"]) .sidebar-lg-show.sidebar-fixed.sidebar-compact .main, - html:not([dir="rtl"]) .sidebar-lg-show.sidebar-fixed.sidebar-compact .app-footer { + html:not([dir="rtl"]) .sidebar-lg-show.sidebar-fixed.sidebar-compact .app-footer, + html:not([dir="rtl"]) .sidebar-show.sidebar-fixed.sidebar-compact .main, + html:not([dir="rtl"]) .sidebar-show.sidebar-fixed.sidebar-compact .app-footer { margin-left: 150px; } html:not([dir="rtl"]) .sidebar-lg-show.sidebar-fixed.sidebar-minimized .main, - html:not([dir="rtl"]) .sidebar-lg-show.sidebar-fixed.sidebar-minimized .app-footer { + html:not([dir="rtl"]) .sidebar-lg-show.sidebar-fixed.sidebar-minimized .app-footer, + html:not([dir="rtl"]) .sidebar-show.sidebar-fixed.sidebar-minimized .main, + html:not([dir="rtl"]) .sidebar-show.sidebar-fixed.sidebar-minimized .app-footer { margin-left: 50px; } - html:not([dir="rtl"]) .sidebar-lg-show.breadcrumb-fixed .breadcrumb { + html:not([dir="rtl"]) .sidebar-lg-show.breadcrumb-fixed .breadcrumb, + html:not([dir="rtl"]) .sidebar-show.breadcrumb-fixed .breadcrumb { left: 200px; } - html:not([dir="rtl"]) .sidebar-lg-show.breadcrumb-fixed.sidebar-compact .breadcrumb { + html:not([dir="rtl"]) .sidebar-lg-show.breadcrumb-fixed.sidebar-compact .breadcrumb, + html:not([dir="rtl"]) .sidebar-show.breadcrumb-fixed.sidebar-compact .breadcrumb { left: 150px; } - html:not([dir="rtl"]) .sidebar-lg-show.breadcrumb-fixed.sidebar-minimized .breadcrumb { + html:not([dir="rtl"]) .sidebar-lg-show.breadcrumb-fixed.sidebar-minimized .breadcrumb, + html:not([dir="rtl"]) .sidebar-show.breadcrumb-fixed.sidebar-minimized .breadcrumb { left: 50px; } + html:not([dir="rtl"]) .aside-menu-show .aside-menu, html:not([dir="rtl"]) .aside-menu-lg-show .aside-menu { margin-right: 0; } + html:not([dir="rtl"]) .aside-menu-show.aside-menu-fixed .main, + html:not([dir="rtl"]) .aside-menu-show.aside-menu-fixed .app-footer, html:not([dir="rtl"]) .aside-menu-lg-show.aside-menu-fixed .main, html:not([dir="rtl"]) .aside-menu-lg-show.aside-menu-fixed .app-footer { margin-right: 250px; } + html:not([dir="rtl"]) .aside-menu-show.breadcrumb-fixed .breadcrumb, html:not([dir="rtl"]) .aside-menu-lg-show.breadcrumb-fixed .breadcrumb { right: 250px; } - html[dir="rtl"] .sidebar-lg-show .sidebar { + html[dir="rtl"] .sidebar-lg-show .sidebar, + html[dir="rtl"] .sidebar-show .sidebar { margin-right: 0; } html[dir="rtl"] .sidebar-lg-show.sidebar-fixed .main, - html[dir="rtl"] .sidebar-lg-show.sidebar-fixed .app-footer { + html[dir="rtl"] .sidebar-lg-show.sidebar-fixed .app-footer, + html[dir="rtl"] .sidebar-show.sidebar-fixed .main, + html[dir="rtl"] .sidebar-show.sidebar-fixed .app-footer { margin-right: 200px; } html[dir="rtl"] .sidebar-lg-show.sidebar-fixed.sidebar-compact .main, - html[dir="rtl"] .sidebar-lg-show.sidebar-fixed.sidebar-compact .app-footer { + html[dir="rtl"] .sidebar-lg-show.sidebar-fixed.sidebar-compact .app-footer, + html[dir="rtl"] .sidebar-show.sidebar-fixed.sidebar-compact .main, + html[dir="rtl"] .sidebar-show.sidebar-fixed.sidebar-compact .app-footer { margin-right: 150px; } html[dir="rtl"] .sidebar-lg-show.sidebar-fixed.sidebar-minimized .main, - html[dir="rtl"] .sidebar-lg-show.sidebar-fixed.sidebar-minimized .app-footer { + html[dir="rtl"] .sidebar-lg-show.sidebar-fixed.sidebar-minimized .app-footer, + html[dir="rtl"] .sidebar-show.sidebar-fixed.sidebar-minimized .main, + html[dir="rtl"] .sidebar-show.sidebar-fixed.sidebar-minimized .app-footer { margin-right: 50px; } - html[dir="rtl"] .sidebar-lg-show.breadcrumb-fixed .breadcrumb { + html[dir="rtl"] .sidebar-lg-show.breadcrumb-fixed .breadcrumb, + html[dir="rtl"] .sidebar-show.breadcrumb-fixed .breadcrumb { right: 200px; } - html[dir="rtl"] .sidebar-lg-show.breadcrumb-fixed.sidebar-compact .breadcrumb { + html[dir="rtl"] .sidebar-lg-show.breadcrumb-fixed.sidebar-compact .breadcrumb, + html[dir="rtl"] .sidebar-show.breadcrumb-fixed.sidebar-compact .breadcrumb { right: 150px; } - html[dir="rtl"] .sidebar-lg-show.breadcrumb-fixed.sidebar-minimized .breadcrumb { + html[dir="rtl"] .sidebar-lg-show.breadcrumb-fixed.sidebar-minimized .breadcrumb, + html[dir="rtl"] .sidebar-show.breadcrumb-fixed.sidebar-minimized .breadcrumb { right: 50px; } + html[dir="rtl"] .aside-menu-show .aside-menu, html[dir="rtl"] .aside-menu-lg-show .aside-menu { margin-left: 0; } + html[dir="rtl"] .aside-menu-show.aside-menu-fixed .main, + html[dir="rtl"] .aside-menu-show.aside-menu-fixed .app-footer, html[dir="rtl"] .aside-menu-lg-show.aside-menu-fixed .main, html[dir="rtl"] .aside-menu-lg-show.aside-menu-fixed .app-footer { margin-left: 250px; } + html[dir="rtl"] .aside-menu-show.breadcrumb-fixed .breadcrumb, html[dir="rtl"] .aside-menu-lg-show.breadcrumb-fixed .breadcrumb { left: 250px; } @@ -13265,92 +13294,100 @@ html[dir="rtl"] .aside-menu-show.breadcrumb-fixed .breadcrumb { } } -@media (min-width: 992px) and (max-width: 575.98px) { - .sidebar-lg-show .main, - .aside-menu-lg-show .main { - position: relative; - } - .sidebar-lg-show .main::before, - .aside-menu-lg-show .main::before { - position: absolute; - top: 0; - left: 0; - z-index: 1018; - width: 100%; - height: 100%; - content: ""; - background: rgba(0, 0, 0, 0.7); - -webkit-animation: opacity 0.25s; - animation: opacity 0.25s; - } -} - @media (min-width: 1200px) { - html:not([dir="rtl"]) .sidebar-xl-show .sidebar { + html:not([dir="rtl"]) .sidebar-xl-show .sidebar, + html:not([dir="rtl"]) .sidebar-show .sidebar { margin-left: 0; } html:not([dir="rtl"]) .sidebar-xl-show.sidebar-fixed .main, - html:not([dir="rtl"]) .sidebar-xl-show.sidebar-fixed .app-footer { + html:not([dir="rtl"]) .sidebar-xl-show.sidebar-fixed .app-footer, + html:not([dir="rtl"]) .sidebar-show.sidebar-fixed .main, + html:not([dir="rtl"]) .sidebar-show.sidebar-fixed .app-footer { margin-left: 200px; } html:not([dir="rtl"]) .sidebar-xl-show.sidebar-fixed.sidebar-compact .main, - html:not([dir="rtl"]) .sidebar-xl-show.sidebar-fixed.sidebar-compact .app-footer { + html:not([dir="rtl"]) .sidebar-xl-show.sidebar-fixed.sidebar-compact .app-footer, + html:not([dir="rtl"]) .sidebar-show.sidebar-fixed.sidebar-compact .main, + html:not([dir="rtl"]) .sidebar-show.sidebar-fixed.sidebar-compact .app-footer { margin-left: 150px; } html:not([dir="rtl"]) .sidebar-xl-show.sidebar-fixed.sidebar-minimized .main, - html:not([dir="rtl"]) .sidebar-xl-show.sidebar-fixed.sidebar-minimized .app-footer { + html:not([dir="rtl"]) .sidebar-xl-show.sidebar-fixed.sidebar-minimized .app-footer, + html:not([dir="rtl"]) .sidebar-show.sidebar-fixed.sidebar-minimized .main, + html:not([dir="rtl"]) .sidebar-show.sidebar-fixed.sidebar-minimized .app-footer { margin-left: 50px; } - html:not([dir="rtl"]) .sidebar-xl-show.breadcrumb-fixed .breadcrumb { + html:not([dir="rtl"]) .sidebar-xl-show.breadcrumb-fixed .breadcrumb, + html:not([dir="rtl"]) .sidebar-show.breadcrumb-fixed .breadcrumb { left: 200px; } - html:not([dir="rtl"]) .sidebar-xl-show.breadcrumb-fixed.sidebar-compact .breadcrumb { + html:not([dir="rtl"]) .sidebar-xl-show.breadcrumb-fixed.sidebar-compact .breadcrumb, + html:not([dir="rtl"]) .sidebar-show.breadcrumb-fixed.sidebar-compact .breadcrumb { left: 150px; } - html:not([dir="rtl"]) .sidebar-xl-show.breadcrumb-fixed.sidebar-minimized .breadcrumb { + html:not([dir="rtl"]) .sidebar-xl-show.breadcrumb-fixed.sidebar-minimized .breadcrumb, + html:not([dir="rtl"]) .sidebar-show.breadcrumb-fixed.sidebar-minimized .breadcrumb { left: 50px; } + html:not([dir="rtl"]) .aside-menu-show .aside-menu, html:not([dir="rtl"]) .aside-menu-xl-show .aside-menu { margin-right: 0; } + html:not([dir="rtl"]) .aside-menu-show.aside-menu-fixed .main, + html:not([dir="rtl"]) .aside-menu-show.aside-menu-fixed .app-footer, html:not([dir="rtl"]) .aside-menu-xl-show.aside-menu-fixed .main, html:not([dir="rtl"]) .aside-menu-xl-show.aside-menu-fixed .app-footer { margin-right: 250px; } + html:not([dir="rtl"]) .aside-menu-show.breadcrumb-fixed .breadcrumb, html:not([dir="rtl"]) .aside-menu-xl-show.breadcrumb-fixed .breadcrumb { right: 250px; } - html[dir="rtl"] .sidebar-xl-show .sidebar { + html[dir="rtl"] .sidebar-xl-show .sidebar, + html[dir="rtl"] .sidebar-show .sidebar { margin-right: 0; } html[dir="rtl"] .sidebar-xl-show.sidebar-fixed .main, - html[dir="rtl"] .sidebar-xl-show.sidebar-fixed .app-footer { + html[dir="rtl"] .sidebar-xl-show.sidebar-fixed .app-footer, + html[dir="rtl"] .sidebar-show.sidebar-fixed .main, + html[dir="rtl"] .sidebar-show.sidebar-fixed .app-footer { margin-right: 200px; } html[dir="rtl"] .sidebar-xl-show.sidebar-fixed.sidebar-compact .main, - html[dir="rtl"] .sidebar-xl-show.sidebar-fixed.sidebar-compact .app-footer { + html[dir="rtl"] .sidebar-xl-show.sidebar-fixed.sidebar-compact .app-footer, + html[dir="rtl"] .sidebar-show.sidebar-fixed.sidebar-compact .main, + html[dir="rtl"] .sidebar-show.sidebar-fixed.sidebar-compact .app-footer { margin-right: 150px; } html[dir="rtl"] .sidebar-xl-show.sidebar-fixed.sidebar-minimized .main, - html[dir="rtl"] .sidebar-xl-show.sidebar-fixed.sidebar-minimized .app-footer { + html[dir="rtl"] .sidebar-xl-show.sidebar-fixed.sidebar-minimized .app-footer, + html[dir="rtl"] .sidebar-show.sidebar-fixed.sidebar-minimized .main, + html[dir="rtl"] .sidebar-show.sidebar-fixed.sidebar-minimized .app-footer { margin-right: 50px; } - html[dir="rtl"] .sidebar-xl-show.breadcrumb-fixed .breadcrumb { + html[dir="rtl"] .sidebar-xl-show.breadcrumb-fixed .breadcrumb, + html[dir="rtl"] .sidebar-show.breadcrumb-fixed .breadcrumb { right: 200px; } - html[dir="rtl"] .sidebar-xl-show.breadcrumb-fixed.sidebar-compact .breadcrumb { + html[dir="rtl"] .sidebar-xl-show.breadcrumb-fixed.sidebar-compact .breadcrumb, + html[dir="rtl"] .sidebar-show.breadcrumb-fixed.sidebar-compact .breadcrumb { right: 150px; } - html[dir="rtl"] .sidebar-xl-show.breadcrumb-fixed.sidebar-minimized .breadcrumb { + html[dir="rtl"] .sidebar-xl-show.breadcrumb-fixed.sidebar-minimized .breadcrumb, + html[dir="rtl"] .sidebar-show.breadcrumb-fixed.sidebar-minimized .breadcrumb { right: 50px; } + html[dir="rtl"] .aside-menu-show .aside-menu, html[dir="rtl"] .aside-menu-xl-show .aside-menu { margin-left: 0; } + html[dir="rtl"] .aside-menu-show.aside-menu-fixed .main, + html[dir="rtl"] .aside-menu-show.aside-menu-fixed .app-footer, html[dir="rtl"] .aside-menu-xl-show.aside-menu-fixed .main, html[dir="rtl"] .aside-menu-xl-show.aside-menu-fixed .app-footer { margin-left: 250px; } + html[dir="rtl"] .aside-menu-show.breadcrumb-fixed .breadcrumb, html[dir="rtl"] .aside-menu-xl-show.breadcrumb-fixed .breadcrumb { left: 250px; } @@ -13372,26 +13409,6 @@ html[dir="rtl"] .aside-menu-show.breadcrumb-fixed .breadcrumb { } } -@media (min-width: 1200px) and (max-width: 575.98px) { - .sidebar-xl-show .main, - .aside-menu-xl-show .main { - position: relative; - } - .sidebar-xl-show .main::before, - .aside-menu-xl-show .main::before { - position: absolute; - top: 0; - left: 0; - z-index: 1018; - width: 100%; - height: 100%; - content: ""; - background: rgba(0, 0, 0, 0.7); - -webkit-animation: opacity 0.25s; - animation: opacity 0.25s; - } -} - .footer-fixed .app-footer { position: fixed; right: 0; diff --git a/public/js/client_create.js b/public/js/client_create.js index 89263a53384a..48afe3e106c2 100644 --- a/public/js/client_create.js +++ b/public/js/client_create.js @@ -3959,13 +3959,13 @@ if(false) { /***/ }), -/***/ "./node_modules/vue/dist/vue.common.js": +/***/ "./node_modules/vue/dist/vue.common.dev.js": /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(global, setImmediate) {/*! - * Vue.js v2.5.17 - * (c) 2014-2018 Evan You + * Vue.js v2.6.7 + * (c) 2014-2019 Evan You * Released under the MIT License. */ @@ -3974,8 +3974,8 @@ if(false) { var emptyObject = Object.freeze({}); -// these helpers produces better vm code in JS engines due to their -// explicitness and function inlining +// These helpers produce better VM code in JS engines due to their +// explicitness and function inlining. function isUndef (v) { return v === undefined || v === null } @@ -3993,7 +3993,7 @@ function isFalse (v) { } /** - * Check if value is primitive + * Check if value is primitive. */ function isPrimitive (value) { return ( @@ -4015,7 +4015,7 @@ function isObject (obj) { } /** - * Get the raw type string of a value e.g. [object Object] + * Get the raw type string of a value, e.g., [object Object]. */ var _toString = Object.prototype.toString; @@ -4043,19 +4043,27 @@ function isValidArrayIndex (val) { return n >= 0 && Math.floor(n) === n && isFinite(val) } +function isPromise (val) { + return ( + isDef(val) && + typeof val.then === 'function' && + typeof val.catch === 'function' + ) +} + /** * Convert a value to a string that is actually rendered. */ function toString (val) { return val == null ? '' - : typeof val === 'object' + : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString) ? JSON.stringify(val, null, 2) : String(val) } /** - * Convert a input value to a number for persistence. + * Convert an input value to a number for persistence. * If the conversion fails, return original string. */ function toNumber (val) { @@ -4087,12 +4095,12 @@ function makeMap ( var isBuiltInTag = makeMap('slot,component', true); /** - * Check if a attribute is a reserved attribute. + * Check if an attribute is a reserved attribute. */ var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is'); /** - * Remove an item from an array + * Remove an item from an array. */ function remove (arr, item) { if (arr.length) { @@ -4104,7 +4112,7 @@ function remove (arr, item) { } /** - * Check whether the object has the property. + * Check whether an object has the property. */ var hasOwnProperty = Object.prototype.hasOwnProperty; function hasOwn (obj, key) { @@ -4146,11 +4154,11 @@ var hyphenate = cached(function (str) { }); /** - * Simple bind polyfill for environments that do not support it... e.g. - * PhantomJS 1.x. Technically we don't need this anymore since native bind is - * now more performant in most browsers, but removing it would be breaking for - * code that was able to run in PhantomJS 1.x, so this must be kept for - * backwards compatibility. + * Simple bind polyfill for environments that do not support it, + * e.g., PhantomJS 1.x. Technically, we don't need this anymore + * since native bind is now performant enough in most browsers. + * But removing it would mean breaking code that was able to run in + * PhantomJS 1.x, so this must be kept for backward compatibility. */ /* istanbul ignore next */ @@ -4212,10 +4220,12 @@ function toObject (arr) { return res } +/* eslint-disable no-unused-vars */ + /** * Perform no operation. * Stubbing args to make Flow happy without leaving useless transpiled code - * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/) + * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/). */ function noop (a, b, c) {} @@ -4224,13 +4234,15 @@ function noop (a, b, c) {} */ var no = function (a, b, c) { return false; }; +/* eslint-enable no-unused-vars */ + /** - * Return same value + * Return the same value. */ var identity = function (_) { return _; }; /** - * Generate a static keys string from compiler modules. + * Generate a string containing static keys from compiler modules. */ function genStaticKeys (modules) { return modules.reduce(function (keys, m) { @@ -4254,6 +4266,8 @@ function looseEqual (a, b) { return a.length === b.length && a.every(function (e, i) { return looseEqual(e, b[i]) }) + } else if (a instanceof Date && b instanceof Date) { + return a.getTime() === b.getTime() } else if (!isArrayA && !isArrayB) { var keysA = Object.keys(a); var keysB = Object.keys(b); @@ -4275,6 +4289,11 @@ function looseEqual (a, b) { } } +/** + * Return the first index at which a loosely equal value can be + * found in the array (if value is a plain object, the array must + * contain an object of the same shape), or -1 if it is not present. + */ function looseIndexOf (arr, val) { for (var i = 0; i < arr.length; i++) { if (looseEqual(arr[i], val)) { return i } @@ -4314,11 +4333,14 @@ var LIFECYCLE_HOOKS = [ 'destroyed', 'activated', 'deactivated', - 'errorCaptured' + 'errorCaptured', + 'serverPrefetch' ]; /* */ + + var config = ({ /** * Option merge strategies (used in core/util/options) @@ -4401,14 +4423,27 @@ var config = ({ */ mustUseProp: no, + /** + * Perform updates asynchronously. Intended to be used by Vue Test Utils + * This will significantly reduce performance if set to false. + */ + async: true, + /** * Exposed for legacy reasons */ _lifecycleHooks: LIFECYCLE_HOOKS -}) +}); /* */ +/** + * unicode letters used for parsing html tags, component names and property paths. + * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname + * skipping \u10000-\uEFFFF due to it freezing up PhantomJS + */ +var unicodeLetters = 'a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD'; + /** * Check if a string starts with $ or _ */ @@ -4432,7 +4467,7 @@ function def (obj, key, val, enumerable) { /** * Parse simple path. */ -var bailRE = /[^\w.$]/; +var bailRE = new RegExp(("[^" + unicodeLetters + ".$_\\d]")); function parsePath (path) { if (bailRE.test(path)) { return @@ -4463,6 +4498,8 @@ var isEdge = UA && UA.indexOf('edge/') > 0; var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android'); var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios'); var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge; +var isPhantomJS = UA && /phantomjs/.test(UA); +var isFF = UA && UA.match(/firefox\/(\d+)/); // Firefox has a "watch" function on Object.prototype... var nativeWatch = ({}).watch; @@ -4490,7 +4527,7 @@ var isServerRendering = function () { if (!inBrowser && !inWeex && typeof global !== 'undefined') { // detect presence of vue-server-renderer and avoid // Webpack shimming the process - _isServer = global['process'].env.VUE_ENV === 'server'; + _isServer = global['process'] && global['process'].env.VUE_ENV === 'server'; } else { _isServer = false; } @@ -4517,7 +4554,7 @@ if (typeof Set !== 'undefined' && isNative(Set)) { _Set = Set; } else { // a non-standard Set polyfill that only works with primitive keys. - _Set = (function () { + _Set = /*@__PURE__*/(function () { function Set () { this.set = Object.create(null); } @@ -4542,7 +4579,7 @@ var tip = noop; var generateComponentTrace = (noop); // work around flow check var formatComponentName = (noop); -if (true) { +{ var hasConsole = typeof console !== 'undefined'; var classifyRE = /(?:^|[-_])(\w)/g; var classify = function (str) { return str @@ -4575,7 +4612,7 @@ if (true) { ? vm.options : vm._isVue ? vm.$options || vm.constructor.options - : vm || {}; + : vm; var name = options.name || options._componentTag; var file = options.__file; if (!name && file) { @@ -4631,7 +4668,6 @@ if (true) { /* */ - var uid = 0; /** @@ -4660,24 +4696,31 @@ Dep.prototype.depend = function depend () { Dep.prototype.notify = function notify () { // stabilize the subscriber list first var subs = this.subs.slice(); + if (!config.async) { + // subs aren't sorted in scheduler if not running async + // we need to sort them now to make sure they fire in correct + // order + subs.sort(function (a, b) { return a.id - b.id; }); + } for (var i = 0, l = subs.length; i < l; i++) { subs[i].update(); } }; -// the current target watcher being evaluated. -// this is globally unique because there could be only one -// watcher being evaluated at any time. +// The current target watcher being evaluated. +// This is globally unique because only one watcher +// can be evaluated at a time. Dep.target = null; var targetStack = []; -function pushTarget (_target) { - if (Dep.target) { targetStack.push(Dep.target); } - Dep.target = _target; +function pushTarget (target) { + targetStack.push(target); + Dep.target = target; } function popTarget () { - Dep.target = targetStack.pop(); + targetStack.pop(); + Dep.target = targetStack[targetStack.length - 1]; } /* */ @@ -4748,7 +4791,10 @@ function cloneVNode (vnode) { var cloned = new VNode( vnode.tag, vnode.data, - vnode.children, + // #7975 + // clone children array to avoid mutating original in case of cloning + // a child. + vnode.children && vnode.children.slice(), vnode.text, vnode.elm, vnode.context, @@ -4762,6 +4808,7 @@ function cloneVNode (vnode) { cloned.fnContext = vnode.fnContext; cloned.fnOptions = vnode.fnOptions; cloned.fnScopeId = vnode.fnScopeId; + cloned.asyncMeta = vnode.asyncMeta; cloned.isCloned = true; return cloned } @@ -4839,10 +4886,11 @@ var Observer = function Observer (value) { this.vmCount = 0; def(value, '__ob__', this); if (Array.isArray(value)) { - var augment = hasProto - ? protoAugment - : copyAugment; - augment(value, arrayMethods, arrayKeys); + if (hasProto) { + protoAugment(value, arrayMethods); + } else { + copyAugment(value, arrayMethods, arrayKeys); + } this.observeArray(value); } else { this.walk(value); @@ -4850,14 +4898,14 @@ var Observer = function Observer (value) { }; /** - * Walk through each property and convert them into + * Walk through all properties and convert them into * getter/setters. This method should only be called when * value type is Object. */ Observer.prototype.walk = function walk (obj) { var keys = Object.keys(obj); for (var i = 0; i < keys.length; i++) { - defineReactive(obj, keys[i]); + defineReactive$$1(obj, keys[i]); } }; @@ -4873,17 +4921,17 @@ Observer.prototype.observeArray = function observeArray (items) { // helpers /** - * Augment an target Object or Array by intercepting + * Augment a target Object or Array by intercepting * the prototype chain using __proto__ */ -function protoAugment (target, src, keys) { +function protoAugment (target, src) { /* eslint-disable no-proto */ target.__proto__ = src; /* eslint-enable no-proto */ } /** - * Augment an target Object or Array by defining + * Augment a target Object or Array by defining * hidden properties. */ /* istanbul ignore next */ @@ -4924,7 +4972,7 @@ function observe (value, asRootData) { /** * Define a reactive property on an Object. */ -function defineReactive ( +function defineReactive$$1 ( obj, key, val, @@ -4940,10 +4988,10 @@ function defineReactive ( // cater for pre-defined getter/setters var getter = property && property.get; - if (!getter && arguments.length === 2) { + var setter = property && property.set; + if ((!getter || setter) && arguments.length === 2) { val = obj[key]; } - var setter = property && property.set; var childOb = !shallow && observe(val); Object.defineProperty(obj, key, { @@ -4969,9 +5017,11 @@ function defineReactive ( return } /* eslint-enable no-self-compare */ - if ("development" !== 'production' && customSetter) { + if (customSetter) { customSetter(); } + // #7981: for accessor properties without setter + if (getter && !setter) { return } if (setter) { setter.call(obj, newVal); } else { @@ -4989,8 +5039,7 @@ function defineReactive ( * already exist. */ function set (target, key, val) { - if ("development" !== 'production' && - (isUndef(target) || isPrimitive(target)) + if (isUndef(target) || isPrimitive(target) ) { warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target)))); } @@ -5005,7 +5054,7 @@ function set (target, key, val) { } var ob = (target).__ob__; if (target._isVue || (ob && ob.vmCount)) { - "development" !== 'production' && warn( + warn( 'Avoid adding reactive properties to a Vue instance or its root $data ' + 'at runtime - declare it upfront in the data option.' ); @@ -5015,7 +5064,7 @@ function set (target, key, val) { target[key] = val; return val } - defineReactive(ob.value, key, val); + defineReactive$$1(ob.value, key, val); ob.dep.notify(); return val } @@ -5024,8 +5073,7 @@ function set (target, key, val) { * Delete a property and trigger change if necessary. */ function del (target, key) { - if ("development" !== 'production' && - (isUndef(target) || isPrimitive(target)) + if (isUndef(target) || isPrimitive(target) ) { warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target)))); } @@ -5035,7 +5083,7 @@ function del (target, key) { } var ob = (target).__ob__; if (target._isVue || (ob && ob.vmCount)) { - "development" !== 'production' && warn( + warn( 'Avoid deleting properties on a Vue instance or its root $data ' + '- just set it to null.' ); @@ -5077,7 +5125,7 @@ var strats = config.optionMergeStrategies; /** * Options with restrictions */ -if (true) { +{ strats.el = strats.propsData = function (parent, child, vm, key) { if (!vm) { warn( @@ -5095,14 +5143,24 @@ if (true) { function mergeData (to, from) { if (!from) { return to } var key, toVal, fromVal; - var keys = Object.keys(from); + + var keys = hasSymbol + ? Reflect.ownKeys(from) + : Object.keys(from); + for (var i = 0; i < keys.length; i++) { key = keys[i]; + // in case the object is already observed... + if (key === '__ob__') { continue } toVal = to[key]; fromVal = from[key]; if (!hasOwn(to, key)) { set(to, key, fromVal); - } else if (isPlainObject(toVal) && isPlainObject(fromVal)) { + } else if ( + toVal !== fromVal && + isPlainObject(toVal) && + isPlainObject(fromVal) + ) { mergeData(toVal, fromVal); } } @@ -5161,7 +5219,7 @@ strats.data = function ( ) { if (!vm) { if (childVal && typeof childVal !== 'function') { - "development" !== 'production' && warn( + warn( 'The "data" option should be a function ' + 'that returns a per-instance value in component ' + 'definitions.', @@ -5183,13 +5241,26 @@ function mergeHook ( parentVal, childVal ) { - return childVal + var res = childVal ? parentVal ? parentVal.concat(childVal) : Array.isArray(childVal) ? childVal : [childVal] - : parentVal + : parentVal; + return res + ? dedupeHooks(res) + : res +} + +function dedupeHooks (hooks) { + var res = []; + for (var i = 0; i < hooks.length; i++) { + if (res.indexOf(hooks[i]) === -1) { + res.push(hooks[i]); + } + } + return res } LIFECYCLE_HOOKS.forEach(function (hook) { @@ -5211,7 +5282,7 @@ function mergeAssets ( ) { var res = Object.create(parentVal || null); if (childVal) { - "development" !== 'production' && assertObjectType(key, childVal, vm); + assertObjectType(key, childVal, vm); return extend(res, childVal) } else { return res @@ -5239,7 +5310,7 @@ strats.watch = function ( if (childVal === nativeWatch) { childVal = undefined; } /* istanbul ignore if */ if (!childVal) { return Object.create(parentVal || null) } - if (true) { + { assertObjectType(key, childVal, vm); } if (!parentVal) { return childVal } @@ -5300,11 +5371,10 @@ function checkComponents (options) { } function validateComponentName (name) { - if (!/^[a-zA-Z][\w-]*$/.test(name)) { + if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + unicodeLetters + "]*$")).test(name)) { warn( 'Invalid component name: "' + name + '". Component names ' + - 'can only contain alphanumeric characters and the hyphen, ' + - 'and must start with a letter.' + 'should conform to valid custom element name in html5 specification.' ); } if (isBuiltInTag(name) || config.isReservedTag(name)) { @@ -5331,7 +5401,7 @@ function normalizeProps (options, vm) { if (typeof val === 'string') { name = camelize(val); res[name] = { type: null }; - } else if (true) { + } else { warn('props must be strings when using array syntax.'); } } @@ -5343,7 +5413,7 @@ function normalizeProps (options, vm) { ? val : { type: val }; } - } else if (true) { + } else { warn( "Invalid value for option \"props\": expected an Array or an Object, " + "but got " + (toRawType(props)) + ".", @@ -5371,7 +5441,7 @@ function normalizeInject (options, vm) { ? extend({ from: key }, val) : { from: val }; } - } else if (true) { + } else { warn( "Invalid value for option \"inject\": expected an Array or an Object, " + "but got " + (toRawType(inject)) + ".", @@ -5387,9 +5457,9 @@ function normalizeDirectives (options) { var dirs = options.directives; if (dirs) { for (var key in dirs) { - var def = dirs[key]; - if (typeof def === 'function') { - dirs[key] = { bind: def, update: def }; + var def$$1 = dirs[key]; + if (typeof def$$1 === 'function') { + dirs[key] = { bind: def$$1, update: def$$1 }; } } } @@ -5414,7 +5484,7 @@ function mergeOptions ( child, vm ) { - if (true) { + { checkComponents(child); } @@ -5425,15 +5495,22 @@ function mergeOptions ( normalizeProps(child, vm); normalizeInject(child, vm); normalizeDirectives(child); - var extendsFrom = child.extends; - if (extendsFrom) { - parent = mergeOptions(parent, extendsFrom, vm); - } - if (child.mixins) { - for (var i = 0, l = child.mixins.length; i < l; i++) { - parent = mergeOptions(parent, child.mixins[i], vm); + + // Apply extends and mixins on the child options, + // but only if it is a raw options object that isn't + // the result of another mergeOptions call. + // Only merged options has the _base property. + if (!child._base) { + if (child.extends) { + parent = mergeOptions(parent, child.extends, vm); + } + if (child.mixins) { + for (var i = 0, l = child.mixins.length; i < l; i++) { + parent = mergeOptions(parent, child.mixins[i], vm); + } } } + var options = {}; var key; for (key in parent) { @@ -5475,7 +5552,7 @@ function resolveAsset ( if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] } // fallback to prototype chain var res = assets[id] || assets[camelizedId] || assets[PascalCaseId]; - if ("development" !== 'production' && warnMissing && !res) { + if (warnMissing && !res) { warn( 'Failed to resolve ' + type.slice(0, -1) + ': ' + id, options @@ -5486,6 +5563,8 @@ function resolveAsset ( /* */ + + function validateProp ( key, propOptions, @@ -5519,9 +5598,7 @@ function validateProp ( observe(value); toggleObserving(prevShouldObserve); } - if ( - true - ) { + { assertProp(prop, key, value, vm, absent); } return value @@ -5537,7 +5614,7 @@ function getPropDefaultValue (vm, prop, key) { } var def = prop.default; // warn against non-factory defaults for Object & Array - if ("development" !== 'production' && isObject(def)) { + if (isObject(def)) { warn( 'Invalid default value for prop "' + key + '": ' + 'Props with type Object/Array must use a factory function ' + @@ -5593,11 +5670,10 @@ function assertProp ( valid = assertedType.valid; } } + if (!valid) { warn( - "Invalid prop: type check failed for prop \"" + name + "\"." + - " Expected " + (expectedTypes.map(capitalize).join(', ')) + - ", got " + (toRawType(value)) + ".", + getInvalidTypeMessage(name, value, expectedTypes), vm ); return @@ -5664,26 +5740,97 @@ function getTypeIndex (type, expectedTypes) { return -1 } +function getInvalidTypeMessage (name, value, expectedTypes) { + var message = "Invalid prop: type check failed for prop \"" + name + "\"." + + " Expected " + (expectedTypes.map(capitalize).join(', ')); + var expectedType = expectedTypes[0]; + var receivedType = toRawType(value); + var expectedValue = styleValue(value, expectedType); + var receivedValue = styleValue(value, receivedType); + // check if we need to specify expected value + if (expectedTypes.length === 1 && + isExplicable(expectedType) && + !isBoolean(expectedType, receivedType)) { + message += " with value " + expectedValue; + } + message += ", got " + receivedType + " "; + // check if we need to specify received value + if (isExplicable(receivedType)) { + message += "with value " + receivedValue + "."; + } + return message +} + +function styleValue (value, type) { + if (type === 'String') { + return ("\"" + value + "\"") + } else if (type === 'Number') { + return ("" + (Number(value))) + } else { + return ("" + value) + } +} + +function isExplicable (value) { + var explicitTypes = ['string', 'number', 'boolean']; + return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; }) +} + +function isBoolean () { + var args = [], len = arguments.length; + while ( len-- ) args[ len ] = arguments[ len ]; + + return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; }) +} + /* */ function handleError (err, vm, info) { - if (vm) { - var cur = vm; - while ((cur = cur.$parent)) { - var hooks = cur.$options.errorCaptured; - if (hooks) { - for (var i = 0; i < hooks.length; i++) { - try { - var capture = hooks[i].call(cur, err, vm, info) === false; - if (capture) { return } - } catch (e) { - globalHandleError(e, cur, 'errorCaptured hook'); + // Deactivate deps tracking while processing error handler to avoid possible infinite rendering. + // See: https://github.com/vuejs/vuex/issues/1505 + pushTarget(); + try { + if (vm) { + var cur = vm; + while ((cur = cur.$parent)) { + var hooks = cur.$options.errorCaptured; + if (hooks) { + for (var i = 0; i < hooks.length; i++) { + try { + var capture = hooks[i].call(cur, err, vm, info) === false; + if (capture) { return } + } catch (e) { + globalHandleError(e, cur, 'errorCaptured hook'); + } } } } } + globalHandleError(err, vm, info); + } finally { + popTarget(); } - globalHandleError(err, vm, info); +} + +function invokeWithErrorHandling ( + handler, + context, + args, + vm, + info +) { + var res; + try { + res = args ? handler.apply(context, args) : handler.call(context); + if (res && !res._isVue && isPromise(res)) { + // issue #9511 + // reassign to res to avoid catch triggering multiple times when nested calls + res = res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); }); + } + } catch (e) { + handleError(e, vm, info); + } + return res } function globalHandleError (err, vm, info) { @@ -5691,14 +5838,18 @@ function globalHandleError (err, vm, info) { try { return config.errorHandler.call(null, err, vm, info) } catch (e) { - logError(e, null, 'config.errorHandler'); + // if the user intentionally throws the original error in the handler, + // do not log it twice + if (e !== err) { + logError(e, null, 'config.errorHandler'); + } } } logError(err, vm, info); } function logError (err, vm, info) { - if (true) { + { warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm); } /* istanbul ignore else */ @@ -5710,7 +5861,8 @@ function logError (err, vm, info) { } /* */ -/* globals MessageChannel */ + +var isUsingMicroTask = false; var callbacks = []; var pending = false; @@ -5724,74 +5876,69 @@ function flushCallbacks () { } } -// Here we have async deferring wrappers using both microtasks and (macro) tasks. -// In < 2.4 we used microtasks everywhere, but there are some scenarios where -// microtasks have too high a priority and fire in between supposedly -// sequential events (e.g. #4521, #6690) or even between bubbling of the same -// event (#6566). However, using (macro) tasks everywhere also has subtle problems -// when state is changed right before repaint (e.g. #6813, out-in transitions). -// Here we use microtask by default, but expose a way to force (macro) task when -// needed (e.g. in event handlers attached by v-on). -var microTimerFunc; -var macroTimerFunc; -var useMacroTask = false; +// Here we have async deferring wrappers using microtasks. +// In 2.5 we used (macro) tasks (in combination with microtasks). +// However, it has subtle problems when state is changed right before repaint +// (e.g. #6813, out-in transitions). +// Also, using (macro) tasks in event handler would cause some weird behaviors +// that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109). +// So we now use microtasks everywhere, again. +// A major drawback of this tradeoff is that there are some scenarios +// where microtasks have too high a priority and fire in between supposedly +// sequential events (e.g. #4521, #6690, which have workarounds) +// or even between bubbling of the same event (#6566). +var timerFunc; -// Determine (macro) task defer implementation. -// Technically setImmediate should be the ideal choice, but it's only available -// in IE. The only polyfill that consistently queues the callback after all DOM -// events triggered in the same loop is by using MessageChannel. -/* istanbul ignore if */ -if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) { - macroTimerFunc = function () { - setImmediate(flushCallbacks); - }; -} else if (typeof MessageChannel !== 'undefined' && ( - isNative(MessageChannel) || - // PhantomJS - MessageChannel.toString() === '[object MessageChannelConstructor]' -)) { - var channel = new MessageChannel(); - var port = channel.port2; - channel.port1.onmessage = flushCallbacks; - macroTimerFunc = function () { - port.postMessage(1); - }; -} else { - /* istanbul ignore next */ - macroTimerFunc = function () { - setTimeout(flushCallbacks, 0); - }; -} - -// Determine microtask defer implementation. +// The nextTick behavior leverages the microtask queue, which can be accessed +// via either native Promise.then or MutationObserver. +// MutationObserver has wider support, however it is seriously bugged in +// UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It +// completely stops working after triggering a few times... so, if native +// Promise is available, we will use it: /* istanbul ignore next, $flow-disable-line */ if (typeof Promise !== 'undefined' && isNative(Promise)) { var p = Promise.resolve(); - microTimerFunc = function () { + timerFunc = function () { p.then(flushCallbacks); - // in problematic UIWebViews, Promise.then doesn't completely break, but + // In problematic UIWebViews, Promise.then doesn't completely break, but // it can get stuck in a weird state where callbacks are pushed into the // microtask queue but the queue isn't being flushed, until the browser // needs to do some other work, e.g. handle a timer. Therefore we can // "force" the microtask queue to be flushed by adding an empty timer. if (isIOS) { setTimeout(noop); } }; + isUsingMicroTask = true; +} else if (!isIE && typeof MutationObserver !== 'undefined' && ( + isNative(MutationObserver) || + // PhantomJS and iOS 7.x + MutationObserver.toString() === '[object MutationObserverConstructor]' +)) { + // Use MutationObserver where native Promise is not available, + // e.g. PhantomJS, iOS7, Android 4.4 + // (#6466 MutationObserver is unreliable in IE11) + var counter = 1; + var observer = new MutationObserver(flushCallbacks); + var textNode = document.createTextNode(String(counter)); + observer.observe(textNode, { + characterData: true + }); + timerFunc = function () { + counter = (counter + 1) % 2; + textNode.data = String(counter); + }; + isUsingMicroTask = true; +} else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) { + // Fallback to setImmediate. + // Techinically it leverages the (macro) task queue, + // but it is still a better choice than setTimeout. + timerFunc = function () { + setImmediate(flushCallbacks); + }; } else { - // fallback to macro - microTimerFunc = macroTimerFunc; -} - -/** - * Wrap a function so that if any code inside triggers state change, - * the changes are queued using a (macro) task instead of a microtask. - */ -function withMacroTask (fn) { - return fn._withTask || (fn._withTask = function () { - useMacroTask = true; - var res = fn.apply(null, arguments); - useMacroTask = false; - return res - }) + // Fallback to setTimeout. + timerFunc = function () { + setTimeout(flushCallbacks, 0); + }; } function nextTick (cb, ctx) { @@ -5809,11 +5956,7 @@ function nextTick (cb, ctx) { }); if (!pending) { pending = true; - if (useMacroTask) { - macroTimerFunc(); - } else { - microTimerFunc(); - } + timerFunc(); } // $flow-disable-line if (!cb && typeof Promise !== 'undefined') { @@ -5828,7 +5971,7 @@ function nextTick (cb, ctx) { var mark; var measure; -if (true) { +{ var perf = inBrowser && window.performance; /* istanbul ignore if */ if ( @@ -5843,7 +5986,7 @@ if (true) { perf.measure(name, startTag, endTag); perf.clearMarks(startTag); perf.clearMarks(endTag); - perf.clearMeasures(name); + // perf.clearMeasures(name) }; } } @@ -5852,7 +5995,7 @@ if (true) { var initProxy; -if (true) { +{ var allowedGlobals = makeMap( 'Infinity,undefined,NaN,isFinite,isNaN,' + 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' + @@ -5871,6 +6014,16 @@ if (true) { ); }; + var warnReservedPrefix = function (target, key) { + warn( + "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " + + 'properties starting with "$" or "_" are not proxied in the Vue instance to ' + + 'prevent conflicts with Vue internals' + + 'See: https://vuejs.org/v2/api/#data', + target + ); + }; + var hasProxy = typeof Proxy !== 'undefined' && isNative(Proxy); @@ -5892,9 +6045,11 @@ if (true) { var hasHandler = { has: function has (target, key) { var has = key in target; - var isAllowed = allowedGlobals(key) || key.charAt(0) === '_'; + var isAllowed = allowedGlobals(key) || + (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data)); if (!has && !isAllowed) { - warnNonPresent(target, key); + if (key in target.$data) { warnReservedPrefix(target, key); } + else { warnNonPresent(target, key); } } return has || !isAllowed } @@ -5903,7 +6058,8 @@ if (true) { var getHandler = { get: function get (target, key) { if (typeof key === 'string' && !(key in target)) { - warnNonPresent(target, key); + if (key in target.$data) { warnReservedPrefix(target, key); } + else { warnNonPresent(target, key); } } return target[key] } @@ -5977,7 +6133,7 @@ var normalizeEvent = cached(function (name) { } }); -function createFnInvoker (fns) { +function createFnInvoker (fns, vm) { function invoker () { var arguments$1 = arguments; @@ -5985,11 +6141,11 @@ function createFnInvoker (fns) { if (Array.isArray(fns)) { var cloned = fns.slice(); for (var i = 0; i < cloned.length; i++) { - cloned[i].apply(null, arguments$1); + invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler"); } } else { // return handler return value for single handlers - return fns.apply(null, arguments) + return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler") } } invoker.fns = fns; @@ -6001,24 +6157,27 @@ function updateListeners ( oldOn, add, remove$$1, + createOnceHandler, vm ) { - var name, def, cur, old, event; + var name, def$$1, cur, old, event; for (name in on) { - def = cur = on[name]; + def$$1 = cur = on[name]; old = oldOn[name]; event = normalizeEvent(name); - /* istanbul ignore if */ if (isUndef(cur)) { - "development" !== 'production' && warn( + warn( "Invalid handler for event \"" + (event.name) + "\": got " + String(cur), vm ); } else if (isUndef(old)) { if (isUndef(cur.fns)) { - cur = on[name] = createFnInvoker(cur); + cur = on[name] = createFnInvoker(cur, vm); } - add(event.name, cur, event.once, event.capture, event.passive, event.params); + if (isTrue(event.once)) { + cur = on[name] = createOnceHandler(event.name, cur, event.capture); + } + add(event.name, cur, event.capture, event.passive, event.params); } else if (cur !== old) { old.fns = cur; on[name] = old; @@ -6087,7 +6246,7 @@ function extractPropsFromVNodeData ( if (isDef(attrs) || isDef(props)) { for (var key in propOptions) { var altKey = hyphenate(key); - if (true) { + { var keyInLowerCase = key.toLowerCase(); if ( key !== keyInLowerCase && @@ -6224,290 +6383,70 @@ function normalizeArrayChildren (children, nestedIndex) { /* */ -function ensureCtor (comp, base) { - if ( - comp.__esModule || - (hasSymbol && comp[Symbol.toStringTag] === 'Module') - ) { - comp = comp.default; +function initProvide (vm) { + var provide = vm.$options.provide; + if (provide) { + vm._provided = typeof provide === 'function' + ? provide.call(vm) + : provide; } - return isObject(comp) - ? base.extend(comp) - : comp } -function createAsyncPlaceholder ( - factory, - data, - context, - children, - tag -) { - var node = createEmptyVNode(); - node.asyncFactory = factory; - node.asyncMeta = { data: data, context: context, children: children, tag: tag }; - return node -} - -function resolveAsyncComponent ( - factory, - baseCtor, - context -) { - if (isTrue(factory.error) && isDef(factory.errorComp)) { - return factory.errorComp - } - - if (isDef(factory.resolved)) { - return factory.resolved - } - - if (isTrue(factory.loading) && isDef(factory.loadingComp)) { - return factory.loadingComp - } - - if (isDef(factory.contexts)) { - // already pending - factory.contexts.push(context); - } else { - var contexts = factory.contexts = [context]; - var sync = true; - - var forceRender = function () { - for (var i = 0, l = contexts.length; i < l; i++) { - contexts[i].$forceUpdate(); - } - }; - - var resolve = once(function (res) { - // cache resolved - factory.resolved = ensureCtor(res, baseCtor); - // invoke callbacks only if this is not a synchronous resolve - // (async resolves are shimmed as synchronous during SSR) - if (!sync) { - forceRender(); +function initInjections (vm) { + var result = resolveInject(vm.$options.inject, vm); + if (result) { + toggleObserving(false); + Object.keys(result).forEach(function (key) { + /* istanbul ignore else */ + { + defineReactive$$1(vm, key, result[key], function () { + warn( + "Avoid mutating an injected value directly since the changes will be " + + "overwritten whenever the provided component re-renders. " + + "injection being mutated: \"" + key + "\"", + vm + ); + }); } }); - - var reject = once(function (reason) { - "development" !== 'production' && warn( - "Failed to resolve async component: " + (String(factory)) + - (reason ? ("\nReason: " + reason) : '') - ); - if (isDef(factory.errorComp)) { - factory.error = true; - forceRender(); - } - }); - - var res = factory(resolve, reject); - - if (isObject(res)) { - if (typeof res.then === 'function') { - // () => Promise - if (isUndef(factory.resolved)) { - res.then(resolve, reject); - } - } else if (isDef(res.component) && typeof res.component.then === 'function') { - res.component.then(resolve, reject); - - if (isDef(res.error)) { - factory.errorComp = ensureCtor(res.error, baseCtor); - } - - if (isDef(res.loading)) { - factory.loadingComp = ensureCtor(res.loading, baseCtor); - if (res.delay === 0) { - factory.loading = true; - } else { - setTimeout(function () { - if (isUndef(factory.resolved) && isUndef(factory.error)) { - factory.loading = true; - forceRender(); - } - }, res.delay || 200); - } - } - - if (isDef(res.timeout)) { - setTimeout(function () { - if (isUndef(factory.resolved)) { - reject( - true - ? ("timeout (" + (res.timeout) + "ms)") - : null - ); - } - }, res.timeout); - } - } - } - - sync = false; - // return in case resolved synchronously - return factory.loading - ? factory.loadingComp - : factory.resolved + toggleObserving(true); } } -/* */ +function resolveInject (inject, vm) { + if (inject) { + // inject is :any because flow is not smart enough to figure out cached + var result = Object.create(null); + var keys = hasSymbol + ? Reflect.ownKeys(inject) + : Object.keys(inject); -function isAsyncPlaceholder (node) { - return node.isComment && node.asyncFactory -} - -/* */ - -function getFirstComponentChild (children) { - if (Array.isArray(children)) { - for (var i = 0; i < children.length; i++) { - var c = children[i]; - if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) { - return c - } - } - } -} - -/* */ - -/* */ - -function initEvents (vm) { - vm._events = Object.create(null); - vm._hasHookEvent = false; - // init parent attached events - var listeners = vm.$options._parentListeners; - if (listeners) { - updateComponentListeners(vm, listeners); - } -} - -var target; - -function add (event, fn, once) { - if (once) { - target.$once(event, fn); - } else { - target.$on(event, fn); - } -} - -function remove$1 (event, fn) { - target.$off(event, fn); -} - -function updateComponentListeners ( - vm, - listeners, - oldListeners -) { - target = vm; - updateListeners(listeners, oldListeners || {}, add, remove$1, vm); - target = undefined; -} - -function eventsMixin (Vue) { - var hookRE = /^hook:/; - Vue.prototype.$on = function (event, fn) { - var this$1 = this; - - var vm = this; - if (Array.isArray(event)) { - for (var i = 0, l = event.length; i < l; i++) { - this$1.$on(event[i], fn); - } - } else { - (vm._events[event] || (vm._events[event] = [])).push(fn); - // optimize hook:event cost by using a boolean flag marked at registration - // instead of a hash lookup - if (hookRE.test(event)) { - vm._hasHookEvent = true; - } - } - return vm - }; - - Vue.prototype.$once = function (event, fn) { - var vm = this; - function on () { - vm.$off(event, on); - fn.apply(vm, arguments); - } - on.fn = fn; - vm.$on(event, on); - return vm - }; - - Vue.prototype.$off = function (event, fn) { - var this$1 = this; - - var vm = this; - // all - if (!arguments.length) { - vm._events = Object.create(null); - return vm - } - // array of events - if (Array.isArray(event)) { - for (var i = 0, l = event.length; i < l; i++) { - this$1.$off(event[i], fn); - } - return vm - } - // specific event - var cbs = vm._events[event]; - if (!cbs) { - return vm - } - if (!fn) { - vm._events[event] = null; - return vm - } - if (fn) { - // specific handler - var cb; - var i$1 = cbs.length; - while (i$1--) { - cb = cbs[i$1]; - if (cb === fn || cb.fn === fn) { - cbs.splice(i$1, 1); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + // #6574 in case the inject object is observed... + if (key === '__ob__') { continue } + var provideKey = inject[key].from; + var source = vm; + while (source) { + if (source._provided && hasOwn(source._provided, provideKey)) { + result[key] = source._provided[provideKey]; break } + source = source.$parent; } - } - return vm - }; - - Vue.prototype.$emit = function (event) { - var vm = this; - if (true) { - var lowerCaseEvent = event.toLowerCase(); - if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) { - tip( - "Event \"" + lowerCaseEvent + "\" is emitted in component " + - (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " + - "Note that HTML attributes are case-insensitive and you cannot use " + - "v-on to listen to camelCase events when using in-DOM templates. " + - "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"." - ); - } - } - var cbs = vm._events[event]; - if (cbs) { - cbs = cbs.length > 1 ? toArray(cbs) : cbs; - var args = toArray(arguments, 1); - for (var i = 0, l = cbs.length; i < l; i++) { - try { - cbs[i].apply(vm, args); - } catch (e) { - handleError(e, vm, ("event handler for \"" + event + "\"")); + if (!source) { + if ('default' in inject[key]) { + var provideDefault = inject[key].default; + result[key] = typeof provideDefault === 'function' + ? provideDefault.call(vm) + : provideDefault; + } else { + warn(("Injection \"" + key + "\" not found"), vm); } } } - return vm - }; + return result + } } /* */ @@ -6521,10 +6460,10 @@ function resolveSlots ( children, context ) { - var slots = {}; - if (!children) { - return slots + if (!children || !children.length) { + return {} } + var slots = {}; for (var i = 0, l = children.length; i < l; i++) { var child = children[i]; var data = child.data; @@ -6561,1097 +6500,80 @@ function isWhitespace (node) { return (node.isComment && !node.asyncFactory) || node.text === ' ' } -function resolveScopedSlots ( - fns, // see flow/vnode - res +/* */ + +function normalizeScopedSlots ( + slots, + normalSlots, + prevSlots ) { - res = res || {}; - for (var i = 0; i < fns.length; i++) { - if (Array.isArray(fns[i])) { - resolveScopedSlots(fns[i], res); - } else { - res[fns[i].key] = fns[i].fn; + var res; + var isStable = slots ? !!slots.$stable : true; + var key = slots && slots.$key; + if (!slots) { + res = {}; + } else if (slots._normalized) { + // fast path 1: child component re-render only, parent did not change + return slots._normalized + } else if ( + isStable && + prevSlots && + prevSlots !== emptyObject && + key === prevSlots.$key && + Object.keys(normalSlots).length === 0 + ) { + // fast path 2: stable scoped slots w/ no normal slots to proxy, + // only need to normalize once + return prevSlots + } else { + res = {}; + for (var key$1 in slots) { + if (slots[key$1] && key$1[0] !== '$') { + res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]); + } } } + // expose normal slots on scopedSlots + for (var key$2 in normalSlots) { + if (!(key$2 in res)) { + res[key$2] = proxyNormalSlot(normalSlots, key$2); + } + } + // avoriaz seems to mock a non-extensible $scopedSlots object + // and when that is passed down this would cause an error + if (slots && Object.isExtensible(slots)) { + (slots)._normalized = res; + } + def(res, '$stable', isStable); + def(res, '$key', key); return res } -/* */ - -var activeInstance = null; -var isUpdatingChildComponent = false; - -function initLifecycle (vm) { - var options = vm.$options; - - // locate first non-abstract parent - var parent = options.parent; - if (parent && !options.abstract) { - while (parent.$options.abstract && parent.$parent) { - parent = parent.$parent; - } - parent.$children.push(vm); - } - - vm.$parent = parent; - vm.$root = parent ? parent.$root : vm; - - vm.$children = []; - vm.$refs = {}; - - vm._watcher = null; - vm._inactive = null; - vm._directInactive = false; - vm._isMounted = false; - vm._isDestroyed = false; - vm._isBeingDestroyed = false; -} - -function lifecycleMixin (Vue) { - Vue.prototype._update = function (vnode, hydrating) { - var vm = this; - if (vm._isMounted) { - callHook(vm, 'beforeUpdate'); - } - var prevEl = vm.$el; - var prevVnode = vm._vnode; - var prevActiveInstance = activeInstance; - activeInstance = vm; - vm._vnode = vnode; - // Vue.prototype.__patch__ is injected in entry points - // based on the rendering backend used. - if (!prevVnode) { - // initial render - vm.$el = vm.__patch__( - vm.$el, vnode, hydrating, false /* removeOnly */, - vm.$options._parentElm, - vm.$options._refElm - ); - // no need for the ref nodes after initial patch - // this prevents keeping a detached DOM tree in memory (#5851) - vm.$options._parentElm = vm.$options._refElm = null; - } else { - // updates - vm.$el = vm.__patch__(prevVnode, vnode); - } - activeInstance = prevActiveInstance; - // update __vue__ reference - if (prevEl) { - prevEl.__vue__ = null; - } - if (vm.$el) { - vm.$el.__vue__ = vm; - } - // if parent is an HOC, update its $el as well - if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) { - vm.$parent.$el = vm.$el; - } - // updated hook is called by the scheduler to ensure that children are - // updated in a parent's updated hook. +function normalizeScopedSlot(normalSlots, key, fn) { + var normalized = function () { + var res = arguments.length ? fn.apply(null, arguments) : fn({}); + res = res && typeof res === 'object' && !Array.isArray(res) + ? [res] // single vnode + : normalizeChildren(res); + return res && res.length === 0 + ? undefined + : res }; - - Vue.prototype.$forceUpdate = function () { - var vm = this; - if (vm._watcher) { - vm._watcher.update(); - } - }; - - Vue.prototype.$destroy = function () { - var vm = this; - if (vm._isBeingDestroyed) { - return - } - callHook(vm, 'beforeDestroy'); - vm._isBeingDestroyed = true; - // remove self from parent - var parent = vm.$parent; - if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) { - remove(parent.$children, vm); - } - // teardown watchers - if (vm._watcher) { - vm._watcher.teardown(); - } - var i = vm._watchers.length; - while (i--) { - vm._watchers[i].teardown(); - } - // remove reference from data ob - // frozen object may not have observer. - if (vm._data.__ob__) { - vm._data.__ob__.vmCount--; - } - // call the last hook... - vm._isDestroyed = true; - // invoke destroy hooks on current rendered tree - vm.__patch__(vm._vnode, null); - // fire destroyed hook - callHook(vm, 'destroyed'); - // turn off all instance listeners. - vm.$off(); - // remove __vue__ reference - if (vm.$el) { - vm.$el.__vue__ = null; - } - // release circular reference (#6759) - if (vm.$vnode) { - vm.$vnode.parent = null; - } - }; -} - -function mountComponent ( - vm, - el, - hydrating -) { - vm.$el = el; - if (!vm.$options.render) { - vm.$options.render = createEmptyVNode; - if (true) { - /* istanbul ignore if */ - if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') || - vm.$options.el || el) { - warn( - 'You are using the runtime-only build of Vue where the template ' + - 'compiler is not available. Either pre-compile the templates into ' + - 'render functions, or use the compiler-included build.', - vm - ); - } else { - warn( - 'Failed to mount component: template or render function not defined.', - vm - ); - } - } - } - callHook(vm, 'beforeMount'); - - var updateComponent; - /* istanbul ignore if */ - if ("development" !== 'production' && config.performance && mark) { - updateComponent = function () { - var name = vm._name; - var id = vm._uid; - var startTag = "vue-perf-start:" + id; - var endTag = "vue-perf-end:" + id; - - mark(startTag); - var vnode = vm._render(); - mark(endTag); - measure(("vue " + name + " render"), startTag, endTag); - - mark(startTag); - vm._update(vnode, hydrating); - mark(endTag); - measure(("vue " + name + " patch"), startTag, endTag); - }; - } else { - updateComponent = function () { - vm._update(vm._render(), hydrating); - }; - } - - // we set this to vm._watcher inside the watcher's constructor - // since the watcher's initial patch may call $forceUpdate (e.g. inside child - // component's mounted hook), which relies on vm._watcher being already defined - new Watcher(vm, updateComponent, noop, null, true /* isRenderWatcher */); - hydrating = false; - - // manually mounted instance, call mounted on self - // mounted is called for render-created child components in its inserted hook - if (vm.$vnode == null) { - vm._isMounted = true; - callHook(vm, 'mounted'); - } - return vm -} - -function updateChildComponent ( - vm, - propsData, - listeners, - parentVnode, - renderChildren -) { - if (true) { - isUpdatingChildComponent = true; - } - - // determine whether component has slot children - // we need to do this before overwriting $options._renderChildren - var hasChildren = !!( - renderChildren || // has new static slots - vm.$options._renderChildren || // has old static slots - parentVnode.data.scopedSlots || // has new scoped slots - vm.$scopedSlots !== emptyObject // has old scoped slots - ); - - vm.$options._parentVnode = parentVnode; - vm.$vnode = parentVnode; // update vm's placeholder node without re-render - - if (vm._vnode) { // update child tree's parent - vm._vnode.parent = parentVnode; - } - vm.$options._renderChildren = renderChildren; - - // update $attrs and $listeners hash - // these are also reactive so they may trigger child update if the child - // used them during render - vm.$attrs = parentVnode.data.attrs || emptyObject; - vm.$listeners = listeners || emptyObject; - - // update props - if (propsData && vm.$options.props) { - toggleObserving(false); - var props = vm._props; - var propKeys = vm.$options._propKeys || []; - for (var i = 0; i < propKeys.length; i++) { - var key = propKeys[i]; - var propOptions = vm.$options.props; // wtf flow? - props[key] = validateProp(key, propOptions, propsData, vm); - } - toggleObserving(true); - // keep a copy of raw propsData - vm.$options.propsData = propsData; - } - - // update listeners - listeners = listeners || emptyObject; - var oldListeners = vm.$options._parentListeners; - vm.$options._parentListeners = listeners; - updateComponentListeners(vm, listeners, oldListeners); - - // resolve slots + force update if has children - if (hasChildren) { - vm.$slots = resolveSlots(renderChildren, parentVnode.context); - vm.$forceUpdate(); - } - - if (true) { - isUpdatingChildComponent = false; - } -} - -function isInInactiveTree (vm) { - while (vm && (vm = vm.$parent)) { - if (vm._inactive) { return true } - } - return false -} - -function activateChildComponent (vm, direct) { - if (direct) { - vm._directInactive = false; - if (isInInactiveTree(vm)) { - return - } - } else if (vm._directInactive) { - return - } - if (vm._inactive || vm._inactive === null) { - vm._inactive = false; - for (var i = 0; i < vm.$children.length; i++) { - activateChildComponent(vm.$children[i]); - } - callHook(vm, 'activated'); - } -} - -function deactivateChildComponent (vm, direct) { - if (direct) { - vm._directInactive = true; - if (isInInactiveTree(vm)) { - return - } - } - if (!vm._inactive) { - vm._inactive = true; - for (var i = 0; i < vm.$children.length; i++) { - deactivateChildComponent(vm.$children[i]); - } - callHook(vm, 'deactivated'); - } -} - -function callHook (vm, hook) { - // #7573 disable dep collection when invoking lifecycle hooks - pushTarget(); - var handlers = vm.$options[hook]; - if (handlers) { - for (var i = 0, j = handlers.length; i < j; i++) { - try { - handlers[i].call(vm); - } catch (e) { - handleError(e, vm, (hook + " hook")); - } - } - } - if (vm._hasHookEvent) { - vm.$emit('hook:' + hook); - } - popTarget(); -} - -/* */ - - -var MAX_UPDATE_COUNT = 100; - -var queue = []; -var activatedChildren = []; -var has = {}; -var circular = {}; -var waiting = false; -var flushing = false; -var index = 0; - -/** - * Reset the scheduler's state. - */ -function resetSchedulerState () { - index = queue.length = activatedChildren.length = 0; - has = {}; - if (true) { - circular = {}; - } - waiting = flushing = false; -} - -/** - * Flush both queues and run the watchers. - */ -function flushSchedulerQueue () { - flushing = true; - var watcher, id; - - // Sort queue before flush. - // This ensures that: - // 1. Components are updated from parent to child. (because parent is always - // created before the child) - // 2. A component's user watchers are run before its render watcher (because - // user watchers are created before the render watcher) - // 3. If a component is destroyed during a parent component's watcher run, - // its watchers can be skipped. - queue.sort(function (a, b) { return a.id - b.id; }); - - // do not cache length because more watchers might be pushed - // as we run existing watchers - for (index = 0; index < queue.length; index++) { - watcher = queue[index]; - id = watcher.id; - has[id] = null; - watcher.run(); - // in dev build, check and stop circular updates. - if ("development" !== 'production' && has[id] != null) { - circular[id] = (circular[id] || 0) + 1; - if (circular[id] > MAX_UPDATE_COUNT) { - warn( - 'You may have an infinite update loop ' + ( - watcher.user - ? ("in watcher with expression \"" + (watcher.expression) + "\"") - : "in a component render function." - ), - watcher.vm - ); - break - } - } - } - - // keep copies of post queues before resetting state - var activatedQueue = activatedChildren.slice(); - var updatedQueue = queue.slice(); - - resetSchedulerState(); - - // call component updated and activated hooks - callActivatedHooks(activatedQueue); - callUpdatedHooks(updatedQueue); - - // devtool hook - /* istanbul ignore if */ - if (devtools && config.devtools) { - devtools.emit('flush'); - } -} - -function callUpdatedHooks (queue) { - var i = queue.length; - while (i--) { - var watcher = queue[i]; - var vm = watcher.vm; - if (vm._watcher === watcher && vm._isMounted) { - callHook(vm, 'updated'); - } - } -} - -/** - * Queue a kept-alive component that was activated during patch. - * The queue will be processed after the entire tree has been patched. - */ -function queueActivatedComponent (vm) { - // setting _inactive to false here so that a render function can - // rely on checking whether it's in an inactive tree (e.g. router-view) - vm._inactive = false; - activatedChildren.push(vm); -} - -function callActivatedHooks (queue) { - for (var i = 0; i < queue.length; i++) { - queue[i]._inactive = true; - activateChildComponent(queue[i], true /* true */); - } -} - -/** - * Push a watcher into the watcher queue. - * Jobs with duplicate IDs will be skipped unless it's - * pushed when the queue is being flushed. - */ -function queueWatcher (watcher) { - var id = watcher.id; - if (has[id] == null) { - has[id] = true; - if (!flushing) { - queue.push(watcher); - } else { - // if already flushing, splice the watcher based on its id - // if already past its id, it will be run next immediately. - var i = queue.length - 1; - while (i > index && queue[i].id > watcher.id) { - i--; - } - queue.splice(i + 1, 0, watcher); - } - // queue the flush - if (!waiting) { - waiting = true; - nextTick(flushSchedulerQueue); - } - } -} - -/* */ - -var uid$1 = 0; - -/** - * A watcher parses an expression, collects dependencies, - * and fires callback when the expression value changes. - * This is used for both the $watch() api and directives. - */ -var Watcher = function Watcher ( - vm, - expOrFn, - cb, - options, - isRenderWatcher -) { - this.vm = vm; - if (isRenderWatcher) { - vm._watcher = this; - } - vm._watchers.push(this); - // options - if (options) { - this.deep = !!options.deep; - this.user = !!options.user; - this.lazy = !!options.lazy; - this.sync = !!options.sync; - } else { - this.deep = this.user = this.lazy = this.sync = false; - } - this.cb = cb; - this.id = ++uid$1; // uid for batching - this.active = true; - this.dirty = this.lazy; // for lazy watchers - this.deps = []; - this.newDeps = []; - this.depIds = new _Set(); - this.newDepIds = new _Set(); - this.expression = true - ? expOrFn.toString() - : ''; - // parse expression for getter - if (typeof expOrFn === 'function') { - this.getter = expOrFn; - } else { - this.getter = parsePath(expOrFn); - if (!this.getter) { - this.getter = function () {}; - "development" !== 'production' && warn( - "Failed watching path: \"" + expOrFn + "\" " + - 'Watcher only accepts simple dot-delimited paths. ' + - 'For full control, use a function instead.', - vm - ); - } - } - this.value = this.lazy - ? undefined - : this.get(); -}; - -/** - * Evaluate the getter, and re-collect dependencies. - */ -Watcher.prototype.get = function get () { - pushTarget(this); - var value; - var vm = this.vm; - try { - value = this.getter.call(vm, vm); - } catch (e) { - if (this.user) { - handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\"")); - } else { - throw e - } - } finally { - // "touch" every property so they are all tracked as - // dependencies for deep watching - if (this.deep) { - traverse(value); - } - popTarget(); - this.cleanupDeps(); - } - return value -}; - -/** - * Add a dependency to this directive. - */ -Watcher.prototype.addDep = function addDep (dep) { - var id = dep.id; - if (!this.newDepIds.has(id)) { - this.newDepIds.add(id); - this.newDeps.push(dep); - if (!this.depIds.has(id)) { - dep.addSub(this); - } - } -}; - -/** - * Clean up for dependency collection. - */ -Watcher.prototype.cleanupDeps = function cleanupDeps () { - var this$1 = this; - - var i = this.deps.length; - while (i--) { - var dep = this$1.deps[i]; - if (!this$1.newDepIds.has(dep.id)) { - dep.removeSub(this$1); - } - } - var tmp = this.depIds; - this.depIds = this.newDepIds; - this.newDepIds = tmp; - this.newDepIds.clear(); - tmp = this.deps; - this.deps = this.newDeps; - this.newDeps = tmp; - this.newDeps.length = 0; -}; - -/** - * Subscriber interface. - * Will be called when a dependency changes. - */ -Watcher.prototype.update = function update () { - /* istanbul ignore else */ - if (this.lazy) { - this.dirty = true; - } else if (this.sync) { - this.run(); - } else { - queueWatcher(this); - } -}; - -/** - * Scheduler job interface. - * Will be called by the scheduler. - */ -Watcher.prototype.run = function run () { - if (this.active) { - var value = this.get(); - if ( - value !== this.value || - // Deep watchers and watchers on Object/Arrays should fire even - // when the value is the same, because the value may - // have mutated. - isObject(value) || - this.deep - ) { - // set new value - var oldValue = this.value; - this.value = value; - if (this.user) { - try { - this.cb.call(this.vm, value, oldValue); - } catch (e) { - handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\"")); - } - } else { - this.cb.call(this.vm, value, oldValue); - } - } - } -}; - -/** - * Evaluate the value of the watcher. - * This only gets called for lazy watchers. - */ -Watcher.prototype.evaluate = function evaluate () { - this.value = this.get(); - this.dirty = false; -}; - -/** - * Depend on all deps collected by this watcher. - */ -Watcher.prototype.depend = function depend () { - var this$1 = this; - - var i = this.deps.length; - while (i--) { - this$1.deps[i].depend(); - } -}; - -/** - * Remove self from all dependencies' subscriber list. - */ -Watcher.prototype.teardown = function teardown () { - var this$1 = this; - - if (this.active) { - // remove self from vm's watcher list - // this is a somewhat expensive operation so we skip it - // if the vm is being destroyed. - if (!this.vm._isBeingDestroyed) { - remove(this.vm._watchers, this); - } - var i = this.deps.length; - while (i--) { - this$1.deps[i].removeSub(this$1); - } - this.active = false; - } -}; - -/* */ - -var sharedPropertyDefinition = { - enumerable: true, - configurable: true, - get: noop, - set: noop -}; - -function proxy (target, sourceKey, key) { - sharedPropertyDefinition.get = function proxyGetter () { - return this[sourceKey][key] - }; - sharedPropertyDefinition.set = function proxySetter (val) { - this[sourceKey][key] = val; - }; - Object.defineProperty(target, key, sharedPropertyDefinition); -} - -function initState (vm) { - vm._watchers = []; - var opts = vm.$options; - if (opts.props) { initProps(vm, opts.props); } - if (opts.methods) { initMethods(vm, opts.methods); } - if (opts.data) { - initData(vm); - } else { - observe(vm._data = {}, true /* asRootData */); - } - if (opts.computed) { initComputed(vm, opts.computed); } - if (opts.watch && opts.watch !== nativeWatch) { - initWatch(vm, opts.watch); - } -} - -function initProps (vm, propsOptions) { - var propsData = vm.$options.propsData || {}; - var props = vm._props = {}; - // cache prop keys so that future props updates can iterate using Array - // instead of dynamic object key enumeration. - var keys = vm.$options._propKeys = []; - var isRoot = !vm.$parent; - // root instance props should be converted - if (!isRoot) { - toggleObserving(false); - } - var loop = function ( key ) { - keys.push(key); - var value = validateProp(key, propsOptions, propsData, vm); - /* istanbul ignore else */ - if (true) { - var hyphenatedKey = hyphenate(key); - if (isReservedAttribute(hyphenatedKey) || - config.isReservedAttr(hyphenatedKey)) { - warn( - ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."), - vm - ); - } - defineReactive(props, key, value, function () { - if (vm.$parent && !isUpdatingChildComponent) { - warn( - "Avoid mutating a prop directly since the value will be " + - "overwritten whenever the parent component re-renders. " + - "Instead, use a data or computed property based on the prop's " + - "value. Prop being mutated: \"" + key + "\"", - vm - ); - } - }); - } else { - defineReactive(props, key, value); - } - // static props are already proxied on the component's prototype - // during Vue.extend(). We only need to proxy props defined at - // instantiation here. - if (!(key in vm)) { - proxy(vm, "_props", key); - } - }; - - for (var key in propsOptions) loop( key ); - toggleObserving(true); -} - -function initData (vm) { - var data = vm.$options.data; - data = vm._data = typeof data === 'function' - ? getData(data, vm) - : data || {}; - if (!isPlainObject(data)) { - data = {}; - "development" !== 'production' && warn( - 'data functions should return an object:\n' + - 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function', - vm - ); - } - // proxy data on instance - var keys = Object.keys(data); - var props = vm.$options.props; - var methods = vm.$options.methods; - var i = keys.length; - while (i--) { - var key = keys[i]; - if (true) { - if (methods && hasOwn(methods, key)) { - warn( - ("Method \"" + key + "\" has already been defined as a data property."), - vm - ); - } - } - if (props && hasOwn(props, key)) { - "development" !== 'production' && warn( - "The data property \"" + key + "\" is already declared as a prop. " + - "Use prop default value instead.", - vm - ); - } else if (!isReserved(key)) { - proxy(vm, "_data", key); - } - } - // observe data - observe(data, true /* asRootData */); -} - -function getData (data, vm) { - // #7573 disable dep collection when invoking data getters - pushTarget(); - try { - return data.call(vm, vm) - } catch (e) { - handleError(e, vm, "data()"); - return {} - } finally { - popTarget(); - } -} - -var computedWatcherOptions = { lazy: true }; - -function initComputed (vm, computed) { - // $flow-disable-line - var watchers = vm._computedWatchers = Object.create(null); - // computed properties are just getters during SSR - var isSSR = isServerRendering(); - - for (var key in computed) { - var userDef = computed[key]; - var getter = typeof userDef === 'function' ? userDef : userDef.get; - if ("development" !== 'production' && getter == null) { - warn( - ("Getter is missing for computed property \"" + key + "\"."), - vm - ); - } - - if (!isSSR) { - // create internal watcher for the computed property. - watchers[key] = new Watcher( - vm, - getter || noop, - noop, - computedWatcherOptions - ); - } - - // component-defined computed properties are already defined on the - // component prototype. We only need to define computed properties defined - // at instantiation here. - if (!(key in vm)) { - defineComputed(vm, key, userDef); - } else if (true) { - if (key in vm.$data) { - warn(("The computed property \"" + key + "\" is already defined in data."), vm); - } else if (vm.$options.props && key in vm.$options.props) { - warn(("The computed property \"" + key + "\" is already defined as a prop."), vm); - } - } - } -} - -function defineComputed ( - target, - key, - userDef -) { - var shouldCache = !isServerRendering(); - if (typeof userDef === 'function') { - sharedPropertyDefinition.get = shouldCache - ? createComputedGetter(key) - : userDef; - sharedPropertyDefinition.set = noop; - } else { - sharedPropertyDefinition.get = userDef.get - ? shouldCache && userDef.cache !== false - ? createComputedGetter(key) - : userDef.get - : noop; - sharedPropertyDefinition.set = userDef.set - ? userDef.set - : noop; - } - if ("development" !== 'production' && - sharedPropertyDefinition.set === noop) { - sharedPropertyDefinition.set = function () { - warn( - ("Computed property \"" + key + "\" was assigned to but it has no setter."), - this - ); - }; - } - Object.defineProperty(target, key, sharedPropertyDefinition); -} - -function createComputedGetter (key) { - return function computedGetter () { - var watcher = this._computedWatchers && this._computedWatchers[key]; - if (watcher) { - if (watcher.dirty) { - watcher.evaluate(); - } - if (Dep.target) { - watcher.depend(); - } - return watcher.value - } - } -} - -function initMethods (vm, methods) { - var props = vm.$options.props; - for (var key in methods) { - if (true) { - if (methods[key] == null) { - warn( - "Method \"" + key + "\" has an undefined value in the component definition. " + - "Did you reference the function correctly?", - vm - ); - } - if (props && hasOwn(props, key)) { - warn( - ("Method \"" + key + "\" has already been defined as a prop."), - vm - ); - } - if ((key in vm) && isReserved(key)) { - warn( - "Method \"" + key + "\" conflicts with an existing Vue instance method. " + - "Avoid defining component methods that start with _ or $." - ); - } - } - vm[key] = methods[key] == null ? noop : bind(methods[key], vm); - } -} - -function initWatch (vm, watch) { - for (var key in watch) { - var handler = watch[key]; - if (Array.isArray(handler)) { - for (var i = 0; i < handler.length; i++) { - createWatcher(vm, key, handler[i]); - } - } else { - createWatcher(vm, key, handler); - } - } -} - -function createWatcher ( - vm, - expOrFn, - handler, - options -) { - if (isPlainObject(handler)) { - options = handler; - handler = handler.handler; - } - if (typeof handler === 'string') { - handler = vm[handler]; - } - return vm.$watch(expOrFn, handler, options) -} - -function stateMixin (Vue) { - // flow somehow has problems with directly declared definition object - // when using Object.defineProperty, so we have to procedurally build up - // the object here. - var dataDef = {}; - dataDef.get = function () { return this._data }; - var propsDef = {}; - propsDef.get = function () { return this._props }; - if (true) { - dataDef.set = function (newData) { - warn( - 'Avoid replacing instance root $data. ' + - 'Use nested data properties instead.', - this - ); - }; - propsDef.set = function () { - warn("$props is readonly.", this); - }; - } - Object.defineProperty(Vue.prototype, '$data', dataDef); - Object.defineProperty(Vue.prototype, '$props', propsDef); - - Vue.prototype.$set = set; - Vue.prototype.$delete = del; - - Vue.prototype.$watch = function ( - expOrFn, - cb, - options - ) { - var vm = this; - if (isPlainObject(cb)) { - return createWatcher(vm, expOrFn, cb, options) - } - options = options || {}; - options.user = true; - var watcher = new Watcher(vm, expOrFn, cb, options); - if (options.immediate) { - cb.call(vm, watcher.value); - } - return function unwatchFn () { - watcher.teardown(); - } - }; -} - -/* */ - -function initProvide (vm) { - var provide = vm.$options.provide; - if (provide) { - vm._provided = typeof provide === 'function' - ? provide.call(vm) - : provide; - } -} - -function initInjections (vm) { - var result = resolveInject(vm.$options.inject, vm); - if (result) { - toggleObserving(false); - Object.keys(result).forEach(function (key) { - /* istanbul ignore else */ - if (true) { - defineReactive(vm, key, result[key], function () { - warn( - "Avoid mutating an injected value directly since the changes will be " + - "overwritten whenever the provided component re-renders. " + - "injection being mutated: \"" + key + "\"", - vm - ); - }); - } else { - defineReactive(vm, key, result[key]); - } + // this is a slot using the new v-slot syntax without scope. although it is + // compiled as a scoped slot, render fn users would expect it to be present + // on this.$slots because the usage is semantically a normal slot. + if (fn.proxy) { + Object.defineProperty(normalSlots, key, { + get: normalized, + enumerable: true, + configurable: true }); - toggleObserving(true); } + return normalized } -function resolveInject (inject, vm) { - if (inject) { - // inject is :any because flow is not smart enough to figure out cached - var result = Object.create(null); - var keys = hasSymbol - ? Reflect.ownKeys(inject).filter(function (key) { - /* istanbul ignore next */ - return Object.getOwnPropertyDescriptor(inject, key).enumerable - }) - : Object.keys(inject); - - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - var provideKey = inject[key].from; - var source = vm; - while (source) { - if (source._provided && hasOwn(source._provided, provideKey)) { - result[key] = source._provided[provideKey]; - break - } - source = source.$parent; - } - if (!source) { - if ('default' in inject[key]) { - var provideDefault = inject[key].default; - result[key] = typeof provideDefault === 'function' - ? provideDefault.call(vm) - : provideDefault; - } else if (true) { - warn(("Injection \"" + key + "\" not found"), vm); - } - } - } - return result - } +function proxyNormalSlot(slots, key) { + return function () { return slots[key]; } } /* */ @@ -7675,16 +6597,27 @@ function renderList ( ret[i] = render(i + 1, i); } } else if (isObject(val)) { - keys = Object.keys(val); - ret = new Array(keys.length); - for (i = 0, l = keys.length; i < l; i++) { - key = keys[i]; - ret[i] = render(val[key], key, i); + if (hasSymbol && val[Symbol.iterator]) { + ret = []; + var iterator = val[Symbol.iterator](); + var result = iterator.next(); + while (!result.done) { + ret.push(render(result.value, ret.length)); + result = iterator.next(); + } + } else { + keys = Object.keys(val); + ret = new Array(keys.length); + for (i = 0, l = keys.length; i < l; i++) { + key = keys[i]; + ret[i] = render(val[key], key, i); + } } } - if (isDef(ret)) { - (ret)._isVList = true; + if (!isDef(ret)) { + ret = []; } + (ret)._isVList = true; return ret } @@ -7704,7 +6637,7 @@ function renderSlot ( if (scopedSlotFn) { // scoped slot props = props || {}; if (bindObject) { - if ("development" !== 'production' && !isObject(bindObject)) { + if (!isObject(bindObject)) { warn( 'slot v-bind without argument expects an Object', this @@ -7714,19 +6647,7 @@ function renderSlot ( } nodes = scopedSlotFn(props) || fallback; } else { - var slotNodes = this.$slots[name]; - // warn duplicate slot usage - if (slotNodes) { - if ("development" !== 'production' && slotNodes._rendered) { - warn( - "Duplicate presence of slot \"" + name + "\" found in the same render tree " + - "- this will likely cause render errors.", - this - ); - } - slotNodes._rendered = true; - } - nodes = slotNodes || fallback; + nodes = this.$slots[name] || fallback; } var target = props && props.slot; @@ -7792,7 +6713,7 @@ function bindObjectProps ( ) { if (value) { if (!isObject(value)) { - "development" !== 'production' && warn( + warn( 'v-bind without argument expects an Object or Array value', this ); @@ -7814,12 +6735,13 @@ function bindObjectProps ( ? data.domProps || (data.domProps = {}) : data.attrs || (data.attrs = {}); } - if (!(key in hash)) { + var camelizedKey = camelize(key); + if (!(key in hash) && !(camelizedKey in hash)) { hash[key] = value[key]; if (isSync) { var on = data.on || (data.on = {}); - on[("update:" + key)] = function ($event) { + on[("update:" + camelizedKey)] = function ($event) { value[key] = $event; }; } @@ -7898,7 +6820,7 @@ function markStaticNode (node, key, isOnce) { function bindObjectListeners (data, value) { if (value) { if (!isPlainObject(value)) { - "development" !== 'production' && warn( + warn( 'v-on without argument expects an Object value', this ); @@ -7916,6 +6838,59 @@ function bindObjectListeners (data, value) { /* */ +function resolveScopedSlots ( + fns, // see flow/vnode + res, + // the following are added in 2.6 + hasDynamicKeys, + contentHashKey +) { + res = res || { $stable: !hasDynamicKeys }; + for (var i = 0; i < fns.length; i++) { + var slot = fns[i]; + if (Array.isArray(slot)) { + resolveScopedSlots(slot, res, hasDynamicKeys); + } else if (slot) { + // marker for reverse proxying v-slot without scope on this.$slots + if (slot.proxy) { + slot.fn.proxy = true; + } + res[slot.key] = slot.fn; + } + } + if (contentHashKey) { + (res).$key = contentHashKey; + } + return res +} + +/* */ + +function bindDynamicKeys (baseObj, values) { + for (var i = 0; i < values.length; i += 2) { + var key = values[i]; + if (typeof key === 'string' && key) { + baseObj[values[i]] = values[i + 1]; + } else if (key !== '' && key !== null) { + // null is a speical value for explicitly removing a binding + warn( + ("Invalid value for dynamic directive argument (expected string or null): " + key), + this + ); + } + } + return baseObj +} + +// helper to dynamically append modifier runtime markers to event names. +// ensure only append when value is already string, otherwise it will be cast +// to string and cause the type check to miss. +function prependModifier (value, symbol) { + return typeof value === 'string' ? symbol + value : value +} + +/* */ + function installRenderHelpers (target) { target._o = markOnce; target._n = toNumber; @@ -7932,6 +6907,8 @@ function installRenderHelpers (target) { target._e = createEmptyVNode; target._u = resolveScopedSlots; target._g = bindObjectListeners; + target._d = bindDynamicKeys; + target._p = prependModifier; } /* */ @@ -7943,6 +6920,8 @@ function FunctionalRenderContext ( parent, Ctor ) { + var this$1 = this; + var options = Ctor.options; // ensure the createElement function in functional components // gets a unique context - this is necessary for correct named slot check @@ -7968,7 +6947,22 @@ function FunctionalRenderContext ( this.parent = parent; this.listeners = data.on || emptyObject; this.injections = resolveInject(options.inject, parent); - this.slots = function () { return resolveSlots(children, parent); }; + this.slots = function () { + if (!this$1.$slots) { + normalizeScopedSlots( + data.scopedSlots, + this$1.$slots = resolveSlots(children, parent) + ); + } + return this$1.$slots + }; + + Object.defineProperty(this, 'scopedSlots', ({ + enumerable: true, + get: function get () { + return normalizeScopedSlots(data.scopedSlots, this.slots()) + } + })); // support for compiled functional template if (isCompiled) { @@ -7976,7 +6970,7 @@ function FunctionalRenderContext ( this.$options = options; // pre-resolve slots for renderSlot() this.$slots = this.slots(); - this.$scopedSlots = data.scopedSlots || emptyObject; + this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots); } if (options._scopeId) { @@ -8025,24 +7019,27 @@ function createFunctionalComponent ( var vnode = options.render.call(null, renderContext._c, renderContext); if (vnode instanceof VNode) { - return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options) + return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext) } else if (Array.isArray(vnode)) { var vnodes = normalizeChildren(vnode) || []; var res = new Array(vnodes.length); for (var i = 0; i < vnodes.length; i++) { - res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options); + res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext); } return res } } -function cloneAndMarkFunctionalResult (vnode, data, contextVm, options) { +function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) { // #7817 clone node before setting fnContext, otherwise if the node is reused // (e.g. it was from a cached normal slot) the fnContext causes named slots // that should not be matched to match. var clone = cloneVNode(vnode); clone.fnContext = contextVm; clone.fnOptions = options; + { + (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext; + } if (data.slot) { (clone.data || (clone.data = {})).slot = data.slot; } @@ -8057,33 +7054,15 @@ function mergeProps (to, from) { /* */ - - - -// Register the component hook to weex native render engine. -// The hook will be triggered by native, not javascript. - - -// Updates the state of the component to weex native render engine. - /* */ -// https://github.com/Hanks10100/weex-native-directive/tree/master/component - -// listening on native callback - /* */ /* */ // inline hooks to be invoked on component VNodes during patch var componentVNodeHooks = { - init: function init ( - vnode, - hydrating, - parentElm, - refElm - ) { + init: function init (vnode, hydrating) { if ( vnode.componentInstance && !vnode.componentInstance._isDestroyed && @@ -8095,9 +7074,7 @@ var componentVNodeHooks = { } else { var child = vnode.componentInstance = createComponentInstanceForVnode( vnode, - activeInstance, - parentElm, - refElm + activeInstance ); child.$mount(hydrating ? vnode.elm : undefined, hydrating); } @@ -8171,7 +7148,7 @@ function createComponent ( // if at this stage it's not a constructor or an async component factory, // reject. if (typeof Ctor !== 'function') { - if (true) { + { warn(("Invalid Component definition: " + (String(Ctor))), context); } return @@ -8181,7 +7158,7 @@ function createComponent ( var asyncFactory; if (isUndef(Ctor.cid)) { asyncFactory = Ctor; - Ctor = resolveAsyncComponent(asyncFactory, baseCtor, context); + Ctor = resolveAsyncComponent(asyncFactory, baseCtor); if (Ctor === undefined) { // return a placeholder node for async component, which is rendered // as a comment node but preserves all the raw information for the node. @@ -8246,25 +7223,17 @@ function createComponent ( asyncFactory ); - // Weex specific: invoke recycle-list optimized @render function for - // extracting cell-slot template. - // https://github.com/Hanks10100/weex-native-directive/tree/master/component - /* istanbul ignore if */ return vnode } function createComponentInstanceForVnode ( vnode, // we know it's MountedComponentVNode but flow doesn't - parent, // activeInstance in lifecycle state - parentElm, - refElm + parent // activeInstance in lifecycle state ) { var options = { _isComponent: true, - parent: parent, _parentVnode: vnode, - _parentElm: parentElm || null, - _refElm: refElm || null + parent: parent }; // check inline-template render functions var inlineTemplate = vnode.data.inlineTemplate; @@ -8279,20 +7248,43 @@ function installComponentHooks (data) { var hooks = data.hook || (data.hook = {}); for (var i = 0; i < hooksToMerge.length; i++) { var key = hooksToMerge[i]; - hooks[key] = componentVNodeHooks[key]; + var existing = hooks[key]; + var toMerge = componentVNodeHooks[key]; + if (existing !== toMerge && !(existing && existing._merged)) { + hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge; + } } } +function mergeHook$1 (f1, f2) { + var merged = function (a, b) { + // flow complains about extra args which is why we use any + f1(a, b); + f2(a, b); + }; + merged._merged = true; + return merged +} + // transform component v-model info (value and callback) into // prop and event handler respectively. function transformModel (options, data) { var prop = (options.model && options.model.prop) || 'value'; - var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value; + var event = (options.model && options.model.event) || 'input' + ;(data.attrs || (data.attrs = {}))[prop] = data.model.value; var on = data.on || (data.on = {}); - if (isDef(on[event])) { - on[event] = [data.model.callback].concat(on[event]); + var existing = on[event]; + var callback = data.model.callback; + if (isDef(existing)) { + if ( + Array.isArray(existing) + ? existing.indexOf(callback) === -1 + : existing !== callback + ) { + on[event] = [callback].concat(existing); + } } else { - on[event] = data.model.callback; + on[event] = callback; } } @@ -8330,7 +7322,7 @@ function _createElement ( normalizationType ) { if (isDef(data) && isDef((data).__ob__)) { - "development" !== 'production' && warn( + warn( "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" + 'Always create fresh vnode data objects in each render!', context @@ -8346,8 +7338,7 @@ function _createElement ( return createEmptyVNode() } // warn against non-primitive key - if ("development" !== 'production' && - isDef(data) && isDef(data.key) && !isPrimitive(data.key) + if (isDef(data) && isDef(data.key) && !isPrimitive(data.key) ) { { warn( @@ -8380,7 +7371,7 @@ function _createElement ( config.parsePlatformTagName(tag), data, children, undefined, undefined, context ); - } else if (isDef(Ctor = resolveAsset(context.$options, 'components', tag))) { + } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) { // component vnode = createComponent(Ctor, data, context, children, tag); } else { @@ -8461,19 +7452,18 @@ function initRender (vm) { var parentData = parentVnode && parentVnode.data; /* istanbul ignore else */ - if (true) { - defineReactive(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () { + { + defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () { !isUpdatingChildComponent && warn("$attrs is readonly.", vm); }, true); - defineReactive(vm, '$listeners', options._parentListeners || emptyObject, function () { + defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () { !isUpdatingChildComponent && warn("$listeners is readonly.", vm); }, true); - } else { - defineReactive(vm, '$attrs', parentData && parentData.attrs || emptyObject, null, true); - defineReactive(vm, '$listeners', options._parentListeners || emptyObject, null, true); } } +var currentRenderingInstance = null; + function renderMixin (Vue) { // install runtime convenience helpers installRenderHelpers(Vue.prototype); @@ -8488,16 +7478,12 @@ function renderMixin (Vue) { var render = ref.render; var _parentVnode = ref._parentVnode; - // reset _rendered flag on slots for duplicate slot check - if (true) { - for (var key in vm.$slots) { - // $flow-disable-line - vm.$slots[key]._rendered = false; - } - } - if (_parentVnode) { - vm.$scopedSlots = _parentVnode.data.scopedSlots || emptyObject; + vm.$scopedSlots = normalizeScopedSlots( + _parentVnode.data.scopedSlots, + vm.$slots, + vm.$scopedSlots + ); } // set parent vnode. this allows render functions to have access @@ -8506,30 +7492,36 @@ function renderMixin (Vue) { // render self var vnode; try { + // There's no need to maintain a stack becaues all render fns are called + // separately from one another. Nested component's render fns are called + // when parent component is patched. + currentRenderingInstance = vm; vnode = render.call(vm._renderProxy, vm.$createElement); } catch (e) { handleError(e, vm, "render"); // return error render result, // or previous vnode to prevent render error causing blank component /* istanbul ignore else */ - if (true) { - if (vm.$options.renderError) { - try { - vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e); - } catch (e) { - handleError(e, vm, "renderError"); - vnode = vm._vnode; - } - } else { + if (vm.$options.renderError) { + try { + vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e); + } catch (e) { + handleError(e, vm, "renderError"); vnode = vm._vnode; } } else { vnode = vm._vnode; } + } finally { + currentRenderingInstance = null; + } + // if the returned array contains only a single node, allow it + if (Array.isArray(vnode) && vnode.length === 1) { + vnode = vnode[0]; } // return empty vnode in case the render function errored out if (!(vnode instanceof VNode)) { - if ("development" !== 'production' && Array.isArray(vnode)) { + if (Array.isArray(vnode)) { warn( 'Multiple root nodes returned from render function. Render function ' + 'should return a single root node.', @@ -8546,6 +7538,1345 @@ function renderMixin (Vue) { /* */ +function ensureCtor (comp, base) { + if ( + comp.__esModule || + (hasSymbol && comp[Symbol.toStringTag] === 'Module') + ) { + comp = comp.default; + } + return isObject(comp) + ? base.extend(comp) + : comp +} + +function createAsyncPlaceholder ( + factory, + data, + context, + children, + tag +) { + var node = createEmptyVNode(); + node.asyncFactory = factory; + node.asyncMeta = { data: data, context: context, children: children, tag: tag }; + return node +} + +function resolveAsyncComponent ( + factory, + baseCtor +) { + if (isTrue(factory.error) && isDef(factory.errorComp)) { + return factory.errorComp + } + + if (isDef(factory.resolved)) { + return factory.resolved + } + + if (isTrue(factory.loading) && isDef(factory.loadingComp)) { + return factory.loadingComp + } + + var owner = currentRenderingInstance; + if (isDef(factory.owners)) { + // already pending + factory.owners.push(owner); + } else { + var owners = factory.owners = [owner]; + var sync = true; + + var forceRender = function (renderCompleted) { + for (var i = 0, l = owners.length; i < l; i++) { + (owners[i]).$forceUpdate(); + } + + if (renderCompleted) { + owners.length = 0; + } + }; + + var resolve = once(function (res) { + // cache resolved + factory.resolved = ensureCtor(res, baseCtor); + // invoke callbacks only if this is not a synchronous resolve + // (async resolves are shimmed as synchronous during SSR) + if (!sync) { + forceRender(true); + } else { + owners.length = 0; + } + }); + + var reject = once(function (reason) { + warn( + "Failed to resolve async component: " + (String(factory)) + + (reason ? ("\nReason: " + reason) : '') + ); + if (isDef(factory.errorComp)) { + factory.error = true; + forceRender(true); + } + }); + + var res = factory(resolve, reject); + + if (isObject(res)) { + if (isPromise(res)) { + // () => Promise + if (isUndef(factory.resolved)) { + res.then(resolve, reject); + } + } else if (isPromise(res.component)) { + res.component.then(resolve, reject); + + if (isDef(res.error)) { + factory.errorComp = ensureCtor(res.error, baseCtor); + } + + if (isDef(res.loading)) { + factory.loadingComp = ensureCtor(res.loading, baseCtor); + if (res.delay === 0) { + factory.loading = true; + } else { + setTimeout(function () { + if (isUndef(factory.resolved) && isUndef(factory.error)) { + factory.loading = true; + forceRender(false); + } + }, res.delay || 200); + } + } + + if (isDef(res.timeout)) { + setTimeout(function () { + if (isUndef(factory.resolved)) { + reject( + "timeout (" + (res.timeout) + "ms)" + ); + } + }, res.timeout); + } + } + } + + sync = false; + // return in case resolved synchronously + return factory.loading + ? factory.loadingComp + : factory.resolved + } +} + +/* */ + +function isAsyncPlaceholder (node) { + return node.isComment && node.asyncFactory +} + +/* */ + +function getFirstComponentChild (children) { + if (Array.isArray(children)) { + for (var i = 0; i < children.length; i++) { + var c = children[i]; + if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) { + return c + } + } + } +} + +/* */ + +/* */ + +function initEvents (vm) { + vm._events = Object.create(null); + vm._hasHookEvent = false; + // init parent attached events + var listeners = vm.$options._parentListeners; + if (listeners) { + updateComponentListeners(vm, listeners); + } +} + +var target; + +function add (event, fn) { + target.$on(event, fn); +} + +function remove$1 (event, fn) { + target.$off(event, fn); +} + +function createOnceHandler (event, fn) { + var _target = target; + return function onceHandler () { + var res = fn.apply(null, arguments); + if (res !== null) { + _target.$off(event, onceHandler); + } + } +} + +function updateComponentListeners ( + vm, + listeners, + oldListeners +) { + target = vm; + updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm); + target = undefined; +} + +function eventsMixin (Vue) { + var hookRE = /^hook:/; + Vue.prototype.$on = function (event, fn) { + var vm = this; + if (Array.isArray(event)) { + for (var i = 0, l = event.length; i < l; i++) { + vm.$on(event[i], fn); + } + } else { + (vm._events[event] || (vm._events[event] = [])).push(fn); + // optimize hook:event cost by using a boolean flag marked at registration + // instead of a hash lookup + if (hookRE.test(event)) { + vm._hasHookEvent = true; + } + } + return vm + }; + + Vue.prototype.$once = function (event, fn) { + var vm = this; + function on () { + vm.$off(event, on); + fn.apply(vm, arguments); + } + on.fn = fn; + vm.$on(event, on); + return vm + }; + + Vue.prototype.$off = function (event, fn) { + var vm = this; + // all + if (!arguments.length) { + vm._events = Object.create(null); + return vm + } + // array of events + if (Array.isArray(event)) { + for (var i$1 = 0, l = event.length; i$1 < l; i$1++) { + vm.$off(event[i$1], fn); + } + return vm + } + // specific event + var cbs = vm._events[event]; + if (!cbs) { + return vm + } + if (!fn) { + vm._events[event] = null; + return vm + } + // specific handler + var cb; + var i = cbs.length; + while (i--) { + cb = cbs[i]; + if (cb === fn || cb.fn === fn) { + cbs.splice(i, 1); + break + } + } + return vm + }; + + Vue.prototype.$emit = function (event) { + var vm = this; + { + var lowerCaseEvent = event.toLowerCase(); + if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) { + tip( + "Event \"" + lowerCaseEvent + "\" is emitted in component " + + (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " + + "Note that HTML attributes are case-insensitive and you cannot use " + + "v-on to listen to camelCase events when using in-DOM templates. " + + "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"." + ); + } + } + var cbs = vm._events[event]; + if (cbs) { + cbs = cbs.length > 1 ? toArray(cbs) : cbs; + var args = toArray(arguments, 1); + var info = "event handler for \"" + event + "\""; + for (var i = 0, l = cbs.length; i < l; i++) { + invokeWithErrorHandling(cbs[i], vm, args, vm, info); + } + } + return vm + }; +} + +/* */ + +var activeInstance = null; +var isUpdatingChildComponent = false; + +function setActiveInstance(vm) { + var prevActiveInstance = activeInstance; + activeInstance = vm; + return function () { + activeInstance = prevActiveInstance; + } +} + +function initLifecycle (vm) { + var options = vm.$options; + + // locate first non-abstract parent + var parent = options.parent; + if (parent && !options.abstract) { + while (parent.$options.abstract && parent.$parent) { + parent = parent.$parent; + } + parent.$children.push(vm); + } + + vm.$parent = parent; + vm.$root = parent ? parent.$root : vm; + + vm.$children = []; + vm.$refs = {}; + + vm._watcher = null; + vm._inactive = null; + vm._directInactive = false; + vm._isMounted = false; + vm._isDestroyed = false; + vm._isBeingDestroyed = false; +} + +function lifecycleMixin (Vue) { + Vue.prototype._update = function (vnode, hydrating) { + var vm = this; + var prevEl = vm.$el; + var prevVnode = vm._vnode; + var restoreActiveInstance = setActiveInstance(vm); + vm._vnode = vnode; + // Vue.prototype.__patch__ is injected in entry points + // based on the rendering backend used. + if (!prevVnode) { + // initial render + vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */); + } else { + // updates + vm.$el = vm.__patch__(prevVnode, vnode); + } + restoreActiveInstance(); + // update __vue__ reference + if (prevEl) { + prevEl.__vue__ = null; + } + if (vm.$el) { + vm.$el.__vue__ = vm; + } + // if parent is an HOC, update its $el as well + if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) { + vm.$parent.$el = vm.$el; + } + // updated hook is called by the scheduler to ensure that children are + // updated in a parent's updated hook. + }; + + Vue.prototype.$forceUpdate = function () { + var vm = this; + if (vm._watcher) { + vm._watcher.update(); + } + }; + + Vue.prototype.$destroy = function () { + var vm = this; + if (vm._isBeingDestroyed) { + return + } + callHook(vm, 'beforeDestroy'); + vm._isBeingDestroyed = true; + // remove self from parent + var parent = vm.$parent; + if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) { + remove(parent.$children, vm); + } + // teardown watchers + if (vm._watcher) { + vm._watcher.teardown(); + } + var i = vm._watchers.length; + while (i--) { + vm._watchers[i].teardown(); + } + // remove reference from data ob + // frozen object may not have observer. + if (vm._data.__ob__) { + vm._data.__ob__.vmCount--; + } + // call the last hook... + vm._isDestroyed = true; + // invoke destroy hooks on current rendered tree + vm.__patch__(vm._vnode, null); + // fire destroyed hook + callHook(vm, 'destroyed'); + // turn off all instance listeners. + vm.$off(); + // remove __vue__ reference + if (vm.$el) { + vm.$el.__vue__ = null; + } + // release circular reference (#6759) + if (vm.$vnode) { + vm.$vnode.parent = null; + } + }; +} + +function mountComponent ( + vm, + el, + hydrating +) { + vm.$el = el; + if (!vm.$options.render) { + vm.$options.render = createEmptyVNode; + { + /* istanbul ignore if */ + if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') || + vm.$options.el || el) { + warn( + 'You are using the runtime-only build of Vue where the template ' + + 'compiler is not available. Either pre-compile the templates into ' + + 'render functions, or use the compiler-included build.', + vm + ); + } else { + warn( + 'Failed to mount component: template or render function not defined.', + vm + ); + } + } + } + callHook(vm, 'beforeMount'); + + var updateComponent; + /* istanbul ignore if */ + if (config.performance && mark) { + updateComponent = function () { + var name = vm._name; + var id = vm._uid; + var startTag = "vue-perf-start:" + id; + var endTag = "vue-perf-end:" + id; + + mark(startTag); + var vnode = vm._render(); + mark(endTag); + measure(("vue " + name + " render"), startTag, endTag); + + mark(startTag); + vm._update(vnode, hydrating); + mark(endTag); + measure(("vue " + name + " patch"), startTag, endTag); + }; + } else { + updateComponent = function () { + vm._update(vm._render(), hydrating); + }; + } + + // we set this to vm._watcher inside the watcher's constructor + // since the watcher's initial patch may call $forceUpdate (e.g. inside child + // component's mounted hook), which relies on vm._watcher being already defined + new Watcher(vm, updateComponent, noop, { + before: function before () { + if (vm._isMounted && !vm._isDestroyed) { + callHook(vm, 'beforeUpdate'); + } + } + }, true /* isRenderWatcher */); + hydrating = false; + + // manually mounted instance, call mounted on self + // mounted is called for render-created child components in its inserted hook + if (vm.$vnode == null) { + vm._isMounted = true; + callHook(vm, 'mounted'); + } + return vm +} + +function updateChildComponent ( + vm, + propsData, + listeners, + parentVnode, + renderChildren +) { + { + isUpdatingChildComponent = true; + } + + // determine whether component has slot children + // we need to do this before overwriting $options._renderChildren. + + // check if there are dynamic scopedSlots (hand-written or compiled but with + // dynamic slot names). Static scoped slots compiled from template has the + // "$stable" marker. + var newScopedSlots = parentVnode.data.scopedSlots; + var oldScopedSlots = vm.$scopedSlots; + var hasDynamicScopedSlot = !!( + (newScopedSlots && !newScopedSlots.$stable) || + (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) || + (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key) + ); + + // Any static slot children from the parent may have changed during parent's + // update. Dynamic scoped slots may also have changed. In such cases, a forced + // update is necessary to ensure correctness. + var needsForceUpdate = !!( + renderChildren || // has new static slots + vm.$options._renderChildren || // has old static slots + hasDynamicScopedSlot + ); + + vm.$options._parentVnode = parentVnode; + vm.$vnode = parentVnode; // update vm's placeholder node without re-render + + if (vm._vnode) { // update child tree's parent + vm._vnode.parent = parentVnode; + } + vm.$options._renderChildren = renderChildren; + + // update $attrs and $listeners hash + // these are also reactive so they may trigger child update if the child + // used them during render + vm.$attrs = parentVnode.data.attrs || emptyObject; + vm.$listeners = listeners || emptyObject; + + // update props + if (propsData && vm.$options.props) { + toggleObserving(false); + var props = vm._props; + var propKeys = vm.$options._propKeys || []; + for (var i = 0; i < propKeys.length; i++) { + var key = propKeys[i]; + var propOptions = vm.$options.props; // wtf flow? + props[key] = validateProp(key, propOptions, propsData, vm); + } + toggleObserving(true); + // keep a copy of raw propsData + vm.$options.propsData = propsData; + } + + // update listeners + listeners = listeners || emptyObject; + var oldListeners = vm.$options._parentListeners; + vm.$options._parentListeners = listeners; + updateComponentListeners(vm, listeners, oldListeners); + + // resolve slots + force update if has children + if (needsForceUpdate) { + vm.$slots = resolveSlots(renderChildren, parentVnode.context); + vm.$forceUpdate(); + } + + { + isUpdatingChildComponent = false; + } +} + +function isInInactiveTree (vm) { + while (vm && (vm = vm.$parent)) { + if (vm._inactive) { return true } + } + return false +} + +function activateChildComponent (vm, direct) { + if (direct) { + vm._directInactive = false; + if (isInInactiveTree(vm)) { + return + } + } else if (vm._directInactive) { + return + } + if (vm._inactive || vm._inactive === null) { + vm._inactive = false; + for (var i = 0; i < vm.$children.length; i++) { + activateChildComponent(vm.$children[i]); + } + callHook(vm, 'activated'); + } +} + +function deactivateChildComponent (vm, direct) { + if (direct) { + vm._directInactive = true; + if (isInInactiveTree(vm)) { + return + } + } + if (!vm._inactive) { + vm._inactive = true; + for (var i = 0; i < vm.$children.length; i++) { + deactivateChildComponent(vm.$children[i]); + } + callHook(vm, 'deactivated'); + } +} + +function callHook (vm, hook) { + // #7573 disable dep collection when invoking lifecycle hooks + pushTarget(); + var handlers = vm.$options[hook]; + var info = hook + " hook"; + if (handlers) { + for (var i = 0, j = handlers.length; i < j; i++) { + invokeWithErrorHandling(handlers[i], vm, null, vm, info); + } + } + if (vm._hasHookEvent) { + vm.$emit('hook:' + hook); + } + popTarget(); +} + +/* */ + +var MAX_UPDATE_COUNT = 100; + +var queue = []; +var activatedChildren = []; +var has = {}; +var circular = {}; +var waiting = false; +var flushing = false; +var index = 0; + +/** + * Reset the scheduler's state. + */ +function resetSchedulerState () { + index = queue.length = activatedChildren.length = 0; + has = {}; + { + circular = {}; + } + waiting = flushing = false; +} + +// Async edge case #6566 requires saving the timestamp when event listeners are +// attached. However, calling performance.now() has a perf overhead especially +// if the page has thousands of event listeners. Instead, we take a timestamp +// every time the scheduler flushes and use that for all event listeners +// attached during that flush. +var currentFlushTimestamp = 0; + +// Async edge case fix requires storing an event listener's attach timestamp. +var getNow = Date.now; + +// Determine what event timestamp the browser is using. Annoyingly, the +// timestamp can either be hi-res (relative to page load) or low-res +// (relative to UNIX epoch), so in order to compare time we have to use the +// same timestamp type when saving the flush timestamp. +if (inBrowser && getNow() > document.createEvent('Event').timeStamp) { + // if the low-res timestamp which is bigger than the event timestamp + // (which is evaluated AFTER) it means the event is using a hi-res timestamp, + // and we need to use the hi-res version for event listeners as well. + getNow = function () { return performance.now(); }; +} + +/** + * Flush both queues and run the watchers. + */ +function flushSchedulerQueue () { + currentFlushTimestamp = getNow(); + flushing = true; + var watcher, id; + + // Sort queue before flush. + // This ensures that: + // 1. Components are updated from parent to child. (because parent is always + // created before the child) + // 2. A component's user watchers are run before its render watcher (because + // user watchers are created before the render watcher) + // 3. If a component is destroyed during a parent component's watcher run, + // its watchers can be skipped. + queue.sort(function (a, b) { return a.id - b.id; }); + + // do not cache length because more watchers might be pushed + // as we run existing watchers + for (index = 0; index < queue.length; index++) { + watcher = queue[index]; + if (watcher.before) { + watcher.before(); + } + id = watcher.id; + has[id] = null; + watcher.run(); + // in dev build, check and stop circular updates. + if (has[id] != null) { + circular[id] = (circular[id] || 0) + 1; + if (circular[id] > MAX_UPDATE_COUNT) { + warn( + 'You may have an infinite update loop ' + ( + watcher.user + ? ("in watcher with expression \"" + (watcher.expression) + "\"") + : "in a component render function." + ), + watcher.vm + ); + break + } + } + } + + // keep copies of post queues before resetting state + var activatedQueue = activatedChildren.slice(); + var updatedQueue = queue.slice(); + + resetSchedulerState(); + + // call component updated and activated hooks + callActivatedHooks(activatedQueue); + callUpdatedHooks(updatedQueue); + + // devtool hook + /* istanbul ignore if */ + if (devtools && config.devtools) { + devtools.emit('flush'); + } +} + +function callUpdatedHooks (queue) { + var i = queue.length; + while (i--) { + var watcher = queue[i]; + var vm = watcher.vm; + if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) { + callHook(vm, 'updated'); + } + } +} + +/** + * Queue a kept-alive component that was activated during patch. + * The queue will be processed after the entire tree has been patched. + */ +function queueActivatedComponent (vm) { + // setting _inactive to false here so that a render function can + // rely on checking whether it's in an inactive tree (e.g. router-view) + vm._inactive = false; + activatedChildren.push(vm); +} + +function callActivatedHooks (queue) { + for (var i = 0; i < queue.length; i++) { + queue[i]._inactive = true; + activateChildComponent(queue[i], true /* true */); + } +} + +/** + * Push a watcher into the watcher queue. + * Jobs with duplicate IDs will be skipped unless it's + * pushed when the queue is being flushed. + */ +function queueWatcher (watcher) { + var id = watcher.id; + if (has[id] == null) { + has[id] = true; + if (!flushing) { + queue.push(watcher); + } else { + // if already flushing, splice the watcher based on its id + // if already past its id, it will be run next immediately. + var i = queue.length - 1; + while (i > index && queue[i].id > watcher.id) { + i--; + } + queue.splice(i + 1, 0, watcher); + } + // queue the flush + if (!waiting) { + waiting = true; + + if (!config.async) { + flushSchedulerQueue(); + return + } + nextTick(flushSchedulerQueue); + } + } +} + +/* */ + + + +var uid$2 = 0; + +/** + * A watcher parses an expression, collects dependencies, + * and fires callback when the expression value changes. + * This is used for both the $watch() api and directives. + */ +var Watcher = function Watcher ( + vm, + expOrFn, + cb, + options, + isRenderWatcher +) { + this.vm = vm; + if (isRenderWatcher) { + vm._watcher = this; + } + vm._watchers.push(this); + // options + if (options) { + this.deep = !!options.deep; + this.user = !!options.user; + this.lazy = !!options.lazy; + this.sync = !!options.sync; + this.before = options.before; + } else { + this.deep = this.user = this.lazy = this.sync = false; + } + this.cb = cb; + this.id = ++uid$2; // uid for batching + this.active = true; + this.dirty = this.lazy; // for lazy watchers + this.deps = []; + this.newDeps = []; + this.depIds = new _Set(); + this.newDepIds = new _Set(); + this.expression = expOrFn.toString(); + // parse expression for getter + if (typeof expOrFn === 'function') { + this.getter = expOrFn; + } else { + this.getter = parsePath(expOrFn); + if (!this.getter) { + this.getter = noop; + warn( + "Failed watching path: \"" + expOrFn + "\" " + + 'Watcher only accepts simple dot-delimited paths. ' + + 'For full control, use a function instead.', + vm + ); + } + } + this.value = this.lazy + ? undefined + : this.get(); +}; + +/** + * Evaluate the getter, and re-collect dependencies. + */ +Watcher.prototype.get = function get () { + pushTarget(this); + var value; + var vm = this.vm; + try { + value = this.getter.call(vm, vm); + } catch (e) { + if (this.user) { + handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\"")); + } else { + throw e + } + } finally { + // "touch" every property so they are all tracked as + // dependencies for deep watching + if (this.deep) { + traverse(value); + } + popTarget(); + this.cleanupDeps(); + } + return value +}; + +/** + * Add a dependency to this directive. + */ +Watcher.prototype.addDep = function addDep (dep) { + var id = dep.id; + if (!this.newDepIds.has(id)) { + this.newDepIds.add(id); + this.newDeps.push(dep); + if (!this.depIds.has(id)) { + dep.addSub(this); + } + } +}; + +/** + * Clean up for dependency collection. + */ +Watcher.prototype.cleanupDeps = function cleanupDeps () { + var i = this.deps.length; + while (i--) { + var dep = this.deps[i]; + if (!this.newDepIds.has(dep.id)) { + dep.removeSub(this); + } + } + var tmp = this.depIds; + this.depIds = this.newDepIds; + this.newDepIds = tmp; + this.newDepIds.clear(); + tmp = this.deps; + this.deps = this.newDeps; + this.newDeps = tmp; + this.newDeps.length = 0; +}; + +/** + * Subscriber interface. + * Will be called when a dependency changes. + */ +Watcher.prototype.update = function update () { + /* istanbul ignore else */ + if (this.lazy) { + this.dirty = true; + } else if (this.sync) { + this.run(); + } else { + queueWatcher(this); + } +}; + +/** + * Scheduler job interface. + * Will be called by the scheduler. + */ +Watcher.prototype.run = function run () { + if (this.active) { + var value = this.get(); + if ( + value !== this.value || + // Deep watchers and watchers on Object/Arrays should fire even + // when the value is the same, because the value may + // have mutated. + isObject(value) || + this.deep + ) { + // set new value + var oldValue = this.value; + this.value = value; + if (this.user) { + try { + this.cb.call(this.vm, value, oldValue); + } catch (e) { + handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\"")); + } + } else { + this.cb.call(this.vm, value, oldValue); + } + } + } +}; + +/** + * Evaluate the value of the watcher. + * This only gets called for lazy watchers. + */ +Watcher.prototype.evaluate = function evaluate () { + this.value = this.get(); + this.dirty = false; +}; + +/** + * Depend on all deps collected by this watcher. + */ +Watcher.prototype.depend = function depend () { + var i = this.deps.length; + while (i--) { + this.deps[i].depend(); + } +}; + +/** + * Remove self from all dependencies' subscriber list. + */ +Watcher.prototype.teardown = function teardown () { + if (this.active) { + // remove self from vm's watcher list + // this is a somewhat expensive operation so we skip it + // if the vm is being destroyed. + if (!this.vm._isBeingDestroyed) { + remove(this.vm._watchers, this); + } + var i = this.deps.length; + while (i--) { + this.deps[i].removeSub(this); + } + this.active = false; + } +}; + +/* */ + +var sharedPropertyDefinition = { + enumerable: true, + configurable: true, + get: noop, + set: noop +}; + +function proxy (target, sourceKey, key) { + sharedPropertyDefinition.get = function proxyGetter () { + return this[sourceKey][key] + }; + sharedPropertyDefinition.set = function proxySetter (val) { + this[sourceKey][key] = val; + }; + Object.defineProperty(target, key, sharedPropertyDefinition); +} + +function initState (vm) { + vm._watchers = []; + var opts = vm.$options; + if (opts.props) { initProps(vm, opts.props); } + if (opts.methods) { initMethods(vm, opts.methods); } + if (opts.data) { + initData(vm); + } else { + observe(vm._data = {}, true /* asRootData */); + } + if (opts.computed) { initComputed(vm, opts.computed); } + if (opts.watch && opts.watch !== nativeWatch) { + initWatch(vm, opts.watch); + } +} + +function initProps (vm, propsOptions) { + var propsData = vm.$options.propsData || {}; + var props = vm._props = {}; + // cache prop keys so that future props updates can iterate using Array + // instead of dynamic object key enumeration. + var keys = vm.$options._propKeys = []; + var isRoot = !vm.$parent; + // root instance props should be converted + if (!isRoot) { + toggleObserving(false); + } + var loop = function ( key ) { + keys.push(key); + var value = validateProp(key, propsOptions, propsData, vm); + /* istanbul ignore else */ + { + var hyphenatedKey = hyphenate(key); + if (isReservedAttribute(hyphenatedKey) || + config.isReservedAttr(hyphenatedKey)) { + warn( + ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."), + vm + ); + } + defineReactive$$1(props, key, value, function () { + if (!isRoot && !isUpdatingChildComponent) { + warn( + "Avoid mutating a prop directly since the value will be " + + "overwritten whenever the parent component re-renders. " + + "Instead, use a data or computed property based on the prop's " + + "value. Prop being mutated: \"" + key + "\"", + vm + ); + } + }); + } + // static props are already proxied on the component's prototype + // during Vue.extend(). We only need to proxy props defined at + // instantiation here. + if (!(key in vm)) { + proxy(vm, "_props", key); + } + }; + + for (var key in propsOptions) loop( key ); + toggleObserving(true); +} + +function initData (vm) { + var data = vm.$options.data; + data = vm._data = typeof data === 'function' + ? getData(data, vm) + : data || {}; + if (!isPlainObject(data)) { + data = {}; + warn( + 'data functions should return an object:\n' + + 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function', + vm + ); + } + // proxy data on instance + var keys = Object.keys(data); + var props = vm.$options.props; + var methods = vm.$options.methods; + var i = keys.length; + while (i--) { + var key = keys[i]; + { + if (methods && hasOwn(methods, key)) { + warn( + ("Method \"" + key + "\" has already been defined as a data property."), + vm + ); + } + } + if (props && hasOwn(props, key)) { + warn( + "The data property \"" + key + "\" is already declared as a prop. " + + "Use prop default value instead.", + vm + ); + } else if (!isReserved(key)) { + proxy(vm, "_data", key); + } + } + // observe data + observe(data, true /* asRootData */); +} + +function getData (data, vm) { + // #7573 disable dep collection when invoking data getters + pushTarget(); + try { + return data.call(vm, vm) + } catch (e) { + handleError(e, vm, "data()"); + return {} + } finally { + popTarget(); + } +} + +var computedWatcherOptions = { lazy: true }; + +function initComputed (vm, computed) { + // $flow-disable-line + var watchers = vm._computedWatchers = Object.create(null); + // computed properties are just getters during SSR + var isSSR = isServerRendering(); + + for (var key in computed) { + var userDef = computed[key]; + var getter = typeof userDef === 'function' ? userDef : userDef.get; + if (getter == null) { + warn( + ("Getter is missing for computed property \"" + key + "\"."), + vm + ); + } + + if (!isSSR) { + // create internal watcher for the computed property. + watchers[key] = new Watcher( + vm, + getter || noop, + noop, + computedWatcherOptions + ); + } + + // component-defined computed properties are already defined on the + // component prototype. We only need to define computed properties defined + // at instantiation here. + if (!(key in vm)) { + defineComputed(vm, key, userDef); + } else { + if (key in vm.$data) { + warn(("The computed property \"" + key + "\" is already defined in data."), vm); + } else if (vm.$options.props && key in vm.$options.props) { + warn(("The computed property \"" + key + "\" is already defined as a prop."), vm); + } + } + } +} + +function defineComputed ( + target, + key, + userDef +) { + var shouldCache = !isServerRendering(); + if (typeof userDef === 'function') { + sharedPropertyDefinition.get = shouldCache + ? createComputedGetter(key) + : createGetterInvoker(userDef); + sharedPropertyDefinition.set = noop; + } else { + sharedPropertyDefinition.get = userDef.get + ? shouldCache && userDef.cache !== false + ? createComputedGetter(key) + : createGetterInvoker(userDef.get) + : noop; + sharedPropertyDefinition.set = userDef.set || noop; + } + if (sharedPropertyDefinition.set === noop) { + sharedPropertyDefinition.set = function () { + warn( + ("Computed property \"" + key + "\" was assigned to but it has no setter."), + this + ); + }; + } + Object.defineProperty(target, key, sharedPropertyDefinition); +} + +function createComputedGetter (key) { + return function computedGetter () { + var watcher = this._computedWatchers && this._computedWatchers[key]; + if (watcher) { + if (watcher.dirty) { + watcher.evaluate(); + } + if (Dep.target) { + watcher.depend(); + } + return watcher.value + } + } +} + +function createGetterInvoker(fn) { + return function computedGetter () { + return fn.call(this, this) + } +} + +function initMethods (vm, methods) { + var props = vm.$options.props; + for (var key in methods) { + { + if (typeof methods[key] !== 'function') { + warn( + "Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " + + "Did you reference the function correctly?", + vm + ); + } + if (props && hasOwn(props, key)) { + warn( + ("Method \"" + key + "\" has already been defined as a prop."), + vm + ); + } + if ((key in vm) && isReserved(key)) { + warn( + "Method \"" + key + "\" conflicts with an existing Vue instance method. " + + "Avoid defining component methods that start with _ or $." + ); + } + } + vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm); + } +} + +function initWatch (vm, watch) { + for (var key in watch) { + var handler = watch[key]; + if (Array.isArray(handler)) { + for (var i = 0; i < handler.length; i++) { + createWatcher(vm, key, handler[i]); + } + } else { + createWatcher(vm, key, handler); + } + } +} + +function createWatcher ( + vm, + expOrFn, + handler, + options +) { + if (isPlainObject(handler)) { + options = handler; + handler = handler.handler; + } + if (typeof handler === 'string') { + handler = vm[handler]; + } + return vm.$watch(expOrFn, handler, options) +} + +function stateMixin (Vue) { + // flow somehow has problems with directly declared definition object + // when using Object.defineProperty, so we have to procedurally build up + // the object here. + var dataDef = {}; + dataDef.get = function () { return this._data }; + var propsDef = {}; + propsDef.get = function () { return this._props }; + { + dataDef.set = function () { + warn( + 'Avoid replacing instance root $data. ' + + 'Use nested data properties instead.', + this + ); + }; + propsDef.set = function () { + warn("$props is readonly.", this); + }; + } + Object.defineProperty(Vue.prototype, '$data', dataDef); + Object.defineProperty(Vue.prototype, '$props', propsDef); + + Vue.prototype.$set = set; + Vue.prototype.$delete = del; + + Vue.prototype.$watch = function ( + expOrFn, + cb, + options + ) { + var vm = this; + if (isPlainObject(cb)) { + return createWatcher(vm, expOrFn, cb, options) + } + options = options || {}; + options.user = true; + var watcher = new Watcher(vm, expOrFn, cb, options); + if (options.immediate) { + try { + cb.call(vm, watcher.value); + } catch (error) { + handleError(error, vm, ("callback for immediate watcher \"" + (watcher.expression) + "\"")); + } + } + return function unwatchFn () { + watcher.teardown(); + } + }; +} + +/* */ + var uid$3 = 0; function initMixin (Vue) { @@ -8556,7 +8887,7 @@ function initMixin (Vue) { var startTag, endTag; /* istanbul ignore if */ - if ("development" !== 'production' && config.performance && mark) { + if (config.performance && mark) { startTag = "vue-perf-start:" + (vm._uid); endTag = "vue-perf-end:" + (vm._uid); mark(startTag); @@ -8578,10 +8909,8 @@ function initMixin (Vue) { ); } /* istanbul ignore else */ - if (true) { + { initProxy(vm); - } else { - vm._renderProxy = vm; } // expose real self vm._self = vm; @@ -8595,7 +8924,7 @@ function initMixin (Vue) { callHook(vm, 'created'); /* istanbul ignore if */ - if ("development" !== 'production' && config.performance && mark) { + if (config.performance && mark) { vm._name = formatComponentName(vm, false); mark(endTag); measure(("vue " + (vm._name) + " init"), startTag, endTag); @@ -8613,8 +8942,6 @@ function initInternalComponent (vm, options) { var parentVnode = options._parentVnode; opts.parent = options.parent; opts._parentVnode = parentVnode; - opts._parentElm = options._parentElm; - opts._refElm = options._refElm; var vnodeComponentOptions = parentVnode.componentOptions; opts.propsData = vnodeComponentOptions.propsData; @@ -8655,39 +8982,18 @@ function resolveConstructorOptions (Ctor) { function resolveModifiedOptions (Ctor) { var modified; var latest = Ctor.options; - var extended = Ctor.extendOptions; var sealed = Ctor.sealedOptions; for (var key in latest) { if (latest[key] !== sealed[key]) { if (!modified) { modified = {}; } - modified[key] = dedupe(latest[key], extended[key], sealed[key]); + modified[key] = latest[key]; } } return modified } -function dedupe (latest, extended, sealed) { - // compare latest and sealed to ensure lifecycle hooks won't be duplicated - // between merges - if (Array.isArray(latest)) { - var res = []; - sealed = Array.isArray(sealed) ? sealed : [sealed]; - extended = Array.isArray(extended) ? extended : [extended]; - for (var i = 0; i < latest.length; i++) { - // push original options and not sealed options to exclude duplicated options - if (extended.indexOf(latest[i]) >= 0 || sealed.indexOf(latest[i]) < 0) { - res.push(latest[i]); - } - } - return res - } else { - return latest - } -} - function Vue (options) { - if ("development" !== 'production' && - !(this instanceof Vue) + if (!(this instanceof Vue) ) { warn('Vue is a constructor and should be called with the `new` keyword'); } @@ -8755,7 +9061,7 @@ function initExtend (Vue) { } var name = extendOptions.name || Super.options.name; - if ("development" !== 'production' && name) { + if (name) { validateComponentName(name); } @@ -8838,7 +9144,7 @@ function initAssetRegisters (Vue) { return this.options[type + 's'][id] } else { /* istanbul ignore if */ - if ("development" !== 'production' && type === 'component') { + if (type === 'component') { validateComponentName(id); } if (type === 'component' && isPlainObject(definition)) { @@ -8857,6 +9163,8 @@ function initAssetRegisters (Vue) { /* */ + + function getComponentName (opts) { return opts && (opts.Ctor.options.name || opts.tag) } @@ -8920,10 +9228,8 @@ var KeepAlive = { }, destroyed: function destroyed () { - var this$1 = this; - - for (var key in this$1.cache) { - pruneCacheEntry(this$1.cache, key, this$1.keys); + for (var key in this.cache) { + pruneCacheEntry(this.cache, key, this.keys); } }, @@ -8983,11 +9289,11 @@ var KeepAlive = { } return vnode || (slot && slot[0]) } -} +}; var builtInComponents = { KeepAlive: KeepAlive -} +}; /* */ @@ -8995,7 +9301,7 @@ function initGlobalAPI (Vue) { // config var configDef = {}; configDef.get = function () { return config; }; - if (true) { + { configDef.set = function () { warn( 'Do not replace the Vue.config object, set individual fields instead.' @@ -9011,13 +9317,19 @@ function initGlobalAPI (Vue) { warn: warn, extend: extend, mergeOptions: mergeOptions, - defineReactive: defineReactive + defineReactive: defineReactive$$1 }; Vue.set = set; Vue.delete = del; Vue.nextTick = nextTick; + // 2.6 explicit observable API + Vue.observable = function (obj) { + observe(obj); + return obj + }; + Vue.options = Object.create(null); ASSET_TYPES.forEach(function (type) { Vue.options[type + 's'] = Object.create(null); @@ -9053,7 +9365,7 @@ Object.defineProperty(Vue, 'FunctionalRenderContext', { value: FunctionalRenderContext }); -Vue.version = '2.5.17'; +Vue.version = '2.6.7'; /* */ @@ -9074,6 +9386,17 @@ var mustUseProp = function (tag, type, attr) { var isEnumeratedAttr = makeMap('contenteditable,draggable,spellcheck'); +var isValidContentEditableValue = makeMap('events,caret,typing,plaintext-only'); + +var convertEnumeratedValue = function (key, value) { + return isFalsyAttrValue(value) || value === 'false' + ? 'false' + // allow arbitrary string value for contenteditable + : key === 'contenteditable' && isValidContentEditableValue(value) + ? value + : 'true' +}; + var isBooleanAttr = makeMap( 'allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,' + 'default,defaultchecked,defaultmuted,defaultselected,defer,disabled,' + @@ -9262,7 +9585,7 @@ function query (el) { if (typeof el === 'string') { var selected = document.querySelector(el); if (!selected) { - "development" !== 'production' && warn( + warn( 'Cannot find element: ' + el ); return document.createElement('div') @@ -9331,20 +9654,19 @@ function setStyleScope (node, scopeId) { node.setAttribute(scopeId, ''); } - -var nodeOps = Object.freeze({ - createElement: createElement$1, - createElementNS: createElementNS, - createTextNode: createTextNode, - createComment: createComment, - insertBefore: insertBefore, - removeChild: removeChild, - appendChild: appendChild, - parentNode: parentNode, - nextSibling: nextSibling, - tagName: tagName, - setTextContent: setTextContent, - setStyleScope: setStyleScope +var nodeOps = /*#__PURE__*/Object.freeze({ + createElement: createElement$1, + createElementNS: createElementNS, + createTextNode: createTextNode, + createComment: createComment, + insertBefore: insertBefore, + removeChild: removeChild, + appendChild: appendChild, + parentNode: parentNode, + nextSibling: nextSibling, + tagName: tagName, + setTextContent: setTextContent, + setStyleScope: setStyleScope }); /* */ @@ -9362,7 +9684,7 @@ var ref = { destroy: function destroy (vnode) { registerRef(vnode, true); } -} +}; function registerRef (vnode, isRemoval) { var key = vnode.data.ref; @@ -9463,13 +9785,13 @@ function createPatchFunction (backend) { } function createRmCb (childElm, listeners) { - function remove () { - if (--remove.listeners === 0) { + function remove$$1 () { + if (--remove$$1.listeners === 0) { removeNode(childElm); } } - remove.listeners = listeners; - return remove + remove$$1.listeners = listeners; + return remove$$1 } function removeNode (el) { @@ -9525,7 +9847,7 @@ function createPatchFunction (backend) { var children = vnode.children; var tag = vnode.tag; if (isDef(tag)) { - if (true) { + { if (data && data.pre) { creatingElmInVPre++; } @@ -9553,7 +9875,7 @@ function createPatchFunction (backend) { insert(parentElm, vnode.elm, refElm); } - if ("development" !== 'production' && data && data.pre) { + if (data && data.pre) { creatingElmInVPre--; } } else if (isTrue(vnode.isComment)) { @@ -9570,7 +9892,7 @@ function createPatchFunction (backend) { if (isDef(i)) { var isReactivated = isDef(vnode.componentInstance) && i.keepAlive; if (isDef(i = i.hook) && isDef(i = i.init)) { - i(vnode, false /* hydrating */, parentElm, refElm); + i(vnode, false /* hydrating */); } // after calling the init hook, if the vnode is a child component // it should've created a child instance and mounted it. the child @@ -9578,6 +9900,7 @@ function createPatchFunction (backend) { // in that case we can just return the element and be done. if (isDef(vnode.componentInstance)) { initComponent(vnode, insertedVnodeQueue); + insert(parentElm, vnode.elm, refElm); if (isTrue(isReactivated)) { reactivateComponent(vnode, insertedVnodeQueue, parentElm, refElm); } @@ -9629,7 +9952,7 @@ function createPatchFunction (backend) { function insert (parent, elm, ref$$1) { if (isDef(parent)) { if (isDef(ref$$1)) { - if (ref$$1.parentNode === parent) { + if (nodeOps.parentNode(ref$$1) === parent) { nodeOps.insertBefore(parent, elm, ref$$1); } } else { @@ -9640,7 +9963,7 @@ function createPatchFunction (backend) { function createChildren (vnode, children, insertedVnodeQueue) { if (Array.isArray(children)) { - if (true) { + { checkDuplicateKeys(children); } for (var i = 0; i < children.length; ++i) { @@ -9774,7 +10097,7 @@ function createPatchFunction (backend) { // during leaving transitions var canMove = !removeOnly; - if (true) { + { checkDuplicateKeys(newCh); } @@ -9784,20 +10107,20 @@ function createPatchFunction (backend) { } else if (isUndef(oldEndVnode)) { oldEndVnode = oldCh[--oldEndIdx]; } else if (sameVnode(oldStartVnode, newStartVnode)) { - patchVnode(oldStartVnode, newStartVnode, insertedVnodeQueue); + patchVnode(oldStartVnode, newStartVnode, insertedVnodeQueue, newCh, newStartIdx); oldStartVnode = oldCh[++oldStartIdx]; newStartVnode = newCh[++newStartIdx]; } else if (sameVnode(oldEndVnode, newEndVnode)) { - patchVnode(oldEndVnode, newEndVnode, insertedVnodeQueue); + patchVnode(oldEndVnode, newEndVnode, insertedVnodeQueue, newCh, newEndIdx); oldEndVnode = oldCh[--oldEndIdx]; newEndVnode = newCh[--newEndIdx]; } else if (sameVnode(oldStartVnode, newEndVnode)) { // Vnode moved right - patchVnode(oldStartVnode, newEndVnode, insertedVnodeQueue); + patchVnode(oldStartVnode, newEndVnode, insertedVnodeQueue, newCh, newEndIdx); canMove && nodeOps.insertBefore(parentElm, oldStartVnode.elm, nodeOps.nextSibling(oldEndVnode.elm)); oldStartVnode = oldCh[++oldStartIdx]; newEndVnode = newCh[--newEndIdx]; } else if (sameVnode(oldEndVnode, newStartVnode)) { // Vnode moved left - patchVnode(oldEndVnode, newStartVnode, insertedVnodeQueue); + patchVnode(oldEndVnode, newStartVnode, insertedVnodeQueue, newCh, newStartIdx); canMove && nodeOps.insertBefore(parentElm, oldEndVnode.elm, oldStartVnode.elm); oldEndVnode = oldCh[--oldEndIdx]; newStartVnode = newCh[++newStartIdx]; @@ -9811,7 +10134,7 @@ function createPatchFunction (backend) { } else { vnodeToMove = oldCh[idxInOld]; if (sameVnode(vnodeToMove, newStartVnode)) { - patchVnode(vnodeToMove, newStartVnode, insertedVnodeQueue); + patchVnode(vnodeToMove, newStartVnode, insertedVnodeQueue, newCh, newStartIdx); oldCh[idxInOld] = undefined; canMove && nodeOps.insertBefore(parentElm, vnodeToMove.elm, oldStartVnode.elm); } else { @@ -9855,11 +10178,23 @@ function createPatchFunction (backend) { } } - function patchVnode (oldVnode, vnode, insertedVnodeQueue, removeOnly) { + function patchVnode ( + oldVnode, + vnode, + insertedVnodeQueue, + ownerArray, + index, + removeOnly + ) { if (oldVnode === vnode) { return } + if (isDef(vnode.elm) && isDef(ownerArray)) { + // clone reused vnode + vnode = ownerArray[index] = cloneVNode(vnode); + } + var elm = vnode.elm = oldVnode.elm; if (isTrue(oldVnode.isAsyncPlaceholder)) { @@ -9900,6 +10235,9 @@ function createPatchFunction (backend) { if (isDef(oldCh) && isDef(ch)) { if (oldCh !== ch) { updateChildren(elm, oldCh, ch, insertedVnodeQueue, removeOnly); } } else if (isDef(ch)) { + { + checkDuplicateKeys(ch); + } if (isDef(oldVnode.text)) { nodeOps.setTextContent(elm, ''); } addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue); } else if (isDef(oldCh)) { @@ -9948,7 +10286,7 @@ function createPatchFunction (backend) { return true } // assert node match - if (true) { + { if (!assertNodeMatch(elm, vnode, inVPre)) { return false } @@ -9971,8 +10309,7 @@ function createPatchFunction (backend) { if (isDef(i = data) && isDef(i = i.domProps) && isDef(i = i.innerHTML)) { if (i !== elm.innerHTML) { /* istanbul ignore if */ - if ("development" !== 'production' && - typeof console !== 'undefined' && + if (typeof console !== 'undefined' && !hydrationBailed ) { hydrationBailed = true; @@ -9997,8 +10334,7 @@ function createPatchFunction (backend) { // longer than the virtual children list. if (!childrenMatch || childNode) { /* istanbul ignore if */ - if ("development" !== 'production' && - typeof console !== 'undefined' && + if (typeof console !== 'undefined' && !hydrationBailed ) { hydrationBailed = true; @@ -10041,7 +10377,7 @@ function createPatchFunction (backend) { } } - return function patch (oldVnode, vnode, hydrating, removeOnly, parentElm, refElm) { + return function patch (oldVnode, vnode, hydrating, removeOnly) { if (isUndef(vnode)) { if (isDef(oldVnode)) { invokeDestroyHook(oldVnode); } return @@ -10053,12 +10389,12 @@ function createPatchFunction (backend) { if (isUndef(oldVnode)) { // empty mount (likely as component), create new root element isInitialPatch = true; - createElm(vnode, insertedVnodeQueue, parentElm, refElm); + createElm(vnode, insertedVnodeQueue); } else { var isRealElement = isDef(oldVnode.nodeType); if (!isRealElement && sameVnode(oldVnode, vnode)) { // patch existing root node - patchVnode(oldVnode, vnode, insertedVnodeQueue, removeOnly); + patchVnode(oldVnode, vnode, insertedVnodeQueue, null, null, removeOnly); } else { if (isRealElement) { // mounting to a real element @@ -10072,7 +10408,7 @@ function createPatchFunction (backend) { if (hydrate(oldVnode, vnode, insertedVnodeQueue)) { invokeInsertHook(vnode, insertedVnodeQueue, true); return oldVnode - } else if (true) { + } else { warn( 'The client-side rendered virtual DOM tree is not matching ' + 'server-rendered content. This is likely caused by incorrect ' + @@ -10089,7 +10425,7 @@ function createPatchFunction (backend) { // replacing existing element var oldElm = oldVnode.elm; - var parentElm$1 = nodeOps.parentNode(oldElm); + var parentElm = nodeOps.parentNode(oldElm); // create new node createElm( @@ -10098,7 +10434,7 @@ function createPatchFunction (backend) { // extremely rare edge case: do not insert if old element is in a // leaving transition. Only happens when combining transition + // keep-alive + HOCs. (#4590) - oldElm._leaveCb ? null : parentElm$1, + oldElm._leaveCb ? null : parentElm, nodeOps.nextSibling(oldElm) ); @@ -10133,8 +10469,8 @@ function createPatchFunction (backend) { } // destroy old node - if (isDef(parentElm$1)) { - removeVnodes(parentElm$1, [oldVnode], 0, 0); + if (isDef(parentElm)) { + removeVnodes(parentElm, [oldVnode], 0, 0); } else if (isDef(oldVnode.tag)) { invokeDestroyHook(oldVnode); } @@ -10154,7 +10490,7 @@ var directives = { destroy: function unbindDirectives (vnode) { updateDirectives(vnode, emptyNode); } -} +}; function updateDirectives (oldVnode, vnode) { if (oldVnode.data.directives || vnode.data.directives) { @@ -10184,6 +10520,7 @@ function _update (oldVnode, vnode) { } else { // existing directive, update dir.oldValue = oldDir.value; + dir.oldArg = oldDir.arg; callHook$1(dir, 'update', vnode, oldVnode); if (dir.def && dir.def.componentUpdated) { dirsWithPostpatch.push(dir); @@ -10265,7 +10602,7 @@ function callHook$1 (dir, hook, vnode, oldVnode, isDestroy) { var baseModules = [ ref, directives -] +]; /* */ @@ -10327,7 +10664,7 @@ function setAttr (el, key, value) { el.setAttribute(key, value); } } else if (isEnumeratedAttr(key)) { - el.setAttribute(key, isFalsyAttrValue(value) || value === 'false' ? 'false' : 'true'); + el.setAttribute(key, convertEnumeratedValue(key, value)); } else if (isXlink(key)) { if (isFalsyAttrValue(value)) { el.removeAttributeNS(xlinkNS, getXlinkProp(key)); @@ -10350,7 +10687,7 @@ function baseSetAttr (el, key, value) { if ( isIE && !isIE9 && el.tagName === 'TEXTAREA' && - key === 'placeholder' && !el.__ieph + key === 'placeholder' && value !== '' && !el.__ieph ) { var blocker = function (e) { e.stopImmediatePropagation(); @@ -10367,7 +10704,7 @@ function baseSetAttr (el, key, value) { var attrs = { create: updateAttrs, update: updateAttrs -} +}; /* */ @@ -10405,7 +10742,7 @@ function updateClass (oldVnode, vnode) { var klass = { create: updateClass, update: updateClass -} +}; /* */ @@ -10507,9 +10844,13 @@ function wrapFilter (exp, filter) { /* */ -function baseWarn (msg) { + + +/* eslint-disable no-unused-vars */ +function baseWarn (msg, range) { console.error(("[Vue compiler]: " + msg)); } +/* eslint-enable no-unused-vars */ function pluckModuleFunction ( modules, @@ -10520,20 +10861,23 @@ function pluckModuleFunction ( : [] } -function addProp (el, name, value) { - (el.props || (el.props = [])).push({ name: name, value: value }); +function addProp (el, name, value, range, dynamic) { + (el.props || (el.props = [])).push(rangeSetItem({ name: name, value: value, dynamic: dynamic }, range)); el.plain = false; } -function addAttr (el, name, value) { - (el.attrs || (el.attrs = [])).push({ name: name, value: value }); +function addAttr (el, name, value, range, dynamic) { + var attrs = dynamic + ? (el.dynamicAttrs || (el.dynamicAttrs = [])) + : (el.attrs || (el.attrs = [])); + attrs.push(rangeSetItem({ name: name, value: value, dynamic: dynamic }, range)); el.plain = false; } // add a raw attr (use this in preTransforms) -function addRawAttr (el, name, value) { +function addRawAttr (el, name, value, range) { el.attrsMap[name] = value; - el.attrsList.push({ name: name, value: value }); + el.attrsList.push(rangeSetItem({ name: name, value: value }, range)); } function addDirective ( @@ -10542,60 +10886,84 @@ function addDirective ( rawName, value, arg, - modifiers + isDynamicArg, + modifiers, + range ) { - (el.directives || (el.directives = [])).push({ name: name, rawName: rawName, value: value, arg: arg, modifiers: modifiers }); + (el.directives || (el.directives = [])).push(rangeSetItem({ + name: name, + rawName: rawName, + value: value, + arg: arg, + isDynamicArg: isDynamicArg, + modifiers: modifiers + }, range)); el.plain = false; } +function prependModifierMarker (symbol, name, dynamic) { + return dynamic + ? ("_p(" + name + ",\"" + symbol + "\")") + : symbol + name // mark the event as captured +} + function addHandler ( el, name, value, modifiers, important, - warn + warn, + range, + dynamic ) { modifiers = modifiers || emptyObject; // warn prevent and passive modifier /* istanbul ignore if */ if ( - "development" !== 'production' && warn && + warn && modifiers.prevent && modifiers.passive ) { warn( 'passive and prevent can\'t be used together. ' + - 'Passive handler can\'t prevent default event.' + 'Passive handler can\'t prevent default event.', + range ); } - // check capture modifier - if (modifiers.capture) { - delete modifiers.capture; - name = '!' + name; // mark the event as captured - } - if (modifiers.once) { - delete modifiers.once; - name = '~' + name; // mark the event as once - } - /* istanbul ignore if */ - if (modifiers.passive) { - delete modifiers.passive; - name = '&' + name; // mark the event as passive - } - // normalize click.right and click.middle since they don't actually fire // this is technically browser-specific, but at least for now browsers are // the only target envs that have right/middle clicks. - if (name === 'click') { - if (modifiers.right) { + if (modifiers.right) { + if (dynamic) { + name = "(" + name + ")==='click'?'contextmenu':(" + name + ")"; + } else if (name === 'click') { name = 'contextmenu'; delete modifiers.right; - } else if (modifiers.middle) { + } + } else if (modifiers.middle) { + if (dynamic) { + name = "(" + name + ")==='click'?'mouseup':(" + name + ")"; + } else if (name === 'click') { name = 'mouseup'; } } + // check capture modifier + if (modifiers.capture) { + delete modifiers.capture; + name = prependModifierMarker('!', name, dynamic); + } + if (modifiers.once) { + delete modifiers.once; + name = prependModifierMarker('~', name, dynamic); + } + /* istanbul ignore if */ + if (modifiers.passive) { + delete modifiers.passive; + name = prependModifierMarker('&', name, dynamic); + } + var events; if (modifiers.native) { delete modifiers.native; @@ -10604,9 +10972,7 @@ function addHandler ( events = el.events || (el.events = {}); } - var newHandler = { - value: value.trim() - }; + var newHandler = rangeSetItem({ value: value.trim(), dynamic: dynamic }, range); if (modifiers !== emptyObject) { newHandler.modifiers = modifiers; } @@ -10624,6 +10990,15 @@ function addHandler ( el.plain = false; } +function getRawBindingAttr ( + el, + name +) { + return el.rawAttrsMap[':' + name] || + el.rawAttrsMap['v-bind:' + name] || + el.rawAttrsMap[name] +} + function getBindingAttr ( el, name, @@ -10667,6 +11042,35 @@ function getAndRemoveAttr ( return val } +function getAndRemoveAttrByRegex ( + el, + name +) { + var list = el.attrsList; + for (var i = 0, l = list.length; i < l; i++) { + var attr = list[i]; + if (name.test(attr.name)) { + list.splice(i, 1); + return attr + } + } +} + +function rangeSetItem ( + item, + range +) { + if (range) { + if (range.start != null) { + item.start = range.start; + } + if (range.end != null) { + item.end = range.end; + } + } + return item +} + /* */ /** @@ -10696,7 +11100,7 @@ function genComponentModel ( el.model = { value: ("(" + value + ")"), - expression: ("\"" + value + "\""), + expression: JSON.stringify(value), callback: ("function (" + baseValueExpression + ") {" + assignment + "}") }; } @@ -10731,12 +11135,7 @@ function genAssignmentCode ( * */ -var len; -var str; -var chr; -var index$1; -var expressionPos; -var expressionEndPos; +var len, str, chr, index$1, expressionPos, expressionEndPos; @@ -10840,13 +11239,14 @@ function model ( var tag = el.tag; var type = el.attrsMap.type; - if (true) { + { // inputs with type="file" are read only and setting the input's // value will throw an error. if (tag === 'input' && type === 'file') { warn$1( "<" + (el.tag) + " v-model=\"" + value + "\" type=\"file\">:\n" + - "File inputs are read only. Use a v-on:change listener instead." + "File inputs are read only. Use a v-on:change listener instead.", + el.rawAttrsMap['v-model'] ); } } @@ -10867,12 +11267,13 @@ function model ( genComponentModel(el, value, modifiers); // component v-model doesn't need extra runtime return false - } else if (true) { + } else { warn$1( "<" + (el.tag) + " v-model=\"" + value + "\">: " + "v-model is not supported on this element type. " + 'If you are working with contenteditable, it\'s recommended to ' + - 'wrap a library dedicated for that purpose inside a custom component.' + 'wrap a library dedicated for that purpose inside a custom component.', + el.rawAttrsMap['v-model'] ); } @@ -10949,14 +11350,15 @@ function genDefaultModel ( // warn if v-bind:value conflicts with v-model // except for inputs with v-bind:type - if (true) { + { var value$1 = el.attrsMap['v-bind:value'] || el.attrsMap[':value']; var typeBinding = el.attrsMap['v-bind:type'] || el.attrsMap[':type']; if (value$1 && !typeBinding) { var binding = el.attrsMap['v-bind:value'] ? 'v-bind:value' : ':value'; warn$1( binding + "=\"" + value$1 + "\" conflicts with v-model on the same element " + - 'because the latter already expands to a value binding internally' + 'because the latter already expands to a value binding internally', + el.rawAttrsMap[binding] ); } } @@ -11017,7 +11419,7 @@ function normalizeEvents (on) { var target$1; -function createOnceHandler (handler, event, capture) { +function createOnceHandler$1 (event, handler, capture) { var _target = target$1; // save current target element in closure return function onceHandler () { var res = handler.apply(null, arguments); @@ -11027,17 +11429,47 @@ function createOnceHandler (handler, event, capture) { } } +// #9446: Firefox <= 53 (in particular, ESR 52) has incorrect Event.timeStamp +// implementation and does not fire microtasks in between event propagation, so +// safe to exclude. +var useMicrotaskFix = isUsingMicroTask && !(isFF && Number(isFF[1]) <= 53); + function add$1 ( - event, + name, handler, - once$$1, capture, passive ) { - handler = withMacroTask(handler); - if (once$$1) { handler = createOnceHandler(handler, event, capture); } + // async edge case #6566: inner click event triggers patch, event handler + // attached to outer element during patch, and triggered again. This + // happens because browsers fire microtask ticks between event propagation. + // the solution is simple: we save the timestamp when a handler is attached, + // and the handler would only fire if the event passed to it was fired + // AFTER it was attached. + if (useMicrotaskFix) { + var attachedTimestamp = currentFlushTimestamp; + var original = handler; + handler = original._wrapper = function (e) { + if ( + // no bubbling, should always fire. + // this is just a safety net in case event.timeStamp is unreliable in + // certain weird environments... + e.target === e.currentTarget || + // event is fired after handler attachment + e.timeStamp >= attachedTimestamp || + // #9462 bail for iOS 9 bug: event.timeStamp is 0 after history.pushState + e.timeStamp === 0 || + // #9448 bail if event is fired in another document in a multi-page + // electron/nw.js app, since event.timeStamp will be using a different + // starting reference + e.target.ownerDocument !== document + ) { + return original.apply(this, arguments) + } + }; + } target$1.addEventListener( - event, + name, handler, supportsPassive ? { capture: capture, passive: passive } @@ -11046,14 +11478,14 @@ function add$1 ( } function remove$2 ( - event, + name, handler, capture, _target ) { (_target || target$1).removeEventListener( - event, - handler._withTask || handler, + name, + handler._wrapper || handler, capture ); } @@ -11066,17 +11498,19 @@ function updateDOMListeners (oldVnode, vnode) { var oldOn = oldVnode.data.on || {}; target$1 = vnode.elm; normalizeEvents(on); - updateListeners(on, oldOn, add$1, remove$2, vnode.context); + updateListeners(on, oldOn, add$1, remove$2, createOnceHandler$1, vnode.context); target$1 = undefined; } var events = { create: updateDOMListeners, update: updateDOMListeners -} +}; /* */ +var svgContainer; + function updateDOMProps (oldVnode, vnode) { if (isUndef(oldVnode.data.domProps) && isUndef(vnode.data.domProps)) { return @@ -11110,7 +11544,7 @@ function updateDOMProps (oldVnode, vnode) { } } - if (key === 'value') { + if (key === 'value' && elm.tagName !== 'PROGRESS') { // store value as _value as well since // non-string values will be stringified elm._value = cur; @@ -11119,8 +11553,29 @@ function updateDOMProps (oldVnode, vnode) { if (shouldUpdateValue(elm, strCur)) { elm.value = strCur; } - } else { - elm[key] = cur; + } else if (key === 'innerHTML' && isSVG(elm.tagName) && isUndef(elm.innerHTML)) { + // IE doesn't support innerHTML for SVG elements + svgContainer = svgContainer || document.createElement('div'); + svgContainer.innerHTML = "" + cur + ""; + var svg = svgContainer.firstChild; + while (elm.firstChild) { + elm.removeChild(elm.firstChild); + } + while (svg.firstChild) { + elm.appendChild(svg.firstChild); + } + } else if ( + // skip the update if old and new VDOM state is the same. + // `value` is handled separately because the DOM value may be temporarily + // out of sync with VDOM state due to focus, composition and modifiers. + // This #4521 by skipping the unnecesarry `checked` update. + cur !== oldProps[key] + ) { + // some property updates can throw + // e.g. `value` on w/ non-finite value + try { + elm[key] = cur; + } catch (e) {} } } } @@ -11150,10 +11605,6 @@ function isDirtyWithModifiers (elm, newVal) { var value = elm.value; var modifiers = elm._vModifiers; // injected by v-model runtime if (isDef(modifiers)) { - if (modifiers.lazy) { - // inputs with lazy should only be updated when not in focus - return false - } if (modifiers.number) { return toNumber(value) !== toNumber(newVal) } @@ -11167,7 +11618,7 @@ function isDirtyWithModifiers (elm, newVal) { var domProps = { create: updateDOMProps, update: updateDOMProps -} +}; /* */ @@ -11248,7 +11699,7 @@ var setProp = function (el, name, val) { if (cssVarRE.test(name)) { el.style.setProperty(name, val); } else if (importantRE.test(val)) { - el.style.setProperty(name, val.replace(importantRE, ''), 'important'); + el.style.setProperty(hyphenate(name), val.replace(importantRE, ''), 'important'); } else { var normalizedName = normalize(name); if (Array.isArray(val)) { @@ -11328,10 +11779,12 @@ function updateStyle (oldVnode, vnode) { var style = { create: updateStyle, update: updateStyle -} +}; /* */ +var whitespaceRE = /\s+/; + /** * Add class with compatibility for SVG since classList is not supported on * SVG elements in IE @@ -11345,7 +11798,7 @@ function addClass (el, cls) { /* istanbul ignore else */ if (el.classList) { if (cls.indexOf(' ') > -1) { - cls.split(/\s+/).forEach(function (c) { return el.classList.add(c); }); + cls.split(whitespaceRE).forEach(function (c) { return el.classList.add(c); }); } else { el.classList.add(cls); } @@ -11370,7 +11823,7 @@ function removeClass (el, cls) { /* istanbul ignore else */ if (el.classList) { if (cls.indexOf(' ') > -1) { - cls.split(/\s+/).forEach(function (c) { return el.classList.remove(c); }); + cls.split(whitespaceRE).forEach(function (c) { return el.classList.remove(c); }); } else { el.classList.remove(cls); } @@ -11394,20 +11847,20 @@ function removeClass (el, cls) { /* */ -function resolveTransition (def) { - if (!def) { +function resolveTransition (def$$1) { + if (!def$$1) { return } /* istanbul ignore else */ - if (typeof def === 'object') { + if (typeof def$$1 === 'object') { var res = {}; - if (def.css !== false) { - extend(res, autoCssTransition(def.name || 'v')); + if (def$$1.css !== false) { + extend(res, autoCssTransition(def$$1.name || 'v')); } - extend(res, def); + extend(res, def$$1); return res - } else if (typeof def === 'string') { - return autoCssTransition(def) + } else if (typeof def$$1 === 'string') { + return autoCssTransition(def$$1) } } @@ -11510,11 +11963,12 @@ var transformRE = /\b(transform|all)(,|$)/; function getTransitionInfo (el, expectedType) { var styles = window.getComputedStyle(el); - var transitionDelays = styles[transitionProp + 'Delay'].split(', '); - var transitionDurations = styles[transitionProp + 'Duration'].split(', '); + // JSDOM may return undefined for transition properties + var transitionDelays = (styles[transitionProp + 'Delay'] || '').split(', '); + var transitionDurations = (styles[transitionProp + 'Duration'] || '').split(', '); var transitionTimeout = getTimeout(transitionDelays, transitionDurations); - var animationDelays = styles[animationProp + 'Delay'].split(', '); - var animationDurations = styles[animationProp + 'Duration'].split(', '); + var animationDelays = (styles[animationProp + 'Delay'] || '').split(', '); + var animationDurations = (styles[animationProp + 'Duration'] || '').split(', '); var animationTimeout = getTimeout(animationDelays, animationDurations); var type; @@ -11568,8 +12022,12 @@ function getTimeout (delays, durations) { })) } +// Old versions of Chromium (below 61.0.3163.100) formats floating pointer numbers +// in a locale-dependent way, using a comma instead of a dot. +// If comma is not replaced with a dot, the input will be rounded down (i.e. acting +// as a floor function) causing unexpected behaviors function toMs (s) { - return Number(s.slice(0, -1)) * 1000 + return Number(s.slice(0, -1).replace(',', '.')) * 1000 } /* */ @@ -11657,7 +12115,7 @@ function enter (vnode, toggleDisplay) { : duration ); - if ("development" !== 'production' && explicitEnterDuration != null) { + if (explicitEnterDuration != null) { checkDuration(explicitEnterDuration, 'enter', vnode); } @@ -11765,7 +12223,7 @@ function leave (vnode, rm) { : duration ); - if ("development" !== 'production' && isDef(explicitLeaveDuration)) { + if (isDef(explicitLeaveDuration)) { checkDuration(explicitLeaveDuration, 'leave', vnode); } @@ -11801,7 +12259,7 @@ function leave (vnode, rm) { return } // record leaving element - if (!vnode.data.show) { + if (!vnode.data.show && el.parentNode) { (el.parentNode._pending || (el.parentNode._pending = {}))[(vnode.key)] = vnode; } beforeLeave && beforeLeave(el); @@ -11890,7 +12348,7 @@ var transition = inBrowser ? { rm(); } } -} : {} +} : {}; var platformModules = [ attrs, @@ -11899,7 +12357,7 @@ var platformModules = [ domProps, style, transition -] +]; /* */ @@ -11992,7 +12450,7 @@ function actuallySetSelected (el, binding, vm) { var value = binding.value; var isMultiple = el.multiple; if (isMultiple && !Array.isArray(value)) { - "development" !== 'production' && warn( + warn( "