padrino-gen 0.9.10 → 0.9.11
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +2 -2
- data/Rakefile +4 -53
- data/bin/padrino-gen +2 -4
- data/lib/padrino-gen/command.rb +12 -0
- data/lib/padrino-gen/generators/actions.rb +25 -5
- data/lib/padrino-gen/generators/app/app.rb.tt +17 -19
- data/lib/padrino-gen/generators/app.rb +7 -6
- data/lib/padrino-gen/generators/cli.rb +3 -2
- data/lib/padrino-gen/generators/components/actions.rb +4 -4
- data/lib/padrino-gen/generators/components/mocks/rr.rb +1 -1
- data/lib/padrino-gen/generators/components/orms/activerecord.rb +58 -16
- data/lib/padrino-gen/generators/components/orms/couchrest.rb +6 -5
- data/lib/padrino-gen/generators/components/orms/datamapper.rb +41 -17
- data/lib/padrino-gen/generators/components/orms/mongoid.rb +7 -6
- data/lib/padrino-gen/generators/components/orms/mongomapper.rb +6 -5
- data/lib/padrino-gen/generators/components/orms/sequel.rb +34 -15
- data/lib/padrino-gen/generators/components/scripts/dojo.rb +4 -0
- data/lib/padrino-gen/generators/components/stylesheets/compass/application.scss +43 -0
- data/lib/padrino-gen/generators/components/stylesheets/compass/partials/_base.scss +10 -0
- data/lib/padrino-gen/generators/components/stylesheets/compass.rb +39 -0
- data/lib/padrino-gen/generators/components/stylesheets/less.rb +2 -2
- data/lib/padrino-gen/generators/components/stylesheets/sass.rb +2 -2
- data/lib/padrino-gen/generators/components/tests/bacon.rb +2 -1
- data/lib/padrino-gen/generators/components/tests/cucumber.rb +26 -4
- data/lib/padrino-gen/generators/components/tests/riot.rb +45 -9
- data/lib/padrino-gen/generators/components/tests/rspec.rb +2 -1
- data/lib/padrino-gen/generators/components/tests/shoulda.rb +2 -1
- data/lib/padrino-gen/generators/components/tests/testspec.rb +2 -1
- data/lib/padrino-gen/generators/controller.rb +2 -2
- data/lib/padrino-gen/generators/mailer.rb +6 -8
- data/lib/padrino-gen/generators/model.rb +9 -1
- data/lib/padrino-gen/generators/project/config/apps.rb.tt +24 -26
- data/lib/padrino-gen/generators/project/config/boot.rb +2 -2
- data/lib/padrino-gen/generators/project.rb +23 -16
- data/lib/padrino-gen/generators/templates/Gemfile.tt +1 -1
- data/lib/padrino-gen/generators/templates/controller.rb.tt +2 -2
- data/lib/padrino-gen/generators/templates/mailer.rb.tt +36 -17
- data/lib/padrino-gen/generators/templates/scripts/dojo.js +16 -0
- data/lib/padrino-gen/generators/templates/scripts/mootools-core.js +120 -1
- data/lib/padrino-gen/generators/templates/scripts/right.js +1 -12
- data/lib/padrino-gen/padrino-tasks/activerecord.rb +40 -34
- data/lib/padrino-gen/padrino-tasks/datamapper.rb +39 -24
- data/lib/padrino-gen/padrino-tasks/mongomapper.rb +1 -1
- data/lib/padrino-gen.rb +2 -1
- data/padrino-gen.gemspec +17 -132
- data/test/helper.rb +3 -11
- data/test/test_app_generator.rb +19 -7
- data/test/test_controller_generator.rb +11 -1
- data/test/test_mailer_generator.rb +18 -15
- data/test/test_migration_generator.rb +4 -4
- data/test/test_model_generator.rb +30 -9
- data/test/test_project_generator.rb +163 -33
- metadata +70 -48
- data/lib/padrino-gen/generators/app/controllers/.empty_directory +0 -0
- data/lib/padrino-gen/generators/app/helpers/.empty_directory +0 -0
- data/lib/padrino-gen/generators/app/views/.empty_directory +0 -0
- data/lib/padrino-gen/generators/app/views/layouts/.emptydirectory +0 -0
- data/lib/padrino-gen/generators/project/.gitignore +0 -7
- data/lib/padrino-gen/generators/project/public/images/.empty_directory +0 -0
- data/lib/padrino-gen/generators/project/public/javascripts/.empty_directory +0 -0
- data/lib/padrino-gen/generators/project/public/stylesheets/.empty_directory +0 -0
- data/lib/padrino-gen/generators/project/tmp/.empty_directory +0 -0
- data/lib/padrino-gen/generators/templates/mailer_initializer.rb.tt +0 -19
@@ -20,27 +20,30 @@ module Padrino
|
|
20
20
|
|
21
21
|
argument :name, :desc => "The name of your padrino project"
|
22
22
|
|
23
|
-
class_option :
|
24
|
-
class_option :
|
25
|
-
class_option :
|
23
|
+
class_option :app , :desc => "The application name", :aliases => '-n', :default => nil, :type => :string
|
24
|
+
class_option :run_bundle, :desc => "Run bundle install", :aliases => '-b', :default => false, :type => :boolean
|
25
|
+
class_option :root, :desc => "The root destination", :aliases => '-r', :default => ".", :type => :string
|
26
|
+
class_option :dev, :desc => "Use padrino from a git checkout", :default => false, :type => :boolean
|
27
|
+
class_option :tiny, :desc => "Generate tiny app skeleton", :aliases => '-i', :default => false, :type => :boolean
|
28
|
+
class_option :adapter, :desc => "SQL adapter for ORM (sqlite, mysql, postgres)", :aliases => '-a', :default => "sqlite", :type => :string
|
26
29
|
|
27
30
|
# Definitions for the available customizable components
|
28
31
|
component_option :orm, "database engine", :aliases => '-d', :choices => [:activerecord, :datamapper, :mongomapper, :mongoid, :sequel, :couchrest], :default => :none
|
29
|
-
component_option :test, "testing framework", :aliases => '-t', :choices => [:rspec, :shoulda, :cucumber, :bacon, :testspec, :riot], :default => :
|
32
|
+
component_option :test, "testing framework", :aliases => '-t', :choices => [:rspec, :shoulda, :cucumber, :bacon, :testspec, :riot], :default => :none
|
30
33
|
component_option :mock, "mocking library", :aliases => '-m', :choices => [:mocha, :rr], :default => :none
|
31
|
-
component_option :script, "javascript library", :aliases => '-s', :choices => [:jquery, :prototype, :rightjs, :mootools, :extcore], :default => :none
|
34
|
+
component_option :script, "javascript library", :aliases => '-s', :choices => [:jquery, :prototype, :rightjs, :mootools, :extcore, :dojo], :default => :none
|
32
35
|
component_option :renderer, "template engine", :aliases => '-e', :choices => [:haml, :erb], :default => :haml
|
33
|
-
component_option :stylesheet, "stylesheet engine", :aliases => '-c', :choices => [:less, :sass], :default => :none
|
36
|
+
component_option :stylesheet, "stylesheet engine", :aliases => '-c', :choices => [:less, :sass, :compass], :default => :none
|
34
37
|
|
35
38
|
# Show help if no argv given
|
36
39
|
require_arguments!
|
37
40
|
|
38
41
|
# Copies over the Padrino base application App
|
39
42
|
def setup_project
|
40
|
-
@
|
43
|
+
@app_name = (options[:app] || name).gsub(/\W/, "_").underscore.classify
|
41
44
|
self.destination_root = File.join(options[:root], name)
|
42
45
|
directory("project/", destination_root)
|
43
|
-
|
46
|
+
app_skeleton('app', options[:tiny])
|
44
47
|
store_component_config('.components')
|
45
48
|
template "templates/Gemfile.tt", destination_root("Gemfile")
|
46
49
|
end
|
@@ -56,24 +59,28 @@ module Padrino
|
|
56
59
|
# Bundle all required components using bundler and Gemfile
|
57
60
|
def bundle_dependencies
|
58
61
|
if options[:run_bundle]
|
59
|
-
say "Bundling application dependencies using bundler..."
|
62
|
+
say "Bundling application dependencies using bundler...", :yellow
|
60
63
|
in_root { run 'bundle install' }
|
61
64
|
end
|
62
65
|
end
|
63
66
|
|
64
67
|
# Finish message
|
65
68
|
def finish
|
66
|
-
|
69
|
+
unless options[:run_bundle]
|
70
|
+
say (<<-TEXT).gsub(/ {10}/,'')
|
67
71
|
|
68
|
-
|
69
|
-
|
70
|
-
|
72
|
+
=================================================================
|
73
|
+
#{name} is ready for development! Next, follow these steps:
|
74
|
+
=================================================================
|
71
75
|
1) cd #{name}
|
72
76
|
2) bundle install
|
73
|
-
|
77
|
+
=================================================================
|
74
78
|
|
75
|
-
|
79
|
+
TEXT
|
80
|
+
else
|
81
|
+
say "Project '#{name}' has been generated and all dependencies bundled!"
|
82
|
+
end
|
76
83
|
end
|
77
84
|
end # Project
|
78
85
|
end # Generators
|
79
|
-
end # Padrino
|
86
|
+
end # Padrino
|
@@ -1,10 +1,10 @@
|
|
1
|
-
<%= @app_name %>.controllers
|
1
|
+
<%= @app_name %>.controllers <%= ":#{@controller}" if @controller %> do
|
2
2
|
# get :index, :map => "/foo/bar" do
|
3
3
|
# session[:foo] = "bar"
|
4
4
|
# render 'index'
|
5
5
|
# end
|
6
6
|
|
7
|
-
# get :sample, :map => "/sample/url", :
|
7
|
+
# get :sample, :map => "/sample/url", :provides => [:any, :js] do
|
8
8
|
# case content_type
|
9
9
|
# when :js then ...
|
10
10
|
# else ...
|
@@ -1,19 +1,38 @@
|
|
1
|
-
|
1
|
+
##
|
2
|
+
# Mailer methods can be defined using the simple format:
|
3
|
+
#
|
4
|
+
# email :registration_email do |name, user|
|
5
|
+
# from 'admin@site.com'
|
6
|
+
# to user.email
|
7
|
+
# subject 'Welcome to the site!'
|
8
|
+
# locals :name => name
|
9
|
+
# content_type 'text/html' # optional, defaults to plain/text
|
10
|
+
# via :sendmail # optional, to smtp if defined, otherwise sendmail
|
11
|
+
# render 'registration_email'
|
12
|
+
# end
|
13
|
+
#
|
14
|
+
# You can set the default delivery settings from your app through:
|
15
|
+
#
|
16
|
+
# set :delivery_method, :smtp => {
|
17
|
+
# :address => 'smtp.yourserver.com',
|
18
|
+
# :port => '25',
|
19
|
+
# :user_name => 'user',
|
20
|
+
# :password => 'pass',
|
21
|
+
# :authentication => :plain, # :plain, :login, :cram_md5, no auth by default
|
22
|
+
# :domain => "localhost.localdomain" # the HELO domain provided by the client to the server
|
23
|
+
# }
|
24
|
+
#
|
25
|
+
# or sendmail (default):
|
26
|
+
#
|
27
|
+
# set :delivery_method, :sendmail
|
28
|
+
#
|
29
|
+
# or for tests:
|
30
|
+
#
|
31
|
+
# set :delivery_method, :test
|
32
|
+
#
|
33
|
+
# and then all delivered mail will use these settings unless otherwise specified.
|
34
|
+
#
|
2
35
|
|
3
|
-
|
4
|
-
|
5
|
-
def registration_email(name, user_email_address)
|
6
|
-
from 'admin@site.com'
|
7
|
-
to user_email_address
|
8
|
-
subject 'Welcome to the site!'
|
9
|
-
body :name => name
|
10
|
-
content_type 'text/html' # optional, defaults to plain/text
|
11
|
-
charset 'windows-1252' # optional, defaults to utf-8
|
12
|
-
via :sendmail # optional, to smtp if defined otherwise sendmail
|
13
|
-
end
|
14
|
-
|
15
|
-
=end
|
16
|
-
|
17
|
-
class <%= @mailer_klass %> < Padrino::Mailer::Base
|
18
|
-
# Mailer methods here...
|
36
|
+
<%= @app_name %>.mailer :<%= @short_name %> do
|
37
|
+
# Message definitions here...
|
19
38
|
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
|
3
|
+
Available via Academic Free License >= 2.1 OR the modified BSD license.
|
4
|
+
see: http://dojotoolkit.org/license for details
|
5
|
+
*/
|
6
|
+
|
7
|
+
/*
|
8
|
+
This is a compiled version of Dojo, built for deployment and not for
|
9
|
+
development. To get an editable version, please visit:
|
10
|
+
|
11
|
+
http://dojotoolkit.org
|
12
|
+
|
13
|
+
for documentation and information on getting the source.
|
14
|
+
*/
|
15
|
+
|
16
|
+
(function(){var _1=null;if((_1||(typeof djConfig!="undefined"&&djConfig.scopeMap))&&(typeof window!="undefined")){var _2="",_3="",_4="",_5={},_6={};_1=_1||djConfig.scopeMap;for(var i=0;i<_1.length;i++){var _7=_1[i];_2+="var "+_7[0]+" = {}; "+_7[1]+" = "+_7[0]+";"+_7[1]+"._scopeName = '"+_7[1]+"';";_3+=(i==0?"":",")+_7[0];_4+=(i==0?"":",")+_7[1];_5[_7[0]]=_7[1];_6[_7[1]]=_7[0];}eval(_2+"dojo._scopeArgs = ["+_4+"];");dojo._scopePrefixArgs=_3;dojo._scopePrefix="(function("+_3+"){";dojo._scopeSuffix="})("+_4+")";dojo._scopeMap=_5;dojo._scopeMapRev=_6;}(function(){if(typeof this["loadFirebugConsole"]=="function"){this["loadFirebugConsole"]();}else{this.console=this.console||{};var cn=["assert","count","debug","dir","dirxml","error","group","groupEnd","info","profile","profileEnd","time","timeEnd","trace","warn","log"];var i=0,tn;while((tn=cn[i++])){if(!console[tn]){(function(){var _8=tn+"";console[_8]=("log" in console)?function(){var a=Array.apply({},arguments);a.unshift(_8+":");console["log"](a.join(" "));}:function(){};console[_8]._fake=true;})();}}}if(typeof dojo=="undefined"){dojo={_scopeName:"dojo",_scopePrefix:"",_scopePrefixArgs:"",_scopeSuffix:"",_scopeMap:{},_scopeMapRev:{}};}var d=dojo;if(typeof dijit=="undefined"){dijit={_scopeName:"dijit"};}if(typeof dojox=="undefined"){dojox={_scopeName:"dojox"};}if(!d._scopeArgs){d._scopeArgs=[dojo,dijit,dojox];}d.global=this;d.config={isDebug:false,debugAtAllCosts:false};if(typeof djConfig!="undefined"){for(var _9 in djConfig){d.config[_9]=djConfig[_9];}}dojo.locale=d.config.locale;var _a="$Rev: 21629 $".match(/\d+/);dojo.version={major:1,minor:4,patch:3,flag:"",revision:_a?+_a[0]:NaN,toString:function(){with(d.version){return major+"."+minor+"."+patch+flag+" ("+revision+")";}}};if(typeof OpenAjax!="undefined"){OpenAjax.hub.registerLibrary(dojo._scopeName,"http://dojotoolkit.org",d.version.toString());}var _b,_c,_d={};for(var i in {toString:1}){_b=[];break;}dojo._extraNames=_b=_b||["hasOwnProperty","valueOf","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","constructor"];_c=_b.length;dojo._mixin=function(_e,_f){var _10,s,i;for(_10 in _f){s=_f[_10];if(!(_10 in _e)||(_e[_10]!==s&&(!(_10 in _d)||_d[_10]!==s))){_e[_10]=s;}}if(_c&&_f){for(i=0;i<_c;++i){_10=_b[i];s=_f[_10];if(!(_10 in _e)||(_e[_10]!==s&&(!(_10 in _d)||_d[_10]!==s))){_e[_10]=s;}}}return _e;};dojo.mixin=function(obj,_11){if(!obj){obj={};}for(var i=1,l=arguments.length;i<l;i++){d._mixin(obj,arguments[i]);}return obj;};dojo._getProp=function(_12,_13,_14){var obj=_14||d.global;for(var i=0,p;obj&&(p=_12[i]);i++){if(i==0&&d._scopeMap[p]){p=d._scopeMap[p];}obj=(p in obj?obj[p]:(_13?obj[p]={}:undefined));}return obj;};dojo.setObject=function(_15,_16,_17){var _18=_15.split("."),p=_18.pop(),obj=d._getProp(_18,true,_17);return obj&&p?(obj[p]=_16):undefined;};dojo.getObject=function(_19,_1a,_1b){return d._getProp(_19.split("."),_1a,_1b);};dojo.exists=function(_1c,obj){return !!d.getObject(_1c,false,obj);};dojo["eval"]=function(_1d){return d.global.eval?d.global.eval(_1d):eval(_1d);};d.deprecated=d.experimental=function(){};})();(function(){var d=dojo;d.mixin(d,{_loadedModules:{},_inFlightCount:0,_hasResource:{},_modulePrefixes:{dojo:{name:"dojo",value:"."},doh:{name:"doh",value:"../util/doh"},tests:{name:"tests",value:"tests"}},_moduleHasPrefix:function(_1e){var mp=d._modulePrefixes;return !!(mp[_1e]&&mp[_1e].value);},_getModulePrefix:function(_1f){var mp=d._modulePrefixes;if(d._moduleHasPrefix(_1f)){return mp[_1f].value;}return _1f;},_loadedUrls:[],_postLoad:false,_loaders:[],_unloaders:[],_loadNotifying:false});dojo._loadPath=function(_20,_21,cb){var uri=((_20.charAt(0)=="/"||_20.match(/^\w+:/))?"":d.baseUrl)+_20;try{return !_21?d._loadUri(uri,cb):d._loadUriAndCheck(uri,_21,cb);}catch(e){console.error(e);return false;}};dojo._loadUri=function(uri,cb){if(d._loadedUrls[uri]){return true;}d._inFlightCount++;var _22=d._getText(uri,true);if(_22){d._loadedUrls[uri]=true;d._loadedUrls.push(uri);if(cb){_22="("+_22+")";}else{_22=d._scopePrefix+_22+d._scopeSuffix;}if(!d.isIE){_22+="\r\n//@ sourceURL="+uri;}var _23=d["eval"](_22);if(cb){cb(_23);}}if(--d._inFlightCount==0&&d._postLoad&&d._loaders.length){setTimeout(function(){if(d._inFlightCount==0){d._callLoaded();}},0);}return !!_22;};dojo._loadUriAndCheck=function(uri,_24,cb){var ok=false;try{ok=d._loadUri(uri,cb);}catch(e){console.error("failed loading "+uri+" with error: "+e);}return !!(ok&&d._loadedModules[_24]);};dojo.loaded=function(){d._loadNotifying=true;d._postLoad=true;var mll=d._loaders;d._loaders=[];for(var x=0;x<mll.length;x++){mll[x]();}d._loadNotifying=false;if(d._postLoad&&d._inFlightCount==0&&mll.length){d._callLoaded();}};dojo.unloaded=function(){var mll=d._unloaders;while(mll.length){(mll.pop())();}};d._onto=function(arr,obj,fn){if(!fn){arr.push(obj);}else{if(fn){var _25=(typeof fn=="string")?obj[fn]:fn;arr.push(function(){_25.call(obj);});}}};dojo.ready=dojo.addOnLoad=function(obj,_26){d._onto(d._loaders,obj,_26);if(d._postLoad&&d._inFlightCount==0&&!d._loadNotifying){d._callLoaded();}};var dca=d.config.addOnLoad;if(dca){d.addOnLoad[(dca instanceof Array?"apply":"call")](d,dca);}dojo._modulesLoaded=function(){if(d._postLoad){return;}if(d._inFlightCount>0){console.warn("files still in flight!");return;}d._callLoaded();};dojo._callLoaded=function(){if(typeof setTimeout=="object"||(d.config.useXDomain&&d.isOpera)){setTimeout(d.isAIR?function(){d.loaded();}:d._scopeName+".loaded();",0);}else{d.loaded();}};dojo._getModuleSymbols=function(_27){var _28=_27.split(".");for(var i=_28.length;i>0;i--){var _29=_28.slice(0,i).join(".");if(i==1&&!d._moduleHasPrefix(_29)){_28[0]="../"+_28[0];}else{var _2a=d._getModulePrefix(_29);if(_2a!=_29){_28.splice(0,i,_2a);break;}}}return _28;};dojo._global_omit_module_check=false;dojo.loadInit=function(_2b){_2b();};dojo._loadModule=dojo.require=function(_2c,_2d){_2d=d._global_omit_module_check||_2d;var _2e=d._loadedModules[_2c];if(_2e){return _2e;}var _2f=d._getModuleSymbols(_2c).join("/")+".js";var _30=!_2d?_2c:null;var ok=d._loadPath(_2f,_30);if(!ok&&!_2d){throw new Error("Could not load '"+_2c+"'; last tried '"+_2f+"'");}if(!_2d&&!d._isXDomain){_2e=d._loadedModules[_2c];if(!_2e){throw new Error("symbol '"+_2c+"' is not defined after loading '"+_2f+"'");}}return _2e;};dojo.provide=function(_31){_31=_31+"";return (d._loadedModules[_31]=d.getObject(_31,true));};dojo.platformRequire=function(_32){var _33=_32.common||[];var _34=_33.concat(_32[d._name]||_32["default"]||[]);for(var x=0;x<_34.length;x++){var _35=_34[x];if(_35.constructor==Array){d._loadModule.apply(d,_35);}else{d._loadModule(_35);}}};dojo.requireIf=function(_36,_37){if(_36===true){var _38=[];for(var i=1;i<arguments.length;i++){_38.push(arguments[i]);}d.require.apply(d,_38);}};dojo.requireAfterIf=d.requireIf;dojo.registerModulePath=function(_39,_3a){d._modulePrefixes[_39]={name:_39,value:_3a};};dojo.requireLocalization=function(_3b,_3c,_3d,_3e){d.require("dojo.i18n");d.i18n._requireLocalization.apply(d.hostenv,arguments);};var ore=new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"),ire=new RegExp("^((([^\\[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^\\[:]*))(:([0-9]+))?$");dojo._Url=function(){var n=null,_3f=arguments,uri=[_3f[0]];for(var i=1;i<_3f.length;i++){if(!_3f[i]){continue;}var _40=new d._Url(_3f[i]+""),_41=new d._Url(uri[0]+"");if(_40.path==""&&!_40.scheme&&!_40.authority&&!_40.query){if(_40.fragment!=n){_41.fragment=_40.fragment;}_40=_41;}else{if(!_40.scheme){_40.scheme=_41.scheme;if(!_40.authority){_40.authority=_41.authority;if(_40.path.charAt(0)!="/"){var _42=_41.path.substring(0,_41.path.lastIndexOf("/")+1)+_40.path;var _43=_42.split("/");for(var j=0;j<_43.length;j++){if(_43[j]=="."){if(j==_43.length-1){_43[j]="";}else{_43.splice(j,1);j--;}}else{if(j>0&&!(j==1&&_43[0]=="")&&_43[j]==".."&&_43[j-1]!=".."){if(j==(_43.length-1)){_43.splice(j,1);_43[j-1]="";}else{_43.splice(j-1,2);j-=2;}}}}_40.path=_43.join("/");}}}}uri=[];if(_40.scheme){uri.push(_40.scheme,":");}if(_40.authority){uri.push("//",_40.authority);}uri.push(_40.path);if(_40.query){uri.push("?",_40.query);}if(_40.fragment){uri.push("#",_40.fragment);}}this.uri=uri.join("");var r=this.uri.match(ore);this.scheme=r[2]||(r[1]?"":n);this.authority=r[4]||(r[3]?"":n);this.path=r[5];this.query=r[7]||(r[6]?"":n);this.fragment=r[9]||(r[8]?"":n);if(this.authority!=n){r=this.authority.match(ire);this.user=r[3]||n;this.password=r[4]||n;this.host=r[6]||r[7];this.port=r[9]||n;}};dojo._Url.prototype.toString=function(){return this.uri;};dojo.moduleUrl=function(_44,url){var loc=d._getModuleSymbols(_44).join("/");if(!loc){return null;}if(loc.lastIndexOf("/")!=loc.length-1){loc+="/";}var _45=loc.indexOf(":");if(loc.charAt(0)!="/"&&(_45==-1||_45>loc.indexOf("/"))){loc=d.baseUrl+loc;}return new d._Url(loc,url);};})();if(typeof window!="undefined"){dojo.isBrowser=true;dojo._name="browser";(function(){var d=dojo;if(document&&document.getElementsByTagName){var _46=document.getElementsByTagName("script");var _47=/dojo(\.xd)?\.js(\W|$)/i;for(var i=0;i<_46.length;i++){var src=_46[i].getAttribute("src");if(!src){continue;}var m=src.match(_47);if(m){if(!d.config.baseUrl){d.config.baseUrl=src.substring(0,m.index);}var cfg=_46[i].getAttribute("djConfig");if(cfg){var _48=eval("({ "+cfg+" })");for(var x in _48){dojo.config[x]=_48[x];}}break;}}}d.baseUrl=d.config.baseUrl;var n=navigator;var dua=n.userAgent,dav=n.appVersion,tv=parseFloat(dav);if(dua.indexOf("Opera")>=0){d.isOpera=tv;}if(dua.indexOf("AdobeAIR")>=0){d.isAIR=1;}d.isKhtml=(dav.indexOf("Konqueror")>=0)?tv:0;d.isWebKit=parseFloat(dua.split("WebKit/")[1])||undefined;d.isChrome=parseFloat(dua.split("Chrome/")[1])||undefined;d.isMac=dav.indexOf("Macintosh")>=0;var _49=Math.max(dav.indexOf("WebKit"),dav.indexOf("Safari"),0);if(_49&&!dojo.isChrome){d.isSafari=parseFloat(dav.split("Version/")[1]);if(!d.isSafari||parseFloat(dav.substr(_49+7))<=419.3){d.isSafari=2;}}if(dua.indexOf("Gecko")>=0&&!d.isKhtml&&!d.isWebKit){d.isMozilla=d.isMoz=tv;}if(d.isMoz){d.isFF=parseFloat(dua.split("Firefox/")[1]||dua.split("Minefield/")[1])||undefined;}if(document.all&&!d.isOpera){d.isIE=parseFloat(dav.split("MSIE ")[1])||undefined;var _4a=document.documentMode;if(_4a&&_4a!=5&&Math.floor(d.isIE)!=_4a){d.isIE=_4a;}}if(dojo.isIE&&window.location.protocol==="file:"){dojo.config.ieForceActiveXXhr=true;}d.isQuirks=document.compatMode=="BackCompat";d.locale=dojo.config.locale||(d.isIE?n.userLanguage:n.language).toLowerCase();d._XMLHTTP_PROGIDS=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"];d._xhrObj=function(){var _4b,_4c;if(!dojo.isIE||!dojo.config.ieForceActiveXXhr){try{_4b=new XMLHttpRequest();}catch(e){}}if(!_4b){for(var i=0;i<3;++i){var _4d=d._XMLHTTP_PROGIDS[i];try{_4b=new ActiveXObject(_4d);}catch(e){_4c=e;}if(_4b){d._XMLHTTP_PROGIDS=[_4d];break;}}}if(!_4b){throw new Error("XMLHTTP not available: "+_4c);}return _4b;};d._isDocumentOk=function(_4e){var _4f=_4e.status||0,lp=location.protocol;return (_4f>=200&&_4f<300)||_4f==304||_4f==1223||(!_4f&&(lp=="file:"||lp=="chrome:"||lp=="app:"));};var _50=window.location+"";var _51=document.getElementsByTagName("base");var _52=(_51&&_51.length>0);d._getText=function(uri,_53){var _54=d._xhrObj();if(!_52&&dojo._Url){uri=(new dojo._Url(_50,uri)).toString();}if(d.config.cacheBust){uri+="";uri+=(uri.indexOf("?")==-1?"?":"&")+String(d.config.cacheBust).replace(/\W+/g,"");}_54.open("GET",uri,false);try{_54.send(null);if(!d._isDocumentOk(_54)){var err=Error("Unable to load "+uri+" status:"+_54.status);err.status=_54.status;err.responseText=_54.responseText;throw err;}}catch(e){if(_53){return null;}throw e;}return _54.responseText;};var _55=window;var _56=function(_57,fp){var _58=_55.attachEvent||_55.addEventListener;_57=_55.attachEvent?_57:_57.substring(2);_58(_57,function(){fp.apply(_55,arguments);},false);};d._windowUnloaders=[];d.windowUnloaded=function(){var mll=d._windowUnloaders;while(mll.length){(mll.pop())();}};var _59=0;d.addOnWindowUnload=function(obj,_5a){d._onto(d._windowUnloaders,obj,_5a);if(!_59){_59=1;_56("onunload",d.windowUnloaded);}};var _5b=0;d.addOnUnload=function(obj,_5c){d._onto(d._unloaders,obj,_5c);if(!_5b){_5b=1;_56("onbeforeunload",dojo.unloaded);}};})();dojo._initFired=false;dojo._loadInit=function(e){if(!dojo._initFired){dojo._initFired=true;if(!dojo.config.afterOnLoad&&window.detachEvent){window.detachEvent("onload",dojo._loadInit);}if(dojo._inFlightCount==0){dojo._modulesLoaded();}}};if(!dojo.config.afterOnLoad){if(document.addEventListener){document.addEventListener("DOMContentLoaded",dojo._loadInit,false);window.addEventListener("load",dojo._loadInit,false);}else{if(window.attachEvent){window.attachEvent("onload",dojo._loadInit);}}}if(dojo.isIE){if(!dojo.config.afterOnLoad&&!dojo.config.skipIeDomLoaded){document.write("<scr"+"ipt defer src=\"//:\" "+"onreadystatechange=\"if(this.readyState=='complete'){"+dojo._scopeName+"._loadInit();}\">"+"</scr"+"ipt>");}try{document.namespaces.add("v","urn:schemas-microsoft-com:vml");var _5d=["*","group","roundrect","oval","shape","rect","imagedata"],i=0,l=1,s=document.createStyleSheet();if(dojo.isIE>=8){i=1;l=_5d.length;}for(;i<l;++i){s.addRule("v\\:"+_5d[i],"behavior:url(#default#VML); display:inline-block");}}catch(e){}}}(function(){var mp=dojo.config["modulePaths"];if(mp){for(var _5e in mp){dojo.registerModulePath(_5e,mp[_5e]);}}})();if(dojo.config.isDebug){dojo.require("dojo._firebug.firebug");}if(dojo.config.debugAtAllCosts){dojo.config.useXDomain=true;dojo.require("dojo._base._loader.loader_xd");dojo.require("dojo._base._loader.loader_debug");dojo.require("dojo.i18n");}if(!dojo._hasResource["dojo._base.lang"]){dojo._hasResource["dojo._base.lang"]=true;dojo.provide("dojo._base.lang");(function(){var d=dojo,_5f=Object.prototype.toString;dojo.isString=function(it){return (typeof it=="string"||it instanceof String);};dojo.isArray=function(it){return it&&(it instanceof Array||typeof it=="array");};dojo.isFunction=function(it){return _5f.call(it)==="[object Function]";};dojo.isObject=function(it){return it!==undefined&&(it===null||typeof it=="object"||d.isArray(it)||d.isFunction(it));};dojo.isArrayLike=function(it){return it&&it!==undefined&&!d.isString(it)&&!d.isFunction(it)&&!(it.tagName&&it.tagName.toLowerCase()=="form")&&(d.isArray(it)||isFinite(it.length));};dojo.isAlien=function(it){return it&&!d.isFunction(it)&&/\{\s*\[native code\]\s*\}/.test(String(it));};dojo.extend=function(_60,_61){for(var i=1,l=arguments.length;i<l;i++){d._mixin(_60.prototype,arguments[i]);}return _60;};dojo._hitchArgs=function(_62,_63){var pre=d._toArray(arguments,2);var _64=d.isString(_63);return function(){var _65=d._toArray(arguments);var f=_64?(_62||d.global)[_63]:_63;return f&&f.apply(_62||this,pre.concat(_65));};};dojo.hitch=function(_66,_67){if(arguments.length>2){return d._hitchArgs.apply(d,arguments);}if(!_67){_67=_66;_66=null;}if(d.isString(_67)){_66=_66||d.global;if(!_66[_67]){throw (["dojo.hitch: scope[\"",_67,"\"] is null (scope=\"",_66,"\")"].join(""));}return function(){return _66[_67].apply(_66,arguments||[]);};}return !_66?_67:function(){return _67.apply(_66,arguments||[]);};};dojo.delegate=dojo._delegate=(function(){function TMP(){};return function(obj,_68){TMP.prototype=obj;var tmp=new TMP();TMP.prototype=null;if(_68){d._mixin(tmp,_68);}return tmp;};})();var _69=function(obj,_6a,_6b){return (_6b||[]).concat(Array.prototype.slice.call(obj,_6a||0));};var _6c=function(obj,_6d,_6e){var arr=_6e||[];for(var x=_6d||0;x<obj.length;x++){arr.push(obj[x]);}return arr;};dojo._toArray=d.isIE?function(obj){return ((obj.item)?_6c:_69).apply(this,arguments);}:_69;dojo.partial=function(_6f){var arr=[null];return d.hitch.apply(d,arr.concat(d._toArray(arguments)));};var _70=d._extraNames,_71=_70.length,_72={};dojo.clone=function(o){if(!o||typeof o!="object"||d.isFunction(o)){return o;}if(o.nodeType&&"cloneNode" in o){return o.cloneNode(true);}if(o instanceof Date){return new Date(o.getTime());}var r,i,l,s,_73;if(d.isArray(o)){r=[];for(i=0,l=o.length;i<l;++i){if(i in o){r.push(d.clone(o[i]));}}}else{r=o.constructor?new o.constructor():{};}for(_73 in o){s=o[_73];if(!(_73 in r)||(r[_73]!==s&&(!(_73 in _72)||_72[_73]!==s))){r[_73]=d.clone(s);}}if(_71){for(i=0;i<_71;++i){_73=_70[i];s=o[_73];if(!(_73 in r)||(r[_73]!==s&&(!(_73 in _72)||_72[_73]!==s))){r[_73]=s;}}}return r;};dojo.trim=String.prototype.trim?function(str){return str.trim();}:function(str){return str.replace(/^\s\s*/,"").replace(/\s\s*$/,"");};var _74=/\{([^\}]+)\}/g;dojo.replace=function(_75,map,_76){return _75.replace(_76||_74,d.isFunction(map)?map:function(_77,k){return d.getObject(k,false,map);});};})();}if(!dojo._hasResource["dojo._base.array"]){dojo._hasResource["dojo._base.array"]=true;dojo.provide("dojo._base.array");(function(){var _78=function(arr,obj,cb){return [(typeof arr=="string")?arr.split(""):arr,obj||dojo.global,(typeof cb=="string")?new Function("item","index","array",cb):cb];};var _79=function(_7a,arr,_7b,_7c){var _7d=_78(arr,_7c,_7b);arr=_7d[0];for(var i=0,l=arr.length;i<l;++i){var _7e=!!_7d[2].call(_7d[1],arr[i],i,arr);if(_7a^_7e){return _7e;}}return _7a;};dojo.mixin(dojo,{indexOf:function(_7f,_80,_81,_82){var _83=1,end=_7f.length||0,i=0;if(_82){i=end-1;_83=end=-1;}if(_81!=undefined){i=_81;}if((_82&&i>end)||i<end){for(;i!=end;i+=_83){if(_7f[i]==_80){return i;}}}return -1;},lastIndexOf:function(_84,_85,_86){return dojo.indexOf(_84,_85,_86,true);},forEach:function(arr,_87,_88){if(!arr||!arr.length){return;}var _89=_78(arr,_88,_87);arr=_89[0];for(var i=0,l=arr.length;i<l;++i){_89[2].call(_89[1],arr[i],i,arr);}},every:function(arr,_8a,_8b){return _79(true,arr,_8a,_8b);},some:function(arr,_8c,_8d){return _79(false,arr,_8c,_8d);},map:function(arr,_8e,_8f){var _90=_78(arr,_8f,_8e);arr=_90[0];var _91=(arguments[3]?(new arguments[3]()):[]);for(var i=0,l=arr.length;i<l;++i){_91.push(_90[2].call(_90[1],arr[i],i,arr));}return _91;},filter:function(arr,_92,_93){var _94=_78(arr,_93,_92);arr=_94[0];var _95=[];for(var i=0,l=arr.length;i<l;++i){if(_94[2].call(_94[1],arr[i],i,arr)){_95.push(arr[i]);}}return _95;}});})();}if(!dojo._hasResource["dojo._base.declare"]){dojo._hasResource["dojo._base.declare"]=true;dojo.provide("dojo._base.declare");(function(){var d=dojo,mix=d._mixin,op=Object.prototype,_96=op.toString,_97=new Function,_98=0,_99="constructor";function err(msg){throw new Error("declare: "+msg);};function _9a(_9b){var _9c=[],_9d=[{cls:0,refs:[]}],_9e={},_9f=1,l=_9b.length,i=0,j,lin,_a0,top,_a1,rec,_a2,_a3;for(;i<l;++i){_a0=_9b[i];if(!_a0){err("mixin #"+i+" is null");}lin=_a0._meta?_a0._meta.bases:[_a0];top=0;for(j=lin.length-1;j>=0;--j){_a1=lin[j].prototype;if(!_a1.hasOwnProperty("declaredClass")){_a1.declaredClass="uniqName_"+(_98++);}_a2=_a1.declaredClass;if(!_9e.hasOwnProperty(_a2)){_9e[_a2]={count:0,refs:[],cls:lin[j]};++_9f;}rec=_9e[_a2];if(top&&top!==rec){rec.refs.push(top);++top.count;}top=rec;}++top.count;_9d[0].refs.push(top);}while(_9d.length){top=_9d.pop();_9c.push(top.cls);--_9f;while(_a3=top.refs,_a3.length==1){top=_a3[0];if(!top||--top.count){top=0;break;}_9c.push(top.cls);--_9f;}if(top){for(i=0,l=_a3.length;i<l;++i){top=_a3[i];if(!--top.count){_9d.push(top);}}}}if(_9f){err("can't build consistent linearization");}_a0=_9b[0];_9c[0]=_a0?_a0._meta&&_a0===_9c[_9c.length-_a0._meta.bases.length]?_a0._meta.bases.length:1:0;return _9c;};function _a4(_a5,a,f){var _a6,_a7,_a8,_a9,_aa,_ab,_ac,opf,pos,_ad=this._inherited=this._inherited||{};if(typeof _a5=="string"){_a6=_a5;_a5=a;a=f;}f=0;_a9=_a5.callee;_a6=_a6||_a9.nom;if(!_a6){err("can't deduce a name to call inherited()");}_aa=this.constructor._meta;_a8=_aa.bases;pos=_ad.p;if(_a6!=_99){if(_ad.c!==_a9){pos=0;_ab=_a8[0];_aa=_ab._meta;if(_aa.hidden[_a6]!==_a9){_a7=_aa.chains;if(_a7&&typeof _a7[_a6]=="string"){err("calling chained method with inherited: "+_a6);}do{_aa=_ab._meta;_ac=_ab.prototype;if(_aa&&(_ac[_a6]===_a9&&_ac.hasOwnProperty(_a6)||_aa.hidden[_a6]===_a9)){break;}}while(_ab=_a8[++pos]);pos=_ab?pos:-1;}}_ab=_a8[++pos];if(_ab){_ac=_ab.prototype;if(_ab._meta&&_ac.hasOwnProperty(_a6)){f=_ac[_a6];}else{opf=op[_a6];do{_ac=_ab.prototype;f=_ac[_a6];if(f&&(_ab._meta?_ac.hasOwnProperty(_a6):f!==opf)){break;}}while(_ab=_a8[++pos]);}}f=_ab&&f||op[_a6];}else{if(_ad.c!==_a9){pos=0;_aa=_a8[0]._meta;if(_aa&&_aa.ctor!==_a9){_a7=_aa.chains;if(!_a7||_a7.constructor!=="manual"){err("calling chained constructor with inherited");}while(_ab=_a8[++pos]){_aa=_ab._meta;if(_aa&&_aa.ctor===_a9){break;}}pos=_ab?pos:-1;}}while(_ab=_a8[++pos]){_aa=_ab._meta;f=_aa?_aa.ctor:_ab;if(f){break;}}f=_ab&&f;}_ad.c=f;_ad.p=pos;if(f){return a===true?f:f.apply(this,a||_a5);}};function _ae(_af,_b0){if(typeof _af=="string"){return this.inherited(_af,_b0,true);}return this.inherited(_af,true);};function _b1(cls){var _b2=this.constructor._meta.bases;for(var i=0,l=_b2.length;i<l;++i){if(_b2[i]===cls){return true;}}return this instanceof cls;};function _b3(_b4,_b5){var _b6,t,i=0,l=d._extraNames.length;for(_b6 in _b5){t=_b5[_b6];if((t!==op[_b6]||!(_b6 in op))&&_b6!=_99){if(_96.call(t)=="[object Function]"){t.nom=_b6;}_b4[_b6]=t;}}for(;i<l;++i){_b6=d._extraNames[i];t=_b5[_b6];if((t!==op[_b6]||!(_b6 in op))&&_b6!=_99){if(_96.call(t)=="[object Function]"){t.nom=_b6;}_b4[_b6]=t;}}return _b4;};function _b7(_b8){_b3(this.prototype,_b8);return this;};function _b9(_ba,_bb){return function(){var a=arguments,_bc=a,a0=a[0],f,i,m,l=_ba.length,_bd;if(_bb&&(a0&&a0.preamble||this.preamble)){_bd=new Array(_ba.length);_bd[0]=a;for(i=0;;){a0=a[0];if(a0){f=a0.preamble;if(f){a=f.apply(this,a)||a;}}f=_ba[i].prototype;f=f.hasOwnProperty("preamble")&&f.preamble;if(f){a=f.apply(this,a)||a;}if(++i==l){break;}_bd[i]=a;}}for(i=l-1;i>=0;--i){f=_ba[i];m=f._meta;f=m?m.ctor:f;if(f){f.apply(this,_bd?_bd[i]:a);}}f=this.postscript;if(f){f.apply(this,_bc);}};};function _be(_bf,_c0){return function(){var a=arguments,t=a,a0=a[0],f;if(_c0){if(a0){f=a0.preamble;if(f){t=f.apply(this,t)||t;}}f=this.preamble;if(f){f.apply(this,t);}}if(_bf){_bf.apply(this,a);}f=this.postscript;if(f){f.apply(this,a);}};};function _c1(_c2){return function(){var a=arguments,i=0,f;for(;f=_c2[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 _c3(_c4,_c5,_c6){return function(){var b,m,f,i=0,_c7=1;if(_c6){i=_c5.length-1;_c7=-1;}for(;b=_c5[i];i+=_c7){m=b._meta;f=(m?m.hidden:b.prototype)[_c4];if(f){f.apply(this,arguments);}}};};d.declare=function(_c8,_c9,_ca){var _cb,i,t,_cc,_cd,_ce,_cf,_d0=1,_d1=_c9;if(typeof _c8!="string"){_ca=_c9;_c9=_c8;_c8="";}_ca=_ca||{};if(_96.call(_c9)=="[object Array]"){_ce=_9a(_c9);t=_ce[0];_d0=_ce.length-t;_c9=_ce[_d0];}else{_ce=[0];if(_c9){t=_c9._meta;_ce=_ce.concat(t?t.bases:_c9);}}if(_c9){for(i=_d0-1;;--i){_97.prototype=_c9.prototype;_cb=new _97;if(!i){break;}t=_ce[i];mix(_cb,t._meta?t._meta.hidden:t.prototype);_cc=new Function;_cc.superclass=_c9;_cc.prototype=_cb;_c9=_cb.constructor=_cc;}}else{_cb={};}_b3(_cb,_ca);t=_ca.constructor;if(t!==op.constructor){t.nom=_99;_cb.constructor=t;}_97.prototype=0;for(i=_d0-1;i;--i){t=_ce[i]._meta;if(t&&t.chains){_cf=mix(_cf||{},t.chains);}}if(_cb["-chains-"]){_cf=mix(_cf||{},_cb["-chains-"]);}t=!_cf||!_cf.hasOwnProperty(_99);_ce[0]=_cc=(_cf&&_cf.constructor==="manual")?_c1(_ce):(_ce.length==1?_be(_ca.constructor,t):_b9(_ce,t));_cc._meta={bases:_ce,hidden:_ca,chains:_cf,parents:_d1,ctor:_ca.constructor};_cc.superclass=_c9&&_c9.prototype;_cc.extend=_b7;_cc.prototype=_cb;_cb.constructor=_cc;_cb.getInherited=_ae;_cb.inherited=_a4;_cb.isInstanceOf=_b1;if(_c8){_cb.declaredClass=_c8;d.setObject(_c8,_cc);}if(_cf){for(_cd in _cf){if(_cb[_cd]&&typeof _cf[_cd]=="string"&&_cd!=_99){t=_cb[_cd]=_c3(_cd,_ce,_cf[_cd]==="after");t.nom=_cd;}}}return _cc;};d.safeMixin=_b3;})();}if(!dojo._hasResource["dojo._base.connect"]){dojo._hasResource["dojo._base.connect"]=true;dojo.provide("dojo._base.connect");dojo._listener={getDispatcher:function(){return function(){var ap=Array.prototype,c=arguments.callee,ls=c._listeners,t=c.target;var r=t&&t.apply(this,arguments);var lls;lls=[].concat(ls);for(var i in lls){if(!(i in ap)){lls[i].apply(this,arguments);}}return r;};},add:function(_d2,_d3,_d4){_d2=_d2||dojo.global;var f=_d2[_d3];if(!f||!f._listeners){var d=dojo._listener.getDispatcher();d.target=f;d._listeners=[];f=_d2[_d3]=d;}return f._listeners.push(_d4);},remove:function(_d5,_d6,_d7){var f=(_d5||dojo.global)[_d6];if(f&&f._listeners&&_d7--){delete f._listeners[_d7];}}};dojo.connect=function(obj,_d8,_d9,_da,_db){var a=arguments,_dc=[],i=0;_dc.push(dojo.isString(a[0])?null:a[i++],a[i++]);var a1=a[i+1];_dc.push(dojo.isString(a1)||dojo.isFunction(a1)?a[i++]:null,a[i++]);for(var l=a.length;i<l;i++){_dc.push(a[i]);}return dojo._connect.apply(this,_dc);};dojo._connect=function(obj,_dd,_de,_df){var l=dojo._listener,h=l.add(obj,_dd,dojo.hitch(_de,_df));return [obj,_dd,h,l];};dojo.disconnect=function(_e0){if(_e0&&_e0[0]!==undefined){dojo._disconnect.apply(this,_e0);delete _e0[0];}};dojo._disconnect=function(obj,_e1,_e2,_e3){_e3.remove(obj,_e1,_e2);};dojo._topics={};dojo.subscribe=function(_e4,_e5,_e6){return [_e4,dojo._listener.add(dojo._topics,_e4,dojo.hitch(_e5,_e6))];};dojo.unsubscribe=function(_e7){if(_e7){dojo._listener.remove(dojo._topics,_e7[0],_e7[1]);}};dojo.publish=function(_e8,_e9){var f=dojo._topics[_e8];if(f){f.apply(this,_e9||[]);}};dojo.connectPublisher=function(_ea,obj,_eb){var pf=function(){dojo.publish(_ea,arguments);};return (_eb)?dojo.connect(obj,_eb,pf):dojo.connect(obj,pf);};}if(!dojo._hasResource["dojo._base.Deferred"]){dojo._hasResource["dojo._base.Deferred"]=true;dojo.provide("dojo._base.Deferred");dojo.Deferred=function(_ec){this.chain=[];this.id=this._nextId();this.fired=-1;this.paused=0;this.results=[null,null];this.canceller=_ec;this.silentlyCancelled=false;this.isFiring=false;};dojo.extend(dojo.Deferred,{_nextId:(function(){var n=1;return function(){return n++;};})(),cancel:function(){var err;if(this.fired==-1){if(this.canceller){err=this.canceller(this);}else{this.silentlyCancelled=true;}if(this.fired==-1){if(!(err instanceof Error)){var res=err;var msg="Deferred Cancelled";if(err&&err.toString){msg+=": "+err.toString();}err=new Error(msg);err.dojoType="cancel";err.cancelResult=res;}this.errback(err);}}else{if((this.fired==0)&&(this.results[0] instanceof dojo.Deferred)){this.results[0].cancel();}}},_resback:function(res){this.fired=((res instanceof Error)?1:0);this.results[this.fired]=res;this._fire();},_check:function(){if(this.fired!=-1){if(!this.silentlyCancelled){throw new Error("already called!");}this.silentlyCancelled=false;return;}},callback:function(res){this._check();this._resback(res);},errback:function(res){this._check();if(!(res instanceof Error)){res=new Error(res);}this._resback(res);},addBoth:function(cb,_ed){var _ee=dojo.hitch.apply(dojo,arguments);return this.addCallbacks(_ee,_ee);},addCallback:function(cb,_ef){return this.addCallbacks(dojo.hitch.apply(dojo,arguments));},addErrback:function(cb,_f0){return this.addCallbacks(null,dojo.hitch.apply(dojo,arguments));},addCallbacks:function(cb,eb){this.chain.push([cb,eb]);if(this.fired>=0&&!this.isFiring){this._fire();}return this;},_fire:function(){this.isFiring=true;var _f1=this.chain;var _f2=this.fired;var res=this.results[_f2];var _f3=this;var cb=null;while((_f1.length>0)&&(this.paused==0)){var f=_f1.shift()[_f2];if(!f){continue;}var _f4=function(){var ret=f(res);if(typeof ret!="undefined"){res=ret;}_f2=((res instanceof Error)?1:0);if(res instanceof dojo.Deferred){cb=function(res){_f3._resback(res);_f3.paused--;if((_f3.paused==0)&&(_f3.fired>=0)){_f3._fire();}};this.paused++;}};if(dojo.config.debugAtAllCosts){_f4.call(this);}else{try{_f4.call(this);}catch(err){_f2=1;res=err;}}}this.fired=_f2;this.results[_f2]=res;this.isFiring=false;if((cb)&&(this.paused)){res.addBoth(cb);}}});}if(!dojo._hasResource["dojo._base.json"]){dojo._hasResource["dojo._base.json"]=true;dojo.provide("dojo._base.json");dojo.fromJson=function(_f5){return eval("("+_f5+")");};dojo._escapeString=function(str){return ("\""+str.replace(/(["\\])/g,"\\$1")+"\"").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r");};dojo.toJsonIndentStr="\t";dojo.toJson=function(it,_f6,_f7){if(it===undefined){return "undefined";}var _f8=typeof it;if(_f8=="number"||_f8=="boolean"){return it+"";}if(it===null){return "null";}if(dojo.isString(it)){return dojo._escapeString(it);}var _f9=arguments.callee;var _fa;_f7=_f7||"";var _fb=_f6?_f7+dojo.toJsonIndentStr:"";var tf=it.__json__||it.json;if(dojo.isFunction(tf)){_fa=tf.call(it);if(it!==_fa){return _f9(_fa,_f6,_fb);}}if(it.nodeType&&it.cloneNode){throw new Error("Can't serialize DOM nodes");}var sep=_f6?" ":"";var _fc=_f6?"\n":"";if(dojo.isArray(it)){var res=dojo.map(it,function(obj){var val=_f9(obj,_f6,_fb);if(typeof val!="string"){val="undefined";}return _fc+_fb+val;});return "["+res.join(","+sep)+_fc+_f7+"]";}if(_f8=="function"){return null;}var _fd=[],key;for(key in it){var _fe,val;if(typeof key=="number"){_fe="\""+key+"\"";}else{if(typeof key=="string"){_fe=dojo._escapeString(key);}else{continue;}}val=_f9(it[key],_f6,_fb);if(typeof val!="string"){continue;}_fd.push(_fc+_fb+_fe+":"+sep+val);}return "{"+_fd.join(","+sep)+_fc+_f7+"}";};}if(!dojo._hasResource["dojo._base.Color"]){dojo._hasResource["dojo._base.Color"]=true;dojo.provide("dojo._base.Color");(function(){var d=dojo;dojo.Color=function(_ff){if(_ff){this.setColor(_ff);}};dojo.Color.named={black:[0,0,0],silver:[192,192,192],gray:[128,128,128],white:[255,255,255],maroon:[128,0,0],red:[255,0,0],purple:[128,0,128],fuchsia:[255,0,255],green:[0,128,0],lime:[0,255,0],olive:[128,128,0],yellow:[255,255,0],navy:[0,0,128],blue:[0,0,255],teal:[0,128,128],aqua:[0,255,255],transparent:d.config.transparentColor||[255,255,255]};dojo.extend(dojo.Color,{r:255,g:255,b:255,a:1,_set:function(r,g,b,a){var t=this;t.r=r;t.g=g;t.b=b;t.a=a;},setColor:function(_100){if(d.isString(_100)){d.colorFromString(_100,this);}else{if(d.isArray(_100)){d.colorFromArray(_100,this);}else{this._set(_100.r,_100.g,_100.b,_100.a);if(!(_100 instanceof d.Color)){this.sanitize();}}}return this;},sanitize:function(){return this;},toRgb:function(){var t=this;return [t.r,t.g,t.b];},toRgba:function(){var t=this;return [t.r,t.g,t.b,t.a];},toHex:function(){var arr=d.map(["r","g","b"],function(x){var s=this[x].toString(16);return s.length<2?"0"+s:s;},this);return "#"+arr.join("");},toCss:function(_101){var t=this,rgb=t.r+", "+t.g+", "+t.b;return (_101?"rgba("+rgb+", "+t.a:"rgb("+rgb)+")";},toString:function(){return this.toCss(true);}});dojo.blendColors=function(_102,end,_103,obj){var t=obj||new d.Color();d.forEach(["r","g","b","a"],function(x){t[x]=_102[x]+(end[x]-_102[x])*_103;if(x!="a"){t[x]=Math.round(t[x]);}});return t.sanitize();};dojo.colorFromRgb=function(_104,obj){var m=_104.toLowerCase().match(/^rgba?\(([\s\.,0-9]+)\)/);return m&&dojo.colorFromArray(m[1].split(/\s*,\s*/),obj);};dojo.colorFromHex=function(_105,obj){var t=obj||new d.Color(),bits=(_105.length==4)?4:8,mask=(1<<bits)-1;_105=Number("0x"+_105.substr(1));if(isNaN(_105)){return null;}d.forEach(["b","g","r"],function(x){var c=_105&mask;_105>>=bits;t[x]=bits==4?17*c:c;});t.a=1;return t;};dojo.colorFromArray=function(a,obj){var t=obj||new d.Color();t._set(Number(a[0]),Number(a[1]),Number(a[2]),Number(a[3]));if(isNaN(t.a)){t.a=1;}return t.sanitize();};dojo.colorFromString=function(str,obj){var a=d.Color.named[str];return a&&d.colorFromArray(a,obj)||d.colorFromRgb(str,obj)||d.colorFromHex(str,obj);};})();}if(!dojo._hasResource["dojo._base"]){dojo._hasResource["dojo._base"]=true;dojo.provide("dojo._base");}if(!dojo._hasResource["dojo._base.window"]){dojo._hasResource["dojo._base.window"]=true;dojo.provide("dojo._base.window");dojo.doc=window["document"]||null;dojo.body=function(){return dojo.doc.body||dojo.doc.getElementsByTagName("body")[0];};dojo.setContext=function(_106,_107){dojo.global=_106;dojo.doc=_107;};dojo.withGlobal=function(_108,_109,_10a,_10b){var _10c=dojo.global;try{dojo.global=_108;return dojo.withDoc.call(null,_108.document,_109,_10a,_10b);}finally{dojo.global=_10c;}};dojo.withDoc=function(_10d,_10e,_10f,_110){var _111=dojo.doc,_112=dojo._bodyLtr,oldQ=dojo.isQuirks;try{dojo.doc=_10d;delete dojo._bodyLtr;dojo.isQuirks=dojo.doc.compatMode=="BackCompat";if(_10f&&typeof _10e=="string"){_10e=_10f[_10e];}return _10e.apply(_10f,_110||[]);}finally{dojo.doc=_111;delete dojo._bodyLtr;if(_112!==undefined){dojo._bodyLtr=_112;}dojo.isQuirks=oldQ;}};}if(!dojo._hasResource["dojo._base.event"]){dojo._hasResource["dojo._base.event"]=true;dojo.provide("dojo._base.event");(function(){var del=(dojo._event_listener={add:function(node,name,fp){if(!node){return;}name=del._normalizeEventName(name);fp=del._fixCallback(name,fp);var _113=name;if(!dojo.isIE&&(name=="mouseenter"||name=="mouseleave")){var ofp=fp;name=(name=="mouseenter")?"mouseover":"mouseout";fp=function(e){if(!dojo.isDescendant(e.relatedTarget,node)){return ofp.call(this,e);}};}node.addEventListener(name,fp,false);return fp;},remove:function(node,_114,_115){if(node){_114=del._normalizeEventName(_114);if(!dojo.isIE&&(_114=="mouseenter"||_114=="mouseleave")){_114=(_114=="mouseenter")?"mouseover":"mouseout";}node.removeEventListener(_114,_115,false);}},_normalizeEventName:function(name){return name.slice(0,2)=="on"?name.slice(2):name;},_fixCallback:function(name,fp){return name!="keypress"?fp:function(e){return fp.call(this,del._fixEvent(e,this));};},_fixEvent:function(evt,_116){switch(evt.type){case "keypress":del._setKeyChar(evt);break;}return evt;},_setKeyChar:function(evt){evt.keyChar=evt.charCode?String.fromCharCode(evt.charCode):"";evt.charOrCode=evt.keyChar||evt.keyCode;},_punctMap:{106:42,111:47,186:59,187:43,188:44,189:45,190:46,191:47,192:96,219:91,220:92,221:93,222:39}});dojo.fixEvent=function(evt,_117){return del._fixEvent(evt,_117);};dojo.stopEvent=function(evt){evt.preventDefault();evt.stopPropagation();};var _118=dojo._listener;dojo._connect=function(obj,_119,_11a,_11b,_11c){var _11d=obj&&(obj.nodeType||obj.attachEvent||obj.addEventListener);var lid=_11d?(_11c?2:1):0,l=[dojo._listener,del,_118][lid];var h=l.add(obj,_119,dojo.hitch(_11a,_11b));return [obj,_119,h,lid];};dojo._disconnect=function(obj,_11e,_11f,_120){([dojo._listener,del,_118][_120]).remove(obj,_11e,_11f);};dojo.keys={BACKSPACE:8,TAB:9,CLEAR:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,META:dojo.isSafari?91:224,PAUSE:19,CAPS_LOCK:20,ESCAPE:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT_ARROW:37,UP_ARROW:38,RIGHT_ARROW:39,DOWN_ARROW:40,INSERT:45,DELETE:46,HELP:47,LEFT_WINDOW:91,RIGHT_WINDOW:92,SELECT:93,NUMPAD_0:96,NUMPAD_1:97,NUMPAD_2:98,NUMPAD_3:99,NUMPAD_4:100,NUMPAD_5:101,NUMPAD_6:102,NUMPAD_7:103,NUMPAD_8:104,NUMPAD_9:105,NUMPAD_MULTIPLY:106,NUMPAD_PLUS:107,NUMPAD_ENTER:108,NUMPAD_MINUS:109,NUMPAD_PERIOD:110,NUMPAD_DIVIDE:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,NUM_LOCK:144,SCROLL_LOCK:145,copyKey:dojo.isMac&&!dojo.isAIR?(dojo.isSafari?91:224):17};var _121=dojo.isMac?"metaKey":"ctrlKey";dojo.isCopyKey=function(e){return e[_121];};if(dojo.isIE){dojo.mouseButtons={LEFT:1,MIDDLE:4,RIGHT:2,isButton:function(e,_122){return e.button&_122;},isLeft:function(e){return e.button&1;},isMiddle:function(e){return e.button&4;},isRight:function(e){return e.button&2;}};}else{dojo.mouseButtons={LEFT:0,MIDDLE:1,RIGHT:2,isButton:function(e,_123){return e.button==_123;},isLeft:function(e){return e.button==0;},isMiddle:function(e){return e.button==1;},isRight:function(e){return e.button==2;}};}if(dojo.isIE){var _124=function(e,code){try{return (e.keyCode=code);}catch(e){return 0;}};var iel=dojo._listener;var _125=(dojo._ieListenersName="_"+dojo._scopeName+"_listeners");if(!dojo.config._allow_leaks){_118=iel=dojo._ie_listener={handlers:[],add:function(_126,_127,_128){_126=_126||dojo.global;var f=_126[_127];if(!f||!f[_125]){var d=dojo._getIeDispatcher();d.target=f&&(ieh.push(f)-1);d[_125]=[];f=_126[_127]=d;}return f[_125].push(ieh.push(_128)-1);},remove:function(_129,_12a,_12b){var f=(_129||dojo.global)[_12a],l=f&&f[_125];if(f&&l&&_12b--){delete ieh[l[_12b]];delete l[_12b];}}};var ieh=iel.handlers;}dojo.mixin(del,{add:function(node,_12c,fp){if(!node){return;}_12c=del._normalizeEventName(_12c);if(_12c=="onkeypress"){var kd=node.onkeydown;if(!kd||!kd[_125]||!kd._stealthKeydownHandle){var h=del.add(node,"onkeydown",del._stealthKeyDown);kd=node.onkeydown;kd._stealthKeydownHandle=h;kd._stealthKeydownRefs=1;}else{kd._stealthKeydownRefs++;}}return iel.add(node,_12c,del._fixCallback(fp));},remove:function(node,_12d,_12e){_12d=del._normalizeEventName(_12d);iel.remove(node,_12d,_12e);if(_12d=="onkeypress"){var kd=node.onkeydown;if(--kd._stealthKeydownRefs<=0){iel.remove(node,"onkeydown",kd._stealthKeydownHandle);delete kd._stealthKeydownHandle;}}},_normalizeEventName:function(_12f){return _12f.slice(0,2)!="on"?"on"+_12f:_12f;},_nop:function(){},_fixEvent:function(evt,_130){if(!evt){var w=_130&&(_130.ownerDocument||_130.document||_130).parentWindow||window;evt=w.event;}if(!evt){return (evt);}evt.target=evt.srcElement;evt.currentTarget=(_130||evt.srcElement);evt.layerX=evt.offsetX;evt.layerY=evt.offsetY;var se=evt.srcElement,doc=(se&&se.ownerDocument)||document;var _131=((dojo.isIE<6)||(doc["compatMode"]=="BackCompat"))?doc.body:doc.documentElement;var _132=dojo._getIeDocumentElementOffset();evt.pageX=evt.clientX+dojo._fixIeBiDiScrollLeft(_131.scrollLeft||0)-_132.x;evt.pageY=evt.clientY+(_131.scrollTop||0)-_132.y;if(evt.type=="mouseover"){evt.relatedTarget=evt.fromElement;}if(evt.type=="mouseout"){evt.relatedTarget=evt.toElement;}evt.stopPropagation=del._stopPropagation;evt.preventDefault=del._preventDefault;return del._fixKeys(evt);},_fixKeys:function(evt){switch(evt.type){case "keypress":var c=("charCode" in evt?evt.charCode:evt.keyCode);if(c==10){c=0;evt.keyCode=13;}else{if(c==13||c==27){c=0;}else{if(c==3){c=99;}}}evt.charCode=c;del._setKeyChar(evt);break;}return evt;},_stealthKeyDown:function(evt){var kp=evt.currentTarget.onkeypress;if(!kp||!kp[_125]){return;}var k=evt.keyCode;var _133=k!=13&&k!=32&&k!=27&&(k<48||k>90)&&(k<96||k>111)&&(k<186||k>192)&&(k<219||k>222);if(_133||evt.ctrlKey){var c=_133?0:k;if(evt.ctrlKey){if(k==3||k==13){return;}else{if(c>95&&c<106){c-=48;}else{if((!evt.shiftKey)&&(c>=65&&c<=90)){c+=32;}else{c=del._punctMap[c]||c;}}}}var faux=del._synthesizeEvent(evt,{type:"keypress",faux:true,charCode:c});kp.call(evt.currentTarget,faux);evt.cancelBubble=faux.cancelBubble;evt.returnValue=faux.returnValue;_124(evt,faux.keyCode);}},_stopPropagation:function(){this.cancelBubble=true;},_preventDefault:function(){this.bubbledKeyCode=this.keyCode;if(this.ctrlKey){_124(this,0);}this.returnValue=false;}});dojo.stopEvent=function(evt){evt=evt||window.event;del._stopPropagation.call(evt);del._preventDefault.call(evt);};}del._synthesizeEvent=function(evt,_134){var faux=dojo.mixin({},evt,_134);del._setKeyChar(faux);faux.preventDefault=function(){evt.preventDefault();};faux.stopPropagation=function(){evt.stopPropagation();};return faux;};if(dojo.isOpera){dojo.mixin(del,{_fixEvent:function(evt,_135){switch(evt.type){case "keypress":var c=evt.which;if(c==3){c=99;}c=c<41&&!evt.shiftKey?0:c;if(evt.ctrlKey&&!evt.shiftKey&&c>=65&&c<=90){c+=32;}return del._synthesizeEvent(evt,{charCode:c});}return evt;}});}if(dojo.isWebKit){del._add=del.add;del._remove=del.remove;dojo.mixin(del,{add:function(node,_136,fp){if(!node){return;}var _137=del._add(node,_136,fp);if(del._normalizeEventName(_136)=="keypress"){_137._stealthKeyDownHandle=del._add(node,"keydown",function(evt){var k=evt.keyCode;var _138=k!=13&&k!=32&&(k<48||k>90)&&(k<96||k>111)&&(k<186||k>192)&&(k<219||k>222);if(_138||evt.ctrlKey){var c=_138?0:k;if(evt.ctrlKey){if(k==3||k==13){return;}else{if(c>95&&c<106){c-=48;}else{if(!evt.shiftKey&&c>=65&&c<=90){c+=32;}else{c=del._punctMap[c]||c;}}}}var faux=del._synthesizeEvent(evt,{type:"keypress",faux:true,charCode:c});fp.call(evt.currentTarget,faux);}});}return _137;},remove:function(node,_139,_13a){if(node){if(_13a._stealthKeyDownHandle){del._remove(node,"keydown",_13a._stealthKeyDownHandle);}del._remove(node,_139,_13a);}},_fixEvent:function(evt,_13b){switch(evt.type){case "keypress":if(evt.faux){return evt;}var c=evt.charCode;c=c>=32?c:0;return del._synthesizeEvent(evt,{charCode:c,faux:true});}return evt;}});}})();if(dojo.isIE){dojo._ieDispatcher=function(args,_13c){var ap=Array.prototype,h=dojo._ie_listener.handlers,c=args.callee,ls=c[dojo._ieListenersName],t=h[c.target];var r=t&&t.apply(_13c,args);var lls=[].concat(ls);for(var i in lls){var f=h[lls[i]];if(!(i in ap)&&f){f.apply(_13c,args);}}return r;};dojo._getIeDispatcher=function(){return new Function(dojo._scopeName+"._ieDispatcher(arguments, this)");};dojo._event_listener._fixCallback=function(fp){var f=dojo._event_listener._fixEvent;return function(e){return fp.call(this,f(e,this));};};}}if(!dojo._hasResource["dojo._base.html"]){dojo._hasResource["dojo._base.html"]=true;dojo.provide("dojo._base.html");try{document.execCommand("BackgroundImageCache",false,true);}catch(e){}if(dojo.isIE||dojo.isOpera){dojo.byId=function(id,doc){if(typeof id!="string"){return id;}var _13d=doc||dojo.doc,te=_13d.getElementById(id);if(te&&(te.attributes.id.value==id||te.id==id)){return te;}else{var eles=_13d.all[id];if(!eles||eles.nodeName){eles=[eles];}var i=0;while((te=eles[i++])){if((te.attributes&&te.attributes.id&&te.attributes.id.value==id)||te.id==id){return te;}}}};}else{dojo.byId=function(id,doc){return (typeof id=="string")?(doc||dojo.doc).getElementById(id):id;};}(function(){var d=dojo;var byId=d.byId;var _13e=null,_13f;d.addOnWindowUnload(function(){_13e=null;});dojo._destroyElement=dojo.destroy=function(node){node=byId(node);try{var doc=node.ownerDocument;if(!_13e||_13f!=doc){_13e=doc.createElement("div");_13f=doc;}_13e.appendChild(node.parentNode?node.parentNode.removeChild(node):node);_13e.innerHTML="";}catch(e){}};dojo.isDescendant=function(node,_140){try{node=byId(node);_140=byId(_140);while(node){if(node==_140){return true;}node=node.parentNode;}}catch(e){}return false;};dojo.setSelectable=function(node,_141){node=byId(node);if(d.isMozilla){node.style.MozUserSelect=_141?"":"none";}else{if(d.isKhtml||d.isWebKit){node.style.KhtmlUserSelect=_141?"auto":"none";}else{if(d.isIE){var v=(node.unselectable=_141?"":"on");d.query("*",node).forEach("item.unselectable = '"+v+"'");}}}};var _142=function(node,ref){var _143=ref.parentNode;if(_143){_143.insertBefore(node,ref);}};var _144=function(node,ref){var _145=ref.parentNode;if(_145){if(_145.lastChild==ref){_145.appendChild(node);}else{_145.insertBefore(node,ref.nextSibling);}}};dojo.place=function(node,_146,_147){_146=byId(_146);if(typeof node=="string"){node=node.charAt(0)=="<"?d._toDom(node,_146.ownerDocument):byId(node);}if(typeof _147=="number"){var cn=_146.childNodes;if(!cn.length||cn.length<=_147){_146.appendChild(node);}else{_142(node,cn[_147<0?0:_147]);}}else{switch(_147){case "before":_142(node,_146);break;case "after":_144(node,_146);break;case "replace":_146.parentNode.replaceChild(node,_146);break;case "only":d.empty(_146);_146.appendChild(node);break;case "first":if(_146.firstChild){_142(node,_146.firstChild);break;}default:_146.appendChild(node);}}return node;};dojo.boxModel="content-box";if(d.isIE){d.boxModel=document.compatMode=="BackCompat"?"border-box":"content-box";}var gcs;if(d.isWebKit){gcs=function(node){var s;if(node.nodeType==1){var dv=node.ownerDocument.defaultView;s=dv.getComputedStyle(node,null);if(!s&&node.style){node.style.display="";s=dv.getComputedStyle(node,null);}}return s||{};};}else{if(d.isIE){gcs=function(node){return node.nodeType==1?node.currentStyle:{};};}else{gcs=function(node){return node.nodeType==1?node.ownerDocument.defaultView.getComputedStyle(node,null):{};};}}dojo.getComputedStyle=gcs;if(!d.isIE){d._toPixelValue=function(_148,_149){return parseFloat(_149)||0;};}else{d._toPixelValue=function(_14a,_14b){if(!_14b){return 0;}if(_14b=="medium"){return 4;}if(_14b.slice&&_14b.slice(-2)=="px"){return parseFloat(_14b);}with(_14a){var _14c=style.left;var _14d=runtimeStyle.left;runtimeStyle.left=currentStyle.left;try{style.left=_14b;_14b=style.pixelLeft;}catch(e){_14b=0;}style.left=_14c;runtimeStyle.left=_14d;}return _14b;};}var px=d._toPixelValue;var astr="DXImageTransform.Microsoft.Alpha";var af=function(n,f){try{return n.filters.item(astr);}catch(e){return f?{}:null;}};dojo._getOpacity=d.isIE?function(node){try{return af(node).Opacity/100;}catch(e){return 1;}}:function(node){return gcs(node).opacity;};dojo._setOpacity=d.isIE?function(node,_14e){var ov=_14e*100;node.style.zoom=1;af(node,1).Enabled=!(_14e==1);if(!af(node)){node.style.filter+=" progid:"+astr+"(Opacity="+ov+")";}else{af(node,1).Opacity=ov;}if(node.nodeName.toLowerCase()=="tr"){d.query("> td",node).forEach(function(i){d._setOpacity(i,_14e);});}return _14e;}:function(node,_14f){return node.style.opacity=_14f;};var _150={left:true,top:true};var _151=/margin|padding|width|height|max|min|offset/;var _152=function(node,type,_153){type=type.toLowerCase();if(d.isIE){if(_153=="auto"){if(type=="height"){return node.offsetHeight;}if(type=="width"){return node.offsetWidth;}}if(type=="fontweight"){switch(_153){case 700:return "bold";case 400:default:return "normal";}}}if(!(type in _150)){_150[type]=_151.test(type);}return _150[type]?px(node,_153):_153;};var _154=d.isIE?"styleFloat":"cssFloat",_155={"cssFloat":_154,"styleFloat":_154,"float":_154};dojo.style=function(node,_156,_157){var n=byId(node),args=arguments.length,op=(_156=="opacity");_156=_155[_156]||_156;if(args==3){return op?d._setOpacity(n,_157):n.style[_156]=_157;}if(args==2&&op){return d._getOpacity(n);}var s=gcs(n);if(args==2&&typeof _156!="string"){for(var x in _156){d.style(node,x,_156[x]);}return s;}return (args==1)?s:_152(n,_156,s[_156]||n.style[_156]);};dojo._getPadExtents=function(n,_158){var s=_158||gcs(n),l=px(n,s.paddingLeft),t=px(n,s.paddingTop);return {l:l,t:t,w:l+px(n,s.paddingRight),h:t+px(n,s.paddingBottom)};};dojo._getBorderExtents=function(n,_159){var ne="none",s=_159||gcs(n),bl=(s.borderLeftStyle!=ne?px(n,s.borderLeftWidth):0),bt=(s.borderTopStyle!=ne?px(n,s.borderTopWidth):0);return {l:bl,t:bt,w:bl+(s.borderRightStyle!=ne?px(n,s.borderRightWidth):0),h:bt+(s.borderBottomStyle!=ne?px(n,s.borderBottomWidth):0)};};dojo._getPadBorderExtents=function(n,_15a){var s=_15a||gcs(n),p=d._getPadExtents(n,s),b=d._getBorderExtents(n,s);return {l:p.l+b.l,t:p.t+b.t,w:p.w+b.w,h:p.h+b.h};};dojo._getMarginExtents=function(n,_15b){var s=_15b||gcs(n),l=px(n,s.marginLeft),t=px(n,s.marginTop),r=px(n,s.marginRight),b=px(n,s.marginBottom);if(d.isWebKit&&(s.position!="absolute")){r=l;}return {l:l,t:t,w:l+r,h:t+b};};dojo._getMarginBox=function(node,_15c){var s=_15c||gcs(node),me=d._getMarginExtents(node,s);var l=node.offsetLeft-me.l,t=node.offsetTop-me.t,p=node.parentNode;if(d.isMoz){var sl=parseFloat(s.left),st=parseFloat(s.top);if(!isNaN(sl)&&!isNaN(st)){l=sl,t=st;}else{if(p&&p.style){var pcs=gcs(p);if(pcs.overflow!="visible"){var be=d._getBorderExtents(p,pcs);l+=be.l,t+=be.t;}}}}else{if(d.isOpera||(d.isIE>7&&!d.isQuirks)){if(p){be=d._getBorderExtents(p);l-=be.l;t-=be.t;}}}return {l:l,t:t,w:node.offsetWidth+me.w,h:node.offsetHeight+me.h};};dojo._getContentBox=function(node,_15d){var s=_15d||gcs(node),pe=d._getPadExtents(node,s),be=d._getBorderExtents(node,s),w=node.clientWidth,h;if(!w){w=node.offsetWidth,h=node.offsetHeight;}else{h=node.clientHeight,be.w=be.h=0;}if(d.isOpera){pe.l+=be.l;pe.t+=be.t;}return {l:pe.l,t:pe.t,w:w-pe.w-be.w,h:h-pe.h-be.h};};dojo._getBorderBox=function(node,_15e){var s=_15e||gcs(node),pe=d._getPadExtents(node,s),cb=d._getContentBox(node,s);return {l:cb.l-pe.l,t:cb.t-pe.t,w:cb.w+pe.w,h:cb.h+pe.h};};dojo._setBox=function(node,l,t,w,h,u){u=u||"px";var s=node.style;if(!isNaN(l)){s.left=l+u;}if(!isNaN(t)){s.top=t+u;}if(w>=0){s.width=w+u;}if(h>=0){s.height=h+u;}};dojo._isButtonTag=function(node){return node.tagName=="BUTTON"||node.tagName=="INPUT"&&(node.getAttribute("type")||"").toUpperCase()=="BUTTON";};dojo._usesBorderBox=function(node){var n=node.tagName;return d.boxModel=="border-box"||n=="TABLE"||d._isButtonTag(node);};dojo._setContentSize=function(node,_15f,_160,_161){if(d._usesBorderBox(node)){var pb=d._getPadBorderExtents(node,_161);if(_15f>=0){_15f+=pb.w;}if(_160>=0){_160+=pb.h;}}d._setBox(node,NaN,NaN,_15f,_160);};dojo._setMarginBox=function(node,_162,_163,_164,_165,_166){var s=_166||gcs(node),bb=d._usesBorderBox(node),pb=bb?_167:d._getPadBorderExtents(node,s);if(d.isWebKit){if(d._isButtonTag(node)){var ns=node.style;if(_164>=0&&!ns.width){ns.width="4px";}if(_165>=0&&!ns.height){ns.height="4px";}}}var mb=d._getMarginExtents(node,s);if(_164>=0){_164=Math.max(_164-pb.w-mb.w,0);}if(_165>=0){_165=Math.max(_165-pb.h-mb.h,0);}d._setBox(node,_162,_163,_164,_165);};var _167={l:0,t:0,w:0,h:0};dojo.marginBox=function(node,box){var n=byId(node),s=gcs(n),b=box;return !b?d._getMarginBox(n,s):d._setMarginBox(n,b.l,b.t,b.w,b.h,s);};dojo.contentBox=function(node,box){var n=byId(node),s=gcs(n),b=box;return !b?d._getContentBox(n,s):d._setContentSize(n,b.w,b.h,s);};var _168=function(node,prop){if(!(node=(node||0).parentNode)){return 0;}var val,_169=0,_16a=d.body();while(node&&node.style){if(gcs(node).position=="fixed"){return 0;}val=node[prop];if(val){_169+=val-0;if(node==_16a){break;}}node=node.parentNode;}return _169;};dojo._docScroll=function(){var n=d.global;return "pageXOffset" in n?{x:n.pageXOffset,y:n.pageYOffset}:(n=d.doc.documentElement,n.clientHeight?{x:d._fixIeBiDiScrollLeft(n.scrollLeft),y:n.scrollTop}:(n=d.body(),{x:n.scrollLeft||0,y:n.scrollTop||0}));};dojo._isBodyLtr=function(){return "_bodyLtr" in d?d._bodyLtr:d._bodyLtr=(d.body().dir||d.doc.documentElement.dir||"ltr").toLowerCase()=="ltr";};dojo._getIeDocumentElementOffset=function(){var de=d.doc.documentElement;if(d.isIE<8){var r=de.getBoundingClientRect();var l=r.left,t=r.top;if(d.isIE<7){l+=de.clientLeft;t+=de.clientTop;}return {x:l<0?0:l,y:t<0?0:t};}else{return {x:0,y:0};}};dojo._fixIeBiDiScrollLeft=function(_16b){var dd=d.doc;if(d.isIE<8&&!d._isBodyLtr()){var de=d.isQuirks?dd.body:dd.documentElement;return _16b+de.clientWidth-de.scrollWidth;}return _16b;};dojo._abs=dojo.position=function(node,_16c){var db=d.body(),dh=db.parentNode,ret;node=byId(node);if(node["getBoundingClientRect"]){ret=node.getBoundingClientRect();ret={x:ret.left,y:ret.top,w:ret.right-ret.left,h:ret.bottom-ret.top};if(d.isIE){var _16d=d._getIeDocumentElementOffset();ret.x-=_16d.x+(d.isQuirks?db.clientLeft+db.offsetLeft:0);ret.y-=_16d.y+(d.isQuirks?db.clientTop+db.offsetTop:0);}else{if(d.isFF==3){var cs=gcs(dh);ret.x-=px(dh,cs.marginLeft)+px(dh,cs.borderLeftWidth);ret.y-=px(dh,cs.marginTop)+px(dh,cs.borderTopWidth);}}}else{ret={x:0,y:0,w:node.offsetWidth,h:node.offsetHeight};if(node["offsetParent"]){ret.x-=_168(node,"scrollLeft");ret.y-=_168(node,"scrollTop");var _16e=node;do{var n=_16e.offsetLeft,t=_16e.offsetTop;ret.x+=isNaN(n)?0:n;ret.y+=isNaN(t)?0:t;cs=gcs(_16e);if(_16e!=node){if(d.isMoz){ret.x+=2*px(_16e,cs.borderLeftWidth);ret.y+=2*px(_16e,cs.borderTopWidth);}else{ret.x+=px(_16e,cs.borderLeftWidth);ret.y+=px(_16e,cs.borderTopWidth);}}if(d.isMoz&&cs.position=="static"){var _16f=_16e.parentNode;while(_16f!=_16e.offsetParent){var pcs=gcs(_16f);if(pcs.position=="static"){ret.x+=px(_16e,pcs.borderLeftWidth);ret.y+=px(_16e,pcs.borderTopWidth);}_16f=_16f.parentNode;}}_16e=_16e.offsetParent;}while((_16e!=dh)&&_16e);}else{if(node.x&&node.y){ret.x+=isNaN(node.x)?0:node.x;ret.y+=isNaN(node.y)?0:node.y;}}}if(_16c){var _170=d._docScroll();ret.x+=_170.x;ret.y+=_170.y;}return ret;};dojo.coords=function(node,_171){var n=byId(node),s=gcs(n),mb=d._getMarginBox(n,s);var abs=d.position(n,_171);mb.x=abs.x;mb.y=abs.y;return mb;};var _172={"class":"className","for":"htmlFor",tabindex:"tabIndex",readonly:"readOnly",colspan:"colSpan",frameborder:"frameBorder",rowspan:"rowSpan",valuetype:"valueType"},_173={classname:"class",htmlfor:"for",tabindex:"tabIndex",readonly:"readOnly"},_174={innerHTML:1,className:1,htmlFor:d.isIE,value:1};var _175=function(name){return _173[name.toLowerCase()]||name;};var _176=function(node,name){var attr=node.getAttributeNode&&node.getAttributeNode(name);return attr&&attr.specified;};dojo.hasAttr=function(node,name){var lc=name.toLowerCase();return _174[_172[lc]||name]||_176(byId(node),_173[lc]||name);};var _177={},_178=0,_179=dojo._scopeName+"attrid",_17a={col:1,colgroup:1,table:1,tbody:1,tfoot:1,thead:1,tr:1,title:1};dojo.attr=function(node,name,_17b){node=byId(node);var args=arguments.length,prop;if(args==2&&typeof name!="string"){for(var x in name){d.attr(node,x,name[x]);}return node;}var lc=name.toLowerCase(),_17c=_172[lc]||name,_17d=_174[_17c],_17e=_173[lc]||name;if(args==3){do{if(_17c=="style"&&typeof _17b!="string"){d.style(node,_17b);break;}if(_17c=="innerHTML"){if(d.isIE&&node.tagName.toLowerCase() in _17a){d.empty(node);node.appendChild(d._toDom(_17b,node.ownerDocument));}else{node[_17c]=_17b;}break;}if(d.isFunction(_17b)){var _17f=d.attr(node,_179);if(!_17f){_17f=_178++;d.attr(node,_179,_17f);}if(!_177[_17f]){_177[_17f]={};}var h=_177[_17f][_17c];if(h){d.disconnect(h);}else{try{delete node[_17c];}catch(e){}}_177[_17f][_17c]=d.connect(node,_17c,_17b);break;}if(_17d||typeof _17b=="boolean"){node[_17c]=_17b;break;}node.setAttribute(_17e,_17b);}while(false);return node;}_17b=node[_17c];if(_17d&&typeof _17b!="undefined"){return _17b;}if(_17c!="href"&&(typeof _17b=="boolean"||d.isFunction(_17b))){return _17b;}return _176(node,_17e)?node.getAttribute(_17e):null;};dojo.removeAttr=function(node,name){byId(node).removeAttribute(_175(name));};dojo.getNodeProp=function(node,name){node=byId(node);var lc=name.toLowerCase(),_180=_172[lc]||name;if((_180 in node)&&_180!="href"){return node[_180];}var _181=_173[lc]||name;return _176(node,_181)?node.getAttribute(_181):null;};dojo.create=function(tag,_182,_183,pos){var doc=d.doc;if(_183){_183=byId(_183);doc=_183.ownerDocument;}if(typeof tag=="string"){tag=doc.createElement(tag);}if(_182){d.attr(tag,_182);}if(_183){d.place(tag,_183,pos);}return tag;};d.empty=d.isIE?function(node){node=byId(node);for(var c;c=node.lastChild;){d.destroy(c);}}:function(node){byId(node).innerHTML="";};var _184={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"]},_185=/<\s*([\w\:]+)/,_186={},_187=0,_188="__"+d._scopeName+"ToDomId";for(var _189 in _184){var tw=_184[_189];tw.pre=_189=="option"?"<select multiple=\"multiple\">":"<"+tw.join("><")+">";tw.post="</"+tw.reverse().join("></")+">";}d._toDom=function(frag,doc){doc=doc||d.doc;var _18a=doc[_188];if(!_18a){doc[_188]=_18a=++_187+"";_186[_18a]=doc.createElement("div");}frag+="";var _18b=frag.match(_185),tag=_18b?_18b[1].toLowerCase():"",_18c=_186[_18a],wrap,i,fc,df;if(_18b&&_184[tag]){wrap=_184[tag];_18c.innerHTML=wrap.pre+frag+wrap.post;for(i=wrap.length;i;--i){_18c=_18c.firstChild;}}else{_18c.innerHTML=frag;}if(_18c.childNodes.length==1){return _18c.removeChild(_18c.firstChild);}df=doc.createDocumentFragment();while(fc=_18c.firstChild){df.appendChild(fc);}return df;};var _18d="className";dojo.hasClass=function(node,_18e){return ((" "+byId(node)[_18d]+" ").indexOf(" "+_18e+" ")>=0);};var _18f=/\s+/,a1=[""],_190=function(s){if(typeof s=="string"||s instanceof String){if(s.indexOf(" ")<0){a1[0]=s;return a1;}else{return s.split(_18f);}}return s;};dojo.addClass=function(node,_191){node=byId(node);_191=_190(_191);var cls=" "+node[_18d]+" ";for(var i=0,len=_191.length,c;i<len;++i){c=_191[i];if(c&&cls.indexOf(" "+c+" ")<0){cls+=c+" ";}}node[_18d]=d.trim(cls);};dojo.removeClass=function(node,_192){node=byId(node);var cls;if(_192!==undefined){_192=_190(_192);cls=" "+node[_18d]+" ";for(var i=0,len=_192.length;i<len;++i){cls=cls.replace(" "+_192[i]+" "," ");}cls=d.trim(cls);}else{cls="";}if(node[_18d]!=cls){node[_18d]=cls;}};dojo.toggleClass=function(node,_193,_194){if(_194===undefined){_194=!d.hasClass(node,_193);}d[_194?"addClass":"removeClass"](node,_193);};})();}if(!dojo._hasResource["dojo._base.NodeList"]){dojo._hasResource["dojo._base.NodeList"]=true;dojo.provide("dojo._base.NodeList");(function(){var d=dojo;var ap=Array.prototype,aps=ap.slice,apc=ap.concat;var tnl=function(a,_195,_196){if(!a.sort){a=aps.call(a,0);}var ctor=_196||this._NodeListCtor||d._NodeListCtor;a.constructor=ctor;dojo._mixin(a,ctor.prototype);a._NodeListCtor=ctor;return _195?a._stash(_195):a;};var _197=function(f,a,o){a=[0].concat(aps.call(a,0));o=o||d.global;return function(node){a[0]=node;return f.apply(o,a);};};var _198=function(f,o){return function(){this.forEach(_197(f,arguments,o));return this;};};var _199=function(f,o){return function(){return this.map(_197(f,arguments,o));};};var _19a=function(f,o){return function(){return this.filter(_197(f,arguments,o));};};var _19b=function(f,g,o){return function(){var a=arguments,body=_197(f,a,o);if(g.call(o||d.global,a)){return this.map(body);}this.forEach(body);return this;};};var _19c=function(a){return a.length==1&&(typeof a[0]=="string");};var _19d=function(node){var p=node.parentNode;if(p){p.removeChild(node);}};dojo.NodeList=function(){return tnl(Array.apply(null,arguments));};d._NodeListCtor=d.NodeList;var nl=d.NodeList,nlp=nl.prototype;nl._wrap=nlp._wrap=tnl;nl._adaptAsMap=_199;nl._adaptAsForEach=_198;nl._adaptAsFilter=_19a;nl._adaptWithCondition=_19b;d.forEach(["slice","splice"],function(name){var f=ap[name];nlp[name]=function(){return this._wrap(f.apply(this,arguments),name=="slice"?this:null);};});d.forEach(["indexOf","lastIndexOf","every","some"],function(name){var f=d[name];nlp[name]=function(){return f.apply(d,[this].concat(aps.call(arguments,0)));};});d.forEach(["attr","style"],function(name){nlp[name]=_19b(d[name],_19c);});d.forEach(["connect","addClass","removeClass","toggleClass","empty","removeAttr"],function(name){nlp[name]=_198(d[name]);});dojo.extend(dojo.NodeList,{_normalize:function(_19e,_19f){var _1a0=_19e.parse===true?true:false;if(typeof _19e.template=="string"){var _1a1=_19e.templateFunc||(dojo.string&&dojo.string.substitute);_19e=_1a1?_1a1(_19e.template,_19e):_19e;}var type=(typeof _19e);if(type=="string"||type=="number"){_19e=dojo._toDom(_19e,(_19f&&_19f.ownerDocument));if(_19e.nodeType==11){_19e=dojo._toArray(_19e.childNodes);}else{_19e=[_19e];}}else{if(!dojo.isArrayLike(_19e)){_19e=[_19e];}else{if(!dojo.isArray(_19e)){_19e=dojo._toArray(_19e);}}}if(_1a0){_19e._runParse=true;}return _19e;},_cloneNode:function(node){return node.cloneNode(true);},_place:function(ary,_1a2,_1a3,_1a4){if(_1a2.nodeType!=1&&_1a3=="only"){return;}var _1a5=_1a2,_1a6;var _1a7=ary.length;for(var i=_1a7-1;i>=0;i--){var node=(_1a4?this._cloneNode(ary[i]):ary[i]);if(ary._runParse&&dojo.parser&&dojo.parser.parse){if(!_1a6){_1a6=_1a5.ownerDocument.createElement("div");}_1a6.appendChild(node);dojo.parser.parse(_1a6);node=_1a6.firstChild;while(_1a6.firstChild){_1a6.removeChild(_1a6.firstChild);}}if(i==_1a7-1){dojo.place(node,_1a5,_1a3);}else{_1a5.parentNode.insertBefore(node,_1a5);}_1a5=node;}},_stash:function(_1a8){this._parent=_1a8;return this;},end:function(){if(this._parent){return this._parent;}else{return new this._NodeListCtor();}},concat:function(item){var t=d.isArray(this)?this:aps.call(this,0),m=d.map(arguments,function(a){return a&&!d.isArray(a)&&(typeof NodeList!="undefined"&&a.constructor===NodeList||a.constructor===this._NodeListCtor)?aps.call(a,0):a;});return this._wrap(apc.apply(t,m),this);},map:function(func,obj){return this._wrap(d.map(this,func,obj),this);},forEach:function(_1a9,_1aa){d.forEach(this,_1a9,_1aa);return this;},coords:_199(d.coords),position:_199(d.position),place:function(_1ab,_1ac){var item=d.query(_1ab)[0];return this.forEach(function(node){d.place(node,item,_1ac);});},orphan:function(_1ad){return (_1ad?d._filterQueryResult(this,_1ad):this).forEach(_19d);},adopt:function(_1ae,_1af){return d.query(_1ae).place(this[0],_1af)._stash(this);},query:function(_1b0){if(!_1b0){return this;}var ret=this.map(function(node){return d.query(_1b0,node).filter(function(_1b1){return _1b1!==undefined;});});return this._wrap(apc.apply([],ret),this);},filter:function(_1b2){var a=arguments,_1b3=this,_1b4=0;if(typeof _1b2=="string"){_1b3=d._filterQueryResult(this,a[0]);if(a.length==1){return _1b3._stash(this);}_1b4=1;}return this._wrap(d.filter(_1b3,a[_1b4],a[_1b4+1]),this);},addContent:function(_1b5,_1b6){_1b5=this._normalize(_1b5,this[0]);for(var i=0,node;node=this[i];i++){this._place(_1b5,node,_1b6,i>0);}return this;},instantiate:function(_1b7,_1b8){var c=d.isFunction(_1b7)?_1b7:d.getObject(_1b7);_1b8=_1b8||{};return this.forEach(function(node){new c(_1b8,node);});},at:function(){var t=new this._NodeListCtor();d.forEach(arguments,function(i){if(this[i]){t.push(this[i]);}},this);return t._stash(this);}});nl.events=["blur","focus","change","click","error","keydown","keypress","keyup","load","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","submit"];d.forEach(nl.events,function(evt){var _1b9="on"+evt;nlp[_1b9]=function(a,b){return this.connect(_1b9,a,b);};});})();}if(!dojo._hasResource["dojo._base.query"]){dojo._hasResource["dojo._base.query"]=true;if(typeof dojo!="undefined"){dojo.provide("dojo._base.query");}(function(d){var trim=d.trim;var each=d.forEach;var qlc=d._NodeListCtor=d.NodeList;var _1ba=function(){return d.doc;};var _1bb=((d.isWebKit||d.isMozilla)&&((_1ba().compatMode)=="BackCompat"));var _1bc=!!_1ba().firstChild["children"]?"children":"childNodes";var _1bd=">~+";var _1be=false;var _1bf=function(){return true;};var _1c0=function(_1c1){if(_1bd.indexOf(_1c1.slice(-1))>=0){_1c1+=" * ";}else{_1c1+=" ";}var ts=function(s,e){return trim(_1c1.slice(s,e));};var _1c2=[];var _1c3=-1,_1c4=-1,_1c5=-1,_1c6=-1,_1c7=-1,inId=-1,_1c8=-1,lc="",cc="",_1c9;var x=0,ql=_1c1.length,_1ca=null,_1cb=null;var _1cc=function(){if(_1c8>=0){var tv=(_1c8==x)?null:ts(_1c8,x);_1ca[(_1bd.indexOf(tv)<0)?"tag":"oper"]=tv;_1c8=-1;}};var _1cd=function(){if(inId>=0){_1ca.id=ts(inId,x).replace(/\\/g,"");inId=-1;}};var _1ce=function(){if(_1c7>=0){_1ca.classes.push(ts(_1c7+1,x).replace(/\\/g,""));_1c7=-1;}};var _1cf=function(){_1cd();_1cc();_1ce();};var _1d0=function(){_1cf();if(_1c6>=0){_1ca.pseudos.push({name:ts(_1c6+1,x)});}_1ca.loops=(_1ca.pseudos.length||_1ca.attrs.length||_1ca.classes.length);_1ca.oquery=_1ca.query=ts(_1c9,x);_1ca.otag=_1ca.tag=(_1ca["oper"])?null:(_1ca.tag||"*");if(_1ca.tag){_1ca.tag=_1ca.tag.toUpperCase();}if(_1c2.length&&(_1c2[_1c2.length-1].oper)){_1ca.infixOper=_1c2.pop();_1ca.query=_1ca.infixOper.query+" "+_1ca.query;}_1c2.push(_1ca);_1ca=null;};for(;lc=cc,cc=_1c1.charAt(x),x<ql;x++){if(lc=="\\"){continue;}if(!_1ca){_1c9=x;_1ca={query:null,pseudos:[],attrs:[],classes:[],tag:null,oper:null,id:null,getTag:function(){return (_1be)?this.otag:this.tag;}};_1c8=x;}if(_1c3>=0){if(cc=="]"){if(!_1cb.attr){_1cb.attr=ts(_1c3+1,x);}else{_1cb.matchFor=ts((_1c5||_1c3+1),x);}var cmf=_1cb.matchFor;if(cmf){if((cmf.charAt(0)=="\"")||(cmf.charAt(0)=="'")){_1cb.matchFor=cmf.slice(1,-1);}}_1ca.attrs.push(_1cb);_1cb=null;_1c3=_1c5=-1;}else{if(cc=="="){var _1d1=("|~^$*".indexOf(lc)>=0)?lc:"";_1cb.type=_1d1+cc;_1cb.attr=ts(_1c3+1,x-_1d1.length);_1c5=x+1;}}}else{if(_1c4>=0){if(cc==")"){if(_1c6>=0){_1cb.value=ts(_1c4+1,x);}_1c6=_1c4=-1;}}else{if(cc=="#"){_1cf();inId=x+1;}else{if(cc=="."){_1cf();_1c7=x;}else{if(cc==":"){_1cf();_1c6=x;}else{if(cc=="["){_1cf();_1c3=x;_1cb={};}else{if(cc=="("){if(_1c6>=0){_1cb={name:ts(_1c6+1,x),value:null};_1ca.pseudos.push(_1cb);}_1c4=x;}else{if((cc==" ")&&(lc!=cc)){_1d0();}}}}}}}}}return _1c2;};var _1d2=function(_1d3,_1d4){if(!_1d3){return _1d4;}if(!_1d4){return _1d3;}return function(){return _1d3.apply(window,arguments)&&_1d4.apply(window,arguments);};};var _1d5=function(i,arr){var r=arr||[];if(i){r.push(i);}return r;};var _1d6=function(n){return (1==n.nodeType);};var _1d7="";var _1d8=function(elem,attr){if(!elem){return _1d7;}if(attr=="class"){return elem.className||_1d7;}if(attr=="for"){return elem.htmlFor||_1d7;}if(attr=="style"){return elem.style.cssText||_1d7;}return (_1be?elem.getAttribute(attr):elem.getAttribute(attr,2))||_1d7;};var _1d9={"*=":function(attr,_1da){return function(elem){return (_1d8(elem,attr).indexOf(_1da)>=0);};},"^=":function(attr,_1db){return function(elem){return (_1d8(elem,attr).indexOf(_1db)==0);};},"$=":function(attr,_1dc){var tval=" "+_1dc;return function(elem){var ea=" "+_1d8(elem,attr);return (ea.lastIndexOf(_1dc)==(ea.length-_1dc.length));};},"~=":function(attr,_1dd){var tval=" "+_1dd+" ";return function(elem){var ea=" "+_1d8(elem,attr)+" ";return (ea.indexOf(tval)>=0);};},"|=":function(attr,_1de){var _1df=" "+_1de+"-";return function(elem){var ea=" "+_1d8(elem,attr);return ((ea==_1de)||(ea.indexOf(_1df)==0));};},"=":function(attr,_1e0){return function(elem){return (_1d8(elem,attr)==_1e0);};}};var _1e1=(typeof _1ba().firstChild.nextElementSibling=="undefined");var _1e2=!_1e1?"nextElementSibling":"nextSibling";var _1e3=!_1e1?"previousElementSibling":"previousSibling";var _1e4=(_1e1?_1d6:_1bf);var _1e5=function(node){while(node=node[_1e3]){if(_1e4(node)){return false;}}return true;};var _1e6=function(node){while(node=node[_1e2]){if(_1e4(node)){return false;}}return true;};var _1e7=function(node){var root=node.parentNode;var i=0,tret=root[_1bc],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[_1e2]){if(_1e4(te)){te["_i"]=++i;if(node===te){ci=i;}}}return ci;};var _1e8=function(elem){return !((_1e7(elem))%2);};var _1e9=function(elem){return ((_1e7(elem))%2);};var _1ea={"checked":function(name,_1eb){return function(elem){return !!("checked" in elem?elem.checked:elem.selected);};},"first-child":function(){return _1e5;},"last-child":function(){return _1e6;},"only-child":function(name,_1ec){return function(node){if(!_1e5(node)){return false;}if(!_1e6(node)){return false;}return true;};},"empty":function(name,_1ed){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,_1ee){var cz=_1ee.charAt(0);if(cz=="\""||cz=="'"){_1ee=_1ee.slice(1,-1);}return function(elem){return (elem.innerHTML.indexOf(_1ee)>=0);};},"not":function(name,_1ef){var p=_1c0(_1ef)[0];var _1f0={el:1};if(p.tag!="*"){_1f0.tag=1;}if(!p.classes.length){_1f0.classes=1;}var ntf=_1f1(p,_1f0);return function(elem){return (!ntf(elem));};},"nth-child":function(name,_1f2){var pi=parseInt;if(_1f2=="odd"){return _1e9;}else{if(_1f2=="even"){return _1e8;}}if(_1f2.indexOf("n")!=-1){var _1f3=_1f2.split("n",2);var pred=_1f3[0]?((_1f3[0]=="-")?-1:pi(_1f3[0])):1;var idx=_1f3[1]?pi(_1f3[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=_1e7(elem);return (i>=lb)&&(ub<0||i<=ub)&&((i%pred)==idx);};}else{_1f2=idx;}}var _1f4=pi(_1f2);return function(elem){return (_1e7(elem)==_1f4);};}};var _1f5=(d.isIE)?function(cond){var clc=cond.toLowerCase();if(clc=="class"){cond="className";}return function(elem){return (_1be?elem.getAttribute(cond):elem[cond]||elem[clc]);};}:function(cond){return function(elem){return (elem&&elem.getAttribute&&elem.hasAttribute(cond));};};var _1f1=function(_1f6,_1f7){if(!_1f6){return _1bf;}_1f7=_1f7||{};var ff=null;if(!("el" in _1f7)){ff=_1d2(ff,_1d6);}if(!("tag" in _1f7)){if(_1f6.tag!="*"){ff=_1d2(ff,function(elem){return (elem&&(elem.tagName==_1f6.getTag()));});}}if(!("classes" in _1f7)){each(_1f6.classes,function(_1f8,idx,arr){var re=new RegExp("(?:^|\\s)"+_1f8+"(?:\\s|$)");ff=_1d2(ff,function(elem){return re.test(elem.className);});ff.count=idx;});}if(!("pseudos" in _1f7)){each(_1f6.pseudos,function(_1f9){var pn=_1f9.name;if(_1ea[pn]){ff=_1d2(ff,_1ea[pn](pn,_1f9.value));}});}if(!("attrs" in _1f7)){each(_1f6.attrs,function(attr){var _1fa;var a=attr.attr;if(attr.type&&_1d9[attr.type]){_1fa=_1d9[attr.type](a,attr.matchFor);}else{if(a.length){_1fa=_1f5(a);}}if(_1fa){ff=_1d2(ff,_1fa);}});}if(!("id" in _1f7)){if(_1f6.id){ff=_1d2(ff,function(elem){return (!!elem&&(elem.id==_1f6.id));});}}if(!ff){if(!("default" in _1f7)){ff=_1bf;}}return ff;};var _1fb=function(_1fc){return function(node,ret,bag){while(node=node[_1e2]){if(_1e1&&(!_1d6(node))){continue;}if((!bag||_1fd(node,bag))&&_1fc(node)){ret.push(node);}break;}return ret;};};var _1fe=function(_1ff){return function(root,ret,bag){var te=root[_1e2];while(te){if(_1e4(te)){if(bag&&!_1fd(te,bag)){break;}if(_1ff(te)){ret.push(te);}}te=te[_1e2];}return ret;};};var _200=function(_201){_201=_201||_1bf;return function(root,ret,bag){var te,x=0,tret=root[_1bc];while(te=tret[x++]){if(_1e4(te)&&(!bag||_1fd(te,bag))&&(_201(te,x))){ret.push(te);}}return ret;};};var _202=function(node,root){var pn=node.parentNode;while(pn){if(pn==root){break;}pn=pn.parentNode;}return !!pn;};var _203={};var _204=function(_205){var _206=_203[_205.query];if(_206){return _206;}var io=_205.infixOper;var oper=(io?io.oper:"");var _207=_1f1(_205,{el:1});var qt=_205.tag;var _208=("*"==qt);var ecs=_1ba()["getElementsByClassName"];if(!oper){if(_205.id){_207=(!_205.loops&&_208)?_1bf:_1f1(_205,{el:1,id:1});_206=function(root,arr){var te=d.byId(_205.id,(root.ownerDocument||root));if(!te||!_207(te)){return;}if(9==root.nodeType){return _1d5(te,arr);}else{if(_202(te,root)){return _1d5(te,arr);}}};}else{if(ecs&&/\{\s*\[native code\]\s*\}/.test(String(ecs))&&_205.classes.length&&!_1bb){_207=_1f1(_205,{el:1,classes:1,id:1});var _209=_205.classes.join(" ");_206=function(root,arr,bag){var ret=_1d5(0,arr),te,x=0;var tret=root.getElementsByClassName(_209);while((te=tret[x++])){if(_207(te,root)&&_1fd(te,bag)){ret.push(te);}}return ret;};}else{if(!_208&&!_205.loops){_206=function(root,arr,bag){var ret=_1d5(0,arr),te,x=0;var tret=root.getElementsByTagName(_205.getTag());while((te=tret[x++])){if(_1fd(te,bag)){ret.push(te);}}return ret;};}else{_207=_1f1(_205,{el:1,tag:1,id:1});_206=function(root,arr,bag){var ret=_1d5(0,arr),te,x=0;var tret=root.getElementsByTagName(_205.getTag());while((te=tret[x++])){if(_207(te,root)&&_1fd(te,bag)){ret.push(te);}}return ret;};}}}}else{var _20a={el:1};if(_208){_20a.tag=1;}_207=_1f1(_205,_20a);if("+"==oper){_206=_1fb(_207);}else{if("~"==oper){_206=_1fe(_207);}else{if(">"==oper){_206=_200(_207);}}}}return _203[_205.query]=_206;};var _20b=function(root,_20c){var _20d=_1d5(root),qp,x,te,qpl=_20c.length,bag,ret;for(var i=0;i<qpl;i++){ret=[];qp=_20c[i];x=_20d.length-1;if(x>0){bag={};ret.nozip=true;}var gef=_204(qp);for(var j=0;(te=_20d[j]);j++){gef(te,ret,bag);}if(!ret.length){break;}_20d=ret;}return ret;};var _20e={},_20f={};var _210=function(_211){var _212=_1c0(trim(_211));if(_212.length==1){var tef=_204(_212[0]);return function(root){var r=tef(root,new qlc());if(r){r.nozip=true;}return r;};}return function(root){return _20b(root,_212);};};var nua=navigator.userAgent;var wk="WebKit/";var _213=(d.isWebKit&&(nua.indexOf(wk)>0)&&(parseFloat(nua.split(wk)[1])>528));var _214=d.isIE?"commentStrip":"nozip";var qsa="querySelectorAll";var _215=(!!_1ba()[qsa]&&(!d.isSafari||(d.isSafari>3.1)||_213));var _216=/n\+\d|([^ ])?([>~+])([^ =])?/g;var _217=function(_218,pre,ch,post){return ch?(pre?pre+" ":"")+ch+(post?" "+post:""):_218;};var _219=function(_21a,_21b){_21a=_21a.replace(_216,_217);if(_215){var _21c=_20f[_21a];if(_21c&&!_21b){return _21c;}}var _21d=_20e[_21a];if(_21d){return _21d;}var qcz=_21a.charAt(0);var _21e=(-1==_21a.indexOf(" "));if((_21a.indexOf("#")>=0)&&(_21e)){_21b=true;}var _21f=(_215&&(!_21b)&&(_1bd.indexOf(qcz)==-1)&&(!d.isIE||(_21a.indexOf(":")==-1))&&(!(_1bb&&(_21a.indexOf(".")>=0)))&&(_21a.indexOf(":contains")==-1)&&(_21a.indexOf(":checked")==-1)&&(_21a.indexOf("|=")==-1));if(_21f){var tq=(_1bd.indexOf(_21a.charAt(_21a.length-1))>=0)?(_21a+" *"):_21a;return _20f[_21a]=function(root){try{if(!((9==root.nodeType)||_21e)){throw "";}var r=root[qsa](tq);r[_214]=true;return r;}catch(e){return _219(_21a,true)(root);}};}else{var _220=_21a.split(/\s*,\s*/);return _20e[_21a]=((_220.length<2)?_210(_21a):function(root){var _221=0,ret=[],tp;while((tp=_220[_221++])){ret=ret.concat(_210(tp)(root));}return ret;});}};var _222=0;var _223=d.isIE?function(node){if(_1be){return (node.getAttribute("_uid")||node.setAttribute("_uid",++_222)||_222);}else{return node.uniqueID;}}:function(node){return (node._uid||(node._uid=++_222));};var _1fd=function(node,bag){if(!bag){return 1;}var id=_223(node);if(!bag[id]){return bag[id]=1;}return 0;};var _224="_zipIdx";var _225=function(arr){if(arr&&arr.nozip){return (qlc._wrap)?qlc._wrap(arr):arr;}var ret=new qlc();if(!arr||!arr.length){return ret;}if(arr[0]){ret.push(arr[0]);}if(arr.length<2){return ret;}_222++;if(d.isIE&&_1be){var _226=_222+"";arr[0].setAttribute(_224,_226);for(var x=1,te;te=arr[x];x++){if(arr[x].getAttribute(_224)!=_226){ret.push(te);}te.setAttribute(_224,_226);}}else{if(d.isIE&&arr.commentStrip){try{for(var x=1,te;te=arr[x];x++){if(_1d6(te)){ret.push(te);}}}catch(e){}}else{if(arr[0]){arr[0][_224]=_222;}for(var x=1,te;te=arr[x];x++){if(arr[x][_224]!=_222){ret.push(te);}te[_224]=_222;}}}return ret;};d.query=function(_227,root){qlc=d._NodeListCtor;if(!_227){return new qlc();}if(_227.constructor==qlc){return _227;}if(typeof _227!="string"){return new qlc(_227);}if(typeof root=="string"){root=d.byId(root);if(!root){return new qlc();}}root=root||_1ba();var od=root.ownerDocument||root.documentElement;_1be=(root.contentType&&root.contentType=="application/xml")||(d.isOpera&&(root.doctype||od.toString()=="[object XMLDocument]"))||(!!od)&&(d.isIE?od.xml:(root.xmlVersion||od.xmlVersion));var r=_219(_227)(root);if(r&&r.nozip&&!qlc._wrap){return r;}return _225(r);};d.query.pseudos=_1ea;d._filterQueryResult=function(_228,_229){var _22a=new d._NodeListCtor();var _22b=_1f1(_1c0(_229)[0]);for(var x=0,te;te=_228[x];x++){if(_22b(te)){_22a.push(te);}}return _22a;};})(this["queryPortability"]||this["acme"]||dojo);}if(!dojo._hasResource["dojo._base.xhr"]){dojo._hasResource["dojo._base.xhr"]=true;dojo.provide("dojo._base.xhr");(function(){var _22c=dojo,cfg=_22c.config;function _22d(obj,name,_22e){if(_22e===null){return;}var val=obj[name];if(typeof val=="string"){obj[name]=[val,_22e];}else{if(_22c.isArray(val)){val.push(_22e);}else{obj[name]=_22e;}}};dojo.fieldToObject=function(_22f){var ret=null;var item=_22c.byId(_22f);if(item){var _230=item.name;var type=(item.type||"").toLowerCase();if(_230&&type&&!item.disabled){if(type=="radio"||type=="checkbox"){if(item.checked){ret=item.value;}}else{if(item.multiple){ret=[];_22c.query("option",item).forEach(function(opt){if(opt.selected){ret.push(opt.value);}});}else{ret=item.value;}}}}return ret;};dojo.formToObject=function(_231){var ret={};var _232="file|submit|image|reset|button|";_22c.forEach(dojo.byId(_231).elements,function(item){var _233=item.name;var type=(item.type||"").toLowerCase();if(_233&&type&&_232.indexOf(type)==-1&&!item.disabled){_22d(ret,_233,_22c.fieldToObject(item));if(type=="image"){ret[_233+".x"]=ret[_233+".y"]=ret[_233].x=ret[_233].y=0;}}});return ret;};dojo.objectToQuery=function(map){var enc=encodeURIComponent;var _234=[];var _235={};for(var name in map){var _236=map[name];if(_236!=_235[name]){var _237=enc(name)+"=";if(_22c.isArray(_236)){for(var i=0;i<_236.length;i++){_234.push(_237+enc(_236[i]));}}else{_234.push(_237+enc(_236));}}}return _234.join("&");};dojo.formToQuery=function(_238){return _22c.objectToQuery(_22c.formToObject(_238));};dojo.formToJson=function(_239,_23a){return _22c.toJson(_22c.formToObject(_239),_23a);};dojo.queryToObject=function(str){var ret={};var qp=str.split("&");var dec=decodeURIComponent;_22c.forEach(qp,function(item){if(item.length){var _23b=item.split("=");var name=dec(_23b.shift());var val=dec(_23b.join("="));if(typeof ret[name]=="string"){ret[name]=[ret[name]];}if(_22c.isArray(ret[name])){ret[name].push(val);}else{ret[name]=val;}}});return ret;};dojo._blockAsync=false;var _23c=_22c._contentHandlers=dojo.contentHandlers={text:function(xhr){return xhr.responseText;},json:function(xhr){return _22c.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 _23d=xhr.responseText;var _23e=_23d.indexOf("/*");var _23f=_23d.lastIndexOf("*/");if(_23e==-1||_23f==-1){throw new Error("JSON was not comment filtered");}return _22c.fromJson(_23d.substring(_23e+2,_23f));},javascript:function(xhr){return _22c.eval(xhr.responseText);},xml:function(xhr){var _240=xhr.responseXML;if(_22c.isIE&&(!_240||!_240.documentElement)){var ms=function(n){return "MSXML"+n+".DOMDocument";};var dp=["Microsoft.XMLDOM",ms(6),ms(4),ms(3),ms(2)];_22c.some(dp,function(p){try{var dom=new ActiveXObject(p);dom.async=false;dom.loadXML(xhr.responseText);_240=dom;}catch(e){return false;}return true;});}return _240;},"json-comment-optional":function(xhr){if(xhr.responseText&&/^[^{\[]*\/\*/.test(xhr.responseText)){return _23c["json-comment-filtered"](xhr);}else{return _23c["json"](xhr);}}};dojo._ioSetArgs=function(args,_241,_242,_243){var _244={args:args,url:args.url};var _245=null;if(args.form){var form=_22c.byId(args.form);var _246=form.getAttributeNode("action");_244.url=_244.url||(_246?_246.value:null);_245=_22c.formToObject(form);}var _247=[{}];if(_245){_247.push(_245);}if(args.content){_247.push(args.content);}if(args.preventCache){_247.push({"dojo.preventCache":new Date().valueOf()});}_244.query=_22c.objectToQuery(_22c.mixin.apply(null,_247));_244.handleAs=args.handleAs||"text";var d=new _22c.Deferred(_241);d.addCallbacks(_242,function(_248){return _243(_248,d);});var ld=args.load;if(ld&&_22c.isFunction(ld)){d.addCallback(function(_249){return ld.call(args,_249,_244);});}var err=args.error;if(err&&_22c.isFunction(err)){d.addErrback(function(_24a){return err.call(args,_24a,_244);});}var _24b=args.handle;if(_24b&&_22c.isFunction(_24b)){d.addBoth(function(_24c){return _24b.call(args,_24c,_244);});}if(cfg.ioPublish&&_22c.publish&&_244.args.ioPublish!==false){d.addCallbacks(function(res){_22c.publish("/dojo/io/load",[d,res]);return res;},function(res){_22c.publish("/dojo/io/error",[d,res]);return res;});d.addBoth(function(res){_22c.publish("/dojo/io/done",[d,res]);return res;});}d.ioArgs=_244;return d;};var _24d=function(dfd){dfd.canceled=true;var xhr=dfd.ioArgs.xhr;var _24e=typeof xhr.abort;if(_24e=="function"||_24e=="object"||_24e=="unknown"){xhr.abort();}var err=dfd.ioArgs.error;if(!err){err=new Error("xhr cancelled");err.dojoType="cancel";}return err;};var _24f=function(dfd){var ret=_23c[dfd.ioArgs.handleAs](dfd.ioArgs.xhr);return ret===undefined?null:ret;};var _250=function(_251,dfd){if(!dfd.ioArgs.args.failOk){console.error(_251);}return _251;};var _252=null;var _253=[];var _254=0;var _255=function(dfd){if(_254<=0){_254=0;if(cfg.ioPublish&&_22c.publish&&(!dfd||dfd&&dfd.ioArgs.args.ioPublish!==false)){_22c.publish("/dojo/io/stop");}}};var _256=function(){var now=(new Date()).getTime();if(!_22c._blockAsync){for(var i=0,tif;i<_253.length&&(tif=_253[i]);i++){var dfd=tif.dfd;var func=function(){if(!dfd||dfd.canceled||!tif.validCheck(dfd)){_253.splice(i--,1);_254-=1;}else{if(tif.ioCheck(dfd)){_253.splice(i--,1);tif.resHandle(dfd);_254-=1;}else{if(dfd.startTime){if(dfd.startTime+(dfd.ioArgs.args.timeout||0)<now){_253.splice(i--,1);var err=new Error("timeout exceeded");err.dojoType="timeout";dfd.errback(err);dfd.cancel();_254-=1;}}}}};if(dojo.config.debugAtAllCosts){func.call(this);}else{try{func.call(this);}catch(e){dfd.errback(e);}}}}_255(dfd);if(!_253.length){clearInterval(_252);_252=null;return;}};dojo._ioCancelAll=function(){try{_22c.forEach(_253,function(i){try{i.dfd.cancel();}catch(e){}});}catch(e){}};if(_22c.isIE){_22c.addOnWindowUnload(_22c._ioCancelAll);}_22c._ioNotifyStart=function(dfd){if(cfg.ioPublish&&_22c.publish&&dfd.ioArgs.args.ioPublish!==false){if(!_254){_22c.publish("/dojo/io/start");}_254+=1;_22c.publish("/dojo/io/send",[dfd]);}};_22c._ioWatch=function(dfd,_257,_258,_259){var args=dfd.ioArgs.args;if(args.timeout){dfd.startTime=(new Date()).getTime();}_253.push({dfd:dfd,validCheck:_257,ioCheck:_258,resHandle:_259});if(!_252){_252=setInterval(_256,50);}if(args.sync){_256();}};var _25a="application/x-www-form-urlencoded";var _25b=function(dfd){return dfd.ioArgs.xhr.readyState;};var _25c=function(dfd){return 4==dfd.ioArgs.xhr.readyState;};var _25d=function(dfd){var xhr=dfd.ioArgs.xhr;if(_22c._isDocumentOk(xhr)){dfd.callback(dfd);}else{var err=new Error("Unable to load "+dfd.ioArgs.url+" status:"+xhr.status);err.status=xhr.status;err.responseText=xhr.responseText;dfd.errback(err);}};dojo._ioAddQueryToUrl=function(_25e){if(_25e.query.length){_25e.url+=(_25e.url.indexOf("?")==-1?"?":"&")+_25e.query;_25e.query=null;}};dojo.xhr=function(_25f,args,_260){var dfd=_22c._ioSetArgs(args,_24d,_24f,_250);var _261=dfd.ioArgs;var xhr=_261.xhr=_22c._xhrObj(_261.args);if(!xhr){dfd.cancel();return dfd;}if("postData" in args){_261.query=args.postData;}else{if("putData" in args){_261.query=args.putData;}else{if("rawBody" in args){_261.query=args.rawBody;}else{if((arguments.length>2&&!_260)||"POST|PUT".indexOf(_25f.toUpperCase())==-1){_22c._ioAddQueryToUrl(_261);}}}}xhr.open(_25f,_261.url,args.sync!==true,args.user||undefined,args.password||undefined);if(args.headers){for(var hdr in args.headers){if(hdr.toLowerCase()==="content-type"&&!args.contentType){args.contentType=args.headers[hdr];}else{if(args.headers[hdr]){xhr.setRequestHeader(hdr,args.headers[hdr]);}}}}xhr.setRequestHeader("Content-Type",args.contentType||_25a);if(!args.headers||!("X-Requested-With" in args.headers)){xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");}_22c._ioNotifyStart(dfd);if(dojo.config.debugAtAllCosts){xhr.send(_261.query);}else{try{xhr.send(_261.query);}catch(e){_261.error=e;dfd.cancel();}}_22c._ioWatch(dfd,_25b,_25c,_25d);xhr=null;return dfd;};dojo.xhrGet=function(args){return _22c.xhr("GET",args);};dojo.rawXhrPost=dojo.xhrPost=function(args){return _22c.xhr("POST",args,true);};dojo.rawXhrPut=dojo.xhrPut=function(args){return _22c.xhr("PUT",args,true);};dojo.xhrDelete=function(args){return _22c.xhr("DELETE",args);};})();}if(!dojo._hasResource["dojo._base.fx"]){dojo._hasResource["dojo._base.fx"]=true;dojo.provide("dojo._base.fx");(function(){var d=dojo;var _262=d._mixin;dojo._Line=function(_263,end){this.start=_263;this.end=end;};dojo._Line.prototype.getValue=function(n){return ((this.end-this.start)*n)+this.start;};dojo.Animation=function(args){_262(this,args);if(d.isArray(this.curve)){this.curve=new d._Line(this.curve[0],this.curve[1]);}};d._Animation=d.Animation;d.extend(dojo.Animation,{duration:350,repeat:0,rate:20,_percent:0,_startRepeatCount:0,_getStep:function(){var _264=this._percent,_265=this.easing;return _265?_265(_264):_264;},_fire:function(evt,args){var a=args||[];if(this[evt]){if(d.config.debugAtAllCosts){this[evt].apply(this,a);}else{try{this[evt].apply(this,a);}catch(e){console.error("exception in animation handler for:",evt);console.error(e);}}}return this;},play:function(_266,_267){var _268=this;if(_268._delayTimer){_268._clearTimer();}if(_267){_268._stopTimer();_268._active=_268._paused=false;_268._percent=0;}else{if(_268._active&&!_268._paused){return _268;}}_268._fire("beforeBegin",[_268.node]);var de=_266||_268.delay,_269=dojo.hitch(_268,"_play",_267);if(de>0){_268._delayTimer=setTimeout(_269,de);return _268;}_269();return _268;},_play:function(_26a){var _26b=this;if(_26b._delayTimer){_26b._clearTimer();}_26b._startTime=new Date().valueOf();if(_26b._paused){_26b._startTime-=_26b.duration*_26b._percent;}_26b._endTime=_26b._startTime+_26b.duration;_26b._active=true;_26b._paused=false;var _26c=_26b.curve.getValue(_26b._getStep());if(!_26b._percent){if(!_26b._startRepeatCount){_26b._startRepeatCount=_26b.repeat;}_26b._fire("onBegin",[_26c]);}_26b._fire("onPlay",[_26c]);_26b._cycle();return _26b;},pause:function(){var _26d=this;if(_26d._delayTimer){_26d._clearTimer();}_26d._stopTimer();if(!_26d._active){return _26d;}_26d._paused=true;_26d._fire("onPause",[_26d.curve.getValue(_26d._getStep())]);return _26d;},gotoPercent:function(_26e,_26f){var _270=this;_270._stopTimer();_270._active=_270._paused=true;_270._percent=_26e;if(_26f){_270.play();}return _270;},stop:function(_271){var _272=this;if(_272._delayTimer){_272._clearTimer();}if(!_272._timer){return _272;}_272._stopTimer();if(_271){_272._percent=1;}_272._fire("onStop",[_272.curve.getValue(_272._getStep())]);_272._active=_272._paused=false;return _272;},status:function(){if(this._active){return this._paused?"paused":"playing";}return "stopped";},_cycle:function(){var _273=this;if(_273._active){var curr=new Date().valueOf();var step=(curr-_273._startTime)/(_273._endTime-_273._startTime);if(step>=1){step=1;}_273._percent=step;if(_273.easing){step=_273.easing(step);}_273._fire("onAnimate",[_273.curve.getValue(step)]);if(_273._percent<1){_273._startTimer();}else{_273._active=false;if(_273.repeat>0){_273.repeat--;_273.play(null,true);}else{if(_273.repeat==-1){_273.play(null,true);}else{if(_273._startRepeatCount){_273.repeat=_273._startRepeatCount;_273._startRepeatCount=0;}}}_273._percent=0;_273._fire("onEnd",[_273.node]);!_273.repeat&&_273._stopTimer();}}return _273;},_clearTimer:function(){clearTimeout(this._delayTimer);delete this._delayTimer;}});var ctr=0,_274=[],_275=null,_276={run:function(){}};d.extend(d.Animation,{_startTimer:function(){if(!this._timer){this._timer=d.connect(_276,"run",this,"_cycle");ctr++;}if(!_275){_275=setInterval(d.hitch(_276,"run"),this.rate);}},_stopTimer:function(){if(this._timer){d.disconnect(this._timer);this._timer=null;ctr--;}if(ctr<=0){clearInterval(_275);_275=null;ctr=0;}}});var _277=d.isIE?function(node){var ns=node.style;if(!ns.width.length&&d.style(node,"width")=="auto"){ns.width="auto";}}:function(){};dojo._fade=function(args){args.node=d.byId(args.node);var _278=_262({properties:{}},args),_279=(_278.properties.opacity={});_279.start=!("start" in _278)?function(){return +d.style(_278.node,"opacity")||0;}:_278.start;_279.end=_278.end;var anim=d.animateProperty(_278);d.connect(anim,"beforeBegin",d.partial(_277,_278.node));return anim;};dojo.fadeIn=function(args){return d._fade(_262({end:1},args));};dojo.fadeOut=function(args){return d._fade(_262({end:0},args));};dojo._defaultEasing=function(n){return 0.5+((Math.sin((n+1.5)*Math.PI))/2);};var _27a=function(_27b){this._properties=_27b;for(var p in _27b){var prop=_27b[p];if(prop.start instanceof d.Color){prop.tempColor=new d.Color();}}};_27a.prototype.getValue=function(r){var ret={};for(var p in this._properties){var prop=this._properties[p],_27c=prop.start;if(_27c instanceof d.Color){ret[p]=d.blendColors(_27c,prop.end,r,prop.tempColor).toCss();}else{if(!d.isArray(_27c)){ret[p]=((prop.end-_27c)*r)+_27c+(p!="opacity"?prop.units||"px":0);}}}return ret;};dojo.animateProperty=function(args){var n=args.node=d.byId(args.node);if(!args.easing){args.easing=d._defaultEasing;}var anim=new d.Animation(args);d.connect(anim,"beforeBegin",anim,function(){var pm={};for(var p in this.properties){if(p=="width"||p=="height"){this.node.display="block";}var prop=this.properties[p];if(d.isFunction(prop)){prop=prop(n);}prop=pm[p]=_262({},(d.isObject(prop)?prop:{end:prop}));if(d.isFunction(prop.start)){prop.start=prop.start(n);}if(d.isFunction(prop.end)){prop.end=prop.end(n);}var _27d=(p.toLowerCase().indexOf("color")>=0);function _27e(node,p){var v={height:node.offsetHeight,width:node.offsetWidth}[p];if(v!==undefined){return v;}v=d.style(node,p);return (p=="opacity")?+v:(_27d?v:parseFloat(v));};if(!("end" in prop)){prop.end=_27e(n,p);}else{if(!("start" in prop)){prop.start=_27e(n,p);}}if(_27d){prop.start=new d.Color(prop.start);prop.end=new d.Color(prop.end);}else{prop.start=(p=="opacity")?+prop.start:parseFloat(prop.start);}}this.curve=new _27a(pm);});d.connect(anim,"onAnimate",d.hitch(d,"style",anim.node));return anim;};dojo.anim=function(node,_27f,_280,_281,_282,_283){return d.animateProperty({node:node,duration:_280||d.Animation.prototype.duration,properties:_27f,easing:_281,onEnd:_282}).play(_283||0);};})();}if(!dojo._hasResource["dojo._base.browser"]){dojo._hasResource["dojo._base.browser"]=true;dojo.provide("dojo._base.browser");dojo.forEach(dojo.config.require,function(i){dojo["require"](i);});}if(dojo.config.afterOnLoad&&dojo.isBrowser){window.setTimeout(dojo._loadInit,1000);}})();
|
@@ -354,4 +354,123 @@ b.html=d.stripScripts(function(e){b.javascript=e;});var a=this.processHTML(b.htm
|
|
354
354
|
},get:function(a){if(a||!this.retrieve("load")){if(a||!this.retrieve("load:options")){this.set("load",a);}this.store("load",new Request.HTML(this.retrieve("load:options")));
|
355
355
|
}return this.retrieve("load");}};Element.implement({load:function(){this.get("load").send(Array.link(arguments,{data:Object.type,url:String.type}));return this;
|
356
356
|
}});Request.JSON=new Class({Extends:Request,options:{secure:true},initialize:function(a){this.parent(a);this.headers.extend({Accept:"application/json","X-Request":"JSON"});
|
357
|
-
},success:function(a){this.response.json=JSON.decode(a,this.options.secure);this.onSuccess(this.response.json,a);}});
|
357
|
+
},success:function(a){this.response.json=JSON.decode(a,this.options.secure);this.onSuccess(this.response.json,a);}});
|
358
|
+
|
359
|
+
// ----------- Delegation -----------
|
360
|
+
/*
|
361
|
+
/*
|
362
|
+
---
|
363
|
+
description: Better event delegation for MooTools.
|
364
|
+
|
365
|
+
license: MIT-style
|
366
|
+
|
367
|
+
authors:
|
368
|
+
- Christopher Pitt
|
369
|
+
- Arieh Glazer
|
370
|
+
|
371
|
+
requires:
|
372
|
+
- core/1.2.4: Element.Event
|
373
|
+
- core/1.2.4: Selectors
|
374
|
+
|
375
|
+
provides: [Element.delegateEvent, Element.delegateEvents, Element.denyEvent, Element.denyEvents]
|
376
|
+
|
377
|
+
...
|
378
|
+
*/
|
379
|
+
|
380
|
+
Element.implement({
|
381
|
+
'delegateEvent': function(type, delegates, prevent, propagate)
|
382
|
+
{
|
383
|
+
//get stored delegates
|
384
|
+
var key = type + '-delegates',
|
385
|
+
stored = this.retrieve(key) || false;
|
386
|
+
|
387
|
+
// if stored delegates; extend with
|
388
|
+
// new delegates and return self.
|
389
|
+
if (stored)
|
390
|
+
{
|
391
|
+
Hash.each(delegates, function(fn, selector) {
|
392
|
+
if (stored[selector])
|
393
|
+
{
|
394
|
+
stored[selector].push(fn);
|
395
|
+
}
|
396
|
+
else
|
397
|
+
{
|
398
|
+
stored[selector] = [fn];
|
399
|
+
}
|
400
|
+
});
|
401
|
+
|
402
|
+
return this;
|
403
|
+
}
|
404
|
+
else
|
405
|
+
{
|
406
|
+
stored = new Hash();
|
407
|
+
Hash.each(delegates, function(fn, selector) {
|
408
|
+
stored[selector] = [fn];
|
409
|
+
});
|
410
|
+
this.store(key, stored);
|
411
|
+
}
|
412
|
+
|
413
|
+
return this.addEvent(type, function(e)
|
414
|
+
{
|
415
|
+
// Get target and set defaults
|
416
|
+
var target = document.id(e.target),
|
417
|
+
prevent = prevent || true,
|
418
|
+
propagate = propagate || false
|
419
|
+
stored = this.retrieve(key),
|
420
|
+
args = arguments;
|
421
|
+
|
422
|
+
// Cycle through rules
|
423
|
+
Hash.each(stored, function(delegates, selector){
|
424
|
+
if (target.match(selector)){
|
425
|
+
if (prevent) e.preventDefault();
|
426
|
+
if (!propagate) e.stopPropagation();
|
427
|
+
|
428
|
+
Array.each(delegates, function(fn) {
|
429
|
+
if (fn.apply) fn.apply(target, args);
|
430
|
+
});
|
431
|
+
}
|
432
|
+
});
|
433
|
+
|
434
|
+
return this;
|
435
|
+
});
|
436
|
+
},
|
437
|
+
|
438
|
+
'delegateEvents': function(delegates, prevent, propagate)
|
439
|
+
{
|
440
|
+
for (key in delegates)
|
441
|
+
{
|
442
|
+
this.delegateEvent(key, delegates[key], prevent, propagate);
|
443
|
+
}
|
444
|
+
|
445
|
+
return this;
|
446
|
+
},
|
447
|
+
|
448
|
+
'denyEvent': function(type, selector, fn)
|
449
|
+
{
|
450
|
+
var key = type + '-delegates',
|
451
|
+
stored = this.retrieve(key) || false;
|
452
|
+
|
453
|
+
if (stored && stored[selector])
|
454
|
+
{
|
455
|
+
stored[selector].erase(fn);
|
456
|
+
}
|
457
|
+
|
458
|
+
return this;
|
459
|
+
},
|
460
|
+
|
461
|
+
'denyEvents': function(type, selector)
|
462
|
+
{
|
463
|
+
var key = type + '-delegates',
|
464
|
+
stored = this.retrieve(key) || false;
|
465
|
+
|
466
|
+
if (stored && stored[selector])
|
467
|
+
{
|
468
|
+
delete stored[selector];
|
469
|
+
}
|
470
|
+
|
471
|
+
return this;
|
472
|
+
}
|
473
|
+
});
|
474
|
+
|
475
|
+
Element.alias('delegateEvent','relayEvent');
|
476
|
+
Element.alias('delegateEvents','relayEvents');
|