dojo-rails 0.9.3 → 0.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/dojo-rails.gemspec +4 -1
- data/lib/dojo/rails/version.rb +1 -1
- data/vendor/assets/javascripts/dojo/dojo.js +1869 -12
- metadata +34 -2
@@ -1,15 +1,1872 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
(function(
|
2
|
+
userConfig,
|
3
|
+
defaultConfig
|
4
|
+
){
|
5
|
+
// summary:
|
6
|
+
// This is the "source loader" and is the entry point for Dojo during development. You may also load Dojo with
|
7
|
+
// any AMD-compliant loader via the package main module dojo/main.
|
8
|
+
// description:
|
9
|
+
// This is the "source loader" for Dojo. It provides an AMD-compliant loader that can be configured
|
10
|
+
// to operate in either synchronous or asynchronous modes. After the loader is defined, dojo is loaded
|
11
|
+
// IAW the package main module dojo/main. In the event you wish to use a foreign loader, you may load dojo as a package
|
12
|
+
// via the package main module dojo/main and this loader is not required; see dojo/package.json for details.
|
13
|
+
//
|
14
|
+
// In order to keep compatibility with the v1.x line, this loader includes additional machinery that enables
|
15
|
+
// the dojo.provide, dojo.require et al API. This machinery is loaded by default, but may be dynamically removed
|
16
|
+
// via the has.js API and statically removed via the build system.
|
17
|
+
//
|
18
|
+
// This loader includes sniffing machinery to determine the environment; the following environments are supported:
|
19
|
+
//
|
20
|
+
// * browser
|
21
|
+
// * node.js
|
22
|
+
// * rhino
|
23
|
+
//
|
24
|
+
// This is the so-called "source loader". As such, it includes many optional features that may be discadred by
|
25
|
+
// building a customized verion with the build system.
|
6
26
|
|
7
|
-
|
8
|
-
|
9
|
-
|
27
|
+
// Design and Implementation Notes
|
28
|
+
//
|
29
|
+
// This is a dojo-specific adaption of bdLoad, donated to the dojo foundation by Altoviso LLC.
|
30
|
+
//
|
31
|
+
// This function defines an AMD-compliant (http://wiki.commonjs.org/wiki/Modules/AsynchronousDefinition)
|
32
|
+
// loader that can be configured to operate in either synchronous or asynchronous modes.
|
33
|
+
//
|
34
|
+
// Since this machinery implements a loader, it does not have the luxury of using a load system and/or
|
35
|
+
// leveraging a utility library. This results in an unpleasantly long file; here is a road map of the contents:
|
36
|
+
//
|
37
|
+
// 1. Small library for use implementing the loader.
|
38
|
+
// 2. Define the has.js API; this is used throughout the loader to bracket features.
|
39
|
+
// 3. Define the node.js and rhino sniffs and sniff.
|
40
|
+
// 4. Define the loader's data.
|
41
|
+
// 5. Define the configuration machinery.
|
42
|
+
// 6. Define the script element sniffing machinery and sniff for configuration data.
|
43
|
+
// 7. Configure the loader IAW the provided user, default, and sniffing data.
|
44
|
+
// 8. Define the global require function.
|
45
|
+
// 9. Define the module resolution machinery.
|
46
|
+
// 10. Define the module and plugin module definition machinery
|
47
|
+
// 11. Define the script injection machinery.
|
48
|
+
// 12. Define the window load detection.
|
49
|
+
// 13. Define the logging API.
|
50
|
+
// 14. Define the tracing API.
|
51
|
+
// 16. Define the AMD define function.
|
52
|
+
// 17. Define the dojo v1.x provide/require machinery--so called "legacy" modes.
|
53
|
+
// 18. Publish global variables.
|
54
|
+
//
|
55
|
+
// Language and Acronyms and Idioms
|
56
|
+
//
|
57
|
+
// moduleId: a CJS module identifier, (used for public APIs)
|
58
|
+
// mid: moduleId (used internally)
|
59
|
+
// packageId: a package identifier (used for public APIs)
|
60
|
+
// pid: packageId (used internally); the implied system or default package has pid===""
|
61
|
+
// pack: package is used internally to reference a package object (since javascript has reserved words including "package")
|
62
|
+
// prid: plugin resource identifier
|
63
|
+
// The integer constant 1 is used in place of true and 0 in place of false.
|
10
64
|
|
11
|
-
|
12
|
-
|
65
|
+
// define a minimal library to help build the loader
|
66
|
+
var noop = function(){
|
67
|
+
},
|
13
68
|
|
14
|
-
|
15
|
-
(function(_1,_2){var _3=function(){},_4=function(it){for(var p in it){return 0;}return 1;},_5={}.toString,_6=function(it){return _5.call(it)=="[object Function]";},_7=function(it){return _5.call(it)=="[object String]";},_8=function(it){return _5.call(it)=="[object Array]";},_9=function(_a,_b){if(_a){for(var i=0;i<_a.length;){_b(_a[i++]);}}},_c=function(_d,_e){for(var p in _e){_d[p]=_e[p];}return _d;},_f=function(_10,_11){return _c(new Error(_10),{src:"dojoLoader",info:_11});},_12=1,uid=function(){return "_"+_12++;},req=function(_13,_14,_15){return _16(_13,_14,_15,0,req);},_17=this,doc=_17.document,_18=doc&&doc.createElement("DiV"),has=req.has=function(_19){return _6(_1a[_19])?(_1a[_19]=_1a[_19](_17,doc,_18)):_1a[_19];},_1a=has.cache=_2.hasCache;has.add=function(_1b,_1c,now,_1d){(_1a[_1b]===undefined||_1d)&&(_1a[_1b]=_1c);return now&&has(_1b);};false&&has.add("host-node",_1.has&&"host-node" in _1.has?_1.has["host-node"]:(typeof process=="object"&&process.versions&&process.versions.node&&process.versions.v8));if(0){require("./_base/configNode.js").config(_2);_2.loaderPatch.nodeRequire=require;}false&&has.add("host-rhino",_1.has&&"host-rhino" in _1.has?_1.has["host-rhino"]:(typeof load=="function"&&(typeof Packages=="function"||typeof Packages=="object")));if(0){for(var _1e=_1.baseUrl||".",arg,_1f=this.arguments,i=0;i<_1f.length;){arg=(_1f[i++]+"").split("=");if(arg[0]=="baseUrl"){_1e=arg[1];break;}}load(_1e+"/_base/configRhino.js");rhinoDojoConfig(_2,_1e,_1f);}for(var p in _1.has){has.add(p,_1.has[p],0,1);}var _20=1,_21=2,_22=3,_23=4,_24=5;if(0){_20="requested";_21="arrived";_22="not-a-module";_23="executing";_24="executed";}var _25=0,_26="sync",xd="xd",_27=[],_28=0,_29=_3,_2a=_3,_2b;if(1){req.isXdUrl=_3;req.initSyncLoader=function(_2c,_2d,_2e){if(!_28){_28=_2c;_29=_2d;_2a=_2e;}return {sync:_26,xd:xd,arrived:_21,nonmodule:_22,executing:_23,executed:_24,syncExecStack:_27,modules:_2f,execQ:_30,getModule:_31,injectModule:_32,setArrived:_33,signal:_34,finishExec:_35,execModule:_36,dojoRequirePlugin:_28,getLegacyMode:function(){return _25;},holdIdle:function(){_76++;},releaseIdle:function(){_37();}};};if(1){var _38=location.protocol,_39=location.host,_3a=!_39;req.isXdUrl=function(url){if(_3a||/^\./.test(url)){return false;}if(/^\/\//.test(url)){return true;}var _3b=url.match(/^([^\/\:]+\:)\/\/([^\/]+)/);return _3b&&(_3b[1]!=_38||_3b[2]!=_39);};true||has.add("dojo-xhr-factory",1);has.add("dojo-force-activex-xhr",1&&!doc.addEventListener&&window.location.protocol=="file:");has.add("native-xhr",typeof XMLHttpRequest!="undefined");if(has("native-xhr")&&!has("dojo-force-activex-xhr")){_2b=function(){return new XMLHttpRequest();};}else{for(var _3c=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],_3d,i=0;i<3;){try{_3d=_3c[i++];if(new ActiveXObject(_3d)){break;}}catch(e){}}_2b=function(){return new ActiveXObject(_3d);};}req.getXhr=_2b;has.add("dojo-gettext-api",1);req.getText=function(url,_3e,_3f){var xhr=_2b();xhr.open("GET",_40(url),false);xhr.send(null);if(xhr.status==200||(!location.host&&!xhr.status)){if(_3f){_3f(xhr.responseText,_3e);}}else{throw _f("xhrFailed",xhr.status);}return xhr.responseText;};}}else{req.async=1;}var _41=new Function("return eval(arguments[0]);");req.eval=function(_42,_43){return _41(_42+"\r\n////@ sourceURL="+_43);};var _44={},_45="error",_34=req.signal=function(_46,_47){var _48=_44[_46];_9(_48&&_48.slice(0),function(_49){_49.apply(null,_8(_47)?_47:[_47]);});},on=req.on=function(_4a,_4b){var _4c=_44[_4a]||(_44[_4a]=[]);_4c.push(_4b);return {remove:function(){for(var i=0;i<_4c.length;i++){if(_4c[i]===_4b){_4c.splice(i,1);return;}}}};};var _4d=[],_4e={},_4f=[],_50={},_51={},_52=[],_2f={},_53="",_54={},_55={},_56={};if(1){var _57=function(_58){var p,_59,_5a,now;for(p in _55){_59=_55[p];_5a=p.match(/^url\:(.+)/);if(_5a){_54[_5b(_5a[1],_58)]=_59;}else{if(p=="*now"){now=_59;}else{if(p!="*noref"){_54[_5c(p,_58).mid]=_59;}}}}if(now){now(_5d(_58));}_55={};},_5e=function(map,_5f,_60){_5f.splice(0,_5f.length);var p,i,_61,_62=0;for(p in map){_5f.push([p,map[p]]);if(map[p]==_60){_62=p;}}_5f.sort(function(lhs,rhs){return rhs[0].length-lhs[0].length;});for(i=0;i<_5f.length;){_61=_5f[i++];_61[2]=new RegExp("^"+_61[0].replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,function(c){return "\\"+c;})+"(/|$)");_61[3]=_61[0].length+1;}return _62;},_63=function(_64,_65){var _66=_64.name;if(!_66){_66=_64;_64={name:_66};}_64=_c({main:"main",mapProg:[]},_64);_64.location=(_65||"")+(_64.location?_64.location:_66);_64.reverseName=_5e(_64.packageMap,_64.mapProg,_66);if(!_64.main.indexOf("./")){_64.main=_64.main.substring(2);}_c(_4e,_64.paths);_50[_66]=_64;_51[_66]=_66;},_67=function(_68,_69){for(var p in _68){if(p=="waitSeconds"){req.waitms=(_68[p]||0)*1000;}if(p=="cacheBust"){_53=_68[p]?(_7(_68[p])?_68[p]:(new Date()).getTime()+""):"";}if(p=="baseUrl"||p=="combo"){req[p]=_68[p];}if(1&&p=="async"){var _6a=_68[p];req.legacyMode=_25=(_7(_6a)&&/sync|legacyAsync/.test(_6a)?_6a:(!_6a?"sync":false));req.async=!_25;}if(_68[p]!==_1a){req.rawConfig[p]=_68[p];p!="has"&&has.add("config-"+p,_68[p],0,_69);}}if(!req.baseUrl){req.baseUrl="./";}if(!/\/$/.test(req.baseUrl)){req.baseUrl+="/";}for(p in _68.has){has.add(p,_68.has[p],0,_69);}_9(_68.packages,_63);for(_1e in _68.packagePaths){_9(_68.packagePaths[_1e],function(_6b){_63(_6b,_1e+"/");});}_5e(_c(_4e,_68.paths),_4f);_9(_68.aliases,function(_6c){if(_7(_6c[0])){_6c[0]=new RegExp("^"+_6c[0].replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,function(c){return "\\"+c;})+"$");}_4d.push(_6c);});_5e(_c(_51,_68.packageMap),_52);if(_68.cache){_57();_55=_68.cache;if(_68.cache["*noref"]){_57();}}_34("config",[_68,req.rawConfig]);};if(has("dojo-cdn")||1){for(var _6d,src,_6e,_6f=doc.getElementsByTagName("script"),i=0;i<_6f.length&&!_6e;i++){if((src=_6f[i].getAttribute("src"))&&(_6e=src.match(/(.*)\/?dojo\.js(\W|$)/i))){_1.baseUrl=_6d=_1.baseUrl||_2.baseUrl||_6e[1];src=(_6f[i].getAttribute("data-dojo-config")||_6f[i].getAttribute("djConfig"));if(src){_56=req.eval("({ "+src+" })","data-dojo-config");}if(0){var _70=_6f[i].getAttribute("data-main");if(_70){_56.deps=_56.deps||[_70];}}}}}if(0){try{if(window.parent!=window&&window.parent.require){var doh=window.parent.require("doh");doh&&_c(_56,doh.testConfig);}}catch(e){}}req.rawConfig={};_67(_2,1);_67(_1,1);_67(_56,1);if(has("dojo-cdn")){_50.dojo.location=_6d;_50.dijit.location=_6d+"../dijit/";_50.dojox.location=_6d+"../dojox/";}}else{_4e=_2.paths;_4f=_2.pathsMapProg;_50=_2.packs;_4d=_2.aliases;_51=_2.packageMap;_52=_2.packageMapProg;_2f=_2.modules;_54=_2.cache;_53=_2.cacheBust;req.rawConfig=_2;}if(0){req.combo=req.combo||{add:_3};var _71=0,_72=[],_73=null;}var _74=function(_75){_76++;_9(_75.deps,_32);if(0&&_71&&!_73){_73=setTimeout(function(){_71=0;_73=null;req.combo.done(function(_77,url){var _78=function(){_79(0,_77);_7a();};_72.push(_77);_7b=_77;req.injectUrl(url,_78,_77);_7b=0;},req);},0);}_37();},_16=function(a1,a2,a3,_7c,_7d){var _7e,_7f;if(_7(a1)){_7e=_31(a1,_7c,true);if(_7e&&_7e.executed){return _7e.result;}throw _f("undefinedModule",a1);}if(!_8(a1)){_67(a1);a1=a2;a2=a3;}if(_8(a1)){if(!a1.length){a2&&a2();}else{_7f="require*"+uid();for(var mid,_80=[],i=0;i<a1.length;){mid=a1[i++];if(mid in {exports:1,module:1}){throw _f("illegalModuleId",mid);}_80.push(_31(mid,_7c));}_7e=_c(_81("",_7f,0,""),{injected:_21,deps:_80,def:a2||_3,require:_7c?_7c.require:req});_2f[_7e.mid]=_7e;_74(_7e);var _82=_76&&req.async;_76++;_36(_7e,_82);_37();if(!_7e.executed){_30.push(_7e);}_7a();}}return _7d;},_5d=function(_83){if(!_83){return req;}var _84=_83.require;if(!_84){_84=function(a1,a2,a3){return _16(a1,a2,a3,_83,_84);};_83.require=_c(_84,req);_84.module=_83;_84.toUrl=function(_85){return _5b(_85,_83);};_84.toAbsMid=function(mid){return _b4(mid,_83);};if(0){_84.undef=function(mid){req.undef(mid,_83);};}if(1){_84.syncLoadNls=function(mid){var _86=_5c(mid,_83),_87=_2f[_86.mid];if(!_87||!_87.executed){_88=_54[_86.mid]||_54[_86.cacheId];if(_88){_89(_88);_87=_2f[_86.mid];}}return _87&&_87.executed&&_87.result;};}}return _84;},_30=[],_8a=[],_8b={},_8c=function(_8d){_8d.injected=_20;_8b[_8d.mid]=1;if(_8d.url){_8b[_8d.url]=_8d.pack||1;}},_33=function(_8e){_8e.injected=_21;delete _8b[_8e.mid];if(_8e.url){delete _8b[_8e.url];}if(_4(_8b)){_8f();1&&_25==xd&&(_25=_26);}},_90=req.idle=function(){return !_8a.length&&_4(_8b)&&!_30.length&&!_76;},_91=function(_92,map){for(var i=0;i<map.length;i++){if(map[i][2].test(_92)){return map[i];}}return 0;},_93=function(_94){var _95=[],_96,_97;_94=_94.replace(/\\/g,"/").split("/");while(_94.length){_96=_94.shift();if(_96==".."&&_95.length&&_97!=".."){_95.pop();_97=_95[_95.length-1];}else{if(_96!="."){_95.push(_97=_96);}}}return _95.join("/");},_81=function(pid,mid,_98,url,_99){if(1){var xd=req.isXdUrl(url);return {pid:pid,mid:mid,pack:_98,url:url,executed:0,def:0,isXd:xd,isAmd:!!(xd||(_50[pid]&&_50[pid].isAmd)),cacheId:_99};}else{return {pid:pid,mid:mid,pack:_98,url:url,executed:0,def:0,cacheId:_99};}},_9a=function(mid,_9b,_9c,_9d,_9e,_9f,_a0,_a1){var pid,_a2,_a3,_a4,_a5,_a6,url,_a7,_a8,_a9,_aa=0;_a9=mid;_a8=/^\./.test(mid);if(/(^\/)|(\:)|(\.js$)/.test(mid)||(_a8&&!_9b)){return _81(0,mid,0,mid);}else{mid=_93(_a8?(_9b.mid+"/../"+mid):mid);if(/^\./.test(mid)){throw _f("irrationalPath",mid);}_a4=_9b&&_9b.pack&&_9b.pack.mapProg;_a5=(_a4&&_91(mid,_a4))||_91(mid,_9f);if(_a5){pid=_a5[1];mid=mid.substring(_a5[3]);_a2=_9c[pid];if(!mid){mid=_a2.main;}_a3=mid;_aa=_a2.reverseName+"/"+mid;mid=pid+"/"+mid;}else{pid="";}var _ab=0,_ac=0;_9(_4d,function(_ad){var _ae=mid.match(_ad[0]);if(_ae&&_ae.length>_ab){_ac=_6(_ad[1])?mid.replace(_ad[0],_ad[1]):_ad[1];}});if(_ac){return _9a(_ac,0,_9c,_9d,_9e,_9f,_a0,_a1);}_a7=_9d[mid];if(_a7){return _a1?_81(_a7.pid,_a7.mid,_a7.pack,_a7.url,_aa):_9d[mid];}}_a5=_91(mid,_a0);if(_a5){url=_a5[1]+mid.substring(_a5[3]-1);}else{if(pid){url=_a2.location+"/"+_a3;}else{if(has("config-tlmSiblingOfDojo")){url="../"+mid;}else{url=mid;}}}if(!(/(^\/)|(\:)/.test(url))){url=_9e+url;}url+=".js";return _81(pid,mid,_a2,_93(url),_aa);},_5c=function(mid,_af){return _9a(mid,_af,_50,_2f,req.baseUrl,_52,_4f);},_b0=function(_b1,_b2,_b3){return _b1.normalize?_b1.normalize(_b2,function(mid){return _b4(mid,_b3);}):_b4(_b2,_b3);},_b5=0,_31=function(mid,_b6,_b7){var _b8,_b9,_ba,_bb;_b8=mid.match(/^(.+?)\!(.*)$/);if(_b8){_b9=_31(_b8[1],_b6,_b7);if(1&&_25==_26&&!_b9.executed){_32(_b9);if(_b9.injected===_21&&!_b9.executed){_76++;_36(_b9);_37();}if(_b9.executed){_bc(_b9);}else{_30.unshift(_b9);}}if(_b9.executed===_24&&!_b9.load){_bc(_b9);}if(_b9.load){_ba=_b0(_b9,_b8[2],_b6);mid=(_b9.mid+"!"+(_b9.dynamic?++_b5+"!":"")+_ba);}else{_ba=_b8[2];mid=_b9.mid+"!"+(++_b5)+"!waitingForPlugin";}_bb={plugin:_b9,mid:mid,req:_5d(_b6),prid:_ba};}else{_bb=_5c(mid,_b6);}return _2f[_bb.mid]||(!_b7&&(_2f[_bb.mid]=_bb));},_b4=req.toAbsMid=function(mid,_bd){return _5c(mid,_bd).mid;},_5b=req.toUrl=function(_be,_bf){var _c0=_5c(_be+"/x",_bf),url=_c0.url;return _40(_c0.pid===0?_be:url.substring(0,url.length-5));},_c1={injected:_21,executed:_24,def:_22,result:_22},_c2=function(mid){return _2f[mid]=_c({mid:mid},_c1);},_c3=_c2("require"),_c4=_c2("exports"),_c5=_c2("module"),_c6=function(_c7,_c8){req.trace("loader-run-factory",[_c7.mid]);var _c9=_c7.def,_ca;1&&_27.unshift(_c7);if(has("config-dojo-loader-catches")){try{_ca=_6(_c9)?_c9.apply(null,_c8):_c9;}catch(e){_34(_45,_c7.result=_f("factoryThrew",[_c7,e]));}}else{_ca=_6(_c9)?_c9.apply(null,_c8):_c9;}_c7.result=_ca===undefined&&_c7.cjs?_c7.cjs.exports:_ca;1&&_27.shift(_c7);},_cb={},_cc=0,_bc=function(_cd){var _ce=_cd.result;_cd.dynamic=_ce.dynamic;_cd.normalize=_ce.normalize;_cd.load=_ce.load;return _cd;},_cf=function(_d0){var map={};_9(_d0.loadQ,function(_d1){var _d2=_d1.mid,_d3=_b0(_d0,_d1.prid,_d1.req.module),mid=_d0.dynamic?_d1.mid.replace(/waitingForPlugin$/,_d3):(_d0.mid+"!"+_d3),_d4=_c(_c({},_d1),{mid:mid,prid:_d3,injected:0});if(!_2f[mid]){_e5(_2f[mid]=_d4);}map[_d1.mid]=_2f[mid];_33(_d1);delete _2f[_d1.mid];});_d0.loadQ=0;var _d5=function(_d6){for(var _d7,_d8=_d6.deps||[],i=0;i<_d8.length;i++){_d7=map[_d8[i].mid];if(_d7){_d8[i]=_d7;}}};for(var p in _2f){_d5(_2f[p]);}_9(_30,_d5);},_35=function(_d9){req.trace("loader-finish-exec",[_d9.mid]);_d9.executed=_24;_d9.defOrder=_cc++;1&&_9(_d9.provides,function(cb){cb();});if(_d9.loadQ){_bc(_d9);_cf(_d9);}for(i=0;i<_30.length;){if(_30[i]===_d9){_30.splice(i,1);}else{i++;}}},_da=[],_36=function(_db,_dc){if(_db.executed===_23){req.trace("loader-circular-dependency",[_da.concat(mid).join("->")]);return (!_db.def||_dc)?_cb:(_db.cjs&&_db.cjs.exports);}if(!_db.executed){if(!_db.def){return _cb;}var mid=_db.mid,_dd=_db.deps||[],arg,_de,_df=[],i=0;if(0){_da.push(mid);req.trace("loader-exec-module",["exec",_da.length,mid]);}_db.executed=_23;while(i<_dd.length){arg=_dd[i++];_de=((arg===_c3)?_5d(_db):((arg===_c4)?_db.cjs.exports:((arg===_c5)?_db.cjs:_36(arg,_dc))));if(_de===_cb){_db.executed=0;req.trace("loader-exec-module",["abort",mid]);0&&_da.pop();return _cb;}_df.push(_de);}_c6(_db,_df);_35(_db);}0&&_da.pop();return _db.result;},_76=0,_7a=function(){if(_76){return;}_76++;_29();for(var _e0,_e1,i=0;i<_30.length;){_e0=_cc;_e1=_30[i];_36(_e1);if(_e0!=_cc){_29();i=0;}else{i++;}}_37();},_37=function(){_76--;if(_90()){_34("idle",[]);}};if(0){req.undef=function(_e2,_e3){var _e4=_31(_e2,_e3);_33(_e4);delete _2f[_e4.mid];};}if(1){if(has("dojo-loader-eval-hint-url")===undefined){has.add("dojo-loader-eval-hint-url",1);}var _40=function(url){url+="";return url+(_53?((/\?/.test(url)?"&":"?")+_53):"");},_e5=function(_e6){var _e7=_e6.plugin;if(_e7.executed===_24&&!_e7.load){_bc(_e7);}var _e8=function(def){_e6.result=def;_33(_e6);_35(_e6);_7a();};if(_e7.load){_e7.load(_e6.prid,_e6.req,_e8);}else{if(_e7.loadQ){_e7.loadQ.push(_e6);}else{_e7.loadQ=[_e6];_30.unshift(_e7);_32(_e7);}}},_88=0,_7b=0,_e9=0,_89=function(_ea,_eb){_e9=1;if(has("config-dojo-loader-catches")){try{if(_ea===_88){_88.call(null);}else{req.eval(_ea,has("dojo-loader-eval-hint-url")?_eb.url:_eb.mid);}}catch(e){_34(_45,_f("evalModuleThrew",_eb));}}else{if(_ea===_88){_88.call(null);}else{req.eval(_ea,has("dojo-loader-eval-hint-url")?_eb.url:_eb.mid);}}_e9=0;},_32=function(_ec){var mid=_ec.mid,url=_ec.url;if(_ec.executed||_ec.injected||_8b[mid]||(_ec.url&&((_ec.pack&&_8b[_ec.url]===_ec.pack)||_8b[_ec.url]==1))){return;}_8c(_ec);if(0){var _ed=0;if(_ec.plugin&&_ec.plugin.isCombo){req.combo.add(_ec.plugin.mid,_ec.prid,0,req);_ed=1;}else{if(!_ec.plugin){_ed=req.combo.add(0,_ec.mid,_ec.url,req);}}if(_ed){_71=1;return;}}if(_ec.plugin){_e5(_ec);return;}var _ee=function(){_79(_ec);if(_ec.injected!==_21){_33(_ec);_c(_ec,_c1);}if(1&&_25){!_27.length&&_7a();}else{_7a();}};_88=_54[mid]||_54[_ec.cacheId];if(_88){req.trace("loader-inject",["cache",_ec.mid,url]);_89(_88,_ec);_ee();return;}if(1&&_25){if(_ec.isXd){_25==_26&&(_25=xd);}else{if(_ec.isAmd&&_25!=_26){}else{var _ef=function(_f0){if(_25==_26){_27.unshift(_ec);_89(_f0,_ec);_27.shift();_79(_ec);if(!_ec.cjs){_33(_ec);_35(_ec);}if(_ec.finish){var _f1=mid+"*finish",_f2=_ec.finish;delete _ec.finish;def(_f1,["dojo",("dojo/require!"+_f2.join(",")).replace(/\./g,"/")],function(_f3){_9(_f2,function(mid){_f3.require(mid);});});_30.unshift(_31(_f1));}_ee();}else{_f0=_2a(_ec,_f0);if(_f0){_89(_f0,_ec);_ee();}else{_7b=_ec;req.injectUrl(_40(url),_ee,_ec);_7b=0;}}};req.trace("loader-inject",["xhr",_ec.mid,url,_25!=_26]);if(has("config-dojo-loader-catches")){try{req.getText(url,_25!=_26,_ef);}catch(e){_34(_45,_f("xhrInjectFailed",[_ec,e]));}}else{req.getText(url,_25!=_26,_ef);}return;}}}req.trace("loader-inject",["script",_ec.mid,url]);_7b=_ec;req.injectUrl(_40(url),_ee,_ec);_7b=0;},_f4=function(_f5,_f6,def){req.trace("loader-define-module",[_f5.mid,_f6]);if(0&&_f5.plugin&&_f5.plugin.isCombo){_f5.result=_6(def)?def():def;_33(_f5);_35(_f5);return _f5;}var mid=_f5.mid;if(_f5.injected===_21){_34(_45,_f("multipleDefine",_f5));return _f5;}_c(_f5,{deps:_f6,def:def,cjs:{id:_f5.mid,uri:_f5.url,exports:(_f5.result={}),setExports:function(_f7){_f5.cjs.exports=_f7;}}});for(var i=0;i<_f6.length;i++){_f6[i]=_31(_f6[i],_f5);}if(1&&_25&&!_8b[mid]){_74(_f5);_30.push(_f5);_7a();}_33(_f5);if(!_6(def)&&!_f6.length){_f5.result=def;_35(_f5);}return _f5;},_79=function(_f8,_f9){var _fa=[],_fb,_fc;while(_8a.length){_fc=_8a.shift();_f9&&(_fc[0]=_f9.shift());_fb=(_fc[0]&&_31(_fc[0]))||_f8;_fa.push([_fb,_fc[1],_fc[2]]);}_57(_f8);_9(_fa,function(_fd){_74(_f4.apply(null,_fd));});};}var _fe=0,_8f=_3,_ff=_3;if(1){_8f=function(){_fe&&clearTimeout(_fe);_fe=0;},_ff=function(){_8f();req.waitms&&(_fe=setTimeout(function(){_8f();_34(_45,_f("timeout",_8b));},req.waitms));};}if(1){has.add("ie-event-behavior",doc.attachEvent&&(typeof opera==="undefined"||opera.toString()!="[object Opera]"));}if(1&&(1||1)){var _100=function(node,_101,_102,_103){if(!has("ie-event-behavior")){node.addEventListener(_101,_103,false);return function(){node.removeEventListener(_101,_103,false);};}else{node.attachEvent(_102,_103);return function(){node.detachEvent(_102,_103);};}},_104=_100(window,"load","onload",function(){req.pageLoaded=1;doc.readyState!="complete"&&(doc.readyState="complete");_104();});if(1){var _105=doc.getElementsByTagName("script")[0],_106=_105.parentNode;req.injectUrl=function(url,_107,_108){_ff();var node=_108.node=doc.createElement("script"),_109=function(e){e=e||window.event;var node=e.target||e.srcElement;if(e.type==="load"||/complete|loaded/.test(node.readyState)){_10a();_107&&_107();}},_10a=_100(node,"load","onreadystatechange",_109);node.type="text/javascript";node.charset="utf-8";node.src=url;_106.insertBefore(node,_105);return node;};}}if(1){req.log=function(){try{for(var i=0;i<arguments.length;i++){}}catch(e){}};}else{req.log=_3;}if(0){var _10b=req.trace=function(_10c,args){if(_10b.on&&_10b.group[_10c]){_34("trace",[_10c,args]);for(var arg,dump=[],text="trace:"+_10c+(args.length?(":"+args[0]):""),i=1;i<args.length;){arg=args[i++];if(_7(arg)){text+=", "+arg;}else{dump.push(arg);}}req.log(text);dump.length&&dump.push(".");req.log.apply(req,dump);}};_c(_10b,{on:1,group:{},set:function(_10d,_10e){if(_7(_10d)){_10b.group[_10d]=_10e;}else{_c(_10b.group,_10d);}}});_10b.set(_c(_c(_c({},_2.trace),_1.trace),_56.trace));on("config",function(_10f){_10f.trace&&_10b.set(_10f.trace);});}else{req.trace=_3;}var def=function(mid,_110,_111){var _112=arguments.length,args=0,_113=["require","exports","module"];if(0){if(_112==1&&_6(mid)){_110=[];mid.toString().replace(/(\/\*([\s\S]*?)\*\/|\/\/(.*)$)/mg,"").replace(/require\(["']([\w\!\-_\.\/]+)["']\)/g,function(_114,dep){_110.push(dep);});args=[0,_113.concat(_110),mid];}}if(!args){args=_112==1?[0,_113,mid]:(_112==2?(_8(mid)?[0,mid,_110]:(_6(_110)?[mid,_113,_110]:[mid,[],_110])):[mid,_110,_111]);}req.trace("loader-define",args.slice(0,2));var _115=args[0]&&_31(args[0]),_116;if(_115&&!_8b[_115.mid]){_74(_f4(_115,args[1],args[2]));}else{if(!has("ie-event-behavior")||!1||_e9){_8a.push(args);}else{_115=_115||_7b;if(!_115){for(mid in _8b){_116=_2f[mid];if(_116&&_116.node&&_116.node.readyState==="interactive"){_115=_116;break;}}if(0&&!_115){for(var i=0;i<_72.length;i++){_115=_72[i];if(_115.node&&_115.node.readyState==="interactive"){break;}_115=0;}}}if(0&&_8(_115)){_74(_f4(_31(_115.shift()),args[1],args[2]));if(!_115.length){_72.splice(i,1);}}else{if(_115){_57(_115);_74(_f4(_115,args[1],args[2]));}else{_34(_45,_f("ieDefineFailed",args[0]));}}_7a();}}};def.amd={vendor:"dojotoolkit.org"};if(0){req.def=def;}_c(_c(req,_2.loaderPatch),_1.loaderPatch);on(_45,function(arg){try{console.error(arg);if(arg instanceof Error){for(var p in arg){}}}catch(e){}});_c(req,{uid:uid,cache:_54,packs:_50});if(0){_c(req,{paths:_4e,aliases:_4d,packageMap:_51,modules:_2f,legacyMode:_25,execQ:_30,defQ:_8a,waiting:_8b,pathsMapProg:_4f,packageMapProg:_52,listenerQueues:_44,computeMapProg:_5e,runMapProg:_91,compactPath:_93,getModuleInfo:_9a});}if(_17.define){if(1){_34(_45,_f("defineAlreadyDefined",0));}}else{_17.define=def;_17.require=req;}if(0&&req.combo&&req.combo.plugins){var _117=req.combo.plugins,_118;for(_118 in _117){_c(_c(_31(_118),_117[_118]),{isCombo:1,executed:"executed",load:1});}}if(1){var _119=_56.deps||_1.deps||_2.deps,_11a=_56.callback||_1.callback||_2.callback;req.boot=(_119||_11a)?[_119||[],_11a]:0;}if(!1){!req.async&&req(["dojo"]);req.boot&&req.apply(null,req.boot);}})(this.dojoConfig||this.djConfig||this.require||{},{async:0,hasCache:{"config-selectorEngine":"acme","config-tlmSiblingOfDojo":1,"dojo-built":1,"dojo-loader":1,dom:1,"host-browser":1},packages:[{location:"../dijit",name:"dijit"},{location:"../dojox",name:"dojox"},{location:".",name:"dojo"}]});require({cache:{"dojo/_base/fx":function(){define(["./kernel","./lang","../Evented","./Color","./connect","./sniff","../dom","../dom-style"],function(dojo,lang,_11b,_11c,_11d,has,dom,_11e){var _11f=lang.mixin;dojo._Line=function(_120,end){this.start=_120;this.end=end;};dojo._Line.prototype.getValue=function(n){return ((this.end-this.start)*n)+this.start;};dojo.Animation=function(args){_11f(this,args);if(lang.isArray(this.curve)){this.curve=new dojo._Line(this.curve[0],this.curve[1]);}};dojo.Animation.prototype=new _11b();dojo._Animation=dojo.Animation;lang.extend(dojo.Animation,{duration:350,repeat:0,rate:20,_percent:0,_startRepeatCount:0,_getStep:function(){var _121=this._percent,_122=this.easing;return _122?_122(_121):_121;},_fire:function(evt,args){var a=args||[];if(this[evt]){if(dojo.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(_123,_124){var _125=this;if(_125._delayTimer){_125._clearTimer();}if(_124){_125._stopTimer();_125._active=_125._paused=false;_125._percent=0;}else{if(_125._active&&!_125._paused){return _125;}}_125._fire("beforeBegin",[_125.node]);var de=_123||_125.delay,_126=lang.hitch(_125,"_play",_124);if(de>0){_125._delayTimer=setTimeout(_126,de);return _125;}_126();return _125;},_play:function(_127){var _128=this;if(_128._delayTimer){_128._clearTimer();}_128._startTime=new Date().valueOf();if(_128._paused){_128._startTime-=_128.duration*_128._percent;}_128._active=true;_128._paused=false;var _129=_128.curve.getValue(_128._getStep());if(!_128._percent){if(!_128._startRepeatCount){_128._startRepeatCount=_128.repeat;}_128._fire("onBegin",[_129]);}_128._fire("onPlay",[_129]);_128._cycle();return _128;},pause:function(){var _12a=this;if(_12a._delayTimer){_12a._clearTimer();}_12a._stopTimer();if(!_12a._active){return _12a;}_12a._paused=true;_12a._fire("onPause",[_12a.curve.getValue(_12a._getStep())]);return _12a;},gotoPercent:function(_12b,_12c){var _12d=this;_12d._stopTimer();_12d._active=_12d._paused=true;_12d._percent=_12b;if(_12c){_12d.play();}return _12d;},stop:function(_12e){var _12f=this;if(_12f._delayTimer){_12f._clearTimer();}if(!_12f._timer){return _12f;}_12f._stopTimer();if(_12e){_12f._percent=1;}_12f._fire("onStop",[_12f.curve.getValue(_12f._getStep())]);_12f._active=_12f._paused=false;return _12f;},status:function(){if(this._active){return this._paused?"paused":"playing";}return "stopped";},_cycle:function(){var _130=this;if(_130._active){var curr=new Date().valueOf();var step=(curr-_130._startTime)/(_130.duration);if(step>=1){step=1;}_130._percent=step;if(_130.easing){step=_130.easing(step);}_130._fire("onAnimate",[_130.curve.getValue(step)]);if(_130._percent<1){_130._startTimer();}else{_130._active=false;if(_130.repeat>0){_130.repeat--;_130.play(null,true);}else{if(_130.repeat==-1){_130.play(null,true);}else{if(_130._startRepeatCount){_130.repeat=_130._startRepeatCount;_130._startRepeatCount=0;}}}_130._percent=0;_130._fire("onEnd",[_130.node]);!_130.repeat&&_130._stopTimer();}}return _130;},_clearTimer:function(){clearTimeout(this._delayTimer);delete this._delayTimer;}});var ctr=0,_131=null,_132={run:function(){}};lang.extend(dojo.Animation,{_startTimer:function(){if(!this._timer){this._timer=_11d.connect(_132,"run",this,"_cycle");ctr++;}if(!_131){_131=setInterval(lang.hitch(_132,"run"),this.rate);}},_stopTimer:function(){if(this._timer){_11d.disconnect(this._timer);this._timer=null;ctr--;}if(ctr<=0){clearInterval(_131);_131=null;ctr=0;}}});var _133=has("ie")?function(node){var ns=node.style;if(!ns.width.length&&_11e.get(node,"width")=="auto"){ns.width="auto";}}:function(){};dojo._fade=function(args){args.node=dom.byId(args.node);var _134=_11f({properties:{}},args),_135=(_134.properties.opacity={});_135.start=!("start" in _134)?function(){return +_11e.get(_134.node,"opacity")||0;}:_134.start;_135.end=_134.end;var anim=dojo.animateProperty(_134);_11d.connect(anim,"beforeBegin",lang.partial(_133,_134.node));return anim;};dojo.fadeIn=function(args){return dojo._fade(_11f({end:1},args));};dojo.fadeOut=function(args){return dojo._fade(_11f({end:0},args));};dojo._defaultEasing=function(n){return 0.5+((Math.sin((n+1.5)*Math.PI))/2);};var _136=function(_137){this._properties=_137;for(var p in _137){var prop=_137[p];if(prop.start instanceof _11c){prop.tempColor=new _11c();}}};_136.prototype.getValue=function(r){var ret={};for(var p in this._properties){var prop=this._properties[p],_138=prop.start;if(_138 instanceof _11c){ret[p]=_11c.blendColors(_138,prop.end,r,prop.tempColor).toCss();}else{if(!lang.isArray(_138)){ret[p]=((prop.end-_138)*r)+_138+(p!="opacity"?prop.units||"px":0);}}}return ret;};dojo.animateProperty=function(args){var n=args.node=dom.byId(args.node);if(!args.easing){args.easing=dojo._defaultEasing;}var anim=new dojo.Animation(args);_11d.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(lang.isFunction(prop)){prop=prop(n);}prop=pm[p]=_11f({},(lang.isObject(prop)?prop:{end:prop}));if(lang.isFunction(prop.start)){prop.start=prop.start(n);}if(lang.isFunction(prop.end)){prop.end=prop.end(n);}var _139=(p.toLowerCase().indexOf("color")>=0);function _13a(node,p){var v={height:node.offsetHeight,width:node.offsetWidth}[p];if(v!==undefined){return v;}v=_11e.get(node,p);return (p=="opacity")?+v:(_139?v:parseFloat(v));};if(!("end" in prop)){prop.end=_13a(n,p);}else{if(!("start" in prop)){prop.start=_13a(n,p);}}if(_139){prop.start=new _11c(prop.start);prop.end=new _11c(prop.end);}else{prop.start=(p=="opacity")?+prop.start:parseFloat(prop.start);}}this.curve=new _136(pm);});_11d.connect(anim,"onAnimate",lang.hitch(_11e,"set",anim.node));return anim;};dojo.anim=function(node,_13b,_13c,_13d,_13e,_13f){return dojo.animateProperty({node:node,duration:_13c||dojo.Animation.prototype.duration,properties:_13b,easing:_13d,onEnd:_13e}).play(_13f||0);};return {_Line:dojo._Line,Animation:dojo.Animation,_fade:dojo._fade,fadeIn:dojo.fadeIn,fadeOut:dojo.fadeOut,_defaultEasing:dojo._defaultEasing,animateProperty:dojo.animateProperty,anim:dojo.anim};});},"dojo/dom-form":function(){define("dojo/dom-form",["./_base/lang","./dom","./io-query","./json"],function(lang,dom,ioq,json){function _140(obj,name,_141){if(_141===null){return;}var val=obj[name];if(typeof val=="string"){obj[name]=[val,_141];}else{if(lang.isArray(val)){val.push(_141);}else{obj[name]=_141;}}};var _142="file|submit|image|reset|button";var form={fieldToObject:function fieldToObject(_143){var ret=null;_143=dom.byId(_143);if(_143){var _144=_143.name,type=(_143.type||"").toLowerCase();if(_144&&type&&!_143.disabled){if(type=="radio"||type=="checkbox"){if(_143.checked){ret=_143.value;}}else{if(_143.multiple){ret=[];var _145=[_143.firstChild];while(_145.length){for(var node=_145.pop();node;node=node.nextSibling){if(node.nodeType==1&&node.tagName.toLowerCase()=="option"){if(node.selected){ret.push(node.value);}}else{if(node.nextSibling){_145.push(node.nextSibling);}if(node.firstChild){_145.push(node.firstChild);}break;}}}}else{ret=_143.value;}}}}return ret;},toObject:function formToObject(_146){var ret={},_147=dom.byId(_146).elements;for(var i=0,l=_147.length;i<l;++i){var item=_147[i],_148=item.name,type=(item.type||"").toLowerCase();if(_148&&type&&_142.indexOf(type)<0&&!item.disabled){_140(ret,_148,form.fieldToObject(item));if(type=="image"){ret[_148+".x"]=ret[_148+".y"]=ret[_148].x=ret[_148].y=0;}}}return ret;},toQuery:function formToQuery(_149){return ioq.objectToQuery(form.toObject(_149));},toJson:function formToJson(_14a,_14b){return json.stringify(form.toObject(_14a),null,_14b?4:0);}};return form;});},"dojo/i18n":function(){define(["./_base/kernel","require","./has","./_base/array","./_base/config","./_base/lang","./_base/xhr","./json"],function(dojo,_14c,has,_14d,_14e,lang,xhr,json){has.add("dojo-preload-i18n-Api",1);true||has.add("dojo-v1x-i18n-Api",1);var _14f=dojo.i18n={},_150=/(^.*(^|\/)nls)(\/|$)([^\/]*)\/?([^\/]*)/,_151=function(root,_152,_153,_154){for(var _155=[_153+_154],_156=_152.split("-"),_157="",i=0;i<_156.length;i++){_157+=(_157?"-":"")+_156[i];if(!root||root[_157]){_155.push(_153+_157+"/"+_154);}}return _155;},_158={},_159=dojo.getL10nName=function(_15a,_15b,_15c){_15c=_15c?_15c.toLowerCase():dojo.locale;_15a="dojo/i18n!"+_15a.replace(/\./g,"/");_15b=_15b.replace(/\./g,"/");return (/root/i.test(_15c))?(_15a+"/nls/"+_15b):(_15a+"/nls/"+_15c+"/"+_15b);},_15d=function(_15e,_15f,_160,_161,_162,load){_15e([_15f],function(root){var _163=lang.clone(root.root),_164=_151(!root._v1x&&root,_162,_160,_161);_15e(_164,function(){for(var i=1;i<_164.length;i++){_163=lang.mixin(lang.clone(_163),arguments[i]);}var _165=_15f+"/"+_162;_158[_165]=_163;load();});});},_166=function(id,_167){return /^\./.test(id)?_167(id):id;},_168=function(_169){var list=_14e.extraLocale||[];list=lang.isArray(list)?list:[list];list.push(_169);return list;},load=function(id,_16a,load){if(has("dojo-preload-i18n-Api")){var _16b=id.split("*"),_16c=_16b[1]=="preload";if(_16c){if(!_158[id]){_158[id]=1;_16d(_16b[2],json.parse(_16b[3]),1);}load(1);}if(_16c||_16e(id,_16a,load)){return;}}var _16f=_150.exec(id),_170=_16f[1]+"/",_171=_16f[5]||_16f[4],_172=_170+_171,_173=(_16f[5]&&_16f[4]),_174=_173||dojo.locale,_175=_172+"/"+_174,_176=_173?[_174]:_168(_174),_177=_176.length,_178=function(){if(!--_177){load(lang.delegate(_158[_175]));}};_14d.forEach(_176,function(_179){var _17a=_172+"/"+_179;if(has("dojo-preload-i18n-Api")){_17b(_17a);}if(!_158[_17a]){_15d(_16a,_172,_170,_171,_179,_178);}else{_178();}});};if(has("dojo-unit-tests")){var _17c=_14f.unitTests=[];}if(has("dojo-preload-i18n-Api")||1){var _17d=_14f.normalizeLocale=function(_17e){var _17f=_17e?_17e.toLowerCase():dojo.locale;return _17f=="root"?"ROOT":_17f;},isXd=function(mid){return (1&&1)?_14c.isXdUrl(_14c.toUrl(mid+".js")):true;},_180=0,_181=[],_16d=_14f._preloadLocalizations=function(_182,_183,_184){function _185(_186,func){var _187=_186.split("-");while(_187.length){if(func(_187.join("-"))){return true;}_187.pop();}return func("ROOT");};function _188(_189){_189=_17d(_189);_185(_189,function(loc){if(_14d.indexOf(_183,loc)>=0){var mid=_182.replace(/\./g,"/")+"_"+loc;_180++;(isXd(mid)||_184?_14c:_18d)([mid],function(_18a){for(var p in _18a){_158[p+"/"+_189]=_18a[p];}--_180;while(!_180&&_181.length){load.apply(null,_181.shift());}});return true;}return false;});};_188();_14d.forEach(dojo.config.extraLocale,_188);},_16e=function(id,_18b,load){if(_180){_181.push([id,_18b,load]);}return _180;};}if(1){var _18c=new Function("__bundle","__checkForLegacyModules","__mid","var define = function(){define.called = 1;},"+" require = function(){define.called = 1;};"+"try{"+"define.called = 0;"+"eval(__bundle);"+"if(define.called==1)"+"return 1;"+"if((__checkForLegacyModules = __checkForLegacyModules(__mid)))"+"return __checkForLegacyModules;"+"}catch(e){}"+"try{"+"return eval('('+__bundle+')');"+"}catch(e){"+"return e;"+"}"),_18d=function(deps,_18e){var _18f=[];_14d.forEach(deps,function(mid){var url=_14c.toUrl(mid+".js");function load(text){var _190=_18c(text,_17b,mid);if(_190===1){_14c([mid],function(_191){_18f.push(_158[url]=_191);});}else{if(_190 instanceof Error){console.error("failed to evaluate i18n bundle; url="+url,_190);_190={};}_18f.push(_158[url]=(/nls\/[^\/]+\/[^\/]+$/.test(url)?_190:{root:_190,_v1x:1}));}};if(_158[url]){_18f.push(_158[url]);}else{var _192=_14c.syncLoadNls(mid);if(_192){_18f.push(_192);}else{if(!xhr){try{_14c.getText(url,true,load);}catch(e){_18f.push(_158[url]={});}}else{xhr.get({url:url,sync:true,load:load,error:function(){_18f.push(_158[url]={});}});}}}});_18e&&_18e.apply(null,_18f);},_17b=function(_193){for(var _194,_195=_193.split("/"),_196=dojo.global[_195[0]],i=1;_196&&i<_195.length-1;_196=_196[_195[i++]]){}if(_196){_194=_196[_195[i]];if(!_194){_194=_196[_195[i].replace(/-/g,"_")];}if(_194){_158[_193]=_194;}}return _194;};_14f.getLocalization=function(_197,_198,_199){var _19a,_19b=_159(_197,_198,_199).substring(10);load(_19b,(!isXd(_19b)?_18d:_14c),function(_19c){_19a=_19c;});return _19a;};if(has("dojo-unit-tests")){_17c.push(function(doh){doh.register("tests.i18n.unit",function(t){var _19d;_19d=_18c("{prop:1}");t.is({prop:1},_19d);t.is(undefined,_19d[1]);_19d=_18c("({prop:1})");t.is({prop:1},_19d);t.is(undefined,_19d[1]);_19d=_18c("{'prop-x':1}");t.is({"prop-x":1},_19d);t.is(undefined,_19d[1]);_19d=_18c("({'prop-x':1})");t.is({"prop-x":1},_19d);t.is(undefined,_19d[1]);_19d=_18c("define({'prop-x':1})");t.is(1,_19d);_19d=_18c("this is total nonsense and should throw an error");t.is(_19d instanceof Error,true);});});}}return lang.mixin(_14f,{dynamic:true,normalize:_166,load:load,cache:_158});});},"dojo/_base/html":function(){define(["./kernel","../dom","../dom-style","../dom-attr","../dom-prop","../dom-class","../dom-construct","../dom-geometry"],function(dojo,dom,_19e,attr,prop,cls,ctr,geom){dojo.byId=dom.byId;dojo.isDescendant=dom.isDescendant;dojo.setSelectable=dom.setSelectable;dojo.getAttr=attr.get;dojo.setAttr=attr.set;dojo.hasAttr=attr.has;dojo.removeAttr=attr.remove;dojo.getNodeProp=attr.getNodeProp;dojo.attr=function(node,name,_19f){if(arguments.length==2){return attr[typeof name=="string"?"get":"set"](node,name);}return attr.set(node,name,_19f);};dojo.hasClass=cls.contains;dojo.addClass=cls.add;dojo.removeClass=cls.remove;dojo.toggleClass=cls.toggle;dojo.replaceClass=cls.replace;dojo._toDom=dojo.toDom=ctr.toDom;dojo.place=ctr.place;dojo.create=ctr.create;dojo.empty=function(node){ctr.empty(node);};dojo._destroyElement=dojo.destroy=function(node){ctr.destroy(node);};dojo._getPadExtents=dojo.getPadExtents=geom.getPadExtents;dojo._getBorderExtents=dojo.getBorderExtents=geom.getBorderExtents;dojo._getPadBorderExtents=dojo.getPadBorderExtents=geom.getPadBorderExtents;dojo._getMarginExtents=dojo.getMarginExtents=geom.getMarginExtents;dojo._getMarginSize=dojo.getMarginSize=geom.getMarginSize;dojo._getMarginBox=dojo.getMarginBox=geom.getMarginBox;dojo.setMarginBox=geom.setMarginBox;dojo._getContentBox=dojo.getContentBox=geom.getContentBox;dojo.setContentSize=geom.setContentSize;dojo._isBodyLtr=dojo.isBodyLtr=geom.isBodyLtr;dojo._docScroll=dojo.docScroll=geom.docScroll;dojo._getIeDocumentElementOffset=dojo.getIeDocumentElementOffset=geom.getIeDocumentElementOffset;dojo._fixIeBiDiScrollLeft=dojo.fixIeBiDiScrollLeft=geom.fixIeBiDiScrollLeft;dojo.position=geom.position;dojo.marginBox=function marginBox(node,box){return box?geom.setMarginBox(node,box):geom.getMarginBox(node);};dojo.contentBox=function contentBox(node,box){return box?geom.setContentSize(node,box):geom.getContentBox(node);};dojo.coords=function(node,_1a0){dojo.deprecated("dojo.coords()","Use dojo.position() or dojo.marginBox().");node=dom.byId(node);var s=_19e.getComputedStyle(node),mb=geom.getMarginBox(node,s);var abs=geom.position(node,_1a0);mb.x=abs.x;mb.y=abs.y;return mb;};dojo.getProp=prop.get;dojo.setProp=prop.set;dojo.prop=function(node,name,_1a1){if(arguments.length==2){return prop[typeof name=="string"?"get":"set"](node,name);}return prop.set(node,name,_1a1);};dojo.getStyle=_19e.get;dojo.setStyle=_19e.set;dojo.getComputedStyle=_19e.getComputedStyle;dojo.__toPixelValue=dojo.toPixelValue=_19e.toPixelValue;dojo.style=function(node,name,_1a2){switch(arguments.length){case 1:return _19e.get(node);case 2:return _19e[typeof name=="string"?"get":"set"](node,name);}return _19e.set(node,name,_1a2);};return dojo;});},"dojo/_base/kernel":function(){define(["../has","./config","require","module"],function(has,_1a3,_1a4,_1a5){var i,p,_1a6={},_1a7={},dojo={config:_1a3,global:this,dijit:_1a6,dojox:_1a7};var _1a8={dojo:["dojo",dojo],dijit:["dijit",_1a6],dojox:["dojox",_1a7]},_1a9=(_1a4.packs&&_1a4.packs[_1a5.id.match(/[^\/]+/)[0]].packageMap)||{},item;for(p in _1a9){if(_1a8[p]){_1a8[p][0]=_1a9[p];}else{_1a8[p]=[_1a9[p],{}];}}for(p in _1a8){item=_1a8[p];item[1]._scopeName=item[0];if(!_1a3.noGlobals){this[item[0]]=item[1];}}dojo.scopeMap=_1a8;dojo.baseUrl=dojo.config.baseUrl=_1a4.baseUrl;dojo.isAsync=!1||_1a4.async;dojo.locale=_1a3.locale;var rev="$Rev: 28982 $".match(/\d+/);dojo.version={major:1,minor:7,patch:3,flag:"",revision:rev?+rev[0]:NaN,toString:function(){var v=dojo.version;return v.major+"."+v.minor+"."+v.patch+v.flag+" ("+v.revision+")";}};true||has.add("extend-dojo",1);dojo.eval=function(_1aa){};(Function("d","d.eval = function(){return d.global.eval ? d.global.eval(arguments[0]) : eval(arguments[0]);}"))(dojo);if(0){dojo.exit=function(_1ab){quit(_1ab);};}else{dojo.exit=function(){};}true||has.add("dojo-guarantee-console",1);if(1){typeof console!="undefined"||(console={});var cn=["assert","count","debug","dir","dirxml","error","group","groupEnd","info","profile","profileEnd","time","timeEnd","trace","warn","log"];var tn;i=0;while((tn=cn[i++])){if(!console[tn]){(function(){var tcn=tn+"";console[tcn]=("log" in console)?function(){var a=Array.apply({},arguments);a.unshift(tcn+":");console["log"](a.join(" "));}:function(){};console[tcn]._fake=true;})();}}}has.add("dojo-debug-messages",!!_1a3.isDebug);if(has("dojo-debug-messages")){dojo.deprecated=function(_1ac,_1ad,_1ae){var _1af="DEPRECATED: "+_1ac;if(_1ad){_1af+=" "+_1ad;}if(_1ae){_1af+=" -- will be removed in version: "+_1ae;}console.warn(_1af);};dojo.experimental=function(_1b0,_1b1){var _1b2="EXPERIMENTAL: "+_1b0+" -- APIs subject to change without notice.";if(_1b1){_1b2+=" "+_1b1;}console.warn(_1b2);};}else{dojo.deprecated=dojo.experimental=function(){};}true||has.add("dojo-modulePaths",1);if(1){if(_1a3.modulePaths){dojo.deprecated("dojo.modulePaths","use paths configuration");var _1b3={};for(p in _1a3.modulePaths){_1b3[p.replace(/\./g,"/")]=_1a3.modulePaths[p];}_1a4({paths:_1b3});}}true||has.add("dojo-moduleUrl",1);if(1){dojo.moduleUrl=function(_1b4,url){dojo.deprecated("dojo.moduleUrl()","use require.toUrl","2.0");var _1b5=null;if(_1b4){_1b5=_1a4.toUrl(_1b4.replace(/\./g,"/")+(url?("/"+url):"")+"/*.*").replace(/\/\*\.\*/,"")+(url?"":"/");}return _1b5;};}dojo._hasResource={};return dojo;});},"dojo/io-query":function(){define(["./_base/lang"],function(lang){var _1b6={};function _1b7(map){var enc=encodeURIComponent,_1b8=[];for(var name in map){var _1b9=map[name];if(_1b9!=_1b6[name]){var _1ba=enc(name)+"=";if(lang.isArray(_1b9)){for(var i=0,l=_1b9.length;i<l;++i){_1b8.push(_1ba+enc(_1b9[i]));}}else{_1b8.push(_1ba+enc(_1b9));}}}return _1b8.join("&");};function _1bb(str){var dec=decodeURIComponent,qp=str.split("&"),ret={},name,val;for(var i=0,l=qp.length,item;i<l;++i){item=qp[i];if(item.length){var s=item.indexOf("=");if(s<0){name=dec(item);val="";}else{name=dec(item.slice(0,s));val=dec(item.slice(s+1));}if(typeof ret[name]=="string"){ret[name]=[ret[name]];}if(lang.isArray(ret[name])){ret[name].push(val);}else{ret[name]=val;}}}return ret;};return {objectToQuery:_1b7,queryToObject:_1bb};});},"dojo/_base/Deferred":function(){define("dojo/_base/Deferred",["./kernel","./lang"],function(dojo,lang){var _1bc=function(){};var _1bd=Object.freeze||function(){};dojo.Deferred=function(_1be){var _1bf,_1c0,_1c1,head,_1c2;var _1c3=(this.promise={});function _1c4(_1c5){if(_1c0){throw new Error("This deferred has already been resolved");}_1bf=_1c5;_1c0=true;_1c6();};function _1c6(){var _1c7;while(!_1c7&&_1c2){var _1c8=_1c2;_1c2=_1c2.next;if((_1c7=(_1c8.progress==_1bc))){_1c0=false;}var func=(_1c1?_1c8.error:_1c8.resolved);if(func){try{var _1c9=func(_1bf);if(_1c9&&typeof _1c9.then==="function"){_1c9.then(lang.hitch(_1c8.deferred,"resolve"),lang.hitch(_1c8.deferred,"reject"),lang.hitch(_1c8.deferred,"progress"));continue;}var _1ca=_1c7&&_1c9===undefined;if(_1c7&&!_1ca){_1c1=_1c9 instanceof Error;}_1c8.deferred[_1ca&&_1c1?"reject":"resolve"](_1ca?_1bf:_1c9);}catch(e){_1c8.deferred.reject(e);}}else{if(_1c1){_1c8.deferred.reject(_1bf);}else{_1c8.deferred.resolve(_1bf);}}}};this.resolve=this.callback=function(_1cb){this.fired=0;this.results=[_1cb,null];_1c4(_1cb);};this.reject=this.errback=function(_1cc){_1c1=true;this.fired=1;_1c4(_1cc);this.results=[null,_1cc];if(!_1cc||_1cc.log!==false){(dojo.config.deferredOnError||function(x){console.error(x);})(_1cc);}};this.progress=function(_1cd){var _1ce=_1c2;while(_1ce){var _1cf=_1ce.progress;_1cf&&_1cf(_1cd);_1ce=_1ce.next;}};this.addCallbacks=function(_1d0,_1d1){this.then(_1d0,_1d1,_1bc);return this;};_1c3.then=this.then=function(_1d2,_1d3,_1d4){var _1d5=_1d4==_1bc?this:new dojo.Deferred(_1c3.cancel);var _1d6={resolved:_1d2,error:_1d3,progress:_1d4,deferred:_1d5};if(_1c2){head=head.next=_1d6;}else{_1c2=head=_1d6;}if(_1c0){_1c6();}return _1d5.promise;};var _1d7=this;_1c3.cancel=this.cancel=function(){if(!_1c0){var _1d8=_1be&&_1be(_1d7);if(!_1c0){if(!(_1d8 instanceof Error)){_1d8=new Error(_1d8);}_1d8.log=false;_1d7.reject(_1d8);}}};_1bd(_1c3);};lang.extend(dojo.Deferred,{addCallback:function(_1d9){return this.addCallbacks(lang.hitch.apply(dojo,arguments));},addErrback:function(_1da){return this.addCallbacks(null,lang.hitch.apply(dojo,arguments));},addBoth:function(_1db){var _1dc=lang.hitch.apply(dojo,arguments);return this.addCallbacks(_1dc,_1dc);},fired:-1});dojo.Deferred.when=dojo.when=function(_1dd,_1de,_1df,_1e0){if(_1dd&&typeof _1dd.then==="function"){return _1dd.then(_1de,_1df,_1e0);}return _1de?_1de(_1dd):_1dd;};return dojo.Deferred;});},"dojo/NodeList-dom":function(){define(["./_base/kernel","./query","./_base/array","./_base/lang","./dom-class","./dom-construct","./dom-geometry","./dom-attr","./dom-style"],function(dojo,_1e1,_1e2,lang,_1e3,_1e4,_1e5,_1e6,_1e7){var _1e8=function(a){return a.length==1&&(typeof a[0]=="string");};var _1e9=function(node){var p=node.parentNode;if(p){p.removeChild(node);}};var _1ea=_1e1.NodeList,awc=_1ea._adaptWithCondition,aafe=_1ea._adaptAsForEach,aam=_1ea._adaptAsMap;function _1eb(_1ec){return function(node,name,_1ed){if(arguments.length==2){return _1ec[typeof name=="string"?"get":"set"](node,name);}return _1ec.set(node,name,_1ed);};};lang.extend(_1ea,{_normalize:function(_1ee,_1ef){var _1f0=_1ee.parse===true;if(typeof _1ee.template=="string"){var _1f1=_1ee.templateFunc||(dojo.string&&dojo.string.substitute);_1ee=_1f1?_1f1(_1ee.template,_1ee):_1ee;}var type=(typeof _1ee);if(type=="string"||type=="number"){_1ee=_1e4.toDom(_1ee,(_1ef&&_1ef.ownerDocument));if(_1ee.nodeType==11){_1ee=lang._toArray(_1ee.childNodes);}else{_1ee=[_1ee];}}else{if(!lang.isArrayLike(_1ee)){_1ee=[_1ee];}else{if(!lang.isArray(_1ee)){_1ee=lang._toArray(_1ee);}}}if(_1f0){_1ee._runParse=true;}return _1ee;},_cloneNode:function(node){return node.cloneNode(true);},_place:function(ary,_1f2,_1f3,_1f4){if(_1f2.nodeType!=1&&_1f3=="only"){return;}var _1f5=_1f2,_1f6;var _1f7=ary.length;for(var i=_1f7-1;i>=0;i--){var node=(_1f4?this._cloneNode(ary[i]):ary[i]);if(ary._runParse&&dojo.parser&&dojo.parser.parse){if(!_1f6){_1f6=_1f5.ownerDocument.createElement("div");}_1f6.appendChild(node);dojo.parser.parse(_1f6);node=_1f6.firstChild;while(_1f6.firstChild){_1f6.removeChild(_1f6.firstChild);}}if(i==_1f7-1){_1e4.place(node,_1f5,_1f3);}else{_1f5.parentNode.insertBefore(node,_1f5);}_1f5=node;}},attr:awc(_1eb(_1e6),_1e8),style:awc(_1eb(_1e7),_1e8),addClass:aafe(_1e3.add),removeClass:aafe(_1e3.remove),replaceClass:aafe(_1e3.replace),toggleClass:aafe(_1e3.toggle),empty:aafe(_1e4.empty),removeAttr:aafe(_1e6.remove),position:aam(_1e5.position),marginBox:aam(_1e5.getMarginBox),place:function(_1f8,_1f9){var item=_1e1(_1f8)[0];return this.forEach(function(node){_1e4.place(node,item,_1f9);});},orphan:function(_1fa){return (_1fa?_1e1._filterResult(this,_1fa):this).forEach(_1e9);},adopt:function(_1fb,_1fc){return _1e1(_1fb).place(this[0],_1fc)._stash(this);},query:function(_1fd){if(!_1fd){return this;}var ret=new _1ea;this.map(function(node){_1e1(_1fd,node).forEach(function(_1fe){if(_1fe!==undefined){ret.push(_1fe);}});});return ret._stash(this);},filter:function(_1ff){var a=arguments,_200=this,_201=0;if(typeof _1ff=="string"){_200=_1e1._filterResult(this,a[0]);if(a.length==1){return _200._stash(this);}_201=1;}return this._wrap(_1e2.filter(_200,a[_201],a[_201+1]),this);},addContent:function(_202,_203){_202=this._normalize(_202,this[0]);for(var i=0,node;(node=this[i]);i++){this._place(_202,node,_203,i>0);}return this;}});return _1ea;});},"dojo/query":function(){define(["./_base/kernel","./has","./dom","./on","./_base/array","./_base/lang","./selector/_loader","./selector/_loader!default"],function(dojo,has,dom,on,_204,lang,_205,_206){"use strict";has.add("array-extensible",function(){return lang.delegate([],{length:1}).length==1&&!has("bug-for-in-skips-shadowed");});var ap=Array.prototype,aps=ap.slice,apc=ap.concat,_207=_204.forEach;var tnl=function(a,_208,_209){var _20a=new (_209||this._NodeListCtor||nl)(a);return _208?_20a._stash(_208):_20a;};var _20b=function(f,a,o){a=[0].concat(aps.call(a,0));o=o||dojo.global;return function(node){a[0]=node;return f.apply(o,a);};};var _20c=function(f,o){return function(){this.forEach(_20b(f,arguments,o));return this;};};var _20d=function(f,o){return function(){return this.map(_20b(f,arguments,o));};};var _20e=function(f,o){return function(){return this.filter(_20b(f,arguments,o));};};var _20f=function(f,g,o){return function(){var a=arguments,body=_20b(f,a,o);if(g.call(o||dojo.global,a)){return this.map(body);}this.forEach(body);return this;};};var _210=function(_211){var _212=this instanceof nl&&has("array-extensible");if(typeof _211=="number"){_211=Array(_211);}var _213=(_211&&"length" in _211)?_211:arguments;if(_212||!_213.sort){var _214=_212?this:[],l=_214.length=_213.length;for(var i=0;i<l;i++){_214[i]=_213[i];}if(_212){return _214;}_213=_214;}lang._mixin(_213,nlp);_213._NodeListCtor=function(_215){return nl(_215);};return _213;};var nl=_210,nlp=nl.prototype=has("array-extensible")?[]:{};nl._wrap=nlp._wrap=tnl;nl._adaptAsMap=_20d;nl._adaptAsForEach=_20c;nl._adaptAsFilter=_20e;nl._adaptWithCondition=_20f;_207(["slice","splice"],function(name){var f=ap[name];nlp[name]=function(){return this._wrap(f.apply(this,arguments),name=="slice"?this:null);};});_207(["indexOf","lastIndexOf","every","some"],function(name){var f=_204[name];nlp[name]=function(){return f.apply(dojo,[this].concat(aps.call(arguments,0)));};});lang.extend(_210,{constructor:nl,_NodeListCtor:nl,toString:function(){return this.join(",");},_stash:function(_216){this._parent=_216;return this;},on:function(_217,_218){var _219=this.map(function(node){return on(node,_217,_218);});_219.remove=function(){for(var i=0;i<_219.length;i++){_219[i].remove();}};return _219;},end:function(){if(this._parent){return this._parent;}else{return new this._NodeListCtor(0);}},concat:function(item){var t=lang.isArray(this)?this:aps.call(this,0),m=_204.map(arguments,function(a){return a&&!lang.isArray(a)&&(typeof _210!="undefined"&&a.constructor===_210||a.constructor===this._NodeListCtor)?aps.call(a,0):a;});return this._wrap(apc.apply(t,m),this);},map:function(func,obj){return this._wrap(_204.map(this,func,obj),this);},forEach:function(_21a,_21b){_207(this,_21a,_21b);return this;},filter:function(_21c){var a=arguments,_21d=this,_21e=0;if(typeof _21c=="string"){_21d=_21f._filterResult(this,a[0]);if(a.length==1){return _21d._stash(this);}_21e=1;}return this._wrap(_204.filter(_21d,a[_21e],a[_21e+1]),this);},instantiate:function(_220,_221){var c=lang.isFunction(_220)?_220:lang.getObject(_220);_221=_221||{};return this.forEach(function(node){new c(_221,node);});},at:function(){var t=new this._NodeListCtor(0);_207(arguments,function(i){if(i<0){i=this.length+i;}if(this[i]){t.push(this[i]);}},this);return t._stash(this);}});function _222(_223,_224){var _225=function(_226,root){if(typeof root=="string"){root=dom.byId(root);if(!root){return new _224([]);}}var _227=typeof _226=="string"?_223(_226,root):_226.orphan?_226:[_226];if(_227.orphan){return _227;}return new _224(_227);};_225.matches=_223.match||function(node,_228,root){return _225.filter([node],_228,root).length>0;};_225.filter=_223.filter||function(_229,_22a,root){return _225(_22a,root).filter(function(node){return _204.indexOf(_229,node)>-1;});};if(typeof _223!="function"){var _22b=_223.search;_223=function(_22c,root){return _22b(root||document,_22c);};}return _225;};var _21f=_222(_206,_210);dojo.query=_222(_206,function(_22d){return _210(_22d);});_21f.load=function(id,_22e,_22f,_230){_205.load(id,_22e,function(_231){_22f(_222(_231,_210));});};dojo._filterQueryResult=_21f._filterResult=function(_232,_233,root){return new _210(_21f.filter(_232,_233,root));};dojo.NodeList=_21f.NodeList=_210;return _21f;});},"dojo/has":function(){define(["require"],function(_234){var has=_234.has||function(){};if(!1){var _235=typeof window!="undefined"&&typeof location!="undefined"&&typeof document!="undefined"&&window.location==location&&window.document==document,_236=this,doc=_235&&document,_237=doc&&doc.createElement("DiV"),_238={};has=function(name){return typeof _238[name]=="function"?(_238[name]=_238[name](_236,doc,_237)):_238[name];};has.cache=_238;has.add=function(name,test,now,_239){(typeof _238[name]=="undefined"||_239)&&(_238[name]=test);return now&&has(name);};true||has.add("host-browser",_235);true||has.add("dom",_235);true||has.add("dojo-dom-ready-api",1);true||has.add("dojo-sniff",1);}if(1){var _23a=navigator.userAgent;has.add("dom-addeventlistener",!!document.addEventListener);has.add("touch","ontouchstart" in document);has.add("device-width",screen.availWidth||innerWidth);has.add("agent-ios",!!_23a.match(/iPhone|iP[ao]d/));has.add("agent-android",_23a.indexOf("android")>1);}has.clearElement=function(_23b){_23b.innerHTML="";return _23b;};has.normalize=function(id,_23c){var _23d=id.match(/[\?:]|[^:\?]*/g),i=0,get=function(skip){var term=_23d[i++];if(term==":"){return 0;}else{if(_23d[i++]=="?"){if(!skip&&has(term)){return get();}else{get(true);return get(skip);}}return term||0;}};id=get();return id&&_23c(id);};has.load=function(id,_23e,_23f){if(id){_23e([id],_23f);}else{_23f();}};return has;});},"dojo/_base/loader":function(){define(["./kernel","../has","require","module","./json","./lang","./array"],function(dojo,has,_240,_241,json,lang,_242){if(!1){console.error("cannot load the Dojo v1.x loader with a foreign loader");return 0;}var _243=function(id){return {src:_241.id,id:id};},_244=function(name){return name.replace(/\./g,"/");},_245=/\/\/>>built/,_246=[],_247=[],_248=function(mid,_249,_24a){_246.push(_24a);_242.forEach(mid.split(","),function(mid){var _24b=_24c(mid,_249.module);_247.push(_24b);_24d(_24b);});_24e();},_24f,_250=function(m){_24f[m.mid]=1;for(var t,_251,deps=m.deps||[],i=0;i<deps.length;i++){_251=deps[i];if(!(t=_24f[_251.mid])){if(t===0||!_250(_251)){_24f[m.mid]=0;return false;}}}return true;},_24e=function(){var _252,mid;_24f={};for(mid in _253){_252=_253[mid];if(_252.executed||_252.noReqPluginCheck){_24f[mid]=1;}else{if(_252.noReqPluginCheck!==0){_252.noReqPluginCheck=/loadInit\!/.test(mid)||/require\!/.test(mid)?1:0;}if(_252.noReqPluginCheck){_24f[mid]=1;}else{if(_252.injected!==_254){_24f[mid]=0;}}}}for(var t,i=0,end=_247.length;i<end;i++){_252=_247[i];if(!(t=_24f[_252.mid])){if(t===0||!_250(_252)){return;}}}_255.holdIdle();var _256=_246;_246=[];_242.forEach(_256,function(cb){cb(1);});_255.releaseIdle();},_257=function(mid,_258,_259){_258([mid],function(_25a){_258(_25a.names,function(){for(var _25b="",args=[],i=0;i<arguments.length;i++){_25b+="var "+_25a.names[i]+"= arguments["+i+"]; ";args.push(arguments[i]);}eval(_25b);var _25c=_258.module,deps=[],hold={},_25d=[],p,_25e={provide:function(_25f){_25f=_244(_25f);var _260=_24c(_25f,_25c);if(_260!==_25c){_284(_260);}},require:function(_261,_262){_261=_244(_261);_262&&(_24c(_261,_25c).result=_27f);_25d.push(_261);},requireLocalization:function(_263,_264,_265){deps.length||(deps=["dojo/i18n"]);_265=(_265||dojo.locale).toLowerCase();_263=_244(_263)+"/nls/"+(/root/i.test(_265)?"":_265+"/")+_244(_264);if(_24c(_263,_25c).isXd){deps.push("dojo/i18n!"+_263);}},loadInit:function(f){f();}};try{for(p in _25e){hold[p]=dojo[p];dojo[p]=_25e[p];}_25a.def.apply(null,args);}catch(e){_285("error",[_243("failedDojoLoadInit"),e]);}finally{for(p in _25e){dojo[p]=hold[p];}}_25d.length&&deps.push("dojo/require!"+_25d.join(","));_246.push(_259);_242.forEach(_25d,function(mid){var _266=_24c(mid,_258.module);_247.push(_266);_24d(_266);});_24e();});});},_267=function(text,_268,_269){var _26a=/\(|\)/g,_26b=1,_26c;_26a.lastIndex=_268;while((_26c=_26a.exec(text))){if(_26c[0]==")"){_26b-=1;}else{_26b+=1;}if(_26b==0){break;}}if(_26b!=0){throw "unmatched paren around character "+_26a.lastIndex+" in: "+text;}return [dojo.trim(text.substring(_269,_26a.lastIndex))+";\n",_26a.lastIndex];},_26d=/(\/\*([\s\S]*?)\*\/|\/\/(.*)$)/mg,_26e=/(^|\s)dojo\.(loadInit|require|provide|requireLocalization|requireIf|requireAfterIf|platformRequire)\s*\(/mg,_26f=/(^|\s)(require|define)\s*\(/m,_270=function(text,_271){var _272,_273,_274,_275,_276=[],_277=[],_278=[];_271=_271||text.replace(_26d,function(_279){_26e.lastIndex=_26f.lastIndex=0;return (_26e.test(_279)||_26f.test(_279))?"":_279;});while((_272=_26e.exec(_271))){_273=_26e.lastIndex;_274=_273-_272[0].length;_275=_267(_271,_273,_274);if(_272[2]=="loadInit"){_276.push(_275[0]);}else{_277.push(_275[0]);}_26e.lastIndex=_275[1];}_278=_276.concat(_277);if(_278.length||!_26f.test(_271)){return [text.replace(/(^|\s)dojo\.loadInit\s*\(/g,"\n0 && dojo.loadInit("),_278.join(""),_278];}else{return 0;}},_27a=function(_27b,text){var _27c,id,_27d=[],_27e=[];if(_245.test(text)||!(_27c=_270(text))){return 0;}id=_27b.mid+"-*loadInit";for(var p in _24c("dojo",_27b).result.scopeMap){_27d.push(p);_27e.push("\""+p+"\"");}return "// xdomain rewrite of "+_27b.path+"\n"+"define('"+id+"',{\n"+"\tnames:"+dojo.toJson(_27d)+",\n"+"\tdef:function("+_27d.join(",")+"){"+_27c[1]+"}"+"});\n\n"+"define("+dojo.toJson(_27d.concat(["dojo/loadInit!"+id]))+", function("+_27d.join(",")+"){\n"+_27c[0]+"});";},_255=_240.initSyncLoader(_248,_24e,_27a),sync=_255.sync,xd=_255.xd,_254=_255.arrived,_27f=_255.nonmodule,_280=_255.executing,_281=_255.executed,_282=_255.syncExecStack,_253=_255.modules,_283=_255.execQ,_24c=_255.getModule,_24d=_255.injectModule,_284=_255.setArrived,_285=_255.signal,_286=_255.finishExec,_287=_255.execModule,_288=_255.getLegacyMode;dojo.provide=function(mid){var _289=_282[0],_28a=lang.mixin(_24c(_244(mid),_240.module),{executed:_280,result:lang.getObject(mid,true)});_284(_28a);if(_289){(_289.provides||(_289.provides=[])).push(function(){_28a.result=lang.getObject(mid);delete _28a.provides;_28a.executed!==_281&&_286(_28a);});}return _28a.result;};has.add("config-publishRequireResult",1,0,0);dojo.require=function(_28b,_28c){function _28d(mid,_28e){var _28f=_24c(_244(mid),_240.module);if(_282.length&&_282[0].finish){_282[0].finish.push(mid);return undefined;}if(_28f.executed){return _28f.result;}_28e&&(_28f.result=_27f);var _290=_288();_24d(_28f);_290=_288();if(_28f.executed!==_281&&_28f.injected===_254){_255.holdIdle();_287(_28f);_255.releaseIdle();}if(_28f.executed){return _28f.result;}if(_290==sync){if(_28f.cjs){_283.unshift(_28f);}else{_282.length&&(_282[0].finish=[mid]);}}else{_283.push(_28f);}return undefined;};var _291=_28d(_28b,_28c);if(has("config-publishRequireResult")&&!lang.exists(_28b)&&_291!==undefined){lang.setObject(_28b,_291);}return _291;};dojo.loadInit=function(f){f();};dojo.registerModulePath=function(_292,_293){var _294={};_294[_292.replace(/\./g,"/")]=_293;_240({paths:_294});};dojo.platformRequire=function(_295){var _296=(_295.common||[]).concat(_295[dojo._name]||_295["default"]||[]),temp;while(_296.length){if(lang.isArray(temp=_296.shift())){dojo.require.apply(dojo,temp);}else{dojo.require(temp);}}};dojo.requireIf=dojo.requireAfterIf=function(_297,_298,_299){if(_297){dojo.require(_298,_299);}};dojo.requireLocalization=function(_29a,_29b,_29c){_240(["../i18n"],function(i18n){i18n.getLocalization(_29a,_29b,_29c);});};return {extractLegacyApiApplications:_270,require:_255.dojoRequirePlugin,loadInit:_257};});},"dojo/json":function(){define(["./has"],function(has){"use strict";var _29d=typeof JSON!="undefined";has.add("json-parse",_29d);has.add("json-stringify",_29d&&JSON.stringify({a:0},function(k,v){return v||1;})=="{\"a\":1}");if(has("json-stringify")){return JSON;}else{var _29e=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");};return {parse:has("json-parse")?JSON.parse:function(str,_29f){if(_29f&&!/^([\s\[\{]*(?:"(?:\\.|[^"])+"|-?\d[\d\.]*(?:[Ee][+-]?\d+)?|null|true|false|)[\s\]\}]*(?:,|:|$))+$/.test(str)){throw new SyntaxError("Invalid characters in JSON");}return eval("("+str+")");},stringify:function(_2a0,_2a1,_2a2){var _2a3;if(typeof _2a1=="string"){_2a2=_2a1;_2a1=null;}function _2a4(it,_2a5,key){if(_2a1){it=_2a1(key,it);}var val,_2a6=typeof it;if(_2a6=="number"){return isFinite(it)?it+"":"null";}if(_2a6=="boolean"){return it+"";}if(it===null){return "null";}if(typeof it=="string"){return _29e(it);}if(_2a6=="function"||_2a6=="undefined"){return _2a3;}if(typeof it.toJSON=="function"){return _2a4(it.toJSON(key),_2a5,key);}if(it instanceof Date){return "\"{FullYear}-{Month+}-{Date}T{Hours}:{Minutes}:{Seconds}Z\"".replace(/\{(\w+)(\+)?\}/g,function(t,prop,plus){var num=it["getUTC"+prop]()+(plus?1:0);return num<10?"0"+num:num;});}if(it.valueOf()!==it){return _2a4(it.valueOf(),_2a5,key);}var _2a7=_2a2?(_2a5+_2a2):"";var sep=_2a2?" ":"";var _2a8=_2a2?"\n":"";if(it instanceof Array){var itl=it.length,res=[];for(key=0;key<itl;key++){var obj=it[key];val=_2a4(obj,_2a7,key);if(typeof val!="string"){val="null";}res.push(_2a8+_2a7+val);}return "["+res.join(",")+_2a8+_2a5+"]";}var _2a9=[];for(key in it){var _2aa;if(typeof key=="number"){_2aa="\""+key+"\"";}else{if(typeof key=="string"){_2aa=_29e(key);}else{continue;}}val=_2a4(it[key],_2a7,key);if(typeof val!="string"){continue;}_2a9.push(_2a8+_2a7+_2aa+":"+sep+val);}return "{"+_2a9.join(",")+_2a8+_2a5+"}";};return _2a4(_2a0,"","");}};}});},"dojo/_base/declare":function(){define(["./kernel","../has","./lang"],function(dojo,has,lang){var mix=lang.mixin,op=Object.prototype,opts=op.toString,xtor=new Function,_2ab=0,_2ac="constructor";function err(msg,cls){throw new Error("declare"+(cls?" "+cls:"")+": "+msg);};function _2ad(_2ae,_2af){var _2b0=[],_2b1=[{cls:0,refs:[]}],_2b2={},_2b3=1,l=_2ae.length,i=0,j,lin,base,top,_2b4,rec,name,refs;for(;i<l;++i){base=_2ae[i];if(!base){err("mixin #"+i+" is unknown. Did you use dojo.require to pull it in?",_2af);}else{if(opts.call(base)!="[object Function]"){err("mixin #"+i+" is not a callable constructor.",_2af);}}lin=base._meta?base._meta.bases:[base];top=0;for(j=lin.length-1;j>=0;--j){_2b4=lin[j].prototype;if(!_2b4.hasOwnProperty("declaredClass")){_2b4.declaredClass="uniqName_"+(_2ab++);}name=_2b4.declaredClass;if(!_2b2.hasOwnProperty(name)){_2b2[name]={count:0,refs:[],cls:lin[j]};++_2b3;}rec=_2b2[name];if(top&&top!==rec){rec.refs.push(top);++top.count;}top=rec;}++top.count;_2b1[0].refs.push(top);}while(_2b1.length){top=_2b1.pop();_2b0.push(top.cls);--_2b3;while(refs=top.refs,refs.length==1){top=refs[0];if(!top||--top.count){top=0;break;}_2b0.push(top.cls);--_2b3;}if(top){for(i=0,l=refs.length;i<l;++i){top=refs[i];if(!--top.count){_2b1.push(top);}}}}if(_2b3){err("can't build consistent linearization",_2af);}base=_2ae[0];_2b0[0]=base?base._meta&&base===_2b0[_2b0.length-base._meta.bases.length]?base._meta.bases.length:1:0;return _2b0;};function _2b5(args,a,f){var name,_2b6,_2b7,_2b8,meta,base,_2b9,opf,pos,_2ba=this._inherited=this._inherited||{};if(typeof args=="string"){name=args;args=a;a=f;}f=0;_2b8=args.callee;name=name||_2b8.nom;if(!name){err("can't deduce a name to call inherited()",this.declaredClass);}meta=this.constructor._meta;_2b7=meta.bases;pos=_2ba.p;if(name!=_2ac){if(_2ba.c!==_2b8){pos=0;base=_2b7[0];meta=base._meta;if(meta.hidden[name]!==_2b8){_2b6=meta.chains;if(_2b6&&typeof _2b6[name]=="string"){err("calling chained method with inherited: "+name,this.declaredClass);}do{meta=base._meta;_2b9=base.prototype;if(meta&&(_2b9[name]===_2b8&&_2b9.hasOwnProperty(name)||meta.hidden[name]===_2b8)){break;}}while(base=_2b7[++pos]);pos=base?pos:-1;}}base=_2b7[++pos];if(base){_2b9=base.prototype;if(base._meta&&_2b9.hasOwnProperty(name)){f=_2b9[name];}else{opf=op[name];do{_2b9=base.prototype;f=_2b9[name];if(f&&(base._meta?_2b9.hasOwnProperty(name):f!==opf)){break;}}while(base=_2b7[++pos]);}}f=base&&f||op[name];}else{if(_2ba.c!==_2b8){pos=0;meta=_2b7[0]._meta;if(meta&&meta.ctor!==_2b8){_2b6=meta.chains;if(!_2b6||_2b6.constructor!=="manual"){err("calling chained constructor with inherited",this.declaredClass);}while(base=_2b7[++pos]){meta=base._meta;if(meta&&meta.ctor===_2b8){break;}}pos=base?pos:-1;}}while(base=_2b7[++pos]){meta=base._meta;f=meta?meta.ctor:base;if(f){break;}}f=base&&f;}_2ba.c=f;_2ba.p=pos;if(f){return a===true?f:f.apply(this,a||args);}};function _2bb(name,args){if(typeof name=="string"){return this.__inherited(name,args,true);}return this.__inherited(name,true);};function _2bc(args,a1,a2){var f=this.getInherited(args,a1);if(f){return f.apply(this,a2||a1||args);}};var _2bd=dojo.config.isDebug?_2bc:_2b5;function _2be(cls){var _2bf=this.constructor._meta.bases;for(var i=0,l=_2bf.length;i<l;++i){if(_2bf[i]===cls){return true;}}return this instanceof cls;};function _2c0(_2c1,_2c2){for(var name in _2c2){if(name!=_2ac&&_2c2.hasOwnProperty(name)){_2c1[name]=_2c2[name];}}if(has("bug-for-in-skips-shadowed")){for(var _2c3=lang._extraNames,i=_2c3.length;i;){name=_2c3[--i];if(name!=_2ac&&_2c2.hasOwnProperty(name)){_2c1[name]=_2c2[name];}}}};function _2c4(_2c5,_2c6){var name,t;for(name in _2c6){t=_2c6[name];if((t!==op[name]||!(name in op))&&name!=_2ac){if(opts.call(t)=="[object Function]"){t.nom=name;}_2c5[name]=t;}}if(has("bug-for-in-skips-shadowed")){for(var _2c7=lang._extraNames,i=_2c7.length;i;){name=_2c7[--i];t=_2c6[name];if((t!==op[name]||!(name in op))&&name!=_2ac){if(opts.call(t)=="[object Function]"){t.nom=name;}_2c5[name]=t;}}}return _2c5;};function _2c8(_2c9){_2ca.safeMixin(this.prototype,_2c9);return this;};function _2cb(_2cc,_2cd){return function(){var a=arguments,args=a,a0=a[0],f,i,m,l=_2cc.length,_2ce;if(!(this instanceof a.callee)){return _2cf(a);}if(_2cd&&(a0&&a0.preamble||this.preamble)){_2ce=new Array(_2cc.length);_2ce[0]=a;for(i=0;;){a0=a[0];if(a0){f=a0.preamble;if(f){a=f.apply(this,a)||a;}}f=_2cc[i].prototype;f=f.hasOwnProperty("preamble")&&f.preamble;if(f){a=f.apply(this,a)||a;}if(++i==l){break;}_2ce[i]=a;}}for(i=l-1;i>=0;--i){f=_2cc[i];m=f._meta;f=m?m.ctor:f;if(f){f.apply(this,_2ce?_2ce[i]:a);}}f=this.postscript;if(f){f.apply(this,args);}};};function _2d0(ctor,_2d1){return function(){var a=arguments,t=a,a0=a[0],f;if(!(this instanceof a.callee)){return _2cf(a);}if(_2d1){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 _2d2(_2d3){return function(){var a=arguments,i=0,f,m;if(!(this instanceof a.callee)){return _2cf(a);}for(;f=_2d3[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 _2d4(name,_2d5,_2d6){return function(){var b,m,f,i=0,step=1;if(_2d6){i=_2d5.length-1;step=-1;}for(;b=_2d5[i];i+=step){m=b._meta;f=(m?m.hidden:b.prototype)[name];if(f){f.apply(this,arguments);}}};};function _2d7(ctor){xtor.prototype=ctor.prototype;var t=new xtor;xtor.prototype=null;return t;};function _2cf(args){var ctor=args.callee,t=_2d7(ctor);ctor.apply(t,args);return t;};function _2ca(_2d8,_2d9,_2da){if(typeof _2d8!="string"){_2da=_2d9;_2d9=_2d8;_2d8="";}_2da=_2da||{};var _2db,i,t,ctor,name,_2dc,_2dd,_2de=1,_2df=_2d9;if(opts.call(_2d9)=="[object Array]"){_2dc=_2ad(_2d9,_2d8);t=_2dc[0];_2de=_2dc.length-t;_2d9=_2dc[_2de];}else{_2dc=[0];if(_2d9){if(opts.call(_2d9)=="[object Function]"){t=_2d9._meta;_2dc=_2dc.concat(t?t.bases:_2d9);}else{err("base class is not a callable constructor.",_2d8);}}else{if(_2d9!==null){err("unknown base class. Did you use dojo.require to pull it in?",_2d8);}}}if(_2d9){for(i=_2de-1;;--i){_2db=_2d7(_2d9);if(!i){break;}t=_2dc[i];(t._meta?_2c0:mix)(_2db,t.prototype);ctor=new Function;ctor.superclass=_2d9;ctor.prototype=_2db;_2d9=_2db.constructor=ctor;}}else{_2db={};}_2ca.safeMixin(_2db,_2da);t=_2da.constructor;if(t!==op.constructor){t.nom=_2ac;_2db.constructor=t;}for(i=_2de-1;i;--i){t=_2dc[i]._meta;if(t&&t.chains){_2dd=mix(_2dd||{},t.chains);}}if(_2db["-chains-"]){_2dd=mix(_2dd||{},_2db["-chains-"]);}t=!_2dd||!_2dd.hasOwnProperty(_2ac);_2dc[0]=ctor=(_2dd&&_2dd.constructor==="manual")?_2d2(_2dc):(_2dc.length==1?_2d0(_2da.constructor,t):_2cb(_2dc,t));ctor._meta={bases:_2dc,hidden:_2da,chains:_2dd,parents:_2df,ctor:_2da.constructor};ctor.superclass=_2d9&&_2d9.prototype;ctor.extend=_2c8;ctor.prototype=_2db;_2db.constructor=ctor;_2db.getInherited=_2bb;_2db.isInstanceOf=_2be;_2db.inherited=_2bd;_2db.__inherited=_2b5;if(_2d8){_2db.declaredClass=_2d8;lang.setObject(_2d8,ctor);}if(_2dd){for(name in _2dd){if(_2db[name]&&typeof _2dd[name]=="string"&&name!=_2ac){t=_2db[name]=_2d4(name,_2dc,_2dd[name]==="after");t.nom=name;}}}return ctor;};dojo.safeMixin=_2ca.safeMixin=_2c4;dojo.declare=_2ca;return _2ca;});},"dojo/dom":function(){define(["./_base/sniff","./_base/lang","./_base/window"],function(has,lang,win){try{document.execCommand("BackgroundImageCache",false,true);}catch(e){}var dom={};if(has("ie")){dom.byId=function(id,doc){if(typeof id!="string"){return id;}var _2e0=doc||win.doc,te=id&&_2e0.getElementById(id);if(te&&(te.attributes.id.value==id||te.id==id)){return te;}else{var eles=_2e0.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{dom.byId=function(id,doc){return ((typeof id=="string")?(doc||win.doc).getElementById(id):id)||null;};}dom.isDescendant=function(node,_2e1){try{node=dom.byId(node);_2e1=dom.byId(_2e1);while(node){if(node==_2e1){return true;}node=node.parentNode;}}catch(e){}return false;};dom.setSelectable=function(node,_2e2){node=dom.byId(node);if(has("mozilla")){node.style.MozUserSelect=_2e2?"":"none";}else{if(has("khtml")||has("webkit")){node.style.KhtmlUserSelect=_2e2?"auto":"none";}else{if(has("ie")){var v=(node.unselectable=_2e2?"":"on"),cs=node.getElementsByTagName("*"),i=0,l=cs.length;for(;i<l;++i){cs.item(i).unselectable=v;}}}}};return dom;});},"dojo/_base/browser":function(){if(require.has){require.has.add("config-selectorEngine","acme");}define("dojo/_base/browser",["../ready","./kernel","./connect","./unload","./window","./event","./html","./NodeList","../query","./xhr","./fx"],function(dojo){return dojo;});},"dojo/selector/acme":function(){define(["../_base/kernel","../has","../dom","../_base/sniff","../_base/array","../_base/lang","../_base/window"],function(dojo,has,dom){var trim=dojo.trim;var each=dojo.forEach;var _2e3=function(){return dojo.doc;};var _2e4=((dojo.isWebKit||dojo.isMozilla)&&((_2e3().compatMode)=="BackCompat"));var _2e5=">~+";var _2e6=false;var _2e7=function(){return true;};var _2e8=function(_2e9){if(_2e5.indexOf(_2e9.slice(-1))>=0){_2e9+=" * ";}else{_2e9+=" ";}var ts=function(s,e){return trim(_2e9.slice(s,e));};var _2ea=[];var _2eb=-1,_2ec=-1,_2ed=-1,_2ee=-1,_2ef=-1,inId=-1,_2f0=-1,lc="",cc="",_2f1;var x=0,ql=_2e9.length,_2f2=null,_2f3=null;var _2f4=function(){if(_2f0>=0){var tv=(_2f0==x)?null:ts(_2f0,x);_2f2[(_2e5.indexOf(tv)<0)?"tag":"oper"]=tv;_2f0=-1;}};var _2f5=function(){if(inId>=0){_2f2.id=ts(inId,x).replace(/\\/g,"");inId=-1;}};var _2f6=function(){if(_2ef>=0){_2f2.classes.push(ts(_2ef+1,x).replace(/\\/g,""));_2ef=-1;}};var _2f7=function(){_2f5();_2f4();_2f6();};var _2f8=function(){_2f7();if(_2ee>=0){_2f2.pseudos.push({name:ts(_2ee+1,x)});}_2f2.loops=(_2f2.pseudos.length||_2f2.attrs.length||_2f2.classes.length);_2f2.oquery=_2f2.query=ts(_2f1,x);_2f2.otag=_2f2.tag=(_2f2["oper"])?null:(_2f2.tag||"*");if(_2f2.tag){_2f2.tag=_2f2.tag.toUpperCase();}if(_2ea.length&&(_2ea[_2ea.length-1].oper)){_2f2.infixOper=_2ea.pop();_2f2.query=_2f2.infixOper.query+" "+_2f2.query;}_2ea.push(_2f2);_2f2=null;};for(;lc=cc,cc=_2e9.charAt(x),x<ql;x++){if(lc=="\\"){continue;}if(!_2f2){_2f1=x;_2f2={query:null,pseudos:[],attrs:[],classes:[],tag:null,oper:null,id:null,getTag:function(){return (_2e6)?this.otag:this.tag;}};_2f0=x;}if(_2eb>=0){if(cc=="]"){if(!_2f3.attr){_2f3.attr=ts(_2eb+1,x);}else{_2f3.matchFor=ts((_2ed||_2eb+1),x);}var cmf=_2f3.matchFor;if(cmf){if((cmf.charAt(0)=="\"")||(cmf.charAt(0)=="'")){_2f3.matchFor=cmf.slice(1,-1);}}_2f2.attrs.push(_2f3);_2f3=null;_2eb=_2ed=-1;}else{if(cc=="="){var _2f9=("|~^$*".indexOf(lc)>=0)?lc:"";_2f3.type=_2f9+cc;_2f3.attr=ts(_2eb+1,x-_2f9.length);_2ed=x+1;}}}else{if(_2ec>=0){if(cc==")"){if(_2ee>=0){_2f3.value=ts(_2ec+1,x);}_2ee=_2ec=-1;}}else{if(cc=="#"){_2f7();inId=x+1;}else{if(cc=="."){_2f7();_2ef=x;}else{if(cc==":"){_2f7();_2ee=x;}else{if(cc=="["){_2f7();_2eb=x;_2f3={};}else{if(cc=="("){if(_2ee>=0){_2f3={name:ts(_2ee+1,x),value:null};_2f2.pseudos.push(_2f3);}_2ec=x;}else{if((cc==" ")&&(lc!=cc)){_2f8();}}}}}}}}}return _2ea;};var _2fa=function(_2fb,_2fc){if(!_2fb){return _2fc;}if(!_2fc){return _2fb;}return function(){return _2fb.apply(window,arguments)&&_2fc.apply(window,arguments);};};var _2fd=function(i,arr){var r=arr||[];if(i){r.push(i);}return r;};var _2fe=function(n){return (1==n.nodeType);};var _2ff="";var _300=function(elem,attr){if(!elem){return _2ff;}if(attr=="class"){return elem.className||_2ff;}if(attr=="for"){return elem.htmlFor||_2ff;}if(attr=="style"){return elem.style.cssText||_2ff;}return (_2e6?elem.getAttribute(attr):elem.getAttribute(attr,2))||_2ff;};var _301={"*=":function(attr,_302){return function(elem){return (_300(elem,attr).indexOf(_302)>=0);};},"^=":function(attr,_303){return function(elem){return (_300(elem,attr).indexOf(_303)==0);};},"$=":function(attr,_304){return function(elem){var ea=" "+_300(elem,attr);return (ea.lastIndexOf(_304)==(ea.length-_304.length));};},"~=":function(attr,_305){var tval=" "+_305+" ";return function(elem){var ea=" "+_300(elem,attr)+" ";return (ea.indexOf(tval)>=0);};},"|=":function(attr,_306){var _307=_306+"-";return function(elem){var ea=_300(elem,attr);return ((ea==_306)||(ea.indexOf(_307)==0));};},"=":function(attr,_308){return function(elem){return (_300(elem,attr)==_308);};}};var _309=(typeof _2e3().firstChild.nextElementSibling=="undefined");var _30a=!_309?"nextElementSibling":"nextSibling";var _30b=!_309?"previousElementSibling":"previousSibling";var _30c=(_309?_2fe:_2e7);var _30d=function(node){while(node=node[_30b]){if(_30c(node)){return false;}}return true;};var _30e=function(node){while(node=node[_30a]){if(_30c(node)){return false;}}return true;};var _30f=function(node){var root=node.parentNode;var i=0,tret=root.children||root.childNodes,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[_30a]){if(_30c(te)){te["_i"]=++i;if(node===te){ci=i;}}}return ci;};var _310=function(elem){return !((_30f(elem))%2);};var _311=function(elem){return ((_30f(elem))%2);};var _312={"checked":function(name,_313){return function(elem){return !!("checked" in elem?elem.checked:elem.selected);};},"first-child":function(){return _30d;},"last-child":function(){return _30e;},"only-child":function(name,_314){return function(node){return _30d(node)&&_30e(node);};},"empty":function(name,_315){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,_316){var cz=_316.charAt(0);if(cz=="\""||cz=="'"){_316=_316.slice(1,-1);}return function(elem){return (elem.innerHTML.indexOf(_316)>=0);};},"not":function(name,_317){var p=_2e8(_317)[0];var _318={el:1};if(p.tag!="*"){_318.tag=1;}if(!p.classes.length){_318.classes=1;}var ntf=_319(p,_318);return function(elem){return (!ntf(elem));};},"nth-child":function(name,_31a){var pi=parseInt;if(_31a=="odd"){return _311;}else{if(_31a=="even"){return _310;}}if(_31a.indexOf("n")!=-1){var _31b=_31a.split("n",2);var pred=_31b[0]?((_31b[0]=="-")?-1:pi(_31b[0])):1;var idx=_31b[1]?pi(_31b[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=_30f(elem);return (i>=lb)&&(ub<0||i<=ub)&&((i%pred)==idx);};}else{_31a=idx;}}var _31c=pi(_31a);return function(elem){return (_30f(elem)==_31c);};}};var _31d=(dojo.isIE&&(dojo.isIE<9||dojo.isQuirks))?function(cond){var clc=cond.toLowerCase();if(clc=="class"){cond="className";}return function(elem){return (_2e6?elem.getAttribute(cond):elem[cond]||elem[clc]);};}:function(cond){return function(elem){return (elem&&elem.getAttribute&&elem.hasAttribute(cond));};};var _319=function(_31e,_31f){if(!_31e){return _2e7;}_31f=_31f||{};var ff=null;if(!("el" in _31f)){ff=_2fa(ff,_2fe);}if(!("tag" in _31f)){if(_31e.tag!="*"){ff=_2fa(ff,function(elem){return (elem&&(elem.tagName==_31e.getTag()));});}}if(!("classes" in _31f)){each(_31e.classes,function(_320,idx,arr){var re=new RegExp("(?:^|\\s)"+_320+"(?:\\s|$)");ff=_2fa(ff,function(elem){return re.test(elem.className);});ff.count=idx;});}if(!("pseudos" in _31f)){each(_31e.pseudos,function(_321){var pn=_321.name;if(_312[pn]){ff=_2fa(ff,_312[pn](pn,_321.value));}});}if(!("attrs" in _31f)){each(_31e.attrs,function(attr){var _322;var a=attr.attr;if(attr.type&&_301[attr.type]){_322=_301[attr.type](a,attr.matchFor);}else{if(a.length){_322=_31d(a);}}if(_322){ff=_2fa(ff,_322);}});}if(!("id" in _31f)){if(_31e.id){ff=_2fa(ff,function(elem){return (!!elem&&(elem.id==_31e.id));});}}if(!ff){if(!("default" in _31f)){ff=_2e7;}}return ff;};var _323=function(_324){return function(node,ret,bag){while(node=node[_30a]){if(_309&&(!_2fe(node))){continue;}if((!bag||_325(node,bag))&&_324(node)){ret.push(node);}break;}return ret;};};var _326=function(_327){return function(root,ret,bag){var te=root[_30a];while(te){if(_30c(te)){if(bag&&!_325(te,bag)){break;}if(_327(te)){ret.push(te);}}te=te[_30a];}return ret;};};var _328=function(_329){_329=_329||_2e7;return function(root,ret,bag){var te,x=0,tret=root.children||root.childNodes;while(te=tret[x++]){if(_30c(te)&&(!bag||_325(te,bag))&&(_329(te,x))){ret.push(te);}}return ret;};};var _32a=function(node,root){var pn=node.parentNode;while(pn){if(pn==root){break;}pn=pn.parentNode;}return !!pn;};var _32b={};var _32c=function(_32d){var _32e=_32b[_32d.query];if(_32e){return _32e;}var io=_32d.infixOper;var oper=(io?io.oper:"");var _32f=_319(_32d,{el:1});var qt=_32d.tag;var _330=("*"==qt);var ecs=_2e3()["getElementsByClassName"];if(!oper){if(_32d.id){_32f=(!_32d.loops&&_330)?_2e7:_319(_32d,{el:1,id:1});_32e=function(root,arr){var te=dom.byId(_32d.id,(root.ownerDocument||root));if(!te||!_32f(te)){return;}if(9==root.nodeType){return _2fd(te,arr);}else{if(_32a(te,root)){return _2fd(te,arr);}}};}else{if(ecs&&/\{\s*\[native code\]\s*\}/.test(String(ecs))&&_32d.classes.length&&!_2e4){_32f=_319(_32d,{el:1,classes:1,id:1});var _331=_32d.classes.join(" ");_32e=function(root,arr,bag){var ret=_2fd(0,arr),te,x=0;var tret=root.getElementsByClassName(_331);while((te=tret[x++])){if(_32f(te,root)&&_325(te,bag)){ret.push(te);}}return ret;};}else{if(!_330&&!_32d.loops){_32e=function(root,arr,bag){var ret=_2fd(0,arr),te,x=0;var tret=root.getElementsByTagName(_32d.getTag());while((te=tret[x++])){if(_325(te,bag)){ret.push(te);}}return ret;};}else{_32f=_319(_32d,{el:1,tag:1,id:1});_32e=function(root,arr,bag){var ret=_2fd(0,arr),te,x=0;var tret=root.getElementsByTagName(_32d.getTag());while((te=tret[x++])){if(_32f(te,root)&&_325(te,bag)){ret.push(te);}}return ret;};}}}}else{var _332={el:1};if(_330){_332.tag=1;}_32f=_319(_32d,_332);if("+"==oper){_32e=_323(_32f);}else{if("~"==oper){_32e=_326(_32f);}else{if(">"==oper){_32e=_328(_32f);}}}}return _32b[_32d.query]=_32e;};var _333=function(root,_334){var _335=_2fd(root),qp,x,te,qpl=_334.length,bag,ret;for(var i=0;i<qpl;i++){ret=[];qp=_334[i];x=_335.length-1;if(x>0){bag={};ret.nozip=true;}var gef=_32c(qp);for(var j=0;(te=_335[j]);j++){gef(te,ret,bag);}if(!ret.length){break;}_335=ret;}return ret;};var _336={},_337={};var _338=function(_339){var _33a=_2e8(trim(_339));if(_33a.length==1){var tef=_32c(_33a[0]);return function(root){var r=tef(root,[]);if(r){r.nozip=true;}return r;};}return function(root){return _333(root,_33a);};};var nua=navigator.userAgent;var wk="WebKit/";var _33b=(dojo.isWebKit&&(nua.indexOf(wk)>0)&&(parseFloat(nua.split(wk)[1])>528));var _33c=dojo.isIE?"commentStrip":"nozip";var qsa="querySelectorAll";var _33d=(!!_2e3()[qsa]&&(!dojo.isSafari||(dojo.isSafari>3.1)||_33b));var _33e=/n\+\d|([^ ])?([>~+])([^ =])?/g;var _33f=function(_340,pre,ch,post){return ch?(pre?pre+" ":"")+ch+(post?" "+post:""):_340;};var _341=function(_342,_343){_342=_342.replace(_33e,_33f);if(_33d){var _344=_337[_342];if(_344&&!_343){return _344;}}var _345=_336[_342];if(_345){return _345;}var qcz=_342.charAt(0);var _346=(-1==_342.indexOf(" "));if((_342.indexOf("#")>=0)&&(_346)){_343=true;}var _347=(_33d&&(!_343)&&(_2e5.indexOf(qcz)==-1)&&(!dojo.isIE||(_342.indexOf(":")==-1))&&(!(_2e4&&(_342.indexOf(".")>=0)))&&(_342.indexOf(":contains")==-1)&&(_342.indexOf(":checked")==-1)&&(_342.indexOf("|=")==-1));if(_347){var tq=(_2e5.indexOf(_342.charAt(_342.length-1))>=0)?(_342+" *"):_342;return _337[_342]=function(root){try{if(!((9==root.nodeType)||_346)){throw "";}var r=root[qsa](tq);r[_33c]=true;return r;}catch(e){return _341(_342,true)(root);}};}else{var _348=_342.split(/\s*,\s*/);return _336[_342]=((_348.length<2)?_338(_342):function(root){var _349=0,ret=[],tp;while((tp=_348[_349++])){ret=ret.concat(_338(tp)(root));}return ret;});}};var _34a=0;var _34b=dojo.isIE?function(node){if(_2e6){return (node.getAttribute("_uid")||node.setAttribute("_uid",++_34a)||_34a);}else{return node.uniqueID;}}:function(node){return (node._uid||(node._uid=++_34a));};var _325=function(node,bag){if(!bag){return 1;}var id=_34b(node);if(!bag[id]){return bag[id]=1;}return 0;};var _34c="_zipIdx";var _34d=function(arr){if(arr&&arr.nozip){return arr;}var ret=[];if(!arr||!arr.length){return ret;}if(arr[0]){ret.push(arr[0]);}if(arr.length<2){return ret;}_34a++;if(dojo.isIE&&_2e6){var _34e=_34a+"";arr[0].setAttribute(_34c,_34e);for(var x=1,te;te=arr[x];x++){if(arr[x].getAttribute(_34c)!=_34e){ret.push(te);}te.setAttribute(_34c,_34e);}}else{if(dojo.isIE&&arr.commentStrip){try{for(var x=1,te;te=arr[x];x++){if(_2fe(te)){ret.push(te);}}}catch(e){}}else{if(arr[0]){arr[0][_34c]=_34a;}for(var x=1,te;te=arr[x];x++){if(arr[x][_34c]!=_34a){ret.push(te);}te[_34c]=_34a;}}}return ret;};var _34f=function(_350,root){root=root||_2e3();var od=root.ownerDocument||root.documentElement;_2e6=(root.contentType&&root.contentType=="application/xml")||(dojo.isOpera&&(root.doctype||od.toString()=="[object XMLDocument]"))||(!!od)&&(dojo.isIE?od.xml:(root.xmlVersion||od.xmlVersion));var r=_341(_350)(root);if(r&&r.nozip){return r;}return _34d(r);};_34f.filter=function(_351,_352,root){var _353=[],_354=_2e8(_352),_355=(_354.length==1&&!/[^\w#\.]/.test(_352))?_319(_354[0]):function(node){return dojo.query(_352,root).indexOf(node)!=-1;};for(var x=0,te;te=_351[x];x++){if(_355(te)){_353.push(te);}}return _353;};return _34f;});},"dojo/dom-style":function(){define(["./_base/sniff","./dom"],function(has,dom){var _356,_357={};if(has("webkit")){_356=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(has("ie")&&(has("ie")<9||has("quirks"))){_356=function(node){return node.nodeType==1?node.currentStyle:{};};}else{_356=function(node){return node.nodeType==1?node.ownerDocument.defaultView.getComputedStyle(node,null):{};};}}_357.getComputedStyle=_356;var _358;if(!has("ie")){_358=function(_359,_35a){return parseFloat(_35a)||0;};}else{_358=function(_35b,_35c){if(!_35c){return 0;}if(_35c=="medium"){return 4;}if(_35c.slice&&_35c.slice(-2)=="px"){return parseFloat(_35c);}var s=_35b.style,rs=_35b.runtimeStyle,cs=_35b.currentStyle,_35d=s.left,_35e=rs.left;rs.left=cs.left;try{s.left=_35c;_35c=s.pixelLeft;}catch(e){_35c=0;}s.left=_35d;rs.left=_35e;return _35c;};}_357.toPixelValue=_358;var astr="DXImageTransform.Microsoft.Alpha";var af=function(n,f){try{return n.filters.item(astr);}catch(e){return f?{}:null;}};var _35f=has("ie")<9||(has("ie")&&has("quirks"))?function(node){try{return af(node).Opacity/100;}catch(e){return 1;}}:function(node){return _356(node).opacity;};var _360=has("ie")<9||(has("ie")&&has("quirks"))?function(node,_361){var ov=_361*100,_362=_361==1;node.style.zoom=_362?"":1;if(!af(node)){if(_362){return _361;}node.style.filter+=" progid:"+astr+"(Opacity="+ov+")";}else{af(node,1).Opacity=ov;}af(node,1).Enabled=!_362;if(node.tagName.toLowerCase()=="tr"){for(var td=node.firstChild;td;td=td.nextSibling){if(td.tagName.toLowerCase()=="td"){_360(td,_361);}}}return _361;}:function(node,_363){return node.style.opacity=_363;};var _364={left:true,top:true};var _365=/margin|padding|width|height|max|min|offset/;function _366(node,type,_367){type=type.toLowerCase();if(has("ie")){if(_367=="auto"){if(type=="height"){return node.offsetHeight;}if(type=="width"){return node.offsetWidth;}}if(type=="fontweight"){switch(_367){case 700:return "bold";case 400:default:return "normal";}}}if(!(type in _364)){_364[type]=_365.test(type);}return _364[type]?_358(node,_367):_367;};var _368=has("ie")?"styleFloat":"cssFloat",_369={"cssFloat":_368,"styleFloat":_368,"float":_368};_357.get=function getStyle(node,name){var n=dom.byId(node),l=arguments.length,op=(name=="opacity");if(l==2&&op){return _35f(n);}name=_369[name]||name;var s=_357.getComputedStyle(n);return (l==1)?s:_366(n,name,s[name]||n.style[name]);};_357.set=function setStyle(node,name,_36a){var n=dom.byId(node),l=arguments.length,op=(name=="opacity");name=_369[name]||name;if(l==3){return op?_360(n,_36a):n.style[name]=_36a;}for(var x in name){_357.set(node,x,name[x]);}return _357.getComputedStyle(n);};return _357;});},"dojo/dom-geometry":function(){define(["./_base/sniff","./_base/window","./dom","./dom-style"],function(has,win,dom,_36b){var geom={};geom.boxModel="content-box";if(has("ie")){geom.boxModel=document.compatMode=="BackCompat"?"border-box":"content-box";}geom.getPadExtents=function getPadExtents(node,_36c){node=dom.byId(node);var s=_36c||_36b.getComputedStyle(node),px=_36b.toPixelValue,l=px(node,s.paddingLeft),t=px(node,s.paddingTop),r=px(node,s.paddingRight),b=px(node,s.paddingBottom);return {l:l,t:t,r:r,b:b,w:l+r,h:t+b};};var none="none";geom.getBorderExtents=function getBorderExtents(node,_36d){node=dom.byId(node);var px=_36b.toPixelValue,s=_36d||_36b.getComputedStyle(node),l=s.borderLeftStyle!=none?px(node,s.borderLeftWidth):0,t=s.borderTopStyle!=none?px(node,s.borderTopWidth):0,r=s.borderRightStyle!=none?px(node,s.borderRightWidth):0,b=s.borderBottomStyle!=none?px(node,s.borderBottomWidth):0;return {l:l,t:t,r:r,b:b,w:l+r,h:t+b};};geom.getPadBorderExtents=function getPadBorderExtents(node,_36e){node=dom.byId(node);var s=_36e||_36b.getComputedStyle(node),p=geom.getPadExtents(node,s),b=geom.getBorderExtents(node,s);return {l:p.l+b.l,t:p.t+b.t,r:p.r+b.r,b:p.b+b.b,w:p.w+b.w,h:p.h+b.h};};geom.getMarginExtents=function getMarginExtents(node,_36f){node=dom.byId(node);var s=_36f||_36b.getComputedStyle(node),px=_36b.toPixelValue,l=px(node,s.marginLeft),t=px(node,s.marginTop),r=px(node,s.marginRight),b=px(node,s.marginBottom);if(has("webkit")&&(s.position!="absolute")){r=l;}return {l:l,t:t,r:r,b:b,w:l+r,h:t+b};};geom.getMarginBox=function getMarginBox(node,_370){node=dom.byId(node);var s=_370||_36b.getComputedStyle(node),me=geom.getMarginExtents(node,s),l=node.offsetLeft-me.l,t=node.offsetTop-me.t,p=node.parentNode,px=_36b.toPixelValue,pcs;if(has("mozilla")){var sl=parseFloat(s.left),st=parseFloat(s.top);if(!isNaN(sl)&&!isNaN(st)){l=sl,t=st;}else{if(p&&p.style){pcs=_36b.getComputedStyle(p);if(pcs.overflow!="visible"){l+=pcs.borderLeftStyle!=none?px(node,pcs.borderLeftWidth):0;t+=pcs.borderTopStyle!=none?px(node,pcs.borderTopWidth):0;}}}}else{if(has("opera")||(has("ie")==8&&!has("quirks"))){if(p){pcs=_36b.getComputedStyle(p);l-=pcs.borderLeftStyle!=none?px(node,pcs.borderLeftWidth):0;t-=pcs.borderTopStyle!=none?px(node,pcs.borderTopWidth):0;}}}return {l:l,t:t,w:node.offsetWidth+me.w,h:node.offsetHeight+me.h};};geom.getContentBox=function getContentBox(node,_371){node=dom.byId(node);var s=_371||_36b.getComputedStyle(node),w=node.clientWidth,h,pe=geom.getPadExtents(node,s),be=geom.getBorderExtents(node,s);if(!w){w=node.offsetWidth;h=node.offsetHeight;}else{h=node.clientHeight;be.w=be.h=0;}if(has("opera")){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};};function _372(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;}};function _373(node){return node.tagName.toLowerCase()=="button"||node.tagName.toLowerCase()=="input"&&(node.getAttribute("type")||"").toLowerCase()=="button";};function _374(node){return geom.boxModel=="border-box"||node.tagName.toLowerCase()=="table"||_373(node);};geom.setContentSize=function setContentSize(node,box,_375){node=dom.byId(node);var w=box.w,h=box.h;if(_374(node)){var pb=geom.getPadBorderExtents(node,_375);if(w>=0){w+=pb.w;}if(h>=0){h+=pb.h;}}_372(node,NaN,NaN,w,h);};var _376={l:0,t:0,w:0,h:0};geom.setMarginBox=function setMarginBox(node,box,_377){node=dom.byId(node);var s=_377||_36b.getComputedStyle(node),w=box.w,h=box.h,pb=_374(node)?_376:geom.getPadBorderExtents(node,s),mb=geom.getMarginExtents(node,s);if(has("webkit")){if(_373(node)){var ns=node.style;if(w>=0&&!ns.width){ns.width="4px";}if(h>=0&&!ns.height){ns.height="4px";}}}if(w>=0){w=Math.max(w-pb.w-mb.w,0);}if(h>=0){h=Math.max(h-pb.h-mb.h,0);}_372(node,box.l,box.t,w,h);};geom.isBodyLtr=function isBodyLtr(){return (win.body().dir||win.doc.documentElement.dir||"ltr").toLowerCase()=="ltr";};geom.docScroll=function docScroll(){var node=win.doc.parentWindow||win.doc.defaultView;return "pageXOffset" in node?{x:node.pageXOffset,y:node.pageYOffset}:(node=has("quirks")?win.body():win.doc.documentElement,{x:geom.fixIeBiDiScrollLeft(node.scrollLeft||0),y:node.scrollTop||0});};geom.getIeDocumentElementOffset=function getIeDocumentElementOffset(){var de=win.doc.documentElement;if(has("ie")<8){var r=de.getBoundingClientRect(),l=r.left,t=r.top;if(has("ie")<7){l+=de.clientLeft;t+=de.clientTop;}return {x:l<0?0:l,y:t<0?0:t};}else{return {x:0,y:0};}};geom.fixIeBiDiScrollLeft=function fixIeBiDiScrollLeft(_378){var ie=has("ie");if(ie&&!geom.isBodyLtr()){var qk=has("quirks"),de=qk?win.body():win.doc.documentElement;if(ie==6&&!qk&&win.global.frameElement&&de.scrollHeight>de.clientHeight){_378+=de.clientLeft;}return (ie<8||qk)?(_378+de.clientWidth-de.scrollWidth):-_378;}return _378;};geom.position=function(node,_379){node=dom.byId(node);var db=win.body(),dh=db.parentNode,ret=node.getBoundingClientRect();ret={x:ret.left,y:ret.top,w:ret.right-ret.left,h:ret.bottom-ret.top};if(has("ie")){var _37a=geom.getIeDocumentElementOffset();ret.x-=_37a.x+(has("quirks")?db.clientLeft+db.offsetLeft:0);ret.y-=_37a.y+(has("quirks")?db.clientTop+db.offsetTop:0);}else{if(has("ff")==3){var cs=_36b.getComputedStyle(dh),px=_36b.toPixelValue;ret.x-=px(dh,cs.marginLeft)+px(dh,cs.borderLeftWidth);ret.y-=px(dh,cs.marginTop)+px(dh,cs.borderTopWidth);}}if(_379){var _37b=geom.docScroll();ret.x+=_37b.x;ret.y+=_37b.y;}return ret;};geom.getMarginSize=function getMarginSize(node,_37c){node=dom.byId(node);var me=geom.getMarginExtents(node,_37c||_36b.getComputedStyle(node));var size=node.getBoundingClientRect();return {w:(size.right-size.left)+me.w,h:(size.bottom-size.top)+me.h};};geom.normalizeEvent=function(_37d){if(!("layerX" in _37d)){_37d.layerX=_37d.offsetX;_37d.layerY=_37d.offsetY;}if(!has("dom-addeventlistener")){var se=_37d.target;var doc=(se&&se.ownerDocument)||document;var _37e=has("quirks")?doc.body:doc.documentElement;var _37f=geom.getIeDocumentElementOffset();_37d.pageX=_37d.clientX+geom.fixIeBiDiScrollLeft(_37e.scrollLeft||0)-_37f.x;_37d.pageY=_37d.clientY+(_37e.scrollTop||0)-_37f.y;}};return geom;});},"dojo/dom-prop":function(){define("dojo/dom-prop",["exports","./_base/kernel","./_base/sniff","./_base/lang","./dom","./dom-style","./dom-construct","./_base/connect"],function(_380,dojo,has,lang,dom,_381,ctr,conn){var _382={},_383=0,_384=dojo._scopeName+"attrid";var _385={col:1,colgroup:1,table:1,tbody:1,tfoot:1,thead:1,tr:1,title:1};_380.names={"class":"className","for":"htmlFor",tabindex:"tabIndex",readonly:"readOnly",colspan:"colSpan",frameborder:"frameBorder",rowspan:"rowSpan",valuetype:"valueType"};_380.get=function getProp(node,name){node=dom.byId(node);var lc=name.toLowerCase(),_386=_380.names[lc]||name;return node[_386];};_380.set=function setProp(node,name,_387){node=dom.byId(node);var l=arguments.length;if(l==2&&typeof name!="string"){for(var x in name){_380.set(node,x,name[x]);}return node;}var lc=name.toLowerCase(),_388=_380.names[lc]||name;if(_388=="style"&&typeof _387!="string"){_381.style(node,_387);return node;}if(_388=="innerHTML"){if(has("ie")&&node.tagName.toLowerCase() in _385){ctr.empty(node);node.appendChild(ctr.toDom(_387,node.ownerDocument));}else{node[_388]=_387;}return node;}if(lang.isFunction(_387)){var _389=node[_384];if(!_389){_389=_383++;node[_384]=_389;}if(!_382[_389]){_382[_389]={};}var h=_382[_389][_388];if(h){conn.disconnect(h);}else{try{delete node[_388];}catch(e){}}if(_387){_382[_389][_388]=conn.connect(node,_388,_387);}else{node[_388]=null;}return node;}node[_388]=_387;return node;};});},"dojo/dom-attr":function(){define(["exports","./_base/sniff","./_base/lang","./dom","./dom-style","./dom-prop"],function(_38a,has,lang,dom,_38b,prop){var _38c={innerHTML:1,className:1,htmlFor:has("ie"),value:1},_38d={classname:"class",htmlfor:"for",tabindex:"tabIndex",readonly:"readOnly"};function _38e(node,name){var attr=node.getAttributeNode&&node.getAttributeNode(name);return attr&&attr.specified;};_38a.has=function hasAttr(node,name){var lc=name.toLowerCase();return _38c[prop.names[lc]||name]||_38e(dom.byId(node),_38d[lc]||name);};_38a.get=function getAttr(node,name){node=dom.byId(node);var lc=name.toLowerCase(),_38f=prop.names[lc]||name,_390=_38c[_38f];value=node[_38f];if(_390&&typeof value!="undefined"){return value;}if(_38f!="href"&&(typeof value=="boolean"||lang.isFunction(value))){return value;}var _391=_38d[lc]||name;return _38e(node,_391)?node.getAttribute(_391):null;};_38a.set=function setAttr(node,name,_392){node=dom.byId(node);if(arguments.length==2){for(var x in name){_38a.set(node,x,name[x]);}return node;}var lc=name.toLowerCase(),_393=prop.names[lc]||name,_394=_38c[_393];if(_393=="style"&&typeof _392!="string"){_38b.set(node,_392);return node;}if(_394||typeof _392=="boolean"||lang.isFunction(_392)){return prop.set(node,name,_392);}node.setAttribute(_38d[lc]||name,_392);return node;};_38a.remove=function removeAttr(node,name){dom.byId(node).removeAttribute(_38d[name.toLowerCase()]||name);};_38a.getNodeProp=function getNodeProp(node,name){node=dom.byId(node);var lc=name.toLowerCase(),_395=prop.names[lc]||name;if((_395 in node)&&_395!="href"){return node[_395];}var _396=_38d[lc]||name;return _38e(node,_396)?node.getAttribute(_396):null;};});},"dojo/dom-construct":function(){define("dojo/dom-construct",["exports","./_base/kernel","./_base/sniff","./_base/window","./dom","./dom-attr","./on"],function(_397,dojo,has,win,dom,attr,on){var _398={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"]},_399=/<\s*([\w\:]+)/,_39a={},_39b=0,_39c="__"+dojo._scopeName+"ToDomId";for(var _39d in _398){if(_398.hasOwnProperty(_39d)){var tw=_398[_39d];tw.pre=_39d=="option"?"<select multiple=\"multiple\">":"<"+tw.join("><")+">";tw.post="</"+tw.reverse().join("></")+">";}}function _39e(node,ref){var _39f=ref.parentNode;if(_39f){_39f.insertBefore(node,ref);}};function _3a0(node,ref){var _3a1=ref.parentNode;if(_3a1){if(_3a1.lastChild==ref){_3a1.appendChild(node);}else{_3a1.insertBefore(node,ref.nextSibling);}}};var _3a2=null,_3a3;on(window,"unload",function(){_3a2=null;});_397.toDom=function toDom(frag,doc){doc=doc||win.doc;var _3a4=doc[_39c];if(!_3a4){doc[_39c]=_3a4=++_39b+"";_39a[_3a4]=doc.createElement("div");}frag+="";var _3a5=frag.match(_399),tag=_3a5?_3a5[1].toLowerCase():"",_3a6=_39a[_3a4],wrap,i,fc,df;if(_3a5&&_398[tag]){wrap=_398[tag];_3a6.innerHTML=wrap.pre+frag+wrap.post;for(i=wrap.length;i;--i){_3a6=_3a6.firstChild;}}else{_3a6.innerHTML=frag;}if(_3a6.childNodes.length==1){return _3a6.removeChild(_3a6.firstChild);}df=doc.createDocumentFragment();while(fc=_3a6.firstChild){df.appendChild(fc);}return df;};_397.place=function place(node,_3a7,_3a8){_3a7=dom.byId(_3a7);if(typeof node=="string"){node=/^\s*</.test(node)?_397.toDom(node,_3a7.ownerDocument):dom.byId(node);}if(typeof _3a8=="number"){var cn=_3a7.childNodes;if(!cn.length||cn.length<=_3a8){_3a7.appendChild(node);}else{_39e(node,cn[_3a8<0?0:_3a8]);}}else{switch(_3a8){case "before":_39e(node,_3a7);break;case "after":_3a0(node,_3a7);break;case "replace":_3a7.parentNode.replaceChild(node,_3a7);break;case "only":_397.empty(_3a7);_3a7.appendChild(node);break;case "first":if(_3a7.firstChild){_39e(node,_3a7.firstChild);break;}default:_3a7.appendChild(node);}}return node;};_397.create=function create(tag,_3a9,_3aa,pos){var doc=win.doc;if(_3aa){_3aa=dom.byId(_3aa);doc=_3aa.ownerDocument;}if(typeof tag=="string"){tag=doc.createElement(tag);}if(_3a9){attr.set(tag,_3a9);}if(_3aa){_397.place(tag,_3aa,pos);}return tag;};_397.empty=has("ie")?function(node){node=dom.byId(node);for(var c;c=node.lastChild;){_397.destroy(c);}}:function(node){dom.byId(node).innerHTML="";};_397.destroy=function destroy(node){node=dom.byId(node);try{var doc=node.ownerDocument;if(!_3a2||_3a3!=doc){_3a2=doc.createElement("div");_3a3=doc;}_3a2.appendChild(node.parentNode?node.parentNode.removeChild(node):node);_3a2.innerHTML="";}catch(e){}};});},"dojo/text":function(){define(["./_base/kernel","require","./has","./_base/xhr"],function(dojo,_3ab,has,xhr){var _3ac;if(1){_3ac=function(url,sync,load){xhr("GET",{url:url,sync:!!sync,load:load});};}else{if(_3ab.getText){_3ac=_3ab.getText;}else{console.error("dojo/text plugin failed to load because loader does not support getText");}}var _3ad={},_3ae=function(text){if(text){text=text.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,"");var _3af=text.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);if(_3af){text=_3af[1];}}else{text="";}return text;},_3b0={},_3b1={},_3b2={dynamic:true,normalize:function(id,_3b3){var _3b4=id.split("!"),url=_3b4[0];return (/^\./.test(url)?_3b3(url):url)+(_3b4[1]?"!"+_3b4[1]:"");},load:function(id,_3b5,load){var _3b6=id.split("!"),_3b7=_3b6.length>1,_3b8=_3b6[0],url=_3b5.toUrl(_3b6[0]),text=_3b0,_3b9=function(text){load(_3b7?_3ae(text):text);};if(_3b8 in _3ad){text=_3ad[_3b8];}else{if(url in _3b5.cache){text=_3b5.cache[url];}else{if(url in _3ad){text=_3ad[url];}}}if(text===_3b0){if(_3b1[url]){_3b1[url].push(_3b9);}else{var _3ba=_3b1[url]=[_3b9];_3ac(url,!_3b5.async,function(text){_3ad[_3b8]=_3ad[url]=text;for(var i=0;i<_3ba.length;){_3ba[i++](text);}delete _3b1[url];});}}else{_3b9(text);}}};dojo.cache=function(_3bb,url,_3bc){var key;if(typeof _3bb=="string"){if(/\//.test(_3bb)){key=_3bb;_3bc=url;}else{key=_3ab.toUrl(_3bb.replace(/\./g,"/")+(url?("/"+url):""));}}else{key=_3bb+"";_3bc=url;}var val=(_3bc!=undefined&&typeof _3bc!="string")?_3bc.value:_3bc,_3bd=_3bc&&_3bc.sanitize;if(typeof val=="string"){_3ad[key]=val;return _3bd?_3ae(val):val;}else{if(val===null){delete _3ad[key];return null;}else{if(!(key in _3ad)){_3ac(key,true,function(text){_3ad[key]=text;});}return _3bd?_3ae(_3ad[key]):_3ad[key];}}};return _3b2;});},"dojo/keys":function(){define("dojo/keys",["./_base/kernel","./_base/sniff"],function(dojo,has){return dojo.keys={BACKSPACE:8,TAB:9,CLEAR:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,META:has("safari")?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,UP_DPAD:175,DOWN_DPAD:176,LEFT_DPAD:177,RIGHT_DPAD:178,copyKey:has("mac")&&!has("air")?(has("safari")?91:224):17};});},"dojo/domReady":function(){define(["./has"],function(has){var _3be=this,doc=document,_3bf={"loaded":1,"complete":1},_3c0=typeof doc.readyState!="string",_3c1=!!_3bf[doc.readyState];if(_3c0){doc.readyState="loading";}if(!_3c1){var _3c2=[],_3c3=[],_3c4=function(evt){evt=evt||_3be.event;if(_3c1||(evt.type=="readystatechange"&&!_3bf[doc.readyState])){return;}_3c1=1;if(_3c0){doc.readyState="complete";}while(_3c2.length){(_3c2.shift())();}},on=function(node,_3c5){node.addEventListener(_3c5,_3c4,false);_3c2.push(function(){node.removeEventListener(_3c5,_3c4,false);});};if(!has("dom-addeventlistener")){on=function(node,_3c6){_3c6="on"+_3c6;node.attachEvent(_3c6,_3c4);_3c2.push(function(){node.detachEvent(_3c6,_3c4);});};var div=doc.createElement("div");try{if(div.doScroll&&_3be.frameElement===null){_3c3.push(function(){try{div.doScroll("left");return 1;}catch(e){}});}}catch(e){}}on(doc,"DOMContentLoaded");on(_3be,"load");if("onreadystatechange" in doc){on(doc,"readystatechange");}else{if(!_3c0){_3c3.push(function(){return _3bf[doc.readyState];});}}if(_3c3.length){var _3c7=function(){if(_3c1){return;}var i=_3c3.length;while(i--){if(_3c3[i]()){_3c4("poller");return;}}setTimeout(_3c7,30);};_3c7();}}function _3c8(_3c9){if(_3c1){_3c9(1);}else{_3c2.push(_3c9);}};_3c8.load=function(id,req,load){_3c8(load);};return _3c8;});},"dojo/_base/lang":function(){define(["./kernel","../has","./sniff"],function(dojo,has){has.add("bug-for-in-skips-shadowed",function(){for(var i in {toString:1}){return 0;}return 1;});var _3ca=has("bug-for-in-skips-shadowed")?"hasOwnProperty.valueOf.isPrototypeOf.propertyIsEnumerable.toLocaleString.toString.constructor".split("."):[],_3cb=_3ca.length,_3cc=function(dest,_3cd,_3ce){var name,s,i,_3cf={};for(name in _3cd){s=_3cd[name];if(!(name in dest)||(dest[name]!==s&&(!(name in _3cf)||_3cf[name]!==s))){dest[name]=_3ce?_3ce(s):s;}}if(has("bug-for-in-skips-shadowed")){if(_3cd){for(i=0;i<_3cb;++i){name=_3ca[i];s=_3cd[name];if(!(name in dest)||(dest[name]!==s&&(!(name in _3cf)||_3cf[name]!==s))){dest[name]=_3ce?_3ce(s):s;}}}}return dest;},_3d0=function(dest,_3d1){if(!dest){dest={};}for(var i=1,l=arguments.length;i<l;i++){lang._mixin(dest,arguments[i]);}return dest;},_3d2=function(_3d3,_3d4,_3d5){var p,i=0,_3d6=dojo.global;if(!_3d5){if(!_3d3.length){return _3d6;}else{p=_3d3[i++];try{_3d5=dojo.scopeMap[p]&&dojo.scopeMap[p][1];}catch(e){}_3d5=_3d5||(p in _3d6?_3d6[p]:(_3d4?_3d6[p]={}:undefined));}}while(_3d5&&(p=_3d3[i++])){_3d5=(p in _3d5?_3d5[p]:(_3d4?_3d5[p]={}:undefined));}return _3d5;},_3d7=function(name,_3d8,_3d9){var _3da=name.split("."),p=_3da.pop(),obj=_3d2(_3da,true,_3d9);return obj&&p?(obj[p]=_3d8):undefined;},_3db=function(name,_3dc,_3dd){return _3d2(name.split("."),_3dc,_3dd);},_3de=function(name,obj){return lang.getObject(name,false,obj)!==undefined;},opts=Object.prototype.toString,_3df=function(it){return (typeof it=="string"||it instanceof String);},_3e0=function(it){return it&&(it instanceof Array||typeof it=="array");},_3e1=function(it){return opts.call(it)==="[object Function]";},_3e2=function(it){return it!==undefined&&(it===null||typeof it=="object"||lang.isArray(it)||lang.isFunction(it));},_3e3=function(it){return it&&it!==undefined&&!lang.isString(it)&&!lang.isFunction(it)&&!(it.tagName&&it.tagName.toLowerCase()=="form")&&(lang.isArray(it)||isFinite(it.length));},_3e4=function(it){return it&&!lang.isFunction(it)&&/\{\s*\[native code\]\s*\}/.test(String(it));},_3e5=function(_3e6,_3e7){for(var i=1,l=arguments.length;i<l;i++){lang._mixin(_3e6.prototype,arguments[i]);}return _3e6;},_3e8=function(_3e9,_3ea){var pre=_3eb(arguments,2);var _3ec=lang.isString(_3ea);return function(){var args=_3eb(arguments);var f=_3ec?(_3e9||dojo.global)[_3ea]:_3ea;return f&&f.apply(_3e9||this,pre.concat(args));};},_3ed=function(_3ee,_3ef){if(arguments.length>2){return lang._hitchArgs.apply(dojo,arguments);}if(!_3ef){_3ef=_3ee;_3ee=null;}if(lang.isString(_3ef)){_3ee=_3ee||dojo.global;if(!_3ee[_3ef]){throw (["dojo.hitch: scope[\"",_3ef,"\"] is null (scope=\"",_3ee,"\")"].join(""));}return function(){return _3ee[_3ef].apply(_3ee,arguments||[]);};}return !_3ee?_3ef:function(){return _3ef.apply(_3ee,arguments||[]);};},_3f0=(function(){function TMP(){};return function(obj,_3f1){TMP.prototype=obj;var tmp=new TMP();TMP.prototype=null;if(_3f1){lang._mixin(tmp,_3f1);}return tmp;};})(),_3f2=function(obj,_3f3,_3f4){return (_3f4||[]).concat(Array.prototype.slice.call(obj,_3f3||0));},_3eb=has("ie")?(function(){function slow(obj,_3f5,_3f6){var arr=_3f6||[];for(var x=_3f5||0;x<obj.length;x++){arr.push(obj[x]);}return arr;};return function(obj){return ((obj.item)?slow:_3f2).apply(this,arguments);};})():_3f2,_3f7=function(_3f8){var arr=[null];return lang.hitch.apply(dojo,arr.concat(lang._toArray(arguments)));},_3f9=function(src){if(!src||typeof src!="object"||lang.isFunction(src)){return src;}if(src.nodeType&&"cloneNode" in src){return src.cloneNode(true);}if(src instanceof Date){return new Date(src.getTime());}if(src instanceof RegExp){return new RegExp(src);}var r,i,l;if(lang.isArray(src)){r=[];for(i=0,l=src.length;i<l;++i){if(i in src){r.push(_3f9(src[i]));}}}else{r=src.constructor?new src.constructor():{};}return lang._mixin(r,src,_3f9);},trim=String.prototype.trim?function(str){return str.trim();}:function(str){return str.replace(/^\s\s*/,"").replace(/\s\s*$/,"");},_3fa=/\{([^\}]+)\}/g,_3fb=function(tmpl,map,_3fc){return tmpl.replace(_3fc||_3fa,lang.isFunction(map)?map:function(_3fd,k){return _3db(k,false,map);});},lang={_extraNames:_3ca,_mixin:_3cc,mixin:_3d0,setObject:_3d7,getObject:_3db,exists:_3de,isString:_3df,isArray:_3e0,isFunction:_3e1,isObject:_3e2,isArrayLike:_3e3,isAlien:_3e4,extend:_3e5,_hitchArgs:_3e8,hitch:_3ed,delegate:_3f0,_toArray:_3eb,partial:_3f7,clone:_3f9,trim:trim,replace:_3fb};1&&_3d0(dojo,lang);return lang;});},"dojo/Evented":function(){define(["./aspect","./on"],function(_3fe,on){"use strict";var _3ff=_3fe.after;function _400(){};_400.prototype={on:function(type,_401){return on.parse(this,type,_401,function(_402,type){return _3ff(_402,"on"+type,_401,true);});},emit:function(type,_403){var args=[this];args.push.apply(args,arguments);return on.emit.apply(on,args);}};return _400;});},"dojo/mouse":function(){define(["./_base/kernel","./on","./has","./dom","./_base/window"],function(dojo,on,has,dom,win){has.add("dom-quirks",win.doc&&win.doc.compatMode=="BackCompat");has.add("events-mouseenter",win.doc&&"onmouseenter" in win.doc.createElement("div"));var _404;if(has("dom-quirks")||!has("dom-addeventlistener")){_404={LEFT:1,MIDDLE:4,RIGHT:2,isButton:function(e,_405){return e.button&_405;},isLeft:function(e){return e.button&1;},isMiddle:function(e){return e.button&4;},isRight:function(e){return e.button&2;}};}else{_404={LEFT:0,MIDDLE:1,RIGHT:2,isButton:function(e,_406){return e.button==_406;},isLeft:function(e){return e.button==0;},isMiddle:function(e){return e.button==1;},isRight:function(e){return e.button==2;}};}dojo.mouseButtons=_404;function _407(type,_408){var _409=function(node,_40a){return on(node,type,function(evt){if(!dom.isDescendant(evt.relatedTarget,_408?evt.target:node)){return _40a.call(this,evt);}});};if(!_408){_409.bubble=_407(type,true);}return _409;};return {enter:_407("mouseover"),leave:_407("mouseout"),isLeft:_404.isLeft,isMiddle:_404.isMiddle,isRight:_404.isRight};});},"dojo/topic":function(){define(["./Evented"],function(_40b){var hub=new _40b;return {publish:function(_40c,_40d){return hub.emit.apply(hub,arguments);},subscribe:function(_40e,_40f){return hub.on.apply(hub,arguments);}};});},"dojo/_base/xhr":function(){define(["./kernel","./sniff","require","../io-query","../dom","../dom-form","./Deferred","./json","./lang","./array","../on"],function(dojo,has,_410,ioq,dom,_411,_412,json,lang,_413,on){has.add("native-xhr",function(){return typeof XMLHttpRequest!=="undefined";});if(1&&_410.getXhr){dojo._xhrObj=_410.getXhr;}else{if(has("native-xhr")){dojo._xhrObj=function(){try{return new XMLHttpRequest();}catch(e){throw new Error("XMLHTTP not available: "+e);}};}else{for(var _414=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],_415,i=0;i<3;){try{_415=_414[i++];if(new ActiveXObject(_415)){break;}}catch(e){}}dojo._xhrObj=function(){return new ActiveXObject(_415);};}}var cfg=dojo.config;dojo.objectToQuery=ioq.objectToQuery;dojo.queryToObject=ioq.queryToObject;dojo.fieldToObject=_411.fieldToObject;dojo.formToObject=_411.toObject;dojo.formToQuery=_411.toQuery;dojo.formToJson=_411.toJson;dojo._blockAsync=false;var _416=dojo._contentHandlers=dojo.contentHandlers={"text":function(xhr){return xhr.responseText;},"json":function(xhr){return json.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 _417=xhr.responseText;var _418=_417.indexOf("/*");var _419=_417.lastIndexOf("*/");if(_418==-1||_419==-1){throw new Error("JSON was not comment filtered");}return json.fromJson(_417.substring(_418+2,_419));},"javascript":function(xhr){return dojo.eval(xhr.responseText);},"xml":function(xhr){var _41a=xhr.responseXML;if(has("ie")){if((!_41a||!_41a.documentElement)){var ms=function(n){return "MSXML"+n+".DOMDocument";};var dp=["Microsoft.XMLDOM",ms(6),ms(4),ms(3),ms(2)];_413.some(dp,function(p){try{var dom=new ActiveXObject(p);dom.async=false;dom.loadXML(xhr.responseText);_41a=dom;}catch(e){return false;}return true;});}}return _41a;},"json-comment-optional":function(xhr){if(xhr.responseText&&/^[^{\[]*\/\*/.test(xhr.responseText)){return _416["json-comment-filtered"](xhr);}else{return _416["json"](xhr);}}};dojo._ioSetArgs=function(args,_41b,_41c,_41d){var _41e={args:args,url:args.url};var _41f=null;if(args.form){var form=dom.byId(args.form);var _420=form.getAttributeNode("action");_41e.url=_41e.url||(_420?_420.value:null);_41f=_411.toObject(form);}var _421=[{}];if(_41f){_421.push(_41f);}if(args.content){_421.push(args.content);}if(args.preventCache){_421.push({"dojo.preventCache":new Date().valueOf()});}_41e.query=ioq.objectToQuery(lang.mixin.apply(null,_421));_41e.handleAs=args.handleAs||"text";var d=new _412(_41b);d.addCallbacks(_41c,function(_422){return _41d(_422,d);});var ld=args.load;if(ld&&lang.isFunction(ld)){d.addCallback(function(_423){return ld.call(args,_423,_41e);});}var err=args.error;if(err&&lang.isFunction(err)){d.addErrback(function(_424){return err.call(args,_424,_41e);});}var _425=args.handle;if(_425&&lang.isFunction(_425)){d.addBoth(function(_426){return _425.call(args,_426,_41e);});}if(cfg.ioPublish&&dojo.publish&&_41e.args.ioPublish!==false){d.addCallbacks(function(res){dojo.publish("/dojo/io/load",[d,res]);return res;},function(res){dojo.publish("/dojo/io/error",[d,res]);return res;});d.addBoth(function(res){dojo.publish("/dojo/io/done",[d,res]);return res;});}d.ioArgs=_41e;return d;};var _427=function(dfd){dfd.canceled=true;var xhr=dfd.ioArgs.xhr;var _428=typeof xhr.abort;if(_428=="function"||_428=="object"||_428=="unknown"){xhr.abort();}var err=dfd.ioArgs.error;if(!err){err=new Error("xhr cancelled");err.dojoType="cancel";}return err;};var _429=function(dfd){var ret=_416[dfd.ioArgs.handleAs](dfd.ioArgs.xhr);return ret===undefined?null:ret;};var _42a=function(_42b,dfd){if(!dfd.ioArgs.args.failOk){console.error(_42b);}return _42b;};var _42c=null;var _42d=[];var _42e=0;var _42f=function(dfd){if(_42e<=0){_42e=0;if(cfg.ioPublish&&dojo.publish&&(!dfd||dfd&&dfd.ioArgs.args.ioPublish!==false)){dojo.publish("/dojo/io/stop");}}};var _430=function(){var now=(new Date()).getTime();if(!dojo._blockAsync){for(var i=0,tif;i<_42d.length&&(tif=_42d[i]);i++){var dfd=tif.dfd;var func=function(){if(!dfd||dfd.canceled||!tif.validCheck(dfd)){_42d.splice(i--,1);_42e-=1;}else{if(tif.ioCheck(dfd)){_42d.splice(i--,1);tif.resHandle(dfd);_42e-=1;}else{if(dfd.startTime){if(dfd.startTime+(dfd.ioArgs.args.timeout||0)<now){_42d.splice(i--,1);var err=new Error("timeout exceeded");err.dojoType="timeout";dfd.errback(err);dfd.cancel();_42e-=1;}}}}};if(dojo.config.debugAtAllCosts){func.call(this);}else{try{func.call(this);}catch(e){dfd.errback(e);}}}}_42f(dfd);if(!_42d.length){clearInterval(_42c);_42c=null;}};dojo._ioCancelAll=function(){try{_413.forEach(_42d,function(i){try{i.dfd.cancel();}catch(e){}});}catch(e){}};if(has("ie")){on(window,"unload",dojo._ioCancelAll);}dojo._ioNotifyStart=function(dfd){if(cfg.ioPublish&&dojo.publish&&dfd.ioArgs.args.ioPublish!==false){if(!_42e){dojo.publish("/dojo/io/start");}_42e+=1;dojo.publish("/dojo/io/send",[dfd]);}};dojo._ioWatch=function(dfd,_431,_432,_433){var args=dfd.ioArgs.args;if(args.timeout){dfd.startTime=(new Date()).getTime();}_42d.push({dfd:dfd,validCheck:_431,ioCheck:_432,resHandle:_433});if(!_42c){_42c=setInterval(_430,50);}if(args.sync){_430();}};var _434="application/x-www-form-urlencoded";var _435=function(dfd){return dfd.ioArgs.xhr.readyState;};var _436=function(dfd){return 4==dfd.ioArgs.xhr.readyState;};var _437=function(dfd){var xhr=dfd.ioArgs.xhr;if(dojo._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;err.xhr=xhr;dfd.errback(err);}};dojo._ioAddQueryToUrl=function(_438){if(_438.query.length){_438.url+=(_438.url.indexOf("?")==-1?"?":"&")+_438.query;_438.query=null;}};dojo.xhr=function(_439,args,_43a){var dfd=dojo._ioSetArgs(args,_427,_429,_42a);var _43b=dfd.ioArgs;var xhr=_43b.xhr=dojo._xhrObj(_43b.args);if(!xhr){dfd.cancel();return dfd;}if("postData" in args){_43b.query=args.postData;}else{if("putData" in args){_43b.query=args.putData;}else{if("rawBody" in args){_43b.query=args.rawBody;}else{if((arguments.length>2&&!_43a)||"POST|PUT".indexOf(_439.toUpperCase())==-1){dojo._ioAddQueryToUrl(_43b);}}}}xhr.open(_439,_43b.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]);}}}}if(args.contentType!==false){xhr.setRequestHeader("Content-Type",args.contentType||_434);}if(!args.headers||!("X-Requested-With" in args.headers)){xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");}dojo._ioNotifyStart(dfd);if(dojo.config.debugAtAllCosts){xhr.send(_43b.query);}else{try{xhr.send(_43b.query);}catch(e){_43b.error=e;dfd.cancel();}}dojo._ioWatch(dfd,_435,_436,_437);xhr=null;return dfd;};dojo.xhrGet=function(args){return dojo.xhr("GET",args);};dojo.rawXhrPost=dojo.xhrPost=function(args){return dojo.xhr("POST",args,true);};dojo.rawXhrPut=dojo.xhrPut=function(args){return dojo.xhr("PUT",args,true);};dojo.xhrDelete=function(args){return dojo.xhr("DELETE",args);};dojo._isDocumentOk=function(http){var stat=http.status||0;stat=(stat>=200&&stat<300)||stat==304||stat==1223||!stat;return stat;};dojo._getText=function(url){var _43c;dojo.xhrGet({url:url,sync:true,load:function(text){_43c=text;}});return _43c;};lang.mixin(dojo.xhr,{_xhrObj:dojo._xhrObj,fieldToObject:_411.fieldToObject,formToObject:_411.toObject,objectToQuery:ioq.objectToQuery,formToQuery:_411.toQuery,formToJson:_411.toJson,queryToObject:ioq.queryToObject,contentHandlers:_416,_ioSetArgs:dojo._ioSetArgs,_ioCancelAll:dojo._ioCancelAll,_ioNotifyStart:dojo._ioNotifyStart,_ioWatch:dojo._ioWatch,_ioAddQueryToUrl:dojo._ioAddQueryToUrl,_isDocumentOk:dojo._isDocumentOk,_getText:dojo._getText,get:dojo.xhrGet,post:dojo.xhrPost,put:dojo.xhrPut,del:dojo.xhrDelete});return dojo.xhr;});},"dojo/loadInit":function(){define(["./_base/loader"],function(_43d){return {dynamic:0,normalize:function(id){return id;},load:_43d.loadInit};});},"dojo/_base/unload":function(){define(["./kernel","./connect"],function(dojo,_43e){var win=window;dojo.addOnWindowUnload=function(obj,_43f){if(!dojo.windowUnloaded){_43e.connect(win,"unload",(dojo.windowUnloaded=function(){}));}_43e.connect(win,"unload",obj,_43f);};dojo.addOnUnload=function(obj,_440){_43e.connect(win,"beforeunload",obj,_440);};return {addOnWindowUnload:dojo.addOnWindowUnload,addOnUnload:dojo.addOnUnload};});},"dojo/_base/NodeList":function(){define(["./kernel","../query","./array","./html","../NodeList-dom"],function(dojo,_441,_442){var _443=_441.NodeList;var nlp=_443.prototype;nlp.connect=_443._adaptAsForEach(function(){return dojo.connect.apply(this,arguments);});nlp.coords=_443._adaptAsMap(dojo.coords);_443.events=["blur","focus","change","click","error","keydown","keypress","keyup","load","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","submit"];_442.forEach(_443.events,function(evt){var _444="on"+evt;nlp[_444]=function(a,b){return this.connect(_444,a,b);};});dojo.NodeList=_443;return dojo.NodeList;});},"dojo/_base/Color":function(){define(["./kernel","./lang","./array","./config"],function(dojo,lang,_445,_446){var _447=dojo.Color=function(_448){if(_448){this.setColor(_448);}};_447.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":_446.transparentColor||[0,0,0,0]};lang.extend(_447,{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(_449){if(lang.isString(_449)){_447.fromString(_449,this);}else{if(lang.isArray(_449)){_447.fromArray(_449,this);}else{this._set(_449.r,_449.g,_449.b,_449.a);if(!(_449 instanceof _447)){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=_445.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(_44a){var t=this,rgb=t.r+", "+t.g+", "+t.b;return (_44a?"rgba("+rgb+", "+t.a:"rgb("+rgb)+")";},toString:function(){return this.toCss(true);}});_447.blendColors=dojo.blendColors=function(_44b,end,_44c,obj){var t=obj||new _447();_445.forEach(["r","g","b","a"],function(x){t[x]=_44b[x]+(end[x]-_44b[x])*_44c;if(x!="a"){t[x]=Math.round(t[x]);}});return t.sanitize();};_447.fromRgb=dojo.colorFromRgb=function(_44d,obj){var m=_44d.toLowerCase().match(/^rgba?\(([\s\.,0-9]+)\)/);return m&&_447.fromArray(m[1].split(/\s*,\s*/),obj);};_447.fromHex=dojo.colorFromHex=function(_44e,obj){var t=obj||new _447(),bits=(_44e.length==4)?4:8,mask=(1<<bits)-1;_44e=Number("0x"+_44e.substr(1));if(isNaN(_44e)){return null;}_445.forEach(["b","g","r"],function(x){var c=_44e&mask;_44e>>=bits;t[x]=bits==4?17*c:c;});t.a=1;return t;};_447.fromArray=dojo.colorFromArray=function(a,obj){var t=obj||new _447();t._set(Number(a[0]),Number(a[1]),Number(a[2]),Number(a[3]));if(isNaN(t.a)){t.a=1;}return t.sanitize();};_447.fromString=dojo.colorFromString=function(str,obj){var a=_447.named[str];return a&&_447.fromArray(a,obj)||_447.fromRgb(str,obj)||_447.fromHex(str,obj);};return _447;});},"dojo/selector/_loader":function(){define(["../has","require"],function(has,_44f){"use strict";var _450=document.createElement("div");has.add("dom-qsa2.1",!!_450.querySelectorAll);has.add("dom-qsa3",function(){try{_450.innerHTML="<p class='TEST'></p>";return _450.querySelectorAll(".TEST:empty").length==1;}catch(e){}});var _451;var acme="./acme",lite="./lite";return {load:function(id,_452,_453,_454){var req=_44f;id=id=="default"?has("config-selectorEngine")||"css3":id;id=id=="css2"||id=="lite"?lite:id=="css2.1"?has("dom-qsa2.1")?lite:acme:id=="css3"?has("dom-qsa3")?lite:acme:id=="acme"?acme:(req=_452)&&id;if(id.charAt(id.length-1)=="?"){id=id.substring(0,id.length-1);var _455=true;}if(_455&&(has("dom-compliant-qsa")||_451)){return _453(_451);}req([id],function(_456){if(id!="./lite"){_451=_456;}_453(_456);});}};});},"dojo/on":function(){define(["./has!dom-addeventlistener?:./aspect","./_base/kernel","./has"],function(_457,dojo,has){"use strict";if(1){var _458=window.ScriptEngineMajorVersion;has.add("jscript",_458&&(_458()+ScriptEngineMinorVersion()/10));has.add("event-orientationchange",has("touch")&&!has("android"));}var on=function(_459,type,_45a,_45b){if(_459.on){return _459.on(type,_45a);}return on.parse(_459,type,_45a,_45c,_45b,this);};on.pausable=function(_45d,type,_45e,_45f){var _460;var _461=on(_45d,type,function(){if(!_460){return _45e.apply(this,arguments);}},_45f);_461.pause=function(){_460=true;};_461.resume=function(){_460=false;};return _461;};on.once=function(_462,type,_463,_464){var _465=on(_462,type,function(){_465.remove();return _463.apply(this,arguments);});return _465;};on.parse=function(_466,type,_467,_468,_469,_46a){if(type.call){return type.call(_46a,_466,_467);}if(type.indexOf(",")>-1){var _46b=type.split(/\s*,\s*/);var _46c=[];var i=0;var _46d;while(_46d=_46b[i++]){_46c.push(_468(_466,_46d,_467,_469,_46a));}_46c.remove=function(){for(var i=0;i<_46c.length;i++){_46c[i].remove();}};return _46c;}return _468(_466,type,_467,_469,_46a);};var _46e=/^touch/;function _45c(_46f,type,_470,_471,_472){var _473=type.match(/(.*):(.*)/);if(_473){type=_473[2];_473=_473[1];return on.selector(_473,type).call(_472,_46f,_470);}if(has("touch")){if(_46e.test(type)){_470=_474(_470);}if(!has("event-orientationchange")&&(type=="orientationchange")){type="resize";_46f=window;_470=_474(_470);}}if(_46f.addEventListener){var _475=type in _476;_46f.addEventListener(_475?_476[type]:type,_470,_475);return {remove:function(){_46f.removeEventListener(type,_470,_475);}};}type="on"+type;if(_477&&_46f.attachEvent){return _477(_46f,type,_470);}throw new Error("Target must be an event emitter");};on.selector=function(_478,_479,_47a){return function(_47b,_47c){var _47d=this;var _47e=_479.bubble;if(_47e){_479=_47e;}else{if(_47a!==false){_47a=true;}}return on(_47b,_479,function(_47f){var _480=_47f.target;_47d=_47d&&_47d.matches?_47d:dojo.query;while(!_47d.matches(_480,_478,_47b)){if(_480==_47b||!_47a||!(_480=_480.parentNode)){return;}}return _47c.call(_480,_47f);});};};function _481(){this.cancelable=false;};function _482(){this.bubbles=false;};var _483=[].slice,_484=on.emit=function(_485,type,_486){var args=_483.call(arguments,2);var _487="on"+type;if("parentNode" in _485){var _488=args[0]={};for(var i in _486){_488[i]=_486[i];}_488.preventDefault=_481;_488.stopPropagation=_482;_488.target=_485;_488.type=type;_486=_488;}do{_485[_487]&&_485[_487].apply(_485,args);}while(_486&&_486.bubbles&&(_485=_485.parentNode));return _486&&_486.cancelable&&_486;};var _476={};if(has("dom-addeventlistener")){_476={focusin:"focus",focusout:"blur"};if(has("opera")){_476.keydown="keypress";}on.emit=function(_489,type,_48a){if(_489.dispatchEvent&&document.createEvent){var _48b=document.createEvent("HTMLEvents");_48b.initEvent(type,!!_48a.bubbles,!!_48a.cancelable);for(var i in _48a){var _48c=_48a[i];if(!(i in _48b)){_48b[i]=_48a[i];}}return _489.dispatchEvent(_48b)&&_48b;}return _484.apply(on,arguments);};}else{on._fixEvent=function(evt,_48d){if(!evt){var w=_48d&&(_48d.ownerDocument||_48d.document||_48d).parentWindow||window;evt=w.event;}if(!evt){return (evt);}if(!evt.target){evt.target=evt.srcElement;evt.currentTarget=(_48d||evt.srcElement);if(evt.type=="mouseover"){evt.relatedTarget=evt.fromElement;}if(evt.type=="mouseout"){evt.relatedTarget=evt.toElement;}if(!evt.stopPropagation){evt.stopPropagation=_48e;evt.preventDefault=_48f;}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;_490(evt);break;}}return evt;};var _491=function(_492){this.handle=_492;};_491.prototype.remove=function(){delete _dojoIEListeners_[this.handle];};var _493=function(_494){return function(evt){evt=on._fixEvent(evt,this);return _494.call(this,evt);};};var _477=function(_495,type,_496){_496=_493(_496);if(((_495.ownerDocument?_495.ownerDocument.parentWindow:_495.parentWindow||_495.window||window)!=top||has("jscript")<5.8)&&!has("config-_allow_leaks")){if(typeof _dojoIEListeners_=="undefined"){_dojoIEListeners_=[];}var _497=_495[type];if(!_497||!_497.listeners){var _498=_497;_495[type]=_497=Function("event","var callee = arguments.callee; for(var i = 0; i<callee.listeners.length; i++){var listener = _dojoIEListeners_[callee.listeners[i]]; if(listener){listener.call(this,event);}}");_497.listeners=[];_497.global=this;if(_498){_497.listeners.push(_dojoIEListeners_.push(_498)-1);}}var _499;_497.listeners.push(_499=(_497.global._dojoIEListeners_.push(_496)-1));return new _491(_499);}return _457.after(_495,type,_496,true);};var _490=function(evt){evt.keyChar=evt.charCode?String.fromCharCode(evt.charCode):"";evt.charOrCode=evt.keyChar||evt.keyCode;};var _48e=function(){this.cancelBubble=true;};var _48f=on._preventDefault=function(){this.bubbledKeyCode=this.keyCode;if(this.ctrlKey){try{this.keyCode=0;}catch(e){}}this.returnValue=false;};}if(has("touch")){var _49a=function(){};var _49b=window.orientation;var _474=function(_49c){return function(_49d){var _49e=_49d.corrected;if(!_49e){var type=_49d.type;try{delete _49d.type;}catch(e){}if(_49d.type){_49a.prototype=_49d;var _49e=new _49a;_49e.preventDefault=function(){_49d.preventDefault();};_49e.stopPropagation=function(){_49d.stopPropagation();};}else{_49e=_49d;_49e.type=type;}_49d.corrected=_49e;if(type=="resize"){if(_49b==window.orientation){return null;}_49b=window.orientation;_49e.type="orientationchange";return _49c.call(this,_49e);}if(!("rotation" in _49e)){_49e.rotation=0;_49e.scale=1;}var _49f=_49e.changedTouches[0];for(var i in _49f){delete _49e[i];_49e[i]=_49f[i];}}return _49c.call(this,_49e);};};}return on;});},"dojo/_base/sniff":function(){define(["./kernel","../has"],function(dojo,has){if(!1){return has;}dojo.isBrowser=true,dojo._name="browser";var _4a0=has.add,n=navigator,dua=n.userAgent,dav=n.appVersion,tv=parseFloat(dav),_4a1,_4a2,_4a3,_4a4,_4a5,_4a6,_4a7,_4a8,_4a9,isIE,isFF,_4aa,_4ab,_4ac,_4ad;if(dua.indexOf("AdobeAIR")>=0){_4a2=1;}_4a3=(dav.indexOf("Konqueror")>=0)?tv:0;_4a4=parseFloat(dua.split("WebKit/")[1])||undefined;_4a5=parseFloat(dua.split("Chrome/")[1])||undefined;_4a6=dav.indexOf("Macintosh")>=0;_4ab=/iPhone|iPod|iPad/.test(dua);_4ac=parseFloat(dua.split("Android ")[1])||undefined;_4ad=typeof opera!="undefined"&&opera.wiiremote;var _4ae=Math.max(dav.indexOf("WebKit"),dav.indexOf("Safari"),0);if(_4ae&&!_4a5){_4a7=parseFloat(dav.split("Version/")[1]);if(!_4a7||parseFloat(dav.substr(_4ae+7))<=419.3){_4a7=2;}}if(!has("dojo-webkit")){if(dua.indexOf("Opera")>=0){_4a1=tv;if(_4a1>=9.8){_4a1=parseFloat(dua.split("Version/")[1])||tv;}}if(dua.indexOf("Gecko")>=0&&!_4a3&&!_4a4){_4a8=_4a9=tv;}if(_4a9){isFF=parseFloat(dua.split("Firefox/")[1]||dua.split("Minefield/")[1])||undefined;}if(document.all&&!_4a1){isIE=parseFloat(dav.split("MSIE ")[1])||undefined;var mode=document.documentMode;if(mode&&mode!=5&&Math.floor(isIE)!=mode){isIE=mode;}}}_4aa=document.compatMode=="BackCompat";_4a0("opera",dojo.isOpera=_4a1);_4a0("air",dojo.isAIR=_4a2);_4a0("khtml",dojo.isKhtml=_4a3);_4a0("webkit",dojo.isWebKit=_4a4);_4a0("chrome",dojo.isChrome=_4a5);_4a0("mac",dojo.isMac=_4a6);_4a0("safari",dojo.isSafari=_4a7);_4a0("mozilla",dojo.isMozilla=dojo.isMoz=_4a8);_4a0("ie",dojo.isIE=isIE);_4a0("ff",dojo.isFF=isFF);_4a0("quirks",dojo.isQuirks=_4aa);_4a0("ios",dojo.isIos=_4ab);_4a0("android",dojo.isAndroid=_4ac);dojo.locale=dojo.locale||(isIE?n.userLanguage:n.language).toLowerCase();return has;});},"dojo/_base/array":function(){define("dojo/_base/array",["./kernel","../has","./lang"],function(dojo,has,lang){var _4af={},u,_4b0;function _4b1(){_4af={};};function _4b2(fn){return _4af[fn]=new Function("item","index","array",fn);};function _4b3(some){var _4b4=!some;return function(a,fn,o){var i=0,l=a&&a.length||0,_4b5;if(l&&typeof a=="string"){a=a.split("");}if(typeof fn=="string"){fn=_4af[fn]||_4b2(fn);}if(o){for(;i<l;++i){_4b5=!fn.call(o,a[i],i,a);if(some^_4b5){return !_4b5;}}}else{for(;i<l;++i){_4b5=!fn(a[i],i,a);if(some^_4b5){return !_4b5;}}}return _4b4;};};function _4b6(up){var _4b7=1,_4b8=0,_4b9=0;if(!up){_4b7=_4b8=_4b9=-1;}return function(a,x,from,last){if(last&&_4b7>0){return _4b0.lastIndexOf(a,x,from);}var l=a&&a.length||0,end=up?l+_4b9:_4b8,i;if(from===u){i=up?_4b8:l+_4b9;}else{if(from<0){i=l+from;if(i<0){i=_4b8;}}else{i=from>=l?l+_4b9:from;}}if(l&&typeof a=="string"){a=a.split("");}for(;i!=end;i+=_4b7){if(a[i]==x){return i;}}return -1;};};function _4ba(a,fn,o){var i=0,l=a&&a.length||0;if(l&&typeof a=="string"){a=a.split("");}if(typeof fn=="string"){fn=_4af[fn]||_4b2(fn);}if(o){for(;i<l;++i){fn.call(o,a[i],i,a);}}else{for(;i<l;++i){fn(a[i],i,a);}}};function map(a,fn,o,Ctr){var i=0,l=a&&a.length||0,out=new (Ctr||Array)(l);if(l&&typeof a=="string"){a=a.split("");}if(typeof fn=="string"){fn=_4af[fn]||_4b2(fn);}if(o){for(;i<l;++i){out[i]=fn.call(o,a[i],i,a);}}else{for(;i<l;++i){out[i]=fn(a[i],i,a);}}return out;};function _4bb(a,fn,o){var i=0,l=a&&a.length||0,out=[],_4bc;if(l&&typeof a=="string"){a=a.split("");}if(typeof fn=="string"){fn=_4af[fn]||_4b2(fn);}if(o){for(;i<l;++i){_4bc=a[i];if(fn.call(o,_4bc,i,a)){out.push(_4bc);}}}else{for(;i<l;++i){_4bc=a[i];if(fn(_4bc,i,a)){out.push(_4bc);}}}return out;};_4b0={every:_4b3(false),some:_4b3(true),indexOf:_4b6(true),lastIndexOf:_4b6(false),forEach:_4ba,map:map,filter:_4bb,clearCache:_4b1};1&&lang.mixin(dojo,_4b0);return _4b0;});},"dojo/_base/json":function(){define(["./kernel","../json"],function(dojo,json){dojo.fromJson=function(js){return eval("("+js+")");};dojo._escapeString=json.stringify;dojo.toJsonIndentStr="\t";dojo.toJson=function(it,_4bd){return json.stringify(it,function(key,_4be){if(_4be){var tf=_4be.__json__||_4be.json;if(typeof tf=="function"){return tf.call(_4be);}}return _4be;},_4bd&&dojo.toJsonIndentStr);};return dojo;});},"dojo/_base/window":function(){define(["./kernel","../has","./sniff"],function(dojo,has){dojo.doc=this["document"]||null;dojo.body=function(){return dojo.doc.body||dojo.doc.getElementsByTagName("body")[0];};dojo.setContext=function(_4bf,_4c0){dojo.global=ret.global=_4bf;dojo.doc=ret.doc=_4c0;};dojo.withGlobal=function(_4c1,_4c2,_4c3,_4c4){var _4c5=dojo.global;try{dojo.global=ret.global=_4c1;return dojo.withDoc.call(null,_4c1.document,_4c2,_4c3,_4c4);}finally{dojo.global=ret.global=_4c5;}};dojo.withDoc=function(_4c6,_4c7,_4c8,_4c9){var _4ca=dojo.doc,oldQ=dojo.isQuirks,_4cb=dojo.isIE,isIE,mode,pwin;try{dojo.doc=ret.doc=_4c6;dojo.isQuirks=has.add("quirks",dojo.doc.compatMode=="BackCompat",true,true);if(has("ie")){if((pwin=_4c6.parentWindow)&&pwin.navigator){isIE=parseFloat(pwin.navigator.appVersion.split("MSIE ")[1])||undefined;mode=_4c6.documentMode;if(mode&&mode!=5&&Math.floor(isIE)!=mode){isIE=mode;}dojo.isIE=has.add("ie",isIE,true,true);}}if(_4c8&&typeof _4c7=="string"){_4c7=_4c8[_4c7];}return _4c7.apply(_4c8,_4c9||[]);}finally{dojo.doc=ret.doc=_4ca;dojo.isQuirks=has.add("quirks",oldQ,true,true);dojo.isIE=has.add("ie",_4cb,true,true);}};var ret={global:dojo.global,doc:dojo.doc,body:dojo.body,setContext:dojo.setContext,withGlobal:dojo.withGlobal,withDoc:dojo.withDoc};return ret;});},"dojo/dom-class":function(){define(["./_base/lang","./_base/array","./dom"],function(lang,_4cc,dom){var _4cd="className";var cls,_4ce=/\s+/,a1=[""];function _4cf(s){if(typeof s=="string"||s instanceof String){if(s&&!_4ce.test(s)){a1[0]=s;return a1;}var a=s.split(_4ce);if(a.length&&!a[0]){a.shift();}if(a.length&&!a[a.length-1]){a.pop();}return a;}if(!s){return [];}return _4cc.filter(s,function(x){return x;});};var _4d0={};cls={contains:function containsClass(node,_4d1){return ((" "+dom.byId(node)[_4cd]+" ").indexOf(" "+_4d1+" ")>=0);},add:function addClass(node,_4d2){node=dom.byId(node);_4d2=_4cf(_4d2);var cls=node[_4cd],_4d3;cls=cls?" "+cls+" ":" ";_4d3=cls.length;for(var i=0,len=_4d2.length,c;i<len;++i){c=_4d2[i];if(c&&cls.indexOf(" "+c+" ")<0){cls+=c+" ";}}if(_4d3<cls.length){node[_4cd]=cls.substr(1,cls.length-2);}},remove:function removeClass(node,_4d4){node=dom.byId(node);var cls;if(_4d4!==undefined){_4d4=_4cf(_4d4);cls=" "+node[_4cd]+" ";for(var i=0,len=_4d4.length;i<len;++i){cls=cls.replace(" "+_4d4[i]+" "," ");}cls=lang.trim(cls);}else{cls="";}if(node[_4cd]!=cls){node[_4cd]=cls;}},replace:function replaceClass(node,_4d5,_4d6){node=dom.byId(node);_4d0[_4cd]=node[_4cd];cls.remove(_4d0,_4d6);cls.add(_4d0,_4d5);if(node[_4cd]!==_4d0[_4cd]){node[_4cd]=_4d0[_4cd];}},toggle:function toggleClass(node,_4d7,_4d8){node=dom.byId(node);if(_4d8===undefined){_4d7=_4cf(_4d7);for(var i=0,len=_4d7.length,c;i<len;++i){c=_4d7[i];cls[cls.contains(node,c)?"remove":"add"](node,c);}}else{cls[_4d8?"add":"remove"](node,_4d7);}return _4d8;}};return cls;});},"dojo/_base/config":function(){define(["../has","require"],function(has,_4d9){var _4da={};if(1){var src=_4d9.rawConfig,p;for(p in src){_4da[p]=src[p];}}else{var _4db=function(_4dc,_4dd,_4de){for(p in _4dc){p!="has"&&has.add(_4dd+p,_4dc[p],0,_4de);}};_4da=1?_4d9.rawConfig:this.dojoConfig||this.djConfig||{};_4db(_4da,"config",1);_4db(_4da.has,"",1);}return _4da;});},"dojo/_base/event":function(){define(["./kernel","../on","../has","../dom-geometry"],function(dojo,on,has,dom){if(on._fixEvent){var _4df=on._fixEvent;on._fixEvent=function(evt,se){evt=_4df(evt,se);if(evt){dom.normalizeEvent(evt);}return evt;};}dojo.fixEvent=function(evt,_4e0){if(on._fixEvent){return on._fixEvent(evt,_4e0);}return evt;};dojo.stopEvent=function(evt){if(has("dom-addeventlistener")||(evt&&evt.preventDefault)){evt.preventDefault();evt.stopPropagation();}else{evt=evt||window.event;evt.cancelBubble=true;on._preventDefault.call(evt);}};return {fix:dojo.fixEvent,stop:dojo.stopEvent};});},"dojo/main":function(){define(["./_base/kernel","./has","require","./_base/sniff","./_base/lang","./_base/array","./ready","./_base/declare","./_base/connect","./_base/Deferred","./_base/json","./_base/Color","./has!dojo-firebug?./_firebug/firebug","./_base/browser","./_base/loader"],function(dojo,has,_4e1,_4e2,lang,_4e3,_4e4){if(dojo.config.isDebug){_4e1(["./_firebug/firebug"]);}true||has.add("dojo-config-require",1);if(1){var deps=dojo.config.require;if(deps){deps=_4e3.map(lang.isArray(deps)?deps:[deps],function(item){return item.replace(/\./g,"/");});if(dojo.isAsync){_4e1(deps);}else{_4e4(1,function(){_4e1(deps);});}}}return dojo;});},"dojo/ready":function(){define(["./_base/kernel","./has","require","./domReady","./_base/lang"],function(dojo,has,_4e5,_4e6,lang){var _4e7=0,_4e8,_4e9=[],_4ea=0,_4eb=function(){_4e7=1;dojo._postLoad=dojo.config.afterOnLoad=true;if(_4e9.length){_4e8(_4ec);}},_4ec=function(){if(_4e7&&!_4ea&&_4e9.length){_4ea=1;var f=_4e9.shift();try{f();}finally{_4ea=0;}_4ea=0;if(_4e9.length){_4e8(_4ec);}}};if(1){_4e5.on("idle",_4ec);_4e8=function(){if(_4e5.idle()){_4ec();}};}else{_4e8=function(){_4e5.ready(_4ec);};}var _4ed=dojo.ready=dojo.addOnLoad=function(_4ee,_4ef,_4f0){var _4f1=lang._toArray(arguments);if(typeof _4ee!="number"){_4f0=_4ef;_4ef=_4ee;_4ee=1000;}else{_4f1.shift();}_4f0=_4f0?lang.hitch.apply(dojo,_4f1):function(){_4ef();};_4f0.priority=_4ee;for(var i=0;i<_4e9.length&&_4ee>=_4e9[i].priority;i++){}_4e9.splice(i,0,_4f0);_4e8();};true||has.add("dojo-config-addOnLoad",1);if(1){var dca=dojo.config.addOnLoad;if(dca){_4ed[(lang.isArray(dca)?"apply":"call")](dojo,dca);}}if(1&&dojo.config.parseOnLoad&&!dojo.isAsync){_4ed(99,function(){if(!dojo.parser){dojo.deprecated("Add explicit require(['dojo/parser']);","","2.0");_4e5(["dojo/parser"]);}});}if(1){_4e6(_4eb);}else{_4eb();}return _4ed;});},"dojo/aspect":function(){define([],function(){"use strict";var _4f2=0;function _4f3(_4f4,type,_4f5,_4f6){var _4f7=_4f4[type];var _4f8=type=="around";var _4f9;if(_4f8){var _4fa=_4f5(function(){return _4f7.advice(this,arguments);});_4f9={remove:function(){_4f9.cancelled=true;},advice:function(_4fb,args){return _4f9.cancelled?_4f7.advice(_4fb,args):_4fa.apply(_4fb,args);}};}else{_4f9={remove:function(){var _4fc=_4f9.previous;var next=_4f9.next;if(!next&&!_4fc){delete _4f4[type];}else{if(_4fc){_4fc.next=next;}else{_4f4[type]=next;}if(next){next.previous=_4fc;}}},id:_4f2++,advice:_4f5,receiveArguments:_4f6};}if(_4f7&&!_4f8){if(type=="after"){var next=_4f7;while(next){_4f7=next;next=next.next;}_4f7.next=_4f9;_4f9.previous=_4f7;}else{if(type=="before"){_4f4[type]=_4f9;_4f9.next=_4f7;_4f7.previous=_4f9;}}}else{_4f4[type]=_4f9;}return _4f9;};function _4fd(type){return function(_4fe,_4ff,_500,_501){var _502=_4fe[_4ff],_503;if(!_502||_502.target!=_4fe){_4fe[_4ff]=_503=function(){var _504=_4f2;var args=arguments;var _505=_503.before;while(_505){args=_505.advice.apply(this,args)||args;_505=_505.next;}if(_503.around){var _506=_503.around.advice(this,args);}var _507=_503.after;while(_507&&_507.id<_504){_506=_507.receiveArguments?_507.advice.apply(this,args)||_506:_507.advice.call(this,_506);_507=_507.next;}return _506;};if(_502){_503.around={advice:function(_508,args){return _502.apply(_508,args);}};}_503.target=_4fe;}var _509=_4f3((_503||_502),type,_500,_501);_500=null;return _509;};};return {before:_4fd("before"),around:_4fd("around"),after:_4fd("after")};});},"dojo/_base/connect":function(){define(["./kernel","../on","../topic","../aspect","./event","../mouse","./sniff","./lang","../keys"],function(_50a,on,hub,_50b,_50c,_50d,has,lang){has.add("events-keypress-typed",function(){var _50e={charCode:0};try{_50e=document.createEvent("KeyboardEvent");(_50e.initKeyboardEvent||_50e.initKeyEvent).call(_50e,"keypress",true,true,null,false,false,false,false,9,3);}catch(e){}return _50e.charCode==0&&!has("opera");});function _50f(obj,_510,_511,_512,_513){_512=lang.hitch(_511,_512);if(!obj||!(obj.addEventListener||obj.attachEvent)){return _50b.after(obj||_50a.global,_510,_512,true);}if(typeof _510=="string"&&_510.substring(0,2)=="on"){_510=_510.substring(2);}if(!obj){obj=_50a.global;}if(!_513){switch(_510){case "keypress":_510=_514;break;case "mouseenter":_510=_50d.enter;break;case "mouseleave":_510=_50d.leave;break;}}return on(obj,_510,_512,_513);};var _515={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,229:113};var _516=has("mac")?"metaKey":"ctrlKey";var _517=function(evt,_518){var faux=lang.mixin({},evt,_518);_519(faux);faux.preventDefault=function(){evt.preventDefault();};faux.stopPropagation=function(){evt.stopPropagation();};return faux;};function _519(evt){evt.keyChar=evt.charCode?String.fromCharCode(evt.charCode):"";evt.charOrCode=evt.keyChar||evt.keyCode;};var _514;if(has("events-keypress-typed")){var _51a=function(e,code){try{return (e.keyCode=code);}catch(e){return 0;}};_514=function(_51b,_51c){var _51d=on(_51b,"keydown",function(evt){var k=evt.keyCode;var _51e=(k!=13||(has("ie")>=9&&!has("quirks")))&&k!=32&&(k!=27||!has("ie"))&&(k<48||k>90)&&(k<96||k>111)&&(k<186||k>192)&&(k<219||k>222)&&k!=229;if(_51e||evt.ctrlKey){var c=_51e?0:k;if(evt.ctrlKey){if(k==3||k==13){return _51c.call(evt.currentTarget,evt);}else{if(c>95&&c<106){c-=48;}else{if((!evt.shiftKey)&&(c>=65&&c<=90)){c+=32;}else{c=_515[c]||c;}}}}var faux=_517(evt,{type:"keypress",faux:true,charCode:c});_51c.call(evt.currentTarget,faux);if(has("ie")){_51a(evt,faux.keyCode);}}});var _51f=on(_51b,"keypress",function(evt){var c=evt.charCode;c=c>=32?c:0;evt=_517(evt,{charCode:c,faux:true});return _51c.call(this,evt);});return {remove:function(){_51d.remove();_51f.remove();}};};}else{if(has("opera")){_514=function(_520,_521){return on(_520,"keypress",function(evt){var c=evt.which;if(c==3){c=99;}c=c<32&&!evt.shiftKey?0:c;if(evt.ctrlKey&&!evt.shiftKey&&c>=65&&c<=90){c+=32;}return _521.call(this,_517(evt,{charCode:c}));});};}else{_514=function(_522,_523){return on(_522,"keypress",function(evt){_519(evt);return _523.call(this,evt);});};}}var _524={_keypress:_514,connect:function(obj,_525,_526,_527,_528){var a=arguments,args=[],i=0;args.push(typeof a[0]=="string"?null:a[i++],a[i++]);var a1=a[i+1];args.push(typeof a1=="string"||typeof a1=="function"?a[i++]:null,a[i++]);for(var l=a.length;i<l;i++){args.push(a[i]);}return _50f.apply(this,args);},disconnect:function(_529){if(_529){_529.remove();}},subscribe:function(_52a,_52b,_52c){return hub.subscribe(_52a,lang.hitch(_52b,_52c));},publish:function(_52d,args){return hub.publish.apply(hub,[_52d].concat(args));},connectPublisher:function(_52e,obj,_52f){var pf=function(){_524.publish(_52e,arguments);};return _52f?_524.connect(obj,_52f,pf):_524.connect(obj,pf);},isCopyKey:function(e){return e[_516];}};_524.unsubscribe=_524.disconnect;1&&lang.mixin(_50a,_524);return _524;});}}});(function(){var _530=this.require;_530({cache:{}});!_530.async&&_530(["dojo"]);_530.boot&&_530.apply(null,_530.boot);})();
|
69
|
+
isEmpty = function(it){
|
70
|
+
for(var p in it){
|
71
|
+
return 0;
|
72
|
+
}
|
73
|
+
return 1;
|
74
|
+
},
|
75
|
+
|
76
|
+
toString = {}.toString,
|
77
|
+
|
78
|
+
isFunction = function(it){
|
79
|
+
return toString.call(it) == "[object Function]";
|
80
|
+
},
|
81
|
+
|
82
|
+
isString = function(it){
|
83
|
+
return toString.call(it) == "[object String]";
|
84
|
+
},
|
85
|
+
|
86
|
+
isArray = function(it){
|
87
|
+
return toString.call(it) == "[object Array]";
|
88
|
+
},
|
89
|
+
|
90
|
+
forEach = function(vector, callback){
|
91
|
+
if(vector){
|
92
|
+
for(var i = 0; i < vector.length;){
|
93
|
+
callback(vector[i++]);
|
94
|
+
}
|
95
|
+
}
|
96
|
+
},
|
97
|
+
|
98
|
+
mix = function(dest, src){
|
99
|
+
for(var p in src){
|
100
|
+
dest[p] = src[p];
|
101
|
+
}
|
102
|
+
return dest;
|
103
|
+
},
|
104
|
+
|
105
|
+
makeError = function(error, info){
|
106
|
+
return mix(new Error(error), {src:"dojoLoader", info:info});
|
107
|
+
},
|
108
|
+
|
109
|
+
uidSeed = 1,
|
110
|
+
|
111
|
+
uid = function(){
|
112
|
+
// Returns a unique indentifier (within the lifetime of the document) of the form /_d+/.
|
113
|
+
return "_" + uidSeed++;
|
114
|
+
},
|
115
|
+
|
116
|
+
// FIXME: how to doc window.require() api
|
117
|
+
|
118
|
+
// this will be the global require function; define it immediately so we can start hanging things off of it
|
119
|
+
req = function(
|
120
|
+
config, //(object, optional) hash of configuration properties
|
121
|
+
dependencies, //(array of commonjs.moduleId, optional) list of modules to be loaded before applying callback
|
122
|
+
callback //(function, optional) lamda expression to apply to module values implied by dependencies
|
123
|
+
){
|
124
|
+
return contextRequire(config, dependencies, callback, 0, req);
|
125
|
+
},
|
126
|
+
|
127
|
+
// the loader uses the has.js API to control feature inclusion/exclusion; define then use throughout
|
128
|
+
global = this,
|
129
|
+
|
130
|
+
doc = global.document,
|
131
|
+
|
132
|
+
element = doc && doc.createElement("DiV"),
|
133
|
+
|
134
|
+
has = req.has = function(name){
|
135
|
+
return isFunction(hasCache[name]) ? (hasCache[name] = hasCache[name](global, doc, element)) : hasCache[name];
|
136
|
+
},
|
137
|
+
|
138
|
+
hasCache = has.cache = defaultConfig.hasCache;
|
139
|
+
|
140
|
+
has.add = function(name, test, now, force){
|
141
|
+
(hasCache[name]===undefined || force) && (hasCache[name] = test);
|
142
|
+
return now && has(name);
|
143
|
+
};
|
144
|
+
|
145
|
+
has.add("host-node", userConfig.has && "host-node" in userConfig.has ?
|
146
|
+
userConfig.has["host-node"] :
|
147
|
+
(typeof process == "object" && process.versions && process.versions.node && process.versions.v8));
|
148
|
+
if(has("host-node")){
|
149
|
+
// fixup the default config for node.js environment
|
150
|
+
require("./_base/configNode.js").config(defaultConfig);
|
151
|
+
// remember node's require (with respect to baseUrl==dojo's root)
|
152
|
+
defaultConfig.loaderPatch.nodeRequire = require;
|
153
|
+
}
|
154
|
+
|
155
|
+
has.add("host-rhino", userConfig.has && "host-rhino" in userConfig.has ?
|
156
|
+
userConfig.has["host-rhino"] :
|
157
|
+
(typeof load == "function" && (typeof Packages == "function" || typeof Packages == "object")));
|
158
|
+
if(has("host-rhino")){
|
159
|
+
// owing to rhino's lame feature that hides the source of the script, give the user a way to specify the baseUrl...
|
160
|
+
for(var baseUrl = userConfig.baseUrl || ".", arg, rhinoArgs = this.arguments, i = 0; i < rhinoArgs.length;){
|
161
|
+
arg = (rhinoArgs[i++] + "").split("=");
|
162
|
+
if(arg[0] == "baseUrl"){
|
163
|
+
baseUrl = arg[1];
|
164
|
+
break;
|
165
|
+
}
|
166
|
+
}
|
167
|
+
load(baseUrl + "/_base/configRhino.js");
|
168
|
+
rhinoDojoConfig(defaultConfig, baseUrl, rhinoArgs);
|
169
|
+
}
|
170
|
+
|
171
|
+
// userConfig has tests override defaultConfig has tests; do this after the environment detection because
|
172
|
+
// the environment detection usually sets some has feature values in the hasCache.
|
173
|
+
for(var p in userConfig.has){
|
174
|
+
has.add(p, userConfig.has[p], 0, 1);
|
175
|
+
}
|
176
|
+
|
177
|
+
//
|
178
|
+
// define the loader data
|
179
|
+
//
|
180
|
+
|
181
|
+
// the loader will use these like symbols if the loader has the traceApi; otherwise
|
182
|
+
// define magic numbers so that modules can be provided as part of defaultConfig
|
183
|
+
var requested = 1,
|
184
|
+
arrived = 2,
|
185
|
+
nonmodule = 3,
|
186
|
+
executing = 4,
|
187
|
+
executed = 5;
|
188
|
+
|
189
|
+
if(has("dojo-trace-api")){
|
190
|
+
// these make debugging nice; but using strings for symbols is a gross rookie error; don't do it for production code
|
191
|
+
requested = "requested";
|
192
|
+
arrived = "arrived";
|
193
|
+
nonmodule = "not-a-module";
|
194
|
+
executing = "executing";
|
195
|
+
executed = "executed";
|
196
|
+
}
|
197
|
+
|
198
|
+
var legacyMode = 0,
|
199
|
+
sync = "sync",
|
200
|
+
xd = "xd",
|
201
|
+
syncExecStack = [],
|
202
|
+
dojoRequirePlugin = 0,
|
203
|
+
checkDojoRequirePlugin = noop,
|
204
|
+
transformToAmd = noop,
|
205
|
+
getXhr;
|
206
|
+
if(has("dojo-sync-loader")){
|
207
|
+
req.isXdUrl = noop;
|
208
|
+
|
209
|
+
req.initSyncLoader = function(dojoRequirePlugin_, checkDojoRequirePlugin_, transformToAmd_){
|
210
|
+
if(!dojoRequirePlugin){
|
211
|
+
dojoRequirePlugin = dojoRequirePlugin_;
|
212
|
+
checkDojoRequirePlugin = checkDojoRequirePlugin_;
|
213
|
+
transformToAmd = transformToAmd_;
|
214
|
+
}
|
215
|
+
return {
|
216
|
+
sync:sync,
|
217
|
+
xd:xd,
|
218
|
+
arrived:arrived,
|
219
|
+
nonmodule:nonmodule,
|
220
|
+
executing:executing,
|
221
|
+
executed:executed,
|
222
|
+
syncExecStack:syncExecStack,
|
223
|
+
modules:modules,
|
224
|
+
execQ:execQ,
|
225
|
+
getModule:getModule,
|
226
|
+
injectModule:injectModule,
|
227
|
+
setArrived:setArrived,
|
228
|
+
signal:signal,
|
229
|
+
finishExec:finishExec,
|
230
|
+
execModule:execModule,
|
231
|
+
dojoRequirePlugin:dojoRequirePlugin,
|
232
|
+
getLegacyMode:function(){return legacyMode;},
|
233
|
+
holdIdle:function(){checkCompleteGuard++;},
|
234
|
+
releaseIdle:function(){checkIdle();}
|
235
|
+
};
|
236
|
+
};
|
237
|
+
|
238
|
+
if(has("dom")){
|
239
|
+
// in legacy sync mode, the loader needs a minimal XHR library to load dojo/_base/loader and dojo/_base/xhr
|
240
|
+
|
241
|
+
var locationProtocol = location.protocol,
|
242
|
+
locationHost = location.host,
|
243
|
+
fileProtocol = !locationHost;
|
244
|
+
req.isXdUrl = function(url){
|
245
|
+
if(fileProtocol || /^\./.test(url)){
|
246
|
+
// begins with a dot is always relative to page URL; therefore not xdomain
|
247
|
+
return false;
|
248
|
+
}
|
249
|
+
if(/^\/\//.test(url)){
|
250
|
+
// for v1.6- backcompat, url starting with // indicates xdomain
|
251
|
+
return true;
|
252
|
+
}
|
253
|
+
// get protocol and host
|
254
|
+
var match = url.match(/^([^\/\:]+\:)\/\/([^\/]+)/);
|
255
|
+
return match && (match[1] != locationProtocol || match[2] != locationHost);
|
256
|
+
};
|
257
|
+
|
258
|
+
// note: to get the file:// protocol to work in FF, you must set security.fileuri.strict_origin_policy to false in about:config
|
259
|
+
has.add("dojo-xhr-factory", 1);
|
260
|
+
has.add("dojo-force-activex-xhr", has("host-browser") && !doc.addEventListener && window.location.protocol == "file:");
|
261
|
+
has.add("native-xhr", typeof XMLHttpRequest != "undefined");
|
262
|
+
if(has("native-xhr") && !has("dojo-force-activex-xhr")){
|
263
|
+
getXhr = function(){
|
264
|
+
return new XMLHttpRequest();
|
265
|
+
};
|
266
|
+
}else{
|
267
|
+
// if in the browser an old IE; find an xhr
|
268
|
+
for(var XMLHTTP_PROGIDS = ['Msxml2.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.4.0'], progid, i = 0; i < 3;){
|
269
|
+
try{
|
270
|
+
progid = XMLHTTP_PROGIDS[i++];
|
271
|
+
if(new ActiveXObject(progid)){
|
272
|
+
// this progid works; therefore, use it from now on
|
273
|
+
break;
|
274
|
+
}
|
275
|
+
}catch(e){
|
276
|
+
// squelch; we're just trying to find a good ActiveX progid
|
277
|
+
// if they all fail, then progid ends up as the last attempt and that will signal the error
|
278
|
+
// the first time the client actually tries to exec an xhr
|
279
|
+
}
|
280
|
+
}
|
281
|
+
getXhr = function(){
|
282
|
+
return new ActiveXObject(progid);
|
283
|
+
};
|
284
|
+
}
|
285
|
+
req.getXhr = getXhr;
|
286
|
+
|
287
|
+
has.add("dojo-gettext-api", 1);
|
288
|
+
req.getText = function(url, async, onLoad){
|
289
|
+
var xhr = getXhr();
|
290
|
+
xhr.open('GET', fixupUrl(url), false);
|
291
|
+
xhr.send(null);
|
292
|
+
if(xhr.status == 200 || (!location.host && !xhr.status)){
|
293
|
+
if(onLoad){
|
294
|
+
onLoad(xhr.responseText, async);
|
295
|
+
}
|
296
|
+
}else{
|
297
|
+
throw makeError("xhrFailed", xhr.status);
|
298
|
+
}
|
299
|
+
return xhr.responseText;
|
300
|
+
};
|
301
|
+
}
|
302
|
+
}else{
|
303
|
+
req.async = 1;
|
304
|
+
}
|
305
|
+
|
306
|
+
//
|
307
|
+
// loader eval
|
308
|
+
//
|
309
|
+
var eval_ =
|
310
|
+
// use the function constructor so our eval is scoped close to (but not in) in the global space with minimal pollution
|
311
|
+
new Function('return eval(arguments[0]);');
|
312
|
+
|
313
|
+
req.eval =
|
314
|
+
function(text, hint){
|
315
|
+
return eval_(text + "\r\n////@ sourceURL=" + hint);
|
316
|
+
};
|
317
|
+
|
318
|
+
//
|
319
|
+
// loader micro events API
|
320
|
+
//
|
321
|
+
var listenerQueues = {},
|
322
|
+
error = "error",
|
323
|
+
signal = req.signal = function(type, args){
|
324
|
+
var queue = listenerQueues[type];
|
325
|
+
// notice we run a copy of the queue; this allows listeners to add/remove
|
326
|
+
// other listeners without affecting this particular signal
|
327
|
+
forEach(queue && queue.slice(0), function(listener){
|
328
|
+
listener.apply(null, isArray(args) ? args : [args]);
|
329
|
+
});
|
330
|
+
},
|
331
|
+
on = req.on = function(type, listener){
|
332
|
+
// notice a queue is not created until a client actually connects
|
333
|
+
var queue = listenerQueues[type] || (listenerQueues[type] = []);
|
334
|
+
queue.push(listener);
|
335
|
+
return {
|
336
|
+
remove:function(){
|
337
|
+
for(var i = 0; i<queue.length; i++){
|
338
|
+
if(queue[i]===listener){
|
339
|
+
queue.splice(i, 1);
|
340
|
+
return;
|
341
|
+
}
|
342
|
+
}
|
343
|
+
}
|
344
|
+
};
|
345
|
+
};
|
346
|
+
|
347
|
+
// configuration machinery; with an optimized/built defaultConfig, all configuration machinery can be discarded
|
348
|
+
// lexical variables hold key loader data structures to help with minification; these may be completely,
|
349
|
+
// one-time initialized by defaultConfig for optimized/built versions
|
350
|
+
var
|
351
|
+
aliases
|
352
|
+
// a vector of pairs of [regexs or string, replacement] => (alias, actual)
|
353
|
+
= [],
|
354
|
+
|
355
|
+
paths
|
356
|
+
// CommonJS paths
|
357
|
+
= {},
|
358
|
+
|
359
|
+
pathsMapProg
|
360
|
+
// list of (from-path, to-path, regex, length) derived from paths;
|
361
|
+
// a "program" to apply paths; see computeMapProg
|
362
|
+
= [],
|
363
|
+
|
364
|
+
packs
|
365
|
+
// a map from packageId to package configuration object; see fixupPackageInfo
|
366
|
+
= {},
|
367
|
+
|
368
|
+
packageMap
|
369
|
+
// map from package name to local-installed package name
|
370
|
+
= {},
|
371
|
+
|
372
|
+
packageMapProg
|
373
|
+
// list of (from-package, to-package, regex, length) derived from packageMap;
|
374
|
+
// a "program" to apply paths; see computeMapProg
|
375
|
+
= [],
|
376
|
+
|
377
|
+
modules
|
378
|
+
// A hash:(mid) --> (module-object) the module namespace
|
379
|
+
//
|
380
|
+
// pid: the package identifier to which the module belongs (e.g., "dojo"); "" indicates the system or default package
|
381
|
+
// mid: the fully-resolved (i.e., mappings have been applied) module identifier without the package identifier (e.g., "dojo/io/script")
|
382
|
+
// url: the URL from which the module was retrieved
|
383
|
+
// pack: the package object of the package to which the module belongs
|
384
|
+
// executed: 0 => not executed; executing => in the process of tranversing deps and running factory; executed => factory has been executed
|
385
|
+
// deps: the dependency vector for this module (vector of modules objects)
|
386
|
+
// def: the factory for this module
|
387
|
+
// result: the result of the running the factory for this module
|
388
|
+
// injected: (requested | arrived | nonmodule) the status of the module; nonmodule means the resource did not call define
|
389
|
+
// load: plugin load function; applicable only for plugins
|
390
|
+
//
|
391
|
+
// Modules go through several phases in creation:
|
392
|
+
//
|
393
|
+
// 1. Requested: some other module's definition or a require application contained the requested module in
|
394
|
+
// its dependency vector or executing code explicitly demands a module via req.require.
|
395
|
+
//
|
396
|
+
// 2. Injected: a script element has been appended to the insert-point element demanding the resource implied by the URL
|
397
|
+
//
|
398
|
+
// 3. Loaded: the resource injected in [2] has been evalated.
|
399
|
+
//
|
400
|
+
// 4. Defined: the resource contained a define statement that advised the loader about the module. Notice that some
|
401
|
+
// resources may just contain a bundle of code and never formally define a module via define
|
402
|
+
//
|
403
|
+
// 5. Evaluated: the module was defined via define and the loader has evaluated the factory and computed a result.
|
404
|
+
= {},
|
405
|
+
|
406
|
+
cacheBust
|
407
|
+
// query string to append to module URLs to bust browser cache
|
408
|
+
= "",
|
409
|
+
|
410
|
+
cache
|
411
|
+
// hash:(mid)-->(function)
|
412
|
+
//
|
413
|
+
// Gives the contents of a cached resource; function should cause the same actions as if the given mid was downloaded
|
414
|
+
// and evaluated by the host environment
|
415
|
+
= {},
|
416
|
+
|
417
|
+
pendingCacheInsert
|
418
|
+
// hash:(mid)-->(function)
|
419
|
+
//
|
420
|
+
// Gives a set of cache modules pending entry into cache. When cached modules are published to the loader, they are
|
421
|
+
// entered into pendingCacheInsert; modules are then pressed into cache upon (1) AMD define or (2) upon receiving another
|
422
|
+
// independent set of cached modules. (1) is the usual case, and this case allows normalizing mids given in the pending
|
423
|
+
// cache for the local configuration, possibly relocating modules.
|
424
|
+
= {},
|
425
|
+
|
426
|
+
dojoSniffConfig
|
427
|
+
// map of configuration variables
|
428
|
+
// give the data-dojo-config as sniffed from the document (if any)
|
429
|
+
= {};
|
430
|
+
|
431
|
+
if(has("dojo-config-api")){
|
432
|
+
var consumePendingCacheInsert = function(referenceModule){
|
433
|
+
var p, item, match, now;
|
434
|
+
for(p in pendingCacheInsert){
|
435
|
+
item = pendingCacheInsert[p];
|
436
|
+
match = p.match(/^url\:(.+)/);
|
437
|
+
if(match){
|
438
|
+
cache[toUrl(match[1], referenceModule)] = item;
|
439
|
+
}else if(p=="*now"){
|
440
|
+
now = item;
|
441
|
+
}else if(p!="*noref"){
|
442
|
+
cache[getModuleInfo(p, referenceModule).mid] = item;
|
443
|
+
}
|
444
|
+
}
|
445
|
+
if(now){
|
446
|
+
now(createRequire(referenceModule));
|
447
|
+
}
|
448
|
+
pendingCacheInsert = {};
|
449
|
+
},
|
450
|
+
|
451
|
+
computeMapProg = function(map, dest, packName){
|
452
|
+
// This routine takes a map target-prefix(string)-->replacement(string) into a vector
|
453
|
+
// of quads (target-prefix, replacement, regex-for-target-prefix, length-of-target-prefix)
|
454
|
+
//
|
455
|
+
// The loader contains processes that map one string prefix to another. These
|
456
|
+
// are encountered when applying the requirejs paths configuration and when mapping
|
457
|
+
// package names. We can make the mapping and any replacement easier and faster by
|
458
|
+
// replacing the map with a vector of quads and then using this structure in the simple machine runMapProg.
|
459
|
+
dest.splice(0, dest.length);
|
460
|
+
var p, i, item, reverseName = 0;
|
461
|
+
for(p in map){
|
462
|
+
dest.push([p, map[p]]);
|
463
|
+
if(map[p]==packName){
|
464
|
+
reverseName = p;
|
465
|
+
}
|
466
|
+
}
|
467
|
+
dest.sort(function(lhs, rhs){
|
468
|
+
return rhs[0].length - lhs[0].length;
|
469
|
+
});
|
470
|
+
for(i = 0; i < dest.length;){
|
471
|
+
item = dest[i++];
|
472
|
+
item[2] = new RegExp("^" + item[0].replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, function(c){ return "\\" + c; }) + "(\/|$)");
|
473
|
+
item[3] = item[0].length + 1;
|
474
|
+
}
|
475
|
+
return reverseName;
|
476
|
+
},
|
477
|
+
|
478
|
+
fixupPackageInfo = function(packageInfo, baseUrl){
|
479
|
+
// calculate the precise (name, baseUrl, main, mappings) for a package
|
480
|
+
var name = packageInfo.name;
|
481
|
+
if(!name){
|
482
|
+
// packageInfo must be a string that gives the name
|
483
|
+
name = packageInfo;
|
484
|
+
packageInfo = {name:name};
|
485
|
+
}
|
486
|
+
packageInfo = mix({main:"main", mapProg:[]}, packageInfo);
|
487
|
+
packageInfo.location = (baseUrl || "") + (packageInfo.location ? packageInfo.location : name);
|
488
|
+
packageInfo.reverseName = computeMapProg(packageInfo.packageMap, packageInfo.mapProg, name);
|
489
|
+
|
490
|
+
if(!packageInfo.main.indexOf("./")){
|
491
|
+
packageInfo.main = packageInfo.main.substring(2);
|
492
|
+
}
|
493
|
+
|
494
|
+
// allow paths to be specified in the package info
|
495
|
+
// TODO: this is not supported; remove
|
496
|
+
mix(paths, packageInfo.paths);
|
497
|
+
|
498
|
+
// now that we've got a fully-resolved package object, push it into the configuration
|
499
|
+
packs[name] = packageInfo;
|
500
|
+
packageMap[name] = name;
|
501
|
+
},
|
502
|
+
|
503
|
+
config = function(config, booting){
|
504
|
+
for(var p in config){
|
505
|
+
if(p=="waitSeconds"){
|
506
|
+
req.waitms = (config[p] || 0) * 1000;
|
507
|
+
}
|
508
|
+
if(p=="cacheBust"){
|
509
|
+
cacheBust = config[p] ? (isString(config[p]) ? config[p] : (new Date()).getTime() + "") : "";
|
510
|
+
}
|
511
|
+
if(p=="baseUrl" || p=="combo"){
|
512
|
+
req[p] = config[p];
|
513
|
+
}
|
514
|
+
if(has("dojo-sync-loader") && p=="async"){
|
515
|
+
// falsy or "sync" => legacy sync loader
|
516
|
+
// "xd" => sync but loading xdomain tree and therefore loading asynchronously (not configurable, set automatically by the loader)
|
517
|
+
// "legacyAsync" => permanently in "xd" by choice
|
518
|
+
// "debugAtAllCosts" => trying to load everything via script injection (not implemented)
|
519
|
+
// otherwise, must be truthy => AMD
|
520
|
+
// legacyMode: sync | legacyAsync | xd | false
|
521
|
+
var mode = config[p];
|
522
|
+
req.legacyMode = legacyMode = (isString(mode) && /sync|legacyAsync/.test(mode) ? mode : (!mode ? "sync" : false));
|
523
|
+
req.async = !legacyMode;
|
524
|
+
}
|
525
|
+
if(config[p]!==hasCache){
|
526
|
+
// accumulate raw config info for client apps which can use this to pass their own config
|
527
|
+
req.rawConfig[p] = config[p];
|
528
|
+
p!="has" && has.add("config-"+p, config[p], 0, booting);
|
529
|
+
}
|
530
|
+
}
|
531
|
+
|
532
|
+
// make sure baseUrl exists
|
533
|
+
if(!req.baseUrl){
|
534
|
+
req.baseUrl = "./";
|
535
|
+
}
|
536
|
+
// make sure baseUrl ends with a slash
|
537
|
+
if(!/\/$/.test(req.baseUrl)){
|
538
|
+
req.baseUrl += "/";
|
539
|
+
}
|
540
|
+
|
541
|
+
// now do the special work for has, packages, packagePaths, paths, aliases, and cache
|
542
|
+
|
543
|
+
for(p in config.has){
|
544
|
+
has.add(p, config.has[p], 0, booting);
|
545
|
+
}
|
546
|
+
|
547
|
+
// for each package found in any packages config item, augment the packs map owned by the loader
|
548
|
+
forEach(config.packages, fixupPackageInfo);
|
549
|
+
|
550
|
+
// for each packagePath found in any packagePaths config item, augment the packs map owned by the loader
|
551
|
+
for(baseUrl in config.packagePaths){
|
552
|
+
forEach(config.packagePaths[baseUrl], function(packageInfo){
|
553
|
+
fixupPackageInfo(packageInfo, baseUrl + "/");
|
554
|
+
});
|
555
|
+
}
|
556
|
+
|
557
|
+
// push in any paths and recompute the internal pathmap
|
558
|
+
// warning: this cann't be done until the package config is processed since packages may include path info
|
559
|
+
computeMapProg(mix(paths, config.paths), pathsMapProg);
|
560
|
+
|
561
|
+
// aliases
|
562
|
+
forEach(config.aliases, function(pair){
|
563
|
+
if(isString(pair[0])){
|
564
|
+
pair[0] = new RegExp("^" + pair[0].replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, function(c){return "\\" + c;}) + "$");
|
565
|
+
}
|
566
|
+
aliases.push(pair);
|
567
|
+
});
|
568
|
+
|
569
|
+
// mix any packageMap config item and recompute the internal packageMapProg
|
570
|
+
computeMapProg(mix(packageMap, config.packageMap), packageMapProg);
|
571
|
+
|
572
|
+
// push in any new cache values
|
573
|
+
if(config.cache){
|
574
|
+
consumePendingCacheInsert();
|
575
|
+
pendingCacheInsert = config.cache;
|
576
|
+
if(config.cache["*noref"]){
|
577
|
+
consumePendingCacheInsert();
|
578
|
+
}
|
579
|
+
}
|
580
|
+
|
581
|
+
signal("config", [config, req.rawConfig]);
|
582
|
+
};
|
583
|
+
|
584
|
+
//
|
585
|
+
// execute the various sniffs
|
586
|
+
//
|
587
|
+
|
588
|
+
if(has("dojo-cdn") || has("dojo-sniff")){
|
589
|
+
for(var dojoDir, src, match, scripts = doc.getElementsByTagName("script"), i = 0; i < scripts.length && !match; i++){
|
590
|
+
if((src = scripts[i].getAttribute("src")) && (match = src.match(/(.*)\/?dojo\.js(\W|$)/i))){
|
591
|
+
// if baseUrl wasn't explicitly set, set it here to the dojo directory; this is the 1.6- behavior
|
592
|
+
userConfig.baseUrl = dojoDir = userConfig.baseUrl || defaultConfig.baseUrl || match[1];
|
593
|
+
|
594
|
+
// see if there's a dojo configuration stuffed into the node
|
595
|
+
src = (scripts[i].getAttribute("data-dojo-config") || scripts[i].getAttribute("djConfig"));
|
596
|
+
if(src){
|
597
|
+
dojoSniffConfig = req.eval("({ " + src + " })", "data-dojo-config");
|
598
|
+
}
|
599
|
+
if(has("dojo-requirejs-api")){
|
600
|
+
var dataMain = scripts[i].getAttribute("data-main");
|
601
|
+
if(dataMain){
|
602
|
+
dojoSniffConfig.deps = dojoSniffConfig.deps || [dataMain];
|
603
|
+
}
|
604
|
+
}
|
605
|
+
}
|
606
|
+
}
|
607
|
+
}
|
608
|
+
|
609
|
+
if(has("dojo-test-sniff")){
|
610
|
+
// pass down doh.testConfig from parent as if it were a data-dojo-config
|
611
|
+
try{
|
612
|
+
if(window.parent != window && window.parent.require){
|
613
|
+
var doh = window.parent.require("doh");
|
614
|
+
doh && mix(dojoSniffConfig, doh.testConfig);
|
615
|
+
}
|
616
|
+
}catch(e){}
|
617
|
+
}
|
618
|
+
|
619
|
+
// configure the loader; let the user override defaults
|
620
|
+
req.rawConfig = {};
|
621
|
+
config(defaultConfig, 1);
|
622
|
+
config(userConfig, 1);
|
623
|
+
config(dojoSniffConfig, 1);
|
624
|
+
|
625
|
+
if(has("dojo-cdn")){
|
626
|
+
packs.dojo.location = dojoDir;
|
627
|
+
packs.dijit.location = dojoDir + "../dijit/";
|
628
|
+
packs.dojox.location = dojoDir + "../dojox/";
|
629
|
+
}
|
630
|
+
|
631
|
+
}else{
|
632
|
+
// no config API, assume defaultConfig has everything the loader needs...for the entire lifetime of the application
|
633
|
+
paths = defaultConfig.paths;
|
634
|
+
pathsMapProg = defaultConfig.pathsMapProg;
|
635
|
+
packs = defaultConfig.packs;
|
636
|
+
aliases = defaultConfig.aliases;
|
637
|
+
packageMap = defaultConfig.packageMap;
|
638
|
+
packageMapProg = defaultConfig.packageMapProg;
|
639
|
+
modules = defaultConfig.modules;
|
640
|
+
cache = defaultConfig.cache;
|
641
|
+
cacheBust = defaultConfig.cacheBust;
|
642
|
+
|
643
|
+
// remember the default config for other processes (e.g., dojo/config)
|
644
|
+
req.rawConfig = defaultConfig;
|
645
|
+
}
|
646
|
+
|
647
|
+
|
648
|
+
if(has("dojo-combo-api")){
|
649
|
+
req.combo = req.combo || {add:noop};
|
650
|
+
var comboPending = 0,
|
651
|
+
combosPending = [],
|
652
|
+
comboPendingTimer = null;
|
653
|
+
}
|
654
|
+
|
655
|
+
|
656
|
+
// build the loader machinery iaw configuration, including has feature tests
|
657
|
+
var injectDependencies = function(module){
|
658
|
+
// checkComplete!=0 holds the idle signal; we're not idle if we're injecting dependencies
|
659
|
+
checkCompleteGuard++;
|
660
|
+
forEach(module.deps, injectModule);
|
661
|
+
if(has("dojo-combo-api") && comboPending && !comboPendingTimer){
|
662
|
+
comboPendingTimer = setTimeout(function() {
|
663
|
+
comboPending = 0;
|
664
|
+
comboPendingTimer = null;
|
665
|
+
req.combo.done(function(mids, url) {
|
666
|
+
var onLoadCallback= function(){
|
667
|
+
// defQ is a vector of module definitions 1-to-1, onto mids
|
668
|
+
runDefQ(0, mids);
|
669
|
+
checkComplete();
|
670
|
+
};
|
671
|
+
combosPending.push(mids);
|
672
|
+
injectingModule = mids;
|
673
|
+
req.injectUrl(url, onLoadCallback, mids);
|
674
|
+
injectingModule = 0;
|
675
|
+
}, req);
|
676
|
+
}, 0);
|
677
|
+
}
|
678
|
+
checkIdle();
|
679
|
+
},
|
680
|
+
|
681
|
+
contextRequire = function(a1, a2, a3, referenceModule, contextRequire){
|
682
|
+
var module, syntheticMid;
|
683
|
+
if(isString(a1)){
|
684
|
+
// signature is (moduleId)
|
685
|
+
module = getModule(a1, referenceModule, true);
|
686
|
+
if(module && module.executed){
|
687
|
+
return module.result;
|
688
|
+
}
|
689
|
+
throw makeError("undefinedModule", a1);
|
690
|
+
}
|
691
|
+
if(!isArray(a1)){
|
692
|
+
// a1 is a configuration
|
693
|
+
config(a1);
|
694
|
+
|
695
|
+
// juggle args; (a2, a3) may be (dependencies, callback)
|
696
|
+
a1 = a2;
|
697
|
+
a2 = a3;
|
698
|
+
}
|
699
|
+
if(isArray(a1)){
|
700
|
+
// signature is (requestList [,callback])
|
701
|
+
if(!a1.length){
|
702
|
+
a2 && a2();
|
703
|
+
}else{
|
704
|
+
syntheticMid = "require*" + uid();
|
705
|
+
|
706
|
+
// resolve the request list with respect to the reference module
|
707
|
+
for(var mid, deps = [], i = 0; i < a1.length;){
|
708
|
+
mid = a1[i++];
|
709
|
+
if(mid in {exports:1, module:1}){
|
710
|
+
throw makeError("illegalModuleId", mid);
|
711
|
+
}
|
712
|
+
deps.push(getModule(mid, referenceModule));
|
713
|
+
}
|
714
|
+
|
715
|
+
// construct a synthetic module to control execution of the requestList, and, optionally, callback
|
716
|
+
module = mix(makeModuleInfo("", syntheticMid, 0, ""), {
|
717
|
+
injected: arrived,
|
718
|
+
deps: deps,
|
719
|
+
def: a2 || noop,
|
720
|
+
require: referenceModule ? referenceModule.require : req
|
721
|
+
});
|
722
|
+
modules[module.mid] = module;
|
723
|
+
|
724
|
+
// checkComplete!=0 holds the idle signal; we're not idle if we're injecting dependencies
|
725
|
+
injectDependencies(module);
|
726
|
+
|
727
|
+
// try to immediately execute
|
728
|
+
// if already traversing a factory tree, then strict causes circular dependency to abort the execution; maybe
|
729
|
+
// it's possible to execute this require later after the current traversal completes and avoid the circular dependency.
|
730
|
+
// ...but *always* insist on immediate in synch mode
|
731
|
+
var strict = checkCompleteGuard && req.async;
|
732
|
+
checkCompleteGuard++;
|
733
|
+
execModule(module, strict);
|
734
|
+
checkIdle();
|
735
|
+
if(!module.executed){
|
736
|
+
// some deps weren't on board or circular dependency detected and strict; therefore, push into the execQ
|
737
|
+
execQ.push(module);
|
738
|
+
}
|
739
|
+
checkComplete();
|
740
|
+
}
|
741
|
+
}
|
742
|
+
return contextRequire;
|
743
|
+
},
|
744
|
+
|
745
|
+
createRequire = function(module){
|
746
|
+
if(!module){
|
747
|
+
return req;
|
748
|
+
}
|
749
|
+
var result = module.require;
|
750
|
+
if(!result){
|
751
|
+
result = function(a1, a2, a3){
|
752
|
+
return contextRequire(a1, a2, a3, module, result);
|
753
|
+
};
|
754
|
+
module.require = mix(result, req);
|
755
|
+
result.module = module;
|
756
|
+
result.toUrl = function(name){
|
757
|
+
return toUrl(name, module);
|
758
|
+
};
|
759
|
+
result.toAbsMid = function(mid){
|
760
|
+
return toAbsMid(mid, module);
|
761
|
+
};
|
762
|
+
if(has("dojo-undef-api")){
|
763
|
+
result.undef = function(mid){
|
764
|
+
req.undef(mid, module);
|
765
|
+
};
|
766
|
+
}
|
767
|
+
if(has("dojo-sync-loader")){
|
768
|
+
result.syncLoadNls = function(mid){
|
769
|
+
var nlsModuleInfo = getModuleInfo(mid, module),
|
770
|
+
nlsModule = modules[nlsModuleInfo.mid];
|
771
|
+
if(!nlsModule || !nlsModule.executed){
|
772
|
+
cached = cache[nlsModuleInfo.mid] || cache[nlsModuleInfo.cacheId];
|
773
|
+
if(cached){
|
774
|
+
evalModuleText(cached);
|
775
|
+
nlsModule = modules[nlsModuleInfo.mid];
|
776
|
+
}
|
777
|
+
}
|
778
|
+
return nlsModule && nlsModule.executed && nlsModule.result;
|
779
|
+
};
|
780
|
+
}
|
781
|
+
|
782
|
+
}
|
783
|
+
return result;
|
784
|
+
},
|
785
|
+
|
786
|
+
execQ =
|
787
|
+
// The list of modules that need to be evaluated.
|
788
|
+
[],
|
789
|
+
|
790
|
+
defQ =
|
791
|
+
// The queue of define arguments sent to loader.
|
792
|
+
[],
|
793
|
+
|
794
|
+
waiting =
|
795
|
+
// The set of modules upon which the loader is waiting for definition to arrive
|
796
|
+
{},
|
797
|
+
|
798
|
+
setRequested = function(module){
|
799
|
+
module.injected = requested;
|
800
|
+
waiting[module.mid] = 1;
|
801
|
+
if(module.url){
|
802
|
+
waiting[module.url] = module.pack || 1;
|
803
|
+
}
|
804
|
+
},
|
805
|
+
|
806
|
+
setArrived = function(module){
|
807
|
+
module.injected = arrived;
|
808
|
+
delete waiting[module.mid];
|
809
|
+
if(module.url){
|
810
|
+
delete waiting[module.url];
|
811
|
+
}
|
812
|
+
if(isEmpty(waiting)){
|
813
|
+
clearTimer();
|
814
|
+
has("dojo-sync-loader") && legacyMode==xd && (legacyMode = sync);
|
815
|
+
}
|
816
|
+
},
|
817
|
+
|
818
|
+
execComplete = req.idle =
|
819
|
+
// says the loader has completed (or not) its work
|
820
|
+
function(){
|
821
|
+
return !defQ.length && isEmpty(waiting) && !execQ.length && !checkCompleteGuard;
|
822
|
+
},
|
823
|
+
|
824
|
+
runMapProg = function(targetMid, map){
|
825
|
+
// search for targetMid in map; return the map item if found; falsy otherwise
|
826
|
+
for(var i = 0; i < map.length; i++){
|
827
|
+
if(map[i][2].test(targetMid)){
|
828
|
+
return map[i];
|
829
|
+
}
|
830
|
+
}
|
831
|
+
return 0;
|
832
|
+
},
|
833
|
+
|
834
|
+
compactPath = function(path){
|
835
|
+
var result = [],
|
836
|
+
segment, lastSegment;
|
837
|
+
path = path.replace(/\\/g, '/').split('/');
|
838
|
+
while(path.length){
|
839
|
+
segment = path.shift();
|
840
|
+
if(segment==".." && result.length && lastSegment!=".."){
|
841
|
+
result.pop();
|
842
|
+
lastSegment = result[result.length - 1];
|
843
|
+
}else if(segment!="."){
|
844
|
+
result.push(lastSegment= segment);
|
845
|
+
} // else ignore "."
|
846
|
+
}
|
847
|
+
return result.join("/");
|
848
|
+
},
|
849
|
+
|
850
|
+
makeModuleInfo = function(pid, mid, pack, url, cacheId){
|
851
|
+
if(has("dojo-sync-loader")){
|
852
|
+
var xd= req.isXdUrl(url);
|
853
|
+
return {pid:pid, mid:mid, pack:pack, url:url, executed:0, def:0, isXd:xd, isAmd:!!(xd || (packs[pid] && packs[pid].isAmd)), cacheId:cacheId};
|
854
|
+
}else{
|
855
|
+
return {pid:pid, mid:mid, pack:pack, url:url, executed:0, def:0, cacheId:cacheId};
|
856
|
+
}
|
857
|
+
},
|
858
|
+
|
859
|
+
getModuleInfo_ = function(mid, referenceModule, packs, modules, baseUrl, packageMapProg, pathsMapProg, alwaysCreate){
|
860
|
+
// arguments are passed instead of using lexical variables so that this function my be used independent of the loader (e.g., the builder)
|
861
|
+
// alwaysCreate is useful in this case so that getModuleInfo never returns references to real modules owned by the loader
|
862
|
+
var pid, pack, midInPackage, mapProg, mapItem, path, url, result, isRelative, requestedMid, cacheId=0;
|
863
|
+
requestedMid = mid;
|
864
|
+
isRelative = /^\./.test(mid);
|
865
|
+
if(/(^\/)|(\:)|(\.js$)/.test(mid) || (isRelative && !referenceModule)){
|
866
|
+
// absolute path or protocol of .js filetype, or relative path but no reference module and therefore relative to page
|
867
|
+
// whatever it is, it's not a module but just a URL of some sort
|
868
|
+
return makeModuleInfo(0, mid, 0, mid);
|
869
|
+
}else{
|
870
|
+
// relative module ids are relative to the referenceModule; get rid of any dots
|
871
|
+
mid = compactPath(isRelative ? (referenceModule.mid + "/../" + mid) : mid);
|
872
|
+
if(/^\./.test(mid)){
|
873
|
+
throw makeError("irrationalPath", mid);
|
874
|
+
}
|
875
|
+
// find the package indicated by the mid, if any
|
876
|
+
mapProg = referenceModule && referenceModule.pack && referenceModule.pack.mapProg;
|
877
|
+
mapItem = (mapProg && runMapProg(mid, mapProg)) || runMapProg(mid, packageMapProg);
|
878
|
+
if(mapItem){
|
879
|
+
// mid specified a module that's a member of a package; figure out the package id and module id
|
880
|
+
// notice we expect pack.main to be valid with no pre or post slash
|
881
|
+
pid = mapItem[1];
|
882
|
+
mid = mid.substring(mapItem[3]);
|
883
|
+
pack = packs[pid];
|
884
|
+
if(!mid){
|
885
|
+
mid= pack.main;
|
886
|
+
}
|
887
|
+
midInPackage = mid;
|
888
|
+
cacheId = pack.reverseName + "/" + mid;
|
889
|
+
mid = pid + "/" + mid;
|
890
|
+
}else{
|
891
|
+
pid = "";
|
892
|
+
}
|
893
|
+
|
894
|
+
// search aliases
|
895
|
+
var candidateLength = 0,
|
896
|
+
candidate = 0;
|
897
|
+
forEach(aliases, function(pair){
|
898
|
+
var match = mid.match(pair[0]);
|
899
|
+
if(match && match.length>candidateLength){
|
900
|
+
candidate = isFunction(pair[1]) ? mid.replace(pair[0], pair[1]) : pair[1];
|
901
|
+
}
|
902
|
+
});
|
903
|
+
if(candidate){
|
904
|
+
return getModuleInfo_(candidate, 0, packs, modules, baseUrl, packageMapProg, pathsMapProg, alwaysCreate);
|
905
|
+
}
|
906
|
+
|
907
|
+
result = modules[mid];
|
908
|
+
if(result){
|
909
|
+
return alwaysCreate ? makeModuleInfo(result.pid, result.mid, result.pack, result.url, cacheId) : modules[mid];
|
910
|
+
}
|
911
|
+
}
|
912
|
+
// get here iff the sought-after module does not yet exist; therefore, we need to compute the URL given the
|
913
|
+
// fully resolved (i.e., all relative indicators and package mapping resolved) module id
|
914
|
+
|
915
|
+
mapItem = runMapProg(mid, pathsMapProg);
|
916
|
+
if(mapItem){
|
917
|
+
url = mapItem[1] + mid.substring(mapItem[3] - 1);
|
918
|
+
}else if(pid){
|
919
|
+
url = pack.location + "/" + midInPackage;
|
920
|
+
}else if(has("config-tlmSiblingOfDojo")){
|
921
|
+
url = "../" + mid;
|
922
|
+
}else{
|
923
|
+
url = mid;
|
924
|
+
}
|
925
|
+
// if result is not absolute, add baseUrl
|
926
|
+
if(!(/(^\/)|(\:)/.test(url))){
|
927
|
+
url = baseUrl + url;
|
928
|
+
}
|
929
|
+
url += ".js";
|
930
|
+
return makeModuleInfo(pid, mid, pack, compactPath(url), cacheId);
|
931
|
+
},
|
932
|
+
|
933
|
+
getModuleInfo = function(mid, referenceModule){
|
934
|
+
return getModuleInfo_(mid, referenceModule, packs, modules, req.baseUrl, packageMapProg, pathsMapProg);
|
935
|
+
},
|
936
|
+
|
937
|
+
resolvePluginResourceId = function(plugin, prid, referenceModule){
|
938
|
+
return plugin.normalize ? plugin.normalize(prid, function(mid){return toAbsMid(mid, referenceModule);}) : toAbsMid(prid, referenceModule);
|
939
|
+
},
|
940
|
+
|
941
|
+
dynamicPluginUidGenerator = 0,
|
942
|
+
|
943
|
+
getModule = function(mid, referenceModule, immediate){
|
944
|
+
// compute and optionally construct (if necessary) the module implied by the mid with respect to referenceModule
|
945
|
+
var match, plugin, prid, result;
|
946
|
+
match = mid.match(/^(.+?)\!(.*)$/);
|
947
|
+
if(match){
|
948
|
+
// name was <plugin-module>!<plugin-resource-id>
|
949
|
+
plugin = getModule(match[1], referenceModule, immediate);
|
950
|
+
|
951
|
+
if(has("dojo-sync-loader") && legacyMode == sync && !plugin.executed){
|
952
|
+
injectModule(plugin);
|
953
|
+
if(plugin.injected===arrived && !plugin.executed){
|
954
|
+
checkCompleteGuard++;
|
955
|
+
execModule(plugin);
|
956
|
+
checkIdle();
|
957
|
+
}
|
958
|
+
if(plugin.executed){
|
959
|
+
promoteModuleToPlugin(plugin);
|
960
|
+
}else{
|
961
|
+
// we are in xdomain mode for some reason
|
962
|
+
execQ.unshift(plugin);
|
963
|
+
}
|
964
|
+
}
|
965
|
+
|
966
|
+
|
967
|
+
|
968
|
+
if(plugin.executed === executed && !plugin.load){
|
969
|
+
// executed the module not knowing it was a plugin
|
970
|
+
promoteModuleToPlugin(plugin);
|
971
|
+
}
|
972
|
+
|
973
|
+
// if the plugin has not been loaded, then can't resolve the prid and must assume this plugin is dynamic until we find out otherwise
|
974
|
+
if(plugin.load){
|
975
|
+
prid = resolvePluginResourceId(plugin, match[2], referenceModule);
|
976
|
+
mid = (plugin.mid + "!" + (plugin.dynamic ? ++dynamicPluginUidGenerator + "!" : "") + prid);
|
977
|
+
}else{
|
978
|
+
prid = match[2];
|
979
|
+
mid = plugin.mid + "!" + (++dynamicPluginUidGenerator) + "!waitingForPlugin";
|
980
|
+
}
|
981
|
+
result = {plugin:plugin, mid:mid, req:createRequire(referenceModule), prid:prid};
|
982
|
+
}else{
|
983
|
+
result = getModuleInfo(mid, referenceModule);
|
984
|
+
}
|
985
|
+
return modules[result.mid] || (!immediate && (modules[result.mid] = result));
|
986
|
+
},
|
987
|
+
|
988
|
+
toAbsMid = req.toAbsMid = function(mid, referenceModule){
|
989
|
+
return getModuleInfo(mid, referenceModule).mid;
|
990
|
+
},
|
991
|
+
|
992
|
+
toUrl = req.toUrl = function(name, referenceModule){
|
993
|
+
var moduleInfo = getModuleInfo(name+"/x", referenceModule),
|
994
|
+
url = moduleInfo.url;
|
995
|
+
return fixupUrl(moduleInfo.pid===0 ?
|
996
|
+
// if pid===0, then name had a protocol or absolute path; either way, toUrl is the identify function in such cases
|
997
|
+
name :
|
998
|
+
// "/x.js" since getModuleInfo automatically appends ".js" and we appended "/x" to make name look likde a module id
|
999
|
+
url.substring(0, url.length-5)
|
1000
|
+
);
|
1001
|
+
},
|
1002
|
+
|
1003
|
+
nonModuleProps = {
|
1004
|
+
injected: arrived,
|
1005
|
+
executed: executed,
|
1006
|
+
def: nonmodule,
|
1007
|
+
result: nonmodule
|
1008
|
+
},
|
1009
|
+
|
1010
|
+
makeCjs = function(mid){
|
1011
|
+
return modules[mid] = mix({mid:mid}, nonModuleProps);
|
1012
|
+
},
|
1013
|
+
|
1014
|
+
cjsRequireModule = makeCjs("require"),
|
1015
|
+
cjsExportsModule = makeCjs("exports"),
|
1016
|
+
cjsModuleModule = makeCjs("module"),
|
1017
|
+
|
1018
|
+
runFactory = function(module, args){
|
1019
|
+
req.trace("loader-run-factory", [module.mid]);
|
1020
|
+
var factory = module.def,
|
1021
|
+
result;
|
1022
|
+
has("dojo-sync-loader") && syncExecStack.unshift(module);
|
1023
|
+
if(has("config-dojo-loader-catches")){
|
1024
|
+
try{
|
1025
|
+
result= isFunction(factory) ? factory.apply(null, args) : factory;
|
1026
|
+
}catch(e){
|
1027
|
+
signal(error, module.result = makeError("factoryThrew", [module, e]));
|
1028
|
+
}
|
1029
|
+
}else{
|
1030
|
+
result= isFunction(factory) ? factory.apply(null, args) : factory;
|
1031
|
+
}
|
1032
|
+
module.result = result===undefined && module.cjs ? module.cjs.exports : result;
|
1033
|
+
has("dojo-sync-loader") && syncExecStack.shift(module);
|
1034
|
+
},
|
1035
|
+
|
1036
|
+
abortExec = {},
|
1037
|
+
|
1038
|
+
defOrder = 0,
|
1039
|
+
|
1040
|
+
promoteModuleToPlugin = function(pluginModule){
|
1041
|
+
var plugin = pluginModule.result;
|
1042
|
+
pluginModule.dynamic = plugin.dynamic;
|
1043
|
+
pluginModule.normalize = plugin.normalize;
|
1044
|
+
pluginModule.load = plugin.load;
|
1045
|
+
return pluginModule;
|
1046
|
+
},
|
1047
|
+
|
1048
|
+
resolvePluginLoadQ = function(plugin){
|
1049
|
+
// plugins is a newly executed module that has a loadQ waiting to run
|
1050
|
+
|
1051
|
+
// step 1: traverse the loadQ and fixup the mid and prid; remember the map from original mid to new mid
|
1052
|
+
// recall the original mid was created before the plugin was on board and therefore it was impossible to
|
1053
|
+
// compute the final mid; accordingly, prid may or may not change, but the mid will definitely change
|
1054
|
+
var map = {};
|
1055
|
+
forEach(plugin.loadQ, function(pseudoPluginResource){
|
1056
|
+
// manufacture and insert the real module in modules
|
1057
|
+
var pseudoMid = pseudoPluginResource.mid,
|
1058
|
+
prid = resolvePluginResourceId(plugin, pseudoPluginResource.prid, pseudoPluginResource.req.module),
|
1059
|
+
mid = plugin.dynamic ? pseudoPluginResource.mid.replace(/waitingForPlugin$/, prid) : (plugin.mid + "!" + prid),
|
1060
|
+
pluginResource = mix(mix({}, pseudoPluginResource), {mid:mid, prid:prid, injected:0});
|
1061
|
+
if(!modules[mid]){
|
1062
|
+
// create a new (the real) plugin resource and inject it normally now that the plugin is on board
|
1063
|
+
injectPlugin(modules[mid] = pluginResource);
|
1064
|
+
} // else this was a duplicate request for the same (plugin, rid) for a nondynamic plugin
|
1065
|
+
|
1066
|
+
// pluginResource is really just a placeholder with the wrong mid (because we couldn't calculate it until the plugin was on board)
|
1067
|
+
// mark is as arrived and delete it from modules; the real module was requested above
|
1068
|
+
map[pseudoPluginResource.mid] = modules[mid];
|
1069
|
+
setArrived(pseudoPluginResource);
|
1070
|
+
delete modules[pseudoPluginResource.mid];
|
1071
|
+
});
|
1072
|
+
plugin.loadQ = 0;
|
1073
|
+
|
1074
|
+
// step2: replace all references to any placeholder modules with real modules
|
1075
|
+
var substituteModules = function(module){
|
1076
|
+
for(var replacement, deps = module.deps || [], i = 0; i<deps.length; i++){
|
1077
|
+
replacement = map[deps[i].mid];
|
1078
|
+
if(replacement){
|
1079
|
+
deps[i] = replacement;
|
1080
|
+
}
|
1081
|
+
}
|
1082
|
+
};
|
1083
|
+
for(var p in modules){
|
1084
|
+
substituteModules(modules[p]);
|
1085
|
+
}
|
1086
|
+
forEach(execQ, substituteModules);
|
1087
|
+
},
|
1088
|
+
|
1089
|
+
finishExec = function(module){
|
1090
|
+
req.trace("loader-finish-exec", [module.mid]);
|
1091
|
+
module.executed = executed;
|
1092
|
+
module.defOrder = defOrder++;
|
1093
|
+
has("dojo-sync-loader") && forEach(module.provides, function(cb){ cb(); });
|
1094
|
+
if(module.loadQ){
|
1095
|
+
// the module was a plugin
|
1096
|
+
promoteModuleToPlugin(module);
|
1097
|
+
resolvePluginLoadQ(module);
|
1098
|
+
}
|
1099
|
+
// remove all occurences of this module from the execQ
|
1100
|
+
for(i = 0; i < execQ.length;){
|
1101
|
+
if(execQ[i] === module){
|
1102
|
+
execQ.splice(i, 1);
|
1103
|
+
}else{
|
1104
|
+
i++;
|
1105
|
+
}
|
1106
|
+
}
|
1107
|
+
},
|
1108
|
+
|
1109
|
+
circleTrace = [],
|
1110
|
+
|
1111
|
+
execModule = function(module, strict){
|
1112
|
+
// run the dependency vector, then run the factory for module
|
1113
|
+
if(module.executed === executing){
|
1114
|
+
req.trace("loader-circular-dependency", [circleTrace.concat(mid).join("->")]);
|
1115
|
+
return (!module.def || strict) ? abortExec : (module.cjs && module.cjs.exports);
|
1116
|
+
}
|
1117
|
+
// at this point the module is either not executed or fully executed
|
1118
|
+
|
1119
|
+
|
1120
|
+
if(!module.executed){
|
1121
|
+
if(!module.def){
|
1122
|
+
return abortExec;
|
1123
|
+
}
|
1124
|
+
var mid = module.mid,
|
1125
|
+
deps = module.deps || [],
|
1126
|
+
arg, argResult,
|
1127
|
+
args = [],
|
1128
|
+
i = 0;
|
1129
|
+
|
1130
|
+
if(has("dojo-trace-api")){
|
1131
|
+
circleTrace.push(mid);
|
1132
|
+
req.trace("loader-exec-module", ["exec", circleTrace.length, mid]);
|
1133
|
+
}
|
1134
|
+
|
1135
|
+
// for circular dependencies, assume the first module encountered was executed OK
|
1136
|
+
// modules that circularly depend on a module that has not run its factory will get
|
1137
|
+
// the premade cjs.exports===module.result. They can take a reference to this object and/or
|
1138
|
+
// add properties to it. When the module finally runs its factory, the factory can
|
1139
|
+
// read/write/replace this object. Notice that so long as the object isn't replaced, any
|
1140
|
+
// reference taken earlier while walking the deps list is still valid.
|
1141
|
+
module.executed = executing;
|
1142
|
+
while(i < deps.length){
|
1143
|
+
arg = deps[i++];
|
1144
|
+
argResult = ((arg === cjsRequireModule) ? createRequire(module) :
|
1145
|
+
((arg === cjsExportsModule) ? module.cjs.exports :
|
1146
|
+
((arg === cjsModuleModule) ? module.cjs :
|
1147
|
+
execModule(arg, strict))));
|
1148
|
+
if(argResult === abortExec){
|
1149
|
+
module.executed = 0;
|
1150
|
+
req.trace("loader-exec-module", ["abort", mid]);
|
1151
|
+
has("dojo-trace-api") && circleTrace.pop();
|
1152
|
+
return abortExec;
|
1153
|
+
}
|
1154
|
+
args.push(argResult);
|
1155
|
+
}
|
1156
|
+
runFactory(module, args);
|
1157
|
+
finishExec(module);
|
1158
|
+
}
|
1159
|
+
// at this point the module is guaranteed fully executed
|
1160
|
+
|
1161
|
+
has("dojo-trace-api") && circleTrace.pop();
|
1162
|
+
return module.result;
|
1163
|
+
},
|
1164
|
+
|
1165
|
+
|
1166
|
+
checkCompleteGuard = 0,
|
1167
|
+
|
1168
|
+
checkComplete = function(){
|
1169
|
+
// keep going through the execQ as long as at least one factory is executed
|
1170
|
+
// plugins, recursion, cached modules all make for many execution path possibilities
|
1171
|
+
if(checkCompleteGuard){
|
1172
|
+
return;
|
1173
|
+
}
|
1174
|
+
checkCompleteGuard++;
|
1175
|
+
checkDojoRequirePlugin();
|
1176
|
+
for(var currentDefOrder, module, i = 0; i < execQ.length;){
|
1177
|
+
currentDefOrder = defOrder;
|
1178
|
+
module = execQ[i];
|
1179
|
+
execModule(module);
|
1180
|
+
if(currentDefOrder!=defOrder){
|
1181
|
+
// defOrder was bumped one or more times indicating something was executed (note, this indicates
|
1182
|
+
// the execQ was modified, maybe a lot (for example a later module causes an earlier module to execute)
|
1183
|
+
checkDojoRequirePlugin();
|
1184
|
+
i = 0;
|
1185
|
+
}else{
|
1186
|
+
// nothing happened; check the next module in the exec queue
|
1187
|
+
i++;
|
1188
|
+
}
|
1189
|
+
}
|
1190
|
+
checkIdle();
|
1191
|
+
},
|
1192
|
+
|
1193
|
+
checkIdle = function(){
|
1194
|
+
checkCompleteGuard--;
|
1195
|
+
if(execComplete()){
|
1196
|
+
signal("idle", []);
|
1197
|
+
}
|
1198
|
+
};
|
1199
|
+
|
1200
|
+
|
1201
|
+
if(has("dojo-undef-api")){
|
1202
|
+
req.undef = function(moduleId, referenceModule){
|
1203
|
+
// In order to reload a module, it must be undefined (this routine) and then re-requested.
|
1204
|
+
// This is useful for testing frameworks (at least).
|
1205
|
+
var module = getModule(moduleId, referenceModule);
|
1206
|
+
setArrived(module);
|
1207
|
+
delete modules[module.mid];
|
1208
|
+
};
|
1209
|
+
}
|
1210
|
+
|
1211
|
+
if(has("dojo-inject-api")){
|
1212
|
+
if(has("dojo-loader-eval-hint-url")===undefined){
|
1213
|
+
has.add("dojo-loader-eval-hint-url", 1);
|
1214
|
+
}
|
1215
|
+
|
1216
|
+
var fixupUrl= function(url){
|
1217
|
+
url += ""; // make sure url is a Javascript string (some paths may be a Java string)
|
1218
|
+
return url + (cacheBust ? ((/\?/.test(url) ? "&" : "?") + cacheBust) : "");
|
1219
|
+
},
|
1220
|
+
|
1221
|
+
injectPlugin = function(
|
1222
|
+
module
|
1223
|
+
){
|
1224
|
+
// injects the plugin module given by module; may have to inject the plugin itself
|
1225
|
+
var plugin = module.plugin;
|
1226
|
+
|
1227
|
+
if(plugin.executed === executed && !plugin.load){
|
1228
|
+
// executed the module not knowing it was a plugin
|
1229
|
+
promoteModuleToPlugin(plugin);
|
1230
|
+
}
|
1231
|
+
|
1232
|
+
var onLoad = function(def){
|
1233
|
+
module.result = def;
|
1234
|
+
setArrived(module);
|
1235
|
+
finishExec(module);
|
1236
|
+
checkComplete();
|
1237
|
+
};
|
1238
|
+
|
1239
|
+
if(plugin.load){
|
1240
|
+
plugin.load(module.prid, module.req, onLoad);
|
1241
|
+
}else if(plugin.loadQ){
|
1242
|
+
plugin.loadQ.push(module);
|
1243
|
+
}else{
|
1244
|
+
// the unshift instead of push is important: we don't want plugins to execute as
|
1245
|
+
// dependencies of some other module because this may cause circles when the plugin
|
1246
|
+
// loadQ is run; also, generally, we want plugins to run early since they may load
|
1247
|
+
// several other modules and therefore can potentially unblock many modules
|
1248
|
+
plugin.loadQ = [module];
|
1249
|
+
execQ.unshift(plugin);
|
1250
|
+
injectModule(plugin);
|
1251
|
+
}
|
1252
|
+
},
|
1253
|
+
|
1254
|
+
// for IE, injecting a module may result in a recursive execution if the module is in the cache
|
1255
|
+
|
1256
|
+
cached = 0,
|
1257
|
+
|
1258
|
+
injectingModule = 0,
|
1259
|
+
|
1260
|
+
injectingCachedModule = 0,
|
1261
|
+
|
1262
|
+
evalModuleText = function(text, module){
|
1263
|
+
// see def() for the injectingCachedModule bracket; it simply causes a short, safe curcuit
|
1264
|
+
injectingCachedModule = 1;
|
1265
|
+
if(has("config-dojo-loader-catches")){
|
1266
|
+
try{
|
1267
|
+
if(text===cached){
|
1268
|
+
cached.call(null);
|
1269
|
+
}else{
|
1270
|
+
req.eval(text, has("dojo-loader-eval-hint-url") ? module.url : module.mid);
|
1271
|
+
}
|
1272
|
+
}catch(e){
|
1273
|
+
signal(error, makeError("evalModuleThrew", module));
|
1274
|
+
}
|
1275
|
+
}else{
|
1276
|
+
if(text===cached){
|
1277
|
+
cached.call(null);
|
1278
|
+
}else{
|
1279
|
+
req.eval(text, has("dojo-loader-eval-hint-url") ? module.url : module.mid);
|
1280
|
+
}
|
1281
|
+
}
|
1282
|
+
injectingCachedModule = 0;
|
1283
|
+
},
|
1284
|
+
|
1285
|
+
injectModule = function(module){
|
1286
|
+
// Inject the module. In the browser environment, this means appending a script element into
|
1287
|
+
// the document; in other environments, it means loading a file.
|
1288
|
+
//
|
1289
|
+
// If in synchronous mode, then get the module synchronously if it's not xdomainLoading.
|
1290
|
+
|
1291
|
+
var mid = module.mid,
|
1292
|
+
url = module.url;
|
1293
|
+
if(module.executed || module.injected || waiting[mid] || (module.url && ((module.pack && waiting[module.url]===module.pack) || waiting[module.url]==1))){
|
1294
|
+
return;
|
1295
|
+
}
|
1296
|
+
setRequested(module);
|
1297
|
+
|
1298
|
+
if(has("dojo-combo-api")){
|
1299
|
+
var viaCombo = 0;
|
1300
|
+
if(module.plugin && module.plugin.isCombo){
|
1301
|
+
// a combo plugin; therefore, must be handled by combo service
|
1302
|
+
// the prid should have already been converted to a URL (if required by the plugin) during
|
1303
|
+
// the normalze process; in any event, there is no way for the loader to know how to
|
1304
|
+
// to the conversion; therefore the third argument is zero
|
1305
|
+
req.combo.add(module.plugin.mid, module.prid, 0, req);
|
1306
|
+
viaCombo = 1;
|
1307
|
+
}else if(!module.plugin){
|
1308
|
+
viaCombo = req.combo.add(0, module.mid, module.url, req);
|
1309
|
+
}
|
1310
|
+
if(viaCombo){
|
1311
|
+
comboPending= 1;
|
1312
|
+
return;
|
1313
|
+
}
|
1314
|
+
}
|
1315
|
+
|
1316
|
+
if(module.plugin){
|
1317
|
+
injectPlugin(module);
|
1318
|
+
return;
|
1319
|
+
} // else a normal module (not a plugin)
|
1320
|
+
|
1321
|
+
|
1322
|
+
var onLoadCallback = function(){
|
1323
|
+
runDefQ(module);
|
1324
|
+
if(module.injected !== arrived){
|
1325
|
+
// the script that contained the module arrived and has been executed yet
|
1326
|
+
// nothing was added to the defQ (so it wasn't an AMD module) and the module
|
1327
|
+
// wasn't marked as arrived by dojo.provide (so it wasn't a v1.6- module);
|
1328
|
+
// therefore, it must not have been a module; adjust state accordingly
|
1329
|
+
setArrived(module);
|
1330
|
+
mix(module, nonModuleProps);
|
1331
|
+
}
|
1332
|
+
|
1333
|
+
if(has("dojo-sync-loader") && legacyMode){
|
1334
|
+
// must call checkComplete even in for sync loader because we may be in xdomainLoading mode;
|
1335
|
+
// but, if xd loading, then don't call checkComplete until out of the current sync traversal
|
1336
|
+
// in order to preserve order of execution of the dojo.required modules
|
1337
|
+
!syncExecStack.length && checkComplete();
|
1338
|
+
}else{
|
1339
|
+
checkComplete();
|
1340
|
+
}
|
1341
|
+
};
|
1342
|
+
cached = cache[mid] || cache[module.cacheId];
|
1343
|
+
if(cached){
|
1344
|
+
req.trace("loader-inject", ["cache", module.mid, url]);
|
1345
|
+
evalModuleText(cached, module);
|
1346
|
+
onLoadCallback();
|
1347
|
+
return;
|
1348
|
+
}
|
1349
|
+
if(has("dojo-sync-loader") && legacyMode){
|
1350
|
+
if(module.isXd){
|
1351
|
+
// switch to async mode temporarily; if current legacyMode!=sync, then is must be one of {legacyAsync, xd, false}
|
1352
|
+
legacyMode==sync && (legacyMode = xd);
|
1353
|
+
// fall through and load via script injection
|
1354
|
+
}else if(module.isAmd && legacyMode!=sync){
|
1355
|
+
// fall through and load via script injection
|
1356
|
+
}else{
|
1357
|
+
// mode may be sync, xd/legacyAsync, or async; module may be AMD or legacy; but module is always located on the same domain
|
1358
|
+
var xhrCallback = function(text){
|
1359
|
+
if(legacyMode==sync){
|
1360
|
+
// the top of syncExecStack gives the current synchronously executing module; the loader needs
|
1361
|
+
// to know this if it has to switch to async loading in the middle of evaluating a legacy module
|
1362
|
+
// this happens when a modules dojo.require's a module that must be loaded async because it's xdomain
|
1363
|
+
// (using unshift/shift because there is no back() methods for Javascript arrays)
|
1364
|
+
syncExecStack.unshift(module);
|
1365
|
+
evalModuleText(text, module);
|
1366
|
+
syncExecStack.shift();
|
1367
|
+
|
1368
|
+
// maybe the module was an AMD module
|
1369
|
+
runDefQ(module);
|
1370
|
+
|
1371
|
+
// legacy modules never get to defineModule() => cjs and injected never set; also evaluation implies executing
|
1372
|
+
if(!module.cjs){
|
1373
|
+
setArrived(module);
|
1374
|
+
finishExec(module);
|
1375
|
+
}
|
1376
|
+
|
1377
|
+
if(module.finish){
|
1378
|
+
// while synchronously evaluating this module, dojo.require was applied referencing a module
|
1379
|
+
// that had to be loaded async; therefore, the loader stopped answering all dojo.require
|
1380
|
+
// requests so they could be answered completely in the correct sequence; module.finish gives
|
1381
|
+
// the list of dojo.requires that must be re-applied once all target modules are available;
|
1382
|
+
// make a synthetic module to execute the dojo.require's in the correct order
|
1383
|
+
|
1384
|
+
// compute a guarnateed-unique mid for the synthetic finish module; remember the finish vector; remove it from the reference module
|
1385
|
+
// TODO: can we just leave the module.finish...what's it hurting?
|
1386
|
+
var finishMid = mid + "*finish",
|
1387
|
+
finish = module.finish;
|
1388
|
+
delete module.finish;
|
1389
|
+
|
1390
|
+
def(finishMid, ["dojo", ("dojo/require!" + finish.join(",")).replace(/\./g, "/")], function(dojo){
|
1391
|
+
forEach(finish, function(mid){ dojo.require(mid); });
|
1392
|
+
});
|
1393
|
+
// unshift, not push, which causes the current traversal to be reattempted from the top
|
1394
|
+
execQ.unshift(getModule(finishMid));
|
1395
|
+
}
|
1396
|
+
onLoadCallback();
|
1397
|
+
}else{
|
1398
|
+
text = transformToAmd(module, text);
|
1399
|
+
if(text){
|
1400
|
+
evalModuleText(text, module);
|
1401
|
+
onLoadCallback();
|
1402
|
+
}else{
|
1403
|
+
// if transformToAmd returned falsy, then the module was already AMD and it can be script-injected
|
1404
|
+
// do so to improve debugability(even though it means another download...which probably won't happen with a good browser cache)
|
1405
|
+
injectingModule = module;
|
1406
|
+
req.injectUrl(fixupUrl(url), onLoadCallback, module);
|
1407
|
+
injectingModule = 0;
|
1408
|
+
}
|
1409
|
+
}
|
1410
|
+
};
|
1411
|
+
|
1412
|
+
req.trace("loader-inject", ["xhr", module.mid, url, legacyMode!=sync]);
|
1413
|
+
if(has("config-dojo-loader-catches")){
|
1414
|
+
try{
|
1415
|
+
req.getText(url, legacyMode!=sync, xhrCallback);
|
1416
|
+
}catch(e){
|
1417
|
+
signal(error, makeError("xhrInjectFailed", [module, e]));
|
1418
|
+
}
|
1419
|
+
}else{
|
1420
|
+
req.getText(url, legacyMode!=sync, xhrCallback);
|
1421
|
+
}
|
1422
|
+
return;
|
1423
|
+
}
|
1424
|
+
} // else async mode or fell through in xdomain loading mode; either way, load by script injection
|
1425
|
+
req.trace("loader-inject", ["script", module.mid, url]);
|
1426
|
+
injectingModule = module;
|
1427
|
+
req.injectUrl(fixupUrl(url), onLoadCallback, module);
|
1428
|
+
injectingModule = 0;
|
1429
|
+
},
|
1430
|
+
|
1431
|
+
defineModule = function(module, deps, def){
|
1432
|
+
req.trace("loader-define-module", [module.mid, deps]);
|
1433
|
+
|
1434
|
+
if(has("dojo-combo-api") && module.plugin && module.plugin.isCombo){
|
1435
|
+
// the module is a plugin resource loaded by the combo service
|
1436
|
+
// note: check for module.plugin should be enough since normal plugin resources should
|
1437
|
+
// not follow this path; module.plugin.isCombo is future-proofing belt and suspenders
|
1438
|
+
module.result = isFunction(def) ? def() : def;
|
1439
|
+
setArrived(module);
|
1440
|
+
finishExec(module);
|
1441
|
+
return module;
|
1442
|
+
};
|
1443
|
+
|
1444
|
+
var mid = module.mid;
|
1445
|
+
if(module.injected === arrived){
|
1446
|
+
signal(error, makeError("multipleDefine", module));
|
1447
|
+
return module;
|
1448
|
+
}
|
1449
|
+
mix(module, {
|
1450
|
+
deps: deps,
|
1451
|
+
def: def,
|
1452
|
+
cjs: {
|
1453
|
+
id: module.mid,
|
1454
|
+
uri: module.url,
|
1455
|
+
exports: (module.result = {}),
|
1456
|
+
setExports: function(exports){
|
1457
|
+
module.cjs.exports = exports;
|
1458
|
+
}
|
1459
|
+
}
|
1460
|
+
});
|
1461
|
+
|
1462
|
+
// resolve deps with respect to this module
|
1463
|
+
for(var i = 0; i < deps.length; i++){
|
1464
|
+
deps[i] = getModule(deps[i], module);
|
1465
|
+
}
|
1466
|
+
|
1467
|
+
if(has("dojo-sync-loader") && legacyMode && !waiting[mid]){
|
1468
|
+
// the module showed up without being asked for; it was probably in a <script> element
|
1469
|
+
injectDependencies(module);
|
1470
|
+
execQ.push(module);
|
1471
|
+
checkComplete();
|
1472
|
+
}
|
1473
|
+
setArrived(module);
|
1474
|
+
|
1475
|
+
if(!isFunction(def) && !deps.length){
|
1476
|
+
module.result = def;
|
1477
|
+
finishExec(module);
|
1478
|
+
}
|
1479
|
+
|
1480
|
+
return module;
|
1481
|
+
},
|
1482
|
+
|
1483
|
+
runDefQ = function(referenceModule, mids){
|
1484
|
+
// defQ is an array of [id, dependencies, factory]
|
1485
|
+
// mids (if any) is a vector of mids given by a combo service
|
1486
|
+
var definedModules = [],
|
1487
|
+
module, args;
|
1488
|
+
while(defQ.length){
|
1489
|
+
args = defQ.shift();
|
1490
|
+
mids && (args[0]= mids.shift());
|
1491
|
+
// explicit define indicates possible multiple modules in a single file; delay injecting dependencies until defQ fully
|
1492
|
+
// processed since modules earlier in the queue depend on already-arrived modules that are later in the queue
|
1493
|
+
// TODO: what if no args[0] and no referenceModule
|
1494
|
+
module = (args[0] && getModule(args[0])) || referenceModule;
|
1495
|
+
definedModules.push([module, args[1], args[2]]);
|
1496
|
+
}
|
1497
|
+
consumePendingCacheInsert(referenceModule);
|
1498
|
+
forEach(definedModules, function(args){
|
1499
|
+
injectDependencies(defineModule.apply(null, args));
|
1500
|
+
});
|
1501
|
+
};
|
1502
|
+
}
|
1503
|
+
|
1504
|
+
var timerId = 0,
|
1505
|
+
clearTimer = noop,
|
1506
|
+
startTimer = noop;
|
1507
|
+
if(has("dojo-timeout-api")){
|
1508
|
+
// Timer machinery that monitors how long the loader is waiting and signals an error when the timer runs out.
|
1509
|
+
clearTimer = function(){
|
1510
|
+
timerId && clearTimeout(timerId);
|
1511
|
+
timerId = 0;
|
1512
|
+
},
|
1513
|
+
|
1514
|
+
startTimer = function(){
|
1515
|
+
clearTimer();
|
1516
|
+
req.waitms && (timerId = setTimeout(function(){
|
1517
|
+
clearTimer();
|
1518
|
+
signal(error, makeError("timeout", waiting));
|
1519
|
+
}, req.waitms));
|
1520
|
+
};
|
1521
|
+
}
|
1522
|
+
|
1523
|
+
if(has("dom")){
|
1524
|
+
has.add("ie-event-behavior", doc.attachEvent && (typeof opera === "undefined" || opera.toString() != "[object Opera]"));
|
1525
|
+
}
|
1526
|
+
|
1527
|
+
if(has("dom") && (has("dojo-inject-api") || has("dojo-dom-ready-api"))){
|
1528
|
+
var domOn = function(node, eventName, ieEventName, handler){
|
1529
|
+
// Add an event listener to a DOM node using the API appropriate for the current browser;
|
1530
|
+
// return a function that will disconnect the listener.
|
1531
|
+
if(!has("ie-event-behavior")){
|
1532
|
+
node.addEventListener(eventName, handler, false);
|
1533
|
+
return function(){
|
1534
|
+
node.removeEventListener(eventName, handler, false);
|
1535
|
+
};
|
1536
|
+
}else{
|
1537
|
+
node.attachEvent(ieEventName, handler);
|
1538
|
+
return function(){
|
1539
|
+
node.detachEvent(ieEventName, handler);
|
1540
|
+
};
|
1541
|
+
}
|
1542
|
+
},
|
1543
|
+
windowOnLoadListener = domOn(window, "load", "onload", function(){
|
1544
|
+
req.pageLoaded = 1;
|
1545
|
+
doc.readyState!="complete" && (doc.readyState = "complete");
|
1546
|
+
windowOnLoadListener();
|
1547
|
+
});
|
1548
|
+
|
1549
|
+
if(has("dojo-inject-api")){
|
1550
|
+
// if the loader is on the page, there must be at least one script element
|
1551
|
+
// getting its parent and then doing insertBefore solves the "Operation Aborted"
|
1552
|
+
// error in IE from appending to a node that isn't properly closed; see
|
1553
|
+
// dojo/tests/_base/loader/requirejs/simple-badbase.html for an example
|
1554
|
+
var sibling = doc.getElementsByTagName("script")[0],
|
1555
|
+
insertPoint= sibling.parentNode;
|
1556
|
+
req.injectUrl = function(url, callback, owner){
|
1557
|
+
// insert a script element to the insert-point element with src=url;
|
1558
|
+
// apply callback upon detecting the script has loaded.
|
1559
|
+
|
1560
|
+
startTimer();
|
1561
|
+
var node = owner.node = doc.createElement("script"),
|
1562
|
+
onLoad = function(e){
|
1563
|
+
e = e || window.event;
|
1564
|
+
var node = e.target || e.srcElement;
|
1565
|
+
if(e.type === "load" || /complete|loaded/.test(node.readyState)){
|
1566
|
+
disconnector();
|
1567
|
+
callback && callback();
|
1568
|
+
}
|
1569
|
+
},
|
1570
|
+
disconnector = domOn(node, "load", "onreadystatechange", onLoad);
|
1571
|
+
node.type = "text/javascript";
|
1572
|
+
node.charset = "utf-8";
|
1573
|
+
node.src = url;
|
1574
|
+
insertPoint.insertBefore(node, sibling);
|
1575
|
+
return node;
|
1576
|
+
};
|
1577
|
+
}
|
1578
|
+
}
|
1579
|
+
|
1580
|
+
if(has("dojo-log-api")){
|
1581
|
+
req.log = function(){
|
1582
|
+
try{
|
1583
|
+
for(var i = 0; i < arguments.length; i++){
|
1584
|
+
console.log(arguments[i]);
|
1585
|
+
}
|
1586
|
+
}catch(e){}
|
1587
|
+
};
|
1588
|
+
}else{
|
1589
|
+
req.log = noop;
|
1590
|
+
}
|
1591
|
+
|
1592
|
+
if(has("dojo-trace-api")){
|
1593
|
+
var trace = req.trace = function(
|
1594
|
+
group, // the trace group to which this application belongs
|
1595
|
+
args // the contents of the trace
|
1596
|
+
){
|
1597
|
+
///
|
1598
|
+
// Tracing interface by group.
|
1599
|
+
//
|
1600
|
+
// Sends the contents of args to the console iff (req.trace.on && req.trace[group])
|
1601
|
+
|
1602
|
+
if(trace.on && trace.group[group]){
|
1603
|
+
signal("trace", [group, args]);
|
1604
|
+
for(var arg, dump = [], text= "trace:" + group + (args.length ? (":" + args[0]) : ""), i= 1; i<args.length;){
|
1605
|
+
arg = args[i++];
|
1606
|
+
if(isString(arg)){
|
1607
|
+
text += ", " + arg;
|
1608
|
+
}else{
|
1609
|
+
dump.push(arg);
|
1610
|
+
}
|
1611
|
+
}
|
1612
|
+
req.log(text);
|
1613
|
+
dump.length && dump.push(".");
|
1614
|
+
req.log.apply(req, dump);
|
1615
|
+
}
|
1616
|
+
};
|
1617
|
+
mix(trace, {
|
1618
|
+
on:1,
|
1619
|
+
group:{},
|
1620
|
+
set:function(group, value){
|
1621
|
+
if(isString(group)){
|
1622
|
+
trace.group[group]= value;
|
1623
|
+
}else{
|
1624
|
+
mix(trace.group, group);
|
1625
|
+
}
|
1626
|
+
}
|
1627
|
+
});
|
1628
|
+
trace.set(mix(mix(mix({}, defaultConfig.trace), userConfig.trace), dojoSniffConfig.trace));
|
1629
|
+
on("config", function(config){
|
1630
|
+
config.trace && trace.set(config.trace);
|
1631
|
+
});
|
1632
|
+
}else{
|
1633
|
+
req.trace = noop;
|
1634
|
+
}
|
1635
|
+
|
1636
|
+
var def = function(
|
1637
|
+
mid, //(commonjs.moduleId, optional) list of modules to be loaded before running factory
|
1638
|
+
dependencies, //(array of commonjs.moduleId, optional)
|
1639
|
+
factory //(any)
|
1640
|
+
){
|
1641
|
+
///
|
1642
|
+
// Advises the loader of a module factory. //Implements http://wiki.commonjs.org/wiki/Modules/AsynchronousDefinition.
|
1643
|
+
///
|
1644
|
+
//note
|
1645
|
+
// CommonJS factory scan courtesy of http://requirejs.org
|
1646
|
+
|
1647
|
+
var arity = arguments.length,
|
1648
|
+
args = 0,
|
1649
|
+
defaultDeps = ["require", "exports", "module"];
|
1650
|
+
|
1651
|
+
if(has("dojo-amd-factory-scan")){
|
1652
|
+
if(arity == 1 && isFunction(mid)){
|
1653
|
+
dependencies = [];
|
1654
|
+
mid.toString()
|
1655
|
+
.replace(/(\/\*([\s\S]*?)\*\/|\/\/(.*)$)/mg, "")
|
1656
|
+
.replace(/require\(["']([\w\!\-_\.\/]+)["']\)/g, function (match, dep){
|
1657
|
+
dependencies.push(dep);
|
1658
|
+
});
|
1659
|
+
args = [0, defaultDeps.concat(dependencies), mid];
|
1660
|
+
}
|
1661
|
+
}
|
1662
|
+
if(!args){
|
1663
|
+
args = arity == 1 ? [0, defaultDeps, mid] :
|
1664
|
+
(arity == 2 ? (isArray(mid) ? [0, mid, dependencies] : (isFunction(dependencies) ? [mid, defaultDeps, dependencies] : [mid, [], dependencies])) :
|
1665
|
+
[mid, dependencies, factory]);
|
1666
|
+
}
|
1667
|
+
req.trace("loader-define", args.slice(0, 2));
|
1668
|
+
var targetModule = args[0] && getModule(args[0]),
|
1669
|
+
module;
|
1670
|
+
if(targetModule && !waiting[targetModule.mid]){
|
1671
|
+
// given a mid that hasn't been requested; therefore, defined through means other than injecting
|
1672
|
+
// consequent to a require() or define() application; examples include defining modules on-the-fly
|
1673
|
+
// due to some code path or including a module in a script element. In any case,
|
1674
|
+
// there is no callback waiting to finish processing and nothing to trigger the defQ and the
|
1675
|
+
// dependencies are never requested; therefore, do it here.
|
1676
|
+
injectDependencies(defineModule(targetModule, args[1], args[2]));
|
1677
|
+
}else if(!has("ie-event-behavior") || !has("host-browser") || injectingCachedModule){
|
1678
|
+
// not IE path: anonymous module and therefore must have been injected; therefore, onLoad will fire immediately
|
1679
|
+
// after script finishes being evaluated and the defQ can be run from that callback to detect the module id
|
1680
|
+
defQ.push(args);
|
1681
|
+
}else{
|
1682
|
+
// IE path: possibly anonymous module and therefore injected; therefore, cannot depend on 1-to-1,
|
1683
|
+
// in-order exec of onLoad with script eval (since it's IE) and must manually detect here
|
1684
|
+
targetModule = targetModule || injectingModule;
|
1685
|
+
if(!targetModule){
|
1686
|
+
for(mid in waiting){
|
1687
|
+
module = modules[mid];
|
1688
|
+
if(module && module.node && module.node.readyState === 'interactive'){
|
1689
|
+
targetModule = module;
|
1690
|
+
break;
|
1691
|
+
}
|
1692
|
+
}
|
1693
|
+
if(has("dojo-combo-api") && !targetModule){
|
1694
|
+
for(var i = 0; i<combosPending.length; i++){
|
1695
|
+
targetModule = combosPending[i];
|
1696
|
+
if(targetModule.node && targetModule.node.readyState === 'interactive'){
|
1697
|
+
break;
|
1698
|
+
}
|
1699
|
+
targetModule= 0;
|
1700
|
+
}
|
1701
|
+
}
|
1702
|
+
}
|
1703
|
+
if(has("dojo-combo-api") && isArray(targetModule)){
|
1704
|
+
injectDependencies(defineModule(getModule(targetModule.shift()), args[1], args[2]));
|
1705
|
+
if(!targetModule.length){
|
1706
|
+
combosPending.splice(i, 1);
|
1707
|
+
}
|
1708
|
+
}else if(targetModule){
|
1709
|
+
consumePendingCacheInsert(targetModule);
|
1710
|
+
injectDependencies(defineModule(targetModule, args[1], args[2]));
|
1711
|
+
}else{
|
1712
|
+
signal(error, makeError("ieDefineFailed", args[0]));
|
1713
|
+
}
|
1714
|
+
checkComplete();
|
1715
|
+
}
|
1716
|
+
};
|
1717
|
+
def.amd = {
|
1718
|
+
vendor:"dojotoolkit.org"
|
1719
|
+
};
|
1720
|
+
|
1721
|
+
if(has("dojo-requirejs-api")){
|
1722
|
+
req.def = def;
|
1723
|
+
}
|
1724
|
+
|
1725
|
+
// allow config to override default implemention of named functions; this is useful for
|
1726
|
+
// non-browser environments, e.g., overriding injectUrl, getText, log, etc. in node.js, Rhino, etc.
|
1727
|
+
// also useful for testing and monkey patching loader
|
1728
|
+
mix(mix(req, defaultConfig.loaderPatch), userConfig.loaderPatch);
|
1729
|
+
|
1730
|
+
// now that req is fully initialized and won't change, we can hook it up to the error signal
|
1731
|
+
on(error, function(arg){
|
1732
|
+
try{
|
1733
|
+
console.error(arg);
|
1734
|
+
if(arg instanceof Error){
|
1735
|
+
for(var p in arg){
|
1736
|
+
console.log(p + ":", arg[p]);
|
1737
|
+
}
|
1738
|
+
console.log(".");
|
1739
|
+
}
|
1740
|
+
}catch(e){}
|
1741
|
+
});
|
1742
|
+
|
1743
|
+
// always publish these
|
1744
|
+
mix(req, {
|
1745
|
+
uid:uid,
|
1746
|
+
cache:cache,
|
1747
|
+
packs:packs
|
1748
|
+
});
|
1749
|
+
|
1750
|
+
|
1751
|
+
if(has("dojo-publish-privates")){
|
1752
|
+
mix(req, {
|
1753
|
+
// these may be interesting to look at when debugging
|
1754
|
+
paths:paths,
|
1755
|
+
aliases:aliases,
|
1756
|
+
packageMap:packageMap,
|
1757
|
+
modules:modules,
|
1758
|
+
legacyMode:legacyMode,
|
1759
|
+
execQ:execQ,
|
1760
|
+
defQ:defQ,
|
1761
|
+
waiting:waiting,
|
1762
|
+
|
1763
|
+
// these are used for testing
|
1764
|
+
// TODO: move testing infrastructure to a different has feature
|
1765
|
+
pathsMapProg:pathsMapProg,
|
1766
|
+
packageMapProg:packageMapProg,
|
1767
|
+
listenerQueues:listenerQueues,
|
1768
|
+
|
1769
|
+
// these are used by the builder (at least)
|
1770
|
+
computeMapProg:computeMapProg,
|
1771
|
+
runMapProg:runMapProg,
|
1772
|
+
compactPath:compactPath,
|
1773
|
+
getModuleInfo:getModuleInfo_
|
1774
|
+
});
|
1775
|
+
}
|
1776
|
+
|
1777
|
+
// the loader can be defined exactly once; look for global define which is the symbol AMD loaders are
|
1778
|
+
// *required* to define (as opposed to require, which is optional)
|
1779
|
+
if(global.define){
|
1780
|
+
if(has("dojo-log-api")){
|
1781
|
+
signal(error, makeError("defineAlreadyDefined", 0));
|
1782
|
+
}
|
1783
|
+
}else{
|
1784
|
+
global.define = def;
|
1785
|
+
global.require = req;
|
1786
|
+
}
|
1787
|
+
|
1788
|
+
if(has("dojo-combo-api") && req.combo && req.combo.plugins){
|
1789
|
+
var plugins = req.combo.plugins,
|
1790
|
+
pluginName;
|
1791
|
+
for(pluginName in plugins){
|
1792
|
+
mix(mix(getModule(pluginName), plugins[pluginName]), {isCombo:1, executed:"executed", load:1});
|
1793
|
+
}
|
1794
|
+
}
|
1795
|
+
|
1796
|
+
if(has("dojo-config-api")){
|
1797
|
+
var bootDeps = dojoSniffConfig.deps || userConfig.deps || defaultConfig.deps,
|
1798
|
+
bootCallback = dojoSniffConfig.callback || userConfig.callback || defaultConfig.callback;
|
1799
|
+
req.boot = (bootDeps || bootCallback) ? [bootDeps || [], bootCallback] : 0;
|
1800
|
+
}
|
1801
|
+
if(!has("dojo-built")){
|
1802
|
+
!req.async && req(["dojo"]);
|
1803
|
+
req.boot && req.apply(null, req.boot);
|
1804
|
+
}
|
1805
|
+
})
|
1806
|
+
//>>excludeStart("replaceLoaderConfig", kwArgs.replaceLoaderConfig);
|
1807
|
+
(
|
1808
|
+
// userConfig
|
1809
|
+
(function(){
|
1810
|
+
// make sure we're looking at global dojoConfig etc.
|
1811
|
+
return this.dojoConfig || this.djConfig || this.require || {};
|
1812
|
+
})(),
|
1813
|
+
|
1814
|
+
// defaultConfig
|
1815
|
+
{
|
1816
|
+
// the default configuration for a browser; this will be modified by other environments
|
1817
|
+
hasCache:{
|
1818
|
+
"host-browser":1,
|
1819
|
+
"dom":1,
|
1820
|
+
"dojo-amd-factory-scan":1,
|
1821
|
+
"dojo-loader":1,
|
1822
|
+
"dojo-has-api":1,
|
1823
|
+
"dojo-inject-api":1,
|
1824
|
+
"dojo-timeout-api":1,
|
1825
|
+
"dojo-trace-api":1,
|
1826
|
+
"dojo-log-api":1,
|
1827
|
+
"dojo-dom-ready-api":1,
|
1828
|
+
"dojo-publish-privates":1,
|
1829
|
+
"dojo-config-api":1,
|
1830
|
+
"dojo-sniff":1,
|
1831
|
+
"dojo-sync-loader":1,
|
1832
|
+
"dojo-test-sniff":1,
|
1833
|
+
"config-tlmSiblingOfDojo":1
|
1834
|
+
},
|
1835
|
+
packages:[{
|
1836
|
+
// note: like v1.6-, this bootstrap computes baseUrl to be the dojo directory
|
1837
|
+
name:'dojo',
|
1838
|
+
location:'.'
|
1839
|
+
},{
|
1840
|
+
name:'tests',
|
1841
|
+
location:'./tests'
|
1842
|
+
},{
|
1843
|
+
name:'dijit',
|
1844
|
+
location:'../dijit'
|
1845
|
+
},{
|
1846
|
+
name:'build',
|
1847
|
+
location:'../util/build'
|
1848
|
+
},{
|
1849
|
+
name:'doh',
|
1850
|
+
location:'../util/doh'
|
1851
|
+
},{
|
1852
|
+
name:'dojox',
|
1853
|
+
location:'../dojox'
|
1854
|
+
},{
|
1855
|
+
name:'demos',
|
1856
|
+
location:'../demos'
|
1857
|
+
}],
|
1858
|
+
trace:{
|
1859
|
+
// these are listed so it's simple to turn them on/off while debugging loading
|
1860
|
+
"loader-inject":0,
|
1861
|
+
"loader-define":0,
|
1862
|
+
"loader-exec-module":0,
|
1863
|
+
"loader-run-factory":0,
|
1864
|
+
"loader-finish-exec":0,
|
1865
|
+
"loader-define-module":0,
|
1866
|
+
"loader-circular-dependency":0
|
1867
|
+
},
|
1868
|
+
async:0,
|
1869
|
+
waitSeconds:15
|
1870
|
+
}
|
1871
|
+
);
|
1872
|
+
//>>excludeEnd("replaceLoaderConfig")
|