diff --git a/.deploy/heroku/.env.heroku b/.deploy/heroku/.env.heroku index 804b7f6fc1..c0fb83278b 100644 --- a/.deploy/heroku/.env.heroku +++ b/.deploy/heroku/.env.heroku @@ -176,7 +176,6 @@ PUSHER_SECRET= PUSHER_ID= DEMO_USERNAME= DEMO_PASSWORD= -IS_DOCKER=false IS_SANDSTORM=false IS_HEROKU=true BUNQ_USE_SANDBOX=false diff --git a/.deploy/sandstorm/.env.sandstorm b/.deploy/sandstorm/.env.sandstorm index 8a393750fd..60a4352d31 100755 --- a/.deploy/sandstorm/.env.sandstorm +++ b/.deploy/sandstorm/.env.sandstorm @@ -171,7 +171,6 @@ PUSHER_SECRET= PUSHER_ID= DEMO_USERNAME= DEMO_PASSWORD= -IS_DOCKER=false IS_SANDSTORM=true IS_HEROKU=false BUNQ_USE_SANDBOX=false diff --git a/.env.example b/.env.example index b4669a480d..4dbe7b237f 100644 --- a/.env.example +++ b/.env.example @@ -178,7 +178,6 @@ PUSHER_SECRET= PUSHER_ID= DEMO_USERNAME= DEMO_PASSWORD= -IS_DOCKER=false USE_ENCRYPTION=false IS_SANDSTORM=false IS_HEROKU=false diff --git a/.github/funding.yml b/.github/funding.yml index 5f3fe3e3af..2569052f0e 100644 --- a/.github/funding.yml +++ b/.github/funding.yml @@ -1,5 +1,5 @@ # These are supported funding model platforms -#github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +github: jc5 patreon: JC5 custom: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=44UKUT455HUFA diff --git a/.travis.yml b/.travis.yml index 3b11472fea..a122912428 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ sudo: required language: bash env: - - VERSION=4.8.1.4 + - VERSION=4.8.1.5 dist: xenial diff --git a/Dockerfile b/Dockerfile index a3b0a069f9..15d23bb68f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,7 @@ FROM jc5x/firefly-iii-base-image:latest + +# See also: https://github.com/JC5/firefly-iii-base-image + ENV FIREFLY_PATH=/var/www/firefly-iii COMPOSER_ALLOW_SUPERUSER=1 LABEL version="1.5" maintainer="thegrumpydictator@gmail.com" diff --git a/Dockerfile.amd64 b/Dockerfile.amd64 index a3b0a069f9..15d23bb68f 100644 --- a/Dockerfile.amd64 +++ b/Dockerfile.amd64 @@ -1,4 +1,7 @@ FROM jc5x/firefly-iii-base-image:latest + +# See also: https://github.com/JC5/firefly-iii-base-image + ENV FIREFLY_PATH=/var/www/firefly-iii COMPOSER_ALLOW_SUPERUSER=1 LABEL version="1.5" maintainer="thegrumpydictator@gmail.com" diff --git a/Dockerfile.arm b/Dockerfile.arm index d238e8cd12..2f881d546a 100644 --- a/Dockerfile.arm +++ b/Dockerfile.arm @@ -1,4 +1,7 @@ FROM jc5x/firefly-iii-base-image:latest-arm + +# See also: https://github.com/JC5/firefly-iii-base-image + ENV FIREFLY_PATH=/var/www/firefly-iii COMPOSER_ALLOW_SUPERUSER=1 LABEL version="1.5" maintainer="thegrumpydictator@gmail.com" diff --git a/app/Api/V1/Controllers/AttachmentController.php b/app/Api/V1/Controllers/AttachmentController.php index 2ed473c8c1..3e3bc6febc 100644 --- a/app/Api/V1/Controllers/AttachmentController.php +++ b/app/Api/V1/Controllers/AttachmentController.php @@ -38,6 +38,7 @@ use Illuminate\Pagination\LengthAwarePaginator; use League\Fractal\Pagination\IlluminatePaginatorAdapter; use League\Fractal\Resource\Collection as FractalCollection; use League\Fractal\Resource\Item; +use Log; use function strlen; /** @@ -99,8 +100,14 @@ class AttachmentController extends Controller if (false === $attachment->uploaded) { throw new FireflyException('No file has been uploaded for this attachment (yet).'); } + if (0 === $attachment->size) { + throw new FireflyException('No file has been uploaded for this attachment (yet).'); + } if ($this->repository->exists($attachment)) { $content = $this->repository->getContent($attachment); + if ('' === $content) { + throw new FireflyException('No file has been uploaded for this attachment (yet).'); + } $quoted = sprintf('"%s"', addcslashes(basename($attachment->filename), '"\\')); /** @var LaravelResponse $response */ @@ -233,6 +240,11 @@ class AttachmentController extends Controller /** @var AttachmentHelperInterface $helper */ $helper = app(AttachmentHelperInterface::class); $body = $request->getContent(); + if ('' === $body) { + Log::error('Body of attachment is empty.'); + + return response()->json([], 422); + } $helper->saveAttachmentFromApi($attachment, $body); return response()->json([], 204); diff --git a/app/Api/V1/Controllers/Search/AccountController.php b/app/Api/V1/Controllers/Search/AccountController.php index 4ab07cb6e5..3038abe7f2 100644 --- a/app/Api/V1/Controllers/Search/AccountController.php +++ b/app/Api/V1/Controllers/Search/AccountController.php @@ -83,7 +83,8 @@ class AccountController extends Controller $transformer = app(AccountTransformer::class); $transformer->setParameters($this->parameters); $count = $accounts->count(); - $paginator = new LengthAwarePaginator($accounts, $count, $count, 1); + $perPage = 0 === $count ? 1 : $count; + $paginator = new LengthAwarePaginator($accounts, $count, $perPage, 1); $resource = new FractalCollection($accounts, $transformer, 'accounts'); $resource->setPaginator(new IlluminatePaginatorAdapter($paginator)); diff --git a/app/Api/V1/Controllers/TransactionController.php b/app/Api/V1/Controllers/TransactionController.php index c433c6e410..545126cbdb 100644 --- a/app/Api/V1/Controllers/TransactionController.php +++ b/app/Api/V1/Controllers/TransactionController.php @@ -251,6 +251,19 @@ class TransactionController extends Controller return response()->json($manager->createData($resource)->toArray())->header('Content-Type', 'application/vnd.api+json'); } + /** + * Show a single transaction, by transaction journal. + * + * @param TransactionJournal $transactionJournal + * + * @return JsonResponse + * @codeCoverageIgnore + */ + public function showByJournal(TransactionJournal $transactionJournal): JsonResponse + { + return $this->show($transactionJournal->transactionGroup); + } + /** * Store a new transaction. * diff --git a/app/Api/V1/Requests/TransactionStoreRequest.php b/app/Api/V1/Requests/TransactionStoreRequest.php index f64b7da36a..6a5efa94e6 100644 --- a/app/Api/V1/Requests/TransactionStoreRequest.php +++ b/app/Api/V1/Requests/TransactionStoreRequest.php @@ -74,7 +74,7 @@ class TransactionStoreRequest extends Request { $rules = [ // basic fields for group: - 'group_title' => 'between:1,1000', + 'group_title' => 'between:1,1000|nullable', // transaction rules (in array for splits): 'transactions.*.type' => 'required|in:withdrawal,deposit,transfer,opening-balance,reconciliation', @@ -82,10 +82,10 @@ class TransactionStoreRequest extends Request 'transactions.*.order' => 'numeric|min:0', // currency info - 'transactions.*.currency_id' => 'numeric|exists:transaction_currencies,id', - 'transactions.*.currency_code' => 'min:3|max:3|exists:transaction_currencies,code', - 'transactions.*.foreign_currency_id' => 'numeric|exists:transaction_currencies,id', - 'transactions.*.foreign_currency_code' => 'min:3|max:3|exists:transaction_currencies,code', + 'transactions.*.currency_id' => 'numeric|exists:transaction_currencies,id|nullable', + 'transactions.*.currency_code' => 'min:3|max:3|exists:transaction_currencies,code|nullable', + 'transactions.*.foreign_currency_id' => 'numeric|exists:transaction_currencies,id|nullable', + 'transactions.*.foreign_currency_code' => 'min:3|max:3|exists:transaction_currencies,code|nullable', // amount 'transactions.*.amount' => 'required|numeric|more:0', @@ -97,10 +97,16 @@ class TransactionStoreRequest extends Request // source of transaction 'transactions.*.source_id' => ['numeric', 'nullable', new BelongsUser], 'transactions.*.source_name' => 'between:1,255|nullable', + 'transactions.*.source_iban' => 'between:1,255|nullable|iban', + 'transactions.*.source_number' => 'between:1,255|nullable', + 'transactions.*.source_bic' => 'between:1,255|nullable|bic', // destination of transaction 'transactions.*.destination_id' => ['numeric', 'nullable', new BelongsUser], 'transactions.*.destination_name' => 'between:1,255|nullable', + 'transactions.*.destination_iban' => 'between:1,255|nullable|iban', + 'transactions.*.destination_number' => 'between:1,255|nullable', + 'transactions.*.destination_bic' => 'between:1,255|nullable|bic', // budget, category, bill and piggy 'transactions.*.budget_id' => ['mustExist:budgets,id', new BelongsUser], @@ -202,7 +208,7 @@ class TransactionStoreRequest extends Request 'date' => $this->dateFromValue($object['date']), 'order' => $this->integerFromValue((string)$object['order']), - 'currency_id' => $this->integerFromValue($object['currency_id']), + 'currency_id' => $this->integerFromValue((string)$object['currency_id']), 'currency_code' => $this->stringFromValue($object['currency_code']), // foreign currency info: @@ -219,10 +225,16 @@ class TransactionStoreRequest extends Request // source of transaction. If everything is null, assume cash account. 'source_id' => $this->integerFromValue((string)$object['source_id']), 'source_name' => $this->stringFromValue($object['source_name']), + 'source_iban' => $this->stringFromValue($object['source_iban']), + 'source_number' => $this->stringFromValue($object['source_number']), + 'source_bic' => $this->stringFromValue($object['source_bic']), // destination of transaction. If everything is null, assume cash account. 'destination_id' => $this->integerFromValue((string)$object['destination_id']), 'destination_name' => $this->stringFromValue($object['destination_name']), + 'destination_iban' => $this->stringFromValue($object['destination_iban']), + 'destination_number' => $this->stringFromValue($object['destination_number']), + 'destination_bic' => $this->stringFromValue($object['destination_bic']), // budget info 'budget_id' => $this->integerFromValue((string)$object['budget_id']), diff --git a/app/Api/V1/Requests/TransactionUpdateRequest.php b/app/Api/V1/Requests/TransactionUpdateRequest.php index e1beb9345c..441a0ef9da 100644 --- a/app/Api/V1/Requests/TransactionUpdateRequest.php +++ b/app/Api/V1/Requests/TransactionUpdateRequest.php @@ -105,7 +105,13 @@ class TransactionUpdateRequest extends Request 'foreign_amount', 'description', 'source_name', + 'source_iban', + 'source_number', + 'source_bic', 'destination_name', + 'destination_iban', + 'destination_number', + 'destination_bic', 'budget_name', 'category_name', 'bill_name', diff --git a/app/Console/Commands/Integrity/RestoreOAuthKeys.php b/app/Console/Commands/Integrity/RestoreOAuthKeys.php index b41a95930e..3e01552b71 100644 --- a/app/Console/Commands/Integrity/RestoreOAuthKeys.php +++ b/app/Console/Commands/Integrity/RestoreOAuthKeys.php @@ -23,6 +23,7 @@ namespace FireflyIII\Console\Commands\Integrity; use Artisan; use Crypt; +use FireflyIII\Support\System\OAuthKeys; use Illuminate\Console\Command; /** @@ -30,8 +31,6 @@ use Illuminate\Console\Command; */ class RestoreOAuthKeys extends Command { - private const PRIVATE_KEY = 'oauth_private_key'; - private const PUBLIC_KEY = 'oauth_public_key'; /** * The console command description. * @@ -62,7 +61,7 @@ class RestoreOAuthKeys extends Command */ private function generateKeys(): void { - Artisan::call('passport:keys'); + OAuthKeys::generateKeys(); } /** @@ -70,7 +69,7 @@ class RestoreOAuthKeys extends Command */ private function keysInDatabase(): bool { - return app('fireflyconfig')->has(self::PRIVATE_KEY) && app('fireflyconfig')->has(self::PUBLIC_KEY); + return OAuthKeys::keysInDatabase(); } /** @@ -78,10 +77,7 @@ class RestoreOAuthKeys extends Command */ private function keysOnDrive(): bool { - $private = storage_path('oauth-private.key'); - $public = storage_path('oauth-public.key'); - - return file_exists($private) && file_exists($public); + return OAuthKeys::hasKeyFiles(); } /** @@ -89,12 +85,7 @@ class RestoreOAuthKeys extends Command */ private function restoreKeysFromDB(): void { - $privateContent = Crypt::decrypt(app('fireflyconfig')->get(self::PRIVATE_KEY)->data); - $publicContent = Crypt::decrypt(app('fireflyconfig')->get(self::PUBLIC_KEY)->data); - $private = storage_path('oauth-private.key'); - $public = storage_path('oauth-public.key'); - file_put_contents($private, $privateContent); - file_put_contents($public, $publicContent); + OAuthKeys::restoreKeysFromDB(); } /** @@ -129,9 +120,6 @@ class RestoreOAuthKeys extends Command */ private function storeKeysInDB(): void { - $private = storage_path('oauth-private.key'); - $public = storage_path('oauth-public.key'); - app('fireflyconfig')->set(self::PRIVATE_KEY, Crypt::encrypt(file_get_contents($private))); - app('fireflyconfig')->set(self::PUBLIC_KEY, Crypt::encrypt(file_get_contents($public))); + OAuthKeys::storeKeysInDB(); } } \ No newline at end of file diff --git a/app/Factory/AccountMetaFactory.php b/app/Factory/AccountMetaFactory.php index 55df461643..b5ae6b1b7c 100644 --- a/app/Factory/AccountMetaFactory.php +++ b/app/Factory/AccountMetaFactory.php @@ -68,7 +68,6 @@ class AccountMetaFactory { /** @var AccountMeta $entry */ $entry = $account->accountMeta()->where('name', $field)->first(); - // must not be an empty string: if ('' !== $value) { diff --git a/app/Factory/TransactionJournalFactory.php b/app/Factory/TransactionJournalFactory.php index daf7f95a6d..c7e79306d4 100644 --- a/app/Factory/TransactionJournalFactory.php +++ b/app/Factory/TransactionJournalFactory.php @@ -212,16 +212,33 @@ class TransactionJournalFactory $carbon->setTimezone(config('app.timezone')); /** Get source + destination account */ - Log::debug(sprintf('Source info: ID #%d, name "%s"', $row['source_id'], $row['source_name'])); - Log::debug(sprintf('Destination info: ID #%d, name "%s"', $row['destination_id'], $row['destination_name'])); - + Log::debug(sprintf('Currency is #%d (%s)', $currency->id, $currency->code)); try { // validate source and destination using a new Validator. $this->validateAccounts($row); /** create or get source and destination accounts */ - $sourceAccount = $this->getAccount($type->type, 'source', (int)$row['source_id'], $row['source_name']); - $destinationAccount = $this->getAccount($type->type, 'destination', (int)$row['destination_id'], $row['destination_name']); + + $sourceInfo = [ + 'id' => (int)$row['source_id'], + 'name' => $row['source_name'], + 'iban' => $row['source_iban'], + 'number' => $row['source_number'], + 'bic' => $row['source_bic'], + ]; + + $destInfo = [ + 'id' => (int)$row['destination_id'], + 'name' => $row['destination_name'], + 'iban' => $row['destination_iban'], + 'number' => $row['destination_number'], + 'bic' => $row['destination_bic'], + ]; + Log::debug('Source info:', $sourceInfo); + Log::debug('Destination info:', $destInfo); + + $sourceAccount = $this->getAccount($type->type, 'source', $sourceInfo); + $destinationAccount = $this->getAccount($type->type, 'destination', $destInfo); // @codeCoverageIgnoreStart } catch (FireflyException $e) { Log::error('Could not validate source or destination.'); @@ -372,8 +389,10 @@ class TransactionJournalFactory // return user's default: return app('amount')->getDefaultCurrencyByUser($this->user); } + $result = $preference ?? $currency; + Log::debug(sprintf('Currency is now #%d (%s) because of account #%d (%s)', $result->id, $result->code, $account->id, $account->name)); - return $preference ?? $currency; + return $result; } /** diff --git a/app/Helpers/Attachments/AttachmentHelper.php b/app/Helpers/Attachments/AttachmentHelper.php index 8ecc6391e6..a600adf59f 100644 --- a/app/Helpers/Attachments/AttachmentHelper.php +++ b/app/Helpers/Attachments/AttachmentHelper.php @@ -162,6 +162,13 @@ class AttachmentHelper implements AttachmentHelperInterface return false; // @codeCoverageIgnoreEnd } + + if ('' === $content) { + Log::error('Cannot upload empty file.'); + + return false; + } + $path = stream_get_meta_data($resource)['uri']; fwrite($resource, $content); $finfo = finfo_open(FILEINFO_MIME_TYPE); @@ -199,6 +206,7 @@ class AttachmentHelper implements AttachmentHelperInterface if (!($model instanceof Model)) { return false; // @codeCoverageIgnore } + Log::debug(sprintf('Now in saveAttachmentsForModel for model %s', get_class($model))); if (is_array($files)) { Log::debug('$files is an array.'); @@ -362,6 +370,11 @@ class AttachmentHelper implements AttachmentHelperInterface if (!$this->validMime($file)) { $result = false; } + if (0 === $file->getSize()) { + Log::error('Cannot upload empty file.'); + $result = false; + } + // @codeCoverageIgnoreStart // can't seem to reach this point. if (true === $result && !$this->validSize($file)) { diff --git a/app/Http/Controllers/Account/IndexController.php b/app/Http/Controllers/Account/IndexController.php index 15769a7890..b0b7525ca3 100644 --- a/app/Http/Controllers/Account/IndexController.php +++ b/app/Http/Controllers/Account/IndexController.php @@ -63,20 +63,19 @@ class IndexController extends Controller } /** - * Show list of accounts. - * * @param Request $request - * @param string $objectType + * @param string $objectType * * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View */ - public function index(Request $request, string $objectType) + public function inactive(Request $request, string $objectType) { $objectType = $objectType ?? 'asset'; - $subTitle = (string)trans(sprintf('firefly.%s_accounts', $objectType)); + $inactivePage = true; + $subTitle = (string)trans(sprintf('firefly.%s_accounts_inactive', $objectType)); $subTitleIcon = config(sprintf('firefly.subIconsByIdentifier.%s', $objectType)); $types = config(sprintf('firefly.accountTypesByIdentifier.%s', $objectType)); - $collection = $this->repository->getAccountsByType($types); + $collection = $this->repository->getInactiveAccountsByType($types); $total = $collection->count(); $page = 0 === (int)$request->get('page') ? 1 : (int)$request->get('page'); $pageSize = (int)app('preferences')->get('listPageSize', 50)->data; @@ -105,11 +104,65 @@ class IndexController extends Controller } ); + // make paginator: + $accounts = new LengthAwarePaginator($accounts, $total, $pageSize, $page); + $accounts->setPath(route('accounts.inactive.index', [$objectType])); + + return view('accounts.index', compact('objectType','inactivePage', 'subTitleIcon', 'subTitle', 'page', 'accounts')); + + } + + /** + * Show list of accounts. + * + * @param Request $request + * @param string $objectType + * + * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View + */ + public function index(Request $request, string $objectType) + { + $objectType = $objectType ?? 'asset'; + $subTitle = (string)trans(sprintf('firefly.%s_accounts', $objectType)); + $subTitleIcon = config(sprintf('firefly.subIconsByIdentifier.%s', $objectType)); + $types = config(sprintf('firefly.accountTypesByIdentifier.%s', $objectType)); + $collection = $this->repository->getActiveAccountsByType($types); + $total = $collection->count(); + $page = 0 === (int)$request->get('page') ? 1 : (int)$request->get('page'); + $pageSize = (int)app('preferences')->get('listPageSize', 50)->data; + $accounts = $collection->slice(($page - 1) * $pageSize, $pageSize); + $inactiveCount = $this->repository->getInactiveAccountsByType($types)->count(); + + + unset($collection); + /** @var Carbon $start */ + $start = clone session('start', Carbon::now()->startOfMonth()); + /** @var Carbon $end */ + $end = clone session('end', Carbon::now()->endOfMonth()); + $start->subDay(); + + $ids = $accounts->pluck('id')->toArray(); + $startBalances = app('steam')->balancesByAccounts($accounts, $start); + $endBalances = app('steam')->balancesByAccounts($accounts, $end); + $activities = app('steam')->getLastActivities($ids); + + $accounts->each( + function (Account $account) use ($activities, $startBalances, $endBalances) { + $account->lastActivityDate = $this->isInArray($activities, $account->id); + $account->startBalance = $this->isInArray($startBalances, $account->id); + $account->endBalance = $this->isInArray($endBalances, $account->id); + $account->difference = bcsub($account->endBalance, $account->startBalance); + $account->interest = round($this->repository->getMetaValue($account, 'interest'), 6); + $account->interestPeriod = (string)trans(sprintf('firefly.interest_calc_%s', $this->repository->getMetaValue($account, 'interest_period'))); + $account->accountTypeString = (string)trans(sprintf('firefly.account_type_%s', $account->accountType->type)); + } + ); + // make paginator: $accounts = new LengthAwarePaginator($accounts, $total, $pageSize, $page); $accounts->setPath(route('accounts.index', [$objectType])); - return view('accounts.index', compact('objectType', 'subTitleIcon', 'subTitle', 'page', 'accounts')); + return view('accounts.index', compact('objectType', 'inactiveCount', 'subTitleIcon', 'subTitle', 'page', 'accounts')); } diff --git a/app/Http/Controllers/AttachmentController.php b/app/Http/Controllers/AttachmentController.php index 0d4d35d913..96f991543b 100644 --- a/app/Http/Controllers/AttachmentController.php +++ b/app/Http/Controllers/AttachmentController.php @@ -222,11 +222,11 @@ class AttachmentController extends Controller "default-src 'none'", "object-src 'none'", "script-src 'none'", - "style-src 'none'", + "style-src 'self' 'unsafe-inline'", "base-uri 'none'", "font-src 'none'", "connect-src 'none'", - "img-src 'none'", + "img-src 'self'", "manifest-src 'none'", ]; diff --git a/app/Http/Controllers/DebugController.php b/app/Http/Controllers/DebugController.php index cd49ca989b..17c82116d7 100644 --- a/app/Http/Controllers/DebugController.php +++ b/app/Http/Controllers/DebugController.php @@ -127,7 +127,6 @@ class DebugController extends Controller $currentDriver = DB::getDriverName(); $userAgent = $request->header('user-agent'); $isSandstorm = var_export(config('firefly.is_sandstorm'), true); - $isDocker = var_export(config('firefly.is_docker'), true); $toSandbox = var_export(config('firefly.bunq_use_sandbox'), true); $trustedProxies = config('firefly.trusted_proxies'); $displayErrors = ini_get('display_errors'); @@ -178,7 +177,7 @@ class DebugController extends Controller 'debug', compact( 'phpVersion', 'extensions', 'localeAttempts', 'appEnv', 'appDebug', 'logChannel', 'appLogLevel', 'now', 'drivers', 'currentDriver', 'loginProvider', 'storageDisks', - 'userAgent', 'displayErrors', 'errorReporting', 'phpOs', 'interface', 'logContent', 'cacheDriver', 'isDocker', 'isSandstorm', + 'userAgent', 'displayErrors', 'errorReporting', 'phpOs', 'interface', 'logContent', 'cacheDriver', 'isSandstorm', 'trustedProxies', 'toSandbox' ) diff --git a/app/Http/Controllers/Json/IntroController.php b/app/Http/Controllers/Json/IntroController.php index 4a890c4815..7526e03844 100644 --- a/app/Http/Controllers/Json/IntroController.php +++ b/app/Http/Controllers/Json/IntroController.php @@ -113,6 +113,7 @@ class IntroController } Log::debug(sprintf('Going to mark the following route as NOT done: %s with special "%s" (%s)', $route, $specialPage, $key)); app('preferences')->set($key, false); + app('preferences')->mark(); return response()->json(['message' => (string)trans('firefly.intro_boxes_after_refresh')]); } diff --git a/app/Http/Controllers/Report/BudgetController.php b/app/Http/Controllers/Report/BudgetController.php index 4412216bfa..a829b4ff3b 100644 --- a/app/Http/Controllers/Report/BudgetController.php +++ b/app/Http/Controllers/Report/BudgetController.php @@ -289,8 +289,8 @@ class BudgetController extends Controller // loop again to get percentages. foreach ($report as $budgetId => $data) { - foreach ($data['currencies'] as $currencyId => $data) { - $sum = $data['sum'] ?? '0'; + foreach ($data['currencies'] as $currencyId => $dataX) { + $sum = $dataX['sum'] ?? '0'; $total = $sums[$currencyId]['sum'] ?? '0'; $pct = '0'; if (0 !== bccomp($sum, '0') && 0 !== bccomp($total, '9')) { @@ -361,7 +361,8 @@ class BudgetController extends Controller ]; // make sum information: - $report['sums'][$currency->id] = $report['sums'][$currency->id] ?? [ + $report['sums'][$currency->id] + = $report['sums'][$currency->id] ?? [ 'budgeted' => '0', 'spent' => '0', 'left' => '0', @@ -411,15 +412,13 @@ class BudgetController extends Controller // make percentages based on total amount. foreach ($report['budgets'] as $budgetId => $data) { foreach ($data['budget_limits'] as $limitId => $entry) { - $currencyId = $entry['currency_id']; - - $spent = $entry['spent']; - $totalSpent = $report['sums'][$currencyId]['spent'] ?? '0'; - $spentPct = '0'; - + $currencyId = $entry['currency_id']; + $spent = $entry['spent']; + $totalSpent = $report['sums'][$currencyId]['spent'] ?? '0'; + $spentPct = '0'; $budgeted = $entry['budgeted']; - $totalBudgeted = $report['sums'][$currencyId]['budgeted'] ?? '0';; - $budgetedPct = '0'; + $totalBudgeted = $report['sums'][$currencyId]['budgeted'] ?? '0'; + $budgetedPct = '0'; if (0 !== bccomp($spent, '0') && 0 !== bccomp($totalSpent, '0')) { $spentPct = round(bcmul(bcdiv($spent, $totalSpent), '100')); @@ -427,28 +426,13 @@ class BudgetController extends Controller if (0 !== bccomp($budgeted, '0') && 0 !== bccomp($totalBudgeted, '0')) { $budgetedPct = round(bcmul(bcdiv($budgeted, $totalBudgeted), '100')); } + $report['sums'][$currencyId]['budgeted'] = $report['sums'][$currencyId]['budgeted'] ?? '0'; $report['budgets'][$budgetId]['budget_limits'][$limitId]['spent_pct'] = $spentPct; $report['budgets'][$budgetId]['budget_limits'][$limitId]['budgeted_pct'] = $budgetedPct; } } - // var_dump($noBudget); - // - // - // echo '
';
-        //        print_r($report);
-        //        exit;
-        //        try {
-        $result = view('reports.partials.budgets', compact('report'))->render();
-        // @codeCoverageIgnoreStart
-        //        } catch (Throwable $e) {
-        //            Log::debug(sprintf('Could not render reports.partials.budgets: %s', $e->getMessage()));
-        //            $result = 'Could not render view.';
-        //        }
-
-        // @codeCoverageIgnoreEnd
-
-        return $result;
+        return view('reports.partials.budgets', compact('report'))->render();
     }
 
     /**
diff --git a/app/Http/Controllers/Report/CategoryController.php b/app/Http/Controllers/Report/CategoryController.php
index 7bcc71ef09..af1ac9f65a 100644
--- a/app/Http/Controllers/Report/CategoryController.php
+++ b/app/Http/Controllers/Report/CategoryController.php
@@ -714,7 +714,6 @@ class CategoryController extends Controller
         /** @var NoCategoryRepositoryInterface $noCatRepository */
         $noCatRepository = app(NoCategoryRepositoryInterface::class);
 
