var _lwTokenValueNoOverrideThis="9D7E34B0570BF8E9BD0D4D751FDC00997D2306A2";
var _lwBaseDomainNoOverrideThis="js.dev.dnslw.com";
var _lwBaseMapServiceDomainNoOverrideThis="api.location-world.com";
var _lwBaseMapServiceNoOverrideThis="ColombiaMapService";
var _lwWebServiceDomainNoOverrideThis="ws.dev.dnslw.com";
/*
Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
Available via Academic Free License >= 2.1 OR the modified BSD license.
see: http://dojotoolkit.org/license for details
*/

/*
This is an optimized version of Dojo, built for deployment and not for
development. To get sources and documentation, please visit:

http://dojotoolkit.org
*/

(function () { var _1 = null; if ((_1 || (typeof djConfig != "undefined" && djConfig.scopeMap)) && (typeof window != "undefined")) { var _2 = "", _3 = "", _4 = "", _5 = {}, _6 = {}; _1 = _1 || djConfig.scopeMap; for (var i = 0; i < _1.length; i++) { var _7 = _1[i]; _2 += "var " + _7[0] + " = {}; " + _7[1] + " = " + _7[0] + ";" + _7[1] + "._scopeName = '" + _7[1] + "';"; _3 += (i == 0 ? "" : ",") + _7[0]; _4 += (i == 0 ? "" : ",") + _7[1]; _5[_7[0]] = _7[1]; _6[_7[1]] = _7[0]; } eval(_2 + "dojo._scopeArgs = [" + _4 + "];"); dojo._scopePrefixArgs = _3; dojo._scopePrefix = "(function(" + _3 + "){"; dojo._scopeSuffix = "})(" + _4 + ")"; dojo._scopeMap = _5; dojo._scopeMapRev = _6; } (function () { if (typeof this["loadFirebugConsole"] == "function") { this["loadFirebugConsole"](); } else { this.console = this.console || {}; var cn = ["assert", "count", "debug", "dir", "dirxml", "error", "group", "groupEnd", "info", "profile", "profileEnd", "time", "timeEnd", "trace", "warn", "log"]; var i = 0, tn; while ((tn = cn[i++])) { if (!console[tn]) { (function () { var _8 = tn + ""; console[_8] = ("log" in console) ? function () { var a = Array.apply({}, arguments); a.unshift(_8 + ":"); console["log"](a.join(" ")); } : function () { }; console[_8]._fake = true; })(); } } } if (typeof dojo == "undefined") { dojo = { _scopeName: "dojo", _scopePrefix: "", _scopePrefixArgs: "", _scopeSuffix: "", _scopeMap: {}, _scopeMapRev: {} }; } var d = dojo; if (typeof dijit == "undefined") { dijit = { _scopeName: "dijit" }; } if (typeof dojox == "undefined") { dojox = { _scopeName: "dojox" }; } if (!d._scopeArgs) { d._scopeArgs = [dojo, dijit, dojox]; } d.global = this; d.config = { isDebug: false, debugAtAllCosts: false }; if (typeof djConfig != "undefined") { for (var _9 in djConfig) { d.config[_9] = djConfig[_9]; } } dojo.locale = d.config.locale; var _a = "$Rev: 22487 $".match(/\d+/); dojo.version = { major: 1, minor: 5, patch: 0, flag: "", revision: _a ? +_a[0] : NaN, toString: function () { with (d.version) { return major + "." + minor + "." + patch + flag + " (" + revision + ")"; } } }; if (typeof OpenAjax != "undefined") { OpenAjax.hub.registerLibrary(dojo._scopeName, "http://dojotoolkit.org", d.version.toString()); } var _b, _c, _d = {}; for (var i in { toString: 1 }) { _b = []; break; } dojo._extraNames = _b = _b || ["hasOwnProperty", "valueOf", "isPrototypeOf", "propertyIsEnumerable", "toLocaleString", "toString", "constructor"]; _c = _b.length; dojo._mixin = function (_e, _f) { var _10, s, i; for (_10 in _f) { s = _f[_10]; if (!(_10 in _e) || (_e[_10] !== s && (!(_10 in _d) || _d[_10] !== s))) { _e[_10] = s; } } if (_c && _f) { for (i = 0; i < _c; ++i) { _10 = _b[i]; s = _f[_10]; if (!(_10 in _e) || (_e[_10] !== s && (!(_10 in _d) || _d[_10] !== s))) { _e[_10] = s; } } } return _e; }; dojo.mixin = function (obj, _11) { if (!obj) { obj = {}; } for (var i = 1, l = arguments.length; i < l; i++) { d._mixin(obj, arguments[i]); } return obj; }; dojo._getProp = function (_12, _13, _14) { var obj = _14 || d.global; for (var i = 0, p; obj && (p = _12[i]); i++) { if (i == 0 && d._scopeMap[p]) { p = d._scopeMap[p]; } obj = (p in obj ? obj[p] : (_13 ? obj[p] = {} : undefined)); } return obj; }; dojo.setObject = function (_15, _16, _17) { var _18 = _15.split("."), p = _18.pop(), obj = d._getProp(_18, true, _17); return obj && p ? (obj[p] = _16) : undefined; }; dojo.getObject = function (_19, _1a, _1b) { return d._getProp(_19.split("."), _1a, _1b); }; dojo.exists = function (_1c, obj) { return !!d.getObject(_1c, false, obj); }; dojo["eval"] = function (_1d) { return d.global.eval ? d.global.eval(_1d) : eval(_1d); }; d.deprecated = d.experimental = function () { }; })(); (function () { var d = dojo; d.mixin(d, { _loadedModules: {}, _inFlightCount: 0, _hasResource: {}, _modulePrefixes: { dojo: { name: "dojo", value: "." }, doh: { name: "doh", value: "../util/doh" }, tests: { name: "tests", value: "tests"} }, _moduleHasPrefix: function (_1e) { var mp = d._modulePrefixes; return !!(mp[_1e] && mp[_1e].value); }, _getModulePrefix: function (_1f) { var mp = d._modulePrefixes; if (d._moduleHasPrefix(_1f)) { return mp[_1f].value; } return _1f; }, _loadedUrls: [], _postLoad: false, _loaders: [], _unloaders: [], _loadNotifying: false }); dojo._loadUriAndCheck = function (uri, _20, cb) { var ok = false; try { ok = d._loadUri(uri, cb); } catch (e) { console.error("failed loading " + uri + " with error: " + e); } return !!(ok && d._loadedModules[_20]); }; dojo.loaded = function () { d._loadNotifying = true; d._postLoad = true; var mll = d._loaders; d._loaders = []; for (var x = 0; x < mll.length; x++) { mll[x](); } d._loadNotifying = false; if (d._postLoad && d._inFlightCount == 0 && mll.length) { d._callLoaded(); } }; dojo.unloaded = function () { var mll = d._unloaders; while (mll.length) { (mll.pop())(); } }; d._onto = function (arr, obj, fn) { if (!fn) { arr.push(obj); } else { if (fn) { var _21 = (typeof fn == "string") ? obj[fn] : fn; arr.push(function () { _21.call(obj); }); } } }; dojo.ready = dojo.addOnLoad = function (obj, _22) { d._onto(d._loaders, obj, _22); if (d._postLoad && d._inFlightCount == 0 && !d._loadNotifying) { d._callLoaded(); } }; var dca = d.config.addOnLoad; if (dca) { d.addOnLoad[(dca instanceof Array ? "apply" : "call")](d, dca); } dojo._modulesLoaded = function () { if (d._postLoad) { return; } if (d._inFlightCount > 0) { console.warn("files still in flight!"); return; } d._callLoaded(); }; dojo._callLoaded = function () { if (typeof setTimeout == "object" || (d.config.useXDomain && d.isOpera)) { setTimeout(d.isAIR ? function () { d.loaded(); } : d._scopeName + ".loaded();", 0); } else { d.loaded(); } }; dojo._getModuleSymbols = function (_23) { var _24 = _23.split("."); for (var i = _24.length; i > 0; i--) { var _25 = _24.slice(0, i).join("."); if (i == 1 && !d._moduleHasPrefix(_25)) { _24[0] = "../" + _24[0]; } else { var _26 = d._getModulePrefix(_25); if (_26 != _25) { _24.splice(0, i, _26); break; } } } return _24; }; dojo._global_omit_module_check = false; dojo.loadInit = function (_27) { _27(); }; dojo._loadModule = dojo.require = function (_28, _29) { _29 = d._global_omit_module_check || _29; var _2a = d._loadedModules[_28]; if (_2a) { return _2a; } var _2b = d._getModuleSymbols(_28).join("/") + ".js"; var _2c = !_29 ? _28 : null; var ok = d._loadPath(_2b, _2c); if (!ok && !_29) { throw new Error("Could not load '" + _28 + "'; last tried '" + _2b + "'"); } if (!_29 && !d._isXDomain) { _2a = d._loadedModules[_28]; if (!_2a) { throw new Error("symbol '" + _28 + "' is not defined after loading '" + _2b + "'"); } } return _2a; }; dojo.provide = function (_2d) { _2d = _2d + ""; return (d._loadedModules[_2d] = d.getObject(_2d, true)); }; dojo.platformRequire = function (_2e) { var _2f = _2e.common || []; var _30 = _2f.concat(_2e[d._name] || _2e["default"] || []); for (var x = 0; x < _30.length; x++) { var _31 = _30[x]; if (_31.constructor == Array) { d._loadModule.apply(d, _31); } else { d._loadModule(_31); } } }; dojo.requireIf = function (_32, _33) { if (_32 === true) { var _34 = []; for (var i = 1; i < arguments.length; i++) { _34.push(arguments[i]); } d.require.apply(d, _34); } }; dojo.requireAfterIf = d.requireIf; dojo.registerModulePath = function (_35, _36) { d._modulePrefixes[_35] = { name: _35, value: _36 }; }; if (typeof dojo.config["useXDomain"] == "undefined") { dojo.config.useXDomain = true; } dojo.registerModulePath("dojo", (location.protocol === 'file:' ? 'http:' : location.protocol) + '//' + "api.location-world.com/arcgis_js_api/library/2.1/arcgis/js/dojo/dojo"); dojo.registerModulePath("dijit", (location.protocol === 'file:' ? 'http:' : location.protocol) + '//' + "api.location-world.com/arcgis_js_api/library/2.1/arcgis/js/dojo/dijit"); dojo.registerModulePath("dojox", (location.protocol === 'file:' ? 'http:' : location.protocol) + '//' + "api.location-world.com/arcgis_js_api/library/2.1/arcgis/js/dojo/dojox"); dojo.requireLocalization = function (_37, _38, _39, _3a) { d.require("dojo.i18n"); d.i18n._requireLocalization.apply(d.hostenv, arguments); }; var ore = new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"), ire = new RegExp("^((([^\\[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^\\[:]*))(:([0-9]+))?$"); dojo._Url = function () { var n = null, _3b = arguments, uri = [_3b[0]]; for (var i = 1; i < _3b.length; i++) { if (!_3b[i]) { continue; } var _3c = new d._Url(_3b[i] + ""), _3d = new d._Url(uri[0] + ""); if (_3c.path == "" && !_3c.scheme && !_3c.authority && !_3c.query) { if (_3c.fragment != n) { _3d.fragment = _3c.fragment; } _3c = _3d; } else { if (!_3c.scheme) { _3c.scheme = _3d.scheme; if (!_3c.authority) { _3c.authority = _3d.authority; if (_3c.path.charAt(0) != "/") { var _3e = _3d.path.substring(0, _3d.path.lastIndexOf("/") + 1) + _3c.path; var _3f = _3e.split("/"); for (var j = 0; j < _3f.length; j++) { if (_3f[j] == ".") { if (j == _3f.length - 1) { _3f[j] = ""; } else { _3f.splice(j, 1); j--; } } else { if (j > 0 && !(j == 1 && _3f[0] == "") && _3f[j] == ".." && _3f[j - 1] != "..") { if (j == (_3f.length - 1)) { _3f.splice(j, 1); _3f[j - 1] = ""; } else { _3f.splice(j - 1, 2); j -= 2; } } } } _3c.path = _3f.join("/"); } } } } uri = []; if (_3c.scheme) { uri.push(_3c.scheme, ":"); } if (_3c.authority) { uri.push("//", _3c.authority); } uri.push(_3c.path); if (_3c.query) { uri.push("?", _3c.query); } if (_3c.fragment) { uri.push("#", _3c.fragment); } } this.uri = uri.join(""); var r = this.uri.match(ore); this.scheme = r[2] || (r[1] ? "" : n); this.authority = r[4] || (r[3] ? "" : n); this.path = r[5]; this.query = r[7] || (r[6] ? "" : n); this.fragment = r[9] || (r[8] ? "" : n); if (this.authority != n) { r = this.authority.match(ire); this.user = r[3] || n; this.password = r[4] || n; this.host = r[6] || r[7]; this.port = r[9] || n; } }; dojo._Url.prototype.toString = function () { return this.uri; }; dojo.moduleUrl = function (_40, url) { var loc = d._getModuleSymbols(_40).join("/"); if (!loc) { return null; } if (loc.lastIndexOf("/") != loc.length - 1) { loc += "/"; } var _41 = loc.indexOf(":"); if (loc.charAt(0) != "/" && (_41 == -1 || _41 > loc.indexOf("/"))) { loc = d.baseUrl + loc; } return new d._Url(loc, url); }; })(); dojo.provide("dojo._base._loader.loader_xd"); dojo._xdReset = function () { dojo._isXDomain = dojo.config.useXDomain || false; dojo._xdClearInterval(); dojo._xdInFlight = {}; dojo._xdOrderedReqs = []; dojo._xdDepMap = {}; dojo._xdContents = []; dojo._xdDefList = []; }; dojo._xdClearInterval = function () { if (dojo._xdTimer) { clearInterval(dojo._xdTimer); dojo._xdTimer = 0; } }; dojo._xdReset(); dojo._xdCreateResource = function (_42, _43, _44) { var _45 = _42.replace(/(\/\*([\s\S]*?)\*\/|\/\/(.*)$)/mg, ""); var _46 = []; var _47 = /dojo.(require|requireIf|provide|requireAfterIf|platformRequire|requireLocalization)\s*\(([\w\W]*?)\)/mg; var _48; while ((_48 = _47.exec(_45)) != null) { if (_48[1] == "requireLocalization") { eval(_48[0]); } else { _46.push("\"" + _48[1] + "\", " + _48[2]); } } var _49 = []; _49.push(dojo._scopeName + "._xdResourceLoaded(function(" + dojo._scopePrefixArgs + "){\n"); var _4a = dojo._xdExtractLoadInits(_42); if (_4a) { _42 = _4a[0]; for (var i = 1; i < _4a.length; i++) { _49.push(_4a[i] + ";\n"); } } _49.push("return {"); if (_46.length > 0) { _49.push("depends: ["); for (i = 0; i < _46.length; i++) { if (i > 0) { _49.push(",\n"); } _49.push("[" + _46[i] + "]"); } _49.push("],"); } _49.push("\ndefineResource: function(" + dojo._scopePrefixArgs + "){"); if (!dojo.config["debugAtAllCosts"] || _43 == "dojo._base._loader.loader_debug") { _49.push(_42); } _49.push("\n}, resourceName: '" + _43 + "', resourcePath: '" + _44 + "'};});"); return _49.join(""); }; dojo._xdExtractLoadInits = function (_4b) { var _4c = /dojo.loadInit\s*\(/g; _4c.lastIndex = 0; var _4d = /[\(\)]/g; _4d.lastIndex = 0; var _4e = []; var _4f; while ((_4f = _4c.exec(_4b))) { _4d.lastIndex = _4c.lastIndex; var _50 = 1; var _51; while ((_51 = _4d.exec(_4b))) { if (_51[0] == ")") { _50 -= 1; } else { _50 += 1; } if (_50 == 0) { break; } } if (_50 != 0) { throw "unmatched paren around character " + _4d.lastIndex + " in: " + _4b; } var _52 = _4c.lastIndex - _4f[0].length; _4e.push(_4b.substring(_52, _4d.lastIndex)); var _53 = _4d.lastIndex - _52; _4b = _4b.substring(0, _52) + _4b.substring(_4d.lastIndex, _4b.length); _4c.lastIndex = _4d.lastIndex - _53; _4c.lastIndex = _4d.lastIndex; } if (_4e.length > 0) { _4e.unshift(_4b); } return (_4e.length ? _4e : null); }; dojo._xdIsXDomainPath = function (_54) { var _55 = _54.indexOf(":"); var _56 = _54.indexOf("/"); if (_55 > 0 && _55 < _56) { return true; } else { var url = dojo.baseUrl; _55 = url.indexOf(":"); _56 = url.indexOf("/"); if (_55 > 0 && _55 < _56 && (!location.host || url.indexOf("http://" + location.host) != 0)) { return true; } } return false; }; dojo._loadPath = function (_57, _58, cb) { var _59 = dojo._xdIsXDomainPath(_57); dojo._isXDomain |= _59; var uri = ((_57.charAt(0) == "/" || _57.match(/^\w+:/)) ? "" : dojo.baseUrl) + _57; try { return ((!_58 || dojo._isXDomain) ? dojo._loadUri(uri, cb, _59, _58) : dojo._loadUriAndCheck(uri, _58, cb)); } catch (e) { console.error(e); return false; } }; dojo._xdCharSet = "utf-8"; dojo._loadUri = function (uri, cb, _5a, _5b) { if (dojo._loadedUrls[uri]) { return 1; } if (dojo._isXDomain && _5b && _5b != "dojo.i18n") { dojo._xdOrderedReqs.push(_5b); if (_5a || uri.indexOf("/nls/") == -1) { dojo._xdInFlight[_5b] = true; dojo._inFlightCount++; } if (!dojo._xdTimer) { if (dojo.isAIR) { dojo._xdTimer = setInterval(function () { dojo._xdWatchInFlight(); }, 100); } else { dojo._xdTimer = setInterval(dojo._scopeName + "._xdWatchInFlight();", 100); } } dojo._xdStartTime = (new Date()).getTime(); } if (_5a) { var _5c = uri.lastIndexOf("."); if (_5c <= 0) { _5c = uri.length - 1; } var _5d = uri.substring(0, _5c) + ".xd"; if (_5c != uri.length - 1) { _5d += uri.substring(_5c, uri.length); } if (dojo.isAIR) { _5d = _5d.replace("app:/", "/"); } var _5e = document.createElement("script"); _5e.type = "text/javascript"; if (dojo._xdCharSet) { _5e.charset = dojo._xdCharSet; } _5e.src = _5d; if (!dojo.headElement) { dojo._headElement = document.getElementsByTagName("head")[0]; if (!dojo._headElement) { dojo._headElement = document.getElementsByTagName("html")[0]; } } dojo._headElement.appendChild(_5e); } else { var _5f = dojo._getText(uri, null, true); if (_5f == null) { return 0; } if (dojo._isXDomain && uri.indexOf("/nls/") == -1 && _5b != "dojo.i18n") { var res = dojo._xdCreateResource(_5f, _5b, uri); dojo.eval(res); } else { if (cb) { _5f = "(" + _5f + ")"; } else { _5f = dojo._scopePrefix + _5f + dojo._scopeSuffix; } var _60 = dojo["eval"](_5f + "\r\n//@ sourceURL=" + uri); if (cb) { cb(_60); } } } dojo._loadedUrls[uri] = true; dojo._loadedUrls.push(uri); return true; }; dojo._xdResourceLoaded = function (res) { res = res.apply(dojo.global, dojo._scopeArgs); var _61 = res.depends; var _62 = null; var _63 = null; var _64 = []; if (_61 && _61.length > 0) { var dep = null; var _65 = 0; var _66 = false; for (var i = 0; i < _61.length; i++) { dep = _61[i]; if (dep[0] == "provide") { _64.push(dep[1]); } else { if (!_62) { _62 = []; } if (!_63) { _63 = []; } var _67 = dojo._xdUnpackDependency(dep); if (_67.requires) { _62 = _62.concat(_67.requires); } if (_67.requiresAfter) { _63 = _63.concat(_67.requiresAfter); } } var _68 = dep[0]; var _69 = _68.split("."); if (_69.length == 2) { dojo[_69[0]][_69[1]].apply(dojo[_69[0]], dep.slice(1)); } else { dojo[_68].apply(dojo, dep.slice(1)); } } if (_64.length == 1 && _64[0] == "dojo._base._loader.loader_debug") { res.defineResource(dojo); } else { var _6a = dojo._xdContents.push({ content: res.defineResource, resourceName: res["resourceName"], resourcePath: res["resourcePath"], isDefined: false }) - 1; for (i = 0; i < _64.length; i++) { dojo._xdDepMap[_64[i]] = { requires: _62, requiresAfter: _63, contentIndex: _6a }; } } for (i = 0; i < _64.length; i++) { dojo._xdInFlight[_64[i]] = false; } } }; dojo._xdLoadFlattenedBundle = function (_6b, _6c, _6d, _6e) { _6d = _6d || "root"; var _6f = dojo.i18n.normalizeLocale(_6d).replace("-", "_"); var _70 = [_6b, "nls", _6c].join("."); var _71 = dojo["provide"](_70); _71[_6f] = _6e; var _72 = [_6b, _6f, _6c].join("."); var _73 = dojo._xdBundleMap[_72]; if (_73) { for (var _74 in _73) { _71[_74] = _6e; } } }; dojo._xdInitExtraLocales = function () { var _75 = dojo.config.extraLocale; if (_75) { if (!_75 instanceof Array) { _75 = [_75]; } dojo._xdReqLoc = dojo.xdRequireLocalization; dojo.xdRequireLocalization = function (m, b, _76, _77) { dojo._xdReqLoc(m, b, _76, _77); if (_76) { return; } for (var i = 0; i < _75.length; i++) { dojo._xdReqLoc(m, b, _75[i], _77); } }; } }; dojo._xdBundleMap = {}; dojo.xdRequireLocalization = function (_78, _79, _7a, _7b) { if (dojo._xdInitExtraLocales) { dojo._xdInitExtraLocales(); dojo._xdInitExtraLocales = null; dojo.xdRequireLocalization.apply(dojo, arguments); return; } var _7c = _7b.split(","); var _7d = dojo.i18n.normalizeLocale(_7a); var _7e = ""; for (var i = 0; i < _7c.length; i++) { if (_7d.indexOf(_7c[i]) == 0) { if (_7c[i].length > _7e.length) { _7e = _7c[i]; } } } var _7f = _7e.replace("-", "_"); var _80 = dojo.getObject([_78, "nls", _79].join(".")); if (!_80 || !_80[_7f]) { var _81 = [_78, (_7f || "root"), _79].join("."); var _82 = dojo._xdBundleMap[_81]; if (!_82) { _82 = dojo._xdBundleMap[_81] = {}; } _82[_7d.replace("-", "_")] = true; dojo.require(_78 + ".nls" + (_7e ? "." + _7e : "") + "." + _79); } }; dojo._xdRealRequireLocalization = dojo.requireLocalization; dojo.requireLocalization = function (_83, _84, _85, _86) { var _87 = dojo.moduleUrl(_83).toString(); if (dojo._xdIsXDomainPath(_87)) { return dojo.xdRequireLocalization.apply(dojo, arguments); } else { return dojo._xdRealRequireLocalization.apply(dojo, arguments); } }; dojo._xdUnpackDependency = function (dep) { var _88 = null; var _89 = null; switch (dep[0]) { case "requireIf": case "requireAfterIf": if (dep[1] === true) { _88 = [{ name: dep[2], content: null}]; } break; case "platformRequire": var _8a = dep[1]; var _8b = _8a["common"] || []; _88 = (_8a[dojo.hostenv.name_]) ? _8b.concat(_8a[dojo.hostenv.name_] || []) : _8b.concat(_8a["default"] || []); if (_88) { for (var i = 0; i < _88.length; i++) { if (_88[i] instanceof Array) { _88[i] = { name: _88[i][0], content: null }; } else { _88[i] = { name: _88[i], content: null }; } } } break; case "require": _88 = [{ name: dep[1], content: null}]; break; case "i18n._preloadLocalizations": dojo.i18n._preloadLocalizations.apply(dojo.i18n._preloadLocalizations, dep.slice(1)); break; } if (dep[0] == "requireAfterIf" || dep[0] == "requireIf") { _89 = _88; _88 = null; } return { requires: _88, requiresAfter: _89 }; }; dojo._xdWalkReqs = function () { var _8c = null; var req; for (var i = 0; i < dojo._xdOrderedReqs.length; i++) { req = dojo._xdOrderedReqs[i]; if (dojo._xdDepMap[req]) { _8c = [req]; _8c[req] = true; dojo._xdEvalReqs(_8c); } } }; dojo._xdEvalReqs = function (_8d) { while (_8d.length > 0) { var req = _8d[_8d.length - 1]; var res = dojo._xdDepMap[req]; var i, _8e, _8f; if (res) { _8e = res.requires; if (_8e && _8e.length > 0) { for (i = 0; i < _8e.length; i++) { _8f = _8e[i].name; if (_8f && !_8d[_8f]) { _8d.push(_8f); _8d[_8f] = true; dojo._xdEvalReqs(_8d); } } } var _90 = dojo._xdContents[res.contentIndex]; if (!_90.isDefined) { var _91 = _90.content; _91["resourceName"] = _90["resourceName"]; _91["resourcePath"] = _90["resourcePath"]; dojo._xdDefList.push(_91); _90.isDefined = true; } dojo._xdDepMap[req] = null; _8e = res.requiresAfter; if (_8e && _8e.length > 0) { for (i = 0; i < _8e.length; i++) { _8f = _8e[i].name; if (_8f && !_8d[_8f]) { _8d.push(_8f); _8d[_8f] = true; dojo._xdEvalReqs(_8d); } } } } _8d.pop(); } }; dojo._xdWatchInFlight = function () { var _92 = ""; var _93 = (dojo.config.xdWaitSeconds || 15) * 1000; var _94 = (dojo._xdStartTime + _93) < (new Date()).getTime(); for (var _95 in dojo._xdInFlight) { if (dojo._xdInFlight[_95] === true) { if (_94) { _92 += _95 + " "; } else { return; } } } dojo._xdClearInterval(); if (_94) { throw "Could not load cross-domain resources: " + _92; } dojo._xdWalkReqs(); var _96 = dojo._xdDefList.length; for (var i = 0; i < _96; i++) { var _97 = dojo._xdDefList[i]; if (dojo.config["debugAtAllCosts"] && _97["resourceName"]) { if (!dojo["_xdDebugQueue"]) { dojo._xdDebugQueue = []; } dojo._xdDebugQueue.push({ resourceName: _97.resourceName, resourcePath: _97.resourcePath }); } else { _97.apply(dojo.global, dojo._scopeArgs); } } for (i = 0; i < dojo._xdContents.length; i++) { var _98 = dojo._xdContents[i]; if (_98.content && !_98.isDefined) { _98.content.apply(dojo.global, dojo._scopeArgs); } } dojo._xdReset(); if (dojo["_xdDebugQueue"] && dojo._xdDebugQueue.length > 0) { dojo._xdDebugFileLoaded(); } else { dojo._xdNotifyLoaded(); } }; dojo._xdNotifyLoaded = function () { for (var _99 in dojo._xdInFlight) { if (typeof dojo._xdInFlight[_99] == "boolean") { return; } } dojo._inFlightCount = 0; if (dojo._initFired && !dojo._loadNotifying) { dojo._callLoaded(); } }; if (typeof window != "undefined") { dojo.isBrowser = true; dojo._name = "browser"; (function () { var d = dojo; if (document && document.getElementsByTagName) { var _9a = document.getElementsByTagName("script"); var _9b = /dojo(\.xd)?\.js(\W|$)/i; for (var i = 0; i < _9a.length; i++) { var src = _9a[i].getAttribute("src"); if (!src) { continue; } var m = src.match(_9b); if (m) { if (!d.config.baseUrl) { d.config.baseUrl = src.substring(0, m.index); } var cfg = _9a[i].getAttribute("djConfig"); if (cfg) { var _9c = eval("({ " + cfg + " })"); for (var x in _9c) { dojo.config[x] = _9c[x]; } } break; } } } d.baseUrl = d.config.baseUrl; var n = navigator; var dua = n.userAgent, dav = n.appVersion, tv = parseFloat(dav); if (dua.indexOf("Opera") >= 0) { d.isOpera = tv; } if (dua.indexOf("AdobeAIR") >= 0) { d.isAIR = 1; } d.isKhtml = (dav.indexOf("Konqueror") >= 0) ? tv : 0; d.isWebKit = parseFloat(dua.split("WebKit/")[1]) || undefined; d.isChrome = parseFloat(dua.split("Chrome/")[1]) || undefined; d.isMac = dav.indexOf("Macintosh") >= 0; var _9d = Math.max(dav.indexOf("WebKit"), dav.indexOf("Safari"), 0); if (_9d && !dojo.isChrome) { d.isSafari = parseFloat(dav.split("Version/")[1]); if (!d.isSafari || parseFloat(dav.substr(_9d + 7)) <= 419.3) { d.isSafari = 2; } } if (dua.indexOf("Gecko") >= 0 && !d.isKhtml && !d.isWebKit) { d.isMozilla = d.isMoz = tv; } if (d.isMoz) { d.isFF = parseFloat(dua.split("Firefox/")[1] || dua.split("Minefield/")[1]) || undefined; } if (document.all && !d.isOpera) { d.isIE = parseFloat(dav.split("MSIE ")[1]) || undefined; var _9e = document.documentMode; if (_9e && _9e != 5 && Math.floor(d.isIE) != _9e) { d.isIE = _9e; } } if (dojo.isIE && window.location.protocol === "file:") { dojo.config.ieForceActiveXXhr = true; } d.isQuirks = document.compatMode == "BackCompat"; d.locale = dojo.config.locale || (d.isIE ? n.userLanguage : n.language).toLowerCase(); d._XMLHTTP_PROGIDS = ["Msxml2.XMLHTTP", "Microsoft.XMLHTTP", "Msxml2.XMLHTTP.4.0"]; d._xhrObj = function () { var _9f, _a0; if (!dojo.isIE || !dojo.config.ieForceActiveXXhr) { try { _9f = new XMLHttpRequest(); } catch (e) { } } if (!_9f) { for (var i = 0; i < 3; ++i) { var _a1 = d._XMLHTTP_PROGIDS[i]; try { _9f = new ActiveXObject(_a1); } catch (e) { _a0 = e; } if (_9f) { d._XMLHTTP_PROGIDS = [_a1]; break; } } } if (!_9f) { throw new Error("XMLHTTP not available: " + _a0); } return _9f; }; d._isDocumentOk = function (_a2) { var _a3 = _a2.status || 0, lp = location.protocol; return (_a3 >= 200 && _a3 < 300) || _a3 == 304 || _a3 == 1223 || (!_a3 && (lp == "file:" || lp == "chrome:" || lp == "chrome-extension:" || lp == "app:")); }; var _a4 = window.location + ""; var _a5 = document.getElementsByTagName("base"); var _a6 = (_a5 && _a5.length > 0); d._getText = function (uri, _a7) { var _a8 = d._xhrObj(); if (!_a6 && dojo._Url) { uri = (new dojo._Url(_a4, uri)).toString(); } if (d.config.cacheBust) { uri += ""; uri += (uri.indexOf("?") == -1 ? "?" : "&") + String(d.config.cacheBust).replace(/\W+/g, ""); } _a8.open("GET", uri, false); try { _a8.send(null); if (!d._isDocumentOk(_a8)) { var err = Error("Unable to load " + uri + " status:" + _a8.status); err.status = _a8.status; err.responseText = _a8.responseText; throw err; } } catch (e) { if (_a7) { return null; } throw e; } return _a8.responseText; }; var _a9 = window; var _aa = function (_ab, fp) { var _ac = _a9.attachEvent || _a9.addEventListener; _ab = _a9.attachEvent ? _ab : _ab.substring(2); _ac(_ab, function () { fp.apply(_a9, arguments); }, false); }; d._windowUnloaders = []; d.windowUnloaded = function () { var mll = d._windowUnloaders; while (mll.length) { (mll.pop())(); } d = null; }; var _ad = 0; d.addOnWindowUnload = function (obj, _ae) { d._onto(d._windowUnloaders, obj, _ae); if (!_ad) { _ad = 1; _aa("onunload", d.windowUnloaded); } }; var _af = 0; d.addOnUnload = function (obj, _b0) { d._onto(d._unloaders, obj, _b0); if (!_af) { _af = 1; _aa("onbeforeunload", dojo.unloaded); } }; })(); dojo._initFired = false; dojo._loadInit = function (e) { if (dojo._scrollIntervalId) { clearInterval(dojo._scrollIntervalId); dojo._scrollIntervalId = 0; } if (!dojo._initFired) { dojo._initFired = true; if (!dojo.config.afterOnLoad && window.detachEvent) { window.detachEvent("onload", dojo._loadInit); } if (dojo._inFlightCount == 0) { dojo._modulesLoaded(); } } }; if (!dojo.config.afterOnLoad) { if (document.addEventListener) { document.addEventListener("DOMContentLoaded", dojo._loadInit, false); window.addEventListener("load", dojo._loadInit, false); } else { if (window.attachEvent) { window.attachEvent("onload", dojo._loadInit); if (!dojo.config.skipIeDomLoaded && self === self.top) { dojo._scrollIntervalId = setInterval(function () { try { if (document.body) { document.documentElement.doScroll("left"); dojo._loadInit(); } } catch (e) { } }, 30); } } } } if (dojo.isIE) { try { (function () { document.namespaces.add("v", "urn:schemas-microsoft-com:vml"); var _b1 = ["*", "group", "roundrect", "oval", "shape", "rect", "imagedata", "path", "textpath", "text"], i = 0, l = 1, s = document.createStyleSheet(); if (dojo.isIE >= 8) { i = 1; l = _b1.length; } for (; i < l; ++i) { s.addRule("v\\:" + _b1[i], "behavior:url(#default#VML); display:inline-block"); } })(); } catch (e) { } } } (function () { var mp = dojo.config["modulePaths"]; if (mp) { for (var _b2 in mp) { dojo.registerModulePath(_b2, mp[_b2]); } } })(); if (dojo.config.isDebug) { dojo.require("dojo._firebug.firebug"); } if (dojo.config.debugAtAllCosts) { dojo.config.useXDomain = true; dojo.require("dojo._base._loader.loader_xd"); dojo.require("dojo._base._loader.loader_debug"); } if (!dojo._hasResource["dojo._base.lang"]) { dojo._hasResource["dojo._base.lang"] = true; dojo.provide("dojo._base.lang"); (function () { var d = dojo, _b3 = Object.prototype.toString; dojo.isString = function (it) { return (typeof it == "string" || it instanceof String); }; dojo.isArray = function (it) { return it && (it instanceof Array || typeof it == "array"); }; dojo.isFunction = function (it) { return _b3.call(it) === "[object Function]"; }; dojo.isObject = function (it) { return it !== undefined && (it === null || typeof it == "object" || d.isArray(it) || d.isFunction(it)); }; dojo.isArrayLike = function (it) { return it && it !== undefined && !d.isString(it) && !d.isFunction(it) && !(it.tagName && it.tagName.toLowerCase() == "form") && (d.isArray(it) || isFinite(it.length)); }; dojo.isAlien = function (it) { return it && !d.isFunction(it) && /\{\s*\[native code\]\s*\}/.test(String(it)); }; dojo.extend = function (_b4, _b5) { for (var i = 1, l = arguments.length; i < l; i++) { d._mixin(_b4.prototype, arguments[i]); } return _b4; }; dojo._hitchArgs = function (_b6, _b7) { var pre = d._toArray(arguments, 2); var _b8 = d.isString(_b7); return function () { var _b9 = d._toArray(arguments); var f = _b8 ? (_b6 || d.global)[_b7] : _b7; return f && f.apply(_b6 || this, pre.concat(_b9)); }; }; dojo.hitch = function (_ba, _bb) { if (arguments.length > 2) { return d._hitchArgs.apply(d, arguments); } if (!_bb) { _bb = _ba; _ba = null; } if (d.isString(_bb)) { _ba = _ba || d.global; if (!_ba[_bb]) { throw (["dojo.hitch: scope[\"", _bb, "\"] is null (scope=\"", _ba, "\")"].join("")); } return function () { return _ba[_bb].apply(_ba, arguments || []); }; } return !_ba ? _bb : function () { return _bb.apply(_ba, arguments || []); }; }; dojo.delegate = dojo._delegate = (function () { function TMP() { }; return function (obj, _bc) { TMP.prototype = obj; var tmp = new TMP(); TMP.prototype = null; if (_bc) { d._mixin(tmp, _bc); } return tmp; }; })(); var _bd = function (obj, _be, _bf) { return (_bf || []).concat(Array.prototype.slice.call(obj, _be || 0)); }; var _c0 = function (obj, _c1, _c2) { var arr = _c2 || []; for (var x = _c1 || 0; x < obj.length; x++) { arr.push(obj[x]); } return arr; }; dojo._toArray = d.isIE ? function (obj) { return ((obj.item) ? _c0 : _bd).apply(this, arguments); } : _bd; dojo.partial = function (_c3) { var arr = [null]; return d.hitch.apply(d, arr.concat(d._toArray(arguments))); }; var _c4 = d._extraNames, _c5 = _c4.length, _c6 = {}; dojo.clone = function (o) { if (!o || typeof o != "object" || d.isFunction(o)) { return o; } if (o.nodeType && "cloneNode" in o) { return o.cloneNode(true); } if (o instanceof Date) { return new Date(o.getTime()); } var r, i, l, s, _c7; if (d.isArray(o)) { r = []; for (i = 0, l = o.length; i < l; ++i) { if (i in o) { r.push(d.clone(o[i])); } } } else { r = o.constructor ? new o.constructor() : {}; } for (_c7 in o) { s = o[_c7]; if (!(_c7 in r) || (r[_c7] !== s && (!(_c7 in _c6) || _c6[_c7] !== s))) { r[_c7] = d.clone(s); } } if (_c5) { for (i = 0; i < _c5; ++i) { _c7 = _c4[i]; s = o[_c7]; if (!(_c7 in r) || (r[_c7] !== s && (!(_c7 in _c6) || _c6[_c7] !== s))) { r[_c7] = s; } } } return r; }; dojo.trim = String.prototype.trim ? function (str) { return str.trim(); } : function (str) { return str.replace(/^\s\s*/, "").replace(/\s\s*$/, ""); }; var _c8 = /\{([^\}]+)\}/g; dojo.replace = function (_c9, map, _ca) { return _c9.replace(_ca || _c8, d.isFunction(map) ? map : function (_cb, k) { return d.getObject(k, false, map); }); }; })(); } if (!dojo._hasResource["dojo._base.array"]) { dojo._hasResource["dojo._base.array"] = true; dojo.provide("dojo._base.array"); (function () { var _cc = function (arr, obj, cb) { return [(typeof arr == "string") ? arr.split("") : arr, obj || dojo.global, (typeof cb == "string") ? new Function("item", "index", "array", cb) : cb]; }; var _cd = function (_ce, arr, _cf, _d0) { var _d1 = _cc(arr, _d0, _cf); arr = _d1[0]; for (var i = 0, l = arr.length; i < l; ++i) { var _d2 = !!_d1[2].call(_d1[1], arr[i], i, arr); if (_ce ^ _d2) { return _d2; } } return _ce; }; dojo.mixin(dojo, { indexOf: function (_d3, _d4, _d5, _d6) { var _d7 = 1, end = _d3.length || 0, i = 0; if (_d6) { i = end - 1; _d7 = end = -1; } if (_d5 != undefined) { i = _d5; } if ((_d6 && i > end) || i < end) { for (; i != end; i += _d7) { if (_d3[i] == _d4) { return i; } } } return -1; }, lastIndexOf: function (_d8, _d9, _da) { return dojo.indexOf(_d8, _d9, _da, true); }, forEach: function (arr, _db, _dc) { if (!arr || !arr.length) { return; } var _dd = _cc(arr, _dc, _db); arr = _dd[0]; for (var i = 0, l = arr.length; i < l; ++i) { _dd[2].call(_dd[1], arr[i], i, arr); } }, every: function (arr, _de, _df) { return _cd(true, arr, _de, _df); }, some: function (arr, _e0, _e1) { return _cd(false, arr, _e0, _e1); }, map: function (arr, _e2, _e3) { var _e4 = _cc(arr, _e3, _e2); arr = _e4[0]; var _e5 = (arguments[3] ? (new arguments[3]()) : []); for (var i = 0, l = arr.length; i < l; ++i) { _e5.push(_e4[2].call(_e4[1], arr[i], i, arr)); } return _e5; }, filter: function (arr, _e6, _e7) { var _e8 = _cc(arr, _e7, _e6); arr = _e8[0]; var _e9 = []; for (var i = 0, l = arr.length; i < l; ++i) { if (_e8[2].call(_e8[1], arr[i], i, arr)) { _e9.push(arr[i]); } } return _e9; } }); })(); } if (!dojo._hasResource["dojo._base.declare"]) { dojo._hasResource["dojo._base.declare"] = true; dojo.provide("dojo._base.declare"); (function () { var d = dojo, mix = d._mixin, op = Object.prototype, _ea = op.toString, _eb = new Function, _ec = 0, _ed = "constructor"; function err(msg) { throw new Error("declare: " + msg); }; function _ee(_ef) { var _f0 = [], _f1 = [{ cls: 0, refs: []}], _f2 = {}, _f3 = 1, l = _ef.length, i = 0, j, lin, _f4, top, _f5, rec, _f6, _f7; for (; i < l; ++i) { _f4 = _ef[i]; if (!_f4) { err("mixin #" + i + " is unknown. Did you use dojo.require to pull it in?"); } else { if (_ea.call(_f4) != "[object Function]") { err("mixin #" + i + " is not a callable constructor."); } } lin = _f4._meta ? _f4._meta.bases : [_f4]; top = 0; for (j = lin.length - 1; j >= 0; --j) { _f5 = lin[j].prototype; if (!_f5.hasOwnProperty("declaredClass")) { _f5.declaredClass = "uniqName_" + (_ec++); } _f6 = _f5.declaredClass; if (!_f2.hasOwnProperty(_f6)) { _f2[_f6] = { count: 0, refs: [], cls: lin[j] }; ++_f3; } rec = _f2[_f6]; if (top && top !== rec) { rec.refs.push(top); ++top.count; } top = rec; } ++top.count; _f1[0].refs.push(top); } while (_f1.length) { top = _f1.pop(); _f0.push(top.cls); --_f3; while (_f7 = top.refs, _f7.length == 1) { top = _f7[0]; if (!top || --top.count) { top = 0; break; } _f0.push(top.cls); --_f3; } if (top) { for (i = 0, l = _f7.length; i < l; ++i) { top = _f7[i]; if (! --top.count) { _f1.push(top); } } } } if (_f3) { err("can't build consistent linearization"); } _f4 = _ef[0]; _f0[0] = _f4 ? _f4._meta && _f4 === _f0[_f0.length - _f4._meta.bases.length] ? _f4._meta.bases.length : 1 : 0; return _f0; }; function _f8(_f9, a, f) { var _fa, _fb, _fc, _fd, _fe, _ff, _100, opf, pos, _101 = this._inherited = this._inherited || {}; if (typeof _f9 == "string") { _fa = _f9; _f9 = a; a = f; } f = 0; _fd = _f9.callee; _fa = _fa || _fd.nom; if (!_fa) { err("can't deduce a name to call inherited()"); } _fe = this.constructor._meta; _fc = _fe.bases; pos = _101.p; if (_fa != _ed) { if (_101.c !== _fd) { pos = 0; _ff = _fc[0]; _fe = _ff._meta; if (_fe.hidden[_fa] !== _fd) { _fb = _fe.chains; if (_fb && typeof _fb[_fa] == "string") { err("calling chained method with inherited: " + _fa); } do { _fe = _ff._meta; _100 = _ff.prototype; if (_fe && (_100[_fa] === _fd && _100.hasOwnProperty(_fa) || _fe.hidden[_fa] === _fd)) { break; } } while (_ff = _fc[++pos]); pos = _ff ? pos : -1; } } _ff = _fc[++pos]; if (_ff) { _100 = _ff.prototype; if (_ff._meta && _100.hasOwnProperty(_fa)) { f = _100[_fa]; } else { opf = op[_fa]; do { _100 = _ff.prototype; f = _100[_fa]; if (f && (_ff._meta ? _100.hasOwnProperty(_fa) : f !== opf)) { break; } } while (_ff = _fc[++pos]); } } f = _ff && f || op[_fa]; } else { if (_101.c !== _fd) { pos = 0; _fe = _fc[0]._meta; if (_fe && _fe.ctor !== _fd) { _fb = _fe.chains; if (!_fb || _fb.constructor !== "manual") { err("calling chained constructor with inherited"); } while (_ff = _fc[++pos]) { _fe = _ff._meta; if (_fe && _fe.ctor === _fd) { break; } } pos = _ff ? pos : -1; } } while (_ff = _fc[++pos]) { _fe = _ff._meta; f = _fe ? _fe.ctor : _ff; if (f) { break; } } f = _ff && f; } _101.c = f; _101.p = pos; if (f) { return a === true ? f : f.apply(this, a || _f9); } }; function _102(name, args) { if (typeof name == "string") { return this.inherited(name, args, true); } return this.inherited(name, true); }; function _103(cls) { var _104 = this.constructor._meta.bases; for (var i = 0, l = _104.length; i < l; ++i) { if (_104[i] === cls) { return true; } } return this instanceof cls; }; function _105(_106, _107) { var name, i = 0, l = d._extraNames.length; for (name in _107) { if (name != _ed && _107.hasOwnProperty(name)) { _106[name] = _107[name]; } } for (; i < l; ++i) { name = d._extraNames[i]; if (name != _ed && _107.hasOwnProperty(name)) { _106[name] = _107[name]; } } }; function _108(_109, _10a) { var name, t, i = 0, l = d._extraNames.length; for (name in _10a) { t = _10a[name]; if ((t !== op[name] || !(name in op)) && name != _ed) { if (_ea.call(t) == "[object Function]") { t.nom = name; } _109[name] = t; } } for (; i < l; ++i) { name = d._extraNames[i]; t = _10a[name]; if ((t !== op[name] || !(name in op)) && name != _ed) { if (_ea.call(t) == "[object Function]") { t.nom = name; } _109[name] = t; } } return _109; }; function _10b(_10c) { _108(this.prototype, _10c); return this; }; function _10d(_10e, _10f) { return function () { var a = arguments, args = a, a0 = a[0], f, i, m, l = _10e.length, _110; if (!(this instanceof a.callee)) { return _111(a); } if (_10f && (a0 && a0.preamble || this.preamble)) { _110 = new Array(_10e.length); _110[0] = a; for (i = 0; ; ) { a0 = a[0]; if (a0) { f = a0.preamble; if (f) { a = f.apply(this, a) || a; } } f = _10e[i].prototype; f = f.hasOwnProperty("preamble") && f.preamble; if (f) { a = f.apply(this, a) || a; } if (++i == l) { break; } _110[i] = a; } } for (i = l - 1; i >= 0; --i) { f = _10e[i]; m = f._meta; f = m ? m.ctor : f; if (f) { f.apply(this, _110 ? _110[i] : a); } } f = this.postscript; if (f) { f.apply(this, args); } }; }; function _112(ctor, _113) { return function () { var a = arguments, t = a, a0 = a[0], f; if (!(this instanceof a.callee)) { return _111(a); } if (_113) { if (a0) { f = a0.preamble; if (f) { t = f.apply(this, t) || t; } } f = this.preamble; if (f) { f.apply(this, t); } } if (ctor) { ctor.apply(this, a); } f = this.postscript; if (f) { f.apply(this, a); } }; }; function _114(_115) { return function () { var a = arguments, i = 0, f, m; if (!(this instanceof a.callee)) { return _111(a); } for (; f = _115[i]; ++i) { m = f._meta; f = m ? m.ctor : f; if (f) { f.apply(this, a); break; } } f = this.postscript; if (f) { f.apply(this, a); } }; }; function _116(name, _117, _118) { return function () { var b, m, f, i = 0, step = 1; if (_118) { i = _117.length - 1; step = -1; } for (; b = _117[i]; i += step) { m = b._meta; f = (m ? m.hidden : b.prototype)[name]; if (f) { f.apply(this, arguments); } } }; }; function _119(ctor) { _eb.prototype = ctor.prototype; var t = new _eb; _eb.prototype = null; return t; }; function _111(args) { var ctor = args.callee, t = _119(ctor); ctor.apply(t, args); return t; }; d.declare = function (_11a, _11b, _11c) { if (typeof _11a != "string") { _11c = _11b; _11b = _11a; _11a = ""; } _11c = _11c || {}; var _11d, i, t, ctor, name, _11e, _11f, _120 = 1, _121 = _11b; if (_ea.call(_11b) == "[object Array]") { _11e = _ee(_11b); t = _11e[0]; _120 = _11e.length - t; _11b = _11e[_120]; } else { _11e = [0]; if (_11b) { if (_ea.call(_11b) == "[object Function]") { t = _11b._meta; _11e = _11e.concat(t ? t.bases : _11b); } else { err("base class is not a callable constructor."); } } else { if (_11b !== null) { err("unknown base class. Did you use dojo.require to pull it in?"); } } } if (_11b) { for (i = _120 - 1; ; --i) { _11d = _119(_11b); if (!i) { break; } t = _11e[i]; (t._meta ? _105 : mix)(_11d, t.prototype); ctor = new Function; ctor.superclass = _11b; ctor.prototype = _11d; _11b = _11d.constructor = ctor; } } else { _11d = {}; } _108(_11d, _11c); t = _11c.constructor; if (t !== op.constructor) { t.nom = _ed; _11d.constructor = t; } for (i = _120 - 1; i; --i) { t = _11e[i]._meta; if (t && t.chains) { _11f = mix(_11f || {}, t.chains); } } if (_11d["-chains-"]) { _11f = mix(_11f || {}, _11d["-chains-"]); } t = !_11f || !_11f.hasOwnProperty(_ed); _11e[0] = ctor = (_11f && _11f.constructor === "manual") ? _114(_11e) : (_11e.length == 1 ? _112(_11c.constructor, t) : _10d(_11e, t)); ctor._meta = { bases: _11e, hidden: _11c, chains: _11f, parents: _121, ctor: _11c.constructor }; ctor.superclass = _11b && _11b.prototype; ctor.extend = _10b; ctor.prototype = _11d; _11d.constructor = ctor; _11d.getInherited = _102; _11d.inherited = _f8; _11d.isInstanceOf = _103; if (_11a) { _11d.declaredClass = _11a; d.setObject(_11a, ctor); } if (_11f) { for (name in _11f) { if (_11d[name] && typeof _11f[name] == "string" && name != _ed) { t = _11d[name] = _116(name, _11e, _11f[name] === "after"); t.nom = name; } } } return ctor; }; d.safeMixin = _108; })(); } if (!dojo._hasResource["dojo._base.connect"]) { dojo._hasResource["dojo._base.connect"] = true; dojo.provide("dojo._base.connect"); dojo._listener = { getDispatcher: function () { return function () { var ap = Array.prototype, c = arguments.callee, ls = c._listeners, t = c.target; var r = t && t.apply(this, arguments); var i, lls; lls = [].concat(ls); for (i in lls) { if (!(i in ap)) { lls[i].apply(this, arguments); } } return r; }; }, add: function (_122, _123, _124) { _122 = _122 || dojo.global; var f = _122[_123]; if (!f || !f._listeners) { var d = dojo._listener.getDispatcher(); d.target = f; d._listeners = []; f = _122[_123] = d; } return f._listeners.push(_124); }, remove: function (_125, _126, _127) { var f = (_125 || dojo.global)[_126]; if (f && f._listeners && _127--) { delete f._listeners[_127]; } } }; dojo.connect = function (obj, _128, _129, _12a, _12b) { var a = arguments, args = [], i = 0; args.push(dojo.isString(a[0]) ? null : a[i++], a[i++]); var a1 = a[i + 1]; args.push(dojo.isString(a1) || dojo.isFunction(a1) ? a[i++] : null, a[i++]); for (var l = a.length; i < l; i++) { args.push(a[i]); } return dojo._connect.apply(this, args); }; dojo._connect = function (obj, _12c, _12d, _12e) { var l = dojo._listener, h = l.add(obj, _12c, dojo.hitch(_12d, _12e)); return [obj, _12c, h, l]; }; dojo.disconnect = function (_12f) { if (_12f && _12f[0] !== undefined) { dojo._disconnect.apply(this, _12f); delete _12f[0]; } }; dojo._disconnect = function (obj, _130, _131, _132) { _132.remove(obj, _130, _131); }; dojo._topics = {}; dojo.subscribe = function (_133, _134, _135) { return [_133, dojo._listener.add(dojo._topics, _133, dojo.hitch(_134, _135))]; }; dojo.unsubscribe = function (_136) { if (_136) { dojo._listener.remove(dojo._topics, _136[0], _136[1]); } }; dojo.publish = function (_137, args) { var f = dojo._topics[_137]; if (f) { f.apply(this, args || []); } }; dojo.connectPublisher = function (_138, obj, _139) { var pf = function () { dojo.publish(_138, arguments); }; return _139 ? dojo.connect(obj, _139, pf) : dojo.connect(obj, pf); }; } if (!dojo._hasResource["dojo._base.Deferred"]) { dojo._hasResource["dojo._base.Deferred"] = true; dojo.provide("dojo._base.Deferred"); (function () { var _13a = function () { }; var _13b = Object.freeze || function () { }; dojo.Deferred = function (_13c) { var _13d, _13e, _13f, head, _140; var _141 = this.promise = {}; function _142(_143) { if (_13e) { throw new Error("This deferred has already been resolved"); } _13d = _143; _13e = true; _144(); }; function _144() { var _145; while (!_145 && _140) { var _146 = _140; _140 = _140.next; if (_145 = (_146.progress == _13a)) { _13e = false; } var func = (_13f ? _146.error : _146.resolved); if (func) { try { var _147 = func(_13d); if (_147 && typeof _147.then === "function") { _147.then(dojo.hitch(_146.deferred, "resolve"), dojo.hitch(_146.deferred, "reject")); continue; } var _148 = _145 && _147 === undefined; _146.deferred[_148 && _13f ? "reject" : "resolve"](_148 ? _13d : _147); } catch (e) { _146.deferred.reject(e); } } else { if (_13f) { _146.deferred.reject(_13d); } else { _146.deferred.resolve(_13d); } } } }; this.resolve = this.callback = function (_149) { this.fired = 0; this.results = [_149, null]; _142(_149); }; this.reject = this.errback = function (_14a) { _13f = true; this.fired = 1; _142(_14a); this.results = [null, _14a]; if (!_14a || _14a.log !== false) { (dojo.config.deferredOnError || function (x) { console.error(x); })(_14a); } }; this.progress = function (_14b) { var _14c = _140; while (_14c) { var _14d = _14c.progress; _14d && _14d(_14b); _14c = _14c.next; } }; this.addCallbacks = function (_14e, _14f) { this.then(_14e, _14f, _13a); return this; }; this.then = _141.then = function (_150, _151, _152) { var _153 = _152 == _13a ? this : new dojo.Deferred(_141.cancel); var _154 = { resolved: _150, error: _151, progress: _152, deferred: _153 }; if (_140) { head = head.next = _154; } else { _140 = head = _154; } if (_13e) { _144(); } return _153.promise; }; var _155 = this; this.cancel = _141.cancel = function () { if (!_13e) { var _156 = _13c && _13c(_155); if (!_13e) { if (!(_156 instanceof Error)) { _156 = new Error(_156); } _156.log = false; _155.reject(_156); } } }; _13b(_141); }; dojo.extend(dojo.Deferred, { addCallback: function (_157) { return this.addCallbacks(dojo.hitch.apply(dojo, arguments)); }, addErrback: function (_158) { return this.addCallbacks(null, dojo.hitch.apply(dojo, arguments)); }, addBoth: function (_159) { var _15a = dojo.hitch.apply(dojo, arguments); return this.addCallbacks(_15a, _15a); }, fired: -1 }); })(); dojo.when = function (_15b, _15c, _15d, _15e) { if (_15b && typeof _15b.then === "function") { return _15b.then(_15c, _15d, _15e); } return _15c(_15b); }; } if (!dojo._hasResource["dojo._base.json"]) { dojo._hasResource["dojo._base.json"] = true; dojo.provide("dojo._base.json"); dojo.fromJson = function (json) { return eval("(" + json + ")"); }; dojo._escapeString = function (str) { return ("\"" + str.replace(/(["\\])/g, "\\$1") + "\"").replace(/[\f]/g, "\\f").replace(/[\b]/g, "\\b").replace(/[\n]/g, "\\n").replace(/[\t]/g, "\\t").replace(/[\r]/g, "\\r"); }; dojo.toJsonIndentStr = "\t"; dojo.toJson = function (it, _15f, _160) { if (it === undefined) { return "undefined"; } var _161 = typeof it; if (_161 == "number" || _161 == "boolean") { return it + ""; } if (it === null) { return "null"; } if (dojo.isString(it)) { return dojo._escapeString(it); } var _162 = arguments.callee; var _163; _160 = _160 || ""; var _164 = _15f ? _160 + dojo.toJsonIndentStr : ""; var tf = it.__json__ || it.json; if (dojo.isFunction(tf)) { _163 = tf.call(it); if (it !== _163) { return _162(_163, _15f, _164); } } if (it.nodeType && it.cloneNode) { throw new Error("Can't serialize DOM nodes"); } var sep = _15f ? " " : ""; var _165 = _15f ? "\n" : ""; if (dojo.isArray(it)) { var res = dojo.map(it, function (obj) { var val = _162(obj, _15f, _164); if (typeof val != "string") { val = "undefined"; } return _165 + _164 + val; }); return "[" + res.join("," + sep) + _165 + _160 + "]"; } if (_161 == "function") { return null; } var _166 = [], key; for (key in it) { var _167, val; if (typeof key == "number") { _167 = "\"" + key + "\""; } else { if (typeof key == "string") { _167 = dojo._escapeString(key); } else { continue; } } val = _162(it[key], _15f, _164); if (typeof val != "string") { continue; } _166.push(_165 + _164 + _167 + ":" + sep + val); } return "{" + _166.join("," + sep) + _165 + _160 + "}"; }; } if (!dojo._hasResource["dojo._base.Color"]) { dojo._hasResource["dojo._base.Color"] = true; dojo.provide("dojo._base.Color"); (function () { var d = dojo; dojo.Color = function (_168) { if (_168) { this.setColor(_168); } }; dojo.Color.named = { black: [0, 0, 0], silver: [192, 192, 192], gray: [128, 128, 128], white: [255, 255, 255], maroon: [128, 0, 0], red: [255, 0, 0], purple: [128, 0, 128], fuchsia: [255, 0, 255], green: [0, 128, 0], lime: [0, 255, 0], olive: [128, 128, 0], yellow: [255, 255, 0], navy: [0, 0, 128], blue: [0, 0, 255], teal: [0, 128, 128], aqua: [0, 255, 255], transparent: d.config.transparentColor || [255, 255, 255] }; dojo.extend(dojo.Color, { r: 255, g: 255, b: 255, a: 1, _set: function (r, g, b, a) { var t = this; t.r = r; t.g = g; t.b = b; t.a = a; }, setColor: function (_169) { if (d.isString(_169)) { d.colorFromString(_169, this); } else { if (d.isArray(_169)) { d.colorFromArray(_169, this); } else { this._set(_169.r, _169.g, _169.b, _169.a); if (!(_169 instanceof d.Color)) { this.sanitize(); } } } return this; }, sanitize: function () { return this; }, toRgb: function () { var t = this; return [t.r, t.g, t.b]; }, toRgba: function () { var t = this; return [t.r, t.g, t.b, t.a]; }, toHex: function () { var arr = d.map(["r", "g", "b"], function (x) { var s = this[x].toString(16); return s.length < 2 ? "0" + s : s; }, this); return "#" + arr.join(""); }, toCss: function (_16a) { var t = this, rgb = t.r + ", " + t.g + ", " + t.b; return (_16a ? "rgba(" + rgb + ", " + t.a : "rgb(" + rgb) + ")"; }, toString: function () { return this.toCss(true); } }); dojo.blendColors = function (_16b, end, _16c, obj) { var t = obj || new d.Color(); d.forEach(["r", "g", "b", "a"], function (x) { t[x] = _16b[x] + (end[x] - _16b[x]) * _16c; if (x != "a") { t[x] = Math.round(t[x]); } }); return t.sanitize(); }; dojo.colorFromRgb = function (_16d, obj) { var m = _16d.toLowerCase().match(/^rgba?\(([\s\.,0-9]+)\)/); return m && dojo.colorFromArray(m[1].split(/\s*,\s*/), obj); }; dojo.colorFromHex = function (_16e, obj) { var t = obj || new d.Color(), bits = (_16e.length == 4) ? 4 : 8, mask = (1 << bits) - 1; _16e = Number("0x" + _16e.substr(1)); if (isNaN(_16e)) { return null; } d.forEach(["b", "g", "r"], function (x) { var c = _16e & mask; _16e >>= bits; t[x] = bits == 4 ? 17 * c : c; }); t.a = 1; return t; }; dojo.colorFromArray = function (a, obj) { var t = obj || new d.Color(); t._set(Number(a[0]), Number(a[1]), Number(a[2]), Number(a[3])); if (isNaN(t.a)) { t.a = 1; } return t.sanitize(); }; dojo.colorFromString = function (str, obj) { var a = d.Color.named[str]; return a && d.colorFromArray(a, obj) || d.colorFromRgb(str, obj) || d.colorFromHex(str, obj); }; })(); } if (!dojo._hasResource["dojo._base"]) { dojo._hasResource["dojo._base"] = true; dojo.provide("dojo._base"); } if (!dojo._hasResource["dojo._base.window"]) { dojo._hasResource["dojo._base.window"] = true; dojo.provide("dojo._base.window"); dojo.doc = window["document"] || null; dojo.body = function () { return dojo.doc.body || dojo.doc.getElementsByTagName("body")[0]; }; dojo.setContext = function (_16f, _170) { dojo.global = _16f; dojo.doc = _170; }; dojo.withGlobal = function (_171, _172, _173, _174) { var _175 = dojo.global; try { dojo.global = _171; return dojo.withDoc.call(null, _171.document, _172, _173, _174); } finally { dojo.global = _175; } }; dojo.withDoc = function (_176, _177, _178, _179) { var _17a = dojo.doc, _17b = dojo._bodyLtr, oldQ = dojo.isQuirks; try { dojo.doc = _176; delete dojo._bodyLtr; dojo.isQuirks = dojo.doc.compatMode == "BackCompat"; if (_178 && typeof _177 == "string") { _177 = _178[_177]; } return _177.apply(_178, _179 || []); } finally { dojo.doc = _17a; delete dojo._bodyLtr; if (_17b !== undefined) { dojo._bodyLtr = _17b; } dojo.isQuirks = oldQ; } }; } if (!dojo._hasResource["dojo._base.event"]) { dojo._hasResource["dojo._base.event"] = true; dojo.provide("dojo._base.event"); (function () { var del = (dojo._event_listener = { add: function (node, name, fp) { if (!node) { return; } name = del._normalizeEventName(name); fp = del._fixCallback(name, fp); var _17c = name; if (!dojo.isIE && (name == "mouseenter" || name == "mouseleave")) { var ofp = fp; name = (name == "mouseenter") ? "mouseover" : "mouseout"; fp = function (e) { if (!dojo.isDescendant(e.relatedTarget, node)) { return ofp.call(this, e); } }; } node.addEventListener(name, fp, false); return fp; }, remove: function (node, _17d, _17e) { if (node) { _17d = del._normalizeEventName(_17d); if (!dojo.isIE && (_17d == "mouseenter" || _17d == "mouseleave")) { _17d = (_17d == "mouseenter") ? "mouseover" : "mouseout"; } node.removeEventListener(_17d, _17e, false); } }, _normalizeEventName: function (name) { return name.slice(0, 2) == "on" ? name.slice(2) : name; }, _fixCallback: function (name, fp) { return name != "keypress" ? fp : function (e) { return fp.call(this, del._fixEvent(e, this)); }; }, _fixEvent: function (evt, _17f) { switch (evt.type) { case "keypress": del._setKeyChar(evt); break; } return evt; }, _setKeyChar: function (evt) { evt.keyChar = evt.charCode ? String.fromCharCode(evt.charCode) : ""; evt.charOrCode = evt.keyChar || evt.keyCode; }, _punctMap: { 106: 42, 111: 47, 186: 59, 187: 43, 188: 44, 189: 45, 190: 46, 191: 47, 192: 96, 219: 91, 220: 92, 221: 93, 222: 39} }); dojo.fixEvent = function (evt, _180) { return del._fixEvent(evt, _180); }; dojo.stopEvent = function (evt) { evt.preventDefault(); evt.stopPropagation(); }; var _181 = dojo._listener; dojo._connect = function (obj, _182, _183, _184, _185) { var _186 = obj && (obj.nodeType || obj.attachEvent || obj.addEventListener); var lid = _186 ? (_185 ? 2 : 1) : 0, l = [dojo._listener, del, _181][lid]; var h = l.add(obj, _182, dojo.hitch(_183, _184)); return [obj, _182, h, lid]; }; dojo._disconnect = function (obj, _187, _188, _189) { ([dojo._listener, del, _181][_189]).remove(obj, _187, _188); }; dojo.keys = { BACKSPACE: 8, TAB: 9, CLEAR: 12, ENTER: 13, SHIFT: 16, CTRL: 17, ALT: 18, META: dojo.isSafari ? 91 : 224, PAUSE: 19, CAPS_LOCK: 20, ESCAPE: 27, SPACE: 32, PAGE_UP: 33, PAGE_DOWN: 34, END: 35, HOME: 36, LEFT_ARROW: 37, UP_ARROW: 38, RIGHT_ARROW: 39, DOWN_ARROW: 40, INSERT: 45, DELETE: 46, HELP: 47, LEFT_WINDOW: 91, RIGHT_WINDOW: 92, SELECT: 93, NUMPAD_0: 96, NUMPAD_1: 97, NUMPAD_2: 98, NUMPAD_3: 99, NUMPAD_4: 100, NUMPAD_5: 101, NUMPAD_6: 102, NUMPAD_7: 103, NUMPAD_8: 104, NUMPAD_9: 105, NUMPAD_MULTIPLY: 106, NUMPAD_PLUS: 107, NUMPAD_ENTER: 108, NUMPAD_MINUS: 109, NUMPAD_PERIOD: 110, NUMPAD_DIVIDE: 111, F1: 112, F2: 113, F3: 114, F4: 115, F5: 116, F6: 117, F7: 118, F8: 119, F9: 120, F10: 121, F11: 122, F12: 123, F13: 124, F14: 125, F15: 126, NUM_LOCK: 144, SCROLL_LOCK: 145, copyKey: dojo.isMac && !dojo.isAIR ? (dojo.isSafari ? 91 : 224) : 17 }; var _18a = dojo.isMac ? "metaKey" : "ctrlKey"; dojo.isCopyKey = function (e) { return e[_18a]; }; if (dojo.isIE) { dojo.mouseButtons = { LEFT: 1, MIDDLE: 4, RIGHT: 2, isButton: function (e, _18b) { return e.button & _18b; }, isLeft: function (e) { return e.button & 1; }, isMiddle: function (e) { return e.button & 4; }, isRight: function (e) { return e.button & 2; } }; } else { dojo.mouseButtons = { LEFT: 0, MIDDLE: 1, RIGHT: 2, isButton: function (e, _18c) { return e.button == _18c; }, isLeft: function (e) { return e.button == 0; }, isMiddle: function (e) { return e.button == 1; }, isRight: function (e) { return e.button == 2; } }; } if (dojo.isIE) { var _18d = function (e, code) { try { return (e.keyCode = code); } catch (e) { return 0; } }; var iel = dojo._listener; var _18e = (dojo._ieListenersName = "_" + dojo._scopeName + "_listeners"); if (!dojo.config._allow_leaks) { _181 = iel = dojo._ie_listener = { handlers: [], add: function (_18f, _190, _191) { _18f = _18f || dojo.global; var f = _18f[_190]; if (!f || !f[_18e]) { var d = dojo._getIeDispatcher(); d.target = f && (ieh.push(f) - 1); d[_18e] = []; f = _18f[_190] = d; } return f[_18e].push(ieh.push(_191) - 1); }, remove: function (_192, _193, _194) { var f = (_192 || dojo.global)[_193], l = f && f[_18e]; if (f && l && _194--) { delete ieh[l[_194]]; delete l[_194]; } } }; var ieh = iel.handlers; } dojo.mixin(del, { add: function (node, _195, fp) { if (!node) { return; } _195 = del._normalizeEventName(_195); if (_195 == "onkeypress") { var kd = node.onkeydown; if (!kd || !kd[_18e] || !kd._stealthKeydownHandle) { var h = del.add(node, "onkeydown", del._stealthKeyDown); kd = node.onkeydown; kd._stealthKeydownHandle = h; kd._stealthKeydownRefs = 1; } else { kd._stealthKeydownRefs++; } } return iel.add(node, _195, del._fixCallback(fp)); }, remove: function (node, _196, _197) { _196 = del._normalizeEventName(_196); iel.remove(node, _196, _197); if (_196 == "onkeypress") { var kd = node.onkeydown; if (--kd._stealthKeydownRefs <= 0) { iel.remove(node, "onkeydown", kd._stealthKeydownHandle); delete kd._stealthKeydownHandle; } } }, _normalizeEventName: function (_198) { return _198.slice(0, 2) != "on" ? "on" + _198 : _198; }, _nop: function () { }, _fixEvent: function (evt, _199) { if (!evt) { var w = _199 && (_199.ownerDocument || _199.document || _199).parentWindow || window; evt = w.event; } if (!evt) { return (evt); } evt.target = evt.srcElement; evt.currentTarget = (_199 || evt.srcElement); evt.layerX = evt.offsetX; evt.layerY = evt.offsetY; var se = evt.srcElement, doc = (se && se.ownerDocument) || document; var _19a = ((dojo.isIE < 6) || (doc["compatMode"] == "BackCompat")) ? doc.body : doc.documentElement; var _19b = dojo._getIeDocumentElementOffset(); evt.pageX = evt.clientX + dojo._fixIeBiDiScrollLeft(_19a.scrollLeft || 0) - _19b.x; evt.pageY = evt.clientY + (_19a.scrollTop || 0) - _19b.y; if (evt.type == "mouseover") { evt.relatedTarget = evt.fromElement; } if (evt.type == "mouseout") { evt.relatedTarget = evt.toElement; } evt.stopPropagation = del._stopPropagation; evt.preventDefault = del._preventDefault; return del._fixKeys(evt); }, _fixKeys: function (evt) { switch (evt.type) { case "keypress": var c = ("charCode" in evt ? evt.charCode : evt.keyCode); if (c == 10) { c = 0; evt.keyCode = 13; } else { if (c == 13 || c == 27) { c = 0; } else { if (c == 3) { c = 99; } } } evt.charCode = c; del._setKeyChar(evt); break; } return evt; }, _stealthKeyDown: function (evt) { var kp = evt.currentTarget.onkeypress; if (!kp || !kp[_18e]) { return; } var k = evt.keyCode; var _19c = k != 13 && k != 32 && k != 27 && (k < 48 || k > 90) && (k < 96 || k > 111) && (k < 186 || k > 192) && (k < 219 || k > 222); if (_19c || evt.ctrlKey) { var c = _19c ? 0 : k; if (evt.ctrlKey) { if (k == 3 || k == 13) { return; } else { if (c > 95 && c < 106) { c -= 48; } else { if ((!evt.shiftKey) && (c >= 65 && c <= 90)) { c += 32; } else { c = del._punctMap[c] || c; } } } } var faux = del._synthesizeEvent(evt, { type: "keypress", faux: true, charCode: c }); kp.call(evt.currentTarget, faux); evt.cancelBubble = faux.cancelBubble; evt.returnValue = faux.returnValue; _18d(evt, faux.keyCode); } }, _stopPropagation: function () { this.cancelBubble = true; }, _preventDefault: function () { this.bubbledKeyCode = this.keyCode; if (this.ctrlKey) { _18d(this, 0); } this.returnValue = false; } }); dojo.stopEvent = function (evt) { evt = evt || window.event; del._stopPropagation.call(evt); del._preventDefault.call(evt); }; } del._synthesizeEvent = function (evt, _19d) { var faux = dojo.mixin({}, evt, _19d); del._setKeyChar(faux); faux.preventDefault = function () { evt.preventDefault(); }; faux.stopPropagation = function () { evt.stopPropagation(); }; return faux; }; if (dojo.isOpera) { dojo.mixin(del, { _fixEvent: function (evt, _19e) { switch (evt.type) { case "keypress": var c = evt.which; if (c == 3) { c = 99; } c = c < 41 && !evt.shiftKey ? 0 : c; if (evt.ctrlKey && !evt.shiftKey && c >= 65 && c <= 90) { c += 32; } return del._synthesizeEvent(evt, { charCode: c }); } return evt; } }); } if (dojo.isWebKit) { del._add = del.add; del._remove = del.remove; dojo.mixin(del, { add: function (node, _19f, fp) { if (!node) { return; } var _1a0 = del._add(node, _19f, fp); if (del._normalizeEventName(_19f) == "keypress") { _1a0._stealthKeyDownHandle = del._add(node, "keydown", function (evt) { var k = evt.keyCode; var _1a1 = k != 13 && k != 32 && (k < 48 || k > 90) && (k < 96 || k > 111) && (k < 186 || k > 192) && (k < 219 || k > 222); if (_1a1 || evt.ctrlKey) { var c = _1a1 ? 0 : k; if (evt.ctrlKey) { if (k == 3 || k == 13) { return; } else { if (c > 95 && c < 106) { c -= 48; } else { if (!evt.shiftKey && c >= 65 && c <= 90) { c += 32; } else { c = del._punctMap[c] || c; } } } } var faux = del._synthesizeEvent(evt, { type: "keypress", faux: true, charCode: c }); fp.call(evt.currentTarget, faux); } }); } return _1a0; }, remove: function (node, _1a2, _1a3) { if (node) { if (_1a3._stealthKeyDownHandle) { del._remove(node, "keydown", _1a3._stealthKeyDownHandle); } del._remove(node, _1a2, _1a3); } }, _fixEvent: function (evt, _1a4) { switch (evt.type) { case "keypress": if (evt.faux) { return evt; } var c = evt.charCode; c = c >= 32 ? c : 0; return del._synthesizeEvent(evt, { charCode: c, faux: true }); } return evt; } }); } })(); if (dojo.isIE) { dojo._ieDispatcher = function (args, _1a5) { var ap = Array.prototype, h = dojo._ie_listener.handlers, c = args.callee, ls = c[dojo._ieListenersName], t = h[c.target]; var r = t && t.apply(_1a5, args); var lls = [].concat(ls); for (var i in lls) { var f = h[lls[i]]; if (!(i in ap) && f) { f.apply(_1a5, args); } } return r; }; dojo._getIeDispatcher = function () { return new Function(dojo._scopeName + "._ieDispatcher(arguments, this)"); }; dojo._event_listener._fixCallback = function (fp) { var f = dojo._event_listener._fixEvent; return function (e) { return fp.call(this, f(e, this)); }; }; } } if (!dojo._hasResource["dojo._base.html"]) { dojo._hasResource["dojo._base.html"] = true; dojo.provide("dojo._base.html"); try { document.execCommand("BackgroundImageCache", false, true); } catch (e) { } if (dojo.isIE || dojo.isOpera) { dojo.byId = function (id, doc) { if (typeof id != "string") { return id; } var _1a6 = doc || dojo.doc, te = _1a6.getElementById(id); if (te && (te.attributes.id.value == id || te.id == id)) { return te; } else { var eles = _1a6.all[id]; if (!eles || eles.nodeName) { eles = [eles]; } var i = 0; while ((te = eles[i++])) { if ((te.attributes && te.attributes.id && te.attributes.id.value == id) || te.id == id) { return te; } } } }; } else { dojo.byId = function (id, doc) { return (typeof id == "string") ? (doc || dojo.doc).getElementById(id) : id; }; } (function () { var d = dojo; var byId = d.byId; var _1a7 = null, _1a8; d.addOnWindowUnload(function () { _1a7 = null; }); dojo._destroyElement = dojo.destroy = function (node) { node = byId(node); try { var doc = node.ownerDocument; if (!_1a7 || _1a8 != doc) { _1a7 = doc.createElement("div"); _1a8 = doc; } _1a7.appendChild(node.parentNode ? node.parentNode.removeChild(node) : node); _1a7.innerHTML = ""; } catch (e) { } }; dojo.isDescendant = function (node, _1a9) { try { node = byId(node); _1a9 = byId(_1a9); while (node) { if (node == _1a9) { return true; } node = node.parentNode; } } catch (e) { } return false; }; dojo.setSelectable = function (node, _1aa) { node = byId(node); if (d.isMozilla) { node.style.MozUserSelect = _1aa ? "" : "none"; } else { if (d.isKhtml || d.isWebKit) { node.style.KhtmlUserSelect = _1aa ? "auto" : "none"; } else { if (d.isIE) { var v = (node.unselectable = _1aa ? "" : "on"); d.query("*", node).forEach("item.unselectable = '" + v + "'"); } } } }; var _1ab = function (node, ref) { var _1ac = ref.parentNode; if (_1ac) { _1ac.insertBefore(node, ref); } }; var _1ad = function (node, ref) { var _1ae = ref.parentNode; if (_1ae) { if (_1ae.lastChild == ref) { _1ae.appendChild(node); } else { _1ae.insertBefore(node, ref.nextSibling); } } }; dojo.place = function (node, _1af, _1b0) { _1af = byId(_1af); if (typeof node == "string") { node = node.charAt(0) == "<" ? d._toDom(node, _1af.ownerDocument) : byId(node); } if (typeof _1b0 == "number") { var cn = _1af.childNodes; if (!cn.length || cn.length <= _1b0) { _1af.appendChild(node); } else { _1ab(node, cn[_1b0 < 0 ? 0 : _1b0]); } } else { switch (_1b0) { case "before": _1ab(node, _1af); break; case "after": _1ad(node, _1af); break; case "replace": _1af.parentNode.replaceChild(node, _1af); break; case "only": d.empty(_1af); _1af.appendChild(node); break; case "first": if (_1af.firstChild) { _1ab(node, _1af.firstChild); break; } default: _1af.appendChild(node); } } return node; }; dojo.boxModel = "content-box"; if (d.isIE) { d.boxModel = document.compatMode == "BackCompat" ? "border-box" : "content-box"; } var gcs; if (d.isWebKit) { gcs = function (node) { var s; if (node.nodeType == 1) { var dv = node.ownerDocument.defaultView; s = dv.getComputedStyle(node, null); if (!s && node.style) { node.style.display = ""; s = dv.getComputedStyle(node, null); } } return s || {}; }; } else { if (d.isIE) { gcs = function (node) { return node.nodeType == 1 ? node.currentStyle : {}; }; } else { gcs = function (node) { return node.nodeType == 1 ? node.ownerDocument.defaultView.getComputedStyle(node, null) : {}; }; } } dojo.getComputedStyle = gcs; if (!d.isIE) { d._toPixelValue = function (_1b1, _1b2) { return parseFloat(_1b2) || 0; }; } else { d._toPixelValue = function (_1b3, _1b4) { if (!_1b4) { return 0; } if (_1b4 == "medium") { return 4; } if (_1b4.slice && _1b4.slice(-2) == "px") { return parseFloat(_1b4); } with (_1b3) { var _1b5 = style.left; var _1b6 = runtimeStyle.left; runtimeStyle.left = currentStyle.left; try { style.left = _1b4; _1b4 = style.pixelLeft; } catch (e) { _1b4 = 0; } style.left = _1b5; runtimeStyle.left = _1b6; } return _1b4; }; } var px = d._toPixelValue; var astr = "DXImageTransform.Microsoft.Alpha"; var af = function (n, f) { try { return n.filters.item(astr); } catch (e) { return f ? {} : null; } }; dojo._getOpacity = d.isIE ? function (node) { try { return af(node).Opacity / 100; } catch (e) { return 1; } } : function (node) { return gcs(node).opacity; }; dojo._setOpacity = d.isIE ? function (node, _1b7) { var ov = _1b7 * 100, _1b8 = _1b7 == 1; node.style.zoom = _1b8 ? "" : 1; if (!af(node)) { if (_1b8) { return _1b7; } node.style.filter += " progid:" + astr + "(Opacity=" + ov + ")"; } else { af(node, 1).Opacity = ov; } af(node, 1).Enabled = !_1b8; if (node.nodeName.toLowerCase() == "tr") { d.query("> td", node).forEach(function (i) { d._setOpacity(i, _1b7); }); } return _1b7; } : function (node, _1b9) { return node.style.opacity = _1b9; }; var _1ba = { left: true, top: true }; var _1bb = /margin|padding|width|height|max|min|offset/; var _1bc = function (node, type, _1bd) { type = type.toLowerCase(); if (d.isIE) { if (_1bd == "auto") { if (type == "height") { return node.offsetHeight; } if (type == "width") { return node.offsetWidth; } } if (type == "fontweight") { switch (_1bd) { case 700: return "bold"; case 400: default: return "normal"; } } } if (!(type in _1ba)) { _1ba[type] = _1bb.test(type); } return _1ba[type] ? px(node, _1bd) : _1bd; }; var _1be = d.isIE ? "styleFloat" : "cssFloat", _1bf = { "cssFloat": _1be, "styleFloat": _1be, "float": _1be }; dojo.style = function (node, _1c0, _1c1) { var n = byId(node), args = arguments.length, op = (_1c0 == "opacity"); _1c0 = _1bf[_1c0] || _1c0; if (args == 3) { return op ? d._setOpacity(n, _1c1) : n.style[_1c0] = _1c1; } if (args == 2 && op) { return d._getOpacity(n); } var s = gcs(n); if (args == 2 && typeof _1c0 != "string") { for (var x in _1c0) { d.style(node, x, _1c0[x]); } return s; } return (args == 1) ? s : _1bc(n, _1c0, s[_1c0] || n.style[_1c0]); }; dojo._getPadExtents = function (n, _1c2) { var s = _1c2 || gcs(n), l = px(n, s.paddingLeft), t = px(n, s.paddingTop); return { l: l, t: t, w: l + px(n, s.paddingRight), h: t + px(n, s.paddingBottom) }; }; dojo._getBorderExtents = function (n, _1c3) { var ne = "none", s = _1c3 || gcs(n), bl = (s.borderLeftStyle != ne ? px(n, s.borderLeftWidth) : 0), bt = (s.borderTopStyle != ne ? px(n, s.borderTopWidth) : 0); return { l: bl, t: bt, w: bl + (s.borderRightStyle != ne ? px(n, s.borderRightWidth) : 0), h: bt + (s.borderBottomStyle != ne ? px(n, s.borderBottomWidth) : 0) }; }; dojo._getPadBorderExtents = function (n, _1c4) { var s = _1c4 || gcs(n), p = d._getPadExtents(n, s), b = d._getBorderExtents(n, s); return { l: p.l + b.l, t: p.t + b.t, w: p.w + b.w, h: p.h + b.h }; }; dojo._getMarginExtents = function (n, _1c5) { var s = _1c5 || gcs(n), l = px(n, s.marginLeft), t = px(n, s.marginTop), r = px(n, s.marginRight), b = px(n, s.marginBottom); if (d.isWebKit && (s.position != "absolute")) { r = l; } return { l: l, t: t, w: l + r, h: t + b }; }; dojo._getMarginBox = function (node, _1c6) { var s = _1c6 || gcs(node), me = d._getMarginExtents(node, s); var l = node.offsetLeft - me.l, t = node.offsetTop - me.t, p = node.parentNode; if (d.isMoz) { var sl = parseFloat(s.left), st = parseFloat(s.top); if (!isNaN(sl) && !isNaN(st)) { l = sl, t = st; } else { if (p && p.style) { var pcs = gcs(p); if (pcs.overflow != "visible") { var be = d._getBorderExtents(p, pcs); l += be.l, t += be.t; } } } } else { if (d.isOpera || (d.isIE > 7 && !d.isQuirks)) { if (p) { be = d._getBorderExtents(p); l -= be.l; t -= be.t; } } } return { l: l, t: t, w: node.offsetWidth + me.w, h: node.offsetHeight + me.h }; }; dojo._getContentBox = function (node, _1c7) { var s = _1c7 || gcs(node), pe = d._getPadExtents(node, s), be = d._getBorderExtents(node, s), w = node.clientWidth, h; if (!w) { w = node.offsetWidth, h = node.offsetHeight; } else { h = node.clientHeight, be.w = be.h = 0; } if (d.isOpera) { pe.l += be.l; pe.t += be.t; } return { l: pe.l, t: pe.t, w: w - pe.w - be.w, h: h - pe.h - be.h }; }; dojo._getBorderBox = function (node, _1c8) { var s = _1c8 || gcs(node), pe = d._getPadExtents(node, s), cb = d._getContentBox(node, s); return { l: cb.l - pe.l, t: cb.t - pe.t, w: cb.w + pe.w, h: cb.h + pe.h }; }; dojo._setBox = function (node, l, t, w, h, u) { u = u || "px"; var s = node.style; if (!isNaN(l)) { s.left = l + u; } if (!isNaN(t)) { s.top = t + u; } if (w >= 0) { s.width = w + u; } if (h >= 0) { s.height = h + u; } }; dojo._isButtonTag = function (node) { return node.tagName == "BUTTON" || node.tagName == "INPUT" && (node.getAttribute("type") || "").toUpperCase() == "BUTTON"; }; dojo._usesBorderBox = function (node) { var n = node.tagName; return d.boxModel == "border-box" || n == "TABLE" || d._isButtonTag(node); }; dojo._setContentSize = function (node, _1c9, _1ca, _1cb) { if (d._usesBorderBox(node)) { var pb = d._getPadBorderExtents(node, _1cb); if (_1c9 >= 0) { _1c9 += pb.w; } if (_1ca >= 0) { _1ca += pb.h; } } d._setBox(node, NaN, NaN, _1c9, _1ca); }; dojo._setMarginBox = function (node, _1cc, _1cd, _1ce, _1cf, _1d0) { var s = _1d0 || gcs(node), bb = d._usesBorderBox(node), pb = bb ? _1d1 : d._getPadBorderExtents(node, s); if (d.isWebKit) { if (d._isButtonTag(node)) { var ns = node.style; if (_1ce >= 0 && !ns.width) { ns.width = "4px"; } if (_1cf >= 0 && !ns.height) { ns.height = "4px"; } } } var mb = d._getMarginExtents(node, s); if (_1ce >= 0) { _1ce = Math.max(_1ce - pb.w - mb.w, 0); } if (_1cf >= 0) { _1cf = Math.max(_1cf - pb.h - mb.h, 0); } d._setBox(node, _1cc, _1cd, _1ce, _1cf); }; var _1d1 = { l: 0, t: 0, w: 0, h: 0 }; dojo.marginBox = function (node, box) { var n = byId(node), s = gcs(n), b = box; return !b ? d._getMarginBox(n, s) : d._setMarginBox(n, b.l, b.t, b.w, b.h, s); }; dojo.contentBox = function (node, box) { var n = byId(node), s = gcs(n), b = box; return !b ? d._getContentBox(n, s) : d._setContentSize(n, b.w, b.h, s); }; var _1d2 = function (node, prop) { if (!(node = (node || 0).parentNode)) { return 0; } var val, _1d3 = 0, _1d4 = d.body(); while (node && node.style) { if (gcs(node).position == "fixed") { return 0; } val = node[prop]; if (val) { _1d3 += val - 0; if (node == _1d4) { break; } } node = node.parentNode; } return _1d3; }; dojo._docScroll = function () { var n = d.global; return "pageXOffset" in n ? { x: n.pageXOffset, y: n.pageYOffset} : (n = d.doc.documentElement, n.clientHeight ? { x: d._fixIeBiDiScrollLeft(n.scrollLeft), y: n.scrollTop} : (n = d.body(), { x: n.scrollLeft || 0, y: n.scrollTop || 0 })); }; dojo._isBodyLtr = function () { return "_bodyLtr" in d ? d._bodyLtr : d._bodyLtr = (d.body().dir || d.doc.documentElement.dir || "ltr").toLowerCase() == "ltr"; }; dojo._getIeDocumentElementOffset = function () { var de = d.doc.documentElement; if (d.isIE < 8) { var r = de.getBoundingClientRect(); var l = r.left, t = r.top; if (d.isIE < 7) { l += de.clientLeft; t += de.clientTop; } return { x: l < 0 ? 0 : l, y: t < 0 ? 0 : t }; } else { return { x: 0, y: 0 }; } }; dojo._fixIeBiDiScrollLeft = function (_1d5) { var dd = d.doc; if (d.isIE < 8 && !d._isBodyLtr()) { var de = d.isQuirks ? dd.body : dd.documentElement; return _1d5 + de.clientWidth - de.scrollWidth; } return _1d5; }; dojo._abs = dojo.position = function (node, _1d6) { var db = d.body(), dh = db.parentNode, ret; node = byId(node); if (node["getBoundingClientRect"]) { ret = node.getBoundingClientRect(); ret = { x: ret.left, y: ret.top, w: ret.right - ret.left, h: ret.bottom - ret.top }; if (d.isIE) { var _1d7 = d._getIeDocumentElementOffset(); ret.x -= _1d7.x + (d.isQuirks ? db.clientLeft + db.offsetLeft : 0); ret.y -= _1d7.y + (d.isQuirks ? db.clientTop + db.offsetTop : 0); } else { if (d.isFF == 3) { var cs = gcs(dh); ret.x -= px(dh, cs.marginLeft) + px(dh, cs.borderLeftWidth); ret.y -= px(dh, cs.marginTop) + px(dh, cs.borderTopWidth); } } } else { ret = { x: 0, y: 0, w: node.offsetWidth, h: node.offsetHeight }; if (node["offsetParent"]) { ret.x -= _1d2(node, "scrollLeft"); ret.y -= _1d2(node, "scrollTop"); var _1d8 = node; do { var n = _1d8.offsetLeft, t = _1d8.offsetTop; ret.x += isNaN(n) ? 0 : n; ret.y += isNaN(t) ? 0 : t; cs = gcs(_1d8); if (_1d8 != node) { if (d.isMoz) { ret.x += 2 * px(_1d8, cs.borderLeftWidth); ret.y += 2 * px(_1d8, cs.borderTopWidth); } else { ret.x += px(_1d8, cs.borderLeftWidth); ret.y += px(_1d8, cs.borderTopWidth); } } if (d.isMoz && cs.position == "static") { var _1d9 = _1d8.parentNode; while (_1d9 != _1d8.offsetParent) { var pcs = gcs(_1d9); if (pcs.position == "static") { ret.x += px(_1d8, pcs.borderLeftWidth); ret.y += px(_1d8, pcs.borderTopWidth); } _1d9 = _1d9.parentNode; } } _1d8 = _1d8.offsetParent; } while ((_1d8 != dh) && _1d8); } else { if (node.x && node.y) { ret.x += isNaN(node.x) ? 0 : node.x; ret.y += isNaN(node.y) ? 0 : node.y; } } } if (_1d6) { var _1da = d._docScroll(); ret.x += _1da.x; ret.y += _1da.y; } return ret; }; dojo.coords = function (node, _1db) { var n = byId(node), s = gcs(n), mb = d._getMarginBox(n, s); var abs = d.position(n, _1db); mb.x = abs.x; mb.y = abs.y; return mb; }; var _1dc = { "class": "className", "for": "htmlFor", tabindex: "tabIndex", readonly: "readOnly", colspan: "colSpan", frameborder: "frameBorder", rowspan: "rowSpan", valuetype: "valueType" }, _1dd = { classname: "class", htmlfor: "for", tabindex: "tabIndex", readonly: "readOnly" }, _1de = { innerHTML: 1, className: 1, htmlFor: d.isIE, value: 1 }; var _1df = function (name) { return _1dd[name.toLowerCase()] || name; }; var _1e0 = function (node, name) { var attr = node.getAttributeNode && node.getAttributeNode(name); return attr && attr.specified; }; dojo.hasAttr = function (node, name) { var lc = name.toLowerCase(); return _1de[_1dc[lc] || name] || _1e0(byId(node), _1dd[lc] || name); }; var _1e1 = {}, _1e2 = 0, _1e3 = dojo._scopeName + "attrid", _1e4 = { col: 1, colgroup: 1, table: 1, tbody: 1, tfoot: 1, thead: 1, tr: 1, title: 1 }; dojo.attr = function (node, name, _1e5) { node = byId(node); var args = arguments.length, prop; if (args == 2 && typeof name != "string") { for (var x in name) { d.attr(node, x, name[x]); } return node; } var lc = name.toLowerCase(), _1e6 = _1dc[lc] || name, _1e7 = _1de[_1e6], _1e8 = _1dd[lc] || name; if (args == 3) { do { if (_1e6 == "style" && typeof _1e5 != "string") { d.style(node, _1e5); break; } if (_1e6 == "innerHTML") { if (d.isIE && node.tagName.toLowerCase() in _1e4) { d.empty(node); node.appendChild(d._toDom(_1e5, node.ownerDocument)); } else { node[_1e6] = _1e5; } break; } if (d.isFunction(_1e5)) { var _1e9 = d.attr(node, _1e3); if (!_1e9) { _1e9 = _1e2++; d.attr(node, _1e3, _1e9); } if (!_1e1[_1e9]) { _1e1[_1e9] = {}; } var h = _1e1[_1e9][_1e6]; if (h) { d.disconnect(h); } else { try { delete node[_1e6]; } catch (e) { } } _1e1[_1e9][_1e6] = d.connect(node, _1e6, _1e5); break; } if (_1e7 || typeof _1e5 == "boolean") { node[_1e6] = _1e5; break; } node.setAttribute(_1e8, _1e5); } while (false); return node; } _1e5 = node[_1e6]; if (_1e7 && typeof _1e5 != "undefined") { return _1e5; } if (_1e6 != "href" && (typeof _1e5 == "boolean" || d.isFunction(_1e5))) { return _1e5; } return _1e0(node, _1e8) ? node.getAttribute(_1e8) : null; }; dojo.removeAttr = function (node, name) { byId(node).removeAttribute(_1df(name)); }; dojo.getNodeProp = function (node, name) { node = byId(node); var lc = name.toLowerCase(), _1ea = _1dc[lc] || name; if ((_1ea in node) && _1ea != "href") { return node[_1ea]; } var _1eb = _1dd[lc] || name; return _1e0(node, _1eb) ? node.getAttribute(_1eb) : null; }; dojo.create = function (tag, _1ec, _1ed, pos) { var doc = d.doc; if (_1ed) { _1ed = byId(_1ed); doc = _1ed.ownerDocument; } if (typeof tag == "string") { tag = doc.createElement(tag); } if (_1ec) { d.attr(tag, _1ec); } if (_1ed) { d.place(tag, _1ed, pos); } return tag; }; d.empty = d.isIE ? function (node) { node = byId(node); for (var c; c = node.lastChild; ) { d.destroy(c); } } : function (node) { byId(node).innerHTML = ""; }; var _1ee = { option: ["select"], tbody: ["table"], thead: ["table"], tfoot: ["table"], tr: ["table", "tbody"], td: ["table", "tbody", "tr"], th: ["table", "thead", "tr"], legend: ["fieldset"], caption: ["table"], colgroup: ["table"], col: ["table", "colgroup"], li: ["ul"] }, _1ef = /<\s*([\w\:]+)/, _1f0 = {}, _1f1 = 0, _1f2 = "__" + d._scopeName + "ToDomId"; for (var _1f3 in _1ee) { var tw = _1ee[_1f3]; tw.pre = _1f3 == "option" ? "<select multiple=\"multiple\">" : "<" + tw.join("><") + ">"; tw.post = "</" + tw.reverse().join("></") + ">"; } d._toDom = function (frag, doc) { doc = doc || d.doc; var _1f4 = doc[_1f2]; if (!_1f4) { doc[_1f2] = _1f4 = ++_1f1 + ""; _1f0[_1f4] = doc.createElement("div"); } frag += ""; var _1f5 = frag.match(_1ef), tag = _1f5 ? _1f5[1].toLowerCase() : "", _1f6 = _1f0[_1f4], wrap, i, fc, df; if (_1f5 && _1ee[tag]) { wrap = _1ee[tag]; _1f6.innerHTML = wrap.pre + frag + wrap.post; for (i = wrap.length; i; --i) { _1f6 = _1f6.firstChild; } } else { _1f6.innerHTML = frag; } if (_1f6.childNodes.length == 1) { return _1f6.removeChild(_1f6.firstChild); } df = doc.createDocumentFragment(); while (fc = _1f6.firstChild) { df.appendChild(fc); } return df; }; var _1f7 = "className"; dojo.hasClass = function (node, _1f8) { return ((" " + byId(node)[_1f7] + " ").indexOf(" " + _1f8 + " ") >= 0); }; var _1f9 = /\s+/, a1 = [""], _1fa = function (s) { if (typeof s == "string" || s instanceof String) { if (s.indexOf(" ") < 0) { a1[0] = s; return a1; } else { return s.split(_1f9); } } return s || ""; }; dojo.addClass = function (node, _1fb) { node = byId(node); _1fb = _1fa(_1fb); var cls = node[_1f7], _1fc; cls = cls ? " " + cls + " " : " "; _1fc = cls.length; for (var i = 0, len = _1fb.length, c; i < len; ++i) { c = _1fb[i]; if (c && cls.indexOf(" " + c + " ") < 0) { cls += c + " "; } } if (_1fc < cls.length) { node[_1f7] = cls.substr(1, cls.length - 2); } }; dojo.removeClass = function (node, _1fd) { node = byId(node); var cls; if (_1fd !== undefined) { _1fd = _1fa(_1fd); cls = " " + node[_1f7] + " "; for (var i = 0, len = _1fd.length; i < len; ++i) { cls = cls.replace(" " + _1fd[i] + " ", " "); } cls = d.trim(cls); } else { cls = ""; } if (node[_1f7] != cls) { node[_1f7] = cls; } }; dojo.toggleClass = function (node, _1fe, _1ff) { if (_1ff === undefined) { _1ff = !d.hasClass(node, _1fe); } d[_1ff ? "addClass" : "removeClass"](node, _1fe); }; })(); } if (!dojo._hasResource["dojo._base.NodeList"]) { dojo._hasResource["dojo._base.NodeList"] = true; dojo.provide("dojo._base.NodeList"); (function () { var d = dojo; var ap = Array.prototype, aps = ap.slice, apc = ap.concat; var tnl = function (a, _200, _201) { if (!a.sort) { a = aps.call(a, 0); } var ctor = _201 || this._NodeListCtor || d._NodeListCtor; a.constructor = ctor; dojo._mixin(a, ctor.prototype); a._NodeListCtor = ctor; return _200 ? a._stash(_200) : a; }; var _202 = function (f, a, o) { a = [0].concat(aps.call(a, 0)); o = o || d.global; return function (node) { a[0] = node; return f.apply(o, a); }; }; var _203 = function (f, o) { return function () { this.forEach(_202(f, arguments, o)); return this; }; }; var _204 = function (f, o) { return function () { return this.map(_202(f, arguments, o)); }; }; var _205 = function (f, o) { return function () { return this.filter(_202(f, arguments, o)); }; }; var _206 = function (f, g, o) { return function () { var a = arguments, body = _202(f, a, o); if (g.call(o || d.global, a)) { return this.map(body); } this.forEach(body); return this; }; }; var _207 = function (a) { return a.length == 1 && (typeof a[0] == "string"); }; var _208 = function (node) { var p = node.parentNode; if (p) { p.removeChild(node); } }; dojo.NodeList = function () { return tnl(Array.apply(null, arguments)); }; d._NodeListCtor = d.NodeList; var nl = d.NodeList, nlp = nl.prototype; nl._wrap = nlp._wrap = tnl; nl._adaptAsMap = _204; nl._adaptAsForEach = _203; nl._adaptAsFilter = _205; nl._adaptWithCondition = _206; d.forEach(["slice", "splice"], function (name) { var f = ap[name]; nlp[name] = function () { return this._wrap(f.apply(this, arguments), name == "slice" ? this : null); }; }); d.forEach(["indexOf", "lastIndexOf", "every", "some"], function (name) { var f = d[name]; nlp[name] = function () { return f.apply(d, [this].concat(aps.call(arguments, 0))); }; }); d.forEach(["attr", "style"], function (name) { nlp[name] = _206(d[name], _207); }); d.forEach(["connect", "addClass", "removeClass", "toggleClass", "empty", "removeAttr"], function (name) { nlp[name] = _203(d[name]); }); dojo.extend(dojo.NodeList, { _normalize: function (_209, _20a) { var _20b = _209.parse === true ? true : false; if (typeof _209.template == "string") { var _20c = _209.templateFunc || (dojo.string && dojo.string.substitute); _209 = _20c ? _20c(_209.template, _209) : _209; } var type = (typeof _209); if (type == "string" || type == "number") { _209 = dojo._toDom(_209, (_20a && _20a.ownerDocument)); if (_209.nodeType == 11) { _209 = dojo._toArray(_209.childNodes); } else { _209 = [_209]; } } else { if (!dojo.isArrayLike(_209)) { _209 = [_209]; } else { if (!dojo.isArray(_209)) { _209 = dojo._toArray(_209); } } } if (_20b) { _209._runParse = true; } return _209; }, _cloneNode: function (node) { return node.cloneNode(true); }, _place: function (ary, _20d, _20e, _20f) { if (_20d.nodeType != 1 && _20e == "only") { return; } var _210 = _20d, _211; var _212 = ary.length; for (var i = _212 - 1; i >= 0; i--) { var node = (_20f ? this._cloneNode(ary[i]) : ary[i]); if (ary._runParse && dojo.parser && dojo.parser.parse) { if (!_211) { _211 = _210.ownerDocument.createElement("div"); } _211.appendChild(node); dojo.parser.parse(_211); node = _211.firstChild; while (_211.firstChild) { _211.removeChild(_211.firstChild); } } if (i == _212 - 1) { dojo.place(node, _210, _20e); } else { _210.parentNode.insertBefore(node, _210); } _210 = node; } }, _stash: function (_213) { this._parent = _213; return this; }, end: function () { if (this._parent) { return this._parent; } else { return new this._NodeListCtor(); } }, concat: function (item) { var t = d.isArray(this) ? this : aps.call(this, 0), m = d.map(arguments, function (a) { return a && !d.isArray(a) && (typeof NodeList != "undefined" && a.constructor === NodeList || a.constructor === this._NodeListCtor) ? aps.call(a, 0) : a; }); return this._wrap(apc.apply(t, m), this); }, map: function (func, obj) { return this._wrap(d.map(this, func, obj), this); }, forEach: function (_214, _215) { d.forEach(this, _214, _215); return this; }, coords: _204(d.coords), position: _204(d.position), place: function (_216, _217) { var item = d.query(_216)[0]; return this.forEach(function (node) { d.place(node, item, _217); }); }, orphan: function (_218) { return (_218 ? d._filterQueryResult(this, _218) : this).forEach(_208); }, adopt: function (_219, _21a) { return d.query(_219).place(this[0], _21a)._stash(this); }, query: function (_21b) { if (!_21b) { return this; } var ret = this.map(function (node) { return d.query(_21b, node).filter(function (_21c) { return _21c !== undefined; }); }); return this._wrap(apc.apply([], ret), this); }, filter: function (_21d) { var a = arguments, _21e = this, _21f = 0; if (typeof _21d == "string") { _21e = d._filterQueryResult(this, a[0]); if (a.length == 1) { return _21e._stash(this); } _21f = 1; } return this._wrap(d.filter(_21e, a[_21f], a[_21f + 1]), this); }, addContent: function (_220, _221) { _220 = this._normalize(_220, this[0]); for (var i = 0, node; node = this[i]; i++) { this._place(_220, node, _221, i > 0); } return this; }, instantiate: function (_222, _223) { var c = d.isFunction(_222) ? _222 : d.getObject(_222); _223 = _223 || {}; return this.forEach(function (node) { new c(_223, node); }); }, at: function () { var t = new this._NodeListCtor(); d.forEach(arguments, function (i) { if (i < 0) { i = this.length + i; } if (this[i]) { t.push(this[i]); } }, this); return t._stash(this); } }); nl.events = ["blur", "focus", "change", "click", "error", "keydown", "keypress", "keyup", "load", "mousedown", "mouseenter", "mouseleave", "mousemove", "mouseout", "mouseover", "mouseup", "submit"]; d.forEach(nl.events, function (evt) { var _224 = "on" + evt; nlp[_224] = function (a, b) { return this.connect(_224, a, b); }; }); })(); } if (!dojo._hasResource["dojo._base.query"]) { dojo._hasResource["dojo._base.query"] = true; if (typeof dojo != "undefined") { dojo.provide("dojo._base.query"); } (function (d) { var trim = d.trim; var each = d.forEach; var qlc = d._NodeListCtor = d.NodeList; var _225 = function () { return d.doc; }; var _226 = ((d.isWebKit || d.isMozilla) && ((_225().compatMode) == "BackCompat")); var _227 = !!_225().firstChild["children"] ? "children" : "childNodes"; var _228 = ">~+"; var _229 = false; var _22a = function () { return true; }; var _22b = function (_22c) { if (_228.indexOf(_22c.slice(-1)) >= 0) { _22c += " * "; } else { _22c += " "; } var ts = function (s, e) { return trim(_22c.slice(s, e)); }; var _22d = []; var _22e = -1, _22f = -1, _230 = -1, _231 = -1, _232 = -1, inId = -1, _233 = -1, lc = "", cc = "", _234; var x = 0, ql = _22c.length, _235 = null, _236 = null; var _237 = function () { if (_233 >= 0) { var tv = (_233 == x) ? null : ts(_233, x); _235[(_228.indexOf(tv) < 0) ? "tag" : "oper"] = tv; _233 = -1; } }; var _238 = function () { if (inId >= 0) { _235.id = ts(inId, x).replace(/\\/g, ""); inId = -1; } }; var _239 = function () { if (_232 >= 0) { _235.classes.push(ts(_232 + 1, x).replace(/\\/g, "")); _232 = -1; } }; var _23a = function () { _238(); _237(); _239(); }; var _23b = function () { _23a(); if (_231 >= 0) { _235.pseudos.push({ name: ts(_231 + 1, x) }); } _235.loops = (_235.pseudos.length || _235.attrs.length || _235.classes.length); _235.oquery = _235.query = ts(_234, x); _235.otag = _235.tag = (_235["oper"]) ? null : (_235.tag || "*"); if (_235.tag) { _235.tag = _235.tag.toUpperCase(); } if (_22d.length && (_22d[_22d.length - 1].oper)) { _235.infixOper = _22d.pop(); _235.query = _235.infixOper.query + " " + _235.query; } _22d.push(_235); _235 = null; }; for (; lc = cc, cc = _22c.charAt(x), x < ql; x++) { if (lc == "\\") { continue; } if (!_235) { _234 = x; _235 = { query: null, pseudos: [], attrs: [], classes: [], tag: null, oper: null, id: null, getTag: function () { return (_229) ? this.otag : this.tag; } }; _233 = x; } if (_22e >= 0) { if (cc == "]") { if (!_236.attr) { _236.attr = ts(_22e + 1, x); } else { _236.matchFor = ts((_230 || _22e + 1), x); } var cmf = _236.matchFor; if (cmf) { if ((cmf.charAt(0) == "\"") || (cmf.charAt(0) == "'")) { _236.matchFor = cmf.slice(1, -1); } } _235.attrs.push(_236); _236 = null; _22e = _230 = -1; } else { if (cc == "=") { var _23c = ("|~^$*".indexOf(lc) >= 0) ? lc : ""; _236.type = _23c + cc; _236.attr = ts(_22e + 1, x - _23c.length); _230 = x + 1; } } } else { if (_22f >= 0) { if (cc == ")") { if (_231 >= 0) { _236.value = ts(_22f + 1, x); } _231 = _22f = -1; } } else { if (cc == "#") { _23a(); inId = x + 1; } else { if (cc == ".") { _23a(); _232 = x; } else { if (cc == ":") { _23a(); _231 = x; } else { if (cc == "[") { _23a(); _22e = x; _236 = {}; } else { if (cc == "(") { if (_231 >= 0) { _236 = { name: ts(_231 + 1, x), value: null }; _235.pseudos.push(_236); } _22f = x; } else { if ((cc == " ") && (lc != cc)) { _23b(); } } } } } } } } } return _22d; }; var _23d = function (_23e, _23f) { if (!_23e) { return _23f; } if (!_23f) { return _23e; } return function () { return _23e.apply(window, arguments) && _23f.apply(window, arguments); }; }; var _240 = function (i, arr) { var r = arr || []; if (i) { r.push(i); } return r; }; var _241 = function (n) { return (1 == n.nodeType); }; var _242 = ""; var _243 = function (elem, attr) { if (!elem) { return _242; } if (attr == "class") { return elem.className || _242; } if (attr == "for") { return elem.htmlFor || _242; } if (attr == "style") { return elem.style.cssText || _242; } return (_229 ? elem.getAttribute(attr) : elem.getAttribute(attr, 2)) || _242; }; var _244 = { "*=": function (attr, _245) { return function (elem) { return (_243(elem, attr).indexOf(_245) >= 0); }; }, "^=": function (attr, _246) { return function (elem) { return (_243(elem, attr).indexOf(_246) == 0); }; }, "$=": function (attr, _247) { var tval = " " + _247; return function (elem) { var ea = " " + _243(elem, attr); return (ea.lastIndexOf(_247) == (ea.length - _247.length)); }; }, "~=": function (attr, _248) { var tval = " " + _248 + " "; return function (elem) { var ea = " " + _243(elem, attr) + " "; return (ea.indexOf(tval) >= 0); }; }, "|=": function (attr, _249) { var _24a = " " + _249 + "-"; return function (elem) { var ea = " " + _243(elem, attr); return ((ea == _249) || (ea.indexOf(_24a) == 0)); }; }, "=": function (attr, _24b) { return function (elem) { return (_243(elem, attr) == _24b); }; } }; var _24c = (typeof _225().firstChild.nextElementSibling == "undefined"); var _24d = !_24c ? "nextElementSibling" : "nextSibling"; var _24e = !_24c ? "previousElementSibling" : "previousSibling"; var _24f = (_24c ? _241 : _22a); var _250 = function (node) { while (node = node[_24e]) { if (_24f(node)) { return false; } } return true; }; var _251 = function (node) { while (node = node[_24d]) { if (_24f(node)) { return false; } } return true; }; var _252 = function (node) { var root = node.parentNode; var i = 0, tret = root[_227], ci = (node["_i"] || -1), cl = (root["_l"] || -1); if (!tret) { return -1; } var l = tret.length; if (cl == l && ci >= 0 && cl >= 0) { return ci; } root["_l"] = l; ci = -1; for (var te = root["firstElementChild"] || root["firstChild"]; te; te = te[_24d]) { if (_24f(te)) { te["_i"] = ++i; if (node === te) { ci = i; } } } return ci; }; var _253 = function (elem) { return !((_252(elem)) % 2); }; var _254 = function (elem) { return ((_252(elem)) % 2); }; var _255 = { "checked": function (name, _256) { return function (elem) { return !!("checked" in elem ? elem.checked : elem.selected); }; }, "first-child": function () { return _250; }, "last-child": function () { return _251; }, "only-child": function (name, _257) { return function (node) { if (!_250(node)) { return false; } if (!_251(node)) { return false; } return true; }; }, "empty": function (name, _258) { return function (elem) { var cn = elem.childNodes; var cnl = elem.childNodes.length; for (var x = cnl - 1; x >= 0; x--) { var nt = cn[x].nodeType; if ((nt === 1) || (nt == 3)) { return false; } } return true; }; }, "contains": function (name, _259) { var cz = _259.charAt(0); if (cz == "\"" || cz == "'") { _259 = _259.slice(1, -1); } return function (elem) { return (elem.innerHTML.indexOf(_259) >= 0); }; }, "not": function (name, _25a) { var p = _22b(_25a)[0]; var _25b = { el: 1 }; if (p.tag != "*") { _25b.tag = 1; } if (!p.classes.length) { _25b.classes = 1; } var ntf = _25c(p, _25b); return function (elem) { return (!ntf(elem)); }; }, "nth-child": function (name, _25d) { var pi = parseInt; if (_25d == "odd") { return _254; } else { if (_25d == "even") { return _253; } } if (_25d.indexOf("n") != -1) { var _25e = _25d.split("n", 2); var pred = _25e[0] ? ((_25e[0] == "-") ? -1 : pi(_25e[0])) : 1; var idx = _25e[1] ? pi(_25e[1]) : 0; var lb = 0, ub = -1; if (pred > 0) { if (idx < 0) { idx = (idx % pred) && (pred + (idx % pred)); } else { if (idx > 0) { if (idx >= pred) { lb = idx - idx % pred; } idx = idx % pred; } } } else { if (pred < 0) { pred *= -1; if (idx > 0) { ub = idx; idx = idx % pred; } } } if (pred > 0) { return function (elem) { var i = _252(elem); return (i >= lb) && (ub < 0 || i <= ub) && ((i % pred) == idx); }; } else { _25d = idx; } } var _25f = pi(_25d); return function (elem) { return (_252(elem) == _25f); }; } }; var _260 = (d.isIE) ? function (cond) { var clc = cond.toLowerCase(); if (clc == "class") { cond = "className"; } return function (elem) { return (_229 ? elem.getAttribute(cond) : elem[cond] || elem[clc]); }; } : function (cond) { return function (elem) { return (elem && elem.getAttribute && elem.hasAttribute(cond)); }; }; var _25c = function (_261, _262) { if (!_261) { return _22a; } _262 = _262 || {}; var ff = null; if (!("el" in _262)) { ff = _23d(ff, _241); } if (!("tag" in _262)) { if (_261.tag != "*") { ff = _23d(ff, function (elem) { return (elem && (elem.tagName == _261.getTag())); }); } } if (!("classes" in _262)) { each(_261.classes, function (_263, idx, arr) { var re = new RegExp("(?:^|\\s)" + _263 + "(?:\\s|$)"); ff = _23d(ff, function (elem) { return re.test(elem.className); }); ff.count = idx; }); } if (!("pseudos" in _262)) { each(_261.pseudos, function (_264) { var pn = _264.name; if (_255[pn]) { ff = _23d(ff, _255[pn](pn, _264.value)); } }); } if (!("attrs" in _262)) { each(_261.attrs, function (attr) { var _265; var a = attr.attr; if (attr.type && _244[attr.type]) { _265 = _244[attr.type](a, attr.matchFor); } else { if (a.length) { _265 = _260(a); } } if (_265) { ff = _23d(ff, _265); } }); } if (!("id" in _262)) { if (_261.id) { ff = _23d(ff, function (elem) { return (!!elem && (elem.id == _261.id)); }); } } if (!ff) { if (!("default" in _262)) { ff = _22a; } } return ff; }; var _266 = function (_267) { return function (node, ret, bag) { while (node = node[_24d]) { if (_24c && (!_241(node))) { continue; } if ((!bag || _268(node, bag)) && _267(node)) { ret.push(node); } break; } return ret; }; }; var _269 = function (_26a) { return function (root, ret, bag) { var te = root[_24d]; while (te) { if (_24f(te)) { if (bag && !_268(te, bag)) { break; } if (_26a(te)) { ret.push(te); } } te = te[_24d]; } return ret; }; }; var _26b = function (_26c) { _26c = _26c || _22a; return function (root, ret, bag) { var te, x = 0, tret = root[_227]; while (te = tret[x++]) { if (_24f(te) && (!bag || _268(te, bag)) && (_26c(te, x))) { ret.push(te); } } return ret; }; }; var _26d = function (node, root) { var pn = node.parentNode; while (pn) { if (pn == root) { break; } pn = pn.parentNode; } return !!pn; }; var _26e = {}; var _26f = function (_270) { var _271 = _26e[_270.query]; if (_271) { return _271; } var io = _270.infixOper; var oper = (io ? io.oper : ""); var _272 = _25c(_270, { el: 1 }); var qt = _270.tag; var _273 = ("*" == qt); var ecs = _225()["getElementsByClassName"]; if (!oper) { if (_270.id) { _272 = (!_270.loops && _273) ? _22a : _25c(_270, { el: 1, id: 1 }); _271 = function (root, arr) { var te = d.byId(_270.id, (root.ownerDocument || root)); if (!te || !_272(te)) { return; } if (9 == root.nodeType) { return _240(te, arr); } else { if (_26d(te, root)) { return _240(te, arr); } } }; } else { if (ecs && /\{\s*\[native code\]\s*\}/.test(String(ecs)) && _270.classes.length && !_226) { _272 = _25c(_270, { el: 1, classes: 1, id: 1 }); var _274 = _270.classes.join(" "); _271 = function (root, arr, bag) { var ret = _240(0, arr), te, x = 0; var tret = root.getElementsByClassName(_274); while ((te = tret[x++])) { if (_272(te, root) && _268(te, bag)) { ret.push(te); } } return ret; }; } else { if (!_273 && !_270.loops) { _271 = function (root, arr, bag) { var ret = _240(0, arr), te, x = 0; var tret = root.getElementsByTagName(_270.getTag()); while ((te = tret[x++])) { if (_268(te, bag)) { ret.push(te); } } return ret; }; } else { _272 = _25c(_270, { el: 1, tag: 1, id: 1 }); _271 = function (root, arr, bag) { var ret = _240(0, arr), te, x = 0; var tret = root.getElementsByTagName(_270.getTag()); while ((te = tret[x++])) { if (_272(te, root) && _268(te, bag)) { ret.push(te); } } return ret; }; } } } } else { var _275 = { el: 1 }; if (_273) { _275.tag = 1; } _272 = _25c(_270, _275); if ("+" == oper) { _271 = _266(_272); } else { if ("~" == oper) { _271 = _269(_272); } else { if (">" == oper) { _271 = _26b(_272); } } } } return _26e[_270.query] = _271; }; var _276 = function (root, _277) { var _278 = _240(root), qp, x, te, qpl = _277.length, bag, ret; for (var i = 0; i < qpl; i++) { ret = []; qp = _277[i]; x = _278.length - 1; if (x > 0) { bag = {}; ret.nozip = true; } var gef = _26f(qp); for (var j = 0; (te = _278[j]); j++) { gef(te, ret, bag); } if (!ret.length) { break; } _278 = ret; } return ret; }; var _279 = {}, _27a = {}; var _27b = function (_27c) { var _27d = _22b(trim(_27c)); if (_27d.length == 1) { var tef = _26f(_27d[0]); return function (root) { var r = tef(root, new qlc()); if (r) { r.nozip = true; } return r; }; } return function (root) { return _276(root, _27d); }; }; var nua = navigator.userAgent; var wk = "WebKit/"; var _27e = (d.isWebKit && (nua.indexOf(wk) > 0) && (parseFloat(nua.split(wk)[1]) > 528)); var _27f = d.isIE ? "commentStrip" : "nozip"; var qsa = "querySelectorAll"; var _280 = (!!_225()[qsa] && (!d.isSafari || (d.isSafari > 3.1) || _27e)); var _281 = /n\+\d|([^ ])?([>~+])([^ =])?/g; var _282 = function (_283, pre, ch, post) { return ch ? (pre ? pre + " " : "") + ch + (post ? " " + post : "") : _283; }; var _284 = function (_285, _286) { _285 = _285.replace(_281, _282); if (_280) { var _287 = _27a[_285]; if (_287 && !_286) { return _287; } } var _288 = _279[_285]; if (_288) { return _288; } var qcz = _285.charAt(0); var _289 = (-1 == _285.indexOf(" ")); if ((_285.indexOf("#") >= 0) && (_289)) { _286 = true; } var _28a = (_280 && (!_286) && (_228.indexOf(qcz) == -1) && (!d.isIE || (_285.indexOf(":") == -1)) && (!(_226 && (_285.indexOf(".") >= 0))) && (_285.indexOf(":contains") == -1) && (_285.indexOf(":checked") == -1) && (_285.indexOf("|=") == -1)); if (_28a) { var tq = (_228.indexOf(_285.charAt(_285.length - 1)) >= 0) ? (_285 + " *") : _285; return _27a[_285] = function (root) { try { if (!((9 == root.nodeType) || _289)) { throw ""; } var r = root[qsa](tq); r[_27f] = true; return r; } catch (e) { return _284(_285, true)(root); } }; } else { var _28b = _285.split(/\s*,\s*/); return _279[_285] = ((_28b.length < 2) ? _27b(_285) : function (root) { var _28c = 0, ret = [], tp; while ((tp = _28b[_28c++])) { ret = ret.concat(_27b(tp)(root)); } return ret; }); } }; var _28d = 0; var _28e = d.isIE ? function (node) { if (_229) { return (node.getAttribute("_uid") || node.setAttribute("_uid", ++_28d) || _28d); } else { return node.uniqueID; } } : function (node) { return (node._uid || (node._uid = ++_28d)); }; var _268 = function (node, bag) { if (!bag) { return 1; } var id = _28e(node); if (!bag[id]) { return bag[id] = 1; } return 0; }; var _28f = "_zipIdx"; var _290 = function (arr) { if (arr && arr.nozip) { return (qlc._wrap) ? qlc._wrap(arr) : arr; } var ret = new qlc(); if (!arr || !arr.length) { return ret; } if (arr[0]) { ret.push(arr[0]); } if (arr.length < 2) { return ret; } _28d++; if (d.isIE && _229) { var _291 = _28d + ""; arr[0].setAttribute(_28f, _291); for (var x = 1, te; te = arr[x]; x++) { if (arr[x].getAttribute(_28f) != _291) { ret.push(te); } te.setAttribute(_28f, _291); } } else { if (d.isIE && arr.commentStrip) { try { for (var x = 1, te; te = arr[x]; x++) { if (_241(te)) { ret.push(te); } } } catch (e) { } } else { if (arr[0]) { arr[0][_28f] = _28d; } for (var x = 1, te; te = arr[x]; x++) { if (arr[x][_28f] != _28d) { ret.push(te); } te[_28f] = _28d; } } } return ret; }; d.query = function (_292, root) { qlc = d._NodeListCtor; if (!_292) { return new qlc(); } if (_292.constructor == qlc) { return _292; } if (typeof _292 != "string") { return new qlc(_292); } if (typeof root == "string") { root = d.byId(root); if (!root) { return new qlc(); } } root = root || _225(); var od = root.ownerDocument || root.documentElement; _229 = (root.contentType && root.contentType == "application/xml") || (d.isOpera && (root.doctype || od.toString() == "[object XMLDocument]")) || (!!od) && (d.isIE ? od.xml : (root.xmlVersion || od.xmlVersion)); var r = _284(_292)(root); if (r && r.nozip && !qlc._wrap) { return r; } return _290(r); }; d.query.pseudos = _255; d._filterQueryResult = function (_293, _294) { var _295 = new d._NodeListCtor(); var _296 = _25c(_22b(_294)[0]); for (var x = 0, te; te = _293[x]; x++) { if (_296(te)) { _295.push(te); } } return _295; }; })(this["queryPortability"] || this["acme"] || dojo); } if (!dojo._hasResource["dojo._base.xhr"]) { dojo._hasResource["dojo._base.xhr"] = true; dojo.provide("dojo._base.xhr"); (function () { var _297 = dojo, cfg = _297.config; function _298(obj, name, _299) { if (_299 === null) { return; } var val = obj[name]; if (typeof val == "string") { obj[name] = [val, _299]; } else { if (_297.isArray(val)) { val.push(_299); } else { obj[name] = _299; } } }; dojo.fieldToObject = function (_29a) { var ret = null; var item = _297.byId(_29a); if (item) { var _29b = item.name; var type = (item.type || "").toLowerCase(); if (_29b && type && !item.disabled) { if (type == "radio" || type == "checkbox") { if (item.checked) { ret = item.value; } } else { if (item.multiple) { ret = []; _297.query("option", item).forEach(function (opt) { if (opt.selected) { ret.push(opt.value); } }); } else { ret = item.value; } } } } return ret; }; dojo.formToObject = function (_29c) { var ret = {}; var _29d = "file|submit|image|reset|button|"; _297.forEach(dojo.byId(_29c).elements, function (item) { var _29e = item.name; var type = (item.type || "").toLowerCase(); if (_29e && type && _29d.indexOf(type) == -1 && !item.disabled) { _298(ret, _29e, _297.fieldToObject(item)); if (type == "image") { ret[_29e + ".x"] = ret[_29e + ".y"] = ret[_29e].x = ret[_29e].y = 0; } } }); return ret; }; dojo.objectToQuery = function (map) { var enc = encodeURIComponent; var _29f = []; var _2a0 = {}; for (var name in map) { var _2a1 = map[name]; if (_2a1 != _2a0[name]) { var _2a2 = enc(name) + "="; if (_297.isArray(_2a1)) { for (var i = 0; i < _2a1.length; i++) { _29f.push(_2a2 + enc(_2a1[i])); } } else { _29f.push(_2a2 + enc(_2a1)); } } } return _29f.join("&"); }; dojo.formToQuery = function (_2a3) { return _297.objectToQuery(_297.formToObject(_2a3)); }; dojo.formToJson = function (_2a4, _2a5) { return _297.toJson(_297.formToObject(_2a4), _2a5); }; dojo.queryToObject = function (str) { var ret = {}; var qp = str.split("&"); var dec = decodeURIComponent; _297.forEach(qp, function (item) { if (item.length) { var _2a6 = item.split("="); var name = dec(_2a6.shift()); var val = dec(_2a6.join("=")); if (typeof ret[name] == "string") { ret[name] = [ret[name]]; } if (_297.isArray(ret[name])) { ret[name].push(val); } else { ret[name] = val; } } }); return ret; }; dojo._blockAsync = false; var _2a7 = _297._contentHandlers = dojo.contentHandlers = { text: function (xhr) { return xhr.responseText; }, json: function (xhr) { return _297.fromJson(xhr.responseText || null); }, "json-comment-filtered": function (xhr) { if (!dojo.config.useCommentedJson) { console.warn("Consider using the standard mimetype:application/json." + " json-commenting can introduce security issues. To" + " decrease the chances of hijacking, use the standard the 'json' handler and" + " prefix your json with: {}&&\n" + "Use djConfig.useCommentedJson=true to turn off this message."); } var _2a8 = xhr.responseText; var _2a9 = _2a8.indexOf("/*"); var _2aa = _2a8.lastIndexOf("*/"); if (_2a9 == -1 || _2aa == -1) { throw new Error("JSON was not comment filtered"); } return _297.fromJson(_2a8.substring(_2a9 + 2, _2aa)); }, javascript: function (xhr) { return _297.eval(xhr.responseText); }, xml: function (xhr) { var _2ab = xhr.responseXML; if (_297.isIE && (!_2ab || !_2ab.documentElement)) { var ms = function (n) { return "MSXML" + n + ".DOMDocument"; }; var dp = ["Microsoft.XMLDOM", ms(6), ms(4), ms(3), ms(2)]; _297.some(dp, function (p) { try { var dom = new ActiveXObject(p); dom.async = false; dom.loadXML(xhr.responseText); _2ab = dom; } catch (e) { return false; } return true; }); } return _2ab; }, "json-comment-optional": function (xhr) { if (xhr.responseText && /^[^{\[]*\/\*/.test(xhr.responseText)) { return _2a7["json-comment-filtered"](xhr); } else { return _2a7["json"](xhr); } } }; dojo._ioSetArgs = function (args, _2ac, _2ad, _2ae) { var _2af = { args: args, url: args.url }; var _2b0 = null; if (args.form) { var form = _297.byId(args.form); var _2b1 = form.getAttributeNode("action"); _2af.url = _2af.url || (_2b1 ? _2b1.value : null); _2b0 = _297.formToObject(form); } var _2b2 = [{}]; if (_2b0) { _2b2.push(_2b0); } if (args.content) { _2b2.push(args.content); } if (args.preventCache) { _2b2.push({ "dojo.preventCache": new Date().valueOf() }); } _2af.query = _297.objectToQuery(_297.mixin.apply(null, _2b2)); _2af.handleAs = args.handleAs || "text"; var d = new _297.Deferred(_2ac); d.addCallbacks(_2ad, function (_2b3) { return _2ae(_2b3, d); }); var ld = args.load; if (ld && _297.isFunction(ld)) { d.addCallback(function (_2b4) { return ld.call(args, _2b4, _2af); }); } var err = args.error; if (err && _297.isFunction(err)) { d.addErrback(function (_2b5) { return err.call(args, _2b5, _2af); }); } var _2b6 = args.handle; if (_2b6 && _297.isFunction(_2b6)) { d.addBoth(function (_2b7) { return _2b6.call(args, _2b7, _2af); }); } if (cfg.ioPublish && _297.publish && _2af.args.ioPublish !== false) { d.addCallbacks(function (res) { _297.publish("/dojo/io/load", [d, res]); return res; }, function (res) { _297.publish("/dojo/io/error", [d, res]); return res; }); d.addBoth(function (res) { _297.publish("/dojo/io/done", [d, res]); return res; }); } d.ioArgs = _2af; return d; }; var _2b8 = function (dfd) { dfd.canceled = true; var xhr = dfd.ioArgs.xhr; var _2b9 = typeof xhr.abort; if (_2b9 == "function" || _2b9 == "object" || _2b9 == "unknown") { xhr.abort(); } var err = dfd.ioArgs.error; if (!err) { err = new Error("xhr cancelled"); err.dojoType = "cancel"; } return err; }; var _2ba = function (dfd) { var ret = _2a7[dfd.ioArgs.handleAs](dfd.ioArgs.xhr); return ret === undefined ? null : ret; }; var _2bb = function (_2bc, dfd) { if (!dfd.ioArgs.args.failOk) { console.error(_2bc); } return _2bc; }; var _2bd = null; var _2be = []; var _2bf = 0; var _2c0 = function (dfd) { if (_2bf <= 0) { _2bf = 0; if (cfg.ioPublish && _297.publish && (!dfd || dfd && dfd.ioArgs.args.ioPublish !== false)) { _297.publish("/dojo/io/stop"); } } }; var _2c1 = function () { var now = (new Date()).getTime(); if (!_297._blockAsync) { for (var i = 0, tif; i < _2be.length && (tif = _2be[i]); i++) { var dfd = tif.dfd; var func = function () { if (!dfd || dfd.canceled || !tif.validCheck(dfd)) { _2be.splice(i--, 1); _2bf -= 1; } else { if (tif.ioCheck(dfd)) { _2be.splice(i--, 1); tif.resHandle(dfd); _2bf -= 1; } else { if (dfd.startTime) { if (dfd.startTime + (dfd.ioArgs.args.timeout || 0) < now) { _2be.splice(i--, 1); var err = new Error("timeout exceeded"); err.dojoType = "timeout"; dfd.errback(err); dfd.cancel(); _2bf -= 1; } } } } }; if (dojo.config.debugAtAllCosts) { func.call(this); } else { try { func.call(this); } catch (e) { dfd.errback(e); } } } } _2c0(dfd); if (!_2be.length) { clearInterval(_2bd); _2bd = null; return; } }; dojo._ioCancelAll = function () { try { _297.forEach(_2be, function (i) { try { i.dfd.cancel(); } catch (e) { } }); } catch (e) { } }; if (_297.isIE) { _297.addOnWindowUnload(_297._ioCancelAll); } _297._ioNotifyStart = function (dfd) { if (cfg.ioPublish && _297.publish && dfd.ioArgs.args.ioPublish !== false) { if (!_2bf) { _297.publish("/dojo/io/start"); } _2bf += 1; _297.publish("/dojo/io/send", [dfd]); } }; _297._ioWatch = function (dfd, _2c2, _2c3, _2c4) { var args = dfd.ioArgs.args; if (args.timeout) { dfd.startTime = (new Date()).getTime(); } _2be.push({ dfd: dfd, validCheck: _2c2, ioCheck: _2c3, resHandle: _2c4 }); if (!_2bd) { _2bd = setInterval(_2c1, 50); } if (args.sync) { _2c1(); } }; var _2c5 = "application/x-www-form-urlencoded"; var _2c6 = function (dfd) { return dfd.ioArgs.xhr.readyState; }; var _2c7 = function (dfd) { return 4 == dfd.ioArgs.xhr.readyState; }; var _2c8 = function (dfd) { var xhr = dfd.ioArgs.xhr; if (_297._isDocumentOk(xhr)) { dfd.callback(dfd); } else { var err = new Error("Unable to load " + dfd.ioArgs.url + " status:" + xhr.status); err.status = xhr.status; err.responseText = xhr.responseText; dfd.errback(err); } }; dojo._ioAddQueryToUrl = function (_2c9) { if (_2c9.query.length) { _2c9.url += (_2c9.url.indexOf("?") == -1 ? "?" : "&") + _2c9.query; _2c9.query = null; } }; dojo.xhr = function (_2ca, args, _2cb) { var dfd = _297._ioSetArgs(args, _2b8, _2ba, _2bb); var _2cc = dfd.ioArgs; var xhr = _2cc.xhr = _297._xhrObj(_2cc.args); if (!xhr) { dfd.cancel(); return dfd; } if ("postData" in args) { _2cc.query = args.postData; } else { if ("putData" in args) { _2cc.query = args.putData; } else { if ("rawBody" in args) { _2cc.query = args.rawBody; } else { if ((arguments.length > 2 && !_2cb) || "POST|PUT".indexOf(_2ca.toUpperCase()) == -1) { _297._ioAddQueryToUrl(_2cc); } } } } xhr.open(_2ca, _2cc.url, args.sync !== true, args.user || undefined, args.password || undefined); if (args.headers) { for (var hdr in args.headers) { if (hdr.toLowerCase() === "content-type" && !args.contentType) { args.contentType = args.headers[hdr]; } else { if (args.headers[hdr]) { xhr.setRequestHeader(hdr, args.headers[hdr]); } } } } xhr.setRequestHeader("Content-Type", args.contentType || _2c5); if (!args.headers || !("X-Requested-With" in args.headers)) { xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest"); } _297._ioNotifyStart(dfd); if (dojo.config.debugAtAllCosts) { xhr.send(_2cc.query); } else { try { xhr.send(_2cc.query); } catch (e) { _2cc.error = e; dfd.cancel(); } } _297._ioWatch(dfd, _2c6, _2c7, _2c8); xhr = null; return dfd; }; dojo.xhrGet = function (args) { return _297.xhr("GET", args); }; dojo.rawXhrPost = dojo.xhrPost = function (args) { return _297.xhr("POST", args, true); }; dojo.rawXhrPut = dojo.xhrPut = function (args) { return _297.xhr("PUT", args, true); }; dojo.xhrDelete = function (args) { return _297.xhr("DELETE", args); }; })(); } if (!dojo._hasResource["dojo._base.fx"]) { dojo._hasResource["dojo._base.fx"] = true; dojo.provide("dojo._base.fx"); (function () { var d = dojo; var _2cd = d._mixin; dojo._Line = function (_2ce, end) { this.start = _2ce; this.end = end; }; dojo._Line.prototype.getValue = function (n) { return ((this.end - this.start) * n) + this.start; }; dojo.Animation = function (args) { _2cd(this, args); if (d.isArray(this.curve)) { this.curve = new d._Line(this.curve[0], this.curve[1]); } }; d._Animation = d.Animation; d.extend(dojo.Animation, { duration: 350, repeat: 0, rate: 20, _percent: 0, _startRepeatCount: 0, _getStep: function () { var _2cf = this._percent, _2d0 = this.easing; return _2d0 ? _2d0(_2cf) : _2cf; }, _fire: function (evt, args) { var a = args || []; if (this[evt]) { if (d.config.debugAtAllCosts) { this[evt].apply(this, a); } else { try { this[evt].apply(this, a); } catch (e) { console.error("exception in animation handler for:", evt); console.error(e); } } } return this; }, play: function (_2d1, _2d2) { var _2d3 = this; if (_2d3._delayTimer) { _2d3._clearTimer(); } if (_2d2) { _2d3._stopTimer(); _2d3._active = _2d3._paused = false; _2d3._percent = 0; } else { if (_2d3._active && !_2d3._paused) { return _2d3; } } _2d3._fire("beforeBegin", [_2d3.node]); var de = _2d1 || _2d3.delay, _2d4 = dojo.hitch(_2d3, "_play", _2d2); if (de > 0) { _2d3._delayTimer = setTimeout(_2d4, de); return _2d3; } _2d4(); return _2d3; }, _play: function (_2d5) { var _2d6 = this; if (_2d6._delayTimer) { _2d6._clearTimer(); } _2d6._startTime = new Date().valueOf(); if (_2d6._paused) { _2d6._startTime -= _2d6.duration * _2d6._percent; } _2d6._active = true; _2d6._paused = false; var _2d7 = _2d6.curve.getValue(_2d6._getStep()); if (!_2d6._percent) { if (!_2d6._startRepeatCount) { _2d6._startRepeatCount = _2d6.repeat; } _2d6._fire("onBegin", [_2d7]); } _2d6._fire("onPlay", [_2d7]); _2d6._cycle(); return _2d6; }, pause: function () { var _2d8 = this; if (_2d8._delayTimer) { _2d8._clearTimer(); } _2d8._stopTimer(); if (!_2d8._active) { return _2d8; } _2d8._paused = true; _2d8._fire("onPause", [_2d8.curve.getValue(_2d8._getStep())]); return _2d8; }, gotoPercent: function (_2d9, _2da) { var _2db = this; _2db._stopTimer(); _2db._active = _2db._paused = true; _2db._percent = _2d9; if (_2da) { _2db.play(); } return _2db; }, stop: function (_2dc) { var _2dd = this; if (_2dd._delayTimer) { _2dd._clearTimer(); } if (!_2dd._timer) { return _2dd; } _2dd._stopTimer(); if (_2dc) { _2dd._percent = 1; } _2dd._fire("onStop", [_2dd.curve.getValue(_2dd._getStep())]); _2dd._active = _2dd._paused = false; return _2dd; }, status: function () { if (this._active) { return this._paused ? "paused" : "playing"; } return "stopped"; }, _cycle: function () { var _2de = this; if (_2de._active) { var curr = new Date().valueOf(); var step = (curr - _2de._startTime) / (_2de.duration); if (step >= 1) { step = 1; } _2de._percent = step; if (_2de.easing) { step = _2de.easing(step); } _2de._fire("onAnimate", [_2de.curve.getValue(step)]); if (_2de._percent < 1) { _2de._startTimer(); } else { _2de._active = false; if (_2de.repeat > 0) { _2de.repeat--; _2de.play(null, true); } else { if (_2de.repeat == -1) { _2de.play(null, true); } else { if (_2de._startRepeatCount) { _2de.repeat = _2de._startRepeatCount; _2de._startRepeatCount = 0; } } } _2de._percent = 0; _2de._fire("onEnd", [_2de.node]); !_2de.repeat && _2de._stopTimer(); } } return _2de; }, _clearTimer: function () { clearTimeout(this._delayTimer); delete this._delayTimer; } }); var ctr = 0, _2df = null, _2e0 = { run: function () { } }; d.extend(d.Animation, { _startTimer: function () { if (!this._timer) { this._timer = d.connect(_2e0, "run", this, "_cycle"); ctr++; } if (!_2df) { _2df = setInterval(d.hitch(_2e0, "run"), this.rate); } }, _stopTimer: function () { if (this._timer) { d.disconnect(this._timer); this._timer = null; ctr--; } if (ctr <= 0) { clearInterval(_2df); _2df = null; ctr = 0; } } }); var _2e1 = d.isIE ? function (node) { var ns = node.style; if (!ns.width.length && d.style(node, "width") == "auto") { ns.width = "auto"; } } : function () { }; dojo._fade = function (args) { args.node = d.byId(args.node); var _2e2 = _2cd({ properties: {} }, args), _2e3 = (_2e2.properties.opacity = {}); _2e3.start = !("start" in _2e2) ? function () { return +d.style(_2e2.node, "opacity") || 0; } : _2e2.start; _2e3.end = _2e2.end; var anim = d.animateProperty(_2e2); d.connect(anim, "beforeBegin", d.partial(_2e1, _2e2.node)); return anim; }; dojo.fadeIn = function (args) { return d._fade(_2cd({ end: 1 }, args)); }; dojo.fadeOut = function (args) { return d._fade(_2cd({ end: 0 }, args)); }; dojo._defaultEasing = function (n) { return 0.5 + ((Math.sin((n + 1.5) * Math.PI)) / 2); }; var _2e4 = function (_2e5) { this._properties = _2e5; for (var p in _2e5) { var prop = _2e5[p]; if (prop.start instanceof d.Color) { prop.tempColor = new d.Color(); } } }; _2e4.prototype.getValue = function (r) { var ret = {}; for (var p in this._properties) { var prop = this._properties[p], _2e6 = prop.start; if (_2e6 instanceof d.Color) { ret[p] = d.blendColors(_2e6, prop.end, r, prop.tempColor).toCss(); } else { if (!d.isArray(_2e6)) { ret[p] = ((prop.end - _2e6) * r) + _2e6 + (p != "opacity" ? prop.units || "px" : 0); } } } return ret; }; dojo.animateProperty = function (args) { var n = args.node = d.byId(args.node); if (!args.easing) { args.easing = d._defaultEasing; } var anim = new d.Animation(args); d.connect(anim, "beforeBegin", anim, function () { var pm = {}; for (var p in this.properties) { if (p == "width" || p == "height") { this.node.display = "block"; } var prop = this.properties[p]; if (d.isFunction(prop)) { prop = prop(n); } prop = pm[p] = _2cd({}, (d.isObject(prop) ? prop : { end: prop })); if (d.isFunction(prop.start)) { prop.start = prop.start(n); } if (d.isFunction(prop.end)) { prop.end = prop.end(n); } var _2e7 = (p.toLowerCase().indexOf("color") >= 0); function _2e8(node, p) { var v = { height: node.offsetHeight, width: node.offsetWidth}[p]; if (v !== undefined) { return v; } v = d.style(node, p); return (p == "opacity") ? +v : (_2e7 ? v : parseFloat(v)); }; if (!("end" in prop)) { prop.end = _2e8(n, p); } else { if (!("start" in prop)) { prop.start = _2e8(n, p); } } if (_2e7) { prop.start = new d.Color(prop.start); prop.end = new d.Color(prop.end); } else { prop.start = (p == "opacity") ? +prop.start : parseFloat(prop.start); } } this.curve = new _2e4(pm); }); d.connect(anim, "onAnimate", d.hitch(d, "style", anim.node)); return anim; }; dojo.anim = function (node, _2e9, _2ea, _2eb, _2ec, _2ed) { return d.animateProperty({ node: node, duration: _2ea || d.Animation.prototype.duration, properties: _2e9, easing: _2eb, onEnd: _2ec }).play(_2ed || 0); }; })(); } if (!dojo._hasResource["dojo.i18n"]) { dojo._hasResource["dojo.i18n"] = true; dojo.provide("dojo.i18n"); dojo.i18n.getLocalization = function (_2ee, _2ef, _2f0) { _2f0 = dojo.i18n.normalizeLocale(_2f0); var _2f1 = _2f0.split("-"); var _2f2 = [_2ee, "nls", _2ef].join("."); var _2f3 = dojo._loadedModules[_2f2]; if (_2f3) { var _2f4; for (var i = _2f1.length; i > 0; i--) { var loc = _2f1.slice(0, i).join("_"); if (_2f3[loc]) { _2f4 = _2f3[loc]; break; } } if (!_2f4) { _2f4 = _2f3.ROOT; } if (_2f4) { var _2f5 = function () { }; _2f5.prototype = _2f4; return new _2f5(); } } throw new Error("Bundle not found: " + _2ef + " in " + _2ee + " , locale=" + _2f0); }; dojo.i18n.normalizeLocale = function (_2f6) { var _2f7 = _2f6 ? _2f6.toLowerCase() : dojo.locale; if (_2f7 == "root") { _2f7 = "ROOT"; } return _2f7; }; dojo.i18n._requireLocalization = function (_2f8, _2f9, _2fa, _2fb) { var _2fc = dojo.i18n.normalizeLocale(_2fa); var _2fd = [_2f8, "nls", _2f9].join("."); var _2fe = ""; if (_2fb) { var _2ff = _2fb.split(","); for (var i = 0; i < _2ff.length; i++) { if (_2fc["indexOf"](_2ff[i]) == 0) { if (_2ff[i].length > _2fe.length) { _2fe = _2ff[i]; } } } if (!_2fe) { _2fe = "ROOT"; } } var _300 = _2fb ? _2fe : _2fc; var _301 = dojo._loadedModules[_2fd]; var _302 = null; if (_301) { if (dojo.config.localizationComplete && _301._built) { return; } var _303 = _300.replace(/-/g, "_"); var _304 = _2fd + "." + _303; _302 = dojo._loadedModules[_304]; } if (!_302) { _301 = dojo["provide"](_2fd); var syms = dojo._getModuleSymbols(_2f8); var _305 = syms.concat("nls").join("/"); var _306; dojo.i18n._searchLocalePath(_300, _2fb, function (loc) { var _307 = loc.replace(/-/g, "_"); var _308 = _2fd + "." + _307; var _309 = false; if (!dojo._loadedModules[_308]) { dojo["provide"](_308); var _30a = [_305]; if (loc != "ROOT") { _30a.push(loc); } _30a.push(_2f9); var _30b = _30a.join("/") + ".js"; _309 = dojo._loadPath(_30b, null, function (hash) { var _30c = function () { }; _30c.prototype = _306; _301[_307] = new _30c(); for (var j in hash) { _301[_307][j] = hash[j]; } }); } else { _309 = true; } if (_309 && _301[_307]) { _306 = _301[_307]; } else { _301[_307] = _306; } if (_2fb) { return true; } }); } if (_2fb && _2fc != _2fe) { _301[_2fc.replace(/-/g, "_")] = _301[_2fe.replace(/-/g, "_")]; } }; (function () { var _30d = dojo.config.extraLocale; if (_30d) { if (!_30d instanceof Array) { _30d = [_30d]; } var req = dojo.i18n._requireLocalization; dojo.i18n._requireLocalization = function (m, b, _30e, _30f) { req(m, b, _30e, _30f); if (_30e) { return; } for (var i = 0; i < _30d.length; i++) { req(m, b, _30d[i], _30f); } }; } })(); dojo.i18n._searchLocalePath = function (_310, down, _311) { _310 = dojo.i18n.normalizeLocale(_310); var _312 = _310.split("-"); var _313 = []; for (var i = _312.length; i > 0; i--) { _313.push(_312.slice(0, i).join("-")); } _313.push(false); if (down) { _313.reverse(); } for (var j = _313.length - 1; j >= 0; j--) { var loc = _313[j] || "ROOT"; var stop = _311(loc); if (stop) { break; } } }; dojo.i18n._preloadLocalizations = function (_314, _315) { function _316(_317) { _317 = dojo.i18n.normalizeLocale(_317); dojo.i18n._searchLocalePath(_317, true, function (loc) { for (var i = 0; i < _315.length; i++) { if (_315[i] == loc) { dojo["require"](_314 + "_" + loc); return true; } } return false; }); }; _316(); var _318 = dojo.config.extraLocale || []; for (var i = 0; i < _318.length; i++) { _316(_318[i]); } }; } if (!dojo._hasResource["dojo._base.browser"]) { dojo._hasResource["dojo._base.browser"] = true; dojo.provide("dojo._base.browser"); dojo.forEach(dojo.config.require, function (i) { dojo["require"](i); }); } if (dojo.isBrowser && (document.readyState === "complete" || dojo.config.afterOnLoad)) { window.setTimeout(dojo._loadInit, 100); } })();

/*
COPYRIGHT 2009 ESRI

TRADE SECRETS: ESRI PROPRIETARY AND CONFIDENTIAL
Unpublished material - all rights reserved under the
Copyright Laws of the United States and applicable international
laws, treaties, and conventions.

For additional information, contact:
Environmental Systems Research Institute, Inc.
Attn: Contracts and Legal Services Department
380 New York Street
Redlands, California, 92373
USA

email: contracts@esri.com
*/

(function () { var _1 = window[(typeof (djConfig) != "undefined" && djConfig.scopeMap && djConfig.scopeMap[0][1]) || "dojo"]; var _2 = window[(typeof (djConfig) != "undefined" && djConfig.scopeMap && djConfig.scopeMap[1][1]) || "dijit"]; var _3 = window[(typeof (djConfig) != "undefined" && djConfig.scopeMap && djConfig.scopeMap[2][1]) || "dojox"]; _1.registerModulePath("esri", (location.protocol === 'file:' ? 'http:' : location.protocol) + '//' + "api.location-world.com/arcgis_js_api/library/2.1/arcgis/js/esri"); _1.mixin(typeof esri == "undefined" ? window.esri = {} : esri, { _dojoScopeName: _1._scopeName, _dijitScopeName: _2._scopeName, _dojoxScopeName: _3._scopeName, version: 2.1, config: { defaults: { screenDPI: 96, map: { width: 400, height: 400, layerNamePrefix: "layer", graphicsLayerNamePrefix: "graphicsLayer", slider: { left: "30px", top: "30px", width: null, height: "200px" }, sliderLabel: { tick: 5, labels: null, style: "width:2em; font-family:Verdana; font-size:75%;" }, sliderChangeImmediate: true, zoomSymbol: { color: [0, 0, 0, 64], outline: { color: [255, 0, 0, 255], width: 1.25, style: "esriSLSSolid" }, style: "esriSFSSolid" }, zoomDuration: 250, zoomRate: 25, panDuration: 250, panRate: 25, logoLink: "http://www.esri.com" }, io: { errorHandler: function (_4, io) { _1.publish("esri.Error", [_4]); }, proxyUrl: null, alwaysUseProxy: false, postLength: 2000, timeout: 60000}}} }); var _5 = navigator.userAgent, _6; esri.isiPhone = esri.isAndroid = 0; _6 = _5.match(/(iPhone|iPad|CPU)\s+OS\s+(\d+\_\d+)/i); if (_6) { esri.isiPhone = parseFloat(_6[2].replace("_", ".")); } _6 = _5.match(/Android\s+(\d+\.\d+)/i); if (_6) { esri.isAndroid = parseFloat(_6[1]); } esri.isTouchEnabled = (esri.isiPhone || esri.isAndroid) ? true : false; esriConfig = esri.config; (function () { var h = document.getElementsByTagName("head")[0], _7 = [_1.moduleUrl("esri", "../../css/jsapi.css"), _1.moduleUrl("esri", "dijit/css/InfoWindow.css")], _8 = { rel: "stylesheet", type: "text/css", media: "all" }; _1.forEach(_7, function (_9) { _8.href = _9.toString(); _1.create("link", _8, h); }); })(); } ());
(function () {
  var dojo = window[esri._dojoScopeName]; var dijit = window[esri._dijitScopeName]; var dojox = window[esri._dojoxScopeName]; /*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/

  /*
  This is an optimized version of Dojo, built for deployment and not for
  development. To get sources and documentation, please visit:

  http://dojotoolkit.org
  */

  if (!dojo._hasResource["dijit._base.manager"]) { dojo._hasResource["dijit._base.manager"] = true; dojo.provide("dijit._base.manager"); dojo.declare("dijit.WidgetSet", null, { constructor: function () { this._hash = {}; this.length = 0; }, add: function (_1) { if (this._hash[_1.id]) { throw new Error("Tried to register widget with id==" + _1.id + " but that id is already registered"); } this._hash[_1.id] = _1; this.length++; }, remove: function (id) { if (this._hash[id]) { delete this._hash[id]; this.length--; } }, forEach: function (_2, _3) { _3 = _3 || dojo.global; var i = 0, id; for (id in this._hash) { _2.call(_3, this._hash[id], i++, this._hash); } return this; }, filter: function (_4, _5) { _5 = _5 || dojo.global; var _6 = new dijit.WidgetSet(), i = 0, id; for (id in this._hash) { var w = this._hash[id]; if (_4.call(_5, w, i++, this._hash)) { _6.add(w); } } return _6; }, byId: function (id) { return this._hash[id]; }, byClass: function (_7) { var _8 = new dijit.WidgetSet(), id, _9; for (id in this._hash) { _9 = this._hash[id]; if (_9.declaredClass == _7) { _8.add(_9); } } return _8; }, toArray: function () { var ar = []; for (var id in this._hash) { ar.push(this._hash[id]); } return ar; }, map: function (_a, _b) { return dojo.map(this.toArray(), _a, _b); }, every: function (_c, _d) { _d = _d || dojo.global; var x = 0, i; for (i in this._hash) { if (!_c.call(_d, this._hash[i], x++, this._hash)) { return false; } } return true; }, some: function (_e, _f) { _f = _f || dojo.global; var x = 0, i; for (i in this._hash) { if (_e.call(_f, this._hash[i], x++, this._hash)) { return true; } } return false; } }); (function () { dijit.registry = new dijit.WidgetSet(); var _10 = dijit.registry._hash, _11 = dojo.attr, _12 = dojo.hasAttr, _13 = dojo.style; dijit.byId = function (id) { return typeof id == "string" ? _10[id] : id; }; var _14 = {}; dijit.getUniqueId = function (_15) { var id; do { id = _15 + "_" + (_15 in _14 ? ++_14[_15] : _14[_15] = 0); } while (_10[id]); return dijit._scopeName == "dijit" ? id : dijit._scopeName + "_" + id; }; dijit.findWidgets = function (_16) { var _17 = []; function _18(_19) { for (var _1a = _19.firstChild; _1a; _1a = _1a.nextSibling) { if (_1a.nodeType == 1) { var _1b = _1a.getAttribute("widgetId"); if (_1b) { _17.push(_10[_1b]); } else { _18(_1a); } } } }; _18(_16); return _17; }; dijit._destroyAll = function () { dijit._curFocus = null; dijit._prevFocus = null; dijit._activeStack = []; dojo.forEach(dijit.findWidgets(dojo.body()), function (_1c) { if (!_1c._destroyed) { if (_1c.destroyRecursive) { _1c.destroyRecursive(); } else { if (_1c.destroy) { _1c.destroy(); } } } }); }; if (dojo.isIE) { dojo.addOnWindowUnload(function () { dijit._destroyAll(); }); } dijit.byNode = function (_1d) { return _10[_1d.getAttribute("widgetId")]; }; dijit.getEnclosingWidget = function (_1e) { while (_1e) { var id = _1e.getAttribute && _1e.getAttribute("widgetId"); if (id) { return _10[id]; } _1e = _1e.parentNode; } return null; }; var _1f = (dijit._isElementShown = function (_20) { var s = _13(_20); return (s.visibility != "hidden") && (s.visibility != "collapsed") && (s.display != "none") && (_11(_20, "type") != "hidden"); }); dijit.hasDefaultTabStop = function (_21) { switch (_21.nodeName.toLowerCase()) { case "a": return _12(_21, "href"); case "area": case "button": case "input": case "object": case "select": case "textarea": return true; case "iframe": if (dojo.isMoz) { try { return _21.contentDocument.designMode == "on"; } catch (err) { return false; } } else { if (dojo.isWebKit) { var doc = _21.contentDocument, _22 = doc && doc.body; return _22 && _22.contentEditable == "true"; } else { try { doc = _21.contentWindow.document; _22 = doc && doc.body; return _22 && _22.firstChild && _22.firstChild.contentEditable == "true"; } catch (e) { return false; } } } default: return _21.contentEditable == "true"; } }; var _23 = (dijit.isTabNavigable = function (_24) { if (_11(_24, "disabled")) { return false; } else { if (_12(_24, "tabIndex")) { return _11(_24, "tabIndex") >= 0; } else { return dijit.hasDefaultTabStop(_24); } } }); dijit._getTabNavigable = function (_25) { var _26, _27, _28, _29, _2a, _2b; var _2c = function (_2d) { dojo.query("> *", _2d).forEach(function (_2e) { if ((dojo.isIE && _2e.scopeName !== "HTML") || !_1f(_2e)) { return; } if (_23(_2e)) { var _2f = _11(_2e, "tabIndex"); if (!_12(_2e, "tabIndex") || _2f == 0) { if (!_26) { _26 = _2e; } _27 = _2e; } else { if (_2f > 0) { if (!_28 || _2f < _29) { _29 = _2f; _28 = _2e; } if (!_2a || _2f >= _2b) { _2b = _2f; _2a = _2e; } } } } if (_2e.nodeName.toUpperCase() != "SELECT") { _2c(_2e); } }); }; if (_1f(_25)) { _2c(_25); } return { first: _26, last: _27, lowest: _28, highest: _2a }; }; dijit.getFirstInTabbingOrder = function (_30) { var _31 = dijit._getTabNavigable(dojo.byId(_30)); return _31.lowest ? _31.lowest : _31.first; }; dijit.getLastInTabbingOrder = function (_32) { var _33 = dijit._getTabNavigable(dojo.byId(_32)); return _33.last ? _33.last : _33.highest; }; dijit.defaultDuration = dojo.config["defaultDuration"] || 200; })(); } if (!dojo._hasResource["dojox.gfx._base"]) { dojo._hasResource["dojox.gfx._base"] = true; dojo.provide("dojox.gfx._base"); (function () { var g = dojox.gfx, b = g._base; g._hasClass = function (_34, _35) { var cls = _34.getAttribute("className"); return cls && (" " + cls + " ").indexOf(" " + _35 + " ") >= 0; }; g._addClass = function (_36, _37) { var cls = _36.getAttribute("className") || ""; if (!cls || (" " + cls + " ").indexOf(" " + _37 + " ") < 0) { _36.setAttribute("className", cls + (cls ? " " : "") + _37); } }; g._removeClass = function (_38, _39) { var cls = _38.getAttribute("className"); if (cls) { _38.setAttribute("className", cls.replace(new RegExp("(^|\\s+)" + _39 + "(\\s+|$)"), "$1$2")); } }; b._getFontMeasurements = function () { var _3a = { "1em": 0, "1ex": 0, "100%": 0, "12pt": 0, "16px": 0, "xx-small": 0, "x-small": 0, "small": 0, "medium": 0, "large": 0, "x-large": 0, "xx-large": 0 }; if (dojo.isIE) { dojo.doc.documentElement.style.fontSize = "100%"; } var div = dojo.doc.createElement("div"); var s = div.style; s.position = "absolute"; s.left = "-100px"; s.top = "0px"; s.width = "30px"; s.height = "1000em"; s.borderWidth = "0px"; s.margin = "0px"; s.padding = "0px"; s.outline = "none"; s.lineHeight = "1"; s.overflow = "hidden"; dojo.body().appendChild(div); for (var p in _3a) { div.style.fontSize = p; _3a[p] = Math.round(div.offsetHeight * 12 / 16) * 16 / 12 / 1000; } dojo.body().removeChild(div); div = null; return _3a; }; var _3b = null; b._getCachedFontMeasurements = function (_3c) { if (_3c || !_3b) { _3b = b._getFontMeasurements(); } return _3b; }; var _3d = null, _3e = {}; b._getTextBox = function (_3f, _40, _41) { var m, s, al = arguments.length; if (!_3d) { m = _3d = dojo.doc.createElement("div"); s = m.style; s.position = "absolute"; s.left = "-10000px"; s.top = "0"; dojo.body().appendChild(m); } else { m = _3d; s = m.style; } m.className = ""; s.borderWidth = "0"; s.margin = "0"; s.padding = "0"; s.outline = "0"; if (al > 1 && _40) { for (var i in _40) { if (i in _3e) { continue; } s[i] = _40[i]; } } if (al > 2 && _41) { m.className = _41; } m.innerHTML = _3f; if (m["getBoundingClientRect"]) { var bcr = m.getBoundingClientRect(); return { l: bcr.left, t: bcr.top, w: bcr.width || (bcr.right - bcr.left), h: bcr.height || (bcr.bottom - bcr.top) }; } else { return dojo.marginBox(m); } }; var _42 = 0; b._getUniqueId = function () { var id; do { id = dojo._scopeName + "Unique" + (++_42); } while (dojo.byId(id)); return id; }; })(); dojo.mixin(dojox.gfx, { defaultPath: { type: "path", path: "" }, defaultPolyline: { type: "polyline", points: [] }, defaultRect: { type: "rect", x: 0, y: 0, width: 100, height: 100, r: 0 }, defaultEllipse: { type: "ellipse", cx: 0, cy: 0, rx: 200, ry: 100 }, defaultCircle: { type: "circle", cx: 0, cy: 0, r: 100 }, defaultLine: { type: "line", x1: 0, y1: 0, x2: 100, y2: 100 }, defaultImage: { type: "image", x: 0, y: 0, width: 0, height: 0, src: "" }, defaultText: { type: "text", x: 0, y: 0, text: "", align: "start", decoration: "none", rotated: false, kerning: true }, defaultTextPath: { type: "textpath", text: "", align: "start", decoration: "none", rotated: false, kerning: true }, defaultStroke: { type: "stroke", color: "black", style: "solid", width: 1, cap: "butt", join: 4 }, defaultLinearGradient: { type: "linear", x1: 0, y1: 0, x2: 100, y2: 100, colors: [{ offset: 0, color: "black" }, { offset: 1, color: "white"}] }, defaultRadialGradient: { type: "radial", cx: 0, cy: 0, r: 100, colors: [{ offset: 0, color: "black" }, { offset: 1, color: "white"}] }, defaultPattern: { type: "pattern", x: 0, y: 0, width: 0, height: 0, src: "" }, defaultFont: { type: "font", style: "normal", variant: "normal", weight: "normal", size: "10pt", family: "serif" }, getDefault: (function () { var _43 = {}; return function (_44) { var t = _43[_44]; if (t) { return new t(); } t = _43[_44] = new Function; t.prototype = dojox.gfx["default" + _44]; return new t(); }; })(), normalizeColor: function (_45) { return (_45 instanceof dojo.Color) ? _45 : new dojo.Color(_45); }, normalizeParameters: function (_46, _47) { if (_47) { var _48 = {}; for (var x in _46) { if (x in _47 && !(x in _48)) { _46[x] = _47[x]; } } } return _46; }, makeParameters: function (_49, _4a) { if (!_4a) { return dojo.delegate(_49); } var _4b = {}; for (var i in _49) { if (!(i in _4b)) { _4b[i] = dojo.clone((i in _4a) ? _4a[i] : _49[i]); } } return _4b; }, formatNumber: function (x, _4c) { var val = x.toString(); if (val.indexOf("e") >= 0) { val = x.toFixed(4); } else { var _4d = val.indexOf("."); if (_4d >= 0 && val.length - _4d > 5) { val = x.toFixed(4); } } if (x < 0) { return val; } return _4c ? " " + val : val; }, makeFontString: function (_4e) { return _4e.style + " " + _4e.variant + " " + _4e.weight + " " + _4e.size + " " + _4e.family; }, splitFontString: function (str) { var _4f = dojox.gfx.getDefault("Font"); var t = str.split(/\s+/); do { if (t.length < 5) { break; } _4f.style = t[0]; _4f.variant = t[1]; _4f.weight = t[2]; var i = t[3].indexOf("/"); _4f.size = i < 0 ? t[3] : t[3].substring(0, i); var j = 4; if (i < 0) { if (t[4] == "/") { j = 6; } else { if (t[4].charAt(0) == "/") { j = 5; } } } if (j < t.length) { _4f.family = t.slice(j).join(" "); } } while (false); return _4f; }, cm_in_pt: 72 / 2.54, mm_in_pt: 7.2 / 2.54, px_in_pt: function () { return dojox.gfx._base._getCachedFontMeasurements()["12pt"] / 12; }, pt2px: function (len) { return len * dojox.gfx.px_in_pt(); }, px2pt: function (len) { return len / dojox.gfx.px_in_pt(); }, normalizedLength: function (len) { if (len.length == 0) { return 0; } if (len.length > 2) { var _50 = dojox.gfx.px_in_pt(); var val = parseFloat(len); switch (len.slice(-2)) { case "px": return val; case "pt": return val * _50; case "in": return val * 72 * _50; case "pc": return val * 12 * _50; case "mm": return val * dojox.gfx.mm_in_pt * _50; case "cm": return val * dojox.gfx.cm_in_pt * _50; } } return parseFloat(len); }, pathVmlRegExp: /([A-Za-z]+)|(\d+(\.\d+)?)|(\.\d+)|(-\d+(\.\d+)?)|(-\.\d+)/g, pathSvgRegExp: /([A-Za-z])|(\d+(\.\d+)?)|(\.\d+)|(-\d+(\.\d+)?)|(-\.\d+)/g, equalSources: function (a, b) { return a && b && a == b; } }); } if (!dojo._hasResource["esri.WKIDUnitConversion"]) { dojo._hasResource["esri.WKIDUnitConversion"] = true; dojo.provide("esri.WKIDUnitConversion"); esri.WKIDUnitConversion = { values: [1, 0.2011661949, 0.3047997101815088, 0.3048006096012192, 0.3048, 0.304797265, 0.9143985307444408, 20.11678249437587, 0.9143984146160287, 20.11676512155263, 0.3047994715386762, 0.91439523, 50000, 150000], 2000: 0, 2001: 0, 2002: 0, 2003: 0, 2004: 0, 2005: 0, 2006: 0, 2007: 0, 2008: 0, 2009: 0, 2010: 0, 2011: 0, 2012: 0, 2013: 0, 2014: 0, 2015: 0, 2016: 0, 2017: 0, 2018: 0, 2019: 0, 2020: 0, 2021: 0, 2022: 0, 2023: 0, 2024: 0, 2025: 0, 2026: 0, 2027: 0, 2028: 0, 2029: 0, 2030: 0, 2031: 0, 2032: 0, 2033: 0, 2034: 0, 2035: 0, 2036: 0, 2037: 0, 2038: 0, 2039: 0, 2040: 0, 2041: 0, 2042: 0, 2043: 0, 2044: 0, 2045: 0, 2056: 0, 2057: 0, 2058: 0, 2059: 0, 2060: 0, 2061: 0, 2062: 0, 2063: 0, 2064: 0, 2065: 0, 2066: 1, 2067: 0, 2068: 0, 2069: 0, 2070: 0, 2071: 0, 2072: 0, 2073: 0, 2074: 0, 2075: 0, 2076: 0, 2077: 0, 2078: 0, 2079: 0, 2080: 0, 2081: 0, 2082: 0, 2083: 0, 2084: 0, 2085: 0, 2086: 0, 2087: 0, 2088: 0, 2089: 0, 2090: 0, 2091: 0, 2092: 0, 2093: 0, 2094: 0, 2095: 0, 2096: 0, 2097: 0, 2098: 0, 2099: 0, 2100: 0, 2101: 0, 2102: 0, 2103: 0, 2104: 0, 2105: 0, 2106: 0, 2107: 0, 2108: 0, 2109: 0, 2110: 0, 2111: 0, 2112: 0, 2113: 0, 2114: 0, 2115: 0, 2116: 0, 2117: 0, 2118: 0, 2119: 0, 2120: 0, 2121: 0, 2122: 0, 2123: 0, 2124: 0, 2125: 0, 2126: 0, 2127: 0, 2128: 0, 2129: 0, 2130: 0, 2131: 0, 2132: 0, 2133: 0, 2134: 0, 2135: 0, 2136: 2, 2137: 0, 2138: 0, 2139: 0, 2140: 0, 2141: 0, 2142: 0, 2143: 0, 2144: 0, 2145: 0, 2146: 0, 2147: 0, 2148: 0, 2149: 0, 2150: 0, 2151: 0, 2152: 0, 2153: 0, 2154: 0, 2155: 3, 2157: 0, 2158: 0, 2159: 2, 2160: 2, 2161: 0, 2162: 0, 2163: 0, 2164: 0, 2165: 0, 2166: 0, 2167: 0, 2168: 0, 2169: 0, 2170: 0, 2172: 0, 2173: 0, 2174: 0, 2175: 0, 2176: 0, 2177: 0, 2178: 0, 2179: 0, 2180: 0, 2181: 0, 2182: 0, 2183: 0, 2184: 0, 2185: 0, 2186: 0, 2187: 0, 2188: 0, 2189: 0, 2190: 0, 2192: 0, 2193: 0, 2195: 0, 2196: 0, 2197: 0, 2198: 0, 2200: 0, 2201: 0, 2202: 0, 2203: 0, 2204: 3, 2205: 0, 2206: 0, 2207: 0, 2208: 0, 2209: 0, 2210: 0, 2211: 0, 2212: 0, 2213: 0, 2214: 0, 2215: 0, 2216: 0, 2217: 0, 2219: 0, 2220: 0, 2222: 4, 2223: 4, 2224: 4, 2225: 3, 2226: 3, 2227: 3, 2228: 3, 2229: 3, 2230: 3, 2231: 3, 2232: 3, 2233: 3, 2234: 3, 2235: 3, 2236: 3, 2237: 3, 2238: 3, 2239: 3, 2240: 3, 2241: 3, 2242: 3, 2243: 3, 2244: 3, 2245: 3, 2246: 3, 2247: 3, 2248: 3, 2249: 3, 2250: 3, 2251: 4, 2252: 4, 2253: 4, 2254: 3, 2255: 3, 2256: 4, 2257: 3, 2258: 3, 2259: 3, 2260: 3, 2261: 3, 2262: 3, 2263: 3, 2264: 3, 2265: 4, 2266: 4, 2267: 3, 2268: 3, 2269: 4, 2270: 4, 2271: 3, 2272: 3, 2273: 4, 2274: 3, 2275: 3, 2276: 3, 2277: 3, 2278: 3, 2279: 3, 2280: 4, 2281: 4, 2282: 4, 2283: 3, 2284: 3, 2285: 3, 2286: 3, 2287: 3, 2288: 3, 2289: 3, 2290: 0, 2291: 0, 2292: 0, 2294: 0, 2295: 0, 2308: 0, 2309: 0, 2310: 0, 2311: 0, 2312: 0, 2313: 0, 2314: 5, 2315: 0, 2316: 0, 2317: 0, 2318: 0, 2319: 0, 2320: 0, 2321: 0, 2322: 0, 2323: 0, 2324: 0, 2325: 0, 2326: 0, 2327: 0, 2328: 0, 2329: 0, 2330: 0, 2331: 0, 2332: 0, 2333: 0, 2334: 0, 2335: 0, 2336: 0, 2337: 0, 2338: 0, 2339: 0, 2340: 0, 2341: 0, 2342: 0, 2343: 0, 2344: 0, 2345: 0, 2346: 0, 2347: 0, 2348: 0, 2349: 0, 2350: 0, 2351: 0, 2352: 0, 2353: 0, 2354: 0, 2355: 0, 2356: 0, 2357: 0, 2358: 0, 2359: 0, 2360: 0, 2361: 0, 2362: 0, 2363: 0, 2364: 0, 2365: 0, 2366: 0, 2367: 0, 2368: 0, 2369: 0, 2370: 0, 2371: 0, 2372: 0, 2373: 0, 2374: 0, 2375: 0, 2376: 0, 2377: 0, 2378: 0, 2379: 0, 2380: 0, 2381: 0, 2382: 0, 2383: 0, 2384: 0, 2385: 0, 2386: 0, 2387: 0, 2388: 0, 2389: 0, 2390: 0, 2391: 0, 2392: 0, 2393: 0, 2394: 0, 2395: 0, 2396: 0, 2397: 0, 2398: 0, 2399: 0, 2400: 0, 2401: 0, 2402: 0, 2403: 0, 2404: 0, 2405: 0, 2406: 0, 2407: 0, 2408: 0, 2409: 0, 2410: 0, 2411: 0, 2412: 0, 2413: 0, 2414: 0, 2415: 0, 2416: 0, 2417: 0, 2418: 0, 2419: 0, 2420: 0, 2421: 0, 2422: 0, 2423: 0, 2424: 0, 2425: 0, 2426: 0, 2427: 0, 2428: 0, 2429: 0, 2430: 0, 2431: 0, 2432: 0, 2433: 0, 2434: 0, 2435: 0, 2436: 0, 2437: 0, 2438: 0, 2439: 0, 2440: 0, 2441: 0, 2442: 0, 2443: 0, 2444: 0, 2445: 0, 2446: 0, 2447: 0, 2448: 0, 2449: 0, 2450: 0, 2451: 0, 2452: 0, 2453: 0, 2454: 0, 2455: 0, 2456: 0, 2457: 0, 2458: 0, 2459: 0, 2460: 0, 2461: 0, 2462: 0, 2523: 0, 2524: 0, 2525: 0, 2526: 0, 2527: 0, 2528: 0, 2529: 0, 2530: 0, 2531: 0, 2532: 0, 2533: 0, 2534: 0, 2535: 0, 2536: 0, 2537: 0, 2538: 0, 2539: 0, 2540: 0, 2541: 0, 2542: 0, 2543: 0, 2544: 0, 2545: 0, 2546: 0, 2547: 0, 2548: 0, 2549: 0, 2550: 0, 2551: 0, 2552: 0, 2553: 0, 2554: 0, 2555: 0, 2556: 0, 2557: 0, 2558: 0, 2559: 0, 2560: 0, 2561: 0, 2562: 0, 2563: 0, 2564: 0, 2565: 0, 2566: 0, 2567: 0, 2568: 0, 2569: 0, 2570: 0, 2571: 0, 2572: 0, 2573: 0, 2574: 0, 2575: 0, 2576: 0, 2577: 0, 2578: 0, 2579: 0, 2580: 0, 2581: 0, 2582: 0, 2583: 0, 2584: 0, 2585: 0, 2586: 0, 2587: 0, 2588: 0, 2589: 0, 2590: 0, 2591: 0, 2592: 0, 2593: 0, 2594: 0, 2595: 0, 2596: 0, 2597: 0, 2598: 0, 2599: 0, 2600: 0, 2601: 0, 2602: 0, 2603: 0, 2604: 0, 2605: 0, 2606: 0, 2607: 0, 2608: 0, 2609: 0, 2610: 0, 2611: 0, 2612: 0, 2613: 0, 2614: 0, 2615: 0, 2616: 0, 2617: 0, 2618: 0, 2619: 0, 2620: 0, 2621: 0, 2622: 0, 2623: 0, 2624: 0, 2625: 0, 2626: 0, 2627: 0, 2628: 0, 2629: 0, 2630: 0, 2631: 0, 2632: 0, 2633: 0, 2634: 0, 2635: 0, 2636: 0, 2637: 0, 2638: 0, 2639: 0, 2640: 0, 2641: 0, 2642: 0, 2643: 0, 2644: 0, 2645: 0, 2646: 0, 2647: 0, 2648: 0, 2649: 0, 2650: 0, 2651: 0, 2652: 0, 2653: 0, 2654: 0, 2655: 0, 2656: 0, 2657: 0, 2658: 0, 2659: 0, 2660: 0, 2661: 0, 2662: 0, 2663: 0, 2664: 0, 2665: 0, 2666: 0, 2667: 0, 2668: 0, 2669: 0, 2670: 0, 2671: 0, 2672: 0, 2673: 0, 2674: 0, 2675: 0, 2676: 0, 2677: 0, 2678: 0, 2679: 0, 2680: 0, 2681: 0, 2682: 0, 2683: 0, 2684: 0, 2685: 0, 2686: 0, 2687: 0, 2688: 0, 2689: 0, 2690: 0, 2691: 0, 2692: 0, 2693: 0, 2694: 0, 2695: 0, 2696: 0, 2697: 0, 2698: 0, 2699: 0, 2700: 0, 2701: 0, 2702: 0, 2703: 0, 2704: 0, 2705: 0, 2706: 0, 2707: 0, 2708: 0, 2709: 0, 2710: 0, 2711: 0, 2712: 0, 2713: 0, 2714: 0, 2715: 0, 2716: 0, 2717: 0, 2718: 0, 2719: 0, 2720: 0, 2721: 0, 2722: 0, 2723: 0, 2724: 0, 2725: 0, 2726: 0, 2727: 0, 2728: 0, 2729: 0, 2730: 0, 2731: 0, 2732: 0, 2733: 0, 2734: 0, 2735: 0, 2736: 0, 2737: 0, 2738: 0, 2739: 0, 2740: 0, 2741: 0, 2742: 0, 2743: 0, 2744: 0, 2745: 0, 2746: 0, 2747: 0, 2748: 0, 2749: 0, 2750: 0, 2751: 0, 2752: 0, 2753: 0, 2754: 0, 2755: 0, 2756: 0, 2757: 0, 2758: 0, 2759: 0, 2760: 0, 2761: 0, 2762: 0, 2763: 0, 2764: 0, 2765: 0, 2766: 0, 2767: 0, 2768: 0, 2769: 0, 2770: 0, 2771: 0, 2772: 0, 2773: 0, 2774: 0, 2775: 0, 2776: 0, 2777: 0, 2778: 0, 2779: 0, 2780: 0, 2781: 0, 2782: 0, 2783: 0, 2784: 0, 2785: 0, 2786: 0, 2787: 0, 2788: 0, 2789: 0, 2790: 0, 2791: 0, 2792: 0, 2793: 0, 2794: 0, 2795: 0, 2796: 0, 2797: 0, 2798: 0, 2799: 0, 2800: 0, 2801: 0, 2802: 0, 2803: 0, 2804: 0, 2805: 0, 2806: 0, 2807: 0, 2808: 0, 2809: 0, 2810: 0, 2811: 0, 2812: 0, 2813: 0, 2814: 0, 2815: 0, 2816: 0, 2817: 0, 2818: 0, 2819: 0, 2820: 0, 2821: 0, 2822: 0, 2823: 0, 2824: 0, 2825: 0, 2826: 0, 2827: 0, 2828: 0, 2829: 0, 2830: 0, 2831: 0, 2832: 0, 2833: 0, 2834: 0, 2835: 0, 2836: 0, 2837: 0, 2838: 0, 2839: 0, 2840: 0, 2841: 0, 2842: 0, 2843: 0, 2844: 0, 2845: 0, 2846: 0, 2847: 0, 2848: 0, 2849: 0, 2850: 0, 2851: 0, 2852: 0, 2853: 0, 2854: 0, 2855: 0, 2856: 0, 2857: 0, 2858: 0, 2859: 0, 2860: 0, 2861: 0, 2862: 0, 2863: 0, 2864: 0, 2865: 0, 2866: 0, 2867: 4, 2868: 4, 2869: 4, 2870: 3, 2871: 3, 2872: 3, 2873: 3, 2874: 3, 2875: 3, 2876: 3, 2877: 3, 2878: 3, 2879: 3, 2880: 3, 2881: 3, 2882: 3, 2883: 3, 2884: 3, 2885: 3, 2886: 3, 2887: 3, 2888: 3, 2891: 3, 2892: 3, 2893: 3, 2894: 3, 2895: 3, 2896: 4, 2897: 4, 2898: 4, 2899: 3, 2900: 3, 2901: 4, 2902: 3, 2903: 3, 2904: 3, 2905: 3, 2906: 3, 2907: 3, 2908: 3, 2909: 4, 2910: 4, 2911: 3, 2912: 3, 2913: 4, 2914: 4, 2915: 3, 2916: 3, 2917: 3, 2918: 3, 2919: 3, 2920: 3, 2921: 4, 2922: 4, 2923: 4, 2924: 3, 2925: 3, 2926: 3, 2927: 3, 2928: 3, 2929: 3, 2930: 3, 2931: 0, 2932: 0, 2933: 0, 2935: 0, 2936: 0, 2937: 0, 2938: 0, 2939: 0, 2940: 0, 2941: 0, 2942: 0, 2943: 0, 2944: 0, 2945: 0, 2946: 0, 2947: 0, 2948: 0, 2949: 0, 2950: 0, 2951: 0, 2952: 0, 2953: 0, 2954: 0, 2955: 0, 2956: 0, 2957: 0, 2958: 0, 2959: 0, 2960: 0, 2961: 0, 2962: 0, 2964: 3, 2965: 3, 2966: 3, 2967: 3, 2968: 3, 2969: 0, 2970: 0, 2971: 0, 2972: 0, 2973: 0, 2975: 0, 2976: 0, 2977: 0, 2978: 0, 2979: 0, 2980: 0, 2981: 0, 2982: 0, 2984: 0, 2985: 0, 2986: 0, 2987: 0, 2988: 0, 2989: 0, 2991: 0, 2992: 4, 2993: 0, 2994: 4, 2995: 0, 2996: 0, 2997: 0, 2998: 0, 2999: 0, 3000: 0, 3001: 0, 3002: 0, 3003: 0, 3004: 0, 3005: 0, 3006: 0, 3007: 0, 3008: 0, 3009: 0, 3010: 0, 3011: 0, 3012: 0, 3013: 0, 3014: 0, 3015: 0, 3016: 0, 3017: 0, 3018: 0, 3019: 0, 3020: 0, 3021: 0, 3022: 0, 3023: 0, 3024: 0, 3025: 0, 3026: 0, 3027: 0, 3028: 0, 3029: 0, 3030: 0, 3031: 0, 3032: 0, 3033: 0, 3034: 0, 3035: 0, 3036: 0, 3037: 0, 3054: 0, 3055: 0, 3056: 0, 3057: 0, 3058: 0, 3059: 0, 3060: 0, 3061: 0, 3062: 0, 3063: 0, 3064: 0, 3065: 0, 3066: 0, 3067: 0, 3068: 0, 3069: 0, 3070: 0, 3071: 0, 3072: 0, 3073: 0, 3074: 0, 3075: 0, 3076: 0, 3077: 0, 3078: 0, 3079: 0, 3080: 4, 3081: 0, 3082: 0, 3083: 0, 3084: 0, 3085: 0, 3086: 0, 3087: 0, 3088: 0, 3089: 3, 3090: 0, 3091: 3, 3092: 0, 3093: 0, 3094: 0, 3095: 0, 3096: 0, 3097: 0, 3098: 0, 3099: 0, 3100: 0, 3101: 0, 3102: 3, 3106: 0, 3107: 0, 3108: 0, 3109: 0, 3110: 0, 3111: 0, 3112: 0, 3113: 0, 3114: 0, 3115: 0, 3116: 0, 3117: 0, 3118: 0, 3119: 0, 3120: 0, 3121: 0, 3122: 0, 3123: 0, 3124: 0, 3125: 0, 3126: 0, 3127: 0, 3128: 0, 3129: 0, 3130: 0, 3131: 0, 3132: 0, 3133: 0, 3134: 0, 3135: 0, 3136: 0, 3137: 0, 3138: 0, 3141: 0, 3142: 0, 3148: 0, 3149: 0, 3153: 0, 3154: 0, 3155: 0, 3156: 0, 3157: 0, 3158: 0, 3159: 0, 3160: 0, 3161: 0, 3162: 0, 3163: 0, 3164: 0, 3165: 0, 3166: 0, 3169: 0, 3170: 0, 3171: 0, 3172: 0, 3174: 0, 3175: 0, 3176: 0, 3177: 0, 3178: 0, 3179: 0, 3180: 0, 3181: 0, 3182: 0, 3183: 0, 3184: 0, 3185: 0, 3186: 0, 3187: 0, 3188: 0, 3189: 0, 3190: 0, 3191: 0, 3192: 0, 3193: 0, 3194: 0, 3195: 0, 3196: 0, 3197: 0, 3198: 0, 3199: 0, 3200: 0, 3201: 0, 3202: 0, 3203: 0, 3294: 0, 3296: 0, 3297: 0, 3298: 0, 3299: 0, 3300: 0, 3301: 0, 3302: 0, 3303: 0, 3304: 0, 3305: 0, 3306: 0, 3307: 0, 3308: 0, 3309: 0, 3310: 0, 3311: 0, 3312: 0, 3313: 0, 3314: 0, 3315: 0, 3316: 0, 3317: 0, 3318: 0, 3319: 0, 3320: 0, 3321: 0, 3322: 0, 3323: 0, 3324: 0, 3325: 0, 3326: 0, 3327: 0, 3328: 0, 3329: 0, 3330: 0, 3331: 0, 3332: 0, 3333: 0, 3334: 0, 3335: 0, 3336: 0, 3337: 0, 3338: 0, 3339: 0, 3340: 0, 3341: 0, 3342: 0, 3343: 0, 3344: 0, 3345: 0, 3346: 0, 3347: 0, 3348: 0, 3349: 0, 3350: 0, 3351: 0, 3352: 0, 3353: 0, 3354: 0, 3355: 0, 3356: 0, 3357: 0, 3358: 0, 3359: 3, 3360: 0, 3361: 4, 3362: 0, 3363: 3, 3364: 0, 3365: 3, 3366: 5, 3367: 0, 3368: 0, 3369: 0, 3370: 0, 3371: 0, 3372: 0, 3373: 0, 3374: 0, 3375: 0, 3376: 0, 3377: 0, 3378: 0, 3379: 0, 3380: 0, 3381: 0, 3382: 0, 3383: 0, 3384: 0, 3385: 0, 3386: 0, 3387: 0, 3388: 0, 3391: 0, 3392: 0, 3393: 0, 3394: 0, 3395: 0, 3396: 0, 3397: 0, 3398: 0, 3399: 0, 3400: 0, 3401: 0, 3402: 0, 3403: 0, 3404: 3, 3405: 0, 3406: 0, 3407: 5, 3408: 0, 3409: 0, 3410: 0, 3411: 0, 3412: 0, 3413: 0, 3414: 0, 3415: 0, 3416: 0, 3417: 3, 3418: 3, 3419: 3, 3420: 3, 3421: 3, 3422: 3, 3423: 3, 3424: 3, 3425: 3, 3426: 3, 3427: 3, 3428: 3, 3429: 3, 3430: 3, 3431: 3, 3432: 3, 3433: 3, 3434: 3, 3435: 3, 3436: 3, 3437: 3, 3438: 3, 3439: 0, 3440: 0, 3441: 3, 3442: 3, 3443: 3, 3444: 3, 3445: 3, 3446: 3, 3447: 0, 3448: 0, 3449: 0, 3450: 0, 3453: 3, 3456: 3, 3457: 3, 3458: 3, 3459: 3, 3460: 0, 3461: 0, 3462: 0, 3463: 0, 3464: 0, 3560: 3, 3561: 3, 3562: 3, 3563: 3, 3564: 3, 3565: 3, 3566: 3, 3567: 3, 3568: 3, 3569: 3, 3570: 3, 3571: 0, 3572: 0, 3573: 0, 3574: 0, 3575: 0, 3576: 0, 3577: 0, 3578: 0, 3579: 0, 3580: 0, 3581: 0, 3727: 0, 3734: 3, 3735: 3, 3736: 3, 3737: 3, 3738: 3, 3739: 3, 3753: 3, 3754: 3, 3755: 3, 3756: 3, 3757: 3, 3758: 3, 3759: 3, 3760: 3, 3761: 0, 3762: 0, 3763: 0, 3857: 0, 3920: 0, 3991: 3, 3992: 3, 20002: 0, 20003: 0, 20004: 0, 20005: 0, 20006: 0, 20007: 0, 20008: 0, 20009: 0, 20010: 0, 20011: 0, 20012: 0, 20013: 0, 20014: 0, 20015: 0, 20016: 0, 20017: 0, 20018: 0, 20019: 0, 20020: 0, 20021: 0, 20022: 0, 20023: 0, 20024: 0, 20025: 0, 20026: 0, 20027: 0, 20028: 0, 20029: 0, 20030: 0, 20031: 0, 20032: 0, 20062: 0, 20063: 0, 20064: 0, 20065: 0, 20066: 0, 20067: 0, 20068: 0, 20069: 0, 20070: 0, 20071: 0, 20072: 0, 20073: 0, 20074: 0, 20075: 0, 20076: 0, 20077: 0, 20078: 0, 20079: 0, 20080: 0, 20081: 0, 20082: 0, 20083: 0, 20084: 0, 20085: 0, 20086: 0, 20087: 0, 20088: 0, 20089: 0, 20090: 0, 20091: 0, 20092: 0, 20135: 0, 20136: 0, 20137: 0, 20138: 0, 20248: 0, 20249: 0, 20250: 0, 20251: 0, 20252: 0, 20253: 0, 20254: 0, 20255: 0, 20256: 0, 20257: 0, 20258: 0, 20348: 0, 20349: 0, 20350: 0, 20351: 0, 20352: 0, 20353: 0, 20354: 0, 20355: 0, 20356: 0, 20357: 0, 20358: 0, 20436: 0, 20437: 0, 20438: 0, 20439: 0, 20440: 0, 20499: 0, 20538: 0, 20539: 0, 20790: 0, 20822: 0, 20823: 0, 20824: 0, 20934: 0, 20935: 0, 20936: 0, 21035: 0, 21036: 0, 21037: 0, 21095: 0, 21096: 0, 21097: 0, 21148: 0, 21149: 0, 21150: 0, 21291: 0, 21292: 0, 21413: 0, 21414: 0, 21415: 0, 21416: 0, 21417: 0, 21418: 0, 21419: 0, 21420: 0, 21421: 0, 21422: 0, 21423: 0, 21473: 0, 21474: 0, 21475: 0, 21476: 0, 21477: 0, 21478: 0, 21479: 0, 21480: 0, 21481: 0, 21482: 0, 21483: 0, 21500: 0, 21780: 0, 21781: 0, 21817: 0, 21818: 0, 21891: 0, 21892: 0, 21893: 0, 21894: 0, 21896: 0, 21897: 0, 21898: 0, 21899: 0, 22032: 0, 22033: 0, 22091: 0, 22092: 0, 22171: 0, 22172: 0, 22173: 0, 22174: 0, 22175: 0, 22176: 0, 22177: 0, 22181: 0, 22182: 0, 22183: 0, 22184: 0, 22185: 0, 22186: 0, 22187: 0, 22191: 0, 22192: 0, 22193: 0, 22194: 0, 22195: 0, 22196: 0, 22197: 0, 22234: 0, 22235: 0, 22236: 0, 22332: 0, 22391: 0, 22392: 0, 22521: 0, 22522: 0, 22523: 0, 22524: 0, 22525: 0, 22700: 0, 22770: 0, 22780: 0, 22832: 0, 22991: 0, 22992: 0, 22993: 0, 22994: 0, 23028: 0, 23029: 0, 23030: 0, 23031: 0, 23032: 0, 23033: 0, 23034: 0, 23035: 0, 23036: 0, 23037: 0, 23038: 0, 23090: 0, 23095: 0, 23239: 0, 23240: 0, 23433: 0, 23700: 0, 23830: 0, 23831: 0, 23832: 0, 23833: 0, 23834: 0, 23835: 0, 23836: 0, 23837: 0, 23838: 0, 23839: 0, 23840: 0, 23841: 0, 23842: 0, 23843: 0, 23844: 0, 23845: 0, 23846: 0, 23847: 0, 23848: 0, 23849: 0, 23850: 0, 23851: 0, 23852: 0, 23853: 0, 23866: 0, 23867: 0, 23868: 0, 23869: 0, 23870: 0, 23871: 0, 23872: 0, 23877: 0, 23878: 0, 23879: 0, 23880: 0, 23881: 0, 23882: 0, 23883: 0, 23884: 0, 23886: 0, 23887: 0, 23888: 0, 23889: 0, 23890: 0, 23891: 0, 23892: 0, 23893: 0, 23894: 0, 23946: 0, 23947: 0, 23948: 0, 24047: 0, 24048: 0, 24100: 0, 24200: 0, 24305: 0, 24306: 0, 24311: 0, 24312: 0, 24313: 0, 24342: 0, 24343: 0, 24344: 0, 24345: 0, 24346: 0, 24347: 0, 24370: 6, 24371: 6, 24372: 6, 24373: 6, 24374: 6, 24375: 0, 24376: 0, 24377: 0, 24378: 0, 24379: 0, 24380: 0, 24381: 0, 24382: 6, 24383: 0, 24500: 0, 24547: 0, 24548: 0, 24571: 7, 24600: 0, 24718: 0, 24719: 0, 24720: 0, 24721: 0, 24817: 0, 24818: 0, 24819: 0, 24820: 0, 24821: 0, 24877: 0, 24878: 0, 24879: 0, 24880: 0, 24881: 0, 24882: 0, 24891: 0, 24892: 0, 24893: 0, 25000: 0, 25231: 0, 25391: 0, 25392: 0, 25393: 0, 25394: 0, 25395: 0, 25828: 0, 25829: 0, 25830: 0, 25831: 0, 25832: 0, 25833: 0, 25834: 0, 25835: 0, 25836: 0, 25837: 0, 25838: 0, 25884: 0, 25932: 0, 26191: 0, 26192: 0, 26193: 0, 26194: 0, 26195: 0, 26237: 0, 26331: 0, 26332: 0, 26391: 0, 26392: 0, 26393: 0, 26432: 0, 26591: 0, 26592: 0, 26632: 0, 26692: 0, 26701: 0, 26702: 0, 26703: 0, 26704: 0, 26705: 0, 26706: 0, 26707: 0, 26708: 0, 26709: 0, 26710: 0, 26711: 0, 26712: 0, 26713: 0, 26714: 0, 26715: 0, 26716: 0, 26717: 0, 26718: 0, 26719: 0, 26720: 0, 26721: 0, 26722: 0, 26729: 3, 26730: 3, 26731: 3, 26732: 3, 26733: 3, 26734: 3, 26735: 3, 26736: 3, 26737: 3, 26738: 3, 26739: 3, 26740: 3, 26741: 3, 26742: 3, 26743: 3, 26744: 3, 26745: 3, 26746: 3, 26747: 3, 26748: 3, 26749: 3, 26750: 3, 26751: 3, 26752: 3, 26753: 3, 26754: 3, 26755: 3, 26756: 3, 26757: 3, 26758: 3, 26759: 3, 26760: 3, 26761: 3, 26762: 3, 26763: 3, 26764: 3, 26765: 3, 26766: 3, 26767: 3, 26768: 3, 26769: 3, 26770: 3, 26771: 3, 26772: 3, 26773: 3, 26774: 3, 26775: 3, 26776: 3, 26777: 3, 26778: 3, 26779: 3, 26780: 3, 26781: 3, 26782: 3, 26783: 3, 26784: 3, 26785: 3, 26786: 3, 26787: 3, 26788: 3, 26789: 3, 26790: 3, 26791: 3, 26792: 3, 26793: 3, 26794: 3, 26795: 3, 26796: 3, 26797: 3, 26798: 3, 26799: 3, 26801: 3, 26802: 3, 26803: 3, 26811: 3, 26812: 3, 26813: 3, 26901: 0, 26902: 0, 26903: 0, 26904: 0, 26905: 0, 26906: 0, 26907: 0, 26908: 0, 26909: 0, 26910: 0, 26911: 0, 26912: 0, 26913: 0, 26914: 0, 26915: 0, 26916: 0, 26917: 0, 26918: 0, 26919: 0, 26920: 0, 26921: 0, 26922: 0, 26923: 0, 26929: 0, 26930: 0, 26931: 0, 26932: 0, 26933: 0, 26934: 0, 26935: 0, 26936: 0, 26937: 0, 26938: 0, 26939: 0, 26940: 0, 26941: 0, 26942: 0, 26943: 0, 26944: 0, 26945: 0, 26946: 0, 26948: 0, 26949: 0, 26950: 0, 26951: 0, 26952: 0, 26953: 0, 26954: 0, 26955: 0, 26956: 0, 26957: 0, 26958: 0, 26959: 0, 26960: 0, 26961: 0, 26962: 0, 26963: 0, 26964: 0, 26965: 0, 26966: 0, 26967: 0, 26968: 0, 26969: 0, 26970: 0, 26971: 0, 26972: 0, 26973: 0, 26974: 0, 26975: 0, 26976: 0, 26977: 0, 26978: 0, 26979: 0, 26980: 0, 26981: 0, 26982: 0, 26983: 0, 26984: 0, 26985: 0, 26986: 0, 26987: 0, 26988: 0, 26989: 0, 26990: 0, 26991: 0, 26992: 0, 26993: 0, 26994: 0, 26995: 0, 26996: 0, 26997: 0, 26998: 0, 27037: 0, 27038: 0, 27039: 0, 27040: 0, 27120: 0, 27200: 0, 27205: 0, 27206: 0, 27207: 0, 27208: 0, 27209: 0, 27210: 0, 27211: 0, 27212: 0, 27213: 0, 27214: 0, 27215: 0, 27216: 0, 27217: 0, 27218: 0, 27219: 0, 27220: 0, 27221: 0, 27222: 0, 27223: 0, 27224: 0, 27225: 0, 27226: 0, 27227: 0, 27228: 0, 27229: 0, 27230: 0, 27231: 0, 27232: 0, 27258: 0, 27259: 0, 27260: 0, 27291: 8, 27292: 8, 27391: 0, 27392: 0, 27393: 0, 27394: 0, 27395: 0, 27396: 0, 27397: 0, 27398: 0, 27429: 0, 27492: 0, 27500: 0, 27561: 0, 27562: 0, 27563: 0, 27564: 0, 27571: 0, 27572: 0, 27573: 0, 27574: 0, 27581: 0, 27582: 0, 27583: 0, 27584: 0, 27591: 0, 27592: 0, 27593: 0, 27594: 0, 27700: 0, 28191: 0, 28192: 0, 28193: 0, 28232: 0, 28348: 0, 28349: 0, 28350: 0, 28351: 0, 28352: 0, 28353: 0, 28354: 0, 28355: 0, 28356: 0, 28357: 0, 28358: 0, 28402: 0, 28403: 0, 28404: 0, 28405: 0, 28406: 0, 28407: 0, 28408: 0, 28409: 0, 28410: 0, 28411: 0, 28412: 0, 28413: 0, 28414: 0, 28415: 0, 28416: 0, 28417: 0, 28418: 0, 28419: 0, 28420: 0, 28421: 0, 28422: 0, 28423: 0, 28424: 0, 28425: 0, 28426: 0, 28427: 0, 28428: 0, 28429: 0, 28430: 0, 28431: 0, 28432: 0, 28462: 0, 28463: 0, 28464: 0, 28465: 0, 28466: 0, 28467: 0, 28468: 0, 28469: 0, 28470: 0, 28471: 0, 28472: 0, 28473: 0, 28474: 0, 28475: 0, 28476: 0, 28477: 0, 28478: 0, 28479: 0, 28480: 0, 28481: 0, 28482: 0, 28483: 0, 28484: 0, 28485: 0, 28486: 0, 28487: 0, 28488: 0, 28489: 0, 28490: 0, 28491: 0, 28492: 0, 28600: 0, 28991: 0, 28992: 0, 29100: 0, 29101: 0, 29118: 0, 29119: 0, 29120: 0, 29121: 0, 29122: 0, 29168: 0, 29169: 0, 29170: 0, 29171: 0, 29172: 0, 29177: 0, 29178: 0, 29179: 0, 29180: 0, 29181: 0, 29182: 0, 29183: 0, 29184: 0, 29185: 0, 29187: 0, 29188: 0, 29189: 0, 29190: 0, 29191: 0, 29192: 0, 29193: 0, 29194: 0, 29195: 0, 29220: 0, 29221: 0, 29333: 0, 29635: 0, 29636: 0, 29738: 0, 29739: 0, 29849: 0, 29850: 0, 29871: 9, 29872: 10, 29873: 0, 29900: 0, 29901: 0, 29902: 0, 29903: 0, 30161: 0, 30162: 0, 30163: 0, 30164: 0, 30165: 0, 30166: 0, 30167: 0, 30168: 0, 30169: 0, 30170: 0, 30171: 0, 30172: 0, 30173: 0, 30174: 0, 30175: 0, 30176: 0, 30177: 0, 30178: 0, 30179: 0, 30200: 1, 30339: 0, 30340: 0, 30491: 0, 30492: 0, 30493: 0, 30494: 0, 30591: 0, 30592: 0, 30729: 0, 30730: 0, 30731: 0, 30732: 0, 30791: 0, 30792: 0, 30800: 0, 31028: 0, 31121: 0, 31154: 0, 31170: 0, 31171: 0, 31251: 0, 31252: 0, 31253: 0, 31254: 0, 31255: 0, 31256: 0, 31257: 0, 31258: 0, 31259: 0, 31265: 0, 31266: 0, 31267: 0, 31268: 0, 31275: 0, 31276: 0, 31277: 0, 31278: 0, 31279: 0, 31281: 0, 31282: 0, 31283: 0, 31284: 0, 31285: 0, 31286: 0, 31287: 0, 31288: 0, 31289: 0, 31290: 0, 31291: 0, 31292: 0, 31293: 0, 31294: 0, 31295: 0, 31296: 0, 31297: 0, 31370: 0, 31461: 0, 31462: 0, 31463: 0, 31464: 0, 31465: 0, 31466: 0, 31467: 0, 31468: 0, 31469: 0, 31491: 0, 31492: 0, 31493: 0, 31494: 0, 31495: 0, 31528: 0, 31529: 0, 31600: 0, 31700: 0, 31838: 0, 31839: 0, 31901: 0, 31917: 0, 31918: 0, 31919: 0, 31920: 0, 31921: 0, 31922: 0, 31971: 0, 31972: 0, 31973: 0, 31974: 0, 31975: 0, 31976: 0, 31977: 0, 31978: 0, 31979: 0, 31980: 0, 31981: 0, 31982: 0, 31983: 0, 31984: 0, 31985: 0, 31986: 0, 31987: 0, 31988: 0, 31989: 0, 31990: 0, 31991: 0, 31992: 0, 31993: 0, 31994: 0, 31995: 0, 31996: 0, 31997: 0, 31998: 0, 31999: 0, 32000: 0, 32001: 3, 32002: 3, 32003: 3, 32005: 3, 32006: 3, 32007: 3, 32008: 3, 32009: 3, 32010: 3, 32011: 3, 32012: 3, 32013: 3, 32014: 3, 32015: 3, 32016: 3, 32017: 3, 32018: 3, 32019: 3, 32020: 3, 32021: 3, 32022: 3, 32023: 3, 32024: 3, 32025: 3, 32026: 3, 32027: 3, 32028: 3, 32029: 3, 32030: 3, 32031: 3, 32033: 3, 32034: 3, 32035: 3, 32036: 3, 32037: 3, 32038: 3, 32039: 3, 32040: 3, 32041: 3, 32042: 3, 32043: 3, 32044: 3, 32045: 3, 32046: 3, 32047: 3, 32048: 3, 32049: 3, 32050: 3, 32051: 3, 32052: 3, 32053: 3, 32054: 3, 32055: 3, 32056: 3, 32057: 3, 32058: 3, 32059: 3, 32060: 3, 32061: 0, 32062: 0, 32064: 3, 32065: 3, 32066: 3, 32067: 3, 32074: 3, 32075: 3, 32076: 3, 32077: 3, 32081: 0, 32082: 0, 32083: 0, 32084: 0, 32085: 0, 32086: 0, 32098: 0, 32099: 3, 32100: 0, 32104: 0, 32107: 0, 32108: 0, 32109: 0, 32110: 0, 32111: 0, 32112: 0, 32113: 0, 32114: 0, 32115: 0, 32116: 0, 32117: 0, 32118: 0, 32119: 0, 32120: 0, 32121: 0, 32122: 0, 32123: 0, 32124: 0, 32125: 0, 32126: 0, 32127: 0, 32128: 0, 32129: 0, 32130: 0, 32133: 0, 32134: 0, 32135: 0, 32136: 0, 32137: 0, 32138: 0, 32139: 0, 32140: 0, 32141: 0, 32142: 0, 32143: 0, 32144: 0, 32145: 0, 32146: 0, 32147: 0, 32148: 0, 32149: 0, 32150: 0, 32151: 0, 32152: 0, 32153: 0, 32154: 0, 32155: 0, 32156: 0, 32157: 0, 32158: 0, 32161: 0, 32164: 3, 32165: 3, 32166: 3, 32167: 3, 32180: 0, 32181: 0, 32182: 0, 32183: 0, 32184: 0, 32185: 0, 32186: 0, 32187: 0, 32188: 0, 32189: 0, 32190: 0, 32191: 0, 32192: 0, 32193: 0, 32194: 0, 32195: 0, 32196: 0, 32197: 0, 32198: 0, 32199: 0, 32201: 0, 32202: 0, 32203: 0, 32204: 0, 32205: 0, 32206: 0, 32207: 0, 32208: 0, 32209: 0, 32210: 0, 32211: 0, 32212: 0, 32213: 0, 32214: 0, 32215: 0, 32216: 0, 32217: 0, 32218: 0, 32219: 0, 32220: 0, 32221: 0, 32222: 0, 32223: 0, 32224: 0, 32225: 0, 32226: 0, 32227: 0, 32228: 0, 32229: 0, 32230: 0, 32231: 0, 32232: 0, 32233: 0, 32234: 0, 32235: 0, 32236: 0, 32237: 0, 32238: 0, 32239: 0, 32240: 0, 32241: 0, 32242: 0, 32243: 0, 32244: 0, 32245: 0, 32246: 0, 32247: 0, 32248: 0, 32249: 0, 32250: 0, 32251: 0, 32252: 0, 32253: 0, 32254: 0, 32255: 0, 32256: 0, 32257: 0, 32258: 0, 32259: 0, 32260: 0, 32301: 0, 32302: 0, 32303: 0, 32304: 0, 32305: 0, 32306: 0, 32307: 0, 32308: 0, 32309: 0, 32310: 0, 32311: 0, 32312: 0, 32313: 0, 32314: 0, 32315: 0, 32316: 0, 32317: 0, 32318: 0, 32319: 0, 32320: 0, 32321: 0, 32322: 0, 32323: 0, 32324: 0, 32325: 0, 32326: 0, 32327: 0, 32328: 0, 32329: 0, 32330: 0, 32331: 0, 32332: 0, 32333: 0, 32334: 0, 32335: 0, 32336: 0, 32337: 0, 32338: 0, 32339: 0, 32340: 0, 32341: 0, 32342: 0, 32343: 0, 32344: 0, 32345: 0, 32346: 0, 32347: 0, 32348: 0, 32349: 0, 32350: 0, 32351: 0, 32352: 0, 32353: 0, 32354: 0, 32355: 0, 32356: 0, 32357: 0, 32358: 0, 32359: 0, 32360: 0, 32601: 0, 32602: 0, 32603: 0, 32604: 0, 32605: 0, 32606: 0, 32607: 0, 32608: 0, 32609: 0, 32610: 0, 32611: 0, 32612: 0, 32613: 0, 32614: 0, 32615: 0, 32616: 0, 32617: 0, 32618: 0, 32619: 0, 32620: 0, 32621: 0, 32622: 0, 32623: 0, 32624: 0, 32625: 0, 32626: 0, 32627: 0, 32628: 0, 32629: 0, 32630: 0, 32631: 0, 32632: 0, 32633: 0, 32634: 0, 32635: 0, 32636: 0, 32637: 0, 32638: 0, 32639: 0, 32640: 0, 32641: 0, 32642: 0, 32643: 0, 32644: 0, 32645: 0, 32646: 0, 32647: 0, 32648: 0, 32649: 0, 32650: 0, 32651: 0, 32652: 0, 32653: 0, 32654: 0, 32655: 0, 32656: 0, 32657: 0, 32658: 0, 32659: 0, 32660: 0, 32661: 0, 32662: 0, 32664: 3, 32665: 3, 32666: 3, 32667: 3, 32701: 0, 32702: 0, 32703: 0, 32704: 0, 32705: 0, 32706: 0, 32707: 0, 32708: 0, 32709: 0, 32710: 0, 32711: 0, 32712: 0, 32713: 0, 32714: 0, 32715: 0, 32716: 0, 32717: 0, 32718: 0, 32719: 0, 32720: 0, 32721: 0, 32722: 0, 32723: 0, 32724: 0, 32725: 0, 32726: 0, 32727: 0, 32728: 0, 32729: 0, 32730: 0, 32731: 0, 32732: 0, 32733: 0, 32734: 0, 32735: 0, 32736: 0, 32737: 0, 32738: 0, 32739: 0, 32740: 0, 32741: 0, 32742: 0, 32743: 0, 32744: 0, 32745: 0, 32746: 0, 32747: 0, 32748: 0, 32749: 0, 32750: 0, 32751: 0, 32752: 0, 32753: 0, 32754: 0, 32755: 0, 32756: 0, 32757: 0, 32758: 0, 32759: 0, 32760: 0, 32761: 0, 32766: 0, 53001: 0, 53002: 0, 53003: 0, 53004: 0, 53008: 0, 53009: 0, 53010: 0, 53011: 0, 53012: 0, 53013: 0, 53014: 0, 53015: 0, 53016: 0, 53017: 0, 53018: 0, 53019: 0, 53021: 0, 53022: 0, 53023: 0, 53024: 0, 53025: 0, 53026: 0, 53027: 0, 53028: 0, 53029: 0, 53030: 0, 53031: 0, 53032: 0, 53034: 0, 53042: 0, 53043: 0, 53044: 0, 53045: 0, 53046: 0, 53048: 0, 53049: 0, 54001: 0, 54002: 0, 54003: 0, 54004: 0, 54008: 0, 54009: 0, 54010: 0, 54011: 0, 54012: 0, 54013: 0, 54014: 0, 54015: 0, 54016: 0, 54017: 0, 54018: 0, 54019: 0, 54021: 0, 54022: 0, 54023: 0, 54024: 0, 54025: 0, 54026: 0, 54027: 0, 54028: 0, 54029: 0, 54030: 0, 54031: 0, 54032: 0, 54034: 0, 54042: 0, 54043: 0, 54044: 0, 54045: 0, 54046: 0, 54048: 0, 54049: 0, 54050: 0, 54051: 0, 54052: 0, 54053: 0, 65061: 3, 65062: 3, 65161: 0, 65163: 0, 102001: 0, 102002: 0, 102003: 0, 102004: 0, 102005: 0, 102006: 0, 102007: 0, 102008: 0, 102009: 0, 102010: 0, 102011: 0, 102012: 0, 102013: 0, 102014: 0, 102015: 0, 102016: 0, 102017: 0, 102018: 0, 102019: 0, 102020: 0, 102021: 0, 102022: 0, 102023: 0, 102024: 0, 102025: 0, 102026: 0, 102027: 0, 102028: 0, 102029: 0, 102030: 0, 102031: 0, 102032: 0, 102033: 0, 102034: 0, 102035: 0, 102036: 0, 102037: 0, 102038: 0, 102039: 0, 102060: 0, 102061: 0, 102062: 0, 102063: 0, 102064: 11, 102065: 0, 102066: 0, 102067: 0, 102068: 12, 102069: 13, 102070: 0, 102071: 0, 102072: 0, 102073: 0, 102074: 0, 102075: 0, 102076: 0, 102077: 0, 102078: 0, 102079: 0, 102090: 0, 102091: 0, 102092: 0, 102093: 0, 102094: 0, 102095: 0, 102096: 0, 102097: 0, 102098: 0, 102099: 0, 102100: 0, 102101: 0, 102102: 0, 102103: 0, 102104: 0, 102105: 0, 102106: 0, 102107: 0, 102108: 0, 102109: 0, 102110: 0, 102111: 0, 102112: 0, 102113: 0, 102114: 0, 102115: 0, 102116: 0, 102117: 0, 102118: 3, 102119: 4, 102120: 3, 102121: 3, 102122: 0, 102123: 0, 102124: 0, 102125: 0, 102126: 0, 102127: 0, 102128: 0, 102129: 0, 102130: 0, 102131: 0, 102132: 0, 102133: 0, 102134: 0, 102135: 0, 102136: 0, 102137: 0, 102138: 0, 102139: 0, 102140: 0, 102141: 0, 102142: 0, 102143: 0, 102144: 0, 102145: 0, 102146: 0, 102147: 0, 102148: 0, 102149: 0, 102150: 0, 102151: 0, 102152: 0, 102153: 0, 102154: 0, 102155: 0, 102156: 0, 102157: 0, 102158: 0, 102159: 0, 102160: 0, 102161: 0, 102162: 0, 102163: 0, 102164: 0, 102165: 0, 102166: 0, 102167: 0, 102168: 0, 102169: 0, 102170: 0, 102171: 0, 102172: 0, 102173: 0, 102174: 0, 102175: 0, 102176: 0, 102177: 0, 102178: 0, 102179: 0, 102180: 0, 102181: 0, 102182: 0, 102183: 0, 102184: 0, 102185: 0, 102186: 0, 102187: 0, 102188: 0, 102189: 0, 102190: 0, 102191: 0, 102192: 0, 102193: 0, 102194: 0, 102195: 0, 102196: 0, 102197: 0, 102198: 0, 102199: 0, 102200: 0, 102201: 0, 102202: 0, 102203: 0, 102205: 0, 102206: 0, 102207: 0, 102208: 0, 102209: 0, 102210: 0, 102211: 0, 102218: 0, 102219: 3, 102220: 3, 102221: 0, 102222: 0, 102223: 0, 102224: 0, 102225: 0, 102226: 0, 102227: 0, 102228: 0, 102229: 0, 102230: 0, 102231: 0, 102232: 0, 102233: 0, 102234: 0, 102235: 0, 102236: 0, 102237: 0, 102238: 0, 102239: 0, 102240: 0, 102241: 0, 102242: 0, 102243: 0, 102244: 0, 102245: 0, 102246: 0, 102248: 0, 102249: 0, 102250: 0, 102251: 0, 102252: 0, 102253: 0, 102254: 0, 102255: 0, 102256: 0, 102257: 0, 102258: 0, 102259: 0, 102260: 0, 102261: 0, 102262: 0, 102263: 0, 102264: 0, 102265: 0, 102266: 0, 102267: 0, 102268: 0, 102269: 0, 102270: 0, 102271: 0, 102272: 0, 102273: 0, 102274: 0, 102275: 0, 102276: 0, 102277: 0, 102278: 0, 102279: 0, 102280: 0, 102281: 0, 102282: 0, 102283: 0, 102284: 0, 102285: 0, 102286: 0, 102287: 0, 102288: 0, 102289: 0, 102290: 0, 102291: 0, 102292: 0, 102293: 0, 102294: 0, 102295: 0, 102296: 0, 102297: 0, 102298: 0, 102300: 0, 102304: 0, 102307: 0, 102308: 0, 102309: 0, 102310: 0, 102311: 0, 102312: 0, 102313: 0, 102314: 0, 102315: 0, 102316: 0, 102317: 0, 102318: 0, 102320: 0, 102321: 0, 102322: 0, 102323: 0, 102324: 0, 102325: 0, 102326: 0, 102327: 0, 102330: 0, 102334: 0, 102335: 0, 102336: 0, 102337: 0, 102338: 0, 102339: 0, 102340: 0, 102341: 0, 102342: 0, 102343: 0, 102344: 0, 102345: 0, 102346: 0, 102347: 0, 102348: 0, 102349: 0, 102350: 0, 102351: 0, 102352: 0, 102353: 0, 102354: 0, 102355: 0, 102356: 0, 102357: 0, 102358: 0, 102361: 0, 102363: 0, 102421: 0, 102422: 0, 102423: 0, 102424: 0, 102425: 0, 102426: 0, 102427: 0, 102428: 0, 102429: 0, 102430: 0, 102431: 0, 102432: 0, 102433: 0, 102434: 0, 102435: 0, 102436: 0, 102437: 0, 102438: 0, 102440: 0, 102441: 0, 102442: 0, 102443: 0, 102444: 0, 102461: 3, 102462: 3, 102463: 3, 102464: 3, 102465: 3, 102466: 3, 102467: 3, 102468: 3, 102469: 0, 102491: 0, 102492: 0, 102570: 0, 102571: 0, 102572: 0, 102573: 0, 102574: 0, 102575: 0, 102576: 0, 102577: 0, 102578: 0, 102579: 0, 102580: 0, 102581: 0, 102582: 0, 102583: 0, 102584: 0, 102591: 0, 102592: 0, 102601: 0, 102602: 0, 102603: 0, 102604: 3, 102605: 0, 102606: 0, 102607: 0, 102608: 0, 102609: 0, 102629: 3, 102630: 3, 102631: 3, 102632: 3, 102633: 3, 102634: 3, 102635: 3, 102636: 3, 102637: 3, 102638: 3, 102639: 3, 102640: 3, 102641: 3, 102642: 3, 102643: 3, 102644: 3, 102645: 3, 102646: 3, 102648: 3, 102649: 3, 102650: 3, 102651: 3, 102652: 3, 102653: 3, 102654: 3, 102655: 3, 102656: 3, 102657: 3, 102658: 3, 102659: 3, 102660: 3, 102661: 3, 102662: 3, 102663: 3, 102664: 3, 102665: 3, 102666: 3, 102667: 3, 102668: 3, 102669: 3, 102670: 3, 102671: 3, 102672: 3, 102673: 3, 102674: 3, 102675: 3, 102676: 3, 102677: 3, 102678: 3, 102679: 3, 102680: 3, 102681: 3, 102682: 3, 102683: 3, 102684: 3, 102685: 3, 102686: 3, 102687: 3, 102688: 3, 102689: 3, 102690: 3, 102691: 3, 102692: 3, 102693: 3, 102694: 3, 102695: 3, 102696: 3, 102697: 3, 102698: 3, 102700: 3, 102704: 3, 102707: 3, 102708: 3, 102709: 3, 102710: 3, 102711: 3, 102712: 3, 102713: 3, 102714: 3, 102715: 3, 102716: 3, 102717: 3, 102718: 3, 102719: 3, 102720: 3, 102721: 3, 102722: 3, 102723: 3, 102724: 3, 102725: 3, 102726: 3, 102727: 3, 102728: 3, 102729: 3, 102730: 3, 102733: 3, 102734: 3, 102735: 3, 102736: 3, 102737: 3, 102738: 3, 102739: 3, 102740: 3, 102741: 3, 102742: 3, 102743: 3, 102744: 3, 102745: 3, 102746: 3, 102747: 3, 102748: 3, 102749: 3, 102750: 3, 102751: 3, 102752: 3, 102753: 3, 102754: 3, 102755: 3, 102756: 3, 102757: 3, 102758: 3, 102761: 3, 102763: 3, 102766: 3, 103300: 0, 103301: 0, 103302: 0, 103303: 0, 103304: 0, 103305: 0, 103306: 0, 103307: 0, 103308: 0, 103309: 0, 103310: 0, 103311: 0, 103312: 0, 103313: 0, 103314: 0, 103315: 0, 103316: 0, 103317: 0, 103318: 0, 103319: 0, 103320: 0, 103321: 0, 103322: 0, 103323: 0, 103324: 0, 103325: 0, 103326: 0, 103327: 0, 103328: 0, 103329: 0, 103330: 0, 103331: 0, 103332: 0, 103333: 0, 103334: 0, 103335: 0, 103336: 0, 103337: 0, 103338: 0, 103339: 0, 103340: 0, 103341: 0, 103342: 0, 103343: 0, 103344: 0, 103345: 0, 103346: 0, 103347: 0, 103348: 0, 103349: 0, 103350: 0, 103351: 0, 103352: 0, 103353: 0, 103354: 0, 103355: 0, 103356: 0, 103357: 0, 103358: 0, 103359: 0, 103360: 0, 103361: 0, 103362: 0, 103363: 0, 103364: 0, 103365: 0, 103366: 0, 103367: 0, 103368: 0, 103369: 0, 103370: 0, 103371: 0, 103400: 3, 103401: 3, 103402: 3, 103403: 3, 103404: 3, 103405: 3, 103406: 3, 103407: 3, 103408: 3, 103409: 3, 103410: 3, 103411: 3, 103412: 3, 103413: 3, 103414: 3, 103415: 3, 103416: 3, 103417: 3, 103418: 3, 103419: 3, 103420: 3, 103421: 3, 103422: 3, 103423: 3, 103424: 3, 103425: 3, 103426: 3, 103427: 3, 103428: 3, 103429: 3, 103430: 3, 103431: 3, 103432: 3, 103433: 3, 103434: 3, 103435: 3, 103436: 3, 103437: 3, 103438: 3, 103439: 3, 103440: 3, 103441: 3, 103442: 3, 103443: 3, 103444: 3, 103445: 3, 103446: 3, 103447: 3, 103448: 3, 103449: 3, 103450: 3, 103451: 3, 103452: 3, 103453: 3, 103454: 3, 103455: 3, 103456: 3, 103457: 3, 103458: 3, 103459: 3, 103460: 3, 103461: 3, 103462: 3, 103463: 3, 103464: 3, 103465: 3, 103466: 3, 103467: 3, 103468: 3, 103469: 3, 103470: 3, 103471: 3, 103528: 0, 103529: 0, 103530: 0, 103531: 0, 103532: 0, 103533: 0, 103534: 0, 103535: 0, 103536: 0, 103537: 0, 103538: 0, 103584: 0, 103600: 0, 103601: 0, 103602: 0, 103603: 0, 103604: 0, 103605: 0, 103606: 0, 103607: 0, 103608: 0, 103609: 0, 103610: 0, 103611: 0, 103612: 0, 103613: 0, 103614: 0, 103615: 0, 103616: 0, 103617: 0, 103618: 0, 103619: 0, 103620: 0, 103621: 0, 103622: 0, 103623: 0, 103624: 0, 103625: 0, 103626: 0, 103627: 0, 103628: 0, 103629: 0, 103630: 0, 103631: 0, 103632: 0, 103633: 0, 103634: 0, 103635: 0, 103636: 0, 103637: 0, 103638: 0, 103639: 0, 103640: 0, 103641: 0, 103642: 0, 103643: 0, 103644: 0, 103645: 0, 103646: 0, 103647: 0, 103648: 0, 103649: 0, 103650: 0, 103651: 0, 103652: 0, 103653: 0, 103654: 0, 103655: 0, 103656: 0, 103657: 0, 103658: 0, 103659: 0, 103660: 0, 103661: 0, 103662: 0, 103663: 0, 103664: 0, 103665: 0, 103666: 0, 103667: 0, 103668: 0, 103669: 0, 103670: 0, 103671: 0, 103672: 0, 103673: 0, 103674: 0, 103675: 0, 103676: 0, 103677: 0, 103678: 0, 103679: 0, 103680: 0, 103681: 0, 103682: 0, 103683: 0, 103684: 0, 103685: 0, 103686: 0, 103687: 0, 103688: 0, 103689: 0, 103690: 0, 103691: 0, 103692: 0, 103693: 0, 103700: 3, 103701: 3, 103702: 3, 103703: 3, 103704: 3, 103705: 3, 103706: 3, 103707: 3, 103708: 3, 103709: 3, 103710: 3, 103711: 3, 103712: 3, 103713: 3, 103714: 3, 103715: 3, 103716: 3, 103717: 3, 103718: 3, 103719: 3, 103720: 3, 103721: 3, 103722: 3, 103723: 3, 103724: 3, 103725: 3, 103726: 3, 103727: 3, 103728: 3, 103729: 3, 103730: 3, 103731: 3, 103732: 3, 103733: 3, 103734: 3, 103735: 3, 103736: 3, 103737: 3, 103738: 3, 103739: 3, 103740: 3, 103741: 3, 103742: 3, 103743: 3, 103744: 3, 103745: 3, 103746: 3, 103747: 3, 103748: 3, 103749: 3, 103750: 3, 103751: 3, 103752: 3, 103753: 3, 103754: 3, 103755: 3, 103756: 3, 103757: 3, 103758: 3, 103759: 3, 103760: 3, 103761: 3, 103762: 3, 103763: 3, 103764: 3, 103765: 3, 103766: 3, 103767: 3, 103768: 3, 103769: 3, 103770: 3, 103771: 3, 103772: 3, 103773: 3, 103774: 3, 103775: 3, 103776: 3, 103777: 3, 103778: 3, 103779: 3, 103780: 3, 103781: 3, 103782: 3, 103783: 3, 103784: 3, 103785: 3, 103786: 3, 103787: 3, 103788: 3, 103789: 3, 103790: 3, 103791: 3, 103792: 3, 103793: 3, 103800: 0, 103801: 0, 103802: 0, 103803: 0, 103804: 0, 103805: 0, 103806: 0, 103807: 0, 103808: 0, 103809: 0, 103810: 0, 103811: 0, 103812: 0, 103813: 0, 103814: 0, 103815: 0, 103816: 0, 103817: 0, 103818: 0, 103819: 0, 103820: 0, 103821: 0, 103822: 0, 103823: 0, 103824: 0, 103825: 0, 103826: 0, 103827: 0, 103828: 0, 103829: 0, 103830: 0, 103831: 0, 103832: 0, 103833: 0, 103834: 0, 103835: 0, 103836: 0, 103837: 0, 103838: 0, 103839: 0, 103840: 0, 103841: 0, 103842: 0, 103843: 0, 103844: 0, 103845: 0, 103846: 0, 103847: 0, 103848: 0, 103849: 0, 103850: 0, 103851: 0, 103852: 0, 103853: 0, 103854: 0, 103855: 0, 103856: 0, 103857: 0, 103858: 0, 103859: 0, 103860: 0, 103861: 0, 103862: 0, 103863: 0, 103864: 0, 103865: 0, 103866: 0, 103867: 0, 103868: 0, 103869: 0, 103870: 0, 103871: 0, 103900: 3, 103901: 3, 103902: 3, 103903: 3, 103904: 3, 103905: 3, 103906: 3, 103907: 3, 103908: 3, 103909: 3, 103910: 3, 103911: 3, 103912: 3, 103913: 3, 103914: 3, 103915: 3, 103916: 3, 103917: 3, 103918: 3, 103919: 3, 103920: 3, 103921: 3, 103922: 3, 103923: 3, 103924: 3, 103925: 3, 103926: 3, 103927: 3, 103928: 3, 103929: 3, 103930: 3, 103931: 3, 103932: 3, 103933: 3, 103934: 3, 103935: 3, 103936: 3, 103937: 3, 103938: 3, 103939: 3, 103940: 3, 103941: 3, 103942: 3, 103943: 3, 103944: 3, 103945: 3, 103946: 3, 103947: 3, 103948: 3, 103949: 3, 103950: 3, 103951: 3, 103952: 3, 103953: 3, 103954: 3, 103955: 3, 103956: 3, 103957: 3, 103958: 3, 103959: 3, 103960: 3, 103961: 3, 103962: 3, 103963: 3, 103964: 3, 103965: 3, 103966: 3, 103967: 3, 103968: 3, 103969: 3, 103970: 3, 103971: 3 }; } if (!dojo._hasResource["esri.geometry"]) { dojo._hasResource["esri.geometry"] = true; dojo.provide("esri.geometry"); esri.Units = { CENTIMETERS: "esriCentimeters", DECIMAL_DEGREES: "esriDecimalDegrees", DECIMETERS: "esriDecimeters", FEET: "esriFeet", INCHES: "esriInches", KILOMETERS: "esriKilometers", METERS: "esriMeters", MILES: "esriMiles", MILLIMETERS: "esriMillimeters", NAUTICAL_MILES: "esriNauticalMiles", POINTS: "esriPoints", UNKNOWN: "esriUnknownUnits", YARDS: "esriYards" }; dojo.declare("esri.SpatialReference", null, { constructor: function (_51) { if (_51) { dojo.mixin(this, _51); } }, wkid: null, wkt: null, toJson: function () { if (this.wkid !== null) { return { wkid: this.wkid }; } else { if (this.wkt !== null) { return { wkt: this.wkt }; } } return null; } }); dojo.mixin(esri.geometry, (function () { var _52 = 6378137, PI = 3.141592653589793, _53 = 57.29577951308232, _54 = 0.017453292519943, _55 = Math.floor, log = Math.log, sin = Math.sin, exp = Math.exp, _56 = Math.atan; function _57(rad) { return rad * _53; }; function _58(deg) { return deg * _54; }; function _59(lng, lat) { var _5a = _58(lat); return [_58(lng) * _52, _52 / 2 * log((1 + sin(_5a)) / (1 - sin(_5a)))]; }; function _5b(x, y) { var _5c = _57(x / _52); return [_5c - (_55((_5c + 180) / 360) * 360), _57((PI / 2) - (2 * _56(exp(-1 * y / _52))))]; }; function _5d(_5e, _5f, sr) { if (_5e instanceof esri.geometry.Point) { var pt = _5f(_5e.x, _5e.y); return new esri.geometry.Point(pt[0], pt[1], new esri.SpatialReference(sr)); } else { if (_5e instanceof esri.geometry.Extent) { var min = _5f(_5e.xmin, _5e.ymin), max = _5f(_5e.xmax, _5e.ymax); return new esri.geometry.Extent(min[0], min[1], max[0], max[1], new esri.SpatialReference(sr)); } else { if (_5e instanceof esri.geometry.Polyline || _5e instanceof esri.geometry.Polygon) { var _60 = _5e instanceof esri.geometry.Polyline, _61 = _60 ? _5e.paths : _5e.rings, _62 = [], _63; dojo.forEach(_61, function (_64) { _62.push(_63 = []); dojo.forEach(_64, function (iPt) { _63.push(_5f(iPt[0], iPt[1])); }); }); if (_60) { return new esri.geometry.Polyline({ paths: _62, spatialReference: sr }); } else { return new esri.geometry.Polygon({ rings: _62, spatialReference: sr }); } } else { if (_5e instanceof esri.geometry.Multipoint) { var _65 = []; dojo.forEach(_5e.points, function (iPt) { _65.push(_5f(iPt[0], iPt[1])); }); return new esri.geometry.Multipoint({ points: _65, spatialReference: sr }); } } } } }; var _66 = 39.37, _67 = 20015077 / 180, ecd = esri.config.defaults, _68 = esri.WKIDUnitConversion; return { geographicToWebMercator: function (_69) { return _5d(_69, _59, { wkid: 102100 }); }, webMercatorToGeographic: function (_6a) { return _5d(_6a, _5b, { wkid: 4326 }); }, getScale: function (map) { var _6b, _6c, _6d, wkt; if (arguments.length > 1) { _6b = arguments[0]; _6c = arguments[1]; _6d = arguments[2]; } else { _6b = map.extent; _6c = map.width; var sr = map.spatialReference; if (sr) { _6d = sr.wkid; wkt = sr.wkt; } } var _6e; if (_6d) { _6e = _68.values[_68[_6d]]; } else { if (wkt && (wkt.search(/^PROJCS/i) !== -1)) { var _6f = /UNIT\[([^\]]+)\]\]$/i.exec(wkt); if (_6f && _6f[1]) { _6e = parseFloat(_6f[1].split(",")[1]); } } } return esri.geometry._getScale(_6b, _6c, _6e); }, _getScale: function (_70, _71, _72) { return (_70.getWidth() / _71) * (_72 || _67) * _66 * ecd.screenDPI; }, getExtentForScale: function (map, _73) { var _74, wkt, sr = map.spatialReference; if (sr) { _74 = sr.wkid; wkt = sr.wkt; } var _75; if (_74) { _75 = _68.values[_68[_74]]; } else { if (wkt && (wkt.search(/^PROJCS/i) !== -1)) { var _76 = /UNIT\[([^\]]+)\]\]$/i.exec(wkt); if (_76 && _76[1]) { _75 = parseFloat(_76[1].split(",")[1]); } } } return esri.geometry._getExtentForScale(map.extent, map.width, _75, _73, true); }, _getExtentForScale: function (_77, _78, _79, _7a, _7b) { var _7c; if (_7b) { _7c = _79; } else { _7c = _68.values[_68[_79]]; } return _77.expand(((_7a * _78) / ((_7c || _67) * _66 * ecd.screenDPI)) / _77.getWidth()); } }; } ()), { defaultPoint: { type: "point", x: 0, y: 0 }, defaultMultipoint: { type: "multipoint", points: null }, defaultExtent: { type: "extent", xmin: 0, ymin: 0, xmax: 0, ymax: 0 }, defaultPolyline: { type: "polyline", paths: null }, defaultPolygon: { type: "polygon", rings: null }, _rectToExtent: function (_7d) { return new esri.geometry.Extent(parseFloat(_7d.x), parseFloat(_7d.y) - parseFloat(_7d.height), parseFloat(_7d.x) + parseFloat(_7d.width), parseFloat(_7d.y), _7d.spatialReference); }, _extentToRect: function (_7e) { return new esri.geometry.Rect(_7e.xmin, _7e.ymax, _7e.getWidth(), _7e.getHeight(), _7e.spatialReference); }, fromJson: function (_7f) { if (_7f.x !== undefined && _7f.y !== undefined) { return new esri.geometry.Point(_7f); } else { if (_7f.paths !== undefined) { return new esri.geometry.Polyline(_7f); } else { if (_7f.rings !== undefined) { return new esri.geometry.Polygon(_7f); } else { if (_7f.points !== undefined) { return new esri.geometry.Multipoint(_7f); } else { if (_7f.xmin !== undefined && _7f.ymin !== undefined && _7f.xmax !== undefined && _7f.ymax !== undefined) { return new esri.geometry.Extent(_7f); } } } } } }, _fromCompressedGeometry: function (str, sr) { var _80 = 0, _81 = 0, _82 = [], x, y, _83 = str.replace(/(\+)|(\-)/g, " $&").split(" "), _84 = parseInt(_83[1], 32); for (var j = 2, jl = _83.length; j < jl; j += 2) { _80 = (x = (parseInt(_83[j], 32) + _80)); _81 = (y = (parseInt(_83[j + 1], 32) + _81)); _82.push([x / _84, y / _84]); } var po = new esri.geometry.Polyline({ paths: [_82] }); po.setSpatialReference(sr); return po; }, getJsonType: function (_85) { if (_85 instanceof esri.geometry.Point) { return "esriGeometryPoint"; } else { if (_85 instanceof esri.geometry.Polyline) { return "esriGeometryPolyline"; } else { if (_85 instanceof esri.geometry.Polygon) { return "esriGeometryPolygon"; } else { if (_85 instanceof esri.geometry.Extent) { return "esriGeometryEnvelope"; } else { if (_85 instanceof esri.geometry.Multipoint) { return "esriGeometryMultipoint"; } } } } } return null; }, getGeometryType: function (_86) { if (_86 === "esriGeometryPoint") { return esri.geometry.Point; } else { if (_86 === "esriGeometryPolyline") { return esri.geometry.Polyline; } else { if (_86 === "esriGeometryPolygon") { return esri.geometry.Polygon; } else { if (_86 === "esriGeometryEnvelope") { return esri.geometry.Extent; } else { if (_86 === "esriGeometryMultipoint") { return esri.geometry.Multipoint; } } } } } return null; }, isClockwise: function (arr) { var _87 = 0, _88 = dojo.isArray(arr[0]) ? (function (p1, p2) { return p1[0] * p2[1] - p2[0] * p1[1]; }) : (function (p1, p2) { return p1.x * p2.y - p2.x * p1.y; }); for (var i = 0, il = arr.length; i < il; i++) { _87 += _88(arr[i], arr[(i + 1) % il]); } return (_87 / 2) <= 0; }, toScreenPoint: function (ext, wd, ht, pt, _89) { if (_89) { return new esri.geometry.Point((pt.x - ext.xmin) * (wd / ext.getWidth()), (ext.ymax - pt.y) * (ht / ext.getHeight())); } else { return new esri.geometry.Point(Math.round((pt.x - ext.xmin) * (wd / ext.getWidth())), Math.round((ext.ymax - pt.y) * (ht / ext.getHeight()))); } }, toScreenGeometry: function (ext, wd, ht, g) { var x = ext.xmin, y = ext.ymax, rwd = wd / ext.getWidth(), rht = ht / ext.getHeight(), _8a = dojo.forEach, _8b = Math.round; if (g instanceof esri.geometry.Point) { return new esri.geometry.Point(_8b((g.x - x) * rwd), _8b((y - g.y) * rht)); } else { if (g instanceof esri.geometry.Multipoint) { var mp = new esri.geometry.Multipoint(), mpp = mp.points; _8a(g.points, function (pt, i) { mpp[i] = [_8b((pt[0] - x) * rwd), _8b((y - pt[1]) * rht)]; }); return mp; } else { if (g instanceof esri.geometry.Extent) { return new esri.geometry.Extent(_8b((g.xmin - x) * rwd), _8b((y - g.ymin) * rht), _8b((g.xmax - x) * rwd), _8b((y - g.ymax) * rwd)); } else { if (g instanceof esri.geometry.Polyline) { var _8c = new esri.geometry.Polyline(), _8d = _8c.paths, _8e; _8a(g.paths, function (_8f, i) { _8e = (_8d[i] = []); _8a(_8f, function (pt, j) { _8e[j] = [_8b((pt[0] - x) * rwd), _8b((y - pt[1]) * rht)]; }); }); return _8c; } else { if (g instanceof esri.geometry.Polygon) { var _90 = new esri.geometry.Polygon(), _91 = _90.rings, _92; _8a(g.rings, function (_93, i) { _92 = (_91[i] = []); _8a(_93, function (pt, j) { _92[j] = [_8b((pt[0] - x) * rwd), _8b((y - pt[1]) * rht)]; }); }); return _90; } } } } } }, _toScreenPath: (function () { var _94 = (function () { if (dojo.isIE) { return function (x, y, rwd, rht, dx, dy, _95) { var _96 = [], _97 = Math.round, _98, _99, _9a, pt, x1, y1, x2, y2; for (var p = 0, pl = _95.length; p < pl; p++) { _98 = _95[p]; pt = _98[0]; if ((_9a = _98.length) > 1) { pt = _98[0]; x1 = _97(((pt[0] - x) * rwd) + dx); y1 = _97(((y - pt[1]) * rht) + dy); x2 = _97(((_98[1][0] - x) * rwd) + dx); y2 = _97(((y - _98[1][1]) * rht) + dy); _96.push("M", x1 + "," + y1, "L", x2 + "," + y2); for (_99 = 2; _99 < _9a; _99++) { pt = _98[_99]; x1 = _97(((pt[0] - x) * rwd) + dx); y1 = _97(((y - pt[1]) * rht) + dy); _96.push(x1 + "," + y1); } } else { x1 = _97(((pt[0] - x) * rwd) + dx); y1 = _97(((y - pt[1]) * rht) + dy); _96.push("M", x1 + "," + y1); } } return _96; }; } else { return function (x, y, rwd, rht, dx, dy, _9b) { var _9c = [], _9d = Math.round, _9e = dojo.forEach; _9e(_9b, function (_9f, i) { _9c.push("M"); _9e(_9f, function (pt, j) { _9c.push(_9d(((pt[0] - x) * rwd) + dx) + "," + _9d(((y - pt[1]) * rht) + dy)); }); }); return _9c; }; } } ()); return function (ext, wd, ht, g, dx, dy) { var _a0 = g instanceof esri.geometry.Polyline; return _94(ext.xmin, ext.ymax, wd / ext.getWidth(), ht / ext.getHeight(), dx, dy, _a0 ? g.paths : g.rings); }; } ()), toMapPoint: function (ext, wd, ht, pt) { return new esri.geometry.Point(ext.xmin + (pt.x / (wd / ext.getWidth())), ext.ymax - (pt.y / (ht / ext.getHeight())), ext.spatialReference); }, toMapGeometry: function (ext, wd, ht, g) { var x = ext.xmin, y = ext.ymax, sr = ext.spatialReference, rwd = wd / ext.getWidth(), rht = ht / ext.getHeight(), _a1 = dojo.forEach; if (g instanceof esri.geometry.Point) { return new esri.geometry.Point(x + (g.x / rwd), y - (g.y / rht), sr); } else { if (g instanceof esri.geometry.Multipoint) { var mp = new esri.geometry.Multipoint(sr), mpp = mp.points; _a1(g.points, function (pt, i) { mpp[i] = [x + (pt[0] / rwd), y - (pt[1] / rht)]; }); return mp; } else { if (g instanceof esri.geometry.Extent) { return new esri.geometry.Extent(x + (g.xmin / rwd), y - (g.ymin / rht), x + (g.xmax / rwd), y - (g.ymax / rht), sr); } else { if (g instanceof esri.geometry.Polyline) { var _a2 = new esri.geometry.Polyline(sr), _a3 = _a2.paths, _a4; _a1(g.paths, function (_a5, i) { _a4 = (_a3[i] = []); _a1(_a5, function (pt, j) { _a4[j] = [x + (pt[0] / rwd), y - (pt[1] / rht)]; }); }); return _a2; } else { if (g instanceof esri.geometry.Polygon) { var _a6 = new esri.geometry.Polygon(sr), _a7 = _a6.rings, _a8; _a1(g.rings, function (_a9, i) { _a8 = (_a7[i] = []); _a1(_a9, function (pt, j) { _a8[j] = [x + (pt[0] / rwd), y - (pt[1] / rht)]; }); }); return _a6; } } } } } }, getLength: function (pt1, pt2) { var dx = pt2.x - pt1.x, dy = pt2.y - pt1.y; return Math.sqrt(dx * dx + dy * dy); }, _getLength: function (pt1, pt2) { var dx = pt2[0] - pt1[0], dy = pt2[1] - pt1[1]; return Math.sqrt(dx * dx + dy * dy); }, getMidpoint: function (pt0, pt1) { return esri.geometry.getPointOnLine(pt0, pt1, 0.5); }, getPointOnLine: function (pt0, pt1, _aa) { if (pt0 instanceof esri.geometry.Point) { return new esri.geometry.Point(pt0.x + _aa * (pt1.x - pt0.x), pt0.y + _aa * (pt1.y - pt0.y)); } else { return [pt0[0] + _aa * (pt1[0] - pt0[0]), pt0[1] + _aa * (pt1[1] - pt0[1])]; } }, _equals: function (n1, n2) { return Math.abs(n1 - n2) < 1e-8; }, getLineIntersection: function (_ab, _ac, _ad, _ae) { var pt = esri.geometry._getLineIntersection([_ab.x, _ab.y], [_ac.x, _ac.y], [_ad.x, _ad.y], [_ae.x, _ae.y]); if (pt) { pt = new esri.geometry.Point(pt[0], pt[1]); } return pt; }, _getLineIntersection: function (p0, p1, p2, p3) { var _af = 10000000000, x, y, a0 = esri.geometry._equals(p0[0], p1[0]) ? _af : (p0[1] - p1[1]) / (p0[0] - p1[0]), a1 = esri.geometry._equals(p2[0], p3[0]) ? _af : (p2[1] - p3[1]) / (p2[0] - p3[0]), b0 = p0[1] - a0 * p0[0], b1 = p2[1] - a1 * p2[0]; if (esri.geometry._equals(a0, a1)) { if (!esri.geometry._equals(b0, b1)) { return null; } else { if (esri.geometry._equals(p0[0], p1[0])) { if (Math.min(p0[1], p1[1]) < Math.max(p2[1], p3[1]) || Math.max(p0[1], p1[1]) > Math.min(p2[1], p3[1])) { y = (p0[1] + p1[1] + p2[1] + p3[1] - Math.min(p0[1], p1[1], p2[1], p3[1]) - Math.max(p0[1], p1[1], p2[1], p3[1])) / 2; x = (y - b0) / a0; } else { return null; } } else { if (Math.min(p0[0], p1[0]) < Math.max(p2[0], p3[0]) || Math.max(p0[0], p1[0]) > Math.min(p2[0], p3[0])) { x = (p0[0] + p1[0] + p2[0] + p3[0] - Math.min(p0[0], p1[0], p2[0], p3[0]) - Math.max(p0[0], p1[0], p2[0], p3[0])) / 2; y = a0 * x + b0; } else { return null; } } return [x, y]; } } if (esri.geometry._equals(a0, _af)) { x = p0[0]; y = a1 * x + b1; } else { if (esri.geometry._equals(a1, _af)) { x = p2[0]; y = a0 * x + b0; } else { x = -(b0 - b1) / (a0 - a1); y = a0 * x + b0; } } return [x, y]; }, _mergePolylinesToSinglePath: function (_b0, sr) { var _b1 = []; dojo.forEach(_b0, function (_b2) { dojo.forEach(_b2.paths, function (_b3) { _b1 = _b1.concat(_b3); }); }); var _b4 = [], _b5 = [0, 0]; dojo.forEach(_b1, function (_b6) { if (_b6[0] != _b5[0] || _b6[1] != _b5[1]) { _b4.push(_b6); _b5 = _b6; } }); return new esri.geometry.Polyline({ paths: [_b4] }).setSpatialReference(sr); }, _getLineIntersection2: function (_b7, _b8) { var p1 = _b7[0], p2 = _b7[1]; var p3 = _b8[0], p4 = _b8[1]; var x1 = p1[0], y1 = p1[1]; var x2 = p2[0], y2 = p2[1]; var x3 = p3[0], y3 = p3[1]; var x4 = p4[0], y4 = p4[1]; var x43 = x4 - x3, x13 = x1 - x3, x21 = x2 - x1; var y43 = y4 - y3, y13 = y1 - y3, y21 = y2 - y1; var _b9 = (y43 * x21) - (x43 * y21); if (_b9 === 0) { return false; } var ua = ((x43 * y13) - (y43 * x13)) / _b9; var ub = ((x21 * y13) - (y21 * x13)) / _b9; if (ua >= 0 && ua <= 1 && ub >= 0 && ub <= 1) { var px = x1 + (ua * (x2 - x1)); var py = y1 + (ua * (y2 - y1)); return [px, py]; } else { return false; } }, _pointLineDistance: function (_ba, _bb) { var p1 = _bb[0], p2 = _bb[1]; var x1 = p1[0], y1 = p1[1], x2 = p2[0], y2 = p2[1]; var x3 = _ba[0], y3 = _ba[1]; var x21 = x2 - x1, y21 = y2 - y1; var x31 = x3 - x1, y31 = y3 - y1; var _bc = Math.sqrt, pow = Math.pow; var mag = _bc(pow(x21, 2) + pow(y21, 2)); var u = ((x31 * x21) + (y31 * y21)) / (mag * mag); var x = x1 + u * x21, y = y1 + u * y21; return _bc(pow(x3 - x, 2) + pow(y3 - y, 2)); } }); dojo.declare("esri.geometry.Geometry", null, { spatialReference: null, type: null, setSpatialReference: function (sr) { this.spatialReference = sr; return this; }, getExtent: function () { return null; } }); dojo.declare("esri.geometry.Point", esri.geometry.Geometry, { constructor: function (x, y, _bd) { dojo.mixin(this, esri.geometry.defaultPoint); if (dojo.isArray(x)) { this.x = x[0]; this.y = x[1]; this.spatialReference = y; } else { if (dojo.isObject(x)) { dojo.mixin(this, x); if (this.spatialReference) { this.spatialReference = new esri.SpatialReference(this.spatialReference); } } else { this.x = x; this.y = y; this.spatialReference = _bd; } } }, offset: function (x, y) { return new esri.geometry.Point(this.x + x, this.y + y, this.spatialReference); }, setX: function (x) { this.x = x; return this; }, setY: function (y) { this.y = y; return this; }, update: function (x, y) { this.x = x; this.y = y; return this; }, toJson: function () { var _be = { x: this.x, y: this.y }, sr = this.spatialReference; if (sr) { _be.spatialReference = sr.toJson(); } return _be; } }); dojo.declare("esri.geometry.Polyline", esri.geometry.Geometry, { constructor: function (obj) { dojo.mixin(this, esri.geometry.defaultPolyline); this.paths = []; this._path = 0; if (obj) { if (obj.paths) { dojo.mixin(this, obj); } else { this.spatialReference = obj; } this.spatialReference = new esri.SpatialReference(this.spatialReference); } }, _extent: null, addPath: function (_bf) { this._extent = null; this._path = this.paths.length; this.paths[this._path] = []; if (dojo.isArray(_bf[0])) { dojo.forEach(_bf, this._addPointArr, this); } else { dojo.forEach(_bf, this._addPoint, this); } return this; }, _addPointArr: function (_c0) { this.paths[this._path].push(_c0); }, _addPoint: function (_c1) { this.paths[this._path].push([_c1.x, _c1.y]); }, _insertPoints: function (_c2, _c3) { this._extent = null; this._path = _c3; if (!this.paths[this._path]) { this.paths[this._path] = []; } dojo.forEach(_c2, this._addPoint, this); }, _validateInputs: function (_c4, _c5) { if ((_c4 !== null && _c4 !== undefined) && (_c4 < 0 || _c4 >= this.paths.length)) { return false; } if ((_c5 !== null && _c4 !== undefined) && (_c5 < 0 || _c5 >= this.paths[_c4].length)) { return false; } return true; }, getPoint: function (_c6, _c7) { if (this._validateInputs(_c6, _c7)) { return new esri.geometry.Point(this.paths[_c6][_c7], this.spatialReference); } }, setPoint: function (_c8, _c9, _ca) { if (this._validateInputs(_c8, _c9)) { this._extent = null; this.paths[_c8][_c9] = [_ca.x, _ca.y]; return this; } }, insertPoint: function (_cb, _cc, _cd) { if (this._validateInputs(_cb, _cc)) { this._extent = null; this.paths[_cb].splice(_cc, 0, [_cd.x, _cd.y]); return this; } }, removePath: function (_ce) { if (this._validateInputs(_ce, null)) { this._extent = null; var arr = this.paths.splice(_ce, 1)[0], _cf = esri.geometry.Point, sr = this.spatialReference; for (var i = 0, il = arr.length; i < il; i++) { arr[i] = new _cf(arr[i], sr); } return arr; } }, removePoint: function (_d0, _d1) { if (this._validateInputs(_d0, _d1)) { this._extent = null; return new esri.geometry.Point(this.paths[_d0].splice(_d1, 1)[0], this.spatialReference); } }, getExtent: function () { if (this._extent) { return new esri.geometry.Extent(this._extent); } var _d2 = this.paths, pal = _d2.length; if (!pal || !_d2[0].length) { return; } var _d3, _d4, x, y, _d5, _d6, _d7 = (_d5 = _d2[0][0][0]), _d8 = (_d6 = _d2[0][0][1]), min = Math.min, max = Math.max, sr = this.spatialReference; for (var pa = 0; pa < pal; pa++) { _d3 = _d2[pa]; for (var pt = 0, ptl = _d3.length; pt < ptl; pt++) { _d4 = _d3[pt]; x = _d4[0]; y = _d4[1]; _d7 = min(_d7, x); _d8 = min(_d8, y); _d5 = max(_d5, x); _d6 = max(_d6, y); } } this._extent = { xmin: _d7, ymin: _d8, xmax: _d5, ymax: _d6, spatialReference: sr ? sr.toJson() : null }; return new esri.geometry.Extent(this._extent); }, toJson: function () { var _d9 = { paths: [].concat(this.paths) }, sr = this.spatialReference; if (sr) { _d9.spatialReference = sr.toJson(); } return _d9; } }); dojo.declare("esri.geometry.Polygon", esri.geometry.Geometry, { constructor: function (obj) { dojo.mixin(this, esri.geometry.defaultPolygon); this.rings = []; this._ring = 0; if (obj) { if (obj.rings) { dojo.mixin(this, obj); } else { this.spatialReference = obj; } this.spatialReference = new esri.SpatialReference(this.spatialReference); } }, _extent: null, addRing: function (_da) { this._extent = null; this._ring = this.rings.length; this.rings[this._ring] = []; if (dojo.isArray(_da[0])) { dojo.forEach(_da, this._addPointArr, this); } else { dojo.forEach(_da, this._addPoint, this); } return this; }, _addPointArr: function (_db) { this.rings[this._ring].push(_db); }, _addPoint: function (_dc) { this.rings[this._ring].push([_dc.x, _dc.y]); }, _insertPoints: function (_dd, _de) { this._extent = null; this._ring = _de; if (!this.rings[this._ring]) { this.rings[this._ring] = []; } dojo.forEach(_dd, this._addPoint, this); }, _validateInputs: function (_df, _e0) { if ((_df !== null && _df !== undefined) && (_df < 0 || _df >= this.rings.length)) { return false; } if ((_e0 !== null && _df !== undefined) && (_e0 < 0 || _e0 >= this.rings[_df].length)) { return false; } return true; }, getPoint: function (_e1, _e2) { if (this._validateInputs(_e1, _e2)) { return new esri.geometry.Point(this.rings[_e1][_e2], this.spatialReference); } }, setPoint: function (_e3, _e4, _e5) { if (this._validateInputs(_e3, _e4)) { this._extent = null; this.rings[_e3][_e4] = [_e5.x, _e5.y]; return this; } }, insertPoint: function (_e6, _e7, _e8) { if (this._validateInputs(_e6, _e7)) { this._extent = null; this.rings[_e6].splice(_e7, 0, [_e8.x, _e8.y]); return this; } }, removeRing: function (_e9) { if (this._validateInputs(_e9, null)) { this._extent = null; var arr = this.rings.splice(_e9, 1)[0], _ea = esri.geometry.Point, sr = this.spatialReference; for (var i = 0, il = arr.length; i < il; i++) { arr[i] = new _ea(arr[i], sr); } return arr; } }, removePoint: function (_eb, _ec) { if (this._validateInputs(_eb, _ec)) { this._extent = null; return new esri.geometry.Point(this.rings[_eb].splice(_ec, 1)[0], this.spatialReference); } }, getExtent: function () { if (this._extent) { return new esri.geometry.Extent(this._extent); } var _ed = this.rings, pal = _ed.length; if (!pal || !_ed[0].length) { return; } var _ee, _ef, x, y, _f0, _f1, _f2 = (_f0 = _ed[0][0][0]), _f3 = (_f1 = _ed[0][0][1]), min = Math.min, max = Math.max, sr = this.spatialReference; for (var pa = 0; pa < pal; pa++) { _ee = _ed[pa]; for (var pt = 0, ptl = _ee.length; pt < ptl; pt++) { _ef = _ee[pt]; x = _ef[0]; y = _ef[1]; _f2 = min(_f2, x); _f3 = min(_f3, y); _f0 = max(_f0, x); _f1 = max(_f1, y); } } this._extent = { xmin: _f2, ymin: _f3, xmax: _f0, ymax: _f1, spatialReference: (sr ? sr.toJson() : null) }; return (new esri.geometry.Extent(this._extent)); }, contains: function (_f4) { var _f5 = this.rings, _f6, _f7 = false, pi, pj, _f8, j; for (var pa = 0, pal = _f5.length; pa < pal; pa++) { _f6 = _f5[pa]; _f8 = _f6.length; j = 0; for (var i = 0; i < _f8; i++) { j++; if (j == _f8) { j = 0; } pi = _f6[i]; pj = _f6[j]; if ((pi[1] < _f4.y && pj[1] >= _f4.y || pj[1] < _f4.y && pi[1] >= _f4.y) && (pi[0] + (_f4.y - pi[1]) / (pj[1] - pi[1]) * (pj[0] - pi[0]) < _f4.x)) { _f7 = !_f7; } } } return _f7; }, toJson: function () { var _f9 = { rings: [].concat(this.rings) }, sr = this.spatialReference; if (sr) { _f9.spatialReference = sr.toJson(); } return _f9; } }); dojo.declare("esri.geometry.Multipoint", esri.geometry.Geometry, { constructor: function (obj) { dojo.mixin(this, esri.geometry.defaultMultipoint); this.points = []; if (obj) { if (obj.points) { dojo.mixin(this, obj); } else { this.spatialReference = obj; } this.spatialReference = new esri.SpatialReference(this.spatialReference); } }, _extent: null, addPoint: function (_fa) { this._extent = null; if (dojo.isArray(_fa)) { this.points.push(_fa); } else { this.points.push([_fa.x, _fa.y]); } return this; }, removePoint: function (_fb) { if (this._validateInputs(_fb)) { this._extent = null; return new esri.geometry.Point(this.points.splice(_fb, 1)[0], this.spatialReference); } }, getExtent: function () { if (this._extent) { return new esri.geometry.Extent(this._extent); } var _fc = this.points, il = _fc.length; if (!il) { return; } var _fd = _fc[0], _fe, _ff, xmin = (_fe = _fd[0]), ymin = (_ff = _fd[1]), min = Math.min, max = Math.max, sr = this.spatialReference, x, y; for (var i = 0; i < il; i++) { _fd = _fc[i]; x = _fd[0]; y = _fd[1]; xmin = min(xmin, x); ymin = min(ymin, y); _fe = max(_fe, x); _ff = max(_ff, y); } this._extent = { xmin: xmin, ymin: ymin, xmax: _fe, ymax: _ff, spatialReference: sr ? sr.toJson() : null }; return new esri.geometry.Extent(this._extent); }, _validateInputs: function (_100) { if (_100 === null || _100 < 0 || _100 >= this.points.length) { return false; } return true; }, getPoint: function (_101) { if (this._validateInputs(_101)) { var _102 = this.points[_101]; return new esri.geometry.Point(_102[0], _102[1], this.spatialReference); } }, setPoint: function (_103, _104) { if (this._validateInputs(_103)) { this._extent = null; this.points[_103] = [_104.x, _104.y]; return this; } }, toJson: function () { var json = { points: [].concat(this.points) }, sr = this.spatialReference; if (sr) { json.spatialReference = sr.toJson(); } return json; } }); dojo.declare("esri.geometry.Extent", esri.geometry.Geometry, { constructor: function (xmin, ymin, xmax, ymax, _105) { dojo.mixin(this, esri.geometry.defaultExtent); if (dojo.isObject(xmin)) { dojo.mixin(this, xmin); this.spatialReference = new esri.SpatialReference(this.spatialReference); } else { this.update(xmin, ymin, xmax, ymax, _105); } }, getWidth: function () { return Math.abs(this.xmax - this.xmin); }, getHeight: function () { return Math.abs(this.ymax - this.ymin); }, getCenter: function () { return new esri.geometry.Point((this.xmin + this.xmax) / 2, (this.ymin + this.ymax) / 2, this.spatialReference); }, centerAt: function (_106) { var _107 = this.getCenter(), dx = _106.x - _107.x, dy = _106.y - _107.y; return new esri.geometry.Extent(this.xmin + dx, this.ymin + dy, this.xmax + dx, this.ymax + dy, this.spatialReference); }, update: function (xmin, ymin, xmax, ymax, _108) { this.xmin = xmin; this.ymin = ymin; this.xmax = xmax; this.ymax = ymax; this.spatialReference = _108; return this; }, offset: function (ox, oy) { return new esri.geometry.Extent(this.xmin + ox, this.ymin + oy, this.xmax + ox, this.ymax + oy, this.spatialReference); }, expand: function (_109) { var _10a = (1 - _109) / 2, _10b = this.getWidth() * _10a, _10c = this.getHeight() * _10a; return new esri.geometry.Extent(this.xmin + _10b, this.ymin + _10c, this.xmax - _10b, this.ymax - _10c, this.spatialReference); }, intersects: function (_10d) { var type = _10d.type; switch (type) { case "point": return this.contains(_10d); case "multipoint": return this._intersectsMultipoint(_10d); case "extent": return this._intersectsExtent(_10d); case "polygon": return this._intersectsPolygon(_10d); case "polyline": return this._intersectsPolyline(_10d); } }, _intersectsMultipoint: function (_10e) { var len = _10e.points.length; for (var i = 0; i < len; i++) { if (this.contains(_10e.getPoint(i))) { return true; } } return false; }, _intersectsExtent: function (_10f) { var xmin, ymin, _110, _111, _112 = false; if (this.xmin <= _10f.xmin) { xmin = _10f.xmin; if (this.xmax < xmin) { _112 = true; } else { _110 = Math.min(this.xmax, _10f.xmax) - xmin; } } else { xmin = this.xmin; if (_10f.xmax < xmin) { _112 = true; } else { _110 = Math.min(this.xmax, _10f.xmax) - xmin; } } if (this.ymin <= _10f.ymin) { ymin = _10f.ymin; if (this.ymax < ymin) { _112 = true; } else { _111 = Math.min(this.ymax, _10f.ymax) - ymin; } } else { ymin = this.ymin; if (_10f.ymax < ymin) { _112 = true; } else { _111 = Math.min(this.ymax, _10f.ymax) - ymin; } } if (_112) { return null; } return new esri.geometry.Extent(xmin, ymin, xmin + _110, ymin + _111, this.spatialReference); }, _intersectsPolygon: function (_113) { var _114 = [this.xmin, this.ymax], _115 = [this.xmax, this.ymax]; var _116 = [this.xmin, this.ymin], _117 = [this.xmax, this.ymin]; var _118 = [_114, _115, _116, _117]; var _119 = [[_116, _114], [_114, _115], [_115, _117], [_117, _116]]; var i, j, _11a = _113.rings, _11b = _11a.length, ring, len, _11c = new esri.geometry.Point(0, 0); len = _118.length; for (i = 0; i < len; i++) { _11c.update(_118[i][0], _118[i][1]); if (_113.contains(_11c)) { return true; } } var pi, pj; for (i = 0; i < _11b; i++) { ring = _11a[i]; len = ring.length; pi = ring[0]; _11c.update(pi[0], pi[1]); if (this.contains(_11c)) { return true; } for (j = 1; j < len; j++) { pj = ring[j]; _11c.update(pj[0], pj[1]); if (this.contains(_11c) || this._intersectsLine([pi, pj], _119)) { return true; } pi = pj; } } return false; }, _intersectsPolyline: function (_11d) { var _11e = [[[this.xmin, this.ymin], [this.xmin, this.ymax]], [[this.xmin, this.ymax], [this.xmax, this.ymax]], [[this.xmax, this.ymax], [this.xmax, this.ymin]], [[this.xmax, this.ymin], [this.xmin, this.ymin]]]; var i, j, _11f = _11d.paths, _120 = _11f.length, path, len; var pi, pj, _121 = new esri.geometry.Point(0, 0); for (i = 0; i < _120; i++) { path = _11f[i]; len = path.length; pi = path[0]; _121.update(pi[0], pi[1]); if (this.contains(_121)) { return true; } for (j = 1; j < len; j++) { pj = path[j]; _121.update(pj[0], pj[1]); if (this.contains(_121) || this._intersectsLine([pi, pj], _11e)) { return true; } pi = pj; } } return false; }, _intersectsLine: function (line, _122) { var _123 = esri.geometry._getLineIntersection2; for (var i = 0, len = _122.length; i < len; i++) { if (_123(line, _122[i])) { return true; } } return false; }, contains: function (_124) { if (!_124) { return false; } var type = _124.type; switch (type) { case "point": return _124.x >= this.xmin && _124.x <= this.xmax && _124.y >= this.ymin && _124.y <= this.ymax; case "extent": return this._containsExtent(_124); } return false; }, _containsExtent: function (_125) { var xmin = _125.xmin, ymin = _125.ymin; var xmax = _125.xmax, ymax = _125.ymax; var pt1 = new esri.geometry.Point(xmin, ymin); var pt2 = new esri.geometry.Point(xmin, ymax); var pt3 = new esri.geometry.Point(xmax, ymax); var pt4 = new esri.geometry.Point(xmax, ymin); if (this.contains(pt1) && this.contains(pt2) && this.contains(pt3) && this.contains(pt4)) { return true; } return false; }, union: function (_126) { return new esri.geometry.Extent(Math.min(this.xmin, _126.xmin), Math.min(this.ymin, _126.ymin), Math.max(this.xmax, _126.xmax), Math.max(this.ymax, _126.ymax), this.spatialReference); }, getExtent: function () { return new esri.geometry.Extent(this.xmin, this.ymin, this.xmax, this.ymax, this.spatialReference); }, toJson: function () { var json = { xmin: this.xmin, ymin: this.ymin, xmax: this.xmax, ymax: this.ymax }, sr = this.spatialReference; if (sr) { json.spatialReference = sr.toJson(); } return json; } }); dojo.declare("esri.geometry.Rect", esri.geometry.Geometry, { constructor: function (json, y, _127, _128, _129) { dojo.mixin(this, dojox.gfx.defaultRect); if (dojo.isObject(json)) { dojo.mixin(this, json); this.spatialReference = new esri.SpatialReference(this.spatialReference); } else { this.x = json; this.y = y; this.width = _127; this.height = _128; this.spatialReference = _129; } }, getCenter: function () { return new esri.geometry.Point(this.x + this.width / 2, this.y + this.height / 2, this.spatialReference); }, offset: function (ox, oy) { return new esri.geometry.Rect(this.x + ox, this.y + oy, this.width, this.height, this.spatialReference); }, intersects: function (rect) { if ((rect.x + rect.width) <= this.x) { return false; } if ((rect.y + rect.height) <= this.y) { return false; } if (rect.y >= (this.y + this.height)) { return false; } if (rect.x >= (this.x + this.width)) { return false; } return true; }, getExtent: function () { return esri.geometry._rectToExtent(this); }, update: function (x, y, _12a, _12b, _12c) { this.x = x; this.y = y; this.width = _12a; this.height = _12b; this.spatialReference = _12c; return this; } }); } if (!dojo._hasResource["dojo.io.script"]) { dojo._hasResource["dojo.io.script"] = true; dojo.provide("dojo.io.script"); (function () { var _12d = dojo.isIE ? "onreadystatechange" : "load", _12e = /complete|loaded/; dojo.io.script = { get: function (args) { var dfd = this._makeScriptDeferred(args); var _12f = dfd.ioArgs; dojo._ioAddQueryToUrl(_12f); dojo._ioNotifyStart(dfd); if (this._canAttach(_12f)) { var node = this.attach(_12f.id, _12f.url, args.frameDoc); if (!_12f.jsonp && !_12f.args.checkString) { var _130 = dojo.connect(node, _12d, function (evt) { if (evt.type == "load" || _12e.test(node.readyState)) { dojo.disconnect(_130); _12f.scriptLoaded = evt; } }); } } dojo._ioWatch(dfd, this._validCheck, this._ioCheck, this._resHandle); return dfd; }, attach: function (id, url, _131) { var doc = (_131 || dojo.doc); var _132 = doc.createElement("script"); _132.type = "text/javascript"; _132.src = url; _132.id = id; _132.charset = "utf-8"; return doc.getElementsByTagName("head")[0].appendChild(_132); }, remove: function (id, _133) { dojo.destroy(dojo.byId(id, _133)); if (this["jsonp_" + id]) { delete this["jsonp_" + id]; } }, _makeScriptDeferred: function (args) { var dfd = dojo._ioSetArgs(args, this._deferredCancel, this._deferredOk, this._deferredError); var _134 = dfd.ioArgs; _134.id = dojo._scopeName + "IoScript" + (this._counter++); _134.canDelete = false; _134.jsonp = args.callbackParamName || args.jsonp; if (_134.jsonp) { _134.query = _134.query || ""; if (_134.query.length > 0) { _134.query += "&"; } _134.query += _134.jsonp + "=" + (args.frameDoc ? "parent." : "") + dojo._scopeName + ".io.script.jsonp_" + _134.id + "._jsonpCallback"; _134.frameDoc = args.frameDoc; _134.canDelete = true; dfd._jsonpCallback = this._jsonpCallback; this["jsonp_" + _134.id] = dfd; } return dfd; }, _deferredCancel: function (dfd) { dfd.canceled = true; if (dfd.ioArgs.canDelete) { dojo.io.script._addDeadScript(dfd.ioArgs); } }, _deferredOk: function (dfd) { var _135 = dfd.ioArgs; if (_135.canDelete) { dojo.io.script._addDeadScript(_135); } return _135.json || _135.scriptLoaded || _135; }, _deferredError: function (_136, dfd) { if (dfd.ioArgs.canDelete) { if (_136.dojoType == "timeout") { dojo.io.script.remove(dfd.ioArgs.id, dfd.ioArgs.frameDoc); } else { dojo.io.script._addDeadScript(dfd.ioArgs); } } console.log("dojo.io.script error", _136); return _136; }, _deadScripts: [], _counter: 1, _addDeadScript: function (_137) { dojo.io.script._deadScripts.push({ id: _137.id, frameDoc: _137.frameDoc }); _137.frameDoc = null; }, _validCheck: function (dfd) { var _138 = dojo.io.script; var _139 = _138._deadScripts; if (_139 && _139.length > 0) { for (var i = 0; i < _139.length; i++) { _138.remove(_139[i].id, _139[i].frameDoc); _139[i].frameDoc = null; } dojo.io.script._deadScripts = []; } return true; }, _ioCheck: function (dfd) { var _13a = dfd.ioArgs; if (_13a.json || (_13a.scriptLoaded && !_13a.args.checkString)) { return true; } var _13b = _13a.args.checkString; if (_13b && eval("typeof(" + _13b + ") != 'undefined'")) { return true; } return false; }, _resHandle: function (dfd) { if (dojo.io.script._ioCheck(dfd)) { dfd.callback(dfd); } else { dfd.errback(new Error("inconceivable dojo.io.script._resHandle error")); } }, _canAttach: function (_13c) { return true; }, _jsonpCallback: function (json) { this.ioArgs.json = json; } }; })(); } if (!dojo._hasResource["dojo.string"]) { dojo._hasResource["dojo.string"] = true; dojo.provide("dojo.string"); dojo.string.rep = function (str, num) { if (num <= 0 || !str) { return ""; } var buf = []; for (; ; ) { if (num & 1) { buf.push(str); } if (!(num >>= 1)) { break; } str += str; } return buf.join(""); }; dojo.string.pad = function (text, size, ch, end) { if (!ch) { ch = "0"; } var out = String(text), pad = dojo.string.rep(ch, Math.ceil((size - out.length) / ch.length)); return end ? out + pad : pad + out; }; dojo.string.substitute = function (_13d, map, _13e, _13f) { _13f = _13f || dojo.global; _13e = _13e ? dojo.hitch(_13f, _13e) : function (v) { return v; }; return _13d.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g, function (_140, key, _141) { var _142 = dojo.getObject(key, false, map); if (_141) { _142 = dojo.getObject(_141, false, _13f).call(_13f, _142, key); } return _13e(_142, key).toString(); }); }; dojo.string.trim = String.prototype.trim ? dojo.trim : function (str) { str = str.replace(/^\s+/, ""); for (var i = str.length - 1; i >= 0; i--) { if (/\S/.test(str.charAt(i))) { str = str.substring(0, i + 1); break; } } return str; }; } if (!dojo._hasResource["esri.symbol"]) { dojo._hasResource["esri.symbol"] = true; dojo.provide("esri.symbol"); dojo.mixin(esri.symbol, { toDojoColor: function (clr) { return clr && new dojo.Color([clr[0], clr[1], clr[2], clr[3] / 255]); }, toJsonColor: function (clr) { return clr && [clr.r, clr.g, clr.b, Math.round(clr.a * 255)]; }, fromJson: function (json) { var type = json.type, _143 = null; switch (type.substring(0, "esriXX".length)) { case "esriSM": _143 = new esri.symbol.SimpleMarkerSymbol(json); break; case "esriPM": _143 = new esri.symbol.PictureMarkerSymbol(json); break; case "esriTS": _143 = new esri.symbol.TextSymbol(json); break; case "esriSL": if (json.cap !== undefined) { _143 = new esri.symbol.CartographicLineSymbol(json); } else { _143 = new esri.symbol.SimpleLineSymbol(json); } break; case "esriSF": _143 = new esri.symbol.SimpleFillSymbol(json); break; case "esriPF": _143 = new esri.symbol.PictureFillSymbol(json); break; } return _143; } }); dojo.declare("esri.symbol.Symbol", null, { color: new dojo.Color([0, 0, 0, 1]), type: null, _stroke: null, _fill: null, constructor: function (json) { if (json && dojo.isObject(json)) { dojo.mixin(this, json); this.color = esri.symbol.toDojoColor(this.color); var type = this.type; if (type) { this.type = { "esriSMS": "simplemarkersymbol", "esriPMS": "picturemarkersymbol", "esriSLS": "simplelinesymbol", "esriCLS": "cartographiclinesymbol", "esriSFS": "simplefillsymbol", "esriPFS": "picturefillsymbol", "esriTS": "textsymbol"}[type]; } } }, setColor: function (_144) { this.color = _144; return this; }, toJson: function () { return { color: esri.symbol.toJsonColor(this.color) }; } }); dojo.declare("esri.symbol.MarkerSymbol", esri.symbol.Symbol, { constructor: function (json) { if (json && dojo.isObject(json)) { this.size = dojox.gfx.pt2px(this.size); this.xoffset = dojox.gfx.pt2px(this.xoffset); this.yoffset = dojox.gfx.pt2px(this.yoffset); } }, setAngle: function (_145) { this.angle = _145; return this; }, setSize: function (size) { this.size = size; return this; }, setOffset: function (x, y) { this.xoffset = x; this.yoffset = y; return this; }, toJson: function () { return dojo.mixin(this.inherited("toJson", arguments), { size: dojox.gfx.px2pt(this.size), angle: this.angle, xoffset: dojox.gfx.px2pt(this.xoffset), yoffset: dojox.gfx.px2pt(this.yoffset) }); }, angle: 0, xoffset: 0, yoffset: 0, size: 12 }); dojo.declare("esri.symbol.SimpleMarkerSymbol", esri.symbol.MarkerSymbol, { constructor: function (json, size, _146, _147) { if (json) { if (dojo.isString(json)) { this.style = json; if (size) { this.size = size; } if (_146) { this.outline = _146; } if (_147) { this.color = _147; } } else { this.style = esri.valueOf(this._styles, this.style); if (json.outline) { this.outline = new esri.symbol.SimpleLineSymbol(json.outline); } } } else { dojo.mixin(this, esri.symbol.defaultSimpleMarkerSymbol); this.size = dojox.gfx.pt2px(this.size); this.outline = new esri.symbol.SimpleLineSymbol(this.outline); this.color = new dojo.Color(this.color); } if (!this.style) { this.style = esri.symbol.SimpleMarkerSymbol.STYLE_CIRCLE; } }, type: "simplemarkersymbol", setStyle: function (_148) { this.style = _148; return this; }, setOutline: function (_149) { this.outline = _149; return this; }, getStroke: function () { return this.outline.getStroke(); }, getFill: function () { return this.color; }, toJson: function () { var json = dojo.mixin(this.inherited("toJson", arguments), { type: "esriSMS", style: this._styles[this.style] }), _14a = this.outline; if (_14a) { json.outline = _14a.toJson(); } else { json.outline = false; } return json; }, _styles: { circle: "esriSMSCircle", square: "esriSMSSquare", cross: "esriSMSCross", x: "esriSMSX", diamond: "esriSMSDiamond"} }); dojo.mixin(esri.symbol.SimpleMarkerSymbol, { STYLE_CIRCLE: "circle", STYLE_SQUARE: "square", STYLE_CROSS: "cross", STYLE_X: "x", STYLE_DIAMOND: "diamond" }); dojo.declare("esri.symbol.PictureMarkerSymbol", esri.symbol.MarkerSymbol, { constructor: function (json, _14b, _14c) { if (json) { if (dojo.isString(json)) { this.url = json; if (_14b) { this.width = _14b; } if (_14c) { this.height = _14c; } } else { this.width = dojox.gfx.pt2px(json.width); this.height = dojox.gfx.pt2px(json.height); var isIE = dojo.isIE, _14d = json.imageData; if ((!isIE) && _14d) { var temp = this.url; this.url = "data:" + (json.contentType || "image") + ";base64," + _14d; this.imageData = temp; } } } else { dojo.mixin(this, esri.symbol.defaultPictureMarkerSymbol); this.width = dojox.gfx.pt2px(this.width); this.height = dojox.gfx.pt2px(this.height); } }, type: "picturemarkersymbol", getStroke: function () { return null; }, getFill: function () { return null; }, setWidth: function (_14e) { this.width = _14e; return this; }, setHeight: function (_14f) { this.height = _14f; return this; }, setUrl: function (url) { this.url = url; return this; }, toJson: function () { var url = this.url, _150 = this.imageData; if (url.indexOf("data:") === 0) { var temp = url; url = _150; var _151 = temp.indexOf(";base64,") + 8; _150 = temp.substr(_151); } return esri._sanitize(dojo.mixin(this.inherited("toJson", arguments), { type: "esriPMS", style: "esriPMS", url: url, imageData: _150, contentType: this.contentType, width: dojox.gfx.px2pt(this.width), height: dojox.gfx.px2pt(this.height) })); } }); dojo.declare("esri.symbol.LineSymbol", esri.symbol.Symbol, { constructor: function (json) { if (dojo.isObject(json)) { this.width = dojox.gfx.pt2px(this.width); } else { this.width = 12; } }, setWidth: function (_152) { this.width = _152; return this; }, toJson: function () { return dojo.mixin(this.inherited("toJson", arguments), { width: dojox.gfx.px2pt(this.width) }); } }); dojo.declare("esri.symbol.SimpleLineSymbol", esri.symbol.LineSymbol, { constructor: function (json, _153, _154) { if (json) { if (dojo.isString(json)) { this.style = json; if (_153) { this.color = _153; } if (_154) { this.width = _154; } } else { this.style = esri.valueOf(this._styles, json.style) || esri.symbol.SimpleLineSymbol.STYLE_SOLID; } } else { dojo.mixin(this, esri.symbol.defaultSimpleLineSymbol); this.color = new dojo.Color(this.color); this.width = dojox.gfx.pt2px(this.width); } }, type: "simplelinesymbol", setStyle: function (_155) { this.style = _155; return this; }, getStroke: function () { return (this.style === esri.symbol.SimpleLineSymbol.STYLE_NULL || this.width === 0) ? null : { color: this.color, style: this.style, width: this.width }; }, getFill: function () { return null; }, toJson: function () { return dojo.mixin(this.inherited("toJson", arguments), { type: "esriSLS", style: this._styles[this.style] }); }, _styles: { solid: "esriSLSSolid", dash: "esriSLSDash", dot: "esriSLSDot", dashdot: "esriSLSDashDot", longdashdotdot: "esriSLSDashDotDot", none: "esriSLSNull", insideframe: "esriSLSInsideFrame"} }); dojo.mixin(esri.symbol.SimpleLineSymbol, { STYLE_SOLID: "solid", STYLE_DASH: "dash", STYLE_DOT: "dot", STYLE_DASHDOT: "dashdot", STYLE_DASHDOTDOT: "longdashdotdot", STYLE_NULL: "none" }); dojo.declare("esri.symbol.CartographicLineSymbol", esri.symbol.SimpleLineSymbol, { constructor: function (json, _156, _157, cap, join, _158) { if (json) { if (dojo.isString(json)) { this.style = json; if (_156) { this.color = _156; } if (_157 !== undefined) { this.width = _157; } if (cap) { this.cap = cap; } if (join) { this.join = join; } if (_158 !== undefined) { this.miterLimit = _158; } } else { this.cap = esri.valueOf(this._caps, json.cap); this.join = esri.valueOf(this._joins, json.join); this.width = dojox.gfx.pt2px(json.width); this.miterLimit = dojox.gfx.pt2px(json.miterLimit); } } else { dojo.mixin(this, esri.symbol.defaultCartographicLineSymbol); this.color = new dojo.Color(this.color); this.width = dojox.gfx.pt2px(this.width); this.miterLimit = dojox.gfx.pt2px(this.miterLimit); } }, type: "cartographiclinesymbol", setCap: function (cap) { this.cap = cap; return this; }, setJoin: function (join) { this.join = join; return this; }, setMiterLimit: function (_159) { this.miterLimit = _159; return this; }, getStroke: function () { return dojo.mixin(this.inherited("getStroke", arguments), { cap: this.cap, join: (this.join === esri.symbol.CartographicLineSymbol.JOIN_MITER ? this.miterLimit : this.join) }); }, getFill: function () { return null; }, toJson: function () { return dojo.mixin(this.inherited("toJson", arguments), { type: "esriCLS", cap: this._caps[this.cap], join: this._joins[this.join], miterLimit: dojox.gfx.px2pt(this.miterLimit) }); }, _caps: { butt: "esriLCSButt", round: "esriLCSRound", square: "esriLCSSquare" }, _joins: { miter: "esriLJSMiter", round: "esriLJSRound", bevel: "esriLJSBevel"} }); dojo.mixin(esri.symbol.CartographicLineSymbol, { STYLE_SOLID: "solid", STYLE_DASH: "dash", STYLE_DOT: "dot", STYLE_DASHDOT: "dashdot", STYLE_DASHDOTDOT: "longdashdotdot", STYLE_NULL: "none", STYLE_INSIDE_FRAME: "insideframe", CAP_BUTT: "butt", CAP_ROUND: "round", CAP_SQUARE: "square", JOIN_MITER: "miter", JOIN_ROUND: "round", JOIN_BEVEL: "bevel" }); dojo.declare("esri.symbol.FillSymbol", esri.symbol.Symbol, { constructor: function (json) { if (json && dojo.isObject(json) && json.outline) { this.outline = new esri.symbol.SimpleLineSymbol(json.outline); } }, setOutline: function (_15a) { this.outline = _15a; return this; }, toJson: function () { var json = this.inherited("toJson", arguments); if (this.outline) { json.outline = this.outline.toJson(); } return json; } }); dojo.declare("esri.symbol.SimpleFillSymbol", esri.symbol.FillSymbol, { constructor: function (json, _15b, _15c) { if (json) { if (dojo.isString(json)) { this.style = json; if (_15b !== undefined) { this.outline = _15b; } if (_15c !== undefined) { this.color = _15c; } } else { this.style = esri.valueOf(this._styles, json.style); } } else { dojo.mixin(this, esri.symbol.defaultSimpleFillSymbol); this.outline = new esri.symbol.SimpleLineSymbol(this.outline); this.color = new dojo.Color(this.color); } var _15d = this.style; if (_15d !== "solid" && _15d !== "none") { this._src = dojo.moduleUrl("esri", "../../images/symbol/sfs/" + _15d + ".png").toString(); } }, type: "simplefillsymbol", setStyle: function (_15e) { this.style = _15e; return this; }, getStroke: function () { return this.outline.getStroke(); }, getFill: function () { var _15f = this.style; if (_15f === esri.symbol.SimpleFillSymbol.STYLE_NULL) { return null; } else { if (_15f === esri.symbol.SimpleFillSymbol.STYLE_SOLID) { return this.color; } else { return dojo.mixin(dojo.mixin({}, dojox.gfx.defaultPattern), { src: this._src, width: 10, height: 10 }); } } }, toJson: function () { return dojo.mixin(this.inherited("toJson", arguments), { type: "esriSFS", style: this._styles[this.style] }); }, _styles: { solid: "esriSFSSolid", none: "esriSFSNull", horizontal: "esriSFSHorizontal", vertical: "esriSFSVertical", forwarddiagonal: "esriSFSForwardDiagonal", backwarddiagonal: "esriSFSBackwardDiagonal", cross: "esriSFSCross", diagonalcross: "esriSFSDiagonalCross"} }); dojo.mixin(esri.symbol.SimpleFillSymbol, { STYLE_SOLID: "solid", STYLE_NULL: "none", STYLE_HORIZONTAL: "horizontal", STYLE_VERTICAL: "vertical", STYLE_FORWARD_DIAGONAL: "forwarddiagonal", STYLE_BACKWARD_DIAGONAL: "backwarddiagonal", STYLE_CROSS: "cross", STYLE_DIAGONAL_CROSS: "diagonalcross", STYLE_FORWARDDIAGONAL: "forwarddiagonal", STYLE_BACKWARDDIAGONAL: "backwarddiagonal", STYLE_DIAGONALCROSS: "diagonalcross" }); dojo.declare("esri.symbol.PictureFillSymbol", esri.symbol.FillSymbol, { constructor: function (json, _160, _161, _162) { if (json) { if (dojo.isString(json)) { this.url = json; if (_160 !== undefined) { this.outline = _160; } if (_161 !== undefined) { this.width = _161; } if (_162 !== undefined) { this.height = _162; } } else { this.xoffset = dojox.gfx.pt2px(json.xoffset); this.yoffset = dojox.gfx.pt2px(json.yoffset); this.width = dojox.gfx.pt2px(json.width); this.height = dojox.gfx.pt2px(json.height); var isIE = dojo.isIE, _163 = json.imageData; if ((!isIE) && _163) { var temp = this.url; this.url = "data:" + (json.contentType || "image") + ";base64," + _163; this.imageData = temp; } } } else { dojo.mixin(this, esri.symbol.defaultPictureFillSymbol); this.width = dojox.gfx.pt2px(this.width); this.height = dojox.gfx.pt2px(this.height); } }, type: "picturefillsymbol", xscale: 1, yscale: 1, xoffset: 0, yoffset: 0, setWidth: function (_164) { this.width = _164; return this; }, setHeight: function (_165) { this.height = _165; return this; }, setOffset: function (x, y) { this.xoffset = x; this.yoffset = y; return this; }, setUrl: function (url) { this.url = url; return this; }, setXScale: function (_166) { this.xscale = _166; return this; }, setYScale: function (_167) { this.yscale = _167; return this; }, getStroke: function () { return this.outline.getStroke(); }, getFill: function () { return dojo.mixin({}, dojox.gfx.defaultPattern, { src: this.url, width: (this.width * this.xscale), height: (this.height * this.yscale), x: this.xoffset, y: this.yoffset }); }, toJson: function () { var url = this.url, _168 = this.imageData; if (url.indexOf("data:") === 0) { var temp = url; url = _168; var _169 = temp.indexOf(";base64,") + 8; _168 = temp.substr(_169); } return esri._sanitize(dojo.mixin(this.inherited("toJson", arguments), { type: "esriPFS", style: "esriPFS", url: url, imageData: _168, contentType: this.contentType, width: dojox.gfx.px2pt(this.width), height: dojox.gfx.px2pt(this.height), xoffset: dojox.gfx.px2pt(this.xoffset), yoffset: dojox.gfx.px2pt(this.yoffset), xscale: this.xscale, yscale: this.yscale })); } }); dojo.declare("esri.symbol.Font", null, { constructor: function (json, _16a, _16b, _16c, _16d) { if (json) { if (dojo.isObject(json)) { dojo.mixin(this, json); } else { this.size = json; if (_16a !== undefined) { this.style = _16a; } if (_16b !== undefined) { this.variant = _16b; } if (_16c !== undefined) { this.weight = _16c; } if (_16d !== undefined) { this.family = _16d; } } } else { dojo.mixin(this, dojox.gfx.defaultFont); } }, setSize: function (size) { this.size = size; return this; }, setStyle: function (_16e) { this.style = _16e; return this; }, setVariant: function (_16f) { this.variant = _16f; return this; }, setWeight: function (_170) { this.weight = _170; return this; }, setFamily: function (_171) { this.family = _171; return this; }, toJson: function () { return { size: this.size, style: this.style, variant: this.variant, weight: this.weight, family: this.family }; } }); dojo.mixin(esri.symbol.Font, { STYLE_NORMAL: "normal", STYLE_ITALIC: "italic", STYLE_OBLIQUE: "oblique", VARIANT_NORMAL: "normal", VARIANT_SMALLCAPS: "small-caps", WEIGHT_NORMAL: "normal", WEIGHT_BOLD: "bold", WEIGHT_BOLDER: "bolder", WEIGHT_LIGHTER: "lighter" }); dojo.declare("esri.symbol.TextSymbol", esri.symbol.Symbol, { constructor: function (json, font, _172) { dojo.mixin(this, esri.symbol.defaultTextSymbol); this.font = new esri.symbol.Font(this.font); this.color = new dojo.Color(this.color); if (json) { if (dojo.isObject(json)) { dojo.mixin(this, json); this.color = esri.symbol.toDojoColor(this.color); this.type = "textsymbol"; this.font = new esri.symbol.Font(this.font); this.xoffset = dojox.gfx.pt2px(this.xoffset); this.yoffset = dojox.gfx.pt2px(this.yoffset); } else { this.text = json; if (font) { this.font = font; } if (_172) { this.color = _172; } } } }, angle: 0, xoffset: 0, yoffset: 0, setFont: function (font) { this.font = font; return this; }, setAngle: function (_173) { this.angle = _173; return this; }, setOffset: function (x, y) { this.xoffset = x; this.yoffset = y; return this; }, setAlign: function (_174) { this.align = _174; return this; }, setDecoration: function (_175) { this.decoration = _175; return this; }, setRotated: function (_176) { this.rotated = _176; return this; }, setKerning: function (_177) { this.kerning = _177; return this; }, setText: function (text) { this.text = text; return this; }, getStroke: function () { return null; }, getFill: function () { return this.color; }, toJson: function () { return dojo.mixin(this.inherited("toJson", arguments), { type: "esriTS", style: "esriTS", angle: this.angle, xoffset: dojox.gfx.px2pt(this.xoffset), yoffset: dojox.gfx.px2pt(this.yoffset), text: this.text, align: this.align, decoration: this.decoration, rotated: this.rotated, kerning: this.kerning, font: this.font.toJson() }); } }); dojo.mixin(esri.symbol.TextSymbol, { ALIGN_START: "start", ALIGN_MIDDLE: "middle", ALIGN_END: "end", DECORATION_NONE: "none", DECORATION_UNDERLINE: "underline", DECORATION_OVERLINE: "overline", DECORATION_LINETHROUGH: "line-through" }); dojo.mixin(esri.symbol, { defaultSimpleLineSymbol: { color: [0, 0, 0, 1], style: esri.symbol.SimpleLineSymbol.STYLE_SOLID, width: 1 }, defaultSimpleMarkerSymbol: { style: esri.symbol.SimpleMarkerSymbol.STYLE_CIRCLE, color: [255, 255, 255, 0.25], outline: esri.symbol.defaultSimpleLineSymbol, size: 12, angle: 0, xoffset: 0, yoffset: 0 }, defaultPictureMarkerSymbol: { url: "", width: 12, height: 12, angle: 0, xoffset: 0, yoffset: 0 }, defaultCartographicLineSymbol: { color: [0, 0, 0, 1], style: esri.symbol.CartographicLineSymbol.STYLE_SOLID, width: 1, cap: esri.symbol.CartographicLineSymbol.CAP_BUTT, join: esri.symbol.CartographicLineSymbol.JOIN_MITER, miterLimit: 10 }, defaultSimpleFillSymbol: { style: esri.symbol.SimpleFillSymbol.STYLE_SOLID, color: [0, 0, 0, 0.25], outline: esri.symbol.defaultSimpleLineSymbol }, defaultPictureFillSymbol: { xoffset: 0, yoffset: 0, width: 12, height: 12 }, defaultTextSymbol: { color: [0, 0, 0, 1], font: dojox.gfx.defaultFont, angle: 0, xoffset: 0, yoffset: 0 }, getShapeDescriptors: function (_178) { var _179, fill, _17a; var type = _178.type; switch (type) { case "simplemarkersymbol": var _17b = _178.style, SMS = esri.symbol.SimpleMarkerSymbol; var size = _178.size || dojox.gfx.pt2px(esri.symbol.defaultSimpleMarkerSymbol.size), cx = 0, cy = 0, half = size / 2; var left = cx - half, _17c = cx + half, top = cy - half, _17d = cy + half; switch (_17b) { case SMS.STYLE_CIRCLE: _179 = { type: "circle", cx: cx, cy: cy, r: half }; fill = _178.getFill(); _17a = _178.getStroke(); if (_17a) { _17a.style = _17a.style || "Solid"; } break; case SMS.STYLE_CROSS: _179 = { type: "path", path: "M " + left + ",0 L " + _17c + ",0 M 0," + top + " L 0," + _17d + " E" }; fill = null; _17a = _178.getStroke(); break; case SMS.STYLE_DIAMOND: _179 = { type: "path", path: "M " + left + ",0 L 0," + top + " L " + _17c + ",0 L 0," + _17d + " L " + left + ",0 E" }; fill = _178.getFill(); _17a = _178.getStroke(); break; case SMS.STYLE_SQUARE: _179 = { type: "path", path: "M " + left + "," + _17d + " L " + left + "," + top + " L " + _17c + "," + top + " L " + _17c + "," + _17d + " L " + left + "," + _17d + " E" }; fill = _178.getFill(); _17a = _178.getStroke(); break; case SMS.STYLE_X: _179 = { type: "path", path: "M " + left + "," + _17d + " L " + _17c + "," + top + " M " + left + "," + top + " L " + _17c + "," + _17d + " E" }; fill = null; _17a = _178.getStroke(); break; } break; case "picturemarkersymbol": _179 = { type: "image", x: 0, y: 0, width: 16, height: 16, src: "" }; _179.x = _179.x - Math.round(_178.width / 2); _179.y = _179.y - Math.round(_178.height / 2); _179.width = _178.width; _179.height = _178.height; _179.src = _178.url; break; case "simplelinesymbol": case "cartographiclinesymbol": _179 = { type: "path", path: "M -15,0 L 15,0 E" }; fill = null; _17a = _178.getStroke(); break; case "simplefillsymbol": case "picturefillsymbol": _179 = { type: "path", path: "M -10,-10 L 10,0 L 10,10 L -10,10 L -10,-10 E" }; fill = _178.getFill(); _17a = _178.getStroke(); break; } return { defaultShape: _179, fill: fill, stroke: _17a }; } }); dojo.mixin(esri.symbol.defaultTextSymbol, dojox.gfx.defaultText, { type: "textsymbol", align: "middle" }); } if (!dojo._hasResource["esri.graphic"]) { dojo._hasResource["esri.graphic"] = true; dojo.provide("esri.graphic"); dojo.declare("esri.Graphic", null, { constructor: function (json, _17e, _17f, _180) { if (json && !(json instanceof esri.geometry.Geometry)) { this.geometry = json.geometry ? esri.geometry.fromJson(json.geometry) : null; this.symbol = json.symbol ? esri.symbol.fromJson(json.symbol) : null; this.attributes = json.attributes ? json.attributes : null; this.infoTemplate = json.infoTemplate ? new esri.InfoTemplate(json.infoTemplate) : null; } else { this.geometry = json; this.symbol = _17e; this.attributes = _17f; this.infoTemplate = _180; } }, _shape: null, _graphicsLayer: null, _visible: true, visible: true, getDojoShape: function () { return this._shape; }, getLayer: function () { return this._graphicsLayer; }, setGeometry: function (_181) { this.geometry = _181; var gl = this._graphicsLayer; if (gl) { gl._updateExtent(this); gl._draw(this, true); } return this; }, setSymbol: function (_182, _183) { var gl = this._graphicsLayer, _184 = this._shape, _185 = gl && gl.renderer; var _186 = this.symbol || _185 && _185.getSymbol(this); this.symbol = _182; if (_182) { this.symbol._stroke = this.symbol._fill = null; } if (gl) { if (_183) { if (_184) { gl._removeShape(this); } gl._draw(this, true); return this; } var type = this.geometry.type; if (type === "point" || type === "multipoint") { if (_184 && _186 && _182) { var _187 = _186.type, _188 = _182.type, _189 = esri.symbol.SimpleMarkerSymbol.STYLE_CIRCLE; if (_187 !== _188 || (_187 === "simplemarkersymbol" && _186.style !== _182.style && (_186.style === _189 || _182.style === _189))) { gl._removeShape(this); } } gl._draw(this, true); } else { if (_184) { gl._symbolizeShape(this); } } } return this; }, setAttributes: function (_18a) { this.attributes = _18a; return this; }, setInfoTemplate: function (_18b) { this.infoTemplate = _18b; return this; }, getTitle: function () { return esri.substitute(this.attributes, (this.infoTemplate && this.infoTemplate.title), true); }, getContent: function () { return esri.substitute(this.attributes, (this.infoTemplate && this.infoTemplate.content), false); }, show: function () { this.visible = this._visible = true; if (this._shape) { esri.show(this._shape.getEventSource()); } else { if (this._graphicsLayer) { this._graphicsLayer._draw(this, true); } } return this; }, hide: function () { if (this._shape) { esri.hide(this._shape.getEventSource()); } this.visible = this._visible = false; return this; }, toJson: function () { var json = {}; if (this.geometry) { json.geometry = this.geometry.toJson(); } if (this.attributes) { json.attributes = dojo.mixin({}, this.attributes); } if (this.symbol) { json.symbol = this.symbol.toJson(); } if (this.infoTemplate) { json.infoTemplate = this.infoTemplate.toJson(); } return json; } }); dojo.declare("esri.InfoTemplate", null, { constructor: function (_18c, _18d) { if (_18c && dojo.isObject(_18c)) { dojo.mixin(this, _18c); } else { this.title = _18c ? _18c : "${*}"; this.content = _18d ? _18d : "${*}"; } }, setTitle: function (_18e) { this.title = _18e; return this; }, setContent: function (_18f) { this.content = _18f; return this; }, toJson: function () { return { title: this.title, content: this.content }; } }); } if (!dojo._hasResource["dojo.i18n"]) { dojo._hasResource["dojo.i18n"] = true; dojo.provide("dojo.i18n"); dojo.i18n.getLocalization = function (_190, _191, _192) { _192 = dojo.i18n.normalizeLocale(_192); var _193 = _192.split("-"); var _194 = [_190, "nls", _191].join("."); var _195 = dojo._loadedModules[_194]; if (_195) { var _196; for (var i = _193.length; i > 0; i--) { var loc = _193.slice(0, i).join("_"); if (_195[loc]) { _196 = _195[loc]; break; } } if (!_196) { _196 = _195.ROOT; } if (_196) { var _197 = function () { }; _197.prototype = _196; return new _197(); } } throw new Error("Bundle not found: " + _191 + " in " + _190 + " , locale=" + _192); }; dojo.i18n.normalizeLocale = function (_198) { var _199 = _198 ? _198.toLowerCase() : dojo.locale; if (_199 == "root") { _199 = "ROOT"; } return _199; }; dojo.i18n._requireLocalization = function (_19a, _19b, _19c, _19d) { var _19e = dojo.i18n.normalizeLocale(_19c); var _19f = [_19a, "nls", _19b].join("."); var _1a0 = ""; if (_19d) { var _1a1 = _19d.split(","); for (var i = 0; i < _1a1.length; i++) { if (_19e["indexOf"](_1a1[i]) == 0) { if (_1a1[i].length > _1a0.length) { _1a0 = _1a1[i]; } } } if (!_1a0) { _1a0 = "ROOT"; } } var _1a2 = _19d ? _1a0 : _19e; var _1a3 = dojo._loadedModules[_19f]; var _1a4 = null; if (_1a3) { if (dojo.config.localizationComplete && _1a3._built) { return; } var _1a5 = _1a2.replace(/-/g, "_"); var _1a6 = _19f + "." + _1a5; _1a4 = dojo._loadedModules[_1a6]; } if (!_1a4) { _1a3 = dojo["provide"](_19f); var syms = dojo._getModuleSymbols(_19a); var _1a7 = syms.concat("nls").join("/"); var _1a8; dojo.i18n._searchLocalePath(_1a2, _19d, function (loc) { var _1a9 = loc.replace(/-/g, "_"); var _1aa = _19f + "." + _1a9; var _1ab = false; if (!dojo._loadedModules[_1aa]) { dojo["provide"](_1aa); var _1ac = [_1a7]; if (loc != "ROOT") { _1ac.push(loc); } _1ac.push(_19b); var _1ad = _1ac.join("/") + ".js"; _1ab = dojo._loadPath(_1ad, null, function (hash) { var _1ae = function () { }; _1ae.prototype = _1a8; _1a3[_1a9] = new _1ae(); for (var j in hash) { _1a3[_1a9][j] = hash[j]; } }); } else { _1ab = true; } if (_1ab && _1a3[_1a9]) { _1a8 = _1a3[_1a9]; } else { _1a3[_1a9] = _1a8; } if (_19d) { return true; } }); } if (_19d && _19e != _1a0) { _1a3[_19e.replace(/-/g, "_")] = _1a3[_1a0.replace(/-/g, "_")]; } }; (function () { var _1af = dojo.config.extraLocale; if (_1af) { if (!_1af instanceof Array) { _1af = [_1af]; } var req = dojo.i18n._requireLocalization; dojo.i18n._requireLocalization = function (m, b, _1b0, _1b1) { req(m, b, _1b0, _1b1); if (_1b0) { return; } for (var i = 0; i < _1af.length; i++) { req(m, b, _1af[i], _1b1); } }; } })(); dojo.i18n._searchLocalePath = function (_1b2, down, _1b3) { _1b2 = dojo.i18n.normalizeLocale(_1b2); var _1b4 = _1b2.split("-"); var _1b5 = []; for (var i = _1b4.length; i > 0; i--) { _1b5.push(_1b4.slice(0, i).join("-")); } _1b5.push(false); if (down) { _1b5.reverse(); } for (var j = _1b5.length - 1; j >= 0; j--) { var loc = _1b5[j] || "ROOT"; var stop = _1b3(loc); if (stop) { break; } } }; dojo.i18n._preloadLocalizations = function (_1b6, _1b7) { function _1b8(_1b9) { _1b9 = dojo.i18n.normalizeLocale(_1b9); dojo.i18n._searchLocalePath(_1b9, true, function (loc) { for (var i = 0; i < _1b7.length; i++) { if (_1b7[i] == loc) { dojo["require"](_1b6 + "_" + loc); return true; } } return false; }); }; _1b8(); var _1ba = dojo.config.extraLocale || []; for (var i = 0; i < _1ba.length; i++) { _1b8(_1ba[i]); } }; } if (!dojo._hasResource["esri.utils"]) { dojo._hasResource["esri.utils"] = true; dojo.provide("esri.utils"); dojo.addOnLoad(function () { esri.bundle = dojo.i18n.getLocalization("esri", "jsapi"); }); esri.show = function (node) { node.style.display = "block"; }; esri.hide = function (node) { node.style.display = "none"; }; esri.toggle = function (node) { node.style.display = node.style.display === "none" ? "block" : "none"; }; esri.valueOf = function (_1bb, _1bc) { for (var i in _1bb) { if (_1bb[i] == _1bc) { return i; } } return null; }; esri.substitute = (function () { var _1bd = "${*}", _1be = "${key} = ${value}<br/>"; return function (data, _1bf, _1c0) { var _1c1 = function (_1c2, key) { if (_1c2 === undefined || _1c2 === null) { return ""; } return _1c2; }; if (!_1bf || _1bf === _1bd) { var s = [], d = { key: null, value: null }, i, _1c3 = _1be; for (i in data) { d.key = i; d.value = data[i]; s.push(dojo.string.substitute(_1c3, d, _1c1)); if (_1c0) { break; } } return s.join(""); } else { return dojo.replace(_1bf, dojo.hitch({ obj: data }, function (_1c4, key) { return esri._isDefined(this.obj[key]) ? this.obj[key] : ""; }), /\$\{([^\}]+)\}/g); } }; } ()); esri.documentBox = dojo.isIE ? { w: document.documentElement.clientWidth, h: document.documentElement.clientHeight} : { w: window.innerWidth, h: window.innerHeight }; esri.urlToObject = function (url) { var iq = url.indexOf("?"); if (iq === -1) { return { path: url, query: null }; } else { return { path: url.substring(0, iq), query: dojo.queryToObject(url.substring(iq + 1)) }; } }; esri._getProxyUrl = function () { var _1c5 = esri.config.defaults.io.proxyUrl; if (!_1c5) { throw new Error(esri.bundle.io.proxyNotSet); } return esri.urlToObject(_1c5); }; esri._getProxiedUrl = function (url) { if (esri.config.defaults.io.alwaysUseProxy) { var _1c6 = esri._getProxyUrl(), _1c7 = esri.urlToObject(url); url = _1c6.path + "?" + _1c7.path; var _1c8 = dojo.objectToQuery(dojo.mixin(_1c6.query || {}, _1c7.query)); if (_1c8) { url += ("?" + _1c8); } } return url; }; esri._hasSameOrigin = function (url1, url2) { url1 = new dojo._Url(url1); url2 = new dojo._Url(url2); return (url1.scheme === url2.scheme && url1.host === url2.host && url1.port === url2.port); }; esri.request = function (_1c9, _1ca) { var _1cb = false, _1cc = false; if (esri._isDefined(_1ca)) { if (dojo.isObject(_1ca)) { _1cb = !!_1ca.useProxy; _1cc = !!_1ca.usePost; } else { _1cb = !!_1ca; } } var _1cd = _1c9.content, path = _1c9.url, _1ce = _1c9.load, herr = _1c9.error, _1cf = esri.config.defaults.io; _1c9.load = function (_1d0, io) { _1c9.load = _1ce; if (_1d0.error) { _1c9.error(_1d0.error, io); } else { if (_1ce) { _1ce(_1d0, io); } } }; _1c9.error = function (_1d1, io) { if (io.xhr) { io.xhr.abort(); } if (!(_1d1 instanceof Error)) { _1d1 = dojo.mixin(new Error(), _1d1); } _1c9.error = herr; _1cf.errorHandler(_1d1, io); if (herr) { herr(_1d1, io); } }; var len = 0; if (_1cd && path) { len = dojo.objectToQuery(_1cd).length + path.length; } _1c9.timeout = _1c9.timeout || _1cf.timeout; _1c9.handleAs = _1c9.handleAs || "json"; try { var _1d2 = esri._reqPreCallback; if (len > _1cf.postLength || _1cc || _1cf.alwaysUseProxy || _1cb) { var _1d3; if (!_1cf.alwaysUseProxy && !_1cb && esri._hasSameOrigin(_1c9.url, window.location.href)) { _1d3 = { path: null, query: null }; } else { _1d3 = esri._getProxyUrl(); } _1c9 = dojo.mixin(_1c9, { url: (_1d3.path ? _1d3.path + "?" : "") + _1c9.url, content: dojo.mixin(_1d3.query || {}, _1c9.content) }); return dojo.rawXhrPost(_1d2 ? _1d2(_1c9) : _1c9); } else { return dojo.io.script.get(_1d2 ? _1d2(_1c9) : _1c9); } } catch (e) { _1c9.error(e); } }; esri.setRequestPreCallback = function (_1d4) { esri._reqPreCallback = _1d4; }; esri._getParts = function (arr, obj, cb) { return [dojo.isString(arr) ? arr.split("") : arr, obj || dojo.global, dojo.isString(cb) ? new Function("item", "index", "array", cb) : cb]; }; esri.filter = function (arr, _1d5, _1d6) { var _1d7 = esri._getParts(arr, _1d6, _1d5), _1d8 = {}; arr = _1d7[0]; for (var i in arr) { if (_1d7[2].call(_1d7[i], arr[i], i, arr)) { _1d8[i] = arr[i]; } } return _1d8; }; esri.TileUtils = (function () { function _1d9(map, ti, _1da) { var wd = map.width, ht = map.height, ew = _1da.xmax - _1da.xmin, eh = _1da.ymax - _1da.ymin, ed = -1, lods = ti.lods, abs = Math.abs, lod, cl, ced; for (var i = 0, il = lods.length; i < il; i++) { cl = lods[i]; ced = ew > eh ? abs(eh - (ht * cl.resolution)) : abs(ew - (wd * cl.resolution)); if (ed < 0 || ced <= ed) { lod = cl; ed = ced; } else { break; } } return lod; }; function _1db(map, _1dc, lod) { var res = lod.resolution, cx = (_1dc.xmin + _1dc.xmax) / 2, cy = (_1dc.ymin + _1dc.ymax) / 2, _1dd = (map.width / 2) * res, _1de = (map.height / 2) * res; return new esri.geometry.Extent(cx - (_1dd), cy - (_1de), cx + (_1dd), cy + (_1de), _1dc.spatialReference); }; function _1df(map, ti, _1e0, lod) { var res = lod.resolution, tw = ti.width, th = ti.height, to = ti.origin, mv = map.__visibleDelta, _1e1 = Math.floor, tmw = tw * res, tmh = th * res, tr = _1e1((to.y - _1e0.y) / tmh), tc = _1e1((_1e0.x - to.x) / tmw), tmox = to.x + (tc * tmw), tmoy = to.y - (tr * tmh), oX = _1e1(Math.abs((_1e0.x - tmox) * tw / tmw)) + mv.x, oY = _1e1(Math.abs((_1e0.y - tmoy) * th / tmh)) + mv.y; return { point: _1e0, coords: { row: tr, col: tc }, offsets: { x: oX, y: oY} }; }; return { getContainingTileCoords: function (ti, _1e2, lod) { var to = ti.origin, res = lod.resolution, tmw = ti.width * res, tmh = ti.height * res, tc = Math.floor((_1e2.x - to.x) / tmw), tr = Math.floor((to.y - _1e2.y) / tmh); return { row: tr, col: tc }; }, getCandidateTileInfo: function (map, ti, _1e3) { var lod = _1d9(map, ti, _1e3), adj = _1db(map, _1e3, lod), ct = _1df(map, ti, new esri.geometry.Point(adj.xmin, adj.ymax, _1e3.spatialReference), lod); return { tile: ct, lod: lod, extent: adj }; }, getTileExtent: function (ti, _1e4, row, col) { var to = ti.origin, lod = ti.lods[_1e4], res = lod.resolution, tw = ti.width, th = ti.height; return new esri.geometry.Extent(((col * res) * tw) + to.x, to.y - ((row + 1) * res) * th, (((col + 1) * res) * tw) + to.x, to.y - ((row * res) * th), ti.spatialReference); } }; } ()); esri.graphicsExtent = function (_1e5) { var g = _1e5[0].geometry, _1e6 = g.getExtent(), ext; if (_1e6 === null) { _1e6 = new esri.geometry.Extent(g.x, g.y, g.x, g.y, g.spatialReference); } for (var i = 1, il = _1e5.length; i < il; i++) { ext = (g = _1e5[i].geometry).getExtent(); if (ext === null) { ext = new esri.geometry.Extent(g.x, g.y, g.x, g.y, g.spatialReference); } _1e6 = _1e6.union(ext); } if (_1e6.getWidth() <= 0 && _1e6.getHeight() <= 0) { return null; } return _1e6; }; esri.getGeometries = function (_1e7) { return dojo.map(_1e7, function (_1e8) { return _1e8.geometry; }); }; esri._encodeGraphics = function (_1e9) { var _1ea = [], json, enc; dojo.forEach(_1e9, function (g, i) { json = g.toJson(); enc = {}; if (json.geometry) { enc.geometry = json.geometry; } if (json.attributes) { enc.attributes = json.attributes; } _1ea[i] = enc; }); return _1ea; }; esri._serializeLayerDefinitions = function (_1eb) { var defs = [], _1ec = false, re = /[:;]/; if (_1eb) { dojo.forEach(_1eb, function (defn, i) { if (defn) { defs.push([i, defn]); if (!_1ec && re.test(defn)) { _1ec = true; } } }); if (defs.length > 0) { var _1ed; if (_1ec) { _1ed = {}; dojo.forEach(defs, function (defn) { _1ed[defn[0]] = defn[1]; }); _1ed = dojo.toJson(_1ed); } else { _1ed = []; dojo.forEach(defs, function (defn) { _1ed.push(defn[0] + ":" + defn[1]); }); _1ed = _1ed.join(";"); } return _1ed; } } return null; }; esri._isDefined = function (_1ee) { return (_1ee !== undefined) && (_1ee !== null); }; esri._sanitize = function (obj) { for (var prop in obj) { if (obj.hasOwnProperty(prop)) { if (obj[prop] === undefined) { delete obj[prop]; } } } return obj; }; } if (!dojo._hasResource["dojo.fx.Toggler"]) { dojo._hasResource["dojo.fx.Toggler"] = true; dojo.provide("dojo.fx.Toggler"); dojo.declare("dojo.fx.Toggler", null, { node: null, showFunc: dojo.fadeIn, hideFunc: dojo.fadeOut, showDuration: 200, hideDuration: 200, constructor: function (args) { var _1ef = this; dojo.mixin(_1ef, args); _1ef.node = args.node; _1ef._showArgs = dojo.mixin({}, args); _1ef._showArgs.node = _1ef.node; _1ef._showArgs.duration = _1ef.showDuration; _1ef.showAnim = _1ef.showFunc(_1ef._showArgs); _1ef._hideArgs = dojo.mixin({}, args); _1ef._hideArgs.node = _1ef.node; _1ef._hideArgs.duration = _1ef.hideDuration; _1ef.hideAnim = _1ef.hideFunc(_1ef._hideArgs); dojo.connect(_1ef.showAnim, "beforeBegin", dojo.hitch(_1ef.hideAnim, "stop", true)); dojo.connect(_1ef.hideAnim, "beforeBegin", dojo.hitch(_1ef.showAnim, "stop", true)); }, show: function (_1f0) { return this.showAnim.play(_1f0 || 0); }, hide: function (_1f1) { return this.hideAnim.play(_1f1 || 0); } }); } if (!dojo._hasResource["dojo.fx"]) { dojo._hasResource["dojo.fx"] = true; dojo.provide("dojo.fx"); (function () { var d = dojo, _1f2 = { _fire: function (evt, args) { if (this[evt]) { this[evt].apply(this, args || []); } return this; } }; var _1f3 = function (_1f4) { this._index = -1; this._animations = _1f4 || []; this._current = this._onAnimateCtx = this._onEndCtx = null; this.duration = 0; d.forEach(this._animations, function (a) { this.duration += a.duration; if (a.delay) { this.duration += a.delay; } }, this); }; d.extend(_1f3, { _onAnimate: function () { this._fire("onAnimate", arguments); }, _onEnd: function () { d.disconnect(this._onAnimateCtx); d.disconnect(this._onEndCtx); this._onAnimateCtx = this._onEndCtx = null; if (this._index + 1 == this._animations.length) { this._fire("onEnd"); } else { this._current = this._animations[++this._index]; this._onAnimateCtx = d.connect(this._current, "onAnimate", this, "_onAnimate"); this._onEndCtx = d.connect(this._current, "onEnd", this, "_onEnd"); this._current.play(0, true); } }, play: function (_1f5, _1f6) { if (!this._current) { this._current = this._animations[this._index = 0]; } if (!_1f6 && this._current.status() == "playing") { return this; } var _1f7 = d.connect(this._current, "beforeBegin", this, function () { this._fire("beforeBegin"); }), _1f8 = d.connect(this._current, "onBegin", this, function (arg) { this._fire("onBegin", arguments); }), _1f9 = d.connect(this._current, "onPlay", this, function (arg) { this._fire("onPlay", arguments); d.disconnect(_1f7); d.disconnect(_1f8); d.disconnect(_1f9); }); if (this._onAnimateCtx) { d.disconnect(this._onAnimateCtx); } this._onAnimateCtx = d.connect(this._current, "onAnimate", this, "_onAnimate"); if (this._onEndCtx) { d.disconnect(this._onEndCtx); } this._onEndCtx = d.connect(this._current, "onEnd", this, "_onEnd"); this._current.play.apply(this._current, arguments); return this; }, pause: function () { if (this._current) { var e = d.connect(this._current, "onPause", this, function (arg) { this._fire("onPause", arguments); d.disconnect(e); }); this._current.pause(); } return this; }, gotoPercent: function (_1fa, _1fb) { this.pause(); var _1fc = this.duration * _1fa; this._current = null; d.some(this._animations, function (a) { if (a.duration <= _1fc) { this._current = a; return true; } _1fc -= a.duration; return false; }); if (this._current) { this._current.gotoPercent(_1fc / this._current.duration, _1fb); } return this; }, stop: function (_1fd) { if (this._current) { if (_1fd) { for (; this._index + 1 < this._animations.length; ++this._index) { this._animations[this._index].stop(true); } this._current = this._animations[this._index]; } var e = d.connect(this._current, "onStop", this, function (arg) { this._fire("onStop", arguments); d.disconnect(e); }); this._current.stop(); } return this; }, status: function () { return this._current ? this._current.status() : "stopped"; }, destroy: function () { if (this._onAnimateCtx) { d.disconnect(this._onAnimateCtx); } if (this._onEndCtx) { d.disconnect(this._onEndCtx); } } }); d.extend(_1f3, _1f2); dojo.fx.chain = function (_1fe) { return new _1f3(_1fe); }; var _1ff = function (_200) { this._animations = _200 || []; this._connects = []; this._finished = 0; this.duration = 0; d.forEach(_200, function (a) { var _201 = a.duration; if (a.delay) { _201 += a.delay; } if (this.duration < _201) { this.duration = _201; } this._connects.push(d.connect(a, "onEnd", this, "_onEnd")); }, this); this._pseudoAnimation = new d.Animation({ curve: [0, 1], duration: this.duration }); var self = this; d.forEach(["beforeBegin", "onBegin", "onPlay", "onAnimate", "onPause", "onStop", "onEnd"], function (evt) { self._connects.push(d.connect(self._pseudoAnimation, evt, function () { self._fire(evt, arguments); })); }); }; d.extend(_1ff, { _doAction: function (_202, args) { d.forEach(this._animations, function (a) { a[_202].apply(a, args); }); return this; }, _onEnd: function () { if (++this._finished > this._animations.length) { this._fire("onEnd"); } }, _call: function (_203, args) { var t = this._pseudoAnimation; t[_203].apply(t, args); }, play: function (_204, _205) { this._finished = 0; this._doAction("play", arguments); this._call("play", arguments); return this; }, pause: function () { this._doAction("pause", arguments); this._call("pause", arguments); return this; }, gotoPercent: function (_206, _207) { var ms = this.duration * _206; d.forEach(this._animations, function (a) { a.gotoPercent(a.duration < ms ? 1 : (ms / a.duration), _207); }); this._call("gotoPercent", arguments); return this; }, stop: function (_208) { this._doAction("stop", arguments); this._call("stop", arguments); return this; }, status: function () { return this._pseudoAnimation.status(); }, destroy: function () { d.forEach(this._connects, dojo.disconnect); } }); d.extend(_1ff, _1f2); dojo.fx.combine = function (_209) { return new _1ff(_209); }; dojo.fx.wipeIn = function (args) { var node = args.node = d.byId(args.node), s = node.style, o; var anim = d.animateProperty(d.mixin({ properties: { height: { start: function () { o = s.overflow; s.overflow = "hidden"; if (s.visibility == "hidden" || s.display == "none") { s.height = "1px"; s.display = ""; s.visibility = ""; return 1; } else { var _20a = d.style(node, "height"); return Math.max(_20a, 1); } }, end: function () { return node.scrollHeight; } }} }, args)); d.connect(anim, "onEnd", function () { s.height = "auto"; s.overflow = o; }); return anim; }; dojo.fx.wipeOut = function (args) { var node = args.node = d.byId(args.node), s = node.style, o; var anim = d.animateProperty(d.mixin({ properties: { height: { end: 1}} }, args)); d.connect(anim, "beforeBegin", function () { o = s.overflow; s.overflow = "hidden"; s.display = ""; }); d.connect(anim, "onEnd", function () { s.overflow = o; s.height = "auto"; s.display = "none"; }); return anim; }; dojo.fx.slideTo = function (args) { var node = args.node = d.byId(args.node), top = null, left = null; var init = (function (n) { return function () { var cs = d.getComputedStyle(n); var pos = cs.position; top = (pos == "absolute" ? n.offsetTop : parseInt(cs.top) || 0); left = (pos == "absolute" ? n.offsetLeft : parseInt(cs.left) || 0); if (pos != "absolute" && pos != "relative") { var ret = d.position(n, true); top = ret.y; left = ret.x; n.style.position = "absolute"; n.style.top = top + "px"; n.style.left = left + "px"; } }; })(node); init(); var anim = d.animateProperty(d.mixin({ properties: { top: args.top || 0, left: args.left || 0} }, args)); d.connect(anim, "beforeBegin", anim, init); return anim; }; })(); } if (!dojo._hasResource["esri.fx"]) { dojo._hasResource["esri.fx"] = true; dojo.provide("esri.fx"); esri.fx.animateRange = function (args) { var _20b = args.range; return new dojo._Animation(dojo.mixin({ curve: new dojo._Line(_20b.start, _20b.end) }, args)); }; esri.fx.resize = function (args) { var node = (args.node = dojo.byId(args.node)), _20c = args.start, end = args.end; if (!_20c) { var mb = dojo._getMarginBox(node), pb = dojo._getPadBorderExtents(node); _20c = (args.start = { left: mb.l + pb.l, top: mb.t + pb.t, width: mb.w - pb.w, height: mb.h - pb.h }); } if (!end) { var _20d = args.anchor ? args.anchor : { x: _20c.left, y: _20c.top }, size = args.size; end = args.end = { left: (_20c.left - ((size.width - _20c.width) * (_20d.x - _20c.left) / _20c.width)), top: (_20c.top - ((size.height - _20c.height) * (_20d.y - _20c.top) / _20c.height)), width: size.width, height: size.height }; } return dojo.animateProperty(dojo.mixin({ properties: { left: { start: _20c.left, end: end.left }, top: { start: _20c.top, end: end.top }, width: { start: _20c.width, end: end.width }, height: { start: _20c.height, end: end.height}} }, args)); }; esri.fx.slideTo = function (args) { var node = (args.node = dojo.byId(args.node)), _20e = dojo.getComputedStyle, top = null, left = null, init = (function () { var _20f = node; return function () { var pos = _20f.style.position == "absolute" ? "absolute" : "relative"; top = (pos == "absolute" ? node.offsetTop : parseInt(_20e(node).top) || 0); left = (pos == "absolute" ? node.offsetLeft : parseInt(_20e(node).left) || 0); if (pos != "absolute" && pos != "relative") { var ret = dojo.coords(_20f, true); top = ret.y; left = ret.x; _20f.style.position = "absolute"; _20f.style.top = top + "px"; _20f.style.left = left + "px"; } }; })(); init(); var anim = dojo.animateProperty(dojo.mixin({ properties: { top: { start: top, end: args.top || 0 }, left: { start: left, end: args.left || 0}} }, args)); dojo.connect(anim, "beforeBegin", anim, init); return anim; }; esri.fx.flash = function (args) { args = dojo.mixin({ end: "#f00", duration: 500, count: 1 }, args); args.duration /= args.count * 2; var node = dojo.byId(args.node), _210 = args.start; if (!_210) { _210 = dojo.getComputedStyle(node).backgroundColor; } var end = args.end, _211 = args.duration, _212 = [], base = { node: node, duration: _211 }; for (var i = 0, il = args.count; i < il; i++) { _212.push(dojo.animateProperty(dojo.mixin({ properties: { backgroundColor: { start: _210, end: end}} }, base))); _212.push(dojo.animateProperty(dojo.mixin({ properties: { backgroundColor: { start: end, end: _210}} }, base))); } return dojo.fx.chain(_212); }; } if (!dojo._hasResource["esri.layers.layer"]) { dojo._hasResource["esri.layers.layer"] = true; dojo.provide("esri.layers.layer"); dojo.declare("esri.layers.Layer", null, { constructor: function (url, _213) { if (url && dojo.isString(url)) { this._url = esri.urlToObject(this.url = url); } else { this.url = (this._url = null); _213 = url; } this._map = this._div = null; if (_213) { if (_213.id) { this.id = _213.id; } if (_213.visible === false) { this.visible = false; } if (_213.opacity !== undefined) { this.opacity = _213.opacity; } } this._errorHandler = dojo.hitch(this, this._errorHandler); }, id: null, visible: true, loaded: false, _errorHandler: function (err) { this.onError(err); }, _setMap: function (map, _214, _215, lod) { }, _unsetMap: function (map, _216) { }, _cleanUp: function () { this._map = this._div = null; }, _fireUpdateStart: function () { if (this._updateStarted) { return; } this._updateStarted = true; this.onUpdateStart(); }, _fireUpdateEnd: function (_217) { this._updateStarted = false; this.onUpdateEnd(_217); }, _getToken: function () { var url = this._url; return (url && url.query && url.query.token); }, refresh: function () { }, show: function () { this.setVisibility(true); }, hide: function () { this.setVisibility(false); }, setVisibility: function (v) { if (this.visible !== v) { this.visible = v; this.onVisibilityChange(this.visible); } }, onLoad: function () { }, onVisibilityChange: function () { }, onUpdate: function () { }, onUpdateStart: function () { }, onUpdateEnd: function (_218) { }, onError: function () { } }); } if (!dojo._hasResource["dojox.gfx.matrix"]) { dojo._hasResource["dojox.gfx.matrix"] = true; dojo.provide("dojox.gfx.matrix"); (function () { var m = dojox.gfx.matrix; var _219 = {}; m._degToRad = function (_21a) { return _219[_21a] || (_219[_21a] = (Math.PI * _21a / 180)); }; m._radToDeg = function (_21b) { return _21b / Math.PI * 180; }; m.Matrix2D = function (arg) { if (arg) { if (typeof arg == "number") { this.xx = this.yy = arg; } else { if (arg instanceof Array) { if (arg.length > 0) { var _21c = m.normalize(arg[0]); for (var i = 1; i < arg.length; ++i) { var l = _21c, r = dojox.gfx.matrix.normalize(arg[i]); _21c = new m.Matrix2D(); _21c.xx = l.xx * r.xx + l.xy * r.yx; _21c.xy = l.xx * r.xy + l.xy * r.yy; _21c.yx = l.yx * r.xx + l.yy * r.yx; _21c.yy = l.yx * r.xy + l.yy * r.yy; _21c.dx = l.xx * r.dx + l.xy * r.dy + l.dx; _21c.dy = l.yx * r.dx + l.yy * r.dy + l.dy; } dojo.mixin(this, _21c); } } else { dojo.mixin(this, arg); } } } }; dojo.extend(m.Matrix2D, { xx: 1, xy: 0, yx: 0, yy: 1, dx: 0, dy: 0 }); dojo.mixin(m, { identity: new m.Matrix2D(), flipX: new m.Matrix2D({ xx: -1 }), flipY: new m.Matrix2D({ yy: -1 }), flipXY: new m.Matrix2D({ xx: -1, yy: -1 }), translate: function (a, b) { if (arguments.length > 1) { return new m.Matrix2D({ dx: a, dy: b }); } return new m.Matrix2D({ dx: a.x, dy: a.y }); }, scale: function (a, b) { if (arguments.length > 1) { return new m.Matrix2D({ xx: a, yy: b }); } if (typeof a == "number") { return new m.Matrix2D({ xx: a, yy: a }); } return new m.Matrix2D({ xx: a.x, yy: a.y }); }, rotate: function (_21d) { var c = Math.cos(_21d); var s = Math.sin(_21d); return new m.Matrix2D({ xx: c, xy: -s, yx: s, yy: c }); }, rotateg: function (_21e) { return m.rotate(m._degToRad(_21e)); }, skewX: function (_21f) { return new m.Matrix2D({ xy: Math.tan(_21f) }); }, skewXg: function (_220) { return m.skewX(m._degToRad(_220)); }, skewY: function (_221) { return new m.Matrix2D({ yx: Math.tan(_221) }); }, skewYg: function (_222) { return m.skewY(m._degToRad(_222)); }, reflect: function (a, b) { if (arguments.length == 1) { b = a.y; a = a.x; } var a2 = a * a, b2 = b * b, n2 = a2 + b2, xy = 2 * a * b / n2; return new m.Matrix2D({ xx: 2 * a2 / n2 - 1, xy: xy, yx: xy, yy: 2 * b2 / n2 - 1 }); }, project: function (a, b) { if (arguments.length == 1) { b = a.y; a = a.x; } var a2 = a * a, b2 = b * b, n2 = a2 + b2, xy = a * b / n2; return new m.Matrix2D({ xx: a2 / n2, xy: xy, yx: xy, yy: b2 / n2 }); }, normalize: function (_223) { return (_223 instanceof m.Matrix2D) ? _223 : new m.Matrix2D(_223); }, clone: function (_224) { var obj = new m.Matrix2D(); for (var i in _224) { if (typeof (_224[i]) == "number" && typeof (obj[i]) == "number" && obj[i] != _224[i]) { obj[i] = _224[i]; } } return obj; }, invert: function (_225) { var M = m.normalize(_225), D = M.xx * M.yy - M.xy * M.yx, M = new m.Matrix2D({ xx: M.yy / D, xy: -M.xy / D, yx: -M.yx / D, yy: M.xx / D, dx: (M.xy * M.dy - M.yy * M.dx) / D, dy: (M.yx * M.dx - M.xx * M.dy) / D }); return M; }, _multiplyPoint: function (_226, x, y) { return { x: _226.xx * x + _226.xy * y + _226.dx, y: _226.yx * x + _226.yy * y + _226.dy }; }, multiplyPoint: function (_227, a, b) { var M = m.normalize(_227); if (typeof a == "number" && typeof b == "number") { return m._multiplyPoint(M, a, b); } return m._multiplyPoint(M, a.x, a.y); }, multiply: function (_228) { var M = m.normalize(_228); for (var i = 1; i < arguments.length; ++i) { var l = M, r = m.normalize(arguments[i]); M = new m.Matrix2D(); M.xx = l.xx * r.xx + l.xy * r.yx; M.xy = l.xx * r.xy + l.xy * r.yy; M.yx = l.yx * r.xx + l.yy * r.yx; M.yy = l.yx * r.xy + l.yy * r.yy; M.dx = l.xx * r.dx + l.xy * r.dy + l.dx; M.dy = l.yx * r.dx + l.yy * r.dy + l.dy; } return M; }, _sandwich: function (_229, x, y) { return m.multiply(m.translate(x, y), _229, m.translate(-x, -y)); }, scaleAt: function (a, b, c, d) { switch (arguments.length) { case 4: return m._sandwich(m.scale(a, b), c, d); case 3: if (typeof c == "number") { return m._sandwich(m.scale(a), b, c); } return m._sandwich(m.scale(a, b), c.x, c.y); } return m._sandwich(m.scale(a), b.x, b.y); }, rotateAt: function (_22a, a, b) { if (arguments.length > 2) { return m._sandwich(m.rotate(_22a), a, b); } return m._sandwich(m.rotate(_22a), a.x, a.y); }, rotategAt: function (_22b, a, b) { if (arguments.length > 2) { return m._sandwich(m.rotateg(_22b), a, b); } return m._sandwich(m.rotateg(_22b), a.x, a.y); }, skewXAt: function (_22c, a, b) { if (arguments.length > 2) { return m._sandwich(m.skewX(_22c), a, b); } return m._sandwich(m.skewX(_22c), a.x, a.y); }, skewXgAt: function (_22d, a, b) { if (arguments.length > 2) { return m._sandwich(m.skewXg(_22d), a, b); } return m._sandwich(m.skewXg(_22d), a.x, a.y); }, skewYAt: function (_22e, a, b) { if (arguments.length > 2) { return m._sandwich(m.skewY(_22e), a, b); } return m._sandwich(m.skewY(_22e), a.x, a.y); }, skewYgAt: function (_22f, a, b) { if (arguments.length > 2) { return m._sandwich(m.skewYg(_22f), a, b); } return m._sandwich(m.skewYg(_22f), a.x, a.y); } }); })(); dojox.gfx.Matrix2D = dojox.gfx.matrix.Matrix2D; } if (!dojo._hasResource["dojox.gfx"]) { dojo._hasResource["dojox.gfx"] = true; dojo.provide("dojox.gfx"); dojo.loadInit(function () { var gfx = dojo.getObject("dojox.gfx", true), sl, flag, _230; if (!gfx.renderer) { if (dojo.config.forceGfxRenderer) { dojox.gfx.renderer = dojo.config.forceGfxRenderer; return; } var _231 = (typeof dojo.config.gfxRenderer == "string" ? dojo.config.gfxRenderer : "svg,vml,silverlight,canvas").split(","); var ua = navigator.userAgent, _232 = 0, _233 = 0; if (dojo.isSafari >= 3) { if (ua.indexOf("iPhone") >= 0 || ua.indexOf("iPod") >= 0) { _230 = ua.match(/Version\/(\d(\.\d)?(\.\d)?)\sMobile\/([^\s]*)\s?/); if (_230) { _232 = parseInt(_230[4].substr(0, 3), 16); } } } if (dojo.isWebKit) { if (!_232) { _230 = ua.match(/Android\s+(\d+\.\d+)/); if (_230) { _233 = parseFloat(_230[1]); } } } for (var i = 0; i < _231.length; ++i) { switch (_231[i]) { case "svg": if (!dojo.isIE && (!_232 || _232 >= 1521) && !_233 && !dojo.isAIR) { dojox.gfx.renderer = "svg"; } break; case "vml": if (dojo.isIE) { dojox.gfx.renderer = "vml"; } break; case "silverlight": try { if (dojo.isIE) { sl = new ActiveXObject("AgControl.AgControl"); if (sl && sl.IsVersionSupported("1.0")) { flag = true; } } else { if (navigator.plugins["Silverlight Plug-In"]) { flag = true; } } } catch (e) { flag = false; } finally { sl = null; } if (flag) { dojox.gfx.renderer = "silverlight"; } break; case "canvas": if (!dojo.isIE) { dojox.gfx.renderer = "canvas"; } break; } if (dojox.gfx.renderer) { break; } } if (dojo.config.isDebug) { console.log("gfx renderer = " + dojox.gfx.renderer); } } }); dojo.requireIf(dojox.gfx.renderer == "svg", "dojox.gfx.svg"); dojo.requireIf(dojox.gfx.renderer == "vml", "dojox.gfx.vml"); dojo.requireIf(dojox.gfx.renderer == "silverlight", "dojox.gfx.silverlight"); dojo.requireIf(dojox.gfx.renderer == "canvas", "dojox.gfx.canvas"); } if (!dojo._hasResource["dojo.date"]) { dojo._hasResource["dojo.date"] = true; dojo.provide("dojo.date"); dojo.date.getDaysInMonth = function (_234) { var _235 = _234.getMonth(); var days = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; if (_235 == 1 && dojo.date.isLeapYear(_234)) { return 29; } return days[_235]; }; dojo.date.isLeapYear = function (_236) { var year = _236.getFullYear(); return !(year % 400) || (!(year % 4) && !!(year % 100)); }; dojo.date.getTimezoneName = function (_237) { var str = _237.toString(); var tz = ""; var _238; var pos = str.indexOf("("); if (pos > -1) { tz = str.substring(++pos, str.indexOf(")")); } else { var pat = /([A-Z\/]+) \d{4}$/; if ((_238 = str.match(pat))) { tz = _238[1]; } else { str = _237.toLocaleString(); pat = / ([A-Z\/]+)$/; if ((_238 = str.match(pat))) { tz = _238[1]; } } } return (tz == "AM" || tz == "PM") ? "" : tz; }; dojo.date.compare = function (_239, _23a, _23b) { _239 = new Date(+_239); _23a = new Date(+(_23a || new Date())); if (_23b == "date") { _239.setHours(0, 0, 0, 0); _23a.setHours(0, 0, 0, 0); } else { if (_23b == "time") { _239.setFullYear(0, 0, 0); _23a.setFullYear(0, 0, 0); } } if (_239 > _23a) { return 1; } if (_239 < _23a) { return -1; } return 0; }; dojo.date.add = function (date, _23c, _23d) { var sum = new Date(+date); var _23e = false; var _23f = "Date"; switch (_23c) { case "day": break; case "weekday": var days, _240; var mod = _23d % 5; if (!mod) { days = (_23d > 0) ? 5 : -5; _240 = (_23d > 0) ? ((_23d - 5) / 5) : ((_23d + 5) / 5); } else { days = mod; _240 = parseInt(_23d / 5); } var strt = date.getDay(); var adj = 0; if (strt == 6 && _23d > 0) { adj = 1; } else { if (strt == 0 && _23d < 0) { adj = -1; } } var trgt = strt + days; if (trgt == 0 || trgt == 6) { adj = (_23d > 0) ? 2 : -2; } _23d = (7 * _240) + days + adj; break; case "year": _23f = "FullYear"; _23e = true; break; case "week": _23d *= 7; break; case "quarter": _23d *= 3; case "month": _23e = true; _23f = "Month"; break; default: _23f = "UTC" + _23c.charAt(0).toUpperCase() + _23c.substring(1) + "s"; } if (_23f) { sum["set" + _23f](sum["get" + _23f]() + _23d); } if (_23e && (sum.getDate() < date.getDate())) { sum.setDate(0); } return sum; }; dojo.date.difference = function (_241, _242, _243) { _242 = _242 || new Date(); _243 = _243 || "day"; var _244 = _242.getFullYear() - _241.getFullYear(); var _245 = 1; switch (_243) { case "quarter": var m1 = _241.getMonth(); var m2 = _242.getMonth(); var q1 = Math.floor(m1 / 3) + 1; var q2 = Math.floor(m2 / 3) + 1; q2 += (_244 * 4); _245 = q2 - q1; break; case "weekday": var days = Math.round(dojo.date.difference(_241, _242, "day")); var _246 = parseInt(dojo.date.difference(_241, _242, "week")); var mod = days % 7; if (mod == 0) { days = _246 * 5; } else { var adj = 0; var aDay = _241.getDay(); var bDay = _242.getDay(); _246 = parseInt(days / 7); mod = days % 7; var _247 = new Date(_241); _247.setDate(_247.getDate() + (_246 * 7)); var _248 = _247.getDay(); if (days > 0) { switch (true) { case aDay == 6: adj = -1; break; case aDay == 0: adj = 0; break; case bDay == 6: adj = -1; break; case bDay == 0: adj = -2; break; case (_248 + mod) > 5: adj = -2; } } else { if (days < 0) { switch (true) { case aDay == 6: adj = 0; break; case aDay == 0: adj = 1; break; case bDay == 6: adj = 2; break; case bDay == 0: adj = 1; break; case (_248 + mod) < 0: adj = 2; } } } days += adj; days -= (_246 * 2); } _245 = days; break; case "year": _245 = _244; break; case "month": _245 = (_242.getMonth() - _241.getMonth()) + (_244 * 12); break; case "week": _245 = parseInt(dojo.date.difference(_241, _242, "day") / 7); break; case "day": _245 /= 24; case "hour": _245 /= 60; case "minute": _245 /= 60; case "second": _245 /= 1000; case "millisecond": _245 *= _242.getTime() - _241.getTime(); } return Math.round(_245); }; } if (!dojo._hasResource["esri.renderer"]) { dojo._hasResource["esri.renderer"] = true; dojo.provide("esri.renderer"); esri.renderer.fromJson = function (json) { var type = json.type || "", _249; switch (type) { case "simple": _249 = new esri.renderer.SimpleRenderer(json); break; case "uniqueValue": _249 = new esri.renderer.UniqueValueRenderer(json); break; case "classBreaks": _249 = new esri.renderer.ClassBreaksRenderer(json); break; } return _249; }; dojo.declare("esri.renderer.Renderer", null, { constructor: function () { this.getSymbol = dojo.hitch(this, this.getSymbol); }, getSymbol: function (_24a) { }, toJson: function () { } }); dojo.declare("esri.renderer.SimpleRenderer", esri.renderer.Renderer, { constructor: function (sym) { var _24b = sym.declaredClass; if (_24b && (_24b.indexOf("esri.symbol") !== -1)) { this.symbol = sym; } else { var json = sym, sym = json.symbol; if (sym) { this.symbol = esri.symbol.fromJson(sym); } this.label = json.label; this.description = json.description; } }, getSymbol: function (_24c) { return this.symbol; }, toJson: function () { return esri._sanitize({ type: "simple", label: this.label, description: this.description, symbol: this.symbol && this.symbol.toJson() }); } }); dojo.declare("esri.renderer.UniqueValueRenderer", esri.renderer.Renderer, { constructor: function (sym, attr, _24d, _24e, _24f) { this.values = []; this._values = []; this.infos = []; var _250 = sym.declaredClass; if (_250 && (_250.indexOf("esri.symbol") !== -1)) { this.defaultSymbol = sym; this.attributeField = attr; this.attributeField2 = _24d; this.attributeField3 = _24e; this.fieldDelimiter = _24f; } else { var json = sym, sym = json.defaultSymbol; if (sym) { this.defaultSymbol = esri.symbol.fromJson(sym); } this.attributeField = json.field1; this.attributeField2 = json.field2; this.attributeField3 = json.field3; this.fieldDelimiter = json.fieldDelimiter; this.defaultLabel = json.defaultLabel; dojo.forEach(json.uniqueValueInfos, this._addValueInfo, this); } this._multi = (this.attributeField2) ? true : false; }, addValue: function (_251, _252) { var info = dojo.isObject(_251) ? _251 : { value: _251, symbol: _252 }; this._addValueInfo(info); }, removeValue: function (_253) { var i = dojo.indexOf(this.values, _253); if (i === -1) { return; } this.values.splice(i, 1); delete this._values[_253]; this.infos.splice(i, 1); }, getSymbol: function (_254) { if (this._multi) { var _255 = _254.attributes, _256 = this.attributeField, _257 = this.attributeField2, _258 = this.attributeField3; var _259 = []; if (_256) { _259.push(_255[_256]); } if (_257) { _259.push(_255[_257]); } if (_258) { _259.push(_255[_258]); } return this._values[_259.join(this.fieldDelimiter || "")] || this.defaultSymbol; } else { return this._values[_254.attributes[this.attributeField]] || this.defaultSymbol; } }, _addValueInfo: function (info) { var _25a = info.value; this.values.push(_25a); this.infos.push(info); var _25b = info.symbol; if (_25b) { if (!_25b.declaredClass) { info.symbol = esri.symbol.fromJson(_25b); } } this._values[_25a] = info.symbol; }, toJson: function () { var _25c = esri._sanitize; return _25c({ type: "uniqueValue", field1: this.attributeField, field2: this.attributeField2, field3: this.attributeField3, fieldDelimiter: this.fieldDelimiter, defaultSymbol: this.defaultSymbol && this.defaultSymbol.toJson(), defaultLabel: this.defaultLabel, uniqueValueInfos: dojo.map(this.infos || [], function (info) { info = dojo.mixin({}, info); info.symbol = info.symbol && info.symbol.toJson(); return _25c(info); }) }); } }); dojo.declare("esri.renderer.ClassBreaksRenderer", esri.renderer.Renderer, { constructor: function (sym, attr) { this.breaks = []; this._symbols = []; this.infos = []; var _25d = sym.declaredClass; if (_25d && (_25d.indexOf("esri.symbol") !== -1)) { this.defaultSymbol = sym; this.attributeField = attr; } else { var json = sym; this.attributeField = json.field; var min = json.minValue, _25e = json.classBreakInfos; if (_25e && _25e[0] && esri._isDefined(_25e[0].classMaxValue)) { dojo.forEach(_25e, function (info) { var _25f = info.classMaxValue; info.minValue = min; info.maxValue = _25f; min = _25f; }, this); } dojo.forEach(_25e, this._addBreakInfo, this); } }, addBreak: function (min, max, _260) { var info = dojo.isObject(min) ? min : { minValue: min, maxValue: max, symbol: _260 }; this._addBreakInfo(info); }, removeBreak: function (min, max) { var _261, _262 = this.breaks, _263 = this._symbols; for (var i = 0, il = _262.length; i < il; i++) { _261 = _262[i]; if (_261[0] == min && _261[1] == max) { _262.splice(i, 1); delete _263[min + "-" + max]; this.infos.splice(i, 1); break; } } }, getSymbol: function (_264) { var val = parseFloat(_264.attributes[this.attributeField]), rs = this.breaks, _265 = this._symbols, _266, incl = this.isMaxInclusive; for (var i = 0, il = rs.length; i < il; i++) { _266 = rs[i]; if (_266[0] <= val && (incl ? (val <= _266[1]) : (val < _266[1]))) { return _265[_266[0] + "-" + _266[1]]; } } return this.defaultSymbol; }, _setMaxInclusiveness: function (_267) { this.isMaxInclusive = _267; }, _addBreakInfo: function (info) { var min = info.minValue, max = info.maxValue; this.breaks.push([min, max]); this.infos.push(info); var _268 = info.symbol; if (_268) { if (!_268.declaredClass) { info.symbol = esri.symbol.fromJson(_268); } } this._symbols[min + "-" + max] = info.symbol; }, toJson: function () { var _269 = this.infos || [], _26a = esri._sanitize; return _26a({ type: "classBreaks", field: this.attributeField, minValue: _269[0] && _269[0].minValue, classBreakInfos: dojo.map(_269, function (info) { info = dojo.mixin({}, info); info.symbol = info.symbol && info.symbol.toJson(); info.classMaxValue = info.maxValue; delete info.minValue; delete info.maxValue; return _26a(info); }) }); } }); dojo.declare("esri.renderer.TemporalRenderer", esri.renderer.Renderer, { constructor: function (_26b, _26c, _26d, _26e) { this.observationRenderer = _26b; this.latestObservationRenderer = _26c; this.trackRenderer = _26d; this.observationAger = _26e; }, getSymbol: function (_26f) { var _270 = _26f.getLayer(); var kind = _270._getKind(_26f); var _271 = (kind === 0) ? this.observationRenderer : (this.latestObservationRenderer || this.observationRenderer); var _272 = (_271 && _271.getSymbol(_26f)); var ager = this.observationAger; if (_270.timeInfo && _270._map.timeExtent && (_271 === this.observationRenderer) && ager && _272) { _272 = ager.getAgedSymbol(_272, _26f); } return _272; } }); dojo.declare("esri.renderer.SymbolAger", null, { getAgedSymbol: function (_273, _274) { }, _setSymbolSize: function (_275, size) { switch (_275.type) { case "simplemarkersymbol": _275.setSize(size); break; case "simplelinesymbol": _275.setWidth(size); break; case "simplefillsymbol": if (_275.outline) { _275.outline.setWidth(size); } break; } } }); dojo.declare("esri.renderer.TimeClassBreaksAger", esri.renderer.SymbolAger, { constructor: function (_276, _277) { this.infos = _276; this.timeUnits = _277 || "day"; _276.sort(function (a, b) { if (a.minAge < b.minAge) { return -1; } if (a.minAge > b.minAge) { return 1; } return 0; }); }, getAgedSymbol: function (_278, _279) { var _27a = _279.getLayer(), _27b = _279.attributes, _27c = esri._isDefined; _278 = esri.symbol.fromJson(_278.toJson()); var _27d = _27a._map.timeExtent; var _27e = _27d.endTime; if (!_27e) { return _278; } var _27f = new Date(_27b[_27a._startTimeField]); var diff = dojo.date.difference(_27f, _27e, this.timeUnits); dojo.some(this.infos, function (info) { if (diff >= info.minAge && diff <= info.maxAge) { var _280 = info.color, size = info.size; if (_280) { _278.setColor(_280); } if (_27c(size)) { this._setSymbolSize(_278, size); } return true; } }); return _278; } }); dojo.mixin(esri.renderer.TimeClassBreaksAger, { UNIT_DAYS: "day", UNIT_HOURS: "hour", UNIT_MILLISECONDS: "millisecond", UNIT_MINUTES: "minute", UNIT_MONTHS: "month", UNIT_SECONDS: "second", UNIT_WEEKS: "week", UNIT_YEARS: "year" }); dojo.declare("esri.renderer.TimeRampAger", esri.renderer.SymbolAger, { constructor: function (_281, _282) { this.colorRange = _281 || [new dojo.Color([0, 0, 0, 0.1]), new dojo.Color([0, 0, 255, 1])]; this.sizeRange = _282 || [2, 10]; }, getAgedSymbol: function (_283, _284) { var _285 = _284.getLayer(), _286 = _284.attributes; _283 = esri.symbol.fromJson(_283.toJson()); var _287 = _285._map.timeExtent; var _288 = _287.startTime, _289 = _287.endTime; if (!_288 || !_289) { return _283; } _288 = _288.getTime(); _289 = _289.getTime(); var _28a = new Date(_286[_285._startTimeField]); _28a = _28a.getTime(); if (_28a < _288) { _28a = _288; } var _28b = (_289 === _288) ? 1 : (_28a - _288) / (_289 - _288); var _28c = this.sizeRange; if (_28c) { var from = _28c[0], to = _28c[1], _28d = Math.abs(to - from) * _28b; this._setSymbolSize(_283, (from < to) ? (from + _28d) : (from - _28d)); } _28c = this.colorRange; if (_28c) { var _28e = _28c[0], _28f = _28c[1], _290 = new dojo.Color(), _291 = Math.round; var _292 = _28e.r, toR = _28f.r, _28d = Math.abs(toR - _292) * _28b; _290.r = _291((_292 < toR) ? (_292 + _28d) : (_292 - _28d)); var _293 = _28e.g, toG = _28f.g, _28d = Math.abs(toG - _293) * _28b; _290.g = _291((_293 < toG) ? (_293 + _28d) : (_293 - _28d)); var _294 = _28e.b, toB = _28f.b, _28d = Math.abs(toB - _294) * _28b; _290.b = _291((_294 < toB) ? (_294 + _28d) : (_294 - _28d)); var _295 = _28e.a, toA = _28f.a, _28d = Math.abs(toA - _295) * _28b; _290.a = (_295 < toA) ? (_295 + _28d) : (_295 - _28d); _283.setColor(_290); } return _283; } }); } if (!dojo._hasResource["esri.layers.graphics"]) { dojo._hasResource["esri.layers.graphics"] = true; dojo.provide("esri.layers.graphics"); if (dojo.isIE) { dojo.addOnLoad(function () { dojo.declare("esri.gfx.Path", dojox.gfx.Path, { setShape: function (_296) { this.rawNode.path.v = (this.vmlPath = _296); return this; } }); esri.gfx.Path.nodeType = "shape"; var _297 = dojox.gfx.Shape.prototype.setStroke; dojox.gfx.Shape.prototype.setStroke = function () { var _298 = _297.apply(this, arguments); var node = this.rawNode, _299 = node && node.stroke, _29a = this.getParent(); if (_299 && _29a) { var op = esri._isDefined(_29a._esriIeOpacity) ? _29a._esriIeOpacity : 1; _299.opacity *= op; } return _298; }; var _29b = dojox.gfx.Shape.prototype.setFill; dojox.gfx.Shape.prototype.setFill = function () { var _29c = _29b.apply(this, arguments); var node = this.rawNode, fill = node && node.fill, _29d = this.getParent(); if (fill && _29d) { var op = esri._isDefined(_29d._esriIeOpacity) ? _29d._esriIeOpacity : 1; if (fill.type === "tile") { dojo.style(node, "opacity", op); } else { fill.opacity *= op; } } return _29c; }; }); } dojo.declare("esri.layers._GraphicsContainer", null, { _setMap: function (map, _29e) { var es, _29f = (this._connects = []); if (dojox.gfx.renderer === "canvas") { es = dojo.create("div", { style: "overflow: visible; position: absolute;" }, _29e); this._surface = { getEventSource: function () { return es; } }; this._map = map; _29f.push(dojo.connect(es, "onmousedown", this, this._canvasDownHandler)); _29f.push(dojo.connect(es, "onmouseup", this, this._canvasUpHandler)); _29f.push(dojo.connect(es, "onclick", this, this._canvasClickHandler)); } else { var _2a0 = (this._surface = dojox.gfx.createSurface(_29e, map.width, map.height)); es = _2a0.getEventSource(); dojo.style((es = dojo.isIE ? es.parentNode : es), { overflow: "visible", position: "absolute" }); } _29f.push(dojo.connect(map, "onResize", this, "_onResizeHandler")); return es; }, _onResizeHandler: function (_2a1, _2a2, _2a3) { var es = this._surface.getEventSource(); if (dojo.isIE) { dojo.style((es = es.parentNode), { width: _2a2 + "px", height: _2a3 + "px", clip: "rect(0px " + _2a2 + "px " + _2a3 + "px 0px)" }); } dojo.attr(es, "width", _2a2); dojo.attr(es, "height", _2a3); if (!this._surface.declaredClass) { dojo.forEach(es.childNodes, function (_2a4) { dojo.attr(_2a4, "width", _2a2); dojo.attr(_2a4, "height", _2a3); }); } }, _cleanUp: function () { dojo.forEach(this._connects, dojo.disconnect, dojo); this._map = this._surface = null; }, _processEvent: function (evt) { var map = this._map; evt.screenPoint = new esri.geometry.Point(evt.pageX - map.position.x, evt.pageY - map.position.y); evt.mapPoint = map.toMap(evt.screenPoint); }, _canvasDownHandler: function (evt) { this._processEvent(evt); this._downPt = evt.screenPoint.x + "," + evt.screenPoint.y; }, _canvasUpHandler: function (evt) { this._processEvent(evt); this._upPt = evt.screenPoint.x + "," + evt.screenPoint.y; }, _tolerance: 5, _canvasClickHandler: function (evt) { if (!this._downPt || !this._upPt || this._downPt != this._upPt) { return; } this._processEvent(evt); var map = this._map; var _2a5 = dojo.map(map.graphicsLayerIds, function (id) { return map.getLayer(id); }); _2a5.push(map.graphics); _2a5.reverse(); _2a5 = dojo.filter(_2a5, function (_2a6) { return _2a6.loaded && _2a6._mouseEvents && _2a6.visible && (!esri._isDefined(_2a6.opacity) || _2a6.opacity > 0); }); var _2a7 = evt.screenPoint, geo = esri.geometry, _2a8 = this._tolerance; var xmin = _2a7.x - _2a8, ymin = _2a7.y + _2a8; var xmax = _2a7.x + _2a8, ymax = _2a7.y - _2a8; var _2a9 = map.toMap(new geo.Point(xmin, ymin)); var _2aa = map.toMap(new geo.Point(xmax, ymax)); var _2ab = new geo.Extent(_2a9.x, _2a9.y, _2aa.x, _2aa.y); var _2ac; dojo.some(_2a5, function (_2ad) { var _2ae = dojo.filter(_2ad.graphics, function (_2af) { var _2b0 = _2af.getDojoShape(); if (!_2af.visible || !_2b0) { return false; } var bbox = _2b0.getTransformedBoundingBox(); if (bbox) { var _2b1 = new geo.Extent(bbox[0].x, bbox[0].y, bbox[2].x, bbox[2].y); return _2b1.contains(_2a7); } else { return dojo.some(_2b0.children || [], function (_2b2) { bbox = _2b2.getTransformedBoundingBox(); var _2b3 = new geo.Extent(bbox[0].x, bbox[0].y, bbox[2].x, bbox[2].y); return _2b3.contains(_2a7); }); } }); if (_2ae.length > 0) { var _2b4; dojo.some(_2ae, function (_2b5) { if (_2b5.geometry && _2ab.intersects(_2b5.geometry)) { _2b4 = _2b5; return true; } return false; }); if (_2b4) { _2ac = _2b4; return true; } } return false; }); if (_2ac) { var _2b6 = _2ac.getLayer(); if (_2b6) { evt.graphic = _2ac; _2b6.onClick(evt); } } } }); dojo.declare("esri.layers._GraphicsLayer", esri.layers.Layer, { constructor: function (_2b7) { if (_2b7 && (dojo.isString(_2b7) || (dojo.isObject(_2b7) && _2b7.layerDefinition))) { _2b7 = arguments[1]; } this._params = dojo.mixin({ displayOnPan: true }, _2b7 || {}); this.graphics = []; this._init = false; this._suspended = false; this._draw = dojo.hitch(this, this._draw); this._cleanUp = dojo.hitch(this, this._cleanUp); this._refresh = dojo.hitch(this, this._refresh); }, renderer: null, _cleanUp: function (map) { this.clear(); this._disableAllConnectors(); }, _setMap: function (map, _2b8) { this._map = map; if (_2b8.declaredClass) { this._div = _2b8.createGroup(); } else { var _2b8 = dojox.gfx.createSurface(_2b8.getEventSource(), map.width, map.height); dojo.style(_2b8.rawNode, "position", "absolute"); this._div = _2b8.createGroup(); this._div.getEventSource = function () { return _2b8.rawNode; }; } this._div.getEventSource().id = this.id + "_layer"; this._enableAllConnectors(); this._updateStatus(); if (!this._suspended && map.extent && map.loaded === true) { this._onExtentChangeHandler(map.extent, null, null, null); } var op = this.opacity; if (esri._isDefined(op) && op < 1) { this.setOpacity(op, true); } return this._div; }, _unsetMap: function (map, _2b9) { dojo.forEach(this.graphics, function (g) { g._shape = null; }); if (_2b9.declaredClass) { this._div.clear(); _2b9.remove(this._div); dojo.destroy(this._div.getEventSource()); } else { _2b9 = this._div.getParent(); _2b9._parent = {}; dojo.destroy(_2b9.rawNode); _2b9.destroy(); } this._map = this._div = null; this._init = false; this._disableAllConnectors(); }, _onZoomStartHandler: function (_2ba, _2bb, _2bc) { esri.hide(this._div.getEventSource()); }, _onExtentChangeHandler: function (_2bd, _2be, _2bf, lod) { if (_2bf || !this._init) { var _2c0 = this._map.__visibleRect; this._init = true; this._refresh(true); this._div.setTransform(dojox.gfx.matrix.translate({ x: _2c0.x, y: _2c0.y })); if (this.visible) { esri.show(this._div.getEventSource()); } if (this.graphics.length > 0) { this.onUpdate(); } } }, _refresh: function (_2c1) { var gs = this.graphics, il = gs.length, _2c2 = this._draw; for (var i = 0; i < il; i++) { _2c2(gs[i], _2c1); } }, refresh: function () { this._refresh(true); }, _onPanHandler: function (_2c3, _2c4) { var _2c5 = this._map.__visibleRect; this._div.setTransform(dojox.gfx.matrix.translate({ x: _2c5.x + _2c4.x, y: _2c5.y + _2c4.y })); }, _onPanStartHandler: function (_2c6, _2c7) { esri.hide(this._div.getEventSource()); }, _onPanEndUpdateHandler: function () { this._refresh(false); if (this.graphics.length) { this.onUpdate(); } }, _onPanEndHandler: function (_2c8, _2c9) { var _2ca = this._map.__visibleRect; this._div.setTransform(dojox.gfx.matrix.translate({ x: _2ca.x, y: _2ca.y })); this._refresh(false); esri.show(this._div.getEventSource()); if (this.graphics.length) { this.onUpdate(); } }, _getDesiredStatus: function () { return this.visible; }, _updateStatus: function () { if (this._getDesiredStatus()) { if (this._suspended) { this._resume(); } } else { if (!this._suspended) { this._suspend(); } } }, _suspend: function () { this._suspended = true; esri.hide(this._div.getEventSource()); this._disableDrawConnectors(); }, _resume: function () { this._suspended = false; this._enableDrawConnectors(); var _2cb = this._map.__visibleRect; this._div.setTransform(dojox.gfx.matrix.translate({ x: _2cb.x, y: _2cb.y })); this._refresh(true); esri.show(this._div.getEventSource()); }, _enableAllConnectors: function () { this._disableAllConnectors(); this._cleanUp_connect = dojo.connect(this._map, "onUnload", this, "_cleanUp"); this._onVisibilityChangeHandler_connect = dojo.connect(this, "onVisibilityChange", this, this._updateStatus); this._enableDrawConnectors(); }, _disableAllConnectors: function () { this._disableDrawConnectors(); dojo.disconnect(this._cleanUp_connect); dojo.disconnect(this._onVisibilityChangeHandler_connect); }, _enableDrawConnectors: function () { var map = this._map, dc = dojo.connect; this._disableDrawConnectors(); if (this._params.displayOnPan) { this._onPanHandler_connect = dc(map, "onPan", this, "_onPanHandler"); this._onPanEndHandler_connect = dc(map, "onPanEnd", this, "_onPanEndUpdateHandler"); } else { this._onPanStartHandler_connect = dc(map, "onPanStart", this, "_onPanStartHandler"); this._onPanEndHandler_connect = dc(map, "onPanEnd", this, "_onPanEndHandler"); } this._onZoomStartHandler_connect = dc(map, "onZoomStart", this, "_onZoomStartHandler"); this._onExtentChangeHandler_connect = dc(map, "onExtentChange", this, "_onExtentChangeHandler"); }, _disableDrawConnectors: function () { var dd = dojo.disconnect; dd(this._onExtentChangeHandler_connect); dd(this._onZoomStartHandler_connect); dd(this._onPanHandler_connect); dd(this._onPanStartHandler_connect); dd(this._onPanEndHandler_connect); }, _updateExtent: function (_2cc) { var geom = _2cc.geometry, eg = esri.geometry; if (!geom) { _2cc._extent = null; return; } var _2cd = (_2cc._extent = geom.getExtent()); if (!_2cd) { var x, y; if (geom instanceof eg.Point) { x = geom.x; y = geom.y; } else { if (geom instanceof eg.Multipoint) { x = geom.points[0][0]; y = geom.points[0][1]; } else { _2cc._extent = null; return; } } _2cc._extent = new eg.Extent(x, y, x, y, geom.spatialReference); } }, _draw: function (_2ce, _2cf) { try { var _2d0 = _2ce._extent; if (_2ce.visible && _2d0 && this._map.extent.intersects(_2d0)) { if (!_2ce.getDojoShape() || _2cf) { var type = _2ce.geometry.type; if (type === "point") { this._drawMarker(_2ce); this._symbolizeMarker(_2ce); } else { if (type === "multipoint") { this._drawMarkers(_2ce); this._symbolizeMarkers(_2ce); } else { this._drawShape(_2ce); this._symbolizeShape(_2ce); } } } } else { if (_2ce.getDojoShape()) { this._removeShape(_2ce); } } } catch (err) { this._errorHandler(err, _2ce); } }, _removeShape: function (_2d1) { var _2d2 = _2d1.getDojoShape(); _2d2.removeShape(); _2d1._shape = null; }, _drawShape: function (_2d3) { var _2d4 = _2d3.geometry, type = _2d4.type, map = this._map, me = map.extent, mw = map.width, mh = map.height, eg = esri.geometry, _2d5 = map.__visibleRect; if (type === "rect" || type === "extent") { var rect; if (type === "extent") { rect = eg.toScreenGeometry(me, mw, mh, _2d4); rect = { x: rect.xmin - _2d5.x, y: rect.ymax - _2d5.y, width: rect.getWidth(), height: rect.getHeight() }; } else { var xy = eg.toScreenPoint(me, mw, mh, _2d4), wh = eg.toScreenPoint(me, mw, mh, { x: _2d4.x + _2d4.width, y: _2d4.y + _2d4.height }); rect = { x: xy.x - _2d5.x, y: xy.y - _2d5.y, width: wh.x - xy.x, height: xy.y - wh.y }; } if (rect.width === 0) { rect.width = 1; } if (rect.height === 0) { rect.height = 1; } _2d3._shape = this._drawRect(this._div, _2d3.getDojoShape(), rect); } else { if (type === "polyline") { _2d3._shape = this._drawPath(this._div, _2d3.getDojoShape(), eg._toScreenPath(me, mw, mh, _2d4, -_2d5.x, -_2d5.y)); if (this._rendererLimits) { this._clipPolyline(_2d3._shape, _2d4); } } else { if (type === "polygon") { _2d3._shape = this._drawPath(this._div, _2d3.getDojoShape(), eg._toScreenPath(me, mw, mh, _2d4, -_2d5.x, -_2d5.y)); if (this._rendererLimits) { this._clipPolygon(_2d3._shape, _2d4); } } } } }, _drawRect: function (_2d6, _2d7, rect) { return _2d7 ? _2d7.setShape(rect) : _2d6.createRect(rect); }, _drawImage: function (_2d8, _2d9, _2da) { return _2d9 ? _2d9.setShape(_2da) : _2d8.createImage(_2da); }, _drawCircle: function (_2db, _2dc, _2dd) { return _2dc ? _2dc.setShape(_2dd) : _2db.createCircle(_2dd); }, _drawPath: (function () { if (dojo.isIE) { return function (_2de, _2df, path) { if (_2df) { return _2df.setShape(path.join(" ")); } else { var p = _2de.createObject(esri.gfx.Path, path.join(" ")); _2de._overrideSize(p.getEventSource()); return p; } }; } else { return function (_2e0, _2e1, path) { return _2e1 ? _2e1.setShape(path.join(" ")) : _2e0.createPath(path.join(" ")); }; } } ()), _drawText: function (_2e2, _2e3, text) { return _2e3 ? _2e3.setShape(text) : _2e2.createText(text); }, _getSymbol: function (_2e4) { return _2e4.symbol || (this.renderer ? this.renderer.getSymbol(_2e4) : null) || null; }, _symbolizeShape: function (_2e5) { var _2e6 = this._getSymbol(_2e5); var _2e7 = _2e6._stroke, fill = _2e6._fill; if (_2e7 === null || fill === null) { _2e7 = _2e6.getStroke(); fill = _2e6.getFill(); } _2e5.getDojoShape().setStroke(_2e7).setFill(fill); _2e6._stroke = _2e7; _2e6._fill = fill; }, _smsToPath: (function () { if (dojo.isIE) { return function (SMS, _2e8, x, y, xMh, xPh, yMh, yPh) { switch (_2e8) { case SMS.STYLE_SQUARE: return ["M", xMh + "," + yMh, "L", xPh + "," + yMh, xPh + "," + yPh, xMh + "," + yPh, "X", "E"]; case SMS.STYLE_CROSS: return ["M", x + "," + yMh, "L", x + "," + yPh, "M", xMh + "," + y, "L", xPh + "," + y, "E"]; case SMS.STYLE_X: return ["M", xMh + "," + yMh, "L", xPh + "," + yPh, "M", xMh + "," + yPh, "L", xPh + "," + yMh, "E"]; case SMS.STYLE_DIAMOND: return ["M", x + "," + yMh, "L", xPh + "," + y, x + "," + yPh, xMh + "," + y, "X", "E"]; } }; } else { return function (SMS, _2e9, x, y, xMh, xPh, yMh, yPh) { switch (_2e9) { case SMS.STYLE_SQUARE: return ["M", xMh + "," + yMh, xPh + "," + yMh, xPh + "," + yPh, xMh + "," + yPh, "Z"]; case SMS.STYLE_CROSS: return ["M", x + "," + yMh, x + "," + yPh, "M", xMh + "," + y, xPh + "," + y]; case SMS.STYLE_X: return ["M", xMh + "," + yMh, xPh + "," + yPh, "M", xMh + "," + yPh, xPh + "," + yMh]; case SMS.STYLE_DIAMOND: return ["M", x + "," + yMh, xPh + "," + y, x + "," + yPh, xMh + "," + y, "Z"]; } }; } } ()), _drawPoint: function (_2ea, _2eb, _2ec, _2ed) { var type = _2ec.type, map = this._map, _2ee = map.__visibleRect, _2ef = esri.geometry.toScreenPoint(map.extent, map.width, map.height, _2eb).offset(-_2ee.x, -_2ee.y), px = _2ef.x, py = _2ef.y, _2f0; if (type === "simplemarkersymbol") { var _2f1 = _2ec.style, half = _2ec.size / 2, _2f2 = Math.round, SMS = esri.symbol.SimpleMarkerSymbol; switch (_2f1) { case SMS.STYLE_SQUARE: case SMS.STYLE_CROSS: case SMS.STYLE_X: case SMS.STYLE_DIAMOND: _2f0 = this._drawPath(_2ea, _2ed, this._smsToPath(SMS, _2f1, px, py, _2f2(px - half), _2f2(px + half), _2f2(py - half), _2f2(py + half))); break; default: _2f0 = this._drawCircle(_2ea, _2ed, { cx: px, cy: py, r: half }); } } else { if (type === "picturemarkersymbol") { var w = _2ec.width, h = _2ec.height; _2f0 = this._drawImage(_2ea, _2ed, { x: px - (w / 2), y: py - (h / 2), width: w, height: h, src: _2ec.url }); } else { if (type === "textsymbol") { _2f0 = this._drawText(_2ea, _2ed, { type: "text", text: _2ec.text, x: px, y: py, align: _2ec.align, decoration: _2ec.decoration, rotated: _2ec.rotated, kerning: _2ec.kerning }); } } } _2f0.setTransform(dojox.gfx.matrix.multiply(dojox.gfx.matrix.translate(_2ec.xoffset, -_2ec.yoffset), dojox.gfx.matrix.rotategAt(_2ec.angle, _2ef))); return _2f0; }, _symbolizePoint: function (_2f3, _2f4) { var type = _2f4.type; if (type === "picturemarkersymbol") { return; } var _2f5 = _2f4._stroke, fill = _2f4._fill; if (type === "textsymbol") { _2f3.setFont(_2f4.font).setFill(_2f4.getFill()); } else { if (_2f5 === null || fill === null) { _2f5 = _2f4.getStroke(); fill = _2f4.getFill(); } if (type === "simplemarkersymbol") { _2f3.setFill(fill).setStroke(_2f5); } _2f4._stroke = _2f5; _2f4._fill = fill; } }, _drawMarker: function (_2f6) { _2f6._shape = this._drawPoint(this._div, _2f6.geometry, this._getSymbol(_2f6), _2f6.getDojoShape()); }, _symbolizeMarker: function (_2f7) { this._symbolizePoint(_2f7.getDojoShape(), this._getSymbol(_2f7)); }, _drawMarkers: function (_2f8) { var _2f9 = _2f8.geometry, _2fa = _2f9.points, _2fb = this._getSymbol(_2f8), _2fc = _2f8.getDojoShape() || this._div.createGroup(), _2fd, i, il = _2fa.length; for (i = 0; i < il; i++) { _2fd = _2fa[i]; this._drawPoint(_2fc, { x: _2fd[0], y: _2fd[1] }, _2fb, _2fc.children[i]); } var _2fe = _2fc.children.length; if (il < _2fe) { for (i = il; i < _2fe; i++) { _2fc.children[i].removeShape(); } } _2f8._shape = _2fc; }, _symbolizeMarkers: function (_2ff) { var _300 = this._getSymbol(_2ff), _301 = _2ff.getDojoShape(), _302 = _301.children; for (var i = 0, il = _302.length; i < il; i++) { this._symbolizePoint(_302[i], _300); } }, _errorHandler: function (err, _303) { var msg = esri.bundle.layers.graphics.drawingError; if (_303) { err.message = msg + "(geometry:" + (_303.geometry ? _303.geometry.declaredClass : null) + ", symbol:" + (_303.symbol ? _303.symbol.declaredClass : null) + "): " + err.message; } else { err.message = msg + "(null): " + err.message; } this.inherited(arguments); }, _rendererLimits: (function () { var _304, _305, _306; if (dojo.isFF) { _304 = 16125; _305 = -32250; _306 = 32250; } else { if (dojo.isIE) { _304 = 100000; _305 = -100000; _306 = 100000; } else { if (dojo.isChrome && dojo.isChrome < 6) { _304 = 8150; _305 = -10000; _306 = 10000; } else { } } } if (_304) { var _307, _308; _307 = [-_304, -_304, _304, _304]; _308 = [[[-_304, -_304], [_304, -_304]], [[_304, -_304], [_304, _304]], [[_304, _304], [-_304, _304]], [[-_304, _304], [-_304, -_304]]]; return { clipLimit: _304, rangeMin: _305, rangeMax: _306, clipBBox: _307, clipSegments: _308 }; } } ()), _clipPolyline: function (_309, _30a) { var _30b = this._getCorners(_309, _30a); var _30c = _30b.tl, _30d = _30b.br; var _30e = this._rendererLimits; var _30f = _30e.rangeMin, _310 = _30e.rangeMax, _311 = _30e.clipBBox, _312 = _30e.clipSegments; var _313 = this._isPointWithinRange, _314 = this._isPointWithinBBox, _315 = this._getClipperIntersection, _316 = this._getPlaneIndex; if (!_313(_30c, _30f, _310) || !_313(_30d, _30f, _310)) { if (dojo.isIE) { this._createSegments(_309); } var _317 = []; dojo.forEach(_309.segments, function (_318) { var _319 = _318.args, len = _319.length, _31a = []; for (var i = 0; i < len; i += 2) { var pt1 = [_319[i], _319[i + 1]]; var pt2 = [_319[i + 2], _319[i + 3]]; var _31b = _314(pt1, _311); var _31c = _314(pt2, _311); if (_31b ^ _31c) { var _31d = _315([pt1, pt2], _312); if (_31d) { if (!_31b) { _31a.push(_31d[1], pt2); } else { if (i) { _31a.push(_31d[1]); } else { _31a.push(pt1, _31d[1]); } _317.push(_31a); _31a = []; } } } else { if (_31b) { if (i) { _31a.push(pt2); } else { _31a.push(pt1, pt2); } } else { var _31e = _316(pt1, _311); var _31f = _316(pt2, _311); if (_31e === -1 || _31f === -1 || _31e === _31f) { continue; } var _320 = _315([pt1, pt2], _312, true); if (_320.length > 0) { if (!_320[_31e]) { _31e = _320[_31e[0]] ? _31e[0] : _31e[1]; } if (!_320[_31f]) { _31f = _320[_31f[0]] ? _31f[0] : _31f[1]; } var _321 = _320[_31e], _322 = _320[_31f]; if (_321) { _31a.push(_321); } if (_322) { _31a.push(_322); _317.push(_31a); _31a = []; } } } } } _317.push(_31a); }); _309.setShape(this._getPathStringFromPaths(_317)); } }, _clipPolygon: function (_323, _324) { var _325 = this._getCorners(_323, _324); var _326 = _325.tl, _327 = _325.br; var _328 = this._rendererLimits; var _329 = _328.clipLimit, _32a = _328.rangeMin, _32b = _328.rangeMax, _32c = _328.clipBBox, _32d = _328.clipSegments; var _32e = this._isPointWithinRange, _32f = this._isPointWithinBBox, _330 = this._getClipperIntersection, _331 = this._getPlaneIndex, _332 = esri.geometry._pointLineDistance; if (!_32e(_326, _32a, _32b) || !_32e(_327, _32a, _32b)) { if (dojo.isIE) { this._createSegments(_323); } var _333 = dojo.map(_323.segments, function (_334) { var _335 = _334.args, len = _335.length, _336 = [], _337 = []; for (var i = 0; i < len; i += 2) { var pt1 = [_335[i], _335[i + 1]]; var pt2 = [_335[i + 2], _335[i + 3]]; if (i === (len - 2)) { _336.push(pt1); break; } var _338 = _32f(pt1, _32c); var _339 = _32f(pt2, _32c); _336.push(pt1); if (_338 ^ _339) { var _33a = _330([pt1, pt2], _32d); if (_33a) { var _33b = _33a[1]; _33b[_338 ? "inOut" : "outIn"] = true; _336.push(_33b); _337.push([_338 ? "INOUT" : "OUTIN", _336.length - 1, _33a[0]]); } } else { if (!_338) { var _33c = _331(pt1, _32c); var _33d = _331(pt2, _32c); if (_33c === -1 || _33d === -1 || _33c === _33d) { continue; } var _33a = _330([pt1, pt2], _32d, true); if (_33a.length > 0) { if (!_33a[_33c]) { _33c = _33a[_33c[0]] ? _33c[0] : _33c[1]; } if (!_33a[_33d]) { _33d = _33a[_33d[0]] ? _33d[0] : _33d[1]; } var _33e = _33a[_33c], _33f = _33a[_33d]; if (_33e) { _33e.outIn = true; _336.push(_33e); _337.push(["OUTIN", _336.length - 1, _33c]); } if (_33f) { _33f.inOut = true; _336.push(_33f); _337.push(["INOUT", _336.length - 1, _33d]); } } else { if (dojo.isArray(_33c) && dojo.isArray(_33d)) { var _340 = _33c.concat(_33d); _340.sort(); if (_340.join("") === "0123") { var _341 = []; if ((_33c[0] + _33c[1]) === 3) { _341.push([_329, -_329], [-_329, _329]); } else { _341.push([-_329, -_329], [_329, _329]); } var d1 = _332(_341[0], [pt1, pt2]); var d2 = _332(_341[1], [pt1, pt2]); _336.push((d1 < d2) ? _341[0] : _341[1]); } } } } } } var xmin = _32c[0], ymin = _32c[1], xmax = _32c[2], ymax = _32c[3]; dojo.forEach(_336, function (_342) { if (_342[0] < xmin) { if (_342[1] >= ymin && _342[1] <= ymax) { _342[0] = xmin; } else { _342[0] = xmin; _342[1] = _342[1] < ymin ? ymin : ymax; } } }); dojo.forEach(_336, function (_343) { if (_343[1] < ymin) { if (_343[0] >= xmin && _343[0] <= xmax) { _343[1] = ymin; } else { _343[1] = ymin; _343[0] = _343[0] < xmin ? xmin : xmax; } } }); dojo.forEach(_336, function (_344) { if (_344[0] > xmax) { if (_344[1] >= ymin && _344[1] <= ymax) { _344[0] = xmax; } else { _344[0] = xmax; _344[1] = _344[1] < ymin ? ymin : ymax; } } }); dojo.forEach(_336, function (_345) { if (_345[1] > ymax) { if (_345[0] >= xmin && _345[0] <= xmax) { _345[1] = ymax; } else { _345[1] = ymax; _345[0] = _345[0] < xmin ? xmin : xmax; } } }); var k = 0, len = _337.length; if (len > 0) { do { var curr = _337[k]; var next = _337[(k + 1) % len]; if (curr[2] === next[2] && curr[0] === "INOUT" && next[0] === "OUTIN") { var _346 = curr[1], end = next[1]; if (_346 < end) { for (var u = _346 + 1; u < end; u++) { _336[u][2] = true; } } else { if (_346 > end) { for (var u = _346 + 1; u < _336.length; u++) { _336[u][2] = true; } for (var u = 0; u < end; u++) { _336[u][2] = true; } } } } k = (k + 1) % len; } while (k !== 0); } var _347 = _336[0], last = _336[_336.length - 1]; if (_347[2]) { last[2] = true; dojo.some(_337, function (data) { if (data[1] === 1) { _336.splice(_336.length - 1, 0, dojo.clone(_336[1])); return true; } return false; }); } _336 = dojo.filter(_336, function (_348) { return _348[2] ? false : true; }); for (k = 0; k < _336.length - 1; k++) { var now = _336[k]; var next = _336[k + 1]; if (!next || (now[0] !== next[0]) || (now[1] !== next[1])) { continue; } if (next.outIn) { now.outIn = true; } else { if (next.inOut) { now.inOut = true; } } _336.splice(k + 1, 1); } var abs = Math.abs, _349 = []; for (k = 0; k < _336.length - 1; k++) { var curr = _336[k], cx = curr[0], cy = curr[1]; var x1 = (abs(cx) === _329); var y1 = (abs(cy) === _329); var next = _336[k + 1], nx = next[0], ny = next[1]; var x2 = (abs(nx) === _329); var y2 = (abs(ny) === _329); if (x1 && y2) { _349.push([k + 1, [cx, ny]]); } else { if (y1 && x2) { _349.push([k + 1, [nx, cy]]); } } } for (k = _349.length - 1; k >= 0; k--) { var data = _349[k]; var prev = _336[data[0] - 1]; var now = _336[data[0]]; if (prev.outIn || prev.inOut || now.outIn || now.inOut) { continue; } _336.splice(data[0], 0, data[1]); } var _347 = _336[0], last = _336[_336.length - 1]; if (_347[0] !== last[0] || _347[1] !== last[1]) { _336.push(_347); } return _336; }); _323.setShape(this._getPathStringFromPaths(_333)); } }, _getCorners: function (_34a, _34b) { if (dojo.isIE) { var map = this._map; var _34c = _34b.getExtent(); var _34d = map.toScreen(new esri.geometry.Point(_34c.xmin, _34c.ymax)); var _34e = map.toScreen(new esri.geometry.Point(_34c.xmax, _34c.ymin)); return { tl: _34d, br: _34e }; } else { var _34f = _34a.getTransformedBoundingBox(); return { tl: _34f[0], br: _34f[2] }; } }, _createSegments: function (_350) { _350.shape.path = _350.vmlPath; _350.segmented = false; _350._confirmSegmented(); var _351 = _350.segments; if (_351.length > 1) { _350.segments = dojo.filter(_351, function (_352, idx, arr) { var next = arr[idx + 1]; if (_352.action === "M" && next && next.action === "L") { _352.args = _352.args.concat(next.args); return true; } return false; }); } }, _getPathStringFromPaths: function (_353) { if (dojo.isIE) { _353 = dojo.map(_353, function (path) { var _354 = dojo.map(path, function (_355, idx) { return (idx === 1 ? "l " : "") + _355.join(","); }); return "m " + _354.join(" "); }); _353.push("e"); } else { _353 = dojo.map(_353, function (path) { var _356 = dojo.map(path, function (_357) { return _357.join(","); }); return "M " + _356.join(" "); }); } return _353.join(" "); }, _isPointWithinBBox: function (_358, bbox) { var left = bbox[0], top = bbox[1]; var _359 = bbox[2], _35a = bbox[3]; var x = _358[0], y = _358[1]; if (x > left && x < _359 && y > top && y < _35a) { return true; } else { return false; } }, _isPointWithinRange: function (_35b, _35c, _35d) { var x = _35b.x, y = _35b.y; if (x < _35c || y < _35c || x > _35d || y > _35d) { return false; } else { return true; } }, _getClipperIntersection: function (line, _35e, _35f) { var _360 = esri.geometry._getLineIntersection2, _361 = Math.round, data = { length: 0 }; for (var i = 0; i < 4; i++) { var _362 = _360(line, _35e[i]); if (_362) { _362[0] = _361(_362[0]); _362[1] = _361(_362[1]); if (!_35f) { return [i, _362]; } else { data[i] = _362; data.length++; } } } return _35f ? data : null; }, _getPlaneIndex: function (_363, _364) { var px = _363[0], py = _363[1], xmin = _364[0], ymin = _364[1], xmax = _364[2], ymax = _364[3]; if (px <= xmin) { if ((py >= ymin) && (py <= ymax)) { return 3; } else { return (py < ymin) ? [0, 3] : [2, 3]; } } if (py <= ymin) { if ((px >= xmin) && (px <= xmax)) { return 0; } else { return (px < xmin) ? [3, 0] : [1, 0]; } } if (px >= xmax) { if ((py >= ymin) && (py <= ymax)) { return 1; } else { return (py < ymin) ? [0, 1] : [2, 1]; } } if (py >= ymax) { if ((px >= xmin) && (px <= xmax)) { return 2; } else { return (px < xmin) ? [3, 2] : [1, 2]; } } return -1; }, onGraphicAdd: function () { }, onGraphicRemove: function () { }, onGraphicsClear: function () { }, onOpacityChange: function () { }, add: function (_365) { var _366 = arguments[1], i; if ((i = dojo.indexOf(this.graphics, _365)) != -1) { return this.graphics[i]; } if (!_366) { this.graphics.push(_365); } _365._graphicsLayer = this; this._updateExtent(_365); this._draw(_365); if (!_366) { this.onGraphicAdd(_365); } return _365; }, remove: function (_367) { if (!arguments[1]) { var _368 = this.graphics, i; if ((i = dojo.indexOf(_368, _367)) == -1) { return null; } _367 = this.graphics.splice(i, 1)[0]; } if (_367.getDojoShape()) { this._removeShape(_367); } _367._shape = _367._graphicsLayer = null; this.onGraphicRemove(_367); return _367; }, clear: function () { var _369 = arguments[1], g = this.graphics; while (g.length > 0) { this.remove(g[0]); } if (!_369) { this.onGraphicsClear(); } }, setOpacity: function (op, _36a) { if (_36a || this.opacity != op) { var div = this._div; if (div) { if (dojo.isIE) { dojo.forEach(this.graphics, function (_36b) { var _36c = _36b._shape; var node = _36c && _36c.getNode(); if (node) { var _36d = _36c.strokeStyle, _36e = node.stroke; if (_36d && _36e) { _36e.opacity = _36d.color.a * op; } var _36f = _36c.fillStyle, fill = node.fill; if (_36f && fill) { if (fill.type === "tile") { dojo.style(node, "opacity", op); } else { fill.opacity = _36f.a * op; } } } }); div._esriIeOpacity = op; } else { dojo.style(div.getEventSource(), "opacity", op); } } this.opacity = op; if (!_36a) { this.onOpacityChange(op); } } }, setRenderer: function (ren) { this.renderer = ren; } }); dojo.declare("esri.layers.GraphicsLayer", esri.layers._GraphicsLayer, { constructor: function () { this.enableMouseEvents = dojo.hitch(this, this.enableMouseEvents); this.disableMouseEvents = dojo.hitch(this, this.disableMouseEvents); this._processEvent = dojo.hitch(this, this._processEvent); this._initLayer(); }, _initLayer: function () { this.loaded = true; this.onLoad(this); }, _cleanUp: function () { this.inherited("_cleanUp", arguments); this.disableMouseEvents(); }, _setMap: function (map, _370) { var d = this.inherited("_setMap", arguments); this.enableMouseEvents(); return d; }, _unsetMap: function (map, _371) { this.disableMouseEvents(); this.inherited("_unsetMap", arguments); }, _processEvent: function (evt) { var _372 = this._map, g = this.graphics, gl = g.length; evt.screenPoint = new esri.geometry.Point(evt.pageX - _372.position.x, evt.pageY - _372.position.y); evt.mapPoint = _372.toMap(evt.screenPoint); var i, es, gr, ds, _373 = evt.target, _374 = _373.parentNode; for (i = 0; i < gl; i++) { gr = g[i]; ds = gr.getDojoShape(); if (ds) { es = ds.getEventSource(); if (es == _373 || es == _374) { evt.graphic = gr; return evt; } } } }, _onMouseOverHandler: function (evt) { if (this._processEvent(evt)) { this.onMouseOver(evt); } }, _onMouseMoveHandler: function (evt) { if (this._processEvent(evt)) { this.onMouseMove(evt); } }, _onMouseDragHandler: function (evt) { if (this._processEvent(evt)) { this.onMouseDrag(evt); } }, _onMouseOutHandler: function (evt) { if (this._processEvent(evt)) { this.onMouseOut(evt); } }, _onMouseDownHandler: function (evt) { this._downGr = this._downPt = null; if (this._processEvent(evt)) { dojo.disconnect(this._onmousemove_connect); dojo.disconnect(this._onmousedrag_connect); this._onmousedrag_connect = dojo.connect(this._div.getEventSource(), "onmousemove", this, "_onMouseDragHandler"); this._downGr = evt.graphic; this._downPt = evt.screenPoint.x + "," + evt.screenPoint.y; this.onMouseDown(evt); } }, _onMouseUpHandler: function (evt) { this._upGr = this._upPt = null; if (this._processEvent(evt)) { dojo.disconnect(this._onmousedrag_connect); dojo.disconnect(this._onmousemove_connect); this._onmousemove_connect = dojo.connect(this._div.getEventSource(), "onmousemove", this, "_onMouseMoveHandler"); this._upGr = evt.graphic; this._upPt = evt.screenPoint.x + "," + evt.screenPoint.y; this.onMouseUp(evt); } }, _onClickHandler: function (evt) { if (this._processEvent(evt)) { var _375 = this._downGr, upGr = this._upGr; if (_375 && upGr && _375 === upGr && this._downPt === this._upPt) { if (dojo.isIE) { esri.layers.GraphicsLayer._clicked = evt.graphic; } this.onClick(evt); } } }, _onDblClickHandler: function (evt) { if (this._processEvent(evt)) { this.onDblClick(evt); } }, onMouseOver: function () { }, onMouseMove: function () { }, onMouseDrag: function () { }, onMouseOut: function () { }, onMouseDown: function () { }, onMouseUp: function () { }, onClick: function () { }, onDblClick: function () { }, enableMouseEvents: function () { if (this._mouseEvents) { return; } var dc = dojo.connect, gc = this._div.getEventSource(); if (dojox.gfx.renderer !== "canvas") { this._onmouseover_connect = dc(gc, "onmouseover", this, "_onMouseOverHandler"); this._onmousemove_connect = dc(gc, "onmousemove", this, "_onMouseMoveHandler"); this._onmouseout_connect = dc(gc, "onmouseout", this, "_onMouseOutHandler"); this._onmousedown_connect = dc(gc, "onmousedown", this, "_onMouseDownHandler"); this._onmouseup_connect = dc(gc, "onmouseup", this, "_onMouseUpHandler"); this._onclick_connect = dc(gc, "onclick", this, "_onClickHandler"); this._ondblclick_connect = dc(gc, "ondblclick", this, "_onDblClickHandler"); } this._mouseEvents = true; }, disableMouseEvents: function () { if (!this._mouseEvents) { return; } var ddc = dojo.disconnect; ddc(this._onmouseover_connect); ddc(this._onmousemove_connect); ddc(this._onmousedrag_connect); ddc(this._onmouseout_connect); ddc(this._onmousedown_connect); ddc(this._onmouseup_connect); ddc(this._onclick_connect); ddc(this._ondblclick_connect); this._mouseEvents = false; } }); } if (!dojo._hasResource["dojox.xml.parser"]) { dojo._hasResource["dojox.xml.parser"] = true; dojo.provide("dojox.xml.parser"); dojox.xml.parser.parse = function (str, _376) { var _377 = dojo.doc; var doc; _376 = _376 || "text/xml"; if (str && dojo.trim(str) && "DOMParser" in dojo.global) { var _378 = new DOMParser(); doc = _378.parseFromString(str, _376); var de = doc.documentElement; var _379 = "http://www.mozilla.org/newlayout/xml/parsererror.xml"; if (de.nodeName == "parsererror" && de.namespaceURI == _379) { var _37a = de.getElementsByTagNameNS(_379, "sourcetext")[0]; if (_37a) { _37a = _37a.firstChild.data; } throw new Error("Error parsing text " + de.firstChild.data + " \n" + _37a); } return doc; } else { if ("ActiveXObject" in dojo.global) { var ms = function (n) { return "MSXML" + n + ".DOMDocument"; }; var dp = ["Microsoft.XMLDOM", ms(6), ms(4), ms(3), ms(2)]; dojo.some(dp, function (p) { try { doc = new ActiveXObject(p); } catch (e) { return false; } return true; }); if (str && doc) { doc.async = false; doc.loadXML(str); var pe = doc.parseError; if (pe.errorCode !== 0) { throw new Error("Line: " + pe.line + "\n" + "Col: " + pe.linepos + "\n" + "Reason: " + pe.reason + "\n" + "Error Code: " + pe.errorCode + "\n" + "Source: " + pe.srcText); } } if (doc) { return doc; } } else { if (_377.implementation && _377.implementation.createDocument) { if (str && dojo.trim(str) && _377.createElement) { var tmp = _377.createElement("xml"); tmp.innerHTML = str; var _37b = _377.implementation.createDocument("foo", "", null); dojo.forEach(tmp.childNodes, function (_37c) { _37b.importNode(_37c, true); }); return _37b; } else { return _377.implementation.createDocument("", "", null); } } } } return null; }; dojox.xml.parser.textContent = function (node, text) { if (arguments.length > 1) { var _37d = node.ownerDocument || dojo.doc; dojox.xml.parser.replaceChildren(node, _37d.createTextNode(text)); return text; } else { if (node.textContent !== undefined) { return node.textContent; } var _37e = ""; if (node) { dojo.forEach(node.childNodes, function (_37f) { switch (_37f.nodeType) { case 1: case 5: _37e += dojox.xml.parser.textContent(_37f); break; case 3: case 2: case 4: _37e += _37f.nodeValue; } }); } return _37e; } }; dojox.xml.parser.replaceChildren = function (node, _380) { var _381 = []; if (dojo.isIE) { dojo.forEach(node.childNodes, function (_382) { _381.push(_382); }); } dojox.xml.parser.removeChildren(node); dojo.forEach(_381, dojo.destroy); if (!dojo.isArray(_380)) { node.appendChild(_380); } else { dojo.forEach(_380, function (_383) { node.appendChild(_383); }); } }; dojox.xml.parser.removeChildren = function (node) { var _384 = node.childNodes.length; while (node.hasChildNodes()) { node.removeChild(node.firstChild); } return _384; }; dojox.xml.parser.innerXML = function (node) { if (node.innerXML) { return node.innerXML; } else { if (node.xml) { return node.xml; } else { if (typeof XMLSerializer != "undefined") { return (new XMLSerializer()).serializeToString(node); } } } return null; }; } if (!dojo._hasResource["dojo.window"]) { dojo._hasResource["dojo.window"] = true; dojo.provide("dojo.window"); dojo.window.getBox = function () { var _385 = (dojo.doc.compatMode == "BackCompat") ? dojo.body() : dojo.doc.documentElement; var _386 = dojo._docScroll(); return { w: _385.clientWidth, h: _385.clientHeight, l: _386.x, t: _386.y }; }; dojo.window.get = function (doc) { if (dojo.isIE && window !== document.parentWindow) { doc.parentWindow.execScript("document._parentWindow = window;", "Javascript"); var win = doc._parentWindow; doc._parentWindow = null; return win; } return doc.parentWindow || doc.defaultView; }; dojo.window.scrollIntoView = function (node, pos) { try { node = dojo.byId(node); var doc = node.ownerDocument || dojo.doc, body = doc.body || dojo.body(), html = doc.documentElement || body.parentNode, isIE = dojo.isIE, isWK = dojo.isWebKit; if ((!(dojo.isMoz || isIE || isWK || dojo.isOpera) || node == body || node == html) && (typeof node.scrollIntoView != "undefined")) { node.scrollIntoView(false); return; } var _387 = doc.compatMode == "BackCompat", _388 = _387 ? body : html, _389 = isWK ? body : _388, _38a = _388.clientWidth, _38b = _388.clientHeight, rtl = !dojo._isBodyLtr(), _38c = pos || dojo.position(node), el = node.parentNode, _38d = function (el) { return ((isIE <= 6 || (isIE && _387)) ? false : (dojo.style(el, "position").toLowerCase() == "fixed")); }; if (_38d(node)) { return; } while (el) { if (el == body) { el = _389; } var _38e = dojo.position(el), _38f = _38d(el); if (el == _389) { _38e.w = _38a; _38e.h = _38b; if (_389 == html && isIE && rtl) { _38e.x += _389.offsetWidth - _38e.w; } if (_38e.x < 0 || !isIE) { _38e.x = 0; } if (_38e.y < 0 || !isIE) { _38e.y = 0; } } else { var pb = dojo._getPadBorderExtents(el); _38e.w -= pb.w; _38e.h -= pb.h; _38e.x += pb.l; _38e.y += pb.t; } if (el != _389) { var _390 = el.clientWidth, _391 = _38e.w - _390; if (_390 > 0 && _391 > 0) { _38e.w = _390; if (isIE && rtl) { _38e.x += _391; } } _390 = el.clientHeight; _391 = _38e.h - _390; if (_390 > 0 && _391 > 0) { _38e.h = _390; } } if (_38f) { if (_38e.y < 0) { _38e.h += _38e.y; _38e.y = 0; } if (_38e.x < 0) { _38e.w += _38e.x; _38e.x = 0; } if (_38e.y + _38e.h > _38b) { _38e.h = _38b - _38e.y; } if (_38e.x + _38e.w > _38a) { _38e.w = _38a - _38e.x; } } var l = _38c.x - _38e.x, t = _38c.y - Math.max(_38e.y, 0), r = l + _38c.w - _38e.w, bot = t + _38c.h - _38e.h; if (r * l > 0) { var s = Math[l < 0 ? "max" : "min"](l, r); _38c.x += el.scrollLeft; el.scrollLeft += (isIE >= 8 && !_387 && rtl) ? -s : s; _38c.x -= el.scrollLeft; } if (bot * t > 0) { _38c.y += el.scrollTop; el.scrollTop += Math[t < 0 ? "max" : "min"](t, bot); _38c.y -= el.scrollTop; } el = (el != _389) && !_38f && el.parentNode; } } catch (error) { console.error("scrollIntoView: " + error); node.scrollIntoView(false); } }; } if (!dojo._hasResource["dijit._base.focus"]) { dojo._hasResource["dijit._base.focus"] = true; dojo.provide("dijit._base.focus"); dojo.mixin(dijit, { _curFocus: null, _prevFocus: null, isCollapsed: function () { return dijit.getBookmark().isCollapsed; }, getBookmark: function () { var bm, rg, tg, sel = dojo.doc.selection, cf = dijit._curFocus; if (dojo.global.getSelection) { sel = dojo.global.getSelection(); if (sel) { if (sel.isCollapsed) { tg = cf ? cf.tagName : ""; if (tg) { tg = tg.toLowerCase(); if (tg == "textarea" || (tg == "input" && (!cf.type || cf.type.toLowerCase() == "text"))) { sel = { start: cf.selectionStart, end: cf.selectionEnd, node: cf, pRange: true }; return { isCollapsed: (sel.end <= sel.start), mark: sel }; } } bm = { isCollapsed: true }; } else { rg = sel.getRangeAt(0); bm = { isCollapsed: false, mark: rg.cloneRange() }; } } } else { if (sel) { tg = cf ? cf.tagName : ""; tg = tg.toLowerCase(); if (cf && tg && (tg == "button" || tg == "textarea" || tg == "input")) { if (sel.type && sel.type.toLowerCase() == "none") { return { isCollapsed: true, mark: null }; } else { rg = sel.createRange(); return { isCollapsed: rg.text && rg.text.length ? false : true, mark: { range: rg, pRange: true} }; } } bm = {}; try { rg = sel.createRange(); bm.isCollapsed = !(sel.type == "Text" ? rg.htmlText.length : rg.length); } catch (e) { bm.isCollapsed = true; return bm; } if (sel.type.toUpperCase() == "CONTROL") { if (rg.length) { bm.mark = []; var i = 0, len = rg.length; while (i < len) { bm.mark.push(rg.item(i++)); } } else { bm.isCollapsed = true; bm.mark = null; } } else { bm.mark = rg.getBookmark(); } } else { console.warn("No idea how to store the current selection for this browser!"); } } return bm; }, moveToBookmark: function (_392) { var _393 = dojo.doc, mark = _392.mark; if (mark) { if (dojo.global.getSelection) { var sel = dojo.global.getSelection(); if (sel && sel.removeAllRanges) { if (mark.pRange) { var r = mark; var n = r.node; n.selectionStart = r.start; n.selectionEnd = r.end; } else { sel.removeAllRanges(); sel.addRange(mark); } } else { console.warn("No idea how to restore selection for this browser!"); } } else { if (_393.selection && mark) { var rg; if (mark.pRange) { rg = mark.range; } else { if (dojo.isArray(mark)) { rg = _393.body.createControlRange(); dojo.forEach(mark, function (n) { rg.addElement(n); }); } else { rg = _393.body.createTextRange(); rg.moveToBookmark(mark); } } rg.select(); } } } }, getFocus: function (menu, _394) { var node = !dijit._curFocus || (menu && dojo.isDescendant(dijit._curFocus, menu.domNode)) ? dijit._prevFocus : dijit._curFocus; return { node: node, bookmark: (node == dijit._curFocus) && dojo.withGlobal(_394 || dojo.global, dijit.getBookmark), openedForWindow: _394 }; }, focus: function (_395) { if (!_395) { return; } var node = "node" in _395 ? _395.node : _395, _396 = _395.bookmark, _397 = _395.openedForWindow, _398 = _396 ? _396.isCollapsed : false; if (node) { var _399 = (node.tagName.toLowerCase() == "iframe") ? node.contentWindow : node; if (_399 && _399.focus) { try { _399.focus(); } catch (e) { } } dijit._onFocusNode(node); } if (_396 && dojo.withGlobal(_397 || dojo.global, dijit.isCollapsed) && !_398) { if (_397) { _397.focus(); } try { dojo.withGlobal(_397 || dojo.global, dijit.moveToBookmark, null, [_396]); } catch (e2) { } } }, _activeStack: [], registerIframe: function (_39a) { return dijit.registerWin(_39a.contentWindow, _39a); }, unregisterIframe: function (_39b) { dijit.unregisterWin(_39b); }, registerWin: function (_39c, _39d) { var _39e = function (evt) { dijit._justMouseDowned = true; setTimeout(function () { dijit._justMouseDowned = false; }, 0); if (dojo.isIE && evt && evt.srcElement && evt.srcElement.parentNode == null) { return; } dijit._onTouchNode(_39d || evt.target || evt.srcElement, "mouse"); }; var doc = dojo.isIE ? _39c.document.documentElement : _39c.document; if (doc) { if (dojo.isIE) { doc.attachEvent("onmousedown", _39e); var _39f = function (evt) { if (evt.srcElement.tagName.toLowerCase() != "#document" && dijit.isTabNavigable(evt.srcElement)) { dijit._onFocusNode(_39d || evt.srcElement); } else { dijit._onTouchNode(_39d || evt.srcElement); } }; doc.attachEvent("onactivate", _39f); var _3a0 = function (evt) { dijit._onBlurNode(_39d || evt.srcElement); }; doc.attachEvent("ondeactivate", _3a0); return function () { doc.detachEvent("onmousedown", _39e); doc.detachEvent("onactivate", _39f); doc.detachEvent("ondeactivate", _3a0); doc = null; }; } else { doc.addEventListener("mousedown", _39e, true); var _3a1 = function (evt) { dijit._onFocusNode(_39d || evt.target); }; doc.addEventListener("focus", _3a1, true); var _3a2 = function (evt) { dijit._onBlurNode(_39d || evt.target); }; doc.addEventListener("blur", _3a2, true); return function () { doc.removeEventListener("mousedown", _39e, true); doc.removeEventListener("focus", _3a1, true); doc.removeEventListener("blur", _3a2, true); doc = null; }; } } }, unregisterWin: function (_3a3) { _3a3 && _3a3(); }, _onBlurNode: function (node) { dijit._prevFocus = dijit._curFocus; dijit._curFocus = null; if (dijit._justMouseDowned) { return; } if (dijit._clearActiveWidgetsTimer) { clearTimeout(dijit._clearActiveWidgetsTimer); } dijit._clearActiveWidgetsTimer = setTimeout(function () { delete dijit._clearActiveWidgetsTimer; dijit._setStack([]); dijit._prevFocus = null; }, 100); }, _onTouchNode: function (node, by) { if (dijit._clearActiveWidgetsTimer) { clearTimeout(dijit._clearActiveWidgetsTimer); delete dijit._clearActiveWidgetsTimer; } var _3a4 = []; try { while (node) { var _3a5 = dojo.attr(node, "dijitPopupParent"); if (_3a5) { node = dijit.byId(_3a5).domNode; } else { if (node.tagName && node.tagName.toLowerCase() == "body") { if (node === dojo.body()) { break; } node = dojo.window.get(node.ownerDocument).frameElement; } else { var id = node.getAttribute && node.getAttribute("widgetId"), _3a6 = id && dijit.byId(id); if (_3a6 && !(by == "mouse" && _3a6.get("disabled"))) { _3a4.unshift(id); } node = node.parentNode; } } } } catch (e) { } dijit._setStack(_3a4, by); }, _onFocusNode: function (node) { if (!node) { return; } if (node.nodeType == 9) { return; } dijit._onTouchNode(node); if (node == dijit._curFocus) { return; } if (dijit._curFocus) { dijit._prevFocus = dijit._curFocus; } dijit._curFocus = node; dojo.publish("focusNode", [node]); }, _setStack: function (_3a7, by) { var _3a8 = dijit._activeStack; dijit._activeStack = _3a7; for (var _3a9 = 0; _3a9 < Math.min(_3a8.length, _3a7.length); _3a9++) { if (_3a8[_3a9] != _3a7[_3a9]) { break; } } var _3aa; for (var i = _3a8.length - 1; i >= _3a9; i--) { _3aa = dijit.byId(_3a8[i]); if (_3aa) { _3aa._focused = false; _3aa._hasBeenBlurred = true; if (_3aa._onBlur) { _3aa._onBlur(by); } dojo.publish("widgetBlur", [_3aa, by]); } } for (i = _3a9; i < _3a7.length; i++) { _3aa = dijit.byId(_3a7[i]); if (_3aa) { _3aa._focused = true; if (_3aa._onFocus) { _3aa._onFocus(by); } dojo.publish("widgetFocus", [_3aa, by]); } } } }); dojo.addOnLoad(function () { var _3ab = dijit.registerWin(window); if (dojo.isIE) { dojo.addOnWindowUnload(function () { dijit.unregisterWin(_3ab); _3ab = null; }); } }); } if (!dojo._hasResource["dojo.AdapterRegistry"]) { dojo._hasResource["dojo.AdapterRegistry"] = true; dojo.provide("dojo.AdapterRegistry"); dojo.AdapterRegistry = function (_3ac) { this.pairs = []; this.returnWrappers = _3ac || false; }; dojo.extend(dojo.AdapterRegistry, { register: function (name, _3ad, wrap, _3ae, _3af) { this.pairs[((_3af) ? "unshift" : "push")]([name, _3ad, wrap, _3ae]); }, match: function () { for (var i = 0; i < this.pairs.length; i++) { var pair = this.pairs[i]; if (pair[1].apply(this, arguments)) { if ((pair[3]) || (this.returnWrappers)) { return pair[2]; } else { return pair[2].apply(this, arguments); } } } throw new Error("No match found"); }, unregister: function (name) { for (var i = 0; i < this.pairs.length; i++) { var pair = this.pairs[i]; if (pair[0] == name) { this.pairs.splice(i, 1); return true; } } return false; } }); } if (!dojo._hasResource["dijit._base.place"]) { dojo._hasResource["dijit._base.place"] = true; dojo.provide("dijit._base.place"); dijit.getViewport = function () { return dojo.window.getBox(); }; dijit.placeOnScreen = function (node, pos, _3b0, _3b1) { var _3b2 = dojo.map(_3b0, function (_3b3) { var c = { corner: _3b3, pos: { x: pos.x, y: pos.y} }; if (_3b1) { c.pos.x += _3b3.charAt(1) == "L" ? _3b1.x : -_3b1.x; c.pos.y += _3b3.charAt(0) == "T" ? _3b1.y : -_3b1.y; } return c; }); return dijit._place(node, _3b2); }; dijit._place = function (node, _3b4, _3b5) { var view = dojo.window.getBox(); if (!node.parentNode || String(node.parentNode.tagName).toLowerCase() != "body") { dojo.body().appendChild(node); } var best = null; dojo.some(_3b4, function (_3b6) { var _3b7 = _3b6.corner; var pos = _3b6.pos; if (_3b5) { _3b5(node, _3b6.aroundCorner, _3b7); } var _3b8 = node.style; var _3b9 = _3b8.display; var _3ba = _3b8.visibility; _3b8.visibility = "hidden"; _3b8.display = ""; var mb = dojo.marginBox(node); _3b8.display = _3b9; _3b8.visibility = _3ba; var _3bb = Math.max(view.l, _3b7.charAt(1) == "L" ? pos.x : (pos.x - mb.w)), _3bc = Math.max(view.t, _3b7.charAt(0) == "T" ? pos.y : (pos.y - mb.h)), endX = Math.min(view.l + view.w, _3b7.charAt(1) == "L" ? (_3bb + mb.w) : pos.x), endY = Math.min(view.t + view.h, _3b7.charAt(0) == "T" ? (_3bc + mb.h) : pos.y), _3bd = endX - _3bb, _3be = endY - _3bc, _3bf = (mb.w - _3bd) + (mb.h - _3be); if (best == null || _3bf < best.overflow) { best = { corner: _3b7, aroundCorner: _3b6.aroundCorner, x: _3bb, y: _3bc, w: _3bd, h: _3be, overflow: _3bf }; } return !_3bf; }); node.style.left = best.x + "px"; node.style.top = best.y + "px"; if (best.overflow && _3b5) { _3b5(node, best.aroundCorner, best.corner); } return best; }; dijit.placeOnScreenAroundNode = function (node, _3c0, _3c1, _3c2) { _3c0 = dojo.byId(_3c0); var _3c3 = _3c0.style.display; _3c0.style.display = ""; var _3c4 = dojo.position(_3c0, true); _3c0.style.display = _3c3; return dijit._placeOnScreenAroundRect(node, _3c4.x, _3c4.y, _3c4.w, _3c4.h, _3c1, _3c2); }; dijit.placeOnScreenAroundRectangle = function (node, _3c5, _3c6, _3c7) { return dijit._placeOnScreenAroundRect(node, _3c5.x, _3c5.y, _3c5.width, _3c5.height, _3c6, _3c7); }; dijit._placeOnScreenAroundRect = function (node, x, y, _3c8, _3c9, _3ca, _3cb) { var _3cc = []; for (var _3cd in _3ca) { _3cc.push({ aroundCorner: _3cd, corner: _3ca[_3cd], pos: { x: x + (_3cd.charAt(1) == "L" ? 0 : _3c8), y: y + (_3cd.charAt(0) == "T" ? 0 : _3c9)} }); } return dijit._place(node, _3cc, _3cb); }; dijit.placementRegistry = new dojo.AdapterRegistry(); dijit.placementRegistry.register("node", function (n, x) { return typeof x == "object" && typeof x.offsetWidth != "undefined" && typeof x.offsetHeight != "undefined"; }, dijit.placeOnScreenAroundNode); dijit.placementRegistry.register("rect", function (n, x) { return typeof x == "object" && "x" in x && "y" in x && "width" in x && "height" in x; }, dijit.placeOnScreenAroundRectangle); dijit.placeOnScreenAroundElement = function (node, _3ce, _3cf, _3d0) { return dijit.placementRegistry.match.apply(dijit.placementRegistry, arguments); }; dijit.getPopupAroundAlignment = function (_3d1, _3d2) { var _3d3 = {}; dojo.forEach(_3d1, function (pos) { switch (pos) { case "after": _3d3[_3d2 ? "BR" : "BL"] = _3d2 ? "BL" : "BR"; break; case "before": _3d3[_3d2 ? "BL" : "BR"] = _3d2 ? "BR" : "BL"; break; case "below": _3d3[_3d2 ? "BL" : "BR"] = _3d2 ? "TL" : "TR"; _3d3[_3d2 ? "BR" : "BL"] = _3d2 ? "TR" : "TL"; break; case "above": default: _3d3[_3d2 ? "TL" : "TR"] = _3d2 ? "BL" : "BR"; _3d3[_3d2 ? "TR" : "TL"] = _3d2 ? "BR" : "BL"; break; } }); return _3d3; }; } if (!dojo._hasResource["dijit._base.window"]) { dojo._hasResource["dijit._base.window"] = true; dojo.provide("dijit._base.window"); dijit.getDocumentWindow = function (doc) { return dojo.window.get(doc); }; } if (!dojo._hasResource["dijit._base.popup"]) { dojo._hasResource["dijit._base.popup"] = true; dojo.provide("dijit._base.popup"); dijit.popup = { _stack: [], _beginZIndex: 1000, _idGen: 1, moveOffScreen: function (node) { var _3d4 = node.parentNode; if (!_3d4 || !dojo.hasClass(_3d4, "dijitPopup")) { _3d4 = dojo.create("div", { "class": "dijitPopup", style: { visibility: "hidden", top: "-9999px"} }, dojo.body()); dijit.setWaiRole(_3d4, "presentation"); _3d4.appendChild(node); } var s = node.style; s.display = ""; s.visibility = ""; s.position = ""; s.top = "0px"; dojo.style(_3d4, { visibility: "hidden", top: "-9999px" }); }, getTopPopup: function () { var _3d5 = this._stack; for (var pi = _3d5.length - 1; pi > 0 && _3d5[pi].parent === _3d5[pi - 1].widget; pi--) { } return _3d5[pi]; }, open: function (args) { var _3d6 = this._stack, _3d7 = args.popup, _3d8 = args.orient || ((args.parent ? args.parent.isLeftToRight() : dojo._isBodyLtr()) ? { "BL": "TL", "BR": "TR", "TL": "BL", "TR": "BR"} : { "BR": "TR", "BL": "TL", "TR": "BR", "TL": "BL" }), _3d9 = args.around, id = (args.around && args.around.id) ? (args.around.id + "_dropdown") : ("popup_" + this._idGen++); var _3da = _3d7.domNode.parentNode; if (!_3da || !dojo.hasClass(_3da, "dijitPopup")) { this.moveOffScreen(_3d7.domNode); _3da = _3d7.domNode.parentNode; } dojo.attr(_3da, { id: id, style: { zIndex: this._beginZIndex + _3d6.length }, "class": "dijitPopup " + (_3d7.baseClass || _3d7["class"] || "").split(" ")[0] + "Popup", dijitPopupParent: args.parent ? args.parent.id : "" }); if (dojo.isIE || dojo.isMoz) { var _3db = _3da.childNodes[1]; if (!_3db) { _3db = new dijit.BackgroundIframe(_3da); } } var best = _3d9 ? dijit.placeOnScreenAroundElement(_3da, _3d9, _3d8, _3d7.orient ? dojo.hitch(_3d7, "orient") : null) : dijit.placeOnScreen(_3da, args, _3d8 == "R" ? ["TR", "BR", "TL", "BL"] : ["TL", "BL", "TR", "BR"], args.padding); _3da.style.visibility = "visible"; _3d7.domNode.style.visibility = "visible"; var _3dc = []; _3dc.push(dojo.connect(_3da, "onkeypress", this, function (evt) { if (evt.charOrCode == dojo.keys.ESCAPE && args.onCancel) { dojo.stopEvent(evt); args.onCancel(); } else { if (evt.charOrCode === dojo.keys.TAB) { dojo.stopEvent(evt); var _3dd = this.getTopPopup(); if (_3dd && _3dd.onCancel) { _3dd.onCancel(); } } } })); if (_3d7.onCancel) { _3dc.push(dojo.connect(_3d7, "onCancel", args.onCancel)); } _3dc.push(dojo.connect(_3d7, _3d7.onExecute ? "onExecute" : "onChange", this, function () { var _3de = this.getTopPopup(); if (_3de && _3de.onExecute) { _3de.onExecute(); } })); _3d6.push({ wrapper: _3da, iframe: _3db, widget: _3d7, parent: args.parent, onExecute: args.onExecute, onCancel: args.onCancel, onClose: args.onClose, handlers: _3dc }); if (_3d7.onOpen) { _3d7.onOpen(best); } return best; }, close: function (_3df) { var _3e0 = this._stack; while (dojo.some(_3e0, function (elem) { return elem.widget == _3df; })) { var top = _3e0.pop(), _3e1 = top.wrapper, _3e2 = top.iframe, _3e3 = top.widget, _3e4 = top.onClose; if (_3e3.onClose) { _3e3.onClose(); } dojo.forEach(top.handlers, dojo.disconnect); if (_3e3 && _3e3.domNode) { this.moveOffScreen(_3e3.domNode); } else { dojo.destroy(_3e1); } if (_3e4) { _3e4(); } } } }; dijit._frames = new function () { var _3e5 = []; this.pop = function () { var _3e6; if (_3e5.length) { _3e6 = _3e5.pop(); _3e6.style.display = ""; } else { if (dojo.isIE) { var burl = dojo.config["dojoBlankHtmlUrl"] || (dojo.moduleUrl("dojo", "resources/blank.html") + "") || "javascript:\"\""; var html = "<iframe src='" + burl + "'" + " style='position: absolute; left: 0px; top: 0px;" + "z-index: -1; filter:Alpha(Opacity=\"0\");'>"; _3e6 = dojo.doc.createElement(html); } else { _3e6 = dojo.create("iframe"); _3e6.src = "javascript:\"\""; _3e6.className = "dijitBackgroundIframe"; dojo.style(_3e6, "opacity", 0.1); } _3e6.tabIndex = -1; dijit.setWaiRole(_3e6, "presentation"); } return _3e6; }; this.push = function (_3e7) { _3e7.style.display = "none"; _3e5.push(_3e7); }; } (); dijit.BackgroundIframe = function (node) { if (!node.id) { throw new Error("no id"); } if (dojo.isIE || dojo.isMoz) { var _3e8 = dijit._frames.pop(); node.appendChild(_3e8); if (dojo.isIE < 7) { this.resize(node); this._conn = dojo.connect(node, "onresize", this, function () { this.resize(node); }); } else { dojo.style(_3e8, { width: "100%", height: "100%" }); } this.iframe = _3e8; } }; dojo.extend(dijit.BackgroundIframe, { resize: function (node) { if (this.iframe && dojo.isIE < 7) { dojo.style(this.iframe, { width: node.offsetWidth + "px", height: node.offsetHeight + "px" }); } }, destroy: function () { if (this._conn) { dojo.disconnect(this._conn); this._conn = null; } if (this.iframe) { dijit._frames.push(this.iframe); delete this.iframe; } } }); } if (!dojo._hasResource["dijit._base.scroll"]) { dojo._hasResource["dijit._base.scroll"] = true; dojo.provide("dijit._base.scroll"); dijit.scrollIntoView = function (node, pos) { dojo.window.scrollIntoView(node, pos); }; } if (!dojo._hasResource["dojo.uacss"]) { dojo._hasResource["dojo.uacss"] = true; dojo.provide("dojo.uacss"); (function () { var d = dojo, html = d.doc.documentElement, ie = d.isIE, _3e9 = d.isOpera, maj = Math.floor, ff = d.isFF, _3ea = d.boxModel.replace(/-/, ""), _3eb = { dj_ie: ie, dj_ie6: maj(ie) == 6, dj_ie7: maj(ie) == 7, dj_ie8: maj(ie) == 8, dj_quirks: d.isQuirks, dj_iequirks: ie && d.isQuirks, dj_opera: _3e9, dj_khtml: d.isKhtml, dj_webkit: d.isWebKit, dj_safari: d.isSafari, dj_chrome: d.isChrome, dj_gecko: d.isMozilla, dj_ff3: maj(ff) == 3 }; _3eb["dj_" + _3ea] = true; var _3ec = ""; for (var clz in _3eb) { if (_3eb[clz]) { _3ec += clz + " "; } } html.className = d.trim(html.className + " " + _3ec); dojo._loaders.unshift(function () { if (!dojo._isBodyLtr()) { var _3ed = "dj_rtl dijitRtl " + _3ec.replace(/ /g, "-rtl "); html.className = d.trim(html.className + " " + _3ed); } }); })(); } if (!dojo._hasResource["dijit._base.sniff"]) { dojo._hasResource["dijit._base.sniff"] = true; dojo.provide("dijit._base.sniff"); } if (!dojo._hasResource["dijit._base.typematic"]) { dojo._hasResource["dijit._base.typematic"] = true; dojo.provide("dijit._base.typematic"); dijit.typematic = { _fireEventAndReload: function () { this._timer = null; this._callback(++this._count, this._node, this._evt); this._currentTimeout = Math.max(this._currentTimeout < 0 ? this._initialDelay : (this._subsequentDelay > 1 ? this._subsequentDelay : Math.round(this._currentTimeout * this._subsequentDelay)), this._minDelay); this._timer = setTimeout(dojo.hitch(this, "_fireEventAndReload"), this._currentTimeout); }, trigger: function (evt, _3ee, node, _3ef, obj, _3f0, _3f1, _3f2) { if (obj != this._obj) { this.stop(); this._initialDelay = _3f1 || 500; this._subsequentDelay = _3f0 || 0.9; this._minDelay = _3f2 || 10; this._obj = obj; this._evt = evt; this._node = node; this._currentTimeout = -1; this._count = -1; this._callback = dojo.hitch(_3ee, _3ef); this._fireEventAndReload(); this._evt = dojo.mixin({ faux: true }, evt); } }, stop: function () { if (this._timer) { clearTimeout(this._timer); this._timer = null; } if (this._obj) { this._callback(-1, this._node, this._evt); this._obj = null; } }, addKeyListener: function (node, _3f3, _3f4, _3f5, _3f6, _3f7, _3f8) { if (_3f3.keyCode) { _3f3.charOrCode = _3f3.keyCode; dojo.deprecated("keyCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.", "", "2.0"); } else { if (_3f3.charCode) { _3f3.charOrCode = String.fromCharCode(_3f3.charCode); dojo.deprecated("charCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.", "", "2.0"); } } return [dojo.connect(node, "onkeypress", this, function (evt) { if (evt.charOrCode == _3f3.charOrCode && (_3f3.ctrlKey === undefined || _3f3.ctrlKey == evt.ctrlKey) && (_3f3.altKey === undefined || _3f3.altKey == evt.altKey) && (_3f3.metaKey === undefined || _3f3.metaKey == (evt.metaKey || false)) && (_3f3.shiftKey === undefined || _3f3.shiftKey == evt.shiftKey)) { dojo.stopEvent(evt); dijit.typematic.trigger(evt, _3f4, node, _3f5, _3f3, _3f6, _3f7, _3f8); } else { if (dijit.typematic._obj == _3f3) { dijit.typematic.stop(); } } }), dojo.connect(node, "onkeyup", this, function (evt) { if (dijit.typematic._obj == _3f3) { dijit.typematic.stop(); } })]; }, addMouseListener: function (node, _3f9, _3fa, _3fb, _3fc, _3fd) { var dc = dojo.connect; return [dc(node, "mousedown", this, function (evt) { dojo.stopEvent(evt); dijit.typematic.trigger(evt, _3f9, node, _3fa, node, _3fb, _3fc, _3fd); }), dc(node, "mouseup", this, function (evt) { dojo.stopEvent(evt); dijit.typematic.stop(); }), dc(node, "mouseout", this, function (evt) { dojo.stopEvent(evt); dijit.typematic.stop(); }), dc(node, "mousemove", this, function (evt) { evt.preventDefault(); }), dc(node, "dblclick", this, function (evt) { dojo.stopEvent(evt); if (dojo.isIE) { dijit.typematic.trigger(evt, _3f9, node, _3fa, node, _3fb, _3fc, _3fd); setTimeout(dojo.hitch(this, dijit.typematic.stop), 50); } })]; }, addListener: function (_3fe, _3ff, _400, _401, _402, _403, _404, _405) { return this.addKeyListener(_3ff, _400, _401, _402, _403, _404, _405).concat(this.addMouseListener(_3fe, _401, _402, _403, _404, _405)); } }; } if (!dojo._hasResource["dijit._base.wai"]) { dojo._hasResource["dijit._base.wai"] = true; dojo.provide("dijit._base.wai"); dijit.wai = { onload: function () { var div = dojo.create("div", { id: "a11yTestNode", style: { cssText: "border: 1px solid;" + "border-color:red green;" + "position: absolute;" + "height: 5px;" + "top: -999px;" + "background-image: url(\"" + (dojo.config.blankGif || dojo.moduleUrl("dojo", "resources/blank.gif")) + "\");"} }, dojo.body()); var cs = dojo.getComputedStyle(div); if (cs) { var _406 = cs.backgroundImage; var _407 = (cs.borderTopColor == cs.borderRightColor) || (_406 != null && (_406 == "none" || _406 == "url(invalid-url:)")); dojo[_407 ? "addClass" : "removeClass"](dojo.body(), "dijit_a11y"); if (dojo.isIE) { div.outerHTML = ""; } else { dojo.body().removeChild(div); } } } }; if (dojo.isIE || dojo.isMoz) { dojo._loaders.unshift(dijit.wai.onload); } dojo.mixin(dijit, { _XhtmlRoles: /banner|contentinfo|definition|main|navigation|search|note|secondary|seealso/, hasWaiRole: function (elem, role) { var _408 = this.getWaiRole(elem); return role ? (_408.indexOf(role) > -1) : (_408.length > 0); }, getWaiRole: function (elem) { return dojo.trim((dojo.attr(elem, "role") || "").replace(this._XhtmlRoles, "").replace("wairole:", "")); }, setWaiRole: function (elem, role) { var _409 = dojo.attr(elem, "role") || ""; if (!this._XhtmlRoles.test(_409)) { dojo.attr(elem, "role", role); } else { if ((" " + _409 + " ").indexOf(" " + role + " ") < 0) { var _40a = dojo.trim(_409.replace(this._XhtmlRoles, "")); var _40b = dojo.trim(_409.replace(_40a, "")); dojo.attr(elem, "role", _40b + (_40b ? " " : "") + role); } } }, removeWaiRole: function (elem, role) { var _40c = dojo.attr(elem, "role"); if (!_40c) { return; } if (role) { var t = dojo.trim((" " + _40c + " ").replace(" " + role + " ", " ")); dojo.attr(elem, "role", t); } else { elem.removeAttribute("role"); } }, hasWaiState: function (elem, _40d) { return elem.hasAttribute ? elem.hasAttribute("aria-" + _40d) : !!elem.getAttribute("aria-" + _40d); }, getWaiState: function (elem, _40e) { return elem.getAttribute("aria-" + _40e) || ""; }, setWaiState: function (elem, _40f, _410) { elem.setAttribute("aria-" + _40f, _410); }, removeWaiState: function (elem, _411) { elem.removeAttribute("aria-" + _411); } }); } if (!dojo._hasResource["dijit._base"]) { dojo._hasResource["dijit._base"] = true; dojo.provide("dijit._base"); } if (!dojo._hasResource["dijit._Widget"]) { dojo._hasResource["dijit._Widget"] = true; dojo.provide("dijit._Widget"); dojo.require("dijit._base"); dojo.connect(dojo, "_connect", function (_412, _413) { if (_412 && dojo.isFunction(_412._onConnect)) { _412._onConnect(_413); } }); dijit._connectOnUseEventHandler = function (_414) { }; dijit._lastKeyDownNode = null; if (dojo.isIE) { (function () { var _415 = function (evt) { dijit._lastKeyDownNode = evt.srcElement; }; dojo.doc.attachEvent("onkeydown", _415); dojo.addOnWindowUnload(function () { dojo.doc.detachEvent("onkeydown", _415); }); })(); } else { dojo.doc.addEventListener("keydown", function (evt) { dijit._lastKeyDownNode = evt.target; }, true); } (function () { var _416 = {}, _417 = function (_418) { var dc = _418.declaredClass; if (!_416[dc]) { var r = [], _419, _41a = _418.constructor.prototype; for (var _41b in _41a) { if (dojo.isFunction(_41a[_41b]) && (_419 = _41b.match(/^_set([a-zA-Z]*)Attr$/)) && _419[1]) { r.push(_419[1].charAt(0).toLowerCase() + _419[1].substr(1)); } } _416[dc] = r; } return _416[dc] || []; }; dojo.declare("dijit._Widget", null, { id: "", lang: "", dir: "", "class": "", style: "", title: "", tooltip: "", baseClass: "", srcNodeRef: null, domNode: null, containerNode: null, attributeMap: { id: "", dir: "", lang: "", "class": "", style: "", title: "" }, _deferredConnects: { onClick: "", onDblClick: "", onKeyDown: "", onKeyPress: "", onKeyUp: "", onMouseMove: "", onMouseDown: "", onMouseOut: "", onMouseOver: "", onMouseLeave: "", onMouseEnter: "", onMouseUp: "" }, onClick: dijit._connectOnUseEventHandler, onDblClick: dijit._connectOnUseEventHandler, onKeyDown: dijit._connectOnUseEventHandler, onKeyPress: dijit._connectOnUseEventHandler, onKeyUp: dijit._connectOnUseEventHandler, onMouseDown: dijit._connectOnUseEventHandler, onMouseMove: dijit._connectOnUseEventHandler, onMouseOut: dijit._connectOnUseEventHandler, onMouseOver: dijit._connectOnUseEventHandler, onMouseLeave: dijit._connectOnUseEventHandler, onMouseEnter: dijit._connectOnUseEventHandler, onMouseUp: dijit._connectOnUseEventHandler, _blankGif: (dojo.config.blankGif || dojo.moduleUrl("dojo", "resources/blank.gif")).toString(), postscript: function (_41c, _41d) { this.create(_41c, _41d); }, create: function (_41e, _41f) { this.srcNodeRef = dojo.byId(_41f); this._connects = []; this._subscribes = []; this._deferredConnects = dojo.clone(this._deferredConnects); for (var attr in this.attributeMap) { delete this._deferredConnects[attr]; } for (attr in this._deferredConnects) { if (this[attr] !== dijit._connectOnUseEventHandler) { delete this._deferredConnects[attr]; } } if (this.srcNodeRef && (typeof this.srcNodeRef.id == "string")) { this.id = this.srcNodeRef.id; } if (_41e) { this.params = _41e; dojo.mixin(this, _41e); } this.postMixInProperties(); if (!this.id) { this.id = dijit.getUniqueId(this.declaredClass.replace(/\./g, "_")); } dijit.registry.add(this); this.buildRendering(); if (this.domNode) { this._applyAttributes(); var _420 = this.srcNodeRef; if (_420 && _420.parentNode) { _420.parentNode.replaceChild(this.domNode, _420); } for (attr in this.params) { this._onConnect(attr); } } if (this.domNode) { this.domNode.setAttribute("widgetId", this.id); } this.postCreate(); if (this.srcNodeRef && !this.srcNodeRef.parentNode) { delete this.srcNodeRef; } this._created = true; }, _applyAttributes: function () { var _421 = function (attr, _422) { if ((_422.params && attr in _422.params) || _422[attr]) { _422.set(attr, _422[attr]); } }; for (var attr in this.attributeMap) { _421(attr, this); } dojo.forEach(_417(this), function (a) { if (!(a in this.attributeMap)) { _421(a, this); } }, this); }, postMixInProperties: function () { }, buildRendering: function () { this.domNode = this.srcNodeRef || dojo.create("div"); }, postCreate: function () { if (this.baseClass) { var _423 = this.baseClass.split(" "); if (!this.isLeftToRight()) { _423 = _423.concat(dojo.map(_423, function (name) { return name + "Rtl"; })); } dojo.addClass(this.domNode, _423); } }, startup: function () { this._started = true; }, destroyRecursive: function (_424) { this._beingDestroyed = true; this.destroyDescendants(_424); this.destroy(_424); }, destroy: function (_425) { this._beingDestroyed = true; this.uninitialize(); var d = dojo, dfe = d.forEach, dun = d.unsubscribe; dfe(this._connects, function (_426) { dfe(_426, d.disconnect); }); dfe(this._subscribes, function (_427) { dun(_427); }); dfe(this._supportingWidgets || [], function (w) { if (w.destroyRecursive) { w.destroyRecursive(); } else { if (w.destroy) { w.destroy(); } } }); this.destroyRendering(_425); dijit.registry.remove(this.id); this._destroyed = true; }, destroyRendering: function (_428) { if (this.bgIframe) { this.bgIframe.destroy(_428); delete this.bgIframe; } if (this.domNode) { if (_428) { dojo.removeAttr(this.domNode, "widgetId"); } else { dojo.destroy(this.domNode); } delete this.domNode; } if (this.srcNodeRef) { if (!_428) { dojo.destroy(this.srcNodeRef); } delete this.srcNodeRef; } }, destroyDescendants: function (_429) { dojo.forEach(this.getChildren(), function (_42a) { if (_42a.destroyRecursive) { _42a.destroyRecursive(_429); } }); }, uninitialize: function () { return false; }, onFocus: function () { }, onBlur: function () { }, _onFocus: function (e) { this.onFocus(); }, _onBlur: function () { this.onBlur(); }, _onConnect: function (_42b) { if (_42b in this._deferredConnects) { var _42c = this[this._deferredConnects[_42b] || "domNode"]; this.connect(_42c, _42b.toLowerCase(), _42b); delete this._deferredConnects[_42b]; } }, _setClassAttr: function (_42d) { var _42e = this[this.attributeMap["class"] || "domNode"]; dojo.removeClass(_42e, this["class"]); this["class"] = _42d; dojo.addClass(_42e, _42d); }, _setStyleAttr: function (_42f) { var _430 = this[this.attributeMap.style || "domNode"]; if (dojo.isObject(_42f)) { dojo.style(_430, _42f); } else { if (_430.style.cssText) { _430.style.cssText += "; " + _42f; } else { _430.style.cssText = _42f; } } this.style = _42f; }, setAttribute: function (attr, _431) { dojo.deprecated(this.declaredClass + "::setAttribute(attr, value) is deprecated. Use set() instead.", "", "2.0"); this.set(attr, _431); }, _attrToDom: function (attr, _432) { var _433 = this.attributeMap[attr]; dojo.forEach(dojo.isArray(_433) ? _433 : [_433], function (_434) { var _435 = this[_434.node || _434 || "domNode"]; var type = _434.type || "attribute"; switch (type) { case "attribute": if (dojo.isFunction(_432)) { _432 = dojo.hitch(this, _432); } var _436 = _434.attribute ? _434.attribute : (/^on[A-Z][a-zA-Z]*$/.test(attr) ? attr.toLowerCase() : attr); dojo.attr(_435, _436, _432); break; case "innerText": _435.innerHTML = ""; _435.appendChild(dojo.doc.createTextNode(_432)); break; case "innerHTML": _435.innerHTML = _432; break; case "class": dojo.removeClass(_435, this[attr]); dojo.addClass(_435, _432); break; } }, this); this[attr] = _432; }, attr: function (name, _437) { if (dojo.config.isDebug) { var _438 = arguments.callee._ach || (arguments.callee._ach = {}), _439 = (arguments.callee.caller || "unknown caller").toString(); if (!_438[_439]) { dojo.deprecated(this.declaredClass + "::attr() is deprecated. Use get() or set() instead, called from " + _439, "", "2.0"); _438[_439] = true; } } var args = arguments.length; if (args >= 2 || typeof name === "object") { return this.set.apply(this, arguments); } else { return this.get(name); } }, get: function (name) { var _43a = this._getAttrNames(name); return this[_43a.g] ? this[_43a.g]() : this[name]; }, set: function (name, _43b) { if (typeof name === "object") { for (var x in name) { this.set(x, name[x]); } return this; } var _43c = this._getAttrNames(name); if (this[_43c.s]) { var _43d = this[_43c.s].apply(this, Array.prototype.slice.call(arguments, 1)); } else { if (name in this.attributeMap) { this._attrToDom(name, _43b); } var _43e = this[name]; this[name] = _43b; } return _43d || this; }, _attrPairNames: {}, _getAttrNames: function (name) { var apn = this._attrPairNames; if (apn[name]) { return apn[name]; } var uc = name.charAt(0).toUpperCase() + name.substr(1); return (apn[name] = { n: name + "Node", s: "_set" + uc + "Attr", g: "_get" + uc + "Attr" }); }, toString: function () { return "[Widget " + this.declaredClass + ", " + (this.id || "NO ID") + "]"; }, getDescendants: function () { return this.containerNode ? dojo.query("[widgetId]", this.containerNode).map(dijit.byNode) : []; }, getChildren: function () { return this.containerNode ? dijit.findWidgets(this.containerNode) : []; }, nodesWithKeyClick: ["input", "button"], connect: function (obj, _43f, _440) { var d = dojo, dc = d._connect, _441 = []; if (_43f == "ondijitclick") { if (dojo.indexOf(this.nodesWithKeyClick, obj.nodeName.toLowerCase()) == -1) { var m = d.hitch(this, _440); _441.push(dc(obj, "onkeydown", this, function (e) { if ((e.keyCode == d.keys.ENTER || e.keyCode == d.keys.SPACE) && !e.ctrlKey && !e.shiftKey && !e.altKey && !e.metaKey) { dijit._lastKeyDownNode = e.target; e.preventDefault(); } }), dc(obj, "onkeyup", this, function (e) { if ((e.keyCode == d.keys.ENTER || e.keyCode == d.keys.SPACE) && e.target === dijit._lastKeyDownNode && !e.ctrlKey && !e.shiftKey && !e.altKey && !e.metaKey) { dijit._lastKeyDownNode = null; return m(e); } })); } _43f = "onclick"; } _441.push(dc(obj, _43f, this, _440)); this._connects.push(_441); return _441; }, disconnect: function (_442) { for (var i = 0; i < this._connects.length; i++) { if (this._connects[i] == _442) { dojo.forEach(_442, dojo.disconnect); this._connects.splice(i, 1); return; } } }, subscribe: function (_443, _444) { var d = dojo, _445 = d.subscribe(_443, this, _444); this._subscribes.push(_445); return _445; }, unsubscribe: function (_446) { for (var i = 0; i < this._subscribes.length; i++) { if (this._subscribes[i] == _446) { dojo.unsubscribe(_446); this._subscribes.splice(i, 1); return; } } }, isLeftToRight: function () { return this.dir ? (this.dir == "ltr") : dojo._isBodyLtr(); }, isFocusable: function () { return this.focus && (dojo.style(this.domNode, "display") != "none"); }, placeAt: function (_447, _448) { if (_447.declaredClass && _447.addChild) { _447.addChild(this, _448); } else { dojo.place(this.domNode, _447, _448); } return this; }, _onShow: function () { this.onShow(); }, onShow: function () { }, onHide: function () { }, onClose: function () { return true; } }); })(); } if (!dojo._hasResource["dojo.date.stamp"]) { dojo._hasResource["dojo.date.stamp"] = true; dojo.provide("dojo.date.stamp"); dojo.date.stamp.fromISOString = function (_449, _44a) { if (!dojo.date.stamp._isoRegExp) { dojo.date.stamp._isoRegExp = /^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(.\d+)?)?((?:[+-](\d{2}):(\d{2}))|Z)?)?$/; } var _44b = dojo.date.stamp._isoRegExp.exec(_449), _44c = null; if (_44b) { _44b.shift(); if (_44b[1]) { _44b[1]--; } if (_44b[6]) { _44b[6] *= 1000; } if (_44a) { _44a = new Date(_44a); dojo.forEach(dojo.map(["FullYear", "Month", "Date", "Hours", "Minutes", "Seconds", "Milliseconds"], function (prop) { return _44a["get" + prop](); }), function (_44d, _44e) { _44b[_44e] = _44b[_44e] || _44d; }); } _44c = new Date(_44b[0] || 1970, _44b[1] || 0, _44b[2] || 1, _44b[3] || 0, _44b[4] || 0, _44b[5] || 0, _44b[6] || 0); if (_44b[0] < 100) { _44c.setFullYear(_44b[0] || 1970); } var _44f = 0, _450 = _44b[7] && _44b[7].charAt(0); if (_450 != "Z") { _44f = ((_44b[8] || 0) * 60) + (Number(_44b[9]) || 0); if (_450 != "-") { _44f *= -1; } } if (_450) { _44f -= _44c.getTimezoneOffset(); } if (_44f) { _44c.setTime(_44c.getTime() + _44f * 60000); } } return _44c; }; dojo.date.stamp.toISOString = function (_451, _452) { var _453 = function (n) { return (n < 10) ? "0" + n : n; }; _452 = _452 || {}; var _454 = [], _455 = _452.zulu ? "getUTC" : "get", date = ""; if (_452.selector != "time") { var year = _451[_455 + "FullYear"](); date = ["0000".substr((year + "").length) + year, _453(_451[_455 + "Month"]() + 1), _453(_451[_455 + "Date"]())].join("-"); } _454.push(date); if (_452.selector != "date") { var time = [_453(_451[_455 + "Hours"]()), _453(_451[_455 + "Minutes"]()), _453(_451[_455 + "Seconds"]())].join(":"); var _456 = _451[_455 + "Milliseconds"](); if (_452.milliseconds) { time += "." + (_456 < 100 ? "0" : "") + _453(_456); } if (_452.zulu) { time += "Z"; } else { if (_452.selector != "time") { var _457 = _451.getTimezoneOffset(); var _458 = Math.abs(_457); time += (_457 > 0 ? "-" : "+") + _453(Math.floor(_458 / 60)) + ":" + _453(_458 % 60); } } _454.push(time); } return _454.join("T"); }; } if (!dojo._hasResource["dojo.parser"]) { dojo._hasResource["dojo.parser"] = true; dojo.provide("dojo.parser"); new Date("X"); dojo.parser = new function () { var d = dojo; this._attrName = d._scopeName + "Type"; this._query = "[" + this._attrName + "]"; function _459(_45a) { if (d.isString(_45a)) { return "string"; } if (typeof _45a == "number") { return "number"; } if (typeof _45a == "boolean") { return "boolean"; } if (d.isFunction(_45a)) { return "function"; } if (d.isArray(_45a)) { return "array"; } if (_45a instanceof Date) { return "date"; } if (_45a instanceof d._Url) { return "url"; } return "object"; }; function _45b(_45c, type) { switch (type) { case "string": return _45c; case "number": return _45c.length ? Number(_45c) : NaN; case "boolean": return typeof _45c == "boolean" ? _45c : !(_45c.toLowerCase() == "false"); case "function": if (d.isFunction(_45c)) { _45c = _45c.toString(); _45c = d.trim(_45c.substring(_45c.indexOf("{") + 1, _45c.length - 1)); } try { if (_45c === "" || _45c.search(/[^\w\.]+/i) != -1) { return new Function(_45c); } else { return d.getObject(_45c, false) || new Function(_45c); } } catch (e) { return new Function(); } case "array": return _45c ? _45c.split(/\s*,\s*/) : []; case "date": switch (_45c) { case "": return new Date(""); case "now": return new Date(); default: return d.date.stamp.fromISOString(_45c); } case "url": return d.baseUrl + _45c; default: return d.fromJson(_45c); } }; var _45d = {}; dojo.connect(dojo, "extend", function () { _45d = {}; }); function _45e(_45f) { if (!_45d[_45f]) { var cls = d.getObject(_45f); if (!cls) { return null; } var _460 = cls.prototype; var _461 = {}, _462 = {}; for (var name in _460) { if (name.charAt(0) == "_") { continue; } if (name in _462) { continue; } var _463 = _460[name]; _461[name] = _459(_463); } _45d[_45f] = { cls: cls, params: _461 }; } return _45d[_45f]; }; this._functionFromScript = function (_464) { var _465 = ""; var _466 = ""; var _467 = _464.getAttribute("args"); if (_467) { d.forEach(_467.split(/\s*,\s*/), function (part, idx) { _465 += "var " + part + " = arguments[" + idx + "]; "; }); } var _468 = _464.getAttribute("with"); if (_468 && _468.length) { d.forEach(_468.split(/\s*,\s*/), function (part) { _465 += "with(" + part + "){"; _466 += "}"; }); } return new Function(_465 + _464.innerHTML + _466); }; this.instantiate = function (_469, _46a, args) { var _46b = [], dp = dojo.parser; _46a = _46a || {}; args = args || {}; d.forEach(_469, function (obj) { if (!obj) { return; } var node, type, _46c, _46d, _46e; if (obj.node) { node = obj.node; type = obj.type; _46c = obj.clsInfo || (type && _45e(type)); _46d = _46c && _46c.cls; _46e = obj.scripts; } else { node = obj; type = dp._attrName in _46a ? _46a[dp._attrName] : node.getAttribute(dp._attrName); _46c = type && _45e(type); _46d = _46c && _46c.cls; _46e = (_46d && (_46d._noScript || _46d.prototype._noScript) ? [] : d.query("> script[type^='dojo/']", node)); } if (!_46c) { throw new Error("Could not load class '" + type); } var _46f = {}, _470 = node.attributes; if (args.defaults) { dojo.mixin(_46f, args.defaults); } if (obj.inherited) { dojo.mixin(_46f, obj.inherited); } for (var name in _46c.params) { var item = name in _46a ? { value: _46a[name], specified: true} : _470.getNamedItem(name); if (!item || (!item.specified && (!dojo.isIE || name.toLowerCase() != "value"))) { continue; } var _471 = item.value; switch (name) { case "class": _471 = "className" in _46a ? _46a.className : node.className; break; case "style": _471 = "style" in _46a ? _46a.style : (node.style && node.style.cssText); } var _472 = _46c.params[name]; if (typeof _471 == "string") { _46f[name] = _45b(_471, _472); } else { _46f[name] = _471; } } var _473 = [], _474 = []; d.forEach(_46e, function (_475) { node.removeChild(_475); var _476 = _475.getAttribute("event"), type = _475.getAttribute("type"), nf = d.parser._functionFromScript(_475); if (_476) { if (type == "dojo/connect") { _473.push({ event: _476, func: nf }); } else { _46f[_476] = nf; } } else { _474.push(nf); } }); var _477 = _46d.markupFactory || _46d.prototype && _46d.prototype.markupFactory; var _478 = _477 ? _477(_46f, node, _46d) : new _46d(_46f, node); _46b.push(_478); var _479 = node.getAttribute("jsId"); if (_479) { d.setObject(_479, _478); } d.forEach(_473, function (_47a) { d.connect(_478, _47a.event, null, _47a.func); }); d.forEach(_474, function (func) { func.call(_478); }); }); if (!_46a._started) { d.forEach(_46b, function (_47b) { if (!args.noStart && _47b && _47b.startup && !_47b._started && (!_47b.getParent || !_47b.getParent())) { _47b.startup(); } }); } return _46b; }; this.parse = function (_47c, args) { var root; if (!args && _47c && _47c.rootNode) { args = _47c; root = args.rootNode; } else { root = _47c; } var _47d = this._attrName; function scan(_47e, list) { var _47f = dojo.clone(_47e.inherited); dojo.forEach(["dir", "lang"], function (name) { var val = _47e.node.getAttribute(name); if (val) { _47f[name] = val; } }); var _480 = _47e.scripts; var _481 = !_47e.clsInfo || !_47e.clsInfo.cls.prototype.stopParser; for (var _482 = _47e.node.firstChild; _482; _482 = _482.nextSibling) { if (_482.nodeType == 1) { var type = _481 && _482.getAttribute(_47d); if (type) { var _483 = { "type": type, clsInfo: _45e(type), node: _482, scripts: [], inherited: _47f }; list.push(_483); scan(_483, list); } else { if (_480 && _482.nodeName.toLowerCase() == "script") { type = _482.getAttribute("type"); if (type && /^dojo\//i.test(type)) { _480.push(_482); } } else { if (_481) { scan({ node: _482, inherited: _47f }, list); } } } } } }; var list = []; scan({ node: root ? dojo.byId(root) : dojo.body(), inherited: (args && args.inherited) || { dir: dojo._isBodyLtr() ? "ltr" : "rtl"} }, list); return this.instantiate(list, null, args); }; } (); (function () { var _484 = function () { if (dojo.config.parseOnLoad) { dojo.parser.parse(); } }; if (dojo.exists("dijit.wai.onload") && (dijit.wai.onload === dojo._loaders[0])) { dojo._loaders.splice(1, 0, _484); } else { dojo._loaders.unshift(_484); } })(); } if (!dojo._hasResource["dojo.cache"]) { dojo._hasResource["dojo.cache"] = true; dojo.provide("dojo.cache"); (function () { var _485 = {}; dojo.cache = function (_486, url, _487) { if (typeof _486 == "string") { var _488 = dojo.moduleUrl(_486, url); } else { _488 = _486; _487 = url; } var key = _488.toString(); var val = _487; if (_487 != undefined && !dojo.isString(_487)) { val = ("value" in _487 ? _487.value : undefined); } var _489 = _487 && _487.sanitize ? true : false; if (typeof val == "string") { val = _485[key] = _489 ? dojo.cache._sanitize(val) : val; } else { if (val === null) { delete _485[key]; } else { if (!(key in _485)) { val = dojo._getText(key); _485[key] = _489 ? dojo.cache._sanitize(val) : val; } val = _485[key]; } } return val; }; dojo.cache._sanitize = function (val) { if (val) { val = val.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im, ""); var _48a = val.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im); if (_48a) { val = _48a[1]; } } else { val = ""; } return val; }; })(); } if (!dojo._hasResource["dijit._Templated"]) { dojo._hasResource["dijit._Templated"] = true; dojo.provide("dijit._Templated"); dojo.declare("dijit._Templated", null, { templateString: null, templatePath: null, widgetsInTemplate: false, _skipNodeCache: false, _earlyTemplatedStartup: false, constructor: function () { this._attachPoints = []; }, _stringRepl: function (tmpl) { var _48b = this.declaredClass, _48c = this; return dojo.string.substitute(tmpl, this, function (_48d, key) { if (key.charAt(0) == "!") { _48d = dojo.getObject(key.substr(1), false, _48c); } if (typeof _48d == "undefined") { throw new Error(_48b + " template:" + key); } if (_48d == null) { return ""; } return key.charAt(0) == "!" ? _48d : _48d.toString().replace(/"/g, "&quot;"); }, this); }, buildRendering: function () { var _48e = dijit._Templated.getCachedTemplate(this.templatePath, this.templateString, this._skipNodeCache); var node; if (dojo.isString(_48e)) { node = dojo._toDom(this._stringRepl(_48e)); if (node.nodeType != 1) { throw new Error("Invalid template: " + _48e); } } else { node = _48e.cloneNode(true); } this.domNode = node; this._attachTemplateNodes(node); if (this.widgetsInTemplate) { var _48f = dojo.parser, qry, attr; if (_48f._query != "[dojoType]") { qry = _48f._query; attr = _48f._attrName; _48f._query = "[dojoType]"; _48f._attrName = "dojoType"; } var cw = (this._startupWidgets = dojo.parser.parse(node, { noStart: !this._earlyTemplatedStartup, inherited: { dir: this.dir, lang: this.lang} })); if (qry) { _48f._query = qry; _48f._attrName = attr; } this._supportingWidgets = dijit.findWidgets(node); this._attachTemplateNodes(cw, function (n, p) { return n[p]; }); } this._fillContent(this.srcNodeRef); }, _fillContent: function (_490) { var dest = this.containerNode; if (_490 && dest) { while (_490.hasChildNodes()) { dest.appendChild(_490.firstChild); } } }, _attachTemplateNodes: function (_491, _492) { _492 = _492 || function (n, p) { return n.getAttribute(p); }; var _493 = dojo.isArray(_491) ? _491 : (_491.all || _491.getElementsByTagName("*")); var x = dojo.isArray(_491) ? 0 : -1; for (; x < _493.length; x++) { var _494 = (x == -1) ? _491 : _493[x]; if (this.widgetsInTemplate && _492(_494, "dojoType")) { continue; } var _495 = _492(_494, "dojoAttachPoint"); if (_495) { var _496, _497 = _495.split(/\s*,\s*/); while ((_496 = _497.shift())) { if (dojo.isArray(this[_496])) { this[_496].push(_494); } else { this[_496] = _494; } this._attachPoints.push(_496); } } var _498 = _492(_494, "dojoAttachEvent"); if (_498) { var _499, _49a = _498.split(/\s*,\s*/); var trim = dojo.trim; while ((_499 = _49a.shift())) { if (_499) { var _49b = null; if (_499.indexOf(":") != -1) { var _49c = _499.split(":"); _499 = trim(_49c[0]); _49b = trim(_49c[1]); } else { _499 = trim(_499); } if (!_49b) { _49b = _499; } this.connect(_494, _499, _49b); } } } var role = _492(_494, "waiRole"); if (role) { dijit.setWaiRole(_494, role); } var _49d = _492(_494, "waiState"); if (_49d) { dojo.forEach(_49d.split(/\s*,\s*/), function (_49e) { if (_49e.indexOf("-") != -1) { var pair = _49e.split("-"); dijit.setWaiState(_494, pair[0], pair[1]); } }); } } }, startup: function () { dojo.forEach(this._startupWidgets, function (w) { if (w && !w._started && w.startup) { w.startup(); } }); this.inherited(arguments); }, destroyRendering: function () { dojo.forEach(this._attachPoints, function (_49f) { delete this[_49f]; }, this); this._attachPoints = []; this.inherited(arguments); } }); dijit._Templated._templateCache = {}; dijit._Templated.getCachedTemplate = function (_4a0, _4a1, _4a2) { var _4a3 = dijit._Templated._templateCache; var key = _4a1 || _4a0; var _4a4 = _4a3[key]; if (_4a4) { try { if (!_4a4.ownerDocument || _4a4.ownerDocument == dojo.doc) { return _4a4; } } catch (e) { } dojo.destroy(_4a4); } if (!_4a1) { _4a1 = dojo.cache(_4a0, { sanitize: true }); } _4a1 = dojo.string.trim(_4a1); if (_4a2 || _4a1.match(/\$\{([^\}]+)\}/g)) { return (_4a3[key] = _4a1); } else { var node = dojo._toDom(_4a1); if (node.nodeType != 1) { throw new Error("Invalid template: " + _4a1); } return (_4a3[key] = node); } }; if (dojo.isIE) { dojo.addOnWindowUnload(function () { var _4a5 = dijit._Templated._templateCache; for (var key in _4a5) { var _4a6 = _4a5[key]; if (typeof _4a6 == "object") { dojo.destroy(_4a6); } delete _4a5[key]; } }); } dojo.extend(dijit._Widget, { dojoAttachEvent: "", dojoAttachPoint: "", waiRole: "", waiState: "" }); } if (!dojo._hasResource["dijit._Container"]) { dojo._hasResource["dijit._Container"] = true; dojo.provide("dijit._Container"); dojo.declare("dijit._Container", null, { isContainer: true, buildRendering: function () { this.inherited(arguments); if (!this.containerNode) { this.containerNode = this.domNode; } }, addChild: function (_4a7, _4a8) { var _4a9 = this.containerNode; if (_4a8 && typeof _4a8 == "number") { var _4aa = this.getChildren(); if (_4aa && _4aa.length >= _4a8) { _4a9 = _4aa[_4a8 - 1].domNode; _4a8 = "after"; } } dojo.place(_4a7.domNode, _4a9, _4a8); if (this._started && !_4a7._started) { _4a7.startup(); } }, removeChild: function (_4ab) { if (typeof _4ab == "number" && _4ab > 0) { _4ab = this.getChildren()[_4ab]; } if (_4ab) { var node = _4ab.domNode; if (node && node.parentNode) { node.parentNode.removeChild(node); } } }, hasChildren: function () { return this.getChildren().length > 0; }, destroyDescendants: function (_4ac) { dojo.forEach(this.getChildren(), function (_4ad) { _4ad.destroyRecursive(_4ac); }); }, _getSiblingOfChild: function (_4ae, dir) { var node = _4ae.domNode, _4af = (dir > 0 ? "nextSibling" : "previousSibling"); do { node = node[_4af]; } while (node && (node.nodeType != 1 || !dijit.byNode(node))); return node && dijit.byNode(node); }, getIndexOfChild: function (_4b0) { return dojo.indexOf(this.getChildren(), _4b0); }, startup: function () { if (this._started) { return; } dojo.forEach(this.getChildren(), function (_4b1) { _4b1.startup(); }); this.inherited(arguments); } }); } if (!dojo._hasResource["esri.dijit.InfoWindow"]) { dojo._hasResource["esri.dijit.InfoWindow"] = true; dojo.provide("esri.dijit.InfoWindow"); dojo.declare("esri.dijit.InfoWindow", [dijit._Widget, dijit._Templated, dijit._Container], { isContainer: true, templateString: "<div id=\"${id}.infowindow\" class=\"infowindow\" dojoAttachPoint=\"_infowindow\"\r\n  ><div style=\"position:relative;\"\r\n    ><div class=\"window\" dojoAttachPoint=\"_window\"\r\n      ><div class=\"top\"\r\n        ><div class=\"left\" dojoAttachPoint=\"_topleft\"><div class=\"sprite\"></div></div\r\n    \t\t><div class=\"right\" dojoAttachPoint=\"_topright\"\r\n    \t\t\t><div class=\"sprite\"></div\r\n    \t\t\t><div class=\"user\" dojoAttachPoint=\"_user\"\r\n    \t\t\t  ><div class=\"titlebar\" dojoAttachPoint=\"_titlebar\"\r\n    \t\t\t    ><a class=\"hide\" dojoAttachPoint=\"_hide\" dojoAttachEvent=\"onclick:hide\"><div class=\"sprite\"></div></a\r\n              ><div class=\"title\" dojoAttachPoint=\"_title\">${title}</div\r\n    \t\t\t  ></div\r\n            ><div class=\"border\" dojoAttachPoint=\"_border\"></div\r\n    \t\t\t  ><div class=\"layout content\" dojoAttachPoint=\"_content, containerNode\"\r\n    \t\t\t  ></div\r\n    \t\t\t></div\r\n    \t\t></div\r\n        ><div class=\"bottom\"\r\n          ><div class=\"left\" dojoAttachPoint=\"_bottomleft\"><div class=\"sprite\"></div></div\r\n\t\t      ><div class=\"right\" dojoAttachPoint=\"_bottomright\"><div class=\"sprite\"></div></div\r\n        ></div\r\n      ></div\r\n    ></div\r\n    ><div class=\"pointer\" dojoAttachPoint=\"_pointer\"><div dojoAttachPoint=\"_sprite\" class=\"sprite\"></div></div\r\n  ></div\r\n></div>\r\n", anchor: "upperright", fixedAnchor: null, coords: null, isShowing: true, isContentShowing: true, isTitleBarShowing: true, width: 250, height: 150, title: "Info Window", startup: function () { this._ANCHORS = [esri.dijit.InfoWindow.ANCHOR_UPPERRIGHT, esri.dijit.InfoWindow.ANCHOR_LOWERRIGHT, esri.dijit.InfoWindow.ANCHOR_LOWERLEFT, esri.dijit.InfoWindow.ANCHOR_UPPERLEFT]; this._anchorsLength = this._ANCHORS.length; if (dojo.isIE < 7) { var url = dojo.getComputedStyle(this._sprite).backgroundImage.replace(/url\(\"/i, "").replace(/\"\)/, ""), _4b2 = "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled='true', sizingMethod='crop', src='" + url + "')"; var s = dojo.create("div", null, dojo.body()); dojo.style(s, { width: "1px", height: "1px", display: "none", backgroundImage: "none", filter: _4b2 }); var t = setTimeout(function () { dojo.destroy(s); clearTimeout(t); t = s = null; }, 100); dojo.query(".sprite", this.domNode).forEach(function (n) { n.style.backgroundImage = "none"; n.style.filter = _4b2; }); } this.resize(this.width, this.height); this.hide(); }, resize: function (_4b3, _4b4) { if (!_4b3 || !_4b4) { return; } var _4b5 = dojo.style; _4b5(this._topleft, { height: _4b4 + "px", marginLeft: _4b3 + "px" }); _4b5(this._topright, { width: _4b3 + "px", height: _4b4 + "px" }); _4b5(this._user, "width", (_4b3 - 8) + "px"); _4b5(this._hide, "marginLeft", (_4b3 - 22) + "px"); _4b5(this._title, "width", (_4b3 - 25) + "px"); _4b5(this._content, "height", (_4b4 - 37) + "px"); _4b5(this._bottomleft, { marginLeft: _4b3 + "px", marginTop: _4b4 + "px" }); _4b5(this._bottomright, { width: (_4b3 - 5) + "px", marginTop: _4b4 + "px" }); this.width = _4b3; this.height = _4b4; if (this.coords) { this._adjustPosition(this.coords, this.anchor); } this.onResize(_4b3, _4b4); }, _adjustPosition: function (_4b6, _4b7) { var _4b8 = dojo.style; _4b8(this._infowindow, { left: _4b6.x + "px", top: _4b6.y + "px" }); if (_4b7 === esri.dijit.InfoWindow.ANCHOR_UPPERLEFT) { _4b8(this._window, { left: null, right: (this.width + 18) + "px", top: null, bottom: (this.height + 50) + "px" }); } else { if (_4b7 === esri.dijit.InfoWindow.ANCHOR_UPPERRIGHT) { _4b8(this._window, { left: "6px", right: null, top: null, bottom: (this.height + 50) + "px" }); } else { if (_4b7 === esri.dijit.InfoWindow.ANCHOR_LOWERRIGHT) { _4b8(this._window, { left: "6px", right: null, top: "43px", bottom: null }); } else { if (_4b7 === esri.dijit.InfoWindow.ANCHOR_LOWERLEFT) { _4b8(this._window, { left: null, right: (this.width + 18) + "px", top: "43px", bottom: null }); } } } } }, show: function (_4b9, _4ba) { this.coords = _4b9; if (!_4ba || dojo.indexOf(this._ANCHORS, _4ba) == -1) { _4ba = this._ANCHORS[0]; } dojo.removeClass(this._pointer, this.anchor); _4ba = (this.anchor = this.fixedAnchor || _4ba); this._adjustPosition(_4b9, _4ba); dojo.addClass(this._pointer, _4ba); esri.show(this.domNode); this.isShowing = true; if (!arguments[2]) { this.onShow(); } }, hide: function (evt) { esri.hide(this.domNode); this.isShowing = false; if (!arguments[1]) { this.onHide(); } }, showTitleBar: function () { esri.show(this._titlebar); esri.show(this._border); this.isTitleBarShowing = true; }, hideTitleBar: function () { esri.hide(this._titlebar); esri.hide(this._border); this.isTitleBarShowing = false; }, showContent: function () { esri.show(this._content); esri.show(this._border); this.isContentShowing = true; }, hideContent: function () { esri.hide(this._content); esri.hide(this._border); this.isContentShowing = false; }, move: function (_4bb, _4bc) { if (_4bc) { _4bb = this.coords.offset(_4bb.x, _4bb.y); } else { this.coords = _4bb; } dojo.style(this._infowindow, { left: _4bb.x + "px", top: _4bb.y + "px" }); }, setFixedAnchor: function (_4bd) { if (_4bd != null && dojo.indexOf(this._ANCHORS, _4bd) == -1) { return; } this.fixedAnchor = _4bd; if (this.isShowing) { this.show(this.coords, _4bd); } this.onAnchorChange(_4bd); }, setTitle: function (_4be) { this.title = (this._title.innerHTML = _4be); return this; }, setContent: function (_4bf) { if (dojo.isString(_4bf)) { this._content.innerHTML = _4bf; } else { dojox.xml.parser.replaceChildren(this._content, _4bf); } return this; }, onShow: function () { }, onHide: function () { }, onResize: function () { }, onAnchorChange: function () { } }); dojo.mixin(esri.dijit.InfoWindow, { ANCHOR_UPPERRIGHT: "upperright", ANCHOR_LOWERRIGHT: "lowerright", ANCHOR_LOWERLEFT: "lowerleft", ANCHOR_UPPERLEFT: "upperleft" }); } if (!dojo._hasResource["esri._coremap"]) { dojo._hasResource["esri._coremap"] = true; dojo.provide("esri._coremap"); dojo.declare("esri._CoreMap", null, (function () { var _4c0 = esri.geometry.toMapPoint, _4c1 = esri.geometry.toScreenPoint, dc = dojo.connect, ddc = dojo.disconnect, dh = dojo.hitch, ds = dojo.style, iOf = dojo.indexOf, _4c2 = dojo.mixin, _4c3 = esri.geometry.Point, _4c4 = esri.geometry.Extent, _4c5 = esri.layers.GraphicsLayer, Rect = esri.geometry.Rect, uid = 0, _4c6 = esri.config.defaults.map; var _4c7 = 1000000, _4c8 = 0.75, _4c9 = 0.25, _4ca = 3, _4cb = 20, _4cc = 40; function _4cd(_4ce, _4cf) { var lods = _4ce.lods; lods.sort(function (l1, l2) { if (l1.scale > l2.scale) { return -1; } else { if (l1.scale < l2.scale) { return 1; } } return 0; }); var _4d0 = []; lods = dojo.filter(lods, function (l) { if (iOf(_4d0, l.scale) === -1) { _4d0.push(l.scale); return true; } }); var pl = (_4cf.lods = []), l; dojo.forEach(lods, function (lod, _4d1) { l = (pl[_4d1] = new esri.layers.LOD(lod)); l.level = _4d1; }); _4cf.tileInfo = new esri.layers.TileInfo(_4c2(_4ce, { lods: pl })); }; return { constructor: function (_4d2, _4d3) { _4c2(this, { _internalLayerIds: [], _layers: [], _layerDivs: [], _layerSize: 0, _connects: [], _infoWindowIsShowing: false }); _4c2(this, { _infoWindowCoords: null, _iwPan_connect: null, _iwZoomStart_connect: null, _iwExtentChange_connect: null, _zoomAnimDiv: null, _zoomAnim: null, _layersDiv: null, _firstLayerId: null, _delta: null, _gc: null, _cursor: null, _ratioW: 1, _ratioH: 1, _params: null }); _4c2(this, { cursor: null, layerIds: [], graphicsLayerIds: [], graphics: null, loaded: false }); _4c2(this, { __panning: false, __zooming: false, __container: null, __root: null, __LOD: null, __tileInfo: null, __visibleRect: null, __visibleDelta: null }); var cont = (this.container = dojo.byId(_4d2)); var id = (this.id = dojo.attr(cont, "id") || dijit.getUniqueId(this.declaredClass)); dojo.addClass(cont, "map"); var box = dojo.contentBox(cont), dac = dojo.addClass, dcr = dojo.create; this.position = new _4c3(0, 0); this._reposition(); var _4d4 = (this.width = (box.w || _4c6.width)); var _4d5 = (this.height = box.h || _4c6.height); if (box.w === 0) { ds(cont, "width", _4d4 + "px"); } if (box.h === 0) { ds(cont, "height", _4d5 + "px"); } var _4d6 = (this.__root = dcr("div", { id: _4d2 + "_root", style: { width: _4d4 + "px", height: _4d5 + "px"} })); dac(_4d6, "container"); var _4d7 = (this.__container = dcr("div", { id: _4d2 + "_container" }, _4d6)); dac(_4d7, "container"); cont.appendChild(_4d6); var _4d8 = (this._params = _4c2({ slider: true, nav: false, extent: null, layer: null, scales: null, showInfoWindowOnClick: true, displayGraphicsOnPan: true, lods: null, tileInfo: null, fitExtent: false }, _4d3 || {})); if (_4d8.lods) { _4cd({ rows: 512, cols: 512, dpi: 96, format: "JPEG", compressionQuality: 75, origin: { x: -180, y: 90 }, spatialReference: { wkid: 4326 }, lods: _4d8.lods }, _4d8); this.__tileInfo = _4d8.tileInfo; } var ext = (this.extent = _4d8.extent); this.spatialReference = (ext && ext.spatialReference) ? ext.spatialReference : null; this.__visibleRect = new Rect(0, 0, _4d4, _4d5); this.__visibleDelta = new Rect(0, 0, _4d4, _4d5); var _4d9 = (this._layersDiv = dcr("div", { id: id + "_layers" })); dac(_4d9, "layersDiv"); _4d7.appendChild(_4d9); this._zoomAnimDiv = dcr("div", { style: { position: "absolute"} }); var _4da = (this.infoWindow = new esri.dijit.InfoWindow({ title: "", id: id + "_infowindow" }, dcr("div", null, _4d6))); _4da.startup(); _4da.hide(); ds(_4da.domNode, "zIndex", _4cc); this._connects.push(dc(_4da, "onShow", this, "_infoWindowShowHandler"), dc(_4da, "onHide", this, "_infoWindowHideHandler")); this._zoomStartHandler = dh(this, this._zoomStartHandler); this._zoomingHandler = dh(this, this._zoomingHandler); this._zoomEndHandler = dh(this, this._zoomEndHandler); this._panningHandler = dh(this, this._panningHandler); this._panEndHandler = dh(this, this._panEndHandler); this._fixedPan = dh(this, this._fixedPan); dojo.addOnWindowUnload(this, this.destroy); }, _cleanUp: function () { this.onUnload(this); var iw = this.infoWindow; if (iw) { iw.hide(); iw.destroy(); } var cons = this._connects; for (var i = cons.length; i >= 0; i--) { ddc(cons[i]); delete cons[i]; } ddc(this._tsTimeExtentChange_connect); dojo.destroy(this.__root); this.__root = null; }, _addLayer: function (_4db, _4dc, _4dd) { var id = (_4db.id = _4db.id || (_4db instanceof _4c5 ? _4c6.graphicsLayerNamePrefix : _4c6.layerNamePrefix) + (uid++)); this._layers[id] = _4db; var i; if (_4dc == this.layerIds || _4dc == this.graphicsLayerIds) { i = this._layerSize; this._layerSize++; } _4dd = (_4dd === undefined || _4dd < 0 || _4dd > _4dc.length) ? _4dc.length : _4dd; if (i === 0) { this._firstLayerId = id; } _4dc.splice(_4dd, 0, id); var _4de = dh(this, this._addLayerHandler), self = this, _4df = this._connects, _4e0 = function () { if (_4db.loaded) { _4de(_4db); } else { self[id + "_addtoken_load"] = dc(_4db, "onLoad", self, "_addLayerHandler"); self[id + "_addtoken_err"] = dc(_4db, "onError", self, function (_4e1) { _4de(_4db, _4e1, _4dc); }); } }; if (this.loaded || i === 0 || _4db.loaded) { _4e0(); } else { _4df.push(dc(this, "onLoad", _4e0)); } return _4db; }, _addLayerHandler: function (_4e2, _4e3, _4e4) { var id = this.id, _4e5 = _4e2.id, _4e6 = iOf(_4e2 instanceof _4c5 ? this.graphicsLayerIds : this.layerIds, _4e5), _4e7 = _4e6, _4e8 = false, _4e9 = this._params; ddc(this[_4e5 + "_addtoken_load"]); ddc(this[_4e5 + "_addtoken_err"]); if (_4e3) { delete this._layers[_4e5]; if (_4e6 !== -1) { _4e4.splice(_4e6, 1); this.onLayerAddResult(_4e2, _4e3); } return; } if (_4e6 == -1) { _4e6 = iOf(this._internalLayerIds, _4e5); _4e7 = _4cb + _4e6; _4e8 = true; } if (_4e2 instanceof _4c5) { var _4ea = _4e2._setMap(this, this._gc._surface); _4ea.id = id + "_" + _4e5; this._layerDivs[_4e5] = _4ea; this._reorderLayers(this.graphicsLayerIds); if (_4e9.showInfoWindowOnClick) { this._connects.push(dc(_4e2, "onClick", this, "_gClickHandler")); } } else { var _4eb = _4e2._setMap(this, this._layersDiv, _4e7, this.__LOD); _4eb.id = id + "_" + _4e5; ds(_4eb, "zIndex", _4e7); this._layerDivs[_4e5] = _4eb; this._reorderLayers(this.layerIds); if (!_4e8 && _4e2.declaredClass.indexOf("VETiledLayer") !== -1) { this._onBingLayerAdd(_4e2); } } if (_4e5 === this._firstLayerId) { this.spatialReference = this.spatialReference || _4e2.spatialReference; if (!this.__tileInfo && _4e2.tileInfo) { _4cd(_4c2({}, _4e2.tileInfo), _4e9); this.__tileInfo = _4e9.tileInfo; } _4e9.units = _4e2.units; this._gc = new esri.layers._GraphicsContainer(); var gc = this._gc._setMap(this, this._layersDiv); gc.id = id + "_gc"; ds(gc, "zIndex", _4cb); this.graphics = new _4c5({ id: id + "_graphics", displayOnPan: _4e9.displayGraphicsOnPan }); this._addLayer(this.graphics, this._internalLayerIds, _4cb); } if (_4e2 === this.graphics) { if (this.extent) { var x = this._fixExtent(this.extent, _4e9.fitExtent); this.extent = x.extent; this.__LOD = x.lod; } var fli = this._firstLayerId; this._firstLayerId = null; this.__setExtent(this.extent ? this.extent : new _4c4(this._layers[fli].initialExtent), null, null, _4e9.fitExtent); this.loaded = true; this.onLoad(this); } if (!_4e8) { this.onLayerAdd(_4e2); this.onLayerAddResult(_4e2); } ddc(this[_4e5 + "_addLayerHandler_connect"]); }, _reorderLayers: function (_4ec) { var _4ed = this.onLayerReorder, djp = dojo.place, _4ee = this._layerDivs, _4ef = this._layers, gcES = this._gc ? this._gc._surface.getEventSource() : null; if (_4ec == this.graphicsLayerIds) { dojo.forEach(_4ec, function (id, i) { var _4f0 = _4ee[id]; if (_4f0) { djp(_4f0.getEventSource(), gcES, i); _4ed(_4ef[id], i); } }); } else { var g = this.graphics, gId = g ? g.id : null, _4f1 = this._layersDiv, _4f2; dojo.forEach(_4ec, function (id, i) { _4f2 = _4ee[id]; if (id !== gId && _4f2) { djp(_4f2, _4f1, i); ds(_4f2, "zIndex", i); _4ed(_4ef[id], i); } }); if (gcES) { gcES = dojo.isIE ? gcES.parentNode : gcES; djp(gcES, gcES.parentNode, _4ec.length); } } this.onLayersReordered([].concat(_4ec)); }, _zoomStartHandler: function () { this.__zoomStart(this._zoomAnimDiv.startingExtent, this._zoomAnimDiv.anchor); }, _zoomingHandler: function (rect) { var rl = parseFloat(rect.left), rt = parseFloat(rect.top), _4f3 = new _4c4(rl, rt - parseFloat(rect.height), rl + parseFloat(rect.width), rt, this.spatialReference), _4f4 = this.extent.getWidth() / _4f3.getWidth(); this.__zoom(_4f3, _4f4, this._zoomAnimDiv.anchor); }, _zoomEndHandler: function () { var _4f5 = this._zoomAnimDiv, _4f6 = _4f5.extent, _4f7 = this.extent.getWidth() / _4f6.getWidth(); var _4f8 = _4f5.anchor, _4f9 = _4f5.newLod, _4fa = _4f5.levelChange; _4f5.extent = _4f5.anchor = _4f5.levelChange = _4f5.startingExtent = _4f5.newLod = this._delta = this._zoomAnim = null; this.__zoomEnd(_4f6, _4f7, _4f8, _4f9, _4fa); }, _panningHandler: function (_4fb) { var d = new _4c3(parseFloat(_4fb.left), parseFloat(_4fb.top)), dm = this.toMap(d); this.onPan(this.extent.offset(dm.x, dm.y), d); }, _panEndHandler: function () { this.__panning = false; var _4fc = Math.round, _4fd = this._delta.offset(-_4fc(this.width / 2), -_4fc(this.height / 2)), dx = _4fd.x, dy = _4fd.y, _4fe = this.__visibleRect, _4ff = this.__visibleDelta; _4fe.x += -dx; _4fe.y += -dy; _4ff.x += -dx; _4ff.y += -dy; ds(this._zoomAnimDiv, { left: "0px", top: "0px" }); var _500 = this.extent, rw = this._ratioW, rh = this._ratioH; _500 = (this.extent = new _4c4(_500.xmin + (dx / rw), _500.ymin - (dy / rh), _500.xmax + (dx / rw), _500.ymax - (dy / rh), this.spatialReference)); _4fd.setX(-_4fd.x); _4fd.setY(-_4fd.y); this._delta = null; this.onPanEnd(_500, _4fd); this.onExtentChange(_500, _4fd, false, this.__LOD); }, _fixExtent: function (_501, fit) { var _502 = this._reshapeExtent(_501), _503 = 1 + _4c9; while (fit === true && (_502.extent.getWidth() < _501.getWidth() || _502.extent.getHeight() < _501.getHeight()) && _502.lod.level > 0 && _503 <= _4ca) { _502 = this._reshapeExtent(_501.expand(_503)); _503 += _4c9; } return _502; }, _reshapeExtent: function (_504) { var w = _504.getWidth(), h = _504.getHeight(), r = w / h, _505 = this.width / this.height, dw = 0, dh = 0; if (this.width > this.height) { if (w > h) { if (_505 > r) { dw = (h * _505) - w; } else { dh = (w / _505) - h; } } else { if (w < h) { dw = (h * _505) - w; } else { dw = (h * _505) - w; } } } else { if (this.width < this.height) { if (w > h) { dh = (w / _505) - h; } else { if (w < h) { if (_505 > r) { dh = (w / _505) - h; } else { dw = (h * _505) - w; } } else { dh = (w / _505) - h; } } } else { if (w < h) { dw = h - w; } else { if (w > h) { dh = (w / _505) - h; } } } } if (dw) { _504.xmin -= dw / 2; _504.xmax += dw / 2; } if (dh) { _504.ymin -= dh / 2; _504.ymax += dh / 2; } return this._getAdjustedExtent(_504); }, _getAdjustedExtent: function (_506) { if (this.__tileInfo) { return esri.TileUtils.getCandidateTileInfo(this, this.__tileInfo, _506); } else { return { extent: _506 }; } }, _panTo: function (_507) { var ewd = this.extent.getWidth(), eht = this.extent.getHeight(), xmin = _507.x - (ewd / 2), xmax = xmin + ewd, ymin = _507.y - (eht / 2), ymax = ymin + eht; this.__setExtent(new _4c4(xmin, ymin, xmax, ymax)); }, _fixedPan: function (dx, dy) { this._panTo(this.toMap(new _4c3((this.width / 2) + dx, (this.height / 2) + dy))); }, _gClickHandler: function (evt) { var g = evt.graphic; if (g.infoTemplate) { dojo.stopEvent(evt); this._showInfoWindow(g, evt.mapPoint); } }, _onBingLayerAdd: function (_508) { this["__" + _508.id + "_vis_connect"] = dojo.connect(_508, "onVisibilityChange", this, "_toggleBingLogo"); this._toggleBingLogo(_508.visible); }, _onBingLayerRemove: function (_509) { dojo.disconnect(this["__" + _509.id + "_vis_connect"]); delete this["__" + _509.id + "_vis_connect"]; var _50a = this.layerIds; var _50b = dojo.some(_50a, function (_50c) { var _50d = this._layers[_50c]; return _50d && _50d.visible && _50d.declaredClass.indexOf("VETiledLayer") !== -1; }, this); this._toggleBingLogo(_50b); }, _toggleBingLogo: function (_50e) { if (_50e && !this._bingLogo) { var _50f = null; if (dojo.isIE === 6) { _50f = { filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled='true', sizingMethod='crop', src='" + dojo.moduleUrl("esri", "../../images/map/logo-med.png") + "')" }; } var _510 = this._bingLogo = dojo.create("div", _50f || null, this.__root); dojo.addClass(_510, "bingLogo-lg"); } else { if (!_50e && this._bingLogo) { dojo.destroy(this._bingLogo); delete this._bingLogo; } } }, _infoWindowShowHandler: function () { this._infoWindowIsShowing = true; if (!this._iwPan_connect) { this._iwPan_connect = dc(this, "onPan", this, "_infoWindowPanHandler"); this._iwZoomStart_connect = dc(this, "onZoomStart", this, "_infoWindowZoomStartHandler"); ddc(this._iwExtentChange_connect); this._iwExtentChange_connect = dc(this, "onExtentChange", this, "_infoWindowExtentChangeHandler"); } }, _infoWindowHideHandler: function () { this._infoWindowIsShowing = false; ddc(this._iwPan_connect); ddc(this._iwZoomStart_connect); ddc(this._iwExtentChange_connect); this._iwPan_connect = this._iwZoomStart_connect = this._iwExtentChange_connect = null; }, _infoWindowPanHandler: function (_511, _512) { this.infoWindow.move(_512, true); }, _infoWindowZoomStartHandler: function () { this.infoWindow.hide(null, true); this._infoWindowCoords = this.toMap(new _4c3(this.infoWindow.coords)); this._infoWindowIsShowing = true; }, _infoWindowExtentChangeHandler: function (_513, _514, _515) { if (this._infoWindowIsShowing) { var _516; if (_515) { _516 = this.toScreen(this._infoWindowCoords); } else { _516 = this.infoWindow.coords.offset(_514.x, _514.y); } this.infoWindow.show(_516, this.getInfoWindowAnchor(_516), true); } }, _showInfoWindow: function (_517, mp) { var git = _517.infoTemplate; if (git) { var sp = this.toScreen(mp), iw = this.infoWindow; iw.hide(); iw.setTitle(_517.getTitle()).setContent(_517.getContent()); iw.show(sp, this.getInfoWindowAnchor(sp)); } }, __panStart: function (x, y) { this.__panning = true; this.onPanStart(this.extent, new _4c3(x, y)); }, __pan: function (dx, dy) { var _518 = this.extent, rw = this._ratioW, rh = this._ratioH; this.onPan(new _4c4(_518.xmin - (dx / rw), _518.ymin + (dy / rh), _518.xmax - (dx / rw), _518.ymax + (dy / rh), this.spatialReference), new _4c3(dx, dy)); }, __panEnd: function (dx, dy) { var _519 = this.__visibleRect, _51a = this.__visibleDelta; _519.x += dx; _519.y += dy; _51a.x += dx; _51a.y += dy; var d = new _4c3(dx, dy), _51b = this.extent, rw = this._ratioW, rh = this._ratioH; _51b = (this.extent = new _4c4(_51b.xmin - (dx / rw), _51b.ymin + (dy / rh), _51b.xmax - (dx / rw), _51b.ymax + (dy / rh), this.spatialReference)); this.__panning = false; this.onPanEnd(_51b, d); this.onExtentChange(_51b, d, false, this.__LOD); }, __zoomStart: function (_51c, _51d) { this.__zooming = true; this.onZoomStart(_51c, 1, _51d, this.__LOD ? this.__LOD.level : null); }, __zoom: function (_51e, _51f, _520) { this.onZoom(_51e, _51f, _520); }, __zoomEnd: function (_521, _522, _523, lod, _524) { ds(this._layersDiv, { left: "0px", top: "0px" }); this._delta = new _4c3(0, 0); this.__visibleRect.x = (this.__visibleRect.y = 0); _521 = (this.extent = new _4c4(_521)); this.__LOD = lod; this._ratioW = this.width / _521.getWidth(); this._ratioH = this.height / _521.getHeight(); var _525 = this._delta; this._delta = null; this.__zooming = false; this.onZoomEnd(_521, _522, _523, lod ? lod.level : null); this.onExtentChange(_521, _525, _524, lod); }, __setExtent: function (_526, _527, _528, fit) { try { if (this._zoomAnim) { return; } if (this._firstLayerId) { this.extent = _526; return; } var _529 = true, ext = this.extent, _52a = this._fixExtent(_526, fit || false); _526 = _52a.extent; var _52b = _526.getWidth(), _52c = _526.getHeight(), _52d = Math.round; if (ext) { var tw = _52d(ext.getWidth() * _4c7), w = _52d(_52b * _4c7), th = _52d(ext.getHeight() * _4c7), h = _52d(_52c * _4c7); _529 = (tw != w) || (th != h); } var _52e, _52f, end, _530, _531, _532; if (_4c6.zoomDuration && _529 && ext) { _530 = new _4c4(ext); _52f = { left: ext.xmin, top: ext.ymax, width: ext.getWidth(), height: ext.getHeight() }; end = { left: _526.xmin, top: _526.ymax, width: _52b, height: _52c }; _531 = _52f.width / end.width; _532 = _52f.height / end.height; var mtl = new _4c3(_526.xmin, _526.ymax), mbl = new _4c3(_526.xmin, _526.ymin), etl = new _4c3(ext.xmin, ext.ymax), ebl = new _4c3(ext.xmin, ext.ymin); _52e = esri.geometry.getLineIntersection(etl, mtl, ebl, mbl); if (!_52e) { _529 = false; } } this._ratioW = this.width / _52b; this._ratioH = this.height / _52c; var _533 = this._zoomAnimDiv; if (_529) { ds(this._layersDiv, { left: "0px", top: "0px" }); _527 = new _4c3(0, 0); this.__visibleRect.x = (this.__visibleRect.y = 0); if (_52f && end) { this._delta = _527; _533.id = "_zAD"; _533.startingExtent = _530; _533.extent = _526; _533.levelChange = _529; _533.newLod = _52a.lod; this._zoomAnim = esri.fx.resize({ node: _533, start: _52f, end: end, duration: _4c6.zoomDuration, rate: _4c6.zoomRate, beforeBegin: this._zoomStartHandler, onAnimate: this._zoomingHandler, onEnd: this._zoomEndHandler }); if (_528) { _533.anchor = _528; } else { _533.anchor = _4c1(ext, this.width, this.height, _52e); } this._zoomAnim.play(); } else { this.extent = _526; this.onExtentChange(this.extent, _527, _529, (this.__LOD = _52a.lod)); } } else { if (!this.__panning) { if (this.loaded === false) { this.extent = _526; this.onExtentChange(this.extent, _527, _529, (this.__LOD = _52a.lod)); } else { this.__panning = true; _52f = new Rect(0, 0, this.width, this.height, this.spatialReference).getCenter(); _52f.x = _52d(_52f.x); _52f.y = _52d(_52f.y); this.onPanStart(this.extent, new _4c3(0, 0)); var _534 = (this._delta = this.toScreen(_526.getCenter())); esri.fx.slideTo({ node: _533, left: _52f.x - _534.x, top: _52f.y - _534.y, duration: _4c6.panDuration, rate: _4c6.panRate, onAnimate: this._panningHandler, onEnd: this._panEndHandler }).play(); } } } } catch (e) { console.log(e.stack); console.error(e); } }, __getExtentForLevel: function (_535, _536, _537) { var ti = this.__tileInfo; _537 = _537 || this.extent; _536 = _536 || _537.getCenter(); if (ti) { var lods = ti.lods; if (_535 < 0 || _535 >= lods.length) { return {}; } var lod = lods[_535], _538 = this.width * lod.resolution / 2, _539 = this.height * lod.resolution / 2; return { extent: new _4c4(_536.x - _538, _536.y - _539, _536.x + _538, _536.y + _539, _536.spatialReference), lod: lod }; } else { return { extent: _537.expand(_535).centerAt(_536) }; } }, __scaleExtent: function (_53a, _53b, _53c) { var _53d = _53c || _53a.getCenter(); var _53e = _53a.expand(_53b), xmin = _53a.xmin - ((_53e.getWidth() - _53a.getWidth()) * (_53d.x - _53a.xmin) / _53a.getWidth()), ymax = _53a.ymax - ((_53e.getHeight() - _53a.getHeight()) * (_53d.y - _53a.ymax) / _53a.getHeight()); return new _4c4(xmin, ymax - _53e.getHeight(), xmin + _53e.getWidth(), ymax, _53a.spatialReference); }, onLoad: function () { }, onUnload: function () { }, onExtentChange: function () { }, onTimeExtentChange: function () { }, onLayerAdd: function () { }, onLayerAddResult: function () { }, onLayersAddResult: function () { }, onLayerRemove: function () { }, onLayersRemoved: function () { }, onLayerReorder: function () { }, onLayersReordered: function () { }, onPanStart: function () { }, onPan: function () { }, onPanEnd: function () { }, onZoomStart: function () { }, onZoom: function () { }, onZoomEnd: function () { }, onResize: function () { }, onReposition: function () { }, destroy: function () { if (!this._destroyed) { this.removeAllLayers(); this._cleanUp(); if (this._gc) { this._gc._cleanUp(); } this._destroyed = true; } }, setCursor: function (_53f) { ds(this.__container, "cursor", (this.cursor = _53f)); }, setMapCursor: function (c) { this.setCursor((this._cursor = c)); }, resetMapCursor: function () { this.setCursor(this._cursor); }, getInfoWindowAnchor: function (pt) { var w2 = this.width / 2, h2 = this.height / 2, _540; if (pt.y < h2) { _540 = "LOWER"; } else { _540 = "UPPER"; } if (pt.x < w2) { return esri.dijit.InfoWindow["ANCHOR_" + _540 + "RIGHT"]; } else { return esri.dijit.InfoWindow["ANCHOR_" + _540 + "LEFT"]; } }, toScreen: function (pt, _541) { return _4c1(this.extent, this.width, this.height, pt, _541); }, toMap: function (pt) { return _4c0(this.extent, this.width, this.height, pt); }, addLayer: function (_542, _543) { return this._addLayer(_542, _542 instanceof _4c5 ? this.graphicsLayerIds : this.layerIds, _543); }, addLayers: function (_544) { var _545 = [], _546 = _544.length, _547; var _548 = function (_549, _54a) { if (dojo.indexOf(_544, _549) !== -1) { _546--; _545.push({ "layer": _549, "success": !_54a, "error": _54a }); if (!_546) { dojo.disconnect(_547); this.onLayersAddResult(_545); } } }; _547 = dojo.connect(this, "onLayerAddResult", _548); for (var i = 0, len = _544.length; i < len; i++) { this.addLayer(_544[i]); } return this; }, removeLayer: function (_54b) { var id = _54b.id, ids = _54b instanceof _4c5 ? this.graphicsLayerIds : this.layerIds, i = iOf(ids, id); if (i >= 0) { ids.splice(i, 1); if (_54b instanceof _4c5) { ddc(this["_gl_" + _54b.id + "_click_connect"]); _54b._unsetMap(this, this._gc._surface); } else { _54b._unsetMap(this, this._layersDiv); if (_54b.declaredClass.indexOf("VETiledLayer") !== -1) { this._onBingLayerRemove(_54b); } } delete this._layers[id]; delete this._layerDivs[id]; this._reorderLayers(ids); this.onLayerRemove(_54b); } }, removeAllLayers: function () { var ids = this.layerIds, i; for (i = ids.length - 1; i >= 0; i--) { this.removeLayer(this._layers[ids[i]]); } ids = this.graphicsLayerIds; for (i = ids.length - 1; i >= 0; i--) { this.removeLayer(this._layers[ids[i]]); } this.onLayersRemoved(); }, reorderLayer: function (_54c, _54d) { if (dojo.isString(_54c)) { dojo.deprecated(this.declaredClass + ": " + esri.bundle.map.deprecateReorderLayerString, null, "v2.0"); _54c = this.getLayer(_54c); } var id = _54c.id, ids = _54c instanceof _4c5 ? this.graphicsLayerIds : this.layerIds; if (_54d < 0) { _54d = 0; } else { if (_54d >= ids.length) { _54d = ids.length - 1; } } var i = iOf(ids, id); if (i === -1 || i == _54d) { return; } ids.splice(i, 1); ids.splice(_54d, 0, id); this._reorderLayers(ids); }, getLayer: function (id) { return this._layers[id]; }, setExtent: function (_54e, fit) { this.__setExtent(_54e, null, null, fit); }, centerAt: function (_54f) { this._panTo(_54f); }, centerAndZoom: function (_550, _551) { var ext = this.__getExtentForLevel(_551, _550).extent; if (ext) { this.__setExtent(ext); } else { this.centerAt(_550); } }, getNumLevels: function () { return this.__tileInfo ? this.__tileInfo.lods.length : 0; }, getLevel: function () { return this.__LOD ? this.__LOD.level : -1; }, setLevel: function (_552) { var ext = this.__getExtentForLevel(_552).extent; if (ext) { this.setExtent(ext); } }, setTimeExtent: function (_553) { this.timeExtent = _553; var arg = _553 ? new esri.TimeExtent(_553.startTime, _553.endTime) : null; this.onTimeExtentChange(arg); }, setTimeSlider: function (_554) { if (this.timeSlider) { ddc(this._tsTimeExtentChange_connect); this._tsTimeExtentChange_connect = null; this.timeSlider = null; } if (_554) { this.timeSlider = _554; this.setTimeExtent(_554.getCurrentTimeExtent()); this._tsTimeExtentChange_connect = dc(_554, "onTimeExtentChange", this, "setTimeExtent"); } }, resize: function () { var w = this.width, h = this.height, r = esri.geometry._extentToRect(this.extent); var _555 = dojo.contentBox(this.container); ds(this.__root, { width: (this.width = _555.w) + "px", height: (this.height = _555.h) + "px" }); var wd = this.width, ht = this.height; this.__visibleRect.update(this.__visibleRect.x, this.__visibleRect.y, wd, ht); this.__visibleDelta.update(this.__visibleDelta.x, this.__visibleDelta.y, wd, ht); var ne = (this.extent = esri.geometry._rectToExtent(new Rect(r.x, r.y, r.width * (wd / w), r.height * (ht / h), this.spatialReference))); this.onResize(ne, wd, ht); this.__setExtent(ne); }, reposition: function () { this._reposition(); this.onReposition(this.position.x, this.position.y); }, _reposition: function () { var pos = dojo.coords(this.container, true), brdr = dojo._getPadBorderExtents(this.container); this.position.update(pos.x + brdr.l, pos.y + brdr.t); }, panUp: function () { this._fixedPan(0, this.height * -_4c8); }, panUpperRight: function () { this._fixedPan(this.width * _4c8, this.height * -_4c8); }, panRight: function () { this._fixedPan(this.width * _4c8, 0); }, panLowerRight: function () { this._fixedPan(this.width * _4c8, this.height * _4c8); }, panDown: function () { this._fixedPan(0, this.height * _4c8); }, panLowerLeft: function () { this._fixedPan(this.width * -_4c8, this.height * _4c8); }, panLeft: function () { this._fixedPan(this.width * -_4c8, 0); }, panUpperLeft: function () { this._fixedPan(this.width * -_4c8, this.height * -_4c8); } }; } ())); } if (!dojo._hasResource["esri.touchcontainer"]) { dojo._hasResource["esri.touchcontainer"] = true; dojo.provide("esri.touchcontainer"); dojo.declare("esri._MapContainer", esri._CoreMap, (function () { var dc = dojo.connect, ddc = dojo.disconnect, dh = dojo.hitch, _556 = esri.geometry.Point; var _557 = 300; return { constructor: function (_558, _559) { this._onTouchMoveHandler_connect = this._onTouchEndHandler_connect = this._onTouchCancelHandler_connect = null; this._onTouchStart_connect = dc(this.__container, "ontouchstart", this, this._onTouchStartHandler); this._connects.push(dc(this.__container, "ongesturestart", this, this._onGestureStartHandler)); this._connects.push(dc(this.__container, "onmouseover", this, this._onMouseOverHandler)); this._connects.push(dc(this.__container, "onmouseout", this, this._onMouseOutHandler)); this._connects.push(dc(this.__container, "onmousedown", this, this._onMouseDownHandler)); this._connects.push(dc(this.__container, "onmouseup", this, this._onMouseUpHandler)); this._connects.push(dc(this.__container, "onclick", this, this._onClickHandler)); this.downCoords = {}; this._firstTapOn = false; this._processDoubleTap = false; this._processMultiTouchTap = false; this._doubleTapTimeoutObject = false; this._doubleTapTimeout = dh(this, this._doubleTapTimeout); }, _doubleTapTimeout: function () { this._firstTapOn = false; }, _cleanUp: function () { for (var i = this._connects.length; i >= 0; i--) { ddc(this._connects[i]); delete this._connects[i]; } ddc(this._onTouchMoveHandler_connect); ddc(this._onTouchEndHandler_connect); ddc(this._onTouchCancelHandler_connect); this.inherited("_cleanUp", arguments); }, __setClickDuration: function (dur) { this._clickDuration = dur; }, __resetClickDuration: function () { this._clickDuration = _557; }, _processEvent: function (evt, pos) { if (evt.type.indexOf("touch") != -1) { if (evt.touches.length === 2) { return this._processGestureEvent(evt); } else { return this._processTouchEvent(evt); } } evt.screenPoint = new _556(evt.pageX - this.position.x, evt.pageY - this.position.y); evt.mapPoint = this.extent ? this.toMap(evt.screenPoint) : new _556(); return evt; }, _processTouchEvent: function (evt) { if (evt.type === "touchstart") { evt.screenPoint = new _556(evt.targetTouches.item(0).pageX - this.position.x, evt.targetTouches.item(0).pageY - this.position.y); } else { evt.screenPoint = new _556(evt.changedTouches.item(0).pageX - this.position.x, evt.changedTouches.item(0).pageY - this.position.y); } evt.mapPoint = this.extent ? this.toMap(evt.screenPoint) : new _556(); return evt; }, _processGestureEvent: function (evt) { evt.screenPoints = [new _556(evt.touches.item(0).pageX - this.position.x, evt.touches.item(0).pageY - this.position.y), new _556(evt.touches.item(1).pageX - this.position.x, evt.touches.item(1).pageY - this.position.y)]; return evt; }, _onClickHandler: function (evt) { evt = this._processEvent(evt); var dx = Math.abs(this.downCoords.x - evt.screenPoint.x); var dy = Math.abs(this.downCoords.y - evt.screenPoint.y); if (dx <= 1 && dy <= 1) { clearTimeout(this._doubleTapTimeoutObject); this._firstTapOn = false; this.onClick(evt); } }, _onMouseOverHandler: function (evt) { evt = this._processEvent(evt); this.onMouseOver(evt); }, _onMouseOutHandler: function (evt) { evt = this._processEvent(evt); this.onMouseOut(evt); }, _onMouseDownHandler: function (evt) { evt = this._processEvent(evt); this.onMouseDown(evt); }, _onMouseUpHandler: function (evt) { evt = this._processEvent(evt); this.onMouseUp(evt); }, _onTouchStartHandler: function (evt) { if (this._firstTapOn) { this._processDoubleTap = true; clearTimeout(this._doubleTapTimeoutObject); this._firstTapOn = false; } else { this._firstTapOn = true; this._doubleTapTimeoutObject = setTimeout(this._doubleTapTimeout, 400); } evt = this._processEvent(evt); ddc(this._onTouchMoveHandler_connect); ddc(this._onTouchEndHandler_connect); ddc(this._onTouchCancelHandler_connect); this._onTouchMoveHandler_connect = dc(this.__container, "ontouchmove", this, this._onTouchMoveHandler); this._onTouchEndHandler_connect = dc(this.__container, "ontouchend", this, this._onTouchEndHandler); this._onTouchCancelHandler_connect = dc(this.__container, "ontouchcancel", this, this._onTouchEndHandler); this.onTouchStart(evt); }, _onTouchMoveHandler: function (evt) { this.onTouchMove(this._processEvent(evt)); }, _onTouchEndHandler: function (evt) { ddc(this._onTouchMoveHandler_connect); ddc(this._onTouchEndHandler_connect); ddc(this._onTouchCancelHandler_connect); evt = this._processEvent(evt); this.downCoords.x = evt.screenPoint.x; this.downCoords.y = evt.screenPoint.y; this.onTouchEnd(evt); if (this._processDoubleTap) { this.onDblClick(evt); this._processDoubleTap = false; } }, _onGestureStartHandler: function (evt) { ddc(this._onTouchStart_connect); ddc(this._onTouchMoveHandler_connect); ddc(this._onTouchEndHandler_connect); ddc(this._onTouchCancelHandler_connect); this._processMultiTouchTap = true; this._onTouchMoveHandler_connect = dc(this.__container, "ontouchmove", this, this._onGestureTouchMoveHandler); this._onTouchEndHandler_connect = dc(this.__container, "ontouchend", this, this._onGestureTouchEndHandler); this._onTouchCancelHandler_connect = dc(this.__container, "ontouchcancel", this, this._onGestureTouchEndHandler); this.onGestureStart(this._processEvent(evt)); }, _onGestureTouchMoveHandler: function (evt) { this._processMultiTouchTap = false; this.onGestureChange(this._processEvent(evt)); }, _onGestureTouchEndHandler: function (evt) { ddc(this._onTouchMoveHandler_connect); ddc(this._onTouchEndHandler_connect); ddc(this._onTouchCancelHandler_connect); this._onTouchStart_connect = dc(this.__container, "ontouchstart", this, this._onTouchStartHandler); if (this._processMultiTouchTap) { evt.processMultiTouchTap = true; this._processMultiTouchTap = false; } this.onGestureEnd(this._processEvent(evt)); }, onClick: function (evt) { }, onMouseOver: function (evt) { }, onMouseOut: function (evt) { }, onMouseDown: function (evt) { }, onMouseUp: function (evt) { }, onTouchStart: function (evt) { }, onTouchMove: function (evt) { }, onTouchEnd: function (evt) { }, onGestureStart: function (evt) { }, onGestureChange: function (evt) { }, onGestureEnd: function (evt) { } }; })()); } if (!dojo._hasResource["dijit._CssStateMixin"]) { dojo._hasResource["dijit._CssStateMixin"] = true; dojo.provide("dijit._CssStateMixin"); dojo.declare("dijit._CssStateMixin", [], { cssStateNodes: {}, postCreate: function () { this.inherited(arguments); dojo.forEach(["onmouseenter", "onmouseleave", "onmousedown"], function (e) { this.connect(this.domNode, e, "_cssMouseEvent"); }, this); this.connect(this, "set", function (name, _55a) { if (arguments.length >= 2 && { disabled: true, readOnly: true, checked: true, selected: true}[name]) { this._setStateClass(); } }); dojo.forEach(["_onFocus", "_onBlur"], function (ap) { this.connect(this, ap, "_setStateClass"); }, this); for (var ap in this.cssStateNodes) { this._trackMouseState(this[ap], this.cssStateNodes[ap]); } this._setStateClass(); }, _cssMouseEvent: function (_55b) { if (!this.disabled) { switch (_55b.type) { case "mouseenter": case "mouseover": this._hovering = true; this._active = this._mouseDown; break; case "mouseleave": case "mouseout": this._hovering = false; this._active = false; break; case "mousedown": this._active = true; this._mouseDown = true; var _55c = this.connect(dojo.body(), "onmouseup", function () { this._active = false; this._mouseDown = false; this._setStateClass(); this.disconnect(_55c); }); break; } this._setStateClass(); } }, _setStateClass: function () { var _55d = this.baseClass.split(" "); function _55e(_55f) { _55d = _55d.concat(dojo.map(_55d, function (c) { return c + _55f; }), "dijit" + _55f); }; if (!this.isLeftToRight()) { _55e("Rtl"); } if (this.checked) { _55e("Checked"); } if (this.state) { _55e(this.state); } if (this.selected) { _55e("Selected"); } if (this.disabled) { _55e("Disabled"); } else { if (this.readOnly) { _55e("ReadOnly"); } else { if (this._active) { _55e("Active"); } else { if (this._hovering) { _55e("Hover"); } } } } if (this._focused) { _55e("Focused"); } var tn = this.stateNode || this.domNode, _560 = {}; dojo.forEach(tn.className.split(" "), function (c) { _560[c] = true; }); if ("_stateClasses" in this) { dojo.forEach(this._stateClasses, function (c) { delete _560[c]; }); } dojo.forEach(_55d, function (c) { _560[c] = true; }); var _561 = []; for (var c in _560) { _561.push(c); } tn.className = _561.join(" "); this._stateClasses = _55d; }, _trackMouseState: function (node, _562) { var _563 = false, _564 = false, _565 = false; var self = this, cn = dojo.hitch(this, "connect", node); function _566() { var _567 = ("disabled" in self && self.disabled) || ("readonly" in self && self.readonly); dojo.toggleClass(node, _562 + "Hover", _563 && !_564 && !_567); dojo.toggleClass(node, _562 + "Active", _564 && !_567); dojo.toggleClass(node, _562 + "Focused", _565 && !_567); }; cn("onmouseenter", function () { _563 = true; _566(); }); cn("onmouseleave", function () { _563 = false; _564 = false; _566(); }); cn("onmousedown", function () { _564 = true; _566(); }); cn("onmouseup", function () { _564 = false; _566(); }); cn("onfocus", function () { _565 = true; _566(); }); cn("onblur", function () { _565 = false; _566(); }); this.connect(this, "set", function (name, _568) { if (name == "disabled" || name == "readOnly") { _566(); } }); } }); } if (!dojo._hasResource["dijit.form._FormWidget"]) { dojo._hasResource["dijit.form._FormWidget"] = true; dojo.provide("dijit.form._FormWidget"); dojo.declare("dijit.form._FormWidget", [dijit._Widget, dijit._Templated, dijit._CssStateMixin], { name: "", alt: "", value: "", type: "text", tabIndex: "0", disabled: false, intermediateChanges: false, scrollOnFocus: true, attributeMap: dojo.delegate(dijit._Widget.prototype.attributeMap, { value: "focusNode", id: "focusNode", tabIndex: "focusNode", alt: "focusNode", title: "focusNode" }), postMixInProperties: function () { this.nameAttrSetting = this.name ? ("name=\"" + this.name.replace(/'/g, "&quot;") + "\"") : ""; this.inherited(arguments); }, postCreate: function () { this.inherited(arguments); this.connect(this.domNode, "onmousedown", "_onMouseDown"); }, _setDisabledAttr: function (_569) { this.disabled = _569; dojo.attr(this.focusNode, "disabled", _569); if (this.valueNode) { dojo.attr(this.valueNode, "disabled", _569); } dijit.setWaiState(this.focusNode, "disabled", _569); if (_569) { this._hovering = false; this._active = false; var _56a = "tabIndex" in this.attributeMap ? this.attributeMap.tabIndex : "focusNode"; dojo.forEach(dojo.isArray(_56a) ? _56a : [_56a], function (_56b) { var node = this[_56b]; if (dojo.isWebKit || dijit.hasDefaultTabStop(node)) { node.setAttribute("tabIndex", "-1"); } else { node.removeAttribute("tabIndex"); } }, this); } else { this.focusNode.setAttribute("tabIndex", this.tabIndex); } }, setDisabled: function (_56c) { dojo.deprecated("setDisabled(" + _56c + ") is deprecated. Use set('disabled'," + _56c + ") instead.", "", "2.0"); this.set("disabled", _56c); }, _onFocus: function (e) { if (this.scrollOnFocus) { dojo.window.scrollIntoView(this.domNode); } this.inherited(arguments); }, isFocusable: function () { return !this.disabled && !this.readOnly && this.focusNode && (dojo.style(this.domNode, "display") != "none"); }, focus: function () { dijit.focus(this.focusNode); }, compare: function (val1, val2) { if (typeof val1 == "number" && typeof val2 == "number") { return (isNaN(val1) && isNaN(val2)) ? 0 : val1 - val2; } else { if (val1 > val2) { return 1; } else { if (val1 < val2) { return -1; } else { return 0; } } } }, onChange: function (_56d) { }, _onChangeActive: false, _handleOnChange: function (_56e, _56f) { this._lastValue = _56e; if (this._lastValueReported == undefined && (_56f === null || !this._onChangeActive)) { this._resetValue = this._lastValueReported = _56e; } if ((this.intermediateChanges || _56f || _56f === undefined) && ((typeof _56e != typeof this._lastValueReported) || this.compare(_56e, this._lastValueReported) != 0)) { this._lastValueReported = _56e; if (this._onChangeActive) { if (this._onChangeHandle) { clearTimeout(this._onChangeHandle); } this._onChangeHandle = setTimeout(dojo.hitch(this, function () { this._onChangeHandle = null; this.onChange(_56e); }), 0); } } }, create: function () { this.inherited(arguments); this._onChangeActive = true; }, destroy: function () { if (this._onChangeHandle) { clearTimeout(this._onChangeHandle); this.onChange(this._lastValueReported); } this.inherited(arguments); }, setValue: function (_570) { dojo.deprecated("dijit.form._FormWidget:setValue(" + _570 + ") is deprecated.  Use set('value'," + _570 + ") instead.", "", "2.0"); this.set("value", _570); }, getValue: function () { dojo.deprecated(this.declaredClass + "::getValue() is deprecated. Use get('value') instead.", "", "2.0"); return this.get("value"); }, _onMouseDown: function (e) { if (!e.ctrlKey && this.isFocusable()) { var _571 = this.connect(dojo.body(), "onmouseup", function () { if (this.isFocusable()) { this.focus(); } this.disconnect(_571); }); } } }); dojo.declare("dijit.form._FormValueWidget", dijit.form._FormWidget, { readOnly: false, attributeMap: dojo.delegate(dijit.form._FormWidget.prototype.attributeMap, { value: "", readOnly: "focusNode" }), _setReadOnlyAttr: function (_572) { this.readOnly = _572; dojo.attr(this.focusNode, "readOnly", _572); dijit.setWaiState(this.focusNode, "readonly", _572); }, postCreate: function () { this.inherited(arguments); if (dojo.isIE) { this.connect(this.focusNode || this.domNode, "onkeydown", this._onKeyDown); } if (this._resetValue === undefined) { this._resetValue = this.value; } }, _setValueAttr: function (_573, _574) { this.value = _573; this._handleOnChange(_573, _574); }, _getValueAttr: function () { return this._lastValue; }, undo: function () { this._setValueAttr(this._lastValueReported, false); }, reset: function () { this._hasBeenBlurred = false; this._setValueAttr(this._resetValue, true); }, _onKeyDown: function (e) { if (e.keyCode == dojo.keys.ESCAPE && !(e.ctrlKey || e.altKey || e.metaKey)) { var te; if (dojo.isIE) { e.preventDefault(); te = document.createEventObject(); te.keyCode = dojo.keys.ESCAPE; te.shiftKey = e.shiftKey; e.srcElement.fireEvent("onkeypress", te); } } }, _layoutHackIE7: function () { if (dojo.isIE == 7) { var _575 = this.domNode; var _576 = _575.parentNode; var _577 = _575.firstChild || _575; var _578 = _577.style.filter; var _579 = this; while (_576 && _576.clientHeight == 0) { (function ping() { var _57a = _579.connect(_576, "onscroll", function (e) { _579.disconnect(_57a); _577.style.filter = (new Date()).getMilliseconds(); setTimeout(function () { _577.style.filter = _578; }, 0); }); })(); _576 = _576.parentNode; } } } }); } if (!dojo._hasResource["dojo.dnd.common"]) { dojo._hasResource["dojo.dnd.common"] = true; dojo.provide("dojo.dnd.common"); dojo.dnd.getCopyKeyState = dojo.isCopyKey; dojo.dnd._uniqueId = 0; dojo.dnd.getUniqueId = function () { var id; do { id = dojo._scopeName + "Unique" + (++dojo.dnd._uniqueId); } while (dojo.byId(id)); return id; }; dojo.dnd._empty = {}; dojo.dnd.isFormElement = function (e) { var t = e.target; if (t.nodeType == 3) { t = t.parentNode; } return " button textarea input select option ".indexOf(" " + t.tagName.toLowerCase() + " ") >= 0; }; } if (!dojo._hasResource["dojo.dnd.autoscroll"]) { dojo._hasResource["dojo.dnd.autoscroll"] = true; dojo.provide("dojo.dnd.autoscroll"); dojo.dnd.getViewport = function () { var d = dojo.doc, dd = d.documentElement, w = window, b = dojo.body(); if (dojo.isMozilla) { return { w: dd.clientWidth, h: w.innerHeight }; } else { if (!dojo.isOpera && w.innerWidth) { return { w: w.innerWidth, h: w.innerHeight }; } else { if (!dojo.isOpera && dd && dd.clientWidth) { return { w: dd.clientWidth, h: dd.clientHeight }; } else { if (b.clientWidth) { return { w: b.clientWidth, h: b.clientHeight }; } } } } return null; }; dojo.dnd.V_TRIGGER_AUTOSCROLL = 32; dojo.dnd.H_TRIGGER_AUTOSCROLL = 32; dojo.dnd.V_AUTOSCROLL_VALUE = 16; dojo.dnd.H_AUTOSCROLL_VALUE = 16; dojo.dnd.autoScroll = function (e) { var v = dojo.dnd.getViewport(), dx = 0, dy = 0; if (e.clientX < dojo.dnd.H_TRIGGER_AUTOSCROLL) { dx = -dojo.dnd.H_AUTOSCROLL_VALUE; } else { if (e.clientX > v.w - dojo.dnd.H_TRIGGER_AUTOSCROLL) { dx = dojo.dnd.H_AUTOSCROLL_VALUE; } } if (e.clientY < dojo.dnd.V_TRIGGER_AUTOSCROLL) { dy = -dojo.dnd.V_AUTOSCROLL_VALUE; } else { if (e.clientY > v.h - dojo.dnd.V_TRIGGER_AUTOSCROLL) { dy = dojo.dnd.V_AUTOSCROLL_VALUE; } } window.scrollBy(dx, dy); }; dojo.dnd._validNodes = { "div": 1, "p": 1, "td": 1 }; dojo.dnd._validOverflow = { "auto": 1, "scroll": 1 }; dojo.dnd.autoScrollNodes = function (e) { for (var n = e.target; n; ) { if (n.nodeType == 1 && (n.tagName.toLowerCase() in dojo.dnd._validNodes)) { var s = dojo.getComputedStyle(n); if (s.overflow.toLowerCase() in dojo.dnd._validOverflow) { var b = dojo._getContentBox(n, s), t = dojo.position(n, true); var w = Math.min(dojo.dnd.H_TRIGGER_AUTOSCROLL, b.w / 2), h = Math.min(dojo.dnd.V_TRIGGER_AUTOSCROLL, b.h / 2), rx = e.pageX - t.x, ry = e.pageY - t.y, dx = 0, dy = 0; if (dojo.isWebKit || dojo.isOpera) { rx += dojo.body().scrollLeft, ry += dojo.body().scrollTop; } if (rx > 0 && rx < b.w) { if (rx < w) { dx = -w; } else { if (rx > b.w - w) { dx = w; } } } if (ry > 0 && ry < b.h) { if (ry < h) { dy = -h; } else { if (ry > b.h - h) { dy = h; } } } var _57b = n.scrollLeft, _57c = n.scrollTop; n.scrollLeft = n.scrollLeft + dx; n.scrollTop = n.scrollTop + dy; if (_57b != n.scrollLeft || _57c != n.scrollTop) { return; } } } try { n = n.parentNode; } catch (x) { n = null; } } dojo.dnd.autoScroll(e); }; } if (!dojo._hasResource["dojo.dnd.Mover"]) { dojo._hasResource["dojo.dnd.Mover"] = true; dojo.provide("dojo.dnd.Mover"); dojo.declare("dojo.dnd.Mover", null, { constructor: function (node, e, host) { this.node = dojo.byId(node); this.marginBox = { l: e.pageX, t: e.pageY }; this.mouseButton = e.button; var h = this.host = host, d = node.ownerDocument, _57d = dojo.connect(d, "onmousemove", this, "onFirstMove"); this.events = [dojo.connect(d, "onmousemove", this, "onMouseMove"), dojo.connect(d, "onmouseup", this, "onMouseUp"), dojo.connect(d, "ondragstart", dojo.stopEvent), dojo.connect(d.body, "onselectstart", dojo.stopEvent), _57d]; if (h && h.onMoveStart) { h.onMoveStart(this); } }, onMouseMove: function (e) { dojo.dnd.autoScroll(e); var m = this.marginBox; this.host.onMove(this, { l: m.l + e.pageX, t: m.t + e.pageY }, e); dojo.stopEvent(e); }, onMouseUp: function (e) { if (dojo.isWebKit && dojo.isMac && this.mouseButton == 2 ? e.button == 0 : this.mouseButton == e.button) { this.destroy(); } dojo.stopEvent(e); }, onFirstMove: function (e) { var s = this.node.style, l, t, h = this.host; switch (s.position) { case "relative": case "absolute": l = Math.round(parseFloat(s.left)) || 0; t = Math.round(parseFloat(s.top)) || 0; break; default: s.position = "absolute"; var m = dojo.marginBox(this.node); var b = dojo.doc.body; var bs = dojo.getComputedStyle(b); var bm = dojo._getMarginBox(b, bs); var bc = dojo._getContentBox(b, bs); l = m.l - (bc.l - bm.l); t = m.t - (bc.t - bm.t); break; } this.marginBox.l = l - this.marginBox.l; this.marginBox.t = t - this.marginBox.t; if (h && h.onFirstMove) { h.onFirstMove(this, e); } dojo.disconnect(this.events.pop()); }, destroy: function () { dojo.forEach(this.events, dojo.disconnect); var h = this.host; if (h && h.onMoveStop) { h.onMoveStop(this); } this.events = this.node = this.host = null; } }); } if (!dojo._hasResource["dojo.dnd.Moveable"]) { dojo._hasResource["dojo.dnd.Moveable"] = true; dojo.provide("dojo.dnd.Moveable"); dojo.declare("dojo.dnd.Moveable", null, { handle: "", delay: 0, skip: false, constructor: function (node, _57e) { this.node = dojo.byId(node); if (!_57e) { _57e = {}; } this.handle = _57e.handle ? dojo.byId(_57e.handle) : null; if (!this.handle) { this.handle = this.node; } this.delay = _57e.delay > 0 ? _57e.delay : 0; this.skip = _57e.skip; this.mover = _57e.mover ? _57e.mover : dojo.dnd.Mover; this.events = [dojo.connect(this.handle, "onmousedown", this, "onMouseDown"), dojo.connect(this.handle, "ondragstart", this, "onSelectStart"), dojo.connect(this.handle, "onselectstart", this, "onSelectStart")]; }, markupFactory: function (_57f, node) { return new dojo.dnd.Moveable(node, _57f); }, destroy: function () { dojo.forEach(this.events, dojo.disconnect); this.events = this.node = this.handle = null; }, onMouseDown: function (e) { if (this.skip && dojo.dnd.isFormElement(e)) { return; } if (this.delay) { this.events.push(dojo.connect(this.handle, "onmousemove", this, "onMouseMove"), dojo.connect(this.handle, "onmouseup", this, "onMouseUp")); this._lastX = e.pageX; this._lastY = e.pageY; } else { this.onDragDetected(e); } dojo.stopEvent(e); }, onMouseMove: function (e) { if (Math.abs(e.pageX - this._lastX) > this.delay || Math.abs(e.pageY - this._lastY) > this.delay) { this.onMouseUp(e); this.onDragDetected(e); } dojo.stopEvent(e); }, onMouseUp: function (e) { for (var i = 0; i < 2; ++i) { dojo.disconnect(this.events.pop()); } dojo.stopEvent(e); }, onSelectStart: function (e) { if (!this.skip || !dojo.dnd.isFormElement(e)) { dojo.stopEvent(e); } }, onDragDetected: function (e) { new this.mover(this.node, e, this); }, onMoveStart: function (_580) { dojo.publish("/dnd/move/start", [_580]); dojo.addClass(dojo.body(), "dojoMove"); dojo.addClass(this.node, "dojoMoveItem"); }, onMoveStop: function (_581) { dojo.publish("/dnd/move/stop", [_581]); dojo.removeClass(dojo.body(), "dojoMove"); dojo.removeClass(this.node, "dojoMoveItem"); }, onFirstMove: function (_582, e) { }, onMove: function (_583, _584, e) { this.onMoving(_583, _584); var s = _583.node.style; s.left = _584.l + "px"; s.top = _584.t + "px"; this.onMoved(_583, _584); }, onMoving: function (_585, _586) { }, onMoved: function (_587, _588) { } }); } if (!dojo._hasResource["dojo.dnd.move"]) { dojo._hasResource["dojo.dnd.move"] = true; dojo.provide("dojo.dnd.move"); dojo.declare("dojo.dnd.move.constrainedMoveable", dojo.dnd.Moveable, { constraints: function () { }, within: false, markupFactory: function (_589, node) { return new dojo.dnd.move.constrainedMoveable(node, _589); }, constructor: function (node, _58a) { if (!_58a) { _58a = {}; } this.constraints = _58a.constraints; this.within = _58a.within; }, onFirstMove: function (_58b) { var c = this.constraintBox = this.constraints.call(this, _58b); c.r = c.l + c.w; c.b = c.t + c.h; if (this.within) { var mb = dojo.marginBox(_58b.node); c.r -= mb.w; c.b -= mb.h; } }, onMove: function (_58c, _58d) { var c = this.constraintBox, s = _58c.node.style; s.left = (_58d.l < c.l ? c.l : c.r < _58d.l ? c.r : _58d.l) + "px"; s.top = (_58d.t < c.t ? c.t : c.b < _58d.t ? c.b : _58d.t) + "px"; } }); dojo.declare("dojo.dnd.move.boxConstrainedMoveable", dojo.dnd.move.constrainedMoveable, { box: {}, markupFactory: function (_58e, node) { return new dojo.dnd.move.boxConstrainedMoveable(node, _58e); }, constructor: function (node, _58f) { var box = _58f && _58f.box; this.constraints = function () { return box; }; } }); dojo.declare("dojo.dnd.move.parentConstrainedMoveable", dojo.dnd.move.constrainedMoveable, { area: "content", markupFactory: function (_590, node) { return new dojo.dnd.move.parentConstrainedMoveable(node, _590); }, constructor: function (node, _591) { var area = _591 && _591.area; this.constraints = function () { var n = this.node.parentNode, s = dojo.getComputedStyle(n), mb = dojo._getMarginBox(n, s); if (area == "margin") { return mb; } var t = dojo._getMarginExtents(n, s); mb.l += t.l, mb.t += t.t, mb.w -= t.w, mb.h -= t.h; if (area == "border") { return mb; } t = dojo._getBorderExtents(n, s); mb.l += t.l, mb.t += t.t, mb.w -= t.w, mb.h -= t.h; if (area == "padding") { return mb; } t = dojo._getPadExtents(n, s); mb.l += t.l, mb.t += t.t, mb.w -= t.w, mb.h -= t.h; return mb; }; } }); dojo.dnd.move.constrainedMover = function (fun, _592) { dojo.deprecated("dojo.dnd.move.constrainedMover, use dojo.dnd.move.constrainedMoveable instead"); var _593 = function (node, e, _594) { dojo.dnd.Mover.call(this, node, e, _594); }; dojo.extend(_593, dojo.dnd.Mover.prototype); dojo.extend(_593, { onMouseMove: function (e) { dojo.dnd.autoScroll(e); var m = this.marginBox, c = this.constraintBox, l = m.l + e.pageX, t = m.t + e.pageY; l = l < c.l ? c.l : c.r < l ? c.r : l; t = t < c.t ? c.t : c.b < t ? c.b : t; this.host.onMove(this, { l: l, t: t }); }, onFirstMove: function () { dojo.dnd.Mover.prototype.onFirstMove.call(this); var c = this.constraintBox = fun.call(this); c.r = c.l + c.w; c.b = c.t + c.h; if (_592) { var mb = dojo.marginBox(this.node); c.r -= mb.w; c.b -= mb.h; } } }); return _593; }; dojo.dnd.move.boxConstrainedMover = function (box, _595) { dojo.deprecated("dojo.dnd.move.boxConstrainedMover, use dojo.dnd.move.boxConstrainedMoveable instead"); return dojo.dnd.move.constrainedMover(function () { return box; }, _595); }; dojo.dnd.move.parentConstrainedMover = function (area, _596) { dojo.deprecated("dojo.dnd.move.parentConstrainedMover, use dojo.dnd.move.parentConstrainedMoveable instead"); var fun = function () { var n = this.node.parentNode, s = dojo.getComputedStyle(n), mb = dojo._getMarginBox(n, s); if (area == "margin") { return mb; } var t = dojo._getMarginExtents(n, s); mb.l += t.l, mb.t += t.t, mb.w -= t.w, mb.h -= t.h; if (area == "border") { return mb; } t = dojo._getBorderExtents(n, s); mb.l += t.l, mb.t += t.t, mb.w -= t.w, mb.h -= t.h; if (area == "padding") { return mb; } t = dojo._getPadExtents(n, s); mb.l += t.l, mb.t += t.t, mb.w -= t.w, mb.h -= t.h; return mb; }; return dojo.dnd.move.constrainedMover(fun, _596); }; dojo.dnd.constrainedMover = dojo.dnd.move.constrainedMover; dojo.dnd.boxConstrainedMover = dojo.dnd.move.boxConstrainedMover; dojo.dnd.parentConstrainedMover = dojo.dnd.move.parentConstrainedMover; } if (!dojo._hasResource["dijit._HasDropDown"]) { dojo._hasResource["dijit._HasDropDown"] = true; dojo.provide("dijit._HasDropDown"); dojo.declare("dijit._HasDropDown", null, { _buttonNode: null, _arrowWrapperNode: null, _popupStateNode: null, _aroundNode: null, dropDown: null, autoWidth: true, forceWidth: false, maxHeight: 0, dropDownPosition: ["below", "above"], _stopClickEvents: true, _onDropDownMouseDown: function (e) { if (this.disabled || this.readOnly) { return; } this._docHandler = this.connect(dojo.doc, "onmouseup", "_onDropDownMouseUp"); this.toggleDropDown(); }, _onDropDownMouseUp: function (e) { if (e && this._docHandler) { this.disconnect(this._docHandler); } var _597 = this.dropDown, _598 = false; if (e && this._opened) { var c = dojo.position(this._buttonNode, true); if (!(e.pageX >= c.x && e.pageX <= c.x + c.w) || !(e.pageY >= c.y && e.pageY <= c.y + c.h)) { var t = e.target; while (t && !_598) { if (dojo.hasClass(t, "dijitPopup")) { _598 = true; } else { t = t.parentNode; } } if (_598) { t = e.target; if (_597.onItemClick) { var _599; while (t && !(_599 = dijit.byNode(t))) { t = t.parentNode; } if (_599 && _599.onClick && _599.getParent) { _599.getParent().onItemClick(_599, e); } } return; } } } if (this._opened && _597.focus) { window.setTimeout(dojo.hitch(_597, "focus"), 1); } }, _onDropDownClick: function (e) { if (this._stopClickEvents) { dojo.stopEvent(e); } }, _setupDropdown: function () { this._buttonNode = this._buttonNode || this.focusNode || this.domNode; this._popupStateNode = this._popupStateNode || this.focusNode || this._buttonNode; this._aroundNode = this._aroundNode || this.domNode; this.connect(this._buttonNode, "onmousedown", "_onDropDownMouseDown"); this.connect(this._buttonNode, "onclick", "_onDropDownClick"); this.connect(this._buttonNode, "onkeydown", "_onDropDownKeydown"); this.connect(this._buttonNode, "onkeyup", "_onKey"); if (this._setStateClass) { this.connect(this, "openDropDown", "_setStateClass"); this.connect(this, "closeDropDown", "_setStateClass"); } var _59a = { "after": this.isLeftToRight() ? "Right" : "Left", "before": this.isLeftToRight() ? "Left" : "Right", "above": "Up", "below": "Down", "left": "Left", "right": "Right"}[this.dropDownPosition[0]] || this.dropDownPosition[0] || "Down"; dojo.addClass(this._arrowWrapperNode || this._buttonNode, "dijit" + _59a + "ArrowButton"); }, postCreate: function () { this._setupDropdown(); this.inherited(arguments); }, destroyDescendants: function () { if (this.dropDown) { if (!this.dropDown._destroyed) { this.dropDown.destroyRecursive(); } delete this.dropDown; } this.inherited(arguments); }, _onDropDownKeydown: function (e) { if (e.keyCode == dojo.keys.DOWN_ARROW || e.keyCode == dojo.keys.ENTER || e.keyCode == dojo.keys.SPACE) { e.preventDefault(); } }, _onKey: function (e) { if (this.disabled || this.readOnly) { return; } var d = this.dropDown; if (d && this._opened && d.handleKey) { if (d.handleKey(e) === false) { return; } } if (d && this._opened && e.keyCode == dojo.keys.ESCAPE) { this.toggleDropDown(); } else { if (d && !this._opened && (e.keyCode == dojo.keys.DOWN_ARROW || e.keyCode == dojo.keys.ENTER || e.keyCode == dojo.keys.SPACE)) { this.toggleDropDown(); if (d.focus) { setTimeout(dojo.hitch(d, "focus"), 1); } } } }, _onBlur: function () { this.closeDropDown(); this.inherited(arguments); }, isLoaded: function () { return true; }, loadDropDown: function (_59b) { _59b(); }, toggleDropDown: function () { if (this.disabled || this.readOnly) { return; } this.focus(); var _59c = this.dropDown; if (!_59c) { return; } if (!this._opened) { if (!this.isLoaded()) { this.loadDropDown(dojo.hitch(this, "openDropDown")); return; } else { this.openDropDown(); } } else { this.closeDropDown(); } }, openDropDown: function () { var _59d = this.dropDown; var _59e = _59d.domNode; var self = this; if (!this._preparedNode) { dijit.popup.moveOffScreen(_59e); this._preparedNode = true; if (_59e.style.width) { this._explicitDDWidth = true; } if (_59e.style.height) { this._explicitDDHeight = true; } } if (this.maxHeight || this.forceWidth || this.autoWidth) { var _59f = { display: "", visibility: "hidden" }; if (!this._explicitDDWidth) { _59f.width = ""; } if (!this._explicitDDHeight) { _59f.height = ""; } dojo.style(_59e, _59f); var mb = dojo.marginBox(_59e); var _5a0 = (this.maxHeight && mb.h > this.maxHeight); dojo.style(_59e, { overflowX: "hidden", overflowY: _5a0 ? "auto" : "hidden" }); if (_5a0) { mb.h = this.maxHeight; if ("w" in mb) { mb.w += 16; } } else { delete mb.h; } delete mb.t; delete mb.l; if (this.forceWidth) { mb.w = this.domNode.offsetWidth; } else { if (this.autoWidth) { mb.w = Math.max(mb.w, this.domNode.offsetWidth); } else { delete mb.w; } } if (dojo.isFunction(_59d.resize)) { _59d.resize(mb); } else { dojo.marginBox(_59e, mb); } } var _5a1 = dijit.popup.open({ parent: this, popup: _59d, around: this._aroundNode, orient: dijit.getPopupAroundAlignment((this.dropDownPosition && this.dropDownPosition.length) ? this.dropDownPosition : ["below"], this.isLeftToRight()), onExecute: function () { self.closeDropDown(true); }, onCancel: function () { self.closeDropDown(true); }, onClose: function () { dojo.attr(self._popupStateNode, "popupActive", false); dojo.removeClass(self._popupStateNode, "dijitHasDropDownOpen"); self._opened = false; self.state = ""; } }); dojo.attr(this._popupStateNode, "popupActive", "true"); dojo.addClass(self._popupStateNode, "dijitHasDropDownOpen"); this._opened = true; this.state = "Opened"; return _5a1; }, closeDropDown: function (_5a2) { if (this._opened) { if (_5a2) { this.focus(); } dijit.popup.close(this.dropDown); this._opened = false; this.state = ""; } } }); } if (!dojo._hasResource["dijit.form.Button"]) { dojo._hasResource["dijit.form.Button"] = true; dojo.provide("dijit.form.Button"); dojo.declare("dijit.form.Button", dijit.form._FormWidget, { label: "", showLabel: true, iconClass: "", type: "button", baseClass: "dijitButton", templateString: dojo.cache("dijit.form", "templates/Button.html", "<span class=\"dijit dijitReset dijitInline\"\r\n\t><span class=\"dijitReset dijitInline dijitButtonNode\"\r\n\t\tdojoAttachEvent=\"ondijitclick:_onButtonClick\"\r\n\t\t><span class=\"dijitReset dijitStretch dijitButtonContents\"\r\n\t\t\tdojoAttachPoint=\"titleNode,focusNode\"\r\n\t\t\twaiRole=\"button\" waiState=\"labelledby-${id}_label\"\r\n\t\t\t><span class=\"dijitReset dijitInline dijitIcon\" dojoAttachPoint=\"iconNode\"></span\r\n\t\t\t><span class=\"dijitReset dijitToggleButtonIconChar\">&#x25CF;</span\r\n\t\t\t><span class=\"dijitReset dijitInline dijitButtonText\"\r\n\t\t\t\tid=\"${id}_label\"\r\n\t\t\t\tdojoAttachPoint=\"containerNode\"\r\n\t\t\t></span\r\n\t\t></span\r\n\t></span\r\n\t><input ${!nameAttrSetting} type=\"${type}\" value=\"${value}\" class=\"dijitOffScreen\"\r\n\t\tdojoAttachPoint=\"valueNode\"\r\n/></span>\r\n"), attributeMap: dojo.delegate(dijit.form._FormWidget.prototype.attributeMap, { value: "valueNode", iconClass: { node: "iconNode", type: "class"} }), _onClick: function (e) { if (this.disabled) { return false; } this._clicked(); return this.onClick(e); }, _onButtonClick: function (e) { if (this._onClick(e) === false) { e.preventDefault(); } else { if (this.type == "submit" && !(this.valueNode || this.focusNode).form) { for (var node = this.domNode; node.parentNode; node = node.parentNode) { var _5a3 = dijit.byNode(node); if (_5a3 && typeof _5a3._onSubmit == "function") { _5a3._onSubmit(e); break; } } } else { if (this.valueNode) { this.valueNode.click(); e.preventDefault(); } } } }, _fillContent: function (_5a4) { if (_5a4 && (!this.params || !("label" in this.params))) { this.set("label", _5a4.innerHTML); } }, postCreate: function () { dojo.setSelectable(this.focusNode, false); this.inherited(arguments); }, _setShowLabelAttr: function (val) { if (this.containerNode) { dojo.toggleClass(this.containerNode, "dijitDisplayNone", !val); } this.showLabel = val; }, onClick: function (e) { return true; }, _clicked: function (e) { }, setLabel: function (_5a5) { dojo.deprecated("dijit.form.Button.setLabel() is deprecated.  Use set('label', ...) instead.", "", "2.0"); this.set("label", _5a5); }, _setLabelAttr: function (_5a6) { this.containerNode.innerHTML = this.label = _5a6; if (this.showLabel == false && !this.params.title) { this.titleNode.title = dojo.trim(this.containerNode.innerText || this.containerNode.textContent || ""); } } }); dojo.declare("dijit.form.DropDownButton", [dijit.form.Button, dijit._Container, dijit._HasDropDown], { baseClass: "dijitDropDownButton", templateString: dojo.cache("dijit.form", "templates/DropDownButton.html", "<span class=\"dijit dijitReset dijitInline\"\r\n\t><span class='dijitReset dijitInline dijitButtonNode'\r\n\t\tdojoAttachEvent=\"ondijitclick:_onButtonClick\" dojoAttachPoint=\"_buttonNode\"\r\n\t\t><span class=\"dijitReset dijitStretch dijitButtonContents\"\r\n\t\t\tdojoAttachPoint=\"focusNode,titleNode,_arrowWrapperNode\"\r\n\t\t\twaiRole=\"button\" waiState=\"haspopup-true,labelledby-${id}_label\"\r\n\t\t\t><span class=\"dijitReset dijitInline dijitIcon\"\r\n\t\t\t\tdojoAttachPoint=\"iconNode\"\r\n\t\t\t></span\r\n\t\t\t><span class=\"dijitReset dijitInline dijitButtonText\"\r\n\t\t\t\tdojoAttachPoint=\"containerNode,_popupStateNode\"\r\n\t\t\t\tid=\"${id}_label\"\r\n\t\t\t></span\r\n\t\t\t><span class=\"dijitReset dijitInline dijitArrowButtonInner\"></span\r\n\t\t\t><span class=\"dijitReset dijitInline dijitArrowButtonChar\">&#9660;</span\r\n\t\t></span\r\n\t></span\r\n\t><input ${!nameAttrSetting} type=\"${type}\" value=\"${value}\" class=\"dijitOffScreen\"\r\n\t\tdojoAttachPoint=\"valueNode\"\r\n/></span>\r\n"), _fillContent: function () { if (this.srcNodeRef) { var _5a7 = dojo.query("*", this.srcNodeRef); dijit.form.DropDownButton.superclass._fillContent.call(this, _5a7[0]); this.dropDownContainer = this.srcNodeRef; } }, startup: function () { if (this._started) { return; } if (!this.dropDown) { var _5a8 = dojo.query("[widgetId]", this.dropDownContainer)[0]; this.dropDown = dijit.byNode(_5a8); delete this.dropDownContainer; } dijit.popup.moveOffScreen(this.dropDown.domNode); this.inherited(arguments); }, isLoaded: function () { var _5a9 = this.dropDown; return (!_5a9.href || _5a9.isLoaded); }, loadDropDown: function () { var _5aa = this.dropDown; if (!_5aa) { return; } if (!this.isLoaded()) { var _5ab = dojo.connect(_5aa, "onLoad", this, function () { dojo.disconnect(_5ab); this.openDropDown(); }); _5aa.refresh(); } else { this.openDropDown(); } }, isFocusable: function () { return this.inherited(arguments) && !this._mouseDown; } }); dojo.declare("dijit.form.ComboButton", dijit.form.DropDownButton, { templateString: dojo.cache("dijit.form", "templates/ComboButton.html", "<table class=\"dijit dijitReset dijitInline dijitLeft\"\r\n\tcellspacing='0' cellpadding='0' waiRole=\"presentation\"\r\n\t><tbody waiRole=\"presentation\"><tr waiRole=\"presentation\"\r\n\t\t><td class=\"dijitReset dijitStretch dijitButtonNode\" dojoAttachPoint=\"buttonNode\" dojoAttachEvent=\"ondijitclick:_onButtonClick,onkeypress:_onButtonKeyPress\"\r\n\t\t><div id=\"${id}_button\" class=\"dijitReset dijitButtonContents\"\r\n\t\t\tdojoAttachPoint=\"titleNode\"\r\n\t\t\twaiRole=\"button\" waiState=\"labelledby-${id}_label\"\r\n\t\t\t><div class=\"dijitReset dijitInline dijitIcon\" dojoAttachPoint=\"iconNode\" waiRole=\"presentation\"></div\r\n\t\t\t><div class=\"dijitReset dijitInline dijitButtonText\" id=\"${id}_label\" dojoAttachPoint=\"containerNode\" waiRole=\"presentation\"></div\r\n\t\t></div\r\n\t\t></td\r\n\t\t><td id=\"${id}_arrow\" class='dijitReset dijitRight dijitButtonNode dijitArrowButton'\r\n\t\t\tdojoAttachPoint=\"_popupStateNode,focusNode,_buttonNode\"\r\n\t\t\tdojoAttachEvent=\"onkeypress:_onArrowKeyPress\"\r\n\t\t\ttitle=\"${optionsTitle}\"\r\n\t\t\twaiRole=\"button\" waiState=\"haspopup-true\"\r\n\t\t\t><div class=\"dijitReset dijitArrowButtonInner\" waiRole=\"presentation\"></div\r\n\t\t\t><div class=\"dijitReset dijitArrowButtonChar\" waiRole=\"presentation\">&#9660;</div\r\n\t\t></td\r\n\t\t><td style=\"display:none !important;\"\r\n\t\t\t><input ${!nameAttrSetting} type=\"${type}\" value=\"${value}\" dojoAttachPoint=\"valueNode\"\r\n\t\t/></td></tr></tbody\r\n></table>\r\n"), attributeMap: dojo.mixin(dojo.clone(dijit.form.Button.prototype.attributeMap), { id: "", tabIndex: ["focusNode", "titleNode"], title: "titleNode" }), optionsTitle: "", baseClass: "dijitComboButton", cssStateNodes: { "buttonNode": "dijitButtonNode", "titleNode": "dijitButtonContents", "_popupStateNode": "dijitDownArrowButton" }, _focusedNode: null, _onButtonKeyPress: function (evt) { if (evt.charOrCode == dojo.keys[this.isLeftToRight() ? "RIGHT_ARROW" : "LEFT_ARROW"]) { dijit.focus(this._popupStateNode); dojo.stopEvent(evt); } }, _onArrowKeyPress: function (evt) { if (evt.charOrCode == dojo.keys[this.isLeftToRight() ? "LEFT_ARROW" : "RIGHT_ARROW"]) { dijit.focus(this.titleNode); dojo.stopEvent(evt); } }, focus: function (_5ac) { dijit.focus(_5ac == "start" ? this.titleNode : this._popupStateNode); } }); dojo.declare("dijit.form.ToggleButton", dijit.form.Button, { baseClass: "dijitToggleButton", checked: false, attributeMap: dojo.mixin(dojo.clone(dijit.form.Button.prototype.attributeMap), { checked: "focusNode" }), _clicked: function (evt) { this.set("checked", !this.checked); }, _setCheckedAttr: function (_5ad, _5ae) { this.checked = _5ad; dojo.attr(this.focusNode || this.domNode, "checked", _5ad); dijit.setWaiState(this.focusNode || this.domNode, "pressed", _5ad); this._handleOnChange(_5ad, _5ae); }, setChecked: function (_5af) { dojo.deprecated("setChecked(" + _5af + ") is deprecated. Use set('checked'," + _5af + ") instead.", "", "2.0"); this.set("checked", _5af); }, reset: function () { this._hasBeenBlurred = false; this.set("checked", this.params.checked || false); } }); } if (!dojo._hasResource["dojo.regexp"]) { dojo._hasResource["dojo.regexp"] = true; dojo.provide("dojo.regexp"); dojo.regexp.escapeString = function (str, _5b0) { return str.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, function (ch) { if (_5b0 && _5b0.indexOf(ch) != -1) { return ch; } return "\\" + ch; }); }; dojo.regexp.buildGroupRE = function (arr, re, _5b1) { if (!(arr instanceof Array)) { return re(arr); } var b = []; for (var i = 0; i < arr.length; i++) { b.push(re(arr[i])); } return dojo.regexp.group(b.join("|"), _5b1); }; dojo.regexp.group = function (_5b2, _5b3) { return "(" + (_5b3 ? "?:" : "") + _5b2 + ")"; }; } if (!dojo._hasResource["dojo.number"]) { dojo._hasResource["dojo.number"] = true; dojo.provide("dojo.number"); dojo.number.format = function (_5b4, _5b5) { _5b5 = dojo.mixin({}, _5b5 || {}); var _5b6 = dojo.i18n.normalizeLocale(_5b5.locale), _5b7 = dojo.i18n.getLocalization("dojo.cldr", "number", _5b6); _5b5.customs = _5b7; var _5b8 = _5b5.pattern || _5b7[(_5b5.type || "decimal") + "Format"]; if (isNaN(_5b4) || Math.abs(_5b4) == Infinity) { return null; } return dojo.number._applyPattern(_5b4, _5b8, _5b5); }; dojo.number._numberPatternRE = /[#0,]*[#0](?:\.0*#*)?/; dojo.number._applyPattern = function (_5b9, _5ba, _5bb) { _5bb = _5bb || {}; var _5bc = _5bb.customs.group, _5bd = _5bb.customs.decimal, _5be = _5ba.split(";"), _5bf = _5be[0]; _5ba = _5be[(_5b9 < 0) ? 1 : 0] || ("-" + _5bf); if (_5ba.indexOf("%") != -1) { _5b9 *= 100; } else { if (_5ba.indexOf("‰") != -1) { _5b9 *= 1000; } else { if (_5ba.indexOf("¤") != -1) { _5bc = _5bb.customs.currencyGroup || _5bc; _5bd = _5bb.customs.currencyDecimal || _5bd; _5ba = _5ba.replace(/\u00a4{1,3}/, function (_5c0) { var prop = ["symbol", "currency", "displayName"][_5c0.length - 1]; return _5bb[prop] || _5bb.currency || ""; }); } else { if (_5ba.indexOf("E") != -1) { throw new Error("exponential notation not supported"); } } } } var _5c1 = dojo.number._numberPatternRE; var _5c2 = _5bf.match(_5c1); if (!_5c2) { throw new Error("unable to find a number expression in pattern: " + _5ba); } if (_5bb.fractional === false) { _5bb.places = 0; } return _5ba.replace(_5c1, dojo.number._formatAbsolute(_5b9, _5c2[0], { decimal: _5bd, group: _5bc, places: _5bb.places, round: _5bb.round })); }; dojo.number.round = function (_5c3, _5c4, _5c5) { var _5c6 = 10 / (_5c5 || 10); return (_5c6 * +_5c3).toFixed(_5c4) / _5c6; }; if ((0.9).toFixed() == 0) { (function () { var _5c7 = dojo.number.round; dojo.number.round = function (v, p, m) { var d = Math.pow(10, -p || 0), a = Math.abs(v); if (!v || a >= d || a * Math.pow(10, p + 1) < 5) { d = 0; } return _5c7(v, p, m) + (v > 0 ? d : -d); }; })(); } dojo.number._formatAbsolute = function (_5c8, _5c9, _5ca) { _5ca = _5ca || {}; if (_5ca.places === true) { _5ca.places = 0; } if (_5ca.places === Infinity) { _5ca.places = 6; } var _5cb = _5c9.split("."), _5cc = typeof _5ca.places == "string" && _5ca.places.indexOf(","), _5cd = _5ca.places; if (_5cc) { _5cd = _5ca.places.substring(_5cc + 1); } else { if (!(_5cd >= 0)) { _5cd = (_5cb[1] || []).length; } } if (!(_5ca.round < 0)) { _5c8 = dojo.number.round(_5c8, _5cd, _5ca.round); } var _5ce = String(Math.abs(_5c8)).split("."), _5cf = _5ce[1] || ""; if (_5cb[1] || _5ca.places) { if (_5cc) { _5ca.places = _5ca.places.substring(0, _5cc); } var pad = _5ca.places !== undefined ? _5ca.places : (_5cb[1] && _5cb[1].lastIndexOf("0") + 1); if (pad > _5cf.length) { _5ce[1] = dojo.string.pad(_5cf, pad, "0", true); } if (_5cd < _5cf.length) { _5ce[1] = _5cf.substr(0, _5cd); } } else { if (_5ce[1]) { _5ce.pop(); } } var _5d0 = _5cb[0].replace(",", ""); pad = _5d0.indexOf("0"); if (pad != -1) { pad = _5d0.length - pad; if (pad > _5ce[0].length) { _5ce[0] = dojo.string.pad(_5ce[0], pad); } if (_5d0.indexOf("#") == -1) { _5ce[0] = _5ce[0].substr(_5ce[0].length - pad); } } var _5d1 = _5cb[0].lastIndexOf(","), _5d2, _5d3; if (_5d1 != -1) { _5d2 = _5cb[0].length - _5d1 - 1; var _5d4 = _5cb[0].substr(0, _5d1); _5d1 = _5d4.lastIndexOf(","); if (_5d1 != -1) { _5d3 = _5d4.length - _5d1 - 1; } } var _5d5 = []; for (var _5d6 = _5ce[0]; _5d6; ) { var off = _5d6.length - _5d2; _5d5.push((off > 0) ? _5d6.substr(off) : _5d6); _5d6 = (off > 0) ? _5d6.slice(0, off) : ""; if (_5d3) { _5d2 = _5d3; delete _5d3; } } _5ce[0] = _5d5.reverse().join(_5ca.group || ","); return _5ce.join(_5ca.decimal || "."); }; dojo.number.regexp = function (_5d7) { return dojo.number._parseInfo(_5d7).regexp; }; dojo.number._parseInfo = function (_5d8) { _5d8 = _5d8 || {}; var _5d9 = dojo.i18n.normalizeLocale(_5d8.locale), _5da = dojo.i18n.getLocalization("dojo.cldr", "number", _5d9), _5db = _5d8.pattern || _5da[(_5d8.type || "decimal") + "Format"], _5dc = _5da.group, _5dd = _5da.decimal, _5de = 1; if (_5db.indexOf("%") != -1) { _5de /= 100; } else { if (_5db.indexOf("‰") != -1) { _5de /= 1000; } else { var _5df = _5db.indexOf("¤") != -1; if (_5df) { _5dc = _5da.currencyGroup || _5dc; _5dd = _5da.currencyDecimal || _5dd; } } } var _5e0 = _5db.split(";"); if (_5e0.length == 1) { _5e0.push("-" + _5e0[0]); } var re = dojo.regexp.buildGroupRE(_5e0, function (_5e1) { _5e1 = "(?:" + dojo.regexp.escapeString(_5e1, ".") + ")"; return _5e1.replace(dojo.number._numberPatternRE, function (_5e2) { var _5e3 = { signed: false, separator: _5d8.strict ? _5dc : [_5dc, ""], fractional: _5d8.fractional, decimal: _5dd, exponent: false }, _5e4 = _5e2.split("."), _5e5 = _5d8.places; if (_5e4.length == 1 && _5de != 1) { _5e4[1] = "###"; } if (_5e4.length == 1 || _5e5 === 0) { _5e3.fractional = false; } else { if (_5e5 === undefined) { _5e5 = _5d8.pattern ? _5e4[1].lastIndexOf("0") + 1 : Infinity; } if (_5e5 && _5d8.fractional == undefined) { _5e3.fractional = true; } if (!_5d8.places && (_5e5 < _5e4[1].length)) { _5e5 += "," + _5e4[1].length; } _5e3.places = _5e5; } var _5e6 = _5e4[0].split(","); if (_5e6.length > 1) { _5e3.groupSize = _5e6.pop().length; if (_5e6.length > 1) { _5e3.groupSize2 = _5e6.pop().length; } } return "(" + dojo.number._realNumberRegexp(_5e3) + ")"; }); }, true); if (_5df) { re = re.replace(/([\s\xa0]*)(\u00a4{1,3})([\s\xa0]*)/g, function (_5e7, _5e8, _5e9, _5ea) { var prop = ["symbol", "currency", "displayName"][_5e9.length - 1], _5eb = dojo.regexp.escapeString(_5d8[prop] || _5d8.currency || ""); _5e8 = _5e8 ? "[\\s\\xa0]" : ""; _5ea = _5ea ? "[\\s\\xa0]" : ""; if (!_5d8.strict) { if (_5e8) { _5e8 += "*"; } if (_5ea) { _5ea += "*"; } return "(?:" + _5e8 + _5eb + _5ea + ")?"; } return _5e8 + _5eb + _5ea; }); } return { regexp: re.replace(/[\xa0 ]/g, "[\\s\\xa0]"), group: _5dc, decimal: _5dd, factor: _5de }; }; dojo.number.parse = function (_5ec, _5ed) { var info = dojo.number._parseInfo(_5ed), _5ee = (new RegExp("^" + info.regexp + "$")).exec(_5ec); if (!_5ee) { return NaN; } var _5ef = _5ee[1]; if (!_5ee[1]) { if (!_5ee[2]) { return NaN; } _5ef = _5ee[2]; info.factor *= -1; } _5ef = _5ef.replace(new RegExp("[" + info.group + "\\s\\xa0" + "]", "g"), "").replace(info.decimal, "."); return _5ef * info.factor; }; dojo.number._realNumberRegexp = function (_5f0) { _5f0 = _5f0 || {}; if (!("places" in _5f0)) { _5f0.places = Infinity; } if (typeof _5f0.decimal != "string") { _5f0.decimal = "."; } if (!("fractional" in _5f0) || /^0/.test(_5f0.places)) { _5f0.fractional = [true, false]; } if (!("exponent" in _5f0)) { _5f0.exponent = [true, false]; } if (!("eSigned" in _5f0)) { _5f0.eSigned = [true, false]; } var _5f1 = dojo.number._integerRegexp(_5f0), _5f2 = dojo.regexp.buildGroupRE(_5f0.fractional, function (q) { var re = ""; if (q && (_5f0.places !== 0)) { re = "\\" + _5f0.decimal; if (_5f0.places == Infinity) { re = "(?:" + re + "\\d+)?"; } else { re += "\\d{" + _5f0.places + "}"; } } return re; }, true); var _5f3 = dojo.regexp.buildGroupRE(_5f0.exponent, function (q) { if (q) { return "([eE]" + dojo.number._integerRegexp({ signed: _5f0.eSigned }) + ")"; } return ""; }); var _5f4 = _5f1 + _5f2; if (_5f2) { _5f4 = "(?:(?:" + _5f4 + ")|(?:" + _5f2 + "))"; } return _5f4 + _5f3; }; dojo.number._integerRegexp = function (_5f5) { _5f5 = _5f5 || {}; if (!("signed" in _5f5)) { _5f5.signed = [true, false]; } if (!("separator" in _5f5)) { _5f5.separator = ""; } else { if (!("groupSize" in _5f5)) { _5f5.groupSize = 3; } } var _5f6 = dojo.regexp.buildGroupRE(_5f5.signed, function (q) { return q ? "[-+]" : ""; }, true); var _5f7 = dojo.regexp.buildGroupRE(_5f5.separator, function (sep) { if (!sep) { return "(?:\\d+)"; } sep = dojo.regexp.escapeString(sep); if (sep == " ") { sep = "\\s"; } else { if (sep == " ") { sep = "\\s\\xa0"; } } var grp = _5f5.groupSize, grp2 = _5f5.groupSize2; if (grp2) { var _5f8 = "(?:0|[1-9]\\d{0," + (grp2 - 1) + "}(?:[" + sep + "]\\d{" + grp2 + "})*[" + sep + "]\\d{" + grp + "})"; return ((grp - grp2) > 0) ? "(?:" + _5f8 + "|(?:0|[1-9]\\d{0," + (grp - 1) + "}))" : _5f8; } return "(?:0|[1-9]\\d{0," + (grp - 1) + "}(?:[" + sep + "]\\d{" + grp + "})*)"; }, true); return _5f6 + _5f7; }; } if (!dojo._hasResource["dijit.form.HorizontalSlider"]) { dojo._hasResource["dijit.form.HorizontalSlider"] = true; dojo.provide("dijit.form.HorizontalSlider"); dojo.declare("dijit.form.HorizontalSlider", [dijit.form._FormValueWidget, dijit._Container], { templateString: dojo.cache("dijit.form", "templates/HorizontalSlider.html", "<table class=\"dijit dijitReset dijitSlider dijitSliderH\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" rules=\"none\" dojoAttachEvent=\"onkeypress:_onKeyPress,onkeyup:_onKeyUp\"\r\n\t><tr class=\"dijitReset\"\r\n\t\t><td class=\"dijitReset\" colspan=\"2\"></td\r\n\t\t><td dojoAttachPoint=\"topDecoration\" class=\"dijitReset dijitSliderDecoration dijitSliderDecorationT dijitSliderDecorationH\"></td\r\n\t\t><td class=\"dijitReset\" colspan=\"2\"></td\r\n\t></tr\r\n\t><tr class=\"dijitReset\"\r\n\t\t><td class=\"dijitReset dijitSliderButtonContainer dijitSliderButtonContainerH\"\r\n\t\t\t><div class=\"dijitSliderDecrementIconH\" tabIndex=\"-1\" style=\"display:none\" dojoAttachPoint=\"decrementButton\"><span class=\"dijitSliderButtonInner\">-</span></div\r\n\t\t></td\r\n\t\t><td class=\"dijitReset\"\r\n\t\t\t><div class=\"dijitSliderBar dijitSliderBumper dijitSliderBumperH dijitSliderLeftBumper\" dojoAttachEvent=\"onmousedown:_onClkDecBumper\"></div\r\n\t\t></td\r\n\t\t><td class=\"dijitReset\"\r\n\t\t\t><input dojoAttachPoint=\"valueNode\" type=\"hidden\" ${!nameAttrSetting}\r\n\t\t\t/><div class=\"dijitReset dijitSliderBarContainerH\" waiRole=\"presentation\" dojoAttachPoint=\"sliderBarContainer\"\r\n\t\t\t\t><div waiRole=\"presentation\" dojoAttachPoint=\"progressBar\" class=\"dijitSliderBar dijitSliderBarH dijitSliderProgressBar dijitSliderProgressBarH\" dojoAttachEvent=\"onmousedown:_onBarClick\"\r\n\t\t\t\t\t><div class=\"dijitSliderMoveable dijitSliderMoveableH\"\r\n\t\t\t\t\t\t><div dojoAttachPoint=\"sliderHandle,focusNode\" class=\"dijitSliderImageHandle dijitSliderImageHandleH\" dojoAttachEvent=\"onmousedown:_onHandleClick\" waiRole=\"slider\" valuemin=\"${minimum}\" valuemax=\"${maximum}\"></div\r\n\t\t\t\t\t></div\r\n\t\t\t\t></div\r\n\t\t\t\t><div waiRole=\"presentation\" dojoAttachPoint=\"remainingBar\" class=\"dijitSliderBar dijitSliderBarH dijitSliderRemainingBar dijitSliderRemainingBarH\" dojoAttachEvent=\"onmousedown:_onBarClick\"></div\r\n\t\t\t></div\r\n\t\t></td\r\n\t\t><td class=\"dijitReset\"\r\n\t\t\t><div class=\"dijitSliderBar dijitSliderBumper dijitSliderBumperH dijitSliderRightBumper\" dojoAttachEvent=\"onmousedown:_onClkIncBumper\"></div\r\n\t\t></td\r\n\t\t><td class=\"dijitReset dijitSliderButtonContainer dijitSliderButtonContainerH\"\r\n\t\t\t><div class=\"dijitSliderIncrementIconH\" tabIndex=\"-1\" style=\"display:none\" dojoAttachPoint=\"incrementButton\"><span class=\"dijitSliderButtonInner\">+</span></div\r\n\t\t></td\r\n\t></tr\r\n\t><tr class=\"dijitReset\"\r\n\t\t><td class=\"dijitReset\" colspan=\"2\"></td\r\n\t\t><td dojoAttachPoint=\"containerNode,bottomDecoration\" class=\"dijitReset dijitSliderDecoration dijitSliderDecorationB dijitSliderDecorationH\"></td\r\n\t\t><td class=\"dijitReset\" colspan=\"2\"></td\r\n\t></tr\r\n></table>\r\n"), value: 0, showButtons: true, minimum: 0, maximum: 100, discreteValues: Infinity, pageIncrement: 2, clickSelect: true, slideDuration: dijit.defaultDuration, widgetsInTemplate: true, attributeMap: dojo.delegate(dijit.form._FormWidget.prototype.attributeMap, { id: "" }), baseClass: "dijitSlider", cssStateNodes: { incrementButton: "dijitSliderIncrementButton", decrementButton: "dijitSliderDecrementButton", focusNode: "dijitSliderThumb" }, _mousePixelCoord: "pageX", _pixelCount: "w", _startingPixelCoord: "x", _startingPixelCount: "l", _handleOffsetCoord: "left", _progressPixelSize: "width", _onKeyUp: function (e) { if (this.disabled || this.readOnly || e.altKey || e.ctrlKey || e.metaKey) { return; } this._setValueAttr(this.value, true); }, _onKeyPress: function (e) { if (this.disabled || this.readOnly || e.altKey || e.ctrlKey || e.metaKey) { return; } switch (e.charOrCode) { case dojo.keys.HOME: this._setValueAttr(this.minimum, false); break; case dojo.keys.END: this._setValueAttr(this.maximum, false); break; case ((this._descending || this.isLeftToRight()) ? dojo.keys.RIGHT_ARROW : dojo.keys.LEFT_ARROW): case (this._descending === false ? dojo.keys.DOWN_ARROW : dojo.keys.UP_ARROW): case (this._descending === false ? dojo.keys.PAGE_DOWN : dojo.keys.PAGE_UP): this.increment(e); break; case ((this._descending || this.isLeftToRight()) ? dojo.keys.LEFT_ARROW : dojo.keys.RIGHT_ARROW): case (this._descending === false ? dojo.keys.UP_ARROW : dojo.keys.DOWN_ARROW): case (this._descending === false ? dojo.keys.PAGE_UP : dojo.keys.PAGE_DOWN): this.decrement(e); break; default: return; } dojo.stopEvent(e); }, _onHandleClick: function (e) { if (this.disabled || this.readOnly) { return; } if (!dojo.isIE) { dijit.focus(this.sliderHandle); } dojo.stopEvent(e); }, _isReversed: function () { return !this.isLeftToRight(); }, _onBarClick: function (e) { if (this.disabled || this.readOnly || !this.clickSelect) { return; } dijit.focus(this.sliderHandle); dojo.stopEvent(e); var _5f9 = dojo.position(this.sliderBarContainer, true); var _5fa = e[this._mousePixelCoord] - _5f9[this._startingPixelCoord]; this._setPixelValue(this._isReversed() ? (_5f9[this._pixelCount] - _5fa) : _5fa, _5f9[this._pixelCount], true); this._movable.onMouseDown(e); }, _setPixelValue: function (_5fb, _5fc, _5fd) { if (this.disabled || this.readOnly) { return; } _5fb = _5fb < 0 ? 0 : _5fc < _5fb ? _5fc : _5fb; var _5fe = this.discreteValues; if (_5fe <= 1 || _5fe == Infinity) { _5fe = _5fc; } _5fe--; var _5ff = _5fc / _5fe; var _600 = Math.round(_5fb / _5ff); this._setValueAttr((this.maximum - this.minimum) * _600 / _5fe + this.minimum, _5fd); }, _setValueAttr: function (_601, _602) { this.valueNode.value = this.value = _601; dijit.setWaiState(this.focusNode, "valuenow", _601); this.inherited(arguments); var _603 = (_601 - this.minimum) / (this.maximum - this.minimum); var _604 = (this._descending === false) ? this.remainingBar : this.progressBar; var _605 = (this._descending === false) ? this.progressBar : this.remainingBar; if (this._inProgressAnim && this._inProgressAnim.status != "stopped") { this._inProgressAnim.stop(true); } if (_602 && this.slideDuration > 0 && _604.style[this._progressPixelSize]) { var _606 = this; var _607 = {}; var _608 = parseFloat(_604.style[this._progressPixelSize]); var _609 = this.slideDuration * (_603 - _608 / 100); if (_609 == 0) { return; } if (_609 < 0) { _609 = 0 - _609; } _607[this._progressPixelSize] = { start: _608, end: _603 * 100, units: "%" }; this._inProgressAnim = dojo.animateProperty({ node: _604, duration: _609, onAnimate: function (v) { _605.style[_606._progressPixelSize] = (100 - parseFloat(v[_606._progressPixelSize])) + "%"; }, onEnd: function () { delete _606._inProgressAnim; }, properties: _607 }); this._inProgressAnim.play(); } else { _604.style[this._progressPixelSize] = (_603 * 100) + "%"; _605.style[this._progressPixelSize] = ((1 - _603) * 100) + "%"; } }, _bumpValue: function (_60a, _60b) { if (this.disabled || this.readOnly) { return; } var s = dojo.getComputedStyle(this.sliderBarContainer); var c = dojo._getContentBox(this.sliderBarContainer, s); var _60c = this.discreteValues; if (_60c <= 1 || _60c == Infinity) { _60c = c[this._pixelCount]; } _60c--; var _60d = (this.value - this.minimum) * _60c / (this.maximum - this.minimum) + _60a; if (_60d < 0) { _60d = 0; } if (_60d > _60c) { _60d = _60c; } _60d = _60d * (this.maximum - this.minimum) / _60c + this.minimum; this._setValueAttr(_60d, _60b); }, _onClkBumper: function (val) { if (this.disabled || this.readOnly || !this.clickSelect) { return; } this._setValueAttr(val, true); }, _onClkIncBumper: function () { this._onClkBumper(this._descending === false ? this.minimum : this.maximum); }, _onClkDecBumper: function () { this._onClkBumper(this._descending === false ? this.maximum : this.minimum); }, decrement: function (e) { this._bumpValue(e.charOrCode == dojo.keys.PAGE_DOWN ? -this.pageIncrement : -1); }, increment: function (e) { this._bumpValue(e.charOrCode == dojo.keys.PAGE_UP ? this.pageIncrement : 1); }, _mouseWheeled: function (evt) { dojo.stopEvent(evt); var _60e = !dojo.isMozilla; var _60f = evt[(_60e ? "wheelDelta" : "detail")] * (_60e ? 1 : -1); this._bumpValue(_60f < 0 ? -1 : 1, true); }, startup: function () { if (this._started) { return; } dojo.forEach(this.getChildren(), function (_610) { if (this[_610.container] != this.containerNode) { this[_610.container].appendChild(_610.domNode); } }, this); this.inherited(arguments); }, _typematicCallback: function (_611, _612, e) { if (_611 == -1) { this._setValueAttr(this.value, true); } else { this[(_612 == (this._descending ? this.incrementButton : this.decrementButton)) ? "decrement" : "increment"](e); } }, postCreate: function () { if (this.showButtons) { this.incrementButton.style.display = ""; this.decrementButton.style.display = ""; this._connects.push(dijit.typematic.addMouseListener(this.decrementButton, this, "_typematicCallback", 25, 500)); this._connects.push(dijit.typematic.addMouseListener(this.incrementButton, this, "_typematicCallback", 25, 500)); } this.connect(this.domNode, !dojo.isMozilla ? "onmousewheel" : "DOMMouseScroll", "_mouseWheeled"); var _613 = dojo.declare(dijit.form._SliderMover, { widget: this }); this._movable = new dojo.dnd.Moveable(this.sliderHandle, { mover: _613 }); var _614 = dojo.query("label[for=\"" + this.id + "\"]"); if (_614.length) { _614[0].id = (this.id + "_label"); dijit.setWaiState(this.focusNode, "labelledby", _614[0].id); } dijit.setWaiState(this.focusNode, "valuemin", this.minimum); dijit.setWaiState(this.focusNode, "valuemax", this.maximum); this.inherited(arguments); this._layoutHackIE7(); }, destroy: function () { this._movable.destroy(); if (this._inProgressAnim && this._inProgressAnim.status != "stopped") { this._inProgressAnim.stop(true); } this._supportingWidgets = dijit.findWidgets(this.domNode); this.inherited(arguments); } }); dojo.declare("dijit.form._SliderMover", dojo.dnd.Mover, { onMouseMove: function (e) { var _615 = this.widget; var _616 = _615._abspos; if (!_616) { _616 = _615._abspos = dojo.position(_615.sliderBarContainer, true); _615._setPixelValue_ = dojo.hitch(_615, "_setPixelValue"); _615._isReversed_ = _615._isReversed(); } var _617 = e[_615._mousePixelCoord] - _616[_615._startingPixelCoord]; _615._setPixelValue_(_615._isReversed_ ? (_616[_615._pixelCount] - _617) : _617, _616[_615._pixelCount], false); }, destroy: function (e) { dojo.dnd.Mover.prototype.destroy.apply(this, arguments); var _618 = this.widget; _618._abspos = null; _618._setValueAttr(_618.value, true); } }); } if (!dojo._hasResource["dijit.form.VerticalSlider"]) { dojo._hasResource["dijit.form.VerticalSlider"] = true; dojo.provide("dijit.form.VerticalSlider"); dojo.declare("dijit.form.VerticalSlider", dijit.form.HorizontalSlider, { templateString: dojo.cache("dijit.form", "templates/VerticalSlider.html", "<table class=\"dijit dijitReset dijitSlider dijitSliderV\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" rules=\"none\" dojoAttachEvent=\"onkeypress:_onKeyPress,onkeyup:_onKeyUp\"\r\n\t><tr class=\"dijitReset\"\r\n\t\t><td class=\"dijitReset\"></td\r\n\t\t><td class=\"dijitReset dijitSliderButtonContainer dijitSliderButtonContainerV\"\r\n\t\t\t><div class=\"dijitSliderIncrementIconV\" tabIndex=\"-1\" style=\"display:none\" dojoAttachPoint=\"decrementButton\"><span class=\"dijitSliderButtonInner\">+</span></div\r\n\t\t></td\r\n\t\t><td class=\"dijitReset\"></td\r\n\t></tr\r\n\t><tr class=\"dijitReset\"\r\n\t\t><td class=\"dijitReset\"></td\r\n\t\t><td class=\"dijitReset\"\r\n\t\t\t><center><div class=\"dijitSliderBar dijitSliderBumper dijitSliderBumperV dijitSliderTopBumper\" dojoAttachEvent=\"onmousedown:_onClkIncBumper\"></div></center\r\n\t\t></td\r\n\t\t><td class=\"dijitReset\"></td\r\n\t></tr\r\n\t><tr class=\"dijitReset\"\r\n\t\t><td dojoAttachPoint=\"leftDecoration\" class=\"dijitReset dijitSliderDecoration dijitSliderDecorationL dijitSliderDecorationV\"></td\r\n\t\t><td class=\"dijitReset\" style=\"height:100%;\"\r\n\t\t\t><input dojoAttachPoint=\"valueNode\" type=\"hidden\" ${!nameAttrSetting}\r\n\t\t\t/><center class=\"dijitReset dijitSliderBarContainerV\" waiRole=\"presentation\" dojoAttachPoint=\"sliderBarContainer\"\r\n\t\t\t\t><div waiRole=\"presentation\" dojoAttachPoint=\"remainingBar\" class=\"dijitSliderBar dijitSliderBarV dijitSliderRemainingBar dijitSliderRemainingBarV\" dojoAttachEvent=\"onmousedown:_onBarClick\"><!--#5629--></div\r\n\t\t\t\t><div waiRole=\"presentation\" dojoAttachPoint=\"progressBar\" class=\"dijitSliderBar dijitSliderBarV dijitSliderProgressBar dijitSliderProgressBarV\" dojoAttachEvent=\"onmousedown:_onBarClick\"\r\n\t\t\t\t\t><div class=\"dijitSliderMoveable dijitSliderMoveableV\" style=\"vertical-align:top;\"\r\n\t\t\t\t\t\t><div dojoAttachPoint=\"sliderHandle,focusNode\" class=\"dijitSliderImageHandle dijitSliderImageHandleV\" dojoAttachEvent=\"onmousedown:_onHandleClick\" waiRole=\"slider\" valuemin=\"${minimum}\" valuemax=\"${maximum}\"></div\r\n\t\t\t\t\t></div\r\n\t\t\t\t></div\r\n\t\t\t></center\r\n\t\t></td\r\n\t\t><td dojoAttachPoint=\"containerNode,rightDecoration\" class=\"dijitReset dijitSliderDecoration dijitSliderDecorationR dijitSliderDecorationV\"></td\r\n\t></tr\r\n\t><tr class=\"dijitReset\"\r\n\t\t><td class=\"dijitReset\"></td\r\n\t\t><td class=\"dijitReset\"\r\n\t\t\t><center><div class=\"dijitSliderBar dijitSliderBumper dijitSliderBumperV dijitSliderBottomBumper\" dojoAttachEvent=\"onmousedown:_onClkDecBumper\"></div></center\r\n\t\t></td\r\n\t\t><td class=\"dijitReset\"></td\r\n\t></tr\r\n\t><tr class=\"dijitReset\"\r\n\t\t><td class=\"dijitReset\"></td\r\n\t\t><td class=\"dijitReset dijitSliderButtonContainer dijitSliderButtonContainerV\"\r\n\t\t\t><div class=\"dijitSliderDecrementIconV\" tabIndex=\"-1\" style=\"display:none\" dojoAttachPoint=\"incrementButton\"><span class=\"dijitSliderButtonInner\">-</span></div\r\n\t\t></td\r\n\t\t><td class=\"dijitReset\"></td\r\n\t></tr\r\n></table>\r\n"), _mousePixelCoord: "pageY", _pixelCount: "h", _startingPixelCoord: "y", _startingPixelCount: "t", _handleOffsetCoord: "top", _progressPixelSize: "height", _descending: true, _isReversed: function () { return this._descending; } }); } if (!dojo._hasResource["dijit.form.HorizontalRule"]) { dojo._hasResource["dijit.form.HorizontalRule"] = true; dojo.provide("dijit.form.HorizontalRule"); dojo.declare("dijit.form.HorizontalRule", [dijit._Widget, dijit._Templated], { templateString: "<div class=\"dijitRuleContainer dijitRuleContainerH\"></div>", count: 3, container: "containerNode", ruleStyle: "", _positionPrefix: "<div class=\"dijitRuleMark dijitRuleMarkH\" style=\"left:", _positionSuffix: "%;", _suffix: "\"></div>", _genHTML: function (pos, ndx) { return this._positionPrefix + pos + this._positionSuffix + this.ruleStyle + this._suffix; }, _isHorizontal: true, postCreate: function () { var _619; if (this.count == 1) { _619 = this._genHTML(50, 0); } else { var i; var _61a = 100 / (this.count - 1); if (!this._isHorizontal || this.isLeftToRight()) { _619 = this._genHTML(0, 0); for (i = 1; i < this.count - 1; i++) { _619 += this._genHTML(_61a * i, i); } _619 += this._genHTML(100, this.count - 1); } else { _619 = this._genHTML(100, 0); for (i = 1; i < this.count - 1; i++) { _619 += this._genHTML(100 - _61a * i, i); } _619 += this._genHTML(0, this.count - 1); } } this.domNode.innerHTML = _619; } }); } if (!dojo._hasResource["dijit.form.VerticalRule"]) { dojo._hasResource["dijit.form.VerticalRule"] = true; dojo.provide("dijit.form.VerticalRule"); dojo.declare("dijit.form.VerticalRule", dijit.form.HorizontalRule, { templateString: "<div class=\"dijitRuleContainer dijitRuleContainerV\"></div>", _positionPrefix: "<div class=\"dijitRuleMark dijitRuleMarkV\" style=\"top:", _isHorizontal: false }); } if (!dojo._hasResource["dijit.form.HorizontalRuleLabels"]) { dojo._hasResource["dijit.form.HorizontalRuleLabels"] = true; dojo.provide("dijit.form.HorizontalRuleLabels"); dojo.declare("dijit.form.HorizontalRuleLabels", dijit.form.HorizontalRule, { templateString: "<div class=\"dijitRuleContainer dijitRuleContainerH dijitRuleLabelsContainer dijitRuleLabelsContainerH\"></div>", labelStyle: "", labels: [], numericMargin: 0, minimum: 0, maximum: 1, constraints: { pattern: "#%" }, _positionPrefix: "<div class=\"dijitRuleLabelContainer dijitRuleLabelContainerH\" style=\"left:", _labelPrefix: "\"><div class=\"dijitRuleLabel dijitRuleLabelH\">", _suffix: "</div></div>", _calcPosition: function (pos) { return pos; }, _genHTML: function (pos, ndx) { return this._positionPrefix + this._calcPosition(pos) + this._positionSuffix + this.labelStyle + this._labelPrefix + this.labels[ndx] + this._suffix; }, getLabels: function () { var _61b = this.labels; if (!_61b.length) { _61b = dojo.query("> li", this.srcNodeRef).map(function (node) { return String(node.innerHTML); }); } this.srcNodeRef.innerHTML = ""; if (!_61b.length && this.count > 1) { var _61c = this.minimum; var inc = (this.maximum - _61c) / (this.count - 1); for (var i = 0; i < this.count; i++) { _61b.push((i < this.numericMargin || i >= (this.count - this.numericMargin)) ? "" : dojo.number.format(_61c, this.constraints)); _61c += inc; } } return _61b; }, postMixInProperties: function () { this.inherited(arguments); this.labels = this.getLabels(); this.count = this.labels.length; } }); } if (!dojo._hasResource["dijit.form.VerticalRuleLabels"]) { dojo._hasResource["dijit.form.VerticalRuleLabels"] = true; dojo.provide("dijit.form.VerticalRuleLabels"); dojo.declare("dijit.form.VerticalRuleLabels", dijit.form.HorizontalRuleLabels, { templateString: "<div class=\"dijitRuleContainer dijitRuleContainerV dijitRuleLabelsContainer dijitRuleLabelsContainerV\"></div>", _positionPrefix: "<div class=\"dijitRuleLabelContainer dijitRuleLabelContainerV\" style=\"top:", _labelPrefix: "\"><span class=\"dijitRuleLabel dijitRuleLabelV\">", _calcPosition: function (pos) { return 100 - pos; }, _isHorizontal: false }); } if (!dojo._hasResource["esri.layers.dynamic"]) { dojo._hasResource["esri.layers.dynamic"] = true; dojo.provide("esri.layers.dynamic"); dojo.declare("esri.layers.DynamicMapServiceLayer", esri.layers.Layer, { constructor: function (url, _61d) { var dh = dojo.hitch; this._exportMapImageHandler = dh(this, this._exportMapImageHandler); this._imgSrcFunc = dh(this, this._imgSrcFunc); this._divAlphaImageFunc = dh(this, this._divAlphaImageFunc); this._tileLoadHandler = dh(this, this._tileLoadHandler); this._tileErrorHandler = dh(this, this._tileErrorHandler); }, opacity: 1, isPNG32: false, _setMap: function (map, _61e, _61f) { this._map = map; var d = (this._div = dojo.create("div", null, _61e)); var _620 = { position: "absolute", left: "0px", top: "0px", width: map.width + "px", height: map.height + "px", overflow: "visible", opacity: this.opacity }; var isIE = dojo.isIE; if (isIE && isIE > 7) { delete _620["opacity"]; } dojo.style(d, _620); this._layerIndex = _61f; var dc = dojo.connect; this._onPanHandler_connect = dc(map, "onPan", this, "_onPanHandler"); this._onExtentChangeHandler_connect = dc(map, "onExtentChange", this, "_onExtentChangeHandler"); if (this.timeInfo) { this._onTimeExtentChangeHandler_connect = dc(map, "onTimeExtentChange", this, "_onTimeExtentChangeHandler"); } this._unsetMap_connect = dc(map, "onUnload", this, "_unsetMap"); this._onZoomHandler_connect = dc(map, "onZoom", this, "_onZoomHandler"); this._onResizeHandler_connect = dc(map, "onResize", this, "_onResizeHandler"); this._opacityChangeHandler_connect = dc(this, "onOpacityChange", this, "_opacityChangeHandler"); this._visibilityChangeHandler_connect = dc(this, "onVisibilityChange", this, "_visibilityChangeHandler"); this._img_loading = null; this._img_dragOrigin = { x: 0, y: 0 }; if (!this.visible) { this._visibilityChangeHandler(this.visible); } else { if (map.extent && map.loaded) { this._onExtentChangeHandler(map.extent); } } return d; }, _unsetMap: function (map, _621) { if (_621) { this._div = _621.removeChild(this._div); } dojo.destroy(this._div); this._map = this._layerIndex = this._div = null; var dd = dojo.disconnect; dd(this._onPanHandler_connect); dd(this._onExtentChangeHandler_connect); dd(this._unsetMap_connect); dd(this._onZoomHandler_connect); dd(this._onResizeHandler_connect); dd(this._opacityChangeHandler_connect); dd(this._visibilityChangeHandler_connect); dd(this._onTimeExtentChangeHandler_connect); }, _onResizeHandler: function (_622, _623, _624) { dojo.style(this._div, { width: _623 + "px", height: _624 + "px" }); this._onExtentChangeHandler(_622); }, _visibilityChangeHandler: function (v) { var dc = dojo.connect, dd = dojo.disconnect; if (v) { if (this.timeInfo) { this._onTimeExtentChangeHandler_connect = dc(this._map, "onTimeExtentChange", this, "_onTimeExtentChangeHandler"); this.timeExtent = this._map.timeExtent; this._params.time = this.timeExtent ? this.timeExtent.toJson().join(",") : null; } this._onExtentChangeHandler(this._map.extent); this._onPanHandler_connect = dc(this._map, "onPan", this, "_onPanHandler"); this._onExtentChangeHandler_connect = dc(this._map, "onExtentChange", this, "_onExtentChangeHandler"); this._onZoomHandler_connect = dc(this._map, "onZoom", this, "_onZoomHandler"); } else { esri.hide(this._div); dd(this._onPanHandler_connect); dd(this._onExtentChangeHandler_connect); dd(this._onZoomHandler_connect); dd(this._onTimeExtentChangeHandler_connect); } }, _onPanHandler: function (_625, _626) { var _627 = this._img_dragOrigin, img = this._img; if (img) { dojo.style(img, { left: (_627.x + _626.x) + "px", top: (_627.y + _626.y) + "px" }); } }, _onExtentChangeHandler: function (_628) { if (!this.visible) { return; } this._fireUpdateStart(); var _629 = this._map, _62a = this._img, _62b = _62a && _62a.style, _62c = this._img_dragOrigin; if (_62a) { _62c.x = parseInt(_62b.left); _62c.y = parseInt(_62b.top); } else { _62c.x = (_62c.y = 0); } var _62d = this._img_loading; if (_62d) { dojo.disconnect(_62d._onload_connect); dojo.disconnect(_62d._onerror_connect); dojo.disconnect(_62d._onabort_connect); dojo.destroy(_62d); this._img_loading = null; var _62e = this._jsonRequest; if (_62e) { try { _62e.cancel(); } catch (e) { } this._jsonRequest = null; } } if (this.isPNG32) { var div = (this._img_loading = dojo.create("div")), _62f = this._div; div.id = _629.id + "_" + this.id + "_" + new Date().getTime(); dojo.style(div, { position: "absolute", left: "0px", top: "0px", width: _629.width + "px", height: _629.height + "px" }); var _630 = div.appendChild(dojo.create("div")); dojo.style(_630, { opacity: 0, width: _629.width + "px", height: _629.height + "px" }); this.getImageUrl(_628, _629.width, _629.height, this._divAlphaImageFunc); div = null; } else { var img = (this._img_loading = dojo.create("img")), _62f = this._div; img.id = _629.id + "_" + this.id + "_" + new Date().getTime(); var _631 = { position: "absolute", left: "0px", top: "0px", width: _629.width + "px", height: _629.height + "px" }; var isIE = dojo.isIE; if (isIE && isIE > 7) { _631.opacity = this.opacity; } dojo.style(img, _631); img._onload_connect = dojo.connect(img, "onload", this, "_onLoadHandler"); img._onerror_connect = dojo.connect(img, "onerror", this, "_onErrorHandler"); img._onabort_connect = dojo.connect(img, "onabort", this, "_onErrorHandler"); this._startRect = { left: _62c.x, top: _62c.y, width: _62a ? parseInt(_62b.width) : _629.width, height: _62a ? parseInt(_62b.height) : _629.height, zoom: (_62b && _62b.zoom) ? parseFloat(_62b.zoom) : 1 }; this.getImageUrl(_628, _629.width, _629.height, this._imgSrcFunc); img = null; } }, _onTimeExtentChangeHandler: function (_632) { if (!this.visible) { return; } this.timeExtent = _632; this._params.time = _632 ? _632.toJson().join(",") : null; this.refresh(true); }, getImageUrl: function (_633, wd, ht, _634) { }, _imgSrcFunc: function (src) { this._img_loading.src = src; }, _divAlphaImageFunc: function (src) { dojo.style(this._img_loading, "filter", "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='scale')"); this._onLoadHandler({ currentTarget: this._img_loading }); }, _onLoadHandler: function (evt) { var img = evt.currentTarget, dd = dojo.disconnect, _635 = this._map; dd(img._onload_connect); dd(img._onerror_connect); dd(img._onabort_connect); if (!_635 || _635.__panning) { dojo.destroy(img); this._fireUpdateEnd(); return; } dojox.xml.parser.removeChildren(this._div); this._img = img; this._startRect = { left: 0, top: 0, width: _635.width, height: _635.height, zoom: 1 }; this._div.appendChild(img); if (this.visible) { esri.show(this._div); } img._onload_connect = img._onerror_connect = img._onabort_connect = this._img_loading = null; _do = this._img_dragOrigin; _do.x = (_do.y = 0); this.onUpdate(); this._fireUpdateEnd(); }, _onErrorHandler: function (evt) { var img = evt.currentTarget, dd = dojo.disconnect; dojo.style(img, "visibility", "hidden"); dd(img._onload_connect); dd(img._onerror_connect); dd(img._onabort_connect); img._onload_connect = img._onerror_connect = img._onabort_connect = null; var _636 = new Error(esri.bundle.layers.dynamic.imageError + ": " + img.src); this.onError(_636); this._fireUpdateEnd(_636); }, refresh: function () { if (this._map) { this._onExtentChangeHandler(this._map.extent); } }, _onZoomHandler: function (_637, _638, _639) { var _63a = this._startRect, size = { width: _63a.width * _638, height: _63a.height * _638 }, img = this._img; if (img) { var isIE = dojo.isIE; if (isIE && isIE < 8) { dojo.style(img, { left: (_63a.left - ((size.width - _63a.width) * (_639.x - _63a.left) / _63a.width)) + "px", top: (_63a.top - ((size.height - _63a.height) * (_639.y - _63a.top) / _63a.height)) + "px", zoom: _638 * _63a.zoom }); } else { dojo.style(img, { left: (_63a.left - ((size.width - _63a.width) * (_639.x - _63a.left) / _63a.width)) + "px", top: (_63a.top - ((size.height - _63a.height) * (_639.y - _63a.top) / _63a.height)) + "px", width: size.width + "px", height: size.height + "px" }); } } }, _exportMapImage: function (url, _63b, _63c) { var _63d = this._exportMapImageHandler; esri.request({ url: url, content: _63b, callbackParamName: "callback", load: (function () { _63d(arguments[0], arguments[1], _63c); }), error: esri.config.defaults.io.errorHandler }); }, _exportMapImageHandler: function (_63e, io, _63f) { var _640 = new esri.layers.MapImage(_63e); this.onMapImageExport(_640); if (_63f) { _63f(_640); } }, onMapImageExport: function () { }, setOpacity: function (o) { if (this.opacity != o) { this.onOpacityChange(this.opacity = o); } }, onOpacityChange: function () { }, _opacityChangeHandler: function (_641) { dojo.style(this._div, "opacity", _641); } }); } if (!dojo._hasResource["esri.layers.agscommon"]) { dojo._hasResource["esri.layers.agscommon"] = true; dojo.provide("esri.layers.agscommon"); dojo.declare("esri.layers.ArcGISMapServiceLayer", null, { constructor: function (url, _642) { this.layerInfos = []; var _643 = (this._params = {}), _644 = this._url.query ? this._url.query.token : null; if (_644) { _643.token = _644; } }, _load: function () { esri.request({ url: this._url.path, content: dojo.mixin({ f: "json" }, this._params), callbackParamName: "callback", load: this._initLayer, error: this._errorHandler }); }, spatialReference: null, initialExtent: null, fullExtent: null, description: null, units: null, _initLayer: function (_645, io) { try { this.description = _645.description; this.copyright = _645.copyrightText; this.spatialReference = new esri.SpatialReference(_645.spatialReference); this.initialExtent = new esri.geometry.Extent(_645.initialExtent); this.fullExtent = new esri.geometry.Extent(_645.fullExtent); this.units = _645.units; var _646 = (this.layerInfos = []), lyrs = _645.layers, dvl = (this._defaultVisibleLayers = []); dojo.forEach(lyrs, function (lyr, i) { _646[i] = new esri.layers.LayerInfo(lyr); if (lyr.defaultVisibility) { dvl.push(lyr.id); } }); if (!this.visibleLayers) { this.visibleLayers = dvl; } this.version = _645.currentVersion; if (!this.version) { var ver; if ("capabilities" in _645 || "tables" in _645) { ver = 10; } else { if ("supportedImageFormatTypes" in _645) { ver = 9.31; } else { ver = 9.3; } } this.version = ver; } this.capabilities = _645.capabilities; } catch (e) { this._errorHandler(e); } } }); dojo.declare("esri.layers.LayerInfo", null, { constructor: function (json) { dojo.mixin(this, json); } }); dojo.declare("esri.layers.TimeInfo", null, { constructor: function (json) { if (json !== null) { dojo.mixin(this, json); if (json.exportOptions) { this.exportOptions = new esri.layers.LayerTimeOptions(json.exportOptions); } this.timeExtent = new esri.TimeExtent(json.timeExtent); this.timeReference = new esri.layers.TimeReference(json.timeReference); } } }); dojo.mixin(esri.layers.TimeInfo, { UNIT_CENTURIES: "esriTimeUnitsCenturies", UNIT_DAYS: "esriTimeUnitsDays", UNIT_DECADES: "esriTimeUnitsDecades", UNIT_HOURS: "esriTimeUnitsHours", UNIT_MILLISECONDS: "esriTimeUnitsMilliseconds", UNIT_MINUTES: "esriTimeUnitsMinutes", UNIT_MONTHS: "esriTimeUnitsMonths", UNIT_SECONDS: "esriTimeUnitsSeconds", UNIT_UNKNOWN: "esriTimeUnitsUnknown", UNIT_WEEKS: "esriTimeUnitsWeeks", UNIT_YEARS: "esriTimeUnitsYears" }); dojo.declare("esri.layers.LayerTimeOptions", null, { constructor: function (json) { if (json) { dojo.mixin(this, json); } }, toJson: function () { var json = { timeDataCumulative: this.timeDataCumulative, timeOffset: this.timeOffset, timeOffsetUnits: this.timeOffsetUnits, useTime: this.useTime }; return dojo.toJson(json); } }); dojo.declare("esri.layers.TimeReference", null, { constructor: function (json) { if (json) { dojo.mixin(this, json); } } }); dojo.declare("esri.layers.Field", null, { constructor: function (json) { if (json && dojo.isObject(json)) { this.name = json.name; this.type = json.type; this.alias = json.alias; this.length = json.length; this.editable = json.editable; var _647 = json.domain; if (_647 && dojo.isObject(_647)) { switch (_647.type) { case "range": this.domain = new esri.layers.RangeDomain(_647); break; case "codedValue": this.domain = new esri.layers.CodedValueDomain(_647); break; } } } } }); dojo.declare("esri.layers.Domain", null, { constructor: function (json) { if (json && dojo.isObject(json)) { this.name = json.name; this.type = json.type; } }, toJson: function () { return esri._sanitize({ name: this.name, type: this.type }); } }); dojo.declare("esri.layers.RangeDomain", [esri.layers.Domain], { constructor: function (json) { if (json && dojo.isObject(json)) { this.minValue = json.range[0]; this.maxValue = json.range[1]; } }, toJson: function () { var json = this.inherited(arguments); json.range = [this.minValue, this.maxValue]; return esri._sanitize(json); } }); dojo.declare("esri.layers.CodedValueDomain", [esri.layers.Domain], { constructor: function (json) { if (json && dojo.isObject(json)) { this.codedValues = json.codedValues; } }, toJson: function () { var json = this.inherited(arguments); json.codedValues = dojo.clone(this.codedValues); return esri._sanitize(json); } }); dojo.declare("esri.layers.InheritedDomain", [esri.layers.Domain], {}); } if (!dojo._hasResource["esri._time"]) { dojo._hasResource["esri._time"] = true; dojo.provide("esri._time"); dojo.declare("esri.TimeExtent", null, { constructor: function (json) { if (arguments.length > 1) { this._create(arguments[0], arguments[1]); } else { if (json) { if (dojo.isArray(json)) { var _648 = json[0], end = json[1]; this.startTime = (_648 === null || _648 === "null") ? null : new Date(_648); this.endTime = (end === null || end === "null") ? null : new Date(end); } else { if (json instanceof Date) { this._create(json, null); } } } } }, offset: function (_649, _64a) { var _64b = new esri.TimeExtent(); var _64c = this.startTime, end = this.endTime; if (_64c) { _64b.startTime = this._getOffsettedDate(_64c, _649, _64a); } if (end) { _64b.endTime = this._getOffsettedDate(end, _649, _64a); } return _64b; }, intersection: function (_64d) { return this._intersection(this, _64d); }, toJson: function () { var _64e = []; var _64f = this.startTime; _64e.push(_64f ? _64f.getTime() : "null"); var end = this.endTime; _64e.push(end ? end.getTime() : "null"); return _64e; }, _create: function (_650, end) { this.startTime = _650 ? new Date(_650) : null; this.endTime = end ? new Date(end) : null; }, _refData: { "esriTimeUnitsMilliseconds": { getter: "getUTCMilliseconds", setter: "setUTCMilliseconds", multiplier: 1 }, "esriTimeUnitsSeconds": { getter: "getUTCSeconds", setter: "setUTCSeconds", multiplier: 1 }, "esriTimeUnitsMinutes": { getter: "getUTCMinutes", setter: "setUTCMinutes", multiplier: 1 }, "esriTimeUnitsHours": { getter: "getUTCHours", setter: "setUTCHours", multiplier: 1 }, "esriTimeUnitsDays": { getter: "getUTCDate", setter: "setUTCDate", multiplier: 1 }, "esriTimeUnitsWeeks": { getter: "getUTCDate", setter: "setUTCDate", multiplier: 7 }, "esriTimeUnitsMonths": { getter: "getUTCMonth", setter: "setUTCMonth", multiplier: 1 }, "esriTimeUnitsYears": { getter: "getUTCFullYear", setter: "setUTCFullYear", multiplier: 1 }, "esriTimeUnitsDecades": { getter: "getUTCFullYear", setter: "setUTCFullYear", multiplier: 10 }, "esriTimeUnitsCenturies": { getter: "getUTCFullYear", setter: "setUTCFullYear", multiplier: 100} }, _intersection: function (_651, _652) { if (_651 && _652) { var _653 = _651.startTime, end1 = _651.endTime; var _654 = _652.startTime, end2 = _652.endTime; _653 = _653 ? _653.getTime() : -Infinity; _654 = _654 ? _654.getTime() : -Infinity; end1 = end1 ? end1.getTime() : Infinity; end2 = end2 ? end2.getTime() : Infinity; var _655, end; if (_654 >= _653 && _654 <= end1) { _655 = _654; } else { if (_653 >= _654 && _653 <= end2) { _655 = _653; } } if (end1 >= _654 && end1 <= end2) { end = end1; } else { if (end2 >= _653 && end2 <= end1) { end = end2; } } if (!isNaN(_655) && !isNaN(end)) { var _656 = new esri.TimeExtent(); _656.startTime = (_655 === -Infinity) ? null : new Date(_655); _656.endTime = (end === Infinity) ? null : new Date(end); return _656; } else { return null; } } else { return null; } }, _getOffsettedDate: function (_657, _658, _659) { var data = this._refData; var _65a = new Date(_657.getTime()); if (_658 && _659) { var data = data[_659]; _65a[data.setter](_65a[data.getter]() + (_658 * data.multiplier)); } return _65a; } }); dojo.declare("esri.TimeReference", null, { constructor: function (json) { if (json) { dojo.mixin(this, json); } } }); } if (!dojo._hasResource["esri.layers.agsdynamic"]) { dojo._hasResource["esri.layers.agsdynamic"] = true; dojo.provide("esri.layers.agsdynamic"); dojo.declare("esri.layers.ArcGISDynamicMapServiceLayer", [esri.layers.DynamicMapServiceLayer, esri.layers.ArcGISMapServiceLayer], { constructor: function (url, _65b) { var _65c = _65b && _65b.imageParameters, dh = dojo.hitch; if (_65c) { var ldef = _65c.layerDefinitions; if (ldef) { this.setLayerDefinitions(ldef); } if (_65c.layerOption === esri.layers.ImageParameters.LAYER_OPTION_SHOW) { this.visibleLayers = [].concat(_65c.layerIds); } } this._setIsPNG32 = dh(this, this._setIsPNG32); this.dpi = (_65c && _65c.dpi) || 96; this.imageFormat = (_65c && _65c.format) || "png8"; this.imageTransparency = (_65c && _65c.transparent === false) ? false : true; this._setIsPNG32(); dojo.mixin(this._params, this._url.query, { dpi: this.dpi, transparent: this.imageTransparency, format: this.imageFormat }, _65c ? _65c.toJson() : {}); this.getImageUrl = dh(this, this.getImageUrl); this._initLayer = dh(this, this._initLayer); this._load = dh(this, this._load); this.useMapImage = _65b ? _65b.useMapImage : false; if (this.useMapImage) { this._imageExportHandler = dh(this, this._imageExportHandler); } this._loadCallback = _65b && _65b.loadCallback; var _65d = _65b && _65b.resourceInfo; if (_65d) { this._initLayer(_65d); } else { if (arguments[2] === undefined || arguments[2] === false) { this._load(); } } }, disableClientCaching: false, layerDefinitions: null, _initLayer: function (_65e, io) { this.inherited(arguments); if (_65e.timeInfo) { this.timeInfo = new esri.layers.TimeInfo(_65e.timeInfo); } this.loaded = true; this.onLoad(this); var _65f = this._loadCallback; if (_65f) { delete this._loadCallback; _65f(this); } }, getImageUrl: function (_660, _661, _662, _663) { var path = this._url.path + "/export?", _664 = this._params, sr = _660.spatialReference.wkid || dojo.toJson(_660.spatialReference.toJson()), _665 = this._errorHandler; delete _664._ts; dojo.mixin(_664, { bbox: _660.xmin + "," + _660.ymin + "," + _660.xmax + "," + _660.ymax, bboxSR: sr, imageSR: sr, size: _661 + "," + _662 }, this.disableClientCaching ? { _ts: new Date().getTime()} : {}); if (_664.layerDefs) { var defs = _664.layerDefs; delete _664.layerDefs; dojo.mixin(_664, { layerDefs: defs }); } var _666 = esri._getProxiedUrl(path + dojo.objectToQuery(dojo.mixin({}, _664, { f: "image" }))); if ((_666.length > esri.config.defaults.io.postLength) || this.useMapImage) { var _667 = this._imageExportHandler; this._jsonRequest = esri.request({ url: path, content: dojo.mixin(_664, { f: "json" }), callbackParamName: "callback", load: function (_668, io) { _667(_668, io, _663); }, error: _665 }); } else { _663(_666); } }, _imageExportHandler: function (_669, io, _66a) { _66a(esri._getProxiedUrl(_669.href)); }, _setIsPNG32: function () { var _66b = this.imageFormat.toLowerCase(); var isIE = dojo.isIE; this.isPNG32 = isIE && isIE === 6 && (_66b === "png32" || _66b === "png24") && this.imageTransparency; }, setDPI: function (dpi) { this.dpi = (this._params.dpi = dpi); this.refresh(true); }, setImageFormat: function (_66c) { this.imageFormat = (this._params.format = _66c); this._setIsPNG32(); this.refresh(true); }, setImageTransparency: function (_66d) { this.imageTransparency = (this._params.transparent = _66d); this._setIsPNG32(); this.refresh(true); }, setVisibleLayers: function (_66e) { this.visibleLayers = _66e; this._params.layers = esri.layers.ImageParameters.LAYER_OPTION_SHOW + ":" + _66e.join(","); this.refresh(true); }, setDefaultVisibleLayers: function () { this.visibleLayers = this._defaultVisibleLayers; this._params.layers = null; this.refresh(true); }, setLayerDefinitions: function (_66f) { this.layerDefinitions = _66f; this._params.layerDefs = esri._serializeLayerDefinitions(_66f); this.refresh(true); }, setDefaultLayerDefinitions: function () { this.layerDefinitions = this._params.layerDefs = null; this.refresh(true); }, setDisableClientCaching: function (_670) { this.disableClientCaching = _670; }, setLayerTimeOptions: function (_671) { this.layerTimeOptions = _671; var _672 = []; dojo.forEach(_671, function (_673, i) { if (_673) { _672.push(i + ":" + _673.toJson()); } }); this._params.layerTimeOptions = (_672.length > 0) ? _672.join(",") : null; this.refresh(true); }, refresh: function (_674) { if (_674) { this.inherited(arguments); } else { var dc = this.disableClientCaching; this.disableClientCaching = true; this.inherited(arguments); this.disableClientCaching = dc; } }, exportMapImage: function (_675, _676) { var m = esri.config.defaults.map, p = dojo.mixin({ size: m.width + "," + m.height }, this._params, _675 ? _675.toJson() : {}, { f: "json" }); delete p._ts; if (p.layerDefs) { var defs = p.layerDefs; delete p.layerDefs; dojo.mixin(p, { layerDefs: defs }); } this._exportMapImage(this._url.path + "/export", p, _676); } }); dojo.declare("esri.layers.ImageParameters", null, { constructor: function () { this.layerDefinitions = []; this._bundle = dojo.i18n.getLocalization("esri", "jsapi"); }, bbox: null, extent: null, width: null, height: null, dpi: null, format: null, imageSpatialReference: null, layerOption: null, layerIds: null, transparent: null, timeExtent: null, layerTimeOptions: null, toJson: function () { if (this.bbox) { dojo.deprecated(this.declaredClass + " : " + this._bundle.layers.imageParameters.deprecateBBox); } var bb = this.bbox || this.extent, _677 = this.layerOption, wkid = bb ? (bb.spatialReference.wkid || dojo.toJson(bb.spatialReference.toJson())) : null, _678 = this.imageSpatialReference, json = { dpi: this.dpi, format: this.format, transparent: this.transparent, size: (this.width !== null && this.height !== null ? this.width + "," + this.height : null), bbox: (bb ? (bb.xmin + "," + bb.ymin + "," + bb.xmax + "," + bb.ymax) : null), bboxSR: wkid, layers: (_677 ? _677 + ":" + this.layerIds.join(",") : null), imageSR: (_678 ? (_678.wkid || dojo.toJson(_678.toJson())) : wkid) }, _679 = []; json.layerDefs = esri._serializeLayerDefinitions(this.layerDefinitions); var _67a = this.timeExtent; json.time = _67a ? _67a.toJson().join(",") : null; var _67b = this.layerTimeOptions; dojo.forEach(_67b, function (_67c, i) { if (_67c) { _679.push(i + ":" + _67c.toJson()); } }); if (_679.length > 0) { json.layerTimeOptions = _679.join(","); } return esri.filter(json, function (_67d) { if (_67d !== null) { return true; } }); } }); dojo.mixin(esri.layers.ImageParameters, { LAYER_OPTION_SHOW: "show", LAYER_OPTION_HIDE: "hide", LAYER_OPTION_INCLUDE: "include", LAYER_OPTION_EXCLUDE: "exclude" }); dojo.declare("esri.layers.MapImage", null, { constructor: function (json) { dojo.mixin(this, json); this.extent = new esri.geometry.Extent(this.extent); } }); } if (!dojo._hasResource["dojox.collections._base"]) { dojo._hasResource["dojox.collections._base"] = true; dojo.provide("dojox.collections._base"); dojox.collections.DictionaryEntry = function (k, v) { this.key = k; this.value = v; this.valueOf = function () { return this.value; }; this.toString = function () { return String(this.value); }; }; dojox.collections.Iterator = function (arr) { var a = arr; var _67e = 0; this.element = a[_67e] || null; this.atEnd = function () { return (_67e >= a.length); }; this.get = function () { if (this.atEnd()) { return null; } this.element = a[_67e++]; return this.element; }; this.map = function (fn, _67f) { return dojo.map(a, fn, _67f); }; this.reset = function () { _67e = 0; this.element = a[_67e]; }; }; dojox.collections.DictionaryIterator = function (obj) { var a = []; var _680 = {}; for (var p in obj) { if (!_680[p]) { a.push(obj[p]); } } var _681 = 0; this.element = a[_681] || null; this.atEnd = function () { return (_681 >= a.length); }; this.get = function () { if (this.atEnd()) { return null; } this.element = a[_681++]; return this.element; }; this.map = function (fn, _682) { return dojo.map(a, fn, _682); }; this.reset = function () { _681 = 0; this.element = a[_681]; }; }; } if (!dojo._hasResource["dojox.collections.ArrayList"]) { dojo._hasResource["dojox.collections.ArrayList"] = true; dojo.provide("dojox.collections.ArrayList"); dojox.collections.ArrayList = function (arr) { var _683 = []; if (arr) { _683 = _683.concat(arr); } this.count = _683.length; this.add = function (obj) { _683.push(obj); this.count = _683.length; }; this.addRange = function (a) { if (a.getIterator) { var e = a.getIterator(); while (!e.atEnd()) { this.add(e.get()); } this.count = _683.length; } else { for (var i = 0; i < a.length; i++) { _683.push(a[i]); } this.count = _683.length; } }; this.clear = function () { _683.splice(0, _683.length); this.count = 0; }; this.clone = function () { return new dojox.collections.ArrayList(_683); }; this.contains = function (obj) { for (var i = 0; i < _683.length; i++) { if (_683[i] == obj) { return true; } } return false; }; this.forEach = function (fn, _684) { dojo.forEach(_683, fn, _684); }; this.getIterator = function () { return new dojox.collections.Iterator(_683); }; this.indexOf = function (obj) { for (var i = 0; i < _683.length; i++) { if (_683[i] == obj) { return i; } } return -1; }; this.insert = function (i, obj) { _683.splice(i, 0, obj); this.count = _683.length; }; this.item = function (i) { return _683[i]; }; this.remove = function (obj) { var i = this.indexOf(obj); if (i >= 0) { _683.splice(i, 1); } this.count = _683.length; }; this.removeAt = function (i) { _683.splice(i, 1); this.count = _683.length; }; this.reverse = function () { _683.reverse(); }; this.sort = function (fn) { if (fn) { _683.sort(fn); } else { _683.sort(); } }; this.setByIndex = function (i, obj) { _683[i] = obj; this.count = _683.length; }; this.toArray = function () { return [].concat(_683); }; this.toString = function (_685) { return _683.join((_685 || ",")); }; }; } if (!dojo._hasResource["esri.layers.tiled"]) { dojo._hasResource["esri.layers.tiled"] = true; dojo.provide("esri.layers.tiled"); dojo.declare("esri.layers.TiledMapServiceLayer", esri.layers.Layer, { constructor: function (url, _686) { dojo.connect(this, "onLoad", this, "_initTiledLayer"); this._displayLevels = _686 ? _686.displayLevels : null; var dh = dojo.hitch; this._addImage = dh(this, this._addImage); this._tileLoadHandler = dh(this, this._tileLoadHandler); this._tileErrorHandler = dh(this, this._tileErrorHandler); this._tilePopPop = dh(this, this._tilePopPop); this._cleanUpRemovedImages = dh(this, this._cleanUpRemovedImages); this._fireOnUpdateEvent = dh(this, this._fireOnUpdateEvent); }, opacity: 1, isPNG32: false, _initTiledLayer: function () { var ti = this.tileInfo, lods = ti.lods; this._tileOrigin = new esri.geometry.Point(dojo.mixin(ti.origin, this.spatialReference)); this._tileW = ti.width; this._tileH = ti.height; var _687 = (this.scales = []), dl = this._displayLevels, fe = this.fullExtent, ul = new esri.geometry.Point(fe.xmin, fe.ymax), lr = new esri.geometry.Point(fe.xmax, fe.ymin), gctc = esri.TileUtils.getContainingTileCoords, _688, lod; for (var i = 0, il = lods.length; i < il; i++) { lod = lods[i]; _688 = gctc(ti, ul, lod); lod.startTileRow = _688.row < 0 ? 0 : _688.row; lod.startTileCol = _688.col < 0 ? 0 : _688.col; _688 = gctc(ti, lr, lod); lod.endTileRow = _688.row; lod.endTileCol = _688.col; if (!dl || dojo.indexOf(dl, lod.level) != -1) { _687[i] = lod.scale; } } this._patchIE = dojo.isIE >= 6 && dojo.isIE < 7 && (this.isPNG32 || ti.format === "Mixed"); }, _setMap: function (map, _689, _68a, lod) { this._map = map; var d = (this._div = dojo.create("div", null, _689)); this._layerIndex = _68a; var _68b = map.__visibleDelta, dc = dojo.connect; dojo.style(d, { position: "absolute", left: -_68b.x + "px", top: -_68b.y + "px", width: map.width + "px", height: map.height + "px", overflow: "visible" }); this._onExtentChangeHandler_connect = dc(map, "onExtentChange", this, "_onExtentChangeHandler"); this._onPanHandler_connect = dc(map, "onPan", this, "_onPanHandler"); this._onZoomHandler_connect = dc(map, "onZoom", this, "_onZoomHandler"); this._unsetMap_connect = dc(map, "onUnload", this, "_unsetMap"); this._onResizeHandler_connect = dc(map, "onResize", this, "_onResizeHandler"); this._opacityChangeHandler_connect = dc(this, "onOpacityChange", this, "_opacityChangeHandler"); this._visibilityChangeHandler_connect = dc(this, "onVisibilityChange", this, "_visibilityChangeHandler"); this._tileIds = []; this._tiles = []; this._tileBounds = []; this._ct = null; this._removeList = new dojox.collections.ArrayList(); this._loadingList = new dojox.collections.ArrayList(); var _68c = map.extent; if (!this.visible) { this._visibilityChangeHandler(this.visible); } if (_68c && map.loaded) { this._onExtentChangeHandler(_68c, null, null, lod); } return d; }, _unsetMap: function (map, _68d) { if (_68d) { this._div = _68d.removeChild(this._div); } dojo.destroy(this._div); this._map = this._layerIndex = this._div = null; var dd = dojo.disconnect; dd(this._onExtentChangeHandler_connect); dd(this._onPanHandler_connect); dd(this._onZoomHandler_connect); dd(this._onLayerReorderHandler_connect); dd(this._onResizeHandler_connect); dd(this._opacityChangeHandler_connect); dd(this._visibilityChangeHandler_connect); dd(this._unsetMap_connect); }, _visibilityChangeHandler: function (v) { if (v) { esri.show(this._div); var map = this._map; this._onPanHandler_connect = dojo.connect(map, "onPan", this, "_onPanHandler"); this._onZoomHandler_connect = dojo.connect(map, "onZoom", this, "_onZoomHandler"); this._onExtentChangeHandler(map.extent, null, true); } else { esri.hide(this._div); dojo.disconnect(this._onPanHandler_connect); dojo.disconnect(this._onZoomHandler_connect); } }, _onResizeHandler: function (_68e, _68f, _690) { dojo.style(this._div, { width: _68f + "px", height: _690 + "px" }); }, _onExtentChangeHandler: function (_691, _692, _693, lod) { var _694 = true; this._refreshArgs = { extent: _691, lod: lod }; if (!this.visible) { _694 = false; } var map = this._map, _695; if (lod) { _695 = dojo.indexOf(this.scales, lod.scale) == -1; } else { var _696 = map.getLevel(), _697 = (_696 != -1) ? map._params.tileInfo.lods[_696].scale : -1; _695 = (dojo.indexOf(this.scales, _697) == -1); } if (_694) { var dd = dojo.disconnect; if (_695) { _694 = false; esri.hide(this._div); dd(this._onPanHandler_connect); dd(this._onZoomHandler_connect); } else { this._fireUpdateStart(); esri.show(this._div); dd(this._onPanHandler_connect); dd(this._onZoomHandler_connect); this._onPanHandler_connect = dojo.connect(map, "onPan", this, "_onPanHandler"); this._onZoomHandler_connect = dojo.connect(map, "onZoom", this, "_onZoomHandler"); } } this._rrIndex = 0; var ct = esri.TileUtils.getCandidateTileInfo(map, this.tileInfo, _691), mv = map.__visibleDelta; if (!this._ct || ct.lod.level != this._ct.lod.level || _693) { this._ct = ct; var _698 = this._tiles, _699 = this._tileIds, _69a = this._tileBounds, _69b = this._removeList, tile, id; this._cleanUpRemovedImages(); for (var i = 0, il = _699.length; i < il; i++) { id = _699[i]; tile = _698[id]; _69a[id] = _699[i] = null; _69b.add(tile); } if (_693) { this._tileIds = []; this._tiles = []; this._tileBounds = []; } } var mx = mv.x, my = mv.y; dojo.style(this._div, { left: mx + "px", top: my + "px" }); if (_694 && !_695) { this.__coords_dx = mx; this.__coords_dy = my; this._updateImages(new esri.geometry.Rect(0, 0, mv.width, mv.height)); if (this._loadingList.count === 0) { this.onUpdate(); this._fireUpdateEnd(); } else { this._fireOnUpdate = true; } } else { this._cleanUpRemovedImages(); } var id, _69c, img, _69d = this._tileW, _69e = this._tileH; mv = new esri.geometry.Rect(-mv.x, -mv.y, mv.width, mv.height); for (var i = this._tileIds.length - 1; i >= 0; i--) { id = this._tileIds[i]; if (id) { img = this._tiles[id]; _69c = dojo.coords(img); var rect = new esri.geometry.Rect(_69c.l, _69c.t, _69d, _69e); if (mv.intersects(rect)) { this._tileBounds[id] = rect; } else { if (this._loadingList.contains(id)) { this._tilePopPop(img); } dojo.destroy(img); this._tileIds.splice(i, 1); delete this._tileBounds[id]; delete this._tiles[id]; } } else { this._tileIds.splice(i, 1); delete this._tileBounds[id]; delete this._tiles[id]; } } }, _onPanHandler: function (_69f, _6a0) { var m = this._map, mv = m.__visibleDelta.offset(_6a0.x, _6a0.y); dojo.style(this._div, { left: mv.x + "px", top: mv.y + "px" }); this.__coords_dx = this.__coords_dy = 0; this._updateImages({ x: -mv.x, y: -mv.y, width: mv.width, height: mv.height }); }, _onZoomHandler: function (_6a1, _6a2, _6a3) { var _6a4 = dojo.coords(this._div); _6a3 = _6a3.offset(-_6a4.l, -_6a4.t); var id, _6a5, _6a6 = this._tileW * _6a2, _6a7 = this._tileH * _6a2, _6a8 = this._tileBounds, _6a9 = this._tiles, es = dojo.style; var _6aa; var isIE = dojo.isIE; if (isIE && isIE < 8) { dojo.forEach(this._tileIds, function (id) { _6a5 = _6a8[id]; es(_6a9[id], { left: (_6a5.x - ((_6a6 - _6a5.width) * (_6a3.x - _6a5.x) / _6a5.width)) + "px", top: (_6a5.y - ((_6a7 - _6a5.height) * (_6a3.y - _6a5.y) / _6a5.height)) + "px", zoom: _6a2 }); }); } else { dojo.forEach(this._tileIds, function (id) { _6a5 = _6a8[id]; es(_6a9[id], { left: (_6a5.x - ((_6a6 - _6a5.width) * (_6a3.x - _6a5.x) / _6a5.width)) + "px", top: (_6a5.y - ((_6a7 - _6a5.height) * (_6a3.y - _6a5.y) / _6a5.height)) + "px", width: _6a6 + "px", height: _6a7 + "px" }); }); } }, _updateImages: function (rect) { var id, _6ab = this._tileW, _6ac = this._tileH, _6ad = this._ct, lod = _6ad.lod, tile = _6ad.tile, off = tile.offsets, _6ae = tile.coords, cr = _6ae.row, cc = _6ae.col, _6af = lod.level, _6b0 = this.opacity, _6b1 = this._tileIds, _6b2 = this._loadingList, _6b3 = this._addImage, _6b4 = this._roundrobin, mId = this._map.id, tId = this.id, rx = rect.x, ry = rect.y, str = lod.startTileRow, etr = lod.endTileRow, stc = lod.startTileCol, etc = lod.endTileCol, _6b5 = dojo.indexOf, r, c, mvx = -rect.x, mvy = -rect.y, _6b6 = off.x - this.__coords_dx, _6b7 = off.y - this.__coords_dy, vx = ((_6ab - _6b6) + mvx), vy = ((_6ac - _6b7) + mvy), ceil = Math.ceil, _6b8 = (vx > 0) ? (vx % _6ab) : ((_6ab - (Math.abs(vx) % _6ab))), _6b9 = (vy > 0) ? (vy % _6ac) : ((_6ac - (Math.abs(vy) % _6ac))), _6ba = (rx > 0) ? Math.floor((rx + _6b6) / _6ab) : ceil((rx - (_6ab - _6b6)) / _6ab), _6bb = (ry > 0) ? Math.floor((ry + _6b7) / _6ac) : ceil((ry - (_6ac - _6b7)) / _6ac), _6bc = _6ba + ceil((rect.width - _6b8) / _6ab), _6bd = _6bb + ceil((rect.height - _6b9) / _6ac); for (var col = _6ba; col <= _6bc; col++) { for (var row = _6bb; row <= _6bd; row++) { r = cr + row; c = cc + col; if (r >= str && r <= etr && c >= stc && c <= etc) { id = mId + "_" + tId + "_tile_" + _6af + "_" + r + "_" + c; if (_6b5(_6b1, id) === -1) { _6b2.add(id); _6b1.push(id); _6b3(_6af, row, r, col, c, id, _6ab, _6ac, _6b0, tile, off); } } } } }, _cleanUpRemovedImages: function () { var list = this._removeList, dd = dojo.destroy; list.forEach(function (img) { img.style.filter = ""; img.style.zoom = 1; dd(img); }); list.clear(); }, _addImage: function (_6be, row, r, col, c, id, _6bf, _6c0, _6c1, tile, _6c2) { if (this._patchIE) { var div = (this._tiles[id] = dojo.create("div")); div.id = id; dojo.addClass(div, "layerTile"); dojo.style(div, { left: ((_6bf * col) - _6c2.x) + "px", top: ((_6c0 * row) - _6c2.y) + "px", width: _6bf + "px", height: _6c0 + "px", filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.getTileUrl(_6be, r, c) + "', sizingMethod='scale')" }); if (_6c1 < 1) { dojo.style(div, "opacity", _6c1); } var _6c3 = div.appendChild(dojo.create("div")); dojo.style(_6c3, { opacity: 0, width: _6bf + "px", height: _6c0 + "px" }); this._div.appendChild(div); div = null; this._loadingList.remove(id); this._fireOnUpdateEvent(); } else { var img = (this._tiles[id] = dojo.create("img")), dc = dojo.connect; img.id = id; dojo.addClass(img, "layerTile"); dojo.style(img, { left: ((_6bf * col) - _6c2.x) + "px", top: ((_6c0 * row) - _6c2.y) + "px", width: _6bf + "px", height: _6c0 + "px", visibility: "hidden" }); if (_6c1 < 1) { dojo.style(img, "opacity", _6c1); } img._onload_connect = dc(img, "onload", this, "_tileLoadHandler"); img._onerror_connect = dc(img, "onerror", this, "_tileErrorHandler"); img._onabort_connect = dc(img, "onabort", this, "_tileErrorHandler"); img.src = this.getTileUrl(_6be, r, c); this._div.appendChild(img); img = null; } }, getTileUrl: function (_6c4, row, col) { }, refresh: function () { var ra = this._refreshArgs; this._onExtentChangeHandler(ra.extent, null, true, ra.lod); }, _tilePopPop: function (img) { var dd = dojo.disconnect; dd(img._onload_connect); dd(img._onerror_connect); dd(img._onabort_connect); img._onload_connect = img._onerror_connect = img._onabort_connect = null; this._loadingList.remove(img.id); this._fireOnUpdateEvent(); }, _tileLoadHandler: function (evt) { var img = evt.currentTarget; dojo.style(img, "visibility", "visible"); this._tilePopPop(img); }, _tileErrorHandler: function (evt) { var img = evt.currentTarget; this.onError(new Error(esri.bundle.layers.tiled.tileError + ": " + img.src)); dojo.style(img, "visibility", "hidden"); this._tilePopPop(img); }, _fireOnUpdateEvent: function () { if (this._loadingList.count === 0) { this._cleanUpRemovedImages(); if (this._fireOnUpdate) { this._fireOnUpdate = false; this.onUpdate(); this._fireUpdateEnd(); } } }, setOpacity: function (o) { if (this.opacity != o) { this.onOpacityChange(this.opacity = o); } }, onOpacityChange: function () { }, _opacityChangeHandler: function (_6c5) { var djs = dojo.style; dojo.forEach(this._div.childNodes, function (node) { djs(node, "opacity", _6c5); }); } }); dojo.declare("esri.layers.TileInfo", null, { constructor: function (json) { this.spatialReference = new esri.SpatialReference(json.spatialReference); this.width = json.cols || json.width; this.height = json.rows || json.height; this.origin = json instanceof esri.layers.TileInfo ? new esri.geometry.Point(json.origin) : new esri.geometry.Point(dojo.mixin(json.origin, json.spatialReference)); this.dpi = json.dpi; this.format = json.format; var lods = (this.lods = []); dojo.forEach(json.lods, function (lod, i) { lods[i] = new esri.layers.LOD(lod); }); } }); dojo.declare("esri.layers.LOD", null, { constructor: function (json) { dojo.mixin(this, json); } }); } if (!dojo._hasResource["esri.layers.agstiled"]) { dojo._hasResource["esri.layers.agstiled"] = true; dojo.provide("esri.layers.agstiled"); dojo.declare("esri.layers.ArcGISTiledMapServiceLayer", [esri.layers.TiledMapServiceLayer, esri.layers.ArcGISMapServiceLayer], { constructor: function (url, _6c6) { if (_6c6) { if (_6c6.roundrobin) { dojo.deprecated(this.declaredClass + " : " + esri.bundle.layers.agstiled.deprecateRoundrobin); _6c6.tileServers = _6c6.roundrobin; } this._setTileServers(_6c6.tileServers); this._loadCallback = _6c6.loadCallback; } this._params = dojo.mixin({}, this._url.query); this.tsi = 0; this._initLayer = dojo.hitch(this, this._initLayer); var _6c7 = _6c6 && _6c6.resourceInfo; if (_6c7) { this._initLayer(_6c7); } else { this._load = dojo.hitch(this, this._load); this._load(); } }, _TILE_FORMATS: { PNG: "png", PNG8: "png", PNG24: "png", PNG32: "png", JPG: "jpg", JPEG: "jpg", GIF: "gif" }, _setTileServers: function (list) { this.tileServers = list; if (list && list.length > 0) { for (var i = 0, il = list.length; i < il; i++) { list[i] = esri.urlToObject(list[i]).path; } } }, _initLayer: function (_6c8, io) { this.inherited(arguments); this.tileInfo = new esri.layers.TileInfo(_6c8.tileInfo); this.isPNG32 = this.tileInfo.format === "PNG24" || this.tileInfo.format === "PNG32"; if (_6c8.timeInfo) { this.timeInfo = new esri.layers.TimeInfo(_6c8.timeInfo); } if (!this.tileServers) { this._setTileServers(_6c8.tileServers); } this.loaded = true; this.onLoad(this); var _6c9 = this._loadCallback; if (_6c9) { delete this._loadCallback; _6c9(this); } }, getTileUrl: function (_6ca, row, col) { var ts = this.tileServers, iurl = (ts ? ts[this.tsi++ % ts.length] : this._url.path) + "/tile/" + _6ca + "/" + row + "/" + col; if (this._url.query) { iurl += ("?" + dojo.objectToQuery(this._url.query)); } return esri._getProxiedUrl(iurl); } }); } if (!dojo._hasResource["esri.layers.agsimageservice"]) { dojo._hasResource["esri.layers.agsimageservice"] = true; dojo.provide("esri.layers.agsimageservice"); dojo.declare("esri.layers.ArcGISImageServiceLayer", esri.layers.DynamicMapServiceLayer, { constructor: function (url, _6cb) { this._url = esri.urlToObject(url); var _6cc = _6cb && _6cb.imageServiceParameters; this.format = _6cc && _6cc.format; this.interpolation = _6cc ? _6cc.interpolation : null; this.compressionQuality = _6cc ? _6cc.compressionQuality : null; this.bandIds = _6cc ? _6cc.bandIds : null; this.mosaicRule = _6cc ? _6cc.mosaicRule : null; this.renderingRule = _6cc ? _6cc.renderingRule : null; this._params = dojo.mixin({}, this._url.query, { f: "image", interpolation: this.interpolation, format: this.format, compressionQuality: this.compressionQuality, bandIds: this.bandIds ? this.bandIds.join(",") : null }, _6cc ? _6cc.toJson() : {}); this._initLayer = dojo.hitch(this, this._initLayer); this.useMapImage = (_6cb && _6cb.useMapImage) || false; this._loadCallback = _6cb && _6cb.loadCallback; var _6cd = _6cb && _6cb.resourceInfo; if (_6cd) { this._initLayer(_6cd); } else { esri.request({ url: this._url.path, content: dojo.mixin({ f: "json" }, this._url.query), callbackParamName: "callback", load: this._initLayer, error: esri.config.defaults.io.errorHandler }); } }, disableClientCaching: false, _initLayer: function (_6ce, io) { dojo.mixin(this, _6ce); this.initialExtent = (this.fullExtent = this.extent = (new esri.geometry.Extent(_6ce.extent))); this.spatialReference = this.initialExtent.spatialReference; this.pixelSizeX = parseFloat(this.pixelSizeX); this.pixelSizeY = parseFloat(this.pixelSizeY); var mins = this.minValues, maxs = this.maxValues, _6cf = this.meanValues, _6d0 = this.stdvValues, bs = (this.bands = []); for (var i = 0, il = this.bandCount; i < il; i++) { bs[i] = { min: mins[i], max: maxs[i], mean: _6cf[i], stddev: _6d0[i] }; } if (_6ce.timeInfo) { this.timeInfo = new esri.layers.TimeInfo(_6ce.timeInfo); } var _6d1 = this.fields = []; var _6d2 = _6ce.fields; if (_6d2) { for (var i = 0; i < _6d2.length; i++) { _6d1.push(new esri.layers.Field(_6d2[i])); } } this.version = _6ce.currentVersion; if (!this.version) { var ver; if ("fields" in _6ce || "objectIdField" in _6ce || "timeInfo" in _6ce) { ver = 10; } else { ver = 9.3; } this.version = ver; } this.loaded = true; this.onLoad(this); var _6d3 = this._loadCallback; if (_6d3) { delete this._loadCallback; _6d3(this); } }, getImageUrl: function (_6d4, _6d5, _6d6, _6d7) { var sr = _6d4.spatialReference.wkid || dojo.toJson(_6d4.spatialReference.toJson()); delete this._params._ts; var path = this._url.path + "/exportImage?"; dojo.mixin(this._params, { bbox: _6d4.xmin + "," + _6d4.ymin + "," + _6d4.xmax + "," + _6d4.ymax, imageSR: sr, bboxSR: sr, size: _6d5 + "," + _6d6 }, this.disableClientCaching ? { _ts: new Date().getTime()} : {}); var _6d8 = esri._getProxiedUrl(path + dojo.objectToQuery(dojo.mixin(this._params, { f: "image" }))); if ((_6d8.length > esri.config.defaults.io.postLength) || this.useMapImage) { this._jsonRequest = esri.request({ url: path, content: dojo.mixin(this._params, { f: "json" }), callbackParamName: "callback", load: function (_6d9, io) { _6d7(esri._getProxiedUrl(_6d9.href)); }, error: this._errorHandler }); } else { _6d7(_6d8); } }, setInterpolation: function (_6da) { this.interpolation = (this._params.interpolation = _6da); this.refresh(true); }, setCompressionQuality: function (_6db) { this.compressionQuality = (this._params.compressionQuality = _6db); this.refresh(true); }, setBandIds: function (ids) { this.bandIds = ids; this._params.bandIds = ids.join(","); this.refresh(true); }, setDefaultBandIds: function () { this.bandIds = (this._params.bandIds = null); this.refresh(true); }, setDisableClientCaching: function (_6dc) { this.disableClientCaching = _6dc; }, setMosaicRule: function (_6dd) { this.mosaicRule = _6dd; this._params.mosaicRule = dojo.toJson(_6dd.toJson()); this.refresh(true); }, setRenderingRule: function (_6de) { this.renderingRule = _6de; this._params.renderingRule = dojo.toJson(_6de.toJson()); this.refresh(true); }, setImageFormat: function (_6df) { this.format = (this._params.format = _6df); this.refresh(true); }, refresh: function (_6e0) { if (_6e0) { this.inherited(arguments); } else { var dc = this.disableClientCaching; this.disableClientCaching = true; this.inherited(arguments); this.disableClientCaching = dc; } }, exportMapImage: function (_6e1, _6e2) { var m = esri.config.defaults.map, p = dojo.mixin({ size: m.width + "," + m.height }, this._params, _6e1 ? _6e1.toJson() : {}, { f: "json" }); delete p._ts; this._exportMapImage(this._url.path + "/exportImage", p, _6e2); } }); dojo.declare("esri.layers.ImageServiceParameters", null, { extent: null, width: null, height: null, imageSpatialReference: null, format: null, interpolation: null, compressionQuality: null, bandIds: null, timeExtent: null, mosaicRule: null, renderingRule: null, noData: null, toJson: function () { var ext = this.extent, wkid = ext ? (ext.spatialReference.wkid || dojo.toJson(ext.spatialReference.toJson())) : null, _6e3 = this.imageSpatialReference, json = { extent: ext ? ext.toJson() : null, size: (this.width !== null && this.height !== null ? this.width + "," + this.height : null), imageSR: (_6e3 ? (_6e3.wkid || dojo.toJson(_6e3.toJson())) : wkid), format: this.format, interpolation: this.interpolation, compressionQuality: this.compressionQuality, bandIds: this.bandIds ? this.bandIds.join(",") : null, mosaicRule: this.mosaicRule ? dojo.toJson(this.mosaicRule.toJson()) : null, renderingRule: this.renderingRule ? dojo.toJson(this.renderingRule.toJson()) : null, noData: this.noData }; var _6e4 = this.timeExtent; json.time = _6e4 ? _6e4.toJson().join(",") : null; return esri.filter(json, function (_6e5) { if (_6e5 !== null) { return true; } }); } }); dojo.mixin(esri.layers.ImageServiceParameters, { INTERPOLATION_BILINEAR: "RSP_BilinearInterpolation", INTERPOLATION_CUBICCONVOLUTION: "RSP_CubicConvolution", INTERPOLATION_MAJORITY: "RSP_Majority", INTERPOLATION_NEARESTNEIGHBOR: "RSP_NearestNeighbor" }); dojo.declare("esri.layers.MosaicRule", null, { method: null, where: null, sortField: null, sortValue: null, ascending: false, lockRasterIds: null, viewpoint: null, objectIds: null, operation: null, toJson: function () { var json = { mosaicMethod: this.method, where: this.where, sortField: this.sortField, sortValue: this.sortValue ? dojo.toJson(this.sortValue) : null, ascending: this.ascending, lockRasterIds: this.lockRasterIds, viewpoint: this.viewpoint ? this.viewpoint.toJson() : null, fids: this.objectIds, mosaicOperation: this.operation }; return esri.filter(json, function (_6e6) { if (_6e6 !== null) { return true; } }); } }); dojo.mixin(esri.layers.MosaicRule, { METHOD_NONE: "esriMosaicNone", METHOD_CENTER: "esriMosaicCenter", METHOD_NADIR: "esriMosaicNadir", METHOD_VIEWPOINT: "esriMosaicViewpoint", METHOD_ATTRIBUTE: "esriMosaicAttribute", METHOD_LOCKRASTER: "esriMosaicLockRaster", METHOD_NORTHWEST: "esriMosaicNorthwest", METHOD_SEAMLINE: "esriMosaicSeamline", OPERATION_FIRST: "MT_FIRST", OPERATION_LAST: "MT_LAST", OPERATION_MIN: "MT_MIN", OPERATION_MAX: "MT_MAX", OPERATION_MEAN: "MT_MEAN", OPERATION_BLEND: "MT_BLEND" }); dojo.declare("esri.layers.RasterFunction", null, { functionName: null, "arguments": null, variableName: null, toJson: function () { var json = { rasterFunction: this.functionName, rasterFunctionArguments: this["arguments"], variableName: this.variableName }; return esri.filter(json, function (_6e7) { if (_6e7 !== null) { return true; } }); } }); } if (!dojo._hasResource["esri.map"]) { dojo._hasResource["esri.map"] = true; dojo.provide("esri.map"); if (esri.isTouchEnabled) { } else { dojo.declare("esri._MapContainer", esri._CoreMap, (function () { var dc = dojo.connect, ddc = dojo.disconnect, dh = dojo.hitch, _6e8 = dojo.mixin, _6e9 = dojo.isMozilla, _6ea = dojo.stopEvent, dfe = dojo.fixEvent, _6eb = esri.geometry.Point; var _6ec = navigator.userAgent.indexOf("Macintosh") !== -1 ? 1 : 3, _6ed = dojo.isChrome < 2 ? 360 : 120, _6ee = 1, _6ef = 2, _6f0 = 300, _6f1 = 300; return { constructor: function (_6f2) { _6e8(this, { _dragEnd: false, _clickDuration: _6f1, _mouseWheelEvent: {}, _downCoords: null, _clickTimer: null, _mouseWheelTimer: null, _onKeyDown_connect: null, _onKeyUp_connect: null, _onMouseDragHandler_connect: null }); var _6f3 = this.__container, cons = this._connects; cons.push(dc(_6f3, "onselectstart", function (evt) { _6ea(evt); return false; }), dc(_6f3, "ondragstart", function (evt) { _6ea(evt); return false; })); if (_6e9) { dojo.style(_6f3, "MozUserSelect", "none"); } cons.push(dc(_6f3, "onmouseenter", this, "_onMouseEnterHandler"), dc(_6f3, "onmouseleave", this, "_onMouseLeaveHandler"), dc(_6f3, "onmousedown", this, "_onMouseDownHandler"), dc(_6f3, "onclick", this, "_onClickHandler"), dc(_6f3, "ondblclick", this, "_onDblClickHandler"), dc(_6f3, dojo.isFF || _6e9 ? "DOMMouseScroll" : "onmousewheel", this, "_onMouseWheelHandler")); this._onMouseMoveHandler_connect = dc(_6f3, "onmousemove", this, "_onMouseMoveHandler"); this._onMouseUpHandler_connect = dc(_6f3, "onmouseup", this, "_onMouseUpHandler"); this._processEvent = dh(this, this._processEvent); this._fireClickEvent = dh(this, this._fireClickEvent); this._fireMouseWheel = dh(this, this._fireMouseWheel); }, _cleanUp: function () { ddc(this._onMouseMoveHandler_connect); ddc(this._onMouseUpHandler_connect); ddc(this._onMouseDragHandler_connect); var cons = this._connects; for (var i = cons.length; i >= 0; i--) { ddc(cons[i]); delete cons[i]; } this.inherited("_cleanUp", arguments); }, _processEvent: function (evt) { evt = dfe(evt, evt.target); if (evt.type === "DOMMouseScroll" && dojo.isFF < 3) { evt.screenPoint = new _6eb(window.scrollX + evt.screenX - this.position.x, window.scrollY + evt.screenY - this.position.y); } else { evt.screenPoint = new _6eb(evt.pageX - this.position.x, evt.pageY - this.position.y); } evt.mapPoint = this.extent ? this.toMap(evt.screenPoint) : new _6eb(); return evt; }, _onMouseEnterHandler: function (evt) { ddc(this._onKeyDown_connect); ddc(this._onKeyUp_connect); this._onKeyDown_connect = dc(document, "onkeydown", this, "_onKeyDownHandler"); this._onKeyUp_connect = dc(document, "onkeyup", this, "_onKeyUpHandler"); this.onMouseOver(this._processEvent(evt)); }, _onMouseLeaveHandler: function (evt) { ddc(this._onKeyDown_connect); ddc(this._onKeyUp_connect); this.onMouseOut(this._processEvent(evt)); }, _onMouseMoveHandler: function (evt) { if (this._dragEnd) { this._dragEnd = false; return; } this.onMouseMove(this._processEvent(evt)); }, _onMouseDownHandler: function (evt) { ddc(this._onMouseMoveHandler_connect); var _6f4 = this.__container; if (_6f4.setCapture) { _6f4.setCapture(false); } this._onMouseDragHandler_connect = dc(document, "onmousemove", this, "_onMouseDragHandler"); evt = this._processEvent(evt); this._downCoords = evt.screenPoint.x + "," + evt.screenPoint.y; this.onMouseDown(evt); }, _onMouseUpHandler: function (evt) { var _6f5 = this.__container; if (_6f5.releaseCapture) { _6f5.releaseCapture(); } evt = this._processEvent(evt); ddc(this._onMouseDragHandler_connect); ddc(this._onMouseMoveHandler_connect); this._onMouseMoveHandler_connect = dc(_6f5, "onmousemove", this, "_onMouseMoveHandler"); this.onMouseUp(evt); }, _onMouseDragHandler: function (evt) { ddc(this._onMouseDragHandler_connect); this._onMouseDragHandler_connect = dc(document, "onmousemove", this, "_onMouseDraggingHandler"); ddc(this._onMouseUpHandler_connect); this._onMouseUpHandler_connect = dc(document, "onmouseup", this, "_onDragMouseUpHandler"); this._docLeaveConnect = dc(document, "onmouseout", this, "_onDocMouseOut"); this.onMouseDragStart(this._processEvent(evt)); }, _onDocMouseOut: function (evt) { var _6f6 = evt.relatedTarget; if (!_6f6) { this._onDragMouseUpHandler(evt); } }, _onMouseDraggingHandler: function (evt) { this.onMouseDrag(this._processEvent(evt)); dojo.stopEvent(evt); }, _onDragMouseUpHandler: function (evt) { var _6f7 = this.__container; if (_6f7.releaseCapture) { _6f7.releaseCapture(); } this._dragEnd = true; evt = this._processEvent(evt); this.onMouseDragEnd(evt); ddc(this._docLeaveConnect); ddc(this._onMouseDragHandler_connect); ddc(this._onMouseUpHandler_connect); this._onMouseMoveHandler_connect = dc(_6f7, "onmousemove", this, "_onMouseMoveHandler"); this._onMouseUpHandler_connect = dc(_6f7, "onmouseup", this, "_onMouseUpHandler"); this.onMouseUp(evt); }, _onClickHandler: function (evt) { evt = this._processEvent(evt); if (this._downCoords != (evt.screenPoint.x + "," + evt.screenPoint.y)) { return; } clearTimeout(this._clickTimer); this._clickEvent = _6e8({}, evt); this._clickTimer = setTimeout(this._fireClickEvent, this._clickDuration); }, _fireClickEvent: function () { clearTimeout(this._clickTimer); if (dojo.isIE) { var GL = esri.layers.GraphicsLayer; this._clickEvent.graphic = GL._clicked; delete GL["_clicked"]; } this.onClick(this._clickEvent); }, _onDblClickHandler: function (evt) { clearTimeout(this._clickTimer); this.onDblClick(this._processEvent(evt)); }, _onMouseWheelHandler: function (evt) { clearTimeout(this._mouseWheelTimer); evt = this._processEvent(evt); var _6f8 = dojo.isIE || dojo.isWebKit ? evt.wheelDelta / _6ed : -evt.detail / _6ec, _6f9 = Math.abs(_6f8); if (_6f9 <= _6ee) { _6f9 = _6ee; } else { _6f9 = _6ef; } evt.value = _6f8 < 0 ? -_6f9 : _6f9; _6e8(this._mouseWheelEvent, evt); clearTimeout(this._mouseWheelTimer); this._mouseWheelTimer = setTimeout(this._fireMouseWheel, _6f0); if (this.__canStopSWEvt()) { dojo.stopEvent(evt); } }, __canStopSWEvt: function () { }, _fireMouseWheel: function () { this.onMouseWheel(this._mouseWheelEvent); this._mouseWheelEvent = {}; this._mouseWheelTimer = null; }, _onKeyDownHandler: function (evt) { this.onKeyDown(evt); }, _onKeyUpHandler: function (evt) { this.onKeyUp(evt); }, __setClickDuration: function (dur) { this._clickDuration = dur; }, __resetClickDuration: function () { this._clickDuration = _6f1; }, onMouseOver: function () { }, onMouseMove: function () { }, onMouseOut: function () { }, onMouseDown: function () { }, onMouseDragStart: function () { }, onMouseDrag: function () { }, onMouseDragEnd: function () { }, onMouseUp: function () { }, onClick: function () { }, onDblClick: function () { }, onMouseWheel: function () { }, onKeyDown: function () { }, onKeyUp: function () { } }; })()); } dojo.declare("esri.Map", esri._MapContainer, (function () { var _6fa = 30, _6fb = 30, _6fc = 31, _6fd = 30, _6fe = 10, _6ff = 1, _700 = -1, _701 = dojo.mouseButtons.LEFT, _702 = { up: "panUp", right: "panRight", down: "panDown", left: "panLeft" }, _703 = { upperRight: "panUpperRight", lowerRight: "panLowerRight", lowerLeft: "panLowerLeft", upperLeft: "panUpperLeft" }; var dc = dojo.connect, ddc = dojo.disconnect, dcr = dojo.create, ds = dojo.style, dh = dojo.hitch, abs = Math.abs, _704 = dojo.coords, _705 = dojo.deprecated, dk = dojo.keys, _706 = dojo.mixin, Rect = esri.geometry.Rect, _707 = esri.geometry.Point, _708 = esri.geometry.Extent; var _709 = [dk.NUMPAD_PLUS, 61, dk.NUMPAD_MINUS, dk.UP_ARROW, dk.NUMPAD_8, dk.RIGHT_ARROW, dk.NUMPAD_6, dk.DOWN_ARROW, dk.NUMPAD_2, dk.LEFT_ARROW, dk.NUMPAD_4, dk.PAGE_UP, dk.NUMPAD_9, dk.PAGE_DOWN, dk.NUMPAD_3, dk.END, dk.NUMPAD_1, dk.HOME, dk.NUMPAD_7]; return { constructor: function (_70a, _70b) { _706(this, { _dragOrigin: null, _slider: null, _navDiv: null, _zoomRect: null, _mapParams: _706({ slider: true, nav: false, logo: true, sliderStyle: "default" }, _70b || {}), _sliderChangeAnchor: null, _zoom: 0, _keyboardPanDx: 0, _keyboardPanDy: 0 }); _706(this, { _onLoadHandler_connect: null, _panHandler_connect: null, _panStartHandler_connect: null, _upPanHandler_connect: null, _dblClickZoomHandler_connect: null, _recenterZoomHandler_connect: null, _recenterHandler_connect: null, _downPanHandler_connect: null, _downZoomHandler_connect: null, _keyNavigatingHandler_connect: null, _keyNavigationEndHandler_connect: null, _scrollZoomHandler_connect: null, _zoomHandler_connect: null, _upZoomHandler_connect: null, _slider_connect: null, _slidermovestop_connect: null }); _706(this, { isDoubleClickZoom: false, isShiftDoubleClickZoom: false, isClickRecenter: false, isScrollWheelZoom: false, isPan: false, isRubberBandZoom: false, isKeyboardNavigation: false, isPanArrows: false, isZoomSlider: false }); this._zoomRect = new esri.Graphic(null, new esri.symbol.SimpleFillSymbol(esri.config.defaults.map.zoomSymbol)); this.setMapCursor("default"); this._normalizeRect = dh(this, this._normalizeRect); this._isPanningOrZooming = dh(this, this._isPanningOrZooming); this._canZoom = dh(this, this._canZoom); this._onLoadHandler_connect = dc(this, "onLoad", this, "_onLoadInitNavsHandler"); if (this._mapParams.logo) { var _70c = { zIndex: _6fd, right: (this._mapParams.nav ? "25px" : "") }; if (dojo.isIE === 6) { _70c["filter"] = "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled='true', sizingMethod='crop', src='" + dojo.moduleUrl("esri", "../../images/map/logo-med.png") + "')"; } var logo = this._ogol = dcr("div", { style: _70c }, this.__root); if ((this.__root.clientWidth * this.__root.clientHeight) < 250000) { dojo.addClass(logo, "logo-sm"); } else { dojo.addClass(logo, "logo-med"); } if (!esri.isTouchEnabled) { this._ogol_connect = dc(logo, "onclick", this, "_openLogoLink"); } } if (esri.isTouchEnabled) { this._panInitEvent = "onTouchStart"; this._zoomInitEvent = "onGestureStart"; } else { this._panInitEvent = "onMouseDown"; this._zoomInitEvent = "onMouseDown"; } }, _cleanUp: function () { this.disableMapNavigation(); for (var i = this._connects.length; i >= 0; i--) { ddc(this._connects[i]); delete this._connects[i]; } ddc(this._slider_connect); ddc(this._ogol_connect); var _70d = this._slider; if (_70d && _70d.destroy) { _70d.destroy(); } var _70e = this._navDiv; if (_70e) { dojo.destroy(_70e); } this.inherited("_cleanUp", arguments); }, _normalizeRect: function (evt) { var xy = evt.screenPoint, dx = this._dragOrigin.x, dy = this._dragOrigin.y, rect = new Rect((xy.x < dx ? xy.x : dx) - this.__visibleRect.x, (xy.y < dy ? xy.y : dy) - this.__visibleRect.y, abs(xy.x - dx), abs(xy.y - dy)); if (rect.width === 0) { rect.width = 1; } if (rect.height === 0) { rect.height = 1; } return rect; }, _downZoomHandler: function (evt) { if (evt.button == _701 && evt.shiftKey && this.isRubberBandZoom) { this._dragOrigin = _706({}, evt.screenPoint); this.setCursor("crosshair"); this._zoomHandler_connect = dc(this, "onMouseDrag", this, "_zoomHandler"); this._upZoomHandler_connect = dc(this, "onMouseUp", this, "_upZoomHandler"); if (evt.ctrlKey) { this._zoom = _700; } else { this._zoom = _6ff; } } }, _zoomHandler: function (evt) { var rect = this._normalizeRect(evt).offset(this.__visibleRect.x, this.__visibleRect.y), g = this.graphics; if (!this._zoomRect.geometry) { this.setCursor("crosshair"); } if (this._zoomRect.geometry) { g.remove(this._zoomRect, true); } var tl = this.toMap(new _707(rect.x, rect.y)), br = this.toMap(new _707(rect.x + rect.width, rect.y + rect.height)); g.add(this._zoomRect.setGeometry(new Rect(tl.x, tl.y, br.x - tl.x, tl.y - br.y)), true); }, _upZoomHandler: function (evt) { var _70f = this._zoomRect; ddc(this._zoomHandler_connect); ddc(this._upZoomHandler_connect); if (this._canZoom(this._zoom) && _70f.getDojoShape()) { this.graphics.remove(_70f); _70f.geometry = null; var rect = this._normalizeRect(evt); rect.x += this.__visibleRect.x; rect.y += this.__visibleRect.y; var _710; if (this._zoom == _700) { var _711 = this.extent.getWidth(), _712 = (_711 * this.width) / rect.width, _713 = (_712 - _711) / 2, ext = this.extent; _710 = new _708(ext.xmin - _713, ext.ymin - _713, ext.xmax + _713, ext.ymax + _713, this.spatialReference); } else { var min = this.toMap({ x: rect.x, y: (rect.y + rect.height) }), max = this.toMap({ x: (rect.x + rect.width), y: rect.y }); _710 = new _708(min.x, min.y, max.x, max.y, this.spatialReference); } this.__setExtent(_710); } if (_70f.getDojoShape()) { this.graphics.remove(_70f, true); } this._zoom = 0; this.resetMapCursor(); }, _downPanHandler: function (evt) { if (evt.button == _701 && !evt.shiftKey && this.isPan) { this._dragOrigin = new _707(0, 0); _706(this._dragOrigin, evt.screenPoint); this._panHandler_connect = dc(this, "onMouseDrag", this, "_panHandler"); this._panStartHandler_connect = dc(this, "onMouseDragStart", this, "_panStartHandler"); this._upPanHandler_connect = dc(this, "onMouseUp", this, "_upPanHandler"); } }, _panStartHandler: function (evt) { this.setCursor("move"); this.__panStart(evt.screenPoint.x, evt.screenPoint.y); }, _panHandler: function (evt) { this.__pan(evt.screenPoint.x - this._dragOrigin.x, evt.screenPoint.y - this._dragOrigin.y); }, _upPanHandler: function (evt) { ddc(this._panHandler_connect); ddc(this._panStartHandler_connect); ddc(this._upPanHandler_connect); if (this.__panning) { this.__panEnd(evt.screenPoint.x - this._dragOrigin.x, evt.screenPoint.y - this._dragOrigin.y); this.resetMapCursor(); } }, _isPanningOrZooming: function () { return this.__panning || this.__zooming; }, _recenterHandler: function (evt) { if (evt.shiftKey && !this._isPanningOrZooming()) { this.centerAt(evt.mapPoint); } }, _recenterZoomHandler: function (evt) { if (evt.shiftKey && !this._isPanningOrZooming()) { evt.value = evt.ctrlKey ? -1 : 1; this._scrollZoomHandler(evt); } }, _dblClickZoomHandler: function (evt) { if (!this._isPanningOrZooming()) { evt.value = 1; this._scrollZoomHandler(evt); } }, _canZoom: function (_714) { if (!this.__tileInfo) { return true; } var _715 = this.getLevel(), _716 = this.getNumLevels(); if ((_715 === 0 && _714 < 0) || (_715 === _716 - 1 && _714 > 0)) { return false; } return true; }, _scrollZoomHandler: function (evt) { if (!this._canZoom(evt.value)) { return; } var _717 = this.extent, size; if (this.__tileInfo) { size = this.__getExtentForLevel(this.getLevel() + evt.value).extent; } else { size = _717.expand(evt.value > 0 ? 0.5 * evt.value : 2 * -evt.value); } var _718 = evt.mapPoint, xmin = _717.xmin - ((size.getWidth() - _717.getWidth()) * (_718.x - _717.xmin) / _717.getWidth()), ymax = _717.ymax - ((size.getHeight() - _717.getHeight()) * (_718.y - _717.ymax) / _717.getHeight()); this.__setExtent(new _708(xmin, ymax - size.getHeight(), xmin + size.getWidth(), ymax, this.spatialReference), null, evt.screenPoint); }, _keyNavigatingHandler: function (evt) { var kc = evt.keyCode; if (dojo.indexOf(_709, kc) !== -1) { var ti = this.__tileInfo; if (kc === dk.NUMPAD_PLUS || kc === 61) { if (ti) { this.setLevel(this.getLevel() + 1); } else { this.__setExtent(this.extent.expand(0.5)); } } else { if (kc == dk.NUMPAD_MINUS) { if (ti) { this.setLevel(this.getLevel() - 1); } else { this.__setExtent(this.extent.expand(2)); } } else { if (!this.__panning) { this.__panStart(0, 0); } switch (kc) { case dk.UP_ARROW: case dk.NUMPAD_8: this._keyboardPanDy += _6fe; break; case dk.RIGHT_ARROW: case dk.NUMPAD_6: this._keyboardPanDx -= _6fe; break; case dk.DOWN_ARROW: case dk.NUMPAD_2: this._keyboardPanDy -= _6fe; break; case dk.LEFT_ARROW: case dk.NUMPAD_4: this._keyboardPanDx += _6fe; break; case dk.PAGE_UP: case dk.NUMPAD_9: this._keyboardPanDx -= _6fe; this._keyboardPanDy += _6fe; break; case dk.PAGE_DOWN: case dk.NUMPAD_3: this._keyboardPanDx -= _6fe; this._keyboardPanDy -= _6fe; break; case dk.END: case dk.NUMPAD_1: this._keyboardPanDx += _6fe; this._keyboardPanDy -= _6fe; break; case dk.HOME: case dk.NUMPAD_7: this._keyboardPanDx += _6fe; this._keyboardPanDy += _6fe; break; default: return; } this.__pan(this._keyboardPanDx, this._keyboardPanDy); } } dojo.stopEvent(evt); } }, _keyNavigationEndHandler: function (evt) { if (this.__panning) { this.__panEnd(this._keyboardPanDx, this._keyboardPanDy); this._keyboardPanDx = this._keyboardPanDy = 0; } }, _onLoadInitNavsHandler: function () { this.enableMapNavigation(); this._createNav(); if (this._mapParams.sliderStyle === "small" || !this._createSlider) { this._createSimpleSlider(); } else { this._createSlider(); } ddc(this._onLoadHandler_connect); }, _createNav: function () { if (this._mapParams.nav) { var div, v, i, _719 = dojo.addClass, id = this.id; this._navDiv = dcr("div", { id: id + "_navdiv" }, this.__root); _719(this._navDiv, "navDiv"); var w2 = this.width / 2, h2 = this.height / 2, wh; for (i in _702) { v = _702[i]; div = dcr("div", { id: id + "_pan_" + i }, this._navDiv); _719(div, "fixedPan " + v); if (i === "up" || i === "down") { wh = parseInt(_704(div).w, 10) / 2; ds(div, { left: (w2 - wh) + "px", zIndex: _6fa }); } else { wh = parseInt(_704(div).h, 10) / 2; ds(div, { top: (h2 - wh) + "px", zIndex: _6fa }); } this._connects.push(dc(div, "onclick", dh(this, this[v]))); } this._onMapResizeNavHandler_connect = dc(this, "onResize", this, "_onMapResizeNavHandler"); for (i in _703) { v = _703[i]; div = dcr("div", { id: id + "_pan_" + i, style: { zIndex: _6fa} }, this._navDiv); _719(div, "fixedPan " + v); this._connects.push(dc(div, "onclick", dh(this, this[v]))); } this.isPanArrows = true; } }, _onMapResizeNavHandler: function (_71a, wd, ht) { var id = this.id, w2 = wd / 2, h2 = ht / 2, byId = dojo.byId, i, div, wh; for (i in _702) { div = byId(id + "_pan_" + i); if (i === "up" || i === "down") { wh = parseInt(_704(div).w, 10) / 2; ds(div, "left", (w2 - wh) + "px"); } else { wh = parseInt(_704(div).h, 10) / 2; ds(div, "top", (h2 - wh) + "px"); } } }, _createSimpleSlider: function () { if (this._mapParams.slider) { var _71b = (this._slider = dcr("div", { id: this.id + "_zoom_slider", "class": "esriSimpleSlider", style: "z-index: " + _6fb + ";" })); dojo.addClass(_71b, esri.config.defaults.map.slider.width ? "esriSimpleSliderHorizontal" : "esriSimpleSliderVertical"); var _71c = dcr("div", { "class": "esriSimpleSliderIncrementButton" }, _71b); _71c.innerHTML = "+"; var _71d = dcr("div", { "class": "esriSimpleSliderDecrementButton" }, _71b); _71d.innerHTML = "-"; if (dojo.isIE < 8) { dojo.addClass(_71d, "dj_ie67Fix"); } this._connects.push(dc(_71c, "onclick", this, this._simpleSliderChangeHandler)); this._connects.push(dc(_71d, "onclick", this, this._simpleSliderChangeHandler)); this.__root.appendChild(_71b); this.isZoomSlider = true; } }, _simpleSliderChangeHandler: function (evt) { var _71e = (evt.currentTarget.className.indexOf("IncrementButton") !== -1) ? true : false; var _71f = this.getLevel(); if (_71f !== -1) { var _720 = _71e ? (_71f + 1) : (_71f - 1); this.setLevel(_720); } else { var _721 = _71e ? 0.5 : 2; this.__setExtent(this.extent.expand(_721)); } }, _createSlider: function () { if (this._mapParams.slider) { var div = dcr("div", { id: this.id + "_zoom_slider" }, this.__root), _722 = esri.config.defaults.map, _723 = _722.slider.width, _724 = _723 ? dijit.form.HorizontalSlider : dijit.form.VerticalSlider, _725 = dojo.toJson(_706({ position: "absolute" }, _722.slider)), _726 = this.getNumLevels(), _727 = dijit.form, i, il; _725 = _725.substring(1, _725.length - 1).split("\"").join("").split(",").join(";"); if (_726 > 0) { var _728, _729, _72a, _72b, _72c, _72d = _722.sliderLabel; if (_72d) { var _72e = _723 ? _727.HorizontalRule : _727.VerticalRule, _72f = _723 ? _727.HorizontalRuleLabels : _727.VerticalRuleLabels, cont = _723 ? "topDecoration" : "rightDecoration", tick = _723 ? "height:" + _72d.tick + "px" : "width:" + _72d.tick + "px"; _72c = _72d.labels; if (_72c === null) { _72c = []; for (i = 0, il = _726; i < il; i++) { _72c[i] = ""; } } _728 = dcr("div"); div.appendChild(_728); _729 = new _72e({ container: cont, count: _726, style: tick }, _728); _72a = dcr("div"); div.appendChild(_72a); _72b = new _72f({ container: cont, count: _726, labels: _72c, style: _72d.style }, _72a); _728 = _72a = null; } var _730 = (this._slider = new _724({ id: div.id, minimum: 0, maximum: _726 - 1, discreteValues: _726, value: this.getLevel(), clickSelect: true, intermediateChanges: true, style: _725 + "; z-index:" + _6fb + ";" }, div)); _730.startup(); if (_72d) { _729.startup(); _72b.startup(); } this._slider_connect = dc(_730, "onChange", this, "_onSliderChangeHandler"); this._connects.push(dc(this, "onExtentChange", this, "_onExtentChangeSliderHandler")); this._connects.push(dc(_730._movable, "onFirstMove", this, "_onSliderMoveStartHandler")); } else { var _730 = (this._slider = new _724({ id: div.id, minimum: 0, maximum: 2, discreteValues: 3, value: 1, clickSelect: true, intermediateChanges: _722.sliderChangeImmediate, style: _725 + " height:100px; z-index:" + _6fb + ";" }, div)); var _731 = _730.domNode.firstChild.childNodes; for (i = 1; i <= 3; i++) { ds(_731[i], "visibility", "hidden"); } _730.startup(); this._slider_connect = dc(_730, "onChange", this, "_onDynSliderChangeHandler"); this._connects.push(dc(this, "onExtentChange", this, "_onExtentChangeDynSliderHandler")); } dojo.forEach(_730._connects, function (_732) { var _733 = _732[0], node = _733 && _733[0], _734 = node && node.className; if (_734 && (_734.indexOf("dijitSliderIncrementIcon") >= 0 || _734.indexOf("dijitSliderDecrementIcon") >= 0)) { dojo.forEach(_732, ddc); } }); var _735 = _730.incrementButton, _736 = _730.decrementButton; _735.style.outline = "none"; _736.style.outline = "none"; _730._connects.push([dc(_735, "onmousedown", _730, function (e) { this._typematicCallback(1, _735, e); }), dc(_736, "onmousedown", _730, function (e) { this._typematicCallback(1, _736, e); })]); _730.sliderHandle.style.outline = "none"; _730._onKeyPress = function () { }; var _737 = _730._movable; if (_737) { var _738 = _737.onMouseDown; _737.onMouseDown = function (e) { if (dojo.isIE && e.button !== 1) { return; } _738.apply(this, arguments); }; } this.isZoomSlider = true; } }, _onSliderMoveStartHandler: function () { ddc(this._slider_connect); this._slider_connect = dc(this._slider, "onChange", this, "_onSliderChangeDragHandler"); this._slidermovestop_connect = dc(this._slider._movable, "onMoveStop", this, "_onSliderMoveEndHandler"); this._sliderChangeAnchor = this.toScreen(this.extent.getCenter()); this.__zoomStart(this.extent, this._sliderChangeAnchor); }, _onSliderChangeDragHandler: function (_739) { var _73a = this.__getExtentForLevel(_739).extent, _73b = this.extent.getWidth() / _73a.getWidth(); this.__zoom(_73a, _73b, this._sliderChangeAnchor); }, _onSliderMoveEndHandler: function () { ddc(this._slider_connect); ddc(this._slidermovestop_connect); var _73c = this.__getExtentForLevel(this._slider.value), _73d = _73c.extent, _73e = this.extent.getWidth() / _73d.getWidth(); this.__zoomEnd(_73d, _73e, this._sliderChangeAnchor, _73c.lod, true); this._sliderChangeAnchor = null; }, _onSliderChangeHandler: function (_73f) { this.setLevel(_73f); }, _updateSliderValue: function (_740, _741) { ddc(this._slider_connect); var _742 = this._slider; var _743 = _742._onChangeActive; _742._onChangeActive = false; _742.attr("value", _740); _742._onChangeActive = _743; this._slider_connect = dc(_742, "onChange", this, _741); }, _onExtentChangeSliderHandler: function (_744, _745, _746, lod) { ddc(this._slidermovestop_connect); this._updateSliderValue(lod.level, "_onSliderChangeHandler"); }, _onDynSliderChangeHandler: function (_747) { if (_747 > 0) { this.__setExtent(this.extent.expand(0.5)); } else { this.__setExtent(this.extent.expand(2)); } }, _onExtentChangeDynSliderHandler: function () { this._updateSliderValue(1, "_onDynSliderChangeHandler"); }, _openLogoLink: function (evt) { window.open(esri.config.defaults.map.logoLink, "_blank"); dojo.stopEvent(evt); }, enableMapNavigation: function () { this.enableDoubleClickZoom(); this.enableClickRecenter(); this.enablePan(); this.enableRubberBandZoom(); this.enableKeyboardNavigation(); this.enableScrollWheelZoom(); }, disableMapNavigation: function () { this.disableDoubleClickZoom(); this.disableClickRecenter(); this.disablePan(); this.disableRubberBandZoom(); this.disableKeyboardNavigation(); this.disableScrollWheelZoom(); }, enableDoubleClickZoom: function () { if (!this.isDoubleClickZoom) { this._dblClickZoomHandler_connect = dc(this, "onDblClick", this, "_dblClickZoomHandler"); this.isDoubleClickZoom = true; } }, disableDoubleClickZoom: function () { if (this.isDoubleClickZoom) { ddc(this._dblClickZoomHandler_connect); this.isDoubleClickZoom = false; } }, enableShiftDoubleClickZoom: function () { if (!this.isShiftDoubleClickZoom) { _705(this.declaredClass + ": " + esri.bundle.map.deprecateShiftDblClickZoom, null, "v2.0"); this._recenterZoomHandler_connect = dc(this, "onDblClick", this, "_recenterZoomHandler"); this.isShiftDoubleClickZoom = true; } }, disableShiftDoubleClickZoom: function () { if (this.isShiftDoubleClickZoom) { _705(this.declaredClass + ": " + esri.bundle.map.deprecateShiftDblClickZoom, null, "v2.0"); ddc(this._recenterZoomHandler_connect); this.isShiftDoubleClickZoom = false; } }, enableClickRecenter: function () { if (!this.isClickRecenter) { this._recenterHandler_connect = dc(this, "onClick", this, "_recenterHandler"); this.isClickRecenter = true; } }, disableClickRecenter: function () { if (this.isClickRecenter) { ddc(this._recenterHandler_connect); this.isClickRecenter = false; } }, enablePan: function () { if (!this.isPan) { this._downPanHandler_connect = dc(this, this._panInitEvent, this, "_downPanHandler"); this.isPan = true; } }, disablePan: function () { if (this.isPan) { ddc(this._downPanHandler_connect); this.isPan = false; } }, enableRubberBandZoom: function () { if (!this.isRubberBandZoom) { this._downZoomHandler_connect = dc(this, this._zoomInitEvent, this, "_downZoomHandler"); this.isRubberBandZoom = true; } }, disableRubberBandZoom: function () { if (this.isRubberBandZoom) { ddc(this._downZoomHandler_connect); this.isRubberBandZoom = false; } }, enableKeyboardNavigation: function () { if (!this.isKeyboardNavigation) { this._keyNavigatingHandler_connect = dc(this, "onKeyDown", this, "_keyNavigatingHandler"); this._keyNavigationEndHandler_connect = dc(this, "onKeyUp", this, "_keyNavigationEndHandler"); this.isKeyboardNavigation = true; } }, disableKeyboardNavigation: function () { if (this.isKeyboardNavigation) { ddc(this._keyNavigatingHandler_connect); ddc(this._keyNavigationEndHandler_connect); this.isKeyboardNavigation = false; } }, enableScrollWheelZoom: function () { if (!this.isScrollWheelZoom) { this._scrollZoomHandler_connect = dc(this, "onMouseWheel", this, "_scrollZoomHandler"); this.isScrollWheelZoom = true; } }, __canStopSWEvt: function () { return this.isScrollWheelZoom; }, disableScrollWheelZoom: function () { if (this.isScrollWheelZoom) { ddc(this._scrollZoomHandler_connect); this.isScrollWheelZoom = false; } }, showPanArrows: function () { if (this._navDiv) { esri.show(this._navDiv); this.isPanArrows = true; } }, hidePanArrows: function () { if (this._navDiv) { esri.hide(this._navDiv); this.isPanArrows = false; } }, showZoomSlider: function () { if (this._slider) { ds(this._slider.domNode || this._slider, "visibility", "visible"); this.isZoomSlider = true; } }, hideZoomSlider: function () { if (this._slider) { ds(this._slider.domNode || this._slider, "visibility", "hidden"); this.isZoomSlider = false; } } }; })()); if (esri.isTouchEnabled) { dojo.extend(esri.Map, (function () { var dc = dojo.connect, ddc = dojo.disconnect, _748 = esri.geometry.Point, _749 = esri.geometry.Extent, _74a = esri.geometry.getLength, _74b = esri.TileUtils.getCandidateTileInfo; return { _multiTouchTapZoomHandler: function (evt) { if (!this._isPanningOrZooming()) { evt.value = -1; this._scrollZoomHandler(evt); } }, _downPanHandler: function (evt) { this._dragOrigin = new _748(0, 0); dojo.mixin(this._dragOrigin, evt.screenPoint); this._panHandler_connect = dc(this, "onTouchMove", this, this._panHandler); this._upPanHandler_connect = dc(this, "onTouchEnd", this, this._upPanHandler); }, _panHandler: function (evt) { if (this.__panning) { this.__pan(evt.screenPoint.x - this._dragOrigin.x, evt.screenPoint.y - this._dragOrigin.y); } else { this.setCursor("move"); this.__panStart(evt.screenPoint.x, evt.screenPoint.y); } evt.preventDefault(); }, _upPanHandler: function (evt) { ddc(this._panHandler_connect); ddc(this._upPanHandler_connect); if (this.__panning) { this.__panEnd(evt.screenPoint.x - this._dragOrigin.x, evt.screenPoint.y - this._dragOrigin.y); this.resetMapCursor(); } }, _downZoomHandler: function (evt) { this._zoomHandler_connect = dc(this, "onGestureChange", this, this._zoomHandler); this._upZoomHandler_connect = dc(this, "onGestureEnd", this, this._upZoomHandler); }, _zoomHandler: function (evt) { if (evt.screenPoints) { this.currLength = _74a(evt.screenPoints[0], evt.screenPoints[1]); if (this.__zooming) { var _74c = this.currLength / this._length; this._zoomStartExtent = this.__scaleExtent(this.extent, _74c, this._dragOrigin); this.__zoom(this._zoomStartExtent, _74c, this._dragOrigin); } else { this._dragOrigin = new _748((evt.screenPoints[0].x + evt.screenPoints[1].x) / 2, (evt.screenPoints[0].y + evt.screenPoints[1].y) / 2); this._length = this.currLength; this.__zoomStart(this.extent, this._dragOrigin); } evt.preventDefault(); } }, _upZoomHandler: function (evt) { ddc(this._zoomHandler_connect); ddc(this._upZoomHandler_connect); if (evt.processMultiTouchTap) { this._multiTouchTapZoomHandler(evt); evt.preventDefault(); } else { if (this.__zooming && this._zoomAnim === null) { var _74d = this.currLength / this._length, _74e = this.extent.getWidth(); this._zoomAnimAnchor = this.toMap(this._dragOrigin); this._zoomStartExtent = this.__scaleExtent(this.extent, 1 / _74d, this._zoomAnimAnchor); var ct = _74b(this, this.__tileInfo, this._zoomStartExtent), _74f = this.__getExtentForLevel(ct.lod.level, this._zoomAnimAnchor); this._zoomEndExtent = _74f.extent; this._zoomEndLod = _74f.lod; this._zoomAnim = esri.fx.animateRange({ range: { start: (_74e / this._zoomStartExtent.getWidth()), end: (_74e / this._zoomEndExtent.getWidth()) }, duration: 200, rate: 50, onAnimate: dojo.hitch(this, "_adjustZoomHandler"), onEnd: dojo.hitch(this, "_adjustZoomEndHandler") }).play(); } } }, _adjustZoomHandler: function (_750) { var _751 = this.__scaleExtent(this.extent, _750, this._zoomAnimAnchor); this.__zoom(_751, _750, this._dragOrigin); }, _adjustZoomEndHandler: function () { var _752 = this.extent.getWidth() / this._zoomEndExtent.getWidth(), _753 = this.__scaleExtent(this.extent, 1 / _752, this._zoomAnimAnchor); this.__zoomEnd(_753, _752, this._dragOrigin, this._zoomEndLod, this.__LOD.level != this._zoomEndLod.level); this._zoomStartExtent = this._zoomEndExtent = this._zoomEndLod = this._dragOrigin = this._zoomAnim = this._zoomAnimAnchor = null; } }; })()); } } if (!dojo._hasResource["esri.tasks._task"]) { dojo._hasResource["esri.tasks._task"] = true; dojo.provide("esri.tasks._task"); dojo.declare("esri.tasks._Task", null, { constructor: function (url) { if (url && dojo.isString(url)) { this._url = esri.urlToObject(this.url = url); } this._errorHandler = dojo.hitch(this, this._errorHandler); }, _encode: function (_754, _755) { var _756, type, _757 = {}; for (var i in _754) { if (i == "declaredClass") { continue; } _756 = _754[i]; type = typeof (_756); if (_756 !== null && _756 !== undefined && type !== "function") { if (dojo.isArray(_756)) { _757[i] = []; for (var p = 0, pl = _756.length; p < pl; p++) { _757[i][p] = this._encode(_756[p]); } } else { if (type === "object") { if (_756.toJson) { _757[i] = _755 ? _756.toJson() : dojo.toJson(_756.toJson()); } } else { _757[i] = _756; } } } } return _757; }, _errorHandler: function (err, _758) { if (_758) { _758(err); } this.onError(err); }, onError: function () { } }); dojo.declare("esri.tasks.FeatureSet", null, { constructor: function (json) { if (json) { dojo.mixin(this, json); var _759 = this.features, sr = json.spatialReference, _75a = esri.Graphic, _75b = dojo.mixin, _75c = esri.geometry.getGeometryType(json.geometryType); sr = (this.spatialReference = new esri.SpatialReference(sr)); this.geometryType = json.geometryType; dojo.forEach(_759, function (_75d, i) { _759[i] = new _75a(_75c ? new _75c(_75d.geometry) : null, null, _75d.attributes); if (_759[i].geometry) { _759[i].geometry.setSpatialReference(sr); } }); } else { this.features = []; } }, displayFieldName: null, geometryType: null, fieldAliases: null, toJson: function () { var json = {}; if (this.displayFieldName) { json.displayFieldName = this.displayFieldName; } if (this.spatialReference) { json.sr = this.spatialReference.toJson(); } else { if (this.features[0].geometry) { json.sr = this.features[0].geometry.spatialReference.toJson(); } } if (this.features[0] && this.features[0].geometry) { json.geometryType = esri.geometry.getJsonType(this.features[0].geometry); json.features = esri._encodeGraphics(this.features); } return json; } }); esri.tasks._SpatialRelationship = { SPATIAL_REL_INTERSECTS: "esriSpatialRelIntersects", SPATIAL_REL_CONTAINS: "esriSpatialRelContains", SPATIAL_REL_CROSSES: "esriSpatialRelCrosses", SPATIAL_REL_ENVELOPEINTERSECTS: "esriSpatialRelEnvelopeIntersects", SPATIAL_REL_INDEXINTERSECTS: "esriSpatialRelIndexIntersects", SPATIAL_REL_OVERLAPS: "esriSpatialRelOverlaps", SPATIAL_REL_TOUCHES: "esriSpatialRelTouches", SPATIAL_REL_WITHIN: "esriSpatialRelWithin", SPATIAL_REL_RELATION: "esriSpatialRelRelation" }; } if (!dojo._hasResource["esri.tasks.find"]) { dojo._hasResource["esri.tasks.find"] = true; dojo.provide("esri.tasks.find"); dojo.declare("esri.tasks.FindTask", esri.tasks._Task, { constructor: function (url) { this._url.path += "/find"; this._handler = dojo.hitch(this, this._handler); }, _handler: function (_75e, io, _75f, _760) { try { var _761 = [], _762 = esri.tasks.FindResult; dojo.forEach(_75e.results, function (_763, i) { _761[i] = new _762(_763); }); this.onComplete(_761); if (_75f) { _75f(_761); } } catch (err) { this._errorHandler(err, _760); } }, execute: function (_764, _765, _766) { var _767 = this._encode(dojo.mixin({}, this._url.query, { f: "json" }, _764.toJson())), _768 = this._handler, _769 = this._errorHandler; return esri.request({ url: this._url.path, content: _767, callbackParamName: "callback", load: (function (r, i) { _768(r, i, _765, _766); }), error: (function (r) { _769(r, _766); }) }); }, onComplete: function () { } }); dojo.declare("esri.tasks.FindParameters", null, { searchText: null, contains: true, searchFields: null, outSpatialReference: null, layerIds: null, returnGeometry: false, layerDefinitions: null, toJson: function () { var json = { searchText: this.searchText, contains: this.contains, returnGeometry: this.returnGeometry, maxAllowableOffset: this.maxAllowableOffset }, _76a = this.layerIds, _76b = this.searchFields, _76c = this.outSpatialReference; if (_76a) { json.layers = _76a.join(","); } if (_76b) { json.searchFields = _76b.join(","); } if (_76c) { json.sr = _76c.wkid || dojo.toJson(_76c.toJson()); } json.layerDefs = esri._serializeLayerDefinitions(this.layerDefinitions); return json; } }); dojo.declare("esri.tasks.FindResult", null, { constructor: function (json) { dojo.mixin(this, json); this.feature = new esri.Graphic(json.geometry ? esri.geometry.fromJson(json.geometry) : null, null, json.attributes); delete this.geometry; delete this.attributes; } }); } if (!dojo._hasResource["esri.tasks.geometry"]) { dojo._hasResource["esri.tasks.geometry"] = true; dojo.provide("esri.tasks.geometry"); dojo.declare("esri.tasks.GeometryService", esri.tasks._Task, { constructor: function (url) { var _76d = dojo.hitch; this._encodeGraphics = _76d(this, this._encodeGraphics); this._encodeGeometries = _76d(this, this._encodeGeometries); this._decodeGeometries = _76d(this, this._decodeGeometries); this._projectHandler = _76d(this, this._projectHandler); this._simplifyHandler = _76d(this, this._simplifyHandler); this._bufferHandler = _76d(this, this._bufferHandler); this._areasAndLengthsHandler = _76d(this, this._areasAndLengthsHandler); this._lengthsHandler = _76d(this, this._lengthsHandler); this._labelPointsHandler = _76d(this, this._labelPointsHandler); this._relationHandler = _76d(this, this._relationHandler); this._convexHullHandler = _76d(this, this._convexHullHandler); this._unionHandler = _76d(this, this._unionHandler); this._autoCompleteHandler = _76d(this, this._autoCompleteHandler); this._reshapeHandler = _76d(this, this._reshapeHandler); this._cutHandler = _76d(this, this._cutHandler); this._intersectHandler = _76d(this, this._intersectHandler); this._differenceHandler = _76d(this, this._differenceHandler); this._trimExtendHandler = _76d(this, this._trimExtendHandler); this._densifyHandler = _76d(this, this._densifyHandler); this._generalizeHandler = _76d(this, this._densifyHandler); this._offsetHandler = _76d(this, this._offsetHandler); this._distanceHandler = _76d(this, this._distanceHandler); }, _encodeGraphics: function (_76e) { var gs = []; for (var i = 0, il = _76e.length; i < il; i++) { gs.push(_76e[i].geometry.toJson()); } return { geometryType: esri.geometry.getJsonType(_76e[0].geometry), geometries: gs }; }, _encodeGeometries: function (_76f) { var gs = []; for (var i = 0, il = _76f.length; i < il; i++) { gs.push(_76f[i].toJson()); } return { geometryType: esri.geometry.getJsonType(_76f[0]), geometries: gs }; }, _decodeGeometries: function (_770, _771, sr) { var _772 = esri.geometry.getGeometryType(_771), _773 = _770.geometries, fs = [], _774 = { spatialReference: sr.toJson() }, _775 = dojo.mixin; dojo.forEach(_773, function (g, i) { fs[i] = new _772(_775(g, _774)); }); return fs; }, _toProjectGeometry: function (_776) { var sr = _776.spatialReference.toJson(); if (_776 instanceof esri.geometry.Extent) { return new esri.geometry.Polygon({ rings: [[[_776.xmin, _776.ymin], [_776.xmin, _776.ymax], [_776.xmax, _776.ymax], [_776.xmax, _776.ymin], [_776.xmin, _776.ymin]]], spatialReference: sr }); } else { return new esri.geometry.Polyline({ paths: [[].concat(_776.points)], spatialReference: sr }); } }, _fromProjectedGeometry: function (_777, _778, _779) { if (_778 === "esriGeometryEnvelope") { var ring = _777.rings[0]; return new esri.geometry.Extent(ring[0][0], ring[0][1], ring[2][0], ring[2][1], _779); } else { return new esri.geometry.Multipoint({ points: _777.paths[0], spatialReference: _779.toJson() }); } }, project: function (_77a, _77b, _77c, _77d) { var _77e = _77a[0]; var _77f = dojo.mixin({}, this._url.query, { f: "json", outSR: _77b.wkid ? _77b.wkid : dojo.toJson(_77b.toJson()), inSR: _77e.spatialReference.wkid ? _77e.spatialReference.wkid : dojo.toJson(_77e.spatialReference.toJson()), geometries: dojo.toJson(this._encodeGeometries(_77a)) }), _780 = esri.geometry.getJsonType(_77a[0]), _781 = this._projectHandler, _782 = this._errorHandler; return esri.request({ url: this._url.path + "/project", content: _77f, callbackParamName: "callback", load: (function (r, i) { _781(r, i, _780, _77b, _77c, _77d); }), error: (function (r) { _782(r, _77d); }) }); }, _projectHandler: function (_783, io, _784, _785, _786, _787) { try { var fs = this._decodeGeometries(_783, _784, _785); this.onProjectComplete(fs); if (_786) { _786(fs); } } catch (err) { this._errorHandler(err, _787); } }, onProjectComplete: function () { }, simplify: function (_788, _789, _78a) { var _78b = _788[0].spatialReference; var _78c = dojo.mixin({}, this._url.query, { f: "json", sr: _78b.wkid ? _78b.wkid : dojo.toJson(_78b.toJson()), geometries: dojo.toJson(this._encodeGeometries(_788)) }), _78d = esri.geometry.getJsonType(_788[0]), _78e = this._simplifyHandler, _78f = this._errorHandler; return esri.request({ url: this._url.path + "/simplify", content: _78c, callbackParamName: "callback", load: (function (r, i) { _78e(r, i, _78d, _78b, _789, _78a); }), error: (function (r) { _78f(r, _78a); }) }); }, _simplifyHandler: function (_790, io, _791, sr, _792, _793) { try { var fs = this._decodeGeometries(_790, _791, sr); this.onSimplifyComplete(fs); if (_792) { _792(fs); } } catch (err) { this._errorHandler(err, _793); } }, onSimplifyComplete: function () { }, convexHull: function (_794, _795, _796) { var _797 = _794[0].spatialReference; var _798 = dojo.mixin({}, this._url.query, { f: "json", sr: dojo.toJson(_797.toJson()), geometries: dojo.toJson(this._encodeGeometries(_794)) }), _799 = this._convexHullHandler, _79a = this._errorHandler; return esri.request({ url: this._url.path + "/convexHull", content: _798, callbackParamName: "callback", load: (function (r, i) { _799(r, i, _797, _795, _796); }), error: (function (r) { _79a(r, _796); }) }); }, _convexHullHandler: function (_79b, io, _79c, _79d, _79e) { try { var geom = esri.geometry.fromJson(_79b.geometry).setSpatialReference(_79c); this.onConvexHullComplete(geom); if (_79d) { _79d(geom); } } catch (err) { this._errorHandler(err, _79e); } }, onConvexHullComplete: function () { }, union: function (_79f, _7a0, _7a1) { var _7a2 = _79f[0].spatialReference; var _7a3 = dojo.mixin({}, this._url.query, { f: "json", sr: dojo.toJson(_7a2.toJson()), geometries: dojo.toJson(this._encodeGeometries(_79f)) }), _7a4 = this._unionHandler, _7a5 = this._errorHandler; return esri.request({ url: this._url.path + "/union", content: _7a3, callbackParamName: "callback", load: (function (r, i) { _7a4(r, i, _7a2, _7a0, _7a1); }), error: (function (r) { _7a5(r, _7a1); }) }); }, _unionHandler: function (_7a6, io, _7a7, _7a8, _7a9) { try { var geom = esri.geometry.fromJson(_7a6.geometry).setSpatialReference(_7a7); this.onUnionComplete(geom); if (_7a8) { _7a8(geom); } } catch (err) { this._errorHandler(err, _7a9); } }, onUnionComplete: function () { }, autoComplete: function (_7aa, _7ab, _7ac, _7ad) { var _7ae = _7aa[0].spatialReference; var _7af = dojo.mixin({}, this._url.query, { f: "json", sr: dojo.toJson(_7ae.toJson()), polygons: dojo.toJson(this._encodeGeometries(_7aa).geometries), polylines: dojo.toJson(this._encodeGeometries(_7ab).geometries) }), _7b0 = this._autoCompleteHandler, _7b1 = this._errorHandler; return esri.request({ url: this._url.path + "/autoComplete", content: _7af, callbackParamName: "callback", load: (function (r, i) { _7b0(r, i, _7ae, _7ac, _7ad); }), error: (function (r) { _7b1(r, _7ad); }) }); }, _autoCompleteHandler: function (_7b2, io, _7b3, _7b4, _7b5) { try { var Pgon = esri.geometry.Polygon, _7b6 = _7b2.geometries, _7b7 = []; for (var i = 0, il = _7b6.length; i < il; i++) { _7b7[i] = new Pgon({ spatialReference: _7b3, rings: _7b6[i].rings }); } this.onAutoCompleteComplete(_7b7); if (_7b4) { _7b4(_7b7); } } catch (err) { this._errorHandler(err, _7b5); } }, onAutoCompleteComplete: function () { }, reshape: function (_7b8, _7b9, _7ba, _7bb) { var _7bc = _7b8.spatialReference; var _7bd = dojo.mixin({}, this._url.query, { f: "json", sr: dojo.toJson(_7bc.toJson()), target: dojo.toJson({ geometryType: esri.geometry.getJsonType(_7b8), geometry: _7b8.toJson() }), reshaper: dojo.toJson(_7b9.toJson()) }), _7be = this._reshapeHandler, _7bf = this._errorHandler; return esri.request({ url: this._url.path + "/reshape", content: _7bd, callbackParamName: "callback", load: (function (r, i) { _7be(r, i, _7bc, _7ba, _7bb); }), error: (function (r) { _7bf(r, _7bb); }) }); }, _reshapeHandler: function (_7c0, io, _7c1, _7c2, _7c3) { try { var geom = esri.geometry.fromJson(_7c0.geometry).setSpatialReference(_7c1); this.onReshapeComplete(geom); if (_7c2) { _7c2(geom); } } catch (err) { this._errorHandler(err, _7c3); } }, onReshapeComplete: function () { }, cut: function (_7c4, _7c5, _7c6, _7c7) { var _7c8 = _7c4[0].spatialReference; var _7c9 = dojo.map(_7c4, function (_7ca) { return _7ca.toJson(); }); var _7cb = dojo.mixin({}, this._url.query, { f: "json", sr: dojo.toJson(_7c8.toJson()), target: dojo.toJson({ geometryType: esri.geometry.getJsonType(_7c4[0]), geometries: _7c9 }), cutter: dojo.toJson(_7c5.toJson()) }), _7cc = this._cutHandler, _7cd = this._errorHandler; return esri.request({ url: this._url.path + "/cut", content: _7cb, callbackParamName: "callback", load: (function (r, i) { _7cc(r, i, _7c8, _7c6, _7c7); }), error: (function (r) { _7cd(r, _7c7); }) }); }, _cutHandler: function (_7ce, io, _7cf, _7d0, _7d1) { try { var _7d2 = _7ce.geometries; var _7d3 = {}; _7d3.cutIndexes = _7ce.cutIndexes; _7d3.geometries = []; dojo.forEach(_7d2, function (geom) { _7d3.geometries.push(esri.geometry.fromJson(geom).setSpatialReference(_7cf)); }); this.onCutComplete(_7d3); if (_7d0) { _7d0(_7d3); } } catch (err) { this._errorHandler(err, _7d1); } }, onCutComplete: function () { }, intersect: function (_7d4, _7d5, _7d6, _7d7) { var _7d8 = _7d4[0].spatialReference; var _7d9 = dojo.mixin({}, this._url.query, { f: "json", sr: dojo.toJson(_7d8.toJson()), geometries: dojo.toJson(this._encodeGeometries(_7d4)), geometry: dojo.toJson({ geometryType: esri.geometry.getJsonType(_7d5), geometry: _7d5.toJson() }) }), _7da = this._intersectHandler, _7db = this._errorHandler; return esri.request({ url: this._url.path + "/intersect", content: _7d9, callbackParamName: "callback", load: (function (r, i) { _7da(r, i, _7d8, _7d6, _7d7); }), error: (function (r) { _7db(r, _7d7); }) }); }, _intersectHandler: function (_7dc, io, _7dd, _7de, _7df) { try { var _7e0 = _7dc.geometries, _7e1 = []; dojo.forEach(_7e0, function (geom) { _7e1.push(esri.geometry.fromJson(geom).setSpatialReference(_7dd)); }); this.onIntersectComplete(_7e1); if (_7de) { _7de(_7e1); } } catch (err) { this._errorHandler(err, _7df); } }, onIntersectComplete: function () { }, difference: function (_7e2, _7e3, _7e4, _7e5) { var _7e6 = _7e2[0].spatialReference; var _7e7 = dojo.mixin({}, this._url.query, { f: "json", sr: dojo.toJson(_7e6.toJson()), geometries: dojo.toJson(this._encodeGeometries(_7e2)), geometry: dojo.toJson({ geometryType: esri.geometry.getJsonType(_7e3), geometry: _7e3.toJson() }) }), _7e8 = this._differenceHandler, _7e9 = this._errorHandler; return esri.request({ url: this._url.path + "/difference", content: _7e7, callbackParamName: "callback", load: (function (r, i) { _7e8(r, i, _7e6, _7e4, _7e5); }), error: (function (r) { _7e9(r, _7e5); }) }); }, _differenceHandler: function (_7ea, io, _7eb, _7ec, _7ed) { try { var _7ee = _7ea.geometries, _7ef = []; dojo.forEach(_7ee, function (geom) { _7ef.push(esri.geometry.fromJson(geom).setSpatialReference(_7eb)); }); this.onDifferenceComplete(_7ef); if (_7ec) { _7ec(_7ef); } } catch (err) { this._errorHandler(err, _7ed); } }, onDifferenceComplete: function () { }, buffer: function (_7f0, _7f1, _7f2) { var _7f3 = dojo.mixin({}, this._url.query, { f: "json" }, _7f0.toJson()), sr = _7f0.outSpatialReference || _7f0.geometries[0].geometry.spatialReference, _7f4 = this._bufferHandler, _7f5 = this._errorHandler; return esri.request({ url: this._url.path + "/buffer", content: _7f3, callbackParamName: "callback", load: (function (r, i) { _7f4(r, i, sr, _7f1, _7f2); }), error: (function (r) { _7f5(r, _7f2); }) }); }, _bufferHandler: function (_7f6, io, sr, _7f7, _7f8) { try { var Pgon = esri.geometry.Polygon, _7f9 = _7f6.geometries, _7fa = []; for (var i = 0, il = _7f9.length; i < il; i++) { _7fa[i] = new Pgon({ spatialReference: sr, rings: _7f9[i].rings }); } this.onBufferComplete(_7fa); if (_7f7) { _7f7(_7fa); } } catch (err) { this._errorHandler(err, _7f8); } }, onBufferComplete: function () { }, areasAndLengths: function (_7fb, _7fc, _7fd) { var _7fe = dojo.mixin({}, this._url.query, { f: "json" }, _7fb.toJson()), _7ff = this._areasAndLengthsHandler, _800 = this._errorHandler; return esri.request({ url: this._url.path + "/areasAndLengths", content: _7fe, callbackParamName: "callback", load: (function (r, i) { _7ff(r, i, _7fc, _7fd); }), error: (function (r) { _800(r, _7fd); }) }); }, _areasAndLengthsHandler: function (_801, io, _802, _803) { try { this.onAreasAndLengthsComplete(_801); if (_802) { _802(_801); } } catch (err) { this._errorHandler(err, _803); } }, onAreasAndLengthsComplete: function () { }, lengths: function (_804, _805, _806) { var _807 = dojo.mixin({}, this._url.query, { f: "json" }, _804.toJson()), _808 = this._lengthsHandler, _809 = this._errorHandler; return esri.request({ url: this._url.path + "/lengths", content: _807, callbackParamName: "callback", load: (function (r, i) { _808(r, i, _805, _806); }), error: (function (r) { _809(r, _806); }) }); }, _lengthsHandler: function (_80a, io, _80b, _80c) { try { this.onLengthsComplete(_80a); if (_80b) { _80b(_80a); } } catch (err) { this._errorHandler(err, _80c); } }, onLengthsComplete: function () { }, labelPoints: function (_80d, _80e, _80f) { var _810 = dojo.map(_80d, function (geom) { return geom.toJson(); }); var sr = _80d[0].spatialReference, _811 = dojo.mixin({}, this._url.query, { f: "json", sr: sr.wkid ? sr.wkid : dojo.toJson(sr.toJson()), polygons: dojo.toJson(_810) }), _812 = this._labelPointsHandler, _813 = this._errorHandler; return esri.request({ url: this._url.path + "/labelPoints", content: _811, callbackParamName: "callback", load: (function (r, i) { _812(r, i, _80d, sr, _80e, _80f); }), error: (function (r) { _813(r, _80f); }) }); }, _labelPointsHandler: function (_814, io, _815, sr, _816, _817) { try { var _818 = _814.labelPoints, _819 = []; dojo.forEach(_818, function (geom) { _819.push(esri.geometry.fromJson(geom).setSpatialReference(sr)); }); this.onLabelPointsComplete(_819); if (_816) { _816(_819); } } catch (err) { this._errorHandler(err, _817); } }, onLabelPointsComplete: function () { }, relation: function (_81a, _81b, _81c) { var _81d = dojo.mixin({}, this._url.query, { f: "json" }, _81a.toJson()), _81e = this._relationHandler, _81f = this._errorHandler; return esri.request({ url: this._url.path + "/relation", content: _81d, callbackParamName: "callback", load: (function (r, i) { _81e(r, i, _81b, _81c); }), error: (function (r) { _81f(r, _81c); }) }); }, _relationHandler: function (_820, io, _821, _822) { try { var _823 = _820.relations; this.onRelationComplete(_823); if (_821) { _821(_823); } } catch (err) { this._errorHandler(err, _822); } }, onRelationComplete: function () { }, trimExtend: function (_824, _825, _826) { var _827 = dojo.mixin({}, this._url.query, { f: "json" }, _824.toJson()), _828 = _824.sr, _829 = this._trimExtendHandler, _82a = this._errorHandler; return esri.request({ url: this._url.path + "/trimExtend", content: _827, callbackParamName: "callback", load: (function (r, i) { _829(r, i, _828, _825, _826); }), error: (function (r) { _82a(r, _826); }) }); }, _trimExtendHandler: function (_82b, io, _82c, _82d, _82e) { try { var _82f = esri.geometry.Polyline, _830 = _82b.geometries, _831 = []; for (var i = 0, il = _830.length; i < il; i++) { _831[i] = new _82f({ spatialReference: _82c, paths: _830[i].paths }); } this.onTrimExtendComplete(_831); if (_82d) { _82d(_831); } } catch (err) { this._errorHandler(err, _82e); } }, onTrimExtendComplete: function () { }, densify: function (_832, _833, _834) { var _835 = dojo.mixin({}, this._url.query, { f: "json" }, _832.toJson()), _836 = _832.geometries[0].spatialReference, _837 = this._densifyHandler, _838 = this._errorHandler; return esri.request({ url: this._url.path + "/densify", content: _835, callbackParamName: "callback", load: (function (r, i) { _837(r, i, _836, _833, _834); }), error: (function (r) { _838(r, _834); }) }); }, _densifyHandler: function (_839, io, _83a, _83b, _83c) { try { var _83d = _839.geometries, _83e = []; dojo.forEach(_83d, function (geom) { _83e.push(esri.geometry.fromJson(geom).setSpatialReference(_83a)); }); this.onDensifyComplete(_83e); if (_83b) { _83b(_83e); } } catch (err) { this._errorHandler(err, _83c); } }, onDensifyComplete: function () { }, generalize: function (_83f, _840, _841) { var _842 = dojo.mixin({}, this._url.query, { f: "json" }, _83f.toJson()), _843 = _83f.geometries[0].spatialReference, _844 = this._generalizeHandler, _845 = this._errorHandler; return esri.request({ url: this._url.path + "/generalize", content: _842, callbackParamName: "callback", load: (function (r, i) { _844(r, i, _843, _840, _841); }), error: (function (r) { _845(r, _841); }) }); }, _generalizeHandler: function (_846, io, _847, _848, _849) { try { var _84a = _846.geometries, _84b = []; dojo.forEach(_84a, function (geom) { _84b.push(esri.geometry.fromJson(geom).setSpatialReference(_847)); }); this.onGeneralizeComplete(_84b); if (_848) { _848(_84b); } } catch (err) { this._errorHandler(err, _849); } }, onGeneralizeComplete: function () { }, offset: function (_84c, _84d, _84e) { var _84f = dojo.mixin({}, this._url.query, { f: "json" }, _84c.toJson()), _850 = _84c.geometries[0].spatialReference, _851 = this._offsetHandler, _852 = this._errorHandler; return esri.request({ url: this._url.path + "/offset", content: _84f, callbackParamName: "callback", load: (function (r, i) { _851(r, i, _850, _84d, _84e); }), error: (function (r) { _852(r, _84e); }) }); }, _offsetHandler: function (_853, io, _854, _855, _856) { try { var _857 = _853.geometries, _858 = []; dojo.forEach(_857, function (geom) { _858.push(esri.geometry.fromJson(geom).setSpatialReference(_854)); }); this.onOffsetComplete(_858); if (_855) { _855(_858); } } catch (err) { this._errorHandler(err, _856); } }, onOffsetComplete: function () { }, distance: function (_859, _85a, _85b) { var _85c = dojo.mixin({}, this._url.query, { f: "json" }, _859.toJson()), _85d = _859.geometry1.spatialReference, _85e = this._distanceHandler, _85f = this._errorHandler; return esri.request({ url: this._url.path + "/distance", content: _85c, callbackParamName: "callback", load: (function (r, i) { _85e(r, i, _85d, _85a, _85b); }), error: (function (r) { _85f(r, _85b); }) }); }, _distanceHandler: function (_860, io, _861, _862, _863) { try { _860 = _860 && _860.distance; this.onDistanceComplete(_860); if (_862) { _862(_860); } } catch (err) { this._errorHandler(err, _863); } }, onDistanceComplete: function () { } }); dojo.declare("esri.tasks.TrimExtendParameters", null, { polylines: null, trimExtendTo: null, extendHow: null, toJson: function () { var _864 = dojo.map(this.polylines, function (geom) { return geom.toJson(); }); var json = {}; json.polylines = dojo.toJson(_864); json.trimExtendTo = dojo.toJson(this.trimExtendTo.toJson()); json.sr = dojo.toJson(this.polylines[0].spatialReference.toJson()); json.extendHow = this.extendHow || 0; return json; } }); dojo.mixin(esri.tasks.TrimExtendParameters, { DEFAULT_CURVE_EXTENSION: 0, RELOCATE_ENDS: 1, KEEP_END_ATTRIBUTES: 2, NO_END_ATTRIBUTES: 4, NO_EXTEND_AT_FROM: 8, NO_EXTEND_AT_TO: 16 }); dojo.declare("esri.tasks.BufferParameters", null, { geometries: null, outSpatialReference: null, bufferSpatialReference: null, distances: null, unit: null, unionResults: false, toJson: function () { var json = { unit: this.unit, unionResults: ("" + this.unionResults) }, dt = this.distances, _865 = this.outSpatialReference, _866 = this.bufferSpatialReference; var _867 = dojo.map(this.geometries, function (geom) { geom = (geom.type === "extent") ? this._extentToPolygon(geom) : geom; return geom.toJson(); }, this); var _868 = this.geometries; if (_868 && _868.length > 0) { var _869 = _868[0].type === "extent" ? "esriGeometryPolygon" : esri.geometry.getJsonType(_868[0]); json.geometries = dojo.toJson({ geometryType: _869, geometries: _867 }); json.inSR = _868[0].spatialReference.wkid ? _868[0].spatialReference.wkid : dojo.toJson(_868[0].spatialReference.toJson()); } if (dt) { json.distances = dt.join(","); } if (_865) { json.outSR = _865.wkid ? _865.wkid : dojo.toJson(_865.toJson()); } if (_866) { json.bufferSR = _866.wkid ? _866.wkid : dojo.toJson(_866.toJson()); } return json; }, _extentToPolygon: function (_86a) { var xmin = _86a.xmin, ymin = _86a.ymin, xmax = _86a.xmax, ymax = _86a.ymax; return new esri.geometry.Polygon({ "rings": [[[xmin, ymin], [xmin, ymax], [xmax, ymax], [xmax, ymin], [xmin, ymin]]], "spatialReference": _86a.spatialReference.toJson() }); } }); dojo.mixin(esri.tasks.GeometryService, { UNIT_METER: 9001, UNIT_GERMAN_METER: 9031, UNIT_FOOT: 9002, UNIT_SURVEY_FOOT: 9003, UNIT_CLARKE_FOOT: 9005, UNIT_FATHOM: 9014, UNIT_NAUTICAL_MILE: 9030, UNIT_SURVEY_CHAIN: 9033, UNIT_SURVEY_LINK: 9034, UNIT_SURVEY_MILE: 9035, UNIT_KILOMETER: 9036, UNIT_CLARKE_YARD: 9037, UNIT_CLARKE_CHAIN: 9038, UNIT_CLARKE_LINK: 9039, UNIT_SEARS_YARD: 9040, UNIT_SEARS_FOOT: 9041, UNIT_SEARS_CHAIN: 9042, UNIT_SEARS_LINK: 9043, UNIT_BENOIT_1895A_YARD: 9050, UNIT_BENOIT_1895A_FOOT: 9051, UNIT_BENOIT_1895A_CHAIN: 9052, UNIT_BENOIT_1895A_LINK: 9053, UNIT_BENOIT_1895B_YARD: 9060, UNIT_BENOIT_1895B_FOOT: 9061, UNIT_BENOIT_1895B_CHAIN: 9062, UNIT_BENOIT_1895B_LINK: 9063, UNIT_INDIAN_FOOT: 9080, UNIT_INDIAN_1937_FOOT: 9081, UNIT_INDIAN_1962_FOOT: 9082, UNIT_INDIAN_1975_FOOT: 9083, UNIT_INDIAN_YARD: 9084, UNIT_INDIAN_1937_YARD: 9085, UNIT_INDIAN_1962_YARD: 9086, UNIT_INDIAN_1975_YARD: 9087, UNIT_FOOT_1865: 9070, UNIT_RADIAN: 9101, UNIT_DEGREE: 9102, UNIT_ARCMINUTE: 9103, UNIT_ARCSECOND: 9104, UNIT_GRAD: 9105, UNIT_GON: 9106, UNIT_MICRORADIAN: 9109, UNIT_ARCMINUTE_CENTESIMAL: 9112, UNIT_ARCSECOND_CENTESIMAL: 9113, UNIT_MIL6400: 9114, UNIT_BRITISH_1936_FOOT: 9095, UNIT_GOLDCOAST_FOOT: 9094, UNIT_INTERNATIONAL_CHAIN: 109003, UNIT_INTERNATIONAL_LINK: 109004, UNIT_INTERNATIONAL_YARD: 109001, UNIT_STATUTE_MILE: 9093, UNIT_SURVEY_YARD: 109002, UNIT_50KILOMETER_LENGTH: 109030, UNIT_150KILOMETER_LENGTH: 109031, UNIT_DECIMETER: 109005, UNIT_CENTIMETER: 109006, UNIT_MILLIMETER: 109007, UNIT_INTERNATIONAL_INCH: 109008, UNIT_US_SURVEY_INCH: 109009, UNIT_INTERNATIONAL_ROD: 109010, UNIT_US_SURVEY_ROD: 109011, UNIT_US_NAUTICAL_MILE: 109012, UNIT_UK_NAUTICAL_MILE: 109013, UNIT_SQUARE_INCHES: "esriSquareInches", UNIT_SQUARE_FEET: "esriSquareFeet", UNIT_SQUARE_YARDS: "esriSquareYards", UNIT_ACRES: "esriAcres", UNIT_SQUARE_MILES: "esriSquareMiles", UNIT_SQUARE_MILLIMETERS: "esriSquareMillimeters", UNIT_SQUARE_CENTIMETERS: "esriSquareCentimeters", UNIT_SQUARE_DECIMETERS: "esriSquareDecimeters", UNIT_SQUARE_METERS: "esriSquareMeters", UNIT_ARES: "esriAres", UNIT_HECTARES: "esriHectares", UNIT_SQUARE_KILOMETERS: "esriSquareKilometers" }); dojo.declare("esri.tasks.AreasAndLengthsParameters", null, { polygons: null, lengthUnit: null, areaUnit: null, toJson: function () { var _86b = dojo.map(this.polygons, function (geom) { return geom.toJson(); }); var json = {}; json.polygons = dojo.toJson(_86b); var _86c = this.polygons[0].spatialReference; json.sr = _86c.wkid ? _86c.wkid : dojo.toJson(_86c.toJson()); if (this.lengthUnit) { json.lengthUnit = this.lengthUnit; } if (this.areaUnit) { if (dojo.isString(this.areaUnit)) { json.areaUnit = dojo.toJson({ "areaUnit": this.areaUnit }); } else { json.areaUnit = this.areaUnit; } } return json; } }); dojo.declare("esri.tasks.LengthsParameters", null, { polylines: null, lengthUnit: null, geodesic: null, toJson: function () { var _86d = dojo.map(this.polylines, function (geom) { return geom.toJson(); }); var json = {}; json.polylines = dojo.toJson(_86d); var _86e = this.polylines[0].spatialReference; json.sr = _86e.wkid ? _86e.wkid : dojo.toJson(_86e.toJson()); if (this.lengthUnit) { json.lengthUnit = this.lengthUnit; } if (this.geodesic) { json.geodesic = this.geodesic; } return json; } }); dojo.declare("esri.tasks.RelationParameters", null, { geometries1: null, geometries2: null, relation: null, relationParam: null, toJson: function () { var _86f = dojo.map(this.geometries1, function (geom) { return geom.toJson(); }); var _870 = dojo.map(this.geometries2, function (geom) { return geom.toJson(); }); var json = {}; var _871 = this.geometries1; if (_871 && _871.length > 0) { json.geometries1 = dojo.toJson({ geometryType: esri.geometry.getJsonType(_871[0]), geometries: _86f }); var _872 = this.geometries1[0].spatialReference; json.sr = _872.wkid ? _872.wkid : dojo.toJson(_872.toJson()); } var _873 = this.geometries2; if (_873 && _873.length > 0) { json.geometries2 = dojo.toJson({ geometryType: esri.geometry.getJsonType(_873[0]), geometries: _870 }); } if (this.relation) { json.relation = this.relation; } if (this.relationParam) { json.relationParam = dojo.toJson(this.relationParam); } return json; } }); dojo.mixin(esri.tasks.RelationParameters, { SPATIAL_REL_CROSS: "esriGeometryRelationCross", SPATIAL_REL_DISJOINT: "esriGeometryRelationDisjoint", SPATIAL_REL_IN: "esriGeometryRelationIn", SPATIAL_REL_INTERIORINTERSECTION: "esriGeometryRelationInteriorIntersection", SPATIAL_REL_INTERSECTION: "esriGeometryRelationIntersection", SPATIAL_REL_COINCIDENCE: "esriGeometryRelationLineCoincidence", SPATIAL_REL_LINETOUCH: "esriGeometryRelationLineTouch", SPATIAL_REL_OVERLAP: "esriGeometryRelationOverlap", SPATIAL_REL_POINTTOUCH: "esriGeometryRelationPointTouch", SPATIAL_REL_TOUCH: "esriGeometryRelationTouch", SPATIAL_REL_WITHIN: "esriGeometryRelationWithin", SPATIAL_REL_RELATION: "esriGeometryRelationRelation" }); dojo.declare("esri.tasks.DensifyParameters", null, { geometries: null, geodesic: null, lengthUnit: null, maxSegmentLength: null, toJson: function () { var _874 = dojo.map(this.geometries, function (geom) { return geom.toJson(); }); var json = {}; if (this.geometries && this.geometries.length > 0) { json.geometries = dojo.toJson({ geometryType: esri.geometry.getJsonType(this.geometries[0]), geometries: _874 }); json.sr = dojo.toJson(this.geometries[0].spatialReference.toJson()); } if (this.geodesic) { json.geodesic = this.geodesic; } if (this.lengthUnit) { json.lengthUnit = this.lengthUnit; } if (this.maxSegmentLength) { json.maxSegmentLength = this.maxSegmentLength; } return json; } }); dojo.declare("esri.tasks.GeneralizeParameters", null, { geometries: null, deviationUnit: null, maxDeviation: null, toJson: function () { var _875 = dojo.map(this.geometries, function (geom) { return geom.toJson(); }); var json = {}; if (this.geometries && this.geometries.length > 0) { json.geometries = dojo.toJson({ geometryType: esri.geometry.getJsonType(this.geometries[0]), geometries: _875 }); json.sr = dojo.toJson(this.geometries[0].spatialReference.toJson()); } if (this.deviationUnit) { json.deviationUnit = this.deviationUnit; } if (this.maxDeviation) { json.maxDeviation = this.maxDeviation; } return json; } }); dojo.declare("esri.tasks.OffsetParameters", null, { geometries: null, bevelRatio: null, offsetDistance: null, offsetHow: null, offsetUnit: null, toJson: function () { var _876 = dojo.map(this.geometries, function (geom) { return geom.toJson(); }); var json = {}; if (this.geometries && this.geometries.length > 0) { json.geometries = dojo.toJson({ geometryType: esri.geometry.getJsonType(this.geometries[0]), geometries: _876 }); json.sr = dojo.toJson(this.geometries[0].spatialReference.toJson()); } if (this.bevelRatio) { json.bevelRatio = this.bevelRatio; } if (this.offsetDistance) { json.offsetDistance = this.offsetDistance; } if (this.offsetHow) { json.offsetHow = this.offsetHow; } if (this.offsetUnit) { json.offsetUnit = this.offsetUnit; } return json; } }); dojo.mixin(esri.tasks.OffsetParameters, { OFFSET_BEVELLED: "esriGeometryOffsetBevelled", OFFSET_MITERED: "esriGeometryOffsetMitered", OFFSET_ROUNDED: "esriGeometryOffsetRounded" }); dojo.declare("esri.tasks.DistanceParameters", null, { geometry1: null, geometry2: null, distanceUnit: null, geodesic: null, toJson: function () { var json = {}; var _877 = this.geometry1; if (_877) { json.geometry1 = dojo.toJson({ geometryType: esri.geometry.getJsonType(_877), geometry: _877 }); } var _878 = this.geometry2; if (_878) { json.geometry2 = dojo.toJson({ geometryType: esri.geometry.getJsonType(_878), geometry: _878 }); } json.sr = dojo.toJson(this.geometry1.spatialReference.toJson()); if (this.distanceUnit) { json.distanceUnit = this.distanceUnit; } if (this.geodesic) { json.geodesic = this.geodesic; } return json; } }); } if (!dojo._hasResource["dojo.cldr.supplemental"]) { dojo._hasResource["dojo.cldr.supplemental"] = true; dojo.provide("dojo.cldr.supplemental"); dojo.cldr.supplemental.getFirstDayOfWeek = function (_879) { var _87a = { mv: 5, af: 6, bh: 6, dj: 6, dz: 6, eg: 6, er: 6, et: 6, iq: 6, ir: 6, jo: 6, ke: 6, kw: 6, ly: 6, ma: 6, om: 6, qa: 6, sa: 6, sd: 6, so: 6, tn: 6, ye: 6, ar: 0, as: 0, az: 0, bw: 0, ca: 0, cn: 0, fo: 0, ge: 0, gl: 0, gu: 0, hk: 0, ie: 0, il: 0, "in": 0, is: 0, jm: 0, jp: 0, kg: 0, kr: 0, la: 0, mh: 0, mn: 0, mo: 0, mp: 0, mt: 0, nz: 0, ph: 0, pk: 0, sg: 0, sy: 0, th: 0, tt: 0, tw: 0, um: 0, us: 0, uz: 0, vi: 0, zw: 0 }; var _87b = dojo.cldr.supplemental._region(_879); var dow = _87a[_87b]; return (dow === undefined) ? 1 : dow; }; dojo.cldr.supplemental._region = function (_87c) { _87c = dojo.i18n.normalizeLocale(_87c); var tags = _87c.split("-"); var _87d = tags[1]; if (!_87d) { _87d = { de: "de", en: "us", es: "es", fi: "fi", fr: "fr", he: "il", hu: "hu", it: "it", ja: "jp", ko: "kr", nl: "nl", pt: "br", sv: "se", zh: "cn"}[tags[0]]; } else { if (_87d.length == 4) { _87d = tags[2]; } } return _87d; }; dojo.cldr.supplemental.getWeekend = function (_87e) { var _87f = { "in": 0, af: 4, dz: 4, ir: 4, om: 4, sa: 4, ye: 4, ae: 5, bh: 5, eg: 5, il: 5, iq: 5, jo: 5, kw: 5, ly: 5, ma: 5, qa: 5, sd: 5, sy: 5, tn: 5 }; var _880 = { af: 5, dz: 5, ir: 5, om: 5, sa: 5, ye: 5, ae: 6, bh: 5, eg: 6, il: 6, iq: 6, jo: 6, kw: 6, ly: 6, ma: 6, qa: 6, sd: 6, sy: 6, tn: 6 }; var _881 = dojo.cldr.supplemental._region(_87e); var _882 = _87f[_881]; var end = _880[_881]; if (_882 === undefined) { _882 = 6; } if (end === undefined) { end = 0; } return { start: _882, end: end }; }; } if (!dojo._hasResource["dojo.date.locale"]) { dojo._hasResource["dojo.date.locale"] = true; dojo.provide("dojo.date.locale"); (function () { function _883(_884, _885, _886, _887) { return _887.replace(/([a-z])\1*/ig, function (_888) { var s, pad, c = _888.charAt(0), l = _888.length, _889 = ["abbr", "wide", "narrow"]; switch (c) { case "G": s = _885[(l < 4) ? "eraAbbr" : "eraNames"][_884.getFullYear() < 0 ? 0 : 1]; break; case "y": s = _884.getFullYear(); switch (l) { case 1: break; case 2: if (!_886.fullYear) { s = String(s); s = s.substr(s.length - 2); break; } default: pad = true; } break; case "Q": case "q": s = Math.ceil((_884.getMonth() + 1) / 3); pad = true; break; case "M": var m = _884.getMonth(); if (l < 3) { s = m + 1; pad = true; } else { var _88a = ["months", "format", _889[l - 3]].join("-"); s = _885[_88a][m]; } break; case "w": var _88b = 0; s = dojo.date.locale._getWeekOfYear(_884, _88b); pad = true; break; case "d": s = _884.getDate(); pad = true; break; case "D": s = dojo.date.locale._getDayOfYear(_884); pad = true; break; case "E": var d = _884.getDay(); if (l < 3) { s = d + 1; pad = true; } else { var _88c = ["days", "format", _889[l - 3]].join("-"); s = _885[_88c][d]; } break; case "a": var _88d = (_884.getHours() < 12) ? "am" : "pm"; s = _885["dayPeriods-format-wide-" + _88d]; break; case "h": case "H": case "K": case "k": var h = _884.getHours(); switch (c) { case "h": s = (h % 12) || 12; break; case "H": s = h; break; case "K": s = (h % 12); break; case "k": s = h || 24; break; } pad = true; break; case "m": s = _884.getMinutes(); pad = true; break; case "s": s = _884.getSeconds(); pad = true; break; case "S": s = Math.round(_884.getMilliseconds() * Math.pow(10, l - 3)); pad = true; break; case "v": case "z": s = dojo.date.locale._getZone(_884, true, _886); if (s) { break; } l = 4; case "Z": var _88e = dojo.date.locale._getZone(_884, false, _886); var tz = [(_88e <= 0 ? "+" : "-"), dojo.string.pad(Math.floor(Math.abs(_88e) / 60), 2), dojo.string.pad(Math.abs(_88e) % 60, 2)]; if (l == 4) { tz.splice(0, 0, "GMT"); tz.splice(3, 0, ":"); } s = tz.join(""); break; default: throw new Error("dojo.date.locale.format: invalid pattern char: " + _887); } if (pad) { s = dojo.string.pad(s, l); } return s; }); }; dojo.date.locale._getZone = function (_88f, _890, _891) { if (_890) { return dojo.date.getTimezoneName(_88f); } else { return _88f.getTimezoneOffset(); } }; dojo.date.locale.format = function (_892, _893) { _893 = _893 || {}; var _894 = dojo.i18n.normalizeLocale(_893.locale), _895 = _893.formatLength || "short", _896 = dojo.date.locale._getGregorianBundle(_894), str = [], _897 = dojo.hitch(this, _883, _892, _896, _893); if (_893.selector == "year") { return _898(_896["dateFormatItem-yyyy"] || "yyyy", _897); } var _899; if (_893.selector != "date") { _899 = _893.timePattern || _896["timeFormat-" + _895]; if (_899) { str.push(_898(_899, _897)); } } if (_893.selector != "time") { _899 = _893.datePattern || _896["dateFormat-" + _895]; if (_899) { str.push(_898(_899, _897)); } } return str.length == 1 ? str[0] : _896["dateTimeFormat-" + _895].replace(/\{(\d+)\}/g, function (_89a, key) { return str[key]; }); }; dojo.date.locale.regexp = function (_89b) { return dojo.date.locale._parseInfo(_89b).regexp; }; dojo.date.locale._parseInfo = function (_89c) { _89c = _89c || {}; var _89d = dojo.i18n.normalizeLocale(_89c.locale), _89e = dojo.date.locale._getGregorianBundle(_89d), _89f = _89c.formatLength || "short", _8a0 = _89c.datePattern || _89e["dateFormat-" + _89f], _8a1 = _89c.timePattern || _89e["timeFormat-" + _89f], _8a2; if (_89c.selector == "date") { _8a2 = _8a0; } else { if (_89c.selector == "time") { _8a2 = _8a1; } else { _8a2 = _89e["dateTimeFormat-" + _89f].replace(/\{(\d+)\}/g, function (_8a3, key) { return [_8a1, _8a0][key]; }); } } var _8a4 = [], re = _898(_8a2, dojo.hitch(this, _8a5, _8a4, _89e, _89c)); return { regexp: re, tokens: _8a4, bundle: _89e }; }; dojo.date.locale.parse = function (_8a6, _8a7) { var info = dojo.date.locale._parseInfo(_8a7), _8a8 = info.tokens, _8a9 = info.bundle, re = new RegExp("^" + info.regexp + "$", info.strict ? "" : "i"), _8aa = re.exec(_8a6); if (!_8aa) { return null; } var _8ab = ["abbr", "wide", "narrow"], _8ac = [1970, 0, 1, 0, 0, 0, 0], amPm = "", _8ad = dojo.every(_8aa, function (v, i) { if (!i) { return true; } var _8ae = _8a8[i - 1]; var l = _8ae.length; switch (_8ae.charAt(0)) { case "y": if (l != 2 && _8a7.strict) { _8ac[0] = v; } else { if (v < 100) { v = Number(v); var year = "" + new Date().getFullYear(), _8af = year.substring(0, 2) * 100, _8b0 = Math.min(Number(year.substring(2, 4)) + 20, 99), num = (v < _8b0) ? _8af + v : _8af - 100 + v; _8ac[0] = num; } else { if (_8a7.strict) { return false; } _8ac[0] = v; } } break; case "M": if (l > 2) { var _8b1 = _8a9["months-format-" + _8ab[l - 3]].concat(); if (!_8a7.strict) { v = v.replace(".", "").toLowerCase(); _8b1 = dojo.map(_8b1, function (s) { return s.replace(".", "").toLowerCase(); }); } v = dojo.indexOf(_8b1, v); if (v == -1) { return false; } } else { v--; } _8ac[1] = v; break; case "E": case "e": var days = _8a9["days-format-" + _8ab[l - 3]].concat(); if (!_8a7.strict) { v = v.toLowerCase(); days = dojo.map(days, function (d) { return d.toLowerCase(); }); } v = dojo.indexOf(days, v); if (v == -1) { return false; } break; case "D": _8ac[1] = 0; case "d": _8ac[2] = v; break; case "a": var am = _8a7.am || _8a9["dayPeriods-format-wide-am"], pm = _8a7.pm || _8a9["dayPeriods-format-wide-pm"]; if (!_8a7.strict) { var _8b2 = /\./g; v = v.replace(_8b2, "").toLowerCase(); am = am.replace(_8b2, "").toLowerCase(); pm = pm.replace(_8b2, "").toLowerCase(); } if (_8a7.strict && v != am && v != pm) { return false; } amPm = (v == pm) ? "p" : (v == am) ? "a" : ""; break; case "K": if (v == 24) { v = 0; } case "h": case "H": case "k": if (v > 23) { return false; } _8ac[3] = v; break; case "m": _8ac[4] = v; break; case "s": _8ac[5] = v; break; case "S": _8ac[6] = v; } return true; }); var _8b3 = +_8ac[3]; if (amPm === "p" && _8b3 < 12) { _8ac[3] = _8b3 + 12; } else { if (amPm === "a" && _8b3 == 12) { _8ac[3] = 0; } } var _8b4 = new Date(_8ac[0], _8ac[1], _8ac[2], _8ac[3], _8ac[4], _8ac[5], _8ac[6]); if (_8a7.strict) { _8b4.setFullYear(_8ac[0]); } var _8b5 = _8a8.join(""), _8b6 = _8b5.indexOf("d") != -1, _8b7 = _8b5.indexOf("M") != -1; if (!_8ad || (_8b7 && _8b4.getMonth() > _8ac[1]) || (_8b6 && _8b4.getDate() > _8ac[2])) { return null; } if ((_8b7 && _8b4.getMonth() < _8ac[1]) || (_8b6 && _8b4.getDate() < _8ac[2])) { _8b4 = dojo.date.add(_8b4, "hour", 1); } return _8b4; }; function _898(_8b8, _8b9, _8ba, _8bb) { var _8bc = function (x) { return x; }; _8b9 = _8b9 || _8bc; _8ba = _8ba || _8bc; _8bb = _8bb || _8bc; var _8bd = _8b8.match(/(''|[^'])+/g), _8be = _8b8.charAt(0) == "'"; dojo.forEach(_8bd, function (_8bf, i) { if (!_8bf) { _8bd[i] = ""; } else { _8bd[i] = (_8be ? _8ba : _8b9)(_8bf.replace(/''/g, "'")); _8be = !_8be; } }); return _8bb(_8bd.join("")); }; function _8a5(_8c0, _8c1, _8c2, _8c3) { _8c3 = dojo.regexp.escapeString(_8c3); if (!_8c2.strict) { _8c3 = _8c3.replace(" a", " ?a"); } return _8c3.replace(/([a-z])\1*/ig, function (_8c4) { var s, c = _8c4.charAt(0), l = _8c4.length, p2 = "", p3 = ""; if (_8c2.strict) { if (l > 1) { p2 = "0" + "{" + (l - 1) + "}"; } if (l > 2) { p3 = "0" + "{" + (l - 2) + "}"; } } else { p2 = "0?"; p3 = "0{0,2}"; } switch (c) { case "y": s = "\\d{2,4}"; break; case "M": s = (l > 2) ? "\\S+?" : p2 + "[1-9]|1[0-2]"; break; case "D": s = p2 + "[1-9]|" + p3 + "[1-9][0-9]|[12][0-9][0-9]|3[0-5][0-9]|36[0-6]"; break; case "d": s = "3[01]|[12]\\d|" + p2 + "[1-9]"; break; case "w": s = p2 + "[1-9]|[1-4][0-9]|5[0-3]"; break; case "E": s = "\\S+"; break; case "h": s = p2 + "[1-9]|1[0-2]"; break; case "k": s = p2 + "\\d|1[01]"; break; case "H": s = p2 + "\\d|1\\d|2[0-3]"; break; case "K": s = p2 + "[1-9]|1\\d|2[0-4]"; break; case "m": case "s": s = "[0-5]\\d"; break; case "S": s = "\\d{" + l + "}"; break; case "a": var am = _8c2.am || _8c1["dayPeriods-format-wide-am"], pm = _8c2.pm || _8c1["dayPeriods-format-wide-pm"]; if (_8c2.strict) { s = am + "|" + pm; } else { s = am + "|" + pm; if (am != am.toLowerCase()) { s += "|" + am.toLowerCase(); } if (pm != pm.toLowerCase()) { s += "|" + pm.toLowerCase(); } if (s.indexOf(".") != -1) { s += "|" + s.replace(/\./g, ""); } } s = s.replace(/\./g, "\\."); break; default: s = ".*"; } if (_8c0) { _8c0.push(_8c4); } return "(" + s + ")"; }).replace(/[\xa0 ]/g, "[\\s\\xa0]"); }; })(); (function () { var _8c5 = []; dojo.date.locale.addCustomFormats = function (_8c6, _8c7) { _8c5.push({ pkg: _8c6, name: _8c7 }); }; dojo.date.locale._getGregorianBundle = function (_8c8) { var _8c9 = {}; dojo.forEach(_8c5, function (desc) { var _8ca = dojo.i18n.getLocalization(desc.pkg, desc.name, _8c8); _8c9 = dojo.mixin(_8c9, _8ca); }, this); return _8c9; }; })(); dojo.date.locale.addCustomFormats("dojo.cldr", "gregorian"); dojo.date.locale.getNames = function (item, type, _8cb, _8cc) { var _8cd, _8ce = dojo.date.locale._getGregorianBundle(_8cc), _8cf = [item, _8cb, type]; if (_8cb == "standAlone") { var key = _8cf.join("-"); _8cd = _8ce[key]; if (_8cd[0] == 1) { _8cd = undefined; } } _8cf[1] = "format"; return (_8cd || _8ce[_8cf.join("-")]).concat(); }; dojo.date.locale.isWeekend = function (_8d0, _8d1) { var _8d2 = dojo.cldr.supplemental.getWeekend(_8d1), day = (_8d0 || new Date()).getDay(); if (_8d2.end < _8d2.start) { _8d2.end += 7; if (day < _8d2.start) { day += 7; } } return day >= _8d2.start && day <= _8d2.end; }; dojo.date.locale._getDayOfYear = function (_8d3) { return dojo.date.difference(new Date(_8d3.getFullYear(), 0, 1, _8d3.getHours()), _8d3) + 1; }; dojo.date.locale._getWeekOfYear = function (_8d4, _8d5) { if (arguments.length == 1) { _8d5 = 0; } var _8d6 = new Date(_8d4.getFullYear(), 0, 1).getDay(), adj = (_8d6 - _8d5 + 7) % 7, week = Math.floor((dojo.date.locale._getDayOfYear(_8d4) + adj - 1) / 7); if (_8d6 == _8d5) { week++; } return week; }; } if (!dojo._hasResource["esri.tasks.gp"]) { dojo._hasResource["esri.tasks.gp"] = true; dojo.provide("esri.tasks.gp"); dojo.declare("esri.tasks.Geoprocessor", esri.tasks._Task, { constructor: function (url) { this._jobUpdateHandler = dojo.hitch(this, this._jobUpdateHandler); this._getJobStatus = dojo.hitch(this, this._getJobStatus); this._getResultDataHandler = dojo.hitch(this, this._getResultDataHandler); this._getResultImageHandler = dojo.hitch(this, this._getResultImageHandler); this._executeHandler = dojo.hitch(this, this._executeHandler); this._updateTimers = []; }, updateDelay: 1000, processSpatialReference: null, outputSpatialReference: null, outSpatialReference: null, setUpdateDelay: function (_8d7) { this.updateDelay = _8d7; }, setProcessSpatialReference: function (sr) { this.processSpatialReference = sr; }, setOutputSpatialReference: function (sr) { this._setOutSR(sr); }, setOutSpatialReference: function (sr) { this._setOutSR(sr); }, _setOutSR: function (sr) { this.outSpatialReference = this.outputSpatialReference = sr; }, _getOutSR: function () { return this.outSpatialReference || this.outputSpatialReference; }, _gpEncode: function (_8d8, _8d9) { for (var i in _8d8) { var _8da = _8d8[i]; if (dojo.isArray(_8da)) { _8d8[i] = dojo.toJson(dojo.map(_8da, function (item) { return this._gpEncode({ item: item }, true).item; }, this)); } else { if (_8da instanceof Date) { _8d8[i] = _8da.getTime(); } } } return this._encode(_8d8, _8d9); }, _decode: function (_8db) { var _8dc = _8db.dataType, _8dd = new esri.tasks.ParameterValue(_8db); if (dojo.indexOf(["GPBoolean", "GPDouble", "GPLong", "GPString"], _8dc) !== -1) { return _8dd; } if (_8dc == "GPLinearUnit") { _8dd.value = new esri.tasks.LinearUnit(_8dd.value); } else { if (_8dc == "GPFeatureRecordSetLayer" || _8dc == "GPRecordSet") { _8dd.value = new esri.tasks.FeatureSet(_8dd.value); } else { if (_8dc == "GPDataFile") { _8dd.value = new esri.tasks.DataFile(_8dd.value); } else { if (_8dc == "GPDate") { var _8de = _8dd.value; if (dojo.isString(_8de)) { _8dd.value = new esri.tasks.Date({ date: _8de }); } else { _8dd.value = new Date(_8de); } } else { if (_8dc == "GPRasterData" || _8dc == "GPRasterDataLayer") { var _8df = _8db.value.mapImage; if (_8df) { _8dd.value = new esri.layers.MapImage(_8df); } else { _8dd.value = new esri.tasks.RasterData(_8dd.value); } } else { if (_8dc.indexOf("GPMultiValue:") !== -1) { var type = _8dc.split(":")[1], _8de = _8dd.value; _8dd.value = dojo.map(_8de, function (item) { return this._decode({ paramName: "_name", dataType: type, value: item }).value; }, this); } else { console.log(this.declaredClass + " : " + esri.bundle.tasks.gp.gpDataTypeNotHandled + " : " + _8dd.dataType); _8dd = null; } } } } } } return _8dd; }, submitJob: function (_8e0, _8e1, _8e2, _8e3) { var _8e4 = this._getOutSR(); var _8e5 = this._gpEncode(dojo.mixin({}, this._url.query, { f: "json", "env:outSR": (_8e4 ? (_8e4.wkid || dojo.toJson(_8e4.toJson())) : null), "env:processSR": (this.processSpatialReference ? (this.processSpatialReference.wkid || dojo.toJson(this.processSpatialReference.toJson())) : null) }, _8e0)), _8e6 = this._jobUpdateHandler, _8e7 = this._errorHandler; esri.request({ url: this._url.path + "/submitJob", content: _8e5, callbackParamName: "callback", load: (function (r, i) { _8e6(r, i, false, _8e1, _8e2); }), error: (function (r) { _8e7(r, _8e3); }) }); }, _jobUpdateHandler: function (_8e8, io, _8e9, _8ea, _8eb) { var _8ec = _8e8.jobId, _8ed = new esri.tasks.JobInfo(_8e8); this.onStatusUpdate(_8ed); if (_8eb) { _8eb(_8ed); } if (!_8e9) { clearTimeout(this._updateTimers[_8ec]); this._updateTimers[_8ec] = null; switch (_8e8.jobStatus) { case esri.tasks.JobInfo.STATUS_SUBMITTED: case esri.tasks.JobInfo.STATUS_EXECUTING: case esri.tasks.JobInfo.STATUS_WAITING: case esri.tasks.JobInfo.STATUS_NEW: var _8ee = this._getJobStatus; this._updateTimers[_8ec] = setTimeout(function () { _8ee(_8ec, _8e9, _8ea, _8eb); }, this.updateDelay); break; default: this.onJobComplete(_8ed); if (_8ea) { _8ea(_8ed); } } } }, _getJobStatus: function (_8ef, _8f0, _8f1, _8f2) { var _8f3 = this._jobUpdateHandler; esri.request({ url: this._url.path + "/jobs/" + _8ef, content: dojo.mixin({}, this._url.query, { f: "json" }), callbackParamName: "callback", load: (function () { _8f3(arguments[0], arguments[1], _8f0, _8f1, _8f2); }), error: this._errorHandler }); }, _getResultDataHandler: function (_8f4, io, _8f5, _8f6) { try { var _8f7 = this._decode(_8f4); this.onGetResultDataComplete(_8f7); if (_8f5) { _8f5(_8f7); } } catch (err) { this._errorHandler(err, _8f6); } }, getResultData: function (_8f8, _8f9, _8fa, _8fb) { var _8fc = this._getResultDataHandler, _8fd = this._errorHandler; return esri.request({ url: this._url.path + "/jobs/" + _8f8 + "/results/" + _8f9, content: dojo.mixin({}, this._url.query, { f: "json", returnType: "data" }), callbackParamName: "callback", load: (function (r, i) { _8fc(r, i, _8fa, _8fb); }), error: (function (r) { _8fd(r, _8fb); }) }); }, checkJobStatus: function (_8fe, _8ff, _900) { var _901 = this._jobUpdateHandler, _902 = this._errorHandler; esri.request({ url: this._url.path + "/jobs/" + _8fe, content: dojo.mixin({}, this._url.query, { f: "json" }), callbackParamName: "callback", load: (function (r, i) { _901(r, i, true, null, _8ff); }), error: (function (r) { _902(r, _900); }) }); }, execute: function (_903, _904, _905) { var _906 = this._getOutSR(); var _907 = this._gpEncode(dojo.mixin({}, this._url.query, { f: "json", "env:outSR": (_906 ? (_906.wkid || dojo.toJson(_906.toJson())) : null), "env:processSR": (this.processSpatialReference ? (this.processSpatialReference.wkid || dojo.toJson(this.processSpatialReference.toJson())) : null) }, _903)), _908 = this._executeHandler, _909 = this._errorHandler; return esri.request({ url: this._url.path + "/execute", content: _907, callbackParamName: "callback", load: (function (r, i) { _908(r, i, _904, _905); }), error: (function (r) { _909(r, _905); }) }); }, _executeHandler: function (_90a, io, _90b, _90c) { try { var _90d = _90a.results, i, il, _90e = _90a.messages; for (i = 0, il = _90d.length; i < il; i++) { _90d[i] = this._decode(_90d[i]); } for (i = 0, il = _90e.length; i < il; i++) { _90e[i] = new esri.tasks.GPMessage(_90e[i]); } this.onExecuteComplete(_90d, _90e); if (_90b) { _90b(_90d, _90e); } } catch (err) { this._errorHandler(err, _90c); } }, _getResultImageHandler: function (_90f, io, _910, _911) { try { var _912 = this._decode(_90f); this.onGetResultImageComplete(_912); if (_910) { _910(_912); } } catch (err) { this._errorHandler(err, _911); } }, getResultImage: function (_913, _914, _915, _916, _917) { var _918 = this._getResultImageHandler, _919 = this._errorHandler, _91a = this._gpEncode(dojo.mixin({}, this._url.query, { f: "json" }, _915.toJson())); return esri.request({ url: this._url.path + "/jobs/" + _913 + "/results/" + _914, content: _91a, callbackParamName: "callback", load: (function (r, i) { _918(r, i, _916, _917); }), error: (function (r) { _919(r, _917); }) }); }, cancelJobStatusUpdates: function (_91b) { clearTimeout(this._updateTimers[_91b]); this._updateTimers[_91b] = null; }, getResultImageLayer: function (_91c, _91d, _91e, _91f) { var url = this._url.path + "/jobs/" + _91c + "/results/" + _91d; if (this._url.query) { url += "?" + dojo.objectToQuery(this._url.query); } var _920 = new esri.tasks._GPResultImageLayer(url, { imageParameters: _91e }, true); this.onGetResultImageLayerComplete(_920); if (_91f) { _91f(_920); } }, onStatusUpdate: function () { }, onJobComplete: function () { }, onExecuteComplete: function () { }, onGetResultDataComplete: function () { }, onGetResultImageComplete: function () { }, onGetResultImageLayerComplete: function () { } }); dojo.declare("esri.tasks.JobInfo", null, { constructor: function (_921) { this.messages = []; dojo.mixin(this, _921); var _922 = this.messages; for (var i = 0, il = _922.length; i < il; i++) { _922[i] = new esri.tasks.GPMessage(_922[i]); } }, jobId: "", jobStatus: "" }); dojo.mixin(esri.tasks.JobInfo, { STATUS_CANCELLED: "esriJobCancelled", STATUS_CANCELLING: "esriJobCancelling", STATUS_DELETED: "esriJobDeleted", STATUS_DELETING: "esriJobDeleting", STATUS_EXECUTING: "esriJobExecuting", STATUS_FAILED: "esriJobFailed", STATUS_NEW: "esriJobNew", STATUS_SUBMITTED: "esriJobSubmitted", STATUS_SUCCEEDED: "esriJobSucceeded", STATUS_TIMED_OUT: "esriJobTimedOut", STATUS_WAITING: "esriJobWaiting" }); dojo.declare("esri.tasks.GPMessage", null, { constructor: function (_923) { dojo.mixin(this, _923); } }); dojo.mixin(esri.tasks.GPMessage, { TYPE_INFORMATIVE: "esriJobMessageTypeInformative", TYPE_PROCESS_DEFINITION: "esriJobMessageTypeProcessDefinition", TYPE_PROCESS_START: "esriJobMessageTypeProcessStart", TYPE_PROCESS_STOP: "esriJobMessageTypeProcessStop", TYPE_WARNING: "esriJobMessageTypeWarning", TYPE_ERROR: "esriJobMessageTypeError", TYPE_EMPTY: "esriJobMessageTypeEmpty", TYPE_ABORT: "esriJobMessageTypeAbort" }); dojo.declare("esri.tasks.LinearUnit", null, { constructor: function (json) { if (json) { dojo.mixin(this, json); } }, distance: 0, units: null, toJson: function () { var json = {}; if (this.distance) { json.distance = this.distance; } if (this.units) { json.units = this.units; } return json; } }); dojo.declare("esri.tasks.DataFile", null, { constructor: function (json) { if (json) { dojo.mixin(this, json); } }, url: null, toJson: function () { if (this.url) { return { url: this.url }; } return null; } }); dojo.declare("esri.tasks.RasterData", null, { constructor: function (json) { if (json) { dojo.mixin(this, json); } }, url: null, format: null, toJson: function () { var json = {}; if (this.url) { json.url = this.url; } if (this.format) { json.format = this.format; } } }); dojo.declare("esri.tasks.Date", null, { constructor: function (json) { if (json) { if (json.format) { this.format = json.format; } this.date = dojo.date.locale.parse(json.date, { selector: "date", datePattern: this.format }); } }, date: new Date(), format: "EEE MMM dd HH:mm:ss zzz yyyy", toJson: function () { return { date: dojo.date.locale.format(this.date, { selector: "date", datePattern: this.format }), format: this.format }; } }); dojo.declare("esri.tasks.ParameterValue", null, { constructor: function (json) { dojo.mixin(this, json); } }); dojo.declare("esri.tasks._GPResultImageLayer", esri.layers.ArcGISDynamicMapServiceLayer, { constructor: function (url, _924) { if (_924 && _924.imageParameters && _924.imageParameters.extent) { this.initialExtent = (this.fullExtent = _924.imageParameters.extent); this.spatialReference = this.initialExtent.spatialReference; } this.getImageUrl = dojo.hitch(this, this.getImageUrl); this.loaded = true; this.onLoad(this); }, getImageUrl: function (_925, _926, _927, _928) { var url = this._url, path = this._url.path + "?", _929 = this._params, sr = _925.spatialReference.wkid; _928(path + dojo.objectToQuery(dojo.mixin(_929, { f: "image", bbox: dojo.toJson(_925.toJson()), bboxSR: sr, imageSR: sr, size: _926 + "," + _927 }))); } }); } if (!dojo._hasResource["esri.tasks.identify"]) { dojo._hasResource["esri.tasks.identify"] = true; dojo.provide("esri.tasks.identify"); dojo.declare("esri.tasks.IdentifyTask", esri.tasks._Task, { constructor: function (url) { this._url.path += "/identify"; this._handler = dojo.hitch(this, this._handler); }, _handler: function (_92a, io, _92b, _92c) { try { var _92d = [], _92e = esri.tasks.IdentifyResult; dojo.forEach(_92a.results, function (_92f, i) { _92d[i] = new _92e(_92f); }); this.onComplete(_92d); if (_92b) { _92b(_92d); } } catch (err) { this._errorHandler(err, _92c); } }, execute: function (_930, _931, _932) { var _933 = this._encode(dojo.mixin({}, this._url.query, { f: "json" }, _930.toJson())), _934 = this._handler, _935 = this._errorHandler; return esri.request({ url: this._url.path, content: _933, callbackParamName: "callback", load: (function (r, i) { _934(r, i, _931, _932); }), error: (function (r) { _935(r, _932); }) }); }, onComplete: function () { } }); dojo.declare("esri.tasks.IdentifyParameters", null, { constructor: function () { this.layerOption = esri.tasks.IdentifyParameters.LAYER_OPTION_TOP; }, geometry: null, spatialReference: null, layerIds: null, tolerance: null, returnGeometry: false, mapExtent: null, width: esri.config.defaults.map.width, height: esri.config.defaults.map.height, dpi: 96, layerDefinitions: null, timeExtent: null, layerTimeOptions: null, toJson: function () { var g = this.geometry, ext = this.mapExtent, json = { geometry: g, tolerance: this.tolerance, returnGeometry: this.returnGeometry, mapExtent: ext, imageDisplay: this.width + "," + this.height + "," + this.dpi, maxAllowableOffset: this.maxAllowableOffset }, sr = this.spatialReference, _936 = this.layerIds; if (g) { json.geometryType = esri.geometry.getJsonType(g); } if (sr !== null) { json.sr = sr.wkid || dojo.toJson(sr.toJson()); } else { if (g) { json.sr = g.spatialReference.wkid || dojo.toJson(g.spatialReference.toJson()); } else { if (ext) { json.sr = ext.spatialReference.wkid || dojo.toJson(ext.spatialReference.toJson()); } } } json.layers = this.layerOption; if (_936) { json.layers += ":" + _936.join(","); } json.layerDefs = esri._serializeLayerDefinitions(this.layerDefinitions); var _937 = this.timeExtent; json.time = _937 ? _937.toJson().join(",") : null; var _938 = this.layerTimeOptions; var _939 = []; dojo.forEach(_938, function (_93a, i) { if (_93a) { _939.push(i + ":" + _93a.toJson()); } }); if (_939.length > 0) { json.layerTimeOptions = _939.join(","); } return json; } }); dojo.mixin(esri.tasks.IdentifyParameters, { LAYER_OPTION_TOP: "top", LAYER_OPTION_VISIBLE: "visible", LAYER_OPTION_ALL: "all" }); dojo.declare("esri.tasks.IdentifyResult", null, { constructor: function (json) { dojo.mixin(this, json); this.feature = new esri.Graphic(json.geometry ? esri.geometry.fromJson(json.geometry) : null, null, json.attributes); delete this.geometry; delete this.attributes; } }); } if (!dojo._hasResource["esri.tasks.locator"]) { dojo._hasResource["esri.tasks.locator"] = true; dojo.provide("esri.tasks.locator"); dojo.declare("esri.tasks.Locator", esri.tasks._Task, { constructor: function (url) { this._geocodeHandler = dojo.hitch(this, this._geocodeHandler); this._reverseGeocodeHandler = dojo.hitch(this, this._reverseGeocodeHandler); }, outSpatialReference: null, setOutSpatialReference: function (sr) { this.outSpatialReference = sr; }, _geocodeHandler: function (_93b, io, _93c, _93d) { try { var _93e = _93b.candidates, _93f, out = []; for (var i = 0, il = _93e.length; i < il; i++) { _93f = _93e[i]; out[i] = new esri.tasks.AddressCandidate(_93f); } this.onAddressToLocationsComplete(out); if (_93c) { _93c(out); } } catch (err) { this._errorHandler(err, _93d); } }, addressToLocations: function (_940, _941, _942, _943) { var _944 = this.outSpatialReference; var _945 = this._encode(dojo.mixin({}, this._url.query, _940, { f: "json", outSR: _944 && dojo.toJson(_944.toJson()), outFields: (_941 && _941.join(",")) || null })), _946 = this._geocodeHandler, _947 = this._errorHandler; return esri.request({ url: this._url.path + "/findAddressCandidates", content: _945, callbackParamName: "callback", load: (function (r, i) { _946(r, i, _942, _943); }), error: (function (r) { _947(r, _943); }) }); }, _reverseGeocodeHandler: function (_948, io, _949, _94a) { try { var _94b = new esri.tasks.AddressCandidate({ address: _948.address, location: _948.location, score: 100 }); this.onLocationToAddressComplete(_94b); if (_949) { _949(_94b); } } catch (err) { this._errorHandler(err, _94a); } }, locationToAddress: function (_94c, _94d, _94e, _94f) { var _950 = this.outSpatialReference; var _951 = this._encode(dojo.mixin({}, this._url.query, { outSR: _950 && dojo.toJson(_950.toJson()), location: _94c && dojo.toJson(_94c.toJson()), distance: _94d, f: "json" })), _952 = this._reverseGeocodeHandler, _953 = this._errorHandler; return esri.request({ url: this._url.path + "/reverseGeocode", content: _951, callbackParamName: "callback", load: (function (r, i) { _952(r, i, _94e, _94f); }), error: (function (r) { _953(r, _94f); }) }); }, onAddressToLocationsComplete: function () { }, onLocationToAddressComplete: function () { } }); dojo.declare("esri.tasks.AddressCandidate", null, { constructor: function (json) { dojo.mixin(this, json); this.location = new esri.geometry.Point(this.location); } }); } if (!dojo._hasResource["esri.tasks.query"]) { dojo._hasResource["esri.tasks.query"] = true; dojo.provide("esri.tasks.query"); dojo.declare("esri.tasks.QueryTask", esri.tasks._Task, { constructor: function (url) { this._handler = dojo.hitch(this, this._handler); this._relationshipQueryHandler = dojo.hitch(this, this._relationshipQueryHandler); this._executeForIdsHandler = dojo.hitch(this, this._executeForIdsHandler); this._countHandler = dojo.hitch(this, this._countHandler); }, _handler: function (_954, io, _955, _956) { try { var _957 = new esri.tasks.FeatureSet(_954); this.onComplete(_957); if (_955) { _955(_957); } } catch (err) { this._errorHandler(err, _956); } }, execute: function (_958, _959, _95a, _95b) { var _95c = this._encode(dojo.mixin({}, this._url.query, { f: "json" }, _958.toJson())), _95d = this._handler, _95e = this._errorHandler; return esri.request({ url: this._url.path + "/query", content: _95c, callbackParamName: "callback", load: function (r, i) { _95d(r, i, _959, _95a); }, error: function (r) { _95e(r, _95a); }, callbackSuffix: _95b }); }, onComplete: function () { }, executeRelationshipQuery: function (_95f, _960, _961) { var _962 = this._encode(dojo.mixin({}, this._url.query, { f: "json" }, _95f.toJson())), _963 = this._relationshipQueryHandler, _964 = this._errorHandler; return esri.request({ url: this._url.path + "/queryRelatedRecords", content: _962, callbackParamName: "callback", load: function (r, i) { _963(r, i, _960, _961); }, error: function (r) { _964(r, _961); } }); }, _relationshipQueryHandler: function (_965, io, _966, _967) { try { var gt = _965.geometryType, sr = _965.spatialReference, _968 = {}; dojo.forEach(_965.relatedRecordGroups, function (gr) { var _969 = {}; _969.geometryType = gt; _969.spatialReference = sr; _969.features = gr.relatedRecords; var fset = new esri.tasks.FeatureSet(_969); _968[gr.objectId] = fset; }); this.onExecuteRelationshipQueryComplete(_968); if (_966) { _966(_968); } } catch (err) { this._errorHandler(err, _967); } }, onExecuteRelationshipQueryComplete: function () { }, executeForIds: function (_96a, _96b, _96c) { var _96d = this._encode(dojo.mixin({}, this._url.query, { f: "json", returnIdsOnly: true }, _96a.toJson())), _96e = this._executeForIdsHandler, _96f = this._errorHandler; return esri.request({ url: this._url.path + "/query", content: _96d, callbackParamName: "callback", load: function (r, i) { _96e(r, i, _96b, _96c); }, error: function (r) { _96f(r, _96c); } }); }, _executeForIdsHandler: function (_970, io, _971, _972) { try { this.onExecuteForIdsComplete(_970.objectIds); if (_971) { _971(_970.objectIds); } } catch (err) { this._errorHandler(err, _972); } }, onExecuteForIdsComplete: function () { }, executeForCount: function (_973, _974, _975) { var _976 = this._encode(dojo.mixin({}, this._url.query, { f: "json", returnIdsOnly: true, returnCountOnly: true }, _973.toJson())), _977 = this._countHandler, _978 = this._errorHandler; return esri.request({ url: this._url.path + "/query", content: _976, callbackParamName: "callback", load: function (r, i) { _977(r, i, _974, _975); }, error: function (r) { _978(r, _975); } }); }, _countHandler: function (_979, io, _97a, _97b) { try { var _97c, _97d = _979.features, ids = _979.objectIds; if (ids) { _97c = ids.length; } else { if (_97d) { throw new Error(esri.bundle.tasks.query.invalid); } else { _97c = _979.count; } } this.onExecuteForCountComplete(_97c); if (_97a) { _97a(_97c); } } catch (err) { this._errorHandler(err, _97b); } }, onExecuteForCountComplete: function () { } }); dojo.declare("esri.tasks.Query", null, { constructor: function () { this.spatialRelationship = esri.tasks.Query.SPATIAL_REL_INTERSECTS; }, text: null, where: "", geometry: null, objectIds: null, returnGeometry: false, outSpatialReference: null, outFields: null, timeExtent: null, relationParam: null, toJson: function () { var json = { text: this.text, where: this.where, returnGeometry: this.returnGeometry, spatialRel: this.spatialRelationship, maxAllowableOffset: this.maxAllowableOffset }, g = this.geometry, ids = this.objectIds, _97e = this.outFields, _97f = this.outSpatialReference; if (g) { json.geometry = g; json.geometryType = esri.geometry.getJsonType(g); json.inSR = g.spatialReference.wkid || dojo.toJson(g.spatialReference.toJson()); } if (ids) { json.objectIds = ids.join(","); } if (_97e) { json.outFields = _97e.join(","); } if (_97f !== null) { json.outSR = _97f.wkid || dojo.toJson(_97f.toJson()); } else { if (g) { json.outSR = g.spatialReference.wkid || dojo.toJson(g.spatialReference.toJson()); } } var _980 = this.timeExtent; json.time = _980 ? _980.toJson().join(",") : null; var _981 = this.relationParam; if (_981 && this.spatialRelationship === esri.tasks.Query.SPATIAL_REL_RELATION) { json.relationParam = _981; } return json; } }); dojo.mixin(esri.tasks.Query, esri.tasks._SpatialRelationship); dojo.declare("esri.tasks.RelationshipQuery", null, { definitionExpression: "", relationshipId: null, returnGeometry: false, objectIds: null, outSpatialReference: null, outFields: null, toJson: function () { var json = { definitionExpression: this.definitionExpression, relationshipId: this.relationshipId, returnGeometry: this.returnGeometry, maxAllowableOffset: this.maxAllowableOffset }, _982 = this.objectIds, _983 = this.outFields, _984 = this.outSpatialReference; if (_982) { json.objectIds = _982.join(","); } if (_983) { json.outFields = _983.join(","); } if (_984) { json.outSR = _984.toJson(); } return json; } }); } if (!dojo._hasResource["esri.toolbars._toolbar"]) { dojo._hasResource["esri.toolbars._toolbar"] = true; dojo.provide("esri.toolbars._toolbar"); dojo.declare("esri.toolbars._Toolbar", null, { constructor: function (map) { this.map = map; }, _deactivateMapTools: function (nav, _985, _986, _987) { var map = this.map; if (nav) { this._mapNavState = { isDoubleClickZoom: map.isDoubleClickZoom, isClickRecenter: map.isClickRecenter, isPan: map.isPan, isRubberBandZoom: map.isRubberBandZoom, isKeyboardNavigation: map.isKeyboardNavigation, isScrollWheelZoom: map.isScrollWheelZoom }; map.disableMapNavigation(); } if (_985) { map.hideZoomSlider(); } if (_986) { map.hidePanArrows(); } if (_987) { map.graphics.disableMouseEvents(); } }, _activateMapTools: function (nav, _988, _989, _98a) { var map = this.map, _98b = this._mapNavState; if (nav && _98b) { if (_98b.isDoubleClickZoom) { map.enableDoubleClickZoom(); } if (_98b.isClickRecenter) { map.enableClickRecenter(); } if (_98b.isPan) { map.enablePan(); } if (_98b.isRubberBandZoom) { map.enableRubberBandZoom(); } if (_98b.isKeyboardNavigation) { map.enableKeyboardNavigation(); } if (_98b.isScrollWheelZoom) { map.enableScrollWheelZoom(); } } if (_988) { map.showZoomSlider(); } if (_989) { map.showPanArrows(); } if (_98a) { map.graphics.enableMouseEvents(); } } }); } if (!dojo._hasResource["esri.toolbars.draw"]) { dojo._hasResource["esri.toolbars.draw"] = true; dojo.provide("esri.toolbars.draw"); dojo.declare("esri.toolbars.Draw", esri.toolbars._Toolbar, { constructor: function (map, _98c) { this.markerSymbol = new esri.symbol.SimpleMarkerSymbol(esri.symbol.SimpleMarkerSymbol.STYLE_SOLID, 10, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255, 0, 0]), 2), new dojo.Color([0, 0, 0, 0.25])); this.lineSymbol = new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255, 0, 0]), 2); this.fillSymbol = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255, 0, 0]), 2), new dojo.Color([0, 0, 0, 0.25])); this._points = []; this._defaultOptions = { showTooltips: true, drawTime: 75, tolerance: 8, tooltipOffset: 15 }; this._options = dojo.mixin(dojo.mixin({}, this._defaultOptions), _98c || {}); if (esri.isTouchEnabled) { this._options.showTooltips = false; } this._normalizeRect = dojo.hitch(this, this._normalizeRect); this._onMouseDownHandler = dojo.hitch(this, this._onMouseDownHandler); this._onMouseUpHandler = dojo.hitch(this, this._onMouseUpHandler); this._onClickHandler = dojo.hitch(this, this._onClickHandler); this._onMouseMoveHandler = dojo.hitch(this, this._onMouseMoveHandler); this._onMouseDragHandler = dojo.hitch(this, this._onMouseDragHandler); this._onDblClickHandler = dojo.hitch(this, this._onDblClickHandler); this._onKeyDown_connect = null; dojo.connect(map, "onExtentChange", this, "_redrawGraphic"); }, _geometryType: null, respectDrawingVertexOrder: false, setRespectDrawingVertexOrder: function (set) { this.respectDrawingVertexOrder = set; }, setMarkerSymbol: function (_98d) { this.markerSymbol = _98d; }, setLineSymbol: function (_98e) { this.lineSymbol = _98e; }, setFillSymbol: function (_98f) { this.fillSymbol = _98f; }, activate: function (_990, _991) { if (this._geometryType) { this.deactivate(); } var map = this.map, dc = dojo.connect, Draw = esri.toolbars.Draw, _992; this._options = dojo.mixin(dojo.mixin({}, this._options), _991 || {}); map.__resetClickDuration(); switch (_990) { case Draw.POINT: case Draw.ARROW: case Draw.TRIANGLE: case Draw.CIRCLE: case Draw.ELLIPSE: case Draw.RECTANGLE: this._onClickHandler_connect = dc(map, "onClick", this, "_onClickHandler"); break; case Draw.LINE: case Draw.EXTENT: case Draw.FREEHAND_POLYLINE: case Draw.FREEHAND_POLYGON: this._onMouseDownHandler_connect = dc(map, "onMouseDown", this, "_onMouseDownHandler"); this._onMouseDragHandler_connect = dc(map, "onMouseDrag", this, "_onMouseDragHandler"); this._onMouseUpHandler_connect = dc(map, "onMouseUp", this, "_onMouseUpHandler"); this._deactivateMapTools(true, false, false, true); break; case Draw.POLYLINE: case Draw.POLYGON: case Draw.MULTI_POINT: map.__setClickDuration(0); this._onClickHandler_connect = dc(map, "onClick", this, "_onClickHandler"); this._onDblClickHandler_connect = dc(map, "onDblClick", this, "_onDblClickHandler"); map.disableDoubleClickZoom(); break; default: console.error(esri.bundle.toolbars.draw.invalidType + ": " + _990); return; } this._geometryType = _990; this._onKeyDown_connect = dc(map, "onKeyDown", this, "_onKeyDownHandler"); this._toggleTooltip(true); this.onActivate(this._geometryType); }, deactivate: function () { var map = this.map; if (this._graphic) { map.graphics.remove(this._graphic, true); } if (this._tGraphic) { map.graphics.remove(this._tGraphic, true); } var ddc = dojo.disconnect; ddc(this._onMouseDownHandler_connect); ddc(this._onMouseMoveHandler_connect); ddc(this._onMouseDragHandler_connect); ddc(this._onMouseUpHandler_connect); ddc(this._onClickHandler_connect); ddc(this._onDblClickHandler_connect); ddc(this._onKeyDown_connect); switch (this._geometryType) { case esri.toolbars.Draw.LINE: case esri.toolbars.Draw.EXTENT: case esri.toolbars.Draw.FREEHAND_POLYLINE: case esri.toolbars.Draw.FREEHAND_POLYGON: this._activateMapTools(true, false, false, true); break; case esri.toolbars.Draw.POLYLINE: case esri.toolbars.Draw.POLYGON: case esri.toolbars.Draw.MULTI_POINT: map.enableDoubleClickZoom(); break; } var _993 = this._geometryType; this._geometryType = this.geometry = this._graphic = this._tGraphic = null; this._points = []; map.__resetClickDuration(); this._toggleTooltip(false); this.onDeactivate(_993); }, finishDrawing: function () { var _994, _995 = this._points, map = this.map, _996 = map.spatialReference, Draw = esri.toolbars.Draw; _995 = _995.slice(0, _995.length); switch (this._geometryType) { case Draw.POLYLINE: if (!this._graphic || _995.length < 2) { return; } _994 = new esri.geometry.Polyline(_996); _994.addPath([].concat(_995)); break; case Draw.POLYGON: if (!this._graphic || _995.length < 3) { return; } _994 = new esri.geometry.Polygon(_996); var ring = [].concat(_995, [_995[0].offset(0, 0)]); if (!esri.geometry.isClockwise(ring) && !this.respectDrawingVertexOrder) { console.debug(this.declaredClass + " : " + esri.bundle.toolbars.draw.convertAntiClockwisePolygon); ring.reverse(); } _994.addRing(ring); break; case Draw.MULTI_POINT: _994 = new esri.geometry.Multipoint(_996); dojo.forEach(_995, function (pt) { _994.addPoint(pt); }); break; } dojo.disconnect(this._onMouseMoveHandler_connect); if (this._graphic) { map.graphics.remove(this._graphic, true); } if (this._tGraphic) { map.graphics.remove(this._tGraphic, true); } this._graphic = this._tGraphic = null; if (_994) { this.onDrawEnd(_994); } this._setTooltipMessage(0); this._points = []; }, _normalizeRect: function (_997, end, _998) { var sx = _997.x, sy = _997.y, ex = end.x, ey = end.y, _999 = Math.abs(sx - ex), _99a = Math.abs(sy - ey); return { x: Math.min(sx, ex), y: Math.max(sy, ey), width: _999, height: _99a, spatialReference: _998 }; }, _onMouseDownHandler: function (evt) { var _99b = evt.mapPoint, Draw = esri.toolbars.Draw, map = this.map, _99c = map.spatialReference; this._points.push(_99b.offset(0, 0)); switch (this._geometryType) { case Draw.LINE: this._graphic = map.graphics.add(new esri.Graphic(new esri.geometry.Polyline({ paths: [[[_99b.x, _99b.y], [_99b.x, _99b.y]]] }), this.lineSymbol), true); break; case Draw.EXTENT: break; case Draw.FREEHAND_POLYLINE: this._oldPoint = evt.screenPoint; var _99d = new esri.geometry.Polyline(_99c); _99d.addPath(this._points); this._graphic = map.graphics.add(new esri.Graphic(_99d, this.lineSymbol), true); break; case Draw.FREEHAND_POLYGON: this._oldPoint = evt.screenPoint; var _99e = new esri.geometry.Polygon(_99c); _99e.addRing(this._points); this._graphic = map.graphics.add(new esri.Graphic(_99e, this.fillSymbol), true); break; } }, _onMouseMoveHandler: function (evt) { var _99f = this._points[this._points.length - 1], end = evt.mapPoint, _9a0 = this._tGraphic; switch (this._geometryType) { case esri.toolbars.Draw.POLYLINE: case esri.toolbars.Draw.POLYGON: _9a0.setGeometry(dojo.mixin(_9a0.geometry, { paths: [[[_99f.x, _99f.y], [end.x, end.y]]] })); break; } }, _onMouseDragHandler: function (evt) { var _9a1 = this._points[0], end = evt.mapPoint, map = this.map, _9a2 = map.spatialReference, _9a3 = this._graphic, Draw = esri.toolbars.Draw; switch (this._geometryType) { case Draw.LINE: _9a3.setGeometry(dojo.mixin(_9a3.geometry, { paths: [[[_9a1.x, _9a1.y], [end.x, end.y]]] })); break; case Draw.EXTENT: if (_9a3) { map.graphics.remove(_9a3, true); } this._graphic = map.graphics.add(new esri.Graphic(new esri.geometry.Rect(this._normalizeRect(_9a1, end, _9a2)), this.fillSymbol), true); break; case Draw.FREEHAND_POLYLINE: this._hideTooltip(); if (this._canDrawFreehandPoint(evt) === false) { return; } this._points.push(evt.mapPoint.offset(0, 0)); _9a3.geometry._insertPoints([end.offset(0, 0)], 0); _9a3.setGeometry(_9a3.geometry); break; case Draw.FREEHAND_POLYGON: this._hideTooltip(); if (this._canDrawFreehandPoint(evt) === false) { return; } this._points.push(evt.mapPoint.offset(0, 0)); _9a3.geometry._insertPoints([end.offset(0, 0)], 0); _9a3.setGeometry(_9a3.geometry); break; } }, _canDrawFreehandPoint: function (evt) { if (this._oldPoint == null) { return false; } var dx = this._oldPoint.x - evt.screenPoint.x; dx = (dx < 0) ? dx * -1 : dx; var dy = this._oldPoint.y - evt.screenPoint.y; dy = (dy < 0) ? dy * -1 : dy; var _9a4 = this._options.tolerance; if (dx < _9a4 && dy < _9a4) { return false; } var now = new Date(); var _9a5 = now - this._startTime; if (_9a5 < this._options.drawTime) { return false; } this._startTime = now; this._oldPoint = evt.screenPoint; return true; }, _onMouseUpHandler: function (evt) { if (this._points.length === 0) { this._points.push(evt.mapPoint.offset(0, 0)); } var _9a6 = this._points[0], end = evt.mapPoint, map = this.map, _9a7 = map.spatialReference, Draw = esri.toolbars.Draw, _9a8; switch (this._geometryType) { case Draw.LINE: _9a8 = new esri.geometry.Polyline({ paths: [[[_9a6.x, _9a6.y], [end.x, end.y]]], spatialReference: _9a7 }); break; case Draw.EXTENT: _9a8 = esri.geometry._rectToExtent(new esri.geometry.Rect(this._normalizeRect(_9a6, end, _9a7))); break; case Draw.FREEHAND_POLYLINE: var _9a9 = new esri.geometry.Polyline(_9a7); _9a9.addPath([].concat(this._points, [end.offset(0, 0)])); _9a8 = _9a9; break; case Draw.FREEHAND_POLYGON: var _9aa = (_9a8 = new esri.geometry.Polygon(_9a7)), ring = [].concat(this._points, [end.offset(0, 0), this._points[0].offset(0, 0)]); if (!esri.geometry.isClockwise(ring) && !this.respectDrawingVertexOrder) { console.debug(this.declaredClass + " : " + esri.bundle.toolbars.draw.convertAntiClockwisePolygon); ring.reverse(); } _9aa.addRing(ring); break; } if (this._graphic) { map.graphics.remove(this._graphic, true); this._graphic = null; } this.onDrawEnd(_9a8); this._points = []; }, _onClickHandler: function (evt) { var _9ab = evt.mapPoint, _9ac = evt.screenPoint, map = this.map, Draw = esri.toolbars.Draw, pts, dx, dy, _9ad; this._points.push(_9ab.offset(0, 0)); switch (this._geometryType) { case Draw.POINT: this.onDrawEnd(_9ab.offset(0, 0)); this._setTooltipMessage(0); break; case Draw.POLYLINE: if (this._points.length == 1) { var _9ae = new esri.geometry.Polyline(map.spatialReference); _9ae.addPath(this._points); this._graphic = map.graphics.add(new esri.Graphic(_9ae, this.lineSymbol), true); this._onMouseMoveHandler_connect = dojo.connect(map, "onMouseMove", this, "_onMouseMoveHandler"); this._tGraphic = map.graphics.add(new esri.Graphic(new esri.geometry.Polyline({ paths: [[[_9ab.x, _9ab.y], [_9ab.x, _9ab.y]]] }), this.lineSymbol), true); } else { this._graphic.geometry._insertPoints([_9ab.offset(0, 0)], 0); this._graphic.setGeometry(this._graphic.geometry).setSymbol(this.lineSymbol); var _9af = this._tGraphic, geom = _9af.geometry; geom._insertPoints([_9ab.offset(0, 0), _9ab.offset(0, 0)], 0); _9af.setGeometry(geom); } break; case Draw.POLYGON: if (this._points.length == 1) { var _9b0 = new esri.geometry.Polygon(map.spatialReference); _9b0.addRing(this._points); this._graphic = map.graphics.add(new esri.Graphic(_9b0, this.fillSymbol), true); this._onMouseMoveHandler_connect = dojo.connect(map, "onMouseMove", this, "_onMouseMoveHandler"); this._tGraphic = map.graphics.add(new esri.Graphic(new esri.geometry.Polyline({ paths: [[[_9ab.x, _9ab.y], [_9ab.x, _9ab.y]]] }), this.fillSymbol), true); } else { this._graphic.geometry._insertPoints([_9ab.offset(0, 0)], 0); this._graphic.setGeometry(this._graphic.geometry).setSymbol(this.fillSymbol); var _9af = this._tGraphic, geom = _9af.geometry; geom._insertPoints([_9ab.offset(0, 0), _9ab.offset(0, 0)], 0); _9af.setGeometry(geom); } break; case Draw.MULTI_POINT: var tps = this._points; if (tps.length == 1) { var _9b1 = new esri.geometry.Multipoint(map.spatialReference); _9b1.addPoint(tps[tps.length - 1]); this._graphic = map.graphics.add(new esri.Graphic(_9b1, this.markerSymbol), true); } else { this._graphic.geometry.addPoint(tps[tps.length - 1]); this._graphic.setGeometry(this._graphic.geometry).setSymbol(this.markerSymbol); } break; case Draw.ARROW: pts = [[96, 24], [72, 52], [72, 40], [0, 40], [0, 12], [72, 12], [72, 0], [96, 24]]; dx = _9ac.x - 36; dy = _9ac.y - 24; this._addShape(pts, dx, dy); break; case Draw.TRIANGLE: pts = [[0, 96], [48, 0], [96, 96], [0, 96]]; dx = _9ac.x - 48; dy = _9ac.y - 48; this._addShape(pts, dx, dy); break; case Draw.RECTANGLE: pts = [[0, -96], [96, -96], [96, 0], [0, 0], [0, -96]]; dx = _9ac.x - 48; dy = _9ac.y + 48; this._addShape(pts, dx, dy); break; case Draw.CIRCLE: _9ad = 360; var _9b2 = (2 * Math.PI) / _9ad; pts = []; for (i = 0; i < _9ad; i++) { pts.push([48 * Math.cos(_9b2 * i), 48 * Math.sin(_9b2 * i)]); } pts.push(pts[0]); this._addShape(pts, _9ac.x, _9ac.y); break; case Draw.ELLIPSE: var rad = Math.PI / 180; var beta = -rad; var _9b3 = Math.sin(beta); var _9b4 = Math.cos(beta); _9ad = 360; pts = []; for (i = 0; i < _9ad; i++) { var _9b5 = i * (rad); var _9b6 = Math.sin(_9b5); var _9b7 = Math.cos(_9b5); var x = (48 * _9b7 * _9b4 - 24 * _9b6 * _9b3); var y = (48 * _9b7 * _9b3 + 24 * _9b6 * _9b4); pts.push([x, y]); } pts.push(pts[0]); this._addShape(pts, _9ac.x, _9ac.y); break; } this._setTooltipMessage(this._points.length); }, _addShape: function (path, dx, dy) { var _9b8 = map.graphics.add(new esri.Graphic(this._toPolygon(path, dx, dy), this.fillSymbol), true); this._setTooltipMessage(0); var geom; if (_9b8) { geom = esri.geometry.fromJson(_9b8.geometry.toJson()); map.graphics.remove(_9b8, true); } this.onDrawEnd(geom); _9b8 = geom = null; }, _toPolygon: function (path, dx, dy) { var map = this.map; var _9b9 = new esri.geometry.Polygon(map.spatialReference); _9b9.addRing(dojo.map(path, function (pt) { return map.toMap({ x: pt[0] + dx, y: pt[1] + dy }); })); return _9b9; }, _onDblClickHandler: function (evt) { var _9ba, _9bb = this._points, map = this.map, _9bc = map.spatialReference, Draw = esri.toolbars.Draw; if (esri.isTouchEnabled) { _9bb.push(evt.mapPoint); } _9bb = _9bb.slice(0, _9bb.length); switch (this._geometryType) { case Draw.POLYLINE: if (!this._graphic) { this._onClickHandler(evt); return; } _9ba = new esri.geometry.Polyline(_9bc); _9ba.addPath([].concat(_9bb)); break; case Draw.POLYGON: if (!this._graphic || _9bb.length < 2) { this._onClickHandler(evt); return; } _9ba = new esri.geometry.Polygon(_9bc); var ring = [].concat(_9bb, [_9bb[0].offset(0, 0)]); if (!esri.geometry.isClockwise(ring) && !this.respectDrawingVertexOrder) { console.debug(this.declaredClass + " : " + esri.bundle.toolbars.draw.convertAntiClockwisePolygon); ring.reverse(); } _9ba.addRing(ring); break; case Draw.MULTI_POINT: _9ba = new esri.geometry.Multipoint(_9bc); dojo.forEach(_9bb, function (pt) { _9ba.addPoint(pt); }); break; } dojo.disconnect(this._onMouseMoveHandler_connect); if (this._graphic) { map.graphics.remove(this._graphic, true); } if (this._tGraphic) { map.graphics.remove(this._tGraphic, true); } this._graphic = this._tGraphic = null; this.onDrawEnd(_9ba); this._setTooltipMessage(0); this._points = []; }, _onKeyDownHandler: function (evt) { if (evt.keyCode === dojo.keys.ESCAPE) { this._undo(); } }, _toggleTooltip: function (show) { if (!this._options.showTooltips) { return; } if (show) { if (this._tooltip) { return; } var _9bd = this.map.container; this._tooltip = dojo.create("div", { "class": "tooltip" }, _9bd); this._tooltip.style.display = "none"; this._tooltip.style.position = "fixed"; this._setTooltipMessage(0); this._onTooltipMouseEnterHandler_connect = dojo.connect(this.map, "onMouseOver", this, "_updateTooltip"); this._onTooltipMouseLeaveHandler_connect = dojo.connect(this.map, "onMouseOut", this, "_hideTooltip"); this._onTooltipMouseMoveHandler_connect = dojo.connect(this.map, "onMouseMove", this, "_updateTooltip"); } else { if (this._tooltip) { dojo.disconnect(this._onTooltipMouseEnterHandler_connect); dojo.disconnect(this._onTooltipMouseLeaveHandler_connect); dojo.disconnect(this._onTooltipMouseMoveHandler_connect); dojo.destroy(this._tooltip); this._tooltip = null; } } }, _hideTooltip: function () { var _9be = this._tooltip; if (!_9be) { return; } _9be.style.display = "none"; }, _setTooltipMessage: function (_9bf) { var _9c0 = this._tooltip; if (!_9c0) { return; } var _9c1 = _9bf; var _9c2 = ""; switch (this._geometryType) { case esri.toolbars.Draw.POINT: _9c2 = esri.bundle.toolbars.draw.addPoint; break; case esri.toolbars.Draw.ARROW: case esri.toolbars.Draw.TRIANGLE: case esri.toolbars.Draw.RECTANGLE: case esri.toolbars.Draw.CIRCLE: case esri.toolbars.Draw.ELLIPSE: _9c2 = esri.bundle.toolbars.draw.addShape; break; case esri.toolbars.Draw.LINE: case esri.toolbars.Draw.EXTENT: case esri.toolbars.Draw.FREEHAND_POLYLINE: case esri.toolbars.Draw.FREEHAND_POLYGON: _9c2 = esri.bundle.toolbars.draw.freehand; break; case esri.toolbars.Draw.POLYLINE: case esri.toolbars.Draw.POLYGON: _9c2 = esri.bundle.toolbars.draw.start; if (_9c1 === 1) { _9c2 = esri.bundle.toolbars.draw.resume; } else { if (_9c1 >= 2) { _9c2 = esri.bundle.toolbars.draw.complete; } } break; case esri.toolbars.Draw.MULTI_POINT: _9c2 = esri.bundle.toolbars.draw.addMultipoint; if (_9c1 >= 1) { _9c2 = esri.bundle.toolbars.draw.finish; } break; } _9c0.innerHTML = _9c2; }, _updateTooltip: function (evt) { var _9c3 = this._tooltip; if (!_9c3) { return; } var px, py; if (evt.clientX || evt.pageY) { px = evt.pageX; py = evt.pageY; } else { px = evt.clientX + dojo.body().scrollLeft - dojo.body().clientLeft; py = evt.clientY + dojo.body().scrollTop - dojo.body().clientTop; } _9c3.style.display = "none"; dojo.style(_9c3, { left: (px + this._options.tooltipOffset) + "px", top: (py) + "px" }); _9c3.style.display = ""; }, _undo: function () { dojo.disconnect(this._onMouseMoveHandler_connect); if (this._graphic) { map.graphics.remove(this._graphic, true); } if (this._tGraphic) { map.graphics.remove(this._tGraphic, true); } this._graphic = this._tGraphic = null; this._points = []; this._setTooltipMessage(0); }, _redrawGraphic: function (_9c4, _9c5, _9c6, lod) { if (_9c6) { var g = this._graphic; if (g) { g.setGeometry(g.geometry); } g = this._tGraphic; if (g) { g.setGeometry(g.geometry); } } }, onActivate: function (_9c7) { }, onDeactivate: function (_9c8) { }, onDrawEnd: function () { } }); dojo.mixin(esri.toolbars.Draw, { POINT: "point", MULTI_POINT: "multipoint", LINE: "line", EXTENT: "extent", POLYLINE: "polyline", POLYGON: "polygon", FREEHAND_POLYLINE: "freehandpolyline", FREEHAND_POLYGON: "freehandpolygon", ARROW: "arrow", TRIANGLE: "triangle", CIRCLE: "circle", ELLIPSE: "ellipse", RECTANGLE: "rectangle" }); } if (!dojo._hasResource["esri.toolbars.navigation"]) { dojo._hasResource["esri.toolbars.navigation"] = true; dojo.provide("esri.toolbars.navigation"); dojo.declare("esri.toolbars.Navigation", esri.toolbars._Toolbar, { constructor: function (map) { this.zoomSymbol = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255, 0, 0]), 2), new dojo.Color([0, 0, 0, 0.25])); dojo.connect(map, "onUnload", this, "_cleanUp"); this._normalizeRect = dojo.hitch(this, this._normalizeRect); this._onMouseDownHandler = dojo.hitch(this, this._onMouseDownHandler); this._onMouseUpHandler = dojo.hitch(this, this._onMouseUpHandler); this._onMouseDragHandler = dojo.hitch(this, this._onMouseDragHandler); this._onExtentChangeHandler_connect = dojo.connect(map, "onExtentChange", this, "_extentChangeHandler"); this._extents = []; if (map.extent) { this._extents.push(map.extent.toJson()); } }, _navType: null, _start: null, _graphic: null, _prevExtent: false, _nextExtent: false, _extentCursor: -1, _cleanUp: function (map) { this._extents = null; dojo.disconnect(this._onExtentChangeHandler_connect); }, activate: function (_9c9) { var map = this.map; if (!this._graphic) { this._deactivateMapTools(true, false, false, true); this._graphic = new esri.Graphic(null, this.zoomSymbol); } switch (_9c9) { case esri.toolbars.Navigation.ZOOM_IN: case esri.toolbars.Navigation.ZOOM_OUT: this._deactivate(); this._onMouseDownHandler_connect = dojo.connect(map, "onMouseDown", this, "_onMouseDownHandler"); this._onMouseDragHandler_connect = dojo.connect(map, "onMouseDrag", this, "_onMouseDragHandler"); this._onMouseUpHandler_connect = dojo.connect(map, "onMouseUp", this, "_onMouseUpHandler"); this._navType = _9c9; break; case esri.toolbars.Navigation.PAN: this._deactivate(); map.enablePan(); this._navType = _9c9; break; } }, _extentChangeHandler: function (_9ca) { if (!this._prevExtent && !this._nextExtent) { this._extents = this._extents.splice(0, this._extentCursor + 1); this._extents.push(dojo.toJson(_9ca.toJson())); this._extentCursor = this._extents.length - 1; } this._prevExtent = this._nextExtent = false; this.onExtentHistoryChange(); }, _normalizeCursor: function () { if (this._extentCursor < 0) { this._extentCursor = 0; } else { if (this._extentCursor > this._extents.length) { this._extentCursor = this._extents.length; } } }, _deactivate: function () { var _9cb = this._navType; if (_9cb === esri.toolbars.Navigation.PAN) { this.map.disablePan(); } else { if (_9cb === esri.toolbars.Navigation.ZOOM_IN || _9cb === esri.toolbars.Navigation.ZOOM_OUT) { dojo.disconnect(this._onMouseDownHandler_connect); dojo.disconnect(this._onMouseDragHandler_connect); dojo.disconnect(this._onMouseUpHandler_connect); } } }, _normalizeRect: function (_9cc, end, _9cd) { var sx = _9cc.x, sy = _9cc.y, ex = end.x, ey = end.y, _9ce = Math.abs(sx - ex), _9cf = Math.abs(sy - ey); return { x: Math.min(sx, ex), y: Math.max(sy, ey), width: _9ce, height: _9cf, spatialReference: _9cd }; }, _onMouseDownHandler: function (evt) { this._start = evt.mapPoint; }, _onMouseDragHandler: function (evt) { var _9d0 = this._graphic, _9d1 = this.map.graphics; _9d1.remove(_9d0, true); _9d0.setGeometry(new esri.geometry.Rect(this._normalizeRect(this._start, evt.mapPoint, this.map.spatialReference))); _9d1.add(_9d0, true); }, _onMouseUpHandler: function (evt) { var map = this.map, rect = this._normalizeRect(this._start, evt.mapPoint, map.spatialReference); map.graphics.remove(this._graphic, true); if (rect.width === 0 && rect.height === 0) { return; } if (this._navType === esri.toolbars.Navigation.ZOOM_IN) { map.setExtent(esri.geometry._rectToExtent(new esri.geometry.Rect(rect))); } else { var tl = map.toScreen(rect), tr = map.toScreen({ x: rect.x + rect.width, y: rect.y, spatialReference: map.spatialReference }), _9d2 = map.extent.getWidth(), _9d3 = (_9d2 * map.width) / Math.abs(tr.x - tl.x), _9d4 = (_9d3 - _9d2) / 2, ext = map.extent; map.setExtent(new esri.geometry.Extent(ext.xmin - _9d4, ext.ymin - _9d4, ext.xmax + _9d4, ext.ymax + _9d4, ext.spatialReference)); } }, deactivate: function () { this._deactivate(); if (this._graphic) { this.map.graphics.remove(this._graphic, true); } this._navType = this._start = this._graphic = null; this._activateMapTools(true, false, false, true); }, setZoomSymbol: function (_9d5) { this.zoomSymbol = _9d5; }, isFirstExtent: function () { return this._extentCursor === 0; }, isLastExtent: function () { return this._extentCursor === (this._extents.length - 1); }, zoomToFullExtent: function () { var map = this.map; map.setExtent(map.getLayer(map.layerIds[0]).initialExtent); }, zoomToPrevExtent: function () { if (this.isFirstExtent()) { return; } this._extentCursor--; this._normalizeCursor(); this._prevExtent = true; this.map.setExtent(new esri.geometry.Extent(dojo.fromJson(this._extents[this._extentCursor]))); }, zoomToNextExtent: function () { if (this.isLastExtent()) { return; } this._extentCursor++; this._normalizeCursor(); this._nextExtent = true; this.map.setExtent(new esri.geometry.Extent(dojo.fromJson(this._extents[this._extentCursor]))); }, onExtentHistoryChange: function () { } }); dojo.mixin(esri.toolbars.Navigation, { ZOOM_IN: "zoomin", ZOOM_OUT: "zoomout", PAN: "pan" }); } if (!dojo._hasResource["esri.tasks.na"]) { dojo._hasResource["esri.tasks.na"] = true; dojo.provide("esri.tasks.na"); esri.tasks._NALengthUnit = { esriFeet: "esriNAUFeet", esriKilometers: "esriNAUKilometers", esriMeters: "esriNAUMeters", esriMiles: "esriNAUMiles", esriNauticalMiles: "esriNAUNauticalMiles", esriYards: "esriNAUYards" }; esri.tasks.NAOutputLine = { NONE: "esriNAOutputLineNone", STRAIGHT: "esriNAOutputLineStraight", TRUE_SHAPE: "esriNAOutputLineTrueShape", TRUE_SHAPE_WITH_MEASURE: "esriNAOutputLineTrueShapeWithMeasure" }; esri.tasks.NAUTurn = { ALLOW_BACKTRACK: "esriNFSBAllowBacktrack", AT_DEAD_ENDS_ONLY: "esriNFSBAtDeadEndsOnly", NO_BACKTRACK: "esriNFSBNoBacktrack" }; esri.tasks.NAOutputPolygon = { NONE: "esriNAOutputPolygonNone", SIMPLIFIED: "esriNAOutputPolygonSimplified", DETAILED: "esriNAOutputPolygonDetailed" }; esri.tasks.NATravelDirection = { FROM_FACILITY: "esriNATravelDirectionFromFacility", TO_FACILITY: "esriNATravelDirectionToFacility" }; dojo.declare("esri.tasks.NAMessage", null, { constructor: function (_9d6) { dojo.mixin(this, _9d6); } }); dojo.mixin(esri.tasks.NAMessage, { TYPE_INFORMATIVE: 0, TYPE_PROCESS_DEFINITION: 1, TYPE_PROCESS_START: 2, TYPE_PROCESS_STOP: 3, TYPE_WARNING: 50, TYPE_ERROR: 100, TYPE_EMPTY: 101, TYPE_ABORT: 200 }); dojo.declare("esri.tasks.DataLayer", null, { name: null, where: null, geometry: null, spatialRelationship: null, toJson: function () { var json = { type: "layer", layerName: this.name, where: this.where, spatialRel: this.spatialRelationship }; var g = this.geometry; if (g) { json.geometryType = esri.geometry.getJsonType(g); json.geometry = g.toJson(); } return esri.filter(json, function (_9d7) { if (_9d7 !== null) { return true; } }); } }); dojo.mixin(esri.tasks.DataLayer, esri.tasks._SpatialRelationship); dojo.declare("esri.tasks.DirectionsFeatureSet", esri.tasks.FeatureSet, { constructor: function (json, cgs) { this.routeId = json.routeId; this.routeName = json.routeName; dojo.mixin(this, json.summary); this.extent = new esri.geometry.Extent(this.envelope); var _9d8 = esri.geometry._fromCompressedGeometry, _9d9 = this.features, sr = this.extent.spatialReference, _9da = []; dojo.forEach(cgs, function (cg, i) { _9d9[i].setGeometry(_9da[i] = _9d8(cg, sr)); }); this.mergedGeometry = esri.geometry._mergePolylinesToSinglePath(_9da, sr); this.geometryType = "esriGeometryPolyline"; delete this.envelope; } }); } if (!dojo._hasResource["esri.tasks.route"]) { dojo._hasResource["esri.tasks.route"] = true; dojo.provide("esri.tasks.route"); dojo.declare("esri.tasks.RouteTask", esri.tasks._Task, { constructor: function (url) { this._url.path += "/solve"; this._handler = dojo.hitch(this, this._handler); }, _handler: function (_9db, io, _9dc, _9dd) { try { var _9de = [], _9df = [], dirs = _9db.directions || [], _9e0 = _9db.routes ? _9db.routes.features : [], _9e1 = _9db.stops ? _9db.stops.features : [], _9e2 = _9db.barriers ? _9db.barriers.features : [], _9e3 = _9db.polygonBarriers ? _9db.polygonBarriers.features : [], _9e4 = _9db.polylineBarriers ? _9db.polylineBarriers.features : [], _9e5 = _9db.messages, _9e6 = "esri.tasks.RouteTask.NULL_ROUTE_NAME", _9e7 = dojo.forEach, _9e8 = dojo.indexOf, _9e9 = this._errorHandler, _9ea = true, _9eb, _9ec; _9e7(dirs, function (dir) { _9de.push(_9eb = dir.routeName); _9df[_9eb] = { directions: dir }; }); _9e7(_9e0, function (_9ed) { if (_9e8(_9de, (_9eb = _9ed.attributes.Name)) === -1) { _9de.push(_9eb); _9df[_9eb] = {}; } _9df[_9eb].route = _9ed; }); _9e7(_9e1, function (stop) { _9ec = stop.attributes; if (_9e8(_9de, (_9eb = _9ec.RouteName || _9e6)) === -1) { _9de.push(_9eb); _9df[_9eb] = {}; } if (_9eb !== _9e6) { _9ea = false; } if (_9df[_9eb].stops === undefined) { _9df[_9eb].stops = []; } _9df[_9eb].stops.push(stop); }); if (_9e1.length > 0 && _9ea === true) { _9df[_9de[0]].stops = _9df[_9e6].stops; delete _9df[_9e6]; _9de.splice(dojo.indexOf(_9de, _9e6), 1); } var _9ee = []; _9e7(_9de, function (_9ef, i) { _9df[_9ef].routeName = _9ef === _9e6 ? null : _9ef; _9ee.push(new esri.tasks.RouteResult(_9df[_9ef])); }); var _9f0 = function (_9f1) { _9e7(_9f1, function (barr, i) { _9f1[i] = new esri.Graphic(barr); }); return _9f1; }; _9e7(_9e5, function (_9f2, i) { _9e5[i] = new esri.tasks.NAMessage(_9f2); }); var _9f3 = { routeResults: _9ee, barriers: _9f0(_9e2), polygonBarriers: _9f0(_9e3), polylineBarriers: _9f0(_9e4), messages: _9e5 }; this.onSolveComplete(_9f3); if (_9dc) { _9dc(_9f3); } } catch (err) { this._errorHandler(err, _9dd); } }, solve: function (_9f4, _9f5, _9f6) { var _9f7 = _9f4.stops; if (_9f7 && _9f7 instanceof esri.tasks.FeatureSet) { var _9f8 = [], _9f9 = false, attr; dojo.forEach(_9f7.features, function (stop) { attr = stop.attributes; if ((!attr || !attr.RouteName) && !_9f9) { _9f9 = true; } else { if (dojo.indexOf(_9f8, attr ? attr.RouteName : "") === -1) { _9f8.push(attr ? attr.RouteName : ""); } } }); if (_9f8.length > 1 && _9f9) { _9f9 = new Error(esri.bundle.tasks.na.route.routeNameNotSpecified); this.onError(_9f9); if (_9f6) { _9f6(_9f9); } throw _9f9; } } var _9fa = this._encode(dojo.mixin({}, this._url.query, { f: "json" }, _9f4.toJson())), _9fb = this._handler, _9fc = this._errorHandler; return esri.request({ url: this._url.path, content: _9fa, callbackParamName: "callback", load: (function (r, i) { _9fb(r, i, _9f5, _9f6); }), error: (function (r) { _9fc(r, _9f6); }) }); }, onSolveComplete: function () { } }); dojo.declare("esri.tasks.RouteParameters", null, { accumulateAttributes: null, attributeParameterValues: null, barriers: null, directionsLanguage: null, directionsLengthUnits: null, directionsTimeAttribute: null, doNotLocateOnRestrictedElements: false, findBestSequence: null, ignoreInvalidLocations: null, impedanceAttribute: null, outputLines: null, outputGeometryPrecision: null, outputGeometryPrecisionUnits: null, outSpatialReference: null, polygonBarriers: null, polylineBarriers: null, preserveFirstStop: null, preserveLastStop: null, restrictionAttributes: null, restrictUTurns: null, returnBarriers: false, returnDirections: false, returnPolygonBarriers: false, returnPolylineBarriers: false, returnRoutes: true, returnStops: false, startTime: null, stops: null, useHierarchy: null, useTimeWindows: null, toJson: function () { var json = { returnDirections: this.returnDirections, returnRoutes: this.returnRoutes, returnStops: this.returnStops, returnBarriers: this.returnBarriers, returnPolygonBarriers: this.returnPolygonBarriers, returnPolylineBarriers: this.returnPolylineBarriers, attributeParameterValues: this.attributeParameterValues && dojo.toJson(this.attributeParameterValues), outSR: this.outSpatialReference ? (this.outSpatialReference.wkid || dojo.toJson(this.outSpatialReference.toJson())) : null, outputLines: this.outputLines, findBestSequence: this.findBestSequence, preserveFirstStop: this.preserveFirstStop, preserveLastStop: this.preserveLastStop, useTimeWindows: this.useTimeWindows, startTime: this.startTime ? this.startTime.getTime() : null, accumulateAttributeNames: this.accumulateAttributes ? this.accumulateAttributes.join(",") : null, ignoreInvalidLocations: this.ignoreInvalidLocations, impedanceAttributeName: this.impedanceAttribute, restrictionAttributeNames: this.restrictionAttributes ? this.restrictionAttributes.join(",") : null, restrictUTurns: this.restrictUTurns, useHierarchy: this.useHierarchy, directionsLanguage: this.directionsLanguage, outputGeometryPrecision: this.outputGeometryPrecision, outputGeometryPrecisionUnits: this.outputGeometryPrecisionUnits, directionsLengthUnits: esri.tasks._NALengthUnit[this.directionsLengthUnits], directionsTimeAttributeName: this.directionsTimeAttribute }, _9fd = this.stops; if (_9fd instanceof esri.tasks.FeatureSet && _9fd.features.length > 0) { json.stops = dojo.toJson({ type: "features", features: esri._encodeGraphics(_9fd.features), doNotLocateOnRestrictedElements: this.doNotLocateOnRestrictedElements }); } else { if (_9fd instanceof esri.tasks.DataLayer) { json.stops = _9fd; } } var _9fe = function (_9ff) { if (!_9ff) { return null; } if (_9ff instanceof esri.tasks.FeatureSet) { if (_9ff.features.length > 0) { return dojo.toJson({ type: "features", features: esri._encodeGraphics(_9ff.features) }); } else { return null; } } else { if (_9ff instanceof esri.tasks.DataLayer) { return _9ff; } } return dojo.toJson(_9ff); }; json.barriers = _9fe(this.barriers); json.polygonBarriers = _9fe(this.polygonBarriers); json.polylineBarriers = _9fe(this.polylineBarriers); return esri.filter(json, function (_a00) { if (_a00 !== null) { return true; } }); } }); dojo.declare("esri.tasks.RouteResult", null, { constructor: function (json) { if (json.directions) { var cgs = []; dojo.forEach(json.directions.features, function (f, i) { cgs[i] = f.compressedGeometry; }); this.directions = new esri.tasks.DirectionsFeatureSet(json.directions, cgs); } this.routeName = json.routeName; if (json.route) { this.route = new esri.Graphic(json.route); } if (json.stops) { var ss = (this.stops = []); dojo.forEach(json.stops, function (stop, i) { ss[stop.attributes.Sequence - 1] = new esri.Graphic(stop); }); } }, routeName: null, directions: null, route: null, stops: null }); } if (!dojo._hasResource["esri.virtualearth.VETiledLayer"]) { dojo._hasResource["esri.virtualearth.VETiledLayer"] = true; dojo.provide("esri.virtualearth.VETiledLayer"); dojo.declare("esri.virtualearth.VETiledLayer", esri.layers.TiledMapServiceLayer, { constructor: function (_a01) { try { _a01 = dojo.mixin({ bingMapsKey: null, culture: "en-US" }, _a01 || {}); this.url = "http://serverapi.arcgisonline.com/veadaptor/production/services/imagery/getmetadata"; this._url = esri.urlToObject(this.url); this.spatialReference = new esri.SpatialReference({ wkid: 102100 }); this.tileInfo = new esri.layers.TileInfo({ rows: 256, cols: 256, dpi: 96, origin: { x: -20037508.342787, y: 20037508.342787 }, spatialReference: { wkid: 102100 }, lods: [{ level: 1, resolution: 78271.5169639999, scale: 295828763.795777 }, { level: 2, resolution: 39135.7584820001, scale: 147914381.897889 }, { level: 3, resolution: 19567.8792409999, scale: 73957190.948944 }, { level: 4, resolution: 9783.93962049996, scale: 36978595.474472 }, { level: 5, resolution: 4891.96981024998, scale: 18489297.737236 }, { level: 6, resolution: 2445.98490512499, scale: 9244648.868618 }, { level: 7, resolution: 1222.99245256249, scale: 4622324.434309 }, { level: 8, resolution: 611.49622628138, scale: 2311162.217155 }, { level: 9, resolution: 305.748113140558, scale: 1155581.108577 }, { level: 10, resolution: 152.874056570411, scale: 577790.554289 }, { level: 11, resolution: 76.4370282850732, scale: 288895.277144 }, { level: 12, resolution: 38.2185141425366, scale: 144447.638572 }, { level: 13, resolution: 19.1092570712683, scale: 72223.819286 }, { level: 14, resolution: 9.55462853563415, scale: 36111.909643 }, { level: 15, resolution: 4.77731426794937, scale: 18055.954822 }, { level: 16, resolution: 2.38865713397468, scale: 9027.977411 }, { level: 17, resolution: 1.19432856685505, scale: 4513.988705 }, { level: 18, resolution: 0.597164283559817, scale: 2256.994353 }, { level: 19, resolution: 0.298582141647617, scale: 1128.497176}] }); this.initialExtent = (this.fullExtent = new esri.geometry.Extent(-20037508.342787, -20037508.34278, 20037508.34278, 20037508.342787, new esri.SpatialReference({ wkid: 102100 }))); dojo.mixin(this, _a01); this._initLayer = dojo.hitch(this, this._initLayer); this._errorHandler = dojo.hitch(this, this._errorHandler); this._getTileInfo = dojo.hitch(this, this._getTileInfo); if (this.bingMapsKey) { this._getTileInfo(); } else { throw new Error(esri.bundle.virtualearth.vetiledlayer.bingMapsKeyNotSpecified); } } catch (e) { this.onError(e); throw e; } }, _unsetMap: function (map, _a02) { this.inherited("_unsetMap", arguments); }, _getTileInfo: function () { if (this.bingMapsKey) { esri.request({ url: this._url.path, content: dojo.mixin({}, this._url.query, { token: this.bingMapsKey, style: this.mapStyle, culture: this.culture }), callbackParamName: "callback", load: this._initLayer, error: this._errorHandler }); } }, _initLayer: function (_a03, io) { try { var _a04 = esri.urlToObject(_a03.imageUri); var _a05 = _a03.imageUri.replace("{", "${"); this.tileServers = dojo.map(_a03.subDomains, function (_a06) { return dojo.string.substitute(_a05, { subdomain: _a06 }); }); this._tsLength = this.tileServers.length; this._tsIndex = 0; if (!this.loaded) { this.loaded = true; this.onLoad(this); } else { this.refresh(); } } catch (e) { this.onError(e); } }, getTileUrl: function (_a07, row, col) { var _a08 = this.tileServers[this._tsIndex++ % this._tsLength], _a09 = _a08.replace(/{/g, "${"); return dojo.string.substitute(_a09, { quadkey: this._getQuadKey(_a07, row, col), culture: this.culture, token: this.bingMapsKey }); }, _getQuadKey: function (_a0a, row, col) { var _a0b = "", _a0c, mask; for (var i = _a0a; i > 0; i--) { _a0c = "0"; mask = 1 << (i - 1); if ((col & mask) != 0) { _a0c++; } if ((row & mask) != 0) { _a0c++; _a0c++; } _a0b = _a0b + _a0c; } return _a0b; }, setMapStyle: function (_a0d) { this.mapStyle = _a0d; this._getTileInfo(); }, setCulture: function (_a0e) { this.culture = _a0e; this._getTileInfo(); }, setBingMapsKey: function (_a0f) { this.bingMapsKey = _a0f; } }); dojo.mixin(esri.virtualearth.VETiledLayer, { MAP_STYLE_AERIAL: "aerial", MAP_STYLE_AERIAL_WITH_LABELS: "aerialWithLabels", MAP_STYLE_ROAD: "road" }); } if (!dojo._hasResource["esri.virtualearth.VEGeocoder"]) { dojo._hasResource["esri.virtualearth.VEGeocoder"] = true; dojo.provide("esri.virtualearth.VEGeocoder"); dojo.declare("esri.virtualearth.VEGeocoder", esri.tasks._Task, { constructor: function (_a10) { try { _a10 = dojo.mixin({ bingMapsKey: null }, _a10 || {}); this.url = "http://serverapi.arcgisonline.com/veadaptor/production/services/geocode/geocode"; this._url = esri.urlToObject(this.url); this._queue = []; this.bingMapsKey = _a10.bingMapsKey; this.culture = _a10.culture || "en-US"; this._errorHandler = dojo.hitch(this, this._errorHandler); this._addressToLocationsHandler = dojo.hitch(this, this._addressToLocationsHandler); if (!this.bingMapsKey) { throw new Error(esri.bundle.virtualearth.vegeocode.bingMapsKeyNotSpecified); } } catch (e) { this.onError(e); throw e; } }, addressToLocations: function (_a11, _a12, _a13) { if (!this.bingMapsKey) { console.debug(esri.bundle.virtualearth.vegeocode.requestQueued); this._queue.push(arguments); return; } var _a14 = dojo.mixin({}, this._url.query, { query: _a11, token: this.bingMapsKey, culture: this.culture }), _a15 = this._addressToLocationsHandler, _a16 = this._errorHandler; return esri.request({ url: this._url.path, content: _a14, callbackParamName: "callback", load: (function (r, i) { _a15(r, i, _a12, _a13); }), error: (function (r) { _a16(r, _a13); }) }); }, _addressToLocationsHandler: function (_a17, io, _a18, _a19) { try { dojo.forEach(_a17, function (_a1a, i) { _a17[i] = new esri.virtualearth.VEGeocodeResult(_a1a); }); this.onAddressToLocationsComplete(_a17); if (_a18) { _a18(_a17); } } catch (err) { this._errorHandler(err, _a19); } }, onAddressToLocationsComplete: function () { }, setBingMapsKey: function (_a1b) { this.bingMapsKey = _a1b; }, setCulture: function (_a1c) { this.culture = _a1c; } }); dojo.declare("esri.virtualearth.VEAddress", null, { constructor: function (json) { dojo.mixin(this, { addressLine: null, adminDistrict: null, countryRegion: null, district: null, formattedAddress: null, locality: null, postalCode: null, postalTown: null }, json); } }); dojo.declare("esri.virtualearth.VEGeocodeResult", null, { constructor: function (json) { dojo.mixin(this, { address: null, bestView: null, calculationMethod: null, confidence: null, displayName: null, entityType: null, location: null, matchCodes: null }, json); if (this.address) { this.address = new esri.virtualearth.VEAddress(this.address); } if (this.bestView) { this.bestView = new esri.geometry.Extent(this.bestView); } if (this.locationArray) { this.calculationMethod = this.locationArray[0].calculationMethod; this.location = new esri.geometry.Point(this.locationArray[0]); } } }); } dojo.i18n._preloadLocalizations("esri.nls.jsapi", ["ROOT", "ar", "ca", "cs", "da", "de", "de-de", "el", "en", "en-gb", "en-us", "es", "es-es", "fi", "fi-fi", "fr", "fr-fr", "he", "he-il", "hu", "it", "it-it", "ja", "ja-jp", "ko", "ko-kr", "nb", "nl", "nl-nl", "pl", "pt", "pt-br", "pt-pt", "ru", "sk", "sl", "sv", "th", "tr", "xx", "zh", "zh-cn", "zh-tw"]);
} ());﻿
dojo.require("esri.map");

document.write("<link rel=\"Stylesheet\" href=\"http://" + _lwBaseDomainNoOverrideThis + "/map/basestyle.css\" type=\"text/css\" media=\"screen\" />");
document.write("<link rel=\"Stylesheet\" href=\"http://" + _lwBaseDomainNoOverrideThis + "/map/style.css\" type=\"text/css\" media=\"screen\" />");

if (typeof (lw) == "undefined") lw = {};
if (typeof (lw.Map) == "undefined") dojo.declare("lw.Map", esri.Map, {  
  createMap: function () {
    var _internalMap = this;
    dojo.addOnLoad(function () {
      var privateMapServiceLayer = new esri.layers.ArcGISTiledMapServiceLayer("http://tkn_" + _lwTokenValueNoOverrideThis + "." + _lwBaseMapServiceDomainNoOverrideThis + "/ArcGIS/rest/services/" + _lwBaseMapServiceNoOverrideThis + "/MapServer");
      _internalMap.addLayer(privateMapServiceLayer);
      var arrow = document.createElement("div");
      arrow.setAttribute("id", "apiNorthArrow-" + _internalMap.id);
      arrow.innerHTML = "<img src=\"http://" + _lwBaseDomainNoOverrideThis + "/map/images/spacer.gif\" width=\"0\" height=\"\" />";
      _internalMap.__root.appendChild(arrow);
      dojo.addClass("apiNorthArrow-" + _internalMap.id, "north-arrow");     
      var topArrow = -_internalMap.container.clientHeight + 10 + "px";
      dojo.style("apiNorthArrow-" + _internalMap.id, {
        "top": topArrow,
        "left": "12px"
      });      
    });
  }
});﻿
dojo.require("dojo.io.script");

if (typeof (lw) == "undefined") lw = {};
if (typeof (lw.Geoprocessing) == "undefined") lw.Geoprocessing = {};

lw.Geoprocessing = function () {

  var _token = _lwTokenValueNoOverrideThis;
  var _currentCountry = "Ecuador";

  this.SetCurrentCountry = function (country) {
    if (country == undefined || country == null || country.length == 0) {
      alert("Country can't be empty");
      return false;
    }
    _currentCountry = country;
  }

  this.GeoCodePlace = function (city, place, onSuccess, onError) {
    dojo.io.script.get({
      url: "http://" + _lwWebServiceDomainNoOverrideThis + "/POI.ashx?function=GetPOIByName&city=" + URLEncode(city) + "&poi=" + URLEncode(place) + "&token=" + _token,
      handleAs: "json",
      preventCache: true,
      callbackParamName: "callback",
      load: function (response, ioArgs) { eval(onSuccess(response)); },
      error: function (response, ioArgs) { eval(onError({ ErrorCode: 0, ErrorMessage: response.message })); }
    });
  };

  this.GetProvince = function (city, onSuccess, onError) {
    dojo.io.script.get({
      url: "http://" + _lwWebServiceDomainNoOverrideThis + "/Location.ashx?function=GetProvince&country=" + URLEncode(_currentCountry) + "&city=" + URLEncode(city) + "&token=" + _token,
      handleAs: "json",
      preventCache: true,
      callbackParamName: "callback",
      load: function (response, ioArgs) { eval(onSuccess(response)); },
      error: function (response, ioArgs) { eval(onError({ ErrorCode: 0, ErrorMessage: response.message })); }
    });
  };

  this.GetStreetAlias = function (city, street, onSuccess, onError) {
    dojo.io.script.get({
      url: "http://" + _lwWebServiceDomainNoOverrideThis + "/Location.ashx?function=GetStreetAlias&country=" + URLEncode(_currentCountry) + "&city=" + URLEncode(city) + "&street=" + URLEncode(street) + "&token=" + _token,
      handleAs: "json",
      preventCache: true,
      callbackParamName: "callback",
      load: function (response, ioArgs) { eval(onSuccess(response)); },
      error: function (response, ioArgs) { eval(onError({ ErrorCode: 0, ErrorMessage: response.message })); }
    });
  };

  this.Geocode = function (city, street, intersection, onSuccess, onError) {
    dojo.io.script.get({
      url: "http://" + _lwWebServiceDomainNoOverrideThis + "/Location.ashx?function=GeocodeAddress&country=" + URLEncode(_currentCountry) + "&city=" + URLEncode(city) + "&street=" + URLEncode(street) + "&intersection=" + URLEncode(intersection) + "&token=" + _token,
      handleAs: "json",
      preventCache: true,
      callbackParamName: "callback",
      load: function (response, ioArgs) { eval(onSuccess(response)); },
      error: function (response, ioArgs) { eval(onError({ ErrorCode: 0, ErrorMessage: response.message })); }
    });
  };

  this.ReverseGeocode = function (longitude, latitude, onSuccess, onError) {
    dojo.io.script.get({
      url: "http://" + _lwWebServiceDomainNoOverrideThis + "/Location.ashx?function=ReverseGeocode&longitude=" + longitude + "&latitude=" + latitude + "&token=" + _token,
      handleAs: "json",
      preventCache: true,
      callbackParamName: "callback",
      load: function (response, ioArgs) { eval(onSuccess(response)); },
      error: function (response, ioArgs) { eval(onError({ ErrorCode: 0, ErrorMessage: response.message })); }
    });
  };

  this.FreeSearchPlace = function (place, onSuccess, onError) {
    dojo.io.script.get({
      url: "http://" + _lwWebServiceDomainNoOverrideThis + "/POI.ashx?function=SearchPOIs&what=" + URLEncode(place) + "&page=1&token=" + _token,
      handleAs: "json",
      preventCache: true,
      callbackParamName: "callback",
      load: function (response, ioArgs) { eval(onSuccess(response)); },
      error: function (response, ioArgs) { eval(onError({ ErrorCode: 0, ErrorMessage: response.message })); }
    });
  };

  this.FreeSearchPlaceByPage = function (place, page, onSuccess, onError) {
    dojo.io.script.get({
      url: "http://" + _lwWebServiceDomainNoOverrideThis + "/POI.ashx?function=SearchPOIs&what=" + URLEncode(place) + "&page=" + page + "&token=" + _token,
      handleAs: "json",
      preventCache: true,
      callbackParamName: "callback",
      load: function (response, ioArgs) { eval(onSuccess(response)); },
      error: function (response, ioArgs) { eval(onError({ ErrorCode: 0, ErrorMessage: response.message })); }
    });
  };

  this.FreeSearchPlaceByCity = function (city, page, onSuccess, onError) {
    dojo.io.script.get({
      url: "http://" + _lwWebServiceDomainNoOverrideThis + "/POI.ashx?function=SearchPOIs&what=" + URLEncode(place) + "&city=" + URLEncode(city) + "&page=" + page + "&token=" + _token,
      handleAs: "json",
      preventCache: true,
      callbackParamName: "callback",
      load: function (response, ioArgs) { eval(onSuccess(response)); },
      error: function (response, ioArgs) { eval(onError({ ErrorCode: 0, ErrorMessage: response.message })); }
    });
  };  

  this.FreeSearchPlaceByCoords = function (place, page, longitude, latitude, onSuccess, onError) {
    dojo.io.script.get({
      url: "http://" + _lwWebServiceDomainNoOverrideThis + "/POI.ashx?function=SearchPOIs&what=" + URLEncode(place) + "&nearTo=" + longitude + "," + latitude + "&page=" + page + "&token=" + _token,
      handleAs: "json",
      preventCache: true,
      callbackParamName: "callback",
      load: function (response, ioArgs) { eval(onSuccess(response)); },
      error: function (response, ioArgs) { eval(onError({ ErrorCode: 0, ErrorMessage: response.message })); }
    });
  };

  this.FreeSearchAddress = function (address, onSuccess, onError) {
    dojo.io.script.get({
      url: "http://" + _lwWebServiceDomainNoOverrideThis + "/Location.ashx?function=SearchAddress&country=" + URLEncode(_currentCountry) + "&address=" + URLEncode(address) + "&token=" + _token,
      handleAs: "json",
      preventCache: true,
      callbackParamName: "callback",
      load: function (response, ioArgs) { eval(onSuccess(response)); },
      error: function (response, ioArgs) { eval(onError({ ErrorCode: 0, ErrorMessage: response.message })); }
    });
  };

  this.GetZonesByLocation = function (longitude, latitude, layer, onSuccess, onError) {
    dojo.io.script.get({
      url: "http://" + _lwWebServiceDomainNoOverrideThis + "/Zone.ashx?function=GetZones&longitude=" + longitude + "&latitude=" + latitude + "&layer=" + layer + "&token=" + _token,
      handleAs: "json",
      preventCache: true,
      callbackParamName: "callback",
      load: function (response, ioArgs) { eval(onSuccess(response)); },
      error: function (response, ioArgs) { eval(onError({ ErrorCode: 0, ErrorMessage: response.message })); }
    });
  };

  this.DoRouting = function (fromX, fromY, toX, toY, onSuccess, onError) {
    dojo.io.script.get({
      url: "http://" + _lwWebServiceDomainNoOverrideThis + "/Routing.ashx?function=DoRouting&fromX=" + fromX + "&fromY=" + fromY + "&toX=" + toX + "&toY=" + toY + "&token=" + _token,
      handleAs: "json",
      preventCache: true,
      callbackParamName: "callback",
      load: function (response, ioArgs) { eval(onSuccess(response)); },
      error: function (response, ioArgs) { eval(onError({ ErrorCode: 0, ErrorMessage: response.message })); }
    });
  };

  this.GetLastPostForAllGeos = function (onSuccess, onError) {
    dojo.io.script.get({
      url: "http://" + _lwWebServiceDomainNoOverrideThis + "/GeoLocator.ashx?function=GetLastPositionForAllUnits&token=" + _token,
      handleAs: "json",
      preventCache: true,
      callbackParamName: "callback",
      load: function (response, ioArgs) { eval(onSuccess(response)); },
      error: function (response, ioArgs) { eval(onError({ ErrorCode: 0, ErrorMessage: response.message })); }
    });
  };

  this.GetNPostForGeo = function (imei, fromDate, toDate, onSuccess, onError, objMap) {
    //    var isDateRangeVaild = IsValidDateRange(fromDate, toDate);
    //    if (!isDateRangeVaild) return;

    dojo.io.script.get({
      url: "http://" + _lwWebServiceDomainNoOverrideThis + "/GeoLocator.ashx?function=GetNPositionsForUnit&imei=" + imei + "&from=" + fromDate + "&to=" + toDate + "&token=" + _token,
      handleAs: "json",
      preventCache: true,
      callbackParamName: "callback",
      load: function (response, ioArgs) {
        eval(onSuccess(response));

        if (objMap != undefined && response != null && response.length > 0) {
          var multipoint = new esri.geometry.Multipoint();
          var points = new Array();
          for (var lwp = 0; lwp < response.length; lwp++) {
            var point = new esri.geometry.Point(response[lwp].Coordinates.Longitude, response[lwp].Coordinates.Latitude, objMap.spatialReference);
            points.push(point);
            multipoint.addPoint(point);
          }
          objMap.graphics.clear();
          objMap.graphics.add(new esri.Graphic(new esri.geometry.Polyline().addPath(points), new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color("#ff7000"), 3)));
          AdjustExtent(multipoint, objMap);
        }
      },
      error: function (response, ioArgs) { eval(onError({ ErrorCode: 0, ErrorMessage: response.message })); }
    });
  };

  //PRIVATE FUNCTIONS

  var IsValidDateRange = function (from, to) {

    if (from > to) {
      alert("Start date can not be greater than End Date.");
      return false;
    }

    if (dojo.date.difference(from, to, "hour") > 24) {
      alert("The maximum date range is 24 hours.");
      return false;
    }

    return true;
  };

  var AdjustExtent = function (multipoint, theMap) {
    var extent = multipoint.getExtent();
    var center = extent.getCenter();
    var lods = theMap._params.tileInfo.lods;
    var isInside = false;
    for (var z = lods.length - 1; z >= 0; z--) {
      var resolution = lods[z].resolution;
      xmin = center.x - ((theMap.width / 2) * resolution);
      ymin = center.y + ((theMap.height / 2) * resolution);
      xmax = center.x + ((theMap.width / 2) * resolution);
      ymax = center.y - ((theMap.height / 2) * resolution);
      var condition1 = (extent.xmin > xmin && extent.ymin < ymin);
      var condition2 = (extent.xmax < xmax && extent.ymax > ymax);
      if (condition1 && condition2) {
        theMap.centerAndZoom(center, lods[z].level);
        break;
      }
    }
  };
};

function URLEncode(plaintext) {
  // The Javascript escape and unescape functions do not correspond
  // with what browsers actually do...
  var SAFECHARS = "0123456789" + 				// Numeric
					"ABCDEFGHIJKLMNOPQRSTUVWXYZ" + // Alphabetic
					"abcdefghijklmnopqrstuvwxyz" +
					"-_.!~*'()"; 				// RFC2396 Mark characters
  var HEX = "0123456789ABCDEF";

  var encoded = "";
  for (var i = 0; i < plaintext.length; i++) {
    var ch = plaintext.charAt(i);
    if (ch == " ") {
      encoded += "+"; 			// x-www-urlencoded, rather than %20
    } else if (SAFECHARS.indexOf(ch) != -1) {
      encoded += ch;
    } else {
      var charCode = ch.charCodeAt(0);
      if (charCode > 255) {
        alert("Unicode Character '"
                        + ch
                        + "' cannot be encoded using standard URL encoding.\n" +
				          "(URL encoding only supports 8-bit characters.)\n" +
						  "A space (+) will be substituted.");
        encoded += "+";
      } else {
        encoded += "%";
        encoded += HEX.charAt((charCode >> 4) & 0xF);
        encoded += HEX.charAt(charCode & 0xF);
      }
    }
  } // for  
  return encoded;
};

function URLDecode(encoded) {
  // Replace + with ' '
  // Replace %xx with equivalent character
  // Put [ERROR] in output if %xx is invalid.
  var HEXCHARS = "0123456789ABCDEFabcdef";
  var plaintext = "";
  var i = 0;
  while (i < encoded.length) {
    var ch = encoded.charAt(i);
    if (ch == "+") {
      plaintext += " ";
      i++;
    } else if (ch == "%") {
      if (i < (encoded.length - 2)
					&& HEXCHARS.indexOf(encoded.charAt(i + 1)) != -1
					&& HEXCHARS.indexOf(encoded.charAt(i + 2)) != -1) {
        plaintext += unescape(encoded.substr(i, 3));
        i += 3;
      } else {
        alert('Bad escape combination near ...' + encoded.substr(i));
        plaintext += "%[ERROR]";
        i++;
      }
    } else {
      plaintext += ch;
      i++;
    }
  } // while  
  return plaintext;
};/*! jQuery v1.7 jquery.com | jquery.org/license */
(function(a,b){function cA(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cx(a){if(!cm[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cn||(cn=c.createElement("iframe"),cn.frameBorder=cn.width=cn.height=0),b.appendChild(cn);if(!co||!cn.createElement)co=(cn.contentWindow||cn.contentDocument).document,co.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),co.close();d=co.createElement(a),co.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cn)}cm[a]=e}return cm[a]}function cw(a,b){var c={};f.each(cs.concat.apply([],cs.slice(0,b)),function(){c[this]=a});return c}function cv(){ct=b}function cu(){setTimeout(cv,0);return ct=f.now()}function cl(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ck(){try{return new a.XMLHttpRequest}catch(b){}}function ce(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function cd(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function cc(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bG.test(a)?d(a,e):cc(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)cc(a+"["+e+"]",b[e],c,d);else d(a,b)}function cb(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function ca(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bV,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=ca(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=ca(a,c,d,e,"*",g));return l}function b_(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bR),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bE(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bz:bA;if(d>0){c!=="border"&&f.each(e,function(){c||(d-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?d+=parseFloat(f.css(a,c+this))||0:d-=parseFloat(f.css(a,"border"+this+"Width"))||0});return d+"px"}d=bB(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0,c&&f.each(e,function(){d+=parseFloat(f.css(a,"padding"+this))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+this+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+this))||0)});return d+"px"}function br(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bi,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bq(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bp(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bp)}function bp(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bo(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bn(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bm(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c+(i[c][d].namespace?".":"")+i[c][d].namespace,i[c][d],i[c][d].data)}h.data&&(h.data=f.extend({},h.data))}}function bl(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function X(a){var b=Y.split(" "),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function W(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(R.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function V(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function N(){return!0}function M(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}var c=a.document,d=a.navigator,e=a.location,f=function(){function K(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(K,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z]|[0-9])/ig,x=/^-ms-/,y=function(a,b){return(b+"").toUpperCase()},z=d.userAgent,A,B,C,D=Object.prototype.toString,E=Object.prototype.hasOwnProperty,F=Array.prototype.push,G=Array.prototype.slice,H=String.prototype.trim,I=Array.prototype.indexOf,J={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=n.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7",length:0,size:function(){return this.length},toArray:function(){return G.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?F.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),B.add(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(G.apply(this,arguments),"slice",G.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:F,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;B.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!B){B=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",C,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",C),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&K()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return a!=null&&m.test(a)&&!isNaN(a)},type:function(a){return a==null?String(a):J[D.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!E.call(a,"constructor")&&!E.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||E.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(x,"ms-").replace(w,y)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:H?function(a){return a==null?"":H.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?F.call(c,a):e.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(I)return I.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=G.call(arguments,2),g=function(){return a.apply(c,f.concat(G.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=s.exec(a)||t.exec(a)||u.exec(a)||a.indexOf("compatible")<0&&v.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){J["[object "+b+"]"]=b.toLowerCase()}),A=e.uaMatch(z),A.browser&&(e.browser[A.browser]=!0,e.browser.version=A.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?C=function(){c.removeEventListener("DOMContentLoaded",C,!1),e.ready()}:c.attachEvent&&(C=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",C),e.ready())}),typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return e});return e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h==="array"?m(g):h==="function"&&(!a.unique||!o.has(g))&&c.push(g)},n=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,l=j||0,j=0,k=c.length;for(;c&&l<k;l++)if(c[l].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}i=!1,c&&(a.once?e===!0?o.disable():c=[]:d&&d.length&&(e=d.shift(),o.fireWith(e[0],e[1])))},o={add:function(){if(c){var a=c.length;m(arguments),i?k=c.length:e&&e!==!0&&(j=a,n(e[0],e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){i&&f<=k&&(k--,f<=l&&l--),c.splice(f--,1);if(a.unique)break}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){c=[];return this},disable:function(){c=d=e=b;return this},disabled:function(){return!c},lock:function(){d=b,(!e||e===!0)&&o.disable();return this},locked:function(){return!d},fireWith:function(b,c){d&&(i?a.once||d.push([b,c]):(!a.once||!e)&&n(b,c));return this},fire:function(){o.fireWith(this,arguments);return this},fired:function(){return!!e}};return o};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){i.done(a).fail(b).progress(c);return this},always:function(){return i.done.apply(i,arguments).fail.apply(i,arguments)},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+"With"]=g[j].fireWith;i.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i);return i},when:function(a){function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var a=c.createElement("div"),b=c.documentElement,d,e,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;a.setAttribute("className","t"),a.innerHTML="   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/><nav></nav>",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=a.getElementsByTagName("input")[0],k={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,unknownElems:!!a.getElementsByTagName("nav").length,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:a.className!=="t",enctype:!!c.createElement("form").enctype,submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,k.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,k.optDisabled=!h.disabled;try{delete a.test}catch(v){k.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function(){k.noCloneEvent=!1}),a.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),k.radioValue=i.value==="t",i.setAttribute("checked","checked"),a.appendChild(i),l=c.createDocumentFragment(),l.appendChild(a.lastChild),k.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",m=c.getElementsByTagName("body")[0],o=c.createElement(m?"div":"body"),p={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},m&&f.extend(p,{position:"absolute",left:"-999px",top:"-999px"});for(t in p)o.style[t]=p[t];o.appendChild(a),n=m||b,n.insertBefore(o,n.firstChild),k.appendChecked=i.checked,k.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,k.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="<div style='width:4px;'></div>",k.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",q=a.getElementsByTagName("td"),u=q[0].offsetHeight===0,q[0].style.display="",q[1].style.display="none",k.reliableHiddenOffsets=u&&q[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",a.appendChild(j),k.reliableMarginRight=(parseInt((c.defaultView.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(a.attachEvent)for(t in{submit:1,change:1,focusin:1})s="on"+t,u=s in a,u||(a.setAttribute(s,"return;"),u=typeof a[s]=="function"),k[t+"Bubbles"]=u;f(function(){var a,b,d,e,g,h,i=1,j="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",l="visibility:hidden;border:0;",n="style='"+j+"border:5px solid #000;padding:0;'",p="<div "+n+"><div></div></div>"+"<table "+n+" cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>";m=c.getElementsByTagName("body")[0];!m||(a=c.createElement("div"),a.style.cssText=l+"width:0;height:0;position:static;top:0;margin-top:"+i+"px",m.insertBefore(a,m.firstChild),o=c.createElement("div"),o.style.cssText=j+l,o.innerHTML=p,a.appendChild(o),b=o.firstChild,d=b.firstChild,g=b.nextSibling.firstChild.firstChild,h={doesNotAddBorder:d.offsetTop!==5,doesAddBorderForTableAndCells:g.offsetTop===5},d.style.position="fixed",d.style.top="20px",h.fixedPosition=d.offsetTop===20||d.offsetTop===15,d.style.position=d.style.top="",b.style.overflow="hidden",b.style.position="relative",h.subtractsBorderForOverflowNotVisible=d.offsetTop===-5,h.doesNotIncludeMarginInBodyOffset=m.offsetTop!==i,m.removeChild(a),o=a=null,f.extend(k,h))}),o.innerHTML="",n.removeChild(o),o=l=g=h=m=j=a=i=null;return k}(),f.boxModel=f.support.boxModel;var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[f.expando]:a[f.expando]&&f.expando,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[f.expando]=n=++f.uuid:n=f.expando),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[f.expando]:f.expando;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)?b=b:b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" "));for(e=0,g=b.length;e<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[f.expando]:a.removeAttribute?a.removeAttribute(f.expando):a[f.expando]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d,e,g,h=null;if(typeof a=="undefined"){if(this.length){h=f.data(this[0]);if(this[0].nodeType===1&&!f._data(this[0],"parsedAttrs")){e=this[0].attributes;for(var i=0,j=e.length;i<j;i++)g=e[i].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),l(this[0],g,h[g]));f._data(this[0],"parsedAttrs",!0)}}return h}if(typeof a=="object")return this.each(function(){f.data(this,a)});d=a.split("."),d[1]=d[1]?"."+d[1]:"";if(c===b){h=this.triggerHandler("getData"+d[1]+"!",[d[0]]),h===b&&this.length&&(h=f.data(this[0],a),h=l(this[0],a,h));return h===b&&d[1]?this.data(d[0]):h}return this.each(function(){var b=f(this),e=[d[0],c];b.triggerHandler("setData"+d[1]+"!",e),f.data(this,a,c),b.triggerHandler("changeData"+d[1]+"!",e)})},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){typeof a!="string"&&(c=a,a="fx");if(c===b)return f.queue(this[0],a);return this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks("once memory"),!0))h++,l.add(m);m();return d.promise()}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(o," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];if(!arguments.length){if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}return b}e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){b=f(e).val();if(j)return b;h.push(b)}}if(j&&!h.length&&i.length)return f(i[g]).val();return h},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!a||j===3||j===8||j===2)return b;if(e&&c in f.attrFn)return f(a)[c](d);if(!("getAttribute"in a))return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return b}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g},removeAttr:function(a,b){var c,d,e,g,h=0;if(a.nodeType===1){d=(b||"").split(p),g=d.length;for(;h<g;h++)e=d[h].toLowerCase(),c=f.propFix[e]||e,f.attr(a,e,""),a.removeAttribute(v?e:c),u.test(e)&&c in a&&(a[c]=!1)}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(w&&f.nodeName(a,"button"))return w.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,g,h,i=a.nodeType;if(!a||i===3||i===8||i===2)return b;h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]);return d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},v||(y={name:!0,id:!0},w=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var z=/\.(.*)$/,A=/^(?:textarea|input|select)$/i,B=/\./g,C=/ /g,D=/[^\w\s.|`]/g,E=/^([^\.]*)?(?:\.(.+))?$/,F=/\bhover(\.\S+)?/,G=/^key/,H=/^(?:mouse|contextmenu)|click/,I=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,J=function(a){var b=I.exec(a);b&&
(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},K=function(a,b){return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||a.id===b[2])&&(!b[3]||b[3].test(a.className))},L=function(a){return f.event.special.hover?a:a.replace(F,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=L(c).split(" ");for(k=0;k<c.length;k++){l=E.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.guid,selector:g,namespace:n.join(".")},p),g&&(o.quick=J(g),!o.quick&&f.expr.match.POS.test(g)&&(o.isPositional=!0)),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null}},global:{},remove:function(a,b,c,d){var e=f.hasData(a)&&f._data(a),g,h,i,j,k,l,m,n,o,p,q;if(!!e&&!!(m=e.events)){b=L(b||"").split(" ");for(g=0;g<b.length;g++){h=E.exec(b[g])||[],i=h[1],j=h[2];if(!i){j=j?"."+j:"";for(l in m)f.event.remove(a,l+j,c,d);return}n=f.event.special[i]||{},i=(d?n.delegateType:n.bindType)||i,p=m[i]||[],k=p.length,j=j?new RegExp("(^|\\.)"+j.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;if(c||j||d||n.remove)for(l=0;l<p.length;l++){q=p[l];if(!c||c.guid===q.guid)if(!j||j.test(q.namespace))if(!d||d===q.selector||d==="**"&&q.selector)p.splice(l--,1),q.selector&&p.delegateCount--,n.remove&&n.remove.call(a,q)}else p.length=0;p.length===0&&k!==p.length&&((!n.teardown||n.teardown.call(a,j)===!1)&&f.removeEvent(a,i,e.handle),delete m[i])}f.isEmptyObject(m)&&(o=e.handle,o&&(o.elem=null),f.removeData(a,["events","handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;h.indexOf("!")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"",(g||!e)&&c.preventDefault();if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,n=null;for(m=e.parentNode;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l<r.length;l++){m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d);if(c.isPropagationStopped())break}c.type=h,c.isDefaultPrevented()||(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n));return c.result}},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.namespace,i=(f.event.special[c.type]||{}).handle,j=[],k,l,m,n,o,p,q,r,s,t,u;g[0]=c,c.delegateTarget=this;if(e&&!c.target.disabled&&(!c.button||c.type!=="click"))for(m=c.target;m!=this;m=m.parentNode||this){o={},q=[];for(k=0;k<e;k++)r=d[k],s=r.selector,t=o[s],r.isPositional?t=(t||(o[s]=f(s))).index(m)>=0:t===b&&(t=o[s]=r.quick?K(m,r.quick):f(m).is(s)),t&&q.push(r);q.length&&j.push({elem:m,matches:q})}d.length>e&&j.push({elem:this,matches:d.slice(e)});for(k=0;k<j.length&&!c.isPropagationStopped();k++){p=j[k],c.currentTarget=p.elem;for(l=0;l<p.matches.length&&!c.isImmediatePropagationStopped();l++){r=p.matches[l];if(h||!c.namespace&&!r.namespace||c.namespace_re&&c.namespace_re.test(r.namespace))c.data=r.data,c.handleObj=r,n=(i||r.handler).apply(p.elem,g),n!==b&&(c.result=n,n===!1&&(c.preventDefault(),c.stopPropagation()))}}return c.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode);return a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement wheelDelta".split(" "),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0);return a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.props?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey);return h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},focus:{delegateType:"focusin",noBubble:!0},blur:{delegateType:"focusout",noBubble:!0},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!(this instanceof f.Event))return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?N:M):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=N;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=N;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=N,this.stopPropagation()},isDefaultPrevented:M,isPropagationStopped:M,isImmediatePropagationStopped:M},f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]=f.event.special[b]={delegateType:b,bindType:b,handle:function(a){var b=this,c=a.relatedTarget,d=a.handleObj,e=d.selector,g,h;if(!c||d.origType===a.type||c!==b&&!f.contains(b,c))g=a.type,a.type=d.origType,h=d.handler.apply(this,arguments),a.type=g;return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){this.parentNode&&f.event.simulate("submit",this.parentNode,a,!0)}),d._submit_attached=!0)})},teardown:function(){if(f.nodeName(this,"form"))return!1;f.event.remove(this,"._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(A.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),f.event.add(this,"click._change",function(a){this._just_changed&&(this._just_changed=!1,f.event.simulate("change",this,a,!0))});return!1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;A.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&f.event.simulate("change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){f.event.remove(this,"._change");return A.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=M;else if(!e)return this;g===1&&(h=e,e=function(a){f().off(a);return h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++));return this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on.call(this,a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;f(a.delegateTarget).off(e.namespace?e.type+"."+e.namespace:e.type,e.selector,e.handler);return this}if(typeof a=="object"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c=="function")d=c,c=b;d===!1&&(d=M);return this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){f(this.context).on(a,this.selector,b,c);return this},die:function(a,b){f(this.context).off(a,this.selector||"**",b);return this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.bind(b,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),G.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),H.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;break}}else if(m.filter(b,[j]).length>0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e<f;e++){h=o.order[e];if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c);if(d!=null){a=a.replace(o.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);while(a&&c.length){for(h in o.filter)if((f=o.leftMatch[h].exec(a))!=null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);if(l.substr(l.length-1)==="\\")continue;s===r&&(r=[]);if(o.preFilter[h]){f=o.preFilter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(n=0;(j=s[n])!=null;n++)j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(o.match[h],"");if(!g)return[];break}}if(a===q)if(g==null)m.error(a);else break;q=a}return s},m.error=function(a){throw"Syntax error, unrecognized expression: "+a};var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(k,"");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=n(c));return e},o=m.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!l.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&m.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&m.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(j,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}m.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only":case"first":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first")return!0;l=a;case"last":while(l=l.nextSibling)if(l.nodeType===1)return!1;return!0;case"nth":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}j=a.nodeIndex-e;return c===0?j===0:j%c===0&&j/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){if(a===b){h=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b){h=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h<i;h++)m(a,g[h],e,c);return m.filter(f,e)};m.attr=f.attr,m.selectors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[":"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains}();var O=/Until$/,P=/^(?:parents|prevUntil|prevAll)/,Q=/,/,R=/^.[^:#\[\.,]*$/,S=Array.prototype.slice,T=f.expr.match.POS,U={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(W(this,a,!1),"not",a)},filter:function(a){return this.pushStack(W(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?T.test(a)?f(a,this.context).index(this[0])>=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}return c}var i=T.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(V(c[0])||V(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c),g=S.call(arguments);O.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!U[a]?f.unique(e):e,(this.length>1||Q.test(d))&&P.test(a)&&(e=e.reverse());return this.pushStack(e,a,g.join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var Y="abbr article aside audio canvas datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",Z=/ jQuery\d+="(?:\d+|null)"/g,$=/^\s+/,_=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,ba=/<([\w:]+)/,bb=/<tbody/i,bc=/<|&#?\w+;/,bd=/<(?:script|style)/i,be=/<(?:script|object|embed|option|style)/i,bf=new RegExp("<(?:"+Y.replace(" ","|")+")","i"),bg=/checked\s*(?:[^=]|=\s*.checked.)/i,bh=/\/(java|ecma)script/i,bi=/^\s*<!(?:\[CDATA\[|\-\-)/,bj={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bk=X(c);bj.optgroup=bj.option,bj.tbody=bj.tfoot=bj.colgroup=bj.caption=bj.thead,bj.th=bj.td,f.support.htmlSerialize||(bj._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){f(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after"
,arguments);a.push.apply(a,f(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Z,""):null;if(typeof a=="string"&&!bd.test(a)&&(f.support.leadingWhitespace||!$.test(a))&&!bj[(ba.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(_,"<$1></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bg.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bl(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,br)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!be.test(j)&&(f.support.checkClone||!bg.test(j))&&!f.support.unknownElems&&bf.test(j)&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bn(a,d),e=bo(a),g=bo(d);for(h=0;e[h];++h)g[h]&&bn(e[h],g[h])}if(b){bm(a,d);if(c){e=bo(a),g=bo(d);for(h=0;e[h];++h)bm(e[h],g[h])}}e=g=null;return d},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!bc.test(k))k=b.createTextNode(k);else{k=k.replace(_,"<$1></$2>");var l=(ba.exec(k)||["",""])[1].toLowerCase(),m=bj[l]||bj._default,n=m[0],o=b.createElement("div");b===c?bk.appendChild(o):X(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=bb.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]==="<table>"&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&$.test(k)&&o.insertBefore(b.createTextNode($.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i<r;i++)bq(k[i]);else bq(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||bh.test(a.type)};for(j=0;h[j];j++)if(e&&f.nodeName(h[j],"script")&&(!h[j].type||h[j].type.toLowerCase()==="text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]);else{if(h[j].nodeType===1){var s=f.grep(h[j].getElementsByTagName("script"),g);h.splice.apply(h,[j+1,0].concat(s))}d.appendChild(h[j])}}return h},cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bs=/alpha\([^)]*\)/i,bt=/opacity=([^)]*)/,bu=/([A-Z]|^ms)/g,bv=/^-?\d+(?:px)?$/i,bw=/^-?\d/,bx=/^([\-+])=([\-+.\de]+)/,by={position:"absolute",visibility:"hidden",display:"block"},bz=["Left","Right"],bA=["Top","Bottom"],bB,bC,bD;f.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bB(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bx.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bB)return bB(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c){if(a.offsetWidth!==0)return bE(a,b,d);f.swap(a,by,function(){e=bE(a,b,d)});return e}},set:function(a,b){if(!bv.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bt.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bs,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bs.test(g)?g.replace(bs,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bB(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bC=function(a,c){var d,e,g;c=c.replace(bu,"-$1").toLowerCase();if(!(e=a.ownerDocument.defaultView))return b;if(g=e.getComputedStyle(a,null))d=g.getPropertyValue(c),d===""&&!f.contains(a.ownerDocument.documentElement,a)&&(d=f.style(a,c));return d}),c.documentElement.currentStyle&&(bD=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bv.test(f)&&bw.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bB=bC||bD,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bF=/%20/g,bG=/\[\]$/,bH=/\r?\n/g,bI=/#.*$/,bJ=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bK=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bL=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bM=/^(?:GET|HEAD)$/,bN=/^\/\//,bO=/\?/,bP=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bQ=/^(?:select|textarea)/i,bR=/\s+/,bS=/([?&])_=[^&]*/,bT=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bU=f.fn.load,bV={},bW={},bX,bY,bZ=["*/"]+["*"];try{bX=e.href}catch(b$){bX=c.createElement("a"),bX.href="",bX=bX.href}bY=bT.exec(bX.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bU)return bU.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bP,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bQ.test(this.nodeName)||bK.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bH,"\r\n")}}):{name:b.name,value:c.replace(bH,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.bind(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?cb(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),cb(a,b);return a},ajaxSettings:{url:bX,isLocal:bL.test(bY[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bZ},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:b_(bV),ajaxTransport:b_(bW),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cd(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=ce(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bJ.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bI,"").replace(bN,bY[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bR),d.crossDomain==null&&(r=bT.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bY[1]&&r[2]==bY[2]&&(r[3]||(r[1]==="http:"?80:443))==(bY[3]||(bY[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),ca(bV,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bM.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bO.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bS,"$1_="+x);d.url=y+(y===d.url?(bO.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bZ+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=ca(bW,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){s<2?w(-1,z):f.error(z)}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)cc(g,a[g],c,e);return d.join("&").replace(bF,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cf=f.now(),cg=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cf++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cg.test(b.url)||e&&cg.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(cg,l),b.url===j&&(e&&(k=k.replace(cg,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ch=a.ActiveXObject?function(){for(var a in cj)cj[a](0,1)}:!1,ci=0,cj;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ck()||cl()}:ck,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,ch&&delete cj[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++ci,ch&&(cj||(cj={},f(a).unload(ch)),cj[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cm={},cn,co,cp=/^(?:toggle|show|hide)$/,cq=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cr,cs=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],ct;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cw("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",cx(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cw("hide",3),a,b,c);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e));for(g=0;g<h;g++)this[g].style&&(this[g].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cw("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]),h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cx(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cp.test(h)?(o=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),o?(f._data(this,"toggle"+i,o==="show"?"hide":"show"),j[o]()):j[h]()):(k=cq.exec(h),l=j.cur(),k?(m=parseFloat(k[2]),n=k[3]||(f.cssNumber[i]?"":"px"),n!=="px"&&(f.style(this,i,(m||1)+n),l=(m||1)/j.cur()*l,f.style(this,i,l+n)),k[1]&&(m=(k[1]==="-="?-1:1)*m+l),j.custom(l,m,n)):j.custom(l,h,""));return!0}var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return e.queue===!1?this.each(g):this.queue(e.queue,g)},stop:function(a,c,d){typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]);return this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b);else g[b=a+".run"]&&g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:cw("show",1),slideUp:cw("hide",1),slideToggle:cw("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,c,d){function h(a){return e.step(a)}var e=this,g=f.fx;this.startTime=ct||cu(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){e.options.hide&&f._data(e.elem,"fxshow"+e.prop)===b&&f._data(e.elem,"fxshow"+e.prop,e.start)},h()&&f.timers.push(h)&&!cr&&(cr=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custom(this.cur(),a):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f._data(this.elem,"fxshow"+this.prop)||f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b,c,d,e=ct||cu(),g=!0,h=this.elem,i=this.options;if(a||e>=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||f.fx.stop()},interval:13,stop:function(){clearInterval(cr),cr=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=a.now+a.unit:a.elem[a.prop]=a.now}}}),f.each(["width","height"],function(a,b){f.fx.step[b]=function(a){f.style(a.elem,b,Math.max(0,a.now))}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cy=/^t(?:able|d|h)$/i,cz=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cA(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.support.fixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.support.doesNotAddBorder&&(!f.support.doesAddBorderForTableAndCells||!cy.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.support.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;f.support.fixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},f.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cz.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cz.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cA(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cA(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window);﻿/******************************************************************************
* All source and examples in this project are subject to the
* following copyright, unless specifically stated otherwise
* in the file itself:
*
* Copyright (c) 2007-2009, Metaweb Technologies, Inc.
* All rights reserved.
* 
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*     * Redistributions of source code must retain the above copyright
*       notice, this list of conditions and the following disclaimer.
*     * Redistributions in binary form must reproduce the above
*       copyright notice, this list of conditions and the following
*       disclaimer in the documentation and/or other materials provided
*       with the distribution.
* 
* THIS SOFTWARE IS PROVIDED BY METAWEB TECHNOLOGIES ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL METAWEB TECHNOLOGIES BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/


(function ($, undefined) {

    if (!("console" in window)) {
        var c = window.console = {};
        c.log = c.warn = c.error = c.debug = function () { };
    }

    $.suggest = function (name, prototype) {

        $.fn[name] = function (options) {
            if (!this.length) {
                console.warn('Suggest: invoked on empty element set');
            }
            return this
                 .each(function () {
                     if (this.nodeName) {
                         if (this.nodeName.toUpperCase() === 'INPUT') {
                             if (this.type &&
                                       this.type.toUpperCase() !== 'TEXT') {
                                 console.warn('Suggest: unsupported INPUT type: ' + this.type);
                             }
                         }
                         else {
                             console.warn('Suggest: unsupported DOM element: ' + this.nodeName);
                         }
                     }
                     var instance = $.data(this, name);
                     if (instance) {
                         instance._destroy();
                     }
                     $.data(this, name,
                                  new $.suggest[name](this, options))._init();
                 });
        };


        $.suggest[name] = function (input, options) {

            var self = this,
             o = this.options = $.extend(true, {},
                                         $.suggest.defaults,
                                         $.suggest[name].defaults,
                                         options),
             p = o.css_prefix = o.css_prefix || "",
             css = o.css;

            this.name = name;

            $.each(css, function (k, v) {
                css[k] = p + css[k];
            });

            // suggest parameters
            o.ac_param = {};
            $.each(["type", "type_strict", "mql_filter",
                     "as_of_time", "exclude_guids", "category", "all_types"],
                    function (i, n) {
                        var v = o[n];
                        if (v === null || v === "") {
                            return;
                        }
                        if (typeof v === "object") {
                            v = JSON.stringify(v);
                        }
                        o.ac_param[n] = v;
                    });
            if (o.ac_param.type) {
                this.options._type = $.map(o.ac_param.type.split(/[, ]/),
                                            function (n, i) {
                                                return n.replace(/[\"\[\]]/g, "");
                                            });
            };

            // status texts
            this._status = {
                START: "",
                LOADING: "",
                SELECT: "",
                ERROR: ""
            };
            if (o.status && o.status instanceof Array && o.status.length >= 3) {
                this._status.START = o.status[0] || "";
                this._status.LOADING = o.status[1] || "";
                this._status.SELECT = o.status[2] || "";
                if (o.status.length === 4) {
                    this._status.ERROR = o.status[3] || "";
                }
            }

            // create the container for the drop down list
            var s = this.status = $('<div style="display:none;">')
                 .addClass(css.status),
             l = this.list = $("<ul>").addClass(css.list),
             p = this.pane = $('<div style="display:none;" class="fbs-reset">')
                 .addClass(css.pane);

            p.append(s).append(l);

            if (o.parent) {
                $(o.parent).append(p);
            }
            else {
                p.css("position", "absolute");
                if (o.zIndex) {
                    p.css("z-index", o.zIndex);
                }
                $(document.body).append(p);
            }
            p.bind("mousedown", function (e) {
                //console.log("pane mousedown");
                self.input.data("dont_hide", true);
                e.stopPropagation();
            })
                 .bind("mouseup", function (e) {
                     //console.log("pane mouseup");
                     if (self.input.data("dont_hide")) {
                         self.input.focus();
                     }
                     self.input.removeData("dont_hide");
                     e.stopPropagation();
                 })
                 .bind("click", function (e) {
                     //console.log("pane click");
                     e.stopPropagation();
                     var s = self.get_selected();
                     if (s) {
                         self.onselect(s, true);
                         self.hide_all();
                     }
                 });

            var hoverover = function (e) {
                self.hoverover_list(e);
            };
            var hoverout = function (e) {
                self.hoverout_list(e);
            };
            l.hover(hoverover, hoverout);


            //console.log(this.pane, this.list);

            this.input = $(input)
                 .attr("autocomplete", "off")
                 .unbind(".suggest")
                 .bind("keydown.suggest", function (e) {
                     self.keydown(e);
                 })
                 .bind("keypress.suggest", function (e) {
                     self.keypress(e);
                 })
                 .bind("keyup.suggest", function (e) {
                     self.keyup(e);
                 })
                 .bind("blur.suggest", function (e) {
                     self.blur(e);
                 })
                 .bind("textchange.suggest", function (e) {
                     self.textchange();
                 })
                 .bind("focus.suggest", function (e) {
                     self.focus(e);
                 })
                 .bind($.browser.msie ? "paste.suggest" : "input.suggest",
                       function (e) {
                           clearTimeout(self.paste_timeout);
                           self.paste_timeout = setTimeout(function () {
                               self.textchange();
                           }, 0);
                       });
            this.input.placeholder(); // placeholder text

            // resize handler
            this.onresize = function (e) {
                self.invalidate_position();
                if (p.is(":visible")) {
                    self.position();
                    if (o.flyout && self.flyoutpane &&
                         self.flyoutpane.is(":visible")) {
                        var s = self.get_selected();
                        if (s) {
                            self.flyout_position(s);
                        }
                    }
                }
            };

            $(window)
                 .bind("resize.suggest", this.onresize)
                 .bind("scroll.suggest", this.onresize);
        };

        $.suggest[name].prototype = $.extend({}, $.suggest.prototype, prototype);
    };

    // base suggest prototype
    $.suggest.prototype = {

        _init: function () { },

        _destroy: function () {
            this.pane.remove();
            this.list.remove();
            this.input.unbind(".suggest");
            $(window).unbind("resize.suggest", this.onresize)
                 .unbind("scroll.suggest", this.onresize);
            this.input.removeData("data.suggest");
        },

        invalidate_position: function () {
            self._position = null;
        },

        status_start: function () {
            this.hide_all();
            this.status.siblings().hide();
            if (this._status.START) {
                this.status.text(this._status.START).show();
                if (!this.pane.is(":visible")) {
                    this.position();
                    this.pane_show();
                }
            }
            if (this._status.LOADING) {
                this.status.removeClass("loading");
            }
        },

        status_loading: function () {
            this.status.siblings().show();

            if (this._status.LOADING) {
                this.status.addClass("loading")
                     .text(this._status.LOADING).show();
                if (!this.pane.is(":visible")) {
                    this.position();
                    this.pane_show();
                }
            }
            else {
                this.status.hide();
            }
        },

        status_select: function () {
            this.status.siblings().show();
            if (this._status.SELECT) {
                this.status.text(this._status.SELECT).show();
            }
            else {
                this.status.hide();
            }
            if (this._status.LOADING) {
                this.status.removeClass("loading");
            }
        },

        status_error: function () {
            this.status.siblings().show();
            if (this._status.ERROR) {
                this.status.text(this._status.ERROR).show();
            }
            else {
                this.status.hide();
            }
            if (this._status.LOADING) {
                this.status.removeClass("loading");
            }
        },

        focus: function (e) {
            //console.log("focus", this.input.val() === "");
            var o = this.options,
             v = this.input.val();
            if (v === "" || v === this.input.attr("placeholder")) {
                this.status_start();
            }
            else {
                this.focus_hook(e);
            }
        },

        // override to be notified on focus and input has a value
        focus_hook: function (e) {
            //console.log("focus_hook", this.input.data("data.suggest"));
            if (!this.input.data("data.suggest") &&
                 !this.pane.is(":visible") &&
                 $("." + this.options.css.item, this.list).length) {
                this.position();
                this.pane_show();
            }
        },

        keydown: function (e) {
            var key = e.keyCode;
            if (key === 9) { // tab
                this.tab(e);
            }
            else if (key === 38 || key === 40) { // up/down
                if (!e.shiftKey) {
                    // prevents cursor/caret from moving (in Safari)
                    e.preventDefault();
                }
            }
        },

        keypress: function (e) {
            var key = e.keyCode;
            if (key === 38 || key === 40) { // up/down
                if (!e.shiftKey) {
                    // prevents cursor/caret from moving
                    e.preventDefault();
                }
            }
            else if (key === 13) { // enter
                this.enter(e);
            }
        },

        keyup: function (e) {
            var key = e.keyCode;
            //console.log("keyup", key);
            if (key === 38) { // up
                e.preventDefault();
                this.up(e);
            }
            else if (key === 40) { // down
                e.preventDefault();
                this.down(e);
            }
            else if (e.ctrlKey && key === 77) {
                $(".fbs-more-link", this.pane).click();
            }

            else if ($.suggest.is_char(e)) {
                //this.textchange();
                clearTimeout(this.keypress.timeout);
                var self = this;
                this.keypress.timeout = setTimeout(function () {
                    self.textchange();
                }, 0);
            }
            else if (key === 27) {
                // escape - WebKit doesn't fire keypress for escape
                this.escape(e);
            }

            return true;
        },

        blur: function (e) {
            //console.log("blur", "dont_hide", this.input.data("dont_hide"),
            //            "data.suggest", this.input.data("data.suggest"));
            if (this.input.data("dont_hide")) {
                return;
            }
            var data = this.input.data("data.suggest");
            if (!data) {
                this.check_required(e);
            }
            this.hide_all();
        },

        tab: function (e) {
            if (e.shiftKey || e.metaKey || e.ctrlKey) {
                return;
            }

            var o = this.options,
             visible = this.pane.is(":visible") &&
                 $("." + o.css.item, this.list).length,
             s = this.get_selected();

            //console.log("tab", visible, s);

            if (visible && s) {
                this.onselect(s);
                this.hide_all();
            }
        },

        enter: function (e) {
            var o = this.options,
             visible = this.pane.is(":visible");

            //console.log("enter", visible);

            if (visible) {
                if (e.shiftKey) {
                    this.shift_enter(e);
                    e.preventDefault();
                }
                else if ($("." + o.css.item, this.list).length) {
                    var s = this.get_selected();
                    if (s) {
                        this.onselect(s);
                        this.hide_all();
                        e.preventDefault();
                    }
                    else {
                        var data = this.input.data("data.suggest");
                        if (o.soft) {
                            if (!data) {
                                this.check_required(e);
                            }
                        }
                        else {
                            if ($("." + this.options.css.item + ":visible",
                                   this.list).length) {
                                this.updown(false);
                                e.preventDefault();
                            }
                            else if (!data) {
                                this.check_required(e);
                            }
                        }
                    }
                }
                //console.log("enter preventDefault");
            }
        },

        shift_enter: function (e) { },

        escape: function (e) {
            this.hide_all();
        },

        up: function (e) {
            //console.log("up");
            this.updown(true, e.ctrlKey || e.shiftKey);
        },

        down: function (e) {
            //console.log("up");
            this.updown(false, null, e.ctrlKey || e.shiftKey);
        },

        updown: function (goup, gofirst, golast) {
            //console.log("updown", goup, gofirst, golast);
            var o = this.options,
             css = o.css,
             p = this.pane,
             l = this.list;

            if (!p.is(":visible")) {
                if (!goup) {
                    this.textchange();
                }
                return;
            }
            var li = $("." + css.item + ":visible", l);

            if (!li.length) {
                return;
            }

            var first = $(li[0]),
             last = $(li[li.length - 1]),
             cur = this.get_selected() || [];

            clearTimeout(this.ignore_mouseover.timeout);
            this._ignore_mouseover = false;

            if (goup) {//up
                if (gofirst) {
                    this._goto(first);
                }
                else if (!cur.length) {
                    this._goto(last);
                }
                else if (cur[0] == first[0]) {
                    first.removeClass(css.selected);
                    this.input.val(this.input.data("original.suggest"));
                    this.hoverout_list();
                }
                else {
                    var prev = cur.prevAll("." + css.item + ":visible:first");
                    this._goto(prev);
                }
            }
            else {//down
                if (golast) {
                    this._goto(last);
                }
                else if (!cur.length) {
                    this._goto(first);
                }
                else if (cur[0] == last[0]) {
                    last.removeClass(css.selected);
                    this.input.val(this.input.data("original.suggest"));
                    this.hoverout_list();
                }
                else {
                    var next = cur.nextAll("." + css.item + ":visible:first");
                    this._goto(next);
                }
            }
        },

        _goto: function (li) {
            li.trigger("mouseover.suggest");
            var d = li.data("data.suggest");
            this.input.val(d ? d.name : this.input.data("original.suggest"));
            this.scroll_to(li);
        },

        scroll_to: function (item) {
            var l = this.list,
             scrollTop = l.scrollTop(),
             scrollBottom = scrollTop + l.innerHeight(),
             item_height = item.outerHeight(),
             offsetTop = item.prevAll().length * item_height,
             offsetBottom = offsetTop + item_height;
            if (offsetTop < scrollTop) {
                this.ignore_mouseover();
                l.scrollTop(offsetTop);
            }
            else if (offsetBottom > scrollBottom) {
                this.ignore_mouseover();
                l.scrollTop(scrollTop + offsetBottom - scrollBottom);
            }
        },

        textchange: function () {
            this.input.removeData("data.suggest");
            this.input.trigger("fb-textchange", this);
            var v = this.input.val();
            if (v === "") {
                this.status_start();
                return;
            }
            else {
                this.status_loading();
            }
            this.request(v);
        },

        request: function () { },

        response: function (data) {
            if (!data) {
                return;
            }
            if ("cost" in data) {
                this.trackEvent(this.name, "response", "cost", data.cost);
            }

            if (!this.check_response(data)) {
                return;
            }
            var result = [];

            if ($.isArray(data)) {
                result = data;
            }
            else if ("result" in data) {
                result = data.result;
            }

            var args = $.map(arguments, function (a) {
                return a;
            });

            this.response_hook.apply(this, args);

            var first = null,
             self = this,
             o = this.options;

            $.each(result, function (i, n) {
                var li = self.create_item(n, data)
                            .bind("mouseover.suggest", function (e) {
                                self.mouseover_item(e);
                            })
                            .data("data.suggest", n);
                self.list.append(li);
                if (i === 0) {
                    first = li;
                }
            });

            this.input.data("original.suggest", this.input.val());


            if ($("." + o.css.item, this.list).length === 0 && o.nomatch) {
                var $nomatch = $('<li class="fbs-nomatch">').html(o.nomatch)
                     .bind("click.suggest", function (e) {
                         e.stopPropagation();
                         //                    self.input.focus();
                     });
                this.list.append($nomatch);
            }

            args.push(first);
            this.show_hook.apply(this, args);
            this.position();
            this.pane_show();
        },

        pane_show: function () {
            var show = false;
            if ($("> li", this.list).length) {
                show = true;
            }
            if (!show) {
                this.pane.children(":not(." + this.options.css.list + ")")
                     .each(function () {
                         if ($(this).css("display") != "none") {
                             show = true;
                             return false;
                         }
                     });
            }
            if (show) {
                if (this.options.animate) {
                    var self = this;
                    this.pane.slideDown("fast", function () {
                        self.input.
                                                 trigger("fb-pane-show", self);
                    });
                }
                else {
                    this.pane.show();
                    this.input.trigger("fb-pane-show", this);
                }

            }
            else {
                this.pane.hide();
                this.input.trigger("fb-pane-hide", this);
            }
        },

        create_item: function (data, response_data) {
            var css = this.options.css;
            li = $("<li>").addClass(css.item);
            var label = $("<label>").text(data.name);
            data.name = label.text();
            li.append($("<div>").addClass(css.item_name).append(label));
            return li;
        },

        mouseover_item: function (e) {
            if (this._ignore_mouseover) {
                return;
            }
            var target = e.target;
            if (target.nodeName.toLowerCase() !== "li") {
                target = $(target).parents("li:first");
            }
            var li = $(target),
             css = this.options.css,
             l = this.list;
            $("." + css.item, l)
                 .each(function () {
                     if (this !== li[0]) {
                         $(this).removeClass(css.selected);
                     }
                 });
            if (!li.hasClass(css.selected)) {
                li.addClass(css.selected);
                this.mouseover_item_hook(li);
            }
        },

        mouseover_item_hook: function ($li) { },

        hoverover_list: function (e) { },

        hoverout_list: function (e) { },

        check_response: function (response_data) {
            return true;
        },

        response_hook: function (response_data) {
            //this.pane.hide();
            this.list.empty();
        },

        show_hook: function (response_data) {
            // remove anything next to list - added by other suggest plugins
            this.status_select();
        },

        position: function () {
            var p = this.pane,
             o = this.options;

            if (o.parent) {
                return;
            }

            if (!self._position) {
                var inp = this.input,
                 pos = inp.offset(),
                 input_width = inp.outerWidth(true),
                 input_height = inp.outerHeight(true);
                pos.top += input_height;

                // show to calc dimensions
                var pane_width = p.outerWidth(),
                 pane_height = p.outerHeight(),
                 pane_right = pos.left + pane_width,
                 pane_bottom = pos.top + pane_height,
                 pane_half = pos.top + pane_height / 2,
                 scroll_left = $(window).scrollLeft(),
                 scroll_top = $(window).scrollTop(),
                 window_width = $(window).width(),
                 window_height = $(window).height(),
                 window_right = window_width + scroll_left,
                 window_bottom = window_height + scroll_top;


                // is input left or right side of window?
                var left = true;
                if ('left' == o.align) {
                    left = true;
                }
                else if ('right' == o.align) {
                    left = false;
                }
                else if (pos.left > (scroll_left + window_width / 2)) {
                    left = false;
                }
                if (!left) {
                    left = pos.left - (pane_width - input_width);
                    if (left > scroll_left) {
                        pos.left = left;
                    }
                }

                if (pane_half > window_bottom) {
                    // can we see at least half of the list?
                    var top = pos.top - input_height - pane_height;
                    if (top > scroll_top) {
                        pos.top = top;
                    }
                }
                this._position = pos;
            }
            p.css({ top: this._position.top, left: this._position.left });
        },

        ignore_mouseover: function (e) {
            this._ignore_mouseover = true;
            var self = this;
            this.ignore_mouseover.timeout =
                 setTimeout(function () {
                     self.ignore_mouseover_reset();
                 }, 1000);
        },

        ignore_mouseover_reset: function () {
            this._ignore_mouseover = false;
        },

        get_selected: function () {
            var selected = null,
             select_class = this.options.css.selected;
            $("li", this.list)
                 .each(function () {
                     var $this = $(this);
                     if ($this.hasClass(select_class) &&
                               $this.is(":visible")) {
                         selected = $this;
                         return false;
                     }
                 });
            return selected;
        },

        onselect: function ($selected, focus) {
            var data = $selected.data("data.suggest");
            if (data) {
                this.input.val(data.name)
                     .data("data.suggest", data)
                     .trigger("fb-select", data);

                this.trackEvent(this.name, "fb-select", "index",
                                 $selected.prevAll().length);
            }
            /*
            else {
            //this.check_required();
            }
            if (focus) {
            //          this.input.focus();
            }
            */
        },

        trackEvent: function (category, action, label, value) {
            this.input.trigger("fb-track-event", {
                category: category,
                action: action,
                label: label,
                value: value
            });
            //console.log("trackEvent", category, action, label, value);
        },

        check_required: function (e) {
            var required = this.options.required;
            if (required === true) {
                var v = this.input.val();
                if (!(v === "" || v === this.input.attr("placeholder"))) {
                    this.input.trigger("fb-required", { domEvent: e });
                    return false;
                }
            }
            else if (required === "always") {
                this.input.trigger("fb-required", { domEvent: e });
                return false;
            }
            return true;
        },

        hide_all: function (e) {
            this.pane.hide();
            this.input.trigger("fb-pane-hide", this);
        }

    };


    $.extend($.suggest, {

        defaults: {

            status: ['Empiece escribiendo la palabra ...',
                               'Buscando...',
                               'Seleccione un item de la lista:',
                               'Lo siento, algo ha ocurrido. Inténtelo mas tarde.'],

            required: false,

            soft: false,

            nomatch: "no matches",

            // CSS default class names
            css: {
                pane: "fbs-pane",
                list: "fbs-list",
                item: "fbs-item",
                item_name: "fbs-item-name",
                selected: "fbs-selected",
                status: "fbs-status"
            },

            css_prefix: null,

            parent: null,

            // option to animate suggest list when shown
            animate: false,

            zIndex: null
        },

        $$: function (cls, ctx) {
            /**
            * helper for class selector
            */
            return $("." + cls, ctx);
        },

        use_jsonp: function (service_url) {
            /*
            * if we're on the same host,
            * then we don't need to use jsonp.
            * This greatly increases our cachability
            */
            if (!service_url) {
                return false; // no host == same host == no jsonp
            }

            var pathname_len = window.location.pathname.length;
            var hostname = window.location.href;
            hostname = hostname.substr(0, hostname.length -
                                                 pathname_len);
            //console.log("Hostname = ", hostname);
            if (hostname === service_url) {
                return false;
            }
            return true;
        },

        strongify: function (str, substr) {
            // safely markup substr within str with <strong>
            var strong = str;
            var index = str.toLowerCase().indexOf(substr.toLowerCase());
            if (index >= 0) {
                var substr_len = substr.length;
                strong = $("<div>").text(str.substring(0, index))
                              .append($("<strong>").text(str.substring(index, index + substr_len)))
                              .append(document.createTextNode(str.substring(index + substr_len)))
                              .html();
            }
            return strong;
        },

        keyCode: {
            //BACKSPACE: 8,
            CAPS_LOCK: 20,
            //COMMA: 188,
            CONTROL: 17,
            //DELETE: 46,
            DOWN: 40,
            END: 35,
            ENTER: 13,
            ESCAPE: 27,
            HOME: 36,
            INSERT: 45,
            LEFT: 37,
            //NUMPAD_ADD: 107,
            //NUMPAD_DECIMAL: 110,
            //NUMPAD_DIVIDE: 111,
            NUMPAD_ENTER: 108,
            //NUMPAD_MULTIPLY: 106,
            //NUMPAD_SUBTRACT: 109,
            PAGE_DOWN: 34,
            PAGE_UP: 33,
            //PERIOD: 190,
            RIGHT: 39,
            SHIFT: 16,
            SPACE: 32,
            TAB: 9,
            UP: 38,
            OPTION: 18,
            APPLE: 224
        },

        is_char: function (e) {
            if (e.type === "keypress") {
                if ((e.metaKey || e.ctrlKey) && e.charCode === 118) {
                    // ctrl+v
                    return true;
                }
                else if ("isChar" in e) {
                    return e.isChar;
                }
            }
            else {
                var not_char = $.suggest.keyCode.not_char;
                if (!not_char) {
                    not_char = {};
                    $.each($.suggest.keyCode, function (k, v) {
                        not_char['' + v] = 1;
                    });
                    $.suggest.keyCode.not_char = not_char;
                }
                return !(('' + e.keyCode) in not_char);
            }
        }
    });


    // some base implementation that we overwrite but want to call
    var base = {
        _destroy: $.suggest.prototype._destroy,
        show_hook: $.suggest.prototype.show_hook
    };


    // *THE* Freebase suggest implementation
    $.suggest("suggest", {
        _init: function () {
            var self = this,
                       o = this.options;
            if (!o.flyout_service_url) {
                o.flyout_service_url = o.service_url;
            }
            this.jsonp = $.suggest.use_jsonp(o.service_url);

            if (!$.suggest.cache) {
                $.suggest.cache = {};
            }

            if (o.flyout) {
                this.flyoutpane = $('<div style="display:none;" class="fbs-reset">').addClass(o.css.flyoutpane);

                if (o.flyout_parent) {
                    $(o.flyout_parent).append(this.flyoutpane);
                }
                else {
                    this.flyoutpane.css("position", "absolute");
                    if (o.zIndex) {
                        this.flyoutpane.css("z-index", o.zIndex);
                    }
                    $(document.body).append(this.flyoutpane);
                }
                var hoverover = function (e) {
                    self.hoverover_list(e);
                };
                var hoverout = function (e) {
                    self.hoverout_list(e);
                };
                this.flyoutpane.hover(hoverover, hoverout)
                               .bind("mousedown.suggest", function (e) {
                                   e.stopPropagation();
                                   self.pane.click();
                               });

                if (!$.suggest.flyout) {
                    $.suggest.flyout = {};
                }
                if (!$.suggest.flyout.cache) {
                    $.suggest.flyout.cache = {};
                }
            }
        },

        _destroy: function () {
            base._destroy.call(this);
            if (this.flyoutpane) {
                this.flyoutpane.remove();
            }
            this.input.removeData("request.count.suggest");
            this.input.removeData("flyout.request.count.suggest");
        },

        shift_enter: function (e) {
            if (this.options.suggest_new) {
                this.suggest_new();
                this.hide_all();
            }
            else {
                this.check_required(e);
            }
        },

        hide_all: function (e) {
            this.pane.hide();
            if (this.flyoutpane) {
                this.flyoutpane.hide();
            }
            this.input.trigger("fb-pane-hide", this);
            this.input.trigger("fb-flyoutpane-hide", this);
        },

        request: function (val, start) {
            var self = this,
                       o = this.options;

            if (this.ac_xhr) {
                this.ac_xhr.abort();
                this.ac_xhr = null;
            }

            var data = {
                prefix: val
            };

            if (start) {
                data.start = start;
            }

            $.extend(data, o.ac_param);
            //Here I change the encoding of street param so every broser send it the same an the handler can decode with no problem using urlDecode
            //ADDED: The chance to add parameters related with text field (Useful on address suggest).
            if (o.fields) {
                if (o.fields.country) $.extend(data, { country: o.fields.country });
                if (o.fields.city) $.extend(data, { city: o.fields.city.val() });
                if (o.fields.street) $.extend(data, { street: encodeURI(o.fields.street.val()) });
            }

            var url = o.service_url + o.service_path + "?" + $.param(data),
                       cached = $.suggest.cache[url];
            if (cached) {
                this.response(cached, start ? start : -1, true);
                return;
            }

            clearTimeout(this.request.timeout);

            var ajax_options = {
                url: o.service_url + o.service_path,
                data: data,
                beforeSend: function () {
                    var calls =
                                   self.input.data("request.count.suggest") || 0;
                    if (!calls) {
                        self.trackEvent(self.name, "start_session");
                    }
                    calls += 1;
                    self.trackEvent(self.name, "request",
                                               "count", calls);
                    self.input.data("request.count.suggest", calls);
                },
                success: function (data) {
                    $.suggest.cache[url] = data;
                    self.response(data, start ? start : -1);
                },
                error: function (xhr) {
                    self.status_error();
                    self.trackEvent(self.name, "request", "error", {
                        url: this.url,
                        response: xhr ? xhr.responseText : ''
                    });
                    self.input.trigger("fb-error", Array.prototype.slice.call(arguments));
                },
                complete: function (xhr) {
                    if (xhr) {
                        self.trackEvent(self.name, "request", "tid",
                                                   xhr.getResponseHeader("X-Metaweb-TID"));
                    }
                },
                dataType: self.jsonp ? "jsonp" : "json",
                cache: true
            };

            this.request.timeout =
                           setTimeout(function () {
                               self.ac_xhr = $.ajax(ajax_options);
                           }, o.xhr_delay);
        },

        create_item: function (data, response_data) {
            var css = this.options.css;

            var li = $("<li>").addClass(css.item);

            var name = $("<div>").addClass(css.item_name)

                           .append($("<label>")
                           .append($.suggest.strongify(data.name || data.guid,
                                                       response_data.prefix))),
                       types = data.type;
            // this converts html escaped strings like "&amp;"
            // back to "&"
            data.name = name.text();
            li.append(name);

            var nt = data['n:type'] || data['notable:type'];
            if (nt) {
                if (typeof nt === 'object') {
                    // as of client/dev/108 n:type
                    // (previously notable:type) is an object
                    // and already calculated
                    name.prepend($("<div>").addClass(css.item_type)
                                            .text(nt.name));
                }
                else {
                    var notable, type, is_topic = false;
                    $.each(data.type, function (i, n) {
                        if (n.id === nt) {
                            notable = n.name;
                        }
                        if (n.id === '/common/topic') {
                            is_topic = 'Topic';
                        }
                        else if (!type) {
                            type = n.name;
                        }
                    });
                    if (notable || type || is_topic) {
                        name.prepend($("<div>")
                                                .addClass(css.item_type)
                                                .text(notable || type
                                                      || is_topic));
                    }
                }

            }


            //console.log("create_item", li);
            return li;
        },


        mouseover_item_hook: function (li) {
            var data = li.data("data.suggest");
            if (this.options.flyout) {
                if (data) {
                    this.flyout_request(data);
                }
                else {
                    //this.flyoutpane.hide();
                }
            }
        },

        check_response: function (response_data) {
            return response_data.prefix === this.input.val();
        },

        response_hook: function (response_data, start) {
            if (this.flyoutpane) {
                this.flyoutpane.hide();
            }
            if (start > 0) {
                $(".fbs-more", this.pane).remove();
            }
            else {
                //this.pane.hide();
                this.list.empty();
            }
        },

        show_hook: function (response_data, start, first) {
            base.show_hook.apply(this, [response_data]);

            var o = this.options,
                       self = this,
                       p = this.pane,
                       l = this.list,
                       result = response_data.result;

            var more = $(".fbs-more", p),
                       suggestnew = $(".fbs-suggestnew", p);


            // more
            if (result && result.length && "start" in response_data) {
                if (!more.length) {
                    var more_link = $('<a class="fbs-more-link" href="#" title="(Ctrl+m)">view more</a>');
                    more = $('<div class="fbs-more">')
                                   .append(more_link);
                    more_link
                                   .bind("click.suggest", function (e) {
                                       e.preventDefault();
                                       e.stopPropagation();
                                       var m = $(this).parent(".fbs-more");
                                       self.more(m.data("start.suggest"));
                                   });
                    l.after(more);
                }
                more.data("start.suggest", response_data.start);
                more.show();
            }
            else {
                more.remove();
            }

            // suggest_new
            if (o.suggest_new) {
                if (!suggestnew.length) {
                    // create suggestnew option
                    var button = $('<button class="fbs-suggestnew-button">');
                    button.text(o.suggest_new);
                    suggestnew = $('<div class="fbs-suggestnew">')
                                   .append('<div class="fbs-suggestnew-description">Your item not in the list?</div>')
                                   .append(button)
                                   .append('<span class="fbs-suggestnew-shortcut">(Shift+Enter)</span>')
                                   .bind("click.suggest", function (e) {
                                       e.stopPropagation();
                                       self.suggest_new(e);
                                   });
                    p.append(suggestnew);
                }
                suggestnew.show();
            }
            else {
                suggestnew.remove();
            }

            // scroll to first if clicked on "more"
            if (first && first.length && start > 0) {
                var top = first.prevAll().length * first.outerHeight();
                var scrollTop = l.scrollTop();
                l.animate({ scrollTop: top }, "slow",
                                     function () { first.trigger("mouseover.suggest"); });
            }
        },

        suggest_new: function (e) {
            var v = this.input.val();
            if (v === "" || v === this.input.attr("placeholder")) {
                return;
            }
            //console.log("suggest_new", v);
            this.input
                           .data("data.suggest", v)
                           .trigger("fb-select-new", v);
            this.trackEvent(this.name, "fb-select-new", "index", "new");
            this.hide_all();
        },

        more: function (start) {
            if (start) {
                var orig = this.input.data("original.suggest");
                if (orig !== null) {
                    this.input.val(orig);
                }
                this.request(this.input.val(), start);
                this.trackEvent(this.name, "more", "start", start);
            }
            return false;
        },

        flyout_request: function (data) {
            return false;
            var self = this;
            if (this.flyout_xhr) {
                this.flyout_xhr.abort();
                this.flyout_xhr = null;
            }

            var o = this.options,
                       sug_data = this.flyoutpane.data("data.suggest");
            if (sug_data && data.id === sug_data.id) {
                if (!this.flyoutpane.is(":visible")) {
                    var s = this.get_selected();
                    this.flyout_position(s);
                    this.flyoutpane.show();
                    this.input.trigger("fb-flyoutpane-show", this);
                }
                return;
            }

            // check $.suggest.flyout.cache
            var cached = $.suggest.flyout.cache[data.id];
            if (cached) {
                this.flyout_response(cached);
                return;
            }

            //this.flyoutpane.hide();

            var submit_data = {
                id: data.id
            };
            if (o.as_of_time) {
                submit_data.as_of_time = o.as_of_time;
            }

            var ajax_options = {
                url: o.flyout_service_url + o.flyout_service_path,
                data: submit_data,
                beforeSend: function () {
                    var calls = self.input.data("flyout.request.count.suggest") || 0;
                    calls += 1;
                    self.trackEvent(self.name, "flyout.request",
                                               "count", calls);
                    self.input.data("flyout.request.count.suggest",
                                               calls);
                },
                success: function (data) {
                    data = self.jsonp ? data : {
                        id: submit_data.id,
                        html: data
                    };
                    $.suggest.flyout.cache[data.id] = data;
                    self.flyout_response(data);
                },
                error: function (xhr) {
                    self.trackEvent(self.name, "flyout", "error", {
                        url: this.url,
                        response: xhr ? xhr.responseText : ''
                    });
                },
                complete: function (xhr) {
                    if (xhr) {
                        self.trackEvent(self.name, "flyout", "tid",
                                                   xhr.getResponseHeader("X-Metaweb-TID"));
                    }
                },
                dataType: self.jsonp ? "jsonp" : "html",
                cache: true
            };

            //var self = this;
            clearTimeout(this.flyout_request.timeout);
            this.flyout_request.timeout =
                           setTimeout(function () {
                               self.flyout_xhr = $.ajax(ajax_options);
                           }, o.xhr_delay);
        },

        flyout_response: function (data) {
            var o = this.options,
                       p = this.pane,
                       s = this.get_selected() || [];
            if (p.is(":visible") && s.length) {
                var sug_data = s.data("data.suggest");
                if (sug_data && data.id === sug_data.id) {
                    this.flyoutpane.html(data.html);
                    this.flyout_position(s);
                    this.flyoutpane.show()
                                   .data("data.suggest", sug_data);
                    this.input.trigger("fb-flyoutpane-show", this);
                }
            }
        },

        flyout_position: function ($item) {
            if (this.options.flyout_parent) {
                return;
            }

            var p = this.pane,
                       fp = this.flyoutpane,
                       css = this.options.css,
                       pos = undefined,
                       old_pos = {
                           top: parseInt(fp.css("top"), 10),
                           left: parseInt(fp.css("left"), 10)
                       },
                       pane_pos = p.offset(),
                       pane_width = p.outerWidth(),
                       flyout_height = fp.outerHeight(),
                       flyout_width = fp.outerWidth();

            if (this.options.flyout === "bottom") {
                // flyout position on top/bottom
                pos = pane_pos;
                var input_pos = this.input.offset();
                if (pane_pos.top < input_pos.top) {
                    pos.top -= flyout_height;
                }
                else {
                    pos.top += p.outerHeight();
                }
                fp.addClass(css.flyoutpane + "-bottom");
            }
            else {
                pos = $item.offset();
                var item_height = $item.outerHeight();

                pos.left += pane_width;
                var flyout_right = pos.left + flyout_width,
                           scroll_left = $(document.body).scrollLeft(),
                           window_right = $(window).width() + scroll_left;

                pos.top = pos.top + item_height - flyout_height;
                if (pos.top < pane_pos.top) {
                    pos.top = pane_pos.top;
                }

                if (flyout_right > window_right) {
                    var left = pos.left - (pane_width + flyout_width);
                    if (left > scroll_left) {
                        pos.left = left;
                    }
                }
                fp.removeClass(css.flyoutpane + "-bottom");
            }

            if (!(pos.top === old_pos.top &&
                             pos.left === old_pos.left)) {
                fp.css({ top: pos.top, left: pos.left });
            }
        },

        hoverout_list: function (e) {
            if (this.flyoutpane && !this.get_selected()) {
                this.flyoutpane.hide();
            }
        }
    });

    // Freebase suggest settings
    $.extend($.suggest.suggest, {

        defaults: {

            type: null,

            type_strict: "any",

            mql_filter: null,

            as_of_time: null,

            // base url for autocomplete service
            service_url: "http://www.freebase.com",

            // service_url + service_path = url to autocomplete service
            service_path: "/private/suggest",

            // 'left', 'right' or null
            // where list will be aligned left or right with the input
            align: null,

            // whether or not to show flyout on mouseover
            flyout: true,

            // default is service_url if NULL
            flyout_service_url: null,

            // flyout_service_url + flyout_service_path =
            // url to flyout service
            flyout_service_path: "/private/flyout",

            // jQuery selector to specify where the flyout
            // will be appended to (defaults to document.body).
            flyout_parent: null,

            // text snippet you want to show for the suggest
            // new option
            // clicking will trigger an fb-select-new event
            // along with the input value
            suggest_new: null,

            nomatch: '<em class="fbs-nomatch-text">No se encontraron resultados.</em><h3>Tips para conseguir mejores resultados:</h3><ul class="fbs-search-tips"><li>Ingrese más caracteres.</li><li>Agregue palabras relacionadas a su búsqueda original.</li><li>Tratar con diferente ortografía</li><li>Verficar la ortografía.</li></ul>',

            // CSS default class names
            css: {
                item_type: "fbs-item-type",
                flyoutpane: "fbs-flyout-pane"
            },

            // the delay before sending off the ajax request to the
            // suggest and flyout service
            xhr_delay: 200,

            // return type information for each suggest item returned
            all_types: false
        }
    });


    var f = document.createElement("input");

    $.fn.placeholder = function () {
        return this
             .each(function () {
                 var $this = $(this);
                 if ($this.attr("placeholder") &&
                           !("placeholder" in f)) {
                     $this
                               .unbind(".placeholder")
                               .bind("focus.placeholder", function (e) {
                                   var self = $(this);
                                   if (self.val() ===
                                             self.attr("placeholder")) {
                                       self.val("");
                                   }
                                   else {
                                       self.select();
                                   }
                                   self.removeClass("fbs-placeholder");
                               })
                               .bind("blur.placeholder", function (e) {
                                   var self = $(this);
                                   if (self.val() === "") {
                                       self.val(self
                                                      .attr("placeholder"))
                                                 .addClass("fbs-placeholder");
                                   }
                               });

                     if ($this.val() === '') {
                         $this.val($this.attr("placeholder"))
                                   .addClass("fbs-placeholder");
                     }
                 }
             });
    };
})(jQuery);


/**
* http://www.JSON.org/json2.js
**/
if (!("JSON" in window && window.JSON)) { JSON = {} } (function () { function f(n) { return n < 10 ? "0" + n : n } if (typeof Date.prototype.toJSON !== "function") { Date.prototype.toJSON = function (key) { return this.getUTCFullYear() + "-" + f(this.getUTCMonth() + 1) + "-" + f(this.getUTCDate()) + "T" + f(this.getUTCHours()) + ":" + f(this.getUTCMinutes()) + ":" + f(this.getUTCSeconds()) + "Z" }; String.prototype.toJSON = Number.prototype.toJSON = Boolean.prototype.toJSON = function (key) { return this.valueOf() } } var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, gap, indent, meta = { "\b": "\\b", "\t": "\\t", "\n": "\\n", "\f": "\\f", "\r": "\\r", '"': '\\"', "\\": "\\\\" }, rep; function quote(string) { escapable.lastIndex = 0; return escapable.test(string) ? '"' + string.replace(escapable, function (a) { var c = meta[a]; return typeof c === "string" ? c : "\\u" + ("0000" + a.charCodeAt(0).toString(16)).slice(-4) }) + '"' : '"' + string + '"' } function str(key, holder) { var i, k, v, length, mind = gap, partial, value = holder[key]; if (value && typeof value === "object" && typeof value.toJSON === "function") { value = value.toJSON(key) } if (typeof rep === "function") { value = rep.call(holder, key, value) } switch (typeof value) { case "string": return quote(value); case "number": return isFinite(value) ? String(value) : "null"; case "boolean": case "null": return String(value); case "object": if (!value) { return "null" } gap += indent; partial = []; if (Object.prototype.toString.apply(value) === "[object Array]") { length = value.length; for (i = 0; i < length; i += 1) { partial[i] = str(i, value) || "null" } v = partial.length === 0 ? "[]" : gap ? "[\n" + gap + partial.join(",\n" + gap) + "\n" + mind + "]" : "[" + partial.join(",") + "]"; gap = mind; return v } if (rep && typeof rep === "object") { length = rep.length; for (i = 0; i < length; i += 1) { k = rep[i]; if (typeof k === "string") { v = str(k, value); if (v) { partial.push(quote(k) + (gap ? ": " : ":") + v) } } } } else { for (k in value) { if (Object.hasOwnProperty.call(value, k)) { v = str(k, value); if (v) { partial.push(quote(k) + (gap ? ": " : ":") + v) } } } } v = partial.length === 0 ? "{}" : gap ? "{\n" + gap + partial.join(",\n" + gap) + "\n" + mind + "}" : "{" + partial.join(",") + "}"; gap = mind; return v } } if (typeof JSON.stringify !== "function") { JSON.stringify = function (value, replacer, space) { var i; gap = ""; indent = ""; if (typeof space === "number") { for (i = 0; i < space; i += 1) { indent += " " } } else { if (typeof space === "string") { indent = space } } rep = replacer; if (replacer && typeof replacer !== "function" && (typeof replacer !== "object" || typeof replacer.length !== "number")) { throw new Error("JSON.stringify") } return str("", { "": value }) } } if (typeof JSON.parse !== "function") { JSON.parse = function (text, reviver) { var j; function walk(holder, key) { var k, v, value = holder[key]; if (value && typeof value === "object") { for (k in value) { if (Object.hasOwnProperty.call(value, k)) { v = walk(value, k); if (v !== undefined) { value[k] = v } else { delete value[k] } } } } return reviver.call(holder, key, value) } cx.lastIndex = 0; if (cx.test(text)) { text = text.replace(cx, function (a) { return "\\u" + ("0000" + a.charCodeAt(0).toString(16)).slice(-4) }) } if (/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, "@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]").replace(/(?:^|:|,)(?:\s*\[)+/g, ""))) { j = eval("(" + text + ")"); return typeof reviver === "function" ? walk({ "": j }, "") : j } throw new SyntaxError("JSON.parse") } } } ());


jQuery.suggest.version = 'Version:r94764M Built:Tue May 11 2010 by daepark';﻿dojo.require("dojo.io.script");

document.write("<link rel=\"Stylesheet\" href=\"http://" + _lwBaseDomainNoOverrideThis + "/autosuggest/suggest.min.css\" type=\"text/css\" media=\"screen\" />");

if (typeof (lw) == "undefined") lw = {};
if (typeof (lw.AutoSuggest) == "undefined") lw.AutoSuggest = {};

lw.AutoSuggest = function () {

  var _token = _lwTokenValueNoOverrideThis;

  this.InitAutoSuggest = function (fields, options) {
    if (!fields) return;

    var _currentCountry = "Ecuador";
    //var _globalSuggestEnable = false;
    var service_path = "/Location.ashx?token=" + _token;
    var _options = { service_url: "http://" + _lwWebServiceDomainNoOverrideThis, service_path: "" };
    if (options) {
      if (options.messages) {
        var messages = ["", "", "", ""];
        if (options.messages.ini) messages[0] = options.messages.ini;
        if (options.messages.searching) messages[1] = options.messages.searching;
        if (options.messages.results) messages[2] = options.messages.results;
        if (options.messages.error) messages[3] = options.messages.error;

        $.extend(_options, { status: messages });
      }
      if (options.css) $.extend(_options, { css: options.css });
      if (options.nomatch) $.extend(_options, { nomatch: options.nomatch });
      if (options.country) _currentCountry = options.country;
      //if (options.enableGlobalSuggest) _globalSuggestEnable = options.enableGlobalSuggest;
    }

    var soptions = {};
    if (fields.cityField && dojo.byId(fields.cityField)) {
      _options.service_path = service_path + "&function=SuggestCities";
      //_options.service_path = service_path + (!_globalSuggestEnable ? "&function=SuggestCities" : "&function=SuggestCitiesGlobal");
      $.extend(soptions, _options, { fields: { country: _currentCountry} });
      $("#" + fields.cityField).suggest(soptions);
    }

    soptions = {};
    if (fields.streetField && dojo.byId(fields.streetField)) {
      _options.service_path = service_path + "&function=SuggestStreets";
      //_options.service_path = service_path + (!_globalSuggestEnable ? "&function=SuggestStreets" : "&function=SuggestStreetsGlobal");
      $.extend(soptions, _options, { fields: { country: _currentCountry, city: $("#" + fields.cityField)} });
      $("#" + fields.streetField).suggest(soptions);
    }

    soptions = {};
    if (fields.intersectionField && dojo.byId(fields.intersectionField)) {
      _options.service_path = service_path + "&function=SuggestIntersections";
      //_options.service_path = service_path + (!_globalSuggestEnable ? "&function=SuggestIntersections" : "&function=SuggestIntersectionsGlobal");
      $.extend(soptions, _options, { fields: { country: _currentCountry, city: $("#" + fields.cityField), street: $("#" + fields.streetField)} });
      $("#" + fields.intersectionField).suggest(soptions);
    }

    soptions = {};
    service_path = "/POI.ashx?token=" + _token;
    if (fields.placeField && dojo.byId(fields.placeField)) {
      _options.service_path = service_path + "&function=SuggestPlaces";
      $.extend(soptions, _options, { fields: { city: $("#" + fields.cityField)} });
      $("#" + fields.placeField).suggest(soptions);
    }
  };
};
