diff --git a/packages/Webkul/Admin/src/Resources/lang/en/app.php b/packages/Webkul/Admin/src/Resources/lang/en/app.php index 60a745caf..becd483f0 100755 --- a/packages/Webkul/Admin/src/Resources/lang/en/app.php +++ b/packages/Webkul/Admin/src/Resources/lang/en/app.php @@ -334,7 +334,7 @@ return [ 'item-status' => 'Item Status', 'item-ordered' => 'Ordered (:qty_ordered)', 'item-invoice' => 'Invoiced (:qty_invoiced)', - 'item-shipped' => 'shipped (:qty_shipped)', + 'item-shipped' => 'Shipped (:qty_shipped)', 'item-canceled' => 'Canceled (:qty_canceled)', 'item-refunded' => 'Refunded (:qty_refunded)', 'price' => 'Price', diff --git a/packages/Webkul/Admin/src/Resources/views/catalog/attributes/edit.blade.php b/packages/Webkul/Admin/src/Resources/views/catalog/attributes/edit.blade.php index 7ed785d42..fa1557a51 100755 --- a/packages/Webkul/Admin/src/Resources/views/catalog/attributes/edit.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/catalog/attributes/edit.blade.php @@ -108,7 +108,7 @@
- +
@endforeach @@ -432,7 +432,7 @@ @endif @foreach (app('Webkul\Core\Repositories\LocaleRepository')->all() as $locale) - row['{{ $locale->code }}'] = "{{ $option->translate($locale->code)['label'] }}"; + row['{{ $locale->code }}'] = "{{ $option->translate($locale->code)['label'] ?? '' }}"; @endforeach this.optionRows.push(row); diff --git a/packages/Webkul/Admin/src/Resources/views/catalog/products/accordians/bundle-items.blade.php b/packages/Webkul/Admin/src/Resources/views/catalog/products/accordians/bundle-items.blade.php index 6aa2e9b32..33e27476e 100644 --- a/packages/Webkul/Admin/src/Resources/views/catalog/products/accordians/bundle-items.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/catalog/products/accordians/bundle-items.blade.php @@ -304,6 +304,7 @@ this.bundle_option_products.push({ product: item, qty: 0, + is_default: 0, sort_order: 0 }); } @@ -348,9 +349,9 @@ this.bundle_option_products.forEach(function(product) { if (this_this.bundleOption.type == 'radio' || this_this.bundleOption.type == 'select') { - product.is_default = product.id == productId ? 1 : 0; + product.is_default = product.product.id == productId ? 1 : 0; } else { - if (product.id == productId) + if (product.product.id == productId) product.is_default = product.is_default ? 0 : 1; } }); @@ -381,7 +382,7 @@ }, checkProduct: function($event) { - this.$emit('onCheckProduct', this.product.id) + this.$emit('onCheckProduct', this.product.product.id) } } }); diff --git a/packages/Webkul/Attribute/src/Database/Factories/AttributeFamilyFactory.php b/packages/Webkul/Attribute/src/Database/Factories/AttributeFamilyFactory.php new file mode 100644 index 000000000..bf4eb0fc5 --- /dev/null +++ b/packages/Webkul/Attribute/src/Database/Factories/AttributeFamilyFactory.php @@ -0,0 +1,15 @@ +define(AttributeFamily::class, function (Faker $faker) { + return [ + 'name' => $faker->word(), + 'code' => $faker->word(), + 'is_user_defined' => rand(0, 1), + 'status' => 0, + ]; +}); diff --git a/packages/Webkul/Checkout/src/Cart.php b/packages/Webkul/Checkout/src/Cart.php index 8b3ae7993..9157dc392 100755 --- a/packages/Webkul/Checkout/src/Cart.php +++ b/packages/Webkul/Checkout/src/Cart.php @@ -146,6 +146,10 @@ class Cart { if (is_string($cartProducts)) { $this->collectTotals(); + if (! count($cart->all_items) > 0) { + session()->forget('cart'); + } + throw new \Exception($cartProducts); } else { $parentCartItem = null; diff --git a/packages/Webkul/Core/src/Database/Factories/SubscriberListFactory.php b/packages/Webkul/Core/src/Database/Factories/SubscriberListFactory.php new file mode 100644 index 000000000..947e8cf2e --- /dev/null +++ b/packages/Webkul/Core/src/Database/Factories/SubscriberListFactory.php @@ -0,0 +1,14 @@ +define(SubscribersList::class, function (Faker $faker) { + return [ + 'email' => $faker->safeEmail, + 'is_subscribed' => $faker->boolean, + 'channel_id' => 1, + ]; +}); diff --git a/packages/Webkul/Customer/src/Database/Factories/CustomerGroupFactory.php b/packages/Webkul/Customer/src/Database/Factories/CustomerGroupFactory.php new file mode 100644 index 000000000..5c554880e --- /dev/null +++ b/packages/Webkul/Customer/src/Database/Factories/CustomerGroupFactory.php @@ -0,0 +1,15 @@ +define(CustomerGroup::class, function (Faker $faker) { + $name = ucfirst($faker->word); + return [ + 'name' => $name, + 'is_user_defined' => $faker->boolean, + 'code' => lcfirst($name), + ]; +}); diff --git a/packages/Webkul/Customer/src/Providers/CustomerServiceProvider.php b/packages/Webkul/Customer/src/Providers/CustomerServiceProvider.php index 9e62f6655..9ff9fbf23 100755 --- a/packages/Webkul/Customer/src/Providers/CustomerServiceProvider.php +++ b/packages/Webkul/Customer/src/Providers/CustomerServiceProvider.php @@ -2,6 +2,7 @@ namespace Webkul\Customer\Providers; +use Illuminate\Database\Eloquent\Factory as EloquentFactory; use Illuminate\Support\ServiceProvider; use Illuminate\Routing\Router; use Webkul\Customer\Http\Middleware\RedirectIfNotCustomer; @@ -30,4 +31,28 @@ class CustomerServiceProvider extends ServiceProvider { $this->app->make(EloquentFactory::class)->load($path); } + + /** + * Register services. + * + * @return void + * @throws \Illuminate\Contracts\Container\BindingResolutionException + */ + public function register() + { + $this->registerEloquentFactoriesFrom(__DIR__ . '/../Database/Factories'); + } + + /** + * Register factories. + * + * @param string $path + * + * @return void + * @throws \Illuminate\Contracts\Container\BindingResolutionException + */ + protected function registerEloquentFactoriesFrom($path): void + { + $this->app->make(EloquentFactory::class)->load($path); + } } diff --git a/packages/Webkul/Product/src/Database/Factories/ProductReviewFactory.php b/packages/Webkul/Product/src/Database/Factories/ProductReviewFactory.php new file mode 100644 index 000000000..aa3cb85f1 --- /dev/null +++ b/packages/Webkul/Product/src/Database/Factories/ProductReviewFactory.php @@ -0,0 +1,20 @@ +define(ProductReview::class, function (Faker $faker, array $attributes) { + if (!array_key_exists('product_id', $attributes)) { + throw new InvalidArgumentException('product_id must be provided. You may use $I->haveProduct() to generate a product'); + } + + return [ + 'title' => $faker->words(5, true), + 'rating' => $faker->numberBetween(0, 10), + 'status' => 1, + 'comment' => $faker->sentence(20), + 'product_id' => $attributes['product_id'], + ]; +}); diff --git a/packages/Webkul/Product/src/Type/Bundle.php b/packages/Webkul/Product/src/Type/Bundle.php index 38d884d4e..1a03ead69 100644 --- a/packages/Webkul/Product/src/Type/Bundle.php +++ b/packages/Webkul/Product/src/Type/Bundle.php @@ -36,7 +36,7 @@ class Bundle extends AbstractType /** * Bundle Option helper instance - * + * * @var BundleOption */ protected $bundleOptionHelper; @@ -50,7 +50,7 @@ class Bundle extends AbstractType /** * These blade files will be included in product edit page - * + * * @var array */ protected $additionalViews = [ @@ -379,7 +379,7 @@ class Bundle extends AbstractType } - if ($prices['from']['regular_price']['price'] != $prices['to']['regular_price']['price'] + if ($prices['from']['regular_price']['price'] != $prices['to']['regular_price']['price'] || $prices['from']['final_price']['price'] != $prices['to']['final_price']['price']) { $priceHtml .= 'To'; @@ -405,11 +405,13 @@ class Bundle extends AbstractType */ public function prepareForCart($data) { - $data['bundle_options'] = array_filter($this->validateBundleOptionForCart($data['bundle_options'])); + + if (isset($data['bundle_options'])) + $data['bundle_options'] = array_filter($this->validateBundleOptionForCart($data['bundle_options'])); if (! isset($data['bundle_options']) || ! count($data['bundle_options'])) return trans('shop::app.checkout.cart.integrity.missing_options'); - + $products = parent::prepareForCart($data); foreach ($this->getCartChildProducts($data) as $productId => $data) { @@ -476,7 +478,7 @@ class Bundle extends AbstractType return $products; } - + /** * * @param array $options1 @@ -521,6 +523,8 @@ class Bundle extends AbstractType */ public function getAdditionalOptions($data) { + $bundleOptionQuantities = $data['bundle_option_qty']; + foreach ($data['bundle_options'] as $optionId => $optionProductIds) { $option = $this->productBundleOptionRepository->find($optionId); @@ -531,11 +535,11 @@ class Bundle extends AbstractType continue; $optionProduct = $this->productBundleOptionProductRepository->find($optionProductId); - + $qty = $data['bundle_option_qty'][$optionId] ?? $optionProduct->qty; if (! isset($data['bundle_option_qty'][$optionId])) - $data['bundle_option_qty'][$optionId] = $qty; + $bundleOptionQuantities[$optionId] = $qty; $labels[] = $qty . ' x ' . $optionProduct->product->name . ' ' . core()->currency($optionProduct->product->getTypeInstance()->getMinimalPrice()); } @@ -549,6 +553,8 @@ class Bundle extends AbstractType } } + $data['bundle_option_qty'] = $bundleOptionQuantities; + return $data; } diff --git a/packages/Webkul/Sales/src/Database/Factories/InventorySourceFactory.php b/packages/Webkul/Sales/src/Database/Factories/InventorySourceFactory.php new file mode 100644 index 000000000..48594e2fa --- /dev/null +++ b/packages/Webkul/Sales/src/Database/Factories/InventorySourceFactory.php @@ -0,0 +1,25 @@ +define(InventorySource::class, function (Faker $faker) { + $code = $faker->unique()->word; + return [ + 'code' => $faker->unique()->word, + 'name' => $code, + 'description' => $faker->sentence, + 'contact_name' => $faker->name, + 'contact_email' => $faker->safeEmail, + 'contact_number' => $faker->phoneNumber, + 'country' => $faker->countryCode, + 'state' => $faker->state, + 'city' => $faker->city, + 'street' => $faker->streetAddress, + 'postcode' => $faker->postcode, + 'priority' => 0, + 'status' => 1, + ]; +}); diff --git a/packages/Webkul/Sales/src/Database/Factories/InvoiceFactory.php b/packages/Webkul/Sales/src/Database/Factories/InvoiceFactory.php new file mode 100644 index 000000000..18bdaf569 --- /dev/null +++ b/packages/Webkul/Sales/src/Database/Factories/InvoiceFactory.php @@ -0,0 +1,61 @@ +define(Invoice::class, function (Faker $faker, array $attributes) { + $subTotal = $faker->randomFloat(2); + $shippingAmount = $faker->randomFloat(2); + $taxAmount = $faker->randomFloat(2); + + if (!$attributes['order_id']) { + $attributes['order_id'] = function () { + return factory(Order::class)->create()->id; + }; + } + + if (!$attributes['order_address_id']) { + $attributes['order_address_id'] = function () use ($attributes) { + return factory(OrderAddress::class) + ->create(['order_id' => $attributes['order_id']]) + ->id; + }; + } + + return [ + 'email_sent' => 0, + 'total_qty' => $faker->randomNumber(), + 'base_currency_code' => 'EUR', + 'channel_currency_code' => 'EUR', + 'order_currency_code' => 'EUR', + 'sub_total' => $subTotal, + 'base_sub_total' => $subTotal, + 'grand_total' => $subTotal, + 'base_grand_total' => $subTotal, + 'shipping_amount' => $shippingAmount, + 'base_shipping_amount' => $shippingAmount, + 'tax_amount' => $taxAmount, + 'base_tax_amount' => $taxAmount, + 'discount_amount' => 0, + 'base_discount_amount' => 0, + 'order_id' => $attributes['order_id'], + 'order_address_id' => $attributes['order_address_id'], + ]; +}); + +$factory->state(Invoice::class, 'pending', [ + 'status' => 'pending', +]); + +$factory->state(Invoice::class, 'paid', [ + 'status' => 'paid', +]); + +$factory->state(Invoice::class, 'refunded', [ + 'status' => 'refunded', +]); + diff --git a/packages/Webkul/Sales/src/Database/Factories/OrderAddressFactory.php b/packages/Webkul/Sales/src/Database/Factories/OrderAddressFactory.php new file mode 100644 index 000000000..12f1004f6 --- /dev/null +++ b/packages/Webkul/Sales/src/Database/Factories/OrderAddressFactory.php @@ -0,0 +1,34 @@ +define(OrderAddress::class, function (Faker $faker) { + $customer = factory(Customer::class)->create(); + $customerAddress = factory(CustomerAddress::class)->create(); + + return [ + 'first_name' => $customer->first_name, + 'last_name' => $customer->last_name, + 'email' => $customer->email, + 'address1' => $customerAddress->address1, + 'country' => $customerAddress->country, + 'state' => $customerAddress->state, + 'city' => $customerAddress->city, + 'postcode' => $customerAddress->postcode, + 'phone' => $customerAddress->phone, + 'address_type' => 'billing', + 'order_id' => function () { + return factory(Order::class)->create()->id; + }, + ]; +}); + +$factory->state(OrderAddress::class, 'shipping', [ + 'address_type' => 'shipping', +]); \ No newline at end of file diff --git a/packages/Webkul/Sales/src/Database/Factories/OrderFactory.php b/packages/Webkul/Sales/src/Database/Factories/OrderFactory.php new file mode 100644 index 000000000..78dcae3ba --- /dev/null +++ b/packages/Webkul/Sales/src/Database/Factories/OrderFactory.php @@ -0,0 +1,65 @@ +define(Order::class, function (Faker $faker) { + $lastOrder = DB::table('orders') + ->orderBy('id', 'desc') + ->select('id') + ->first() + ->id ?? 0; + + + $customer = factory(Customer::class)->create(); + + return [ + 'increment_id' => $lastOrder + 1, + 'status' => 'pending', + 'channel_name' => 'Default', + 'is_guest' => 0, + 'customer_id' => $customer->id, + 'customer_email' => $customer->email, + 'customer_first_name' => $customer->first_name, + 'customer_last_name' => $customer->last_name, + 'is_gift' => 0, + 'total_item_count' => 1, + 'total_qty_ordered' => 1, + 'base_currency_code' => 'EUR', + 'channel_currency_code' => 'EUR', + 'order_currency_code' => 'EUR', + 'grand_total' => 0.0000, + 'base_grand_total' => 0.0000, + 'grand_total_invoiced' => 0.0000, + 'base_grand_total_invoiced' => 0.0000, + 'grand_total_refunded' => 0.0000, + 'base_grand_total_refunded' => 0.0000, + 'sub_total' => 0.0000, + 'base_sub_total' => 0.0000, + 'sub_total_invoiced' => 0.0000, + 'base_sub_total_invoiced' => 0.0000, + 'sub_total_refunded' => 0.0000, + 'base_sub_total_refunded' => 0.0000, + 'customer_type' => Customer::class, + 'channel_id' => 1, + 'channel_type' => Channel::class, + 'cart_id' => 0, + ]; +}); + +$factory->state(Order::class, 'pending', [ + 'status' => 'pending', +]); + +$factory->state(Order::class, 'completed', [ + 'status' => 'completed', +]); + +$factory->state(Order::class, 'closed', [ + 'status' => 'closed', +]); diff --git a/packages/Webkul/Sales/src/Database/Factories/RefundFactory.php b/packages/Webkul/Sales/src/Database/Factories/RefundFactory.php new file mode 100644 index 000000000..c4a5ba62a --- /dev/null +++ b/packages/Webkul/Sales/src/Database/Factories/RefundFactory.php @@ -0,0 +1,16 @@ +define(Refund::class, function (Faker $faker, array $attributes) { + return [ + 'order_id' => function () { + return factory(Order::class)->create()->id; + }, + ]; +}); + diff --git a/packages/Webkul/Sales/src/Database/Factories/ShipmentFactory.php b/packages/Webkul/Sales/src/Database/Factories/ShipmentFactory.php new file mode 100644 index 000000000..4332e18d3 --- /dev/null +++ b/packages/Webkul/Sales/src/Database/Factories/ShipmentFactory.php @@ -0,0 +1,22 @@ +define(Shipment::class, function (Faker $faker) { + $address = factory(OrderAddress::class)->create(); + + return [ + 'total_qty' => $faker->numberBetween(1, 20), + 'order_id' => $address->order_id, + 'order_address_id' => $address->id, + 'inventory_source_id' => function () { + return factory(InventorySource::class)->create()->id; + }, + ]; +}); + diff --git a/packages/Webkul/Sales/src/Providers/SalesServiceProvider.php b/packages/Webkul/Sales/src/Providers/SalesServiceProvider.php index b450176d9..a3d2a6003 100755 --- a/packages/Webkul/Sales/src/Providers/SalesServiceProvider.php +++ b/packages/Webkul/Sales/src/Providers/SalesServiceProvider.php @@ -2,6 +2,7 @@ namespace Webkul\Sales\Providers; +use Illuminate\Database\Eloquent\Factory as EloquentFactory; use Illuminate\Support\ServiceProvider; class SalesServiceProvider extends ServiceProvider @@ -15,11 +16,27 @@ class SalesServiceProvider extends ServiceProvider * Register services. * * @return void + * @throws \Illuminate\Contracts\Container\BindingResolutionException */ public function register() { + $this->registerEloquentFactoriesFrom(__DIR__ . '/../Database/Factories'); + $this->mergeConfigFrom( dirname(__DIR__) . '/Config/system.php', 'core' ); } + + /** + * Register factories. + * + * @param string $path + * + * @return void + * @throws \Illuminate\Contracts\Container\BindingResolutionException + */ + protected function registerEloquentFactoriesFrom($path): void + { + $this->app->make(EloquentFactory::class)->load($path); + } } \ No newline at end of file diff --git a/packages/Webkul/Shop/package.json b/packages/Webkul/Shop/package.json index 281904967..f9c6838af 100755 --- a/packages/Webkul/Shop/package.json +++ b/packages/Webkul/Shop/package.json @@ -25,6 +25,6 @@ "ez-plus": "^1.2.1", "vee-validate": "^2.2.15", "vue-flatpickr": "^2.3.0", - "vue-slider-component": "^3.0.44" + "vue-slider-component": "^2.7.5" } } diff --git a/packages/Webkul/Shop/publishable/assets/js/shop.js b/packages/Webkul/Shop/publishable/assets/js/shop.js index 132a6a041..746a3bba5 100755 --- a/packages/Webkul/Shop/publishable/assets/js/shop.js +++ b/packages/Webkul/Shop/publishable/assets/js/shop.js @@ -1,2 +1,2 @@ /*! For license information please see shop.js.LICENSE */ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=0)}({0:function(e,t,n){n("uPOf"),e.exports=n("w/dW")},"2SVd":function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},"5oMp":function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},"8oxB":function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var u,l=[],c=!1,d=-1;function f(){c&&u&&(c=!1,u.length?l=u.concat(l):d=-1,l.length&&p())}function p(){if(!c){var e=s(f);c=!0;for(var t=l.length;t;){for(u=l,l=[];++d1)for(var n=1;n3?u.length%3:0;return s+(h?u.substr(0,h)+o.thousand:"")+u.substr(h).replace(/(\d{3})(?=\d)/g,"$1"+o.thousand)+(a?o.decimal+m(Math.abs(e),a).split(".")[1]:"")},y=i.formatMoney=function(e,t,n,r,o,a){if(l(e))return f(e,(function(e){return y(e,t,n,r,o,a)}));e=v(e);var s=d(c(t)?t:{symbol:t,precision:n,thousand:r,decimal:o,format:a},i.settings.currency),u=h(s.format);return(e>0?u.pos:e<0?u.neg:u.zero).replace("%s",s.symbol).replace("%v",g(Math.abs(e),p(s.precision),s.thousand,s.decimal))};i.formatColumn=function(e,t,n,r,o,a){if(!e)return[];var s=d(c(t)?t:{symbol:t,precision:n,thousand:r,decimal:o,format:a},i.settings.currency),m=h(s.format),y=m.pos.indexOf("%s")0?m.pos:e<0?m.neg:m.zero).replace("%s",s.symbol).replace("%v",g(Math.abs(e),p(s.precision),s.thousand,s.decimal));return n.length>b&&(b=n.length),n}));return f(w,(function(e,t){return u(e)&&e.length0&&t-1 in e)}_.fn=_.prototype={jquery:"3.4.1",constructor:_,length:0,toArray:function(){return u.call(this)},get:function(e){return null==e?u.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=_.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return _.each(this,e)},map:function(e){return this.pushStack(_.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(u.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n+~]|"+I+")"+I+"*"),U=new RegExp(I+"|>"),V=new RegExp(W),Z=new RegExp("^"+M+"$"),Y={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M+"|[*])"),ATTR:new RegExp("^"+R),PSEUDO:new RegExp("^"+W),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+I+"*(even|odd|(([+-]|)(\\d*)n|)"+I+"*(?:([+-]|)"+I+"*(\\d+)|))"+I+"*\\)|)","i"),bool:new RegExp("^(?:"+j+")$","i"),needsContext:new RegExp("^"+I+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+I+"*((?:-\\d)?\\d*)"+I+"*\\)|)(?=[^-]|$)","i")},X=/HTML$/i,G=/^(?:input|select|textarea|button)$/i,Q=/^h\d$/i,J=/^[^{]+\{\s*\[native \w/,K=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\([\\da-f]{1,6}"+I+"?|("+I+")|.)","ig"),ne=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){f()},ae=we((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{L.apply($=N.call(x.childNodes),x.childNodes),$[x.childNodes.length].nodeType}catch(e){L={apply:$.length?function(e,t){D.apply(e,N.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function se(e,t,r,i){var o,s,l,c,d,h,g,y=t&&t.ownerDocument,T=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==T&&9!==T&&11!==T)return r;if(!i&&((t?t.ownerDocument||t:x)!==p&&f(t),t=t||p,v)){if(11!==T&&(d=K.exec(e)))if(o=d[1]){if(9===T){if(!(l=t.getElementById(o)))return r;if(l.id===o)return r.push(l),r}else if(y&&(l=y.getElementById(o))&&b(t,l)&&l.id===o)return r.push(l),r}else{if(d[2])return L.apply(r,t.getElementsByTagName(e)),r;if((o=d[3])&&n.getElementsByClassName&&t.getElementsByClassName)return L.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!A[e+" "]&&(!m||!m.test(e))&&(1!==T||"object"!==t.nodeName.toLowerCase())){if(g=e,y=t,1===T&&U.test(e)){for((c=t.getAttribute("id"))?c=c.replace(re,ie):t.setAttribute("id",c=w),s=(h=a(e)).length;s--;)h[s]="#"+c+" "+be(h[s]);g=h.join(","),y=ee.test(e)&&ge(t.parentNode)||t}try{return L.apply(r,y.querySelectorAll(g)),r}catch(t){A(e,!0)}finally{c===w&&t.removeAttribute("id")}}}return u(e.replace(F,"$1"),t,r,i)}function ue(){var e=[];return function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}}function le(e){return e[w]=!0,e}function ce(e){var t=p.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function de(e,t){for(var n=e.split("|"),i=n.length;i--;)r.attrHandle[n[i]]=t}function fe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function pe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function he(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ve(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ae(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function me(e){return le((function(t){return t=+t,le((function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))}))}))}function ge(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=se.support={},o=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!X.test(t||n&&n.nodeName||"HTML")},f=se.setDocument=function(e){var t,i,a=e?e.ownerDocument||e:x;return a!==p&&9===a.nodeType&&a.documentElement?(h=(p=a).documentElement,v=!o(p),x!==p&&(i=p.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",oe,!1):i.attachEvent&&i.attachEvent("onunload",oe)),n.attributes=ce((function(e){return e.className="i",!e.getAttribute("className")})),n.getElementsByTagName=ce((function(e){return e.appendChild(p.createComment("")),!e.getElementsByTagName("*").length})),n.getElementsByClassName=J.test(p.getElementsByClassName),n.getById=ce((function(e){return h.appendChild(e).id=w,!p.getElementsByName||!p.getElementsByName(w).length})),n.getById?(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&v){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&v){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&v)return t.getElementsByClassName(e)},g=[],m=[],(n.qsa=J.test(p.querySelectorAll))&&(ce((function(e){h.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+I+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||m.push("\\["+I+"*(?:value|"+j+")"),e.querySelectorAll("[id~="+w+"-]").length||m.push("~="),e.querySelectorAll(":checked").length||m.push(":checked"),e.querySelectorAll("a#"+w+"+*").length||m.push(".#.+[+~]")})),ce((function(e){e.innerHTML="";var t=p.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&m.push("name"+I+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&m.push(":enabled",":disabled"),h.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&m.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),m.push(",.*:")}))),(n.matchesSelector=J.test(y=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&ce((function(e){n.disconnectedMatch=y.call(e,"*"),y.call(e,"[s!='']:x"),g.push("!=",W)})),m=m.length&&new RegExp(m.join("|")),g=g.length&&new RegExp(g.join("|")),t=J.test(h.compareDocumentPosition),b=t||J.test(h.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},O=t?function(e,t){if(e===t)return d=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e===p||e.ownerDocument===x&&b(x,e)?-1:t===p||t.ownerDocument===x&&b(x,t)?1:c?P(c,e)-P(c,t):0:4&r?-1:1)}:function(e,t){if(e===t)return d=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===p?-1:t===p?1:i?-1:o?1:c?P(c,e)-P(c,t):0;if(i===o)return fe(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?fe(a[r],s[r]):a[r]===x?-1:s[r]===x?1:0},p):p},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&f(e),n.matchesSelector&&v&&!A[t+" "]&&(!g||!g.test(t))&&(!m||!m.test(t)))try{var r=y.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){A(t,!0)}return se(t,p,null,[e]).length>0},se.contains=function(e,t){return(e.ownerDocument||e)!==p&&f(e),b(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!==p&&f(e);var i=r.attrHandle[t.toLowerCase()],o=i&&z.call(r.attrHandle,t.toLowerCase())?i(e,t,!v):void 0;return void 0!==o?o:n.attributes||!v?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},se.escape=function(e){return(e+"").replace(re,ie)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,r=[],i=0,o=0;if(d=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(O),d){for(;t=e[o++];)t===e[o]&&(i=r.push(o));for(;i--;)e.splice(r[i],1)}return c=null,e},i=se.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=i(t);return n},(r=se.selectors={cacheLength:50,createPseudo:le,match:Y,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return Y.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&V.test(n)&&(t=a(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=k[e+" "];return t||(t=new RegExp("(^|"+I+")"+e+"("+I+"|$)"))&&k(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(r){var i=se.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(H," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,d,f,p,h,v=o!==a?"nextSibling":"previousSibling",m=t.parentNode,g=s&&t.nodeName.toLowerCase(),y=!u&&!s,b=!1;if(m){if(o){for(;v;){for(f=t;f=f[v];)if(s?f.nodeName.toLowerCase()===g:1===f.nodeType)return!1;h=v="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&y){for(b=(p=(l=(c=(d=(f=m)[w]||(f[w]={}))[f.uniqueID]||(d[f.uniqueID]={}))[e]||[])[0]===T&&l[1])&&l[2],f=p&&m.childNodes[p];f=++p&&f&&f[v]||(b=p=0)||h.pop();)if(1===f.nodeType&&++b&&f===t){c[e]=[T,p,b];break}}else if(y&&(b=p=(l=(c=(d=(f=t)[w]||(f[w]={}))[f.uniqueID]||(d[f.uniqueID]={}))[e]||[])[0]===T&&l[1]),!1===b)for(;(f=++p&&f&&f[v]||(b=p=0)||h.pop())&&((s?f.nodeName.toLowerCase()!==g:1!==f.nodeType)||!++b||(y&&((c=(d=f[w]||(f[w]={}))[f.uniqueID]||(d[f.uniqueID]={}))[e]=[T,b]),f!==t)););return(b-=i)===r||b%r==0&&b/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return i[w]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?le((function(e,n){for(var r,o=i(e,t),a=o.length;a--;)e[r=P(e,o[a])]=!(n[r]=o[a])})):function(e){return i(e,0,n)}):i}},pseudos:{not:le((function(e){var t=[],n=[],r=s(e.replace(F,"$1"));return r[w]?le((function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))})):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}})),has:le((function(e){return function(t){return se(e,t).length>0}})),contains:le((function(e){return e=e.replace(te,ne),function(t){return(t.textContent||i(t)).indexOf(e)>-1}})),lang:le((function(e){return Z.test(e||"")||se.error("unsupported lang: "+e),e=e.replace(te,ne).toLowerCase(),function(t){var n;do{if(n=v?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===h},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ve(!1),disabled:ve(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return Q.test(e.nodeName)},input:function(e){return G.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:me((function(){return[0]})),last:me((function(e,t){return[t-1]})),eq:me((function(e,t,n){return[n<0?n+t:n]})),even:me((function(e,t){for(var n=0;nt?t:n;--r>=0;)e.push(r);return e})),gt:me((function(e,t,n){for(var r=n<0?n+t:n;++r1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function Te(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s-1&&(o[l]=!(a[l]=d))}}else g=Te(g===a?g.splice(h,g.length):g),i?i(null,a,g,u):L.apply(a,g)}))}function ke(e){for(var t,n,i,o=e.length,a=r.relative[e[0].type],s=a||r.relative[" "],u=a?1:0,c=we((function(e){return e===t}),s,!0),d=we((function(e){return P(t,e)>-1}),s,!0),f=[function(e,n,r){var i=!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):d(e,n,r));return t=null,i}];u1&&xe(f),u>1&&be(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(F,"$1"),n,u0,i=e.length>0,o=function(o,a,s,u,c){var d,h,m,g=0,y="0",b=o&&[],w=[],x=l,_=o||i&&r.find.TAG("*",c),k=T+=null==x?1:Math.random()||.1,C=_.length;for(c&&(l=a===p||a||c);y!==C&&null!=(d=_[y]);y++){if(i&&d){for(h=0,a||d.ownerDocument===p||(f(d),s=!v);m=e[h++];)if(m(d,a||p,s)){u.push(d);break}c&&(T=k)}n&&((d=!m&&d)&&g--,o&&b.push(d))}if(g+=y,n&&y!==g){for(h=0;m=t[h++];)m(b,w,a,s);if(o){if(g>0)for(;y--;)b[y]||w[y]||(w[y]=E.call(u));w=Te(w)}L.apply(u,w),c&&!o&&w.length>0&&g+t.length>1&&se.uniqueSort(u)}return c&&(T=k,l=x),b};return n?le(o):o}(o,i))).selector=e}return s},u=se.select=function(e,t,n,i){var o,u,l,c,d,f="function"==typeof e&&e,p=!i&&a(e=f.selector||e);if(n=n||[],1===p.length){if((u=p[0]=p[0].slice(0)).length>2&&"ID"===(l=u[0]).type&&9===t.nodeType&&v&&r.relative[u[1].type]){if(!(t=(r.find.ID(l.matches[0].replace(te,ne),t)||[])[0]))return n;f&&(t=t.parentNode),e=e.slice(u.shift().value.length)}for(o=Y.needsContext.test(e)?0:u.length;o--&&(l=u[o],!r.relative[c=l.type]);)if((d=r.find[c])&&(i=d(l.matches[0].replace(te,ne),ee.test(u[0].type)&&ge(t.parentNode)||t))){if(u.splice(o,1),!(e=i.length&&be(u)))return L.apply(n,i),n;break}}return(f||s(e,p))(i,t,!v,n,!t||ee.test(e)&&ge(t.parentNode)||t),n},n.sortStable=w.split("").sort(O).join("")===w,n.detectDuplicates=!!d,f(),n.sortDetached=ce((function(e){return 1&e.compareDocumentPosition(p.createElement("fieldset"))})),ce((function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")}))||de("type|href|height|width",(function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),n.attributes&&ce((function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||de("value",(function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),ce((function(e){return null==e.getAttribute("disabled")}))||de(j,(function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null})),se}(n);_.find=S,_.expr=S.selectors,_.expr[":"]=_.expr.pseudos,_.uniqueSort=_.unique=S.uniqueSort,_.text=S.getText,_.isXMLDoc=S.isXML,_.contains=S.contains,_.escapeSelector=S.escape;var A=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&_(e).is(n))break;r.push(e)}return r},O=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},z=_.expr.match.needsContext;function $(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var E=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,t,n){return y(t)?_.grep(e,(function(e,r){return!!t.call(e,r,e)!==n})):t.nodeType?_.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?_.grep(e,(function(e){return d.call(t,e)>-1!==n})):_.filter(t,e,n)}_.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?_.find.matchesSelector(r,e)?[r]:[]:_.find.matches(e,_.grep(t,(function(e){return 1===e.nodeType})))},_.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(_(e).filter((function(){for(t=0;t1?_.uniqueSort(n):n},filter:function(e){return this.pushStack(D(this,e||[],!1))},not:function(e){return this.pushStack(D(this,e||[],!0))},is:function(e){return!!D(this,"string"==typeof e&&z.test(e)?_(e):e||[],!1).length}});var L,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(_.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||L,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:N.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof _?t[0]:t,_.merge(this,_.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:a,!0)),E.test(r[1])&&_.isPlainObject(t))for(r in t)y(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=a.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):y(e)?void 0!==n.ready?n.ready(e):e(_):_.makeArray(e,this)}).prototype=_.fn,L=_(a);var P=/^(?:parents|prev(?:Until|All))/,j={children:!0,contents:!0,next:!0,prev:!0};function I(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}_.fn.extend({has:function(e){var t=_(e,this),n=t.length;return this.filter((function(){for(var e=0;e-1:1===n.nodeType&&_.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?_.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?d.call(_(e),this[0]):d.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(_.uniqueSort(_.merge(this.get(),_(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),_.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return A(e,"parentNode")},parentsUntil:function(e,t,n){return A(e,"parentNode",n)},next:function(e){return I(e,"nextSibling")},prev:function(e){return I(e,"previousSibling")},nextAll:function(e){return A(e,"nextSibling")},prevAll:function(e){return A(e,"previousSibling")},nextUntil:function(e,t,n){return A(e,"nextSibling",n)},prevUntil:function(e,t,n){return A(e,"previousSibling",n)},siblings:function(e){return O((e.parentNode||{}).firstChild,e)},children:function(e){return O(e.firstChild)},contents:function(e){return void 0!==e.contentDocument?e.contentDocument:($(e,"template")&&(e=e.content||e),_.merge([],e.childNodes))}},(function(e,t){_.fn[e]=function(n,r){var i=_.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=_.filter(r,i)),this.length>1&&(j[e]||_.uniqueSort(i),P.test(e)&&i.reverse()),this.pushStack(i)}}));var M=/[^\x20\t\r\n\f]+/g;function R(e){return e}function W(e){throw e}function H(e,t,n,r){var i;try{e&&y(i=e.promise)?i.call(e).done(t).fail(n):e&&y(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}_.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return _.each(e.match(M)||[],(function(e,n){t[n]=!0})),t}(e):_.extend({},e);var t,n,r,i,o=[],a=[],s=-1,u=function(){for(i=i||e.once,r=t=!0;a.length;s=-1)for(n=a.shift();++s-1;)o.splice(n,1),n<=s&&s--})),this},has:function(e){return e?_.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l},_.extend({Deferred:function(e){var t=[["notify","progress",_.Callbacks("memory"),_.Callbacks("memory"),2],["resolve","done",_.Callbacks("once memory"),_.Callbacks("once memory"),0,"resolved"],["reject","fail",_.Callbacks("once memory"),_.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return _.Deferred((function(n){_.each(t,(function(t,r){var i=y(e[r[4]])&&e[r[4]];o[r[1]]((function(){var e=i&&i.apply(this,arguments);e&&y(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[e]:arguments)}))})),e=null})).promise()},then:function(e,r,i){var o=0;function a(e,t,r,i){return function(){var s=this,u=arguments,l=function(){var n,l;if(!(e=o&&(r!==W&&(s=void 0,u=[n]),t.rejectWith(s,u))}};e?c():(_.Deferred.getStackHook&&(c.stackTrace=_.Deferred.getStackHook()),n.setTimeout(c))}}return _.Deferred((function(n){t[0][3].add(a(0,n,y(i)?i:R,n.notifyWith)),t[1][3].add(a(0,n,y(e)?e:R)),t[2][3].add(a(0,n,y(r)?r:W))})).promise()},promise:function(e){return null!=e?_.extend(e,i):i}},o={};return _.each(t,(function(e,n){var a=n[2],s=n[5];i[n[1]]=a.add,s&&a.add((function(){r=s}),t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),a.add(n[3].fire),o[n[0]]=function(){return o[n[0]+"With"](this===o?void 0:this,arguments),this},o[n[0]+"With"]=a.fireWith})),i.promise(o),e&&e.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=u.call(arguments),o=_.Deferred(),a=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?u.call(arguments):n,--t||o.resolveWith(r,i)}};if(t<=1&&(H(e,o.done(a(n)).resolve,o.reject,!t),"pending"===o.state()||y(i[n]&&i[n].then)))return o.then();for(;n--;)H(i[n],a(n),o.reject);return o.promise()}});var F=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;_.Deferred.exceptionHook=function(e,t){n.console&&n.console.warn&&e&&F.test(e.name)&&n.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},_.readyException=function(e){n.setTimeout((function(){throw e}))};var q=_.Deferred();function B(){a.removeEventListener("DOMContentLoaded",B),n.removeEventListener("load",B),_.ready()}_.fn.ready=function(e){return q.then(e).catch((function(e){_.readyException(e)})),this},_.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--_.readyWait:_.isReady)||(_.isReady=!0,!0!==e&&--_.readyWait>0||q.resolveWith(a,[_]))}}),_.ready.then=q.then,"complete"===a.readyState||"loading"!==a.readyState&&!a.documentElement.doScroll?n.setTimeout(_.ready):(a.addEventListener("DOMContentLoaded",B),n.addEventListener("load",B));var U=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===T(n))for(s in i=!0,n)U(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,y(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(_(e),n)})),t))for(;s1,null,!0)},removeData:function(e){return this.each((function(){K.remove(this,e)}))}}),_.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=J.get(e,t),n&&(!r||Array.isArray(n)?r=J.access(e,t,_.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=_.queue(e,t),r=n.length,i=n.shift(),o=_._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,(function(){_.dequeue(e,t)}),o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return J.get(e,n)||J.access(e,n,{empty:_.Callbacks("once memory").add((function(){J.remove(e,[t+"queue",n])}))})}}),_.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]*)/i,ge=/^$|^module$|\/(?:java|ecma)script/i,ye={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function be(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&$(e,t)?_.merge([e],n):n}function we(e,t){for(var n=0,r=e.length;n-1)i&&i.push(o);else if(l=se(o),a=be(d.appendChild(o),"script"),l&&we(a),n)for(c=0;o=a[c++];)ge.test(o.type||"")&&n.push(o);return d}xe=a.createDocumentFragment().appendChild(a.createElement("div")),(Te=a.createElement("input")).setAttribute("type","radio"),Te.setAttribute("checked","checked"),Te.setAttribute("name","t"),xe.appendChild(Te),g.checkClone=xe.cloneNode(!0).cloneNode(!0).lastChild.checked,xe.innerHTML="",g.noCloneChecked=!!xe.cloneNode(!0).lastChild.defaultValue;var Ce=/^key/,Se=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ae=/^([^.]*)(?:\.(.+)|)/;function Oe(){return!0}function ze(){return!1}function $e(e,t){return e===function(){try{return a.activeElement}catch(e){}}()==("focus"===t)}function Ee(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ee(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=ze;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return _().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=_.guid++)),e.each((function(){_.event.add(this,t,i,r,n)}))}function De(e,t,n){n?(J.set(e,t,!1),_.event.add(e,t,{namespace:!1,handler:function(e){var r,i,o=J.get(this,t);if(1&e.isTrigger&&this[t]){if(o.length)(_.event.special[t]||{}).delegateType&&e.stopPropagation();else if(o=u.call(arguments),J.set(this,t,o),r=n(this,t),this[t](),o!==(i=J.get(this,t))||r?J.set(this,t,!1):i={},o!==i)return e.stopImmediatePropagation(),e.preventDefault(),i.value}else o.length&&(J.set(this,t,{value:_.event.trigger(_.extend(o[0],_.Event.prototype),o.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===J.get(e,t)&&_.event.add(e,t,Oe)}_.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,d,f,p,h,v,m=J.get(e);if(m)for(n.handler&&(n=(o=n).handler,i=o.selector),i&&_.find.matchesSelector(ae,i),n.guid||(n.guid=_.guid++),(u=m.events)||(u=m.events={}),(a=m.handle)||(a=m.handle=function(t){return void 0!==_&&_.event.triggered!==t.type?_.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(M)||[""]).length;l--;)p=v=(s=Ae.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),p&&(d=_.event.special[p]||{},p=(i?d.delegateType:d.bindType)||p,d=_.event.special[p]||{},c=_.extend({type:p,origType:v,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&_.expr.match.needsContext.test(i),namespace:h.join(".")},o),(f=u[p])||((f=u[p]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(p,a)),d.add&&(d.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?f.splice(f.delegateCount++,0,c):f.push(c),_.event.global[p]=!0)},remove:function(e,t,n,r,i){var o,a,s,u,l,c,d,f,p,h,v,m=J.hasData(e)&&J.get(e);if(m&&(u=m.events)){for(l=(t=(t||"").match(M)||[""]).length;l--;)if(p=v=(s=Ae.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),p){for(d=_.event.special[p]||{},f=u[p=(r?d.delegateType:d.bindType)||p]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=f.length;o--;)c=f[o],!i&&v!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(f.splice(o,1),c.selector&&f.delegateCount--,d.remove&&d.remove.call(e,c));a&&!f.length&&(d.teardown&&!1!==d.teardown.call(e,h,m.handle)||_.removeEvent(e,p,m.handle),delete u[p])}else for(p in u)_.event.remove(e,p+t[l],n,r,!0);_.isEmptyObject(u)&&J.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=_.event.fix(e),u=new Array(arguments.length),l=(J.get(this,"events")||{})[s.type]||[],c=_.event.special[s.type]||{};for(u[0]=s,t=1;t=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n-1:_.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u\x20\t\r\n\f]*)[^>]*)\/>/gi,Ne=/\s*$/g;function Ie(e,t){return $(e,"table")&&$(11!==t.nodeType?t:t.firstChild,"tr")&&_(e).children("tbody")[0]||e}function Me(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Re(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function We(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(J.hasData(e)&&(o=J.access(e),a=J.set(t,o),l=o.events))for(i in delete a.handle,a.events={},l)for(n=0,r=l[i].length;n1&&"string"==typeof h&&!g.checkClone&&Pe.test(h))return e.each((function(i){var o=e.eq(i);v&&(t[0]=h.call(this,i,o.html())),Fe(o,t,n,r)}));if(f&&(o=(i=ke(t,e[0].ownerDocument,!1,e,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(s=(a=_.map(be(i,"script"),Me)).length;d")},clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),u=se(e);if(!(g.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||_.isXMLDoc(e)))for(a=be(s),r=0,i=(o=be(e)).length;r0&&we(a,!u&&be(e,"script")),s},cleanData:function(e){for(var t,n,r,i=_.event.special,o=0;void 0!==(n=e[o]);o++)if(G(n)){if(t=n[J.expando]){if(t.events)for(r in t.events)i[r]?_.event.remove(n,r):_.removeEvent(n,r,t.handle);n[J.expando]=void 0}n[K.expando]&&(n[K.expando]=void 0)}}}),_.fn.extend({detach:function(e){return qe(this,e,!0)},remove:function(e){return qe(this,e)},text:function(e){return U(this,(function(e){return void 0===e?_.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return Fe(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Ie(this,e).appendChild(e)}))},prepend:function(){return Fe(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Ie(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return Fe(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return Fe(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(_.cleanData(be(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return _.clone(this,e,t)}))},html:function(e){return U(this,(function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ne.test(e)&&!ye[(me.exec(e)||["",""])[1].toLowerCase()]){e=_.htmlPrefilter(e);try{for(;n=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u}function ot(e,t,n){var r=Ue(e),i=(!g.boxSizingReliable()||n)&&"border-box"===_.css(e,"boxSizing",!1,r),o=i,a=Ze(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Be.test(a)){if(!n)return a;a="auto"}return(!g.boxSizingReliable()&&i||"auto"===a||!parseFloat(a)&&"inline"===_.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===_.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+it(e,t,n||(i?"border":"content"),o,r,a)+"px"}function at(e,t,n,r,i){return new at.prototype.init(e,t,n,r,i)}_.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ze(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=X(t),u=et.test(t),l=e.style;if(u||(t=Je(s)),a=_.cssHooks[t]||_.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"===(o=typeof n)&&(i=ie.exec(n))&&i[1]&&(n=de(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(_.cssNumber[s]?"":"px")),g.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=X(t);return et.test(t)||(t=Je(s)),(a=_.cssHooks[t]||_.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Ze(e,t,r)),"normal"===i&&t in nt&&(i=nt[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),_.each(["height","width"],(function(e,t){_.cssHooks[t]={get:function(e,n,r){if(n)return!Ke.test(_.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?ot(e,t,r):ce(e,tt,(function(){return ot(e,t,r)}))},set:function(e,n,r){var i,o=Ue(e),a=!g.scrollboxSize()&&"absolute"===o.position,s=(a||r)&&"border-box"===_.css(e,"boxSizing",!1,o),u=r?it(e,t,r,s,o):0;return s&&a&&(u-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-it(e,t,"border",!1,o)-.5)),u&&(i=ie.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=_.css(e,t)),rt(0,n,u)}}})),_.cssHooks.marginLeft=Ye(g.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(Ze(e,"marginLeft"))||e.getBoundingClientRect().left-ce(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),_.each({margin:"",padding:"",border:"Width"},(function(e,t){_.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+oe[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(_.cssHooks[e+t].set=rt)})),_.fn.extend({css:function(e,t){return U(this,(function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Ue(e),i=t.length;a1)}}),_.Tween=at,at.prototype={constructor:at,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||_.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(_.cssNumber[n]?"":"px")},cur:function(){var e=at.propHooks[this.prop];return e&&e.get?e.get(this):at.propHooks._default.get(this)},run:function(e){var t,n=at.propHooks[this.prop];return this.options.duration?this.pos=t=_.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):at.propHooks._default.set(this),this}},at.prototype.init.prototype=at.prototype,at.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=_.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){_.fx.step[e.prop]?_.fx.step[e.prop](e):1!==e.elem.nodeType||!_.cssHooks[e.prop]&&null==e.elem.style[Je(e.prop)]?e.elem[e.prop]=e.now:_.style(e.elem,e.prop,e.now+e.unit)}}},at.propHooks.scrollTop=at.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},_.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},_.fx=at.prototype.init,_.fx.step={};var st,ut,lt=/^(?:toggle|show|hide)$/,ct=/queueHooks$/;function dt(){ut&&(!1===a.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(dt):n.setTimeout(dt,_.fx.interval),_.fx.tick())}function ft(){return n.setTimeout((function(){st=void 0})),st=Date.now()}function pt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=oe[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function ht(e,t,n){for(var r,i=(vt.tweeners[t]||[]).concat(vt.tweeners["*"]),o=0,a=i.length;o1)},removeAttr:function(e){return this.each((function(){_.removeAttr(this,e)}))}}),_.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?_.prop(e,t,n):(1===o&&_.isXMLDoc(e)||(i=_.attrHooks[t.toLowerCase()]||(_.expr.match.bool.test(t)?mt:void 0)),void 0!==n?null===n?void _.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=_.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!g.radioValue&&"radio"===t&&$(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(M);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),mt={set:function(e,t,n){return!1===t?_.removeAttr(e,n):e.setAttribute(n,n),n}},_.each(_.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=gt[t]||_.find.attr;gt[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=gt[a],gt[a]=i,i=null!=n(e,t,r)?a:null,gt[a]=o),i}}));var yt=/^(?:input|select|textarea|button)$/i,bt=/^(?:a|area)$/i;function wt(e){return(e.match(M)||[]).join(" ")}function xt(e){return e.getAttribute&&e.getAttribute("class")||""}function Tt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(M)||[]}_.fn.extend({prop:function(e,t){return U(this,_.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[_.propFix[e]||e]}))}}),_.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&_.isXMLDoc(e)||(t=_.propFix[t]||t,i=_.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=_.find.attr(e,"tabindex");return t?parseInt(t,10):yt.test(e.nodeName)||bt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),g.optSelected||(_.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),_.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){_.propFix[this.toLowerCase()]=this})),_.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(y(e))return this.each((function(t){_(this).addClass(e.call(this,t,xt(this)))}));if((t=Tt(e)).length)for(;n=this[u++];)if(i=xt(n),r=1===n.nodeType&&" "+wt(i)+" "){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=wt(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(y(e))return this.each((function(t){_(this).removeClass(e.call(this,t,xt(this)))}));if(!arguments.length)return this.attr("class","");if((t=Tt(e)).length)for(;n=this[u++];)if(i=xt(n),r=1===n.nodeType&&" "+wt(i)+" "){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");i!==(s=wt(r))&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):y(e)?this.each((function(n){_(this).toggleClass(e.call(this,n,xt(this),t),t)})):this.each((function(){var t,i,o,a;if(r)for(i=0,o=_(this),a=Tt(e);t=a[i++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else void 0!==e&&"boolean"!==n||((t=xt(this))&&J.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":J.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+wt(xt(n))+" ").indexOf(t)>-1)return!0;return!1}});var _t=/\r/g;_.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=y(e),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,_(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=_.map(i,(function(e){return null==e?"":e+""}))),(t=_.valHooks[this.type]||_.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))}))):i?(t=_.valHooks[i.type]||_.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(_t,""):null==n?"":n:void 0}}),_.extend({valHooks:{option:{get:function(e){var t=_.find.attr(e,"value");return null!=t?t:wt(_.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),_.each(["radio","checkbox"],(function(){_.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=_.inArray(_(e).val(),t)>-1}},g.checkOn||(_.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})})),g.focusin="onfocusin"in n;var kt=/^(?:focusinfocus|focusoutblur)$/,Ct=function(e){e.stopPropagation()};_.extend(_.event,{trigger:function(e,t,r,i){var o,s,u,l,c,d,f,p,v=[r||a],m=h.call(e,"type")?e.type:e,g=h.call(e,"namespace")?e.namespace.split("."):[];if(s=p=u=r=r||a,3!==r.nodeType&&8!==r.nodeType&&!kt.test(m+_.event.triggered)&&(m.indexOf(".")>-1&&(g=m.split("."),m=g.shift(),g.sort()),c=m.indexOf(":")<0&&"on"+m,(e=e[_.expando]?e:new _.Event(m,"object"==typeof e&&e)).isTrigger=i?2:3,e.namespace=g.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=r),t=null==t?[e]:_.makeArray(t,[e]),f=_.event.special[m]||{},i||!f.trigger||!1!==f.trigger.apply(r,t))){if(!i&&!f.noBubble&&!b(r)){for(l=f.delegateType||m,kt.test(l+m)||(s=s.parentNode);s;s=s.parentNode)v.push(s),u=s;u===(r.ownerDocument||a)&&v.push(u.defaultView||u.parentWindow||n)}for(o=0;(s=v[o++])&&!e.isPropagationStopped();)p=s,e.type=o>1?l:f.bindType||m,(d=(J.get(s,"events")||{})[e.type]&&J.get(s,"handle"))&&d.apply(s,t),(d=c&&s[c])&&d.apply&&G(s)&&(e.result=d.apply(s,t),!1===e.result&&e.preventDefault());return e.type=m,i||e.isDefaultPrevented()||f._default&&!1!==f._default.apply(v.pop(),t)||!G(r)||c&&y(r[m])&&!b(r)&&((u=r[c])&&(r[c]=null),_.event.triggered=m,e.isPropagationStopped()&&p.addEventListener(m,Ct),r[m](),e.isPropagationStopped()&&p.removeEventListener(m,Ct),_.event.triggered=void 0,u&&(r[c]=u)),e.result}},simulate:function(e,t,n){var r=_.extend(new _.Event,n,{type:e,isSimulated:!0});_.event.trigger(r,null,t)}}),_.fn.extend({trigger:function(e,t){return this.each((function(){_.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return _.event.trigger(e,t,n,!0)}}),g.focusin||_.each({focus:"focusin",blur:"focusout"},(function(e,t){var n=function(e){_.event.simulate(t,e.target,_.event.fix(e))};_.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=J.access(r,t);i||r.addEventListener(e,n,!0),J.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=J.access(r,t)-1;i?J.access(r,t,i):(r.removeEventListener(e,n,!0),J.remove(r,t))}}}));var St=n.location,At=Date.now(),Ot=/\?/;_.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||_.error("Invalid XML: "+e),t};var zt=/\[\]$/,$t=/\r?\n/g,Et=/^(?:submit|button|image|reset|file)$/i,Dt=/^(?:input|select|textarea|keygen)/i;function Lt(e,t,n,r){var i;if(Array.isArray(t))_.each(t,(function(t,i){n||zt.test(e)?r(e,i):Lt(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)}));else if(n||"object"!==T(t))r(e,t);else for(i in t)Lt(e+"["+i+"]",t[i],n,r)}_.param=function(e,t){var n,r=[],i=function(e,t){var n=y(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!_.isPlainObject(e))_.each(e,(function(){i(this.name,this.value)}));else for(n in e)Lt(n,e[n],t,i);return r.join("&")},_.fn.extend({serialize:function(){return _.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=_.prop(this,"elements");return e?_.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!_(this).is(":disabled")&&Dt.test(this.nodeName)&&!Et.test(e)&&(this.checked||!ve.test(e))})).map((function(e,t){var n=_(this).val();return null==n?null:Array.isArray(n)?_.map(n,(function(e){return{name:t.name,value:e.replace($t,"\r\n")}})):{name:t.name,value:n.replace($t,"\r\n")}})).get()}});var Nt=/%20/g,Pt=/#.*$/,jt=/([?&])_=[^&]*/,It=/^(.*?):[ \t]*([^\r\n]*)$/gm,Mt=/^(?:GET|HEAD)$/,Rt=/^\/\//,Wt={},Ht={},Ft="*/".concat("*"),qt=a.createElement("a");function Bt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(M)||[];if(y(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Ut(e,t,n,r){var i={},o=e===Ht;function a(s){var u;return i[s]=!0,_.each(e[s]||[],(function(e,s){var l=s(t,n,r);return"string"!=typeof l||o||i[l]?o?!(u=l):void 0:(t.dataTypes.unshift(l),a(l),!1)})),u}return a(t.dataTypes[0])||!i["*"]&&a("*")}function Vt(e,t){var n,r,i=_.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&_.extend(!0,e,r),e}qt.href=St.href,_.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:St.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(St.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ft,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":_.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Vt(Vt(e,_.ajaxSettings),t):Vt(_.ajaxSettings,e)},ajaxPrefilter:Bt(Wt),ajaxTransport:Bt(Ht),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var r,i,o,s,u,l,c,d,f,p,h=_.ajaxSetup({},t),v=h.context||h,m=h.context&&(v.nodeType||v.jquery)?_(v):_.event,g=_.Deferred(),y=_.Callbacks("once memory"),b=h.statusCode||{},w={},x={},T="canceled",k={readyState:0,getResponseHeader:function(e){var t;if(c){if(!s)for(s={};t=It.exec(o);)s[t[1].toLowerCase()+" "]=(s[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=s[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return c?o:null},setRequestHeader:function(e,t){return null==c&&(e=x[e.toLowerCase()]=x[e.toLowerCase()]||e,w[e]=t),this},overrideMimeType:function(e){return null==c&&(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)k.always(e[k.status]);else for(t in e)b[t]=[b[t],e[t]];return this},abort:function(e){var t=e||T;return r&&r.abort(t),C(0,t),this}};if(g.promise(k),h.url=((e||h.url||St.href)+"").replace(Rt,St.protocol+"//"),h.type=t.method||t.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(M)||[""],null==h.crossDomain){l=a.createElement("a");try{l.href=h.url,l.href=l.href,h.crossDomain=qt.protocol+"//"+qt.host!=l.protocol+"//"+l.host}catch(e){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=_.param(h.data,h.traditional)),Ut(Wt,h,t,k),c)return k;for(f in(d=_.event&&h.global)&&0==_.active++&&_.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Mt.test(h.type),i=h.url.replace(Pt,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(Nt,"+")):(p=h.url.slice(i.length),h.data&&(h.processData||"string"==typeof h.data)&&(i+=(Ot.test(i)?"&":"?")+h.data,delete h.data),!1===h.cache&&(i=i.replace(jt,"$1"),p=(Ot.test(i)?"&":"?")+"_="+At+++p),h.url=i+p),h.ifModified&&(_.lastModified[i]&&k.setRequestHeader("If-Modified-Since",_.lastModified[i]),_.etag[i]&&k.setRequestHeader("If-None-Match",_.etag[i])),(h.data&&h.hasContent&&!1!==h.contentType||t.contentType)&&k.setRequestHeader("Content-Type",h.contentType),k.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+Ft+"; q=0.01":""):h.accepts["*"]),h.headers)k.setRequestHeader(f,h.headers[f]);if(h.beforeSend&&(!1===h.beforeSend.call(v,k,h)||c))return k.abort();if(T="abort",y.add(h.complete),k.done(h.success),k.fail(h.error),r=Ut(Ht,h,t,k)){if(k.readyState=1,d&&m.trigger("ajaxSend",[k,h]),c)return k;h.async&&h.timeout>0&&(u=n.setTimeout((function(){k.abort("timeout")}),h.timeout));try{c=!1,r.send(w,C)}catch(e){if(c)throw e;C(-1,e)}}else C(-1,"No Transport");function C(e,t,a,s){var l,f,p,w,x,T=t;c||(c=!0,u&&n.clearTimeout(u),r=void 0,o=s||"",k.readyState=e>0?4:0,l=e>=200&&e<300||304===e,a&&(w=function(e,t,n){for(var r,i,o,a,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(h,k,a)),w=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(h,w,k,l),l?(h.ifModified&&((x=k.getResponseHeader("Last-Modified"))&&(_.lastModified[i]=x),(x=k.getResponseHeader("etag"))&&(_.etag[i]=x)),204===e||"HEAD"===h.type?T="nocontent":304===e?T="notmodified":(T=w.state,f=w.data,l=!(p=w.error))):(p=T,!e&&T||(T="error",e<0&&(e=0))),k.status=e,k.statusText=(t||T)+"",l?g.resolveWith(v,[f,T,k]):g.rejectWith(v,[k,T,p]),k.statusCode(b),b=void 0,d&&m.trigger(l?"ajaxSuccess":"ajaxError",[k,h,l?f:p]),y.fireWith(v,[k,T]),d&&(m.trigger("ajaxComplete",[k,h]),--_.active||_.event.trigger("ajaxStop")))}return k},getJSON:function(e,t,n){return _.get(e,t,n,"json")},getScript:function(e,t){return _.get(e,void 0,t,"script")}}),_.each(["get","post"],(function(e,t){_[t]=function(e,n,r,i){return y(n)&&(i=i||r,r=n,n=void 0),_.ajax(_.extend({url:e,type:t,dataType:i,data:n,success:r},_.isPlainObject(e)&&e))}})),_._evalUrl=function(e,t){return _.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){_.globalEval(e,t)}})},_.fn.extend({wrapAll:function(e){var t;return this[0]&&(y(e)&&(e=e.call(this[0])),t=_(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return y(e)?this.each((function(t){_(this).wrapInner(e.call(this,t))})):this.each((function(){var t=_(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=y(e);return this.each((function(n){_(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){_(this).replaceWith(this.childNodes)})),this}}),_.expr.pseudos.hidden=function(e){return!_.expr.pseudos.visible(e)},_.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},_.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var Zt={0:200,1223:204},Yt=_.ajaxSettings.xhr();g.cors=!!Yt&&"withCredentials"in Yt,g.ajax=Yt=!!Yt,_.ajaxTransport((function(e){var t,r;if(g.cors||Yt&&!e.crossDomain)return{send:function(i,o){var a,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)s[a]=e.xhrFields[a];for(a in e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)s.setRequestHeader(a,i[a]);t=function(e){return function(){t&&(t=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(Zt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=t(),r=s.onerror=s.ontimeout=t("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&n.setTimeout((function(){t&&r()}))},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}})),_.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),_.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return _.globalEval(e),e}}}),_.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),_.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,i){t=_("