From f48bc8d299222640477bb6917917c384772ee64b Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 4 Jul 2020 12:08:38 +0200 Subject: [PATCH] Budget and category charts in new layout. --- .../Controllers/Chart/AccountController.php | 2 + .../V1/Controllers/Chart/BudgetController.php | 308 ++++++++++++++++++ .../Controllers/Chart/CategoryController.php | 29 +- .../Controllers/Search/AccountController.php | 3 +- .../Controllers/Search/TransferController.php | 115 ------- .../Controllers/Chart/BudgetController.php | 2 +- frontend/package-lock.json | 6 +- frontend/package.json | 2 +- frontend/public/js/dashboard.js | 2 +- frontend/public/js/dashboard.js.map | 2 +- frontend/public/js/register.js | 2 +- frontend/public/js/register.js.map | 2 +- frontend/public/js/vendor.js | 2 +- frontend/public/js/vendor.js.map | 2 +- .../src/components/charts/DataConverter.vue | 30 +- .../components/charts/DefaultBarOptions.vue | 148 +++++++++ .../src/components/dashboard/Dashboard.vue | 4 +- .../src/components/dashboard/MainAccount.vue | 11 +- .../src/components/dashboard/MainBudget.vue | 82 +++++ .../components/dashboard/MainBudgetChart.vue | 26 +- .../src/components/dashboard/MainCategory.vue | 81 +++++ .../dashboard/MainCategoryChart.vue | 24 +- .../transactions/TransactionListLarge.vue | 8 +- frontend/src/pages/dashboard.js | 8 +- public/v2/js/dashboard.js | 2 +- public/v2/js/dashboard.js.map | 2 +- public/v2/js/register.js | 2 +- public/v2/js/register.js.map | 2 +- public/v2/js/vendor.js | 2 +- public/v2/js/vendor.js.map | 2 +- resources/lang/en_US/firefly.php | 1 + routes/api.php | 12 +- 32 files changed, 704 insertions(+), 222 deletions(-) create mode 100644 app/Api/V1/Controllers/Chart/BudgetController.php delete mode 100644 app/Api/V1/Controllers/Search/TransferController.php create mode 100644 frontend/src/components/charts/DefaultBarOptions.vue create mode 100644 frontend/src/components/dashboard/MainBudget.vue create mode 100644 frontend/src/components/dashboard/MainCategory.vue diff --git a/app/Api/V1/Controllers/Chart/AccountController.php b/app/Api/V1/Controllers/Chart/AccountController.php index b82d861692..0da7d09c7d 100644 --- a/app/Api/V1/Controllers/Chart/AccountController.php +++ b/app/Api/V1/Controllers/Chart/AccountController.php @@ -194,6 +194,8 @@ class AccountController extends Controller 'currency_code' => $currency->code, 'currency_symbol' => $currency->symbol, 'currency_decimal_places' => $currency->decimal_places, + 'start_date' => $start->format('Y-m-d'), + 'end_date' => $end->format('Y-m-d'), 'type' => 'line', // line, area or bar 'yAxisID' => 0, // 0, 1, 2 'entries' => [], diff --git a/app/Api/V1/Controllers/Chart/BudgetController.php b/app/Api/V1/Controllers/Chart/BudgetController.php new file mode 100644 index 0000000000..50e12f8aca --- /dev/null +++ b/app/Api/V1/Controllers/Chart/BudgetController.php @@ -0,0 +1,308 @@ +. + */ + +declare(strict_types=1); + +namespace FireflyIII\Api\V1\Controllers\Chart; + + +use Carbon\Carbon; +use FireflyIII\Api\V1\Controllers\Controller; +use FireflyIII\Api\V1\Requests\DateRequest; +use FireflyIII\Models\Budget; +use FireflyIII\Models\BudgetLimit; +use FireflyIII\Repositories\Budget\BudgetLimitRepositoryInterface; +use FireflyIII\Repositories\Budget\BudgetRepositoryInterface; +use FireflyIII\Repositories\Budget\OperationsRepositoryInterface; +use Illuminate\Http\JsonResponse; +use Illuminate\Support\Collection; + +/** + * Class BudgetController + */ +class BudgetController extends Controller +{ + private BudgetLimitRepositoryInterface $blRepository; + private OperationsRepositoryInterface $opsRepository; + private BudgetRepositoryInterface $repository; + + /** + * BudgetController constructor. + * + * @codeCoverageIgnore + */ + public function __construct() + { + parent::__construct(); + + $this->middleware( + function ($request, $next) { + //$this->generator = app(GeneratorInterface::class); + $this->repository = app(BudgetRepositoryInterface::class); + $this->opsRepository = app(OperationsRepositoryInterface::class); + $this->blRepository = app(BudgetLimitRepositoryInterface::class); + + //$this->nbRepository = app(NoBudgetRepositoryInterface::class); + + return $next($request); + } + ); + } + + /** + * [ + * 'label' => 'label for entire set' + * 'currency_id' => 0, + * 'currency_code' => 'EUR', + * 'currency_symbol' => '$', + * 'currency_decimal_places' => 2, + * 'type' => 'bar', // line, area or bar + * 'yAxisID' => 0, // 0, 1, 2 + * 'entries' => ['a' => 1, 'b' => 4], + * ], + * + * @param DateRequest $request + * + * @return JsonResponse + */ + public function overview(DateRequest $request): JsonResponse + { + $dates = $request->getAll(); + $budgets = $this->repository->getActiveBudgets(); + $budgetNames = []; + $currencyNames = []; + $sets = []; + /** @var Budget $budget */ + foreach ($budgets as $budget) { + $expenses = $this->getExpenses($budget, $dates['start'], $dates['end']); + $expenses = $this->filterNulls($expenses); + foreach ($expenses as $set) { + $budgetNames[] = $set['budget_name']; + $currencyNames[] = $set['currency_name']; + $sets[] = $set; + } + } + $budgetNames = array_unique($budgetNames); + $currencyNames = array_unique($currencyNames); + $basic = $this->createSets($budgetNames, $currencyNames); + $filled = $this->fillSets($basic, $sets); + $keys = array_values($filled); + + return response()->json($keys); + } + + /** + * @param Collection $limits + * @param Carbon $start + * @param Carbon $end + * + * @return array + */ + protected function getExpenses(Budget $budget, Carbon $start, Carbon $end): array + { + $limits = $this->blRepository->getBudgetLimits($budget, $start, $end); + if (0 === $limits->count()) { + return $this->getExpenseInRange($budget, $start, $end); + } + $arr = []; + /** @var BudgetLimit $limit */ + foreach ($limits as $limit) { + $arr[] = $this->getExpensesForLimit($limit); + } + + return $arr; + } + + /** + * @param array $budgetNames + * @param array $currencyNames + * + * @return array + */ + private function createSets(array $budgetNames, array $currencyNames): array + { + $return = []; + foreach ($currencyNames as $currencyName) { + $entries = []; + foreach ($budgetNames as $budgetName) { + $label = sprintf('%s (%s)', $budgetName, $currencyName); + $entries[$label] = '0'; + } + + // left + $return['left'] = [ + 'label' => sprintf('%s (%s)', trans('firefly.left'), $currencyName), + 'data_type' => 'left', + 'currency_name' => $currencyName, + 'type' => 'bar', + 'yAxisID' => 0, // 0, 1, 2 + 'entries' => $entries, + ]; +// // spent +// $return['spent'] = [ +// 'label' => sprintf('%s (%s)', trans('firefly.spent'), $currencyName), +// 'data_type' => 'spent', +// 'currency_name' => $currencyName, +// 'type' => 'bar', +// 'yAxisID' => 0, // 0, 1, 2 +// 'entries' => $entries, +// ]; + + + // spent_capped + $return['spent_capped'] = [ + 'label' => sprintf('%s (%s)', trans('firefly.spent'), $currencyName), + 'data_type' => 'spent_capped', + 'currency_name' => $currencyName, + 'type' => 'bar', + 'yAxisID' => 0, // 0, 1, 2 + 'entries' => $entries, + ]; + + // overspent + $return['overspent'] = [ + 'label' => sprintf('%s (%s)', trans('firefly.overspent'), $currencyName), + 'data_type' => 'overspent', + 'currency_name' => $currencyName, + 'type' => 'bar', + 'yAxisID' => 0, // 0, 1, 2 + 'entries' => $entries, + ]; + + } + + return $return; + } + + /** + * @param array $basic + * @param array $sets + * + * @return array + */ + private function fillSets(array $basic, array $sets): array + { + foreach ($sets as $set) { + $label = $set['label']; + //$basic['spent']['entries'][$label] = $set['entries']['spent']; + $basic['spent_capped']['entries'][$label] = $set['entries']['spent_capped']; + $basic['left']['entries'][$label] = $set['entries']['left']; + $basic['overspent']['entries'][$label] = $set['entries']['overspent']; + } + + return $basic; + } + + /** + * @param array $expenses + * + * @return array + */ + private function filterNulls(array $expenses): array + { + $return = []; + /** @var array|null $arr */ + foreach ($expenses as $arr) { + if (null !== $arr) { + $return[] = $arr; + } + } + + return $return; + } + + /** + * @param Budget $budget + * @param Carbon $start + * @param Carbon $end + * + * @return array + */ + private function getExpenseInRange(Budget $budget, Carbon $start, Carbon $end): array + { + $spent = $this->opsRepository->sumExpenses($start, $end, null, new Collection([$budget]), null); + $return = []; + /** @var array $set */ + foreach ($spent as $set) { + $current = [ + 'label' => sprintf('%s (%s)', $budget->name, $set['currency_name']), + 'budget_name' => $budget->name, + 'start_date' => $start->format('Y-m-d'), + 'end_date' => $end->format('Y-m-d'), + 'currency_id' => (int) $set['currency_id'], + 'currency_code' => $set['currency_code'], + 'currency_name' => $set['currency_name'], + 'currency_symbol' => $set['currency_symbol'], + 'currency_decimal_places' => (int) $set['currency_decimal_places'], + 'type' => 'bar', // line, area or bar, + 'entries' => [], + ]; + $sumSpent = bcmul($set['sum'], '-1'); // spent + $current['entries']['spent'] = $sumSpent; + $current['entries']['amount'] = '0'; + $current['entries']['spent_capped'] = $sumSpent; + $current['entries']['left'] = '0'; + $current['entries']['overspent'] = '0'; + $return[] = $current; + } + + return $return; + } + + /** + * @param BudgetLimit $limit + * + * @return array|null + */ + private function getExpensesForLimit(BudgetLimit $limit): ?array + { + $budget = $limit->budget; + $spent = $this->opsRepository->sumExpenses($limit->start_date, $limit->end_date, null, new Collection([$budget]), $limit->transactionCurrency); + $currency = $limit->transactionCurrency; + // when limited to a currency, the count is always one. Or it's empty. + $set = array_shift($spent); + if (null === $set) { + return null; + } + $return = [ + 'label' => sprintf('%s (%s)', $budget->name, $set['currency_name']), + 'budget_name' => $budget->name, + 'start_date' => $limit->start_date->format('Y-m-d'), + 'end_date' => $limit->end_date->format('Y-m-d'), + 'currency_id' => (int) $currency->id, + 'currency_code' => $currency->code, + 'currency_name' => $currency->name, + 'currency_symbol' => $currency->symbol, + 'currency_decimal_places' => (int) $currency->decimal_places, + 'type' => 'bar', // line, area or bar, + 'entries' => [], + ]; + $sumSpent = bcmul($set['sum'], '-1'); // spent + $return['entries']['spent'] = $sumSpent; + $return['entries']['amount'] = $limit->amount; + $return['entries']['spent_capped'] = 1 === bccomp($sumSpent, $limit->amount) ? $limit->amount : $sumSpent; + $return['entries']['left'] = 1 === bccomp($limit->amount, $sumSpent) ? bcadd($set['sum'], $limit->amount) : '0'; // left + $return['entries']['overspent'] = 1 === bccomp($limit->amount, $sumSpent) ? '0' : bcmul(bcadd($set['sum'], $limit->amount), '-1'); // overspent + + return $return; + } + +} diff --git a/app/Api/V1/Controllers/Chart/CategoryController.php b/app/Api/V1/Controllers/Chart/CategoryController.php index b0b552d516..36a32bb0ed 100644 --- a/app/Api/V1/Controllers/Chart/CategoryController.php +++ b/app/Api/V1/Controllers/Chart/CategoryController.php @@ -74,8 +74,6 @@ class CategoryController extends Controller * @param DateRequest $request * * @return JsonResponse - * - * TODO after 4.8,0, simplify */ public function overview(DateRequest $request): JsonResponse { @@ -89,32 +87,15 @@ class CategoryController extends Controller $tempData = []; $spentWith = $this->opsRepository->listExpenses($start, $end); - $earnedWith = $this->opsRepository->listIncome($start, $end); $spentWithout = $this->noCatRepository->listExpenses($start, $end); - $earnedWithout = $this->noCatRepository->listIncome($start, $end); $categories = []; - foreach ([$spentWith, $earnedWith, $spentWithout, $earnedWithout] as $set) { + foreach ([$spentWith, $spentWithout,] as $set) { foreach ($set as $currency) { foreach ($currency['categories'] as $category) { $categories[] = $category['name']; - $inKey = sprintf('%d-i', $currency['currency_id']); $outKey = sprintf('%d-e', $currency['currency_id']); - // make data arrays if not yet present. - $tempData[$inKey] = $tempData[$inKey] ?? [ - 'currency_id' => $currency['currency_id'], - 'label' => (string) trans('firefly.box_earned_in_currency', ['currency' => $currency['currency_name']]), - 'currency_code' => $currency['currency_code'], - 'currency_symbol' => $currency['currency_symbol'], - 'currency_decimal_places' => $currency['currency_decimal_places'], - 'type' => 'bar', // line, area or bar - 'yAxisID' => 0, // 0, 1, 2 - 'entries' => [ - // per category: - // "category" => 5, - ], - ]; $tempData[$outKey] = $tempData[$outKey] ?? [ 'currency_id' => $currency['currency_id'], 'label' => (string) trans('firefly.box_spent_in_currency', ['currency' => $currency['currency_name']]), @@ -123,16 +104,12 @@ class CategoryController extends Controller 'currency_decimal_places' => $currency['currency_decimal_places'], 'type' => 'bar', // line, area or bar 'yAxisID' => 0, // 0, 1, 2 - 'entries' => [ - // per category: - // "category" => 5, - ], + 'entries' => [], ]; foreach ($category['transaction_journals'] as $journal) { // is it expense or income? - $letter = -1 === bccomp($journal['amount'], '0') ? 'e' : 'i'; - $currentKey = sprintf('%d-%s', $currency['currency_id'], $letter); + $currentKey = sprintf('%d-%s', $currency['currency_id'], 'e'); $name = $category['name']; $tempData[$currentKey]['entries'][$name] = $tempData[$currentKey]['entries'][$name] ?? '0'; $tempData[$currentKey]['entries'][$name] = bcadd($tempData[$currentKey]['entries'][$name], $journal['amount']); diff --git a/app/Api/V1/Controllers/Search/AccountController.php b/app/Api/V1/Controllers/Search/AccountController.php index bd47d0a62d..64c20a9cde 100644 --- a/app/Api/V1/Controllers/Search/AccountController.php +++ b/app/Api/V1/Controllers/Search/AccountController.php @@ -43,8 +43,7 @@ class AccountController extends Controller { use AccountFilter; - /** @var array */ - private $validFields; + private array $validFields; public function __construct() { diff --git a/app/Api/V1/Controllers/Search/TransferController.php b/app/Api/V1/Controllers/Search/TransferController.php deleted file mode 100644 index 847ecbe270..0000000000 --- a/app/Api/V1/Controllers/Search/TransferController.php +++ /dev/null @@ -1,115 +0,0 @@ -. - */ - -declare(strict_types=1); - -namespace FireflyIII\Api\V1\Controllers\Search; - -use FireflyIII\Api\V1\Controllers\Controller; -use FireflyIII\Api\V1\Requests\Search\TransferRequest; -use FireflyIII\Helpers\Collector\GroupCollectorInterface; -use FireflyIII\Support\Search\TransferSearch; -use FireflyIII\Transformers\TransactionGroupTransformer; -use FireflyIII\User; -use Illuminate\Http\JsonResponse; -use Illuminate\Http\Response; -use League\Fractal\Pagination\IlluminatePaginatorAdapter; -use League\Fractal\Resource\Collection as FractalCollection; - -/** - * Class TransferController - */ -class TransferController extends Controller -{ - /** - * @param TransferRequest $request - * - * @return JsonResponse|Response - */ - public function search(TransferRequest $request) - { - // configure transfer search to search for a > b - $search = app(TransferSearch::class); - $search->setSource($request->get('source')); - $search->setDestination($request->get('destination')); - $search->setAmount($request->get('amount')); - $search->setDescription($request->get('description')); - $search->setDate($request->get('date')); - - $left = $search->search(); - - // configure transfer search to search for b > a - $search->setSource($request->get('destination')); - $search->setDestination($request->get('source')); - $search->setAmount($request->get('amount')); - $search->setDescription($request->get('description')); - $search->setDate($request->get('date')); - - $right = $search->search(); - - // add parameters to URL: - $this->parameters->set('source', $request->get('source')); - $this->parameters->set('destination', $request->get('destination')); - $this->parameters->set('amount', $request->get('amount')); - $this->parameters->set('description', $request->get('description')); - $this->parameters->set('date', $request->get('date')); - - // get all journal ID's. - $total = $left->merge($right)->unique('id')->pluck('id')->toArray(); - if (0 === count($total)) { - // forces search to be empty. - $total = [-1]; - } - - // collector to return results. - $pageSize = (int) app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data; - $manager = $this->getManager(); - /** @var User $admin */ - $admin = auth()->user(); - - // use new group collector: - /** @var GroupCollectorInterface $collector */ - $collector = app(GroupCollectorInterface::class); - $collector - ->setUser($admin) - // all info needed for the API: - ->withAPIInformation() - // set page size: - ->setLimit($pageSize) - // set page to retrieve - ->setPage(1) - ->setJournalIds($total); - - $paginator = $collector->getPaginatedGroups(); - $paginator->setPath(route('api.v1.search.transfers') . $this->buildParams()); - $transactions = $paginator->getCollection(); - - /** @var TransactionGroupTransformer $transformer */ - $transformer = app(TransactionGroupTransformer::class); - $transformer->setParameters($this->parameters); - - $resource = new FractalCollection($transactions, $transformer, 'transactions'); - $resource->setPaginator(new IlluminatePaginatorAdapter($paginator)); - - return response()->json($manager->createData($resource)->toArray())->header('Content-Type', 'application/vnd.api+json'); - } -} diff --git a/app/Http/Controllers/Chart/BudgetController.php b/app/Http/Controllers/Chart/BudgetController.php index c0280aae91..7eb7540949 100644 --- a/app/Http/Controllers/Chart/BudgetController.php +++ b/app/Http/Controllers/Chart/BudgetController.php @@ -412,7 +412,7 @@ class BudgetController extends Controller $cache->addProperty($end); $cache->addProperty('chart.budget.frontpage'); if ($cache->has()) { - // return response()->json($cache->get()); // @codeCoverageIgnore + return response()->json($cache->get()); // @codeCoverageIgnore } $budgets = $this->repository->getActiveBudgets(); $chartData = [ diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 727a54e359..55049591c3 100755 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1030,9 +1030,9 @@ "dev": true }, "@popperjs/core": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.4.3.tgz", - "integrity": "sha512-r0jArf9l4hXBJVgWlFiDj3rC+51G9d+AfycAp2YacHeKZnslGQblxGdRpbprZ2snXzYVjrSu0Tt0TZFQAILipg==" + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.4.4.tgz", + "integrity": "sha512-1oO6+dN5kdIA3sKPZhRGJTfGVP4SWV6KqlMOwry4J3HfyD68sl/3KmG7DeYUzvN+RbhXDnv/D8vNNB8168tAMg==" }, "@types/glob": { "version": "7.1.2", diff --git a/frontend/package.json b/frontend/package.json index 102108a039..314276b3f3 100755 --- a/frontend/package.json +++ b/frontend/package.json @@ -24,7 +24,7 @@ }, "dependencies": { "@fortawesome/fontawesome-free": "^5.13.0", - "@popperjs/core": "^2.4.3", + "@popperjs/core": "^2.4.4", "bootstrap": "^4.5.0", "chart.js": "^2.9.3", "icheck-bootstrap": "^3.0.1", diff --git a/frontend/public/js/dashboard.js b/frontend/public/js/dashboard.js index e91daca938..f13976ad7f 100644 --- a/frontend/public/js/dashboard.js +++ b/frontend/public/js/dashboard.js @@ -1,3 +1,3 @@ /*! For license information please see dashboard.js.LICENSE.txt */ -(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{158:function(t,e,n){n(216),t.exports=n(217)},160:function(t,e,n){var a={"./af":11,"./af.js":11,"./ar":12,"./ar-dz":13,"./ar-dz.js":13,"./ar-kw":14,"./ar-kw.js":14,"./ar-ly":15,"./ar-ly.js":15,"./ar-ma":16,"./ar-ma.js":16,"./ar-sa":17,"./ar-sa.js":17,"./ar-tn":18,"./ar-tn.js":18,"./ar.js":12,"./az":19,"./az.js":19,"./be":20,"./be.js":20,"./bg":21,"./bg.js":21,"./bm":22,"./bm.js":22,"./bn":23,"./bn.js":23,"./bo":24,"./bo.js":24,"./br":25,"./br.js":25,"./bs":26,"./bs.js":26,"./ca":27,"./ca.js":27,"./cs":28,"./cs.js":28,"./cv":29,"./cv.js":29,"./cy":30,"./cy.js":30,"./da":31,"./da.js":31,"./de":32,"./de-at":33,"./de-at.js":33,"./de-ch":34,"./de-ch.js":34,"./de.js":32,"./dv":35,"./dv.js":35,"./el":36,"./el.js":36,"./en-au":37,"./en-au.js":37,"./en-ca":38,"./en-ca.js":38,"./en-gb":39,"./en-gb.js":39,"./en-ie":40,"./en-ie.js":40,"./en-il":41,"./en-il.js":41,"./en-in":42,"./en-in.js":42,"./en-nz":43,"./en-nz.js":43,"./en-sg":44,"./en-sg.js":44,"./eo":45,"./eo.js":45,"./es":46,"./es-do":47,"./es-do.js":47,"./es-us":48,"./es-us.js":48,"./es.js":46,"./et":49,"./et.js":49,"./eu":50,"./eu.js":50,"./fa":51,"./fa.js":51,"./fi":52,"./fi.js":52,"./fil":53,"./fil.js":53,"./fo":54,"./fo.js":54,"./fr":55,"./fr-ca":56,"./fr-ca.js":56,"./fr-ch":57,"./fr-ch.js":57,"./fr.js":55,"./fy":58,"./fy.js":58,"./ga":59,"./ga.js":59,"./gd":60,"./gd.js":60,"./gl":61,"./gl.js":61,"./gom-deva":62,"./gom-deva.js":62,"./gom-latn":63,"./gom-latn.js":63,"./gu":64,"./gu.js":64,"./he":65,"./he.js":65,"./hi":66,"./hi.js":66,"./hr":67,"./hr.js":67,"./hu":68,"./hu.js":68,"./hy-am":69,"./hy-am.js":69,"./id":70,"./id.js":70,"./is":71,"./is.js":71,"./it":72,"./it-ch":73,"./it-ch.js":73,"./it.js":72,"./ja":74,"./ja.js":74,"./jv":75,"./jv.js":75,"./ka":76,"./ka.js":76,"./kk":77,"./kk.js":77,"./km":78,"./km.js":78,"./kn":79,"./kn.js":79,"./ko":80,"./ko.js":80,"./ku":81,"./ku.js":81,"./ky":82,"./ky.js":82,"./lb":83,"./lb.js":83,"./lo":84,"./lo.js":84,"./lt":85,"./lt.js":85,"./lv":86,"./lv.js":86,"./me":87,"./me.js":87,"./mi":88,"./mi.js":88,"./mk":89,"./mk.js":89,"./ml":90,"./ml.js":90,"./mn":91,"./mn.js":91,"./mr":92,"./mr.js":92,"./ms":93,"./ms-my":94,"./ms-my.js":94,"./ms.js":93,"./mt":95,"./mt.js":95,"./my":96,"./my.js":96,"./nb":97,"./nb.js":97,"./ne":98,"./ne.js":98,"./nl":99,"./nl-be":100,"./nl-be.js":100,"./nl.js":99,"./nn":101,"./nn.js":101,"./oc-lnc":102,"./oc-lnc.js":102,"./pa-in":103,"./pa-in.js":103,"./pl":104,"./pl.js":104,"./pt":105,"./pt-br":106,"./pt-br.js":106,"./pt.js":105,"./ro":107,"./ro.js":107,"./ru":108,"./ru.js":108,"./sd":109,"./sd.js":109,"./se":110,"./se.js":110,"./si":111,"./si.js":111,"./sk":112,"./sk.js":112,"./sl":113,"./sl.js":113,"./sq":114,"./sq.js":114,"./sr":115,"./sr-cyrl":116,"./sr-cyrl.js":116,"./sr.js":115,"./ss":117,"./ss.js":117,"./sv":118,"./sv.js":118,"./sw":119,"./sw.js":119,"./ta":120,"./ta.js":120,"./te":121,"./te.js":121,"./tet":122,"./tet.js":122,"./tg":123,"./tg.js":123,"./th":124,"./th.js":124,"./tk":125,"./tk.js":125,"./tl-ph":126,"./tl-ph.js":126,"./tlh":127,"./tlh.js":127,"./tr":128,"./tr.js":128,"./tzl":129,"./tzl.js":129,"./tzm":130,"./tzm-latn":131,"./tzm-latn.js":131,"./tzm.js":130,"./ug-cn":132,"./ug-cn.js":132,"./uk":133,"./uk.js":133,"./ur":134,"./ur.js":134,"./uz":135,"./uz-latn":136,"./uz-latn.js":136,"./uz.js":135,"./vi":137,"./vi.js":137,"./x-pseudo":138,"./x-pseudo.js":138,"./yo":139,"./yo.js":139,"./zh-cn":140,"./zh-cn.js":140,"./zh-hk":141,"./zh-hk.js":141,"./zh-mo":142,"./zh-mo.js":142,"./zh-tw":143,"./zh-tw.js":143};function s(t){var e=i(t);return n(e)}function i(t){if(!n.o(a,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return a[t]}s.keys=function(){return Object.keys(a)},s.resolve=i,t.exports=s,s.id=160},161:function(t,e,n){"use strict";var a=n(7);n.n(a).a},162:function(t,e,n){(t.exports=n(163)(!1)).push([t.i,"\n.main-account-chart[data-v-2a6de8fe] {\n}\n\n",""])},166:function(t,e,n){"use strict";n.r(e);var a=n(9),s=n.n(a),i=n(156),o=n(10);window.$=window.jQuery=n(4),window.axios=n(169),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");var c=document.head.querySelector('meta[name="locale"]');window.localeValue=c?c.content:"en_US",n(186),n(154),n(189),n(190),window.vuei18n=i.a,window.uiv=o,s.a.use(vuei18n),s.a.use(o),window.Vue=s.a},189:function(t,e,n){var a,s,i,o;function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}o=function(t){"use strict";var e=function(t){var e="ControlSidebar",n="lte.controlsidebar",a=t.fn[e],s={COLLAPSED:"collapsed.lte.controlsidebar",EXPANDED:"expanded.lte.controlsidebar"},i=".control-sidebar",o=".control-sidebar-content",r='[data-widget="control-sidebar"]',c=".main-header",l=".main-footer",u="control-sidebar-animate",d="control-sidebar-open",h="control-sidebar-slide-open",_="layout-fixed",f="layout-navbar-fixed",p="layout-sm-navbar-fixed",g="layout-md-navbar-fixed",m="layout-lg-navbar-fixed",v="layout-xl-navbar-fixed",b="layout-footer-fixed",y="layout-sm-footer-fixed",C="layout-md-footer-fixed",w="layout-lg-footer-fixed",x="layout-xl-footer-fixed",j={controlsidebarSlide:!0,scrollbarTheme:"os-theme-light",scrollbarAutoHide:"l"},S=function(){function e(t,e){this._element=t,this._config=e,this._init()}var a=e.prototype;return a.collapse=function(){this._config.controlsidebarSlide?(t("html").addClass(u),t("body").removeClass(h).delay(300).queue((function(){t(i).hide(),t("html").removeClass(u),t(this).dequeue()}))):t("body").removeClass(d);var e=t.Event(s.COLLAPSED);t(this._element).trigger(e)},a.show=function(){this._config.controlsidebarSlide?(t("html").addClass(u),t(i).show().delay(10).queue((function(){t("body").addClass(h).delay(300).queue((function(){t("html").removeClass(u),t(this).dequeue()})),t(this).dequeue()}))):t("body").addClass(d);var e=t.Event(s.EXPANDED);t(this._element).trigger(e)},a.toggle=function(){t("body").hasClass(d)||t("body").hasClass(h)?this.collapse():this.show()},a._init=function(){var e=this;this._fixHeight(),this._fixScrollHeight(),t(window).resize((function(){e._fixHeight(),e._fixScrollHeight()})),t(window).scroll((function(){(t("body").hasClass(d)||t("body").hasClass(h))&&e._fixScrollHeight()}))},a._fixScrollHeight=function(){var e={scroll:t(document).height(),window:t(window).height(),header:t(c).outerHeight(),footer:t(l).outerHeight()},n=Math.abs(e.window+t(window).scrollTop()-e.scroll),a=t(window).scrollTop(),s=!1,r=!1;t("body").hasClass(_)&&((t("body").hasClass(f)||t("body").hasClass(p)||t("body").hasClass(g)||t("body").hasClass(m)||t("body").hasClass(v))&&"fixed"===t(c).css("position")&&(s=!0),(t("body").hasClass(b)||t("body").hasClass(y)||t("body").hasClass(C)||t("body").hasClass(w)||t("body").hasClass(x))&&"fixed"===t(l).css("position")&&(r=!0),0===a&&0===n?(t(i).css("bottom",e.footer),t(i).css("top",e.header),t(i+", "+i+" "+o).css("height",e.window-(e.header+e.footer))):n<=e.footer?!1===r?(t(i).css("bottom",e.footer-n),t(i+", "+i+" "+o).css("height",e.window-(e.footer-n))):t(i).css("bottom",e.footer):a<=e.header?!1===s?(t(i).css("top",e.header-a),t(i+", "+i+" "+o).css("height",e.window-(e.header-a))):t(i).css("top",e.header):!1===s?(t(i).css("top",0),t(i+", "+i+" "+o).css("height",e.window)):t(i).css("top",e.header))},a._fixHeight=function(){var e=t(window).height(),n=t(c).outerHeight(),a=t(l).outerHeight();if(t("body").hasClass(_)){var s=e-n;(t("body").hasClass(b)||t("body").hasClass(y)||t("body").hasClass(C)||t("body").hasClass(w)||t("body").hasClass(x))&&"fixed"===t(l).css("position")&&(s=e-n-a),t(i+" "+o).css("height",s),void 0!==t.fn.overlayScrollbars&&t(i+" "+o).overlayScrollbars({className:this._config.scrollbarTheme,sizeAutoCapable:!0,scrollbars:{autoHide:this._config.scrollbarAutoHide,clickScrolling:!0}})}},e._jQueryInterface=function(a){return this.each((function(){var s=t(this).data(n),i=t.extend({},j,t(this).data());if(s||(s=new e(this,i),t(this).data(n,s)),"undefined"===s[a])throw new Error(a+" is not a function");s[a]()}))},e}();return t(document).on("click",r,(function(e){e.preventDefault(),S._jQueryInterface.call(t(this),"toggle")})),t.fn[e]=S._jQueryInterface,t.fn[e].Constructor=S,t.fn[e].noConflict=function(){return t.fn[e]=a,S._jQueryInterface},S}(jQuery),n=function(t){var e="Layout",n=t.fn[e],a=".main-header",s=".main-sidebar",i=".main-sidebar .sidebar",o=".content-wrapper",r=".control-sidebar-content",c='[data-widget="control-sidebar"]',l=".main-footer",u='[data-widget="pushmenu"]',d=".login-box",h=".register-box",_="sidebar-focused",f="layout-fixed",p="control-sidebar-slide-open",g="control-sidebar-open",m={scrollbarTheme:"os-theme-light",scrollbarAutoHide:"l",panelAutoHeight:!0,loginRegisterAutoHeight:!0},v=function(){function e(t,e){this._config=e,this._element=t,this._init()}var n=e.prototype;return n.fixLayoutHeight=function(e){void 0===e&&(e=null);var n=0;(t("body").hasClass(p)||t("body").hasClass(g)||"control_sidebar"==e)&&(n=t(r).height());var s={window:t(window).height(),header:0!==t(a).length?t(a).outerHeight():0,footer:0!==t(l).length?t(l).outerHeight():0,sidebar:0!==t(i).length?t(i).height():0,control_sidebar:n},c=this._max(s),u=this._config.panelAutoHeight;!0===u&&(u=0),!1!==u&&(c==s.control_sidebar?t(o).css("min-height",c+u):c==s.window?t(o).css("min-height",c+u-s.header-s.footer):t(o).css("min-height",c+u-s.header),this._isFooterFixed()&&t(o).css("min-height",parseFloat(t(o).css("min-height"))+s.footer)),t("body").hasClass(f)&&(!1!==u&&t(o).css("min-height",c+u-s.header-s.footer),void 0!==t.fn.overlayScrollbars&&t(i).overlayScrollbars({className:this._config.scrollbarTheme,sizeAutoCapable:!0,scrollbars:{autoHide:this._config.scrollbarAutoHide,clickScrolling:!0}}))},n.fixLoginRegisterHeight=function(){if(0===t(d+", "+h).length)t("body, html").css("height","auto");else if(0!==t(d+", "+h).length){var e=t(d+", "+h).height();t("body").css("min-height")!==e&&t("body").css("min-height",e)}},n._init=function(){var e=this;this.fixLayoutHeight(),!0===this._config.loginRegisterAutoHeight?this.fixLoginRegisterHeight():Number.isInteger(this._config.loginRegisterAutoHeight)&&setInterval(this.fixLoginRegisterHeight,this._config.loginRegisterAutoHeight),t(i).on("collapsed.lte.treeview expanded.lte.treeview",(function(){e.fixLayoutHeight()})),t(u).on("collapsed.lte.pushmenu shown.lte.pushmenu",(function(){e.fixLayoutHeight()})),t(c).on("collapsed.lte.controlsidebar",(function(){e.fixLayoutHeight()})).on("expanded.lte.controlsidebar",(function(){e.fixLayoutHeight("control_sidebar")})),t(window).resize((function(){e.fixLayoutHeight()})),setTimeout((function(){t("body.hold-transition").removeClass("hold-transition")}),50)},n._max=function(t){var e=0;return Object.keys(t).forEach((function(n){t[n]>e&&(e=t[n])})),e},n._isFooterFixed=function(){return"fixed"===t(".main-footer").css("position")},e._jQueryInterface=function(n){return void 0===n&&(n=""),this.each((function(){var a=t(this).data("lte.layout"),s=t.extend({},m,t(this).data());a||(a=new e(t(this),s),t(this).data("lte.layout",a)),"init"===n||""===n?a._init():"fixLayoutHeight"!==n&&"fixLoginRegisterHeight"!==n||a[n]()}))},e}();return t(window).on("load",(function(){v._jQueryInterface.call(t("body"))})),t(i+" a").on("focusin",(function(){t(s).addClass(_)})),t(i+" a").on("focusout",(function(){t(s).removeClass(_)})),t.fn[e]=v._jQueryInterface,t.fn[e].Constructor=v,t.fn[e].noConflict=function(){return t.fn[e]=n,v._jQueryInterface},v}(jQuery),a=function(t){var e="PushMenu",n=".lte.pushmenu",a=t.fn[e],s={COLLAPSED:"collapsed"+n,SHOWN:"shown"+n},i={autoCollapseSize:992,enableRemember:!1,noTransitionAfterReload:!0},o='[data-widget="pushmenu"]',r="body",c="#sidebar-overlay",l=".wrapper",u="sidebar-collapse",d="sidebar-open",h="sidebar-closed",_=function(){function e(e,n){this._element=e,this._options=t.extend({},i,n),t(c).length||this._addOverlay(),this._init()}var a=e.prototype;return a.expand=function(){this._options.autoCollapseSize&&t(window).width()<=this._options.autoCollapseSize&&t(r).addClass(d),t(r).removeClass(u).removeClass(h),this._options.enableRemember&&localStorage.setItem("remember"+n,d);var e=t.Event(s.SHOWN);t(this._element).trigger(e)},a.collapse=function(){this._options.autoCollapseSize&&t(window).width()<=this._options.autoCollapseSize&&t(r).removeClass(d).addClass(h),t(r).addClass(u),this._options.enableRemember&&localStorage.setItem("remember"+n,u);var e=t.Event(s.COLLAPSED);t(this._element).trigger(e)},a.toggle=function(){t(r).hasClass(u)?this.expand():this.collapse()},a.autoCollapse=function(e){void 0===e&&(e=!1),this._options.autoCollapseSize&&(t(window).width()<=this._options.autoCollapseSize?t(r).hasClass(d)||this.collapse():1==e&&(t(r).hasClass(d)?t(r).removeClass(d):t(r).hasClass(h)&&this.expand()))},a.remember=function(){this._options.enableRemember&&(localStorage.getItem("remember"+n)==u?this._options.noTransitionAfterReload?t("body").addClass("hold-transition").addClass(u).delay(50).queue((function(){t(this).removeClass("hold-transition"),t(this).dequeue()})):t("body").addClass(u):this._options.noTransitionAfterReload?t("body").addClass("hold-transition").removeClass(u).delay(50).queue((function(){t(this).removeClass("hold-transition"),t(this).dequeue()})):t("body").removeClass(u))},a._init=function(){var e=this;this.remember(),this.autoCollapse(),t(window).resize((function(){e.autoCollapse(!0)}))},a._addOverlay=function(){var e=this,n=t("
",{id:"sidebar-overlay"});n.on("click",(function(){e.collapse()})),t(l).append(n)},e._jQueryInterface=function(n){return this.each((function(){var a=t(this).data("lte.pushmenu"),s=t.extend({},i,t(this).data());a||(a=new e(this,s),t(this).data("lte.pushmenu",a)),"string"==typeof n&&n.match(/collapse|expand|toggle/)&&a[n]()}))},e}();return t(document).on("click",o,(function(e){e.preventDefault();var n=e.currentTarget;"pushmenu"!==t(n).data("widget")&&(n=t(n).closest(o)),_._jQueryInterface.call(t(n),"toggle")})),t(window).on("load",(function(){_._jQueryInterface.call(t(o))})),t.fn[e]=_._jQueryInterface,t.fn[e].Constructor=_,t.fn[e].noConflict=function(){return t.fn[e]=a,_._jQueryInterface},_}(jQuery),s=function(t){var e="Treeview",n=t.fn[e],a={SELECTED:"selected.lte.treeview",EXPANDED:"expanded.lte.treeview",COLLAPSED:"collapsed.lte.treeview",LOAD_DATA_API:"load.lte.treeview"},s=".nav-item",i=".nav-treeview",o=".menu-open",r='[data-widget="treeview"]',c="menu-open",l="sidebar-collapse",u={trigger:r+" .nav-link",animationSpeed:300,accordion:!0,expandSidebar:!1,sidebarButtonSelector:'[data-widget="pushmenu"]'},d=function(){function e(t,e){this._config=e,this._element=t}var n=e.prototype;return n.init=function(){this._setupListeners()},n.expand=function(e,n){var s=this,r=t.Event(a.EXPANDED);if(this._config.accordion){var l=n.siblings(o).first(),u=l.find(i).first();this.collapse(u,l)}e.stop().slideDown(this._config.animationSpeed,(function(){n.addClass(c),t(s._element).trigger(r)})),this._config.expandSidebar&&this._expandSidebar()},n.collapse=function(e,n){var s=this,r=t.Event(a.COLLAPSED);e.stop().slideUp(this._config.animationSpeed,(function(){n.removeClass(c),t(s._element).trigger(r),e.find(o+" > "+i).slideUp(),e.find(o).removeClass(c)}))},n.toggle=function(e){var n=t(e.currentTarget),a=n.parent(),o=a.find("> "+i);if(o.is(i)||(a.is(s)||(o=a.parent().find("> "+i)),o.is(i))){e.preventDefault();var r=n.parents(s).first();r.hasClass(c)?this.collapse(t(o),r):this.expand(t(o),r)}},n._setupListeners=function(){var e=this;t(document).on("click",this._config.trigger,(function(t){e.toggle(t)}))},n._expandSidebar=function(){t("body").hasClass(l)&&t(this._config.sidebarButtonSelector).PushMenu("expand")},e._jQueryInterface=function(n){return this.each((function(){var a=t(this).data("lte.treeview"),s=t.extend({},u,t(this).data());a||(a=new e(t(this),s),t(this).data("lte.treeview",a)),"init"===n&&a[n]()}))},e}();return t(window).on(a.LOAD_DATA_API,(function(){t(r).each((function(){d._jQueryInterface.call(t(this),"init")}))})),t.fn[e]=d._jQueryInterface,t.fn[e].Constructor=d,t.fn[e].noConflict=function(){return t.fn[e]=n,d._jQueryInterface},d}(jQuery),i=function(t){var e="DirectChat",n=t.fn[e],a="toggled{EVENT_KEY}",s='[data-widget="chat-pane-toggle"]',i=".direct-chat",o="direct-chat-contacts-open",r=function(){function e(t,e){this._element=t}return e.prototype.toggle=function(){t(this._element).parents(i).first().toggleClass(o);var e=t.Event(a);t(this._element).trigger(e)},e._jQueryInterface=function(n){return this.each((function(){var a=t(this).data("lte.directchat");a||(a=new e(t(this)),t(this).data("lte.directchat",a)),a[n]()}))},e}();return t(document).on("click",s,(function(e){e&&e.preventDefault(),r._jQueryInterface.call(t(this),"toggle")})),t.fn[e]=r._jQueryInterface,t.fn[e].Constructor=r,t.fn[e].noConflict=function(){return t.fn[e]=n,r._jQueryInterface},r}(jQuery),o=function(t){var e="TodoList",n=t.fn[e],a='[data-widget="todo-list"]',s="done",i={onCheck:function(t){return t},onUnCheck:function(t){return t}},o=function(){function e(t,e){this._config=e,this._element=t,this._init()}var n=e.prototype;return n.toggle=function(e){e.parents("li").toggleClass(s),t(e).prop("checked")?this.check(e):this.unCheck(t(e))},n.check=function(t){this._config.onCheck.call(t)},n.unCheck=function(t){this._config.onUnCheck.call(t)},n._init=function(){var e=this;t(a).find("input:checkbox:checked").parents("li").toggleClass(s),t(a).on("change","input:checkbox",(function(n){e.toggle(t(n.target))}))},e._jQueryInterface=function(n){return this.each((function(){var a=t(this).data("lte.todolist"),s=t.extend({},i,t(this).data());a||(a=new e(t(this),s),t(this).data("lte.todolist",a)),"init"===n&&a[n]()}))},e}();return t(window).on("load",(function(){o._jQueryInterface.call(t(a))})),t.fn[e]=o._jQueryInterface,t.fn[e].Constructor=o,t.fn[e].noConflict=function(){return t.fn[e]=n,o._jQueryInterface},o}(jQuery),c=function(t){var e="CardWidget",n=".lte.cardwidget",a=t.fn[e],s={EXPANDED:"expanded"+n,COLLAPSED:"collapsed"+n,MAXIMIZED:"maximized"+n,MINIMIZED:"minimized"+n,REMOVED:"removed"+n},i="card",o="collapsed-card",c="collapsing-card",l="expanding-card",u="was-collapsed",d="maximized-card",h={DATA_REMOVE:'[data-card-widget="remove"]',DATA_COLLAPSE:'[data-card-widget="collapse"]',DATA_MAXIMIZE:'[data-card-widget="maximize"]',CARD:"."+i,CARD_HEADER:".card-header",CARD_BODY:".card-body",CARD_FOOTER:".card-footer",COLLAPSED:"."+o},_={animationSpeed:"normal",collapseTrigger:h.DATA_COLLAPSE,removeTrigger:h.DATA_REMOVE,maximizeTrigger:h.DATA_MAXIMIZE,collapseIcon:"fa-minus",expandIcon:"fa-plus",maximizeIcon:"fa-expand",minimizeIcon:"fa-compress"},f=function(){function e(e,n){this._element=e,this._parent=e.parents(h.CARD).first(),e.hasClass(i)&&(this._parent=e),this._settings=t.extend({},_,n)}var n=e.prototype;return n.collapse=function(){var e=this;this._parent.addClass(c).children(h.CARD_BODY+", "+h.CARD_FOOTER).slideUp(this._settings.animationSpeed,(function(){e._parent.addClass(o).removeClass(c)})),this._parent.find("> "+h.CARD_HEADER+" "+this._settings.collapseTrigger+" ."+this._settings.collapseIcon).addClass(this._settings.expandIcon).removeClass(this._settings.collapseIcon);var n=t.Event(s.COLLAPSED);this._element.trigger(n,this._parent)},n.expand=function(){var e=this;this._parent.addClass(l).children(h.CARD_BODY+", "+h.CARD_FOOTER).slideDown(this._settings.animationSpeed,(function(){e._parent.removeClass(o).removeClass(l)})),this._parent.find("> "+h.CARD_HEADER+" "+this._settings.collapseTrigger+" ."+this._settings.expandIcon).addClass(this._settings.collapseIcon).removeClass(this._settings.expandIcon);var n=t.Event(s.EXPANDED);this._element.trigger(n,this._parent)},n.remove=function(){this._parent.slideUp();var e=t.Event(s.REMOVED);this._element.trigger(e,this._parent)},n.toggle=function(){this._parent.hasClass(o)?this.expand():this.collapse()},n.maximize=function(){this._parent.find(this._settings.maximizeTrigger+" ."+this._settings.maximizeIcon).addClass(this._settings.minimizeIcon).removeClass(this._settings.maximizeIcon),this._parent.css({height:this._parent.height(),width:this._parent.width(),transition:"all .15s"}).delay(150).queue((function(){t(this).addClass(d),t("html").addClass(d),t(this).hasClass(o)&&t(this).addClass(u),t(this).dequeue()}));var e=t.Event(s.MAXIMIZED);this._element.trigger(e,this._parent)},n.minimize=function(){this._parent.find(this._settings.maximizeTrigger+" ."+this._settings.minimizeIcon).addClass(this._settings.maximizeIcon).removeClass(this._settings.minimizeIcon),this._parent.css("cssText","height:"+this._parent[0].style.height+" !important;width:"+this._parent[0].style.width+" !important; transition: all .15s;").delay(10).queue((function(){t(this).removeClass(d),t("html").removeClass(d),t(this).css({height:"inherit",width:"inherit"}),t(this).hasClass(u)&&t(this).removeClass(u),t(this).dequeue()}));var e=t.Event(s.MINIMIZED);this._element.trigger(e,this._parent)},n.toggleMaximize=function(){this._parent.hasClass(d)?this.minimize():this.maximize()},n._init=function(e){var n=this;this._parent=e,t(this).find(this._settings.collapseTrigger).click((function(){n.toggle()})),t(this).find(this._settings.maximizeTrigger).click((function(){n.toggleMaximize()})),t(this).find(this._settings.removeTrigger).click((function(){n.remove()}))},e._jQueryInterface=function(n){var a=t(this).data("lte.cardwidget"),s=t.extend({},_,t(this).data());a||(a=new e(t(this),s),t(this).data("lte.cardwidget","string"==typeof n?a:n)),"string"==typeof n&&n.match(/collapse|expand|remove|toggle|maximize|minimize|toggleMaximize/)?a[n]():"object"===r(n)&&a._init(t(this))},e}();return t(document).on("click",h.DATA_COLLAPSE,(function(e){e&&e.preventDefault(),f._jQueryInterface.call(t(this),"toggle")})),t(document).on("click",h.DATA_REMOVE,(function(e){e&&e.preventDefault(),f._jQueryInterface.call(t(this),"remove")})),t(document).on("click",h.DATA_MAXIMIZE,(function(e){e&&e.preventDefault(),f._jQueryInterface.call(t(this),"toggleMaximize")})),t.fn[e]=f._jQueryInterface,t.fn[e].Constructor=f,t.fn[e].noConflict=function(){return t.fn[e]=a,f._jQueryInterface},f}(jQuery),l=function(t){var e="CardRefresh",n=t.fn[e],a={LOADED:"loaded.lte.cardrefresh",OVERLAY_ADDED:"overlay.added.lte.cardrefresh",OVERLAY_REMOVED:"overlay.removed.lte.cardrefresh"},s="card",i={CARD:"."+s,DATA_REFRESH:'[data-card-widget="card-refresh"]'},o={source:"",sourceSelector:"",params:{},trigger:i.DATA_REFRESH,content:".card-body",loadInContent:!0,loadOnInit:!0,responseType:"",overlayTemplate:'
',onLoadStart:function(){},onLoadDone:function(t){return t}},r=function(){function e(e,n){if(this._element=e,this._parent=e.parents(i.CARD).first(),this._settings=t.extend({},o,n),this._overlay=t(this._settings.overlayTemplate),e.hasClass(s)&&(this._parent=e),""===this._settings.source)throw new Error("Source url was not defined. Please specify a url in your CardRefresh source option.")}var n=e.prototype;return n.load=function(){this._addOverlay(),this._settings.onLoadStart.call(t(this)),t.get(this._settings.source,this._settings.params,function(e){this._settings.loadInContent&&(""!=this._settings.sourceSelector&&(e=t(e).find(this._settings.sourceSelector).html()),this._parent.find(this._settings.content).html(e)),this._settings.onLoadDone.call(t(this),e),this._removeOverlay()}.bind(this),""!==this._settings.responseType&&this._settings.responseType);var e=t.Event(a.LOADED);t(this._element).trigger(e)},n._addOverlay=function(){this._parent.append(this._overlay);var e=t.Event(a.OVERLAY_ADDED);t(this._element).trigger(e)},n._removeOverlay=function(){this._parent.find(this._overlay).remove();var e=t.Event(a.OVERLAY_REMOVED);t(this._element).trigger(e)},n._init=function(e){var n=this;t(this).find(this._settings.trigger).on("click",(function(){n.load()})),this._settings.loadOnInit&&this.load()},e._jQueryInterface=function(n){var a=t(this).data("lte.cardrefresh"),s=t.extend({},o,t(this).data());a||(a=new e(t(this),s),t(this).data("lte.cardrefresh","string"==typeof n?a:n)),"string"==typeof n&&n.match(/load/)?a[n]():a._init(t(this))},e}();return t(document).on("click",i.DATA_REFRESH,(function(e){e&&e.preventDefault(),r._jQueryInterface.call(t(this),"load")})),t(document).ready((function(){t(i.DATA_REFRESH).each((function(){r._jQueryInterface.call(t(this))}))})),t.fn[e]=r._jQueryInterface,t.fn[e].Constructor=r,t.fn[e].noConflict=function(){return t.fn[e]=n,r._jQueryInterface},r}(jQuery),u=function(t){var e="Dropdown",n=t.fn[e],a=".navbar",s=".dropdown-menu",i=".dropdown-menu.show",o='[data-toggle="dropdown"]',r="dropdown-menu-right",c={},l=function(){function e(t,e){this._config=e,this._element=t}var n=e.prototype;return n.toggleSubmenu=function(){this._element.siblings().show().toggleClass("show"),this._element.next().hasClass("show")||this._element.parents(".dropdown-menu").first().find(".show").removeClass("show").hide(),this._element.parents("li.nav-item.dropdown.show").on("hidden.bs.dropdown",(function(e){t(".dropdown-submenu .show").removeClass("show").hide()}))},n.fixPosition=function(){var e=t(i);if(0!==e.length){e.hasClass(r)?(e.css("left","inherit"),e.css("right",0)):(e.css("left",0),e.css("right","inherit"));var n=e.offset(),a=e.width(),s=t(window).width()-n.left;n.left<0?(e.css("left","inherit"),e.css("right",n.left-5)):s');e.data("autohide",this._config.autohide),e.data("animation",this._config.fade),this._config.class&&e.addClass(this._config.class),this._config.delay&&500!=this._config.delay&&e.data("delay",this._config.delay);var n=t('
');if(null!=this._config.image){var s=t("").addClass("rounded mr-2").attr("src",this._config.image).attr("alt",this._config.imageAlt);null!=this._config.imageHeight&&s.height(this._config.imageHeight).width("auto"),n.append(s)}if(null!=this._config.icon&&n.append(t("").addClass("mr-2").addClass(this._config.icon)),null!=this._config.title&&n.append(t("").addClass("mr-auto").html(this._config.title)),null!=this._config.subtitle&&n.append(t("").html(this._config.subtitle)),1==this._config.close){var i=t('