From 3605f256d7c785d771e669d8634fcd946eb2b159 Mon Sep 17 00:00:00 2001 From: Sam Wilson Date: Thu, 20 Dec 2018 13:45:27 -0800 Subject: [PATCH] Add zoom and pan to image (with Leaflet) Add the image as a Leaflet layer as an easy way to get zooming and panning, and perhaps at some future point to have highlight of current field. Bug: T211373 --- .eslintrc.js | 1 + assets/translate.js | 29 +++++- assets/translate.less | 5 + package-lock.json | 94 +++++++++++++----- package.json | 1 + .../{app.90090d0b.js => app.46f9a275.js} | 25 +++-- .../{app.ceef9aa0.css => app.771d641e.css} | 2 +- public/assets/entrypoints.json | 4 +- public/assets/images/layers-2x.4f0283c6.png | Bin 0 -> 1259 bytes public/assets/images/layers.a6137456.png | Bin 0 -> 696 bytes public/assets/images/marker-icon.2273e3d8.png | Bin 0 -> 1466 bytes public/assets/manifest.json | 7 +- templates/translate.html.twig | 2 +- webpack.config.js | 4 + 14 files changed, 133 insertions(+), 41 deletions(-) rename public/assets/{app.90090d0b.js => app.46f9a275.js} (64%) rename public/assets/{app.ceef9aa0.css => app.771d641e.css} (94%) create mode 100644 public/assets/images/layers-2x.4f0283c6.png create mode 100644 public/assets/images/layers.a6137456.png create mode 100644 public/assets/images/marker-icon.2273e3d8.png diff --git a/.eslintrc.js b/.eslintrc.js index 25dfe9a1..0f1c35e0 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -4,6 +4,7 @@ module.exports = { "App": false, "appConfig": false, "OO": false, + "L": false, "$": false, "window": false, "global": false, diff --git a/assets/translate.js b/assets/translate.js index d7b90d80..6f4bcd52 100644 --- a/assets/translate.js +++ b/assets/translate.js @@ -99,7 +99,7 @@ $( function () { $( function () { $( '.translation-fields .oo-ui-fieldLayout .oo-ui-inputWidget' ).each( function () { var inputWiget = OO.ui.infuse( $( this ) ), - $imgElement = $( '.image img' ), + $imgElement = $( '#translation-image' ), targetLangWidget = OO.ui.infuse( $( '.target-lang-widget' ) ), targetLangCode = targetLangWidget.getValue(), requestParams = {}, @@ -116,7 +116,7 @@ $( function () { url: appConfig.baseUrl + 'api/translate/' + $imgElement.data( 'filename' ) + '/' + targetLangCode, data: requestParams, success: function ( result ) { - $imgElement.attr( 'src', result.imageSrc ); + appConfig.imageMapLayer.setUrl( result.imageSrc ); }, error: function () { OO.ui.alert( $.i18n( 'preview-error-occurred' ) ); @@ -134,3 +134,28 @@ $( function () { // on page load (to catch browser-cached input values). $( '.translation-fields .oo-ui-fieldLayout .oo-ui-inputWidget input:first' ).trigger( 'blur' ); } ); + +/** + * Add LeafletJS to image, for zooming and panning. + */ +$( function () { + var imagemap, $imageElement, + $imageWrapper = $( '#translation-image' ); + if ( $imageWrapper.length !== 1 ) { + // Don't do anything if the translation image isn't present. + return; + } + $imageElement = $imageWrapper.find( 'img' ); + $imageElement.css( 'visibility', 'hidden' ); + $imageWrapper.css( { + height: '80vh', + width: 'auto' + } ); + imagemap = L.map( $imageWrapper.attr( 'id' ), { + crs: L.CRS.Simple, + center: [ $imageElement.height() / 2, $imageElement.width() / 2 ], + zoom: 0 + } ); + appConfig.imageMapLayer = L.imageOverlay( $imageElement.attr( 'src' ), [ [ 0, 0 ], [ $imageElement.height(), $imageElement.width() ] ] ); + appConfig.imageMapLayer.addTo( imagemap ); +} ); diff --git a/assets/translate.less b/assets/translate.less index 26807a2d..62e5bad3 100644 --- a/assets/translate.less +++ b/assets/translate.less @@ -82,6 +82,11 @@ body.translate { margin: 0 1rem 0 0.8rem; } } + .leaflet-container, + .image { + border: 1px solid @wmui-color-base50; + background-color: white; + } img { margin-top: 1rem; max-width: 100%; diff --git a/package-lock.json b/package-lock.json index 87b942e3..30d0c414 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4019,7 +4019,8 @@ }, "ansi-regex": { "version": "2.1.1", - "bundled": true + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" }, "aproba": { "version": "1.2.0", @@ -4037,11 +4038,13 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" }, "brace-expansion": { "version": "1.1.11", - "bundled": true, + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -4054,15 +4057,18 @@ }, "code-point-at": { "version": "1.1.0", - "bundled": true + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" }, "concat-map": { "version": "0.0.1", - "bundled": true + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, "console-control-strings": { "version": "1.1.0", - "bundled": true + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" }, "core-util-is": { "version": "1.0.2", @@ -4165,7 +4171,8 @@ }, "inherits": { "version": "2.0.3", - "bundled": true + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, "ini": { "version": "1.3.5", @@ -4174,7 +4181,8 @@ }, "is-fullwidth-code-point": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "requires": { "number-is-nan": "^1.0.0" } @@ -4186,21 +4194,31 @@ }, "minimatch": { "version": "3.0.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "0.0.8", - "bundled": true + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" }, "minipass": { - "version": "2.3.5", - "bundled": true, + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.2.4.tgz", + "integrity": "sha512-hzXIWWet/BzWhYs2b+u7dRHlruXhwdgvlTMDKC6Cb1U7ps6Ac6yQlR39xsbjWJE377YTCtKwIXIpJ5oP+j5y8g==", "requires": { - "safe-buffer": "^5.1.2", + "safe-buffer": "^5.1.1", "yallist": "^3.0.0" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } } }, "minizlib": { @@ -4213,7 +4231,8 @@ }, "mkdirp": { "version": "0.5.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "requires": { "minimist": "0.0.8" } @@ -4286,7 +4305,8 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" }, "object-assign": { "version": "4.1.1", @@ -4295,7 +4315,8 @@ }, "once": { "version": "1.4.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "requires": { "wrappy": "1" } @@ -4370,8 +4391,9 @@ } }, "safe-buffer": { - "version": "5.1.2", - "bundled": true + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" }, "safer-buffer": { "version": "2.1.2", @@ -4400,7 +4422,8 @@ }, "string-width": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -4417,7 +4440,8 @@ }, "strip-ansi": { "version": "3.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "requires": { "ansi-regex": "^2.0.0" } @@ -4439,6 +4463,23 @@ "mkdirp": "^0.5.0", "safe-buffer": "^5.1.2", "yallist": "^3.0.2" + }, + "dependencies": { + "minipass": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.5.tgz", + "integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==", + "optional": true, + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } } }, "util-deprecate": { @@ -4456,11 +4497,13 @@ }, "wrappy": { "version": "1.0.2", - "bundled": true + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, "yallist": { - "version": "3.0.3", - "bundled": true + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.2.tgz", + "integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=" } } }, @@ -5497,6 +5540,11 @@ "invert-kv": "^1.0.0" } }, + "leaflet": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.4.0.tgz", + "integrity": "sha512-x9j9tGY1+PDLN9pcWTx9/y6C5nezoTMB8BLK5jTakx+H7bPlnbCHfi9Hjg+Qt36sgDz/cb9lrSpNQXmk45Tvhw==" + }, "less": { "version": "3.9.0", "resolved": "https://registry.npmjs.org/less/-/less-3.9.0.tgz", diff --git a/package.json b/package.json index fd18c259..d9923b33 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "jquery": "3.3", "jquery.uls": "0.1", "js-cookie": "2.2", + "leaflet": "1.4.0", "less": "3.9", "less-loader": "4.1", "oojs-ui": "0.30.2", diff --git a/public/assets/app.90090d0b.js b/public/assets/app.46f9a275.js similarity index 64% rename from public/assets/app.90090d0b.js rename to public/assets/app.46f9a275.js index 53a9ddcc..cda4ceae 100644 --- a/public/assets/app.90090d0b.js +++ b/public/assets/app.46f9a275.js @@ -1,4 +1,4 @@ -!function(t){var e={};function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="assets/",i(i.s=0)}({"/iRC":function(t,e,i){(function(t){!function(t){"use strict";var e={pluralRules:{ak:{one:"n = 0..1"},am:{one:"i = 0 or n = 1"},ar:{zero:"n = 0",one:"n = 1",two:"n = 2",few:"n % 100 = 3..10",many:"n % 100 = 11..99"},ars:{zero:"n = 0",one:"n = 1",two:"n = 2",few:"n % 100 = 3..10",many:"n % 100 = 11..99"},as:{one:"i = 0 or n = 1"},be:{one:"n % 10 = 1 and n % 100 != 11",few:"n % 10 = 2..4 and n % 100 != 12..14",many:"n % 10 = 0 or n % 10 = 5..9 or n % 100 = 11..14"},bh:{one:"n = 0..1"},bn:{one:"i = 0 or n = 1"},br:{one:"n % 10 = 1 and n % 100 != 11,71,91",two:"n % 10 = 2 and n % 100 != 12,72,92",few:"n % 10 = 3..4,9 and n % 100 != 10..19,70..79,90..99",many:"n != 0 and n % 1000000 = 0"},bs:{one:"v = 0 and i % 10 = 1 and i % 100 != 11 or f % 10 = 1 and f % 100 != 11",few:"v = 0 and i % 10 = 2..4 and i % 100 != 12..14 or f % 10 = 2..4 and f % 100 != 12..14"},cs:{one:"i = 1 and v = 0",few:"i = 2..4 and v = 0",many:"v != 0"},cy:{zero:"n = 0",one:"n = 1",two:"n = 2",few:"n = 3",many:"n = 6"},da:{one:"n = 1 or t != 0 and i = 0,1"},dsb:{one:"v = 0 and i % 100 = 1 or f % 100 = 1",two:"v = 0 and i % 100 = 2 or f % 100 = 2",few:"v = 0 and i % 100 = 3..4 or f % 100 = 3..4"},fa:{one:"i = 0 or n = 1"},ff:{one:"i = 0,1"},fil:{one:"v = 0 and i = 1,2,3 or v = 0 and i % 10 != 4,6,9 or v != 0 and f % 10 != 4,6,9"},fr:{one:"i = 0,1"},ga:{one:"n = 1",two:"n = 2",few:"n = 3..6",many:"n = 7..10"},gd:{one:"n = 1,11",two:"n = 2,12",few:"n = 3..10,13..19"},gu:{one:"i = 0 or n = 1"},guw:{one:"n = 0..1"},gv:{one:"v = 0 and i % 10 = 1",two:"v = 0 and i % 10 = 2",few:"v = 0 and i % 100 = 0,20,40,60,80",many:"v != 0"},he:{one:"i = 1 and v = 0",two:"i = 2 and v = 0",many:"v = 0 and n != 0..10 and n % 10 = 0"},hi:{one:"i = 0 or n = 1"},hr:{one:"v = 0 and i % 10 = 1 and i % 100 != 11 or f % 10 = 1 and f % 100 != 11",few:"v = 0 and i % 10 = 2..4 and i % 100 != 12..14 or f % 10 = 2..4 and f % 100 != 12..14"},hsb:{one:"v = 0 and i % 100 = 1 or f % 100 = 1",two:"v = 0 and i % 100 = 2 or f % 100 = 2",few:"v = 0 and i % 100 = 3..4 or f % 100 = 3..4"},hy:{one:"i = 0,1"},is:{one:"t = 0 and i % 10 = 1 and i % 100 != 11 or t != 0"},iu:{one:"n = 1",two:"n = 2"},iw:{one:"i = 1 and v = 0",two:"i = 2 and v = 0",many:"v = 0 and n != 0..10 and n % 10 = 0"},kab:{one:"i = 0,1"},kn:{one:"i = 0 or n = 1"},kw:{one:"n = 1",two:"n = 2"},lag:{zero:"n = 0",one:"i = 0,1 and n != 0"},ln:{one:"n = 0..1"},lt:{one:"n % 10 = 1 and n % 100 != 11..19",few:"n % 10 = 2..9 and n % 100 != 11..19",many:"f != 0"},lv:{zero:"n % 10 = 0 or n % 100 = 11..19 or v = 2 and f % 100 = 11..19",one:"n % 10 = 1 and n % 100 != 11 or v = 2 and f % 10 = 1 and f % 100 != 11 or v != 2 and f % 10 = 1"},mg:{one:"n = 0..1"},mk:{one:"v = 0 and i % 10 = 1 or f % 10 = 1"},mo:{one:"i = 1 and v = 0",few:"v != 0 or n = 0 or n != 1 and n % 100 = 1..19"},mr:{one:"i = 0 or n = 1"},mt:{one:"n = 1",few:"n = 0 or n % 100 = 2..10",many:"n % 100 = 11..19"},naq:{one:"n = 1",two:"n = 2"},nso:{one:"n = 0..1"},pa:{one:"n = 0..1"},pl:{one:"i = 1 and v = 0",few:"v = 0 and i % 10 = 2..4 and i % 100 != 12..14",many:"v = 0 and i != 1 and i % 10 = 0..1 or v = 0 and i % 10 = 5..9 or v = 0 and i % 100 = 12..14"},prg:{zero:"n % 10 = 0 or n % 100 = 11..19 or v = 2 and f % 100 = 11..19",one:"n % 10 = 1 and n % 100 != 11 or v = 2 and f % 10 = 1 and f % 100 != 11 or v != 2 and f % 10 = 1"},pt:{one:"i = 0..1"},ro:{one:"i = 1 and v = 0",few:"v != 0 or n = 0 or n != 1 and n % 100 = 1..19"},ru:{one:"v = 0 and i % 10 = 1 and i % 100 != 11",few:"v = 0 and i % 10 = 2..4 and i % 100 != 12..14",many:"v = 0 and i % 10 = 0 or v = 0 and i % 10 = 5..9 or v = 0 and i % 100 = 11..14"},se:{one:"n = 1",two:"n = 2"},sh:{one:"v = 0 and i % 10 = 1 and i % 100 != 11 or f % 10 = 1 and f % 100 != 11",few:"v = 0 and i % 10 = 2..4 and i % 100 != 12..14 or f % 10 = 2..4 and f % 100 != 12..14"},shi:{one:"i = 0 or n = 1",few:"n = 2..10"},si:{one:"n = 0,1 or i = 0 and f = 1"},sk:{one:"i = 1 and v = 0",few:"i = 2..4 and v = 0",many:"v != 0"},sl:{one:"v = 0 and i % 100 = 1",two:"v = 0 and i % 100 = 2",few:"v = 0 and i % 100 = 3..4 or v != 0"},sma:{one:"n = 1",two:"n = 2"},smi:{one:"n = 1",two:"n = 2"},smj:{one:"n = 1",two:"n = 2"},smn:{one:"n = 1",two:"n = 2"},sms:{one:"n = 1",two:"n = 2"},sr:{one:"v = 0 and i % 10 = 1 and i % 100 != 11 or f % 10 = 1 and f % 100 != 11",few:"v = 0 and i % 10 = 2..4 and i % 100 != 12..14 or f % 10 = 2..4 and f % 100 != 12..14"},ti:{one:"n = 0..1"},tl:{one:"v = 0 and i = 1,2,3 or v = 0 and i % 10 != 4,6,9 or v != 0 and f % 10 != 4,6,9"},tzm:{one:"n = 0..1 or n = 11..99"},uk:{one:"v = 0 and i % 10 = 1 and i % 100 != 11",few:"v = 0 and i % 10 = 2..4 and i % 100 != 12..14",many:"v = 0 and i % 10 = 0 or v = 0 and i % 10 = 5..9 or v = 0 and i % 100 = 11..14"},wa:{one:"n = 0..1"},zu:{one:"i = 0 or n = 1"}},convertPlural:function(e,i){var n,o,s,a,r=new RegExp("\\d+=","i");if(!i||0===i.length)return"";for(s=0;s0&&e-1 in t)}W.fn=W.prototype={jquery:"3.3.1",constructor:W,length:0,toArray:function(){return l.call(this)},get:function(t){return null==t?l.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=W.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return W.each(this,t)},map:function(t){return this.pushStack(W.map(this,function(e,i){return t.call(e,i,e)}))},slice:function(){return this.pushStack(l.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,i=+t+(t<0?e:0);return this.pushStack(i>=0&&i0&&e-1 in t)}E.fn=E.prototype={jquery:"3.3.1",constructor:E,length:0,toArray:function(){return l.call(this)},get:function(t){return null==t?l.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=E.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return E.each(this,t)},map:function(t){return this.pushStack(E.map(this,function(e,i){return t.call(e,i,e)}))},slice:function(){return this.pushStack(l.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,i=+t+(t<0?e:0);return this.pushStack(i>=0&&i+~]|"+O+")"+O+"*"),G=new RegExp("="+O+"*([^\\]'\"]*?)"+O+"*\\]","g"),j=new RegExp(z),V=new RegExp("^"+B+"$"),q={ID:new RegExp("^#("+B+")"),CLASS:new RegExp("^\\.("+B+")"),TAG:new RegExp("^("+B+"|[*])"),ATTR:new RegExp("^"+R),PSEUDO:new RegExp("^"+z),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+O+"*(even|odd|(([+-]|)(\\d*)n|)"+O+"*(?:([+-]|)"+O+"*(\\d+)|))"+O+"*\\)|)","i"),bool:new RegExp("^(?:"+F+")$","i"),needsContext:new RegExp("^"+O+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+O+"*((?:-\\d)?\\d*)"+O+"*\\)|)(?=[^-]|$)","i")},Q=/^(?:input|select|textarea|button)$/i,_=/^h\d$/i,X=/^[^{]+\{\s*\[native \w/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Y=/[+~]/,Z=new RegExp("\\\\([\\da-f]{1,6}"+O+"?|("+O+")|.)","ig"),tt=function(t,e,i){var n="0x"+e-65536;return n!=n||i?e:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)},et=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,it=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},nt=function(){d()},ot=bt(function(t){return!0===t.disabled&&("form"in t||"label"in t)},{dir:"parentNode",next:"legend"});try{A.apply(D=M.call(x.childNodes),x.childNodes),D[x.childNodes.length].nodeType}catch(t){A={apply:D.length?function(t,e){k.apply(t,M.call(e))}:function(t,e){for(var i=t.length,n=0;t[i++]=e[n++];);t.length=i-1}}}function st(t,e,n,o){var s,r,u,c,h,g,y,b=e&&e.ownerDocument,E=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==E&&9!==E&&11!==E)return n;if(!o&&((e?e.ownerDocument||e:x)!==p&&d(e),e=e||p,f)){if(11!==E&&(h=J.exec(t)))if(s=h[1]){if(9===E){if(!(u=e.getElementById(s)))return n;if(u.id===s)return n.push(u),n}else if(b&&(u=b.getElementById(s))&&v(e,u)&&u.id===s)return n.push(u),n}else{if(h[2])return A.apply(n,e.getElementsByTagName(t)),n;if((s=h[3])&&i.getElementsByClassName&&e.getElementsByClassName)return A.apply(n,e.getElementsByClassName(s)),n}if(i.qsa&&!I[t+" "]&&(!m||!m.test(t))){if(1!==E)b=e,y=t;else if("object"!==e.nodeName.toLowerCase()){for((c=e.getAttribute("id"))?c=c.replace(et,it):e.setAttribute("id",c=w),r=(g=a(t)).length;r--;)g[r]="#"+c+" "+yt(g[r]);y=g.join(","),b=Y.test(t)&&ft(e.parentNode)||e}if(y)try{return A.apply(n,b.querySelectorAll(y)),n}catch(t){}finally{c===w&&e.removeAttribute("id")}}}return l(t.replace(H,"$1"),e,n,o)}function at(){var t=[];return function e(i,o){return t.push(i+" ")>n.cacheLength&&delete e[t.shift()],e[i+" "]=o}}function rt(t){return t[w]=!0,t}function lt(t){var e=p.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function ut(t,e){for(var i=t.split("|"),o=i.length;o--;)n.attrHandle[i[o]]=e}function ct(t,e){var i=e&&t,n=i&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(n)return n;if(i)for(;i=i.nextSibling;)if(i===e)return-1;return t?1:-1}function ht(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function dt(t){return function(e){var i=e.nodeName.toLowerCase();return("input"===i||"button"===i)&&e.type===t}}function pt(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ot(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function gt(t){return rt(function(e){return e=+e,rt(function(i,n){for(var o,s=t([],i.length,e),a=s.length;a--;)i[o=s[a]]&&(i[o]=!(n[o]=i[o]))})})}function ft(t){return t&&void 0!==t.getElementsByTagName&&t}for(e in i=st.support={},s=st.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},d=st.setDocument=function(t){var e,o,a=t?t.ownerDocument||t:x;return a!==p&&9===a.nodeType&&a.documentElement?(g=(p=a).documentElement,f=!s(p),x!==p&&(o=p.defaultView)&&o.top!==o&&(o.addEventListener?o.addEventListener("unload",nt,!1):o.attachEvent&&o.attachEvent("onunload",nt)),i.attributes=lt(function(t){return t.className="i",!t.getAttribute("className")}),i.getElementsByTagName=lt(function(t){return t.appendChild(p.createComment("")),!t.getElementsByTagName("*").length}),i.getElementsByClassName=X.test(p.getElementsByClassName),i.getById=lt(function(t){return g.appendChild(t).id=w,!p.getElementsByName||!p.getElementsByName(w).length}),i.getById?(n.filter.ID=function(t){var e=t.replace(Z,tt);return function(t){return t.getAttribute("id")===e}},n.find.ID=function(t,e){if(void 0!==e.getElementById&&f){var i=e.getElementById(t);return i?[i]:[]}}):(n.filter.ID=function(t){var e=t.replace(Z,tt);return function(t){var i=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return i&&i.value===e}},n.find.ID=function(t,e){if(void 0!==e.getElementById&&f){var i,n,o,s=e.getElementById(t);if(s){if((i=s.getAttributeNode("id"))&&i.value===t)return[s];for(o=e.getElementsByName(t),n=0;s=o[n++];)if((i=s.getAttributeNode("id"))&&i.value===t)return[s]}return[]}}),n.find.TAG=i.getElementsByTagName?function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):i.qsa?e.querySelectorAll(t):void 0}:function(t,e){var i,n=[],o=0,s=e.getElementsByTagName(t);if("*"===t){for(;i=s[o++];)1===i.nodeType&&n.push(i);return n}return s},n.find.CLASS=i.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&f)return e.getElementsByClassName(t)},y=[],m=[],(i.qsa=X.test(p.querySelectorAll))&&(lt(function(t){g.appendChild(t).innerHTML="",t.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+O+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||m.push("\\["+O+"*(?:value|"+F+")"),t.querySelectorAll("[id~="+w+"-]").length||m.push("~="),t.querySelectorAll(":checked").length||m.push(":checked"),t.querySelectorAll("a#"+w+"+*").length||m.push(".#.+[+~]")}),lt(function(t){t.innerHTML="";var e=p.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&m.push("name"+O+"*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&m.push(":enabled",":disabled"),g.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&m.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),m.push(",.*:")})),(i.matchesSelector=X.test(b=g.matches||g.webkitMatchesSelector||g.mozMatchesSelector||g.oMatchesSelector||g.msMatchesSelector))&<(function(t){i.disconnectedMatch=b.call(t,"*"),b.call(t,"[s!='']:x"),y.push("!=",z)}),m=m.length&&new RegExp(m.join("|")),y=y.length&&new RegExp(y.join("|")),e=X.test(g.compareDocumentPosition),v=e||X.test(g.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},T=e?function(t,e){if(t===e)return h=!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===p||t.ownerDocument===x&&v(x,t)?-1:e===p||e.ownerDocument===x&&v(x,e)?1:c?P(c,t)-P(c,e):0:4&n?-1:1)}:function(t,e){if(t===e)return h=!0,0;var i,n=0,o=t.parentNode,s=e.parentNode,a=[t],r=[e];if(!o||!s)return t===p?-1:e===p?1:o?-1:s?1:c?P(c,t)-P(c,e):0;if(o===s)return ct(t,e);for(i=t;i=i.parentNode;)a.unshift(i);for(i=e;i=i.parentNode;)r.unshift(i);for(;a[n]===r[n];)n++;return n?ct(a[n],r[n]):a[n]===x?-1:r[n]===x?1:0},p):p},st.matches=function(t,e){return st(t,null,null,e)},st.matchesSelector=function(t,e){if((t.ownerDocument||t)!==p&&d(t),e=e.replace(G,"='$1']"),i.matchesSelector&&f&&!I[e+" "]&&(!y||!y.test(e))&&(!m||!m.test(e)))try{var n=b.call(t,e);if(n||i.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(t){}return st(e,p,null,[t]).length>0},st.contains=function(t,e){return(t.ownerDocument||t)!==p&&d(t),v(t,e)},st.attr=function(t,e){(t.ownerDocument||t)!==p&&d(t);var o=n.attrHandle[e.toLowerCase()],s=o&&L.call(n.attrHandle,e.toLowerCase())?o(t,e,!f):void 0;return void 0!==s?s:i.attributes||!f?t.getAttribute(e):(s=t.getAttributeNode(e))&&s.specified?s.value:null},st.escape=function(t){return(t+"").replace(et,it)},st.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},st.uniqueSort=function(t){var e,n=[],o=0,s=0;if(h=!i.detectDuplicates,c=!i.sortStable&&t.slice(0),t.sort(T),h){for(;e=t[s++];)e===t[s]&&(o=n.push(s));for(;o--;)t.splice(n[o],1)}return c=null,t},o=st.getText=function(t){var e,i="",n=0,s=t.nodeType;if(s){if(1===s||9===s||11===s){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)i+=o(t)}else if(3===s||4===s)return t.nodeValue}else for(;e=t[n++];)i+=o(e);return i},(n=st.selectors={cacheLength:50,createPseudo:rt,match:q,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(Z,tt),t[3]=(t[3]||t[4]||t[5]||"").replace(Z,tt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||st.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&st.error(t[0]),t},PSEUDO:function(t){var e,i=!t[6]&&t[2];return q.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":i&&j.test(i)&&(e=a(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(Z,tt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=C[t+" "];return e||(e=new RegExp("(^|"+O+")"+t+"("+O+"|$)"))&&C(t,function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,e,i){return function(n){var o=st.attr(n,t);return null==o?"!="===e:!e||(o+="","="===e?o===i:"!="===e?o!==i:"^="===e?i&&0===o.indexOf(i):"*="===e?i&&o.indexOf(i)>-1:"$="===e?i&&o.slice(-i.length)===i:"~="===e?(" "+o.replace(U," ")+" ").indexOf(i)>-1:"|="===e&&(o===i||o.slice(0,i.length+1)===i+"-"))}},CHILD:function(t,e,i,n,o){var s="nth"!==t.slice(0,3),a="last"!==t.slice(-4),r="of-type"===e;return 1===n&&0===o?function(t){return!!t.parentNode}:function(e,i,l){var u,c,h,d,p,g,f=s!==a?"nextSibling":"previousSibling",m=e.parentNode,y=r&&e.nodeName.toLowerCase(),b=!l&&!r,v=!1;if(m){if(s){for(;f;){for(d=e;d=d[f];)if(r?d.nodeName.toLowerCase()===y:1===d.nodeType)return!1;g=f="only"===t&&!g&&"nextSibling"}return!0}if(g=[a?m.firstChild:m.lastChild],a&&b){for(v=(p=(u=(c=(h=(d=m)[w]||(d[w]={}))[d.uniqueID]||(h[d.uniqueID]={}))[t]||[])[0]===E&&u[1])&&u[2],d=p&&m.childNodes[p];d=++p&&d&&d[f]||(v=p=0)||g.pop();)if(1===d.nodeType&&++v&&d===e){c[t]=[E,p,v];break}}else if(b&&(v=p=(u=(c=(h=(d=e)[w]||(d[w]={}))[d.uniqueID]||(h[d.uniqueID]={}))[t]||[])[0]===E&&u[1]),!1===v)for(;(d=++p&&d&&d[f]||(v=p=0)||g.pop())&&((r?d.nodeName.toLowerCase()!==y:1!==d.nodeType)||!++v||(b&&((c=(h=d[w]||(d[w]={}))[d.uniqueID]||(h[d.uniqueID]={}))[t]=[E,v]),d!==e)););return(v-=o)===n||v%n==0&&v/n>=0}}},PSEUDO:function(t,e){var i,o=n.pseudos[t]||n.setFilters[t.toLowerCase()]||st.error("unsupported pseudo: "+t);return o[w]?o(e):o.length>1?(i=[t,t,"",e],n.setFilters.hasOwnProperty(t.toLowerCase())?rt(function(t,i){for(var n,s=o(t,e),a=s.length;a--;)t[n=P(t,s[a])]=!(i[n]=s[a])}):function(t){return o(t,0,i)}):o}},pseudos:{not:rt(function(t){var e=[],i=[],n=r(t.replace(H,"$1"));return n[w]?rt(function(t,e,i,o){for(var s,a=n(t,null,o,[]),r=t.length;r--;)(s=a[r])&&(t[r]=!(e[r]=s))}):function(t,o,s){return e[0]=t,n(e,null,s,i),e[0]=null,!i.pop()}}),has:rt(function(t){return function(e){return st(t,e).length>0}}),contains:rt(function(t){return t=t.replace(Z,tt),function(e){return(e.textContent||e.innerText||o(e)).indexOf(t)>-1}}),lang:rt(function(t){return V.test(t||"")||st.error("unsupported lang: "+t),t=t.replace(Z,tt).toLowerCase(),function(e){var i;do{if(i=f?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===g},focus:function(t){return t===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:pt(!1),disabled:pt(!0),checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!n.pseudos.empty(t)},header:function(t){return _.test(t.nodeName)},input:function(t){return Q.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:gt(function(){return[0]}),last:gt(function(t,e){return[e-1]}),eq:gt(function(t,e,i){return[i<0?i+e:i]}),even:gt(function(t,e){for(var i=0;i=0;)t.push(n);return t}),gt:gt(function(t,e,i){for(var n=i<0?i+e:i;++n1?function(e,i,n){for(var o=t.length;o--;)if(!t[o](e,i,n))return!1;return!0}:t[0]}function wt(t,e,i,n,o){for(var s,a=[],r=0,l=t.length,u=null!=e;r-1&&(s[u]=!(a[u]=h))}}else y=wt(y===a?y.splice(g,y.length):y),o?o(null,a,y,l):A.apply(a,y)})}function Et(t){for(var e,i,o,s=t.length,a=n.relative[t[0].type],r=a||n.relative[" "],l=a?1:0,c=bt(function(t){return t===e},r,!0),h=bt(function(t){return P(e,t)>-1},r,!0),d=[function(t,i,n){var o=!a&&(n||i!==u)||((e=i).nodeType?c(t,i,n):h(t,i,n));return e=null,o}];l1&&vt(d),l>1&&yt(t.slice(0,l-1).concat({value:" "===t[l-2].type?"*":""})).replace(H,"$1"),i,l0,o=t.length>0,s=function(s,a,r,l,c){var h,g,m,y=0,b="0",v=s&&[],w=[],x=u,W=s||o&&n.find.TAG("*",c),C=E+=null==x?1:Math.random()||.1,$=W.length;for(c&&(u=a===p||a||c);b!==$&&null!=(h=W[b]);b++){if(o&&h){for(g=0,a||h.ownerDocument===p||(d(h),r=!f);m=t[g++];)if(m(h,a||p,r)){l.push(h);break}c&&(E=C)}i&&((h=!m&&h)&&y--,s&&v.push(h))}if(y+=b,i&&b!==y){for(g=0;m=e[g++];)m(v,w,a,r);if(s){if(y>0)for(;b--;)v[b]||w[b]||(w[b]=S.call(l));w=wt(w)}A.apply(l,w),c&&!s&&w.length>0&&y+e.length>1&&st.uniqueSort(l)}return c&&(E=C,u=x),v};return i?rt(s):s}(s,o))).selector=t}return r},l=st.select=function(t,e,i,o){var s,l,u,c,h,d="function"==typeof t&&t,p=!o&&a(t=d.selector||t);if(i=i||[],1===p.length){if((l=p[0]=p[0].slice(0)).length>2&&"ID"===(u=l[0]).type&&9===e.nodeType&&f&&n.relative[l[1].type]){if(!(e=(n.find.ID(u.matches[0].replace(Z,tt),e)||[])[0]))return i;d&&(e=e.parentNode),t=t.slice(l.shift().value.length)}for(s=q.needsContext.test(t)?0:l.length;s--&&(u=l[s],!n.relative[c=u.type]);)if((h=n.find[c])&&(o=h(u.matches[0].replace(Z,tt),Y.test(l[0].type)&&ft(e.parentNode)||e))){if(l.splice(s,1),!(t=o.length&&yt(l)))return A.apply(i,o),i;break}}return(d||r(t,p))(o,e,!f,i,!e||Y.test(t)&&ft(e.parentNode)||e),i},i.sortStable=w.split("").sort(T).join("")===w,i.detectDuplicates=!!h,d(),i.sortDetached=lt(function(t){return 1&t.compareDocumentPosition(p.createElement("fieldset"))}),lt(function(t){return t.innerHTML="","#"===t.firstChild.getAttribute("href")})||ut("type|href|height|width",function(t,e,i){if(!i)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),i.attributes&<(function(t){return t.innerHTML="",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||ut("value",function(t,e,i){if(!i&&"input"===t.nodeName.toLowerCase())return t.defaultValue}),lt(function(t){return null==t.getAttribute("disabled")})||ut(F,function(t,e,i){var n;if(!i)return!0===t[e]?e.toLowerCase():(n=t.getAttributeNode(e))&&n.specified?n.value:null}),st}(i);W.find=I,W.expr=I.selectors,W.expr[":"]=W.expr.pseudos,W.uniqueSort=W.unique=I.uniqueSort,W.text=I.getText,W.isXMLDoc=I.isXML,W.contains=I.contains,W.escapeSelector=I.escape;var T=function(t,e,i){for(var n=[],o=void 0!==i;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(o&&W(t).is(i))break;n.push(t)}return n},L=function(t,e){for(var i=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&i.push(t);return i},D=W.expr.match.needsContext;function S(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}var k=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function A(t,e,i){return b(e)?W.grep(t,function(t,n){return!!e.call(t,n,t)!==i}):e.nodeType?W.grep(t,function(t){return t===e!==i}):"string"!=typeof e?W.grep(t,function(t){return h.call(e,t)>-1!==i}):W.filter(e,t,i)}W.filter=function(t,e,i){var n=e[0];return i&&(t=":not("+t+")"),1===e.length&&1===n.nodeType?W.find.matchesSelector(n,t)?[n]:[]:W.find.matches(t,W.grep(e,function(t){return 1===t.nodeType}))},W.fn.extend({find:function(t){var e,i,n=this.length,o=this;if("string"!=typeof t)return this.pushStack(W(t).filter(function(){for(e=0;e1?W.uniqueSort(i):i},filter:function(t){return this.pushStack(A(this,t||[],!1))},not:function(t){return this.pushStack(A(this,t||[],!0))},is:function(t){return!!A(this,"string"==typeof t&&D.test(t)?W(t):t||[],!1).length}});var M,P=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(W.fn.init=function(t,e,i){var n,o;if(!t)return this;if(i=i||M,"string"==typeof t){if(!(n="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:P.exec(t))||!n[1]&&e)return!e||e.jquery?(e||i).find(t):this.constructor(e).find(t);if(n[1]){if(e=e instanceof W?e[0]:e,W.merge(this,W.parseHTML(n[1],e&&e.nodeType?e.ownerDocument||e:a,!0)),k.test(n[1])&&W.isPlainObject(e))for(n in e)b(this[n])?this[n](e[n]):this.attr(n,e[n]);return this}return(o=a.getElementById(n[2]))&&(this[0]=o,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):b(t)?void 0!==i.ready?i.ready(t):t(W):W.makeArray(t,this)}).prototype=W.fn,M=W(a);var F=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function B(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}W.fn.extend({has:function(t){var e=W(t,this),i=e.length;return this.filter(function(){for(var t=0;t-1:1===i.nodeType&&W.find.matchesSelector(i,t))){s.push(i);break}return this.pushStack(s.length>1?W.uniqueSort(s):s)},index:function(t){return t?"string"==typeof t?h.call(W(t),this[0]):h.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(W.uniqueSort(W.merge(this.get(),W(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),W.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return T(t,"parentNode")},parentsUntil:function(t,e,i){return T(t,"parentNode",i)},next:function(t){return B(t,"nextSibling")},prev:function(t){return B(t,"previousSibling")},nextAll:function(t){return T(t,"nextSibling")},prevAll:function(t){return T(t,"previousSibling")},nextUntil:function(t,e,i){return T(t,"nextSibling",i)},prevUntil:function(t,e,i){return T(t,"previousSibling",i)},siblings:function(t){return L((t.parentNode||{}).firstChild,t)},children:function(t){return L(t.firstChild)},contents:function(t){return S(t,"iframe")?t.contentDocument:(S(t,"template")&&(t=t.content||t),W.merge([],t.childNodes))}},function(t,e){W.fn[t]=function(i,n){var o=W.map(this,e,i);return"Until"!==t.slice(-5)&&(n=i),n&&"string"==typeof n&&(o=W.filter(n,o)),this.length>1&&(O[t]||W.uniqueSort(o),F.test(t)&&o.reverse()),this.pushStack(o)}});var R=/[^\x20\t\r\n\f]+/g;function z(t){return t}function U(t){throw t}function H(t,e,i,n){var o;try{t&&b(o=t.promise)?o.call(t).done(e).fail(i):t&&b(o=t.then)?o.call(t,e,i):e.apply(void 0,[t].slice(n))}catch(t){i.apply(void 0,[t])}}W.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return W.each(t.match(R)||[],function(t,i){e[i]=!0}),e}(t):W.extend({},t);var e,i,n,o,s=[],a=[],r=-1,l=function(){for(o=o||t.once,n=e=!0;a.length;r=-1)for(i=a.shift();++r-1;)s.splice(i,1),i<=r&&r--}),this},has:function(t){return t?W.inArray(t,s)>-1:s.length>0},empty:function(){return s&&(s=[]),this},disable:function(){return o=a=[],s=i="",this},disabled:function(){return!s},lock:function(){return o=a=[],i||e||(s=i=""),this},locked:function(){return!!o},fireWith:function(t,i){return o||(i=[t,(i=i||[]).slice?i.slice():i],a.push(i),e||l()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!n}};return u},W.extend({Deferred:function(t){var e=[["notify","progress",W.Callbacks("memory"),W.Callbacks("memory"),2],["resolve","done",W.Callbacks("once memory"),W.Callbacks("once memory"),0,"resolved"],["reject","fail",W.Callbacks("once memory"),W.Callbacks("once memory"),1,"rejected"]],n="pending",o={state:function(){return n},always:function(){return s.done(arguments).fail(arguments),this},catch:function(t){return o.then(null,t)},pipe:function(){var t=arguments;return W.Deferred(function(i){W.each(e,function(e,n){var o=b(t[n[4]])&&t[n[4]];s[n[1]](function(){var t=o&&o.apply(this,arguments);t&&b(t.promise)?t.promise().progress(i.notify).done(i.resolve).fail(i.reject):i[n[0]+"With"](this,o?[t]:arguments)})}),t=null}).promise()},then:function(t,n,o){var s=0;function a(t,e,n,o){return function(){var r=this,l=arguments,u=function(){var i,u;if(!(t=s&&(n!==U&&(r=void 0,l=[i]),e.rejectWith(r,l))}};t?c():(W.Deferred.getStackHook&&(c.stackTrace=W.Deferred.getStackHook()),i.setTimeout(c))}}return W.Deferred(function(i){e[0][3].add(a(0,i,b(o)?o:z,i.notifyWith)),e[1][3].add(a(0,i,b(t)?t:z)),e[2][3].add(a(0,i,b(n)?n:U))}).promise()},promise:function(t){return null!=t?W.extend(t,o):o}},s={};return W.each(e,function(t,i){var a=i[2],r=i[5];o[i[1]]=a.add,r&&a.add(function(){n=r},e[3-t][2].disable,e[3-t][3].disable,e[0][2].lock,e[0][3].lock),a.add(i[3].fire),s[i[0]]=function(){return s[i[0]+"With"](this===s?void 0:this,arguments),this},s[i[0]+"With"]=a.fireWith}),o.promise(s),t&&t.call(s,s),s},when:function(t){var e=arguments.length,i=e,n=Array(i),o=l.call(arguments),s=W.Deferred(),a=function(t){return function(i){n[t]=this,o[t]=arguments.length>1?l.call(arguments):i,--e||s.resolveWith(n,o)}};if(e<=1&&(H(t,s.done(a(i)).resolve,s.reject,!e),"pending"===s.state()||b(o[i]&&o[i].then)))return s.then();for(;i--;)H(o[i],a(i),s.reject);return s.promise()}});var N=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;W.Deferred.exceptionHook=function(t,e){i.console&&i.console.warn&&t&&N.test(t.name)&&i.console.warn("jQuery.Deferred exception: "+t.message,t.stack,e)},W.readyException=function(t){i.setTimeout(function(){throw t})};var K=W.Deferred();function G(){a.removeEventListener("DOMContentLoaded",G),i.removeEventListener("load",G),W.ready()}W.fn.ready=function(t){return K.then(t).catch(function(t){W.readyException(t)}),this},W.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--W.readyWait:W.isReady)||(W.isReady=!0,!0!==t&&--W.readyWait>0||K.resolveWith(a,[W]))}}),W.ready.then=K.then,"complete"===a.readyState||"loading"!==a.readyState&&!a.documentElement.doScroll?i.setTimeout(W.ready):(a.addEventListener("DOMContentLoaded",G),i.addEventListener("load",G));var j=function(t,e,i,n,o,s,a){var r=0,l=t.length,u=null==i;if("object"===E(i))for(r in o=!0,i)j(t,e,r,i[r],!0,s,a);else if(void 0!==n&&(o=!0,b(n)||(a=!0),u&&(a?(e.call(t,n),e=null):(u=e,e=function(t,e,i){return u.call(W(t),i)})),e))for(;r1,null,!0)},removeData:function(t){return this.each(function(){Z.remove(this,t)})}}),W.extend({queue:function(t,e,i){var n;if(t)return e=(e||"fx")+"queue",n=Y.get(t,e),i&&(!n||Array.isArray(i)?n=Y.access(t,e,W.makeArray(i)):n.push(i)),n||[]},dequeue:function(t,e){e=e||"fx";var i=W.queue(t,e),n=i.length,o=i.shift(),s=W._queueHooks(t,e);"inprogress"===o&&(o=i.shift(),n--),o&&("fx"===e&&i.unshift("inprogress"),delete s.stop,o.call(t,function(){W.dequeue(t,e)},s)),!n&&s&&s.empty.fire()},_queueHooks:function(t,e){var i=e+"queueHooks";return Y.get(t,i)||Y.access(t,i,{empty:W.Callbacks("once memory").add(function(){Y.remove(t,[e+"queue",i])})})}}),W.fn.extend({queue:function(t,e){var i=2;return"string"!=typeof t&&(e=t,t="fx",i--),arguments.length\x20\t\r\n\f]+)/i,gt=/^$|^module$|\/(?:java|ecma)script/i,ft={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function mt(t,e){var i;return i=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&S(t,e)?W.merge([t],i):i}function yt(t,e){for(var i=0,n=t.length;i-1)o&&o.push(s);else if(u=W.contains(s.ownerDocument,s),a=mt(h.appendChild(s),"script"),u&&yt(a),i)for(c=0;s=a[c++];)gt.test(s.type||"")&&i.push(s);return h}bt=a.createDocumentFragment().appendChild(a.createElement("div")),(vt=a.createElement("input")).setAttribute("type","radio"),vt.setAttribute("checked","checked"),vt.setAttribute("name","t"),bt.appendChild(vt),y.checkClone=bt.cloneNode(!0).cloneNode(!0).lastChild.checked,bt.innerHTML="",y.noCloneChecked=!!bt.cloneNode(!0).lastChild.defaultValue;var Et=a.documentElement,Wt=/^key/,Ct=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,$t=/^([^.]*)(?:\.(.+)|)/;function It(){return!0}function Tt(){return!1}function Lt(){try{return a.activeElement}catch(t){}}function Dt(t,e,i,n,o,s){var a,r;if("object"==typeof e){for(r in"string"!=typeof i&&(n=n||i,i=void 0),e)Dt(t,r,i,n,e[r],s);return t}if(null==n&&null==o?(o=i,n=i=void 0):null==o&&("string"==typeof i?(o=n,n=void 0):(o=n,n=i,i=void 0)),!1===o)o=Tt;else if(!o)return t;return 1===s&&(a=o,(o=function(t){return W().off(t),a.apply(this,arguments)}).guid=a.guid||(a.guid=W.guid++)),t.each(function(){W.event.add(this,e,o,n,i)})}W.event={global:{},add:function(t,e,i,n,o){var s,a,r,l,u,c,h,d,p,g,f,m=Y.get(t);if(m)for(i.handler&&(i=(s=i).handler,o=s.selector),o&&W.find.matchesSelector(Et,o),i.guid||(i.guid=W.guid++),(l=m.events)||(l=m.events={}),(a=m.handle)||(a=m.handle=function(e){return void 0!==W&&W.event.triggered!==e.type?W.event.dispatch.apply(t,arguments):void 0}),u=(e=(e||"").match(R)||[""]).length;u--;)p=f=(r=$t.exec(e[u])||[])[1],g=(r[2]||"").split(".").sort(),p&&(h=W.event.special[p]||{},p=(o?h.delegateType:h.bindType)||p,h=W.event.special[p]||{},c=W.extend({type:p,origType:f,data:n,handler:i,guid:i.guid,selector:o,needsContext:o&&W.expr.match.needsContext.test(o),namespace:g.join(".")},s),(d=l[p])||((d=l[p]=[]).delegateCount=0,h.setup&&!1!==h.setup.call(t,n,g,a)||t.addEventListener&&t.addEventListener(p,a)),h.add&&(h.add.call(t,c),c.handler.guid||(c.handler.guid=i.guid)),o?d.splice(d.delegateCount++,0,c):d.push(c),W.event.global[p]=!0)},remove:function(t,e,i,n,o){var s,a,r,l,u,c,h,d,p,g,f,m=Y.hasData(t)&&Y.get(t);if(m&&(l=m.events)){for(u=(e=(e||"").match(R)||[""]).length;u--;)if(p=f=(r=$t.exec(e[u])||[])[1],g=(r[2]||"").split(".").sort(),p){for(h=W.event.special[p]||{},d=l[p=(n?h.delegateType:h.bindType)||p]||[],r=r[2]&&new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=s=d.length;s--;)c=d[s],!o&&f!==c.origType||i&&i.guid!==c.guid||r&&!r.test(c.namespace)||n&&n!==c.selector&&("**"!==n||!c.selector)||(d.splice(s,1),c.selector&&d.delegateCount--,h.remove&&h.remove.call(t,c));a&&!d.length&&(h.teardown&&!1!==h.teardown.call(t,g,m.handle)||W.removeEvent(t,p,m.handle),delete l[p])}else for(p in l)W.event.remove(t,p+e[u],i,n,!0);W.isEmptyObject(l)&&Y.remove(t,"handle events")}},dispatch:function(t){var e,i,n,o,s,a,r=W.event.fix(t),l=new Array(arguments.length),u=(Y.get(this,"events")||{})[r.type]||[],c=W.event.special[r.type]||{};for(l[0]=r,e=1;e=1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&("click"!==t.type||!0!==u.disabled)){for(s=[],a={},i=0;i-1:W.find(o,this,null,[u]).length),a[o]&&s.push(n);s.length&&r.push({elem:u,handlers:s})}return u=this,l\x20\t\r\n\f]*)[^>]*)\/>/gi,kt=/\s*$/g;function Pt(t,e){return S(t,"table")&&S(11!==e.nodeType?e:e.firstChild,"tr")&&W(t).children("tbody")[0]||t}function Ft(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Ot(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function Bt(t,e){var i,n,o,s,a,r,l,u;if(1===e.nodeType){if(Y.hasData(t)&&(s=Y.access(t),a=Y.set(e,s),u=s.events))for(o in delete a.handle,a.events={},u)for(i=0,n=u[o].length;i1&&"string"==typeof g&&!y.checkClone&&At.test(g))return t.each(function(o){var s=t.eq(o);f&&(e[0]=g.call(this,o,s.html())),Rt(s,e,i,n)});if(d&&(s=(o=xt(e,t[0].ownerDocument,!1,t,n)).firstChild,1===o.childNodes.length&&(o=s),s||n)){for(r=(a=W.map(mt(o,"script"),Ft)).length;h")},clone:function(t,e,i){var n,o,s,a,r,l,u,c=t.cloneNode(!0),h=W.contains(t.ownerDocument,t);if(!(y.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||W.isXMLDoc(t)))for(a=mt(c),n=0,o=(s=mt(t)).length;n0&&yt(a,!h&&mt(t,"script")),c},cleanData:function(t){for(var e,i,n,o=W.event.special,s=0;void 0!==(i=t[s]);s++)if(X(i)){if(e=i[Y.expando]){if(e.events)for(n in e.events)o[n]?W.event.remove(i,n):W.removeEvent(i,n,e.handle);i[Y.expando]=void 0}i[Z.expando]&&(i[Z.expando]=void 0)}}}),W.fn.extend({detach:function(t){return zt(this,t,!0)},remove:function(t){return zt(this,t)},text:function(t){return j(this,function(t){return void 0===t?W.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 Rt(this,arguments,function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Pt(this,t).appendChild(t)})},prepend:function(){return Rt(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=Pt(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return Rt(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return Rt(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(W.cleanData(mt(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return W.clone(this,t,e)})},html:function(t){return j(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&&!kt.test(t)&&!ft[(pt.exec(t)||["",""])[1].toLowerCase()]){t=W.htmlPrefilter(t);try{for(;i=0&&(l+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-s-l-r-.5))),l}function te(t,e,i){var n=Ht(t),o=Kt(t,e,n),s="border-box"===W.css(t,"boxSizing",!1,n),a=s;if(Ut.test(o)){if(!i)return o;o="auto"}return a=a&&(y.boxSizingReliable()||o===t.style[e]),("auto"===o||!parseFloat(o)&&"inline"===W.css(t,"display",!1,n))&&(o=t["offset"+e[0].toUpperCase()+e.slice(1)],a=!0),(o=parseFloat(o)||0)+Zt(t,e,i||(s?"border":"content"),a,n,o)+"px"}function ee(t,e,i,n,o){return new ee.prototype.init(t,e,i,n,o)}W.extend({cssHooks:{opacity:{get:function(t,e){if(e){var i=Kt(t,"opacity");return""===i?"1":i}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(t,e,i,n){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var o,s,a,r=_(e),l=Vt.test(e),u=t.style;if(l||(e=Jt(r)),a=W.cssHooks[e]||W.cssHooks[r],void 0===i)return a&&"get"in a&&void 0!==(o=a.get(t,!1,n))?o:u[e];"string"===(s=typeof i)&&(o=ot.exec(i))&&o[1]&&(i=lt(t,e,o),s="number"),null!=i&&i==i&&("number"===s&&(i+=o&&o[3]||(W.cssNumber[r]?"":"px")),y.clearCloneStyle||""!==i||0!==e.indexOf("background")||(u[e]="inherit"),a&&"set"in a&&void 0===(i=a.set(t,i,n))||(l?u.setProperty(e,i):u[e]=i))}},css:function(t,e,i,n){var o,s,a,r=_(e);return Vt.test(e)||(e=Jt(r)),(a=W.cssHooks[e]||W.cssHooks[r])&&"get"in a&&(o=a.get(t,!0,i)),void 0===o&&(o=Kt(t,e,n)),"normal"===o&&e in Qt&&(o=Qt[e]),""===i||i?(s=parseFloat(o),!0===i||isFinite(s)?s||0:o):o}}),W.each(["height","width"],function(t,e){W.cssHooks[e]={get:function(t,i,n){if(i)return!jt.test(W.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?te(t,e,n):rt(t,qt,function(){return te(t,e,n)})},set:function(t,i,n){var o,s=Ht(t),a="border-box"===W.css(t,"boxSizing",!1,s),r=n&&Zt(t,e,n,a,s);return a&&y.scrollboxSize()===s.position&&(r-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(s[e])-Zt(t,e,"border",!1,s)-.5)),r&&(o=ot.exec(i))&&"px"!==(o[3]||"px")&&(t.style[e]=i,i=W.css(t,e)),Yt(0,i,r)}}}),W.cssHooks.marginLeft=Gt(y.reliableMarginLeft,function(t,e){if(e)return(parseFloat(Kt(t,"marginLeft"))||t.getBoundingClientRect().left-rt(t,{marginLeft:0},function(){return t.getBoundingClientRect().left}))+"px"}),W.each({margin:"",padding:"",border:"Width"},function(t,e){W.cssHooks[t+e]={expand:function(i){for(var n=0,o={},s="string"==typeof i?i.split(" "):[i];n<4;n++)o[t+st[n]+e]=s[n]||s[n-2]||s[0];return o}},"margin"!==t&&(W.cssHooks[t+e].set=Yt)}),W.fn.extend({css:function(t,e){return j(this,function(t,e,i){var n,o,s={},a=0;if(Array.isArray(e)){for(n=Ht(t),o=e.length;a1)}}),W.Tween=ee,ee.prototype={constructor:ee,init:function(t,e,i,n,o,s){this.elem=t,this.prop=i,this.easing=o||W.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=n,this.unit=s||(W.cssNumber[i]?"":"px")},cur:function(){var t=ee.propHooks[this.prop];return t&&t.get?t.get(this):ee.propHooks._default.get(this)},run:function(t){var e,i=ee.propHooks[this.prop];return this.options.duration?this.pos=e=W.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),i&&i.set?i.set(this):ee.propHooks._default.set(this),this}},ee.prototype.init.prototype=ee.prototype,ee.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=W.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){W.fx.step[t.prop]?W.fx.step[t.prop](t):1!==t.elem.nodeType||null==t.elem.style[W.cssProps[t.prop]]&&!W.cssHooks[t.prop]?t.elem[t.prop]=t.now:W.style(t.elem,t.prop,t.now+t.unit)}}},ee.propHooks.scrollTop=ee.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},W.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},W.fx=ee.prototype.init,W.fx.step={};var ie,ne,oe=/^(?:toggle|show|hide)$/,se=/queueHooks$/;function ae(){ne&&(!1===a.hidden&&i.requestAnimationFrame?i.requestAnimationFrame(ae):i.setTimeout(ae,W.fx.interval),W.fx.tick())}function re(){return i.setTimeout(function(){ie=void 0}),ie=Date.now()}function le(t,e){var i,n=0,o={height:t};for(e=e?1:0;n<4;n+=2-e)o["margin"+(i=st[n])]=o["padding"+i]=t;return e&&(o.opacity=o.width=t),o}function ue(t,e,i){for(var n,o=(ce.tweeners[e]||[]).concat(ce.tweeners["*"]),s=0,a=o.length;s1)},removeAttr:function(t){return this.each(function(){W.removeAttr(this,t)})}}),W.extend({attr:function(t,e,i){var n,o,s=t.nodeType;if(3!==s&&8!==s&&2!==s)return void 0===t.getAttribute?W.prop(t,e,i):(1===s&&W.isXMLDoc(t)||(o=W.attrHooks[e.toLowerCase()]||(W.expr.match.bool.test(e)?he:void 0)),void 0!==i?null===i?void W.removeAttr(t,e):o&&"set"in o&&void 0!==(n=o.set(t,i,e))?n:(t.setAttribute(e,i+""),i):o&&"get"in o&&null!==(n=o.get(t,e))?n:null==(n=W.find.attr(t,e))?void 0:n)},attrHooks:{type:{set:function(t,e){if(!y.radioValue&&"radio"===e&&S(t,"input")){var i=t.value;return t.setAttribute("type",e),i&&(t.value=i),e}}}},removeAttr:function(t,e){var i,n=0,o=e&&e.match(R);if(o&&1===t.nodeType)for(;i=o[n++];)t.removeAttribute(i)}}),he={set:function(t,e,i){return!1===e?W.removeAttr(t,i):t.setAttribute(i,i),i}},W.each(W.expr.match.bool.source.match(/\w+/g),function(t,e){var i=de[e]||W.find.attr;de[e]=function(t,e,n){var o,s,a=e.toLowerCase();return n||(s=de[a],de[a]=o,o=null!=i(t,e,n)?a:null,de[a]=s),o}});var pe=/^(?:input|select|textarea|button)$/i,ge=/^(?:a|area)$/i;function fe(t){return(t.match(R)||[]).join(" ")}function me(t){return t.getAttribute&&t.getAttribute("class")||""}function ye(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(R)||[]}W.fn.extend({prop:function(t,e){return j(this,W.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[W.propFix[t]||t]})}}),W.extend({prop:function(t,e,i){var n,o,s=t.nodeType;if(3!==s&&8!==s&&2!==s)return 1===s&&W.isXMLDoc(t)||(e=W.propFix[e]||e,o=W.propHooks[e]),void 0!==i?o&&"set"in o&&void 0!==(n=o.set(t,i,e))?n:t[e]=i:o&&"get"in o&&null!==(n=o.get(t,e))?n:t[e]},propHooks:{tabIndex:{get:function(t){var e=W.find.attr(t,"tabindex");return e?parseInt(e,10):pe.test(t.nodeName)||ge.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),y.optSelected||(W.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),W.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){W.propFix[this.toLowerCase()]=this}),W.fn.extend({addClass:function(t){var e,i,n,o,s,a,r,l=0;if(b(t))return this.each(function(e){W(this).addClass(t.call(this,e,me(this)))});if((e=ye(t)).length)for(;i=this[l++];)if(o=me(i),n=1===i.nodeType&&" "+fe(o)+" "){for(a=0;s=e[a++];)n.indexOf(" "+s+" ")<0&&(n+=s+" ");o!==(r=fe(n))&&i.setAttribute("class",r)}return this},removeClass:function(t){var e,i,n,o,s,a,r,l=0;if(b(t))return this.each(function(e){W(this).removeClass(t.call(this,e,me(this)))});if(!arguments.length)return this.attr("class","");if((e=ye(t)).length)for(;i=this[l++];)if(o=me(i),n=1===i.nodeType&&" "+fe(o)+" "){for(a=0;s=e[a++];)for(;n.indexOf(" "+s+" ")>-1;)n=n.replace(" "+s+" "," ");o!==(r=fe(n))&&i.setAttribute("class",r)}return this},toggleClass:function(t,e){var i=typeof t,n="string"===i||Array.isArray(t);return"boolean"==typeof e&&n?e?this.addClass(t):this.removeClass(t):b(t)?this.each(function(i){W(this).toggleClass(t.call(this,i,me(this),e),e)}):this.each(function(){var e,o,s,a;if(n)for(o=0,s=W(this),a=ye(t);e=a[o++];)s.hasClass(e)?s.removeClass(e):s.addClass(e);else void 0!==t&&"boolean"!==i||((e=me(this))&&Y.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===t?"":Y.get(this,"__className__")||""))})},hasClass:function(t){var e,i,n=0;for(e=" "+t+" ";i=this[n++];)if(1===i.nodeType&&(" "+fe(me(i))+" ").indexOf(e)>-1)return!0;return!1}});var be=/\r/g;W.fn.extend({val:function(t){var e,i,n,o=this[0];return arguments.length?(n=b(t),this.each(function(i){var o;1===this.nodeType&&(null==(o=n?t.call(this,i,W(this).val()):t)?o="":"number"==typeof o?o+="":Array.isArray(o)&&(o=W.map(o,function(t){return null==t?"":t+""})),(e=W.valHooks[this.type]||W.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,o,"value")||(this.value=o))})):o?(e=W.valHooks[o.type]||W.valHooks[o.nodeName.toLowerCase()])&&"get"in e&&void 0!==(i=e.get(o,"value"))?i:"string"==typeof(i=o.value)?i.replace(be,""):null==i?"":i:void 0}}),W.extend({valHooks:{option:{get:function(t){var e=W.find.attr(t,"value");return null!=e?e:fe(W.text(t))}},select:{get:function(t){var e,i,n,o=t.options,s=t.selectedIndex,a="select-one"===t.type,r=a?null:[],l=a?s+1:o.length;for(n=s<0?l:a?s:0;n-1)&&(i=!0);return i||(t.selectedIndex=-1),s}}}}),W.each(["radio","checkbox"],function(){W.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=W.inArray(W(t).val(),e)>-1}},y.checkOn||(W.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})}),y.focusin="onfocusin"in i;var ve=/^(?:focusinfocus|focusoutblur)$/,we=function(t){t.stopPropagation()};W.extend(W.event,{trigger:function(t,e,n,o){var s,r,l,u,c,h,d,p,f=[n||a],m=g.call(t,"type")?t.type:t,y=g.call(t,"namespace")?t.namespace.split("."):[];if(r=p=l=n=n||a,3!==n.nodeType&&8!==n.nodeType&&!ve.test(m+W.event.triggered)&&(m.indexOf(".")>-1&&(y=m.split("."),m=y.shift(),y.sort()),c=m.indexOf(":")<0&&"on"+m,(t=t[W.expando]?t:new W.Event(m,"object"==typeof t&&t)).isTrigger=o?2:3,t.namespace=y.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+y.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=n),e=null==e?[t]:W.makeArray(e,[t]),d=W.event.special[m]||{},o||!d.trigger||!1!==d.trigger.apply(n,e))){if(!o&&!d.noBubble&&!v(n)){for(u=d.delegateType||m,ve.test(u+m)||(r=r.parentNode);r;r=r.parentNode)f.push(r),l=r;l===(n.ownerDocument||a)&&f.push(l.defaultView||l.parentWindow||i)}for(s=0;(r=f[s++])&&!t.isPropagationStopped();)p=r,t.type=s>1?u:d.bindType||m,(h=(Y.get(r,"events")||{})[t.type]&&Y.get(r,"handle"))&&h.apply(r,e),(h=c&&r[c])&&h.apply&&X(r)&&(t.result=h.apply(r,e),!1===t.result&&t.preventDefault());return t.type=m,o||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(f.pop(),e)||!X(n)||c&&b(n[m])&&!v(n)&&((l=n[c])&&(n[c]=null),W.event.triggered=m,t.isPropagationStopped()&&p.addEventListener(m,we),n[m](),t.isPropagationStopped()&&p.removeEventListener(m,we),W.event.triggered=void 0,l&&(n[c]=l)),t.result}},simulate:function(t,e,i){var n=W.extend(new W.Event,i,{type:t,isSimulated:!0});W.event.trigger(n,null,e)}}),W.fn.extend({trigger:function(t,e){return this.each(function(){W.event.trigger(t,e,this)})},triggerHandler:function(t,e){var i=this[0];if(i)return W.event.trigger(t,e,i,!0)}}),y.focusin||W.each({focus:"focusin",blur:"focusout"},function(t,e){var i=function(t){W.event.simulate(e,t.target,W.event.fix(t))};W.event.special[e]={setup:function(){var n=this.ownerDocument||this,o=Y.access(n,e);o||n.addEventListener(t,i,!0),Y.access(n,e,(o||0)+1)},teardown:function(){var n=this.ownerDocument||this,o=Y.access(n,e)-1;o?Y.access(n,e,o):(n.removeEventListener(t,i,!0),Y.remove(n,e))}}});var xe=i.location,Ee=Date.now(),We=/\?/;W.parseXML=function(t){var e;if(!t||"string"!=typeof t)return null;try{e=(new i.DOMParser).parseFromString(t,"text/xml")}catch(t){e=void 0}return e&&!e.getElementsByTagName("parsererror").length||W.error("Invalid XML: "+t),e};var Ce=/\[\]$/,$e=/\r?\n/g,Ie=/^(?:submit|button|image|reset|file)$/i,Te=/^(?:input|select|textarea|keygen)/i;function Le(t,e,i,n){var o;if(Array.isArray(e))W.each(e,function(e,o){i||Ce.test(t)?n(t,o):Le(t+"["+("object"==typeof o&&null!=o?e:"")+"]",o,i,n)});else if(i||"object"!==E(e))n(t,e);else for(o in e)Le(t+"["+o+"]",e[o],i,n)}W.param=function(t,e){var i,n=[],o=function(t,e){var i=b(e)?e():e;n[n.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==i?"":i)};if(Array.isArray(t)||t.jquery&&!W.isPlainObject(t))W.each(t,function(){o(this.name,this.value)});else for(i in t)Le(i,t[i],e,o);return n.join("&")},W.fn.extend({serialize:function(){return W.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=W.prop(this,"elements");return t?W.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!W(this).is(":disabled")&&Te.test(this.nodeName)&&!Ie.test(t)&&(this.checked||!dt.test(t))}).map(function(t,e){var i=W(this).val();return null==i?null:Array.isArray(i)?W.map(i,function(t){return{name:e.name,value:t.replace($e,"\r\n")}}):{name:e.name,value:i.replace($e,"\r\n")}}).get()}});var De=/%20/g,Se=/#.*$/,ke=/([?&])_=[^&]*/,Ae=/^(.*?):[ \t]*([^\r\n]*)$/gm,Me=/^(?:GET|HEAD)$/,Pe=/^\/\//,Fe={},Oe={},Be="*/".concat("*"),Re=a.createElement("a");function ze(t){return function(e,i){"string"!=typeof e&&(i=e,e="*");var n,o=0,s=e.toLowerCase().match(R)||[];if(b(i))for(;n=s[o++];)"+"===n[0]?(n=n.slice(1)||"*",(t[n]=t[n]||[]).unshift(i)):(t[n]=t[n]||[]).push(i)}}function Ue(t,e,i,n){var o={},s=t===Oe;function a(r){var l;return o[r]=!0,W.each(t[r]||[],function(t,r){var u=r(e,i,n);return"string"!=typeof u||s||o[u]?s?!(l=u):void 0:(e.dataTypes.unshift(u),a(u),!1)}),l}return a(e.dataTypes[0])||!o["*"]&&a("*")}function He(t,e){var i,n,o=W.ajaxSettings.flatOptions||{};for(i in e)void 0!==e[i]&&((o[i]?t:n||(n={}))[i]=e[i]);return n&&W.extend(!0,t,n),t}Re.href=xe.href,W.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:xe.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(xe.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Be,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":W.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?He(He(t,W.ajaxSettings),e):He(W.ajaxSettings,t)},ajaxPrefilter:ze(Fe),ajaxTransport:ze(Oe),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var n,o,s,r,l,u,c,h,d,p,g=W.ajaxSetup({},e),f=g.context||g,m=g.context&&(f.nodeType||f.jquery)?W(f):W.event,y=W.Deferred(),b=W.Callbacks("once memory"),v=g.statusCode||{},w={},x={},E="canceled",C={readyState:0,getResponseHeader:function(t){var e;if(c){if(!r)for(r={};e=Ae.exec(s);)r[e[1].toLowerCase()]=e[2];e=r[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return c?s:null},setRequestHeader:function(t,e){return null==c&&(t=x[t.toLowerCase()]=x[t.toLowerCase()]||t,w[t]=e),this},overrideMimeType:function(t){return null==c&&(g.mimeType=t),this},statusCode:function(t){var e;if(t)if(c)C.always(t[C.status]);else for(e in t)v[e]=[v[e],t[e]];return this},abort:function(t){var e=t||E;return n&&n.abort(e),$(0,e),this}};if(y.promise(C),g.url=((t||g.url||xe.href)+"").replace(Pe,xe.protocol+"//"),g.type=e.method||e.type||g.method||g.type,g.dataTypes=(g.dataType||"*").toLowerCase().match(R)||[""],null==g.crossDomain){u=a.createElement("a");try{u.href=g.url,u.href=u.href,g.crossDomain=Re.protocol+"//"+Re.host!=u.protocol+"//"+u.host}catch(t){g.crossDomain=!0}}if(g.data&&g.processData&&"string"!=typeof g.data&&(g.data=W.param(g.data,g.traditional)),Ue(Fe,g,e,C),c)return C;for(d in(h=W.event&&g.global)&&0==W.active++&&W.event.trigger("ajaxStart"),g.type=g.type.toUpperCase(),g.hasContent=!Me.test(g.type),o=g.url.replace(Se,""),g.hasContent?g.data&&g.processData&&0===(g.contentType||"").indexOf("application/x-www-form-urlencoded")&&(g.data=g.data.replace(De,"+")):(p=g.url.slice(o.length),g.data&&(g.processData||"string"==typeof g.data)&&(o+=(We.test(o)?"&":"?")+g.data,delete g.data),!1===g.cache&&(o=o.replace(ke,"$1"),p=(We.test(o)?"&":"?")+"_="+Ee+++p),g.url=o+p),g.ifModified&&(W.lastModified[o]&&C.setRequestHeader("If-Modified-Since",W.lastModified[o]),W.etag[o]&&C.setRequestHeader("If-None-Match",W.etag[o])),(g.data&&g.hasContent&&!1!==g.contentType||e.contentType)&&C.setRequestHeader("Content-Type",g.contentType),C.setRequestHeader("Accept",g.dataTypes[0]&&g.accepts[g.dataTypes[0]]?g.accepts[g.dataTypes[0]]+("*"!==g.dataTypes[0]?", "+Be+"; q=0.01":""):g.accepts["*"]),g.headers)C.setRequestHeader(d,g.headers[d]);if(g.beforeSend&&(!1===g.beforeSend.call(f,C,g)||c))return C.abort();if(E="abort",b.add(g.complete),C.done(g.success),C.fail(g.error),n=Ue(Oe,g,e,C)){if(C.readyState=1,h&&m.trigger("ajaxSend",[C,g]),c)return C;g.async&&g.timeout>0&&(l=i.setTimeout(function(){C.abort("timeout")},g.timeout));try{c=!1,n.send(w,$)}catch(t){if(c)throw t;$(-1,t)}}else $(-1,"No Transport");function $(t,e,a,r){var u,d,p,w,x,E=e;c||(c=!0,l&&i.clearTimeout(l),n=void 0,s=r||"",C.readyState=t>0?4:0,u=t>=200&&t<300||304===t,a&&(w=function(t,e,i){for(var n,o,s,a,r=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),void 0===n&&(n=t.mimeType||e.getResponseHeader("Content-Type"));if(n)for(o in r)if(r[o]&&r[o].test(n)){l.unshift(o);break}if(l[0]in i)s=l[0];else{for(o in i){if(!l[0]||t.converters[o+" "+l[0]]){s=o;break}a||(a=o)}s=s||a}if(s)return s!==l[0]&&l.unshift(s),i[s]}(g,C,a)),w=function(t,e,i,n){var o,s,a,r,l,u={},c=t.dataTypes.slice();if(c[1])for(a in t.converters)u[a.toLowerCase()]=t.converters[a];for(s=c.shift();s;)if(t.responseFields[s]&&(i[t.responseFields[s]]=e),!l&&n&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=s,s=c.shift())if("*"===s)s=l;else if("*"!==l&&l!==s){if(!(a=u[l+" "+s]||u["* "+s]))for(o in u)if((r=o.split(" "))[1]===s&&(a=u[l+" "+r[0]]||u["* "+r[0]])){!0===a?a=u[o]:!0!==u[o]&&(s=r[0],c.unshift(r[1]));break}if(!0!==a)if(a&&t.throws)e=a(e);else try{e=a(e)}catch(t){return{state:"parsererror",error:a?t:"No conversion from "+l+" to "+s}}}return{state:"success",data:e}}(g,w,C,u),u?(g.ifModified&&((x=C.getResponseHeader("Last-Modified"))&&(W.lastModified[o]=x),(x=C.getResponseHeader("etag"))&&(W.etag[o]=x)),204===t||"HEAD"===g.type?E="nocontent":304===t?E="notmodified":(E=w.state,d=w.data,u=!(p=w.error))):(p=E,!t&&E||(E="error",t<0&&(t=0))),C.status=t,C.statusText=(e||E)+"",u?y.resolveWith(f,[d,E,C]):y.rejectWith(f,[C,E,p]),C.statusCode(v),v=void 0,h&&m.trigger(u?"ajaxSuccess":"ajaxError",[C,g,u?d:p]),b.fireWith(f,[C,E]),h&&(m.trigger("ajaxComplete",[C,g]),--W.active||W.event.trigger("ajaxStop")))}return C},getJSON:function(t,e,i){return W.get(t,e,i,"json")},getScript:function(t,e){return W.get(t,void 0,e,"script")}}),W.each(["get","post"],function(t,e){W[e]=function(t,i,n,o){return b(i)&&(o=o||n,n=i,i=void 0),W.ajax(W.extend({url:t,type:e,dataType:o,data:i,success:n},W.isPlainObject(t)&&t))}}),W._evalUrl=function(t){return W.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},W.fn.extend({wrapAll:function(t){var e;return this[0]&&(b(t)&&(t=t.call(this[0])),e=W(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this},wrapInner:function(t){return b(t)?this.each(function(e){W(this).wrapInner(t.call(this,e))}):this.each(function(){var e=W(this),i=e.contents();i.length?i.wrapAll(t):e.append(t)})},wrap:function(t){var e=b(t);return this.each(function(i){W(this).wrapAll(e?t.call(this,i):t)})},unwrap:function(t){return this.parent(t).not("body").each(function(){W(this).replaceWith(this.childNodes)}),this}}),W.expr.pseudos.hidden=function(t){return!W.expr.pseudos.visible(t)},W.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},W.ajaxSettings.xhr=function(){try{return new i.XMLHttpRequest}catch(t){}};var Ne={0:200,1223:204},Ke=W.ajaxSettings.xhr();y.cors=!!Ke&&"withCredentials"in Ke,y.ajax=Ke=!!Ke,W.ajaxTransport(function(t){var e,n;if(y.cors||Ke&&!t.crossDomain)return{send:function(o,s){var a,r=t.xhr();if(r.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)r[a]=t.xhrFields[a];for(a in t.mimeType&&r.overrideMimeType&&r.overrideMimeType(t.mimeType),t.crossDomain||o["X-Requested-With"]||(o["X-Requested-With"]="XMLHttpRequest"),o)r.setRequestHeader(a,o[a]);e=function(t){return function(){e&&(e=n=r.onload=r.onerror=r.onabort=r.ontimeout=r.onreadystatechange=null,"abort"===t?r.abort():"error"===t?"number"!=typeof r.status?s(0,"error"):s(r.status,r.statusText):s(Ne[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=e(),n=r.onerror=r.ontimeout=e("error"),void 0!==r.onabort?r.onabort=n:r.onreadystatechange=function(){4===r.readyState&&i.setTimeout(function(){e&&n()})},e=e("abort");try{r.send(t.hasContent&&t.data||null)}catch(t){if(e)throw t}},abort:function(){e&&e()}}}),W.ajaxPrefilter(function(t){t.crossDomain&&(t.contents.script=!1)}),W.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return W.globalEval(t),t}}}),W.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),W.ajaxTransport("script",function(t){var e,i;if(t.crossDomain)return{send:function(n,o){e=W("