From 9d3364719dc5cdabe196ae19bf89ec4d2a95e2bd Mon Sep 17 00:00:00 2001 From: Petr Vobornik Date: Mon, 26 Nov 2012 13:13:00 +0100 Subject: [PATCH] Dojo Builder Added support for Dojo builder. * Includes built builder and patches required to build the builder. * _base/configRhino.js is required by the builder to run under rhino. * added utility scripts for running the builder * build.sh * clean.sh * compile.sh * make-builder.sh * prepare-dojo.sh https://fedorahosted.org/freeipa/ticket/112 --- .gitignore | 3 + install/ui/README-LICENSE.txt | 5 + install/ui/src/build.profile.js | 108 ++++++++++ install/ui/util/build.sh | 35 +++ install/ui/util/build/LICENSE | 195 +++++++++++++++++ install/ui/util/build/README | 12 ++ install/ui/util/build/_base/configRhino.js | 121 +++++++++++ install/ui/util/build/build.js | 1 + ...ake-dojo-builder-buildable-by-itself.patch | 169 +++++++++++++++ install/ui/util/clean.sh | 26 +++ install/ui/util/compile.sh | 120 +++++++++++ install/ui/util/make-builder.sh | 50 +++++ install/ui/util/prepare-dojo.sh | 204 ++++++++++++++++++ 13 files changed, 1049 insertions(+) create mode 100644 install/ui/src/build.profile.js create mode 100755 install/ui/util/build.sh create mode 100644 install/ui/util/build/LICENSE create mode 100644 install/ui/util/build/README create mode 100644 install/ui/util/build/_base/configRhino.js create mode 100644 install/ui/util/build/build.js create mode 100644 install/ui/util/build/patches/001-dojo-build-pvoborni-01-Make-dojo-builder-buildable-by-itself.patch create mode 100755 install/ui/util/clean.sh create mode 100755 install/ui/util/compile.sh create mode 100755 install/ui/util/make-builder.sh create mode 100755 install/ui/util/prepare-dojo.sh diff --git a/.gitignore b/.gitignore index d20747c04..2570b9bed 100644 --- a/.gitignore +++ b/.gitignore @@ -49,6 +49,9 @@ install/stamp-h1 install/po/test.po install/po/test_locale/xh_ZA/LC_MESSAGES/ipa.mo install/ui/test/results +install/ui/release +install/ui/src/dojo +install/ui/src/build ipa-client/COPYING ipa-client/ChangeLog ipa-client/INSTALL diff --git a/install/ui/README-LICENSE.txt b/install/ui/README-LICENSE.txt index c1ffa5f8d..444d3a2e7 100644 --- a/install/ui/README-LICENSE.txt +++ b/install/ui/README-LICENSE.txt @@ -34,6 +34,11 @@ UglifyJS - licensed under BSD license * util/uglifyjs/uglify-js.js * utli/uglifyjs/lib/* +Dojo, Dojo Builder - dual licensed under BSD license and AFL version 2.1 + * full license text in util/build/LICENSE + * util/build/build.js + * util/build/_base/*.js + Full license texts and copyright notices are listed below. = jQuery copyright notice with MIT license = diff --git a/install/ui/src/build.profile.js b/install/ui/src/build.profile.js new file mode 100644 index 000000000..5887daa85 --- /dev/null +++ b/install/ui/src/build.profile.js @@ -0,0 +1,108 @@ +// +// BUILDER profile +// + +var profile = (function(){ + return { + basePath: ".", + releaseDir: "../release", + releaseName: "build", + action: "release", + + layerOptimize: "comments", + optimize: "comments", + cssOptimize: "comments", + mini: true, + stripConsole: "warn", + selectorEngine: "lite", + + staticHasFeatures: { + "host-rhino":1, + "host-browser":0, + "host-node":0, + "dom":0, + "dojo-has-api":1, + "dojo-xhr-factory":0, + "dojo-inject-api":1, + "dojo-timeout-api":0, + "dojo-trace-api":1, + "dojo-loader-catches":0, + "dojo-dom-ready-api":0, + "dojo-dom-ready-plugin":0, + "dojo-ready-api":1, + "dojo-error-api":1, + "dojo-publish-privates":1, + "dojo-gettext-api":1, + "dojo-sniff":0, + "dojo-loader":1, + "dojo-test-xd":0, + "dojo-test-sniff":0 + }, + + packages:[{ + name: "dojo", + location: "dojo" + },{ + name: "build", + location: "build" + }], + + layers: { + "build/build": { + include: [ + 'dojo/dojo', + 'build/buildControlBase', + 'build/argv', + 'build/build.profile', + 'build/discover', + 'build/messages', + 'build/removeComments', + 'build/fs', + 'build/main', + 'build/fileUtils', + 'build/process', + 'build/v1xProfiles', + 'build/replace', + 'build/fileHandleThrottle', + 'build/buildControl', + 'build/commandLineArgs', + 'build/stringify', + 'build/buildControlDefault', + 'build/version', + 'build/plugins/querySelector', + 'build/plugins/domReady', + 'build/plugins/has', + 'build/plugins/text', + 'build/plugins/loadInit', + 'build/plugins/require', + 'build/plugins/i18n', + 'build/transforms/depsDump', + 'build/transforms/copy', + 'build/transforms/trace', + 'build/transforms/read', + 'build/transforms/writeAmd', + 'build/transforms/dojoPragmas', + 'build/transforms/report', + 'build/transforms/hasFindAll', + 'build/transforms/hasFixup', + 'build/transforms/writeDojo', + 'build/transforms/depsScan', + 'build/transforms/write', + 'build/transforms/dojoReport', + 'build/transforms/writeOptimized', + 'build/transforms/insertSymbols', + 'build/transforms/hasReport', + 'build/transforms/writeCss', + 'build/transforms/depsDeclarative', + 'build/transforms/optimizeCss', + 'build/node/fs', + 'build/node/process', + 'build/rhino/fs', + 'build/rhino/process' + ], + customBase: true, + boot: true + } + } + }; +})(); \ No newline at end of file diff --git a/install/ui/util/build.sh b/install/ui/util/build.sh new file mode 100755 index 000000000..7cd623485 --- /dev/null +++ b/install/ui/util/build.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +# Authors: +# Petr Vobornik +# +# Copyright (C) 2012 Red Hat +# see file 'COPYING' for use and warranty information +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Build script for FreeIPA Web UI + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +profile=$1 + +if [[ ! $profile ]] ; then + echo 'No profile set' + echo 'Usage: build.sh PROFILE_NAME' + exit 1 +fi + +rhino $DIR/build/build.js baseUrl=$DIR/build load=build profile=$DIR/../src/$profile.profile.js +exit $? \ No newline at end of file diff --git a/install/ui/util/build/LICENSE b/install/ui/util/build/LICENSE new file mode 100644 index 000000000..776153d9c --- /dev/null +++ b/install/ui/util/build/LICENSE @@ -0,0 +1,195 @@ +Dojo is available under *either* the terms of the modified BSD license *or* the +Academic Free License version 2.1. As a recipient of Dojo, you may choose which +license to receive this code under (except as noted in per-module LICENSE +files). Some modules may not be the copyright of the Dojo Foundation. These +modules contain explicit declarations of copyright in both the LICENSE files in +the directories in which they reside and in the code itself. No external +contributions are allowed under licenses which are fundamentally incompatible +with the AFL or BSD licenses that Dojo is distributed under. + +The text of the AFL and BSD licenses is reproduced below. + +------------------------------------------------------------------------------- +The "New" BSD License: +********************** + +Copyright (c) 2005-2012, The Dojo Foundation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of the Dojo Foundation nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------------------- +The Academic Free License, v. 2.1: +********************************** + +This Academic Free License (the "License") applies to any original work of +authorship (the "Original Work") whose owner (the "Licensor") has placed the +following notice immediately following the copyright notice for the Original +Work: + +Licensed under the Academic Free License version 2.1 + +1) Grant of Copyright License. Licensor hereby grants You a world-wide, +royalty-free, non-exclusive, perpetual, sublicenseable license to do the +following: + +a) to reproduce the Original Work in copies; + +b) to prepare derivative works ("Derivative Works") based upon the Original +Work; + +c) to distribute copies of the Original Work and Derivative Works to the +public; + +d) to perform the Original Work publicly; and + +e) to display the Original Work publicly. + +2) Grant of Patent License. Licensor hereby grants You a world-wide, +royalty-free, non-exclusive, perpetual, sublicenseable license, under patent +claims owned or controlled by the Licensor that are embodied in the Original +Work as furnished by the Licensor, to make, use, sell and offer for sale the +Original Work and Derivative Works. + +3) Grant of Source Code License. The term "Source Code" means the preferred +form of the Original Work for making modifications to it and all available +documentation describing how to modify the Original Work. Licensor hereby +agrees to provide a machine-readable copy of the Source Code of the Original +Work along with each copy of the Original Work that Licensor distributes. +Licensor reserves the right to satisfy this obligation by placing a +machine-readable copy of the Source Code in an information repository +reasonably calculated to permit inexpensive and convenient access by You for as +long as Licensor continues to distribute the Original Work, and by publishing +the address of that information repository in a notice immediately following +the copyright notice that applies to the Original Work. + +4) Exclusions From License Grant. Neither the names of Licensor, nor the names +of any contributors to the Original Work, nor any of their trademarks or +service marks, may be used to endorse or promote products derived from this +Original Work without express prior written permission of the Licensor. Nothing +in this License shall be deemed to grant any rights to trademarks, copyrights, +patents, trade secrets or any other intellectual property of Licensor except as +expressly stated herein. No patent license is granted to make, use, sell or +offer to sell embodiments of any patent claims other than the licensed claims +defined in Section 2. No right is granted to the trademarks of Licensor even if +such marks are included in the Original Work. Nothing in this License shall be +interpreted to prohibit Licensor from licensing under different terms from this +License any Original Work that Licensor otherwise would have a right to +license. + +5) This section intentionally omitted. + +6) Attribution Rights. You must retain, in the Source Code of any Derivative +Works that You create, all copyright, patent or trademark notices from the +Source Code of the Original Work, as well as any notices of licensing and any +descriptive text identified therein as an "Attribution Notice." You must cause +the Source Code for any Derivative Works that You create to carry a prominent +Attribution Notice reasonably calculated to inform recipients that You have +modified the Original Work. + +7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that +the copyright in and to the Original Work and the patent rights granted herein +by Licensor are owned by the Licensor or are sublicensed to You under the terms +of this License with the permission of the contributor(s) of those copyrights +and patent rights. Except as expressly stated in the immediately proceeding +sentence, the Original Work is provided under this License on an "AS IS" BASIS +and WITHOUT WARRANTY, either express or implied, including, without limitation, +the warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. +This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No +license to Original Work is granted hereunder except under this disclaimer. + +8) Limitation of Liability. Under no circumstances and under no legal theory, +whether in tort (including negligence), contract, or otherwise, shall the +Licensor be liable to any person for any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License +or the use of the Original Work including, without limitation, damages for loss +of goodwill, work stoppage, computer failure or malfunction, or any and all +other commercial damages or losses. This limitation of liability shall not +apply to liability for death or personal injury resulting from Licensor's +negligence to the extent applicable law prohibits such limitation. Some +jurisdictions do not allow the exclusion or limitation of incidental or +consequential damages, so this exclusion and limitation may not apply to You. + +9) Acceptance and Termination. If You distribute copies of the Original Work or +a Derivative Work, You must make a reasonable effort under the circumstances to +obtain the express assent of recipients to the terms of this License. Nothing +else but this License (or another written agreement between Licensor and You) +grants You permission to create Derivative Works based upon the Original Work +or to exercise any of the rights granted in Section 1 herein, and any attempt +to do so except under the terms of this License (or another written agreement +between Licensor and You) is expressly prohibited by U.S. copyright law, the +equivalent laws of other countries, and by international treaty. Therefore, by +exercising any of the rights granted to You in Section 1 herein, You indicate +Your acceptance of this License and all of its terms and conditions. + +10) Termination for Patent Action. This License shall terminate automatically +and You may no longer exercise any of the rights granted to You by this License +as of the date You commence an action, including a cross-claim or counterclaim, +against Licensor or any licensee alleging that the Original Work infringes a +patent. This termination provision shall not apply for an action alleging +patent infringement by combinations of the Original Work with other software or +hardware. + +11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this +License may be brought only in the courts of a jurisdiction wherein the +Licensor resides or in which Licensor conducts its primary business, and under +the laws of that jurisdiction excluding its conflict-of-law provisions. The +application of the United Nations Convention on Contracts for the International +Sale of Goods is expressly excluded. Any use of the Original Work outside the +scope of this License or after its termination shall be subject to the +requirements and penalties of the U.S. Copyright Act, 17 U.S.C. § 101 et +seq., the equivalent laws of other countries, and international treaty. This +section shall survive the termination of this License. + +12) Attorneys Fees. In any action to enforce the terms of this License or +seeking damages relating thereto, the prevailing party shall be entitled to +recover its costs and expenses, including, without limitation, reasonable +attorneys' fees and costs incurred in connection with such action, including +any appeal of such action. This section shall survive the termination of this +License. + +13) Miscellaneous. This License represents the complete agreement concerning +the subject matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent necessary to +make it enforceable. + +14) Definition of "You" in This License. "You" throughout this License, whether +in upper or lower case, means an individual or a legal entity exercising rights +under, and complying with all of the terms of, this License. For legal +entities, "You" includes any entity that controls, is controlled by, or is +under common control with you. For purposes of this definition, "control" means +(i) the power, direct or indirect, to cause the direction or management of such +entity, whether by contract or otherwise, or (ii) ownership of fifty percent +(50%) or more of the outstanding shares, or (iii) beneficial ownership of such +entity. + +15) Right to Use. You may use the Original Work in all ways not otherwise +restricted or conditioned by this License or by law, and Licensor promises not +to interfere with or be responsible for such uses by You. + +This license is Copyright (C) 2003-2004 Lawrence E. Rosen. All rights reserved. +Permission is hereby granted to copy and distribute this license without +modification. This license may not be modified without the express written +permission of its copyright owner. \ No newline at end of file diff --git a/install/ui/util/build/README b/install/ui/util/build/README new file mode 100644 index 000000000..0772532d4 --- /dev/null +++ b/install/ui/util/build/README @@ -0,0 +1,12 @@ +build.js is builded dojo builder, with applied patches from 'patches' folder, by +itself and compiled using uglify.js + +_base/configRhino.js is unmodifed file from dojo/dojo. Required for a build to work. + += DOJO builder copyright notice = +Copyright (c) 2004-2012, The Dojo Foundation All Rights Reserved. +Available via Academic Free License >= 2.1 OR the modified BSD license. +see: http://dojotoolkit.org/license for details + += License = +Full Dojo license is in LICENSE file. \ No newline at end of file diff --git a/install/ui/util/build/_base/configRhino.js b/install/ui/util/build/_base/configRhino.js new file mode 100644 index 000000000..f337d9d24 --- /dev/null +++ b/install/ui/util/build/_base/configRhino.js @@ -0,0 +1,121 @@ +function rhinoDojoConfig(config, baseUrl, rhinoArgs){ + // summary: + // This module provides bootstrap configuration for running dojo in rhino. + + // TODO: v1.6 tries to set dojo.doc and dojo.body in rhino; why? + + // get a minimal console up + var log = function(hint, args){ + print((hint ? hint + ":" : "") + args[0]); + for(var i = 1; i < args.length; i++){ + print(", " + args[i]); + } + }; + // intentionally define console in the global namespace + console= { + log: function(){ log(0, arguments); }, + error: function(){ log("ERROR", arguments); }, + warn: function(){ log("WARN", arguments); } + }; + + // any command line arguments with the load flag are pushed into deps + for(var deps = [], i = 0; i < rhinoArgs.length; i++){ + var arg = (rhinoArgs[i] + "").split("="); + if(arg[0] == "load"){ + deps.push(arg[1]); + } + } + + // provides timed callbacks using Java threads + if(typeof setTimeout == "undefined" || typeof clearTimeout == "undefined"){ + var timeouts = []; + clearTimeout = function(idx){ + if(!timeouts[idx]){ return; } + timeouts[idx].stop(); + }; + + setTimeout = function(func, delay){ + var def = { + sleepTime:delay, + hasSlept:false, + + run:function(){ + if(!this.hasSlept){ + this.hasSlept = true; + java.lang.Thread.currentThread().sleep(this.sleepTime); + } + try{ + func(); + }catch(e){ + console.debug("Error running setTimeout thread:" + e); + } + } + }; + + var runnable = new java.lang.Runnable(def); + var thread = new java.lang.Thread(runnable); + thread.start(); + return timeouts.push(thread) - 1; + }; + } + + var isLocal = function(url){ + return (new java.io.File(url)).exists(); + }; + + // reset the has cache with node-appropriate values; + var hasCache = { + "host-rhino":1, + "host-browser":0, + "dom":0, + "dojo-has-api":1, + "dojo-xhr-factory":0, + "dojo-inject-api":1, + "dojo-timeout-api":0, + "dojo-trace-api":1, + "dojo-loader-catches":1, + "dojo-dom-ready-api":0, + "dojo-publish-privates":1, + "dojo-sniff":0, + "dojo-loader":1, + "dojo-test-xd":0, + "dojo-test-sniff":0 + }; + for(var p in hasCache){ + config.hasCache[p] = hasCache[p]; + } + + // reset some configuration switches with rhino-appropriate values + var rhinoConfig = { + baseUrl:baseUrl, + commandLineArgs:rhinoArgs, + deps:deps, + timeout:0, + locale:String(java.util.Locale.getDefault().toString().replace('_', '-').toLowerCase()), + + loaderPatch:{ + injectUrl: function(url, callback){ + try{ + if(isLocal(url)){ + load(url); + }else{ + require.eval(readUrl(url, "UTF-8")); + } + callback(); + }catch(e){ + console.log("failed to load resource (" + url + ")"); + console.log(e); + } + }, + + getText: function(url, sync, onLoad){ + // TODO: test https://bugzilla.mozilla.org/show_bug.cgi?id=471005; see v1.6 hostenv_rhino + // note: async mode not supported in rhino + onLoad(isLocal(url) ? readFile(url, "UTF-8") : readUrl(url, "UTF-8")); + } + } + }; + for(p in rhinoConfig){ + config[p] = rhinoConfig[p]; + } +} \ No newline at end of file diff --git a/install/ui/util/build/build.js b/install/ui/util/build/build.js new file mode 100644 index 000000000..a7aaf4c3b --- /dev/null +++ b/install/ui/util/build/build.js @@ -0,0 +1 @@ +(function(e,t){var n=function(){},r=function(e){for(var t in e)return 0;return 1},i={}.toString,s=function(e){return i.call(e)=="[object Function]"},o=function(e){return i.call(e)=="[object String]"},u=function(e){return i.call(e)=="[object Array]"},a=function(e,t){if(e)for(var n=0;nE&&(S=s(t[1])?e.replace(t[0],t[1]):t[1])}),S?Dt(S,0,n,r,i,o,u,f):(y=r[e],y?f?_t(y.pid,y.mid,y.pack,y.url):r[e]:(v=Ot(e,u),v?m=v[1]+e.substring(v[3]):c?m=h.location+"/"+p:g("config-tlmSiblingOfDojo")?m="../"+e:m=e,/(^\/)|(\:)/.test(m)||(m=i+m),m+=".js",_t(c,e,h,Mt(m))))},Pt=function(e,t){return Dt(e,t,Q,Z,p.baseUrl,Y,K)},Ht=function(e,t,n){return e.normalize?e.normalize(t,function(e){return Ft(e,n)}):Ft(t,n)},Bt=0,jt=function(e,t,n){var r,i,s,o;return r=e.match(/^(.+?)\!(.*)$/),r?(i=jt(r[1],t,n),A==O&&!i.executed&&(fn(i),i.injected===N&&!i.executed&&en(function(){Yt(i)}),i.executed?Jt(i):Tt.unshift(i)),i.executed===L&&!i.load&&Jt(i),i.load?(s=Ht(i,r[2],t),e=i.mid+"!"+(i.dynamic?++Bt+"!":"")+s):(s=r[2],e=i.mid+"!"+ ++Bt+"!waitingForPlugin"),o={plugin:i,mid:e,req:xt(t),prid:s}):o=Pt(e,t),Z[o.mid]||!n&&(Z[o.mid]=o)},Ft=p.toAbsMid=function(e,t){return Pt(e,t).mid},It=p.toUrl=function(e,t){var n=Pt(e+"/x",t),r=n.url;return nn(n.pid===0?e:r.substring(0,r.length-5))},qt={injected:N,executed:L,def:C,result:C},Rt=function(e){return Z[e]=f({mid:e},qt)},Ut=Rt("require"),zt=Rt("exports"),Wt=Rt("module"),Xt=function(e,t){p.trace("loader-run-factory",[e.mid]);var n=e.def,r;_.unshift(e);if(g("config-dojo-loader-catches"))try{r=s(n)?n.apply(null,t):n}catch(i){X(W,e.result=l("factoryThrew",[e,i]))}else r=s(n)?n.apply(null,t):n;e.result=r===undefined&&e.cjs?e.cjs.exports:r,_.shift(e)},Vt={},$t=0,Jt=function(e){var t=e.result;return e.dynamic=t.dynamic,e.normalize=t.normalize,e.load=t.load,e},Kt=function(e){var t={};a(e.loadQ,function(n){var r=Ht(e,n.prid,n.req.module),i=e.dynamic?n.mid.replace(/waitingForPlugin$/,r):e.mid+"!"+r,s=f(f({},n),{mid:i,prid:r,injected:0});Z[i]||rn(Z[i]=s),t[n.mid]=Z[i],Lt(n),delete Z[n.mid]}),e.loadQ=0;var n=function(e){for(var n,r=e.deps||[],i=0;i")]),!e.def||t?Vt:e.cjs&&e.cjs.exports;if(!e.executed){if(!e.def)return Vt;var n=e.mid,r=e.deps||[],i,s,o=[],u=0;Gt.push(n),p.trace("loader-exec-module",["exec",Gt.length,n]),e.executed=k;while(u2)return a._hitchArgs.apply(e,arguments);n||(n=t,t=null);if(a.isString(n)){t=t||e.global;if(!t[n])throw['lang.hitch: scope["',n,'"] is null (scope="',t,'")'].join("");return function(){return t[n].apply(t,arguments||[])}}return t?function(){return n.apply(t,arguments||[])}:n},delegate:function(){function e(){}return function(t,n){e.prototype=t;var r=new e;return e.prototype=null,n&&a._mixin(r,n),r}}(),_toArray:t("ie")?function(){function e(e,t,n){var r=n||[];for(var i=t||0;i0)return a.lastIndexOf(s,o,u);var l=s&&s.length||0,c=e?l+r:n,h;u===i?h=e?n:l+r:u<0?(h=l+u,h<0&&(h=n)):h=u>=l?l+r:u,l&&typeof s=="string"&&(s=s.split(""));for(;h!=c;h+=t)if(s[h]==o)return h;return-1}}var r={},i,a={every:o(!1),some:o(!0),indexOf:u(!0),lastIndexOf:u(!1),forEach:function(e,t,n){var i=0,o=e&&e.length||0;o&&typeof e=="string"&&(e=e.split("")),typeof t=="string"&&(t=r[t]||s(t));if(n)for(;i=u[a].priority;a++);u.splice(a,0,r),o()};1;var h=e.config.addOnLoad;return h&&c[i.isArray(h)?"apply":"call"](e,h),e.config.parseOnLoad&&!e.isAsync&&c(99,function(){e.parser||(e.deprecated("Add explicit require(['dojo/parser']);","","2.0"),n(["dojo/parser"]))}),f(),c})},"dojo/_base/declare":function(){define(["./kernel","../has","./lang"],function(e,t,n){function f(e,t){throw new Error("declare"+(t?" "+t:"")+": "+e)}function l(e,t){var n=[],r=[{cls:0,refs:[]}],i={},o=1,a=e.length,l=0,c,h,p,d,v,m,g,y;for(;l=0;--c)v=h[c].prototype,v.hasOwnProperty("declaredClass")||(v.declaredClass="uniqName_"+u++),g=v.declaredClass,i.hasOwnProperty(g)||(i[g]={count:0,refs:[],cls:h[c]},++o),m=i[g],d&&d!==m&&(m.refs.push(d),++d.count),d=m;++d.count,r[0].refs.push(d)}while(r.length){d=r.pop(),n.push(d.cls),--o;while(y=d.refs,y.length==1){d=y[0];if(!d||--d.count){d=0;break}n.push(d.cls),--o}if(d)for(l=0,a=y.length;l=0;--o)s=e[o],u=s._meta,s=u?u.ctor:s,s&&s.apply(this,f?f[o]:n);s=this.postscript,s&&s.apply(this,r)}}function E(e,t){return function(){var n=arguments,r=n,i=n[0],s;if(!(this instanceof n.callee))return N(n);t&&(i&&(s=i.preamble,s&&(r=s.apply(this,r)||r)),s=this.preamble,s&&s.apply(this,r)),e&&e.apply(this,n),s=this.postscript,s&&s.apply(this,n)}}function S(e){return function(){var t=arguments,n=0,r,i;if(!(this instanceof t.callee))return N(t);for(;r=e[n];++n){i=r._meta,r=i?i.ctor:r;if(r){r.apply(this,t);break}}r=this.postscript,r&&r.apply(this,t)}}function x(e,t,n){return function(){var r,i,s,o=0,u=1;n&&(o=t.length-1,u=-1);for(;r=t[o];o+=u)i=r._meta,s=(i?i.hidden:r.prototype)[e],s&&s.apply(this,arguments)}}function T(e){o.prototype=e.prototype;var t=new o;return o.prototype=null,t}function N(e){var t=e.callee,n=T(t);return t.apply(n,e),n}function C(e,t,o){typeof e!="string"&&(o=t,t=e,e=""),o=o||{};var u,p,g,N,k,L,A,O=1,M=t;s.call(t)=="[object Array]"?(L=l(t,e),g=L[0],O=L.length-g,t=L[O]):(L=[0],t?s.call(t)=="[object Function]"?(g=t._meta,L=L.concat(g?g.bases:t)):f("base class is not a callable constructor.",e):t!==null&&f("unknown base class. Did you use dojo.require to pull it in?",e));if(t)for(p=O-1;;--p){u=T(t);if(!p)break;g=L[p],(g._meta?m:r)(u,g.prototype),N=new Function,N.superclass=t,N.prototype=u,t=u.constructor=N}else u={};C.safeMixin(u,o),g=o.constructor,g!==i.constructor&&(g.nom=a,u.constructor=g);for(p=O-1;p;--p)g=L[p]._meta,g&&g.chains&&(A=r(A||{},g.chains));u["-chains-"]&&(A=r(A||{},u["-chains-"])),g=!A||!A.hasOwnProperty(a),L[0]=N=A&&A.constructor==="manual"?S(L):L.length==1?E(o.constructor,g):w(L,g),N._meta={bases:L,hidden:o,chains:A,parents:M,ctor:o.constructor},N.superclass=t&&t.prototype,N.extend=y,N.createSubclass=b,N.prototype=u,u.constructor=N,u.getInherited=h,u.isInstanceOf=v,u.inherited=d,u.__inherited=c,e&&(u.declaredClass=e,n.setObject(e,N));if(A)for(k in A)u[k]&&typeof A[k]=="string"&&k!=a&&(g=u[k]=x(k,L,A[k]==="after"),g.nom=k);return N}var r=n.mixin,i=Object.prototype,s=i.toString,o=new Function,u=0,a="constructor",d=e.config.isDebug?p:c;return e.safeMixin=C.safeMixin=g,e.declare=C,C})},"dojo/_base/connect":function(){define(["./kernel","../on","../topic","../aspect","./event","../mouse","./sniff","./lang","../keys"],function(e,t,n,r,i,s,o,u){function a(n,i,o,a,f){a=u.hitch(o,a);if(!n||!n.addEventListener&&!n.attachEvent)return r.after(n||e.global,i,a,!0);typeof i=="string"&&i.substring(0,2)=="on"&&(i=i.substring(2)),n||(n=e.global);if(!f)switch(i){case"keypress":i=p;break;case"mouseenter":i=s.enter;break;case"mouseleave":i=s.leave}return t(n,i,a,f)}function h(e){e.keyChar=e.charCode?String.fromCharCode(e.charCode):"",e.charOrCode=e.keyChar||e.keyCode}o.add("events-keypress-typed",function(){var e={charCode:0};try{e=document.createEvent("KeyboardEvent"),(e.initKeyboardEvent||e.initKeyEvent).call(e,"keypress",!0,!0,null,!1,!1,!1,!1,9,3)}catch(t){}return e.charCode==0&&!o("opera")});var f={106:42,111:47,186:59,187:43,188:44,189:45,190:46,191:47,192:96,219:91,220:92,221:93,222:39,229:113},l=o("mac")?"metaKey":"ctrlKey",c=function(e,t){var n=u.mixin({},e,t);return h(n),n.preventDefault=function(){e.preventDefault()},n.stopPropagation=function(){e.stopPropagation()},n},p;if(o("events-keypress-typed")){var d=function(e,t){try{return e.keyCode=t}catch(e){return 0}};p=function(e,n){var r=t(e,"keydown",function(e){var t=e.keyCode,r=t!=13&&t!=32&&(t!=27||!o("ie"))&&(t<48||t>90)&&(t<96||t>111)&&(t<186||t>192)&&(t<219||t>222)&&t!=229;if(r||e.ctrlKey){var i=r?0:t;if(e.ctrlKey){if(t==3||t==13)return n.call(e.currentTarget,e);i>95&&i<106?i-=48:!e.shiftKey&&i>=65&&i<=90?i+=32:i=f[i]||i}var s=c(e,{type:"keypress",faux:!0,charCode:i});n.call(e.currentTarget,s),o("ie")&&d(e,s.keyCode)}}),i=t(e,"keypress",function(e){var t=e.charCode;return t=t>=32?t:0,e=c(e,{charCode:t,faux:!0}),n.call(this,e)});return{remove:function(){r.remove(),i.remove()}}}}else o("opera")?p=function(e,n){return t(e,"keypress",function(e){var t=e.which;return t==3&&(t=99),t=t<32&&!e.shiftKey?0:t,e.ctrlKey&&!e.shiftKey&&t>=65&&t<=90&&(t+=32),n.call(this,c(e,{charCode:t}))})}:p=function(e,n){return t(e,"keypress",function(e){return h(e),n.call(this,e)})};var v={_keypress:p,connect:function(e,t,n,r,i){var s=arguments,o=[],u=0;o.push(typeof s[0]=="string"?null:s[u++],s[u++]);var f=s[u+1];o.push(typeof f=="string"||typeof f=="function"?s[u++]:null,s[u++]);for(var l=s.length;u-1){var o=t.split(/\s*,\s*/),u=[],a=0,f;while(f=o[a++])u.push(r(e,f,n,i,s));return u.remove=function(){for(var e=0;e=0&&(o.width=r+s),i>=0&&(o.height=i+s)}function u(e){return e.tagName.toLowerCase()=="button"||e.tagName.toLowerCase()=="input"&&(e.getAttribute("type")||"").toLowerCase()=="button"}function a(e){return i.boxModel=="border-box"||e.tagName.toLowerCase()=="table"||u(e)}var i={};i.boxModel="content-box",e("ie")&&(i.boxModel=document.compatMode=="BackCompat"?"border-box":"content-box"),i.getPadExtents=function(t,i){t=n.byId(t);var s=i||r.getComputedStyle(t),o=r.toPixelValue,u=o(t,s.paddingLeft),a=o(t,s.paddingTop),f=o(t,s.paddingRight),l=o(t,s.paddingBottom);return{l:u,t:a,r:f,b:l,w:u+f,h:a+l}};var s="none";i.getBorderExtents=function(t,i){t=n.byId(t);var o=r.toPixelValue,u=i||r.getComputedStyle(t),a=u.borderLeftStyle!=s?o(t,u.borderLeftWidth):0,f=u.borderTopStyle!=s?o(t,u.borderTopWidth):0,l=u.borderRightStyle!=s?o(t,u.borderRightWidth):0,c=u.borderBottomStyle!=s?o(t,u.borderBottomWidth):0;return{l:a,t:f,r:l,b:c,w:a+l,h:f+c}},i.getPadBorderExtents=function(t,s){t=n.byId(t);var o=s||r.getComputedStyle(t),u=i.getPadExtents(t,o),a=i.getBorderExtents(t,o);return{l:u.l+a.l,t:u.t+a.t,r:u.r+a.r,b:u.b+a.b,w:u.w+a.w,h:u.h+a.h}},i.getMarginExtents=function(t,i){t=n.byId(t);var s=i||r.getComputedStyle(t),o=r.toPixelValue,u=o(t,s.marginLeft),a=o(t,s.marginTop),f=o(t,s.marginRight),l=o(t,s.marginBottom);return{l:u,t:a,r:f,b:l,w:u+f,h:a+l}},i.getMarginBox=function(o,u){o=n.byId(o);var a=u||r.getComputedStyle(o),f=i.getMarginExtents(o,a),l=o.offsetLeft-f.l,c=o.offsetTop-f.t,h=o.parentNode,p=r.toPixelValue,d;if(e("mozilla")){var v=parseFloat(a.left),m=parseFloat(a.top);!isNaN(v)&&!isNaN(m)?(l=v,c=m):h&&h.style&&(d=r.getComputedStyle(h),d.overflow!="visible"&&(l+=d.borderLeftStyle!=s?p(o,d.borderLeftWidth):0,c+=d.borderTopStyle!=s?p(o,d.borderTopWidth):0))}else(e("opera")||e("ie")==8&&!e("quirks"))&&h&&(d=r.getComputedStyle(h),l-=d.borderLeftStyle!=s?p(o,d.borderLeftWidth):0,c-=d.borderTopStyle!=s?p(o,d.borderTopWidth):0);return{l:l,t:c,w:o.offsetWidth+f.w,h:o.offsetHeight+f.h}},i.getContentBox=function(s,o){s=n.byId(s);var u=o||r.getComputedStyle(s),a=s.clientWidth,f,l=i.getPadExtents(s,u),c=i.getBorderExtents(s,u);return a?(f=s.clientHeight,c.w=c.h=0):(a=s.offsetWidth,f=s.offsetHeight),e("opera")&&(l.l+=c.l,l.t+=c.t),{l:l.l,t:l.t,w:a-l.w-c.w,h:f-l.h-c.h}},i.setContentSize=function(t,r,s){t=n.byId(t);var u=r.w,f=r.h;if(a(t)){var l=i.getPadBorderExtents(t,s);u>=0&&(u+=l.w),f>=0&&(f+=l.h)}o(t,NaN,NaN,u,f)};var f={l:0,t:0,w:0,h:0};return i.setMarginBox=function(s,l,c){s=n.byId(s);var h=c||r.getComputedStyle(s),p=l.w,d=l.h,v=a(s)?f:i.getPadBorderExtents(s,h),m=i.getMarginExtents(s,h);if(e("webkit")&&u(s)){var g=s.style;p>=0&&!g.width&&(g.width="4px"),d>=0&&!g.height&&(g.height="4px")}p>=0&&(p=Math.max(p-v.w-m.w,0)),d>=0&&(d=Math.max(d-v.h-m.h,0)),o(s,l.l,l.t,p,d)},i.isBodyLtr=function(n){return n=n||t.doc,(t.body(n).dir||n.documentElement.dir||"ltr").toLowerCase()=="ltr"},i.docScroll=function(r){r=r||t.doc;var s=t.doc.parentWindow||t.doc.defaultView;return"pageXOffset"in s?{x:s.pageXOffset,y:s.pageYOffset}:(s=e("quirks")?t.body(r):r.documentElement)&&{x:i.fixIeBiDiScrollLeft(s.scrollLeft||0,r),y:s.scrollTop||0}},e("ie")&&(i.getIeDocumentElementOffset=function(r){r=r||t.doc;var i=r.documentElement;if(e("ie")<8){var s=i.getBoundingClientRect(),o=s.left,u=s.top;return e("ie")<7&&(o+=i.clientLeft,u+=i.clientTop),{x:o<0?0:o,y:u<0?0:u}}return{x:0,y:0}}),i.fixIeBiDiScrollLeft=function(r,s){s=s||t.doc;var o=e("ie");if(o&&!i.isBodyLtr(s)){var u=e("quirks"),a=u?t.body(s):s.documentElement,f=t.global;return o==6&&!u&&f.frameElement&&a.scrollHeight>a.clientHeight&&(r+=a.clientLeft),o<8||u?r+a.clientWidth-a.scrollWidth:-r}return r},i.position=function(r,s){r=n.byId(r);var o=t.body(r.ownerDocument),u=r.getBoundingClientRect();u={x:u.left,y:u.top,w:u.right-u.left,h:u.bottom-u.top};if(e("ie")<9){var a=i.getIeDocumentElementOffset(r.ownerDocument);u.x-=a.x+(e("quirks")?o.clientLeft+o.offsetLeft:0),u.y-=a.y+(e("quirks")?o.clientTop+o.offsetTop:0)}if(s){var f=i.docScroll(r.ownerDocument);u.x+=f.x,u.y+=f.y}return u},i.getMarginSize=function(t,s){t=n.byId(t);var o=i.getMarginExtents(t,s||r.getComputedStyle(t)),u=t.getBoundingClientRect();return{w:u.right-u.left+o.w,h:u.bottom-u.top+o.h}},i.normalizeEvent=function(t){"layerX"in t||(t.layerX=t.offsetX,t.layerY=t.offsetY);if(!e("dom-addeventlistener")){var n=t.target,r=n&&n.ownerDocument||document,s=e("quirks")?r.body:r.documentElement,o=i.getIeDocumentElementOffset(r);t.pageX=t.clientX+i.fixIeBiDiScrollLeft(s.scrollLeft||0,r)-o.x,t.pageY=t.clientY+(s.scrollTop||0)-o.y}},i})},"dojo/_base/window":function(){define(["./kernel","./lang","../sniff"],function(e,t,n){var r={global:e.global,doc:this.document||null,body:function(t){return t=t||e.doc,t.body||t.getElementsByTagName("body")[0]},setContext:function(t,n){e.global=r.global=t,e.doc=r.doc=n},withGlobal:function(t,n,i,s){var o=e.global;try{return e.global=r.global=t,r.withDoc.call(null,t.document,n,i,s)}finally{e.global=r.global=o}},withDoc:function(t,i,s,o){var u=r.doc,a=n("quirks"),f=n("ie"),l,c,h;try{return e.doc=r.doc=t,e.isQuirks=n.add("quirks",e.doc.compatMode=="BackCompat",!0,!0),n("ie")&&(h=t.parentWindow)&&h.navigator&&(l=parseFloat(h.navigator.appVersion.split("MSIE ")[1])||undefined,c=t.documentMode,c&&c!=5&&Math.floor(l)!=c&&(l=c),e.isIE=n.add("ie",l,!0,!0)),s&&typeof i=="string"&&(i=s[i]),i.apply(s,o||[])}finally{e.doc=r.doc=u,e.isQuirks=n.add("quirks",a,!0,!0),e.isIE=n.add("ie",f,!0,!0)}}};return t.mixin(e,r),r})},"dojo/dom":function(){define("dojo/dom",["./sniff","./_base/window"],function(e,t){if(e("ie")<=7)try{document.execCommand("BackgroundImageCache",!1,!0)}catch(n){}var r={};e("ie")?r.byId=function(e,n){if(typeof e!="string")return e;var r=n||t.doc,i=e&&r.getElementById(e);if(!(!i||i.attributes.id.value!=e&&i.id!=e))return i;var s=r.all[e];if(!s||s.nodeName)s=[s];var o=0;while(i=s[o++])if(i.attributes&&i.attributes.id&&i.attributes.id.value==e||i.id==e)return i}:r.byId=function(e,n){return(typeof e=="string"?(n||t.doc).getElementById(e):e)||null},r.isDescendant=function(e,t){try{e=r.byId(e),t=r.byId(t);while(e){if(e==t)return!0;e=e.parentNode}}catch(n){}return!1},e.add("css-user-select",function(e,t,n){if(!n)return!1;var r=n.style,i=["Khtml","O","ms","Moz","Webkit"],s=i.length,o="userSelect",u;do if(typeof r[o]!="undefined")return o;while(s--&&(o=i[s]+"UserSelect"));return!1});var i=e("css-user-select");return r.setSelectable=i?function(e,t){r.byId(e).style[i]=t?"":"none"}:function(e,t){e=r.byId(e);var n=e.getElementsByTagName("*"),i=n.length;if(t){e.removeAttribute("unselectable");while(i--)n[i].removeAttribute("unselectable")}else{e.setAttribute("unselectable","on");while(i--)n[i].setAttribute("unselectable","on")}},r})},"dojo/dom-style":function(){define("dojo/dom-style",["./sniff","./dom"],function(e,t){function c(t,n,r){n=n.toLowerCase();if(e("ie")){if(r=="auto"){if(n=="height")return t.offsetHeight;if(n=="width")return t.offsetWidth}if(n=="fontweight")switch(r){case 700:return"bold";case 400:default:return"normal"}}return n in f||(f[n]=l.test(n)),f[n]?i(t,r):r}var n,r={};e("webkit")?n=function(e){var t;if(e.nodeType==1){var n=e.ownerDocument.defaultView;t=n.getComputedStyle(e,null),!t&&e.style&&(e.style.display="",t=n.getComputedStyle(e,null))}return t||{}}:e("ie")&&(e("ie")<9||e("quirks"))?n=function(e){return e.nodeType==1&&e.currentStyle?e.currentStyle:{}}:n=function(e){return e.nodeType==1?e.ownerDocument.defaultView.getComputedStyle(e,null):{}},r.getComputedStyle=n;var i;e("ie")?i=function(e,t){if(!t)return 0;if(t=="medium")return 4;if(t.slice&&t.slice(-2)=="px")return parseFloat(t);var n=e.style,r=e.runtimeStyle,i=e.currentStyle,s=n.left,o=r.left;r.left=i.left;try{n.left=t,t=n.pixelLeft}catch(u){t=0}return n.left=s,r.left=o,t}:i=function(e,t){return parseFloat(t)||0},r.toPixelValue=i;var s="DXImageTransform.Microsoft.Alpha",o=function(e,t){try{return e.filters.item(s)}catch(n){return t?{}:null}},u=e("ie")<9||e("ie")<10&&e("quirks")?function(e){try{return o(e).Opacity/100}catch(t){return 1}}:function(e){return n(e).opacity},a=e("ie")<9||e("ie")<10&&e("quirks")?function(e,t){var n=t*100,r=t==1;e.style.zoom=r?"":1;if(!o(e)){if(r)return t;e.style.filter+=" progid:"+s+"(Opacity="+n+")"}else o(e,1).Opacity=n;o(e,1).Enabled=!r;if(e.tagName.toLowerCase()=="tr")for(var i=e.firstChild;i;i=i.nextSibling)i.tagName.toLowerCase()=="td"&&a(i,t);return t}:function(e,t){return e.style.opacity=t},f={left:!0,top:!0},l=/margin|padding|width|height|max|min|offset/,h=e("ie")?"styleFloat":"cssFloat",p={cssFloat:h,styleFloat:h,"float":h};return r.get=function(n,i){var s=t.byId(n),o=arguments.length,a=i=="opacity";if(o==2&&a)return u(s);i=p[i]||i;var f=r.getComputedStyle(s);return o==1?f:c(s,i,f[i]||s.style[i])},r.set=function(n,i,s){var o=t.byId(n),u=arguments.length,f=i=="opacity";i=p[i]||i;if(u==3)return f?a(o,s):o.style[i]=s;for(var l in i)r.set(n,l,i[l]);return r.getComputedStyle(o)},r})},"dojo/mouse":function(){define("dojo/mouse",["./_base/kernel","./on","./has","./dom","./_base/window"],function(e,t,n,r,i){function o(e,n){var i=function(i,s){return t(i,e,function(e){if(n)return n(e,s);if(!r.isDescendant(e.relatedTarget,i))return s.call(this,e)})};return i.bubble=function(t){return o(e,function(e,n){var r=t(e.target),i=e.relatedTarget;if(r&&r!=(i&&i.nodeType==1&&t(i)))return n.call(r,e)})},i}n.add("dom-quirks",i.doc&&i.doc.compatMode=="BackCompat"),n.add("events-mouseenter",i.doc&&"onmouseenter"in i.doc.createElement("div")),n.add("events-mousewheel",i.doc&&"onmousewheel"in i.doc);var s;n("dom-quirks")&&n("ie")||!n("dom-addeventlistener")?s={LEFT:1,MIDDLE:4,RIGHT:2,isButton:function(e,t){return e.button&t},isLeft:function(e){return e.button&1},isMiddle:function(e){return e.button&4},isRight:function(e){return e.button&2}}:s={LEFT:0,MIDDLE:1,RIGHT:2,isButton:function(e,t){return e.button==t},isLeft:function(e){return e.button==0},isMiddle:function(e){return e.button==1},isRight:function(e){return e.button==2}},e.mouseButtons=s;var u;return n("events-mousewheel")?u="mousewheel":u=function(e,n){return t(e,"DOMMouseScroll",function(e){e.wheelDelta=-e.detail,n.call(this,e)})},{_eventHandler:o,enter:o("mouseover"),leave:o("mouseout"),wheel:u,isLeft:s.isLeft,isMiddle:s.isMiddle,isRight:s.isRight}})},"dojo/_base/sniff":function(){define(["./kernel","./lang","../sniff"],function(e,t,n){return n})},"dojo/keys":function(){define("dojo/keys",["./_base/kernel","./sniff"],function(e,t){return e.keys={BACKSPACE:8,TAB:9,CLEAR:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,META:t("webkit")?91:224,PAUSE:19,CAPS_LOCK:20,ESCAPE:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT_ARROW:37,UP_ARROW:38,RIGHT_ARROW:39,DOWN_ARROW:40,INSERT:45,DELETE:46,HELP:47,LEFT_WINDOW:91,RIGHT_WINDOW:92,SELECT:93,NUMPAD_0:96,NUMPAD_1:97,NUMPAD_2:98,NUMPAD_3:99,NUMPAD_4:100,NUMPAD_5:101,NUMPAD_6:102,NUMPAD_7:103,NUMPAD_8:104,NUMPAD_9:105,NUMPAD_MULTIPLY:106,NUMPAD_PLUS:107,NUMPAD_ENTER:108,NUMPAD_MINUS:109,NUMPAD_PERIOD:110,NUMPAD_DIVIDE:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,NUM_LOCK:144,SCROLL_LOCK:145,UP_DPAD:175,DOWN_DPAD:176,LEFT_DPAD:177,RIGHT_DPAD:178,copyKey:t("mac")&&!t("air")?t("safari")?91:224:17}})},"dojo/_base/Deferred":function(){define(["./kernel","../Deferred","../promise/Promise","../errors/CancelError","../has","./lang","../when"],function(e,t,n,r,i,s,o){var u=function(){},a=Object.freeze||function(){},f=e.Deferred=function(e){function v(e){if(l)throw new Error("This deferred has already been resolved");o=e,l=!0,m()}function m(){var e;while(!e&&p){var n=p;p=p.next;if(e=n.progress==u)l=!1;var r=c?n.error:n.resolved;i("config-useDeferredInstrumentation")&&c&&t.instrumentRejected&&t.instrumentRejected(o,!!r);if(r)try{var a=r(o);if(a&&typeof a.then=="function"){a.then(s.hitch(n.deferred,"resolve"),s.hitch(n.deferred,"reject"),s.hitch(n.deferred,"progress"));continue}var f=e&&a===undefined;e&&!f&&(c=a instanceof Error),n.deferred[f&&c?"reject":"resolve"](f?o:a)}catch(h){n.deferred.reject(h)}else c?n.deferred.reject(o):n.deferred.resolve(o)}}var o,l,c,h,p,d=this.promise=new n;this.resolve=this.callback=function(e){this.fired=0,this.results=[e,null],v(e)},this.reject=this.errback=function(e){c=!0,this.fired=1,i("config-useDeferredInstrumentation")&&t.instrumentRejected&&t.instrumentRejected(e,!!p),v(e),this.results=[null,e]},this.progress=function(e){var t=p;while(t){var n=t.progress;n&&n(e),t=t.next}},this.addCallbacks=function(e,t){return this.then(e,t,u),this},d.then=this.then=function(e,t,n){var r=n==u?this:new f(d.cancel),i={resolved:e,error:t,progress:n,deferred:r};return p?h=h.next=i:p=h=i,l&&m(),r.promise};var g=this;d.cancel=this.cancel=function(){if(!l){var t=e&&e(g);l||(t instanceof Error||(t=new r(t)),t.log=!1,g.reject(t))}},a(d)};return s.extend(f,{addCallback:function(t){return this.addCallbacks(s.hitch.apply(e,arguments))},addErrback:function(t){return this.addCallbacks(null,s.hitch.apply(e,arguments))},addBoth:function(t){var n=s.hitch.apply(e,arguments);return this.addCallbacks(n,n)},fired:-1}),f.when=e.when=o,f})},"dojo/Deferred":function(){define("dojo/Deferred",["./has","./_base/lang","./errors/CancelError","./promise/Promise","./promise/instrumentation"],function(e,t,n,r,i){"use strict";var s=0,o=1,u=2,a="This deferred has already been fulfilled.",f=Object.freeze||function(){},l=function(e,t,n,r,i){t===u&&d.instrumentRejected&&e.length===0&&d.instrumentRejected(n,!1,r,i);for(var s=0;s");r.instrumentRejected=f,a=parseInt(o[0],10)||a}}}})},"dojo/promise/tracer":function(){define(["../_base/lang","./Promise","../Evented"],function(e,t,n){"use strict";function s(e){setTimeout(function(){i.apply(r,e)},0)}var r=new n,i=r.emit;return r.emit=null,t.prototype.trace=function(){var t=e._toArray(arguments);return this.then(function(e){s(["resolved",e].concat(t))},function(e){s(["rejected",e].concat(t))},function(e){s(["progress",e].concat(t))}),this},t.prototype.traceRejected=function(){var t=e._toArray(arguments);return this.otherwise(function(e){s(["rejected",e].concat(t))}),this},r})},"dojo/when":function(){define("dojo/when",["./Deferred","./promise/Promise"],function(e,t){"use strict";return function(r,i,s,o){var u=r&&typeof r.then=="function",a=u&&r instanceof t;if(!u)return i?i(r):(new e).resolve(r);if(!a){var f=new e(r.cancel);r.then(f.resolve,f.reject,f.progress),r=f.promise}return i||s||o?r.then(i,s,o):r}})},"dojo/_base/json":function(){define(["./kernel","../json"],function(dojo,json){return dojo.fromJson=function(js){return eval("("+js+")")},dojo._escapeString=json.stringify,dojo.toJsonIndentStr=" ",dojo.toJson=function(e,t){return json.stringify(e,function(e,t){if(t){var n=t.__json__||t.json;if(typeof n=="function")return n.call(t)}return t},t&&dojo.toJsonIndentStr)},dojo})},"dojo/json":function(){define("dojo/json",["./has"],function(has){"use strict";var hasJSON=typeof JSON!="undefined";has.add("json-parse",hasJSON),has.add("json-stringify",hasJSON&&JSON.stringify({a:0},function(e,t){return t||1})=='{"a":1}');if(has("json-stringify"))return JSON;var escapeString=function(e){return('"'+e.replace(/(["\\])/g,"\\$1")+'"').replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r")};return{parse:has("json-parse")?JSON.parse:function(str,strict){if(strict&&!/^([\s\[\{]*(?:"(?:\\.|[^"])+"|-?\d[\d\.]*(?:[Ee][+-]?\d+)?|null|true|false|)[\s\]\}]*(?:,|:|$))+$/.test(str))throw new SyntaxError("Invalid characters in JSON");return eval("("+str+")")},stringify:function(e,t,n){function i(e,s,o){t&&(e=t(o,e));var u,a=typeof e;if(a=="number")return isFinite(e)?e+"":"null";if(a=="boolean")return e+"";if(e===null)return"null";if(typeof e=="string")return escapeString(e);if(a=="function"||a=="undefined")return r;if(typeof e.toJSON=="function")return i(e.toJSON(o),s,o);if(e instanceof Date)return'"{FullYear}-{Month+}-{Date}T{Hours}:{Minutes}:{Seconds}Z"'.replace(/\{(\w+)(\+)?\}/g,function(t,n,r){var i=e["getUTC"+n]()+(r?1:0);return i<10?"0"+i:i});if(e.valueOf()!==e)return i(e.valueOf(),s,o);var f=n?s+n:"",l=n?" ":"",c=n?"\n":"";if(e instanceof Array){var h=e.length,p=[];for(o=0;o>=s,r[t]=s==4?17*n:n}),r.a=1,r)},i.fromArray=e.colorFromArray=function(e,t){var n=t||new i;return n._set(Number(e[0]),Number(e[1]),Number(e[2]),Number(e[3])),isNaN(n.a)&&(n.a=1),n.sanitize()},i.fromString=e.colorFromString=function(e,t){var n=i.named[e];return n&&i.fromArray(n,t)||i.fromRgb(e,t)||i.fromHex(e,t)},i})},"dojo/_base/loader":function(){define(["./kernel","../has","require","module","./json","./lang","./array"],function(dojo,has,require,thisModule,json,lang,array){1;var makeErrorToken=function(e){return{src:thisModule.id,id:e}},slashName=function(e){return e.replace(/\./g,"/")},buildDetectRe=/\/\/>>built/,dojoRequireCallbacks=[],dojoRequireModuleStack=[],dojoRequirePlugin=function(e,t,n){dojoRequireCallbacks.push(n),array.forEach(e.split(","),function(e){var n=getModule(e,t.module);dojoRequireModuleStack.push(n),injectModule(n)}),checkDojoRequirePlugin()},checkDojoRequirePlugin=function(){var e,t;for(t in modules){e=modules[t],e.noReqPluginCheck===undefined&&(e.noReqPluginCheck=/loadInit\!/.test(t)||/require\!/.test(t)?1:0);if(!e.executed&&!e.noReqPluginCheck&&e.injected==requested)return}guardCheckComplete(function(){var e=dojoRequireCallbacks;dojoRequireCallbacks=[],array.forEach(e,function(e){e(1)})})},dojoLoadInitPlugin=function(mid,require,loaded){require([mid],function(bundle){require(bundle.names,function(){for(var scopeText="",args=[],i=0;ie)break;t.splice(a,0,[e,n,r,i,[]]),o[r]=t[a],s&&(u[r]=1)},l=function(t,n){e[t]?e[t].push(n):e[t]=[n]},c=function(t){var n;for(var r in e)if(e[r].some(function(e){return e[0]<=t&&t/im,"");var t=e.match(/]*>\s*([\s\S]+)\s*<\/body>/im);t&&(e=t[1])}else e="";return e},u={},a={};return e.cache=function(e,n,r){var u;typeof e=="string"?/\//.test(e)?(u=e,r=n):u=t.toUrl(e.replace(/\./g,"/")+(n?"/"+n:"")):(u=e+"",r=n);var a=r!=undefined&&typeof r!="string"?r.value:r,f=r&&r.sanitize;return typeof a=="string"?(s[u]=a,f?o(a):a):a===null?(delete s[u],null):(u in s||i(u,!0,function(e){s[u]=e}),f?o(s[u]):s[u])},{dynamic:!0,normalize:function(e,t){var n=e.split("!"),r=n[0];return(/^\./.test(r)?t(r):r)+(n[1]?"!"+n[1]:"")},load:function(e,t,n){var r=e.split("!"),f=r.length>1,l=r[0],c=t.toUrl(r[0]),h="url:"+c,p=u,d=function(e){n(f?o(e):e)};l in s?p=s[l]:h in t.cache?p=t.cache[h]:c in s&&(p=s[c]);if(p===u)if(a[c])a[c].push(d);else{var v=a[c]=[d];i(c,!t.async,function(e){s[l]=s[c]=e;for(var t=0;t= 2.1 OR the modified BSD license.\n see: http://dojotoolkit.org/license for details\n*/\n\n","url:build/buildNotice.txt":"/*\n This is an optimized version of Dojo, built for deployment and not for\n development. To get sources and documentation, please visit:\n\n http://dojotoolkit.org\n*/\n\n","build/argv":function(){define(["require","dojo/json","dojo/has","./fs","./fileUtils","./process","./commandLineArgs","./stringify","./version","./messages","./v1xProfiles","dojo/text!./help.txt"],function(require,json,has,fs,fileUtils,process,argv,stringify,version,messages,v1xProfiles,help){eval(require.scopeify("./fileUtils"));var result={profiles:[]},cwd=process.cwd(),dojoPath=computePath(require.toUrl("dojo/package.json").match(/(.+)\/package\.json$/)[1],cwd),utilBuildscriptsPath=compactPath(catPath(dojoPath,"/../util/buildscripts")),printVersion=0,printHelp=0,checkArgs=0,illegalArgumentValue=function(e,t){messages.log("inputIllegalCommandlineArg",["switch",e,"position",t])},evalScriptArg=function(e){return e=="true"?!0:e=="false"?!1:e=="null"?null:isNaN(e)?json.parse('{"result":"'+e+'"}').result:Number(e)},readProfile=function(e,t){var n=getFilepath(t);if(!fileExists(t))return messages.log("inputFileDoesNotExist",[e,t]),0;try{var r=fs.readFileSync(t,"utf8")}catch(i){return messages.log("inputFailedReadfile",[e,t,"error",i]),0}e=="profileFile"&&(messages.log("inputProfileFileDeprecated"),e="profile");var s=function(e){var t=function(e,t){return e?e=computePath(e,t):typeof e=="undefined"&&(e=t),e};e.basePath=t(e.basePath,n),e.build&&e.build.basePath&&(e.build.basePath=t(e.build.basePath,n))},o,u;try{return r=fs.readFileSync(t,"utf8"),e=="require"?(o=new Function("var __result, require= function(config){__result=config;};"+r+"; return __result || require;"),u=o(),s(u)):e=="dojoConfig"?(o=new Function(r+"; return dojoConfig;"),u=o(),s(u)):e=="profile"&&(o=new Function("selfPath","logger","profile","dependencies",r+"; return {profile:profile, dependencies:dependencies}"),u=o(n,messages,0,0,0),u.profile?(u=u.profile,s(u)):u=v1xProfiles.processProfile(u.dependencies,dojoPath,utilBuildscriptsPath,n)),u.selfFilename=t,messages.log("pacify","processing "+e+" resource "+t),u}catch(i){return messages.log("inputFailedToEvalProfile",[e,t,"error",i]),0}},processHtmlDir=function(e){if(!fileUtils.dirExists(e))return messages.log("inputHTMLDirDoesNotExist",["directory",e]),0;var t=[];return fs.readdirSync(e).forEach(function(n){/\.html$/.test(n)&&t.push(e+"/"+n)}),t.length?v1xProfiles.processHtmlFiles(t,dojoPath,utilBuildscriptsPath):(messages.log("inputHTMLDirNoFiles",["directory",e]),0)},processHtmlFiles=function(e){var t=e.split(",").filter(function(e){return fileUtils.fileExists(e)?1:(messages.log("inputHTMLFileDoesNotExist",["filename",e]),0)});return t.length?v1xProfiles.processHtmlFiles(t,dojoPath,utilBuildscriptsPath):0},readPackageJson=function(e,t){if(!fileUtils.fileExists(e))messages.log(t,["filename",e]);else try{var n=json.parse(fs.readFileSync(e,"utf8"));return n.selfFilename=e,n}catch(r){messages.log("inputMalformedPackageJson",["filename",e])}return 0},processPackageJson=function(e){var t=catPath(e,"package.json"),n=readPackageJson(t,"inputMissingPackageJson");n&&(n.selfFilename=t,result.profiles.push({packages:[{name:n.progName||n.name,packageJson:n}]}))},readCopyrightOrBuildNotice=function(e,t){fileExists(e)||messages.log("inputFileDoesNotExist",[t,e]);try{var n=t=="copyrightFile"?"copyright":"buildNotice";result[n]=fs.readFileSync(e,"utf8")}catch(r){messages.log("inputFailedReadfile",[t,e,"error",r])}},normalizeSwitch={"-p":"profile","--profile":"profile","--profileFile":"profileFile",p:"profile",profile:"profile",profileFile:"profileFile","--package":"package","package":"package","--require":"require",require:"require","--dojoConfig":"dojoConfig",dojoConfig:"dojoConfig","--htmlDir":"htmlDir",htmlDir:"htmlDir","--htmlFiles":"htmlFiles",htmlFiles:"htmlFiles","--copyrightFile":"copyrightFile",copyrightFile:"copyrightFile","--buildNoticeFile":"buildNoticeFile",buildNoticeFile:"buildNoticeFile"};for(var arg,processVector=[],i=1,end=argv.length;i1&&e.charAt(e.length-1)=="/"&&(e=e.substring(0,e.length-1)),e},catPath=function(e,t){if(arguments.length>2){for(var n=[],r=1;r1){u+="["+d;for(p=0;p1){u+="{"+d;for(p=0;p-1}):i[e]=t.concat(),e.indexOf(".")>-1&&(o[e.substring(e,e.indexOf("."))]=!0),t.push(e)},u=fs.readFileSync(e,"utf8");u.replace(/