From 783ac823ba452f144e6f0532e680f22292fec128 Mon Sep 17 00:00:00 2001 From: Arno Kaimbacher Date: Thu, 6 Sep 2018 17:58:54 +0200 Subject: [PATCH] edit static pages in backend --- app/Events/Pages/PageUpdated.php | 26 + app/Exceptions/GeneralException.php | 12 + .../{ => Frontend}/HomeController.php | 31 +- .../{ => Frontend}/PagesController.php | 15 +- .../{ => Frontend}/SitelinkController.php | 27 +- .../Controllers/Oai/RequestController.php | 2 +- .../Controllers/Settings/PageController.php | 42 +- .../Settings/PagesTableController.php | 46 ++ app/Http/Controllers/StaticPageController.php | 25 - app/Http/Requests/Pages/EditPageRequest.php | 33 + app/Http/Requests/Pages/UpdatePageRequest.php | 34 + app/Http/routes.php | 25 - app/Models/ModelTrait.php | 6 +- app/Models/Page.php | 36 + composer.json | 5 +- composer.lock | 143 +++- config/app.php | 3 +- database/DisableForeignKeys.php | 79 +++ database/factories/PageFactory.php | 22 + .../2018_09_05_134425_create_pages_table.php | 41 ++ database/seeds/DatabaseSeeder.php | 663 +++++++++--------- database/seeds/PagesTableSeeder.php | 40 ++ package-lock.json | 20 +- package.json | 5 +- public/{assets => backend}/functions.js | 0 public/{assets => backend}/pagination.css | 0 public/backend/publish/datasetPublish.js | 1 + public/{assets => backend}/style.css | 2 + public/js/bootstrap.min.js | 7 - public/js/dataTable.js | 5 + public/js/jquery-2.1.1.min.js | 4 - public/mix-manifest.json | 3 +- resources/assets/js/app.js | 218 ------ .../assets/js/datasetPublish.js | 21 +- resources/lang/en/alerts.php | 23 + resources/lang/en/buttons.php | 55 ++ resources/lang/en/exceptions.php | 27 + resources/lang/en/labels.php | 82 +++ resources/lang/en/menus.php | 22 + resources/lang/en/validation.php | 31 +- .../dataset/dataset.blade.php} | 0 .../dataset}/show.blade.php | 2 +- .../{rdr => frontend}/home/about.blade.php | 0 .../{rdr => frontend}/home/contact.blade.php | 0 .../{rdr => frontend}/home/imprint.blade.php | 0 .../{rdr => frontend}/home/index.blade.php | 0 .../{rdr => frontend}/home/news.blade.php | 0 .../views/frontend/pages/index.blade.php | 5 + .../sitelink/index.blade.php | 6 +- resources/views/layouts/app.blade.php | 12 +- resources/views/partials/nav.blade.php | 10 +- .../views/publish/create-step1.blade.php | 17 +- resources/views/settings/dashboard.blade.php | 1 + .../views/settings/layouts/app.blade.php | 69 +- resources/views/settings/page/edit.blade.php | 98 +++ resources/views/settings/page/index.blade.php | 198 ++++++ routes/breadcrumbs.php | 5 + routes/web.php | 91 ++- webpack.mix.js | 9 +- 59 files changed, 1644 insertions(+), 761 deletions(-) create mode 100644 app/Events/Pages/PageUpdated.php create mode 100644 app/Exceptions/GeneralException.php rename app/Http/Controllers/{ => Frontend}/HomeController.php (63%) rename app/Http/Controllers/{ => Frontend}/PagesController.php (69%) mode change 100755 => 100644 rename app/Http/Controllers/{ => Frontend}/SitelinkController.php (64%) create mode 100644 app/Http/Controllers/Settings/PagesTableController.php delete mode 100644 app/Http/Controllers/StaticPageController.php create mode 100644 app/Http/Requests/Pages/EditPageRequest.php create mode 100644 app/Http/Requests/Pages/UpdatePageRequest.php delete mode 100755 app/Http/routes.php create mode 100644 database/DisableForeignKeys.php create mode 100644 database/factories/PageFactory.php create mode 100644 database/migrations/pages/2018_09_05_134425_create_pages_table.php create mode 100644 database/seeds/PagesTableSeeder.php rename public/{assets => backend}/functions.js (100%) rename public/{assets => backend}/pagination.css (100%) create mode 100644 public/backend/publish/datasetPublish.js rename public/{assets => backend}/style.css (99%) delete mode 100755 public/js/bootstrap.min.js create mode 100644 public/js/dataTable.js delete mode 100755 public/js/jquery-2.1.1.min.js delete mode 100644 resources/assets/js/app.js rename public/js/app.js => resources/assets/js/datasetPublish.js (92%) create mode 100644 resources/lang/en/alerts.php create mode 100644 resources/lang/en/buttons.php create mode 100644 resources/lang/en/exceptions.php create mode 100644 resources/lang/en/labels.php create mode 100644 resources/lang/en/menus.php rename resources/views/{rdr/document/documents.blade.php => frontend/dataset/dataset.blade.php} (100%) rename resources/views/{rdr/document => frontend/dataset}/show.blade.php (90%) rename resources/views/{rdr => frontend}/home/about.blade.php (100%) rename resources/views/{rdr => frontend}/home/contact.blade.php (100%) rename resources/views/{rdr => frontend}/home/imprint.blade.php (100%) rename resources/views/{rdr => frontend}/home/index.blade.php (100%) rename resources/views/{rdr => frontend}/home/news.blade.php (100%) create mode 100644 resources/views/frontend/pages/index.blade.php rename resources/views/{rdr => frontend}/sitelink/index.blade.php (84%) create mode 100644 resources/views/settings/page/edit.blade.php create mode 100644 resources/views/settings/page/index.blade.php diff --git a/app/Events/Pages/PageUpdated.php b/app/Events/Pages/PageUpdated.php new file mode 100644 index 0000000..bd13b0b --- /dev/null +++ b/app/Events/Pages/PageUpdated.php @@ -0,0 +1,26 @@ +page = $page; + } +} diff --git a/app/Exceptions/GeneralException.php b/app/Exceptions/GeneralException.php new file mode 100644 index 0000000..3f68dc4 --- /dev/null +++ b/app/Exceptions/GeneralException.php @@ -0,0 +1,12 @@ +findBySlug($slug); + if (!is_null(Page::query()->wherePage_slug($slug)->firstOrFail())) { + $result = Page::query()->wherePage_slug($slug)->firstOrFail(); + return view('frontend.pages.index') + ->withpage($result); + } else { + throw new GeneralException(trans('exceptions.backend.access.pages.not_found')); + } } } diff --git a/app/Http/Controllers/PagesController.php b/app/Http/Controllers/Frontend/PagesController.php old mode 100755 new mode 100644 similarity index 69% rename from app/Http/Controllers/PagesController.php rename to app/Http/Controllers/Frontend/PagesController.php index 88c9d5a..fe3375f --- a/app/Http/Controllers/PagesController.php +++ b/app/Http/Controllers/Frontend/PagesController.php @@ -1,13 +1,8 @@ middleware('auth'); } - public function documents() : View + public function datasets() : View { // $books = Book::with('category', 'shelf')->orderByTitle()->get(); $documents = Dataset::orderByType()->get(); - return view('rdr.document.documents', compact('documents')); + return view('frontend.dataset.dataset', compact('documents')); } /** @@ -37,6 +32,6 @@ class PagesController extends Controller $document = Dataset::findOrFail($id); $document->load('titles'); $document->load('abstracts'); - return view('rdr.document.show', compact('document')); + return view('frontend.dataset.show', compact('document')); } } diff --git a/app/Http/Controllers/SitelinkController.php b/app/Http/Controllers/Frontend/SitelinkController.php similarity index 64% rename from app/Http/Controllers/SitelinkController.php rename to app/Http/Controllers/Frontend/SitelinkController.php index 20a54f9..f4251e9 100644 --- a/app/Http/Controllers/SitelinkController.php +++ b/app/Http/Controllers/Frontend/SitelinkController.php @@ -1,9 +1,9 @@ where('server_state', 'LIKE', "%".$serverState."%"); + ->where('server_state', 'LIKE', "%" . $serverState . "%"); $select - ->select(DB::raw('YEAR(published_date) as published_date')) - ->distinct(true); + ->select(DB::raw('YEAR(published_date) as published_date')) + ->distinct(true); $this->years = $select->pluck('published_date'); $this->ids = array(); - return view('rdr.sitelink.index')->with(['years'=> $this->years,'documents'=> $this->ids]); + return view('frontend.sitelink.index')->with(['years' => $this->years, 'documents' => $this->ids]); } public function list($year) @@ -32,14 +32,13 @@ class SitelinkController extends Controller //$select = DB::table('documents') //->where('server_state','LIKE', "%".$serverState."%"); $select = Dataset::with('titles', 'authors') - ->where('server_state', 'LIKE', "%".$serverState."%"); + ->where('server_state', 'LIKE', "%" . $serverState . "%"); $from = (int)$year; - $until = $year + 1; + $until = $year + 1; $select - ->whereYear('server_date_published', '>=', $from) - ->whereYear('server_date_published', '<', $until); - + ->whereYear('server_date_published', '>=', $from) + ->whereYear('server_date_published', '<', $until); $documents = $select ->get(); @@ -51,11 +50,11 @@ class SitelinkController extends Controller // return $item->year !== $year; //}); - //$select->select('id'); //$this->ids = $select->pluck('id'); //return view('rdr.sitelink.index')->with(['years'=> $this->years,'ids'=> $this->ids]); - return view('rdr.sitelink.index')->with(['years'=> $this->years,'documents'=> $documents]); + return view('frontend.sitelink.index') + ->with(['years' => $this->years, 'documents' => $documents]); } } } diff --git a/app/Http/Controllers/Oai/RequestController.php b/app/Http/Controllers/Oai/RequestController.php index 5cbc818..b1deb3a 100644 --- a/app/Http/Controllers/Oai/RequestController.php +++ b/app/Http/Controllers/Oai/RequestController.php @@ -316,7 +316,7 @@ class RequestController extends Controller */ private function _addLandingPageAttribute(\DOMNode $document, $dataid) { - $url = route('document.show', $dataid); + $url = route('frontend.dataset.show', $dataid); $owner = $document->ownerDocument; $attr = $owner->createAttribute('landingpage'); diff --git a/app/Http/Controllers/Settings/PageController.php b/app/Http/Controllers/Settings/PageController.php index 73dea31..6c931c8 100644 --- a/app/Http/Controllers/Settings/PageController.php +++ b/app/Http/Controllers/Settings/PageController.php @@ -6,17 +6,27 @@ use App\Models\Page; use Illuminate\Http\Request; use App\Http\Controllers\Controller; use App\Http\Requests\Pages\IndexPageRequest; +use App\Http\Requests\Pages\UpdatePageRequest; +use Illuminate\View\View; +use Illuminate\Http\RedirectResponse; +use App\Exceptions\GeneralException; +use App\Events\Pages\PageUpdated; class PageController extends Controller { + /** + * Associated Repository Model. + */ + const MODEL = Page::class; + /** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ - public function index(IndexPageRequest $request) + public function index(IndexPageRequest $request): View { - return new view('settings.pages.index'); + return view('settings.page.index'); } /** @@ -59,19 +69,34 @@ class PageController extends Controller */ public function edit(Page $page) { - // + return view('settings.page.edit') + ->withPage($page); } /** * Update the specified resource in storage. * - * @param \Illuminate\Http\Request $request + * @param @param \App\Http\Requests\Pages\UpdatePageRequest $request * @param \App\Models\Page $page * @return \Illuminate\Http\Response */ - public function update(Request $request, Page $page) + public function update(UpdatePageRequest $request, Page $page) : RedirectResponse { - // + // $this->pages->update($page, $request->except(['_method', '_token'])); + $input = $request->except(['_method', '_token']); + // Making extra fields + $input['page_slug'] = str_slug($input['title']); + $input['status'] = isset($input['status']) ? 1 : 0; + $input['updated_by'] = \Auth::user()->id; + + if ($page->update($input)) { + event(new PageUpdated($page)); + + return redirect() + ->route('settings.page.index') + ->with('flash_message', trans('alerts.backend.pages.updated')); + } + throw new GeneralException(trans('exceptions.backend.pages.update_error')); } /** @@ -84,4 +109,9 @@ class PageController extends Controller { // } + + public function query() + { + return call_user_func(static::MODEL.'::query'); + } } diff --git a/app/Http/Controllers/Settings/PagesTableController.php b/app/Http/Controllers/Settings/PagesTableController.php new file mode 100644 index 0000000..727129c --- /dev/null +++ b/app/Http/Controllers/Settings/PagesTableController.php @@ -0,0 +1,46 @@ +pages = factory(Page::class, 2)->make(); + $this->pages = Page::get(); + } + + + public function get() + { + $test = Datatables::of($this->pages) + ->escapeColumns(['title']) + ->addColumn('status', function ($page) { + return $page->status; + }) + ->addColumn('created_at', function ($page) { + return $page->created_at->toDateString(); + }) + ->addColumn('created_by', function ($page) { + return $page->created_by; + }) + ->addColumn('actions', function ($page) { + return $page->action_buttons; + }) + ->make(true); + return $test; + } +} diff --git a/app/Http/Controllers/StaticPageController.php b/app/Http/Controllers/StaticPageController.php deleted file mode 100644 index 73c4e15..0000000 --- a/app/Http/Controllers/StaticPageController.php +++ /dev/null @@ -1,25 +0,0 @@ -middleware('auth'); - } - - public function imprint() - { - ////$books = Book::available()->orderByTitle()->lists('title', 'id'); - //$persons = Person::active()->orderByName()->pluck('last_name', 'id'); - ////$categories = Category::lists('category', 'id'); - //$categories = Project::get(); - - //return view('rdr.borrow.borrow', compact('persons', 'categories')); - } -} diff --git a/app/Http/Requests/Pages/EditPageRequest.php b/app/Http/Requests/Pages/EditPageRequest.php new file mode 100644 index 0000000..f56edae --- /dev/null +++ b/app/Http/Requests/Pages/EditPageRequest.php @@ -0,0 +1,33 @@ +allow('edit-page'); + } + + /** + * Get the validation rules that apply to the request. + * + * @return array + */ + public function rules() + { + return [ + // + ]; + } +} diff --git a/app/Http/Requests/Pages/UpdatePageRequest.php b/app/Http/Requests/Pages/UpdatePageRequest.php new file mode 100644 index 0000000..9060983 --- /dev/null +++ b/app/Http/Requests/Pages/UpdatePageRequest.php @@ -0,0 +1,34 @@ +allow('edit-page'); + } + + /** + * Get the validation rules that apply to the request. + * + * @return array + */ + public function rules() + { + return [ + 'title' => 'required|max:191', + 'description' => 'required', + ]; + } +} diff --git a/app/Http/routes.php b/app/Http/routes.php deleted file mode 100755 index ec43556..0000000 --- a/app/Http/routes.php +++ /dev/null @@ -1,25 +0,0 @@ - 'api.dropdown.peminjaman', 'uses' => 'PeminjamanController@dropdown' -// ]); -Route::get('/api/dropdown/borrow/{id}', function ($id) { - if (Request::ajax()) { - //$category_id = Input::get('category_id'); - // $books = Book::available()->orderByTitle()->where('category_id', '=', $id)->get(); - $books = Dataset::OrderByType()->where('project_id', '=', $id)->get(); - return Response::json($books); - } -}); diff --git a/app/Models/ModelTrait.php b/app/Models/ModelTrait.php index 92edc58..da8ffc4 100644 --- a/app/Models/ModelTrait.php +++ b/app/Models/ModelTrait.php @@ -2,6 +2,8 @@ namespace App\Models; +use Illuminate\Support\Facades\Auth; + trait ModelTrait { /** @@ -9,7 +11,7 @@ trait ModelTrait */ public function getEditButtonAttribute($permission, $route) { - if (access()->allow($permission)) { + if (Auth::user()->can($permission)) { return ' '; @@ -21,7 +23,7 @@ trait ModelTrait */ public function getDeleteButtonAttribute($permission, $route) { - if (access()->allow($permission)) { + if (Auth::user()->can($permission)) { return 'belongsTo(User::class, 'created_by'); } + /** + * @return string + */ + public function getActionButtonsAttribute() + { + return '
+ '.$this->getEditButtonAttribute('page', 'settings.page.edit').' + '.$this->getViewButtonAttribute().' + '.$this->getDeleteButtonAttribute('page', 'settings.page.destroy').' +
'; + } + + /** + * @return string + */ + public function getViewButtonAttribute() + { + return '
+ + '; + } + + /** + * @return string + */ + public function getStatusLabelAttribute() + { + if ($this->isActive()) { + return "'; + } + + return "'; + } + /** * @return bool */ diff --git a/composer.json b/composer.json index 035240b..cbcc03c 100755 --- a/composer.json +++ b/composer.json @@ -16,16 +16,19 @@ "laravel/tinker": "~1.0", "laravelcollective/html": "^5.5.0", "solarium/solarium": "^3.8", + "yajra/laravel-datatables-oracle": "^8.8", "zizaco/entrust": "^1.9" }, "require-dev": { + "fzaninotto/faker": "^1.8", "phpunit/phpunit": "~6.0", "squizlabs/php_codesniffer": "^3.3" }, "autoload": { "classmap": [ "database/seeds", - "database/factories" + "database/factories", + "database" ], "psr-4": { "App\\": "app/" diff --git a/composer.lock b/composer.lock index 05f3c54..e3c11c6 100755 --- 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": "12d5d5d5edbaf033404b80e81076f7fb", + "content-hash": "45de841e5697551ae24e4065b9afb6c4", "packages": [ { "name": "davejamesmiller/laravel-breadcrumbs", @@ -531,16 +531,16 @@ }, { "name": "laravel/framework", - "version": "v5.5.42", + "version": "v5.5.43", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "6550ae917b0c49a5915a52cd7c7eafd16fc0b538" + "reference": "84f4ed02ec6eb4a56629fb6acbee1df56891e3c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/6550ae917b0c49a5915a52cd7c7eafd16fc0b538", - "reference": "6550ae917b0c49a5915a52cd7c7eafd16fc0b538", + "url": "https://api.github.com/repos/laravel/framework/zipball/84f4ed02ec6eb4a56629fb6acbee1df56891e3c7", + "reference": "84f4ed02ec6eb4a56629fb6acbee1df56891e3c7", "shasum": "" }, "require": { @@ -661,7 +661,7 @@ "framework", "laravel" ], - "time": "2018-08-08T18:22:44+00:00" + "time": "2018-09-02T11:45:05+00:00" }, { "name": "laravel/tinker", @@ -1297,16 +1297,16 @@ }, { "name": "psy/psysh", - "version": "v0.9.7", + "version": "v0.9.8", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "4f5b6c090948773a8bfeea6a0f07ab7d0b24e932" + "reference": "ed3c32c4304e1a678a6e0f9dc11dd2d927d89555" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/4f5b6c090948773a8bfeea6a0f07ab7d0b24e932", - "reference": "4f5b6c090948773a8bfeea6a0f07ab7d0b24e932", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/ed3c32c4304e1a678a6e0f9dc11dd2d927d89555", + "reference": "ed3c32c4304e1a678a6e0f9dc11dd2d927d89555", "shasum": "" }, "require": { @@ -1367,7 +1367,7 @@ "interactive", "shell" ], - "time": "2018-08-11T15:54:43+00:00" + "time": "2018-09-05T11:40:09+00:00" }, { "name": "ramsey/uuid", @@ -2538,6 +2538,77 @@ ], "time": "2018-07-29T20:33:41+00:00" }, + { + "name": "yajra/laravel-datatables-oracle", + "version": "v8.8.0", + "source": { + "type": "git", + "url": "https://github.com/yajra/laravel-datatables.git", + "reference": "f2959bf773fc315e1b3319fb0a34c880b97706d5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/yajra/laravel-datatables/zipball/f2959bf773fc315e1b3319fb0a34c880b97706d5", + "reference": "f2959bf773fc315e1b3319fb0a34c880b97706d5", + "shasum": "" + }, + "require": { + "illuminate/database": "5.4.*|5.5.*|5.6.*|5.7.*", + "illuminate/filesystem": "5.4.*|5.5.*|5.6.*|5.7.*", + "illuminate/http": "5.4.*|5.5.*|5.6.*|5.7.*", + "illuminate/support": "5.4.*|5.5.*|5.6.*|5.7.*", + "illuminate/view": "5.4.*|5.5.*|5.6.*|5.7.*", + "php": ">=7.0" + }, + "require-dev": { + "orchestra/testbench": "~3.5" + }, + "suggest": { + "yajra/laravel-datatables-buttons": "Plugin for server-side exporting of dataTables.", + "yajra/laravel-datatables-editor": "Plugin to use DataTables Editor (requires a license).", + "yajra/laravel-datatables-fractal": "Plugin for server-side response using Fractal.", + "yajra/laravel-datatables-html": "Plugin for server-side HTML builder of dataTables." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "8.0-dev" + }, + "laravel": { + "providers": [ + "Yajra\\DataTables\\DataTablesServiceProvider" + ], + "aliases": { + "DataTables": "Yajra\\DataTables\\Facades\\DataTables" + } + } + }, + "autoload": { + "psr-4": { + "Yajra\\DataTables\\": "src/" + }, + "files": [ + "src/helper.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Arjay Angeles", + "email": "aqangeles@gmail.com" + } + ], + "description": "jQuery DataTables API for Laravel 4|5", + "keywords": [ + "datatables", + "jquery", + "laravel" + ], + "time": "2018-09-05T05:43:38+00:00" + }, { "name": "zizaco/entrust", "version": "1.9.1", @@ -2672,6 +2743,56 @@ ], "time": "2017-07-22T11:58:36+00:00" }, + { + "name": "fzaninotto/faker", + "version": "v1.8.0", + "source": { + "type": "git", + "url": "https://github.com/fzaninotto/Faker.git", + "reference": "f72816b43e74063c8b10357394b6bba8cb1c10de" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/f72816b43e74063c8b10357394b6bba8cb1c10de", + "reference": "f72816b43e74063c8b10357394b6bba8cb1c10de", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "ext-intl": "*", + "phpunit/phpunit": "^4.8.35 || ^5.7", + "squizlabs/php_codesniffer": "^1.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.8-dev" + } + }, + "autoload": { + "psr-4": { + "Faker\\": "src/Faker/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "François Zaninotto" + } + ], + "description": "Faker is a PHP library that generates fake data for you.", + "keywords": [ + "data", + "faker", + "fixtures" + ], + "time": "2018-07-12T10:23:15+00:00" + }, { "name": "myclabs/deep-copy", "version": "1.8.1", diff --git a/config/app.php b/config/app.php index 73f8987..4124bd9 100755 --- a/config/app.php +++ b/config/app.php @@ -170,6 +170,7 @@ return [ // 'Illuminate\Html\HtmlServiceProvider', // 'Collective\Html\HtmlServiceProvider', Zizaco\Entrust\EntrustServiceProvider::class, + Yajra\DataTables\DataTablesServiceProvider::class, /* * Application Service Providers... @@ -179,7 +180,6 @@ return [ 'App\Providers\ConfigServiceProvider', 'App\Providers\EventServiceProvider', 'App\Providers\RouteServiceProvider', - // List off others providers... App\Providers\SolariumServiceProvider::class, @@ -240,6 +240,7 @@ return [ // 'Form' => 'Collective\Html\FormFacade', // 'Html' => 'Collective\Html\HtmlFacade', 'Breadcrumbs' => DaveJamesMiller\Breadcrumbs\Facade::class, + //'Datatables' => Yajra\DataTables\Facades\DataTables::class ], diff --git a/database/DisableForeignKeys.php b/database/DisableForeignKeys.php new file mode 100644 index 0000000..da733c0 --- /dev/null +++ b/database/DisableForeignKeys.php @@ -0,0 +1,79 @@ + [ + 'enable' => 'SET FOREIGN_KEY_CHECKS=1;', + 'disable' => 'SET FOREIGN_KEY_CHECKS=0;', + ], + 'sqlite' => [ + 'enable' => 'PRAGMA foreign_keys = ON;', + 'disable' => 'PRAGMA foreign_keys = OFF;', + ], + 'sqlsrv' => [ + 'enable' => 'EXEC sp_msforeachtable @command1="print \'?\'", @command2="ALTER TABLE ? WITH CHECK CHECK CONSTRAINT all";', + 'disable' => 'EXEC sp_msforeachtable "ALTER TABLE ? NOCHECK CONSTRAINT all";', + ], + 'pgsql' => [ + 'enable' => 'SET CONSTRAINTS ALL IMMEDIATE;', + 'disable' => 'SET CONSTRAINTS ALL DEFERRED;', + ], + ]; + + /** + * Disable foreign key checks for current db driver. + */ + protected function disableForeignKeys() + { + DB::statement($this->getDisableStatement()); + } + + /** + * Enable foreign key checks for current db driver. + */ + protected function enableForeignKeys() + { + DB::statement($this->getEnableStatement()); + } + + /** + * Return current driver enable command. + * + * @return mixed + */ + private function getEnableStatement() + { + return $this->getDriverCommands()['enable']; + } + + /** + * Return current driver disable command. + * + * @return mixed + */ + private function getDisableStatement() + { + return $this->getDriverCommands()['disable']; + } + + /** + * Returns command array for current db driver. + * + * @return mixed + */ + private function getDriverCommands() + { + return $this->commands[DB::getDriverName()]; + } +} diff --git a/database/factories/PageFactory.php b/database/factories/PageFactory.php new file mode 100644 index 0000000..b5c19b1 --- /dev/null +++ b/database/factories/PageFactory.php @@ -0,0 +1,22 @@ +define(Page::class, function (Faker $faker) { + $title = $faker->sentence; + + // $newestPage = Page::orderBy('id', 'desc')->first(); + + return [ + 'title' => $title, + 'page_slug' => str_slug($title), + 'description' => $faker->paragraph, + 'cannonical_link' => 'http://localhost/'.str_slug($title), + 'created_by' => 1, + 'status' => 1, + 'created_at' => Carbon\Carbon::now(), + 'updated_at' => Carbon\Carbon::now(), + ]; +}); diff --git a/database/migrations/pages/2018_09_05_134425_create_pages_table.php b/database/migrations/pages/2018_09_05_134425_create_pages_table.php new file mode 100644 index 0000000..1ee1795 --- /dev/null +++ b/database/migrations/pages/2018_09_05_134425_create_pages_table.php @@ -0,0 +1,41 @@ +increments('id'); + $table->string('title', 191); + $table->string('page_slug', 191)->unique(); + $table->text('description', 65535)->nullable(); + $table->string('cannonical_link', 191)->nullable(); + $table->string('seo_title', 191)->nullable(); + $table->string('seo_keyword', 191)->nullable(); + $table->text('seo_description', 65535)->nullable(); + $table->boolean('status')->default(1); + $table->integer('created_by')->unsigned(); + $table->integer('updated_by')->unsigned()->nullable(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('pages'); + } +} diff --git a/database/seeds/DatabaseSeeder.php b/database/seeds/DatabaseSeeder.php index aeae886..bacdbd3 100755 --- a/database/seeds/DatabaseSeeder.php +++ b/database/seeds/DatabaseSeeder.php @@ -1,364 +1,345 @@ insert([ + // DB::table('users')->insert([ // 'name' => str_random(10), // 'email' => str_random(10).'@gmail.com', // 'password' => bcrypt('secret'), // ]); - $this->call('StudentTableSeeder'); - $this->call('CategoryTableSeeder'); - $this->call('ShelfTableSeeder'); - $this->call('BookTableSeeder'); - $this->call('PeriodeTableSeeder'); - $this->call('UserTableSeeder'); - $this->call('CollectionTableSeeder'); - $this->call('DocumentTableSeeder'); - $this->command->info('User table seeded!'); - } - -} - -class UserTableSeeder extends Seeder { - - public function run() - { - // DB::table('users')->delete(); - - // User::create([ - // 'name' => str_random(10), - // 'email' => 'foo@gmail.com', - // 'password' => bcrypt('secret') - // ]); - DB::table('users')->insert([ - [ - 'name' => "user1", - 'email' => "user1".'@gmail.com', - 'password' => bcrypt('secret') - ], - [ - 'name' => "admin", - 'email' => 'arno.kaimbacher@hotmail.de', - 'password' => bcrypt('admin007') - ] - ]); - + $this->call('StudentTableSeeder'); + $this->call('CategoryTableSeeder'); + $this->call('ShelfTableSeeder'); + $this->call('BookTableSeeder'); + $this->call('PeriodeTableSeeder'); + $this->call('UserTableSeeder'); + $this->call('CollectionTableSeeder'); + $this->call('DocumentTableSeeder'); + $this->command->info('User table seeded!'); } - } -class PeriodeTableSeeder extends Seeder { - +class UserTableSeeder extends Seeder +{ public function run() { // DB::table('users')->delete(); // User::create([ - // 'name' => str_random(10), - // 'email' => 'foo@gmail.com', - // 'password' => bcrypt('secret') - // ]); - DB::table('periodes')->insert([ + // 'name' => str_random(10), + // 'email' => 'foo@gmail.com', + // 'password' => bcrypt('secret') + // ]); + DB::table('users')->insert([ + [ + 'name' => "user1", + 'email' => "user1" . '@gmail.com', + 'password' => bcrypt('secret'), + ], + [ + 'name' => "admin", + 'email' => 'arno.kaimbacher@hotmail.de', + 'password' => bcrypt('admin007'), + ], + ]); + } +} + +class PeriodeTableSeeder extends Seeder +{ + public function run() + { + // DB::table('users')->delete(); + + // User::create([ + // 'name' => str_random(10), + // 'email' => 'foo@gmail.com', + // 'password' => bcrypt('secret') + // ]); + DB::table('periodes')->insert([ 'id' => '1', - 'days' => '100', - 'created_at' => '2015-06-09 02:59:49', - 'updated_at' => '2015-06-10 08:14:27' + 'days' => '100', + 'created_at' => '2015-06-09 02:59:49', + 'updated_at' => '2015-06-10 08:14:27', + ]); + } +} + +class CategoryTableSeeder extends Seeder +{ + public function run() + { + // DB::table('users')->delete(); + + // User::create([ + // 'name' => str_random(10), + // 'email' => 'foo@gmail.com', + // 'password' => bcrypt('secret') + // ]); + DB::table('categories')->insert([ + [ + // 'id' => '1', + 'category' => 'Sains', + 'created_at' => '2015-06-09 00:17:51', + 'updated_at' => '2015-06-09 01:01:36', + ], + [ + // 'id' => '2', + 'category' => 'Computer', + 'created_at' => '2015-06-09 01:07:41', + 'updated_at' => '2015-06-09 01:07:41', + ], + [ + // 'id' => '3', + 'category' => 'Life Lesson', + 'created_at' => '2015-06-09 01:07:50', + 'updated_at' => '2015-06-09 01:07:50', + ], + [ + // 'id' => '4', + 'category' => 'Fairy Tail', + 'created_at' => '2015-06-09 01:07:50', + 'updated_at' => '2015-06-09 01:07:50', + ], + ]); + } +} + +class BookTableSeeder extends Seeder +{ + public function run() + { + // DB::table('users')->delete(); + + // User::create([ + // 'name' => str_random(10), + // 'email' => 'foo@gmail.com', + // 'password' => bcrypt('secret') + // ]); + DB::table('books')->insert([ + [ + // 'id' => '1', + 'title' => 'Laravel 5', + 'author' => 'Arno Kaimbacher', + 'year' => '2017', + 'stock' => '9', + 'category_id' => '4', + 'shelf_id' => '1', + 'created_at' => '2015-06-09 00:17:51', + 'updated_at' => '2015-06-09 01:01:36', + 'year_id' => '0', + ], + [ + // 'id' => '2', + 'title' => 'Angular.Js', + 'author' => 'Mark Zuckerberg', + 'year' => '2014', + 'stock' => '5', + 'category_id' => '4', + 'shelf_id' => '3', + 'created_at' => '2015-06-09 00:17:51', + 'updated_at' => '2015-06-09 01:01:36', + 'year_id' => '0', + ], + [ + // 'id' => '3', + 'title' => 'OOP with PHP', + 'author' => 'Richard Stallman', + 'year' => '1999', + 'stock' => '7', + 'category_id' => '1', + 'shelf_id' => '2', + 'created_at' => '2015-06-09 00:17:51', + 'updated_at' => '2015-06-09 01:01:36', + 'year_id' => '0', + ], + ]); + } +} + +class ShelfTableSeeder extends Seeder +{ + public function run() + { + DB::table('shelves')->insert([ + [ + 'id' => '1', + 'shelf' => 'A', + 'created_at' => '2015-06-09 00:17:51', + 'updated_at' => '2015-06-09 01:01:36', + ], + [ + 'id' => '2', + 'shelf' => 'B', + 'created_at' => '2015-06-09 00:17:51', + 'updated_at' => '2015-06-09 01:01:36', + ], + [ + 'id' => '3', + 'shelf' => 'C', + 'created_at' => '2015-06-09 00:17:51', + 'updated_at' => '2015-06-09 01:01:36', + ], + [ + 'id' => '4', + 'shelf' => 'D', + 'created_at' => '2015-06-09 00:17:51', + 'updated_at' => '2015-06-09 01:01:36', + ], + [ + 'id' => '5', + 'shelf' => 'E', + 'created_at' => '2015-06-09 00:17:51', + 'updated_at' => '2015-06-09 01:01:36', + ], + ]); + } +} + +class StudentTableSeeder extends Seeder +{ + public function run() + { + DB::table('students')->insert([ + [ + 'id' => '1', + 'name' => 'Arno Kaimbacher', + 'registered_at' => '1432080000', + 'borrow' => '1', + 'status' => '1', + 'created_at' => '2015-06-09 00:17:51', + 'updated_at' => '2015-06-09 01:01:36', + ], + [ + 'id' => '2', + 'name' => 'Chelsea Islan', + 'registered_at' => '1433948676', + 'borrow' => '1', + 'status' => '1', + 'created_at' => '2015-06-09 00:17:51', + 'updated_at' => '2015-06-09 01:01:36', + ], + [ + 'id' => '3', + 'name' => 'John Mayer', + 'registered_at' => '1434734048', + 'borrow' => '0', + 'status' => '1', + 'created_at' => '2015-06-09 00:17:51', + 'updated_at' => '2015-06-09 01:01:36', + ], + [ + 'id' => '4', + 'name' => 'Emma Watson', + 'registered_at' => '1434734067', + 'borrow' => '1', + 'status' => '1', + 'created_at' => '2015-06-09 00:17:51', + 'updated_at' => '2015-06-09 01:01:36', + ], + [ + 'id' => '5', + 'name' => 'Scarlet Johansson', + 'registered_at' => '1434734082', + 'borrow' => '0', + 'status' => '1', + 'created_at' => '2015-06-09 00:17:51', + 'updated_at' => '2015-06-09 01:01:36', + ], + ]); + } +} + +class CollectionTableSeeder extends Seeder +{ + public function run() + { + // DB::table('users')->delete(); + + // User::create([ + // 'name' => str_random(10), + // 'email' => 'foo@gmail.com', + // 'password' => bcrypt('secret') + // ]); + DB::table('collections')->insert([ + [ + 'id' => '0', + 'number' => null, + 'name' => 'first collection', + 'parent_id' => null, + 'created_at' => new DateTime(), + 'updated_at' => new DateTime(), + ], + [ + 'id' => '1', + 'number' => '0', + 'name' => 'Informatik, Informationswissenschaft, allgemeine Werke', + 'parent_id' => '0', + 'created_at' => '2015-06-09 00:17:51', + 'updated_at' => '2015-06-09 01:01:36', + ], + [ + 'id' => '2', + 'number' => '1', + 'name' => 'Philosophie und Psychologie', + 'parent_id' => '0', + 'created_at' => '2015-06-09 01:07:41', + 'updated_at' => '2015-06-09 01:07:41', + ], + [ + 'id' => '3', + 'number' => '2', + 'name' => 'Religion', + 'parent_id' => '0', + 'created_at' => '2015-06-09 01:07:50', + 'updated_at' => '2015-06-09 01:07:50', + ], + [ + 'id' => '4', + 'number' => '3', + 'name' => 'Sozialwissenschaften', + 'parent_id' => '0', + 'created_at' => '2015-06-09 01:07:50', + 'updated_at' => '2015-06-09 01:07:50', + ], + ]); + } +} + +class DocumentTableSeeder extends Seeder +{ + public function run() + { + DB::table('documents')->insert([ + [ + 'id' => '0', + ], + [ + 'id' => '1', + ], ]); - } - -} - -class CategoryTableSeeder extends Seeder { - - public function run() - { - // DB::table('users')->delete(); - - // User::create([ - // 'name' => str_random(10), - // 'email' => 'foo@gmail.com', - // 'password' => bcrypt('secret') - // ]); - DB::table('categories')->insert([ - [ - // 'id' => '1', - 'category' => 'Sains', - 'created_at' => '2015-06-09 00:17:51', - 'updated_at' => '2015-06-09 01:01:36' - ], - [ - // 'id' => '2', - 'category' => 'Computer', - 'created_at' => '2015-06-09 01:07:41', - 'updated_at' => '2015-06-09 01:07:41' - ], - [ - // 'id' => '3', - 'category' => 'Life Lesson', - 'created_at' => '2015-06-09 01:07:50', - 'updated_at' => '2015-06-09 01:07:50' - ], - [ - // 'id' => '4', - 'category' => 'Fairy Tail', - 'created_at' => '2015-06-09 01:07:50', - 'updated_at' => '2015-06-09 01:07:50' - ] - ]); - - } - -} - -class BookTableSeeder extends Seeder { - - public function run() - { - // DB::table('users')->delete(); - - // User::create([ - // 'name' => str_random(10), - // 'email' => 'foo@gmail.com', - // 'password' => bcrypt('secret') - // ]); - DB::table('books')->insert([ - [ - // 'id' => '1', - 'title' => 'Laravel 5', - 'author' => 'Arno Kaimbacher', - 'year' => '2017', - 'stock' => '9', - 'category_id' => '4', - 'shelf_id' => '1', - 'created_at' => '2015-06-09 00:17:51', - 'updated_at' => '2015-06-09 01:01:36', - 'year_id' => '0' - ], - [ - // 'id' => '2', - 'title' => 'Angular.Js', - 'author' => 'Mark Zuckerberg', - 'year' => '2014', - 'stock' => '5', - 'category_id' => '4', - 'shelf_id' => '3', - 'created_at' => '2015-06-09 00:17:51', - 'updated_at' => '2015-06-09 01:01:36', - 'year_id' => '0' - ], - [ - // 'id' => '3', - 'title' => 'OOP with PHP', - 'author' => 'Richard Stallman', - 'year' => '1999', - 'stock' => '7', - 'category_id' => '1', - 'shelf_id' => '2', - 'created_at' => '2015-06-09 00:17:51', - 'updated_at' => '2015-06-09 01:01:36', - 'year_id' => '0' - ] - ]); - - } - -} - -class ShelfTableSeeder extends Seeder { - - public function run() - { - - DB::table('shelves')->insert([ - [ - 'id' => '1', - 'shelf' => 'A', - 'created_at' => '2015-06-09 00:17:51', - 'updated_at' => '2015-06-09 01:01:36' - ], - [ - 'id' => '2', - 'shelf' => 'B', - 'created_at' => '2015-06-09 00:17:51', - 'updated_at' => '2015-06-09 01:01:36' - ], - [ - 'id' => '3', - 'shelf' => 'C', - 'created_at' => '2015-06-09 00:17:51', - 'updated_at' => '2015-06-09 01:01:36' - ], - [ - 'id' => '4', - 'shelf' => 'D', - 'created_at' => '2015-06-09 00:17:51', - 'updated_at' => '2015-06-09 01:01:36' - ], - [ - 'id' => '5', - 'shelf' => 'E', - 'created_at' => '2015-06-09 00:17:51', - 'updated_at' => '2015-06-09 01:01:36' - ] - ]); - + DB::table('link_documents_collections')->insert([ + [ + 'document_id' => '0', + 'collection_id' => '1', + ], + [ + 'document_id' => '1', + 'collection_id' => '1', + ], + ]); } } - -class StudentTableSeeder extends Seeder { - - public function run() - { - - DB::table('students')->insert([ - [ - 'id' => '1', - 'name' => 'Arno Kaimbacher', - 'registered_at' => '1432080000', - 'borrow' => '1', - 'status' => '1', - 'created_at' => '2015-06-09 00:17:51', - 'updated_at' => '2015-06-09 01:01:36' - ], - [ - 'id' => '2', - 'name' => 'Chelsea Islan', - 'registered_at' => '1433948676', - 'borrow' => '1', - 'status' => '1', - 'created_at' => '2015-06-09 00:17:51', - 'updated_at' => '2015-06-09 01:01:36' - ], - [ - 'id' => '3', - 'name' => 'John Mayer', - 'registered_at' => '1434734048', - 'borrow' => '0', - 'status' => '1', - 'created_at' => '2015-06-09 00:17:51', - 'updated_at' => '2015-06-09 01:01:36' - ], - [ - 'id' => '4', - 'name' => 'Emma Watson', - 'registered_at' => '1434734067', - 'borrow' => '1', - 'status' => '1', - 'created_at' => '2015-06-09 00:17:51', - 'updated_at' => '2015-06-09 01:01:36' - ], - [ - 'id' => '5', - 'name' => 'Scarlet Johansson', - 'registered_at' => '1434734082', - 'borrow' => '0', - 'status' => '1', - 'created_at' => '2015-06-09 00:17:51', - 'updated_at' => '2015-06-09 01:01:36' - ], - ]); - - } -} - -class CollectionTableSeeder extends Seeder { - - public function run() - { - // DB::table('users')->delete(); - - // User::create([ - // 'name' => str_random(10), - // 'email' => 'foo@gmail.com', - // 'password' => bcrypt('secret') - // ]); - DB::table('collections')->insert([ - [ - 'id' => '0', - 'number' => null, - 'name' => 'first collection', - 'parent_id' => null, - 'created_at' => new DateTime(), - 'updated_at' => new DateTime() - ], - [ - 'id' => '1', - 'number' => '0', - 'name' => 'Informatik, Informationswissenschaft, allgemeine Werke', - 'parent_id' => '0', - 'created_at' => '2015-06-09 00:17:51', - 'updated_at' => '2015-06-09 01:01:36' - ], - [ - 'id' => '2', - 'number' => '1', - 'name' => 'Philosophie und Psychologie', - 'parent_id' => '0', - 'created_at' => '2015-06-09 01:07:41', - 'updated_at' => '2015-06-09 01:07:41' - ], - [ - 'id' => '3', - 'number' => '2', - 'name' => 'Religion', - 'parent_id' => '0', - 'created_at' => '2015-06-09 01:07:50', - 'updated_at' => '2015-06-09 01:07:50' - ], - [ - 'id' => '4', - 'number' => '3', - 'name' => 'Sozialwissenschaften', - 'parent_id' => '0', - 'created_at' => '2015-06-09 01:07:50', - 'updated_at' => '2015-06-09 01:07:50' - ] - ]); - - } - -} - -class DocumentTableSeeder extends Seeder { - - public function run() - { - DB::table('documents')->insert([ - [ - 'id' => '0' - ], - [ - 'id' => '1' - ] - ]); - - DB::table('link_documents_collections')->insert([ - [ - 'document_id' => '0', - 'collection_id' => '1' - ], - [ - 'document_id' => '1', - 'collection_id' => '1' - ] - ]); - - - } - -} diff --git a/database/seeds/PagesTableSeeder.php b/database/seeds/PagesTableSeeder.php new file mode 100644 index 0000000..f0e1ef3 --- /dev/null +++ b/database/seeds/PagesTableSeeder.php @@ -0,0 +1,40 @@ +sentence; + + $this->disableForeignKeys(); + // $this->truncate('pages'); + $page = [ + [ + 'title' => 'Terms and conditions', + 'page_slug' => 'terms-and-conditions', + 'description' => $faker->text($maxNbChars = 255), + 'status' => '1', + 'created_by' => '1', + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + ], + ]; + DB::table('pages')->insert($page); + + $this->enableForeignKeys(); + } +} diff --git a/package-lock.json b/package-lock.json index 53fe762..5a64fe2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2452,6 +2452,23 @@ "assert-plus": "^1.0.0" } }, + "datatables.net": { + "version": "1.10.19", + "resolved": "https://registry.npmjs.org/datatables.net/-/datatables.net-1.10.19.tgz", + "integrity": "sha512-+ljXcI6Pj3PTGy5pesp3E5Dr3x3AV45EZe0o1r0gKENN2gafBKXodVnk2ypKwl2tTmivjxbkiqoWnipTefyBTA==", + "requires": { + "jquery": ">=1.7" + } + }, + "datatables.net-buttons": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/datatables.net-buttons/-/datatables.net-buttons-1.5.3.tgz", + "integrity": "sha512-qGdYiquuIvoZSH0jkRTcVnS1LlCuJFOSlIX5wNmK+3267Ryq6r9llKFtgrIORkSlyy+M1TJMViFJxRSX5W62GA==", + "requires": { + "datatables.net": "^1.10.15", + "jquery": ">=1.7" + } + }, "date-now": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", @@ -5166,8 +5183,7 @@ "jquery": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.3.1.tgz", - "integrity": "sha512-Ubldcmxp5np52/ENotGxlLe6aGMvmF4R8S6tZjsP6Knsaxd/xp3Zrh50cG93lR6nPXyUFwzN3ZSOQI0wRJNdGg==", - "dev": true + "integrity": "sha512-Ubldcmxp5np52/ENotGxlLe6aGMvmF4R8S6tZjsP6Knsaxd/xp3Zrh50cG93lR6nPXyUFwzN3ZSOQI0wRJNdGg==" }, "js-base64": { "version": "2.4.8", diff --git a/package.json b/package.json index bc528ec..130511e 100755 --- a/package.json +++ b/package.json @@ -16,5 +16,8 @@ "lodash": "^4.17.10", "vue": "^2.5.7" }, - "dependencies": {} + "dependencies": { + "datatables.net": "^1.10.15", + "datatables.net-buttons": "^1.3.1" + } } diff --git a/public/assets/functions.js b/public/backend/functions.js similarity index 100% rename from public/assets/functions.js rename to public/backend/functions.js diff --git a/public/assets/pagination.css b/public/backend/pagination.css similarity index 100% rename from public/assets/pagination.css rename to public/backend/pagination.css diff --git a/public/backend/publish/datasetPublish.js b/public/backend/publish/datasetPublish.js new file mode 100644 index 0000000..589f386 --- /dev/null +++ b/public/backend/publish/datasetPublish.js @@ -0,0 +1 @@ +!function(t){var e={};function a(s){if(e[s])return e[s].exports;var r=e[s]={i:s,l:!1,exports:{}};return t[s].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.m=t,a.c=e,a.d=function(t,e,s){a.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:s})},a.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,"a",e),e},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a.p="/",a(a.s=0)}([function(t,e,a){t.exports=a(1)},function(t,e){new Vue({el:"#app",data:function(){return{rows:[],errors:[],uploadedFiles:[],uploadError:null,currentStatus:null,uploadFieldName:"photos",fileCount:0,step:1,dataset:{type:"",state:"",rights:0,project_id:"",creating_corporation:"GBA",embargo_date:"",belongs_to_bibliography:0,title_main:{value:"",language:""},abstract_main:{value:"",language:""},checkedPersons:[],checkedLicenses:[],files:[]}}},mounted:function(){this.step=1,this.reset()},computed:{isInitial:function(){return 0===this.currentStatus},isSaving:function(){return 1===this.currentStatus},isSuccess:function(){return 2===this.currentStatus},isFailed:function(){return 3===this.currentStatus}},methods:{reset:function(){this.currentStatus=0,this.uploadedFiles=[],this.uploadError=null},resetDropbox:function(){this.currentStatus=0,this.dataset.files=[]},save:function(){var t=this;this.errors=[];for(var e=new FormData,a=0;athis.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.4",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){b&&3===b.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=c(d),f={relatedTarget:this};e.hasClass("open")&&(e.trigger(b=a.Event("hide.bs.dropdown",f)),b.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger("hidden.bs.dropdown",f)))}))}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.4",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(this.options.viewport.selector||this.options.viewport),this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c&&c.$tip&&c.$tip.is(":visible")?void(c.hoverState="in"):(c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.options.container?a(this.options.container):this.$element.parent(),p=this.getPosition(o);h="bottom"==h&&k.bottom+m>p.bottom?"top":"top"==h&&k.top-mp.width?"left":"left"==h&&k.left-lg.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;jg.width&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type)})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.4",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.4",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b=e[a]&&(void 0===e[a+1]||b .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.4",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=a(document.body).height();"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery); \ No newline at end of file diff --git a/public/js/dataTable.js b/public/js/dataTable.js new file mode 100644 index 0000000..6c83963 --- /dev/null +++ b/public/js/dataTable.js @@ -0,0 +1,5 @@ +!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],function(e){return t(e,window,document)}):"object"==typeof exports?module.exports=function(e,n){return e||(e=window),n||(n="undefined"!=typeof window?require("jquery"):require("jquery")(e)),t(n,e,e.document)}:t(jQuery,window,document)}(function(t,e,n,a){"use strict";function r(e){var n,a,o="a aa ai ao as b fn i m o s ",l={};t.each(e,function(t,i){(n=t.match(/^([^A-Z]+?)([A-Z])/))&&-1!==o.indexOf(n[1]+" ")&&(a=t.replace(n[0],n[2].toLowerCase()),l[a]=t,"o"===n[1]&&r(e[t]))}),e._hungarianMap=l}function o(e,n,l){e._hungarianMap||r(e);var i;t.each(n,function(r,s){(i=e._hungarianMap[r])===a||!l&&n[i]!==a||("o"===i.charAt(0)?(n[i]||(n[i]={}),t.extend(!0,n[i],n[r]),o(e[i],n[i],l)):n[i]=n[r])})}function l(t){var e=Jt.defaults.oLanguage,n=e.sDecimal;if(n&&zt(n),t){var a=t.sZeroRecords;!t.sEmptyTable&&a&&"No data available in table"===e.sEmptyTable&&Lt(t,t,"sZeroRecords","sEmptyTable"),!t.sLoadingRecords&&a&&"Loading..."===e.sLoadingRecords&&Lt(t,t,"sZeroRecords","sLoadingRecords"),t.sInfoThousands&&(t.sThousands=t.sInfoThousands);var r=t.sDecimal;r&&n!==r&&zt(r)}}function i(t){he(t,"ordering","bSort"),he(t,"orderMulti","bSortMulti"),he(t,"orderClasses","bSortClasses"),he(t,"orderCellsTop","bSortCellsTop"),he(t,"order","aaSorting"),he(t,"orderFixed","aaSortingFixed"),he(t,"paging","bPaginate"),he(t,"pagingType","sPaginationType"),he(t,"pageLength","iDisplayLength"),he(t,"searching","bFilter"),"boolean"==typeof t.sScrollX&&(t.sScrollX=t.sScrollX?"100%":""),"boolean"==typeof t.scrollX&&(t.scrollX=t.scrollX?"100%":"");var e=t.aoSearchCols;if(e)for(var n=0,a=e.length;n").css({position:"fixed",top:0,left:-1*t(e).scrollLeft(),height:1,width:1,overflow:"hidden"}).append(t("
").css({position:"absolute",top:1,left:1,width:100,overflow:"scroll"}).append(t("
").css({width:"100%",height:10}))).appendTo("body"),o=r.children(),l=o.children();a.barWidth=o[0].offsetWidth-o[0].clientWidth,a.bScrollOversize=100===l[0].offsetWidth&&100!==o[0].clientWidth,a.bScrollbarLeft=1!==Math.round(l.offset().left),a.bBounding=!!r[0].getBoundingClientRect().width,r.remove()}t.extend(n.oBrowser,Jt.__browser),n.oScroll.iBarWidth=Jt.__browser.barWidth}function u(t,e,n,r,o,l){var i,s=r,d=!1;for(n!==a&&(i=n,d=!0);s!==o;)t.hasOwnProperty(s)&&(i=d?e(i,t[s],s,t):t[s],d=!0,s+=l);return i}function c(e,a){var r=Jt.defaults.column,o=e.aoColumns.length,l=t.extend({},Jt.models.oColumn,r,{nTh:a||n.createElement("th"),sTitle:r.sTitle?r.sTitle:a?a.innerHTML:"",aDataSort:r.aDataSort?r.aDataSort:[o],mData:r.mData?r.mData:o,idx:o});e.aoColumns.push(l);var i=e.aoPreSearchCols;i[o]=t.extend({},Jt.models.oSearch,i[o]),f(e,o,t(a).data())}function f(e,n,r){var l=e.aoColumns[n],i=e.oClasses,d=t(l.nTh);if(!l.sWidthOrig){l.sWidthOrig=d.attr("width")||null;var u=(d.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);u&&(l.sWidthOrig=u[1])}r!==a&&null!==r&&(s(r),o(Jt.defaults.column,r),r.mDataProp===a||r.mData||(r.mData=r.mDataProp),r.sType&&(l._sManualType=r.sType),r.className&&!r.sClass&&(r.sClass=r.className),r.sClass&&d.addClass(r.sClass),t.extend(l,r),Lt(l,r,"sWidth","sWidthOrig"),r.iDataSort!==a&&(l.aDataSort=[r.iDataSort]),Lt(l,r,"aDataSort"));var c=l.mData,f=T(c),p=l.mRender?T(l.mRender):null,h=function(t){return"string"==typeof t&&-1!==t.indexOf("@")};l._bAttrSrc=t.isPlainObject(c)&&(h(c.sort)||h(c.type)||h(c.filter)),l._setter=null,l.fnGetData=function(t,e,n){var r=f(t,e,a,n);return p&&e?p(r,e,t,n):r},l.fnSetData=function(t,e,n){return _(c)(t,e,n)},"number"!=typeof c&&(e._rowReadObject=!0),e.oFeatures.bSort||(l.bSortable=!1,d.addClass(i.sSortableNone));var m=-1!==t.inArray("asc",l.asSorting),b=-1!==t.inArray("desc",l.asSorting);l.bSortable&&(m||b)?m&&!b?(l.sSortingClass=i.sSortableAsc,l.sSortingClassJUI=i.sSortJUIAscAllowed):!m&&b?(l.sSortingClass=i.sSortableDesc,l.sSortingClassJUI=i.sSortJUIDescAllowed):(l.sSortingClass=i.sSortable,l.sSortingClassJUI=i.sSortJUI):(l.sSortingClass=i.sSortableNone,l.sSortingClassJUI="")}function p(t){if(!1!==t.oFeatures.bAutoWidth){var e=t.aoColumns;yt(t);for(var n=0,a=e.length;n=0;l--){p=n[l];var m=p.targets!==a?p.targets:p.aTargets;for(t.isArray(m)||(m=[m]),s=0,d=m.length;s=0){for(;h.length<=m[s];)c(e);o(m[s],p)}else if("number"==typeof m[s]&&m[s]<0)o(h.length+m[s],p);else if("string"==typeof m[s])for(u=0,f=h.length;ue&&t[o]--;-1!=r&&n===a&&t.splice(r,1)}function N(t,e,n,r){var o,l,i=t.aoData[e],s=function(n,a){for(;n.childNodes.length;)n.removeChild(n.firstChild);n.innerHTML=w(t,e,a,"display")};if("dom"!==n&&(n&&"auto"!==n||"dom"!==i.src)){var d=i.anCells;if(d)if(r!==a)s(d[r],r);else for(o=0,l=d.length;o").appendTo(i)),n=0,a=c.length;ntr").attr("role","row"),t(i).find(">tr>th, >tr>td").addClass(u.sHeaderTH),t(s).find(">tr>th, >tr>td").addClass(u.sFooterTH),null!==s){var f=e.aoFooter[0];for(n=0,a=f.length;n=0;i--)e.aoColumns[i].bVisible||r||h[o].splice(i,1);m.push([])}for(o=0,l=h.length;o=e.fnRecordsDisplay()?0:d,e.iInitDisplayStart=-1);var f=e._iDisplayStart,p=e.fnDisplayEnd();if(e.bDeferLoading)e.bDeferLoading=!1,e.iDraw++,pt(e,!1);else if(u){if(!e.bDestroying&&!$(e))return}else e.iDraw++;if(0!==c.length)for(var h=u?0:f,m=u?e.aoData.length:p,y=h;y",{class:i?l[0]:""}).append(t("",{valign:"top",colSpan:b(e),class:e.oClasses.sRowEmpty}).html(F))[0]}Et(e,"aoHeaderCallback","header",[t(e.nTHead).children("tr")[0],A(e),f,p,c]),Et(e,"aoFooterCallback","footer",[t(e.nTFoot).children("tr")[0],A(e),f,p,c]);var S=t(e.nTBody);S.children().detach(),S.append(t(r)),Et(e,"aoDrawCallback","draw",[e]),e.bSorted=!1,e.bFiltered=!1,e.bDrawing=!1}function H(t,e){var n=t.oFeatures,a=n.bSort,r=n.bFilter;a&&St(t),r?G(t,t.oPreviousSearch):t.aiDisplay=t.aiDisplayMaster.slice(),!0!==e&&(t._iDisplayStart=0),t._drawHold=e,O(t),t._drawHold=!1}function M(e){var n=e.oClasses,a=t(e.nTable),r=t("
").insertBefore(a),o=e.oFeatures,l=t("
",{id:e.sTableId+"_wrapper",class:n.sWrapper+(e.nTFoot?"":" "+n.sNoFooter)});e.nHolding=r[0],e.nTableWrapper=l[0],e.nTableReinsertBefore=e.nTable.nextSibling;for(var i,s,d,u,c,f,p=e.sDom.split(""),h=0;h")[0],"'"==(u=p[h+1])||'"'==u){for(c="",f=2;p[h+f]!=u;)c+=p[h+f],f++;if("H"==c?c=n.sJUIHeader:"F"==c&&(c=n.sJUIFooter),-1!=c.indexOf(".")){var m=c.split(".");d.id=m[0].substr(1,m[0].length-1),d.className=m[1]}else"#"==c.charAt(0)?d.id=c.substr(1,c.length-1):d.className=c;h+=f}l.append(d),l=t(d)}else if(">"==s)l=l.parent();else if("l"==s&&o.bPaginate&&o.bLengthChange)i=dt(e);else if("f"==s&&o.bFilter)i=J(e);else if("r"==s&&o.bProcessing)i=ft(e);else if("t"==s)i=ht(e);else if("i"==s&&o.bInfo)i=at(e);else if("p"==s&&o.bPaginate)i=ut(e);else if(0!==Jt.ext.feature.length)for(var b=Jt.ext.feature,y=0,g=b.length;y',d=o.sSearch;d=d.match(/_INPUT_/)?d.replace("_INPUT_",s):d+s;var u=t("
",{id:i.f?null:r+"_filter",class:a.sFilter}).append(t("
").addClass(n.sLength);return e.aanFeatures.l||(c[0].id=a+"_length"),c.children().append(e.oLanguage.sLengthMenu.replace("_MENU_",s[0].outerHTML)),t("select",c).val(e._iDisplayLength).on("change.DT",function(n){st(e,t(this).val()),O(e)}),t(e.nTable).on("length.dt.DT",function(n,a,r){e===a&&t("select",c).val(r)}),c[0]}function ut(e){var n=e.sPaginationType,a=Jt.ext.pager[n],r="function"==typeof a,o=function(t){O(t)},l=t("
").addClass(e.oClasses.sPaging+n)[0],i=e.aanFeatures;return r||a.fnInit(e,l,o),i.p||(l.id=e.sTableId+"_paginate",e.aoDrawCallback.push({fn:function(t){if(r){var e,n,l=t._iDisplayStart,s=t._iDisplayLength,d=t.fnRecordsDisplay(),u=-1===s,c=u?0:Math.ceil(l/s),f=u?1:Math.ceil(d/s),p=a(c,f);for(e=0,n=i.p.length;eo&&(a=0):"first"==e?a=0:"previous"==e?(a=r>=0?a-r:0)<0&&(a=0):"next"==e?a+r",{id:e.aanFeatures.r?null:e.sTableId+"_processing",class:e.oClasses.sProcessing}).html(e.oLanguage.sProcessing).insertBefore(e.nTable)[0]}function pt(e,n){e.oFeatures.bProcessing&&t(e.aanFeatures.r).css("display",n?"block":"none"),Et(e,null,"processing",[e,n])}function ht(e){var n=t(e.nTable);n.attr("role","grid");var a=e.oScroll;if(""===a.sX&&""===a.sY)return e.nTable;var r=a.sX,o=a.sY,l=e.oClasses,i=n.children("caption"),s=i.length?i[0]._captionSide:null,d=t(n[0].cloneNode(!1)),u=t(n[0].cloneNode(!1)),c=n.children("tfoot"),f="
",p=function(t){return t?It(t):null};c.length||(c=null);var h=t(f,{class:l.sScrollWrapper}).append(t(f,{class:l.sScrollHead}).css({overflow:"hidden",position:"relative",border:0,width:r?p(r):"100%"}).append(t(f,{class:l.sScrollHeadInner}).css({"box-sizing":"content-box",width:a.sXInner||"100%"}).append(d.removeAttr("id").css("margin-left",0).append("top"===s?i:null).append(n.children("thead"))))).append(t(f,{class:l.sScrollBody}).css({position:"relative",overflow:"auto",width:p(r)}).append(n));c&&h.append(t(f,{class:l.sScrollFoot}).css({overflow:"hidden",border:0,width:r?p(r):"100%"}).append(t(f,{class:l.sScrollFootInner}).append(u.removeAttr("id").css("margin-left",0).append("bottom"===s?i:null).append(n.children("tfoot")))));var m=h.children(),b=m[0],y=m[1],g=c?m[2]:null;return r&&t(y).on("scroll.DT",function(t){var e=this.scrollLeft;b.scrollLeft=e,c&&(g.scrollLeft=e)}),t(y).css(o&&a.bCollapse?"max-height":"height",o),e.nScrollHead=b,e.nScrollBody=y,e.nScrollFoot=g,e.aoDrawCallback.push({fn:mt,sName:"scrolling"}),h[0]}function mt(e){var n,r,o,l,i,s,d,u,c,f=e.oScroll,m=f.sX,b=f.sXInner,y=f.sY,g=f.iBarWidth,v=t(e.nScrollHead),x=v[0].style,I=v.children("div"),F=I[0].style,S=I.children("table"),w=e.nScrollBody,D=t(w),C=w.style,T=t(e.nScrollFoot),_=T.children("div"),A=_.children("table"),B=t(e.nTHead),k=t(e.nTable),N=k[0],L=N.style,P=e.nTFoot?t(e.nTFoot):null,R=e.oBrowser,j=R.bScrollOversize,E=ie(e.aoColumns,"nTh"),O=[],H=[],M=[],W=[],U=function(t){var e=t.style;e.paddingTop="0",e.paddingBottom="0",e.borderTopWidth="0",e.borderBottomWidth="0",e.height=0},$=w.scrollHeight>w.clientHeight;if(e.scrollBarVis!==$&&e.scrollBarVis!==a)return e.scrollBarVis=$,void p(e);e.scrollBarVis=$,k.children("thead, tfoot").remove(),P&&(s=P.clone().prependTo(k),r=P.find("tr"),l=s.find("tr")),i=B.clone().prependTo(k),n=B.find("tr"),o=i.find("tr"),i.find("th, td").removeAttr("tabindex"),m||(C.width="100%",v[0].style.width="100%"),t.each(z(e,i),function(t,n){d=h(e,t),n.style.width=e.aoColumns[d].sWidth}),P&&bt(function(t){t.style.width=""},l),c=k.outerWidth(),""===m?(L.width="100%",j&&(k.find("tbody").height()>w.offsetHeight||"scroll"==D.css("overflow-y"))&&(L.width=It(k.outerWidth()-g)),c=k.outerWidth()):""!==b&&(L.width=It(b),c=k.outerWidth()),bt(U,o),bt(function(e){M.push(e.innerHTML),O.push(It(t(e).css("width")))},o),bt(function(e,n){-1!==t.inArray(e,E)&&(e.style.width=O[n])},n),t(o).height(0),P&&(bt(U,l),bt(function(e){W.push(e.innerHTML),H.push(It(t(e).css("width")))},l),bt(function(t,e){t.style.width=H[e]},r),t(l).height(0)),bt(function(t,e){t.innerHTML='
'+M[e]+"
",t.childNodes[0].style.height="0",t.childNodes[0].style.overflow="hidden",t.style.width=O[e]},o),P&&bt(function(t,e){t.innerHTML='
'+W[e]+"
",t.childNodes[0].style.height="0",t.childNodes[0].style.overflow="hidden",t.style.width=H[e]},l),k.outerWidth()w.offsetHeight||"scroll"==D.css("overflow-y")?c+g:c,j&&(w.scrollHeight>w.offsetHeight||"scroll"==D.css("overflow-y"))&&(L.width=It(u-g)),""!==m&&""===b||Nt(e,1,"Possible column misalignment",6)):u="100%",C.width=It(u),x.width=It(u),P&&(e.nScrollFoot.style.width=It(u)),y||j&&(C.height=It(N.offsetHeight+g));var X=k.outerWidth();S[0].style.width=It(X),F.width=It(X);var q=k.height()>w.clientHeight||"scroll"==D.css("overflow-y"),V="padding"+(R.bScrollbarLeft?"Left":"Right");F[V]=q?g+"px":"0px",P&&(A[0].style.width=It(X),_[0].style.width=It(X),_[0].style[V]=q?g+"px":"0px"),k.children("colgroup").insertBefore(k.children("thead")),D.scroll(),!e.bSorted&&!e.bFiltered||e._drawHold||(w.scrollTop=0)}function bt(t,e,n){for(var a,r,o=0,l=0,i=e.length;l").appendTo(C.find("tbody"));for(C.find("thead, tfoot").remove(),C.append(t(n.nTHead).clone()).append(t(n.nTFoot).clone()),C.find("tfoot th, tfoot td").css("width",""),g=z(n,C.find("thead")[0]),a=0;a").css({width:r.sWidthOrig,margin:0,padding:0,border:0,height:1}));if(n.aoData.length)for(a=0;a").css(u||d?{position:"absolute",top:0,left:0,height:1,right:0,overflow:"hidden"}:{}).append(C).appendTo(x);u&&c?C.width(c):u?(C.css("width","auto"),C.removeAttr("width"),C.width()").css("width",It(e)).appendTo(a||n.body),o=r[0].offsetWidth;return r.remove(),o}function vt(e,n){var a=xt(e,n);if(a<0)return null;var r=e.aoData[a];return r.nTr?r.anCells[n]:t("").html(w(e,a,n,"display"))[0]}function xt(t,e){for(var n,a=-1,r=-1,o=0,l=t.aoData.length;oa&&(a=n.length,r=o);return r}function It(t){return null===t?"0px":"number"==typeof t?t<0?"0px":t+"px":t.match(/\d$/)?t+"px":t}function Ft(e){var n,r,o,l,i,s,d,u=[],c=e.aoColumns,f=e.aaSortingFixed,p=t.isPlainObject(f),h=[],m=function(e){e.length&&!t.isArray(e[0])?h.push(e):t.merge(h,e)};for(t.isArray(f)&&m(f),p&&f.pre&&m(f.pre),m(e.aaSorting),p&&f.post&&m(f.post),n=0;na?1:0))return"asc"===d.dir?i:-i;return n=l[t],a=l[e],na?1:0}):u.sort(function(t,e){var n,a,r,d,u,c,f=o.length,p=s[t]._aSortData,h=s[e]._aSortData;for(r=0;ra?1:0})}t.bSorted=!0}function wt(t){for(var e,n,a=t.aoColumns,r=Ft(t),o=t.oLanguage.oAria,l=0,i=a.length;l/g,""),c=s.nTh;c.removeAttribute("aria-sort"),s.bSortable?(r.length>0&&r[0].col==l?(c.setAttribute("aria-sort","asc"==r[0].dir?"ascending":"descending"),n=d[r[0].index+1]||d[0]):n=d[0],e=u+("asc"===n?o.sSortAscending:o.sSortDescending)):e=u,c.setAttribute("aria-label",e)}}function Dt(e,n,r,o){var l,i=e.aoColumns[n],s=e.aaSorting,d=i.asSorting,u=function(e,n){var r=e._idx;return r===a&&(r=t.inArray(e[1],d)),r+10&&n.time<+new Date-1e3*d)return void r();if(n.columns&&i.length!==n.columns.length)return void r();if(e.oLoadedState=t.extend(!0,{},n),n.start!==a&&(e._iDisplayStart=n.start,e.iInitDisplayStart=n.start),n.length!==a&&(e._iDisplayLength=n.length),n.order!==a&&(e.aaSorting=[],t.each(n.order,function(t,n){e.aaSorting.push(n[0]>=i.length?[0,n[1]]:n)})),n.search!==a&&t.extend(e.oPreviousSearch,nt(n.search)),n.columns)for(o=0,l=n.columns.length;o=n&&(e=n-a),e-=e%a,(-1===a||e<0)&&(e=0),t._iDisplayStart=e}function Ht(e,n){var a=e.renderer,r=Jt.ext.renderer[n];return t.isPlainObject(a)&&a[n]?r[a[n]]||r._:"string"==typeof a?r[a]||r._:r._}function Mt(t){return t.oFeatures.bServerSide?"ssp":t.ajax||t.sAjaxSource?"ajax":"dom"}function Wt(t,e){var n=[],a=We.numbers_length,r=Math.floor(a/2);return e<=a?n=de(0,e):t<=r?(n=de(0,a-2),n.push("ellipsis"),n.push(e-1)):t>=e-1-r?(n=de(e-(a-2),e),n.splice(0,0,"ellipsis"),n.splice(0,0,0)):(n=de(t-r+2,t+r-1),n.push("ellipsis"),n.push(e-1),n.splice(0,0,"ellipsis"),n.splice(0,0,0)),n.DT_el="span",n}function zt(e){t.each({num:function(t){return ze(t,e)},"num-fmt":function(t){return ze(t,e,te)},"html-num":function(t){return ze(t,e,Zt)},"html-num-fmt":function(t){return ze(t,e,Zt,te)}},function(t,n){$t.type.order[t+e+"-pre"]=n,t.match(/^html\-/)&&($t.type.search[t+e]=$t.type.search.html)})}function Ut(t){return function(){var e=[kt(this[Jt.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return Jt.ext.internal[t].apply(this,e)}}var $t,Xt,qt,Vt,Jt=function(e){this.$=function(t,e){return this.api(!0).$(t,e)},this._=function(t,e){return this.api(!0).rows(t,e).data()},this.api=function(t){return new Xt(t?kt(this[$t.iApiIndex]):this)},this.fnAddData=function(e,n){var r=this.api(!0),o=t.isArray(e)&&(t.isArray(e[0])||t.isPlainObject(e[0]))?r.rows.add(e):r.row.add(e);return(n===a||n)&&r.draw(),o.flatten().toArray()},this.fnAdjustColumnSizing=function(t){var e=this.api(!0).columns.adjust(),n=e.settings()[0],r=n.oScroll;t===a||t?e.draw(!1):""===r.sX&&""===r.sY||mt(n)},this.fnClearTable=function(t){var e=this.api(!0).clear();(t===a||t)&&e.draw()},this.fnClose=function(t){this.api(!0).row(t).child.hide()},this.fnDeleteRow=function(t,e,n){var r=this.api(!0),o=r.rows(t),l=o.settings()[0],i=l.aoData[o[0][0]];return o.remove(),e&&e.call(this,l,i),(n===a||n)&&r.draw(),i},this.fnDestroy=function(t){this.api(!0).destroy(t)},this.fnDraw=function(t){this.api(!0).draw(t)},this.fnFilter=function(t,e,n,r,o,l){var i=this.api(!0);null===e||e===a?i.search(t,n,r,l):i.column(e).search(t,n,r,l),i.draw()},this.fnGetData=function(t,e){var n=this.api(!0);if(t!==a){var r=t.nodeName?t.nodeName.toLowerCase():"";return e!==a||"td"==r||"th"==r?n.cell(t,e).data():n.row(t).data()||null}return n.data().toArray()},this.fnGetNodes=function(t){var e=this.api(!0);return t!==a?e.row(t).node():e.rows().nodes().flatten().toArray()},this.fnGetPosition=function(t){var e=this.api(!0),n=t.nodeName.toUpperCase();if("TR"==n)return e.row(t).index();if("TD"==n||"TH"==n){var a=e.cell(t).index();return[a.row,a.columnVisible,a.column]}return null},this.fnIsOpen=function(t){return this.api(!0).row(t).child.isShown()},this.fnOpen=function(t,e,n){return this.api(!0).row(t).child(e,n).show().child()[0]},this.fnPageChange=function(t,e){var n=this.api(!0).page(t);(e===a||e)&&n.draw(!1)},this.fnSetColumnVis=function(t,e,n){var r=this.api(!0).column(t).visible(e);(n===a||n)&&r.columns.adjust().draw()},this.fnSettings=function(){return kt(this[$t.iApiIndex])},this.fnSort=function(t){this.api(!0).order(t).draw()},this.fnSortListener=function(t,e,n){this.api(!0).order.listener(t,e,n)},this.fnUpdate=function(t,e,n,r,o){var l=this.api(!0);return n===a||null===n?l.row(e).data(t):l.cell(e,n).data(t),(o===a||o)&&l.columns.adjust(),(r===a||r)&&l.draw(),0},this.fnVersionCheck=$t.fnVersionCheck;var n=this,r=e===a,u=this.length;r&&(e={}),this.oApi=this.internal=$t.internal;for(var p in Jt.ext.internal)p&&(this[p]=Ut(p));return this.each(function(){var p,h={},m=u>1?Pt(h,e,!0):e,b=0,y=this.getAttribute("id"),g=!1,F=Jt.defaults,S=t(this);if("table"!=this.nodeName.toLowerCase())return void Nt(null,0,"Non-table node initialisation ("+this.nodeName+")",2);i(F),s(F.column),o(F,F,!0),o(F.column,F.column,!0),o(F,t.extend(m,S.data()));var w=Jt.settings;for(b=0,p=w.length;b").appendTo(S)),A.nTHead=r[0];var o=S.children("tbody");0===o.length&&(o=t("").appendTo(S)),A.nTBody=o[0];var l=S.children("tfoot");if(0===l.length&&n.length>0&&(""!==A.oScroll.sX||""!==A.oScroll.sY)&&(l=t("").appendTo(S)),0===l.length||0===l.children().length?S.addClass(B.sNoFooter):l.length>0&&(A.nTFoot=l[0],W(A.aoFooter,A.nTFoot)),m.aaData)for(b=0;b/g,Yt=/^\d{2,4}[\.\/\-]\d{1,2}[\.\/\-]\d{1,2}([T ]{1}\d{1,2}[:\.]\d{2}([\.:]\d{2})?)?$/,Qt=new RegExp("(\\"+["/",".","*","+","?","|","(",")","[","]","{","}","\\","$","^","-"].join("|\\")+")","g"),te=/[',$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfkɃΞ]/gi,ee=function(t){return!t||!0===t||"-"===t},ne=function(t){var e=parseInt(t,10);return!isNaN(e)&&isFinite(t)?e:null},ae=function(t,e){return Gt[e]||(Gt[e]=new RegExp(ye(e),"g")),"string"==typeof t&&"."!==e?t.replace(/\./g,"").replace(Gt[e],"."):t},re=function(t,e,n){var a="string"==typeof t;return!!ee(t)||(e&&a&&(t=ae(t,e)),n&&a&&(t=t.replace(te,"")),!isNaN(parseFloat(t))&&isFinite(t))},oe=function(t){return ee(t)||"string"==typeof t},le=function(t,e,n){return!!ee(t)||(oe(t)?!!re(ce(t),e,n)||null:null)},ie=function(t,e,n){var r=[],o=0,l=t.length;if(n!==a)for(;o")[0],ve=ge.textContent!==a,xe=/<.*?>/g,Ie=Jt.util.throttle,Fe=[],Se=Array.prototype,we=function(e){var n,a,r=Jt.settings,o=t.map(r,function(t,e){return t.nTable});return e?e.nTable&&e.oApi?[e]:e.nodeName&&"table"===e.nodeName.toLowerCase()?(n=t.inArray(e,o),-1!==n?[r[n]]:null):e&&"function"==typeof e.settings?e.settings().toArray():("string"==typeof e?a=t(e):e instanceof t&&(a=e),a?a.map(function(e){return n=t.inArray(this,o),-1!==n?r[n]:null}).toArray():void 0):[]};Xt=function(e,n){if(!(this instanceof Xt))return new Xt(e,n);var a=[],r=function(t){var e=we(t);e&&(a=a.concat(e))};if(t.isArray(e))for(var o=0,l=e.length;ot?new Xt(e[t],this[t]):null},filter:function(t){var e=[];if(Se.filter)e=Se.filter.call(this,t,this);else for(var n=0,a=this.length;n0)return t[0].json}),qt("ajax.params()",function(){var t=this.context;if(t.length>0)return t[0].oAjaxData}),qt("ajax.reload()",function(t,e){return this.iterator("table",function(n){Ce(n,!1===e,t)})}),qt("ajax.url()",function(e){var n=this.context;return e===a?0===n.length?a:(n=n[0],n.ajax?t.isPlainObject(n.ajax)?n.ajax.url:n.ajax:n.sAjaxSource):this.iterator("table",function(n){t.isPlainObject(n.ajax)?n.ajax.url=e:n.ajax=e})}),qt("ajax.url().load()",function(t,e){return this.iterator("table",function(n){Ce(n,!1===e,t)})});var Te=function(e,n,r,o,l){var i,s,d,u,c,f,p=[],h=typeof n;for(n&&"string"!==h&&"function"!==h&&n.length!==a||(n=[n]),d=0,u=n.length;d0)return t[0]=t[e],t[0].length=1,t.length=1,t.context=[t.context[e]],t;return t.length=0,t},Be=function(e,n){var a,r,o,l=[],i=e.aiDisplay,s=e.aiDisplayMaster,d=n.search,u=n.order,c=n.page;if("ssp"==Mt(e))return"removed"===d?[]:de(0,s.length);if("current"==c)for(a=e._iDisplayStart,r=e.fnDisplayEnd();a=0&&"applied"==d)&&l.push(a);return l},ke=function(e,n,r){var o;return Te("row",n,function(n){var l=ne(n),i=e.aoData;if(null!==l&&!r)return[l];if(o||(o=Be(e,r)),null!==l&&-1!==t.inArray(l,o))return[l];if(null===n||n===a||""===n)return o;if("function"==typeof n)return t.map(o,function(t){var e=i[t];return n(t,e._aData,e.nTr)?t:null});if(n.nodeName){var s=n._DT_RowIndex,d=n._DT_CellIndex;if(s!==a)return i[s]&&i[s].nTr===n?[s]:[];if(d)return i[d.row]&&i[d.row].nTr===n?[d.row]:[];var u=t(n).closest("*[data-dt-row]");return u.length?[u.data("dt-row")]:[]}if("string"==typeof n&&"#"===n.charAt(0)){var c=e.aIds[n.replace(/^#/,"")];if(c!==a)return[c.idx]}var f=ue(se(e.aoData,o,"nTr"));return t(f).filter(n).map(function(){return this._DT_RowIndex}).toArray()},e,r)};qt("rows()",function(e,n){e===a?e="":t.isPlainObject(e)&&(n=e,e=""),n=_e(n);var r=this.iterator("table",function(t){return ke(t,e,n)},1);return r.selector.rows=e,r.selector.opts=n,r}),qt("rows().nodes()",function(){return this.iterator("row",function(t,e){return t.aoData[e].nTr||a},1)}),qt("rows().data()",function(){return this.iterator(!0,"rows",function(t,e){return se(t.aoData,e,"_aData")},1)}),Vt("rows().cache()","row().cache()",function(t){return this.iterator("row",function(e,n){var a=e.aoData[n];return"search"===t?a._aFilterData:a._aSortData},1)}),Vt("rows().invalidate()","row().invalidate()",function(t){return this.iterator("row",function(e,n){N(e,n,t)})}),Vt("rows().indexes()","row().index()",function(){return this.iterator("row",function(t,e){return e},1)}),Vt("rows().ids()","row().id()",function(t){for(var e=[],n=this.context,a=0,r=n.length;a0&&e._iRecordsDisplay--,Ot(e);var p=e.rowIdFn(f._aData);p!==a&&delete e.aIds[p]}),this.iterator("table",function(t){for(var e=0,n=t.aoData.length;e").addClass(a);t("td",s).addClass(a).html(n)[0].colSpan=b(e),o.push(s[0])}};l(a,r),n._details&&n._details.detach(),n._details=t(o),n._detailsShow&&n._details.insertAfter(n.nTr)},Le=function(t,e){var n=t.context;if(n.length){var r=n[0].aoData[e!==a?e:t[0]];r&&r._details&&(r._details.remove(),r._detailsShow=a,r._details=a)}},Pe=function(t,e){var n=t.context;if(n.length&&t.length){var a=n[0].aoData[t[0]];a._details&&(a._detailsShow=e,e?a._details.insertAfter(a.nTr):a._details.detach(),Re(n[0]))}},Re=function(t){var e=new Xt(t),n=t.aoData;e.off("draw.dt.DT_details column-visibility.dt.DT_details destroy.dt.DT_details"),ie(n,"_details").length>0&&(e.on("draw.dt.DT_details",function(a,r){t===r&&e.rows({page:"current"}).eq(0).each(function(t){var e=n[t];e._detailsShow&&e._details.insertAfter(e.nTr)})}),e.on("column-visibility.dt.DT_details",function(e,a,r,o){if(t===a)for(var l,i=b(a),s=0,d=n.length;s=0?i:r.length+i];if("function"==typeof n){var s=Be(e,a);return t.map(r,function(t,a){return n(a,Ee(e,a,0,0,s),l[a])?a:null})}var d="string"==typeof n?n.match(je):"";if(d)switch(d[2]){case"visIdx":case"visible":var u=parseInt(d[1],10);if(u<0){var c=t.map(r,function(t,e){return t.bVisible?e:null});return[c[c.length+u]]}return[h(e,u)];case"name":return t.map(o,function(t,e){return t===d[1]?e:null});default:return[]}if(n.nodeName&&n._DT_CellIndex)return[n._DT_CellIndex.column];var f=t(l).filter(n).map(function(){return t.inArray(this,l)}).toArray();if(f.length||!n.nodeName)return f;var p=t(n).closest("*[data-dt-column]");return p.length?[p.data("dt-column")]:[]},e,a)},He=function(e,n,r){var o,l,i,s,d=e.aoColumns,u=d[n],c=e.aoData;if(r===a)return u.bVisible;if(u.bVisible!==r){if(r){var f=t.inArray(!0,ie(d,"bVisible"),n+1);for(l=0,i=c.length;ln;return!0},Jt.isDataTable=Jt.fnIsDataTable=function(e){var n=t(e).get(0),a=!1;return e instanceof Jt.Api||(t.each(Jt.settings,function(e,r){var o=r.nScrollHead?t("table",r.nScrollHead)[0]:null,l=r.nScrollFoot?t("table",r.nScrollFoot)[0]:null;r.nTable!==n&&o!==n&&l!==n||(a=!0)}),a)},Jt.tables=Jt.fnTables=function(e){var n=!1;t.isPlainObject(e)&&(n=e.api,e=e.visible);var a=t.map(Jt.settings,function(n){if(!e||e&&t(n.nTable).is(":visible"))return n.nTable});return n?new Xt(a):a},Jt.camelToHungarian=o,qt("$()",function(e,n){var a=this.rows(n).nodes(),r=t(a);return t([].concat(r.filter(e).toArray(),r.find(e).toArray()))}),t.each(["on","one","off"],function(e,n){qt(n+"()",function(){var e=Array.prototype.slice.call(arguments);e[0]=t.map(e[0].split(/\s/),function(t){return t.match(/\.dt\b/)?t:t+".dt"}).join(" ");var a=t(this.tables().nodes());return a[n].apply(a,e),this})}),qt("clear()",function(){return this.iterator("table",function(t){B(t)})}),qt("settings()",function(){return new Xt(this.context,this.context)}),qt("init()",function(){var t=this.context;return t.length?t[0].oInit:null}),qt("data()",function(){return this.iterator("table",function(t){return ie(t.aoData,"_aData")}).flatten()}),qt("destroy()",function(n){return n=n||!1,this.iterator("table",function(a){var r,o=a.nTableWrapper.parentNode,l=a.oClasses,i=a.nTable,s=a.nTBody,d=a.nTHead,u=a.nTFoot,c=t(i),f=t(s),p=t(a.nTableWrapper),h=t.map(a.aoData,function(t){return t.nTr});a.bDestroying=!0,Et(a,"aoDestroyCallback","destroy",[a]),n||new Xt(a).columns().visible(!0),p.off(".DT").find(":not(tbody *)").off(".DT"),t(e).off(".DT-"+a.sInstance),i!=d.parentNode&&(c.children("thead").detach(),c.append(d)),u&&i!=u.parentNode&&(c.children("tfoot").detach(),c.append(u)),a.aaSorting=[],a.aaSortingFixed=[],Tt(a),t(h).removeClass(a.asStripeClasses.join(" ")),t("th, td",d).removeClass(l.sSortable+" "+l.sSortableAsc+" "+l.sSortableDesc+" "+l.sSortableNone),f.children().detach(),f.append(h);var m=n?"remove":"detach";c[m](),p[m](),!n&&o&&(o.insertBefore(i,a.nTableReinsertBefore),c.css("width",a.sDestroyWidth).removeClass(l.sTable),(r=a.asDestroyStripes.length)&&f.children().each(function(e){t(this).addClass(a.asDestroyStripes[e%r])}));var b=t.inArray(a,Jt.settings);-1!==b&&Jt.settings.splice(b,1)})}),t.each(["column","row","cell"],function(t,e){qt(e+"s().every()",function(t){var n=this.selector.opts,r=this;return this.iterator(e,function(o,l,i,s,d){t.call(r[e](l,"cell"===e?i:n,"cell"===e?n:a),l,i,s,d)})})}),qt("i18n()",function(e,n,r){var o=this.context[0],l=T(e)(o.oLanguage);return l===a&&(l=n),r!==a&&t.isPlainObject(l)&&(l=l[r]!==a?l[r]:l._),l.replace("%d",r)}),Jt.version="1.10.19",Jt.settings=[],Jt.models={},Jt.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0},Jt.models.oRow={nTr:null,anCells:null,_aData:[],_aSortData:null,_aFilterData:null,_sFilterRow:null,_sRowStripe:"",src:null,idx:-1},Jt.models.oColumn={idx:null,aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bVisible:null,_sManualType:null,_bAttrSrc:!1,fnCreatedCell:null,fnGetData:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null},Jt.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:[],ajax:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollCollapse:!1,bServerSide:!1,bSort:!0,bSortMulti:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(t){return t.toString().replace(/\B(?=(\d{3})+(?!\d))/g,this.oLanguage.sThousands)},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:null,fnServerParams:null,fnStateLoadCallback:function(t){try{return JSON.parse((-1===t.iStateDuration?sessionStorage:localStorage).getItem("DataTables_"+t.sInstance+"_"+location.pathname))}catch(t){}},fnStateLoadParams:null,fnStateLoaded:null,fnStateSaveCallback:function(t,e){try{(-1===t.iStateDuration?sessionStorage:localStorage).setItem("DataTables_"+t.sInstance+"_"+location.pathname,JSON.stringify(e))}catch(t){}},fnStateSaveParams:null,iStateDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iTabIndex:0,oClasses:{},oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sDecimal:"",sThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"Processing...",sSearch:"Search:",sSearchPlaceholder:"",sUrl:"",sZeroRecords:"No matching records found"},oSearch:t.extend({},Jt.models.oSearch),sAjaxDataProp:"data",sAjaxSource:null,sDom:"lfrtip",searchDelay:null,sPaginationType:"simple_numbers",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET",renderer:null,rowId:"DT_RowId"},r(Jt.defaults),Jt.defaults.column={aDataSort:null,iDataSort:-1,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bVisible:!0,fnCreatedCell:null,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null},r(Jt.defaults.column),Jt.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortMulti:null,bSortClasses:null,bStateSave:null},oScroll:{bCollapse:null,iBarWidth:0,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1,bScrollbarLeft:!1,bBounding:!1,barWidth:0},ajax:null,aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aIds:{},aoColumns:[],aoHeader:[],aoFooter:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:[],asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,searchDelay:null,sPaginationType:"two_button",iStateDuration:0,aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,bAjaxDataGet:!0,jqXHR:null,json:a,oAjaxData:a,fnServerData:null,aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iRecordsTotal:0,_iRecordsDisplay:0,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return"ssp"==Mt(this)?1*this._iRecordsTotal:this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==Mt(this)?1*this._iRecordsDisplay:this.aiDisplay.length},fnDisplayEnd:function(){var t=this._iDisplayLength,e=this._iDisplayStart,n=e+t,a=this.aiDisplay.length,r=this.oFeatures,o=r.bPaginate;return r.bServerSide?!1===o||-1===t?e+a:Math.min(e+t,this._iRecordsDisplay):!o||n>a||-1===t?a:n},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null,aLastSort:[],oPlugins:{},rowIdFn:null,rowId:null},Jt.ext=$t={buttons:{},classes:{},builder:"-source-",errMode:"alert",feature:[],search:[],selector:{cell:[],column:[],row:[]},internal:{},legacy:{ajax:null},pager:{},renderer:{pageButton:{},header:{}},order:{},type:{detect:[],search:{},order:{}},_unique:0,fnVersionCheck:Jt.fnVersionCheck,iApiIndex:0,oJUIClasses:{},sVersion:Jt.version},t.extend($t,{afnFiltering:$t.search,aTypes:$t.type.detect,ofnSearch:$t.type.search,oSort:$t.type.order,afnSortData:$t.order,aoFeatures:$t.feature,oApi:$t.internal,oStdClasses:$t.classes,oPagination:$t.pager}),t.extend(Jt.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sFilterInput:"",sLengthSelect:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sHeaderTH:"",sFooterTH:"",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sJUIHeader:"",sJUIFooter:""});var We=Jt.ext.pager;t.extend(We,{simple:function(t,e){return["previous","next"]},full:function(t,e){return["first","previous","next","last"]},numbers:function(t,e){return[Wt(t,e)]},simple_numbers:function(t,e){return["previous",Wt(t,e),"next"]},full_numbers:function(t,e){return["first","previous",Wt(t,e),"next","last"]},first_last_numbers:function(t,e){return["first",Wt(t,e),"last"]},_numbers:Wt,numbers_length:7}),t.extend(!0,Jt.ext.renderer,{pageButton:{_:function(e,r,o,l,i,s){var d,u,c,f=e.oClasses,p=e.oLanguage.oPaginate,h=e.oLanguage.oAria.paginate||{},m=0,b=function(n,a){var r,l,c,y,g=function(t){ct(e,t.data.action,!0)};for(r=0,l=a.length;r").appendTo(n);b(v,y)}else{switch(d=null,u="",y){case"ellipsis":n.append('');break;case"first":d=p.sFirst,u=y+(i>0?"":" "+f.sPageButtonDisabled);break;case"previous":d=p.sPrevious,u=y+(i>0?"":" "+f.sPageButtonDisabled);break;case"next":d=p.sNext,u=y+(i",{class:f.sPageButton+" "+u,"aria-controls":e.sTableId,"aria-label":h[y],"data-dt-idx":m,tabindex:e.iTabIndex,id:0===o&&"string"==typeof y?e.sTableId+"_"+y:null}).html(d).appendTo(n),Rt(c,{action:y},g),m++)}};try{c=t(r).find(n.activeElement).data("dt-idx")}catch(t){}b(t(r).empty(),l),c!==a&&t(r).find("[data-dt-idx="+c+"]").focus()}}}),t.extend(Jt.ext.type.detect,[function(t,e){var n=e.oLanguage.sDecimal;return re(t,n)?"num"+n:null},function(t,e){if(t&&!(t instanceof Date)&&!Yt.test(t))return null;var n=Date.parse(t);return null!==n&&!isNaN(n)||ee(t)?"date":null},function(t,e){var n=e.oLanguage.sDecimal;return re(t,n,!0)?"num-fmt"+n:null},function(t,e){var n=e.oLanguage.sDecimal;return le(t,n)?"html-num"+n:null},function(t,e){var n=e.oLanguage.sDecimal;return le(t,n,!0)?"html-num-fmt"+n:null},function(t,e){return ee(t)||"string"==typeof t&&-1!==t.indexOf("<")?"html":null}]),t.extend(Jt.ext.type.search,{html:function(t){return ee(t)?t:"string"==typeof t?t.replace(Kt," ").replace(Zt,""):""},string:function(t){return ee(t)?t:"string"==typeof t?t.replace(Kt," "):t}});var ze=function(t,e,n,a){return 0===t||t&&"-"!==t?(e&&(t=ae(t,e)),t.replace&&(n&&(t=t.replace(n,"")),a&&(t=t.replace(a,""))),1*t):-1/0};t.extend($t.type.order,{"date-pre":function(t){var e=Date.parse(t);return isNaN(e)?-1/0:e},"html-pre":function(t){return ee(t)?"":t.replace?t.replace(/<.*?>/g,"").toLowerCase():t+""},"string-pre":function(t){return ee(t)?"":"string"==typeof t?t.toLowerCase():t.toString?t.toString():""},"string-asc":function(t,e){return te?1:0},"string-desc":function(t,e){return te?-1:0}}),zt(""),t.extend(!0,Jt.ext.renderer,{header:{_:function(e,n,a,r){t(e.nTable).on("order.dt.DT",function(t,o,l,i){if(e===o){var s=a.idx;n.removeClass(a.sSortingClass+" "+r.sSortAsc+" "+r.sSortDesc).addClass("asc"==i[s]?r.sSortAsc:"desc"==i[s]?r.sSortDesc:a.sSortingClass)}})},jqueryui:function(e,n,a,r){t("
").addClass(r.sSortJUIWrapper).append(n.contents()).append(t("").addClass(r.sSortIcon+" "+a.sSortingClassJUI)).appendTo(n),t(e.nTable).on("order.dt.DT",function(t,o,l,i){if(e===o){var s=a.idx;n.removeClass(r.sSortAsc+" "+r.sSortDesc).addClass("asc"==i[s]?r.sSortAsc:"desc"==i[s]?r.sSortDesc:a.sSortingClass),n.find("span."+r.sSortIcon).removeClass(r.sSortJUIAsc+" "+r.sSortJUIDesc+" "+r.sSortJUI+" "+r.sSortJUIAscAllowed+" "+r.sSortJUIDescAllowed).addClass("asc"==i[s]?r.sSortJUIAsc:"desc"==i[s]?r.sSortJUIDesc:a.sSortingClassJUI)}})}}});var Ue=function(t){return"string"==typeof t?t.replace(//g,">").replace(/"/g,"""):t};return Jt.render={number:function(t,e,n,a,r){return{display:function(o){if("number"!=typeof o&&"string"!=typeof o)return o;var l=o<0?"-":"",i=parseFloat(o);if(isNaN(i))return Ue(o);i=i.toFixed(n),o=Math.abs(i);var s=parseInt(o,10),d=n?e+(o-s).toFixed(n).substring(2):"";return l+(a||"")+s.toString().replace(/\B(?=(\d{3})+(?!\d))/g,t)+d+(r||"")}}},text:function(){return{display:Ue,filter:Ue}}},t.extend(Jt.ext.internal,{_fnExternApiFunc:Ut,_fnBuildAjax:U,_fnAjaxUpdate:$,_fnAjaxParameters:X,_fnAjaxUpdateDraw:q,_fnAjaxDataSrc:V,_fnAddColumn:c,_fnColumnOptions:f,_fnAdjustColumnSizing:p,_fnVisibleToColumnIndex:h,_fnColumnIndexToVisible:m,_fnVisbleColumns:b,_fnGetColumns:y,_fnColumnTypes:g,_fnApplyColumnDefs:v,_fnHungarianMap:r,_fnCamelToHungarian:o,_fnLanguageCompat:l,_fnBrowserDetect:d,_fnAddData:x,_fnAddTr:I,_fnNodeToDataIndex:F,_fnNodeToColumnIndex:S,_fnGetCellData:w,_fnSetCellData:D,_fnSplitObjNotation:C,_fnGetObjectDataFn:T,_fnSetObjectDataFn:_,_fnGetDataMaster:A,_fnClearTable:B,_fnDeleteIndex:k,_fnInvalidate:N,_fnGetRowElements:L,_fnCreateTr:P,_fnBuildHead:j,_fnDrawHead:E,_fnDraw:O,_fnReDraw:H,_fnAddOptionsHtml:M,_fnDetectHeader:W,_fnGetUniqueThs:z,_fnFeatureHtmlFilter:J,_fnFilterComplete:G,_fnFilterCustom:K,_fnFilterColumn:Z,_fnFilter:Y,_fnFilterCreateSearch:Q,_fnEscapeRegex:ye,_fnFilterData:tt,_fnFeatureHtmlInfo:at,_fnUpdateInfo:rt,_fnInfoMacros:ot,_fnInitialise:lt,_fnInitComplete:it,_fnLengthChange:st,_fnFeatureHtmlLength:dt,_fnFeatureHtmlPaginate:ut,_fnPageChange:ct,_fnFeatureHtmlProcessing:ft,_fnProcessingDisplay:pt,_fnFeatureHtmlTable:ht,_fnScrollDraw:mt,_fnApplyToChildren:bt,_fnCalculateColumnWidths:yt,_fnThrottle:Ie,_fnConvertToWidth:gt,_fnGetWidestNode:vt,_fnGetMaxLenString:xt,_fnStringToCss:It,_fnSortFlatten:Ft,_fnSort:St,_fnSortAria:wt,_fnSortListener:Dt,_fnSortAttachListener:Ct,_fnSortingClasses:Tt,_fnSortData:_t,_fnSaveState:At,_fnLoadState:Bt,_fnSettingsFromNode:kt,_fnLog:Nt,_fnMap:Lt,_fnBindAction:Rt,_fnCallbackReg:jt,_fnCallbackFire:Et,_fnLengthOverflow:Ot,_fnRenderer:Ht,_fnDataSource:Mt,_fnRowAttributes:R,_fnExtend:Pt,_fnCalculateEnd:function(){}}),t.fn.dataTable=Jt,Jt.$=t,t.fn.dataTableSettings=Jt.settings,t.fn.dataTableExt=Jt.ext,t.fn.DataTable=function(e){return t(this).dataTable(e).api()},t.each(Jt,function(e,n){t.fn.DataTable[e]=n}),t.fn.dataTable}),function(t){"function"==typeof define&&define.amd?define(["jquery","datatables.net"],function(e){return t(e,window,document)}):"object"==typeof exports?module.exports=function(e,n){return e||(e=window),n&&n.fn.dataTable||(n=require("datatables.net")(e,n).$),t(n,e,e.document)}:t(jQuery,window,document)}(function(t,e,n,a){"use strict";var r=t.fn.dataTable,o=0,l=0,i=r.ext.buttons,s=function(e,n){void 0===n&&(n={}),!0===n&&(n={}),t.isArray(n)&&(n={buttons:n}),this.c=t.extend(!0,{},s.defaults,n),n.buttons&&(this.c.buttons=n.buttons),this.s={dt:new r.Api(e),buttons:[],listenKeys:"",namespace:"dtb"+o++},this.dom={container:t("<"+this.c.dom.container.tag+"/>").addClass(this.c.dom.container.className)},this._constructor()};t.extend(s.prototype,{action:function(t,e){var n=this._nodeToButton(t);return e===a?n.conf.action:(n.conf.action=e,this)},active:function(e,n){var r=this._nodeToButton(e),o=this.c.dom.button.active,l=t(r.node);return n===a?l.hasClass(o):(l.toggleClass(o,n===a||n),this)},add:function(t,e){var n=this.s.buttons;if("string"==typeof e){for(var a=e.split("-"),r=this.s,o=0,l=a.length-1;o=0;o--)this.remove(n.buttons[o].node);n.conf.destroy&&n.conf.destroy.call(r.button(e),r,t(e),n.conf),this._removeKey(n.conf),t(n.node).remove();var l=t.inArray(n,a);return a.splice(l,1),this},text:function(e,n){var r=this._nodeToButton(e),o=this.c.dom.collection.buttonLiner,l=r.inCollection&&o&&o.tag?o.tag:this.c.dom.buttonLiner.tag,i=this.s.dt,s=t(r.node),d=function(t){return"function"==typeof t?t(i,s,r.conf):t};return n===a?d(r.conf.text):(r.conf.text=n,l?s.children(l).html(d(n)):s.html(d(n)),this)},_constructor:function(){var e=this,a=this.s.dt,r=a.settings()[0],o=this.c.buttons;r._buttons||(r._buttons=[]),r._buttons.push({inst:this,name:this.c.name});for(var l=0,i=o.length;l").addClass(p.className).attr("role","menu"),f.conf._collection=f.collection,this._expandButton(f.buttons,f.conf.buttons,!0,o)}c.init&&c.init.call(l.button(f.node),l,t(f.node),c),i++}}}},_buildButton:function(e,n){var a=this.c.dom.button,r=this.c.dom.buttonLiner,o=this.c.dom.collection,i=this.s.dt,s=function(t){return"function"==typeof t?t(i,c,e):t};if(n&&o.button&&(a=o.button),n&&o.buttonLiner&&(r=o.buttonLiner),e.available&&!e.available(i,e))return!1;var d=function(e,n,a,r){r.action.call(n.button(a),e,n,a,r),t(n.table().node()).triggerHandler("buttons-action.dt",[n.button(a),n,a,r])},u=e.tag||a.tag,c=t("<"+u+"/>").addClass(a.className).attr("tabindex",this.s.dt.settings()[0].iTabIndex).attr("aria-controls",this.s.dt.table().node().id).on("click.dtb",function(t){t.preventDefault(),!c.hasClass(a.disabled)&&e.action&&d(t,i,c,e),c.blur()}).on("keyup.dtb",function(t){13===t.keyCode&&!c.hasClass(a.disabled)&&e.action&&d(t,i,c,e)});if("a"===u.toLowerCase()&&c.attr("href","#"),"button"===u.toLowerCase()&&c.attr("type","button"),r.tag){var f=t("<"+r.tag+"/>").html(s(e.text)).addClass(r.className);"a"===r.tag.toLowerCase()&&f.attr("href","#"),c.append(f)}else c.html(s(e.text));!1===e.enabled&&c.addClass(a.disabled),e.className&&c.addClass(e.className),e.titleAttr&&c.attr("title",s(e.titleAttr)),e.attr&&c.attr(e.attr),e.namespace||(e.namespace=".dt-button-"+l++);var p,h=this.c.dom.buttonContainer;return p=h&&h.tag?t("<"+h.tag+"/>").addClass(h.className).append(c):c,this._addKey(e),{conf:e,node:c.get(0),inserter:p,buttons:[],inCollection:n,collection:null}},_nodeToButton:function(t,e){e||(e=this.s.buttons);for(var n=0,a=e.length;n30)throw"Buttons: Too many iterations"}return t.isArray(n)?n:t.extend({},n)};for(e=l(e);e&&e.extend;){if(!i[e.extend])throw"Cannot extend unknown button type: "+e.extend;var s=l(i[e.extend]);if(t.isArray(s))return s;if(!s)return!1;var d=s.className;e=t.extend({},s,e),d&&e.className!==d&&(e.className=d+" "+e.className);var u=e.postfixButtons;if(u){for(e.buttons||(e.buttons=[]),n=0,r=u.length;n").addClass(n).css("display","none").appendTo("body").fadeIn(r):t("body > div."+n).fadeOut(r,function(){t(this).removeClass(n).remove()})},s.instanceSelector=function(e,n){if(!e)return t.map(n,function(t){return t.inst});var a=[],r=t.map(n,function(t){return t.name}),o=function(e){if(t.isArray(e))for(var l=0,i=e.length;lx||l.dropup)&&l._collection.css("top",u.top-l._collection.outerHeight()-5);var I=u.left+l._collection.outerWidth(),F=c.offset().left+c.width();I>F&&l._collection.css("left",u.left-(I-F));var S=i.offset().left+l._collection.outerWidth();S>t(e).width()&&l._collection.css("left",u.left-(S-t(e).width()))}else{var w=l._collection.height()/2;w>t(e).height()/2&&(w=t(e).height()/2),l._collection.css("marginTop",-1*w)}l.background&&s.background(!0,l.backgroundClassName,l.fade);var D=function(){l._collection.fadeOut(l.fade,function(){l._collection.detach()}),t("div.dt-button-background").off("click.dtb-collection"),s.background(!1,l.backgroundClassName,l.fade),t("body").off(".dtb-collection"),r.off("buttons-action.b-internal")};setTimeout(function(){t("div.dt-button-background").on("click.dtb-collection",function(){}),t("body").on("click.dtb-collection",function(e){var n=t.fn.addBack?"addBack":"andSelf";t(e.target).parents()[n]().filter(l._collection).length||D()}).on("keyup.dtb-collection",function(t){27===t.keyCode&&D()}),l.autoClose&&r.on("buttons-action.b-internal",function(){D()})},10)},background:!0,collectionLayout:"",backgroundClassName:"dt-button-background",autoClose:!1,fade:400,attr:{"aria-haspopup":!0}},copy:function(t,e){return i.copyHtml5?"copyHtml5":i.copyFlash&&i.copyFlash.available(t,e)?"copyFlash":void 0},csv:function(t,e){return i.csvHtml5&&i.csvHtml5.available(t,e)?"csvHtml5":i.csvFlash&&i.csvFlash.available(t,e)?"csvFlash":void 0},excel:function(t,e){return i.excelHtml5&&i.excelHtml5.available(t,e)?"excelHtml5":i.excelFlash&&i.excelFlash.available(t,e)?"excelFlash":void 0},pdf:function(t,e){return i.pdfHtml5&&i.pdfHtml5.available(t,e)?"pdfHtml5":i.pdfFlash&&i.pdfFlash.available(t,e)?"pdfFlash":void 0},pageLength:function(e){var n=e.settings()[0].aLengthMenu,a=t.isArray(n[0])?n[0]:n,r=t.isArray(n[0])?n[1]:n,o=function(t){return t.i18n("buttons.pageLength",{"-1":"Show all rows",_:"Show %d rows"},t.page.len())};return{extend:"collection",text:o,className:"buttons-page-length",autoClose:!0,buttons:t.map(a,function(t,e){return{text:r[e],className:"button-page-length",action:function(e,n){n.page.len(t).draw()},init:function(e,n,a){var r=this,o=function(){r.active(e.page.len()===t)};e.on("length.dt"+a.namespace,o),o()},destroy:function(t,e,n){t.off("length.dt"+n.namespace)}}}),init:function(t,e,n){var a=this;t.on("length.dt"+n.namespace,function(){a.text(o(t))})},destroy:function(t,e,n){t.off("length.dt"+n.namespace)}}}}),r.Api.register("buttons()",function(t,e){e===a&&(e=t,t=a),this.selector.buttonGroup=t;var n=this.iterator(!0,"table",function(n){if(n._buttons)return s.buttonSelector(s.instanceSelector(t,n._buttons),e)},!0);return n._groupSelector=t,n}),r.Api.register("button()",function(t,e){var n=this.buttons(t,e) +;return n.length>1&&n.splice(1,n.length),n}),r.Api.registerPlural("buttons().active()","button().active()",function(t){return t===a?this.map(function(t){return t.inst.active(t.node)}):this.each(function(e){e.inst.active(e.node,t)})}),r.Api.registerPlural("buttons().action()","button().action()",function(t){return t===a?this.map(function(t){return t.inst.action(t.node)}):this.each(function(e){e.inst.action(e.node,t)})}),r.Api.register(["buttons().enable()","button().enable()"],function(t){return this.each(function(e){e.inst.enable(e.node,t)})}),r.Api.register(["buttons().disable()","button().disable()"],function(){return this.each(function(t){t.inst.disable(t.node)})}),r.Api.registerPlural("buttons().nodes()","button().node()",function(){var e=t();return t(this.each(function(t){e=e.add(t.inst.node(t.node))})),e}),r.Api.registerPlural("buttons().processing()","button().processing()",function(t){return t===a?this.map(function(t){return t.inst.processing(t.node)}):this.each(function(e){e.inst.processing(e.node,t)})}),r.Api.registerPlural("buttons().text()","button().text()",function(t){return t===a?this.map(function(t){return t.inst.text(t.node)}):this.each(function(e){e.inst.text(e.node,t)})}),r.Api.registerPlural("buttons().trigger()","button().trigger()",function(){return this.each(function(t){t.inst.node(t.node).trigger("click")})}),r.Api.registerPlural("buttons().containers()","buttons().container()",function(){var e=t(),n=this._groupSelector;return this.iterator(!0,"table",function(t){if(t._buttons)for(var a=s.instanceSelector(n,t._buttons),r=0,o=a.length;r"+e+"":"",t('
').html(e).append(t("
")["string"==typeof n?"html":"append"](n)).css("display","none").appendTo("body").fadeIn(),r!==a&&0!==r&&(d=setTimeout(function(){o.buttons.info(!1)},r)),this)}),r.Api.register("buttons.exportData()",function(t){if(this.context.length)return m(new r.Api(this.context[0]),t)}),r.Api.register("buttons.exportInfo()",function(t){return t||(t={}),{filename:u(t),title:f(t),messageTop:p(this,t.message||t.messageTop,"top"),messageBottom:p(this,t.messageBottom,"bottom")}});var u=function(e){var n="*"===e.filename&&"*"!==e.title&&e.title!==a&&null!==e.title&&""!==e.title?e.title:e.filename;if("function"==typeof n&&(n=n()),n===a||null===n)return null;-1!==n.indexOf("*")&&(n=t.trim(n.replace("*",t("head > title").text()))),n=n.replace(/[^a-zA-Z0-9_\u00A1-\uFFFF\.,\-_ !\(\)]/g,"");var r=c(e.extension);return r||(r=""),n+r},c=function(t){return null===t||t===a?null:"function"==typeof t?t():t},f=function(e){var n=c(e.title);return null===n?null:-1!==n.indexOf("*")?n.replace("*",t("head > title").text()||"Exported data"):n},p=function(e,n,a){var r=c(n);if(null===r)return null;var o=t("caption",e.table().container()).eq(0);if("*"===r){return o.css("caption-side")!==a?null:o.length?o.text():""}return r},h=t("",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h]*)\/>/gi,bb=/<([\w:]+)/,cb=/<|&#?\w+;/,db=/<(?:script|style|link)/i,eb=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/^$|\/(?:java|ecma)script/i,gb=/^true\/(.*)/,hb=/^\s*\s*$/g,ib={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};ib.optgroup=ib.option,ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead,ib.th=ib.td;function jb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function kb(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function lb(a){var b=gb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function mb(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function nb(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=ob(h),f=ob(a),d=0,e=f.length;e>d;d++)pb(f[d],g[d]);if(b)if(c)for(f=f||ob(a),g=g||ob(h),d=0,e=f.length;e>d;d++)nb(f[d],g[d]);else nb(a,h);return g=ob(h,"script"),g.length>0&&mb(g,!i&&ob(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(cb.test(e)){f=f||k.appendChild(b.createElement("div")),g=(bb.exec(e)||["",""])[1].toLowerCase(),h=ib[g]||ib._default,f.innerHTML=h[1]+e.replace(ab,"<$1>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=ob(k.appendChild(e),"script"),i&&mb(f),c)){j=0;while(e=f[j++])fb.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(ob(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&mb(ob(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(ob(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ob(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(ob(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&eb.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(ob(c,"script"),kb),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,ob(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,lb),j=0;g>j;j++)h=f[j],fb.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(hb,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qb,rb={};function sb(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function tb(a){var b=l,c=rb[a];return c||(c=sb(a,b),"none"!==c&&c||(qb=(qb||n("