├── Buffer ├── Widget.html ├── Widget.js ├── config.json ├── css │ └── style.css ├── idWebMapLayers.js ├── images │ ├── icon.png │ ├── line_layer.png │ ├── point_layer.png │ └── polygon_layer.png ├── manifest.json └── nls │ ├── es │ └── strings.js │ └── strings.js ├── Dojox_InputList ├── Widget.html ├── Widget.js ├── config.json ├── css │ └── style.css ├── images │ └── icon.png ├── manifest.json └── nls │ └── strings.js ├── HeatMapES5 ├── Widget.html ├── Widget.js ├── config.json ├── css │ └── style.css ├── idWebMapLayers.js ├── images │ ├── drawIcons │ │ ├── CIRCLE-draw.png │ │ ├── ELLIPSE-draw.png │ │ ├── FREEHAND_POLYGON-draw.png │ │ ├── POLYGON-draw.png │ │ └── RECTANGLE-draw.png │ ├── icon.png │ ├── line_layer.png │ ├── point_layer.png │ └── polygon_layer.png ├── manifest.json └── nls │ ├── es │ └── strings.js │ └── strings.js ├── README.md ├── barChartCedar ├── Widget.html ├── Widget.js ├── config.json ├── css │ └── style.css ├── images │ └── icon.png ├── manifest.json ├── nls │ ├── es │ │ └── strings.js │ └── strings.js └── webMapLayersIds.js ├── chartJS ├── Widget.html ├── Widget.js ├── chartJS.js ├── config.json ├── css │ └── style.css ├── images │ └── icon.png ├── manifest.json ├── nls │ ├── es │ │ └── strings.js │ └── strings.js └── webMapLayersIds.js └── selectByAttributes ├── Widget.html ├── Widget.js ├── config.json ├── css └── style.css ├── files ├── bootstrap.min.css ├── bootstrap.min.js └── jquery-3.3.1.min.js ├── idWebMapLayers.js ├── images ├── icon.png ├── line_layer.png ├── point_layer.png └── polygon_layer.png ├── manifest.json └── nls └── strings.js /Buffer/Widget.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 7 | 8 | 9 | 13 | 14 | 15 | 21 | 22 | 23 | 34 | 35 | 36 | 40 | 41 |
5 | ${nls.units}
6 |
10 |
11 | 12 |
16 |
17 | ${nls.xCoord} 18 | ${nls.yCoord} 19 |
${nls.executeCoordBuffer}
20 |
24 | ${nls.intersection}
25 |
26 |
27 | ${nls.selectLayer}

28 |

29 |
30 |
31 |
${nls.clearSelection}

