/*
 RequireJS text 0.24.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
 Available via the MIT or new BSD license.
 see: http://github.com/jrburke/requirejs for details
 RequireJS i18n 0.24.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
 Available via the MIT or new BSD license.
 see: http://github.com/jrburke/requirejs for details
*/
(function(){function c(a,e,f){(function(){if(typeof this.loadFirebugConsole=="function")this.loadFirebugConsole();else{this.console=this.console||{};for(var g=["assert","count","debug","dir","dirxml","error","group","groupEnd","info","profile","profileEnd","time","timeEnd","trace","warn","log"],j=0,i;i=g[j++];)console[i]||function(){var m=i+"";console[m]="log"in console?function(){var o=Array.apply({},arguments);o.unshift(m+":");console.log(o.join(" "))}:function(){};console[m]._fake=true}()}if(typeof a==
"undefined")a={_scopeName:"dojo",_scopePrefix:"",_scopePrefixArgs:"",_scopeSuffix:"",_scopeMap:{},_scopeMapRev:{}};var k=a;if(typeof e=="undefined")e={_scopeName:"dijit"};if(typeof f=="undefined")f={_scopeName:"dojox"};if(!k._scopeArgs)k._scopeArgs=[a,e,f];k.global=this;k.config={isDebug:false,debugAtAllCosts:false};if(g=typeof djConfig!="undefined"?djConfig:typeof dojoConfig!="undefined"?dojoConfig:null)for(var h in g)k.config[h]=g[h];a.locale=k.config.locale;h="$Rev: 24595 $".match(/\d+/);a.version=
{major:1,minor:6,patch:1,flag:"",revision:h?+h[0]:NaN,toString:function(){with(k.version)return major+"."+minor+"."+patch+flag+" ("+revision+")"}};typeof OpenAjax!="undefined"&&OpenAjax.hub.registerLibrary(a._scopeName,"http://dojotoolkit.org",k.version.toString());var l,n,r={};for(j in{toString:1}){l=[];break}a._extraNames=l=l||["hasOwnProperty","valueOf","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","constructor"];n=l.length;a._mixin=function(m,o){var p,s,q;for(p in o){s=o[p];
if(!(p in m)||m[p]!==s&&(!(p in r)||r[p]!==s))m[p]=s}if(n&&o)for(q=0;q<n;++q){p=l[q];s=o[p];if(!(p in m)||m[p]!==s&&(!(p in r)||r[p]!==s))m[p]=s}return m};a.mixin=function(m){m||(m={});for(var o=1,p=arguments.length;o<p;o++)k._mixin(m,arguments[o]);return m};a._getProp=function(m,o,p){p=p||k.global;for(var s=0,q;p&&(q=m[s]);s++){if(s==0&&k._scopeMap[q])q=k._scopeMap[q];p=q in p?p[q]:o?(p[q]={}):undefined}return p};a.setObject=function(m,o,p){var s=m.split(".");m=s.pop();return(p=k._getProp(s,true,
p))&&m?(p[m]=o):undefined};a.getObject=function(m,o,p){return k._getProp(m.split("."),o,p)};a.exists=function(m,o){return k.getObject(m,false,o)!==undefined};a.eval=function(m){return k.global.eval?k.global.eval(m):eval(m)};k.deprecated=k.experimental=function(){}})();return{dojo:a,dijit:e,dojox:f}}if(this.define)define("dojo/_base/_loader/bootstrap",[],function(){var a=c();a.dojo._dijit=a.dijit;a.dojo._dojox=a.dojox;return a.dojo});else{var d=c();dojo=d.dojo;dijit=d.dijit;dojox=d.dojox}})();
define("dojo/lib/backCompat",["require","dojo/_base/_loader/bootstrap"],function(c,d){var a=["_moduleHasPrefix","_loadPath","_loadUri","_loadUriAndCheck","loaded","_callLoaded","_getModuleSymbols","_loadModule","require","provide","platformRequire","requireIf","requireAfterIf","registerModulePath"],e,f;for(e=0;e<a.length;){f=a[e++];d[f]=function(m){return function(){console.warn("dojo."+m+" not available when using an AMD loader.")}}(f)}var g=function(m){var o=[],p;for(p=0;p<m.length;)o.push(m[p++]);
return o},j=function(m,o){return o?typeof o=="string"?function(){m[o]()}:function(){o.call(m)}:m};d.ready=d.addOnLoad=function(m,o){c.ready(o?j(m,o):m)};d.addOnLoad(function(){d.postLoad=d.config.afterOnLoad=true});if(a=d.config.addOnLoad)d.addOnLoad[a instanceof Array?"apply":"call"](d,a);var i=d._loaders=[],k=function(){var m=i.slice(0);for(Array.prototype.splice.apply(i,[0,i.length]);m.length;)m.shift().call()};i.unshift=function(){Array.prototype.unshift.apply(i,g(arguments));c.ready(k)};i.splice=
function(){Array.prototype.splice.apply(i,g(arguments));c.ready(k)};var h=d._unloaders=[];d.unloaded=function(){for(;h.length;)h.pop().call()};d._onto=function(m,o,p){m.push(p?j(o,p):o)};d._modulesLoaded=function(){};d.loadInit=function(m){m()};var l=function(m){return m.replace(/\./g,"/")};d.getL10nName=function(m,o,p){p=p?p.toLowerCase():d.locale;m="i18n!"+l(m);return/root/i.test(p)?m+"/nls/"+o:m+"/nls/"+p+"/"+o};d.requireLocalization=function(m,o,p){if(c.vendor!="altoviso.com")p=!p||p.toLowerCase()===
d.locale?"root":p;return c(d.getL10nName(m,o,p))};d.i18n={getLocalization:d.requireLocalization,normalizeLocale:function(m){m=m?m.toLowerCase():d.locale;if(m=="root")m="ROOT";return m}};var n=/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/,r=/^((([^\[:]+):)?([^@]+)@)?(\[([^\]]+)\]|([^\[:]*))(:([0-9]+))?$/;d._Url=function(){for(var m=arguments,o=[m[0]],p=1;p<m.length;p++)if(m[p]){var s=new d._Url(m[p]+"");o=new d._Url(o[0]+"");if(s.path==""&&!s.scheme&&!s.authority&&!s.query){if(s.fragment!=
null)o.fragment=s.fragment;s=o}else if(!s.scheme){s.scheme=o.scheme;if(!s.authority){s.authority=o.authority;if(s.path.charAt(0)!="/"){o=(o.path.substring(0,o.path.lastIndexOf("/")+1)+s.path).split("/");for(var q=0;q<o.length;q++)if(o[q]==".")if(q==o.length-1)o[q]="";else{o.splice(q,1);q--}else if(q>0&&!(q==1&&o[0]=="")&&o[q]==".."&&o[q-1]!="..")if(q==o.length-1){o.splice(q,1);o[q-1]=""}else{o.splice(q-1,2);q-=2}s.path=o.join("/")}}}o=[];s.scheme&&o.push(s.scheme,":");s.authority&&o.push("//",s.authority);
o.push(s.path);s.query&&o.push("?",s.query);s.fragment&&o.push("#",s.fragment)}this.uri=o.join("");p=this.uri.match(n);this.scheme=p[2]||(p[1]?"":null);this.authority=p[4]||(p[3]?"":null);this.path=p[5];this.query=p[7]||(p[6]?"":null);this.fragment=p[9]||(p[8]?"":null);if(this.authority!=null){p=this.authority.match(r);this.user=p[3]||null;this.password=p[4]||null;this.host=p[6]||p[7];this.port=p[9]||null}};d._Url.prototype.toString=function(){return this.uri};d.moduleUrl=function(m,o){if(!m)return null;
m=l(m)+(o?"/"+o:"");o="";var p=m.match(/(.+)(\.[^\/]*)$/);if(p){m=p[1];o=p[2]}return new d._Url(c.nameToUrl(m,o))};return d});
define("dojo/_base/_loader/hostenv_browser",["dojo/lib/backCompat"],function(c){if(typeof window!="undefined"){c.isBrowser=true;c._name="browser";(function(){var a=c;if(document&&document.getElementsByTagName)for(var e=document.getElementsByTagName("script"),f=/dojo(\.xd)?\.js(\W|$)/i,g=0;g<e.length;g++){var j=e[g].getAttribute("src");if(j){var i=j.match(f);if(i){if(!a.config.baseUrl)a.config.baseUrl=j.substring(0,i.index);if(e=e[g].getAttribute("djConfig")||e[g].getAttribute("data-dojo-config")){e=
eval("({ "+e+" })");for(var k in e)c.config[k]=e[k]}break}}}a.baseUrl=a.config.baseUrl;k=navigator;e=k.userAgent;f=k.appVersion;g=parseFloat(f);if(e.indexOf("Opera")>=0)a.isOpera=g;if(e.indexOf("AdobeAIR")>=0)a.isAIR=1;a.isKhtml=f.indexOf("Konqueror")>=0?g:0;a.isWebKit=parseFloat(e.split("WebKit/")[1])||undefined;a.isChrome=parseFloat(e.split("Chrome/")[1])||undefined;a.isMac=f.indexOf("Macintosh")>=0;if((j=Math.max(f.indexOf("WebKit"),f.indexOf("Safari"),0))&&!c.isChrome){a.isSafari=parseFloat(f.split("Version/")[1]);
if(!a.isSafari||parseFloat(f.substr(j+7))<=419.3)a.isSafari=2}if(e.indexOf("Gecko")>=0&&!a.isKhtml&&!a.isWebKit)a.isMozilla=a.isMoz=g;if(a.isMoz)a.isFF=parseFloat(e.split("Firefox/")[1]||e.split("Minefield/")[1])||undefined;if(document.all&&!a.isOpera){a.isIE=parseFloat(f.split("MSIE ")[1])||undefined;if((e=document.documentMode)&&e!=5&&Math.floor(a.isIE)!=e)a.isIE=e}if(c.isIE&&window.location.protocol==="file:")c.config.ieForceActiveXXhr=true;a.isQuirks=document.compatMode=="BackCompat";a.locale=
c.config.locale||(a.isIE?k.userLanguage:k.language).toLowerCase();a._XMLHTTP_PROGIDS=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"];a._xhrObj=function(){var p,s;if(!c.isIE||!c.config.ieForceActiveXXhr)try{p=new XMLHttpRequest}catch(q){}if(!p)for(var u=0;u<3;++u){var y=a._XMLHTTP_PROGIDS[u];try{p=new ActiveXObject(y)}catch(C){s=C}if(p){a._XMLHTTP_PROGIDS=[y];break}}if(!p)throw new Error("XMLHTTP not available: "+s);return p};a._isDocumentOk=function(p){p=p.status||0;var s=location.protocol;
return p>=200&&p<300||p==304||p==1223||!p&&(s=="file:"||s=="chrome:"||s=="chrome-extension:"||s=="app:")};var h=window.location+"";var l=(k=document.getElementsByTagName("base"))&&k.length>0;a._getText=function(p,s){var q=a._xhrObj();if(!l&&c._Url)p=(new c._Url(h,p)).toString();if(a.config.cacheBust){p+="";p+=(p.indexOf("?")==-1?"?":"&")+String(a.config.cacheBust).replace(/\W+/g,"")}q.open("GET",p,false);try{q.send(null);if(!a._isDocumentOk(q)){var u=Error("Unable to load "+p+" status:"+q.status);
u.status=q.status;u.responseText=q.responseText;throw u;}}catch(y){if(s)return null;throw y;}return q.responseText};var n=window,r=function(p,s){var q=n.attachEvent||n.addEventListener;p=n.attachEvent?p:p.substring(2);q(p,function(){s.apply(n,arguments)},false)};a._windowUnloaders=[];a.windowUnloaded=function(){for(var p=a._windowUnloaders;p.length;)p.pop()();a=null};var m=0;a.addOnWindowUnload=function(p,s){a._onto(a._windowUnloaders,p,s);if(!m){m=1;r("onunload",a.windowUnloaded)}};var o=0;a.addOnUnload=
function(p,s){a._onto(a._unloaders,p,s);if(!o){o=1;r("onbeforeunload",c.unloaded)}}})();c._initFired=false;c._loadInit=function(){if(c._scrollIntervalId){clearInterval(c._scrollIntervalId);c._scrollIntervalId=0}if(!c._initFired){c._initFired=true;!c.config.afterOnLoad&&window.detachEvent&&window.detachEvent("onload",c._loadInit);c._inFlightCount==0&&c._modulesLoaded()}};if(!c.config.afterOnLoad)if(document.addEventListener){document.addEventListener("DOMContentLoaded",c._loadInit,false);window.addEventListener("load",
c._loadInit,false)}else if(window.attachEvent){window.attachEvent("onload",c._loadInit);if(!c.config.skipIeDomLoaded&&self===self.top)c._scrollIntervalId=setInterval(function(){try{if(document.body){document.documentElement.doScroll("left");c._loadInit()}}catch(a){}},30)}if(c.isIE)try{(function(){document.namespaces.add("v","urn:schemas-microsoft-com:vml");var a=["*","group","roundrect","oval","shape","rect","imagedata","path","textpath","text"],e=0,f=1,g=document.createStyleSheet();if(c.isIE>=8){e=
1;f=a.length}for(;e<f;++e)g.addRule("v\\:"+a[e],"behavior:url(#default#VML); display:inline-block")})()}catch(d){}}(function(){var a=c.config.modulePaths;if(a)for(var e in a)c.registerModulePath(e,a[e])})();c.config.isDebug&&c.require("dojo._firebug.firebug");if(c.config.debugAtAllCosts){c.require("dojo._base._loader.loader_debug");c.require("dojo.i18n")}return c});define("dojo/lib/kernel",["dojo/_base/_loader/hostenv_browser"],function(c){return dojo=c});
define("dojo/_base/lang",["dojo/lib/kernel"],function(c){(function(){var d=Object.prototype.toString;c.isString=function(k){return typeof k=="string"||k instanceof String};c.isArray=function(k){return k&&(k instanceof Array||typeof k=="array")};c.isFunction=function(k){return d.call(k)==="[object Function]"};c.isObject=function(k){return k!==undefined&&(k===null||typeof k=="object"||c.isArray(k)||c.isFunction(k))};c.isArrayLike=function(k){return k&&k!==undefined&&!c.isString(k)&&!c.isFunction(k)&&
!(k.tagName&&k.tagName.toLowerCase()=="form")&&(c.isArray(k)||isFinite(k.length))};c.isAlien=function(k){return k&&!c.isFunction(k)&&/\{\s*\[native code\]\s*\}/.test(String(k))};c.extend=function(k){for(var h=1,l=arguments.length;h<l;h++)c._mixin(k.prototype,arguments[h]);return k};c._hitchArgs=function(k,h){var l=c._toArray(arguments,2),n=c.isString(h);return function(){var r=c._toArray(arguments),m=n?(k||c.global)[h]:h;return m&&m.apply(k||this,l.concat(r))}};c.hitch=function(k,h){if(arguments.length>
2)return c._hitchArgs.apply(c,arguments);if(!h){h=k;k=null}if(c.isString(h)){k=k||c.global;if(!k[h])throw['dojo.hitch: scope["',h,'"] is null (scope="',k,'")'].join("");return function(){return k[h].apply(k,arguments||[])}}return!k?h:function(){return h.apply(k,arguments||[])}};c.delegate=c._delegate=function(){function k(){}return function(h,l){k.prototype=h;h=new k;k.prototype=null;l&&c._mixin(h,l);return h}}();var a=function(k,h,l){return(l||[]).concat(Array.prototype.slice.call(k,h||0))},e=function(k,
h,l){l=l||[];for(h=h||0;h<k.length;h++)l.push(k[h]);return l};c._toArray=c.isIE?function(k){return(k.item?e:a).apply(this,arguments)}:a;c.partial=function(){return c.hitch.apply(c,[null].concat(c._toArray(arguments)))};var f=c._extraNames,g=f.length,j={};c.clone=function(k){if(!k||typeof k!="object"||c.isFunction(k))return k;if(k.nodeType&&"cloneNode"in k)return k.cloneNode(true);if(k instanceof Date)return new Date(k.getTime());if(k instanceof RegExp)return new RegExp(k);var h,l,n,r;if(c.isArray(k)){h=
[];l=0;for(n=k.length;l<n;++l)l in k&&h.push(c.clone(k[l]))}else h=k.constructor?new k.constructor:{};for(r in k){n=k[r];if(!(r in h)||h[r]!==n&&(!(r in j)||j[r]!==n))h[r]=c.clone(n)}if(g)for(l=0;l<g;++l){r=f[l];n=k[r];if(!(r in h)||h[r]!==n&&(!(r in j)||j[r]!==n))h[r]=n}return h};c.trim=String.prototype.trim?function(k){return k.trim()}:function(k){return k.replace(/^\s\s*/,"").replace(/\s\s*$/,"")};var i=/\{([^\}]+)\}/g;c.replace=function(k,h,l){return k.replace(l||i,c.isFunction(h)?h:function(n,
r){return c.getObject(r,false,h)})}})();return c});
define("dojo/_base/array",["dojo/lib/kernel","dojo/_base/lang"],function(c){(function(){var d=function(e,f,g){return[typeof e=="string"?e.split(""):e,f||c.global,typeof g=="string"?new Function("item","index","array",g):g]},a=function(e,f,g,j){var i=d(f,j,g);f=i[0];g=0;for(j=f.length;g<j;++g){var k=!!i[2].call(i[1],f[g],g,f);if(e^k)return k}return e};c.mixin(c,{indexOf:function(e,f,g,j){var i=1,k=e.length||0,h=0;if(j){h=k-1;i=k=-1}if(g!=undefined)h=g;if(j&&h>k||h<k)for(;h!=k;h+=i)if(e[h]==f)return h;
return-1},lastIndexOf:function(e,f,g){return c.indexOf(e,f,g,true)},forEach:function(e,f,g){if(e&&e.length){var j=d(e,g,f);e=j[0];f=0;for(g=e.length;f<g;++f)j[2].call(j[1],e[f],f,e)}},every:function(e,f,g){return a(true,e,f,g)},some:function(e,f,g){return a(false,e,f,g)},map:function(e,f,g,j){var i=d(e,g,f);e=i[0];f=j?new j:[];g=0;for(j=e.length;g<j;++g)f.push(i[2].call(i[1],e[g],g,e));return f},filter:function(e,f,g){var j=d(e,g,f);e=j[0];f=[];g=0;for(var i=e.length;g<i;++g)j[2].call(j[1],e[g],g,
e)&&f.push(e[g]);return f}})})();return c});
define("dojo/_base/declare",["dojo/lib/kernel","dojo/_base/lang","dojo/_base/array"],function(c){(function(){function d(w,A){throw new Error("declare"+(A?" "+A:"")+": "+w);}function a(w,A){for(var z=[],F=[{cls:0,refs:[]}],G={},H=1,I=w.length,J=0,N,Q,P,O,W;J<I;++J){if(N=w[J])u.call(N)!="[object Function]"&&d("mixin #"+J+" is not a callable constructor.",A);else d("mixin #"+J+" is unknown. Did you use dojo.require to pull it in?",A);Q=N._meta?N._meta.bases:[N];P=0;for(N=Q.length-1;N>=0;--N){O=Q[N].prototype;
if(!O.hasOwnProperty("declaredClass"))O.declaredClass="uniqName_"+C++;O=O.declaredClass;if(!G.hasOwnProperty(O)){G[O]={count:0,refs:[],cls:Q[N]};++H}O=G[O];if(P&&P!==O){O.refs.push(P);++P.count}P=O}++P.count;F[0].refs.push(P)}for(;F.length;){P=F.pop();z.push(P.cls);for(--H;W=P.refs,W.length==1;){P=W[0];if(!P||--P.count){P=0;break}z.push(P.cls);--H}if(P){J=0;for(I=W.length;J<I;++J){P=W[J];--P.count||F.push(P)}}}H&&d("can't build consistent linearization",A);N=w[0];z[0]=N?N._meta&&N===z[z.length-N._meta.bases.length]?
N._meta.bases.length:1:0;return z}function e(w,A,z){var F,G,H,I,J,N,Q,P=this._inherited=this._inherited||{};if(typeof w=="string"){F=w;w=A;A=z}z=0;I=w.callee;(F=F||I.nom)||d("can't deduce a name to call inherited()",this.declaredClass);J=this.constructor._meta;H=J.bases;Q=P.p;if(F!=v){if(P.c!==I){Q=0;N=H[0];J=N._meta;if(J.hidden[F]!==I){(G=J.chains)&&typeof G[F]=="string"&&d("calling chained method with inherited: "+F,this.declaredClass);do{J=N._meta;G=N.prototype;if(J&&(G[F]===I&&G.hasOwnProperty(F)||
J.hidden[F]===I))break}while(N=H[++Q]);Q=N?Q:-1}}if(N=H[++Q]){G=N.prototype;if(N._meta&&G.hasOwnProperty(F))z=G[F];else{I=q[F];do{G=N.prototype;if((z=G[F])&&(N._meta?G.hasOwnProperty(F):z!==I))break}while(N=H[++Q])}}z=N&&z||q[F]}else{if(P.c!==I){Q=0;if((J=H[0]._meta)&&J.ctor!==I){G=J.chains;if(!G||G.constructor!=="manual")d("calling chained constructor with inherited",this.declaredClass);for(;N=H[++Q];)if((J=N._meta)&&J.ctor===I)break;Q=N?Q:-1}}for(;N=H[++Q];)if(z=(J=N._meta)?J.ctor:N)break;z=N&&
z}P.c=z;P.p=Q;if(z)return A===true?z:z.apply(this,A||w)}function f(w,A){if(typeof w=="string")return this.inherited(w,A,true);return this.inherited(w,true)}function g(w){for(var A=this.constructor._meta.bases,z=0,F=A.length;z<F;++z)if(A[z]===w)return true;return this instanceof w}function j(w,A){var z,F=0,G=p._extraNames.length;for(z in A)if(z!=v&&A.hasOwnProperty(z))w[z]=A[z];for(;F<G;++F){z=p._extraNames[F];if(z!=v&&A.hasOwnProperty(z))w[z]=A[z]}}function i(w,A){var z,F,G=0,H=p._extraNames.length;
for(z in A){F=A[z];if((F!==q[z]||!(z in q))&&z!=v){if(u.call(F)=="[object Function]")F.nom=z;w[z]=F}}for(;G<H;++G){z=p._extraNames[G];F=A[z];if((F!==q[z]||!(z in q))&&z!=v){if(u.call(F)=="[object Function]")F.nom=z;w[z]=F}}return w}function k(w){i(this.prototype,w);return this}function h(w,A){return function(){var z=arguments,F=z,G=z[0],H,I;I=w.length;var J;if(!(this instanceof z.callee))return o(z);if(A&&(G&&G.preamble||this.preamble)){J=new Array(w.length);J[0]=z;for(H=0;;){if(G=z[0])if(G=G.preamble)z=
G.apply(this,z)||z;G=w[H].prototype;if(G=G.hasOwnProperty("preamble")&&G.preamble)z=G.apply(this,z)||z;if(++H==I)break;J[H]=z}}for(H=I-1;H>=0;--H){G=w[H];if(G=(I=G._meta)?I.ctor:G)G.apply(this,J?J[H]:z)}(G=this.postscript)&&G.apply(this,F)}}function l(w,A){return function(){var z=arguments,F=z,G=z[0];if(!(this instanceof z.callee))return o(z);if(A){if(G)if(G=G.preamble)F=G.apply(this,F)||F;(G=this.preamble)&&G.apply(this,F)}w&&w.apply(this,z);(G=this.postscript)&&G.apply(this,z)}}function n(w){return function(){var A=
arguments,z=0,F,G;if(!(this instanceof A.callee))return o(A);for(;F=w[z];++z)if(F=(G=F._meta)?G.ctor:F){F.apply(this,A);break}(F=this.postscript)&&F.apply(this,A)}}function r(w,A,z){return function(){var F,G,H=0,I=1;if(z){H=A.length-1;I=-1}for(;F=A[H];H+=I){G=F._meta;(F=(G?G.hidden:F.prototype)[w])&&F.apply(this,arguments)}}}function m(w){y.prototype=w.prototype;w=new y;y.prototype=null;return w}function o(w){var A=w.callee,z=m(A);A.apply(z,w);return z}var p=c,s=p._mixin,q=Object.prototype,u=q.toString,
y=new Function,C=0,v="constructor";p.declare=function(w,A,z){if(typeof w!="string"){z=A;A=w;w=""}z=z||{};var F,G,H,I,J,N,Q,P=1,O=A;if(u.call(A)=="[object Array]"){N=a(A,w);H=N[0];P=N.length-H;A=N[P]}else{N=[0];if(A)if(u.call(A)=="[object Function]"){H=A._meta;N=N.concat(H?H.bases:A)}else d("base class is not a callable constructor.",w);else A!==null&&d("unknown base class. Did you use dojo.require to pull it in?",w)}if(A)for(G=P-1;;--G){F=m(A);if(!G)break;H=N[G];(H._meta?j:s)(F,H.prototype);I=new Function;
I.superclass=A;I.prototype=F;A=F.constructor=I}else F={};i(F,z);H=z.constructor;if(H!==q.constructor){H.nom=v;F.constructor=H}for(G=P-1;G;--G)if((H=N[G]._meta)&&H.chains)Q=s(Q||{},H.chains);if(F["-chains-"])Q=s(Q||{},F["-chains-"]);H=!Q||!Q.hasOwnProperty(v);N[0]=I=Q&&Q.constructor==="manual"?n(N):N.length==1?l(z.constructor,H):h(N,H);I._meta={bases:N,hidden:z,chains:Q,parents:O,ctor:z.constructor};I.superclass=A&&A.prototype;I.extend=k;I.prototype=F;F.constructor=I;F.getInherited=f;F.inherited=e;
F.isInstanceOf=g;if(w){F.declaredClass=w;p.setObject(w,I)}if(Q)for(J in Q)if(F[J]&&typeof Q[J]=="string"&&J!=v){H=F[J]=r(J,N,Q[J]==="after");H.nom=J}return I};p.safeMixin=i})();return c.declare});
define("dojo/_base/connect",["dojo/lib/kernel","dojo/_base/lang"],function(c){c._listener={getDispatcher:function(){return function(){var d=Array.prototype,a=arguments.callee,e=a._listeners;a=(a=a.target)&&a.apply(this,arguments);var f;e=[].concat(e);for(f in e)f in d||e[f].apply(this,arguments);return a}},add:function(d,a,e){d=d||c.global;var f=d[a];if(!f||!f._listeners){var g=c._listener.getDispatcher();g.target=f;g._listeners=[];f=d[a]=g}return f._listeners.push(e)},remove:function(d,a,e){(d=(d||
c.global)[a])&&d._listeners&&e--&&delete d._listeners[e]}};c.connect=function(){var d=arguments,a=[],e=0;a.push(c.isString(d[0])?null:d[e++],d[e++]);var f=d[e+1];a.push(c.isString(f)||c.isFunction(f)?d[e++]:null,d[e++]);for(f=d.length;e<f;e++)a.push(d[e]);return c._connect.apply(this,a)};c._connect=function(d,a,e,f){var g=c._listener;e=g.add(d,a,c.hitch(e,f));return[d,a,e,g]};c.disconnect=function(d){if(d&&d[0]!==undefined){c._disconnect.apply(this,d);delete d[0]}};c._disconnect=function(d,a,e,f){f.remove(d,
a,e)};c._topics={};c.subscribe=function(d,a,e){return[d,c._listener.add(c._topics,d,c.hitch(a,e))]};c.unsubscribe=function(d){d&&c._listener.remove(c._topics,d[0],d[1])};c.publish=function(d,a){if(d=c._topics[d])d.apply(this,a||[])};c.connectPublisher=function(d,a,e){var f=function(){c.publish(d,arguments)};return e?c.connect(a,e,f):c.connect(a,f)};return c.connect});
define("dojo/_base/Deferred",["dojo/lib/kernel","dojo/_base/lang"],function(c){(function(){var d=function(){},a=Object.freeze||function(){};c.Deferred=function(e){function f(m){if(i)throw new Error("This deferred has already been resolved");j=m;i=true;g()}function g(){for(var m;!m&&l;){var o=l;l=l.next;if(m=o.progress==d)i=false;var p=k?o.error:o.resolved;if(p)try{var s=p(j);if(s&&typeof s.then==="function")s.then(c.hitch(o.deferred,"resolve"),c.hitch(o.deferred,"reject"),c.hitch(o.deferred,"progress"));
else{p=m&&s===undefined;if(m&&!p)k=s instanceof Error;o.deferred[p&&k?"reject":"resolve"](p?j:s)}}catch(q){o.deferred.reject(q)}else k?o.deferred.reject(j):o.deferred.resolve(j)}}var j,i,k,h,l,n=this.promise={};this.resolve=this.callback=function(m){this.fired=0;this.results=[m,null];f(m)};this.reject=this.errback=function(m){k=true;this.fired=1;f(m);this.results=[null,m];if(!m||m.log!==false)(c.config.deferredOnError||function(o){console.error(o)})(m)};this.progress=function(m){for(var o=l;o;){var p=
o.progress;p&&p(m);o=o.next}};this.addCallbacks=function(m,o){this.then(m,o,d);return this};this.then=n.then=function(m,o,p){var s=p==d?this:new c.Deferred(n.cancel);m={resolved:m,error:o,progress:p,deferred:s};if(l)h=h.next=m;else l=h=m;i&&g();return s.promise};var r=this;this.cancel=n.cancel=function(){if(!i){var m=e&&e(r);if(!i){m instanceof Error||(m=new Error(m));m.log=false;r.reject(m)}}};a(n)};c.extend(c.Deferred,{addCallback:function(){return this.addCallbacks(c.hitch.apply(c,arguments))},
addErrback:function(){return this.addCallbacks(null,c.hitch.apply(c,arguments))},addBoth:function(){var e=c.hitch.apply(c,arguments);return this.addCallbacks(e,e)},fired:-1})})();c.when=function(d,a,e,f){if(d&&typeof d.then==="function")return d.then(a,e,f);return a(d)};return c.Deferred});
define("dojo/_base/json",["dojo/lib/kernel"],function(c){c.fromJson=function(d){return eval("("+d+")")};c._escapeString=function(d){return('"'+d.replace(/(["\\])/g,"\\$1")+'"').replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r")};c.toJsonIndentStr="\t";c.toJson=function(d,a,e){if(d===undefined)return"undefined";var f=typeof d;if(f=="number"||f=="boolean")return d+"";if(d===null)return"null";if(c.isString(d))return c._escapeString(d);var g=
arguments.callee,j;e=e||"";var i=a?e+c.toJsonIndentStr:"";j=d.__json__||d.json;if(c.isFunction(j)){j=j.call(d);if(d!==j)return g(j,a,i)}if(d.nodeType&&d.cloneNode)throw new Error("Can't serialize DOM nodes");j=a?" ":"";var k=a?"\n":"";if(c.isArray(d))return"["+c.map(d,function(r){r=g(r,a,i);if(typeof r!="string")r="undefined";return k+i+r}).join(","+j)+k+e+"]";if(f=="function")return null;f=[];var h;for(h in d){var l,n;if(typeof h=="number")l='"'+h+'"';else if(typeof h=="string")l=c._escapeString(h);
else continue;n=g(d[h],a,i);typeof n=="string"&&f.push(k+i+l+":"+j+n)}return"{"+f.join(","+j)+k+e+"}"};return c});
define("dojo/_base/Color",["dojo/lib/kernel","dojo/_base/array","dojo/_base/lang"],function(c){(function(){c.Color=function(d){d&&this.setColor(d)};c.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:c.config.transparentColor||[255,255,255]};c.extend(c.Color,
{r:255,g:255,b:255,a:1,_set:function(d,a,e,f){this.r=d;this.g=a;this.b=e;this.a=f},setColor:function(d){if(c.isString(d))c.colorFromString(d,this);else if(c.isArray(d))c.colorFromArray(d,this);else{this._set(d.r,d.g,d.b,d.a);d instanceof c.Color||this.sanitize()}return this},sanitize:function(){return this},toRgb:function(){return[this.r,this.g,this.b]},toRgba:function(){return[this.r,this.g,this.b,this.a]},toHex:function(){return"#"+c.map(["r","g","b"],function(d){d=this[d].toString(16);return d.length<
2?"0"+d:d},this).join("")},toCss:function(d){var a=this.r+", "+this.g+", "+this.b;return(d?"rgba("+a+", "+this.a:"rgb("+a)+")"},toString:function(){return this.toCss(true)}});c.blendColors=function(d,a,e,f){var g=f||new c.Color;c.forEach(["r","g","b","a"],function(j){g[j]=d[j]+(a[j]-d[j])*e;if(j!="a")g[j]=Math.round(g[j])});return g.sanitize()};c.colorFromRgb=function(d,a){return(d=d.toLowerCase().match(/^rgba?\(([\s\.,0-9]+)\)/))&&c.colorFromArray(d[1].split(/\s*,\s*/),a)};c.colorFromHex=function(d,
a){var e=a||new c.Color,f=d.length==4?4:8,g=(1<<f)-1;d=Number("0x"+d.substr(1));if(isNaN(d))return null;c.forEach(["b","g","r"],function(j){var i=d&g;d>>=f;e[j]=f==4?17*i:i});e.a=1;return e};c.colorFromArray=function(d,a){a=a||new c.Color;a._set(Number(d[0]),Number(d[1]),Number(d[2]),Number(d[3]));if(isNaN(a.a))a.a=1;return a.sanitize()};c.colorFromString=function(d,a){var e=c.Color.named[d];return e&&c.colorFromArray(e,a)||c.colorFromRgb(d,a)||c.colorFromHex(d,a)}})();return c.Color});
define("dojo/_base/window",["dojo/lib/kernel"],function(c){c.doc=window.document||null;c.body=function(){return c.doc.body||c.doc.getElementsByTagName("body")[0]};c.setContext=function(d,a){c.global=d;c.doc=a};c.withGlobal=function(d,a,e,f){var g=c.global;try{c.global=d;return c.withDoc.call(null,d.document,a,e,f)}finally{c.global=g}};c.withDoc=function(d,a,e,f){var g=c.doc,j=c._bodyLtr,i=c.isQuirks;try{c.doc=d;delete c._bodyLtr;c.isQuirks=c.doc.compatMode=="BackCompat";if(e&&typeof a=="string")a=
e[a];return a.apply(e,f||[])}finally{c.doc=g;delete c._bodyLtr;if(j!==undefined)c._bodyLtr=j;c.isQuirks=i}};return c});
define("dojo/_base/event",["dojo/lib/kernel","dojo/_base/connect"],function(c){(function(){var d=c._event_listener={add:function(k,h,l){if(k){h=d._normalizeEventName(h);l=d._fixCallback(h,l);if(!c.isIE&&(h=="mouseenter"||h=="mouseleave")){var n=l;h=h=="mouseenter"?"mouseover":"mouseout";l=function(r){if(!c.isDescendant(r.relatedTarget,k))return n.call(this,r)}}k.addEventListener(h,l,false);return l}},remove:function(k,h,l){if(k){h=d._normalizeEventName(h);if(!c.isIE&&(h=="mouseenter"||h=="mouseleave"))h=
h=="mouseenter"?"mouseover":"mouseout";k.removeEventListener(h,l,false)}},_normalizeEventName:function(k){return k.slice(0,2)=="on"?k.slice(2):k},_fixCallback:function(k,h){return k!="keypress"?h:function(l){return h.call(this,d._fixEvent(l,this))}},_fixEvent:function(k){switch(k.type){case "keypress":d._setKeyChar(k);break}return k},_setKeyChar:function(k){k.keyChar=k.charCode>=32?String.fromCharCode(k.charCode):"";k.charOrCode=k.keyChar||k.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}};c.fixEvent=function(k,h){return d._fixEvent(k,h)};c.stopEvent=function(k){k.preventDefault();k.stopPropagation()};var a=c._listener;c._connect=function(k,h,l,n,r){r=k&&(k.nodeType||k.attachEvent||k.addEventListener)?r?2:1:0;l=[c._listener,d,a][r].add(k,h,c.hitch(l,n));return[k,h,l,r]};c._disconnect=function(k,h,l,n){[c._listener,d,a][n].remove(k,h,l)};c.keys={BACKSPACE:8,TAB:9,CLEAR:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,META:c.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:c.isMac&&!c.isAIR?c.isSafari?91:224:17};var e=c.isMac?"metaKey":"ctrlKey";c.isCopyKey=function(k){return k[e]};c.mouseButtons=c.isIE<9||c.isIE&&c.isQuirks?{LEFT:1,MIDDLE:4,RIGHT:2,isButton:function(k,h){return k.button&h},isLeft:function(k){return k.button&1},isMiddle:function(k){return k.button&4},isRight:function(k){return k.button&2}}:{LEFT:0,MIDDLE:1,RIGHT:2,isButton:function(k,h){return k.button==h},isLeft:function(k){return k.button==
0},isMiddle:function(k){return k.button==1},isRight:function(k){return k.button==2}};if(c.isIE){var f=function(k,h){try{return k.keyCode=h}catch(l){return 0}},g=c._listener,j=c._ieListenersName="_"+c._scopeName+"_listeners";if(!c.config._allow_leaks){a=g=c._ie_listener={handlers:[],add:function(k,h,l){k=k||c.global;var n=k[h];if(!n||!n[j]){var r=c._getIeDispatcher();r.target=n&&i.push(n)-1;r[j]=[];n=k[h]=r}return n[j].push(i.push(l)-1)},remove:function(k,h,l){h=(k=(k||c.global)[h])&&k[j];if(k&&h&&
l--){delete i[h[l]];delete h[l]}}};var i=g.handlers}c.mixin(d,{add:function(k,h,l){if(k){h=d._normalizeEventName(h);if(h=="onkeypress"){var n=k.onkeydown;if(!n||!n[j]||!n._stealthKeydownHandle){var r=d.add(k,"onkeydown",d._stealthKeyDown);n=k.onkeydown;n._stealthKeydownHandle=r;n._stealthKeydownRefs=1}else n._stealthKeydownRefs++}return g.add(k,h,d._fixCallback(l))}},remove:function(k,h,l){h=d._normalizeEventName(h);g.remove(k,h,l);if(h=="onkeypress"){h=k.onkeydown;if(--h._stealthKeydownRefs<=0){g.remove(k,
"onkeydown",h._stealthKeydownHandle);delete h._stealthKeydownHandle}}},_normalizeEventName:function(k){return k.slice(0,2)!="on"?"on"+k:k},_nop:function(){},_fixEvent:function(k,h){if(!k)k=(h&&(h.ownerDocument||h.document||h).parentWindow||window).event;if(!k)return k;k.target=k.srcElement;k.currentTarget=h||k.srcElement;k.layerX=k.offsetX;k.layerY=k.offsetY;h=(h=k.srcElement)&&h.ownerDocument||document;h=c.isIE<6||h.compatMode=="BackCompat"?h.body:h.documentElement;var l=c._getIeDocumentElementOffset();
k.pageX=k.clientX+c._fixIeBiDiScrollLeft(h.scrollLeft||0)-l.x;k.pageY=k.clientY+(h.scrollTop||0)-l.y;if(k.type=="mouseover")k.relatedTarget=k.fromElement;if(k.type=="mouseout")k.relatedTarget=k.toElement;if(c.isIE<9||c.isQuirks){k.stopPropagation=d._stopPropagation;k.preventDefault=d._preventDefault}return d._fixKeys(k)},_fixKeys:function(k){switch(k.type){case "keypress":var h="charCode"in k?k.charCode:k.keyCode;if(h==10){h=0;k.keyCode=13}else if(h==13||h==27)h=0;else if(h==3)h=99;k.charCode=h;d._setKeyChar(k);
break}return k},_stealthKeyDown:function(k){var h=k.currentTarget.onkeypress;if(h&&h[j]){var l=k.keyCode,n=(l!=13||c.isIE>=9&&!c.isQuirks)&&l!=32&&l!=27&&(l<48||l>90)&&(l<96||l>111)&&(l<186||l>192)&&(l<219||l>222);if(n||k.ctrlKey){n=n?0:l;if(k.ctrlKey)if(l==3||l==13)return;else if(n>95&&n<106)n-=48;else if(!k.shiftKey&&n>=65&&n<=90)n+=32;else n=d._punctMap[n]||n;l=d._synthesizeEvent(k,{type:"keypress",faux:true,charCode:n});h.call(k.currentTarget,l);if(c.isIE<9||c.isIE&&c.isQuirks)k.cancelBubble=
l.cancelBubble;k.returnValue=l.returnValue;f(k,l.keyCode)}}},_stopPropagation:function(){this.cancelBubble=true},_preventDefault:function(){this.bubbledKeyCode=this.keyCode;this.ctrlKey&&f(this,0);this.returnValue=false}});c.stopEvent=c.isIE<9||c.isQuirks?function(k){k=k||window.event;d._stopPropagation.call(k);d._preventDefault.call(k)}:c.stopEvent}d._synthesizeEvent=function(k,h){h=c.mixin({},k,h);d._setKeyChar(h);h.preventDefault=function(){k.preventDefault()};h.stopPropagation=function(){k.stopPropagation()};
return h};c.isOpera&&c.mixin(d,{_fixEvent:function(k){switch(k.type){case "keypress":var h=k.which;if(h==3)h=99;h=h<41&&!k.shiftKey?0:h;if(k.ctrlKey&&!k.shiftKey&&h>=65&&h<=90)h+=32;return d._synthesizeEvent(k,{charCode:h})}return k}});if(c.isWebKit){d._add=d.add;d._remove=d.remove;c.mixin(d,{add:function(k,h,l){if(k){var n=d._add(k,h,l);if(d._normalizeEventName(h)=="keypress")n._stealthKeyDownHandle=d._add(k,"keydown",function(r){var m=r.keyCode,o=m!=13&&m!=32&&(m<48||m>90)&&(m<96||m>111)&&(m<186||
m>192)&&(m<219||m>222);if(o||r.ctrlKey){o=o?0:m;if(r.ctrlKey)if(m==3||m==13)return;else if(o>95&&o<106)o-=48;else if(!r.shiftKey&&o>=65&&o<=90)o+=32;else o=d._punctMap[o]||o;m=d._synthesizeEvent(r,{type:"keypress",faux:true,charCode:o});l.call(r.currentTarget,m)}});return n}},remove:function(k,h,l){if(k){l._stealthKeyDownHandle&&d._remove(k,"keydown",l._stealthKeyDownHandle);d._remove(k,h,l)}},_fixEvent:function(k){switch(k.type){case "keypress":if(k.faux)return k;var h=k.charCode;h=h>=32?h:0;return d._synthesizeEvent(k,
{charCode:h,faux:true})}return k}})}})();if(c.isIE){c._ieDispatcher=function(d,a){var e=Array.prototype,f=c._ie_listener.handlers,g=d.callee,j=g[c._ieListenersName];g=(g=f[g.target])&&g.apply(a,d);j=[].concat(j);for(var i in j){var k=f[j[i]];!(i in e)&&k&&k.apply(a,d)}return g};c._getIeDispatcher=function(){return new Function(c._scopeName+"._ieDispatcher(arguments, this)")};c._event_listener._fixCallback=function(d){var a=c._event_listener._fixEvent;return function(e){return d.call(this,a(e,this))}}}return c.connect});
define("dojo/_base/html",["dojo/lib/kernel","dojo/_base/lang"],function(c){try{document.execCommand("BackgroundImageCache",false,true)}catch(d){}c.byId=c.isIE?function(a,e){if(typeof a!="string")return a;var f=e||c.doc;if((e=f.getElementById(a))&&(e.attributes.id.value==a||e.id==a))return e;else{var g=f.all[a];if(!g||g.nodeName)g=[g];for(var j=0;e=g[j++];)if(e.attributes&&e.attributes.id&&e.attributes.id.value==a||e.id==a)return e}}:function(a,e){return(typeof a=="string"?(e||c.doc).getElementById(a):
a)||null};(function(){var a=c.byId,e=null,f;c.addOnWindowUnload(function(){e=null});c._destroyElement=c.destroy=function(t){t=a(t);try{var x=t.ownerDocument;if(!e||f!=x){e=x.createElement("div");f=x}e.appendChild(t.parentNode?t.parentNode.removeChild(t):t);e.innerHTML=""}catch(D){}};c.isDescendant=function(t,x){try{t=a(t);for(x=a(x);t;){if(t==x)return true;t=t.parentNode}}catch(D){}return false};c.setSelectable=function(t,x){t=a(t);if(c.isMozilla)t.style.MozUserSelect=x?"":"none";else if(c.isKhtml||
c.isWebKit)t.style.KhtmlUserSelect=x?"auto":"none";else if(c.isIE){x=t.unselectable=x?"":"on";c.query("*",t).forEach("item.unselectable = '"+x+"'")}};var g=function(t,x){var D=x.parentNode;D&&D.insertBefore(t,x)},j=function(t,x){var D=x.parentNode;if(D)D.lastChild==x?D.appendChild(t):D.insertBefore(t,x.nextSibling)};c.place=function(t,x,D){x=a(x);if(typeof t=="string")t=/^\s*</.test(t)?c._toDom(t,x.ownerDocument):a(t);if(typeof D=="number"){var M=x.childNodes;!M.length||M.length<=D?x.appendChild(t):
g(t,M[D<0?0:D])}else switch(D){case "before":g(t,x);break;case "after":j(t,x);break;case "replace":x.parentNode.replaceChild(t,x);break;case "only":c.empty(x);x.appendChild(t);break;case "first":if(x.firstChild){g(t,x.firstChild);break}default:x.appendChild(t)}return t};c.boxModel="content-box";if(c.isIE)c.boxModel=document.compatMode=="BackCompat"?"border-box":"content-box";var i;i=c.isWebKit?function(t){var x;if(t.nodeType==1){var D=t.ownerDocument.defaultView;x=D.getComputedStyle(t,null);if(!x&&
t.style){t.style.display="";x=D.getComputedStyle(t,null)}}return x||{}}:c.isIE?function(t){return t.nodeType==1?t.currentStyle:{}}:function(t){return t.nodeType==1?t.ownerDocument.defaultView.getComputedStyle(t,null):{}};c.getComputedStyle=i;c._toPixelValue=c.isIE?function(t,x){if(!x)return 0;if(x=="medium")return 4;if(x.slice&&x.slice(-2)=="px")return parseFloat(x);with(t){t=style.left;var D=runtimeStyle.left;runtimeStyle.left=currentStyle.left;try{style.left=x;x=style.pixelLeft}catch(M){x=0}style.left=
t;runtimeStyle.left=D}return x}:function(t,x){return parseFloat(x)||0};var k=c._toPixelValue,h=function(t,x){try{return t.filters.item("DXImageTransform.Microsoft.Alpha")}catch(D){return x?{}:null}};c._getOpacity=c.isIE<9?function(t){try{return h(t).Opacity/100}catch(x){return 1}}:function(t){return i(t).opacity};c._setOpacity=c.isIE<9?function(t,x){var D=x*100,M=x==1;t.style.zoom=M?"":1;if(h(t))h(t,1).Opacity=D;else{if(M)return x;t.style.filter+=" progid:DXImageTransform.Microsoft.Alpha(Opacity="+
D+")"}h(t,1).Enabled=!M;t.nodeName.toLowerCase()=="tr"&&c.query("> td",t).forEach(function(R){c._setOpacity(R,x)});return x}:function(t,x){return t.style.opacity=x};var l={left:true,top:true},n=/margin|padding|width|height|max|min|offset/,r=function(t,x,D){x=x.toLowerCase();if(c.isIE){if(D=="auto"){if(x=="height")return t.offsetHeight;if(x=="width")return t.offsetWidth}if(x=="fontweight")switch(D){case 700:return"bold";case 400:default:return"normal"}}x in l||(l[x]=n.test(x));return l[x]?k(t,D):D},
m=c.isIE?"styleFloat":"cssFloat",o={cssFloat:m,styleFloat:m,"float":m};c.style=function(t,x,D){var M=a(t),R=arguments.length,T=x=="opacity";x=o[x]||x;if(R==3)return T?c._setOpacity(M,D):(M.style[x]=D);if(R==2&&T)return c._getOpacity(M);T=i(M);if(R==2&&typeof x!="string"){for(var $ in x)c.style(t,$,x[$]);return T}return R==1?T:r(M,x,T[x]||M.style[x])};c._getPadExtents=function(t,x){x=x||i(t);var D=k(t,x.paddingLeft),M=k(t,x.paddingTop);return{l:D,t:M,w:D+k(t,x.paddingRight),h:M+k(t,x.paddingBottom)}};
c._getBorderExtents=function(t,x){x=x||i(t);var D=x.borderLeftStyle!="none"?k(t,x.borderLeftWidth):0,M=x.borderTopStyle!="none"?k(t,x.borderTopWidth):0;return{l:D,t:M,w:D+(x.borderRightStyle!="none"?k(t,x.borderRightWidth):0),h:M+(x.borderBottomStyle!="none"?k(t,x.borderBottomWidth):0)}};c._getPadBorderExtents=function(t,x){var D=x||i(t);x=c._getPadExtents(t,D);t=c._getBorderExtents(t,D);return{l:x.l+t.l,t:x.t+t.t,w:x.w+t.w,h:x.h+t.h}};c._getMarginExtents=function(t,x){x=x||i(t);var D=k(t,x.marginLeft),
M=k(t,x.marginTop),R=k(t,x.marginRight);t=k(t,x.marginBottom);if(c.isWebKit&&x.position!="absolute")R=D;return{l:D,t:M,w:D+R,h:M+t}};c._getMarginBox=function(t,x){var D=x||i(t);x=c._getMarginExtents(t,D);var M=t.offsetLeft-x.l,R=t.offsetTop-x.t,T=t.parentNode;if(c.isMoz){var $=parseFloat(D.left);D=parseFloat(D.top);if(!isNaN($)&&!isNaN(D)){M=$;R=D}else if(T&&T.style){$=i(T);if($.overflow!="visible"){T=c._getBorderExtents(T,$);M+=T.l;R+=T.t}}}else if(c.isOpera||c.isIE>7&&!c.isQuirks)if(T){T=c._getBorderExtents(T);
M-=T.l;R-=T.t}return{l:M,t:R,w:t.offsetWidth+x.w,h:t.offsetHeight+x.h}};c._getMarginSize=function(t,x){t=a(t);x=c._getMarginExtents(t,x||i(t));t=t.getBoundingClientRect();return{w:t.right-t.left+x.w,h:t.bottom-t.top+x.h}};c._getContentBox=function(t,x){var D=x||i(t);x=c._getPadExtents(t,D);D=c._getBorderExtents(t,D);var M=t.clientWidth;if(M){t=t.clientHeight;D.w=D.h=0}else{M=t.offsetWidth;t=t.offsetHeight}if(c.isOpera){x.l+=D.l;x.t+=D.t}return{l:x.l,t:x.t,w:M-x.w-D.w,h:t-x.h-D.h}};c._getBorderBox=
function(t,x){var D=x||i(t);x=c._getPadExtents(t,D);t=c._getContentBox(t,D);return{l:t.l-x.l,t:t.t-x.t,w:t.w+x.w,h:t.h+x.h}};c._setBox=function(t,x,D,M,R,T){T=T||"px";t=t.style;if(!isNaN(x))t.left=x+T;if(!isNaN(D))t.top=D+T;if(M>=0)t.width=M+T;if(R>=0)t.height=R+T};c._isButtonTag=function(t){return t.tagName=="BUTTON"||t.tagName=="INPUT"&&(t.getAttribute("type")||"").toUpperCase()=="BUTTON"};c._usesBorderBox=function(t){var x=t.tagName;return c.boxModel=="border-box"||x=="TABLE"||c._isButtonTag(t)};
c._setContentSize=function(t,x,D,M){if(c._usesBorderBox(t)){M=c._getPadBorderExtents(t,M);if(x>=0)x+=M.w;if(D>=0)D+=M.h}c._setBox(t,NaN,NaN,x,D)};c._setMarginBox=function(t,x,D,M,R,T){var $=T||i(t);T=c._usesBorderBox(t)?p:c._getPadBorderExtents(t,$);if(c.isWebKit)if(c._isButtonTag(t)){var ha=t.style;if(M>=0&&!ha.width)ha.width="4px";if(R>=0&&!ha.height)ha.height="4px"}$=c._getMarginExtents(t,$);if(M>=0)M=Math.max(M-T.w-$.w,0);if(R>=0)R=Math.max(R-T.h-$.h,0);c._setBox(t,x,D,M,R)};var p={l:0,t:0,w:0,
h:0};c.marginBox=function(t,x){t=a(t);var D=i(t);return!x?c._getMarginBox(t,D):c._setMarginBox(t,x.l,x.t,x.w,x.h,D)};c.contentBox=function(t,x){t=a(t);var D=i(t);return!x?c._getContentBox(t,D):c._setContentSize(t,x.w,x.h,D)};c._docScroll=function(){var t=c.global;return"pageXOffset"in t?{x:t.pageXOffset,y:t.pageYOffset}:(t=c.isQuirks?c.doc.body:c.doc.documentElement,{x:c._fixIeBiDiScrollLeft(t.scrollLeft||0),y:t.scrollTop||0})};c._isBodyLtr=function(){return"_bodyLtr"in c?c._bodyLtr:(c._bodyLtr=(c.body().dir||
c.doc.documentElement.dir||"ltr").toLowerCase()=="ltr")};c._getIeDocumentElementOffset=function(){var t=c.doc.documentElement;if(c.isIE<8){var x=t.getBoundingClientRect(),D=x.left;x=x.top;if(c.isIE<7){D+=t.clientLeft;x+=t.clientTop}return{x:D<0?0:D,y:x<0?0:x}}else return{x:0,y:0}};c._fixIeBiDiScrollLeft=function(t){var x=c.isIE;if(x&&!c._isBodyLtr()){var D=c.isQuirks,M=D?c.doc.body:c.doc.documentElement;if(x==6&&!D&&c.global.frameElement&&M.scrollHeight>M.clientHeight)t+=M.clientLeft;return x<8||
D?t+M.clientWidth-M.scrollWidth:-t}return t};c._abs=c.position=function(t,x){t=a(t);var D=c.body(),M=D.parentNode;t=t.getBoundingClientRect();t={x:t.left,y:t.top,w:t.right-t.left,h:t.bottom-t.top};if(c.isIE){M=c._getIeDocumentElementOffset();t.x-=M.x+(c.isQuirks?D.clientLeft+D.offsetLeft:0);t.y-=M.y+(c.isQuirks?D.clientTop+D.offsetTop:0)}else if(c.isFF==3){D=i(M);t.x-=k(M,D.marginLeft)+k(M,D.borderLeftWidth);t.y-=k(M,D.marginTop)+k(M,D.borderTopWidth)}if(x){x=c._docScroll();t.x+=x.x;t.y+=x.y}return t};
c.coords=function(t,x){t=a(t);var D=i(t);D=c._getMarginBox(t,D);x=c.position(t,x);D.x=x.x;D.y=x.y;return D};var s={"class":"className","for":"htmlFor",tabindex:"tabIndex",readonly:"readOnly",colspan:"colSpan",frameborder:"frameBorder",rowspan:"rowSpan",valuetype:"valueType"},q={classname:"class",htmlfor:"for",tabindex:"tabIndex",readonly:"readOnly"},u={innerHTML:1,className:1,htmlFor:c.isIE,value:1},y=function(t){return q[t.toLowerCase()]||t},C=function(t,x){return(t=t.getAttributeNode&&t.getAttributeNode(x))&&
t.specified};c.hasAttr=function(t,x){var D=x.toLowerCase();return u[s[D]||x]||C(a(t),q[D]||x)};var v={},w=0,A=c._scopeName+"attrid",z={col:1,colgroup:1,table:1,tbody:1,tfoot:1,thead:1,tr:1,title:1};c.attr=function(t,x,D){t=a(t);var M=arguments.length;if(M==2&&typeof x!="string"){for(var R in x)c.attr(t,R,x[R]);return t}var T=x.toLowerCase();R=s[T]||x;var $=u[R];T=q[T]||x;if(M==3){if(R=="style"&&typeof D!="string")c.style(t,D);else if(R=="innerHTML")if(c.isIE&&t.tagName.toLowerCase()in z){c.empty(t);
t.appendChild(c._toDom(D,t.ownerDocument))}else t[R]=D;else if(c.isFunction(D)){M=c.attr(t,A);if(!M){M=w++;c.attr(t,A,M)}v[M]||(v[M]={});if($=v[M][R])c.disconnect($);else try{delete t[R]}catch(ha){}v[M][R]=c.connect(t,R,D)}else if($||typeof D=="boolean")t[R]=D;else t.setAttribute(T,D);return t}D=t[R];if($&&typeof D!="undefined")return D;if(R!="href"&&(typeof D=="boolean"||c.isFunction(D)))return D;return C(t,T)?t.getAttribute(T):null};c.removeAttr=function(t,x){a(t).removeAttribute(y(x))};c.getNodeProp=
function(t,x){t=a(t);var D=x.toLowerCase(),M=s[D]||x;if(M in t&&M!="href")return t[M];x=q[D]||x;return C(t,x)?t.getAttribute(x):null};c.create=function(t,x,D,M){var R=c.doc;if(D){D=a(D);R=D.ownerDocument}if(typeof t=="string")t=R.createElement(t);x&&c.attr(t,x);D&&c.place(t,D,M);return t};c.empty=c.isIE?function(t){t=a(t);for(var x;x=t.lastChild;)c.destroy(x)}:function(t){a(t).innerHTML=""};var F={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"]},G=/<\s*([\w\:]+)/,H={},I=0,J="__"+c._scopeName+"ToDomId";for(var N in F)if(F.hasOwnProperty(N)){var Q=F[N];Q.pre=N=="option"?'<select multiple="multiple">':"<"+Q.join("><")+">";Q.post="</"+Q.reverse().join("></")+">"}c._toDom=function(t,x){x=x||c.doc;var D=x[J];if(!D){x[J]=D=++I+"";H[D]=x.createElement("div")}t+="";var M=t.match(G),R=M?M[1].toLowerCase():"";D=H[D];if(M&&F[R]){M=
F[R];D.innerHTML=M.pre+t+M.post;for(t=M.length;t;--t)D=D.firstChild}else D.innerHTML=t;if(D.childNodes.length==1)return D.removeChild(D.firstChild);for(t=x.createDocumentFragment();x=D.firstChild;)t.appendChild(x);return t};var P="className";c.hasClass=function(t,x){return(" "+a(t)[P]+" ").indexOf(" "+x+" ")>=0};var O=/\s+/,W=[""],aa={},da=function(t){if(typeof t=="string"||t instanceof String)if(t.indexOf(" ")<0){W[0]=t;return W}else return t.split(O);return t||""};c.addClass=function(t,x){t=a(t);
x=da(x);var D=t[P],M;D=D?" "+D+" ":" ";M=D.length;for(var R=0,T=x.length,$;R<T;++R)if(($=x[R])&&D.indexOf(" "+$+" ")<0)D+=$+" ";if(M<D.length)t[P]=D.substr(1,D.length-2)};c.removeClass=function(t,x){t=a(t);var D;if(x!==undefined){x=da(x);D=" "+t[P]+" ";for(var M=0,R=x.length;M<R;++M)D=D.replace(" "+x[M]+" "," ");D=c.trim(D)}else D="";if(t[P]!=D)t[P]=D};c.replaceClass=function(t,x,D){t=a(t);aa.className=t.className;c.removeClass(aa,D);c.addClass(aa,x);if(t.className!==aa.className)t.className=aa.className};
c.toggleClass=function(t,x,D){if(D===undefined)D=!c.hasClass(t,x);c[D?"addClass":"removeClass"](t,x)}})();return c});
define("dojo/_base/NodeList",["dojo/lib/kernel","dojo/_base/lang","dojo/_base/array","dojo/_base/connect","dojo/_base/html"],function(c){(function(){var d=Array.prototype,a=d.slice,e=d.concat,f=function(m,o,p){m.sort||(m=a.call(m,0));p=p||this._NodeListCtor||c._NodeListCtor;m.constructor=p;c._mixin(m,p.prototype);m._NodeListCtor=p;return o?m._stash(o):m},g=function(m,o,p){o=[0].concat(a.call(o,0));p=p||c.global;return function(s){o[0]=s;return m.apply(p,o)}},j=function(m,o){return function(){this.forEach(g(m,
arguments,o));return this}},i=function(m,o){return function(){return this.map(g(m,arguments,o))}},k=function(m,o,p){return function(){var s=arguments,q=g(m,s,p);if(o.call(p||c.global,s))return this.map(q);this.forEach(q);return this}},h=function(m){return m.length==1&&typeof m[0]=="string"},l=function(m){var o=m.parentNode;o&&o.removeChild(m)};c.NodeList=function(){return f(Array.apply(null,arguments))};var n=c._NodeListCtor=c.NodeList,r=n.prototype;n._wrap=r._wrap=f;n._adaptAsMap=i;n._adaptAsForEach=
j;n._adaptAsFilter=function(m,o){return function(){return this.filter(g(m,arguments,o))}};n._adaptWithCondition=k;c.forEach(["slice","splice"],function(m){var o=d[m];r[m]=function(){return this._wrap(o.apply(this,arguments),m=="slice"?this:null)}});c.forEach(["indexOf","lastIndexOf","every","some"],function(m){var o=c[m];r[m]=function(){return o.apply(c,[this].concat(a.call(arguments,0)))}});c.forEach(["attr","style"],function(m){r[m]=k(c[m],h)});c.forEach(["connect","addClass","removeClass","replaceClass",
"toggleClass","empty","removeAttr"],function(m){r[m]=j(c[m])});c.extend(c.NodeList,{_normalize:function(m,o){var p=m.parse===true?true:false;if(typeof m.template=="string"){var s=m.templateFunc||c.string&&c.string.substitute;m=s?s(m.template,m):m}s=typeof m;if(s=="string"||s=="number"){m=c._toDom(m,o&&o.ownerDocument);m=m.nodeType==11?c._toArray(m.childNodes):[m]}else if(c.isArrayLike(m))c.isArray(m)||(m=c._toArray(m));else m=[m];if(p)m._runParse=true;return m},_cloneNode:function(m){return m.cloneNode(true)},
_place:function(m,o,p,s){if(!(o.nodeType!=1&&p=="only")){o=o;for(var q,u=m.length,y=u-1;y>=0;y--){var C=s?this._cloneNode(m[y]):m[y];if(m._runParse&&c.parser&&c.parser.parse){q||(q=o.ownerDocument.createElement("div"));q.appendChild(C);c.parser.parse(q);for(C=q.firstChild;q.firstChild;)q.removeChild(q.firstChild)}y==u-1?c.place(C,o,p):o.parentNode.insertBefore(C,o);o=C}}},_stash:function(m){this._parent=m;return this},end:function(){return this._parent?this._parent:new this._NodeListCtor},concat:function(){var m=
c.isArray(this)?this:a.call(this,0),o=c.map(arguments,function(p){return p&&!c.isArray(p)&&(typeof NodeList!="undefined"&&p.constructor===NodeList||p.constructor===this._NodeListCtor)?a.call(p,0):p});return this._wrap(e.apply(m,o),this)},map:function(m,o){return this._wrap(c.map(this,m,o),this)},forEach:function(m,o){c.forEach(this,m,o);return this},coords:i(c.coords),position:i(c.position),place:function(m,o){var p=c.query(m)[0];return this.forEach(function(s){c.place(s,p,o)})},orphan:function(m){return(m?
c._filterQueryResult(this,m):this).forEach(l)},adopt:function(m,o){return c.query(m).place(this[0],o)._stash(this)},query:function(m){if(!m)return this;var o=this.map(function(p){return c.query(m,p).filter(function(s){return s!==undefined})});return this._wrap(e.apply([],o),this)},filter:function(m){var o=arguments,p=this,s=0;if(typeof m=="string"){p=c._filterQueryResult(this,o[0]);if(o.length==1)return p._stash(this);s=1}return this._wrap(c.filter(p,o[s],o[s+1]),this)},addContent:function(m,o){m=
this._normalize(m,this[0]);for(var p=0,s;s=this[p];p++)this._place(m,s,o,p>0);return this},instantiate:function(m,o){var p=c.isFunction(m)?m:c.getObject(m);o=o||{};return this.forEach(function(s){new p(o,s)})},at:function(){var m=new this._NodeListCtor;c.forEach(arguments,function(o){if(o<0)o=this.length+o;this[o]&&m.push(this[o])},this);return m._stash(this)}});n.events=["blur","focus","change","click","error","keydown","keypress","keyup","load","mousedown","mouseenter","mouseleave","mousemove",
"mouseout","mouseover","mouseup","submit"];c.forEach(n.events,function(m){var o="on"+m;r[o]=function(p,s){return this.connect(o,p,s)}})})();return c.NodeList});
(function(){var c=function(a){var e=a.trim,f=a.forEach,g=a._NodeListCtor=a.NodeList,j=function(){return a.doc},i=(a.isWebKit||a.isMozilla)&&j().compatMode=="BackCompat",k=j().firstChild.children?"children":"childNodes",h=false,l=function(){return true},n=function(B){B+=">~+".indexOf(B.slice(-1))>=0?" * ":" ";for(var E=function(na,oa){return e(B.slice(na,oa))},K=[],L=-1,S=-1,V=-1,X=-1,U=-1,Y=-1,ca=-1,fa="",ea="",ja,ba=0,pa=B.length,Z=null,ga=null,qa=function(){if(ca>=0){var na=ca==ba?null:E(ca,ba);
Z[">~+".indexOf(na)<0?"tag":"oper"]=na;ca=-1}},ra=function(){if(Y>=0){Z.id=E(Y,ba).replace(/\\/g,"");Y=-1}},sa=function(){if(U>=0){Z.classes.push(E(U+1,ba).replace(/\\/g,""));U=-1}},ma=function(){ra();qa();sa()},ta=function(){ma();X>=0&&Z.pseudos.push({name:E(X+1,ba)});Z.loops=Z.pseudos.length||Z.attrs.length||Z.classes.length;Z.oquery=Z.query=E(ja,ba);Z.otag=Z.tag=Z.oper?null:Z.tag||"*";if(Z.tag)Z.tag=Z.tag.toUpperCase();if(K.length&&K[K.length-1].oper){Z.infixOper=K.pop();Z.query=Z.infixOper.query+
" "+Z.query}K.push(Z);Z=null};fa=ea,ea=B.charAt(ba),ba<pa;ba++)if(fa!="\\"){if(!Z){ja=ba;Z={query:null,pseudos:[],attrs:[],classes:[],tag:null,oper:null,id:null,getTag:function(){return h?this.otag:this.tag}};ca=ba}if(L>=0)if(ea=="]"){if(ga.attr)ga.matchFor=E(V||L+1,ba);else ga.attr=E(L+1,ba);if(L=ga.matchFor)if(L.charAt(0)=='"'||L.charAt(0)=="'")ga.matchFor=L.slice(1,-1);Z.attrs.push(ga);ga=null;L=V=-1}else{if(ea=="="){V="|~^$*".indexOf(fa)>=0?fa:"";ga.type=V+ea;ga.attr=E(L+1,ba-V.length);V=ba+1}}else if(S>=
0){if(ea==")"){if(X>=0)ga.value=E(S+1,ba);X=S=-1}}else if(ea=="#"){ma();Y=ba+1}else if(ea=="."){ma();U=ba}else if(ea==":"){ma();X=ba}else if(ea=="["){ma();L=ba;ga={}}else if(ea=="("){if(X>=0){ga={name:E(X+1,ba),value:null};Z.pseudos.push(ga)}S=ba}else ea==" "&&fa!=ea&&ta()}return K},r=function(B,E){if(!B)return E;if(!E)return B;return function(){return B.apply(window,arguments)&&E.apply(window,arguments)}},m=function(B,E){E=E||[];B&&E.push(B);return E},o=function(B){return 1==B.nodeType},p=function(B,
E){if(!B)return"";if(E=="class")return B.className||"";if(E=="for")return B.htmlFor||"";if(E=="style")return B.style.cssText||"";return(h?B.getAttribute(E):B.getAttribute(E,2))||""},s={"*=":function(B,E){return function(K){return p(K,B).indexOf(E)>=0}},"^=":function(B,E){return function(K){return p(K,B).indexOf(E)==0}},"$=":function(B,E){return function(K){K=" "+p(K,B);return K.lastIndexOf(E)==K.length-E.length}},"~=":function(B,E){var K=" "+E+" ";return function(L){return(" "+p(L,B)+" ").indexOf(K)>=
0}},"|=":function(B,E){var K=" "+E+"-";return function(L){L=" "+p(L,B);return L==E||L.indexOf(K)==0}},"=":function(B,E){return function(K){return p(K,B)==E}}},q=typeof j().firstChild.nextElementSibling=="undefined",u=!q?"nextElementSibling":"nextSibling",y=!q?"previousElementSibling":"previousSibling",C=q?o:l,v=function(B){for(;B=B[y];)if(C(B))return false;return true},w=function(B){for(;B=B[u];)if(C(B))return false;return true},A=function(B){var E=B.parentNode,K=0,L=E[k],S=B._i||-1,V=E._l||-1;if(!L)return-1;
L=L.length;if(V==L&&S>=0&&V>=0)return S;E._l=L;S=-1;for(E=E.firstElementChild||E.firstChild;E;E=E[u])if(C(E)){E._i=++K;if(B===E)S=K}return S},z=function(B){return!(A(B)%2)},F=function(B){return A(B)%2},G={checked:function(){return function(B){return!!("checked"in B?B.checked:B.selected)}},"first-child":function(){return v},"last-child":function(){return w},"only-child":function(){return function(B){if(!v(B))return false;if(!w(B))return false;return true}},empty:function(){return function(B){var E=
B.childNodes;for(B=B.childNodes.length-1;B>=0;B--){var K=E[B].nodeType;if(K===1||K==3)return false}return true}},contains:function(B,E){B=E.charAt(0);if(B=='"'||B=="'")E=E.slice(1,-1);return function(K){return K.innerHTML.indexOf(E)>=0}},not:function(B,E){B=n(E)[0];E={el:1};if(B.tag!="*")E.tag=1;if(!B.classes.length)E.classes=1;var K=I(B,E);return function(L){return!K(L)}},"nth-child":function(B,E){B=parseInt;if(E=="odd")return F;else if(E=="even")return z;if(E.indexOf("n")!=-1){E=E.split("n",2);
var K=E[0]?E[0]=="-"?-1:B(E[0]):1,L=E[1]?B(E[1]):0,S=0,V=-1;if(K>0)if(L<0)L=L%K&&K+L%K;else{if(L>0){if(L>=K)S=L-L%K;L%=K}}else if(K<0){K*=-1;if(L>0){V=L;L%=K}}if(K>0)return function(U){U=A(U);return U>=S&&(V<0||U<=V)&&U%K==L};else E=L}var X=B(E);return function(U){return A(U)==X}}},H=a.isIE<9||dojo.isIE&&dojo.isQuirks?function(B){var E=B.toLowerCase();if(E=="class")B="className";return function(K){return h?K.getAttribute(B):K[B]||K[E]}}:function(B){return function(E){return E&&E.getAttribute&&E.hasAttribute(B)}},
I=function(B,E){if(!B)return l;E=E||{};var K=null;"el"in E||(K=r(K,o));if(!("tag"in E))if(B.tag!="*")K=r(K,function(L){return L&&L.tagName==B.getTag()});"classes"in E||f(B.classes,function(L,S){var V=new RegExp("(?:^|\\s)"+L+"(?:\\s|$)");K=r(K,function(X){return V.test(X.className)});K.count=S});"pseudos"in E||f(B.pseudos,function(L){var S=L.name;if(G[S])K=r(K,G[S](S,L.value))});"attrs"in E||f(B.attrs,function(L){var S,V=L.attr;if(L.type&&s[L.type])S=s[L.type](V,L.matchFor);else if(V.length)S=H(V);
if(S)K=r(K,S)});if(!("id"in E))if(B.id)K=r(K,function(L){return!!L&&L.id==B.id});K||"default"in E||(K=l);return K},J=function(B){return function(E,K,L){for(;E=E[u];)if(!(q&&!o(E))){if((!L||ka(E,L))&&B(E))K.push(E);break}return K}},N=function(B){return function(E,K,L){for(E=E[u];E;){if(C(E)){if(L&&!ka(E,L))break;B(E)&&K.push(E)}E=E[u]}return K}},Q=function(B){B=B||l;return function(E,K,L){for(var S=0,V=E[k];E=V[S++];)if(C(E)&&(!L||ka(E,L))&&B(E,S))K.push(E);return K}},P=function(B,E){for(B=B.parentNode;B;){if(B==
E)break;B=B.parentNode}return!!B},O={},W=function(B){var E=O[B.query];if(E)return E;var K=B.infixOper;K=K?K.oper:"";var L=I(B,{el:1}),S="*"==B.tag,V=j().getElementsByClassName;if(K){V={el:1};if(S)V.tag=1;L=I(B,V);if("+"==K)E=J(L);else if("~"==K)E=N(L);else if(">"==K)E=Q(L)}else if(B.id){L=!B.loops&&S?l:I(B,{el:1,id:1});E=function(U,Y){var ca=a.byId(B.id,U.ownerDocument||U);if(ca&&L(ca))if(9==U.nodeType)return m(ca,Y);else if(P(ca,U))return m(ca,Y)}}else if(V&&/\{\s*\[native code\]\s*\}/.test(String(V))&&
B.classes.length&&!i){L=I(B,{el:1,classes:1,id:1});var X=B.classes.join(" ");E=function(U,Y,ca){Y=m(0,Y);for(var fa,ea=0,ja=U.getElementsByClassName(X);fa=ja[ea++];)L(fa,U)&&ka(fa,ca)&&Y.push(fa);return Y}}else if(!S&&!B.loops)E=function(U,Y,ca){Y=m(0,Y);for(var fa=0,ea=U.getElementsByTagName(B.getTag());U=ea[fa++];)ka(U,ca)&&Y.push(U);return Y};else{L=I(B,{el:1,tag:1,id:1});E=function(U,Y,ca){Y=m(0,Y);for(var fa,ea=0,ja=U.getElementsByTagName(B.getTag());fa=ja[ea++];)L(fa,U)&&ka(fa,ca)&&Y.push(fa);
return Y}}return O[B.query]=E},aa=function(B,E){B=m(B);for(var K,L,S=E.length,V,X,U=0;U<S;U++){X=[];K=E[U];L=B.length-1;if(L>0){V={};X.nozip=true}L=W(K);for(var Y=0;K=B[Y];Y++)L(K,X,V);if(!X.length)break;B=X}return X},da={},t={},x=function(B){var E=n(e(B));if(E.length==1){var K=W(E[0]);return function(L){if(L=K(L,new g))L.nozip=true;return L}}return function(L){return aa(L,E)}},D=navigator.userAgent;D=a.isWebKit&&D.indexOf("WebKit/")>0&&parseFloat(D.split("WebKit/")[1])>528;var M=a.isIE?"commentStrip":
"nozip",R=!!j().querySelectorAll&&(!a.isSafari||a.isSafari>3.1||D),T=/n\+\d|([^ ])?([>~+])([^ =])?/g,$=function(B,E,K,L){return K?(E?E+" ":"")+K+(L?" "+L:""):B},ha=function(B,E){B=B.replace(T,$);if(R){var K=t[B];if(K&&!E)return K}if(K=da[B])return K;K=B.charAt(0);var L=-1==B.indexOf(" ");if(B.indexOf("#")>=0&&L)E=true;if(R&&!E&&">~+".indexOf(K)==-1&&(!a.isIE||B.indexOf(":")==-1)&&!(i&&B.indexOf(".")>=0)&&B.indexOf(":contains")==-1&&B.indexOf(":checked")==-1&&B.indexOf("|=")==-1){var S=">~+".indexOf(B.charAt(B.length-
1))>=0?B+" *":B;return t[B]=function(X){try{if(!(9==X.nodeType||L))throw"";var U=X.querySelectorAll(S);U[M]=true;return U}catch(Y){return ha(B,true)(X)}}}else{var V=B.split(/\s*,\s*/);return da[B]=V.length<2?x(B):function(X){for(var U=0,Y=[],ca;ca=V[U++];)Y=Y.concat(x(ca)(X));return Y}}},ia=0,ua=a.isIE?function(B){return h?B.getAttribute("_uid")||B.setAttribute("_uid",++ia)||ia:B.uniqueID}:function(B){return B._uid||(B._uid=++ia)},ka=function(B,E){if(!E)return 1;B=ua(B);if(!E[B])return E[B]=1;return 0},
la="_zipIdx",va=function(B){if(B&&B.nozip)return g._wrap?g._wrap(B):B;var E=new g;if(!B||!B.length)return E;B[0]&&E.push(B[0]);if(B.length<2)return E;ia++;if(a.isIE&&h){var K=ia+"";B[0].setAttribute(la,K);for(var L=1,S;S=B[L];L++){B[L].getAttribute(la)!=K&&E.push(S);S.setAttribute(la,K)}}else if(a.isIE&&B.commentStrip)try{for(L=1;S=B[L];L++)o(S)&&E.push(S)}catch(V){}else{if(B[0])B[0][la]=ia;for(L=1;S=B[L];L++){B[L][la]!=ia&&E.push(S);S[la]=ia}}return E};a.query=function(B,E){g=a._NodeListCtor;if(!B)return new g;
if(B.constructor==g)return B;if(typeof B!="string")return new g(B);if(typeof E=="string"){E=a.byId(E);if(!E)return new g}E=E||j();var K=E.ownerDocument||E.documentElement;h=E.contentType&&E.contentType=="application/xml"||a.isOpera&&(E.doctype||K.toString()=="[object XMLDocument]")||!!K&&(a.isIE?K.xml:E.xmlVersion||K.xmlVersion);if((B=ha(B)(E))&&B.nozip&&!g._wrap)return B;return va(B)};a.query.pseudos=G;a._filterQueryResult=function(B,E,K){var L=new a._NodeListCtor,S=n(E);S=S.length==1&&!/[^\w#\.]/.test(E)?
I(S[0]):function(U){return dojo.query(E,K).indexOf(U)!=-1};for(var V=0,X;X=B[V];V++)S(X)&&L.push(X);return L}},d=function(){acme={trim:function(g){g=g.replace(/^\s+/,"");for(var j=g.length-1;j>=0;j--)if(/\S/.test(g.charAt(j))){g=g.substring(0,j+1);break}return g},forEach:function(g,j,i){if(g&&g.length)for(var k=0,h=g.length;k<h;++k)j.call(i||window,g[k],k,g)},byId:function(g,j){return typeof g=="string"?(j||document).getElementById(g):g},doc:document,NodeList:Array};var a=navigator,e=a.userAgent;
a=a.appVersion;var f=parseFloat(a);acme.isOpera=e.indexOf("Opera")>=0?f:undefined;acme.isKhtml=a.indexOf("Konqueror")>=0?f:undefined;acme.isWebKit=parseFloat(e.split("WebKit/")[1])||undefined;acme.isChrome=parseFloat(e.split("Chrome/")[1])||undefined;if((e=Math.max(a.indexOf("WebKit"),a.indexOf("Safari"),0))&&!acme.isChrome){acme.isSafari=parseFloat(a.split("Version/")[1]);if(!acme.isSafari||parseFloat(a.substr(e+7))<=419.3)acme.isSafari=2}if(document.all&&!acme.isOpera)acme.isIE=parseFloat(a.split("MSIE ")[1])||
undefined;Array._wrap=function(g){return g};return acme};typeof define=="function"&&define("dojo/_base/query",["dojo/lib/kernel","dojo/_base/NodeList","dojo/_base/lang","dojo/_base/window"],function(a){c(this.queryPortability||this.acme||a)});if(typeof define!="function")if(this.dojo){dojo.provide("dojo._base.query");dojo.require("dojo._base.NodeList");dojo.require("dojo._base.lang");c(this.queryPortability||this.acme||dojo)}else c(this.queryPortability||this.acme||d())})();
define("dojo/_base/xhr",["dojo/lib/kernel","dojo/_base/Deferred","dojo/_base/json","dojo/_base/lang","dojo/_base/query"],function(c){(function(){function d(q,u,y){if(y!==null){var C=q[u];if(typeof C=="string")q[u]=[C,y];else if(a.isArray(C))C.push(y);else q[u]=y}}var a=c,e=a.config;c.fieldToObject=function(q){var u=null;if(q=a.byId(q)){var y=q.name,C=(q.type||"").toLowerCase();if(y&&C&&!q.disabled)if(C=="radio"||C=="checkbox"){if(q.checked)u=q.value}else if(q.multiple){u=[];a.query("option",q).forEach(function(v){v.selected&&
u.push(v.value)})}else u=q.value}return u};c.formToObject=function(q){var u={};a.forEach(c.byId(q).elements,function(y){var C=y.name,v=(y.type||"").toLowerCase();if(C&&v&&"file|submit|image|reset|button|".indexOf(v)==-1&&!y.disabled){d(u,C,a.fieldToObject(y));if(v=="image")u[C+".x"]=u[C+".y"]=u[C].x=u[C].y=0}});return u};c.objectToQuery=function(q){var u=encodeURIComponent,y=[],C={};for(var v in q){var w=q[v];if(w!=C[v]){var A=u(v)+"=";if(a.isArray(w))for(var z=0;z<w.length;z++)y.push(A+u(w[z]));
else y.push(A+u(w))}}return y.join("&")};c.formToQuery=function(q){return a.objectToQuery(a.formToObject(q))};c.formToJson=function(q,u){return a.toJson(a.formToObject(q),u)};c.queryToObject=function(q){var u={};q=q.split("&");var y=decodeURIComponent;a.forEach(q,function(C){if(C.length){var v=C.split("=");C=y(v.shift());v=y(v.join("="));if(typeof u[C]=="string")u[C]=[u[C]];if(a.isArray(u[C]))u[C].push(v);else u[C]=v}});return u};c._blockAsync=false;var f=a._contentHandlers=c.contentHandlers={text:function(q){return q.responseText},
json:function(q){return a.fromJson(q.responseText||null)},"json-comment-filtered":function(q){c.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: {}&&\nUse djConfig.useCommentedJson=true to turn off this message.");q=q.responseText;var u=q.indexOf("/*"),y=q.lastIndexOf("*/");if(u==-1||y==-1)throw new Error("JSON was not comment filtered");
return a.fromJson(q.substring(u+2,y))},javascript:function(q){return a.eval(q.responseText)},xml:function(q){var u=q.responseXML;if(a.isIE&&(!u||!u.documentElement)){var y=function(C){return"MSXML"+C+".DOMDocument"};y=["Microsoft.XMLDOM",y(6),y(4),y(3),y(2)];a.some(y,function(C){try{var v=new ActiveXObject(C);v.async=false;v.loadXML(q.responseText);u=v}catch(w){return false}return true})}return u},"json-comment-optional":function(q){return q.responseText&&/^[^{\[]*\/\*/.test(q.responseText)?f["json-comment-filtered"](q):
f.json(q)}};c._ioSetArgs=function(q,u,y,C){var v={args:q,url:q.url},w=null;if(q.form){w=a.byId(q.form);var A=w.getAttributeNode("action");v.url=v.url||(A?A.value:null);w=a.formToObject(w)}A=[{}];w&&A.push(w);q.content&&A.push(q.content);q.preventCache&&A.push({"dojo.preventCache":(new Date).valueOf()});v.query=a.objectToQuery(a.mixin.apply(null,A));v.handleAs=q.handleAs||"text";var z=new a.Deferred(u);z.addCallbacks(y,function(I){return C(I,z)});var F=q.load;F&&a.isFunction(F)&&z.addCallback(function(I){return F.call(q,
I,v)});var G=q.error;G&&a.isFunction(G)&&z.addErrback(function(I){return G.call(q,I,v)});var H=q.handle;H&&a.isFunction(H)&&z.addBoth(function(I){return H.call(q,I,v)});if(e.ioPublish&&a.publish&&v.args.ioPublish!==false){z.addCallbacks(function(I){a.publish("/dojo/io/load",[z,I]);return I},function(I){a.publish("/dojo/io/error",[z,I]);return I});z.addBoth(function(I){a.publish("/dojo/io/done",[z,I]);return I})}z.ioArgs=v;return z};var g=function(q){q.canceled=true;var u=q.ioArgs.xhr,y=typeof u.abort;
if(y=="function"||y=="object"||y=="unknown")u.abort();q=q.ioArgs.error;if(!q){q=new Error("xhr cancelled");q.dojoType="cancel"}return q},j=function(q){q=f[q.ioArgs.handleAs](q.ioArgs.xhr);return q===undefined?null:q},i=function(q,u){u.ioArgs.args.failOk||console.error(q);return q},k=null,h=[],l=0,n=function(q){if(l<=0){l=0;if(e.ioPublish&&a.publish&&(!q||q&&q.ioArgs.args.ioPublish!==false))a.publish("/dojo/io/stop")}},r=function(){var q=(new Date).getTime();if(!a._blockAsync)for(var u=0,y;u<h.length&&
(y=h[u]);u++){var C=y.dfd,v=function(){if(!C||C.canceled||!y.validCheck(C)){h.splice(u--,1);l-=1}else if(y.ioCheck(C)){h.splice(u--,1);y.resHandle(C);l-=1}else if(C.startTime)if(C.startTime+(C.ioArgs.args.timeout||0)<q){h.splice(u--,1);var A=new Error("timeout exceeded");A.dojoType="timeout";C.errback(A);C.cancel();l-=1}};if(c.config.debugAtAllCosts)v.call(this);else try{v.call(this)}catch(w){C.errback(w)}}n(C);if(!h.length){clearInterval(k);k=null}};c._ioCancelAll=function(){try{a.forEach(h,function(u){try{u.dfd.cancel()}catch(y){}})}catch(q){}};
a.isIE&&a.addOnWindowUnload(a._ioCancelAll);a._ioNotifyStart=function(q){if(e.ioPublish&&a.publish&&q.ioArgs.args.ioPublish!==false){l||a.publish("/dojo/io/start");l+=1;a.publish("/dojo/io/send",[q])}};a._ioWatch=function(q,u,y,C){var v=q.ioArgs.args;if(v.timeout)q.startTime=(new Date).getTime();h.push({dfd:q,validCheck:u,ioCheck:y,resHandle:C});k||(k=setInterval(r,50));v.sync&&r()};var m="application/x-www-form-urlencoded",o=function(q){return q.ioArgs.xhr.readyState},p=function(q){return 4==q.ioArgs.xhr.readyState},
s=function(q){var u=q.ioArgs.xhr;if(a._isDocumentOk(u))q.callback(q);else{var y=new Error("Unable to load "+q.ioArgs.url+" status:"+u.status);y.status=u.status;y.responseText=u.responseText;q.errback(y)}};c._ioAddQueryToUrl=function(q){if(q.query.length){q.url+=(q.url.indexOf("?")==-1?"?":"&")+q.query;q.query=null}};c.xhr=function(q,u,y){var C=a._ioSetArgs(u,g,j,i),v=C.ioArgs,w=v.xhr=a._xhrObj(v.args);if(!w){C.cancel();return C}if("postData"in u)v.query=u.postData;else if("putData"in u)v.query=u.putData;
else if("rawBody"in u)v.query=u.rawBody;else if(arguments.length>2&&!y||"POST|PUT".indexOf(q.toUpperCase())==-1)a._ioAddQueryToUrl(v);w.open(q,v.url,u.sync!==true,u.user||undefined,u.password||undefined);if(u.headers)for(var A in u.headers)if(A.toLowerCase()==="content-type"&&!u.contentType)u.contentType=u.headers[A];else u.headers[A]&&w.setRequestHeader(A,u.headers[A]);w.setRequestHeader("Content-Type",u.contentType||m);if(!u.headers||!("X-Requested-With"in u.headers))w.setRequestHeader("X-Requested-With",
"XMLHttpRequest");a._ioNotifyStart(C);if(c.config.debugAtAllCosts)w.send(v.query);else try{w.send(v.query)}catch(z){v.error=z;C.cancel()}a._ioWatch(C,o,p,s);return C};c.xhrGet=function(q){return a.xhr("GET",q)};c.rawXhrPost=c.xhrPost=function(q){return a.xhr("POST",q,true)};c.rawXhrPut=c.xhrPut=function(q){return a.xhr("PUT",q,true)};c.xhrDelete=function(q){return a.xhr("DELETE",q)}})();return c.xhr});
define("dojo/_base/fx",["dojo/lib/kernel","dojo/_base/Color","dojo/_base/connect","dojo/_base/lang","dojo/_base/html"],function(c){(function(){var d=c._mixin;c._Line=function(i,k){this.start=i;this.end=k};c._Line.prototype.getValue=function(i){return(this.end-this.start)*i+this.start};c.Animation=function(i){d(this,i);if(c.isArray(this.curve))this.curve=new c._Line(this.curve[0],this.curve[1])};c._Animation=c.Animation;c.extend(c.Animation,{duration:350,repeat:0,rate:20,_percent:0,_startRepeatCount:0,
_getStep:function(){var i=this._percent,k=this.easing;return k?k(i):i},_fire:function(i,k){k=k||[];if(this[i])if(c.config.debugAtAllCosts)this[i].apply(this,k);else try{this[i].apply(this,k)}catch(h){console.error("exception in animation handler for:",i);console.error(h)}return this},play:function(i,k){var h=this;h._delayTimer&&h._clearTimer();if(k){h._stopTimer();h._active=h._paused=false;h._percent=0}else if(h._active&&!h._paused)return h;h._fire("beforeBegin",[h.node]);i=i||h.delay;var l=c.hitch(h,
"_play",k);if(i>0){h._delayTimer=setTimeout(l,i);return h}l();return h},_play:function(){var i=this;i._delayTimer&&i._clearTimer();i._startTime=(new Date).valueOf();if(i._paused)i._startTime-=i.duration*i._percent;i._active=true;i._paused=false;var k=i.curve.getValue(i._getStep());if(!i._percent){if(!i._startRepeatCount)i._startRepeatCount=i.repeat;i._fire("onBegin",[k])}i._fire("onPlay",[k]);i._cycle();return i},pause:function(){var i=this;i._delayTimer&&i._clearTimer();i._stopTimer();if(!i._active)return i;
i._paused=true;i._fire("onPause",[i.curve.getValue(i._getStep())]);return i},gotoPercent:function(i,k){var h=this;h._stopTimer();h._active=h._paused=true;h._percent=i;k&&h.play();return h},stop:function(i){var k=this;k._delayTimer&&k._clearTimer();if(!k._timer)return k;k._stopTimer();if(i)k._percent=1;k._fire("onStop",[k.curve.getValue(k._getStep())]);k._active=k._paused=false;return k},status:function(){if(this._active)return this._paused?"paused":"playing";return"stopped"},_cycle:function(){var i=
this;if(i._active){var k=((new Date).valueOf()-i._startTime)/i.duration;if(k>=1)k=1;i._percent=k;if(i.easing)k=i.easing(k);i._fire("onAnimate",[i.curve.getValue(k)]);if(i._percent<1)i._startTimer();else{i._active=false;if(i.repeat>0){i.repeat--;i.play(null,true)}else if(i.repeat==-1)i.play(null,true);else if(i._startRepeatCount){i.repeat=i._startRepeatCount;i._startRepeatCount=0}i._percent=0;i._fire("onEnd",[i.node]);!i.repeat&&i._stopTimer()}}return i},_clearTimer:function(){clearTimeout(this._delayTimer);
delete this._delayTimer}});var a=0,e=null,f={run:function(){}};c.extend(c.Animation,{_startTimer:function(){if(!this._timer){this._timer=c.connect(f,"run",this,"_cycle");a++}e||(e=setInterval(c.hitch(f,"run"),this.rate))},_stopTimer:function(){if(this._timer){c.disconnect(this._timer);this._timer=null;a--}if(a<=0){clearInterval(e);e=null;a=0}}});var g=c.isIE?function(i){var k=i.style;if(!k.width.length&&c.style(i,"width")=="auto")k.width="auto"}:function(){};c._fade=function(i){i.node=c.byId(i.node);
var k=d({properties:{}},i);i=k.properties.opacity={};i.start=!("start"in k)?function(){return+c.style(k.node,"opacity")||0}:k.start;i.end=k.end;i=c.animateProperty(k);c.connect(i,"beforeBegin",c.partial(g,k.node));return i};c.fadeIn=function(i){return c._fade(d({end:1},i))};c.fadeOut=function(i){return c._fade(d({end:0},i))};c._defaultEasing=function(i){return 0.5+Math.sin((i+1.5)*Math.PI)/2};var j=function(i){this._properties=i;for(var k in i){var h=i[k];if(h.start instanceof c.Color)h.tempColor=
new c.Color}};j.prototype.getValue=function(i){var k={};for(var h in this._properties){var l=this._properties[h],n=l.start;if(n instanceof c.Color)k[h]=c.blendColors(n,l.end,i,l.tempColor).toCss();else c.isArray(n)||(k[h]=(l.end-n)*i+n+(h!="opacity"?l.units||"px":0))}return k};c.animateProperty=function(i){var k=i.node=c.byId(i.node);if(!i.easing)i.easing=c._defaultEasing;i=new c.Animation(i);c.connect(i,"beforeBegin",i,function(){var h={};for(var l in this.properties){if(l=="width"||l=="height")this.node.display=
"block";var n=this.properties[l];if(c.isFunction(n))n=n(k);n=h[l]=d({},c.isObject(n)?n:{end:n});if(c.isFunction(n.start))n.start=n.start(k);if(c.isFunction(n.end))n.end=n.end(k);var r=l.toLowerCase().indexOf("color")>=0,m=function(o,p){var s={height:o.offsetHeight,width:o.offsetWidth}[p];if(s!==undefined)return s;s=c.style(o,p);return p=="opacity"?+s:r?s:parseFloat(s)};if("end"in n){if(!("start"in n))n.start=m(k,l)}else n.end=m(k,l);if(r){n.start=new c.Color(n.start);n.end=new c.Color(n.end)}else n.start=
l=="opacity"?+n.start:parseFloat(n.start)}this.curve=new j(h)});c.connect(i,"onAnimate",c.hitch(c,"style",i.node));return i};c.anim=function(i,k,h,l,n,r){return c.animateProperty({node:i,duration:h||c.Animation.prototype.duration,properties:k,easing:l,onEnd:n}).play(r||0)}})();return c.animateProperty});
define("dojo",["dojo/lib/kernel","dojo/_base/lang","dojo/_base/array","dojo/_base/declare","dojo/_base/connect","dojo/_base/Deferred","dojo/_base/json","dojo/_base/Color","dojo/_base/window","dojo/_base/event","dojo/_base/html","dojo/_base/NodeList","dojo/_base/query","dojo/_base/xhr","dojo/_base/fx"],function(c){return c});
define("orion/serviceregistry",["dojo"],function(c){function d(j,i,k){this.serviceId=j;this.name=i;this.properties=k}function a(j,i,k){this.serviceId=j;this.serviceReference=i;this.internalRegistry=k}function e(j,i,k){this.serviceId=j;this.implementation=i;this.internalRegistry=k;var h;for(h in i)if(typeof i[h]==="function")this[h]=function(l){return function(){if(k.isRegistered(j)){var n=new c.Deferred;try{var r=i[l].apply(i,Array.prototype.slice.call(arguments));c.when(r,c.hitch(n,n.resolve),c.hitch(n,
n.reject),c.hitch(n,n.progress))}catch(m){n.reject(m)}return n}throw new Error("Service was unregistered");}}(h)}function f(){this._namedlisteners={}}function g(){this._entries=[];this._namedReferences={};this._serviceEventTarget=new f;var j=this;this.internalRegistry={isRegistered:function(i){return j._entries[i]?true:false},unregisterService:function(i){var k=j._entries[i];if(k){for(var h=k.reference,l=j._namedReferences[h.getName()],n=0;n<l.length;n++)if(l[n]===h){if(l.length===1)delete j._namedReferences[h.getName()];
else l.splice(n,1);break}j._entries[i]=null;j._serviceEventTarget.dispatchEvent("serviceRemoved",h,k.service)}},dispatchEvent:function(i,k){var h=j._entries[i];h&&h.eventTarget.dispatchEvent.apply(h.eventTarget,[k].concat(Array.prototype.slice.call(arguments,2)))},addEventListener:function(i,k,h){(i=j._entries[i])&&i.eventTarget.addEventListener(k,h)},removeEventListener:function(i,k,h){(i=j._entries[i])&&i.eventTarget.removeEventListener(k,h)}}}d.prototype={getServiceId:function(){return this.serviceId},
getName:function(){return this.name},getPropertyNames:function(){var j=[],i;for(i in this.properties)this.properties.hasOwnProperty(i)&&j.push(i);return j},getProperty:function(j){return this.properties[j]}};d.prototype.constructor=d;a.prototype={unregister:function(){this.internalRegistry.unregisterService(this.serviceId)},dispatchEvent:function(j){this.internalRegistry.dispatchEvent.apply(this.internalRegistry,[this.serviceId,j].concat(Array.prototype.slice.call(arguments,1)))},getServiceReference:function(){return this.serviceReference}};
a.prototype.constructor=a;e.prototype={addEventListener:function(j,i){this.internalRegistry.addEventListener(this.serviceId,j,i)},removeEventListener:function(j,i){this.internalRegistry.removeEventListener(this.serviceId,j,i)}};e.prototype.constructor=e;f.prototype={dispatchEvent:function(j){var i=this._namedlisteners[j];if(i)for(var k=0;k<i.length;k++)try{var h=Array.prototype.slice.call(arguments,1);i[k].apply(null,h)}catch(l){console.log(l)}},addEventListener:function(j,i){this._namedlisteners[j]=
this._namedlisteners[j]||[];this._namedlisteners[j].push(i)},removeEventListener:function(j,i){var k=this._namedlisteners[j];if(k)for(var h=0;h<k.length;h++)if(k[h]===i){if(k.length===1)delete this._namedlisteners[j];else k.splice(h,1);break}}};f.prototype.constructor=f;g.prototype={getService:function(j,i){var k,h=new c.Deferred;if(typeof j==="string"){if(this._namedReferences[j])for(var l=0;l<this._namedReferences[j].length;l++)if(k=this._entries[this._namedReferences[j][l].getServiceId()].service)break}else k=
this._entries[j.getServiceId()].service;if(k)h.resolve(k);else if(i===0)h.reject(new Error("timeout: getService"));else{var n=this,r=function(m,o){if(j===m||j===m.getName()){h.resolve(o);n._serviceEventTarget.removeEventListener("serviceAdded",r)}};this._serviceEventTarget.addEventListener("serviceAdded",r)}return h.promise},getServiceReferences:function(j){if(j)return this._namedReferences[j]?this._namedReferences[j]:[];j=[];for(var i=0;i<this._entries.length;i++)this._entries[i]&&j.push(this._entries[i].reference);
return j},registerService:function(j,i,k){var h=this._entries.length;k=new d(h,j,k);i=new e(h,i,this.internalRegistry);this._namedReferences[j]=this._namedReferences[j]||[];this._namedReferences[j].push(k);this._entries.push({reference:k,service:i,eventTarget:new f});this._serviceEventTarget.dispatchEvent("serviceAdded",k,i);return new a(h,k,this.internalRegistry)},addEventListener:function(j,i){this._serviceEventTarget.addEventListener(j,i)},removeEventListener:function(j,i){this._serviceEventTarget.removeEventListener(j,
i)}};g.prototype.constructor=g;return{ServiceReference:d,ServiceRegistration:a,Service:e,EventTarget:f,ServiceRegistry:g}});define("dijit",["dojo"],function(c){return dijit=c._dijit||{}});
define("dojo/hash",["dojo"],function(c){(function(){function d(n,r){r=n.indexOf(r);return r>=0?n.substring(r+1):""}function a(){return d(location.href,"#")}function e(){c.publish("/dojo/hashchange",[a()])}function f(){if(a()!==i){i=a();e()}}function g(n){if(k)if(k.isTransitioning())setTimeout(c.hitch(null,g,n),l);else{var r=k.iframe.location.href,m=r.indexOf("?");k.iframe.location.replace(r.substring(0,m)+"?"+n)}else{location.replace("#"+n);!h&&f()}}function j(){function n(){i=a();o=u?i:d(y.href,
"?");p=false;s=null}var r=document.createElement("iframe"),m=c.config.dojoBlankHtmlUrl||c.moduleUrl("dojo","resources/blank.html");c.config.useXDomain&&!c.config.dojoBlankHtmlUrl&&console.warn("dojo.hash: When using cross-domain Dojo builds, please save dojo/resources/blank.html to your domain and set djConfig.dojoBlankHtmlUrl to the path on your domain to blank.html");r.id="dojo-hash-iframe";r.src=m+"?"+a();r.style.display="none";document.body.appendChild(r);this.iframe=c.global["dojo-hash-iframe"];
var o,p,s,q,u,y=this.iframe.location;this.isTransitioning=function(){return p};this.pollLocation=function(){if(!u)try{var C=d(y.href,"?");if(document.title!=q)q=this.iframe.document.title=document.title}catch(v){u=true;console.error("dojo.hash: Error adding history entry. Server unreachable.")}var w=a();if(p&&i===w)if(u||C===s){n();e()}else{setTimeout(c.hitch(this,this.pollLocation),0);return}else if(!(i===w&&(u||o===C)))if(i!==w){i=w;p=true;s=w;r.src=m+"?"+s;u=false;setTimeout(c.hitch(this,this.pollLocation),
0);return}else if(!u){location.href="#"+y.search.substring(1);n();e()}setTimeout(c.hitch(this,this.pollLocation),l)};n();setTimeout(c.hitch(this,this.pollLocation),l)}c.hash=function(n,r){if(!arguments.length)return a();if(n.charAt(0)=="#")n=n.substring(1);if(r)g(n);else location.href="#"+n;return n};var i,k,h,l=c.config.hashPollFrequency||100;c.addOnLoad(function(){if("onhashchange"in c.global&&(!c.isIE||c.isIE>=8&&document.compatMode!="BackCompat"))h=c.connect(c.global,"onhashchange",e);else if(document.addEventListener){i=
a();setInterval(f,l)}else if(document.attachEvent)k=new j})})();return c.hash});
(function(){var c=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],d=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,a=/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,e=[];define("text",["require","exports","module"],function(){var f,g,j;if(typeof window!=="undefined"&&window.navigator&&window.document)g=function(i,k){var h=f.createXhr();h.open("GET",i,true);h.onreadystatechange=function(){h.readyState===4&&k(h.responseText)};h.send(null)};else if(typeof process!=="undefined"&&process.versions&&
process.versions.node){j=require.nodeRequire("fs");g=function(i,k){k(j.readFileSync(i,"utf8"))}}else if(typeof Packages!=="undefined")g=function(i,k){var h=new java.io.File(i);i=java.lang.System.getProperty("line.separator");h=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(h),"utf-8"));var l,n,r="";try{l=new java.lang.StringBuffer;if((n=h.readLine())&&n.length()&&n.charAt(0)===65279)n=n.substring(1);for(l.append(n);(n=h.readLine())!==null;){l.append(i);l.append(n)}r=
String(l.toString())}finally{h.close()}k(r)};return f={version:"0.24.0",strip:function(i){if(i){i=i.replace(d,"");var k=i.match(a);if(k)i=k[1]}else i="";return i},jsEscape:function(i){return i.replace(/(['\\])/g,"\\$1").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r")},createXhr:function(){var i,k,h;if(typeof XMLHttpRequest!=="undefined")return new XMLHttpRequest;else for(k=0;k<3;k++){h=c[k];try{i=new ActiveXObject(h)}catch(l){}if(i){c=
[h];break}}if(!i)throw new Error("require.getXhr(): XMLHttpRequest not available");return i},get:g,load:function(i,k,h,l){var n=false,r=i.indexOf("."),m=i.substring(0,r),o=i.substring(r+1,i.length);r=o.indexOf("!");if(r!==-1){n=o.substring(r+1,o.length);n=n==="strip";o=o.substring(0,r)}k=k.nameToUrl(m,"."+o);f.get(k,function(p){p=n?f.strip(p):p;if(l.isBuild&&l.inlineText)e[i]=p;h(p)})},write:function(i,k,h){if(k in e){var l=f.jsEscape(e[k]);h("define('"+i+"!"+k+"', function () { return '"+l+"';});\n")}}}})})();
define("text!dijit/form/templates/ValidationTextBox.html",function(){return'<div class="dijit dijitReset dijitInlineTable dijitLeft"\n\tid="widget_${id}" role="presentation"\n\t><div class=\'dijitReset dijitValidationContainer\'\n\t\t><input class="dijitReset dijitInputField dijitValidationIcon dijitValidationInner" value="&#935; " type="text" tabIndex="-1" readonly="readonly" role="presentation"\n\t/></div\n\t><div class="dijitReset dijitInputField dijitInputContainer"\n\t\t><input class="dijitReset dijitInputInner" dojoAttachPoint=\'textbox,focusNode\' autocomplete="off"\n\t\t\t${!nameAttrSetting} type=\'${type}\'\n\t/></div\n></div>'});
define("dojo/i18n",["require","dojo"],function(c,d){d.getObject("i18n",true,d);d.i18n.getLocalization=d.i18n.getLocalization||function(a,e,f){f=d.i18n.normalizeLocale(f);var g=f.split("-"),j=[a,"nls",e].join(".");if(typeof d.global.require!=="undefined"){var i=c("i18n!"+[a.replace(/\./g,"/"),"nls",e].join("/"));(d._loadedModules[j]=d._loadedModules[j]||{})[g.join("_")]=i.root||i}if(j=d._loadedModules[j]){var k;for(i=g.length;i>0;i--){var h=g.slice(0,i).join("_");if(j[h]){k=j[h];break}}if(!k)k=j.ROOT;
if(k){a=function(){};a.prototype=k;return new a}}throw new Error("Bundle not found: "+e+" in "+a+" , locale="+f);};d.i18n.normalizeLocale=function(a){a=a?a.toLowerCase():d.locale;if(a=="root")a="ROOT";return a};d.i18n._requireLocalization=function(a,e,f,g){f=d.i18n.normalizeLocale(f);var j=[a,"nls",e].join("."),i="";if(g){for(var k=g.split(","),h=0;h<k.length;h++)if(f.indexOf(k[h])==0)if(k[h].length>i.length)i=k[h];i||(i="ROOT")}k=g?i:f;var l=d._loadedModules[j];h=null;if(l){if(d.config.localizationComplete&&
l._built)return;h=k.replace(/-/g,"_");h=d._loadedModules[j+"."+h]}if(!h){l=d.provide(j);var n=d._getModuleSymbols(a).concat("nls").join("/"),r;d.i18n._searchLocalePath(k,g,function(m){var o=m.replace(/-/g,"_"),p=j+"."+o,s=false;if(d._loadedModules[p])s=true;else{d.provide(p);p=[n];m!="ROOT"&&p.push(m);p.push(e);m=p.join("/")+".js";s=d._loadPath(m,null,function(q){q=q.root||q;var u=function(){};u.prototype=r;l[o]=new u;for(var y in q)l[o][y]=q[y]})}if(s&&l[o])r=l[o];else l[o]=r;if(g)return true})}if(g&&
f!=i)l[f.replace(/-/g,"_")]=l[i.replace(/-/g,"_")]};(function(){var a=d.config.extraLocale;if(a){if(!a instanceof Array)a=[a];var e=d.i18n._requireLocalization;d.i18n._requireLocalization=function(f,g,j,i){e(f,g,j,i);if(!j)for(j=0;j<a.length;j++)e(f,g,a[j],i)}}})();d.i18n._searchLocalePath=function(a,e,f){a=d.i18n.normalizeLocale(a);var g=a.split("-");a=[];for(var j=g.length;j>0;j--)a.push(g.slice(0,j).join("-"));a.push(false);e&&a.reverse();for(e=a.length-1;e>=0;e--)if(f(a[e]||"ROOT"))break};d.i18n._preloadLocalizations=
function(a,e){function f(i){i=d.i18n.normalizeLocale(i);d.i18n._searchLocalePath(i,true,function(k){for(var h=0;h<e.length;h++)if(e[h]==k){d.require(a+"_"+k);return true}return false})}f();for(var g=d.config.extraLocale||[],j=0;j<g.length;j++)f(g[j])};return d.i18n});define("text!dijit/form/templates/TextBox.html",function(){return'<div class="dijit dijitReset dijitInline dijitLeft" id="widget_${id}" role="presentation"\n\t><div class="dijitReset dijitInputField dijitInputContainer"\n\t\t><input class="dijitReset dijitInputInner" dojoAttachPoint=\'textbox,focusNode\' autocomplete="off"\n\t\t\t${!nameAttrSetting} type=\'${type}\'\n\t/></div\n></div>'});
define("dojo/window",["dojo"],function(c){c.getObject("window",true,c);c.window.getBox=function(){var d=c.doc.compatMode=="BackCompat"?c.body():c.doc.documentElement,a=c._docScroll();return{w:d.clientWidth,h:d.clientHeight,l:a.x,t:a.y}};c.window.get=function(d){if(c.isIE&&window!==document.parentWindow){d.parentWindow.execScript("document._parentWindow = window;","Javascript");var a=d._parentWindow;d._parentWindow=null;return a}return d.parentWindow||d.defaultView};c.window.scrollIntoView=function(d,
a){try{d=c.byId(d);var e=d.ownerDocument||c.doc,f=e.body||c.body(),g=e.documentElement||f.parentNode,j=c.isIE,i=c.isWebKit;if((!(c.isMoz||j||i||c.isOpera)||d==f||d==g)&&typeof d.scrollIntoView!="undefined")d.scrollIntoView(false);else{var k=e.compatMode=="BackCompat",h=j>=9&&d.ownerDocument.parentWindow.frameElement?g.clientHeight>0&&g.clientWidth>0&&(f.clientHeight==0||f.clientWidth==0||f.clientHeight>g.clientHeight||f.clientWidth>g.clientWidth)?g:f:k?f:g;e=i?f:h;var l=h.clientWidth,n=h.clientHeight,
r=!c._isBodyLtr(),m=a||c.position(d),o=d.parentNode;a=function(G){return j<=6||j&&k?false:c.style(G,"position").toLowerCase()=="fixed"};if(!a(d))for(;o;){if(o==f)o=e;var p=c.position(o),s=a(o);if(o==e){p.w=l;p.h=n;if(e==g&&j&&r)p.x+=e.offsetWidth-p.w;if(p.x<0||!j)p.x=0;if(p.y<0||!j)p.y=0}else{var q=c._getPadBorderExtents(o);p.w-=q.w;p.h-=q.h;p.x+=q.l;p.y+=q.t;var u=o.clientWidth,y=p.w-u;if(u>0&&y>0){p.w=u;p.x+=r&&(j||o.clientLeft>q.l)?y:0}u=o.clientHeight;y=p.h-u;if(u>0&&y>0)p.h=u}if(s){if(p.y<0){p.h+=
p.y;p.y=0}if(p.x<0){p.w+=p.x;p.x=0}if(p.y+p.h>n)p.h=n-p.y;if(p.x+p.w>l)p.w=l-p.x}var C=m.x-p.x,v=m.y-Math.max(p.y,0),w=C+m.w-p.w,A=v+m.h-p.h;if(w*C>0){var z=Math[C<0?"max":"min"](C,w);if(r&&(j==8&&!k||j>=9))z=-z;m.x+=o.scrollLeft;o.scrollLeft+=z;m.x-=o.scrollLeft}if(A*v>0){m.y+=o.scrollTop;o.scrollTop+=Math[v<0?"max":"min"](v,A);m.y-=o.scrollTop}o=o!=e&&!s&&o.parentNode}}}catch(F){console.error("scrollIntoView: "+F);d.scrollIntoView(false)}};return c.window});
define("dijit/_base/manager",["dojo","dijit"],function(c,d){c.declare("dijit.WidgetSet",null,{constructor:function(){this._hash={};this.length=0},add:function(a){if(this._hash[a.id])throw new Error("Tried to register widget with id=="+a.id+" but that id is already registered");this._hash[a.id]=a;this.length++},remove:function(a){if(this._hash[a]){delete this._hash[a];this.length--}},forEach:function(a,e){e=e||c.global;var f=0,g;for(g in this._hash)a.call(e,this._hash[g],f++,this._hash);return this},
filter:function(a,e){e=e||c.global;var f=new d.WidgetSet,g=0,j;for(j in this._hash){var i=this._hash[j];a.call(e,i,g++,this._hash)&&f.add(i)}return f},byId:function(a){return this._hash[a]},byClass:function(a){var e=new d.WidgetSet,f,g;for(f in this._hash){g=this._hash[f];g.declaredClass==a&&e.add(g)}return e},toArray:function(){var a=[];for(var e in this._hash)a.push(this._hash[e]);return a},map:function(a,e){return c.map(this.toArray(),a,e)},every:function(a,e){e=e||c.global;var f=0,g;for(g in this._hash)if(!a.call(e,
this._hash[g],f++,this._hash))return false;return true},some:function(a,e){e=e||c.global;var f=0,g;for(g in this._hash)if(a.call(e,this._hash[g],f++,this._hash))return true;return false}});(function(){d.registry=new d.WidgetSet;var a=d.registry._hash,e=c.attr,f=c.hasAttr,g=c.style;d.byId=function(h){return typeof h=="string"?a[h]:h};var j={};d.getUniqueId=function(h){var l;do l=h+"_"+(h in j?++j[h]:(j[h]=0));while(a[l]);return d._scopeName=="dijit"?l:d._scopeName+"_"+l};d.findWidgets=function(h){function l(r){for(r=
r.firstChild;r;r=r.nextSibling)if(r.nodeType==1){var m=r.getAttribute("widgetId");if(m)(m=a[m])&&n.push(m);else l(r)}}var n=[];l(h);return n};d._destroyAll=function(){d._curFocus=null;d._prevFocus=null;d._activeStack=[];c.forEach(d.findWidgets(c.body()),function(h){if(!h._destroyed)if(h.destroyRecursive)h.destroyRecursive();else h.destroy&&h.destroy()})};c.isIE&&c.addOnWindowUnload(function(){d._destroyAll()});d.byNode=function(h){return a[h.getAttribute("widgetId")]};d.getEnclosingWidget=function(h){for(;h;){var l=
h.getAttribute&&h.getAttribute("widgetId");if(l)return a[l];h=h.parentNode}return null};var i=d._isElementShown=function(h){var l=g(h);return l.visibility!="hidden"&&l.visibility!="collapsed"&&l.display!="none"&&e(h,"type")!="hidden"};d.hasDefaultTabStop=function(h){switch(h.nodeName.toLowerCase()){case "a":return f(h,"href");case "area":case "button":case "input":case "object":case "select":case "textarea":return true;case "iframe":var l;try{var n=h.contentDocument;if("designMode"in n&&n.designMode==
"on")return true;l=n.body}catch(r){try{l=h.contentWindow.document.body}catch(m){return false}}return l.contentEditable=="true"||l.firstChild&&l.firstChild.contentEditable=="true";default:return h.contentEditable=="true"}};var k=d.isTabNavigable=function(h){return e(h,"disabled")?false:f(h,"tabIndex")?e(h,"tabIndex")>=0:d.hasDefaultTabStop(h)};d._getTabNavigable=function(h){function l(C){return C&&C.tagName.toLowerCase()=="input"&&C.type&&C.type.toLowerCase()=="radio"&&C.name&&C.name.toLowerCase()}
function n(C){return u[l(C)]||C}var r,m,o,p,s,q,u={},y=function(C){c.query("> *",C).forEach(function(v){if(!(c.isIE&&v.scopeName!=="HTML"||!i(v))){if(k(v)){var w=e(v,"tabIndex");if(!f(v,"tabIndex")||w==0){r||(r=v);m=v}else if(w>0){if(!o||w<p){p=w;o=v}if(!s||w>=q){q=w;s=v}}w=l(v);if(c.attr(v,"checked")&&w)u[w]=v}v.nodeName.toUpperCase()!="SELECT"&&y(v)}})};i(h)&&y(h);return{first:n(r),last:n(m),lowest:n(o),highest:n(s)}};d.getFirstInTabbingOrder=function(h){h=d._getTabNavigable(c.byId(h));return h.lowest?
h.lowest:h.first};d.getLastInTabbingOrder=function(h){h=d._getTabNavigable(c.byId(h));return h.last?h.last:h.highest};d.defaultDuration=c.config.defaultDuration||200})();return d});
define("dojo/Stateful",["dojo"],function(c){c.declare("dojo.Stateful",null,{postscript:function(d){d&&c.mixin(this,d)},get:function(d){return this[d]},set:function(d,a){if(typeof d==="object"){for(var e in d)this.set(e,d[e]);return this}e=this[d];this[d]=a;this._watchCallbacks&&this._watchCallbacks(d,e,a);return this},watch:function(d,a){var e=this._watchCallbacks;if(!e){var f=this;e=this._watchCallbacks=function(j,i,k,h){var l=function(n){if(n){n=n.slice();for(var r=0,m=n.length;r<m;r++)try{n[r].call(f,
j,i,k)}catch(o){console.error(o)}}};l(e["_"+j]);h||l(e["*"])}}if(!a&&typeof d==="function"){a=d;d="*"}else d="_"+d;var g=e[d];if(typeof g!=="object")g=e[d]=[];g.push(a);return{unwatch:function(){g.splice(c.indexOf(g,a),1)}}}});return c.Stateful});
define("dijit/_WidgetBase",["dojo","dijit","dijit/_base/manager","dojo/Stateful"],function(c,d){(function(){c.declare("dijit._WidgetBase",c.Stateful,{id:"",lang:"",dir:"","class":"",style:"",title:"",tooltip:"",baseClass:"",srcNodeRef:null,domNode:null,containerNode:null,attributeMap:{id:"",dir:"",lang:"","class":"",style:"",title:""},_blankGif:(c.config.blankGif||c.moduleUrl("dojo","resources/blank.gif")).toString(),postscript:function(a,e){this.create(a,e)},create:function(a,e){this.srcNodeRef=
c.byId(e);this._connects=[];this._subscribes=[];if(this.srcNodeRef&&typeof this.srcNodeRef.id=="string")this.id=this.srcNodeRef.id;if(a){this.params=a;c._mixin(this,a)}this.postMixInProperties();if(!this.id)this.id=d.getUniqueId(this.declaredClass.replace(/\./g,"_"));d.registry.add(this);this.buildRendering();if(this.domNode){this._applyAttributes();(a=this.srcNodeRef)&&a.parentNode&&this.domNode!==a&&a.parentNode.replaceChild(this.domNode,a)}this.domNode&&this.domNode.setAttribute("widgetId",this.id);
this.postCreate();this.srcNodeRef&&!this.srcNodeRef.parentNode&&delete this.srcNodeRef;this._created=true},_applyAttributes:function(){var a=function(f,g){if(g.params&&f in g.params||g[f])g.set(f,g[f])};for(var e in this.attributeMap)a(e,this);c.forEach(this._getSetterAttributes(),function(f){f in this.attributeMap||a(f,this)},this)},_getSetterAttributes:function(){var a=this.constructor;if(!a._setterAttrs){var e=a._setterAttrs=[],f,g=a.prototype;for(var j in g)if(c.isFunction(g[j])&&(f=j.match(/^_set([a-zA-Z]*)Attr$/))&&
f[1])e.push(f[1].charAt(0).toLowerCase()+f[1].substr(1))}return a._setterAttrs},postMixInProperties:function(){},buildRendering:function(){if(!this.domNode)this.domNode=this.srcNodeRef||c.create("div");if(this.baseClass){var a=this.baseClass.split(" ");this.isLeftToRight()||(a=a.concat(c.map(a,function(e){return e+"Rtl"})));c.addClass(this.domNode,a)}},postCreate:function(){},startup:function(){this._started=true},destroyRecursive:function(a){this._beingDestroyed=true;this.destroyDescendants(a);this.destroy(a)},
destroy:function(a){this._beingDestroyed=true;this.uninitialize();var e=c.forEach,f=c.unsubscribe;e(this._connects,function(g){e(g,c.disconnect)});e(this._subscribes,function(g){f(g)});e(this._supportingWidgets||[],function(g){if(g.destroyRecursive)g.destroyRecursive();else g.destroy&&g.destroy()});this.destroyRendering(a);d.registry.remove(this.id);this._destroyed=true},destroyRendering:function(a){if(this.bgIframe){this.bgIframe.destroy(a);delete this.bgIframe}if(this.domNode){a?c.removeAttr(this.domNode,
"widgetId"):c.destroy(this.domNode);delete this.domNode}if(this.srcNodeRef){a||c.destroy(this.srcNodeRef);delete this.srcNodeRef}},destroyDescendants:function(a){c.forEach(this.getChildren(),function(e){e.destroyRecursive&&e.destroyRecursive(a)})},uninitialize:function(){return false},_setClassAttr:function(a){c.replaceClass(this[this.attributeMap["class"]||"domNode"],a,this["class"]);this._set("class",a)},_setStyleAttr:function(a){var e=this[this.attributeMap.style||"domNode"];if(c.isObject(a))c.style(e,
a);else if(e.style.cssText)e.style.cssText+="; "+a;else e.style.cssText=a;this._set("style",a)},_attrToDom:function(a,e){var f=this.attributeMap[a];c.forEach(c.isArray(f)?f:[f],function(g){var j=this[g.node||g||"domNode"];switch(g.type||"attribute"){case "attribute":if(c.isFunction(e))e=c.hitch(this,e);g=g.attribute?g.attribute:/^on[A-Z][a-zA-Z]*$/.test(a)?a.toLowerCase():a;c.attr(j,g,e);break;case "innerText":j.innerHTML="";j.appendChild(c.doc.createTextNode(e));break;case "innerHTML":j.innerHTML=
e;break;case "class":c.replaceClass(j,e,this[a]);break}},this)},get:function(a){var e=this._getAttrNames(a);return this[e.g]?this[e.g]():this[a]},set:function(a,e){if(typeof a==="object"){for(var f in a)this.set(f,a[f]);return this}f=this._getAttrNames(a);if(this[f.s])var g=this[f.s].apply(this,Array.prototype.slice.call(arguments,1));else{a in this.attributeMap&&this._attrToDom(a,e);this._set(a,e)}return g||this},_attrPairNames:{},_getAttrNames:function(a){var e=this._attrPairNames;if(e[a])return e[a];
var f=a.charAt(0).toUpperCase()+a.substr(1);return e[a]={n:a+"Node",s:"_set"+f+"Attr",g:"_get"+f+"Attr"}},_set:function(a,e){var f=this[a];this[a]=e;this._watchCallbacks&&this._created&&e!==f&&this._watchCallbacks(a,f,e)},toString:function(){return"[Widget "+this.declaredClass+", "+(this.id||"NO ID")+"]"},getDescendants:function(){return this.containerNode?c.query("[widgetId]",this.containerNode).map(d.byNode):[]},getChildren:function(){return this.containerNode?d.findWidgets(this.containerNode):
[]},connect:function(a,e,f){a=[c._connect(a,e,this,f)];this._connects.push(a);return a},disconnect:function(a){for(var e=0;e<this._connects.length;e++)if(this._connects[e]==a){c.forEach(a,c.disconnect);this._connects.splice(e,1);return}},subscribe:function(a,e){a=c.subscribe(a,this,e);this._subscribes.push(a);return a},unsubscribe:function(a){for(var e=0;e<this._subscribes.length;e++)if(this._subscribes[e]==a){c.unsubscribe(a);this._subscribes.splice(e,1);return}},isLeftToRight:function(){return this.dir?
this.dir=="ltr":c._isBodyLtr()},placeAt:function(a,e){a.declaredClass&&a.addChild?a.addChild(this,e):c.place(this.domNode,a,e);return this}})})();return d._WidgetBase});
define("dijit/_base/focus",["dojo","dijit","dojo/window","dijit/_base/manager"],function(c,d){c.mixin(d,{_curFocus:null,_prevFocus:null,isCollapsed:function(){return d.getBookmark().isCollapsed},getBookmark:function(){var a,e,f=c.doc.selection,g=d._curFocus;if(c.global.getSelection){if(f=c.global.getSelection())if(f.isCollapsed){if(a=g?g.tagName:""){a=a.toLowerCase();if(a=="textarea"||a=="input"&&(!g.type||g.type.toLowerCase()=="text")){f={start:g.selectionStart,end:g.selectionEnd,node:g,pRange:true};
return{isCollapsed:f.end<=f.start,mark:f}}}a={isCollapsed:true};if(f.rangeCount)a.mark=f.getRangeAt(0).cloneRange()}else{e=f.getRangeAt(0);a={isCollapsed:false,mark:e.cloneRange()}}}else if(f){a=g?g.tagName:"";a=a.toLowerCase();if(g&&a&&(a=="button"||a=="textarea"||a=="input"))if(f.type&&f.type.toLowerCase()=="none")return{isCollapsed:true,mark:null};else{e=f.createRange();return{isCollapsed:e.text&&e.text.length?false:true,mark:{range:e,pRange:true}}}a={};try{e=f.createRange();a.isCollapsed=!(f.type==
"Text"?e.htmlText.length:e.length)}catch(j){a.isCollapsed=true;return a}if(f.type.toUpperCase()=="CONTROL")if(e.length){a.mark=[];f=0;for(g=e.length;f<g;)a.mark.push(e.item(f++))}else{a.isCollapsed=true;a.mark=null}else a.mark=e.getBookmark()}else console.warn("No idea how to store the current selection for this browser!");return a},moveToBookmark:function(a){var e=c.doc;if(a=a.mark)if(c.global.getSelection){var f=c.global.getSelection();if(f&&f.removeAllRanges)if(a.pRange){f=a.node;f.selectionStart=
a.start;f.selectionEnd=a.end}else{f.removeAllRanges();f.addRange(a)}else console.warn("No idea how to restore selection for this browser!")}else if(e.selection&&a){var g;if(a.pRange)g=a.range;else if(c.isArray(a)){g=e.body.createControlRange();c.forEach(a,function(j){g.addElement(j)})}else{g=e.body.createTextRange();g.moveToBookmark(a)}g.select()}},getFocus:function(a,e){a=!d._curFocus||a&&c.isDescendant(d._curFocus,a.domNode)?d._prevFocus:d._curFocus;return{node:a,bookmark:a==d._curFocus&&c.withGlobal(e||
c.global,d.getBookmark),openedForWindow:e}},focus:function(a){if(a){var e="node"in a?a.node:a,f=a.bookmark;a=a.openedForWindow;var g=f?f.isCollapsed:false;if(e){var j=e.tagName.toLowerCase()=="iframe"?e.contentWindow:e;if(j&&j.focus)try{j.focus()}catch(i){}d._onFocusNode(e)}if(f&&c.withGlobal(a||c.global,d.isCollapsed)&&!g){a&&a.focus();try{c.withGlobal(a||c.global,d.moveToBookmark,null,[f])}catch(k){}}}},_activeStack:[],registerIframe:function(a){return d.registerWin(a.contentWindow,a)},unregisterIframe:function(a){d.unregisterWin(a)},
registerWin:function(a,e){var f=function(l){d._justMouseDowned=true;setTimeout(function(){d._justMouseDowned=false},0);c.isIE&&l&&l.srcElement&&l.srcElement.parentNode==null||d._onTouchNode(e||l.target||l.srcElement,"mouse")},g=c.isIE?a.document.documentElement:a.document;if(g)if(c.isIE){a.document.body.attachEvent("onmousedown",f);var j=function(l){l.srcElement.tagName.toLowerCase()!="#document"&&d.isTabNavigable(l.srcElement)?d._onFocusNode(e||l.srcElement):d._onTouchNode(e||l.srcElement)};g.attachEvent("onactivate",
j);var i=function(l){d._onBlurNode(e||l.srcElement)};g.attachEvent("ondeactivate",i);return function(){a.document.detachEvent("onmousedown",f);g.detachEvent("onactivate",j);g.detachEvent("ondeactivate",i);g=null}}else{g.body.addEventListener("mousedown",f,true);var k=function(l){d._onFocusNode(e||l.target)};g.addEventListener("focus",k,true);var h=function(l){d._onBlurNode(e||l.target)};g.addEventListener("blur",h,true);return function(){g.body.removeEventListener("mousedown",f,true);g.removeEventListener("focus",
k,true);g.removeEventListener("blur",h,true);g=null}}},unregisterWin:function(a){a&&a()},_onBlurNode:function(){d._prevFocus=d._curFocus;d._curFocus=null;if(!d._justMouseDowned){d._clearActiveWidgetsTimer&&clearTimeout(d._clearActiveWidgetsTimer);d._clearActiveWidgetsTimer=setTimeout(function(){delete d._clearActiveWidgetsTimer;d._setStack([]);d._prevFocus=null},100)}},_onTouchNode:function(a,e){if(d._clearActiveWidgetsTimer){clearTimeout(d._clearActiveWidgetsTimer);delete d._clearActiveWidgetsTimer}var f=
[];try{for(;a;){var g=c.attr(a,"dijitPopupParent");if(g)a=d.byId(g).domNode;else if(a.tagName&&a.tagName.toLowerCase()=="body"){if(a===c.body())break;a=c.window.get(a.ownerDocument).frameElement}else{var j=a.getAttribute&&a.getAttribute("widgetId"),i=j&&d.byId(j);i&&!(e=="mouse"&&i.get("disabled"))&&f.unshift(j);a=a.parentNode}}}catch(k){}d._setStack(f,e)},_onFocusNode:function(a){if(a)if(a.nodeType!=9){d._onTouchNode(a);if(a!=d._curFocus){if(d._curFocus)d._prevFocus=d._curFocus;d._curFocus=a;c.publish("focusNode",
[a])}}},_setStack:function(a,e){var f=d._activeStack;d._activeStack=a;for(var g=0;g<Math.min(f.length,a.length);g++)if(f[g]!=a[g])break;for(var j,i=f.length-1;i>=g;i--)if(j=d.byId(f[i])){j._focused=false;j.set("focused",false);j._hasBeenBlurred=true;j._onBlur&&j._onBlur(e);c.publish("widgetBlur",[j,e])}for(i=g;i<a.length;i++)if(j=d.byId(a[i])){j._focused=true;j.set("focused",true);j._onFocus&&j._onFocus(e);c.publish("widgetFocus",[j,e])}}});c.addOnLoad(function(){var a=d.registerWin(window);c.isIE&&
c.addOnWindowUnload(function(){d.unregisterWin(a);a=null})});return d});
define("dojo/AdapterRegistry",["dojo"],function(c){c.AdapterRegistry=function(d){this.pairs=[];this.returnWrappers=d||false};c.extend(c.AdapterRegistry,{register:function(d,a,e,f,g){this.pairs[g?"unshift":"push"]([d,a,e,f])},match:function(){for(var d=0;d<this.pairs.length;d++){var a=this.pairs[d];if(a[1].apply(this,arguments))return a[3]||this.returnWrappers?a[2]:a[2].apply(this,arguments)}throw new Error("No match found");},unregister:function(d){for(var a=0;a<this.pairs.length;a++)if(this.pairs[a][0]==
d){this.pairs.splice(a,1);return true}return false}});return c.AdapterRegistry});
define("dijit/_base/place",["dojo","dijit","dojo/window","dojo/AdapterRegistry"],function(c,d){d.getViewport=function(){return c.window.getBox()};d.placeOnScreen=function(a,e,f,g){f=c.map(f,function(j){var i={corner:j,pos:{x:e.x,y:e.y}};if(g){i.pos.x+=j.charAt(1)=="L"?g.x:-g.x;i.pos.y+=j.charAt(0)=="T"?g.y:-g.y}return i});return d._place(a,f)};d._place=function(a,e,f,g){var j=c.window.getBox();if(!a.parentNode||String(a.parentNode.tagName).toLowerCase()!="body")c.body().appendChild(a);var i=null;
c.some(e,function(h){var l=h.corner,n=h.pos,r=0,m={w:l.charAt(1)=="L"?j.l+j.w-n.x:n.x-j.l,h:l.charAt(1)=="T"?j.t+j.h-n.y:n.y-j.t};if(f){r=f(a,h.aroundCorner,l,m,g);r=typeof r=="undefined"?0:r}var o=a.style,p=o.display,s=o.visibility;o.visibility="hidden";o.display="";var q=c.marginBox(a);o.display=p;o.visibility=s;o=Math.max(j.l,l.charAt(1)=="L"?n.x:n.x-q.w);p=Math.max(j.t,l.charAt(0)=="T"?n.y:n.y-q.h);s=Math.min(j.l+j.w,l.charAt(1)=="L"?o+q.w:n.x);n=Math.min(j.t+j.h,l.charAt(0)=="T"?p+q.h:n.y);s=
s-o;n=n-p;r+=q.w-s+(q.h-n);if(i==null||r<i.overflow)i={corner:l,aroundCorner:h.aroundCorner,x:o,y:p,w:s,h:n,overflow:r,spaceAvailable:m};return!r});i.overflow&&f&&f(a,i.aroundCorner,i.corner,i.spaceAvailable,g);e=c._isBodyLtr();var k=a.style;k.top=i.y+"px";k[e?"left":"right"]=(e?i.x:j.w-i.x-i.w)+"px";return i};d.placeOnScreenAroundNode=function(a,e,f,g){e=c.byId(e);e=c.position(e,true);return d._placeOnScreenAroundRect(a,e.x,e.y,e.w,e.h,f,g)};d.placeOnScreenAroundRectangle=function(a,e,f,g){return d._placeOnScreenAroundRect(a,
e.x,e.y,e.width,e.height,f,g)};d._placeOnScreenAroundRect=function(a,e,f,g,j,i,k){var h=[];for(var l in i)h.push({aroundCorner:l,corner:i[l],pos:{x:e+(l.charAt(1)=="L"?0:g),y:f+(l.charAt(0)=="T"?0:j)}});return d._place(a,h,k,{w:g,h:j})};d.placementRegistry=new c.AdapterRegistry;d.placementRegistry.register("node",function(a,e){return typeof e=="object"&&typeof e.offsetWidth!="undefined"&&typeof e.offsetHeight!="undefined"},d.placeOnScreenAroundNode);d.placementRegistry.register("rect",function(a,
e){return typeof e=="object"&&"x"in e&&"y"in e&&"width"in e&&"height"in e},d.placeOnScreenAroundRectangle);d.placeOnScreenAroundElement=function(){return d.placementRegistry.match.apply(d.placementRegistry,arguments)};d.getPopupAroundAlignment=function(a,e){var f={};c.forEach(a,function(g){switch(g){case "after":f[e?"BR":"BL"]=e?"BL":"BR";break;case "before":f[e?"BL":"BR"]=e?"BR":"BL";break;case "below-alt":e=!e;case "below":f[e?"BL":"BR"]=e?"TL":"TR";f[e?"BR":"BL"]=e?"TR":"TL";break;case "above-alt":e=
!e;case "above":default:f[e?"TL":"TR"]=e?"BL":"BR";f[e?"TR":"TL"]=e?"BR":"BL";break}});return f};return d});define("dijit/_base/window",["dojo","dijit","dojo/window"],function(c,d){d.getDocumentWindow=function(a){return c.window.get(a)};return d});
define("dijit/_base/popup",["dojo","dijit","dijit/_base/focus","dijit/_base/place","dijit/_base/window"],function(c,d){d.popup={_stack:[],_beginZIndex:1E3,_idGen:1,_createWrapper:function(a){var e=a.declaredClass?a._popupWrapper:a.parentNode&&c.hasClass(a.parentNode,"dijitPopup"),f=a.domNode||a;if(!e){e=c.create("div",{"class":"dijitPopup",style:{display:"none"},role:"presentation"},c.body());e.appendChild(f);f=f.style;f.display="";f.visibility="";f.position="";f.top="0px";if(a.declaredClass){a._popupWrapper=
e;c.connect(a,"destroy",function(){c.destroy(e);delete a._popupWrapper})}}return e},moveOffScreen:function(a){a=this._createWrapper(a);c.style(a,{visibility:"hidden",top:"-9999px",display:""})},hide:function(a){a=this._createWrapper(a);c.style(a,"display","none")},getTopPopup:function(){for(var a=this._stack,e=a.length-1;e>0&&a[e].parent===a[e-1].widget;e--);return a[e]},open:function(a){for(var e=this._stack,f=a.popup,g=a.orient||((a.parent?a.parent.isLeftToRight():c._isBodyLtr())?{BL:"TL",BR:"TR",
TL:"BL",TR:"BR"}:{BR:"TR",BL:"TL",TR:"BR",TL:"BL"}),j=a.around,i=a.around&&a.around.id?a.around.id+"_dropdown":"popup_"+this._idGen++;e.length&&(!a.parent||!c.isDescendant(a.parent.domNode,e[e.length-1].widget.domNode));)d.popup.close(e[e.length-1].widget);var k=this._createWrapper(f);c.attr(k,{id:i,style:{zIndex:this._beginZIndex+e.length},"class":"dijitPopup "+(f.baseClass||f["class"]||"").split(" ")[0]+"Popup",dijitPopupParent:a.parent?a.parent.id:""});if(c.isIE||c.isMoz)if(!f.bgIframe)f.bgIframe=
new d.BackgroundIframe(k);g=j?d.placeOnScreenAroundElement(k,j,g,f.orient?c.hitch(f,"orient"):null):d.placeOnScreen(k,a,g=="R"?["TR","BR","TL","BL"]:["TL","BL","TR","BR"],a.padding);k.style.display="";k.style.visibility="visible";f.domNode.style.visibility="visible";j=[];j.push(c.connect(k,"onkeypress",this,function(h){if(h.charOrCode==c.keys.ESCAPE&&a.onCancel){c.stopEvent(h);a.onCancel()}else if(h.charOrCode===c.keys.TAB){c.stopEvent(h);(h=this.getTopPopup())&&h.onCancel&&h.onCancel()}}));f.onCancel&&
j.push(c.connect(f,"onCancel",a.onCancel));j.push(c.connect(f,f.onExecute?"onExecute":"onChange",this,function(){var h=this.getTopPopup();h&&h.onExecute&&h.onExecute()}));e.push({widget:f,parent:a.parent,onExecute:a.onExecute,onCancel:a.onCancel,onClose:a.onClose,handlers:j});f.onOpen&&f.onOpen(g);return g},close:function(a){for(var e=this._stack;a&&c.some(e,function(i){return i.widget==a})||!a&&e.length;){var f=e.pop(),g=f.widget,j=f.onClose;g.onClose&&g.onClose();c.forEach(f.handlers,c.disconnect);
g&&g.domNode&&this.hide(g);j&&j()}}};d._frames=new (function(){var a=[];this.pop=function(){var e;if(a.length){e=a.pop();e.style.display=""}else{if(c.isIE<9){e="<iframe src='"+(c.config.dojoBlankHtmlUrl||c.moduleUrl("dojo","resources/blank.html")+""||'javascript:""')+"' style='position: absolute; left: 0px; top: 0px;z-index: -1; filter:Alpha(Opacity=\"0\");'>";e=c.doc.createElement(e)}else{e=c.create("iframe");e.src='javascript:""';e.className="dijitBackgroundIframe";c.style(e,"opacity",0.1)}e.tabIndex=
-1;d.setWaiRole(e,"presentation")}return e};this.push=function(e){e.style.display="none";a.push(e)}});d.BackgroundIframe=function(a){if(!a.id)throw new Error("no id");if(c.isIE||c.isMoz){var e=this.iframe=d._frames.pop();a.appendChild(e);if(c.isIE<7||c.isQuirks){this.resize(a);this._conn=c.connect(a,"onresize",this,function(){this.resize(a)})}else c.style(e,{width:"100%",height:"100%"})}};c.extend(d.BackgroundIframe,{resize:function(a){this.iframe&&c.style(this.iframe,{width:a.offsetWidth+"px",height:a.offsetHeight+
"px"})},destroy:function(){if(this._conn){c.disconnect(this._conn);this._conn=null}if(this.iframe){d._frames.push(this.iframe);delete this.iframe}}});return d.popup});define("dijit/_base/scroll",["dojo","dijit","dojo/window"],function(c,d){d.scrollIntoView=function(a,e){c.window.scrollIntoView(a,e)};return d.scrollIntoView});
define("dojo/uacss",["dojo"],function(c){(function(){var d=c.doc.documentElement,a=c.isIE,e=c.isOpera,f=Math.floor,g=c.isFF,j=c.boxModel.replace(/-/,"");a={dj_ie:a,dj_ie6:f(a)==6,dj_ie7:f(a)==7,dj_ie8:f(a)==8,dj_ie9:f(a)==9,dj_quirks:c.isQuirks,dj_iequirks:a&&c.isQuirks,dj_opera:e,dj_khtml:c.isKhtml,dj_webkit:c.isWebKit,dj_safari:c.isSafari,dj_chrome:c.isChrome,dj_gecko:c.isMozilla,dj_ff3:f(g)==3};a["dj_"+j]=true;var i="";for(var k in a)if(a[k])i+=k+" ";d.className=c.trim(d.className+" "+i);c._loaders.unshift(function(){if(!c._isBodyLtr()){var h=
"dj_rtl dijitRtl "+i.replace(/ /g,"-rtl ");d.className=c.trim(d.className+" "+h)}})})();return c});define("dijit/_base/sniff",["dojo","dijit","dojo/uacss"],function(c,d){return d});
define("dijit/_base/typematic",["dojo","dijit"],function(c,d){d.typematic={_fireEventAndReload:function(){this._timer=null;this._callback(++this._count,this._node,this._evt);this._currentTimeout=Math.max(this._currentTimeout<0?this._initialDelay:this._subsequentDelay>1?this._subsequentDelay:Math.round(this._currentTimeout*this._subsequentDelay),this._minDelay);this._timer=setTimeout(c.hitch(this,"_fireEventAndReload"),this._currentTimeout)},trigger:function(a,e,f,g,j,i,k,h){if(j!=this._obj){this.stop();
this._initialDelay=k||500;this._subsequentDelay=i||0.9;this._minDelay=h||10;this._obj=j;this._evt=a;this._node=f;this._count=this._currentTimeout=-1;this._callback=c.hitch(e,g);this._fireEventAndReload();this._evt=c.mixin({faux:true},a)}},stop:function(){if(this._timer){clearTimeout(this._timer);this._timer=null}if(this._obj){this._callback(-1,this._node,this._evt);this._obj=null}},addKeyListener:function(a,e,f,g,j,i,k){if(e.keyCode){e.charOrCode=e.keyCode;c.deprecated("keyCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.",
"","2.0")}else if(e.charCode){e.charOrCode=String.fromCharCode(e.charCode);c.deprecated("charCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.","","2.0")}return[c.connect(a,"onkeypress",this,function(h){if(h.charOrCode==e.charOrCode&&(e.ctrlKey===undefined||e.ctrlKey==h.ctrlKey)&&(e.altKey===undefined||e.altKey==h.altKey)&&(e.metaKey===undefined||e.metaKey==(h.metaKey||false))&&(e.shiftKey===undefined||e.shiftKey==h.shiftKey)){c.stopEvent(h);d.typematic.trigger(h,
f,a,g,e,j,i,k)}else d.typematic._obj==e&&d.typematic.stop()}),c.connect(a,"onkeyup",this,function(){d.typematic._obj==e&&d.typematic.stop()})]},addMouseListener:function(a,e,f,g,j,i){var k=c.connect;return[k(a,"mousedown",this,function(h){c.stopEvent(h);d.typematic.trigger(h,e,a,f,a,g,j,i)}),k(a,"mouseup",this,function(h){c.stopEvent(h);d.typematic.stop()}),k(a,"mouseout",this,function(h){c.stopEvent(h);d.typematic.stop()}),k(a,"mousemove",this,function(h){h.preventDefault()}),k(a,"dblclick",this,
function(h){c.stopEvent(h);if(c.isIE){d.typematic.trigger(h,e,a,f,a,g,j,i);setTimeout(c.hitch(this,d.typematic.stop),50)}})]},addListener:function(a,e,f,g,j,i,k,h){return this.addKeyListener(e,f,g,j,i,k,h).concat(this.addMouseListener(a,g,j,i,k,h))}};return d.typematic});
define("dijit/_base/wai",["dojo","dijit"],function(c,d){d.wai={onload:function(){var a=c.create("div",{id:"a11yTestNode",style:{cssText:'border: 1px solid;border-color:red green;position: absolute;height: 5px;top: -999px;background-image: url("'+(c.config.blankGif||c.moduleUrl("dojo","resources/blank.gif"))+'");'}},c.body()),e=c.getComputedStyle(a);if(e){var f=e.backgroundImage;c[e.borderTopColor==e.borderRightColor||f!=null&&(f=="none"||f=="url(invalid-url:)")?"addClass":"removeClass"](c.body(),
"dijit_a11y");if(c.isIE)a.outerHTML="";else c.body().removeChild(a)}}};if(c.isIE||c.isMoz)c._loaders.unshift(d.wai.onload);c.mixin(d,{hasWaiRole:function(a,e){a=this.getWaiRole(a);return e?a.indexOf(e)>-1:a.length>0},getWaiRole:function(a){return c.trim((c.attr(a,"role")||"").replace("wairole:",""))},setWaiRole:function(a,e){c.attr(a,"role",e)},removeWaiRole:function(a,e){var f=c.attr(a,"role");if(f)if(e){e=c.trim((" "+f+" ").replace(" "+e+" "," "));c.attr(a,"role",e)}else a.removeAttribute("role")},
hasWaiState:function(a,e){return a.hasAttribute?a.hasAttribute("aria-"+e):!!a.getAttribute("aria-"+e)},getWaiState:function(a,e){return a.getAttribute("aria-"+e)||""},setWaiState:function(a,e,f){a.setAttribute("aria-"+e,f)},removeWaiState:function(a,e){a.removeAttribute("aria-"+e)}});return d});
define("dijit/_base",["dojo","dijit","dijit/_base/focus","dijit/_base/manager","dijit/_base/place","dijit/_base/popup","dijit/_base/scroll","dijit/_base/sniff","dijit/_base/typematic","dijit/_base/wai","dijit/_base/window"],function(c,d){return d._base});
define("dijit/_Widget",["dojo","dijit","dijit/_WidgetBase","dijit/_base"],function(c,d){c.connect(c,"_connect",function(a,e){a&&c.isFunction(a._onConnect)&&a._onConnect(e)});d._connectOnUseEventHandler=function(){};d._lastKeyDownNode=null;c.isIE?function(){var a=function(e){d._lastKeyDownNode=e.srcElement};c.doc.attachEvent("onkeydown",a);c.addOnWindowUnload(function(){c.doc.detachEvent("onkeydown",a)})}():c.doc.addEventListener("keydown",function(a){d._lastKeyDownNode=a.target},true);(function(){c.declare("dijit._Widget",
d._WidgetBase,{_deferredConnects:{onClick:"",onDblClick:"",onKeyDown:"",onKeyPress:"",onKeyUp:"",onMouseMove:"",onMouseDown:"",onMouseOut:"",onMouseOver:"",onMouseLeave:"",onMouseEnter:"",onMouseUp:""},onClick:d._connectOnUseEventHandler,onDblClick:d._connectOnUseEventHandler,onKeyDown:d._connectOnUseEventHandler,onKeyPress:d._connectOnUseEventHandler,onKeyUp:d._connectOnUseEventHandler,onMouseDown:d._connectOnUseEventHandler,onMouseMove:d._connectOnUseEventHandler,onMouseOut:d._connectOnUseEventHandler,
onMouseOver:d._connectOnUseEventHandler,onMouseLeave:d._connectOnUseEventHandler,onMouseEnter:d._connectOnUseEventHandler,onMouseUp:d._connectOnUseEventHandler,create:function(){this._deferredConnects=c.clone(this._deferredConnects);for(var a in this.attributeMap)delete this._deferredConnects[a];for(a in this._deferredConnects)this[a]!==d._connectOnUseEventHandler&&delete this._deferredConnects[a];this.inherited(arguments);if(this.domNode)for(a in this.params)this._onConnect(a)},_onConnect:function(a){if(a in
this._deferredConnects){this.connect(this[this._deferredConnects[a]||"domNode"],a.toLowerCase(),a);delete this._deferredConnects[a]}},focused:false,isFocusable:function(){return this.focus&&c.style(this.domNode,"display")!="none"},onFocus:function(){},onBlur:function(){},_onFocus:function(){this.onFocus()},_onBlur:function(){this.onBlur()},setAttribute:function(a,e){c.deprecated(this.declaredClass+"::setAttribute(attr, value) is deprecated. Use set() instead.","","2.0");this.set(a,e)},attr:function(a){if(c.config.isDebug){var e=
arguments.callee._ach||(arguments.callee._ach={}),f=(arguments.callee.caller||"unknown caller").toString();if(!e[f]){c.deprecated(this.declaredClass+"::attr() is deprecated. Use get() or set() instead, called from "+f,"","2.0");e[f]=true}}return arguments.length>=2||typeof a==="object"?this.set.apply(this,arguments):this.get(a)},nodesWithKeyClick:["input","button"],connect:function(a,e,f){var g=c._connect,j=this.inherited(arguments,[a,e=="ondijitclick"?"onclick":e,f]);if(e=="ondijitclick")if(c.indexOf(this.nodesWithKeyClick,
a.nodeName.toLowerCase())==-1){var i=c.hitch(this,f);j.push(g(a,"onkeydown",this,function(k){if((k.keyCode==c.keys.ENTER||k.keyCode==c.keys.SPACE)&&!k.ctrlKey&&!k.shiftKey&&!k.altKey&&!k.metaKey){d._lastKeyDownNode=k.target;"openDropDown"in this&&a==this._buttonNode||k.preventDefault()}}),g(a,"onkeyup",this,function(k){if((k.keyCode==c.keys.ENTER||k.keyCode==c.keys.SPACE)&&k.target==d._lastKeyDownNode&&!k.ctrlKey&&!k.shiftKey&&!k.altKey&&!k.metaKey){d._lastKeyDownNode=null;return i(k)}}))}return j},
_onShow:function(){this.onShow()},onShow:function(){},onHide:function(){},onClose:function(){return true}})})();return d._Widget});
define("dojo/string",["dojo"],function(c){c.getObject("string",true,c);c.string.rep=function(d,a){if(a<=0||!d)return"";for(var e=[];;){a&1&&e.push(d);if(!(a>>=1))break;d+=d}return e.join("")};c.string.pad=function(d,a,e,f){e||(e="0");d=String(d);a=c.string.rep(e,Math.ceil((a-d.length)/e.length));return f?d+a:a+d};c.string.substitute=function(d,a,e,f){f=f||c.global;e=e?c.hitch(f,e):function(g){return g};return d.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g,function(g,j,i){g=c.getObject(j,false,
a);if(i)g=c.getObject(i,false,f).call(f,g,j);return e(g,j).toString()})};c.string.trim=String.prototype.trim?c.trim:function(d){d=d.replace(/^\s+/,"");for(var a=d.length-1;a>=0;a--)if(/\S/.test(d.charAt(a))){d=d.substring(0,a+1);break}return d};return c.string});
define("dojo/date/stamp",["dojo"],function(c){c.getObject("date.stamp",true,c);c.date.stamp.fromISOString=function(d,a){if(!c.date.stamp._isoRegExp)c.date.stamp._isoRegExp=/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(.\d+)?)?((?:[+-](\d{2}):(\d{2}))|Z)?)?$/;var e=c.date.stamp._isoRegExp.exec(d);d=null;if(e){e.shift();e[1]&&e[1]--;if(e[6])e[6]*=1E3;if(a){a=new Date(a);c.forEach(c.map(["FullYear","Month","Date","Hours","Minutes","Seconds","Milliseconds"],function(j){return a["get"+
j]()}),function(j,i){e[i]=e[i]||j})}d=new Date(e[0]||1970,e[1]||0,e[2]||1,e[3]||0,e[4]||0,e[5]||0,e[6]||0);if(e[0]<100)d.setFullYear(e[0]||1970);var f=0,g=e[7]&&e[7].charAt(0);if(g!="Z"){f=(e[8]||0)*60+(Number(e[9])||0);if(g!="-")f*=-1}if(g)f-=d.getTimezoneOffset();f&&d.setTime(d.getTime()+f*6E4)}return d};c.date.stamp.toISOString=function(d,a){var e=function(i){return i<10?"0"+i:i};a=a||{};var f=[],g=a.zulu?"getUTC":"get",j="";if(a.selector!="time"){j=d[g+"FullYear"]();j=["0000".substr((j+"").length)+
j,e(d[g+"Month"]()+1),e(d[g+"Date"]())].join("-")}f.push(j);if(a.selector!="date"){j=[e(d[g+"Hours"]()),e(d[g+"Minutes"]()),e(d[g+"Seconds"]())].join(":");g=d[g+"Milliseconds"]();if(a.milliseconds)j+="."+(g<100?"0":"")+e(g);if(a.zulu)j+="Z";else if(a.selector!="time"){d=d.getTimezoneOffset();a=Math.abs(d);j+=(d>0?"-":"+")+e(Math.floor(a/60))+":"+e(a%60)}f.push(j)}return f.join("T")};return c.date.stamp});
define("dojo/parser",["dojo","dojo/date/stamp"],function(c){c.parser=new (function(){function d(k){if(g.isString(k))return"string";if(typeof k=="number")return"number";if(typeof k=="boolean")return"boolean";if(g.isFunction(k))return"function";if(g.isArray(k))return"array";if(k instanceof Date)return"date";if(k instanceof g._Url)return"url";return"object"}function a(k,h){switch(h){case "string":return k;case "number":return k.length?Number(k):NaN;case "boolean":return typeof k=="boolean"?k:k.toLowerCase()!=
"false";case "function":if(g.isFunction(k)){k=k.toString();k=g.trim(k.substring(k.indexOf("{")+1,k.length-1))}try{return k===""||k.search(/[^\w\.]+/i)!=-1?new Function(k):g.getObject(k,false)||new Function(k)}catch(l){return new Function}case "array":return k?k.split(/\s*,\s*/):[];case "date":switch(k){case "":return new Date("");case "now":return new Date;default:return g.date.stamp.fromISOString(k)}case "url":return g.baseUrl+k;default:return g.fromJson(k)}}function e(k,h){for(var l in k)if(l.charAt(0)!=
"_")l in j||(h[l]=d(k[l]));return h}function f(k,h){var l=i[k];if(l){if(!h&&!l.params)l.params=e(l.cls.prototype,{})}else{k=g.getObject(k);l=null;if(!k)return null;h||(l=e(k.prototype,{}));l={cls:k,params:l}}return l}var g=c,j={},i={};g.connect(g,"extend",function(){i={}});this._functionFromScript=function(k,h){var l="",n="";(h=k.getAttribute(h+"args")||k.getAttribute("args"))&&g.forEach(h.split(/\s*,\s*/),function(r,m){l+="var "+r+" = arguments["+m+"]; "});(h=k.getAttribute("with"))&&h.length&&g.forEach(h.split(/\s*,\s*/),
function(r){l+="with("+r+"){";n+="}"});return new Function(l+k.innerHTML+n)};this.instantiate=function(k,h,l){var n=[];h=h||{};l=l||{};var r=(l.scope||g._scopeName)+"Type",m="data-"+(l.scope||g._scopeName)+"-";g.forEach(k,function(o){if(o){var p,s,q,u,y,C;if(o.node){p=o.node;s=o.type;C=o.fastpath;u=(q=o.clsInfo||s&&f(s,C))&&q.cls;y=o.scripts}else{p=o;y=(u=(q=(s=r in h?h[r]:p.getAttribute(r))&&f(s))&&q.cls)&&(u._noScript||u.prototype._noScript)?[]:g.query("> script[type^='dojo/']",p)}if(!q)throw new Error("Could not load class '"+
s);var v={};l.defaults&&g._mixin(v,l.defaults);o.inherited&&g._mixin(v,o.inherited);if(C){if((q=p.getAttribute(m+"props"))&&q.length)try{q=g.fromJson.call(l.propsThis,"{"+q+"}");g._mixin(v,q)}catch(w){throw new Error(w.toString()+" in data-dojo-props='"+q+"'");}if(q=p.getAttribute(m+"attach-point"))v.dojoAttachPoint=q;if(q=p.getAttribute(m+"attach-event"))v.dojoAttachEvent=q;c.mixin(v,h)}else{o=p.attributes;for(var A in q.params){s=A in h?{value:h[A],specified:true}:o.getNamedItem(A);if(!(!s||!s.specified&&
(!c.isIE||A.toLowerCase()!="value"))){s=s.value;switch(A){case "class":s="className"in h?h.className:p.className;break;case "style":s="style"in h?h.style:p.style&&p.style.cssText}var z=q.params[A];v[A]=typeof s=="string"?a(s,z):s}}}var F=[],G=[];g.forEach(y,function(I){p.removeChild(I);var J=I.getAttribute(m+"event")||I.getAttribute("event"),N=I.getAttribute("type");I=g.parser._functionFromScript(I,m);if(J)if(N=="dojo/connect")F.push({event:J,func:I});else v[J]=I;else G.push(I)});var H=(y=u.markupFactory||
u.prototype&&u.prototype.markupFactory)?y(v,p,u):new u(v,p);n.push(H);(u=p.getAttribute(m+"id")||p.getAttribute("jsId"))&&g.setObject(u,H);g.forEach(F,function(I){g.connect(H,I.event,null,I.func)});g.forEach(G,function(I){I.call(H)})}});h._started||g.forEach(n,function(o){if(!l.noStart&&o&&c.isFunction(o.startup)&&!o._started&&(!o.getParent||!o.getParent()))o.startup()});return n};this.parse=function(k,h){function l(p,s){var q=c.clone(p.inherited);c.forEach(["dir","lang"],function(A){var z=p.node.getAttribute(A);
if(z)q[A]=z});for(var u=p.clsInfo&&!p.clsInfo.cls.prototype._noScript?p.scripts:null,y=!p.clsInfo||!p.clsInfo.cls.prototype.stopParser||h&&h.template,C=p.node.firstChild;C;C=C.nextSibling)if(C.nodeType==1){var v,w=y&&C.getAttribute(r+"type");v=w?w:y&&C.getAttribute(n);w=w==v;if(v){v={type:v,fastpath:w,clsInfo:f(v,w),node:C,scripts:[],inherited:q};s.push(v);l(v,s)}else if(u&&C.nodeName.toLowerCase()=="script")(v=C.getAttribute("type"))&&/^dojo\/\w/i.test(v)&&u.push(C);else y&&l({node:C,inherited:q},
s)}}if(!h&&k&&k.rootNode){h=k;k=h.rootNode}else k=k;k=k?c.byId(k):c.body();h=h||{};var n=(h.scope||g._scopeName)+"Type",r="data-"+(h.scope||g._scopeName)+"-",m={};if(h&&h.inherited)for(var o in h.inherited)if(h.inherited[o])m[o]=h.inherited[o];o=[];l({node:k,inherited:m},o);return this.instantiate(o,h&&h.template?{template:true}:null,h)}});(function(){var d=function(){c.config.parseOnLoad&&c.parser.parse()};c.getObject("dijit.wai.onload")===c._loaders[0]?c._loaders.splice(1,0,d):c._loaders.unshift(d)})();
return c.parser});
define("dojo/cache",["dojo"],function(c){var d={};c.cache=function(a,e,f){if(typeof a=="string")var g=c.moduleUrl(a,e);else{g=a;f=e}g=g.toString();var j=f;if(f!=undefined&&!c.isString(f))j="value"in f?f.value:undefined;f=f&&f.sanitize?true:false;if(typeof j=="string")j=d[g]=f?c.cache._sanitize(j):j;else if(j===null)delete d[g];else{if(!(g in d)){j=undefined;if(c.isFunction(require)&&c.isString(a))try{var i=(a?a.replace(/\./g,"/")+"/":"")+e;j=require("text!"+i)}catch(k){}if(typeof j==="undefined")j=
c._getText(g);d[g]=f?c.cache._sanitize(j):j}j=d[g]}return j};c.cache._sanitize=function(a){if(a){a=a.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,"");var e=a.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);if(e)a=e[1]}else a="";return a};return c.cache});
define("dijit/_Templated",["dojo","dijit","dijit/_Widget","dojo/string","dojo/parser","dojo/cache"],function(c,d){c.declare("dijit._Templated",null,{templateString:null,templatePath:null,widgetsInTemplate:false,_skipNodeCache:false,_earlyTemplatedStartup:false,constructor:function(){this._attachPoints=[];this._attachEvents=[]},_stringRepl:function(a){var e=this.declaredClass,f=this;return c.string.substitute(a,this,function(g,j){if(j.charAt(0)=="!")g=c.getObject(j.substr(1),false,f);if(typeof g==
"undefined")throw new Error(e+" template:"+j);if(g==null)return"";return j.charAt(0)=="!"?g:g.toString().replace(/"/g,"&quot;")},this)},buildRendering:function(){var a=d._Templated.getCachedTemplate(this.templatePath,this.templateString,this._skipNodeCache),e;if(c.isString(a)){e=c._toDom(this._stringRepl(a));if(e.nodeType!=1)throw new Error("Invalid template: "+a);}else e=a.cloneNode(true);this.domNode=e;this.inherited(arguments);this._attachTemplateNodes(e);if(this.widgetsInTemplate){a=this._startupWidgets=
c.parser.parse(e,{noStart:!this._earlyTemplatedStartup,template:true,inherited:{dir:this.dir,lang:this.lang},propsThis:this,scope:"dojo"});this._supportingWidgets=d.findWidgets(e);this._attachTemplateNodes(a,function(f,g){return f[g]})}this._fillContent(this.srcNodeRef)},_fillContent:function(a){var e=this.containerNode;if(a&&e)for(;a.hasChildNodes();)e.appendChild(a.firstChild)},_attachTemplateNodes:function(a,e){e=e||function(n,r){return n.getAttribute(r)};for(var f=c.isArray(a)?a:a.all||a.getElementsByTagName("*"),
g=c.isArray(a)?0:-1;g<f.length;g++){var j=g==-1?a:f[g];if(!(this.widgetsInTemplate&&(e(j,"dojoType")||e(j,"data-dojo-type")))){var i=e(j,"dojoAttachPoint")||e(j,"data-dojo-attach-point");if(i)for(var k=i.split(/\s*,\s*/);i=k.shift();){if(c.isArray(this[i]))this[i].push(j);else this[i]=j;this._attachPoints.push(i)}if(i=e(j,"dojoAttachEvent")||e(j,"data-dojo-attach-event")){k=i.split(/\s*,\s*/);for(var h=c.trim;i=k.shift();)if(i){var l=null;if(i.indexOf(":")!=-1){l=i.split(":");i=h(l[0]);l=h(l[1])}else i=
h(i);l||(l=i);this._attachEvents.push(this.connect(j,i,l))}}(i=e(j,"waiRole"))&&d.setWaiRole(j,i);(i=e(j,"waiState"))&&c.forEach(i.split(/\s*,\s*/),function(n){if(n.indexOf("-")!=-1){n=n.split("-");d.setWaiState(j,n[0],n[1])}})}}},startup:function(){c.forEach(this._startupWidgets,function(a){a&&!a._started&&a.startup&&a.startup()});this.inherited(arguments)},destroyRendering:function(){c.forEach(this._attachPoints,function(a){delete this[a]},this);this._attachPoints=[];c.forEach(this._attachEvents,
this.disconnect,this);this._attachEvents=[];this.inherited(arguments)}});d._Templated._templateCache={};d._Templated.getCachedTemplate=function(a,e,f){var g=d._Templated._templateCache,j=e||a,i=g[j];if(i){try{if(!i.ownerDocument||i.ownerDocument==c.doc)return i}catch(k){}c.destroy(i)}e||(e=c.cache(a,{sanitize:true}));e=c.string.trim(e);if(f||e.match(/\$\{([^\}]+)\}/g))return g[j]=e;else{a=c._toDom(e);if(a.nodeType!=1)throw new Error("Invalid template: "+e);return g[j]=a}};c.isIE&&c.addOnWindowUnload(function(){var a=
d._Templated._templateCache;for(var e in a){var f=a[e];typeof f=="object"&&c.destroy(f);delete a[e]}});c.extend(d._Widget,{dojoAttachEvent:"",dojoAttachPoint:"",waiRole:"",waiState:""});return d._Templated});
define("dijit/_CssStateMixin",["dojo","dijit"],function(c,d){c.declare("dijit._CssStateMixin",[],{cssStateNodes:{},hovering:false,active:false,_applyAttributes:function(){this.inherited(arguments);c.forEach(["onmouseenter","onmouseleave","onmousedown"],function(e){this.connect(this.domNode,e,"_cssMouseEvent")},this);c.forEach(["disabled","readOnly","checked","selected","focused","state","hovering","active"],function(e){this.watch(e,c.hitch(this,"_setStateClass"))},this);for(var a in this.cssStateNodes)this._trackMouseState(this[a],
this.cssStateNodes[a]);this._setStateClass()},_cssMouseEvent:function(a){if(!this.disabled)switch(a.type){case "mouseenter":case "mouseover":this._set("hovering",true);this._set("active",this._mouseDown);break;case "mouseleave":case "mouseout":this._set("hovering",false);this._set("active",false);break;case "mousedown":this._set("active",true);this._mouseDown=true;var e=this.connect(c.body(),"onmouseup",function(){this._mouseDown=false;this._set("active",false);this.disconnect(e)});break}},_setStateClass:function(){function a(k){e=
e.concat(c.map(e,function(h){return h+k}),"dijit"+k)}var e=this.baseClass.split(" ");this.isLeftToRight()||a("Rtl");this.checked&&a("Checked");this.state&&a(this.state);this.selected&&a("Selected");if(this.disabled)a("Disabled");else if(this.readOnly)a("ReadOnly");else if(this.active)a("Active");else this.hovering&&a("Hover");this._focused&&a("Focused");var f=this.stateNode||this.domNode,g={};c.forEach(f.className.split(" "),function(k){g[k]=true});"_stateClasses"in this&&c.forEach(this._stateClasses,
function(k){delete g[k]});c.forEach(e,function(k){g[k]=true});var j=[];for(var i in g)j.push(i);f.className=j.join(" ");this._stateClasses=e},_trackMouseState:function(a,e){function f(){var l="disabled"in k&&k.disabled||"readonly"in k&&k.readonly;c.toggleClass(a,e+"Hover",g&&!j&&!l);c.toggleClass(a,e+"Active",j&&!l);c.toggleClass(a,e+"Focused",i&&!l)}var g=false,j=false,i=false,k=this,h=c.hitch(this,"connect",a);h("onmouseenter",function(){g=true;f()});h("onmouseleave",function(){j=g=false;f()});
h("onmousedown",function(){j=true;f()});h("onmouseup",function(){j=false;f()});h("onfocus",function(){i=true;f()});h("onblur",function(){i=false;f()});this.watch("disabled",f);this.watch("readOnly",f)}});return d._CssStateMixin});
define("dijit/form/_FormWidget",["dojo","dijit","dojo/window","dijit/_Widget","dijit/_Templated","dijit/_CssStateMixin"],function(c,d){c.declare("dijit.form._FormWidget",[d._Widget,d._Templated,d._CssStateMixin],{name:"",alt:"",value:"",type:"text",tabIndex:"0",disabled:false,intermediateChanges:false,scrollOnFocus:true,attributeMap:c.delegate(d._Widget.prototype.attributeMap,{value:"focusNode",id:"focusNode",tabIndex:"focusNode",alt:"focusNode",title:"focusNode"}),postMixInProperties:function(){this.nameAttrSetting=
this.name?'name="'+this.name.replace(/'/g,"&quot;")+'"':"";this.inherited(arguments)},postCreate:function(){this.inherited(arguments);this.connect(this.domNode,"onmousedown","_onMouseDown")},_setDisabledAttr:function(a){this._set("disabled",a);c.attr(this.focusNode,"disabled",a);this.valueNode&&c.attr(this.valueNode,"disabled",a);d.setWaiState(this.focusNode,"disabled",a);if(a){this._set("hovering",false);this._set("active",false);a="tabIndex"in this.attributeMap?this.attributeMap.tabIndex:"focusNode";
c.forEach(c.isArray(a)?a:[a],function(e){e=this[e];c.isWebKit||d.hasDefaultTabStop(e)?e.setAttribute("tabIndex","-1"):e.removeAttribute("tabIndex")},this)}else this.tabIndex!=""&&this.focusNode.setAttribute("tabIndex",this.tabIndex)},setDisabled:function(a){c.deprecated("setDisabled("+a+") is deprecated. Use set('disabled',"+a+") instead.","","2.0");this.set("disabled",a)},_onFocus:function(){this.scrollOnFocus&&c.window.scrollIntoView(this.domNode);this.inherited(arguments)},isFocusable:function(){return!this.disabled&&
this.focusNode&&c.style(this.domNode,"display")!="none"},focus:function(){this.disabled||d.focus(this.focusNode)},compare:function(a,e){return typeof a=="number"&&typeof e=="number"?isNaN(a)&&isNaN(e)?0:a-e:a>e?1:a<e?-1:0},onChange:function(){},_onChangeActive:false,_handleOnChange:function(a,e){if(this._lastValueReported==undefined&&(e===null||!this._onChangeActive))this._resetValue=this._lastValueReported=a;this._pendingOnChange=this._pendingOnChange||typeof a!=typeof this._lastValueReported||this.compare(a,
this._lastValueReported)!=0;if((this.intermediateChanges||e||e===undefined)&&this._pendingOnChange){this._lastValueReported=a;this._pendingOnChange=false;if(this._onChangeActive){this._onChangeHandle&&clearTimeout(this._onChangeHandle);this._onChangeHandle=setTimeout(c.hitch(this,function(){this._onChangeHandle=null;this.onChange(a)}),0)}}},create:function(){this.inherited(arguments);this._onChangeActive=true},destroy:function(){if(this._onChangeHandle){clearTimeout(this._onChangeHandle);this.onChange(this._lastValueReported)}this.inherited(arguments)},
setValue:function(a){c.deprecated("dijit.form._FormWidget:setValue("+a+") is deprecated.  Use set('value',"+a+") instead.","","2.0");this.set("value",a)},getValue:function(){c.deprecated(this.declaredClass+"::getValue() is deprecated. Use get('value') instead.","","2.0");return this.get("value")},_onMouseDown:function(a){if(!a.ctrlKey&&c.mouseButtons.isLeft(a)&&this.isFocusable())var e=this.connect(c.body(),"onmouseup",function(){this.isFocusable()&&this.focus();this.disconnect(e)})}});c.declare("dijit.form._FormValueWidget",
d.form._FormWidget,{readOnly:false,attributeMap:c.delegate(d.form._FormWidget.prototype.attributeMap,{value:"",readOnly:"focusNode"}),_setReadOnlyAttr:function(a){c.attr(this.focusNode,"readOnly",a);d.setWaiState(this.focusNode,"readonly",a);this._set("readOnly",a)},postCreate:function(){this.inherited(arguments);if(c.isIE<9||c.isIE&&c.isQuirks)this.connect(this.focusNode||this.domNode,"onkeydown",this._onKeyDown);if(this._resetValue===undefined)this._lastValueReported=this._resetValue=this.value},
_setValueAttr:function(a,e){this._handleOnChange(a,e)},_handleOnChange:function(a){this._set("value",a);this.inherited(arguments)},undo:function(){this._setValueAttr(this._lastValueReported,false)},reset:function(){this._hasBeenBlurred=false;this._setValueAttr(this._resetValue,true)},_onKeyDown:function(a){if(a.keyCode==c.keys.ESCAPE&&!(a.ctrlKey||a.altKey||a.metaKey)){var e;if(c.isIE){a.preventDefault();e=document.createEventObject();e.keyCode=c.keys.ESCAPE;e.shiftKey=a.shiftKey;a.srcElement.fireEvent("onkeypress",
e)}}},_layoutHackIE7:function(){if(c.isIE==7)for(var a=this.domNode,e=a.parentNode,f=a.firstChild||a,g=f.style.filter,j=this;e&&e.clientHeight==0;){(function(){var i=j.connect(e,"onscroll",function(){j.disconnect(i);f.style.filter=(new Date).getMilliseconds();setTimeout(function(){f.style.filter=g},0)})})();e=e.parentNode}}});return d.form._FormWidget});
define("dijit/form/TextBox",["dojo","dijit","text!dijit/form/templates/TextBox.html","dijit/form/_FormWidget"],function(c,d){c.declare("dijit.form.TextBox",d.form._FormValueWidget,{trim:false,uppercase:false,lowercase:false,propercase:false,maxLength:"",selectOnClick:false,placeHolder:"",templateString:c.cache("dijit.form","templates/TextBox.html"),_singleNodeTemplate:'<input class="dijit dijitReset dijitLeft dijitInputField" dojoAttachPoint="textbox,focusNode" autocomplete="off" type="${type}" ${!nameAttrSetting} />',
_buttonInputDisabled:c.isIE?"disabled":"",baseClass:"dijitTextBox",attributeMap:c.delegate(d.form._FormValueWidget.prototype.attributeMap,{maxLength:"focusNode"}),postMixInProperties:function(){var a=this.type.toLowerCase();if(this.templateString&&this.templateString.toLowerCase()=="input"||(a=="hidden"||a=="file")&&this.templateString==d.form.TextBox.prototype.templateString)this.templateString=this._singleNodeTemplate;this.inherited(arguments)},_setPlaceHolderAttr:function(a){this._set("placeHolder",
a);if(!this._phspan){this._attachPoints.push("_phspan");this._phspan=c.create("span",{className:"dijitPlaceHolder dijitInputField"},this.textbox,"after")}this._phspan.innerHTML="";this._phspan.appendChild(document.createTextNode(a));this._updatePlaceHolder()},_updatePlaceHolder:function(){if(this._phspan)this._phspan.style.display=this.placeHolder&&!this._focused&&!this.textbox.value?"":"none"},_getValueAttr:function(){return this.parse(this.get("displayedValue"),this.constraints)},_setValueAttr:function(a,
e,f){var g;if(a!==undefined){g=this.filter(a);if(typeof f!="string")f=g!==null&&(typeof g!="number"||!isNaN(g))?this.filter(this.format(g,this.constraints)):""}if(f!=null&&f!=undefined&&(typeof f!="number"||!isNaN(f))&&this.textbox.value!=f){this.textbox.value=f;this._set("displayedValue",this.get("displayedValue"))}this._updatePlaceHolder();this.inherited(arguments,[g,e])},displayedValue:"",getDisplayedValue:function(){c.deprecated(this.declaredClass+"::getDisplayedValue() is deprecated. Use set('displayedValue') instead.",
"","2.0");return this.get("displayedValue")},_getDisplayedValueAttr:function(){return this.filter(this.textbox.value)},setDisplayedValue:function(a){c.deprecated(this.declaredClass+"::setDisplayedValue() is deprecated. Use set('displayedValue', ...) instead.","","2.0");this.set("displayedValue",a)},_setDisplayedValueAttr:function(a){if(a===null||a===undefined)a="";else if(typeof a!="string")a=String(a);this.textbox.value=a;this._setValueAttr(this.get("value"),undefined);this._set("displayedValue",
this.get("displayedValue"))},format:function(a){return a==null||a==undefined?"":a.toString?a.toString():a},parse:function(a){return a},_refreshState:function(){},_onInput:function(a){if(a&&a.type&&/key/i.test(a.type)&&a.keyCode)switch(a.keyCode){case c.keys.SHIFT:case c.keys.ALT:case c.keys.CTRL:case c.keys.TAB:return}if(this.intermediateChanges){var e=this;setTimeout(function(){e._handleOnChange(e.get("value"),false)},0)}this._refreshState();this._set("displayedValue",this.get("displayedValue"))},
postCreate:function(){c.isIE&&setTimeout(c.hitch(this,function(){var a=c.getComputedStyle(this.domNode);if(a)if(a=a.fontFamily){var e=this.domNode.getElementsByTagName("INPUT");if(e)for(var f=0;f<e.length;f++)e[f].style.fontFamily=a}}),0);this.textbox.setAttribute("value",this.textbox.value);this.inherited(arguments);if(c.isMoz||c.isOpera)this.connect(this.textbox,"oninput","_onInput");else{this.connect(this.textbox,"onkeydown","_onInput");this.connect(this.textbox,"onkeyup","_onInput");this.connect(this.textbox,
"onpaste","_onInput");this.connect(this.textbox,"oncut","_onInput")}},_blankValue:"",filter:function(a){if(a===null)return this._blankValue;if(typeof a!="string")return a;if(this.trim)a=c.trim(a);if(this.uppercase)a=a.toUpperCase();if(this.lowercase)a=a.toLowerCase();if(this.propercase)a=a.replace(/[^\s]+/g,function(e){return e.substring(0,1).toUpperCase()+e.substring(1)});return a},_setBlurValue:function(){this._setValueAttr(this.get("value"),true)},_onBlur:function(){if(!this.disabled){this._setBlurValue();
this.inherited(arguments);this._selectOnClickHandle&&this.disconnect(this._selectOnClickHandle);if(this.selectOnClick&&c.isMoz)this.textbox.selectionStart=this.textbox.selectionEnd=undefined;this._updatePlaceHolder()}},_onFocus:function(a){if(!(this.disabled||this.readOnly)){if(this.selectOnClick&&a=="mouse")this._selectOnClickHandle=this.connect(this.domNode,"onmouseup",function(){this.disconnect(this._selectOnClickHandle);var e;if(c.isIE){e=c.doc.selection.createRange();e=e.parentElement()==this.textbox&&
e.text.length==0}else e=this.textbox.selectionStart==this.textbox.selectionEnd;e&&d.selectInputText(this.textbox)});this._updatePlaceHolder();this.inherited(arguments);this._refreshState()}},reset:function(){this.textbox.value="";this.inherited(arguments)}});d.selectInputText=function(a,e,f){var g=c.global,j=c.doc;a=c.byId(a);if(isNaN(e))e=0;if(isNaN(f))f=a.value?a.value.length:0;d.focus(a);if(j.selection&&c.body().createTextRange){if(a.createTextRange){a=a.createTextRange();a.collapse(true);a.moveStart("character",
-99999);a.moveStart("character",e);a.moveEnd("character",f-e);a.select()}}else g.getSelection&&a.setSelectionRange&&a.setSelectionRange(e,f)};return d.form.TextBox});define("text!dijit/templates/Tooltip.html",function(){return'<div class="dijitTooltip dijitTooltipLeft" id="dojoTooltip"\n\t><div class="dijitTooltipContainer dijitTooltipContents" dojoAttachPoint="containerNode" role=\'alert\'></div\n\t><div class="dijitTooltipConnector" dojoAttachPoint="connectorNode"></div\n></div>'});
define("dijit/Tooltip",["dojo","dijit","dijit/_Widget","dijit/_Templated","text!dijit/templates/Tooltip.html"],function(c,d){c.declare("dijit._MasterTooltip",[d._Widget,d._Templated],{duration:d.defaultDuration,templateString:c.cache("dijit","templates/Tooltip.html"),postCreate:function(){c.body().appendChild(this.domNode);this.bgIframe=new d.BackgroundIframe(this.domNode);this.fadeIn=c.fadeIn({node:this.domNode,duration:this.duration,onEnd:c.hitch(this,"_onShow")});this.fadeOut=c.fadeOut({node:this.domNode,
duration:this.duration,onEnd:c.hitch(this,"_onHide")})},show:function(a,e,f,g){if(!(this.aroundNode&&this.aroundNode===e)){this.domNode.width="auto";if(this.fadeOut.status()=="playing")this._onDeck=arguments;else{this.containerNode.innerHTML=a;d.placeOnScreenAroundElement(this.domNode,e,d.getPopupAroundAlignment(f&&f.length?f:d.Tooltip.defaultPosition,!g),c.hitch(this,"orient"));c.style(this.domNode,"opacity",0);this.fadeIn.play();this.isShowingNow=true;this.aroundNode=e}}},orient:function(a,e,f,
g,j){this.connectorNode.style.top="";var i=g.w-this.connectorNode.offsetWidth;a.className="dijitTooltip "+{"BL-TL":"dijitTooltipBelow dijitTooltipABLeft","TL-BL":"dijitTooltipAbove dijitTooltipABLeft","BR-TR":"dijitTooltipBelow dijitTooltipABRight","TR-BR":"dijitTooltipAbove dijitTooltipABRight","BR-BL":"dijitTooltipRight","BL-BR":"dijitTooltipLeft"}[e+"-"+f];this.domNode.style.width="auto";var k=c.contentBox(this.domNode),h=Math.min(Math.max(i,1),k.w),l=h<k.w;this.domNode.style.width=h+"px";if(l){this.containerNode.style.overflow=
"auto";l=this.containerNode.scrollWidth;this.containerNode.style.overflow="visible";if(l>h){l=l+c.style(this.domNode,"paddingLeft")+c.style(this.domNode,"paddingRight");this.domNode.style.width=l+"px"}}if(f.charAt(0)=="B"&&e.charAt(0)=="B"){a=c.marginBox(a);e=this.connectorNode.offsetHeight;if(a.h>g.h){this.connectorNode.style.top=g.h-j.h/2-e/2+"px";this.connectorNode.style.bottom=""}else{this.connectorNode.style.bottom=Math.min(Math.max(j.h/2-e/2,0),a.h-e)+"px";this.connectorNode.style.top=""}}else{this.connectorNode.style.top=
"";this.connectorNode.style.bottom=""}return Math.max(0,k.w-i)},_onShow:function(){if(c.isIE)this.domNode.style.filter=""},hide:function(a){if(this._onDeck&&this._onDeck[1]==a)this._onDeck=null;else if(this.aroundNode===a){this.fadeIn.stop();this.isShowingNow=false;this.aroundNode=null;this.fadeOut.play()}},_onHide:function(){this.domNode.style.cssText="";this.containerNode.innerHTML="";if(this._onDeck){this.show.apply(this,this._onDeck);this._onDeck=null}}});d.showTooltip=function(a,e,f,g){if(!d._masterTT)d._masterTT=
new d._MasterTooltip;return d._masterTT.show(a,e,f,g)};d.hideTooltip=function(a){if(!d._masterTT)d._masterTT=new d._MasterTooltip;return d._masterTT.hide(a)};c.declare("dijit.Tooltip",d._Widget,{label:"",showDelay:400,connectId:[],position:[],_setConnectIdAttr:function(a){c.forEach(this._connections||[],function(f){c.forEach(f,c.hitch(this,"disconnect"))},this);var e=c.isArrayLike(a)?a:a?[a]:[];this._connections=c.map(e,function(f){return(f=c.byId(f))?[this.connect(f,"onmouseenter","_onTargetMouseEnter"),
this.connect(f,"onmouseleave","_onTargetMouseLeave"),this.connect(f,"onfocus","_onTargetFocus"),this.connect(f,"onblur","_onTargetBlur")]:[]},this);this._set("connectId",a);this._connectIds=e},addTarget:function(a){a=a.id||a;c.indexOf(this._connectIds,a)==-1&&this.set("connectId",this._connectIds.concat(a))},removeTarget:function(a){a=c.indexOf(this._connectIds,a.id||a);if(a>=0){this._connectIds.splice(a,1);this.set("connectId",this._connectIds)}},buildRendering:function(){this.inherited(arguments);
c.addClass(this.domNode,"dijitTooltipData")},startup:function(){this.inherited(arguments);var a=this.connectId;c.forEach(c.isArrayLike(a)?a:[a],this.addTarget,this)},_onTargetMouseEnter:function(a){this._onHover(a)},_onTargetMouseLeave:function(a){this._onUnHover(a)},_onTargetFocus:function(a){this._focus=true;this._onHover(a)},_onTargetBlur:function(a){this._focus=false;this._onUnHover(a)},_onHover:function(a){if(!this._showTimer){var e=a.target;this._showTimer=setTimeout(c.hitch(this,function(){this.open(e)}),
this.showDelay)}},_onUnHover:function(){if(!this._focus){if(this._showTimer){clearTimeout(this._showTimer);delete this._showTimer}this.close()}},open:function(a){if(this._showTimer){clearTimeout(this._showTimer);delete this._showTimer}d.showTooltip(this.label||this.domNode.innerHTML,a,this.position,!this.isLeftToRight());this._connectNode=a;this.onShow(a,this.position)},close:function(){if(this._connectNode){d.hideTooltip(this._connectNode);delete this._connectNode;this.onHide()}if(this._showTimer){clearTimeout(this._showTimer);
delete this._showTimer}},onShow:function(){},onHide:function(){},uninitialize:function(){this.close();this.inherited(arguments)}});d.Tooltip.defaultPosition=["after","before"];return d.Tooltip});
(function(){function c(e,f,g,j,i,k){if(f[e]){g.push(e);if(f[e]===true||f[e]===1)j.push(i+e+"/"+k)}}function d(e,f,g,j,i){f=j+f+"/"+i;require._fileExists(e.nameToUrl(f,null))&&g.push(f)}var a=/(^.*(^|\/)nls(\/|$))([^\/]*)\/?([^\/]*)/;define("i18n",{version:"0.24.0",load:function(e,f,g,j){j=j||{};var i=a.exec(e),k=i[1],h=i[4],l=i[5],n=h.split("-"),r=[],m={},o,p,s="";if(i[5]){k=i[1];e=k+l}else{e=e;l=i[4];h=j.locale||(j.locale=typeof navigator==="undefined"?"root":(navigator.language||navigator.userLanguage||
"root").toLowerCase());n=h.split("-")}if(j.isBuild){r.push(e);d(f,"root",r,k,l);for(o=0;p=n[o];o++){s+=(s?"-":"")+p;d(f,s,r,k,l)}f(r);g()}else f([e],function(q){var u=[];c("root",q,u,r,k,l);for(o=0;p=n[o];o++){s+=(s?"-":"")+p;c(s,q,u,r,k,l)}f(r,function(){var y,C;for(y=u.length-1;y>-1&&(p=u[y]);y--){C=q[p];if(C===true||C===1)C=f(k+p+"/"+l);require.mixin(m,C)}g(m)})})}})})();
define("dijit/form/nls/validate",{root:{invalidMessage:"The value entered is not valid.",missingMessage:"This value is required.",rangeMessage:"This value is out of range."},zh:true,"zh-tw":true,tr:true,th:true,sv:true,sl:true,sk:true,ru:true,ro:true,pt:true,"pt-pt":true,pl:true,nl:true,nb:true,ko:true,kk:true,ja:true,it:true,hu:true,he:true,fr:true,fi:true,es:true,el:true,de:true,da:true,cs:true,ca:true,ar:true});
define("dijit/form/ValidationTextBox",["dojo","dijit","text!dijit/form/templates/ValidationTextBox.html","dojo/i18n","dijit/form/TextBox","dijit/Tooltip","i18n!dijit/form/nls/validate"],function(c,d){c.declare("dijit.form.ValidationTextBox",d.form.TextBox,{templateString:c.cache("dijit.form","templates/ValidationTextBox.html"),baseClass:"dijitTextBox dijitValidationTextBox",required:false,promptMessage:"",invalidMessage:"$_unset_$",missingMessage:"$_unset_$",message:"",constraints:{},regExp:".*",
regExpGen:function(){return this.regExp},state:"",tooltipPosition:[],_setValueAttr:function(){this.inherited(arguments);this.validate(this._focused)},validator:function(a,e){return(new RegExp("^(?:"+this.regExpGen(e)+")"+(this.required?"":"?")+"$")).test(a)&&(!this.required||!this._isEmpty(a))&&(this._isEmpty(a)||this.parse(a,e)!==undefined)},_isValidSubset:function(){return this.textbox.value.search(this._partialre)==0},isValid:function(){return this.validator(this.textbox.value,this.constraints)},
_isEmpty:function(a){return(this.trim?/^\s*$/:/^$/).test(a)},getErrorMessage:function(){return this.required&&this._isEmpty(this.textbox.value)?this.missingMessage:this.invalidMessage},getPromptMessage:function(){return this.promptMessage},_maskValidSubsetError:true,validate:function(a){var e="",f=this.disabled||this.isValid(a);if(f)this._maskValidSubsetError=true;var g=this._isEmpty(this.textbox.value),j=!f&&a&&this._isValidSubset();this._set("state",f?"":((!this._hasBeenBlurred||a)&&g||j)&&this._maskValidSubsetError?
"Incomplete":"Error");d.setWaiState(this.focusNode,"invalid",f?"false":"true");if(this.state=="Error"){this._maskValidSubsetError=a&&j;e=this.getErrorMessage(a)}else if(this.state=="Incomplete"){e=this.getPromptMessage(a);this._maskValidSubsetError=!this._hasBeenBlurred||a}else if(g)e=this.getPromptMessage(a);this.set("message",e);return f},displayMessage:function(a){d.hideTooltip(this.domNode);a&&this._focused&&d.showTooltip(a,this.domNode,this.tooltipPosition,!this.isLeftToRight())},_refreshState:function(){this.validate(this._focused);
this.inherited(arguments)},constructor:function(){this.constraints={}},_setConstraintsAttr:function(a){if(!a.locale&&this.lang)a.locale=this.lang;this._set("constraints",a);this._computePartialRE()},_computePartialRE:function(){var a=this.regExpGen(this.constraints);this.regExp=a;var e="";a!=".*"&&this.regExp.replace(/\\.|\[\]|\[.*?[^\\]{1}\]|\{.*?\}|\(\?[=:!]|./g,function(g){switch(g.charAt(0)){case "{":case "+":case "?":case "*":case "^":case "$":case "|":case "(":e+=g;break;case ")":e+="|$)";break;
default:e+="(?:"+g+"|$)";break}});try{"".search(e)}catch(f){e=this.regExp;console.warn("RegExp error in "+this.declaredClass+": "+this.regExp)}this._partialre="^(?:"+e+")$"},postMixInProperties:function(){this.inherited(arguments);this.messages=c.i18n.getLocalization("dijit.form","validate",this.lang);if(this.invalidMessage=="$_unset_$")this.invalidMessage=this.messages.invalidMessage;if(!this.invalidMessage)this.invalidMessage=this.promptMessage;if(this.missingMessage=="$_unset_$")this.missingMessage=
this.messages.missingMessage;if(!this.missingMessage)this.missingMessage=this.invalidMessage;this._setConstraintsAttr(this.constraints)},_setDisabledAttr:function(){this.inherited(arguments);this._refreshState()},_setRequiredAttr:function(a){this._set("required",a);d.setWaiState(this.focusNode,"required",a);this._refreshState()},_setMessageAttr:function(a){this._set("message",a);this.displayMessage(a)},reset:function(){this._maskValidSubsetError=true;this.inherited(arguments)},_onBlur:function(){this.displayMessage("");
this.inherited(arguments)}});c.declare("dijit.form.MappedTextBox",d.form.ValidationTextBox,{postMixInProperties:function(){this.inherited(arguments);this.nameAttrSetting=""},serialize:function(a){return a.toString?a.toString():""},toString:function(){var a=this.filter(this.get("value"));return a!=null?typeof a=="string"?a:this.serialize(a,this.constraints):""},validate:function(){this.valueNode.value=this.toString();return this.inherited(arguments)},buildRendering:function(){this.inherited(arguments);
this.valueNode=c.place("<input type='hidden'"+(this.name?" name='"+this.name.replace(/'/g,"&quot;")+"'":"")+"/>",this.textbox,"after")},reset:function(){this.valueNode.value="";this.inherited(arguments)}});c.declare("dijit.form.RangeBoundTextBox",d.form.MappedTextBox,{rangeMessage:"",rangeCheck:function(a,e){return("min"in e?this.compare(a,e.min)>=0:true)&&("max"in e?this.compare(a,e.max)<=0:true)},isInRange:function(){return this.rangeCheck(this.get("value"),this.constraints)},_isDefinitelyOutOfRange:function(){var a=
this.get("value"),e=false,f=false;if("min"in this.constraints){e=this.constraints.min;e=this.compare(a,typeof e=="number"&&e>=0&&a!=0?0:e);e=typeof e=="number"&&e<0}if("max"in this.constraints){f=this.constraints.max;f=this.compare(a,typeof f!="number"||f>0?f:0);f=typeof f=="number"&&f>0}return e||f},_isValidSubset:function(){return this.inherited(arguments)&&!this._isDefinitelyOutOfRange()},isValid:function(a){return this.inherited(arguments)&&(this._isEmpty(this.textbox.value)&&!this.required||
this.isInRange(a))},getErrorMessage:function(a){var e=this.get("value");if(e!==null&&e!==""&&e!==undefined&&(typeof e!="number"||!isNaN(e))&&!this.isInRange(a))return this.rangeMessage;return this.inherited(arguments)},postMixInProperties:function(){this.inherited(arguments);if(!this.rangeMessage){this.messages=c.i18n.getLocalization("dijit.form","validate",this.lang);this.rangeMessage=this.messages.rangeMessage}},_setConstraintsAttr:function(){this.inherited(arguments);if(this.focusNode){this.constraints.min!==
undefined?d.setWaiState(this.focusNode,"valuemin",this.constraints.min):d.removeWaiState(this.focusNode,"valuemin");this.constraints.max!==undefined?d.setWaiState(this.focusNode,"valuemax",this.constraints.max):d.removeWaiState(this.focusNode,"valuemax")}},_setValueAttr:function(a){d.setWaiState(this.focusNode,"valuenow",a);this.inherited(arguments)}});return d.form.ValidationTextBox});
define("orion/util",["dojo","dijit","dojo/hash","dijit/form/ValidationTextBox"],function(c,d){function a(v){C=v}function e(){return C}function f(v){var w="",A=navigator.platform.indexOf("Mac")!==-1;if(v.mod1)w+=A?"Cmd+":"Ctrl+";if(v.mod2)w+="Shift+";if(v.mod3)w+="Alt+";if(v.alphaKey)return w+v.alphaKey;for(var z in c.keys)if(typeof(c.keys[z]==="number"))if(c.keys[z]===v.keyCode)return w+z;var F;switch(v.keyCode){case 59:F=v.mod2?":":";";break;case 61:F=v.mod2?"+":"=";break;case 188:F=v.mod2?"<":",";
break;case 190:F=v.mod2?">":".";break;case 191:F=v.mod2?"?":"/";break;case 192:F=v.mod2?"~":"`";break;case 219:F=v.mod2?"{":"[";break;case 220:F=v.mod2?"|":"\\";break;case 221:F=v.mod2?"}":"]";break;case 222:F=v.mod2?'"':"'";break}if(F)return w+F;return w+String.fromCharCode(v.keyCode)}function g(v,w){v.startup();if(typeof w==="string"){var A=c.byId(w);if(!A)if(A=d.byId(w))A=A.domNode;w=A?A:null}if(w){w=c.position(w);v._setStyleAttr("left:"+(w.x+16)+"px !important;");v._setStyleAttr("top:"+(w.y+16)+
"px !important;")}v.show()}function j(v,w,A,z,F,G,H,I,J){H=function(Q){return function(P){var O=d.byId(v),W=O.get("value");if(Q&&P.keyCode===c.keys.ESCAPE){A&&c.style(w,"display","inline");O.destroyRecursive();G&&G()}else if(!(Q&&P.keyCode!==c.keys.ENTER)){if(!O.isValid()||!J&&W===z)A&&c.style(w,"display","inline");else F(W);O.destroyRecursive();G&&G()}}};var N=new d.form.ValidationTextBox({id:v,required:true,value:z||""});c.place(N.domNode,w,"after");c.addClass(N.domNode,"userEditBoxPrompt");A&&
c.style(w,"display","none");c.connect(N,"onKeyDown",H(true));c.connect(N,"onBlur",H(false));window.setTimeout(function(){N.focus();if(z){var Q=c.byId(v),P=I?z.indexOf(I):-1;P>0?d.selectInputText(Q,0,P):Q.select()}},0)}function i(v){var w=window.navigator.platform.indexOf("Mac")!==-1;return w&&v.metaKey||!w&&v.ctrlKey}function k(v,w){if(w&&i(w))window.open(v);else window.location=v}function h(v){if(!v)return v;var w=window.location.href.split("#")[0];w=w.substring(0,w.length-window.location.pathname.length);
if(v.indexOf(w)===0)return v.substring(w.length);return v}function l(v){var w,A,z,F,G;v=v.split("#");var H=v[v.length-1].split(/\?(?=(?:line|char))/);v=h(H[0]);if(H.length>1){H=H[1].split(/\&(?=(?:line|char))/);for(var I=0;I<H.length;I++){var J=H[I].split("=");if(J.length>1)switch(J[0]){case "char":J=J[1].split(",");if(z===undefined){w=window.parseInt(J[0]);if(J.length>1)A=window.parseInt(J[1])}else{F=window.parseInt(J[0]);if(J.length>1)G=window.parseInt(J[1])}break;case "line":J=J[1].split(",");
z=window.parseInt(J[0]);break;default:break}}}return{filePath:v,start:w,end:A,line:z,offset:F,length:G}}function n(v,w,A,z,F,G){if(typeof w==="number"){v="#"+v+"?char="+w;if(typeof A==="number")v=v+","+A;else if(typeof G==="number")v=v+","+(w+G);return v}if(typeof z==="number"){v="#"+v+"?line="+z;if(typeof F==="number"){v=v+"&char="+F;if(typeof G==="number")v=v+","+(F+G)}return v}return"#"+v}function r(v){if(!v)return v;var w=window.location.href.split("#")[0];return w.substring(0,w.length-window.location.pathname.length)+
v}function m(v){return this.makeRelative(v).indexOf("/workspace")===0}function o(v,w){v.children=w;for(var A in w)w[A].parent=v;v.children.sort(function(z,F){var G=z.Directory;if(G!==F.Directory)return G?-1:1;z=z.Name&&z.Name.toLowerCase();F=F.Name&&F.Name.toLowerCase();if(z<F)return-1;if(z>F)return 1;return 0})}function p(v){v.children.sort(function(w,A){var z=w.type==="dir";if(z!==(A.type==="dir"))return z?-1:1;w=w.name&&w.name.toLowerCase();A=A.name&&A.name.toLowerCase();if(w<A)return-1;if(w>A)return 1;
return 0})}function s(v,w){v.Parents&&v.Parents.length===0&&w.getService("orion.core.preference").then(function(A){return A.getPreferences("/window/recent")}).then(function(A){var z=A.get("projects");if(typeof z==="string")z=JSON.parse(z);var F=[];if(z&&z.length&&z.length>0)for(var G=0;G<z.length;G++)z[G].location!==v.ChildrenLocation&&z[G].name!==v.Name&&F.push(z[G]);F.push({name:v.Name,location:v.ChildrenLocation});if(F.length>5)F=F.slice(-5,F.length);A.put("projects",F)})}function q(v){return typeof v.textContent!==
"undefined"?v.textContent:v.innerText}function u(v){return q(document.createTextNode(v))}function y(v,w){if(typeof v.textContent!=="undefined")v.textContent=w;else v.innerText=w}var C=null;return{setUserName:a,getUserName:e,getUserKeyString:f,openDialog:g,getUserText:j,openInNewWindow:i,followLink:k,getPositionInfo:l,hashFromPosition:n,makeRelative:h,makeFullPath:r,isAtRoot:m,processNavigatorParent:o,processSearchResultParent:p,rememberSuccessfulTraversal:s,getText:q,safeText:u,setText:y}});
define("text!dijit/templates/Menu.html",function(){return'<table class="dijit dijitMenu dijitMenuPassive dijitReset dijitMenuTable" role="menu" tabIndex="${tabIndex}" dojoAttachEvent="onkeypress:_onKeyPress" cellspacing="0">\n\t<tbody class="dijitReset" dojoAttachPoint="containerNode"></tbody>\n</table>'});
define("dijit/_Container",["dojo","dijit"],function(c,d){c.declare("dijit._Container",null,{isContainer:true,buildRendering:function(){this.inherited(arguments);if(!this.containerNode)this.containerNode=this.domNode},addChild:function(a,e){var f=this.containerNode;if(e&&typeof e=="number"){var g=this.getChildren();if(g&&g.length>=e){f=g[e-1].domNode;e="after"}}c.place(a.domNode,f,e);this._started&&!a._started&&a.startup()},removeChild:function(a){if(typeof a=="number")a=this.getChildren()[a];if(a)(a=
a.domNode)&&a.parentNode&&a.parentNode.removeChild(a)},hasChildren:function(){return this.getChildren().length>0},destroyDescendants:function(a){c.forEach(this.getChildren(),function(e){e.destroyRecursive(a)})},_getSiblingOfChild:function(a,e){a=a.domNode;e=e>0?"nextSibling":"previousSibling";do a=a[e];while(a&&(a.nodeType!=1||!d.byNode(a)));return a&&d.byNode(a)},getIndexOfChild:function(a){return c.indexOf(this.getChildren(),a)},startup:function(){if(!this._started){c.forEach(this.getChildren(),
function(a){a.startup()});this.inherited(arguments)}}});return d._Container});
define("dijit/_KeyNavContainer",["dojo","dijit","dijit/_Container"],function(c,d){c.declare("dijit._KeyNavContainer",d._Container,{tabIndex:"0",_keyNavCodes:{},connectKeyNavHandlers:function(a,e){var f=this._keyNavCodes={},g=c.hitch(this,this.focusPrev),j=c.hitch(this,this.focusNext);c.forEach(a,function(i){f[i]=g});c.forEach(e,function(i){f[i]=j});f[c.keys.HOME]=c.hitch(this,"focusFirstChild");f[c.keys.END]=c.hitch(this,"focusLastChild");this.connect(this.domNode,"onkeypress","_onContainerKeypress");
this.connect(this.domNode,"onfocus","_onContainerFocus")},startupKeyNavChildren:function(){c.forEach(this.getChildren(),c.hitch(this,"_startupChild"))},addChild:function(a){d._KeyNavContainer.superclass.addChild.apply(this,arguments);this._startupChild(a)},focus:function(){this.focusFirstChild()},focusFirstChild:function(){var a=this._getFirstFocusableChild();a&&this.focusChild(a)},focusLastChild:function(){var a=this._getLastFocusableChild();a&&this.focusChild(a)},focusNext:function(){this.focusChild(this._getNextFocusableChild(this.focusedChild,
1))},focusPrev:function(){this.focusChild(this._getNextFocusableChild(this.focusedChild,-1),true)},focusChild:function(a,e){this.focusedChild&&a!==this.focusedChild&&this._onChildBlur(this.focusedChild);a.set("tabIndex",this.tabIndex);a.focus(e?"end":"start");this._set("focusedChild",a)},_startupChild:function(a){a.set("tabIndex","-1");this.connect(a,"_onFocus",function(){a.set("tabIndex",this.tabIndex)});this.connect(a,"_onBlur",function(){a.set("tabIndex","-1")})},_onContainerFocus:function(a){if(a.target===
this.domNode){this.focusFirstChild();c.attr(this.domNode,"tabIndex","-1")}},_onBlur:function(){this.tabIndex&&c.attr(this.domNode,"tabIndex",this.tabIndex);this.inherited(arguments)},_onContainerKeypress:function(a){if(!(a.ctrlKey||a.altKey)){var e=this._keyNavCodes[a.charOrCode];if(e){e();c.stopEvent(a)}}},_onChildBlur:function(){},_getFirstFocusableChild:function(){return this._getNextFocusableChild(null,1)},_getLastFocusableChild:function(){return this._getNextFocusableChild(null,-1)},_getNextFocusableChild:function(a,
e){if(a)a=this._getSiblingOfChild(a,e);for(var f=this.getChildren(),g=0;g<f.length;g++){a||(a=f[e>0?0:f.length-1]);if(a.isFocusable())return a;a=this._getSiblingOfChild(a,e)}return null}});return d._KeyNavContainer});define("text!dijit/templates/MenuItem.html",function(){return'<tr class="dijitReset dijitMenuItem" dojoAttachPoint="focusNode" role="menuitem" tabIndex="-1"\n\t\tdojoAttachEvent="onmouseenter:_onHover,onmouseleave:_onUnhover,ondijitclick:_onClick">\n\t<td class="dijitReset dijitMenuItemIconCell" role="presentation">\n\t\t<img src="${_blankGif}" alt="" class="dijitIcon dijitMenuItemIcon" dojoAttachPoint="iconNode"/>\n\t</td>\n\t<td class="dijitReset dijitMenuItemLabel" colspan="2" dojoAttachPoint="containerNode"></td>\n\t<td class="dijitReset dijitMenuItemAccelKey" style="display: none" dojoAttachPoint="accelKeyNode"></td>\n\t<td class="dijitReset dijitMenuArrowCell" role="presentation">\n\t\t<div dojoAttachPoint="arrowWrapper" style="visibility: hidden">\n\t\t\t<img src="${_blankGif}" alt="" class="dijitMenuExpand"/>\n\t\t\t<span class="dijitMenuExpandA11y">+</span>\n\t\t</div>\n\t</td>\n</tr>'});
define("dijit/_Contained",["dojo","dijit"],function(c,d){c.declare("dijit._Contained",null,{getParent:function(){var a=d.getEnclosingWidget(this.domNode.parentNode);return a&&a.isContainer?a:null},_getSibling:function(a){var e=this.domNode;do e=e[a+"Sibling"];while(e&&e.nodeType!=1);return e&&d.byNode(e)},getPreviousSibling:function(){return this._getSibling("previous")},getNextSibling:function(){return this._getSibling("next")},getIndexInParent:function(){var a=this.getParent();if(!a||!a.getIndexOfChild)return-1;
return a.getIndexOfChild(this)}});return d._Contained});
define("dijit/MenuItem",["dojo","dijit","text!dijit/templates/MenuItem.html","dijit/_Widget","dijit/_Templated","dijit/_Contained","dijit/_CssStateMixin"],function(c,d){c.declare("dijit.MenuItem",[d._Widget,d._Templated,d._Contained,d._CssStateMixin],{templateString:c.cache("dijit","templates/MenuItem.html"),attributeMap:c.delegate(d._Widget.prototype.attributeMap,{label:{node:"containerNode",type:"innerHTML"},iconClass:{node:"iconNode",type:"class"}}),baseClass:"dijitMenuItem",label:"",iconClass:"",
accelKey:"",disabled:false,_fillContent:function(a){a&&!("label"in this.params)&&this.set("label",a.innerHTML)},buildRendering:function(){this.inherited(arguments);var a=this.id+"_text";c.attr(this.containerNode,"id",a);if(this.accelKeyNode){c.attr(this.accelKeyNode,"id",this.id+"_accel");a+=" "+this.id+"_accel"}d.setWaiState(this.domNode,"labelledby",a);c.setSelectable(this.domNode,false)},_onHover:function(){this.getParent().onItemHover(this)},_onUnhover:function(){this.getParent().onItemUnhover(this);
this._set("hovering",false)},_onClick:function(a){this.getParent().onItemClick(this,a);c.stopEvent(a)},onClick:function(){},focus:function(){try{c.isIE==8&&this.containerNode.focus();d.focus(this.focusNode)}catch(a){}},_onFocus:function(){this._setSelected(true);this.getParent()._onItemFocus(this);this.inherited(arguments)},_setSelected:function(a){c.toggleClass(this.domNode,"dijitMenuItemSelected",a)},setLabel:function(a){c.deprecated("dijit.MenuItem.setLabel() is deprecated.  Use set('label', ...) instead.",
"","2.0");this.set("label",a)},setDisabled:function(a){c.deprecated("dijit.Menu.setDisabled() is deprecated.  Use set('disabled', bool) instead.","","2.0");this.set("disabled",a)},_setDisabledAttr:function(a){d.setWaiState(this.focusNode,"disabled",a?"true":"false");this._set("disabled",a)},_setAccelKeyAttr:function(a){this.accelKeyNode.style.display=a?"":"none";this.accelKeyNode.innerHTML=a;c.attr(this.containerNode,"colSpan",a?"1":"2");this._set("accelKey",a)}});return d.MenuItem});
define("dijit/PopupMenuItem",["dojo","dijit","dijit/MenuItem"],function(c,d){c.declare("dijit.PopupMenuItem",d.MenuItem,{_fillContent:function(){if(this.srcNodeRef){var a=c.query("*",this.srcNodeRef);d.PopupMenuItem.superclass._fillContent.call(this,a[0]);this.dropDownContainer=this.srcNodeRef}},startup:function(){if(!this._started){this.inherited(arguments);if(!this.popup){var a=c.query("[widgetId]",this.dropDownContainer)[0];this.popup=d.byNode(a)}c.body().appendChild(this.popup.domNode);this.popup.startup();
this.popup.domNode.style.display="none";this.arrowWrapper&&c.style(this.arrowWrapper,"visibility","");d.setWaiState(this.focusNode,"haspopup","true")}},destroyDescendants:function(){if(this.popup){this.popup._destroyed||this.popup.destroyRecursive();delete this.popup}this.inherited(arguments)}});return d.PopupMenuItem});define("text!dijit/templates/CheckedMenuItem.html",function(){return'<tr class="dijitReset dijitMenuItem" dojoAttachPoint="focusNode" role="menuitemcheckbox" tabIndex="-1"\n\t\tdojoAttachEvent="onmouseenter:_onHover,onmouseleave:_onUnhover,ondijitclick:_onClick">\n\t<td class="dijitReset dijitMenuItemIconCell" role="presentation">\n\t\t<img src="${_blankGif}" alt="" class="dijitMenuItemIcon dijitCheckedMenuItemIcon" dojoAttachPoint="iconNode"/>\n\t\t<span class="dijitCheckedMenuItemIconChar">&#10003;</span>\n\t</td>\n\t<td class="dijitReset dijitMenuItemLabel" colspan="2" dojoAttachPoint="containerNode,labelNode"></td>\n\t<td class="dijitReset dijitMenuItemAccelKey" style="display: none" dojoAttachPoint="accelKeyNode"></td>\n\t<td class="dijitReset dijitMenuArrowCell" role="presentation">&nbsp;</td>\n</tr>'});
define("dijit/CheckedMenuItem",["dojo","dijit","text!dijit/templates/CheckedMenuItem.html","dijit/MenuItem"],function(c,d){c.declare("dijit.CheckedMenuItem",d.MenuItem,{templateString:c.cache("dijit","templates/CheckedMenuItem.html"),checked:false,_setCheckedAttr:function(a){c.toggleClass(this.domNode,"dijitCheckedMenuItemChecked",a);d.setWaiState(this.domNode,"checked",a);this._set("checked",a)},onChange:function(){},_onClick:function(){if(!this.disabled){this.set("checked",!this.checked);this.onChange(this.checked)}this.inherited(arguments)}});
return d.CheckedMenuItem});define("text!dijit/templates/MenuSeparator.html",function(){return'<tr class="dijitMenuSeparator">\n\t<td class="dijitMenuSeparatorIconCell">\n\t\t<div class="dijitMenuSeparatorTop"></div>\n\t\t<div class="dijitMenuSeparatorBottom"></div>\n\t</td>\n\t<td colspan="3" class="dijitMenuSeparatorLabelCell">\n\t\t<div class="dijitMenuSeparatorTop dijitMenuSeparatorLabel"></div>\n\t\t<div class="dijitMenuSeparatorBottom"></div>\n\t</td>\n</tr>'});
define("dijit/MenuSeparator",["dojo","dijit","text!dijit/templates/MenuSeparator.html","dijit/_Widget","dijit/_Templated","dijit/_Contained"],function(c,d){c.declare("dijit.MenuSeparator",[d._Widget,d._Templated,d._Contained],{templateString:c.cache("dijit","templates/MenuSeparator.html"),buildRendering:function(){this.inherited(arguments);c.setSelectable(this.domNode,false)},isFocusable:function(){return false}});return d.MenuSeparator});
define("dijit/Menu",["dojo","dijit","text!dijit/templates/Menu.html","dojo/window","dijit/_Widget","dijit/_KeyNavContainer","dijit/_Templated","dijit/MenuItem","dijit/PopupMenuItem","dijit/CheckedMenuItem","dijit/MenuSeparator"],function(c,d){c.declare("dijit._MenuBase",[d._Widget,d._Templated,d._KeyNavContainer],{parentMenu:null,popupDelay:500,startup:function(){if(!this._started){c.forEach(this.getChildren(),function(a){a.startup()});this.startupKeyNavChildren();this.inherited(arguments)}},onExecute:function(){},
onCancel:function(){},_moveToPopup:function(a){if(this.focusedChild&&this.focusedChild.popup&&!this.focusedChild.disabled)this.focusedChild._onClick(a);else(a=this._getTopMenu())&&a._isMenuBar&&a.focusNext()},_onPopupHover:function(){if(this.currentPopup&&this.currentPopup._pendingClose_timer){var a=this.currentPopup.parentMenu;a.focusedChild&&a.focusedChild._setSelected(false);a.focusedChild=this.currentPopup.from_item;a.focusedChild._setSelected(true);this._stopPendingCloseTimer(this.currentPopup)}},
onItemHover:function(a){if(this.isActive){this.focusChild(a);if(this.focusedChild.popup&&!this.focusedChild.disabled&&!this.hover_timer)this.hover_timer=setTimeout(c.hitch(this,"_openPopup"),this.popupDelay)}this.focusedChild&&this.focusChild(a);this._hoveredChild=a},_onChildBlur:function(a){this._stopPopupTimer();a._setSelected(false);var e=a.popup;if(e){this._stopPendingCloseTimer(e);e._pendingClose_timer=setTimeout(function(){e._pendingClose_timer=null;if(e.parentMenu)e.parentMenu.currentPopup=
null;d.popup.close(e)},this.popupDelay)}},onItemUnhover:function(a){this.isActive&&this._stopPopupTimer();if(this._hoveredChild==a)this._hoveredChild=null},_stopPopupTimer:function(){if(this.hover_timer){clearTimeout(this.hover_timer);this.hover_timer=null}},_stopPendingCloseTimer:function(a){if(a._pendingClose_timer){clearTimeout(a._pendingClose_timer);a._pendingClose_timer=null}},_stopFocusTimer:function(){if(this._focus_timer){clearTimeout(this._focus_timer);this._focus_timer=null}},_getTopMenu:function(){for(var a=
this;a.parentMenu;a=a.parentMenu);return a},onItemClick:function(a,e){typeof this.isShowingNow=="undefined"&&this._markActive();this.focusChild(a);if(a.disabled)return false;if(a.popup)this._openPopup();else{this.onExecute();a.onClick(e)}},_openPopup:function(){this._stopPopupTimer();var a=this.focusedChild;if(a){var e=a.popup;if(!e.isShowingNow){if(this.currentPopup){this._stopPendingCloseTimer(this.currentPopup);d.popup.close(this.currentPopup)}e.parentMenu=this;e.from_item=a;var f=this;d.popup.open({parent:this,
popup:e,around:a.domNode,orient:this._orient||(this.isLeftToRight()?{TR:"TL",TL:"TR",BR:"BL",BL:"BR"}:{TL:"TR",TR:"TL",BL:"BR",BR:"BL"}),onCancel:function(){f.focusChild(a);f._cleanUp();a._setSelected(true);f.focusedChild=a},onExecute:c.hitch(this,"_cleanUp")});this.currentPopup=e;e.connect(e.domNode,"onmouseenter",c.hitch(f,"_onPopupHover"));if(e.focus)e._focus_timer=setTimeout(c.hitch(e,function(){this._focus_timer=null;this.focus()}),0)}}},_markActive:function(){this.isActive=true;c.replaceClass(this.domNode,
"dijitMenuActive","dijitMenuPassive")},onOpen:function(){this.isShowingNow=true;this._markActive()},_markInactive:function(){this.isActive=false;c.replaceClass(this.domNode,"dijitMenuPassive","dijitMenuActive")},onClose:function(){this._stopFocusTimer();this._markInactive();this.isShowingNow=false;this.parentMenu=null},_closeChild:function(){this._stopPopupTimer();if(this.currentPopup){d._curFocus&&c.isDescendant(d._curFocus,this.currentPopup.domNode)&&this.focusedChild.focusNode.focus();d.popup.close(this.currentPopup);
this.currentPopup=null}if(this.focusedChild){this.focusedChild._setSelected(false);this.focusedChild._onUnhover();this.focusedChild=null}},_onItemFocus:function(a){this._hoveredChild&&this._hoveredChild!=a&&this._hoveredChild._onUnhover()},_onBlur:function(){this._cleanUp();this.inherited(arguments)},_cleanUp:function(){this._closeChild();typeof this.isShowingNow=="undefined"&&this._markInactive()}});c.declare("dijit.Menu",d._MenuBase,{constructor:function(){this._bindings=[]},templateString:c.cache("dijit",
"templates/Menu.html"),baseClass:"dijitMenu",targetNodeIds:[],contextMenuForWindow:false,leftClickToOpen:false,refocus:true,postCreate:function(){this.contextMenuForWindow?this.bindDomNode(c.body()):c.forEach(this.targetNodeIds,this.bindDomNode,this);var a=c.keys,e=this.isLeftToRight();this._openSubMenuKey=e?a.RIGHT_ARROW:a.LEFT_ARROW;this._closeSubMenuKey=e?a.LEFT_ARROW:a.RIGHT_ARROW;this.connectKeyNavHandlers([a.UP_ARROW],[a.DOWN_ARROW])},_onKeyPress:function(a){if(!(a.ctrlKey||a.altKey))switch(a.charOrCode){case this._openSubMenuKey:this._moveToPopup(a);
c.stopEvent(a);break;case this._closeSubMenuKey:if(this.parentMenu)this.parentMenu._isMenuBar?this.parentMenu.focusPrev():this.onCancel(false);else c.stopEvent(a);break}},_iframeContentWindow:function(a){return c.window.get(this._iframeContentDocument(a))||this._iframeContentDocument(a).__parent__||a.name&&c.doc.frames[a.name]||null},_iframeContentDocument:function(a){return a.contentDocument||a.contentWindow&&a.contentWindow.document||a.name&&c.doc.frames[a.name]&&c.doc.frames[a.name].document||
null},bindDomNode:function(a){a=c.byId(a);var e;if(a.tagName.toLowerCase()=="iframe"){var f=a,g=this._iframeContentWindow(f);e=c.withGlobal(g,c.body)}else e=a==c.body()?c.doc.documentElement:a;var j={node:a,iframe:f};c.attr(a,"_dijitMenu"+this.id,this._bindings.push(j));var i=c.hitch(this,function(k){return[c.connect(k,this.leftClickToOpen?"onclick":"oncontextmenu",this,function(h){c.stopEvent(h);this._scheduleOpen(h.target,f,{x:h.pageX,y:h.pageY})}),c.connect(k,"onkeydown",this,function(h){if(h.shiftKey&&
h.keyCode==c.keys.F10){c.stopEvent(h);this._scheduleOpen(h.target,f)}})]});j.connects=e?i(e):[];if(f){j.onloadHandler=c.hitch(this,function(){var k=this._iframeContentWindow(f);e=c.withGlobal(k,c.body);j.connects=i(e)});f.addEventListener?f.addEventListener("load",j.onloadHandler,false):f.attachEvent("onload",j.onloadHandler)}},unBindDomNode:function(a){var e;try{e=c.byId(a)}catch(f){return}a="_dijitMenu"+this.id;if(e&&c.hasAttr(e,a)){var g=c.attr(e,a)-1,j=this._bindings[g];c.forEach(j.connects,c.disconnect);
var i=j.iframe;if(i)i.removeEventListener?i.removeEventListener("load",j.onloadHandler,false):i.detachEvent("onload",j.onloadHandler);c.removeAttr(e,a);delete this._bindings[g]}},_scheduleOpen:function(a,e,f){if(!this._openTimer)this._openTimer=setTimeout(c.hitch(this,function(){delete this._openTimer;this._openMyself({target:a,iframe:e,coords:f})}),1)},_openMyself:function(a){function e(){l.refocus&&d.focus(n);d.popup.close(l)}var f=a.target,g=a.iframe;if(a=a.coords){if(g){f=c.position(g,true);var j=
this._iframeContentWindow(g);j=c.withGlobal(j,"_docScroll",c);var i=c.getComputedStyle(g),k=c._toPixelValue,h=(c.isIE&&c.isQuirks?0:k(g,i.paddingLeft))+(c.isIE&&c.isQuirks?k(g,i.borderLeftWidth):0);g=(c.isIE&&c.isQuirks?0:k(g,i.paddingTop))+(c.isIE&&c.isQuirks?k(g,i.borderTopWidth):0);a.x+=f.x+h-j.x;a.y+=f.y+g-j.y}}else{a=c.position(f,true);a.x+=10;a.y+=10}var l=this,n=d.getFocus(this);d.popup.open({popup:this,x:a.x,y:a.y,onExecute:e,onCancel:e,orient:this.isLeftToRight()?"L":"R"});this.focus();this._onBlur=
function(){this.inherited("_onBlur",arguments);d.popup.close(this)}},uninitialize:function(){c.forEach(this._bindings,function(a){a&&this.unBindDomNode(a.node)},this);this.inherited(arguments)}});return d.Menu});define("text!dijit/form/templates/Button.html",function(){return'<span class="dijit dijitReset dijitInline"\n\t><span class="dijitReset dijitInline dijitButtonNode"\n\t\tdojoAttachEvent="ondijitclick:_onButtonClick"\n\t\t><span class="dijitReset dijitStretch dijitButtonContents"\n\t\t\tdojoAttachPoint="titleNode,focusNode"\n\t\t\trole="button" aria-labelledby="${id}_label"\n\t\t\t><span class="dijitReset dijitInline dijitIcon" dojoAttachPoint="iconNode"></span\n\t\t\t><span class="dijitReset dijitToggleButtonIconChar">&#x25CF;</span\n\t\t\t><span class="dijitReset dijitInline dijitButtonText"\n\t\t\t\tid="${id}_label"\n\t\t\t\tdojoAttachPoint="containerNode"\n\t\t\t></span\n\t\t></span\n\t></span\n\t><input ${!nameAttrSetting} type="${type}" value="${value}" class="dijitOffScreen" tabIndex="-1"\n\t\tdojoAttachPoint="valueNode"\n/></span>'});
define("text!dijit/form/templates/DropDownButton.html",function(){return'<span class="dijit dijitReset dijitInline"\n\t><span class=\'dijitReset dijitInline dijitButtonNode\'\n\t\tdojoAttachEvent="ondijitclick:_onButtonClick" dojoAttachPoint="_buttonNode"\n\t\t><span class="dijitReset dijitStretch dijitButtonContents"\n\t\t\tdojoAttachPoint="focusNode,titleNode,_arrowWrapperNode"\n\t\t\trole="button" aria-haspopup="true" aria-labelledby="${id}_label"\n\t\t\t><span class="dijitReset dijitInline dijitIcon"\n\t\t\t\tdojoAttachPoint="iconNode"\n\t\t\t></span\n\t\t\t><span class="dijitReset dijitInline dijitButtonText"\n\t\t\t\tdojoAttachPoint="containerNode,_popupStateNode"\n\t\t\t\tid="${id}_label"\n\t\t\t></span\n\t\t\t><span class="dijitReset dijitInline dijitArrowButtonInner"></span\n\t\t\t><span class="dijitReset dijitInline dijitArrowButtonChar">&#9660;</span\n\t\t></span\n\t></span\n\t><input ${!nameAttrSetting} type="${type}" value="${value}" class="dijitOffScreen" tabIndex="-1"\n\t\tdojoAttachPoint="valueNode"\n/></span>'});
define("text!dijit/form/templates/ComboButton.html",function(){return'<table class="dijit dijitReset dijitInline dijitLeft"\n\tcellspacing=\'0\' cellpadding=\'0\' role="presentation"\n\t><tbody role="presentation"><tr role="presentation"\n\t\t><td class="dijitReset dijitStretch dijitButtonNode" dojoAttachPoint="buttonNode" dojoAttachEvent="ondijitclick:_onButtonClick,onkeypress:_onButtonKeyPress"\n\t\t><div id="${id}_button" class="dijitReset dijitButtonContents"\n\t\t\tdojoAttachPoint="titleNode"\n\t\t\trole="button" aria-labelledby="${id}_label"\n\t\t\t><div class="dijitReset dijitInline dijitIcon" dojoAttachPoint="iconNode" role="presentation"></div\n\t\t\t><div class="dijitReset dijitInline dijitButtonText" id="${id}_label" dojoAttachPoint="containerNode" role="presentation"></div\n\t\t></div\n\t\t></td\n\t\t><td id="${id}_arrow" class=\'dijitReset dijitRight dijitButtonNode dijitArrowButton\'\n\t\t\tdojoAttachPoint="_popupStateNode,focusNode,_buttonNode"\n\t\t\tdojoAttachEvent="onkeypress:_onArrowKeyPress"\n\t\t\ttitle="${optionsTitle}"\n\t\t\trole="button" aria-haspopup="true"\n\t\t\t><div class="dijitReset dijitArrowButtonInner" role="presentation"></div\n\t\t\t><div class="dijitReset dijitArrowButtonChar" role="presentation">&#9660;</div\n\t\t></td\n\t\t><td style="display:none !important;"\n\t\t\t><input ${!nameAttrSetting} type="${type}" value="${value}" dojoAttachPoint="valueNode"\n\t\t/></td></tr></tbody\n></table>'});
define("dijit/_HasDropDown",["dojo","dijit","dijit/_Widget"],function(c,d){c.declare("dijit._HasDropDown",null,{_buttonNode:null,_arrowWrapperNode:null,_popupStateNode:null,_aroundNode:null,dropDown:null,autoWidth:true,forceWidth:false,maxHeight:0,dropDownPosition:["below","above"],_stopClickEvents:true,_onDropDownMouseDown:function(a){if(!(this.disabled||this.readOnly)){c.stopEvent(a);this._docHandler=this.connect(c.doc,"onmouseup","_onDropDownMouseUp");this.toggleDropDown()}},_onDropDownMouseUp:function(a){a&&
this._docHandler&&this.disconnect(this._docHandler);var e=this.dropDown,f=false;if(a&&this._opened){var g=c.position(this._buttonNode,true);if(!(a.pageX>=g.x&&a.pageX<=g.x+g.w)||!(a.pageY>=g.y&&a.pageY<=g.y+g.h)){for(g=a.target;g&&!f;)if(c.hasClass(g,"dijitPopup"))f=true;else g=g.parentNode;if(f){g=a.target;if(e.onItemClick){for(var j;g&&!(j=d.byNode(g));)g=g.parentNode;j&&j.onClick&&j.getParent&&j.getParent().onItemClick(j,a)}return}}}this._opened&&e.focus&&e.autoFocus!==false&&window.setTimeout(c.hitch(e,
"focus"),1)},_onDropDownClick:function(a){this._stopClickEvents&&c.stopEvent(a)},buildRendering:function(){this.inherited(arguments);this._buttonNode=this._buttonNode||this.focusNode||this.domNode;this._popupStateNode=this._popupStateNode||this.focusNode||this._buttonNode;var a={after:this.isLeftToRight()?"Right":"Left",before:this.isLeftToRight()?"Left":"Right",above:"Up",below:"Down",left:"Left",right:"Right"}[this.dropDownPosition[0]]||this.dropDownPosition[0]||"Down";c.addClass(this._arrowWrapperNode||
this._buttonNode,"dijit"+a+"ArrowButton")},postCreate:function(){this.inherited(arguments);this.connect(this._buttonNode,"onmousedown","_onDropDownMouseDown");this.connect(this._buttonNode,"onclick","_onDropDownClick");this.connect(this.focusNode,"onkeypress","_onKey");this.connect(this.focusNode,"onkeyup","_onKeyUp")},destroy:function(){if(this.dropDown){this.dropDown._destroyed||this.dropDown.destroyRecursive();delete this.dropDown}this.inherited(arguments)},_onKey:function(a){if(!(this.disabled||
this.readOnly)){var e=this.dropDown,f=a.target;if(e&&this._opened&&e.handleKey)if(e.handleKey(a)===false){c.stopEvent(a);return}if(e&&this._opened&&a.charOrCode==c.keys.ESCAPE){this.closeDropDown();c.stopEvent(a)}else if(!this._opened&&(a.charOrCode==c.keys.DOWN_ARROW||(a.charOrCode==c.keys.ENTER||a.charOrCode==" ")&&((f.tagName||"").toLowerCase()!=="input"||f.type&&f.type.toLowerCase()!=="text"))){this._toggleOnKeyUp=true;c.stopEvent(a)}}},_onKeyUp:function(){if(this._toggleOnKeyUp){delete this._toggleOnKeyUp;
this.toggleDropDown();var a=this.dropDown;a&&a.focus&&setTimeout(c.hitch(a,"focus"),1)}},_onBlur:function(){this.closeDropDown(d._curFocus&&this.dropDown&&c.isDescendant(d._curFocus,this.dropDown.domNode));this.inherited(arguments)},isLoaded:function(){return true},loadDropDown:function(a){a()},toggleDropDown:function(){if(!(this.disabled||this.readOnly))if(this._opened)this.closeDropDown();else this.isLoaded()?this.openDropDown():this.loadDropDown(c.hitch(this,"openDropDown"))},openDropDown:function(){var a=
this.dropDown,e=a.domNode,f=this._aroundNode||this.domNode,g=this;if(!this._preparedNode){this._preparedNode=true;if(e.style.width)this._explicitDDWidth=true;if(e.style.height)this._explicitDDHeight=true}if(this.maxHeight||this.forceWidth||this.autoWidth){var j={display:"",visibility:"hidden"};if(!this._explicitDDWidth)j.width="";if(!this._explicitDDHeight)j.height="";c.style(e,j);j=this.maxHeight;if(j==-1){j=c.window.getBox();var i=c.position(f,false);j=Math.floor(Math.max(i.y,j.h-(i.y+i.h)))}a.startup&&
!a._started&&a.startup();d.popup.moveOffScreen(a);i=c._getMarginSize(e);var k=j&&i.h>j;c.style(e,{overflowX:"hidden",overflowY:k?"auto":"hidden"});if(k){i.h=j;if("w"in i)i.w+=16}else delete i.h;if(this.forceWidth)i.w=f.offsetWidth;else if(this.autoWidth)i.w=Math.max(i.w,f.offsetWidth);else delete i.w;c.isFunction(a.resize)?a.resize(i):c.marginBox(e,i)}a=d.popup.open({parent:this,popup:a,around:f,orient:d.getPopupAroundAlignment(this.dropDownPosition&&this.dropDownPosition.length?this.dropDownPosition:
["below"],this.isLeftToRight()),onExecute:function(){g.closeDropDown(true)},onCancel:function(){g.closeDropDown(true)},onClose:function(){c.attr(g._popupStateNode,"popupActive",false);c.removeClass(g._popupStateNode,"dijitHasDropDownOpen");g._opened=false}});c.attr(this._popupStateNode,"popupActive","true");c.addClass(g._popupStateNode,"dijitHasDropDownOpen");this._opened=true;return a},closeDropDown:function(a){if(this._opened){a&&this.focus();d.popup.close(this.dropDown);this._opened=false}}});
return d._HasDropDown});
define("dijit/form/Button",["dojo","dijit","text!dijit/form/templates/Button.html","text!dijit/form/templates/DropDownButton.html","text!dijit/form/templates/ComboButton.html","dijit/form/_FormWidget","dijit/_Container","dijit/_HasDropDown"],function(c,d){c.declare("dijit.form.Button",d.form._FormWidget,{label:"",showLabel:true,iconClass:"",type:"button",baseClass:"dijitButton",templateString:c.cache("dijit.form","templates/Button.html"),attributeMap:c.delegate(d.form._FormWidget.prototype.attributeMap,{value:"valueNode"}),
_onClick:function(a){if(this.disabled)return false;this._clicked();return this.onClick(a)},_onButtonClick:function(a){if(this._onClick(a)===false)a.preventDefault();else if(this.type=="submit"&&!(this.valueNode||this.focusNode).form)for(var e=this.domNode;e.parentNode;e=e.parentNode){var f=d.byNode(e);if(f&&typeof f._onSubmit=="function"){f._onSubmit(a);break}}else if(this.valueNode){this.valueNode.click();a.preventDefault()}},buildRendering:function(){this.inherited(arguments);c.setSelectable(this.focusNode,
false)},_fillContent:function(a){if(a&&(!this.params||!("label"in this.params)))this.set("label",a.innerHTML)},_setShowLabelAttr:function(a){this.containerNode&&c.toggleClass(this.containerNode,"dijitDisplayNone",!a);this._set("showLabel",a)},onClick:function(){return true},_clicked:function(){},setLabel:function(a){c.deprecated("dijit.form.Button.setLabel() is deprecated.  Use set('label', ...) instead.","","2.0");this.set("label",a)},_setLabelAttr:function(a){this._set("label",a);this.containerNode.innerHTML=
a;if(this.showLabel==false&&!this.params.title)this.titleNode.title=c.trim(this.containerNode.innerText||this.containerNode.textContent||"")},_setIconClassAttr:function(a){c.replaceClass(this.iconNode,a||"dijitNoIcon",this.iconClass||"dijitNoIcon");this._set("iconClass",a)}});c.declare("dijit.form.DropDownButton",[d.form.Button,d._Container,d._HasDropDown],{baseClass:"dijitDropDownButton",templateString:c.cache("dijit.form","templates/DropDownButton.html"),_fillContent:function(){if(this.srcNodeRef){var a=
c.query("*",this.srcNodeRef);d.form.DropDownButton.superclass._fillContent.call(this,a[0]);this.dropDownContainer=this.srcNodeRef}},startup:function(){if(!this._started){if(!this.dropDown&&this.dropDownContainer){var a=c.query("[widgetId]",this.dropDownContainer)[0];this.dropDown=d.byNode(a);delete this.dropDownContainer}this.dropDown&&d.popup.hide(this.dropDown);this.inherited(arguments)}},isLoaded:function(){var a=this.dropDown;return!!a&&(!a.href||a.isLoaded)},loadDropDown:function(){var a=this.dropDown;
if(a)if(this.isLoaded())this.openDropDown();else{var e=c.connect(a,"onLoad",this,function(){c.disconnect(e);this.openDropDown()});a.refresh()}},isFocusable:function(){return this.inherited(arguments)&&!this._mouseDown}});c.declare("dijit.form.ComboButton",d.form.DropDownButton,{templateString:c.cache("dijit.form","templates/ComboButton.html"),attributeMap:c.mixin(c.clone(d.form.Button.prototype.attributeMap),{id:"",tabIndex:["focusNode","titleNode"],title:"titleNode"}),optionsTitle:"",baseClass:"dijitComboButton",
cssStateNodes:{buttonNode:"dijitButtonNode",titleNode:"dijitButtonContents",_popupStateNode:"dijitDownArrowButton"},_focusedNode:null,_onButtonKeyPress:function(a){if(a.charOrCode==c.keys[this.isLeftToRight()?"RIGHT_ARROW":"LEFT_ARROW"]){d.focus(this._popupStateNode);c.stopEvent(a)}},_onArrowKeyPress:function(a){if(a.charOrCode==c.keys[this.isLeftToRight()?"LEFT_ARROW":"RIGHT_ARROW"]){d.focus(this.titleNode);c.stopEvent(a)}},focus:function(a){this.disabled||d.focus(a=="start"?this.titleNode:this._popupStateNode)}});
c.declare("dijit.form.ToggleButton",d.form.Button,{baseClass:"dijitToggleButton",checked:false,attributeMap:c.mixin(c.clone(d.form.Button.prototype.attributeMap),{checked:"focusNode"}),_clicked:function(){this.set("checked",!this.checked)},_setCheckedAttr:function(a,e){this._set("checked",a);c.attr(this.focusNode||this.domNode,"checked",a);d.setWaiState(this.focusNode||this.domNode,"pressed",a);this._handleOnChange(a,e)},setChecked:function(a){c.deprecated("setChecked("+a+") is deprecated. Use set('checked',"+
a+") instead.","","2.0");this.set("checked",a)},reset:function(){this._hasBeenBlurred=false;this.set("checked",this.params.checked||false)}});return d.form.Button});define("dijit/form/DropDownButton",["dojo","dijit","dijit/form/Button"],function(c,d){return d.form.DropDownButton});
define("orion/commands",["require","dojo","dijit","orion/util","dijit/Menu","dijit/form/DropDownButton","dijit/MenuItem","dijit/PopupMenuItem","dijit/MenuSeparator","dijit/Tooltip"],function(c,d,a,e){function f(h){this._domScope={};this._objectScope={};this._globalScope={};this._namedGroups={};this._activeBindings={};this._init(h)}function g(h){this._init(h)}function j(h,l,n,r,m){this.keyCode=typeof h==="string"?h.toUpperCase().charCodeAt(0):h;this.mod1=l!==undefined&&l!==null?l:false;this.mod2=n!==
undefined&&n!==null?n:false;this.mod3=r!==undefined&&r!==null?r:false;this.mod4=m!==undefined&&m!==null?m:false}var i=d.declare(a.MenuItem,{_onClick:function(){this.hrefCallback||this.inherited(arguments)}});f.prototype={_init:function(h){this._registry=h.serviceRegistry;this._serviceRegistration=this._registry.registerService("orion.page.command",this);this._selection=h.selection;d.connect(window.document,"onkeydown",d.hitch(this,function(l){l=l||window.event;var n=l.target.nodeName.toLowerCase();
if(n==="input")switch(l.target.type.toLowerCase()){case "text":case "password":case "search":case "color":case "date":case "datetime":case "datetime-local":case "email":case "month":case "number":case "range":case "tel":case "time":case "url":case "week":return}else if(n==="textarea")return;this._processKey(l)}))},_processKey:function(h){function l(o){if(window.document.all)o.keyCode=0;else{o.preventDefault();o.stopPropagation()}}for(var n in this._activeBindings)if(this._activeBindings[n]&&this._activeBindings[n].keyBinding&&
this._activeBindings[n].command)if(this._activeBindings[n].keyBinding.match(h)){var r=this._activeBindings[n],m=r.command;if(m.hrefCallback){l(h);h=m.hrefCallback.call(r.handler||window,r.items,n,r.userData);h.then?h.then(function(o){window.open(o)}):window.open(h);return}else if(m.callback){l(h);window.setTimeout(function(){m.callback.call(r.handler||window,r.items,n,null,r.userData)},0);return}}},getSelectionService:function(){return this._selection},showKeyBindings:function(h){for(var l in this._activeBindings)this._activeBindings[l]&&
this._activeBindings[l].keyBinding&&this._activeBindings[l].command&&d.place("<span>"+e.getUserKeyString(this._activeBindings[l].keyBinding)+" = "+this._activeBindings[l].command.name+"<br></span>",h,"last")},addCommand:function(h,l){switch(l){case "dom":this._domScope[h.id]=h;break;case "object":this._objectScope[h.id]=h;break;case "global":this._globalScope[h.id]=h;break;default:throw"unrecognized command scope "+l;}},addCommandGroup:function(h,l,n,r,m){var o=this._namedGroups;if(r)o=this._createEntryForPath(r);
if(o[h]){if(n)o[h].title=n;if(l)o[h].position=l;if(m)o[h].scopeId=m}else{o[h]={title:n,position:l,children:{},scopeId:m};o.sortedCommands=null}},_createEntryForPath:function(h){var l=this._namedGroups;if(h){h=h.split("/");for(var n=0;n<h.length;n++)if(h[n].length>1){l[h[n]]||(l[h[n]]={position:0,children:{}});l=l[h[n]].children}}return l},registerCommandContribution:function(h,l,n,r,m,o){r=this._createEntryForPath(r);r[h]={scopeId:n,position:l};if(m)if(l=this._domScope[h]||this._globalScope[h])this._activeBindings[h]=
{command:l,keyBinding:m,keyOnly:o};r.sortedCommands=null},_isLastChildSeparator:function(h,l){if(l==="image")return h.childNodes.length>0&&d.hasClass(h.childNodes[h.childNodes.length-1],"commandSeparator");if(l==="menu"){h=h.getChildren();return h.length>0&&h[h.length-1]instanceof a.MenuSeparator}return false},renderCommands:function(h,l,n,r,m,o,p,s,q,u){if(typeof h==="string")h=d.byId(h);if(n){var y;if(l==="object")y=this._objectScope;else if(l==="dom")y=this._domScope;else if(l==="global")y=this._globalScope;
else throw"Unrecognized command scope "+l;this._render(this._namedGroups,h,l,n,r,m,o,p,y,s,q,u);if(m==="image")this._isLastChildSeparator(h,m)&&h.removeChild(h.childNodes[h.childNodes.length-1]);else if(m==="menu")if(this._isLastChildSeparator(h,m)){n=h.getChildren()[h.getChildren().length-1];h.removeChild(n);n.destroy()}}else{var C=this;this._selection&&this._selection.getSelections(function(v){C.renderCommands(h,l,v,r,m,o,p,s,q,u)})}},_render:function(h,l,n,r,m,o,p,s,q,u,y,C){var v=h.sortedCommands;
if(!v){v=[];for(var w in h){var A=h[w];if(A&&typeof A.position==="number"){A.id=w;v.push(A)}}v.sort(function(I,J){return I.position-J.position});h.sortedCommands=v}for(h=0;h<v.length;h++){var z;if(v[h].children){w=v[h];if(!(w.scopeId&&l.id!==w.scopeId)){var F;if(o==="image")if(w.title){A=new a.Menu({style:"display: none;"});A.eclipseScopeId=l.eclipseScopeId||l.id;this._render(v[h].children,A,n,r,m,"menu",p,s,q,u,y,C);F=A.getChildren();if(this._isLastChildSeparator(A,"menu")){z=F[F.length-1];A.removeChild(z);
z.destroy();F=A.getChildren()}if(F.length>0){z=F[0].eclipseCommand;if(F.length>1){z=new a.form.DropDownButton({label:w.title,dropDown:A});d.addClass(z.domNode,"commandLink");p&&d.addClass(z.domNode,p);d.place(z.domNode,l,"last")}else{A="image"+z.id+h;w=z._asImage(A,r,m,s,p,u,y,C);d.place(w,l,"last")}}}else{var G;if(l.childNodes.length>0&&!this._isLastChildSeparator(l,o))G=this.generateSeparatorImage(l);this._render(v[h].children,l,n,r,m,o,p,s,q,u,y,C);if(l.childNodes.length>0)if(l.childNodes[l.childNodes.length-
1]!==G)G=this.generateSeparatorImage(l)}else if(w.title){A=new a.Menu;this._render(v[h].children,A,n,r,m,o,p,s,q,u,y,C);A.getChildren().length>0&&l.addChild(new a.PopupMenuItem({label:w.title,popup:A}))}else{var H;if(l.getChildren().length>0&&!this._isLastChildSeparator(l,o)){H=new a.MenuSeparator;l.addChild(H)}this._render(v[h].children,l,n,r,m,o,p,s,q,u,y,C);w=l.getChildren();if(w[w.length-1]!==H){H=new a.MenuSeparator;l.addChild(H)}}}}else{A=(w=q[v[h].id])?true:false;if(w){if(n==="dom")A=o==="image"?
l.id===v[h].scopeId:o==="menu"?l.eclipseScopeId===v[h].scopeId:false;if(this._activeBindings[w.id]&&this._activeBindings[w.id].keyBinding){z=this._activeBindings[w.id];z.items=r;z.userData=s;z.handler=m;if(z.keyOnly)A=false}if(A&&w.visibleWhen)A=w.visibleWhen(r)}if(A)if(w.choiceCallback){A=new a.Menu({style:"display: none;"});if(o==="image"){z=new a.form.DropDownButton({label:w.name,dropDown:A});if(w.image){d.addClass(z.iconNode,"commandImage");p&&d.addClass(z.iconNode,p);z.iconNode.src=w.image}d.place(z.domNode,
l,"last");z.eclipseCommand=w;z.eclipseChoices=A;d.connect(z,"onClick",z,function(){this.eclipseCommand.populateChoicesMenu(this.eclipseChoices,r,m,s)})}else if(o==="menu"){z=new a.PopupMenuItem({label:w.name,popup:A});l.addChild(z);z.eclipseCommand=w;z.eclipseChoices=A;d.connect(l,"_openPopup",z,function(){this.eclipseCommand.populateChoicesMenu(this.eclipseChoices,r,m,s)})}}else if(o==="image"){A="image"+w.id+h;w=w._asImage(A,r,m,s,p,u,y,C);d.place(w,l,"last")}else o==="menu"&&w._addMenuItem(l,r,
m,s,p)}}},generateSeparatorImage:function(h){h=d.create("span",null,h,"last");d.addClass(h,"core-sprite-sep");d.addClass(h,"commandImage");d.addClass(h,"commandSprite");d.addClass(h,"commandSeparator");return h}};f.prototype.constructor=f;g.prototype={_init:function(h){this.id=h.id;this.name=h.name||"Empty Command";this.tooltip=h.tooltip||h.name;this.callback=h.callback;this.hrefCallback=h.hrefCallback;this.choiceCallback=h.choiceCallback;this.image=h.image||c.toUrl("images/none.png");this.imageClass=
h.imageClass;this.spriteClass=h.spriteClass||"commandSprite";this.visibleWhen=h.visibleWhen;this._deviceSupportsHover=false},_asImage:function(h,l,n,r,m,o,p,s){n=n||this;var q=d.create("a");q.id=this.name+"link";var u=null;if(this.tooltip)q.title=this.tooltip;if(o||!this.hasImage()){h=window.document.createTextNode(this.name);d.place(h,q,"last")}else{u=new Image;u.alt=this.name;u.title=this.tooltip||this.name;u.name=h;u.id=h}if(this.hrefCallback){h=this.hrefCallback.call(n,l,this.id,r);if(h.then)h.then(function(y){q.href=
y});else q.href=h}else if(this.callback)u?d.connect(u,"onclick",this,function(){this.callback.call(n,l,this.id,u.id,r)}):d.connect(q,"onclick",this,function(){this.callback.call(n,l,this.id,q.id,r)});if(u){if(this._deviceSupportsHover){u.src=c.toUrl("images/none.png");d.connect(u,"onmouseover",this,function(){u.src=this.image});d.connect(u,"onmouseout",this,function(){u.src=c.toUrl("images/none.png")})}else{u.src=this.image;d.connect(u,"onmouseover",this,function(){p?d.addClass(u,p):d.addClass(u,
"commandOver")});d.connect(u,"onmouseout",this,function(){u.src=this.image;p?d.removeClass(u,p):d.removeClass(u,"commandOver")})}d.addClass(u,"commandImage");m&&d.addClass(u,m);if(this.imageClass){d.addClass(u,this.spriteClass);d.addClass(u,this.imageClass)}d.place(u,q,"last")}s?d.addClass(q,s):d.addClass(q,"commandLink");m&&d.addClass(q,m);return q},_asLink:function(h,l,n){l=l||this;var r=window.document.createElement("a");if(this.tooltip)r.title=this.tooltip;d.place(window.document.createTextNode(this.name),
r,"only");r.href="";r.id=this.id+"link";if(this.callback)d.connect(r,"onclick",this,function(){this.callback.call(l,h,this.id,r.id)});else if(this.hrefCallback){var m=this.hrefCallback.call(l,h,this.id);if(m)if(m.then)m.then(function(o){r.href=o});else r.href=m}d.addClass(r,"commandLink");n&&d.addClass(r,n);return r},_addMenuItem:function(h,l,n,r,m){var o=new i({labelType:this.hrefCallback?"html":"text",label:this.name,iconClass:this.imageClass,hrefCallback:!!this.hrefCallback});this.tooltip&&new a.Tooltip({connectId:[o.domNode],
label:this.tooltip});if(this.hrefCallback){var p=this.hrefCallback.call(n,l,this.id,h.id,r);if(p)p.then?p.then(d.hitch(this,function(s){o.set("label","<a href='"+s+"'>"+this.name+"</a>")})):o.set("label","<a href='"+p+"'>"+this.name+"</a>")}else if(this.callback)o.onClick=d.hitch(this,function(){this.callback.call(n,l,this.id,null,r)});o.eclipseCommand=this;h.addChild(o);if(this.imageClass)d.addClass(o.iconNode,this.spriteClass);else if(this.image){d.addClass(o.iconNode,"commandImage");m&&d.addClass(o.iconNode,
m);o.iconNode.src=this.image}},populateChoicesMenu:function(h,l,n,r){h.focusedChild=null;d.forEach(h.getChildren(),function(p){h.removeChild(p);p.destroy()});n=this.getChoices(l,n,r);for(r=0;r<n.length;r++){var m=n[r],o;if(m.name){o=new a.MenuItem({label:m.name,iconClass:m.imageClass,onClick:this.makeChoiceCallback(m,l)});if(m.imageClass)d.addClass(o.iconNode,m.spriteClass||"commandSprite");else if(m.image){d.addClass(o.iconNode,"commandImage");o.iconNode.src=m.image}}else o=new a.MenuSeparator;h.addChild(o)}},
getChoices:function(h,l,n){if(this.choiceCallback)return this.choiceCallback.call(l,h,n);return null},makeChoiceCallback:function(h,l){return function(n){h.callback&&h.callback.call(h,l,n)}},hasImage:function(){return this.imageClass||this.image!==c.toUrl("images/none.png")}};g.prototype.constructor=g;var k=window.navigator.platform.indexOf("Mac")!==-1;j.prototype={match:function(h){if(this.keyCode===h.keyCode){if(this.mod1!==(k?h.metaKey:h.ctrlKey))return false;if(this.mod2!==h.shiftKey)return false;
if(this.mod3!==h.altKey)return false;if(k&&this.mod4!==h.ctrlKey)return false;return true}return false},equals:function(h){if(!h)return false;if(this.keyCode!==h.keyCode)return false;if(this.mod1!==h.mod1)return false;if(this.mod2!==h.mod2)return false;if(this.mod3!==h.mod3)return false;if(this.mod4!==h.mod4)return false;return true}};j.prototype.constructor=j;return{CommandService:f,CommandKeyBinding:j,Command:g,CommandMenuItem:i}});var orion=orion||{};orion.textview=orion.textview||{};
orion.textview.KeyBinding=function(){function c(a,e,f,g,j){this.keyCode=typeof a==="string"?a.toUpperCase().charCodeAt(0):a;this.mod1=e!==undefined&&e!==null?e:false;this.mod2=f!==undefined&&f!==null?f:false;this.mod3=g!==undefined&&g!==null?g:false;this.mod4=j!==undefined&&j!==null?j:false}var d=window.navigator.platform.indexOf("Mac")!==-1;c.prototype={match:function(a){if(this.keyCode===a.keyCode){if(this.mod1!==(d?a.metaKey:a.ctrlKey))return false;if(this.mod2!==a.shiftKey)return false;if(this.mod3!==
a.altKey)return false;if(d&&this.mod4!==a.ctrlKey)return false;return true}return false},equals:function(a){if(!a)return false;if(this.keyCode!==a.keyCode)return false;if(this.mod1!==a.mod1)return false;if(this.mod2!==a.mod2)return false;if(this.mod3!==a.mod3)return false;if(this.mod4!==a.mod4)return false;return true}};return c}();typeof window!=="undefined"&&typeof window.define!=="undefined"&&define("orion/textview/keyBinding",[],function(){return orion.textview});
define("text!dijit/templates/Dialog.html",function(){return'<div class="dijitDialog" role="dialog" aria-labelledby="${id}_title">\n\t<div dojoAttachPoint="titleBar" class="dijitDialogTitleBar">\n\t<span dojoAttachPoint="titleNode" class="dijitDialogTitle" id="${id}_title"></span>\n\t<span dojoAttachPoint="closeButtonNode" class="dijitDialogCloseIcon" dojoAttachEvent="ondijitclick: onCancel" title="${buttonCancel}" role="button" tabIndex="-1">\n\t\t<span dojoAttachPoint="closeText" class="closeText" title="${buttonCancel}">x</span>\n\t</span>\n\t</div>\n\t\t<div dojoAttachPoint="containerNode" class="dijitDialogPaneContent"></div>\n</div>'});
define("dojo/dnd/common",["dojo"],function(c){c.getObject("dnd",true,c);c.dnd.getCopyKeyState=c.isCopyKey;c.dnd._uniqueId=0;c.dnd.getUniqueId=function(){var d;do d=c._scopeName+"Unique"+ ++c.dnd._uniqueId;while(c.byId(d));return d};c.dnd._empty={};c.dnd.isFormElement=function(d){d=d.target;if(d.nodeType==3)d=d.parentNode;return" button textarea input select option ".indexOf(" "+d.tagName.toLowerCase()+" ")>=0};return c.dnd});
define("dojo/dnd/autoscroll",["dojo","dojo/window"],function(c){c.getObject("dnd",true,c);c.dnd.getViewport=c.window.getBox;c.dnd.V_TRIGGER_AUTOSCROLL=32;c.dnd.H_TRIGGER_AUTOSCROLL=32;c.dnd.V_AUTOSCROLL_VALUE=16;c.dnd.H_AUTOSCROLL_VALUE=16;c.dnd.autoScroll=function(d){var a=c.window.getBox(),e=0,f=0;if(d.clientX<c.dnd.H_TRIGGER_AUTOSCROLL)e=-c.dnd.H_AUTOSCROLL_VALUE;else if(d.clientX>a.w-c.dnd.H_TRIGGER_AUTOSCROLL)e=c.dnd.H_AUTOSCROLL_VALUE;if(d.clientY<c.dnd.V_TRIGGER_AUTOSCROLL)f=-c.dnd.V_AUTOSCROLL_VALUE;
else if(d.clientY>a.h-c.dnd.V_TRIGGER_AUTOSCROLL)f=c.dnd.V_AUTOSCROLL_VALUE;window.scrollBy(e,f)};c.dnd._validNodes={div:1,p:1,td:1};c.dnd._validOverflow={auto:1,scroll:1};c.dnd.autoScrollNodes=function(d){for(var a=d.target;a;){if(a.nodeType==1&&a.tagName.toLowerCase()in c.dnd._validNodes){var e=c.getComputedStyle(a);if(e.overflow.toLowerCase()in c.dnd._validOverflow){var f=c._getContentBox(a,e);e=c.position(a,true);var g=Math.min(c.dnd.H_TRIGGER_AUTOSCROLL,f.w/2),j=Math.min(c.dnd.V_TRIGGER_AUTOSCROLL,
f.h/2),i=d.pageX-e.x,k=d.pageY-e.y,h=e=0;if(c.isWebKit||c.isOpera){i+=c.body().scrollLeft;k+=c.body().scrollTop}if(i>0&&i<f.w)if(i<g)e=-g;else if(i>f.w-g)e=g;if(k>0&&k<f.h)if(k<j)h=-j;else if(k>f.h-j)h=j;f=a.scrollLeft;g=a.scrollTop;a.scrollLeft+=e;a.scrollTop+=h;if(f!=a.scrollLeft||g!=a.scrollTop)return}}try{a=a.parentNode}catch(l){a=null}}c.dnd.autoScroll(d)};return c.dnd});
define("dojo/dnd/Mover",["dojo","dojo/dnd/common","dojo/dnd/autoscroll"],function(c){c.declare("dojo.dnd.Mover",null,{constructor:function(d,a,e){this.node=c.byId(d);var f=a.touches?a.touches[0]:a;this.marginBox={l:f.pageX,t:f.pageY};this.mouseButton=a.button;a=this.host=e;d=d.ownerDocument;this.events=[c.connect(d,"onmousemove",this,"onFirstMove"),c.connect(d,"ontouchmove",this,"onFirstMove"),c.connect(d,"onmousemove",this,"onMouseMove"),c.connect(d,"ontouchmove",this,"onMouseMove"),c.connect(d,
"onmouseup",this,"onMouseUp"),c.connect(d,"ontouchend",this,"onMouseUp"),c.connect(d,"ondragstart",c.stopEvent),c.connect(d.body,"onselectstart",c.stopEvent)];a&&a.onMoveStart&&a.onMoveStart(this)},onMouseMove:function(d){c.dnd.autoScroll(d);var a=this.marginBox,e=d.touches?d.touches[0]:d;this.host.onMove(this,{l:a.l+e.pageX,t:a.t+e.pageY},d);c.stopEvent(d)},onMouseUp:function(d){if(c.isWebKit&&c.isMac&&this.mouseButton==2?d.button==0:this.mouseButton==d.button)this.destroy();c.stopEvent(d)},onFirstMove:function(d){var a=
this.node.style,e,f=this.host;switch(a.position){case "relative":case "absolute":e=Math.round(parseFloat(a.left))||0;a=Math.round(parseFloat(a.top))||0;break;default:a.position="absolute";a=c.marginBox(this.node);e=c.doc.body;var g=c.getComputedStyle(e),j=c._getMarginBox(e,g);g=c._getContentBox(e,g);e=a.l-(g.l-j.l);a=a.t-(g.t-j.t);break}this.marginBox.l=e-this.marginBox.l;this.marginBox.t=a-this.marginBox.t;f&&f.onFirstMove&&f.onFirstMove(this,d);c.disconnect(this.events.shift());c.disconnect(this.events.shift())},
destroy:function(){c.forEach(this.events,c.disconnect);var d=this.host;d&&d.onMoveStop&&d.onMoveStop(this);this.events=this.node=this.host=null}});return c.dnd.Mover});
define("dojo/dnd/Moveable",["dojo","dojo/dnd/Mover"],function(c){c.declare("dojo.dnd.Moveable",null,{handle:"",delay:0,skip:false,constructor:function(d,a){this.node=c.byId(d);a||(a={});this.handle=a.handle?c.byId(a.handle):null;if(!this.handle)this.handle=this.node;this.delay=a.delay>0?a.delay:0;this.skip=a.skip;this.mover=a.mover?a.mover:c.dnd.Mover;this.events=[c.connect(this.handle,"onmousedown",this,"onMouseDown"),c.connect(this.handle,"ontouchstart",this,"onMouseDown"),c.connect(this.handle,
"ondragstart",this,"onSelectStart"),c.connect(this.handle,"onselectstart",this,"onSelectStart")]},markupFactory:function(d,a){return new c.dnd.Moveable(a,d)},destroy:function(){c.forEach(this.events,c.disconnect);this.events=this.node=this.handle=null},onMouseDown:function(d){if(!(this.skip&&c.dnd.isFormElement(d))){if(this.delay){this.events.push(c.connect(this.handle,"onmousemove",this,"onMouseMove"),c.connect(this.handle,"ontouchmove",this,"onMouseMove"),c.connect(this.handle,"onmouseup",this,
"onMouseUp"),c.connect(this.handle,"ontouchend",this,"onMouseUp"));var a=d.touches?d.touches[0]:d;this._lastX=a.pageX;this._lastY=a.pageY}else this.onDragDetected(d);c.stopEvent(d)}},onMouseMove:function(d){var a=d.touches?d.touches[0]:d;if(Math.abs(a.pageX-this._lastX)>this.delay||Math.abs(a.pageY-this._lastY)>this.delay){this.onMouseUp(d);this.onDragDetected(d)}c.stopEvent(d)},onMouseUp:function(d){for(var a=0;a<2;++a)c.disconnect(this.events.pop());c.stopEvent(d)},onSelectStart:function(d){if(!this.skip||
!c.dnd.isFormElement(d))c.stopEvent(d)},onDragDetected:function(d){new this.mover(this.node,d,this)},onMoveStart:function(d){c.publish("/dnd/move/start",[d]);c.addClass(c.body(),"dojoMove");c.addClass(this.node,"dojoMoveItem")},onMoveStop:function(d){c.publish("/dnd/move/stop",[d]);c.removeClass(c.body(),"dojoMove");c.removeClass(this.node,"dojoMoveItem")},onFirstMove:function(){},onMove:function(d,a){this.onMoving(d,a);var e=d.node.style;e.left=a.l+"px";e.top=a.t+"px";this.onMoved(d,a)},onMoving:function(){},
onMoved:function(){}});return c.dnd.Moveable});
define("dojo/dnd/move",["dojo","dojo/dnd/Mover","dojo/dnd/Moveable"],function(c){c.declare("dojo.dnd.move.constrainedMoveable",c.dnd.Moveable,{constraints:function(){},within:false,markupFactory:function(d,a){return new c.dnd.move.constrainedMoveable(a,d)},constructor:function(d,a){a||(a={});this.constraints=a.constraints;this.within=a.within},onFirstMove:function(d){var a=this.constraintBox=this.constraints.call(this,d);a.r=a.l+a.w;a.b=a.t+a.h;if(this.within){d=c._getMarginSize(d.node);a.r-=d.w;
a.b-=d.h}},onMove:function(d,a){var e=this.constraintBox,f=d.node.style;this.onMoving(d,a);a.l=a.l<e.l?e.l:e.r<a.l?e.r:a.l;a.t=a.t<e.t?e.t:e.b<a.t?e.b:a.t;f.left=a.l+"px";f.top=a.t+"px";this.onMoved(d,a)}});c.declare("dojo.dnd.move.boxConstrainedMoveable",c.dnd.move.constrainedMoveable,{box:{},markupFactory:function(d,a){return new c.dnd.move.boxConstrainedMoveable(a,d)},constructor:function(d,a){var e=a&&a.box;this.constraints=function(){return e}}});c.declare("dojo.dnd.move.parentConstrainedMoveable",
c.dnd.move.constrainedMoveable,{area:"content",markupFactory:function(d,a){return new c.dnd.move.parentConstrainedMoveable(a,d)},constructor:function(d,a){var e=a&&a.area;this.constraints=function(){var f=this.node.parentNode,g=c.getComputedStyle(f),j=c._getMarginBox(f,g);if(e=="margin")return j;var i=c._getMarginExtents(f,g);j.l+=i.l;j.t+=i.t;j.w-=i.w;j.h-=i.h;if(e=="border")return j;i=c._getBorderExtents(f,g);j.l+=i.l;j.t+=i.t;j.w-=i.w;j.h-=i.h;if(e=="padding")return j;i=c._getPadExtents(f,g);j.l+=
i.l;j.t+=i.t;j.w-=i.w;j.h-=i.h;return j}}});c.dnd.constrainedMover=c.dnd.move.constrainedMover;c.dnd.boxConstrainedMover=c.dnd.move.boxConstrainedMover;c.dnd.parentConstrainedMover=c.dnd.move.parentConstrainedMover;return c.dnd.move});
define("dojo/dnd/TimedMoveable",["dojo","dojo/dnd/Moveable"],function(c){(function(){var d=c.dnd.Moveable.prototype.onMove;c.declare("dojo.dnd.TimedMoveable",c.dnd.Moveable,{timeout:40,constructor:function(a,e){e||(e={});if(e.timeout&&typeof e.timeout=="number"&&e.timeout>=0)this.timeout=e.timeout},markupFactory:function(a,e){return new c.dnd.TimedMoveable(e,a)},onMoveStop:function(a){if(a._timer){clearTimeout(a._timer);d.call(this,a,a._leftTop)}c.dnd.Moveable.prototype.onMoveStop.apply(this,arguments)},
onMove:function(a,e){a._leftTop=e;if(!a._timer){var f=this;a._timer=setTimeout(function(){a._timer=null;d.call(f,a,a._leftTop)},this.timeout)}}})})();return c.dnd.TimedMoveable});
define("dojo/fx/Toggler",["dojo"],function(c){c.declare("dojo.fx.Toggler",null,{node:null,showFunc:c.fadeIn,hideFunc:c.fadeOut,showDuration:200,hideDuration:200,constructor:function(d){var a=this;c.mixin(a,d);a.node=d.node;a._showArgs=c.mixin({},d);a._showArgs.node=a.node;a._showArgs.duration=a.showDuration;a.showAnim=a.showFunc(a._showArgs);a._hideArgs=c.mixin({},d);a._hideArgs.node=a.node;a._hideArgs.duration=a.hideDuration;a.hideAnim=a.hideFunc(a._hideArgs);c.connect(a.showAnim,"beforeBegin",c.hitch(a.hideAnim,
"stop",true));c.connect(a.hideAnim,"beforeBegin",c.hitch(a.showAnim,"stop",true))},show:function(d){return this.showAnim.play(d||0)},hide:function(d){return this.hideAnim.play(d||0)}});return c.fx.Toggler});
define("dojo/fx",["dojo","dojo/fx/Toggler"],function(c){(function(){var d={_fire:function(f,g){if(this[f])this[f].apply(this,g||[]);return this}},a=function(f){this._index=-1;this._animations=f||[];this._current=this._onAnimateCtx=this._onEndCtx=null;this.duration=0;c.forEach(this._animations,function(g){this.duration+=g.duration;if(g.delay)this.duration+=g.delay},this)};c.extend(a,{_onAnimate:function(){this._fire("onAnimate",arguments)},_onEnd:function(){c.disconnect(this._onAnimateCtx);c.disconnect(this._onEndCtx);
this._onAnimateCtx=this._onEndCtx=null;if(this._index+1==this._animations.length)this._fire("onEnd");else{this._current=this._animations[++this._index];this._onAnimateCtx=c.connect(this._current,"onAnimate",this,"_onAnimate");this._onEndCtx=c.connect(this._current,"onEnd",this,"_onEnd");this._current.play(0,true)}},play:function(f,g){if(!this._current)this._current=this._animations[this._index=0];if(!g&&this._current.status()=="playing")return this;var j=c.connect(this._current,"beforeBegin",this,
function(){this._fire("beforeBegin")}),i=c.connect(this._current,"onBegin",this,function(){this._fire("onBegin",arguments)}),k=c.connect(this._current,"onPlay",this,function(){this._fire("onPlay",arguments);c.disconnect(j);c.disconnect(i);c.disconnect(k)});this._onAnimateCtx&&c.disconnect(this._onAnimateCtx);this._onAnimateCtx=c.connect(this._current,"onAnimate",this,"_onAnimate");this._onEndCtx&&c.disconnect(this._onEndCtx);this._onEndCtx=c.connect(this._current,"onEnd",this,"_onEnd");this._current.play.apply(this._current,
arguments);return this},pause:function(){if(this._current){var f=c.connect(this._current,"onPause",this,function(){this._fire("onPause",arguments);c.disconnect(f)});this._current.pause()}return this},gotoPercent:function(f,g){this.pause();var j=this.duration*f;this._current=null;c.some(this._animations,function(i){if(i.duration<=j){this._current=i;return true}j-=i.duration;return false});this._current&&this._current.gotoPercent(j/this._current.duration,g);return this},stop:function(f){if(this._current){if(f){for(;this._index+
1<this._animations.length;++this._index)this._animations[this._index].stop(true);this._current=this._animations[this._index]}var g=c.connect(this._current,"onStop",this,function(){this._fire("onStop",arguments);c.disconnect(g)});this._current.stop()}return this},status:function(){return this._current?this._current.status():"stopped"},destroy:function(){this._onAnimateCtx&&c.disconnect(this._onAnimateCtx);this._onEndCtx&&c.disconnect(this._onEndCtx)}});c.extend(a,d);c.fx.chain=function(f){return new a(f)};
var e=function(f){this._animations=f||[];this._connects=[];this.duration=this._finished=0;c.forEach(f,function(j){var i=j.duration;if(j.delay)i+=j.delay;if(this.duration<i)this.duration=i;this._connects.push(c.connect(j,"onEnd",this,"_onEnd"))},this);this._pseudoAnimation=new c.Animation({curve:[0,1],duration:this.duration});var g=this;c.forEach(["beforeBegin","onBegin","onPlay","onAnimate","onPause","onStop","onEnd"],function(j){g._connects.push(c.connect(g._pseudoAnimation,j,function(){g._fire(j,
arguments)}))})};c.extend(e,{_doAction:function(f,g){c.forEach(this._animations,function(j){j[f].apply(j,g)});return this},_onEnd:function(){++this._finished>this._animations.length&&this._fire("onEnd")},_call:function(f,g){var j=this._pseudoAnimation;j[f].apply(j,g)},play:function(){this._finished=0;this._doAction("play",arguments);this._call("play",arguments);return this},pause:function(){this._doAction("pause",arguments);this._call("pause",arguments);return this},gotoPercent:function(f,g){var j=
this.duration*f;c.forEach(this._animations,function(i){i.gotoPercent(i.duration<j?1:j/i.duration,g)});this._call("gotoPercent",arguments);return this},stop:function(){this._doAction("stop",arguments);this._call("stop",arguments);return this},status:function(){return this._pseudoAnimation.status()},destroy:function(){c.forEach(this._connects,c.disconnect)}});c.extend(e,d);c.fx.combine=function(f){return new e(f)};c.fx.wipeIn=function(f){var g=f.node=c.byId(f.node),j=g.style,i;f=c.animateProperty(c.mixin({properties:{height:{start:function(){i=
j.overflow;j.overflow="hidden";if(j.visibility=="hidden"||j.display=="none"){j.height="1px";j.display="";j.visibility="";return 1}else{var k=c.style(g,"height");return Math.max(k,1)}},end:function(){return g.scrollHeight}}}},f));c.connect(f,"onEnd",function(){j.height="auto";j.overflow=i});return f};c.fx.wipeOut=function(f){var g=(f.node=c.byId(f.node)).style,j;f=c.animateProperty(c.mixin({properties:{height:{end:1}}},f));c.connect(f,"beforeBegin",function(){j=g.overflow;g.overflow="hidden";g.display=
""});c.connect(f,"onEnd",function(){g.overflow=j;g.height="auto";g.display="none"});return f};c.fx.slideTo=function(f){var g=null,j=null,i=function(k){return function(){var h=c.getComputedStyle(k),l=h.position;g=l=="absolute"?k.offsetTop:parseInt(h.top)||0;j=l=="absolute"?k.offsetLeft:parseInt(h.left)||0;if(l!="absolute"&&l!="relative"){h=c.position(k,true);g=h.y;j=h.x;k.style.position="absolute";k.style.top=g+"px";k.style.left=j+"px"}}}(f.node=c.byId(f.node));i();f=c.animateProperty(c.mixin({properties:{top:f.top||
0,left:f.left||0}},f));c.connect(f,"beforeBegin",f,i);return f}})();return c.fx});
define("dijit/form/_FormMixin",["dojo","dijit","dojo/window"],function(c,d){c.declare("dijit.form._FormMixin",null,{state:"",reset:function(){c.forEach(this.getDescendants(),function(a){a.reset&&a.reset()})},validate:function(){var a=false;return c.every(c.map(this.getDescendants(),function(e){e._hasBeenBlurred=true;var f=e.disabled||!e.validate||e.validate();if(!f&&!a){c.window.scrollIntoView(e.containerNode||e.domNode);e.focus();a=true}return f}),function(e){return e})},setValues:function(a){c.deprecated(this.declaredClass+
"::setValues() is deprecated. Use set('value', val) instead.","","2.0");return this.set("value",a)},_setValueAttr:function(a){var e={};c.forEach(this.getDescendants(),function(i){if(i.name)(e[i.name]||(e[i.name]=[])).push(i)});for(var f in e)if(e.hasOwnProperty(f)){var g=e[f],j=c.getObject(f,false,a);if(j!==undefined){c.isArray(j)||(j=[j]);if(typeof g[0].checked=="boolean")c.forEach(g,function(i){i.set("value",c.indexOf(j,i.value)!=-1)});else g[0].multiple?g[0].set("value",j):c.forEach(g,function(i,
k){i.set("value",j[k])})}}},getValues:function(){c.deprecated(this.declaredClass+"::getValues() is deprecated. Use get('value') instead.","","2.0");return this.get("value")},_getValueAttr:function(){var a={};c.forEach(this.getDescendants(),function(e){var f=e.name;if(!(!f||e.disabled)){var g=e.get("value");if(typeof e.checked=="boolean")if(/Radio/.test(e.declaredClass))if(g!==false)c.setObject(f,g,a);else{g=c.getObject(f,false,a);g===undefined&&c.setObject(f,null,a)}else{e=c.getObject(f,false,a);
if(!e){e=[];c.setObject(f,e,a)}g!==false&&e.push(g)}else{e=c.getObject(f,false,a);if(typeof e!="undefined")c.isArray(e)?e.push(g):c.setObject(f,[e,g],a);else c.setObject(f,g,a)}}});return a},isValid:function(){return this.state==""},onValidStateChange:function(){},_getState:function(){var a=c.map(this._descendants,function(e){return e.get("state")||""});return c.indexOf(a,"Error")>=0?"Error":c.indexOf(a,"Incomplete")>=0?"Incomplete":""},disconnectChildren:function(){c.forEach(this._childConnections||
[],c.hitch(this,"disconnect"));c.forEach(this._childWatches||[],function(a){a.unwatch()})},connectChildren:function(a){var e=this;this.disconnectChildren();this._descendants=this.getDescendants();a=a?function(i,k){e[i]=k}:c.hitch(this,"_set");a("value",this.get("value"));a("state",this._getState());var f=this._childConnections=[],g=this._childWatches=[];c.forEach(c.filter(this._descendants,function(i){return i.validate}),function(i){c.forEach(["state","disabled"],function(k){g.push(i.watch(k,function(){e.set("state",
e._getState())}))})});var j=function(){e._onChangeDelayTimer&&clearTimeout(e._onChangeDelayTimer);e._onChangeDelayTimer=setTimeout(function(){delete e._onChangeDelayTimer;e._set("value",e.get("value"))},10)};c.forEach(c.filter(this._descendants,function(i){return i.onChange}),function(i){f.push(e.connect(i,"onChange",j));g.push(i.watch("disabled",j))})},startup:function(){this.inherited(arguments);this.connectChildren(true);this.watch("state",function(a,e,f){this.onValidStateChange(f=="")})},destroy:function(){this.disconnectChildren();
this.inherited(arguments)}});return d.form._FormMixin});
define("dijit/_DialogMixin",["dojo","dijit","dijit/_Widget"],function(c,d){c.declare("dijit._DialogMixin",null,{attributeMap:d._Widget.prototype.attributeMap,execute:function(){},onCancel:function(){},onExecute:function(){},_onSubmit:function(){this.onExecute();this.execute(this.get("value"))},_getFocusItems:function(){var a=d._getTabNavigable(this.containerNode);this._firstFocusItem=a.lowest||a.first||this.closeButtonNode||this.domNode;this._lastFocusItem=a.last||a.highest||this._firstFocusItem}});
return d._DialogMixin});
define("dijit/DialogUnderlay",["dojo","dijit","dojo/window","dijit/_Widget","dijit/_Templated"],function(c,d){c.declare("dijit.DialogUnderlay",[d._Widget,d._Templated],{templateString:"<div class='dijitDialogUnderlayWrapper'><div class='dijitDialogUnderlay' dojoAttachPoint='node'></div></div>",dialogId:"","class":"",attributeMap:{id:"domNode"},_setDialogIdAttr:function(a){c.attr(this.node,"id",a+"_underlay");this._set("dialogId",a)},_setClassAttr:function(a){this.node.className="dijitDialogUnderlay "+
a;this._set("class",a)},postCreate:function(){c.body().appendChild(this.domNode)},layout:function(){var a=this.node.style,e=this.domNode.style;e.display="none";var f=c.window.getBox();e.top=f.t+"px";e.left=f.l+"px";a.width=f.w+"px";a.height=f.h+"px";e.display="block"},show:function(){this.domNode.style.display="block";this.layout();this.bgIframe=new d.BackgroundIframe(this.domNode)},hide:function(){this.bgIframe.destroy();delete this.bgIframe;this.domNode.style.display="none"}});return d.DialogUnderlay});
define("dijit/layout/_LayoutWidget",["dojo","dijit","dijit/_Widget","dijit/_Container","dijit/_Contained"],function(c,d){c.declare("dijit.layout._LayoutWidget",[d._Widget,d._Container,d._Contained],{baseClass:"dijitLayoutContainer",isLayoutContainer:true,buildRendering:function(){this.inherited(arguments);c.addClass(this.domNode,"dijitContainer")},startup:function(){if(!this._started){this.inherited(arguments);var a=this.getParent&&this.getParent();if(!(a&&a.isLayoutContainer)){this.resize();this.connect(c.isIE?
this.domNode:c.global,"onresize",function(){this.resize()})}}},resize:function(a,e){var f=this.domNode;if(a){c.marginBox(f,a);if(a.t)f.style.top=a.t+"px";if(a.l)f.style.left=a.l+"px"}e=e||{};c.mixin(e,a||{});if(!("h"in e)||!("w"in e))e=c.mixin(c.marginBox(f),e);a=c.getComputedStyle(f);var g=c._getMarginExtents(f,a),j=c._getBorderExtents(f,a);e=this._borderBox={w:e.w-(g.w+j.w),h:e.h-(g.h+j.h)};g=c._getPadExtents(f,a);this._contentBox={l:c._toPixelValue(f,a.paddingLeft),t:c._toPixelValue(f,a.paddingTop),
w:e.w-g.w,h:e.h-g.h};this.layout()},layout:function(){},_setupChild:function(a){c.addClass(a.domNode,this.baseClass+"-child "+(a.baseClass?this.baseClass+"-"+a.baseClass:""))},addChild:function(a){this.inherited(arguments);this._started&&this._setupChild(a)},removeChild:function(a){c.removeClass(a.domNode,this.baseClass+"-child"+(a.baseClass?" "+this.baseClass+"-"+a.baseClass:""));this.inherited(arguments)}});d.layout.marginBox2contentBox=function(a,e){var f=c.getComputedStyle(a),g=c._getMarginExtents(a,
f),j=c._getPadBorderExtents(a,f);return{l:c._toPixelValue(a,f.paddingLeft),t:c._toPixelValue(a,f.paddingTop),w:e.w-(g.w+j.w),h:e.h-(g.h+j.h)}};(function(){var a=function(f){return f.substring(0,1).toUpperCase()+f.substring(1)},e=function(f,g){var j=f.resize?f.resize(g):c.marginBox(f.domNode,g);if(j)c.mixin(f,j);else{c.mixin(f,c.marginBox(f.domNode));c.mixin(f,g)}};d.layout.layoutChildren=function(f,g,j,i,k){g=c.mixin({},g);c.addClass(f,"dijitLayoutContainer");j=c.filter(j,function(h){return h.region!=
"center"&&h.layoutAlign!="client"}).concat(c.filter(j,function(h){return h.region=="center"||h.layoutAlign=="client"}));c.forEach(j,function(h){var l=h.domNode,n=h.region||h.layoutAlign,r=l.style;r.left=g.l+"px";r.top=g.t+"px";r.position="absolute";c.addClass(l,"dijitAlign"+a(n));l={};if(i&&i==h.id)l[h.region=="top"||h.region=="bottom"?"h":"w"]=k;if(n=="top"||n=="bottom"){l.w=g.w;e(h,l);g.h-=h.h;if(n=="top")g.t+=h.h;else r.top=g.t+g.h+"px"}else if(n=="left"||n=="right"){l.h=g.h;e(h,l);g.w-=h.w;if(n==
"left")g.l+=h.w;else r.left=g.l+g.w+"px"}else if(n=="client"||n=="center")e(h,g)})}})();return d.layout._LayoutWidget});
define("dijit/layout/_ContentPaneResizeMixin",["dojo","dijit","dijit/_Contained","dijit/layout/_LayoutWidget"],function(c,d){c.declare("dijit.layout._ContentPaneResizeMixin",null,{doLayout:true,isContainer:true,isLayoutContainer:true,_startChildren:function(){c.forEach(this.getChildren(),function(a){a.startup();a._started=true})},startup:function(){if(!this._started){var a=d._Contained.prototype.getParent.call(this);this._childOfLayoutWidget=a&&a.isLayoutContainer;this._needLayout=!this._childOfLayoutWidget;
this.inherited(arguments);this._startChildren();this._isShown()&&this._onShow();this._childOfLayoutWidget||this.connect(c.isIE?this.domNode:c.global,"onresize",function(){this._needLayout=!this._childOfLayoutWidget;this.resize()})}},_checkIfSingleChild:function(){var a=c.query("> *",this.containerNode).filter(function(g){return g.tagName!=="SCRIPT"}),e=a.filter(function(g){return c.hasAttr(g,"data-dojo-type")||c.hasAttr(g,"dojoType")||c.hasAttr(g,"widgetId")}),f=c.filter(e.map(d.byNode),function(g){return g&&
g.domNode&&g.resize});if(a.length==e.length&&f.length==1)this._singleChild=f[0];else delete this._singleChild;c.toggleClass(this.containerNode,this.baseClass+"SingleChild",!!this._singleChild)},resize:function(a,e){!this._wasShown&&this.open!==false&&this._onShow();this._resizeCalled=true;this._scheduleLayout(a,e)},_scheduleLayout:function(a,e){if(this._isShown())this._layout(a,e);else{this._needLayout=true;this._changeSize=a;this._resultSize=e}},_layout:function(a,e){a&&c.marginBox(this.domNode,
a);var f=this.containerNode;if(f===this.domNode){e=e||{};c.mixin(e,a||{});if(!("h"in e)||!("w"in e))e=c.mixin(c.marginBox(f),e);this._contentBox=d.layout.marginBox2contentBox(f,e)}else this._contentBox=c.contentBox(f);this._layoutChildren();delete this._needLayout},_layoutChildren:function(){this.doLayout&&this._checkIfSingleChild();if(this._singleChild&&this._singleChild.resize){var a=this._contentBox||c.contentBox(this.containerNode);this._singleChild.resize({w:a.w,h:a.h})}else c.forEach(this.getChildren(),
function(e){e.resize&&e.resize()})},_isShown:function(){if(this._childOfLayoutWidget){if(this._resizeCalled&&"open"in this)return this.open;return this._resizeCalled}else if("open"in this)return this.open;else{var a=this.domNode,e=this.domNode.parentNode;return a.style.display!="none"&&a.style.visibility!="hidden"&&!c.hasClass(a,"dijitHidden")&&e&&e.style&&e.style.display!="none"}},_onShow:function(){this._needLayout&&this._layout(this._changeSize,this._resultSize);this.inherited(arguments);this._wasShown=
true}});return d.layout._ContentPaneResizeMixin});
define("dojo/html",["dojo","dojo/parser"],function(c){c.getObject("html",true,c);(function(){var d=0;c.html._secureForInnerHtml=function(a){return a.replace(/(?:\s*<!DOCTYPE\s[^>]+>|<title[^>]*>[\s\S]*?<\/title>)/ig,"")};c.html._emptyNode=c.empty;c.html._setNodeContent=function(a,e){c.empty(a);if(e){if(typeof e=="string")e=c._toDom(e,a.ownerDocument);if(!e.nodeType&&c.isArrayLike(e))for(var f=e.length,g=0;g<e.length;g=f==e.length?g+1:0)c.place(e[g],a,"last");else c.place(e,a,"last")}return a};c.declare("dojo.html._ContentSetter",
null,{node:"",content:"",id:"",cleanContent:false,extractContent:false,parseContent:false,parserScope:c._scopeName,startup:true,constructor:function(a,e){c.mixin(this,a||{});e=this.node=c.byId(this.node||e);if(!this.id)this.id=["Setter",e?e.id||e.tagName:"",d++].join("_")},set:function(a,e){if(undefined!==a)this.content=a;e&&this._mixin(e);this.onBegin();this.setContent();this.onEnd();return this.node},setContent:function(){var a=this.node;if(!a)throw new Error(this.declaredClass+": setContent given no node");
try{a=c.html._setNodeContent(a,this.content)}catch(e){var f=this.onContentError(e);try{a.innerHTML=f}catch(g){console.error("Fatal "+this.declaredClass+".setContent could not change content due to "+g.message,g)}}this.node=a},empty:function(){if(this.parseResults&&this.parseResults.length){c.forEach(this.parseResults,function(a){a.destroy&&a.destroy()});delete this.parseResults}c.html._emptyNode(this.node)},onBegin:function(){var a=this.content;if(c.isString(a)){if(this.cleanContent)a=c.html._secureForInnerHtml(a);
if(this.extractContent){var e=a.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);if(e)a=e[1]}}this.empty();this.content=a;return this.node},onEnd:function(){this.parseContent&&this._parse();return this.node},tearDown:function(){delete this.parseResults;delete this.node;delete this.content},onContentError:function(a){return"Error occured setting content: "+a},_mixin:function(a){var e={},f;for(f in a)f in e||(this[f]=a[f])},_parse:function(){var a=this.node;try{var e={};c.forEach(["dir","lang","textDir"],
function(g){if(this[g])e[g]=this[g]},this);this.parseResults=c.parser.parse({rootNode:a,noStart:!this.startup,inherited:e,scope:this.parserScope})}catch(f){this._onError("Content",f,"Error parsing in _ContentSetter#"+this.id)}},_onError:function(a,e,f){a=this["on"+a+"Error"].call(this,e);if(f)console.error(f,e);else a&&c.html._setNodeContent(this.node,a,true)}});c.html.set=function(a,e,f){if(undefined==e){console.warn("dojo.html.set: no cont argument provided, using empty string");e=""}return f?(new c.html._ContentSetter(c.mixin(f,
{content:e,node:a}))).set():c.html._setNodeContent(a,e,true)}})();return c.html});define("dijit/nls/loading",{root:{loadingState:"Loading...",errorState:"Sorry, an error occurred"},zh:true,"zh-tw":true,tr:true,th:true,sv:true,sl:true,sk:true,ru:true,ro:true,pt:true,"pt-pt":true,pl:true,nl:true,nb:true,ko:true,kk:true,ja:true,it:true,hu:true,he:true,fr:true,fi:true,es:true,el:true,de:true,da:true,cs:true,ca:true,ar:true});
define("dijit/layout/ContentPane",["dojo","dijit","dijit/_Widget","dijit/layout/_ContentPaneResizeMixin","dojo/string","dojo/html","i18n!dijit/nls/loading"],function(c,d){c.declare("dijit.layout.ContentPane",[d._Widget,d.layout._ContentPaneResizeMixin],{href:"",extractContent:false,parseOnLoad:true,parserScope:c._scopeName,preventCache:false,preload:false,refreshOnShow:false,loadingMessage:"<span class='dijitContentPaneLoading'>${loadingState}</span>",errorMessage:"<span class='dijitContentPaneError'>${errorState}</span>",
isLoaded:false,baseClass:"dijitContentPane",ioArgs:{},onLoadDeferred:null,attributeMap:c.delegate(d._Widget.prototype.attributeMap,{title:[]}),stopParser:true,template:false,create:function(a,e){if((!a||!a.template)&&e&&!("href"in a)&&!("content"in a)){var f=c.doc.createDocumentFragment();for(e=c.byId(e);e.firstChild;)f.appendChild(e.firstChild);a=c.delegate(a,{content:f})}this.inherited(arguments,[a,e])},postMixInProperties:function(){this.inherited(arguments);var a=c.i18n.getLocalization("dijit",
"loading",this.lang);this.loadingMessage=c.string.substitute(this.loadingMessage,a);this.errorMessage=c.string.substitute(this.errorMessage,a)},buildRendering:function(){this.inherited(arguments);if(!this.containerNode)this.containerNode=this.domNode;this.domNode.title="";c.attr(this.domNode,"role")||d.setWaiRole(this.domNode,"group")},_startChildren:function(){this.inherited(arguments);this._contentSetter&&c.forEach(this._contentSetter.parseResults,function(a){if(!a._started&&!a._destroyed&&c.isFunction(a.startup)){a.startup();
a._started=true}},this)},setHref:function(a){c.deprecated("dijit.layout.ContentPane.setHref() is deprecated. Use set('href', ...) instead.","","2.0");return this.set("href",a)},_setHrefAttr:function(a){this.cancel();this.onLoadDeferred=new c.Deferred(c.hitch(this,"cancel"));this.onLoadDeferred.addCallback(c.hitch(this,"onLoad"));this._set("href",a);if(this.preload||this._created&&this._isShown())this._load();else this._hrefChanged=true;return this.onLoadDeferred},setContent:function(a){c.deprecated("dijit.layout.ContentPane.setContent() is deprecated.  Use set('content', ...) instead.",
"","2.0");this.set("content",a)},_setContentAttr:function(a){this._set("href","");this.cancel();this.onLoadDeferred=new c.Deferred(c.hitch(this,"cancel"));this._created&&this.onLoadDeferred.addCallback(c.hitch(this,"onLoad"));this._setContent(a||"");this._isDownloaded=false;return this.onLoadDeferred},_getContentAttr:function(){return this.containerNode.innerHTML},cancel:function(){this._xhrDfd&&this._xhrDfd.fired==-1&&this._xhrDfd.cancel();delete this._xhrDfd;this.onLoadDeferred=null},uninitialize:function(){this._beingDestroyed&&
this.cancel();this.inherited(arguments)},destroyRecursive:function(){this._beingDestroyed||this.inherited(arguments)},_onShow:function(){this.inherited(arguments);if(this.href)if(!this._xhrDfd&&(!this.isLoaded||this._hrefChanged||this.refreshOnShow))return this.refresh()},refresh:function(){this.cancel();this.onLoadDeferred=new c.Deferred(c.hitch(this,"cancel"));this.onLoadDeferred.addCallback(c.hitch(this,"onLoad"));this._load();return this.onLoadDeferred},_load:function(){this._setContent(this.onDownloadStart(),
true);var a=this,e={preventCache:this.preventCache||this.refreshOnShow,url:this.href,handleAs:"text"};c.isObject(this.ioArgs)&&c.mixin(e,this.ioArgs);var f=this._xhrDfd=(this.ioMethod||c.xhrGet)(e);f.addCallback(function(g){try{a._isDownloaded=true;a._setContent(g,false);a.onDownloadEnd()}catch(j){a._onError("Content",j)}delete a._xhrDfd;return g});f.addErrback(function(g){f.canceled||a._onError("Download",g);delete a._xhrDfd;return g});delete this._hrefChanged},_onLoadHandler:function(a){this._set("isLoaded",
true);try{this.onLoadDeferred.callback(a)}catch(e){console.error("Error "+this.widgetId+" running custom onLoad code: "+e.message)}},_onUnloadHandler:function(){this._set("isLoaded",false);try{this.onUnload()}catch(a){console.error("Error "+this.widgetId+" running custom onUnload code: "+a.message)}},destroyDescendants:function(){this.isLoaded&&this._onUnloadHandler();var a=this._contentSetter;c.forEach(this.getChildren(),function(e){e.destroyRecursive&&e.destroyRecursive()});if(a){c.forEach(a.parseResults,
function(e){e.destroyRecursive&&e.domNode&&e.domNode.parentNode==c.body()&&e.destroyRecursive()});delete a.parseResults}c.html._emptyNode(this.containerNode);delete this._singleChild},_setContent:function(a,e){this.destroyDescendants();var f=this._contentSetter;if(!(f&&f instanceof c.html._ContentSetter))f=this._contentSetter=new c.html._ContentSetter({node:this.containerNode,_onError:c.hitch(this,this._onError),onContentError:c.hitch(this,function(j){j=this.onContentError(j);try{this.containerNode.innerHTML=
j}catch(i){console.error("Fatal "+this.id+" could not change content due to "+i.message,i)}})});var g=c.mixin({cleanContent:this.cleanContent,extractContent:this.extractContent,parseContent:this.parseOnLoad,parserScope:this.parserScope,startup:false,dir:this.dir,lang:this.lang},this._contentSetterParams||{});f.set(c.isObject(a)&&a.domNode?a.domNode:a,g);delete this._contentSetterParams;this.doLayout&&this._checkIfSingleChild();if(!e){if(this._started){this._startChildren();this._scheduleLayout()}this._onLoadHandler(a)}},
_onError:function(a,e,f){this.onLoadDeferred.errback(e);a=this["on"+a+"Error"].call(this,e);if(f)console.error(f,e);else a&&this._setContent(a,true)},onLoad:function(){},onUnload:function(){},onDownloadStart:function(){return this.loadingMessage},onContentError:function(){},onDownloadError:function(){return this.errorMessage},onDownloadEnd:function(){}});return d.layout.ContentPane});
define("dijit/nls/common",{root:{buttonOk:"OK",buttonCancel:"Cancel",buttonSave:"Save",itemClose:"Close"},zh:true,"zh-tw":true,tr:true,th:true,sv:true,sl:true,sk:true,ru:true,ro:true,pt:true,"pt-pt":true,pl:true,nl:true,nb:true,ko:true,kk:true,ja:true,it:true,hu:true,he:true,fr:true,fi:true,es:true,el:true,de:true,da:true,cs:true,ca:true,ar:true});define("text!dijit/templates/TooltipDialog.html",function(){return'<div role="presentation" tabIndex="-1">\n\t<div class="dijitTooltipContainer" role="presentation">\n\t\t<div class ="dijitTooltipContents dijitTooltipFocusNode" dojoAttachPoint="containerNode" role="dialog"></div>\n\t</div>\n\t<div class="dijitTooltipConnector" role="presentation"></div>\n</div>'});
define("dijit/TooltipDialog",["dojo","dijit","text!dijit/templates/TooltipDialog.html","dijit/layout/ContentPane","dijit/_Templated","dijit/form/_FormMixin","dijit/_DialogMixin"],function(c,d){c.declare("dijit.TooltipDialog",[d.layout.ContentPane,d._Templated,d.form._FormMixin,d._DialogMixin],{title:"",doLayout:false,autofocus:true,baseClass:"dijitTooltipDialog",_firstFocusItem:null,_lastFocusItem:null,templateString:c.cache("dijit","templates/TooltipDialog.html"),_setTitleAttr:function(a){this.containerNode.title=
a;this._set("title",a)},postCreate:function(){this.inherited(arguments);this.connect(this.containerNode,"onkeypress","_onKey")},orient:function(a,e,f){a="dijitTooltipAB"+(f.charAt(1)=="L"?"Left":"Right")+" dijitTooltip"+(f.charAt(0)=="T"?"Below":"Above");c.replaceClass(this.domNode,a,this._currentOrientClass||"");this._currentOrientClass=a},focus:function(){this._getFocusItems(this.containerNode);d.focus(this._firstFocusItem)},onOpen:function(a){this.orient(this.domNode,a.aroundCorner,a.corner);this._onShow()},
onClose:function(){this.onHide()},_onKey:function(a){var e=a.target,f=c.keys;a.charOrCode===f.TAB&&this._getFocusItems(this.containerNode);var g=this._firstFocusItem==this._lastFocusItem;if(a.charOrCode==f.ESCAPE){setTimeout(c.hitch(this,"onCancel"),0);c.stopEvent(a)}else if(e==this._firstFocusItem&&a.shiftKey&&a.charOrCode===f.TAB){g||d.focus(this._lastFocusItem);c.stopEvent(a)}else if(e==this._lastFocusItem&&a.charOrCode===f.TAB&&!a.shiftKey){g||d.focus(this._firstFocusItem);c.stopEvent(a)}else a.charOrCode===
f.TAB&&a.stopPropagation()}});return d.TooltipDialog});
define("dijit/Dialog",["dojo","dijit","text!dijit/templates/Dialog.html","dojo/dnd/move","dojo/dnd/TimedMoveable","dojo/fx","dojo/window","dijit/_Widget","dijit/_Templated","dijit/_CssStateMixin","dijit/form/_FormMixin","dijit/_DialogMixin","dijit/DialogUnderlay","dijit/layout/ContentPane","i18n!dijit/nls/common","dijit/TooltipDialog"],function(c,d){c.declare("dijit._DialogBase",[d._Templated,d.form._FormMixin,d._DialogMixin,d._CssStateMixin],{templateString:c.cache("dijit","templates/Dialog.html"),
baseClass:"dijitDialog",cssStateNodes:{closeButtonNode:"dijitDialogCloseIcon"},attributeMap:c.delegate(d._Widget.prototype.attributeMap,{title:[{node:"titleNode",type:"innerHTML"},{node:"titleBar",type:"attribute"}],"aria-describedby":""}),open:false,duration:d.defaultDuration,refocus:true,autofocus:true,_firstFocusItem:null,_lastFocusItem:null,doLayout:false,draggable:true,"aria-describedby":"",postMixInProperties:function(){var a=c.i18n.getLocalization("dijit","common");c.mixin(this,a);this.inherited(arguments)},
postCreate:function(){c.style(this.domNode,{display:"none",position:"absolute"});c.body().appendChild(this.domNode);this.inherited(arguments);this.connect(this,"onExecute","hide");this.connect(this,"onCancel","hide");this._modalconnects=[]},onLoad:function(){this._position();if(this.autofocus&&d._DialogLevelManager.isTop(this)){this._getFocusItems(this.domNode);d.focus(this._firstFocusItem)}this.inherited(arguments)},_endDrag:function(a){if(a&&a.node&&a.node===this.domNode)this._relativePosition=
c.position(a.node)},_setup:function(){var a=this.domNode;if(this.titleBar&&this.draggable){this._moveable=c.isIE==6?new c.dnd.TimedMoveable(a,{handle:this.titleBar}):new c.dnd.Moveable(a,{handle:this.titleBar,timeout:0});this._dndListener=c.subscribe("/dnd/move/stop",this,"_endDrag")}else c.addClass(a,"dijitDialogFixed");this.underlayAttrs={dialogId:this.id,"class":c.map(this["class"].split(/\s/),function(e){return e+"_underlay"}).join(" ")}},_size:function(){this._checkIfSingleChild();if(this._singleChild){if(this._singleChildOriginalStyle)this._singleChild.domNode.style.cssText=
this._singleChildOriginalStyle;delete this._singleChildOriginalStyle}else c.style(this.containerNode,{width:"auto",height:"auto"});var a=c._getMarginSize(this.domNode),e=c.window.getBox();if(a.w>=e.w||a.h>=e.h){var f=Math.min(a.w,Math.floor(e.w*0.75));a=Math.min(a.h,Math.floor(e.h*0.75));if(this._singleChild&&this._singleChild.resize){this._singleChildOriginalStyle=this._singleChild.domNode.style.cssText;this._singleChild.resize({w:f,h:a})}else c.style(this.containerNode,{width:f+"px",height:a+"px",
overflow:"auto",position:"relative"})}else this._singleChild&&this._singleChild.resize&&this._singleChild.resize()},_position:function(){if(!c.hasClass(c.body(),"dojoMove")){var a=this.domNode,e=c.window.getBox(),f=this._relativePosition,g=f?null:c._getBorderBox(a),j=Math.floor(e.l+(f?f.x:(e.w-g.w)/2));e=Math.floor(e.t+(f?f.y:(e.h-g.h)/2));c.style(a,{left:j+"px",top:e+"px"})}},_onKey:function(a){if(a.charOrCode){var e=c.keys,f=a.target;a.charOrCode===e.TAB&&this._getFocusItems(this.domNode);var g=
this._firstFocusItem==this._lastFocusItem;if(f==this._firstFocusItem&&a.shiftKey&&a.charOrCode===e.TAB){g||d.focus(this._lastFocusItem);c.stopEvent(a)}else if(f==this._lastFocusItem&&a.charOrCode===e.TAB&&!a.shiftKey){g||d.focus(this._firstFocusItem);c.stopEvent(a)}else{for(;f;){if(f==this.domNode||c.hasClass(f,"dijitPopup"))if(a.charOrCode==e.ESCAPE)this.onCancel();else return;f=f.parentNode}if(a.charOrCode!==e.TAB)c.stopEvent(a);else if(!c.isOpera)try{this._firstFocusItem.focus()}catch(j){}}}},
show:function(){if(!this.open){this._started||this.startup();if(!this._alreadyInitialized){this._setup();this._alreadyInitialized=true}this._fadeOutDeferred&&this._fadeOutDeferred.cancel();this._modalconnects.push(c.connect(window,"onscroll",this,"layout"));this._modalconnects.push(c.connect(window,"onresize",this,function(){var e=c.window.getBox();if(!this._oldViewport||e.h!=this._oldViewport.h||e.w!=this._oldViewport.w){this.layout();this._oldViewport=e}}));this._modalconnects.push(c.connect(this.domNode,
"onkeypress",this,"_onKey"));c.style(this.domNode,{opacity:0,display:""});this._set("open",true);this._onShow();this._size();this._position();var a;this._fadeInDeferred=new c.Deferred(c.hitch(this,function(){a.stop();delete this._fadeInDeferred}));a=c.fadeIn({node:this.domNode,duration:this.duration,beforeBegin:c.hitch(this,function(){d._DialogLevelManager.show(this,this.underlayAttrs)}),onEnd:c.hitch(this,function(){if(this.autofocus&&d._DialogLevelManager.isTop(this)){this._getFocusItems(this.domNode);
d.focus(this._firstFocusItem)}this._fadeInDeferred.callback(true);delete this._fadeInDeferred})}).play();return this._fadeInDeferred}},hide:function(){if(this._alreadyInitialized){this._fadeInDeferred&&this._fadeInDeferred.cancel();var a;this._fadeOutDeferred=new c.Deferred(c.hitch(this,function(){a.stop();delete this._fadeOutDeferred}));a=c.fadeOut({node:this.domNode,duration:this.duration,onEnd:c.hitch(this,function(){this.domNode.style.display="none";d._DialogLevelManager.hide(this);this.onHide();
this._fadeOutDeferred.callback(true);delete this._fadeOutDeferred})}).play();if(this._scrollConnected)this._scrollConnected=false;c.forEach(this._modalconnects,c.disconnect);this._modalconnects=[];this._relativePosition&&delete this._relativePosition;this._set("open",false);return this._fadeOutDeferred}},layout:function(){if(this.domNode.style.display!="none"){d._underlay&&d._underlay.layout();this._position()}},destroy:function(){this._fadeInDeferred&&this._fadeInDeferred.cancel();this._fadeOutDeferred&&
this._fadeOutDeferred.cancel();this._moveable&&this._moveable.destroy();this._dndListener&&c.unsubscribe(this._dndListener);c.forEach(this._modalconnects,c.disconnect);d._DialogLevelManager.hide(this);this.inherited(arguments)}});c.declare("dijit.Dialog",[d.layout.ContentPane,d._DialogBase],{});d._DialogLevelManager={show:function(a,e){var f=d._dialogStack;f[f.length-1].focus=d.getFocus(a);var g=d._underlay;if(!g||g._destroyed)g=d._underlay=new d.DialogUnderlay(e);else g.set(a.underlayAttrs);var j=
f[f.length-1].dialog?f[f.length-1].zIndex+2:950;f.length==1&&g.show();c.style(d._underlay.domNode,"zIndex",j-1);c.style(a.domNode,"zIndex",j);f.push({dialog:a,underlayAttrs:e,zIndex:j})},hide:function(a){var e=d._dialogStack;if(e[e.length-1].dialog==a){e.pop();var f=e[e.length-1];if(e.length==1)d._underlay._destroyed||d._underlay.hide();else{c.style(d._underlay.domNode,"zIndex",f.zIndex-1);d._underlay.set(f.underlayAttrs)}if(a.refocus){e=f.focus;if(!e||f.dialog&&!c.isDescendant(e.node,f.dialog.domNode)){f.dialog._getFocusItems(f.dialog.domNode);
e=f.dialog._firstFocusItem}try{d.focus(e)}catch(g){}}}else{f=c.indexOf(c.map(e,function(j){return j.dialog}),a);f!=-1&&e.splice(f,1)}},isTop:function(a){var e=d._dialogStack;return e[e.length-1].dialog==a}};d._dialogStack=[{dialog:null,focus:null,underlayAttrs:null}];return d.Dialog});
define("orion/widgets/_OrionDialogMixin",["dojo","dijit"],function(c,d){c.declare("orion.widgets._OrionDialogMixin",null,{postMixInProperties:function(){this.inherited(arguments);this.title=this.options.title||"Information Needed";this.buttonCancel="Cancel"},postCreate:function(){this.inherited(arguments);c.connect(this,"onKeyPress",c.hitch(this,function(a){a.keyCode===c.keys.ENTER&&this._onSubmit()}))},onHide:function(){this.inherited(arguments);setTimeout(c.hitch(this,function(){if(c.isDescendant(d._curFocus,
this.domNode))d._curFocus=null;if(c.isDescendant(d._prevFocus,this.domNode))d._prevFocus=null;this.destroyRecursive()}),this.duration)}})});define("text!orion/widgets/templates/OpenResourceDialog.html",function(){return'<div class="dijitDialog" tabindex="-1" waiRole="dialog" title="${title}" waiState="labelledby-${id}_title">\n\t<div dojoAttachPoint="titleBar" class="dijitDialogTitleBar">\n\t\t<span dojoAttachPoint="titleNode" class="dijitDialogTitle" id="${id}_title"></span>\n\t\t<span dojoAttachPoint="closeButtonNode" class="dijitDialogCloseIcon" dojoAttachEvent="onclick: onCancel" title="${buttonCancel}">\n\t\t\t<span dojoAttachPoint="closeText" class="closeText" title="${buttonCancel}">x</span>\n\t\t</span>\n\t</div>\n\t<div dojoAttachPoint="containerNode" class="dijitDialogPaneContent">\n\t\t<div style="display:table">\n\t\t\t<div style="display:table-row">\n\t\t\t\t<div style="display:table-cell; padding:5;">\n\t\t\t\t\t<label for="resourceName" style="padding-right:10">${selectFile}</label>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div style="display:table-row">\n\t\t\t\t<div style="display:table-cell; padding:5;">\n\t\t\t\t\t<input type="text" dojoType="dijit.form.TextBox" dojoAttachPoint="resourceName" \n\t\t\t\t\t\tplaceHolder="${searchPlaceHolder}"\n\t\t\t\t\t\tintermediateChanges="true" style="width:30em;">\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div style="display:table-row">\n\t\t\t\t<div dojoAttachPoint="results" style="max-height:400px; height:auto; overflow-y:auto;"></div>\n\t\t\t</div>\n\t\t\t<div style="display:table-row">\n\t\t\t\t<div dojoAttachPoint="statusbar" style="display:table-cell;"></div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>'});
define("orion/widgets/OpenResourceDialog",["dojo","dijit","dijit/Dialog","dijit/form/TextBox","orion/widgets/_OrionDialogMixin","text!orion/widgets/templates/OpenResourceDialog.html"],function(c,d){return c.declare("orion.widgets.OpenResourceDialog",[d.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:true,templateString:c.cache("orion","widgets/templates/OpenResourceDialog.html"),SEARCH_DELAY:500,timeoutId:null,time:null,options:null,searchLocation:null,searcher:null,constructor:function(){this.inherited(arguments);
this.timeoutId=null;this.time=0;this.searchLocation=(this.options=arguments[0])&&this.options.SearchLocation;this.searcher=this.options&&this.options.searcher;if(!this.searchLocation)throw new Error("Missing required argument: SearchLocation");if(!this.searcher)throw new Error("Missing required argument: searcher");},postMixInProperties:function(){this.options.title=this.options.title||"Find File Named";this.selectFile="Type the name of a file to open (? = any character, * = any string):";this.searchPlaceHolder=
"Search";this.inherited(arguments)},postCreate:function(){this.inherited(arguments);c.connect(this.resourceName,"onChange",this,function(){this.time=+new Date;clearTimeout(this.timeoutId);this.timeoutId=setTimeout(c.hitch(this,this.checkSearch),0)});c.connect(this.resourceName,"onKeyPress",this,function(a){if(a.keyCode===c.keys.ENTER&&this.results){a=c.query("a",this.results);if(a.length>0){window.open(a[0].href);this.hide()}}});c.connect(this,"onMouseUp",function(a){a.target.focus()})},checkSearch:function(){clearTimeout(this.timeoutId);
var a=(new Date).getTime();if(a-this.time>this.SEARCH_DELAY){this.time=a;this.doSearch()}else this.timeoutId=setTimeout(c.hitch(this,"checkSearch"),50)},doSearch:function(){var a=this.resourceName&&this.resourceName.get("value");if(a){c.place("<div>Searching&#x2026;</div>",this.results,"only");var e=this;setTimeout(function(){var f=e.searcher.createSearchQuery(e.searchLocation,null,a);e.searcher.search(e.results,f,false,false,c.hitch(e,e.decorateResult),true,true)},0)}},decorateResult:function(a){var e=
this;c.query("a",a).forEach(function(f){c.connect(f,"onmouseup",function(g){!c.mouseButtons.isMiddle(g)&&!c.isCopyKey(g)&&e.hide()})})},show:function(){this.inherited(arguments);this.resourceName.focus()},onHide:function(){clearTimeout(this.timeoutId);this.inherited(arguments)}})});define("text!orion/widgets/templates/LoginDialog.html",function(){return'\n<div>\n\t<div class="dijitTooltipContainer" role="presentation" style="width: 300px; padding-left: 0; padding-right: 0; padding-top: 0.5em; padding-bottom: 0.45em">\n\t\t<div class="dijitTooltipContents dijitTooltipFocusNode" role="dialog"\n\t\t\tdojoattachpoint="containerNode" style="padding: 0">\n\t\t\t<table dojoAttachPoint="authenticated" style="display: none; width: 100%;">\n\t\t\t <tbody dojoAttachPoint="authenticatedList">\n\t\t\t</tbody>\n\t\t\t</span>\n\t\t\t\n\t\t\t<table dojoAttachPoint="otherUnauthenticated" style="display: none; width: 100%;">\n\t\t\t <tbody dojoAttachPoint="otherUnauthenticatedList">\n\t\t\t</tbody>\n\t\t\t</span>\n\t\t</div>\n\t</div>\n\t<div class="dijitTooltipConnector" role="presentation"></div>\n\n</div>'});
define("orion/widgets/LoginDialog",["require","dojo","dijit","orion/util","dijit/TooltipDialog","text!orion/widgets/templates/LoginDialog.html"],function(c,d,a,e){d.declare("orion.widgets.LoginDialog",[a.TooltipDialog],{widgetsInTemplate:true,templateString:d.cache("orion","widgets/templates/LoginDialog.html"),constructor:function(){this.inherited(arguments);this.options=arguments[0]||{};this.authenticatedServices={};this.unauthenticatedServices={}},setPendingAuthentication:function(f){for(var g in this.unauthenticatedServices)delete this.unauthenticatedServices[g].pending;
for(g in f)if(this.unauthenticatedServices[f[g].SignInKey])this.unauthenticatedServices[f[g].SignInKey].pending=true;else if(this.authenticatedServices[f[g].SignInKey]){this.unauthenticatedServices[f[g].SignInKey]=this.authenticatedServices[f[g].SignInKey];this.unauthenticatedServices[f[g].SignInKey].pending=true;delete this.authenticatedServices[f[g].SignInKey]}else this.unauthenticatedServices[f[g].SignInKey]={label:f[g].SignInKey,SignInLocation:f[g].SignInLocation,pending:true};this.renderUnauthenticatedServices();
this.renderAuthenticatedServices()},addUserItem:function(f,g,j,i){if(i){this.unauthenticatedServices[f]&&delete this.unauthenticatedServices[f];this.authenticatedServices[f]={authService:g,label:j,data:i}}else{this.authenticatedServices[f]&&delete this.authenticatedServices[f];this.unauthenticatedServices[f]=this.unauthenticatedServices[f]?{authService:g,label:j,pending:this.unauthenticatedServices[f].pending}:{authService:g,label:j}}d.hitch(this,this.renderAuthenticatedServices)();d.hitch(this,this.renderUnauthenticatedServices)();
if(a.byId("logins"))if(this.isSingleService()&&i){e.setUserName(i.login);f=i.Name&&i.Name.replace(/^\s+|\s+$/g,"")!==""?i.Name:i.login;if(f.length>40)f=f.substring(0,30)+"...";a.byId("logins").setLabel(f)}else a.byId("logins").setLabel("Security")},renderAuthenticatedServices:function(){d.empty(this.authenticatedList);this.authenticated.style.display=this.isEmpty(this.authenticatedServices)?"none":"";var f=this,g=true;for(var j in this.authenticatedServices){if(!g){var i=d.create("tr",null,this.authenticatedList);
d.create("td",{style:"padding: 0; margin 0;",colspan:2,innerHTML:"<hr style='border-bottom: medium none; border-top: 1px solid #D3D3D3; color: gray; height: 0; margin: 2px;'>"},i)}g=false;i=d.create("tr",{className:"navTableHeading"});var k=d.create("td",{innerHTML:"<h2>"+(this.authenticatedServices[j].label?this.authenticatedServices[j].label:j)+"</h2>"},i,"only");d.addClass(k,"LoginWindowLeft");k=d.create("td",{style:"text-align: right"},i,"last");d.addClass(k,"LoginWindowRight");var h=this.authenticatedServices[j].data,
l=this.authenticatedServices[j].authService;h.Location&&d.create("a",{href:c.toUrl("profile/user-profile.html")+"#"+h.Location,innerHTML:"Profile"},k,"last");d.place(document.createTextNode(" "),k,"last");if(l.logout){var n=d.create("a",{innerHTML:"Sign out"},k,"last");d.connect(n,"onmouseover",n,function(){n.style.cursor="pointer"});d.connect(n,"onmouseout",n,function(){n.style.cursor="default"});d.connect(n,"onclick",d.hitch(f,function(r,m){return function(){r.logout().then(d.hitch(f,function(){this.addUserItem(m,
r,this.authenticatedServices[m].label);this.isSingleService()&&a.popup.close(this);localStorage.removeItem(m)}))}})(l,j))}d.place(i,this.authenticatedList,"last");k="N/A";if(h&&h.lastlogintimestamp)k=d.date.locale.format(new Date(h.lastlogintimestamp),{formatLength:"short"});h=h.Name&&h.Name.replace(/^\s+|\s+$/g,"")!==""?h.Name:h.login;i=d.create("tr");k=h.length>40?d.create("td",{innerHTML:h.substring(0,30)+"... logged in since "+k,colspan:2,title:h+" logged in since "+k},i,"only"):d.create("td",
{innerHTML:h+" logged in since "+k,colspan:2},i,"only");d.addClass(k,"LoginWindowLeft");d.addClass(k,"LoginWindowRight");d.addClass(k,"LoginWindowComment");d.place(i,this.authenticatedList,"last")}},renderUnauthenticatedServices:function(){d.empty(this.otherUnauthenticatedList);var f=this;this.otherUnauthenticated.style.display=this.isEmpty(this.unauthenticatedServices)?"none":"";var g=true;for(var j in this.unauthenticatedServices){if(!g||!this.isEmpty(this.authenticatedServices)){var i=d.create("tr",
null,this.otherUnauthenticatedList);d.create("td",{style:"padding: 0; margin 0;",colspan:2,innerHTML:"<hr style='border-bottom: medium none; border-top: 1px solid #D3D3D3; color: gray; height: 0; margin: 2px;'>"},i)}g=false;i=d.create("tr",{className:"navTableHeading"});var k=d.create("td",null,i,"only");d.addClass(k,"LoginWindowLeft");d.create("h2",{innerHTML:this.unauthenticatedServices[j].label?this.unauthenticatedServices[j].label:j},k,"only");k=d.create("td",{style:"text-align: right"},i,"last");
d.addClass(k,"LoginWindowRight");var h=this.unauthenticatedServices[j].authService;if(h)if(h.getAuthForm)d.hitch(f,function(r,m){h.getAuthForm(eclipse.globalCommandUtils.notifyAuthenticationSite).then(function(o){o.indexOf("?")==-1?d.create("a",{target:"_blank",href:o+"?redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+"?key="+m,innerHTML:"Sign in"},r,"last"):d.create("a",{target:"_blank",href:o+"&redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+"?key="+m,innerHTML:"Sign in"},
r,"last")})})(k,j);else{if(h.login){var l=d.create("a",{innerHTML:"Sign in",style:"cursor: hand;"},k,"last");d.connect(l,"onmouseover",l,function(){l.style.cursor="pointer"});d.connect(l,"onmouseout",l,function(){l.style.cursor="default"});d.connect(l,"onclick",d.hitch(f,function(r){return function(){r.login(eclipse.globalCommandUtils.notifyAuthenticationSite).then(function(){f.isSingleService()&&a.popup.close(f)})}})(h))}}else{var n=this.unauthenticatedServices[j].SignInLocation;n.indexOf("?")==
-1?d.create("a",{target:"_blank",href:n+"?redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+"?key="+j,innerHTML:"Sign in"},k,"last"):d.create("a",{target:"_blank",href:n+"&redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+"?key="+j,innerHTML:"Sign in"},k,"last")}d.place(i,this.otherUnauthenticatedList,"last");if(this.unauthenticatedServices[j].pending){i=d.create("tr");k=d.create("td",{innerHTML:"Authentication required!",style:"padding-left: 10px",colspan:2},i,"only");d.addClass(k,
"LoginWindowLeft");d.addClass(k,"LoginWindowRight");d.create("img",{src:c.toUrl("images/warning.gif"),style:"padding-right: 4px; vertical-align: bottom; padding-bottom: 2px;"},k,"first");d.place(i,this.otherUnauthenticatedList,"last")}}},isSingleService:function(){return this.length(this.unauthenticatedServices)+this.length(this.authenticatedServices)===1},isEmpty:function(f){for(var g in f)if(f.hasOwnProperty(g))return false;return true},length:function(f){var g=0;for(var j in f)f.hasOwnProperty(j)&&
g++;return g},getHostname:function(f){var g=document.createElement("img");g.src=f;f=g.src;g.src=null;return f.match(/^(?:f|ht)tp(?:s)?:\/\/([^\/]+)/im)[1].toString()}})});
define("orion/globalCommands",["require","dojo","dijit","orion/commands","orion/util","orion/textview/keyBinding","dijit/Menu","dijit/MenuItem","dijit/form/DropDownButton","orion/widgets/OpenResourceDialog","orion/widgets/LoginDialog"],function(c,d,a,e,f,g){function j(q){var u=document.createElement("a");u.href=q;return u.href}function i(q,u){if(q.getLabel)return q.getLabel();else{q=new d.Deferred;q.callback(u.properties.name);return q}}function k(q){var u=q.getServiceReferences("orion.core.auth"),
y=d.byId("userInfo");if(y){if(!a.byId("logins")){var C=new a.form.DropDownButton({id:"logins",label:"Security",dropDown:s,title:"Login statuses"});d.addClass(C.domNode,"commandImage");d.place(C.domNode,y,"only")}for(y=0;y<u.length;y++){var v=u[y];q.getService(v).then(function(w){i(w,v).then(function(A){w.getKey().then(function(z){w.getUser().then(function(F){s.addUserItem(z,w,A,F)},function(){s.addUserItem(z,w,A)});window.addEventListener("storage",function(){if(p[z]!==localStorage.getItem(z)){p[z]=
localStorage.getItem(z);w.getUser().then(function(F){s.addUserItem(z,w,A,F)},function(){s.addUserItem(z,w,A)})}},false)})})})}}}function h(q){s.setPendingAuthentication(q);var u;for(u in q)if(q.hasOwnProperty(u)){a.popup.open({popup:s,around:d.byId("logins")});return}a.popup.close(s)}function l(q,u,y,C){var v=d.byId("pageActions");if(y)v=d.byId(y);if(v){d.empty(v);q.renderCommands(v,"dom",u,u,"image",null,null,!C)}}function n(q,u,y,C,v,w,A,z){var F=c.toUrl("filesearch._");F=F.substring(0,F.length-
2)+"?q=";var G;C=d.byId(q);if(!C)throw"could not find banner parent, id was "+q;d.place(r,C,"only");d.place('<div id="keyAssist" class="keyAssistFloat"></div>',document.body,"last");var H=d.byId("primaryNav");if(H)for(var I=u.getServiceReferences("orion.page.link"),J=0;J<I.length;J++)u.getService(I[J]).then(function(){for(var O={},W=I[J].getPropertyNames(),aa=0;aa<W.length;aa++)O[W[aa]]=I[J].getProperty(W[aa]);if(O.href&&O.name){W=d.create("a",{href:O.href},H,"last");d.addClass(W,"commandLink");G=
document.createTextNode(O.name);d.place(G,W,"only")}});var N=d.byId("search");if(!N)throw"failed to generate HTML for banner";d.connect(N,"onkeypress",function(O){if(O.charOrCode===d.keys.ENTER)if(F){if(N.value.length>0){O=v.createSearchQuery("../filesearch?q=",N.value);window.location=c.toUrl("search/search.html")+"#"+O}}else window.alert("Can't search: SearchLocation not available")});if(q=d.byId("pageTitle")){G=document.createTextNode(document.title);d.place(G,q,"last")}var Q=function(O,W,aa){var da=
new orion.widgets.OpenResourceDialog({SearchLocation:O,searcher:W});aa&&d.connect(da,"onHide",function(){aa.getTextView().focus()});window.setTimeout(function(){da.show()},0)};q=new e.Command({name:"Find File Named...",tooltip:"Choose a file by name and open an editor on it",id:"eclipse.openResource",callback:function(){Q(F,v,A)}});if(A){A.getTextView().setKeyBinding(new g.KeyBinding("r",true,true,false),"Find File Named...");A.getTextView().setAction("Find File Named...",function(){Q(F,v,A);return true})}y.addCommand(q,
"global");y.registerCommandContribution("eclipse.openResource",1,"globalActions",null,new e.CommandKeyBinding("t"),true);var P=d.byId("keyAssist");d.connect(document,"onkeypress",d.hitch(this,function(O){if(O.charOrCode===d.keys.ESCAPE)P.style.display="none"}));z&&z.addHandler({isActive:function(){return P.style.display==="block"},cancel:function(){if(this.isActive()){P.style.display="none";return true}return false}});z=new e.Command({name:"Show Keys",tooltip:"Show a list of all the keybindings on this page",
id:"eclipse.keyAssist",callback:function(){d.empty(P);if(A){d.place("<h2>Editor</h2>",P,"last");for(var O=A.getTextView().getActions(false),W=0;W<O.length;W++)for(var aa=O[W],da=A.getTextView().getKeyBindings(aa),t=0;t<da.length;t++)d.place("<span>"+f.getUserKeyString(da[t])+" = "+aa+"<br></span>",P,"last")}d.place("<h2>Global</h2>",P,"last");y.showKeyBindings(P);P.style.display="block";return true}});y.addCommand(z,"global");y.registerCommandContribution("eclipse.keyAssist",1,"globalActions",null,
new e.CommandKeyBinding(191,false,true),true);if(A){A.getTextView().setKeyBinding(new e.CommandKeyBinding("L",true,true),"Show Keys");A.getTextView().setAction("Show Keys",z.callback)}if(z=d.byId("globalActions")){d.empty(z);y.renderCommands(z,"global",w||{},w,"image")}k(u);if(m)(u=d.byId("footer"))&&d.place(m,u,"only")}var r='<table style="border: 2px solid white; margin: 0; padding: 0; border-collapse: collapse; width: 100%;"><tr class="topRowBanner" id="bannerRow1"><td rowspan=3 style="padding-top: 12px; padding-bottom: 12px; padding-left: 8px; width: 148px"><a id="home" href="'+
c.toUrl("index.html")+'"><span class="imageSprite core-sprite-orion toolbarLabel" alt="Orion Logo" align="top"></a></td><td class="leftGlobalToolbar" style="padding-top: 16px"><span id="pageTitle" class="pageTitle"></span></td><td class="rightGlobalToolbar" style="padding-top: 16px"><span id="primaryNav" class="globalActions"></span><span id="globalActions" class="globalActions"></span><input type="search" id="search" class="searchbox"><span id="userInfo"></span><span id="help" class="help"><a id="help" href="'+
c.toUrl("help/index.jsp")+'">?</a></span></td></tr><tr class="topRowBanner" id="bannerRow2"><td colspan=2 style="text-wrap: normal"><span id="location" class="currentLocation" style="text-wrap: normal"></span></td></tr><tr class="topRowBanner" id="bannerRow3"><td colspan=2 style="height: 16px; text-align: left"><span id="statusPane" style="color: #5a5a5a;"></span><span id="notifications"></span></td></tr><tr class="pageToolbar"><td colspan=3 style="padding-left: 16px;" id="pageToolbar" class="pageToolbar"><span id="pageActions" class="pageActions"></span><span id="pageActionsRight" class="pageActions"></span></td></tr><tr class="optionalPageToolbar"><td colspan=3 style="border: 1px solid grey;padding-left: 16px;" id="optionalPageToolbar" class="optionalPageToolbar"><div id="optionalPageActions"  class="pageActions"></div></td></tr></table>',
m='<span class="imageSprite core-sprite-warning"></span> This is a Beta build of Orion.  You can use it, play with it and explore the capabilities but BEWARE your data may be lost. &nbsp;| <a href="http://wiki.eclipse.org/Orion/FAQ">FAQ</a> | <a href="https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Orion&version=0.3">Report a Bug</a> | <a href="http://www.eclipse.org/legal/privacy.php">Privacy Policy</a> | <a href="http://www.eclipse.org/legal/termsofuse.php">Terms of Use</a> | <a href="http://www.eclipse.org/legal/copyright.php">Copyright Agent</a>',
o=j(c.toUrl("auth/NotifyAuthentication.html")),p={},s=new orion.widgets.LoginDialog;return{generateUserInfo:k,generateDomCommandsInBanner:l,generateBanner:n,notifyAuthenticationSite:o,setPendingAuthentication:h}});
define("dojo/date",["dojo"],function(c){c.getObject("date",true,c);c.date.getDaysInMonth=function(d){var a=d.getMonth();if(a==1&&c.date.isLeapYear(d))return 29;return[31,28,31,30,31,30,31,31,30,31,30,31][a]};c.date.isLeapYear=function(d){d=d.getFullYear();return!(d%400)||!(d%4)&&!!(d%100)};c.date.getTimezoneName=function(d){var a=d.toString(),e="",f=a.indexOf("(");if(f>-1)e=a.substring(++f,a.indexOf(")"));else{f=/([A-Z\/]+) \d{4}$/;if(a=a.match(f))e=a[1];else{a=d.toLocaleString();f=/ ([A-Z\/]+)$/;
if(a=a.match(f))e=a[1]}}return e=="AM"||e=="PM"?"":e};c.date.compare=function(d,a,e){d=new Date(+d);a=new Date(+(a||new Date));if(e=="date"){d.setHours(0,0,0,0);a.setHours(0,0,0,0)}else if(e=="time"){d.setFullYear(0,0,0);a.setFullYear(0,0,0)}if(d>a)return 1;if(d<a)return-1;return 0};c.date.add=function(d,a,e){var f=new Date(+d),g=false,j="Date";switch(a){case "day":break;case "weekday":var i;if(a=e%5){a=a;i=parseInt(e/5)}else{a=e>0?5:-5;i=e>0?(e-5)/5:(e+5)/5}var k=d.getDay(),h=0;if(k==6&&e>0)h=1;
else if(k==0&&e<0)h=-1;k=k+a;if(k==0||k==6)h=e>0?2:-2;e=7*i+a+h;break;case "year":j="FullYear";g=true;break;case "week":e*=7;break;case "quarter":e*=3;case "month":g=true;j="Month";break;default:j="UTC"+a.charAt(0).toUpperCase()+a.substring(1)+"s"}j&&f["set"+j](f["get"+j]()+e);g&&f.getDate()<d.getDate()&&f.setDate(0);return f};c.date.difference=function(d,a,e){a=a||new Date;e=e||"day";var f=a.getFullYear()-d.getFullYear(),g=1;switch(e){case "quarter":d=d.getMonth();a=a.getMonth();d=Math.floor(d/3)+
1;a=Math.floor(a/3)+1;a+=f*4;g=a-d;break;case "weekday":f=Math.round(c.date.difference(d,a,"day"));e=parseInt(c.date.difference(d,a,"week"));g=f%7;if(g==0)f=e*5;else{var j=0,i=d.getDay();a=a.getDay();e=parseInt(f/7);g=f%7;d=new Date(d);d.setDate(d.getDate()+e*7);d=d.getDay();if(f>0)switch(true){case i==6:j=-1;break;case i==0:j=0;break;case a==6:j=-1;break;case a==0:j=-2;break;case d+g>5:j=-2}else if(f<0)switch(true){case i==6:j=0;break;case i==0:j=1;break;case a==6:j=2;break;case a==0:j=1;break;case d+
g<0:j=2}f+=j;f-=e*2}g=f;break;case "year":g=f;break;case "month":g=a.getMonth()-d.getMonth()+f*12;break;case "week":g=parseInt(c.date.difference(d,a,"day")/7);break;case "day":g/=24;case "hour":g/=60;case "minute":g/=60;case "second":g/=1E3;case "millisecond":g*=a.getTime()-d.getTime()}return Math.round(g)};return c.date});
define("dojo/cldr/supplemental",["dojo","dojo/i18n"],function(c){c.getObject("cldr.supplemental",true,c);c.cldr.supplemental.getFirstDayOfWeek=function(d){d={mv:5,ae:6,af:6,bh:6,dj:6,dz:6,eg:6,er:6,et:6,iq:6,ir:6,jo:6,ke:6,kw:6,ly:6,ma:6,om:6,qa:6,sa:6,sd:6,so:6,sy:6,tn:6,ye:6,ar:0,as:0,az:0,bw:0,ca:0,cn:0,fo:0,ge:0,gl:0,gu:0,hk:0,il:0,"in":0,jm:0,jp:0,kg:0,kr:0,la:0,mh:0,mn:0,mo:0,mp:0,mt:0,nz:0,ph:0,pk:0,sg:0,th:0,tt:0,tw:0,um:0,us:0,uz:0,vi:0,zw:0}[c.cldr.supplemental._region(d)];return d===undefined?
1:d};c.cldr.supplemental._region=function(d){d=c.i18n.normalizeLocale(d);d=d.split("-");var a=d[1];if(a){if(a.length==4)a=d[2]}else a={de:"de",en:"us",es:"es",fi:"fi",fr:"fr",he:"il",hu:"hu",it:"it",ja:"jp",ko:"kr",nl:"nl",pt:"br",sv:"se",zh:"cn"}[d[0]];return a};c.cldr.supplemental.getWeekend=function(d){var a=c.cldr.supplemental._region(d);d={"in":0,af:4,dz:4,ir:4,om:4,sa:4,ye:4,ae:5,bh:5,eg:5,il:5,iq:5,jo:5,kw:5,ly:5,ma:5,qa:5,sd:5,sy:5,tn:5}[a];a={af:5,dz:5,ir:5,om:5,sa:5,ye:5,ae:6,bh:5,eg:6,
il:6,iq:6,jo:6,kw:6,ly:6,ma:6,qa:6,sd:6,sy:6,tn:6}[a];if(d===undefined)d=6;if(a===undefined)a=0;return{start:d,end:a}};return c.cldr.supplemental});
define("dojo/regexp",["dojo"],function(c){c.getObject("regexp",true,c);c.regexp.escapeString=function(d,a){return d.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,function(e){if(a&&a.indexOf(e)!=-1)return e;return"\\"+e})};c.regexp.buildGroupRE=function(d,a,e){if(!(d instanceof Array))return a(d);for(var f=[],g=0;g<d.length;g++)f.push(a(d[g]));return c.regexp.group(f.join("|"),e)};c.regexp.group=function(d,a){return"("+(a?"?:":"")+d+")"};return c.regexp});
define("dojo/cldr/nls/gregorian",{root:{"months-format-narrow":["1","2","3","4","5","6","7","8","9","10","11","12"],"quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"Day of the Week","dateFormatItem-yQQQ":"y QQQ","dateFormatItem-yMEd":"EEE, y-M-d","dateFormatItem-MMMEd":"E MMM d",eraNarrow:["BCE","CE"],"dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateFormat-long":"y MMMM d","months-format-wide":["1","2","3","4","5","6","7","8","9","10","11","12"],"dateTimeFormat-medium":"{1} {0}",
"dateFormatItem-EEEd":"d EEE","dayPeriods-format-wide-pm":"PM","dateFormat-full":"EEEE, y MMMM dd","dateFormatItem-Md":"M-d","dayPeriods-format-abbr-am":"AM","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","field-era":"Era","dateFormatItem-yM":"y-M","months-standAlone-wide":["1","2","3","4","5","6","7","8","9","10","11","12"],"timeFormat-short":"HH:mm","quarters-format-wide":["Q1","Q2","Q3","Q4"],"timeFormat-long":"HH:mm:ss z","field-year":"Year","dateFormatItem-yMMM":"y MMM","dateFormatItem-yQ":"y Q",
"dateTimeFormats-appendItem-Era":"{0} {1}","field-hour":"Hour","months-format-abbr":["1","2","3","4","5","6","7","8","9","10","11","12"],"timeFormat-full":"HH:mm:ss zzzz","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","field-day-relative+0":"Today","field-day-relative+1":"Tomorrow","dateFormatItem-H":"HH","months-standAlone-abbr":["1","2","3","4","5","6","7","8","9","10","11","12"],"quarters-format-abbr":["Q1","Q2","Q3","Q4"],"quarters-standAlone-wide":["Q1","Q2","Q3","Q4"],"dateFormatItem-M":"L",
"days-standAlone-wide":["1","2","3","4","5","6","7"],"timeFormat-medium":"HH:mm:ss","dateFormatItem-Hm":"HH:mm","quarters-standAlone-abbr":["Q1","Q2","Q3","Q4"],eraAbbr:["BCE","CE"],"field-minute":"Minute","field-dayperiod":"Dayperiod","days-standAlone-abbr":["1","2","3","4","5","6","7"],"dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1","2","3","4"],"field-day-relative+-1":"Yesterday","dateFormatItem-h":"h a","dateTimeFormat-long":"{1} {0}","dayPeriods-format-narrow-am":"AM",
"dateFormatItem-MMMd":"MMM d","dateFormatItem-MEd":"E, M-d","dateTimeFormat-full":"{1} {0}","field-day":"Day","days-format-wide":["1","2","3","4","5","6","7"],"field-zone":"Zone","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dateFormatItem-y":"y","months-standAlone-narrow":["1","2","3","4","5","6","7","8","9","10","11","12"],"dateFormatItem-hm":"h:mm a","dateTimeFormats-appendItem-Year":"{0} {1}","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dayPeriods-format-abbr-pm":"PM","days-format-abbr":["1",
"2","3","4","5","6","7"],eraNames:["BCE","CE"],"days-format-narrow":["1","2","3","4","5","6","7"],"days-standAlone-narrow":["1","2","3","4","5","6","7"],"dateFormatItem-MMM":"LLL","field-month":"Month","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","dayPeriods-format-wide-am":"AM","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateFormat-short":"yyyy-MM-dd","field-second":"Second","dateFormatItem-yMMMEd":"EEE, y MMM d","dateTimeFormats-appendItem-Timezone":"{0} {1}",
"field-week":"Week","dateFormat-medium":"y MMM d","dayPeriods-format-narrow-pm":"PM","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"HH:mm:ss","dateFormatItem-hms":"h:mm:ss a"},ar:true,ca:true,cs:true,da:true,de:true,el:true,en:true,"en-au":true,"en-ca":true,"en-gb":true,es:true,fi:true,fr:true,"fr-ch":true,he:true,hu:true,it:true,ja:true,ko:true,nb:true,nl:true,pl:true,pt:true,"pt-pt":true,ro:true,ru:true,sk:true,sl:true,sv:true,th:true,tr:true,zh:true,"zh-hant":true,"zh-hk":true,"zh-tw":true});
define("dojo/cldr/nls/en/gregorian",{"dateFormatItem-yM":"M/y","field-dayperiod":"AM/PM","dateFormatItem-yQ":"Q y","dayPeriods-format-wide-pm":"PM","field-minute":"Minute",eraNames:["Before Christ","Anno Domini"],"dateFormatItem-MMMEd":"E, MMM d","dateTimeFormat-full":"{1} {0}","field-day-relative+-1":"Yesterday","field-weekday":"Day of the Week","dateFormatItem-hms":"h:mm:ss a","dateFormatItem-yQQQ":"QQQ y","days-standAlone-wide":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],
"dateFormatItem-MMM":"LLL","months-standAlone-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"dateTimeFormat-short":"{1} {0}","field-era":"Era","field-hour":"Hour","dayPeriods-format-wide-am":"AM","dateTimeFormat-medium":"{1} {0}","dateFormatItem-y":"y","timeFormat-full":"h:mm:ss a zzzz","months-standAlone-abbr":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"dateFormatItem-yMMM":"MMM y","field-day-relative+0":"Today","field-day-relative+1":"Tomorrow","days-standAlone-narrow":["S",
"M","T","W","T","F","S"],eraAbbr:["BC","AD"],"dateFormat-long":"MMMM d, y","timeFormat-medium":"h:mm:ss a","dateFormatItem-EEEd":"d EEE","field-zone":"Zone","dateFormatItem-Hm":"HH:mm","dateFormat-medium":"MMM d, y","dateFormatItem-Hms":"HH:mm:ss","quarters-standAlone-wide":["1st quarter","2nd quarter","3rd quarter","4th quarter"],"dateFormatItem-ms":"mm:ss","field-year":"Year","quarters-standAlone-narrow":["1","2","3","4"],"dateTimeFormat-long":"{1} {0}","field-week":"Week","months-standAlone-wide":["January",
"February","March","April","May","June","July","August","September","October","November","December"],"dateFormatItem-MMMd":"MMM d","timeFormat-long":"h:mm:ss a z","months-format-abbr":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"dayPeriods-format-wide-noon":"noon","timeFormat-short":"h:mm a","field-month":"Month","quarters-format-abbr":["Q1","Q2","Q3","Q4"],"days-format-abbr":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"dateFormatItem-M":"L","days-format-narrow":["S",
"M","T","W","T","F","S"],"field-second":"Second","field-day":"Day","dateFormatItem-MEd":"E, M/d","months-format-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"dateFormatItem-hm":"h:mm a","days-standAlone-abbr":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"dateFormat-short":"M/d/yy","dateFormatItem-yMMMEd":"EEE, MMM d, y","dateFormat-full":"EEEE, MMMM d, y","dateFormatItem-Md":"M/d","dateFormatItem-yMEd":"EEE, M/d/y","months-format-wide":["January","February","March","April","May","June",
"July","August","September","October","November","December"],"dateFormatItem-d":"d","quarters-format-wide":["1st quarter","2nd quarter","3rd quarter","4th quarter"],"days-format-wide":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],eraNarrow:["B","A"]});
define("dojo/date/locale",["dojo","dojo/date","dojo/cldr/supplemental","dojo/regexp","dojo/string","dojo/i18n","i18n!dojo/cldr/nls/gregorian"],function(c){c.getObject("date.locale",true,c);(function(){function d(f,g,j,i){return i.replace(/([a-z])\1*/ig,function(k){var h,l,n=k.charAt(0);k=k.length;var r=["abbr","wide","narrow"];switch(n){case "G":h=g[k<4?"eraAbbr":"eraNames"][f.getFullYear()<0?0:1];break;case "y":h=f.getFullYear();switch(k){case 1:break;case 2:if(!j.fullYear){h=String(h);h=h.substr(h.length-
2);break}default:l=true}break;case "Q":case "q":h=Math.ceil((f.getMonth()+1)/3);l=true;break;case "M":h=f.getMonth();if(k<3){h=h+1;l=true}else{n=["months-format",r[k-3]].join("-");h=g[n][h]}break;case "w":h=c.date.locale._getWeekOfYear(f,0);l=true;break;case "d":h=f.getDate();l=true;break;case "D":h=c.date.locale._getDayOfYear(f);l=true;break;case "E":h=f.getDay();if(k<3){h=h+1;l=true}else{n=["days-format",r[k-3]].join("-");h=g[n][h]}break;case "a":h=f.getHours()<12?"am":"pm";h=j[h]||g["dayPeriods-format-wide-"+
h];break;case "h":case "H":case "K":case "k":l=f.getHours();switch(n){case "h":h=l%12||12;break;case "H":h=l;break;case "K":h=l%12;break;case "k":h=l||24;break}l=true;break;case "m":h=f.getMinutes();l=true;break;case "s":h=f.getSeconds();l=true;break;case "S":h=Math.round(f.getMilliseconds()*Math.pow(10,k-3));l=true;break;case "v":case "z":if(h=c.date.locale._getZone(f,true,j))break;k=4;case "Z":h=c.date.locale._getZone(f,false,j);h=[h<=0?"+":"-",c.string.pad(Math.floor(Math.abs(h)/60),2),c.string.pad(Math.abs(h)%
60,2)];if(k==4){h.splice(0,0,"GMT");h.splice(3,0,":")}h=h.join("");break;default:throw new Error("dojo.date.locale.format: invalid pattern char: "+i);}if(l)h=c.string.pad(h,k);return h})}function a(f,g,j,i){var k=function(n){return n};g=g||k;j=j||k;i=i||k;var h=f.match(/(''|[^'])+/g),l=f.charAt(0)=="'";c.forEach(h,function(n,r){if(n){h[r]=(l?j:g)(n.replace(/''/g,"'"));l=!l}else h[r]=""});return i(h.join(""))}function e(f,g,j,i){i=c.regexp.escapeString(i);j.strict||(i=i.replace(" a"," ?a"));return i.replace(/([a-z])\1*/ig,
function(k){var h;h=k.charAt(0);var l=k.length,n="",r="";if(j.strict){if(l>1)n="0{"+(l-1)+"}";if(l>2)r="0{"+(l-2)+"}"}else{n="0?";r="0{0,2}"}switch(h){case "y":h="\\d{2,4}";break;case "M":h=l>2?"\\S+?":"1[0-2]|"+n+"[1-9]";break;case "D":h="[12][0-9][0-9]|3[0-5][0-9]|36[0-6]|"+r+"[1-9][0-9]|"+n+"[1-9]";break;case "d":h="3[01]|[12]\\d|"+n+"[1-9]";break;case "w":h="[1-4][0-9]|5[0-3]|"+n+"[1-9]";break;case "E":h="\\S+";break;case "h":h="1[0-2]|"+n+"[1-9]";break;case "k":h="1[01]|"+n+"\\d";break;case "H":h=
"1\\d|2[0-3]|"+n+"\\d";break;case "K":h="1\\d|2[0-4]|"+n+"[1-9]";break;case "m":case "s":h="[0-5]\\d";break;case "S":h="\\d{"+l+"}";break;case "a":l=j.am||g["dayPeriods-format-wide-am"];n=j.pm||g["dayPeriods-format-wide-pm"];h=l+"|"+n;if(!j.strict){if(l!=l.toLowerCase())h+="|"+l.toLowerCase();if(n!=n.toLowerCase())h+="|"+n.toLowerCase();if(h.indexOf(".")!=-1)h+="|"+h.replace(/\./g,"")}h=h.replace(/\./g,"\\.");break;default:h=".*"}f&&f.push(k);return"("+h+")"}).replace(/[\xa0 ]/g,"[\\s\\xa0]")}c.date.locale._getZone=
function(f,g){return g?c.date.getTimezoneName(f):f.getTimezoneOffset()};c.date.locale.format=function(f,g){g=g||{};var j=c.i18n.normalizeLocale(g.locale),i=g.formatLength||"short";j=c.date.locale._getGregorianBundle(j);var k=[];f=c.hitch(this,d,f,j,g);if(g.selector=="year")return a(j["dateFormatItem-yyyy"]||"yyyy",f);var h;if(g.selector!="date")(h=g.timePattern||j["timeFormat-"+i])&&k.push(a(h,f));if(g.selector!="time")(h=g.datePattern||j["dateFormat-"+i])&&k.push(a(h,f));return k.length==1?k[0]:
j["dateTimeFormat-"+i].replace(/\{(\d+)\}/g,function(l,n){return k[n]})};c.date.locale.regexp=function(f){return c.date.locale._parseInfo(f).regexp};c.date.locale._parseInfo=function(f){f=f||{};var g=c.i18n.normalizeLocale(f.locale);g=c.date.locale._getGregorianBundle(g);var j=f.formatLength||"short",i=f.datePattern||g["dateFormat-"+j],k=f.timePattern||g["timeFormat-"+j];j=f.selector=="date"?i:f.selector=="time"?k:g["dateTimeFormat-"+j].replace(/\{(\d+)\}/g,function(l,n){return[k,i][n]});var h=[];
return{regexp:a(j,c.hitch(this,e,h,g,f)),tokens:h,bundle:g}};c.date.locale.parse=function(f,g){var j=/[\u200E\u200F\u202A\u202E]/g,i=c.date.locale._parseInfo(g),k=i.tokens,h=i.bundle;f=(new RegExp("^"+i.regexp.replace(j,"")+"$",i.strict?"":"i")).exec(f&&f.replace(j,""));if(!f)return null;var l=["abbr","wide","narrow"],n=[1970,0,1,0,0,0,0],r="";f=c.every(f,function(o,p){if(!p)return true;p=k[p-1];var s=p.length;switch(p.charAt(0)){case "y":if(s!=2&&g.strict)n[0]=o;else if(o<100){o=Number(o);s=""+(new Date).getFullYear();
p=s.substring(0,2)*100;s=Math.min(Number(s.substring(2,4))+20,99);n[0]=o<s?p+o:p-100+o}else{if(g.strict)return false;n[0]=o}break;case "M":if(s>2){p=h["months-format-"+l[s-3]].concat();if(!g.strict){o=o.replace(".","").toLowerCase();p=c.map(p,function(u){return u.replace(".","").toLowerCase()})}o=c.indexOf(p,o);if(o==-1)return false}else o--;n[1]=o;break;case "E":case "e":p=h["days-format-"+l[s-3]].concat();if(!g.strict){o=o.toLowerCase();p=c.map(p,function(u){return u.toLowerCase()})}o=c.indexOf(p,
o);if(o==-1)return false;break;case "D":n[1]=0;case "d":n[2]=o;break;case "a":p=g.am||h["dayPeriods-format-wide-am"];s=g.pm||h["dayPeriods-format-wide-pm"];if(!g.strict){var q=/\./g;o=o.replace(q,"").toLowerCase();p=p.replace(q,"").toLowerCase();s=s.replace(q,"").toLowerCase()}if(g.strict&&o!=p&&o!=s)return false;r=o==s?"p":o==p?"a":"";break;case "K":if(o==24)o=0;case "h":case "H":case "k":if(o>23)return false;n[3]=o;break;case "m":n[4]=o;break;case "s":n[5]=o;break;case "S":n[6]=o}return true});
j=+n[3];if(r==="p"&&j<12)n[3]=j+12;else if(r==="a"&&j==12)n[3]=0;j=new Date(n[0],n[1],n[2],n[3],n[4],n[5],n[6]);g.strict&&j.setFullYear(n[0]);var m=k.join("");i=m.indexOf("d")!=-1;m=m.indexOf("M")!=-1;if(!f||m&&j.getMonth()>n[1]||i&&j.getDate()>n[2])return null;if(m&&j.getMonth()<n[1]||i&&j.getDate()<n[2])j=c.date.add(j,"hour",1);return j}})();(function(){var d=[];c.date.locale.addCustomFormats=function(a,e){d.push({pkg:a,name:e})};c.date.locale._getGregorianBundle=function(a){var e={};c.forEach(d,
function(f){f=c.i18n.getLocalization(f.pkg,f.name,a);e=c.mixin(e,f)},this);return e}})();c.date.locale.addCustomFormats("dojo.cldr","gregorian");c.date.locale.getNames=function(d,a,e,f){var g;f=c.date.locale._getGregorianBundle(f);d=[d,e,a];if(e=="standAlone"){e=d.join("-");g=f[e];if(g[0]==1)g=undefined}d[1]="format";return(g||f[d.join("-")]).concat()};c.date.locale.isWeekend=function(d,a){a=c.cldr.supplemental.getWeekend(a);d=(d||new Date).getDay();if(a.end<a.start){a.end+=7;if(d<a.start)d+=7}return d>=
a.start&&d<=a.end};c.date.locale._getDayOfYear=function(d){return c.date.difference(new Date(d.getFullYear(),0,1,d.getHours()),d)+1};c.date.locale._getWeekOfYear=function(d,a){if(arguments.length==1)a=0;var e=(new Date(d.getFullYear(),0,1)).getDay(),f=(e-a+7)%7;f=Math.floor((c.date.locale._getDayOfYear(d)+f-1)/7);e==a&&f++;return f};return c.date.locale});
define("orion/auth",["dojo","dijit","orion/globalCommands","dojo/date/locale","orion/widgets/LoginDialog"],function(c,d,a){function e(j,i){if(j.status===403){if(typeof f==="undefined")f=new d.Dialog({title:"Forbidden access"});var k=j.message;if(j.responseText)k=JSON.parse(j.responseText).Message||j.message;f.set("content",k);f.show()}if(j.status===401)try{var h=JSON.parse(j.responseText),l=localStorage.getItem(h.SignInKey),n=function(){var m=localStorage.getItem(h.SignInKey);if(l!==m){window.removeEventListener("storage",
n,false);delete g[h.SignInKey];a.setPendingAuthentication(g);i&&i()}};window.addEventListener("storage",n,false);if(h.SignInKey){g[h.SignInKey]=h;a.setPendingAuthentication(g)}}catch(r){}}var f,g={};c.addOnLoad(function(){window.dojo=c;window.eclipse=window.eclipse||{};eclipse.globalCommandUtils=a});return{handleAuthenticationError:e}});
define("dojo/DeferredList",["dojo"],function(c){c.DeferredList=function(d,a,e,f){var g=[];c.Deferred.call(this);var j=this;d.length===0&&!a&&this.resolve([0,[]]);var i=0;c.forEach(d,function(k,h){function l(n,r){g[h]=[n,r];i++;i===d.length&&j.resolve(g)}k.then(function(n){a?j.resolve([h,n]):l(true,n)},function(n){e?j.reject(n):l(false,n);if(f)return null;throw n;})})};c.DeferredList.prototype=new c.Deferred;c.DeferredList.prototype.gatherResults=function(d){d=new c.DeferredList(d,false,true,false);
d.addCallback(function(a){var e=[];c.forEach(a,function(f){e.push(f[1])});return e});return d};return c.DeferredList});
define("orion/preferences",["require","dojo","orion/auth","dojo/DeferredList"],function(c,d,a){function e(h,l){this._name=h;this._providers=l;this._flushPending=false;this._cached=null;this._stores=[];this._dirty=[]}function f(h,l){return{get:function(n,r){if(l===0)return null;n=localStorage.getItem(h+n);if(n===null)return null;n=JSON.parse(n);if(r||l===-1||n._expires&&n._expires>(new Date).getTime()){delete n._expires;return n}return null},set:function(n,r){if(l!==0){if(l!==-1)r._expires=(new Date).getTime()+
1E3*l;if(Object.keys(r).length===0)localStorage.removeItem(h+n);else{var m=JSON.stringify(r);localStorage.setItem(h+n,m);delete r._expires}}},remove:function(n){localStorage.removeItem(h+n)}}}function g(h){this._currentPromises={};this._cache=new f("/orion/preferences/user",0);this._service=null;this.available=function(){var l=this;if(!this._service){var n=h.getServiceReferences("orion.core.preference.provider");n.length>0&&h.getService(n[0],0).then(function(r){l._service=r})}return!!this._service}}
function j(h){this._location=h;this._currentPromise=null;this._cache=new f("/orion/preferences/default",3600)}function i(){this._cache=new f("/orion/preferences/local",-1)}function k(h,l){this._userProvider=new g(h);this._localProvider=new i;l=l||"defaults.pref";if(l.indexOf("://")===-1)l=c.toUrl(l);this._defaultsProvider=new j(l);this._serviceRegistration=h.registerService("orion.core.preference",this)}e.prototype={_flush:function(){for(var h=[],l=0;l<this._stores.length;++l){var n=this._stores[l];
this._dirty.indexOf(n)!==-1&&h.push(this._providers[l].put(this._name,n))}this._dirty=[];return new d.DeferredList(h)},_scheduleFlush:function(h){this._dirty.indexOf(h)===-1&&this._dirty.push(h);if(!this._flushPending){this._flushPending=true;window.setTimeout(d.hitch(this,function(){if(this._flushPending){this._flushPending=false;this._flush()}}),0)}},_getCached:function(){if(!this._cached){this._cached={};for(var h=0;h<this._stores.length;++h){var l=this._stores[h];for(var n in l)if(l.hasOwnProperty(n)&&
typeof this._cached[n]==="undefined")this._cached[n]=l[n]}}return this._cached},keys:function(){return Object.keys(this._getCached())},get:function(h){return this._getCached()[h]},put:function(h,l){if(this._stores.length!==0){var n=this._stores[0];if(n[h]!==l){n[h]=l;this._cached=null;this._scheduleFlush(n)}}},remove:function(h){for(var l=0;l<this._stores.length;++l){var n=this._stores[l];if(n.hasOwnProperty(h)){delete n[h];this._cached=null;this._scheduleFlush(n);return true}}return false},clear:function(){for(var h=
0;h<this._stores.length;++h){this._stores[h]={};this._scheduleFlush(this._stores[h])}this._cached=null},sync:function(h){if(this._flushPending){this._flushPending=false;return this._flush()}for(var l=this,n=[],r=0;r<this._providers.length;++r)n.push(this._providers[r].get(this._name,h).then(function(m){return function(o){l._stores[m]=o}}(r)));return(new d.DeferredList(n)).then(function(){l._cached=null;l._getCached()})},flush:function(){this._flush()}};g.prototype={get:function(h,l){if(this._currentPromises[h])return this._currentPromises[h];
var n=new d.Deferred,r=null;if(l)this._cache.remove(h);else r=this._cache.get(h);if(r!==null)n.resolve(r);else{this._currentPromises[h]=n;var m=this;this._service.get(h).then(function(o){m._cache.set(h,o);delete m._currentPromises[h];n.resolve(o)},function(o){if(o.status===401){delete m._currentPromises[h];n.resolve({});a.handleAuthenticationError(o,function(){m.get(h)})}else if(o.status===404){o={};m._cache.set(h,o);delete m._currentPromises[h];n.resolve(o)}else{delete m._currentPromises[h];n.resolve(m._cache.get(h,
true)||{})}})}return n},put:function(h,l){var n=new d.Deferred;this._cache.set(h,l);var r=this;this._service.put(h,l).then(function(){n.resolve()},function(m){m.status===401?a.handleAuthenticationError(m,function(){r._service.put(h,l).then(function(){n.resolve()},function(){n.resolve()})}):n.resolve()});return n}};j.prototype={get:function(h,l){if(this._currentPromise)return this._currentPromise;var n=new d.Deferred,r=null;if(l)this._cache.remove(h);else r=this._cache.get(h);if(r!==null)n.resolve(r);
else{this._currentPromise=n;var m=this;d.xhrGet({url:this._location,headers:{"Orion-Version":"1"},handleAs:"json",timeout:15E3,load:function(o){m._cache.set(h,o[h]||{});m._currentPromise=null;n.resolve(o[h]||{})},error:function(o,p){if(p.xhr.status===401){m._currentPromise=null;n.resolve({});n=new d.Deferred;m._currentPromise=n;var s=this;a.handleAuthenticationError(p.xhr,function(){d.xhrGet(s)})}else if(p.xhr.status===404){m._cache.set(h,{});m._currentPromise=null;n.resolve({})}else{m._currentPromise=
null;o=m._cache.get(h,true);o!==null?n.resolve(o[h]||{}):n.resolve({})}}})}return n},put:function(){var h=new d.Deferred;h.resolve();return h}};i.prototype={get:function(h){var l=new d.Deferred;h=this._cache.get(h);h!==null?l.resolve(h):l.resolve({});return l},put:function(h,l){var n=new d.Deferred;this._cache.set(h,l);n.resolve();return n}};k.DEFAULT_SCOPE=1;k.LOCAL_SCOPE=2;k.USER_SCOPE=4;k.prototype={getPreferences:function(h,l){if(!l||typeof l!=="number"||l>7||l<1)l=k.DEFAULT_SCOPE|k.LOCAL_SCOPE|
k.USER_SCOPE;var n=[];k.USER_SCOPE&l&&this._userProvider.available()&&n.push(this._userProvider);k.LOCAL_SCOPE&l&&n.push(this._localProvider);k.DEFAULT_SCOPE&l&&n.push(this._defaultsProvider);var r=new e(h,n);return r.sync().then(function(){return r})}};return{PreferencesService:k}});
define("orion/pluginregistry",["dojo","orion/serviceregistry","dojo/DeferredList"],function(c,d){var a=a||{};a.Plugin=function(e,f,g){function j(q,u,y,C){if(!n)throw new Error("plugin not connected");var v=o++;p[String(v)]=C;g.postMessage({id:v,serviceId:q,method:u,params:y},n)}function i(q){var u={};if(q.methods)for(var y=0;y<q.methods.length;y++){var C=q.methods[y];u[C]=function(v){return function(){var w=Array.prototype.slice.call(arguments),A=new c.Deferred;l._load().then(function(){j(q.serviceId,
v,w,A)});return A.promise}}(C)}return u}function k(){var q=f.services;if(q)for(var u=0;u<q.length;u++){var y=q[u],C=i(y);s[y.serviceId]=g.registerService(y.type,C,y.properties)}}function h(q){try{if(q.method)if("plugin"===q.method){if(f){if(JSON.stringify(f)!==JSON.stringify(q.params[0])){for(var u in s)if(s.hasOwnProperty(u)){s[u].unregister();delete s[u]}f=q.params[0];k();g.updatePlugin(l)}}else{f=q.params[0];k()}if(!m){m=true;r.resolve(l)}}else if("dispatchEvent"===q.method){var y=s[q.serviceId];
y.dispatchEvent.apply(y,q.params)}else if("progress"===q.method){var C=p[String(q.requestId)];C.progress.apply(C,q.params)}else throw new Error("Bad response method: "+q.method);else{C=p[String(q.id)];delete p[String(q.id)];q.error?C.reject(q.error):C.resolve(q.result)}}catch(v){console.log(v)}}var l=this,n=null,r=new c.Deferred,m=false,o=0,p={},s={};this.getLocation=function(){return e};this.getData=function(){return f};this.uninstall=function(){for(var q in s)if(s.hasOwnProperty(q)){s[q].unregister();
delete s[q]}if(n){g.disconnect(n);n=null}g.uninstallPlugin(this)};this.getServiceReferences=function(){var q=[],u;for(u in s)s.hasOwnProperty(u)&&q.push(s[u].getServiceReference());return q};this._load=function(q){if(!n){n=g.connect(e,h);window.setTimeout(function(){if(!m){if(!q){f={};g.updatePlugin(l)}r.reject(new Error("Load timeout for plugin: "+e))}},15E3)}return r.promise};if(typeof e!=="string")throw new Error("invalid url:"+e);f&&k()};a.PluginRegistry=function(e,f){function g(o){if(o.indexOf("://")===
-1){var p=document.createElement("a");p.href=o;return p.href}return o}function j(o){delete h["plugin."+o.getLocation()]}function i(o){o=g(o);for(var p=0,s=l.length;p<s;p++){var q=l[p];if(o===q.getLocation())return q}return null}function k(o){h["plugin."+o.getLocation()]=JSON.stringify(o.getData())}var h=f||localStorage||{},l=[],n=[],r=new d.EventTarget;window.addEventListener("message",function(o){for(var p=0,s=o.source;p<n.length;p++)if(s===n[p].target){if(typeof n[p].useStructuredClone==="undefined")n[p].useStructuredClone=
typeof o.data!=="string";n[p].handler(n[p].useStructuredClone?o.data:JSON.parse(o.data));break}},false);var m={registerService:c.hitch(e,e.registerService),connect:function(o,p){var s=document.createElement("iframe");s.id=o;s.name=o;s.style.display="none";s.style.visibility="hidden";s.src=o;document.body.appendChild(s);o={iframe:s,target:s.contentWindow,handler:p,url:o};n.push(o);return o},disconnect:function(o){for(var p=0;p<n.length;p++)if(o===n[p]){n.splice(p,1);try{document.body.removeChild(o.iframe)}catch(s){}break}},
uninstallPlugin:function(o){j(o);for(var p=0;p<l.length;p++)if(o===l[p]){l.splice(p,1);r.dispatchEvent("pluginRemoved",o);break}},updatePlugin:function(o){h["plugin."+o.getLocation()]=JSON.stringify(o.getData());r.dispatchEvent("pluginUpdated",o)},postMessage:function(o,p){p.target.postMessage(p.useStructuredClone?o:JSON.stringify(o),p.url)}};this.startup=function(o){for(var p=[],s=0;s<o.length;++s){var q=o[s];q=g(q);var u="plugin."+q;if(h[u]){if(i(q)===null){u=JSON.parse(h[u]);q=new a.Plugin(q,u,
m);l.push(q)}}else{h[u]="{}";q=new a.Plugin(q,{},m);l.push(q);p.push(q._load(false))}}return new c.DeferredList(p)};this.shutdown=function(){for(var o=0;o<n.length;o++)try{document.body.removeChild(n[o].iframe)}catch(p){}};this.installPlugin=function(o,p){o=g(o);var s=new c.Deferred,q=i(o);if(q)if(q.getData())s.resolve(q);else{var u=function(y){if(y.getLocation()===o){s.resolve(y);r.removeEventListener("pluginAdded",u)}};r.addEventListener("pluginAdded",u)}else{q=new a.Plugin(o,p,m);l.push(q);if(q.getData()){k(q);
r.dispatchEvent("pluginAdded",q);s.resolve(q)}else q._load(true).then(function(){k(q);r.dispatchEvent("pluginAdded",q);s.resolve(q)},function(y){s.reject(y)})}return s.promise};this.getPlugins=function(){for(var o=[],p=0;p<l.length;p++)l[p].getData()&&o.push(l[p]);return o};this.getPlugin=function(o){if((o=i(o))&&o.getData())return o;return null};this.addEventListener=function(o,p){r.addEventListener(o,p)};this.removeEventListener=function(o,p){r.removeEventListener(o,p)}};return a});
define("orion/bootstrap",["require","dojo","orion/serviceregistry","orion/preferences","orion/pluginregistry"],function(c,d,a,e,f){function g(){var j=new a.ServiceRegistry,i=new e.PreferencesService(j),k=new f.PluginRegistry(j);return i.getPreferences("/plugins").then(function(h){h=h.keys();for(var l=0;l<h.length;++l)if(h[l].indexOf("://")===-1)h[l]=c.toUrl(h[l]);return k.startup(h)}).then(function(){if(j.getServiceReferences("orion.core.preference.provider").length>0)return i.getPreferences("/plugins",
i.USER_SCOPE).then(function(h){h=h.keys();for(var l=0;l<h.length;++l)if(h[l].indexOf("://")===-1)h[l]=c.toUrl(h[l]);return k.startup(h)})}).then(function(){d.addOnWindowUnload(function(){k.shutdown()})}).then(function(){return{serviceRegistry:j,preferences:i,pluginRegistry:k}})}return{startup:g}});
define("orion/status",["require","dojo"],function(c,d){function a(e,f,g){this._serviceRegistry=e;this._serviceRegistration=e.registerService("orion.page.message",this);this.domId=f;this.progressDomId=g||f}a.prototype={setMessage:function(e,f){d.place(window.document.createTextNode(e),this.domId,"only");if(typeof f==="number"){var g=this;window.setTimeout(function(){var j=d.byId(g.domId);(typeof j.textContent==="string"?j.textContent:j.innerText)===e&&d.place(window.document.createTextNode(""),g.domId,
"only")},f)}},setErrorMessage:function(e){var f=e.responseText||e.message||e;try{f=JSON.parse(f)}catch(g){}e=f.Message||f;var j="red";if(f.Severity)switch(f.Severity){case "Warning":j="#FFCC00";break;case "Error":j="red";break;case "Info":case "Ok":j="green";break}f=d.create("span",{style:{color:j}});d.place(window.document.createTextNode(e),f);d.place(f,this.domId,"only")},setProgressMessage:function(e){d.place(window.document.createTextNode(e),this.progressDomId,"only")},setProgressResult:function(e){e=
e.responseText||e;try{e=JSON.parse(e)}catch(f){}var g=e.Message||e,j=c.toUrl("images/info.gif"),i="info";if(e.Severity)switch(e.Severity){case "Warning":j=c.toUrl("images/warning.gif");i="warning";break;case "Error":j=c.toUrl("images/error.gif");i="error";break}var k=new Image;k.alt=i;k.title="Press to clear message";k.name=i;k.src=j;d.style(k,"opacity","0.7");d.connect(k,"onmouseover",this,function(){d.style(k,"opacity","1")});d.connect(k,"onmouseout",this,function(){d.style(k,"opacity","0.7")});
d.connect(k,"onclick",this,function(){this.setProgressMessage("")});d.place(k,this.progressDomId,"only");e.HTML?d.place(g,this.progressDomId,"last"):d.place(window.document.createTextNode("   "+g),this.progressDomId,"last")},showWhile:function(e,f){var g=this;g.setProgressMessage(f);return e.then(function(j){if(j&&j.Location&&j.Message&&j.Running)return g._doProgressWhile(j);g.setProgressMessage("");j&&j.Result&&g.setProgressResult(j.Result);return j})},_doProgressWhile:function(e){var f=new d.Deferred;
window.setTimeout(function(){d.xhrGet({url:e.Location,headers:{"Orion-Version":"1"},handleAs:"json",timeout:15E3,load:function(g){f.callback(g)}})},2E3);return this.showWhile(f,e.Message)}};a.prototype.constructor=a;return{StatusReportingService:a}});
define("orion/dialogs",[],function(){function c(d){this._serviceRegistry=d;this._serviceRegistration=d.registerService("orion.page.dialog",this)}c.prototype={confirm:function(d,a){a(window.confirm(d))},openFiles:function(){}};c.prototype.constructor=c;return{DialogService:c}});
define("orion/selection",["dojo"],function(c){function d(a){this._serviceRegistry=a;this._serviceRegistration=a.registerService("orion.page.selection",this);this._selections=[]}d.prototype={getSelection:function(a){a(this._getSingleSelection())},getSelections:function(a){a(this._selections)},_getSingleSelection:function(){if(this._selections&&this._selections.length>0)return this._selections[0];return null},setSelections:function(a){this._selections=c.isArray(a)?a:a?[a]:null;this._serviceRegistration.dispatchEvent("selectionChanged",
this._getSingleSelection(),this._selections)}};d.prototype.constructor=d;return{Selection:d}});
define("orion/fileClient",["dojo","orion/auth","dojo/DeferredList"],function(c,d){function a(g,j,i){var k=new c.Deferred;g[j].apply(g,i).then(function(h){k.callback(h)},function(h){h.status===401?d.handleAuthenticationError(h,function(){g[j].apply(g,i).then(function(l){k.callback(l)},function(l){k.errback(l)})}):k.errback(h)});return k}function e(g,j,i,k){if(!g.readBlob)throw"source file service does not support binary read";if(!i.writeBlob)throw"target file service does not support binary write";
if(j[j.length-1]!=="/")return a(g,"readBlob",[j]).then(function(n){return a(i,"writeBlob",[k,n])});var h=k.substring(0,k.length-1),l=decodeURIComponent(h.substring(h.lastIndexOf("/")+1));h=h.substring(0,h.lastIndexOf("/")+1);return a(i,"createFolder",[h,l]).then(function(){},function(){}).then(function(){if(j.indexOf("/")===0)j+="?depth=1";return a(g,"fetchChildren",[j]).then(function(n){for(var r=[],m=0;m<n.length;++m){var o=n[m].Location,p=o;if(n[m].Directory)p=o.substring(0,o.length-1);p=decodeURIComponent(p.substring(p.lastIndexOf("/")+
1));p=k+encodeURIComponent(p);if(n[m].Directory)p+="/";r[m]=e(g,o,i,p)}return new c.DeferredList(r)})})}function f(g,j){function i(s){var q=new c.Deferred;q.reject("No Matching FileService for location:"+s);return q}var k=g.getServiceReferences("orion.core.file"),h=k;if(j){h=[];for(var l=0;l<k.length;++l)j(k[l])&&h.push(k[l])}for(var n=[],r=[],m=[],o={fetchChildren:function(){var s=new c.Deferred;s.resolve(m);return s},createWorkspace:function(){var s=new c.Deferred;s.reject("no file service");return s},
loadWorkspaces:function(){var s=new c.Deferred;s.reject("no file service");return s},loadWorkspace:function(){var s=new c.Deferred;s.resolve({Directory:true,Length:0,LocalTimeStamp:0,Name:"",Location:"",Children:m});return s},createProject:i,createFolder:i,createFile:i,deleteFile:i,moveFile:i,copyFile:i,read:i,write:i},p=0;p<h.length;++p){m[p]={Directory:true,Length:0,LocalTimeStamp:0,Location:h[p].getProperty("top"),ChildrenLocation:h[p].getProperty("top"),Name:h[p].getProperty("Name")};j=h[p].getProperty("pattern")||
".*";if(j[0]!=="^")j="^"+j;n[p]=new RegExp(j);g.getService(h[p],0).then(function(s){r[p]=s})}if(r.length===1)o=r[0];this._getService=function(s){if(!s)return o;for(var q=0;q<n.length;++q)if(n[q].test(s))return r[q];throw"No Matching FileService for location:"+s;}}f.prototype={fetchChildren:function(g){return a(this._getService(g),"fetchChildren",arguments)},createWorkspace:function(){return a(this._getService(),"createWorkspace",arguments)},loadWorkspaces:function(){return a(this._getService(),"loadWorkspaces",
arguments)},loadWorkspace:function(g){return a(this._getService(g),"loadWorkspace",arguments)},createProject:function(g){return a(this._getService(g),"createProject",arguments)},createFolder:function(g){return a(this._getService(g),"createFolder",arguments)},createFile:function(g){return a(this._getService(g),"createFile",arguments)},deleteFile:function(g){return a(this._getService(g),"deleteFile",arguments)},moveFile:function(g,j,i){var k=this._getService(g),h=this._getService(j);if(k===h)return a(k,
"moveFile",arguments);var l=g[g.length-1]==="/",n=j;if(n[n.length-1]!=="/")n+="/";if(i)n+=encodeURIComponent(i);else{var r=g;if(l)r=r.substring(0,r.length-1);n+=r.substring(r.lastIndexOf("/")+1)}if(l&&n[n.length-1]!=="/")n+="/";return e(k,g,h,n).then(function(){return a(k,"deleteFile",[g])})},copyFile:function(g,j){var i=this._getService(g),k=this._getService(j);if(i===k)return a(i,"copyFile",arguments);var h=g[g.length-1]==="/",l=j;if(l[l.length-1]!=="/")l+="/";var n=g;if(h)n=n.substring(0,n.length-
1);l+=n.substring(n.lastIndexOf("/")+1);if(h&&l[l.length-1]!=="/")l+="/";return e(i,g,k,l)},read:function(g){return a(this._getService(g),"read",arguments)},write:function(g){return a(this._getService(g),"write",arguments)},remoteImport:function(g){return a(this._getService(g),"remoteImport",arguments)},remoteExport:function(g){return a(this._getService(g),"remoteExport",arguments)}};f.prototype.constructor=f;return{FileClient:f}});
define("orion/treetable",["dojo"],function(c){function d(a){this._init(a)}d.prototype={_init:function(a){var e=a.parent,f=this;if(typeof e==="string")e=c.byId(e);if(!e)throw"no parent";if(!a.model)throw"no tree model";if(!a.renderer)throw"no renderer";this._parent=e;this._treeModel=a.model;this._renderer=a.renderer;this._showRoot=a.showRoot===undefined?false:a.showRoot;this._indent=a.indent===undefined?16:a.indent;this._labelColumnIndex=a.labelColumnIndex===undefined?0:a.labelColumnIndex;this._id=
a.id===undefined?"treetable":a.id;this._root=this._treeModel.getRoot(function(g){if(this._showRoot){g._depth=0;this._generate([g],0)}else f._treeModel.getChildren(g,function(j){f._generate(j,0)})})},_generate:function(a,e){c.empty(this._parent);var f=document.createElement("table");f.id=this._id;this._renderer.initTable(f,this);var g=document.createElement("tbody");g.id=this._id+"tbody";this._generateChildren(a,e,g,"last");f.appendChild(g);this._parent.appendChild(f);this._rowsChanged()},_generateChildren:function(a,
e,f,g){for(var j in a){var i=document.createElement("tr");i.id=this._treeModel.getId(a[j]);i._depth=e;i._item=a[j];this._renderer.render(a[j],i);c.style(i.childNodes[this._labelColumnIndex],"paddingLeft",this._indent*e+"px");c.place(i,f,g);if(g==="after")f=i}},_rowsChanged:function(){this._renderer.rowsChanged&&this._renderer.rowsChanged()},getSelected:function(){return this._renderer.getSelected()},refresh:function(a,e,f,g,j,i){var k=this._treeModel.getId(a),h;if(k===this._id){this._removeChildRows(k);
this._generateChildren(e,0,c.byId(k+"tbody"),"last");this._rowsChanged()}else{var l=c.byId(k);if(l){l._item=a;if(l&&(f||l._expanded)){l._expanded=true;this._removeChildRows(k);if(e){this._generateChildren(e,l._depth+1,l,"after");this._rowsChanged();if(g&&j){a=c.byId(g);c.addClass(a,j);i&&c.removeClass(a,i)}}else{h=this;e=this._treeModel.getChildren(l._item,function(n){h._generateChildren(n,l._depth+1,l,"after");h._rowsChanged()})}}}else console.log("could not find table row "+k)}},refreshAndExpand:function(a,
e,f,g,j){this.refresh(a,e,true,f,g,j)},getItem:function(a){if(typeof a==="string"){var e=c.byId(a);if(e)return e._item}if(a._item)return a._item;return a},toggle:function(a,e,f,g){var j=c.byId(a);if(j)if(j._expanded){this.collapse(a);if(e){a=c.byId(e);c.addClass(a,g);c.removeClass(a,f)}}else{this.expand(a);if(e){a=c.byId(e);c.addClass(a,f);c.removeClass(a,g)}}},isExpanded:function(a){if(a=c.byId(a))return a._expanded;return false},expand:function(a,e,f){a=typeof a==="string"?a:this._treeModel.getId(a);
var g=c.byId(a);if(g)if(!g._expanded){g._expanded=true;var j=this;this._treeModel.getChildren(g._item,function(i){j._generateChildren(i,g._depth+1,g,"after");j._rowsChanged();e&&e.apply(this,f)})}},_removeChildRows:function(a){c.byId(this._id);var e=a===this._id,f=false,g=-1,j=[];c.query(".treeTableRow").forEach(function(h){if(!f)if(e)if(h._depth>g)j.push(h);else f=true;else if(h.id===a){e=true;g=h._depth}});for(var i in j){var k=j[i];k.parentNode.removeChild(k)}},collapse:function(a){a=typeof a===
"string"?a:this._treeModel.getId(a);var e=c.byId(a);if(e)if(e._expanded){e._expanded=false;this._removeChildRows(a);this._rowsChanged()}}};d.prototype.constructor=d;return{TableTree:d}});
define("orion/explorer",["require","dojo","orion/treetable"],function(c,d,a){var e={};e.Explorer=function(){function f(g,j,i){this.registry=g;this.renderer=i;this.selection=j;this.myTree=null}f.prototype={changedItem:function(g,j){d.hitch(this.myTree,this.myTree.refreshAndExpand)(g,j)},updateCommands:function(g){this.myTree&&d.hitch(this.myTree._renderer,this.myTree._renderer.updateCommands(g))},makeNewItemPlaceHolder:function(g,j,i){g=this.getRow(g);if(i){g=g.childNodes[i];d.place("<br><span id='"+
j+"placeHolderRow'></span>",g,"last");if(i=d.byId(j+"placeHolderRow"))return{tempNode:i,refNode:i}}if(g){d.place("<tr id='"+j+"placeHolderRow'><td id='"+j+"placeHolderCol'></td>",g,"after");i=d.byId(j+"placeHolderRow");g=d.byId(j+"placeHolderCol");if(i&&g)return{tempNode:i,refNode:g}}return null},getRow:function(g){if(g=this.model.getId(g))return d.byId(g)},createTree:function(g,j){var i=g+"innerTree",k=d.byId(i);k&&d.destroy(k);if(j)j.rootId=i;this.model=j;this.myTree=new a.TableTree({id:i,model:j,
showRoot:false,parent:g,labelColumnIndex:this.checkbox?1:0,renderer:this.renderer});this.renderer._initializeUIState()},getRootPath:function(){if(this.model&&this.model.root)return this.model.root.Location;return null},_lastHash:null,checkbox:this.checkbox||true};return f}();e.ExplorerModel=function(){function f(g,j){this.rootPath=g;this.fetchItems=j}f.prototype={destroy:function(){},getRoot:function(g){this.fetchItems(this.rootPath).then(d.hitch(this,function(j){this.root=j;g(j)}))},getChildren:function(g,
j){if(g.Children)j(g.Children);else g.ChildrenLocation?this.fetchItems(g.ChildrenLocation).then(d.hitch(this,function(i){g.Children=i;j(i)})):j([])},getId:function(g){if(g===this.root)g=this.rootId;else{g=g.Location;g=g.replace(/[^\.\:\-\_0-9A-Za-z]/g,"")}return g}};return f}();e.ExplorerFlatModel=function(){function f(g,j,i){this.rootPath=g;this.fetchItems=j;this.root=i}f.prototype=new e.ExplorerModel;f.prototype.getRoot=function(g){this.root?g(this.root):this.fetchItems(this.rootPath).then(d.hitch(this,
function(j){this.root=j;g(j)}))};f.prototype.getChildren=function(g,j){g===this.root?j(this.root):j([])};return f}();e.ExplorerRenderer=function(){function f(g,j){this.explorer=j;this._init(g);this._expandImageClass="core-sprite-twistie_open";this._collapseImageClass="core-sprite-twistie_closed"}f.prototype={initTable:function(g,j){this.tableTree=j;d.empty(g);d.addClass(g,"treetable");this.renderTableHeader(g)},getActionsColumn:function(g,j){d.connect(j,"onmouseover",j,function(){var h=d.byId(this.id+
"actionswrapper");d.style(h,"visibility","visible")});d.connect(j,"onmouseout",j,function(){var h=d.byId(this.id+"actionswrapper");d.style(h,"visibility","hidden")});var i=document.createElement("td");i.id=j.id+"actions";var k=document.createElement("span");k.id=j.id+"actionswrapper";i.appendChild(k);d.style(k,"visibility","hidden");this.explorer.registry.getService("orion.page.command").then(function(h){h.renderCommands(k,"object",g,this.explorer,"image")});return i},initCheckboxColumn:function(){if(this._useCheckboxSelection)return document.createElement("th")},
getCheckboxColumn:function(g,j){if(this._useCheckboxSelection){g=document.createElement("td");d.addClass(g,"secondaryColumn");var i=document.createElement("input");d.style(i,"verticalAlign","middle");i.type="checkbox";i.id=j.id+"selectedState";d.addClass(i,"selectionCheckmark");i.itemId=j.id;g.appendChild(i);d.connect(i,"onclick",d.hitch(this,function(k){d.toggleClass(j,"checkedRow",!!k.target.checked);this._storeSelections();this.explorer.selection&&this.explorer.selection.setSelections(this.getSelected())}));
return g}},_storeSelections:function(){var g=this.getSelectedIds(),j=this._getUIStatePreferencePath();if(j&&window.sessionStorage)window.sessionStorage[j+"selection"]=JSON.stringify(g)},_restoreSelections:function(g){g=window.sessionStorage[g+"selection"];if(typeof g==="string")g=g.length>0?JSON.parse(g):null;var j;if(g)for(j=0;j<g.length;j++){var i=d.byId(g[j]);if(i){d.addClass(i,"checkedRow");if(i=d.byId(i.id+"selectedState"))i.checked=true}}g=this.getSelected();this.explorer.selection&&this.explorer.selection.setSelections(g)},
_storeExpansions:function(g){window.sessionStorage[g+"expanded"]=JSON.stringify(this._expanded)},_restoreExpansions:function(g){var j=false,i=window.sessionStorage[g+"expanded"];if(typeof i==="string")i=i.length>0?JSON.parse(i):null;var k;if(i)for(k=0;k<i.length;k++)if(d.byId(i[k])){this._expanded.push(i[k]);this.tableTree.expand(i[k],d.hitch(this,function(){this._restoreSelections(g)}));j=true}return!j},_getUIStatePreferencePath:function(){if(this.explorer){var g=this.explorer.getRootPath();if(this._cachePrefix&&
g)return"/"+this._cachePrefix+"/"+g.replace(/[^\.\:\-\_0-9A-Za-z]/g,"")+"/uiState"}return null},expandCollapseImageId:function(g){return g+"__expand"},getExpandImage:function(g,j,i,k){var h=d.create("span",{id:this.expandCollapseImageId(g.id)},j,"last");d.addClass(h,"imageSprite");d.addClass(h,this._collapseImageClass);j=d.create("span",null,j,"last");d.addClass(j,k||"imageSprite");d.addClass(j,i||"core-sprite-folder");h.onclick=d.hitch(this,function(){this.tableTree.toggle(g.id,this.expandCollapseImageId(g.id),
this._expandImageClass,this._collapseImageClass);if(this.tableTree.isExpanded(g.id))this._expanded.push(g.id);else for(var l in this._expanded)if(this._expanded[l]===g.id){this._expanded.splice(l,1);break}(l=this._getUIStatePreferencePath())&&window.sessionStorage&&this._storeExpansions(l)});return h},render:function(g,j){j.cellSpacing="8px";this.renderRow(g,j)},getSelected:function(){var g=[];d.query(".selectionCheckmark").forEach(d.hitch(this,function(j){j.checked&&g.push(this.tableTree.getItem(j.parentNode.parentNode))}));
return g},getSelectedIds:function(){var g=[];d.query(".selectionCheckmark").forEach(d.hitch(this,function(j){j.checked&&g.push(j.parentNode.parentNode.id)}));return g},rowsChanged:function(){d.query(".treeTableRow").forEach(function(g,j){if(j%2){d.addClass(g,"darkTreeTableRow");d.removeClass(g,"lightTreeTableRow")}else{d.addClass(g,"lightTreeTableRow");d.removeClass(g,"darkTreeTableRow")}});this.explorer.selection&&this.explorer.selection.setSelections(this.getSelected())},updateCommands:function(){var g=
this.explorer.registry;d.query(".treeTableRow").forEach(function(j){var i=d.byId(j.id+"actionswrapper");d.empty(i);g.getService("orion.page.command").then(function(k){k.renderCommands(i,"object",j._item,this.explorer,"image")})})},_init:function(g){if(g){this._useCheckboxSelection=g.checkbox===undefined?false:g.checkbox;this._colums=g.colums||[];this._cachePrefix=g.cachePrefix}},_initializeUIState:function(){this._expanded=[];var g=this._getUIStatePreferencePath();g&&window.sessionStorage&&this._restoreExpansions(g)&&
this._restoreSelections(g)}};return f}();e.SelectionRenderer=function(){function f(g,j){this._init(g);this.explorer=j}f.prototype=new e.ExplorerRenderer;f.prototype.renderTableHeader=function(g){var j=document.createElement("thead"),i=document.createElement("tr");d.addClass(j,"navTableHeading");this._useCheckboxSelection&&i.appendChild(this.initCheckboxColumn(g));for(var k=0,h=this.getCellHeaderElement(k);h;){d.addClass(h,"navColumn");i.appendChild(h);h=this.getCellHeaderElement(++k)}j.appendChild(i);
g.appendChild(j)};f.prototype.renderRow=function(g,j){d.style(j,"verticalAlign","baseline");d.addClass(j,"treeTableRow");var i=this.getCheckboxColumn(g,j);i&&j.appendChild(i);i=0;for(var k=this.getCellElement(i,g,j);k;){j.appendChild(k);d.addClass(k,"secondaryColumn");k=this.getCellElement(++i,g,j)}};f.prototype.getCellHeaderElement=function(){};f.prototype.getCellElement=function(){};return f}();return e});
define("orion/searchExplorer",["require","dojo","dijit","orion/explorer","orion/util","orion/fileClient","orion/commands"],function(c,d,a,e,f,g,j){function i(l,n,r,m,o){this.registry=l;this.fileClient=n;this._resultLocation=r;this.searchStr=m.toLowerCase();this._treeRoot={isRoot:true,children:[]};this._listRoot={isRoot:true,children:[]};this.indexedFileItems=this.currentDetail=null;this.modelLocHash=[];this._lineDelimiter="\n";this.explorer=o}function k(l,n){this._init(l);this.explorer=n}function h(l,
n,r,m,o){this.parentNode=m;this.registry=l;this._commandService=n;this.fileClient=new g.FileClient(this.registry);this.checkbox=false;this.renderer=new k({checkbox:false},this);this.model=new i(l,this.fileClient,r,o,this)}i.prototype=new e.ExplorerModel;i.prototype.setCurrent=function(l,n){this.currentFileIndex=l;this.currentDetailIndex=n;this.storeStatus()};i.prototype.storeStatus=function(){window.sessionStorage[this.searchStr+"_search_result_useFlatList"]=JSON.stringify(this.useFlatList);window.sessionStorage[this.searchStr+
"_search_result_currentFileIndex"]=JSON.stringify(this.currentFileIndex);window.sessionStorage[this.searchStr+"_search_result_currentDetailIndex"]=JSON.stringify(this.currentDetailIndex)};i.prototype.restoreStatus=function(){this.useFlatList=false;var l=window.sessionStorage[this.searchStr+"_search_result_useFlatList"];if(typeof l==="string")if(l.length>0)this.useFlatList=JSON.parse(l);this.currentFileIndex=0;l=window.sessionStorage[this.searchStr+"_search_result_currentFileIndex"];if(typeof l===
"string")if(l.length>0)this.currentFileIndex=JSON.parse(l);if(this.currentFileIndex<0||this.currentFileIndex>=this.indexedFileItems.length)this.currentFileIndex=0;this.currentDetailIndex=0;l=window.sessionStorage[this.searchStr+"_search_result_currentDetailIndex"];if(typeof l==="string")if(l.length>0)this.currentDetailIndex=JSON.parse(l)};i.prototype.getRealRoot=function(){return this.useFlatList?this._listRoot:this._treeRoot};i.prototype.getRoot=function(l){l(this.getRealRoot())};i.prototype.markUpSharedParent=
function(l,n){if(this.sharedParentHash[l.Location]){var r=this.sharedParentHash[l.Location];if(typeof r==="string")if(r!==n)this.sharedParentHash[l.Location]=2}else this.sharedParentHash[l.Location]=n};i.prototype.preparecompressHash=function(){this.sharedParentHash=[];for(var l=0;l<this._resultLocation.length;l++){var n=this._resultLocation[l].metaData.Parents;if(n.length!==0)for(var r=this._resultLocation[l].location,m=0;m<n.length;m++){var o=n[m];this.markUpSharedParent(o,r);r=o.Location}}};i.prototype.compressParents=
function(l,n,r){if(l.length!==0)if(!(n>l.length-1)){var m=l[n].Name,o=l[n].Location,p=n+1,s=false;if(p<l.length)for(n=n+1;n<l.length;n++){p=n;if(this.sharedParentHash[l[n].Location]===2)break;else{m=l[n].Name+"/"+m;if(n===l.length-1)s=true}}r.push({Location:o,Name:m});s||this.compressParents(l,p,r)}};i.prototype.compressTree=function(){for(var l=0;l<this._resultLocation.length;l++)if(this._resultLocation[l].metaData){var n=this._resultLocation[l].metaData.Parents;if(n.length!==0){this.preparecompressHash();
var r=[];this.compressParents(n,0,r);this._resultLocation[l].metaData.compressedParents=r}}};i.prototype._findExistingParent=function(l,n){var r=this.modelLocHash[l[n].Location];if(r)return{parent:r,index:n};if(n===l.length-1)return null;return this._findExistingParent(l,n+1)};i.prototype.fullPathName=function(l,n){if(l&&l.parent)if(!l.parent.isRoot){n.name=l.parent.name+(n.name===""?"":"/")+n.name;l.parent&&this.fullPathName(l.parent,n)}};i.prototype.buildResultModelTree=function(l,n){n&&this.compressTree();
for(var r=0;r<this._resultLocation.length;r++)if(this._resultLocation[r].metaData){var m;m=n?this._resultLocation[r].metaData.compressedParents:this._resultLocation[r].metaData.Parents;var o=this._findExistingParent(m,0),p;if(o){p=o.parent;o=o.index}else{p=this._treeRoot;o=m.length}if(o>0)for(o=o-1;o>-1;o--){var s={parent:p,children:[],type:"dir",name:m[o].Name,location:m[o].Location};p.children.push(s);f.processSearchResultParent(p);p=this.modelLocHash[m[o].Location]=s}m={name:""};o={parent:p,type:"file",
name:this._resultLocation[r].name,linkLocation:this._resultLocation[r].linkLocation,location:this._resultLocation[r].location};this.fullPathName(o,m);o.fullPathName=m.name;this.modelLocHash[o.location]=o;p.children.push(o);f.processSearchResultParent(p)}this.prepareFileItems();this.restoreStatus();l()};i.prototype.loadOneFileMetaData=function(l,n){var r=this._resultLocation[l];this.fileClient.read(r.location,true).then(d.hitch(this,function(m){r.metaData=m;l===this._resultLocation.length-1?this.buildResultModelTree(n,
true):this.loadOneFileMetaData(l+1,n)}),d.hitch(this,function(m){console.error("Error loading file metadata: "+m.message);l===this._resultLocation.length-1?this.buildResultModelTree(n,true):this.loadOneFileMetaData(l+1,n)}))};i.prototype.prepareFileItems=function(){this.indexedFileItems=[];this.walkTreeNode(this._treeRoot);for(var l=0;l<this.indexedFileItems.length;l++)this._listRoot.children.push(this.indexedFileItems[l])};i.prototype.getFileItemIndex=function(l){for(var n=0;n<this.indexedFileItems.length;n++)if(l===
this.indexedFileItems[n])return n;return-1};i.prototype.getFileDetailItemIndex=function(l,n){if(l<0)return-1;l=this.indexedFileItems[l];if(l.children&&l.children.length>0)for(var r=0;r<l.children.length;r++)if(n===l.children[r])return r;return-1};i.prototype.walkTreeNode=function(l){if(l.children)for(var n=0;n<l.children.length;n++)this.walkTreeNode(l.children[n]);else l.type==="file"&&this.indexedFileItems.push(l)};i.prototype.getId=function(l){if(l===this.getRealRoot())l=this.rootId;else{l=l.location;
l=l.replace(/[^\.\:\-\_0-9A-Za-z]/g,"")}return l};i.prototype.searchOneline=function(l,n){var r;r=0;for(var m=false,o=[];;){r=l.indexOf(n,r);if(r<0)break;else{o.push({startIndex:r});m=true;r=r+n.length}}if(m)return o;return null};i.prototype.searchWithinFile=function(l,n,r){n=n.split(this._lineDelimiter);if(l){l.children=[];for(var m=0;m<n.length;m++){var o=n[m];if(o&&o.length>0)if(this.searchOneline(o.toLowerCase(),r)){var p=m+1;l.children.push({parent:l,type:"detail",name:p+" : "+o,linkLocation:l.linkLocation+
"?line="+p,location:l.location+"-"+p})}}l.name=l.name+" ("+l.children.length+" matches)"}};i.prototype._fileExpanded=function(l,n){l=this.indexedFileItems[l];if(l.children&&l.children.length>0){if(n<0)n=l.children.length-1;else if(n>=l.children.length)n=0;return{childrenNumber:l.children.length,childDiv:d.byId(this.getId(l.children[n]))}}return{childrenNumber:0,childDiv:null}};i.prototype.getChildren=function(l,n){if(l.children)n(l.children);else if(l.type==="detail")n([]);else l.type==="file"&&l.location?
this.fileClient.read(l.location).then(d.hitch(this,function(r){this.searchWithinFile(l,r,this.searchStr);r=this.getId(l);if(d.byId(r))(r=d.byId(r+"NameColumn"))&&d.place(document.createTextNode(l.name),r,"only");n(l.children);if(this.highlightSelectionLater)if(l===this.indexedFileItems[this.currentFileIndex]){if(this.currentDetailIndex<0)this.currentDetailIndex=l.children.length-1;else if(this.currentDetailIndex>=l.children.length)this.currentDetailIndex=0;r=this._fileExpanded(this.currentFileIndex,
this.currentDetailIndex);d.toggleClass(r.childDiv,"currentSearchMatch",true);this.explorer.visible(r.childDiv)||r.childDiv.scrollIntoView(!this.lastNavDirection);this.highlightSelectionLater=false}}),d.hitch(this,function(r){console.error("Error loading file content: "+r.message);n([])})):n([])};i.prototype.constructor=i;k.prototype=new e.SelectionRenderer;k.prototype.getCellHeaderElement=function(l){if(l===0)return d.create("th",{innerHTML:"<h2>Search Results</h2>"});else if(this.explorer.model.useFlatList&&
l===1)return d.create("th",{innerHTML:"<h2>Location</h2>"})};k.prototype.getCellElement=function(l,n,r){switch(l){case 0:var m;if(n.type==="dir"){l=document.createElement("td");m=d.create("span",null,l,"only");this.getExpandImage(r,m);r=d.create("span",{id:r.id+"NameColumn"},m,"last")}else{l=document.createElement("td");var o=n.linkLocation;m=d.create("span",null,l,"only");if(n.type==="file")this.getExpandImage(r,m,"core-sprite-file");else{var p=this;d.connect(r,"onclick",r,function(){var q=p.explorer.model.getFileItemIndex(n.parent);
if(q>-1){var u=p.explorer.model.getFileDetailItemIndex(q,n);if(u>-1)if(!(p.explorer.model.currentFileIndex===q&&p.explorer.model.currentDetailIndex===u)){var y=p.explorer.model._fileExpanded(p.explorer.model.currentFileIndex,p.explorer.model.currentDetailIndex);y.childDiv&&d.toggleClass(y.childDiv,"currentSearchMatch",false);p.explorer.model.setCurrent(q,u);y=p.explorer.model._fileExpanded(p.explorer.model.currentFileIndex,p.explorer.model.currentDetailIndex);d.toggleClass(y.childDiv,"currentSearchMatch",
true)}}});var s=d.create("span",null,m,"last");d.addClass(s,"imageSprite");d.addClass(s,"core-sprite-none");s=d.create("span",null,m,"last");d.addClass(s,"imageSprite");d.addClass(s,"core-sprite-rightarrow")}r=d.create("a",{className:"navlink",id:r.id+"NameColumn",href:o},m,"last")}d.place(document.createTextNode(n.name),r,"only");return l;case 1:if(this.explorer.model.useFlatList&&n.type==="file"){l=document.createElement("td");m=d.create("span",null,l,"only");d.place(document.createTextNode(n.fullPathName),
m,"only");return l}}};k.prototype.constructor=k;h.prototype=new e.Explorer;h.prototype.onchange=function(){};h.prototype.initCommands=function(){var l=this,n=new j.Command({name:"Next result",imageClass:"core-sprite-move_down",id:"orion.search.nextResult",groupId:"orion.searchGroup",callback:function(){l.gotoNext(true,true)}}),r=new j.Command({name:"Previous result",imageClass:"core-sprite-move_up",id:"orion.search.prevResult",groupId:"orion.searchGroup",callback:function(){l.gotoNext(false,true)}}),
m=new j.Command({name:"Expand all results",imageClass:"core-sprite-expandAll",id:"orion.search.expandAll",groupId:"orion.searchGroup",callback:function(){l.expandAll()}}),o=new j.Command({name:"Collapse all results",imageClass:"core-sprite-collapseAll",id:"orion.search.collapseAll",groupId:"orion.searchGroup",callback:function(){l.collapseAll()}});this._commandService.addCommand(n,"dom");this._commandService.addCommand(r,"dom");this._commandService.addCommand(m,"dom");this._commandService.addCommand(o,
"dom");this._commandService.registerCommandContribution("orion.search.nextResult",1,"pageActionsRight");this._commandService.registerCommandContribution("orion.search.prevResult",2,"pageActionsRight");this._commandService.registerCommandContribution("orion.search.expandAll",3,"pageActionsRight");this._commandService.registerCommandContribution("orion.search.collapseAll",4,"pageActionsRight");d.empty("pageActionsRight");this._commandService.renderCommands("pageActionsRight","dom",l,l,"image");(n=a.byId("globalSearchOptMenu"))&&
n.destroy();n=new a.Menu({style:"display: none;",id:"globalSearchOptMenu"});n.addChild(new a.CheckedMenuItem({label:"Show as List",checked:l.model.useFlatList,onChange:function(p){l.switchTo(p)}}));n=new a.form.DropDownButton({label:"Options",dropDown:n});d.addClass(n.domNode,"commandImage");d.place(n.domNode,"pageActionsRight","last")};h.prototype.startUp=function(){var l=this;this.model.loadOneFileMetaData(0,function(){l.initCommands();l.createTree(l.parentNode,l.model);l.gotoCurrent()})};h.prototype.switchTo=
function(l){this.model.useFlatList=l;this.model.storeStatus();this.createTree(this.parentNode,this.model);this.gotoCurrent()};h.prototype.expandAll=function(){var l=this.model.getRealRoot();if(l.isRoot)for(var n=0;n<l.children.length;n++)this.expandRecursively(l.children[n]);else this.expandRecursively(l);this.gotoCurrent()};h.prototype.collapseAll=function(){var l=this.model.getRealRoot();if(l.isRoot)for(var n=0;n<l.children.length;n++)this.myTree.collapse(l.children[n]);else this.myTree.collapse(l)};
h.prototype.expandRecursively=function(l){if(l.type!=="detail"){this.myTree.expand(l);l=l.children;if(!(l===undefined||l===null))for(var n=l.length,r=0;r<n;r++)this.expandRecursively(l[r])}};h.prototype.findUIParentChain=function(l,n){n.push(l);var r=this.model.getId(l);if(d.byId(r))return n;this.findUIParentChain(l.parent,n)};h.prototype._decideNext=function(l,n){if(!n)return{newFileIndex:this.model.currentFileIndex,newDetailIndex:this.model.currentDetailIndex};n=this.model.indexedFileItems[this.model.currentFileIndex];
if(n.children&&n.children.length>0){l=l?this.model.currentDetailIndex+1:this.model.currentDetailIndex-1;if(l<0){n=this.model.currentFileIndex-1;l=-1}else if(l>n.children.length-1){n=this.model.currentFileIndex+1;l=0}else n=this.model.currentFileIndex;if(n<0)n=this.model.indexedFileItems.length-1;else if(n>=this.model.indexedFileItems.length)n=0;return{newFileIndex:n,newDetailIndex:l}}return null};h.prototype.visible=function(l){if(l.offsetWidth===0||l.offsetHeight===0)return false;var n=d.byId("orion.innerSearchResults").getClientRects()[0];
l=l.getClientRects();for(var r=0,m=l.length;r<m;r++){var o=l[r];if(o.top>=n.top&&o.top<=n.bottom&&o.bottom>=n.top&&o.bottom<=n.bottom)return true}return false};h.prototype.gotoCurrent=function(){this.gotoNext(true,false)};h.prototype.gotoNext=function(l,n){var r=this.model._fileExpanded(this.model.currentFileIndex,this.model.currentDetailIndex);r.childDiv&&d.toggleClass(r.childDiv,"currentSearchMatch",false);n=this._decideNext(l,n);this.model.highlightSelectionLater=true;this.model.lastNavDirection=
l;if(n){r=this.model._fileExpanded(n.newFileIndex,n.newDetailIndex);this.model.setCurrent(n.newFileIndex,n.newDetailIndex);if(r.childrenNumber>0){this.model.highlightSelectionLater=false;if(n.newDetailIndex<0)this.model.setCurrent(n.newFileIndex,r.childrenNumber-1);else n.newDetailIndex>=r.childrenNumber&&this.model.setCurrent(n.newFileIndex,0)}if(r.childDiv){d.toggleClass(r.childDiv,"currentSearchMatch",true);this.visible(r.childDiv)||r.childDiv.scrollIntoView(!l);return}}n=[];this.findUIParentChain(this.model.indexedFileItems[this.model.currentFileIndex],
n);for(r=n.length-1;r>-1;r--)this.myTree.expand(n[r]);if(!this.model.highlightSelectionLater){n=this.model._fileExpanded(this.model.currentFileIndex,this.model.currentDetailIndex);d.toggleClass(n.childDiv,"currentSearchMatch",true);this.visible(n.childDiv)||n.childDiv.scrollIntoView(!l)}};h.prototype.constructor=h;return{SearchResultExplorer:h}});
define("dojo/cookie",["dojo","dojo/regexp"],function(c){c.cookie=function(d,a,e){var f=document.cookie;if(arguments.length==1){var g=f.match(new RegExp("(?:^|; )"+c.regexp.escapeString(d)+"=([^;]*)"));return g?decodeURIComponent(g[1]):undefined}else{e=e||{};f=e.expires;if(typeof f=="number"){var j=new Date;j.setTime(j.getTime()+f*24*60*60*1E3);f=e.expires=j}if(f&&f.toUTCString)e.expires=f.toUTCString();a=encodeURIComponent(a);f=d+"="+a;for(g in e){f+="; "+g;j=e[g];if(j!==true)f+="="+j}document.cookie=
f}};c.cookie.isSupported=function(){if(!("cookieEnabled"in navigator)){this("__djCookieTest__","CookiesAllowed");navigator.cookieEnabled=this("__djCookieTest__")=="CookiesAllowed";navigator.cookieEnabled&&this("__djCookieTest__","",{expires:-1})}return navigator.cookieEnabled};return c.cookie});
define("dijit/layout/BorderContainer",["dojo","dijit","dijit/layout/_LayoutWidget","dojo/cookie","dijit/_Templated"],function(c,d){c.declare("dijit.layout.BorderContainer",d.layout._LayoutWidget,{design:"headline",gutters:true,liveSplitters:true,persist:false,baseClass:"dijitBorderContainer",_splitterClass:"dijit.layout._Splitter",postMixInProperties:function(){this.gutters||(this.baseClass+="NoGutter");this.inherited(arguments)},startup:function(){if(!this._started){c.forEach(this.getChildren(),
this._setupChild,this);this.inherited(arguments)}},_setupChild:function(a){var e=a.region;if(e){this.inherited(arguments);c.addClass(a.domNode,this.baseClass+"Pane");var f=this.isLeftToRight();if(e=="leading")e=f?"left":"right";if(e=="trailing")e=f?"right":"left";if(e!="center"&&(a.splitter||this.gutters)&&!a._splitterWidget){var g=c.getObject(a.splitter?this._splitterClass:"dijit.layout._Gutter");f=new g({id:a.id+"_splitter",container:this,child:a,region:e,live:this.liveSplitters});f.isSplitter=
true;a._splitterWidget=f;c.place(f.domNode,a.domNode,"after");f.startup()}a.region=e}},layout:function(){this._layoutChildren()},addChild:function(){this.inherited(arguments);this._started&&this.layout()},removeChild:function(a){var e=a.region,f=a._splitterWidget;if(f){f.destroy();delete a._splitterWidget}this.inherited(arguments);this._started&&this._layoutChildren();c.removeClass(a.domNode,this.baseClass+"Pane");c.style(a.domNode,{top:"auto",bottom:"auto",left:"auto",right:"auto",position:"static"});
c.style(a.domNode,e=="top"||e=="bottom"?"width":"height","auto")},getChildren:function(){return c.filter(this.inherited(arguments),function(a){return!a.isSplitter})},getSplitter:function(a){return c.filter(this.getChildren(),function(e){return e.region==a})[0]._splitterWidget},resize:function(){if(!this.cs||!this.pe){var a=this.domNode;this.cs=c.getComputedStyle(a);this.pe=c._getPadExtents(a,this.cs);this.pe.r=c._toPixelValue(a,this.cs.paddingRight);this.pe.b=c._toPixelValue(a,this.cs.paddingBottom);
c.style(a,"padding","0px")}this.inherited(arguments)},_layoutChildren:function(a,e){if(this._borderBox&&this._borderBox.h){var f=c.map(this.getChildren(),function(j,i){return{pane:j,weight:[j.region=="center"?Infinity:0,j.layoutPriority,(this.design=="sidebar"?1:-1)*(/top|bottom/.test(j.region)?1:-1),i]}},this);f.sort(function(j,i){j=j.weight;i=i.weight;for(var k=0;k<j.length;k++)if(j[k]!=i[k])return j[k]-i[k];return 0});var g=[];c.forEach(f,function(j){j=j.pane;g.push(j);j._splitterWidget&&g.push(j._splitterWidget)});
d.layout.layoutChildren(this.domNode,{l:this.pe.l,t:this.pe.t,w:this._borderBox.w-this.pe.w,h:this._borderBox.h-this.pe.h},g,a,e)}},destroyRecursive:function(){c.forEach(this.getChildren(),function(a){var e=a._splitterWidget;e&&e.destroy();delete a._splitterWidget});this.inherited(arguments)}});c.extend(d._Widget,{region:"",layoutPriority:0,splitter:false,minSize:0,maxSize:Infinity});c.declare("dijit.layout._Splitter",[d._Widget,d._Templated],{live:true,templateString:'<div class="dijitSplitter" dojoAttachEvent="onkeypress:_onKeyPress,onmousedown:_startDrag,onmouseenter:_onMouse,onmouseleave:_onMouse" tabIndex="0" role="separator"><div class="dijitSplitterThumb"></div></div>',
postMixInProperties:function(){this.inherited(arguments);this.horizontal=/top|bottom/.test(this.region);this._factor=/top|left/.test(this.region)?1:-1;this._cookieName=this.container.id+"_"+this.region},buildRendering:function(){this.inherited(arguments);c.addClass(this.domNode,"dijitSplitter"+(this.horizontal?"H":"V"));if(this.container.persist){var a=c.cookie(this._cookieName);if(a)this.child.domNode.style[this.horizontal?"height":"width"]=a}},_computeMaxSize:function(){var a=this.horizontal?"h":
"w",e=c.marginBox(this.child.domNode)[a],f=c.filter(this.container.getChildren(),function(g){return g.region=="center"})[0];a=c.marginBox(f.domNode)[a];return Math.min(this.child.maxSize,e+a)},_startDrag:function(a){if(!this.cover){this.cover=c.doc.createElement("div");c.addClass(this.cover,"dijitSplitterCover");c.place(this.cover,this.child.domNode,"after")}c.addClass(this.cover,"dijitSplitterCoverActive");this.fake&&c.destroy(this.fake);if(!(this._resize=this.live)){(this.fake=this.domNode.cloneNode(true)).removeAttribute("id");
c.addClass(this.domNode,"dijitSplitterShadow");c.place(this.fake,this.domNode,"after")}c.addClass(this.domNode,"dijitSplitterActive dijitSplitter"+(this.horizontal?"H":"V")+"Active");if(this.fake)c.removeClass(this.fake,"dijitSplitterHover dijitSplitter"+(this.horizontal?"H":"V")+"Hover");var e=this._factor,f=this.horizontal,g=f?"pageY":"pageX",j=a[g],i=this.domNode.style;f=f?"h":"w";var k=c.marginBox(this.child.domNode)[f],h=this._computeMaxSize(),l=this.child.minSize||20;f=this.region;var n=f==
"top"||f=="bottom"?"top":"left",r=parseInt(i[n],10),m=this._resize,o=c.hitch(this.container,"_layoutChildren",this.child.id);f=c.doc;this._handlers=(this._handlers||[]).concat([c.connect(f,"onmousemove",this._drag=function(p,s){p=p[g]-j;var q=e*p+k,u=Math.max(Math.min(q,h),l);if(m||s)o(u);i[n]=p+r+e*(u-q)+"px"}),c.connect(f,"ondragstart",c.stopEvent),c.connect(c.body(),"onselectstart",c.stopEvent),c.connect(f,"onmouseup",this,"_stopDrag")]);c.stopEvent(a)},_onMouse:function(a){a=a.type=="mouseover"||
a.type=="mouseenter";c.toggleClass(this.domNode,"dijitSplitterHover",a);c.toggleClass(this.domNode,"dijitSplitter"+(this.horizontal?"H":"V")+"Hover",a)},_stopDrag:function(a){try{this.cover&&c.removeClass(this.cover,"dijitSplitterCoverActive");this.fake&&c.destroy(this.fake);c.removeClass(this.domNode,"dijitSplitterActive dijitSplitter"+(this.horizontal?"H":"V")+"Active dijitSplitterShadow");this._drag(a);this._drag(a,true)}finally{this._cleanupHandlers();delete this._drag}if(this.container.persist)c.cookie(this._cookieName,
this.child.domNode.style[this.horizontal?"height":"width"],{expires:365})},_cleanupHandlers:function(){c.forEach(this._handlers,c.disconnect);delete this._handlers},_onKeyPress:function(a){this._resize=true;var e=this.horizontal,f=1,g=c.keys;switch(a.charOrCode){case e?g.UP_ARROW:g.LEFT_ARROW:f*=-1;case e?g.DOWN_ARROW:g.RIGHT_ARROW:break;default:return}e=c._getMarginSize(this.child.domNode)[e?"h":"w"]+this._factor*f;this.container._layoutChildren(this.child.id,Math.max(Math.min(e,this._computeMaxSize()),
this.child.minSize));c.stopEvent(a)},destroy:function(){this._cleanupHandlers();delete this.child;delete this.container;delete this.cover;delete this.fake;this.inherited(arguments)}});c.declare("dijit.layout._Gutter",[d._Widget,d._Templated],{templateString:'<div class="dijitGutter" role="presentation"></div>',postMixInProperties:function(){this.inherited(arguments);this.horizontal=/top|bottom/.test(this.region)},buildRendering:function(){this.inherited(arguments);c.addClass(this.domNode,"dijitGutter"+
(this.horizontal?"H":"V"))}});return d.layout.BorderContainer});
define("orion/searchClient",["require","dojo","dijit","orion/auth","orion/util","orion/searchExplorer","dijit/form/Button","dijit/layout/BorderContainer","dijit/layout/ContentPane"],function(c,d,a,e,f,g){function j(i){this.registry=i.serviceRegistry;this._commandService=i.commandService}j.prototype={search:function(i,k,h,l,n,r,m){d.xhrGet({url:k,handleAs:"json",headers:{Accept:"application/json","Orion-Version":"1"},sync:false,timeout:15E3,error:function(o,p){var s=this;e.handleAuthenticationError(p.xhr,
function(){d.xhrGet(s)})},load:d.hitch(this,function(o){this.showSearchResult(i,k,h,l,n,r,m,o)})})},handleError:function(i,k){console.error(i);var h=document.createTextNode(i);d.place(h,k,"only");return i},saveSearch:function(i,k){this.registry.getService("orion.core.favorite").then(function(h){h.addFavoriteSearch(i,k)})},createSearchQuery:function(i,k,h){if(h){k=/\*$/.test(h)?"":"*";return i+"Name:"+this._luceneEscape(h,true)+k}return i+this._luceneEscape(k)},_luceneEscape:function(i,k){var h="";
k='+-&|!(){}[]^"~:\\'+(!k?"*?":"");for(var l=0;l<i.length;l++){var n=i.charAt(l);if(k.indexOf(n)>=0)h+="\\";h+=n}return h},formatHighlight:function(i){i=i.split(/(##match|match##)/);for(var k=d.create("div"),h,l=0;l<i.length;l++){var n=i[l];if(n==="##match")h=d.create("b");else if(n==="match##"){d.place(h,k,"last");h=null}else d.place(document.createTextNode(n),h||k,"last")}return k},showSearchResult:function(i,k,h,l,n,r,m,o){m?this.showSearchResultInList(i,k,h,l,n,r,o):this.showSearchResultInTree(i,
k,h,l,n,r,o)},showSearchResultInTree:function(i,k,h,l,n,r,m){window.location.href.split("#");r=false;var o=[];d.empty(i);l=m.responseHeader.params.q;l=l.substring(l.indexOf("}")+1);if(m.response.numFound>0){for(var p=0;p<m.response.docs.length;p++){var s=m.response.docs[p];if(!s.Directory&&s.Location!==h){r||(r=true);var q;q=l&&s.LineNumber?f.hashFromPosition(s.Location,null,null,s.LineNumber,s.Offset,l.length):s.Location;o.push({linkLocation:c.toUrl("edit/edit.html")+"#"+q,location:q,name:s.Name})}}typeof n===
"function"&&n(i)}if(r)(new g.SearchResultExplorer(this.registry,this._commandService,o,i,k.split("q=")[1])).startUp();else{i=d.place("<div>No matches found for </div>",i,"only");i=d.create("b",null,i,"last");d.place(document.createTextNode(l),i,"only")}},showSearchResultInList:function(i,k,h,l,n,r,m){window.location.href.split("#");var o=false;d.empty(i);k=m.responseHeader.params.q;k=k.substring(k.indexOf("}")+1);if(m.response.numFound>0){for(var p=document.createElement("table"),s=0;s<m.response.docs.length;s++){var q=
m.response.docs[s];if(!q.Directory&&q.Location!==h){var u;if(!o){o=true;if(l){u=p.insertRow(0).insertCell(0);u.innerHTML="<h2>Search Results</h2>"}}u=p.insertRow(-1).insertCell(0);u.colspan=2;var y=document.createElement("a");d.place(document.createTextNode(q.Name),y);q.LineNumber&&d.place(document.createTextNode(" (Line "+q.LineNumber+")"),y);var C;C=k&&q.LineNumber?f.hashFromPosition(q.Location,null,null,q.LineNumber,q.Offset,k.length):q.Location;y.setAttribute("href",c.toUrl("edit/edit.html")+
"#"+C);u.appendChild(y);if(!r&&m.highlighting&&m.highlighting[q.Id]&&m.highlighting[q.Id].Text){q=m.highlighting[q.Id].Text[0];u=p.insertRow(-1).insertCell(0);u.colspan=2;d.place(this.formatHighlight(q),u,"only")}}}d.place(p,i,"last");typeof n==="function"&&n(i)}if(!o){i=d.place("<div>No matches found for </div>",i,"only");i=d.create("b",null,i,"last");d.place(document.createTextNode(k),i,"only")}}};j.prototype.constructor=j;return{Searcher:j}});
define("orion/git/gitClient",["require","dojo","orion/auth"],function(c,d,a){var e=e||{};e.GitService=function(){function f(g){if(g){this._serviceRegistry=g;this._serviceRegistration=g.registerService("orion.git.provider",this);var j=this;g.getService("orion.net.ssh").then(function(i){j._sshService=i})}}f.prototype={checkGitService:function(){},cloneGitRepository:function(g,j,i,k,h,l,n,r,m){var o={};if(g)o.Name=g;if(i)o.Path=i;if(j)o.GitUrl=j;o.Location=k;if(h)o.GitSshUsername=h;if(l)o.GitSshPassword=
l;if(n)o.GitSshKnownHost=n;if(r)o.GitSshPrivateKey=r;if(m)o.GitSshPassphrase=m;g=c.toUrl("gitapi/clone/._");g=g.substring(0,g.length-2);return d.xhrPost({url:g,headers:{"Orion-Version":"1"},postData:d.toJson(o),handleAs:"json",timeout:15E3,load:function(p){return p},error:function(p,s){a.handleAuthenticationError(s.xhr,function(){});console.error("HTTP status code: ",s.xhr.status);return p}})},initGitRepository:function(){console.error("Not implemented yet")},removeGitRepository:function(g){return d.xhrDelete({url:g,
headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(j){return j},error:function(j,i){a.handleAuthenticationError(i.xhr,function(){});console.error("HTTP status code: ",i.xhr.status);return j}})},getDiffContent:function(g,j,i){var k=this;d.xhrGet({url:g,headers:{"Orion-Version":"1"},content:{parts:"diff"},handleAs:"text",timeout:15E3,load:function(h,l){if(j)typeof j==="function"?j(h,l):k._serviceRegistration.dispatchEvent(j,h)},error:function(h,l){i&&i(h,l);var n=this;a.handleAuthenticationError(l.xhr,
function(){d.xhrGet(n)});return h}})},getDiffFileURI:function(g,j,i){d.xhrGet({url:g,headers:{"Orion-Version":"1"},content:{parts:"uris"},handleAs:"json",timeout:15E3,load:function(k,h){if(j)typeof j==="function"?j(k,h):service._serviceRegistration.dispatchEvent(j,k)},error:function(k,h){i&&i(k,h);var l=this;a.handleAuthenticationError(h.xhr,function(){d.xhrGet(l)});return k}})},getGitStatus:function(g,j,i){d.xhrGet({url:g,headers:{"Orion-Version":"1"},handleAs:"json",timeout:15E3,load:function(k,
h){if(j)typeof j==="function"?j(k,h):service._serviceRegistration.dispatchEvent(j,k)},error:function(k,h){i&&i(k,h);var l=this;a.handleAuthenticationError(h.xhr,function(){d.xhrGet(l)});return k}})},stage:function(g,j,i){return d.xhrPut({url:g,headers:{"Orion-Version":"1"},handleAs:"json",timeout:15E3,load:function(k,h){if(j)typeof j==="function"?j(k,h):service._serviceRegistration.dispatchEvent(j,k)},error:function(k,h){i&&i(k,h);a.handleAuthenticationError(h.xhr,function(){})}})},stageMultipleFiles:function(g,
j,i,k){return d.xhrPut({url:g,headers:{"Orion-Version":"1"},putData:d.toJson({Path:j}),handleAs:"json",timeout:15E3,load:function(h,l){if(i)typeof i==="function"?i(h,l):service._serviceRegistration.dispatchEvent(i,h)},error:function(h,l){k&&k(h,l);a.handleAuthenticationError(l.xhr,function(){});return h}})},unstageAll:function(g,j,i,k){return d.xhrPost({url:g,headers:{"Orion-Version":"1"},handleAs:"json",timeout:15E3,postData:d.toJson({Reset:j}),load:function(h,l){if(i)typeof i==="function"?i(h,l):
service._serviceRegistration.dispatchEvent(i,h)},error:function(h,l){k&&k(h,l);a.handleAuthenticationError(l.xhr,function(){});return h}})},unstage:function(g,j,i,k){return d.xhrPost({url:g,headers:{"Orion-Version":"1"},handleAs:"json",timeout:15E3,postData:d.toJson({Path:j}),load:function(h,l){if(i)typeof i==="function"?i(h,l):service._serviceRegistration.dispatchEvent(i,h)},error:function(h,l){k&&k(h,l);a.handleAuthenticationError(l.xhr,function(){});return h}})},checkoutPath:function(g,j,i,k){return d.xhrPut({url:g,
headers:{"Orion-Version":"1"},putData:d.toJson({Path:j}),handleAs:"json",timeout:15E3,load:function(h,l){if(i)typeof i==="function"?i(h,l):service._serviceRegistration.dispatchEvent(i,h)},error:function(h,l){k&&k(h,l);a.handleAuthenticationError(l.xhr,function(){});return h}})},commitAll:function(g,j,i,k,h){d.xhrPost({url:g,headers:{"Orion-Version":"1"},handleAs:"json",timeout:15E3,postData:i,load:function(l,n){if(k)typeof k==="function"?k(l,n):service._serviceRegistration.dispatchEvent(k,l)},error:function(l,
n){h&&h(l,n);a.handleAuthenticationError(n.xhr,function(){});return l}})},getGitClone:function(g,j){var i=this;return d.xhrGet({url:g,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(k,h){if(j)typeof j==="function"?j(k,h):i._serviceRegistration.dispatchEvent(j,k)},error:function(k,h){var l=this;a.handleAuthenticationError(h.xhr,function(){d.xhrGet(l)});console.error("HTTP status code: ",h.xhr.status)}})},getGitCloneConfig:function(g){return d.xhrGet({url:g,headers:{"Orion-Version":"1"},
handleAs:"json",timeout:5E3,load:function(j){return j},error:function(j,i){var k=this;a.handleAuthenticationError(i.xhr,function(){d.xhrGet(k)});console.error("HTTP status code: ",i.xhr.status)}})},getGitBranch:function(g){return d.xhrGet({url:g,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(j){return j},error:function(j,i){var k=this;a.handleAuthenticationError(i.xhr,function(){d.xhrGet(k)});console.error("HTTP status code: ",i.xhr.status)}})},getGitRemote:function(g){return d.xhrGet({url:g,
headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(j){return j},error:function(j,i){var k=this;a.handleAuthenticationError(i.xhr,function(){d.xhrGet(k)});console.error("HTTP status code: ",i.xhr.status)}})},checkoutBranch:function(g,j){return d.xhrPut({url:g,headers:{"Orion-Version":"1"},putData:d.toJson({Branch:j}),handleAs:"json",timeout:5E3,load:function(i){return i},error:function(i,k){a.handleAuthenticationError(k.xhr,function(){});console.error("HTTP status code: ",k.xhr.status);
return i}})},resetIndex:function(g,j){return d.xhrPost({url:g,headers:{"Orion-Version":"1"},postData:d.toJson({Commit:j,Reset:"HARD"}),handleAs:"json",timeout:5E3,load:function(i){return i},error:function(i,k){a.handleAuthenticationError(k.xhr,function(){});console.error("HTTP status code: ",k.xhr.status)}})},addBranch:function(g,j,i){var k={};if(j)k.Name=j;if(i)k.Branch=i;return d.xhrPost({url:g,headers:{"Orion-Version":"1"},postData:d.toJson(k),handleAs:"json",timeout:5E3,load:function(h){return h},
error:function(h,l){a.handleAuthenticationError(l.xhr,function(){});console.error("HTTP status code: ",l.xhr.status);return h}})},removeBranch:function(g){return d.xhrDelete({url:g,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(j){return j},error:function(j,i){a.handleAuthenticationError(i.xhr,function(){});console.error("HTTP status code: ",i.xhr.status);return j}})},addRemote:function(g,j,i){return d.xhrPost({url:g,headers:{"Orion-Version":"1"},putData:d.toJson({Remote:j,
RemoteURI:i}),handleAs:"json",timeout:5E3,load:function(k){return k},error:function(k,h){a.handleAuthenticationError(h.xhr,function(){});console.error("HTTP status code: ",h.xhr.status);return k}})},removeRemote:function(g){return d.xhrDelete({url:g,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(j){return j},error:function(j,i){a.handleAuthenticationError(i.xhr,function(){});console.error("HTTP status code: ",i.xhr.status);return j}})},doGitLog:function(g,j){var i=this;return d.xhrGet({url:g,
headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(k,h){if(j)typeof j==="function"?j(k,h):i._serviceRegistration.dispatchEvent(j,k);return k},error:function(k,h){var l=this;a.handleAuthenticationError(h.xhr,function(){d.xhrGet(l)});console.error("HTTP status code: ",h.xhr.status)}})},getDiff:function(g,j,i){var k=this;d.xhrPost({url:g,headers:{"Orion-Version":"1"},postData:d.toJson({New:j}),handleAs:"json",timeout:5E3,load:function(h,l){if(i)typeof i==="function"?i(h,l,l):k._serviceRegistration.dispatchEvent(i,
h)},error:function(h,l){var n=this;a.handleAuthenticationError(l.xhr,function(){d.xhrGet(n)});console.error("HTTP status code: ",l.xhr.status)}})},doFetch:function(g,j,i,k,h,l,n,r){var m=this;return d.xhrPost({url:g,headers:{"Orion-Version":"1"},postData:d.toJson({Fetch:"true",Force:j,GitSshUsername:k,GitSshPassword:h,GitSshKnownHost:l,GitSshPrivateKey:n,GitSshPassphrase:r}),handleAs:"json",timeout:5E3,load:function(o,p){if(i)typeof i==="function"?i(o,p,p):m._serviceRegistration.dispatchEvent(i,o)},
error:function(o,p){a.handleAuthenticationError(p.xhr,function(){});console.error("HTTP status code: ",p.xhr.status)}})},doMerge:function(g,j){return d.xhrPost({url:g,headers:{"Orion-Version":"1"},postData:d.toJson({Merge:j}),handleAs:"json",timeout:5E3,load:function(i,k){return{jsonData:i,secondArg:k}},error:function(i,k){a.handleAuthenticationError(k.xhr,function(){});console.error("HTTP status code: ",k.xhr.status);return{error:i,ioArgs:k}}})},doCherryPick:function(g,j,i,k){var h=this;return d.xhrPost({url:g,
headers:{"Orion-Version":"1"},postData:d.toJson({"Cherry-Pick":j}),handleAs:"json",timeout:5E3,load:function(l,n){if(i)typeof i==="function"?i(l,n):h._serviceRegistration.dispatchEvent(i,l);return{jsonData:l,secondArg:n}},error:function(l,n){k&&k(l,n);a.handleAuthenticationError(n.xhr,function(){});console.error("HTTP status code: ",n.xhr.status);return{error:l,ioArgs:n}}})},doRebase:function(g,j,i,k,h){var l=this,n={};n.Rebase=j;if(i)n.Operation=i;return d.xhrPost({url:g,headers:{"Orion-Version":"1"},
postData:d.toJson(n),handleAs:"json",timeout:5E3,load:function(r,m){if(k)typeof k==="function"?k(r,m):l._serviceRegistration.dispatchEvent(k,r);return{jsonData:r,secondArg:m}},error:function(r,m){h&&h(r,m);a.handleAuthenticationError(m.xhr,function(){});console.error("HTTP status code: ",m.xhr.status);return{error:r,ioArgs:m}}})},doPush:function(g,j,i,k,h,l,n,r,m,o){var p=this;return d.xhrPost({url:g,headers:{"Orion-Version":"1"},postData:d.toJson({PushSrcRef:j,PushTags:i,Force:k,GitSshUsername:l,
GitSshPassword:n,GitSshKnownHost:r,GitSshPrivateKey:m,GitSshPassphrase:o}),handleAs:"json",timeout:5E3,load:function(s,q){if(h)typeof h==="function"?h(s,q,q):p._serviceRegistration.dispatchEvent(h,s)},error:function(s,q){a.handleAuthenticationError(q.xhr,function(){});console.error("HTTP status code: ",q.xhr.status);return s}})},getLog:function(g,j,i){var k=this;return d.xhrPost({url:g,headers:{"Orion-Version":"1"},postData:d.toJson({New:j}),handleAs:"json",timeout:5E3,load:function(h,l){return l.xhr.getResponseHeader("Location")},
error:function(h,l){a.handleAuthenticationError(l.xhr,function(){});console.error("HTTP status code: ",l.xhr.status)}}).then(function(h){d.xhrGet({url:h,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(l,n){if(i)typeof i==="function"?i(l,n):k._serviceRegistration.dispatchEvent(i,l);return l},error:function(l,n){var r=this;a.handleAuthenticationError(n.xhr,function(){d.xhrGet(r)});console.error("HTTP status code: ",n.xhr.status)}})})},getDefaultRemoteBranch:function(g,j){var i=
this;d.xhrGet({url:g,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(k){return k},error:function(k,h){var l=this;a.handleAuthenticationError(h.xhr,function(){d.xhrGet(l)});console.error("HTTP status code: ",h.xhr.status)}}).then(function(k){if(k.Children[0]==null)return null;d.xhrGet({url:k.Children[0].Location,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(h,l){if(j)typeof j==="function"?j(h.Children[0],l):i._serviceRegistration.dispatchEvent(j,h.Children[0]);
return h},error:function(h,l){var n=this;a.handleAuthenticationError(l.xhr,function(){d.xhrGet(n)});console.error("HTTP status code: ",l.xhr.status)}})})},doAddTag:function(g,j,i){var k=this;return d.xhrPut({url:g,headers:{"Orion-Version":"1"},putData:d.toJson({Name:j}),handleAs:"json",timeout:5E3,load:function(h,l){if(i)typeof i==="function"?i(h,l,l):k._serviceRegistration.dispatchEvent(i,h)},error:function(h,l){a.handleAuthenticationError(l.xhr,function(){});console.error("HTTP status code: ",l.xhr.status)}})},
checkoutTag:function(g,j,i,k){var h=this;return d.xhrPut({url:g,headers:{"Orion-Version":"1"},putData:d.toJson({Tag:j,Branch:i}),handleAs:"json",timeout:5E3,load:function(l,n){if(k)typeof k==="function"?k(l,n,n):h._serviceRegistration.dispatchEvent(k,l);return l},error:function(l,n){a.handleAuthenticationError(n.xhr,function(){});console.error("HTTP status code: ",n.xhr.status);return l}})},addCloneConfigurationProperty:function(g,j,i,k,h){return d.xhrPost({url:g,headers:{"Orion-Version":"1"},postData:d.toJson({Key:j,
Value:i}),handleAs:"json",timeout:15E3,load:function(l,n){if(k)typeof k==="function"?k(l,n):service._serviceRegistration.dispatchEvent(k,l)},error:function(l,n){h&&h(l,n);a.handleAuthenticationError(n.xhr,function(){});return l}})},editCloneConfigurationProperty:function(g,j,i,k){return d.xhrPut({url:g,headers:{"Orion-Version":"1"},putData:d.toJson({Value:j}),handleAs:"json",timeout:15E3,load:function(h,l){if(i)typeof i==="function"?i(h,l):service._serviceRegistration.dispatchEvent(i,h)},error:function(h,
l){k&&k(h,l);a.handleAuthenticationError(l.xhr,function(){});return h}})},deleteCloneConfigurationProperty:function(g,j,i){return d.xhrDelete({url:g,headers:{"Orion-Version":"1"},handleAs:"json",timeout:15E3,load:function(k,h){if(j)typeof j==="function"?j(k,h):service._serviceRegistration.dispatchEvent(j,k)},error:function(k,h){i&&i(k,h);a.handleAuthenticationError(h.xhr,function(){});return k}})}};return f}();return e});
define("orion/breadcrumbs",["require","dojo"],function(c,d){function a(e){this._init(e)}a.prototype={_init:function(e){var f=e.container;if(typeof f==="string")f=d.byId(f);if(!f)throw"no parent container";this._container=f;d.removeClass(f,"currentLocation");this._id=e.id||"eclipse.breadcrumbs";this._resource=e.resource||null;this._firstSegmentName=e.firstSegmentName;this._makeHref=e.makeHref;this.path="";this.render()},getNavigatorRootSegment:function(){if(this._firstSegmentName){var e=document.createElement("a");
d.place(document.createTextNode(this._firstSegmentName),e,"only");e.href=c.toUrl("navigate/table.html")+"#";return e}return null},render:function(){var e=this._container,f=d.byId(this._id);if(f)d.empty(f);else{f=document.createElement("span");f.id=this._id;e.appendChild(f)}var g;if(g=this.getNavigatorRootSegment()){d.addClass(g,"breadcrumb");f.appendChild(g);if(this._resource&&this._resource.Parents){g=document.createElement("span");d.place(document.createTextNode(" / "),g,"only");this.path+="/";
d.addClass(g,"breadcrumb");f.appendChild(g)}else{g.href="";d.removeClass(g,"breadcrumb");d.addClass(g,"currentLocation")}}if(this._resource&&this._resource.Parents){e=this._resource.Parents;for(var j=e.length;--j>=0;){g=document.createElement("a");d.addClass(g,"breadcrumb");d.place(document.createTextNode(e[j].Name),g,"only");this.path+=e[j].Name;if(this._makeHref)this._makeHref(g,e[j].ChildrenLocation);else g.href=c.toUrl("navigate/table.html")+"#"+e[j].ChildrenLocation;f.appendChild(g);g=document.createElement("span");
d.place(document.createTextNode(" / "),g,"only");this.path+="/";d.addClass(g,"breadcrumb");f.appendChild(g)}if(this._resource){g=document.createElement("a");d.place(document.createTextNode(this._resource.Name),g,"only");d.addClass(g,"breadcrumb");d.addClass(g,"currentLocation");this.path+=this._resource.Name;f.appendChild(g)}}if(f.childNodes.length===0){g=document.createElement("a");d.place(document.createTextNode(document.title),g,"only");d.addClass(g,"breadcrumb");d.addClass(g,"currentLocation");
f.appendChild(g)}}};a.prototype.constructor=a;return{BreadCrumbs:a}});
define("orion/ssh/sshTools",[],function(){var c=c||{};c.SshService=function(){function d(a){if(a){this._serviceRegistry=a;this._serviceRegistration=a.registerService("orion.net.ssh",this)}}d.prototype={_KNOWN_HOSTS:"known_hosts",addKnownHosts:function(a,e){e||(e="");var f=localStorage.getItem(e+this._KNOWN_HOSTS);if(f)f.indexOf(a)<0&&localStorage.setItem(e+this._KNOWN_HOSTS,f+"\n"+a);else localStorage.setItem(e+this._KNOWN_HOSTS,a)},clearKnownhosts:function(a){a||(a="");localStorage.removeItem(a+
this._KNOWN_HOSTS)},getKnownHosts:function(a){a||(a="");return localStorage.getItem(a+this._KNOWN_HOSTS)}};return d}();return c});
define("orion/git/git-commit-details",["require","dojo","orion/commands"],function(c,d,a){var e={};e.CommitDetails=function(){function f(g){var j=g.parent;if(typeof j==="string")j=d.byId(j);if(!j)throw"no parent";if(!g.commandService)throw"no command service";this.commandService=g.commandService;this.linkService=g.linkService;this._parent=j;this._detailsPane=g.detailsPane;this.commandService.addCommand(new a.Command({name:"Show diff",tooltip:"Show the diff",imageClass:"git-sprite-open_compare",spriteClass:"gitCommandSprite",
id:"eclipse.showDiff",hrefCallback:function(i){return c.toUrl("compare/compare.html")+"?readonly#"+i.DiffLocation},visibleWhen:function(i){return i.Type==="Diff"}}),"object");this.commandService.registerCommandContribution("eclipse.showDiff",1)}f.prototype={loadCommitDetails:function(g){if(this._detailsPane){this._detailsPane.isRightPaneOpen()||this._detailsPane.toggle();this._detailsPane.style.overflow="hidden"}this.render(g)},render:function(g){var j=d.create("table",{id:"commitMetaTable"});d.addClass(j,
"commitMetaTable");var i=d.create("thead",null,j);i=d.create("tr",null,i);var k=d.create("td",{colspan:3},i);d.addClass(k,"paneHeadingContainer");d.place("<span class='paneHeading'>Commit details</span>",k,"only");i=d.create("td",null,i);d.style(i,"textAlign","right");d.addClass(i,"paneHeadingContainer");d.place("<span id='commitMetaCommands' class='paneHeadingToolbar'></span>",i,"only");var h;if(g!=null){k=d.create("tbody",null,j);i=d.create("tr");h=d.create("td",{style:"padding-left: 5px; padding-right: 5px"},
i,"last");d.place(document.createTextNode("Author"),h,"only");d.place(i,k,"last");i=d.create("tr");if(g.AuthorImage){h=d.create("td",{style:"padding: 2px; text-align: right"},i,"last");var l=new Image;l.src=g.AuthorImage;l.name=g.AuthorName;l.width=40;l.height=40;d.addClass(l,"gitAuthorImage");d.place(l,h,"first")}h=d.create("td",{style:"padding-left: 5px"},i,"last");var n=d.create("span",null,h,"last");d.place(document.createTextNode(g.AuthorName),n,"only");d.create("br",null,h,"last");n=d.create("span",
null,h,"last");d.place(document.createTextNode(g.AuthorEmail),n,"only");d.place(i,k,"last");i=d.create("tr");h=d.create("td",{style:"padding-left: 5px; padding-right: 5px"},i,"last");d.place(document.createTextNode("Committer"),h,"only");h=d.create("td",null,i,"last");d.place(document.createTextNode(g.CommitterName+" ("+g.CommitterEmail+")"),h,"only");d.place(i,k,"last");i=d.create("tr");h=d.create("td",{style:"padding-left: 5px; padding-right: 5px"},i,"last");d.place(document.createTextNode("Message"),
h,"only");h=d.create("td",null,i,"last");n=this.linkService?this.linkService.addLinks(g.Message):document.createTextNode(g.Message);d.place(n,h,"only");d.place(i,k,"last");i=d.create("tr");h=d.create("td",{style:"padding-left: 5px; padding-right: 5px"},i,"last");d.place(document.createTextNode("Name"),h,"only");h=d.create("td",null,i,"last");d.place(document.createTextNode(g.Name),h,"only");d.place(i,k,"last")}d.place(j,this._parent,"only");if(g!=null){j=d.byId("commitMetaCommands");this.commandService.renderCommands(j,
"dom",this,this,"image");j=d.create("table",{id:"commitDiffsTable"});d.addClass(j,"commitDiffsTable");i=d.create("thead",null,j);i=d.create("tr",null,i);k=d.create("td",{colspan:3},i);d.addClass(k,"paneHeadingContainer");d.place("<span class='paneHeading'>Commit diffs</span>",k,"only");i=d.create("td",null,i);d.style(i,"textAlign","right");d.addClass(i,"paneHeadingContainer");d.place("<span id='commitDiffsCommands' class='paneHeadingToolbar'></span>",i,"only");k=d.create("tbody",null,j);if(g.Diffs!=
null)for(n=0;n<g.Diffs.length;n++){var r=g.Diffs[n];h="commitDiff"+n;i=d.create("tr");i.id="row"+h;h=d.create("td",{style:"padding-left: 5px; padding-right: 5px"},i,"last");l=d.create("span",null,h);d.addClass(l,"gitImageSprite");if(r.ChangeType==="ADD")d.addClass(l,"git-sprite-addition");else r.ChangeType==="DELETE"?d.addClass(l,"git-sprite-removal"):d.addClass(l,"git-sprite-modification");h=d.create("td",null,i,"last");d.place(document.createTextNode(r.ChangeType==="DELETE"?r.OldPath:r.NewPath),
h,"only");h=d.create("td",{id:i.id+"actions",style:"padding-left: 5px; padding-right: 5px"},i,"last");d.style(h,"whiteSpace","nowrap");d.style(h,"textAlign","right");h=d.create("span",{id:i.id+"actionsWrapper"},h,"only");d.style(h,"visibility","hidden");this.commandService.renderCommands(h,"object",g.Diffs[n],this,"image",null,n);d.connect(i,"onmouseover",i,function(){var m=d.byId(this.id+"actionsWrapper");d.style(m,"visibility","visible")});d.connect(i,"onmouseout",i,function(){var m=d.byId(this.id+
"actionsWrapper");d.style(m,"visibility","hidden")});d.place(i,k,"last")}d.place(j,this._parent);j=d.byId("commitDiffsCommands");this.commandService.renderCommands(j,"dom",this,this,"image")}}};return f}();return e});define("text!dijit/templates/TreeNode.html",function(){return'<div class="dijitTreeNode" role="presentation"\n\t><div dojoAttachPoint="rowNode" class="dijitTreeRow" role="presentation" dojoAttachEvent="onmouseenter:_onMouseEnter, onmouseleave:_onMouseLeave, onclick:_onClick, ondblclick:_onDblClick"\n\t\t><img src="${_blankGif}" alt="" dojoAttachPoint="expandoNode" class="dijitTreeExpando" role="presentation"\n\t\t/><span dojoAttachPoint="expandoNodeText" class="dijitExpandoText" role="presentation"\n\t\t></span\n\t\t><span dojoAttachPoint="contentNode"\n\t\t\tclass="dijitTreeContent" role="presentation">\n\t\t\t<img src="${_blankGif}" alt="" dojoAttachPoint="iconNode" class="dijitIcon dijitTreeIcon" role="presentation"\n\t\t\t/><span dojoAttachPoint="labelNode" class="dijitTreeLabel" role="treeitem" tabindex="-1" aria-selected="false" dojoAttachEvent="onfocus:_onLabelFocus"></span>\n\t\t</span\n\t></div>\n\t<div dojoAttachPoint="containerNode" class="dijitTreeContainer" role="presentation" style="display: none;"></div>\n</div>'});
define("text!dijit/templates/Tree.html",function(){return'<div class="dijitTree dijitTreeContainer" role="tree"\n\tdojoAttachEvent="onkeypress:_onKeyPress">\n\t<div class="dijitInline dijitTreeIndent" style="position: absolute; top: -9999px" dojoAttachPoint="indentDetector"></div>\n</div>'});
define("dijit/tree/TreeStoreModel",["dojo","dijit"],function(c,d){c.declare("dijit.tree.TreeStoreModel",null,{store:null,childrenAttrs:["children"],newItemIdAttr:"id",labelAttr:"",root:null,query:null,deferItemLoadingUntilExpand:false,constructor:function(a){c.mixin(this,a);this.connects=[];a=this.store;if(!a.getFeatures()["dojo.data.api.Identity"])throw new Error("dijit.Tree: store must support dojo.data.Identity");if(a.getFeatures()["dojo.data.api.Notification"])this.connects=this.connects.concat([c.connect(a,
"onNew",this,"onNewItem"),c.connect(a,"onDelete",this,"onDeleteItem"),c.connect(a,"onSet",this,"onSetItem")])},destroy:function(){c.forEach(this.connects,c.disconnect)},getRoot:function(a,e){this.root?a(this.root):this.store.fetch({query:this.query,onComplete:c.hitch(this,function(f){if(f.length!=1)throw new Error(this.declaredClass+": query "+c.toJson(this.query)+" returned "+f.length+" items, but must return exactly one item");this.root=f[0];a(this.root)}),onError:e})},mayHaveChildren:function(a){return c.some(this.childrenAttrs,
function(e){return this.store.hasAttribute(a,e)},this)},getChildren:function(a,e,f){var g=this.store;if(g.isItemLoaded(a)){for(var j=[],i=0;i<this.childrenAttrs.length;i++){var k=g.getValues(a,this.childrenAttrs[i]);j=j.concat(k)}var h=0;this.deferItemLoadingUntilExpand||c.forEach(j,function(n){g.isItemLoaded(n)||h++});h==0?e(j):c.forEach(j,function(n,r){g.isItemLoaded(n)||g.loadItem({item:n,onItem:function(m){j[r]=m;--h==0&&e(j)},onError:f})})}else{var l=c.hitch(this,arguments.callee);g.loadItem({item:a,
onItem:function(n){l(n,e,f)},onError:f})}},isItem:function(a){return this.store.isItem(a)},fetchItemByIdentity:function(a){this.store.fetchItemByIdentity(a)},getIdentity:function(a){return this.store.getIdentity(a)},getLabel:function(a){return this.labelAttr?this.store.getValue(a,this.labelAttr):this.store.getLabel(a)},newItem:function(a,e,f){var g={parent:e,attribute:this.childrenAttrs[0]},j;if(this.newItemIdAttr&&a[this.newItemIdAttr])this.fetchItemByIdentity({identity:a[this.newItemIdAttr],scope:this,
onItem:function(i){if(i)this.pasteItem(i,null,e,true,f);else(j=this.store.newItem(a,g))&&f!=undefined&&this.pasteItem(j,e,e,false,f)}});else(j=this.store.newItem(a,g))&&f!=undefined&&this.pasteItem(j,e,e,false,f)},pasteItem:function(a,e,f,g,j){var i=this.store,k=this.childrenAttrs[0];e&&c.forEach(this.childrenAttrs,function(l){if(i.containsValue(e,l,a)){if(!g){var n=c.filter(i.getValues(e,l),function(r){return r!=a});i.setValues(e,l,n)}k=l}});if(f)if(typeof j=="number"){var h=i.getValues(f,k).slice();
h.splice(j,0,a);i.setValues(f,k,h)}else i.setValues(f,k,i.getValues(f,k).concat(a))},onChange:function(){},onChildrenChange:function(){},onDelete:function(){},onNewItem:function(a,e){e&&this.getChildren(e.item,c.hitch(this,function(f){this.onChildrenChange(e.item,f)}))},onDeleteItem:function(a){this.onDelete(a)},onSetItem:function(a,e){c.indexOf(this.childrenAttrs,e)!=-1?this.getChildren(a,c.hitch(this,function(f){this.onChildrenChange(a,f)})):this.onChange(a)}});return d.tree.TreeStoreModel});
define("dijit/tree/ForestStoreModel",["dojo","dijit","dijit/tree/TreeStoreModel"],function(c,d){c.declare("dijit.tree.ForestStoreModel",d.tree.TreeStoreModel,{rootId:"$root$",rootLabel:"ROOT",query:null,constructor:function(a){this.root={store:this,root:true,id:a.rootId,label:a.rootLabel,children:a.rootChildren}},mayHaveChildren:function(a){return a===this.root||this.inherited(arguments)},getChildren:function(a,e,f){if(a===this.root)this.root.children?e(this.root.children):this.store.fetch({query:this.query,
onComplete:c.hitch(this,function(g){this.root.children=g;e(g)}),onError:f});else this.inherited(arguments)},isItem:function(a){return a===this.root?true:this.inherited(arguments)},fetchItemByIdentity:function(a){if(a.identity==this.root.id){var e=a.scope?a.scope:c.global;a.onItem&&a.onItem.call(e,this.root)}else this.inherited(arguments)},getIdentity:function(a){return a===this.root?this.root.id:this.inherited(arguments)},getLabel:function(a){return a===this.root?this.root.label:this.inherited(arguments)},
newItem:function(a,e){if(e===this.root){this.onNewRootItem(a);return this.store.newItem(a)}else return this.inherited(arguments)},onNewRootItem:function(){},pasteItem:function(a,e,f,g,j){if(e===this.root)g||this.onLeaveRoot(a);d.tree.TreeStoreModel.prototype.pasteItem.call(this,a,e===this.root?null:e,f===this.root?null:f,g,j);f===this.root&&this.onAddToRoot(a)},onAddToRoot:function(a){console.log(this,": item ",a," added to root")},onLeaveRoot:function(a){console.log(this,": item ",a," removed from root")},
_requeryTop:function(){var a=this.root.children||[];this.store.fetch({query:this.query,onComplete:c.hitch(this,function(e){this.root.children=e;if(a.length!=e.length||c.some(a,function(f,g){return e[g]!=f}))this.onChildrenChange(this.root,e)})})},onNewItem:function(){this._requeryTop();this.inherited(arguments)},onDeleteItem:function(a){c.indexOf(this.root.children,a)!=-1&&this._requeryTop();this.inherited(arguments)},onSetItem:function(){this._requeryTop();this.inherited(arguments)}});return d.tree.ForestStoreModel});
define("dojo/dnd/Container",["dojo","dojo/dnd/common","dojo/parser"],function(c){c.declare("dojo.dnd.Container",null,{skipForm:false,constructor:function(d,a){this.node=c.byId(d);a||(a={});this.creator=a.creator||null;this.skipForm=a.skipForm;this.parent=a.dropParent&&c.byId(a.dropParent);this.map={};this.current=null;this.containerState="";c.addClass(this.node,"dojoDndContainer");a&&a._skipStartup||this.startup();this.events=[c.connect(this.node,"onmouseover",this,"onMouseOver"),c.connect(this.node,
"onmouseout",this,"onMouseOut"),c.connect(this.node,"ondragstart",this,"onSelectStart"),c.connect(this.node,"onselectstart",this,"onSelectStart")]},creator:function(){},getItem:function(d){return this.map[d]},setItem:function(d,a){this.map[d]=a},delItem:function(d){delete this.map[d]},forInItems:function(d,a){a=a||c.global;var e=this.map,f=c.dnd._empty;for(var g in e)g in f||d.call(a,e[g],g,this);return a},clearItems:function(){this.map={}},getAllNodes:function(){return c.query("> .dojoDndItem",this.parent)},
sync:function(){var d={};this.getAllNodes().forEach(function(a){if(a.id){var e=this.getItem(a.id);if(e){d[a.id]=e;return}}else a.id=c.dnd.getUniqueId();e=a.getAttribute("dndType");var f=a.getAttribute("dndData");d[a.id]={data:f||a.innerHTML,type:e?e.split(/\s*,\s*/):["text"]}},this);this.map=d;return this},insertNodes:function(d,a,e){if(this.parent.firstChild)if(a){if(!e)e=this.parent.firstChild}else{if(e)e=e.nextSibling}else e=null;if(e)for(a=0;a<d.length;++a){var f=this._normalizedCreator(d[a]);
this.setItem(f.node.id,{data:f.data,type:f.type});this.parent.insertBefore(f.node,e)}else for(a=0;a<d.length;++a){f=this._normalizedCreator(d[a]);this.setItem(f.node.id,{data:f.data,type:f.type});this.parent.appendChild(f.node)}return this},destroy:function(){c.forEach(this.events,c.disconnect);this.clearItems();this.node=this.parent=this.current=null},markupFactory:function(d,a){d._skipStartup=true;return new c.dnd.Container(a,d)},startup:function(){if(!this.parent){this.parent=this.node;if(this.parent.tagName.toLowerCase()==
"table"){var d=this.parent.getElementsByTagName("tbody");if(d&&d.length)this.parent=d[0]}}this.defaultCreator=c.dnd._defaultCreator(this.parent);this.sync()},onMouseOver:function(d){for(var a=d.relatedTarget;a;){if(a==this.node)break;try{a=a.parentNode}catch(e){a=null}}if(!a){this._changeState("Container","Over");this.onOverEvent()}a=this._getChildByEvent(d);if(this.current!=a){this.current&&this._removeItemClass(this.current,"Over");a&&this._addItemClass(a,"Over");this.current=a}},onMouseOut:function(d){for(d=
d.relatedTarget;d;){if(d==this.node)return;try{d=d.parentNode}catch(a){d=null}}if(this.current){this._removeItemClass(this.current,"Over");this.current=null}this._changeState("Container","");this.onOutEvent()},onSelectStart:function(d){if(!this.skipForm||!c.dnd.isFormElement(d))c.stopEvent(d)},onOverEvent:function(){},onOutEvent:function(){},_changeState:function(d,a){var e="dojoDnd"+d;d=d.toLowerCase()+"State";c.replaceClass(this.node,e+a,e+this[d]);this[d]=a},_addItemClass:function(d,a){c.addClass(d,
"dojoDndItem"+a)},_removeItemClass:function(d,a){c.removeClass(d,"dojoDndItem"+a)},_getChildByEvent:function(d){if(d=d.target)for(var a=d.parentNode;a;d=a,a=d.parentNode)if(a==this.parent&&c.hasClass(d,"dojoDndItem"))return d;return null},_normalizedCreator:function(d,a){d=(this.creator||this.defaultCreator).call(this,d,a);if(!c.isArray(d.type))d.type=["text"];if(!d.node.id)d.node.id=c.dnd.getUniqueId();c.addClass(d.node,"dojoDndItem");return d}});c.dnd._createNode=function(d){if(!d)return c.dnd._createSpan;
return function(a){return c.create(d,{innerHTML:a})}};c.dnd._createTrTd=function(d){var a=c.create("tr");c.create("td",{innerHTML:d},a);return a};c.dnd._createSpan=function(d){return c.create("span",{innerHTML:d})};c.dnd._defaultCreatorNodes={ul:"li",ol:"li",div:"div",p:"div"};c.dnd._defaultCreator=function(d){d=d.tagName.toLowerCase();var a=d=="tbody"||d=="thead"?c.dnd._createTrTd:c.dnd._createNode(c.dnd._defaultCreatorNodes[d]);return function(e,f){var g=e&&c.isObject(e),j;if(g&&e.tagName&&e.nodeType&&
e.getAttribute){j=e.getAttribute("dndData")||e.innerHTML;g=(g=e.getAttribute("dndType"))?g.split(/\s*,\s*/):["text"];e=e}else{j=g&&e.data?e.data:e;g=g&&e.type?e.type:["text"];e=(f=="avatar"?c.dnd._createSpan:a)(String(j))}if(!e.id)e.id=c.dnd.getUniqueId();return{node:e,data:j,type:g}}};return c.dnd.Container});
define("dijit/tree/_dndContainer",["dojo","dijit","dojo/dnd/common","dojo/dnd/Container"],function(c,d){c.getObject("tree",true,c);d.tree._compareNodes=function(a,e){if(a===e)return 0;if("sourceIndex"in document.documentElement)return a.sourceIndex-e.sourceIndex;else if("compareDocumentPosition"in document.documentElement)return a.compareDocumentPosition(e)&2?1:-1;else if(document.createRange){var f=doc.createRange();f.setStartBefore(a);a=doc.createRange();a.setStartBefore(e);return f.compareBoundaryPoints(f.END_TO_END,
a)}else throw Error("dijit.tree._compareNodes don't know how to compare two different nodes in this browser");};c.declare("dijit.tree._dndContainer",null,{constructor:function(a,e){this.tree=a;this.node=a.domNode;c.mixin(this,e);this.map={};this.current=null;this.containerState="";c.addClass(this.node,"dojoDndContainer");this.events=[c.connect(this.node,"onmouseenter",this,"onOverEvent"),c.connect(this.node,"onmouseleave",this,"onOutEvent"),c.connect(this.tree,"_onNodeMouseEnter",this,"onMouseOver"),
c.connect(this.tree,"_onNodeMouseLeave",this,"onMouseOut"),c.connect(this.node,"ondragstart",c,"stopEvent"),c.connect(this.node,"onselectstart",c,"stopEvent")]},getItem:function(a){return{data:this.selection[a],type:["treeNode"]}},destroy:function(){c.forEach(this.events,c.disconnect);this.node=this.parent=null},onMouseOver:function(a){this.current=a},onMouseOut:function(){this.current=null},_changeState:function(a,e){var f="dojoDnd"+a;a=a.toLowerCase()+"State";c.replaceClass(this.node,f+e,f+this[a]);
this[a]=e},_addItemClass:function(a,e){c.addClass(a,"dojoDndItem"+e)},_removeItemClass:function(a,e){c.removeClass(a,"dojoDndItem"+e)},onOverEvent:function(){this._changeState("Container","Over")},onOutEvent:function(){this._changeState("Container","")}});return d.tree._dndContainer});
define("dijit/tree/_dndSelector",["dojo","dijit","dojo/dnd/common","dijit/tree/_dndContainer"],function(c,d){c.declare("dijit.tree._dndSelector",d.tree._dndContainer,{constructor:function(){this.selection={};this.anchor=null;d.setWaiState(this.tree.domNode,"multiselect",!this.singular);this.events.push(c.connect(this.tree.domNode,"onmousedown",this,"onMouseDown"),c.connect(this.tree.domNode,"onmouseup",this,"onMouseUp"),c.connect(this.tree.domNode,"onmousemove",this,"onMouseMove"))},singular:false,
getSelectedTreeNodes:function(){var a=[],e=this.selection;for(var f in e)a.push(e[f]);return a},selectNone:function(){this.setSelection([]);return this},destroy:function(){this.inherited(arguments);this.selection=this.anchor=null},addTreeNode:function(a,e){this.setSelection(this.getSelectedTreeNodes().concat([a]));if(e)this.anchor=a;return a},removeTreeNode:function(a){this.setSelection(this._setDifference(this.getSelectedTreeNodes(),[a]));return a},isTreeNodeSelected:function(a){return a.id&&!!this.selection[a.id]},
setSelection:function(a){var e=this.getSelectedTreeNodes();c.forEach(this._setDifference(e,a),c.hitch(this,function(f){f.setSelected(false);this.anchor==f&&delete this.anchor;delete this.selection[f.id]}));c.forEach(this._setDifference(a,e),c.hitch(this,function(f){f.setSelected(true);this.selection[f.id]=f}));this._updateSelectionProperties()},_setDifference:function(a,e){c.forEach(e,function(f){f.__exclude__=true});a=c.filter(a,function(f){return!f.__exclude__});c.forEach(e,function(f){delete f.__exclude__});
return a},_updateSelectionProperties:function(){var a=this.getSelectedTreeNodes(),e=[],f=[];c.forEach(a,function(g){f.push(g);e.push(g.getTreePath())});a=c.map(f,function(g){return g.item});this.tree._set("paths",e);this.tree._set("path",e[0]||[]);this.tree._set("selectedNodes",f);this.tree._set("selectedNode",f[0]||null);this.tree._set("selectedItems",a);this.tree._set("selectedItem",a[0]||null)},onMouseDown:function(a){if(!(!this.current||this.tree.isExpandoNode(a.target,this.current)))if(a.button!=
c.mouseButtons.RIGHT){c.stopEvent(a);var e=this.current,f=c.isCopyKey(a),g=e.id;if(!this.singular&&!a.shiftKey&&this.selection[g])this._doDeselect=true;else{this._doDeselect=false;this.userSelect(e,f,a.shiftKey)}}},onMouseUp:function(a){if(this._doDeselect){this._doDeselect=false;this.userSelect(this.current,c.isCopyKey(a),a.shiftKey)}},onMouseMove:function(){this._doDeselect=false},userSelect:function(a,e,f){if(this.singular)if(this.anchor==a&&e)this.selectNone();else{this.setSelection([a]);this.anchor=
a}else if(f&&this.anchor){f=this.anchor;if(d.tree._compareNodes(this.anchor.rowNode,a.rowNode)<0){e=f;a=a}else{e=a;a=f}for(nodes=[];e!=a;){nodes.push(e);e=this.tree._getNextNode(e)}nodes.push(a);this.setSelection(nodes)}else if(this.selection[a.id]&&e)this.removeTreeNode(a);else if(e)this.addTreeNode(a,true);else{this.setSelection([a]);this.anchor=a}},forInSelectedItems:function(a,e){e=e||c.global;for(var f in this.selection)a.call(e,this.getItem(f),f,this)}});return d.tree._dndSelector});
define("dijit/Tree",["dojo","dijit","text!dijit/templates/TreeNode.html","text!dijit/templates/Tree.html","dojo/fx","dojo/DeferredList","dijit/_Widget","dijit/_Templated","dijit/_Container","dijit/_Contained","dijit/_CssStateMixin","dojo/cookie","dijit/tree/TreeStoreModel","dijit/tree/ForestStoreModel","dijit/tree/_dndSelector"],function(c,d){c.declare("dijit._TreeNode",[d._Widget,d._Templated,d._Container,d._Contained,d._CssStateMixin],{item:null,isTreeNode:true,label:"",isExpandable:null,isExpanded:false,
state:"UNCHECKED",templateString:c.cache("dijit","templates/TreeNode.html"),baseClass:"dijitTreeNode",cssStateNodes:{rowNode:"dijitTreeRow",labelNode:"dijitTreeLabel"},attributeMap:c.delegate(d._Widget.prototype.attributeMap,{label:{node:"labelNode",type:"innerText"},tooltip:{node:"rowNode",type:"attribute",attribute:"title"}}),buildRendering:function(){this.inherited(arguments);this._setExpando();this._updateItemClasses(this.item);this.isExpandable&&d.setWaiState(this.labelNode,"expanded",this.isExpanded);
this.setSelected(false)},_setIndentAttr:function(a){var e=Math.max(a,0)*this.tree._nodePixelIndent+"px";c.style(this.domNode,"backgroundPosition",e+" 0px");c.style(this.rowNode,this.isLeftToRight()?"paddingLeft":"paddingRight",e);c.forEach(this.getChildren(),function(f){f.set("indent",a+1)});this._set("indent",a)},markProcessing:function(){this.state="LOADING";this._setExpando(true)},unmarkProcessing:function(){this._setExpando(false)},_updateItemClasses:function(a){var e=this.tree,f=e.model;if(e._v10Compat&&
a===f.root)a=null;this._applyClassAndStyle(a,"icon","Icon");this._applyClassAndStyle(a,"label","Label");this._applyClassAndStyle(a,"row","Row")},_applyClassAndStyle:function(a,e,f){var g="_"+e+"Class";e=e+"Node";var j=this[g];this[g]=this.tree["get"+f+"Class"](a,this.isExpanded);c.replaceClass(this[e],this[g]||"",j||"");c.style(this[e],this.tree["get"+f+"Style"](a,this.isExpanded)||{})},_updateLayout:function(){var a=this.getParent();!a||a.rowNode.style.display=="none"?c.addClass(this.domNode,"dijitTreeIsRoot"):
c.toggleClass(this.domNode,"dijitTreeIsLast",!this.getNextSibling())},_setExpando:function(a){var e=["dijitTreeExpandoLoading","dijitTreeExpandoOpened","dijitTreeExpandoClosed","dijitTreeExpandoLeaf"],f=["*","-","+","*"];a=a?0:this.isExpandable?this.isExpanded?1:2:3;c.replaceClass(this.expandoNode,e[a],e);this.expandoNodeText.innerHTML=f[a]},expand:function(){if(this._expandDeferred)return this._expandDeferred;this._wipeOut&&this._wipeOut.stop();this.isExpanded=true;d.setWaiState(this.labelNode,"expanded",
"true");if(this.tree.showRoot||this!==this.tree.rootNode)d.setWaiRole(this.containerNode,"group");c.addClass(this.contentNode,"dijitTreeContentExpanded");this._setExpando();this._updateItemClasses(this.item);this==this.tree.rootNode&&d.setWaiState(this.tree.domNode,"expanded","true");var a,e=c.fx.wipeIn({node:this.containerNode,duration:d.defaultDuration,onEnd:function(){a.callback(true)}});a=this._expandDeferred=new c.Deferred(function(){e.stop()});e.play();return a},collapse:function(){if(this.isExpanded){if(this._expandDeferred){this._expandDeferred.cancel();
delete this._expandDeferred}this.isExpanded=false;d.setWaiState(this.labelNode,"expanded","false");this==this.tree.rootNode&&d.setWaiState(this.tree.domNode,"expanded","false");c.removeClass(this.contentNode,"dijitTreeContentExpanded");this._setExpando();this._updateItemClasses(this.item);if(!this._wipeOut)this._wipeOut=c.fx.wipeOut({node:this.containerNode,duration:d.defaultDuration});this._wipeOut.play()}},indent:0,setChildItems:function(a){var e=this.tree,f=e.model,g=[];c.forEach(this.getChildren(),
function(j){d._Container.prototype.removeChild.call(this,j)},this);this.state="LOADED";if(a&&a.length>0){this.isExpandable=true;c.forEach(a,function(j){var i=f.getIdentity(j),k=e._itemNodesMap[i],h;if(k)for(var l=0;l<k.length;l++)if(k[l]&&!k[l].getParent()){h=k[l];h.set("indent",this.indent+1);break}if(!h){h=this.tree._createTreeNode({item:j,tree:e,isExpandable:f.mayHaveChildren(j),label:e.getLabel(j),tooltip:e.getTooltip(j),dir:e.dir,lang:e.lang,indent:this.indent+1});if(k)k.push(h);else e._itemNodesMap[i]=
[h]}this.addChild(h);if(this.tree.autoExpand||this.tree._state(j))g.push(e._expandNode(h))},this);c.forEach(this.getChildren(),function(j){j._updateLayout()})}else this.isExpandable=false;this._setExpando&&this._setExpando(false);this._updateItemClasses(this.item);if(this==e.rootNode)if(a=this.tree.showRoot?this:this.getChildren()[0]){a.setFocusable(true);e.lastFocused=a}else e.domNode.setAttribute("tabIndex","0");return new c.DeferredList(g)},getTreePath:function(){for(var a=this,e=[];a&&a!==this.tree.rootNode;){e.unshift(a.item);
a=a.getParent()}e.unshift(this.tree.rootNode.item);return e},getIdentity:function(){return this.tree.model.getIdentity(this.item)},removeChild:function(){this.inherited(arguments);var a=this.getChildren();if(a.length==0){this.isExpandable=false;this.collapse()}c.forEach(a,function(e){e._updateLayout()})},makeExpandable:function(){this.isExpandable=true;this._setExpando(false)},_onLabelFocus:function(){this.tree._onNodeFocus(this)},setSelected:function(a){d.setWaiState(this.labelNode,"selected",a);
c.toggleClass(this.rowNode,"dijitTreeRowSelected",a)},setFocusable:function(a){this.labelNode.setAttribute("tabIndex",a?"0":"-1")},_onClick:function(a){this.tree._onClick(this,a)},_onDblClick:function(a){this.tree._onDblClick(this,a)},_onMouseEnter:function(a){this.tree._onNodeMouseEnter(this,a)},_onMouseLeave:function(a){this.tree._onNodeMouseLeave(this,a)}});c.declare("dijit.Tree",[d._Widget,d._Templated],{store:null,model:null,query:null,label:"",showRoot:true,childrenAttr:["children"],paths:[],
path:[],selectedItems:null,selectedItem:null,openOnClick:false,openOnDblClick:false,templateString:c.cache("dijit","templates/Tree.html"),persist:true,autoExpand:false,dndController:"dijit.tree._dndSelector",dndParams:["onDndDrop","itemCreator","onDndCancel","checkAcceptance","checkItemAcceptance","dragThreshold","betweenThreshold"],onDndDrop:null,itemCreator:null,onDndCancel:null,checkAcceptance:null,checkItemAcceptance:null,dragThreshold:5,betweenThreshold:0,_nodePixelIndent:19,_publish:function(a,
e){c.publish(this.id,[c.mixin({tree:this,event:a},e||{})])},postMixInProperties:function(){this.tree=this;if(this.autoExpand)this.persist=false;this._itemNodesMap={};if(!this.cookieName)this.cookieName=this.id+"SaveStateCookie";this._loadDeferred=new c.Deferred;this.inherited(arguments)},postCreate:function(){this._initState();this.model||this._store2model();this.connect(this.model,"onChange","_onItemChange");this.connect(this.model,"onChildrenChange","_onItemChildrenChange");this.connect(this.model,
"onDelete","_onItemDelete");this._load();this.inherited(arguments);if(this.dndController){if(c.isString(this.dndController))this.dndController=c.getObject(this.dndController);for(var a={},e=0;e<this.dndParams.length;e++)if(this[this.dndParams[e]])a[this.dndParams[e]]=this[this.dndParams[e]];this.dndController=new this.dndController(this,a)}},_store2model:function(){this._v10Compat=true;c.deprecated("Tree: from version 2.0, should specify a model object rather than a store/query");var a={id:this.id+
"_ForestStoreModel",store:this.store,query:this.query,childrenAttrs:this.childrenAttr};if(this.params.mayHaveChildren)a.mayHaveChildren=c.hitch(this,"mayHaveChildren");if(this.params.getItemChildren)a.getChildren=c.hitch(this,function(e,f,g){this.getItemChildren(this._v10Compat&&e===this.model.root?null:e,f,g)});this.model=new d.tree.ForestStoreModel(a);this.showRoot=Boolean(this.label)},onLoad:function(){},_load:function(){this.model.getRoot(c.hitch(this,function(a){var e=this.rootNode=this.tree._createTreeNode({item:a,
tree:this,isExpandable:true,label:this.label||this.getLabel(a),indent:this.showRoot?0:-1});if(!this.showRoot){e.rowNode.style.display="none";d.setWaiRole(this.domNode,"presentation");d.setWaiRole(e.labelNode,"presentation");d.setWaiRole(e.containerNode,"tree")}this.domNode.appendChild(e.domNode);a=this.model.getIdentity(a);if(this._itemNodesMap[a])this._itemNodesMap[a].push(e);else this._itemNodesMap[a]=[e];e._updateLayout();this._expandNode(e).addCallback(c.hitch(this,function(){this._loadDeferred.callback(true);
this.onLoad()}))}),function(a){console.error(this,": error loading root: ",a)})},getNodesByItem:function(a){if(!a)return[];return[].concat(this._itemNodesMap[c.isString(a)?a:this.model.getIdentity(a)])},_setSelectedItemAttr:function(a){this.set("selectedItems",[a])},_setSelectedItemsAttr:function(a){var e=this;this._loadDeferred.addCallback(c.hitch(this,function(){var f=c.map(a,function(j){return!j||c.isString(j)?j:e.model.getIdentity(j)}),g=[];c.forEach(f,function(j){g=g.concat(e._itemNodesMap[j]||
[])});this.set("selectedNodes",g)}))},_setPathAttr:function(a){return a.length?this.set("paths",[a]):this.set("paths",[])},_setPathsAttr:function(a){function e(j,i,k){var h=j.shift(),l=c.filter(i,function(n){return n.getIdentity()==h})[0];if(l)j.length?g._expandNode(l).addCallback(function(){e(j,l.getChildren(),k)}):k.callback(l);else k.errback("Could not expand path at "+h)}function f(j){g.set("selectedNodes",c.map(c.filter(j,function(i){return i[0]}),function(i){return i[1]}))}var g=this;return(new c.DeferredList(c.map(a,
function(j){var i=new c.Deferred;j=c.map(j,function(k){return c.isString(k)?k:g.model.getIdentity(k)});j.length?g._loadDeferred.addCallback(function(){e(j,[g.rootNode],i)}):i.errback("Empty path");return i}))).addCallback(f)},_setSelectedNodeAttr:function(a){this.set("selectedNodes",[a])},_setSelectedNodesAttr:function(a){this._loadDeferred.addCallback(c.hitch(this,function(){this.dndController.setSelection(a)}))},mayHaveChildren:function(){},getItemChildren:function(){},getLabel:function(a){return this.model.getLabel(a)},
getIconClass:function(a,e){return!a||this.model.mayHaveChildren(a)?e?"dijitFolderOpened":"dijitFolderClosed":"dijitLeaf"},getLabelClass:function(){},getRowClass:function(){},getIconStyle:function(){},getLabelStyle:function(){},getRowStyle:function(){},getTooltip:function(){return""},_onKeyPress:function(a){if(!a.altKey){var e=c.keys,f=d.getEnclosingWidget(a.target);if(f){var g=a.charOrCode;if(typeof g=="string"&&g!=" "){if(!a.altKey&&!a.ctrlKey&&!a.shiftKey&&!a.metaKey){this._onLetterKeyNav({node:f,
key:g.toLowerCase()});c.stopEvent(a)}}else{if(this._curSearch){clearTimeout(this._curSearch.timer);delete this._curSearch}var j=this._keyHandlerMap;if(!j){j={};j[e.ENTER]="_onEnterKey";j[e.SPACE]=j[" "]="_onEnterKey";j[this.isLeftToRight()?e.LEFT_ARROW:e.RIGHT_ARROW]="_onLeftArrow";j[this.isLeftToRight()?e.RIGHT_ARROW:e.LEFT_ARROW]="_onRightArrow";j[e.UP_ARROW]="_onUpArrow";j[e.DOWN_ARROW]="_onDownArrow";j[e.HOME]="_onHomeKey";j[e.END]="_onEndKey";this._keyHandlerMap=j}if(this._keyHandlerMap[g]){this[this._keyHandlerMap[g]]({node:f,
item:f.item,evt:a});c.stopEvent(a)}}}}},_onEnterKey:function(a){this._publish("execute",{item:a.item,node:a.node});this.dndController.userSelect(a.node,c.isCopyKey(a.evt),a.evt.shiftKey);this.onClick(a.item,a.node,a.evt)},_onDownArrow:function(a){(a=this._getNextNode(a.node))&&a.isTreeNode&&this.focusNode(a)},_onUpArrow:function(a){a=a.node;var e=a.getPreviousSibling();if(e)for(a=e;a.isExpandable&&a.isExpanded&&a.hasChildren();){a=a.getChildren();a=a[a.length-1]}else{e=a.getParent();!this.showRoot&&
e===this.rootNode||(a=e)}a&&a.isTreeNode&&this.focusNode(a)},_onRightArrow:function(a){a=a.node;if(a.isExpandable&&!a.isExpanded)this._expandNode(a);else if(a.hasChildren())(a=a.getChildren()[0])&&a.isTreeNode&&this.focusNode(a)},_onLeftArrow:function(a){a=a.node;if(a.isExpandable&&a.isExpanded)this._collapseNode(a);else(a=a.getParent())&&a.isTreeNode&&!(!this.showRoot&&a===this.rootNode)&&this.focusNode(a)},_onHomeKey:function(){var a=this._getRootOrFirstNode();a&&this.focusNode(a)},_onEndKey:function(){for(var a=
this.rootNode;a.isExpanded;){a=a.getChildren();a=a[a.length-1]}a&&a.isTreeNode&&this.focusNode(a)},multiCharSearchDuration:250,_onLetterKeyNav:function(a){var e=this._curSearch;if(e){e.pattern+=a.key;clearTimeout(e.timer)}else e=this._curSearch={pattern:a.key,startNode:a.node};var f=this;e.timer=setTimeout(function(){delete f._curSearch},this.multiCharSearchDuration);a=e.startNode;do(a=this._getNextNode(a))||(a=this._getRootOrFirstNode());while(a!==e.startNode&&a.label.toLowerCase().substr(0,e.pattern.length)!=
e.pattern);a&&a.isTreeNode&&a!==e.startNode&&this.focusNode(a)},isExpandoNode:function(a,e){return c.isDescendant(a,e.expandoNode)},_onClick:function(a,e){var f=this.isExpandoNode(e.target,a);if(this.openOnClick&&a.isExpandable||f)a.isExpandable&&this._onExpandoClick({node:a});else{this._publish("execute",{item:a.item,node:a,evt:e});this.onClick(a.item,a,e);this.focusNode(a)}c.stopEvent(e)},_onDblClick:function(a,e){var f=e.target;f=f==a.expandoNode||f==a.expandoNodeText;if(this.openOnDblClick&&a.isExpandable||
f)a.isExpandable&&this._onExpandoClick({node:a});else{this._publish("execute",{item:a.item,node:a,evt:e});this.onDblClick(a.item,a,e);this.focusNode(a)}c.stopEvent(e)},_onExpandoClick:function(a){a=a.node;this.focusNode(a);a.isExpanded?this._collapseNode(a):this._expandNode(a)},onClick:function(){},onDblClick:function(){},onOpen:function(){},onClose:function(){},_getNextNode:function(a){if(a.isExpandable&&a.isExpanded&&a.hasChildren())return a.getChildren()[0];else{for(;a&&a.isTreeNode;){var e=a.getNextSibling();
if(e)return e;a=a.getParent()}return null}},_getRootOrFirstNode:function(){return this.showRoot?this.rootNode:this.rootNode.getChildren()[0]},_collapseNode:function(a){a._expandNodeDeferred&&delete a._expandNodeDeferred;if(a.isExpandable)if(a.state!="LOADING"){a.collapse();this.onClose(a.item,a);if(a.item){this._state(a.item,false);this._saveState()}}},_expandNode:function(a,e){if(a._expandNodeDeferred&&!e)return a._expandNodeDeferred;e=this.model;var f=a.item,g=this;switch(a.state){case "UNCHECKED":a.markProcessing();
var j=a._expandNodeDeferred=new c.Deferred;e.getChildren(f,function(i){a.unmarkProcessing();i=a.setChildItems(i);var k=g._expandNode(a,true);i.addCallback(function(){k.addCallback(function(){j.callback()})})},function(i){console.error(g,": error loading root children: ",i)});break;default:j=a._expandNodeDeferred=a.expand();this.onOpen(a.item,a);if(f){this._state(f,true);this._saveState()}}return j},focusNode:function(a){d.focus(a.labelNode)},_onNodeFocus:function(a){if(a&&a!=this.lastFocused){this.lastFocused&&
!this.lastFocused._destroyed&&this.lastFocused.setFocusable(false);a.setFocusable(true);this.lastFocused=a}},_onNodeMouseEnter:function(){},_onNodeMouseLeave:function(){},_onItemChange:function(a){var e=this._itemNodesMap[this.model.getIdentity(a)];if(e){var f=this.getLabel(a),g=this.getTooltip(a);c.forEach(e,function(j){j.set({item:a,label:f,tooltip:g});j._updateItemClasses(a)})}},_onItemChildrenChange:function(a,e){(a=this._itemNodesMap[this.model.getIdentity(a)])&&c.forEach(a,function(f){f.setChildItems(e)})},
_onItemDelete:function(a){a=this.model.getIdentity(a);var e=this._itemNodesMap[a];if(e){c.forEach(e,function(f){this.dndController.removeTreeNode(f);var g=f.getParent();g&&g.removeChild(f);f.destroyRecursive()},this);delete this._itemNodesMap[a]}},_initState:function(){if(this.persist){var a=c.cookie(this.cookieName);this._openedItemIds={};a&&c.forEach(a.split(","),function(e){this._openedItemIds[e]=true},this)}},_state:function(a,e){if(!this.persist)return false;var f=this.model.getIdentity(a);if(arguments.length===
1)return this._openedItemIds[f];if(e)this._openedItemIds[f]=true;else delete this._openedItemIds[f]},_saveState:function(){if(this.persist){var a=[];for(var e in this._openedItemIds)a.push(e);c.cookie(this.cookieName,a.join(","),{expires:365})}},destroy:function(){if(this._curSearch){clearTimeout(this._curSearch.timer);delete this._curSearch}this.rootNode&&this.rootNode.destroyRecursive();this.dndController&&!c.isString(this.dndController)&&this.dndController.destroy();this.rootNode=null;this.inherited(arguments)},
destroyRecursive:function(){this.destroy()},resize:function(a){a&&c.marginBox(this.domNode,a);this._nodePixelIndent=c._getMarginSize(this.tree.indentDetector).w;if(this.tree.rootNode)this.tree.rootNode.set("indent",this.showRoot?0:-1)},_createTreeNode:function(a){return new d._TreeNode(a)}});return d.Tree});define("text!orion/widgets/templates/_ExplorerTreeNode.html",function(){return'<div class="dijitTreeNode" waiRole="presentation">\n\t<div dojoAttachPoint="rowNode" class="dijitTreeRow"\n\t\twaiRole="presentation"\n\t\tdojoAttachEvent="onmouseenter:_onMouseEnter, onmouseleave:_onMouseLeave, onclick:_onClick, ondblclick:_onDblClick">\n\t\t<img src="${_blankGif}" alt="" dojoAttachPoint="expandoNode" class="dijitTreeExpando" waiRole="presentation" />\n\t\t<span dojoAttachPoint="expandoNodeText" class="dijitExpandoText" waiRole="presentation"></span>\n\t\t<span dojoAttachPoint="contentNode" class="dijitTreeContent" waiRole="presentation">\n\t\t\t<img src="${_blankGif}" alt="" dojoAttachPoint="iconNode" class="dijitIcon dijitTreeIcon" waiRole="presentation" />\n\t\t\t<!-- labelNode\'s innerText will be label string --\>\n\t\t\t<span dojoAttachPoint="labelNode" class="dijitTreeLabel" wairole="treeitem" tabindex="-1" waiState="selected-false" dojoAttachEvent="onfocus:_onLabelFocus"></span>\n\t\t\t<a href="" dojoAttachPoint="followLink"><img src="${_blankGif}" alt="" dojoAttachPoint="followNode" class="dijitIcon dijitTreeIcon follow" waiRole="link"></a>\n\t\t</span>\n\t</div>\n\t<div dojoAttachPoint="containerNode" class="dijitTreeContainer"\n\t\twaiRole="presentation" style="display: none;">\n\t</div>\n</div>'});
define("orion/widgets/ExplorerTree",["dojo","dijit","dijit/Tree","text!orion/widgets/templates/_ExplorerTreeNode.html"],function(c,d){c.declare("orion.widgets._ExplorerTreeNode",[d._TreeNode],{templateString:c.cache("orion","widgets/templates/_ExplorerTreeNode.html"),_updateItemClasses:function(a){this.inherited(arguments);this._applyClassAndStyle(a,"follow","Follow");typeof this.tree.updateFollowLink==="function"&&this.tree.updateFollowLink(a,this.followLink)}});c.declare("orion.widgets.ExplorerTree",
[d.Tree],{selectedNodes:{},postCreate:function(){c.connect(this,"onMouseDown",this._eatSelectionEvent);c.connect(this.domNode,"onselectstart",this._eatSelectionEvent);this.inherited(arguments)},getFollowClass:function(){},getFollowStyle:function(){},updateFollowLink:function(){},onFollowClick:function(){},getSelectedItems:function(){var a=[];this._forEachSelectedNode(function(e,f){a.push(f.item)});return a},_getSelectedNodes:function(){var a=[];this._forEachSelectedNode(function(e,f){a.push(f)});
return a},_forEachSelectedNode:function(a){var e=this.selectedNodes;for(var f in e)e.hasOwnProperty(f)&&a(f,e[f])},_createTreeNode:function(a){return new orion.widgets._ExplorerTreeNode(a)},_eatSelectionEvent:function(a){if(c.isCopyKey(a)||a.shiftKey)c.stopEvent(a)},_onClick:function(a,e){var f=e.target,g=f===a.expandoNode||f===a.expandoNodeText;f=f===a.followNode;if(c.isCopyKey(e)){this._toggleSelectNode(a);this.focusNode(a)}else if(e.shiftKey){if(this.selectedNode){this._selectRange(this.selectedNode,
a);this.focusNode(a)}}else{if(f)this.onFollowClick(a.item,a,e);else if(this.openOnClick&&a.isExpandable||g)a.isExpandable&&this._onExpandoClick({node:a});else{this._publish("execute",{item:a.item,node:a,evt:e});this.onClick(a.item,a,e);this.focusNode(a)}!g&&!f&&this._selectNode(a)}f||c.stopEvent(e)},_onItemDelete:function(a){var e=this._itemNodesMap[this.model.getIdentity(a)];if(e){var f=this;c.forEach(e,function(g){f._removeFromSelection(g)})}this.inherited(arguments)},_getVisibleAncestor:function(a){if(!a)return null;
for(var e=a.getParent();e&&!(e.isExpandable&&e.isExpanded);){a=e;e=e.getParent()}return a},_toggleSelectNode:function(a){if(this.selectedNodes[a.get("id")]){a.setSelected(false);this._removeFromSelection(a)}else{a.setSelected(true);this._addToSelection(a)}},_addToSelection:function(a){this.selectedNodes[a.get("id")]=a},_removeFromSelection:function(a){delete this.selectedNodes[a.get("id")]},_selectRange:function(a,e){function f(i,k){var h=[];i=i;do{h.push(i);i=g._getNextNode(i)}while(i&&i!==k);if(i===
k){h.push(k);return h}return null}a=this._getVisibleAncestor(a);e=this._getVisibleAncestor(e);if(a&&e)if(a===e)this._selectNode(a);else{var g=this,j=f(a,e);if(j)this._selectNodes(j.reverse(),true);else(j=f(e,a))?this._selectNodes(j,true):console.debug("Warning: couldn't select range from "+a.label+" to "+e.label)}},_selectNode:function(a){this._selectNodes(a?[a]:null)},_selectNodes:function(a){this._forEachSelectedNode(function(g,j){j._destroyed||j.setSelected(false)});this.selectedNodes={};if(a)for(var e=
0;e<a.length;e++){var f=a[e];f.setSelected(true);this._addToSelection(f);this.selectedNode=f}}})});define("text!orion/widgets/templates/DirectoryPrompterDialog.html",function(){return'<div class="dijitDialog" tabindex="-1" waiRole="dialog" waiState="labelledby-${id}_title">\n\t<div dojoAttachPoint="titleBar" class="dijitDialogTitleBar">\n\t\t<span dojoAttachPoint="titleNode" class="dijitDialogTitle" id="${id}_title"></span>\n\t\t<span dojoAttachPoint="closeButtonNode" class="dijitDialogCloseIcon" dojoAttachEvent="onclick: onCancel" title="${buttonCancel}">\n\t\t\t<span dojoAttachPoint="closeText" class="closeText" title="${buttonCancel}">x</span>\n\t\t</span>\n\t</div>\n\t<div dojoAttachPoint="containerNode" class="dijitDialogPaneContent">\n\t\t<!-- Actual content here --\>\n\t\t\t<div style="display: table">\n\t\t\t\t<div style="display: table-row" dojoAttachPoint="messageCell">\n\t\t\t\t\t<div style="display: table-cell;"><div style="width: 25em; padding-bottom: 5px;">${message}</div></div>\n\t\t\t\t</div>\n\t\t\t\t<div style="display: table-row"> \n\n\t\t\t\t\t<div style="display: table-cell; padding: 1px; vertical-align: bottom;">\n\t\t\t\t\t\t<div dojoAttachPoint="treeContainerNode" id="${id}_treeContainerNode" dojoType="dijit.layout.BorderContainer" style="width:25em; height:25em; overflow:auto;" design="sidebar" gutters="true">\n\t\t\t\t\t\t\t<div dojoAttachPoint="treeContentPane" class="dijitDialogPaneContent" id="${id}_treeContentPane dojoType="dijit.layout.ContentPane" region="center" gutters="true">\n\t\t\t\t\t\t\t\t<div dojoAttachPoint="browseDirectoryExplorerTree" class="explorerTreeClass" id="${id}_browseDirectoryExplorerTree" style="margin-top: -3px;"></div> \n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: table-cell; padding: 1px; vertical-align: bottom;">\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: table-cell; padding: 1px; vertical-align: bottom;">\n\t\t\t\t\t</div>\n\t\t\t\t</div> \n\t\t\t\t<div style="display: table-row">\n\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t\n\t\t\t\t\t\t<button dojoAttachPoint="directoryBrowserButton" dojoType="dijit.form.Button" type="submit" value="OK" style="padding: 20 0 10 0; float: right; clear: both;">${buttonOk}\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div> <!-- end table --\>\n\t</div> <!-- content pane --\>\n</div>'});
define("orion/widgets/DirectoryPrompterDialog",["dojo","dijit","orion/util","dijit/Dialog","dijit/form/Button","orion/widgets/ExplorerTree","orion/widgets/_OrionDialogMixin","text!orion/widgets/templates/DirectoryPrompterDialog.html"],function(c,d,a){c.declare("orion.widgets.DirectoryPrompterDialog",[d.Dialog,orion.widgets._OrionDialogMixin],{treeWidget:null,treeRoot:{},widgetsInTemplate:true,templateString:c.cache("orion","widgets/templates/DirectoryPrompterDialog.html"),constructor:function(){this.inherited(arguments);
this.options=arguments[0]||{}},postMixInProperties:function(){this.inherited(arguments);this.title=this.options.title||"Choose a Folder";this.buttonOk="OK";this.message=this.options.message||""},postCreate:function(){this.inherited(arguments);this.loadFolderList("");this.message||c.style(this.messageCell,{display:"none"})},loadFolderList:function(e){e=a.makeRelative(e);this.treeRoot.Path=e;this.options.fileClient.loadWorkspace(e).then(c.hitch(this,function(f){for(var g in f)this.treeRoot[g]=f[g];
a.processNavigatorParent(this.treeRoot,f.Children);this.createTree()}))},createTree:function(){var e=new orion.widgets.DirectoryTreeModel(this.options.serviceRegistry,this.treeRoot,this.options.fileClient);this.treeWidget=new orion.widgets.ExplorerTree({id:"treeWidget",style:"width:100%; height:100%",model:e,showRoot:false,persist:true,openOnClick:false,getLabel:function(f){return f.Name},getIconClass:function(){return"folderItem"}});this.treeWidget.startup();c.byId(this.treeContentPane.id).appendChild(this.treeWidget.domNode)},
execute:function(){var e=this.treeWidget.getSelectedItems();this.onHide();this.options.func(e[0])}});orion.widgets.DirectoryTreeModel=function(){function e(f,g,j){this.registry=f;this.root=g;this.fileClient=j}e.prototype={destroy:function(){},getRoot:function(f){f(this.root)},mayHaveChildren:function(){return true},getChildren:function(f,g){if(f.children)g(f.children);else if(f.Directory!==undefined&&f.Directory===false)g([]);else f.Location?this.fileClient.fetchChildren(f.ChildrenLocation).then(c.hitch(this,
function(j){for(var i=[],k=0;k<j.length;k++)j[k].Directory&&i.push(j[k]);a.processNavigatorParent(f,i);g(i)})):g([])},getIdentity:function(f){return f.Name?f.Location:"ROOT"},getLabel:function(f){return f.Name},onChildrenChange:function(){}};return e}()});define("text!orion/git/widgets/templates/CloneGitRepositoryDialog.html",function(){return'<div class="dijitDialog" tabindex="-1" waiRole="dialog" waiState="labelledby-${id}_title">\n\t<div dojoAttachPoint="titleBar" class="dijitDialogTitleBar">\n\t\t<span dojoAttachPoint="titleNode" class="dijitDialogTitle" id="${id}_title"></span>\n\t\t<span dojoAttachPoint="closeButtonNode" class="dijitDialogCloseIcon" dojoAttachEvent="onclick: onCancel" title="${buttonCancel}">\n\t\t\t<span dojoAttachPoint="closeText" class="closeText" title="${buttonCancel}">x</span>\n\t\t</span>\n\t</div>\n\t<div dojoAttachPoint="containerNode" class="dijitDialogPaneContent">\n\t\t<!-- Actual content here --\>\n\t\t\t\t<span dojoAttachPoint="Basic">\n\t\t\t\t\t<div style="display: block; padding: 5; min-width: 120px; clear: both; float: left;">\n\t\t\t\t\t\t<label dojoAttachPoint="gitUrlLabel" for="${id}_gitUrl" style="padding-right: 10">${gitUrlLabelText}</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: block; padding: 5; width: 40em; text-align: right; float: right">\n\t\t\t\t\t\t<input dojoAttachPoint="gitUrl" id="${id}_gitUrl" style="display: inline-block; width: 100%;" value="">\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: block; padding: 5; clear: both; text-align: right;">\n\t\t\t\t\t\t<a dojoAttachPoint="advancedLink" href="javascript:">Choose target location</a>\n\t\t\t\t\t\t<a dojoAttachPoint="advancedLinkHide" href="javascript:" style="display: none">Default target location</a>\n\t\t\t\t\t</div>\n\t\t\t\t</span>\n\t\t\t\t<span dojoAttachPoint="Advanced" style="display: none;">\n\t\t\t\t\t<div style="display: block; padding: 5; min-width: 120px; clear: both; float: left;">\n\t\t\t\t\t\t<input dojoAttachPoint="isNewProject" type="radio" name="${id}_newExisting" checked value="new"/>\n\t\t\t\t\t\t<label dojoAttachPoint="gitNameLabel" for="${id}_gitName" style="padding-right: 10">${gitNameLabelText}</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: block; padding: 5; width: 40em; text-align: right; float: right">\n\t\t\t\t\t\t<input dojoAttachPoint="gitName" id="${id}_gitName" style="display: inline-block; width: 100%;" value="">\n\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t\t<div style="display: block; padding: 5; min-width: 120px; clear: both; float: left;">\n\t\t\t\t\t\t<input dojoAttachPoint="isExistingProject" type="radio" name="${id}_newExisting" value="existing"/>\n\t\t\t\t\t\t<label dojoAttachPoint="gitPathLabel" for="${id}_gitPath" style="padding-right: 10">${gitPathLabelText}</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: block; padding: 5; width: 40em; text-align: left; float: right;">\n\t\t\t\t\t\t\t<input dojoAttachPoint="gitPath" id="${id}_gitPath" type="hidden" value="">\n\t\t\t\t\t\t\t<div style="width: 30em; float: left" float="left" dojoAttachPoint="shownGitPath"></div>\n\t\t\t\t\t\t\t<div style="width: 10em; float: right; text-align: right"><a dojoAttachPoint="changeGitPath" href="javascript:">Change...</a></div>\n\t\t\t\t\t</div>\n\t\t\t\t</span>\n\t\t\t\t<div style="display: block; padding: 5; clear: both; text-align: right">\n\t\t\t\t\t<button dojoAttachPoint="cloneItemButton" dojoType="dijit.form.Button" type="submit" value="OK" style="padding: 20 0 10 0;">OK\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t</div>\n</div>'});
define("orion/git/widgets/CloneGitRepositoryDialog",["require","dojo","dijit","dijit/Dialog","orion/widgets/_OrionDialogMixin","orion/widgets/DirectoryPrompterDialog","text!orion/git/widgets/templates/CloneGitRepositoryDialog.html"],function(c,d,a){d.declare("orion.git.widgets.CloneGitRepositoryDialog",[a.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:true,templateString:d.cache("orion","git/widgets/templates/CloneGitRepositoryDialog.html"),constructor:function(){this.inherited(arguments);
this.options=arguments[0]||{}},postMixInProperties:function(){this.inherited(arguments);this.title=this.options.title?this.options.title:"Clone Git Repository";this.gitUrlLabelText="Repository URL:";this.gitPathLabelText="Existing directory:";this.gitNameLabelText="New folder:";this.advancedShown=false},postCreate:function(){this.inherited(arguments);if(this.options.advancedOnly){this.Basic.style.display="none";this.Advanced.style.display="";this.gitName.focus()}d.connect(this.changeGitPath,"onclick",
null,d.hitch(this,this.openDirectoryPickerDialog));d.connect(this.isExistingProject,"onchange",null,d.hitch(this,this.showExistingFolder));d.connect(this.gitName,"onfocus",null,d.hitch(this,this.showNewProject));d.connect(this.advancedLink,"onclick",null,d.hitch(this,this.showAdvanced));d.connect(this.advancedLinkHide,"onclick",null,d.hitch(this,this.hideAdvanced))},execute:function(){this.options.func(this.options.advancedOnly?undefined:this.gitUrl.value,this.advancedShown&&this.isNewProject.checked?
undefined:this.gitPath.value,this.advancedShown&&!this.isNewProject.checked?undefined:this.gitName.value)},showAdvanced:function(){this.advancedShown=true;this.Advanced.style.display="";this.advancedLink.style.display="none";this.advancedLinkHide.style.display=""},hideAdvanced:function(){this.advancedShown=false;this.Advanced.style.display="none";this.advancedLink.style.display="";this.advancedLinkHide.style.display="none"},showExistingFolder:function(){this.isExistingProject.checked?this.openDirectoryPickerDialog():
this.gitName.focus()},showNewProject:function(){this.isNewProject.checked=true},openDirectoryPickerDialog:function(){this.isExistingProject.checked=true;var e=new orion.widgets.DirectoryPrompterDialog({title:"Choose a Folder",serviceRegistry:this.options.serviceRegistry,fileClient:this.options.fileClient,func:d.hitch(this,function(f){if(f&&f.Location){this.gitPath.value=f.Location;this.shownGitPath.innerHTML="<a href='"+c.toUrl("navigate/table.html")+"#"+f.ChildrenLocation+"'>"+f.Name+"</a>";for(f=
f;f.parent&&!f.parent.Projects;){this.shownGitPath.innerHTML="<a href='"+c.toUrl("navigate/table.html")+"#"+f.parent.ChildrenLocation+"'>"+f.parent.Name+"</a>/"+this.shownGitPath.innerHTML;f=f.parent}}})});e.startup();e.show()}})});define("text!orion/git/widgets/templates/InitGitRepositoryDialog.html",function(){return'<div class="dijitDialog" tabindex="-1" waiRole="dialog" waiState="labelledby-${id}_title">\n\t<div dojoAttachPoint="titleBar" class="dijitDialogTitleBar">\n\t\t<span dojoAttachPoint="titleNode" class="dijitDialogTitle" id="${id}_title"></span>\n\t\t<span dojoAttachPoint="closeButtonNode" class="dijitDialogCloseIcon" dojoAttachEvent="onclick: onCancel" title="${buttonCancel}">\n\t\t\t<span dojoAttachPoint="closeText" class="closeText" title="${buttonCancel}">x</span>\n\t\t</span>\n\t</div>\n\t<div dojoAttachPoint="containerNode" class="dijitDialogPaneContent">\n\t\t<!-- Actual content here --\>\n\t\t<div style="display: table">\n\t\t\t<div style="display: table-row">\n\t\t\t\t<div style="display: table-cell; padding: 5">\n\t\t\t\t\t<label dojoAttachPoint="gitTargetLabel" for="${id}_gitTarget" style="padding-right: 10">${gitTargetLabelText}</label>\n\t\t\t\t</div>\n\t\t\t\t<div style="display: table-cell; padding: 5; width: 40em; text-align: left;">\n\t\t\t\t\t<input dojoAttachPoint="gitTarget" id="${id}_gitTarget" style="display: inline-block; width: 98%;" value="">\n\t\t\t\t\t<br><i>This is to be replaced with directory picker dialog</i>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div style="display: table-row">\n\t\t\t\t<div style="display: table-cell; padding: 5"></div>\n\t\t\t\t<div style="display: table-cell; padding: 5">\n\t\t\t\t\t<button dojoAttachPoint="cloneItemButton" dojoType="dijit.form.Button" type="submit" value="OK" style="padding: 20 0 10 0; float: right; clear: both;">OK\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>'});
define("orion/git/widgets/InitGitRepositoryDialog",["dojo","dijit","dijit/Dialog","orion/widgets/_OrionDialogMixin","text!orion/git/widgets/templates/InitGitRepositoryDialog.html"],function(c,d){c.declare("orion.git.widgets.InitGitRepositoryDialog",[d.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:true,templateString:c.cache("orion","git/widgets/templates/InitGitRepositoryDialog.html"),constructor:function(){this.inherited(arguments);this.options=arguments[0]||{}},postMixInProperties:function(){this.inherited(arguments);
this.title="Init Git Repository";this.gitTargetLabelText="Target:"},execute:function(){this.options.func(this.gitTarget.value)}})});define("text!orion/git/widgets/templates/AddRemoteDialog.html",function(){return'<div class="dijitDialog" tabindex="-1" waiRole="dialog" waiState="labelledby-${id}_title">\n\t<div dojoAttachPoint="titleBar" class="dijitDialogTitleBar">\n\t\t<span dojoAttachPoint="titleNode" class="dijitDialogTitle" id="${id}_title"></span>\n\t\t<span dojoAttachPoint="closeButtonNode" class="dijitDialogCloseIcon" dojoAttachEvent="onclick: onCancel" title="${buttonCancel}">\n\t\t\t<span dojoAttachPoint="closeText" class="closeText" title="${buttonCancel}">x</span>\n\t\t</span>\n\t</div>\n\t<div dojoAttachPoint="containerNode" class="dijitDialogPaneContent">\n\t\t<!-- Actual content here --\>\n\t\t<div style="display: table">\n\t\t\t<div style="display: table-row">\n\t\t\t\t<div style="display: table-cell; padding: 5">\n\t\t\t\t\t<label dojoAttachPoint="gitRemoteLabel" for="${id}_gitRemote" style="padding-right: 10">${gitRemoteLabelText}</label>\n\t\t\t\t</div>\n\t\t\t\t<div style="display: table-cell; padding: 5; width: 40em; text-align: left;">\n\t\t\t\t\t<input dojoAttachPoint="gitRemote" id="${id}_gitRemote" style="display: inline-block; width: 98%;" value="">\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div style="display: table-row">\n\t\t\t\t<div style="display: table-cell; padding: 5">\n\t\t\t\t\t<label dojoAttachPoint="gitRemoteURILabel" for="${id}_gitRemoteURI" style="padding-right: 10">${gitRemoteURILabelText}</label>\n\t\t\t\t</div>\n\t\t\t\t<div style="display: table-cell; padding: 5; width: 40em; text-align: left;">\n\t\t\t\t\t<input dojoAttachPoint="gitRemoteURI" id="${id}_gitRemoteURI" style="display: inline-block; width: 98%;" value="">\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div style="display: table-row">\n\t\t\t\t<div style="display: table-cell; padding: 5"></div>\n\t\t\t\t<div style="display: table-cell; padding: 5">\n\t\t\t\t\t<button dojoAttachPoint="cloneItemButton" dojoType="dijit.form.Button" type="submit" value="OK" style="padding: 20 0 10 0; float: right; clear: both;">OK\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>'});
define("orion/git/widgets/AddRemoteDialog",["dojo","dijit","dijit/Dialog","orion/widgets/_OrionDialogMixin","text!orion/git/widgets/templates/AddRemoteDialog.html"],function(c,d){c.declare("orion.git.widgets.AddRemoteDialog",[d.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:true,templateString:c.cache("orion","git/widgets/templates/AddRemoteDialog.html"),constructor:function(){this.inherited(arguments);this.options=arguments[0]||{}},postMixInProperties:function(){this.inherited(arguments);
this.title="Add Remote";this.gitRemoteLabelText="Remote Name:";this.gitRemoteURILabelText="Remote URI:"},execute:function(){this.options.func(this.gitRemote.value,this.gitRemoteURI.value)}})});define("text!orion/git/widgets/templates/GitCredentialsDialog.html",function(){return'<div class="dijitDialog" tabindex="-1" waiRole="dialog" waiState="labelledby-${id}_title">\n\t<div dojoAttachPoint="titleBar" class="dijitDialogTitleBar">\n\t\t<span dojoAttachPoint="titleNode" class="dijitDialogTitle" id="${id}_title"></span>\n\t\t<span dojoAttachPoint="closeButtonNode" class="dijitDialogCloseIcon" dojoAttachEvent="onclick: onCancel" title="${buttonCancel}">\n\t\t\t<span dojoAttachPoint="closeText" class="closeText" title="${buttonCancel}">x</span>\n\t\t</span>\n\t</div>\n\t<div dojoAttachPoint="containerNode" class="dijitDialogPaneContent">\n\t\t<!-- Actual content here --\>\n\t\t<div style="display: none; padding-top: 10px; padding-bottom: 10px;" dojoAttachPoint="gitCredentialsLabel">Provide credentials for: <b dojoAttachPoint="url"></b></div>\n\t\t<div style="display: table">\n\t\t\t<div style="display: table-row" dojoAttachPoint="gitSshUsernameRow">\n\t\t\t\t<div style="display: table-cell; padding: 5; vertical-align: top;">\n\t\t\t\t\t<label dojoAttachPoint="gitSshUsernameLabel" for="${id}_gitSshUsername" style="padding-right: 10">${gitSshUsernameLabelText}</label>\n\t\t\t\t</div>\n\t\t\t\t<div style="display: table-cell; padding: 5; width: 40em; text-align: left; vertical-align: top;">\n\t\t\t\t\t<input dojoAttachPoint="gitSshUsername" id="${id}_gitSshUsername" style="display: inline-block; width: 98%;" value="">\n\t\t\t\t</div>\n\t\t\t</div>\t\n\t\t\t<div style="display: table-row" dojoAttachPoint="gitSshPasswordRow">\n\t\t\t\t<div style="display: table-cell; padding: 5; vertical-align: top;">\n\t\t\t\t\t<input dojoAttachPoint="isSshPassword" type="radio" name="${id}_isSshPassword" checked value="password" style="width: 15px;"/>\n\t\t\t\t\t<label dojoAttachPoint="gitSshPasswordLabel" for="${id}_gitSshPassword" style="padding-right: 10">${gitSshPasswordLabelText}</label>\n\t\t\t\t</div>\n\t\t\t\t<div style="display: table-cell; padding: 5; width: 40em; text-align: left; vertical-align: top;">\n\t\t\t\t\t<input type="password" dojoAttachPoint="gitSshPassword" id="${id}_gitSshPassword" style="display: inline-block; width: 98%;" value="">\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div style="display: table-row" dojoAttachPoint="gitPrivateKeyRow">\n\t\t\t\t<div style="display: table-cell; padding: 5; vertical-align: top;">\n\t\t\t\t\t<input dojoAttachPoint="isPrivateKey" type="radio" name="${id}_isSshPassword" value="privateKey" style="width: 15px;"/>\n\t\t\t\t\t<label dojoAttachPoint="gitPrivateKeyLabel" for="${id}_gitPrivateKey" style="padding-right: 10">${gitPrivateKeyLabelText}</label>\n\t\t\t\t</div>\n\t\t\t\t<div style="display: table-cell; padding: 5; width: 40em; text-align: left; vertical-align: top;">\n\t\t\t\t\t<textarea dojoAttachPoint="gitPrivateKey" id="${id}_gitPrivateKey" style="display: inline-block; width: 98%;" value=""></textarea>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div style="display: table-row" dojoAttachPoint="gitPassphraseRow">\n\t\t\t\t<div style="display: table-cell; padding: 5; vertical-align: top;">\n\t\t\t\t\t&nbsp;\n\t\t\t\t</div>\n\t\t\t\t<div style="display: table-cell; padding: 5; width: 40em; text-align: left; vertical-align: top;">\n\t\t\t\t\t<label dojoAttachPoint="gitPassphraseLabel" for="${id}_gitPassphrase">${gitPassphraseLabelText}</label>\n\t\t\t\t</div>\n\n\t\t\t</div>\n\t\t\t<div style="display: table-row" dojoAttachPoint="gitPassphraseRow_1">\n\t\t\t\t<div style="display: table-cell; padding: 5; vertical-align: top;">\n\t\t\t\t\t&nbsp;\n\t\t\t\t</div>\n\t\t\t\t<div style="display: table-cell; padding: 5; width: 40em; text-align: left; vertical-align: top;">\n\t\t\t\t\t<input type="password" dojoAttachPoint="gitPassphrase" id="${id}_gitPassphrase" style="display: inline-block; width: 98%;" value="">\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div style="display: table-row">\n\t\t\t\t<div style="display: table-cell; padding: 5"></div>\n\t\t\t\t<div style="display: table-cell; padding: 5">\n\t\t\t\t\t<button dojoAttachPoint="okButton" dojoType="dijit.form.Button" type="submit" value="OK" style="padding: 20 0 10 0; float: right; clear: both;">Ok\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>'});
define("orion/git/widgets/GitCredentialsDialog",["dojo","dijit","dijit/Dialog","orion/widgets/_OrionDialogMixin","text!orion/git/widgets/templates/GitCredentialsDialog.html"],function(c,d){c.declare("orion.git.widgets.GitCredentialsDialog",[d.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:true,templateString:c.cache("orion","git/widgets/templates/GitCredentialsDialog.html"),constructor:function(){this.inherited(arguments);this.options=arguments[0]||{}},postMixInProperties:function(){this.inherited(arguments);
this.title=this.options.title||"Git Credentials";this.gitUrlLabelText="Repository URL:";this.gitSshUsernameLabelText="Username:";this.gitSshPasswordLabelText="Ssh password:";this.gitPrivateKeyLabelText="Private key:";this.gitPassphraseLabelText="Passphrase (optional):";if(!this.options.username&&!this.options.password&&!this.options.privatekey&&!this.options.passphrase){this.options.username=true;this.options.password=true;this.options.privatekey=true;this.options.passphrase=true}if(this.options.serviceRegistry){var a=
this;this.options.serviceRegistry.getService("orion.net.ssh").then(function(e){a._sshService=e})}},postCreate:function(){this.inherited(arguments);var a=this;this.options.username||c.style(this.gitSshUsernameRow,"display","none");this.options.password||c.style(this.gitSshPasswordRow,"display","none");this.options.privatekey||c.style(this.gitPrivateKeyRow,"display","none");if(!this.options.passphrase){c.style(this.gitPassphraseRow,"display","none");c.style(this.gitPassphraseRow_1,"display","none")}if(this.options.errordata&&
this.options.errordata.Url){c.style(this.gitCredentialsLabel,"display","block");this.url.innerHTML=this.options.errordata.Url}if(this.options.errordata&&this.options.errordata.User&&this.options.errordata.User!==""){this.gitSshUsername.value=this.options.errordata.User;c.style(this.gitSshUsernameRow,"display","none");setTimeout(function(){a.gitSshPassword.focus()},400)}c.connect(this.gitSshPassword,"onfocus",null,c.hitch(this,function(){this.isSshPassword.checked=true}));c.connect(this.gitPrivateKey,
"onfocus",null,c.hitch(this,function(){this.isPrivateKey.checked=true}));c.connect(this.gitPassphrase,"onfocus",null,c.hitch(this,function(){this.isPrivateKey.checked=true}))},execute:function(){if(this._sshService){var a=this;this._sshService.getKnownHosts().then(function(e){a.options.func({gitSshUsername:a.gitSshUsername.value,gitSshPassword:a.isSshPassword.checked?a.gitSshPassword.value:"",gitPrivateKey:a.isPrivateKey.checked?a.gitPrivateKey.value:"",gitPassphrase:a.isPrivateKey.checked?a.gitPassphrase.value:
"",knownHosts:e})})}else this.options.func({gitSshUsername:this.gitSshUsername.value,gitSshPassword:this.gitSshPassword.value,gitPrivateKey:this.gitPrivateKey.value,gitPassphrase:this.gitPassphrase.value,knownHosts:this.gitSshKnownHosts.value})}})});define("text!dijit/form/templates/CheckBox.html",function(){return'<div class="dijit dijitReset dijitInline" role="presentation"\n\t><input\n\t \t${!nameAttrSetting} type="${type}" ${checkedAttrSetting}\n\t\tclass="dijitReset dijitCheckBoxInput"\n\t\tdojoAttachPoint="focusNode"\n\t \tdojoAttachEvent="onclick:_onClick"\n/></div>'});
define("dijit/form/ToggleButton",["dojo","dijit","dijit/form/Button"],function(c,d){return d.form.ToggleButton});
define("dijit/form/CheckBox",["dojo","dijit","text!dijit/form/templates/CheckBox.html","dijit/form/ToggleButton"],function(c,d){c.declare("dijit.form.CheckBox",d.form.ToggleButton,{templateString:c.cache("dijit.form","templates/CheckBox.html"),baseClass:"dijitCheckBox",type:"checkbox",value:"on",readOnly:false,attributeMap:c.delegate(d.form._FormWidget.prototype.attributeMap,{readOnly:"focusNode"}),_setReadOnlyAttr:function(a){this._set("readOnly",a);c.attr(this.focusNode,"readOnly",a);d.setWaiState(this.focusNode,
"readonly",a)},_setValueAttr:function(a,e){if(typeof a=="string"){this._set("value",a);c.attr(this.focusNode,"value",a);a=true}this._created&&this.set("checked",a,e)},_getValueAttr:function(){return this.checked?this.value:false},_setLabelAttr:undefined,postMixInProperties:function(){if(this.value=="")this.value="on";this.checkedAttrSetting=this.checked?"checked":"";this.inherited(arguments)},_fillContent:function(){},reset:function(){this._hasBeenBlurred=false;this.set("checked",this.params.checked||
false);this._set("value",this.params.value||"on");c.attr(this.focusNode,"value",this.value)},_onFocus:function(){this.id&&c.query("label[for='"+this.id+"']").addClass("dijitFocusedLabel");this.inherited(arguments)},_onBlur:function(){this.id&&c.query("label[for='"+this.id+"']").removeClass("dijitFocusedLabel");this.inherited(arguments)},_onClick:function(a){if(this.readOnly){c.stopEvent(a);return false}return this.inherited(arguments)}});c.declare("dijit.form.RadioButton",d.form.CheckBox,{type:"radio",
baseClass:"dijitRadio",_setCheckedAttr:function(a){this.inherited(arguments);if(this._created)if(a){var e=this;c.query("INPUT[type=radio]",this.focusNode.form||c.doc).forEach(function(f){if(f.name==e.name&&f!=e.focusNode&&f.form==e.focusNode.form)(f=d.getEnclosingWidget(f))&&f.checked&&f.set("checked",false)})}},_clicked:function(){this.checked||this.set("checked",true)}});return d.form.CheckBox});
define("dijit/form/Form",["dojo","dijit","dijit/_Widget","dijit/_Templated","dijit/form/_FormMixin","dijit/layout/_ContentPaneResizeMixin"],function(c,d){c.declare("dijit.form.Form",[d._Widget,d._Templated,d.form._FormMixin,d.layout._ContentPaneResizeMixin],{name:"",action:"",method:"",encType:"","accept-charset":"",accept:"",target:"",templateString:"<form dojoAttachPoint='containerNode' dojoAttachEvent='onreset:_onReset,onsubmit:_onSubmit' ${!nameAttrSetting}></form>",attributeMap:c.delegate(d._Widget.prototype.attributeMap,
{action:"",method:"",encType:"","accept-charset":"",accept:"",target:""}),postMixInProperties:function(){this.nameAttrSetting=this.name?"name='"+this.name+"'":"";this.inherited(arguments)},execute:function(){},onExecute:function(){},_setEncTypeAttr:function(a){this.encType=a;c.attr(this.domNode,"encType",a);if(c.isIE)this.domNode.encoding=a},postCreate:function(){if(c.isIE&&this.srcNodeRef&&this.srcNodeRef.attributes){var a=this.srcNodeRef.attributes.getNamedItem("encType");a&&!a.specified&&typeof a.value==
"string"&&this.set("encType",a.value)}this.inherited(arguments)},reset:function(a){var e={returnValue:true,preventDefault:function(){this.returnValue=false},stopPropagation:function(){},currentTarget:a?a.target:this.domNode,target:a?a.target:this.domNode};this.onReset(e)!==false&&e.returnValue&&this.inherited(arguments,[])},onReset:function(){return true},_onReset:function(a){this.reset(a);c.stopEvent(a);return false},_onSubmit:function(a){var e=d.form.Form.prototype;if(this.execute!=e.execute||this.onExecute!=
e.onExecute){c.deprecated("dijit.form.Form:execute()/onExecute() are deprecated. Use onSubmit() instead.","","2.0");this.onExecute();this.execute(this.getValues())}this.onSubmit(a)===false&&c.stopEvent(a)},onSubmit:function(){return this.isValid()},submit:function(){this.onSubmit()!==false&&this.containerNode.submit()}});return d.form.Form});
define("dojo/data/util/filter",["dojo"],function(c){c.getObject("data.util.filter",true,c);c.data.util.filter.patternToRegExp=function(d,a){for(var e="^",f=null,g=0;g<d.length;g++){f=d.charAt(g);switch(f){case "\\":e+=f;g++;e+=d.charAt(g);break;case "*":e+=".*";break;case "?":e+=".";break;case "$":case "^":case "/":case "+":case ".":case "|":case "(":case ")":case "{":case "}":case "[":case "]":e+="\\";default:e+=f}}e+="$";return a?new RegExp(e,"mi"):new RegExp(e,"m")};return c.data.util.filter});
define("dojo/data/util/sorter",["dojo"],function(c){c.getObject("data.util.sorter",true,c);c.data.util.sorter.basicComparator=function(d,a){var e=-1;if(d===null)d=undefined;if(a===null)a=undefined;if(d==a)e=0;else if(d>a||d==null)e=1;return e};c.data.util.sorter.createSortFunction=function(d,a){function e(n,r,m,o){return function(p,s){p=o.getValue(p,n);s=o.getValue(s,n);return r*m(p,s)}}for(var f=[],g,j=a.comparatorMap,i=c.data.util.sorter.basicComparator,k=0;k<d.length;k++){g=d[k];var h=g.attribute;
if(h){g=g.descending?-1:1;var l=i;if(j){if(typeof h!=="string"&&"toString"in h)h=h.toString();l=j[h]||i}f.push(e(h,g,l,a))}}return function(n,r){for(var m=0;m<f.length;){var o=f[m++](n,r);if(o!==0)return o}return 0}};return c.data.util.sorter});
define("dojo/data/util/simpleFetch",["dojo","dojo/data/util/sorter"],function(c){c.getObject("data.util.simpleFetch",true,c);c.data.util.simpleFetch.fetch=function(d){d=d||{};if(!d.store)d.store=this;var a=this,e=function(g,j){if(j.onError)j.onError.call(j.scope||c.global,g,j)},f=function(g,j){var i=j.abort||null,k=false,h=j.start?j.start:0,l=j.count&&j.count!==Infinity?h+j.count:g.length;j.abort=function(){k=true;i&&i.call(j)};var n=j.scope||c.global;if(!j.store)j.store=a;j.onBegin&&j.onBegin.call(n,
g.length,j);j.sort&&g.sort(c.data.util.sorter.createSortFunction(j.sort,a));if(j.onItem)for(var r=h;r<g.length&&r<l;++r){var m=g[r];k||j.onItem.call(n,m,j)}if(j.onComplete&&!k){r=null;j.onItem||(r=g.slice(h,l));j.onComplete.call(n,r,j)}};this._fetchItems(d,f,e);return d};return c.data.util.simpleFetch});
define("dojo/data/ItemFileReadStore",["dojo","dojo/data/util/filter","dojo/data/util/simpleFetch","dojo/date/stamp"],function(c){c.declare("dojo.data.ItemFileReadStore",null,{constructor:function(d){this._arrayOfAllItems=[];this._arrayOfTopLevelItems=[];this._loadFinished=false;this.url=this._ccUrl=this._jsonFileUrl=d.url;this._jsonData=d.data;this.data=null;this._datatypeMap=d.typeMap||{};this._datatypeMap.Date||(this._datatypeMap.Date={type:Date,deserialize:function(a){return c.date.stamp.fromISOString(a)}});
this._features={"dojo.data.api.Read":true,"dojo.data.api.Identity":true};this._itemsByIdentity=null;this._storeRefPropName="_S";this._itemNumPropName="_0";this._rootItemPropName="_RI";this._reverseRefMap="_RRM";this._loadInProgress=false;this._queuedFetches=[];if(d.urlPreventCache!==undefined)this.urlPreventCache=d.urlPreventCache?true:false;if(d.hierarchical!==undefined)this.hierarchical=d.hierarchical?true:false;if(d.clearOnClose)this.clearOnClose=true;if("failOk"in d)this.failOk=d.failOk?true:
false},url:"",_ccUrl:"",data:null,typeMap:null,clearOnClose:false,urlPreventCache:false,failOk:false,hierarchical:true,_assertIsItem:function(d){if(!this.isItem(d))throw new Error("dojo.data.ItemFileReadStore: Invalid item argument.");},_assertIsAttribute:function(d){if(typeof d!=="string")throw new Error("dojo.data.ItemFileReadStore: Invalid attribute argument.");},getValue:function(d,a,e){d=this.getValues(d,a);return d.length>0?d[0]:e},getValues:function(d,a){this._assertIsItem(d);this._assertIsAttribute(a);
return(d[a]||[]).slice(0)},getAttributes:function(d){this._assertIsItem(d);var a=[];for(var e in d)e!==this._storeRefPropName&&e!==this._itemNumPropName&&e!==this._rootItemPropName&&e!==this._reverseRefMap&&a.push(e);return a},hasAttribute:function(d,a){this._assertIsItem(d);this._assertIsAttribute(a);return a in d},containsValue:function(d,a,e){var f=undefined;if(typeof e==="string")f=c.data.util.filter.patternToRegExp(e,false);return this._containsValue(d,a,e,f)},_containsValue:function(d,a,e,f){return c.some(this.getValues(d,
a),function(g){if(g!==null&&!c.isObject(g)&&f){if(g.toString().match(f))return true}else if(e===g)return true})},isItem:function(d){if(d&&d[this._storeRefPropName]===this)if(this._arrayOfAllItems[d[this._itemNumPropName]]===d)return true;return false},isItemLoaded:function(d){return this.isItem(d)},loadItem:function(d){this._assertIsItem(d.item)},getFeatures:function(){return this._features},getLabel:function(d){if(this._labelAttr&&this.isItem(d))return this.getValue(d,this._labelAttr)},getLabelAttributes:function(){if(this._labelAttr)return[this._labelAttr];
return null},_fetchItems:function(d,a,e){var f=this,g=function(h,l){var n=[],r,m;if(h.query){var o;r=h.queryOptions?h.queryOptions.ignoreCase:false;var p={};for(m in h.query){o=h.query[m];if(typeof o==="string")p[m]=c.data.util.filter.patternToRegExp(o,r);else if(o instanceof RegExp)p[m]=o}for(r=0;r<l.length;++r){var s=true,q=l[r];if(q===null)s=false;else for(m in h.query){o=h.query[m];f._containsValue(q,m,o,p[m])||(s=false)}s&&n.push(q)}}else for(r=0;r<l.length;++r){m=l[r];m!==null&&n.push(m)}a(n,
h)};if(this._loadFinished)g(d,this._getItemsArray(d.queryOptions));else{if(this._jsonFileUrl!==this._ccUrl){c.deprecated("dojo.data.ItemFileReadStore: ","To change the url, set the url property of the store, not _jsonFileUrl.  _jsonFileUrl support will be removed in 2.0");this.url=this._ccUrl=this._jsonFileUrl}else if(this.url!==this._ccUrl)this._ccUrl=this._jsonFileUrl=this.url;if(this.data!=null){this._jsonData=this.data;this.data=null}if(this._jsonFileUrl)if(this._loadInProgress)this._queuedFetches.push({args:d,
filter:g});else{this._loadInProgress=true;var j=c.xhrGet({url:f._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache,failOk:this.failOk});j.addCallback(function(h){try{f._getItemsFromLoadedData(h);f._loadFinished=true;f._loadInProgress=false;g(d,f._getItemsArray(d.queryOptions));f._handleQueuedFetches()}catch(l){f._loadFinished=true;f._loadInProgress=false;e(l,d)}});j.addErrback(function(h){f._loadInProgress=false;e(h,d)});var i=null;if(d.abort)i=d.abort;d.abort=function(){j&&
j.fired===-1&&j.cancel();i&&i.call(d)}}else if(this._jsonData)try{this._loadFinished=true;this._getItemsFromLoadedData(this._jsonData);this._jsonData=null;g(d,this._getItemsArray(d.queryOptions))}catch(k){e(k,d)}else e(new Error("dojo.data.ItemFileReadStore: No JSON source data was provided as either URL or a nested Javascript object."),d)}},_handleQueuedFetches:function(){if(this._queuedFetches.length>0){for(var d=0;d<this._queuedFetches.length;d++){var a=this._queuedFetches[d],e=a.args;(a=a.filter)?
a(e,this._getItemsArray(e.queryOptions)):this.fetchItemByIdentity(e)}this._queuedFetches=[]}},_getItemsArray:function(d){if(d&&d.deep)return this._arrayOfAllItems;return this._arrayOfTopLevelItems},close:function(){if(this.clearOnClose&&this._loadFinished&&!this._loadInProgress){if((this._jsonFileUrl==""||this._jsonFileUrl==null)&&(this.url==""||this.url==null)&&this.data==null)console.debug("dojo.data.ItemFileReadStore: WARNING!  Data reload  information has not been provided.  Please set 'url' or 'data' to the appropriate value before the next fetch");
this._arrayOfAllItems=[];this._arrayOfTopLevelItems=[];this._loadFinished=false;this._itemsByIdentity=null;this._loadInProgress=false;this._queuedFetches=[]}},_getItemsFromLoadedData:function(d){function a(p){return p!==null&&typeof p==="object"&&(!c.isArray(p)||f)&&!c.isFunction(p)&&(p.constructor==Object||c.isArray(p))&&typeof p._reference==="undefined"&&typeof p._type==="undefined"&&typeof p._value==="undefined"&&g.hierarchical}function e(p){g._arrayOfAllItems.push(p);for(var s in p){var q=p[s];
if(q)if(c.isArray(q))for(var u=0;u<q.length;++u){var y=q[u];a(y)&&e(y)}else a(q)&&e(q)}}var f=false,g=this;this._labelAttr=d.label;var j,i;this._arrayOfAllItems=[];this._arrayOfTopLevelItems=d.items;for(j=0;j<this._arrayOfTopLevelItems.length;++j){i=this._arrayOfTopLevelItems[j];if(c.isArray(i))f=true;e(i);i[this._rootItemPropName]=true}var k={},h;for(j=0;j<this._arrayOfAllItems.length;++j){i=this._arrayOfAllItems[j];for(h in i){if(h!==this._rootItemPropName){var l=i[h];if(l!==null)c.isArray(l)||
(i[h]=[l]);else i[h]=[null]}k[h]=h}}for(;k[this._storeRefPropName];)this._storeRefPropName+="_";for(;k[this._itemNumPropName];)this._itemNumPropName+="_";for(;k[this._reverseRefMap];)this._reverseRefMap+="_";if(k=d.identifier){this._itemsByIdentity={};this._features["dojo.data.api.Identity"]=k;for(j=0;j<this._arrayOfAllItems.length;++j){i=this._arrayOfAllItems[j];d=i[k];d=d[0];if(Object.hasOwnProperty.call(this._itemsByIdentity,d))if(this._jsonFileUrl)throw new Error("dojo.data.ItemFileReadStore:  The json data as specified by: ["+
this._jsonFileUrl+"] is malformed.  Items within the list have identifier: ["+k+"].  Value collided: ["+d+"]");else{if(this._jsonData)throw new Error("dojo.data.ItemFileReadStore:  The json data provided by the creation arguments is malformed.  Items within the list have identifier: ["+k+"].  Value collided: ["+d+"]");}else this._itemsByIdentity[d]=i}}else this._features["dojo.data.api.Identity"]=Number;for(j=0;j<this._arrayOfAllItems.length;++j){i=this._arrayOfAllItems[j];i[this._storeRefPropName]=
this;i[this._itemNumPropName]=j}for(j=0;j<this._arrayOfAllItems.length;++j){i=this._arrayOfAllItems[j];for(h in i){d=i[h];for(k=0;k<d.length;++k){l=d[k];if(l!==null&&typeof l=="object"){if("_type"in l&&"_value"in l){var n=l._type,r=this._datatypeMap[n];if(r)if(c.isFunction(r))d[k]=new r(l._value);else if(c.isFunction(r.deserialize))d[k]=r.deserialize(l._value);else throw new Error("dojo.data.ItemFileReadStore: Value provided in typeMap was neither a constructor, nor a an object with a deserialize function");
else throw new Error("dojo.data.ItemFileReadStore: in the typeMap constructor arg, no object class was specified for the datatype '"+n+"'");}if(l._reference){l=l._reference;if(c.isObject(l))for(n=0;n<this._arrayOfAllItems.length;++n){r=this._arrayOfAllItems[n];var m=true;for(var o in l)if(r[o]!=l[o])m=false;if(m)d[k]=r}else d[k]=this._getItemByIdentity(l);if(this.referenceIntegrity){l=d[k];this.isItem(l)&&this._addReferenceToMap(l,i,h)}}else this.isItem(l)&&this.referenceIntegrity&&this._addReferenceToMap(l,
i,h)}}}}},_addReferenceToMap:function(){},getIdentity:function(d){var a=this._features["dojo.data.api.Identity"];if(a===Number)return d[this._itemNumPropName];else if(d=d[a])return d[0];return null},fetchItemByIdentity:function(d){var a,e;if(this._loadFinished){a=this._getItemByIdentity(d.identity);if(d.onItem){e=d.scope?d.scope:c.global;d.onItem.call(e,a)}}else{var f=this;if(this._jsonFileUrl!==this._ccUrl){c.deprecated("dojo.data.ItemFileReadStore: ","To change the url, set the url property of the store, not _jsonFileUrl.  _jsonFileUrl support will be removed in 2.0");
this.url=this._ccUrl=this._jsonFileUrl}else if(this.url!==this._ccUrl)this._ccUrl=this._jsonFileUrl=this.url;if(this.data!=null&&this._jsonData==null){this._jsonData=this.data;this.data=null}if(this._jsonFileUrl)if(this._loadInProgress)this._queuedFetches.push({args:d});else{this._loadInProgress=true;e=c.xhrGet({url:f._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache,failOk:this.failOk});e.addCallback(function(g){var j=d.scope?d.scope:c.global;try{f._getItemsFromLoadedData(g);
f._loadFinished=true;f._loadInProgress=false;a=f._getItemByIdentity(d.identity);d.onItem&&d.onItem.call(j,a);f._handleQueuedFetches()}catch(i){f._loadInProgress=false;d.onError&&d.onError.call(j,i)}});e.addErrback(function(g){f._loadInProgress=false;if(d.onError)d.onError.call(d.scope?d.scope:c.global,g)})}else if(this._jsonData){f._getItemsFromLoadedData(f._jsonData);f._jsonData=null;f._loadFinished=true;a=f._getItemByIdentity(d.identity);if(d.onItem){e=d.scope?d.scope:c.global;d.onItem.call(e,a)}}}},
_getItemByIdentity:function(d){var a=null;if(this._itemsByIdentity&&Object.hasOwnProperty.call(this._itemsByIdentity,d))a=this._itemsByIdentity[d];else if(Object.hasOwnProperty.call(this._arrayOfAllItems,d))a=this._arrayOfAllItems[d];if(a===undefined)a=null;return a},getIdentityAttributes:function(){var d=this._features["dojo.data.api.Identity"];return d===Number?null:[d]},_forceLoad:function(){var d=this;if(this._jsonFileUrl!==this._ccUrl){c.deprecated("dojo.data.ItemFileReadStore: ","To change the url, set the url property of the store, not _jsonFileUrl.  _jsonFileUrl support will be removed in 2.0");
this.url=this._ccUrl=this._jsonFileUrl}else if(this.url!==this._ccUrl)this._ccUrl=this._jsonFileUrl=this.url;if(this.data!=null){this._jsonData=this.data;this.data=null}if(this._jsonFileUrl){var a=c.xhrGet({url:this._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache,failOk:this.failOk,sync:true});a.addCallback(function(e){try{if(d._loadInProgress!==true&&!d._loadFinished){d._getItemsFromLoadedData(e);d._loadFinished=true}else if(d._loadInProgress)throw new Error("dojo.data.ItemFileReadStore:  Unable to perform a synchronous load, an async load is in progress.");
}catch(f){console.log(f);throw f;}});a.addErrback(function(e){throw e;})}else if(this._jsonData){d._getItemsFromLoadedData(d._jsonData);d._jsonData=null;d._loadFinished=true}}});c.extend(c.data.ItemFileReadStore,c.data.util.simpleFetch);return c.data.ItemFileReadStore});define("text!orion/widgets/templates/NewItemDialog.html",function(){return'<div class="dijitDialog" tabindex="-1" waiRole="dialog" waiState="labelledby-${id}_title">\n\t<div dojoAttachPoint="titleBar" class="dijitDialogTitleBar">\n\t\t<span dojoAttachPoint="titleNode" class="dijitDialogTitle" id="${id}_title"></span>\n\t\t<span dojoAttachPoint="closeButtonNode" class="dijitDialogCloseIcon" dojoAttachEvent="onclick: onCancel" title="${buttonCancel}">\n\t\t\t<span dojoAttachPoint="closeText" class="closeText" title="${buttonCancel}">x</span>\n\t\t</span>\n\t</div>\n\t<div dojoAttachPoint="containerNode" class="dijitDialogPaneContent">\n\t\t<!-- Actual content here --\>\n\t\t<div style="display: table">\n\t\t\t<div style="display: table-row">\n\t\t\t\t<div style="display: table-cell; padding: 5">\n\t\t\t\t\t<label dojoAttachPoint="itemNameLabel" for="${id}_itemName" style="padding-right: 10">${itemNameLabelText}</label>\n\t\t\t\t</div>\n\t\t\t\t<div style="display: table-cell; padding: 5; width: 30em; text-align: left;">\n\t\t\t\t\t<input dojoType="dijit.form.ValidationTextBox" dojoAttachPoint="itemName" id="${id}_itemName" style="display: inline-block; width: 98%;" value="">\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div style="display: none;" dojoAttachPoint="itemAdvancedInfo">\n\t\t\t\t<div style="display: table-cell; padding: 5">\n\t\t\t\t\t<label dojoAttachPoint="itemURLLabel" for="itemURL" style="padding-right: 10">Server Path:</label>\n\t\t\t\t</div>\n\t\t\t\t<div style="display: table-cell; width: 40em; text-align: left; padding:5;">\n\t\t\t\t\t<input dojoAttachPoint="itemURL" style="display: inline-block; width: 98%;" value="">\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div style="display: none;" dojoAttachPoint="itemAdvancedInfo1">\n\t\t\t\t<div style="display: table-cell;"></div>\n\t\t\t\t<div style="display: table-cell;">\n\t\t\t\t\t<input dojoAttachPoint="createCheckbox" id="${id}_createCheckbox" dojoType="dijit.form.CheckBox" checked="checked" value="on" type="checkbox">\n\t\t\t\t\t<label dojoAttachPoint="createCheckboxLabel" for="${id}_createCheckbox">Create if doesn\'t exist</label>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div style="display: table-row">\n\t\t\t\t<div style="display: table-cell; padding: 5"></div>\n\t\t\t\t<div style="display: table-cell; padding: 5">\n\t\t\t\t\t<button dojoAttachPoint="newItemButton" dojoType="dijit.form.Button" type="submit" value="OK" style="padding: 20 0 10 0; float: right; clear: both;">OK\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>'});
define("orion/widgets/NewItemDialog",["dojo","dijit","dijit/Dialog","dijit/form/CheckBox","dijit/form/CheckBox","dijit/form/Form","dijit/form/ValidationTextBox","dojo/data/ItemFileReadStore","orion/widgets/_OrionDialogMixin","text!orion/widgets/templates/NewItemDialog.html"],function(c,d){c.declare("orion.widgets.NewItemDialog",[d.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:true,templateString:c.cache("orion","widgets/templates/NewItemDialog.html"),constructor:function(a){this.options=
a||{};this.options.advanced=this.options.advanced||false},postMixInProperties:function(){this.inherited(arguments);this.itemNameLabelText=this.options.label||"Name:"},postCreate:function(){this.inherited(arguments);if(this.options.advanced){this.itemAdvancedInfo.style.display="table-row";this.itemAdvancedInfo1.style.display="table-row";c.connect(this.itemURL,"onkeyup",null,c.hitch(this,this.onURLChange))}else{this.itemAdvancedInfo.style.display="none";this.itemAdvancedInfo1.style.display="none"}},
execute:function(){var a,e;this.newItemButton.focus();if(this.options.advanced){a=this.itemURL.value.replace(/^\s+|\s+$/g,"");e=this.createCheckbox.get("disabled")?false:this.createCheckbox.get("checked")}this.options.func(this.itemName.value,a&&a!==""?a:undefined,e)},onURLChange:function(){var a=this.itemURL.value;if(a.match(/^file:\/\//))this.createCheckbox.set("disabled",false);else a.match(/^[a-zA-Z][a-zA-Z]+:\/\/.+/)?this.createCheckbox.set("disabled",true):this.createCheckbox.set("disabled",
false)}})});
define("orion/git/git-clones-explorer",["require","dojo","orion/explorer","orion/util"],function(c,d,a,e){var f={};f.GitClonesExplorer=function(){function g(j,i,k,h,l,n){this.parentId=h;this.registry=j;this.selection=i;this.toolbarId=l;this.selectionToolsId=n;this.cloneDetails=k;this.checkbox=false;this.renderer=new f.GitClonesRenderer({checkbox:false},this)}g.prototype=new a.Explorer;g.prototype.getGitLocation=function(j){j=e.makeRelative(j);var i=c.toUrl("gitapi/clone._");i=i.substring(0,i.length-
2);return j[0]==="/"?i+j:i+"/"+j};g.prototype.setDefaultPath=function(j){this.defaultPath=j};g.prototype.displayClonesList=function(j){var i=this;j=j||this.defaultPath;j=e.makeRelative(j);if(j!==this._lastHash){this._lastHash=j;d.hash(j,true);var k=this.getGitLocation(j);d.create("div",null,d.byId(this.parentId),"only").innerHTML="Loading <b>"+k+"</b>...";this.registry.getService("orion.git.provider").then(function(h){d.hitch(i,i.createTree(i.parentId,new f.GitClonesModel(h,k,h.getGitClone)))})}};
g.prototype.redisplayClonesList=function(){if(this._lastHash){var j=this,i=this.getGitLocation(this._lastHash);d.create("div",null,d.byId(this.parentId),"only").innerHTML="Loading <b>"+i+"</b>...";this.registry.getService("orion.git.provider").then(function(k){d.hitch(j,j.createTree(j.parentId,new f.GitClonesModel(k,i,k.getGitClone)))})}};g.prototype.loadCloneDetails=function(j){this.cloneDetails.loadCloneDetails(j.ConfigLocation)};return g}();f.GitClonesModel=function(){function g(j,i,k,h){this.gitClient=
j;this.rootPath=i;this.fetchItems=k;this.root=h?h:null}g.prototype=new a.ExplorerModel;g.prototype.getRoot=function(j){this.root?j(this.root):this.fetchItems(this.rootPath).then(d.hitch(this,function(i){this.root=i;j(i)}))};g.prototype.mayHaveChildren=function(j){if(j.children||j.Children)return true;else if(j.BranchLocation&&j.RemoteLocation)return true;else if(j.GroupNode)return true;else if(j.Type==="Remote")return true;return false};g.prototype.getIdentity=function(j){if(j.Location){j=j.Location;
j=j.replace(/[^\.\:\-\_0-9A-Za-z]/g,"")}else j="ROOT";return j};g.prototype.getChildren=function(j,i){j.children=[];if(j.Children){for(var k=0;k<j.Children.length;k++){j.Children[k].parent=j;j.children[k]=j.Children[k]}i(j.Children)}else if(j.BranchLocation&&j.RemoteLocation){j.children=[{GroupNode:"true",Location:j.BranchLocation,Name:"Branches",parent:j},{GroupNode:"true",Location:j.RemoteLocation,BranchLocation:j.BranchLocation,Name:"Remotes",parent:j},{GroupNode:"true",Location:j.TagLocation,
Name:"Tags",parent:j}];i(j.children)}else if(j.GroupNode)this.gitClient.getGitBranch(j.Location).then(d.hitch(this,function(h){j.children=h.Children;for(var l=0;l<h.Children.length;l++)h.Children[l].parent=j;i(h.Children)}));else j.Type==="Remote"&&this.gitClient.getGitBranch(j.Location).then(d.hitch(this,function(h){j.children=h.Children;for(var l=0;l<h.Children.length;l++)h.Children[l].parent=j;i(h.Children)}))};return g}();f.GitClonesRenderer=function(){function g(j,i){this._init(j);this.explorer=
i}g.prototype=new a.SelectionRenderer;g.prototype.getCellHeaderElement=function(j){switch(j){case 0:return d.create("th",{innerHTML:"<h2>Name</h2>"});case 1:return d.create("th",{innerHTML:"<h2>Actions</h2>"})}};g.prototype.getCellElement=function(j,i,k){switch(j){case 0:var h,l;if(i.BranchLocation&&i.RemoteLocation){h=document.createElement("td");j=k.id+"__expand";j=d.create("div",null,h,"only");this.getExpandImage(k,j,"git-sprite-repository","gitImageSprite");l=d.create("a",{className:"navlinkonpage"},
j,"last");d.connect(l,"onclick",l,d.hitch(this,function(){this.explorer.loadCloneDetails(i)}));d.connect(l,"onmouseover",l,function(){l.style.cursor="pointer"});d.connect(l,"onmouseout",l,function(){l.style.cursor="default"});d.place(document.createTextNode(i.Name),l,"only")}else if(i.GroupNode){h=document.createElement("td");j=k.id+"__expand";j=d.create("div",null,h,"only");i.Name==="Branches"&&this.getExpandImage(k,j,"git-sprite-branches","gitImageSprite");i.Name==="Remotes"&&this.getExpandImage(k,
j,"git-sprite-remotes","gitImageSprite");i.Name==="Tags"&&this.getExpandImage(k,j,"git-sprite-tags","gitImageSprite");l=d.create("a",{innerHTML:i.Name,className:"navlinkonpage"},j,"last");d.place(document.createTextNode(i.Name),l,"only")}else if(i.Type==="Branch"){h=document.createElement("td");j=d.create("div",{style:"margin-left: 10px"},h,"only");l=d.create("a",{innerHTML:i.Name,className:"navlinkonpage"},j,"last");if(i.Current)l.style.fontWeight="bold";d.place(document.createTextNode(i.Name),l,
"only");k=d.create("span",null,l,"first");d.addClass(k,"gitImageSprite");d.addClass(k,"git-sprite-branch")}else if(i.Type==="Remote"){h=document.createElement("td");j=k.id+"__expand";j=d.create("div",null,h,"only");this.getExpandImage(k,j,"git-sprite-remote","gitImageSprite");l=d.create("a",{innerHTML:i.Name,className:"navlinkonpage"},j,"last");!i.PushUrl||i.PushUrl===i.GitUrl?d.place(document.createTextNode(i.Name+" ("+i.GitUrl+")"),l,"only"):d.place(document.createTextNode(i.Name+" (See the configuration for fetch/push urls)"),
l,"only")}else if(i.Type==="RemoteTrackingBranch"){h=document.createElement("td");j=d.create("div",{style:"margin-left: 10px"},h,"only");l=d.create("a",{innerHTML:i.Name,className:"navlinkonpage"},j,"last");d.place(document.createTextNode(i.Name),l,"only");k=d.create("span",null,l,"first");d.addClass(k,"gitImageSprite");d.addClass(k,"git-sprite-branch")}else if(i.Type==="Tag"){h=document.createElement("td");j=d.create("div",{style:"margin-left: 10px"},h,"only");l=d.create("a",{innerHTML:i.Name,className:"navlinkonpage"},
j,"last");d.place(document.createTextNode(i.Name),l,"only");k=d.create("span",null,l,"first");d.addClass(k,"gitImageSprite");d.addClass(k,"git-sprite-tag")}return h;case 1:return this.getActionsColumn(i,k)}};return g}();return f});define("text!orion/git/widgets/templates/RemotePrompterDialog.html",function(){return'<div class="dijitDialog" tabindex="-1" waiRole="dialog" waiState="labelledby-${id}_title">\n\t<div dojoAttachPoint="titleBar" class="dijitDialogTitleBar">\n\t\t<span dojoAttachPoint="titleNode" class="dijitDialogTitle" id="${id}_title"></span>\n\t\t<span dojoAttachPoint="closeButtonNode" class="dijitDialogCloseIcon" dojoAttachEvent="onclick: onCancel" title="${buttonCancel}">\n\t\t\t<span dojoAttachPoint="closeText" class="closeText" title="${buttonCancel}">x</span>\n\t\t</span>\n\t</div>\n\t<div dojoAttachPoint="containerNode" class="dijitDialogPaneContent">\n\t\t<!-- Actual content here --\>\n\t\t\t<div style="display: table">\n\t\t\t\t<div style="display: table-row"> \n\n\t\t\t\t\t<div style="display: table-cell; padding: 1px; vertical-align: bottom;">\n\t\t\t\t\t\t<div dojoAttachPoint="treeContainerNode" id="${id}_treeContainerNode" dojoType="dijit.layout.BorderContainer" style="width:25em; height:25em; overflow:auto;" design="sidebar" gutters="true">\n\t\t\t\t\t\t\t<div dojoAttachPoint="treeContentPane" class="dijitDialogPaneContent" id="${id}_treeContentPane dojoType="dijit.layout.ContentPane" region="center" gutters="true">\n\t\t\t\t\t\t\t\t<div dojoAttachPoint="browseRemoteExplorerTree" class="explorerTreeClass" id="${id}_browseRemoteExplorerTree" style="margin-top: -3px;"></div> \n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: table-cell; padding: 1px; vertical-align: bottom;">\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: table-cell; padding: 1px; vertical-align: bottom;">\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t<div style="display: table-row" dojoAttachPoint="newBranchSection">\n\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t<label for="${id}_newBranch">${newBranchText}</label>\n\t\t\t\t\t<input dojoAttachPoint="newBranch" id="${id}_newBranch" value="" disabled=true/>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t \n\t\t\t\t<div style="display: table-row">\n\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t\n\t\t\t\t\t\t<button dojoAttachPoint="RemoteBrowserButton" disabled=true dojoType="dijit.form.Button" type="submit" value="OK" style="padding: 20 0 10 0; float: right; clear: both;">${buttonOk}\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div> <!-- end table --\>\n\t</div> <!-- content pane --\>\n</div>'});
define("orion/git/widgets/RemotePrompterDialog",["dojo","dijit","orion/util","orion/git/git-clones-explorer","dijit/Dialog","dijit/form/Button","orion/widgets/ExplorerTree","orion/widgets/_OrionDialogMixin","text!orion/git/widgets/templates/RemotePrompterDialog.html"],function(c,d,a,e){c.declare("orion.git.widgets.RemotePrompterDialog",[d.Dialog,orion.widgets._OrionDialogMixin],{treeWidget:null,treeRoot:{},widgetsInTemplate:true,templateString:c.cache("orion","git/widgets/templates/RemotePrompterDialog.html"),
constructor:function(){this.inherited(arguments);this.options=arguments[0]||{};this.treeRoot=this.options.treeRoot},postMixInProperties:function(){this.inherited(arguments);this.title=this.options.title||"Choose a Folder";this.newBranchText="New Branch:";this.buttonOk="OK"},postCreate:function(){this.inherited(arguments);this.loadRemoteChildren(this.treeRoot);c.connect(this.newBranch,"onchange",c.hitch(this,this.validate));if(this.options.hideNewBranch)this.newBranchSection.style.display="none"},
loadRemoteChildren:function(f){this.treeRoot=f;this.createTree(new e.GitClonesModel(this.gitClient,null,this.gitClient.getGitClone,this.treeRoot))},createTree:function(f){var g=this.treeWidget=new orion.widgets.ExplorerTree({style:"width:100%; height:100%",model:f,region:"center",showRoot:false,persist:true,openOnClick:false,getLabel:function(i){return i.Name},getIconClass:function(i){if(i.BranchLocation&&i.RemoteLocation)return"gitRepoItem";if(i.GroupNode)return i.Name==="Branch"?"gitBranchesItem":
"gitRemotesItem";if(i.Type==="Branch"||i.Type==="RemoteTrackingBranch")return"gitBranchItem";if(i.Type==="Remote")return"gitRemoteItem";return"gitDefaultItem"}}),j=this;this.treeWidget._inheritedSelectNode=this.treeWidget._selectNode;this.treeWidget._selectNode=function(i){g._inheritedSelectNode(i);j.newBranch.disabled=i.item&&i.item.Type==="Remote"?false:true;c.hitch(j,j.validate)()};this.treeWidget.startup();c.byId(this.treeContentPane.id).appendChild(this.treeWidget.domNode)},validate:function(){var f=
this.treeWidget.getSelectedItems();if(f.length==1)if(f[0].Type==="RemoteTrackingBranch"){this.RemoteBrowserButton.disabled=false;return}else if(f[0].Type==="Remote")if(this.newBranch.value!=""){this.RemoteBrowserButton.disabled=false;return}this.RemoteBrowserButton.disabled=true},execute:function(){var f=this.treeWidget.getSelectedItems();this.onHide();f[0].Type==="RemoteTrackingBranch"?this.options.func(f[0],f[0].parent):this.options.func(null,f[0],this.newBranch.value)}})});
define("orion/git/gitCommands",["require","dojo","orion/commands","orion/util","orion/git/widgets/CloneGitRepositoryDialog","orion/git/widgets/InitGitRepositoryDialog","orion/git/widgets/AddRemoteDialog","orion/git/widgets/GitCredentialsDialog","orion/widgets/NewItemDialog","orion/git/widgets/RemotePrompterDialog"],function(c,d,a,e){var f={};(function(){function g(i){serviceRegistry.getService("orion.page.message").then(function(k){if(!(i.status===401||i.status===403)){var h=[];h.Severity="Error";
h.HTML=false;try{var l=JSON.parse(i.responseText);h.Message=l.DetailedMessage?l.DetailedMessage:l.Message}catch(n){h.Message=i.message}k.setProgressResult(h)}})}var j=false;f.updateNavTools=function(i,k,h,l,n){var r=d.byId(h);if(r)d.empty(r);else throw"could not find toolbar "+h;i.getService("orion.page.command").then(d.hitch(k,function(m){m.renderCommands(r,"dom",n,k,"image",null,null,true);if(l){var o=d.create("span",{id:l},r,"last");m.renderCommands(o,"dom",null,k,"image",null,null,true)}}));if(!j){j=
true;i.getService("orion.page.selection").then(function(m){m.addEventListener("selectionChanged",function(o,p){var s=d.byId(l);if(s){d.empty(s);i.getService("orion.page.command").then(function(q){q.renderCommands(s,"dom",p,k,"image",null,null,true)})}})})}};f.getNewItemName=function(i,k,h,l,n,r,m,o){var p;if(h)i=d.byId(l);else if(k=k.makeNewItemPlaceHolder(i,l,m)){i=k.refNode;p=k.tempNode}else i=d.byId(l);if(i)e.getUserText(l+"EditBox",i,false,n,d.hitch(this,function(s){if(s){p&&p.parentNode.removeChild(p);
r(s)}}),undefined,undefined,undefined,o);else(l=window.prompt(n))&&r(l)};f.handleKnownHostsError=function(i,k,h,l){confirm("Would you like to add "+k.KeyType+" key for host "+k.Host+" to continue operation? Key fingerpt is "+k.HostFingerprint+".")&&i.getService("orion.net.ssh").then(function(n){n.addKnownHosts(k.Host+" "+k.KeyType+" "+k.HostKey).then(function(){n.getKnownHosts().then(function(r){h.knownHosts=r;l(h)})})})};f.handleSshAuthenticationError=function(i,k,h,l,n){i=new orion.git.widgets.GitCredentialsDialog({title:n,
serviceRegistry:i,func:l,errordata:h.errordata});i.startup();i.show()};f.getDefaultSshOptions=function(i){var k=new d.Deferred;i.getService("orion.net.ssh").then(function(h){h.getKnownHosts().then(function(l){k.callback({knownHosts:l,gitSshUsername:"",gitSshPassword:"",gitPrivateKey:"",gitPassphrase:""})})});return k};f.handleProgressServiceResponse=function(i,k,h,l,n,r){if(i.Running==false){if(i.Result&&i.Result.HttpCode==403){if(i.Result.JsonData&&i.Result.JsonData.HostKey){d.hitch(this,f.handleKnownHostsError)(h,
i.Result.JsonData,k,n);return}}else if(i.Result&&i.Result.HttpCode==401){if(i.Result.JsonData)k.errordata=i.Result.JsonData;d.hitch(this,f.handleSshAuthenticationError)(h,i.Result.JsonData,k,n,r);return}if(i.Result&&i.Result.HttpCode!=200)console.error("error "+i.Result.HttpCode+" while running operation: "+i.Result.DetailedMessage);else l&&l(i)}};f.createFileCommands=function(i,k,h){var l=new a.Command({name:"Link Repository",imageClass:"core-sprite-link",id:"eclipse.linkRepository",callback:function(m){var o=
new orion.widgets.NewItemDialog({title:"Link Repository",label:"Folder name:",func:function(p){i.getService("orion.core.file").then(function(s){s.loadWorkspace("").then(function(q){s.createProject(q.Location,p,m.ContentLocation,false).then(function(u){alert("Repository was linked to "+u.Name);s.read(u.ContentLocation,true).then(function(y){window.location.replace(c.toUrl("navigate/table.html")+"#"+y.ChildrenLocation)})})})})},advanced:false});o.startup();o.show()},visibleWhen:function(m){if(m.ContentLocation)return true;
return false}});k.addCommand(l,"object");l=new a.Command({name:"Checkout",tooltip:"Create a local branch corresponding with the current tag.",imageClass:"git-sprite-checkout",spriteClass:"gitCommandSprite",id:"eclipse.checkoutTag",callback:function(m,o,p){function s(){for(var q in m.parent.parent.children)if(m.parent.parent.children[q].Name==="Branches")return m.parent.parent.children[q];return m.parent.parent}f.getNewItemName(m,h,false,p,"tag_"+m.Name,function(q){!q&&q==""||i.getService("orion.git.provider").then(function(u){u.checkoutTag(m.parent.parent.Location,
m.Name,q).then(function(){d.hitch(h,h.changedItem)(s())},g)})},undefined,true)},visibleWhen:function(m){return m.Type==="Tag"}});k.addCommand(l,"object");l=new a.Command({name:"Checkout",tooltip:"Make the branch or corresponding local branch active. If the remote tracking branch does not have a corresponding local branch, the local branch will be created first.",imageClass:"git-sprite-checkout",spriteClass:"gitCommandSprite",id:"eclipse.checkoutBranch",callback:function(m){i.getService("orion.git.provider").then(function(o){m.Type===
"Branch"?o.checkoutBranch(m.CloneLocation,m.Name).then(function(){d.hitch(h,h.changedItem)(m.parent)},g):o.addBranch(m.parent.parent.BranchLocation,null,m.Name).then(function(p){o.checkoutBranch(p.CloneLocation,p.Name).then(function(){d.hitch(h,h.changedItem)(m.parent.parent.parent)},g)},g)})},visibleWhen:function(m){return m.Type==="Branch"||m.Type==="RemoteTrackingBranch"}});k.addCommand(l,"object");l=new a.Command({name:"New Branch",tooltip:"Add a new local branch to the repository",imageClass:"core-sprite-add",
id:"eclipse.addBranch",callback:function(m,o,p){f.getNewItemName(m,h,false,p,"Branch name",function(s){!s&&s==""||i.getService("orion.git.provider").then(function(q){q.addBranch(m.Location,s).then(function(){d.hitch(h,h.changedItem)(m)},g)})})},visibleWhen:function(m){return m.GroupNode&&m.Name==="Branches"}});k.addCommand(l,"object");l=new a.Command({name:"Delete",tooltip:"Delete the local branch from the repository",imageClass:"core-sprite-delete",id:"eclipse.removeBranch",callback:function(m){confirm("Are you sure you want to delete branch "+
m.Name+"?")&&i.getService("orion.git.provider").then(function(o){o.removeBranch(m.Location).then(function(){d.hitch(h,h.changedItem)(m.parent)},g)})},visibleWhen:function(m){return m.Type==="Branch"&&!m.Current}});k.addCommand(l,"object");l=new a.Command({name:"Delete",tooltip:"Delete the remote tracking branch from the repository",imageClass:"core-sprite-delete",id:"eclipse.removeRemoteBranch",callback:function(m){confirm("You're going to delete remote branch "+m.Name+" and push the change.\n\nAre you sure?")&&
f.getDefaultSshOptions(i).then(function(o){var p=arguments.callee;i.getService("orion.git.provider").then(function(s){i.getService("orion.page.message").then(function(q){var u=s.doPush(m.Location,"",false,false,null,o.gitSshUsername,o.gitSshPassword,o.knownHosts,o.gitPrivateKey,o.gitPassphrase);q.showWhile(u,"Removing remote branch: "+m.Name).then(function(y){f.handleProgressServiceResponse(y,o,i,function(C){C.Result.Severity=="Ok"&&d.hitch(h,h.changedItem)(m.parent)},p,"Delete Remote Branch")})})})})},
visibleWhen:function(m){return m.Type==="RemoteTrackingBranch"}});k.addCommand(l,"object");l=new a.Command({name:"New Remote",tooltip:"Add a new remote to the repository",imageClass:"core-sprite-add",id:"eclipse.addRemote",callback:function(m){var o=new orion.git.widgets.AddRemoteDialog({func:function(p,s){i.getService("orion.git.provider").then(function(q){q.addRemote(m.Location,p,s).then(function(){d.hitch(h,h.changedItem)(m)},g)})}});o.startup();o.show()},visibleWhen:function(m){return m.GroupNode&&
m.Name==="Remotes"}});k.addCommand(l,"object");l=new a.Command({name:"Delete",tooltip:"Delete the remote from the repository",imageClass:"core-sprite-delete",id:"eclipse.removeRemote",callback:function(m){confirm("Are you sure you want to delete remote "+m.Name+"?")&&i.getService("orion.git.provider").then(function(o){o.removeRemote(m.Location).then(function(){d.hitch(h,h.changedItem)(m.parent)},g)})},visibleWhen:function(m){return m.Type==="Remote"}});k.addCommand(l,"object");l=new a.Command({name:"Git Log",
tooltip:"Open the log for the branch",id:"eclipse.openGitLog",hrefCallback:function(m){if(m.Type==="RemoteTrackingBranch")return c.toUrl("git/git-log.html")+"#"+m.Location+"?page=1";return c.toUrl("git/git-log.html")+"#"+m.CommitLocation+"?page=1"},visibleWhen:function(m){return m.Type==="Branch"||m.Type==="RemoteTrackingBranch"}});k.addCommand(l,"object");l=new a.Command({name:"Git Log",tooltip:"Open the log for the repository",id:"eclipse.openGitLogAll",hrefCallback:function(m){return c.toUrl("git/git-log.html")+
"#"+m.CommitLocation+"?page=1"},visibleWhen:function(m){if(!m.CommitLocation||!m.StatusLocation)return false;return true}});k.addCommand(l,"object");l=new a.Command({name:"Git Status",tooltip:"Open the status for the repository",id:"eclipse.openGitStatus",hrefCallback:function(m){return c.toUrl("git/git-status.html")+"#"+m.StatusLocation},visibleWhen:function(m){if(!m.StatusLocation)return false;return true}});k.addCommand(l,"object");l=new a.Command({name:"Show in Navigator",tooltip:"Show the repository folder in the file navigator",
id:"eclipse.openCloneContent",hrefCallback:function(m){return c.toUrl("navigate/table.html")+"#"+m.ContentLocation+"?depth=1"},visibleWhen:function(m){if(!m.ContentLocation)return false;return true}});k.addCommand(l,"object");l=new a.Command({name:"Compare With Each Other",imageClass:"git-sprite-open_compare",spriteClass:"gitCommandSprite",id:"eclipse.compareGitCommits",hrefCallback:function(m){var o=new d.Deferred;i.getService("orion.git.provider").then(function(p){p.getDiff(m[0].DiffLocation,m[1].Name,
function(s,q){o.callback(c.toUrl("compare/compare.html")+"?readonly#"+q.xhr.getResponseHeader("Location"))})});return o},visibleWhen:function(m){if(h.isDirectory)return false;if(d.isArray(m)&&m.length===2&&m[0].Type==="Commit"&&m[1].Type==="Commit")return true;return false}});k.addCommand(l,"dom");l=new a.Command({name:"Compare With Working Tree",imageClass:"git-sprite-open_compare",spriteClass:"gitCommandSprite",id:"eclipse.compareWithWorkingTree",hrefCallback:function(m){return c.toUrl("compare/compare.html")+
"#"+m.DiffLocation},visibleWhen:function(m){return m.Type==="Commit"&&!h.isDirectory}});k.addCommand(l,"object");l=new a.Command({name:"Open",id:"eclipse.openGitCommit",hrefCallback:function(m){return c.toUrl("edit/edit.html")+"#"+m.ContentLocation},visibleWhen:function(m){return m.Type==="Commit"&&m.ContentLocation!=null&&!h.isDirectory}});k.addCommand(l,"object");l=new a.Command({name:"Fetch",tooltip:"Fetch from the remote",imageClass:"git-sprite-fetch",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.fetch",
callback:function(m){var o=m.Location;f.getDefaultSshOptions(i).then(function(p){var s=arguments.callee;i.getService("orion.git.provider").then(function(q){i.getService("orion.page.message").then(function(u){var y=q.doFetch(o,false,null,p.gitSshUsername,p.gitSshPassword,p.knownHosts,p.gitPrivateKey,p.gitPassphrase);u.showWhile(y,"Fetching remote: "+o).then(function(C){f.handleProgressServiceResponse(C,p,i,function(){d.xhrGet({url:o,headers:{"Orion-Version":"1"},postData:d.toJson({GitSshUsername:p.gitSshUsername,
GitSshPassword:p.gitSshPassword,GitSshPrivateKey:p.gitPrivateKey,GitSshPassphrase:p.gitPassphrase,GitSshKnownHost:p.knownHosts}),handleAs:"json",timeout:5E3,load:function(v){return v},error:function(v,w){console.error("HTTP status code: ",w.xhr.status);return v}}).then(function(v){h.parentId==="explorer-tree"&&q.getLog(v.HeadLocation,v.Id,function(w,A){function z(G){h.renderer.setIncomingCommits(G.Children);h.loadCommitsList(v.CommitLocation+"?page=1",v,true)}if(A.xhr.status===200)z(w);else if(A.xhr.status===
202){var F=new d.Deferred;F.callback(w);i.getService("orion.page.message").then(function(G){G.showWhile(F,"Getting git incoming changes").then(function(H){z(H.Result.JsonData)})})}});m.Type==="Remote"&&d.hitch(h,h.changedItem)(m)},g)},s,"Fetch Git Repository")})})})})},visibleWhen:function(m){return m.Type==="RemoteTrackingBranch"||m.Type==="Remote"}});k.addCommand(l,"dom");k.addCommand(l,"object");l=new a.Command({name:"Force Fetch",tooltip:"Fetch from the remote branch into your remote tracking branch overriding its current content",
id:"eclipse.orion.git.fetchForce",callback:function(m){if(confirm("You're going to override content of the remote tracking branch. This can cause the branch to lose commits.\n\nAre you sure?")){var o=m.Location;f.getDefaultSshOptions(i).then(function(p){var s=arguments.callee;i.getService("orion.git.provider").then(function(q){i.getService("orion.page.message").then(function(u){var y=q.doFetch(o,true,null,p.gitSshUsername,p.gitSshPassword,p.knownHosts,p.gitPrivateKey,p.gitPassphrase);u.showWhile(y,
"Fetching remote: "+o).then(function(C){f.handleProgressServiceResponse(C,p,i,function(){d.xhrGet({url:o,headers:{"Orion-Version":"1"},postData:d.toJson({GitSshUsername:p.gitSshUsername,GitSshPassword:p.gitSshPassword,GitSshPrivateKey:p.gitPrivateKey,GitSshPassphrase:p.gitPassphrase,GitSshKnownHost:p.knownHosts}),handleAs:"json",timeout:5E3,load:function(v){return v},error:function(v,w){console.error("HTTP status code: ",w.xhr.status);return v}}).then(function(v){h.parentId==="explorer-tree"&&q.getLog(v.HeadLocation,
v.Id,function(w,A){function z(G){h.renderer.setIncomingCommits(G.Children);h.loadCommitsList(v.CommitLocation+"?page=1",v,true)}if(A.xhr.status===200)z(w);else if(A.xhr.status===202){var F=new d.Deferred;F.callback(w);i.getService("orion.page.message").then(function(G){G.showWhile(F,"Getting git incoming changes").then(function(H){z(H.Result.JsonData)})})}})},g)},s,"Fetch Git Repository")})})})})}},visibleWhen:function(m){return m.Type==="RemoteTrackingBranch"||m.Type==="Remote"}});k.addCommand(l,
"dom");k.addCommand(l,"object");l=new a.Command({name:"Merge",tooltip:"Merge the content from the branch to your active branch",imageClass:"git-sprite-merge",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.merge",callback:function(m){i.getService("orion.git.provider").then(function(o){o.doMerge(m.HeadLocation,m.Name).then(function(p){i.getService("orion.page.message").then(function(s){var q=[];if(p.jsonData&&(p.jsonData.Result=="FAST_FORWARD"||p.jsonData.Result=="ALREADY_UP_TO_DATE")){d.query(".treeTableRow").forEach(function(C){d.toggleClass(C,
"incomingCommitsdRow",false)});q.Severity="Ok";q.HTML=false;q.Message=p.jsonData.Result}else if(p.jsonData){var u=m.HeadLocation.replace("commit/HEAD","status");q.Severity="Warning";q.HTML=true;q.Message="<span>"+p.jsonData.Result+'. Go to <a href="'+c.toUrl("git/git-status.html")+"#"+u+'">Git Status page</a>.<span>'}else if(p.error){q.Severity="Error";if(p.error.responseText&&JSON.parse(p.error.responseText)){var y=JSON.parse(p.error.responseText);q.Message=y.DetailedMessage?y.DetailedMessage:y.Message}else q.Message=
p.error.message;q.HTML=true;q.Message="<span>"+q.Message+' Go to <a href="'+c.toUrl("git/git-status.html")+"#"+u+'">Git Status page</a>.<span>'}s.setProgressResult(q)})},function(p){i.getService("orion.page.message").then(function(s){var q=[],u=m.HeadLocation.replace("commit/HEAD","status");q.Severity="Error";q.HTML=true;q.Message="<span>"+d.fromJson(p.ioArgs.xhr.responseText).DetailedMessage+'. Go to <a href="'+c.toUrl("git/git-status.html")+"#"+u+'">Git Status page</a>.<span>';s.setProgressResult(q)})})})},
visibleWhen:function(m){return m.Type==="RemoteTrackingBranch"||m.Type==="Branch"&&!m.Current}});k.addCommand(l,"dom");k.addCommand(l,"object");l=new a.Command({name:"Rebase",tooltip:"Rewind commits from the active branch and replay them on top of the selected branch",id:"eclipse.orion.git.rebase",callback:function(m){i.getService("orion.git.provider").then(function(o){o.doRebase(m.HeadLocation,m.Name,"BEGIN",function(p){i.getService("orion.page.message").then(function(s){var q=[],u=m.HeadLocation.replace("commit/HEAD",
"status");if(p.Result=="OK"||p.Result=="FAST_FORWARD"||p.Result=="UP_TO_DATE"){q.Severity="Ok";q.HTML=false;q.Message=p.Result}else if(p.Result=="STOPPED"){q.Severity="Warning";q.HTML=true;q.Message="<span>"+p.Result+'. Some conflicts occurred. Please resolve them and continue, skip patch or abort rebasing. Go to <a href="'+c.toUrl("git/git-status.html")+"#"+u+'">Git Status page</a>.<span>'}else if(p.Result=="FAILED_WRONG_REPOSITORY_STATE"){q.Severity="Error";q.HTML=true;q.Message="<span>"+p.Result+
'. Repository state is invalid (i.e. already during rebasing). Go to <a href="'+c.toUrl("git/git-status.html")+"#"+u+'">Git Status page</a>.<span>'}else if(p.Result=="FAILED_UNMERGED_PATHS"){q.Severity="Error";q.HTML=true;q.Message="<span>"+p.Result+'. Repository contains unmerged paths. Go to <a href="'+c.toUrl("git/git-status.html")+"#"+u+'">Git Status page</a>.<span>'}else if(p.Result=="FAILED_PENDING_CHANGES"){q.Severity="Error";q.HTML=true;q.Message="<span>"+p.Result+'. Repository contains pending changes. Please commit or stash them. Go to <a href="'+
c.toUrl("git/git-status.html")+"#"+u+'">Git Status page</a>.<span>'}else{q.Severity="Warning";q.HTML=true;q.Message="<span>"+p.Result+'. Go to <a href="'+c.toUrl("git/git-status.html")+"#"+u+'">Git Status page</a>.<span>'}s.setProgressResult(q)})},g)})},visibleWhen:function(m){return m.Type==="RemoteTrackingBranch"||m.Type==="Branch"&&!m.Current}});k.addCommand(l,"dom");k.addCommand(l,"object");l=new a.Command({name:"Push All",tooltip:"Push commits and tags from your local branch into the remote branch",
imageClass:"git-sprite-push",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.push",callback:function(m){var o=d.hash();if(m.toRef)m=m.toRef;if(m.RemoteLocation.length==1&&m.RemoteLocation[0].Children.length==1)f.getDefaultSshOptions(i).then(function(s){var q=arguments.callee;i.getService("orion.git.provider").then(function(u){i.getService("orion.page.message").then(function(y){var C=u.doPush(m.RemoteLocation[0].Children[0].Location,"HEAD",true,false,null,s.gitSshUsername,s.gitSshPassword,s.knownHosts,
s.gitPrivateKey,s.gitPassphrase);y.showWhile(C,"Pushing remote: "+o).then(function(v){f.handleProgressServiceResponse(v,s,i,function(w){w.Result.Severity=="Ok"&&d.query(".treeTableRow").forEach(function(A){d.toggleClass(A,"outgoingCommitsdRow",false)})},q,"Push Git Repository")})})})});else{var p=m.RemoteLocation;i.getService("orion.git.provider").then(function(s){s=new orion.git.widgets.RemotePrompterDialog({title:"Choose Branch",serviceRegistry:i,gitClient:s,treeRoot:{Children:p},hideNewBranch:true,
func:d.hitch(this,function(q,u){f.getDefaultSshOptions(i).then(function(y){var C=arguments.callee;i.getService("orion.git.provider").then(function(v){i.getService("orion.page.message").then(function(w){var A=v.doPush(q.Location,"HEAD",true,false,null,y.gitSshUsername,y.gitSshPassword,y.knownHosts,y.gitPrivateKey,y.gitPassphrase);w.showWhile(A,"Pushing remote: "+u.Name).then(function(z){f.handleProgressServiceResponse(z,y,i,function(F){F.Result.Severity=="Ok"&&d.query(".treeTableRow").forEach(function(G){d.toggleClass(G,
"outgoingCommitsdRow",false)})},C,"Push Git Repository")})})})})})});s.startup();s.show()})}},visibleWhen:function(m){return m.toRef?m.RepositoryPath===""&&m.toRef.Type==="Branch"&&m.toRef.Current&&m.toRef.RemoteLocation:m.Type==="Branch"&&m.Current&&m.RemoteLocation}});k.addCommand(l,"dom");k.addCommand(l,"object");l=new a.Command({name:"Force Push All",tooltip:"Push commits and tags from your local branch into the remote branch overriding its current content",imageClass:"git-sprite-push",spriteClass:"gitCommandSprite",
id:"eclipse.orion.git.pushForce",callback:function(m){if(confirm("You're going to override content of the remote branch. This can cause the remote repository to lose commits.\n\nAre you sure?")){var o=d.hash();if(m.toRef)m=m.toRef;if(m.RemoteLocation.length==1&&m.RemoteLocation[0].Children.length==1)f.getDefaultSshOptions(i).then(function(s){var q=arguments.callee;i.getService("orion.git.provider").then(function(u){i.getService("orion.page.message").then(function(y){var C=u.doPush(m.RemoteLocation[0].Children[0].Location,
"HEAD",true,true,null,s.gitSshUsername,s.gitSshPassword,s.knownHosts,s.gitPrivateKey,s.gitPassphrase);y.showWhile(C,"Pushing remote: "+o).then(function(v){f.handleProgressServiceResponse(v,s,i,function(w){w.Result.Severity=="Ok"&&d.query(".treeTableRow").forEach(function(A){d.toggleClass(A,"outgoingCommitsdRow",false)})},q,"Push Git Repository")})})})});else{var p=m.RemoteLocation;i.getService("orion.git.provider").then(function(s){s=new orion.git.widgets.RemotePrompterDialog({title:"Choose Branch",
serviceRegistry:i,gitClient:s,treeRoot:{Children:p},hideNewBranch:true,func:d.hitch(this,function(q,u){f.getDefaultSshOptions(i).then(function(y){var C=arguments.callee;i.getService("orion.git.provider").then(function(v){i.getService("orion.page.message").then(function(w){var A=v.doPush(q.Location,"HEAD",true,true,null,y.gitSshUsername,y.gitSshPassword,y.knownHosts,y.gitPrivateKey,y.gitPassphrase);w.showWhile(A,"Pushing remote: "+u).then(function(z){f.handleProgressServiceResponse(z,y,i,function(F){F.Result.Severity==
"Ok"&&d.query(".treeTableRow").forEach(function(G){d.toggleClass(G,"outgoingCommitsdRow",false)})},C,"Push Git Repository")})})})})})});s.startup();s.show()})}}},visibleWhen:function(m){if(m.toRef)return m.RepositoryPath===""&&m.toRef.Type==="Branch"&&m.toRef.Current&&m.toRef.RemoteLocation}});k.addCommand(l,"dom");k.addCommand(l,"object");l=new a.Command({name:"Switch to Remote",tooltip:"Show the log for the corresponding remote tracking branch",id:"eclipse.orion.git.switchToRemote",hrefCallback:function(m){return c.toUrl("git/git-log.html")+
"#"+m.toRef.RemoteLocation[0].Children[0].Location+"?page=1"},visibleWhen:function(m){return m.toRef!=null&&m.toRef.Type==="Branch"&&m.toRef.Current&&m.toRef.RemoteLocation&&m.toRef.RemoteLocation.length===1&&m.toRef.RemoteLocation[0].Children.length===1}});k.addCommand(l,"dom");var n=function(){var m=/[\?&]page=([^&#]*)/.exec(window.location.href);if(m!=null)try{return parseInt(m[1])}catch(o){console.error(o)}},r=function(m,o){return m.replace(/page=([0-9]*)/,"page="+o)};l=new a.Command({name:"< Previous Page",
tooltip:"Show previous page of git log",id:"eclipse.orion.git.previousLogPage",hrefCallback:function(){return c.toUrl("git/git-log.html")+"#"+r(d.hash(),n(d.hash())-1)},visibleWhen:function(m){if(m.Type==="RemoteTrackingBranch"||m.toRef!=null&&m.toRef.Type==="Branch")return n(d.hash())>1;return false}});k.addCommand(l,"dom");l=new a.Command({name:"Next Page >",tooltip:"Show next page of git log",id:"eclipse.orion.git.nextLogPage",hrefCallback:function(){return c.toUrl("git/git-log.html")+"#"+r(d.hash(),
n(d.hash())+1)},visibleWhen:function(m){if(m.Type==="RemoteTrackingBranch"||m.toRef!=null&&m.toRef.Type==="Branch"){if(m.Children)return m.Children.length>0;return true}return false}});k.addCommand(l,"dom");l=new a.Command({name:"Switch to Active Local",tooltip:"Show the log for the active local branch",id:"eclipse.orion.git.switchToCurrentLocal",hrefCallback:function(m){var o=new d.Deferred,p=m.CloneLocation;if(p==null)p=JSON.parse(m.responseText).JsonData.CloneLocation;d.xhrGet({url:p,headers:{"Orion-Version":"1"},
handleAs:"json",timeout:5E3,load:function(s){d.xhrGet({url:s.Children[0].BranchLocation,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(q){d.forEach(q.Children,function(u){u.Current==true&&o.callback(c.toUrl("git/git-log.html")+"#"+u.CommitLocation+"?page=1")})}})}});return o},visibleWhen:function(m){if(m.Type==="RemoteTrackingBranch")return true;try{if(JSON.parse(m.responseText).JsonData)return true}catch(o){}return false}});k.addCommand(l,"dom");l=new a.Command({name:"Push to...",
tooltip:"Push from your local branch into the selected remote branch",imageClass:"git-sprite-push",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.pushto",callback:function(m){var o={};for(var p in m.parent.parent.children)if(m.parent.parent.children[p].Name==="Remote")o=m.parent.parent.children[p];i.getService("orion.git.provider").then(function(s){s=new orion.git.widgets.RemotePrompterDialog({title:"Choose Branch",serviceRegistry:i,gitClient:s,treeRoot:o,func:d.hitch(this,function(q,u,y){console.info("Branch "+
q+" remote "+u+" new branch "+y)})});s.startup();s.show()})},visibleWhen:function(){return false}});k.addCommand(l,"dom");k.addCommand(l,"object");l=new a.Command({name:"Reset",tooltip:"Reset your active branch to the state of the selected branch. Discard all staged and unstaged changes.",imageClass:"git-sprite-refresh",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.resetIndex",callback:function(m){confirm("The content of your active branch will be replaced with "+m.Name+". All unstaged and staged changes will be discarded and cannot be recovered. Are you sure?")&&
i.getService("orion.git.provider").then(function(o){i.getService("orion.page.message").then(function(p){p.setProgressMessage("Resetting index...");o.resetIndex(m.IndexLocation,m.Name).then(function(){var s={};s.Severity="Info";s.HTML=false;s.Message="Ok";p.setProgressResult(s)},function(s){var q={};q.Severity="Error";q.HTML=false;q.Message=s.message;p.setProgressResult(q)})})})},visibleWhen:function(m){return m.Type==="RemoteTrackingBranch"}});k.addCommand(l,"object");l=new a.Command({name:"Tag",
tooltip:"Create a tag for the commit",imageClass:"git-sprite-tag",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.addTag",callback:function(m,o,p){var s=new d.Deferred;f.getNewItemName(m,h,false,p,"Tag name",function(q){if(!(!q||q==="")){i.getService("orion.git.provider").then(function(u){u.doAddTag(m.Location,q).then(function(y){y=y.Location.replace(/[^\.\:\-\_0-9A-Za-z]/g,"");y=d.byId(y);d.place(document.createTextNode(q),d.create("p",{style:"margin: 5px"},y.children[6],"last"),"only")},function(y){i.getService("orion.page.message").then(function(C){var v=
[];v.Severity="Error";v.HTML=false;var w=JSON.parse(y.responseText);v.Message=w.DetailedMessage?w.DetailedMessage:w.Message;C.setProgressResult(v)})})});return s}},4)},visibleWhen:function(m){return m.Type==="Commit"}});k.addCommand(l,"object");l=new a.Command({name:"Cherry-Pick",tooltip:"Apply the change introduced by the commit to your active branch",id:"eclipse.orion.git.cherryPick",callback:function(m){var o=d.hash();i.getService("orion.git.provider").then(function(p){var s=m.Location.replace(m.Name,
"HEAD");p.doCherryPick(s,m.Name,function(q){i.getService("orion.page.message").then(function(u){var y=[],C=m.Location.replace("commit/"+m.Name,"status");if(q.Result=="OK"){y.Severity="Ok";if(q.HeadUpdated){y.HTML=false;y.Message=q.Result;h.parentId==="explorer-tree"&&d.xhrGet({url:o,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(v){return v},error:function(v,w){console.error("HTTP status code: ",w.xhr.status)}}).then(function(v){v.HeadLocation?p.getLog(v.HeadLocation,v.Id,
function(w,A){function z(G){h.renderer.setIncomingCommits(G.Children);h.loadCommitsList(v.CommitLocation+"?page=1",v,true)}if(A.xhr.status===200)z(w);else if(A.xhr.status===202){var F=new d.Deferred;F.callback(w);i.getService("orion.page.message").then(function(G){G.showWhile(F,"Getting git incoming changes").then(function(H){z(H.Result.JsonData)})})}}):p.getLog(o,"HEAD",function(w,A){function z(G){h.renderer.setOutgoingCommits(G.Children);h.loadCommitsList(o,v,true)}if(A.xhr.status===200)z(w);else if(A.xhr.status===
202){var F=new d.Deferred;F.callback(w);i.getService("orion.page.message").then(function(G){G.showWhile(F,"Getting git outgoing changes").then(function(H){z(H.Result.JsonData)})})}})})}else{y.HTML=true;y.Message="<span>Nothing changed.</span>"}}else if(q.Result=="CONFLICTING"){y.Severity="Warning";y.HTML=true;y.Message="<span>"+q.Result+'. Some conflicts occurred. Go to <a href="'+c.toUrl("git/git-status.html")+"#"+C+'">Git Status page</a>.<span>'}else if(q.Result=="FAILED"){y.Severity="Error";y.HTML=
true;y.Message="<span>"+q.Result+'. Go to <a href="'+c.toUrl("git/git-status.html")+"#"+C+'">Git Status page</a>.<span>'}else{y.Severity="Warning";y.HTML=false;y.Message=q.Result}u.setProgressResult(y)})},g)})},visibleWhen:function(m){return m.Type==="Commit"}});k.addCommand(l,"object")};f.createStatusCommands=function(i,k,h,l,n){var r=new a.Command({name:"Fetch",tooltip:"Fetch from the remote branch into your remote tracking branch",imageClass:"git-sprite-fetch",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.fetch",
callback:function(m){var o=m.Location;f.getDefaultSshOptions(i).then(function(p){var s=arguments.callee;i.getService("orion.git.provider").then(function(q){i.getService("orion.page.message").then(function(u){var y=q.doFetch(o,false,null,p.gitSshUsername,p.gitSshPassword,p.knownHosts,p.gitPrivateKey,p.gitPassphrase);u.showWhile(y,"Fetching remote: "+o).then(function(C){f.handleProgressServiceResponse(C,p,i,function(){d.xhrGet({url:o,headers:{"Orion-Version":"1"},postData:d.toJson({GitSshUsername:p.gitSshUsername,
GitSshPassword:p.gitSshPassword,GitSshPrivateKey:p.gitPrivateKey,GitSshPassphrase:p.gitPassphrase,GitSshKnownHost:p.knownHosts}),handleAs:"json",timeout:5E3,load:function(v){return v},error:function(v,w){console.error("HTTP status code: ",w.xhr.status)}}).then(function(v){q.getLog(v.HeadLocation,v.Id,function(w,A){function z(G){n._gitCommitNavigatorRem.renderer.setIncomingCommits(G.Children);n._gitCommitNavigatorRem.loadCommitsList(v.CommitLocation+"?page=1&pageSize=5",v,true)}if(A.xhr.status===200)z(w);
else if(A.xhr.status===202){var F=new d.Deferred;F.callback(w);i.getService("orion.page.message").then(function(G){G.showWhile(F,"Getting git incoming changes").then(function(H){z(H.Result.JsonData)})})}})})},s,"Fetch Git Repository")})})})})},visibleWhen:function(m){return m.Type==="RemoteTrackingBranch"}});k.addCommand(r,"object");k.registerCommandContribution("eclipse.orion.git.fetch",l+1);r=new a.Command({name:"Merge",tooltip:"Merge the content from the branch to your active branch",imageClass:"git-sprite-merge",
spriteClass:"gitCommandSprite",id:"eclipse.orion.git.merge",callback:function(m){i.getService("orion.git.provider").then(function(o){o.doMerge(m.HeadLocation,m.Name).then(function(p){i.getService("orion.page.message").then(function(s){var q=[];if(p.jsonData&&(p.jsonData.Result=="FAST_FORWARD"||p.jsonData.Result=="ALREADY_UP_TO_DATE")){d.query(".treeTableRow").forEach(function(C){d.toggleClass(C,"incomingCommitsdRow",false)});q.Severity="Ok";q.HTML=false;q.Message=p.jsonData.Result;h();s.setProgressResult(q)}else if(p.jsonData){var u=
m.HeadLocation.replace("commit/HEAD","status");q.Severity="Warning";q.HTML=true;q.Message="<span>"+p.jsonData.Result+'. Go to <a href="'+c.toUrl("git/git-status.html")+"#"+u+'">Git Status page</a>.<span>';s.setProgressResult(q)}else if(p.error){q.Severity="Error";if(p.error.responseText&&JSON.parse(p.error.responseText)){var y=JSON.parse(p.error.responseText);q.Message=y.DetailedMessage?y.DetailedMessage:y.Message}else q.Message=p.error.message;q.HTML=true;q.Message="<span>"+q.Message+' Go to <a href="'+
c.toUrl("git/git-status.html")+"#"+u+'">Git Status page</a>.<span>';s.setProgressResult(q)}})},function(p){i.getService("orion.page.message").then(function(s){var q=[],u=m.HeadLocation.replace("commit/HEAD","status");q.Severity="Error";q.HTML=true;q.Message="<span>"+d.fromJson(p.ioArgs.xhr.responseText).DetailedMessage+'. Go to <a href="'+c.toUrl("git/git-status.html")+"#"+u+'">Git Status page</a>.<span>';s.setProgressResult(q)})})})},visibleWhen:function(m){return m.Type==="RemoteTrackingBranch"||
m.Type==="Branch"&&!m.Current}});k.addCommand(r,"object");k.registerCommandContribution("eclipse.orion.git.merge",l+2);r=new a.Command({name:"Push",tooltip:"Push from your local branch into the remote branch",imageClass:"git-sprite-push",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.push",callback:function(m){var o=d.hash();if(m.RemoteLocation.length==1&&m.RemoteLocation[0].Children.length==1)f.getDefaultSshOptions(i).then(function(s){var q=arguments.callee;i.getService("orion.git.provider").then(function(u){i.getService("orion.page.message").then(function(y){var C=
u.doPush(m.RemoteLocation[0].Children[0].Location,"HEAD",true,false,null,s.gitSshUsername,s.gitSshPassword,s.knownHosts,s.gitPrivateKey,s.gitPassphrase);y.showWhile(C,"Pushing remote: "+o).then(function(v){f.handleProgressServiceResponse(v,s,i,function(w){if(w.Result.Severity=="Ok"){d.query(".treeTableRow").forEach(function(A){d.toggleClass(A,"outgoingCommitsdRow",false)});h()}},q,"Push Git Repository")})})})});else{var p=m.RemoteLocation;i.getService("orion.git.provider").then(function(s){s=new orion.git.widgets.RemotePrompterDialog({title:"Choose Branch",
serviceRegistry:i,gitClient:s,treeRoot:{Children:p},hideNewBranch:true,func:d.hitch(this,function(q,u){f.getDefaultSshOptions(i).then(function(y){var C=arguments.callee;i.getService("orion.git.provider").then(function(v){i.getService("orion.page.message").then(function(w){var A=v.doPush(q.Location,"HEAD",true,false,null,y.gitSshUsername,y.gitSshPassword,y.knownHosts,y.gitPrivateKey,y.gitPassphrase);w.showWhile(A,"Pushing remote: "+u).then(function(z){f.handleProgressServiceResponse(z,y,i,function(F){if(F.Result.Severity==
"Ok"){d.query(".treeTableRow").forEach(function(G){d.toggleClass(G,"outgoingCommitsdRow",false)});h()}},C,"Push Git Repository")})})})})})});s.startup();s.show()})}},visibleWhen:function(m){return m.Type==="LocalBranch"}});k.addCommand(r,"object");k.registerCommandContribution("eclipse.orion.git.push",l+3)};f.createGitClonesCommands=function(i,k,h,l,n,r){l=new a.Command({name:"Clone Repository",tooltip:"Clone an existing Git repository to a folder",id:"eclipse.cloneGitRepository",callback:function(){var m=
new orion.git.widgets.CloneGitRepositoryDialog({serviceRegistry:i,fileClient:r,func:function(o,p,s){f.getDefaultSshOptions(i).then(function(q){var u=arguments.callee;i.getService("orion.git.provider").then(function(y){i.getService("orion.page.message").then(function(C){var v=y.cloneGitRepository(s,o,p,h.defaultPath,q.gitSshUsername,q.gitSshPassword,q.knownHosts,q.gitPrivateKey,q.gitPassphrase);C.showWhile(v,"Cloning repository: "+o).then(function(w){f.handleProgressServiceResponse(w,q,i,function(){h.redisplayClonesList&&
d.hitch(h,h.redisplayClonesList)()},u,"Clone Git Repository")})})})})}});m.startup();m.show()},visibleWhen:function(){return true}});k.addCommand(l,"dom");l=new a.Command({name:"Init Repository",tooltip:"Create a new Git repository in a new folder",id:"eclipse.initGitRepository",callback:function(){var m=new orion.git.widgets.CloneGitRepositoryDialog({serviceRegistry:i,title:"Init Git Repository",fileClient:r,advancedOnly:true,func:function(o,p,s){f.getDefaultSshOptions(i).then(function(q){var u=
arguments.callee;i.getService("orion.git.provider").then(function(y){i.getService("orion.page.message").then(function(C){var v=y.cloneGitRepository(s,o,p,h.defaultPath);C.showWhile(v,"Initializing repository: "+s).then(function(w){f.handleProgressServiceResponse(w,q,i,function(){h.redisplayClonesList&&d.hitch(h,h.redisplayClonesList)()},u,"Init Git Repository")})})})})}});m.startup();m.show()},visibleWhen:function(){return true}});k.addCommand(l,"dom");l=new a.Command({name:"Delete",tooltip:"Delete the repository",
imageClass:"core-sprite-delete",id:"eclipse.git.deleteClone",visibleWhen:function(m){m=d.isArray(m)?m:[m];if(m.length===0)return false;for(var o=0;o<m.length;o++)if(!m[o].ContentLocation)return false;return true},callback:function(m){if(d.isArray(m)){if(confirm("Are you sure you want do delete "+m.length+" repositories?"))for(var o=0,p=0;p<m.length;p++)i.getService("orion.git.provider").then(function(s){s.removeGitRepository(m[p].Location).then(function(){o++;o>=m.length&&h.redisplayClonesList&&d.hitch(h,
h.redisplayClonesList)()},g)})}else confirm("Are you sure you want to delete "+m.Name+"?")&&i.getService("orion.git.provider").then(function(s){s.removeGitRepository(m.Location).then(function(){h.redisplayClonesList&&d.hitch(h,h.redisplayClonesList)()},g)})}});k.addCommand(l,"object");k.addCommand(l,"dom")}})();return f});
define("orion/git/git-commit-navigator",["dojo","orion/explorer","orion/util","orion/git/gitCommands"],function(c,d,a,e){var f={};f.GitCommitNavigator=function(){function g(j,i,k,h,l,n,r,m){this.registry=j;this.selection=i;this.checkbox=h!=null?h.checkbox:true;this.minimal=h!=null?h.minimal:false;this.parentId=l;this.pageTitleId=n;this.toolbarId=r;this.selectionToolsId=m;this.isDirectory=true;this.myTree=this.model=null;this.commitDetails=k;this.renderer=new f.GitCommitRenderer({checkbox:this.checkbox,
cachePrefix:"GitCommitsNavigator",minimal:this.minimal},this);this.commitDetails&&this.commitDetails.render(null)}g.prototype=new d.Explorer;g.prototype.loadCommitsList=function(j,i,k){var h=new c.Deferred;j=a.makeRelative(j);if(j===this._lastHash&&!k){h.callback();return h}this._lastHash=j;this._lastTreeRoot=i;var l=c.byId(this.parentId);(k=c.byId(l.id+"progress"))||(k=c.create("div",{id:l.id+"progress"},l,"only"));c.empty(k);if(i.status&&i.status!=200){l=i.message;try{var n=JSON.parse(i.responseText);
if(n.Message)l=n.Message}catch(r){}i.status!=404&&l!==""&&c.create("b",{innerHTML:"Error "+i.status+": "},k,"only");c.place(document.createTextNode(l),k,"last");this.toolbarId&&this.selectionToolsId&&e.updateNavTools(this.registry,this,this.toolbarId,this.selectionToolsId,i);h.callback();return h}b=c.create("b");c.place(document.createTextNode("Loading "),k,"last");c.place(document.createTextNode(j),b,"last");c.place(b,k,"last");c.place(document.createTextNode("..."),k,"last");var m=this;this.toolbarId&&
this.selectionToolsId&&e.updateNavTools(this.registry,this,this.toolbarId,this.selectionToolsId,i);this.registry.getService("orion.git.provider").then(function(o){var p=function(s,q){var u=new c.Deferred;o.doGitLog(s,function(y,C){if(C.xhr.status===200){h.callback();q?q(y.Children):u.callback(y.Children)}if(C.xhr.status===202){var v=new c.Deferred;v.callback(y);m.registry.getService("orion.page.message").then(function(w){w.showWhile(v,"Getting git log").then(function(A){h.callback();q?q(A.Result.JsonData.Children):
u.callback(A.Result.JsonData.Children)})})}});return u};if(i.Children){c.hitch(m,m.createTree(m.parentId,new d.ExplorerFlatModel(j,p,i.Children)));h.callback()}else c.hitch(m,m.createTree(m.parentId,new d.ExplorerFlatModel(j,p)))});return h};g.prototype.loadCommitDetails=function(j){this.commitDetails&&this.commitDetails.loadCommitDetails(j)};return g}();f.GitCommitRenderer=function(){function g(j,i){this._init(j);this.options=j;this.explorer=i}g.prototype=new d.SelectionRenderer;g.prototype.getCellHeaderElement=
function(j){if(!this.options.minimal)switch(j){case 0:return c.create("th",{style:"padding-left: 5px; padding-right: 5px",innerHTML:"<h2>Message</h2>"});case 1:return c.create("th",{style:"padding-left: 5px; padding-right: 5px",innerHTML:"<h2>Author</h2>"});case 2:return c.create("th",{style:"padding-left: 5px; padding-right: 5px",innerHTML:"<h2>Date</h2>"});case 3:return c.create("th",{style:"padding-left: 5px; padding-right: 5px",innerHTML:"<h2>Actions</h2>"});case 4:return c.create("th",{style:"padding-left: 5px; padding-right: 5px",
innerHTML:"<h2>Branches</h2>"});case 5:return c.create("th",{style:"padding-left: 5px; padding-right: 5px",innerHTML:"<h2>Tags</h2>"})}};g.prototype.setIncomingCommits=function(j){this.incomingCommits=j};g.prototype.setOutgoingCommits=function(j){this.outgoingCommits=j};g.prototype.getCellElement=function(j,i,k){var h=false;c.forEach(this.incomingCommits,function(o){if(i.Name===o.Name)h=true});var l=false;c.forEach(this.outgoingCommits,function(o){if(i.Name===o.Name)l=true});switch(j){case 0:var n,
r;j=document.createElement("td");n=c.create("div",{style:"margin-left: 5px; margin-right: 5px; margin-top: 5px; margin-bottom: 5px; padding-left: 20px;"},j,"only");r=c.create("a",{className:"navlinkonpage"},n,"last");if(this.explorer.commitDetails){c.connect(r,"onclick",r,c.hitch(this,function(){this.explorer.loadCommitDetails(i)}));c.connect(r,"onmouseover",r,function(){r.style.cursor="pointer"});c.connect(r,"onmouseout",r,function(){r.style.cursor="default"})}c.place(document.createTextNode(i.Message),
r,"only");if(h)c.toggleClass(k,"incomingCommitsdRow",true);else l&&c.toggleClass(k,"outgoingCommitsdRow",true);return j;case 1:return c.create("td",{style:"padding-left: 5px; padding-right: 5px",innerHTML:i.AuthorName+" ("+i.AuthorEmail+")"});case 2:return c.create("td",{style:"padding-left: 5px; padding-right: 5px",innerHTML:c.date.locale.format(new Date(i.Time),{formatLength:"short"})});case 3:if(this.options.minimal)break;k=this.getActionsColumn(i,k);c.style(k,"padding-left","5px");c.style(k,"padding-right",
"5px");return k;case 4:if(this.options.minimal)break;var m=document.createElement("td",{style:"padding-left: 5px; padding-right: 5px"});c.forEach(i.Branches,function(o){c.place(document.createTextNode(o.FullName),c.create("p",{style:"margin: 5px"},m,"last"),"only")});return m;case 5:if(this.options.minimal)break;m=document.createElement("td",{style:"padding-left: 5px; padding-right: 5px"});c.forEach(i.Tags,function(o){c.place(document.createTextNode(o.Name),c.create("p",{style:"margin: 5px"},m,"last"),
"only")});return m}};return g}();return f});
define("orion/links",[],function(){function c(d){this._init(d)}c.prototype={_init:function(d){this._registry=d.serviceRegistry;this._serviceRegistration=this._registry.registerService("orion.core.textlink",this)},_replaceLink:function(d,a,e,f,g){var j=d.search(e);if(j>0){a.appendChild(document.createTextNode(d.substring(0,j)));d=d.substring(j)}e=d.replace(e,"");j=d.substring(0,d.length-e.length);var i=j.split(" ",f);if(i.length===f){d=document.createElement("a");g=g;for(var k=0;k<f;k++)g=g.replace("%"+
(k+1),i[k]);d.setAttribute("href",g);d.innerHTML=j;a.appendChild(d);d=e}return d},addLinks:function(d,a){a=a||document.createElement("div");var e=this._registry.getServiceReferences("orion.core.linkScanner");if(e.length>0){var f=e[0];e=new RegExp(f.getProperty("pattern"),"i");var g=f.getProperty("words");f=f.getProperty("anchor");for(var j=d.search(e);j>=0;){d=this._replaceLink(d,a,e,g,f);j=d.search(e)}}d.length>0&&a.appendChild(document.createTextNode(d));return a}};c.prototype.constructor=c;return{TextLinkService:c}});
define("dojox/layout/ToggleSplitter",["dojo","dijit","dijit/layout/BorderContainer"],function(c,d){c.declare("dojox.layout.ToggleSplitter",[d.layout._Splitter],{open:true,closedThreshold:5,openSize:"",_closedSize:"0",templateString:'<div class="dijitSplitter dojoxToggleSplitter" dojoAttachEvent="onkeypress:_onKeyPress,onmousedown:_onMouseDown" tabIndex="0" role="separator"><div dojoAttachPoint="toggleNode" class="dijitSplitterThumb dojoxToggleSplitterIcon"></div></div>',postCreate:function(){this._started=
false;this.inherited(arguments);var a=this.region;c.addClass(this.domNode,"dojoxToggleSplitter"+a.charAt(0).toUpperCase()+a.substring(1));this.connect(this,"onDblClick","_toggleMe")},startup:function(){this.inherited(arguments);var a=this.child.domNode,e=c.style(a,this.horizontal?"height":"width");c.forEach(["toggleSplitterOpen","toggleSplitterClosedThreshold","toggleSplitterOpenSize"],function(f){var g=f.substring(14);g=g.charAt(0).toLowerCase()+g.substring(1);if(f in this.child)this[g]=this.child[f]},
this);if(!this.openSize)this.openSize=this.open?e+"px":"75px";this._openStyleProps=this._getStyleProps(a,true);this._started=true;this.set("open",this.open);return this},_onMouseUp:function(){c.disconnect(this._onMoveHandle);c.disconnect(this._onUpHandle);delete this._onMoveHandle;delete this._onUpHandle;delete this._startPosn},_onPrelimMouseMove:function(a){if(Math.abs((this._startPosn||0)-(this.horizontal?a.clientY:a.clientX))>=3){c.disconnect(this._onMoveHandle);this._startDrag(a)}},_onMouseDown:function(a){if(this.open){if(!this._onUpHandle)this._onUpHandle=
c.connect(c.body(),"onmouseup",this,"_onMouseUp");if(!this._onMoveHandle){this._startPosn=this.horizontal?a.clientY:a.clientX;this._onMoveHandle=c.connect(c.body(),"onmousemove",this,"_onPrelimMouseMove")}}},_handleOnChange:function(){var a=this.child.domNode,e;e=this.horizontal?"height":"width";if(this.open){var f=c.mixin({display:"block",overflow:"auto",visibility:"visible"},this._openStyleProps);f[e]=this._openStyleProps&&this._openStyleProps[e]?this._openStyleProps[e]:this.openSize;c.style(a,
f);this.connect(this.domNode,"onmousedown","_onMouseDown")}else{f=c.getComputedStyle(a);e=this._getStyleProps(a,true,f);f=this._getStyleProps(a,false,f);this._openStyleProps=e;c.style(a,f)}this._setStateClass();this.container._started&&this.container._layoutChildren(this.region)},_getStyleProps:function(a,e,f){f||(f=c.getComputedStyle(a));var g={},j=this.horizontal?"height":"width";g.visibility=e?f.visibility:"hidden";g[j]=e?a.style[j]||f[j]:this._closedSize;var i=["Top","Right","Bottom","Left"];
c.forEach(["padding","margin","border"],function(k){for(var h=0;h<i.length;h++){var l=k+i[h];if(k=="border")k+="Width";if(undefined!==f[l])g[l]=e?f[l]:0}});return g},_setStateClass:function(){if(this.open){c.removeClass(this.domNode,"dojoxToggleSplitterClosed");c.addClass(this.domNode,"dojoxToggleSplitterOpen");c.removeClass(this.toggleNode,"dojoxToggleSplitterIconClosed");c.addClass(this.toggleNode,"dojoxToggleSplitterIconOpen")}else{c.addClass(this.domNode,"dojoxToggleSplitterClosed");c.removeClass(this.domNode,
"dojoxToggleSplitterOpen");c.addClass(this.toggleNode,"dojoxToggleSplitterIconClosed");c.removeClass(this.toggleNode,"dojoxToggleSplitterIconOpen")}},_setOpenAttr:function(a){if(this._started){this.open=a;this._handleOnChange(a,true);this[this.open?"onOpen":"onClose"](this.child)}},onOpen:function(){},onClose:function(){},_toggleMe:function(a){a&&c.stopEvent(a);this.set("open",!this.open)},_onKeyPress:function(){this.inherited(arguments)}});c.extend(d._Widget,{toggleSplitterOpen:true,toggleSplitterClosedThreshold:5,
toggleSplitterOpenSize:""})});
define("orion/widgets/eWebBorderContainer",["dojo","dijit","dijit/layout/BorderContainer","dojox/layout/ToggleSplitter"],function(c,d){c.declare("orion.widgets.eWebBorderContainer",d.layout.BorderContainer,{_splitterClass:"orion.widgets.eWebSplitter",getPreferredLeftPaneWidth:function(){var a=this.getSizeCookie();return a<=0?c.position(this.getRightPane()).w*0.25:a},isLeftPaneOpen:function(){var a=this.getSplitter("left");if(a)return a.open;return false},getLeftPane:function(){if(this._left)return this._left;for(var a=
this.getChildren(),e=0;e<a.length;e++)if(a[e].region&&(a[e].region==="leading"||a[e].region==="left"))return this._left=a[e].domNode},getHidingPane:function(){return this.getLeftPane()},getRightPane:function(){if(this._center)return this._center;for(var a=this.getChildren(),e=0;e<a.length;e++)if(a[e].region&&a[e].region==="center")return this._center=a[e].domNode},getSizeCookie:function(){var a=this.getSplitter("left");if(a)return a.getSizeCookie();return 0},setSizeCookie:function(a){var e=this.getSplitter("left");
if(e)return e.setSizeCookie(a)},toggleLeftPaneState:function(){var a=this.getSplitter("left");a&&a.toggleHidingPaneState()},setToggleCallback:function(a){this.toggleCallback=a},toggle:function(){if(!this._left||!this._center)for(var a=this.getChildren(),e=0;e<a.length;e++)if(a[e].region&&a[e].region==="center")this._center=a[e].domNode;else if(a[e].region&&(a[e].region==="leading"||a[e].region==="left"))this._left=a[e].domNode;var f=this._left,g=this._center,j=c.position(f).w,i=this.isLeftPaneOpen(),
k;k=i?0:this.getPreferredLeftPaneWidth();i||this.toggleLeftPaneState();var h=f.style.overflow,l=g.style.overflow;(new c.Animation({node:f,duration:300,curve:[1,100],onAnimate:c.hitch(this,function(n){f.style.width=j+(k-j)*n/100+"px";f.style.overflow="hidden";g.style.overflow="hidden";this.layout()}),onEnd:c.hitch(this,function(){g.style.overflow=l;f.style.overflow=h;this.toggleCallback&&this.toggleCallback.apply();i?this.toggleLeftPaneState():this.setSizeCookie(null)})})).play()}});c.declare("orion.widgets.eWebSplitter",
dojox.layout.ToggleSplitter,{postCreate:function(){this.inherited(arguments);this.connect(this.toggleNode,"onmousedown","_onThumbMouseDown");this.connect(this.toggleNode,"onmouseover","_onThumbMouseOver");this.connect(this.domNode,"onmouseover","_onMouseOver");this.connect(this.toggleNode,"onmouseout","_onThumbMouseOut");this._openStateCookieName=this.container.id+"_"+this.region+"_open"},startup:function(){this.inherited(arguments);if(this.container.persist){var a=c.cookie(this._openStateCookieName);
if(a==="true")this.container.getHidingPane().style.width=this.getSizeCookie()+"px";else{a==="false"?this.set("open",false):this.set("open",true);this._handleOnChange()}}else{this.set("open",true);this._handleOnChange()}return this},_handleOnChange:function(){var a=this.child.domNode,e;e=this.horizontal?"height":"width";if(this.open){var f=c.mixin({display:"block",overflow:"auto",visibility:"visible"},this._openStyleProps);f[e]=this._openStyleProps&&this._openStyleProps[e]?this._openStyleProps[e]:
this.openSize;c.style(a,f);this.connect(this.domNode,"onmousedown","_onMouseDown")}else{f=c.getComputedStyle(a);e=this._getStyleProps(a,true,f);f=this._getStyleProps(a,false,f);this._openStyleProps=e;c.style(a,f)}this._setStateClass();if(this.container._started){a=0;if(this.open&&this.openSize)a=parseInt(this.openSize.replace("px",""),10);this.container._layoutChildren(this.region,a)}},_removeFocusVisual:function(a){c.stopEvent(a)},_onMouseDown:function(a){this.open?this._startDrag(a):this._removeFocusVisual(a)},
_onMouseOver:function(){this.domNode.style.cursor=this.open?"e-resize":"default"},_onThumbMouseDown:function(a){a.stopPropagation();this._removeFocusVisual(a);this.container.toggle()},_onThumbMouseOver:function(){this.toggleNode.style.backgroundColor="#AAAAAA"},_onThumbMouseOut:function(){this.toggleNode.style.backgroundColor="#DDDDDD"},_toggleMe:function(){},getSizeCookie:function(){if(this.container.persist){var a=c.cookie(this._cookieName);if(a)return parseInt(a.replace("px",""),10)}return 0},
setSizeCookie:function(){if(this.container.persist)c.cookie(this._cookieName,this.child.domNode.style[this.horizontal?"height":"width"],{expires:365})},toggleHidingPaneState:function(){this.set("open",!this.open);this.container.getHidingPane().style.visibility=this.open?"visible":"hidden";if(this.container.persist)c.cookie(this._openStateCookieName,this.open?"true":"false",{expires:365})}});c.declare("orion.widgets.eWebBorderContainerReverse",d.layout.BorderContainer,{_splitterClass:"orion.widgets.eWebSplitter",
getPreferredRightPaneWidth:function(){var a=this.getSizeCookie();return a<=0?c.position(this.getLeftPane()).w*0.25:a},isRightPaneOpen:function(){var a=this.getSplitter("right");if(a)return a.open;return false},getRightPane:function(){if(this._right)return this._right;for(var a=this.getChildren(),e=0;e<a.length;e++)if(a[e].region&&(a[e].region==="trailing"||a[e].region==="right"))return this._right=a[e].domNode},getHidingPane:function(){return this.getRightPane()},getLeftPane:function(){if(this._center)return this._center;
for(var a=this.getChildren(),e=0;e<a.length;e++)if(a[e].region&&a[e].region==="center")return this._center=a[e].domNode},getSizeCookie:function(){var a=this.getSplitter("right");if(a)return a.getSizeCookie();return 0},setSizeCookie:function(a){var e=this.getSplitter("right");if(e)return e.setSizeCookie(a)},toggleRightPaneState:function(){var a=this.getSplitter("right");a&&a.toggleHidingPaneState()},setToggleCallback:function(a){this.toggleCallback=a},toggle:function(){if(!this._right||!this._center)for(var a=
this.getChildren(),e=0;e<a.length;e++)if(a[e].region&&a[e].region==="center")this._center=a[e].domNode;else if(a[e].region&&(a[e].region==="trailing"||a[e].region==="right"))this._right=a[e].domNode;var f=this._right,g=this._center,j=c.position(f).w,i=this.isRightPaneOpen(),k;k=i?0:this.getPreferredRightPaneWidth();i||this.toggleRightPaneState();var h=f.style.overflow,l=g.style.overflow;(new c.Animation({node:f,duration:300,curve:[1,100],onAnimate:c.hitch(this,function(n){f.style.width=j+(k-j)*n/
100+"px";f.style.overflow="hidden";g.style.overflow="hidden";this.layout()}),onEnd:c.hitch(this,function(){g.style.overflow=l;f.style.overflow=h;this.toggleCallback&&this.toggleCallback.apply();i?this.toggleRightPaneState():this.setSizeCookie(null)})})).play()}})});
define("git-log",["require","dojo","orion/bootstrap","orion/status","orion/commands","orion/auth","orion/dialogs","orion/selection","orion/fileClient","orion/searchClient","orion/globalCommands","orion/git/gitClient","orion/breadcrumbs","orion/ssh/sshTools","orion/git/git-commit-details","orion/git/git-commit-navigator","orion/git/gitCommands","orion/links","dojo/parser","dojo/hash","dijit/layout/BorderContainer","dijit/layout/ContentPane","orion/widgets/eWebBorderContainer"],function(c,d,a,e,f,g,
j,i,k,h,l,n,r,m,o,p,s,q){function u(H){var I=d.hash();d.xhrGet({url:I,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(J,N){var Q=function(O){var W=new k.FileClient(G);w(W,H,O);if(O.Type==="RemoteTrackingBranch")G.getService("orion.git.provider").then(function(aa){aa.getLog(O.HeadLocation,O.Id,function(da,t){function x(M){H.renderer.setIncomingCommits(M.Children);H.renderer.setOutgoingCommits([]);H.loadCommitsList(O.CommitLocation+"?"+(new d._Url(I)).query,O)}if(t.xhr.status===
200)x(da);else if(t.xhr.status===202){var D=new d.Deferred;D.callback(da);G.getService("orion.page.message").then(function(M){M.showWhile(D,"Getting git incoming changes").then(function(R){x(R.Result.JsonData)})})}})});else if(O.toRef)O.toRef.RemoteLocation&&O.toRef.RemoteLocation.length===1&&O.toRef.RemoteLocation[0].Children&&O.toRef.RemoteLocation[0].Children.length===1?d.xhrGet({url:O.toRef.RemoteLocation[0].Children[0].Location,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(aa){G.getService("orion.git.provider").then(function(da){da.getLog(aa.CommitLocation,
"HEAD",function(t,x){function D(R){H.renderer.setIncomingCommits([]);H.renderer.setOutgoingCommits(R.Children);H.loadCommitsList(d.hash(),O)}if(x.xhr.status===200)D(t);else if(x.xhr.status===202){var M=new d.Deferred;M.callback(t);G.getService("orion.page.message").then(function(R){R.showWhile(M,"Getting git outgoing changes").then(function(T){D(T.Result.JsonData)})})}})})},error:function(){H.loadCommitsList(d.hash(),O)}}):H.loadCommitsList(d.hash(),O);else H.loadCommitsList(d.hash(),O)};if(N.xhr.status===
200)Q(J);else if(N.xhr.status===202){var P=new d.Deferred;P.callback(J);G.getService("orion.page.message").then(function(O){O.showWhile(P,"Getting git log").then(function(W){Q(W.Result.JsonData)})})}},error:function(J,N){if(N.xhr.status==401||N.xhr.status==403){var Q=this;g.handleAuthenticationError(N.xhr,function(){d.xhrGet(Q)})}else H.loadCommitsList(d.hash(),J)}})}function y(){var H=d.hash().split("gitapi/commit/");if(H.length===2){H=H[1].split("/");if(H.length>1){fileURI="";for(var I=0;I<H.length-
1;I++)fileURI+="/"+H[I];fileURI+="/"+H[H.length-1].split("?")[0]}}return fileURI}function C(){var H=d.hash().split("gitapi/commit/");if(H.length===2){H=H[1].split("/");if(H.length>1){branch=H[0];fileURI="";for(var I=1;I<H.length-1;I++)fileURI+="/"+H[I];fileURI+="/"+H[H.length-1].split("?")[0]}}return fileURI}function v(){var H=d.hash().split("gitapi/remote/");if(H.length===2){H=H[1].split("/");if(H.length>2){branch=H[0]+"/"+H[1];fileURI="";for(var I=2;I<H.length-1;I++)fileURI+="/"+H[I];fileURI+="/"+
H[H.length-1].split("?")[0]}}return fileURI}function w(H,I,J){var N=J.Type==="RemoteTrackingBranch",Q=J.toRef&&J.toRef.Type==="Branch",P;(P=N?v():Q?C():y())&&H.read(P,true).then(d.hitch(this,function(O){var W;W=N?J.Name:Q?J.toRef.Name:null;if(J&&J.CloneLocation){var aa=J.CloneLocation;G.getService("orion.git.provider").then(function(t){t.getGitClone(aa).then(function(x){x.Children&&x.Children.length>0?F(W,x.Children[0].Name,x.Children[0].ContentLocation,N,Q):F(W,x.Name,x.ContentLocation,N,Q)})})}else F(W);
var da=d.byId("location");if(da){d.empty(da);new r.BreadCrumbs({container:"location",resource:O,makeHref:function(t,x){z(H,t,x,N)}})}I.isDirectory=O.Directory;s.updateNavTools(G,I,"pageActions","selectionTools",I._lastTreeRoot);I.updateCommands();O.Directory&&d.query(".navlinkonpage").forEach(function(t){t.removeAttribute("href")})}),d.hitch(this,function(O){console.error("Error loading file metadata: "+O.message)}))}function A(){var H=dijit.byId("orion.innerNavigator");H.isRightPaneOpen()&&H.toggle();
window.document.onkeydown=function(I){I=I||window.event;var J=false;if(I.ctrlKey&&I.keyCode===79){H.toggle();J=true}if(J)if(window.document.all)I.keyCode=0;else{I.preventDefault();I.stopPropagation()}}}function z(H,I,J,N){J&&H.read(J,true).then(d.hitch(this,function(Q){if(N)G.getService("orion.git.provider").then(function(P){Q.Git&&P.getDefaultRemoteBranch(Q.Git.RemoteLocation,function(O){I.href=c.toUrl("git/git-log.html")+"#"+O.Location+"?page=1"})});else if(Q.Git)I.href=c.toUrl("git/git-log.html")+
"#"+Q.Git.CommitLocation+"?page=1"}),d.hitch(this,function(Q){console.error("Error loading file metadata: "+Q.message)}))}function F(H,I,J,N,Q){var P=d.byId("pageTitle"),O="Git Log ";if(N)O+="for remote branch <b>"+H+"</b>";else if(Q)O+="for local branch <b>"+H+"</b>";if(J)O=O+" on <a href='"+c.toUrl("git/git-clone.html")+"#"+J+"'>"+I+"</a>";P.innerHTML=O;if(H)document.title=I?H+" on "+I:H}var G;d.addOnLoad(function(){a.startup().then(function(H){G=H.serviceRegistry;H=H.preferences;document.body.style.visibility=
"visible";d.parser.parse();new e.StatusReportingService(G,"statusPane","notifications");new j.DialogService(G);var I=new i.Selection(G);new m.SshService(G);var J=new f.CommandService({serviceRegistry:G,selection:I}),N=new q.TextLinkService({serviceRegistry:G});new n.GitService(G);var Q=new h.Searcher({serviceRegistry:G,commandService:J});N=new o.CommitDetails({parent:"commitDetailsPane",commandService:J,linkService:N,detailsPane:dijit.byId("orion.innerNavigator")});var P=new p.GitCommitNavigator(G,
I,N,null,"explorer-tree","pageTitle","pageActions","selectionTools");l.generateBanner("toolbar",G,J,H,Q,P);s.createFileCommands(G,J,P,"pageActions","selectionTools");J.addCommandGroup("eclipse.gitGroup.nav",200,"More");J.addCommandGroup("eclipse.gitGroup.page",100,null,null,"pageActions");J.addCommandGroup("eclipse.selectionGroup",500,"More actions",null,"selectionTools");J.registerCommandContribution("eclipse.openGitCommit",1);J.registerCommandContribution("eclipse.compareWithWorkingTree",2);J.registerCommandContribution("eclipse.compareGitCommits",
1,"selectionTools","eclipse.selectionGroup");J.registerCommandContribution("eclipse.orion.git.fetch",100,"pageActions","eclipse.gitGroup.page");J.registerCommandContribution("eclipse.orion.git.fetchForce",100,"pageActions","eclipse.gitGroup.page");J.registerCommandContribution("eclipse.orion.git.merge",100,"pageActions","eclipse.gitGroup.page");J.registerCommandContribution("eclipse.orion.git.switchToCurrentLocal",100,"pageActions","eclipse.gitGroup.page");J.registerCommandContribution("eclipse.orion.git.push",
100,"pageActions","eclipse.gitGroup.page");J.registerCommandContribution("eclipse.orion.git.pushForce",100,"pageActions","eclipse.gitGroup.page");J.registerCommandContribution("eclipse.orion.git.switchToRemote",100,"pageActions","eclipse.gitGroup.page");J.registerCommandContribution("eclipse.orion.git.previousLogPage",200,"pageActions","eclipse.gitGroup.page");J.registerCommandContribution("eclipse.orion.git.nextLogPage",201,"pageActions","eclipse.gitGroup.page");J.registerCommandContribution("eclipse.orion.git.addTag",
3);J.registerCommandContribution("eclipse.orion.git.cherryPick",3);u(P);A(P);d.subscribe("/dojo/hashchange",P,function(){u(P)})})})});