diff --git a/composer.json b/composer.json index 2e2a7c1b..c8a4f63d 100644 --- a/composer.json +++ b/composer.json @@ -4,10 +4,9 @@ "type": "library", "require": { "php": "^8.0", - "laravel/framework": "8.x|9.x", + "laravel/framework": "^8.0|^9.0|^10.0", "intervention/image": "^2.5", - "psr/container": "^1.0|^2.0", - "illuminate/contracts": "8.x|^9.43" + "psr/container": "^1.0|^2.0" }, "require-dev": { "orchestra/testbench": "^7.17", diff --git a/src/ChildResource.php b/src/ChildResource.php index 8c4efae1..8a884420 100644 --- a/src/ChildResource.php +++ b/src/ChildResource.php @@ -2,7 +2,7 @@ namespace BadChoice\Thrust; -use BadChoice\Thrust\ResourceManager; +use BadChoice\Thrust\Facades\Thrust; abstract class ChildResource extends Resource { @@ -57,6 +57,16 @@ public function parent($object) public function getParentHasManyUrlParams($object) { $parent = $this->parent($object); - return $this::$parentChildsRelation && $parent ? [app(ResourceManager::class)->resourceNameFromModel($parent), $parent->id, static::$parentChildsRelation] : null; + return $this::$parentChildsRelation && $parent ? [Thrust::resourceNameFromModel($parent), $parent->id, static::$parentChildsRelation] : null; + } + + public function breadcrumbs(mixed $object): ?string + { + $parent = $this->parent($object); + if(! $parent) { + return null; + } + $parentResource = Thrust::make(Thrust::resourceNameFromModel($parent)); + return implode(' / ', array_filter([$parentResource->breadcrumbs($parent), $parent->{$parentResource->nameField}])); } } diff --git a/src/Console/Commands/Optimize.php b/src/Console/Commands/Optimize.php deleted file mode 100644 index b67cf7e9..00000000 --- a/src/Console/Commands/Optimize.php +++ /dev/null @@ -1,21 +0,0 @@ -call(OptimizeCommand::class); - $this->call(Cache::class); - - return static::SUCCESS; - } -} diff --git a/src/Console/Commands/OptimizeClear.php b/src/Console/Commands/OptimizeClear.php deleted file mode 100644 index 98c8afa6..00000000 --- a/src/Console/Commands/OptimizeClear.php +++ /dev/null @@ -1,21 +0,0 @@ -call(OptimizeClearCommand::class); - $this->call(Clear::class); - - return static::SUCCESS; - } -} diff --git a/src/Controllers/ThrustActionsController.php b/src/Controllers/ThrustActionsController.php index 230f2a87..3b042238 100644 --- a/src/Controllers/ThrustActionsController.php +++ b/src/Controllers/ThrustActionsController.php @@ -25,7 +25,7 @@ public function toggle($resourceName, $id, $field) public function create($resourceName) { - $action = $this->findActionForResource($resourceName, request('action')); + $action = $this->findActionForResource($resourceName, request('action')); if (! $action) { abort(404); @@ -33,6 +33,9 @@ public function create($resourceName) $action->setSelectedTargets(collect(explode(',', request('ids')))); + if(request('search')) { + $resourceName = Thrust::make($resourceName)::$searchResource ?? $resourceName; + } return view('thrust::actions.create', [ 'action' => $action, 'resourceName' => $resourceName, @@ -60,13 +63,27 @@ public function perform($resourceName) return back()->withMessage($response); } + public function index($resourceName) + { + $resource = Thrust::make($resourceName); + + return view('thrust::components.actionsIndex', [ + 'actions' => collect($resource->searchActions(request('search'))), + 'resourceName' => $resource->name(), + ]); + } + private function findActionForResource($resourceName, $actionClass) { $resource = Thrust::make($resourceName); - $action = collect($resource->actions())->first(function ($action) use ($actionClass) { + $action = collect($resource->searchActions(request('search')))->first(function ($action) use ($actionClass) { return $action instanceof $actionClass; }); - $action->resource = $resource; + + $action->resource = request('search') && $resource::$searchResource + ? Thrust::make($resource::$searchResource) + : $resource; + return $action; } } diff --git a/src/Controllers/ThrustBelongsToManyController.php b/src/Controllers/ThrustBelongsToManyController.php index 5a23e774..f3785f7f 100644 --- a/src/Controllers/ThrustBelongsToManyController.php +++ b/src/Controllers/ThrustBelongsToManyController.php @@ -4,6 +4,7 @@ use BadChoice\Thrust\Facades\Thrust; use BadChoice\Thrust\Fields\BelongsToMany; +use BadChoice\Thrust\ResourceGate; use Illuminate\Database\Eloquent\Relations\BelongsToMany as BelongsToManyBuilder; use Illuminate\Database\Eloquent\Model; use Illuminate\Routing\Controller; @@ -17,7 +18,10 @@ public function index($resourceName, $id, $relationship) $object = $resource->find($id); $belongsToManyField = $resource->fieldFor($relationship); $explodedPivotClass = explode('\\', $object->$relationship()->getPivotClass()); + app(ResourceGate::class)->check($resource, 'index'); + return view('thrust::belongsToManyIndex', [ + 'resource' => $resource, 'resourceName' => $resourceName, 'pivotResourceName' => end($explodedPivotClass), 'object' => $object, diff --git a/src/Controllers/ThrustController.php b/src/Controllers/ThrustController.php index 709b9d5c..1ac6e681 100644 --- a/src/Controllers/ThrustController.php +++ b/src/Controllers/ThrustController.php @@ -26,6 +26,7 @@ public function index($resourceName) return view('thrust::index', [ 'resourceName' => $resourceName, 'resource' => $resource, + 'actions' => collect($resource->actions()), 'searchable' => count($resource::$search) > 0, 'description' => $resource->getDescription(), ]); @@ -64,7 +65,8 @@ public function editInline($resourceName, $id) public function store($resourceName) { $resource = Thrust::make($resourceName); - request()->validate($resource->getValidationRules(null)); + $resource->validate(request(), null); + try { $result = $resource->create(request()->all()); } catch (\Exception $e) { @@ -72,7 +74,8 @@ public function store($resourceName) return back()->withErrors(['message' => $e->getMessage()]); } if (request()->ajax()) { return response()->json($result);} - return back()->withMessage(__('thrust::messages.created')); + + return $this->backWithMessage('created'); } public function storeMultiple($resourceName) @@ -95,14 +98,15 @@ public function storeMultiple($resourceName) } DB::commit(); - return back()->withMessage(__('thrust::messages.created')); + + return $this->backWithMessage('created'); } public function update($resourceName, $id) { $resource = Thrust::make($resourceName); if (! request()->has('inline')) { - request()->validate($resource->getValidationRules($id)); + $resource->validate(request(), $id); } try { @@ -110,7 +114,8 @@ public function update($resourceName, $id) } catch (\Exception $e) { return back()->withErrors(['message' => $e->getMessage()]); } - return back()->withMessage(__('thrust::messages.updated')); + + return $this->backWithMessage('updated'); } public function delete($resourceName, $id) @@ -120,7 +125,8 @@ public function delete($resourceName, $id) } catch (\Exception $e) { return back()->withErrors(['delete' => $e->getMessage()]); } - return back()->withMessage(__('thrust::messages.deleted')); + + return $this->backWithMessage('deleted'); } private function singleResourceIndex($resourceName, $resource) @@ -131,4 +137,12 @@ private function singleResourceIndex($resourceName, $resource) 'object' => $resource->first() ]); } + + private function backWithMessage(string $message) + { + if (session()->has('thrust-redirect')) { + return redirect(session('thrust-redirect')); + } + return back()->withMessage(__("thrust::messages.{$message}")); + } } diff --git a/src/Controllers/ThrustHasManyController.php b/src/Controllers/ThrustHasManyController.php index a18bfd40..5066b502 100644 --- a/src/Controllers/ThrustHasManyController.php +++ b/src/Controllers/ThrustHasManyController.php @@ -2,6 +2,7 @@ namespace BadChoice\Thrust\Controllers; +use BadChoice\Thrust\ResourceGate; use Illuminate\Routing\Controller; use BadChoice\Thrust\Facades\Thrust; use BadChoice\Thrust\ChildResource; @@ -14,6 +15,7 @@ public function index($resourceName, $id, $relationship) $object = $resource->find($id); $hasManyField = $resource->fieldFor($relationship); $childResource = Thrust::make($hasManyField->resourceName)->parentId($id); + app(ResourceGate::class)->check($resource, 'index'); $backHasManyURLParams = $resource instanceof ChildResource ? $resource->getParentHasManyUrlParams($object) : null; @@ -21,6 +23,7 @@ public function index($resourceName, $id, $relationship) 'resourceName' => $hasManyField->resourceName, 'searchable' => count($resource::$search) > 0, 'resource' => $childResource, + 'actions' => collect($childResource->actions()), 'parent_id' => $id, 'isChild' => $resource instanceof ChildResource && $backHasManyURLParams, 'hasManyBackUrlParams' => $backHasManyURLParams, diff --git a/src/Controllers/ThrustImportController.php b/src/Controllers/ThrustImportController.php index a6a234a9..85196596 100644 --- a/src/Controllers/ThrustImportController.php +++ b/src/Controllers/ThrustImportController.php @@ -7,6 +7,7 @@ use BadChoice\Thrust\Importer\Importer; use BadChoice\Thrust\ResourceGate; use Illuminate\Routing\Controller; +use Illuminate\Support\Facades\DB; class ThrustImportController extends Controller { @@ -47,6 +48,7 @@ public function store($resourceName) app(ResourceGate::class)->check($resource, 'create'); $importer = new Importer(request('csv'), $resource); try { + DB::connection()->disableQueryLog(); $imported = $importer->import(request('mapping')); }catch(\Exception $e){ // dd($e->validator->errors()->getMessages()); diff --git a/src/Fields/Decimal.php b/src/Fields/Decimal.php index a439f12b..92c69a93 100644 --- a/src/Fields/Decimal.php +++ b/src/Fields/Decimal.php @@ -5,11 +5,15 @@ class Decimal extends Text { protected $asInteger = false; + protected $nullable = false; public $rowClass = 'text-right'; public function getValue($object) { $value = parent::getValue($object); + if ($value === null & $this->nullable) { + return null; + } if ($value && $this->asInteger) { return number_format(floatval($value) / 100.0, 2); } @@ -30,6 +34,12 @@ public function asInteger($asInteger = true) return $this; } + public function nullable($nullable = true) + { + $this->nullable = $nullable; + return $this; + } + protected function getFieldType() { return 'number'; diff --git a/src/Fields/Field.php b/src/Fields/Field.php index 85f6bf5e..c46f965f 100644 --- a/src/Fields/Field.php +++ b/src/Fields/Field.php @@ -18,6 +18,7 @@ abstract class Field public $showInIndex = true; public $showInEdit = true; + public $showInSearch = false; public $policyAction = null; public $withDesc = false; @@ -161,6 +162,12 @@ public function hideInEdit($hideInEdit = true) return $this; } + public function showInSearch(bool $show = true): self + { + $this->showInSearch = $show; + return $this; + } + public function onlyInEdit() { $this->showInIndex = false; diff --git a/src/Fields/Image.php b/src/Fields/Image.php index ccff57a9..4363e3b3 100644 --- a/src/Fields/Image.php +++ b/src/Fields/Image.php @@ -18,6 +18,7 @@ class Image extends File implements Prunable protected $maxHeight = 400; protected $maxWidth = 400; protected $square = false; + protected $forceFilename = null; protected $maxFileSize = 1024; // 1 MB @@ -28,6 +29,12 @@ public function gravatar($field = 'email', $default = null) return $this; } + public function withForcedFilename($filename) : self + { + $this->forceFilename = $filename; + return $this; + } + public function maxSize($width, $height) { $this->maxWidth = $width; @@ -92,7 +99,7 @@ public function store($object, $file) $image->crop($size, $size); } - $filename = Str::random(10) . '.png'; + $filename = $this->forceFilename ?? Str::random(10) . '.png'; $this->getStorage()->put($this->getPath() . $filename, (string)$image->encode('png'), $this->storageVisibility); $this->getStorage()->put($this->getPath() . "{$this->resizedPrefix}{$filename}", (string)$image->resize(100, 100, function ($constraint) { $constraint->aspectRatio(); diff --git a/src/Fields/Text.php b/src/Fields/Text.php index bfda114b..9cd78da4 100644 --- a/src/Fields/Text.php +++ b/src/Fields/Text.php @@ -69,7 +69,12 @@ public function getValue($object) if (! $object) { return null; } - return htmlspecialchars(parent::getValue($object)); + + $value = parent::getValue($object); + + return $value === null + ? null + : htmlspecialchars($value); } public function allowScripts() diff --git a/src/Html/Edit.php b/src/Html/Edit.php index 3ad56d0b..8e09492e 100644 --- a/src/Html/Edit.php +++ b/src/Html/Edit.php @@ -30,7 +30,7 @@ public function getEditFields($multiple = false) return $field->excludeOnMultiple; }); } - if ($this->resource::$sortable) { + if ($this->resource->canSort()) { $fields->prepend(Hidden::make($this->resource::$sortField)); } if ($this->resource instanceof ChildResource) { @@ -56,6 +56,7 @@ public function show($id, $fullPage = false, $multiple = false) return view('thrust::edit', [ 'title' => $this->resource->getTitle(), 'nameField' => $this->resource->nameField, + 'breadcrumbs' => $this->resource->breadcrumbs($object), 'resourceName' => $this->resourceName ? : $this->resource->name(), 'fields' => $this->getEditFields($multiple), 'object' => $object, @@ -74,7 +75,7 @@ public function showInline($id) 'nameField' => $this->resource->nameField, 'resourceName' => $this->resource->name(), 'fields' => $this->getEditInlineFields(), - 'sortable' => $this->resource::$sortable, + 'sortable' => $this->resource->canSort(), 'object' => $object, ])->render(); } @@ -87,7 +88,7 @@ public function showBelongsToManyInline($id, $belongsToManyField) 'nameField' => $this->resource->nameField, 'resourceName' => $this->resource->name(), 'fields' => $this->getEditInlineFields(), - 'sortable' => $this->resource::$sortable, + 'sortable' => $this->resource->canSort(), 'object' => $object, 'belongsToManyField' => $belongsToManyField, 'relatedName' => $object->{$relation}?->{$belongsToManyField->relationDisplayField}, diff --git a/src/Html/Index.php b/src/Html/Index.php index 3043eb3a..8554fcd9 100644 --- a/src/Html/Index.php +++ b/src/Html/Index.php @@ -16,7 +16,7 @@ public function __construct(Resource $resource) public function getIndexFields() { return $this->resource->fieldsFlattened()->filter(function($field){ - return $field->showInIndex;// && $this->resource->can($field->policyAction); + return $field->showInIndex || request('search') && $field->showInSearch; }); } diff --git a/src/Resource.php b/src/Resource.php index 42d14785..62c1d6a1 100644 --- a/src/Resource.php +++ b/src/Resource.php @@ -8,6 +8,7 @@ use BadChoice\Thrust\Contracts\FormatsNewObject; use BadChoice\Thrust\Contracts\Prunable; use BadChoice\Thrust\Exceptions\CanNotDeleteException; +use BadChoice\Thrust\Facades\Thrust; use BadChoice\Thrust\Fields\Edit; use BadChoice\Thrust\Fields\FieldContainer; use BadChoice\Thrust\Fields\Relationship; @@ -15,8 +16,11 @@ use BadChoice\Thrust\ResourceFilters\Filters; use BadChoice\Thrust\ResourceFilters\Search; use BadChoice\Thrust\ResourceFilters\Sort; +use Illuminate\Contracts\Validation\Validator; use Illuminate\Database\Eloquent\Model; +use Illuminate\Http\Request; use Illuminate\Support\Str; +use Illuminate\Validation\ValidationException; abstract class Resource { @@ -213,6 +217,11 @@ public function canDelete($object) return $this->can('delete', $object); } + public function canSort(): bool + { + return static::$sortable && $this->can('update'); + } + public function can($ability, $object = null) { if (! $ability) { @@ -269,9 +278,16 @@ public function mainActions() public function actions() { - return [ - new Delete(), - ]; + return $this->canDelete(static::$model) + ? [new Delete()] + : []; + } + + public function searchActions(?bool $whileSearch = false) + { + return $whileSearch && static::$searchResource + ? Thrust::make(static::$searchResource)->actions() + : $this->actions(); } public function filters() @@ -402,7 +418,7 @@ protected function getPagination() public function sortableIsActive() { - return static::$sortable && ! request('sort'); + return $this->canSort() && ! request('sort'); } public function getUpdateConfirmationMessage() @@ -419,4 +435,23 @@ public function overlooked(): array { return $this->overlook; } + + public function breadcrumbs(mixed $object): ?string + { + return null; + } + + /** + * @throws ValidationException + */ + final public function validate(Request $request, ?int $id = null): void + { + $validator = \Illuminate\Support\Facades\Validator::make($request->all(), $this->getValidationRules($id)); + $this->withValidator($request, $validator); + $validator->validate(); + } + + protected function withValidator(Request $request, Validator $validator) + { + } } diff --git a/src/ResourceGate.php b/src/ResourceGate.php index e9212f4e..74a1b830 100644 --- a/src/ResourceGate.php +++ b/src/ResourceGate.php @@ -24,7 +24,7 @@ public function can($resource, $ability, $object = null) try{ $resource = Thrust::make($resource); if ($resource::$gate) { - $valid = auth()->user()->can($resource::$gate); + $valid = $this->getUser()->can($resource::$gate); } $policy = $this->policyFor($resource); if ($policy) { @@ -37,13 +37,18 @@ public function can($resource, $ability, $object = null) public function checkPolicyValidation($resource, $ability, $object, $policy): bool { $policyInstance = new $policy; - if (method_exists($policyInstance, 'before') && $policyInstance->before(auth()->user(), $ability, $object) !== null) { - return $policyInstance->before(auth()->user(), $ability, $object); + if (method_exists($policyInstance, 'before') && $policyInstance->before($this->getUser(), $ability, $object) !== null) { + return $policyInstance->before($this->getUser(), $ability, $object); } - return $policyInstance->$ability(auth()->user(), $object ?? $resource::$model); + return $policyInstance->$ability($this->getUser(), $object ?? $resource::$model); } public function policyFor($resource){ return $resource::$policy ?? Gate::getPolicyFor($resource::$model); } + + protected function getUser(): mixed + { + return auth()->user(); + } } diff --git a/src/ThrustObserver.php b/src/ThrustObserver.php index 4f9ca49a..fa623498 100644 --- a/src/ThrustObserver.php +++ b/src/ThrustObserver.php @@ -137,7 +137,7 @@ protected function trackDatabaseAction( ]; try { - return DatabaseAction::create($attributes); + return DatabaseAction::on($model->getConnectionName())->create($attributes); } catch (QueryException $e) { // The table is probably not found because the user have not yet // logged in, so we don't bother to log anything. diff --git a/src/ThrustServiceProvider.php b/src/ThrustServiceProvider.php index e4b1b6df..c7c4e729 100644 --- a/src/ThrustServiceProvider.php +++ b/src/ThrustServiceProvider.php @@ -4,8 +4,6 @@ use BadChoice\Thrust\Console\Commands\Cache; use BadChoice\Thrust\Console\Commands\Clear; -use BadChoice\Thrust\Console\Commands\Optimize; -use BadChoice\Thrust\Console\Commands\OptimizeClear; use BadChoice\Thrust\Console\Commands\Prune; use Illuminate\Support\ServiceProvider; @@ -29,8 +27,6 @@ public function boot() $this->commands([ Cache::class, Clear::class, - Optimize::class, - OptimizeClear::class, Prune::class, ]); } diff --git a/src/resources/js/searcher.js b/src/resources/js/searcher.js index 54584158..9af175bb 100644 --- a/src/resources/js/searcher.js +++ b/src/resources/js/searcher.js @@ -10,39 +10,46 @@ (function($) { $.fn.searcher = function( callbackUrl , options ) { - let settings = $.extend({ + const settings = $.extend({ resultsDiv : 'results', allDiv : 'all', minChars : 3, onFound : null, updateAddressBar : true - }, options); + }, options) - let timeout = null; + let timeout = null this.on('keyup',function(){ - clearTimeout(timeout); - let self = $(this); + clearTimeout(timeout) + const self = this timeout = setTimeout(function () { - let searchString = (self.val()); + const searchString = self.value if (searchString.length >= settings.minChars) { if (settings.updateAddressBar) { - window.history.pushState("", "", '?search=' + searchString); + window.history.pushState("", "", '?search=' + searchString) } - $('#' + settings.resultsDiv).show(); - $('#' + settings.allDiv).hide(); - $('#' + settings.resultsDiv).load(callbackUrl + self.val().replace(new RegExp(' ', 'g'), '%20'), settings.onFound); + document.getElementById(settings.resultsDiv).style.display = 'block' + document.getElementById(settings.allDiv).style.display = 'none' + fetch(callbackUrl + self.value.replace(new RegExp(' ', 'g'), '%20')).then(response => { + response.text().then(html => { + document.getElementById(settings.resultsDiv).innerHTML = html + }) + }) + window.dispatchEvent(new Event('thrust.searchStarted')) } else { if (settings.updateAddressBar) { - window.history.pushState("", "", "?"); + window.history.pushState("", "", "?") } - $('#' + settings.resultsDiv).hide(); - $('#' + settings.allDiv).show(); + + document.getElementById(settings.resultsDiv).style.display = 'none' + document.getElementById(settings.allDiv).style.display = 'block' + window.dispatchEvent(new Event('thrust.searchEnded')) } - }, 300); - }); + }, 300) + }) } -}(jQuery)); +}(jQuery)) function RVAjaxSelect2(url, options) { this.options = { @@ -58,7 +65,7 @@ function RVAjaxSelect2(url, options) { data: function (params) { return { search: params.term - }; + } }, processResults: function (data) { return { @@ -72,8 +79,8 @@ function RVAjaxSelect2(url, options) { } } } - }; - $.extend(this.options, options); + } + $.extend(this.options, options) this.show = function(itemId) { return $(itemId).select2(this.options) diff --git a/src/resources/js/thrust.min.js b/src/resources/js/thrust.min.js index 43b01b81..7cd6f2f9 100644 --- a/src/resources/js/thrust.min.js +++ b/src/resources/js/thrust.min.js @@ -1 +1 @@ -function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var popupUrl;!function(t,e){"object"==("undefined"==typeof module?"undefined":_typeof(module))&&"object"==_typeof(module.exports)?module.exports=t.document?e(t,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return e(t)}:e(t)}("undefined"!=typeof window?window:this,function(t,e){var i=[],n=i.slice,s=i.concat,o=i.push,r=i.indexOf,a={},l=a.toString,c=a.hasOwnProperty,h="".trim,u={},p=t.document,d="2.1.0",f=function t(e,i){return new t.fn.init(e,i)},g=/^-ms-/,m=/-([\da-z])/gi,v=function(t,e){return e.toUpperCase()};function y(t){var e=t.length,i=f.type(t);return"function"!==i&&!f.isWindow(t)&&(!(1!==t.nodeType||!e)||("array"===i||0===e||"number"==typeof e&&e>0&&e-1 in t))}f.fn=f.prototype={jquery:d,constructor:f,selector:"",length:0,toArray:function(){return n.call(this)},get:function(t){return null!=t?0>t?this[t+this.length]:this[t]:n.call(this)},pushStack:function(t){var e=f.merge(this.constructor(),t);return e.prevObject=this,e.context=this.context,e},each:function(t,e){return f.each(this,t,e)},map:function(t){return this.pushStack(f.map(this,function(e,i){return t.call(e,i,e)}))},slice:function(){return this.pushStack(n.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,i=+t+(0>t?e:0);return this.pushStack(i>=0&&e>i?[this[i]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:o,sort:i.sort,splice:i.splice},f.extend=f.fn.extend=function(){var t,e,i,n,s,o,r=arguments[0]||{},a=1,l=arguments.length,c=!1;for("boolean"==typeof r&&(c=r,r=arguments[a]||{},a++),"object"==_typeof(r)||f.isFunction(r)||(r={}),a===l&&(r=this,a--);l>a;a++)if(null!=(t=arguments[a]))for(e in t)i=r[e],r!==(n=t[e])&&(c&&n&&(f.isPlainObject(n)||(s=f.isArray(n)))?(s?(s=!1,o=i&&f.isArray(i)?i:[]):o=i&&f.isPlainObject(i)?i:{},r[e]=f.extend(c,o,n)):void 0!==n&&(r[e]=n));return r},f.extend({expando:"jQuery"+(d+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isFunction:function(t){return"function"===f.type(t)},isArray:Array.isArray,isWindow:function(t){return null!=t&&t===t.window},isNumeric:function(t){return t-parseFloat(t)>=0},isPlainObject:function(t){if("object"!==f.type(t)||t.nodeType||f.isWindow(t))return!1;try{if(t.constructor&&!c.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},type:function(t){return null==t?t+"":"object"==_typeof(t)||"function"==typeof t?a[l.call(t)]||"object":_typeof(t)},globalEval:function(t){var e,i=eval;(t=f.trim(t))&&(1===t.indexOf("use strict")?((e=p.createElement("script")).text=t,p.head.appendChild(e).parentNode.removeChild(e)):i(t))},camelCase:function(t){return t.replace(g,"ms-").replace(m,v)},nodeName:function(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()},each:function(t,e,i){var n=0,s=t.length,o=y(t);if(i){if(o)for(;s>n&&!1!==e.apply(t[n],i);n++);else for(n in t)if(!1===e.apply(t[n],i))break}else if(o)for(;s>n&&!1!==e.call(t[n],n,t[n]);n++);else for(n in t)if(!1===e.call(t[n],n,t[n]))break;return t},trim:function(t){return null==t?"":h.call(t)},makeArray:function(t,e){var i=e||[];return null!=t&&(y(Object(t))?f.merge(i,"string"==typeof t?[t]:t):o.call(i,t)),i},inArray:function(t,e,i){return null==e?-1:r.call(e,t,i)},merge:function(t,e){for(var i=+e.length,n=0,s=t.length;i>n;n++)t[s++]=e[n];return t.length=s,t},grep:function(t,e,i){for(var n=[],s=0,o=t.length,r=!i;o>s;s++)!e(t[s],s)!==r&&n.push(t[s]);return n},map:function(t,e,i){var n,o=0,r=t.length,a=[];if(y(t))for(;r>o;o++)null!=(n=e(t[o],o,i))&&a.push(n);else for(o in t)null!=(n=e(t[o],o,i))&&a.push(n);return s.apply([],a)},guid:1,proxy:function(t,e){var i,s,o;return"string"==typeof e&&(i=t[e],e=t,t=i),f.isFunction(t)?(s=n.call(arguments,2),(o=function(){return t.apply(e||this,s.concat(n.call(arguments)))}).guid=t.guid=t.guid||f.guid++,o):void 0},now:Date.now,support:u}),f.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(t,e){a["[object "+e+"]"]=e.toLowerCase()});var b=function(t){var e,i,n,s,o,r,a,l,c,h,u,p,d,f,g,m,v,y="sizzle"+-new Date,b=t.document,w=0,_=0,x=nt(),C=nt(),T=nt(),P=function(t,e){return t===e&&(c=!0),0},S="undefined",D=1<<31,$={}.hasOwnProperty,E=[],k=E.pop,A=E.push,I=E.push,z=E.slice,N=E.indexOf||function(t){for(var e=0,i=this.length;i>e;e++)if(this[e]===t)return e;return-1},O="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",H="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",j=L.replace("w","w#"),W="\\["+H+"*("+L+")"+H+"*(?:([*^$|!~]?=)"+H+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+j+")|)|)"+H+"*\\]",R=":("+L+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+W.replace(3,8)+")*)|.*)\\)|)",M=new RegExp("^"+H+"+|((?:^|[^\\\\])(?:\\\\.)*)"+H+"+$","g"),q=new RegExp("^"+H+"*,"+H+"*"),F=new RegExp("^"+H+"*([>+~]|"+H+")"+H+"*"),B=new RegExp("="+H+"*([^\\]'\"]*?)"+H+"*\\]","g"),U=new RegExp(R),Y=new RegExp("^"+j+"$"),X={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L.replace("w","w*")+")"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+R),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+H+"*(even|odd|(([+-]|)(\\d*)n|)"+H+"*(?:([+-]|)"+H+"*(\\d+)|))"+H+"*\\)|)","i"),bool:new RegExp("^(?:"+O+")$","i"),needsContext:new RegExp("^"+H+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+H+"*((?:-\\d)?\\d*)"+H+"*\\)|)(?=[^-]|$)","i")},G=/^(?:input|select|textarea|button)$/i,V=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Q=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Z=/[+~]/,J=/'|\\/g,tt=new RegExp("\\\\([\\da-f]{1,6}"+H+"?|("+H+")|.)","ig"),et=function(t,e,i){var n="0x"+e-65536;return n!=n||i?e:0>n?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)};try{I.apply(E=z.call(b.childNodes),b.childNodes),E[b.childNodes.length].nodeType}catch(t){I={apply:E.length?function(t,e){A.apply(t,z.call(e))}:function(t,e){for(var i=t.length,n=0;t[i++]=e[n++];);t.length=i-1}}}function it(t,e,n,s){var o,r,a,l,c,p,g,m,w,_;if((e?e.ownerDocument||e:b)!==u&&h(e),n=n||[],!t||"string"!=typeof t)return n;if(1!==(l=(e=e||u).nodeType)&&9!==l)return[];if(d&&!s){if(o=Q.exec(t))if(a=o[1]){if(9===l){if(!(r=e.getElementById(a))||!r.parentNode)return n;if(r.id===a)return n.push(r),n}else if(e.ownerDocument&&(r=e.ownerDocument.getElementById(a))&&v(e,r)&&r.id===a)return n.push(r),n}else{if(o[2])return I.apply(n,e.getElementsByTagName(t)),n;if((a=o[3])&&i.getElementsByClassName&&e.getElementsByClassName)return I.apply(n,e.getElementsByClassName(a)),n}if(i.qsa&&(!f||!f.test(t))){if(m=g=y,w=e,_=9===l&&t,1===l&&"object"!==e.nodeName.toLowerCase()){for(p=dt(t),(g=e.getAttribute("id"))?m=g.replace(J,"\\$&"):e.setAttribute("id",m),m="[id='"+m+"'] ",c=p.length;c--;)p[c]=m+ft(p[c]);w=Z.test(t)&&ut(e.parentNode)||e,_=p.join(",")}if(_)try{return I.apply(n,w.querySelectorAll(_)),n}catch(t){}finally{g||e.removeAttribute("id")}}}return _t(t.replace(M,"$1"),e,n,s)}function nt(){var t=[];return function e(i,s){return t.push(i+" ")>n.cacheLength&&delete e[t.shift()],e[i+" "]=s}}function st(t){return t[y]=!0,t}function ot(t){var e=u.createElement("div");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function rt(t,e){for(var i=t.split("|"),s=t.length;s--;)n.attrHandle[i[s]]=e}function at(t,e){var i=e&&t,n=i&&1===t.nodeType&&1===e.nodeType&&(~e.sourceIndex||D)-(~t.sourceIndex||D);if(n)return n;if(i)for(;i=i.nextSibling;)if(i===e)return-1;return t?1:-1}function lt(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function ct(t){return function(e){var i=e.nodeName.toLowerCase();return("input"===i||"button"===i)&&e.type===t}}function ht(t){return st(function(e){return e=+e,st(function(i,n){for(var s,o=t([],i.length,e),r=o.length;r--;)i[s=o[r]]&&(i[s]=!(n[s]=i[s]))})})}function ut(t){return t&&_typeof(t.getElementsByTagName)!==S&&t}for(e in i=it.support={},o=it.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},h=it.setDocument=function(t){var e,s=t?t.ownerDocument||t:b,r=s.defaultView;return s!==u&&9===s.nodeType&&s.documentElement?(u=s,p=s.documentElement,d=!o(s),r&&r!==r.top&&(r.addEventListener?r.addEventListener("unload",function(){h()},!1):r.attachEvent&&r.attachEvent("onunload",function(){h()})),i.attributes=ot(function(t){return t.className="i",!t.getAttribute("className")}),i.getElementsByTagName=ot(function(t){return t.appendChild(s.createComment("")),!t.getElementsByTagName("*").length}),i.getElementsByClassName=K.test(s.getElementsByClassName)&&ot(function(t){return t.innerHTML="
",t.firstChild.className="i",2===t.getElementsByClassName("i").length}),i.getById=ot(function(t){return p.appendChild(t).id=y,!s.getElementsByName||!s.getElementsByName(y).length}),i.getById?(n.find.ID=function(t,e){if(_typeof(e.getElementById)!==S&&d){var i=e.getElementById(t);return i&&i.parentNode?[i]:[]}},n.filter.ID=function(t){var e=t.replace(tt,et);return function(t){return t.getAttribute("id")===e}}):(delete n.find.ID,n.filter.ID=function(t){var e=t.replace(tt,et);return function(t){var i=_typeof(t.getAttributeNode)!==S&&t.getAttributeNode("id");return i&&i.value===e}}),n.find.TAG=i.getElementsByTagName?function(t,e){return _typeof(e.getElementsByTagName)!==S?e.getElementsByTagName(t):void 0}:function(t,e){var i,n=[],s=0,o=e.getElementsByTagName(t);if("*"===t){for(;i=o[s++];)1===i.nodeType&&n.push(i);return n}return o},n.find.CLASS=i.getElementsByClassName&&function(t,e){return _typeof(e.getElementsByClassName)!==S&&d?e.getElementsByClassName(t):void 0},g=[],f=[],(i.qsa=K.test(s.querySelectorAll))&&(ot(function(t){t.innerHTML="",t.querySelectorAll("[t^='']").length&&f.push("[*^$]="+H+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||f.push("\\["+H+"*(?:value|"+O+")"),t.querySelectorAll(":checked").length||f.push(":checked")}),ot(function(t){var e=s.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&f.push("name"+H+"*[*^$|!~]?="),t.querySelectorAll(":enabled").length||f.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),f.push(",.*:")})),(i.matchesSelector=K.test(m=p.webkitMatchesSelector||p.mozMatchesSelector||p.oMatchesSelector||p.msMatchesSelector))&&ot(function(t){i.disconnectedMatch=m.call(t,"div"),m.call(t,"[s!='']:x"),g.push("!=",R)}),f=f.length&&new RegExp(f.join("|")),g=g.length&&new RegExp(g.join("|")),e=K.test(p.compareDocumentPosition),v=e||K.test(p.contains)?function(t,e){var i=9===t.nodeType?t.documentElement:t,n=e&&e.parentNode;return t===n||!(!n||1!==n.nodeType||!(i.contains?i.contains(n):t.compareDocumentPosition&&16&t.compareDocumentPosition(n)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},P=e?function(t,e){if(t===e)return c=!0,0;var n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n||(1&(n=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!i.sortDetached&&e.compareDocumentPosition(t)===n?t===s||t.ownerDocument===b&&v(b,t)?-1:e===s||e.ownerDocument===b&&v(b,e)?1:l?N.call(l,t)-N.call(l,e):0:4&n?-1:1)}:function(t,e){if(t===e)return c=!0,0;var i,n=0,o=t.parentNode,r=e.parentNode,a=[t],h=[e];if(!o||!r)return t===s?-1:e===s?1:o?-1:r?1:l?N.call(l,t)-N.call(l,e):0;if(o===r)return at(t,e);for(i=t;i=i.parentNode;)a.unshift(i);for(i=e;i=i.parentNode;)h.unshift(i);for(;a[n]===h[n];)n++;return n?at(a[n],h[n]):a[n]===b?-1:h[n]===b?1:0},s):u},it.matches=function(t,e){return it(t,null,null,e)},it.matchesSelector=function(t,e){if((t.ownerDocument||t)!==u&&h(t),e=e.replace(B,"='$1']"),!(!i.matchesSelector||!d||g&&g.test(e)||f&&f.test(e)))try{var n=m.call(t,e);if(n||i.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(t){}return it(e,u,null,[t]).length>0},it.contains=function(t,e){return(t.ownerDocument||t)!==u&&h(t),v(t,e)},it.attr=function(t,e){(t.ownerDocument||t)!==u&&h(t);var s=n.attrHandle[e.toLowerCase()],o=s&&$.call(n.attrHandle,e.toLowerCase())?s(t,e,!d):void 0;return void 0!==o?o:i.attributes||!d?t.getAttribute(e):(o=t.getAttributeNode(e))&&o.specified?o.value:null},it.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},it.uniqueSort=function(t){var e,n=[],s=0,o=0;if(c=!i.detectDuplicates,l=!i.sortStable&&t.slice(0),t.sort(P),c){for(;e=t[o++];)e===t[o]&&(s=n.push(o));for(;s--;)t.splice(n[s],1)}return l=null,t},s=it.getText=function(t){var e,i="",n=0,o=t.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)i+=s(t)}else if(3===o||4===o)return t.nodeValue}else for(;e=t[n++];)i+=s(e);return i},(n=it.selectors={cacheLength:50,createPseudo:st,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(tt,et),t[3]=(t[4]||t[5]||"").replace(tt,et),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||it.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&it.error(t[0]),t},PSEUDO:function(t){var e,i=!t[5]&&t[2];return X.CHILD.test(t[0])?null:(t[3]&&void 0!==t[4]?t[2]=t[4]:i&&U.test(i)&&(e=dt(i,!0))&&(e=i.indexOf(")",i.length-e)-i.length)&&(t[0]=t[0].slice(0,e),t[2]=i.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(tt,et).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=x[t+" "];return e||(e=new RegExp("(^|"+H+")"+t+"("+H+"|$)"))&&x(t,function(t){return e.test("string"==typeof t.className&&t.className||_typeof(t.getAttribute)!==S&&t.getAttribute("class")||"")})},ATTR:function(t,e,i){return function(n){var s=it.attr(n,t);return null==s?"!="===e:!e||(s+="","="===e?s===i:"!="===e?s!==i:"^="===e?i&&0===s.indexOf(i):"*="===e?i&&s.indexOf(i)>-1:"$="===e?i&&s.slice(-i.length)===i:"~="===e?(" "+s+" ").indexOf(i)>-1:"|="===e&&(s===i||s.slice(0,i.length+1)===i+"-"))}},CHILD:function(t,e,i,n,s){var o="nth"!==t.slice(0,3),r="last"!==t.slice(-4),a="of-type"===e;return 1===n&&0===s?function(t){return!!t.parentNode}:function(e,i,l){var c,h,u,p,d,f,g=o!==r?"nextSibling":"previousSibling",m=e.parentNode,v=a&&e.nodeName.toLowerCase(),b=!l&&!a;if(m){if(o){for(;g;){for(u=e;u=u[g];)if(a?u.nodeName.toLowerCase()===v:1===u.nodeType)return!1;f=g="only"===t&&!f&&"nextSibling"}return!0}if(f=[r?m.firstChild:m.lastChild],r&&b){for(d=(c=(h=m[y]||(m[y]={}))[t]||[])[0]===w&&c[1],p=c[0]===w&&c[2],u=d&&m.childNodes[d];u=++d&&u&&u[g]||(p=d=0)||f.pop();)if(1===u.nodeType&&++p&&u===e){h[t]=[w,d,p];break}}else if(b&&(c=(e[y]||(e[y]={}))[t])&&c[0]===w)p=c[1];else for(;(u=++d&&u&&u[g]||(p=d=0)||f.pop())&&((a?u.nodeName.toLowerCase()!==v:1!==u.nodeType)||!++p||(b&&((u[y]||(u[y]={}))[t]=[w,p]),u!==e)););return(p-=s)===n||p%n==0&&p/n>=0}}},PSEUDO:function(t,e){var i,s=n.pseudos[t]||n.setFilters[t.toLowerCase()]||it.error("unsupported pseudo: "+t);return s[y]?s(e):s.length>1?(i=[t,t,"",e],n.setFilters.hasOwnProperty(t.toLowerCase())?st(function(t,i){for(var n,o=s(t,e),r=o.length;r--;)t[n=N.call(t,o[r])]=!(i[n]=o[r])}):function(t){return s(t,0,i)}):s}},pseudos:{not:st(function(t){var e=[],i=[],n=r(t.replace(M,"$1"));return n[y]?st(function(t,e,i,s){for(var o,r=n(t,null,s,[]),a=t.length;a--;)(o=r[a])&&(t[a]=!(e[a]=o))}):function(t,s,o){return e[0]=t,n(e,null,o,i),!i.pop()}}),has:st(function(t){return function(e){return it(t,e).length>0}}),contains:st(function(t){return function(e){return(e.textContent||e.innerText||s(e)).indexOf(t)>-1}}),lang:st(function(t){return Y.test(t||"")||it.error("unsupported lang: "+t),t=t.replace(tt,et).toLowerCase(),function(e){var i;do{if(i=d?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(i=i.toLowerCase())===t||0===i.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var i=t.location&&t.location.hash;return i&&i.slice(1)===e.id},root:function(t){return t===p},focus:function(t){return t===u.activeElement&&(!u.hasFocus||u.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:function(t){return!1===t.disabled},disabled:function(t){return!0===t.disabled},checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!n.pseudos.empty(t)},header:function(t){return V.test(t.nodeName)},input:function(t){return G.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:ht(function(){return[0]}),last:ht(function(t,e){return[e-1]}),eq:ht(function(t,e,i){return[0>i?i+e:i]}),even:ht(function(t,e){for(var i=0;e>i;i+=2)t.push(i);return t}),odd:ht(function(t,e){for(var i=1;e>i;i+=2)t.push(i);return t}),lt:ht(function(t,e,i){for(var n=0>i?i+e:i;--n>=0;)t.push(n);return t}),gt:ht(function(t,e,i){for(var n=0>i?i+e:i;++ne;e++)n+=t[e].value;return n}function gt(t,e,i){var n=e.dir,s=i&&"parentNode"===n,o=_++;return e.first?function(e,i,o){for(;e=e[n];)if(1===e.nodeType||s)return t(e,i,o)}:function(e,i,r){var a,l,c=[w,o];if(r){for(;e=e[n];)if((1===e.nodeType||s)&&t(e,i,r))return!0}else for(;e=e[n];)if(1===e.nodeType||s){if((a=(l=e[y]||(e[y]={}))[n])&&a[0]===w&&a[1]===o)return c[2]=a[2];if(l[n]=c,c[2]=t(e,i,r))return!0}}}function mt(t){return t.length>1?function(e,i,n){for(var s=t.length;s--;)if(!t[s](e,i,n))return!1;return!0}:t[0]}function vt(t,e,i,n,s){for(var o,r=[],a=0,l=t.length,c=null!=e;l>a;a++)(o=t[a])&&(!i||i(o,n,s))&&(r.push(o),c&&e.push(a));return r}function yt(t,e,i,n,s,o){return n&&!n[y]&&(n=yt(n)),s&&!s[y]&&(s=yt(s,o)),st(function(o,r,a,l){var c,h,u,p=[],d=[],f=r.length,g=o||function(t,e,i){for(var n=0,s=e.length;s>n;n++)it(t,e[n],i);return i}(e||"*",a.nodeType?[a]:a,[]),m=!t||!o&&e?g:vt(g,p,t,a,l),v=i?s||(o?t:f||n)?[]:r:m;if(i&&i(m,v,a,l),n)for(c=vt(v,d),n(c,[],a,l),h=c.length;h--;)(u=c[h])&&(v[d[h]]=!(m[d[h]]=u));if(o){if(s||t){if(s){for(c=[],h=v.length;h--;)(u=v[h])&&c.push(m[h]=u);s(null,v=[],c,l)}for(h=v.length;h--;)(u=v[h])&&(c=s?N.call(o,u):p[h])>-1&&(o[c]=!(r[c]=u))}}else v=vt(v===r?v.splice(f,v.length):v),s?s(null,r,v,l):I.apply(r,v)})}function bt(t){for(var e,i,s,o=t.length,r=n.relative[t[0].type],l=r||n.relative[" "],c=r?1:0,h=gt(function(t){return t===e},l,!0),u=gt(function(t){return N.call(e,t)>-1},l,!0),p=[function(t,i,n){return!r&&(n||i!==a)||((e=i).nodeType?h(t,i,n):u(t,i,n))}];o>c;c++)if(i=n.relative[t[c].type])p=[gt(mt(p),i)];else{if((i=n.filter[t[c].type].apply(null,t[c].matches))[y]){for(s=++c;o>s&&!n.relative[t[s].type];s++);return yt(c>1&&mt(p),c>1&&ft(t.slice(0,c-1).concat({value:" "===t[c-2].type?"*":""})).replace(M,"$1"),i,s>c&&bt(t.slice(c,s)),o>s&&bt(t=t.slice(s)),o>s&&ft(t))}p.push(i)}return mt(p)}function wt(t,e){var i=e.length>0,s=t.length>0,o=function(o,r,l,c,h){var p,d,f,g=0,m="0",v=o&&[],y=[],b=a,_=o||s&&n.find.TAG("*",h),x=w+=null==b?1:Math.random()||.1,C=_.length;for(h&&(a=r!==u&&r);m!==C&&null!=(p=_[m]);m++){if(s&&p){for(d=0;f=t[d++];)if(f(p,r,l)){c.push(p);break}h&&(w=x)}i&&((p=!f&&p)&&g--,o&&v.push(p))}if(g+=m,i&&m!==g){for(d=0;f=e[d++];)f(v,y,r,l);if(o){if(g>0)for(;m--;)v[m]||y[m]||(y[m]=k.call(c));y=vt(y)}I.apply(c,y),h&&!o&&y.length>0&&g+e.length>1&&it.uniqueSort(c)}return h&&(w=x,a=b),v};return i?st(o):o}function _t(t,e,s,o){var a,l,c,h,u,p=dt(t);if(!o&&1===p.length){if((l=p[0]=p[0].slice(0)).length>2&&"ID"===(c=l[0]).type&&i.getById&&9===e.nodeType&&d&&n.relative[l[1].type]){if(!(e=(n.find.ID(c.matches[0].replace(tt,et),e)||[])[0]))return s;t=t.slice(l.shift().value.length)}for(a=X.needsContext.test(t)?0:l.length;a--&&(c=l[a],!n.relative[h=c.type]);)if((u=n.find[h])&&(o=u(c.matches[0].replace(tt,et),Z.test(l[0].type)&&ut(e.parentNode)||e))){if(l.splice(a,1),!(t=o.length&&ft(l)))return I.apply(s,o),s;break}}return r(t,p)(o,e,!d,s,Z.test(t)&&ut(e.parentNode)||e),s}return pt.prototype=n.filters=n.pseudos,n.setFilters=new pt,r=it.compile=function(t,e){var i,n=[],s=[],o=T[t+" "];if(!o){for(e||(e=dt(t)),i=e.length;i--;)(o=bt(e[i]))[y]?n.push(o):s.push(o);o=T(t,wt(s,n))}return o},i.sortStable=y.split("").sort(P).join("")===y,i.detectDuplicates=!!c,h(),i.sortDetached=ot(function(t){return 1&t.compareDocumentPosition(u.createElement("div"))}),ot(function(t){return t.innerHTML="","#"===t.firstChild.getAttribute("href")})||rt("type|href|height|width",function(t,e,i){return i?void 0:t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),i.attributes&&ot(function(t){return t.innerHTML="",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||rt("value",function(t,e,i){return i||"input"!==t.nodeName.toLowerCase()?void 0:t.defaultValue}),ot(function(t){return null==t.getAttribute("disabled")})||rt(O,function(t,e,i){var n;return i?void 0:!0===t[e]?e.toLowerCase():(n=t.getAttributeNode(e))&&n.specified?n.value:null}),it}(t);f.find=b,f.expr=b.selectors,f.expr[":"]=f.expr.pseudos,f.unique=b.uniqueSort,f.text=b.getText,f.isXMLDoc=b.isXML,f.contains=b.contains;var w=f.expr.match.needsContext,_=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,x=/^.[^:#\[\.,]*$/;function C(t,e,i){if(f.isFunction(e))return f.grep(t,function(t,n){return!!e.call(t,n,t)!==i});if(e.nodeType)return f.grep(t,function(t){return t===e!==i});if("string"==typeof e){if(x.test(e))return f.filter(e,t,i);e=f.filter(e,t)}return f.grep(t,function(t){return r.call(e,t)>=0!==i})}f.filter=function(t,e,i){var n=e[0];return i&&(t=":not("+t+")"),1===e.length&&1===n.nodeType?f.find.matchesSelector(n,t)?[n]:[]:f.find.matches(t,f.grep(e,function(t){return 1===t.nodeType}))},f.fn.extend({find:function(t){var e,i=this.length,n=[],s=this;if("string"!=typeof t)return this.pushStack(f(t).filter(function(){for(e=0;i>e;e++)if(f.contains(s[e],this))return!0}));for(e=0;i>e;e++)f.find(t,s[e],n);return(n=this.pushStack(i>1?f.unique(n):n)).selector=this.selector?this.selector+" "+t:t,n},filter:function(t){return this.pushStack(C(this,t||[],!1))},not:function(t){return this.pushStack(C(this,t||[],!0))},is:function(t){return!!C(this,"string"==typeof t&&w.test(t)?f(t):t||[],!1).length}});var T,P=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(f.fn.init=function(t,e){var i,n;if(!t)return this;if("string"==typeof t){if(!(i="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:P.exec(t))||!i[1]&&e)return!e||e.jquery?(e||T).find(t):this.constructor(e).find(t);if(i[1]){if(e=e instanceof f?e[0]:e,f.merge(this,f.parseHTML(i[1],e&&e.nodeType?e.ownerDocument||e:p,!0)),_.test(i[1])&&f.isPlainObject(e))for(i in e)f.isFunction(this[i])?this[i](e[i]):this.attr(i,e[i]);return this}return(n=p.getElementById(i[2]))&&n.parentNode&&(this.length=1,this[0]=n),this.context=p,this.selector=t,this}return t.nodeType?(this.context=this[0]=t,this.length=1,this):f.isFunction(t)?void 0!==T.ready?T.ready(t):t(f):(void 0!==t.selector&&(this.selector=t.selector,this.context=t.context),f.makeArray(t,this))}).prototype=f.fn,T=f(p);var S=/^(?:parents|prev(?:Until|All))/,D={children:!0,contents:!0,next:!0,prev:!0};function $(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}f.extend({dir:function(t,e,i){for(var n=[],s=void 0!==i;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(s&&f(t).is(i))break;n.push(t)}return n},sibling:function(t,e){for(var i=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&i.push(t);return i}}),f.fn.extend({has:function(t){var e=f(t,this),i=e.length;return this.filter(function(){for(var t=0;i>t;t++)if(f.contains(this,e[t]))return!0})},closest:function(t,e){for(var i,n=0,s=this.length,o=[],r=w.test(t)||"string"!=typeof t?f(t,e||this.context):0;s>n;n++)for(i=this[n];i&&i!==e;i=i.parentNode)if(i.nodeType<11&&(r?r.index(i)>-1:1===i.nodeType&&f.find.matchesSelector(i,t))){o.push(i);break}return this.pushStack(o.length>1?f.unique(o):o)},index:function(t){return t?"string"==typeof t?r.call(f(t),this[0]):r.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(f.unique(f.merge(this.get(),f(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),f.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return f.dir(t,"parentNode")},parentsUntil:function(t,e,i){return f.dir(t,"parentNode",i)},next:function(t){return $(t,"nextSibling")},prev:function(t){return $(t,"previousSibling")},nextAll:function(t){return f.dir(t,"nextSibling")},prevAll:function(t){return f.dir(t,"previousSibling")},nextUntil:function(t,e,i){return f.dir(t,"nextSibling",i)},prevUntil:function(t,e,i){return f.dir(t,"previousSibling",i)},siblings:function(t){return f.sibling((t.parentNode||{}).firstChild,t)},children:function(t){return f.sibling(t.firstChild)},contents:function(t){return t.contentDocument||f.merge([],t.childNodes)}},function(t,e){f.fn[t]=function(i,n){var s=f.map(this,e,i);return"Until"!==t.slice(-5)&&(n=i),n&&"string"==typeof n&&(s=f.filter(n,s)),this.length>1&&(D[t]||f.unique(s),S.test(t)&&s.reverse()),this.pushStack(s)}});var E,k=/\S+/g,A={};function I(){p.removeEventListener("DOMContentLoaded",I,!1),t.removeEventListener("load",I,!1),f.ready()}f.Callbacks=function(t){t="string"==typeof t?A[t]||function(t){var e=A[t]={};return f.each(t.match(k)||[],function(t,i){e[i]=!0}),e}(t):f.extend({},t);var e,i,n,s,o,r,a=[],l=!t.once&&[],c=function c(u){for(e=t.memory&&u,i=!0,r=s||0,s=0,o=a.length,n=!0;a&&o>r;r++)if(!1===a[r].apply(u[0],u[1])&&t.stopOnFalse){e=!1;break}n=!1,a&&(l?l.length&&c(l.shift()):e?a=[]:h.disable())},h={add:function(){if(a){var i=a.length;!function e(i){f.each(i,function(i,n){var s=f.type(n);"function"===s?t.unique&&h.has(n)||a.push(n):n&&n.length&&"string"!==s&&e(n)})}(arguments),n?o=a.length:e&&(s=i,c(e))}return this},remove:function(){return a&&f.each(arguments,function(t,e){for(var i;(i=f.inArray(e,a,i))>-1;)a.splice(i,1),n&&(o>=i&&o--,r>=i&&r--)}),this},has:function(t){return t?f.inArray(t,a)>-1:!(!a||!a.length)},empty:function(){return a=[],o=0,this},disable:function(){return a=l=e=void 0,this},disabled:function(){return!a},lock:function(){return l=void 0,e||h.disable(),this},locked:function(){return!l},fireWith:function(t,e){return!a||i&&!l||(e=[t,(e=e||[]).slice?e.slice():e],n?l.push(e):c(e)),this},fire:function(){return h.fireWith(this,arguments),this},fired:function(){return!!i}};return h},f.extend({Deferred:function(t){var e=[["resolve","done",f.Callbacks("once memory"),"resolved"],["reject","fail",f.Callbacks("once memory"),"rejected"],["notify","progress",f.Callbacks("memory")]],i="pending",n={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},then:function(){var t=arguments;return f.Deferred(function(i){f.each(e,function(e,o){var r=f.isFunction(t[e])&&t[e];s[o[1]](function(){var t=r&&r.apply(this,arguments);t&&f.isFunction(t.promise)?t.promise().done(i.resolve).fail(i.reject).progress(i.notify):i[o[0]+"With"](this===n?i.promise():this,r?[t]:arguments)})}),t=null}).promise()},promise:function(t){return null!=t?f.extend(t,n):n}},s={};return n.pipe=n.then,f.each(e,function(t,o){var r=o[2],a=o[3];n[o[1]]=r.add,a&&r.add(function(){i=a},e[1^t][2].disable,e[2][2].lock),s[o[0]]=function(){return s[o[0]+"With"](this===s?n:this,arguments),this},s[o[0]+"With"]=r.fireWith}),n.promise(s),t&&t.call(s,s),s},when:function(t){var e,i,s,o=0,r=n.call(arguments),a=r.length,l=1!==a||t&&f.isFunction(t.promise)?a:0,c=1===l?t:f.Deferred(),h=function(t,i,s){return function(o){i[t]=this,s[t]=arguments.length>1?n.call(arguments):o,s===e?c.notifyWith(i,s):--l||c.resolveWith(i,s)}};if(a>1)for(e=new Array(a),i=new Array(a),s=new Array(a);a>o;o++)r[o]&&f.isFunction(r[o].promise)?r[o].promise().done(h(o,s,r)).fail(c.reject).progress(h(o,i,e)):--l;return l||c.resolveWith(s,r),c.promise()}}),f.fn.ready=function(t){return f.ready.promise().done(t),this},f.extend({isReady:!1,readyWait:1,holdReady:function(t){t?f.readyWait++:f.ready(!0)},ready:function(t){(!0===t?--f.readyWait:f.isReady)||(f.isReady=!0,!0!==t&&--f.readyWait>0||(E.resolveWith(p,[f]),f.fn.trigger&&f(p).trigger("ready").off("ready")))}}),f.ready.promise=function(e){return E||(E=f.Deferred(),"complete"===p.readyState?setTimeout(f.ready):(p.addEventListener("DOMContentLoaded",I,!1),t.addEventListener("load",I,!1))),E.promise(e)},f.ready.promise();var z=f.access=function(t,e,i,n,s,o,r){var a=0,l=t.length,c=null==i;if("object"===f.type(i))for(a in s=!0,i)f.access(t,e,a,i[a],!0,o,r);else if(void 0!==n&&(s=!0,f.isFunction(n)||(r=!0),c&&(r?(e.call(t,n),e=null):(c=e,e=function(t,e,i){return c.call(f(t),i)})),e))for(;l>a;a++)e(t[a],i,r?n:n.call(t[a],a,e(t[a],i)));return s?t:c?e.call(t):l?e(t[0],i):o};function N(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=f.expando+Math.random()}f.acceptData=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType},N.uid=1,N.accepts=f.acceptData,N.prototype={key:function(t){if(!N.accepts(t))return 0;var e={},i=t[this.expando];if(!i){i=N.uid++;try{e[this.expando]={value:i},Object.defineProperties(t,e)}catch(n){e[this.expando]=i,f.extend(t,e)}}return this.cache[i]||(this.cache[i]={}),i},set:function(t,e,i){var n,s=this.key(t),o=this.cache[s];if("string"==typeof e)o[e]=i;else if(f.isEmptyObject(o))f.extend(this.cache[s],e);else for(n in e)o[n]=e[n];return o},get:function(t,e){var i=this.cache[this.key(t)];return void 0===e?i:i[e]},access:function(t,e,i){var n;return void 0===e||e&&"string"==typeof e&&void 0===i?void 0!==(n=this.get(t,e))?n:this.get(t,f.camelCase(e)):(this.set(t,e,i),void 0!==i?i:e)},remove:function(t,e){var i,n,s,o=this.key(t),r=this.cache[o];if(void 0===e)this.cache[o]={};else{f.isArray(e)?n=e.concat(e.map(f.camelCase)):(s=f.camelCase(e),e in r?n=[e,s]:n=(n=s)in r?[n]:n.match(k)||[]),i=n.length;for(;i--;)delete r[n[i]]}},hasData:function(t){return!f.isEmptyObject(this.cache[t[this.expando]]||{})},discard:function(t){t[this.expando]&&delete this.cache[t[this.expando]]}};var O=new N,H=new N,L=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,j=/([A-Z])/g;function W(t,e,i){var n;if(void 0===i&&1===t.nodeType)if(n="data-"+e.replace(j,"-$1").toLowerCase(),"string"==typeof(i=t.getAttribute(n))){try{i="true"===i||"false"!==i&&("null"===i?null:+i+""===i?+i:L.test(i)?f.parseJSON(i):i)}catch(t){}H.set(t,e,i)}else i=void 0;return i}f.extend({hasData:function(t){return H.hasData(t)||O.hasData(t)},data:function(t,e,i){return H.access(t,e,i)},removeData:function(t,e){H.remove(t,e)},_data:function(t,e,i){return O.access(t,e,i)},_removeData:function(t,e){O.remove(t,e)}}),f.fn.extend({data:function(t,e){var i,n,s,o=this[0],r=o&&o.attributes;if(void 0===t){if(this.length&&(s=H.get(o),1===o.nodeType&&!O.get(o,"hasDataAttrs"))){for(i=r.length;i--;)0===(n=r[i].name).indexOf("data-")&&(n=f.camelCase(n.slice(5)),W(o,n,s[n]));O.set(o,"hasDataAttrs",!0)}return s}return"object"==_typeof(t)?this.each(function(){H.set(this,t)}):z(this,function(e){var i,n=f.camelCase(t);if(o&&void 0===e){if(void 0!==(i=H.get(o,t)))return i;if(void 0!==(i=H.get(o,n)))return i;if(void 0!==(i=W(o,n,void 0)))return i}else this.each(function(){var i=H.get(this,n);H.set(this,n,e),-1!==t.indexOf("-")&&void 0!==i&&H.set(this,t,e)})},null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each(function(){H.remove(this,t)})}}),f.extend({queue:function(t,e,i){var n;return t?(e=(e||"fx")+"queue",n=O.get(t,e),i&&(!n||f.isArray(i)?n=O.access(t,e,f.makeArray(i)):n.push(i)),n||[]):void 0},dequeue:function(t,e){e=e||"fx";var i=f.queue(t,e),n=i.length,s=i.shift(),o=f._queueHooks(t,e);"inprogress"===s&&(s=i.shift(),n--),s&&("fx"===e&&i.unshift("inprogress"),delete o.stop,s.call(t,function(){f.dequeue(t,e)},o)),!n&&o&&o.empty.fire()},_queueHooks:function(t,e){var i=e+"queueHooks";return O.get(t,i)||O.access(t,i,{empty:f.Callbacks("once memory").add(function(){O.remove(t,[e+"queue",i])})})}}),f.fn.extend({queue:function(t,e){var i=2;return"string"!=typeof t&&(e=t,t="fx",i--),arguments.length",u.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="",u.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var B="undefined";u.focusinBubbles="onfocusin"in t;var U=/^key/,Y=/^(?:mouse|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,G=/^([^.]*)(?:\.(.+)|)$/;function V(){return!0}function K(){return!1}function Q(){try{return p.activeElement}catch(t){}}f.event={global:{},add:function(t,e,i,n,s){var o,r,a,l,c,h,u,p,d,g,m,v=O.get(t);if(v)for(i.handler&&(i=(o=i).handler,s=o.selector),i.guid||(i.guid=f.guid++),(l=v.events)||(l=v.events={}),(r=v.handle)||(r=v.handle=function(e){return _typeof(f)!==B&&f.event.triggered!==e.type?f.event.dispatch.apply(t,arguments):void 0}),c=(e=(e||"").match(k)||[""]).length;c--;)d=m=(a=G.exec(e[c])||[])[1],g=(a[2]||"").split(".").sort(),d&&(u=f.event.special[d]||{},d=(s?u.delegateType:u.bindType)||d,u=f.event.special[d]||{},h=f.extend({type:d,origType:m,data:n,handler:i,guid:i.guid,selector:s,needsContext:s&&f.expr.match.needsContext.test(s),namespace:g.join(".")},o),(p=l[d])||((p=l[d]=[]).delegateCount=0,u.setup&&!1!==u.setup.call(t,n,g,r)||t.addEventListener&&t.addEventListener(d,r,!1)),u.add&&(u.add.call(t,h),h.handler.guid||(h.handler.guid=i.guid)),s?p.splice(p.delegateCount++,0,h):p.push(h),f.event.global[d]=!0)},remove:function(t,e,i,n,s){var o,r,a,l,c,h,u,p,d,g,m,v=O.hasData(t)&&O.get(t);if(v&&(l=v.events)){for(c=(e=(e||"").match(k)||[""]).length;c--;)if(d=m=(a=G.exec(e[c])||[])[1],g=(a[2]||"").split(".").sort(),d){for(u=f.event.special[d]||{},p=l[d=(n?u.delegateType:u.bindType)||d]||[],a=a[2]&&new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"),r=o=p.length;o--;)h=p[o],!s&&m!==h.origType||i&&i.guid!==h.guid||a&&!a.test(h.namespace)||n&&n!==h.selector&&("**"!==n||!h.selector)||(p.splice(o,1),h.selector&&p.delegateCount--,u.remove&&u.remove.call(t,h));r&&!p.length&&(u.teardown&&!1!==u.teardown.call(t,g,v.handle)||f.removeEvent(t,d,v.handle),delete l[d])}else for(d in l)f.event.remove(t,d+e[c],i,n,!0);f.isEmptyObject(l)&&(delete v.handle,O.remove(t,"events"))}},trigger:function(e,i,n,s){var o,r,a,l,h,u,d,g=[n||p],m=c.call(e,"type")?e.type:e,v=c.call(e,"namespace")?e.namespace.split("."):[];if(r=a=n=n||p,3!==n.nodeType&&8!==n.nodeType&&!X.test(m+f.event.triggered)&&(m.indexOf(".")>=0&&(v=m.split("."),m=v.shift(),v.sort()),h=m.indexOf(":")<0&&"on"+m,(e=e[f.expando]?e:new f.Event(m,"object"==_typeof(e)&&e)).isTrigger=s?2:3,e.namespace=v.join("."),e.namespace_re=e.namespace?new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),i=null==i?[e]:f.makeArray(i,[e]),d=f.event.special[m]||{},s||!d.trigger||!1!==d.trigger.apply(n,i))){if(!s&&!d.noBubble&&!f.isWindow(n)){for(l=d.delegateType||m,X.test(l+m)||(r=r.parentNode);r;r=r.parentNode)g.push(r),a=r;a===(n.ownerDocument||p)&&g.push(a.defaultView||a.parentWindow||t)}for(o=0;(r=g[o++])&&!e.isPropagationStopped();)e.type=o>1?l:d.bindType||m,(u=(O.get(r,"events")||{})[e.type]&&O.get(r,"handle"))&&u.apply(r,i),(u=h&&r[h])&&u.apply&&f.acceptData(r)&&(e.result=u.apply(r,i),!1===e.result&&e.preventDefault());return e.type=m,s||e.isDefaultPrevented()||d._default&&!1!==d._default.apply(g.pop(),i)||!f.acceptData(n)||h&&f.isFunction(n[m])&&!f.isWindow(n)&&((a=n[h])&&(n[h]=null),f.event.triggered=m,n[m](),f.event.triggered=void 0,a&&(n[h]=a)),e.result}},dispatch:function(t){t=f.event.fix(t);var e,i,s,o,r,a=[],l=n.call(arguments),c=(O.get(this,"events")||{})[t.type]||[],h=f.event.special[t.type]||{};if(l[0]=t,t.delegateTarget=this,!h.preDispatch||!1!==h.preDispatch.call(this,t)){for(a=f.event.handlers.call(this,t,c),e=0;(o=a[e++])&&!t.isPropagationStopped();)for(t.currentTarget=o.elem,i=0;(r=o.handlers[i++])&&!t.isImmediatePropagationStopped();)(!t.namespace_re||t.namespace_re.test(r.namespace))&&(t.handleObj=r,t.data=r.data,void 0!==(s=((f.event.special[r.origType]||{}).handle||r.handler).apply(o.elem,l))&&!1===(t.result=s)&&(t.preventDefault(),t.stopPropagation()));return h.postDispatch&&h.postDispatch.call(this,t),t.result}},handlers:function(t,e){var i,n,s,o,r=[],a=e.delegateCount,l=t.target;if(a&&l.nodeType&&(!t.button||"click"!==t.type))for(;l!==this;l=l.parentNode||this)if(!0!==l.disabled||"click"!==t.type){for(n=[],i=0;a>i;i++)void 0===n[s=(o=e[i]).selector+" "]&&(n[s]=o.needsContext?f(s,this).index(l)>=0:f.find(s,this,null,[l]).length),n[s]&&n.push(o);n.length&&r.push({elem:l,handlers:n})}return a]*)\/>/gi,J=/<([\w:]+)/,tt=/<|&#?\w+;/,et=/<(?:script|style|link)/i,it=/checked\s*(?:[^=]|=\s*.checked.)/i,nt=/^$|\/(?:java|ecma)script/i,st=/^true\/(.*)/,ot=/^\s*\s*$/g,rt={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function at(t,e){return f.nodeName(t,"table")&&f.nodeName(11!==e.nodeType?e:e.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function lt(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function ct(t){var e=st.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function ht(t,e){for(var i=0,n=t.length;n>i;i++)O.set(t[i],"globalEval",!e||O.get(e[i],"globalEval"))}function ut(t,e){var i,n,s,o,r,a,l,c;if(1===e.nodeType){if(O.hasData(t)&&(o=O.access(t),r=O.set(e,o),c=o.events))for(s in delete r.handle,r.events={},c)for(i=0,n=c[s].length;n>i;i++)f.event.add(e,s,c[s][i]);H.hasData(t)&&(a=H.access(t),l=f.extend({},a),H.set(e,l))}}function pt(t,e){var i=t.getElementsByTagName?t.getElementsByTagName(e||"*"):t.querySelectorAll?t.querySelectorAll(e||"*"):[];return void 0===e||e&&f.nodeName(t,e)?f.merge([t],i):i}function dt(t,e){var i=e.nodeName.toLowerCase();"input"===i&&F.test(t.type)?e.checked=t.checked:("input"===i||"textarea"===i)&&(e.defaultValue=t.defaultValue)}rt.optgroup=rt.option,rt.tbody=rt.tfoot=rt.colgroup=rt.caption=rt.thead,rt.th=rt.td,f.extend({clone:function(t,e,i){var n,s,o,r,a=t.cloneNode(!0),l=f.contains(t.ownerDocument,t);if(!(u.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||f.isXMLDoc(t)))for(r=pt(a),n=0,s=(o=pt(t)).length;s>n;n++)dt(o[n],r[n]);if(e)if(i)for(o=o||pt(t),r=r||pt(a),n=0,s=o.length;s>n;n++)ut(o[n],r[n]);else ut(t,a);return(r=pt(a,"script")).length>0&&ht(r,!l&&pt(t,"script")),a},buildFragment:function(t,e,i,n){for(var s,o,r,a,l,c,h=e.createDocumentFragment(),u=[],p=0,d=t.length;d>p;p++)if((s=t[p])||0===s)if("object"===f.type(s))f.merge(u,s.nodeType?[s]:s);else if(tt.test(s)){for(o=o||h.appendChild(e.createElement("div")),r=(J.exec(s)||["",""])[1].toLowerCase(),a=rt[r]||rt._default,o.innerHTML=a[1]+s.replace(Z,"<$1>")+a[2],c=a[0];c--;)o=o.lastChild;f.merge(u,o.childNodes),(o=h.firstChild).textContent=""}else u.push(e.createTextNode(s));for(h.textContent="",p=0;s=u[p++];)if((!n||-1===f.inArray(s,n))&&(l=f.contains(s.ownerDocument,s),o=pt(h.appendChild(s),"script"),l&&ht(o),i))for(c=0;s=o[c++];)nt.test(s.type||"")&&i.push(s);return h},cleanData:function(t){for(var e,i,n,s,o,r,a=f.event.special,l=0;void 0!==(i=t[l]);l++){if(f.acceptData(i)&&((o=i[O.expando])&&(e=O.cache[o]))){if((n=Object.keys(e.events||{})).length)for(r=0;void 0!==(s=n[r]);r++)a[s]?f.event.remove(i,s):f.removeEvent(i,s,e.handle);O.cache[o]&&delete O.cache[o]}delete H.cache[i[H.expando]]}}}),f.fn.extend({text:function(t){return z(this,function(t){return void 0===t?f.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=t)})},null,t,arguments.length)},append:function(){return this.domManip(arguments,function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||at(this,t).appendChild(t)})},prepend:function(){return this.domManip(arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=at(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return this.domManip(arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return this.domManip(arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},remove:function(t,e){for(var i,n=t?f.filter(t,this):this,s=0;null!=(i=n[s]);s++)e||1!==i.nodeType||f.cleanData(pt(i)),i.parentNode&&(e&&f.contains(i.ownerDocument,i)&&ht(pt(i,"script")),i.parentNode.removeChild(i));return this},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(f.cleanData(pt(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return f.clone(this,t,e)})},html:function(t){return z(this,function(t){var e=this[0]||{},i=0,n=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!et.test(t)&&!rt[(J.exec(t)||["",""])[1].toLowerCase()]){t=t.replace(Z,"<$1>");try{for(;n>i;i++)1===(e=this[i]||{}).nodeType&&(f.cleanData(pt(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var t=arguments[0];return this.domManip(arguments,function(e){t=this.parentNode,f.cleanData(pt(this)),t&&t.replaceChild(e,this)}),t&&(t.length||t.nodeType)?this:this.remove()},detach:function(t){return this.remove(t,!0)},domManip:function(t,e){t=s.apply([],t);var i,n,o,r,a,l,c=0,h=this.length,p=this,d=h-1,g=t[0],m=f.isFunction(g);if(m||h>1&&"string"==typeof g&&!u.checkClone&&it.test(g))return this.each(function(i){var n=p.eq(i);m&&(t[0]=g.call(this,i,n.html())),n.domManip(t,e)});if(h&&(n=(i=f.buildFragment(t,this[0].ownerDocument,!1,this)).firstChild,1===i.childNodes.length&&(i=n),n)){for(r=(o=f.map(pt(i,"script"),lt)).length;h>c;c++)a=i,c!==d&&(a=f.clone(a,!0,!0),r&&f.merge(o,pt(a,"script"))),e.call(this[c],a,c);if(r)for(l=o[o.length-1].ownerDocument,f.map(o,ct),c=0;r>c;c++)a=o[c],nt.test(a.type||"")&&!O.access(a,"globalEval")&&f.contains(l,a)&&(a.src?f._evalUrl&&f._evalUrl(a.src):f.globalEval(a.textContent.replace(ot,"")))}return this}}),f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,e){f.fn[t]=function(t){for(var i,n=[],s=f(t),r=s.length-1,a=0;r>=a;a++)i=a===r?this:this.clone(!0),f(s[a])[e](i),o.apply(n,i.get());return this.pushStack(n)}});var ft,gt={};function mt(e,i){var n=f(i.createElement(e)).appendTo(i.body),s=t.getDefaultComputedStyle?t.getDefaultComputedStyle(n[0]).display:f.css(n[0],"display");return n.detach(),s}function vt(t){var e=p,i=gt[t];return i||("none"!==(i=mt(t,e))&&i||((e=(ft=(ft||f("