From e8cfa2349596a834905a78f435436241dda5e2a2 Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Thu, 3 Nov 2022 17:06:41 -0400 Subject: [PATCH 0001/1254] First steps separating webpack builds, extracting toolshed. These are never deployed on the same host and the caching of shared objects is not useful, and this allows us to trim lots from the toolshed builds. --- client/webpack.config.js | 99 +++++++++++++++++++++++++--------------- 1 file changed, 62 insertions(+), 37 deletions(-) diff --git a/client/webpack.config.js b/client/webpack.config.js index 3961aeefcb59..aa6fe5218acf 100644 --- a/client/webpack.config.js +++ b/client/webpack.config.js @@ -27,17 +27,11 @@ const modulesExcludedFromLibs = [ const buildDate = new Date(); -module.exports = (env = {}, argv = {}) => { - // environment name based on -d, -p, webpack flag +const baseConfig = (env = {}, argv = {}) => { const targetEnv = process.env.NODE_ENV == "production" || argv.mode == "production" ? "production" : "development"; - const buildconfig = { + const buildConfig = { mode: targetEnv, - entry: { - analysis: ["polyfills", "bundleEntries", "entry/analysis"], - generic: ["polyfills", "bundleEntries", "entry/generic"], - toolshed: ["polyfills", "bundleToolshed", "entry/generic"], - }, output: { path: path.join(__dirname, "../", "/static/dist"), filename: "[name].bundled.js", @@ -225,40 +219,71 @@ module.exports = (env = {}, argv = {}) => { }), }), ], - devServer: { - client: { - overlay: { - errors: true, - warnings: false, - }, - webSocketURL: { - port: process.env.GITPOD_WORKSPACE_ID ? 443 : undefined, - }, + }; + + if (process.env.GXY_BUILD_SOURCEMAPS || buildConfig.mode == "development") { + buildConfig.devtool = "eval-cheap-source-map"; + } + + return buildConfig; +}; + +const analysisConfig = (env = {}, argv = {}) => { + // environment name based on -d, -p, webpack flag + const buildConfig = baseConfig(env, argv); + + buildConfig.entry = { + analysis: ["polyfills", "bundleEntries", "entry/analysis"], + generic: ["polyfills", "bundleEntries", "entry/generic"], + }; + + buildConfig.devServer = { + client: { + overlay: { + errors: true, + warnings: false, }, - allowedHosts: process.env.GITPOD_WORKSPACE_ID ? "all" : "auto", - devMiddleware: { - publicPath: "/static/dist", + webSocketURL: { + port: process.env.GITPOD_WORKSPACE_ID ? 443 : undefined, }, - hot: true, - port: 8081, - host: "0.0.0.0", - // proxy *everything* to the galaxy server. - // someday, when we have a fully API-driven independent client, this - // can be a more limited set -- e.g. `/api`, `/auth` - proxy: { - "**": { - target: process.env.GALAXY_URL || "http://localhost:8080", - secure: process.env.CHANGE_ORIGIN ? !process.env.CHANGE_ORIGIN : true, - changeOrigin: !!process.env.CHANGE_ORIGIN, - logLevel: "debug", - }, + }, + allowedHosts: process.env.GITPOD_WORKSPACE_ID ? "all" : "auto", + devMiddleware: { + publicPath: "/static/dist", + }, + hot: true, + port: 8081, + host: "0.0.0.0", + // proxy *everything* to the galaxy server. + // someday, when we have a fully API-driven independent client, this + // can be a more limited set -- e.g. `/api`, `/auth` + proxy: { + "**": { + target: process.env.GALAXY_URL || "http://localhost:8080", + secure: process.env.CHANGE_ORIGIN ? !process.env.CHANGE_ORIGIN : true, + changeOrigin: !!process.env.CHANGE_ORIGIN, + logLevel: "debug", }, }, }; - if (process.env.GXY_BUILD_SOURCEMAPS || buildconfig.mode == "development") { - buildconfig.devtool = "eval-cheap-source-map"; - } + return buildConfig; +}; - return buildconfig; +const toolshedConfig = (env = {}, argv = {}) => { + // environment name based on -d, -p, webpack flag + + const buildConfig = baseConfig(env, argv); + + buildConfig.entry = { + toolshed: ["polyfills", "bundleToolshed", "entry/generic"], + }; + buildConfig.optimization = { + minimize: true, + minimizer: [`...`, new CssMinimizerPlugin()], + }; + + return buildConfig; }; + +module.exports = [analysisConfig, toolshedConfig]; From fa9c3e4c95fc615bc94e06afbe4ee6dcbf09c20d Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Thu, 3 Nov 2022 17:23:24 -0400 Subject: [PATCH 0002/1254] Allow parallel builds, enh specificity for optimizatino rules since we'll do toolshed differently. --- client/webpack.config.js | 42 +++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/client/webpack.config.js b/client/webpack.config.js index aa6fe5218acf..cd3f7b811622 100644 --- a/client/webpack.config.js +++ b/client/webpack.config.js @@ -58,26 +58,6 @@ const baseConfig = (env = {}, argv = {}) => { config$: path.join(scriptsBase, "config", targetEnv) + ".js", }, }, - optimization: { - splitChunks: { - cacheGroups: { - styles: { - name: "base", - chunks: "all", - test: (m) => m.constructor.name == "CssModule", - priority: -5, - }, - libs: { - name: "libs", - test: new RegExp(`node_modules[\\/](?!(${modulesExcludedFromLibs})[\\/])|galaxy/scripts/libs`), - chunks: "all", - priority: -10, - }, - }, - }, - minimize: true, - minimizer: [`...`, new CssMinimizerPlugin()], - }, module: { rules: [ { @@ -237,6 +217,27 @@ const analysisConfig = (env = {}, argv = {}) => { generic: ["polyfills", "bundleEntries", "entry/generic"], }; + buildConfig.optimization = { + splitChunks: { + cacheGroups: { + styles: { + name: "base", + chunks: "all", + test: (m) => m.constructor.name == "CssModule", + priority: -5, + }, + libs: { + name: "libs", + test: new RegExp(`node_modules[\\/](?!(${modulesExcludedFromLibs})[\\/])|galaxy/scripts/libs`), + chunks: "all", + priority: -10, + }, + }, + }, + minimize: true, + minimizer: [`...`, new CssMinimizerPlugin()], + }; + buildConfig.devServer = { client: { overlay: { @@ -287,3 +288,4 @@ const toolshedConfig = (env = {}, argv = {}) => { }; module.exports = [analysisConfig, toolshedConfig]; +module.exports.parallelism = 2; From 345ec1b4244d94066d9aa3ff7beb4a9f9b3d109a Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Thu, 3 Nov 2022 17:58:46 -0400 Subject: [PATCH 0003/1254] optimization tweaks for toolshed entry --- client/webpack.config.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/webpack.config.js b/client/webpack.config.js index cd3f7b811622..d30f0a68860c 100644 --- a/client/webpack.config.js +++ b/client/webpack.config.js @@ -280,8 +280,10 @@ const toolshedConfig = (env = {}, argv = {}) => { toolshed: ["polyfills", "bundleToolshed", "entry/generic"], }; buildConfig.optimization = { - minimize: true, - minimizer: [`...`, new CssMinimizerPlugin()], + splitChunks: { + // include all types of chunks + chunks: "all", + }, }; return buildConfig; From 998cd562c161160f1ac969adfffe56da4fda6815 Mon Sep 17 00:00:00 2001 From: Pablo Moreno Date: Mon, 16 Jan 2023 15:05:43 +0000 Subject: [PATCH 0004/1254] Update cellxgene interactive tool to 1.1.1 Call is the same on 1.1.1, at least as it is used here. Will try to add some options here as well (to specify gene symbols field and others). --- tools/interactive/interactivetool_cellxgene.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/interactive/interactivetool_cellxgene.xml b/tools/interactive/interactivetool_cellxgene.xml index e9069afcb0af..06f39d7110d1 100644 --- a/tools/interactive/interactivetool_cellxgene.xml +++ b/tools/interactive/interactivetool_cellxgene.xml @@ -1,6 +1,6 @@ - + - quay.io/biocontainers/cellxgene:0.16.2--py_0 + quay.io/biocontainers/cellxgene:1.1.1--pyhdfd78af_0 From b860465f9c248171a87f742c04332dd6a3754534 Mon Sep 17 00:00:00 2001 From: Pablo Moreno Date: Mon, 16 Jan 2023 17:28:43 +0000 Subject: [PATCH 0005/1254] Handling of files not indexed by gene symbols and output recovery --- .../interactive/interactivetool_cellxgene.xml | 51 +++++++++++++++++-- 1 file changed, 46 insertions(+), 5 deletions(-) diff --git a/tools/interactive/interactivetool_cellxgene.xml b/tools/interactive/interactivetool_cellxgene.xml index 06f39d7110d1..584423b59251 100644 --- a/tools/interactive/interactivetool_cellxgene.xml +++ b/tools/interactive/interactivetool_cellxgene.xml @@ -1,6 +1,9 @@ + - quay.io/biocontainers/cellxgene:1.1.1--pyhdfd78af_0 + + quay.io/biocontainers/cellxgene:1.1.1--pyhdfd78af_0 @@ -10,16 +13,54 @@ + + + - + + - + + + + From acd862c6329438d0281016b4e9907fce6f390d36 Mon Sep 17 00:00:00 2001 From: Pablo Moreno Date: Mon, 16 Jan 2023 17:29:22 +0000 Subject: [PATCH 0006/1254] Clean up --- tools/interactive/interactivetool_cellxgene.xml | 3 --- 1 file changed, 3 deletions(-) diff --git a/tools/interactive/interactivetool_cellxgene.xml b/tools/interactive/interactivetool_cellxgene.xml index 584423b59251..e1983198ba33 100644 --- a/tools/interactive/interactivetool_cellxgene.xml +++ b/tools/interactive/interactivetool_cellxgene.xml @@ -1,8 +1,5 @@ - - quay.io/biocontainers/cellxgene:1.1.1--pyhdfd78af_0 From acc34f6d2110d09858f5ff843f4c8d623a0617d9 Mon Sep 17 00:00:00 2001 From: Pablo Moreno Date: Tue, 7 Mar 2023 08:59:43 +0000 Subject: [PATCH 0007/1254] Adds help --- .../interactive/interactivetool_cellxgene.xml | 25 ++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/tools/interactive/interactivetool_cellxgene.xml b/tools/interactive/interactivetool_cellxgene.xml index e1983198ba33..590ea03374d9 100644 --- a/tools/interactive/interactivetool_cellxgene.xml +++ b/tools/interactive/interactivetool_cellxgene.xml @@ -61,7 +61,26 @@ adata.write_h5ad(output, compression="gzip") - - Interactive tool for visualising AnnData. - + From e9e8f9be27b02815fc3ddbbe6211aa58593c1488 Mon Sep 17 00:00:00 2001 From: Pablo Moreno Date: Tue, 7 Mar 2023 12:03:34 +0000 Subject: [PATCH 0008/1254] Change name and tutorial link --- ...ool_cellxgene.xml => interactivetool_cellxgene_1.1.1.xml} | 5 +++++ 1 file changed, 5 insertions(+) rename tools/interactive/{interactivetool_cellxgene.xml => interactivetool_cellxgene_1.1.1.xml} (95%) diff --git a/tools/interactive/interactivetool_cellxgene.xml b/tools/interactive/interactivetool_cellxgene_1.1.1.xml similarity index 95% rename from tools/interactive/interactivetool_cellxgene.xml rename to tools/interactive/interactivetool_cellxgene_1.1.1.xml index 590ea03374d9..2fec1b7865ac 100644 --- a/tools/interactive/interactivetool_cellxgene.xml +++ b/tools/interactive/interactivetool_cellxgene_1.1.1.xml @@ -82,5 +82,10 @@ Outputs If you create gene sets or differential experession sets, this will be available as a collection of files under "Cellxgene user annotations and gene sets" at the end of the execution (when you stop the interactive environment). + +Tutorials +--------- + +You can find cellxgene tuorials `here `_ . ]]> From 999322b35438b1dd5d6d6a70e3d9b6f43b2cd1d4 Mon Sep 17 00:00:00 2001 From: Pablo Moreno Date: Tue, 7 Mar 2023 12:05:10 +0000 Subject: [PATCH 0009/1254] Adds previous version as separate file --- .../interactivetool_cellxgene_0.16.2.xml | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 tools/interactive/interactivetool_cellxgene_0.16.2.xml diff --git a/tools/interactive/interactivetool_cellxgene_0.16.2.xml b/tools/interactive/interactivetool_cellxgene_0.16.2.xml new file mode 100644 index 000000000000..e9069afcb0af --- /dev/null +++ b/tools/interactive/interactivetool_cellxgene_0.16.2.xml @@ -0,0 +1,29 @@ + + + quay.io/biocontainers/cellxgene:0.16.2--py_0 + + + + 80 + + + + + + + + + + + + + + Interactive tool for visualising AnnData. + + From 6fe3db1db7abd4a2a1b921755f9fa7b1434405b1 Mon Sep 17 00:00:00 2001 From: Pablo Moreno Date: Tue, 7 Mar 2023 12:06:55 +0000 Subject: [PATCH 0010/1254] Update tool_conf.xml.sample --- lib/galaxy/config/sample/tool_conf.xml.sample | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/galaxy/config/sample/tool_conf.xml.sample b/lib/galaxy/config/sample/tool_conf.xml.sample index b713c208d1a6..401d10a838a6 100644 --- a/lib/galaxy/config/sample/tool_conf.xml.sample +++ b/lib/galaxy/config/sample/tool_conf.xml.sample @@ -133,7 +133,8 @@ - + + From 703751b65c7b3a8c2656dea896a5ea3b4f69b8a7 Mon Sep 17 00:00:00 2001 From: Pablo Moreno Date: Wed, 8 Mar 2023 13:17:11 +0000 Subject: [PATCH 0011/1254] Avoid errors automatically detected by galaxy due to stderr output --- tools/interactive/interactivetool_cellxgene_1.1.1.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/interactive/interactivetool_cellxgene_1.1.1.xml b/tools/interactive/interactivetool_cellxgene_1.1.1.xml index 2fec1b7865ac..08edd9273b4d 100644 --- a/tools/interactive/interactivetool_cellxgene_1.1.1.xml +++ b/tools/interactive/interactivetool_cellxgene_1.1.1.xml @@ -7,6 +7,13 @@ 80 + + + Date: Mon, 27 Mar 2023 15:06:15 +0100 Subject: [PATCH 0012/1254] Layer and optionally make var field unique. --- .../interactivetool_cellxgene_1.1.1.xml | 60 +++++++++++++------ 1 file changed, 42 insertions(+), 18 deletions(-) diff --git a/tools/interactive/interactivetool_cellxgene_1.1.1.xml b/tools/interactive/interactivetool_cellxgene_1.1.1.xml index 08edd9273b4d..14bbcfc97bd3 100644 --- a/tools/interactive/interactivetool_cellxgene_1.1.1.xml +++ b/tools/interactive/interactivetool_cellxgene_1.1.1.xml @@ -15,19 +15,22 @@ /> @@ -44,21 +47,31 @@ def rn(df, field, suffix = '-duplicate-'): adata = ad.read_h5ad(sys.argv[1]) output = sys.argv[2] gene_symbol_field = sys.argv[3] -if gene_symbol_field not in adata.var.keys(): - sys.exit(f"Field {gene_symbol_field} set as var_name does not exist in the var object. AnnData object will be used as it was given") +make_unique = (sys.argv[4].lower() == "true") +layer = sys.argv[5] -adata.var = rn(adata.var, gene_symbol_field, suffix = "_d") +if gene_symbol_field and make_unique: + if gene_symbol_field not in adata.var.keys(): + sys.exit(f"Field {gene_symbol_field} set as var_name does not exist in the var object. AnnData object will be used as it was given") + + adata.var = rn(adata.var, gene_symbol_field, suffix = "_d") + adata.var["extra_gene_id"] = adata.var.index + adata.var = adata.var.set_index(f"{gene_symbol_field}_u") -adata.var["extra_gene_id"] = adata.var.index -adata.var = adata.var.set_index(f"{gene_symbol_field}_u") +if layer: + if layer not in adata.layers.keys(): + sys.exit(f"Layer {layer} is not present in AnnData, only available layers are: {', '.join(adata.layers.keys())}") + else: + adata.X = adata.layers[layer] - -adata.write_h5ad(output, compression="gzip") +adata.write_h5ad(output) ]]> - + + + @@ -80,9 +93,20 @@ Selecting the Var name ---------------------- It can happen that the main index for the var element of AnnData is not the gene symbol field, in which case search by genes will probably be by identifier. -You can choose a different field (which contains the gene symbols) so that +You can choose a different field and celxgene will use this. If in addition you choose "Make unique", the AnnData is modified (in a new copy) so that that field is made unique and -it is indexed by it. Then cellxgene will allow searches by genes in that field. +it is indexed by it. Making it unique entails though loading the object into memory, +modifying and writing it back, which can delay the execution of cellxgene. + +Then cellxgene will allow searches by genes in that field. + +Selecting the layer +------------------- + +It can happen that the AnnData object contains multiple layers, for example +one with the raw counts and another with the normalised counts. You can select +which layer to use as the matrix for cellxgene. By default cellxgene will use the X slot, but +that slot might not contain the matrix that you want to visualise. Outputs ------- From 1741fa45ee1840603e06ede10367614e0f6f9a13 Mon Sep 17 00:00:00 2001 From: Pablo Moreno Date: Tue, 28 Mar 2023 10:19:54 +0100 Subject: [PATCH 0013/1254] Some tabs to spaces --- tools/interactive/interactivetool_cellxgene_1.1.1.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/interactive/interactivetool_cellxgene_1.1.1.xml b/tools/interactive/interactivetool_cellxgene_1.1.1.xml index 14bbcfc97bd3..c8c6c4cb72bc 100644 --- a/tools/interactive/interactivetool_cellxgene_1.1.1.xml +++ b/tools/interactive/interactivetool_cellxgene_1.1.1.xml @@ -17,21 +17,21 @@ From dd5f65ca89d0f688e850c08d6c7f3ee8c600ece0 Mon Sep 17 00:00:00 2001 From: mahendrapaipuri Date: Fri, 19 May 2023 17:20:39 +0200 Subject: [PATCH 0014/1254] Append galaxy prefix to config href --- config/plugins/visualizations/chiraviz/src/js/rna-viz.js | 2 +- config/plugins/visualizations/chiraviz/templates/chiraviz.mako | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/plugins/visualizations/chiraviz/src/js/rna-viz.js b/config/plugins/visualizations/chiraviz/src/js/rna-viz.js index eefaa3a1a0f4..93bc6d57ae9b 100644 --- a/config/plugins/visualizations/chiraviz/src/js/rna-viz.js +++ b/config/plugins/visualizations/chiraviz/src/js/rna-viz.js @@ -1,6 +1,6 @@ /*** -Chimera interactions viewer. It reads sqlite file +Chimera interactions viewer. It reads sqlite file and shows up the list of interactions and a summary in multiple plots, comic alignments diff --git a/config/plugins/visualizations/chiraviz/templates/chiraviz.mako b/config/plugins/visualizations/chiraviz/templates/chiraviz.mako index 5dd60ad2e75e..2bbba694758a 100644 --- a/config/plugins/visualizations/chiraviz/templates/chiraviz.mako +++ b/config/plugins/visualizations/chiraviz/templates/chiraviz.mako @@ -18,7 +18,7 @@ - ${h.stylesheet_link( root + 'static/plugins/visualizations/graphviz/static/css/style.css' )} + ${h.javascript_link( root + 'static/plugins/visualizations/graphviz/static/js/jquery.min.js' )} ${h.javascript_link( root + 'static/plugins/visualizations/graphviz/static/js/cytoscape.min.js' )} ${h.javascript_link( root + 'static/plugins/visualizations/graphviz/static/js/collapse.js' )} ${h.javascript_link( root + 'static/plugins/visualizations/graphviz/static/js/toolPanelFunctions.js' )} From 265082a471863c2e34556d219a9dff5978ceeb80 Mon Sep 17 00:00:00 2001 From: mahendrapaipuri Date: Fri, 19 May 2023 17:23:11 +0200 Subject: [PATCH 0016/1254] Add galaxy prefix to url --- .../visualizations/h5web/src/script.js | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/config/plugins/visualizations/h5web/src/script.js b/config/plugins/visualizations/h5web/src/script.js index db416ab2e35a..a596cf214d67 100644 --- a/config/plugins/visualizations/h5web/src/script.js +++ b/config/plugins/visualizations/h5web/src/script.js @@ -1,8 +1,8 @@ /** * Visualizer interface for h5web (https://github.com/silx-kit/h5web) - * + * * This relies on Galaxy being able to serve files using the - * h5grove protocol (https://silx-kit.github.io/h5grove/). + * h5grove protocol (https://silx-kit.github.io/h5grove/). * This provides efficient access to the contents of the * HDF5 file and avoids having to read the whole file at any * point. @@ -13,6 +13,12 @@ import React, { StrictMode } from 'react' import {render as reactRender} from 'react-dom' import {App, H5GroveProvider} from '@h5web/app' +/* This will be part of the charts/viz standard lib in 23.1 */ +const slashCleanup = /(\/)+/g; +function prefixedDownloadUrl(root, path) { + return `${root}/${path}`.replace(slashCleanup, "/"); +} + function MyApp(props) { return ( , document.getElementById(options.target) From a21625bd7ad9e9a04d6361463571f57600ecc585 Mon Sep 17 00:00:00 2001 From: mahendrapaipuri Date: Fri, 19 May 2023 17:23:31 +0200 Subject: [PATCH 0017/1254] Add missing arg to createContainers function --- .../visualizations/heatmap/heatmap_default/src/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/plugins/visualizations/heatmap/heatmap_default/src/script.js b/config/plugins/visualizations/heatmap/heatmap_default/src/script.js index 5ea473ec19aa..d9bf0966f02e 100644 --- a/config/plugins/visualizations/heatmap/heatmap_default/src/script.js +++ b/config/plugins/visualizations/heatmap/heatmap_default/src/script.js @@ -468,7 +468,7 @@ window.bundleEntries.heatmap_default = function (options) { } window.bundleEntries.heatmap_cluster = function (options) { - options.targets = createContainers(options.chart, options.target); + options.targets = createContainers("svg", options.chart, options.target); requestJobs( options.chart, requestCharts(options.chart, "heatmap"), From 4171eba33973a460fbd007d3cf4a2a3039f49079 Mon Sep 17 00:00:00 2001 From: mahendrapaipuri Date: Fri, 19 May 2023 17:24:06 +0200 Subject: [PATCH 0018/1254] Calculate app_root dynamically --- .../visualizations/hyphyvision/templates/hyphyvision.mako | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/plugins/visualizations/hyphyvision/templates/hyphyvision.mako b/config/plugins/visualizations/hyphyvision/templates/hyphyvision.mako index 0b0950c88f8c..995a4afa9373 100644 --- a/config/plugins/visualizations/hyphyvision/templates/hyphyvision.mako +++ b/config/plugins/visualizations/hyphyvision/templates/hyphyvision.mako @@ -1,5 +1,5 @@ <% - app_root = "/static/plugins/visualizations/hyphyvision/static/" + app_root = h.url_for("/static/plugins/visualizations/hyphyvision/static/") %> From 1c8821b35c2b95fbc68b8294d3d3072f17076264 Mon Sep 17 00:00:00 2001 From: mahendrapaipuri Date: Fri, 19 May 2023 17:24:32 +0200 Subject: [PATCH 0019/1254] Add galaxy prefix to dataset url --- config/plugins/visualizations/mvpapp/templates/mvpapp.mako | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/plugins/visualizations/mvpapp/templates/mvpapp.mako b/config/plugins/visualizations/mvpapp/templates/mvpapp.mako index 2158a236a7cc..b7419db9ab82 100644 --- a/config/plugins/visualizations/mvpapp/templates/mvpapp.mako +++ b/config/plugins/visualizations/mvpapp/templates/mvpapp.mako @@ -29,7 +29,7 @@ - + @@ -73,7 +73,7 @@ ${h.javascript_link(app_root + "dist/script.js")} $(document).ready(function (){ var config = { dbkey: '${hda.get_metadata().dbkey}', - href: document.location.origin, + href: document.location.origin + '${h.url_for( "/" )}'.replace(/\/$/, ''), dataName: '${hda.name}', historyID: '${trans.security.encode_id( hda.history_id )}', datasetID: '${trans.security.encode_id( hda.id )}', From 090f531b10baef613fd2bcc520e99a94849169fe Mon Sep 17 00:00:00 2001 From: mahendrapaipuri Date: Fri, 19 May 2023 17:25:33 +0200 Subject: [PATCH 0020/1254] Avoid adding galaxy prefix twice to dataset url --- config/plugins/visualizations/openlayers/src/script.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/config/plugins/visualizations/openlayers/src/script.js b/config/plugins/visualizations/openlayers/src/script.js index 48b1dcf9faab..90922403fa7f 100644 --- a/config/plugins/visualizations/openlayers/src/script.js +++ b/config/plugins/visualizations/openlayers/src/script.js @@ -215,8 +215,7 @@ var MapViewer = (function(mv) { const sourceVec = new Vector({ format: formatType, url: filePath, wrapX: false }); mv.createMap(filePath, sourceVec, options, chart, styleFunction, target); } else if (fileType === "shp") { - const fileUrl = prefixedDownloadUrl(options.root, filePath); - axios.get(fileUrl, { responseType: "arraybuffer" }).then(shpfile => { + axios.get(filePath, { responseType: "arraybuffer" }).then(shpfile => { console.debug(shpfile); shp(shpfile.data).then( geojson => { From 47536b3211e4de5d3f685652111bbccdc46b5e18 Mon Sep 17 00:00:00 2001 From: mahendrapaipuri Date: Fri, 19 May 2023 17:28:18 +0200 Subject: [PATCH 0021/1254] Use window.parent.options to get baseurl Move worker-stats.js file to static so that plugin can find it Update compiled scatterplot.js with above changes --- .../scatterplot/src/scatterplot.js | 4 +- .../{src => static}/numeric-column-stats.js | 0 .../scatterplot/static/scatterplot.js | 386 ++++++++++++++++-- .../{src => static}/worker-stats.js | 0 4 files changed, 354 insertions(+), 36 deletions(-) rename config/plugins/visualizations/scatterplot/{src => static}/numeric-column-stats.js (100%) rename config/plugins/visualizations/scatterplot/{src => static}/worker-stats.js (100%) diff --git a/config/plugins/visualizations/scatterplot/src/scatterplot.js b/config/plugins/visualizations/scatterplot/src/scatterplot.js index 8124b8e6b580..c167d1369991 100644 --- a/config/plugins/visualizations/scatterplot/src/scatterplot.js +++ b/config/plugins/visualizations/scatterplot/src/scatterplot.js @@ -821,7 +821,7 @@ var ScatterplotDisplay = Backbone.View.extend({ var view = this, config = this.model.get("config"), //TODO: very tied to datasets - should be generalized eventually - baseUrl = window.parent && window.parent.galaxy_config ? window.parent.galaxy_config.root : "/", + baseUrl = window.parent && window.parent.options ? window.parent.options.root : "/", xhr = $.getJSON(baseUrl + "api/datasets/" + this.dataset.id, { data_type: "raw_data", provider: "dataset-column", @@ -986,7 +986,7 @@ var ScatterplotDisplay = Backbone.View.extend({ } var view = this; var config = this.model.get("config"); - var meanWorker = new window.Worker("worker-stats.js"); + var meanWorker = new window.Worker("./static/worker-stats.js"); meanWorker.postMessage({ data: this.data, keys: [config.xColumn, config.yColumn] diff --git a/config/plugins/visualizations/scatterplot/src/numeric-column-stats.js b/config/plugins/visualizations/scatterplot/static/numeric-column-stats.js similarity index 100% rename from config/plugins/visualizations/scatterplot/src/numeric-column-stats.js rename to config/plugins/visualizations/scatterplot/static/numeric-column-stats.js diff --git a/config/plugins/visualizations/scatterplot/static/scatterplot.js b/config/plugins/visualizations/scatterplot/static/scatterplot.js index 523503e467dd..5d5f56081db4 100644 --- a/config/plugins/visualizations/scatterplot/static/scatterplot.js +++ b/config/plugins/visualizations/scatterplot/static/scatterplot.js @@ -1,58 +1,376 @@ -parcelRequire=function(e,r,n,t){var i="function"==typeof parcelRequire&&parcelRequire,o="function"==typeof require&&require;function u(n,t){if(!r[n]){if(!e[n]){var f="function"==typeof parcelRequire&&parcelRequire;if(!t&&f)return f(n,!0);if(i)return i(n,!0);if(o&&"string"==typeof n)return o(n);var c=new Error("Cannot find module '"+n+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[n][1][r]||r},p.cache={};var l=r[n]=new u.Module(n);e[n][0].call(l.exports,p,l,l.exports,this)}return r[n].exports;function p(e){return u(p.resolve(e))}}u.isParcelRequire=!0,u.Module=function(e){this.id=e,this.bundle=u,this.exports={}},u.modules=e,u.cache=r,u.parent=i,u.register=function(r,n){e[r]=[function(e,r){r.exports=n},{}]};for(var f=0;f1)for(var n=1;n1)for(var n=1;n0&&t-1 in e)}w.fn=w.prototype={jquery:"3.3.1",constructor:w,length:0,toArray:function(){return a.call(this)},get:function(e){return null==e?a.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=w.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return w.each(this,e)},map:function(e){return this.pushStack(w.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(a.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n+~]|"+M+")"+M+"*"),z=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),X=new RegExp(W),U=new RegExp("^"+R+"$"),V={ID:new RegExp("^#("+R+")"),CLASS:new RegExp("^\\.("+R+")"),TAG:new RegExp("^("+R+"|[*])"),ATTR:new RegExp("^"+I),PSEUDO:new RegExp("^"+W),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+P+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},G=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,K=/[+~]/,Z=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),ee=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},te=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ne=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},re=function(){p()},ie=me(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{L.apply(A=H.call(w.childNodes),w.childNodes),A[w.childNodes.length].nodeType}catch(Ce){L={apply:A.length?function(e,t){q.apply(e,H.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function oe(e,t,r,i){var o,s,l,c,f,h,y,m=t&&t.ownerDocument,T=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==T&&9!==T&&11!==T)return r;if(!i&&((t?t.ownerDocument||t:w)!==d&&p(t),t=t||d,g)){if(11!==T&&(f=J.exec(e)))if(o=f[1]){if(9===T){if(!(l=t.getElementById(o)))return r;if(l.id===o)return r.push(l),r}else if(m&&(l=m.getElementById(o))&&x(t,l)&&l.id===o)return r.push(l),r}else{if(f[2])return L.apply(r,t.getElementsByTagName(e)),r;if((o=f[3])&&n.getElementsByClassName&&t.getElementsByClassName)return L.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!S[e+" "]&&(!v||!v.test(e))){if(1!==T)m=t,y=e;else if("object"!==t.nodeName.toLowerCase()){for((c=t.getAttribute("id"))?c=c.replace(te,ne):t.setAttribute("id",c=b),s=(h=a(e)).length;s--;)h[s]="#"+c+" "+ye(h[s]);y=h.join(","),m=K.test(e)&&ge(t.parentNode)||t}if(y)try{return L.apply(r,m.querySelectorAll(y)),r}catch(C){}finally{c===b&&t.removeAttribute("id")}}}return u(e.replace(B,"$1"),t,r,i)}function ae(){var e=[];return function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}}function se(e){return e[b]=!0,e}function ue(e){var t=d.createElement("fieldset");try{return!!e(t)}catch(Ce){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function le(e,t){for(var n=e.split("|"),i=n.length;i--;)r.attrHandle[n[i]]=t}function ce(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function fe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function pe(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function de(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&&ie(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function he(e){return se(function(t){return t=+t,se(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function ge(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=oe.support={},o=oe.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},p=oe.setDocument=function(e){var t,i,a=e?e.ownerDocument||e:w;return a!==d&&9===a.nodeType&&a.documentElement?(h=(d=a).documentElement,g=!o(d),w!==d&&(i=d.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",re,!1):i.attachEvent&&i.attachEvent("onunload",re)),n.attributes=ue(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=ue(function(e){return e.appendChild(d.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=Q.test(d.getElementsByClassName),n.getById=ue(function(e){return h.appendChild(e).id=b,!d.getElementsByName||!d.getElementsByName(b).length}),n.getById?(r.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&g)return t.getElementsByClassName(e)},y=[],v=[],(n.qsa=Q.test(d.querySelectorAll))&&(ue(function(e){h.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+P+")"),e.querySelectorAll("[id~="+b+"-]").length||v.push("~="),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+b+"+*").length||v.push(".#.+[+~]")}),ue(function(e){e.innerHTML="";var t=d.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),h.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(n.matchesSelector=Q.test(m=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&ue(function(e){n.disconnectedMatch=m.call(e,"*"),m.call(e,"[s!='']:x"),y.push("!=",W)}),v=v.length&&new RegExp(v.join("|")),y=y.length&&new RegExp(y.join("|")),t=Q.test(h.compareDocumentPosition),x=t||Q.test(h.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return f=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e===d||e.ownerDocument===w&&x(w,e)?-1:t===d||t.ownerDocument===w&&x(w,t)?1:c?O(c,e)-O(c,t):0:4&r?-1:1)}:function(e,t){if(e===t)return f=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===d?-1:t===d?1:i?-1:o?1:c?O(c,e)-O(c,t):0;if(i===o)return ce(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?ce(a[r],s[r]):a[r]===w?-1:s[r]===w?1:0},d):d},oe.matches=function(e,t){return oe(e,null,null,t)},oe.matchesSelector=function(e,t){if((e.ownerDocument||e)!==d&&p(e),t=t.replace(z,"='$1']"),n.matchesSelector&&g&&!S[t+" "]&&(!y||!y.test(t))&&(!v||!v.test(t)))try{var r=m.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(Ce){}return oe(t,d,null,[e]).length>0},oe.contains=function(e,t){return(e.ownerDocument||e)!==d&&p(e),x(e,t)},oe.attr=function(e,t){(e.ownerDocument||e)!==d&&p(e);var i=r.attrHandle[t.toLowerCase()],o=i&&N.call(r.attrHandle,t.toLowerCase())?i(e,t,!g):void 0;return void 0!==o?o:n.attributes||!g?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},oe.escape=function(e){return(e+"").replace(te,ne)},oe.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},oe.uniqueSort=function(e){var t,r=[],i=0,o=0;if(f=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(D),f){for(;t=e[o++];)t===e[o]&&(i=r.push(o));for(;i--;)e.splice(r[i],1)}return c=null,e},i=oe.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=i(t);return n},(r=oe.selectors={cacheLength:50,createPseudo:se,match:V,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(Z,ee),e[3]=(e[3]||e[4]||e[5]||"").replace(Z,ee),"~="===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]||oe.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]&&oe.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return V.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=a(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Z,ee).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=E[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&E(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=oe.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($," ")+" ").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,g=o!==a?"nextSibling":"previousSibling",v=t.parentNode,y=s&&t.nodeName.toLowerCase(),m=!u&&!s,x=!1;if(v){if(o){for(;g;){for(p=t;p=p[g];)if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?v.firstChild:v.lastChild],a&&m){for(x=(d=(l=(c=(f=(p=v)[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===T&&l[1])&&l[2],p=d&&v.childNodes[d];p=++d&&p&&p[g]||(x=d=0)||h.pop();)if(1===p.nodeType&&++x&&p===t){c[e]=[T,d,x];break}}else if(m&&(x=d=(l=(c=(f=(p=t)[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===T&&l[1]),!1===x)for(;(p=++d&&p&&p[g]||(x=d=0)||h.pop())&&((s?p.nodeName.toLowerCase()!==y:1!==p.nodeType)||!++x||(m&&((c=(f=p[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]=[T,x]),p!==t)););return(x-=i)===r||x%r==0&&x/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||oe.error("unsupported pseudo: "+e);return i[b]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?se(function(e,n){for(var r,o=i(e,t),a=o.length;a--;)e[r=O(e,o[a])]=!(n[r]=o[a])}):function(e){return i(e,0,n)}):i}},pseudos:{not:se(function(e){var t=[],n=[],r=s(e.replace(B,"$1"));return r[b]?se(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:se(function(e){return function(t){return oe(e,t).length>0}}),contains:se(function(e){return e=e.replace(Z,ee),function(t){return(t.textContent||t.innerText||i(t)).indexOf(e)>-1}}),lang:se(function(e){return U.test(e||"")||oe.error("unsupported lang: "+e),e=e.replace(Z,ee).toLowerCase(),function(t){var n;do{if(n=g?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===h},focus:function(e){return e===d.activeElement&&(!d.hasFocus||d.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:de(!1),disabled:de(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return Y.test(e.nodeName)},input:function(e){return G.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:he(function(){return[0]}),last:he(function(e,t){return[t-1]}),eq:he(function(e,t,n){return[n<0?n+t:n]}),even:he(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:he(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 be(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s-1&&(o[l]=!(a[l]=f))}}else y=be(y===a?y.splice(h,y.length):y),i?i(null,a,y,u):L.apply(a,y)})}function Te(e){for(var t,n,i,o=e.length,a=r.relative[e[0].type],s=a||r.relative[" "],u=a?1:0,c=me(function(e){return e===t},s,!0),f=me(function(e){return O(t,e)>-1},s,!0),p=[function(e,n,r){var i=!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):f(e,n,r));return t=null,i}];u1&&xe(p),u>1&&ye(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(B,"$1"),n,u0,i=e.length>0,o=function(o,a,s,u,c){var f,h,v,y=0,m="0",x=o&&[],b=[],w=l,C=o||i&&r.find.TAG("*",c),E=T+=null==w?1:Math.random()||.1,k=C.length;for(c&&(l=a===d||a||c);m!==k&&null!=(f=C[m]);m++){if(i&&f){for(h=0,a||f.ownerDocument===d||(p(f),s=!g);v=e[h++];)if(v(f,a||d,s)){u.push(f);break}c&&(T=E)}n&&((f=!v&&f)&&y--,o&&x.push(f))}if(y+=m,n&&m!==y){for(h=0;v=t[h++];)v(x,b,a,s);if(o){if(y>0)for(;m--;)x[m]||b[m]||(b[m]=j.call(u));b=be(b)}L.apply(u,b),c&&!o&&b.length>0&&y+t.length>1&&oe.uniqueSort(u)}return c&&(T=E,l=w),x};return n?se(o):o}(o,i))).selector=e}return s},u=oe.select=function(e,t,n,i){var o,u,l,c,f,p="function"==typeof e&&e,d=!i&&a(e=p.selector||e);if(n=n||[],1===d.length){if((u=d[0]=d[0].slice(0)).length>2&&"ID"===(l=u[0]).type&&9===t.nodeType&&g&&r.relative[u[1].type]){if(!(t=(r.find.ID(l.matches[0].replace(Z,ee),t)||[])[0]))return n;p&&(t=t.parentNode),e=e.slice(u.shift().value.length)}for(o=V.needsContext.test(e)?0:u.length;o--&&(l=u[o],!r.relative[c=l.type]);)if((f=r.find[c])&&(i=f(l.matches[0].replace(Z,ee),K.test(u[0].type)&&ge(t.parentNode)||t))){if(u.splice(o,1),!(e=i.length&&ye(u)))return L.apply(n,i),n;break}}return(p||s(e,d))(i,t,!g,n,!t||K.test(e)&&ge(t.parentNode)||t),n},n.sortStable=b.split("").sort(D).join("")===b,n.detectDuplicates=!!f,p(),n.sortDetached=ue(function(e){return 1&e.compareDocumentPosition(d.createElement("fieldset"))}),ue(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||le("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&ue(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||le("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ue(function(e){return null==e.getAttribute("disabled")})||le(P,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),oe}(t);w.find=E,w.expr=E.selectors,w.expr[":"]=w.expr.pseudos,w.uniqueSort=w.unique=E.uniqueSort,w.text=E.getText,w.isXMLDoc=E.isXML,w.contains=E.contains,w.escapeSelector=E.escape;var k=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&w(e).is(n))break;r.push(e)}return r},S=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},D=w.expr.match.needsContext;function N(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var A=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,t,n){return v(t)?w.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?w.grep(e,function(e){return e===t!==n}):"string"!=typeof t?w.grep(e,function(e){return l.call(t,e)>-1!==n}):w.filter(t,e,n)}w.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?w.find.matchesSelector(r,e)?[r]:[]:w.find.matches(e,w.grep(t,function(e){return 1===e.nodeType}))},w.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(w(e).filter(function(){for(t=0;t1?w.uniqueSort(n):n},filter:function(e){return this.pushStack(j(this,e||[],!1))},not:function(e){return this.pushStack(j(this,e||[],!0))},is:function(e){return!!j(this,"string"==typeof e&&D.test(e)?w(e):e||[],!1).length}});var q,L=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(w.fn.init=function(e,t,n){var r,o;if(!e)return this;if(n=n||q,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:L.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 w?t[0]:t,w.merge(this,w.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:i,!0)),A.test(r[1])&&w.isPlainObject(t))for(r in t)v(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(o=i.getElementById(r[2]))&&(this[0]=o,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==n.ready?n.ready(e):e(w):w.makeArray(e,this)}).prototype=w.fn,q=w(i);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function P(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}w.fn.extend({has:function(e){var t=w(e,this),n=t.length;return this.filter(function(){for(var e=0;e-1:1===n.nodeType&&w.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?w.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?l.call(w(e),this[0]):l.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(w.uniqueSort(w.merge(this.get(),w(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),w.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return k(e,"parentNode")},parentsUntil:function(e,t,n){return k(e,"parentNode",n)},next:function(e){return P(e,"nextSibling")},prev:function(e){return P(e,"previousSibling")},nextAll:function(e){return k(e,"nextSibling")},prevAll:function(e){return k(e,"previousSibling")},nextUntil:function(e,t,n){return k(e,"nextSibling",n)},prevUntil:function(e,t,n){return k(e,"previousSibling",n)},siblings:function(e){return S((e.parentNode||{}).firstChild,e)},children:function(e){return S(e.firstChild)},contents:function(e){return N(e,"iframe")?e.contentDocument:(N(e,"template")&&(e=e.content||e),w.merge([],e.childNodes))}},function(e,t){w.fn[e]=function(n,r){var i=w.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=w.filter(r,i)),this.length>1&&(O[e]||w.uniqueSort(i),H.test(e)&&i.reverse()),this.pushStack(i)}});var M=/[^\x20\t\r\n\f]+/g;function R(e){return e}function I(e){throw e}function W(e,t,n,r){var i;try{e&&v(i=e.promise)?i.call(e).done(t).fail(n):e&&v(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}w.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return w.each(e.match(M)||[],function(e,n){t[n]=!0}),t}(e):w.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?w.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},w.extend({Deferred:function(e){var n=[["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"]],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 w.Deferred(function(t){w.each(n,function(n,r){var i=v(e[r[4]])&&e[r[4]];o[r[1]](function(){var e=i&&i.apply(this,arguments);e&&v(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!==I&&(s=void 0,u=[t]),n.rejectWith(s,u))}};e?c():(w.Deferred.getStackHook&&(c.stackTrace=w.Deferred.getStackHook()),t.setTimeout(c))}}return w.Deferred(function(t){n[0][3].add(a(0,t,v(i)?i:R,t.notifyWith)),n[1][3].add(a(0,t,v(e)?e:R)),n[2][3].add(a(0,t,v(r)?r:I))}).promise()},promise:function(e){return null!=e?w.extend(e,i):i}},o={};return w.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=a.call(arguments),o=w.Deferred(),s=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?a.call(arguments):n,--t||o.resolveWith(r,i)}};if(t<=1&&(W(e,o.done(s(n)).resolve,o.reject,!t),"pending"===o.state()||v(i[n]&&i[n].then)))return o.then();for(;n--;)W(i[n],s(n),o.reject);return o.promise()}});var $=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;w.Deferred.exceptionHook=function(e,n){t.console&&t.console.warn&&e&&$.test(e.name)&&t.console.warn("jQuery.Deferred exception: "+e.message,e.stack,n)},w.readyException=function(e){t.setTimeout(function(){throw e})};var B=w.Deferred();function F(){i.removeEventListener("DOMContentLoaded",F),t.removeEventListener("load",F),w.ready()}w.fn.ready=function(e){return B.then(e).catch(function(e){w.readyException(e)}),this},w.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--w.readyWait:w.isReady)||(w.isReady=!0,!0!==e&&--w.readyWait>0||B.resolveWith(i,[w]))}}),w.ready.then=B.then,"complete"===i.readyState||"loading"!==i.readyState&&!i.documentElement.doScroll?t.setTimeout(w.ready):(i.addEventListener("DOMContentLoaded",F),t.addEventListener("load",F));var _=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)_(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,v(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(w(e),n)})),t))for(;s1,null,!0)},removeData:function(e){return this.each(function(){J.remove(this,e)})}}),w.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Q.get(e,t),n&&(!r||Array.isArray(n)?r=Q.access(e,t,w.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=w.queue(e,t),r=n.length,i=n.shift(),o=w._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){w.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Q.get(e,n)||Q.access(e,n,{empty:w.Callbacks("once memory").add(function(){Q.remove(e,[t+"queue",n])})})}}),w.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,pe=/^$|^module$|\/(?:java|ecma)script/i,de={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function he(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&N(e,t)?w.merge([e],n):n}function ge(e,t){for(var n=0,r=e.length;n-1)i&&i.push(o);else if(l=w.contains(o.ownerDocument,o),a=he(f.appendChild(o),"script"),l&&ge(a),n)for(c=0;o=a[c++];)pe.test(o.type||"")&&n.push(o);return f}ve=i.createDocumentFragment().appendChild(i.createElement("div")),(ye=i.createElement("input")).setAttribute("type","radio"),ye.setAttribute("checked","checked"),ye.setAttribute("name","t"),ve.appendChild(ye),g.checkClone=ve.cloneNode(!0).cloneNode(!0).lastChild.checked,ve.innerHTML="",g.noCloneChecked=!!ve.cloneNode(!0).lastChild.defaultValue;var be=i.documentElement,we=/^key/,Te=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ce=/^([^.]*)(?:\.(.+)|)/;function Ee(){return!0}function ke(){return!1}function Se(){try{return i.activeElement}catch(e){}}function De(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)De(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=ke;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return w().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=w.guid++)),e.each(function(){w.event.add(this,t,i,r,n)})}w.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.get(e);if(v)for(n.handler&&(n=(o=n).handler,i=o.selector),i&&w.find.matchesSelector(be,i),n.guid||(n.guid=w.guid++),(u=v.events)||(u=v.events={}),(a=v.handle)||(a=v.handle=function(t){return void 0!==w&&w.event.triggered!==t.type?w.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(M)||[""]).length;l--;)d=g=(s=Ce.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=w.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=w.event.special[d]||{},c=w.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&w.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),w.event.global[d]=!0)},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.hasData(e)&&Q.get(e);if(v&&(u=v.events)){for(l=(t=(t||"").match(M)||[""]).length;l--;)if(d=g=(s=Ce.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){for(f=w.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)||w.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)w.event.remove(e,d+t[l],n,r,!0);w.isEmptyObject(u)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=w.event.fix(e),u=new Array(arguments.length),l=(Q.get(this,"events")||{})[s.type]||[],c=w.event.special[s.type]||{};for(u[0]=s,t=1;t=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n-1:w.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u\x20\t\r\n\f]*)[^>]*)\/>/gi,Ae=/\s*$/g;function Le(e,t){return N(e,"table")&&N(11!==t.nodeType?t:t.firstChild,"tr")&&w(e).children("tbody")[0]||e}function He(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Oe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Pe(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(Q.hasData(e)&&(o=Q.access(e),a=Q.set(t,o),l=o.events))for(i in delete a.handle,a.events={},l)for(n=0,r=l[i].length;n1&&"string"==typeof h&&!g.checkClone&&je.test(h))return e.each(function(i){var o=e.eq(i);y&&(t[0]=h.call(this,i,o.html())),Me(o,t,n,r)});if(p&&(o=(i=xe(t,e[0].ownerDocument,!1,e,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(u=(a=w.map(he(i,"script"),He)).length;f")},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=w.contains(e.ownerDocument,e);if(!(g.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||w.isXMLDoc(e)))for(a=he(c),r=0,i=(o=he(e)).length;r0&&ge(a,!f&&he(e,"script")),c},cleanData:function(e){for(var t,n,r,i=w.event.special,o=0;void 0!==(n=e[o]);o++)if(G(n)){if(t=n[Q.expando]){if(t.events)for(r in t.events)i[r]?w.event.remove(n,r):w.removeEvent(n,r,t.handle);n[Q.expando]=void 0}n[J.expando]&&(n[J.expando]=void 0)}}}),w.fn.extend({detach:function(e){return Re(this,e,!0)},remove:function(e){return Re(this,e)},text:function(e){return _(this,function(e){return void 0===e?w.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 Me(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Le(this,e).appendChild(e)})},prepend:function(){return Me(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Le(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Me(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Me(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&&(w.cleanData(he(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return w.clone(this,e,t)})},html:function(e){return _(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&&!Ae.test(e)&&!de[(fe.exec(e)||["",""])[1].toLowerCase()]){e=w.htmlPrefilter(e);try{for(;n=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))),u}function Ke(e,t,n){var r=We(e),i=Be(e,t,r),o="border-box"===w.css(e,"boxSizing",!1,r),a=o;if(Ie.test(i)){if(!n)return i;i="auto"}return a=a&&(g.boxSizingReliable()||i===e.style[t]),("auto"===i||!parseFloat(i)&&"inline"===w.css(e,"display",!1,r))&&(i=e["offset"+t[0].toUpperCase()+t.slice(1)],a=!0),(i=parseFloat(i)||0)+Je(e,t,n||(o?"border":"content"),a,r,i)+"px"}function Ze(e,t,n,r,i){return new Ze.prototype.init(e,t,n,r,i)}w.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Be(e,"opacity");return""===n?"1":n}}}},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(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=V(t),u=ze.test(t),l=e.style;if(u||(t=Ye(s)),a=w.cssHooks[t]||w.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=ne.exec(n))&&i[1]&&(n=ae(e,t,i),o="number"),null!=n&&n==n&&("number"===o&&(n+=i&&i[3]||(w.cssNumber[s]?"":"px")),g.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=V(t);return ze.test(t)||(t=Ye(s)),(a=w.cssHooks[t]||w.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Be(e,t,r)),"normal"===i&&t in Ue&&(i=Ue[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),w.each(["height","width"],function(e,t){w.cssHooks[t]={get:function(e,n,r){if(n)return!_e.test(w.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?Ke(e,t,r):oe(e,Xe,function(){return Ke(e,t,r)})},set:function(e,n,r){var i,o=We(e),a="border-box"===w.css(e,"boxSizing",!1,o),s=r&&Je(e,t,r,a,o);return a&&g.scrollboxSize()===o.position&&(s-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-Je(e,t,"border",!1,o)-.5)),s&&(i=ne.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=w.css(e,t)),Qe(0,n,s)}}}),w.cssHooks.marginLeft=Fe(g.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Be(e,"marginLeft"))||e.getBoundingClientRect().left-oe(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),w.each({margin:"",padding:"",border:"Width"},function(e,t){w.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+re[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(w.cssHooks[e+t].set=Qe)}),w.fn.extend({css:function(e,t){return _(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=We(e),i=t.length;a1)}}),w.Tween=Ze,Ze.prototype={constructor:Ze,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||w.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(w.cssNumber[n]?"":"px")},cur:function(){var e=Ze.propHooks[this.prop];return e&&e.get?e.get(this):Ze.propHooks._default.get(this)},run:function(e){var t,n=Ze.propHooks[this.prop];return this.options.duration?this.pos=t=w.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):Ze.propHooks._default.set(this),this}},Ze.prototype.init.prototype=Ze.prototype,Ze.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=w.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){w.fx.step[e.prop]?w.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[w.cssProps[e.prop]]&&!w.cssHooks[e.prop]?e.elem[e.prop]=e.now:w.style(e.elem,e.prop,e.now+e.unit)}}},Ze.propHooks.scrollTop=Ze.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},w.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},w.fx=Ze.prototype.init,w.fx.step={};var et,tt,nt=/^(?:toggle|show|hide)$/,rt=/queueHooks$/;function it(){tt&&(!1===i.hidden&&t.requestAnimationFrame?t.requestAnimationFrame(it):t.setTimeout(it,w.fx.interval),w.fx.tick())}function ot(){return t.setTimeout(function(){et=void 0}),et=Date.now()}function at(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=re[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function st(e,t,n){for(var r,i=(ut.tweeners[t]||[]).concat(ut.tweeners["*"]),o=0,a=i.length;o1)},removeAttr:function(e){return this.each(function(){w.removeAttr(this,e)})}}),w.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?w.prop(e,t,n):(1===o&&w.isXMLDoc(e)||(i=w.attrHooks[t.toLowerCase()]||(w.expr.match.bool.test(t)?lt:void 0)),void 0!==n?null===n?void w.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=w.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!g.radioValue&&"radio"===t&&N(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(M);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),lt={set:function(e,t,n){return!1===t?w.removeAttr(e,n):e.setAttribute(n,n),n}},w.each(w.expr.match.bool.source.match(/\w+/g),function(e,t){var n=ct[t]||w.find.attr;ct[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=ct[a],ct[a]=i,i=null!=n(e,t,r)?a:null,ct[a]=o),i}});var ft=/^(?:input|select|textarea|button)$/i,pt=/^(?:a|area)$/i;function dt(e){return(e.match(M)||[]).join(" ")}function ht(e){return e.getAttribute&&e.getAttribute("class")||""}function gt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(M)||[]}w.fn.extend({prop:function(e,t){return _(this,w.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[w.propFix[e]||e]})}}),w.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&w.isXMLDoc(e)||(t=w.propFix[t]||t,i=w.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=w.find.attr(e,"tabindex");return t?parseInt(t,10):ft.test(e.nodeName)||pt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),g.optSelected||(w.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)}}),w.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){w.propFix[this.toLowerCase()]=this}),w.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(v(e))return this.each(function(t){w(this).addClass(e.call(this,t,ht(this)))});if((t=gt(e)).length)for(;n=this[u++];)if(i=ht(n),r=1===n.nodeType&&" "+dt(i)+" "){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=dt(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(v(e))return this.each(function(t){w(this).removeClass(e.call(this,t,ht(this)))});if(!arguments.length)return this.attr("class","");if((t=gt(e)).length)for(;n=this[u++];)if(i=ht(n),r=1===n.nodeType&&" "+dt(i)+" "){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");i!==(s=dt(r))&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):v(e)?this.each(function(n){w(this).toggleClass(e.call(this,n,ht(this),t),t)}):this.each(function(){var t,i,o,a;if(r)for(i=0,o=w(this),a=gt(e);t=a[i++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else void 0!==e&&"boolean"!==n||((t=ht(this))&&Q.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":Q.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+dt(ht(n))+" ").indexOf(t)>-1)return!0;return!1}});var vt=/\r/g;w.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=v(e),this.each(function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,w(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=w.map(i,function(e){return null==e?"":e+""})),(t=w.valHooks[this.type]||w.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))})):i?(t=w.valHooks[i.type]||w.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(vt,""):null==n?"":n:void 0}}),w.extend({valHooks:{option:{get:function(e){var t=w.find.attr(e,"value");return null!=t?t:dt(w.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}}}}),w.each(["radio","checkbox"],function(){w.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=w.inArray(w(e).val(),t)>-1}},g.checkOn||(w.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),g.focusin="onfocusin"in t;var yt=/^(?:focusinfocus|focusoutblur)$/,mt=function(e){e.stopPropagation()};w.extend(w.event,{trigger:function(e,n,r,o){var a,s,u,l,c,f,d,h,g=[r||i],m=p.call(e,"type")?e.type:e,x=p.call(e,"namespace")?e.namespace.split("."):[];if(s=h=u=r=r||i,3!==r.nodeType&&8!==r.nodeType&&!yt.test(m+w.event.triggered)&&(m.indexOf(".")>-1&&(x=m.split("."),m=x.shift(),x.sort()),c=m.indexOf(":")<0&&"on"+m,(e=e[w.expando]?e:new w.Event(m,"object"==typeof e&&e)).isTrigger=o?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]:w.makeArray(n,[e]),d=w.event.special[m]||{},o||!d.trigger||!1!==d.trigger.apply(r,n))){if(!o&&!d.noBubble&&!y(r)){for(l=d.delegateType||m,yt.test(l+m)||(s=s.parentNode);s;s=s.parentNode)g.push(s),u=s;u===(r.ownerDocument||i)&&g.push(u.defaultView||u.parentWindow||t)}for(a=0;(s=g[a++])&&!e.isPropagationStopped();)h=s,e.type=a>1?l:d.bindType||m,(f=(Q.get(s,"events")||{})[e.type]&&Q.get(s,"handle"))&&f.apply(s,n),(f=c&&s[c])&&f.apply&&G(s)&&(e.result=f.apply(s,n),!1===e.result&&e.preventDefault());return e.type=m,o||e.isDefaultPrevented()||d._default&&!1!==d._default.apply(g.pop(),n)||!G(r)||c&&v(r[m])&&!y(r)&&((u=r[c])&&(r[c]=null),w.event.triggered=m,e.isPropagationStopped()&&h.addEventListener(m,mt),r[m](),e.isPropagationStopped()&&h.removeEventListener(m,mt),w.event.triggered=void 0,u&&(r[c]=u)),e.result}},simulate:function(e,t,n){var r=w.extend(new w.Event,n,{type:e,isSimulated:!0});w.event.trigger(r,null,t)}}),w.fn.extend({trigger:function(e,t){return this.each(function(){w.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return w.event.trigger(e,t,n,!0)}}),g.focusin||w.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){w.event.simulate(t,e.target,w.event.fix(e))};w.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=Q.access(r,t);i||r.addEventListener(e,n,!0),Q.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=Q.access(r,t)-1;i?Q.access(r,t,i):(r.removeEventListener(e,n,!0),Q.remove(r,t))}}});var xt=t.location,bt=Date.now(),wt=/\?/;w.parseXML=function(e){var n;if(!e||"string"!=typeof e)return null;try{n=(new t.DOMParser).parseFromString(e,"text/xml")}catch(r){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||w.error("Invalid XML: "+e),n};var Tt=/\[\]$/,Ct=/\r?\n/g,Et=/^(?:submit|button|image|reset|file)$/i,kt=/^(?:input|select|textarea|keygen)/i;function St(e,t,n,r){var i;if(Array.isArray(t))w.each(t,function(t,i){n||Tt.test(e)?r(e,i):St(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)});else if(n||"object"!==b(t))r(e,t);else for(i in t)St(e+"["+i+"]",t[i],n,r)}w.param=function(e,t){var n,r=[],i=function(e,t){var n=v(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.jquery&&!w.isPlainObject(e))w.each(e,function(){i(this.name,this.value)});else for(n in e)St(n,e[n],t,i);return r.join("&")},w.fn.extend({serialize:function(){return w.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=w.prop(this,"elements");return e?w.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!w(this).is(":disabled")&&kt.test(this.nodeName)&&!Et.test(e)&&(this.checked||!ce.test(e))}).map(function(e,t){var n=w(this).val();return null==n?null:Array.isArray(n)?w.map(n,function(e){return{name:t.name,value:e.replace(Ct,"\r\n")}}):{name:t.name,value:n.replace(Ct,"\r\n")}}).get()}});var Dt=/%20/g,Nt=/#.*$/,At=/([?&])_=[^&]*/,jt=/^(.*?):[ \t]*([^\r\n]*)$/gm,qt=/^(?:GET|HEAD)$/,Lt=/^\/\//,Ht={},Ot={},Pt="*/".concat("*"),Mt=i.createElement("a");function Rt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(M)||[];if(v(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function It(e,t,n,r){var i={},o=e===Ot;function a(s){var u;return i[s]=!0,w.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 Wt(e,t){var n,r,i=w.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&w.extend(!0,e,r),e}Mt.href=xt.href,w.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:xt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(xt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Pt,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(e,t){return t?Wt(Wt(e,w.ajaxSettings),t):Wt(w.ajaxSettings,e)},ajaxPrefilter:Rt(Ht),ajaxTransport:Rt(Ot),ajax:function(e,n){"object"==typeof e&&(n=e,e=void 0),n=n||{};var r,o,a,s,u,l,c,f,p,d,h=w.ajaxSetup({},n),g=h.context||h,v=h.context&&(g.nodeType||g.jquery)?w(g):w.event,y=w.Deferred(),m=w.Callbacks("once memory"),x=h.statusCode||{},b={},T={},C="canceled",E={readyState:0,getResponseHeader:function(e){var t;if(c){if(!s)for(s={};t=jt.exec(a);)s[t[1].toLowerCase()]=t[2];t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return c?a:null},setRequestHeader:function(e,t){return null==c&&(e=T[e.toLowerCase()]=T[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return null==c&&(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)E.always(e[E.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),k(0,t),this}};if(y.promise(E),h.url=((e||h.url||xt.href)+"").replace(Lt,xt.protocol+"//"),h.type=n.method||n.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(M)||[""],null==h.crossDomain){l=i.createElement("a");try{l.href=h.url,l.href=l.href,h.crossDomain=Mt.protocol+"//"+Mt.host!=l.protocol+"//"+l.host}catch(S){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=w.param(h.data,h.traditional)),It(Ht,h,n,E),c)return E;for(p in(f=w.event&&h.global)&&0==w.active++&&w.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!qt.test(h.type),o=h.url.replace(Nt,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(Dt,"+")):(d=h.url.slice(o.length),h.data&&(h.processData||"string"==typeof h.data)&&(o+=(wt.test(o)?"&":"?")+h.data,delete h.data),!1===h.cache&&(o=o.replace(At,"$1"),d=(wt.test(o)?"&":"?")+"_="+bt+++d),h.url=o+d),h.ifModified&&(w.lastModified[o]&&E.setRequestHeader("If-Modified-Since",w.lastModified[o]),w.etag[o]&&E.setRequestHeader("If-None-Match",w.etag[o])),(h.data&&h.hasContent&&!1!==h.contentType||n.contentType)&&E.setRequestHeader("Content-Type",h.contentType),E.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+Pt+"; q=0.01":""):h.accepts["*"]),h.headers)E.setRequestHeader(p,h.headers[p]);if(h.beforeSend&&(!1===h.beforeSend.call(g,E,h)||c))return E.abort();if(C="abort",m.add(h.complete),E.done(h.success),E.fail(h.error),r=It(Ot,h,n,E)){if(E.readyState=1,f&&v.trigger("ajaxSend",[E,h]),c)return E;h.async&&h.timeout>0&&(u=t.setTimeout(function(){E.abort("timeout")},h.timeout));try{c=!1,r.send(b,k)}catch(S){if(c)throw S;k(-1,S)}}else k(-1,"No Transport");function k(e,n,i,s){var l,p,d,b,T,C=n;c||(c=!0,u&&t.clearTimeout(u),r=void 0,a=s||"",E.readyState=e>0?4:0,l=e>=200&&e<300||304===e,i&&(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]}(h,E,i)),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(S){return{state:"parsererror",error:a?S:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(h,b,E,l),l?(h.ifModified&&((T=E.getResponseHeader("Last-Modified"))&&(w.lastModified[o]=T),(T=E.getResponseHeader("etag"))&&(w.etag[o]=T)),204===e||"HEAD"===h.type?C="nocontent":304===e?C="notmodified":(C=b.state,p=b.data,l=!(d=b.error))):(d=C,!e&&C||(C="error",e<0&&(e=0))),E.status=e,E.statusText=(n||C)+"",l?y.resolveWith(g,[p,C,E]):y.rejectWith(g,[E,C,d]),E.statusCode(x),x=void 0,f&&v.trigger(l?"ajaxSuccess":"ajaxError",[E,h,l?p:d]),m.fireWith(g,[E,C]),f&&(v.trigger("ajaxComplete",[E,h]),--w.active||w.event.trigger("ajaxStop")))}return E},getJSON:function(e,t,n){return w.get(e,t,n,"json")},getScript:function(e,t){return w.get(e,void 0,t,"script")}}),w.each(["get","post"],function(e,t){w[t]=function(e,n,r,i){return v(n)&&(i=i||r,r=n,n=void 0),w.ajax(w.extend({url:e,type:t,dataType:i,data:n,success:r},w.isPlainObject(e)&&e))}}),w._evalUrl=function(e){return w.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},w.fn.extend({wrapAll:function(e){var t;return this[0]&&(v(e)&&(e=e.call(this[0])),t=w(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 v(e)?this.each(function(t){w(this).wrapInner(e.call(this,t))}):this.each(function(){var t=w(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=v(e);return this.each(function(n){w(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){w(this).replaceWith(this.childNodes)}),this}}),w.expr.pseudos.hidden=function(e){return!w.expr.pseudos.visible(e)},w.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},w.ajaxSettings.xhr=function(){try{return new t.XMLHttpRequest}catch(e){}};var $t={0:200,1223:204},Bt=w.ajaxSettings.xhr();g.cors=!!Bt&&"withCredentials"in Bt,g.ajax=Bt=!!Bt,w.ajaxTransport(function(e){var n,r;if(g.cors||Bt&&!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($t[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()}}}),w.ajaxPrefilter(function(e){e.crossDomain&&(e.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(e){return w.globalEval(e),e}}}),w.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),w.ajaxTransport("script",function(e){var t,n;if(e.crossDomain)return{send:function(r,o){t=w(" From 5840eb447157efc7eca31b557fffdb05eef8c581 Mon Sep 17 00:00:00 2001 From: mahendrapaipuri Date: Fri, 19 May 2023 18:35:24 +0200 Subject: [PATCH 0023/1254] Fix linting and failing unit test --- .../components/DatasetInformation/DatasetInformation.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/components/DatasetInformation/DatasetInformation.vue b/client/src/components/DatasetInformation/DatasetInformation.vue index b923454ffdc0..167e06633fe3 100644 --- a/client/src/components/DatasetInformation/DatasetInformation.vue +++ b/client/src/components/DatasetInformation/DatasetInformation.vue @@ -77,7 +77,7 @@ + + diff --git a/client/src/components/Form/FormElement.vue b/client/src/components/Form/FormElement.vue index e21728d5c055..c533de112e49 100644 --- a/client/src/components/Form/FormElement.vue +++ b/client/src/components/Form/FormElement.vue @@ -12,6 +12,7 @@ import FormBoolean from "./Elements/FormBoolean.vue"; import FormColor from "./Elements/FormColor.vue"; import FormDirectory from "./Elements/FormDirectory.vue"; import FormDrilldown from "./Elements/FormDrilldown/FormDrilldown.vue"; +<<<<<<< HEAD import FormHidden from "./Elements/FormHidden.vue"; import FormInput from "./Elements/FormInput.vue"; import FormNumber from "./Elements/FormNumber.vue"; @@ -22,6 +23,17 @@ import FormSelection from "./Elements/FormSelection.vue"; import FormTags from "./Elements/FormTags.vue"; import FormText from "./Elements/FormText.vue"; import FormUpload from "./Elements/FormUpload.vue"; +======= +import FormDialog from "./Elements/FormDialog.vue"; +import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"; +import { ref, computed, useAttrs } from "vue"; +import { library } from "@fortawesome/fontawesome-svg-core"; +import { faExclamation, faTimes, faArrowsAltH } from "@fortawesome/free-solid-svg-icons"; +import { faCaretSquareDown, faCaretSquareUp } from "@fortawesome/free-regular-svg-icons"; + +import type { ComputedRef } from "vue"; +import type { FormParameterTypes, FormParameterAttributes, FormParameterValue } from "./parameterTypes"; +>>>>>>> d24eb2b32d (first pass at converting FormDialog) interface FormElementProps { id?: string; @@ -278,6 +290,11 @@ const isOptional = computed(() => !isRequired.value && attrs.value["optional"] ! v-model="currentValue" :options="attrs.options" :multiple="attrs.multiple" /> + From 7cee1cc10528f4d7a69e77b6cbf06199209995ee Mon Sep 17 00:00:00 2001 From: Assunta DeSanto Date: Mon, 12 Jun 2023 16:23:03 -0400 Subject: [PATCH 0028/1254] selection updates the input box --- .../components/Form/Elements/FormDialog.vue | 44 +++++++++---------- 1 file changed, 20 insertions(+), 24 deletions(-) diff --git a/client/src/components/Form/Elements/FormDialog.vue b/client/src/components/Form/Elements/FormDialog.vue index 3c5dc24c791f..50bcb307b3fe 100644 --- a/client/src/components/Form/Elements/FormDialog.vue +++ b/client/src/components/Form/Elements/FormDialog.vue @@ -3,7 +3,7 @@ import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"; import { library } from "@fortawesome/fontawesome-svg-core"; import { faFolderOpen } from "@fortawesome/free-solid-svg-icons"; import DataDialog from "../../DataDialog/DataDialog.vue"; -import { computed, onMounted } from "vue"; +import { onMounted } from "vue"; import { getCurrentGalaxyHistory } from "../../../utils/data"; import { reactive } from "vue"; @@ -12,63 +12,59 @@ library.add(faFolderOpen); interface DataDialogProps { id: string; multiple: boolean; - value?: string; + value?: Array; } const props = withDefaults(defineProps(), { - value: "", multiple: false, }); const title = "Browse Datasets"; -let historyID: string = ""; +const historyID: string = ""; const localHistoryId = reactive({ value: historyID, }); -onMounted(() => { +onMounted(() => { getCurrentGalaxyHistory().then((historyId) => { - console.log("historyId", historyId); - //set historyID to historyId localHistoryId.value = historyId; }); -}) +}); -let initialODD = false; +const initialODD = false; const openDataDialog = reactive({ value: initialODD, }); +const dataSelected = reactive({ + value: [""] +}); + const emit = defineEmits<{ - (e: "input", value: Object): void; + (e: "input", value: Array): void; }>(); -const currentValue = computed({ - get() { - return Object(props.value); - }, - set(newValue) { - emit("input", newValue); - }, -}); + +function onData(result: Array) { + openDataDialog.value = false + dataSelected.value = result; + emit("input", result); +} + From 1745b0b885705c459c3ff20b447fce7b0f25df8f Mon Sep 17 00:00:00 2001 From: Assunta DeSanto Date: Mon, 12 Jun 2023 23:15:40 -0400 Subject: [PATCH 0029/1254] adding toBoolean method to turn multiple prop into a boolean instead of string --- client/src/components/Form/FormElement.vue | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/client/src/components/Form/FormElement.vue b/client/src/components/Form/FormElement.vue index c533de112e49..6049dee235c1 100644 --- a/client/src/components/Form/FormElement.vue +++ b/client/src/components/Form/FormElement.vue @@ -134,6 +134,21 @@ function onConnect() { } } +function toBoolean(value: string){ + //convert string to boolean or return null + if (typeof value === "string") { + if (value.toLowerCase() === "true") { + return true; + } else if (value.toLowerCase() === "false") { + return false; + } else { + return null; + } + } else { + return value; + } +} + const isHidden = computed(() => attrs.value["hidden"]); const elementId = computed(() => `form-element-${props.id}`); const hasAlert = computed(() => Boolean(props.error || props.warning)); @@ -294,7 +309,7 @@ const isOptional = computed(() => !isRequired.value && attrs.value["optional"] ! v-else-if="props.type == 'data_dialog'" :id="id" v-model="currentValue" - :multiple="attrs.multiple"/> + :multiple="toBoolean(attrs.multiple)"/> From 236f029f491121fab87025eb5e43b0a75111b460 Mon Sep 17 00:00:00 2001 From: Assunta DeSanto Date: Mon, 12 Jun 2023 23:16:24 -0400 Subject: [PATCH 0030/1254] modifying FormDialog to accomodate strings or arrays of strings depending on whether multiple is true --- client/src/components/Form/Elements/FormDialog.vue | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/client/src/components/Form/Elements/FormDialog.vue b/client/src/components/Form/Elements/FormDialog.vue index 50bcb307b3fe..beb0efeba5a3 100644 --- a/client/src/components/Form/Elements/FormDialog.vue +++ b/client/src/components/Form/Elements/FormDialog.vue @@ -12,7 +12,7 @@ library.add(faFolderOpen); interface DataDialogProps { id: string; multiple: boolean; - value?: Array; + value?: Array | string; } const props = withDefaults(defineProps(), { @@ -37,20 +37,18 @@ const openDataDialog = reactive({ }); const dataSelected = reactive({ - value: [""] + value: props.value, }); const emit = defineEmits<{ - (e: "input", value: Array): void; + (e: "input", value: Array | string): void; }>(); - -function onData(result: Array) { - openDataDialog.value = false +function onData(result: Array | string) { + openDataDialog.value = false; dataSelected.value = result; emit("input", result); } -