32 |
33 |
37 |
38 |
${nls.clearBuffers}
39 |
42 |
43 | -------------------------------------------------------------------------------- /Buffer/Widget.js: -------------------------------------------------------------------------------- 1 | define(['dojo/_base/declare', 2 | 'jimu/BaseWidget', 3 | 'dojo/_base/lang', 4 | './idWebMapLayers', 5 | 'dijit/form/Select', 6 | 'dojo/dom-construct', 7 | "dijit/form/TextBox", 8 | "esri/geometry/webMercatorUtils", 9 | "esri/geometry/Polygon", 10 | "esri/graphic", 11 | "esri/symbols/SimpleMarkerSymbol", 12 | "esri/geometry/Point", 13 | "esri/symbols/SimpleLineSymbol", 14 | "esri/symbols/SimpleFillSymbol", 15 | "esri/Color", 16 | 'esri/tasks/query', 17 | 'esri/tasks/QueryTask', 18 | "jimu/SelectionManager", 19 | 'dojo/dom-style', 20 | "dijit/form/RadioButton", 21 | "dijit/form/Button", 22 | 'dijit/form/CheckBox', 23 | 'dojo/dom', 24 | 'dojo/domReady!'], 25 | function(declare, BaseWidget, lang, idWebMapLayers, Select, domConstruct, TextBox, webMercatorUtils, Polygon, 26 | Graphic, SimpleMarkerSymbol, Point, SimpleLineSymbol, SimpleFillSymbol, Color, Query, QueryTask, SelectionManager, 27 | domStyle, RadioButton, 28 | Button, CheckBox, dom) { 29 | 30 | return declare([BaseWidget], { 31 | 32 | unit: null, 33 | layer: null, 34 | url: null, 35 | polygon: null, 36 | selectionManager: SelectionManager.getInstance(), 37 | clickEvent: null, 38 | 39 | startup: function() { 40 | this.inherited(arguments); 41 | this.initLayerChooser() 42 | this.initCoords() 43 | this.initSelect() 44 | this.initDistance() 45 | this.createRadios() 46 | this.selectFeatures() 47 | domStyle.set('hideShowSelectionTools', 'display', 'none') 48 | }, 49 | 50 | onOpen: function(){ 51 | this.clickEvent = this.map.on("click", lang.hitch(this, function(evt){ 52 | this.executeBuffer(evt, 'mapClick') 53 | })) 54 | }, 55 | 56 | initLayerChooser: function(){ 57 | var idForChangeEvent = "layerChooserNodeEvent" 58 | 59 | new idWebMapLayers({ 60 | idForChangeEvent: idForChangeEvent, 61 | layerNode: "layerChooserNode", 62 | map: this.map, 63 | geometry: "*", //options: 'point', 'polygon', 'line', 'multiPatch' or '*' 64 | imageFolderUrl: this.folderUrl 65 | }) 66 | 67 | this.layer = this.map.getLayer(dijit.byId(idForChangeEvent).value) 68 | this.url = this.layer.url 69 | 70 | dijit.byId(idForChangeEvent).on("change", lang.hitch(this, function(evt){ 71 | this.layer = this.map.getLayer(evt) 72 | this.url = this.layer.url 73 | })) 74 | }, 75 | 76 | initCoords: function(){ 77 | new TextBox({ 78 | id: 'xNode', 79 | placeHolder: this.nls.xPlaceholder, 80 | style: 'width:10em;' 81 | }, 'coordsXNode') 82 | 83 | new TextBox({ 84 | id: 'yNode', 85 | placeHolder: this.nls.yPlaceholder, 86 | style: 'width:10em;' 87 | }, 'coordsYNode') 88 | }, 89 | 90 | initSelect: function(){ 91 | new Select({ 92 | id: "unitsSelector" 93 | }).placeAt('unitsNode').startup() 94 | 95 | var units = ["miles", "feet", "meters", "kilometers"] 96 | 97 | var map = units.map(function(record){ 98 | return domConstruct.create("option", { 99 | label: record, 100 | value: record 101 | }) 102 | }) 103 | 104 | var select = dijit.byId('unitsSelector') 105 | select.addOption(map) 106 | 107 | this.unit = select.value 108 | select.on("change", lang.hitch(this, function(evt){ 109 | this.unit = evt 110 | })) 111 | }, 112 | 113 | initDistance: function(){ 114 | new TextBox({ 115 | id: 'distance', 116 | value: this.nls.distanceValue, 117 | }, "textBoxNode"); 118 | 119 | var textBox = dijit.byId('distance') 120 | this.distance = textBox.value 121 | textBox.on("change", lang.hitch(this, function(evt){ 122 | this.distance = evt 123 | })) 124 | }, 125 | 126 | executeBuffer: function(evt, mode){ 127 | var coords; 128 | if(mode === 'mapClick'){ 129 | coords = webMercatorUtils.xyToLngLat(evt.mapPoint.x, evt.mapPoint.y) 130 | }else{ 131 | coords = [dijit.byId('xNode').value, dijit.byId('yNode').value] 132 | } 133 | 134 | var pointSymbol = new SimpleMarkerSymbol( 135 | "cross", 136 | 20, 137 | new SimpleLineSymbol( 138 | "solid", 139 | new Color([255,0,0,0.65]), 2 140 | ) 141 | ); 142 | var inPoint = new Point( {"x": coords[0], "y": coords[1], "spatialReference": {"wkid": 4326 } }); 143 | var bufferCenter = new Graphic(inPoint, pointSymbol); 144 | this.map.graphics.add(bufferCenter) 145 | 146 | var point = turf.point(coords) 147 | var buffered = turf.buffer(point, this.distance, {units: this.unit}) 148 | 149 | var map = buffered.geometry.coordinates[0].map(function(record){ 150 | return [record[0], record[1]] 151 | }) 152 | 153 | var polygonJson = {"rings": [map], "spatialReference": {"wkid": 4326} } 154 | this.polygon = new Polygon(polygonJson) 155 | var symbol = new SimpleFillSymbol( 156 | SimpleFillSymbol.STYLE_SOLID, 157 | new SimpleLineSymbol( 158 | SimpleLineSymbol.STYLE_SOLID, 159 | new Color([255,0,0,0.65]), 2 160 | ), 161 | new Color([255,0,0,0.15]) 162 | ); 163 | var graphic = new Graphic(this.polygon, symbol) 164 | this.map.graphics.add(graphic) 165 | dijit.byId('clearBuffersButton').setDisabled(false) 166 | 167 | if(dijit.byId('enabled').checked){ 168 | this.intersects() 169 | }else{ 170 | this.selectionManager.clearSelection(this.layer) 171 | } 172 | }, 173 | 174 | createRadios: function(){ 175 | new RadioButton({ 176 | checked: true, 177 | value: "enabled", 178 | }, "enabled").startup() 179 | 180 | new RadioButton({ 181 | checked: false, 182 | value: "disabled", 183 | }, "disabled").startup() 184 | 185 | new Button({ 186 | onClick: lang.hitch(this, function(){ 187 | this.selectionManager.clearSelection(this.layer) 188 | dom.byId('featureCountNode').innerHTML = 'Selected Features: 0' 189 | }) 190 | }, 'clearSelection').startup() 191 | 192 | new Button({ 193 | onClick: lang.hitch(this, function(){ 194 | this.executeBuffer('coordsInput') 195 | }) 196 | }, 'executeBufferCoords').startup() 197 | 198 | new Button({ 199 | id: 'clearBuffersButton', 200 | disabled: true, 201 | onClick: lang.hitch(this, function(){ 202 | this.clearBuffers() 203 | }) 204 | }, 'clearBuffers').startup() 205 | }, 206 | 207 | selectFeatures: function(){ 208 | new CheckBox({ 209 | checked: false, 210 | onChange: lang.hitch(this, function(evt){ 211 | if(evt === true){ 212 | domStyle.set('hideShowSelectionTools', 'display', 'block') 213 | }else{ 214 | domStyle.set('hideShowSelectionTools', 'display', 'none') 215 | } 216 | }) 217 | }, 'selectionNode').startup() 218 | }, 219 | 220 | intersects: function(){ 221 | var query = new Query() 222 | query.where = "1=1" 223 | query.returnGeometry = true 224 | query.geometry = this.polygon 225 | query.outFields = ["*"] 226 | new QueryTask(this.url).execute(query, lang.hitch(this, function(results){ 227 | this.selectionManager.setSelection(this.layer, results.features) 228 | dom.byId('featureCountNode').innerHTML = 'Selected Features: ' + results.features.length 229 | })) 230 | }, 231 | 232 | clearBuffers: function(){ 233 | this.map.graphics.clear() 234 | dijit.byId('clearBuffersButton').setDisabled(true) 235 | }, 236 | 237 | onClose: function(){ 238 | this.clickEvent.remove() 239 | } 240 | }) 241 | }) 242 | -------------------------------------------------------------------------------- /Buffer/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "units": ["miles", "feet", "meters", "kilometers"] 3 | } 4 | -------------------------------------------------------------------------------- /Buffer/css/style.css: -------------------------------------------------------------------------------- 1 | tr.spaceUnder > td { 2 | padding-bottom: 1em; 3 | } -------------------------------------------------------------------------------- /Buffer/idWebMapLayers.js: -------------------------------------------------------------------------------- 1 | define([ 2 | 'dojo/_base/declare', 3 | 'dijit/form/Select', 4 | 'dojo/dom-construct', 5 | 'dojo/dom-attr', 6 | 'dojo/dom', 7 | 'dojo/on', 8 | 'dojo/domReady!' 9 | ], function(declare, Select, domConstruct, domAttr, dom, on){ 10 | var clazz = declare(null, { 11 | 12 | constructor: function(options){ 13 | this.createLayerSelect(options.idForChangeEvent, options.layerNode, options.map, options.geometry, options.imageFolderUrl) 14 | }, 15 | 16 | createLayerSelect: function(id, layerNode, map, geometry, imageFolder){ 17 | 18 | new Select({ 19 | name: layerNode, 20 | id: id 21 | }).placeAt(layerNode).startup() 22 | 23 | var layers = []; 24 | 25 | for(var i = 0; i < map.graphicsLayerIds.length; i++) { 26 | var layerObject = map.getLayer(map.graphicsLayerIds[i]); 27 | if(layerObject.url){ 28 | layers.push(layerObject) 29 | } 30 | } 31 | 32 | var recording = layers.map(function(record){ 33 | switch(true){ 34 | case record.geometryType === "esriGeometryPolygon" && (geometry === '*' || geometry === 'polygon'): 35 | return dojo.create("option", { 36 | label: ' ' + record.name, 37 | value: record.id 38 | }) 39 | case record.geometryType === "esriGeometryPoint" && (geometry === '*' || geometry === 'point'): 40 | return dojo.create("option", { 41 | label: ' ' + record.name, 42 | value: record.id 43 | }) 44 | case record.geometryType === "esriGeometryLine" && (geometry === '*' || geometry === 'line'): 45 | return dojo.create("option", { 46 | label: ' ' + record.name, 47 | value: record.id 48 | }) 49 | case record.geometryType === "esriGeometryPolyLine" && (geometry === '*' || geometry === 'line'): 50 | return dojo.create("option", { 51 | label: ' ' + record.name, 52 | value: record.id 53 | }) 54 | case record.geometryType === "esriGeometryMultiPatch" && (geometry === '*' || geometry === 'multiPatch'): 55 | return dojo.create("option", { 56 | label: ' M ' + record.name, 57 | value: record.id 58 | }) 59 | default: 60 | return null 61 | } 62 | }) 63 | 64 | var selectLayer = dijit.byId(id) 65 | selectLayer.addOption(recording) 66 | }, 67 | 68 | }); 69 | return clazz; 70 | }); 71 | -------------------------------------------------------------------------------- /Buffer/images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdriSolid/wab-custom-widgets/83966479494878d0054ba34117b4dec459577d71/Buffer/images/icon.png -------------------------------------------------------------------------------- /Buffer/images/line_layer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdriSolid/wab-custom-widgets/83966479494878d0054ba34117b4dec459577d71/Buffer/images/line_layer.png -------------------------------------------------------------------------------- /Buffer/images/point_layer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdriSolid/wab-custom-widgets/83966479494878d0054ba34117b4dec459577d71/Buffer/images/point_layer.png -------------------------------------------------------------------------------- /Buffer/images/polygon_layer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdriSolid/wab-custom-widgets/83966479494878d0054ba34117b4dec459577d71/Buffer/images/polygon_layer.png -------------------------------------------------------------------------------- /Buffer/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Buffer", 3 | "platform": "HTML", 4 | "version": "2.7", 5 | "wabVersion": "2.7", 6 | "author": "Adrian Perez Beneito", 7 | "description": "Buffer using Turf.js", 8 | "copyright": "", 9 | "license": "http://www.apache.org/licenses/LICENSE-2.0", 10 | "properties": { 11 | "hasConfig": false 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Buffer/nls/es/strings.js: -------------------------------------------------------------------------------- 1 | define({ 2 | root: ({ 3 | _widgetLabel: "Demostración", 4 | selectLayer: "Seleccciona una capa", 5 | units: "Selecciona una unidad", 6 | distanceTextBox: "Distancia", 7 | textBoxCoord: "Clica en el mapa o inserta coordenadas", 8 | xCoord: "X", 9 | yCoord: "Y", 10 | executeCoordBuffer: "Ejecutar", 11 | intersection: "Selección por intersección", 12 | enableSelection: "Activar", 13 | disableSelection: "Desactivar", 14 | clearSelection: "Limpiar Selección", 15 | clearGraphics: "Limpiar", 16 | execute: "Ejecutar", 17 | xPlaceholder: "-0.48", 18 | yPlaceholder: "38.69", 19 | distanceValue: "2000", 20 | clearBuffers: "Limpiar Buffers" 21 | }) 22 | }); 23 | -------------------------------------------------------------------------------- /Buffer/nls/strings.js: -------------------------------------------------------------------------------- 1 | define({ 2 | root: ({ 3 | _widgetLabel: "Circle Buffer", 4 | selectLayer: "Select a layer", 5 | units: "Select a unit", 6 | distanceTextBox: "Distance", 7 | textBoxCoord: "Click on the map or input coordinates", 8 | xCoord: "X", 9 | yCoord: "Y", 10 | executeCoordBuffer: "Execute", 11 | intersection: "Intersection Selection", 12 | enableSelection: "Enable", 13 | disableSelection: "Disable", 14 | clearSelection: "Clear Selection", 15 | clearGraphics: "Clear", 16 | execute: "Execute", 17 | xPlaceholder: "-0.48", 18 | yPlaceholder: "38.69", 19 | distanceValue: "2000", 20 | clearBuffers: "Clear Buffers" 21 | }), 22 | "es": 0 23 | }); 24 | -------------------------------------------------------------------------------- /Dojox_InputList/Widget.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
-------------------------------------------------------------------------------- /Dojox_InputList/Widget.js: -------------------------------------------------------------------------------- 1 | define(['dojo/_base/declare', 2 | 'jimu/BaseWidget', 3 | 'dojo/dom', 4 | 'dojox/form/ListInput', 5 | 'xstyle/css!https://dojotoolkit.org/scripts/dojo/dojox/form/resources/ListInput.css', 6 | 'dojo/domReady!'], 7 | function(declare, BaseWidget, dom, ListInput) { 8 | 9 | return declare([BaseWidget], { 10 | 11 | /*postCreate: function() { 12 | this.inherited(arguments); 13 | console.log('postCreate'); 14 | },*/ 15 | 16 | startup: function() { 17 | this.inherited(arguments); 18 | this.initInputList(); 19 | }, 20 | 21 | initInputList: function(){ 22 | new ListInput({ 23 | name: 'Dynamic', 24 | value: "Hello!, it's Dojox!, :)" 25 | }, this.listNode); 26 | } 27 | 28 | /*onOpen: function(){ 29 | console.log('onOpen'); 30 | }, 31 | 32 | onClose: function(){ 33 | console.log('onClose'); 34 | }, 35 | 36 | onMinimize: function(){ 37 | console.log('onMinimize'); 38 | }, 39 | 40 | onMaximize: function(){ 41 | console.log('onMaximize'); 42 | }, 43 | 44 | onSignIn: function(credential){ 45 | console.log('onSignIn'); 46 | }, 47 | 48 | onSignOut: function(){ 49 | console.log('onSignOut'); 50 | }*/ 51 | }); 52 | }); -------------------------------------------------------------------------------- /Dojox_InputList/config.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /Dojox_InputList/css/style.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdriSolid/wab-custom-widgets/83966479494878d0054ba34117b4dec459577d71/Dojox_InputList/css/style.css -------------------------------------------------------------------------------- /Dojox_InputList/images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdriSolid/wab-custom-widgets/83966479494878d0054ba34117b4dec459577d71/Dojox_InputList/images/icon.png -------------------------------------------------------------------------------- /Dojox_InputList/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Dojox_InputList", 3 | "platform": "HTML", 4 | "version": "2.7", 5 | "wabVersion": "2.7", 6 | "author": "Adrián Pérez Beneito", 7 | "description": "Displaying Dojox Input List", 8 | "copyright": "", 9 | "license": "http://www.apache.org/licenses/LICENSE-2.0", 10 | "properties": { 11 | "hasConfig": false 12 | } 13 | } -------------------------------------------------------------------------------- /Dojox_InputList/nls/strings.js: -------------------------------------------------------------------------------- 1 | define({ 2 | root: ({ 3 | _widgetLabel: "Dojox_InputList" 4 | }) 5 | }); 6 | -------------------------------------------------------------------------------- /HeatMapES5/Widget.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 7 | 8 | 9 | 12 | 13 | 14 | 17 | 18 | 19 | 22 | 23 | 24 | 27 | 28 | 29 | 38 | 39 | 40 | 43 | 44 | 45 | 50 | 51 | 52 | 55 | 56 | 57 | 60 | 61 |
5 | ${nls.selectLayer}
6 |
10 | ${nls.selectField}
11 |
15 | ${nls.blurRadius}
16 |
20 | ${nls.maxValue}
21 |
25 | ${nls.minValue}
26 |
30 | ${nls.drawingTools}
31 |
32 |
33 |
34 |
${nls.clearGraphics}
35 |
36 |
37 |
41 | ${nls.heatMapSlider}
42 |
46 |
47 |
48 |
49 |
53 |
54 |
58 |
59 |
62 |
63 | -------------------------------------------------------------------------------- /HeatMapES5/Widget.js: -------------------------------------------------------------------------------- 1 | define(['dojo/_base/declare', 2 | 'jimu/BaseWidget', 3 | 'dojo/on', 4 | 'dojo/_base/lang', 5 | 'dijit/form/Select', 6 | 'dijit/form/Button', 7 | 'dijit/form/CheckBox', 8 | './idWebMapLayers', 9 | 'esri/graphic', 10 | 'esri/layers/FeatureLayer', 11 | 'esri/renderers/HeatmapRenderer', 12 | 'dijit/form/HorizontalSlider', 13 | 'esri/dijit/HeatmapSlider', 14 | 'esri/toolbars/draw', 15 | 'esri/graphicsUtils', 16 | 'esri/tasks/query', 17 | 'esri/tasks/QueryTask', 18 | 'esri/symbols/SimpleFillSymbol', 19 | 'esri/symbols/SimpleLineSymbol', 20 | 'esri/Color', 21 | 'dijit/ConfirmDialog', 22 | 'dojo/dom-style', 23 | 'dojo/dom-construct', 24 | 'dojo/query', 25 | 'dijit/Tooltip', 26 | 'dojo/dom', 27 | 'dojo/domReady!'], 28 | function(declare, BaseWidget, on, lang, Select, Button, CheckBox, idWebMapLayers, Graphic, 29 | FeatureLayer, HeatmapRenderer, HorizontalSlider, HeatmapSlider, Draw, graphicsUtils, 30 | Query, QueryTask, SimpleFillSymbol, SimpleLineSymbol, Color, 31 | ConfirmDialog, domStyle, domConstruct, query, Tooltip, dom) { 32 | 33 | return declare([BaseWidget], { 34 | 35 | layerName: null, 36 | field: null, 37 | url: null, 38 | layer: null, 39 | blurRadius: null, 40 | maxValue: null, 41 | minValue: null, 42 | heatmapFeatureLayer: null, 43 | heatmapRenderer: null, 44 | heatmapLayers: [], 45 | slider: null, 46 | graphicGeometry: null, 47 | images: ["RECTANGLE-draw.png", "ELLIPSE-draw.png", "CIRCLE-draw.png", "FREEHAND_POLYGON-draw.png", "POLYGON-draw.png"], //'images/drawIcons' folder 48 | myStops: [ 49 | {"ratio":0,"color":{ 50 | "r":133,"g":193,"b":200,"a":0} 51 | }, 52 | {"ratio":0.01,"color":{ 53 | "r":133,"g":193,"b":200,"a":0} 54 | }, 55 | {"ratio":0.01,"color":{ 56 | "r":133,"g":193,"b":200,"a":0.7} 57 | }, 58 | {"ratio":0.01,"color":{ 59 | "r":133,"g":193,"b":200,"a":0.7} 60 | }, 61 | {"ratio":0.0925,"color":{ 62 | "r":144,"g":161,"b":190,"a":0.7} 63 | }, 64 | {"ratio":0.17500000000000002,"color":{ 65 | "r":156,"g":129,"b":132,"a":0.7} 66 | }, 67 | {"ratio":0.2575,"color":{ 68 | "r":167,"g":97,"b":170,"a":0.7} 69 | }, 70 | {"ratio":0.34,"color":{ 71 | "r":175,"g":73,"b":128,"a":0.7} 72 | }, 73 | {"ratio":0.42250000000000004,"color":{ 74 | "r":184,"g":48,"b":85,"a":0.7} 75 | }, 76 | {"ratio":0.505,"color":{ 77 | "r":192,"g":24,"b":42,"a":0.7} 78 | }, 79 | {"ratio":0.5875,"color":{ 80 | "r":200,"g":0,"b":0,"a":0.7} 81 | }, 82 | {"ratio":0.67,"color":{ 83 | "r":211,"g":51,"b":0,"a":0.7} 84 | }, 85 | {"ratio":0.7525000000000001,"color":{ 86 | "r":222,"g":102,"b":0,"a":0.7} 87 | }, 88 | {"ratio":0.8350000000000001,"color":{ 89 | "r":233,"g":153,"b":0,"a":0.7} 90 | }, 91 | {"ratio":0.9175000000000001,"color":{ 92 | "r":244,"g":204,"b":0,"a":0.7} 93 | }, 94 | {"ratio":1,"color":{ 95 | "r":255,"g":255,"b":0,"a":0.7} 96 | } 97 | ], 98 | 99 | /*postCreate: function(){ 100 | this.inherited(arguments) 101 | },*/ 102 | 103 | startup: function() { 104 | this.inherited(arguments) 105 | this.initLayerChooser() 106 | this.initButton() 107 | this.initSliders() 108 | this.hideShowHeatMapSlider() 109 | this.initHeatMapSlider() 110 | this.initDrawingTools() 111 | this.slider = dom.byId('showingSlider') 112 | domStyle.set(this.slider, 'display', 'none') 113 | domStyle.set('hideShowDrawIcons', 'display', 'none') 114 | }, 115 | 116 | initLayerChooser: function(){ 117 | var idForChangeEvent = "layerChooserNodeEvent" 118 | 119 | new idWebMapLayers({ 120 | idForChangeEvent: idForChangeEvent, 121 | layerNode: "layerChooserNode", 122 | map: this.map, 123 | geometry: "point", //options: 'point', 'polygon', 'line', 'multiPatch' or '*' 124 | imageFolderUrl: this.folderUrl 125 | }) 126 | console.log(this.folderUrl) 127 | 128 | this.layerName = dijit.byId(idForChangeEvent).value 129 | this.initSelect(this.layerName) 130 | 131 | dijit.byId(idForChangeEvent).on("change", lang.hitch(this, function(evt){ 132 | this.options(evt) 133 | })) 134 | }, 135 | 136 | initSelect: function(layerId){ 137 | new Select({ 138 | name: "selectField", 139 | id: "fieldSelector" 140 | }).placeAt('selectField').startup() 141 | 142 | var fieldId = dijit.byId('fieldSelector') 143 | this.field = fieldId.value 144 | fieldId.on("change", lang.hitch(this, function(evt){ 145 | this.field = evt 146 | })) 147 | 148 | this.options(layerId) 149 | }, 150 | 151 | options: function(layerId){ 152 | this.layer = this.map.getLayer(layerId) 153 | this.url = this.layer.url 154 | var fields = this.layer.fields 155 | 156 | var map = fields.map(function(record){ 157 | return dojo.create("option", { 158 | label: record.name, 159 | value: record.name 160 | }) 161 | }) 162 | 163 | var select = dijit.byId('fieldSelector') 164 | 165 | if(select.getOptions()){ 166 | select.removeOption(select.getOptions()) 167 | select.addOption(map) 168 | } 169 | }, 170 | 171 | initButton: function(){ 172 | new Button({ 173 | label: this.nls.execute, 174 | onClick: lang.hitch(this, function(){ 175 | this.getDataByExtent() 176 | }) 177 | }, 'executeHeatMap').startup() 178 | }, 179 | 180 | initSliders: function(){ 181 | var valueBlurRadius = 10 182 | new HorizontalSlider({ 183 | id: "blurRadius", 184 | value: valueBlurRadius, 185 | minimum: 0, 186 | maximum: 30, 187 | style: "width:300px ", 188 | onChange: lang.hitch(this, function(value){ 189 | this.blurRadius = value 190 | dom.byId("blurRadiusDom").innerHTML = value.toFixed(0) 191 | }) 192 | }, 'blurRadiusNode').startup() 193 | dom.byId("blurRadiusDom").innerHTML = valueBlurRadius 194 | 195 | var blurRadiusSlider = dijit.byId('blurRadius') 196 | this.blurRadius = blurRadiusSlider.value 197 | blurRadiusSlider.on("change", lang.hitch(this, function(value){ 198 | if(this.heatmapRenderer !== null){ 199 | if(value !== this.heatmapRenderer.blurRadius){ 200 | this.heatmapRenderer.blurRadius = value 201 | this.heatmapFeatureLayer.redraw() 202 | } 203 | } 204 | })) 205 | 206 | var valueMaxValue = 100 207 | new HorizontalSlider({ 208 | id: "maxValue", 209 | value: valueMaxValue, 210 | minimum: 0, 211 | maximum: 500, 212 | style: "width:300px ", 213 | onChange: lang.hitch(this, function(value){ 214 | this.maxValue = value 215 | dom.byId("maxValueDom").innerHTML = value.toFixed(0) 216 | }) 217 | }, 'maxValueNode').startup() 218 | dom.byId("maxValueDom").innerHTML = valueMaxValue 219 | 220 | var maxValueSlider = dijit.byId('maxValue') 221 | this.maxValue = maxValueSlider.value 222 | maxValueSlider.on("change", lang.hitch(this, function(value){ 223 | if(this.heatmapRenderer !== null){ 224 | if(this !== this.heatmapRenderer.maxPixelIntensity){ 225 | this.heatmapRenderer.maxPixelIntensity = value 226 | this.heatmapFeatureLayer.redraw() 227 | } 228 | } 229 | })) 230 | 231 | var valueMinValue = 1 232 | new HorizontalSlider({ 233 | id: "minValue", 234 | value: valueMinValue, 235 | minimum: 0, 236 | maximum: 500, 237 | style: "width:300px ", 238 | onChange: lang.hitch(this, function(value){ 239 | this.minValue = value 240 | dom.byId("minValueDom").innerHTML = value.toFixed(0) 241 | }) 242 | }, 'minValueNode').startup() 243 | dom.byId("minValueDom").innerHTML = valueMinValue 244 | 245 | var minValueSlider = dijit.byId('minValue') 246 | this.minValue = minValueSlider.value 247 | minValueSlider.on("change", lang.hitch(this, function(value){ 248 | if(this.heatmapRenderer !== null){ 249 | if(value !== this.heatmapRenderer.minPixelIntensity){ 250 | this.heatmapRenderer.minPixelIntensity = value 251 | this.heatmapFeatureLayer.redraw() 252 | } 253 | } 254 | })) 255 | }, 256 | 257 | hideShowHeatMapSlider: function(){ 258 | new CheckBox({ 259 | name: "hideShowSlider", 260 | checked: false, 261 | onChange: lang.hitch(this, function(evt){ 262 | if(evt === true){ 263 | domStyle.set(this.slider, 'display', 'block') 264 | } else{ 265 | domStyle.set(this.slider, 'display', 'none') 266 | } 267 | }) 268 | }, "heatmapSliderHideShow").startup() 269 | }, 270 | 271 | initDrawingTools: function(){ 272 | this.images.map(lang.hitch(this, function(record){ 273 | dom.byId('icons').insertAdjacentHTML('afterbegin', 274 | ' ' 276 | ) 277 | new Tooltip({ 278 | connectId: [record.substr(0, record.indexOf('-'))], 279 | label: record.substr(0, record.indexOf('-')) + '   ' 280 | }) 281 | })) 282 | 283 | var toolbar = new Draw(this.map); 284 | toolbar.on("draw-end", lang.hitch(this, function(evtObj){ 285 | this.map.graphics.clear() 286 | toolbar.deactivate() 287 | var geometry = evtObj.geometry 288 | var symbol = new SimpleFillSymbol( 289 | SimpleFillSymbol.STYLE_SOLID, 290 | new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new Color([0, 0, 0]), 2), 291 | new Color([0, 0, 0, 0])) 292 | var graphic = new Graphic(geometry, symbol) 293 | this.map.graphics.add(graphic) 294 | this.graphicGeometry = geometry 295 | })) 296 | 297 | var images = query(".drawIcons") 298 | images.map(function(record){ 299 | var id = dom.byId(record.id) 300 | id.onclick = function(){ 301 | this.style.border = '2px solid grey'; 302 | toolbar.activate(eval('Draw.' + this.id)) 303 | } 304 | id.onmouseover = function(){ 305 | this.style.border = '1px solid grey'; 306 | } 307 | id.onmouseout = function(){ 308 | this.style.border = ''; 309 | } 310 | }) 311 | 312 | new CheckBox({ 313 | name: "drawingTools", 314 | checked: false, 315 | onChange: lang.hitch(this, function(evt){ 316 | if(evt === true){ 317 | domStyle.set('hideShowDrawIcons', 'display', 'block') 318 | }else{ 319 | domStyle.set('hideShowDrawIcons', 'display', 'none') 320 | } 321 | }) 322 | }, 'drawingToolsNode').startup() 323 | }, 324 | 325 | clearDrawGraphics: function(){ 326 | this.map.graphics.clear() 327 | this.graphicGeometry = null 328 | }, 329 | 330 | initHeatMapSlider: function(){ 331 | var heatmapSliderDev = new HeatmapSlider({ 332 | "colorStops": this.myStops 333 | }, "heatmapSliderNode") 334 | heatmapSliderDev.startup() 335 | heatmapSliderDev.on("change", lang.hitch(this, function(evt){ 336 | if(this.heatmapRenderer !== null){ 337 | this.heatmapRenderer.setColorStops(evt) 338 | this.heatmapFeatureLayer.redraw() 339 | } 340 | })) 341 | }, 342 | 343 | displayHeatMapLayer: function(data){ 344 | var featureCollection = { 345 | layerDefinition: { 346 | geometryType: this.layer.geometryType, 347 | objectIdField: this.layer.objectIdField, 348 | fields: this.field 349 | }, 350 | featureSet: { 351 | features: data, 352 | geometryType: this.layer.geometryType, 353 | } 354 | } 355 | 356 | var heatmapFeatureLayerOptions = { 357 | mode: FeatureLayer.MODE_SNAPSHOT, 358 | outFields: [this.field] 359 | } 360 | 361 | this.heatmapFeatureLayer = new FeatureLayer(featureCollection, heatmapFeatureLayerOptions) 362 | this.heatmapRenderer = new HeatmapRenderer({ 363 | field: this.field, 364 | blurRadius: this.blurRadius, 365 | maxPixelIntensity: this.maxValue, 366 | minPixelIntensity: this.minValue, 367 | colorStops: this.myStops 368 | }) 369 | 370 | this.heatmapFeatureLayer.setRenderer(this.heatmapRenderer) 371 | this.map.addLayer(this.heatmapFeatureLayer) 372 | this.displayClearButton(this.heatmapFeatureLayer) 373 | }, 374 | 375 | getDataByExtent: function(){ 376 | if(this.graphicGeometry){ 377 | var query = new Query() 378 | query.where = "1=1" 379 | query.returnGeometry = true 380 | query.geometry = this.graphicGeometry 381 | query.outFields = ["*"] 382 | new QueryTask(this.url).execute(query, lang.hitch(this, function(results){ 383 | var graphics = results.features.map(function(graphic){ 384 | return new Graphic({ 385 | geometry: graphic.geometry, 386 | attributes: graphic.attributes 387 | }) 388 | }) 389 | this.displayHeatMapLayer(graphics) 390 | })) 391 | }else{ 392 | var graphics = this.layer.graphics.map(function(graphic){ 393 | return new Graphic({ 394 | geometry: graphic.geometry, 395 | attributes: graphic.attributes 396 | }) 397 | }) 398 | this.displayHeatMapLayer(graphics) 399 | } 400 | }, 401 | 402 | displayClearButton: function(heatMapLayer){ 403 | this.heatmapLayers.push(heatMapLayer) 404 | new Button({ 405 | label: this.nls.removeButton, 406 | id: heatMapLayer.id + "_" + this.field + "_button", 407 | onClick: lang.hitch(this, function(){ 408 | if(this.heatmapLayers.length == 0){ 409 | //Do nothing 410 | } else{ 411 | var dialog = new ConfirmDialog({ 412 | title: this.nls.alertTitle, 413 | content: this.nls.alertContent, 414 | style: "width: 300px", 415 | onHide: function(){/*Do nothing*/} 416 | }) 417 | dialog.set("buttonOk", this.nls.alertButtonOk) 418 | dialog.set("buttonCancel", this.nls.alertButtonCancel) 419 | dialog.on('execute', lang.hitch(this, function(){ 420 | for(i in this.heatmapLayers){ 421 | this.map.removeLayer(this.heatmapLayers[i]) 422 | } 423 | this.heatmapLayers.length = 0 424 | })) 425 | dialog.on('cancel', function(){/*Do nothing*/}) 426 | dialog.show() 427 | } 428 | }) 429 | }, 'clearLayers').startup() 430 | } 431 | }) 432 | }) 433 | -------------------------------------------------------------------------------- /HeatMapES5/config.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /HeatMapES5/css/style.css: -------------------------------------------------------------------------------- 1 | tr.spaceUnder > td { 2 | padding-bottom: 1em; 3 | } 4 | 5 | .drawIcons { 6 | margin-left: 10px; 7 | margin-top: 10px; 8 | cursor: pointer; 9 | } 10 | 11 | .jimu-btn { 12 | background: #24B5CC; 13 | } 14 | 15 | .jimu-btn:hover { 16 | background-color: #0090A7; 17 | } 18 | -------------------------------------------------------------------------------- /HeatMapES5/idWebMapLayers.js: -------------------------------------------------------------------------------- 1 | define([ 2 | 'dojo/_base/declare', 3 | 'dijit/form/Select', 4 | 'dojo/dom-construct', 5 | 'dojo/dom-attr', 6 | 'dojo/dom', 7 | 'dojo/on', 8 | 'dojo/domReady!' 9 | ], function(declare, Select, domConstruct, domAttr, dom, on){ 10 | var clazz = declare(null, { 11 | 12 | constructor: function(options){ 13 | this.createLayerSelect(options.idForChangeEvent, options.layerNode, options.map, options.geometry, options.imageFolderUrl) 14 | }, 15 | 16 | createLayerSelect: function(id, layerNode, map, geometry, imageFolder){ 17 | 18 | new Select({ 19 | name: layerNode, 20 | id: id 21 | }).placeAt(layerNode).startup() 22 | 23 | var layers = []; 24 | 25 | for(var i = 0; i < map.graphicsLayerIds.length; i++) { 26 | var layerObject = map.getLayer(map.graphicsLayerIds[i]); 27 | if(layerObject.url){ 28 | layers.push(layerObject) 29 | } 30 | } 31 | 32 | var recording = layers.map(function(record){ 33 | switch(true){ 34 | case record.geometryType === "esriGeometryPolygon" && (geometry === '*' || geometry === 'polygon'): 35 | return dojo.create("option", { 36 | label: ' ' + record.name, 37 | value: record.id 38 | }) 39 | case record.geometryType === "esriGeometryPoint" && (geometry === '*' || geometry === 'point'): 40 | return dojo.create("option", { 41 | label: ' ' + record.name, 42 | value: record.id 43 | }) 44 | case record.geometryType === "esriGeometryLine" && (geometry === '*' || geometry === 'line'): 45 | return dojo.create("option", { 46 | label: ' ' + record.name, 47 | value: record.id 48 | }) 49 | case record.geometryType === "esriGeometryPolyLine" && (geometry === '*' || geometry === 'line'): 50 | return dojo.create("option", { 51 | label: ' ' + record.name, 52 | value: record.id 53 | }) 54 | case record.geometryType === "esriGeometryMultiPatch" && (geometry === '*' || geometry === 'multiPatch'): 55 | return dojo.create("option", { 56 | label: ' M ' + record.name, 57 | value: record.id 58 | }) 59 | default: 60 | return null 61 | } 62 | }) 63 | 64 | var selectLayer = dijit.byId(id) 65 | selectLayer.addOption(recording) 66 | }, 67 | 68 | }); 69 | return clazz; 70 | }); 71 | -------------------------------------------------------------------------------- /HeatMapES5/images/drawIcons/CIRCLE-draw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdriSolid/wab-custom-widgets/83966479494878d0054ba34117b4dec459577d71/HeatMapES5/images/drawIcons/CIRCLE-draw.png -------------------------------------------------------------------------------- /HeatMapES5/images/drawIcons/ELLIPSE-draw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdriSolid/wab-custom-widgets/83966479494878d0054ba34117b4dec459577d71/HeatMapES5/images/drawIcons/ELLIPSE-draw.png -------------------------------------------------------------------------------- /HeatMapES5/images/drawIcons/FREEHAND_POLYGON-draw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdriSolid/wab-custom-widgets/83966479494878d0054ba34117b4dec459577d71/HeatMapES5/images/drawIcons/FREEHAND_POLYGON-draw.png -------------------------------------------------------------------------------- /HeatMapES5/images/drawIcons/POLYGON-draw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdriSolid/wab-custom-widgets/83966479494878d0054ba34117b4dec459577d71/HeatMapES5/images/drawIcons/POLYGON-draw.png -------------------------------------------------------------------------------- /HeatMapES5/images/drawIcons/RECTANGLE-draw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdriSolid/wab-custom-widgets/83966479494878d0054ba34117b4dec459577d71/HeatMapES5/images/drawIcons/RECTANGLE-draw.png -------------------------------------------------------------------------------- /HeatMapES5/images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdriSolid/wab-custom-widgets/83966479494878d0054ba34117b4dec459577d71/HeatMapES5/images/icon.png -------------------------------------------------------------------------------- /HeatMapES5/images/line_layer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdriSolid/wab-custom-widgets/83966479494878d0054ba34117b4dec459577d71/HeatMapES5/images/line_layer.png -------------------------------------------------------------------------------- /HeatMapES5/images/point_layer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdriSolid/wab-custom-widgets/83966479494878d0054ba34117b4dec459577d71/HeatMapES5/images/point_layer.png -------------------------------------------------------------------------------- /HeatMapES5/images/polygon_layer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdriSolid/wab-custom-widgets/83966479494878d0054ba34117b4dec459577d71/HeatMapES5/images/polygon_layer.png -------------------------------------------------------------------------------- /HeatMapES5/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "HeatMapES5", 3 | "platform": "HTML", 4 | "version": "2.7", 5 | "wabVersion": "2.7", 6 | "author": "Adrián Pérez Beneito", 7 | "description": "This is the widget used in developer guide", 8 | "copyright": "", 9 | "license": "http://www.apache.org/licenses/LICENSE-2.0", 10 | "properties": { 11 | "hasConfig": false 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /HeatMapES5/nls/es/strings.js: -------------------------------------------------------------------------------- 1 | define({ 2 | _widgetLabel: "HeatMap", 3 | selectLayer: "Selecciona una capa", 4 | selectField: "Selecciona un campo numérico", 5 | blurRadius: "Blur Radius", 6 | maxValue: "Max Value", 7 | minValue: "Min Value", 8 | drawingTools: "Herramientas de dibujo", 9 | clearGraphics: "Limpiar", 10 | heatMapSlider: "Heat Map Slider", 11 | clearGraphicsButton: "Limpiar", 12 | drawingTools: "Herramientas de dibujo", 13 | execute: "Ejecutar", 14 | removeButton: "Remover todas las capas de calor", 15 | alertTitle: "Peligro!", 16 | alertContent: "¿Quieres remover todas las capas de valor?", 17 | alertButtonOk: "Si", 18 | alertButtonCancel: "No" 19 | }); 20 | -------------------------------------------------------------------------------- /HeatMapES5/nls/strings.js: -------------------------------------------------------------------------------- 1 | define({ 2 | root: ({ 3 | _widgetLabel: "HeatMap", 4 | selectLayer: "Select a layer", 5 | selectField: "Select a numeric field", 6 | blurRadius: "Blur Radius", 7 | maxValue: "Max Value", 8 | minValue: "Min Value", 9 | drawingTools: "Draw tools", 10 | clearGraphics: "Clear", 11 | heatMapSlider: "Heat Map Slider", 12 | drawingTools: "Get HeatMap using drawing tools", 13 | clearGraphicsButton: "Clear", 14 | execute: "Execute", 15 | removeButton: "Remove all HeatMap layers", 16 | alertTitle: "Warning!", 17 | alertContent: "Do you want to remove all the heatMap layers?", 18 | alertButtonOk: "Yes", 19 | alertButtonCancel: "No" 20 | }), 21 | "es": 1 22 | }); 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Web App Builder Custom Widgets 2 | 3 |

I need some caffeine to work :)

4 | Buy Me a Coffee at ko-fi.com 5 | 6 | *** 7 | 8 | My other side: **I'm electronic music producer** 🎹 9 | 10 | I really enjoy everything related to synthesizers and drum machines. I like dark electronics 🖤 (EBM, dark wave) the most, but also techno 11 | 12 | **You can also support me in:** 13 | 14 | - [Instagram](https://www.instagram.com/nebulacircuit) 15 | - [Soundcloud](https://soundcloud.com/nebulacircuit) 16 | 17 | *** 18 | 19 | Adrián Pérez Beneito Web App builder Custom Widget List 20 | - [Bar Chart Cedar](https://github.com/AdriSolid/WAB-Custom-Widgets/blob/master/README.md#bar-chart-cedar-bar_chart-live-demo) 21 | - [Intro.js](https://github.com/AdriSolid/WAB-Custom-Widgets/blob/master/README.md#introjs-ft-wab-dizzy-live-demo) 22 | - [Heat Map](https://github.com/AdriSolid/WAB-Custom-Widgets/blob/master/README.md#heat-map-wab-27-fire-live-demo) 23 | - [ChartJS](https://github.com/AdriSolid/WAB-Custom-Widgets#chartjs-widget-chart_with_upwards_trend-live-demo) 24 | - [Buffer](https://github.com/AdriSolid/WAB-Custom-Widgets/blob/master/README.md#buffer-widget-red_circle-live-demo) 25 | - [Select by Attributes](https://github.com/AdriSolid/WAB-Custom-Widgets/blob/master/README.md#select-by-attributes-widget-diamond_shape_with_a_dot_inside-live-demo) 26 | 27 | 28 | ## Bar Chart Cedar :bar_chart: [live demo](https://adrisolid.github.io/CedarWidget/) 29 | See [Cedar.js](https://esri.github.io/cedar/tutorial/) and how to create charts using ArcGIS Geoservices. Pre-coded Web App Builder 2.6 Chart Widget doesn't allow you to create charts on the fly. You can select the available layers in the Web Map. Choose, for the 'x' axis, the field you want to show information, repeat the procedure for the 'y' axis. Select the type of graphic, bars or horizontal bars. The widget is ready to filter the data by extension (by activating the check button). Inside the container of the widget, the graphic will be updated being this responsive. 30 | 31 | ![.](http://adri2c.maps.arcgis.com/sharing/rest/content/items/25a901a69bc3449a9658ddd1386bb444/data) 32 | 33 | Don't forget to add the [Cedar dependencies](https://github.com/esri/cedar#loading-cedar). [How to add other libraries to WAB?](https://developers.arcgis.com/web-appbuilder/sample-code/add-a-third-party-library.htm) 34 | 35 | **Version 1.2**, pending improvements. All suggestions for improvement will be welcome. 36 | 37 | **List of the latest enhancements and changes:** 38 | - Added a new class => select the layers ids from the Web Map (Dojo Select) 39 | - Added geometry icon; geometry selector (now => "*") 40 | 41 | 42 | *** 43 | 44 | ## IntroJS ft WAB :dizzy: [live demo](https://adrisolid.github.io/IntroJS/) 45 | ### Why using [intro.js](https://introjs.com/)? 46 | When new users visit your website or product you should demonstrate your product features using a step-by-step guide. Even when you develop and add a new feature to your product, you should be able to represent them to your users using a user-friendly solution. Intro.js is developed to enable web and mobile developers to create a step-by-step introduction easily. 47 | 48 | ![.](http://adri2c.maps.arcgis.com/sharing/rest/content/items/486a97c81a394212b4a059c80667f275/data) 49 | 50 | ### Integration with a Web App Builder app 51 | 52 | **Add [intro.js dependencies](https://github.com/usablica/intro.js/#introjs-v290)** [How to add other libraries to WAB?](https://developers.arcgis.com/web-appbuilder/sample-code/add-a-third-party-library.htm) 53 | 54 | **Create the configuration js file and refer to it in the application in the file 'index.html'** 55 | Explore and get with the console the ids of the containers to which you want to add as a step. Whether the container doesn't have the 'id' property, get it with 'settingid' -element: getNode('[settingid="widgets_LayerList_Widget_19"]'), position: 'left'- (e.g. the header widgets). Fill the 'intro' and 'position' options: 56 | 57 | ```javascript 58 | const getNode = node => document.querySelector(node); 59 | 60 | const initIntro = () => { 61 | introJs().setOptions({ 62 | steps: [{ 63 | intro: "Hello Web App Builder, I'm IntroJS, wanna join me? :)" 64 | }, 65 | { 66 | element: getNode('#widgets_Search_Widget_3'), 67 | intro: "The Search widget enables end users to find locations or search features on the map.", 68 | position: 'bottom' 69 | } 70 | . 71 | . 72 | . 73 | ] 74 | }).start(); 75 | } 76 | ``` 77 | **Call the 'initIntro' function** 78 | Simply add a button that calls the function. For example, go to the 'HeaderController' widget: 79 | 80 | - Add the button at the container (Widget.html): 81 | 82 | ``` 83 |
84 | 85 |
86 | ``` 87 | 88 | - Add a new function for contain the button and call it at 'startup' (Widget.js): 89 | 90 | ```javascript 91 | startup: function() { 92 | this.inherited(arguments); 93 | this.resize(); 94 | setTimeout(lang.hitch(this, this.resize), 100); 95 | this.IntroJS(); 96 | }, 97 | 98 | IntroJS: function(){ 99 | new Button({ 100 | label: "INTRO JS", 101 | style: "position:absolute;top:5px;left:400px;", 102 | onClick: () => { 103 | initIntro(); 104 | } 105 | }, this.executeIntroJS).startup(); 106 | }, 107 | 108 | ``` 109 | 110 | 111 | *** 112 | 113 | 114 | ## Heat Map WAB 2.7 :fire: [live demo](https://adrisolid.github.io/heatMapWidget/) 115 | ### Using ArcGIS API for JavaScript 3.23 for create a Heat Map in WAB 2.7 116 | The [HeatmapRenderer](https://developers.arcgis.com/javascript/3/jsapi/heatmaprenderer-amd.html) renders feature layer point data into a raster visualization that emphasizes areas of higher density or weighted values. This renderer uses a Gaussian Blur technique to average the influence of each point out over the area determined by the 'blurRadius' (the radius (in pixels) of the circle over which the majority of each point's value is spread out.). A Gaussian blur uses a Gaussian, or Normal, distribution (also called a Bell-curve) to spread value out in vertical and horizontal directions. 117 | 118 | ### Using HeatMap Widget 119 | 120 | - Select a layer (it needs point type; the widget is already prepared for filter the layers and get 'point' layers) 121 | - Select a field (numeric -short, float, etc-) 122 | - Slider: select 'Blur Radius' (The radius -in pixels- of the circle over which the majority of each point's value is spread out) 123 | - Slider: select 'Max Value' (The pixel intensity value which is assigned the final color in the color ramp. Values above this number will also be assigned the final color ramp color) 124 | - Slider: select 'Min Value' (The pixel intensity value which is assigned the initial color in the color ramp. Values below this number will also be assigned the initial color ramp color) 125 | - Draw Tools: Generate the map by spatially delimiting the result using drawing tools 126 | - [Heat Map Slider](https://developers.arcgis.com/javascript/3/jsapi/heatmapslider-amd.html): (A widget to assist in obtaining values for managing and setting properties on a HeatmapRenderer) 127 | - Drawing Tools: Create a HeatMap using drawing tools as a spatial delimiter. Options => Polygon, Freehand Polygon, Circle, Ellipse, Rectangle 128 | 129 | ![.](http://adri2c.maps.arcgis.com/sharing/rest/content/items/a6490383b48e4491afb2b9650375cec8/data) 130 | 131 | 132 | *** 133 | 134 | 135 | ## ChartJS Widget :chart_with_upwards_trend: [live demo](https://adrisolid.github.io/ChartJSWidget/) 136 | ### Using [ChartJS](http://www.chartjs.org/) for create charts using your GeoServices 137 | Chart.js is a community maintained [open-source library](https://github.com/chartjs/Chart.js) that helps you easily visualize data using JavaScript. ChartJS is simple and clean HTML5 based JavaScript charts. Display line and bar charts using your GeoServices. 138 | 139 | ### Integration with a Web App Builder app 140 | 141 | **Add [ChartJS dependencies](http://www.chartjs.org/docs/latest/getting-started/installation.html)** [How to add other libraries to WAB?](https://developers.arcgis.com/web-appbuilder/sample-code/add-a-third-party-library.htm) 142 | 143 | ### Using Chart Widget 144 | 145 | ![.](http://adri2c.maps.arcgis.com/sharing/rest/content/items/2bb5dd73fdf24907839b6e8da6f29077/data) 146 | 147 | - Select a layer 148 | - Select a field for 'x' axis 149 | - Select a field for 'y' axis 150 | - Click 'Execute' button 151 | - Click on the tabs to switch the chart. Both graphics will be executed automatically. These will be filtered every time the map extension changes 152 | 153 | 154 | *** 155 | 156 | 157 | ## Buffer Widget :red_circle: [live demo](https://adrisolid.github.io/Buffer/) 158 | ### Using [Turf.js](http://turfjs.org/). Advanced geospatial analysis for browsers and Node.js 159 | Turf is a JavaScript library for spatial analysis. It includes traditional spatial operations, helper functions for creating GeoJSON data, and data classification and statistics tools. Turf can be added to your website as a client-side plugin, or you can run Turf server-side with Node.js. 160 | 161 | ### Integration with a Web App Builder app 162 | 163 | **Add [Turf.js dependencies](https://github.com/Turfjs/turf#installation)** [How to add other libraries to WAB?](https://developers.arcgis.com/web-appbuilder/sample-code/add-a-third-party-library.htm) 164 | 165 | ### Using Buffer Widget 166 | 167 | ![.](http://adri2c.maps.arcgis.com/sharing/rest/content/items/460bf3f0cc13454daf9f7b9b918cee25/data) 168 | 169 | - Select the distance unit 170 | - Pick on the map or input the coordinates 171 | - Select the distance 172 | - Intersection selection available. Select a layer and enable or disable the selection. Click the 'Execute' button 173 | 174 | 175 | 176 | *** 177 | 178 | 179 | ## Select by Attributes Widget :diamond_shape_with_a_dot_inside: [live demo](https://adrisolid.github.io/SelectByAttributesWidget/) 180 | 181 | ### Usage 182 | 183 | This WAB widget copies part of the functionality of the famous 'Select by Attributes' of ArcMap. 184 | 185 | 'Select By Attributes allows you to provide a SQL query expression that is used to select features that match the selection criteria.' Follow Esri's instructions [here](http://desktop.arcgis.com/en/arcmap/10.3/map/working-with-layers/using-select-by-attributes.htm) 186 | 187 | ![.](http://adri2c.maps.arcgis.com/sharing/rest/content/items/f2cc4cf5830b48e3867eb2f06a7a724b/data) 188 | -------------------------------------------------------------------------------- /barChartCedar/Widget.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 7 | 8 | 9 | 12 | 13 | 14 | 17 | 18 | 19 | 22 | 23 | 24 | 28 | 29 | 30 | 35 | 36 |
5 | ${nls.selectLayer}
6 |
10 | ${nls.selectXField}
11 |
15 | ${nls.selectYField}
16 |
20 | ${nls.selectChart}
21 |
25 | 26 |
27 |
31 |
32 |
33 |
34 |
37 |
-------------------------------------------------------------------------------- /barChartCedar/Widget.js: -------------------------------------------------------------------------------- 1 | define(['dojo/_base/declare', 2 | 'jimu/BaseWidget', 3 | 'dojo/on', 4 | 'dojo/_base/lang', 5 | 'dijit/form/Select', 6 | 'dijit/form/Button', 7 | 'dijit/form/CheckBox', 8 | './webMapLayersIds', 9 | 'dijit/_WidgetsInTemplateMixin', 10 | 'dojo/dom', 11 | 'dojo/_base/connect', 12 | 'dojo/domReady!'], 13 | function(declare, BaseWidget, on, lang, Select, Button, CheckBox, idWebMapLayers, _WidgetsInTemplateMixin, dom){ 14 | 15 | return declare([BaseWidget], { 16 | 17 | fieldX: null, 18 | fieldY: null, 19 | url: null, 20 | typeChart: null, 21 | chart: null, 22 | startUpExtent: null, 23 | evt: null, 24 | initialWidgetWidth: null, 25 | widthMethod: null, 26 | 27 | startup: function() { 28 | this.inherited(arguments) 29 | this.getContainerWidth() 30 | this.initLayerChooser() 31 | this.initButton() 32 | this.initCheckButton() 33 | }, 34 | 35 | getContainerWidth: function(){ 36 | if(this.getPanel().containerNode.clientWidth){ 37 | this.initialWidgetWidth = this.getPanel().containerNode.clientWidth 38 | this.widthMethod = 'this.getPanel().containerNode.clientWidth' 39 | } else{ 40 | this.initialWidgetWidth = this.getPanel().domNode.clientWidth 41 | this.widthMethod = 'this.getPanel().domNode.clientWidth' 42 | } 43 | }, 44 | 45 | initLayerChooser: function(){ 46 | var idForChangeEvent = "layerChooserNodeEvent" 47 | 48 | var layer = new idWebMapLayers({ 49 | idForChangeEvent: idForChangeEvent, 50 | layerNode: "layerChooserNode", 51 | map: this.map, 52 | geometry: "*" 53 | }); 54 | 55 | this.initSelects(dijit.byId(idForChangeEvent).value) 56 | 57 | dijit.byId(idForChangeEvent).on("change", lang.hitch(this, function(event){ 58 | this.options(event) 59 | })) 60 | }, 61 | 62 | initSelects: function(layerId){ 63 | new Select({ 64 | name: "selectFieldX", 65 | id: "selectFieldX" 66 | }).placeAt('selectXContainer').startup() 67 | 68 | new Select({ 69 | name: "selectFieldY", 70 | id: "selectFieldY" 71 | }).placeAt('selectYContainer').startup() 72 | 73 | new Select({ 74 | name: "selectTypeChart", 75 | id: "_typeChart", 76 | options: [{label: "Bar", value: "bar"}, 77 | {label: "Bar-horizontal", value: "bar-horizontal"}] 78 | }).placeAt('typeChartContainer').startup() 79 | 80 | var fieldXid = dijit.byId('selectFieldX'); 81 | this.fieldX = fieldXid.value; 82 | fieldXid.on("change", lang.hitch(this, function(event){ 83 | this.fieldX = event 84 | })) 85 | 86 | var fieldYid = dijit.byId('selectFieldY'); 87 | this.fieldY = fieldYid.value; 88 | fieldYid.on("change", lang.hitch(this, function(event){ 89 | this.fieldY = event 90 | })) 91 | 92 | var typeChartId = dijit.byId('_typeChart'); 93 | this.typeChart = typeChartId.value; 94 | typeChartId.on("change", lang.hitch(this, function(event){ 95 | this.typeChart = event 96 | })) 97 | 98 | this.options(layerId); 99 | }, 100 | 101 | options: function(layerId){ 102 | var layer = this.map.getLayer(layerId) 103 | this.url = layer.url 104 | this.startUpExtent = layer.initialExtent 105 | var fields = layer.fields 106 | 107 | var map = fields.map(function(record){ 108 | return dojo.create("option", { 109 | label: record.name, 110 | value: record.name 111 | }) 112 | }) 113 | 114 | var selectX = dijit.byId('selectFieldX') 115 | var selectY = dijit.byId('selectFieldY') 116 | 117 | if(selectX.getOptions()){ 118 | selectX.removeOption(selectX.getOptions()) 119 | selectY.removeOption(selectY.getOptions()) 120 | selectX.addOption(map) 121 | selectY.addOption(map) 122 | } 123 | }, 124 | 125 | initButton: function(){ 126 | new Button({ 127 | label: "Execute", 128 | onClick: lang.hitch(this, function(){ 129 | this.displayChart() 130 | }) 131 | }, "executeChart").startup() 132 | }, 133 | 134 | initCheckButton: function(){ 135 | new CheckBox({ 136 | name: "checkBox", 137 | checked: false, 138 | onChange: lang.hitch(this, function(chb){ 139 | if(chb === true){ 140 | this.evt = this.map.on('extent-change', lang.hitch(this, function(){ 141 | this.onExtentChanged() 142 | })) 143 | } else{ 144 | this.evt.remove() 145 | this.onExtentChangedOff() 146 | } 147 | }) 148 | }, "checkButtonContainer").startup() 149 | }, 150 | 151 | displayChart: function(){ 152 | this.chart = new Cedar({ 153 | "type": this.typeChart, 154 | "dataset":{ 155 | "url": this.url, 156 | "mappings":{ 157 | "x": { "field": this.fieldX, "label": this.fieldX }, 158 | "y": { "field": this.fieldY, "label": this.fieldY } 159 | }, 160 | } 161 | }); 162 | 163 | this.chart.tooltip = { 164 | "title": "{" + this.fieldX + "}", 165 | "content": "{" + this.fieldY + "}" 166 | } 167 | 168 | this.chart.show({ 169 | elementId: "#chart", 170 | autolabels: true, 171 | width: this.initialWidgetWidth * 0.9, 172 | height: 275 173 | }); 174 | }, 175 | 176 | resize: function(){ 177 | this.chart.width = eval(this.widthMethod) * 0.9 178 | this.chart.update() 179 | }, 180 | 181 | onExtentChanged: function(){ 182 | var extent = this.map.geographicExtent.toJson() 183 | this.chart.dataset.query.bbox = extent.xmin + ',' + extent.xmax + ',' + extent.ymin + ',' + extent.ymax 184 | this.chart.update() 185 | }, 186 | 187 | onExtentChangedOff: function(){ 188 | this.chart.dataset.query.bbox = null 189 | this.chart.update() 190 | } 191 | }) 192 | }) 193 | -------------------------------------------------------------------------------- /barChartCedar/config.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /barChartCedar/css/style.css: -------------------------------------------------------------------------------- 1 | #srcNodeRef{ 2 | top: 0px; 3 | position: absolute; 4 | } 5 | 6 | tr.spaceUnder > td { 7 | padding-bottom: 1em; 8 | } 9 | 10 | tr.spaceChart > td { 11 | padding-bottom: 3em; 12 | } 13 | 14 | 15 | -------------------------------------------------------------------------------- /barChartCedar/images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdriSolid/wab-custom-widgets/83966479494878d0054ba34117b4dec459577d71/barChartCedar/images/icon.png -------------------------------------------------------------------------------- /barChartCedar/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "barChartCedar", 3 | "type": "widget", 4 | "platform": "HTML", 5 | "version": "2.6", 6 | "wabVersion": "2.6", 7 | "author": "Adrián Pérez Beneito", 8 | "description": "Bar chart widget using Cedar", 9 | "copyright": "2017", 10 | "license": "http://www.apache.org/licenses/LICENSE-2.0", 11 | "properties": { 12 | "hasConfig": false 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /barChartCedar/nls/es/strings.js: -------------------------------------------------------------------------------- 1 | define({ 2 | selectLayer: "Selecciona una capa", 3 | selectXField: "Selecciona el campo X", 4 | selectYField: "Selecciona el campo Y", 5 | selectChart: "Selecciona un tipo de gráfico", 6 | execute: "Ejecutar", 7 | extent: "Filtrar por extensión" 8 | }); -------------------------------------------------------------------------------- /barChartCedar/nls/strings.js: -------------------------------------------------------------------------------- 1 | define({ 2 | root: ({ 3 | _widgetLabel: "Bar Chart Cedar", 4 | selectLayer: "Select a layer", 5 | selectXField: "Select X Field", 6 | selectYField: "Select Y Field", 7 | selectChart: "Select chart type", 8 | execute: "Execute", 9 | extent: "Filter by extent" 10 | }), 11 | "es": 1 12 | }); -------------------------------------------------------------------------------- /barChartCedar/webMapLayersIds.js: -------------------------------------------------------------------------------- 1 | define([ 2 | 'dojo/_base/declare', 3 | "dijit/form/Select", 4 | "dojo/dom-construct", 5 | "dojo/dom-attr", 6 | "dojo/dom", 7 | "dojo/on", 8 | "dojo/domReady!" 9 | ], function(declare, Select, domConstruct, domAttr, dom, on){ 10 | var clazz = declare(null, { 11 | 12 | constructor: function(options){ 13 | this.createLayerSelect(options.idForChangeEvent, options.layerNode, options.map, options.geometry) 14 | }, 15 | 16 | createLayerSelect: function(id, layerNode, map, geometry){ 17 | new Select({ 18 | name: layerNode, 19 | id: id 20 | }).placeAt(layerNode).startup() 21 | 22 | var layers = []; 23 | 24 | for(var i = 0; i < map.graphicsLayerIds.length; i++) { 25 | var layerObject = map.getLayer(map.graphicsLayerIds[i]); 26 | if(layerObject.url){ 27 | layers.push(layerObject) 28 | } 29 | } 30 | 31 | var recording = layers.map(function(record){ 32 | switch(true){ 33 | case record.geometryType === "esriGeometryPolygon" && (geometry === '*' || geometry === 'polygon'): 34 | return dojo.create("option", { 35 | label: ' ' + record.name, 36 | value: record.id 37 | }) 38 | case record.geometryType === "esriGeometryPoint" && (geometry === '*' || geometry === 'point'): 39 | return dojo.create("option", { 40 | label: ' ' + record.name, 41 | value: record.id 42 | }) 43 | case record.geometryType === "esriGeometryLine" && (geometry === '*' || geometry === 'line'): 44 | return dojo.create("option", { 45 | label: ' ' + record.name, 46 | value: record.id 47 | }) 48 | case record.geometryType === "esriGeometryPolyLine" && (geometry === '*' || geometry === 'line'): 49 | return dojo.create("option", { 50 | label: ' ' + record.name, 51 | value: record.id 52 | }) 53 | case record.geometryType === "esriGeometryMultiPatch" && (geometry === '*' || geometry === 'multiPatch'): 54 | return dojo.create("option", { 55 | label: ' M ' + record.name, 56 | value: record.id 57 | }) 58 | /*default: 59 | return dojo.create("option", { 60 | label: record.name, 61 | value: record.id 62 | })*/ 63 | } 64 | }) 65 | 66 | var selectLayer = dijit.byId(id) 67 | selectLayer.addOption(recording) 68 | 69 | if(!recording){ 70 | alert('This widget needs a layer; fill your WebMap with some') 71 | } 72 | }, 73 | 74 | }); 75 | return clazz; 76 | }); -------------------------------------------------------------------------------- /chartJS/Widget.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 7 | 8 | 9 | 13 | 18 | 19 | 20 | 23 | 24 |
5 | ${nls.selectLayer}
6 |
10 | ${nls.selectXField}
11 |
12 |
14 | ${nls.selectYField}
15 |
16 | 17 |
21 |
${nls.execute}
22 |
25 |
26 |
27 |
28 |
29 | 30 |
31 |
32 |
33 |
34 | 35 |
36 |
37 |
38 | -------------------------------------------------------------------------------- /chartJS/Widget.js: -------------------------------------------------------------------------------- 1 | define(['dojo/_base/declare', 2 | 'jimu/BaseWidget', 3 | 'dojo/on', 4 | 'dojo/_base/lang', 5 | 'dojo/Deferred', 6 | 'dojo/dom', 7 | 'dijit/form/Select', 8 | 'dijit/form/Button', 9 | 'dijit/layout/TabContainer', 10 | 'dijit/layout/ContentPane', 11 | './chartJS', 12 | './webMapLayersIds', 13 | 'esri/tasks/query', 14 | 'esri/tasks/QueryTask', 15 | 'jimu/dijit/TabContainer3', 16 | 'dojo/domReady!'], 17 | function(declare, BaseWidget, on, lang, Deferred, dom, 18 | Select, Button, TabContainer, ContentPane, 19 | chartJS, webMapLayersIds, 20 | Query, QueryTask, 21 | TabContainer3) { 22 | 23 | return declare([BaseWidget], { 24 | 25 | layer: null, 26 | fieldX: null, 27 | fieldY: null, 28 | url: null, 29 | type: null, 30 | lineChart: null, 31 | barChart: null, 32 | extensionFilter: null, 33 | extensionEvent: null, 34 | 35 | startup: function() { 36 | this.inherited(arguments) 37 | this.initTabs() 38 | this.initLayerChooser() 39 | this.initCharts() 40 | }, 41 | 42 | initCharts: function(){ 43 | this.lineChart = new chartJS({ 44 | node: this.canvas, 45 | type: 'line', 46 | labels: null, 47 | label: this.fieldY, 48 | data: null 49 | }) 50 | 51 | this.barChart = new chartJS({ 52 | node: this.barCanvas, 53 | type: 'bar', 54 | labels: null, 55 | label: this.fieldY, 56 | data: null 57 | }) 58 | }, 59 | 60 | initTabs: function(){ 61 | var lineTab = { 62 | title: this.nls.lineTitleTab, 63 | content: this.lineTabNode 64 | }; 65 | 66 | var barTab = { 67 | title: this.nls.barTitleTab, 68 | content: this.barTabNode 69 | }; 70 | 71 | var tab = new TabContainer3({ 72 | tabs: [lineTab, barTab] 73 | }, this.tabNode); 74 | }, 75 | 76 | onOpen: function(){ 77 | this.extensionEvent = this.map.on('extent-change', lang.hitch(this, function(evt){ 78 | this.extensionFilter = evt.extent 79 | this.gettingLayer() 80 | })); 81 | }, 82 | 83 | initLayerChooser: function(){ 84 | var idForChangeEvent = "layerChooserNodeEvent"; 85 | 86 | new webMapLayersIds({ 87 | idForChangeEvent: idForChangeEvent, 88 | layerNode: "layerChooserNode", 89 | map: this.map, 90 | geometry: "*" 91 | }); 92 | 93 | this.initSelects(dijit.byId(idForChangeEvent).value); 94 | 95 | dijit.byId(idForChangeEvent).on("change", lang.hitch(this, function(evt){ 96 | this.options(evt) 97 | })) 98 | }, 99 | 100 | initSelects: function(layerId){ 101 | new Select({ 102 | name: "selectFieldX", 103 | id: "selectFieldX" 104 | }, this.selectXContainer).startup() 105 | 106 | new Select({ 107 | name: "selectFieldY", 108 | id: "selectFieldY" 109 | }, this.selectYContainer).startup() 110 | 111 | var fieldXid = dijit.byId('selectFieldX') 112 | this.fieldX = fieldXid.value; 113 | this.own(on(fieldXid, 'change', lang.hitch(this, function(evt){ 114 | this.fieldX = evt 115 | }))); 116 | 117 | var fieldYid = dijit.byId('selectFieldY') 118 | this.fieldY = fieldYid.value; 119 | this.own(on(fieldYid, 'change', lang.hitch(this, function(evt){ 120 | this.fieldY = evt 121 | }))); 122 | 123 | this.options(layerId) 124 | }, 125 | 126 | options: function(layerId){ 127 | this.layer = this.map.getLayer(layerId) 128 | this.url = this.layer.url 129 | var fields = this.layer.fields 130 | 131 | var map = fields.map(function(record){ 132 | return dojo.create("option", { 133 | label: record.name, 134 | value: record.name 135 | }) 136 | }) 137 | 138 | var selectX = dijit.byId('selectFieldX') 139 | var selectY = dijit.byId('selectFieldY') 140 | 141 | if(selectX.getOptions()){ 142 | selectX.options.length = 0 143 | selectY.options.length = 0 144 | selectX.addOption(map) 145 | selectY.addOption(map) 146 | } 147 | }, 148 | 149 | gettingLayer: function(){ 150 | var query = new Query() 151 | query.where = "1=1" 152 | query.geometry = this.extensionFilter 153 | query.returnGeometry = false 154 | query.outFields = [this.fieldX, this.fieldY] 155 | new QueryTask(this.url).execute(query, lang.hitch(this, function(results){ 156 | this.render(results) 157 | })) 158 | }, 159 | 160 | render: function(results){ 161 | var map = [] 162 | var labels = [] 163 | 164 | var def = new Deferred() 165 | def.resolve(':)'); 166 | def.then(lang.hitch(this, function(){ 167 | for(i in results.features){ 168 | map.push({ 169 | x: results.features[i].attributes[this.fieldX], 170 | y: results.features[i].attributes[this.fieldY] 171 | }) 172 | } 173 | })).then(lang.hitch(this, function(){ 174 | for(i in map){ 175 | labels.push(map[i].x) 176 | } 177 | })).then(lang.hitch(this, function(){ 178 | this.lineChart.updateChart(labels, map) 179 | this.barChart.updateChart(labels, map) 180 | })) 181 | }, 182 | 183 | onClose: function(){ 184 | this.extensionEvent.remove() 185 | } 186 | }); 187 | }); 188 | -------------------------------------------------------------------------------- /chartJS/chartJS.js: -------------------------------------------------------------------------------- 1 | define(['dojo/_base/declare', 2 | 'dojo/_base/lang'], 3 | function(declare, lang){ 4 | var clazz = declare(null, { 5 | 6 | chart: null, 7 | 8 | constructor: function(options){ 9 | this.createChart(options.node, options.type, options.labels, options.label, options.data) 10 | }, 11 | 12 | createChart: function(node, type, labels, label, data){ 13 | this.chart = new Chart(node.getContext('2d'), { 14 | type: type, 15 | data: { 16 | labels: labels, 17 | datasets: [{ 18 | label: label, 19 | fill: false, 20 | backgroundColor: 'rgb(51, 173, 255)', 21 | borderColor: 'rgb(0, 138, 230)', 22 | borderWidth: 1, 23 | pointRadius: 2, 24 | data: data 25 | }] 26 | }, 27 | options: {} 28 | }) 29 | }, 30 | 31 | updateChart: function(labels, map){ 32 | this.chart.data.labels = labels 33 | this.chart.data.datasets[0].data = map 34 | this.chart.update() 35 | } 36 | 37 | }); 38 | return clazz; 39 | }); -------------------------------------------------------------------------------- /chartJS/config.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /chartJS/css/style.css: -------------------------------------------------------------------------------- 1 | tr.spaceUnder > td { 2 | padding-bottom: 0.6em; 3 | padding-right: 3em; 4 | } 5 | 6 | canvas { 7 | border: 1px dotted lightgrey; 8 | } 9 | 10 | .chart-container { 11 | position: relative; 12 | margin: auto; 13 | padding-top: 0.6em; 14 | } 15 | 16 | #executeJimuButton { 17 | background: #24B5CC; 18 | line-height: 25px; 19 | } 20 | 21 | #executeJimuButton:hover { 22 | background-color: #0090A7; 23 | } 24 | -------------------------------------------------------------------------------- /chartJS/images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdriSolid/wab-custom-widgets/83966479494878d0054ba34117b4dec459577d71/chartJS/images/icon.png -------------------------------------------------------------------------------- /chartJS/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "chartJS", 3 | "platform": "HTML", 4 | "version": "1.0", 5 | "wabVersion": "2.7", 6 | "author": "Adrián Pérez Beneito", 7 | "description": "Display charts on the fly using ChartJS", 8 | "copyright": "", 9 | "license": "", 10 | "properties": { 11 | "hasSettingPage": false, 12 | "hasSettingUIFile": false, 13 | "hasSettingLocale": false, 14 | "hasSettingStyle": false 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /chartJS/nls/es/strings.js: -------------------------------------------------------------------------------- 1 | define({ 2 | selectLayer: "Selecciona una capa", 3 | selectXField: "Selecciona el campo X", 4 | selectYField: "Selecciona el campo Y", 5 | selectChart: "Tipo de gráfico", 6 | execute: "Ejecutar", 7 | lineTitleTab: "Líneas", 8 | barTitleTab: "Barras" 9 | }); 10 | -------------------------------------------------------------------------------- /chartJS/nls/strings.js: -------------------------------------------------------------------------------- 1 | define({ 2 | root: ({ 3 | _widgetLabel: "ChartJS, Line-Bar", 4 | selectLayer: "Select a layer", 5 | selectXField: "Select X Field", 6 | selectYField: "Select Y Field", 7 | selectChart: "Select chart type", 8 | execute: "Execute", 9 | lineTitleTab: "Line", 10 | barTitleTab: "Bar" 11 | }), 12 | "es": 0 13 | }); 14 | -------------------------------------------------------------------------------- /chartJS/webMapLayersIds.js: -------------------------------------------------------------------------------- 1 | define([ 2 | 'dojo/_base/declare', 3 | "dijit/form/Select", 4 | "dojo/dom-construct", 5 | "dojo/dom-attr", 6 | "dojo/dom", 7 | "dojo/on", 8 | "dojo/domReady!" 9 | ], function(declare, Select, domConstruct, domAttr, dom, on){ 10 | var clazz = declare(null, { 11 | 12 | constructor: function(options){ 13 | this.createLayerSelect(options.idForChangeEvent, options.layerNode, options.map, options.geometry) 14 | }, 15 | 16 | createLayerSelect: function(id, layerNode, map, geometry){ 17 | new Select({ 18 | name: layerNode, 19 | id: id 20 | }).placeAt(layerNode).startup() 21 | 22 | var layers = []; 23 | 24 | for(var i = 0; i < map.graphicsLayerIds.length; i++) { 25 | var layerObject = map.getLayer(map.graphicsLayerIds[i]); 26 | if(layerObject.url){ 27 | layers.push(layerObject) 28 | } 29 | } 30 | 31 | var recording = layers.map(function(record){ 32 | switch(true){ 33 | case record.geometryType === "esriGeometryPolygon" && (geometry === '*' || geometry === 'polygon'): 34 | return dojo.create("option", { 35 | label: ' ' + record.name, 36 | value: record.id 37 | }) 38 | case record.geometryType === "esriGeometryPoint" && (geometry === '*' || geometry === 'point'): 39 | return dojo.create("option", { 40 | label: ' ' + record.name, 41 | value: record.id 42 | }) 43 | case record.geometryType === "esriGeometryLine" && (geometry === '*' || geometry === 'line'): 44 | return dojo.create("option", { 45 | label: ' ' + record.name, 46 | value: record.id 47 | }) 48 | case record.geometryType === "esriGeometryPolyLine" && (geometry === '*' || geometry === 'line'): 49 | return dojo.create("option", { 50 | label: ' ' + record.name, 51 | value: record.id 52 | }) 53 | case record.geometryType === "esriGeometryMultiPatch" && (geometry === '*' || geometry === 'multiPatch'): 54 | return dojo.create("option", { 55 | label: ' M ' + record.name, 56 | value: record.id 57 | }) 58 | /*default: 59 | return dojo.create("option", { 60 | label: record.name, 61 | value: record.id 62 | })*/ 63 | } 64 | }) 65 | 66 | var selectLayer = dijit.byId(id) 67 | selectLayer.addOption(recording) 68 | 69 | if(!recording){ 70 | alert('This widget needs a layer; fill your WebMap with some') 71 | } 72 | }, 73 | 74 | }); 75 | return clazz; 76 | }); 77 | -------------------------------------------------------------------------------- /selectByAttributes/Widget.html: -------------------------------------------------------------------------------- 1 |
2 |

Enter a WHERE clause to select records in the table window.

3 |

4 |
5 | 6 | 7 | 10 | 13 | 16 | 19 | 20 | 21 | 24 | 27 | 30 | 31 | 32 | 35 | 38 | 41 | 42 | 43 | 46 | 49 | 52 | 53 | 54 | 57 | 60 | 63 | 66 | 67 |
8 |
9 |
11 |
12 |
14 |
15 |
17 | 18 |
22 |
23 |
25 |
26 |
28 |
29 |
33 |
34 |
36 |
37 |
39 |
40 |
44 |
45 |
47 |
48 |
50 |
51 |
55 |
56 |
58 |
59 |
61 |
62 |
64 |
${nls.getUniqueValues}
65 |

68 |
69 |
70 |
Clear
71 |
Verify
72 |
Help


73 |
Execute
74 |
75 |
-------------------------------------------------------------------------------- /selectByAttributes/Widget.js: -------------------------------------------------------------------------------- 1 | define([//Dojo 2 | 'dojo/_base/declare', 3 | 'dojo/_base/lang', 4 | 'dojo/dom-construct', 5 | 'dojo/dom-style', 6 | 'dojo/Deferred', 7 | 'dojo/dom', 8 | //Jimu 9 | 'jimu/BaseWidget', 10 | 'jimu/dijit/LoadingShelter', 11 | 'jimu/SelectionManager', 12 | 'jimu/dijit/Message', 13 | //Dijit 14 | 'dijit/form/Select', 15 | 'dijit/form/Button', 16 | 'dijit/form/TextBox', 17 | 'dijit/form/MultiSelect', 18 | 'dijit/ConfirmDialog', 19 | //Custom classes 20 | './idWebMapLayers', 21 | //Esri 22 | 'esri/tasks/query', 23 | 'esri/tasks/QueryTask', 24 | 'esri/request', 25 | 'esri/layers/FeatureLayer', 26 | 'esri/symbols/SimpleFillSymbol', 27 | 'esri/Color', 28 | 'esri/renderers/SimpleRenderer', 29 | //Files 30 | 'xstyle/css!./files/bootstrap.min.css', 31 | './files/jquery-3.3.1.min', 32 | './files/bootstrap.min', 33 | //domReady! 34 | 'dojo/domReady!' 35 | ], 36 | function(declare, lang, domConstruct, domStyle, Deferred, dom, 37 | BaseWidget, LoadingShelter, SelectionManager, Message, 38 | Select, Button, TextBox, MultiSelect, ConfirmDialog, 39 | idWebMapLayers, 40 | Query, QueryTask, esriRequest, FeatureLayer, SimpleFillSymbol, Color, SimpleRenderer) { 41 | 42 | return declare([BaseWidget], { 43 | 44 | shelter: null, 45 | layerName: null, 46 | layer: null, 47 | field: null, 48 | url: null, 49 | uniqueValue: null, 50 | ese: null, 51 | selectedField: null, 52 | selectionManager: SelectionManager.getInstance(), 53 | 54 | startup: function(){ 55 | this.inherited(arguments); 56 | this._setWidgetSize(); 57 | this._initLoadingShelter(); 58 | this._initLayerChooser(); 59 | this._initButtons(); 60 | }, 61 | 62 | _setWidgetSize: function(){ 63 | var panel = this.getPanel(); 64 | panel.position.height = 550; 65 | panel.setPosition(panel.position); 66 | panel.panelManager.normalizePanel(panel); 67 | }, 68 | 69 | _initLoadingShelter: function(){ 70 | this.shelter = new LoadingShelter({ 71 | hidden: false 72 | }); 73 | this.shelter.placeAt(this.loadingNode); 74 | this.shelter.startup(); 75 | this.shelter.hide(); 76 | }, 77 | 78 | _initLayerChooser: function(){ 79 | var idForChangeEvent = "layerChooserNodeEvent" 80 | 81 | new idWebMapLayers({ 82 | idForChangeEvent: idForChangeEvent, 83 | layerNode: "layerChooserNode", 84 | map: this.map, 85 | geometry: "*", //options: 'point', 'polygon', 'line', 'multiPatch' or '*' 86 | imageFolderUrl: this.folderUrl 87 | }) 88 | 89 | this.layerName = dijit.byId(idForChangeEvent).value 90 | this._fieldMultiSelect(this.layerName) 91 | this.selectFrom.innerHTML = 'SELECT * FROM ' + this.layerName + ' WHERE:' 92 | 93 | dijit.byId(idForChangeEvent).on("change", lang.hitch(this, function(evt){ 94 | this._updateFieldMultiSelect('fieldsMultiSelect', evt) 95 | this.selectFrom.innerHTML = 'SELECT * FROM ' + evt + ' WHERE:' 96 | })) 97 | }, 98 | 99 | _fieldMultiSelect: function(layerId){ 100 | this.layer = this.map.getLayer(layerId) 101 | this.url = this.layer.url 102 | var fields = this.layer.fields 103 | this.field = this.layer.fields 104 | 105 | for(i in fields){ 106 | var opData = domConstruct.create('option') 107 | opData.innerHTML = fields[i].name 108 | opData.value = fields[i].name 109 | dom.byId('fieldsMultiSelect').appendChild(opData) 110 | } 111 | 112 | var self = this; 113 | $('#fieldsMultiSelect').on('change', function(){ 114 | self.selectedField = $(this).val(); 115 | $('#textBoxNode').val( $('#textBoxNode').val() + $(this).val() ); 116 | 117 | var $uniques = $('#uniquesMultiSelect' + ' option'); 118 | $.each($uniques, function(index, element) { 119 | element.remove(); 120 | }); 121 | }); 122 | 123 | $('#uniquesMultiSelect').on('change', function(){ 124 | $('#textBoxNode').val( $('#textBoxNode').val() + "'" + $(this).val() + "'" ); 125 | }); 126 | }, 127 | 128 | _updateFieldMultiSelect: function(id, layerId){ 129 | var $uniques = $('#' + id + ' option'); 130 | $.each($uniques, function(index, element) { 131 | element.remove(); 132 | }); 133 | 134 | this.layer = this.map.getLayer(layerId) 135 | this.url = this.layer.url 136 | var fields = this.layer.fields 137 | this.field = this.layer.fields 138 | 139 | for(i in fields){ 140 | var opData = domConstruct.create('option') 141 | opData.innerHTML = fields[i].name 142 | opData.value = fields[i].name 143 | dom.byId(id).appendChild(opData) 144 | } 145 | }, 146 | 147 | _initButtons: function(){ 148 | for(i in this.config.ids){ 149 | new Button({ 150 | label: this.nls.buttons[this.config.ids[i]], 151 | value: this.nls.buttons[this.config.ids[i]], 152 | class: "button", 153 | onClick: function(){ 154 | $('#textBoxNode').val( $('#textBoxNode').val() + ' ' + this.get("value") + ' ' ); 155 | } 156 | }, this[this.config.ids[i]]); 157 | } 158 | }, 159 | 160 | _getUniqueValues: function(){ 161 | this.shelter.show(); 162 | var query = new Query() 163 | query.where = '1=1'; 164 | query.outFields = this.selectedField; 165 | new QueryTask(this.url).execute(query, lang.hitch(this, function(results){ 166 | var map = results.features.map(lang.hitch(this, function(record){ 167 | return record.attributes[this.selectedField[0]] 168 | })) 169 | var def = new Deferred() 170 | def.resolve(map); 171 | def.then(lang.hitch(this, function(results){ 172 | return results.sort() 173 | .filter(lang.hitch(this, function(x, i){ 174 | return results.indexOf(x) === i; 175 | })) 176 | })).then(lang.hitch(this, function(results){ 177 | var $uniques = $('#uniquesMultiSelect option'); 178 | $.each($uniques, function(index, element){ 179 | element.remove(); 180 | }); 181 | return results 182 | })).then(lang.hitch(this, function(results){ 183 | this._updateUniquesMultiselect('uniquesMultiSelect', results) 184 | })).then(lang.hitch(this, function(results){ 185 | this.shelter.hide(); 186 | })) 187 | })) 188 | }, 189 | 190 | _updateUniquesMultiselect: function(id, data){ 191 | for(i in data){ 192 | var opData = domConstruct.create('option') 193 | opData.innerHTML = data[i] 194 | opData.value = data[i] 195 | dom.byId(id).appendChild(opData) 196 | } 197 | }, 198 | 199 | _performQuery: function(){ 200 | var query = new Query() 201 | query.where = $('#textBoxNode').val(); 202 | query.outFields = ["*"]; 203 | new QueryTask(this.url).execute(query, lang.hitch(this, function(results){ 204 | this.selectionManager.setSelection(this.layer, results.features); 205 | }),function(error){ 206 | new Message({ 207 | message: "There was a problem selecting." 208 | }); 209 | }); 210 | }, 211 | 212 | _confirmQuery: function(){ 213 | var query = new Query() 214 | query.where = $('#textBoxNode').val(); 215 | query.outFields = ["*"]; 216 | new QueryTask(this.url).execute(query, lang.hitch(this, function(results){ 217 | if(results.features.length != 0){ 218 | new Message({ 219 | message: "There expression was successfully verified." 220 | }); 221 | }else{ 222 | new Message({ 223 | message: "The expression was verified successfully, but no records were returned." 224 | }); 225 | } 226 | }),function(error){ 227 | new Message({ 228 | message: "There was an error with the expression." 229 | }); 230 | }); 231 | }, 232 | 233 | _clearSelection: function(){ 234 | this.selectionManager.clearSelection(this.layer) 235 | } 236 | }); 237 | }); 238 | -------------------------------------------------------------------------------- /selectByAttributes/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "ids": ["equal", "notIn", "like", "major", "majorEqual", "And", "minor", "minorEqual", "Or", "percentage", "parenthesis", 3 | "Not", "Is", "In", "Null"] 4 | } 5 | 6 | -------------------------------------------------------------------------------- /selectByAttributes/css/style.css: -------------------------------------------------------------------------------- 1 | tr.spaceUnder > td { 2 | padding-bottom: 0.1em; 3 | } 4 | 5 | .claro .dijitButton .dijitButtonNode, .button { 6 | width : 40px; 7 | } 8 | 9 | .jimuCustomColor{ 10 | background: #24B5CC; 11 | } 12 | 13 | .jimuCustomColor:hover{ 14 | background-color: #0090A7; 15 | } 16 | 17 | .getUniqueValues{ 18 | line-height: 22px; 19 | font-size: 12px; 20 | padding: 0 8px; 21 | } 22 | 23 | #uniquesMultiSelect{ 24 | width: 235px; 25 | height: 115px; 26 | } -------------------------------------------------------------------------------- /selectByAttributes/files/bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v4.0.0-alpha (http://getbootstrap.com) 3 | * Copyright 2011-2015 Twitter, Inc. 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5 | */ 6 | if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(){"use strict";function a(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function b(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}{var c=function(a,b,c){for(var d=!0;d;){var e=a,f=b,g=c;h=j=i=void 0,d=!1,null===e&&(e=Function.prototype);var h=Object.getOwnPropertyDescriptor(e,f);if(void 0!==h){if("value"in h)return h.value;var i=h.get;return void 0===i?void 0:i.call(g)}var j=Object.getPrototypeOf(e);if(null===j)return void 0;a=j,b=f,c=g,d=!0}},d=function(){function a(a,b){for(var c=0;cthis._items.length-1||0>b)){if(this._isSliding)return void a(this._element).one(o.SLID,function(){return c.to(b)});if(d===b)return this.pause(),void this.cycle();var e=b>d?n.NEXT:n.PREVIOUS;this._slide(e,this._items[b])}}},{key:"dispose",value:function(){a(this._element).off(h),a.removeData(this._element,g),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null}},{key:"_getConfig",value:function(b){return b=a.extend({},l,b),e.typeCheckConfig(c,b,m),b}},{key:"_addEventListeners",value:function(){this._config.keyboard&&a(this._element).on(o.KEYDOWN,a.proxy(this._keydown,this)),"hover"!==this._config.pause||"ontouchstart"in document.documentElement||a(this._element).on(o.MOUSEENTER,a.proxy(this.pause,this)).on(o.MOUSELEAVE,a.proxy(this.cycle,this))}},{key:"_keydown",value:function(a){if(a.preventDefault(),!/input|textarea/i.test(a.target.tagName))switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}}},{key:"_getItemIndex",value:function(b){return this._items=a.makeArray(a(b).parent().find(q.ITEM)),this._items.indexOf(b)}},{key:"_getItemByDirection",value:function(a,b){var c=a===n.NEXT,d=a===n.PREVIOUS,e=this._getItemIndex(b),f=this._items.length-1,g=d&&0===e||c&&e===f;if(g&&!this._config.wrap)return b;var h=a===n.PREVIOUS?-1:1,i=(e+h)%this._items.length;return-1===i?this._items[this._items.length-1]:this._items[i]}},{key:"_triggerSlideEvent",value:function(b,c){var d=a.Event(o.SLIDE,{relatedTarget:b,direction:c});return a(this._element).trigger(d),d}},{key:"_setActiveIndicatorElement",value:function(b){if(this._indicatorsElement){a(this._indicatorsElement).find(q.ACTIVE).removeClass(p.ACTIVE);var c=this._indicatorsElement.children[this._getItemIndex(b)];c&&a(c).addClass(p.ACTIVE)}}},{key:"_slide",value:function(b,c){var d=this,f=a(this._element).find(q.ACTIVE_ITEM)[0],g=c||f&&this._getItemByDirection(b,f),h=Boolean(this._interval),i=b===n.NEXT?p.LEFT:p.RIGHT;if(g&&a(g).hasClass(p.ACTIVE))return void(this._isSliding=!1);var j=this._triggerSlideEvent(g,i);if(!j.isDefaultPrevented()&&f&&g){this._isSliding=!0,h&&this.pause(),this._setActiveIndicatorElement(g);var l=a.Event(o.SLID,{relatedTarget:g,direction:i});e.supportsTransitionEnd()&&a(this._element).hasClass(p.SLIDE)?(a(g).addClass(b),e.reflow(g),a(f).addClass(i),a(g).addClass(i),a(f).one(e.TRANSITION_END,function(){a(g).removeClass(i).removeClass(b),a(g).addClass(p.ACTIVE),a(f).removeClass(p.ACTIVE).removeClass(b).removeClass(i),d._isSliding=!1,setTimeout(function(){return a(d._element).trigger(l)},0)}).emulateTransitionEnd(k)):(a(f).removeClass(p.ACTIVE),a(g).addClass(p.ACTIVE),this._isSliding=!1,a(this._element).trigger(l)),h&&this.cycle()}}}],[{key:"_jQueryInterface",value:function(b){return this.each(function(){var c=a(this).data(g),d=a.extend({},l,a(this).data());"object"==typeof b&&a.extend(d,b);var e="string"==typeof b?b:d.slide;c||(c=new i(this,d),a(this).data(g,c)),"number"==typeof b?c.to(b):e?c[e]():d.interval&&(c.pause(),c.cycle())})}},{key:"_dataApiClickHandler",value:function(b){var c=e.getSelectorFromElement(this);if(c){var d=a(c)[0];if(d&&a(d).hasClass(p.CAROUSEL)){var f=a.extend({},a(d).data(),a(this).data()),h=this.getAttribute("data-slide-to");h&&(f.interval=!1),i._jQueryInterface.call(a(d),f),h&&a(d).data(g).to(h),b.preventDefault()}}}},{key:"VERSION",get:function(){return f}},{key:"Default",get:function(){return l}}]),i}();return a(document).on(o.CLICK_DATA_API,q.DATA_SLIDE,r._dataApiClickHandler),a(window).on(o.LOAD_DATA_API,function(){a(q.DATA_RIDE).each(function(){var b=a(this);r._jQueryInterface.call(b,b.data())})}),a.fn[c]=r._jQueryInterface,a.fn[c].Constructor=r,a.fn[c].noConflict=function(){return a.fn[c]=j,r._jQueryInterface},r}(jQuery),function(a){var c="collapse",f="4.0.0",g="bs.collapse",h="."+g,i=".data-api",j=a.fn[c],k=600,l={toggle:!0,parent:""},m={toggle:"boolean",parent:"string"},n={SHOW:"show"+h,SHOWN:"shown"+h,HIDE:"hide"+h,HIDDEN:"hidden"+h,CLICK_DATA_API:"click"+h+i},o={IN:"in",COLLAPSE:"collapse",COLLAPSING:"collapsing",COLLAPSED:"collapsed"},p={WIDTH:"width",HEIGHT:"height"},q={ACTIVES:".panel > .in, .panel > .collapsing",DATA_TOGGLE:'[data-toggle="collapse"]'},r=function(){function h(c,d){b(this,h),this._isTransitioning=!1,this._element=c,this._config=this._getConfig(d),this._triggerArray=a.makeArray(a('[data-toggle="collapse"][href="#'+c.id+'"],'+('[data-toggle="collapse"][data-target="#'+c.id+'"]'))),this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}return d(h,[{key:"toggle",value:function(){a(this._element).hasClass(o.IN)?this.hide():this.show()}},{key:"show",value:function(){var b=this;if(!this._isTransitioning&&!a(this._element).hasClass(o.IN)){var c=void 0,d=void 0;if(this._parent&&(c=a.makeArray(a(q.ACTIVES)),c.length||(c=null)),!(c&&(d=a(c).data(g),d&&d._isTransitioning))){var f=a.Event(n.SHOW);if(a(this._element).trigger(f),!f.isDefaultPrevented()){c&&(h._jQueryInterface.call(a(c),"hide"),d||a(c).data(g,null));var i=this._getDimension();a(this._element).removeClass(o.COLLAPSE).addClass(o.COLLAPSING),this._element.style[i]=0,this._element.setAttribute("aria-expanded",!0),this._triggerArray.length&&a(this._triggerArray).removeClass(o.COLLAPSED).attr("aria-expanded",!0),this.setTransitioning(!0);var j=function(){a(b._element).removeClass(o.COLLAPSING).addClass(o.COLLAPSE).addClass(o.IN),b._element.style[i]="",b.setTransitioning(!1),a(b._element).trigger(n.SHOWN)};if(!e.supportsTransitionEnd())return void j();var l=i[0].toUpperCase()+i.slice(1),m="scroll"+l;a(this._element).one(e.TRANSITION_END,j).emulateTransitionEnd(k),this._element.style[i]=this._element[m]+"px"}}}}},{key:"hide",value:function(){var b=this;if(!this._isTransitioning&&a(this._element).hasClass(o.IN)){var c=a.Event(n.HIDE);if(a(this._element).trigger(c),!c.isDefaultPrevented()){var d=this._getDimension(),f=d===p.WIDTH?"offsetWidth":"offsetHeight";this._element.style[d]=this._element[f]+"px",e.reflow(this._element),a(this._element).addClass(o.COLLAPSING).removeClass(o.COLLAPSE).removeClass(o.IN),this._element.setAttribute("aria-expanded",!1),this._triggerArray.length&&a(this._triggerArray).addClass(o.COLLAPSED).attr("aria-expanded",!1),this.setTransitioning(!0);var g=function(){b.setTransitioning(!1),a(b._element).removeClass(o.COLLAPSING).addClass(o.COLLAPSE).trigger(n.HIDDEN)};return this._element.style[d]=0,e.supportsTransitionEnd()?void a(this._element).one(e.TRANSITION_END,g).emulateTransitionEnd(k):void g()}}}},{key:"setTransitioning",value:function(a){this._isTransitioning=a}},{key:"dispose",value:function(){a.removeData(this._element,g),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null}},{key:"_getConfig",value:function(b){return b=a.extend({},l,b),b.toggle=Boolean(b.toggle),e.typeCheckConfig(c,b,m),b}},{key:"_getDimension",value:function(){var b=a(this._element).hasClass(p.WIDTH);return b?p.WIDTH:p.HEIGHT}},{key:"_getParent",value:function(){var b=this,c=a(this._config.parent)[0],d='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]';return a(c).find(d).each(function(a,c){b._addAriaAndCollapsedClass(h._getTargetFromElement(c),[c])}),c}},{key:"_addAriaAndCollapsedClass",value:function(b,c){if(b){var d=a(b).hasClass(o.IN);b.setAttribute("aria-expanded",d),c.length&&a(c).toggleClass(o.COLLAPSED,!d).attr("aria-expanded",d)}}}],[{key:"_getTargetFromElement",value:function(b){var c=e.getSelectorFromElement(b);return c?a(c)[0]:null}},{key:"_jQueryInterface",value:function(b){return this.each(function(){var c=a(this),d=c.data(g),e=a.extend({},l,c.data(),"object"==typeof b&&b);!d&&e.toggle&&/show|hide/.test(b)&&(e.toggle=!1),d||(d=new h(this,e),c.data(g,d)),"string"==typeof b&&d[b]()})}},{key:"VERSION",get:function(){return f}},{key:"Default",get:function(){return l}}]),h}();return a(document).on(n.CLICK_DATA_API,q.DATA_TOGGLE,function(b){b.preventDefault();var c=r._getTargetFromElement(this),d=a(c).data(g),e=d?"toggle":a(this).data();r._jQueryInterface.call(a(c),e)}),a.fn[c]=r._jQueryInterface,a.fn[c].Constructor=r,a.fn[c].noConflict=function(){return a.fn[c]=j,r._jQueryInterface},r}(jQuery),function(a){var c="dropdown",f="4.0.0",g="bs.dropdown",h="."+g,i=".data-api",j=a.fn[c],k={HIDE:"hide"+h,HIDDEN:"hidden"+h,SHOW:"show"+h,SHOWN:"shown"+h,CLICK:"click"+h,CLICK_DATA_API:"click"+h+i,KEYDOWN_DATA_API:"keydown"+h+i},l={BACKDROP:"dropdown-backdrop",DISABLED:"disabled",OPEN:"open"},m={BACKDROP:".dropdown-backdrop",DATA_TOGGLE:'[data-toggle="dropdown"]',FORM_CHILD:".dropdown form",ROLE_MENU:'[role="menu"]',ROLE_LISTBOX:'[role="listbox"]',NAVBAR_NAV:".navbar-nav",VISIBLE_ITEMS:'[role="menu"] li:not(.disabled) a, [role="listbox"] li:not(.disabled) a'},n=function(){function c(a){b(this,c),this._element=a,this._addEventListeners()}return d(c,[{key:"toggle",value:function(){if(this.disabled||a(this).hasClass(l.DISABLED))return!1;var b=c._getParentFromElement(this),d=a(b).hasClass(l.OPEN);if(c._clearMenus(),d)return!1;if("ontouchstart"in document.documentElement&&!a(b).closest(m.NAVBAR_NAV).length){var e=document.createElement("div");e.className=l.BACKDROP,a(e).insertBefore(this),a(e).on("click",c._clearMenus)}var f={relatedTarget:this},g=a.Event(k.SHOW,f);return a(b).trigger(g),g.isDefaultPrevented()?!1:(this.focus(),this.setAttribute("aria-expanded","true"),a(b).toggleClass(l.OPEN),a(b).trigger(a.Event(k.SHOWN,f)),!1)}},{key:"dispose",value:function(){a.removeData(this._element,g),a(this._element).off(h),this._element=null}},{key:"_addEventListeners",value:function(){a(this._element).on(k.CLICK,this.toggle)}}],[{key:"_jQueryInterface",value:function(b){return this.each(function(){var d=a(this).data(g);d||a(this).data(g,d=new c(this)),"string"==typeof b&&d[b].call(this)})}},{key:"_clearMenus",value:function(b){if(!b||3!==b.which){var d=a(m.BACKDROP)[0];d&&d.parentNode.removeChild(d);for(var e=a.makeArray(a(m.DATA_TOGGLE)),f=0;f0&&h--,40===b.which&&hdocument.documentElement.clientHeight;!this._isBodyOverflowing&&a&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!a&&(this._element.style.paddingRight=this._scrollbarWidth+"px~")}},{key:"_resetAdjustments",value:function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}},{key:"_checkScrollbar",value:function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this._isBodyOverflowing=document.body.clientWidth=c){var d=this._targets[this._targets.length-1];this._activeTarget!==d&&this._activate(d)}if(this._activeTarget&&a=this._offsets[e]&&(void 0===this._offsets[e+1]||a .nav-item .fade, > .fade",ACTIVE:".active",ACTIVE_CHILD:"> .nav-item > .active, > .active",DATA_TOGGLE:'[data-toggle="tab"], [data-toggle="pill"]',DROPDOWN_TOGGLE:".dropdown-toggle",DROPDOWN_ACTIVE_CHILD:"> .dropdown-menu .active"},o=function(){function c(a){b(this,c),this._element=a}return d(c,[{key:"show",value:function(){var b=this;if(!this._element.parentNode||this._element.parentNode.nodeType!==Node.ELEMENT_NODE||!a(this._element).hasClass(m.ACTIVE)){var c=void 0,d=void 0,f=a(this._element).closest(n.UL)[0],g=e.getSelectorFromElement(this._element);f&&(d=a.makeArray(a(f).find(n.ACTIVE)),d=d[d.length-1]);var h=a.Event(l.HIDE,{ 7 | relatedTarget:this._element}),i=a.Event(l.SHOW,{relatedTarget:d});if(d&&a(d).trigger(h),a(this._element).trigger(i),!i.isDefaultPrevented()&&!h.isDefaultPrevented()){g&&(c=a(g)[0]),this._activate(this._element,f);var j=function(){var c=a.Event(l.HIDDEN,{relatedTarget:b._element}),e=a.Event(l.SHOWN,{relatedTarget:d});a(d).trigger(c),a(b._element).trigger(e)};c?this._activate(c,c.parentNode,j):j()}}}},{key:"dispose",value:function(){a.removeClass(this._element,g),this._element=null}},{key:"_activate",value:function(b,c,d){var f=a(c).find(n.ACTIVE_CHILD)[0],g=d&&e.supportsTransitionEnd()&&(f&&a(f).hasClass(m.FADE)||Boolean(a(c).find(n.FADE_CHILD)[0])),h=a.proxy(this._transitionComplete,this,b,f,g,d);f&&g?a(f).one(e.TRANSITION_END,h).emulateTransitionEnd(k):h(),f&&a(f).removeClass(m.IN)}},{key:"_transitionComplete",value:function(b,c,d,f){if(c){a(c).removeClass(m.ACTIVE);var g=a(c).find(n.DROPDOWN_ACTIVE_CHILD)[0];g&&a(g).removeClass(m.ACTIVE),c.setAttribute("aria-expanded",!1)}if(a(b).addClass(m.ACTIVE),b.setAttribute("aria-expanded",!0),d?(e.reflow(b),a(b).addClass(m.IN)):a(b).removeClass(m.FADE),b.parentNode&&a(b.parentNode).hasClass(m.DROPDOWN_MENU)){var h=a(b).closest(n.DROPDOWN)[0];h&&a(h).find(n.DROPDOWN_TOGGLE).addClass(m.ACTIVE),b.setAttribute("aria-expanded",!0)}f&&f()}}],[{key:"_jQueryInterface",value:function(b){return this.each(function(){var d=a(this),e=d.data(g);e||(e=e=new c(this),d.data(g,e)),"string"==typeof b&&e[b]()})}},{key:"VERSION",get:function(){return f}}]),c}();return a(document).on(l.CLICK_DATA_API,n.DATA_TOGGLE,function(b){b.preventDefault(),o._jQueryInterface.call(a(this),"show")}),a.fn[c]=o._jQueryInterface,a.fn[c].Constructor=o,a.fn[c].noConflict=function(){return a.fn[c]=j,o._jQueryInterface},o}(jQuery),function(a){var c="tooltip",f="4.0.0",g="bs.tooltip",h="."+g,i=a.fn[c],j=150,k="bs-tether",l={animation:!0,template:'',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:"0 0",constraints:[]},m={animation:"boolean",template:"string",title:"(string|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"string",constraints:"array"},n={TOP:"bottom center",RIGHT:"middle left",BOTTOM:"top center",LEFT:"middle right"},o={IN:"in",OUT:"out"},p={HIDE:"hide"+h,HIDDEN:"hidden"+h,SHOW:"show"+h,SHOWN:"shown"+h,INSERTED:"inserted"+h,CLICK:"click"+h,FOCUSIN:"focusin"+h,FOCUSOUT:"focusout"+h,MOUSEENTER:"mouseenter"+h,MOUSELEAVE:"mouseleave"+h},q={FADE:"fade",IN:"in"},r={TOOLTIP:".tooltip",TOOLTIP_INNER:".tooltip-inner"},s={element:!1,enabled:!1},t={HOVER:"hover",FOCUS:"focus",CLICK:"click",MANUAL:"manual"},u=function(){function i(a,c){b(this,i),this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._tether=null,this.element=a,this.config=this._getConfig(c),this.tip=null,this._setListeners()}return d(i,[{key:"enable",value:function(){this._isEnabled=!0}},{key:"disable",value:function(){this._isEnabled=!1}},{key:"toggleEnabled",value:function(){this._isEnabled=!this._isEnabled}},{key:"toggle",value:function(b){if(b){var c=this.constructor.DATA_KEY,d=a(b.currentTarget).data(c);d||(d=new this.constructor(b.currentTarget,this._getDelegateConfig()),a(b.currentTarget).data(c,d)),d._activeTrigger.click=!d._activeTrigger.click,d._isWithActiveTrigger()?d._enter(null,d):d._leave(null,d)}else{if(a(this.getTipElement()).hasClass(q.IN))return void this._leave(null,this);this._enter(null,this)}}},{key:"dispose",value:function(){clearTimeout(this._timeout),this.cleanupTether(),a.removeData(this.element,this.constructor.DATA_KEY),a(this.element).off(this.constructor.EVENT_KEY),this.tip&&a(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._tether=null,this.element=null,this.config=null,this.tip=null}},{key:"show",value:function(){var b=this,c=a.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){a(this.element).trigger(c);var d=a.contains(this.element.ownerDocument.documentElement,this.element);if(c.isDefaultPrevented()||!d)return;var f=this.getTipElement(),g=e.getUID(this.constructor.NAME);f.setAttribute("id",g),this.element.setAttribute("aria-describedby",g),this.setContent(),this.config.animation&&a(f).addClass(q.FADE);var h="function"==typeof this.config.placement?this.config.placement.call(this,f,this.element):this.config.placement,j=this._getAttachment(h);a(f).data(this.constructor.DATA_KEY,this).appendTo(document.body),a(this.element).trigger(this.constructor.Event.INSERTED),this._tether=new Tether({attachment:j,element:f,target:this.element,classes:s,classPrefix:k,offset:this.config.offset,constraints:this.config.constraints}),e.reflow(f),this._tether.position(),a(f).addClass(q.IN);var l=function(){var c=b._hoverState;b._hoverState=null,a(b.element).trigger(b.constructor.Event.SHOWN),c===o.OUT&&b._leave(null,b)};if(e.supportsTransitionEnd()&&a(this.tip).hasClass(q.FADE))return void a(this.tip).one(e.TRANSITION_END,l).emulateTransitionEnd(i._TRANSITION_DURATION);l()}}},{key:"hide",value:function(b){var c=this,d=this.getTipElement(),f=a.Event(this.constructor.Event.HIDE),g=function(){c._hoverState!==o.IN&&d.parentNode&&d.parentNode.removeChild(d),c.element.removeAttribute("aria-describedby"),a(c.element).trigger(c.constructor.Event.HIDDEN),c.cleanupTether(),b&&b()};a(this.element).trigger(f),f.isDefaultPrevented()||(a(d).removeClass(q.IN),e.supportsTransitionEnd()&&a(this.tip).hasClass(q.FADE)?a(d).one(e.TRANSITION_END,g).emulateTransitionEnd(j):g(),this._hoverState="")}},{key:"isWithContent",value:function(){return Boolean(this.getTitle())}},{key:"getTipElement",value:function(){return this.tip=this.tip||a(this.config.template)[0]}},{key:"setContent",value:function(){var b=this.getTipElement(),c=this.getTitle(),d=this.config.html?"innerHTML":"innerText";a(b).find(r.TOOLTIP_INNER)[0][d]=c,a(b).removeClass(q.FADE).removeClass(q.IN),this.cleanupTether()}},{key:"getTitle",value:function(){var a=this.element.getAttribute("data-original-title");return a||(a="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),a}},{key:"cleanupTether",value:function(){this._tether&&(this._tether.destroy(),a(this.element).removeClass(this._removeTetherClasses),a(this.tip).removeClass(this._removeTetherClasses))}},{key:"_getAttachment",value:function(a){return n[a.toUpperCase()]}},{key:"_setListeners",value:function(){var b=this,c=this.config.trigger.split(" ");c.forEach(function(c){if("click"===c)a(b.element).on(b.constructor.Event.CLICK,b.config.selector,a.proxy(b.toggle,b));else if(c!==t.MANUAL){var d=c===t.HOVER?b.constructor.Event.MOUSEENTER:b.constructor.Event.FOCUSIN,e=c===t.HOVER?b.constructor.Event.MOUSELEAVE:b.constructor.Event.FOCUSOUT;a(b.element).on(d,b.config.selector,a.proxy(b._enter,b)).on(e,b.config.selector,a.proxy(b._leave,b))}}),this.config.selector?this.config=a.extend({},this.config,{trigger:"manual",selector:""}):this._fixTitle()}},{key:"_removeTetherClasses",value:function(a,b){return((b.baseVal||b).match(new RegExp("(^|\\s)"+k+"-\\S+","g"))||[]).join(" ")}},{key:"_fixTitle",value:function(){var a=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==a)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))}},{key:"_enter",value:function(b,c){var d=this.constructor.DATA_KEY;return c=c||a(b.currentTarget).data(d),c||(c=new this.constructor(b.currentTarget,this._getDelegateConfig()),a(b.currentTarget).data(d,c)),b&&(c._activeTrigger["focusin"===b.type?t.FOCUS:t.HOVER]=!0),a(c.getTipElement()).hasClass(q.IN)||c._hoverState===o.IN?void(c._hoverState=o.IN):(clearTimeout(c._timeout),c._hoverState=o.IN,c.config.delay&&c.config.delay.show?void(c._timeout=setTimeout(function(){c._hoverState===o.IN&&c.show()},c.config.delay.show)):void c.show())}},{key:"_leave",value:function(b,c){var d=this.constructor.DATA_KEY;return c=c||a(b.currentTarget).data(d),c||(c=new this.constructor(b.currentTarget,this._getDelegateConfig()),a(b.currentTarget).data(d,c)),b&&(c._activeTrigger["focusout"===b.type?t.FOCUS:t.HOVER]=!1),c._isWithActiveTrigger()?void 0:(clearTimeout(c._timeout),c._hoverState=o.OUT,c.config.delay&&c.config.delay.hide?void(c._timeout=setTimeout(function(){c._hoverState===o.OUT&&c.hide()},c.config.delay.hide)):void c.hide())}},{key:"_isWithActiveTrigger",value:function(){for(var a in this._activeTrigger)if(this._activeTrigger[a])return!0;return!1}},{key:"_getConfig",value:function(b){return b=a.extend({},this.constructor.Default,a(this.element).data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),e.typeCheckConfig(c,b,this.constructor.DefaultType),b}},{key:"_getDelegateConfig",value:function(){var a={};if(this.config)for(var b in this.config)this.constructor.Default[b]!==this.config[b]&&(a[b]=this.config[b]);return a}}],[{key:"_jQueryInterface",value:function(b){return this.each(function(){var c=a(this).data(g),d="object"==typeof b?b:null;(c||!/destroy|hide/.test(b))&&(c||(c=new i(this,d),a(this).data(g,c)),"string"==typeof b&&c[b]())})}},{key:"VERSION",get:function(){return f}},{key:"Default",get:function(){return l}},{key:"NAME",get:function(){return c}},{key:"DATA_KEY",get:function(){return g}},{key:"Event",get:function(){return p}},{key:"EVENT_KEY",get:function(){return h}},{key:"DefaultType",get:function(){return m}}]),i}();return a.fn[c]=u._jQueryInterface,a.fn[c].Constructor=u,a.fn[c].noConflict=function(){return a.fn[c]=i,u._jQueryInterface},u}(jQuery));!function(e){var g="popover",h="4.0.0",i="bs.popover",j="."+i,k=e.fn[g],l=e.extend({},f.Default,{placement:"right",trigger:"click",content:"",template:''}),m=e.extend({},f.DefaultType,{content:"(string|function)"}),n={FADE:"fade",IN:"in"},o={TITLE:".popover-title",CONTENT:".popover-content",ARROW:".popover-arrow"},p={HIDE:"hide"+j,HIDDEN:"hidden"+j,SHOW:"show"+j,SHOWN:"shown"+j,INSERTED:"inserted"+j,CLICK:"click"+j,FOCUSIN:"focusin"+j,FOCUSOUT:"focusout"+j,MOUSEENTER:"mouseenter"+j,MOUSELEAVE:"mouseleave"+j},q=function(f){function k(){b(this,k),c(Object.getPrototypeOf(k.prototype),"constructor",this).apply(this,arguments)}return a(k,f),d(k,[{key:"isWithContent",value:function(){return this.getTitle()||this._getContent()}},{key:"getTipElement",value:function(){return this.tip=this.tip||e(this.config.template)[0]}},{key:"setContent",value:function(){var a=this.getTipElement(),b=this.getTitle(),c=this._getContent(),d=e(a).find(o.TITLE)[0];d&&(d[this.config.html?"innerHTML":"innerText"]=b),e(a).find(o.CONTENT).children().detach().end()[this.config.html?"string"==typeof c?"html":"append":"text"](c),e(a).removeClass(n.FADE).removeClass(n.IN),this.cleanupTether()}},{key:"_getContent",value:function(){return this.element.getAttribute("data-content")||("function"==typeof this.config.content?this.config.content.call(this.element):this.config.content)}}],[{key:"_jQueryInterface",value:function(a){return this.each(function(){var b=e(this).data(i),c="object"==typeof a?a:null;(b||!/destroy|hide/.test(a))&&(b||(b=new k(this,c),e(this).data(i,b)),"string"==typeof a&&b[a]())})}},{key:"VERSION",get:function(){return h}},{key:"Default",get:function(){return l}},{key:"NAME",get:function(){return g}},{key:"DATA_KEY",get:function(){return i}},{key:"Event",get:function(){return p}},{key:"EVENT_KEY",get:function(){return j}},{key:"DefaultType",get:function(){return m}}]),k}(f);return e.fn[g]=q._jQueryInterface,e.fn[g].Constructor=q,e.fn[g].noConflict=function(){return e.fn[g]=k,q._jQueryInterface},q}(jQuery)}}(jQuery); -------------------------------------------------------------------------------- /selectByAttributes/files/jquery-3.3.1.min.js: -------------------------------------------------------------------------------- 1 | /*! jQuery v3.3.1 | (c) JS Foundation and other contributors | jquery.org/license */ 2 | !function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";var n=[],r=e.document,i=Object.getPrototypeOf,o=n.slice,a=n.concat,s=n.push,u=n.indexOf,l={},c=l.toString,f=l.hasOwnProperty,p=f.toString,d=p.call(Object),h={},g=function e(t){return"function"==typeof t&&"number"!=typeof t.nodeType},y=function e(t){return null!=t&&t===t.window},v={type:!0,src:!0,noModule:!0};function m(e,t,n){var i,o=(t=t||r).createElement("script");if(o.text=e,n)for(i in v)n[i]&&(o[i]=n[i]);t.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[c.call(e)]||"object":typeof e}var b="3.3.1",w=function(e,t){return new w.fn.init(e,t)},T=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;w.fn=w.prototype={jquery:"3.3.1",constructor:w,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=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(o.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&&n0&&t-1 in e)}var E=function(e){var t,n,r,i,o,a,s,u,l,c,f,p,d,h,g,y,v,m,x,b="sizzle"+1*new Date,w=e.document,T=0,C=0,E=ae(),k=ae(),S=ae(),D=function(e,t){return e===t&&(f=!0),0},N={}.hasOwnProperty,A=[],j=A.pop,q=A.push,L=A.push,H=A.slice,O=function(e,t){for(var n=0,r=e.length;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?"\ufffd":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(e){L={apply:A.length?function(e,t){q.apply(e,H.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function oe(e,t,r,i){var o,s,l,c,f,h,v,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+" "]&&(!y||!y.test(e))){if(1!==T)m=t,v=e;else if("object"!==t.nodeName.toLowerCase()){(c=t.getAttribute("id"))?c=c.replace(te,ne):t.setAttribute("id",c=b),s=(h=a(e)).length;while(s--)h[s]="#"+c+" "+ve(h[s]);v=h.join(","),m=K.test(e)&&ge(t.parentNode)||t}if(v)try{return L.apply(r,m.querySelectorAll(v)),r}catch(e){}finally{c===b&&t.removeAttribute("id")}}}return u(e.replace(B,"$1"),t,r,i)}function ae(){var e=[];function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}return t}function se(e){return e[b]=!0,e}function ue(e){var t=d.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function le(e,t){var n=e.split("|"),i=n.length;while(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)while(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){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function ge(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}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?(d=a,h=d.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("undefined"!=typeof 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="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&g){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return"undefined"!=typeof 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){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&g)return t.getElementsByClassName(e)},v=[],y=[],(n.qsa=Q.test(d.querySelectorAll))&&(ue(function(e){h.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||y.push("\\["+M+"*(?:value|"+P+")"),e.querySelectorAll("[id~="+b+"-]").length||y.push("~="),e.querySelectorAll(":checked").length||y.push(":checked"),e.querySelectorAll("a#"+b+"+*").length||y.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&&y.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),h.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),y.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"),v.push("!=",W)}),y=y.length&&new RegExp(y.join("|")),v=v.length&&new RegExp(v.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)while(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);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(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+" "]&&(!v||!v.test(t))&&(!y||!y.test(t)))try{var r=m.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}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){while(t=e[o++])t===e[o]&&(i=r.push(o));while(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 while(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||"undefined"!=typeof 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",y=t.parentNode,v=s&&t.nodeName.toLowerCase(),m=!u&&!s,x=!1;if(y){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===v:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?y.firstChild:y.lastChild],a&&m){x=(d=(l=(c=(f=(p=y)[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===T&&l[1])&&l[2],p=d&&y.childNodes[d];while(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)while(p=++d&&p&&p[g]||(x=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===v:1===p.nodeType)&&++x&&(m&&((c=(f=p[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]=[T,x]),p===t))break;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){var r,o=i(e,t),a=o.length;while(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){var o,a=r(e,null,i,[]),s=e.length;while(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){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function be(e,t,n){for(var r=0,i=t.length;r-1&&(o[l]=!(a[l]=f))}}else v=we(v===a?v.splice(h,v.length):v),i?i(null,a,v,u):L.apply(a,v)})}function Ce(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&&ve(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,y,v=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){h=0,a||f.ownerDocument===d||(p(f),s=!g);while(y=e[h++])if(y(f,a||d,s)){u.push(f);break}c&&(T=E)}n&&((f=!y&&f)&&v--,o&&x.push(f))}if(v+=m,n&&m!==v){h=0;while(y=t[h++])y(x,b,a,s);if(o){if(v>0)while(m--)x[m]||b[m]||(b[m]=j.call(u));b=we(b)}L.apply(u,b),c&&!o&&b.length>0&&v+t.length>1&&oe.uniqueSort(u)}return c&&(T=E,l=w),x};return n?se(o):o}return s=oe.compile=function(e,t){var n,r=[],i=[],o=S[e+" "];if(!o){t||(t=a(e)),n=t.length;while(n--)(o=Ce(t[n]))[b]?r.push(o):i.push(o);(o=S(e,Ee(i,r))).selector=e}return o},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)}o=V.needsContext.test(e)?0:u.length;while(o--){if(l=u[o],r.relative[c=l.type])break;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&&ve(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}(e);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){var r=[],i=void 0!==n;while((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 g(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 u.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 i,o;if(!e)return this;if(n=n||q,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:L.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof w?t[0]:t,w.merge(this,w.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:r,!0)),A.test(i[1])&&w.isPlainObject(t))for(i in t)g(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(o=r.getElementById(i[2]))&&(this[0]=o,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):g(e)?void 0!==n.ready?n.ready(e):e(w):w.makeArray(e,this)}).prototype=w.fn,q=w(r);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};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?u.call(w(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(w.uniqueSort(w.merge(this.get(),w(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function P(e,t){while((e=e[t])&&1!==e.nodeType);return 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){var t={};return w.each(e.match(M)||[],function(e,n){t[n]=!0}),t}w.Callbacks=function(e){e="string"==typeof e?R(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){n=a.shift();while(++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};function I(e){return e}function W(e){throw e}function $(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])}}w.extend({Deferred:function(t){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=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(t,r,i){var o=0;function a(t,n,r,i){return function(){var s=this,u=arguments,l=function(){var e,l;if(!(t=o&&(r!==W&&(s=void 0,u=[e]),n.rejectWith(s,u))}};t?c():(w.Deferred.getStackHook&&(c.stackTrace=w.Deferred.getStackHook()),e.setTimeout(c))}}return w.Deferred(function(e){n[0][3].add(a(0,e,g(i)?i:I,e.notifyWith)),n[1][3].add(a(0,e,g(t)?t:I)),n[2][3].add(a(0,e,g(r)?r:W))}).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),t&&t.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=o.call(arguments),a=w.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&&($(e,a.done(s(n)).resolve,a.reject,!t),"pending"===a.state()||g(i[n]&&i[n].then)))return a.then();while(n--)$(i[n],s(n),a.reject);return a.promise()}});var B=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;w.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&B.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},w.readyException=function(t){e.setTimeout(function(){throw t})};var F=w.Deferred();w.fn.ready=function(e){return F.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||F.resolveWith(r,[w]))}}),w.ready.then=F.then;function _(){r.removeEventListener("DOMContentLoaded",_),e.removeEventListener("load",_),w.ready()}"complete"===r.readyState||"loading"!==r.readyState&&!r.documentElement.doScroll?e.setTimeout(w.ready):(r.addEventListener("DOMContentLoaded",_),e.addEventListener("load",_));var z=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===x(n)){i=!0;for(s in n)z(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(w(e),n)})),t))for(;s1,null,!0)},removeData:function(e){return this.each(function(){K.remove(this,e)})}}),w.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=J.get(e,t),n&&(!r||Array.isArray(n)?r=J.access(e,t,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),a=function(){w.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return J.get(e,n)||J.access(e,n,{empty:w.Callbacks("once memory").add(function(){J.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,he=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};ge.optgroup=ge.option,ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td;function ye(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&N(e,t)?w.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;n-1)i&&i.push(o);else if(l=w.contains(o.ownerDocument,o),a=ye(f.appendChild(o),"script"),l&&ve(a),n){c=0;while(o=a[c++])he.test(o.type||"")&&n.push(o)}return f}!function(){var e=r.createDocumentFragment().appendChild(r.createElement("div")),t=r.createElement("input");t.setAttribute("type","radio"),t.setAttribute("checked","checked"),t.setAttribute("name","t"),e.appendChild(t),h.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML="",h.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue}();var be=r.documentElement,we=/^key/,Te=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ce=/^([^.]*)(?:\.(.+)|)/;function Ee(){return!0}function ke(){return!1}function Se(){try{return r.activeElement}catch(e){}}function De(e,t,n,r,i,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(s in 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,y=J.get(e);if(y){n.handler&&(n=(o=n).handler,i=o.selector),i&&w.find.matchesSelector(be,i),n.guid||(n.guid=w.guid++),(u=y.events)||(u=y.events={}),(a=y.handle)||(a=y.handle=function(t){return"undefined"!=typeof w&&w.event.triggered!==t.type?w.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(M)||[""]).length;while(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,y=J.hasData(e)&&J.get(e);if(y&&(u=y.events)){l=(t=(t||"").match(M)||[""]).length;while(l--)if(s=Ce.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){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;while(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,y.handle)||w.removeEvent(e,d,y.handle),delete u[d])}else for(d in u)w.event.remove(e,d+t[l],n,r,!0);w.isEmptyObject(u)&&J.remove(e,"handle events")}},dispatch:function(e){var t=w.event.fix(e),n,r,i,o,a,s,u=new Array(arguments.length),l=(J.get(this,"events")||{})[t.type]||[],c=w.event.special[t.type]||{};for(u[0]=t,n=1;n=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: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(J.hasData(e)&&(o=J.access(e),a=J.set(t,o),l=o.events)){delete a.handle,a.events={};for(i in l)for(n=0,r=l[i].length;n1&&"string"==typeof y&&!h.checkClone&&je.test(y))return e.each(function(i){var o=e.eq(i);v&&(t[0]=y.call(this,i,o.html())),Re(o,t,n,r)});if(p&&(i=xe(t,e[0].ownerDocument,!1,e,r),o=i.firstChild,1===i.childNodes.length&&(i=o),o||r)){for(u=(s=w.map(ye(i,"script"),He)).length;f")},clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),u=w.contains(e.ownerDocument,e);if(!(h.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||w.isXMLDoc(e)))for(a=ye(s),r=0,i=(o=ye(e)).length;r0&&ve(a,!u&&ye(e,"script")),s},cleanData:function(e){for(var t,n,r,i=w.event.special,o=0;void 0!==(n=e[o]);o++)if(Y(n)){if(t=n[J.expando]){if(t.events)for(r in t.events)i[r]?w.event.remove(n,r):w.removeEvent(n,r,t.handle);n[J.expando]=void 0}n[K.expando]&&(n[K.expando]=void 0)}}}),w.fn.extend({detach:function(e){return Ie(this,e,!0)},remove:function(e){return Ie(this,e)},text:function(e){return z(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 Re(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Le(this,e).appendChild(e)})},prepend:function(){return Re(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 Re(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Re(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(ye(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 z(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)&&!ge[(de.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 et(e,t,n){var r=$e(e),i=Fe(e,t,r),o="border-box"===w.css(e,"boxSizing",!1,r),a=o;if(We.test(i)){if(!n)return i;i="auto"}return a=a&&(h.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)+Ze(e,t,n||(o?"border":"content"),a,r,i)+"px"}w.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Fe(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=G(t),u=Xe.test(t),l=e.style;if(u||(t=Je(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=ie.exec(n))&&i[1]&&(n=ue(e,t,i),o="number"),null!=n&&n===n&&("number"===o&&(n+=i&&i[3]||(w.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=G(t);return Xe.test(t)||(t=Je(s)),(a=w.cssHooks[t]||w.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Fe(e,t,r)),"normal"===i&&t in Ve&&(i=Ve[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!ze.test(w.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?et(e,t,r):se(e,Ue,function(){return et(e,t,r)})},set:function(e,n,r){var i,o=$e(e),a="border-box"===w.css(e,"boxSizing",!1,o),s=r&&Ze(e,t,r,a,o);return a&&h.scrollboxSize()===o.position&&(s-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-Ze(e,t,"border",!1,o)-.5)),s&&(i=ie.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=w.css(e,t)),Ke(e,n,s)}}}),w.cssHooks.marginLeft=_e(h.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Fe(e,"marginLeft"))||e.getBoundingClientRect().left-se(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+oe[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(w.cssHooks[e+t].set=Ke)}),w.fn.extend({css:function(e,t){return z(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=$e(e),i=t.length;a1)}});function tt(e,t,n,r,i){return new tt.prototype.init(e,t,n,r,i)}w.Tween=tt,tt.prototype={constructor:tt,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=tt.propHooks[this.prop];return e&&e.get?e.get(this):tt.propHooks._default.get(this)},run:function(e){var t,n=tt.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):tt.propHooks._default.set(this),this}},tt.prototype.init.prototype=tt.prototype,tt.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)}}},tt.propHooks.scrollTop=tt.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=tt.prototype.init,w.fx.step={};var nt,rt,it=/^(?:toggle|show|hide)$/,ot=/queueHooks$/;function at(){rt&&(!1===r.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(at):e.setTimeout(at,w.fx.interval),w.fx.tick())}function st(){return e.setTimeout(function(){nt=void 0}),nt=Date.now()}function ut(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=oe[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function lt(e,t,n){for(var r,i=(pt.tweeners[t]||[]).concat(pt.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"undefined"==typeof e.getAttribute?w.prop(e,t,n):(1===o&&w.isXMLDoc(e)||(i=w.attrHooks[t.toLowerCase()]||(w.expr.match.bool.test(t)?dt: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(!h.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)while(n=i[r++])e.removeAttribute(n)}}),dt={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=ht[t]||w.find.attr;ht[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=ht[a],ht[a]=i,i=null!=n(e,t,r)?a:null,ht[a]=o),i}});var gt=/^(?:input|select|textarea|button)$/i,yt=/^(?:a|area)$/i;w.fn.extend({prop:function(e,t){return z(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):gt.test(e.nodeName)||yt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),h.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});function vt(e){return(e.match(M)||[]).join(" ")}function mt(e){return e.getAttribute&&e.getAttribute("class")||""}function xt(e){return Array.isArray(e)?e:"string"==typeof e?e.match(M)||[]:[]}w.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(g(e))return this.each(function(t){w(this).addClass(e.call(this,t,mt(this)))});if((t=xt(e)).length)while(n=this[u++])if(i=mt(n),r=1===n.nodeType&&" "+vt(i)+" "){a=0;while(o=t[a++])r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(g(e))return this.each(function(t){w(this).removeClass(e.call(this,t,mt(this)))});if(!arguments.length)return this.attr("class","");if((t=xt(e)).length)while(n=this[u++])if(i=mt(n),r=1===n.nodeType&&" "+vt(i)+" "){a=0;while(o=t[a++])while(r.indexOf(" "+o+" ")>-1)r=r.replace(" "+o+" "," ");i!==(s=vt(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):g(e)?this.each(function(n){w(this).toggleClass(e.call(this,n,mt(this),t),t)}):this.each(function(){var t,i,o,a;if(r){i=0,o=w(this),a=xt(e);while(t=a[i++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else void 0!==e&&"boolean"!==n||((t=mt(this))&&J.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":J.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&(" "+vt(mt(n))+" ").indexOf(t)>-1)return!0;return!1}});var bt=/\r/g;w.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=g(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))});if(i)return(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(bt,""):null==n?"":n}}}),w.extend({valHooks:{option:{get:function(e){var t=w.find.attr(e,"value");return null!=t?t:vt(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}},h.checkOn||(w.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),h.focusin="onfocusin"in e;var wt=/^(?:focusinfocus|focusoutblur)$/,Tt=function(e){e.stopPropagation()};w.extend(w.event,{trigger:function(t,n,i,o){var a,s,u,l,c,p,d,h,v=[i||r],m=f.call(t,"type")?t.type:t,x=f.call(t,"namespace")?t.namespace.split("."):[];if(s=h=u=i=i||r,3!==i.nodeType&&8!==i.nodeType&&!wt.test(m+w.event.triggered)&&(m.indexOf(".")>-1&&(m=(x=m.split(".")).shift(),x.sort()),c=m.indexOf(":")<0&&"on"+m,t=t[w.expando]?t:new w.Event(m,"object"==typeof t&&t),t.isTrigger=o?2:3,t.namespace=x.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+x.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),n=null==n?[t]:w.makeArray(n,[t]),d=w.event.special[m]||{},o||!d.trigger||!1!==d.trigger.apply(i,n))){if(!o&&!d.noBubble&&!y(i)){for(l=d.delegateType||m,wt.test(l+m)||(s=s.parentNode);s;s=s.parentNode)v.push(s),u=s;u===(i.ownerDocument||r)&&v.push(u.defaultView||u.parentWindow||e)}a=0;while((s=v[a++])&&!t.isPropagationStopped())h=s,t.type=a>1?l:d.bindType||m,(p=(J.get(s,"events")||{})[t.type]&&J.get(s,"handle"))&&p.apply(s,n),(p=c&&s[c])&&p.apply&&Y(s)&&(t.result=p.apply(s,n),!1===t.result&&t.preventDefault());return t.type=m,o||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(v.pop(),n)||!Y(i)||c&&g(i[m])&&!y(i)&&((u=i[c])&&(i[c]=null),w.event.triggered=m,t.isPropagationStopped()&&h.addEventListener(m,Tt),i[m](),t.isPropagationStopped()&&h.removeEventListener(m,Tt),w.event.triggered=void 0,u&&(i[c]=u)),t.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)}}),h.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=J.access(r,t);i||r.addEventListener(e,n,!0),J.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=J.access(r,t)-1;i?J.access(r,t,i):(r.removeEventListener(e,n,!0),J.remove(r,t))}}});var Ct=e.location,Et=Date.now(),kt=/\?/;w.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||w.error("Invalid XML: "+t),n};var St=/\[\]$/,Dt=/\r?\n/g,Nt=/^(?:submit|button|image|reset|file)$/i,At=/^(?:input|select|textarea|keygen)/i;function jt(e,t,n,r){var i;if(Array.isArray(t))w.each(t,function(t,i){n||St.test(e)?r(e,i):jt(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)});else if(n||"object"!==x(t))r(e,t);else for(i in t)jt(e+"["+i+"]",t[i],n,r)}w.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(Array.isArray(e)||e.jquery&&!w.isPlainObject(e))w.each(e,function(){i(this.name,this.value)});else for(n in e)jt(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")&&At.test(this.nodeName)&&!Nt.test(e)&&(this.checked||!pe.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(Dt,"\r\n")}}):{name:t.name,value:n.replace(Dt,"\r\n")}}).get()}});var qt=/%20/g,Lt=/#.*$/,Ht=/([?&])_=[^&]*/,Ot=/^(.*?):[ \t]*([^\r\n]*)$/gm,Pt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Mt=/^(?:GET|HEAD)$/,Rt=/^\/\//,It={},Wt={},$t="*/".concat("*"),Bt=r.createElement("a");Bt.href=Ct.href;function Ft(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(M)||[];if(g(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function _t(e,t,n,r){var i={},o=e===Wt;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 zt(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}function Xt(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===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]}function Ut(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];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}w.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ct.href,type:"GET",isLocal:Pt.test(Ct.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":w.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?zt(zt(e,w.ajaxSettings),t):zt(w.ajaxSettings,e)},ajaxPrefilter:Ft(It),ajaxTransport:Ft(Wt),ajax:function(t,n){"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,o,a,s,u,l,c,f,p,d,h=w.ajaxSetup({},n),g=h.context||h,y=h.context&&(g.nodeType||g.jquery)?w(g):w.event,v=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){s={};while(t=Ot.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 i&&i.abort(t),k(0,t),this}};if(v.promise(E),h.url=((t||h.url||Ct.href)+"").replace(Rt,Ct.protocol+"//"),h.type=n.method||n.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(M)||[""],null==h.crossDomain){l=r.createElement("a");try{l.href=h.url,l.href=l.href,h.crossDomain=Bt.protocol+"//"+Bt.host!=l.protocol+"//"+l.host}catch(e){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=w.param(h.data,h.traditional)),_t(It,h,n,E),c)return E;(f=w.event&&h.global)&&0==w.active++&&w.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Mt.test(h.type),o=h.url.replace(Lt,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(qt,"+")):(d=h.url.slice(o.length),h.data&&(h.processData||"string"==typeof h.data)&&(o+=(kt.test(o)?"&":"?")+h.data,delete h.data),!1===h.cache&&(o=o.replace(Ht,"$1"),d=(kt.test(o)?"&":"?")+"_="+Et+++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]?", "+$t+"; q=0.01":""):h.accepts["*"]);for(p in 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),i=_t(Wt,h,n,E)){if(E.readyState=1,f&&y.trigger("ajaxSend",[E,h]),c)return E;h.async&&h.timeout>0&&(u=e.setTimeout(function(){E.abort("timeout")},h.timeout));try{c=!1,i.send(b,k)}catch(e){if(c)throw e;k(-1,e)}}else k(-1,"No Transport");function k(t,n,r,s){var l,p,d,b,T,C=n;c||(c=!0,u&&e.clearTimeout(u),i=void 0,a=s||"",E.readyState=t>0?4:0,l=t>=200&&t<300||304===t,r&&(b=Xt(h,E,r)),b=Ut(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===t||"HEAD"===h.type?C="nocontent":304===t?C="notmodified":(C=b.state,p=b.data,l=!(d=b.error))):(d=C,!t&&C||(C="error",t<0&&(t=0))),E.status=t,E.statusText=(n||C)+"",l?v.resolveWith(g,[p,C,E]):v.rejectWith(g,[E,C,d]),E.statusCode(x),x=void 0,f&&y.trigger(l?"ajaxSuccess":"ajaxError",[E,h,l?p:d]),m.fireWith(g,[E,C]),f&&(y.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 g(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]&&(g(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(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return g(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=g(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 e.XMLHttpRequest}catch(e){}};var Vt={0:200,1223:204},Gt=w.ajaxSettings.xhr();h.cors=!!Gt&&"withCredentials"in Gt,h.ajax=Gt=!!Gt,w.ajaxTransport(function(t){var n,r;if(h.cors||Gt&&!t.crossDomain)return{send:function(i,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");for(a in 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(Vt[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&&e.setTimeout(function(){n&&r()})},n=n("abort");try{s.send(t.hasContent&&t.data||null)}catch(e){if(n)throw e}},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){if(e.crossDomain){var t,n;return{send:function(i,o){t=w("