diff --git a/.github/workflows/build_client.yaml b/.github/workflows/build_client.yaml index 6156b565f939..c31032013902 100644 --- a/.github/workflows/build_client.yaml +++ b/.github/workflows/build_client.yaml @@ -32,5 +32,7 @@ jobs: path: 'galaxy root/static' - name: Build client if: steps.cache.outputs.cache-hit != 'true' + env: + GALAXY_PLUGIN_BUILD_FAIL_ON_ERROR: 1 run: make client working-directory: 'galaxy root' diff --git a/.gitignore b/.gitignore index c6a6ef01a756..1a6b7d7f2a07 100644 --- a/.gitignore +++ b/.gitignore @@ -167,14 +167,14 @@ packages/*/*.egg-info config/plugins/**/static/dist config/plugins/**/static/script.js config/plugins/**/static/main.css +config/plugins/**/static/script.css config/plugins/**/static/plugin_build_hash.txt config/plugins/**/static/*.map # Viz-specific build artifacts to ignore (until these are removed from codebase) config/plugins/visualizations/annotate_image/static/jquery.contextMenu.css config/plugins/visualizations/nvd3/nvd3_bar/static/nvd3.js -config/plugins/visualizations/h5web/static/script.css -config/plugins/visualizations/tiffviewer/static/script.css +config/plugins/visualizations/scatterplot/static/scatterplot.js # CWL conformance tests lib/galaxy_test/api/cwl/test_cwl_conformance_v1_?.py diff --git a/Makefile b/Makefile index 9328721f9b4c..e53f65370ceb 100644 --- a/Makefile +++ b/Makefile @@ -13,10 +13,12 @@ OPEN_RESOURCE=bash -c 'open $$0 || xdg-open $$0' SLIDESHOW_TO_PDF?=bash -c 'docker run --rm -v `pwd`:/cwd astefanutti/decktape /cwd/$$0 /cwd/`dirname $$0`/`basename -s .html $$0`.pdf' YARN := $(shell $(IN_VENV) command -v yarn 2> /dev/null) YARN_INSTALL_OPTS=--network-timeout 300000 --check-files +# Default to not fail on error, set to 1 to fail client builds on a plugin error. +GALAXY_PLUGIN_BUILD_FAIL_ON_ERROR?=0 # Respect predefined NODE_OPTIONS, otherwise set maximum heap size low for # compatibility with smaller machines. NODE_OPTIONS ?= --max-old-space-size=3072 -NODE_ENV = env NODE_OPTIONS=$(NODE_OPTIONS) +NODE_ENV = env NODE_OPTIONS=$(NODE_OPTIONS) GALAXY_PLUGIN_BUILD_FAIL_ON_ERROR=$(GALAXY_PLUGIN_BUILD_FAIL_ON_ERROR) CWL_TARGETS := test/functional/tools/cwl_tools/v1.0/conformance_tests.yaml \ test/functional/tools/cwl_tools/v1.1/conformance_tests.yaml \ test/functional/tools/cwl_tools/v1.2/conformance_tests.yaml \ diff --git a/client/gulpfile.js b/client/gulpfile.js index 839f1df505f9..873bae0c0bd8 100644 --- a/client/gulpfile.js +++ b/client/gulpfile.js @@ -27,16 +27,17 @@ const STATIC_PLUGIN_BUILD_IDS = [ "msa", "mvpapp", "ngl", + "nora", "nvd3/nvd3_bar", "openlayers", "openseadragon", "PCA_3Dplot", "phylocanvas", "pv", - "nora", - "venn", + "scatterplot", "tiffviewer", "ts_visjs", + "venn", ]; const DIST_PLUGIN_BUILD_IDS = ["new_user"]; const PLUGIN_BUILD_IDS = Array.prototype.concat(DIST_PLUGIN_BUILD_IDS, STATIC_PLUGIN_BUILD_IDS); @@ -56,6 +57,11 @@ const PATHS = { }, }; +const failOnError = + process.env.GALAXY_PLUGIN_BUILD_FAIL_ON_ERROR && process.env.GALAXY_PLUGIN_BUILD_FAIL_ON_ERROR !== "0" + ? true + : false; + PATHS.pluginBaseDir = (process.env.GALAXY_PLUGIN_PATH && process.env.GALAXY_PLUGIN_PATH !== "None" ? process.env.GALAXY_PLUGIN_PATH @@ -186,6 +192,13 @@ function buildPlugins(callback, forceRebuild) { console.error( `Error building ${pluginName}, not saving build state. Please report this issue to the Galaxy Team.` ); + if (failOnError) { + // Fail on error. + console.error( + "Failing build due to GALAXY_PLUGIN_BUILD_FAIL_ON_ERROR being set, see error(s) above." + ); + process.exit(1); + } } } }); diff --git a/config/plugins/visualizations/annotate_image/package.json b/config/plugins/visualizations/annotate_image/package.json index 10db53070442..f546269cf52a 100644 --- a/config/plugins/visualizations/annotate_image/package.json +++ b/config/plugins/visualizations/annotate_image/package.json @@ -8,18 +8,18 @@ ], "license": "AFL-3.0", "dependencies": { - "babel-preset-env": "^1.6.1", - "backbone": "^1.3.3", "jquery": "^3.3.1", "jquery-contextmenu": "^2.7.1", "jquery.ui.position": "^1.11.4", "paper": "^0.12.3", - "parcel-bundler": "^1.4.1", "underscore": "^1.8.3" }, + "devDependencies": { + "parcel": "2.12.0" + }, "scripts": { "build": "yarn build-css && yarn build-js", "build-css": "cp 'node_modules/jquery-contextmenu/dist/jquery.contextMenu.css' 'static/'", - "build-js": "parcel build src/script.js -d static --no-source-maps" + "build-js": "parcel build src/script.js --dist-dir static" } } diff --git a/config/plugins/visualizations/annotate_image/src/jq-loader.js b/config/plugins/visualizations/annotate_image/src/jq-loader.js new file mode 100644 index 000000000000..0b3c6bdb4acd --- /dev/null +++ b/config/plugins/visualizations/annotate_image/src/jq-loader.js @@ -0,0 +1,3 @@ +import jquery from "jquery"; + +export default window.$ = window.jQuery = jquery; diff --git a/config/plugins/visualizations/annotate_image/src/script.js b/config/plugins/visualizations/annotate_image/src/script.js index d97fe758420e..443c1932b6cf 100644 --- a/config/plugins/visualizations/annotate_image/src/script.js +++ b/config/plugins/visualizations/annotate_image/src/script.js @@ -1,4 +1,4 @@ -import $ from "jquery"; +import $ from "./jq-loader"; import "jquery-contextmenu"; import "jquery.ui.position"; import _ from "underscore"; @@ -11,7 +11,7 @@ function prefixedDownloadUrl(root, path) { return `${root}/${path}`.replace(slashCleanup, "/"); } -const CommandManager = (function() { +const CommandManager = (function () { function CommandManager() {} CommandManager.executed = []; @@ -50,9 +50,9 @@ const CommandManager = (function() { return CommandManager; })(); -const generateUUID = function() { +const generateUUID = function () { let d = new Date().getTime(); - const uuid = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) { + const uuid = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) { const r = (d + Math.random() * 16) % 16 | 0; d = Math.floor(d / 16); return (c == "x" ? r : (r & 0x7) | 0x8).toString(16); @@ -65,29 +65,29 @@ window.bundleEntries.load = function (opt) { const chart = opt.chart; const dataset = opt.dataset; const defaults = { color: "red", width: 4, opacity: 0.5 }; - $.fn.createCanvas = function(options) { + $.fn.createCanvas = function (options) { let settings = $.extend({}, defaults, options || {}); const self = this; - this.setOptions = function(options) { + this.setOptions = function (options) { settings = $.extend(settings, options); }; - $(document).ready(function() { - $(self).each(function(eachIndex, eachItem) { + $(document).ready(function () { + $(self).each(function (eachIndex, eachItem) { self.paths = []; const img = eachItem; // Get a reference to the canvas object const canvas = $("") .attr({ width: options.img_width + "px", - height: options.img_height + "px" + height: options.img_height + "px", }) .addClass("image-canvas") .css({ position: "absolute", top: "0px", - left: "0px" + left: "0px", }); $(img).after(canvas); $(img).data("paths", []); @@ -96,13 +96,13 @@ window.bundleEntries.load = function (opt) { canvas[0].width = options.img_width; canvas[0].height = options.img_height; - $(canvas).mouseenter(function() { + $(canvas).mouseenter(function () { paper.projects[eachIndex].activate(); }); // Create a simple drawing tool: const tool = new paper.Tool(); - tool.onMouseMove = function(event) { + tool.onMouseMove = function (event) { if (!$(".context-menu-list").is(":visible")) { paper.project.activeLayer.selected = false; self.setPenColor(settings.color); @@ -116,7 +116,7 @@ window.bundleEntries.load = function (opt) { } }; - tool.onMouseDown = function(event) { + tool.onMouseDown = function (event) { switch (event.event.button) { // leftclick case 0: @@ -137,7 +137,7 @@ window.bundleEntries.load = function (opt) { } }; - tool.onMouseDrag = function(event) { + tool.onMouseDrag = function (event) { switch (event.event.button) { // leftclick case 0: @@ -162,7 +162,7 @@ window.bundleEntries.load = function (opt) { } }; - tool.onMouseUp = function(event) { + tool.onMouseUp = function (event) { switch (event.event.button) { // leftclick case 0: @@ -171,11 +171,11 @@ window.bundleEntries.load = function (opt) { const selectedItemId = selectedItem.id; const draggingStartPoint = { x: mouseDownPoint.x, y: mouseDownPoint.y }; CommandManager.execute({ - execute: function() { + execute: function () { //item was already moved, so do nothing }, - unexecute: function() { - $(paper.project.activeLayer.children).each(function(index, item) { + unexecute: function () { + $(paper.project.activeLayer.children).each(function (index, item) { if (item.id == selectedItemId) { if (item.segments) { new paper.Point( @@ -196,7 +196,7 @@ window.bundleEntries.load = function (opt) { return false; } }); - } + }, }); mouseDownPoint = null; } @@ -207,20 +207,20 @@ window.bundleEntries.load = function (opt) { const strPath = path.exportJSON({ asString: true }); const uid = generateUUID(); CommandManager.execute({ - execute: function() { + execute: function () { path = new paper.Path(); path.importJSON(strPath); path.data.uid = uid; }, - unexecute: function() { - $(paper.project.activeLayer.children).each(function(index, item) { + unexecute: function () { + $(paper.project.activeLayer.children).each(function (index, item) { if (item.data && item.data.uid) { if (item.data.uid == uid) { item.remove(); } } }); - } + }, }); } break; @@ -233,7 +233,7 @@ window.bundleEntries.load = function (opt) { } }; - tool.onKeyUp = function(event) { + tool.onKeyUp = function (event) { if (selectedItem) { // When a key is released, set the content of the text item: if (selectedItem.content) { @@ -254,7 +254,7 @@ window.bundleEntries.load = function (opt) { //let contextSelectedItemId; let selectedItem; let mouseDownPoint; - this.downloadCanvas = function(canvas, filename) { + this.downloadCanvas = function (canvas, filename) { /// create an "off-screen" anchor tag const lnk = document.createElement("a"); @@ -276,12 +276,12 @@ window.bundleEntries.load = function (opt) { } }; - this.download = function() { + this.download = function () { const canvas = paper.project.activeLayer.view.element; const img = $(canvas)[0]; const mergeCanvas = $("").attr({ width: img.width, - height: img.height + height: img.height, }); const mergedContext = mergeCanvas[0].getContext("2d"); mergedContext.clearRect(0, 0, img.width, img.height); @@ -290,12 +290,10 @@ window.bundleEntries.load = function (opt) { self.downloadCanvas(mergeCanvas[0], "only-annotations.png"); // create canvas for original and annotations - const annotated_img = $(canvas) - .parent() - .find("img")[0]; + const annotated_img = $(canvas).parent().find("img")[0]; const mergeCanvasAnnotated = $("").attr({ width: $(annotated_img).width(), - height: $(annotated_img).height() + height: $(annotated_img).height(), }); const mergedContextAnnotated = mergeCanvasAnnotated[0].getContext("2d"); mergedContextAnnotated.clearRect(0, 0, $(annotated_img).width(), $(annotated_img).height()); @@ -304,11 +302,11 @@ window.bundleEntries.load = function (opt) { self.downloadCanvas(mergeCanvasAnnotated[0], "original-with-annotations.png"); }; - this.setText = function() { + this.setText = function () { const uid = generateUUID(); const pos = contextPoint; CommandManager.execute({ - execute: function() { + execute: function () { const TXT_DBL_CLICK = "<>"; const txt = TXT_DBL_CLICK; const text = new paper.PointText(pos); @@ -318,26 +316,26 @@ window.bundleEntries.load = function (opt) { text.fontFamily = "sans-serif"; text.data.uid = uid; text.opacity = settings.opacity; - text.onDoubleClick = function(event) { + text.onDoubleClick = function (event) { if (this.className == "PointText") { const txt = window.prompt("Type in your text", this.content.replace(TXT_DBL_CLICK, "")); if (txt.length > 0) this.content = txt; } }; }, - unexecute: function() { - $(paper.project.activeLayer.children).each(function(index, item) { + unexecute: function () { + $(paper.project.activeLayer.children).each(function (index, item) { if (item.data && item.data.uid) { if (item.data.uid == uid) { item.remove(); } } }); - } + }, }); }; - this.setPenColor = function(color) { + this.setPenColor = function (color) { self.setOptions({ color: color }); $(".image-canvas").css( "cursor", @@ -345,14 +343,14 @@ window.bundleEntries.load = function (opt) { ); }; - this.setCursorHandOpen = function() { + this.setCursorHandOpen = function () { $(".image-canvas").css( "cursor", "url(/static/plugins/visualizations/annotate_image/static/images/hand-open.png) 25 25, auto" ); }; - this.setCursorHandClose = function() { + this.setCursorHandClose = function () { $(".image-canvas").css( "cursor", "url(/static/plugins/visualizations/annotate_image/static/images/hand-close.png) 25 25, auto" @@ -361,7 +359,7 @@ window.bundleEntries.load = function (opt) { $.contextMenu({ selector: ".image-canvas", - callback: function(key, options) { + callback: function (key, options) { switch (key) { //COMMANDS case "undo": @@ -406,53 +404,60 @@ window.bundleEntries.load = function (opt) { redPen: { name: "Red Pen", icon: "redpen" }, greenPen: { name: "Green Pen", icon: "greenpen" }, bluePen: { name: "Blue Pen", icon: "bluepen" }, - yellowPen: { name: "Yellow Pen", icon: "yellowpen" } - } + yellowPen: { name: "Yellow Pen", icon: "yellowpen" }, + }, }); const $menuList = $(".context-menu-list"); $menuList.find(".context-menu-icon-text").css({ "background-image": "url(/static/plugins/visualizations/annotate_image/static/images/text.png)", "background-repeat": "no-repeat", - "background-position": "right 96% bottom 45%" + "background-position": "right 96% bottom 45%", }); $menuList.find(".context-menu-icon-blackpen").css({ "background-image": "url(/static/plugins/visualizations/annotate_image/static/images/blackpen.png)", "background-repeat": "no-repeat", - "background-position": "right 97% bottom 48%" + "background-position": "right 97% bottom 48%", }); $menuList.find(".context-menu-icon-redpen").css({ "background-image": "url(/static/plugins/visualizations/annotate_image/static/images/redpen.png)", "background-repeat": "no-repeat", - "background-position": "right 97% bottom 48%" + "background-position": "right 97% bottom 48%", }); $menuList.find(".context-menu-icon-greenpen").css({ "background-image": "url(/static/plugins/visualizations/annotate_image/static/images/greenpen.png)", "background-repeat": "no-repeat", - "background-position": "right 97% bottom 48%" + "background-position": "right 97% bottom 48%", }); $menuList.find(".context-menu-icon-bluepen").css({ "background-image": "url(/static/plugins/visualizations/annotate_image/static/images/bluepen.png)", "background-repeat": "no-repeat", - "background-position": "right 97% bottom 48%" + "background-position": "right 97% bottom 48%", }); $menuList.find(".context-menu-icon-yellowpen").css({ "background-image": "url(/static/plugins/visualizations/annotate_image/static/images/yellowpen.png)", "background-repeat": "no-repeat", - "background-position": "right 97% bottom 48%" + "background-position": "right 97% bottom 48%", }); }; const downloadUrl = prefixedDownloadUrl(opt.root, dataset.download_url); - $.ajax({ - url: downloadUrl, - success: function(content) { + + fetch(downloadUrl) + .then((response) => { + if (!response.ok) { + throw new Error("Failed to access dataset."); + } + return response.text(); + }) + .then((content) => { const $chartViewer = $("#" + opt.target); $chartViewer.html(""); $chartViewer.css("overflow", "auto"); $chartViewer.css("position", "relative"); + const $image = $chartViewer.find("img"); - $image.on("load", function() { + $image.on("load", function () { const width = $(this).width(); const height = $(this).height(); $image.width(width); @@ -462,15 +467,15 @@ window.bundleEntries.load = function (opt) { width: 2, opacity: 0.5, img_width: width, - img_height: height + img_height: height, }); }); + chart.state("ok", "Chart drawn."); opt.process.resolve(); - }, - error: function() { - chart.state("failed", "Failed to access dataset."); + }) + .catch((error) => { + chart.state("failed", error.message); opt.process.resolve(); - } - }); -} + }); +}; diff --git a/config/plugins/visualizations/cytoscape/package.json b/config/plugins/visualizations/cytoscape/package.json index aa88f0509694..09a404bb7918 100644 --- a/config/plugins/visualizations/cytoscape/package.json +++ b/config/plugins/visualizations/cytoscape/package.json @@ -11,10 +11,12 @@ "backbone": "^1.3.3", "bootstrap": "^3.3.7", "cytoscape": "^3.2.8", - "jquery": "^3.1.1", - "parcel-bundler": "^1.4.1" + "jquery": "^3.1.1" }, "scripts": { - "build": "parcel build src/script.js -d static" + "build": "parcel build src/script.js --dist-dir static" + }, + "devDependencies": { + "parcel": "^2.12.0" } } diff --git a/config/plugins/visualizations/drawrna/package.json b/config/plugins/visualizations/drawrna/package.json index 32c8a975f938..a49aac80c338 100644 --- a/config/plugins/visualizations/drawrna/package.json +++ b/config/plugins/visualizations/drawrna/package.json @@ -11,10 +11,15 @@ "backbone": "^1.3.3", "bootstrap": "^3.3.7", "drawrnajs": "^1.2.6", - "jquery": "^3.1.1", - "parcel-bundler": "^1.4.1" + "jquery": "^3.1.1" }, "scripts": { - "build": "parcel build src/script.js -d static" + "build": "parcel build src/script.js --dist-dir static" + }, + "devDependencies": { + "os-browserify": "^0.3.0", + "parcel": "^2.12.0", + "path-browserify": "^1.0.0", + "process": "^0.11.10" } } diff --git a/config/plugins/visualizations/example/package.json b/config/plugins/visualizations/example/package.json index e55624549917..199cab67b083 100644 --- a/config/plugins/visualizations/example/package.json +++ b/config/plugins/visualizations/example/package.json @@ -13,10 +13,12 @@ "bootstrap": "^3.3.7", "d3": "^4.12.2", "jquery": "^3.1.1", - "parcel-bundler": "^1.4.1", "underscore": "^1.8.3" }, "scripts": { - "build": "parcel build src/script.js -d static" + "build": "parcel build src/script.js --dist-dir static" + }, + "devDependencies": { + "parcel": "2.11.0" } } diff --git a/config/plugins/visualizations/fits_image_viewer/package.json b/config/plugins/visualizations/fits_image_viewer/package.json index 5e09ac1369f6..207687567ec8 100644 --- a/config/plugins/visualizations/fits_image_viewer/package.json +++ b/config/plugins/visualizations/fits_image_viewer/package.json @@ -8,10 +8,12 @@ "license": "AFL-3.0", "dependencies": { "aladin-lite-galaxy": "^1.0.0", - "parcel-bundler": "^1.4.1", "cpy-cli": "^5.0.0" }, "scripts": { - "build": "cpy --flat node_modules/aladin-lite-galaxy static/dist/aladin-lite-galaxy && parcel build src/script.js -d static" + "build": "cpy --flat node_modules/aladin-lite-galaxy static/dist/aladin-lite-galaxy && parcel build src/script.js --dist-dir static" + }, + "devDependencies": { + "parcel": "^2.12.0" } } diff --git a/config/plugins/visualizations/h5web/package.json b/config/plugins/visualizations/h5web/package.json index bf378c84849c..928466adde0f 100644 --- a/config/plugins/visualizations/h5web/package.json +++ b/config/plugins/visualizations/h5web/package.json @@ -18,6 +18,6 @@ "build": "parcel build src/script.js --dist-dir static" }, "devDependencies": { - "parcel": "^2.9.3" + "parcel": "^2.12.0" } } diff --git a/config/plugins/visualizations/heatmap/heatmap_default/package.json b/config/plugins/visualizations/heatmap/heatmap_default/package.json index cba60b4093a3..91f3d0006ca5 100644 --- a/config/plugins/visualizations/heatmap/heatmap_default/package.json +++ b/config/plugins/visualizations/heatmap/heatmap_default/package.json @@ -13,10 +13,12 @@ "bootstrap": "^3.3.7", "d3": "3", "jquery": "^3.5.1", - "parcel-bundler": "^1.4.1", "underscore": "^1.11.0" }, "scripts": { - "build": "parcel build src/script.js -d static/dist" + "build": "parcel build src/script.js --dist-dir static/dist" + }, + "devDependencies": { + "parcel": "2.11.0" } } diff --git a/config/plugins/visualizations/jqplot/jqplot_bar/package.json b/config/plugins/visualizations/jqplot/jqplot_bar/package.json index 742ba614614f..8339d5f3b978 100644 --- a/config/plugins/visualizations/jqplot/jqplot_bar/package.json +++ b/config/plugins/visualizations/jqplot/jqplot_bar/package.json @@ -14,10 +14,12 @@ "d3": "^4.12.2", "jqplot-exported": "^1.0.9-pm.9", "jquery": "^3.1.1", - "parcel-bundler": "^1.4.1", "underscore": "^1.13.1" }, "scripts": { - "build": "parcel build src/script.js -d static" + "build": "parcel build src/script.js --dist-dir static" + }, + "devDependencies": { + "parcel": "2.11.0" } } diff --git a/config/plugins/visualizations/jqplot/jqplot_bar/static/script.css b/config/plugins/visualizations/jqplot/jqplot_bar/static/script.css deleted file mode 100644 index ed2c415f376f..000000000000 --- a/config/plugins/visualizations/jqplot/jqplot_bar/static/script.css +++ /dev/null @@ -1,2 +0,0 @@ -.jqplot-target{position:relative;color:#666;font-family:Trebuchet MS,Arial,Helvetica,sans-serif;font-size:1em}.jqplot-axis{font-size:.75em}.jqplot-xaxis{margin-top:10px}.jqplot-x2axis{margin-bottom:10px}.jqplot-yaxis{margin-right:10px}.jqplot-y2axis,.jqplot-y3axis,.jqplot-y4axis,.jqplot-y5axis,.jqplot-y6axis,.jqplot-y7axis,.jqplot-y8axis,.jqplot-y9axis,.jqplot-yMidAxis{margin-left:10px;margin-right:10px}.jqplot-axis-tick,.jqplot-x2axis-tick,.jqplot-xaxis-tick,.jqplot-y2axis-tick,.jqplot-y3axis-tick,.jqplot-y4axis-tick,.jqplot-y5axis-tick,.jqplot-y6axis-tick,.jqplot-y7axis-tick,.jqplot-y8axis-tick,.jqplot-y9axis-tick,.jqplot-yaxis-tick,.jqplot-yMidAxis-tick{position:absolute;white-space:pre}.jqplot-xaxis-tick{top:0;left:15px;vertical-align:top}.jqplot-x2axis-tick{bottom:0;left:15px;vertical-align:bottom}.jqplot-yaxis-tick{right:0;top:15px;text-align:right}.jqplot-yaxis-tick.jqplot-breakTick{right:-20px;margin-right:0;padding:1px 5px;z-index:2;font-size:1.5em}.jqplot-y2axis-tick,.jqplot-y3axis-tick,.jqplot-y4axis-tick,.jqplot-y5axis-tick,.jqplot-y6axis-tick,.jqplot-y7axis-tick,.jqplot-y8axis-tick,.jqplot-y9axis-tick{left:0;top:15px;text-align:left}.jqplot-yMidAxis-tick{text-align:center;white-space:nowrap}.jqplot-xaxis-label{margin-top:10px;font-size:11pt;position:absolute}.jqplot-x2axis-label{margin-bottom:10px;font-size:11pt;position:absolute}.jqplot-yaxis-label{margin-right:10px}.jqplot-yaxis-label,.jqplot-yMidAxis-label{font-size:11pt;position:absolute}.jqplot-y2axis-label,.jqplot-y3axis-label,.jqplot-y4axis-label,.jqplot-y5axis-label,.jqplot-y6axis-label,.jqplot-y7axis-label,.jqplot-y8axis-label,.jqplot-y9axis-label{font-size:11pt;margin-left:10px;position:absolute}.jqplot-meterGauge-tick{font-size:.75em;color:#999}.jqplot-meterGauge-label{font-size:1em;color:#999}table.jqplot-table-legend{margin:12px}table.jqplot-cursor-legend,table.jqplot-table-legend{background-color:hsla(0,0%,100%,.6);border:1px solid #ccc;position:absolute;font-size:.75em}td.jqplot-table-legend{vertical-align:middle}td.jqplot-seriesToggle:active,td.jqplot-seriesToggle:hover{cursor:pointer}.jqplot-table-legend .jqplot-series-hidden{text-decoration:line-through}div.jqplot-table-legend-swatch-outline{border:1px solid #ccc;padding:1px}div.jqplot-table-legend-swatch{width:0;height:0;border-width:5px 6px;border-style:solid}.jqplot-title{top:0;left:0;padding-bottom:.5em;font-size:1.2em}table.jqplot-cursor-tooltip{border:1px solid #ccc;font-size:.75em}.jqplot-canvasOverlay-tooltip,.jqplot-cursor-tooltip,.jqplot-highlighter-tooltip{border:1px solid #ccc;font-size:.75em;white-space:nowrap;background:hsla(0,0%,81.6%,.5);padding:1px}.jqplot-point-label{font-size:.75em;z-index:2}td.jqplot-cursor-legend-swatch{vertical-align:middle;text-align:center}div.jqplot-cursor-legend-swatch{width:1.2em;height:.7em}.jqplot-error{text-align:center}.jqplot-error-message{position:relative;top:46%;display:inline-block}div.jqplot-bubble-label{font-size:.8em;padding-left:2px;padding-right:2px;color:#333}div.jqplot-bubble-label.jqplot-bubble-label-highlight{background:hsla(0,0%,89.8%,.7)}div.jqplot-noData-container{text-align:center;background-color:hsla(0,0%,96.1%,.3)} -/*# sourceMappingURL=/script.css.map */ \ No newline at end of file diff --git a/config/plugins/visualizations/msa/package.json b/config/plugins/visualizations/msa/package.json index baf7f6ea00ab..1a011c6ef6b1 100644 --- a/config/plugins/visualizations/msa/package.json +++ b/config/plugins/visualizations/msa/package.json @@ -8,10 +8,12 @@ "license": "AFL-3.0", "dependencies": { "babel-plugin-transform-export-extensions": "^6.22.0", - "babel-preset-env": "^1.6.1", - "parcel-bundler": "^1.4.1" + "babel-preset-env": "^1.6.1" }, "scripts": { - "build": "parcel build src/script.js -d static" + "build": "parcel build src/script.js --dist-dir static" + }, + "devDependencies": { + "parcel": "^2.12.0" } } diff --git a/config/plugins/visualizations/ngl/package.json b/config/plugins/visualizations/ngl/package.json index 306200ac7400..724d0011652e 100644 --- a/config/plugins/visualizations/ngl/package.json +++ b/config/plugins/visualizations/ngl/package.json @@ -12,10 +12,12 @@ "backbone": "^1.3.3", "bootstrap": "^3.3.7", "jquery": "^3.1.1", - "parcel-bundler": "^1.4.1", "ngl": "^0.10.4" }, "scripts": { - "build": "parcel build src/ngl.js -d static/dist" + "build": "parcel build src/ngl.js --dist-dir static/dist" + }, + "devDependencies": { + "parcel": "^2.12.0" } } diff --git a/config/plugins/visualizations/nvd3/nvd3_bar/.babelrc b/config/plugins/visualizations/nvd3/nvd3_bar/.babelrc deleted file mode 100644 index 0339d5d0ee6a..000000000000 --- a/config/plugins/visualizations/nvd3/nvd3_bar/.babelrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "presets": ["env"] -} diff --git a/config/plugins/visualizations/nvd3/nvd3_bar/package.json b/config/plugins/visualizations/nvd3/nvd3_bar/package.json index fc0090764f97..e4d89d580357 100644 --- a/config/plugins/visualizations/nvd3/nvd3_bar/package.json +++ b/config/plugins/visualizations/nvd3/nvd3_bar/package.json @@ -10,19 +10,18 @@ "license": "AFL-3.0", "dependencies": { "@galaxyproject/charts": "^0.1.0", - "babel-preset-env": "^1.6.1", "backbone": "^1.3.3", "bootstrap": "^3.3.7", "d3": "^3.4.5", "jquery": "^3.3.1", "nvd3": "^1.8.6", - "parcel-bundler": "^1.4.1", "underscore": "^1.8.3" }, "scripts": { - "build": "parcel build src/nvd3.js -d static" + "build": "parcel build src/nvd3.js --dist-dir static" }, "devDependencies": { - "babel-core": "^6.26.3" + "@babel/core": "^7.24.6", + "parcel": "2.11.0" } } diff --git a/config/plugins/visualizations/nvd3/nvd3_bar/src/nvd3.js b/config/plugins/visualizations/nvd3/nvd3_bar/src/nvd3.js index 56eb8dda9c39..9fa4f7d81b69 100644 --- a/config/plugins/visualizations/nvd3/nvd3_bar/src/nvd3.js +++ b/config/plugins/visualizations/nvd3/nvd3_bar/src/nvd3.js @@ -1,9 +1,10 @@ /** This is the common wrapper for nvd3 based visualizations. */ import * as d3 from "d3"; -import * as nv from "nvd3"; import * as Backbone from "backbone"; import * as _ from "underscore"; +import "nvd3"; + // TODO Disentangle jquery in the future /* global $ */ diff --git a/config/plugins/visualizations/openlayers/package.json b/config/plugins/visualizations/openlayers/package.json index 2a414af0d985..17f1cb6c590f 100644 --- a/config/plugins/visualizations/openlayers/package.json +++ b/config/plugins/visualizations/openlayers/package.json @@ -1,7 +1,7 @@ { "name": "visualization", "version": "0.1.0", - "description": "Map visualization usig OpenLayers", + "description": "Map visualization using OpenLayers", "keywords": [ "galaxy", "visualization" @@ -17,12 +17,17 @@ "jszip": "^3.2.2", "jszip-utils": "^0.1.0", "ol": "^5.3.3", - "parcel-bundler": "^1.4.1", "proj4": "^2.5.0", "shpjs": "^3.4.3", "underscore": "^1.8.3" }, "scripts": { - "build": "parcel build src/script.js -d static --no-source-maps" + "build": "parcel build src/script.js --dist-dir static --no-source-maps" + }, + "devDependencies": { + "buffer": "^6.0.3", + "parcel": "^2.12.0", + "process": "^0.11.10", + "string_decoder": "^1.3.0" } } diff --git a/config/plugins/visualizations/phylocanvas/package.json b/config/plugins/visualizations/phylocanvas/package.json index 596c2e03908f..24d6e23f0fb5 100644 --- a/config/plugins/visualizations/phylocanvas/package.json +++ b/config/plugins/visualizations/phylocanvas/package.json @@ -9,10 +9,13 @@ "dependencies": { "@phylocanvas/phylocanvas.gl": "^1.48.0", "babel-preset-env": "^1.6.1", - "deck.gl": "^8.8.23", - "parcel-bundler": "^1.4.1" + "deck.gl": "^8.8.23" }, "scripts": { - "build": "parcel build src/script.js -d static" + "build": "parcel build src/script.js --dist-dir static" + }, + "devDependencies": { + "parcel": "^2.12.0", + "process": "^0.11.10" } } diff --git a/config/plugins/visualizations/pv/package.json b/config/plugins/visualizations/pv/package.json index 1b180a11eae9..0072af5f6494 100644 --- a/config/plugins/visualizations/pv/package.json +++ b/config/plugins/visualizations/pv/package.json @@ -8,10 +8,12 @@ ], "license": "AFL-3.0", "dependencies": { - "bio-pv": "^1.8.1", - "parcel-bundler": "^1.12.4" + "bio-pv": "^1.8.1" }, "scripts": { - "build": "parcel build src/pv.js -d static/dist" + "build": "parcel build src/pv.js --dist-dir static/dist" + }, + "devDependencies": { + "parcel": "^2.12.0" } } diff --git a/config/plugins/visualizations/scatterplot/.babelrc b/config/plugins/visualizations/scatterplot/.babelrc deleted file mode 100644 index 35bc14391a25..000000000000 --- a/config/plugins/visualizations/scatterplot/.babelrc +++ /dev/null @@ -1,11 +0,0 @@ -{ - "presets": ["env"], - "plugins": [ - [ - "auto-import", - { - "declarations": [{ "default": "$", "path": "jquery" }, { "default": "jQuery", "path": "jquery" }] - } - ] - ] -} diff --git a/config/plugins/visualizations/scatterplot/package.json b/config/plugins/visualizations/scatterplot/package.json index b383015553aa..c64835fcc2cd 100644 --- a/config/plugins/visualizations/scatterplot/package.json +++ b/config/plugins/visualizations/scatterplot/package.json @@ -1,11 +1,7 @@ { "name": "galaxy-scatterplot", - "version": "0.0.0", + "version": "0.0.1", "description": "Scatterplot visualization plugin for the Galaxy informatics framework", - "main": " ", - "scripts": { - "build": "parcel build src/scatterplot.js -d static/" - }, "keywords": [ "galaxy", "visualization", @@ -14,17 +10,17 @@ "author": "Carl Eberhard", "license": "0BSD", "dependencies": { - "babel-plugin-auto-import": "^0.7.1", - "babel-preset-env": "^1.6.1", "backbone": "^1.3.3", "bootstrap": "^3.3.7", "d3": "^3.5.17", "jquery": "^3.2.1", "jquery-ui-bundle": "^1.12.1-migrate", - "parcel-bundler": "^1.6.2", "underscore": "^1.8.3" }, "devDependencies": { - "babel-core": "^6.26.3" + "parcel": "2.11.0" + }, + "scripts": { + "build": "parcel build src/scatterplot.js --dist-dir static" } } diff --git a/config/plugins/visualizations/scatterplot/src/jqglobals.js b/config/plugins/visualizations/scatterplot/src/jqglobals.js index d645ae970297..313a5d2ccf34 100644 --- a/config/plugins/visualizations/scatterplot/src/jqglobals.js +++ b/config/plugins/visualizations/scatterplot/src/jqglobals.js @@ -1,2 +1,3 @@ -import $ from "jquery"; -window.jQuery = window.$ = window.jquery = $; +import jquery from "jquery"; + +export default (window.$ = window.jQuery = jquery); \ No newline at end of file diff --git a/client/src/ui/pagination.js b/config/plugins/visualizations/scatterplot/src/pagination.js similarity index 100% rename from client/src/ui/pagination.js rename to config/plugins/visualizations/scatterplot/src/pagination.js diff --git a/client/src/ui/peek-column-selector.js b/config/plugins/visualizations/scatterplot/src/peek-column-selector.js similarity index 100% rename from client/src/ui/peek-column-selector.js rename to config/plugins/visualizations/scatterplot/src/peek-column-selector.js diff --git a/config/plugins/visualizations/scatterplot/src/scatterplot.js b/config/plugins/visualizations/scatterplot/src/scatterplot.js index c167d1369991..c3cfbcbad7f6 100644 --- a/config/plugins/visualizations/scatterplot/src/scatterplot.js +++ b/config/plugins/visualizations/scatterplot/src/scatterplot.js @@ -1,14 +1,15 @@ import "./jqglobals"; // This is a really annoying hack to get bootstrap/jqui jquery bindings available correctly. /* global $ */ -import * as Backbone from "backbone"; -import * as d3 from "d3"; -import * as _ from "underscore"; -import "../../../../../client/src/ui/peek-column-selector"; -import "../../../../../client/src/ui/pagination"; +import "./peek-column-selector"; +import "./pagination"; import "jquery-ui-bundle"; import "bootstrap"; +import Backbone from "backbone"; +import * as d3 from "d3"; +import _ from "underscore"; + //TODO: Finish unlinking this from the Galaxy codebase (package it, use that way?) var Visualization = Backbone.Model.extend({ diff --git a/config/plugins/visualizations/scatterplot/static/scatterplot.js b/config/plugins/visualizations/scatterplot/static/scatterplot.js deleted file mode 100644 index 5d5f56081db4..000000000000 --- a/config/plugins/visualizations/scatterplot/static/scatterplot.js +++ /dev/null @@ -1,376 +0,0 @@ -parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c1)for(var n=1;n0&&t-1 in e)}function S(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}T.fn=T.prototype={jquery:"3.7.0",constructor:T,length:0,toArray:function(){return o.call(this)},get:function(e){return null==e?o.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=T.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return T.each(this,e)},map:function(e){return this.pushStack(T.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(o.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(T.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(T.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n+~]|"+A+")"+A+"*"),$=new RegExp(A+"|>"),B=new RegExp(M),_=new RegExp("^"+P+"$"),X={ID:new RegExp("^#("+P+")"),CLASS:new RegExp("^\\.("+P+")"),TAG:new RegExp("^("+P+"|[*])"),ATTR:new RegExp("^"+R),PSEUDO:new RegExp("^"+M),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+A+"*(even|odd|(([+-]|)(\\d*)n|)"+A+"*(?:([+-]|)"+A+"*(\\d+)|))"+A+"*\\)|)","i"),bool:new RegExp("^(?:"+O+")$","i"),needsContext:new RegExp("^"+A+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+A+"*((?:-\\d)?\\d*)"+A+"*\\)|)(?=[^-]|$)","i")},U=/^(?:input|select|textarea|button)$/i,z=/^h\d$/i,V=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,G=/[+~]/,Y=new RegExp("\\\\[\\da-fA-F]{1,6}"+A+"?|\\\\([^\\r\\n\\f])","g"),Q=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},J=function(){ue()},K=pe(function(e){return!0===e.disabled&&S(e,"fieldset")},{dir:"parentNode",next:"legend"});try{v.apply(r=o.call(L.childNodes),L.childNodes),r[L.childNodes.length].nodeType}catch(xe){v={apply:function(e,t){H.apply(e,o.call(t))},call:function(e){H.apply(e,o.call(arguments,1))}}}function Z(e,t,n,r){var i,o,a,s,u,c,f,g=t&&t.ownerDocument,m=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==m&&9!==m&&11!==m)return n;if(!r&&(ue(t),t=t||l,p)){if(11!==m&&(u=V.exec(e)))if(i=u[1]){if(9===m){if(!(a=t.getElementById(i)))return n;if(a.id===i)return v.call(n,a),n}else if(g&&(a=g.getElementById(i))&&Z.contains(t,a)&&a.id===i)return v.call(n,a),n}else{if(u[2])return v.apply(n,t.getElementsByTagName(e)),n;if((i=u[3])&&t.getElementsByClassName)return v.apply(n,t.getElementsByClassName(i)),n}if(!(N[e+" "]||d&&d.test(e))){if(f=e,g=t,1===m&&($.test(e)||F.test(e))){for((g=G.test(e)&&se(t.parentNode)||t)==t&&h.scope||((s=t.getAttribute("id"))?s=T.escapeSelector(s):t.setAttribute("id",s=y)),o=(c=ce(e)).length;o--;)c[o]=(s?"#"+s:":scope")+" "+fe(c[o]);f=c.join(",")}try{return v.apply(n,g.querySelectorAll(f)),n}catch(x){N(e,!0)}finally{s===y&&t.removeAttribute("id")}}}return me(e.replace(D,"$1"),t,n,r)}function ee(){var e=[];return function t(r,i){return e.push(r+" ")>n.cacheLength&&delete t[e.shift()],t[r+" "]=i}}function te(e){return e[y]=!0,e}function ne(e){var t=l.createElement("fieldset");try{return!!e(t)}catch(xe){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function re(e){return function(t){return S(t,"input")&&t.type===e}}function ie(e){return function(t){return(S(t,"input")||S(t,"button"))&&t.type===e}}function oe(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&&K(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function ae(e){return te(function(t){return t=+t,te(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 se(e){return e&&void 0!==e.getElementsByTagName&&e}function ue(e){var t,r=e?e.ownerDocument||e:L;return r!=l&&9===r.nodeType&&r.documentElement?(c=(l=r).documentElement,p=!T.isXMLDoc(l),g=c.matches||c.webkitMatchesSelector||c.msMatchesSelector,L!=l&&(t=l.defaultView)&&t.top!==t&&t.addEventListener("unload",J),h.getById=ne(function(e){return c.appendChild(e).id=T.expando,!l.getElementsByName||!l.getElementsByName(T.expando).length}),h.disconnectedMatch=ne(function(e){return g.call(e,"*")}),h.scope=ne(function(){return l.querySelectorAll(":scope")}),h.cssHas=ne(function(){try{return l.querySelector(":has(*,:jqfake)"),!1}catch(xe){return!0}}),h.getById?(n.filter.ID=function(e){var t=e.replace(Y,Q);return function(e){return e.getAttribute("id")===t}},n.find.ID=function(e,t){if(void 0!==t.getElementById&&p){var n=t.getElementById(e);return n?[n]:[]}}):(n.filter.ID=function(e){var t=e.replace(Y,Q);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},n.find.ID=function(e,t){if(void 0!==t.getElementById&&p){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[]}}),n.find.TAG=function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},n.find.CLASS=function(e,t){if(void 0!==t.getElementsByClassName&&p)return t.getElementsByClassName(e)},d=[],ne(function(e){var t;c.appendChild(e).innerHTML="",e.querySelectorAll("[selected]").length||d.push("\\["+A+"*(?:value|"+O+")"),e.querySelectorAll("[id~="+y+"-]").length||d.push("~="),e.querySelectorAll("a#"+y+"+*").length||d.push(".#.+[+~]"),e.querySelectorAll(":checked").length||d.push(":checked"),(t=l.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),c.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&d.push(":enabled",":disabled"),(t=l.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||d.push("\\["+A+"*name"+A+"*="+A+"*(?:''|\"\")")}),h.cssHas||d.push(":has"),d=d.length&&new RegExp(d.join("|")),q=function(e,t){if(e===t)return s=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!h.sortDetached&&t.compareDocumentPosition(e)===n?e===l||e.ownerDocument==L&&Z.contains(L,e)?-1:t===l||t.ownerDocument==L&&Z.contains(L,t)?1:a?u.call(a,e)-u.call(a,t):0:4&n?-1:1)},l):l}for(e in Z.matches=function(e,t){return Z(e,null,null,t)},Z.matchesSelector=function(e,t){if(ue(e),p&&!N[t+" "]&&(!d||!d.test(t)))try{var n=g.call(e,t);if(n||h.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(xe){N(t,!0)}return Z(t,l,null,[e]).length>0},Z.contains=function(e,t){return(e.ownerDocument||e)!=l&&ue(e),T.contains(e,t)},Z.attr=function(e,t){(e.ownerDocument||e)!=l&&ue(e);var r=n.attrHandle[t.toLowerCase()],i=r&&f.call(n.attrHandle,t.toLowerCase())?r(e,t,!p):void 0;return void 0!==i?i:e.getAttribute(t)},Z.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},T.uniqueSort=function(e){var t,n=[],r=0,i=0;if(s=!h.sortStable,a=!h.sortStable&&o.call(e,0),k.call(e,q),s){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)j.call(e,n[r],1)}return a=null,e},T.fn.uniqueSort=function(){return this.pushStack(T.uniqueSort(o.apply(this)))},(n=T.expr={cacheLength:50,createPseudo:te,match:X,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(Y,Q),e[3]=(e[3]||e[4]||e[5]||"").replace(Y,Q),"~="===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]||Z.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]&&Z.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return X.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&B.test(n)&&(t=ce(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(Y,Q).toLowerCase();return"*"===e?function(){return!0}:function(e){return S(e,t)}},CLASS:function(e){var t=b[e+" "];return t||(t=new RegExp("(^|"+A+")"+e+"("+A+"|$)"))&&b(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=Z.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(I," ")+" ").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,f,p,d,h=o!==a?"nextSibling":"previousSibling",g=t.parentNode,v=s&&t.nodeName.toLowerCase(),x=!u&&!s,b=!1;if(g){if(o){for(;h;){for(f=t;f=f[h];)if(s?S(f,v):1===f.nodeType)return!1;d=h="only"===e&&!d&&"nextSibling"}return!0}if(d=[a?g.firstChild:g.lastChild],a&&x){for(b=(p=(l=(c=g[y]||(g[y]={}))[e]||[])[0]===m&&l[1])&&l[2],f=p&&g.childNodes[p];f=++p&&f&&f[h]||(b=p=0)||d.pop();)if(1===f.nodeType&&++b&&f===t){c[e]=[m,p,b];break}}else if(x&&(b=p=(l=(c=t[y]||(t[y]={}))[e]||[])[0]===m&&l[1]),!1===b)for(;(f=++p&&f&&f[h]||(b=p=0)||d.pop())&&((s?!S(f,v):1!==f.nodeType)||!++b||(x&&((c=f[y]||(f[y]={}))[e]=[m,b]),f!==t)););return(b-=i)===r||b%r==0&&b/r>=0}}},PSEUDO:function(e,t){var r,i=n.pseudos[e]||n.setFilters[e.toLowerCase()]||Z.error("unsupported pseudo: "+e);return i[y]?i(t):i.length>1?(r=[e,e,"",t],n.setFilters.hasOwnProperty(e.toLowerCase())?te(function(e,n){for(var r,o=i(e,t),a=o.length;a--;)e[r=u.call(e,o[a])]=!(n[r]=o[a])}):function(e){return i(e,0,r)}):i}},pseudos:{not:te(function(e){var t=[],n=[],r=ye(e.replace(D,"$1"));return r[y]?te(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:te(function(e){return function(t){return Z(e,t).length>0}}),contains:te(function(e){return e=e.replace(Y,Q),function(t){return(t.textContent||T.text(t)).indexOf(e)>-1}}),lang:te(function(e){return _.test(e||"")||Z.error("unsupported lang: "+e),e=e.replace(Y,Q).toLowerCase(),function(t){var n;do{if(n=p?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(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(e){return e===c},focus:function(e){return e===function(){try{return l.activeElement}catch(e){}}()&&l.hasFocus()&&!!(e.type||e.href||~e.tabIndex)},enabled:oe(!1),disabled:oe(!0),checked:function(e){return S(e,"input")&&!!e.checked||S(e,"option")&&!!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!n.pseudos.empty(e)},header:function(e){return z.test(e.nodeName)},input:function(e){return U.test(e.nodeName)},button:function(e){return S(e,"input")&&"button"===e.type||S(e,"button")},text:function(e){var t;return S(e,"input")&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ae(function(){return[0]}),last:ae(function(e,t){return[t-1]}),eq:ae(function(e,t,n){return[n<0?n+t:n]}),even:ae(function(e,t){for(var n=0;nt?t:n;--r>=0;)e.push(r);return e}),gt:ae(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 he(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s-1&&(o[c]=!(a[c]=p))}}else d=he(d===a?d.splice(y,d.length):d),i?i(null,a,d,l):v.apply(a,d)})}function ve(e){for(var t,r,o,a=e.length,s=n.relative[e[0].type],l=s||n.relative[" "],c=s?1:0,f=pe(function(e){return e===t},l,!0),p=pe(function(e){return u.call(t,e)>-1},l,!0),d=[function(e,n,r){var o=!s&&(r||n!=i)||((t=n).nodeType?f(e,n,r):p(e,n,r));return t=null,o}];c1&&de(d),c>1&&fe(e.slice(0,c-1).concat({value:" "===e[c-2].type?"*":""})).replace(D,"$1"),r,c0,o=e.length>0,a=function(a,s,u,c,f){var d,h,g,y=0,x="0",b=a&&[],w=[],C=i,S=a||o&&n.find.TAG("*",f),k=m+=null==C?1:Math.random()||.1,j=S.length;for(f&&(i=s==l||s||f);x!==j&&null!=(d=S[x]);x++){if(o&&d){for(h=0,s||d.ownerDocument==l||(ue(d),u=!p);g=e[h++];)if(g(d,s||l,u)){v.call(c,d);break}f&&(m=k)}r&&((d=!g&&d)&&y--,a&&b.push(d))}if(y+=x,r&&x!==y){for(h=0;g=t[h++];)g(b,w,s,u);if(a){if(y>0)for(;x--;)b[x]||w[x]||(w[x]=E.call(c));w=he(w)}v.apply(c,w),f&&!a&&w.length>0&&y+t.length>1&&T.uniqueSort(c)}return f&&(m=k,i=C),b};return r?te(a):a}(a,o))).selector=e}return s}function me(e,t,r,i){var o,a,s,u,l,c="function"==typeof e&&e,f=!i&&ce(e=c.selector||e);if(r=r||[],1===f.length){if((a=f[0]=f[0].slice(0)).length>2&&"ID"===(s=a[0]).type&&9===t.nodeType&&p&&n.relative[a[1].type]){if(!(t=(n.find.ID(s.matches[0].replace(Y,Q),t)||[])[0]))return r;c&&(t=t.parentNode),e=e.slice(a.shift().value.length)}for(o=X.needsContext.test(e)?0:a.length;o--&&(s=a[o],!n.relative[u=s.type]);)if((l=n.find[u])&&(i=l(s.matches[0].replace(Y,Q),G.test(a[0].type)&&se(t.parentNode)||t))){if(a.splice(o,1),!(e=i.length&&fe(a)))return v.apply(r,i),r;break}}return(c||ye(e,f))(i,t,!p,r,!t||G.test(e)&&se(t.parentNode)||t),r}le.prototype=n.filters=n.pseudos,n.setFilters=new le,h.sortStable=y.split("").sort(q).join("")===y,ue(),h.sortDetached=ne(function(e){return 1&e.compareDocumentPosition(l.createElement("fieldset"))}),T.find=Z,T.expr[":"]=T.expr.pseudos,T.unique=T.uniqueSort,Z.compile=ye,Z.select=me,Z.setDocument=ue,Z.escape=T.escapeSelector,Z.getText=T.text,Z.isXML=T.isXMLDoc,Z.selectors=T.expr,Z.support=T.support,Z.uniqueSort=T.uniqueSort}();var O=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&T(e).is(n))break;r.push(e)}return r},P=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},R=T.expr.match.needsContext,M=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function I(e,t,n){return g(t)?T.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?T.grep(e,function(e){return e===t!==n}):"string"!=typeof t?T.grep(e,function(e){return u.call(t,e)>-1!==n}):T.filter(t,e,n)}T.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?T.find.matchesSelector(r,e)?[r]:[]:T.find.matches(e,T.grep(t,function(e){return 1===e.nodeType}))},T.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(T(e).filter(function(){for(t=0;t1?T.uniqueSort(n):n},filter:function(e){return this.pushStack(I(this,e||[],!1))},not:function(e){return this.pushStack(I(this,e||[],!0))},is:function(e){return!!I(this,"string"==typeof e&&R.test(e)?T(e):e||[],!1).length}});var W,F=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(T.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||W,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:F.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?t[0]:t,T.merge(this,T.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:y,!0)),M.test(r[1])&&T.isPlainObject(t))for(r in t)g(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=y.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):g(e)?void 0!==n.ready?n.ready(e):e(T):T.makeArray(e,this)}).prototype=T.fn,W=T(y);var $=/^(?:parents|prev(?:Until|All))/,B={children:!0,contents:!0,next:!0,prev:!0};function _(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}T.fn.extend({has:function(e){var t=T(e,this),n=t.length;return this.filter(function(){for(var e=0;e-1:1===n.nodeType&&T.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?T.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?u.call(T(e),this[0]):u.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(T.uniqueSort(T.merge(this.get(),T(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),T.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return O(e,"parentNode")},parentsUntil:function(e,t,n){return O(e,"parentNode",n)},next:function(e){return _(e,"nextSibling")},prev:function(e){return _(e,"previousSibling")},nextAll:function(e){return O(e,"nextSibling")},prevAll:function(e){return O(e,"previousSibling")},nextUntil:function(e,t,n){return O(e,"nextSibling",n)},prevUntil:function(e,t,n){return O(e,"previousSibling",n)},siblings:function(e){return P((e.parentNode||{}).firstChild,e)},children:function(e){return P(e.firstChild)},contents:function(e){return null!=e.contentDocument&&i(e.contentDocument)?e.contentDocument:(S(e,"template")&&(e=e.content||e),T.merge([],e.childNodes))}},function(e,t){T.fn[e]=function(n,r){var i=T.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=T.filter(r,i)),this.length>1&&(B[e]||T.uniqueSort(i),$.test(e)&&i.reverse()),this.pushStack(i)}});var X=/[^\x20\t\r\n\f]+/g;function U(e){return e}function z(e){throw e}function V(e,t,n,r){var i;try{e&&g(i=e.promise)?i.call(e).done(t).fail(n):e&&g(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}T.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return T.each(e.match(X)||[],function(e,n){t[n]=!0}),t}(e):T.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?T.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},T.extend({Deferred:function(e){var n=[["notify","progress",T.Callbacks("memory"),T.Callbacks("memory"),2],["resolve","done",T.Callbacks("once memory"),T.Callbacks("once memory"),0,"resolved"],["reject","fail",T.Callbacks("once memory"),T.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 T.Deferred(function(t){T.each(n,function(n,r){var i=g(e[r[4]])&&e[r[4]];o[r[1]](function(){var e=i&&i.apply(this,arguments);e&&g(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(e,r,i){var o=0;function a(e,n,r,i){return function(){var s=this,u=arguments,l=function(){var t,l;if(!(e=o&&(r!==z&&(s=void 0,u=[t]),n.rejectWith(s,u))}};e?c():(T.Deferred.getErrorHook?c.error=T.Deferred.getErrorHook():T.Deferred.getStackHook&&(c.error=T.Deferred.getStackHook()),t.setTimeout(c))}}return T.Deferred(function(t){n[0][3].add(a(0,t,g(i)?i:U,t.notifyWith)),n[1][3].add(a(0,t,g(e)?e:U)),n[2][3].add(a(0,t,g(r)?r:z))}).promise()},promise:function(e){return null!=e?T.extend(e,i):i}},o={};return T.each(n,function(e,t){var a=t[2],s=t[5];i[t[1]]=a.add,s&&a.add(function(){r=s},n[3-e][2].disable,n[3-e][3].disable,n[0][2].lock,n[0][3].lock),a.add(t[3].fire),o[t[0]]=function(){return o[t[0]+"With"](this===o?void 0:this,arguments),this},o[t[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=o.call(arguments),a=T.Deferred(),s=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?o.call(arguments):n,--t||a.resolveWith(r,i)}};if(t<=1&&(V(e,a.done(s(n)).resolve,a.reject,!t),"pending"===a.state()||g(i[n]&&i[n].then)))return a.then();for(;n--;)V(i[n],s(n),a.reject);return a.promise()}});var G=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;T.Deferred.exceptionHook=function(e,n){t.console&&t.console.warn&&e&&G.test(e.name)&&t.console.warn("jQuery.Deferred exception: "+e.message,e.stack,n)},T.readyException=function(e){t.setTimeout(function(){throw e})};var Y=T.Deferred();function Q(){y.removeEventListener("DOMContentLoaded",Q),t.removeEventListener("load",Q),T.ready()}T.fn.ready=function(e){return Y.then(e).catch(function(e){T.readyException(e)}),this},T.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--T.readyWait:T.isReady)||(T.isReady=!0,!0!==e&&--T.readyWait>0||Y.resolveWith(y,[T]))}}),T.ready.then=Y.then,"complete"===y.readyState||"loading"!==y.readyState&&!y.documentElement.doScroll?t.setTimeout(T.ready):(y.addEventListener("DOMContentLoaded",Q),t.addEventListener("load",Q));var J=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===b(n))for(s in i=!0,n)J(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,g(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(T(e),n)})),t))for(;s1,null,!0)},removeData:function(e){return this.each(function(){oe.remove(this,e)})}}),T.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=ie.get(e,t),n&&(!r||Array.isArray(n)?r=ie.access(e,t,T.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=T.queue(e,t),r=n.length,i=n.shift(),o=T._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){T.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return ie.get(e,n)||ie.access(e,n,{empty:T.Callbacks("once memory").add(function(){ie.remove(e,[t+"queue",n])})})}}),T.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,Se=/^$|^module$|\/(?:java|ecma)script/i;be=y.createDocumentFragment().appendChild(y.createElement("div")),(we=y.createElement("input")).setAttribute("type","radio"),we.setAttribute("checked","checked"),we.setAttribute("name","t"),be.appendChild(we),h.checkClone=be.cloneNode(!0).cloneNode(!0).lastChild.checked,be.innerHTML="",h.noCloneChecked=!!be.cloneNode(!0).lastChild.defaultValue,be.innerHTML="",h.option=!!be.lastChild;var Ee={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ke(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&S(e,t)?T.merge([e],n):n}function je(e,t){for(var n=0,r=e.length;n",""]);var Ae=/<|&#?\w+;/;function De(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d-1)i&&i.push(o);else if(l=de(o),a=ke(f.appendChild(o),"script"),l&&je(a),n)for(c=0;o=a[c++];)Se.test(o.type||"")&&n.push(o);return f}var Ne=/^([^.]*)(?:\.(.+)|)/;function qe(){return!0}function Le(){return!1}function He(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)He(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=Le;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return T().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=T.guid++)),e.each(function(){T.event.add(this,t,i,r,n)})}function Oe(e,t,n){n?(ie.set(e,t,!1),T.event.add(e,t,{namespace:!1,handler:function(e){var n,r=ie.get(this,t);if(1&e.isTrigger&&this[t]){if(r)(T.event.special[t]||{}).delegateType&&e.stopPropagation();else if(r=o.call(arguments),ie.set(this,t,r),this[t](),n=ie.get(this,t),ie.set(this,t,!1),r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n}else r&&(ie.set(this,t,T.event.trigger(r[0],r.slice(1),this)),e.stopPropagation(),e.isImmediatePropagationStopped=qe)}})):void 0===ie.get(e,t)&&T.event.add(e,t,qe)}T.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=ie.get(e);if(ne(e))for(n.handler&&(n=(o=n).handler,i=o.selector),i&&T.find.matchesSelector(pe,i),n.guid||(n.guid=T.guid++),(u=v.events)||(u=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(t){return void 0!==T&&T.event.triggered!==t.type?T.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(X)||[""]).length;l--;)d=g=(s=Ne.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=T.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=T.event.special[d]||{},c=T.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&T.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(d,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),T.event.global[d]=!0)},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=ie.hasData(e)&&ie.get(e);if(v&&(u=v.events)){for(l=(t=(t||"").match(X)||[""]).length;l--;)if(d=g=(s=Ne.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){for(f=T.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;o--;)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||T.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)T.event.remove(e,d+t[l],n,r,!0);T.isEmptyObject(u)&&ie.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=T.event.fix(e),l=(ie.get(this,"events")||Object.create(null))[u.type]||[],c=T.event.special[u.type]||{};for(s[0]=u,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:T.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u\s*$/g;function Ie(e,t){return S(e,"table")&&S(11!==t.nodeType?t:t.firstChild,"tr")&&T(e).children("tbody")[0]||e}function We(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Fe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function $e(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(ie.hasData(e)&&(s=ie.get(e).events))for(i in ie.remove(t,"handle events"),s)for(n=0,r=s[i].length;n1&&"string"==typeof v&&!h.checkClone&&Re.test(v))return e.each(function(i){var o=e.eq(i);y&&(t[0]=v.call(this,i,o.html())),Be(o,t,n,r)});if(p&&(o=(i=De(t,e[0].ownerDocument,!1,e,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(u=(s=T.map(ke(i,"script"),We)).length;f0&&je(a,!f&&ke(e,"script")),c},cleanData:function(e){for(var t,n,r,i=T.event.special,o=0;void 0!==(n=e[o]);o++)if(ne(n)){if(t=n[ie.expando]){if(t.events)for(r in t.events)i[r]?T.event.remove(n,r):T.removeEvent(n,r,t.handle);n[ie.expando]=void 0}n[oe.expando]&&(n[oe.expando]=void 0)}}}),T.fn.extend({detach:function(e){return _e(this,e,!0)},remove:function(e){return _e(this,e)},text:function(e){return J(this,function(e){return void 0===e?T.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 Be(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Ie(this,e).appendChild(e)})},prepend:function(){return Be(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 Be(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Be(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&&(T.cleanData(ke(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return T.clone(this,e,t)})},html:function(e){return J(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&&!Pe.test(e)&&!Ee[(Ce.exec(e)||["",""])[1].toLowerCase()]){e=T.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+l}function at(e,t,n){var r=ze(e),i=(!h.boxSizingReliable()||n)&&"border-box"===T.css(e,"boxSizing",!1,r),o=i,a=Ye(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Xe.test(a)){if(!n)return a;a="auto"}return(!h.boxSizingReliable()&&i||!h.reliableTrDimensions()&&S(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===T.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===T.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+ot(e,t,n||(i?"border":"content"),o,r,a)+"px"}function st(e,t,n,r,i){return new st.prototype.init(e,t,n,r,i)}T.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ye(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!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,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=te(t),u=Ue.test(t),l=e.style;if(u||(t=et(s)),a=T.cssHooks[t]||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=ce.exec(n))&&i[1]&&(n=ve(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(T.cssNumber[s]?"":"px")),h.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=te(t);return Ue.test(t)||(t=et(s)),(a=T.cssHooks[t]||T.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Ye(e,t,r)),"normal"===i&&t in rt&&(i=rt[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),T.each(["height","width"],function(e,t){T.cssHooks[t]={get:function(e,n,r){if(n)return!tt.test(T.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?at(e,t,r):Ve(e,nt,function(){return at(e,t,r)})},set:function(e,n,r){var i,o=ze(e),a=!h.scrollboxSize()&&"absolute"===o.position,s=(a||r)&&"border-box"===T.css(e,"boxSizing",!1,o),u=r?ot(e,t,r,s,o):0;return s&&a&&(u-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-ot(e,t,"border",!1,o)-.5)),u&&(i=ce.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=T.css(e,t)),it(0,n,u)}}}),T.cssHooks.marginLeft=Qe(h.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Ye(e,"marginLeft"))||e.getBoundingClientRect().left-Ve(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),T.each({margin:"",padding:"",border:"Width"},function(e,t){T.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+fe[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(T.cssHooks[e+t].set=it)}),T.fn.extend({css:function(e,t){return J(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=ze(e),i=t.length;a1)}}),T.Tween=st,st.prototype={constructor:st,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||T.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(T.cssNumber[n]?"":"px")},cur:function(){var e=st.propHooks[this.prop];return e&&e.get?e.get(this):st.propHooks._default.get(this)},run:function(e){var t,n=st.propHooks[this.prop];return this.options.duration?this.pos=t=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):st.propHooks._default.set(this),this}},st.prototype.init.prototype=st.prototype,st.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=T.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){T.fx.step[e.prop]?T.fx.step[e.prop](e):1!==e.elem.nodeType||!T.cssHooks[e.prop]&&null==e.elem.style[et(e.prop)]?e.elem[e.prop]=e.now:T.style(e.elem,e.prop,e.now+e.unit)}}},st.propHooks.scrollTop=st.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},T.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},T.fx=st.prototype.init,T.fx.step={};var ut,lt,ct=/^(?:toggle|show|hide)$/,ft=/queueHooks$/;function pt(){lt&&(!1===y.hidden&&t.requestAnimationFrame?t.requestAnimationFrame(pt):t.setTimeout(pt,T.fx.interval),T.fx.tick())}function dt(){return t.setTimeout(function(){ut=void 0}),ut=Date.now()}function ht(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=fe[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function gt(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(){T.removeAttr(this,e)})}}),T.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?T.prop(e,t,n):(1===o&&T.isXMLDoc(e)||(i=T.attrHooks[t.toLowerCase()]||(T.expr.match.bool.test(t)?yt:void 0)),void 0!==n?null===n?void T.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=T.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!h.radioValue&&"radio"===t&&S(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(X);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),yt={set:function(e,t,n){return!1===t?T.removeAttr(e,n):e.setAttribute(n,n),n}},T.each(T.expr.match.bool.source.match(/\w+/g),function(e,t){var n=mt[t]||T.find.attr;mt[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=mt[a],mt[a]=i,i=null!=n(e,t,r)?a:null,mt[a]=o),i}});var xt=/^(?:input|select|textarea|button)$/i,bt=/^(?:a|area)$/i;function wt(e){return(e.match(X)||[]).join(" ")}function Tt(e){return e.getAttribute&&e.getAttribute("class")||""}function Ct(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(X)||[]}T.fn.extend({prop:function(e,t){return J(this,T.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[T.propFix[e]||e]})}}),T.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&T.isXMLDoc(e)||(t=T.propFix[t]||t,i=T.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=T.find.attr(e,"tabindex");return t?parseInt(t,10):xt.test(e.nodeName)||bt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),h.optSelected||(T.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)}}),T.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){T.propFix[this.toLowerCase()]=this}),T.fn.extend({addClass:function(e){var t,n,r,i,o,a;return g(e)?this.each(function(t){T(this).addClass(e.call(this,t,Tt(this)))}):(t=Ct(e)).length?this.each(function(){if(r=Tt(this),n=1===this.nodeType&&" "+wt(r)+" "){for(o=0;o-1;)n=n.replace(" "+i+" "," ");a=wt(n),r!==a&&this.setAttribute("class",a)}}):this:this.attr("class","")},toggleClass:function(e,t){var n,r,i,o,a=typeof e,s="string"===a||Array.isArray(e);return g(e)?this.each(function(n){T(this).toggleClass(e.call(this,n,Tt(this),t),t)}):"boolean"==typeof t&&s?t?this.addClass(e):this.removeClass(e):(n=Ct(e),this.each(function(){if(s)for(o=T(this),i=0;i-1)return!0;return!1}});var St=/\r/g;T.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=g(e),this.each(function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,T(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=T.map(i,function(e){return null==e?"":e+""})),(t=T.valHooks[this.type]||T.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))})):i?(t=T.valHooks[i.type]||T.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(St,""):null==n?"":n:void 0}}),T.extend({valHooks:{option:{get:function(e){var t=T.find.attr(e,"value");return null!=t?t:wt(T.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}}}}),T.each(["radio","checkbox"],function(){T.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=T.inArray(T(e).val(),t)>-1}},h.checkOn||(T.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Et=t.location,kt={guid:Date.now()},jt=/\?/;T.parseXML=function(e){var n,r;if(!e||"string"!=typeof e)return null;try{n=(new t.DOMParser).parseFromString(e,"text/xml")}catch(i){}return r=n&&n.getElementsByTagName("parsererror")[0],n&&!r||T.error("Invalid XML: "+(r?T.map(r.childNodes,function(e){return e.textContent}).join("\n"):e)),n};var At=/^(?:focusinfocus|focusoutblur)$/,Dt=function(e){e.stopPropagation()};T.extend(T.event,{trigger:function(e,n,r,i){var o,a,s,u,l,c,p,d,h=[r||y],m=f.call(e,"type")?e.type:e,x=f.call(e,"namespace")?e.namespace.split("."):[];if(a=d=s=r=r||y,3!==r.nodeType&&8!==r.nodeType&&!At.test(m+T.event.triggered)&&(m.indexOf(".")>-1&&(x=m.split("."),m=x.shift(),x.sort()),l=m.indexOf(":")<0&&"on"+m,(e=e[T.expando]?e:new T.Event(m,"object"==typeof e&&e)).isTrigger=i?2:3,e.namespace=x.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+x.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=r),n=null==n?[e]:T.makeArray(n,[e]),p=T.event.special[m]||{},i||!p.trigger||!1!==p.trigger.apply(r,n))){if(!i&&!p.noBubble&&!v(r)){for(u=p.delegateType||m,At.test(u+m)||(a=a.parentNode);a;a=a.parentNode)h.push(a),s=a;s===(r.ownerDocument||y)&&h.push(s.defaultView||s.parentWindow||t)}for(o=0;(a=h[o++])&&!e.isPropagationStopped();)d=a,e.type=o>1?u:p.bindType||m,(c=(ie.get(a,"events")||Object.create(null))[e.type]&&ie.get(a,"handle"))&&c.apply(a,n),(c=l&&a[l])&&c.apply&&ne(a)&&(e.result=c.apply(a,n),!1===e.result&&e.preventDefault());return e.type=m,i||e.isDefaultPrevented()||p._default&&!1!==p._default.apply(h.pop(),n)||!ne(r)||l&&g(r[m])&&!v(r)&&((s=r[l])&&(r[l]=null),T.event.triggered=m,e.isPropagationStopped()&&d.addEventListener(m,Dt),r[m](),e.isPropagationStopped()&&d.removeEventListener(m,Dt),T.event.triggered=void 0,s&&(r[l]=s)),e.result}},simulate:function(e,t,n){var r=T.extend(new T.Event,n,{type:e,isSimulated:!0});T.event.trigger(r,null,t)}}),T.fn.extend({trigger:function(e,t){return this.each(function(){T.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return T.event.trigger(e,t,n,!0)}});var Nt=/\[\]$/,qt=/\r?\n/g,Lt=/^(?:submit|button|image|reset|file)$/i,Ht=/^(?:input|select|textarea|keygen)/i;function Ot(e,t,n,r){var i;if(Array.isArray(t))T.each(t,function(t,i){n||Nt.test(e)?r(e,i):Ot(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)});else if(n||"object"!==b(t))r(e,t);else for(i in t)Ot(e+"["+i+"]",t[i],n,r)}T.param=function(e,t){var n,r=[],i=function(e,t){var n=g(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!T.isPlainObject(e))T.each(e,function(){i(this.name,this.value)});else for(n in e)Ot(n,e[n],t,i);return r.join("&")},T.fn.extend({serialize:function(){return T.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=T.prop(this,"elements");return e?T.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!T(this).is(":disabled")&&Ht.test(this.nodeName)&&!Lt.test(e)&&(this.checked||!Te.test(e))}).map(function(e,t){var n=T(this).val();return null==n?null:Array.isArray(n)?T.map(n,function(e){return{name:t.name,value:e.replace(qt,"\r\n")}}):{name:t.name,value:n.replace(qt,"\r\n")}}).get()}});var Pt=/%20/g,Rt=/#.*$/,Mt=/([?&])_=[^&]*/,It=/^(.*?):[ \t]*([^\r\n]*)$/gm,Wt=/^(?:GET|HEAD)$/,Ft=/^\/\//,$t={},Bt={},_t="*/".concat("*"),Xt=y.createElement("a");function Ut(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(X)||[];if(g(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function zt(e,t,n,r){var i={},o=e===Bt;function a(s){var u;return i[s]=!0,T.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=T.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&T.extend(!0,e,r),e}Xt.href=Et.href,T.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Et.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Et.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":_t,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":T.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Vt(Vt(e,T.ajaxSettings),t):Vt(T.ajaxSettings,e)},ajaxPrefilter:Ut($t),ajaxTransport:Ut(Bt),ajax:function(e,n){"object"==typeof e&&(n=e,e=void 0),n=n||{};var r,i,o,a,s,u,l,c,f,p,d=T.ajaxSetup({},n),h=d.context||d,g=d.context&&(h.nodeType||h.jquery)?T(h):T.event,v=T.Deferred(),m=T.Callbacks("once memory"),x=d.statusCode||{},b={},w={},C="canceled",S={readyState:0,getResponseHeader:function(e){var t;if(l){if(!a)for(a={};t=It.exec(o);)a[t[1].toLowerCase()+" "]=(a[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=a[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return l?o:null},setRequestHeader:function(e,t){return null==l&&(e=w[e.toLowerCase()]=w[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return null==l&&(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(l)S.always(e[S.status]);else for(t in e)x[t]=[x[t],e[t]];return this},abort:function(e){var t=e||C;return r&&r.abort(t),E(0,t),this}};if(v.promise(S),d.url=((e||d.url||Et.href)+"").replace(Ft,Et.protocol+"//"),d.type=n.method||n.type||d.method||d.type,d.dataTypes=(d.dataType||"*").toLowerCase().match(X)||[""],null==d.crossDomain){u=y.createElement("a");try{u.href=d.url,u.href=u.href,d.crossDomain=Xt.protocol+"//"+Xt.host!=u.protocol+"//"+u.host}catch(k){d.crossDomain=!0}}if(d.data&&d.processData&&"string"!=typeof d.data&&(d.data=T.param(d.data,d.traditional)),zt($t,d,n,S),l)return S;for(f in(c=T.event&&d.global)&&0==T.active++&&T.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Wt.test(d.type),i=d.url.replace(Rt,""),d.hasContent?d.data&&d.processData&&0===(d.contentType||"").indexOf("application/x-www-form-urlencoded")&&(d.data=d.data.replace(Pt,"+")):(p=d.url.slice(i.length),d.data&&(d.processData||"string"==typeof d.data)&&(i+=(jt.test(i)?"&":"?")+d.data,delete d.data),!1===d.cache&&(i=i.replace(Mt,"$1"),p=(jt.test(i)?"&":"?")+"_="+kt.guid+++p),d.url=i+p),d.ifModified&&(T.lastModified[i]&&S.setRequestHeader("If-Modified-Since",T.lastModified[i]),T.etag[i]&&S.setRequestHeader("If-None-Match",T.etag[i])),(d.data&&d.hasContent&&!1!==d.contentType||n.contentType)&&S.setRequestHeader("Content-Type",d.contentType),S.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+_t+"; q=0.01":""):d.accepts["*"]),d.headers)S.setRequestHeader(f,d.headers[f]);if(d.beforeSend&&(!1===d.beforeSend.call(h,S,d)||l))return S.abort();if(C="abort",m.add(d.complete),S.done(d.success),S.fail(d.error),r=zt(Bt,d,n,S)){if(S.readyState=1,c&&g.trigger("ajaxSend",[S,d]),l)return S;d.async&&d.timeout>0&&(s=t.setTimeout(function(){S.abort("timeout")},d.timeout));try{l=!1,r.send(b,E)}catch(k){if(l)throw k;E(-1,k)}}else E(-1,"No Transport");function E(e,n,a,u){var f,p,y,b,w,C=n;l||(l=!0,s&&t.clearTimeout(s),r=void 0,o=u||"",S.readyState=e>0?4:0,f=e>=200&&e<300||304===e,a&&(b=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]}(d,S,a)),!f&&T.inArray("script",d.dataTypes)>-1&&T.inArray("json",d.dataTypes)<0&&(d.converters["text script"]=function(){}),b=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(k){return{state:"parsererror",error:a?k:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(d,b,S,f),f?(d.ifModified&&((w=S.getResponseHeader("Last-Modified"))&&(T.lastModified[i]=w),(w=S.getResponseHeader("etag"))&&(T.etag[i]=w)),204===e||"HEAD"===d.type?C="nocontent":304===e?C="notmodified":(C=b.state,p=b.data,f=!(y=b.error))):(y=C,!e&&C||(C="error",e<0&&(e=0))),S.status=e,S.statusText=(n||C)+"",f?v.resolveWith(h,[p,C,S]):v.rejectWith(h,[S,C,y]),S.statusCode(x),x=void 0,c&&g.trigger(f?"ajaxSuccess":"ajaxError",[S,d,f?p:y]),m.fireWith(h,[S,C]),c&&(g.trigger("ajaxComplete",[S,d]),--T.active||T.event.trigger("ajaxStop")))}return S},getJSON:function(e,t,n){return T.get(e,t,n,"json")},getScript:function(e,t){return T.get(e,void 0,t,"script")}}),T.each(["get","post"],function(e,t){T[t]=function(e,n,r,i){return g(n)&&(i=i||r,r=n,n=void 0),T.ajax(T.extend({url:e,type:t,dataType:i,data:n,success:r},T.isPlainObject(e)&&e))}}),T.ajaxPrefilter(function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}),T._evalUrl=function(e,t,n){return T.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){T.globalEval(e,t,n)}})},T.fn.extend({wrapAll:function(e){var t;return this[0]&&(g(e)&&(e=e.call(this[0])),t=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 g(e)?this.each(function(t){T(this).wrapInner(e.call(this,t))}):this.each(function(){var t=T(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=g(e);return this.each(function(n){T(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){T(this).replaceWith(this.childNodes)}),this}}),T.expr.pseudos.hidden=function(e){return!T.expr.pseudos.visible(e)},T.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},T.ajaxSettings.xhr=function(){try{return new t.XMLHttpRequest}catch(e){}};var Gt={0:200,1223:204},Yt=T.ajaxSettings.xhr();h.cors=!!Yt&&"withCredentials"in Yt,h.ajax=Yt=!!Yt,T.ajaxTransport(function(e){var n,r;if(h.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]);n=function(e){return function(){n&&(n=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(Gt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=n(),r=s.onerror=s.ontimeout=n("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&t.setTimeout(function(){n&&r()})},n=n("abort");try{s.send(e.hasContent&&e.data||null)}catch(u){if(n)throw u}},abort:function(){n&&n()}}}),T.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),T.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 T.globalEval(e),e}}}),T.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),T.ajaxTransport("script",function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,i){t=T("