-        $categories    = $repository->getCategories();
         $earnedWith    = $opsRepository->listIncome($start, $end, $accounts);
         $spentWith     = $opsRepository->listExpenses($start, $end, $accounts);
         $earnedWithout = $noCatRepository->listIncome($start, $end, $accounts);
@@ -745,7 +744,7 @@ class CategoryController extends Controller
                     $key                        = sprintf('%s-%s', $currencyId, $categoryId);
                     $report['categories'][$key] = $report['categories'][$key] ?? [
                             'id'                      => $categoryId,
-                            'title'                   => sprintf('%s (%s)', $categoryRow['name'], $currencyRow['currency_name']),
+                            'title'                   => $categoryRow['name'],
                             'currency_id'             => $currencyRow['currency_id'],
                             'currency_symbol'         => $currencyRow['currency_symbol'],
                             'currency_name'           => $currencyRow['currency_name'],
diff --git a/app/Http/Controllers/Transaction/EditController.php b/app/Http/Controllers/Transaction/EditController.php
index 2c0105b93c..c9e978c176 100644
--- a/app/Http/Controllers/Transaction/EditController.php
+++ b/app/Http/Controllers/Transaction/EditController.php
@@ -69,6 +69,8 @@ class EditController extends Controller
      */
     public function edit(TransactionGroup $transactionGroup)
     {
+        app('preferences')->mark();
+
         if (!$this->isEditableGroup($transactionGroup)) {
             return $this->redirectGroupToAccount($transactionGroup); // @codeCoverageIgnore
         }
diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php
index 7521b81e8c..dc50579d2c 100644
--- a/app/Http/Kernel.php
+++ b/app/Http/Kernel.php
@@ -182,7 +182,7 @@ class Kernel extends HttpKernel
 
             'apiX' => [
                 'auth:api',
-                'throttle:60,1',
+                //'throttle:60,1',
                 'bindings',
             ],
         ];
diff --git a/app/Http/Middleware/Installer.php b/app/Http/Middleware/Installer.php
index 9ea4ed2764..e9f5e3eb29 100644
--- a/app/Http/Middleware/Installer.php
+++ b/app/Http/Middleware/Installer.php
@@ -27,6 +27,7 @@ namespace FireflyIII\Http\Middleware;
 use Closure;
 use DB;
 use FireflyIII\Exceptions\FireflyException;
+use FireflyIII\Support\System\OAuthKeys;
 use Illuminate\Database\QueryException;
 use Log;
 
@@ -71,6 +72,7 @@ class Installer
         if ($this->hasNoTables() || $this->oldDBVersion() || $this->oldVersion()) {
             return response()->redirectTo(route('installer.index'));
         }
+        OAuthKeys::verifyKeysRoutine();
         // update scheme version
         // update firefly version
 
@@ -182,4 +184,5 @@ class Installer
 
         return false;
     }
+
 }
diff --git a/app/Http/Middleware/Range.php b/app/Http/Middleware/Range.php
index 1734ce8aa0..36101d6f8c 100644
--- a/app/Http/Middleware/Range.php
+++ b/app/Http/Middleware/Range.php
@@ -53,8 +53,6 @@ class Range
             // set more view variables:
             $this->configureList();
 
-            // flash a big fat warning when users use SQLite in Docker
-            $this->loseItAll($request);
         }
 
         return $next($request);
@@ -104,22 +102,6 @@ class Range
         app('view')->share('defaultCurrency', $defaultCurrency);
     }
 
-    /**
-     * Error when sqlite in docker.
-     *
-     * @param Request $request
-     */
-    private function loseItAll(Request $request): void
-    {
-        if ('sqlite' === config('database.default') && true === config('firefly.is_docker')) {
-            // @codeCoverageIgnoreStart
-            $request->session()->flash(
-                'error', 'You seem to be using SQLite in a Docker container. Don\'t do this. If the container restarts all your data will be gone.'
-            );
-            // @codeCoverageIgnoreEnd
-        }
-    }
-
     /**
      * Set the range for the current view.
      */
diff --git a/app/Import/JobConfiguration/FinTSConfigurationSteps.php b/app/Import/JobConfiguration/FinTSConfigurationSteps.php
index e41051934f..5144a4fe00 100644
--- a/app/Import/JobConfiguration/FinTSConfigurationSteps.php
+++ b/app/Import/JobConfiguration/FinTSConfigurationSteps.php
@@ -1,7 +1,7 @@
 
  *
  * This file is part of Firefly III (https://github.com/firefly-iii).
  *
diff --git a/app/Import/Specifics/IngBelgium.php b/app/Import/Specifics/IngBelgium.php
index fcee30082c..eb7ffdaf14 100644
--- a/app/Import/Specifics/IngBelgium.php
+++ b/app/Import/Specifics/IngBelgium.php
@@ -1,7 +1,7 @@
 
  *
  * This file is part of Firefly III (https://github.com/firefly-iii).
  *
diff --git a/app/Import/Specifics/IngDescription.php b/app/Import/Specifics/IngDescription.php
index f793dea909..7d554388ea 100644
--- a/app/Import/Specifics/IngDescription.php
+++ b/app/Import/Specifics/IngDescription.php
@@ -1,7 +1,7 @@
 repository->setUser($recurrence->user);
             $this->journalRepository->setUser($recurrence->user);
             $this->groupRepository->setUser($recurrence->user);
+
+            // clear cache for user
+            app('preferences')->setForUser($recurrence->user, 'lastActivity', microtime());
+
             Log::debug(sprintf('Now at recurrence #%d', $recurrence->id));
             $created = $this->handleRepetitions($recurrence);
             Log::debug(sprintf('Done with recurrence #%d', $recurrence->id));
diff --git a/app/Repositories/Account/AccountRepository.php b/app/Repositories/Account/AccountRepository.php
index 73de3a9a02..048e3457a5 100644
--- a/app/Repositories/Account/AccountRepository.php
+++ b/app/Repositories/Account/AccountRepository.php
@@ -318,9 +318,8 @@ class AccountRepository implements AccountRepositoryInterface
         $query->where('active', 1);
         $query->orderBy('accounts.account_type_id', 'ASC');
         $query->orderBy('accounts.name', 'ASC');
-        $result = $query->get(['accounts.*']);
 
-        return $result;
+        return $query->get(['accounts.*']);
     }
 
     /**
@@ -606,4 +605,27 @@ class AccountRepository implements AccountRepositoryInterface
 
         return $account;
     }
+
+    /**
+     * @param array $types
+     *
+     * @return Collection
+     */
+    public function getInactiveAccountsByType(array $types): Collection
+    {
+        /** @var Collection $result */
+        $query = $this->user->accounts()->with(
+            ['accountmeta' => function (HasMany $query) {
+                $query->where('name', 'account_role');
+            }]
+        );
+        if (count($types) > 0) {
+            $query->accountTypeIn($types);
+        }
+        $query->where('active', 0);
+        $query->orderBy('accounts.account_type_id', 'ASC');
+        $query->orderBy('accounts.name', 'ASC');
+
+        return $query->get(['accounts.*']);
+    }
 }
diff --git a/app/Repositories/Account/AccountRepositoryInterface.php b/app/Repositories/Account/AccountRepositoryInterface.php
index 54793896ca..07c2727505 100644
--- a/app/Repositories/Account/AccountRepositoryInterface.php
+++ b/app/Repositories/Account/AccountRepositoryInterface.php
@@ -142,6 +142,13 @@ interface AccountRepositoryInterface
      */
     public function getActiveAccountsByType(array $types): Collection;
 
+    /**
+     * @param array $types
+     *
+     * @return Collection
+     */
+    public function getInactiveAccountsByType(array $types): Collection;
+
     /**
      * @return Account
      */
diff --git a/app/Repositories/Recurring/RecurringRepository.php b/app/Repositories/Recurring/RecurringRepository.php
index 7dcad34ad5..41a46e0817 100644
--- a/app/Repositories/Recurring/RecurringRepository.php
+++ b/app/Repositories/Recurring/RecurringRepository.php
@@ -404,6 +404,7 @@ class RecurringRepository implements RecurringRepositoryInterface
      */
     public function repetitionDescription(RecurrenceRepetition $repetition): string
     {
+        Log::debug('Now in repetitionDescription()');
         /** @var Preference $pref */
         $pref     = app('preferences')->getForUser($this->user, 'language', config('firefly.default_language', 'en_US'));
         $language = $pref->data;
@@ -514,6 +515,7 @@ class RecurringRepository implements RecurringRepositoryInterface
      */
     public function getXOccurrencesSince(RecurrenceRepetition $repetition, Carbon $date, Carbon $afterDate, int $count): array
     {
+        Log::debug('Now in getXOccurrencesSince()');
         $skipMod     = $repetition->repetition_skip + 1;
         $occurrences = [];
         if ('daily' === $repetition->repetition_type) {
diff --git a/app/Repositories/TransactionGroup/TransactionGroupRepository.php b/app/Repositories/TransactionGroup/TransactionGroupRepository.php
index 3e4289e0f3..d23853869c 100644
--- a/app/Repositories/TransactionGroup/TransactionGroupRepository.php
+++ b/app/Repositories/TransactionGroup/TransactionGroupRepository.php
@@ -97,6 +97,7 @@ class TransactionGroupRepository implements TransactionGroupRepositoryInterface
         $journals = $group->transactionJournals->pluck('id')->toArray();
         $set      = Attachment::whereIn('attachable_id', $journals)
                               ->where('attachable_type', TransactionJournal::class)
+                              ->where('uploaded', 1)
                               ->whereNull('deleted_at')->get();
 
         $result = [];
diff --git a/app/Rules/BelongsUser.php b/app/Rules/BelongsUser.php
index d83d61a405..1d8fa7b8fc 100644
--- a/app/Rules/BelongsUser.php
+++ b/app/Rules/BelongsUser.php
@@ -160,6 +160,10 @@ class BelongsUser implements Rule
      */
     private function validateAccountId(int $value): bool
     {
+        if (0 === $value) {
+            // its ok to submit 0. other checks will fail.
+            return true;
+        }
         $count = Account::where('id', '=', $value)->where('user_id', '=', auth()->user()->id)->count();
 
         return 1 === $count;
diff --git a/app/Services/Currency/RatesApiIOv1.php b/app/Services/Currency/RatesApiIOv1.php
index d67c434d37..f399b5f3ca 100644
--- a/app/Services/Currency/RatesApiIOv1.php
+++ b/app/Services/Currency/RatesApiIOv1.php
@@ -1,7 +1,7 @@
 crud($account, $field, (string)($data[$field] ?? ''));
+
+                // convert boolean value:
+                if (is_bool($data[$field]) && false === $data[$field]) {
+                    $data[$field] = 0;
+                }
+                if (is_bool($data[$field]) && true === $data[$field]) {
+                    $data[$field] = 1;
+                }
+
+                $factory->crud($account, $field, (string)$data[$field]);
             }
         }
     }
diff --git a/app/Services/Internal/Support/JournalServiceTrait.php b/app/Services/Internal/Support/JournalServiceTrait.php
index d990cb13c8..070e86819a 100644
--- a/app/Services/Internal/Support/JournalServiceTrait.php
+++ b/app/Services/Internal/Support/JournalServiceTrait.php
@@ -25,6 +25,7 @@ namespace FireflyIII\Services\Internal\Support;
 
 use Exception;
 use FireflyIII\Exceptions\FireflyException;
+use FireflyIII\Factory\AccountMetaFactory;
 use FireflyIII\Factory\TagFactory;
 use FireflyIII\Models\Account;
 use FireflyIII\Models\AccountType;
@@ -82,18 +83,17 @@ trait JournalServiceTrait
     }
 
     /**
-     * @param string      $transactionType
-     * @param string      $direction
-     * @param int|null    $accountId
-     * @param string|null $accountName
+     * @param string $transactionType
+     * @param string $direction
+     * @param array  $data
      *
      * @return Account
      * @codeCoverageIgnore
      */
-    protected function getAccount(string $transactionType, string $direction, ?int $accountId, ?string $accountName): Account
+    protected function getAccount(string $transactionType, string $direction, array $data): Account
     {
         // some debug logging:
-        Log::debug(sprintf('Now in getAccount(%s, %d, %s)', $direction, $accountId, $accountName));
+        Log::debug(sprintf('Now in getAccount(%s)', $direction), $data);
 
         // final result:
         $result = null;
@@ -109,8 +109,8 @@ trait JournalServiceTrait
         Log::debug(sprintf($message, $transactionType, $direction, implode(', ', $expectedTypes[$transactionType])));
 
         // first attempt, find by ID.
-        if (null !== $accountId) {
-            $search = $this->accountRepository->findNull($accountId);
+        if (null !== $data['id']) {
+            $search = $this->accountRepository->findNull($data['id']);
             if (null !== $search && in_array($search->accountType->type, $expectedTypes[$transactionType], true)) {
                 Log::debug(
                     sprintf('Found "account_id" object  for %s: #%d, "%s" of type %s', $direction, $search->id, $search->name, $search->accountType->type)
@@ -120,12 +120,12 @@ trait JournalServiceTrait
         }
 
         // second attempt, find by name.
-        if (null === $result && null !== $accountName) {
+        if (null === $result && null !== $data['name']) {
             Log::debug('Found nothing by account ID.');
             // find by preferred type.
-            $source = $this->accountRepository->findByName($accountName, [$expectedTypes[$transactionType][0]]);
+            $source = $this->accountRepository->findByName($data['name'], [$expectedTypes[$transactionType][0]]);
             // or any expected type.
-            $source = $source ?? $this->accountRepository->findByName($accountName, $expectedTypes[$transactionType]);
+            $source = $source ?? $this->accountRepository->findByName($data['name'], $expectedTypes[$transactionType]);
 
             if (null !== $source) {
                 Log::debug(sprintf('Found "account_name" object for %s: #%d, %s', $direction, $source->id, $source->name));
@@ -134,30 +134,57 @@ trait JournalServiceTrait
             }
         }
 
+        // third attempt, find by IBAN
+        if (null === $result && null !== $data['iban']) {
+            Log::debug('Found nothing by account name.');
+            // find by preferred type.
+            $source = $this->accountRepository->findByIbanNull($data['iban'], [$expectedTypes[$transactionType][0]]);
+            // or any expected type.
+            $source = $source ?? $this->accountRepository->findByIbanNull($data['iban'], $expectedTypes[$transactionType]);
+
+            if (null !== $source) {
+                Log::debug(sprintf('Found "account_iban" object for %s: #%d, %s', $direction, $source->id, $source->name));
+
+                $result = $source;
+            }
+        }
+
         // return cash account.
-        if (null === $result && null === $accountName
+        if (null === $result && null === $data['name']
             && in_array(AccountType::CASH, $expectedTypes[$transactionType], true)) {
             $result = $this->accountRepository->getCashAccount();
         }
 
         // return new account.
         if (null === $result) {
-            $accountName = $accountName ?? '(no name)';
+            $data['name'] = $data['name'] ?? '(no name)';
             // final attempt, create it.
             $preferredType = $expectedTypes[$transactionType][0];
             if (AccountType::ASSET === $preferredType) {
-                throw new FireflyException(sprintf('TransactionFactory: Cannot create asset account with ID #%d or name "%s".', $accountId, $accountName));
+                throw new FireflyException('TransactionFactory: Cannot create asset account with these values', $data);
             }
 
             $result = $this->accountRepository->store(
                 [
                     'account_type_id' => null,
-                    'account_type'     => $preferredType,
-                    'name'            => $accountName,
+                    'account_type'    => $preferredType,
+                    'name'            => $data['name'],
                     'active'          => true,
-                    'iban'            => null,
+                    'iban'            => $data['iban'],
                 ]
             );
+            // store BIC
+            if (null !== $data['bic']) {
+                /** @var AccountMetaFactory $metaFactory */
+                $metaFactory = app(AccountMetaFactory::class);
+                $metaFactory->create(['account_id' => $result->id, 'name' => 'BIC', 'data' => $data['bic']]);
+            }
+            // store account number
+            if (null !== $data['number']) {
+                /** @var AccountMetaFactory $metaFactory */
+                $metaFactory = app(AccountMetaFactory::class);
+                $metaFactory->create(['account_id' => $result->id, 'name' => 'account_number', 'data' => $data['bic']]);
+            }
         }
 
         return $result;
diff --git a/app/Services/Internal/Update/JournalUpdateService.php b/app/Services/Internal/Update/JournalUpdateService.php
index 0749979076..ae49a175b8 100644
--- a/app/Services/Internal/Update/JournalUpdateService.php
+++ b/app/Services/Internal/Update/JournalUpdateService.php
@@ -294,14 +294,19 @@ class JournalUpdateService
             return $this->getOriginalDestinationAccount();
         }
 
-        $destId   = $this->data['destination_id'] ?? null;
-        $destName = $this->data['destination_name'] ?? null;
+        $destInfo = [
+            'id'     => (int)($this->data['destination_id'] ?? null),
+            'name'   => $this->data['destination_name'] ?? null,
+            'iban'   => $this->data['destination_iban'] ?? null,
+            'number' => $this->data['destination_number'] ?? null,
+            'bic'    => $this->data['destination_bic'] ?? null,
+        ];
 
         // make new account validator.
         $expectedType = $this->getExpectedType();
         Log::debug(sprintf('Expected type (new or unchanged) is %s', $expectedType));
         try {
-            $result = $this->getAccount($expectedType, 'destination', $destId, $destName);
+            $result = $this->getAccount($expectedType, 'destination', $destInfo);
         } catch (FireflyException $e) {
             Log::error(sprintf('getValidDestinationAccount() threw unexpected error: %s', $e->getMessage()));
             $result = $this->getOriginalDestinationAccount();
@@ -318,16 +323,22 @@ class JournalUpdateService
     private function getValidSourceAccount(): Account
     {
         Log::debug('Now in getValidSourceAccount().');
-        $sourceId   = $this->data['source_id'] ?? null;
-        $sourceName = $this->data['source_name'] ?? null;
 
         if (!$this->hasFields(['source_id', 'source_name'])) {
             return $this->getOriginalSourceAccount();
         }
 
+        $sourceInfo = [
+            'id'     => (int)($this->data['source_id'] ?? null),
+            'name'   => $this->data['source_name'] ?? null,
+            'iban'   => $this->data['source_iban'] ?? null,
+            'number' => $this->data['source_number'] ?? null,
+            'bic'    => $this->data['source_bic'] ?? null,
+        ];
+
         $expectedType = $this->getExpectedType();
         try {
-            $result = $this->getAccount($expectedType, 'source', $sourceId, $sourceName);
+            $result = $this->getAccount($expectedType, 'source', $sourceInfo);
         } catch (FireflyException $e) {
             Log::error(sprintf('Cant get the valid source account: %s', $e->getMessage()));
 
diff --git a/app/Support/FinTS/FinTS.php b/app/Support/FinTS/FinTS.php
index 28abb672eb..174032f488 100644
--- a/app/Support/FinTS/FinTS.php
+++ b/app/Support/FinTS/FinTS.php
@@ -1,7 +1,7 @@
 weekend === RecurrenceRepetition::WEEKEND_DO_NOTHING) {
             Log::debug('Repetition will not be filtered on weekend days.');
 
diff --git a/app/Support/Search/AccountSearch.php b/app/Support/Search/AccountSearch.php
index 94a6434597..4d3c765a6c 100644
--- a/app/Support/Search/AccountSearch.php
+++ b/app/Support/Search/AccountSearch.php
@@ -108,7 +108,7 @@ class AccountSearch implements GenericSearchInterface
                 break;
         }
 
-        return $query->get(['accounts.*']);
+        return $query->distinct()->get(['accounts.*']);
     }
 
     /**
diff --git a/app/Support/Search/Search.php b/app/Support/Search/Search.php
index 8455c720e0..08018b28f8 100644
--- a/app/Support/Search/Search.php
+++ b/app/Support/Search/Search.php
@@ -123,10 +123,13 @@ class Search implements SearchInterface
     {
         $filteredQuery       = app('steam')->cleanString($query);
         $this->originalQuery = $filteredQuery;
-        $pattern             = '/[[:alpha:]_]*:"?[\p{L}_-]*"?/ui';
+        $pattern             = '/[[:alpha:]_]*:"?[\P{C}_-]*"?/ui';
         $matches             = [];
         preg_match_all($pattern, $filteredQuery, $matches);
 
+        var_dump($matches[0]);
+        exit;
+
         foreach ($matches[0] as $match) {
             $this->extractModifier($match);
             $filteredQuery = str_replace($match, '', $filteredQuery);
@@ -288,12 +291,12 @@ class Search implements SearchInterface
                     $after = new Carbon($modifier['value']);
                     $collector->setAfter($after);
                     break;
-                case 'created_at':
+                case 'created_on':
                     Log::debug(sprintf('Set "%s" using collector with value "%s"', $modifier['type'], $modifier['value']));
                     $createdAt = new Carbon($modifier['value']);
                     $collector->setCreatedAt($createdAt);
                     break;
-                case 'updated_at':
+                case 'updated_on':
                     Log::debug(sprintf('Set "%s" using collector with value "%s"', $modifier['type'], $modifier['value']));
                     $updatedAt = new Carbon($modifier['value']);
                     $collector->setUpdatedAt($updatedAt);
diff --git a/app/Support/System/OAuthKeys.php b/app/Support/System/OAuthKeys.php
new file mode 100644
index 0000000000..65cc879d71
--- /dev/null
+++ b/app/Support/System/OAuthKeys.php
@@ -0,0 +1,111 @@
+.
+ */
+
+namespace FireflyIII\Support\System;
+
+use Artisan;
+use Crypt;
+use Laravel\Passport\Console\KeysCommand;
+
+/**
+ * Class OAuthKeys
+ */
+class OAuthKeys
+{
+    private const PRIVATE_KEY = 'oauth_private_key';
+    private const PUBLIC_KEY  = 'oauth_public_key';
+
+    /**
+     *
+     */
+    public static function generateKeys(): void
+    {
+        Artisan::registerCommand(new KeysCommand());
+        Artisan::call('passport:keys');
+    }
+
+    /**
+     * @return bool
+     */
+    public static function hasKeyFiles(): bool
+    {
+        $private = storage_path('oauth-private.key');
+        $public  = storage_path('oauth-public.key');
+
+        return file_exists($private) && file_exists($public);
+    }
+
+    /**
+     * @return bool
+     */
+    public static function keysInDatabase(): bool
+    {
+        return app('fireflyconfig')->has(self::PRIVATE_KEY) && app('fireflyconfig')->has(self::PUBLIC_KEY);
+    }
+
+    /**
+     *
+     */
+    public static function restoreKeysFromDB(): void
+    {
+        $privateContent = Crypt::decrypt(app('fireflyconfig')->get(self::PRIVATE_KEY)->data);
+        $publicContent  = Crypt::decrypt(app('fireflyconfig')->get(self::PUBLIC_KEY)->data);
+        $private        = storage_path('oauth-private.key');
+        $public         = storage_path('oauth-public.key');
+        file_put_contents($private, $privateContent);
+        file_put_contents($public, $publicContent);
+    }
+
+    /**
+     *
+     */
+    public static function storeKeysInDB(): void
+    {
+        $private = storage_path('oauth-private.key');
+        $public  = storage_path('oauth-public.key');
+        app('fireflyconfig')->set(self::PRIVATE_KEY, Crypt::encrypt(file_get_contents($private)));
+        app('fireflyconfig')->set(self::PUBLIC_KEY, Crypt::encrypt(file_get_contents($public)));
+    }
+
+    /**
+     *
+     */
+    public static function verifyKeysRoutine(): void
+    {
+        if (!self::keysInDatabase() && !self::hasKeyFiles()) {
+            self::generateKeys();
+            self::storeKeysInDB();
+
+            return;
+        }
+        if (self::keysInDatabase() && !self::hasKeyFiles()) {
+            self::restoreKeysFromDB();
+
+            return;
+        }
+        if (!self::keysInDatabase() && self::hasKeyFiles()) {
+            self::storeKeysInDB();
+
+            return;
+        }
+    }
+
+}
\ No newline at end of file
diff --git a/app/TransactionRules/Engine/RuleEngine.php b/app/TransactionRules/Engine/RuleEngine.php
index e8e0470f7f..b6ef7964b2 100644
--- a/app/TransactionRules/Engine/RuleEngine.php
+++ b/app/TransactionRules/Engine/RuleEngine.php
@@ -229,7 +229,7 @@ class RuleEngine
         $validTrigger = ('store-journal' === $trigger->trigger_value && self::TRIGGER_STORE === $this->triggerMode)
                         || ('update-journal' === $trigger->trigger_value && self::TRIGGER_UPDATE === $this->triggerMode);
 
-        return $validTrigger && ($this->allRules || in_array($rule->id, $this->rulesToApply, true));
+        return $validTrigger && ($this->allRules || in_array($rule->id, $this->rulesToApply, true)) && true === $rule->active;
     }
 
 }
diff --git a/app/TransactionRules/Factory/ActionFactory.php b/app/TransactionRules/Factory/ActionFactory.php
index 8d2050700d..37a8acae7b 100644
--- a/app/TransactionRules/Factory/ActionFactory.php
+++ b/app/TransactionRules/Factory/ActionFactory.php
@@ -1,7 +1,7 @@
 piggyRepos->setUser($recurrence->user);
         $this->factory->setUser($recurrence->user);
         $this->budgetRepos->setUser($recurrence->user);
+        Log::debug('Set user.');
 
         $shortType = (string)config(sprintf('firefly.transactionTypesToShort.%s', $recurrence->transactionType->type));
         $notes     = $this->repository->getNoteText($recurrence);
         $reps      = 0 === (int)$recurrence->repetitions ? null : (int)$recurrence->repetitions;
+        Log::debug('Get basic data.');
         // basic data.
         $return = [
             'id'                => (int)$recurrence->id,
@@ -124,6 +126,7 @@ class RecurrenceTransformer extends AbstractTransformer
      */
     private function getRepetitions(Recurrence $recurrence): array
     {
+        Log::debug('Now in getRepetitions().');
         $fromDate = $recurrence->latest_date ?? $recurrence->first_date;
         $return   = [];
 
@@ -163,6 +166,7 @@ class RecurrenceTransformer extends AbstractTransformer
      */
     private function getTransactionMeta(RecurrenceTransaction $transaction, array $array): array
     {
+        Log::debug(sprintf('Now in %s', __METHOD__));
         $array['tags']            = [];
         $array['category_id']     = null;
         $array['category_name']   = null;
@@ -216,6 +220,7 @@ class RecurrenceTransformer extends AbstractTransformer
      */
     private function getTransactions(Recurrence $recurrence): array
     {
+        Log::debug(sprintf('Now in %s', __METHOD__));
         $return = [];
         // get all transactions:
         /** @var RecurrenceTransaction $transaction */
diff --git a/changelog.md b/changelog.md
index b51eb59d2f..a6a958ccc8 100644
--- a/changelog.md
+++ b/changelog.md
@@ -2,6 +2,44 @@
 All notable changes to this project will be documented in this file.
 This project adheres to [Semantic Versioning](http://semver.org/).
 
+## [4.8.1.5 (API 0.10.4)] - 2019-10-21
+
+### Added
+- [Issue 2694](https://github.com/firefly-iii/firefly-iii/issues/2694) Special page for archived accounts.
+
+### Changed
+- [Issue 2540](https://github.com/firefly-iii/firefly-iii/issues/2540) Partly translated transaction edit/create form.
+- [Issue 2655](https://github.com/firefly-iii/firefly-iii/issues/2655) Link to Firefly III's base Docker image.
+- [Issue 2724](https://github.com/firefly-iii/firefly-iii/issues/2724) Cleanup some JS output.
+- [Issue 2734](https://github.com/firefly-iii/firefly-iii/issues/2734) Put personal access token in textarea for easier copy/pasting.
+- [Issue 2728](https://github.com/firefly-iii/firefly-iii/issues/2728) Remove superfluous currency names.
+
+### Deprecated
+- Initial release.
+
+### Removed
+- Initial release.
+
+### Fixed
+- [Issue 2699](https://github.com/firefly-iii/firefly-iii/issues/2699) Internal cache wouldn't update.
+- [Issue 2713](https://github.com/firefly-iii/firefly-iii/issues/2713) Could not search for numerical values.
+- [Issue 2716](https://github.com/firefly-iii/firefly-iii/issues/2716) Could not reset intro popups.
+- [Issue 2701](https://github.com/firefly-iii/firefly-iii/issues/2701) Temporary fix for timeouts.
+- [Issue 2727](https://github.com/firefly-iii/firefly-iii/issues/2727) CSP headers too strict.
+- [Issue 2731](https://github.com/firefly-iii/firefly-iii/issues/2731) Too strict config vars.
+- [Issue 2754](https://github.com/firefly-iii/firefly-iii/issues/2754) Memcached config would error out.
+- [Issue 2746](https://github.com/firefly-iii/firefly-iii/issues/2746) Cache would not clear after firing recurring transactions.
+- [Issue 2755](https://github.com/firefly-iii/firefly-iii/issues/2755) Making a rule inactive would still fire it.
+
+### Security
+- Initial release.
+
+### API
+- [Issue 2698](https://github.com/firefly-iii/firefly-iii/issues/2698) Fix return value in API.
+- [Issue 2753](https://github.com/firefly-iii/firefly-iii/issues/2753) Was possible to upload and manage empty attachments.
+- New accounts submitted through the API may include account number, BIC and IBAN data.
+- New end point to support [issue 2752](https://github.com/firefly-iii/firefly-iii/issues/2752).
+
 ## [4.8.1.4 (API 0.10.3)] - 2019-10-05
 
 Emergency fix because I borked the upgrade routine. I apologise for the inconvenience.
diff --git a/composer.json b/composer.json
index 15a472a168..b855ea2866 100644
--- a/composer.json
+++ b/composer.json
@@ -84,6 +84,7 @@
     "league/fractal": "0.*",
     "litipk/flysystem-fallback-adapter": "0.*",
     "mschindler83/fints-hbci-php": "1.*",
+    "pragmarx/google2fa": "7.*",
     "pragmarx/google2fa-laravel": "1.*",
     "pragmarx/recovery": "^0.1.0",
     "rcrowe/twigbridge": "0.9.*"
diff --git a/composer.lock b/composer.lock
index 61d1d6f7f5..44eb3e7214 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "3f739750fe2fcd798a369d0547753daa",
+    "content-hash": "2bb65bbd943e05cc3619e7ddc4add0b6",
     "packages": [
         {
             "name": "adldap2/adldap2",
@@ -403,16 +403,16 @@
         },
         {
             "name": "davejamesmiller/laravel-breadcrumbs",
-            "version": "5.3.0",
+            "version": "5.3.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/davejamesmiller/laravel-breadcrumbs.git",
-                "reference": "1edeee4a77f467293aa5e5ea4a0b8f010216b8da"
+                "reference": "40a73bc9b32fbbee18938dc92228dea161365245"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/davejamesmiller/laravel-breadcrumbs/zipball/1edeee4a77f467293aa5e5ea4a0b8f010216b8da",
-                "reference": "1edeee4a77f467293aa5e5ea4a0b8f010216b8da",
+                "url": "https://api.github.com/repos/davejamesmiller/laravel-breadcrumbs/zipball/40a73bc9b32fbbee18938dc92228dea161365245",
+                "reference": "40a73bc9b32fbbee18938dc92228dea161365245",
                 "shasum": ""
             },
             "require": {
@@ -458,7 +458,7 @@
             "keywords": [
                 "laravel"
             ],
-            "time": "2019-09-03T15:24:57+00:00"
+            "time": "2019-10-20T18:25:39+00:00"
         },
         {
             "name": "defuse/php-encryption",
@@ -1522,16 +1522,16 @@
         },
         {
             "name": "laravel/passport",
-            "version": "v7.5.0",
+            "version": "v7.5.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/laravel/passport.git",
-                "reference": "663e720a6d15e8ec70bf5309f774439a110efc89"
+                "reference": "d63cdd672c3d65b3c35b73d0ef13a9dbfcb71c08"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/laravel/passport/zipball/663e720a6d15e8ec70bf5309f774439a110efc89",
-                "reference": "663e720a6d15e8ec70bf5309f774439a110efc89",
+                "url": "https://api.github.com/repos/laravel/passport/zipball/d63cdd672c3d65b3c35b73d0ef13a9dbfcb71c08",
+                "reference": "d63cdd672c3d65b3c35b73d0ef13a9dbfcb71c08",
                 "shasum": ""
             },
             "require": {
@@ -1589,7 +1589,7 @@
                 "oauth",
                 "passport"
             ],
-            "time": "2019-09-24T20:59:35+00:00"
+            "time": "2019-10-08T16:45:24+00:00"
         },
         {
             "name": "laravelcollective/html",
@@ -1786,16 +1786,16 @@
         },
         {
             "name": "league/csv",
-            "version": "9.4.0",
+            "version": "9.4.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/thephpleague/csv.git",
-                "reference": "e7225b6cc853942caef1c9c4d8889b716c34bc04"
+                "reference": "bf83acc23a7d60978fce36a384f97bf9d7d2ea0c"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/thephpleague/csv/zipball/e7225b6cc853942caef1c9c4d8889b716c34bc04",
-                "reference": "e7225b6cc853942caef1c9c4d8889b716c34bc04",
+                "url": "https://api.github.com/repos/thephpleague/csv/zipball/bf83acc23a7d60978fce36a384f97bf9d7d2ea0c",
+                "reference": "bf83acc23a7d60978fce36a384f97bf9d7d2ea0c",
                 "shasum": ""
             },
             "require": {
@@ -1851,7 +1851,7 @@
                 "read",
                 "write"
             ],
-            "time": "2019-10-02T18:32:54+00:00"
+            "time": "2019-10-17T06:05:32+00:00"
         },
         {
             "name": "league/event",
@@ -1905,16 +1905,16 @@
         },
         {
             "name": "league/flysystem",
-            "version": "1.0.55",
+            "version": "1.0.57",
             "source": {
                 "type": "git",
                 "url": "https://github.com/thephpleague/flysystem.git",
-                "reference": "33c91155537c6dc899eacdc54a13ac6303f156e6"
+                "reference": "0e9db7f0b96b9f12dcf6f65bc34b72b1a30ea55a"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/33c91155537c6dc899eacdc54a13ac6303f156e6",
-                "reference": "33c91155537c6dc899eacdc54a13ac6303f156e6",
+                "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/0e9db7f0b96b9f12dcf6f65bc34b72b1a30ea55a",
+                "reference": "0e9db7f0b96b9f12dcf6f65bc34b72b1a30ea55a",
                 "shasum": ""
             },
             "require": {
@@ -1985,7 +1985,7 @@
                 "sftp",
                 "storage"
             ],
-            "time": "2019-08-24T11:17:19+00:00"
+            "time": "2019-10-16T21:01:05+00:00"
         },
         {
             "name": "league/flysystem-replicate-adapter",
@@ -2035,16 +2035,16 @@
         },
         {
             "name": "league/flysystem-sftp",
-            "version": "1.0.21",
+            "version": "1.0.22",
             "source": {
                 "type": "git",
                 "url": "https://github.com/thephpleague/flysystem-sftp.git",
-                "reference": "4c2f2fcc4da251127c315d37eb3dfa5e94658df0"
+                "reference": "cab59dd2277e02fe46f5f23195672a02ed49774d"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/thephpleague/flysystem-sftp/zipball/4c2f2fcc4da251127c315d37eb3dfa5e94658df0",
-                "reference": "4c2f2fcc4da251127c315d37eb3dfa5e94658df0",
+                "url": "https://api.github.com/repos/thephpleague/flysystem-sftp/zipball/cab59dd2277e02fe46f5f23195672a02ed49774d",
+                "reference": "cab59dd2277e02fe46f5f23195672a02ed49774d",
                 "shasum": ""
             },
             "require": {
@@ -2073,7 +2073,7 @@
                 }
             ],
             "description": "Flysystem adapter for SFTP",
-            "time": "2019-09-19T09:11:05+00:00"
+            "time": "2019-10-16T20:05:49+00:00"
         },
         {
             "name": "league/fractal",
@@ -2372,16 +2372,16 @@
         },
         {
             "name": "nesbot/carbon",
-            "version": "2.25.0",
+            "version": "2.25.3",
             "source": {
                 "type": "git",
                 "url": "https://github.com/briannesbitt/Carbon.git",
-                "reference": "b70da677101cca7b584c7489770d2677c2733593"
+                "reference": "d07636581795383e2fea2d711212d30f941f2039"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/b70da677101cca7b584c7489770d2677c2733593",
-                "reference": "b70da677101cca7b584c7489770d2677c2733593",
+                "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/d07636581795383e2fea2d711212d30f941f2039",
+                "reference": "d07636581795383e2fea2d711212d30f941f2039",
                 "shasum": ""
             },
             "require": {
@@ -2435,20 +2435,20 @@
                 "datetime",
                 "time"
             ],
-            "time": "2019-09-30T16:22:22+00:00"
+            "time": "2019-10-20T11:05:44+00:00"
         },
         {
             "name": "opis/closure",
-            "version": "3.4.0",
+            "version": "3.4.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/opis/closure.git",
-                "reference": "60a97fff133b1669a5b1776aa8ab06db3f3962b7"
+                "reference": "e79f851749c3caa836d7ccc01ede5828feb762c7"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/opis/closure/zipball/60a97fff133b1669a5b1776aa8ab06db3f3962b7",
-                "reference": "60a97fff133b1669a5b1776aa8ab06db3f3962b7",
+                "url": "https://api.github.com/repos/opis/closure/zipball/e79f851749c3caa836d7ccc01ede5828feb762c7",
+                "reference": "e79f851749c3caa836d7ccc01ede5828feb762c7",
                 "shasum": ""
             },
             "require": {
@@ -2496,7 +2496,7 @@
                 "serialization",
                 "serialize"
             ],
-            "time": "2019-09-02T21:07:33+00:00"
+            "time": "2019-10-19T18:38:51+00:00"
         },
         {
             "name": "paragonie/constant_time_encoding",
@@ -2749,16 +2749,16 @@
         },
         {
             "name": "pragmarx/google2fa",
-            "version": "v6.1.0",
+            "version": "v7.0.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/antonioribeiro/google2fa.git",
-                "reference": "0ea122e0d1ba197e867888a623059ae1a7fe43b6"
+                "reference": "0afb47f8a686bd203fe85a05bab85139f3c1971e"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/antonioribeiro/google2fa/zipball/0ea122e0d1ba197e867888a623059ae1a7fe43b6",
-                "reference": "0ea122e0d1ba197e867888a623059ae1a7fe43b6",
+                "url": "https://api.github.com/repos/antonioribeiro/google2fa/zipball/0afb47f8a686bd203fe85a05bab85139f3c1971e",
+                "reference": "0afb47f8a686bd203fe85a05bab85139f3c1971e",
                 "shasum": ""
             },
             "require": {
@@ -2801,7 +2801,7 @@
                 "Two Factor Authentication",
                 "google2fa"
             ],
-            "time": "2019-09-23T18:30:35+00:00"
+            "time": "2019-10-21T17:49:22+00:00"
         },
         {
             "name": "pragmarx/google2fa-laravel",
@@ -3563,16 +3563,16 @@
         },
         {
             "name": "symfony/console",
-            "version": "v4.3.4",
+            "version": "v4.3.5",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/console.git",
-                "reference": "de63799239b3881b8a08f8481b22348f77ed7b36"
+                "reference": "929ddf360d401b958f611d44e726094ab46a7369"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/console/zipball/de63799239b3881b8a08f8481b22348f77ed7b36",
-                "reference": "de63799239b3881b8a08f8481b22348f77ed7b36",
+                "url": "https://api.github.com/repos/symfony/console/zipball/929ddf360d401b958f611d44e726094ab46a7369",
+                "reference": "929ddf360d401b958f611d44e726094ab46a7369",
                 "shasum": ""
             },
             "require": {
@@ -3634,20 +3634,20 @@
             ],
             "description": "Symfony Console Component",
             "homepage": "https://symfony.com",
-            "time": "2019-08-26T08:26:39+00:00"
+            "time": "2019-10-07T12:36:49+00:00"
         },
         {
             "name": "symfony/css-selector",
-            "version": "v4.3.4",
+            "version": "v4.3.5",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/css-selector.git",
-                "reference": "c6e5e2a00db768c92c3ae131532af4e1acc7bd03"
+                "reference": "f4b3ff6a549d9ed28b2b0ecd1781bf67cf220ee9"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/css-selector/zipball/c6e5e2a00db768c92c3ae131532af4e1acc7bd03",
-                "reference": "c6e5e2a00db768c92c3ae131532af4e1acc7bd03",
+                "url": "https://api.github.com/repos/symfony/css-selector/zipball/f4b3ff6a549d9ed28b2b0ecd1781bf67cf220ee9",
+                "reference": "f4b3ff6a549d9ed28b2b0ecd1781bf67cf220ee9",
                 "shasum": ""
             },
             "require": {
@@ -3687,20 +3687,20 @@
             ],
             "description": "Symfony CssSelector Component",
             "homepage": "https://symfony.com",
-            "time": "2019-08-20T14:07:54+00:00"
+            "time": "2019-10-02T08:36:26+00:00"
         },
         {
             "name": "symfony/debug",
-            "version": "v4.3.4",
+            "version": "v4.3.5",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/debug.git",
-                "reference": "afcdea44a2e399c1e4b52246ec8d54c715393ced"
+                "reference": "cc5c1efd0edfcfd10b354750594a46b3dd2afbbe"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/debug/zipball/afcdea44a2e399c1e4b52246ec8d54c715393ced",
-                "reference": "afcdea44a2e399c1e4b52246ec8d54c715393ced",
+                "url": "https://api.github.com/repos/symfony/debug/zipball/cc5c1efd0edfcfd10b354750594a46b3dd2afbbe",
+                "reference": "cc5c1efd0edfcfd10b354750594a46b3dd2afbbe",
                 "shasum": ""
             },
             "require": {
@@ -3743,20 +3743,20 @@
             ],
             "description": "Symfony Debug Component",
             "homepage": "https://symfony.com",
-            "time": "2019-08-20T14:27:59+00:00"
+            "time": "2019-09-19T15:51:53+00:00"
         },
         {
             "name": "symfony/event-dispatcher",
-            "version": "v4.3.4",
+            "version": "v4.3.5",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/event-dispatcher.git",
-                "reference": "429d0a1451d4c9c4abe1959b2986b88794b9b7d2"
+                "reference": "6229f58993e5a157f6096fc7145c0717d0be8807"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/429d0a1451d4c9c4abe1959b2986b88794b9b7d2",
-                "reference": "429d0a1451d4c9c4abe1959b2986b88794b9b7d2",
+                "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/6229f58993e5a157f6096fc7145c0717d0be8807",
+                "reference": "6229f58993e5a157f6096fc7145c0717d0be8807",
                 "shasum": ""
             },
             "require": {
@@ -3813,20 +3813,20 @@
             ],
             "description": "Symfony EventDispatcher Component",
             "homepage": "https://symfony.com",
-            "time": "2019-08-26T08:55:16+00:00"
+            "time": "2019-10-01T16:40:32+00:00"
         },
         {
             "name": "symfony/event-dispatcher-contracts",
-            "version": "v1.1.5",
+            "version": "v1.1.7",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/event-dispatcher-contracts.git",
-                "reference": "c61766f4440ca687de1084a5c00b08e167a2575c"
+                "reference": "c43ab685673fb6c8d84220c77897b1d6cdbe1d18"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/c61766f4440ca687de1084a5c00b08e167a2575c",
-                "reference": "c61766f4440ca687de1084a5c00b08e167a2575c",
+                "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/c43ab685673fb6c8d84220c77897b1d6cdbe1d18",
+                "reference": "c43ab685673fb6c8d84220c77897b1d6cdbe1d18",
                 "shasum": ""
             },
             "require": {
@@ -3871,20 +3871,20 @@
                 "interoperability",
                 "standards"
             ],
-            "time": "2019-06-20T06:46:26+00:00"
+            "time": "2019-09-17T09:54:03+00:00"
         },
         {
             "name": "symfony/finder",
-            "version": "v4.3.4",
+            "version": "v4.3.5",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/finder.git",
-                "reference": "86c1c929f0a4b24812e1eb109262fc3372c8e9f2"
+                "reference": "5e575faa95548d0586f6bedaeabec259714e44d1"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/finder/zipball/86c1c929f0a4b24812e1eb109262fc3372c8e9f2",
-                "reference": "86c1c929f0a4b24812e1eb109262fc3372c8e9f2",
+                "url": "https://api.github.com/repos/symfony/finder/zipball/5e575faa95548d0586f6bedaeabec259714e44d1",
+                "reference": "5e575faa95548d0586f6bedaeabec259714e44d1",
                 "shasum": ""
             },
             "require": {
@@ -3920,20 +3920,20 @@
             ],
             "description": "Symfony Finder Component",
             "homepage": "https://symfony.com",
-            "time": "2019-08-14T12:26:46+00:00"
+            "time": "2019-09-16T11:29:48+00:00"
         },
         {
             "name": "symfony/http-foundation",
-            "version": "v4.3.4",
+            "version": "v4.3.5",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/http-foundation.git",
-                "reference": "d804bea118ff340a12e22a79f9c7e7eb56b35adc"
+                "reference": "76590ced16d4674780863471bae10452b79210a5"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/http-foundation/zipball/d804bea118ff340a12e22a79f9c7e7eb56b35adc",
-                "reference": "d804bea118ff340a12e22a79f9c7e7eb56b35adc",
+                "url": "https://api.github.com/repos/symfony/http-foundation/zipball/76590ced16d4674780863471bae10452b79210a5",
+                "reference": "76590ced16d4674780863471bae10452b79210a5",
                 "shasum": ""
             },
             "require": {
@@ -3975,20 +3975,20 @@
             ],
             "description": "Symfony HttpFoundation Component",
             "homepage": "https://symfony.com",
-            "time": "2019-08-26T08:55:16+00:00"
+            "time": "2019-10-04T19:48:13+00:00"
         },
         {
             "name": "symfony/http-kernel",
-            "version": "v4.3.4",
+            "version": "v4.3.5",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/http-kernel.git",
-                "reference": "5e0fc71be03d52cd00c423061cfd300bd6f92a52"
+                "reference": "5f08141850932e8019c01d8988bf3ed6367d2991"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/http-kernel/zipball/5e0fc71be03d52cd00c423061cfd300bd6f92a52",
-                "reference": "5e0fc71be03d52cd00c423061cfd300bd6f92a52",
+                "url": "https://api.github.com/repos/symfony/http-kernel/zipball/5f08141850932e8019c01d8988bf3ed6367d2991",
+                "reference": "5f08141850932e8019c01d8988bf3ed6367d2991",
                 "shasum": ""
             },
             "require": {
@@ -4067,20 +4067,20 @@
             ],
             "description": "Symfony HttpKernel Component",
             "homepage": "https://symfony.com",
-            "time": "2019-08-26T16:47:42+00:00"
+            "time": "2019-10-07T15:06:41+00:00"
         },
         {
             "name": "symfony/mime",
-            "version": "v4.3.4",
+            "version": "v4.3.5",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/mime.git",
-                "reference": "987a05df1c6ac259b34008b932551353f4f408df"
+                "reference": "32f71570547b91879fdbd9cf50317d556ae86916"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/mime/zipball/987a05df1c6ac259b34008b932551353f4f408df",
-                "reference": "987a05df1c6ac259b34008b932551353f4f408df",
+                "url": "https://api.github.com/repos/symfony/mime/zipball/32f71570547b91879fdbd9cf50317d556ae86916",
+                "reference": "32f71570547b91879fdbd9cf50317d556ae86916",
                 "shasum": ""
             },
             "require": {
@@ -4126,7 +4126,7 @@
                 "mime",
                 "mime-type"
             ],
-            "time": "2019-08-22T08:16:11+00:00"
+            "time": "2019-09-19T17:00:15+00:00"
         },
         {
             "name": "symfony/polyfill-ctype",
@@ -4589,16 +4589,16 @@
         },
         {
             "name": "symfony/process",
-            "version": "v4.3.4",
+            "version": "v4.3.5",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/process.git",
-                "reference": "e89969c00d762349f078db1128506f7f3dcc0d4a"
+                "reference": "50556892f3cc47d4200bfd1075314139c4c9ff4b"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/process/zipball/e89969c00d762349f078db1128506f7f3dcc0d4a",
-                "reference": "e89969c00d762349f078db1128506f7f3dcc0d4a",
+                "url": "https://api.github.com/repos/symfony/process/zipball/50556892f3cc47d4200bfd1075314139c4c9ff4b",
+                "reference": "50556892f3cc47d4200bfd1075314139c4c9ff4b",
                 "shasum": ""
             },
             "require": {
@@ -4634,7 +4634,7 @@
             ],
             "description": "Symfony Process Component",
             "homepage": "https://symfony.com",
-            "time": "2019-08-26T08:26:39+00:00"
+            "time": "2019-09-26T21:17:10+00:00"
         },
         {
             "name": "symfony/psr-http-message-bridge",
@@ -4703,16 +4703,16 @@
         },
         {
             "name": "symfony/routing",
-            "version": "v4.3.4",
+            "version": "v4.3.5",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/routing.git",
-                "reference": "ff1049f6232dc5b6023b1ff1c6de56f82bcd264f"
+                "reference": "3b174ef04fe66696524efad1e5f7a6c663d822ea"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/routing/zipball/ff1049f6232dc5b6023b1ff1c6de56f82bcd264f",
-                "reference": "ff1049f6232dc5b6023b1ff1c6de56f82bcd264f",
+                "url": "https://api.github.com/repos/symfony/routing/zipball/3b174ef04fe66696524efad1e5f7a6c663d822ea",
+                "reference": "3b174ef04fe66696524efad1e5f7a6c663d822ea",
                 "shasum": ""
             },
             "require": {
@@ -4775,20 +4775,20 @@
                 "uri",
                 "url"
             ],
-            "time": "2019-08-26T08:26:39+00:00"
+            "time": "2019-10-04T20:57:10+00:00"
         },
         {
             "name": "symfony/service-contracts",
-            "version": "v1.1.6",
+            "version": "v1.1.7",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/service-contracts.git",
-                "reference": "ea7263d6b6d5f798b56a45a5b8d686725f2719a3"
+                "reference": "ffcde9615dc5bb4825b9f6aed07716f1f57faae0"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/service-contracts/zipball/ea7263d6b6d5f798b56a45a5b8d686725f2719a3",
-                "reference": "ea7263d6b6d5f798b56a45a5b8d686725f2719a3",
+                "url": "https://api.github.com/repos/symfony/service-contracts/zipball/ffcde9615dc5bb4825b9f6aed07716f1f57faae0",
+                "reference": "ffcde9615dc5bb4825b9f6aed07716f1f57faae0",
                 "shasum": ""
             },
             "require": {
@@ -4833,20 +4833,20 @@
                 "interoperability",
                 "standards"
             ],
-            "time": "2019-08-20T14:44:19+00:00"
+            "time": "2019-09-17T11:12:18+00:00"
         },
         {
             "name": "symfony/translation",
-            "version": "v4.3.4",
+            "version": "v4.3.5",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/translation.git",
-                "reference": "28498169dd334095fa981827992f3a24d50fed0f"
+                "reference": "fe6193b066c457c144333c06aaa869a2d42a167f"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/translation/zipball/28498169dd334095fa981827992f3a24d50fed0f",
-                "reference": "28498169dd334095fa981827992f3a24d50fed0f",
+                "url": "https://api.github.com/repos/symfony/translation/zipball/fe6193b066c457c144333c06aaa869a2d42a167f",
+                "reference": "fe6193b066c457c144333c06aaa869a2d42a167f",
                 "shasum": ""
             },
             "require": {
@@ -4909,20 +4909,20 @@
             ],
             "description": "Symfony Translation Component",
             "homepage": "https://symfony.com",
-            "time": "2019-08-26T08:55:16+00:00"
+            "time": "2019-09-27T14:37:39+00:00"
         },
         {
             "name": "symfony/translation-contracts",
-            "version": "v1.1.6",
+            "version": "v1.1.7",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/translation-contracts.git",
-                "reference": "325b17c24f3ee23cbecfa63ba809c6d89b5fa04a"
+                "reference": "364518c132c95642e530d9b2d217acbc2ccac3e6"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/325b17c24f3ee23cbecfa63ba809c6d89b5fa04a",
-                "reference": "325b17c24f3ee23cbecfa63ba809c6d89b5fa04a",
+                "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/364518c132c95642e530d9b2d217acbc2ccac3e6",
+                "reference": "364518c132c95642e530d9b2d217acbc2ccac3e6",
                 "shasum": ""
             },
             "require": {
@@ -4966,20 +4966,20 @@
                 "interoperability",
                 "standards"
             ],
-            "time": "2019-08-02T12:15:04+00:00"
+            "time": "2019-09-17T11:12:18+00:00"
         },
         {
             "name": "symfony/var-dumper",
-            "version": "v4.3.4",
+            "version": "v4.3.5",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/var-dumper.git",
-                "reference": "641043e0f3e615990a0f29479f9c117e8a6698c6"
+                "reference": "bde8957fc415fdc6964f33916a3755737744ff05"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/var-dumper/zipball/641043e0f3e615990a0f29479f9c117e8a6698c6",
-                "reference": "641043e0f3e615990a0f29479f9c117e8a6698c6",
+                "url": "https://api.github.com/repos/symfony/var-dumper/zipball/bde8957fc415fdc6964f33916a3755737744ff05",
+                "reference": "bde8957fc415fdc6964f33916a3755737744ff05",
                 "shasum": ""
             },
             "require": {
@@ -5042,20 +5042,20 @@
                 "debug",
                 "dump"
             ],
-            "time": "2019-08-26T08:26:39+00:00"
+            "time": "2019-10-04T19:48:13+00:00"
         },
         {
             "name": "tightenco/collect",
-            "version": "v6.1.0",
+            "version": "v6.3.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/tightenco/collect.git",
-                "reference": "8f56fad98222f8fe8c008cbae449f687e331444a"
+                "reference": "7f3f798cb71aa509f5d6e0d1b8f5f4ae0e510869"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/tightenco/collect/zipball/8f56fad98222f8fe8c008cbae449f687e331444a",
-                "reference": "8f56fad98222f8fe8c008cbae449f687e331444a",
+                "url": "https://api.github.com/repos/tightenco/collect/zipball/7f3f798cb71aa509f5d6e0d1b8f5f4ae0e510869",
+                "reference": "7f3f798cb71aa509f5d6e0d1b8f5f4ae0e510869",
                 "shasum": ""
             },
             "require": {
@@ -5084,7 +5084,7 @@
             "authors": [
                 {
                     "name": "Taylor Otwell",
-                    "email": "taylorotwell@gmail.com"
+                    "email": "taylor@laravel.com"
                 }
             ],
             "description": "Collect - Illuminate Collections as a separate package.",
@@ -5092,7 +5092,7 @@
                 "collection",
                 "laravel"
             ],
-            "time": "2019-10-02T19:55:13+00:00"
+            "time": "2019-10-05T20:15:22+00:00"
         },
         {
             "name": "tijsverkoyen/css-to-inline-styles",
@@ -5266,16 +5266,16 @@
         },
         {
             "name": "zendframework/zend-diactoros",
-            "version": "2.1.3",
+            "version": "2.1.5",
             "source": {
                 "type": "git",
                 "url": "https://github.com/zendframework/zend-diactoros.git",
-                "reference": "279723778c40164bcf984a2df12ff2c6ec5e61c1"
+                "reference": "6dcf9e760a6b476f3e9d80abbc9ce9c4aa921f9c"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/zendframework/zend-diactoros/zipball/279723778c40164bcf984a2df12ff2c6ec5e61c1",
-                "reference": "279723778c40164bcf984a2df12ff2c6ec5e61c1",
+                "url": "https://api.github.com/repos/zendframework/zend-diactoros/zipball/6dcf9e760a6b476f3e9d80abbc9ce9c4aa921f9c",
+                "reference": "6dcf9e760a6b476f3e9d80abbc9ce9c4aa921f9c",
                 "shasum": ""
             },
             "require": {
@@ -5288,6 +5288,7 @@
                 "psr/http-message-implementation": "1.0"
             },
             "require-dev": {
+                "ext-curl": "*",
                 "ext-dom": "*",
                 "ext-libxml": "*",
                 "http-interop/http-factory-tests": "^0.5.0",
@@ -5328,7 +5329,7 @@
                 "psr",
                 "psr-7"
             ],
-            "time": "2019-07-10T16:13:25+00:00"
+            "time": "2019-10-10T17:38:20+00:00"
         }
     ],
     "packages-dev": [
@@ -6019,23 +6020,23 @@
         },
         {
             "name": "justinrainbow/json-schema",
-            "version": "5.2.8",
+            "version": "5.2.9",
             "source": {
                 "type": "git",
                 "url": "https://github.com/justinrainbow/json-schema.git",
-                "reference": "dcb6e1006bb5fd1e392b4daa68932880f37550d4"
+                "reference": "44c6787311242a979fa15c704327c20e7221a0e4"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/dcb6e1006bb5fd1e392b4daa68932880f37550d4",
-                "reference": "dcb6e1006bb5fd1e392b4daa68932880f37550d4",
+                "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/44c6787311242a979fa15c704327c20e7221a0e4",
+                "reference": "44c6787311242a979fa15c704327c20e7221a0e4",
                 "shasum": ""
             },
             "require": {
                 "php": ">=5.3.3"
             },
             "require-dev": {
-                "friendsofphp/php-cs-fixer": "~2.2.20",
+                "friendsofphp/php-cs-fixer": "~2.2.20||~2.15.1",
                 "json-schema/json-schema-test-suite": "1.2.0",
                 "phpunit/phpunit": "^4.8.35"
             },
@@ -6081,7 +6082,7 @@
                 "json",
                 "schema"
             ],
-            "time": "2019-01-14T23:55:14+00:00"
+            "time": "2019-09-25T14:49:45+00:00"
         },
         {
             "name": "mockery/mockery",
@@ -6765,16 +6766,16 @@
         },
         {
             "name": "phpunit/phpunit",
-            "version": "8.4.0",
+            "version": "8.4.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/phpunit.git",
-                "reference": "57e5e77b62086033528ee1f4063ae03035f57894"
+                "reference": "366a4a0f2b971fd43b7c351d621e8dd7d7131869"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/57e5e77b62086033528ee1f4063ae03035f57894",
-                "reference": "57e5e77b62086033528ee1f4063ae03035f57894",
+                "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/366a4a0f2b971fd43b7c351d621e8dd7d7131869",
+                "reference": "366a4a0f2b971fd43b7c351d621e8dd7d7131869",
                 "shasum": ""
             },
             "require": {
@@ -6844,7 +6845,7 @@
                 "testing",
                 "xunit"
             ],
-            "time": "2019-10-04T03:12:25+00:00"
+            "time": "2019-10-07T12:57:41+00:00"
         },
         {
             "name": "roave/security-advisories",
@@ -6852,12 +6853,12 @@
             "source": {
                 "type": "git",
                 "url": "https://github.com/Roave/SecurityAdvisories.git",
-                "reference": "3a9ab646603efdccb4f7c4acbb3b36974ef257d8"
+                "reference": "eb59d9f35a47f567ae15e7179d7c666489cd4b85"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/3a9ab646603efdccb4f7c4acbb3b36974ef257d8",
-                "reference": "3a9ab646603efdccb4f7c4acbb3b36974ef257d8",
+                "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/eb59d9f35a47f567ae15e7179d7c666489cd4b85",
+                "reference": "eb59d9f35a47f567ae15e7179d7c666489cd4b85",
                 "shasum": ""
             },
             "conflict": {
@@ -6880,7 +6881,6 @@
                 "contao/core": ">=2,<3.5.39",
                 "contao/core-bundle": ">=4,<4.4.39|>=4.5,<4.7.5",
                 "contao/listing-bundle": ">=4,<4.4.8",
-                "contao/newsletter-bundle": ">=4,<4.1",
                 "datadog/dd-trace": ">=0.30,<0.30.2",
                 "david-garcia/phpwhois": "<=4.3.1",
                 "doctrine/annotations": ">=1,<1.2.7",
@@ -6924,9 +6924,9 @@
                 "laravel/framework": ">=4,<4.0.99|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.42|>=5.6,<5.6.30",
                 "laravel/socialite": ">=1,<1.0.99|>=2,<2.0.10",
                 "league/commonmark": "<0.18.3",
-                "magento/magento1ce": "<1.9.4.1",
-                "magento/magento1ee": ">=1.9,<1.14.4.1",
-                "magento/product-community-edition": ">=2,<2.2.8|>=2.3,<2.3.1",
+                "magento/magento1ce": "<1.9.4.3",
+                "magento/magento1ee": ">=1,<1.14.4.3",
+                "magento/product-community-edition": ">=2,<2.2.10|>=2.3,<2.3.3",
                 "monolog/monolog": ">=1.8,<1.12",
                 "namshi/jose": "<2.2",
                 "onelogin/php-saml": "<2.10.4",
@@ -7061,7 +7061,7 @@
                 }
             ],
             "description": "Prevents installation of composer packages with known security vulnerabilities: no API, simply require it",
-            "time": "2019-09-26T17:56:56+00:00"
+            "time": "2019-10-09T14:04:58+00:00"
         },
         {
             "name": "sebastian/code-unit-reverse-lookup",
@@ -7773,7 +7773,7 @@
         },
         {
             "name": "symfony/filesystem",
-            "version": "v4.3.4",
+            "version": "v4.3.5",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/filesystem.git",
diff --git a/config/app.php b/config/app.php
index ea73a65bbf..3071573b6f 100644
--- a/config/app.php
+++ b/config/app.php
@@ -27,7 +27,7 @@ use FireflyIII\Providers\ImportServiceProvider;
 
 return [
     'name'            => envNonEmpty('APP_NAME', 'Firefly III'),
-    'env'             => envNonEmpty('APP_ENV', 'production'),
+    'env'             => envNonEmpty('APP_ENV', 'local'),
     'debug'           => env('APP_DEBUG', false),
     'url'             => envNonEmpty('APP_URL', 'http://localhost'),
     'timezone'        => envNonEmpty('TZ', 'UTC'),
diff --git a/config/cache.php b/config/cache.php
index 7f1f21a20e..8abfc242ef 100644
--- a/config/cache.php
+++ b/config/cache.php
@@ -84,7 +84,7 @@ return [
             'servers'       => [
                 [
                     'host'   => env('MEMCACHED_HOST', '127.0.0.1'),
-                    'port'   => env('MEMCACHED_PORT', 11211),
+                    'port'   => (int)env('MEMCACHED_PORT', 11211),
                     'weight' => 100,
                 ],
             ],
diff --git a/config/firefly.php b/config/firefly.php
index 48fa70d169..2704e28a71 100644
--- a/config/firefly.php
+++ b/config/firefly.php
@@ -125,8 +125,8 @@ return [
         'is_demo_site'     => false,
     ],
     'encryption'                   => null === env('USE_ENCRYPTION') || env('USE_ENCRYPTION') === true,
-    'version'                      => '4.8.1.4',
-    'api_version'                  => '0.10.3',
+    'version'                      => '4.8.1.5',
+    'api_version'                  => '0.10.4',
     'db_version'                   => 11,
     'maxUploadSize'                => 15242880,
     'send_error_message'           => env('SEND_ERROR_MESSAGE', true),
@@ -135,7 +135,6 @@ return [
     'demo_username'                => env('DEMO_USERNAME', ''),
     'demo_password'                => env('DEMO_PASSWORD', ''),
     'is_sandstorm'                 => env('IS_SANDSTORM', 'unknown'),
-    'is_docker'                    => env('IS_DOCKER', 'unknown'),
     'bunq_use_sandbox'             => env('BUNQ_USE_SANDBOX', false),
     'fixer_api_key'                => env('FIXER_API_KEY', ''),
     'mapbox_api_key'               => env('MAPBOX_API_KEY', ''),
@@ -519,8 +518,8 @@ return [
     'default_currency'          => 'EUR',
     'default_language'          => 'en_US',
     'search_modifiers'          => ['amount_is', 'amount', 'amount_max', 'amount_min', 'amount_less', 'amount_more', 'source', 'destination', 'category',
-                                    'budget', 'bill', 'type', 'date', 'date_before', 'date_after', 'on', 'before', 'after', 'from', 'to', 'tag', 'created_at',
-                                    'updated_at'],
+                                    'budget', 'bill', 'type', 'date', 'date_before', 'date_after', 'on', 'before', 'after', 'from', 'to', 'tag', 'created_on',
+                                    'updated_on'],
     // TODO notes has_attachments
 
     'cer_providers'             => [
diff --git a/package.json b/package.json
index 844e314d26..1520c98975 100755
--- a/package.json
+++ b/package.json
@@ -22,6 +22,7 @@
         "@johmun/vue-tags-input": "^2.0.1",
         "font-awesome": "^4.7.0",
         "jquery": "^3.1.1",
-        "uiv": "^0.31.5"
+        "uiv": "^0.31.5",
+        "vue-i18n": "^8.14.1"
     }
 }
diff --git a/public/v1/js/app.js b/public/v1/js/app.js
index e8de5cf27e..c8555c325b 100644
--- a/public/v1/js/app.js
+++ b/public/v1/js/app.js
@@ -1 +1 @@
-!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s=17)}([function(t,e,n){"use strict";var r=n(10),i=n(24),o=Object.prototype.toString;function a(t){return"[object Array]"===o.call(t)}function s(t){return null!==t&&"object"==typeof t}function c(t){return"[object Function]"===o.call(t)}function u(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),a(t))for(var n=0,r=t.length;n=200&&t<300}};c.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],function(t){c.headers[t]={}}),r.forEach(["post","put","patch"],function(t){c.headers[t]=r.merge(o)}),t.exports=c}).call(this,n(11))},function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n=function(t,e){var n=t[1]||"",r=t[3];if(!r)return n;if(e&&"function"==typeof btoa){var i=(a=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),o=r.sources.map(function(t){return"/*# sourceURL="+r.sourceRoot+t+" */"});return[n].concat(o).concat([i]).join("\n")}var a;return[n].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n}).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},i=0;i=0&&l.splice(e,1)}function m(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var r=function(){0;return n.nc}();r&&(t.attrs.nonce=r)}return g(e,t.attrs),h(t,e),e}function g(t,e){Object.keys(e).forEach(function(n){t.setAttribute(n,e[n])})}function y(t,e){var n,r,i,o;if(e.transform&&t.css){if(!(o="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=o}if(e.singleton){var a=u++;n=c||(c=m(e)),r=b.bind(null,n,a,!1),i=b.bind(null,n,a,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",g(e,t.attrs),h(t,e),e}(e),r=function(t,e,n){var r=n.css,i=n.sourceMap,o=void 0===e.convertToAbsoluteUrls&&i;(e.convertToAbsoluteUrls||o)&&(r=f(r));i&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var a=new Blob([r],{type:"text/css"}),s=t.href;t.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n,e),i=function(){v(n),n.href&&URL.revokeObjectURL(n.href)}):(n=m(e),r=function(t,e){var n=e.css,r=e.media;r&&t.setAttribute("media",r);if(t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,n),i=function(){v(n)});return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else i()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=a()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=p(t,e);return d(n,e),function(t){for(var r=[],i=0;i1)for(var n=1;nn.parts.length&&(r.parts.length=n.parts.length)}else{var a=[];for(i=0;i div[data-v-61d92e31] {\n  cursor: pointer;\n  padding: 3px 6px;\n  width: 100%;\n}\n.ti-selected-item[data-v-61d92e31] {\n  background-color: #5C6BC0;\n  color: #fff;\n}\n',"",{version:3,sources:["C:/Users/johan/dev/vue-tags-input/vue-tags-input/C:/Users/johan/dev/vue-tags-input/vue-tags-input/vue-tags-input.scss"],names:[],mappings:"AAAA;EACE,uBAAuB;EACvB,mCAA8C;EAC9C,+JAAuM;EACvM,oBAAoB;EACpB,mBAAmB;CAAE;AAEvB;EACE,kCAAkC;EAClC,YAAY;EACZ,mBAAmB;EACnB,oBAAoB;EACpB,qBAAqB;EACrB,qBAAqB;EACrB,eAAe;EACf,oCAAoC;EACpC,mCAAmC;CAAE;AAEvC;EACE,iBAAiB;CAAE;AAErB;EACE,iBAAiB;CAAE;AAErB;EACE,iBAAiB;CAAE;AAErB;EACE,YAAY;EACZ,aAAa;EACb,sBAAsB;CAAE;AAE1B;EACE,uBAAuB;CAAE;AAE3B;EACE,cAAc;CAAE;AAElB;EACE,8BAA8B;CAAE;AAElC;EACE,iBAAiB;EACjB,mBAAmB;EACnB,uBAAuB;CAAE;AAE3B;EACE,aAAa;CAAE;AACf;IACE,gBAAgB;CAAE;AAEtB;EACE,uBAAuB;EACvB,cAAc;EACd,aAAa;EACb,gBAAgB;CAAE;AAEpB;EACE,cAAc;EACd,gBAAgB;EAChB,YAAY;EACZ,iBAAiB;CAAE;AAErB;EACE,0BAA0B;EAC1B,YAAY;EACZ,mBAAmB;EACnB,cAAc;EACd,iBAAiB;EACjB,YAAY;EACZ,iBAAiB;CAAE;AACnB;IACE,cAAc;CAAE;AAClB;IACE,cAAc;IACd,oBAAoB;CAAE;AACxB;IACE,mBAAmB;CAAE;AACvB;IACE,mBAAmB;CAAE;AACvB;IACE,mBAAmB;IACnB,mBAAmB;IACnB,YAAY;IACZ,iBAAiB;CAAE;AACrB;IACE,iBAAiB;IACjB,cAAc;IACd,oBAAoB;IACpB,kBAAkB;CAAE;AACpB;MACE,gBAAgB;CAAE;AACtB;IACE,kBAAkB;CAAE;AACtB;IACE,0BAA0B;CAAE;AAEhC;EACE,cAAc;EACd,eAAe;EACf,iBAAiB;EACjB,YAAY;EACZ,iBAAiB;CAAE;AACnB;IACE,eAAe;IACf,iBAAiB;IACjB,aAAa;IACb,aAAa;IACb,YAAY;CAAE;AAElB;EACE,qBAAqB;CAAE;AAEzB;EACE,uBAAuB;EACvB,iBAAiB;EACjB,mBAAmB;EACnB,YAAY;EACZ,uBAAuB;EACvB,YAAY;CAAE;AAEhB;EACE,gBAAgB;EAChB,iBAAiB;EACjB,YAAY;CAAE;AAEhB;EACE,0BAA0B;EAC1B,YAAY;CAAE",file:"vue-tags-input.scss?vue&type=style&index=0&id=61d92e31&lang=scss&scoped=true&",sourcesContent:['@font-face {\n  font-family: \'icomoon\';\n  src: url("./assets/fonts/icomoon.eot?7grlse");\n  src: url("./assets/fonts/icomoon.eot?7grlse#iefix") format("embedded-opentype"), url("./assets/fonts/icomoon.ttf?7grlse") format("truetype"), url("./assets/fonts/icomoon.woff?7grlse") format("woff");\n  font-weight: normal;\n  font-style: normal; }\n\n[class^="ti-icon-"], [class*=" ti-icon-"] {\n  font-family: \'icomoon\' !important;\n  speak: none;\n  font-style: normal;\n  font-weight: normal;\n  font-variant: normal;\n  text-transform: none;\n  line-height: 1;\n  -webkit-font-smoothing: antialiased;\n  -moz-osx-font-smoothing: grayscale; }\n\n.ti-icon-check:before {\n  content: "\\e902"; }\n\n.ti-icon-close:before {\n  content: "\\e901"; }\n\n.ti-icon-undo:before {\n  content: "\\e900"; }\n\nul {\n  margin: 0px;\n  padding: 0px;\n  list-style-type: none; }\n\n*, *:before, *:after {\n  box-sizing: border-box; }\n\ninput:focus {\n  outline: none; }\n\ninput[disabled] {\n  background-color: transparent; }\n\n.vue-tags-input {\n  max-width: 450px;\n  position: relative;\n  background-color: #fff; }\n\ndiv.vue-tags-input.disabled {\n  opacity: 0.5; }\n  div.vue-tags-input.disabled * {\n    cursor: default; }\n\n.ti-input {\n  border: 1px solid #ccc;\n  display: flex;\n  padding: 4px;\n  flex-wrap: wrap; }\n\n.ti-tags {\n  display: flex;\n  flex-wrap: wrap;\n  width: 100%;\n  line-height: 1em; }\n\n.ti-tag {\n  background-color: #5C6BC0;\n  color: #fff;\n  border-radius: 2px;\n  display: flex;\n  padding: 3px 5px;\n  margin: 2px;\n  font-size: .85em; }\n  .ti-tag:focus {\n    outline: none; }\n  .ti-tag .ti-content {\n    display: flex;\n    align-items: center; }\n  .ti-tag .ti-tag-center {\n    position: relative; }\n  .ti-tag span {\n    line-height: .85em; }\n  .ti-tag span.ti-hidden {\n    padding-left: 14px;\n    visibility: hidden;\n    height: 0px;\n    white-space: pre; }\n  .ti-tag .ti-actions {\n    margin-left: 2px;\n    display: flex;\n    align-items: center;\n    font-size: 1.15em; }\n    .ti-tag .ti-actions i {\n      cursor: pointer; }\n  .ti-tag:last-child {\n    margin-right: 4px; }\n  .ti-tag.ti-invalid, .ti-tag.ti-tag.ti-deletion-mark {\n    background-color: #e54d42; }\n\n.ti-new-tag-input-wrapper {\n  display: flex;\n  flex: 1 0 auto;\n  padding: 3px 5px;\n  margin: 2px;\n  font-size: .85em; }\n  .ti-new-tag-input-wrapper input {\n    flex: 1 0 auto;\n    min-width: 100px;\n    border: none;\n    padding: 0px;\n    margin: 0px; }\n\n.ti-new-tag-input {\n  line-height: initial; }\n\n.ti-autocomplete {\n  border: 1px solid #ccc;\n  border-top: none;\n  position: absolute;\n  width: 100%;\n  background-color: #fff;\n  z-index: 20; }\n\n.ti-item > div {\n  cursor: pointer;\n  padding: 3px 6px;\n  width: 100%; }\n\n.ti-selected-item {\n  background-color: #5C6BC0;\n  color: #fff; }\n'],sourceRoot:""}])},function(t,e,n){"use strict";t.exports=function(t){return"string"!=typeof t?t:(/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),/["'() \t\n]/.test(t)?'"'+t.replace(/"/g,'\\"').replace(/\n/g,"\\n")+'"':t)}},function(t,e){t.exports="data:font/ttf;base64,AAEAAAALAIAAAwAwT1MvMg8SBawAAAC8AAAAYGNtYXAXVtKJAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5ZqWfozAAAAF4AAAA/GhlYWQPxZgIAAACdAAAADZoaGVhB4ADyAAAAqwAAAAkaG10eBIAAb4AAALQAAAAHGxvY2EAkgDiAAAC7AAAABBtYXhwAAkAHwAAAvwAAAAgbmFtZZlKCfsAAAMcAAABhnBvc3QAAwAAAAAEpAAAACAAAwOAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpAgPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6QL//f//AAAAAAAg6QD//f//AAH/4xcEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAFYBAQO+AoEAHAAAATIXHgEXFhcHJicuAScmIyIGBxchERc2Nz4BNzYCFkpDQ28pKRdkECAfVTM0OT9wLZz+gJgdIiJLKSgCVRcYUjg5QiAzKys+ERIrJZoBgJoZFRQcCAgAAQDWAIEDKgLVAAsAAAEHFwcnByc3JzcXNwMq7u487u487u487u4Cme7uPO7uPO7uPO7uAAEAkgCBA4ACvQAFAAAlARcBJzcBgAHEPP4A7jz5AcQ8/gDuPAAAAAABAAAAAAAAH8nTUV8PPPUACwQAAAAAANZ1KhsAAAAA1nUqGwAAAAADvgLVAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAO+AAEAAAAAAAAAAAAAAAAAAAAHBAAAAAAAAAAAAAAAAgAAAAQAAFYEAADWBAAAkgAAAAAACgAUAB4AUABqAH4AAQAAAAcAHQABAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGljb21vb24AaQBjAG8AbQBvAG8AblZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGljb21vb24AaQBjAG8AbQBvAG8Abmljb21vb24AaQBjAG8AbQBvAG8AblJlZ3VsYXIAUgBlAGcAdQBsAGEAcmljb21vb24AaQBjAG8AbQBvAG8AbkZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="},function(t,e){t.exports="data:font/woff;base64,d09GRgABAAAAAAUQAAsAAAAABMQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAABCAAAAGAAAABgDxIFrGNtYXAAAAFoAAAAVAAAAFQXVtKJZ2FzcAAAAbwAAAAIAAAACAAAABBnbHlmAAABxAAAAPwAAAD8pZ+jMGhlYWQAAALAAAAANgAAADYPxZgIaGhlYQAAAvgAAAAkAAAAJAeAA8hobXR4AAADHAAAABwAAAAcEgABvmxvY2EAAAM4AAAAEAAAABAAkgDibWF4cAAAA0gAAAAgAAAAIAAJAB9uYW1lAAADaAAAAYYAAAGGmUoJ+3Bvc3QAAATwAAAAIAAAACAAAwAAAAMDgAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAA6QIDwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEADgAAAAKAAgAAgACAAEAIOkC//3//wAAAAAAIOkA//3//wAB/+MXBAADAAEAAAAAAAAAAAAAAAEAAf//AA8AAQAAAAAAAAAAAAIAADc5AQAAAAABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQBWAQEDvgKBABwAAAEyFx4BFxYXByYnLgEnJiMiBgcXIREXNjc+ATc2AhZKQ0NvKSkXZBAgH1UzNDk/cC2c/oCYHSIiSykoAlUXGFI4OUIgMysrPhESKyWaAYCaGRUUHAgIAAEA1gCBAyoC1QALAAABBxcHJwcnNyc3FzcDKu7uPO7uPO7uPO7uApnu7jzu7jzu7jzu7gABAJIAgQOAAr0ABQAAJQEXASc3AYABxDz+AO48+QHEPP4A7jwAAAAAAQAAAAAAAB/J01FfDzz1AAsEAAAAAADWdSobAAAAANZ1KhsAAAAAA74C1QAAAAgAAgAAAAAAAAABAAADwP/AAAAEAAAAAAADvgABAAAAAAAAAAAAAAAAAAAABwQAAAAAAAAAAAAAAAIAAAAEAABWBAAA1gQAAJIAAAAAAAoAFAAeAFAAagB+AAEAAAAHAB0AAQAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAOAK4AAQAAAAAAAQAHAAAAAQAAAAAAAgAHAGAAAQAAAAAAAwAHADYAAQAAAAAABAAHAHUAAQAAAAAABQALABUAAQAAAAAABgAHAEsAAQAAAAAACgAaAIoAAwABBAkAAQAOAAcAAwABBAkAAgAOAGcAAwABBAkAAwAOAD0AAwABBAkABAAOAHwAAwABBAkABQAWACAAAwABBAkABgAOAFIAAwABBAkACgA0AKRpY29tb29uAGkAYwBvAG0AbwBvAG5WZXJzaW9uIDEuMABWAGUAcgBzAGkAbwBuACAAMQAuADBpY29tb29uAGkAYwBvAG0AbwBvAG5pY29tb29uAGkAYwBvAG0AbwBvAG5SZWd1bGFyAFIAZQBnAHUAbABhAHJpY29tb29uAGkAYwBvAG0AbwBvAG5Gb250IGdlbmVyYXRlZCBieSBJY29Nb29uLgBGAG8AbgB0ACAAZwBlAG4AZQByAGEAdABlAGQAIABiAHkAIABJAGMAbwBNAG8AbwBuAC4AAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"vue-tags-input",class:[{"ti-disabled":t.disabled},{"ti-focus":t.focused}]},[n("div",{staticClass:"ti-input"},[t.tagsCopy?n("ul",{staticClass:"ti-tags"},[t._l(t.tagsCopy,function(e,r){return n("li",{key:r,staticClass:"ti-tag",class:[{"ti-editing":t.tagsEditStatus[r]},e.tiClasses,e.classes,{"ti-deletion-mark":t.isMarked(r)}],style:e.style,attrs:{tabindex:"0"},on:{click:function(n){return t.$emit("tag-clicked",{tag:e,index:r})}}},[n("div",{staticClass:"ti-content"},[t.$scopedSlots["tag-left"]?n("div",{staticClass:"ti-tag-left"},[t._t("tag-left",null,{tag:e,index:r,edit:t.tagsEditStatus[r],performSaveEdit:t.performSaveTag,performDelete:t.performDeleteTag,performCancelEdit:t.cancelEdit,performOpenEdit:t.performEditTag,deletionMark:t.isMarked(r)})],2):t._e(),t._v(" "),n("div",{ref:"tagCenter",refInFor:!0,staticClass:"ti-tag-center"},[t.$scopedSlots["tag-center"]?t._e():n("span",{class:{"ti-hidden":t.tagsEditStatus[r]},on:{click:function(e){return t.performEditTag(r)}}},[t._v(t._s(e.text))]),t._v(" "),t.$scopedSlots["tag-center"]?t._e():n("tag-input",{attrs:{scope:{edit:t.tagsEditStatus[r],maxlength:t.maxlength,tag:e,index:r,validateTag:t.createChangedTag,performCancelEdit:t.cancelEdit,performSaveEdit:t.performSaveTag}}}),t._v(" "),t._t("tag-center",null,{tag:e,index:r,maxlength:t.maxlength,edit:t.tagsEditStatus[r],performSaveEdit:t.performSaveTag,performDelete:t.performDeleteTag,performCancelEdit:t.cancelEdit,validateTag:t.createChangedTag,performOpenEdit:t.performEditTag,deletionMark:t.isMarked(r)})],2),t._v(" "),t.$scopedSlots["tag-right"]?n("div",{staticClass:"ti-tag-right"},[t._t("tag-right",null,{tag:e,index:r,edit:t.tagsEditStatus[r],performSaveEdit:t.performSaveTag,performDelete:t.performDeleteTag,performCancelEdit:t.cancelEdit,performOpenEdit:t.performEditTag,deletionMark:t.isMarked(r)})],2):t._e()]),t._v(" "),n("div",{staticClass:"ti-actions"},[t.$scopedSlots["tag-actions"]?t._e():n("i",{directives:[{name:"show",rawName:"v-show",value:t.tagsEditStatus[r],expression:"tagsEditStatus[index]"}],staticClass:"ti-icon-undo",on:{click:function(e){return t.cancelEdit(r)}}}),t._v(" "),t.$scopedSlots["tag-actions"]?t._e():n("i",{directives:[{name:"show",rawName:"v-show",value:!t.tagsEditStatus[r],expression:"!tagsEditStatus[index]"}],staticClass:"ti-icon-close",on:{click:function(e){return t.performDeleteTag(r)}}}),t._v(" "),t.$scopedSlots["tag-actions"]?t._t("tag-actions",null,{tag:e,index:r,edit:t.tagsEditStatus[r],performSaveEdit:t.performSaveTag,performDelete:t.performDeleteTag,performCancelEdit:t.cancelEdit,performOpenEdit:t.performEditTag,deletionMark:t.isMarked(r)}):t._e()],2)])}),t._v(" "),n("li",{staticClass:"ti-new-tag-input-wrapper"},[n("input",t._b({ref:"newTagInput",staticClass:"ti-new-tag-input",class:[t.createClasses(t.newTag,t.tags,t.validation,t.isDuplicate)],attrs:{placeholder:t.placeholder,maxlength:t.maxlength,disabled:t.disabled,type:"text",size:"1"},domProps:{value:t.newTag},on:{keydown:[function(e){return t.performAddTags(t.filteredAutocompleteItems[t.selectedItem]||t.newTag,e)},function(e){return e.type.indexOf("key")||8===e.keyCode?t.invokeDelete(e):null},function(e){return e.type.indexOf("key")||9===e.keyCode?t.performBlur(e):null},function(e){return e.type.indexOf("key")||38===e.keyCode?t.selectItem(e,"before"):null},function(e){return e.type.indexOf("key")||40===e.keyCode?t.selectItem(e,"after"):null}],paste:t.addTagsFromPaste,input:t.updateNewTag,blur:function(e){return t.$emit("blur",e)},focus:function(e){t.focused=!0,t.$emit("focus",e)},click:function(e){!t.addOnlyFromAutocomplete&&(t.selectedItem=null)}}},"input",t.$attrs,!1))])],2):t._e()]),t._v(" "),t._t("between-elements"),t._v(" "),t.autocompleteOpen?n("div",{staticClass:"ti-autocomplete",on:{mouseout:function(e){t.selectedItem=null}}},[t._t("autocomplete-header"),t._v(" "),n("ul",t._l(t.filteredAutocompleteItems,function(e,r){return n("li",{key:r,staticClass:"ti-item",class:[e.tiClasses,e.classes,{"ti-selected-item":t.isSelected(r)}],style:e.style,on:{mouseover:function(e){!t.disabled&&(t.selectedItem=r)}}},[t.$scopedSlots["autocomplete-item"]?t._t("autocomplete-item",null,{item:e,index:r,performAdd:function(e){return t.performAddTags(e,void 0,"autocomplete")},selected:t.isSelected(r)}):n("div",{on:{click:function(n){return t.performAddTags(e,void 0,"autocomplete")}}},[t._v("\n          "+t._s(e.text)+"\n        ")])],2)}),0),t._v(" "),t._t("autocomplete-footer")],2):t._e()],2)};r._withStripped=!0;var i=n(5),o=n.n(i),a=function(t){return JSON.parse(JSON.stringify(t))},s=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3?arguments[3]:void 0;void 0===t.text&&(t={text:t});var i=function(t,e){return n.filter(function(e){var n=t.text;return"string"==typeof e.rule?!new RegExp(e.rule).test(n):e.rule instanceof RegExp?!e.rule.test(n):"[object Function]"==={}.toString.call(e.rule)?e.rule(t):void 0}).map(function(t){return t.classes})}(t),o=function(t,e){for(var n=0;n1?n-1:0),i=1;i1?e-1:0),r=1;r=this.autocompleteMinLength&&this.filteredAutocompleteItems.length>0&&this.focused},filteredAutocompleteItems:function(){var t=this,e=this.autocompleteItems.map(function(e){return c(e,t.tags,t.validation,t.isDuplicate)});return this.autocompleteFilterDuplicates?e.filter(this.duplicateFilter):e}},methods:{createClasses:s,getSelectedIndex:function(t){var e=this.filteredAutocompleteItems,n=this.selectedItem,r=e.length-1;if(0!==e.length)return null===n?0:"before"===t&&0===n?r:"after"===t&&n===r?0:"after"===t?n+1:n-1},selectDefaultItem:function(){this.addOnlyFromAutocomplete&&this.filteredAutocompleteItems.length>0?this.selectedItem=0:this.selectedItem=null},selectItem:function(t,e){t.preventDefault(),this.selectedItem=this.getSelectedIndex(e)},isSelected:function(t){return this.selectedItem===t},isMarked:function(t){return this.deletionMark===t},invokeDelete:function(){var t=this;if(this.deleteOnBackspace&&!(this.newTag.length>0)){var e=this.tagsCopy.length-1;null===this.deletionMark?(this.deletionMarkTime=setTimeout(function(){return t.deletionMark=null},1e3),this.deletionMark=e):this.performDeleteTag(e)}},addTagsFromPaste:function(){var t=this;this.addFromPaste&&setTimeout(function(){return t.performAddTags(t.newTag)},10)},performEditTag:function(t){var e=this;this.allowEditTags&&(this._events["before-editing-tag"]||this.editTag(t),this.$emit("before-editing-tag",{index:t,tag:this.tagsCopy[t],editTag:function(){return e.editTag(t)}}))},editTag:function(t){this.allowEditTags&&(this.toggleEditMode(t),this.focus(t))},toggleEditMode:function(t){this.allowEditTags&&!this.disabled&&this.$set(this.tagsEditStatus,t,!this.tagsEditStatus[t])},createChangedTag:function(t,e){var n=this.tagsCopy[t];n.text=e?e.target.value:this.tagsCopy[t].text,this.$set(this.tagsCopy,t,c(n,this.tagsCopy,this.validation,this.isDuplicate))},focus:function(t){var e=this;this.$nextTick(function(){var n=e.$refs.tagCenter[t].querySelector("input.ti-tag-input");n&&n.focus()})},quote:function(t){return t.replace(/([()[{*+.$^\\|?])/g,"\\$1")},cancelEdit:function(t){this.tags[t]&&(this.tagsCopy[t]=a(c(this.tags[t],this.tags,this.validation,this.isDuplicate)),this.$set(this.tagsEditStatus,t,!1))},hasForbiddingAddRule:function(t){var e=this;return t.some(function(t){var n=e.validation.find(function(e){return t===e.classes});return!!n&&n.disableAdd})},createTagTexts:function(t){var e=this,n=new RegExp(this.separators.map(function(t){return e.quote(t)}).join("|"));return t.split(n).map(function(t){return{text:t}})},performDeleteTag:function(t){var e=this;this._events["before-deleting-tag"]||this.deleteTag(t),this.$emit("before-deleting-tag",{index:t,tag:this.tagsCopy[t],deleteTag:function(){return e.deleteTag(t)}})},deleteTag:function(t){this.disabled||(this.deletionMark=null,clearTimeout(this.deletionMarkTime),this.tagsCopy.splice(t,1),this._events["update:tags"]&&this.$emit("update:tags",this.tagsCopy),this.$emit("tags-changed",this.tagsCopy))},noTriggerKey:function(t,e){var n=-1!==this[e].indexOf(t.keyCode)||-1!==this[e].indexOf(t.key);return n&&t.preventDefault(),!n},performAddTags:function(t,e,n){var r=this;if(!(this.disabled||e&&this.noTriggerKey(e,"addOnKey"))){var i=[];"object"===y(t)&&(i=[t]),"string"==typeof t&&(i=this.createTagTexts(t)),(i=i.filter(function(t){return t.text.trim().length>0})).forEach(function(t){t=c(t,r.tags,r.validation,r.isDuplicate),r._events["before-adding-tag"]||r.addTag(t,n),r.$emit("before-adding-tag",{tag:t,addTag:function(){return r.addTag(t,n)}})})}},duplicateFilter:function(t){return this.isDuplicate?!this.isDuplicate(this.tagsCopy,t):!this.tagsCopy.find(function(e){return e.text===t.text})},addTag:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"new-tag-input",r=this.filteredAutocompleteItems.map(function(t){return t.text});this.addOnlyFromAutocomplete&&-1===r.indexOf(t.text)||this.$nextTick(function(){return e.maxTags&&e.maxTags<=e.tagsCopy.length?e.$emit("max-tags-reached",t):e.avoidAddingDuplicates&&!e.duplicateFilter(t)?e.$emit("adding-duplicate",t):void(e.hasForbiddingAddRule(t.tiClasses)||(e.$emit("input",""),e.tagsCopy.push(t),e._events["update:tags"]&&e.$emit("update:tags",e.tagsCopy),"autocomplete"===n&&e.$refs.newTagInput.focus(),e.$emit("tags-changed",e.tagsCopy)))})},performSaveTag:function(t,e){var n=this,r=this.tagsCopy[t];this.disabled||e&&this.noTriggerKey(e,"addOnKey")||0!==r.text.trim().length&&(this._events["before-saving-tag"]||this.saveTag(t,r),this.$emit("before-saving-tag",{index:t,tag:r,saveTag:function(){return n.saveTag(t,r)}}))},saveTag:function(t,e){if(this.avoidAddingDuplicates){var n=a(this.tagsCopy),r=n.splice(t,1)[0];if(this.isDuplicate?this.isDuplicate(n,r):-1!==n.map(function(t){return t.text}).indexOf(r.text))return this.$emit("saving-duplicate",e)}this.hasForbiddingAddRule(e.tiClasses)||(this.$set(this.tagsCopy,t,e),this.toggleEditMode(t),this._events["update:tags"]&&this.$emit("update:tags",this.tagsCopy),this.$emit("tags-changed",this.tagsCopy))},tagsEqual:function(){var t=this;return!this.tagsCopy.some(function(e,n){return!o()(e,t.tags[n])})},updateNewTag:function(t){var e=t.target.value;this.newTag=e,this.$emit("input",e)},initTags:function(){this.tagsCopy=u(this.tags,this.validation,this.isDuplicate),this.tagsEditStatus=a(this.tags).map(function(){return!1}),this._events["update:tags"]&&!this.tagsEqual()&&this.$emit("update:tags",this.tagsCopy)},blurredOnClick:function(t){this.$el.contains(t.target)||this.$el.contains(document.activeElement)||this.performBlur(t)},performBlur:function(){this.addOnBlur&&this.focused&&this.performAddTags(this.newTag),this.focused=!1}},watch:{value:function(t){this.addOnlyFromAutocomplete||(this.selectedItem=null),this.newTag=t},tags:{handler:function(){this.initTags()},deep:!0},autocompleteOpen:"selectDefaultItem"},created:function(){this.newTag=this.value,this.initTags()},mounted:function(){this.selectDefaultItem(),document.addEventListener("click",this.blurredOnClick)},destroyed:function(){document.removeEventListener("click",this.blurredOnClick)}},_=(n(9),d(A,r,[],!1,null,"61d92e31",null));_.options.__file="vue-tags-input/vue-tags-input.vue";var b=_.exports;n.d(e,"VueTagsInput",function(){return b}),n.d(e,"createClasses",function(){return s}),n.d(e,"createTag",function(){return c}),n.d(e,"createTags",function(){return u}),n.d(e,"TagInput",function(){return h}),b.install=function(t){return t.component(b.name,b)},"undefined"!=typeof window&&window.Vue&&window.Vue.use(b),e.default=b}])},function(t,e,n){t.exports=n(50)},function(t,e,n){window._=n(19);try{window.$=window.jQuery=n(21),n(22)}catch(t){}window.axios=n(9),window.axios.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";var r=document.head.querySelector('meta[name="csrf-token"]');r?window.axios.defaults.headers.common["X-CSRF-TOKEN"]=r.content:console.error("CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token")},function(t,e,n){(function(t,r){var i;(function(){var o,a=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",c="Expected a function",u="__lodash_hash_undefined__",l=500,f="__lodash_placeholder__",d=1,p=2,h=4,v=1,m=2,g=1,y=2,A=4,_=8,b=16,w=32,x=64,C=128,T=256,k=512,E=30,$="...",S=800,B=16,D=1,O=2,I=1/0,N=9007199254740991,j=17976931348623157e292,P=NaN,R=4294967295,L=R-1,M=R>>>1,F=[["ary",C],["bind",g],["bindKey",y],["curry",_],["curryRight",b],["flip",k],["partial",w],["partialRight",x],["rearg",T]],H="[object Arguments]",U="[object Array]",z="[object AsyncFunction]",q="[object Boolean]",W="[object Date]",V="[object DOMException]",Q="[object Error]",Y="[object Function]",G="[object GeneratorFunction]",K="[object Map]",J="[object Number]",Z="[object Null]",X="[object Object]",tt="[object Proxy]",et="[object RegExp]",nt="[object Set]",rt="[object String]",it="[object Symbol]",ot="[object Undefined]",at="[object WeakMap]",st="[object WeakSet]",ct="[object ArrayBuffer]",ut="[object DataView]",lt="[object Float32Array]",ft="[object Float64Array]",dt="[object Int8Array]",pt="[object Int16Array]",ht="[object Int32Array]",vt="[object Uint8Array]",mt="[object Uint8ClampedArray]",gt="[object Uint16Array]",yt="[object Uint32Array]",At=/\b__p \+= '';/g,_t=/\b(__p \+=) '' \+/g,bt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,wt=/&(?:amp|lt|gt|quot|#39);/g,xt=/[&<>"']/g,Ct=RegExp(wt.source),Tt=RegExp(xt.source),kt=/<%-([\s\S]+?)%>/g,Et=/<%([\s\S]+?)%>/g,$t=/<%=([\s\S]+?)%>/g,St=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Bt=/^\w*$/,Dt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ot=/[\\^$.*+?()[\]{}|]/g,It=RegExp(Ot.source),Nt=/^\s+|\s+$/g,jt=/^\s+/,Pt=/\s+$/,Rt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Lt=/\{\n\/\* \[wrapped with (.+)\] \*/,Mt=/,? & /,Ft=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ht=/\\(\\)?/g,Ut=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,zt=/\w*$/,qt=/^[-+]0x[0-9a-f]+$/i,Wt=/^0b[01]+$/i,Vt=/^\[object .+?Constructor\]$/,Qt=/^0o[0-7]+$/i,Yt=/^(?:0|[1-9]\d*)$/,Gt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Kt=/($^)/,Jt=/['\n\r\u2028\u2029\\]/g,Zt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Xt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",te="[\\ud800-\\udfff]",ee="["+Xt+"]",ne="["+Zt+"]",re="\\d+",ie="[\\u2700-\\u27bf]",oe="[a-z\\xdf-\\xf6\\xf8-\\xff]",ae="[^\\ud800-\\udfff"+Xt+re+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",se="\\ud83c[\\udffb-\\udfff]",ce="[^\\ud800-\\udfff]",ue="(?:\\ud83c[\\udde6-\\uddff]){2}",le="[\\ud800-\\udbff][\\udc00-\\udfff]",fe="[A-Z\\xc0-\\xd6\\xd8-\\xde]",de="(?:"+oe+"|"+ae+")",pe="(?:"+fe+"|"+ae+")",he="(?:"+ne+"|"+se+")"+"?",ve="[\\ufe0e\\ufe0f]?"+he+("(?:\\u200d(?:"+[ce,ue,le].join("|")+")[\\ufe0e\\ufe0f]?"+he+")*"),me="(?:"+[ie,ue,le].join("|")+")"+ve,ge="(?:"+[ce+ne+"?",ne,ue,le,te].join("|")+")",ye=RegExp("['’]","g"),Ae=RegExp(ne,"g"),_e=RegExp(se+"(?="+se+")|"+ge+ve,"g"),be=RegExp([fe+"?"+oe+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[ee,fe,"$"].join("|")+")",pe+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[ee,fe+de,"$"].join("|")+")",fe+"?"+de+"+(?:['’](?:d|ll|m|re|s|t|ve))?",fe+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",re,me].join("|"),"g"),we=RegExp("[\\u200d\\ud800-\\udfff"+Zt+"\\ufe0e\\ufe0f]"),xe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ce=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Te=-1,ke={};ke[lt]=ke[ft]=ke[dt]=ke[pt]=ke[ht]=ke[vt]=ke[mt]=ke[gt]=ke[yt]=!0,ke[H]=ke[U]=ke[ct]=ke[q]=ke[ut]=ke[W]=ke[Q]=ke[Y]=ke[K]=ke[J]=ke[X]=ke[et]=ke[nt]=ke[rt]=ke[at]=!1;var Ee={};Ee[H]=Ee[U]=Ee[ct]=Ee[ut]=Ee[q]=Ee[W]=Ee[lt]=Ee[ft]=Ee[dt]=Ee[pt]=Ee[ht]=Ee[K]=Ee[J]=Ee[X]=Ee[et]=Ee[nt]=Ee[rt]=Ee[it]=Ee[vt]=Ee[mt]=Ee[gt]=Ee[yt]=!0,Ee[Q]=Ee[Y]=Ee[at]=!1;var $e={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Se=parseFloat,Be=parseInt,De="object"==typeof t&&t&&t.Object===Object&&t,Oe="object"==typeof self&&self&&self.Object===Object&&self,Ie=De||Oe||Function("return this")(),Ne=e&&!e.nodeType&&e,je=Ne&&"object"==typeof r&&r&&!r.nodeType&&r,Pe=je&&je.exports===Ne,Re=Pe&&De.process,Le=function(){try{var t=je&&je.require&&je.require("util").types;return t||Re&&Re.binding&&Re.binding("util")}catch(t){}}(),Me=Le&&Le.isArrayBuffer,Fe=Le&&Le.isDate,He=Le&&Le.isMap,Ue=Le&&Le.isRegExp,ze=Le&&Le.isSet,qe=Le&&Le.isTypedArray;function We(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Ve(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i-1}function Ze(t,e,n){for(var r=-1,i=null==t?0:t.length;++r-1;);return n}function bn(t,e){for(var n=t.length;n--&&cn(e,t[n],0)>-1;);return n}var wn=pn({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n",ſ:"s"}),xn=pn({"&":"&","<":"<",">":">",'"':""","'":"'"});function Cn(t){return"\\"+$e[t]}function Tn(t){return we.test(t)}function kn(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function En(t,e){return function(n){return t(e(n))}}function $n(t,e){for(var n=-1,r=t.length,i=0,o=[];++n",""":'"',"'":"'"});var Nn=function t(e){var n,r=(e=null==e?Ie:Nn.defaults(Ie.Object(),e,Nn.pick(Ie,Ce))).Array,i=e.Date,Zt=e.Error,Xt=e.Function,te=e.Math,ee=e.Object,ne=e.RegExp,re=e.String,ie=e.TypeError,oe=r.prototype,ae=Xt.prototype,se=ee.prototype,ce=e["__core-js_shared__"],ue=ae.toString,le=se.hasOwnProperty,fe=0,de=(n=/[^.]+$/.exec(ce&&ce.keys&&ce.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",pe=se.toString,he=ue.call(ee),ve=Ie._,me=ne("^"+ue.call(le).replace(Ot,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ge=Pe?e.Buffer:o,_e=e.Symbol,we=e.Uint8Array,$e=ge?ge.allocUnsafe:o,De=En(ee.getPrototypeOf,ee),Oe=ee.create,Ne=se.propertyIsEnumerable,je=oe.splice,Re=_e?_e.isConcatSpreadable:o,Le=_e?_e.iterator:o,on=_e?_e.toStringTag:o,pn=function(){try{var t=Mo(ee,"defineProperty");return t({},"",{}),t}catch(t){}}(),jn=e.clearTimeout!==Ie.clearTimeout&&e.clearTimeout,Pn=i&&i.now!==Ie.Date.now&&i.now,Rn=e.setTimeout!==Ie.setTimeout&&e.setTimeout,Ln=te.ceil,Mn=te.floor,Fn=ee.getOwnPropertySymbols,Hn=ge?ge.isBuffer:o,Un=e.isFinite,zn=oe.join,qn=En(ee.keys,ee),Wn=te.max,Vn=te.min,Qn=i.now,Yn=e.parseInt,Gn=te.random,Kn=oe.reverse,Jn=Mo(e,"DataView"),Zn=Mo(e,"Map"),Xn=Mo(e,"Promise"),tr=Mo(e,"Set"),er=Mo(e,"WeakMap"),nr=Mo(ee,"create"),rr=er&&new er,ir={},or=fa(Jn),ar=fa(Zn),sr=fa(Xn),cr=fa(tr),ur=fa(er),lr=_e?_e.prototype:o,fr=lr?lr.valueOf:o,dr=lr?lr.toString:o;function pr(t){if($s(t)&&!gs(t)&&!(t instanceof gr)){if(t instanceof mr)return t;if(le.call(t,"__wrapped__"))return da(t)}return new mr(t)}var hr=function(){function t(){}return function(e){if(!Es(e))return{};if(Oe)return Oe(e);t.prototype=e;var n=new t;return t.prototype=o,n}}();function vr(){}function mr(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=o}function gr(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=R,this.__views__=[]}function yr(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e=e?t:e)),t}function jr(t,e,n,r,i,a){var s,c=e&d,u=e&p,l=e&h;if(n&&(s=i?n(t,r,i,a):n(t)),s!==o)return s;if(!Es(t))return t;var f=gs(t);if(f){if(s=function(t){var e=t.length,n=new t.constructor(e);e&&"string"==typeof t[0]&&le.call(t,"index")&&(n.index=t.index,n.input=t.input);return n}(t),!c)return no(t,s)}else{var v=Uo(t),m=v==Y||v==G;if(bs(t))return Ki(t,c);if(v==X||v==H||m&&!i){if(s=u||m?{}:qo(t),!c)return u?function(t,e){return ro(t,Ho(t),e)}(t,function(t,e){return t&&ro(e,oc(e),t)}(s,t)):function(t,e){return ro(t,Fo(t),e)}(t,Dr(s,t))}else{if(!Ee[v])return i?t:{};s=function(t,e,n){var r=t.constructor;switch(e){case ct:return Ji(t);case q:case W:return new r(+t);case ut:return function(t,e){var n=e?Ji(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case lt:case ft:case dt:case pt:case ht:case vt:case mt:case gt:case yt:return Zi(t,n);case K:return new r;case J:case rt:return new r(t);case et:return function(t){var e=new t.constructor(t.source,zt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case nt:return new r;case it:return i=t,fr?ee(fr.call(i)):{}}var i}(t,v,c)}}a||(a=new wr);var g=a.get(t);if(g)return g;a.set(t,s),Is(t)?t.forEach(function(r){s.add(jr(r,e,n,r,t,a))}):Ss(t)&&t.forEach(function(r,i){s.set(i,jr(r,e,n,i,t,a))});var y=f?o:(l?u?Oo:Do:u?oc:ic)(t);return Qe(y||t,function(r,i){y&&(r=t[i=r]),$r(s,i,jr(r,e,n,i,t,a))}),s}function Pr(t,e,n){var r=n.length;if(null==t)return!r;for(t=ee(t);r--;){var i=n[r],a=e[i],s=t[i];if(s===o&&!(i in t)||!a(s))return!1}return!0}function Rr(t,e,n){if("function"!=typeof t)throw new ie(c);return ia(function(){t.apply(o,n)},e)}function Lr(t,e,n,r){var i=-1,o=Je,s=!0,c=t.length,u=[],l=e.length;if(!c)return u;n&&(e=Xe(e,gn(n))),r?(o=Ze,s=!1):e.length>=a&&(o=An,s=!1,e=new br(e));t:for(;++i-1},Ar.prototype.set=function(t,e){var n=this.__data__,r=Sr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},_r.prototype.clear=function(){this.size=0,this.__data__={hash:new yr,map:new(Zn||Ar),string:new yr}},_r.prototype.delete=function(t){var e=Ro(this,t).delete(t);return this.size-=e?1:0,e},_r.prototype.get=function(t){return Ro(this,t).get(t)},_r.prototype.has=function(t){return Ro(this,t).has(t)},_r.prototype.set=function(t,e){var n=Ro(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},br.prototype.add=br.prototype.push=function(t){return this.__data__.set(t,u),this},br.prototype.has=function(t){return this.__data__.has(t)},wr.prototype.clear=function(){this.__data__=new Ar,this.size=0},wr.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},wr.prototype.get=function(t){return this.__data__.get(t)},wr.prototype.has=function(t){return this.__data__.has(t)},wr.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Ar){var r=n.__data__;if(!Zn||r.length0&&n(s)?e>1?qr(s,e-1,n,r,i):tn(i,s):r||(i[i.length]=s)}return i}var Wr=so(),Vr=so(!0);function Qr(t,e){return t&&Wr(t,e,ic)}function Yr(t,e){return t&&Vr(t,e,ic)}function Gr(t,e){return Ke(e,function(e){return Cs(t[e])})}function Kr(t,e){for(var n=0,r=(e=Vi(e,t)).length;null!=t&&ne}function ti(t,e){return null!=t&&le.call(t,e)}function ei(t,e){return null!=t&&e in ee(t)}function ni(t,e,n){for(var i=n?Ze:Je,a=t[0].length,s=t.length,c=s,u=r(s),l=1/0,f=[];c--;){var d=t[c];c&&e&&(d=Xe(d,gn(e))),l=Vn(d.length,l),u[c]=!n&&(e||a>=120&&d.length>=120)?new br(c&&d):o}d=t[0];var p=-1,h=u[0];t:for(;++p=s)return c;var u=n[r];return c*("desc"==u?-1:1)}}return t.index-e.index}(t,e,n)})}function yi(t,e,n){for(var r=-1,i=e.length,o={};++r-1;)s!==t&&je.call(s,c,1),je.call(t,c,1);return t}function _i(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;Vo(i)?je.call(t,i,1):Li(t,i)}}return t}function bi(t,e){return t+Mn(Gn()*(e-t+1))}function wi(t,e){var n="";if(!t||e<1||e>N)return n;do{e%2&&(n+=t),(e=Mn(e/2))&&(t+=t)}while(e);return n}function xi(t,e){return oa(ta(t,e,Bc),t+"")}function Ci(t){return Cr(pc(t))}function Ti(t,e){var n=pc(t);return ca(n,Nr(e,0,n.length))}function ki(t,e,n,r){if(!Es(t))return t;for(var i=-1,a=(e=Vi(e,t)).length,s=a-1,c=t;null!=c&&++io?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var a=r(o);++i>>1,a=t[o];null!==a&&!js(a)&&(n?a<=e:a=a){var l=e?null:xo(t);if(l)return Sn(l);s=!1,i=An,u=new br}else u=e?[]:c;t:for(;++r=r?t:Bi(t,e,n)}var Gi=jn||function(t){return Ie.clearTimeout(t)};function Ki(t,e){if(e)return t.slice();var n=t.length,r=$e?$e(n):new t.constructor(n);return t.copy(r),r}function Ji(t){var e=new t.constructor(t.byteLength);return new we(e).set(new we(t)),e}function Zi(t,e){var n=e?Ji(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Xi(t,e){if(t!==e){var n=t!==o,r=null===t,i=t==t,a=js(t),s=e!==o,c=null===e,u=e==e,l=js(e);if(!c&&!l&&!a&&t>e||a&&s&&u&&!c&&!l||r&&s&&u||!n&&u||!i)return 1;if(!r&&!a&&!l&&t1?n[i-1]:o,s=i>2?n[2]:o;for(a=t.length>3&&"function"==typeof a?(i--,a):o,s&&Qo(n[0],n[1],s)&&(a=i<3?o:a,i=1),e=ee(e);++r-1?i[a?e[s]:s]:o}}function po(t){return Bo(function(e){var n=e.length,r=n,i=mr.prototype.thru;for(t&&e.reverse();r--;){var a=e[r];if("function"!=typeof a)throw new ie(c);if(i&&!s&&"wrapper"==No(a))var s=new mr([],!0)}for(r=s?r:n;++r1&&_.reverse(),d&&lc))return!1;var l=a.get(t);if(l&&a.get(e))return l==e;var f=-1,d=!0,p=n&m?new br:o;for(a.set(t,e),a.set(e,t);++f-1&&t%1==0&&t1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(Rt,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return Qe(F,function(n){var r="_."+n[0];e&n[1]&&!Je(t,r)&&t.push(r)}),t.sort()}(function(t){var e=t.match(Lt);return e?e[1].split(Mt):[]}(r),n)))}function sa(t){var e=0,n=0;return function(){var r=Qn(),i=B-(r-n);if(n=r,i>0){if(++e>=S)return arguments[0]}else e=0;return t.apply(o,arguments)}}function ca(t,e){var n=-1,r=t.length,i=r-1;for(e=e===o?r:e;++n1?t[e-1]:o;return n="function"==typeof n?(t.pop(),n):o,Oa(t,n)});function Ma(t){var e=pr(t);return e.__chain__=!0,e}function Fa(t,e){return e(t)}var Ha=Bo(function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(e){return Ir(e,t)};return!(e>1||this.__actions__.length)&&r instanceof gr&&Vo(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:Fa,args:[i],thisArg:o}),new mr(r,this.__chain__).thru(function(t){return e&&!t.length&&t.push(o),t})):this.thru(i)});var Ua=io(function(t,e,n){le.call(t,n)?++t[n]:Or(t,n,1)});var za=fo(ma),qa=fo(ga);function Wa(t,e){return(gs(t)?Qe:Mr)(t,Po(e,3))}function Va(t,e){return(gs(t)?Ye:Fr)(t,Po(e,3))}var Qa=io(function(t,e,n){le.call(t,n)?t[n].push(e):Or(t,n,[e])});var Ya=xi(function(t,e,n){var i=-1,o="function"==typeof e,a=As(t)?r(t.length):[];return Mr(t,function(t){a[++i]=o?We(e,t,n):ri(t,e,n)}),a}),Ga=io(function(t,e,n){Or(t,n,e)});function Ka(t,e){return(gs(t)?Xe:di)(t,Po(e,3))}var Ja=io(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]});var Za=xi(function(t,e){if(null==t)return[];var n=e.length;return n>1&&Qo(t,e[0],e[1])?e=[]:n>2&&Qo(e[0],e[1],e[2])&&(e=[e[0]]),gi(t,qr(e,1),[])}),Xa=Pn||function(){return Ie.Date.now()};function ts(t,e,n){return e=n?o:e,e=t&&null==e?t.length:e,To(t,C,o,o,o,o,e)}function es(t,e){var n;if("function"!=typeof e)throw new ie(c);return t=Hs(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=o),n}}var ns=xi(function(t,e,n){var r=g;if(n.length){var i=$n(n,jo(ns));r|=w}return To(t,r,e,n,i)}),rs=xi(function(t,e,n){var r=g|y;if(n.length){var i=$n(n,jo(rs));r|=w}return To(e,r,t,n,i)});function is(t,e,n){var r,i,a,s,u,l,f=0,d=!1,p=!1,h=!0;if("function"!=typeof t)throw new ie(c);function v(e){var n=r,a=i;return r=i=o,f=e,s=t.apply(a,n)}function m(t){var n=t-l;return l===o||n>=e||n<0||p&&t-f>=a}function g(){var t=Xa();if(m(t))return y(t);u=ia(g,function(t){var n=e-(t-l);return p?Vn(n,a-(t-f)):n}(t))}function y(t){return u=o,h&&r?v(t):(r=i=o,s)}function A(){var t=Xa(),n=m(t);if(r=arguments,i=this,l=t,n){if(u===o)return function(t){return f=t,u=ia(g,e),d?v(t):s}(l);if(p)return Gi(u),u=ia(g,e),v(l)}return u===o&&(u=ia(g,e)),s}return e=zs(e)||0,Es(n)&&(d=!!n.leading,a=(p="maxWait"in n)?Wn(zs(n.maxWait)||0,e):a,h="trailing"in n?!!n.trailing:h),A.cancel=function(){u!==o&&Gi(u),f=0,r=l=i=u=o},A.flush=function(){return u===o?s:y(Xa())},A}var os=xi(function(t,e){return Rr(t,1,e)}),as=xi(function(t,e,n){return Rr(t,zs(e)||0,n)});function ss(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new ie(c);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(ss.Cache||_r),n}function cs(t){if("function"!=typeof t)throw new ie(c);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}ss.Cache=_r;var us=Qi(function(t,e){var n=(e=1==e.length&&gs(e[0])?Xe(e[0],gn(Po())):Xe(qr(e,1),gn(Po()))).length;return xi(function(r){for(var i=-1,o=Vn(r.length,n);++i=e}),ms=ii(function(){return arguments}())?ii:function(t){return $s(t)&&le.call(t,"callee")&&!Ne.call(t,"callee")},gs=r.isArray,ys=Me?gn(Me):function(t){return $s(t)&&Zr(t)==ct};function As(t){return null!=t&&ks(t.length)&&!Cs(t)}function _s(t){return $s(t)&&As(t)}var bs=Hn||zc,ws=Fe?gn(Fe):function(t){return $s(t)&&Zr(t)==W};function xs(t){if(!$s(t))return!1;var e=Zr(t);return e==Q||e==V||"string"==typeof t.message&&"string"==typeof t.name&&!Ds(t)}function Cs(t){if(!Es(t))return!1;var e=Zr(t);return e==Y||e==G||e==z||e==tt}function Ts(t){return"number"==typeof t&&t==Hs(t)}function ks(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=N}function Es(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function $s(t){return null!=t&&"object"==typeof t}var Ss=He?gn(He):function(t){return $s(t)&&Uo(t)==K};function Bs(t){return"number"==typeof t||$s(t)&&Zr(t)==J}function Ds(t){if(!$s(t)||Zr(t)!=X)return!1;var e=De(t);if(null===e)return!0;var n=le.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&ue.call(n)==he}var Os=Ue?gn(Ue):function(t){return $s(t)&&Zr(t)==et};var Is=ze?gn(ze):function(t){return $s(t)&&Uo(t)==nt};function Ns(t){return"string"==typeof t||!gs(t)&&$s(t)&&Zr(t)==rt}function js(t){return"symbol"==typeof t||$s(t)&&Zr(t)==it}var Ps=qe?gn(qe):function(t){return $s(t)&&ks(t.length)&&!!ke[Zr(t)]};var Rs=_o(fi),Ls=_o(function(t,e){return t<=e});function Ms(t){if(!t)return[];if(As(t))return Ns(t)?On(t):no(t);if(Le&&t[Le])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Le]());var e=Uo(t);return(e==K?kn:e==nt?Sn:pc)(t)}function Fs(t){return t?(t=zs(t))===I||t===-I?(t<0?-1:1)*j:t==t?t:0:0===t?t:0}function Hs(t){var e=Fs(t),n=e%1;return e==e?n?e-n:e:0}function Us(t){return t?Nr(Hs(t),0,R):0}function zs(t){if("number"==typeof t)return t;if(js(t))return P;if(Es(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Es(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(Nt,"");var n=Wt.test(t);return n||Qt.test(t)?Be(t.slice(2),n?2:8):qt.test(t)?P:+t}function qs(t){return ro(t,oc(t))}function Ws(t){return null==t?"":Pi(t)}var Vs=oo(function(t,e){if(Jo(e)||As(e))ro(e,ic(e),t);else for(var n in e)le.call(e,n)&&$r(t,n,e[n])}),Qs=oo(function(t,e){ro(e,oc(e),t)}),Ys=oo(function(t,e,n,r){ro(e,oc(e),t,r)}),Gs=oo(function(t,e,n,r){ro(e,ic(e),t,r)}),Ks=Bo(Ir);var Js=xi(function(t,e){t=ee(t);var n=-1,r=e.length,i=r>2?e[2]:o;for(i&&Qo(e[0],e[1],i)&&(r=1);++n1),e}),ro(t,Oo(t),n),r&&(n=jr(n,d|p|h,$o));for(var i=e.length;i--;)Li(n,e[i]);return n});var uc=Bo(function(t,e){return null==t?{}:function(t,e){return yi(t,e,function(e,n){return tc(t,n)})}(t,e)});function lc(t,e){if(null==t)return{};var n=Xe(Oo(t),function(t){return[t]});return e=Po(e),yi(t,n,function(t,n){return e(t,n[0])})}var fc=Co(ic),dc=Co(oc);function pc(t){return null==t?[]:yn(t,ic(t))}var hc=uo(function(t,e,n){return e=e.toLowerCase(),t+(n?vc(e):e)});function vc(t){return xc(Ws(t).toLowerCase())}function mc(t){return(t=Ws(t))&&t.replace(Gt,wn).replace(Ae,"")}var gc=uo(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),yc=uo(function(t,e,n){return t+(n?" ":"")+e.toLowerCase()}),Ac=co("toLowerCase");var _c=uo(function(t,e,n){return t+(n?"_":"")+e.toLowerCase()});var bc=uo(function(t,e,n){return t+(n?" ":"")+xc(e)});var wc=uo(function(t,e,n){return t+(n?" ":"")+e.toUpperCase()}),xc=co("toUpperCase");function Cc(t,e,n){return t=Ws(t),(e=n?o:e)===o?function(t){return xe.test(t)}(t)?function(t){return t.match(be)||[]}(t):function(t){return t.match(Ft)||[]}(t):t.match(e)||[]}var Tc=xi(function(t,e){try{return We(t,o,e)}catch(t){return xs(t)?t:new Zt(t)}}),kc=Bo(function(t,e){return Qe(e,function(e){e=la(e),Or(t,e,ns(t[e],t))}),t});function Ec(t){return function(){return t}}var $c=po(),Sc=po(!0);function Bc(t){return t}function Dc(t){return ci("function"==typeof t?t:jr(t,d))}var Oc=xi(function(t,e){return function(n){return ri(n,t,e)}}),Ic=xi(function(t,e){return function(n){return ri(t,n,e)}});function Nc(t,e,n){var r=ic(e),i=Gr(e,r);null!=n||Es(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=Gr(e,ic(e)));var o=!(Es(n)&&"chain"in n&&!n.chain),a=Cs(t);return Qe(i,function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__),i=n.__actions__=no(this.__actions__);return i.push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,tn([this.value()],arguments))})}),t}function jc(){}var Pc=go(Xe),Rc=go(Ge),Lc=go(rn);function Mc(t){return Yo(t)?dn(la(t)):function(t){return function(e){return Kr(e,t)}}(t)}var Fc=Ao(),Hc=Ao(!0);function Uc(){return[]}function zc(){return!1}var qc=mo(function(t,e){return t+e},0),Wc=wo("ceil"),Vc=mo(function(t,e){return t/e},1),Qc=wo("floor");var Yc,Gc=mo(function(t,e){return t*e},1),Kc=wo("round"),Jc=mo(function(t,e){return t-e},0);return pr.after=function(t,e){if("function"!=typeof e)throw new ie(c);return t=Hs(t),function(){if(--t<1)return e.apply(this,arguments)}},pr.ary=ts,pr.assign=Vs,pr.assignIn=Qs,pr.assignInWith=Ys,pr.assignWith=Gs,pr.at=Ks,pr.before=es,pr.bind=ns,pr.bindAll=kc,pr.bindKey=rs,pr.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return gs(t)?t:[t]},pr.chain=Ma,pr.chunk=function(t,e,n){e=(n?Qo(t,e,n):e===o)?1:Wn(Hs(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var a=0,s=0,c=r(Ln(i/e));ai?0:i+n),(r=r===o||r>i?i:Hs(r))<0&&(r+=i),r=n>r?0:Us(r);n>>0)?(t=Ws(t))&&("string"==typeof e||null!=e&&!Os(e))&&!(e=Pi(e))&&Tn(t)?Yi(On(t),0,n):t.split(e,n):[]},pr.spread=function(t,e){if("function"!=typeof t)throw new ie(c);return e=null==e?0:Wn(Hs(e),0),xi(function(n){var r=n[e],i=Yi(n,0,e);return r&&tn(i,r),We(t,this,i)})},pr.tail=function(t){var e=null==t?0:t.length;return e?Bi(t,1,e):[]},pr.take=function(t,e,n){return t&&t.length?Bi(t,0,(e=n||e===o?1:Hs(e))<0?0:e):[]},pr.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?Bi(t,(e=r-(e=n||e===o?1:Hs(e)))<0?0:e,r):[]},pr.takeRightWhile=function(t,e){return t&&t.length?Fi(t,Po(e,3),!1,!0):[]},pr.takeWhile=function(t,e){return t&&t.length?Fi(t,Po(e,3)):[]},pr.tap=function(t,e){return e(t),t},pr.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new ie(c);return Es(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),is(t,e,{leading:r,maxWait:e,trailing:i})},pr.thru=Fa,pr.toArray=Ms,pr.toPairs=fc,pr.toPairsIn=dc,pr.toPath=function(t){return gs(t)?Xe(t,la):js(t)?[t]:no(ua(Ws(t)))},pr.toPlainObject=qs,pr.transform=function(t,e,n){var r=gs(t),i=r||bs(t)||Ps(t);if(e=Po(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:Es(t)&&Cs(o)?hr(De(t)):{}}return(i?Qe:Qr)(t,function(t,r,i){return e(n,t,r,i)}),n},pr.unary=function(t){return ts(t,1)},pr.union=$a,pr.unionBy=Sa,pr.unionWith=Ba,pr.uniq=function(t){return t&&t.length?Ri(t):[]},pr.uniqBy=function(t,e){return t&&t.length?Ri(t,Po(e,2)):[]},pr.uniqWith=function(t,e){return e="function"==typeof e?e:o,t&&t.length?Ri(t,o,e):[]},pr.unset=function(t,e){return null==t||Li(t,e)},pr.unzip=Da,pr.unzipWith=Oa,pr.update=function(t,e,n){return null==t?t:Mi(t,e,Wi(n))},pr.updateWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:Mi(t,e,Wi(n),r)},pr.values=pc,pr.valuesIn=function(t){return null==t?[]:yn(t,oc(t))},pr.without=Ia,pr.words=Cc,pr.wrap=function(t,e){return ls(Wi(e),t)},pr.xor=Na,pr.xorBy=ja,pr.xorWith=Pa,pr.zip=Ra,pr.zipObject=function(t,e){return zi(t||[],e||[],$r)},pr.zipObjectDeep=function(t,e){return zi(t||[],e||[],ki)},pr.zipWith=La,pr.entries=fc,pr.entriesIn=dc,pr.extend=Qs,pr.extendWith=Ys,Nc(pr,pr),pr.add=qc,pr.attempt=Tc,pr.camelCase=hc,pr.capitalize=vc,pr.ceil=Wc,pr.clamp=function(t,e,n){return n===o&&(n=e,e=o),n!==o&&(n=(n=zs(n))==n?n:0),e!==o&&(e=(e=zs(e))==e?e:0),Nr(zs(t),e,n)},pr.clone=function(t){return jr(t,h)},pr.cloneDeep=function(t){return jr(t,d|h)},pr.cloneDeepWith=function(t,e){return jr(t,d|h,e="function"==typeof e?e:o)},pr.cloneWith=function(t,e){return jr(t,h,e="function"==typeof e?e:o)},pr.conformsTo=function(t,e){return null==e||Pr(t,e,ic(e))},pr.deburr=mc,pr.defaultTo=function(t,e){return null==t||t!=t?e:t},pr.divide=Vc,pr.endsWith=function(t,e,n){t=Ws(t),e=Pi(e);var r=t.length,i=n=n===o?r:Nr(Hs(n),0,r);return(n-=e.length)>=0&&t.slice(n,i)==e},pr.eq=ps,pr.escape=function(t){return(t=Ws(t))&&Tt.test(t)?t.replace(xt,xn):t},pr.escapeRegExp=function(t){return(t=Ws(t))&&It.test(t)?t.replace(Ot,"\\$&"):t},pr.every=function(t,e,n){var r=gs(t)?Ge:Hr;return n&&Qo(t,e,n)&&(e=o),r(t,Po(e,3))},pr.find=za,pr.findIndex=ma,pr.findKey=function(t,e){return an(t,Po(e,3),Qr)},pr.findLast=qa,pr.findLastIndex=ga,pr.findLastKey=function(t,e){return an(t,Po(e,3),Yr)},pr.floor=Qc,pr.forEach=Wa,pr.forEachRight=Va,pr.forIn=function(t,e){return null==t?t:Wr(t,Po(e,3),oc)},pr.forInRight=function(t,e){return null==t?t:Vr(t,Po(e,3),oc)},pr.forOwn=function(t,e){return t&&Qr(t,Po(e,3))},pr.forOwnRight=function(t,e){return t&&Yr(t,Po(e,3))},pr.get=Xs,pr.gt=hs,pr.gte=vs,pr.has=function(t,e){return null!=t&&zo(t,e,ti)},pr.hasIn=tc,pr.head=Aa,pr.identity=Bc,pr.includes=function(t,e,n,r){t=As(t)?t:pc(t),n=n&&!r?Hs(n):0;var i=t.length;return n<0&&(n=Wn(i+n,0)),Ns(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&cn(t,e,n)>-1},pr.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:Hs(n);return i<0&&(i=Wn(r+i,0)),cn(t,e,i)},pr.inRange=function(t,e,n){return e=Fs(e),n===o?(n=e,e=0):n=Fs(n),function(t,e,n){return t>=Vn(e,n)&&t=-N&&t<=N},pr.isSet=Is,pr.isString=Ns,pr.isSymbol=js,pr.isTypedArray=Ps,pr.isUndefined=function(t){return t===o},pr.isWeakMap=function(t){return $s(t)&&Uo(t)==at},pr.isWeakSet=function(t){return $s(t)&&Zr(t)==st},pr.join=function(t,e){return null==t?"":zn.call(t,e)},pr.kebabCase=gc,pr.last=xa,pr.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=Hs(n))<0?Wn(r+i,0):Vn(i,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,i):sn(t,ln,i,!0)},pr.lowerCase=yc,pr.lowerFirst=Ac,pr.lt=Rs,pr.lte=Ls,pr.max=function(t){return t&&t.length?Ur(t,Bc,Xr):o},pr.maxBy=function(t,e){return t&&t.length?Ur(t,Po(e,2),Xr):o},pr.mean=function(t){return fn(t,Bc)},pr.meanBy=function(t,e){return fn(t,Po(e,2))},pr.min=function(t){return t&&t.length?Ur(t,Bc,fi):o},pr.minBy=function(t,e){return t&&t.length?Ur(t,Po(e,2),fi):o},pr.stubArray=Uc,pr.stubFalse=zc,pr.stubObject=function(){return{}},pr.stubString=function(){return""},pr.stubTrue=function(){return!0},pr.multiply=Gc,pr.nth=function(t,e){return t&&t.length?mi(t,Hs(e)):o},pr.noConflict=function(){return Ie._===this&&(Ie._=ve),this},pr.noop=jc,pr.now=Xa,pr.pad=function(t,e,n){t=Ws(t);var r=(e=Hs(e))?Dn(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return yo(Mn(i),n)+t+yo(Ln(i),n)},pr.padEnd=function(t,e,n){t=Ws(t);var r=(e=Hs(e))?Dn(t):0;return e&&re){var r=t;t=e,e=r}if(n||t%1||e%1){var i=Gn();return Vn(t+i*(e-t+Se("1e-"+((i+"").length-1))),e)}return bi(t,e)},pr.reduce=function(t,e,n){var r=gs(t)?en:hn,i=arguments.length<3;return r(t,Po(e,4),n,i,Mr)},pr.reduceRight=function(t,e,n){var r=gs(t)?nn:hn,i=arguments.length<3;return r(t,Po(e,4),n,i,Fr)},pr.repeat=function(t,e,n){return e=(n?Qo(t,e,n):e===o)?1:Hs(e),wi(Ws(t),e)},pr.replace=function(){var t=arguments,e=Ws(t[0]);return t.length<3?e:e.replace(t[1],t[2])},pr.result=function(t,e,n){var r=-1,i=(e=Vi(e,t)).length;for(i||(i=1,t=o);++rN)return[];var n=R,r=Vn(t,R);e=Po(e),t-=R;for(var i=mn(r,e);++n=a)return t;var c=n-Dn(r);if(c<1)return r;var u=s?Yi(s,0,c).join(""):t.slice(0,c);if(i===o)return u+r;if(s&&(c+=u.length-c),Os(i)){if(t.slice(c).search(i)){var l,f=u;for(i.global||(i=ne(i.source,Ws(zt.exec(i))+"g")),i.lastIndex=0;l=i.exec(f);)var d=l.index;u=u.slice(0,d===o?c:d)}}else if(t.indexOf(Pi(i),c)!=c){var p=u.lastIndexOf(i);p>-1&&(u=u.slice(0,p))}return u+r},pr.unescape=function(t){return(t=Ws(t))&&Ct.test(t)?t.replace(wt,In):t},pr.uniqueId=function(t){var e=++fe;return Ws(t)+e},pr.upperCase=wc,pr.upperFirst=xc,pr.each=Wa,pr.eachRight=Va,pr.first=Aa,Nc(pr,(Yc={},Qr(pr,function(t,e){le.call(pr.prototype,e)||(Yc[e]=t)}),Yc),{chain:!1}),pr.VERSION="4.17.15",Qe(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){pr[t].placeholder=pr}),Qe(["drop","take"],function(t,e){gr.prototype[t]=function(n){n=n===o?1:Wn(Hs(n),0);var r=this.__filtered__&&!e?new gr(this):this.clone();return r.__filtered__?r.__takeCount__=Vn(n,r.__takeCount__):r.__views__.push({size:Vn(n,R),type:t+(r.__dir__<0?"Right":"")}),r},gr.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),Qe(["filter","map","takeWhile"],function(t,e){var n=e+1,r=n==D||3==n;gr.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Po(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}}),Qe(["head","last"],function(t,e){var n="take"+(e?"Right":"");gr.prototype[t]=function(){return this[n](1).value()[0]}}),Qe(["initial","tail"],function(t,e){var n="drop"+(e?"":"Right");gr.prototype[t]=function(){return this.__filtered__?new gr(this):this[n](1)}}),gr.prototype.compact=function(){return this.filter(Bc)},gr.prototype.find=function(t){return this.filter(t).head()},gr.prototype.findLast=function(t){return this.reverse().find(t)},gr.prototype.invokeMap=xi(function(t,e){return"function"==typeof t?new gr(this):this.map(function(n){return ri(n,t,e)})}),gr.prototype.reject=function(t){return this.filter(cs(Po(t)))},gr.prototype.slice=function(t,e){t=Hs(t);var n=this;return n.__filtered__&&(t>0||e<0)?new gr(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==o&&(n=(e=Hs(e))<0?n.dropRight(-e):n.take(e-t)),n)},gr.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},gr.prototype.toArray=function(){return this.take(R)},Qr(gr.prototype,function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=pr[r?"take"+("last"==e?"Right":""):e],a=r||/^find/.test(e);i&&(pr.prototype[e]=function(){var e=this.__wrapped__,s=r?[1]:arguments,c=e instanceof gr,u=s[0],l=c||gs(e),f=function(t){var e=i.apply(pr,tn([t],s));return r&&d?e[0]:e};l&&n&&"function"==typeof u&&1!=u.length&&(c=l=!1);var d=this.__chain__,p=!!this.__actions__.length,h=a&&!d,v=c&&!p;if(!a&&l){e=v?e:new gr(this);var m=t.apply(e,s);return m.__actions__.push({func:Fa,args:[f],thisArg:o}),new mr(m,d)}return h&&v?t.apply(this,s):(m=this.thru(f),h?r?m.value()[0]:m.value():m)})}),Qe(["pop","push","shift","sort","splice","unshift"],function(t){var e=oe[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);pr.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(gs(i)?i:[],t)}return this[n](function(n){return e.apply(gs(n)?n:[],t)})}}),Qr(gr.prototype,function(t,e){var n=pr[e];if(n){var r=n.name+"";le.call(ir,r)||(ir[r]=[]),ir[r].push({name:e,func:n})}}),ir[ho(o,y).name]=[{name:"wrapper",func:o}],gr.prototype.clone=function(){var t=new gr(this.__wrapped__);return t.__actions__=no(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=no(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=no(this.__views__),t},gr.prototype.reverse=function(){if(this.__filtered__){var t=new gr(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},gr.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=gs(t),r=e<0,i=n?t.length:0,o=function(t,e,n){var r=-1,i=n.length;for(;++r=this.__values__.length;return{done:t,value:t?o:this.__values__[this.__index__++]}},pr.prototype.plant=function(t){for(var e,n=this;n instanceof vr;){var r=da(n);r.__index__=0,r.__values__=o,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e},pr.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof gr){var e=t;return this.__actions__.length&&(e=new gr(this)),(e=e.reverse()).__actions__.push({func:Fa,args:[Ea],thisArg:o}),new mr(e,this.__chain__)}return this.thru(Ea)},pr.prototype.toJSON=pr.prototype.valueOf=pr.prototype.value=function(){return Hi(this.__wrapped__,this.__actions__)},pr.prototype.first=pr.prototype.head,Le&&(pr.prototype[Le]=function(){return this}),pr}();Ie._=Nn,(i=function(){return Nn}.call(e,n,e,r))===o||(r.exports=i)}).call(this)}).call(this,n(2),n(20)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){var r;!function(e,n){"use strict";"object"==typeof t.exports?t.exports=e.document?n(e,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return n(t)}:n(e)}("undefined"!=typeof window?window:this,function(n,i){"use strict";var o=[],a=n.document,s=Object.getPrototypeOf,c=o.slice,u=o.concat,l=o.push,f=o.indexOf,d={},p=d.toString,h=d.hasOwnProperty,v=h.toString,m=v.call(Object),g={},y=function(t){return"function"==typeof t&&"number"!=typeof t.nodeType},A=function(t){return null!=t&&t===t.window},_={type:!0,src:!0,nonce:!0,noModule:!0};function b(t,e,n){var r,i,o=(n=n||a).createElement("script");if(o.text=t,e)for(r in _)(i=e[r]||e.getAttribute&&e.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?d[p.call(t)]||"object":typeof t}var x=function(t,e){return new x.fn.init(t,e)},C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function T(t){var e=!!t&&"length"in t&&t.length,n=w(t);return!y(t)&&!A(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}x.fn=x.prototype={jquery:"3.4.1",constructor:x,length:0,toArray:function(){return c.call(this)},get:function(t){return null==t?c.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=x.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return x.each(this,t)},map:function(t){return this.pushStack(x.map(this,function(e,n){return t.call(e,n,e)}))},slice:function(){return this.pushStack(c.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,n=+t+(t<0?e:0);return this.pushStack(n>=0&&n+~]|"+R+")"+R+"*"),W=new RegExp(R+"|>"),V=new RegExp(F),Q=new RegExp("^"+L+"$"),Y={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+R+"*(even|odd|(([+-]|)(\\d*)n|)"+R+"*(?:([+-]|)"+R+"*(\\d+)|))"+R+"*\\)|)","i"),bool:new RegExp("^(?:"+P+")$","i"),needsContext:new RegExp("^"+R+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+R+"*((?:-\\d)?\\d*)"+R+"*\\)|)(?=[^-]|$)","i")},G=/HTML$/i,K=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,X=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,tt=/[+~]/,et=new RegExp("\\\\([\\da-f]{1,6}"+R+"?|("+R+")|.)","ig"),nt=function(t,e,n){var r="0x"+e-65536;return r!=r||n?e:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},rt=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,it=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},ot=function(){d()},at=_t(function(t){return!0===t.disabled&&"fieldset"===t.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{I.apply(B=N.call(b.childNodes),b.childNodes),B[b.childNodes.length].nodeType}catch(t){I={apply:B.length?function(t,e){O.apply(t,N.call(e))}:function(t,e){for(var n=t.length,r=0;t[n++]=e[r++];);t.length=n-1}}}function st(t,e,r,i){var o,s,u,l,f,h,g,y=e&&e.ownerDocument,w=e?e.nodeType:9;if(r=r||[],"string"!=typeof t||!t||1!==w&&9!==w&&11!==w)return r;if(!i&&((e?e.ownerDocument||e:b)!==p&&d(e),e=e||p,v)){if(11!==w&&(f=X.exec(t)))if(o=f[1]){if(9===w){if(!(u=e.getElementById(o)))return r;if(u.id===o)return r.push(u),r}else if(y&&(u=y.getElementById(o))&&A(e,u)&&u.id===o)return r.push(u),r}else{if(f[2])return I.apply(r,e.getElementsByTagName(t)),r;if((o=f[3])&&n.getElementsByClassName&&e.getElementsByClassName)return I.apply(r,e.getElementsByClassName(o)),r}if(n.qsa&&!E[t+" "]&&(!m||!m.test(t))&&(1!==w||"object"!==e.nodeName.toLowerCase())){if(g=t,y=e,1===w&&W.test(t)){for((l=e.getAttribute("id"))?l=l.replace(rt,it):e.setAttribute("id",l=_),s=(h=a(t)).length;s--;)h[s]="#"+l+" "+At(h[s]);g=h.join(","),y=tt.test(t)&>(e.parentNode)||e}try{return I.apply(r,y.querySelectorAll(g)),r}catch(e){E(t,!0)}finally{l===_&&e.removeAttribute("id")}}}return c(t.replace(U,"$1"),e,r,i)}function ct(){var t=[];return function e(n,i){return t.push(n+" ")>r.cacheLength&&delete e[t.shift()],e[n+" "]=i}}function ut(t){return t[_]=!0,t}function lt(t){var e=p.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function ft(t,e){for(var n=t.split("|"),i=n.length;i--;)r.attrHandle[n[i]]=e}function dt(t,e){var n=e&&t,r=n&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function pt(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function ht(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function vt(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&at(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function mt(t){return ut(function(e){return e=+e,ut(function(n,r){for(var i,o=t([],n.length,e),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function gt(t){return t&&void 0!==t.getElementsByTagName&&t}for(e in n=st.support={},o=st.isXML=function(t){var e=t.namespaceURI,n=(t.ownerDocument||t).documentElement;return!G.test(e||n&&n.nodeName||"HTML")},d=st.setDocument=function(t){var e,i,a=t?t.ownerDocument||t:b;return a!==p&&9===a.nodeType&&a.documentElement?(h=(p=a).documentElement,v=!o(p),b!==p&&(i=p.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",ot,!1):i.attachEvent&&i.attachEvent("onunload",ot)),n.attributes=lt(function(t){return t.className="i",!t.getAttribute("className")}),n.getElementsByTagName=lt(function(t){return t.appendChild(p.createComment("")),!t.getElementsByTagName("*").length}),n.getElementsByClassName=Z.test(p.getElementsByClassName),n.getById=lt(function(t){return h.appendChild(t).id=_,!p.getElementsByName||!p.getElementsByName(_).length}),n.getById?(r.filter.ID=function(t){var e=t.replace(et,nt);return function(t){return t.getAttribute("id")===e}},r.find.ID=function(t,e){if(void 0!==e.getElementById&&v){var n=e.getElementById(t);return n?[n]:[]}}):(r.filter.ID=function(t){var e=t.replace(et,nt);return function(t){var n=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}},r.find.ID=function(t,e){if(void 0!==e.getElementById&&v){var n,r,i,o=e.getElementById(t);if(o){if((n=o.getAttributeNode("id"))&&n.value===t)return[o];for(i=e.getElementsByName(t),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===t)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):n.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,r=[],i=0,o=e.getElementsByTagName(t);if("*"===t){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&v)return e.getElementsByClassName(t)},g=[],m=[],(n.qsa=Z.test(p.querySelectorAll))&&(lt(function(t){h.appendChild(t).innerHTML="",t.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+R+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||m.push("\\["+R+"*(?:value|"+P+")"),t.querySelectorAll("[id~="+_+"-]").length||m.push("~="),t.querySelectorAll(":checked").length||m.push(":checked"),t.querySelectorAll("a#"+_+"+*").length||m.push(".#.+[+~]")}),lt(function(t){t.innerHTML="";var e=p.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&m.push("name"+R+"*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&m.push(":enabled",":disabled"),h.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&m.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),m.push(",.*:")})),(n.matchesSelector=Z.test(y=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&<(function(t){n.disconnectedMatch=y.call(t,"*"),y.call(t,"[s!='']:x"),g.push("!=",F)}),m=m.length&&new RegExp(m.join("|")),g=g.length&&new RegExp(g.join("|")),e=Z.test(h.compareDocumentPosition),A=e||Z.test(h.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,r=e&&e.parentNode;return t===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):t.compareDocumentPosition&&16&t.compareDocumentPosition(r)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},$=e?function(t,e){if(t===e)return f=!0,0;var r=!t.compareDocumentPosition-!e.compareDocumentPosition;return r||(1&(r=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!n.sortDetached&&e.compareDocumentPosition(t)===r?t===p||t.ownerDocument===b&&A(b,t)?-1:e===p||e.ownerDocument===b&&A(b,e)?1:l?j(l,t)-j(l,e):0:4&r?-1:1)}:function(t,e){if(t===e)return f=!0,0;var n,r=0,i=t.parentNode,o=e.parentNode,a=[t],s=[e];if(!i||!o)return t===p?-1:e===p?1:i?-1:o?1:l?j(l,t)-j(l,e):0;if(i===o)return dt(t,e);for(n=t;n=n.parentNode;)a.unshift(n);for(n=e;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?dt(a[r],s[r]):a[r]===b?-1:s[r]===b?1:0},p):p},st.matches=function(t,e){return st(t,null,null,e)},st.matchesSelector=function(t,e){if((t.ownerDocument||t)!==p&&d(t),n.matchesSelector&&v&&!E[e+" "]&&(!g||!g.test(e))&&(!m||!m.test(e)))try{var r=y.call(t,e);if(r||n.disconnectedMatch||t.document&&11!==t.document.nodeType)return r}catch(t){E(e,!0)}return st(e,p,null,[t]).length>0},st.contains=function(t,e){return(t.ownerDocument||t)!==p&&d(t),A(t,e)},st.attr=function(t,e){(t.ownerDocument||t)!==p&&d(t);var i=r.attrHandle[e.toLowerCase()],o=i&&S.call(r.attrHandle,e.toLowerCase())?i(t,e,!v):void 0;return void 0!==o?o:n.attributes||!v?t.getAttribute(e):(o=t.getAttributeNode(e))&&o.specified?o.value:null},st.escape=function(t){return(t+"").replace(rt,it)},st.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},st.uniqueSort=function(t){var e,r=[],i=0,o=0;if(f=!n.detectDuplicates,l=!n.sortStable&&t.slice(0),t.sort($),f){for(;e=t[o++];)e===t[o]&&(i=r.push(o));for(;i--;)t.splice(r[i],1)}return l=null,t},i=st.getText=function(t){var e,n="",r=0,o=t.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=i(t)}else if(3===o||4===o)return t.nodeValue}else for(;e=t[r++];)n+=i(e);return n},(r=st.selectors={cacheLength:50,createPseudo:ut,match:Y,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(et,nt),t[3]=(t[3]||t[4]||t[5]||"").replace(et,nt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||st.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&st.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return Y.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&V.test(n)&&(e=a(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(et,nt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=C[t+" "];return e||(e=new RegExp("(^|"+R+")"+t+"("+R+"|$)"))&&C(t,function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,e,n){return function(r){var i=st.attr(r,t);return null==i?"!="===e:!e||(i+="","="===e?i===n:"!="===e?i!==n:"^="===e?n&&0===i.indexOf(n):"*="===e?n&&i.indexOf(n)>-1:"$="===e?n&&i.slice(-n.length)===n:"~="===e?(" "+i.replace(H," ")+" ").indexOf(n)>-1:"|="===e&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,n,r,i){var o="nth"!==t.slice(0,3),a="last"!==t.slice(-4),s="of-type"===e;return 1===r&&0===i?function(t){return!!t.parentNode}:function(e,n,c){var u,l,f,d,p,h,v=o!==a?"nextSibling":"previousSibling",m=e.parentNode,g=s&&e.nodeName.toLowerCase(),y=!c&&!s,A=!1;if(m){if(o){for(;v;){for(d=e;d=d[v];)if(s?d.nodeName.toLowerCase()===g:1===d.nodeType)return!1;h=v="only"===t&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&y){for(A=(p=(u=(l=(f=(d=m)[_]||(d[_]={}))[d.uniqueID]||(f[d.uniqueID]={}))[t]||[])[0]===w&&u[1])&&u[2],d=p&&m.childNodes[p];d=++p&&d&&d[v]||(A=p=0)||h.pop();)if(1===d.nodeType&&++A&&d===e){l[t]=[w,p,A];break}}else if(y&&(A=p=(u=(l=(f=(d=e)[_]||(d[_]={}))[d.uniqueID]||(f[d.uniqueID]={}))[t]||[])[0]===w&&u[1]),!1===A)for(;(d=++p&&d&&d[v]||(A=p=0)||h.pop())&&((s?d.nodeName.toLowerCase()!==g:1!==d.nodeType)||!++A||(y&&((l=(f=d[_]||(d[_]={}))[d.uniqueID]||(f[d.uniqueID]={}))[t]=[w,A]),d!==e)););return(A-=i)===r||A%r==0&&A/r>=0}}},PSEUDO:function(t,e){var n,i=r.pseudos[t]||r.setFilters[t.toLowerCase()]||st.error("unsupported pseudo: "+t);return i[_]?i(e):i.length>1?(n=[t,t,"",e],r.setFilters.hasOwnProperty(t.toLowerCase())?ut(function(t,n){for(var r,o=i(t,e),a=o.length;a--;)t[r=j(t,o[a])]=!(n[r]=o[a])}):function(t){return i(t,0,n)}):i}},pseudos:{not:ut(function(t){var e=[],n=[],r=s(t.replace(U,"$1"));return r[_]?ut(function(t,e,n,i){for(var o,a=r(t,null,i,[]),s=t.length;s--;)(o=a[s])&&(t[s]=!(e[s]=o))}):function(t,i,o){return e[0]=t,r(e,null,o,n),e[0]=null,!n.pop()}}),has:ut(function(t){return function(e){return st(t,e).length>0}}),contains:ut(function(t){return t=t.replace(et,nt),function(e){return(e.textContent||i(e)).indexOf(t)>-1}}),lang:ut(function(t){return Q.test(t||"")||st.error("unsupported lang: "+t),t=t.replace(et,nt).toLowerCase(),function(e){var n;do{if(n=v?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===h},focus:function(t){return t===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:vt(!1),disabled:vt(!0),checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!r.pseudos.empty(t)},header:function(t){return J.test(t.nodeName)},input:function(t){return K.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:mt(function(){return[0]}),last:mt(function(t,e){return[e-1]}),eq:mt(function(t,e,n){return[n<0?n+e:n]}),even:mt(function(t,e){for(var n=0;ne?e:n;--r>=0;)t.push(r);return t}),gt:mt(function(t,e,n){for(var r=n<0?n+e:n;++r1?function(e,n,r){for(var i=t.length;i--;)if(!t[i](e,n,r))return!1;return!0}:t[0]}function wt(t,e,n,r,i){for(var o,a=[],s=0,c=t.length,u=null!=e;s-1&&(o[u]=!(a[u]=f))}}else g=wt(g===a?g.splice(h,g.length):g),i?i(null,a,g,c):I.apply(a,g)})}function Ct(t){for(var e,n,i,o=t.length,a=r.relative[t[0].type],s=a||r.relative[" "],c=a?1:0,l=_t(function(t){return t===e},s,!0),f=_t(function(t){return j(e,t)>-1},s,!0),d=[function(t,n,r){var i=!a&&(r||n!==u)||((e=n).nodeType?l(t,n,r):f(t,n,r));return e=null,i}];c1&&bt(d),c>1&&At(t.slice(0,c-1).concat({value:" "===t[c-2].type?"*":""})).replace(U,"$1"),n,c0,i=t.length>0,o=function(o,a,s,c,l){var f,h,m,g=0,y="0",A=o&&[],_=[],b=u,x=o||i&&r.find.TAG("*",l),C=w+=null==b?1:Math.random()||.1,T=x.length;for(l&&(u=a===p||a||l);y!==T&&null!=(f=x[y]);y++){if(i&&f){for(h=0,a||f.ownerDocument===p||(d(f),s=!v);m=t[h++];)if(m(f,a||p,s)){c.push(f);break}l&&(w=C)}n&&((f=!m&&f)&&g--,o&&A.push(f))}if(g+=y,n&&y!==g){for(h=0;m=e[h++];)m(A,_,a,s);if(o){if(g>0)for(;y--;)A[y]||_[y]||(_[y]=D.call(c));_=wt(_)}I.apply(c,_),l&&!o&&_.length>0&&g+e.length>1&&st.uniqueSort(c)}return l&&(w=C,u=b),A};return n?ut(o):o}(o,i))).selector=t}return s},c=st.select=function(t,e,n,i){var o,c,u,l,f,d="function"==typeof t&&t,p=!i&&a(t=d.selector||t);if(n=n||[],1===p.length){if((c=p[0]=p[0].slice(0)).length>2&&"ID"===(u=c[0]).type&&9===e.nodeType&&v&&r.relative[c[1].type]){if(!(e=(r.find.ID(u.matches[0].replace(et,nt),e)||[])[0]))return n;d&&(e=e.parentNode),t=t.slice(c.shift().value.length)}for(o=Y.needsContext.test(t)?0:c.length;o--&&(u=c[o],!r.relative[l=u.type]);)if((f=r.find[l])&&(i=f(u.matches[0].replace(et,nt),tt.test(c[0].type)&>(e.parentNode)||e))){if(c.splice(o,1),!(t=i.length&&At(c)))return I.apply(n,i),n;break}}return(d||s(t,p))(i,e,!v,n,!e||tt.test(t)&>(e.parentNode)||e),n},n.sortStable=_.split("").sort($).join("")===_,n.detectDuplicates=!!f,d(),n.sortDetached=lt(function(t){return 1&t.compareDocumentPosition(p.createElement("fieldset"))}),lt(function(t){return t.innerHTML="","#"===t.firstChild.getAttribute("href")})||ft("type|href|height|width",function(t,e,n){if(!n)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),n.attributes&<(function(t){return t.innerHTML="",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||ft("value",function(t,e,n){if(!n&&"input"===t.nodeName.toLowerCase())return t.defaultValue}),lt(function(t){return null==t.getAttribute("disabled")})||ft(P,function(t,e,n){var r;if(!n)return!0===t[e]?e.toLowerCase():(r=t.getAttributeNode(e))&&r.specified?r.value:null}),st}(n);x.find=k,x.expr=k.selectors,x.expr[":"]=x.expr.pseudos,x.uniqueSort=x.unique=k.uniqueSort,x.text=k.getText,x.isXMLDoc=k.isXML,x.contains=k.contains,x.escapeSelector=k.escape;var E=function(t,e,n){for(var r=[],i=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(i&&x(t).is(n))break;r.push(t)}return r},$=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},S=x.expr.match.needsContext;function B(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}var D=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function O(t,e,n){return y(e)?x.grep(t,function(t,r){return!!e.call(t,r,t)!==n}):e.nodeType?x.grep(t,function(t){return t===e!==n}):"string"!=typeof e?x.grep(t,function(t){return f.call(e,t)>-1!==n}):x.filter(e,t,n)}x.filter=function(t,e,n){var r=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===r.nodeType?x.find.matchesSelector(r,t)?[r]:[]:x.find.matches(t,x.grep(e,function(t){return 1===t.nodeType}))},x.fn.extend({find:function(t){var e,n,r=this.length,i=this;if("string"!=typeof t)return this.pushStack(x(t).filter(function(){for(e=0;e1?x.uniqueSort(n):n},filter:function(t){return this.pushStack(O(this,t||[],!1))},not:function(t){return this.pushStack(O(this,t||[],!0))},is:function(t){return!!O(this,"string"==typeof t&&S.test(t)?x(t):t||[],!1).length}});var I,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(x.fn.init=function(t,e,n){var r,i;if(!t)return this;if(n=n||I,"string"==typeof t){if(!(r="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:N.exec(t))||!r[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(r[1]){if(e=e instanceof x?e[0]:e,x.merge(this,x.parseHTML(r[1],e&&e.nodeType?e.ownerDocument||e:a,!0)),D.test(r[1])&&x.isPlainObject(e))for(r in e)y(this[r])?this[r](e[r]):this.attr(r,e[r]);return this}return(i=a.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):y(t)?void 0!==n.ready?n.ready(t):t(x):x.makeArray(t,this)}).prototype=x.fn,I=x(a);var j=/^(?:parents|prev(?:Until|All))/,P={children:!0,contents:!0,next:!0,prev:!0};function R(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}x.fn.extend({has:function(t){var e=x(t,this),n=e.length;return this.filter(function(){for(var t=0;t-1:1===n.nodeType&&x.find.matchesSelector(n,t))){o.push(n);break}return this.pushStack(o.length>1?x.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?f.call(x(t),this[0]):f.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(x.uniqueSort(x.merge(this.get(),x(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),x.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return E(t,"parentNode")},parentsUntil:function(t,e,n){return E(t,"parentNode",n)},next:function(t){return R(t,"nextSibling")},prev:function(t){return R(t,"previousSibling")},nextAll:function(t){return E(t,"nextSibling")},prevAll:function(t){return E(t,"previousSibling")},nextUntil:function(t,e,n){return E(t,"nextSibling",n)},prevUntil:function(t,e,n){return E(t,"previousSibling",n)},siblings:function(t){return $((t.parentNode||{}).firstChild,t)},children:function(t){return $(t.firstChild)},contents:function(t){return void 0!==t.contentDocument?t.contentDocument:(B(t,"template")&&(t=t.content||t),x.merge([],t.childNodes))}},function(t,e){x.fn[t]=function(n,r){var i=x.map(this,e,n);return"Until"!==t.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(P[t]||x.uniqueSort(i),j.test(t)&&i.reverse()),this.pushStack(i)}});var L=/[^\x20\t\r\n\f]+/g;function M(t){return t}function F(t){throw t}function H(t,e,n,r){var i;try{t&&y(i=t.promise)?i.call(t).done(e).fail(n):t&&y(i=t.then)?i.call(t,e,n):e.apply(void 0,[t].slice(r))}catch(t){n.apply(void 0,[t])}}x.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return x.each(t.match(L)||[],function(t,n){e[n]=!0}),e}(t):x.extend({},t);var e,n,r,i,o=[],a=[],s=-1,c=function(){for(i=i||t.once,r=e=!0;a.length;s=-1)for(n=a.shift();++s-1;)o.splice(n,1),n<=s&&s--}),this},has:function(t){return t?x.inArray(t,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||e||(o=n=""),this},locked:function(){return!!i},fireWith:function(t,n){return i||(n=[t,(n=n||[]).slice?n.slice():n],a.push(n),e||c()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!r}};return u},x.extend({Deferred:function(t){var e=[["notify","progress",x.Callbacks("memory"),x.Callbacks("memory"),2],["resolve","done",x.Callbacks("once memory"),x.Callbacks("once memory"),0,"resolved"],["reject","fail",x.Callbacks("once memory"),x.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},catch:function(t){return i.then(null,t)},pipe:function(){var t=arguments;return x.Deferred(function(n){x.each(e,function(e,r){var i=y(t[r[4]])&&t[r[4]];o[r[1]](function(){var t=i&&i.apply(this,arguments);t&&y(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[t]:arguments)})}),t=null}).promise()},then:function(t,r,i){var o=0;function a(t,e,r,i){return function(){var s=this,c=arguments,u=function(){var n,u;if(!(t=o&&(r!==F&&(s=void 0,c=[n]),e.rejectWith(s,c))}};t?l():(x.Deferred.getStackHook&&(l.stackTrace=x.Deferred.getStackHook()),n.setTimeout(l))}}return x.Deferred(function(n){e[0][3].add(a(0,n,y(i)?i:M,n.notifyWith)),e[1][3].add(a(0,n,y(t)?t:M)),e[2][3].add(a(0,n,y(r)?r:F))}).promise()},promise:function(t){return null!=t?x.extend(t,i):i}},o={};return x.each(e,function(t,n){var a=n[2],s=n[5];i[n[1]]=a.add,s&&a.add(function(){r=s},e[3-t][2].disable,e[3-t][3].disable,e[0][2].lock,e[0][3].lock),a.add(n[3].fire),o[n[0]]=function(){return o[n[0]+"With"](this===o?void 0:this,arguments),this},o[n[0]+"With"]=a.fireWith}),i.promise(o),t&&t.call(o,o),o},when:function(t){var e=arguments.length,n=e,r=Array(n),i=c.call(arguments),o=x.Deferred(),a=function(t){return function(n){r[t]=this,i[t]=arguments.length>1?c.call(arguments):n,--e||o.resolveWith(r,i)}};if(e<=1&&(H(t,o.done(a(n)).resolve,o.reject,!e),"pending"===o.state()||y(i[n]&&i[n].then)))return o.then();for(;n--;)H(i[n],a(n),o.reject);return o.promise()}});var U=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;x.Deferred.exceptionHook=function(t,e){n.console&&n.console.warn&&t&&U.test(t.name)&&n.console.warn("jQuery.Deferred exception: "+t.message,t.stack,e)},x.readyException=function(t){n.setTimeout(function(){throw t})};var z=x.Deferred();function q(){a.removeEventListener("DOMContentLoaded",q),n.removeEventListener("load",q),x.ready()}x.fn.ready=function(t){return z.then(t).catch(function(t){x.readyException(t)}),this},x.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--x.readyWait:x.isReady)||(x.isReady=!0,!0!==t&&--x.readyWait>0||z.resolveWith(a,[x]))}}),x.ready.then=z.then,"complete"===a.readyState||"loading"!==a.readyState&&!a.documentElement.doScroll?n.setTimeout(x.ready):(a.addEventListener("DOMContentLoaded",q),n.addEventListener("load",q));var W=function(t,e,n,r,i,o,a){var s=0,c=t.length,u=null==n;if("object"===w(n))for(s in i=!0,n)W(t,e,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,y(r)||(a=!0),u&&(a?(e.call(t,r),e=null):(u=e,e=function(t,e,n){return u.call(x(t),n)})),e))for(;s1,null,!0)},removeData:function(t){return this.each(function(){X.remove(this,t)})}}),x.extend({queue:function(t,e,n){var r;if(t)return e=(e||"fx")+"queue",r=Z.get(t,e),n&&(!r||Array.isArray(n)?r=Z.access(t,e,x.makeArray(n)):r.push(n)),r||[]},dequeue:function(t,e){e=e||"fx";var n=x.queue(t,e),r=n.length,i=n.shift(),o=x._queueHooks(t,e);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===e&&n.unshift("inprogress"),delete o.stop,i.call(t,function(){x.dequeue(t,e)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return Z.get(t,n)||Z.access(t,n,{empty:x.Callbacks("once memory").add(function(){Z.remove(t,[e+"queue",n])})})}}),x.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length\x20\t\r\n\f]*)/i,gt=/^$|^module$|\/(?:java|ecma)script/i,yt={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function At(t,e){var n;return n=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&B(t,e)?x.merge([t],n):n}function _t(t,e){for(var n=0,r=t.length;n-1)i&&i.push(o);else if(u=st(o),a=At(f.appendChild(o),"script"),u&&_t(a),n)for(l=0;o=a[l++];)gt.test(o.type||"")&&n.push(o);return f}bt=a.createDocumentFragment().appendChild(a.createElement("div")),(wt=a.createElement("input")).setAttribute("type","radio"),wt.setAttribute("checked","checked"),wt.setAttribute("name","t"),bt.appendChild(wt),g.checkClone=bt.cloneNode(!0).cloneNode(!0).lastChild.checked,bt.innerHTML="",g.noCloneChecked=!!bt.cloneNode(!0).lastChild.defaultValue;var Tt=/^key/,kt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Et=/^([^.]*)(?:\.(.+)|)/;function $t(){return!0}function St(){return!1}function Bt(t,e){return t===function(){try{return a.activeElement}catch(t){}}()==("focus"===e)}function Dt(t,e,n,r,i,o){var a,s;if("object"==typeof e){for(s in"string"!=typeof n&&(r=r||n,n=void 0),e)Dt(t,s,n,r,e[s],o);return t}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=St;else if(!i)return t;return 1===o&&(a=i,(i=function(t){return x().off(t),a.apply(this,arguments)}).guid=a.guid||(a.guid=x.guid++)),t.each(function(){x.event.add(this,e,i,r,n)})}function Ot(t,e,n){n?(Z.set(t,e,!1),x.event.add(t,e,{namespace:!1,handler:function(t){var r,i,o=Z.get(this,e);if(1&t.isTrigger&&this[e]){if(o.length)(x.event.special[e]||{}).delegateType&&t.stopPropagation();else if(o=c.call(arguments),Z.set(this,e,o),r=n(this,e),this[e](),o!==(i=Z.get(this,e))||r?Z.set(this,e,!1):i={},o!==i)return t.stopImmediatePropagation(),t.preventDefault(),i.value}else o.length&&(Z.set(this,e,{value:x.event.trigger(x.extend(o[0],x.Event.prototype),o.slice(1),this)}),t.stopImmediatePropagation())}})):void 0===Z.get(t,e)&&x.event.add(t,e,$t)}x.event={global:{},add:function(t,e,n,r,i){var o,a,s,c,u,l,f,d,p,h,v,m=Z.get(t);if(m)for(n.handler&&(n=(o=n).handler,i=o.selector),i&&x.find.matchesSelector(at,i),n.guid||(n.guid=x.guid++),(c=m.events)||(c=m.events={}),(a=m.handle)||(a=m.handle=function(e){return void 0!==x&&x.event.triggered!==e.type?x.event.dispatch.apply(t,arguments):void 0}),u=(e=(e||"").match(L)||[""]).length;u--;)p=v=(s=Et.exec(e[u])||[])[1],h=(s[2]||"").split(".").sort(),p&&(f=x.event.special[p]||{},p=(i?f.delegateType:f.bindType)||p,f=x.event.special[p]||{},l=x.extend({type:p,origType:v,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&x.expr.match.needsContext.test(i),namespace:h.join(".")},o),(d=c[p])||((d=c[p]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(p,a)),f.add&&(f.add.call(t,l),l.handler.guid||(l.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,l):d.push(l),x.event.global[p]=!0)},remove:function(t,e,n,r,i){var o,a,s,c,u,l,f,d,p,h,v,m=Z.hasData(t)&&Z.get(t);if(m&&(c=m.events)){for(u=(e=(e||"").match(L)||[""]).length;u--;)if(p=v=(s=Et.exec(e[u])||[])[1],h=(s[2]||"").split(".").sort(),p){for(f=x.event.special[p]||{},d=c[p=(r?f.delegateType:f.bindType)||p]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=d.length;o--;)l=d[o],!i&&v!==l.origType||n&&n.guid!==l.guid||s&&!s.test(l.namespace)||r&&r!==l.selector&&("**"!==r||!l.selector)||(d.splice(o,1),l.selector&&d.delegateCount--,f.remove&&f.remove.call(t,l));a&&!d.length&&(f.teardown&&!1!==f.teardown.call(t,h,m.handle)||x.removeEvent(t,p,m.handle),delete c[p])}else for(p in c)x.event.remove(t,p+e[u],n,r,!0);x.isEmptyObject(c)&&Z.remove(t,"handle events")}},dispatch:function(t){var e,n,r,i,o,a,s=x.event.fix(t),c=new Array(arguments.length),u=(Z.get(this,"events")||{})[s.type]||[],l=x.event.special[s.type]||{};for(c[0]=s,e=1;e=1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&("click"!==t.type||!0!==u.disabled)){for(o=[],a={},n=0;n-1:x.find(i,this,null,[u]).length),a[i]&&o.push(r);o.length&&s.push({elem:u,handlers:o})}return u=this,c\x20\t\r\n\f]*)[^>]*)\/>/gi,Nt=/\s*$/g;function Rt(t,e){return B(t,"table")&&B(11!==e.nodeType?e:e.firstChild,"tr")&&x(t).children("tbody")[0]||t}function Lt(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Mt(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function Ft(t,e){var n,r,i,o,a,s,c,u;if(1===e.nodeType){if(Z.hasData(t)&&(o=Z.access(t),a=Z.set(e,o),u=o.events))for(i in delete a.handle,a.events={},u)for(n=0,r=u[i].length;n1&&"string"==typeof h&&!g.checkClone&&jt.test(h))return t.each(function(i){var o=t.eq(i);v&&(e[0]=h.call(this,i,o.html())),Ut(o,e,n,r)});if(d&&(o=(i=Ct(e,t[0].ownerDocument,!1,t,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(s=(a=x.map(At(i,"script"),Lt)).length;f")},clone:function(t,e,n){var r,i,o,a,s=t.cloneNode(!0),c=st(t);if(!(g.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||x.isXMLDoc(t)))for(a=At(s),r=0,i=(o=At(t)).length;r0&&_t(a,!c&&At(t,"script")),s},cleanData:function(t){for(var e,n,r,i=x.event.special,o=0;void 0!==(n=t[o]);o++)if(K(n)){if(e=n[Z.expando]){if(e.events)for(r in e.events)i[r]?x.event.remove(n,r):x.removeEvent(n,r,e.handle);n[Z.expando]=void 0}n[X.expando]&&(n[X.expando]=void 0)}}}),x.fn.extend({detach:function(t){return zt(this,t,!0)},remove:function(t){return zt(this,t)},text:function(t){return W(this,function(t){return void 0===t?x.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)})},null,t,arguments.length)},append:function(){return Ut(this,arguments,function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Rt(this,t).appendChild(t)})},prepend:function(){return Ut(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=Rt(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return Ut(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return Ut(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(x.cleanData(At(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return x.clone(this,t,e)})},html:function(t){return W(this,function(t){var e=this[0]||{},n=0,r=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!Nt.test(t)&&!yt[(mt.exec(t)||["",""])[1].toLowerCase()]){t=x.htmlPrefilter(t);try{for(;n=0&&(c+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-o-c-s-.5))||0),c}function oe(t,e,n){var r=Wt(t),i=(!g.boxSizingReliable()||n)&&"border-box"===x.css(t,"boxSizing",!1,r),o=i,a=Qt(t,e,r),s="offset"+e[0].toUpperCase()+e.slice(1);if(qt.test(a)){if(!n)return a;a="auto"}return(!g.boxSizingReliable()&&i||"auto"===a||!parseFloat(a)&&"inline"===x.css(t,"display",!1,r))&&t.getClientRects().length&&(i="border-box"===x.css(t,"boxSizing",!1,r),(o=s in t)&&(a=t[s])),(a=parseFloat(a)||0)+ie(t,e,n||(i?"border":"content"),o,r,a)+"px"}function ae(t,e,n,r,i){return new ae.prototype.init(t,e,n,r,i)}x.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=Qt(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(t,e,n,r){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var i,o,a,s=G(e),c=te.test(e),u=t.style;if(c||(e=Zt(s)),a=x.cssHooks[e]||x.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(t,!1,r))?i:u[e];"string"===(o=typeof n)&&(i=it.exec(n))&&i[1]&&(n=ft(t,e,i),o="number"),null!=n&&n==n&&("number"!==o||c||(n+=i&&i[3]||(x.cssNumber[s]?"":"px")),g.clearCloneStyle||""!==n||0!==e.indexOf("background")||(u[e]="inherit"),a&&"set"in a&&void 0===(n=a.set(t,n,r))||(c?u.setProperty(e,n):u[e]=n))}},css:function(t,e,n,r){var i,o,a,s=G(e);return te.test(e)||(e=Zt(s)),(a=x.cssHooks[e]||x.cssHooks[s])&&"get"in a&&(i=a.get(t,!0,n)),void 0===i&&(i=Qt(t,e,r)),"normal"===i&&e in ne&&(i=ne[e]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),x.each(["height","width"],function(t,e){x.cssHooks[e]={get:function(t,n,r){if(n)return!Xt.test(x.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?oe(t,e,r):lt(t,ee,function(){return oe(t,e,r)})},set:function(t,n,r){var i,o=Wt(t),a=!g.scrollboxSize()&&"absolute"===o.position,s=(a||r)&&"border-box"===x.css(t,"boxSizing",!1,o),c=r?ie(t,e,r,s,o):0;return s&&a&&(c-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(o[e])-ie(t,e,"border",!1,o)-.5)),c&&(i=it.exec(n))&&"px"!==(i[3]||"px")&&(t.style[e]=n,n=x.css(t,e)),re(0,n,c)}}}),x.cssHooks.marginLeft=Yt(g.reliableMarginLeft,function(t,e){if(e)return(parseFloat(Qt(t,"marginLeft"))||t.getBoundingClientRect().left-lt(t,{marginLeft:0},function(){return t.getBoundingClientRect().left}))+"px"}),x.each({margin:"",padding:"",border:"Width"},function(t,e){x.cssHooks[t+e]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[t+ot[r]+e]=o[r]||o[r-2]||o[0];return i}},"margin"!==t&&(x.cssHooks[t+e].set=re)}),x.fn.extend({css:function(t,e){return W(this,function(t,e,n){var r,i,o={},a=0;if(Array.isArray(e)){for(r=Wt(t),i=e.length;a1)}}),x.Tween=ae,ae.prototype={constructor:ae,init:function(t,e,n,r,i,o){this.elem=t,this.prop=n,this.easing=i||x.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=r,this.unit=o||(x.cssNumber[n]?"":"px")},cur:function(){var t=ae.propHooks[this.prop];return t&&t.get?t.get(this):ae.propHooks._default.get(this)},run:function(t){var e,n=ae.propHooks[this.prop];return this.options.duration?this.pos=e=x.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):ae.propHooks._default.set(this),this}},ae.prototype.init.prototype=ae.prototype,ae.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=x.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){x.fx.step[t.prop]?x.fx.step[t.prop](t):1!==t.elem.nodeType||!x.cssHooks[t.prop]&&null==t.elem.style[Zt(t.prop)]?t.elem[t.prop]=t.now:x.style(t.elem,t.prop,t.now+t.unit)}}},ae.propHooks.scrollTop=ae.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},x.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},x.fx=ae.prototype.init,x.fx.step={};var se,ce,ue=/^(?:toggle|show|hide)$/,le=/queueHooks$/;function fe(){ce&&(!1===a.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(fe):n.setTimeout(fe,x.fx.interval),x.fx.tick())}function de(){return n.setTimeout(function(){se=void 0}),se=Date.now()}function pe(t,e){var n,r=0,i={height:t};for(e=e?1:0;r<4;r+=2-e)i["margin"+(n=ot[r])]=i["padding"+n]=t;return e&&(i.opacity=i.width=t),i}function he(t,e,n){for(var r,i=(ve.tweeners[e]||[]).concat(ve.tweeners["*"]),o=0,a=i.length;o1)},removeAttr:function(t){return this.each(function(){x.removeAttr(this,t)})}}),x.extend({attr:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===t.getAttribute?x.prop(t,e,n):(1===o&&x.isXMLDoc(t)||(i=x.attrHooks[e.toLowerCase()]||(x.expr.match.bool.test(e)?me:void 0)),void 0!==n?null===n?void x.removeAttr(t,e):i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:(t.setAttribute(e,n+""),n):i&&"get"in i&&null!==(r=i.get(t,e))?r:null==(r=x.find.attr(t,e))?void 0:r)},attrHooks:{type:{set:function(t,e){if(!g.radioValue&&"radio"===e&&B(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,r=0,i=e&&e.match(L);if(i&&1===t.nodeType)for(;n=i[r++];)t.removeAttribute(n)}}),me={set:function(t,e,n){return!1===e?x.removeAttr(t,n):t.setAttribute(n,n),n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(t,e){var n=ge[e]||x.find.attr;ge[e]=function(t,e,r){var i,o,a=e.toLowerCase();return r||(o=ge[a],ge[a]=i,i=null!=n(t,e,r)?a:null,ge[a]=o),i}});var ye=/^(?:input|select|textarea|button)$/i,Ae=/^(?:a|area)$/i;function _e(t){return(t.match(L)||[]).join(" ")}function be(t){return t.getAttribute&&t.getAttribute("class")||""}function we(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(L)||[]}x.fn.extend({prop:function(t,e){return W(this,x.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[x.propFix[t]||t]})}}),x.extend({prop:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&x.isXMLDoc(t)||(e=x.propFix[e]||e,i=x.propHooks[e]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:t[e]=n:i&&"get"in i&&null!==(r=i.get(t,e))?r:t[e]},propHooks:{tabIndex:{get:function(t){var e=x.find.attr(t,"tabindex");return e?parseInt(e,10):ye.test(t.nodeName)||Ae.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),g.optSelected||(x.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.fn.extend({addClass:function(t){var e,n,r,i,o,a,s,c=0;if(y(t))return this.each(function(e){x(this).addClass(t.call(this,e,be(this)))});if((e=we(t)).length)for(;n=this[c++];)if(i=be(n),r=1===n.nodeType&&" "+_e(i)+" "){for(a=0;o=e[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=_e(r))&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,n,r,i,o,a,s,c=0;if(y(t))return this.each(function(e){x(this).removeClass(t.call(this,e,be(this)))});if(!arguments.length)return this.attr("class","");if((e=we(t)).length)for(;n=this[c++];)if(i=be(n),r=1===n.nodeType&&" "+_e(i)+" "){for(a=0;o=e[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");i!==(s=_e(r))&&n.setAttribute("class",s)}return this},toggleClass:function(t,e){var n=typeof t,r="string"===n||Array.isArray(t);return"boolean"==typeof e&&r?e?this.addClass(t):this.removeClass(t):y(t)?this.each(function(n){x(this).toggleClass(t.call(this,n,be(this),e),e)}):this.each(function(){var e,i,o,a;if(r)for(i=0,o=x(this),a=we(t);e=a[i++];)o.hasClass(e)?o.removeClass(e):o.addClass(e);else void 0!==t&&"boolean"!==n||((e=be(this))&&Z.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===t?"":Z.get(this,"__className__")||""))})},hasClass:function(t){var e,n,r=0;for(e=" "+t+" ";n=this[r++];)if(1===n.nodeType&&(" "+_e(be(n))+" ").indexOf(e)>-1)return!0;return!1}});var xe=/\r/g;x.fn.extend({val:function(t){var e,n,r,i=this[0];return arguments.length?(r=y(t),this.each(function(n){var i;1===this.nodeType&&(null==(i=r?t.call(this,n,x(this).val()):t)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=x.map(i,function(t){return null==t?"":t+""})),(e=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,i,"value")||(this.value=i))})):i?(e=x.valHooks[i.type]||x.valHooks[i.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(xe,""):null==n?"":n:void 0}}),x.extend({valHooks:{option:{get:function(t){var e=x.find.attr(t,"value");return null!=e?e:_e(x.text(t))}},select:{get:function(t){var e,n,r,i=t.options,o=t.selectedIndex,a="select-one"===t.type,s=a?null:[],c=a?o+1:i.length;for(r=o<0?c:a?o:0;r-1)&&(n=!0);return n||(t.selectedIndex=-1),o}}}}),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=x.inArray(x(t).val(),e)>-1}},g.checkOn||(x.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})}),g.focusin="onfocusin"in n;var Ce=/^(?:focusinfocus|focusoutblur)$/,Te=function(t){t.stopPropagation()};x.extend(x.event,{trigger:function(t,e,r,i){var o,s,c,u,l,f,d,p,v=[r||a],m=h.call(t,"type")?t.type:t,g=h.call(t,"namespace")?t.namespace.split("."):[];if(s=p=c=r=r||a,3!==r.nodeType&&8!==r.nodeType&&!Ce.test(m+x.event.triggered)&&(m.indexOf(".")>-1&&(g=m.split("."),m=g.shift(),g.sort()),l=m.indexOf(":")<0&&"on"+m,(t=t[x.expando]?t:new x.Event(m,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=g.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),e=null==e?[t]:x.makeArray(e,[t]),d=x.event.special[m]||{},i||!d.trigger||!1!==d.trigger.apply(r,e))){if(!i&&!d.noBubble&&!A(r)){for(u=d.delegateType||m,Ce.test(u+m)||(s=s.parentNode);s;s=s.parentNode)v.push(s),c=s;c===(r.ownerDocument||a)&&v.push(c.defaultView||c.parentWindow||n)}for(o=0;(s=v[o++])&&!t.isPropagationStopped();)p=s,t.type=o>1?u:d.bindType||m,(f=(Z.get(s,"events")||{})[t.type]&&Z.get(s,"handle"))&&f.apply(s,e),(f=l&&s[l])&&f.apply&&K(s)&&(t.result=f.apply(s,e),!1===t.result&&t.preventDefault());return t.type=m,i||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(v.pop(),e)||!K(r)||l&&y(r[m])&&!A(r)&&((c=r[l])&&(r[l]=null),x.event.triggered=m,t.isPropagationStopped()&&p.addEventListener(m,Te),r[m](),t.isPropagationStopped()&&p.removeEventListener(m,Te),x.event.triggered=void 0,c&&(r[l]=c)),t.result}},simulate:function(t,e,n){var r=x.extend(new x.Event,n,{type:t,isSimulated:!0});x.event.trigger(r,null,e)}}),x.fn.extend({trigger:function(t,e){return this.each(function(){x.event.trigger(t,e,this)})},triggerHandler:function(t,e){var n=this[0];if(n)return x.event.trigger(t,e,n,!0)}}),g.focusin||x.each({focus:"focusin",blur:"focusout"},function(t,e){var n=function(t){x.event.simulate(e,t.target,x.event.fix(t))};x.event.special[e]={setup:function(){var r=this.ownerDocument||this,i=Z.access(r,e);i||r.addEventListener(t,n,!0),Z.access(r,e,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=Z.access(r,e)-1;i?Z.access(r,e,i):(r.removeEventListener(t,n,!0),Z.remove(r,e))}}});var ke=n.location,Ee=Date.now(),$e=/\?/;x.parseXML=function(t){var e;if(!t||"string"!=typeof t)return null;try{e=(new n.DOMParser).parseFromString(t,"text/xml")}catch(t){e=void 0}return e&&!e.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+t),e};var Se=/\[\]$/,Be=/\r?\n/g,De=/^(?:submit|button|image|reset|file)$/i,Oe=/^(?:input|select|textarea|keygen)/i;function Ie(t,e,n,r){var i;if(Array.isArray(e))x.each(e,function(e,i){n||Se.test(t)?r(t,i):Ie(t+"["+("object"==typeof i&&null!=i?e:"")+"]",i,n,r)});else if(n||"object"!==w(e))r(t,e);else for(i in e)Ie(t+"["+i+"]",e[i],n,r)}x.param=function(t,e){var n,r=[],i=function(t,e){var n=y(e)?e():e;r[r.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!x.isPlainObject(t))x.each(t,function(){i(this.name,this.value)});else for(n in t)Ie(n,t[n],e,i);return r.join("&")},x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=x.prop(this,"elements");return t?x.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!x(this).is(":disabled")&&Oe.test(this.nodeName)&&!De.test(t)&&(this.checked||!vt.test(t))}).map(function(t,e){var n=x(this).val();return null==n?null:Array.isArray(n)?x.map(n,function(t){return{name:e.name,value:t.replace(Be,"\r\n")}}):{name:e.name,value:n.replace(Be,"\r\n")}}).get()}});var Ne=/%20/g,je=/#.*$/,Pe=/([?&])_=[^&]*/,Re=/^(.*?):[ \t]*([^\r\n]*)$/gm,Le=/^(?:GET|HEAD)$/,Me=/^\/\//,Fe={},He={},Ue="*/".concat("*"),ze=a.createElement("a");function qe(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var r,i=0,o=e.toLowerCase().match(L)||[];if(y(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(t[r]=t[r]||[]).unshift(n)):(t[r]=t[r]||[]).push(n)}}function We(t,e,n,r){var i={},o=t===He;function a(s){var c;return i[s]=!0,x.each(t[s]||[],function(t,s){var u=s(e,n,r);return"string"!=typeof u||o||i[u]?o?!(c=u):void 0:(e.dataTypes.unshift(u),a(u),!1)}),c}return a(e.dataTypes[0])||!i["*"]&&a("*")}function Ve(t,e){var n,r,i=x.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((i[n]?t:r||(r={}))[n]=e[n]);return r&&x.extend(!0,t,r),t}ze.href=ke.href,x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ke.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(ke.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ue,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?Ve(Ve(t,x.ajaxSettings),e):Ve(x.ajaxSettings,t)},ajaxPrefilter:qe(Fe),ajaxTransport:qe(He),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var r,i,o,s,c,u,l,f,d,p,h=x.ajaxSetup({},e),v=h.context||h,m=h.context&&(v.nodeType||v.jquery)?x(v):x.event,g=x.Deferred(),y=x.Callbacks("once memory"),A=h.statusCode||{},_={},b={},w="canceled",C={readyState:0,getResponseHeader:function(t){var e;if(l){if(!s)for(s={};e=Re.exec(o);)s[e[1].toLowerCase()+" "]=(s[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=s[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return l?o:null},setRequestHeader:function(t,e){return null==l&&(t=b[t.toLowerCase()]=b[t.toLowerCase()]||t,_[t]=e),this},overrideMimeType:function(t){return null==l&&(h.mimeType=t),this},statusCode:function(t){var e;if(t)if(l)C.always(t[C.status]);else for(e in t)A[e]=[A[e],t[e]];return this},abort:function(t){var e=t||w;return r&&r.abort(e),T(0,e),this}};if(g.promise(C),h.url=((t||h.url||ke.href)+"").replace(Me,ke.protocol+"//"),h.type=e.method||e.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(L)||[""],null==h.crossDomain){u=a.createElement("a");try{u.href=h.url,u.href=u.href,h.crossDomain=ze.protocol+"//"+ze.host!=u.protocol+"//"+u.host}catch(t){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=x.param(h.data,h.traditional)),We(Fe,h,e,C),l)return C;for(d in(f=x.event&&h.global)&&0==x.active++&&x.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Le.test(h.type),i=h.url.replace(je,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(Ne,"+")):(p=h.url.slice(i.length),h.data&&(h.processData||"string"==typeof h.data)&&(i+=($e.test(i)?"&":"?")+h.data,delete h.data),!1===h.cache&&(i=i.replace(Pe,"$1"),p=($e.test(i)?"&":"?")+"_="+Ee+++p),h.url=i+p),h.ifModified&&(x.lastModified[i]&&C.setRequestHeader("If-Modified-Since",x.lastModified[i]),x.etag[i]&&C.setRequestHeader("If-None-Match",x.etag[i])),(h.data&&h.hasContent&&!1!==h.contentType||e.contentType)&&C.setRequestHeader("Content-Type",h.contentType),C.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+Ue+"; q=0.01":""):h.accepts["*"]),h.headers)C.setRequestHeader(d,h.headers[d]);if(h.beforeSend&&(!1===h.beforeSend.call(v,C,h)||l))return C.abort();if(w="abort",y.add(h.complete),C.done(h.success),C.fail(h.error),r=We(He,h,e,C)){if(C.readyState=1,f&&m.trigger("ajaxSend",[C,h]),l)return C;h.async&&h.timeout>0&&(c=n.setTimeout(function(){C.abort("timeout")},h.timeout));try{l=!1,r.send(_,T)}catch(t){if(l)throw t;T(-1,t)}}else T(-1,"No Transport");function T(t,e,a,s){var u,d,p,_,b,w=e;l||(l=!0,c&&n.clearTimeout(c),r=void 0,o=s||"",C.readyState=t>0?4:0,u=t>=200&&t<300||304===t,a&&(_=function(t,e,n){for(var r,i,o,a,s=t.contents,c=t.dataTypes;"*"===c[0];)c.shift(),void 0===r&&(r=t.mimeType||e.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){c.unshift(i);break}if(c[0]in n)o=c[0];else{for(i in n){if(!c[0]||t.converters[i+" "+c[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==c[0]&&c.unshift(o),n[o]}(h,C,a)),_=function(t,e,n,r){var i,o,a,s,c,u={},l=t.dataTypes.slice();if(l[1])for(a in t.converters)u[a.toLowerCase()]=t.converters[a];for(o=l.shift();o;)if(t.responseFields[o]&&(n[t.responseFields[o]]=e),!c&&r&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),c=o,o=l.shift())if("*"===o)o=c;else if("*"!==c&&c!==o){if(!(a=u[c+" "+o]||u["* "+o]))for(i in u)if((s=i.split(" "))[1]===o&&(a=u[c+" "+s[0]]||u["* "+s[0]])){!0===a?a=u[i]:!0!==u[i]&&(o=s[0],l.unshift(s[1]));break}if(!0!==a)if(a&&t.throws)e=a(e);else try{e=a(e)}catch(t){return{state:"parsererror",error:a?t:"No conversion from "+c+" to "+o}}}return{state:"success",data:e}}(h,_,C,u),u?(h.ifModified&&((b=C.getResponseHeader("Last-Modified"))&&(x.lastModified[i]=b),(b=C.getResponseHeader("etag"))&&(x.etag[i]=b)),204===t||"HEAD"===h.type?w="nocontent":304===t?w="notmodified":(w=_.state,d=_.data,u=!(p=_.error))):(p=w,!t&&w||(w="error",t<0&&(t=0))),C.status=t,C.statusText=(e||w)+"",u?g.resolveWith(v,[d,w,C]):g.rejectWith(v,[C,w,p]),C.statusCode(A),A=void 0,f&&m.trigger(u?"ajaxSuccess":"ajaxError",[C,h,u?d:p]),y.fireWith(v,[C,w]),f&&(m.trigger("ajaxComplete",[C,h]),--x.active||x.event.trigger("ajaxStop")))}return C},getJSON:function(t,e,n){return x.get(t,e,n,"json")},getScript:function(t,e){return x.get(t,void 0,e,"script")}}),x.each(["get","post"],function(t,e){x[e]=function(t,n,r,i){return y(n)&&(i=i||r,r=n,n=void 0),x.ajax(x.extend({url:t,type:e,dataType:i,data:n,success:r},x.isPlainObject(t)&&t))}}),x._evalUrl=function(t,e){return x.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){x.globalEval(t,e)}})},x.fn.extend({wrapAll:function(t){var e;return this[0]&&(y(t)&&(t=t.call(this[0])),e=x(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this},wrapInner:function(t){return y(t)?this.each(function(e){x(this).wrapInner(t.call(this,e))}):this.each(function(){var e=x(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)})},wrap:function(t){var e=y(t);return this.each(function(n){x(this).wrapAll(e?t.call(this,n):t)})},unwrap:function(t){return this.parent(t).not("body").each(function(){x(this).replaceWith(this.childNodes)}),this}}),x.expr.pseudos.hidden=function(t){return!x.expr.pseudos.visible(t)},x.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},x.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(t){}};var Qe={0:200,1223:204},Ye=x.ajaxSettings.xhr();g.cors=!!Ye&&"withCredentials"in Ye,g.ajax=Ye=!!Ye,x.ajaxTransport(function(t){var e,r;if(g.cors||Ye&&!t.crossDomain)return{send:function(i,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];for(a in t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)s.setRequestHeader(a,i[a]);e=function(t){return function(){e&&(e=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===t?s.abort():"error"===t?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(Qe[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=e(),r=s.onerror=s.ontimeout=e("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&n.setTimeout(function(){e&&r()})},e=e("abort");try{s.send(t.hasContent&&t.data||null)}catch(t){if(e)throw t}},abort:function(){e&&e()}}}),x.ajaxPrefilter(function(t){t.crossDomain&&(t.contents.script=!1)}),x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return x.globalEval(t),t}}}),x.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),x.ajaxTransport("script",function(t){var e,n;if(t.crossDomain||t.scriptAttrs)return{send:function(r,i){e=x(" diff --git a/resources/assets/js/components/passport/PersonalAccessTokens.vue b/resources/assets/js/components/passport/PersonalAccessTokens.vue index 306abf6a14..4eb585eba0 100644 --- a/resources/assets/js/components/passport/PersonalAccessTokens.vue +++ b/resources/assets/js/components/passport/PersonalAccessTokens.vue @@ -18,7 +18,6 @@ - along with this program. If not, see . --> -