/*

 Copyright (c) 2011 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2011 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation
 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

 Copyright (c) 2009, 2011 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2010,2011 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2011 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2011 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2011 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2011 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2011, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2010, 2011 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2010, 2011 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2011 IBM Corporation and others. 
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2011 IBM Corporation and others. 
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2011 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2011 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2010, 2011 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: 
 Felipe Heidrich (IBM Corporation) - initial API and implementation
 Silenio Quarti (IBM Corporation) - initial API and implementation

 Copyright (c) 2010, 2011 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2010, 2011 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation
 Andy Clement (vmware) - bug 344614

 Copyright (c) 2010, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2011 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2010, 2011 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2010, 2011 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2010, 2011 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2011 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2009, 2011 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - _initial API and implementation

 Copyright (c) 2010, 2011 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2009, 2011 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2009, 2011 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2011 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2010, 2011 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2011 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2011 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2010, 2012 IBM Corporation and others 
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2011, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2011 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2011 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2010, 2011 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2011 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2011 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2010, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2010, 2011 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2010, 2011 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2010, 2011 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2011 IBM Corporation and others. 
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2011, 2012 IBM Corporation and others. 
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2011, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2004, 2011, The Dojo Foundation and others. All Rights Reserved.
 Available via Academic Free License >= 2.1 OR the modified BSD license.
 see: http://dojotoolkit.org/license for details

 Contributors:
 Dojo Foundation: _handleOnChange function, and cookie management code
 IBM Corporation: Initial API and implementation of the remainder of the script

 Copyright (c) 2010, 2011 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation
*/
(function(){function b(a,d,e){(function(){if(typeof this.loadFirebugConsole=="function")this.loadFirebugConsole();else{this.console=this.console||{};for(var f=["assert","count","debug","dir","dirxml","error","group","groupEnd","info","profile","profileEnd","time","timeEnd","trace","warn","log"],g=0,h;h=f[g++];)console[h]||function(){var r=h+"";console[r]="log"in console?function(){var s=Array.apply({},arguments);s.unshift(r+":");console.log(s.join(" "))}:function(){};console[r]._fake=true}()}if(typeof a==
"undefined")a={_scopeName:"dojo",_scopePrefix:"",_scopePrefixArgs:"",_scopeSuffix:"",_scopeMap:{},_scopeMapRev:{}};var j=a;if(typeof d=="undefined")d={_scopeName:"dijit"};if(typeof e=="undefined")e={_scopeName:"dojox"};if(!j._scopeArgs)j._scopeArgs=[a,d,e];j.global=this;j.config={isDebug:false,debugAtAllCosts:false};if(f=typeof djConfig!="undefined"?djConfig:typeof dojoConfig!="undefined"?dojoConfig:null)for(var k in f)j.config[k]=f[k];a.locale=j.config.locale;k="$Rev: 24595 $".match(/\d+/);a.version=
{major:1,minor:6,patch:1,flag:"",revision:k?+k[0]:NaN,toString:function(){with(j.version)return major+"."+minor+"."+patch+flag+" ("+revision+")"}};typeof OpenAjax!="undefined"&&OpenAjax.hub.registerLibrary(a._scopeName,"http://dojotoolkit.org",j.version.toString());var l,m,n={};for(g in{toString:1}){l=[];break}a._extraNames=l=l||["hasOwnProperty","valueOf","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","constructor"];m=l.length;a._mixin=function(r,s){var p,q,o;for(p in s){q=s[p];
if(!(p in r)||r[p]!==q&&(!(p in n)||n[p]!==q))r[p]=q}if(m&&s)for(o=0;o<m;++o){p=l[o];q=s[p];if(!(p in r)||r[p]!==q&&(!(p in n)||n[p]!==q))r[p]=q}return r};a.mixin=function(r){r||(r={});for(var s=1,p=arguments.length;s<p;s++)j._mixin(r,arguments[s]);return r};a._getProp=function(r,s,p){p=p||j.global;for(var q=0,o;p&&(o=r[q]);q++){if(q==0&&j._scopeMap[o])o=j._scopeMap[o];p=o in p?p[o]:s?(p[o]={}):undefined}return p};a.setObject=function(r,s,p){var q=r.split(".");r=q.pop();return(p=j._getProp(q,true,
p))&&r?(p[r]=s):undefined};a.getObject=function(r,s,p){return j._getProp(r.split("."),s,p)};a.exists=function(r,s){return j.getObject(r,false,s)!==undefined};a.eval=function(r){return j.global.eval?j.global.eval(r):eval(r)};j.deprecated=j.experimental=function(){}})();return{dojo:a,dijit:d,dojox:e}}if(this.define)define("dojo/_base/_loader/bootstrap",[],function(){var a=b();a.dojo._dijit=a.dijit;a.dojo._dojox=a.dojox;return a.dojo});else{var c=b();dojo=c.dojo;dijit=c.dijit;dojox=c.dojox}})();
define("dojo/lib/backCompat",["require","dojo/_base/_loader/bootstrap"],function(b,c){var a=["_moduleHasPrefix","_loadPath","_loadUri","_loadUriAndCheck","loaded","_callLoaded","_getModuleSymbols","_loadModule","require","provide","platformRequire","requireIf","requireAfterIf","registerModulePath"],d,e;for(d=0;d<a.length;){e=a[d++];c[e]=function(r){return function(){console.warn("dojo."+r+" not available when using an AMD loader.")}}(e)}var f=function(r){var s=[],p;for(p=0;p<r.length;)s.push(r[p++]);
return s},g=function(r,s){return s?typeof s=="string"?function(){r[s]()}:function(){s.call(r)}:r};c.ready=c.addOnLoad=function(r,s){b.ready(s?g(r,s):r)};c.addOnLoad(function(){c.postLoad=c.config.afterOnLoad=true});if(a=c.config.addOnLoad)c.addOnLoad[a instanceof Array?"apply":"call"](c,a);var h=c._loaders=[],j=function(){var r=h.slice(0);for(Array.prototype.splice.apply(h,[0,h.length]);r.length;)r.shift().call()};h.unshift=function(){Array.prototype.unshift.apply(h,f(arguments));b.ready(j)};h.splice=
function(){Array.prototype.splice.apply(h,f(arguments));b.ready(j)};var k=c._unloaders=[];c.unloaded=function(){for(;k.length;)k.pop().call()};c._onto=function(r,s,p){r.push(p?g(s,p):s)};c._modulesLoaded=function(){};c.loadInit=function(r){r()};var l=function(r){return r.replace(/\./g,"/")};c.getL10nName=function(r,s,p){p=p?p.toLowerCase():c.locale;r="i18n!"+l(r);return/root/i.test(p)?r+"/nls/"+s:r+"/nls/"+p+"/"+s};c.requireLocalization=function(r,s,p){if(b.vendor!="altoviso.com")p=!p||p.toLowerCase()===
c.locale?"root":p;return b(c.getL10nName(r,s,p))};c.i18n={getLocalization:c.requireLocalization,normalizeLocale:function(r){r=r?r.toLowerCase():c.locale;if(r=="root")r="ROOT";return r}};var m=/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/,n=/^((([^\[:]+):)?([^@]+)@)?(\[([^\]]+)\]|([^\[:]*))(:([0-9]+))?$/;c._Url=function(){for(var r=arguments,s=[r[0]],p=1;p<r.length;p++)if(r[p]){var q=new c._Url(r[p]+"");s=new c._Url(s[0]+"");if(q.path==""&&!q.scheme&&!q.authority&&!q.query){if(q.fragment!=
null)s.fragment=q.fragment;q=s}else if(!q.scheme){q.scheme=s.scheme;if(!q.authority){q.authority=s.authority;if(q.path.charAt(0)!="/"){s=(s.path.substring(0,s.path.lastIndexOf("/")+1)+q.path).split("/");for(var o=0;o<s.length;o++)if(s[o]==".")if(o==s.length-1)s[o]="";else{s.splice(o,1);o--}else if(o>0&&!(o==1&&s[0]=="")&&s[o]==".."&&s[o-1]!="..")if(o==s.length-1){s.splice(o,1);s[o-1]=""}else{s.splice(o-1,2);o-=2}q.path=s.join("/")}}}s=[];q.scheme&&s.push(q.scheme,":");q.authority&&s.push("//",q.authority);
s.push(q.path);q.query&&s.push("?",q.query);q.fragment&&s.push("#",q.fragment)}this.uri=s.join("");p=this.uri.match(m);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(n);this.user=p[3]||null;this.password=p[4]||null;this.host=p[6]||p[7];this.port=p[9]||null}};c._Url.prototype.toString=function(){return this.uri};c.moduleUrl=function(r,s){if(!r)return null;
r=l(r)+(s?"/"+s:"");s="";var p=r.match(/(.+)(\.[^\/]*)$/);if(p){r=p[1];s=p[2]}return new c._Url(b.nameToUrl(r,s))};return c});
define("dojo/_base/_loader/hostenv_browser",["dojo/lib/backCompat"],function(b){if(typeof window!="undefined"){b.isBrowser=true;b._name="browser";(function(){var a=b;if(document&&document.getElementsByTagName)for(var d=document.getElementsByTagName("script"),e=/dojo(\.xd)?\.js(\W|$)/i,f=0;f<d.length;f++){var g=d[f].getAttribute("src");if(g){var h=g.match(e);if(h){if(!a.config.baseUrl)a.config.baseUrl=g.substring(0,h.index);if(d=d[f].getAttribute("djConfig")||d[f].getAttribute("data-dojo-config")){d=
eval("({ "+d+" })");for(var j in d)b.config[j]=d[j]}break}}}a.baseUrl=a.config.baseUrl;j=navigator;d=j.userAgent;e=j.appVersion;f=parseFloat(e);if(d.indexOf("Opera")>=0)a.isOpera=f;if(d.indexOf("AdobeAIR")>=0)a.isAIR=1;a.isKhtml=e.indexOf("Konqueror")>=0?f:0;a.isWebKit=parseFloat(d.split("WebKit/")[1])||undefined;a.isChrome=parseFloat(d.split("Chrome/")[1])||undefined;a.isMac=e.indexOf("Macintosh")>=0;if((g=Math.max(e.indexOf("WebKit"),e.indexOf("Safari"),0))&&!b.isChrome){a.isSafari=parseFloat(e.split("Version/")[1]);
if(!a.isSafari||parseFloat(e.substr(g+7))<=419.3)a.isSafari=2}if(d.indexOf("Gecko")>=0&&!a.isKhtml&&!a.isWebKit)a.isMozilla=a.isMoz=f;if(a.isMoz)a.isFF=parseFloat(d.split("Firefox/")[1]||d.split("Minefield/")[1])||undefined;if(document.all&&!a.isOpera){a.isIE=parseFloat(e.split("MSIE ")[1])||undefined;if((d=document.documentMode)&&d!=5&&Math.floor(a.isIE)!=d)a.isIE=d}if(b.isIE&&window.location.protocol==="file:")b.config.ieForceActiveXXhr=true;a.isQuirks=document.compatMode=="BackCompat";a.locale=
b.config.locale||(a.isIE?j.userLanguage:j.language).toLowerCase();a._XMLHTTP_PROGIDS=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"];a._xhrObj=function(){var p,q;if(!b.isIE||!b.config.ieForceActiveXXhr)try{p=new XMLHttpRequest}catch(o){}if(!p)for(var t=0;t<3;++t){var u=a._XMLHTTP_PROGIDS[t];try{p=new ActiveXObject(u)}catch(w){q=w}if(p){a._XMLHTTP_PROGIDS=[u];break}}if(!p)throw new Error("XMLHTTP not available: "+q);return p};a._isDocumentOk=function(p){p=p.status||0;var q=location.protocol;
return p>=200&&p<300||p==304||p==1223||!p&&(q=="file:"||q=="chrome:"||q=="chrome-extension:"||q=="app:")};var k=window.location+"";var l=(j=document.getElementsByTagName("base"))&&j.length>0;a._getText=function(p,q){var o=a._xhrObj();if(!l&&b._Url)p=(new b._Url(k,p)).toString();if(a.config.cacheBust){p+="";p+=(p.indexOf("?")==-1?"?":"&")+String(a.config.cacheBust).replace(/\W+/g,"")}o.open("GET",p,false);try{o.send(null);if(!a._isDocumentOk(o)){var t=Error("Unable to load "+p+" status:"+o.status);
t.status=o.status;t.responseText=o.responseText;throw t;}}catch(u){if(q)return null;throw u;}return o.responseText};var m=window,n=function(p,q){var o=m.attachEvent||m.addEventListener;p=m.attachEvent?p:p.substring(2);o(p,function(){q.apply(m,arguments)},false)};a._windowUnloaders=[];a.windowUnloaded=function(){for(var p=a._windowUnloaders;p.length;)p.pop()();a=null};var r=0;a.addOnWindowUnload=function(p,q){a._onto(a._windowUnloaders,p,q);if(!r){r=1;n("onunload",a.windowUnloaded)}};var s=0;a.addOnUnload=
function(p,q){a._onto(a._unloaders,p,q);if(!s){s=1;n("onbeforeunload",b.unloaded)}}})();b._initFired=false;b._loadInit=function(){if(b._scrollIntervalId){clearInterval(b._scrollIntervalId);b._scrollIntervalId=0}if(!b._initFired){b._initFired=true;!b.config.afterOnLoad&&window.detachEvent&&window.detachEvent("onload",b._loadInit);b._inFlightCount==0&&b._modulesLoaded()}};if(!b.config.afterOnLoad)if(document.addEventListener){document.addEventListener("DOMContentLoaded",b._loadInit,false);window.addEventListener("load",
b._loadInit,false)}else if(window.attachEvent){window.attachEvent("onload",b._loadInit);if(!b.config.skipIeDomLoaded&&self===self.top)b._scrollIntervalId=setInterval(function(){try{if(document.body){document.documentElement.doScroll("left");b._loadInit()}}catch(a){}},30)}if(b.isIE)try{(function(){document.namespaces.add("v","urn:schemas-microsoft-com:vml");var a=["*","group","roundrect","oval","shape","rect","imagedata","path","textpath","text"],d=0,e=1,f=document.createStyleSheet();if(b.isIE>=8){d=
1;e=a.length}for(;d<e;++d)f.addRule("v\\:"+a[d],"behavior:url(#default#VML); display:inline-block")})()}catch(c){}}(function(){var a=b.config.modulePaths;if(a)for(var d in a)b.registerModulePath(d,a[d])})();b.config.isDebug&&b.require("dojo._firebug.firebug");if(b.config.debugAtAllCosts){b.require("dojo._base._loader.loader_debug");b.require("dojo.i18n")}return b});define("dojo/lib/kernel",["dojo/_base/_loader/hostenv_browser"],function(b){return dojo=b});
define("dojo/_base/lang",["dojo/lib/kernel"],function(b){(function(){var c=Object.prototype.toString;b.isString=function(j){return typeof j=="string"||j instanceof String};b.isArray=function(j){return j&&(j instanceof Array||typeof j=="array")};b.isFunction=function(j){return c.call(j)==="[object Function]"};b.isObject=function(j){return j!==undefined&&(j===null||typeof j=="object"||b.isArray(j)||b.isFunction(j))};b.isArrayLike=function(j){return j&&j!==undefined&&!b.isString(j)&&!b.isFunction(j)&&
!(j.tagName&&j.tagName.toLowerCase()=="form")&&(b.isArray(j)||isFinite(j.length))};b.isAlien=function(j){return j&&!b.isFunction(j)&&/\{\s*\[native code\]\s*\}/.test(String(j))};b.extend=function(j){for(var k=1,l=arguments.length;k<l;k++)b._mixin(j.prototype,arguments[k]);return j};b._hitchArgs=function(j,k){var l=b._toArray(arguments,2),m=b.isString(k);return function(){var n=b._toArray(arguments),r=m?(j||b.global)[k]:k;return r&&r.apply(j||this,l.concat(n))}};b.hitch=function(j,k){if(arguments.length>
2)return b._hitchArgs.apply(b,arguments);if(!k){k=j;j=null}if(b.isString(k)){j=j||b.global;if(!j[k])throw['dojo.hitch: scope["',k,'"] is null (scope="',j,'")'].join("");return function(){return j[k].apply(j,arguments||[])}}return!j?k:function(){return k.apply(j,arguments||[])}};b.delegate=b._delegate=function(){function j(){}return function(k,l){j.prototype=k;k=new j;j.prototype=null;l&&b._mixin(k,l);return k}}();var a=function(j,k,l){return(l||[]).concat(Array.prototype.slice.call(j,k||0))},d=function(j,
k,l){l=l||[];for(k=k||0;k<j.length;k++)l.push(j[k]);return l};b._toArray=b.isIE?function(j){return(j.item?d:a).apply(this,arguments)}:a;b.partial=function(){return b.hitch.apply(b,[null].concat(b._toArray(arguments)))};var e=b._extraNames,f=e.length,g={};b.clone=function(j){if(!j||typeof j!="object"||b.isFunction(j))return j;if(j.nodeType&&"cloneNode"in j)return j.cloneNode(true);if(j instanceof Date)return new Date(j.getTime());if(j instanceof RegExp)return new RegExp(j);var k,l,m,n;if(b.isArray(j)){k=
[];l=0;for(m=j.length;l<m;++l)l in j&&k.push(b.clone(j[l]))}else k=j.constructor?new j.constructor:{};for(n in j){m=j[n];if(!(n in k)||k[n]!==m&&(!(n in g)||g[n]!==m))k[n]=b.clone(m)}if(f)for(l=0;l<f;++l){n=e[l];m=j[n];if(!(n in k)||k[n]!==m&&(!(n in g)||g[n]!==m))k[n]=m}return k};b.trim=String.prototype.trim?function(j){return j.trim()}:function(j){return j.replace(/^\s\s*/,"").replace(/\s\s*$/,"")};var h=/\{([^\}]+)\}/g;b.replace=function(j,k,l){return j.replace(l||h,b.isFunction(k)?k:function(m,
n){return b.getObject(n,false,k)})}})();return b});
define("dojo/_base/array",["dojo/lib/kernel","dojo/_base/lang"],function(b){(function(){var c=function(d,e,f){return[typeof d=="string"?d.split(""):d,e||b.global,typeof f=="string"?new Function("item","index","array",f):f]},a=function(d,e,f,g){var h=c(e,g,f);e=h[0];f=0;for(g=e.length;f<g;++f){var j=!!h[2].call(h[1],e[f],f,e);if(d^j)return j}return d};b.mixin(b,{indexOf:function(d,e,f,g){var h=1,j=d.length||0,k=0;if(g){k=j-1;h=j=-1}if(f!=undefined)k=f;if(g&&k>j||k<j)for(;k!=j;k+=h)if(d[k]==e)return k;
return-1},lastIndexOf:function(d,e,f){return b.indexOf(d,e,f,true)},forEach:function(d,e,f){if(d&&d.length){var g=c(d,f,e);d=g[0];e=0;for(f=d.length;e<f;++e)g[2].call(g[1],d[e],e,d)}},every:function(d,e,f){return a(true,d,e,f)},some:function(d,e,f){return a(false,d,e,f)},map:function(d,e,f,g){var h=c(d,f,e);d=h[0];e=g?new g:[];f=0;for(g=d.length;f<g;++f)e.push(h[2].call(h[1],d[f],f,d));return e},filter:function(d,e,f){var g=c(d,f,e);d=g[0];e=[];f=0;for(var h=d.length;f<h;++f)g[2].call(g[1],d[f],f,
d)&&e.push(d[f]);return e}})})();return b});
define("dojo/_base/declare",["dojo/lib/kernel","dojo/_base/lang","dojo/_base/array"],function(b){(function(){function c(z,E){throw new Error("declare"+(E?" "+E:"")+": "+z);}function a(z,E){for(var D=[],F=[{cls:0,refs:[]}],I={},L=1,G=z.length,O=0,M,U,S,$,N;O<G;++O){if(M=z[O])t.call(M)!="[object Function]"&&c("mixin #"+O+" is not a callable constructor.",E);else c("mixin #"+O+" is unknown. Did you use dojo.require to pull it in?",E);U=M._meta?M._meta.bases:[M];S=0;for(M=U.length-1;M>=0;--M){$=U[M].prototype;
if(!$.hasOwnProperty("declaredClass"))$.declaredClass="uniqName_"+w++;$=$.declaredClass;if(!I.hasOwnProperty($)){I[$]={count:0,refs:[],cls:U[M]};++L}$=I[$];if(S&&S!==$){$.refs.push(S);++S.count}S=$}++S.count;F[0].refs.push(S)}for(;F.length;){S=F.pop();D.push(S.cls);for(--L;N=S.refs,N.length==1;){S=N[0];if(!S||--S.count){S=0;break}D.push(S.cls);--L}if(S){O=0;for(G=N.length;O<G;++O){S=N[O];--S.count||F.push(S)}}}L&&c("can't build consistent linearization",E);M=z[0];D[0]=M?M._meta&&M===D[D.length-M._meta.bases.length]?
M._meta.bases.length:1:0;return D}function d(z,E,D){var F,I,L,G,O,M,U,S=this._inherited=this._inherited||{};if(typeof z=="string"){F=z;z=E;E=D}D=0;G=z.callee;(F=F||G.nom)||c("can't deduce a name to call inherited()",this.declaredClass);O=this.constructor._meta;L=O.bases;U=S.p;if(F!=x){if(S.c!==G){U=0;M=L[0];O=M._meta;if(O.hidden[F]!==G){(I=O.chains)&&typeof I[F]=="string"&&c("calling chained method with inherited: "+F,this.declaredClass);do{O=M._meta;I=M.prototype;if(O&&(I[F]===G&&I.hasOwnProperty(F)||
O.hidden[F]===G))break}while(M=L[++U]);U=M?U:-1}}if(M=L[++U]){I=M.prototype;if(M._meta&&I.hasOwnProperty(F))D=I[F];else{G=o[F];do{I=M.prototype;if((D=I[F])&&(M._meta?I.hasOwnProperty(F):D!==G))break}while(M=L[++U])}}D=M&&D||o[F]}else{if(S.c!==G){U=0;if((O=L[0]._meta)&&O.ctor!==G){I=O.chains;if(!I||I.constructor!=="manual")c("calling chained constructor with inherited",this.declaredClass);for(;M=L[++U];)if((O=M._meta)&&O.ctor===G)break;U=M?U:-1}}for(;M=L[++U];)if(D=(O=M._meta)?O.ctor:M)break;D=M&&
D}S.c=D;S.p=U;if(D)return E===true?D:D.apply(this,E||z)}function e(z,E){if(typeof z=="string")return this.inherited(z,E,true);return this.inherited(z,true)}function f(z){for(var E=this.constructor._meta.bases,D=0,F=E.length;D<F;++D)if(E[D]===z)return true;return this instanceof z}function g(z,E){var D,F=0,I=p._extraNames.length;for(D in E)if(D!=x&&E.hasOwnProperty(D))z[D]=E[D];for(;F<I;++F){D=p._extraNames[F];if(D!=x&&E.hasOwnProperty(D))z[D]=E[D]}}function h(z,E){var D,F,I=0,L=p._extraNames.length;
for(D in E){F=E[D];if((F!==o[D]||!(D in o))&&D!=x){if(t.call(F)=="[object Function]")F.nom=D;z[D]=F}}for(;I<L;++I){D=p._extraNames[I];F=E[D];if((F!==o[D]||!(D in o))&&D!=x){if(t.call(F)=="[object Function]")F.nom=D;z[D]=F}}return z}function j(z){h(this.prototype,z);return this}function k(z,E){return function(){var D=arguments,F=D,I=D[0],L,G;G=z.length;var O;if(!(this instanceof D.callee))return s(D);if(E&&(I&&I.preamble||this.preamble)){O=new Array(z.length);O[0]=D;for(L=0;;){if(I=D[0])if(I=I.preamble)D=
I.apply(this,D)||D;I=z[L].prototype;if(I=I.hasOwnProperty("preamble")&&I.preamble)D=I.apply(this,D)||D;if(++L==G)break;O[L]=D}}for(L=G-1;L>=0;--L){I=z[L];if(I=(G=I._meta)?G.ctor:I)I.apply(this,O?O[L]:D)}(I=this.postscript)&&I.apply(this,F)}}function l(z,E){return function(){var D=arguments,F=D,I=D[0];if(!(this instanceof D.callee))return s(D);if(E){if(I)if(I=I.preamble)F=I.apply(this,F)||F;(I=this.preamble)&&I.apply(this,F)}z&&z.apply(this,D);(I=this.postscript)&&I.apply(this,D)}}function m(z){return function(){var E=
arguments,D=0,F,I;if(!(this instanceof E.callee))return s(E);for(;F=z[D];++D)if(F=(I=F._meta)?I.ctor:F){F.apply(this,E);break}(F=this.postscript)&&F.apply(this,E)}}function n(z,E,D){return function(){var F,I,L=0,G=1;if(D){L=E.length-1;G=-1}for(;F=E[L];L+=G){I=F._meta;(F=(I?I.hidden:F.prototype)[z])&&F.apply(this,arguments)}}}function r(z){u.prototype=z.prototype;z=new u;u.prototype=null;return z}function s(z){var E=z.callee,D=r(E);E.apply(D,z);return D}var p=b,q=p._mixin,o=Object.prototype,t=o.toString,
u=new Function,w=0,x="constructor";p.declare=function(z,E,D){if(typeof z!="string"){D=E;E=z;z=""}D=D||{};var F,I,L,G,O,M,U,S=1,$=E;if(t.call(E)=="[object Array]"){M=a(E,z);L=M[0];S=M.length-L;E=M[S]}else{M=[0];if(E)if(t.call(E)=="[object Function]"){L=E._meta;M=M.concat(L?L.bases:E)}else c("base class is not a callable constructor.",z);else E!==null&&c("unknown base class. Did you use dojo.require to pull it in?",z)}if(E)for(I=S-1;;--I){F=r(E);if(!I)break;L=M[I];(L._meta?g:q)(F,L.prototype);G=new Function;
G.superclass=E;G.prototype=F;E=F.constructor=G}else F={};h(F,D);L=D.constructor;if(L!==o.constructor){L.nom=x;F.constructor=L}for(I=S-1;I;--I)if((L=M[I]._meta)&&L.chains)U=q(U||{},L.chains);if(F["-chains-"])U=q(U||{},F["-chains-"]);L=!U||!U.hasOwnProperty(x);M[0]=G=U&&U.constructor==="manual"?m(M):M.length==1?l(D.constructor,L):k(M,L);G._meta={bases:M,hidden:D,chains:U,parents:$,ctor:D.constructor};G.superclass=E&&E.prototype;G.extend=j;G.prototype=F;F.constructor=G;F.getInherited=e;F.inherited=d;
F.isInstanceOf=f;if(z){F.declaredClass=z;p.setObject(z,G)}if(U)for(O in U)if(F[O]&&typeof U[O]=="string"&&O!=x){L=F[O]=n(O,M,U[O]==="after");L.nom=O}return G};p.safeMixin=h})();return b.declare});
define("dojo/_base/connect",["dojo/lib/kernel","dojo/_base/lang"],function(b){b._listener={getDispatcher:function(){return function(){var c=Array.prototype,a=arguments.callee,d=a._listeners;a=(a=a.target)&&a.apply(this,arguments);var e;d=[].concat(d);for(e in d)e in c||d[e].apply(this,arguments);return a}},add:function(c,a,d){c=c||b.global;var e=c[a];if(!e||!e._listeners){var f=b._listener.getDispatcher();f.target=e;f._listeners=[];e=c[a]=f}return e._listeners.push(d)},remove:function(c,a,d){(c=(c||
b.global)[a])&&c._listeners&&d--&&delete c._listeners[d]}};b.connect=function(){var c=arguments,a=[],d=0;a.push(b.isString(c[0])?null:c[d++],c[d++]);var e=c[d+1];a.push(b.isString(e)||b.isFunction(e)?c[d++]:null,c[d++]);for(e=c.length;d<e;d++)a.push(c[d]);return b._connect.apply(this,a)};b._connect=function(c,a,d,e){var f=b._listener;d=f.add(c,a,b.hitch(d,e));return[c,a,d,f]};b.disconnect=function(c){if(c&&c[0]!==undefined){b._disconnect.apply(this,c);delete c[0]}};b._disconnect=function(c,a,d,e){e.remove(c,
a,d)};b._topics={};b.subscribe=function(c,a,d){return[c,b._listener.add(b._topics,c,b.hitch(a,d))]};b.unsubscribe=function(c){c&&b._listener.remove(b._topics,c[0],c[1])};b.publish=function(c,a){if(c=b._topics[c])c.apply(this,a||[])};b.connectPublisher=function(c,a,d){var e=function(){b.publish(c,arguments)};return d?b.connect(a,d,e):b.connect(a,e)};return b.connect});
define("dojo/_base/Deferred",["dojo/lib/kernel","dojo/_base/lang"],function(b){(function(){var c=function(){},a=Object.freeze||function(){},d=function(){var e,f,g,h,j=false,k=function(){};return function(l){if(j)if(e){f.next={task:l,next:null};f=f.next}else f=e={task:l,next:null};else{j=true;do try{for(;l;){l();if(g){if(e)f.next=g;else e=g;f=h}if(e){g=e.next;h=f;l=e.task;e=f=null}else l=null}j=false}catch(m){l=k;console.error(m)}while(j)}}}();b.Deferred=function(e){function f(s){if(j)throw new Error("This deferred has already been resolved");
h=s;j=true;d(g)}function g(){for(var s;!s&&m;){var p=m;m=m.next;if(s=p.progress==c)j=false;var q=k?p.error:p.resolved;if(q)try{var o=q(h);if(o&&typeof o.then==="function")o.then(b.hitch(p.deferred,"resolve"),b.hitch(p.deferred,"reject"),b.hitch(p.deferred,"progress"));else{q=s&&o===undefined;if(s&&!q)k=o instanceof Error;p.deferred[q&&k?"reject":"resolve"](q?h:o)}}catch(t){p.deferred.reject(t)}else k?p.deferred.reject(h):p.deferred.resolve(h)}}var h,j,k,l,m,n=this.promise={};this.resolve=this.callback=
function(s){this.fired=0;this.results=[s,null];f(s)};this.reject=this.errback=function(s){k=true;this.fired=1;f(s);this.results=[null,s];if(!s||s.log!==false)(b.config.deferredOnError||function(p){console.error(p)})(s)};this.progress=function(s){for(var p=m;p;){var q=p.progress;q&&q(s);p=p.next}};this.addCallbacks=function(s,p){this.then(s,p,c);return this};this.then=n.then=function(s,p,q){var o=q==c?this:new b.Deferred(n.cancel);s={resolved:s,error:p,progress:q,deferred:o};if(m)l=l.next=s;else m=
l=s;j&&d(g);return o.promise};var r=this;this.cancel=n.cancel=function(){if(!j){var s=e&&e(r);if(!j){s instanceof Error||(s=new Error(s));s.log=false;r.reject(s)}}};a(n)};b.extend(b.Deferred,{addCallback:function(){return this.addCallbacks(b.hitch.apply(b,arguments))},addErrback:function(){return this.addCallbacks(null,b.hitch.apply(b,arguments))},addBoth:function(){var e=b.hitch.apply(b,arguments);return this.addCallbacks(e,e)},fired:-1})})();b.when=function(c,a,d,e){if(c&&typeof c.then==="function")return c.then(a,
d,e);return a(c)};return b.Deferred});
define("dojo/_base/json",["dojo/lib/kernel"],function(b){b.fromJson=function(c){return eval("("+c+")")};b._escapeString=function(c){return('"'+c.replace(/(["\\])/g,"\\$1")+'"').replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r")};b.toJsonIndentStr="\t";b.toJson=function(c,a,d){if(c===undefined)return"undefined";var e=typeof c;if(e=="number"||e=="boolean")return c+"";if(c===null)return"null";if(b.isString(c))return b._escapeString(c);var f=
arguments.callee,g;d=d||"";var h=a?d+b.toJsonIndentStr:"";g=c.__json__||c.json;if(b.isFunction(g)){g=g.call(c);if(c!==g)return f(g,a,h)}if(c.nodeType&&c.cloneNode)throw new Error("Can't serialize DOM nodes");g=a?" ":"";var j=a?"\n":"";if(b.isArray(c))return"["+b.map(c,function(n){n=f(n,a,h);if(typeof n!="string")n="undefined";return j+h+n}).join(","+g)+j+d+"]";if(e=="function")return null;e=[];var k;for(k in c){var l,m;if(typeof k=="number")l='"'+k+'"';else if(typeof k=="string")l=b._escapeString(k);
else continue;m=f(c[k],a,h);typeof m=="string"&&e.push(j+h+l+":"+g+m)}return"{"+e.join(","+g)+j+d+"}"};return b});
define("dojo/_base/Color",["dojo/lib/kernel","dojo/_base/array","dojo/_base/lang"],function(b){(function(){b.Color=function(c){c&&this.setColor(c)};b.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:b.config.transparentColor||[255,255,255]};b.extend(b.Color,
{r:255,g:255,b:255,a:1,_set:function(c,a,d,e){this.r=c;this.g=a;this.b=d;this.a=e},setColor:function(c){if(b.isString(c))b.colorFromString(c,this);else if(b.isArray(c))b.colorFromArray(c,this);else{this._set(c.r,c.g,c.b,c.a);c instanceof b.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"#"+b.map(["r","g","b"],function(c){c=this[c].toString(16);return c.length<
2?"0"+c:c},this).join("")},toCss:function(c){var a=this.r+", "+this.g+", "+this.b;return(c?"rgba("+a+", "+this.a:"rgb("+a)+")"},toString:function(){return this.toCss(true)}});b.blendColors=function(c,a,d,e){var f=e||new b.Color;b.forEach(["r","g","b","a"],function(g){f[g]=c[g]+(a[g]-c[g])*d;if(g!="a")f[g]=Math.round(f[g])});return f.sanitize()};b.colorFromRgb=function(c,a){return(c=c.toLowerCase().match(/^rgba?\(([\s\.,0-9]+)\)/))&&b.colorFromArray(c[1].split(/\s*,\s*/),a)};b.colorFromHex=function(c,
a){var d=a||new b.Color,e=c.length==4?4:8,f=(1<<e)-1;c=Number("0x"+c.substr(1));if(isNaN(c))return null;b.forEach(["b","g","r"],function(g){var h=c&f;c>>=e;d[g]=e==4?17*h:h});d.a=1;return d};b.colorFromArray=function(c,a){a=a||new b.Color;a._set(Number(c[0]),Number(c[1]),Number(c[2]),Number(c[3]));if(isNaN(a.a))a.a=1;return a.sanitize()};b.colorFromString=function(c,a){var d=b.Color.named[c];return d&&b.colorFromArray(d,a)||b.colorFromRgb(c,a)||b.colorFromHex(c,a)}})();return b.Color});
define("dojo/_base/window",["dojo/lib/kernel"],function(b){b.doc=window.document||null;b.body=function(){return b.doc.body||b.doc.getElementsByTagName("body")[0]};b.setContext=function(c,a){b.global=c;b.doc=a};b.withGlobal=function(c,a,d,e){var f=b.global;try{b.global=c;return b.withDoc.call(null,c.document,a,d,e)}finally{b.global=f}};b.withDoc=function(c,a,d,e){var f=b.doc,g=b._bodyLtr,h=b.isQuirks;try{b.doc=c;delete b._bodyLtr;b.isQuirks=b.doc.compatMode=="BackCompat";if(d&&typeof a=="string")a=
d[a];return a.apply(d,e||[])}finally{b.doc=f;delete b._bodyLtr;if(g!==undefined)b._bodyLtr=g;b.isQuirks=h}};return b});
define("dojo/_base/event",["dojo/lib/kernel","dojo/_base/connect"],function(b){(function(){var c=b._event_listener={add:function(j,k,l){if(j){k=c._normalizeEventName(k);l=c._fixCallback(k,l);if(!b.isIE&&(k=="mouseenter"||k=="mouseleave")){var m=l;k=k=="mouseenter"?"mouseover":"mouseout";l=function(n){if(!b.isDescendant(n.relatedTarget,j))return m.call(this,n)}}j.addEventListener(k,l,false);return l}},remove:function(j,k,l){if(j){k=c._normalizeEventName(k);if(!b.isIE&&(k=="mouseenter"||k=="mouseleave"))k=
k=="mouseenter"?"mouseover":"mouseout";j.removeEventListener(k,l,false)}},_normalizeEventName:function(j){return j.slice(0,2)=="on"?j.slice(2):j},_fixCallback:function(j,k){return j!="keypress"?k:function(l){return k.call(this,c._fixEvent(l,this))}},_fixEvent:function(j){switch(j.type){case "keypress":c._setKeyChar(j);break}return j},_setKeyChar:function(j){j.keyChar=j.charCode>=32?String.fromCharCode(j.charCode):"";j.charOrCode=j.keyChar||j.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}};b.fixEvent=function(j,k){return c._fixEvent(j,k)};b.stopEvent=function(j){j.preventDefault();j.stopPropagation()};var a=b._listener;b._connect=function(j,k,l,m,n){n=j&&(j.nodeType||j.attachEvent||j.addEventListener)?n?2:1:0;l=[b._listener,c,a][n].add(j,k,b.hitch(l,m));return[j,k,l,n]};b._disconnect=function(j,k,l,m){[b._listener,c,a][m].remove(j,k,l)};b.keys={BACKSPACE:8,TAB:9,CLEAR:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,META:b.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:b.isMac&&!b.isAIR?b.isSafari?91:224:17};var d=b.isMac?"metaKey":"ctrlKey";b.isCopyKey=function(j){return j[d]};b.mouseButtons=b.isIE<9||b.isIE&&b.isQuirks?{LEFT:1,MIDDLE:4,RIGHT:2,isButton:function(j,k){return j.button&k},isLeft:function(j){return j.button&1},isMiddle:function(j){return j.button&4},isRight:function(j){return j.button&2}}:{LEFT:0,MIDDLE:1,RIGHT:2,isButton:function(j,k){return j.button==k},isLeft:function(j){return j.button==
0},isMiddle:function(j){return j.button==1},isRight:function(j){return j.button==2}};if(b.isIE){var e=function(j,k){try{return j.keyCode=k}catch(l){return 0}},f=b._listener,g=b._ieListenersName="_"+b._scopeName+"_listeners";if(!b.config._allow_leaks){a=f=b._ie_listener={handlers:[],add:function(j,k,l){j=j||b.global;var m=j[k];if(!m||!m[g]){var n=b._getIeDispatcher();n.target=m&&h.push(m)-1;n[g]=[];m=j[k]=n}return m[g].push(h.push(l)-1)},remove:function(j,k,l){k=(j=(j||b.global)[k])&&j[g];if(j&&k&&
l--){delete h[k[l]];delete k[l]}}};var h=f.handlers}b.mixin(c,{add:function(j,k,l){if(j){k=c._normalizeEventName(k);if(k=="onkeypress"){var m=j.onkeydown;if(!m||!m[g]||!m._stealthKeydownHandle){var n=c.add(j,"onkeydown",c._stealthKeyDown);m=j.onkeydown;m._stealthKeydownHandle=n;m._stealthKeydownRefs=1}else m._stealthKeydownRefs++}return f.add(j,k,c._fixCallback(l))}},remove:function(j,k,l){k=c._normalizeEventName(k);f.remove(j,k,l);if(k=="onkeypress"){k=j.onkeydown;if(--k._stealthKeydownRefs<=0){f.remove(j,
"onkeydown",k._stealthKeydownHandle);delete k._stealthKeydownHandle}}},_normalizeEventName:function(j){return j.slice(0,2)!="on"?"on"+j:j},_nop:function(){},_fixEvent:function(j,k){if(!j)j=(k&&(k.ownerDocument||k.document||k).parentWindow||window).event;if(!j)return j;j.target=j.srcElement;j.currentTarget=k||j.srcElement;j.layerX=j.offsetX;j.layerY=j.offsetY;k=(k=j.srcElement)&&k.ownerDocument||document;k=b.isIE<6||k.compatMode=="BackCompat"?k.body:k.documentElement;var l=b._getIeDocumentElementOffset();
j.pageX=j.clientX+b._fixIeBiDiScrollLeft(k.scrollLeft||0)-l.x;j.pageY=j.clientY+(k.scrollTop||0)-l.y;if(j.type=="mouseover")j.relatedTarget=j.fromElement;if(j.type=="mouseout")j.relatedTarget=j.toElement;if(b.isIE<9||b.isQuirks){j.stopPropagation=c._stopPropagation;j.preventDefault=c._preventDefault}return c._fixKeys(j)},_fixKeys:function(j){switch(j.type){case "keypress":var k="charCode"in j?j.charCode:j.keyCode;if(k==10){k=0;j.keyCode=13}else if(k==13||k==27)k=0;else if(k==3)k=99;j.charCode=k;c._setKeyChar(j);
break}return j},_stealthKeyDown:function(j){var k=j.currentTarget.onkeypress;if(k&&k[g]){var l=j.keyCode,m=(l!=13||b.isIE>=9&&!b.isQuirks)&&l!=32&&l!=27&&(l<48||l>90)&&(l<96||l>111)&&(l<186||l>192)&&(l<219||l>222);if(m||j.ctrlKey){m=m?0:l;if(j.ctrlKey)if(l==3||l==13)return;else if(m>95&&m<106)m-=48;else if(!j.shiftKey&&m>=65&&m<=90)m+=32;else m=c._punctMap[m]||m;l=c._synthesizeEvent(j,{type:"keypress",faux:true,charCode:m});k.call(j.currentTarget,l);if(b.isIE<9||b.isIE&&b.isQuirks)j.cancelBubble=
l.cancelBubble;j.returnValue=l.returnValue;e(j,l.keyCode)}}},_stopPropagation:function(){this.cancelBubble=true},_preventDefault:function(){this.bubbledKeyCode=this.keyCode;this.ctrlKey&&e(this,0);this.returnValue=false}});b.stopEvent=b.isIE<9||b.isQuirks?function(j){j=j||window.event;c._stopPropagation.call(j);c._preventDefault.call(j)}:b.stopEvent}c._synthesizeEvent=function(j,k){k=b.mixin({},j,k);c._setKeyChar(k);k.preventDefault=function(){j.preventDefault()};k.stopPropagation=function(){j.stopPropagation()};
return k};b.isOpera&&b.mixin(c,{_fixEvent:function(j){switch(j.type){case "keypress":var k=j.which;if(k==3)k=99;k=k<41&&!j.shiftKey?0:k;if(j.ctrlKey&&!j.shiftKey&&k>=65&&k<=90)k+=32;return c._synthesizeEvent(j,{charCode:k})}return j}});if(b.isWebKit){c._add=c.add;c._remove=c.remove;b.mixin(c,{add:function(j,k,l){if(j){var m=c._add(j,k,l);if(c._normalizeEventName(k)=="keypress")m._stealthKeyDownHandle=c._add(j,"keydown",function(n){var r=n.keyCode,s=r!=13&&r!=32&&(r<48||r>90)&&(r<96||r>111)&&(r<186||
r>192)&&(r<219||r>222);if(s||n.ctrlKey){s=s?0:r;if(n.ctrlKey)if(r==3||r==13)return;else if(s>95&&s<106)s-=48;else if(!n.shiftKey&&s>=65&&s<=90)s+=32;else s=c._punctMap[s]||s;r=c._synthesizeEvent(n,{type:"keypress",faux:true,charCode:s});l.call(n.currentTarget,r)}});return m}},remove:function(j,k,l){if(j){l._stealthKeyDownHandle&&c._remove(j,"keydown",l._stealthKeyDownHandle);c._remove(j,k,l)}},_fixEvent:function(j){switch(j.type){case "keypress":if(j.faux)return j;var k=j.charCode;k=k>=32?k:0;return c._synthesizeEvent(j,
{charCode:k,faux:true})}return j}})}})();if(b.isIE){b._ieDispatcher=function(c,a){var d=Array.prototype,e=b._ie_listener.handlers,f=c.callee,g=f[b._ieListenersName];f=(f=e[f.target])&&f.apply(a,c);g=[].concat(g);for(var h in g){var j=e[g[h]];!(h in d)&&j&&j.apply(a,c)}return f};b._getIeDispatcher=function(){return new Function(b._scopeName+"._ieDispatcher(arguments, this)")};b._event_listener._fixCallback=function(c){var a=b._event_listener._fixEvent;return function(d){return c.call(this,a(d,this))}}}return b.connect});
define("dojo/_base/html",["dojo/lib/kernel","dojo/_base/lang"],function(b){try{document.execCommand("BackgroundImageCache",false,true)}catch(c){}b.byId=b.isIE?function(a,d){if(typeof a!="string")return a;var e=d||b.doc;if((d=e.getElementById(a))&&(d.attributes.id.value==a||d.id==a))return d;else{var f=e.all[a];if(!f||f.nodeName)f=[f];for(var g=0;d=f[g++];)if(d.attributes&&d.attributes.id&&d.attributes.id.value==a||d.id==a)return d}}:function(a,d){return(typeof a=="string"?(d||b.doc).getElementById(a):
a)||null};(function(){var a=b.byId,d=null,e;b.addOnWindowUnload(function(){d=null});b._destroyElement=b.destroy=function(v){v=a(v);try{var y=v.ownerDocument;if(!d||e!=y){d=y.createElement("div");e=y}d.appendChild(v.parentNode?v.parentNode.removeChild(v):v);d.innerHTML=""}catch(C){}};b.isDescendant=function(v,y){try{v=a(v);for(y=a(y);v;){if(v==y)return true;v=v.parentNode}}catch(C){}return false};b.setSelectable=function(v,y){v=a(v);if(b.isMozilla)v.style.MozUserSelect=y?"":"none";else if(b.isKhtml||
b.isWebKit)v.style.KhtmlUserSelect=y?"auto":"none";else if(b.isIE){y=v.unselectable=y?"":"on";b.query("*",v).forEach("item.unselectable = '"+y+"'")}};var f=function(v,y){var C=y.parentNode;C&&C.insertBefore(v,y)},g=function(v,y){var C=y.parentNode;if(C)C.lastChild==y?C.appendChild(v):C.insertBefore(v,y.nextSibling)};b.place=function(v,y,C){y=a(y);if(typeof v=="string")v=/^\s*</.test(v)?b._toDom(v,y.ownerDocument):a(v);if(typeof C=="number"){var K=y.childNodes;!K.length||K.length<=C?y.appendChild(v):
f(v,K[C<0?0:C])}else switch(C){case "before":f(v,y);break;case "after":g(v,y);break;case "replace":y.parentNode.replaceChild(v,y);break;case "only":b.empty(y);y.appendChild(v);break;case "first":if(y.firstChild){f(v,y.firstChild);break}default:y.appendChild(v)}return v};b.boxModel="content-box";if(b.isIE)b.boxModel=document.compatMode=="BackCompat"?"border-box":"content-box";var h;h=b.isWebKit?function(v){var y;if(v.nodeType==1){var C=v.ownerDocument.defaultView;y=C.getComputedStyle(v,null);if(!y&&
v.style){v.style.display="";y=C.getComputedStyle(v,null)}}return y||{}}:b.isIE?function(v){return v.nodeType==1?v.currentStyle:{}}:function(v){return v.nodeType==1?v.ownerDocument.defaultView.getComputedStyle(v,null):{}};b.getComputedStyle=h;b._toPixelValue=b.isIE?function(v,y){if(!y)return 0;if(y=="medium")return 4;if(y.slice&&y.slice(-2)=="px")return parseFloat(y);with(v){v=style.left;var C=runtimeStyle.left;runtimeStyle.left=currentStyle.left;try{style.left=y;y=style.pixelLeft}catch(K){y=0}style.left=
v;runtimeStyle.left=C}return y}:function(v,y){return parseFloat(y)||0};var j=b._toPixelValue,k=function(v,y){try{return v.filters.item("DXImageTransform.Microsoft.Alpha")}catch(C){return y?{}:null}};b._getOpacity=b.isIE<9?function(v){try{return k(v).Opacity/100}catch(y){return 1}}:function(v){return h(v).opacity};b._setOpacity=b.isIE<9?function(v,y){var C=y*100,K=y==1;v.style.zoom=K?"":1;if(k(v))k(v,1).Opacity=C;else{if(K)return y;v.style.filter+=" progid:DXImageTransform.Microsoft.Alpha(Opacity="+
C+")"}k(v,1).Enabled=!K;v.nodeName.toLowerCase()=="tr"&&b.query("> td",v).forEach(function(P){b._setOpacity(P,y)});return y}:function(v,y){return v.style.opacity=y};var l={left:true,top:true},m=/margin|padding|width|height|max|min|offset/,n=function(v,y,C){y=y.toLowerCase();if(b.isIE){if(C=="auto"){if(y=="height")return v.offsetHeight;if(y=="width")return v.offsetWidth}if(y=="fontweight")switch(C){case 700:return"bold";case 400:default:return"normal"}}y in l||(l[y]=m.test(y));return l[y]?j(v,C):C},
r=b.isIE?"styleFloat":"cssFloat",s={cssFloat:r,styleFloat:r,"float":r};b.style=function(v,y,C){var K=a(v),P=arguments.length,R=y=="opacity";y=s[y]||y;if(P==3)return R?b._setOpacity(K,C):(K.style[y]=C);if(P==2&&R)return b._getOpacity(K);R=h(K);if(P==2&&typeof y!="string"){for(var W in y)b.style(v,W,y[W]);return R}return P==1?R:n(K,y,R[y]||K.style[y])};b._getPadExtents=function(v,y){y=y||h(v);var C=j(v,y.paddingLeft),K=j(v,y.paddingTop);return{l:C,t:K,w:C+j(v,y.paddingRight),h:K+j(v,y.paddingBottom)}};
b._getBorderExtents=function(v,y){y=y||h(v);var C=y.borderLeftStyle!="none"?j(v,y.borderLeftWidth):0,K=y.borderTopStyle!="none"?j(v,y.borderTopWidth):0;return{l:C,t:K,w:C+(y.borderRightStyle!="none"?j(v,y.borderRightWidth):0),h:K+(y.borderBottomStyle!="none"?j(v,y.borderBottomWidth):0)}};b._getPadBorderExtents=function(v,y){var C=y||h(v);y=b._getPadExtents(v,C);v=b._getBorderExtents(v,C);return{l:y.l+v.l,t:y.t+v.t,w:y.w+v.w,h:y.h+v.h}};b._getMarginExtents=function(v,y){y=y||h(v);var C=j(v,y.marginLeft),
K=j(v,y.marginTop),P=j(v,y.marginRight);v=j(v,y.marginBottom);if(b.isWebKit&&y.position!="absolute")P=C;return{l:C,t:K,w:C+P,h:K+v}};b._getMarginBox=function(v,y){var C=y||h(v);y=b._getMarginExtents(v,C);var K=v.offsetLeft-y.l,P=v.offsetTop-y.t,R=v.parentNode;if(b.isMoz){var W=parseFloat(C.left);C=parseFloat(C.top);if(!isNaN(W)&&!isNaN(C)){K=W;P=C}else if(R&&R.style){W=h(R);if(W.overflow!="visible"){R=b._getBorderExtents(R,W);K+=R.l;P+=R.t}}}else if(b.isOpera||b.isIE>7&&!b.isQuirks)if(R){R=b._getBorderExtents(R);
K-=R.l;P-=R.t}return{l:K,t:P,w:v.offsetWidth+y.w,h:v.offsetHeight+y.h}};b._getMarginSize=function(v,y){v=a(v);y=b._getMarginExtents(v,y||h(v));v=v.getBoundingClientRect();return{w:v.right-v.left+y.w,h:v.bottom-v.top+y.h}};b._getContentBox=function(v,y){var C=y||h(v);y=b._getPadExtents(v,C);C=b._getBorderExtents(v,C);var K=v.clientWidth;if(K){v=v.clientHeight;C.w=C.h=0}else{K=v.offsetWidth;v=v.offsetHeight}if(b.isOpera){y.l+=C.l;y.t+=C.t}return{l:y.l,t:y.t,w:K-y.w-C.w,h:v-y.h-C.h}};b._getBorderBox=
function(v,y){var C=y||h(v);y=b._getPadExtents(v,C);v=b._getContentBox(v,C);return{l:v.l-y.l,t:v.t-y.t,w:v.w+y.w,h:v.h+y.h}};b._setBox=function(v,y,C,K,P,R){R=R||"px";v=v.style;if(!isNaN(y))v.left=y+R;if(!isNaN(C))v.top=C+R;if(K>=0)v.width=K+R;if(P>=0)v.height=P+R};b._isButtonTag=function(v){return v.tagName=="BUTTON"||v.tagName=="INPUT"&&(v.getAttribute("type")||"").toUpperCase()=="BUTTON"};b._usesBorderBox=function(v){var y=v.tagName;return b.boxModel=="border-box"||y=="TABLE"||b._isButtonTag(v)};
b._setContentSize=function(v,y,C,K){if(b._usesBorderBox(v)){K=b._getPadBorderExtents(v,K);if(y>=0)y+=K.w;if(C>=0)C+=K.h}b._setBox(v,NaN,NaN,y,C)};b._setMarginBox=function(v,y,C,K,P,R){var W=R||h(v);R=b._usesBorderBox(v)?p:b._getPadBorderExtents(v,W);if(b.isWebKit)if(b._isButtonTag(v)){var da=v.style;if(K>=0&&!da.width)da.width="4px";if(P>=0&&!da.height)da.height="4px"}W=b._getMarginExtents(v,W);if(K>=0)K=Math.max(K-R.w-W.w,0);if(P>=0)P=Math.max(P-R.h-W.h,0);b._setBox(v,y,C,K,P)};var p={l:0,t:0,w:0,
h:0};b.marginBox=function(v,y){v=a(v);var C=h(v);return!y?b._getMarginBox(v,C):b._setMarginBox(v,y.l,y.t,y.w,y.h,C)};b.contentBox=function(v,y){v=a(v);var C=h(v);return!y?b._getContentBox(v,C):b._setContentSize(v,y.w,y.h,C)};b._docScroll=function(){var v=b.global;return"pageXOffset"in v?{x:v.pageXOffset,y:v.pageYOffset}:(v=b.isQuirks?b.doc.body:b.doc.documentElement,{x:b._fixIeBiDiScrollLeft(v.scrollLeft||0),y:v.scrollTop||0})};b._isBodyLtr=function(){return"_bodyLtr"in b?b._bodyLtr:(b._bodyLtr=(b.body().dir||
b.doc.documentElement.dir||"ltr").toLowerCase()=="ltr")};b._getIeDocumentElementOffset=function(){var v=b.doc.documentElement;if(b.isIE<8){var y=v.getBoundingClientRect(),C=y.left;y=y.top;if(b.isIE<7){C+=v.clientLeft;y+=v.clientTop}return{x:C<0?0:C,y:y<0?0:y}}else return{x:0,y:0}};b._fixIeBiDiScrollLeft=function(v){var y=b.isIE;if(y&&!b._isBodyLtr()){var C=b.isQuirks,K=C?b.doc.body:b.doc.documentElement;if(y==6&&!C&&b.global.frameElement&&K.scrollHeight>K.clientHeight)v+=K.clientLeft;return y<8||
C?v+K.clientWidth-K.scrollWidth:-v}return v};b._abs=b.position=function(v,y){v=a(v);var C=b.body(),K=C.parentNode;v=v.getBoundingClientRect();v={x:v.left,y:v.top,w:v.right-v.left,h:v.bottom-v.top};if(b.isIE){K=b._getIeDocumentElementOffset();v.x-=K.x+(b.isQuirks?C.clientLeft+C.offsetLeft:0);v.y-=K.y+(b.isQuirks?C.clientTop+C.offsetTop:0)}else if(b.isFF==3){C=h(K);v.x-=j(K,C.marginLeft)+j(K,C.borderLeftWidth);v.y-=j(K,C.marginTop)+j(K,C.borderTopWidth)}if(y){y=b._docScroll();v.x+=y.x;v.y+=y.y}return v};
b.coords=function(v,y){v=a(v);var C=h(v);C=b._getMarginBox(v,C);y=b.position(v,y);C.x=y.x;C.y=y.y;return C};var q={"class":"className","for":"htmlFor",tabindex:"tabIndex",readonly:"readOnly",colspan:"colSpan",frameborder:"frameBorder",rowspan:"rowSpan",valuetype:"valueType"},o={classname:"class",htmlfor:"for",tabindex:"tabIndex",readonly:"readOnly"},t={innerHTML:1,className:1,htmlFor:b.isIE,value:1},u=function(v){return o[v.toLowerCase()]||v},w=function(v,y){return(v=v.getAttributeNode&&v.getAttributeNode(y))&&
v.specified};b.hasAttr=function(v,y){var C=y.toLowerCase();return t[q[C]||y]||w(a(v),o[C]||y)};var x={},z=0,E=b._scopeName+"attrid",D={col:1,colgroup:1,table:1,tbody:1,tfoot:1,thead:1,tr:1,title:1};b.attr=function(v,y,C){v=a(v);var K=arguments.length;if(K==2&&typeof y!="string"){for(var P in y)b.attr(v,P,y[P]);return v}var R=y.toLowerCase();P=q[R]||y;var W=t[P];R=o[R]||y;if(K==3){if(P=="style"&&typeof C!="string")b.style(v,C);else if(P=="innerHTML")if(b.isIE&&v.tagName.toLowerCase()in D){b.empty(v);
v.appendChild(b._toDom(C,v.ownerDocument))}else v[P]=C;else if(b.isFunction(C)){K=b.attr(v,E);if(!K){K=z++;b.attr(v,E,K)}x[K]||(x[K]={});if(W=x[K][P])b.disconnect(W);else try{delete v[P]}catch(da){}x[K][P]=b.connect(v,P,C)}else if(W||typeof C=="boolean")v[P]=C;else v.setAttribute(R,C);return v}C=v[P];if(W&&typeof C!="undefined")return C;if(P!="href"&&(typeof C=="boolean"||b.isFunction(C)))return C;return w(v,R)?v.getAttribute(R):null};b.removeAttr=function(v,y){a(v).removeAttribute(u(y))};b.getNodeProp=
function(v,y){v=a(v);var C=y.toLowerCase(),K=q[C]||y;if(K in v&&K!="href")return v[K];y=o[C]||y;return w(v,y)?v.getAttribute(y):null};b.create=function(v,y,C,K){var P=b.doc;if(C){C=a(C);P=C.ownerDocument}if(typeof v=="string")v=P.createElement(v);y&&b.attr(v,y);C&&b.place(v,C,K);return v};b.empty=b.isIE?function(v){v=a(v);for(var y;y=v.lastChild;)b.destroy(y)}:function(v){a(v).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"]},I=/<\s*([\w\:]+)/,L={},G=0,O="__"+b._scopeName+"ToDomId";for(var M in F)if(F.hasOwnProperty(M)){var U=F[M];U.pre=M=="option"?'<select multiple="multiple">':"<"+U.join("><")+">";U.post="</"+U.reverse().join("></")+">"}b._toDom=function(v,y){y=y||b.doc;var C=y[O];if(!C){y[O]=C=++G+"";L[C]=y.createElement("div")}v+="";var K=v.match(I),P=K?K[1].toLowerCase():"";C=L[C];if(K&&F[P]){K=
F[P];C.innerHTML=K.pre+v+K.post;for(v=K.length;v;--v)C=C.firstChild}else C.innerHTML=v;if(C.childNodes.length==1)return C.removeChild(C.firstChild);for(v=y.createDocumentFragment();y=C.firstChild;)v.appendChild(y);return v};var S="className";b.hasClass=function(v,y){return(" "+a(v)[S]+" ").indexOf(" "+y+" ")>=0};var $=/\s+/,N=[""],T={},X=function(v){if(typeof v=="string"||v instanceof String)if(v.indexOf(" ")<0){N[0]=v;return N}else return v.split($);return v||""};b.addClass=function(v,y){v=a(v);
y=X(y);var C=v[S],K;C=C?" "+C+" ":" ";K=C.length;for(var P=0,R=y.length,W;P<R;++P)if((W=y[P])&&C.indexOf(" "+W+" ")<0)C+=W+" ";if(K<C.length)v[S]=C.substr(1,C.length-2)};b.removeClass=function(v,y){v=a(v);var C;if(y!==undefined){y=X(y);C=" "+v[S]+" ";for(var K=0,P=y.length;K<P;++K)C=C.replace(" "+y[K]+" "," ");C=b.trim(C)}else C="";if(v[S]!=C)v[S]=C};b.replaceClass=function(v,y,C){v=a(v);T.className=v.className;b.removeClass(T,C);b.addClass(T,y);if(v.className!==T.className)v.className=T.className};
b.toggleClass=function(v,y,C){if(C===undefined)C=!b.hasClass(v,y);b[C?"addClass":"removeClass"](v,y)}})();return b});
define("dojo/_base/NodeList",["dojo/lib/kernel","dojo/_base/lang","dojo/_base/array","dojo/_base/connect","dojo/_base/html"],function(b){(function(){var c=Array.prototype,a=c.slice,d=c.concat,e=function(r,s,p){r.sort||(r=a.call(r,0));p=p||this._NodeListCtor||b._NodeListCtor;r.constructor=p;b._mixin(r,p.prototype);r._NodeListCtor=p;return s?r._stash(s):r},f=function(r,s,p){s=[0].concat(a.call(s,0));p=p||b.global;return function(q){s[0]=q;return r.apply(p,s)}},g=function(r,s){return function(){this.forEach(f(r,
arguments,s));return this}},h=function(r,s){return function(){return this.map(f(r,arguments,s))}},j=function(r,s,p){return function(){var q=arguments,o=f(r,q,p);if(s.call(p||b.global,q))return this.map(o);this.forEach(o);return this}},k=function(r){return r.length==1&&typeof r[0]=="string"},l=function(r){var s=r.parentNode;s&&s.removeChild(r)};b.NodeList=function(){return e(Array.apply(null,arguments))};var m=b._NodeListCtor=b.NodeList,n=m.prototype;m._wrap=n._wrap=e;m._adaptAsMap=h;m._adaptAsForEach=
g;m._adaptAsFilter=function(r,s){return function(){return this.filter(f(r,arguments,s))}};m._adaptWithCondition=j;b.forEach(["slice","splice"],function(r){var s=c[r];n[r]=function(){return this._wrap(s.apply(this,arguments),r=="slice"?this:null)}});b.forEach(["indexOf","lastIndexOf","every","some"],function(r){var s=b[r];n[r]=function(){return s.apply(b,[this].concat(a.call(arguments,0)))}});b.forEach(["attr","style"],function(r){n[r]=j(b[r],k)});b.forEach(["connect","addClass","removeClass","replaceClass",
"toggleClass","empty","removeAttr"],function(r){n[r]=g(b[r])});b.extend(b.NodeList,{_normalize:function(r,s){var p=r.parse===true?true:false;if(typeof r.template=="string"){var q=r.templateFunc||b.string&&b.string.substitute;r=q?q(r.template,r):r}q=typeof r;if(q=="string"||q=="number"){r=b._toDom(r,s&&s.ownerDocument);r=r.nodeType==11?b._toArray(r.childNodes):[r]}else if(b.isArrayLike(r))b.isArray(r)||(r=b._toArray(r));else r=[r];if(p)r._runParse=true;return r},_cloneNode:function(r){return r.cloneNode(true)},
_place:function(r,s,p,q){if(!(s.nodeType!=1&&p=="only")){s=s;for(var o,t=r.length,u=t-1;u>=0;u--){var w=q?this._cloneNode(r[u]):r[u];if(r._runParse&&b.parser&&b.parser.parse){o||(o=s.ownerDocument.createElement("div"));o.appendChild(w);b.parser.parse(o);for(w=o.firstChild;o.firstChild;)o.removeChild(o.firstChild)}u==t-1?b.place(w,s,p):s.parentNode.insertBefore(w,s);s=w}}},_stash:function(r){this._parent=r;return this},end:function(){return this._parent?this._parent:new this._NodeListCtor},concat:function(){var r=
b.isArray(this)?this:a.call(this,0),s=b.map(arguments,function(p){return p&&!b.isArray(p)&&(typeof NodeList!="undefined"&&p.constructor===NodeList||p.constructor===this._NodeListCtor)?a.call(p,0):p});return this._wrap(d.apply(r,s),this)},map:function(r,s){return this._wrap(b.map(this,r,s),this)},forEach:function(r,s){b.forEach(this,r,s);return this},coords:h(b.coords),position:h(b.position),place:function(r,s){var p=b.query(r)[0];return this.forEach(function(q){b.place(q,p,s)})},orphan:function(r){return(r?
b._filterQueryResult(this,r):this).forEach(l)},adopt:function(r,s){return b.query(r).place(this[0],s)._stash(this)},query:function(r){if(!r)return this;var s=this.map(function(p){return b.query(r,p).filter(function(q){return q!==undefined})});return this._wrap(d.apply([],s),this)},filter:function(r){var s=arguments,p=this,q=0;if(typeof r=="string"){p=b._filterQueryResult(this,s[0]);if(s.length==1)return p._stash(this);q=1}return this._wrap(b.filter(p,s[q],s[q+1]),this)},addContent:function(r,s){r=
this._normalize(r,this[0]);for(var p=0,q;q=this[p];p++)this._place(r,q,s,p>0);return this},instantiate:function(r,s){var p=b.isFunction(r)?r:b.getObject(r);s=s||{};return this.forEach(function(q){new p(s,q)})},at:function(){var r=new this._NodeListCtor;b.forEach(arguments,function(s){if(s<0)s=this.length+s;this[s]&&r.push(this[s])},this);return r._stash(this)}});m.events=["blur","focus","change","click","error","keydown","keypress","keyup","load","mousedown","mouseenter","mouseleave","mousemove",
"mouseout","mouseover","mouseup","submit"];b.forEach(m.events,function(r){var s="on"+r;n[s]=function(p,q){return this.connect(s,p,q)}})})();return b.NodeList});
(function(){var b=function(a){var d=a.trim,e=a.forEach,f=a._NodeListCtor=a.NodeList,g=function(){return a.doc},h=(a.isWebKit||a.isMozilla)&&g().compatMode=="BackCompat",j=g().firstChild.children?"children":"childNodes",k=false,l=function(){return true},m=function(B){B+=">~+".indexOf(B.slice(-1))>=0?" * ":" ";for(var A=function(pa,qa){return d(B.slice(pa,qa))},H=[],J=-1,Q=-1,V=-1,Z=-1,Y=-1,aa=-1,ga=-1,ia="",ha="",na,fa=0,ra=B.length,ca=null,la=null,sa=function(){if(ga>=0){var pa=ga==fa?null:A(ga,fa);
ca[">~+".indexOf(pa)<0?"tag":"oper"]=pa;ga=-1}},ta=function(){if(aa>=0){ca.id=A(aa,fa).replace(/\\/g,"");aa=-1}},ua=function(){if(Y>=0){ca.classes.push(A(Y+1,fa).replace(/\\/g,""));Y=-1}},oa=function(){ta();sa();ua()},va=function(){oa();Z>=0&&ca.pseudos.push({name:A(Z+1,fa)});ca.loops=ca.pseudos.length||ca.attrs.length||ca.classes.length;ca.oquery=ca.query=A(na,fa);ca.otag=ca.tag=ca.oper?null:ca.tag||"*";if(ca.tag)ca.tag=ca.tag.toUpperCase();if(H.length&&H[H.length-1].oper){ca.infixOper=H.pop();ca.query=
ca.infixOper.query+" "+ca.query}H.push(ca);ca=null};ia=ha,ha=B.charAt(fa),fa<ra;fa++)if(ia!="\\"){if(!ca){na=fa;ca={query:null,pseudos:[],attrs:[],classes:[],tag:null,oper:null,id:null,getTag:function(){return k?this.otag:this.tag}};ga=fa}if(J>=0)if(ha=="]"){if(la.attr)la.matchFor=A(V||J+1,fa);else la.attr=A(J+1,fa);if(J=la.matchFor)if(J.charAt(0)=='"'||J.charAt(0)=="'")la.matchFor=J.slice(1,-1);ca.attrs.push(la);la=null;J=V=-1}else{if(ha=="="){V="|~^$*".indexOf(ia)>=0?ia:"";la.type=V+ha;la.attr=
A(J+1,fa-V.length);V=fa+1}}else if(Q>=0){if(ha==")"){if(Z>=0)la.value=A(Q+1,fa);Z=Q=-1}}else if(ha=="#"){oa();aa=fa+1}else if(ha=="."){oa();Y=fa}else if(ha==":"){oa();Z=fa}else if(ha=="["){oa();J=fa;la={}}else if(ha=="("){if(Z>=0){la={name:A(Z+1,fa),value:null};ca.pseudos.push(la)}Q=fa}else ha==" "&&ia!=ha&&va()}return H},n=function(B,A){if(!B)return A;if(!A)return B;return function(){return B.apply(window,arguments)&&A.apply(window,arguments)}},r=function(B,A){A=A||[];B&&A.push(B);return A},s=function(B){return 1==
B.nodeType},p=function(B,A){if(!B)return"";if(A=="class")return B.className||"";if(A=="for")return B.htmlFor||"";if(A=="style")return B.style.cssText||"";return(k?B.getAttribute(A):B.getAttribute(A,2))||""},q={"*=":function(B,A){return function(H){return p(H,B).indexOf(A)>=0}},"^=":function(B,A){return function(H){return p(H,B).indexOf(A)==0}},"$=":function(B,A){return function(H){H=" "+p(H,B);return H.lastIndexOf(A)==H.length-A.length}},"~=":function(B,A){var H=" "+A+" ";return function(J){return(" "+
p(J,B)+" ").indexOf(H)>=0}},"|=":function(B,A){var H=" "+A+"-";return function(J){J=" "+p(J,B);return J==A||J.indexOf(H)==0}},"=":function(B,A){return function(H){return p(H,B)==A}}},o=typeof g().firstChild.nextElementSibling=="undefined",t=!o?"nextElementSibling":"nextSibling",u=!o?"previousElementSibling":"previousSibling",w=o?s:l,x=function(B){for(;B=B[u];)if(w(B))return false;return true},z=function(B){for(;B=B[t];)if(w(B))return false;return true},E=function(B){var A=B.parentNode,H=0,J=A[j],
Q=B._i||-1,V=A._l||-1;if(!J)return-1;J=J.length;if(V==J&&Q>=0&&V>=0)return Q;A._l=J;Q=-1;for(A=A.firstElementChild||A.firstChild;A;A=A[t])if(w(A)){A._i=++H;if(B===A)Q=H}return Q},D=function(B){return!(E(B)%2)},F=function(B){return E(B)%2},I={checked:function(){return function(B){return!!("checked"in B?B.checked:B.selected)}},"first-child":function(){return x},"last-child":function(){return z},"only-child":function(){return function(B){if(!x(B))return false;if(!z(B))return false;return true}},empty:function(){return function(B){var A=
B.childNodes;for(B=B.childNodes.length-1;B>=0;B--){var H=A[B].nodeType;if(H===1||H==3)return false}return true}},contains:function(B,A){B=A.charAt(0);if(B=='"'||B=="'")A=A.slice(1,-1);return function(H){return H.innerHTML.indexOf(A)>=0}},not:function(B,A){B=m(A)[0];A={el:1};if(B.tag!="*")A.tag=1;if(!B.classes.length)A.classes=1;var H=G(B,A);return function(J){return!H(J)}},"nth-child":function(B,A){B=parseInt;if(A=="odd")return F;else if(A=="even")return D;if(A.indexOf("n")!=-1){A=A.split("n",2);
var H=A[0]?A[0]=="-"?-1:B(A[0]):1,J=A[1]?B(A[1]):0,Q=0,V=-1;if(H>0)if(J<0)J=J%H&&H+J%H;else{if(J>0){if(J>=H)Q=J-J%H;J%=H}}else if(H<0){H*=-1;if(J>0){V=J;J%=H}}if(H>0)return function(Y){Y=E(Y);return Y>=Q&&(V<0||Y<=V)&&Y%H==J};else A=J}var Z=B(A);return function(Y){return E(Y)==Z}}},L=a.isIE<9||dojo.isIE&&dojo.isQuirks?function(B){var A=B.toLowerCase();if(A=="class")B="className";return function(H){return k?H.getAttribute(B):H[B]||H[A]}}:function(B){return function(A){return A&&A.getAttribute&&A.hasAttribute(B)}},
G=function(B,A){if(!B)return l;A=A||{};var H=null;"el"in A||(H=n(H,s));if(!("tag"in A))if(B.tag!="*")H=n(H,function(J){return J&&J.tagName==B.getTag()});"classes"in A||e(B.classes,function(J,Q){var V=new RegExp("(?:^|\\s)"+J+"(?:\\s|$)");H=n(H,function(Z){return V.test(Z.className)});H.count=Q});"pseudos"in A||e(B.pseudos,function(J){var Q=J.name;if(I[Q])H=n(H,I[Q](Q,J.value))});"attrs"in A||e(B.attrs,function(J){var Q,V=J.attr;if(J.type&&q[J.type])Q=q[J.type](V,J.matchFor);else if(V.length)Q=L(V);
if(Q)H=n(H,Q)});if(!("id"in A))if(B.id)H=n(H,function(J){return!!J&&J.id==B.id});H||"default"in A||(H=l);return H},O=function(B){return function(A,H,J){for(;A=A[t];)if(!(o&&!s(A))){if((!J||ja(A,J))&&B(A))H.push(A);break}return H}},M=function(B){return function(A,H,J){for(A=A[t];A;){if(w(A)){if(J&&!ja(A,J))break;B(A)&&H.push(A)}A=A[t]}return H}},U=function(B){B=B||l;return function(A,H,J){for(var Q=0,V=A[j];A=V[Q++];)if(w(A)&&(!J||ja(A,J))&&B(A,Q))H.push(A);return H}},S=function(B,A){for(B=B.parentNode;B;){if(B==
A)break;B=B.parentNode}return!!B},$={},N=function(B){var A=$[B.query];if(A)return A;var H=B.infixOper;H=H?H.oper:"";var J=G(B,{el:1}),Q="*"==B.tag,V=g().getElementsByClassName;if(H){V={el:1};if(Q)V.tag=1;J=G(B,V);if("+"==H)A=O(J);else if("~"==H)A=M(J);else if(">"==H)A=U(J)}else if(B.id){J=!B.loops&&Q?l:G(B,{el:1,id:1});A=function(Y,aa){var ga=a.byId(B.id,Y.ownerDocument||Y);if(ga&&J(ga))if(9==Y.nodeType)return r(ga,aa);else if(S(ga,Y))return r(ga,aa)}}else if(V&&/\{\s*\[native code\]\s*\}/.test(String(V))&&
B.classes.length&&!h){J=G(B,{el:1,classes:1,id:1});var Z=B.classes.join(" ");A=function(Y,aa,ga){aa=r(0,aa);for(var ia,ha=0,na=Y.getElementsByClassName(Z);ia=na[ha++];)J(ia,Y)&&ja(ia,ga)&&aa.push(ia);return aa}}else if(!Q&&!B.loops)A=function(Y,aa,ga){aa=r(0,aa);for(var ia=0,ha=Y.getElementsByTagName(B.getTag());Y=ha[ia++];)ja(Y,ga)&&aa.push(Y);return aa};else{J=G(B,{el:1,tag:1,id:1});A=function(Y,aa,ga){aa=r(0,aa);for(var ia,ha=0,na=Y.getElementsByTagName(B.getTag());ia=na[ha++];)J(ia,Y)&&ja(ia,
ga)&&aa.push(ia);return aa}}return $[B.query]=A},T=function(B,A){B=r(B);for(var H,J,Q=A.length,V,Z,Y=0;Y<Q;Y++){Z=[];H=A[Y];J=B.length-1;if(J>0){V={};Z.nozip=true}J=N(H);for(var aa=0;H=B[aa];aa++)J(H,Z,V);if(!Z.length)break;B=Z}return Z},X={},v={},y=function(B){var A=m(d(B));if(A.length==1){var H=N(A[0]);return function(J){if(J=H(J,new f))J.nozip=true;return J}}return function(J){return T(J,A)}},C=navigator.userAgent;C=a.isWebKit&&C.indexOf("WebKit/")>0&&parseFloat(C.split("WebKit/")[1])>528;var K=
a.isIE?"commentStrip":"nozip",P=!!g().querySelectorAll&&(!a.isSafari||a.isSafari>3.1||C),R=/n\+\d|([^ ])?([>~+])([^ =])?/g,W=function(B,A,H,J){return H?(A?A+" ":"")+H+(J?" "+J:""):B},da=function(B,A){B=B.replace(R,W);if(P){var H=v[B];if(H&&!A)return H}if(H=X[B])return H;H=B.charAt(0);var J=-1==B.indexOf(" ");if(B.indexOf("#")>=0&&J)A=true;if(P&&!A&&">~+".indexOf(H)==-1&&(!a.isIE||B.indexOf(":")==-1)&&!(h&&B.indexOf(".")>=0)&&B.indexOf(":contains")==-1&&B.indexOf(":checked")==-1&&B.indexOf("|=")==
-1){var Q=">~+".indexOf(B.charAt(B.length-1))>=0?B+" *":B;return v[B]=function(Z){try{if(!(9==Z.nodeType||J))throw"";var Y=Z.querySelectorAll(Q);Y[K]=true;return Y}catch(aa){return da(B,true)(Z)}}}else{var V=B.split(/\s*,\s*/);return X[B]=V.length<2?y(B):function(Z){for(var Y=0,aa=[],ga;ga=V[Y++];)aa=aa.concat(y(ga)(Z));return aa}}},ba=0,ea=a.isIE?function(B){return k?B.getAttribute("_uid")||B.setAttribute("_uid",++ba)||ba:B.uniqueID}:function(B){return B._uid||(B._uid=++ba)},ja=function(B,A){if(!A)return 1;
B=ea(B);if(!A[B])return A[B]=1;return 0},ka="_zipIdx",ma=function(B){if(B&&B.nozip)return f._wrap?f._wrap(B):B;var A=new f;if(!B||!B.length)return A;B[0]&&A.push(B[0]);if(B.length<2)return A;ba++;if(a.isIE&&k){var H=ba+"";B[0].setAttribute(ka,H);for(var J=1,Q;Q=B[J];J++){B[J].getAttribute(ka)!=H&&A.push(Q);Q.setAttribute(ka,H)}}else if(a.isIE&&B.commentStrip)try{for(J=1;Q=B[J];J++)s(Q)&&A.push(Q)}catch(V){}else{if(B[0])B[0][ka]=ba;for(J=1;Q=B[J];J++){B[J][ka]!=ba&&A.push(Q);Q[ka]=ba}}return A};a.query=
function(B,A){f=a._NodeListCtor;if(!B)return new f;if(B.constructor==f)return B;if(typeof B!="string")return new f(B);if(typeof A=="string"){A=a.byId(A);if(!A)return new f}A=A||g();var H=A.ownerDocument||A.documentElement;k=A.contentType&&A.contentType=="application/xml"||a.isOpera&&(A.doctype||H.toString()=="[object XMLDocument]")||!!H&&(a.isIE?H.xml:A.xmlVersion||H.xmlVersion);if((B=da(B)(A))&&B.nozip&&!f._wrap)return B;return ma(B)};a.query.pseudos=I;a._filterQueryResult=function(B,A,H){var J=
new a._NodeListCtor,Q=m(A);Q=Q.length==1&&!/[^\w#\.]/.test(A)?G(Q[0]):function(Y){return dojo.query(A,H).indexOf(Y)!=-1};for(var V=0,Z;Z=B[V];V++)Q(Z)&&J.push(Z);return J}},c=function(){acme={trim:function(f){f=f.replace(/^\s+/,"");for(var g=f.length-1;g>=0;g--)if(/\S/.test(f.charAt(g))){f=f.substring(0,g+1);break}return f},forEach:function(f,g,h){if(f&&f.length)for(var j=0,k=f.length;j<k;++j)g.call(h||window,f[j],j,f)},byId:function(f,g){return typeof f=="string"?(g||document).getElementById(f):
f},doc:document,NodeList:Array};var a=navigator,d=a.userAgent;a=a.appVersion;var e=parseFloat(a);acme.isOpera=d.indexOf("Opera")>=0?e:undefined;acme.isKhtml=a.indexOf("Konqueror")>=0?e:undefined;acme.isWebKit=parseFloat(d.split("WebKit/")[1])||undefined;acme.isChrome=parseFloat(d.split("Chrome/")[1])||undefined;if((d=Math.max(a.indexOf("WebKit"),a.indexOf("Safari"),0))&&!acme.isChrome){acme.isSafari=parseFloat(a.split("Version/")[1]);if(!acme.isSafari||parseFloat(a.substr(d+7))<=419.3)acme.isSafari=
2}if(document.all&&!acme.isOpera)acme.isIE=parseFloat(a.split("MSIE ")[1])||undefined;Array._wrap=function(f){return f};return acme};typeof define=="function"&&define("dojo/_base/query",["dojo/lib/kernel","dojo/_base/NodeList","dojo/_base/lang","dojo/_base/window"],function(a){b(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");b(this.queryPortability||this.acme||dojo)}else b(this.queryPortability||
this.acme||c())})();
define("dojo/_base/xhr",["dojo/lib/kernel","dojo/_base/Deferred","dojo/_base/json","dojo/_base/lang","dojo/_base/query"],function(b){(function(){function c(o,t,u){if(u!==null){var w=o[t];if(typeof w=="string")o[t]=[w,u];else if(a.isArray(w))w.push(u);else o[t]=u}}var a=b,d=a.config;b.fieldToObject=function(o){var t=null;if(o=a.byId(o)){var u=o.name,w=(o.type||"").toLowerCase();if(u&&w&&!o.disabled)if(w=="radio"||w=="checkbox"){if(o.checked)t=o.value}else if(o.multiple){t=[];a.query("option",o).forEach(function(x){x.selected&&
t.push(x.value)})}else t=o.value}return t};b.formToObject=function(o){var t={};a.forEach(b.byId(o).elements,function(u){var w=u.name,x=(u.type||"").toLowerCase();if(w&&x&&"file|submit|image|reset|button|".indexOf(x)==-1&&!u.disabled){c(t,w,a.fieldToObject(u));if(x=="image")t[w+".x"]=t[w+".y"]=t[w].x=t[w].y=0}});return t};b.objectToQuery=function(o){var t=encodeURIComponent,u=[],w={};for(var x in o){var z=o[x];if(z!=w[x]){var E=t(x)+"=";if(a.isArray(z))for(var D=0;D<z.length;D++)u.push(E+t(z[D]));
else u.push(E+t(z))}}return u.join("&")};b.formToQuery=function(o){return a.objectToQuery(a.formToObject(o))};b.formToJson=function(o,t){return a.toJson(a.formToObject(o),t)};b.queryToObject=function(o){var t={};o=o.split("&");var u=decodeURIComponent;a.forEach(o,function(w){if(w.length){var x=w.split("=");w=u(x.shift());x=u(x.join("="));if(typeof t[w]=="string")t[w]=[t[w]];if(a.isArray(t[w]))t[w].push(x);else t[w]=x}});return t};b._blockAsync=false;var e=a._contentHandlers=b.contentHandlers={text:function(o){return o.responseText},
json:function(o){return a.fromJson(o.responseText||null)},"json-comment-filtered":function(o){b.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.");o=o.responseText;var t=o.indexOf("/*"),u=o.lastIndexOf("*/");if(t==-1||u==-1)throw new Error("JSON was not comment filtered");
return a.fromJson(o.substring(t+2,u))},javascript:function(o){return a.eval(o.responseText)},xml:function(o){var t=o.responseXML;if(a.isIE&&(!t||!t.documentElement)){var u=function(w){return"MSXML"+w+".DOMDocument"};u=["Microsoft.XMLDOM",u(6),u(4),u(3),u(2)];a.some(u,function(w){try{var x=new ActiveXObject(w);x.async=false;x.loadXML(o.responseText);t=x}catch(z){return false}return true})}return t},"json-comment-optional":function(o){return o.responseText&&/^[^{\[]*\/\*/.test(o.responseText)?e["json-comment-filtered"](o):
e.json(o)}};b._ioSetArgs=function(o,t,u,w){var x={args:o,url:o.url},z=null;if(o.form){z=a.byId(o.form);var E=z.getAttributeNode("action");x.url=x.url||(E?E.value:null);z=a.formToObject(z)}E=[{}];z&&E.push(z);o.content&&E.push(o.content);o.preventCache&&E.push({"dojo.preventCache":(new Date).valueOf()});x.query=a.objectToQuery(a.mixin.apply(null,E));x.handleAs=o.handleAs||"text";var D=new a.Deferred(t);D.addCallbacks(u,function(G){return w(G,D)});var F=o.load;F&&a.isFunction(F)&&D.addCallback(function(G){return F.call(o,
G,x)});var I=o.error;I&&a.isFunction(I)&&D.addErrback(function(G){return I.call(o,G,x)});var L=o.handle;L&&a.isFunction(L)&&D.addBoth(function(G){return L.call(o,G,x)});if(d.ioPublish&&a.publish&&x.args.ioPublish!==false){D.addCallbacks(function(G){a.publish("/dojo/io/load",[D,G]);return G},function(G){a.publish("/dojo/io/error",[D,G]);return G});D.addBoth(function(G){a.publish("/dojo/io/done",[D,G]);return G})}D.ioArgs=x;return D};var f=function(o){o.canceled=true;var t=o.ioArgs.xhr,u=typeof t.abort;
if(u=="function"||u=="object"||u=="unknown")t.abort();o=o.ioArgs.error;if(!o){o=new Error("xhr cancelled");o.dojoType="cancel"}return o},g=function(o){o=e[o.ioArgs.handleAs](o.ioArgs.xhr);return o===undefined?null:o},h=function(o,t){t.ioArgs.args.failOk||console.error(o);return o},j=null,k=[],l=0,m=function(o){if(l<=0){l=0;if(d.ioPublish&&a.publish&&(!o||o&&o.ioArgs.args.ioPublish!==false))a.publish("/dojo/io/stop")}},n=function(){var o=(new Date).getTime();if(!a._blockAsync)for(var t=0,u;t<k.length&&
(u=k[t]);t++){var w=u.dfd,x=function(){if(!w||w.canceled||!u.validCheck(w)){k.splice(t--,1);l-=1}else if(u.ioCheck(w)){k.splice(t--,1);u.resHandle(w);l-=1}else if(w.startTime)if(w.startTime+(w.ioArgs.args.timeout||0)<o){k.splice(t--,1);var E=new Error("timeout exceeded");E.dojoType="timeout";w.errback(E);w.cancel();l-=1}};if(b.config.debugAtAllCosts)x.call(this);else try{x.call(this)}catch(z){w.errback(z)}}m(w);if(!k.length){clearInterval(j);j=null}};b._ioCancelAll=function(){try{a.forEach(k,function(t){try{t.dfd.cancel()}catch(u){}})}catch(o){}};
a.isIE&&a.addOnWindowUnload(a._ioCancelAll);a._ioNotifyStart=function(o){if(d.ioPublish&&a.publish&&o.ioArgs.args.ioPublish!==false){l||a.publish("/dojo/io/start");l+=1;a.publish("/dojo/io/send",[o])}};a._ioWatch=function(o,t,u,w){var x=o.ioArgs.args;if(x.timeout)o.startTime=(new Date).getTime();k.push({dfd:o,validCheck:t,ioCheck:u,resHandle:w});j||(j=setInterval(n,50));x.sync&&n()};var r="application/x-www-form-urlencoded",s=function(o){return o.ioArgs.xhr.readyState},p=function(o){return 4==o.ioArgs.xhr.readyState},
q=function(o){var t=o.ioArgs.xhr;if(a._isDocumentOk(t))o.callback(o);else{var u=new Error("Unable to load "+o.ioArgs.url+" status:"+t.status);u.status=t.status;u.responseText=t.responseText;o.errback(u)}};b._ioAddQueryToUrl=function(o){if(o.query.length){o.url+=(o.url.indexOf("?")==-1?"?":"&")+o.query;o.query=null}};b.xhr=function(o,t,u){var w=a._ioSetArgs(t,f,g,h),x=w.ioArgs,z=x.xhr=a._xhrObj(x.args);if(!z){w.cancel();return w}if("postData"in t)x.query=t.postData;else if("putData"in t)x.query=t.putData;
else if("rawBody"in t)x.query=t.rawBody;else if(arguments.length>2&&!u||"POST|PUT".indexOf(o.toUpperCase())==-1)a._ioAddQueryToUrl(x);z.open(o,x.url,t.sync!==true,t.user||undefined,t.password||undefined);if(t.headers)for(var E in t.headers)if(E.toLowerCase()==="content-type"&&!t.contentType)t.contentType=t.headers[E];else t.headers[E]&&z.setRequestHeader(E,t.headers[E]);z.setRequestHeader("Content-Type",t.contentType||r);if(!t.headers||!("X-Requested-With"in t.headers))z.setRequestHeader("X-Requested-With",
"XMLHttpRequest");a._ioNotifyStart(w);if(b.config.debugAtAllCosts)z.send(x.query);else try{z.send(x.query)}catch(D){x.error=D;w.cancel()}a._ioWatch(w,s,p,q);return w};b.xhrGet=function(o){return a.xhr("GET",o)};b.rawXhrPost=b.xhrPost=function(o){return a.xhr("POST",o,true)};b.rawXhrPut=b.xhrPut=function(o){return a.xhr("PUT",o,true)};b.xhrDelete=function(o){return a.xhr("DELETE",o)}})();return b.xhr});
define("dojo/_base/fx",["dojo/lib/kernel","dojo/_base/Color","dojo/_base/connect","dojo/_base/lang","dojo/_base/html"],function(b){(function(){var c=b._mixin;b._Line=function(h,j){this.start=h;this.end=j};b._Line.prototype.getValue=function(h){return(this.end-this.start)*h+this.start};b.Animation=function(h){c(this,h);if(b.isArray(this.curve))this.curve=new b._Line(this.curve[0],this.curve[1])};b._Animation=b.Animation;b.extend(b.Animation,{duration:350,repeat:0,rate:20,_percent:0,_startRepeatCount:0,
_getStep:function(){var h=this._percent,j=this.easing;return j?j(h):h},_fire:function(h,j){j=j||[];if(this[h])if(b.config.debugAtAllCosts)this[h].apply(this,j);else try{this[h].apply(this,j)}catch(k){console.error("exception in animation handler for:",h);console.error(k)}return this},play:function(h,j){var k=this;k._delayTimer&&k._clearTimer();if(j){k._stopTimer();k._active=k._paused=false;k._percent=0}else if(k._active&&!k._paused)return k;k._fire("beforeBegin",[k.node]);h=h||k.delay;var l=b.hitch(k,
"_play",j);if(h>0){k._delayTimer=setTimeout(l,h);return k}l();return k},_play:function(){var h=this;h._delayTimer&&h._clearTimer();h._startTime=(new Date).valueOf();if(h._paused)h._startTime-=h.duration*h._percent;h._active=true;h._paused=false;var j=h.curve.getValue(h._getStep());if(!h._percent){if(!h._startRepeatCount)h._startRepeatCount=h.repeat;h._fire("onBegin",[j])}h._fire("onPlay",[j]);h._cycle();return h},pause:function(){var h=this;h._delayTimer&&h._clearTimer();h._stopTimer();if(!h._active)return h;
h._paused=true;h._fire("onPause",[h.curve.getValue(h._getStep())]);return h},gotoPercent:function(h,j){var k=this;k._stopTimer();k._active=k._paused=true;k._percent=h;j&&k.play();return k},stop:function(h){var j=this;j._delayTimer&&j._clearTimer();if(!j._timer)return j;j._stopTimer();if(h)j._percent=1;j._fire("onStop",[j.curve.getValue(j._getStep())]);j._active=j._paused=false;return j},status:function(){if(this._active)return this._paused?"paused":"playing";return"stopped"},_cycle:function(){var h=
this;if(h._active){var j=((new Date).valueOf()-h._startTime)/h.duration;if(j>=1)j=1;h._percent=j;if(h.easing)j=h.easing(j);h._fire("onAnimate",[h.curve.getValue(j)]);if(h._percent<1)h._startTimer();else{h._active=false;if(h.repeat>0){h.repeat--;h.play(null,true)}else if(h.repeat==-1)h.play(null,true);else if(h._startRepeatCount){h.repeat=h._startRepeatCount;h._startRepeatCount=0}h._percent=0;h._fire("onEnd",[h.node]);!h.repeat&&h._stopTimer()}}return h},_clearTimer:function(){clearTimeout(this._delayTimer);
delete this._delayTimer}});var a=0,d=null,e={run:function(){}};b.extend(b.Animation,{_startTimer:function(){if(!this._timer){this._timer=b.connect(e,"run",this,"_cycle");a++}d||(d=setInterval(b.hitch(e,"run"),this.rate))},_stopTimer:function(){if(this._timer){b.disconnect(this._timer);this._timer=null;a--}if(a<=0){clearInterval(d);d=null;a=0}}});var f=b.isIE?function(h){var j=h.style;if(!j.width.length&&b.style(h,"width")=="auto")j.width="auto"}:function(){};b._fade=function(h){h.node=b.byId(h.node);
var j=c({properties:{}},h);h=j.properties.opacity={};h.start=!("start"in j)?function(){return+b.style(j.node,"opacity")||0}:j.start;h.end=j.end;h=b.animateProperty(j);b.connect(h,"beforeBegin",b.partial(f,j.node));return h};b.fadeIn=function(h){return b._fade(c({end:1},h))};b.fadeOut=function(h){return b._fade(c({end:0},h))};b._defaultEasing=function(h){return 0.5+Math.sin((h+1.5)*Math.PI)/2};var g=function(h){this._properties=h;for(var j in h){var k=h[j];if(k.start instanceof b.Color)k.tempColor=
new b.Color}};g.prototype.getValue=function(h){var j={};for(var k in this._properties){var l=this._properties[k],m=l.start;if(m instanceof b.Color)j[k]=b.blendColors(m,l.end,h,l.tempColor).toCss();else b.isArray(m)||(j[k]=(l.end-m)*h+m+(k!="opacity"?l.units||"px":0))}return j};b.animateProperty=function(h){var j=h.node=b.byId(h.node);if(!h.easing)h.easing=b._defaultEasing;h=new b.Animation(h);b.connect(h,"beforeBegin",h,function(){var k={};for(var l in this.properties){if(l=="width"||l=="height")this.node.display=
"block";var m=this.properties[l];if(b.isFunction(m))m=m(j);m=k[l]=c({},b.isObject(m)?m:{end:m});if(b.isFunction(m.start))m.start=m.start(j);if(b.isFunction(m.end))m.end=m.end(j);var n=l.toLowerCase().indexOf("color")>=0,r=function(s,p){var q={height:s.offsetHeight,width:s.offsetWidth}[p];if(q!==undefined)return q;q=b.style(s,p);return p=="opacity"?+q:n?q:parseFloat(q)};if("end"in m){if(!("start"in m))m.start=r(j,l)}else m.end=r(j,l);if(n){m.start=new b.Color(m.start);m.end=new b.Color(m.end)}else m.start=
l=="opacity"?+m.start:parseFloat(m.start)}this.curve=new g(k)});b.connect(h,"onAnimate",b.hitch(b,"style",h.node));return h};b.anim=function(h,j,k,l,m,n){return b.animateProperty({node:h,duration:k||b.Animation.prototype.duration,properties:j,easing:l,onEnd:m}).play(n||0)}})();return b.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(b){return b});
define("orion/serviceregistry",["dojo"],function(b){function c(g,h,j){this.serviceId=g;this.name=h;this.properties=j}function a(g,h,j){this.serviceId=g;this.serviceReference=h;this.internalRegistry=j}function d(g,h,j){this.serviceId=g;this.implementation=h;this.internalRegistry=j;var k;for(k in h)if(typeof h[k]==="function")this[k]=function(l){return function(){if(j.isRegistered(g)){var m=new b.Deferred;try{var n=h[l].apply(h,Array.prototype.slice.call(arguments));b.when(n,b.hitch(m,m.resolve),b.hitch(m,
m.reject),b.hitch(m,m.progress))}catch(r){m.reject(r)}return m}throw new Error("Service was unregistered");}}(k)}function e(){this._namedlisteners={}}function f(){this._entries=[];this._namedReferences={};this._serviceEventTarget=new e;var g=this;this.internalRegistry={isRegistered:function(h){return g._entries[h]?true:false},unregisterService:function(h){var j=g._entries[h];if(j){for(var k=j.reference,l=g._namedReferences[k.getName()],m=0;m<l.length;m++)if(l[m]===k){if(l.length===1)delete g._namedReferences[k.getName()];
else l.splice(m,1);break}g._entries[h]=null;g._serviceEventTarget.dispatchEvent("serviceRemoved",k,j.service)}},dispatchEvent:function(h,j){var k=g._entries[h];k&&k.eventTarget.dispatchEvent.apply(k.eventTarget,[j].concat(Array.prototype.slice.call(arguments,2)))},addEventListener:function(h,j,k){(h=g._entries[h])&&h.eventTarget.addEventListener(j,k)},removeEventListener:function(h,j,k){(h=g._entries[h])&&h.eventTarget.removeEventListener(j,k)}}}c.prototype={getServiceId:function(){return this.serviceId},
getName:function(){return this.name},getPropertyNames:function(){var g=[],h;for(h in this.properties)this.properties.hasOwnProperty(h)&&g.push(h);return g},getProperty:function(g){return this.properties[g]}};c.prototype.constructor=c;a.prototype={unregister:function(){this.internalRegistry.unregisterService(this.serviceId)},dispatchEvent:function(g){this.internalRegistry.dispatchEvent.apply(this.internalRegistry,[this.serviceId,g].concat(Array.prototype.slice.call(arguments,1)))},getServiceReference:function(){return this.serviceReference}};
a.prototype.constructor=a;d.prototype={addEventListener:function(g,h){this.internalRegistry.addEventListener(this.serviceId,g,h)},removeEventListener:function(g,h){this.internalRegistry.removeEventListener(this.serviceId,g,h)}};d.prototype.constructor=d;e.prototype={dispatchEvent:function(g){var h=this._namedlisteners[g];if(h)for(var j=0;j<h.length;j++)try{var k=Array.prototype.slice.call(arguments,1);h[j].apply(null,k)}catch(l){console.log(l)}},addEventListener:function(g,h){this._namedlisteners[g]=
this._namedlisteners[g]||[];this._namedlisteners[g].push(h)},removeEventListener:function(g,h){var j=this._namedlisteners[g];if(j)for(var k=0;k<j.length;k++)if(j[k]===h){if(j.length===1)delete this._namedlisteners[g];else j.splice(k,1);break}}};e.prototype.constructor=e;f.prototype={getService:function(g){var h;if(typeof g==="string"){if(this._namedReferences[g])for(var j=0;j<this._namedReferences[g].length;j++)if(h=this._entries[this._namedReferences[g][j].getServiceId()].service)break}else h=this._entries[g.getServiceId()].service;
return h},getServiceReferences:function(g){if(g)return this._namedReferences[g]?this._namedReferences[g]:[];g=[];for(var h=0;h<this._entries.length;h++)this._entries[h]&&g.push(this._entries[h].reference);return g},registerService:function(g,h,j){var k=this._entries.length;j=new c(k,g,j);h=new d(k,h,this.internalRegistry);this._namedReferences[g]=this._namedReferences[g]||[];this._namedReferences[g].push(j);this._entries.push({reference:j,service:h,eventTarget:new e});this._serviceEventTarget.dispatchEvent("serviceAdded",
j,h);return new a(k,j,this.internalRegistry)},addEventListener:function(g,h){this._serviceEventTarget.addEventListener(g,h)},removeEventListener:function(g,h){this._serviceEventTarget.removeEventListener(g,h)}};f.prototype.constructor=f;return{ServiceReference:c,ServiceRegistration:a,Service:d,EventTarget:e,ServiceRegistry:f}});define("dijit",["dojo"],function(b){return dijit=b._dijit||{}});
define("orion/commonHTMLFragments",["require"],function(b){var c='<div id="staticBanner" class="layoutBlock topRowBanner"><a id="home" class="layoutLeft logo" href="'+b.toUrl("index.html")+'"><img src="'+b.toUrl("images/orion-small-lightondark.gif")+'" alt="Orion Logo"/></a><div id="primaryNav" class="layoutLeft primaryNav"></div><div id="userMenu" class="layoutRight textless"></div><div id="userInfo" class="layoutRight primaryNav"></div><div class="layoutRight primaryNav">|</div></div><div id="titleArea" class="layoutBlock titleArea"><div id="pageTitle" class="layoutLeft pageTitle"></div><input type="search" id="search" placeholder="Search" title="Type a keyword or wild card to search in root" class="layoutRight searchbox"><div id="relatedLinks" class="layoutRight pageNav"></div><div id="extras" class="layoutRight pageNav"><div id="globalActions" class="pageNav"></div><span id="pageFavorite" tabindex="0" role="button" aria-label="Add this page to the favorites list" class="imageSprite core-sprite-favorite_sml"></span></div><div id="dimension" class="clear dimension"></div><div id="location" class="clear currentLocation"></div></div>';
b='<div class="layoutLeft pageActions" id="pageActions"></div><div class="layoutLeft pageActions" id="selectionTools"></div><img class="layoutRight progressPane" src="'+b.toUrl("images/none.png")+'" id="progressPane"></img><div class="layoutRight status" id="statusPane"></div><div class="layoutRight pageActions" id="pageNavigationActions"></div><div id="notificationArea" class="layoutLeft layoutBlock slideContainer"><div class="layoutLeft" id="notifications" aria-live="assertive" aria-atomic="true"></div><div class="layoutRight"><span tabindex: "0" role: "button" class="layoutRight core-sprite-close imageSprite" id="closeNotifications"></span></div></div><div id="parameterArea" class="layoutBlock slideParameters slideContainer"><span id="pageParameterArea" class="slide"><span id="pageCommandParameters" class="parameters"></span><span id="pageCommandDismiss" class="parametersDismiss"></span></span></div>';
return{topHTMLFragment:c,bottomHTMLFragment:'<div class="layoutBlock"><div class="footerBlock">Orion is in Beta. Please try it out but BEWARE your data may be lost.</div><div class="footerRightBlock"><a href="http://wiki.eclipse.org/Orion/FAQ" target="_blank">FAQ</a> | <a href="https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Orion&version=0.4" target="_blank">Report a Bug</a> | <a href="http://www.eclipse.org/legal/privacy.php" target="_blank">Privacy Policy</a> | <a href="http://www.eclipse.org/legal/termsofuse.php" target="_blank">Terms of Use</a> | <a href="http://www.eclipse.org/legal/copyright.php" target="_blank">Copyright Agent</a></div></div>',
toolbarHTMLFragment:b}});
define("dojo/hash",["dojo"],function(b){(function(){function c(m,n){n=m.indexOf(n);return n>=0?m.substring(n+1):""}function a(){return c(location.href,"#")}function d(){b.publish("/dojo/hashchange",[a()])}function e(){if(a()!==h){h=a();d()}}function f(m){if(j)if(j.isTransitioning())setTimeout(b.hitch(null,f,m),l);else{var n=j.iframe.location.href,r=n.indexOf("?");j.iframe.location.replace(n.substring(0,r)+"?"+m)}else{location.replace("#"+m);!k&&e()}}function g(){function m(){h=a();s=t?h:c(u.href,
"?");p=false;q=null}var n=document.createElement("iframe"),r=b.config.dojoBlankHtmlUrl||b.moduleUrl("dojo","resources/blank.html");b.config.useXDomain&&!b.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");n.id="dojo-hash-iframe";n.src=r+"?"+a();n.style.display="none";document.body.appendChild(n);this.iframe=b.global["dojo-hash-iframe"];
var s,p,q,o,t,u=this.iframe.location;this.isTransitioning=function(){return p};this.pollLocation=function(){if(!t)try{var w=c(u.href,"?");if(document.title!=o)o=this.iframe.document.title=document.title}catch(x){t=true;console.error("dojo.hash: Error adding history entry. Server unreachable.")}var z=a();if(p&&h===z)if(t||w===q){m();d()}else{setTimeout(b.hitch(this,this.pollLocation),0);return}else if(!(h===z&&(t||s===w)))if(h!==z){h=z;p=true;q=z;n.src=r+"?"+q;t=false;setTimeout(b.hitch(this,this.pollLocation),
0);return}else if(!t){location.href="#"+u.search.substring(1);m();d()}setTimeout(b.hitch(this,this.pollLocation),l)};m();setTimeout(b.hitch(this,this.pollLocation),l)}b.hash=function(m,n){if(!arguments.length)return a();if(m.charAt(0)=="#")m=m.substring(1);if(n)f(m);else location.href="#"+m;return m};var h,j,k,l=b.config.hashPollFrequency||100;b.addOnLoad(function(){if("onhashchange"in b.global&&(!b.isIE||b.isIE>=8&&document.compatMode!="BackCompat"))k=b.connect(b.global,"onhashchange",d);else if(document.addEventListener){h=
a();setInterval(e,l)}else if(document.attachEvent)j=new g})})();return b.hash});
(function(){var b=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],c=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,a=/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,d=[];define("text",["require","exports","module"],function(){var e,f,g;if(typeof window!=="undefined"&&window.navigator&&window.document)f=function(h,j){var k=e.createXhr();k.open("GET",h,true);k.onreadystatechange=function(){k.readyState===4&&j(k.responseText)};k.send(null)};else if(typeof process!=="undefined"&&process.versions&&
process.versions.node){g=require.nodeRequire("fs");f=function(h,j){j(g.readFileSync(h,"utf8"))}}else if(typeof Packages!=="undefined")f=function(h,j){var k=new java.io.File(h);h=java.lang.System.getProperty("line.separator");k=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(k),"utf-8"));var l,m,n="";try{l=new java.lang.StringBuffer;if((m=k.readLine())&&m.length()&&m.charAt(0)===65279)m=m.substring(1);for(l.append(m);(m=k.readLine())!==null;){l.append(h);l.append(m)}n=
String(l.toString())}finally{k.close()}j(n)};return e={version:"0.24.0",strip:function(h){if(h){h=h.replace(c,"");var j=h.match(a);if(j)h=j[1]}else h="";return h},jsEscape:function(h){return h.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 h,j,k;if(typeof XMLHttpRequest!=="undefined")return new XMLHttpRequest;else for(j=0;j<3;j++){k=b[j];try{h=new ActiveXObject(k)}catch(l){}if(h){b=
[k];break}}if(!h)throw new Error("require.getXhr(): XMLHttpRequest not available");return h},get:f,load:function(h,j,k,l){var m=false,n=h.indexOf("."),r=h.substring(0,n),s=h.substring(n+1,h.length);n=s.indexOf("!");if(n!==-1){m=s.substring(n+1,s.length);m=m==="strip";s=s.substring(0,n)}j=j.nameToUrl(r,"."+s);e.get(j,function(p){p=m?e.strip(p):p;if(l.isBuild&&l.inlineText)d[h]=p;k(p)})},write:function(h,j,k){if(j in d){var l=e.jsEscape(d[j]);k("define('"+h+"!"+j+"', 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(b,c){c.getObject("i18n",true,c);c.i18n.getLocalization=c.i18n.getLocalization||function(a,d,e){e=c.i18n.normalizeLocale(e);var f=e.split("-"),g=[a,"nls",d].join(".");if(typeof c.global.require!=="undefined"){var h=b("i18n!"+[a.replace(/\./g,"/"),"nls",d].join("/"));(c._loadedModules[g]=c._loadedModules[g]||{})[f.join("_")]=h.root||h}if(g=c._loadedModules[g]){var j;for(h=f.length;h>0;h--){var k=f.slice(0,h).join("_");if(g[k]){j=g[k];break}}if(!j)j=g.ROOT;
if(j){a=function(){};a.prototype=j;return new a}}throw new Error("Bundle not found: "+d+" in "+a+" , locale="+e);};c.i18n.normalizeLocale=function(a){a=a?a.toLowerCase():c.locale;if(a=="root")a="ROOT";return a};c.i18n._requireLocalization=function(a,d,e,f){e=c.i18n.normalizeLocale(e);var g=[a,"nls",d].join("."),h="";if(f){for(var j=f.split(","),k=0;k<j.length;k++)if(e.indexOf(j[k])==0)if(j[k].length>h.length)h=j[k];h||(h="ROOT")}j=f?h:e;var l=c._loadedModules[g];k=null;if(l){if(c.config.localizationComplete&&
l._built)return;k=j.replace(/-/g,"_");k=c._loadedModules[g+"."+k]}if(!k){l=c.provide(g);var m=c._getModuleSymbols(a).concat("nls").join("/"),n;c.i18n._searchLocalePath(j,f,function(r){var s=r.replace(/-/g,"_"),p=g+"."+s,q=false;if(c._loadedModules[p])q=true;else{c.provide(p);p=[m];r!="ROOT"&&p.push(r);p.push(d);r=p.join("/")+".js";q=c._loadPath(r,null,function(o){o=o.root||o;var t=function(){};t.prototype=n;l[s]=new t;for(var u in o)l[s][u]=o[u]})}if(q&&l[s])n=l[s];else l[s]=n;if(f)return true})}if(f&&
e!=h)l[e.replace(/-/g,"_")]=l[h.replace(/-/g,"_")]};(function(){var a=c.config.extraLocale;if(a){if(!a instanceof Array)a=[a];var d=c.i18n._requireLocalization;c.i18n._requireLocalization=function(e,f,g,h){d(e,f,g,h);if(!g)for(g=0;g<a.length;g++)d(e,f,a[g],h)}}})();c.i18n._searchLocalePath=function(a,d,e){a=c.i18n.normalizeLocale(a);var f=a.split("-");a=[];for(var g=f.length;g>0;g--)a.push(f.slice(0,g).join("-"));a.push(false);d&&a.reverse();for(d=a.length-1;d>=0;d--)if(e(a[d]||"ROOT"))break};c.i18n._preloadLocalizations=
function(a,d){function e(h){h=c.i18n.normalizeLocale(h);c.i18n._searchLocalePath(h,true,function(j){for(var k=0;k<d.length;k++)if(d[k]==j){c.require(a+"_"+j);return true}return false})}e();for(var f=c.config.extraLocale||[],g=0;g<f.length;g++)e(f[g])};return c.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(b){b.getObject("window",true,b);b.window.getBox=function(){var c=b.doc.compatMode=="BackCompat"?b.body():b.doc.documentElement,a=b._docScroll();return{w:c.clientWidth,h:c.clientHeight,l:a.x,t:a.y}};b.window.get=function(c){if(b.isIE&&window!==document.parentWindow){c.parentWindow.execScript("document._parentWindow = window;","Javascript");var a=c._parentWindow;c._parentWindow=null;return a}return c.parentWindow||c.defaultView};b.window.scrollIntoView=function(c,
a){try{c=b.byId(c);var d=c.ownerDocument||b.doc,e=d.body||b.body(),f=d.documentElement||e.parentNode,g=b.isIE,h=b.isWebKit;if((!(b.isMoz||g||h||b.isOpera)||c==e||c==f)&&typeof c.scrollIntoView!="undefined")c.scrollIntoView(false);else{var j=d.compatMode=="BackCompat",k=g>=9&&c.ownerDocument.parentWindow.frameElement?f.clientHeight>0&&f.clientWidth>0&&(e.clientHeight==0||e.clientWidth==0||e.clientHeight>f.clientHeight||e.clientWidth>f.clientWidth)?f:e:j?e:f;d=h?e:k;var l=k.clientWidth,m=k.clientHeight,
n=!b._isBodyLtr(),r=a||b.position(c),s=c.parentNode;a=function(I){return g<=6||g&&j?false:b.style(I,"position").toLowerCase()=="fixed"};if(!a(c))for(;s;){if(s==e)s=d;var p=b.position(s),q=a(s);if(s==d){p.w=l;p.h=m;if(d==f&&g&&n)p.x+=d.offsetWidth-p.w;if(p.x<0||!g)p.x=0;if(p.y<0||!g)p.y=0}else{var o=b._getPadBorderExtents(s);p.w-=o.w;p.h-=o.h;p.x+=o.l;p.y+=o.t;var t=s.clientWidth,u=p.w-t;if(t>0&&u>0){p.w=t;p.x+=n&&(g||s.clientLeft>o.l)?u:0}t=s.clientHeight;u=p.h-t;if(t>0&&u>0)p.h=t}if(q){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>m)p.h=m-p.y;if(p.x+p.w>l)p.w=l-p.x}var w=r.x-p.x,x=r.y-Math.max(p.y,0),z=w+r.w-p.w,E=x+r.h-p.h;if(z*w>0){var D=Math[w<0?"max":"min"](w,z);if(n&&(g==8&&!j||g>=9))D=-D;r.x+=s.scrollLeft;s.scrollLeft+=D;r.x-=s.scrollLeft}if(E*x>0){r.y+=s.scrollTop;s.scrollTop+=Math[x<0?"max":"min"](x,E);r.y-=s.scrollTop}s=s!=d&&!q&&s.parentNode}}}catch(F){console.error("scrollIntoView: "+F);c.scrollIntoView(false)}};return b.window});
define("dijit/_base/manager",["dojo","dijit"],function(b,c){b.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,d){d=d||b.global;var e=0,f;for(f in this._hash)a.call(d,this._hash[f],e++,this._hash);return this},
filter:function(a,d){d=d||b.global;var e=new c.WidgetSet,f=0,g;for(g in this._hash){var h=this._hash[g];a.call(d,h,f++,this._hash)&&e.add(h)}return e},byId:function(a){return this._hash[a]},byClass:function(a){var d=new c.WidgetSet,e,f;for(e in this._hash){f=this._hash[e];f.declaredClass==a&&d.add(f)}return d},toArray:function(){var a=[];for(var d in this._hash)a.push(this._hash[d]);return a},map:function(a,d){return b.map(this.toArray(),a,d)},every:function(a,d){d=d||b.global;var e=0,f;for(f in this._hash)if(!a.call(d,
this._hash[f],e++,this._hash))return false;return true},some:function(a,d){d=d||b.global;var e=0,f;for(f in this._hash)if(a.call(d,this._hash[f],e++,this._hash))return true;return false}});(function(){c.registry=new c.WidgetSet;var a=c.registry._hash,d=b.attr,e=b.hasAttr,f=b.style;c.byId=function(k){return typeof k=="string"?a[k]:k};var g={};c.getUniqueId=function(k){var l;do l=k+"_"+(k in g?++g[k]:(g[k]=0));while(a[l]);return c._scopeName=="dijit"?l:c._scopeName+"_"+l};c.findWidgets=function(k){function l(n){for(n=
n.firstChild;n;n=n.nextSibling)if(n.nodeType==1){var r=n.getAttribute("widgetId");if(r)(r=a[r])&&m.push(r);else l(n)}}var m=[];l(k);return m};c._destroyAll=function(){c._curFocus=null;c._prevFocus=null;c._activeStack=[];b.forEach(c.findWidgets(b.body()),function(k){if(!k._destroyed)if(k.destroyRecursive)k.destroyRecursive();else k.destroy&&k.destroy()})};b.isIE&&b.addOnWindowUnload(function(){c._destroyAll()});c.byNode=function(k){return a[k.getAttribute("widgetId")]};c.getEnclosingWidget=function(k){for(;k;){var l=
k.getAttribute&&k.getAttribute("widgetId");if(l)return a[l];k=k.parentNode}return null};var h=c._isElementShown=function(k){var l=f(k);return l.visibility!="hidden"&&l.visibility!="collapsed"&&l.display!="none"&&d(k,"type")!="hidden"};c.hasDefaultTabStop=function(k){switch(k.nodeName.toLowerCase()){case "a":return e(k,"href");case "area":case "button":case "input":case "object":case "select":case "textarea":return true;case "iframe":var l;try{var m=k.contentDocument;if("designMode"in m&&m.designMode==
"on")return true;l=m.body}catch(n){try{l=k.contentWindow.document.body}catch(r){return false}}return l.contentEditable=="true"||l.firstChild&&l.firstChild.contentEditable=="true";default:return k.contentEditable=="true"}};var j=c.isTabNavigable=function(k){return d(k,"disabled")?false:e(k,"tabIndex")?d(k,"tabIndex")>=0:c.hasDefaultTabStop(k)};c._getTabNavigable=function(k){function l(w){return w&&w.tagName.toLowerCase()=="input"&&w.type&&w.type.toLowerCase()=="radio"&&w.name&&w.name.toLowerCase()}
function m(w){return t[l(w)]||w}var n,r,s,p,q,o,t={},u=function(w){b.query("> *",w).forEach(function(x){if(!(b.isIE&&x.scopeName!=="HTML"||!h(x))){if(j(x)){var z=d(x,"tabIndex");if(!e(x,"tabIndex")||z==0){n||(n=x);r=x}else if(z>0){if(!s||z<p){p=z;s=x}if(!q||z>=o){o=z;q=x}}z=l(x);if(b.attr(x,"checked")&&z)t[z]=x}x.nodeName.toUpperCase()!="SELECT"&&u(x)}})};h(k)&&u(k);return{first:m(n),last:m(r),lowest:m(s),highest:m(q)}};c.getFirstInTabbingOrder=function(k){k=c._getTabNavigable(b.byId(k));return k.lowest?
k.lowest:k.first};c.getLastInTabbingOrder=function(k){k=c._getTabNavigable(b.byId(k));return k.last?k.last:k.highest};c.defaultDuration=b.config.defaultDuration||200})();return c});
define("dojo/Stateful",["dojo"],function(b){b.declare("dojo.Stateful",null,{postscript:function(c){c&&b.mixin(this,c)},get:function(c){return this[c]},set:function(c,a){if(typeof c==="object"){for(var d in c)this.set(d,c[d]);return this}d=this[c];this[c]=a;this._watchCallbacks&&this._watchCallbacks(c,d,a);return this},watch:function(c,a){var d=this._watchCallbacks;if(!d){var e=this;d=this._watchCallbacks=function(g,h,j,k){var l=function(m){if(m){m=m.slice();for(var n=0,r=m.length;n<r;n++)try{m[n].call(e,
g,h,j)}catch(s){console.error(s)}}};l(d["_"+g]);k||l(d["*"])}}if(!a&&typeof c==="function"){a=c;c="*"}else c="_"+c;var f=d[c];if(typeof f!=="object")f=d[c]=[];f.push(a);return{unwatch:function(){f.splice(b.indexOf(f,a),1)}}}});return b.Stateful});
define("dijit/_WidgetBase",["dojo","dijit","dijit/_base/manager","dojo/Stateful"],function(b,c){(function(){b.declare("dijit._WidgetBase",b.Stateful,{id:"",lang:"",dir:"","class":"",style:"",title:"",tooltip:"",baseClass:"",srcNodeRef:null,domNode:null,containerNode:null,attributeMap:{id:"",dir:"",lang:"","class":"",style:"",title:""},_blankGif:(b.config.blankGif||b.moduleUrl("dojo","resources/blank.gif")).toString(),postscript:function(a,d){this.create(a,d)},create:function(a,d){this.srcNodeRef=
b.byId(d);this._connects=[];this._subscribes=[];if(this.srcNodeRef&&typeof this.srcNodeRef.id=="string")this.id=this.srcNodeRef.id;if(a){this.params=a;b._mixin(this,a)}this.postMixInProperties();if(!this.id)this.id=c.getUniqueId(this.declaredClass.replace(/\./g,"_"));c.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(e,f){if(f.params&&e in f.params||f[e])f.set(e,f[e])};for(var d in this.attributeMap)a(d,this);b.forEach(this._getSetterAttributes(),function(e){e in this.attributeMap||a(e,this)},this)},_getSetterAttributes:function(){var a=this.constructor;if(!a._setterAttrs){var d=a._setterAttrs=[],e,f=a.prototype;for(var g in f)if(b.isFunction(f[g])&&(e=g.match(/^_set([a-zA-Z]*)Attr$/))&&
e[1])d.push(e[1].charAt(0).toLowerCase()+e[1].substr(1))}return a._setterAttrs},postMixInProperties:function(){},buildRendering:function(){if(!this.domNode)this.domNode=this.srcNodeRef||b.create("div");if(this.baseClass){var a=this.baseClass.split(" ");this.isLeftToRight()||(a=a.concat(b.map(a,function(d){return d+"Rtl"})));b.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 d=b.forEach,e=b.unsubscribe;d(this._connects,function(f){d(f,b.disconnect)});d(this._subscribes,function(f){e(f)});d(this._supportingWidgets||[],function(f){if(f.destroyRecursive)f.destroyRecursive();else f.destroy&&f.destroy()});this.destroyRendering(a);c.registry.remove(this.id);this._destroyed=true},destroyRendering:function(a){if(this.bgIframe){this.bgIframe.destroy(a);delete this.bgIframe}if(this.domNode){a?b.removeAttr(this.domNode,
"widgetId"):b.destroy(this.domNode);delete this.domNode}if(this.srcNodeRef){a||b.destroy(this.srcNodeRef);delete this.srcNodeRef}},destroyDescendants:function(a){b.forEach(this.getChildren(),function(d){d.destroyRecursive&&d.destroyRecursive(a)})},uninitialize:function(){return false},_setClassAttr:function(a){b.replaceClass(this[this.attributeMap["class"]||"domNode"],a,this["class"]);this._set("class",a)},_setStyleAttr:function(a){var d=this[this.attributeMap.style||"domNode"];if(b.isObject(a))b.style(d,
a);else if(d.style.cssText)d.style.cssText+="; "+a;else d.style.cssText=a;this._set("style",a)},_attrToDom:function(a,d){var e=this.attributeMap[a];b.forEach(b.isArray(e)?e:[e],function(f){var g=this[f.node||f||"domNode"];switch(f.type||"attribute"){case "attribute":if(b.isFunction(d))d=b.hitch(this,d);f=f.attribute?f.attribute:/^on[A-Z][a-zA-Z]*$/.test(a)?a.toLowerCase():a;b.attr(g,f,d);break;case "innerText":g.innerHTML="";g.appendChild(b.doc.createTextNode(d));break;case "innerHTML":g.innerHTML=
d;break;case "class":b.replaceClass(g,d,this[a]);break}},this)},get:function(a){var d=this._getAttrNames(a);return this[d.g]?this[d.g]():this[a]},set:function(a,d){if(typeof a==="object"){for(var e in a)this.set(e,a[e]);return this}e=this._getAttrNames(a);if(this[e.s])var f=this[e.s].apply(this,Array.prototype.slice.call(arguments,1));else{a in this.attributeMap&&this._attrToDom(a,d);this._set(a,d)}return f||this},_attrPairNames:{},_getAttrNames:function(a){var d=this._attrPairNames;if(d[a])return d[a];
var e=a.charAt(0).toUpperCase()+a.substr(1);return d[a]={n:a+"Node",s:"_set"+e+"Attr",g:"_get"+e+"Attr"}},_set:function(a,d){var e=this[a];this[a]=d;this._watchCallbacks&&this._created&&d!==e&&this._watchCallbacks(a,e,d)},toString:function(){return"[Widget "+this.declaredClass+", "+(this.id||"NO ID")+"]"},getDescendants:function(){return this.containerNode?b.query("[widgetId]",this.containerNode).map(c.byNode):[]},getChildren:function(){return this.containerNode?c.findWidgets(this.containerNode):
[]},connect:function(a,d,e){a=[b._connect(a,d,this,e)];this._connects.push(a);return a},disconnect:function(a){for(var d=0;d<this._connects.length;d++)if(this._connects[d]==a){b.forEach(a,b.disconnect);this._connects.splice(d,1);return}},subscribe:function(a,d){a=b.subscribe(a,this,d);this._subscribes.push(a);return a},unsubscribe:function(a){for(var d=0;d<this._subscribes.length;d++)if(this._subscribes[d]==a){b.unsubscribe(a);this._subscribes.splice(d,1);return}},isLeftToRight:function(){return this.dir?
this.dir=="ltr":b._isBodyLtr()},placeAt:function(a,d){a.declaredClass&&a.addChild?a.addChild(this,d):b.place(this.domNode,a,d);return this}})})();return c._WidgetBase});
define("dijit/_base/focus",["dojo","dijit","dojo/window","dijit/_base/manager"],function(b,c){b.mixin(c,{_curFocus:null,_prevFocus:null,isCollapsed:function(){return c.getBookmark().isCollapsed},getBookmark:function(){var a,d,e=b.doc.selection,f=c._curFocus;if(b.global.getSelection){if(e=b.global.getSelection())if(e.isCollapsed){if(a=f?f.tagName:""){a=a.toLowerCase();if(a=="textarea"||a=="input"&&(!f.type||f.type.toLowerCase()=="text")){e={start:f.selectionStart,end:f.selectionEnd,node:f,pRange:true};
return{isCollapsed:e.end<=e.start,mark:e}}}a={isCollapsed:true};if(e.rangeCount)a.mark=e.getRangeAt(0).cloneRange()}else{d=e.getRangeAt(0);a={isCollapsed:false,mark:d.cloneRange()}}}else if(e){a=f?f.tagName:"";a=a.toLowerCase();if(f&&a&&(a=="button"||a=="textarea"||a=="input"))if(e.type&&e.type.toLowerCase()=="none")return{isCollapsed:true,mark:null};else{d=e.createRange();return{isCollapsed:d.text&&d.text.length?false:true,mark:{range:d,pRange:true}}}a={};try{d=e.createRange();a.isCollapsed=!(e.type==
"Text"?d.htmlText.length:d.length)}catch(g){a.isCollapsed=true;return a}if(e.type.toUpperCase()=="CONTROL")if(d.length){a.mark=[];e=0;for(f=d.length;e<f;)a.mark.push(d.item(e++))}else{a.isCollapsed=true;a.mark=null}else a.mark=d.getBookmark()}else console.warn("No idea how to store the current selection for this browser!");return a},moveToBookmark:function(a){var d=b.doc;if(a=a.mark)if(b.global.getSelection){var e=b.global.getSelection();if(e&&e.removeAllRanges)if(a.pRange){e=a.node;e.selectionStart=
a.start;e.selectionEnd=a.end}else{e.removeAllRanges();e.addRange(a)}else console.warn("No idea how to restore selection for this browser!")}else if(d.selection&&a){var f;if(a.pRange)f=a.range;else if(b.isArray(a)){f=d.body.createControlRange();b.forEach(a,function(g){f.addElement(g)})}else{f=d.body.createTextRange();f.moveToBookmark(a)}f.select()}},getFocus:function(a,d){a=!c._curFocus||a&&b.isDescendant(c._curFocus,a.domNode)?c._prevFocus:c._curFocus;return{node:a,bookmark:a==c._curFocus&&b.withGlobal(d||
b.global,c.getBookmark),openedForWindow:d}},focus:function(a){if(a){var d="node"in a?a.node:a,e=a.bookmark;a=a.openedForWindow;var f=e?e.isCollapsed:false;if(d){var g=d.tagName.toLowerCase()=="iframe"?d.contentWindow:d;if(g&&g.focus)try{g.focus()}catch(h){}c._onFocusNode(d)}if(e&&b.withGlobal(a||b.global,c.isCollapsed)&&!f){a&&a.focus();try{b.withGlobal(a||b.global,c.moveToBookmark,null,[e])}catch(j){}}}},_activeStack:[],registerIframe:function(a){return c.registerWin(a.contentWindow,a)},unregisterIframe:function(a){c.unregisterWin(a)},
registerWin:function(a,d){var e=function(l){c._justMouseDowned=true;setTimeout(function(){c._justMouseDowned=false},0);b.isIE&&l&&l.srcElement&&l.srcElement.parentNode==null||c._onTouchNode(d||l.target||l.srcElement,"mouse")},f=b.isIE?a.document.documentElement:a.document;if(f)if(b.isIE){a.document.body.attachEvent("onmousedown",e);var g=function(l){l.srcElement.tagName.toLowerCase()!="#document"&&c.isTabNavigable(l.srcElement)?c._onFocusNode(d||l.srcElement):c._onTouchNode(d||l.srcElement)};f.attachEvent("onactivate",
g);var h=function(l){c._onBlurNode(d||l.srcElement)};f.attachEvent("ondeactivate",h);return function(){a.document.detachEvent("onmousedown",e);f.detachEvent("onactivate",g);f.detachEvent("ondeactivate",h);f=null}}else{f.body.addEventListener("mousedown",e,true);var j=function(l){c._onFocusNode(d||l.target)};f.addEventListener("focus",j,true);var k=function(l){c._onBlurNode(d||l.target)};f.addEventListener("blur",k,true);return function(){f.body.removeEventListener("mousedown",e,true);f.removeEventListener("focus",
j,true);f.removeEventListener("blur",k,true);f=null}}},unregisterWin:function(a){a&&a()},_onBlurNode:function(){c._prevFocus=c._curFocus;c._curFocus=null;if(!c._justMouseDowned){c._clearActiveWidgetsTimer&&clearTimeout(c._clearActiveWidgetsTimer);c._clearActiveWidgetsTimer=setTimeout(function(){delete c._clearActiveWidgetsTimer;c._setStack([]);c._prevFocus=null},100)}},_onTouchNode:function(a,d){if(c._clearActiveWidgetsTimer){clearTimeout(c._clearActiveWidgetsTimer);delete c._clearActiveWidgetsTimer}var e=
[];try{for(;a;){var f=b.attr(a,"dijitPopupParent");if(f)a=c.byId(f).domNode;else if(a.tagName&&a.tagName.toLowerCase()=="body"){if(a===b.body())break;a=b.window.get(a.ownerDocument).frameElement}else{var g=a.getAttribute&&a.getAttribute("widgetId"),h=g&&c.byId(g);h&&!(d=="mouse"&&h.get("disabled"))&&e.unshift(g);a=a.parentNode}}}catch(j){}c._setStack(e,d)},_onFocusNode:function(a){if(a)if(a.nodeType!=9){c._onTouchNode(a);if(a!=c._curFocus){if(c._curFocus)c._prevFocus=c._curFocus;c._curFocus=a;b.publish("focusNode",
[a])}}},_setStack:function(a,d){var e=c._activeStack;c._activeStack=a;for(var f=0;f<Math.min(e.length,a.length);f++)if(e[f]!=a[f])break;for(var g,h=e.length-1;h>=f;h--)if(g=c.byId(e[h])){g._focused=false;g.set("focused",false);g._hasBeenBlurred=true;g._onBlur&&g._onBlur(d);b.publish("widgetBlur",[g,d])}for(h=f;h<a.length;h++)if(g=c.byId(a[h])){g._focused=true;g.set("focused",true);g._onFocus&&g._onFocus(d);b.publish("widgetFocus",[g,d])}}});b.addOnLoad(function(){var a=c.registerWin(window);b.isIE&&
b.addOnWindowUnload(function(){c.unregisterWin(a);a=null})});return c});
define("dojo/AdapterRegistry",["dojo"],function(b){b.AdapterRegistry=function(c){this.pairs=[];this.returnWrappers=c||false};b.extend(b.AdapterRegistry,{register:function(c,a,d,e,f){this.pairs[f?"unshift":"push"]([c,a,d,e])},match:function(){for(var c=0;c<this.pairs.length;c++){var a=this.pairs[c];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(c){for(var a=0;a<this.pairs.length;a++)if(this.pairs[a][0]==
c){this.pairs.splice(a,1);return true}return false}});return b.AdapterRegistry});
define("dijit/_base/place",["dojo","dijit","dojo/window","dojo/AdapterRegistry"],function(b,c){c.getViewport=function(){return b.window.getBox()};c.placeOnScreen=function(a,d,e,f){e=b.map(e,function(g){var h={corner:g,pos:{x:d.x,y:d.y}};if(f){h.pos.x+=g.charAt(1)=="L"?f.x:-f.x;h.pos.y+=g.charAt(0)=="T"?f.y:-f.y}return h});return c._place(a,e)};c._place=function(a,d,e,f){var g=b.window.getBox();if(!a.parentNode||String(a.parentNode.tagName).toLowerCase()!="body")b.body().appendChild(a);var h=null;
b.some(d,function(k){var l=k.corner,m=k.pos,n=0,r={w:l.charAt(1)=="L"?g.l+g.w-m.x:m.x-g.l,h:l.charAt(1)=="T"?g.t+g.h-m.y:m.y-g.t};if(e){n=e(a,k.aroundCorner,l,r,f);n=typeof n=="undefined"?0:n}var s=a.style,p=s.display,q=s.visibility;s.visibility="hidden";s.display="";var o=b.marginBox(a);s.display=p;s.visibility=q;s=Math.max(g.l,l.charAt(1)=="L"?m.x:m.x-o.w);p=Math.max(g.t,l.charAt(0)=="T"?m.y:m.y-o.h);q=Math.min(g.l+g.w,l.charAt(1)=="L"?s+o.w:m.x);m=Math.min(g.t+g.h,l.charAt(0)=="T"?p+o.h:m.y);q=
q-s;m=m-p;n+=o.w-q+(o.h-m);if(h==null||n<h.overflow)h={corner:l,aroundCorner:k.aroundCorner,x:s,y:p,w:q,h:m,overflow:n,spaceAvailable:r};return!n});h.overflow&&e&&e(a,h.aroundCorner,h.corner,h.spaceAvailable,f);d=b._isBodyLtr();var j=a.style;j.top=h.y+"px";j[d?"left":"right"]=(d?h.x:g.w-h.x-h.w)+"px";return h};c.placeOnScreenAroundNode=function(a,d,e,f){d=b.byId(d);d=b.position(d,true);return c._placeOnScreenAroundRect(a,d.x,d.y,d.w,d.h,e,f)};c.placeOnScreenAroundRectangle=function(a,d,e,f){return c._placeOnScreenAroundRect(a,
d.x,d.y,d.width,d.height,e,f)};c._placeOnScreenAroundRect=function(a,d,e,f,g,h,j){var k=[];for(var l in h)k.push({aroundCorner:l,corner:h[l],pos:{x:d+(l.charAt(1)=="L"?0:f),y:e+(l.charAt(0)=="T"?0:g)}});return c._place(a,k,j,{w:f,h:g})};c.placementRegistry=new b.AdapterRegistry;c.placementRegistry.register("node",function(a,d){return typeof d=="object"&&typeof d.offsetWidth!="undefined"&&typeof d.offsetHeight!="undefined"},c.placeOnScreenAroundNode);c.placementRegistry.register("rect",function(a,
d){return typeof d=="object"&&"x"in d&&"y"in d&&"width"in d&&"height"in d},c.placeOnScreenAroundRectangle);c.placeOnScreenAroundElement=function(){return c.placementRegistry.match.apply(c.placementRegistry,arguments)};c.getPopupAroundAlignment=function(a,d){var e={};b.forEach(a,function(f){switch(f){case "after":e[d?"BR":"BL"]=d?"BL":"BR";break;case "before":e[d?"BL":"BR"]=d?"BR":"BL";break;case "below-alt":d=!d;case "below":e[d?"BL":"BR"]=d?"TL":"TR";e[d?"BR":"BL"]=d?"TR":"TL";break;case "above-alt":d=
!d;case "above":default:e[d?"TL":"TR"]=d?"BL":"BR";e[d?"TR":"TL"]=d?"BR":"BL";break}});return e};return c});define("dijit/_base/window",["dojo","dijit","dojo/window"],function(b,c){c.getDocumentWindow=function(a){return b.window.get(a)};return c});
define("dijit/_base/popup",["dojo","dijit","dijit/_base/focus","dijit/_base/place","dijit/_base/window"],function(b,c){c.popup={_stack:[],_beginZIndex:1E3,_idGen:1,_createWrapper:function(a){var d=a.declaredClass?a._popupWrapper:a.parentNode&&b.hasClass(a.parentNode,"dijitPopup"),e=a.domNode||a;if(!d){d=b.create("div",{"class":"dijitPopup",style:{display:"none"},role:"presentation"},b.body());d.appendChild(e);e=e.style;e.display="";e.visibility="";e.position="";e.top="0px";if(a.declaredClass){a._popupWrapper=
d;b.connect(a,"destroy",function(){b.destroy(d);delete a._popupWrapper})}}return d},moveOffScreen:function(a){a=this._createWrapper(a);b.style(a,{visibility:"hidden",top:"-9999px",display:""})},hide:function(a){a=this._createWrapper(a);b.style(a,"display","none")},getTopPopup:function(){for(var a=this._stack,d=a.length-1;d>0&&a[d].parent===a[d-1].widget;d--);return a[d]},open:function(a){for(var d=this._stack,e=a.popup,f=a.orient||((a.parent?a.parent.isLeftToRight():b._isBodyLtr())?{BL:"TL",BR:"TR",
TL:"BL",TR:"BR"}:{BR:"TR",BL:"TL",TR:"BR",TL:"BL"}),g=a.around,h=a.around&&a.around.id?a.around.id+"_dropdown":"popup_"+this._idGen++;d.length&&(!a.parent||!b.isDescendant(a.parent.domNode,d[d.length-1].widget.domNode));)c.popup.close(d[d.length-1].widget);var j=this._createWrapper(e);b.attr(j,{id:h,style:{zIndex:this._beginZIndex+d.length},"class":"dijitPopup "+(e.baseClass||e["class"]||"").split(" ")[0]+"Popup",dijitPopupParent:a.parent?a.parent.id:""});if(b.isIE||b.isMoz)if(!e.bgIframe)e.bgIframe=
new c.BackgroundIframe(j);f=g?c.placeOnScreenAroundElement(j,g,f,e.orient?b.hitch(e,"orient"):null):c.placeOnScreen(j,a,f=="R"?["TR","BR","TL","BL"]:["TL","BL","TR","BR"],a.padding);j.style.display="";j.style.visibility="visible";e.domNode.style.visibility="visible";g=[];g.push(b.connect(j,"onkeypress",this,function(k){if(k.charOrCode==b.keys.ESCAPE&&a.onCancel){b.stopEvent(k);a.onCancel()}else if(k.charOrCode===b.keys.TAB){b.stopEvent(k);(k=this.getTopPopup())&&k.onCancel&&k.onCancel()}}));e.onCancel&&
g.push(b.connect(e,"onCancel",a.onCancel));g.push(b.connect(e,e.onExecute?"onExecute":"onChange",this,function(){var k=this.getTopPopup();k&&k.onExecute&&k.onExecute()}));d.push({widget:e,parent:a.parent,onExecute:a.onExecute,onCancel:a.onCancel,onClose:a.onClose,handlers:g});e.onOpen&&e.onOpen(f);return f},close:function(a){for(var d=this._stack;a&&b.some(d,function(h){return h.widget==a})||!a&&d.length;){var e=d.pop(),f=e.widget,g=e.onClose;f.onClose&&f.onClose();b.forEach(e.handlers,b.disconnect);
f&&f.domNode&&this.hide(f);g&&g()}}};c._frames=new (function(){var a=[];this.pop=function(){var d;if(a.length){d=a.pop();d.style.display=""}else{if(b.isIE<9){d="<iframe src='"+(b.config.dojoBlankHtmlUrl||b.moduleUrl("dojo","resources/blank.html")+""||'javascript:""')+"' style='position: absolute; left: 0px; top: 0px;z-index: -1; filter:Alpha(Opacity=\"0\");'>";d=b.doc.createElement(d)}else{d=b.create("iframe");d.src='javascript:""';d.className="dijitBackgroundIframe";b.style(d,"opacity",0.1)}d.tabIndex=
-1;c.setWaiRole(d,"presentation")}return d};this.push=function(d){d.style.display="none";a.push(d)}});c.BackgroundIframe=function(a){if(!a.id)throw new Error("no id");if(b.isIE||b.isMoz){var d=this.iframe=c._frames.pop();a.appendChild(d);if(b.isIE<7||b.isQuirks){this.resize(a);this._conn=b.connect(a,"onresize",this,function(){this.resize(a)})}else b.style(d,{width:"100%",height:"100%"})}};b.extend(c.BackgroundIframe,{resize:function(a){this.iframe&&b.style(this.iframe,{width:a.offsetWidth+"px",height:a.offsetHeight+
"px"})},destroy:function(){if(this._conn){b.disconnect(this._conn);this._conn=null}if(this.iframe){c._frames.push(this.iframe);delete this.iframe}}});return c.popup});define("dijit/_base/scroll",["dojo","dijit","dojo/window"],function(b,c){c.scrollIntoView=function(a,d){b.window.scrollIntoView(a,d)};return c.scrollIntoView});
define("dojo/uacss",["dojo"],function(b){(function(){var c=b.doc.documentElement,a=b.isIE,d=b.isOpera,e=Math.floor,f=b.isFF,g=b.boxModel.replace(/-/,"");a={dj_ie:a,dj_ie6:e(a)==6,dj_ie7:e(a)==7,dj_ie8:e(a)==8,dj_ie9:e(a)==9,dj_quirks:b.isQuirks,dj_iequirks:a&&b.isQuirks,dj_opera:d,dj_khtml:b.isKhtml,dj_webkit:b.isWebKit,dj_safari:b.isSafari,dj_chrome:b.isChrome,dj_gecko:b.isMozilla,dj_ff3:e(f)==3};a["dj_"+g]=true;var h="";for(var j in a)if(a[j])h+=j+" ";c.className=b.trim(c.className+" "+h);b._loaders.unshift(function(){if(!b._isBodyLtr()){var k=
"dj_rtl dijitRtl "+h.replace(/ /g,"-rtl ");c.className=b.trim(c.className+" "+k)}})})();return b});define("dijit/_base/sniff",["dojo","dijit","dojo/uacss"],function(b,c){return c});
define("dijit/_base/typematic",["dojo","dijit"],function(b,c){c.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(b.hitch(this,"_fireEventAndReload"),this._currentTimeout)},trigger:function(a,d,e,f,g,h,j,k){if(g!=this._obj){this.stop();
this._initialDelay=j||500;this._subsequentDelay=h||0.9;this._minDelay=k||10;this._obj=g;this._evt=a;this._node=e;this._count=this._currentTimeout=-1;this._callback=b.hitch(d,f);this._fireEventAndReload();this._evt=b.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,d,e,f,g,h,j){if(d.keyCode){d.charOrCode=d.keyCode;b.deprecated("keyCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.",
"","2.0")}else if(d.charCode){d.charOrCode=String.fromCharCode(d.charCode);b.deprecated("charCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.","","2.0")}return[b.connect(a,"onkeypress",this,function(k){if(k.charOrCode==d.charOrCode&&(d.ctrlKey===undefined||d.ctrlKey==k.ctrlKey)&&(d.altKey===undefined||d.altKey==k.altKey)&&(d.metaKey===undefined||d.metaKey==(k.metaKey||false))&&(d.shiftKey===undefined||d.shiftKey==k.shiftKey)){b.stopEvent(k);c.typematic.trigger(k,
e,a,f,d,g,h,j)}else c.typematic._obj==d&&c.typematic.stop()}),b.connect(a,"onkeyup",this,function(){c.typematic._obj==d&&c.typematic.stop()})]},addMouseListener:function(a,d,e,f,g,h){var j=b.connect;return[j(a,"mousedown",this,function(k){b.stopEvent(k);c.typematic.trigger(k,d,a,e,a,f,g,h)}),j(a,"mouseup",this,function(k){b.stopEvent(k);c.typematic.stop()}),j(a,"mouseout",this,function(k){b.stopEvent(k);c.typematic.stop()}),j(a,"mousemove",this,function(k){k.preventDefault()}),j(a,"dblclick",this,
function(k){b.stopEvent(k);if(b.isIE){c.typematic.trigger(k,d,a,e,a,f,g,h);setTimeout(b.hitch(this,c.typematic.stop),50)}})]},addListener:function(a,d,e,f,g,h,j,k){return this.addKeyListener(d,e,f,g,h,j,k).concat(this.addMouseListener(a,f,g,h,j,k))}};return c.typematic});
define("dijit/_base/wai",["dojo","dijit"],function(b,c){c.wai={onload:function(){var a=b.create("div",{id:"a11yTestNode",style:{cssText:'border: 1px solid;border-color:red green;position: absolute;height: 5px;top: -999px;background-image: url("'+(b.config.blankGif||b.moduleUrl("dojo","resources/blank.gif"))+'");'}},b.body()),d=b.getComputedStyle(a);if(d){var e=d.backgroundImage;b[d.borderTopColor==d.borderRightColor||e!=null&&(e=="none"||e=="url(invalid-url:)")?"addClass":"removeClass"](b.body(),
"dijit_a11y");if(b.isIE)a.outerHTML="";else b.body().removeChild(a)}}};if(b.isIE||b.isMoz)b._loaders.unshift(c.wai.onload);b.mixin(c,{hasWaiRole:function(a,d){a=this.getWaiRole(a);return d?a.indexOf(d)>-1:a.length>0},getWaiRole:function(a){return b.trim((b.attr(a,"role")||"").replace("wairole:",""))},setWaiRole:function(a,d){b.attr(a,"role",d)},removeWaiRole:function(a,d){var e=b.attr(a,"role");if(e)if(d){d=b.trim((" "+e+" ").replace(" "+d+" "," "));b.attr(a,"role",d)}else a.removeAttribute("role")},
hasWaiState:function(a,d){return a.hasAttribute?a.hasAttribute("aria-"+d):!!a.getAttribute("aria-"+d)},getWaiState:function(a,d){return a.getAttribute("aria-"+d)||""},setWaiState:function(a,d,e){a.setAttribute("aria-"+d,e)},removeWaiState:function(a,d){a.removeAttribute("aria-"+d)}});return c});
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(b,c){return c._base});
define("dijit/_Widget",["dojo","dijit","dijit/_WidgetBase","dijit/_base"],function(b,c){b.connect(b,"_connect",function(a,d){a&&b.isFunction(a._onConnect)&&a._onConnect(d)});c._connectOnUseEventHandler=function(){};c._lastKeyDownNode=null;b.isIE?function(){var a=function(d){c._lastKeyDownNode=d.srcElement};b.doc.attachEvent("onkeydown",a);b.addOnWindowUnload(function(){b.doc.detachEvent("onkeydown",a)})}():b.doc.addEventListener("keydown",function(a){c._lastKeyDownNode=a.target},true);(function(){b.declare("dijit._Widget",
c._WidgetBase,{_deferredConnects:{onClick:"",onDblClick:"",onKeyDown:"",onKeyPress:"",onKeyUp:"",onMouseMove:"",onMouseDown:"",onMouseOut:"",onMouseOver:"",onMouseLeave:"",onMouseEnter:"",onMouseUp:""},onClick:c._connectOnUseEventHandler,onDblClick:c._connectOnUseEventHandler,onKeyDown:c._connectOnUseEventHandler,onKeyPress:c._connectOnUseEventHandler,onKeyUp:c._connectOnUseEventHandler,onMouseDown:c._connectOnUseEventHandler,onMouseMove:c._connectOnUseEventHandler,onMouseOut:c._connectOnUseEventHandler,
onMouseOver:c._connectOnUseEventHandler,onMouseLeave:c._connectOnUseEventHandler,onMouseEnter:c._connectOnUseEventHandler,onMouseUp:c._connectOnUseEventHandler,create:function(){this._deferredConnects=b.clone(this._deferredConnects);for(var a in this.attributeMap)delete this._deferredConnects[a];for(a in this._deferredConnects)this[a]!==c._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&&b.style(this.domNode,"display")!="none"},onFocus:function(){},onBlur:function(){},_onFocus:function(){this.onFocus()},_onBlur:function(){this.onBlur()},setAttribute:function(a,d){b.deprecated(this.declaredClass+"::setAttribute(attr, value) is deprecated. Use set() instead.","","2.0");this.set(a,d)},attr:function(a){if(b.config.isDebug){var d=
arguments.callee._ach||(arguments.callee._ach={}),e=(arguments.callee.caller||"unknown caller").toString();if(!d[e]){b.deprecated(this.declaredClass+"::attr() is deprecated. Use get() or set() instead, called from "+e,"","2.0");d[e]=true}}return arguments.length>=2||typeof a==="object"?this.set.apply(this,arguments):this.get(a)},nodesWithKeyClick:["input","button"],connect:function(a,d,e){var f=b._connect,g=this.inherited(arguments,[a,d=="ondijitclick"?"onclick":d,e]);if(d=="ondijitclick")if(b.indexOf(this.nodesWithKeyClick,
a.nodeName.toLowerCase())==-1){var h=b.hitch(this,e);g.push(f(a,"onkeydown",this,function(j){if((j.keyCode==b.keys.ENTER||j.keyCode==b.keys.SPACE)&&!j.ctrlKey&&!j.shiftKey&&!j.altKey&&!j.metaKey){c._lastKeyDownNode=j.target;"openDropDown"in this&&a==this._buttonNode||j.preventDefault()}}),f(a,"onkeyup",this,function(j){if((j.keyCode==b.keys.ENTER||j.keyCode==b.keys.SPACE)&&j.target==c._lastKeyDownNode&&!j.ctrlKey&&!j.shiftKey&&!j.altKey&&!j.metaKey){c._lastKeyDownNode=null;return h(j)}}))}return g},
_onShow:function(){this.onShow()},onShow:function(){},onHide:function(){},onClose:function(){return true}})})();return c._Widget});
define("dojo/string",["dojo"],function(b){b.getObject("string",true,b);b.string.rep=function(c,a){if(a<=0||!c)return"";for(var d=[];;){a&1&&d.push(c);if(!(a>>=1))break;c+=c}return d.join("")};b.string.pad=function(c,a,d,e){d||(d="0");c=String(c);a=b.string.rep(d,Math.ceil((a-c.length)/d.length));return e?c+a:a+c};b.string.substitute=function(c,a,d,e){e=e||b.global;d=d?b.hitch(e,d):function(f){return f};return c.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g,function(f,g,h){f=b.getObject(g,false,
a);if(h)f=b.getObject(h,false,e).call(e,f,g);return d(f,g).toString()})};b.string.trim=String.prototype.trim?b.trim:function(c){c=c.replace(/^\s+/,"");for(var a=c.length-1;a>=0;a--)if(/\S/.test(c.charAt(a))){c=c.substring(0,a+1);break}return c};return b.string});
define("dojo/date/stamp",["dojo"],function(b){b.getObject("date.stamp",true,b);b.date.stamp.fromISOString=function(c,a){if(!b.date.stamp._isoRegExp)b.date.stamp._isoRegExp=/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(.\d+)?)?((?:[+-](\d{2}):(\d{2}))|Z)?)?$/;var d=b.date.stamp._isoRegExp.exec(c);c=null;if(d){d.shift();d[1]&&d[1]--;if(d[6])d[6]*=1E3;if(a){a=new Date(a);b.forEach(b.map(["FullYear","Month","Date","Hours","Minutes","Seconds","Milliseconds"],function(g){return a["get"+
g]()}),function(g,h){d[h]=d[h]||g})}c=new Date(d[0]||1970,d[1]||0,d[2]||1,d[3]||0,d[4]||0,d[5]||0,d[6]||0);if(d[0]<100)c.setFullYear(d[0]||1970);var e=0,f=d[7]&&d[7].charAt(0);if(f!="Z"){e=(d[8]||0)*60+(Number(d[9])||0);if(f!="-")e*=-1}if(f)e-=c.getTimezoneOffset();e&&c.setTime(c.getTime()+e*6E4)}return c};b.date.stamp.toISOString=function(c,a){var d=function(h){return h<10?"0"+h:h};a=a||{};var e=[],f=a.zulu?"getUTC":"get",g="";if(a.selector!="time"){g=c[f+"FullYear"]();g=["0000".substr((g+"").length)+
g,d(c[f+"Month"]()+1),d(c[f+"Date"]())].join("-")}e.push(g);if(a.selector!="date"){g=[d(c[f+"Hours"]()),d(c[f+"Minutes"]()),d(c[f+"Seconds"]())].join(":");f=c[f+"Milliseconds"]();if(a.milliseconds)g+="."+(f<100?"0":"")+d(f);if(a.zulu)g+="Z";else if(a.selector!="time"){c=c.getTimezoneOffset();a=Math.abs(c);g+=(c>0?"-":"+")+d(Math.floor(a/60))+":"+d(a%60)}e.push(g)}return e.join("T")};return b.date.stamp});
define("dojo/parser",["dojo","dojo/date/stamp"],function(b){b.parser=new (function(){function c(j){if(f.isString(j))return"string";if(typeof j=="number")return"number";if(typeof j=="boolean")return"boolean";if(f.isFunction(j))return"function";if(f.isArray(j))return"array";if(j instanceof Date)return"date";if(j instanceof f._Url)return"url";return"object"}function a(j,k){switch(k){case "string":return j;case "number":return j.length?Number(j):NaN;case "boolean":return typeof j=="boolean"?j:j.toLowerCase()!=
"false";case "function":if(f.isFunction(j)){j=j.toString();j=f.trim(j.substring(j.indexOf("{")+1,j.length-1))}try{return j===""||j.search(/[^\w\.]+/i)!=-1?new Function(j):f.getObject(j,false)||new Function(j)}catch(l){return new Function}case "array":return j?j.split(/\s*,\s*/):[];case "date":switch(j){case "":return new Date("");case "now":return new Date;default:return f.date.stamp.fromISOString(j)}case "url":return f.baseUrl+j;default:return f.fromJson(j)}}function d(j,k){for(var l in j)if(l.charAt(0)!=
"_")l in g||(k[l]=c(j[l]));return k}function e(j,k){var l=h[j];if(l){if(!k&&!l.params)l.params=d(l.cls.prototype,{})}else{j=f.getObject(j);l=null;if(!j)return null;k||(l=d(j.prototype,{}));l={cls:j,params:l}}return l}var f=b,g={},h={};f.connect(f,"extend",function(){h={}});this._functionFromScript=function(j,k){var l="",m="";(k=j.getAttribute(k+"args")||j.getAttribute("args"))&&f.forEach(k.split(/\s*,\s*/),function(n,r){l+="var "+n+" = arguments["+r+"]; "});(k=j.getAttribute("with"))&&k.length&&f.forEach(k.split(/\s*,\s*/),
function(n){l+="with("+n+"){";m+="}"});return new Function(l+j.innerHTML+m)};this.instantiate=function(j,k,l){var m=[];k=k||{};l=l||{};var n=(l.scope||f._scopeName)+"Type",r="data-"+(l.scope||f._scopeName)+"-";f.forEach(j,function(s){if(s){var p,q,o,t,u,w;if(s.node){p=s.node;q=s.type;w=s.fastpath;t=(o=s.clsInfo||q&&e(q,w))&&o.cls;u=s.scripts}else{p=s;u=(t=(o=(q=n in k?k[n]:p.getAttribute(n))&&e(q))&&o.cls)&&(t._noScript||t.prototype._noScript)?[]:f.query("> script[type^='dojo/']",p)}if(!o)throw new Error("Could not load class '"+
q);var x={};l.defaults&&f._mixin(x,l.defaults);s.inherited&&f._mixin(x,s.inherited);if(w){if((o=p.getAttribute(r+"props"))&&o.length)try{o=f.fromJson.call(l.propsThis,"{"+o+"}");f._mixin(x,o)}catch(z){throw new Error(z.toString()+" in data-dojo-props='"+o+"'");}if(o=p.getAttribute(r+"attach-point"))x.dojoAttachPoint=o;if(o=p.getAttribute(r+"attach-event"))x.dojoAttachEvent=o;b.mixin(x,k)}else{s=p.attributes;for(var E in o.params){q=E in k?{value:k[E],specified:true}:s.getNamedItem(E);if(!(!q||!q.specified&&
(!b.isIE||E.toLowerCase()!="value"))){q=q.value;switch(E){case "class":q="className"in k?k.className:p.className;break;case "style":q="style"in k?k.style:p.style&&p.style.cssText}var D=o.params[E];x[E]=typeof q=="string"?a(q,D):q}}}var F=[],I=[];f.forEach(u,function(G){p.removeChild(G);var O=G.getAttribute(r+"event")||G.getAttribute("event"),M=G.getAttribute("type");G=f.parser._functionFromScript(G,r);if(O)if(M=="dojo/connect")F.push({event:O,func:G});else x[O]=G;else I.push(G)});var L=(u=t.markupFactory||
t.prototype&&t.prototype.markupFactory)?u(x,p,t):new t(x,p);m.push(L);(t=p.getAttribute(r+"id")||p.getAttribute("jsId"))&&f.setObject(t,L);f.forEach(F,function(G){f.connect(L,G.event,null,G.func)});f.forEach(I,function(G){G.call(L)})}});k._started||f.forEach(m,function(s){if(!l.noStart&&s&&b.isFunction(s.startup)&&!s._started&&(!s.getParent||!s.getParent()))s.startup()});return m};this.parse=function(j,k){function l(p,q){var o=b.clone(p.inherited);b.forEach(["dir","lang"],function(E){var D=p.node.getAttribute(E);
if(D)o[E]=D});for(var t=p.clsInfo&&!p.clsInfo.cls.prototype._noScript?p.scripts:null,u=!p.clsInfo||!p.clsInfo.cls.prototype.stopParser||k&&k.template,w=p.node.firstChild;w;w=w.nextSibling)if(w.nodeType==1){var x,z=u&&w.getAttribute(n+"type");x=z?z:u&&w.getAttribute(m);z=z==x;if(x){x={type:x,fastpath:z,clsInfo:e(x,z),node:w,scripts:[],inherited:o};q.push(x);l(x,q)}else if(t&&w.nodeName.toLowerCase()=="script")(x=w.getAttribute("type"))&&/^dojo\/\w/i.test(x)&&t.push(w);else u&&l({node:w,inherited:o},
q)}}if(!k&&j&&j.rootNode){k=j;j=k.rootNode}else j=j;j=j?b.byId(j):b.body();k=k||{};var m=(k.scope||f._scopeName)+"Type",n="data-"+(k.scope||f._scopeName)+"-",r={};if(k&&k.inherited)for(var s in k.inherited)if(k.inherited[s])r[s]=k.inherited[s];s=[];l({node:j,inherited:r},s);return this.instantiate(s,k&&k.template?{template:true}:null,k)}});(function(){var c=function(){b.config.parseOnLoad&&b.parser.parse()};b.getObject("dijit.wai.onload")===b._loaders[0]?b._loaders.splice(1,0,c):b._loaders.unshift(c)})();
return b.parser});
define("dojo/cache",["dojo"],function(b){var c={};b.cache=function(a,d,e){if(typeof a=="string")var f=b.moduleUrl(a,d);else{f=a;e=d}f=f.toString();var g=e;if(e!=undefined&&!b.isString(e))g="value"in e?e.value:undefined;e=e&&e.sanitize?true:false;if(typeof g=="string")g=c[f]=e?b.cache._sanitize(g):g;else if(g===null)delete c[f];else{if(!(f in c)){g=undefined;if(b.isFunction(require)&&b.isString(a))try{var h=(a?a.replace(/\./g,"/")+"/":"")+d;g=require("text!"+h)}catch(j){}if(typeof g==="undefined")g=
b._getText(f);c[f]=e?b.cache._sanitize(g):g}g=c[f]}return g};b.cache._sanitize=function(a){if(a){a=a.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,"");var d=a.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);if(d)a=d[1]}else a="";return a};return b.cache});
define("dijit/_Templated",["dojo","dijit","dijit/_Widget","dojo/string","dojo/parser","dojo/cache"],function(b,c){b.declare("dijit._Templated",null,{templateString:null,templatePath:null,widgetsInTemplate:false,_skipNodeCache:false,_earlyTemplatedStartup:false,constructor:function(){this._attachPoints=[];this._attachEvents=[]},_stringRepl:function(a){var d=this.declaredClass,e=this;return b.string.substitute(a,this,function(f,g){if(g.charAt(0)=="!")f=b.getObject(g.substr(1),false,e);if(typeof f==
"undefined")throw new Error(d+" template:"+g);if(f==null)return"";return g.charAt(0)=="!"?f:f.toString().replace(/"/g,"&quot;")},this)},buildRendering:function(){var a=c._Templated.getCachedTemplate(this.templatePath,this.templateString,this._skipNodeCache),d;if(b.isString(a)){d=b._toDom(this._stringRepl(a));if(d.nodeType!=1)throw new Error("Invalid template: "+a);}else d=a.cloneNode(true);this.domNode=d;this.inherited(arguments);this._attachTemplateNodes(d);if(this.widgetsInTemplate){a=this._startupWidgets=
b.parser.parse(d,{noStart:!this._earlyTemplatedStartup,template:true,inherited:{dir:this.dir,lang:this.lang},propsThis:this,scope:"dojo"});this._supportingWidgets=c.findWidgets(d);this._attachTemplateNodes(a,function(e,f){return e[f]})}this._fillContent(this.srcNodeRef)},_fillContent:function(a){var d=this.containerNode;if(a&&d)for(;a.hasChildNodes();)d.appendChild(a.firstChild)},_attachTemplateNodes:function(a,d){d=d||function(m,n){return m.getAttribute(n)};for(var e=b.isArray(a)?a:a.all||a.getElementsByTagName("*"),
f=b.isArray(a)?0:-1;f<e.length;f++){var g=f==-1?a:e[f];if(!(this.widgetsInTemplate&&(d(g,"dojoType")||d(g,"data-dojo-type")))){var h=d(g,"dojoAttachPoint")||d(g,"data-dojo-attach-point");if(h)for(var j=h.split(/\s*,\s*/);h=j.shift();){if(b.isArray(this[h]))this[h].push(g);else this[h]=g;this._attachPoints.push(h)}if(h=d(g,"dojoAttachEvent")||d(g,"data-dojo-attach-event")){j=h.split(/\s*,\s*/);for(var k=b.trim;h=j.shift();)if(h){var l=null;if(h.indexOf(":")!=-1){l=h.split(":");h=k(l[0]);l=k(l[1])}else h=
k(h);l||(l=h);this._attachEvents.push(this.connect(g,h,l))}}(h=d(g,"waiRole"))&&c.setWaiRole(g,h);(h=d(g,"waiState"))&&b.forEach(h.split(/\s*,\s*/),function(m){if(m.indexOf("-")!=-1){m=m.split("-");c.setWaiState(g,m[0],m[1])}})}}},startup:function(){b.forEach(this._startupWidgets,function(a){a&&!a._started&&a.startup&&a.startup()});this.inherited(arguments)},destroyRendering:function(){b.forEach(this._attachPoints,function(a){delete this[a]},this);this._attachPoints=[];b.forEach(this._attachEvents,
this.disconnect,this);this._attachEvents=[];this.inherited(arguments)}});c._Templated._templateCache={};c._Templated.getCachedTemplate=function(a,d,e){var f=c._Templated._templateCache,g=d||a,h=f[g];if(h){try{if(!h.ownerDocument||h.ownerDocument==b.doc)return h}catch(j){}b.destroy(h)}d||(d=b.cache(a,{sanitize:true}));d=b.string.trim(d);if(e||d.match(/\$\{([^\}]+)\}/g))return f[g]=d;else{a=b._toDom(d);if(a.nodeType!=1)throw new Error("Invalid template: "+d);return f[g]=a}};b.isIE&&b.addOnWindowUnload(function(){var a=
c._Templated._templateCache;for(var d in a){var e=a[d];typeof e=="object"&&b.destroy(e);delete a[d]}});b.extend(c._Widget,{dojoAttachEvent:"",dojoAttachPoint:"",waiRole:"",waiState:""});return c._Templated});
define("dijit/_CssStateMixin",["dojo","dijit"],function(b,c){b.declare("dijit._CssStateMixin",[],{cssStateNodes:{},hovering:false,active:false,_applyAttributes:function(){this.inherited(arguments);b.forEach(["onmouseenter","onmouseleave","onmousedown"],function(d){this.connect(this.domNode,d,"_cssMouseEvent")},this);b.forEach(["disabled","readOnly","checked","selected","focused","state","hovering","active"],function(d){this.watch(d,b.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 d=this.connect(b.body(),"onmouseup",function(){this._mouseDown=false;this._set("active",false);this.disconnect(d)});break}},_setStateClass:function(){function a(j){d=
d.concat(b.map(d,function(k){return k+j}),"dijit"+j)}var d=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 e=this.stateNode||this.domNode,f={};b.forEach(e.className.split(" "),function(j){f[j]=true});"_stateClasses"in this&&b.forEach(this._stateClasses,
function(j){delete f[j]});b.forEach(d,function(j){f[j]=true});var g=[];for(var h in f)g.push(h);e.className=g.join(" ");this._stateClasses=d},_trackMouseState:function(a,d){function e(){var l="disabled"in j&&j.disabled||"readonly"in j&&j.readonly;b.toggleClass(a,d+"Hover",f&&!g&&!l);b.toggleClass(a,d+"Active",g&&!l);b.toggleClass(a,d+"Focused",h&&!l)}var f=false,g=false,h=false,j=this,k=b.hitch(this,"connect",a);k("onmouseenter",function(){f=true;e()});k("onmouseleave",function(){g=f=false;e()});
k("onmousedown",function(){g=true;e()});k("onmouseup",function(){g=false;e()});k("onfocus",function(){h=true;e()});k("onblur",function(){h=false;e()});this.watch("disabled",e);this.watch("readOnly",e)}});return c._CssStateMixin});
define("dijit/form/_FormWidget",["dojo","dijit","dojo/window","dijit/_Widget","dijit/_Templated","dijit/_CssStateMixin"],function(b,c){b.declare("dijit.form._FormWidget",[c._Widget,c._Templated,c._CssStateMixin],{name:"",alt:"",value:"",type:"text",tabIndex:"0",disabled:false,intermediateChanges:false,scrollOnFocus:true,attributeMap:b.delegate(c._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);b.attr(this.focusNode,"disabled",a);this.valueNode&&b.attr(this.valueNode,"disabled",a);c.setWaiState(this.focusNode,"disabled",a);if(a){this._set("hovering",false);this._set("active",false);a="tabIndex"in this.attributeMap?this.attributeMap.tabIndex:"focusNode";
b.forEach(b.isArray(a)?a:[a],function(d){d=this[d];b.isWebKit||c.hasDefaultTabStop(d)?d.setAttribute("tabIndex","-1"):d.removeAttribute("tabIndex")},this)}else this.tabIndex!=""&&this.focusNode.setAttribute("tabIndex",this.tabIndex)},setDisabled:function(a){b.deprecated("setDisabled("+a+") is deprecated. Use set('disabled',"+a+") instead.","","2.0");this.set("disabled",a)},_onFocus:function(){this.scrollOnFocus&&b.window.scrollIntoView(this.domNode);this.inherited(arguments)},isFocusable:function(){return!this.disabled&&
this.focusNode&&b.style(this.domNode,"display")!="none"},focus:function(){this.disabled||c.focus(this.focusNode)},compare:function(a,d){return typeof a=="number"&&typeof d=="number"?isNaN(a)&&isNaN(d)?0:a-d:a>d?1:a<d?-1:0},onChange:function(){},_onChangeActive:false,_handleOnChange:function(a,d){if(this._lastValueReported==undefined&&(d===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||d||d===undefined)&&this._pendingOnChange){this._lastValueReported=a;this._pendingOnChange=false;if(this._onChangeActive){this._onChangeHandle&&clearTimeout(this._onChangeHandle);this._onChangeHandle=setTimeout(b.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){b.deprecated("dijit.form._FormWidget:setValue("+a+") is deprecated.  Use set('value',"+a+") instead.","","2.0");this.set("value",a)},getValue:function(){b.deprecated(this.declaredClass+"::getValue() is deprecated. Use get('value') instead.","","2.0");return this.get("value")},_onMouseDown:function(a){if(!a.ctrlKey&&b.mouseButtons.isLeft(a)&&this.isFocusable())var d=this.connect(b.body(),"onmouseup",function(){this.isFocusable()&&this.focus();this.disconnect(d)})}});b.declare("dijit.form._FormValueWidget",
c.form._FormWidget,{readOnly:false,attributeMap:b.delegate(c.form._FormWidget.prototype.attributeMap,{value:"",readOnly:"focusNode"}),_setReadOnlyAttr:function(a){b.attr(this.focusNode,"readOnly",a);c.setWaiState(this.focusNode,"readonly",a);this._set("readOnly",a)},postCreate:function(){this.inherited(arguments);if(b.isIE<9||b.isIE&&b.isQuirks)this.connect(this.focusNode||this.domNode,"onkeydown",this._onKeyDown);if(this._resetValue===undefined)this._lastValueReported=this._resetValue=this.value},
_setValueAttr:function(a,d){this._handleOnChange(a,d)},_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==b.keys.ESCAPE&&!(a.ctrlKey||a.altKey||a.metaKey)){var d;if(b.isIE){a.preventDefault();d=document.createEventObject();d.keyCode=b.keys.ESCAPE;d.shiftKey=a.shiftKey;a.srcElement.fireEvent("onkeypress",
d)}}},_layoutHackIE7:function(){if(b.isIE==7)for(var a=this.domNode,d=a.parentNode,e=a.firstChild||a,f=e.style.filter,g=this;d&&d.clientHeight==0;){(function(){var h=g.connect(d,"onscroll",function(){g.disconnect(h);e.style.filter=(new Date).getMilliseconds();setTimeout(function(){e.style.filter=f},0)})})();d=d.parentNode}}});return c.form._FormWidget});
define("dijit/form/TextBox",["dojo","dijit","text!dijit/form/templates/TextBox.html","dijit/form/_FormWidget"],function(b,c){b.declare("dijit.form.TextBox",c.form._FormValueWidget,{trim:false,uppercase:false,lowercase:false,propercase:false,maxLength:"",selectOnClick:false,placeHolder:"",templateString:b.cache("dijit.form","templates/TextBox.html"),_singleNodeTemplate:'<input class="dijit dijitReset dijitLeft dijitInputField" dojoAttachPoint="textbox,focusNode" autocomplete="off" type="${type}" ${!nameAttrSetting} />',
_buttonInputDisabled:b.isIE?"disabled":"",baseClass:"dijitTextBox",attributeMap:b.delegate(c.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==c.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=b.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,
d,e){var f;if(a!==undefined){f=this.filter(a);if(typeof e!="string")e=f!==null&&(typeof f!="number"||!isNaN(f))?this.filter(this.format(f,this.constraints)):""}if(e!=null&&e!=undefined&&(typeof e!="number"||!isNaN(e))&&this.textbox.value!=e){this.textbox.value=e;this._set("displayedValue",this.get("displayedValue"))}this._updatePlaceHolder();this.inherited(arguments,[f,d])},displayedValue:"",getDisplayedValue:function(){b.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){b.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 b.keys.SHIFT:case b.keys.ALT:case b.keys.CTRL:case b.keys.TAB:return}if(this.intermediateChanges){var d=this;setTimeout(function(){d._handleOnChange(d.get("value"),false)},0)}this._refreshState();this._set("displayedValue",this.get("displayedValue"))},
postCreate:function(){b.isIE&&setTimeout(b.hitch(this,function(){var a=b.getComputedStyle(this.domNode);if(a)if(a=a.fontFamily){var d=this.domNode.getElementsByTagName("INPUT");if(d)for(var e=0;e<d.length;e++)d[e].style.fontFamily=a}}),0);this.textbox.setAttribute("value",this.textbox.value);this.inherited(arguments);if(b.isMoz||b.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=b.trim(a);if(this.uppercase)a=a.toUpperCase();if(this.lowercase)a=a.toLowerCase();if(this.propercase)a=a.replace(/[^\s]+/g,function(d){return d.substring(0,1).toUpperCase()+d.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&&b.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 d;if(b.isIE){d=b.doc.selection.createRange();d=d.parentElement()==this.textbox&&
d.text.length==0}else d=this.textbox.selectionStart==this.textbox.selectionEnd;d&&c.selectInputText(this.textbox)});this._updatePlaceHolder();this.inherited(arguments);this._refreshState()}},reset:function(){this.textbox.value="";this.inherited(arguments)}});c.selectInputText=function(a,d,e){var f=b.global,g=b.doc;a=b.byId(a);if(isNaN(d))d=0;if(isNaN(e))e=a.value?a.value.length:0;c.focus(a);if(g.selection&&b.body().createTextRange){if(a.createTextRange){a=a.createTextRange();a.collapse(true);a.moveStart("character",
-99999);a.moveStart("character",d);a.moveEnd("character",e-d);a.select()}}else f.getSelection&&a.setSelectionRange&&a.setSelectionRange(d,e)};return c.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(b,c){b.declare("dijit._MasterTooltip",[c._Widget,c._Templated],{duration:c.defaultDuration,templateString:b.cache("dijit","templates/Tooltip.html"),postCreate:function(){b.body().appendChild(this.domNode);this.bgIframe=new c.BackgroundIframe(this.domNode);this.fadeIn=b.fadeIn({node:this.domNode,duration:this.duration,onEnd:b.hitch(this,"_onShow")});this.fadeOut=b.fadeOut({node:this.domNode,
duration:this.duration,onEnd:b.hitch(this,"_onHide")})},show:function(a,d,e,f){if(!(this.aroundNode&&this.aroundNode===d)){this.domNode.width="auto";if(this.fadeOut.status()=="playing")this._onDeck=arguments;else{this.containerNode.innerHTML=a;c.placeOnScreenAroundElement(this.domNode,d,c.getPopupAroundAlignment(e&&e.length?e:c.Tooltip.defaultPosition,!f),b.hitch(this,"orient"));b.style(this.domNode,"opacity",0);this.fadeIn.play();this.isShowingNow=true;this.aroundNode=d}}},orient:function(a,d,e,
f,g){this.connectorNode.style.top="";var h=f.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"}[d+"-"+e];this.domNode.style.width="auto";var j=b.contentBox(this.domNode),k=Math.min(Math.max(h,1),j.w),l=k<j.w;this.domNode.style.width=k+"px";if(l){this.containerNode.style.overflow=
"auto";l=this.containerNode.scrollWidth;this.containerNode.style.overflow="visible";if(l>k){l=l+b.style(this.domNode,"paddingLeft")+b.style(this.domNode,"paddingRight");this.domNode.style.width=l+"px"}}if(e.charAt(0)=="B"&&d.charAt(0)=="B"){a=b.marginBox(a);d=this.connectorNode.offsetHeight;if(a.h>f.h){this.connectorNode.style.top=f.h-g.h/2-d/2+"px";this.connectorNode.style.bottom=""}else{this.connectorNode.style.bottom=Math.min(Math.max(g.h/2-d/2,0),a.h-d)+"px";this.connectorNode.style.top=""}}else{this.connectorNode.style.top=
"";this.connectorNode.style.bottom=""}return Math.max(0,j.w-h)},_onShow:function(){if(b.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}}});c.showTooltip=function(a,d,e,f){if(!c._masterTT)c._masterTT=
new c._MasterTooltip;return c._masterTT.show(a,d,e,f)};c.hideTooltip=function(a){if(!c._masterTT)c._masterTT=new c._MasterTooltip;return c._masterTT.hide(a)};b.declare("dijit.Tooltip",c._Widget,{label:"",showDelay:400,connectId:[],position:[],_setConnectIdAttr:function(a){b.forEach(this._connections||[],function(e){b.forEach(e,b.hitch(this,"disconnect"))},this);var d=b.isArrayLike(a)?a:a?[a]:[];this._connections=b.map(d,function(e){return(e=b.byId(e))?[this.connect(e,"onmouseenter","_onTargetMouseEnter"),
this.connect(e,"onmouseleave","_onTargetMouseLeave"),this.connect(e,"onfocus","_onTargetFocus"),this.connect(e,"onblur","_onTargetBlur")]:[]},this);this._set("connectId",a);this._connectIds=d},addTarget:function(a){a=a.id||a;b.indexOf(this._connectIds,a)==-1&&this.set("connectId",this._connectIds.concat(a))},removeTarget:function(a){a=b.indexOf(this._connectIds,a.id||a);if(a>=0){this._connectIds.splice(a,1);this.set("connectId",this._connectIds)}},buildRendering:function(){this.inherited(arguments);
b.addClass(this.domNode,"dijitTooltipData")},startup:function(){this.inherited(arguments);var a=this.connectId;b.forEach(b.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 d=a.target;this._showTimer=setTimeout(b.hitch(this,function(){this.open(d)}),
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}c.showTooltip(this.label||this.domNode.innerHTML,a,this.position,!this.isLeftToRight());this._connectNode=a;this.onShow(a,this.position)},close:function(){if(this._connectNode){c.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)}});c.Tooltip.defaultPosition=["after","before"];return c.Tooltip});
(function(){function b(d,e,f,g,h,j){if(e[d]){f.push(d);if(e[d]===true||e[d]===1)g.push(h+d+"/"+j)}}function c(d,e,f,g,h){e=g+e+"/"+h;require._fileExists(d.nameToUrl(e,null))&&f.push(e)}var a=/(^.*(^|\/)nls(\/|$))([^\/]*)\/?([^\/]*)/;define("i18n",{version:"0.24.0",load:function(d,e,f,g){g=g||{};var h=a.exec(d),j=h[1],k=h[4],l=h[5],m=k.split("-"),n=[],r={},s,p,q="";if(h[5]){j=h[1];d=j+l}else{d=d;l=h[4];k=g.locale||(g.locale=typeof navigator==="undefined"?"root":(navigator.language||navigator.userLanguage||
"root").toLowerCase());m=k.split("-")}if(g.isBuild){n.push(d);c(e,"root",n,j,l);for(s=0;p=m[s];s++){q+=(q?"-":"")+p;c(e,q,n,j,l)}e(n);f()}else e([d],function(o){var t=[];b("root",o,t,n,j,l);for(s=0;p=m[s];s++){q+=(q?"-":"")+p;b(q,o,t,n,j,l)}e(n,function(){var u,w;for(u=t.length-1;u>-1&&(p=t[u]);u--){w=o[p];if(w===true||w===1)w=e(j+p+"/"+l);require.mixin(r,w)}f(r)})})}})})();
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(b,c){b.declare("dijit.form.ValidationTextBox",c.form.TextBox,{templateString:b.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,d){return(new RegExp("^(?:"+this.regExpGen(d)+")"+(this.required?"":"?")+"$")).test(a)&&(!this.required||!this._isEmpty(a))&&(this._isEmpty(a)||this.parse(a,d)!==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 d="",e=this.disabled||this.isValid(a);if(e)this._maskValidSubsetError=true;var f=this._isEmpty(this.textbox.value),g=!e&&a&&this._isValidSubset();this._set("state",e?"":((!this._hasBeenBlurred||a)&&f||g)&&this._maskValidSubsetError?
"Incomplete":"Error");c.setWaiState(this.focusNode,"invalid",e?"false":"true");if(this.state=="Error"){this._maskValidSubsetError=a&&g;d=this.getErrorMessage(a)}else if(this.state=="Incomplete"){d=this.getPromptMessage(a);this._maskValidSubsetError=!this._hasBeenBlurred||a}else if(f)d=this.getPromptMessage(a);this.set("message",d);return e},displayMessage:function(a){c.hideTooltip(this.domNode);a&&this._focused&&c.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 d="";a!=".*"&&this.regExp.replace(/\\.|\[\]|\[.*?[^\\]{1}\]|\{.*?\}|\(\?[=:!]|./g,function(f){switch(f.charAt(0)){case "{":case "+":case "?":case "*":case "^":case "$":case "|":case "(":d+=f;break;case ")":d+="|$)";break;
default:d+="(?:"+f+"|$)";break}});try{"".search(d)}catch(e){d=this.regExp;console.warn("RegExp error in "+this.declaredClass+": "+this.regExp)}this._partialre="^(?:"+d+")$"},postMixInProperties:function(){this.inherited(arguments);this.messages=b.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);c.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)}});b.declare("dijit.form.MappedTextBox",c.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=b.place("<input type='hidden'"+(this.name?" name='"+this.name.replace(/'/g,"&quot;")+"'":"")+"/>",this.textbox,"after")},reset:function(){this.valueNode.value="";this.inherited(arguments)}});b.declare("dijit.form.RangeBoundTextBox",c.form.MappedTextBox,{rangeMessage:"",rangeCheck:function(a,d){return("min"in d?this.compare(a,d.min)>=0:true)&&("max"in d?this.compare(a,d.max)<=0:true)},isInRange:function(){return this.rangeCheck(this.get("value"),this.constraints)},_isDefinitelyOutOfRange:function(){var a=
this.get("value"),d=false,e=false;if("min"in this.constraints){d=this.constraints.min;d=this.compare(a,typeof d=="number"&&d>=0&&a!=0?0:d);d=typeof d=="number"&&d<0}if("max"in this.constraints){e=this.constraints.max;e=this.compare(a,typeof e!="number"||e>0?e:0);e=typeof e=="number"&&e>0}return d||e},_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 d=this.get("value");if(d!==null&&d!==""&&d!==undefined&&(typeof d!="number"||!isNaN(d))&&!this.isInRange(a))return this.rangeMessage;return this.inherited(arguments)},postMixInProperties:function(){this.inherited(arguments);if(!this.rangeMessage){this.messages=b.i18n.getLocalization("dijit.form","validate",this.lang);this.rangeMessage=this.messages.rangeMessage}},_setConstraintsAttr:function(){this.inherited(arguments);if(this.focusNode){this.constraints.min!==
undefined?c.setWaiState(this.focusNode,"valuemin",this.constraints.min):c.removeWaiState(this.focusNode,"valuemin");this.constraints.max!==undefined?c.setWaiState(this.focusNode,"valuemax",this.constraints.max):c.removeWaiState(this.focusNode,"valuemax")}},_setValueAttr:function(a){c.setWaiState(this.focusNode,"valuenow",a);this.inherited(arguments)}});return c.form.ValidationTextBox});
define("orion/util",["dojo","dijit","dojo/hash","dijit/form/ValidationTextBox"],function(b,c){function a(o){var t="",u=navigator.platform.indexOf("Mac")!==-1;if(o.mod1)t+=u?"Cmd+":"Ctrl+";if(o.mod2)t+="Shift+";if(o.mod3)t+="Alt+";if(o.mod4&&u)t+="Ctrl+";if(o.alphaKey)return t+o.alphaKey;for(var w in b.keys)if(typeof(b.keys[w]==="number"))if(b.keys[w]===o.keyCode)return t+w;var x;switch(o.keyCode){case 59:x=o.mod2?":":";";break;case 61:x=o.mod2?"+":"=";break;case 188:x=o.mod2?"<":",";break;case 190:x=
o.mod2?">":".";break;case 191:x=o.mod2?"?":"/";break;case 192:x=o.mod2?"~":"`";break;case 219:x=o.mod2?"{":"[";break;case 220:x=o.mod2?"|":"\\";break;case 221:x=o.mod2?"}":"]";break;case 222:x=o.mod2?'"':"'";break}if(x)return t+x;return t+String.fromCharCode(o.keyCode)}function d(o,t){o.startup();if(typeof t==="string"){var u=b.byId(t);if(!u)if(u=c.byId(t))u=u.domNode;t=u?u:null}if(t){t=b.position(t);o._setStyleAttr("left:"+(t.x+16)+"px !important;");o._setStyleAttr("top:"+(t.y+16)+"px !important;")}o.show()}
function e(o,t,u,w,x,z,E,D,F){E=function(L){return function(G){var O=c.byId(o),M=O.get("value");if(L&&G.keyCode===b.keys.ESCAPE){u&&b.style(t,"display","inline");O.destroyRecursive();z&&z()}else if(!(L&&G.keyCode!==b.keys.ENTER)){if(!O.isValid()||!F&&M===w)u&&b.style(t,"display","inline");else x(M);O.destroyRecursive();z&&z()}}};var I=new c.form.ValidationTextBox({id:o,required:true,value:w||""});b.place(I.domNode,t,"after");b.addClass(I.domNode,"userEditBoxPrompt");u&&b.style(t,"display","none");
b.connect(I,"onKeyDown",E(true));b.connect(I,"onBlur",E(false));window.setTimeout(function(){I.focus();if(w){var L=b.byId(o),G=D?w.indexOf(D):-1;G>0?c.selectInputText(L,0,G):L.select()}},0)}function f(o){var t=window.navigator.platform.indexOf("Mac")!==-1;return t&&o.metaKey||!t&&o.ctrlKey}function g(o,t){if(t&&f(t))window.open(o);else window.location=o}function h(o){if(!o)return o;var t=window.location.href.split("#")[0];t=t.substring(0,t.length-window.location.pathname.length);if(o.indexOf(t)===
0)return o.substring(t.length);return o}function j(o){if(!o)return o;var t=window.location.href.split("#")[0];return t.substring(0,t.length-window.location.pathname.length)+o}function k(o){return this.makeRelative(o).indexOf("/workspace")===0}function l(o,t){o.children=t;for(var u in t)t[u].parent=o;o.children.sort(function(w,x){var z=w.Directory;if(z!==x.Directory)return z?-1:1;w=w.Name&&w.Name.toLowerCase();x=x.Name&&x.Name.toLowerCase();if(w<x)return-1;if(w>x)return 1;return 0})}function m(o,t){o.Parents&&
o.Parents.length===0&&t.getService("orion.core.preference").getPreferences("/window/recent").then(function(u){var w=u.get("projects");if(typeof w==="string")w=JSON.parse(w);var x=[];if(w&&w.length&&w.length>0)for(var z=0;z<w.length;z++)w[z].location!==o.ChildrenLocation&&w[z].name!==o.Name&&x.push(w[z]);x.push({name:o.Name,location:o.ChildrenLocation});if(x.length>5)x=x.slice(-5,x.length);u.put("projects",x)})}function n(o){return typeof o.textContent!=="undefined"?o.textContent:o.innerText}function r(o){return n(document.createTextNode(o))}
function s(o,t){if(typeof o.textContent!=="undefined")o.textContent=t;else o.innerText=t}function p(o,t,u,w,x,z,E,D){x=x||t+"heading";z=z||t+"commands";b.place('<div class="toolComposite" id="'+t+'"><div class="layoutLeft" id="'+t+'"><span style: "inline-block;" id="'+x+'">'+u+'</span></div><div class="layoutRight sectionActions" id="'+z+'"></div><div id="'+o.id+'slideContainer" class="layoutBlock slideParameters slideContainer"><span id="'+o.id+'slideOut" class="slide"><span id="'+o.id+'pageCommandParameters" class="parameters"></span><span id="'+
o.id+'pageCommandDismiss" class="parametersDismiss"></span></span></div></div>',o,"last");w?b.addClass(t,"auxpaneHeading"):b.addClass(t,"paneHeading");E&&E.renderCommands(b.byId(z),"dom",D,D,"button");return b.byId(t)}function q(o){if(typeof o==="string")o=b.byId(o);for(;o;){var t=c.byId(o.id);if(t&&typeof t.layout==="function"){t.layout();return}o=o.parentNode}}return{getUserKeyString:a,openDialog:d,getUserText:e,openInNewWindow:f,followLink:g,makeRelative:h,makeFullPath:j,isAtRoot:k,processNavigatorParent:l,
rememberSuccessfulTraversal:m,getText:n,safeText:r,setText:s,createPaneHeading:p,forceLayout:q}});
define("orion/PageUtil",["require","exports","module"],function(){function b(c){c=c||window.location.toString();var a={resource:""},d=c.indexOf("#");if(d!==-1){c=c.substring(d+1);if(c.length!==0){c=c.split(",");a.resource=decodeURIComponent(c[0]);for(d=1;d<c.length;d++){var e=c[d].split("="),f=decodeURIComponent(e[0]);e=e.length===2?decodeURIComponent(e[1]):null;if(e!==null&&f!=="resource")a[f]=e}}}return a}return{matchResourceParameters:b}});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(b,c){b.declare("dijit._Container",null,{isContainer:true,buildRendering:function(){this.inherited(arguments);if(!this.containerNode)this.containerNode=this.domNode},addChild:function(a,d){var e=this.containerNode;if(d&&typeof d=="number"){var f=this.getChildren();if(f&&f.length>=d){e=f[d-1].domNode;d="after"}}b.place(a.domNode,e,d);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){b.forEach(this.getChildren(),function(d){d.destroyRecursive(a)})},_getSiblingOfChild:function(a,d){a=a.domNode;d=d>0?"nextSibling":"previousSibling";do a=a[d];while(a&&(a.nodeType!=1||!c.byNode(a)));return a&&c.byNode(a)},getIndexOfChild:function(a){return b.indexOf(this.getChildren(),a)},startup:function(){if(!this._started){b.forEach(this.getChildren(),
function(a){a.startup()});this.inherited(arguments)}}});return c._Container});
define("dijit/_KeyNavContainer",["dojo","dijit","dijit/_Container"],function(b,c){b.declare("dijit._KeyNavContainer",c._Container,{tabIndex:"0",_keyNavCodes:{},connectKeyNavHandlers:function(a,d){var e=this._keyNavCodes={},f=b.hitch(this,this.focusPrev),g=b.hitch(this,this.focusNext);b.forEach(a,function(h){e[h]=f});b.forEach(d,function(h){e[h]=g});e[b.keys.HOME]=b.hitch(this,"focusFirstChild");e[b.keys.END]=b.hitch(this,"focusLastChild");this.connect(this.domNode,"onkeypress","_onContainerKeypress");
this.connect(this.domNode,"onfocus","_onContainerFocus")},startupKeyNavChildren:function(){b.forEach(this.getChildren(),b.hitch(this,"_startupChild"))},addChild:function(a){c._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,d){this.focusedChild&&a!==this.focusedChild&&this._onChildBlur(this.focusedChild);a.set("tabIndex",this.tabIndex);a.focus(d?"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();b.attr(this.domNode,"tabIndex","-1")}},_onBlur:function(){this.tabIndex&&b.attr(this.domNode,"tabIndex",this.tabIndex);this.inherited(arguments)},_onContainerKeypress:function(a){if(!(a.ctrlKey||a.altKey)){var d=this._keyNavCodes[a.charOrCode];if(d){d();b.stopEvent(a)}}},_onChildBlur:function(){},_getFirstFocusableChild:function(){return this._getNextFocusableChild(null,1)},_getLastFocusableChild:function(){return this._getNextFocusableChild(null,-1)},_getNextFocusableChild:function(a,
d){if(a)a=this._getSiblingOfChild(a,d);for(var e=this.getChildren(),f=0;f<e.length;f++){a||(a=e[d>0?0:e.length-1]);if(a.isFocusable())return a;a=this._getSiblingOfChild(a,d)}return null}});return c._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(b,c){b.declare("dijit._Contained",null,{getParent:function(){var a=c.getEnclosingWidget(this.domNode.parentNode);return a&&a.isContainer?a:null},_getSibling:function(a){var d=this.domNode;do d=d[a+"Sibling"];while(d&&d.nodeType!=1);return d&&c.byNode(d)},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 c._Contained});
define("dijit/MenuItem",["dojo","dijit","text!dijit/templates/MenuItem.html","dijit/_Widget","dijit/_Templated","dijit/_Contained","dijit/_CssStateMixin"],function(b,c){b.declare("dijit.MenuItem",[c._Widget,c._Templated,c._Contained,c._CssStateMixin],{templateString:b.cache("dijit","templates/MenuItem.html"),attributeMap:b.delegate(c._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";b.attr(this.containerNode,"id",a);if(this.accelKeyNode){b.attr(this.accelKeyNode,"id",this.id+"_accel");a+=" "+this.id+"_accel"}c.setWaiState(this.domNode,"labelledby",a);b.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);b.stopEvent(a)},onClick:function(){},focus:function(){try{b.isIE==8&&this.containerNode.focus();c.focus(this.focusNode)}catch(a){}},_onFocus:function(){this._setSelected(true);this.getParent()._onItemFocus(this);this.inherited(arguments)},_setSelected:function(a){b.toggleClass(this.domNode,"dijitMenuItemSelected",a)},setLabel:function(a){b.deprecated("dijit.MenuItem.setLabel() is deprecated.  Use set('label', ...) instead.",
"","2.0");this.set("label",a)},setDisabled:function(a){b.deprecated("dijit.Menu.setDisabled() is deprecated.  Use set('disabled', bool) instead.","","2.0");this.set("disabled",a)},_setDisabledAttr:function(a){c.setWaiState(this.focusNode,"disabled",a?"true":"false");this._set("disabled",a)},_setAccelKeyAttr:function(a){this.accelKeyNode.style.display=a?"":"none";this.accelKeyNode.innerHTML=a;b.attr(this.containerNode,"colSpan",a?"1":"2");this._set("accelKey",a)}});return c.MenuItem});
define("dijit/PopupMenuItem",["dojo","dijit","dijit/MenuItem"],function(b,c){b.declare("dijit.PopupMenuItem",c.MenuItem,{_fillContent:function(){if(this.srcNodeRef){var a=b.query("*",this.srcNodeRef);c.PopupMenuItem.superclass._fillContent.call(this,a[0]);this.dropDownContainer=this.srcNodeRef}},startup:function(){if(!this._started){this.inherited(arguments);if(!this.popup){var a=b.query("[widgetId]",this.dropDownContainer)[0];this.popup=c.byNode(a)}b.body().appendChild(this.popup.domNode);this.popup.startup();
this.popup.domNode.style.display="none";this.arrowWrapper&&b.style(this.arrowWrapper,"visibility","");c.setWaiState(this.focusNode,"haspopup","true")}},destroyDescendants:function(){if(this.popup){this.popup._destroyed||this.popup.destroyRecursive();delete this.popup}this.inherited(arguments)}});return c.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(b,c){b.declare("dijit.CheckedMenuItem",c.MenuItem,{templateString:b.cache("dijit","templates/CheckedMenuItem.html"),checked:false,_setCheckedAttr:function(a){b.toggleClass(this.domNode,"dijitCheckedMenuItemChecked",a);c.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 c.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(b,c){b.declare("dijit.MenuSeparator",[c._Widget,c._Templated,c._Contained],{templateString:b.cache("dijit","templates/MenuSeparator.html"),buildRendering:function(){this.inherited(arguments);b.setSelectable(this.domNode,false)},isFocusable:function(){return false}});return c.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(b,c){b.declare("dijit._MenuBase",[c._Widget,c._Templated,c._KeyNavContainer],{parentMenu:null,popupDelay:500,startup:function(){if(!this._started){b.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(b.hitch(this,"_openPopup"),this.popupDelay)}this.focusedChild&&this.focusChild(a);this._hoveredChild=a},_onChildBlur:function(a){this._stopPopupTimer();a._setSelected(false);var d=a.popup;if(d){this._stopPendingCloseTimer(d);d._pendingClose_timer=setTimeout(function(){d._pendingClose_timer=null;if(d.parentMenu)d.parentMenu.currentPopup=
null;c.popup.close(d)},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,d){typeof this.isShowingNow=="undefined"&&this._markActive();this.focusChild(a);if(a.disabled)return false;if(a.popup)this._openPopup();else{this.onExecute();a.onClick(d)}},_openPopup:function(){this._stopPopupTimer();var a=this.focusedChild;if(a){var d=a.popup;if(!d.isShowingNow){if(this.currentPopup){this._stopPendingCloseTimer(this.currentPopup);c.popup.close(this.currentPopup)}d.parentMenu=this;d.from_item=a;var e=this;c.popup.open({parent:this,
popup:d,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(){e.focusChild(a);e._cleanUp();a._setSelected(true);e.focusedChild=a},onExecute:b.hitch(this,"_cleanUp")});this.currentPopup=d;d.connect(d.domNode,"onmouseenter",b.hitch(e,"_onPopupHover"));if(d.focus)d._focus_timer=setTimeout(b.hitch(d,function(){this._focus_timer=null;this.focus()}),0)}}},_markActive:function(){this.isActive=true;b.replaceClass(this.domNode,
"dijitMenuActive","dijitMenuPassive")},onOpen:function(){this.isShowingNow=true;this._markActive()},_markInactive:function(){this.isActive=false;b.replaceClass(this.domNode,"dijitMenuPassive","dijitMenuActive")},onClose:function(){this._stopFocusTimer();this._markInactive();this.isShowingNow=false;this.parentMenu=null},_closeChild:function(){this._stopPopupTimer();if(this.currentPopup){c._curFocus&&b.isDescendant(c._curFocus,this.currentPopup.domNode)&&this.focusedChild.focusNode.focus();c.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()}});b.declare("dijit.Menu",c._MenuBase,{constructor:function(){this._bindings=[]},templateString:b.cache("dijit",
"templates/Menu.html"),baseClass:"dijitMenu",targetNodeIds:[],contextMenuForWindow:false,leftClickToOpen:false,refocus:true,postCreate:function(){this.contextMenuForWindow?this.bindDomNode(b.body()):b.forEach(this.targetNodeIds,this.bindDomNode,this);var a=b.keys,d=this.isLeftToRight();this._openSubMenuKey=d?a.RIGHT_ARROW:a.LEFT_ARROW;this._closeSubMenuKey=d?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);
b.stopEvent(a);break;case this._closeSubMenuKey:if(this.parentMenu)this.parentMenu._isMenuBar?this.parentMenu.focusPrev():this.onCancel(false);else b.stopEvent(a);break}},_iframeContentWindow:function(a){return b.window.get(this._iframeContentDocument(a))||this._iframeContentDocument(a).__parent__||a.name&&b.doc.frames[a.name]||null},_iframeContentDocument:function(a){return a.contentDocument||a.contentWindow&&a.contentWindow.document||a.name&&b.doc.frames[a.name]&&b.doc.frames[a.name].document||
null},bindDomNode:function(a){a=b.byId(a);var d;if(a.tagName.toLowerCase()=="iframe"){var e=a,f=this._iframeContentWindow(e);d=b.withGlobal(f,b.body)}else d=a==b.body()?b.doc.documentElement:a;var g={node:a,iframe:e};b.attr(a,"_dijitMenu"+this.id,this._bindings.push(g));var h=b.hitch(this,function(j){return[b.connect(j,this.leftClickToOpen?"onclick":"oncontextmenu",this,function(k){b.stopEvent(k);this._scheduleOpen(k.target,e,{x:k.pageX,y:k.pageY})}),b.connect(j,"onkeydown",this,function(k){if(k.shiftKey&&
k.keyCode==b.keys.F10){b.stopEvent(k);this._scheduleOpen(k.target,e)}})]});g.connects=d?h(d):[];if(e){g.onloadHandler=b.hitch(this,function(){var j=this._iframeContentWindow(e);d=b.withGlobal(j,b.body);g.connects=h(d)});e.addEventListener?e.addEventListener("load",g.onloadHandler,false):e.attachEvent("onload",g.onloadHandler)}},unBindDomNode:function(a){var d;try{d=b.byId(a)}catch(e){return}a="_dijitMenu"+this.id;if(d&&b.hasAttr(d,a)){var f=b.attr(d,a)-1,g=this._bindings[f];b.forEach(g.connects,b.disconnect);
var h=g.iframe;if(h)h.removeEventListener?h.removeEventListener("load",g.onloadHandler,false):h.detachEvent("onload",g.onloadHandler);b.removeAttr(d,a);delete this._bindings[f]}},_scheduleOpen:function(a,d,e){if(!this._openTimer)this._openTimer=setTimeout(b.hitch(this,function(){delete this._openTimer;this._openMyself({target:a,iframe:d,coords:e})}),1)},_openMyself:function(a){function d(){l.refocus&&c.focus(m);c.popup.close(l)}var e=a.target,f=a.iframe;if(a=a.coords){if(f){e=b.position(f,true);var g=
this._iframeContentWindow(f);g=b.withGlobal(g,"_docScroll",b);var h=b.getComputedStyle(f),j=b._toPixelValue,k=(b.isIE&&b.isQuirks?0:j(f,h.paddingLeft))+(b.isIE&&b.isQuirks?j(f,h.borderLeftWidth):0);f=(b.isIE&&b.isQuirks?0:j(f,h.paddingTop))+(b.isIE&&b.isQuirks?j(f,h.borderTopWidth):0);a.x+=e.x+k-g.x;a.y+=e.y+f-g.y}}else{a=b.position(e,true);a.x+=10;a.y+=10}var l=this,m=c.getFocus(this);c.popup.open({popup:this,x:a.x,y:a.y,onExecute:d,onCancel:d,orient:this.isLeftToRight()?"L":"R"});this.focus();this._onBlur=
function(){this.inherited("_onBlur",arguments);c.popup.close(this)}},uninitialize:function(){b.forEach(this._bindings,function(a){a&&this.unBindDomNode(a.node)},this);this.inherited(arguments)}});return c.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(b,c){b.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)){b.stopEvent(a);this._docHandler=this.connect(b.doc,"onmouseup","_onDropDownMouseUp");this.toggleDropDown()}},_onDropDownMouseUp:function(a){a&&
this._docHandler&&this.disconnect(this._docHandler);var d=this.dropDown,e=false;if(a&&this._opened){var f=b.position(this._buttonNode,true);if(!(a.pageX>=f.x&&a.pageX<=f.x+f.w)||!(a.pageY>=f.y&&a.pageY<=f.y+f.h)){for(f=a.target;f&&!e;)if(b.hasClass(f,"dijitPopup"))e=true;else f=f.parentNode;if(e){f=a.target;if(d.onItemClick){for(var g;f&&!(g=c.byNode(f));)f=f.parentNode;g&&g.onClick&&g.getParent&&g.getParent().onItemClick(g,a)}return}}}this._opened&&d.focus&&d.autoFocus!==false&&window.setTimeout(b.hitch(d,
"focus"),1)},_onDropDownClick:function(a){this._stopClickEvents&&b.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";b.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 d=this.dropDown,e=a.target;if(d&&this._opened&&d.handleKey)if(d.handleKey(a)===false){b.stopEvent(a);return}if(d&&this._opened&&a.charOrCode==b.keys.ESCAPE){this.closeDropDown();b.stopEvent(a)}else if(!this._opened&&(a.charOrCode==b.keys.DOWN_ARROW||(a.charOrCode==b.keys.ENTER||a.charOrCode==" ")&&((e.tagName||"").toLowerCase()!=="input"||e.type&&e.type.toLowerCase()!=="text"))){this._toggleOnKeyUp=true;b.stopEvent(a)}}},_onKeyUp:function(){if(this._toggleOnKeyUp){delete this._toggleOnKeyUp;
this.toggleDropDown();var a=this.dropDown;a&&a.focus&&setTimeout(b.hitch(a,"focus"),1)}},_onBlur:function(){this.closeDropDown(c._curFocus&&this.dropDown&&b.isDescendant(c._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(b.hitch(this,"openDropDown"))},openDropDown:function(){var a=
this.dropDown,d=a.domNode,e=this._aroundNode||this.domNode,f=this;if(!this._preparedNode){this._preparedNode=true;if(d.style.width)this._explicitDDWidth=true;if(d.style.height)this._explicitDDHeight=true}if(this.maxHeight||this.forceWidth||this.autoWidth){var g={display:"",visibility:"hidden"};if(!this._explicitDDWidth)g.width="";if(!this._explicitDDHeight)g.height="";b.style(d,g);g=this.maxHeight;if(g==-1){g=b.window.getBox();var h=b.position(e,false);g=Math.floor(Math.max(h.y,g.h-(h.y+h.h)))}a.startup&&
!a._started&&a.startup();c.popup.moveOffScreen(a);h=b._getMarginSize(d);var j=g&&h.h>g;b.style(d,{overflowX:"hidden",overflowY:j?"auto":"hidden"});if(j){h.h=g;if("w"in h)h.w+=16}else delete h.h;if(this.forceWidth)h.w=e.offsetWidth;else if(this.autoWidth)h.w=Math.max(h.w,e.offsetWidth);else delete h.w;b.isFunction(a.resize)?a.resize(h):b.marginBox(d,h)}a=c.popup.open({parent:this,popup:a,around:e,orient:c.getPopupAroundAlignment(this.dropDownPosition&&this.dropDownPosition.length?this.dropDownPosition:
["below"],this.isLeftToRight()),onExecute:function(){f.closeDropDown(true)},onCancel:function(){f.closeDropDown(true)},onClose:function(){b.attr(f._popupStateNode,"popupActive",false);b.removeClass(f._popupStateNode,"dijitHasDropDownOpen");f._opened=false}});b.attr(this._popupStateNode,"popupActive","true");b.addClass(f._popupStateNode,"dijitHasDropDownOpen");this._opened=true;return a},closeDropDown:function(a){if(this._opened){a&&this.focus();c.popup.close(this.dropDown);this._opened=false}}});
return c._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(b,c){b.declare("dijit.form.Button",c.form._FormWidget,{label:"",showLabel:true,iconClass:"",type:"button",baseClass:"dijitButton",templateString:b.cache("dijit.form","templates/Button.html"),attributeMap:b.delegate(c.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 d=this.domNode;d.parentNode;d=d.parentNode){var e=c.byNode(d);if(e&&typeof e._onSubmit=="function"){e._onSubmit(a);break}}else if(this.valueNode){this.valueNode.click();a.preventDefault()}},buildRendering:function(){this.inherited(arguments);b.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&&b.toggleClass(this.containerNode,"dijitDisplayNone",!a);this._set("showLabel",a)},onClick:function(){return true},_clicked:function(){},setLabel:function(a){b.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=b.trim(this.containerNode.innerText||this.containerNode.textContent||"")},_setIconClassAttr:function(a){b.replaceClass(this.iconNode,a||"dijitNoIcon",this.iconClass||"dijitNoIcon");this._set("iconClass",a)}});b.declare("dijit.form.DropDownButton",[c.form.Button,c._Container,c._HasDropDown],{baseClass:"dijitDropDownButton",templateString:b.cache("dijit.form","templates/DropDownButton.html"),_fillContent:function(){if(this.srcNodeRef){var a=
b.query("*",this.srcNodeRef);c.form.DropDownButton.superclass._fillContent.call(this,a[0]);this.dropDownContainer=this.srcNodeRef}},startup:function(){if(!this._started){if(!this.dropDown&&this.dropDownContainer){var a=b.query("[widgetId]",this.dropDownContainer)[0];this.dropDown=c.byNode(a);delete this.dropDownContainer}this.dropDown&&c.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 d=b.connect(a,"onLoad",this,function(){b.disconnect(d);this.openDropDown()});a.refresh()}},isFocusable:function(){return this.inherited(arguments)&&!this._mouseDown}});b.declare("dijit.form.ComboButton",c.form.DropDownButton,{templateString:b.cache("dijit.form","templates/ComboButton.html"),attributeMap:b.mixin(b.clone(c.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==b.keys[this.isLeftToRight()?"RIGHT_ARROW":"LEFT_ARROW"]){c.focus(this._popupStateNode);b.stopEvent(a)}},_onArrowKeyPress:function(a){if(a.charOrCode==b.keys[this.isLeftToRight()?"LEFT_ARROW":"RIGHT_ARROW"]){c.focus(this.titleNode);b.stopEvent(a)}},focus:function(a){this.disabled||c.focus(a=="start"?this.titleNode:this._popupStateNode)}});
b.declare("dijit.form.ToggleButton",c.form.Button,{baseClass:"dijitToggleButton",checked:false,attributeMap:b.mixin(b.clone(c.form.Button.prototype.attributeMap),{checked:"focusNode"}),_clicked:function(){this.set("checked",!this.checked)},_setCheckedAttr:function(a,d){this._set("checked",a);b.attr(this.focusNode||this.domNode,"checked",a);c.setWaiState(this.focusNode||this.domNode,"pressed",a);this._handleOnChange(a,d)},setChecked:function(a){b.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 c.form.Button});define("dijit/form/DropDownButton",["dojo","dijit","dijit/form/Button"],function(b,c){return c.form.DropDownButton});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/layout/_LayoutWidget",["dojo","dijit","dijit/_Widget","dijit/_Container","dijit/_Contained"],function(b,c){b.declare("dijit.layout._LayoutWidget",[c._Widget,c._Container,c._Contained],{baseClass:"dijitLayoutContainer",isLayoutContainer:true,buildRendering:function(){this.inherited(arguments);b.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(b.isIE?
this.domNode:b.global,"onresize",function(){this.resize()})}}},resize:function(a,d){var e=this.domNode;if(a){b.marginBox(e,a);if(a.t)e.style.top=a.t+"px";if(a.l)e.style.left=a.l+"px"}d=d||{};b.mixin(d,a||{});if(!("h"in d)||!("w"in d))d=b.mixin(b.marginBox(e),d);a=b.getComputedStyle(e);var f=b._getMarginExtents(e,a),g=b._getBorderExtents(e,a);d=this._borderBox={w:d.w-(f.w+g.w),h:d.h-(f.h+g.h)};f=b._getPadExtents(e,a);this._contentBox={l:b._toPixelValue(e,a.paddingLeft),t:b._toPixelValue(e,a.paddingTop),
w:d.w-f.w,h:d.h-f.h};this.layout()},layout:function(){},_setupChild:function(a){b.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){b.removeClass(a.domNode,this.baseClass+"-child"+(a.baseClass?" "+this.baseClass+"-"+a.baseClass:""));this.inherited(arguments)}});c.layout.marginBox2contentBox=function(a,d){var e=b.getComputedStyle(a),f=b._getMarginExtents(a,
e),g=b._getPadBorderExtents(a,e);return{l:b._toPixelValue(a,e.paddingLeft),t:b._toPixelValue(a,e.paddingTop),w:d.w-(f.w+g.w),h:d.h-(f.h+g.h)}};(function(){var a=function(e){return e.substring(0,1).toUpperCase()+e.substring(1)},d=function(e,f){var g=e.resize?e.resize(f):b.marginBox(e.domNode,f);if(g)b.mixin(e,g);else{b.mixin(e,b.marginBox(e.domNode));b.mixin(e,f)}};c.layout.layoutChildren=function(e,f,g,h,j){f=b.mixin({},f);b.addClass(e,"dijitLayoutContainer");g=b.filter(g,function(k){return k.region!=
"center"&&k.layoutAlign!="client"}).concat(b.filter(g,function(k){return k.region=="center"||k.layoutAlign=="client"}));b.forEach(g,function(k){var l=k.domNode,m=k.region||k.layoutAlign,n=l.style;n.left=f.l+"px";n.top=f.t+"px";n.position="absolute";b.addClass(l,"dijitAlign"+a(m));l={};if(h&&h==k.id)l[k.region=="top"||k.region=="bottom"?"h":"w"]=j;if(m=="top"||m=="bottom"){l.w=f.w;d(k,l);f.h-=k.h;if(m=="top")f.t+=k.h;else n.top=f.t+f.h+"px"}else if(m=="left"||m=="right"){l.h=f.h;d(k,l);f.w-=k.w;if(m==
"left")f.l+=k.w;else n.left=f.l+f.w+"px"}else if(m=="client"||m=="center")d(k,f)})}})();return c.layout._LayoutWidget});
define("dijit/layout/_ContentPaneResizeMixin",["dojo","dijit","dijit/_Contained","dijit/layout/_LayoutWidget"],function(b,c){b.declare("dijit.layout._ContentPaneResizeMixin",null,{doLayout:true,isContainer:true,isLayoutContainer:true,_startChildren:function(){b.forEach(this.getChildren(),function(a){a.startup();a._started=true})},startup:function(){if(!this._started){var a=c._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(b.isIE?this.domNode:b.global,"onresize",function(){this._needLayout=!this._childOfLayoutWidget;this.resize()})}},_checkIfSingleChild:function(){var a=b.query("> *",this.containerNode).filter(function(f){return f.tagName!=="SCRIPT"}),d=a.filter(function(f){return b.hasAttr(f,"data-dojo-type")||b.hasAttr(f,"dojoType")||b.hasAttr(f,"widgetId")}),e=b.filter(d.map(c.byNode),function(f){return f&&
f.domNode&&f.resize});if(a.length==d.length&&e.length==1)this._singleChild=e[0];else delete this._singleChild;b.toggleClass(this.containerNode,this.baseClass+"SingleChild",!!this._singleChild)},resize:function(a,d){!this._wasShown&&this.open!==false&&this._onShow();this._resizeCalled=true;this._scheduleLayout(a,d)},_scheduleLayout:function(a,d){if(this._isShown())this._layout(a,d);else{this._needLayout=true;this._changeSize=a;this._resultSize=d}},_layout:function(a,d){a&&b.marginBox(this.domNode,
a);var e=this.containerNode;if(e===this.domNode){d=d||{};b.mixin(d,a||{});if(!("h"in d)||!("w"in d))d=b.mixin(b.marginBox(e),d);this._contentBox=c.layout.marginBox2contentBox(e,d)}else this._contentBox=b.contentBox(e);this._layoutChildren();delete this._needLayout},_layoutChildren:function(){this.doLayout&&this._checkIfSingleChild();if(this._singleChild&&this._singleChild.resize){var a=this._contentBox||b.contentBox(this.containerNode);this._singleChild.resize({w:a.w,h:a.h})}else b.forEach(this.getChildren(),
function(d){d.resize&&d.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,d=this.domNode.parentNode;return a.style.display!="none"&&a.style.visibility!="hidden"&&!b.hasClass(a,"dijitHidden")&&d&&d.style&&d.style.display!="none"}},_onShow:function(){this._needLayout&&this._layout(this._changeSize,this._resultSize);this.inherited(arguments);this._wasShown=
true}});return c.layout._ContentPaneResizeMixin});
define("dojo/html",["dojo","dojo/parser"],function(b){b.getObject("html",true,b);(function(){var c=0;b.html._secureForInnerHtml=function(a){return a.replace(/(?:\s*<!DOCTYPE\s[^>]+>|<title[^>]*>[\s\S]*?<\/title>)/ig,"")};b.html._emptyNode=b.empty;b.html._setNodeContent=function(a,d){b.empty(a);if(d){if(typeof d=="string")d=b._toDom(d,a.ownerDocument);if(!d.nodeType&&b.isArrayLike(d))for(var e=d.length,f=0;f<d.length;f=e==d.length?f+1:0)b.place(d[f],a,"last");else b.place(d,a,"last")}return a};b.declare("dojo.html._ContentSetter",
null,{node:"",content:"",id:"",cleanContent:false,extractContent:false,parseContent:false,parserScope:b._scopeName,startup:true,constructor:function(a,d){b.mixin(this,a||{});d=this.node=b.byId(this.node||d);if(!this.id)this.id=["Setter",d?d.id||d.tagName:"",c++].join("_")},set:function(a,d){if(undefined!==a)this.content=a;d&&this._mixin(d);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=b.html._setNodeContent(a,this.content)}catch(d){var e=this.onContentError(d);try{a.innerHTML=e}catch(f){console.error("Fatal "+this.declaredClass+".setContent could not change content due to "+f.message,f)}}this.node=a},empty:function(){if(this.parseResults&&this.parseResults.length){b.forEach(this.parseResults,function(a){a.destroy&&a.destroy()});delete this.parseResults}b.html._emptyNode(this.node)},onBegin:function(){var a=this.content;if(b.isString(a)){if(this.cleanContent)a=b.html._secureForInnerHtml(a);
if(this.extractContent){var d=a.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);if(d)a=d[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 d={},e;for(e in a)e in d||(this[e]=a[e])},_parse:function(){var a=this.node;try{var d={};b.forEach(["dir","lang","textDir"],
function(f){if(this[f])d[f]=this[f]},this);this.parseResults=b.parser.parse({rootNode:a,noStart:!this.startup,inherited:d,scope:this.parserScope})}catch(e){this._onError("Content",e,"Error parsing in _ContentSetter#"+this.id)}},_onError:function(a,d,e){a=this["on"+a+"Error"].call(this,d);if(e)console.error(e,d);else a&&b.html._setNodeContent(this.node,a,true)}});b.html.set=function(a,d,e){if(undefined==d){console.warn("dojo.html.set: no cont argument provided, using empty string");d=""}return e?(new b.html._ContentSetter(b.mixin(e,
{content:d,node:a}))).set():b.html._setNodeContent(a,d,true)}})();return b.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(b,c){b.declare("dijit.layout.ContentPane",[c._Widget,c.layout._ContentPaneResizeMixin],{href:"",extractContent:false,parseOnLoad:true,parserScope:b._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:b.delegate(c._Widget.prototype.attributeMap,{title:[]}),stopParser:true,template:false,create:function(a,d){if((!a||!a.template)&&d&&!("href"in a)&&!("content"in a)){var e=b.doc.createDocumentFragment();for(d=b.byId(d);d.firstChild;)e.appendChild(d.firstChild);a=b.delegate(a,{content:e})}this.inherited(arguments,[a,d])},postMixInProperties:function(){this.inherited(arguments);var a=b.i18n.getLocalization("dijit",
"loading",this.lang);this.loadingMessage=b.string.substitute(this.loadingMessage,a);this.errorMessage=b.string.substitute(this.errorMessage,a)},buildRendering:function(){this.inherited(arguments);if(!this.containerNode)this.containerNode=this.domNode;this.domNode.title="";b.attr(this.domNode,"role")||c.setWaiRole(this.domNode,"group")},_startChildren:function(){this.inherited(arguments);this._contentSetter&&b.forEach(this._contentSetter.parseResults,function(a){if(!a._started&&!a._destroyed&&b.isFunction(a.startup)){a.startup();
a._started=true}},this)},setHref:function(a){b.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 b.Deferred(b.hitch(this,"cancel"));this.onLoadDeferred.addCallback(b.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){b.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 b.Deferred(b.hitch(this,"cancel"));this._created&&this.onLoadDeferred.addCallback(b.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 b.Deferred(b.hitch(this,"cancel"));this.onLoadDeferred.addCallback(b.hitch(this,"onLoad"));this._load();return this.onLoadDeferred},_load:function(){this._setContent(this.onDownloadStart(),
true);var a=this,d={preventCache:this.preventCache||this.refreshOnShow,url:this.href,handleAs:"text"};b.isObject(this.ioArgs)&&b.mixin(d,this.ioArgs);var e=this._xhrDfd=(this.ioMethod||b.xhrGet)(d);e.addCallback(function(f){try{a._isDownloaded=true;a._setContent(f,false);a.onDownloadEnd()}catch(g){a._onError("Content",g)}delete a._xhrDfd;return f});e.addErrback(function(f){e.canceled||a._onError("Download",f);delete a._xhrDfd;return f});delete this._hrefChanged},_onLoadHandler:function(a){this._set("isLoaded",
true);try{this.onLoadDeferred.callback(a)}catch(d){console.error("Error "+this.widgetId+" running custom onLoad code: "+d.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;b.forEach(this.getChildren(),function(d){d.destroyRecursive&&d.destroyRecursive()});if(a){b.forEach(a.parseResults,
function(d){d.destroyRecursive&&d.domNode&&d.domNode.parentNode==b.body()&&d.destroyRecursive()});delete a.parseResults}b.html._emptyNode(this.containerNode);delete this._singleChild},_setContent:function(a,d){this.destroyDescendants();var e=this._contentSetter;if(!(e&&e instanceof b.html._ContentSetter))e=this._contentSetter=new b.html._ContentSetter({node:this.containerNode,_onError:b.hitch(this,this._onError),onContentError:b.hitch(this,function(g){g=this.onContentError(g);try{this.containerNode.innerHTML=
g}catch(h){console.error("Fatal "+this.id+" could not change content due to "+h.message,h)}})});var f=b.mixin({cleanContent:this.cleanContent,extractContent:this.extractContent,parseContent:this.parseOnLoad,parserScope:this.parserScope,startup:false,dir:this.dir,lang:this.lang},this._contentSetterParams||{});e.set(b.isObject(a)&&a.domNode?a.domNode:a,f);delete this._contentSetterParams;this.doLayout&&this._checkIfSingleChild();if(!d){if(this._started){this._startChildren();this._scheduleLayout()}this._onLoadHandler(a)}},
_onError:function(a,d,e){this.onLoadDeferred.errback(d);a=this["on"+a+"Error"].call(this,d);if(e)console.error(e,d);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 c.layout.ContentPane});
define("dijit/form/_FormMixin",["dojo","dijit","dojo/window"],function(b,c){b.declare("dijit.form._FormMixin",null,{state:"",reset:function(){b.forEach(this.getDescendants(),function(a){a.reset&&a.reset()})},validate:function(){var a=false;return b.every(b.map(this.getDescendants(),function(d){d._hasBeenBlurred=true;var e=d.disabled||!d.validate||d.validate();if(!e&&!a){b.window.scrollIntoView(d.containerNode||d.domNode);d.focus();a=true}return e}),function(d){return d})},setValues:function(a){b.deprecated(this.declaredClass+
"::setValues() is deprecated. Use set('value', val) instead.","","2.0");return this.set("value",a)},_setValueAttr:function(a){var d={};b.forEach(this.getDescendants(),function(h){if(h.name)(d[h.name]||(d[h.name]=[])).push(h)});for(var e in d)if(d.hasOwnProperty(e)){var f=d[e],g=b.getObject(e,false,a);if(g!==undefined){b.isArray(g)||(g=[g]);if(typeof f[0].checked=="boolean")b.forEach(f,function(h){h.set("value",b.indexOf(g,h.value)!=-1)});else f[0].multiple?f[0].set("value",g):b.forEach(f,function(h,
j){h.set("value",g[j])})}}},getValues:function(){b.deprecated(this.declaredClass+"::getValues() is deprecated. Use get('value') instead.","","2.0");return this.get("value")},_getValueAttr:function(){var a={};b.forEach(this.getDescendants(),function(d){var e=d.name;if(!(!e||d.disabled)){var f=d.get("value");if(typeof d.checked=="boolean")if(/Radio/.test(d.declaredClass))if(f!==false)b.setObject(e,f,a);else{f=b.getObject(e,false,a);f===undefined&&b.setObject(e,null,a)}else{d=b.getObject(e,false,a);
if(!d){d=[];b.setObject(e,d,a)}f!==false&&d.push(f)}else{d=b.getObject(e,false,a);if(typeof d!="undefined")b.isArray(d)?d.push(f):b.setObject(e,[d,f],a);else b.setObject(e,f,a)}}});return a},isValid:function(){return this.state==""},onValidStateChange:function(){},_getState:function(){var a=b.map(this._descendants,function(d){return d.get("state")||""});return b.indexOf(a,"Error")>=0?"Error":b.indexOf(a,"Incomplete")>=0?"Incomplete":""},disconnectChildren:function(){b.forEach(this._childConnections||
[],b.hitch(this,"disconnect"));b.forEach(this._childWatches||[],function(a){a.unwatch()})},connectChildren:function(a){var d=this;this.disconnectChildren();this._descendants=this.getDescendants();a=a?function(h,j){d[h]=j}:b.hitch(this,"_set");a("value",this.get("value"));a("state",this._getState());var e=this._childConnections=[],f=this._childWatches=[];b.forEach(b.filter(this._descendants,function(h){return h.validate}),function(h){b.forEach(["state","disabled"],function(j){f.push(h.watch(j,function(){d.set("state",
d._getState())}))})});var g=function(){d._onChangeDelayTimer&&clearTimeout(d._onChangeDelayTimer);d._onChangeDelayTimer=setTimeout(function(){delete d._onChangeDelayTimer;d._set("value",d.get("value"))},10)};b.forEach(b.filter(this._descendants,function(h){return h.onChange}),function(h){e.push(d.connect(h,"onChange",g));f.push(h.watch("disabled",g))})},startup:function(){this.inherited(arguments);this.connectChildren(true);this.watch("state",function(a,d,e){this.onValidStateChange(e=="")})},destroy:function(){this.disconnectChildren();
this.inherited(arguments)}});return c.form._FormMixin});
define("dijit/_DialogMixin",["dojo","dijit","dijit/_Widget"],function(b,c){b.declare("dijit._DialogMixin",null,{attributeMap:c._Widget.prototype.attributeMap,execute:function(){},onCancel:function(){},onExecute:function(){},_onSubmit:function(){this.onExecute();this.execute(this.get("value"))},_getFocusItems:function(){var a=c._getTabNavigable(this.containerNode);this._firstFocusItem=a.lowest||a.first||this.closeButtonNode||this.domNode;this._lastFocusItem=a.last||a.highest||this._firstFocusItem}});
return c._DialogMixin});
define("dijit/TooltipDialog",["dojo","dijit","text!dijit/templates/TooltipDialog.html","dijit/layout/ContentPane","dijit/_Templated","dijit/form/_FormMixin","dijit/_DialogMixin"],function(b,c){b.declare("dijit.TooltipDialog",[c.layout.ContentPane,c._Templated,c.form._FormMixin,c._DialogMixin],{title:"",doLayout:false,autofocus:true,baseClass:"dijitTooltipDialog",_firstFocusItem:null,_lastFocusItem:null,templateString:b.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,d,e){a="dijitTooltipAB"+(e.charAt(1)=="L"?"Left":"Right")+" dijitTooltip"+(e.charAt(0)=="T"?"Below":"Above");b.replaceClass(this.domNode,a,this._currentOrientClass||"");this._currentOrientClass=a},focus:function(){this._getFocusItems(this.containerNode);c.focus(this._firstFocusItem)},onOpen:function(a){this.orient(this.domNode,a.aroundCorner,a.corner);this._onShow()},
onClose:function(){this.onHide()},_onKey:function(a){var d=a.target,e=b.keys;a.charOrCode===e.TAB&&this._getFocusItems(this.containerNode);var f=this._firstFocusItem==this._lastFocusItem;if(a.charOrCode==e.ESCAPE){setTimeout(b.hitch(this,"onCancel"),0);b.stopEvent(a)}else if(d==this._firstFocusItem&&a.shiftKey&&a.charOrCode===e.TAB){f||c.focus(this._lastFocusItem);b.stopEvent(a)}else if(d==this._lastFocusItem&&a.charOrCode===e.TAB&&!a.shiftKey){f||c.focus(this._firstFocusItem);b.stopEvent(a)}else a.charOrCode===
e.TAB&&a.stopPropagation()}});return c.TooltipDialog});
define("orion/commands",["require","dojo","dijit","orion/util","orion/PageUtil","dijit/Menu","dijit/form/DropDownButton","dijit/MenuItem","dijit/PopupMenuItem","dijit/MenuSeparator","dijit/Tooltip","dijit/TooltipDialog"],function(b,c,a,d,e){function f(q,o,t,u,w){this.commandService=q;this.handler=o;this.items=t;this.userData=u;this.command=w;if(w.parameters)this.parameters=w.parameters.makeCopy();this.id=w.id}function g(q){this._domScope={};this._objectScope={};this._globalScope={};this._namedGroups=
{};this._ungrouped={};this._topics={};this._activeBindings={};this._urlBindings={};this._init(q);this._parameterCollector=null}function h(q,o,t){c.addClass(o,"commandImage");var u;if(q.imageClass){u=c.create("span",{},o,"last");c.addClass(u,q.spriteClass);c.addClass(u,q.imageClass)}else{u=new Image;u.alt=q.name;u.name=t;u.id=t;u.src=q.image;c.place(u,o,"last")}return u}function j(q){this._init(q)}function k(q,o,t,u,w){this.keyCode=typeof q==="string"?q.toUpperCase().charCodeAt(0):q;this.mod1=o!==
undefined&&o!==null?o:false;this.mod2=t!==undefined&&t!==null?t:false;this.mod3=u!==undefined&&u!==null?u:false;this.mod4=w!==undefined&&w!==null?w:false}function l(q,o){this.token=q;this.parameterName=o}function m(q,o,t,u){this.name=q;this.type=o;this.label=t;this.value=u}function n(q,o,t){this._storeParameters(q);this.options=o;this.optionsRequested=false;this.getParameters=t}f.prototype={collectsParameters:function(){return this.commandService&&this.commandService.collectsParameters()}};f.prototype.constructor=
f;var r=c.declare(a.MenuItem,{_onClick:function(){this.hrefCallback||this.inherited(arguments)}}),s=c.declare(a.Tooltip,{constructor:function(){this.inherited(arguments);this.options=arguments[0]||{}},_onUnHover:function(){if(this._showTimer){window.clearTimeout(this._showTimer);delete this._showTimer}this.polling=false;this.close()},_onHover:function(){this.inherited(arguments);this.polling=true;this.pollForMissingTarget()},pollForMissingTarget:function(){this.polling&&window.setTimeout(c.hitch(this,
function(){if(this._stillInDocument(this._connectNode))this.pollForMissingTarget();else{this.polling=false;this.close()}}),1E3)},_stillInDocument:function(q){for(;q;){if(q===window.document)return true;q=q.parentNode}return false},postMixInProperties:function(){this.inherited(arguments);this.options.commandParent&&a.byId(this.options.commandParent.id)&&c.connect(this.options.commandParent,"onClose",c.hitch(this,function(){this.close()}))}});g.prototype={_init:function(q){this._registry=q.serviceRegistry;
this._serviceRegistration=this._registry.registerService("orion.page.command",this);this._selection=q.selection;c.connect(window.document,"onkeydown",c.hitch(this,function(o){o=o||window.event;var t=o.target.nodeName.toLowerCase();if(t==="input")switch(o.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(t===
"textarea")return;this._processKey(o)}))},_processKey:function(q){function o(z){if(window.document.all)z.keyCode=0;else{z.preventDefault();z.stopPropagation()}}for(var t in this._activeBindings)if(this._activeBindings[t]&&this._activeBindings[t].keyBinding&&this._activeBindings[t].command)if(this._activeBindings[t].keyBinding.match(q)){var u=this._activeBindings[t],w=u.invocation;if(w){var x=u.command;if(x.hrefCallback){o(q);q=x.hrefCallback.call(w.handler||window,w);q.then?q.then(function(z){window.open(z)}):
window.open(q);return}else if(x.callback){o(q);window.setTimeout(c.hitch(this,function(){w.parameters&&this.collectsParameters()?this._collectParameters(w):x.callback.call(w.handler||window,w)}),0);return}}}},processURL:function(q){for(var o in this._urlBindings)if(this._urlBindings[o]&&this._urlBindings[o].urlBinding&&this._urlBindings[o].command){var t=this._urlBindings[o].urlBinding.match(q);if(t){var u=this._urlBindings[o],w=u.command,x=u.invocation;if(x&&x.parameters&&w.callback){x.parameters.setValue(t.parameterName,
t.parameterValue);window.setTimeout(c.hitch(this,function(){this._collectParameters(x)}),0);return}}}},findCommand:function(q){return this._objectScope[q]||this._domScope[q]||this._globalScope[q]},runCommand:function(q){var o=this._urlBindings[q];o&&o.command&&o.command.callback&&window.setTimeout(c.hitch(this,function(){this._collectParameters(o.invocation)}),0)},getSelectionService:function(){return this._selection},setParameterCollector:function(q){this._parameterCollector=q},openParameterCollector:function(q,
o){if(this._parameterCollector){this._parameterCollector.close();this._parameterCollector.open(q,o)}},closeParameterCollector:function(){this._parameterCollector&&this._parameterCollector.close()},collectsParameters:function(){return this._parameterCollector},_collectParameters:function(q){var o=false;if(this._parameterCollector){q.parameters.updateParameters(q);o=q.parameters.hasParameters()?this._parameterCollector.collectParameters(q):false}if(!o&&q.parameters.hasParameters()){var t=new a.TooltipDialog({onBlur:function(){a.popup.close(t)}}),
u=c.create("div"),w=this._parameterCollector.getFillFunction(q,function(){a.popup.close(t)})(u);t.set("content",u);u=(u=a.byId(q.domParent.id))?c.position(u.eclipseScopeId,true):c.position(q.domNode,true);if(u.x&&u.y&&u.w){a.popup.open({popup:t,x:u.x+u.w-8,y:u.y+8});window.setTimeout(function(){w.focus();w.select()},0);o=true}}if(!o){q.parameters=null;q.command.callback.call(q.handler,q)}},showKeyBindings:function(q){for(var o in this._activeBindings)this._activeBindings[o]&&this._activeBindings[o].keyBinding&&
this._activeBindings[o].command&&c.place('<span role="listitem">'+d.getUserKeyString(this._activeBindings[o].keyBinding)+" = "+this._activeBindings[o].command.name+"<br></span>",q,"last")},addCommand:function(q,o){switch(o){case "dom":this._domScope[q.id]=q;break;case "object":this._objectScope[q.id]=q;break;case "global":this._globalScope[q.id]=q;break;default:throw"unrecognized command scope "+o;}},addCommandGroup:function(q,o,t,u,w){var x=this._namedGroups;if(u)x=this._createEntryForPath(u);if(x[q]){if(t)x[q].title=
t;if(o)x[q].position=o;if(w)x[q].scopeId=w}else{x[q]={title:t,position:o,children:{},scopeId:w};x.sortedCommands=null}},_createEntryForPath:function(q){var o=this._namedGroups;if(q){q=q.split("/");for(var t=0;t<q.length;t++)if(q[t].length>1){o[q[t]]||(o[q[t]]={position:0,children:{}});o=o[q[t]].children}}return o},registerCommandContribution:function(q,o,t,u,w,x,z){u=!t&&!u?this._ungrouped:this._createEntryForPath(u);u[q]={scopeId:t,position:o};if(x)if(o=this._domScope[q]||this._globalScope[q])this._activeBindings[q]=
{command:o,keyBinding:x,bindingOnly:w};if(z)if(o=this._domScope[q]||this._globalScope[q])this._urlBindings[q]={command:o,urlBinding:z,bindingOnly:w};u.sortedCommands=null},_isLastChildSeparator:function(q,o){if(o==="tool"||o==="button")return q.childNodes.length>0&&c.hasClass(q.childNodes[q.childNodes.length-1],"commandSeparator");if(o==="menu"){q=q.getChildren();return q.length>0&&q[q.length-1]instanceof a.MenuSeparator}return false},renderCommands:function(q,o,t,u,w,x,z,E,D){if(typeof q==="string")q=
c.byId(q);if(q){if(!q.id||q.id==="")window.console.log("renderCommands: "+o+","+w+">> WARNING: command parent must have an id")}else throw"no parent";if(t){var F;if(o==="object"){F=this._objectScope;this._render(this._ungrouped,q,o,t,u,w,x,z,F,E,D)}else if(o==="dom")F=this._domScope;else if(o==="global")F=this._globalScope;else throw"Unrecognized command scope "+o;this._render(this._namedGroups,q,o,t,u,w,x,z,F,E,D);if(w==="tool"||w==="button")this._isLastChildSeparator(q,w)&&q.removeChild(q.childNodes[q.childNodes.length-
1]);else if(w==="menu")if(this._isLastChildSeparator(q,w)){t=q.getChildren()[q.getChildren().length-1];q.removeChild(t);t.destroy()}if(o==="dom"||o==="global")d.forceLayout(q)}else{var I=this;this._selection&&this._selection.getSelections(function(L){I.renderCommands(q,o,L,u,w,x,z,E,D)})}},_render:function(q,o,t,u,w,x,z,E,D,F,I){var L=q.sortedCommands;if(!L){L=[];for(var G in q){var O=q[G];if(O&&typeof O.position==="number"){O.id=G;L.push(O)}}L.sort(function(X,v){return X.position-v.position});q.sortedCommands=
L}for(q=0;q<L.length;q++){var M,U;if(L[q].children){G=L[q];if(!(G.scopeId&&o.id!==G.scopeId)){var S;if(x==="tool"||x==="button")if(G.title){M=new a.Menu({style:"display: none;"});M.eclipseScopeId=o.eclipseScopeId||o.id;this._render(L[q].children,M,t,u,w,"menu",z,E,D,F);S=M.getChildren();if(this._isLastChildSeparator(M,"menu")){O=S[S.length-1];M.removeChild(O);O.destroy();S=M.getChildren()}if(S.length>0){O=S[0].eclipseCommand;if(S.length>1){M=new a.form.DropDownButton({label:G.title==="*"?"Actions":
G.title,showLabel:G.title!=="*",dropDown:M});c.addClass(M.domNode,"commandMenu");c.destroy(M.valueNode);if(G.title==="*"){c.addClass(M.domNode,"textless");new s({connectId:[M.domNode],label:"Actions menu",position:["above","left","right","below"],commandParent:o,commandService:this})}O._setupActivateVisuals(M.domNode,M.focusNode,F,I);c.place(M.domNode,o,"last")}else{M=x+O.id+q;U=new f(this,w,u,E,O);x==="button"?O._addButton(o,z,M,U,F,I):O._addTool(o,z,M,U,F,I)}}}else{var $;if(o.childNodes.length>
0&&!this._isLastChildSeparator(o,x))$=this.generateSeparatorImage(o);this._render(L[q].children,o,t,u,w,x,z,E,D,F,I);if(o.childNodes.length>0)if(o.childNodes[o.childNodes.length-1]!==$)$=this.generateSeparatorImage(o)}else if(G.title){O=new a.Menu;this._render(L[q].children,O,t,u,w,x,z,E,D,F,I);O.getChildren().length>0&&o.addChild(new a.PopupMenuItem({label:G.title,popup:O}))}else{var N;if(o.getChildren().length>0&&!this._isLastChildSeparator(o,x)){N=new a.MenuSeparator;o.addChild(N)}this._render(L[q].children,
o,t,u,w,x,z,E,D,F,I);G=o.getChildren();if(G[G.length-1]!==N){N=new a.MenuSeparator;o.addChild(N)}}}}else{O=(G=D[L[q].id])?true:false;S=S=null;if(G){if(t==="dom"||t==="global")O=x==="tool"||x==="button"?o.id===L[q].scopeId:x==="menu"?o.eclipseScopeId===L[q].scopeId:false;else if(t==="object")O=!L[q].scopeId;var T=O&&(t==="global"||t==="dom");U=new f(this,w,u,E,G);U.domParent=o;M=O&&(G.visibleWhen?G.visibleWhen(u):true);if(T&&this._activeBindings[G.id]&&this._activeBindings[G.id].keyBinding){S=this._activeBindings[G.id];
S.invocation=M?U:null;if(S.bindingOnly)O=false}if(T&&this._urlBindings[G.id]&&this._urlBindings[G.id].urlBinding){S=this._urlBindings[G.id];S.invocation=M?U:null;if(S.bindingOnly)O=false}O=O&&M}if(O)if(G.choiceCallback){O=new a.Menu({style:"display: none;"});if(x==="tool"||x==="button"){M=new a.form.DropDownButton({label:G.name,dropDown:O});if(G.image){c.addClass(M.iconNode,"commandImage");M.iconNode.src=G.image}c.place(M.domNode,o,"last");M.eclipseCommand=G;M.eclipseChoices=O;c.connect(M,"onClick",
M,function(){this.eclipseCommand.populateChoicesMenu(this.eclipseChoices,u,w,E)})}else if(x==="menu"){M=new a.PopupMenuItem({label:G.name,popup:O});o.addChild(M);M.eclipseCommand=G;M.eclipseChoices=O;c.connect(o,"_openPopup",M,function(){this.eclipseCommand.populateChoicesMenu(this.eclipseChoices,u,w,E)})}}else if(x==="tool"){M="tool"+G.id+q;G._addTool(o,z,M,U,F,I)}else if(x==="button"){M="button"+G.id+q;G._addButton(o,z,M,U,F,I)}else x==="menu"&&G._addMenuItem(o,U,F,I)}}},whenHidden:function(q,o){q=
typeof q==="string"?q:q.id;if(!this.hidden)this.hidden={};if(this.hidden[q])this.hidden[q].push(o);else this.hidden[q]=[o]},generateSeparatorImage:function(q){q=c.create("span",null,q,"last");c.addClass(q,"core-sprite-sep");c.addClass(q,"imageSprite");c.addClass(q,"commandSeparator");return q}};g.prototype.constructor=g;j.prototype={_init:function(q){this.id=q.id;this.name=q.name;this.tooltip=q.tooltip||q.name;this.callback=q.callback;this.hrefCallback=q.hrefCallback;this.choiceCallback=q.choiceCallback;
this.image=q.image||b.toUrl("images/none.png");this.imageClass=q.imageClass;this.spriteClass=q.spriteClass||"commandSprite";this.visibleWhen=q.visibleWhen;this.parameters=q.parameters},_addTool:function(q,o,t,u,w,x){u.handler=u.handler||this;var z,E;if(this.hrefCallback){z=this._makeLink(u);if(!z)return}else{z=c.create("span",{tabindex:"0",role:"button"});if(o||!this.hasImage()){o=window.document.createTextNode(this.name);c.place(o,z,"last");c.addClass(z,"commandMissingImageButton commandButton")}else{E=
h(this,z,t);this._addAccessibleLabel(z)}this._hookCallback(z,u);this._setupActivateVisuals(z,z,w,x,E?"commandImageOver":"commandButtonOver")}u.domNode=z;u.domParent=q;this.tooltip&&new s({connectId:[z],label:this.tooltip,position:["above","left","right","below"],commandParent:q,commandService:u.commandService});c.place(z,q,"last")},_addButton:function(q,o,t,u,w,x){u.handler=u.handler||this;if(this.hrefCallback){o=this._makeLink(u);if(!o)return}else{o=c.create("span",{tabindex:"0",role:"button"});
this._hookCallback(o,u);var z;if(this.name){c.place(window.document.createTextNode(this.name),o,"last");c.addClass(o,"commandButton");z="commandButtonOver"}else{h(this,o,t);z="commandImageOver";this._addAccessibleLabel(o)}this._setupActivateVisuals(o,o,w,x,z)}o.id=t;this.tooltip&&new s({connectId:[o],label:this.tooltip,position:["above","left","right","below"],commandParent:q,commandService:u.commandService});u.domParent=q;u.domNode=o;c.place(o,q,"last")},_addMenuItem:function(q,o){o.domParent=q.domNode;
var t=new r({labelType:this.hrefCallback?"html":"text",label:this.name,iconClass:this.imageClass,hrefCallback:!!this.hrefCallback});this.tooltip&&new s({connectId:[t.domNode],label:this.tooltip,commandParent:q,commandService:o.commandService});if(this.hrefCallback){var u=this.hrefCallback.call(o.handler,o);if(u)if(u.then)u.then(c.hitch(this,function(w){t.set("label","<a href='"+w+"'>"+this.name+"</a>")}));else if(u)t.set("label","<a href='"+u+"'>"+this.name+"</a>");else return}else if(this.callback)t.onClick=
this.parameters&&o.collectsParameters()?c.hitch(this,function(){o.commandService._collectParameters(o)}):c.hitch(this,function(){this.callback.call(o.handler,o)});t.eclipseCommand=this;q.addChild(t);if(this.imageClass)c.addClass(t.iconNode,this.spriteClass);else if(this.image){c.addClass(t.iconNode,"commandMenuItem");t.iconNode.src=this.image}o.domNode=t.domNode},_makeLink:function(q){var o=c.create("a",{tabindex:"0"});c.addClass(o,"commandLink");c.place(window.document.createTextNode(this.name),
o,"last");q=this.hrefCallback.call(q.handler,q);if(q.then)q.then(function(t){o.href=t});else if(q)o.href=q;else return null;return o},_hookCallback:function(q,o){c.connect(q,"onclick",this,function(){if(this.parameters&&o.collectsParameters())o.commandService._collectParameters(o);else this.callback&&this.callback.call(o.handler,o)});c.connect(q,"onkeypress",this,function(t){if(t.keyCode===c.keys.ENTER||t.keyCode===c.keys.SPACE)if(this.parameters&&o.collectsParameters())o.commandService._collectParameters(o);
else this.callback&&this.callback.call(o.handler,o)})},_addAccessibleLabel:function(q){var o=this.name||this.tooltip;o&&c.attr(q,"aria-label",o)},_setupActivateVisuals:function(q,o,t,u,w){u&&c.addClass(q,u);var x=function(){w&&c.addClass(this,w);t&&c.addClass(this,t);u&&c.removeClass(this,u)},z=function(){w&&c.removeClass(this,w);t&&c.removeClass(this,t);u&&c.addClass(this,u)};c.connect(q,"onmouseover",q,x);c.connect(o,"onfocus",q,x);c.connect(q,"onmouseout",q,z);c.connect(o,"onblur",q,z)},populateChoicesMenu:function(q,
o,t,u){q.focusedChild=null;c.forEach(q.getChildren(),function(z){q.removeChild(z);z.destroy()});t=this.getChoices(o,t,u);for(u=0;u<t.length;u++){var w=t[u],x;if(w.name){x=new a.MenuItem({label:w.name,iconClass:w.imageClass,onClick:this.makeChoiceCallback(w,o)});if(w.imageClass)c.addClass(x.iconNode,w.spriteClass||"commandSprite");else if(w.image){c.addClass(x.iconNode,"commandImage");x.iconNode.src=w.image}}else x=new a.MenuSeparator;q.addChild(x)}},getChoices:function(q,o,t){if(this.choiceCallback)return this.choiceCallback.call(o,
q,t);return null},makeChoiceCallback:function(q,o){return function(t){q.callback&&q.callback.call(q,o,t)}},hasImage:function(){return this.imageClass||this.image!==b.toUrl("images/none.png")}};j.prototype.constructor=j;var p=window.navigator.platform.indexOf("Mac")!==-1;k.prototype={match:function(q){if(this.keyCode===q.keyCode){if(this.mod1!==(p?q.metaKey:q.ctrlKey))return false;if(this.mod2!==q.shiftKey)return false;if(this.mod3!==q.altKey)return false;if(p&&this.mod4!==q.ctrlKey)return false;return true}return false},
equals:function(q){if(!q)return false;if(this.keyCode!==q.keyCode)return false;if(this.mod1!==q.mod1)return false;if(this.mod2!==q.mod2)return false;if(this.mod3!==q.mod3)return false;if(this.mod4!==q.mod4)return false;return true}};k.prototype.constructor=k;l.prototype={match:function(q){q=e.matchResourceParameters(q);if(typeof q[this.token]!=="undefined"){this.parameterValue=q[this.token];return this}return null}};l.prototype.constructor=l;m.prototype={optionsRequested:function(){return this.optionsRequested}};
m.prototype.constructor=m;n.prototype={_storeParameters:function(q){this.parameterTable=null;if(q){this.parameterTable={};for(var o=0;o<q.length;o++)this.parameterTable[q[o].name]=q[o]}},updateParameters:function(q){typeof this.getParameters==="function"&&this._storeParameters(this.getParameters(q))},hasParameters:function(){return this.parameterTable!==null},parameterNamed:function(q){return this.parameterTable[q]},valueFor:function(q){if(q=this.parameterTable[q])return q.value;return null},setValue:function(q,
o){if(q=this.parameterTable[q])q.value=o},forEach:function(q){for(var o in this.parameterTable)this.parameterTable[o].type&&this.parameterTable[o].name&&q(this.parameterTable[o])},makeCopy:function(){var q=[];this.forEach(function(o){o=new m(o.name,o.type,o.label,o.value);q.push(o)});return new n(q,this.options,this.getParameters)}};n.prototype.constructor=n;return{CommandService:g,CommandKeyBinding:k,Command:j,CommandInvocation:f,CommandMenuItem:r,URLBinding:l,ParametersDescription:n,CommandParameter:m,
CommandTooltip:s}});
define("orion/parameterCollectors",["require","dojo","dijit","orion/commands","orion/util","dijit/Menu","dijit/MenuItem","dijit/form/DropDownButton"],function(b,c,a,d,e){function f(){this._activeContainer=null}f.prototype={close:function(){if(this._activeElements){this._activeElements.parameterArea&&c.empty(this._activeElements.parameterArea);if(this._activeElements.parameterContainer){c.removeClass(this._activeElements.parameterContainer,"slideActive");c.removeClass(this._activeElements.slideContainer,"slideContainerActive")}this._activeElements.dismissArea&&
c.empty(this._activeElements.dismissArea);this._activeElements.commandNode&&c.removeClass(this._activeElements.commandNode,"activeCommand");e.forceLayout(this._activeElements.parameterContainer);if(this._oldFocusNode){this._oldFocusNode.focus();this._oldFocusNode=null}}this._activeElements=null},_findParameterElements:function(g){var h={},j=null;if(typeof g==="string")g=c.byId(g);for(var k=g;k;){if(c.hasClass(k,"toolComposite")){j=k;break}k=k.parentNode}if(c.hasClass(g,"commandMarker"))h.commandNode=
g;if(j){h.slideContainer=c.query(".slideParameters",j)[0];h.parameterContainer=c.query(".slide",j)[0];h.parameterArea=c.query(".parameters",j)[0];h.dismissArea=c.query(".parametersDismiss",j)[0]}return h},open:function(g,h){if(typeof g==="string")g=c.byId(g);this.close();this._activeElements=null;if((this._activeElements=this._findParameterElements(g))&&this._activeElements.parameterArea&&this._activeElements.slideContainer&&this._activeElements.parameterContainer){var j=h(this._activeElements.parameterArea);
g=c.query("#closebox",this._activeElements.parameterArea);if(g.length===0){g=c.create("span",{id:"closebox",role:"button",tabindex:"0"},this._activeElements.dismissArea||this._activeElements.parameterArea,"last");c.addClass(g,"imageSprite");c.addClass(g,"core-sprite-close");c.addClass(g,"dismiss");g.title="Close";c.connect(g,"onclick",c.hitch(this,function(){this.close(this._activeElements)}));c.connect(g,"onkeypress",c.hitch(this,function(k){k.keyCode===c.keys.ENTER&&this.close(this._activeElements)}))}c.addClass(this._activeElements.slideContainer,
"slideContainerActive");c.addClass(this._activeElements.parameterContainer,"slideActive");e.forceLayout(this._activeElements.parameterContainer);if(j){this._oldFocusNode=window.document.activeElement;window.setTimeout(function(){j.focus();j.select()},0)}this._activeElements.commandNode&&c.addClass(this._activeElements.commandNode,"activeCommand");return true}return false},_collectAndCall:function(g,h){c.query("input",h).forEach(function(j){j.type!=="button"&&g.parameters.setValue(j.parameterName,
j.value)});g.command.callback&&g.command.callback.call(g.handler,g)},collectParameters:function(g){if(g.parameters){g.domNode&&c.addClass(g.domNode,"commandMarker");return this.open(g.domNode||g.domParent,this.getFillFunction(g))}return false},getFillFunction:function(g,h){return c.hitch(this,function(j){var k=null,l=c.hitch(this,function(){h?h():this.close(g.domNode)}),m=c.hitch(this,function(s){s.keyCode===c.keys.ENTER&&this._collectAndCall(g,j);if(s.keyCode===c.keys.ESCAPE||s.keyCode===c.keys.ENTER){l();
c.stopEvent(s)}});g.parameters.forEach(function(s){s.label&&c.place(document.createTextNode(s.label),j,"last");var p=c.create("input",{type:s.type},j,"last");c.addClass(p,"parameterInput");c.addClass(p,"parameterInput"+s.type);p.setAttribute("speech","speech");p.setAttribute("x-webkit-speech","x-webkit-speech");p.parameterName=s.name;k||(k=p);if(s.value)p.value=s.value;c.connect(p,"onkeypress",m)});var n=function(s){s._collectAndCall(g,j);l()};if(g.parameters.options){g.parameters.optionsRequested=
false;var r=c.create("span",{role:"button",tabindex:"0"},j,"last");c.place(window.document.createTextNode("More"),r,"last");c.addClass(r,"dismiss");c.connect(r,"onclick",c.hitch(this,function(){g.parameters.optionsRequested=true;n(this)}));c.connect(r,"onkeypress",c.hitch(this,function(s){if(s.keyCode===c.keys.ENTER){g.parameters.optionsRequested=true;n(this)}}))}spacer=c.create("span",null,j,"last");c.addClass(spacer,"dismiss");r=c.create("span",{role:"button",tabindex:"0"},j,"last");c.place(window.document.createTextNode("Submit"),
r,"last");c.addClass(r,"dismiss");c.connect(r,"onclick",c.hitch(this,function(){n(this)}));c.connect(r,"onkeypress",c.hitch(this,function(s){s.keyCode===c.keys.ENTER&&n(this)}));spacer=c.create("span",null,j,"last");c.addClass(spacer,"dismiss");r=c.create("span",{id:"closebox",role:"button",tabindex:"0"},j,"last");c.addClass(r,"imageSprite");c.addClass(r,"core-sprite-close");c.addClass(r,"dismiss");r.title="Close";c.connect(r,"onclick",c.hitch(this,function(){l()}));c.connect(r,"onkeypress",c.hitch(this,
function(s){s.keyCode===c.keys.ENTER&&l()}));return k})}};f.prototype.constructor=f;return{CommandParameterCollector:f}});define("orion/editor/regex",[],function(){function b(a){return a.replace(/([\\$\^*\/+?\.\(\)|{}\[\]])/g,"\\$&")}function c(a){if(a=/^\s*\/(.+)\/([gim]{0,3})\s*$/.exec(a))return{pattern:a[1],flags:a[2]};return null}return{escape:b,parse:c}});
define("orion/contentTypes",[],function(){function b(a){function d(k,l,m,n){m=l.filename.indexOf(m)>=0;var r=l.extension.indexOf(n)>=0;if(m||r)if(!k||m&&k.extension.indexOf(n)>=0)return l;return k}for(var e=a&&a.split(".").pop(),f=this.getContentTypes(),g=null,h=0;h<f.length;h++){var j=f[h];if(d(g,j,a,e)===j)g=j}return g}function c(a){function d(e){function f(m){if(m===null||typeof m==="undefined")return[];return m instanceof Array?m:[m]}e=e.getServiceReferences("orion.file.contenttype");for(var g=
{},h=0;h<e.length;h++)for(var j=f(e[h].getProperty("contentTypes")),k=0;k<j.length;k++){var l=j[k];g[l.id]||(g[l.id]={id:l.id,name:l.name,image:l.image,"extends":l["extends"],extension:f(l.extension),filename:f(l.filename)})}return g}this.serviceRegistry=a;this.map=d(a);a.registerService("orion.file.contenttypes",this)}c.prototype={getContentTypes:function(){var a=this.getContentTypesMap(),d=[];for(var e in a)a.hasOwnProperty(e)&&d.push(a[e]);return d},getContentTypesMap:function(){return this.map},
getFileContentType:function(a){return b.call(this,a.Name)},getFilenameContentType:function(a){return b.call(this,a)},getContentType:function(a){return this.map[a]||null},isExtensionOf:function(a,d){a=typeof a==="string"?this.getContentType(a):a;d=typeof d==="string"?this.getContentType(d):d;if(!a||!d)return false;if(a.id===d.id)return true;else{a=a;for(var e={};a&&(a=this.getContentType(a["extends"]));){if(a.id===d.id)return true;if(e[a.id])throw new Error("Cycle: "+a.id);e[a.id]=true}}return false},
isSomeExtensionOf:function(a,d){for(var e=0;e<d.length;e++)if(this.isExtensionOf(a,d[e]))return true;return false}};return{ContentTypeService:c}});
define("orion/URITemplate",["require","exports","module"],function(){function b(l){this._text=l}function c(l,m){if(m==="U")return encodeURIComponent(l).replace(/[!'()*]/g,function(n){return"%"+n.charCodeAt(0).toString(16).toUpperCase()});if(m==="U+R")return encodeURI(l).replace(/%5B/g,"[").replace(/%5D/g,"]");if(m==="U+R-,")return encodeURI(l).replace(/%5B/g,"[").replace(/%5D/g,"]").replace(/,/g,"%2C");throw new Error("Unknown allowed character set: "+m);}function a(l,m,n){for(var r=[],s=0;s<l.length;s++)typeof l[s]!==
"undefined"&&r.push(c(l[s],m));return r.join(n)}function d(l,m,n,r){for(var s=Object.keys(l),p=[],q=0;q<s.length;q++)typeof l[s[q]]!=="undefined"&&p.push(c(s[q],m)+n+c(l[s[q]],m));return p.join(r)}function e(l){for(var m=[],n=l.split(","),r=0;r<n.length;r++){var s=n[r].match(k);if(s===null)throw new Error("Bad VarSpec: "+l);m.push({name:s[1],explode:!!s[2],prefix:s[3]?parseInt(s[3],10):-1})}return m}function f(l){if(l.length===0)throw new Error("Invalid Expression: 0 length expression");if(this._operator=
j[l[0]])l=l.substring(1);else this._operator=j.NUL;this._varSpecList=e(l)}function g(l){for(var m=[],n=0,r=l.indexOf("{",n);r!==-1;){m.push(new b(l.substring(n,r)));n=l.indexOf("}",r+1);if(n===-1)throw new Error("Invalid template: "+l);m.push(new f(l.substring(r+1,n)));n=n+1;r=l.indexOf("{",n)}m.push(new b(l.substring(n)));return m}function h(l){this._templateComponents=g(l)}var j={NUL:{first:"",sep:",",named:false,ifemp:"",allow:"U"},"+":{first:"",sep:",",named:false,ifemp:"",allow:"U+R"},".":{first:".",
sep:",",named:false,ifemp:"",allow:"U"},"/":{first:"/",sep:"/",named:false,ifemp:"",allow:"U"},";":{first:";",sep:";",named:true,ifemp:"",allow:"U"},"?":{first:"?",sep:"&",named:true,ifemp:"=",allow:"U"},"&":{first:"&",sep:"&",named:true,ifemp:"=",allow:"U"},"#":{first:"#",sep:",",named:false,ifemp:"",allow:"U+R"},",":{first:"",sep:",",named:false,ifemp:"",allow:"U+R-,"}},k=/^((?:(?:[a-zA-Z0-9_])|(?:%[0-9A-F][0-9A-F]))(?:(?:[a-zA-Z0-9_.])|(?:%[0-9A-F][0-9A-F]))*)(?:(\*)|:([0-9]+))?$/;b.prototype=
{expand:function(){return encodeURI(this._text)}};f.prototype={expand:function(l){for(var m=[],n=0;n<this._varSpecList.length;n++){var r=this._varSpecList[n],s=r.name,p=l[s],q=typeof p;if(q!=="undefined"&&p!==null){var o=m.length===0?this._operator.first:this._operator.sep;if(q==="string"){if(this._operator.named){o+=c(s,"U+R");o+=p.length===0?this._operator.ifemp:"="}if(r.prefix!==-1&&r.prefix<p.length)p=p.substring(0,r.prefix);o+=c(p,this._operator.allow)}else if(Array.isArray(p))if(r.explode)o+=
a(p,this._operator.allow,this._operator.sep);else{if(this._operator.named){o+=c(s,"U+R");o+=p.length===0?this._operator.ifemp:"="}o+=a(p,this._operator.allow,",")}else if(q==="object")if(r.explode)o+=d(p,this._operator.allow,"=",this._operator.sep);else{if(this._operator.named){o+=c(s,"U+R");o+=Object.keys(p).length===0?this._operator.ifemp:"="}o+=d(p,this._operator.allow,",",",")}else throw new Error("bad param type: "+s+" : "+q);m.push(o)}}return m.join("")}};h.prototype={expand:function(l){for(var m=
[],n=0;n<this._templateComponents.length;n++)m.push(this._templateComponents[n].expand(l));return m.join("")}};return h});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(b){b.getObject("dnd",true,b);b.dnd.getCopyKeyState=b.isCopyKey;b.dnd._uniqueId=0;b.dnd.getUniqueId=function(){var c;do c=b._scopeName+"Unique"+ ++b.dnd._uniqueId;while(b.byId(c));return c};b.dnd._empty={};b.dnd.isFormElement=function(c){c=c.target;if(c.nodeType==3)c=c.parentNode;return" button textarea input select option ".indexOf(" "+c.tagName.toLowerCase()+" ")>=0};return b.dnd});
define("dojo/dnd/autoscroll",["dojo","dojo/window"],function(b){b.getObject("dnd",true,b);b.dnd.getViewport=b.window.getBox;b.dnd.V_TRIGGER_AUTOSCROLL=32;b.dnd.H_TRIGGER_AUTOSCROLL=32;b.dnd.V_AUTOSCROLL_VALUE=16;b.dnd.H_AUTOSCROLL_VALUE=16;b.dnd.autoScroll=function(c){var a=b.window.getBox(),d=0,e=0;if(c.clientX<b.dnd.H_TRIGGER_AUTOSCROLL)d=-b.dnd.H_AUTOSCROLL_VALUE;else if(c.clientX>a.w-b.dnd.H_TRIGGER_AUTOSCROLL)d=b.dnd.H_AUTOSCROLL_VALUE;if(c.clientY<b.dnd.V_TRIGGER_AUTOSCROLL)e=-b.dnd.V_AUTOSCROLL_VALUE;
else if(c.clientY>a.h-b.dnd.V_TRIGGER_AUTOSCROLL)e=b.dnd.V_AUTOSCROLL_VALUE;window.scrollBy(d,e)};b.dnd._validNodes={div:1,p:1,td:1};b.dnd._validOverflow={auto:1,scroll:1};b.dnd.autoScrollNodes=function(c){for(var a=c.target;a;){if(a.nodeType==1&&a.tagName.toLowerCase()in b.dnd._validNodes){var d=b.getComputedStyle(a);if(d.overflow.toLowerCase()in b.dnd._validOverflow){var e=b._getContentBox(a,d);d=b.position(a,true);var f=Math.min(b.dnd.H_TRIGGER_AUTOSCROLL,e.w/2),g=Math.min(b.dnd.V_TRIGGER_AUTOSCROLL,
e.h/2),h=c.pageX-d.x,j=c.pageY-d.y,k=d=0;if(b.isWebKit||b.isOpera){h+=b.body().scrollLeft;j+=b.body().scrollTop}if(h>0&&h<e.w)if(h<f)d=-f;else if(h>e.w-f)d=f;if(j>0&&j<e.h)if(j<g)k=-g;else if(j>e.h-g)k=g;e=a.scrollLeft;f=a.scrollTop;a.scrollLeft+=d;a.scrollTop+=k;if(e!=a.scrollLeft||f!=a.scrollTop)return}}try{a=a.parentNode}catch(l){a=null}}b.dnd.autoScroll(c)};return b.dnd});
define("dojo/dnd/Mover",["dojo","dojo/dnd/common","dojo/dnd/autoscroll"],function(b){b.declare("dojo.dnd.Mover",null,{constructor:function(c,a,d){this.node=b.byId(c);var e=a.touches?a.touches[0]:a;this.marginBox={l:e.pageX,t:e.pageY};this.mouseButton=a.button;a=this.host=d;c=c.ownerDocument;this.events=[b.connect(c,"onmousemove",this,"onFirstMove"),b.connect(c,"ontouchmove",this,"onFirstMove"),b.connect(c,"onmousemove",this,"onMouseMove"),b.connect(c,"ontouchmove",this,"onMouseMove"),b.connect(c,
"onmouseup",this,"onMouseUp"),b.connect(c,"ontouchend",this,"onMouseUp"),b.connect(c,"ondragstart",b.stopEvent),b.connect(c.body,"onselectstart",b.stopEvent)];a&&a.onMoveStart&&a.onMoveStart(this)},onMouseMove:function(c){b.dnd.autoScroll(c);var a=this.marginBox,d=c.touches?c.touches[0]:c;this.host.onMove(this,{l:a.l+d.pageX,t:a.t+d.pageY},c);b.stopEvent(c)},onMouseUp:function(c){if(b.isWebKit&&b.isMac&&this.mouseButton==2?c.button==0:this.mouseButton==c.button)this.destroy();b.stopEvent(c)},onFirstMove:function(c){var a=
this.node.style,d,e=this.host;switch(a.position){case "relative":case "absolute":d=Math.round(parseFloat(a.left))||0;a=Math.round(parseFloat(a.top))||0;break;default:a.position="absolute";a=b.marginBox(this.node);d=b.doc.body;var f=b.getComputedStyle(d),g=b._getMarginBox(d,f);f=b._getContentBox(d,f);d=a.l-(f.l-g.l);a=a.t-(f.t-g.t);break}this.marginBox.l=d-this.marginBox.l;this.marginBox.t=a-this.marginBox.t;e&&e.onFirstMove&&e.onFirstMove(this,c);b.disconnect(this.events.shift());b.disconnect(this.events.shift())},
destroy:function(){b.forEach(this.events,b.disconnect);var c=this.host;c&&c.onMoveStop&&c.onMoveStop(this);this.events=this.node=this.host=null}});return b.dnd.Mover});
define("dojo/dnd/Moveable",["dojo","dojo/dnd/Mover"],function(b){b.declare("dojo.dnd.Moveable",null,{handle:"",delay:0,skip:false,constructor:function(c,a){this.node=b.byId(c);a||(a={});this.handle=a.handle?b.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:b.dnd.Mover;this.events=[b.connect(this.handle,"onmousedown",this,"onMouseDown"),b.connect(this.handle,"ontouchstart",this,"onMouseDown"),b.connect(this.handle,
"ondragstart",this,"onSelectStart"),b.connect(this.handle,"onselectstart",this,"onSelectStart")]},markupFactory:function(c,a){return new b.dnd.Moveable(a,c)},destroy:function(){b.forEach(this.events,b.disconnect);this.events=this.node=this.handle=null},onMouseDown:function(c){if(!(this.skip&&b.dnd.isFormElement(c))){if(this.delay){this.events.push(b.connect(this.handle,"onmousemove",this,"onMouseMove"),b.connect(this.handle,"ontouchmove",this,"onMouseMove"),b.connect(this.handle,"onmouseup",this,
"onMouseUp"),b.connect(this.handle,"ontouchend",this,"onMouseUp"));var a=c.touches?c.touches[0]:c;this._lastX=a.pageX;this._lastY=a.pageY}else this.onDragDetected(c);b.stopEvent(c)}},onMouseMove:function(c){var a=c.touches?c.touches[0]:c;if(Math.abs(a.pageX-this._lastX)>this.delay||Math.abs(a.pageY-this._lastY)>this.delay){this.onMouseUp(c);this.onDragDetected(c)}b.stopEvent(c)},onMouseUp:function(c){for(var a=0;a<2;++a)b.disconnect(this.events.pop());b.stopEvent(c)},onSelectStart:function(c){if(!this.skip||
!b.dnd.isFormElement(c))b.stopEvent(c)},onDragDetected:function(c){new this.mover(this.node,c,this)},onMoveStart:function(c){b.publish("/dnd/move/start",[c]);b.addClass(b.body(),"dojoMove");b.addClass(this.node,"dojoMoveItem")},onMoveStop:function(c){b.publish("/dnd/move/stop",[c]);b.removeClass(b.body(),"dojoMove");b.removeClass(this.node,"dojoMoveItem")},onFirstMove:function(){},onMove:function(c,a){this.onMoving(c,a);var d=c.node.style;d.left=a.l+"px";d.top=a.t+"px";this.onMoved(c,a)},onMoving:function(){},
onMoved:function(){}});return b.dnd.Moveable});
define("dojo/dnd/move",["dojo","dojo/dnd/Mover","dojo/dnd/Moveable"],function(b){b.declare("dojo.dnd.move.constrainedMoveable",b.dnd.Moveable,{constraints:function(){},within:false,markupFactory:function(c,a){return new b.dnd.move.constrainedMoveable(a,c)},constructor:function(c,a){a||(a={});this.constraints=a.constraints;this.within=a.within},onFirstMove:function(c){var a=this.constraintBox=this.constraints.call(this,c);a.r=a.l+a.w;a.b=a.t+a.h;if(this.within){c=b._getMarginSize(c.node);a.r-=c.w;
a.b-=c.h}},onMove:function(c,a){var d=this.constraintBox,e=c.node.style;this.onMoving(c,a);a.l=a.l<d.l?d.l:d.r<a.l?d.r:a.l;a.t=a.t<d.t?d.t:d.b<a.t?d.b:a.t;e.left=a.l+"px";e.top=a.t+"px";this.onMoved(c,a)}});b.declare("dojo.dnd.move.boxConstrainedMoveable",b.dnd.move.constrainedMoveable,{box:{},markupFactory:function(c,a){return new b.dnd.move.boxConstrainedMoveable(a,c)},constructor:function(c,a){var d=a&&a.box;this.constraints=function(){return d}}});b.declare("dojo.dnd.move.parentConstrainedMoveable",
b.dnd.move.constrainedMoveable,{area:"content",markupFactory:function(c,a){return new b.dnd.move.parentConstrainedMoveable(a,c)},constructor:function(c,a){var d=a&&a.area;this.constraints=function(){var e=this.node.parentNode,f=b.getComputedStyle(e),g=b._getMarginBox(e,f);if(d=="margin")return g;var h=b._getMarginExtents(e,f);g.l+=h.l;g.t+=h.t;g.w-=h.w;g.h-=h.h;if(d=="border")return g;h=b._getBorderExtents(e,f);g.l+=h.l;g.t+=h.t;g.w-=h.w;g.h-=h.h;if(d=="padding")return g;h=b._getPadExtents(e,f);g.l+=
h.l;g.t+=h.t;g.w-=h.w;g.h-=h.h;return g}}});b.dnd.constrainedMover=b.dnd.move.constrainedMover;b.dnd.boxConstrainedMover=b.dnd.move.boxConstrainedMover;b.dnd.parentConstrainedMover=b.dnd.move.parentConstrainedMover;return b.dnd.move});
define("dojo/dnd/TimedMoveable",["dojo","dojo/dnd/Moveable"],function(b){(function(){var c=b.dnd.Moveable.prototype.onMove;b.declare("dojo.dnd.TimedMoveable",b.dnd.Moveable,{timeout:40,constructor:function(a,d){d||(d={});if(d.timeout&&typeof d.timeout=="number"&&d.timeout>=0)this.timeout=d.timeout},markupFactory:function(a,d){return new b.dnd.TimedMoveable(d,a)},onMoveStop:function(a){if(a._timer){clearTimeout(a._timer);c.call(this,a,a._leftTop)}b.dnd.Moveable.prototype.onMoveStop.apply(this,arguments)},
onMove:function(a,d){a._leftTop=d;if(!a._timer){var e=this;a._timer=setTimeout(function(){a._timer=null;c.call(e,a,a._leftTop)},this.timeout)}}})})();return b.dnd.TimedMoveable});
define("dojo/fx/Toggler",["dojo"],function(b){b.declare("dojo.fx.Toggler",null,{node:null,showFunc:b.fadeIn,hideFunc:b.fadeOut,showDuration:200,hideDuration:200,constructor:function(c){var a=this;b.mixin(a,c);a.node=c.node;a._showArgs=b.mixin({},c);a._showArgs.node=a.node;a._showArgs.duration=a.showDuration;a.showAnim=a.showFunc(a._showArgs);a._hideArgs=b.mixin({},c);a._hideArgs.node=a.node;a._hideArgs.duration=a.hideDuration;a.hideAnim=a.hideFunc(a._hideArgs);b.connect(a.showAnim,"beforeBegin",b.hitch(a.hideAnim,
"stop",true));b.connect(a.hideAnim,"beforeBegin",b.hitch(a.showAnim,"stop",true))},show:function(c){return this.showAnim.play(c||0)},hide:function(c){return this.hideAnim.play(c||0)}});return b.fx.Toggler});
define("dojo/fx",["dojo","dojo/fx/Toggler"],function(b){(function(){var c={_fire:function(e,f){if(this[e])this[e].apply(this,f||[]);return this}},a=function(e){this._index=-1;this._animations=e||[];this._current=this._onAnimateCtx=this._onEndCtx=null;this.duration=0;b.forEach(this._animations,function(f){this.duration+=f.duration;if(f.delay)this.duration+=f.delay},this)};b.extend(a,{_onAnimate:function(){this._fire("onAnimate",arguments)},_onEnd:function(){b.disconnect(this._onAnimateCtx);b.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=b.connect(this._current,"onAnimate",this,"_onAnimate");this._onEndCtx=b.connect(this._current,"onEnd",this,"_onEnd");this._current.play(0,true)}},play:function(e,f){if(!this._current)this._current=this._animations[this._index=0];if(!f&&this._current.status()=="playing")return this;var g=b.connect(this._current,"beforeBegin",this,
function(){this._fire("beforeBegin")}),h=b.connect(this._current,"onBegin",this,function(){this._fire("onBegin",arguments)}),j=b.connect(this._current,"onPlay",this,function(){this._fire("onPlay",arguments);b.disconnect(g);b.disconnect(h);b.disconnect(j)});this._onAnimateCtx&&b.disconnect(this._onAnimateCtx);this._onAnimateCtx=b.connect(this._current,"onAnimate",this,"_onAnimate");this._onEndCtx&&b.disconnect(this._onEndCtx);this._onEndCtx=b.connect(this._current,"onEnd",this,"_onEnd");this._current.play.apply(this._current,
arguments);return this},pause:function(){if(this._current){var e=b.connect(this._current,"onPause",this,function(){this._fire("onPause",arguments);b.disconnect(e)});this._current.pause()}return this},gotoPercent:function(e,f){this.pause();var g=this.duration*e;this._current=null;b.some(this._animations,function(h){if(h.duration<=g){this._current=h;return true}g-=h.duration;return false});this._current&&this._current.gotoPercent(g/this._current.duration,f);return this},stop:function(e){if(this._current){if(e){for(;this._index+
1<this._animations.length;++this._index)this._animations[this._index].stop(true);this._current=this._animations[this._index]}var f=b.connect(this._current,"onStop",this,function(){this._fire("onStop",arguments);b.disconnect(f)});this._current.stop()}return this},status:function(){return this._current?this._current.status():"stopped"},destroy:function(){this._onAnimateCtx&&b.disconnect(this._onAnimateCtx);this._onEndCtx&&b.disconnect(this._onEndCtx)}});b.extend(a,c);b.fx.chain=function(e){return new a(e)};
var d=function(e){this._animations=e||[];this._connects=[];this.duration=this._finished=0;b.forEach(e,function(g){var h=g.duration;if(g.delay)h+=g.delay;if(this.duration<h)this.duration=h;this._connects.push(b.connect(g,"onEnd",this,"_onEnd"))},this);this._pseudoAnimation=new b.Animation({curve:[0,1],duration:this.duration});var f=this;b.forEach(["beforeBegin","onBegin","onPlay","onAnimate","onPause","onStop","onEnd"],function(g){f._connects.push(b.connect(f._pseudoAnimation,g,function(){f._fire(g,
arguments)}))})};b.extend(d,{_doAction:function(e,f){b.forEach(this._animations,function(g){g[e].apply(g,f)});return this},_onEnd:function(){++this._finished>this._animations.length&&this._fire("onEnd")},_call:function(e,f){var g=this._pseudoAnimation;g[e].apply(g,f)},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(e,f){var g=
this.duration*e;b.forEach(this._animations,function(h){h.gotoPercent(h.duration<g?1:g/h.duration,f)});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(){b.forEach(this._connects,b.disconnect)}});b.extend(d,c);b.fx.combine=function(e){return new d(e)};b.fx.wipeIn=function(e){var f=e.node=b.byId(e.node),g=f.style,h;e=b.animateProperty(b.mixin({properties:{height:{start:function(){h=
g.overflow;g.overflow="hidden";if(g.visibility=="hidden"||g.display=="none"){g.height="1px";g.display="";g.visibility="";return 1}else{var j=b.style(f,"height");return Math.max(j,1)}},end:function(){return f.scrollHeight}}}},e));b.connect(e,"onEnd",function(){g.height="auto";g.overflow=h});return e};b.fx.wipeOut=function(e){var f=(e.node=b.byId(e.node)).style,g;e=b.animateProperty(b.mixin({properties:{height:{end:1}}},e));b.connect(e,"beforeBegin",function(){g=f.overflow;f.overflow="hidden";f.display=
""});b.connect(e,"onEnd",function(){f.overflow=g;f.height="auto";f.display="none"});return e};b.fx.slideTo=function(e){var f=null,g=null,h=function(j){return function(){var k=b.getComputedStyle(j),l=k.position;f=l=="absolute"?j.offsetTop:parseInt(k.top)||0;g=l=="absolute"?j.offsetLeft:parseInt(k.left)||0;if(l!="absolute"&&l!="relative"){k=b.position(j,true);f=k.y;g=k.x;j.style.position="absolute";j.style.top=f+"px";j.style.left=g+"px"}}}(e.node=b.byId(e.node));h();e=b.animateProperty(b.mixin({properties:{top:e.top||
0,left:e.left||0}},e));b.connect(e,"beforeBegin",e,h);return e}})();return b.fx});
define("dijit/DialogUnderlay",["dojo","dijit","dojo/window","dijit/_Widget","dijit/_Templated"],function(b,c){b.declare("dijit.DialogUnderlay",[c._Widget,c._Templated],{templateString:"<div class='dijitDialogUnderlayWrapper'><div class='dijitDialogUnderlay' dojoAttachPoint='node'></div></div>",dialogId:"","class":"",attributeMap:{id:"domNode"},_setDialogIdAttr:function(a){b.attr(this.node,"id",a+"_underlay");this._set("dialogId",a)},_setClassAttr:function(a){this.node.className="dijitDialogUnderlay "+
a;this._set("class",a)},postCreate:function(){b.body().appendChild(this.domNode)},layout:function(){var a=this.node.style,d=this.domNode.style;d.display="none";var e=b.window.getBox();d.top=e.t+"px";d.left=e.l+"px";a.width=e.w+"px";a.height=e.h+"px";d.display="block"},show:function(){this.domNode.style.display="block";this.layout();this.bgIframe=new c.BackgroundIframe(this.domNode)},hide:function(){this.bgIframe.destroy();delete this.bgIframe;this.domNode.style.display="none"}});return c.DialogUnderlay});
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("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(b,c){b.declare("dijit._DialogBase",[c._Templated,c.form._FormMixin,c._DialogMixin,c._CssStateMixin],{templateString:b.cache("dijit","templates/Dialog.html"),
baseClass:"dijitDialog",cssStateNodes:{closeButtonNode:"dijitDialogCloseIcon"},attributeMap:b.delegate(c._Widget.prototype.attributeMap,{title:[{node:"titleNode",type:"innerHTML"},{node:"titleBar",type:"attribute"}],"aria-describedby":""}),open:false,duration:c.defaultDuration,refocus:true,autofocus:true,_firstFocusItem:null,_lastFocusItem:null,doLayout:false,draggable:true,"aria-describedby":"",postMixInProperties:function(){var a=b.i18n.getLocalization("dijit","common");b.mixin(this,a);this.inherited(arguments)},
postCreate:function(){b.style(this.domNode,{display:"none",position:"absolute"});b.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&&c._DialogLevelManager.isTop(this)){this._getFocusItems(this.domNode);c.focus(this._firstFocusItem)}this.inherited(arguments)},_endDrag:function(a){if(a&&a.node&&a.node===this.domNode)this._relativePosition=
b.position(a.node)},_setup:function(){var a=this.domNode;if(this.titleBar&&this.draggable){this._moveable=b.isIE==6?new b.dnd.TimedMoveable(a,{handle:this.titleBar}):new b.dnd.Moveable(a,{handle:this.titleBar,timeout:0});this._dndListener=b.subscribe("/dnd/move/stop",this,"_endDrag")}else b.addClass(a,"dijitDialogFixed");this.underlayAttrs={dialogId:this.id,"class":b.map(this["class"].split(/\s/),function(d){return d+"_underlay"}).join(" ")}},_size:function(){this._checkIfSingleChild();if(this._singleChild){if(this._singleChildOriginalStyle)this._singleChild.domNode.style.cssText=
this._singleChildOriginalStyle;delete this._singleChildOriginalStyle}else b.style(this.containerNode,{width:"auto",height:"auto"});var a=b._getMarginSize(this.domNode),d=b.window.getBox();if(a.w>=d.w||a.h>=d.h){var e=Math.min(a.w,Math.floor(d.w*0.75));a=Math.min(a.h,Math.floor(d.h*0.75));if(this._singleChild&&this._singleChild.resize){this._singleChildOriginalStyle=this._singleChild.domNode.style.cssText;this._singleChild.resize({w:e,h:a})}else b.style(this.containerNode,{width:e+"px",height:a+"px",
overflow:"auto",position:"relative"})}else this._singleChild&&this._singleChild.resize&&this._singleChild.resize()},_position:function(){if(!b.hasClass(b.body(),"dojoMove")){var a=this.domNode,d=b.window.getBox(),e=this._relativePosition,f=e?null:b._getBorderBox(a),g=Math.floor(d.l+(e?e.x:(d.w-f.w)/2));d=Math.floor(d.t+(e?e.y:(d.h-f.h)/2));b.style(a,{left:g+"px",top:d+"px"})}},_onKey:function(a){if(a.charOrCode){var d=b.keys,e=a.target;a.charOrCode===d.TAB&&this._getFocusItems(this.domNode);var f=
this._firstFocusItem==this._lastFocusItem;if(e==this._firstFocusItem&&a.shiftKey&&a.charOrCode===d.TAB){f||c.focus(this._lastFocusItem);b.stopEvent(a)}else if(e==this._lastFocusItem&&a.charOrCode===d.TAB&&!a.shiftKey){f||c.focus(this._firstFocusItem);b.stopEvent(a)}else{for(;e;){if(e==this.domNode||b.hasClass(e,"dijitPopup"))if(a.charOrCode==d.ESCAPE)this.onCancel();else return;e=e.parentNode}if(a.charOrCode!==d.TAB)b.stopEvent(a);else if(!b.isOpera)try{this._firstFocusItem.focus()}catch(g){}}}},
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(b.connect(window,"onscroll",this,"layout"));this._modalconnects.push(b.connect(window,"onresize",this,function(){var d=b.window.getBox();if(!this._oldViewport||d.h!=this._oldViewport.h||d.w!=this._oldViewport.w){this.layout();this._oldViewport=d}}));this._modalconnects.push(b.connect(this.domNode,
"onkeypress",this,"_onKey"));b.style(this.domNode,{opacity:0,display:""});this._set("open",true);this._onShow();this._size();this._position();var a;this._fadeInDeferred=new b.Deferred(b.hitch(this,function(){a.stop();delete this._fadeInDeferred}));a=b.fadeIn({node:this.domNode,duration:this.duration,beforeBegin:b.hitch(this,function(){c._DialogLevelManager.show(this,this.underlayAttrs)}),onEnd:b.hitch(this,function(){if(this.autofocus&&c._DialogLevelManager.isTop(this)){this._getFocusItems(this.domNode);
c.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 b.Deferred(b.hitch(this,function(){a.stop();delete this._fadeOutDeferred}));a=b.fadeOut({node:this.domNode,duration:this.duration,onEnd:b.hitch(this,function(){this.domNode.style.display="none";c._DialogLevelManager.hide(this);this.onHide();
this._fadeOutDeferred.callback(true);delete this._fadeOutDeferred})}).play();if(this._scrollConnected)this._scrollConnected=false;b.forEach(this._modalconnects,b.disconnect);this._modalconnects=[];this._relativePosition&&delete this._relativePosition;this._set("open",false);return this._fadeOutDeferred}},layout:function(){if(this.domNode.style.display!="none"){c._underlay&&c._underlay.layout();this._position()}},destroy:function(){this._fadeInDeferred&&this._fadeInDeferred.cancel();this._fadeOutDeferred&&
this._fadeOutDeferred.cancel();this._moveable&&this._moveable.destroy();this._dndListener&&b.unsubscribe(this._dndListener);b.forEach(this._modalconnects,b.disconnect);c._DialogLevelManager.hide(this);this.inherited(arguments)}});b.declare("dijit.Dialog",[c.layout.ContentPane,c._DialogBase],{});c._DialogLevelManager={show:function(a,d){var e=c._dialogStack;e[e.length-1].focus=c.getFocus(a);var f=c._underlay;if(!f||f._destroyed)f=c._underlay=new c.DialogUnderlay(d);else f.set(a.underlayAttrs);var g=
e[e.length-1].dialog?e[e.length-1].zIndex+2:950;e.length==1&&f.show();b.style(c._underlay.domNode,"zIndex",g-1);b.style(a.domNode,"zIndex",g);e.push({dialog:a,underlayAttrs:d,zIndex:g})},hide:function(a){var d=c._dialogStack;if(d[d.length-1].dialog==a){d.pop();var e=d[d.length-1];if(d.length==1)c._underlay._destroyed||c._underlay.hide();else{b.style(c._underlay.domNode,"zIndex",e.zIndex-1);c._underlay.set(e.underlayAttrs)}if(a.refocus){d=e.focus;if(!d||e.dialog&&!b.isDescendant(d.node,e.dialog.domNode)){e.dialog._getFocusItems(e.dialog.domNode);
d=e.dialog._firstFocusItem}try{c.focus(d)}catch(f){}}}else{e=b.indexOf(b.map(d,function(g){return g.dialog}),a);e!=-1&&d.splice(e,1)}},isTop:function(a){var d=c._dialogStack;return d[d.length-1].dialog==a}};c._dialogStack=[{dialog:null,focus:null,underlayAttrs:null}];return c.Dialog});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(b,c){return c.form.ToggleButton});
define("dijit/form/CheckBox",["dojo","dijit","text!dijit/form/templates/CheckBox.html","dijit/form/ToggleButton"],function(b,c){b.declare("dijit.form.CheckBox",c.form.ToggleButton,{templateString:b.cache("dijit.form","templates/CheckBox.html"),baseClass:"dijitCheckBox",type:"checkbox",value:"on",readOnly:false,attributeMap:b.delegate(c.form._FormWidget.prototype.attributeMap,{readOnly:"focusNode"}),_setReadOnlyAttr:function(a){this._set("readOnly",a);b.attr(this.focusNode,"readOnly",a);c.setWaiState(this.focusNode,
"readonly",a)},_setValueAttr:function(a,d){if(typeof a=="string"){this._set("value",a);b.attr(this.focusNode,"value",a);a=true}this._created&&this.set("checked",a,d)},_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");b.attr(this.focusNode,"value",this.value)},_onFocus:function(){this.id&&b.query("label[for='"+this.id+"']").addClass("dijitFocusedLabel");this.inherited(arguments)},_onBlur:function(){this.id&&b.query("label[for='"+this.id+"']").removeClass("dijitFocusedLabel");this.inherited(arguments)},_onClick:function(a){if(this.readOnly){b.stopEvent(a);return false}return this.inherited(arguments)}});b.declare("dijit.form.RadioButton",c.form.CheckBox,{type:"radio",
baseClass:"dijitRadio",_setCheckedAttr:function(a){this.inherited(arguments);if(this._created)if(a){var d=this;b.query("INPUT[type=radio]",this.focusNode.form||b.doc).forEach(function(e){if(e.name==d.name&&e!=d.focusNode&&e.form==d.focusNode.form)(e=c.getEnclosingWidget(e))&&e.checked&&e.set("checked",false)})}},_clicked:function(){this.checked||this.set("checked",true)}});return c.form.CheckBox});
define("dijit/form/Form",["dojo","dijit","dijit/_Widget","dijit/_Templated","dijit/form/_FormMixin","dijit/layout/_ContentPaneResizeMixin"],function(b,c){b.declare("dijit.form.Form",[c._Widget,c._Templated,c.form._FormMixin,c.layout._ContentPaneResizeMixin],{name:"",action:"",method:"",encType:"","accept-charset":"",accept:"",target:"",templateString:"<form dojoAttachPoint='containerNode' dojoAttachEvent='onreset:_onReset,onsubmit:_onSubmit' ${!nameAttrSetting}></form>",attributeMap:b.delegate(c._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;b.attr(this.domNode,"encType",a);if(b.isIE)this.domNode.encoding=a},postCreate:function(){if(b.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 d={returnValue:true,preventDefault:function(){this.returnValue=false},stopPropagation:function(){},currentTarget:a?a.target:this.domNode,target:a?a.target:this.domNode};this.onReset(d)!==false&&d.returnValue&&this.inherited(arguments,[])},onReset:function(){return true},_onReset:function(a){this.reset(a);b.stopEvent(a);return false},_onSubmit:function(a){var d=c.form.Form.prototype;if(this.execute!=d.execute||this.onExecute!=
d.onExecute){b.deprecated("dijit.form.Form:execute()/onExecute() are deprecated. Use onSubmit() instead.","","2.0");this.onExecute();this.execute(this.getValues())}this.onSubmit(a)===false&&b.stopEvent(a)},onSubmit:function(){return this.isValid()},submit:function(){this.onSubmit()!==false&&this.containerNode.submit()}});return c.form.Form});
define("dojo/data/util/filter",["dojo"],function(b){b.getObject("data.util.filter",true,b);b.data.util.filter.patternToRegExp=function(c,a){for(var d="^",e=null,f=0;f<c.length;f++){e=c.charAt(f);switch(e){case "\\":d+=e;f++;d+=c.charAt(f);break;case "*":d+=".*";break;case "?":d+=".";break;case "$":case "^":case "/":case "+":case ".":case "|":case "(":case ")":case "{":case "}":case "[":case "]":d+="\\";default:d+=e}}d+="$";return a?new RegExp(d,"mi"):new RegExp(d,"m")};return b.data.util.filter});
define("dojo/data/util/sorter",["dojo"],function(b){b.getObject("data.util.sorter",true,b);b.data.util.sorter.basicComparator=function(c,a){var d=-1;if(c===null)c=undefined;if(a===null)a=undefined;if(c==a)d=0;else if(c>a||c==null)d=1;return d};b.data.util.sorter.createSortFunction=function(c,a){function d(m,n,r,s){return function(p,q){p=s.getValue(p,m);q=s.getValue(q,m);return n*r(p,q)}}for(var e=[],f,g=a.comparatorMap,h=b.data.util.sorter.basicComparator,j=0;j<c.length;j++){f=c[j];var k=f.attribute;
if(k){f=f.descending?-1:1;var l=h;if(g){if(typeof k!=="string"&&"toString"in k)k=k.toString();l=g[k]||h}e.push(d(k,f,l,a))}}return function(m,n){for(var r=0;r<e.length;){var s=e[r++](m,n);if(s!==0)return s}return 0}};return b.data.util.sorter});
define("dojo/data/util/simpleFetch",["dojo","dojo/data/util/sorter"],function(b){b.getObject("data.util.simpleFetch",true,b);b.data.util.simpleFetch.fetch=function(c){c=c||{};if(!c.store)c.store=this;var a=this,d=function(f,g){if(g.onError)g.onError.call(g.scope||b.global,f,g)},e=function(f,g){var h=g.abort||null,j=false,k=g.start?g.start:0,l=g.count&&g.count!==Infinity?k+g.count:f.length;g.abort=function(){j=true;h&&h.call(g)};var m=g.scope||b.global;if(!g.store)g.store=a;g.onBegin&&g.onBegin.call(m,
f.length,g);g.sort&&f.sort(b.data.util.sorter.createSortFunction(g.sort,a));if(g.onItem)for(var n=k;n<f.length&&n<l;++n){var r=f[n];j||g.onItem.call(m,r,g)}if(g.onComplete&&!j){n=null;g.onItem||(n=f.slice(k,l));g.onComplete.call(m,n,g)}};this._fetchItems(c,e,d);return c};return b.data.util.simpleFetch});
define("dojo/data/ItemFileReadStore",["dojo","dojo/data/util/filter","dojo/data/util/simpleFetch","dojo/date/stamp"],function(b){b.declare("dojo.data.ItemFileReadStore",null,{constructor:function(c){this._arrayOfAllItems=[];this._arrayOfTopLevelItems=[];this._loadFinished=false;this.url=this._ccUrl=this._jsonFileUrl=c.url;this._jsonData=c.data;this.data=null;this._datatypeMap=c.typeMap||{};this._datatypeMap.Date||(this._datatypeMap.Date={type:Date,deserialize:function(a){return b.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(c.urlPreventCache!==undefined)this.urlPreventCache=c.urlPreventCache?true:false;if(c.hierarchical!==undefined)this.hierarchical=c.hierarchical?true:false;if(c.clearOnClose)this.clearOnClose=true;if("failOk"in c)this.failOk=c.failOk?true:
false},url:"",_ccUrl:"",data:null,typeMap:null,clearOnClose:false,urlPreventCache:false,failOk:false,hierarchical:true,_assertIsItem:function(c){if(!this.isItem(c))throw new Error("dojo.data.ItemFileReadStore: Invalid item argument.");},_assertIsAttribute:function(c){if(typeof c!=="string")throw new Error("dojo.data.ItemFileReadStore: Invalid attribute argument.");},getValue:function(c,a,d){c=this.getValues(c,a);return c.length>0?c[0]:d},getValues:function(c,a){this._assertIsItem(c);this._assertIsAttribute(a);
return(c[a]||[]).slice(0)},getAttributes:function(c){this._assertIsItem(c);var a=[];for(var d in c)d!==this._storeRefPropName&&d!==this._itemNumPropName&&d!==this._rootItemPropName&&d!==this._reverseRefMap&&a.push(d);return a},hasAttribute:function(c,a){this._assertIsItem(c);this._assertIsAttribute(a);return a in c},containsValue:function(c,a,d){var e=undefined;if(typeof d==="string")e=b.data.util.filter.patternToRegExp(d,false);return this._containsValue(c,a,d,e)},_containsValue:function(c,a,d,e){return b.some(this.getValues(c,
a),function(f){if(f!==null&&!b.isObject(f)&&e){if(f.toString().match(e))return true}else if(d===f)return true})},isItem:function(c){if(c&&c[this._storeRefPropName]===this)if(this._arrayOfAllItems[c[this._itemNumPropName]]===c)return true;return false},isItemLoaded:function(c){return this.isItem(c)},loadItem:function(c){this._assertIsItem(c.item)},getFeatures:function(){return this._features},getLabel:function(c){if(this._labelAttr&&this.isItem(c))return this.getValue(c,this._labelAttr)},getLabelAttributes:function(){if(this._labelAttr)return[this._labelAttr];
return null},_fetchItems:function(c,a,d){var e=this,f=function(k,l){var m=[],n,r;if(k.query){var s;n=k.queryOptions?k.queryOptions.ignoreCase:false;var p={};for(r in k.query){s=k.query[r];if(typeof s==="string")p[r]=b.data.util.filter.patternToRegExp(s,n);else if(s instanceof RegExp)p[r]=s}for(n=0;n<l.length;++n){var q=true,o=l[n];if(o===null)q=false;else for(r in k.query){s=k.query[r];e._containsValue(o,r,s,p[r])||(q=false)}q&&m.push(o)}}else for(n=0;n<l.length;++n){r=l[n];r!==null&&m.push(r)}a(m,
k)};if(this._loadFinished)f(c,this._getItemsArray(c.queryOptions));else{if(this._jsonFileUrl!==this._ccUrl){b.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:c,
filter:f});else{this._loadInProgress=true;var g=b.xhrGet({url:e._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache,failOk:this.failOk});g.addCallback(function(k){try{e._getItemsFromLoadedData(k);e._loadFinished=true;e._loadInProgress=false;f(c,e._getItemsArray(c.queryOptions));e._handleQueuedFetches()}catch(l){e._loadFinished=true;e._loadInProgress=false;d(l,c)}});g.addErrback(function(k){e._loadInProgress=false;d(k,c)});var h=null;if(c.abort)h=c.abort;c.abort=function(){g&&
g.fired===-1&&g.cancel();h&&h.call(c)}}else if(this._jsonData)try{this._loadFinished=true;this._getItemsFromLoadedData(this._jsonData);this._jsonData=null;f(c,this._getItemsArray(c.queryOptions))}catch(j){d(j,c)}else d(new Error("dojo.data.ItemFileReadStore: No JSON source data was provided as either URL or a nested Javascript object."),c)}},_handleQueuedFetches:function(){if(this._queuedFetches.length>0){for(var c=0;c<this._queuedFetches.length;c++){var a=this._queuedFetches[c],d=a.args;(a=a.filter)?
a(d,this._getItemsArray(d.queryOptions)):this.fetchItemByIdentity(d)}this._queuedFetches=[]}},_getItemsArray:function(c){if(c&&c.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(c){function a(p){return p!==null&&typeof p==="object"&&(!b.isArray(p)||e)&&!b.isFunction(p)&&(p.constructor==Object||b.isArray(p))&&typeof p._reference==="undefined"&&typeof p._type==="undefined"&&typeof p._value==="undefined"&&f.hierarchical}function d(p){f._arrayOfAllItems.push(p);for(var q in p){var o=p[q];
if(o)if(b.isArray(o))for(var t=0;t<o.length;++t){var u=o[t];a(u)&&d(u)}else a(o)&&d(o)}}var e=false,f=this;this._labelAttr=c.label;var g,h;this._arrayOfAllItems=[];this._arrayOfTopLevelItems=c.items;for(g=0;g<this._arrayOfTopLevelItems.length;++g){h=this._arrayOfTopLevelItems[g];if(b.isArray(h))e=true;d(h);h[this._rootItemPropName]=true}var j={},k;for(g=0;g<this._arrayOfAllItems.length;++g){h=this._arrayOfAllItems[g];for(k in h){if(k!==this._rootItemPropName){var l=h[k];if(l!==null)b.isArray(l)||
(h[k]=[l]);else h[k]=[null]}j[k]=k}}for(;j[this._storeRefPropName];)this._storeRefPropName+="_";for(;j[this._itemNumPropName];)this._itemNumPropName+="_";for(;j[this._reverseRefMap];)this._reverseRefMap+="_";if(j=c.identifier){this._itemsByIdentity={};this._features["dojo.data.api.Identity"]=j;for(g=0;g<this._arrayOfAllItems.length;++g){h=this._arrayOfAllItems[g];c=h[j];c=c[0];if(Object.hasOwnProperty.call(this._itemsByIdentity,c))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: ["+j+"].  Value collided: ["+c+"]");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: ["+j+"].  Value collided: ["+c+"]");}else this._itemsByIdentity[c]=h}}else this._features["dojo.data.api.Identity"]=Number;for(g=0;g<this._arrayOfAllItems.length;++g){h=this._arrayOfAllItems[g];h[this._storeRefPropName]=
this;h[this._itemNumPropName]=g}for(g=0;g<this._arrayOfAllItems.length;++g){h=this._arrayOfAllItems[g];for(k in h){c=h[k];for(j=0;j<c.length;++j){l=c[j];if(l!==null&&typeof l=="object"){if("_type"in l&&"_value"in l){var m=l._type,n=this._datatypeMap[m];if(n)if(b.isFunction(n))c[j]=new n(l._value);else if(b.isFunction(n.deserialize))c[j]=n.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 '"+m+"'");}if(l._reference){l=l._reference;if(b.isObject(l))for(m=0;m<this._arrayOfAllItems.length;++m){n=this._arrayOfAllItems[m];var r=true;for(var s in l)if(n[s]!=l[s])r=false;if(r)c[j]=n}else c[j]=this._getItemByIdentity(l);if(this.referenceIntegrity){l=c[j];this.isItem(l)&&this._addReferenceToMap(l,h,k)}}else this.isItem(l)&&this.referenceIntegrity&&this._addReferenceToMap(l,
h,k)}}}}},_addReferenceToMap:function(){},getIdentity:function(c){var a=this._features["dojo.data.api.Identity"];if(a===Number)return c[this._itemNumPropName];else if(c=c[a])return c[0];return null},fetchItemByIdentity:function(c){var a,d;if(this._loadFinished){a=this._getItemByIdentity(c.identity);if(c.onItem){d=c.scope?c.scope:b.global;c.onItem.call(d,a)}}else{var e=this;if(this._jsonFileUrl!==this._ccUrl){b.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:c});else{this._loadInProgress=true;d=b.xhrGet({url:e._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache,failOk:this.failOk});d.addCallback(function(f){var g=c.scope?c.scope:b.global;try{e._getItemsFromLoadedData(f);
e._loadFinished=true;e._loadInProgress=false;a=e._getItemByIdentity(c.identity);c.onItem&&c.onItem.call(g,a);e._handleQueuedFetches()}catch(h){e._loadInProgress=false;c.onError&&c.onError.call(g,h)}});d.addErrback(function(f){e._loadInProgress=false;if(c.onError)c.onError.call(c.scope?c.scope:b.global,f)})}else if(this._jsonData){e._getItemsFromLoadedData(e._jsonData);e._jsonData=null;e._loadFinished=true;a=e._getItemByIdentity(c.identity);if(c.onItem){d=c.scope?c.scope:b.global;c.onItem.call(d,a)}}}},
_getItemByIdentity:function(c){var a=null;if(this._itemsByIdentity&&Object.hasOwnProperty.call(this._itemsByIdentity,c))a=this._itemsByIdentity[c];else if(Object.hasOwnProperty.call(this._arrayOfAllItems,c))a=this._arrayOfAllItems[c];if(a===undefined)a=null;return a},getIdentityAttributes:function(){var c=this._features["dojo.data.api.Identity"];return c===Number?null:[c]},_forceLoad:function(){var c=this;if(this._jsonFileUrl!==this._ccUrl){b.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=b.xhrGet({url:this._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache,failOk:this.failOk,sync:true});a.addCallback(function(d){try{if(c._loadInProgress!==true&&!c._loadFinished){c._getItemsFromLoadedData(d);c._loadFinished=true}else if(c._loadInProgress)throw new Error("dojo.data.ItemFileReadStore:  Unable to perform a synchronous load, an async load is in progress.");
}catch(e){console.log(e);throw e;}});a.addErrback(function(d){throw d;})}else if(this._jsonData){c._getItemsFromLoadedData(c._jsonData);c._jsonData=null;c._loadFinished=true}}});b.extend(b.data.ItemFileReadStore,b.data.util.simpleFetch);return b.data.ItemFileReadStore});
define("orion/widgets/_OrionDialogMixin",["dojo","dijit"],function(b,c){b.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);b.connect(this,"onKeyPress",b.hitch(this,function(a){a.keyCode===b.keys.ENTER&&this._onSubmit()}))},onHide:function(){this.inherited(arguments);setTimeout(b.hitch(this,function(){if(b.isDescendant(c._curFocus,
this.domNode))c._curFocus=null;if(b.isDescendant(c._prevFocus,this.domNode))c._prevFocus=null;this.destroyRecursive()}),this.duration)}})});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(b,c){b.declare("orion.widgets.NewItemDialog",[c.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:true,templateString:b.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";b.connect(this.itemURL,"onkeyup",null,b.hitch(this,this.onURLChange))}else{this.itemAdvancedInfo.style.display="none";this.itemAdvancedInfo1.style.display="none"}},
execute:function(){var a,d;this.newItemButton.focus();if(this.options.advanced){a=this.itemURL.value.replace(/^\s+|\s+$/g,"");d=this.createCheckbox.get("disabled")?false:this.createCheckbox.get("checked")}this.options.func(this.itemName.value,a&&a!==""?a:undefined,d)},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("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("dojo/DeferredList",["dojo"],function(b){b.DeferredList=function(c,a,d,e){var f=[];b.Deferred.call(this);var g=this;c.length===0&&!a&&this.resolve([0,[]]);var h=0;b.forEach(c,function(j,k){function l(m,n){f[k]=[m,n];h++;h===c.length&&g.resolve(f)}j.then(function(m){a?g.resolve([k,m]):l(true,m)},function(m){d?g.reject(m):l(false,m);if(e)return null;throw m;})})};b.DeferredList.prototype=new b.Deferred;b.DeferredList.prototype.gatherResults=function(c){c=new b.DeferredList(c,false,true,false);
c.addCallback(function(a){var d=[];b.forEach(a,function(e){d.push(e[1])});return d});return c};return b.DeferredList});
define("dojo/regexp",["dojo"],function(b){b.getObject("regexp",true,b);b.regexp.escapeString=function(c,a){return c.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,function(d){if(a&&a.indexOf(d)!=-1)return d;return"\\"+d})};b.regexp.buildGroupRE=function(c,a,d){if(!(c instanceof Array))return a(c);for(var e=[],f=0;f<c.length;f++)e.push(a(c[f]));return b.regexp.group(e.join("|"),d)};b.regexp.group=function(c,a){return"("+(a?"?:":"")+c+")"};return b.regexp});
define("dojo/cookie",["dojo","dojo/regexp"],function(b){b.cookie=function(c,a,d){var e=document.cookie;if(arguments.length==1){var f=e.match(new RegExp("(?:^|; )"+b.regexp.escapeString(c)+"=([^;]*)"));return f?decodeURIComponent(f[1]):undefined}else{d=d||{};e=d.expires;if(typeof e=="number"){var g=new Date;g.setTime(g.getTime()+e*24*60*60*1E3);e=d.expires=g}if(e&&e.toUTCString)d.expires=e.toUTCString();a=encodeURIComponent(a);e=c+"="+a;for(f in d){e+="; "+f;g=d[f];if(g!==true)e+="="+g}document.cookie=
e}};b.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 b.cookie});
define("dijit/tree/TreeStoreModel",["dojo","dijit"],function(b,c){b.declare("dijit.tree.TreeStoreModel",null,{store:null,childrenAttrs:["children"],newItemIdAttr:"id",labelAttr:"",root:null,query:null,deferItemLoadingUntilExpand:false,constructor:function(a){b.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([b.connect(a,
"onNew",this,"onNewItem"),b.connect(a,"onDelete",this,"onDeleteItem"),b.connect(a,"onSet",this,"onSetItem")])},destroy:function(){b.forEach(this.connects,b.disconnect)},getRoot:function(a,d){this.root?a(this.root):this.store.fetch({query:this.query,onComplete:b.hitch(this,function(e){if(e.length!=1)throw new Error(this.declaredClass+": query "+b.toJson(this.query)+" returned "+e.length+" items, but must return exactly one item");this.root=e[0];a(this.root)}),onError:d})},mayHaveChildren:function(a){return b.some(this.childrenAttrs,
function(d){return this.store.hasAttribute(a,d)},this)},getChildren:function(a,d,e){var f=this.store;if(f.isItemLoaded(a)){for(var g=[],h=0;h<this.childrenAttrs.length;h++){var j=f.getValues(a,this.childrenAttrs[h]);g=g.concat(j)}var k=0;this.deferItemLoadingUntilExpand||b.forEach(g,function(m){f.isItemLoaded(m)||k++});k==0?d(g):b.forEach(g,function(m,n){f.isItemLoaded(m)||f.loadItem({item:m,onItem:function(r){g[n]=r;--k==0&&d(g)},onError:e})})}else{var l=b.hitch(this,arguments.callee);f.loadItem({item:a,
onItem:function(m){l(m,d,e)},onError:e})}},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,d,e){var f={parent:d,attribute:this.childrenAttrs[0]},g;if(this.newItemIdAttr&&a[this.newItemIdAttr])this.fetchItemByIdentity({identity:a[this.newItemIdAttr],scope:this,
onItem:function(h){if(h)this.pasteItem(h,null,d,true,e);else(g=this.store.newItem(a,f))&&e!=undefined&&this.pasteItem(g,d,d,false,e)}});else(g=this.store.newItem(a,f))&&e!=undefined&&this.pasteItem(g,d,d,false,e)},pasteItem:function(a,d,e,f,g){var h=this.store,j=this.childrenAttrs[0];d&&b.forEach(this.childrenAttrs,function(l){if(h.containsValue(d,l,a)){if(!f){var m=b.filter(h.getValues(d,l),function(n){return n!=a});h.setValues(d,l,m)}j=l}});if(e)if(typeof g=="number"){var k=h.getValues(e,j).slice();
k.splice(g,0,a);h.setValues(e,j,k)}else h.setValues(e,j,h.getValues(e,j).concat(a))},onChange:function(){},onChildrenChange:function(){},onDelete:function(){},onNewItem:function(a,d){d&&this.getChildren(d.item,b.hitch(this,function(e){this.onChildrenChange(d.item,e)}))},onDeleteItem:function(a){this.onDelete(a)},onSetItem:function(a,d){b.indexOf(this.childrenAttrs,d)!=-1?this.getChildren(a,b.hitch(this,function(e){this.onChildrenChange(a,e)})):this.onChange(a)}});return c.tree.TreeStoreModel});
define("dijit/tree/ForestStoreModel",["dojo","dijit","dijit/tree/TreeStoreModel"],function(b,c){b.declare("dijit.tree.ForestStoreModel",c.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,d,e){if(a===this.root)this.root.children?d(this.root.children):this.store.fetch({query:this.query,
onComplete:b.hitch(this,function(f){this.root.children=f;d(f)}),onError:e});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 d=a.scope?a.scope:b.global;a.onItem&&a.onItem.call(d,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,d){if(d===this.root){this.onNewRootItem(a);return this.store.newItem(a)}else return this.inherited(arguments)},onNewRootItem:function(){},pasteItem:function(a,d,e,f,g){if(d===this.root)f||this.onLeaveRoot(a);c.tree.TreeStoreModel.prototype.pasteItem.call(this,a,d===this.root?null:d,e===this.root?null:e,f,g);e===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:b.hitch(this,function(d){this.root.children=d;if(a.length!=d.length||b.some(a,function(e,f){return d[f]!=e}))this.onChildrenChange(this.root,d)})})},onNewItem:function(){this._requeryTop();this.inherited(arguments)},onDeleteItem:function(a){b.indexOf(this.root.children,a)!=-1&&this._requeryTop();this.inherited(arguments)},onSetItem:function(){this._requeryTop();this.inherited(arguments)}});return c.tree.ForestStoreModel});
define("dojo/dnd/Container",["dojo","dojo/dnd/common","dojo/parser"],function(b){b.declare("dojo.dnd.Container",null,{skipForm:false,constructor:function(c,a){this.node=b.byId(c);a||(a={});this.creator=a.creator||null;this.skipForm=a.skipForm;this.parent=a.dropParent&&b.byId(a.dropParent);this.map={};this.current=null;this.containerState="";b.addClass(this.node,"dojoDndContainer");a&&a._skipStartup||this.startup();this.events=[b.connect(this.node,"onmouseover",this,"onMouseOver"),b.connect(this.node,
"onmouseout",this,"onMouseOut"),b.connect(this.node,"ondragstart",this,"onSelectStart"),b.connect(this.node,"onselectstart",this,"onSelectStart")]},creator:function(){},getItem:function(c){return this.map[c]},setItem:function(c,a){this.map[c]=a},delItem:function(c){delete this.map[c]},forInItems:function(c,a){a=a||b.global;var d=this.map,e=b.dnd._empty;for(var f in d)f in e||c.call(a,d[f],f,this);return a},clearItems:function(){this.map={}},getAllNodes:function(){return b.query("> .dojoDndItem",this.parent)},
sync:function(){var c={};this.getAllNodes().forEach(function(a){if(a.id){var d=this.getItem(a.id);if(d){c[a.id]=d;return}}else a.id=b.dnd.getUniqueId();d=a.getAttribute("dndType");var e=a.getAttribute("dndData");c[a.id]={data:e||a.innerHTML,type:d?d.split(/\s*,\s*/):["text"]}},this);this.map=c;return this},insertNodes:function(c,a,d){if(this.parent.firstChild)if(a){if(!d)d=this.parent.firstChild}else{if(d)d=d.nextSibling}else d=null;if(d)for(a=0;a<c.length;++a){var e=this._normalizedCreator(c[a]);
this.setItem(e.node.id,{data:e.data,type:e.type});this.parent.insertBefore(e.node,d)}else for(a=0;a<c.length;++a){e=this._normalizedCreator(c[a]);this.setItem(e.node.id,{data:e.data,type:e.type});this.parent.appendChild(e.node)}return this},destroy:function(){b.forEach(this.events,b.disconnect);this.clearItems();this.node=this.parent=this.current=null},markupFactory:function(c,a){c._skipStartup=true;return new b.dnd.Container(a,c)},startup:function(){if(!this.parent){this.parent=this.node;if(this.parent.tagName.toLowerCase()==
"table"){var c=this.parent.getElementsByTagName("tbody");if(c&&c.length)this.parent=c[0]}}this.defaultCreator=b.dnd._defaultCreator(this.parent);this.sync()},onMouseOver:function(c){for(var a=c.relatedTarget;a;){if(a==this.node)break;try{a=a.parentNode}catch(d){a=null}}if(!a){this._changeState("Container","Over");this.onOverEvent()}a=this._getChildByEvent(c);if(this.current!=a){this.current&&this._removeItemClass(this.current,"Over");a&&this._addItemClass(a,"Over");this.current=a}},onMouseOut:function(c){for(c=
c.relatedTarget;c;){if(c==this.node)return;try{c=c.parentNode}catch(a){c=null}}if(this.current){this._removeItemClass(this.current,"Over");this.current=null}this._changeState("Container","");this.onOutEvent()},onSelectStart:function(c){if(!this.skipForm||!b.dnd.isFormElement(c))b.stopEvent(c)},onOverEvent:function(){},onOutEvent:function(){},_changeState:function(c,a){var d="dojoDnd"+c;c=c.toLowerCase()+"State";b.replaceClass(this.node,d+a,d+this[c]);this[c]=a},_addItemClass:function(c,a){b.addClass(c,
"dojoDndItem"+a)},_removeItemClass:function(c,a){b.removeClass(c,"dojoDndItem"+a)},_getChildByEvent:function(c){if(c=c.target)for(var a=c.parentNode;a;c=a,a=c.parentNode)if(a==this.parent&&b.hasClass(c,"dojoDndItem"))return c;return null},_normalizedCreator:function(c,a){c=(this.creator||this.defaultCreator).call(this,c,a);if(!b.isArray(c.type))c.type=["text"];if(!c.node.id)c.node.id=b.dnd.getUniqueId();b.addClass(c.node,"dojoDndItem");return c}});b.dnd._createNode=function(c){if(!c)return b.dnd._createSpan;
return function(a){return b.create(c,{innerHTML:a})}};b.dnd._createTrTd=function(c){var a=b.create("tr");b.create("td",{innerHTML:c},a);return a};b.dnd._createSpan=function(c){return b.create("span",{innerHTML:c})};b.dnd._defaultCreatorNodes={ul:"li",ol:"li",div:"div",p:"div"};b.dnd._defaultCreator=function(c){c=c.tagName.toLowerCase();var a=c=="tbody"||c=="thead"?b.dnd._createTrTd:b.dnd._createNode(b.dnd._defaultCreatorNodes[c]);return function(d,e){var f=d&&b.isObject(d),g;if(f&&d.tagName&&d.nodeType&&
d.getAttribute){g=d.getAttribute("dndData")||d.innerHTML;f=(f=d.getAttribute("dndType"))?f.split(/\s*,\s*/):["text"];d=d}else{g=f&&d.data?d.data:d;f=f&&d.type?d.type:["text"];d=(e=="avatar"?b.dnd._createSpan:a)(String(g))}if(!d.id)d.id=b.dnd.getUniqueId();return{node:d,data:g,type:f}}};return b.dnd.Container});
define("dijit/tree/_dndContainer",["dojo","dijit","dojo/dnd/common","dojo/dnd/Container"],function(b,c){b.getObject("tree",true,b);c.tree._compareNodes=function(a,d){if(a===d)return 0;if("sourceIndex"in document.documentElement)return a.sourceIndex-d.sourceIndex;else if("compareDocumentPosition"in document.documentElement)return a.compareDocumentPosition(d)&2?1:-1;else if(document.createRange){var e=doc.createRange();e.setStartBefore(a);a=doc.createRange();a.setStartBefore(d);return e.compareBoundaryPoints(e.END_TO_END,
a)}else throw Error("dijit.tree._compareNodes don't know how to compare two different nodes in this browser");};b.declare("dijit.tree._dndContainer",null,{constructor:function(a,d){this.tree=a;this.node=a.domNode;b.mixin(this,d);this.map={};this.current=null;this.containerState="";b.addClass(this.node,"dojoDndContainer");this.events=[b.connect(this.node,"onmouseenter",this,"onOverEvent"),b.connect(this.node,"onmouseleave",this,"onOutEvent"),b.connect(this.tree,"_onNodeMouseEnter",this,"onMouseOver"),
b.connect(this.tree,"_onNodeMouseLeave",this,"onMouseOut"),b.connect(this.node,"ondragstart",b,"stopEvent"),b.connect(this.node,"onselectstart",b,"stopEvent")]},getItem:function(a){return{data:this.selection[a],type:["treeNode"]}},destroy:function(){b.forEach(this.events,b.disconnect);this.node=this.parent=null},onMouseOver:function(a){this.current=a},onMouseOut:function(){this.current=null},_changeState:function(a,d){var e="dojoDnd"+a;a=a.toLowerCase()+"State";b.replaceClass(this.node,e+d,e+this[a]);
this[a]=d},_addItemClass:function(a,d){b.addClass(a,"dojoDndItem"+d)},_removeItemClass:function(a,d){b.removeClass(a,"dojoDndItem"+d)},onOverEvent:function(){this._changeState("Container","Over")},onOutEvent:function(){this._changeState("Container","")}});return c.tree._dndContainer});
define("dijit/tree/_dndSelector",["dojo","dijit","dojo/dnd/common","dijit/tree/_dndContainer"],function(b,c){b.declare("dijit.tree._dndSelector",c.tree._dndContainer,{constructor:function(){this.selection={};this.anchor=null;c.setWaiState(this.tree.domNode,"multiselect",!this.singular);this.events.push(b.connect(this.tree.domNode,"onmousedown",this,"onMouseDown"),b.connect(this.tree.domNode,"onmouseup",this,"onMouseUp"),b.connect(this.tree.domNode,"onmousemove",this,"onMouseMove"))},singular:false,
getSelectedTreeNodes:function(){var a=[],d=this.selection;for(var e in d)a.push(d[e]);return a},selectNone:function(){this.setSelection([]);return this},destroy:function(){this.inherited(arguments);this.selection=this.anchor=null},addTreeNode:function(a,d){this.setSelection(this.getSelectedTreeNodes().concat([a]));if(d)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 d=this.getSelectedTreeNodes();b.forEach(this._setDifference(d,a),b.hitch(this,function(e){e.setSelected(false);this.anchor==e&&delete this.anchor;delete this.selection[e.id]}));b.forEach(this._setDifference(a,d),b.hitch(this,function(e){e.setSelected(true);this.selection[e.id]=e}));this._updateSelectionProperties()},_setDifference:function(a,d){b.forEach(d,function(e){e.__exclude__=true});a=b.filter(a,function(e){return!e.__exclude__});b.forEach(d,function(e){delete e.__exclude__});
return a},_updateSelectionProperties:function(){var a=this.getSelectedTreeNodes(),d=[],e=[];b.forEach(a,function(f){e.push(f);d.push(f.getTreePath())});a=b.map(e,function(f){return f.item});this.tree._set("paths",d);this.tree._set("path",d[0]||[]);this.tree._set("selectedNodes",e);this.tree._set("selectedNode",e[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!=
b.mouseButtons.RIGHT){b.stopEvent(a);var d=this.current,e=b.isCopyKey(a),f=d.id;if(!this.singular&&!a.shiftKey&&this.selection[f])this._doDeselect=true;else{this._doDeselect=false;this.userSelect(d,e,a.shiftKey)}}},onMouseUp:function(a){if(this._doDeselect){this._doDeselect=false;this.userSelect(this.current,b.isCopyKey(a),a.shiftKey)}},onMouseMove:function(){this._doDeselect=false},userSelect:function(a,d,e){if(this.singular)if(this.anchor==a&&d)this.selectNone();else{this.setSelection([a]);this.anchor=
a}else if(e&&this.anchor){e=this.anchor;if(c.tree._compareNodes(this.anchor.rowNode,a.rowNode)<0){d=e;a=a}else{d=a;a=e}for(nodes=[];d!=a;){nodes.push(d);d=this.tree._getNextNode(d)}nodes.push(a);this.setSelection(nodes)}else if(this.selection[a.id]&&d)this.removeTreeNode(a);else if(d)this.addTreeNode(a,true);else{this.setSelection([a]);this.anchor=a}},forInSelectedItems:function(a,d){d=d||b.global;for(var e in this.selection)a.call(d,this.getItem(e),e,this)}});return c.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(b,c){b.declare("dijit._TreeNode",[c._Widget,c._Templated,c._Container,c._Contained,c._CssStateMixin],{item:null,isTreeNode:true,label:"",isExpandable:null,isExpanded:false,
state:"UNCHECKED",templateString:b.cache("dijit","templates/TreeNode.html"),baseClass:"dijitTreeNode",cssStateNodes:{rowNode:"dijitTreeRow",labelNode:"dijitTreeLabel"},attributeMap:b.delegate(c._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&&c.setWaiState(this.labelNode,"expanded",this.isExpanded);
this.setSelected(false)},_setIndentAttr:function(a){var d=Math.max(a,0)*this.tree._nodePixelIndent+"px";b.style(this.domNode,"backgroundPosition",d+" 0px");b.style(this.rowNode,this.isLeftToRight()?"paddingLeft":"paddingRight",d);b.forEach(this.getChildren(),function(e){e.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 d=this.tree,e=d.model;if(d._v10Compat&&
a===e.root)a=null;this._applyClassAndStyle(a,"icon","Icon");this._applyClassAndStyle(a,"label","Label");this._applyClassAndStyle(a,"row","Row")},_applyClassAndStyle:function(a,d,e){var f="_"+d+"Class";d=d+"Node";var g=this[f];this[f]=this.tree["get"+e+"Class"](a,this.isExpanded);b.replaceClass(this[d],this[f]||"",g||"");b.style(this[d],this.tree["get"+e+"Style"](a,this.isExpanded)||{})},_updateLayout:function(){var a=this.getParent();!a||a.rowNode.style.display=="none"?b.addClass(this.domNode,"dijitTreeIsRoot"):
b.toggleClass(this.domNode,"dijitTreeIsLast",!this.getNextSibling())},_setExpando:function(a){var d=["dijitTreeExpandoLoading","dijitTreeExpandoOpened","dijitTreeExpandoClosed","dijitTreeExpandoLeaf"],e=["*","-","+","*"];a=a?0:this.isExpandable?this.isExpanded?1:2:3;b.replaceClass(this.expandoNode,d[a],d);this.expandoNodeText.innerHTML=e[a]},expand:function(){if(this._expandDeferred)return this._expandDeferred;this._wipeOut&&this._wipeOut.stop();this.isExpanded=true;c.setWaiState(this.labelNode,"expanded",
"true");if(this.tree.showRoot||this!==this.tree.rootNode)c.setWaiRole(this.containerNode,"group");b.addClass(this.contentNode,"dijitTreeContentExpanded");this._setExpando();this._updateItemClasses(this.item);this==this.tree.rootNode&&c.setWaiState(this.tree.domNode,"expanded","true");var a,d=b.fx.wipeIn({node:this.containerNode,duration:c.defaultDuration,onEnd:function(){a.callback(true)}});a=this._expandDeferred=new b.Deferred(function(){d.stop()});d.play();return a},collapse:function(){if(this.isExpanded){if(this._expandDeferred){this._expandDeferred.cancel();
delete this._expandDeferred}this.isExpanded=false;c.setWaiState(this.labelNode,"expanded","false");this==this.tree.rootNode&&c.setWaiState(this.tree.domNode,"expanded","false");b.removeClass(this.contentNode,"dijitTreeContentExpanded");this._setExpando();this._updateItemClasses(this.item);if(!this._wipeOut)this._wipeOut=b.fx.wipeOut({node:this.containerNode,duration:c.defaultDuration});this._wipeOut.play()}},indent:0,setChildItems:function(a){var d=this.tree,e=d.model,f=[];b.forEach(this.getChildren(),
function(g){c._Container.prototype.removeChild.call(this,g)},this);this.state="LOADED";if(a&&a.length>0){this.isExpandable=true;b.forEach(a,function(g){var h=e.getIdentity(g),j=d._itemNodesMap[h],k;if(j)for(var l=0;l<j.length;l++)if(j[l]&&!j[l].getParent()){k=j[l];k.set("indent",this.indent+1);break}if(!k){k=this.tree._createTreeNode({item:g,tree:d,isExpandable:e.mayHaveChildren(g),label:d.getLabel(g),tooltip:d.getTooltip(g),dir:d.dir,lang:d.lang,indent:this.indent+1});if(j)j.push(k);else d._itemNodesMap[h]=
[k]}this.addChild(k);if(this.tree.autoExpand||this.tree._state(g))f.push(d._expandNode(k))},this);b.forEach(this.getChildren(),function(g){g._updateLayout()})}else this.isExpandable=false;this._setExpando&&this._setExpando(false);this._updateItemClasses(this.item);if(this==d.rootNode)if(a=this.tree.showRoot?this:this.getChildren()[0]){a.setFocusable(true);d.lastFocused=a}else d.domNode.setAttribute("tabIndex","0");return new b.DeferredList(f)},getTreePath:function(){for(var a=this,d=[];a&&a!==this.tree.rootNode;){d.unshift(a.item);
a=a.getParent()}d.unshift(this.tree.rootNode.item);return d},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()}b.forEach(a,function(d){d._updateLayout()})},makeExpandable:function(){this.isExpandable=true;this._setExpando(false)},_onLabelFocus:function(){this.tree._onNodeFocus(this)},setSelected:function(a){c.setWaiState(this.labelNode,"selected",a);
b.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)}});b.declare("dijit.Tree",[c._Widget,c._Templated],{store:null,model:null,query:null,label:"",showRoot:true,childrenAttr:["children"],paths:[],
path:[],selectedItems:null,selectedItem:null,openOnClick:false,openOnDblClick:false,templateString:b.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,
d){b.publish(this.id,[b.mixin({tree:this,event:a},d||{})])},postMixInProperties:function(){this.tree=this;if(this.autoExpand)this.persist=false;this._itemNodesMap={};if(!this.cookieName)this.cookieName=this.id+"SaveStateCookie";this._loadDeferred=new b.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(b.isString(this.dndController))this.dndController=b.getObject(this.dndController);for(var a={},d=0;d<this.dndParams.length;d++)if(this[this.dndParams[d]])a[this.dndParams[d]]=this[this.dndParams[d]];this.dndController=new this.dndController(this,a)}},_store2model:function(){this._v10Compat=true;b.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=b.hitch(this,"mayHaveChildren");if(this.params.getItemChildren)a.getChildren=b.hitch(this,function(d,e,f){this.getItemChildren(this._v10Compat&&d===this.model.root?null:d,e,f)});this.model=new c.tree.ForestStoreModel(a);this.showRoot=Boolean(this.label)},onLoad:function(){},_load:function(){this.model.getRoot(b.hitch(this,function(a){var d=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){d.rowNode.style.display="none";c.setWaiRole(this.domNode,"presentation");c.setWaiRole(d.labelNode,"presentation");c.setWaiRole(d.containerNode,"tree")}this.domNode.appendChild(d.domNode);a=this.model.getIdentity(a);if(this._itemNodesMap[a])this._itemNodesMap[a].push(d);else this._itemNodesMap[a]=[d];d._updateLayout();this._expandNode(d).addCallback(b.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[b.isString(a)?a:this.model.getIdentity(a)])},_setSelectedItemAttr:function(a){this.set("selectedItems",[a])},_setSelectedItemsAttr:function(a){var d=this;this._loadDeferred.addCallback(b.hitch(this,function(){var e=b.map(a,function(g){return!g||b.isString(g)?g:d.model.getIdentity(g)}),f=[];b.forEach(e,function(g){f=f.concat(d._itemNodesMap[g]||
[])});this.set("selectedNodes",f)}))},_setPathAttr:function(a){return a.length?this.set("paths",[a]):this.set("paths",[])},_setPathsAttr:function(a){function d(g,h,j){var k=g.shift(),l=b.filter(h,function(m){return m.getIdentity()==k})[0];if(l)g.length?f._expandNode(l).addCallback(function(){d(g,l.getChildren(),j)}):j.callback(l);else j.errback("Could not expand path at "+k)}function e(g){f.set("selectedNodes",b.map(b.filter(g,function(h){return h[0]}),function(h){return h[1]}))}var f=this;return(new b.DeferredList(b.map(a,
function(g){var h=new b.Deferred;g=b.map(g,function(j){return b.isString(j)?j:f.model.getIdentity(j)});g.length?f._loadDeferred.addCallback(function(){d(g,[f.rootNode],h)}):h.errback("Empty path");return h}))).addCallback(e)},_setSelectedNodeAttr:function(a){this.set("selectedNodes",[a])},_setSelectedNodesAttr:function(a){this._loadDeferred.addCallback(b.hitch(this,function(){this.dndController.setSelection(a)}))},mayHaveChildren:function(){},getItemChildren:function(){},getLabel:function(a){return this.model.getLabel(a)},
getIconClass:function(a,d){return!a||this.model.mayHaveChildren(a)?d?"dijitFolderOpened":"dijitFolderClosed":"dijitLeaf"},getLabelClass:function(){},getRowClass:function(){},getIconStyle:function(){},getLabelStyle:function(){},getRowStyle:function(){},getTooltip:function(){return""},_onKeyPress:function(a){if(!a.altKey){var d=b.keys,e=c.getEnclosingWidget(a.target);if(e){var f=a.charOrCode;if(typeof f=="string"&&f!=" "){if(!a.altKey&&!a.ctrlKey&&!a.shiftKey&&!a.metaKey){this._onLetterKeyNav({node:e,
key:f.toLowerCase()});b.stopEvent(a)}}else{if(this._curSearch){clearTimeout(this._curSearch.timer);delete this._curSearch}var g=this._keyHandlerMap;if(!g){g={};g[d.ENTER]="_onEnterKey";g[d.SPACE]=g[" "]="_onEnterKey";g[this.isLeftToRight()?d.LEFT_ARROW:d.RIGHT_ARROW]="_onLeftArrow";g[this.isLeftToRight()?d.RIGHT_ARROW:d.LEFT_ARROW]="_onRightArrow";g[d.UP_ARROW]="_onUpArrow";g[d.DOWN_ARROW]="_onDownArrow";g[d.HOME]="_onHomeKey";g[d.END]="_onEndKey";this._keyHandlerMap=g}if(this._keyHandlerMap[f]){this[this._keyHandlerMap[f]]({node:e,
item:e.item,evt:a});b.stopEvent(a)}}}}},_onEnterKey:function(a){this._publish("execute",{item:a.item,node:a.node});this.dndController.userSelect(a.node,b.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 d=a.getPreviousSibling();if(d)for(a=d;a.isExpandable&&a.isExpanded&&a.hasChildren();){a=a.getChildren();a=a[a.length-1]}else{d=a.getParent();!this.showRoot&&
d===this.rootNode||(a=d)}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 d=this._curSearch;if(d){d.pattern+=a.key;clearTimeout(d.timer)}else d=this._curSearch={pattern:a.key,startNode:a.node};var e=this;d.timer=setTimeout(function(){delete e._curSearch},this.multiCharSearchDuration);a=d.startNode;do(a=this._getNextNode(a))||(a=this._getRootOrFirstNode());while(a!==d.startNode&&a.label.toLowerCase().substr(0,d.pattern.length)!=
d.pattern);a&&a.isTreeNode&&a!==d.startNode&&this.focusNode(a)},isExpandoNode:function(a,d){return b.isDescendant(a,d.expandoNode)},_onClick:function(a,d){var e=this.isExpandoNode(d.target,a);if(this.openOnClick&&a.isExpandable||e)a.isExpandable&&this._onExpandoClick({node:a});else{this._publish("execute",{item:a.item,node:a,evt:d});this.onClick(a.item,a,d);this.focusNode(a)}b.stopEvent(d)},_onDblClick:function(a,d){var e=d.target;e=e==a.expandoNode||e==a.expandoNodeText;if(this.openOnDblClick&&a.isExpandable||
e)a.isExpandable&&this._onExpandoClick({node:a});else{this._publish("execute",{item:a.item,node:a,evt:d});this.onDblClick(a.item,a,d);this.focusNode(a)}b.stopEvent(d)},_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 d=a.getNextSibling();
if(d)return d;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,d){if(a._expandNodeDeferred&&!d)return a._expandNodeDeferred;d=this.model;var e=a.item,f=this;switch(a.state){case "UNCHECKED":a.markProcessing();
var g=a._expandNodeDeferred=new b.Deferred;d.getChildren(e,function(h){a.unmarkProcessing();h=a.setChildItems(h);var j=f._expandNode(a,true);h.addCallback(function(){j.addCallback(function(){g.callback()})})},function(h){console.error(f,": error loading root children: ",h)});break;default:g=a._expandNodeDeferred=a.expand();this.onOpen(a.item,a);if(e){this._state(e,true);this._saveState()}}return g},focusNode:function(a){c.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 d=this._itemNodesMap[this.model.getIdentity(a)];if(d){var e=this.getLabel(a),f=this.getTooltip(a);b.forEach(d,function(g){g.set({item:a,label:e,tooltip:f});g._updateItemClasses(a)})}},_onItemChildrenChange:function(a,d){(a=this._itemNodesMap[this.model.getIdentity(a)])&&b.forEach(a,function(e){e.setChildItems(d)})},
_onItemDelete:function(a){a=this.model.getIdentity(a);var d=this._itemNodesMap[a];if(d){b.forEach(d,function(e){this.dndController.removeTreeNode(e);var f=e.getParent();f&&f.removeChild(e);e.destroyRecursive()},this);delete this._itemNodesMap[a]}},_initState:function(){if(this.persist){var a=b.cookie(this.cookieName);this._openedItemIds={};a&&b.forEach(a.split(","),function(d){this._openedItemIds[d]=true},this)}},_state:function(a,d){if(!this.persist)return false;var e=this.model.getIdentity(a);if(arguments.length===
1)return this._openedItemIds[e];if(d)this._openedItemIds[e]=true;else delete this._openedItemIds[e]},_saveState:function(){if(this.persist){var a=[];for(var d in this._openedItemIds)a.push(d);b.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&&!b.isString(this.dndController)&&this.dndController.destroy();this.rootNode=null;this.inherited(arguments)},
destroyRecursive:function(){this.destroy()},resize:function(a){a&&b.marginBox(this.domNode,a);this._nodePixelIndent=b._getMarginSize(this.tree.indentDetector).w;if(this.tree.rootNode)this.tree.rootNode.set("indent",this.showRoot?0:-1)},_createTreeNode:function(a){return new c._TreeNode(a)}});return c.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(b,c){b.declare("orion.widgets._ExplorerTreeNode",[c._TreeNode],{templateString:b.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)}});b.declare("orion.widgets.ExplorerTree",
[c.Tree],{selectedNodes:{},postCreate:function(){b.connect(this,"onMouseDown",this._eatSelectionEvent);b.connect(this.domNode,"onselectstart",this._eatSelectionEvent);this.inherited(arguments)},getFollowClass:function(){},getFollowStyle:function(){},updateFollowLink:function(){},onFollowClick:function(){},getSelectedItems:function(){var a=[];this._forEachSelectedNode(function(d,e){a.push(e.item)});return a},_getSelectedNodes:function(){var a=[];this._forEachSelectedNode(function(d,e){a.push(e)});
return a},_forEachSelectedNode:function(a){var d=this.selectedNodes;for(var e in d)d.hasOwnProperty(e)&&a(e,d[e])},_createTreeNode:function(a){return new orion.widgets._ExplorerTreeNode(a)},_eatSelectionEvent:function(a){if(b.isCopyKey(a)||a.shiftKey)b.stopEvent(a)},_onClick:function(a,d){var e=d.target,f=e===a.expandoNode||e===a.expandoNodeText;e=e===a.followNode;if(b.isCopyKey(d)){this._toggleSelectNode(a);this.focusNode(a)}else if(d.shiftKey){if(this.selectedNode){this._selectRange(this.selectedNode,
a);this.focusNode(a)}}else{if(e)this.onFollowClick(a.item,a,d);else if(this.openOnClick&&a.isExpandable||f)a.isExpandable&&this._onExpandoClick({node:a});else{this._publish("execute",{item:a.item,node:a,evt:d});this.onClick(a.item,a,d);this.focusNode(a)}!f&&!e&&this._selectNode(a)}e||b.stopEvent(d)},_onItemDelete:function(a){var d=this._itemNodesMap[this.model.getIdentity(a)];if(d){var e=this;b.forEach(d,function(f){e._removeFromSelection(f)})}this.inherited(arguments)},_getVisibleAncestor:function(a){if(!a)return null;
for(var d=a.getParent();d&&!(d.isExpandable&&d.isExpanded);){a=d;d=d.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,d){function e(h,j){var k=[];h=h;do{k.push(h);h=f._getNextNode(h)}while(h&&h!==j);if(h===
j){k.push(j);return k}return null}a=this._getVisibleAncestor(a);d=this._getVisibleAncestor(d);if(a&&d)if(a===d)this._selectNode(a);else{var f=this,g=e(a,d);if(g)this._selectNodes(g.reverse(),true);else(g=e(d,a))?this._selectNodes(g,true):console.debug("Warning: couldn't select range from "+a.label+" to "+d.label)}},_selectNode:function(a){this._selectNodes(a?[a]:null)},_selectNodes:function(a){this._forEachSelectedNode(function(f,g){g._destroyed||g.setSelected(false)});this.selectedNodes={};if(a)for(var d=
0;d<a.length;d++){var e=a[d];e.setSelected(true);this._addToSelection(e);this.selectedNode=e}}})});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(b,c,a){b.declare("orion.widgets.DirectoryPrompterDialog",[c.Dialog,orion.widgets._OrionDialogMixin],{treeWidget:null,treeRoot:{},widgetsInTemplate:true,templateString:b.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||b.style(this.messageCell,{display:"none"})},loadFolderList:function(d){d=a.makeRelative(d);this.treeRoot.Location=d;this.options.fileClient.loadWorkspace(d).then(b.hitch(this,function(e){for(var f in e)this.treeRoot[f]=
e[f];a.processNavigatorParent(this.treeRoot,e.Children);this.createTree()}))},createTree:function(){var d=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:d,showRoot:false,persist:true,openOnClick:false,getLabel:function(e){return e.Name},getIconClass:function(){return"folderItem"}});this.treeWidget.startup();b.byId(this.treeContentPane.id).appendChild(this.treeWidget.domNode)},
execute:function(){var d=this.treeWidget.getSelectedItems();this.onHide();this.options.func(d[0])}});orion.widgets.DirectoryTreeModel=function(){function d(e,f,g){this.registry=e;this.root=f;this.fileClient=g}d.prototype={destroy:function(){},getRoot:function(e){e(this.root)},mayHaveChildren:function(){return true},getChildren:function(e,f){if(e.children)f(e.children);else if(e.Directory!==undefined&&e.Directory===false)f([]);else e.Location?this.fileClient.fetchChildren(e.ChildrenLocation).then(b.hitch(this,
function(g){for(var h=[],j=0;j<g.length;j++)g[j].Directory&&h.push(g[j]);a.processNavigatorParent(e,h);f(h)})):f([])},getIdentity:function(e){return e.Name?e.Location:"ROOT"},getLabel:function(e){return e.Name},onChildrenChange:function(){}};return d}()});define("dojox",["dojo"],function(b){return dojox=b._dojox||{}});
define("dojox/form/uploader/Base",["dojo","dijit","dojox","dojox/form/uploader/Base","dijit/_Widget","dijit/_Templated"],function(b,c){b.declare("dojox.form.uploader.Base",[c._Widget,c._Templated],{getForm:function(){if(!this.form)for(var a=this.domNode;a&&a.tagName&&a!==document.body;){if(a.tagName.toLowerCase()=="form"){this.form=a;break}a=a.parentNode}return this.form},getUrl:function(){if(this.uploadUrl)this.url=this.uploadUrl;if(this.url)return this.url;if(this.getForm())this.url=this.form.action;
return this.url},connectForm:function(){this.url=this.getUrl();if(!this._fcon&&this.getForm()){this._fcon=true;this.connect(this.form,"onsubmit",function(a){b.stopEvent(a);this.submit(b.formToObject(this.form))})}},supports:function(a){if(!this._hascache){this._hascache={testDiv:b.create("div"),testInput:b.create("input",{type:"file"}),xhr:window.XMLHttpRequest?new XMLHttpRequest:{}};b.style(this._hascache.testDiv,"opacity",0.7)}switch(a){case "FormData":return!!window.FormData;case "sendAsBinary":return!!this._hascache.xhr.sendAsBinary;
case "opacity":return b.style(this._hascache.testDiv,"opacity")==0.7;case "multiple":if(this.force=="flash"||this.force=="iframe")return false;a=b.attr(this._hascache.testInput,"multiple");return a===true||a===false}return false},getMimeType:function(){return"application/octet-stream"},getFileType:function(a){return a.substring(a.lastIndexOf(".")+1).toUpperCase()},convertBytes:function(a){var d=Math.round(a/1024*1E5)/1E5,e=Math.round(a/1048576*1E5)/1E5,f=Math.round(a/1073741824*1E5)/1E5,g=a;if(d>
1)g=d.toFixed(1)+" kb";if(e>1)g=e.toFixed(1)+" mb";if(f>1)g=f.toFixed(1)+" gb";return{kb:d,mb:e,gb:f,bytes:a,value:g}}})});
define("dojox/form/Uploader",["dojo","dijit","dojox","dojox/form/uploader/Base"],function(b,c,a){b.declare("dojox.form.Uploader",[a.form.uploader.Base],{uploadOnSelect:false,tabIndex:0,multiple:false,label:"Upload...",url:"",name:"uploadedfile",flashFieldName:"",uploadType:"form",_nameIndex:0,widgetsInTemplate:true,templateString:'<div class="dojoxFileInput"><div dojoType="dijit.form.Button" dojoAttachPoint="button">${label}</div></div>',postMixInProperties:function(){this._inputs=[];this._getButtonStyle(this.srcNodeRef);
this.inherited(arguments)},postCreate:function(){var d=false,e=this._getNodePosition(this.domNode);if(!this.btnSize.w||!this.btnSize.h){b.body().appendChild(this.domNode);this._getButtonStyle(this.domNode);d=true}this._setButtonStyle();d&&b.place(this.domNode,e.node,e.pos);this.inherited(arguments)},onChange:function(){},onBegin:function(){},onProgress:function(){},onComplete:function(){this.reset()},onCancel:function(){},onAbort:function(){},onError:function(){},upload:function(){},submit:function(){},
reset:function(){this._disconnectButton();b.forEach(this._inputs,b.destroy,b);this._inputs=[];this._nameIndex=0;this._createInput()},getFileList:function(){var d=[];this.supports("multiple")?b.forEach(this.inputNode.files,function(e,f){d.push({index:f,name:e.name,size:e.size,type:e.type})},this):b.forEach(this._inputs,function(e,f){d.push({index:f,name:e.value.substring(e.value.lastIndexOf("\\")+1),size:0,type:e.value.substring(e.value.lastIndexOf(".")+1)})},this);return d},_getValueAttr:function(){return this.getFileList()},
_setValueAttr:function(){console.error("Uploader value is read only")},_getDisabledAttr:function(){return this._disabled},_setDisabledAttr:function(d){if(this._disabled!=d){this.button.set("disabled",d);b.style(this.inputNode,"display",d?"none":"block")}},_getNodePosition:function(d){if(d.previousSibling)return{node:d.previousSibling,pos:"after"};return{node:d.nextSibling,pos:"before"}},_getButtonStyle:function(d){this.btnSize=d?b.marginBox(d):{w:80,h:25}},_setButtonStyle:function(){var d=true;if(!this.domNode.parentNode||
!this.domNode.parentNode.tagName){document.body.appendChild(this.domNode);d=false}b.style(this.domNode,{width:this.btnSize.w+"px",height:this.btnSize.h+4+"px",overflow:"hidden",position:"relative"});this.inputNodeFontSize=Math.max(2,Math.max(Math.ceil(this.btnSize.w/60),Math.ceil(this.btnSize.h/15)));this._createInput();b.style(this.button.domNode,{margin:"0px",display:"block",verticalAlign:"top"});b.style(this.button.domNode.firstChild,{margin:"0px",display:"block"});d||document.body.removeChild(this.domNode)},
_createInput:function(){if(this._inputs.length){b.style(this.inputNode,{top:"500px"});this._disconnectButton();this._nameIndex++}var d;d=this.supports("multiple")?this.name+"s[]":this.name+(this.multiple?this._nameIndex:"");this.inputNode=b.create("input",{type:"file",name:d,className:"dojoxInputNode"},this.domNode,"first");this.supports("multiple")&&this.multiple&&b.attr(this.inputNode,"multiple",true);this._inputs.push(this.inputNode);b.style(this.inputNode,{fontSize:this.inputNodeFontSize+"em"});
d=b.marginBox(this.inputNode);b.style(this.inputNode,{position:"absolute",top:"-2px",left:"-"+(d.w-this.btnSize.w-2)+"px",opacity:0});this._connectButton()},_connectButton:function(){this._cons=[];var d=b.hitch(this,function(f){this._cons.push(b.connect(this.inputNode,f,this,function(){this.button._cssMouseEvent({type:f})}))});d("mouseover");d("mouseout");d("mousedown");this._cons.push(b.connect(this.inputNode,"change",this,function(f){this.onChange(this.getFileList(f));!this.supports("multiple")&&
this.multiple&&this._createInput()}));this.button.set("tabIndex",-1);if(this.tabIndex>-1){this.inputNode.tabIndex=this.tabIndex;var e=b.style(this.button.domNode.firstChild,"border");this._cons.push(b.connect(this.inputNode,"focus",this,function(){b.style(this.button.domNode.firstChild,"border","1px dashed #ccc")}));this._cons.push(b.connect(this.inputNode,"blur",this,function(){b.style(this.button.domNode.firstChild,"border",e)}))}},_disconnectButton:function(){b.forEach(this._cons,b.disconnect,
b)}});(function(){a.form.UploaderOrg=a.form.Uploader;var d=[a.form.UploaderOrg];a.form.addUploaderPlugin=function(e){d.push(e);b.declare("dojox.form.Uploader",d,{})}})()});
define("dojox/form/uploader/FileList",["dojo","dijit","dojox","dojox/form/uploader/Base","dijit/_Widget","dijit/_Templated"],function(b,c,a){b.declare("dojox.form.uploader.FileList",[a.form.uploader.Base],{uploaderId:"",uploader:null,headerIndex:"#",headerType:"Type",headerFilename:"File Name",headerFilesize:"Size",_upCheckCnt:0,rowAmt:0,templateString:'<div class="dojoxUploaderFileList"><div dojoAttachPoint="progressNode" class="dojoxUploaderFileListProgress"><div dojoAttachPoint="percentBarNode" class="dojoxUploaderFileListProgressBar"></div><div dojoAttachPoint="percentTextNode" class="dojoxUploaderFileListPercentText">0%</div></div><table class="dojoxUploaderFileListTable"><tr class="dojoxUploaderFileListHeader"><th class="dojoxUploaderIndex">${headerIndex}</th><th class="dojoxUploaderIcon">${headerType}</th><th class="dojoxUploaderFileName">${headerFilename}</th><th class="dojoxUploaderFileSize">${headerFilesize}</th></tr><tr ><td colSpan="4" class="dojoxUploaderFileListContainer" dojoAttachPoint="containerNode"><table class="dojoxUploaderFileListContent" dojoAttachPoint="listNode"></table></td><tr></table><div>',
postCreate:function(){this.setUploader();this.hideProgress()},reset:function(){for(var d=0;d<this.rowAmt;d++)this.listNode.deleteRow(0);this.rowAmt=0},setUploader:function(){if(!this.uploaderId&&!this.uploader)console.warn("uploaderId not passed to UploaderFileList");else if(this.uploaderId&&!this.uploader)this.uploader=c.byId(this.uploaderId);else if(this._upCheckCnt>4){console.warn("uploader not found for ID ",this.uploaderId);return}if(this.uploader){this.connect(this.uploader,"onChange","_onUploaderChange");
this.connect(this.uploader,"reset","reset");this.connect(this.uploader,"onBegin",function(){this.showProgress(true)});this.connect(this.uploader,"onProgress","_progress");this.connect(this.uploader,"onComplete",function(){setTimeout(b.hitch(this,function(){this.hideProgress(true)}),1250)})}else{this._upCheckCnt++;setTimeout(b.hitch(this,"setUploader"),250)}},hideProgress:function(d){this._hideShowProgress(d?{ani:true,endDisp:"none",beg:15,end:0}:{endDisp:"none",ani:false})},showProgress:function(d){this._hideShowProgress(d?
{ani:true,endDisp:"block",beg:0,end:15}:{endDisp:"block",ani:false})},_progress:function(d){this.percentTextNode.innerHTML=d.percent;b.style(this.percentBarNode,"width",d.percent)},_hideShowProgress:function(d){var e=this.progressNode,f=function(){b.style(e,"display",d.endDisp)};if(d.ani){b.style(e,"display","block");b.animateProperty({node:e,properties:{height:{start:d.beg,end:d.end,units:"px"}},onEnd:f}).play()}else f()},_onUploaderChange:function(d){this.reset();b.forEach(d,function(e,f){this._addRow(f+
1,this.getFileType(e.name),e.name,e.size)},this)},_addRow:function(d,e,f,g){var h,j=this.listNode.insertRow(-1);h=j.insertCell(-1);b.addClass(h,"dojoxUploaderIndex");h.innerHTML=d;h=j.insertCell(-1);b.addClass(h,"dojoxUploaderIcon");h.innerHTML=e;h=j.insertCell(-1);b.addClass(h,"dojoxUploaderFileName");h.innerHTML=f;h=j.insertCell(-1);b.addClass(h,"dojoxUploaderSize");h.innerHTML=this.convertBytes(g).value;this.rowAmt++}})});
define("dojo/io/iframe",["dojo"],function(b){b.getObject("io",true,b);b.io.iframe={create:function(c,a,d){if(window[c])return window[c];if(window.frames[c])return window.frames[c];var e=null;d=d;if(!d){b.config.useXDomain&&!b.config.dojoBlankHtmlUrl&&console.warn("dojo.io.iframe.create: 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");d=b.config.dojoBlankHtmlUrl||b.moduleUrl("dojo",
"resources/blank.html")}e=b.place('<iframe id="'+c+'" name="'+c+'" src="'+d+'" onload="'+a+'" style="position: absolute; left: 1px; top: 1px; height: 1px; width: 1px; visibility: hidden">',b.body());return window[c]=e},setSrc:function(c,a,d){try{if(d){var e;if(e=b.isIE||b.isWebKit?c.contentWindow.document:c.contentWindow)e.location.replace(a);else c.location=a}else if(b.isWebKit)c.location=a;else frames[c.name].location=a}catch(f){console.log("dojo.io.iframe.setSrc: ",f)}},doc:function(c){return c.contentDocument||
c.name&&c.document&&b.doc.getElementsByTagName("iframe")[c.name].contentWindow&&b.doc.getElementsByTagName("iframe")[c.name].contentWindow.document||c.name&&b.doc.frames[c.name]&&b.doc.frames[c.name].document||null},send:function(c){if(!this._frame)this._frame=this.create(this._iframeName,b._scopeName+".io.iframe._iframeOnload();");c=b._ioSetArgs(c,function(a){a.canceled=true;a.ioArgs._callNext()},function(a){var d=null;try{var e=a.ioArgs,f=b.io.iframe,g=f.doc(f._frame),h=e.handleAs;d=g;if(h!="html")if(h==
"xml"){if(b.isIE<9||b.isIE&&b.isQuirks){b.query("a",f._frame.contentWindow.document.documentElement).orphan();var j=f._frame.contentWindow.document.documentElement.innerText;j=j.replace(/>\s+</g,"><");j=b.trim(j);d=b._contentHandlers.xml({responseText:j})}}else{d=g.getElementsByTagName("textarea")[0].value;if(h=="json")d=b.fromJson(d);else if(h=="javascript")d=b.eval(d)}}catch(k){d=k}finally{e._callNext()}return d},function(a,d){d.ioArgs._hasError=true;d.ioArgs._callNext();return a});c.ioArgs._callNext=
function(){if(!this._calledNext){this._calledNext=true;b.io.iframe._currentDfd=null;b.io.iframe._fireNextRequest()}};this._dfdQueue.push(c);this._fireNextRequest();b._ioWatch(c,function(a){return!a.ioArgs._hasError},function(a){return!!a.ioArgs._finished},function(a){a.ioArgs._finished?a.callback(a):a.errback(new Error("Invalid dojo.io.iframe request state"))});return c},_currentDfd:null,_dfdQueue:[],_iframeName:b._scopeName+"IoIframe",_fireNextRequest:function(){try{if(!(this._currentDfd||this._dfdQueue.length==
0)){do var c=this._currentDfd=this._dfdQueue.shift();while(c&&c.canceled&&this._dfdQueue.length);if(!c||c.canceled)this._currentDfd=null;else{var a=c.ioArgs,d=a.args;a._contentToClean=[];var e=b.byId(d.form),f=d.content||{};if(e){if(f){var g=function(s,p){b.create("input",{type:"hidden",name:s,value:p},e);a._contentToClean.push(s)};for(var h in f){var j=f[h];if(b.isArray(j)&&j.length>1){var k;for(k=0;k<j.length;k++)g(h,j[k])}else if(e[h])e[h].value=j;else g(h,j)}}var l=e.getAttributeNode("action"),
m=e.getAttributeNode("method"),n=e.getAttributeNode("target");if(d.url){a._originalAction=l?l.value:null;if(l)l.value=d.url;else e.setAttribute("action",d.url)}if(!m||!m.value)if(m)m.value=d.method?d.method:"post";else e.setAttribute("method",d.method?d.method:"post");a._originalTarget=n?n.value:null;if(n)n.value=this._iframeName;else e.setAttribute("target",this._iframeName);e.target=this._iframeName;b._ioNotifyStart(c);e.submit()}else{g=d.url+(d.url.indexOf("?")>-1?"&":"?")+a.query;b._ioNotifyStart(c);
this.setSrc(this._frame,g,true)}}}}catch(r){c.errback(r)}},_iframeOnload:function(){var c=this._currentDfd;if(c){c=c.ioArgs;var a=b.byId(c.args.form);if(a){for(var d=c._contentToClean,e=0;e<d.length;e++)for(var f=d[e],g=0;g<a.childNodes.length;g++){var h=a.childNodes[g];if(h.name==f){b.destroy(h);break}}c._originalAction&&a.setAttribute("action",c._originalAction);if(c._originalTarget){a.setAttribute("target",c._originalTarget);a.target=c._originalTarget}}c._finished=true}else this._fireNextRequest()}};
return b.io.iframe});
define("dojox/form/uploader/plugins/HTML5",["dojo","dijit","dojox","dojox/form/Uploader"],function(b,c,a){b.declare("dojox.form.uploader.plugins.HTML5",[],{errMsg:"Error uploading files. Try checking permissions",uploadType:"html5",postCreate:function(){this.connectForm();this.inherited(arguments);this.uploadOnSelect&&this.connect(this,"onChange","upload")},upload:function(d){this.onBegin(this.getFileList());if(this.supports("FormData"))this.uploadWithFormData(d);else this.supports("sendAsBinary")&&this.sendAsBinary(d)},
submit:function(d){d=d?d.tagName?d:this.getForm():this.getForm();d=b.formToObject(d);console.log("form data:",d);this.upload(d)},sendAsBinary:function(d){if(this.getUrl()){var e="---------------------------"+(new Date).getTime(),f=this.createXhr();f.setRequestHeader("Content-Type","multipart/form-data; boundary="+e);(d=this._buildRequestBody(d,e))?f.sendAsBinary(d):this.onError(this.errMsg)}else console.error("No upload url found.",this)},uploadWithFormData:function(d){if(this.getUrl()){var e=new FormData;
b.forEach(this.inputNode.files,function(g){e.append(this.name+"s[]",g)},this);if(d)for(var f in d)e.append(f,d[f]);this.createXhr().send(e)}else console.error("No upload url found.",this)},_xhrProgress:function(d){if(d.lengthComputable){var e={bytesLoaded:d.loaded,bytesTotal:d.total,type:d.type,timeStamp:d.timeStamp};if(d.type=="load"){e.percent="100%";e.decimal=1}else{e.decimal=d.loaded/d.total;e.percent=Math.ceil(d.loaded/d.total*100)+"%"}this.onProgress(e)}},createXhr:function(){var d=new XMLHttpRequest,
e;d.upload.addEventListener("progress",b.hitch(this,"_xhrProgress"),false);d.addEventListener("load",b.hitch(this,"_xhrProgress"),false);d.addEventListener("error",b.hitch(this,function(f){this.onError(f);clearInterval(e)}),false);d.addEventListener("abort",b.hitch(this,function(f){this.onAbort(f);clearInterval(e)}),false);d.onreadystatechange=b.hitch(this,function(){if(d.readyState===4){console.info("COMPLETE");clearInterval(e);this.onComplete(b.eval(d.responseText))}});d.open("POST",this.getUrl());
e=setInterval(b.hitch(this,function(){}),250);return d},_buildRequestBody:function(d,e){var f="";e="--"+e;var g=[];b.forEach(this.inputNode.files,function(j,k){j=this.name+"s[]";var l=this.inputNode.files[k].fileName,m;try{m=this.inputNode.files[k].getAsBinary()+"\r\n";f+=e+"\r\n";f+="Content-Disposition: form-data; ";f+='name="'+j+'"; ';f+='filename="'+l+'"\r\n';f+="Content-Type: "+this.getMimeType()+"\r\n\r\n";f+=m}catch(n){g.push({index:k,name:l})}},this);if(g.length)if(g.length>=this.inputNode.files.length){this.onError({message:this.errMsg,
filesInError:g});f=false}if(!f)return false;if(d)for(var h in d){f+=e+"\r\n";f+="Content-Disposition: form-data; ";f+='name="'+h+'"\r\n\r\n';f+=d[h]+"\r\n"}f+=e+"--\r\n";return f}});a.form.addUploaderPlugin(a.form.uploader.plugins.HTML5)});
define("dojox/form/uploader/plugins/IFrame",["dojo","dijit","dojox","dojo/io/iframe","dojox/form/uploader/plugins/HTML5","dojox/form/Uploader"],function(b,c,a){b.declare("dojox.form.uploader.plugins.IFrame",[],{force:"",postMixInProperties:function(){this.inherited(arguments);if(!this.supports("multiple"))this.uploadType="iframe"},upload:function(d){if(!this.supports("multiple")||this.force=="iframe"){this.uploadIFrame(d);b.stopEvent(d)}},uploadIFrame:function(){this.getUrl();b.io.iframe.send({url:this.getUrl(),
form:this.form,handleAs:"json",error:b.hitch(this,function(d){console.error("HTML Upload Error:"+d.message)}),load:b.hitch(this,function(d){this.onComplete(d)})})}});a.form.addUploaderPlugin(a.form.uploader.plugins.IFrame)});define("text!dijit/templates/ProgressBar.html",function(){return'<div class="dijitProgressBar dijitProgressBarEmpty" role="progressbar"\n\t><div  dojoAttachPoint="internalProgress" class="dijitProgressBarFull"\n\t\t><div class="dijitProgressBarTile" role="presentation"></div\n\t\t><span style="visibility:hidden">&nbsp;</span\n\t></div\n\t><div dojoAttachPoint="labelNode" class="dijitProgressBarLabel" id="${id}_label"></div\n\t><img dojoAttachPoint="indeterminateHighContrastImage" class="dijitProgressBarIndeterminateHighContrastImage" alt=""\n/></div>'});
define("dojo/cldr/nls/number",{root:{scientificFormat:"#E0","currencySpacing-afterCurrency-currencyMatch":"[:letter:]",infinity:"\u221e",list:";",percentSign:"%",minusSign:"-","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]","decimalFormat-short":"000T","currencySpacing-afterCurrency-insertBetween":"\u00a0",nan:"NaN",nativeZeroDigit:"0",plusSign:"+","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]","currencySpacing-beforeCurrency-currencyMatch":"[:letter:]",currencyFormat:"\u00a4\u00a0#,##0.00",
perMille:"\u2030",group:",",percentFormat:"#,##0%",decimalFormat:"#,##0.###",decimal:".",patternDigit:"#","currencySpacing-beforeCurrency-insertBetween":"\u00a0",exponential:"E"},ar:true,ca:true,cs:true,da:true,de:true,el:true,en:true,"en-au":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});
define("dojo/cldr/nls/en/number",{group:",",percentSign:"%",exponential:"E",scientificFormat:"#E0",percentFormat:"#,##0%",list:";",infinity:"\u221e",patternDigit:"#",minusSign:"-",decimal:".",nan:"NaN",nativeZeroDigit:"0",perMille:"\u2030",decimalFormat:"#,##0.###",currencyFormat:"\u00a4#,##0.00;(\u00a4#,##0.00)",plusSign:"+","decimalFormat-short":"000T"});
define("dojo/number",["dojo","dojo/i18n","i18n!dojo/cldr/nls/number","dojo/string","dojo/regexp"],function(b){b.getObject("number",true,b);b.number.format=function(c,a){a=b.mixin({},a||{});var d=b.i18n.normalizeLocale(a.locale);d=b.i18n.getLocalization("dojo.cldr","number",d);a.customs=d;d=a.pattern||d[(a.type||"decimal")+"Format"];if(isNaN(c)||Math.abs(c)==Infinity)return null;return b.number._applyPattern(c,d,a)};b.number._numberPatternRE=/[#0,]*[#0](?:\.0*#*)?/;b.number._applyPattern=function(c,
a,d){d=d||{};var e=d.customs.group,f=d.customs.decimal;a=a.split(";");var g=a[0];a=a[c<0?1:0]||"-"+g;if(a.indexOf("%")!=-1)c*=100;else if(a.indexOf("\u2030")!=-1)c*=1E3;else if(a.indexOf("\u00a4")!=-1){e=d.customs.currencyGroup||e;f=d.customs.currencyDecimal||f;a=a.replace(/\u00a4{1,3}/,function(j){return d[["symbol","currency","displayName"][j.length-1]]||d.currency||""})}else if(a.indexOf("E")!=-1)throw new Error("exponential notation not supported");var h=b.number._numberPatternRE;g=g.match(h);
if(!g)throw new Error("unable to find a number expression in pattern: "+a);if(d.fractional===false)d.places=0;return a.replace(h,b.number._formatAbsolute(c,g[0],{decimal:f,group:e,places:d.places,round:d.round}))};b.number.round=function(c,a,d){d=10/(d||10);return(d*+c).toFixed(a)/d};(0.9).toFixed()==0&&function(){var c=b.number.round;b.number.round=function(a,d,e){var f=Math.pow(10,-d||0),g=Math.abs(a);if(!a||g>=f||g*Math.pow(10,d+1)<5)f=0;return c(a,d,e)+(a>0?f:-f)}}();b.number._formatAbsolute=
function(c,a,d){d=d||{};if(d.places===true)d.places=0;if(d.places===Infinity)d.places=6;a=a.split(".");var e=typeof d.places=="string"&&d.places.indexOf(","),f=d.places;if(e)f=d.places.substring(e+1);else if(!(f>=0))f=(a[1]||[]).length;d.round<0||(c=b.number.round(c,f,d.round));c=String(Math.abs(c)).split(".");var g=c[1]||"";if(a[1]||d.places){if(e)d.places=d.places.substring(0,e);e=d.places!==undefined?d.places:a[1]&&a[1].lastIndexOf("0")+1;if(e>g.length)c[1]=b.string.pad(g,e,"0",true);if(f<g.length)c[1]=
g.substr(0,f)}else c[1]&&c.pop();f=a[0].replace(",","");e=f.indexOf("0");if(e!=-1){e=f.length-e;if(e>c[0].length)c[0]=b.string.pad(c[0],e);if(f.indexOf("#")==-1)c[0]=c[0].substr(c[0].length-e)}f=a[0].lastIndexOf(",");var h,j;if(f!=-1){h=a[0].length-f-1;a=a[0].substr(0,f);f=a.lastIndexOf(",");if(f!=-1)j=a.length-f-1}a=[];for(f=c[0];f;){e=f.length-h;a.push(e>0?f.substr(e):f);f=e>0?f.slice(0,e):"";if(j){h=j;delete j}}c[0]=a.reverse().join(d.group||",");return c.join(d.decimal||".")};b.number.regexp=
function(c){return b.number._parseInfo(c).regexp};b.number._parseInfo=function(c){c=c||{};var a=b.i18n.normalizeLocale(c.locale);a=b.i18n.getLocalization("dojo.cldr","number",a);var d=c.pattern||a[(c.type||"decimal")+"Format"],e=a.group,f=a.decimal,g=1;if(d.indexOf("%")!=-1)g/=100;else if(d.indexOf("\u2030")!=-1)g/=1E3;else{var h=d.indexOf("\u00a4")!=-1;if(h){e=a.currencyGroup||e;f=a.currencyDecimal||f}}a=d.split(";");a.length==1&&a.push("-"+a[0]);a=b.regexp.buildGroupRE(a,function(j){j="(?:"+b.regexp.escapeString(j,
".")+")";return j.replace(b.number._numberPatternRE,function(k){var l={signed:false,separator:c.strict?e:[e,""],fractional:c.fractional,decimal:f,exponent:false};k=k.split(".");var m=c.places;if(k.length==1&&g!=1)k[1]="###";if(k.length==1||m===0)l.fractional=false;else{if(m===undefined)m=c.pattern?k[1].lastIndexOf("0")+1:Infinity;if(m&&c.fractional==undefined)l.fractional=true;if(!c.places&&m<k[1].length)m+=","+k[1].length;l.places=m}k=k[0].split(",");if(k.length>1){l.groupSize=k.pop().length;if(k.length>
1)l.groupSize2=k.pop().length}return"("+b.number._realNumberRegexp(l)+")"})},true);if(h)a=a.replace(/([\s\xa0]*)(\u00a4{1,3})([\s\xa0]*)/g,function(j,k,l,m){j=b.regexp.escapeString(c[["symbol","currency","displayName"][l.length-1]]||c.currency||"");k=k?"[\\s\\xa0]":"";m=m?"[\\s\\xa0]":"";if(!c.strict){if(k)k+="*";if(m)m+="*";return"(?:"+k+j+m+")?"}return k+j+m});return{regexp:a.replace(/[\xa0 ]/g,"[\\s\\xa0]"),group:e,decimal:f,factor:g}};b.number.parse=function(c,a){a=b.number._parseInfo(a);c=(new RegExp("^"+
a.regexp+"$")).exec(c);if(!c)return NaN;var d=c[1];if(!c[1]){if(!c[2])return NaN;d=c[2];a.factor*=-1}d=d.replace(new RegExp("["+a.group+"\\s\\xa0]","g"),"").replace(a.decimal,".");return d*a.factor};b.number._realNumberRegexp=function(c){c=c||{};if(!("places"in c))c.places=Infinity;if(typeof c.decimal!="string")c.decimal=".";if(!("fractional"in c)||/^0/.test(c.places))c.fractional=[true,false];if(!("exponent"in c))c.exponent=[true,false];if(!("eSigned"in c))c.eSigned=[true,false];var a=b.number._integerRegexp(c),
d=b.regexp.buildGroupRE(c.fractional,function(f){var g="";if(f&&c.places!==0){g="\\"+c.decimal;if(c.places==Infinity)g="(?:"+g+"\\d+)?";else g+="\\d{"+c.places+"}"}return g},true),e=b.regexp.buildGroupRE(c.exponent,function(f){if(f)return"([eE]"+b.number._integerRegexp({signed:c.eSigned})+")";return""});a=a+d;if(d)a="(?:(?:"+a+")|(?:"+d+"))";return a+e};b.number._integerRegexp=function(c){c=c||{};if(!("signed"in c))c.signed=[true,false];if("separator"in c){if(!("groupSize"in c))c.groupSize=3}else c.separator=
"";var a=b.regexp.buildGroupRE(c.signed,function(e){return e?"[-+]":""},true),d=b.regexp.buildGroupRE(c.separator,function(e){if(!e)return"(?:\\d+)";e=b.regexp.escapeString(e);if(e==" ")e="\\s";else if(e=="\u00a0")e="\\s\\xa0";var f=c.groupSize,g=c.groupSize2;if(g){e="(?:0|[1-9]\\d{0,"+(g-1)+"}(?:["+e+"]\\d{"+g+"})*["+e+"]\\d{"+f+"})";return f-g>0?"(?:"+e+"|(?:0|[1-9]\\d{0,"+(f-1)+"}))":e}return"(?:0|[1-9]\\d{0,"+(f-1)+"}(?:["+e+"]\\d{"+f+"})*)"},true);return a+d};return b.number});
define("dijit/ProgressBar",["dojo","dijit","text!dijit/templates/ProgressBar.html","dojo/fx","dojo/number","dijit/_Widget","dijit/_Templated"],function(b,c){b.declare("dijit.ProgressBar",[c._Widget,c._Templated],{progress:"0",value:"",maximum:100,places:0,indeterminate:false,label:"",name:"",templateString:b.cache("dijit","templates/ProgressBar.html"),_indeterminateHighContrastImagePath:b.moduleUrl("dijit","themes/a11y/indeterminate_progress.gif"),postMixInProperties:function(){this.inherited(arguments);
if(!("value"in this.params))this.value=this.indeterminate?Infinity:this.progress},buildRendering:function(){this.inherited(arguments);this.indeterminateHighContrastImage.setAttribute("src",this._indeterminateHighContrastImagePath.toString());this.update()},update:function(a){b.mixin(this,a||{});a=this.internalProgress;var d=this.domNode,e=1;if(this.indeterminate){c.removeWaiState(d,"valuenow");c.removeWaiState(d,"valuemin");c.removeWaiState(d,"valuemax")}else{if(String(this.progress).indexOf("%")!=
-1){e=Math.min(parseFloat(this.progress)/100,1);this.progress=e*this.maximum}else{this.progress=Math.min(this.progress,this.maximum);e=this.progress/this.maximum}c.setWaiState(d,"describedby",this.labelNode.id);c.setWaiState(d,"valuenow",this.progress);c.setWaiState(d,"valuemin",0);c.setWaiState(d,"valuemax",this.maximum)}this.labelNode.innerHTML=this.report(e);b.toggleClass(this.domNode,"dijitProgressBarIndeterminate",this.indeterminate);a.style.width=e*100+"%";this.onChange()},_setValueAttr:function(a){this._set("value",
a);a==Infinity?this.update({indeterminate:true}):this.update({indeterminate:false,progress:a})},_setLabelAttr:function(a){this._set("label",a);this.update()},_setIndeterminateAttr:function(a){this.indeterminate=a;this.update()},report:function(a){return this.label?this.label:this.indeterminate?"&nbsp;":b.number.format(a,{type:"percent",places:this.places,locale:this.lang})},onChange:function(){}});return c.ProgressBar});define("text!orion/widgets/templates/ImportDialog.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\n\t\t<form method="post" id="importDialog.myForm"\n\t\t\tenctype="multipart/form-data" >\n\t\t\t<fieldset>\n\t\t\t\t<div style="display: table-row">\n\t\t\t\t\t<div style="display: table-row; height: 20px">\n\t\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t\t\tFile:\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div style="display: table-cell; padding: 1px; vertical-align: top;">\n\t\t\t\t\t\t\t<div id="files" dojoType="dojox.form.uploader.FileList" uploaderId="importDialog.uploader"></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t\t\t<input name="uploadedfile" multiple="false" type="file" id="importDialog.uploader" force="iframe"\n\t\t\t\t\t\t\t\tdojoType="dojox.form.Uploader" style="height: 20px" label="Browse..." >\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-row">\n\t\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t\t\t<input type="submit" label="Finish" value="OK" dojoType="dijit.form.Button"\n\t\t\t\t\t\t\t\tstyle="padding: 20 0 10 0; float: right; clear: both;"/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\t\n\t\t\t</fieldset>\n\t\t</form>\n\t</div>\n</div>'});
define("orion/widgets/ImportDialog",["dojo","dijit","dojox","dijit/Dialog","dojo/data/ItemFileReadStore","dojox/form/Uploader","dojox/form/uploader/FileList","dojox/form/uploader/plugins/IFrame","dijit/form/Button","dijit/ProgressBar","orion/widgets/_OrionDialogMixin","text!orion/widgets/templates/ImportDialog.html"],function(b,c){b.declare("orion.widgets.ImportDialog",[c.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:true,templateString:b.cache("orion","widgets/templates/ImportDialog.html"),
constructor:function(){this.inherited(arguments);this.options=arguments[0]||{}},postMixInProperties:function(){this.inherited(arguments);this.title="Import from zip"},postCreate:function(){this.inherited(arguments);b.byId("importDialog.myForm").action=this.options.importLocation;b.byId("importDialog.uploader").url=this.options.importLocation;b.connect(c.byId("importDialog.uploader"),"onError",b.hitch(this,function(){setTimeout(b.hitch(this,function(){this.hide()}),2E3)}));b.connect(c.byId("importDialog.uploader"),
"onComplete",b.hitch(this,function(){setTimeout(b.hitch(this,function(){this.hide();this.options.func()}),2E3)}))}})});define("text!dijit/form/templates/DropDownBox.html",function(){return'<div class="dijit dijitReset dijitInlineTable dijitLeft"\n\tid="widget_${id}"\n\trole="combobox"\n\t><div class=\'dijitReset dijitRight dijitButtonNode dijitArrowButton dijitDownArrowButton dijitArrowButtonContainer\'\n\t\tdojoAttachPoint="_buttonNode, _popupStateNode" role="presentation"\n\t\t><input class="dijitReset dijitInputField dijitArrowButtonInner" value="&#9660; " type="text" tabIndex="-1" readonly="readonly" role="presentation"\n\t\t\t${_buttonInputDisabled}\n\t/></div\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\' ${!nameAttrSetting} type="text" autocomplete="off"\n\t\t\tdojoAttachPoint="textbox,focusNode" role="textbox" aria-haspopup="true"\n\t/></div\n></div>'});
define("dijit/form/nls/ComboBox",{root:{previousMessage:"Previous choices",nextMessage:"More choices"},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/ComboBox",["dojo","dijit","text!dijit/form/templates/DropDownBox.html","dojo/window","dojo/regexp","dojo/data/util/simpleFetch","dojo/data/util/filter","dijit/_CssStateMixin","dijit/form/_FormWidget","dijit/form/ValidationTextBox","dijit/_HasDropDown","i18n!dijit/form/nls/ComboBox"],function(b,c){b.declare("dijit.form.ComboBoxMixin",c._HasDropDown,{item:null,pageSize:Infinity,store:null,fetchProperties:{},query:{},autoComplete:true,highlightMatch:"first",searchDelay:100,searchAttr:"name",
labelAttr:"",labelType:"text",queryExpr:"${0}*",ignoreCase:true,hasDownArrow:true,templateString:b.cache("dijit.form","templates/DropDownBox.html"),baseClass:"dijitTextBox dijitComboBox",dropDownClass:"dijit.form._ComboBoxMenu",cssStateNodes:{_buttonNode:"dijitDownArrowButton"},maxHeight:-1,_stopClickEvents:false,_getCaretPos:function(a){var d=0;if(typeof a.selectionStart=="number")d=a.selectionStart;else if(b.isIE){var e=b.doc.selection.createRange().duplicate();a=a.createTextRange();e.move("character",
0);a.move("character",0);try{a.setEndPoint("EndToEnd",e);d=String(a.text).replace(/\r/g,"").length}catch(f){}}return d},_setCaretPos:function(a,d){d=parseInt(d);c.selectInputText(a,d,d)},_setDisabledAttr:function(a){this.inherited(arguments);c.setWaiState(this.domNode,"disabled",a)},_abortQuery:function(){if(this.searchTimer){clearTimeout(this.searchTimer);this.searchTimer=null}if(this._fetchHandle){this._fetchHandle.abort&&this._fetchHandle.abort();this._fetchHandle=null}},_onInput:function(a){if(!this.searchTimer&&
(a.type=="paste"||a.type=="input")&&this._lastInput!=this.textbox.value)this.searchTimer=setTimeout(b.hitch(this,function(){this._onKey({charOrCode:229})}),100);this.inherited(arguments)},_onKey:function(a){var d=a.charOrCode;if(!(a.altKey||(a.ctrlKey||a.metaKey)&&d!="x"&&d!="v"||d==b.keys.SHIFT)){var e=false,f=this.dropDown,g=b.keys,h=null;this._prev_key_backspace=false;this._abortQuery();this.inherited(arguments);if(this._opened)h=f.getHighlightedOption();switch(d){case g.PAGE_DOWN:case g.DOWN_ARROW:case g.PAGE_UP:case g.UP_ARROW:this._opened&&
this._announceOption(h);b.stopEvent(a);break;case g.ENTER:if(h)if(h==f.nextButton){this._nextSearch(1);b.stopEvent(a);break}else{if(h==f.previousButton){this._nextSearch(-1);b.stopEvent(a);break}}else{this._setBlurValue();this._setCaretPos(this.focusNode,this.focusNode.value.length)}if(this._opened||this._fetchHandle)a.preventDefault();case g.TAB:d=this.get("displayedValue");if(f&&(d==f._messages.previousMessage||d==f._messages.nextMessage))break;h&&this._selectOption();if(this._opened){this._lastQuery=
null;this.closeDropDown()}break;case " ":if(h){b.stopEvent(a);this._selectOption();this.closeDropDown()}else e=true;break;case g.DELETE:case g.BACKSPACE:e=this._prev_key_backspace=true;break;default:e=typeof d=="string"||d==229}if(e){this.item=undefined;this.searchTimer=setTimeout(b.hitch(this,"_startSearchFromInput"),1)}}},_autoCompleteText:function(a){var d=this.focusNode;c.selectInputText(d,d.value.length);var e=this.ignoreCase?"toLowerCase":"substr";if(a[e](0).indexOf(this.focusNode.value[e](0))==
0){e=this._getCaretPos(d);if(e+1>d.value.length){d.value=a;c.selectInputText(d,e)}}else{d.value=a;c.selectInputText(d)}},_openResultList:function(a,d){this._fetchHandle=null;if(!(this.disabled||this.readOnly||d.query[this.searchAttr]!=this._lastQuery)){var e=this.dropDown._highlighted_option&&b.hasClass(this.dropDown._highlighted_option,"dijitMenuItemSelected");this.dropDown.clearResultList();if(!a.length&&!this._maxOptions)this.closeDropDown();else{d._maxOptions=this._maxOptions;a=this.dropDown.createOptions(a,
d,b.hitch(this,"_getMenuLabelFromItem"));this._showResultList();if(d.direction){if(1==d.direction)this.dropDown.highlightFirstOption();else-1==d.direction&&this.dropDown.highlightLastOption();e&&this._announceOption(this.dropDown.getHighlightedOption())}else this.autoComplete&&!this._prev_key_backspace&&!/^[*]+$/.test(d.query[this.searchAttr])&&this._announceOption(a[1])}}},_showResultList:function(){this.closeDropDown(true);this.displayMessage("");this.openDropDown();c.setWaiState(this.domNode,"expanded",
"true")},loadDropDown:function(){this._startSearchAll()},isLoaded:function(){return false},closeDropDown:function(){this._abortQuery();if(this._opened){this.inherited(arguments);c.setWaiState(this.domNode,"expanded","false");c.removeWaiState(this.focusNode,"activedescendant")}},_setBlurValue:function(){var a=this.get("displayedValue"),d=this.dropDown;if(d&&(a==d._messages.previousMessage||a==d._messages.nextMessage))this._setValueAttr(this._lastValueReported,true);else if(typeof this.item=="undefined"){this.item=
null;this.set("displayedValue",a)}else{this.value!=this._lastValueReported&&c.form._FormValueWidget.prototype._setValueAttr.call(this,this.value,true);this._refreshState()}},_onBlur:function(){this.closeDropDown();this.inherited(arguments)},_setItemAttr:function(a,d,e){e||(e=this.store.getValue(a,this.searchAttr));var f=this._getValueField()!=this.searchAttr?this.store.getIdentity(a):e;this._set("item",a);c.form.ComboBox.superclass._setValueAttr.call(this,f,d,e)},_announceOption:function(a){if(a){var d;
if(a==this.dropDown.nextButton||a==this.dropDown.previousButton){d=a.innerHTML;this.item=undefined;this.value=""}else{d=this.store.getValue(a.item,this.searchAttr).toString();this.set("item",a.item,false,d)}this.focusNode.value=this.focusNode.value.substring(0,this._lastInput.length);c.setWaiState(this.focusNode,"activedescendant",b.attr(a,"id"));this._autoCompleteText(d)}},_selectOption:function(a){a&&this._announceOption(a.target);this.closeDropDown();this._setCaretPos(this.focusNode,this.focusNode.value.length);
c.form._FormValueWidget.prototype._setValueAttr.call(this,this.value,true)},_startSearchAll:function(){this._startSearch("")},_startSearchFromInput:function(){this._startSearch(this.focusNode.value.replace(/([\\\*\?])/g,"\\$1"))},_getQueryString:function(a){return b.string.substitute(this.queryExpr,[a])},_startSearch:function(a){if(!this.dropDown){var d=this.id+"_popup";this.dropDown=new (b.getObject(this.dropDownClass,false))({onChange:b.hitch(this,this._selectOption),id:d,dir:this.dir});c.removeWaiState(this.focusNode,
"activedescendant");c.setWaiState(this.textbox,"owns",d)}d=b.clone(this.query);this._lastInput=a;this._lastQuery=d[this.searchAttr]=this._getQueryString(a);this.searchTimer=setTimeout(b.hitch(this,function(e,f){this.searchTimer=null;e={queryOptions:{ignoreCase:this.ignoreCase,deep:true},query:e,onBegin:b.hitch(this,"_setMaxOptions"),onComplete:b.hitch(this,"_openResultList"),onError:function(g){f._fetchHandle=null;console.error("dijit.form.ComboBox: "+g);f.closeDropDown()},start:0,count:this.pageSize};
b.mixin(e,f.fetchProperties);this._fetchHandle=f.store.fetch(e);this._nextSearch=this.dropDown.onPage=b.hitch(this,function(g,h){g.start+=g.count*h;g.direction=h;this._fetchHandle=this.store.fetch(g);this.focus()},this._fetchHandle)},d,this),this.searchDelay)},_setMaxOptions:function(a){this._maxOptions=a},_getValueField:function(){return this.searchAttr},constructor:function(){this.query={};this.fetchProperties={}},postMixInProperties:function(){if(!this.store){this.store=new c.form._ComboBoxDataStore(this.srcNodeRef);
if(!("value"in this.params)){var a=this.item=this.store.fetchSelectedItem();if(a){var d=this._getValueField();this.value=this.store.getValue(a,d)}}}this.inherited(arguments)},postCreate:function(){var a=b.query('label[for="'+this.id+'"]');if(a.length){a[0].id=this.id+"_label";c.setWaiState(this.domNode,"labelledby",a[0].id)}this.inherited(arguments)},_setHasDownArrowAttr:function(a){this.hasDownArrow=a;this._buttonNode.style.display=a?"":"none"},_getMenuLabelFromItem:function(a){a=this.labelFunc(a,
this.store);var d=this.labelType;if(this.highlightMatch!="none"&&this.labelType=="text"&&this._lastInput){a=this.doHighlight(a,this._escapeHtml(this._lastInput));d="html"}return{html:d=="html",label:a}},doHighlight:function(a,d){var e=(this.ignoreCase?"i":"")+(this.highlightMatch=="all"?"g":""),f=this.queryExpr.indexOf("${0}");d=b.regexp.escapeString(d);return this._escapeHtml(a).replace(new RegExp((f==0?"^":"")+"("+d+")"+(f==this.queryExpr.length-4?"$":""),e),'<span class="dijitComboBoxHighlightMatch">$1</span>')},
_escapeHtml:function(a){return a=String(a).replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;")},reset:function(){this.item=null;this.inherited(arguments)},labelFunc:function(a,d){return d.getValue(a,this.labelAttr||this.searchAttr).toString()}});b.declare("dijit.form._ComboBoxMenu",[c._Widget,c._Templated,c._CssStateMixin],{templateString:"<ul class='dijitReset dijitMenu' dojoAttachEvent='onmousedown:_onMouseDown,onmouseup:_onMouseUp,onmouseover:_onMouseOver,onmouseout:_onMouseOut' style='overflow: \"auto\"; overflow-x: \"hidden\";'><li class='dijitMenuItem dijitMenuPreviousButton' dojoAttachPoint='previousButton' role='option'></li><li class='dijitMenuItem dijitMenuNextButton' dojoAttachPoint='nextButton' role='option'></li></ul>",
_messages:null,baseClass:"dijitComboBoxMenu",postMixInProperties:function(){this.inherited(arguments);this._messages=b.i18n.getLocalization("dijit.form","ComboBox",this.lang)},buildRendering:function(){this.inherited(arguments);this.previousButton.innerHTML=this._messages.previousMessage;this.nextButton.innerHTML=this._messages.nextMessage},_setValueAttr:function(a){this.value=a;this.onChange(a)},onChange:function(){},onPage:function(){},onClose:function(){this._blurOptionNode()},_createOption:function(a,
d){var e=b.create("li",{"class":"dijitReset dijitMenuItem"+(this.isLeftToRight()?"":" dijitMenuItemRtl"),role:"option"});d=d(a);if(d.html)e.innerHTML=d.label;else e.appendChild(b.doc.createTextNode(d.label));if(e.innerHTML=="")e.innerHTML="&nbsp;";e.item=a;return e},createOptions:function(a,d,e){this.previousButton.style.display=d.start==0?"none":"";b.attr(this.previousButton,"id",this.id+"_prev");b.forEach(a,function(g,h){g=this._createOption(g,e);b.attr(g,"id",this.id+h);this.domNode.insertBefore(g,
this.nextButton)},this);var f=false;if(d._maxOptions&&d._maxOptions!=-1)if(d.start+d.count<d._maxOptions)f=true;else{if(d.start+d.count>d._maxOptions&&d.count==a.length)f=true}else if(d.count==a.length)f=true;this.nextButton.style.display=f?"":"none";b.attr(this.nextButton,"id",this.id+"_next");return this.domNode.childNodes},clearResultList:function(){for(;this.domNode.childNodes.length>2;)this.domNode.removeChild(this.domNode.childNodes[this.domNode.childNodes.length-2]);this._blurOptionNode()},
_onMouseDown:function(a){b.stopEvent(a)},_onMouseUp:function(a){if(!(a.target===this.domNode||!this._highlighted_option))if(a.target==this.previousButton){this._blurOptionNode();this.onPage(-1)}else if(a.target==this.nextButton){this._blurOptionNode();this.onPage(1)}else{for(a=a.target;!a.item;)a=a.parentNode;this._setValueAttr({target:a},true)}},_onMouseOver:function(a){if(a.target!==this.domNode){a=a.target;if(!(a==this.previousButton||a==this.nextButton))for(;!a.item;)a=a.parentNode;this._focusOptionNode(a)}},
_onMouseOut:function(a){a.target!==this.domNode&&this._blurOptionNode()},_focusOptionNode:function(a){if(this._highlighted_option!=a){this._blurOptionNode();this._highlighted_option=a;b.addClass(this._highlighted_option,"dijitMenuItemSelected")}},_blurOptionNode:function(){if(this._highlighted_option){b.removeClass(this._highlighted_option,"dijitMenuItemSelected");this._highlighted_option=null}},_highlightNextOption:function(){if(this.getHighlightedOption()){var a=this._highlighted_option.nextSibling;
a&&a.style.display!="none"?this._focusOptionNode(a):this.highlightFirstOption()}else{a=this.domNode.firstChild;this._focusOptionNode(a.style.display=="none"?a.nextSibling:a)}b.window.scrollIntoView(this._highlighted_option)},highlightFirstOption:function(){var a=this.domNode.firstChild,d=a.nextSibling;this._focusOptionNode(d.style.display=="none"?a:d);b.window.scrollIntoView(this._highlighted_option)},highlightLastOption:function(){this._focusOptionNode(this.domNode.lastChild.previousSibling);b.window.scrollIntoView(this._highlighted_option)},
_highlightPrevOption:function(){if(this.getHighlightedOption()){var a=this._highlighted_option.previousSibling;a&&a.style.display!="none"?this._focusOptionNode(a):this.highlightLastOption()}else{a=this.domNode.lastChild;this._focusOptionNode(a.style.display=="none"?a.previousSibling:a)}b.window.scrollIntoView(this._highlighted_option)},_page:function(a){var d=0,e=this.domNode.scrollTop,f=b.style(this.domNode,"height");for(this.getHighlightedOption()||this._highlightNextOption();d<f;){if(a){if(!this.getHighlightedOption().previousSibling||
this._highlighted_option.previousSibling.style.display=="none")break;this._highlightPrevOption()}else{if(!this.getHighlightedOption().nextSibling||this._highlighted_option.nextSibling.style.display=="none")break;this._highlightNextOption()}var g=this.domNode.scrollTop;d+=(g-e)*(a?-1:1);e=g}},pageUp:function(){this._page(true)},pageDown:function(){this._page(false)},getHighlightedOption:function(){var a=this._highlighted_option;return a&&a.parentNode?a:null},handleKey:function(a){switch(a.charOrCode){case b.keys.DOWN_ARROW:this._highlightNextOption();
return false;case b.keys.PAGE_DOWN:this.pageDown();return false;case b.keys.UP_ARROW:this._highlightPrevOption();return false;case b.keys.PAGE_UP:this.pageUp();return false;default:return true}}});b.declare("dijit.form.ComboBox",[c.form.ValidationTextBox,c.form.ComboBoxMixin],{_setValueAttr:function(a,d,e){this._set("item",null);a||(a="");c.form.ValidationTextBox.prototype._setValueAttr.call(this,a,d,e)}});b.declare("dijit.form._ComboBoxDataStore",null,{constructor:function(a){this.root=a;if(a.tagName!=
"SELECT"&&a.firstChild){a=b.query("select",a);if(a.length>0)a=a[0];else{this.root.innerHTML="<SELECT>"+this.root.innerHTML+"</SELECT>";a=this.root.firstChild}this.root=a}b.query("> option",a).forEach(function(d){d.innerHTML=b.trim(d.innerHTML)})},getValue:function(a,d){return d=="value"?a.value:a.innerText||a.textContent||""},isItemLoaded:function(){return true},getFeatures:function(){return{"dojo.data.api.Read":true,"dojo.data.api.Identity":true}},_fetchItems:function(a,d){if(!a.query)a.query={};
if(!a.query.name)a.query.name="";if(!a.queryOptions)a.queryOptions={};var e=b.data.util.filter.patternToRegExp(a.query.name,a.queryOptions.ignoreCase),f=b.query("> option",this.root).filter(function(g){return(g.innerText||g.textContent||"").match(e)});a.sort&&f.sort(b.data.util.sorter.createSortFunction(a.sort,this));d(f,a)},close:function(){},getLabel:function(a){return a.innerHTML},getIdentity:function(a){return b.attr(a,"value")},fetchItemByIdentity:function(a){var d=b.query("> option[value='"+
a.identity+"']",this.root)[0];a.onItem(d)},fetchSelectedItem:function(){var a=this.root,d=a.selectedIndex;return typeof d=="number"?b.query("> option:nth-child("+(d!=-1?d+1:1)+")",a)[0]:null}});b.extend(c.form._ComboBoxDataStore,b.data.util.simpleFetch);return c.form.ComboBox});define("text!orion/widgets/templates/SFTPConnectionDialog.html",function(){return'<div class="dijitDialog" tabindex="-1" waiRole="dialog" waiState="labelledby-${id}_title">\n\t<div dojoType="dojo.data.ItemFileReadStore" data="sftpConnectionStoreData" jsId="sftpConnectionStore">\n\t</div>\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="locationLabel" for="${id}_sftpPath" style="padding-right: 10">${locationLabelText}</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<div dojoType="dijit.form.ComboBox" store="sftpConnectionStore" style="display: inline-block; width: 88%;" dojoAttachPoint="sftpConnectionList" searchAttr="name">\n\t\t\t\t\t</div>\n\t\t\t\t\t<div dojoType="dijit.form.DropDownButton">\n\t\t\t\t\t    <span>New</span>\n\t\t\t    \t\t<div dojoType="dijit.TooltipDialog">\n\t\t\t\t\t\t\t<div style="display: table">\n\t\t\t\t\t\t\t\t<div style="display: table-row">\n\t\t\t\t\t\t\t\t\t<div style="display: table-cell; padding: 5">\n\t\t\t\t\t\t\t\t\t\t<label dojoAttachPoint="sftpHostLabel" for="${id}_sftpHost" style="padding-right: 10">${sftpHostLabelText}</label>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div style="display: table-cell; padding: 5; width: 40em; text-align: left;">\n\t\t\t\t\t\t\t\t\t\t<input dojoAttachPoint="sftpHost" id="${id}_sftpHost" style="display: inline-block; width: 98%;" value="">\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div style="display: table-row">\n\t\t\t\t\t\t\t\t\t<div style="display: table-cell; padding: 5">\n\t\t\t\t\t\t\t\t\t\t<label dojoAttachPoint="sftpPathLabel" for="${id}_sftpPath" style="padding-right: 10">${sftpPathLabelText}</label>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div style="display: table-cell; padding: 5; width: 40em; text-align: left;">\n\t\t\t\t\t\t\t\t\t\t<input dojoAttachPoint="sftpPath" id="${id}_sftpPath" style="display: inline-block; width: 98%;" value="">\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\t\n\t\t\t\t\t\t\t\t<div style="display: table-row">\n\t\t\t\t\t\t\t\t\t<div style="display: table-cell; padding: 5">\n\t\t\t\t\t\t\t\t\t\t<label dojoAttachPoint="sftpUserLabel" for="${id}_sftpUser" style="padding-right: 10">${sftpUserLabelText}</label>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div style="display: table-cell; padding: 5; width: 40em; text-align: left;">\n\t\t\t\t\t\t\t\t\t\t<input dojoAttachPoint="sftpUser" id="${id}_sftpUser" style="display: inline-block; width: 98%;" value="">\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div style="display: table-row">\n\t\t\t\t\t\t\t\t\t<div style="display: table-cell; padding: 5"></div>\n\t\t\t\t\t\t\t\t\t<div style="display: table-cell; padding: 5">\n\t\t\t\t\t\t\t\t\t\t<button dojoAttachPoint="addSFTPConnection" type="submit" dojoType="dijit.form.Button" style="padding: 20 0 10 0; float: right; clear: both;">Add</button>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div><!-- End inner table--\>\n\t\t\t    \t\t</div><!-- End TooltipDialog --\>\n\t\t\t    \t</div><!-- End DropDownButton --\>\n\t\t\t\t</div><!-- End table cell --\>\n\t\t\t</div><!-- End table row --\>\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="sftpPasswordLabel" for="${id}_sftpPassword" style="padding-right: 10">${sftpPasswordLabelText}</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 type="password" dojoAttachPoint="sftpPassword" id="${id}_sftpPassword" 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">\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<p>If the same file exists in both the source and destination:</p>\n\t\t\t\t    <input type="radio" dojoAttachPoint="overwriteCancel" dojoType="dijit.form.RadioButton" name="overwriteOption" id="overwriteCancel" checked value="overwriteCancel" />\n\t\t\t\t    <label for="radioOne">Cancel the transfer</label>\n\t\t\t\t    <br />\n\t\t\t\t    <input type="radio" dojoAttachPoint="overwriteAll" dojoType="dijit.form.RadioButton" name="overwriteOption" id="overwriteAll"/>\n\t\t\t\t    <label for="radioOne">Always overwrite destination</label>\n\t\t\t\t    <br />\n\t\t\t\t    <input type="radio" dojoAttachPoint="overwriteOlder" dojoType="dijit.form.RadioButton" name="overwriteOption" id="overwriteOlder"/>\n\t\t\t\t    <label for="radioOne">Overwrite if source is newer</label>\n\t\t\t\t</div>\n\t\t\t</div><!-- End table row --\>\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="sftpConnectionButton" 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</button>\n\t\t\t\t</div>\n\t\t\t</div><!-- End table row --\>\n\t\t</div><!-- End table --\>\n\t</div><!-- End dijitDialogPaneContent --\>\n</div>'});
define("orion/widgets/SFTPConnectionDialog",["dojo","dijit","dijit/Dialog","dijit/form/CheckBox","dijit/form/ComboBox","dojo/data/ItemFileReadStore","orion/widgets/_OrionDialogMixin","text!orion/widgets/templates/SFTPConnectionDialog.html"],function(b,c){localStorage.getItem("orion.sftpConnections")||localStorage.setItem("orion.sftpConnections",JSON.stringify({identifier:"name",label:"name",items:[]}));window.sftpConnectionStoreData=JSON.parse(localStorage.getItem("orion.sftpConnections"));b.declare("orion.widgets.SFTPConnectionDialog",
[c.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:true,templateString:b.cache("orion","widgets/templates/SFTPConnectionDialog.html"),constructor:function(){this.inherited(arguments);this.options=arguments[0]||{}},postMixInProperties:function(){this.inherited(arguments);this.title="SFTP Transfer";this.sftpHostLabelText="Remote host:";this.sftpPathLabelText="Remote path:";this.sftpUserLabelText="User name:";this.sftpPasswordLabelText="Password:";this.buttonOk="Start Transfer";this.locationLabelText=
"Location:";sftpConnectionStoreData=JSON.parse(localStorage.getItem("orion.sftpConnections"))},postCreate:function(){this.inherited(arguments);b.connect(this.addSFTPConnection,"onClick",null,b.hitch(this,this.onAddConnection))},execute:function(){var a=this.sftpConnectionList.value.split("@");if(a.length===2){var d=a[0],e=a[1].indexOf("/");if(!(e<=0)){var f=a[1].substring(0,e);a=a[1].substring(e);this.options.func(f,a,d,this.sftpPassword.value,this._computeOverwriteValue())}}},_computeOverwriteValue:function(){if(this.overwriteCancel.checked)return"no-overwrite";
else if(this.overwriteOlder.checked)return"overwrite-older";return""},onAddConnection:function(){for(var a={name:this.sftpUser.value+"@"+this.sftpHost.value+this.sftpPath.value},d=JSON.parse(localStorage.getItem("orion.sftpConnections")),e=false,f=0;f<d.items.length;f++)if(d.items[f].name===a.name){e=true;break}if(!e){d.items.unshift(a);localStorage.setItem("orion.sftpConnections",JSON.stringify(d));this.sftpConnectionList.set("value",a.name)}}})});
define("orion/extensionCommands",["require","dojo","orion/util","orion/commands","orion/editor/regex","orion/contentTypes","orion/URITemplate","orion/widgets/NewItemDialog","orion/widgets/DirectoryPrompterDialog","orion/widgets/ImportDialog","orion/widgets/SFTPConnectionDialog"],function(b,c,a,d,e,f,g){var h={};h._cloneItemWithoutChildren=function j(k){if(k===null||typeof k!=="object")return k;var l=k.constructor();for(var m in k)if(m!=="children"&&m!=="Children")l[m]=j(k[m]);return l};h._createOpenWithCommands=
function(j,k){function l(){for(var F=j.getServiceReferences("orion.edit.editor"),I=[],L=0;L<F.length;L++){var G=F[L],O=G.getProperty("id");I.push({id:O,name:G.getProperty("name"),uriTemplate:new g(G.getProperty("orionTemplate")||G.getProperty("uriTemplate"))})}return I}function m(F,I){F=F.map(function(L){return e.escape(L)});I=I.map(function(L){return e.escape(L)});F=F.length&&"(*\\.("+F.join("|")+")$)";I=I.length&&"(^("+I.join("|")+")$)";return F&&I?F+"|"+I:F?F:I?I:null}function n(F,I){F=F.getServiceReferences("orion.navigate.openWith");
for(var L=[],G=0;G<F.length;G++){var O=F[G];if(O.getProperty("editor")===I.id){O=O.getProperty("contentType");if(O instanceof Array)L=L.concat(O);else O!==null&&typeof O!=="undefined"&&L.push(O)}}return L}function r(F){for(F=F.getServiceReferences("orion.navigate.openWith.default");0<F.length;)return{editor:F[0].getProperty("editor")};return null}for(var s=l(),p=r(j),q=[],o=0;o<s.length;o++){var t=s[o],u=p&&p.editor===t.id,w=n(j,t);if(w.length){for(var x=[],z=[],E=0;E<w.length;E++){var D=k[w[E]];
if(D){x=x.concat(D.extension);z=z.concat(D.filename)}}w=t.uriTemplate;x={Directory:false,Name:m(x,z)};t={name:t.name||t.id,id:"eclipse.openWithCommand."+t.id,tooltip:t.name,validationProperties:x,href:true,forceSingleItem:true,isEditor:u?"default":"editor"};u={run:c.hitch(w,w.expand)};q.push({properties:t,service:u})}}return q};h._makeValidationFunction=function(j,k){function l(r){for(var s="^",p=0;p<r.length;p++){var q=r.charAt(p);switch(q){case "?":s+=".";break;case "*":s+=".*";break;default:s+=
q}}s+="$";return new RegExp(s)}function m(r,s,p){var q,o;if(s.indexOf(":")>=0){q=l(s.substring(0,s.indexOf(":")));var t=s.substring(s.indexOf(":")+1);for(o in r)if(q.test(o))if(m(r[o],t,p))return true}q=l(s);for(o in r)if(q.test(o))if(typeof p==="string"){if(l(p).test(r[o]))return true}else if(p===r[o])return true;return false}function n(r,s){for(var p in s)if(!m(r,p,s[p]))return false;return true}return c.hitch(j,function(r){if(typeof k==="function")r=k(r);if(c.isArray(r)){if((this.forceSingleItem||
this.href)&&r.length!==1)return false;if(!this.forceSingleItem&&r.length<1)return false}else r=[r];if(!this.validationProperties)return true;for(var s in r)if(!n(r[s],this.validationProperties))return false;return true})};h._createCommandOptions=function(j,k,l,m,n){var r={name:j.name,image:j.image,id:j.id||j.name,tooltip:j.tooltip,isEditor:j.isEditor};r.visibleWhen=h._makeValidationFunction(j,n);if(m)if(j.href)r.hrefCallback=c.hitch(j,function(s){s=c.isArray(s.items)?s.items[0]:s.items;s=h._cloneItemWithoutChildren(s);
if(k.run)return k.run(s);else if(l)return l.getService(k).run(s)});else r.callback=c.hitch(j,function(s){var p;if(this.forceSingleItem){s=c.isArray()?s.items[0]:s.items;p=h._cloneItemWithoutChildren(s)}else if(c.isArray(s.items)){p=[];for(var q=0;q<s.items.length;q++)p.push(h._cloneItemWithoutChildren(s.items[q]))}else p=h._cloneItemWithoutChildren(s.items);if(k.run)k.run(p);else l&&l.getService(k).run(p)});return r};h.getOpenWithCommands=function(j){var k=[];for(var l in j._objectScope){var m=j._objectScope[l];
m.isEditor&&k.push(m)}return k};return h});
define("orion/textview/keyBinding",[],function(){function b(a,d,e,f,g){this.keyCode=typeof a==="string"?a.toUpperCase().charCodeAt(0):a;this.mod1=d!==undefined&&d!==null?d:false;this.mod2=e!==undefined&&e!==null?e:false;this.mod3=f!==undefined&&f!==null?f:false;this.mod4=g!==undefined&&g!==null?g:false}var c=window.navigator.platform.indexOf("Mac")!==-1;b.prototype={match:function(a){if(this.keyCode===a.keyCode){if(this.mod1!==(c?a.metaKey:a.ctrlKey))return false;if(this.mod2!==a.shiftKey)return false;
if(this.mod3!==a.altKey)return false;if(c&&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{KeyBinding:b}});
define("orion/favorites",["require","dojo","orion/util"],function(b,c,a){function d(e){this._favorites=[];this._searches=[];this._init(e);this._initializeFavorites()}d.prototype={_init:function(e){this._registry=e.serviceRegistry;this._serviceRegistration=this._registry.registerService("orion.core.favorite",this)},_notifyListeners:function(){this._serviceRegistration.dispatchEvent("favoritesChanged",{navigator:this._favorites,search:this._searches,registry:this._registry})},makeFavorites:function(e){e=
c.isArray(e)?e:[e];for(var f=0;f<e.length;f++){var g=e[f],h=g.ChildrenLocation?g.ChildrenLocation:g.Location;h=a.makeRelative(h);this.addFavorite(g.Name,h,g.Directory)}this._storeFavorites();this._notifyListeners()},addFavoriteUrl:function(e){this.addFavorite(e,e,false,true)},addFavorite:function(e,f,g,h){this._favorites.push({name:e,path:f,directory:g,isFavorite:true,isExternalResource:h});this._favorites.sort(this._sorter);this._storeFavorites();this._notifyListeners()},removeFavorite:function(e){for(var f in this._favorites)if(this._favorites[f].path===
e){this._favorites.splice(f,1);break}this._favorites.sort(this._sorter);this._storeFavorites();this._notifyListeners()},renameFavorite:function(e,f){var g=false;for(var h in this._favorites)if(this._favorites[h].path===e){var j=this._favorites[h];if(j.name!==f){j.name=f;g=true}}if(g){this._favorites.sort(this._sorter);this._storeFavorites();this._notifyListeners()}},addFavoriteSearch:function(e,f){this._searches.push({name:e,query:f,isSearch:true});this._searches.sort(this._sorter);this._storeSearches();
this._notifyListeners()},hasFavorite:function(e){for(var f in this._favorites)if(this._favorites[f].path===e)return true;return false},_SPECIAL_CHARS:"^$\\+[]().",queryFavorites:function(e){var f;if(!e)return this._favorites;var g="";for(f=0;f<e.length;f++){var h=e.charAt(f);g+=h==="*"?".*":h==="?"?".?":this._SPECIAL_CHARS.indexOf(h)>=0?"\\"+h:h}g+=".*";e=new RegExp(g);g=[];for(f in this._favorites)this._favorites[f].name.search(e)===0&&g.push(this._favorites[f]);return g},removeSearch:function(e){for(var f in this._searches)if(this._searches[f].query===
e){this._searches.splice(f,1);break}this._searches.sort(this._sorter);this._storeSearches();this._notifyListeners()},renameSearch:function(e,f){var g=false;for(var h in this._searches)if(this._searches[h].query===e){var j=this._searches[h];if(j.name!==f){j.name=f;g=true}}if(g){this._searches.sort(this._sorter);this._storeSearches();this._notifyListeners()}},_initializeFavorites:function(){var e=this;this._registry.getService("orion.core.preference").getPreferences("/window/favorites").then(function(f){var g,
h=f.get("navigate");if(typeof h==="string")h=JSON.parse(h);if(h)for(g in h){h[g].isFavorite=true;e._favorites.push(h[g])}f=f.get("search");if(typeof f==="string")f=JSON.parse(f);if(f)for(g in f){f[g].isSearch=true;e._searches.push(f[g])}e._favorites.sort(e._sorter);e._notifyListeners()})},_storeFavorites:function(){var e=this._favorites;this._registry.getService("orion.core.preference").getPreferences("/window/favorites").then(function(f){f.put("navigate",e)})},_storeSearches:function(){var e=this._searches;
this._registry.getService("orion.core.preference").getPreferences("/window/favorites").then(function(f){f.put("search",e)})},_sorter:function(e,f){e=e.name.toLowerCase();f=f.name.toLowerCase();return e>f?1:e<f?-1:0},getFavorites:function(){return{navigator:this._favorites,search:this._searches}}};d.prototype.constructor=d;return{FavoritesService:d}});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="favresults" 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="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",["require","dojo","dijit","dijit/Dialog","dijit/form/TextBox","orion/widgets/_OrionDialogMixin","text!orion/widgets/templates/OpenResourceDialog.html"],function(b,c,a){return c.declare("orion.widgets.OpenResourceDialog",[a.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:true,templateString:c.cache("orion","widgets/templates/OpenResourceDialog.html"),SEARCH_DELAY:500,timeoutId:null,time:null,options:null,searcher:null,searchRenderer:null,favService:null,
constructor:function(){this.inherited(arguments);this.timeoutId=null;this.time=0;this.searcher=(this.options=arguments[0])&&this.options.searcher;if(!this.searcher)throw new Error("Missing required argument: searcher");this.searchRenderer=this.options&&this.options.searchRenderer;if(!this.searchRenderer||typeof this.searchRenderer.makeRenderFunction!=="function")throw new Error("Missing required argument: searchRenderer");this.favService=this.options.favoriteService;if(!this.favService)throw new Error("Missing required argument: favService");
},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(d){if(d.keyCode===
c.keys.ENTER&&this.results){d=c.query("a",this.results);if(d.length>0){window.open(d[0].href);this.hide()}}});c.connect(this,"onKeyPress",this,function(d){var e,f,g,h,j;g=function(l,m,n){return m<l.length-1?l[m+1]:n};var k=function(l,m,n){return m>0?l[m-1]:n};if(d.keyCode===c.keys.DOWN_ARROW||d.keyCode===c.keys.UP_ARROW){f=c.query("a",this.results);e=c.query("a",this.favresults);h=a.getFocus();j=f.indexOf(h.node);h=e.indexOf(h.node);if(d.keyCode===c.keys.DOWN_ARROW)if(h>=0)a.focus(g(e,h,f.length>
0?f[0]:e[0]));else if(j>=0)a.focus(g(f,j,e.length>0?e[0]:f[0]));else{if(f.length>0||e.length>0)a.focus(g(e,-1,f[0]))}else if(h>=0){g=this.resourceName&&this.resourceName.get("textbox");a.focus(k(e,h,g))}else if(j>=0){g=this.resourceName&&this.resourceName.get("textbox");a.focus(k(f,j,e.length>0?e[e.length-1]:g))}else if(f.length>0)a.focus(f[f.length-1]);else e.length>0&&a.focus(e[e.length-1]);c.stopEvent(d)}});c.connect(this,"onMouseUp",function(d){d.target.focus()});this.populateFavorites()},populateFavorites:function(){c.place("<div>Populating favorites&#x2026;</div>",
this.favresults,"only");this.favService.getFavorites().then(this.showFavorites());this.favService.addEventListener("favoritesChanged",this.showFavorites())},showFavorites:function(){var d=this;return function(e){if(e.navigator)e=e.navigator;d.searchRenderer.makeRenderFunction(d.favresults,false,c.hitch(d,d.decorateResult),d.showFavoritesImage)(e);e&&e.length>0&&c.place("<hr/>",d.favresults,"last")}},showFavoritesImage:function(d){var e=new Image;c.addClass(e,"commandSprite");c.addClass(e,"core-sprite-makeFavorite");
c.addClass(e,"commandImage");e.src=b.toUrl("images/none.png");e.title="Favorite";d.appendChild(e);c.style(e,"verticalAlign","middle")},checkSearch:function(){clearTimeout(this.timeoutId);var d=(new Date).getTime();if(d-this.time>this.SEARCH_DELAY){this.time=d;this.doSearch()}else this.timeoutId=setTimeout(c.hitch(this,"checkSearch"),50)},doSearch:function(){var d=this.resourceName&&this.resourceName.get("value"),e=this.showFavorites();this.favService.queryFavorites(d).then(function(g){e(g)});if(d){c.place("<div>Searching&#x2026;</div>",
this.results,"only");var f=this;setTimeout(function(){var g=f.searcher.createSearchQuery(null,d,"Name"),h=f.searchRenderer.makeRenderFunction(f.results,false,c.hitch(f,f.decorateResult));f.searcher.search(g,false,h)},0)}},decorateResult:function(d){var e=this;c.query("a",d).forEach(function(f){c.connect(f,"onmouseup",function(g){!c.mouseButtons.isMiddle(g)&&!c.isCopyKey(g)&&e.hide()});c.connect(f,"onkeyup",e,function(g){g.keyCode===c.keys.ENTER&&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; 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 style="width: 100%;">\n\t\t\t\t<tr>\n\t\t\t\t\t<td style="text-align: left; vertical-align: top;">\n\t\t\t\t\t\t<h2 dojoAttachPoint="emptyListInfo" class="LoginWindowLeft">No authentication required.</h2>\n\t\t\t\t\t\t<table dojoAttachPoint="authenticated" style="display: none; width: 100%;">\n\t\t\t\t\t\t\t<tbody dojoAttachPoint="authenticatedList">\n\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t\t<table dojoAttachPoint="otherUnauthenticated" style="display: none; width: 100%;">\n\t\t\t\t\t\t\t<tbody dojoAttachPoint="otherUnauthenticatedList">\n\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td style="text-align: right; vertical-align: top; padding-right: 2px; margin: 0">\n\t\t\t\t\t\t<span dojoAttachPoint="closeLink" role="button" title="Close"></span>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</table>\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(b,c,a){c.declare("orion.widgets.LoginDialog",[a.TooltipDialog],{widgetsInTemplate:true,templateString:c.cache("orion","widgets/templates/LoginDialog.html"),constructor:function(){this.inherited(arguments);this.options=arguments[0]||{};this.authenticatedServices={};this.unauthenticatedServices={}},postCreate:function(){this.inherited(arguments);var d=
this;c.addClass(this.closeLink,"imageSprite");c.addClass(this.closeLink,"core-sprite-close");c.connect(this.closeLink,"onmouseover",this.closeLink,function(){d.closeLink.style.cursor="pointer"});c.connect(this.closeLink,"onmouseout",this.closeLink,function(){d.closeLink.style.cursor="default"});c.connect(this.closeLink,"onclick",function(){c.hitch(d,d.closeDialog)()})},setPendingAuthentication:function(d){for(var e in this.unauthenticatedServices)delete this.unauthenticatedServices[e].pending;for(e in d)if(this.unauthenticatedServices[d[e].SignInKey])this.unauthenticatedServices[d[e].SignInKey].pending=
true;else if(this.authenticatedServices[d[e].SignInKey]){this.unauthenticatedServices[d[e].SignInKey]=this.authenticatedServices[d[e].SignInKey];this.unauthenticatedServices[d[e].SignInKey].pending=true;delete this.authenticatedServices[d[e].SignInKey]}else this.unauthenticatedServices[d[e].SignInKey]={label:d[e].label,SignInLocation:d[e].SignInLocation,pending:true};this.renderUnauthenticatedServices();this.renderAuthenticatedServices()},authenticatedService:function(d){if(this.unauthenticatedServices[d]&&
!this.unauthenticatedServices[d].authService){this.authenticatedServices[d]=this.unauthenticatedServices[d];delete this.unauthenticatedServices[d]}},addUserItem:function(d,e,f,g){if(g){this.unauthenticatedServices[d]&&delete this.unauthenticatedServices[d];this.authenticatedServices[d]={authService:e,label:f,data:g}}else{this.authenticatedServices[d]&&delete this.authenticatedServices[d];this.unauthenticatedServices[d]=this.unauthenticatedServices[d]?{authService:e,label:f,pending:this.unauthenticatedServices[d].pending}:
{authService:e,label:f}}c.hitch(this,this.renderAuthenticatedServices)();c.hitch(this,this.renderUnauthenticatedServices)()},renderAuthenticatedServices:function(){c.empty(this.authenticatedList);this.authenticated.style.display=this.isEmpty(this.authenticatedServices)?"none":"";var d=this,e=true;for(var f in this.authenticatedServices){if(!e){var g=c.create("tr",null,this.authenticatedList);c.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;'>"},
g)}e=false;g=c.create("tr",{className:"navTableHeading"});var h=this.authenticatedServices[f].authService,j=c.create("td",null,g,"only"),k=c.create("h2",null,j,"only");if(h)if(h.getAuthForm)c.hitch(d,function(n,r){h.getAuthForm(eclipse.globalCommandUtils.notifyAuthenticationSite).then(function(s){if(d.authenticatedServices[r].label)n.innerHTML=d.authenticatedServices[r].label+"<br>";n.innerHTML+=d.getHostname(s)})})(k,f);else k.innerHTML=this.authenticatedServices[f].label?this.authenticatedServices[f].label:
f;else{var l=this.authenticatedServices[f].SignInLocation;if(this.authenticatedServices[f].label)k.innerHTML=this.authenticatedServices[f].label+"<br>";k.innerHTML+=this.getHostname(l)}c.addClass(j,"LoginWindowLeft");j=c.create("td",{style:"text-align: right"},g,"last");c.addClass(j,"LoginWindowRight");k=this.authenticatedServices[f].data;h=this.authenticatedServices[f].authService;if(!h){c.place(g,this.authenticatedList,"last");return}k.Location&&c.create("a",{href:b.toUrl("profile/user-profile.html")+
"#"+k.Location,innerHTML:"Profile"},j,"last");c.place(document.createTextNode(" "),j,"last");if(h.logout){var m=c.create("a",{innerHTML:"Sign out"},j,"last");c.connect(m,"onmouseover",m,function(){m.style.cursor="pointer"});c.connect(m,"onmouseout",m,function(){m.style.cursor="default"});c.connect(m,"onclick",c.hitch(d,function(n,r){return function(){n.logout().then(c.hitch(d,function(){this.addUserItem(r,n,this.authenticatedServices[r].label);this.isSingleService()&&this.closeDialog();localStorage.removeItem(r)}))}})(h,
f))}c.place(g,this.authenticatedList,"last");j="N/A";if(k&&k.lastlogintimestamp)j=c.date.locale.format(new Date(k.lastlogintimestamp),{formatLength:"short"});k=k.Name&&k.Name.replace(/^\s+|\s+$/g,"")!==""?k.Name:k.login;g=c.create("tr");j=k.length>40?c.create("td",{innerHTML:k.substring(0,30)+"... logged in since "+j,colspan:2,title:k+" logged in since "+j},g,"only"):c.create("td",{innerHTML:k+" logged in since "+j,colspan:2},g,"only");c.addClass(j,"LoginWindowLeft");c.addClass(j,"LoginWindowRight");
c.addClass(j,"LoginWindowComment");c.place(g,this.authenticatedList,"last")}},renderUnauthenticatedServices:function(){this.emptyListInfo.style.display=this.unauthenticatedServices.length===0&&this.authenticatedServices.length===0?"":"none";c.empty(this.otherUnauthenticatedList);var d=this;this.otherUnauthenticated.style.display=this.isEmpty(this.unauthenticatedServices)?"none":"";var e=true;for(var f in this.unauthenticatedServices){if(!e||!this.isEmpty(this.authenticatedServices)){var g=c.create("tr",
null,this.otherUnauthenticatedList);c.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;'>"},g)}e=false;g=c.create("tr",{className:"navTableHeading"});var h=c.create("td",null,g,"only");c.addClass(h,"LoginWindowLeft");var j=c.create("h2",null,h,"only");h=c.create("td",{style:"text-align: right"},g,"last");c.addClass(h,"LoginWindowRight");var k=this.unauthenticatedServices[f].authService;
if(k)if(k.getAuthForm)c.hitch(d,function(n,r){k.getAuthForm(eclipse.globalCommandUtils.notifyAuthenticationSite).then(function(s){s.indexOf("?")==-1?c.create("a",{target:"_blank",href:s+"?redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+"?key="+r,innerHTML:"Sign in"},n,"last"):c.create("a",{target:"_blank",href:s+"&redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+"?key="+r,innerHTML:"Sign in"},n,"last");if(d.unauthenticatedServices[r].label)j.innerHTML=d.unauthenticatedServices[r].label+
"<br>";j.innerHTML+=d.getHostname(s)})})(h,f);else{if(k.login){c.place(document.createTextNode(this.unauthenticatedServices[f].label?this.unauthenticatedServices[f].label:f),j,"only");var l=c.create("a",{innerHTML:"Sign in",style:"cursor: hand;"},h,"last");c.connect(l,"onmouseover",l,function(){l.style.cursor="pointer"});c.connect(l,"onmouseout",l,function(){l.style.cursor="default"});c.connect(l,"onclick",c.hitch(d,function(n){return function(){n.login(eclipse.globalCommandUtils.notifyAuthenticationSite).then(function(){d.isSingleService()&&
a.popup.hide&&a.popup.hide(d);a.popup.close(d)})}})(k))}}else{var m=this.unauthenticatedServices[f].SignInLocation;m.indexOf("?")==-1?c.create("a",{target:"_blank",href:m+"?redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+"?key="+f,innerHTML:"Sign in"},h,"last"):c.create("a",{target:"_blank",href:m+"&redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+"?key="+f,innerHTML:"Sign in"},h,"last");if(this.unauthenticatedServices[f].label)j.innerHTML=this.unauthenticatedServices[f].label+
"<br>";j.innerHTML+=this.getHostname(m)}c.place(g,this.otherUnauthenticatedList,"last");if(this.unauthenticatedServices[f].pending){g=c.create("tr");h=c.create("td",{innerHTML:"Authentication required!",style:"padding-left: 10px",colspan:2},g,"only");c.addClass(h,"LoginWindowLeft");c.addClass(h,"LoginWindowRight");c.create("img",{src:b.toUrl("images/warning.gif"),style:"padding-right: 4px; vertical-align: bottom; padding-bottom: 2px;"},h,"first");c.place(g,this.otherUnauthenticatedList,"last")}}},
isSingleService:function(){return this.length(this.unauthenticatedServices)+this.length(this.authenticatedServices)===1},isEmpty:function(d){for(var e in d)if(d.hasOwnProperty(e))return false;return true},length:function(d){var e=0;for(var f in d)d.hasOwnProperty(f)&&e++;return e},getHostname:function(d){var e=document.createElement("img");e.src=d;d=e.src;e.src=null;return d.match(/^(?:f|ht)tp(?:s)?:\/\/([^\/]+)/im)[1].toString()},closeDialog:function(){a.popup.hide&&a.popup.hide(this);a.popup.close(this)}})});
define("orion/widgets/UserMenu",["require","dojo","dijit","orion/util","dijit/Menu"],function(b,c,a){c.declare("orion.widgets.UserMenu",[a.Menu],{widgetsInTemplate:false,id:"userMenu",postCreate:function(){this.inherited(arguments)},constructor:function(){this.inherited(arguments);this.options=arguments[0]||{};this.authenticatedServices={};this.unauthenticatedServices={}},isSingleService:function(){return this.length(this.unauthenticatedServices)+this.length(this.authenticatedServices)===1},hasServices:function(){return this.length(this.unauthenticatedServices)+
this.length(this.authenticatedServices)>0},length:function(d){var e=0;for(var f in d)d.hasOwnProperty(f)&&e++;return e},_renderAuthenticatedService:function(d,e,f){var g=this,h=this.authenticatedServices[d].authService;if(h&&h.logout)this.addChild(new a.MenuItem({label:f?"Sign Out "+f:"Sign Out",onClick:c.hitch(this,function(j,k){return function(){j.logout().then(c.hitch(g,function(){this.addUserItem(k,j,this.authenticatedServices[k].label);localStorage.removeItem(k)}))}})(h,d)}),e)},_renderUnauthenticatedService:function(d,
e,f){var g=this,h=this.unauthenticatedServices[d].authService;if(h)if(h.getAuthForm)c.hitch(g,function(k){h.getAuthForm(eclipse.globalCommandUtils.notifyAuthenticationSite).then(function(l){l+=l.indexOf("?")==-1?"?redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+"?key="+k:"&redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+"?key="+k;g.addChild(new a.MenuItem({label:f?"<a target='_blank' href="+l+">Sign In To "+f+"</a>":"<a target='_blank' href="+l+">Sign In</a>",onKeyDown:function(m){m.keyCode===
13&&window.open(l)},_onClick:function(m){this.getParent().onItemClick(this,m)}}),e)})})(d);else{if(h.login)this.addChild(new a.MenuItem({label:f?"Sign In To "+f:"Sign In",onClick:c.hitch(g,function(k){return function(){k.login(eclipse.globalCommandUtils.notifyAuthenticationSite)}})(h)}),e)}else{var j=this.unauthenticatedServices[d].SignInLocation;j+=j.indexOf("?")==-1?"?redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+"?key="+d:"&redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+
"?key="+d;this.addChild(new a.MenuItem({label:f?"<a target='_blank' href="+j+">Sign In To "+f+"</a>":"<a target='_blank' href="+j+">Sign In</a>",onKeyDown:function(k){k.keyCode===13&&window.open(j)},_onClick:function(k){this.getParent().onItemClick(this,k)}}),e)}},renderServices:function(){for(var d=this.getChildren(),e=0;e<d.length;e++)this.removeChild(d[e]);if(this.isSingleService())for(e in this.authenticatedServices)this._renderAuthenticatedService(e,0);this.addChild(new a.MenuItem({label:"<a href="+
b.toUrl("settings/settings.html")+">Settings</a>",onKeyDown:function(f){if(f.keyCode===13)window.location=b.toUrl("settings/settings.html")},_onClick:function(f){this.getParent().onItemClick(this,f)}}));this.addChild(new a.MenuItem({label:"<a href="+b.toUrl("operations/list.html")+">Background Operations</a>",onKeyDown:function(f){if(f.keyCode===13)window.location=b.toUrl("operations/list.html")},_onClick:function(f){this.getParent().onItemClick(this,f)}}));this.addChild(new a.MenuSeparator);this.addChild(new a.MenuItem({label:"<a href="+
b.toUrl("help/index.jsp")+">Help</a>",onKeyDown:function(f){if(f.keyCode===13)window.location=b.toUrl("help/index.jsp")},_onClick:function(f){this.getParent().onItemClick(this,f)}}));this.keyAssistFunction&&this.addChild(new a.MenuItem({label:"Keyboard Help",onClick:this.keyAssistFunction}));this.addChild(new a.MenuItem({label:"<a href='"+b.toUrl("help/about.html")+"'>About Orion</a>",onKeyDown:function(f){if(f.keyCode===13)window.location=b.toUrl("help/about.html")},_onClick:function(f){this.getParent().onItemClick(this,
f)}}))},getUserLabel:function(d){if(d.data){var e=d.data.Name&&d.data.Name.replace(/^\s+|\s+$/g,"")!==""?d.data.Name:d.data.login;if(e.length>40)e=e.substring(0,30)+"...";e+=" ("+d.label+")";return e}else return d.label},setKeyAssist:function(d){this.keyAssistFunction=d;this.renderServices()},addUserItem:function(d,e,f,g){var h=this;if(g){this.unauthenticatedServices[d]&&delete this.unauthenticatedServices[d];this.authenticatedServices[d]={authService:e,label:f,data:g}}else{this.authenticatedServices[d]&&
delete this.authenticatedServices[d];this.unauthenticatedServices[d]=this.unauthenticatedServices[d]?{authService:e,label:f,pending:this.unauthenticatedServices[d].pending}:{authService:e,label:f}}c.hitch(this,this.renderServices)();if(c.byId("userInfo"))if(this.isSingleService()&&g){f=d=g.Name&&g.Name.replace(/^\s+|\s+$/g,"")!==""?g.Name:g.login;if(f.length>40)f=f.substring(0,30)+"...";c.create("a",{innerHTML:f,href:b.toUrl("profile/user-profile.html")+"#"+g.Location,title:"View profile of "+d,style:"margin-right: 0px"},
c.byId("userInfo"),"only")}else if(this.isSingleService()&&!g)if(e.getAuthForm)c.hitch(this,function(k){e.getAuthForm(eclipse.globalCommandUtils.notifyAuthenticationSite).then(function(l){l+=l.indexOf("?")==-1?"?redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+"?key="+k:"&redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+"?key="+k;c.create("a",{innerHTML:"Sign In",href:l,title:"Sign In",style:"margin-right: 0px",target:"_blank"},c.byId("userInfo"),"only")})})(d);else{if(e.login){var j=
c.create("a",{innerHTML:"Sign In",title:"Sign In",style:"margin-right: 0px"},c.byId("userInfo"),"only");c.connect(j,"onmouseover",j,function(){j.style.cursor="pointer"});c.connect(j,"onmouseout",j,function(){j.style.cursor="default"});c.connect(j,"onclick",function(){e.login(eclipse.globalCommandUtils.notifyAuthenticationSite)})}}else if(this.hasServices()){j=c.create("a",{innerHTML:"Profiles",style:"margin-right: 0px"},c.byId("userInfo"),"only");c.connect(j,"onmouseover",j,function(){j.style.cursor=
"pointer"});c.connect(j,"onmouseout",j,function(){j.style.cursor="default"});c.connect(j,"onclick",function(){try{a.popup.open({popup:h.options.loginDialog,around:c.byId("userInfo")})}catch(k){}a.focus(h.options.loginDialog.domNode)})}else c.empty(c.byId("userInfo"))}})});
define("orion/globalCommands",["require","dojo","dijit","orion/commonHTMLFragments","orion/commands","orion/parameterCollectors","orion/extensionCommands","orion/util","orion/textview/keyBinding","orion/favorites","dijit/Menu","dijit/MenuItem","dijit/form/DropDownButton","orion/widgets/OpenResourceDialog","orion/widgets/LoginDialog","orion/widgets/UserMenu"],function(b,c,a,d,e,f,g,h,j,k){function l(N){var T=document.createElement("a");T.href=N;return T.href}function m(N,T){if(N.getLabel)return N.getLabel();
else{N=new c.Deferred;N.callback(T.properties.name);return N}}function n(){return O}function r(N){(N=N.getService("orion.page.progress"))&&c.hitch(N,N.init)("progressPane")}function s(N){var T=N.getServiceReferences("orion.core.auth");O=[];var X=c.byId("userMenu");if(X){if(!a.byId("logins")){var v=new a.form.DropDownButton({id:"logins",dropDown:G,label:"Options",showLabel:false,alt:"Options"});c.place(v.domNode,X,"only");v.valueNode&&c.destroy(v.valueNode)}for(X=0;X<T.length;X++){v=T[X];var y=N.getService(v);
c.hitch(this,function(C,K){m(C,K).then(function(P){C.getKey().then(function(R){O.push(R);C.getUser().then(function(W){L.addUserItem(R,C,P,W);G.addUserItem(R,C,P,W)},function(){L.addUserItem(R,C,P);G.addUserItem(R,C,P,jsonData)});window.addEventListener("storage",function(){if(I[R]!==localStorage.getItem(R)){I[R]=localStorage.getItem(R);C.getUser().then(function(W){L.addUserItem(R,C,P,W);G.addUserItem(R,C,P,W)},function(){L.addUserItem(R,C,P);G.addUserItem(R,C,P)})}},false)})})})(y,v)}}}function p(N){L.setPendingAuthentication(N);
var T;for(T in N)if(N.hasOwnProperty(T)){if(c.byId("userInfo").innerHTML)try{a.popup.open({popup:L,around:c.byId("userInfo")})}catch(X){}else window.setTimeout(function(){try{a.popup.open({popup:L,around:c.byId("userInfo")})}catch(v){}},500);return}a.popup.hide&&a.popup.hide(L);a.popup.close(L)}function q(N){L.authenticatedService(N)}function o(N,T,X,v,y,C,K){N.closeParameterCollector();if(C=c.byId("pageActions")){c.empty(C);(C=N.renderCommands(C,"dom",X||T,T,"button"))&&C.then?C.then(function(){N.processURL(window.location.href)}):
N.processURL(window.location.href)}if(!K)if(C=c.byId("pageNavigationActions")){c.empty(C);N.renderCommands(C,"dom",y||X||T,v||T,"button")}}function t(){if(c.byId("relatedLinks")){if(M){M.focusedChild=null;c.forEach(M.getChildren(),function(N){M.removeChild(N);N.destroy()});M.destroy()}return M=new a.Menu({style:"display: none;",id:"relatedLinksMenu"})}}function u(N,T){M||(M=new a.Menu({style:"display: none;",id:"relatedLinksMenu"}));N._addMenuItem(M,T);N=a.byId("related");if((T=c.byId("relatedLinks"))&&
!N){N=new a.form.DropDownButton({id:"related",label:"Related pages",dropDown:M});c.place(N.domNode,T,"only");h.forceLayout(T)}}function w(N,T,X,v,y){var C=N.getServiceReferences("orion.page.link.related");if(!(C.length<=0)){var K=c.byId("relatedLinks");if(K){for(var P=t(),R=false,W=0;W<C.length;W++){for(var da={},ba=C[W].getPropertyNames(),ea=0;ea<ba.length;ea++)da[ba[ea]]=C[W].getProperty(ba[ea]);if(da.id)if(c.indexOf(X,da.id)<0){ba=v.findCommand(da.id);if(!ba){var ja=N.getServiceReferences("orion.navigate.command");
for(ea=0;ea<ja.length;ea++)if(ja[ea].getProperty("id")===da.id){da={};ba=ja[ea].getPropertyNames();for(var ka=0;ka<ba.length;ka++)da[ba[ka]]=ja[ea].getProperty(ba[ka]);ea=g._createCommandOptions(da,ja[ea],N,true);ba=new e.Command(ea);break}}if(ba)if(!ba.visibleWhen||ba.visibleWhen(T)){R=true;ea=new e.CommandInvocation(v,T,T,null,ba);ba._addMenuItem(P,ea)}else typeof y==="function"&&window.setTimeout(c.hitch(ba,function(){c.when(y(),c.hitch(this,function(ma){ma&&T===U&&this.visibleWhen(ma)&&u(this,
new e.CommandInvocation(v,ma,ma,null,this))}))}),0)}}(N=a.byId("related"))&&N.destroy();if(R){N=new a.form.DropDownButton({id:"related",label:"Related pages",dropDown:P});c.place(N.domNode,K,"only")}h.forceLayout(K)}}}function x(N,T,X){var v=c.byId("globalActions");if(v){c.empty(v);X=(X=c.isArray(X)?X[0]:X)||T||{};N.renderCommands(v,"global",X,T,"tool")}}function z(N){S=N}function E(N,T,X,v,y){U=N;w(T,N,S,X,v);$=y}function D(N,T,X,v,y,C,K,P){function R(){var A=T.getService("orion.core.favorite");
if(!A){A=new k.FavoritesService({serviceRegistry:T});A=T.getService("orion.core.favorite")}if($&&$.Location)A.hasFavorite($.ChildrenLocation||$.Location).then(function(J){if(J)T.getService("orion.page.message").setMessage($.Name+" is already a favorite.",2E3);else{A.makeFavorites([$]);T.getService("orion.page.message").setMessage($.Name+" has been added to the favorites list.",2E3)}});else{var H=window.location.pathname+window.location.hash;A.hasFavorite(H).then(function(J){if(J)T.getService("orion.page.message").setMessage(H+
" is already a favorite.",2E3);else{A.addFavoriteUrl(H);T.getService("orion.page.message").setMessage(H+" has been added to the favorites list.",2E3)}})}}var W,da=c.byId(N);if(!da)throw"could not find banner parent, id was "+N;c.place(d.topHTMLFragment,da,"only");if(N=c.byId("pageToolbar")){c.place(d.toolbarHTMLFragment,N,"only");c.addClass(N,"toolComposite")}else{N=c.create("div",{id:"pageToolbar","class":"toolbar toolComposite layoutBlock"},"titleArea","after");c.place(d.toolbarHTMLFragment,N,"only")}X.setParameterCollector(new f.CommandParameterCollector);
c.place('<div id="keyAssist" style="display: none" class="keyAssistFloat" role="list" aria-atomic="true" aria-live="assertive"></div>',document.body,"last");if(N=c.byId("primaryNav")){v=T.getServiceReferences("orion.page.link");for(var ba=0;ba<v.length;ba++){W={};for(var ea=v[ba].getPropertyNames(),ja=0;ja<ea.length;ja++)W[ea[ja]]=v[ba].getProperty(ea[ja]);if(W.href&&W.name){ea=c.create("a",{href:W.href},N,"last");W=document.createTextNode(W.name);c.place(W,ea,"only")}}}var ka=c.byId("search");if(!ka)throw"failed to generate HTML for banner";
c.connect(ka,"onkeypress",function(A){if(A.charOrCode===c.keys.ENTER)if(y){if(ka.value.length>0){A=y.createSearchQuery(ka.value);window.location=b.toUrl("search/search.html")+"#"+A}}else window.alert("Can't search: no search service is available")});if(N=c.byId("pageTitle")){W=document.createTextNode(document.title);c.place(W,N,"last")}if(N=c.byId("pageFavorite")){c.addClass(N,"commandButton");c.connect(N,"onclick",this,function(){R()});c.connect(N,"onkeypress",this,function(A){if(A.keyCode===c.keys.ENTER||
A.keyCode===c.keys.SPACE)R()});c.connect(N,"onmouseover",N,function(){c.addClass(this,"commandButtonOver")});c.connect(N,"onfocus",N,function(){c.addClass(this,"commandButtonOver")});c.connect(N,"onmouseout",N,function(){c.removeClass(this,"commandButtonOver")});c.connect(N,"onblur",N,function(){c.removeClass(this,"commandButtonOver")});new e.CommandTooltip({connectId:[N],label:"Add this page to the favorites list",position:["below","left","right","above"],commandParent:da,commandService:X})}N=new e.Command({name:"Make Favorite",
tooltip:"Add to the favorites list",imageClass:"core-sprite-makeFavorite",id:"orion.makeFavorite",visibleWhen:function(A){A=c.isArray(A)?A:[A];for(var H=0;H<A.length;H++)if(!A[H].Location)return false;return true},callback:function(A){A=c.isArray(A.items)?A.items:[A.items];for(var H=T.getService("orion.core.favorite"),J=function(Z){return function(Y){Y?T.getService("orion.page.message").setMessage(Z.Name+" is already a favorite.",2E3):H.makeFavorites(Z)}},Q=0;Q<A.length;Q++){var V=A[Q];H.hasFavorite(V.ChildrenLocation||
V.Location).then(J(V))}}});X.addCommand(N,"dom");var ma=function(A,H,J){var Q=H.getService("orion.core.favorite");if(!Q){Q=new k.FavoritesService({serviceRegistry:H});Q=H.getService("orion.core.favorite")}var V=new orion.widgets.OpenResourceDialog({searcher:A,searchRenderer:A.defaultRenderer,favoriteService:Q});J&&c.connect(V,"onHide",function(){J.getTextView().focus()});window.setTimeout(function(){V.show()},0)};N=new e.Command({name:"Find File Named...",tooltip:"Choose a file by name and open an editor on it",
id:"eclipse.openResource",callback:function(){ma(y,T,K)}});if(K){K.getTextView().setKeyBinding(new j.KeyBinding("f",true,true,false),"Find File Named...");K.getTextView().setAction("Find File Named...",function(){ma(y,T,K);return true})}X.addCommand(N,"global");X.registerCommandContribution("eclipse.openResource",100,"globalActions",null,true,new e.CommandKeyBinding("f",true,true));N=new e.Command({name:"Toggle banner and footer",tooltip:"Hide or show the page banner and footer",id:"orion.toggleTrim",
callback:function(){var A=a.byId(da.parentNode.id);if(A){var H=c.byId("footer");if(da.style.display==="none"){da.style.display="block";H.style.display="block"}else{da.style.display="none";H.style.display="none"}A.layout()}return true}});X.addCommand(N,"global");X.registerCommandContribution("orion.toggleTrim",100,"globalActions",null,true,new e.CommandKeyBinding("m",true,true));if(K){K.getTextView().setKeyBinding(new e.CommandKeyBinding("m",true,true),"Toggle Trim");K.getTextView().setAction("Toggle Trim",
N.callback)}var B=c.byId("keyAssist");c.connect(document,"onkeypress",c.hitch(this,function(A){if(A.charOrCode===c.keys.ESCAPE)B.style.display="none"}));c.connect(document,"onclick",c.hitch(this,function(A){if((A=A.target||A.originalTarget||A.srcElement)&&A.id!=="keyAssist")B.style.display="none"}));K&&K.getTextView().addEventListener("MouseDown",function(){B.style.display="none"});P&&P.addHandler({isActive:function(){return B.style.display==="block"},cancel:function(){if(this.isActive()){B.style.display=
"none";return true}return false}});P=new e.Command({name:"Show Keys",tooltip:"Show a list of all the keybindings on this page",id:"eclipse.keyAssist",callback:function(){if(B.style.display==="none"){c.empty(B);if(K){c.place("<h2>Editor</h2>",B,"last");for(var A=K.getTextView().getActions(false),H=0;H<A.length;H++)for(var J=A[H],Q=K.getTextView().getKeyBindings(J),V=0;V<Q.length;V++)c.place('<span role="listitem">'+h.getUserKeyString(Q[V])+" = "+J+"<br></span>",B,"last")}c.place("<h2>Global</h2>",
B,"last");X.showKeyBindings(B);B.style.display="block"}else B.style.display="none";return true}});X.addCommand(P,"global");X.registerCommandContribution("eclipse.keyAssist",100,"globalActions",null,true,new e.CommandKeyBinding(191,false,true));if(K){N=window.navigator.platform.indexOf("Mac")!==-1;K.getTextView().setKeyBinding(new e.CommandKeyBinding(191,false,true,!N,N),"Show Keys");K.getTextView().setAction("Show Keys",P.callback)}G.setKeyAssist(P.callback);x(X,C,U);if(c.indexOf(S,"eclipse.openWith")<
0)(C=T.getService("orion.file.contenttypes"))&&C.getContentTypesMap().then(function(A){A=g._createOpenWithCommands(T,A);for(var H=0;H<A.length;H++){var J=A[H].properties,Q=g._createCommandOptions(J,A[H].service,T,true);Q=new e.Command(Q);Q.isEditor=J.isEditor;X.addCommand(Q,"object");X.addCommandGroup("eclipse.openWith",1E3,"Open With");X.registerCommandContribution(Q.id,H,null,"eclipse.openWith")}});s(T);if(d.bottomHTMLFragment)(C=c.byId("footer"))&&c.place(d.bottomHTMLFragment,C,"only");r(T);h.forceLayout(da.parentNode);
c.subscribe("/dojo/hashchange",X,function(){X.processURL(window.location.href)})}var F=l(b.toUrl("auth/NotifyAuthentication.html")),I={},L=new orion.widgets.LoginDialog,G=new orion.widgets.UserMenu({loginDialog:L}),O=[],M,U,S=[],$=null;return{generateUserInfo:s,generateRelatedLinks:w,generateDomCommandsInBanner:o,generateBanner:D,notifyAuthenticationSite:F,setPendingAuthentication:p,getAuthenticationIds:n,setPageTarget:E,setPageCommandExclusions:z,authenticatedService:q}});
define("dojo/date",["dojo"],function(b){b.getObject("date",true,b);b.date.getDaysInMonth=function(c){var a=c.getMonth();if(a==1&&b.date.isLeapYear(c))return 29;return[31,28,31,30,31,30,31,31,30,31,30,31][a]};b.date.isLeapYear=function(c){c=c.getFullYear();return!(c%400)||!(c%4)&&!!(c%100)};b.date.getTimezoneName=function(c){var a=c.toString(),d="",e=a.indexOf("(");if(e>-1)d=a.substring(++e,a.indexOf(")"));else{e=/([A-Z\/]+) \d{4}$/;if(a=a.match(e))d=a[1];else{a=c.toLocaleString();e=/ ([A-Z\/]+)$/;
if(a=a.match(e))d=a[1]}}return d=="AM"||d=="PM"?"":d};b.date.compare=function(c,a,d){c=new Date(+c);a=new Date(+(a||new Date));if(d=="date"){c.setHours(0,0,0,0);a.setHours(0,0,0,0)}else if(d=="time"){c.setFullYear(0,0,0);a.setFullYear(0,0,0)}if(c>a)return 1;if(c<a)return-1;return 0};b.date.add=function(c,a,d){var e=new Date(+c),f=false,g="Date";switch(a){case "day":break;case "weekday":var h;if(a=d%5){a=a;h=parseInt(d/5)}else{a=d>0?5:-5;h=d>0?(d-5)/5:(d+5)/5}var j=c.getDay(),k=0;if(j==6&&d>0)k=1;
else if(j==0&&d<0)k=-1;j=j+a;if(j==0||j==6)k=d>0?2:-2;d=7*h+a+k;break;case "year":g="FullYear";f=true;break;case "week":d*=7;break;case "quarter":d*=3;case "month":f=true;g="Month";break;default:g="UTC"+a.charAt(0).toUpperCase()+a.substring(1)+"s"}g&&e["set"+g](e["get"+g]()+d);f&&e.getDate()<c.getDate()&&e.setDate(0);return e};b.date.difference=function(c,a,d){a=a||new Date;d=d||"day";var e=a.getFullYear()-c.getFullYear(),f=1;switch(d){case "quarter":c=c.getMonth();a=a.getMonth();c=Math.floor(c/3)+
1;a=Math.floor(a/3)+1;a+=e*4;f=a-c;break;case "weekday":e=Math.round(b.date.difference(c,a,"day"));d=parseInt(b.date.difference(c,a,"week"));f=e%7;if(f==0)e=d*5;else{var g=0,h=c.getDay();a=a.getDay();d=parseInt(e/7);f=e%7;c=new Date(c);c.setDate(c.getDate()+d*7);c=c.getDay();if(e>0)switch(true){case h==6:g=-1;break;case h==0:g=0;break;case a==6:g=-1;break;case a==0:g=-2;break;case c+f>5:g=-2}else if(e<0)switch(true){case h==6:g=0;break;case h==0:g=1;break;case a==6:g=2;break;case a==0:g=1;break;case c+
f<0:g=2}e+=g;e-=d*2}f=e;break;case "year":f=e;break;case "month":f=a.getMonth()-c.getMonth()+e*12;break;case "week":f=parseInt(b.date.difference(c,a,"day")/7);break;case "day":f/=24;case "hour":f/=60;case "minute":f/=60;case "second":f/=1E3;case "millisecond":f*=a.getTime()-c.getTime()}return Math.round(f)};return b.date});
define("dojo/cldr/supplemental",["dojo","dojo/i18n"],function(b){b.getObject("cldr.supplemental",true,b);b.cldr.supplemental.getFirstDayOfWeek=function(c){c={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}[b.cldr.supplemental._region(c)];return c===undefined?
1:c};b.cldr.supplemental._region=function(c){c=b.i18n.normalizeLocale(c);c=c.split("-");var a=c[1];if(a){if(a.length==4)a=c[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"}[c[0]];return a};b.cldr.supplemental.getWeekend=function(c){var a=b.cldr.supplemental._region(c);c={"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(c===undefined)c=6;if(a===undefined)a=0;return{start:c,end:a}};return b.cldr.supplemental});
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(b){b.getObject("date.locale",true,b);(function(){function c(e,f,g,h){return h.replace(/([a-z])\1*/ig,function(j){var k,l,m=j.charAt(0);j=j.length;var n=["abbr","wide","narrow"];switch(m){case "G":k=f[j<4?"eraAbbr":"eraNames"][e.getFullYear()<0?0:1];break;case "y":k=e.getFullYear();switch(j){case 1:break;case 2:if(!g.fullYear){k=String(k);k=k.substr(k.length-
2);break}default:l=true}break;case "Q":case "q":k=Math.ceil((e.getMonth()+1)/3);l=true;break;case "M":k=e.getMonth();if(j<3){k=k+1;l=true}else{m=["months-format",n[j-3]].join("-");k=f[m][k]}break;case "w":k=b.date.locale._getWeekOfYear(e,0);l=true;break;case "d":k=e.getDate();l=true;break;case "D":k=b.date.locale._getDayOfYear(e);l=true;break;case "E":k=e.getDay();if(j<3){k=k+1;l=true}else{m=["days-format",n[j-3]].join("-");k=f[m][k]}break;case "a":k=e.getHours()<12?"am":"pm";k=g[k]||f["dayPeriods-format-wide-"+
k];break;case "h":case "H":case "K":case "k":l=e.getHours();switch(m){case "h":k=l%12||12;break;case "H":k=l;break;case "K":k=l%12;break;case "k":k=l||24;break}l=true;break;case "m":k=e.getMinutes();l=true;break;case "s":k=e.getSeconds();l=true;break;case "S":k=Math.round(e.getMilliseconds()*Math.pow(10,j-3));l=true;break;case "v":case "z":if(k=b.date.locale._getZone(e,true,g))break;j=4;case "Z":k=b.date.locale._getZone(e,false,g);k=[k<=0?"+":"-",b.string.pad(Math.floor(Math.abs(k)/60),2),b.string.pad(Math.abs(k)%
60,2)];if(j==4){k.splice(0,0,"GMT");k.splice(3,0,":")}k=k.join("");break;default:throw new Error("dojo.date.locale.format: invalid pattern char: "+h);}if(l)k=b.string.pad(k,j);return k})}function a(e,f,g,h){var j=function(m){return m};f=f||j;g=g||j;h=h||j;var k=e.match(/(''|[^'])+/g),l=e.charAt(0)=="'";b.forEach(k,function(m,n){if(m){k[n]=(l?g:f)(m.replace(/''/g,"'"));l=!l}else k[n]=""});return h(k.join(""))}function d(e,f,g,h){h=b.regexp.escapeString(h);g.strict||(h=h.replace(" a"," ?a"));return h.replace(/([a-z])\1*/ig,
function(j){var k;k=j.charAt(0);var l=j.length,m="",n="";if(g.strict){if(l>1)m="0{"+(l-1)+"}";if(l>2)n="0{"+(l-2)+"}"}else{m="0?";n="0{0,2}"}switch(k){case "y":k="\\d{2,4}";break;case "M":k=l>2?"\\S+?":"1[0-2]|"+m+"[1-9]";break;case "D":k="[12][0-9][0-9]|3[0-5][0-9]|36[0-6]|"+n+"[1-9][0-9]|"+m+"[1-9]";break;case "d":k="3[01]|[12]\\d|"+m+"[1-9]";break;case "w":k="[1-4][0-9]|5[0-3]|"+m+"[1-9]";break;case "E":k="\\S+";break;case "h":k="1[0-2]|"+m+"[1-9]";break;case "k":k="1[01]|"+m+"\\d";break;case "H":k=
"1\\d|2[0-3]|"+m+"\\d";break;case "K":k="1\\d|2[0-4]|"+m+"[1-9]";break;case "m":case "s":k="[0-5]\\d";break;case "S":k="\\d{"+l+"}";break;case "a":l=g.am||f["dayPeriods-format-wide-am"];m=g.pm||f["dayPeriods-format-wide-pm"];k=l+"|"+m;if(!g.strict){if(l!=l.toLowerCase())k+="|"+l.toLowerCase();if(m!=m.toLowerCase())k+="|"+m.toLowerCase();if(k.indexOf(".")!=-1)k+="|"+k.replace(/\./g,"")}k=k.replace(/\./g,"\\.");break;default:k=".*"}e&&e.push(j);return"("+k+")"}).replace(/[\xa0 ]/g,"[\\s\\xa0]")}b.date.locale._getZone=
function(e,f){return f?b.date.getTimezoneName(e):e.getTimezoneOffset()};b.date.locale.format=function(e,f){f=f||{};var g=b.i18n.normalizeLocale(f.locale),h=f.formatLength||"short";g=b.date.locale._getGregorianBundle(g);var j=[];e=b.hitch(this,c,e,g,f);if(f.selector=="year")return a(g["dateFormatItem-yyyy"]||"yyyy",e);var k;if(f.selector!="date")(k=f.timePattern||g["timeFormat-"+h])&&j.push(a(k,e));if(f.selector!="time")(k=f.datePattern||g["dateFormat-"+h])&&j.push(a(k,e));return j.length==1?j[0]:
g["dateTimeFormat-"+h].replace(/\{(\d+)\}/g,function(l,m){return j[m]})};b.date.locale.regexp=function(e){return b.date.locale._parseInfo(e).regexp};b.date.locale._parseInfo=function(e){e=e||{};var f=b.i18n.normalizeLocale(e.locale);f=b.date.locale._getGregorianBundle(f);var g=e.formatLength||"short",h=e.datePattern||f["dateFormat-"+g],j=e.timePattern||f["timeFormat-"+g];g=e.selector=="date"?h:e.selector=="time"?j:f["dateTimeFormat-"+g].replace(/\{(\d+)\}/g,function(l,m){return[j,h][m]});var k=[];
return{regexp:a(g,b.hitch(this,d,k,f,e)),tokens:k,bundle:f}};b.date.locale.parse=function(e,f){var g=/[\u200E\u200F\u202A\u202E]/g,h=b.date.locale._parseInfo(f),j=h.tokens,k=h.bundle;e=(new RegExp("^"+h.regexp.replace(g,"")+"$",h.strict?"":"i")).exec(e&&e.replace(g,""));if(!e)return null;var l=["abbr","wide","narrow"],m=[1970,0,1,0,0,0,0],n="";e=b.every(e,function(s,p){if(!p)return true;p=j[p-1];var q=p.length;switch(p.charAt(0)){case "y":if(q!=2&&f.strict)m[0]=s;else if(s<100){s=Number(s);q=""+(new Date).getFullYear();
p=q.substring(0,2)*100;q=Math.min(Number(q.substring(2,4))+20,99);m[0]=s<q?p+s:p-100+s}else{if(f.strict)return false;m[0]=s}break;case "M":if(q>2){p=k["months-format-"+l[q-3]].concat();if(!f.strict){s=s.replace(".","").toLowerCase();p=b.map(p,function(t){return t.replace(".","").toLowerCase()})}s=b.indexOf(p,s);if(s==-1)return false}else s--;m[1]=s;break;case "E":case "e":p=k["days-format-"+l[q-3]].concat();if(!f.strict){s=s.toLowerCase();p=b.map(p,function(t){return t.toLowerCase()})}s=b.indexOf(p,
s);if(s==-1)return false;break;case "D":m[1]=0;case "d":m[2]=s;break;case "a":p=f.am||k["dayPeriods-format-wide-am"];q=f.pm||k["dayPeriods-format-wide-pm"];if(!f.strict){var o=/\./g;s=s.replace(o,"").toLowerCase();p=p.replace(o,"").toLowerCase();q=q.replace(o,"").toLowerCase()}if(f.strict&&s!=p&&s!=q)return false;n=s==q?"p":s==p?"a":"";break;case "K":if(s==24)s=0;case "h":case "H":case "k":if(s>23)return false;m[3]=s;break;case "m":m[4]=s;break;case "s":m[5]=s;break;case "S":m[6]=s}return true});
g=+m[3];if(n==="p"&&g<12)m[3]=g+12;else if(n==="a"&&g==12)m[3]=0;g=new Date(m[0],m[1],m[2],m[3],m[4],m[5],m[6]);f.strict&&g.setFullYear(m[0]);var r=j.join("");h=r.indexOf("d")!=-1;r=r.indexOf("M")!=-1;if(!e||r&&g.getMonth()>m[1]||h&&g.getDate()>m[2])return null;if(r&&g.getMonth()<m[1]||h&&g.getDate()<m[2])g=b.date.add(g,"hour",1);return g}})();(function(){var c=[];b.date.locale.addCustomFormats=function(a,d){c.push({pkg:a,name:d})};b.date.locale._getGregorianBundle=function(a){var d={};b.forEach(c,
function(e){e=b.i18n.getLocalization(e.pkg,e.name,a);d=b.mixin(d,e)},this);return d}})();b.date.locale.addCustomFormats("dojo.cldr","gregorian");b.date.locale.getNames=function(c,a,d,e){var f;e=b.date.locale._getGregorianBundle(e);c=[c,d,a];if(d=="standAlone"){d=c.join("-");f=e[d];if(f[0]==1)f=undefined}c[1]="format";return(f||e[c.join("-")]).concat()};b.date.locale.isWeekend=function(c,a){a=b.cldr.supplemental.getWeekend(a);c=(c||new Date).getDay();if(a.end<a.start){a.end+=7;if(c<a.start)c+=7}return c>=
a.start&&c<=a.end};b.date.locale._getDayOfYear=function(c){return b.date.difference(new Date(c.getFullYear(),0,1,c.getHours()),c)+1};b.date.locale._getWeekOfYear=function(c,a){if(arguments.length==1)a=0;var d=(new Date(c.getFullYear(),0,1)).getDay(),e=(d-a+7)%7;e=Math.floor((b.date.locale._getDayOfYear(c)+e-1)/7);d==a&&e++;return e};return b.date.locale});
define("orion/auth",["dojo","dijit","orion/globalCommands","dojo/date/locale","orion/widgets/LoginDialog"],function(b,c,a){function d(g,h){if(g.status===403){if(typeof e==="undefined")e=new c.Dialog({title:"Forbidden access"});var j=g.message;if(g.responseText)j=JSON.parse(g.responseText).Message||g.message;e.set("content",j);e.show()}else if(g.status===401)try{var k=JSON.parse(g.responseText);if(!k.SignInKey)return k;var l=localStorage.getItem(k.SignInKey),m=function(){var s=localStorage.getItem(k.SignInKey);
if(l!==s){window.removeEventListener("storage",m,false);delete f[k.SignInKey];a.setPendingAuthentication(f);a.authenticatedService(k.SignInKey);h&&h()}};window.addEventListener("storage",m,false);if(k.SignInKey){f[k.SignInKey]=k;a.setPendingAuthentication(f)}}catch(n){}else try{return JSON.parse(g.responseText)}catch(r){return{Message:g.Message,HttpCode:g.status}}}var e,f={};b.addOnLoad(function(){window.dojo=b;window.eclipse=window.eclipse||{};eclipse.globalCommandUtils=a});return{handleAuthenticationError:d}});
define("orion/preferences",["require","dojo","orion/auth","dojo/DeferredList"],function(b,c,a){function d(k,l){this._name=k;this._providers=l;this._flushPending=false;this._cached=null;this._stores=[];this._dirty=[]}function e(k,l){return{get:function(m,n){if(l===0)return null;m=localStorage.getItem(k+m);if(m===null)return null;m=JSON.parse(m);if(n||l===-1||m._expires&&m._expires>(new Date).getTime()){delete m._expires;return m}return null},set:function(m,n){if(l!==0){if(l!==-1)n._expires=(new Date).getTime()+
1E3*l;if(Object.keys(n).length===0)localStorage.removeItem(k+m);else{var r=JSON.stringify(n);localStorage.setItem(k+m,r);delete n._expires}}},remove:function(m){localStorage.removeItem(k+m)}}}function f(k){this._currentPromises={};this._cache=new e("/orion/preferences/user",0);this._service=null;this.available=function(){if(!this._service){var l=k.getServiceReferences("orion.core.preference.provider");if(l.length>0)this._service=k.getService(l[0])}return!!this._service}}function g(k){this._location=
k;this._currentPromise=null;this._cache=new e("/orion/preferences/default",3600)}function h(){this._cache=new e("/orion/preferences/local",-1)}function j(k,l){this._userProvider=new f(k);this._localProvider=new h;l=l||"defaults.pref";if(l.indexOf("://")===-1)l=b.toUrl(l);this._defaultsProvider=new g(l);this._serviceRegistration=k.registerService("orion.core.preference",this)}d.prototype={_flush:function(){for(var k=[],l=0;l<this._stores.length;++l){var m=this._stores[l];this._dirty.indexOf(m)!==-1&&
k.push(this._providers[l].put(this._name,m))}this._dirty=[];return new c.DeferredList(k)},_scheduleFlush:function(k){this._dirty.indexOf(k)===-1&&this._dirty.push(k);if(!this._flushPending){this._flushPending=true;window.setTimeout(c.hitch(this,function(){if(this._flushPending){this._flushPending=false;this._flush()}}),0)}},_getCached:function(){if(!this._cached){this._cached={};for(var k=0;k<this._stores.length;++k){var l=this._stores[k];for(var m in l)if(l.hasOwnProperty(m)&&typeof this._cached[m]===
"undefined")this._cached[m]=l[m]}}return this._cached},keys:function(){return Object.keys(this._getCached())},get:function(k){return this._getCached()[k]},put:function(k,l){if(this._stores.length!==0){var m=this._stores[0];if(m[k]!==l){m[k]=l;this._cached=null;this._scheduleFlush(m)}}},remove:function(k){for(var l=0;l<this._stores.length;++l){var m=this._stores[l];if(m.hasOwnProperty(k)){delete m[k];this._cached=null;this._scheduleFlush(m);return true}}return false},clear:function(){for(var k=0;k<
this._stores.length;++k){this._stores[k]={};this._scheduleFlush(this._stores[k])}this._cached=null},sync:function(k){if(this._flushPending){this._flushPending=false;return this._flush()}for(var l=this,m=[],n=0;n<this._providers.length;++n)m.push(this._providers[n].get(this._name,k).then(function(r){return function(s){l._stores[r]=s}}(n)));return(new c.DeferredList(m)).then(function(){l._cached=null;l._getCached()})},flush:function(){this._flush()}};f.prototype={get:function(k,l){if(this._currentPromises[k])return this._currentPromises[k];
var m=new c.Deferred,n=null;if(l)this._cache.remove(k);else n=this._cache.get(k);if(n!==null)m.resolve(n);else{this._currentPromises[k]=m;var r=this;this._service.get(k).then(function(s){r._cache.set(k,s);delete r._currentPromises[k];m.resolve(s)},function(s){if(s.status===401){delete r._currentPromises[k];m.resolve({});a.handleAuthenticationError(s,function(){r.get(k)})}else if(s.status===404){s={};r._cache.set(k,s);delete r._currentPromises[k];m.resolve(s)}else{delete r._currentPromises[k];m.resolve(r._cache.get(k,
true)||{})}})}return m},put:function(k,l){var m=new c.Deferred;this._cache.set(k,l);var n=this;this._service.put(k,l).then(function(){m.resolve()},function(r){r.status===401?a.handleAuthenticationError(r,function(){n._service.put(k,l).then(function(){m.resolve()},function(){m.resolve()})}):m.resolve()});return m}};g.prototype={get:function(k,l){if(this._currentPromise)return this._currentPromise;var m=new c.Deferred,n=null;if(l)this._cache.remove(k);else n=this._cache.get(k);if(n!==null)m.resolve(n);
else{this._currentPromise=m;var r=this;c.xhrGet({url:this._location,headers:{"Orion-Version":"1"},handleAs:"json",timeout:15E3,load:function(s){r._cache.set(k,s[k]||{});r._currentPromise=null;m.resolve(s[k]||{})},error:function(s,p){if(p.xhr.status===401){r._currentPromise=null;m.resolve({});m=new c.Deferred;r._currentPromise=m;var q=this;a.handleAuthenticationError(p.xhr,function(){c.xhrGet(q)})}else if(p.xhr.status===404){r._cache.set(k,{});r._currentPromise=null;m.resolve({})}else{r._currentPromise=
null;s=r._cache.get(k,true);s!==null?m.resolve(s[k]||{}):m.resolve({})}}})}return m},put:function(){var k=new c.Deferred;k.resolve();return k}};h.prototype={get:function(k){var l=new c.Deferred;k=this._cache.get(k);k!==null?l.resolve(k):l.resolve({});return l},put:function(k,l){var m=new c.Deferred;this._cache.set(k,l);m.resolve();return m}};j.DEFAULT_SCOPE=1;j.LOCAL_SCOPE=2;j.USER_SCOPE=4;j.prototype={getPreferences:function(k,l){if(!l||typeof l!=="number"||l>7||l<1)l=j.DEFAULT_SCOPE|j.LOCAL_SCOPE|
j.USER_SCOPE;var m=[];j.USER_SCOPE&l&&this._userProvider.available()&&m.push(this._userProvider);j.LOCAL_SCOPE&l&&m.push(this._localProvider);j.DEFAULT_SCOPE&l&&m.push(this._defaultsProvider);var n=new d(k,m);return n.sync().then(function(){return n})}};return{PreferencesService:j}});
define("orion/pluginregistry",["dojo","orion/serviceregistry","dojo/DeferredList"],function(b,c){var a=a||{};a.Plugin=function(d,e,f){function g(t,u,w,x){if(!m)throw new Error("plugin not connected");var z=p++;q[String(z)]=x;f.postMessage({id:z,serviceId:t,method:u,params:w},m)}function h(t){var u={};if(t.methods)for(var w=0;w<t.methods.length;w++){var x=t.methods[w];u[x]=function(z){return function(){var E=Array.prototype.slice.call(arguments),D=new b.Deferred;l._load().then(function(){g(t.serviceId,
z,E,D)});return D.promise}}(x)}return u}function j(){var t=e.services;if(t)for(var u=0;u<t.length;u++){var w=t[u],x=h(w);o[w.serviceId]=f.registerService(w.type,x,w.properties)}}function k(t){try{if(t.method)if("plugin"===t.method){if(e){if(JSON.stringify(e)!==JSON.stringify(t.params[0])){for(var u in o)if(o.hasOwnProperty(u)){o[u].unregister();delete o[u]}e=t.params[0];j();f.updatePlugin(l)}}else{e=t.params[0];j()}if(!s){s=true;n.resolve(l)}if(r){r.resolve(l);r=null}}else if("dispatchEvent"===t.method){var w=
o[t.serviceId];w.dispatchEvent.apply(w,t.params)}else if("progress"===t.method){var x=q[String(t.requestId)];x.progress.apply(x,t.params)}else throw new Error("Bad response method: "+t.method);else{x=q[String(t.id)];delete q[String(t.id)];t.error?x.reject(t.error):x.resolve(t.result)}}catch(z){console.log(z)}}var l=this,m=null,n=new b.Deferred,r=null,s=false,p=0,q={},o={};this.getLocation=function(){return d};this.getData=function(){return e};this.uninstall=function(){for(var t in o)if(o.hasOwnProperty(t)){o[t].unregister();
delete o[t]}if(m){f.disconnect(m);m=null}f.uninstallPlugin(this)};this.getServiceReferences=function(){var t=[],u;for(u in o)o.hasOwnProperty(u)&&t.push(o[u].getServiceReference());return t};this.update=function(){if(!s)return this._load();var t;if(r===null){t=r=new b.Deferred;f.disconnect(m);m=f.connect(d,k);setTimeout(function(){r===t&&r.reject(new Error("Load timeout for plugin: "+d))},15E3)}return r};this._load=function(t){if(!m){m=f.connect(d,k);setTimeout(function(){if(!s){if(!t){e={};f.updatePlugin(l)}n.reject(new Error("Load timeout for plugin: "+
d))}},15E3)}return n.promise};if(typeof d!=="string")throw new Error("invalid url:"+d);e&&j()};a.PluginRegistry=function(d,e,f){function g(p){if(p.indexOf("://")===-1){var q=document.createElement("a");q.href=p;return q.href}return p}function h(p){delete l["plugin."+p.getLocation()]}function j(p){p.getData()._expires=(new Date).getTime()+36E5;l["plugin."+p.getLocation()]=JSON.stringify(p.getData())}function k(p){p=g(p);for(var q=0,o=m.length;q<o;q++){var t=m[q];if(p===t.getLocation())return t}return null}
var l=e||localStorage||{},m=[],n=[],r=new c.EventTarget;addEventListener("message",function(p){for(var q=0,o=p.source;q<n.length;q++)if(o===n[q].target){if(typeof n[q].useStructuredClone==="undefined")n[q].useStructuredClone=typeof p.data!=="string";n[q].handler(n[q].useStructuredClone?p.data:JSON.parse(p.data));break}},false);var s={registerService:b.hitch(d,d.registerService),connect:function(p,q){var o=document.createElement("iframe");o.id=p;o.name=p;if(!f){o.style.display="none";o.style.visibility=
"hidden"}o.src=p;document.body.appendChild(o);p={iframe:o,target:o.contentWindow,handler:q,url:p};n.push(p);return p},disconnect:function(p){for(var q=0;q<n.length;q++)if(p===n[q]){n.splice(q,1);try{document.body.removeChild(p.iframe)}catch(o){}break}},uninstallPlugin:function(p){h(p);for(var q=0;q<m.length;q++)if(p===m[q]){m.splice(q,1);r.dispatchEvent("pluginRemoved",p);break}},updatePlugin:function(p){j(p);r.dispatchEvent("pluginUpdated",p)},postMessage:function(p,q){q.target.postMessage(q.useStructuredClone?
p:JSON.stringify(p),q.url)}};this.startup=function(p){for(var q=[],o=0;o<p.length;++o){var t=p[o];t=g(t);var u="plugin."+t,w=l[u]?JSON.parse(l[u]):null;if(w&&w._expires&&w._expires>(new Date).getTime()){if(k(t)===null){delete w._expires;m.push(new a.Plugin(t,w,s))}}else{l[u]="{}";t=new a.Plugin(t,{},s);m.push(t);q.push(t._load(false))}}return new b.DeferredList(q)};this.shutdown=function(){for(var p=0;p<n.length;p++)try{document.body.removeChild(n[p].iframe)}catch(q){}};this.installPlugin=function(p,
q){p=g(p);var o=new b.Deferred,t=k(p);if(t)if(t.getData())o.resolve(t);else{var u=function(w){if(w.getLocation()===p){o.resolve(w);r.removeEventListener("pluginAdded",u)}};r.addEventListener("pluginAdded",u)}else{t=new a.Plugin(p,q,s);m.push(t);if(t.getData()){j(t);r.dispatchEvent("pluginAdded",t);o.resolve(t)}else t._load(true).then(function(){j(t);r.dispatchEvent("pluginAdded",t);o.resolve(t)},function(w){o.reject(w)})}return o.promise};this.getPlugins=function(){for(var p=[],q=0;q<m.length;q++)m[q].getData()&&
p.push(m[q]);return p};this.getPlugin=function(p){if((p=k(p))&&p.getData())return p;return null};this.addEventListener=function(p,q){r.addEventListener(p,q)};this.removeEventListener=function(p,q){r.removeEventListener(p,q)}};return a});
define("orion/bootstrap",["require","dojo","orion/serviceregistry","orion/preferences","orion/pluginregistry"],function(b,c,a,d,e){function f(){var g=new a.ServiceRegistry,h=new d.PreferencesService(g),j=new e.PluginRegistry(g);return h.getPreferences("/plugins").then(function(k){k=k.keys();for(var l=0;l<k.length;++l)if(k[l].indexOf("://")===-1)k[l]=b.toUrl(k[l]);return j.startup(k)}).then(function(){if(g.getServiceReferences("orion.core.preference.provider").length>0)return h.getPreferences("/plugins",
h.USER_SCOPE).then(function(k){k=k.keys();for(var l=0;l<k.length;++l)if(k[l].indexOf("://")===-1)k[l]=b.toUrl(k[l]);return j.startup(k)})}).then(function(){c.addOnWindowUnload(function(){j.shutdown()})}).then(function(){return{serviceRegistry:g,preferences:h,pluginRegistry:j}})}return{startup:f}});
define("orion/status",["require","dojo","orion/util"],function(b,c,a){function d(e,f,g,h,j){this._serviceRegistry=e;this._serviceRegistration=e.registerService("orion.page.message",this);this._operationsClient=f;this.notificationContainerDomId=j;this.domId=g;this.progressDomId=h||g;this._hookedClose=false}d.prototype={_init:function(){var e=c.byId("closeNotifications");if(e&&!this._hookedClose){c.connect(e,"onclick",this,function(){this.setProgressMessage("");c.removeClass(this.notificationContainerDomId,
"slideContainerActive")});c.connect(e,"onkeypress",this,function(f){if(f.keyCode===c.keys.ENTER||f.keyCode===c.keys.SPACE){this.setProgressMessage("");c.removeClass(this.notificationContainerDomId,"slideContainerActive")}})}},setMessage:function(e,f){this._init();c.place(window.document.createTextNode(e),this.domId,"only");if(typeof f==="number"){var g=this;window.setTimeout(function(){var h=c.byId(g.domId);(typeof h.textContent==="string"?h.textContent:h.innerText)===e&&c.place(window.document.createTextNode(""),
g.domId,"only")},f)}},setErrorMessage:function(e){this._init();var f=e.responseText||e.message||e;try{f=JSON.parse(f)}catch(g){}e=f.Message||f;var h="red";if(f.Severity)switch(f.Severity){case "Warning":h="#FFCC00";break;case "Error":h="red";break;case "Info":case "Ok":h="green";break}f=c.create("span",{style:{color:h}});c.place(window.document.createTextNode(e),f);c.place(f,this.domId,"only")},setProgressMessage:function(e){this._init();var f=c.create("span",{"class":"imageSprite core-sprite-progress"});
c.place(f,this.progressDomId,"only");c.place(window.document.createTextNode(e),this.progressDomId,"last");c.addClass(this.notificationContainerDomId,"progressNormal");e.length>0?c.addClass(this.notificationContainerDomId,"slideContainerActive"):c.removeClass(this.notificationContainerDomId,"slideContainerActive");a.forceLayout(this.notificationContainerDomId)},setProgressResult:function(e){e=e.responseText||e;try{e=JSON.parse(e)}catch(f){}this._init();var g=e.Message||e,h="imageSprite core-sprite-info",
j="progressInfo",k="progressWarning progressError progressNormal";if(e.Severity)switch(e.Severity){case "Warning":h="imageSprite core-sprite-warning";j="progressWarning";k="progressInfo progressError progressNormal";break;case "Error":h="imageSprite core-sprite-error";j="progressError";k="progressWarning progressInfo progressNormal";break}h=c.create("span",{"class":h});c.place(h,this.progressDomId,"only");if(e.HTML)c.place(g,this.progressDomId,"last");else{c.place(window.document.createTextNode("   "+
g),this.progressDomId,"last");if(j&&this.progressDomId!==this.domId){c.addClass(this.notificationContainerDomId,j);c.removeClass(this.notificationContainerDomId,k)}}c.addClass(this.notificationContainerDomId,"slideContainerActive");a.forceLayout(this.notificationContainerDomId)},showWhile:function(e,f){var g=this;g.setProgressMessage(f);return e.then(function(h){if(h&&h.Location&&h.Message&&h.Running)return c.hitch(g,g._doProgressWhile)(h);g.setProgressMessage("");h&&h.Result&&g.setProgressResult(h.Result);
return h})},_doProgressWhile:function(e){var f=new c.Deferred,g=this;window.setTimeout(function(){g._operationsClient.getOperation(e.Location).then(function(h){f.callback(h)})},2E3);return this.showWhile(f,e.Message)}};d.prototype.constructor=d;return{StatusReportingService:d}});define("text!orion/widgets/templates/OperationsDialog.html",function(){return'\n<div>\n\t<div class="dijitTooltipContainer" role="presentation" style="padding: 0.5em; min-width: 300px;">\n\t\t<div class="dijitTooltipContents dijitTooltipFocusNode" role="dialog"\n\t\t\tdojoattachpoint="containerNode" style="padding: 0">\n\t\t\t<table style="width: 100%;">\n\t\t\t\t<tr>\n\t\t\t\t\t<td><h2>Recent operations</h2></td>\n\t\t\t\t\t<td style="text-align: right;"><a dojoAttachPoint="allOperationsLink">All Operations</a></td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t\t<span dojoAttachPoint="operationsExist">\n\t\t\t\t<span class="secondaryColumn" dojoAttachPoint="myOperationsListEmpty">No operations running on this page.</span>\n\t\t\t\t<table dojoAttachPoint="myOperationsList" style="display: none;">\n\t\t\t\t</table>\n\t\t\t\t<span class="secondaryColumn" dojoAttachPoint="otherOperations"><br>Operations from other pages:</span>\n\t\t\t\t<table dojoAttachPoint="operationsList" style="display: none;">\n\t\t\t\t</table>\n\t\t\t</span>\n\t\t\t<span class="secondaryColumn" dojoAttachPoint="operationsDontExist">No operations running.</span>\n\t\t</div>\n\t</div>\n\t<div class="dijitTooltipConnector" role="presentation"></div>\n\n</div>'});
define("orion/widgets/OperationsDialog",["require","dojo","dijit","orion/util","dijit/TooltipDialog","text!orion/widgets/templates/OperationsDialog.html"],function(b,c,a){c.declare("orion.widgets.OperationsDialog",[a.TooltipDialog],{widgetsInTemplate:true,closable:true,templateString:c.cache("orion","widgets/templates/OperationsDialog.html"),constructor:function(){this.inherited(arguments);this.options=arguments[0]||{};this._operations=[];this._myOperations=[]},postCreate:function(){this.inherited(arguments);
this.allOperationsLink.href=b.toUrl("operations/list.html");this._setOperationsVisibility()},setOperations:function(d,e){this._operations=[];e=e||{};this._myOperations=[];if(d.Children)for(var f=0;f<d.Children.length;f++)e[d.Children[f].Id]?this._myOperations.push(d.Children[f]):this._operations.push(d.Children[f]);this._operations.sort(function(g,h){return parseInt(h.Modified)-parseInt(g.Modified)});this._myOperations.sort(function(g,h){return parseInt(h.Modified)-parseInt(g.Modified)});this._renderOperations()},
parseProgressResult:function(d){if(!d)return{};d=d.responseText||d;try{d=JSON.parse(d)}catch(e){}var f={Message:d.Message||d,Severity:d.Severity};if(d.DetailedMessage&&d.DetailedMessage!==f.Message)f.DetailedMessage=d.DetailedMessage;return f},_renderOperations:function(){this._renderOperationsTable(this.myOperationsList,this._myOperations);this._renderOperationsTable(this.operationsList,this._operations)},_renderOperationsTable:function(d,e){c.empty(d);for(var f=0;f<e.length;f++){var g=e[f],h=c.create("tr"),
j=c.create("td",{style:"padding-left: 5px; padding-right: 5px",innerHTML:g.Name},h);j=c.create("div",null,j,"only");link=c.create("span",{innerHTML:g.Name,className:"primaryColumn"},j,"last");c.place(document.createTextNode(g.Name),link,"only");var k=c.create("span",null,j,"first");c.addClass(k,"imageSprite");var l=this.parseProgressResult(g.Result);switch(l.Severity){case "Warning":c.addClass(k,"core-sprite-warning");break;case "Error":c.addClass(k,"core-sprite-error");break;default:if(g.Running===
true)c.addClass(k,"core-sprite-start");else if(g.Canceled===true)c.addClass(k,"core-sprite-stop");else g.Failed===true?c.addClass(k,"core-sprite-error"):c.addClass(k,"core-sprite-ok")}if(l.Message||g.Message){g=l.Message||g.Message;if(l.DetailedMessage&&l.DetailedMessage!=="")g+=": "+l.DetailedMessage;c.create("br",null,j,"last");c.create("span",{className:"secondaryColumn",style:"margin-left: 18px;",innerHTML:g},j,"last")}c.place(h,d,"last")}this._setOperationsVisibility()},_setOperationsVisibility:function(){this.operationsList.style.display=
this._operations.length>0?"":"none";this.otherOperations.style.display=this._operations.length>0?"":"none";this.myOperationsList.style.display=this._myOperations.length>0?"":"none";this.myOperationsListEmpty.style.display=this._myOperations.length>0?"none":"";this.operationsDontExist.style.display=this._operations.length+this._myOperations.length>0?"none":"";this.operationsExist.style.display=this._operations.length+this._myOperations.length>0?"":"none"},_onBlur:function(){this.inherited(arguments);
a.popup.hide&&a.popup.hide(this);a.popup.close(this)}})});
define("orion/progress",["require","dojo","orion/globalCommands","orion/widgets/OperationsDialog"],function(b,c,a){function d(e,f){this._serviceRegistry=e;this._serviceRegistration=e.registerService("orion.page.progress",this);this._operationsClient=f;this._initDone=false;this._topicListeners={};this._myOperations={};this._lastIconClass=this._lastOperation=null}d.prototype={init:function(e){if(!this._progressPane){this._progressPane=c.byId(e);this._operationsDialog=new orion.widgets.OperationsDialog;
c.connect(this._progressPane,"onclick",c.hitch(this,this._openOperationsPopup));var f=this;if(new Date-this.getLastListUpdate()>3E5)this._operationsClient.getRunningOperations().then(function(g){c.hitch(f,f._loadOperationsList)(g);window.setTimeout(function(){c.hitch(f,f._checkOperationsChanges())},5E3)},function(g){console.error(g)});else{c.hitch(f,f._generateOperationsInfo(JSON.parse(localStorage.getItem("orionOperations")||'{"Children": []}')));window.setTimeout(function(){c.hitch(f,f._checkOperationsChanges())},
5E3)}window.addEventListener("storage",function(g){a.getAuthenticationIds().indexOf(g.key)>=0&&f._operationsClient.getRunningOperations().then(function(h){c.hitch(f,f._loadOperationsList)(h)},function(h){console.error(h)})},false);window.addEventListener("storage",function(g){if(g.key==="orionOperations")c.hitch(f,f._generateOperationsInfo(JSON.parse(localStorage.getItem("orionOperations")||'{"Children": []}')))})}},_loadOperationsList:function(e){e.lastClientDate=new Date;if(e.lastClientDate-this.getLastListUpdate()>
3E5){localStorage.setItem("orionOperations",JSON.stringify(e));this._generateOperationsInfo(e)}},getLastListUpdate:function(){var e=JSON.parse(localStorage.getItem("orionOperations")||'{"Children": []}');return e.lastClientDate?new Date(e.lastClientDate):new Date(0)},_markOperationAsFailed:function(e,f,g){e.Message="Operation status is unknown";e.Running=false;e.Failed=true;e.Result={HttpCode:g?g.xhr.staus:500,Severity:f,Message:f.Message?f.Message:f};this.writeOperation(e)},_checkOperationsChanges:function(){for(var e=
this,f=JSON.parse(localStorage.getItem("orionOperations")||'{"Children": []}'),g=[],h=[],j=0;j<f.Children.length;j++){var k=f.Children[j];if(k.Running==true&&new Date-new Date(k.lastClientDate?k.lastClientDate:0)>5E3){var l=this._operationsClient.getOperation(k.Location);h.push(l);c.hitch(this,function(m){l.then(function(n){n.lastClientDate=new Date;c.hitch(e,e.writeOperation)(n)},function(n,r){if(n.status==404){g.push(m);return n}c.hitch(e,e._markOperationAsFailed(f.Children[m],n,r))})})(j)}if(!k.Running&&
new Date-new Date(k.lastClientDate?k.lastClientDate:0)>3E5)g.push(j)}(new c.DeferredList(h)).addBoth(function(){if(g.length>0){f.lastClientDate=new Date;for(var m=g.length-1;m>=0;m--)f.Children.splice(g[m],1);localStorage.setItem("orionOperations",JSON.stringify(f));c.hitch(e,e._generateOperationsInfo)(f)}window.setTimeout(function(){c.hitch(e,e._checkOperationsChanges())},5E3)})},_openOperationsPopup:function(){try{dijit.popup.open({popup:this._operationsDialog,around:this._progressPane})}catch(e){}dijit.focus(this._operationsDialog.domNode)},
_switchIconTo:function(e){this._lastIconClass&&c.removeClass(this._progressPane,this._lastIconClass);this._lastIconClass=e;c.addClass(this._progressPane,this._lastIconClass)},_generateOperationsInfo:function(e){this._operationsDialog.setOperations(e,this._myOperations);if(!e.Children||e.Children.length==0){this._switchIconTo("progressPane_empty");this._progressPane.title="Operations"}else{for(var f="",g=0;g<e.Children.length;g++){var h=e.Children[g];if(this._myOperations[h.Id])if(h.Running==true){f=
"running";break}}if(f===""&&this._lastOperation!=null)if(this._lastOperation.Result)switch(this._operationsDialog.parseProgressResult(this._lastOperation.Result).Severity){case "Warning":if(f!=="error")f="warning";break;case "Error":f="error"}switch(f){case "running":this._progressPane.title="Operations running";this._switchIconTo("progressPane_running");break;case "warning":this._progressPane.title="Some operations finished with warning";this._switchIconTo("progressPane_warning");break;case "error":this._progressPane.title=
"Some operations finished with error";this._switchIconTo("progressPane_error");break;default:this._progressPane.title="Operations";this._switchIconTo("progressPane_operations")}}},followOperation:function(e,f,g){if(e.Id)this._myOperations[e.Id]=true;var h=f?f:new c.Deferred;this.writeOperation(e);var j=this;if(e&&e.Location&&e.Running==true)window.setTimeout(function(){j._operationsClient.getOperation(e.Location).then(function(k){c.hitch(j,j.followOperation(k,h,e.Location))},function(k,l){c.hitch(j,
j.setProgressResult)({Severity:"Error",Message:k});c.hitch(j,j._markOperationAsFailed(e,k,l));h.errback(k,l)})},2E3);else if(e&&e.Result){j._serviceRegistry.getService("orion.page.message").setProgressMessage("");f=this._operationsDialog.parseProgressResult(e.Result).Severity;if(f=="Error"||f=="Warning"){e.Result.failedOperation={Location:g,Id:e.Id,Name:e.Name};h.callback(e);setTimeout(function(){j._myOperations[e.Id]&&c.hitch(j,j._openOperationsPopup)()},10)}else h.callback(e);!e.Failed&&e.Idempotent==
true&&window.setTimeout(function(){c.hitch(j,j.removeOperation)(g,e.Id)},5E3)}return h},removeOperation:function(e,f){that=this;if(f){if(this._lastOperation!=null&&this._lastOperation.Id===f)this._lastOperation=null;delete this._myOperations[f]}c.hitch(that._operationsClient,that._operationsClient.removeOperation)(e).then(function(){c.hitch(that,that.removeOperationFromTheList)(f)})},removeOperationFromTheList:function(e){if(this._lastOperation!=null&&this._lastOperation.Id===e)this._lastOperation=
null;delete this._myOperations[e];for(var f=JSON.parse(localStorage.getItem("orionOperations")||'{"Children": []}'),g=0;g<f.Children.length;g++){var h=f.Children[g];if(h.Id&&h.Id===e){f.Children.splice(g,1);break}}localStorage.setItem("orionOperations",JSON.stringify(f));this._generateOperationsInfo(f)},removeCompletedOperations:function(){for(var e=JSON.parse(localStorage.getItem("orionOperations")||'{"Children": []}'),f=e.Children.length-1;f>=0;f--)e.Children[f].Running||e.Children.splice(f,1);
localStorage.setItem("orionOperations",JSON.stringify(e));this._generateOperationsInfo(e)},setProgressResult:function(e){this._serviceRegistry.getService("orion.page.message").setProgressResult(e)},showWhile:function(e,f){f&&this._serviceRegistry.getService("orion.page.message").setProgressMessage(f);var g=this;return e.then(function(h){if(h&&h.Location&&h.Message&&h.Running)return c.hitch(g,g.followOperation)(h,null,h.Location);g._serviceRegistry.getService("orion.page.message").setProgressMessage("");
return h},function(h){c.hitch(g,g.setProgressResult)(h);return h})},followTopic:function(e,f){this._topicListeners[e]||(this._topicListeners[e]=[]);this._topicListeners[e].push(f)},writeOperation:function(e){this._lastOperation=e=JSON.parse(JSON.stringify(e));for(var f=JSON.parse(localStorage.getItem("orionOperations")||'{"Children": []}'),g=0;g<f.Children.length;g++){var h=f.Children[g];if(h.Id&&h.Id===e.Id){f.Children.splice(g,1);break}}!e.Running&&!e.Failed&&delete e.Result;e.lastClientDate=new Date;
f.Children.push(e);f.lastClientDate=new Date;localStorage.setItem("orionOperations",JSON.stringify(f));this._generateOperationsInfo(f)}};d.prototype.constructor=d;return{ProgressService:d}});define("orion/dialogs",[],function(){function b(c){this._serviceRegistry=c;this._serviceRegistration=c.registerService("orion.page.dialog",this)}b.prototype={confirm:function(c,a){a(window.confirm(c))},openFiles:function(){}};b.prototype.constructor=b;return{DialogService:b}});
define("orion/selection",["dojo"],function(b){function c(a){this._serviceRegistry=a;this._serviceRegistration=a.registerService("orion.page.selection",this);this._selections=[]}c.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=b.isArray(a)?a:a?[a]:null;this._serviceRegistration.dispatchEvent("selectionChanged",
this._getSingleSelection(),this._selections)}};c.prototype.constructor=c;return{Selection:c}});
define("orion/fileClient",["dojo","orion/auth","dojo/DeferredList"],function(b,c){function a(f,g,h){if(!f[g])throw g+" is not supportted in this file system";var j=new b.Deferred;f[g].apply(f,h).then(function(k){j.callback(k)},function(k){k.status===401?c.handleAuthenticationError(k,function(){f[g].apply(f,h).then(function(l){j.callback(l)},function(l){j.errback(l)})}):j.errback(k)});return j}function d(f,g,h,j){if(!f.readBlob)throw"source file service does not support binary read";if(!h.writeBlob)throw"target file service does not support binary write";
if(g[g.length-1]!=="/")return a(f,"readBlob",[g]).then(function(m){return a(h,"writeBlob",[j,m])});var k=j.substring(0,j.length-1),l=decodeURIComponent(k.substring(k.lastIndexOf("/")+1));k=k.substring(0,k.lastIndexOf("/")+1);return a(h,"createFolder",[k,l]).then(function(){},function(){}).then(function(){if(g.indexOf("/")===0)g+="?depth=1";return a(f,"fetchChildren",[g]).then(function(m){for(var n=[],r=0;r<m.length;++r){var s=m[r].Location,p=s;if(m[r].Directory)p=s.substring(0,s.length-1);p=decodeURIComponent(p.substring(p.lastIndexOf("/")+
1));p=j+encodeURIComponent(p);if(m[r].Directory)p+="/";n[r]=d(f,s,h,p)}return new b.DeferredList(n)})})}function e(f,g){function h(q){var o=new b.Deferred;o.reject("No Matching FileService for location:"+q);return o}var j=f.getServiceReferences("orion.core.file"),k=j;if(g){k=[];for(var l=0;l<j.length;++l)g(j[l])&&k.push(j[l])}var m=[],n=[],r=[],s=[],p={fetchChildren:function(){var q=new b.Deferred;q.resolve(s);return q},createWorkspace:function(){var q=new b.Deferred;q.reject("no file service");return q},
loadWorkspaces:function(){var q=new b.Deferred;q.reject("no file service");return q},loadWorkspace:function(){var q=new b.Deferred;window.setTimeout(function(){q.resolve({Directory:true,Length:0,LocalTimeStamp:0,Name:"File Servers",Location:"/",Children:s,ChildrenLocation:"/"})},100);return q},search:h,createProject:h,createFolder:h,createFile:h,deleteFile:h,moveFile:h,copyFile:h,read:h,write:h};for(g=0;g<k.length;++g){s[g]={Directory:true,Length:0,LocalTimeStamp:0,Location:k[g].getProperty("top"),
ChildrenLocation:k[g].getProperty("top"),Name:k[g].getProperty("Name")};j=k[g].getProperty("pattern")||".*";if(j[0]!=="^")j="^"+j;m[g]=new RegExp(j);n[g]=f.getService(k[g]);r[g]=k[g].getProperty("Name")}this._getServiceIndex=function(q){if(q==="/")return-1;else if(!q||q.length&&q.length===0)return 0;for(var o=0;o<m.length;++o)if(m[o].test(q))return o;throw"No Matching FileService for location:"+q;};this._getService=function(q){q=this._getServiceIndex(q);return q===-1?p:n[q]};this._getServiceName=
function(q){q=this._getServiceIndex(q);return q===-1?p.Name:r[q]}}e.prototype={fileServiceName:function(f){return this._getServiceName(f)},fetchChildren:function(f){return a(this._getService(f),"fetchChildren",arguments)},createWorkspace:function(){return a(this._getService(),"createWorkspace",arguments)},loadWorkspaces:function(){return a(this._getService(),"loadWorkspaces",arguments)},loadWorkspace:function(f){return a(this._getService(f),"loadWorkspace",arguments)},createProject:function(f){return a(this._getService(f),
"createProject",arguments)},createFolder:function(f){return a(this._getService(f),"createFolder",arguments)},createFile:function(f){return a(this._getService(f),"createFile",arguments)},deleteFile:function(f){return a(this._getService(f),"deleteFile",arguments)},moveFile:function(f,g,h){var j=this._getService(f),k=this._getService(g);if(j===k)return a(j,"moveFile",arguments);var l=f[f.length-1]==="/",m=g;if(m[m.length-1]!=="/")m+="/";if(h)m+=encodeURIComponent(h);else{var n=f;if(l)n=n.substring(0,
n.length-1);m+=n.substring(n.lastIndexOf("/")+1)}if(l&&m[m.length-1]!=="/")m+="/";return d(j,f,k,m).then(function(){return a(j,"deleteFile",[f])})},copyFile:function(f,g){var h=this._getService(f),j=this._getService(g);if(h===j)return a(h,"copyFile",arguments);var k=f[f.length-1]==="/",l=g;if(l[l.length-1]!=="/")l+="/";var m=f;if(k)m=m.substring(0,m.length-1);l+=m.substring(m.lastIndexOf("/")+1);if(k&&l[l.length-1]!=="/")l+="/";return d(h,f,j,l)},read:function(f){return a(this._getService(f),"read",
arguments)},write:function(f){return a(this._getService(f),"write",arguments)},remoteImport:function(f){return a(this._getService(f),"remoteImport",arguments)},remoteExport:function(f){return a(this._getService(f),"remoteExport",arguments)},search:function(f){return a(this._getService(f),"search",arguments)}};e.prototype.constructor=e;return{FileClient:e}});
define("orion/operationsClient",["dojo","orion/auth","dojo/DeferredList"],function(b,c){function a(l,m,n){var r=new b.Deferred;l[m].apply(l,n).then(function(s){r.callback(s)},function(s){s.status===401?c.handleAuthenticationError(s,function(){l[m].apply(l,n).then(function(p){r.callback(p)},function(p){r.errback(p)})}):r.errback(s)});return r}function d(l,m){return a(l,"getOperations",[m])}function e(l){this._location=l}function f(){var l=new b.Deferred;l.errback("No Matching OperationService for location:"+
this._location);return l}function g(l){this._services=[];this._patterns=[];this._operationListeners=[];this._currentLongpollingIds=[];for(var m=l.getServiceReferences("orion.core.operation"),n=0;n<m.length;n++){var r=l.getService(m[n]);this._services[n]=r;r=m[n].getProperty("pattern")||".*";if(r[0]!=="^")r="^"+r;this._patterns[n]=new RegExp(r)}this._getService=function(s){if(!s)return this._services[0];for(var p=0;p<this._patterns.length;++p)if(this._patterns[p].test(s))return this._services[p];return new e(s)}}
function h(l){if(l.length===1){if(l[0][0])return l[0][1];console.error(l[0][1]);return{Children:[]}}for(var m={Children:[]},n=0;n<l.length;n++)if(l[n][0]){if(l[n][1]&&l[n][1].Children)m.Children=m.Children.concat(l[n][1].Children)}else console.error(l[n][1]);return m}function j(l,m,n){var r=this,s={Longpolling:true};if(n)s.LongpollingId=n;a(l,"getOperations",[s]).then(function(p){if(!(n&&r._currentLongpollingIds.indexOf(n)<0)){m(p,n);if(p.LongpollingId){r._currentLongpollingIds.push(p.LongpollingId);
b.hitch(r,j)(l,m,p.LongpollingId)}else b.hitch(r,j)(l,m,n)}},function(p){n&&r._currentLongpollingIds.indexOf(n)<0||("timeout"===p.dojoType?b.hitch(r,j)(l,m,n):setTimeout(function(){b.hitch(r,j)(l,m,n)},2E3))})}function k(l){for(var m=0;m<this._operationListeners.length;m++)this._operationListeners[m](l)}e.prototype={getOperation:f,getOperations:f,removeCompletedOperations:f,removeOperation:f,cancelOperation:f};e.prototype.constructor=e;g.prototype={getOperations:function(){var l=new b.Deferred,m=
[];if(this._services.length<1){l.errback("No operations services registered.");return l}for(var n=0;n<this._services.length;n++)m[n]=d(this._services[n]);(new b.DeferredList(m)).then(function(r){l.resolve(h(r))});return l},getRunningOperations:function(){var l=new b.Deferred,m=[];if(this._services.length<1){l.errback("No operations services registered.");return l}for(var n=0;n<this._services.length;n++)m[n]=d(this._services[n],{RunningOnly:true});(new b.DeferredList(m)).then(function(r){l.resolve(h(r))});
return l},getOperation:function(l){return a(this._getService(l),"getOperation",arguments)},removeCompletedOperations:function(){var l=[];if(this._services.length<1){result.errback("No operations services registered.");return result}for(var m=0;m<this._services.length;m++)l[m]=a(this._services[m],"removeCompletedOperations");return new b.DeferredList(l)},removeOperation:function(l){return a(this._getService(l),"removeOperation",arguments)},cancelOperation:function(l){return a(this._getService(l),"cancelOperation",
arguments)},addOperationChangeListener:function(l){this._operationListeners.push(l);if(this._operationListeners.length===1){if(this._services.length<1)throw"No operations services registered.";for(l=0;l<this._services.length;l++)b.hitch(this,j)(this._services[l],b.hitch(this,k))}},removeOperationChangeListener:function(l){for(var m=0;m<this._operationListeners.length;m++)if(this._operationListeners[m]===l){this._operationListeners.splice(m,1);break}if(this._operationListeners.length===0)this._currentLongpollingIds=
[]},resetChangeListeners:function(){this._currentLongpollingIds=[];if(this._services.length<1)throw"No operations services registered.";for(var l=0;l<this._services.length;l++)b.hitch(this,j)(this._services[l],b.hitch(this,k))}};g.prototype.constructor=g;return{OperationsClient:g}});
define("orion/searchUtils",["require","dojo","orion/editor/regex"],function(b,c,a){var d=d||{};d.searchUtils=d.searchUtils||{};d.searchUtils.parseQueryStr=function(e){var f=e.indexOf("?"),g=e.indexOf("q=");if(f<g&&g>0)e=e.substring(f+1);f=e.split("&");e={queryStr:e,start:0,rows:10,sort:"Path asc",replace:null};for(g=0;g<f.length;g++){var h=f[g].indexOf("q="),j=f[g].indexOf("replace=");if(h>=0)d.searchUtils.parseLocationAndSearchStr(f[g].substring(h+2),e);else if(j>=0)e.replace=f[g].substring(j+8);
else{h=f[g].split("=");if(h.length===2)if(h[0]==="rows")e.rows=parseInt(h[1]);else if(h[0]==="start")e.start=parseInt(h[1]);else if(h[0]==="sort")e.sort=h[1]}}return e};d.searchUtils.copyQueryParams=function(e,f){return{sort:e.sort,rows:e.rows,start:e.start,searchStr:e.searchStr,location:e.location,replace:f?e.replace:null}};d.searchUtils.generateSearchHref=function(e){return b.toUrl("search/search.html")+"#"+d.searchUtils.generateSearchQuery(e)};d.searchUtils.generateSearchQuery=function(e){var f=
"Path asc",g=40,h=0,j="",k="",l="";if(e){if(e.sort)f=e.sort;if(e.rows)g=e.rows;if(e.start)h=e.start;if(e.searchStr){j=e.searchStr;j=j.split(" ").join("")}if(e.location){k=e.location;if(k.length>0&&k[k.length-1]!=="*")k+="*";if(k!=="")k="+Location:"+k}if(e.replace!==null&&e.replace!==undefined)l="&replace="+e.replace}return"?sort="+f+"&rows="+g+"&start="+h+"&q="+j+k+l};d.searchUtils.parseLocationAndSearchStr=function(e,f){var g=e.indexOf("+Location:")>-1;f.location="";f.searchStr=e;if(g){e=e.split("+Location:");
if(e.length===2){g=e[1];if(g.length>0&&g[g.length-1]==="*")g=g.substring(0,g.length-1);f.location=g;f.searchStr=e[0].split(" ").join("")}}f.searchStrTitle=f.searchStr.split("\\").join("");f.inFileQuery=d.searchUtils.generateInFileQuery(f.searchStr)};d.searchUtils.generateInFileQuery=function(e){var f={},g=e.indexOf("*")>-1,h=e.indexOf("?")>-1;if(g)e=e.split("*").join(".*");if(h)e=e.split("?").join(".");if(!g&&!h){f.searchStr=e.split("\\").join("").toLowerCase();f.wildCard=false}else{f.searchStr=e.toLowerCase();
if(g=a.parse("/"+f.searchStr+"/")){e=g.pattern;g=g.flags;g+=g.indexOf("i")===-1?"i":"";f.regExp={pattern:e,flags:g};f.wildCard=true}}f.searchStrLength=f.searchStr.length;return f};d.searchUtils.replaceRegEx=function(e,f,g){return e.replace(new RegExp(f.pattern,f.flags),g)};d.searchUtils.replaceStringLiteral=function(e,f,g){f=a.parse("/"+f+"/gim");return d.searchUtils.replaceRegEx(e,f,g)};d.searchUtils.searchOnelineLiteral=function(e,f,g){var h;h=0;for(var j=false,k=[];;){h=f.indexOf(e.searchStr,h);
if(h<0)break;else{k.push({startIndex:h});j=true;if(g)break;h=h+e.searchStrLength}}if(j)return k;return null};d.searchUtils.findRegExp=function(e,f,g,h){if(!f)return null;g=g||"";g+=(g.indexOf("g")===-1?"g":"")+(g.indexOf("m")===-1?"m":"");var j=null;return(j=(new RegExp(f,g)).exec(e.substring(h)))&&{startIndex:j.index+h,length:j[0].length}};d.searchUtils.searchOnelineRegEx=function(e,f,g){for(var h=0,j=false,k=[];;)if(h=d.searchUtils.findRegExp(f,e.regExp.pattern,e.regExp.flags,h)){k.push(h);j=true;
if(g)break;h=h.startIndex+h.length}else break;if(j)return k;return null};d.searchUtils.generateNewContents=function(e,f,g,h,j){if(g&&e){var k;k=f.length>0?true:false;for(var l=0;l<e.length;l++){for(var m=e[l],n=false,r=false,s=[],p,q=0,o=0;o<g.children.length;o++)if(g.children[o].lineNumber-1===l){q=o;for(n=0;n<g.children[o].matches.length;n++)g.children[o+n].checked!==false&&s.push(n);r=s.length>0;p=g.children[o].matches;n=true;break}if(n){if(r){s=d.searchUtils.replaceCheckedMatches(m,h,p,s,j);m=
s.replacedStr;for(n=0;n<g.children[q].matches.length;n++)g.children[q+n].newMatches=s.newMatches}else{m=m;for(n=0;n<g.children[q].matches.length;n++)g.children[q+n].newMatches=g.children[q+n].matches}if(k)f[l]=m;else f.push(m)}else k||f.push(m)}}};d.searchUtils.generateMatchContext=function(e,f,g){var h=[],j=e*2+1,k;if(f.length<=j){k=0;e=f.length-1}else{k=g-e;if(k<0){k=0;e=k+j-1}else{e=g+e;if(e>f.length-1){e=f.length-1;k=e-j+1}}}for(j=k;j<=e;j++)h.push({context:f[j],current:j===g});return h};d.searchUtils.searchWithinFile=
function(e,f,g,h,j){g=g.split(h);if(j)f.contents=g;if(f){f.children=[];for(var k=h=0;k<g.length;k++){var l=g[k];if(l&&l.length>0){var m=l.toLowerCase();if(m=e.wildCard?d.searchUtils.searchOnelineRegEx(e,m):d.searchUtils.searchOnelineLiteral(e,m)){var n=k+1;if(j)for(var r=0;r<m.length;r++){var s=r+1;s={parent:f,checked:f.checked,type:"detail",matches:m,lineNumber:n,matchNumber:s,name:l,location:f.location+"-"+n+"-"+s};f.children.push(s)}else{s={parent:f,context:d.searchUtils.generateMatchContext(2,
g,k),checked:f.checked,type:"detail",matches:m,lineNumber:n,name:l,linkLocation:f.linkLocation+",line="+n,location:f.location+"-"+n};f.children.push(s)}h+=m.length}}}f.totalMatches=h}};d.searchUtils.replaceCheckedMatches=function(e,f,g,h,j){j=j;for(var k=0,l="",m=[],n=0;n<g.length;n++){if(k!==g[n].startIndex)l+=e.substring(k,g[n].startIndex);if(g[n].length)j=g[n].length;k=false;for(var r=0;r<h.length;r++)if(h[r]===n){k=true;break}if(k){m.push({startIndex:l.length,length:f.length});l+=f}else{m.push({startIndex:l.length,
length:j});l+=e.substring(g[n].startIndex,g[n].startIndex+j)}k=g[n].startIndex+j}if(k<e.length-1)l+=e.substring(k);return{replacedStr:l,newMatches:m}};d.searchUtils.fullPathNameByMeta=function(e){var f=e.length,g="";if(f>0)for(f=f-1;f>-1;f--)g=g+(g===""?"":"/")+e[f].Name;return g};d.searchUtils.path2FolderName=function(e,f,g){return e.substring(0,e.length-f.length-(g?0:1))};return d.searchUtils});
define("dijit/layout/BorderContainer",["dojo","dijit","dijit/layout/_LayoutWidget","dojo/cookie","dijit/_Templated"],function(b,c){b.declare("dijit.layout.BorderContainer",c.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){b.forEach(this.getChildren(),
this._setupChild,this);this.inherited(arguments)}},_setupChild:function(a){var d=a.region;if(d){this.inherited(arguments);b.addClass(a.domNode,this.baseClass+"Pane");var e=this.isLeftToRight();if(d=="leading")d=e?"left":"right";if(d=="trailing")d=e?"right":"left";if(d!="center"&&(a.splitter||this.gutters)&&!a._splitterWidget){var f=b.getObject(a.splitter?this._splitterClass:"dijit.layout._Gutter");e=new f({id:a.id+"_splitter",container:this,child:a,region:d,live:this.liveSplitters});e.isSplitter=
true;a._splitterWidget=e;b.place(e.domNode,a.domNode,"after");e.startup()}a.region=d}},layout:function(){this._layoutChildren()},addChild:function(){this.inherited(arguments);this._started&&this.layout()},removeChild:function(a){var d=a.region,e=a._splitterWidget;if(e){e.destroy();delete a._splitterWidget}this.inherited(arguments);this._started&&this._layoutChildren();b.removeClass(a.domNode,this.baseClass+"Pane");b.style(a.domNode,{top:"auto",bottom:"auto",left:"auto",right:"auto",position:"static"});
b.style(a.domNode,d=="top"||d=="bottom"?"width":"height","auto")},getChildren:function(){return b.filter(this.inherited(arguments),function(a){return!a.isSplitter})},getSplitter:function(a){return b.filter(this.getChildren(),function(d){return d.region==a})[0]._splitterWidget},resize:function(){if(!this.cs||!this.pe){var a=this.domNode;this.cs=b.getComputedStyle(a);this.pe=b._getPadExtents(a,this.cs);this.pe.r=b._toPixelValue(a,this.cs.paddingRight);this.pe.b=b._toPixelValue(a,this.cs.paddingBottom);
b.style(a,"padding","0px")}this.inherited(arguments)},_layoutChildren:function(a,d){if(this._borderBox&&this._borderBox.h){var e=b.map(this.getChildren(),function(g,h){return{pane:g,weight:[g.region=="center"?Infinity:0,g.layoutPriority,(this.design=="sidebar"?1:-1)*(/top|bottom/.test(g.region)?1:-1),h]}},this);e.sort(function(g,h){g=g.weight;h=h.weight;for(var j=0;j<g.length;j++)if(g[j]!=h[j])return g[j]-h[j];return 0});var f=[];b.forEach(e,function(g){g=g.pane;f.push(g);g._splitterWidget&&f.push(g._splitterWidget)});
c.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},f,a,d)}},destroyRecursive:function(){b.forEach(this.getChildren(),function(a){var d=a._splitterWidget;d&&d.destroy();delete a._splitterWidget});this.inherited(arguments)}});b.extend(c._Widget,{region:"",layoutPriority:0,splitter:false,minSize:0,maxSize:Infinity});b.declare("dijit.layout._Splitter",[c._Widget,c._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);b.addClass(this.domNode,"dijitSplitter"+(this.horizontal?"H":"V"));if(this.container.persist){var a=b.cookie(this._cookieName);if(a)this.child.domNode.style[this.horizontal?"height":"width"]=a}},_computeMaxSize:function(){var a=this.horizontal?"h":
"w",d=b.marginBox(this.child.domNode)[a],e=b.filter(this.container.getChildren(),function(f){return f.region=="center"})[0];a=b.marginBox(e.domNode)[a];return Math.min(this.child.maxSize,d+a)},_startDrag:function(a){if(!this.cover){this.cover=b.doc.createElement("div");b.addClass(this.cover,"dijitSplitterCover");b.place(this.cover,this.child.domNode,"after")}b.addClass(this.cover,"dijitSplitterCoverActive");this.fake&&b.destroy(this.fake);if(!(this._resize=this.live)){(this.fake=this.domNode.cloneNode(true)).removeAttribute("id");
b.addClass(this.domNode,"dijitSplitterShadow");b.place(this.fake,this.domNode,"after")}b.addClass(this.domNode,"dijitSplitterActive dijitSplitter"+(this.horizontal?"H":"V")+"Active");if(this.fake)b.removeClass(this.fake,"dijitSplitterHover dijitSplitter"+(this.horizontal?"H":"V")+"Hover");var d=this._factor,e=this.horizontal,f=e?"pageY":"pageX",g=a[f],h=this.domNode.style;e=e?"h":"w";var j=b.marginBox(this.child.domNode)[e],k=this._computeMaxSize(),l=this.child.minSize||20;e=this.region;var m=e==
"top"||e=="bottom"?"top":"left",n=parseInt(h[m],10),r=this._resize,s=b.hitch(this.container,"_layoutChildren",this.child.id);e=b.doc;this._handlers=(this._handlers||[]).concat([b.connect(e,"onmousemove",this._drag=function(p,q){p=p[f]-g;var o=d*p+j,t=Math.max(Math.min(o,k),l);if(r||q)s(t);h[m]=p+n+d*(t-o)+"px"}),b.connect(e,"ondragstart",b.stopEvent),b.connect(b.body(),"onselectstart",b.stopEvent),b.connect(e,"onmouseup",this,"_stopDrag")]);b.stopEvent(a)},_onMouse:function(a){a=a.type=="mouseover"||
a.type=="mouseenter";b.toggleClass(this.domNode,"dijitSplitterHover",a);b.toggleClass(this.domNode,"dijitSplitter"+(this.horizontal?"H":"V")+"Hover",a)},_stopDrag:function(a){try{this.cover&&b.removeClass(this.cover,"dijitSplitterCoverActive");this.fake&&b.destroy(this.fake);b.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)b.cookie(this._cookieName,
this.child.domNode.style[this.horizontal?"height":"width"],{expires:365})},_cleanupHandlers:function(){b.forEach(this._handlers,b.disconnect);delete this._handlers},_onKeyPress:function(a){this._resize=true;var d=this.horizontal,e=1,f=b.keys;switch(a.charOrCode){case d?f.UP_ARROW:f.LEFT_ARROW:e*=-1;case d?f.DOWN_ARROW:f.RIGHT_ARROW:break;default:return}d=b._getMarginSize(this.child.domNode)[d?"h":"w"]+this._factor*e;this.container._layoutChildren(this.child.id,Math.max(Math.min(d,this._computeMaxSize()),
this.child.minSize));b.stopEvent(a)},destroy:function(){this._cleanupHandlers();delete this.child;delete this.container;delete this.cover;delete this.fake;this.inherited(arguments)}});b.declare("dijit.layout._Gutter",[c._Widget,c._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);b.addClass(this.domNode,"dijitGutter"+
(this.horizontal?"H":"V"))}});return c.layout.BorderContainer});
define("orion/searchClient",["require","dojo","dijit","orion/auth","orion/util","orion/searchUtils","dijit/form/Button","dijit/layout/BorderContainer","dijit/layout/ContentPane"],function(b,c,a,d,e,f){function g(h){this.registry=h.serviceRegistry;this._commandService=h.commandService;(this._fileService=h.fileService)||console.error("No file service on search client")}g.prototype={search:function(h,j,k){j=f.parseQueryStr(h);try{this._fileService.search(j.location,h).then(function(m){var n=m.responseHeader.params.q;
n=n.substring(n.indexOf("}")+1);k(function(r){for(var s=[],p=0;p<r.response.docs.length;p++){var q=r.response.docs[p];s.push({name:q.Name,path:q.Location,folderName:f.path2FolderName(q.Path,q.Name),directory:q.Directory,lineNumber:q.LineNumber})}return s}(m),n)})}catch(l){this.registry.getService("orion.page.message").setErrorMessage(l)}},handleError:function(h,j){console.error(h);var k=document.createTextNode(h);c.place(k,j,"only");return h},setLocationByMetaData:function(h,j){var k="",l=null;if(j&&
h&&h.Parents&&h.Parents.length>0)l=j.index==="last"?h.Parents[h.Parents.length-1]:h.Parents[0];else if(h&&h.Directory&&h.Location&&h.Parents)l=h;if(l){this.setLocationByURL(l.Location);k=l.Name}else if(h)k=this._fileService.fileServiceName(h&&h.Location);if((h=c.byId("search"))&&h.placeholder)h.placeholder=k.length>23?"Search "+k.substring(0,20)+"...":"Search "+k;if(h&&h.title)h.title="Type a keyword or wild card to search in "+k},setLocationByURL:function(h){this.location=h},createSearchQuery:function(h,
j,k,l){k||(k="Path");k+=" asc";if(j){h=/\*$/.test(j)?"":"*";return f.generateSearchQuery({sort:k,rows:100,start:0,searchStr:"Name:"+this._luceneEscape(j,true)+h})}return f.generateSearchQuery({sort:k,rows:40,start:0,searchStr:this._luceneEscape(h,true),location:l?"":this.location})},_luceneEscape:function(h,j){var k="";j='+-&|!(){}[]^"~:\\'+(!j?"*?":"");for(var l=0;l<h.length;l++){var m=h.charAt(l);if(j.indexOf(m)>=0)k+="\\";k+=m}return k},defaultRenderer:{makeRenderFunction:function(h,j,k,l){function m(n,
r){var s=function(){function z(F,I){F.appendChild(document.createTextNode(" - "+(I.folderName?I.folderName:I.path)+" "))}function E(F,I){var L=I.name;if(D.hasOwnProperty(L)){z(F,I);var G=D[L];if(typeof G==="function"){D[L]=null;G()}}else D[L]=function(){z(F,I)}}var D={};return E}(),p=false;c.empty(h);if(n&&n.length>0){for(var q=document.createElement("table"),o=0;o<n.length;o++){var t=n[o],u;if(!p){p=true;if(j){u=q.insertRow(0).insertCell(0);u.innerHTML=j}}u=q.insertRow(-1).insertCell(0);u.colspan=
2;l&&l(u);var w=document.createElement("a");c.place(document.createTextNode(t.name),w);t.LineNumber&&c.place(document.createTextNode(" (Line "+t.LineNumber+")"),w);var x=t.location;if(t.isExternalResource)x=t.path;else{x=t.directory?b.toUrl("navigate/table.html")+"#"+t.path:b.toUrl("edit/edit.html")+"#"+t.path;if(x==="#")x=""}w.setAttribute("href",x);c.style(w,"verticalAlign","middle");u.appendChild(w);s(u,t)}c.place(q,h,"last");typeof k==="function"&&k(h)}if(!p)if(r){n=c.place("<div>No matches found for </div>",
h,"only");n=c.create("b",null,n,"last");c.place(document.createTextNode(r),n,"only");typeof k==="function"&&k(h)}}return m}}};g.prototype.constructor=g;return{Searcher:g}});
define("orion/git/gitClient",["require","dojo","orion/auth"],function(b,c,a){var d=d||{};d.GitService=function(){function e(f){if(f){this._serviceRegistry=f;this._serviceRegistration=f.registerService("orion.git.provider",this);this._sshService=f.getService("orion.net.ssh")}}e.prototype={checkGitService:function(){},cloneGitRepository:function(f,g,h,j,k,l,m,n,r){var s=this,p={};if(f)p.Name=f;if(h)p.Path=h;if(g)p.GitUrl=g;p.Location=j;if(k)p.GitSshUsername=k;if(l)p.GitSshPassword=l;if(m)p.GitSshKnownHost=
m;if(n)p.GitSshPrivateKey=n;if(r)p.GitSshPassphrase=r;h=b.toUrl("gitapi/clone/._");h=h.substring(0,h.length-2);var q=new c.Deferred;c.xhrPost({url:h,headers:{"Orion-Version":"1"},postData:c.toJson(p),handleAs:"json",timeout:15E3,load:function(o,t){c.hitch(s,s._getGitServiceResponse)(q,o,t,g?"Cloning repository: "+g:"Initializing repository: "+f)},error:function(o,t){return c.hitch(s,s._handleGitServiceResponseError)(q,this,o,t)}});return q},removeGitRepository:function(f){var g=this,h=new c.Deferred;
c.xhrDelete({url:f,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(j,k){c.hitch(g,g._getGitServiceResponse)(h,j,k,"Removing repository")},error:function(j,k){return c.hitch(g,g._handleGitServiceResponseError)(h,this,j,k)}});return h},getDiffContent:function(f,g,h){var j=this,k=new c.Deferred;c.xhrGet({url:f,headers:{"Orion-Version":"1"},content:{parts:"diff"},handleAs:"text",timeout:15E3,load:function(l,m){c.hitch(j,j._getGitServiceResponse)(k,l,m,"Getting git diff",g,h)},
error:function(l,m){return c.hitch(j,j._handleGitServiceResponseError)(k,this,l,m,g,h,c.xhrGet)}});return k},getDiffFileURI:function(f,g,h){var j=new c.Deferred;c.xhrGet({url:f,headers:{"Orion-Version":"1"},content:{parts:"uris"},handleAs:"json",timeout:15E3,load:function(k,l){c.hitch(service,service._getGitServiceResponse)(j,k,l,"Getting git diff",g,h)},error:function(k,l){c.hitch(service,service._handleGitServiceResponseError)(j,this,k,l,g,h,c.xhrGet)}});return j},getGitStatus:function(f,g,h){var j=
this,k=new c.Deferred;c.xhrGet({url:f,headers:{"Orion-Version":"1"},handleAs:"json",timeout:15E3,load:function(l,m){c.hitch(j,j._getGitServiceResponse)(k,l,m,"Getting git status",g,h)},error:function(l,m){c.hitch(j,j._handleGitServiceResponseError)(k,this,l,m,g,h,c.xhrGet)}});return k},stage:function(f,g,h){var j=this,k=new c.Deferred;c.xhrPut({url:f,headers:{"Orion-Version":"1"},handleAs:"json",timeout:15E3,load:function(l,m){c.hitch(j,j._getGitServiceResponse)(k,l,m,"Staging",g,h)},error:function(l,
m){c.hitch(j,j._handleGitServiceResponseError)(k,this,l,m,g,h)}});return k},stageMultipleFiles:function(f,g,h,j){var k=this,l=new c.Deferred;c.xhrPut({url:f,headers:{"Orion-Version":"1"},putData:c.toJson({Path:g}),handleAs:"json",timeout:15E3,load:function(m,n){c.hitch(k,k._getGitServiceResponse)(l,m,n,"Staging",h,j)},error:function(m,n){c.hitch(k,k._handleGitServiceResponseError)(l,this,m,n,h,j)}});return l},unstageAll:function(f,g,h,j){var k=this,l=new c.Deferred;c.xhrPost({url:f,headers:{"Orion-Version":"1"},
handleAs:"json",timeout:15E3,postData:c.toJson({Reset:g}),load:function(m,n){c.hitch(k,k._getGitServiceResponse)(l,m,n,"Unstaging",h,j)},error:function(m,n){c.hitch(k,k._handleGitServiceResponseError)(l,this,m,n,h,j)}});return l},unstage:function(f,g,h,j){var k=this,l=new c.Deferred;c.xhrPost({url:f,headers:{"Orion-Version":"1"},handleAs:"json",timeout:15E3,postData:c.toJson({Path:g}),load:function(m,n){c.hitch(k,k._getGitServiceResponse)(l,m,n,"Unstaging",h,j)},error:function(m,n){c.hitch(k,k._handleGitServiceResponseError)(l,
this,m,n,h,j)}});return l},checkoutPath:function(f,g,h,j){var k=this,l=new c.Deferred;c.xhrPut({url:f,headers:{"Orion-Version":"1"},putData:c.toJson({Path:g,RemoveUntracked:"true"}),handleAs:"json",timeout:15E3,load:function(m,n){c.hitch(k,k._getGitServiceResponse)(l,m,n,"Checking out",h,j)},error:function(m,n){return c.hitch(k,k._handleGitServiceResponseError)(l,this,m,n,h,j)}});return l},commitAll:function(f,g,h,j,k){var l=this,m=new c.Deferred;c.xhrPost({url:f,headers:{"Orion-Version":"1"},handleAs:"json",
timeout:15E3,postData:h,load:function(n,r){c.hitch(l,l._getGitServiceResponse)(m,n,r,"Committing",j,k)},error:function(n,r){c.hitch(l,l._handleGitServiceResponseError)(m,this,n,r,j,k)}});return m},getGitClone:function(f,g,h){var j=this,k=new c.Deferred;c.xhrGet({url:f,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(l,m){c.hitch(j,j._getGitServiceResponse)(k,l,m,"Getting git repository information",g)},error:function(l,m){c.hitch(j,j._handleGitServiceResponseError)(k,this,l,
m,g,h,c.xhrGet)}});return k},getGitCloneConfig:function(f){var g=this,h=new c.Deferred;c.xhrGet({url:f,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(j,k){c.hitch(g,g._getGitServiceResponse)(h,j,k,"Getting git repository configuration")},error:function(j,k){c.hitch(g,g._handleGitServiceResponseError)(h,this,j,k,null,null,c.xhrGet)}});return h},getGitBranch:function(f){var g=this,h=new c.Deferred;c.xhrGet({url:f,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(j,
k){c.hitch(g,g._getGitServiceResponse)(h,j,k,"Getting branch information")},error:function(j,k){c.hitch(g,g._handleGitServiceResponseError)(h,this,j,k,null,null,c.xhrGet)}});return h},getGitRemote:function(f){var g=this,h=new c.Deferred;c.xhrGet({url:f,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(j,k){c.hitch(g,g._getGitServiceResponse)(h,j,k,"Getting remote branch information")},error:function(j,k){c.hitch(g,g._handleGitServiceResponseError)(h,this,j,k,null,null,c.xhrGet)}});
return h},checkoutBranch:function(f,g){var h=this,j=new c.Deferred;c.xhrPut({url:f,headers:{"Orion-Version":"1"},putData:c.toJson({Branch:g}),handleAs:"json",timeout:5E3,load:function(k,l){c.hitch(h,h._getGitServiceResponse)(j,k,l,g?"Checking out branch "+g:"Checking out branch")},error:function(k,l){c.hitch(h,h._handleGitServiceResponseError)(j,this,k,l)}});return j},resetIndex:function(f,g){var h=this,j=new c.Deferred;c.xhrPost({url:f,headers:{"Orion-Version":"1"},postData:c.toJson({Commit:g,Reset:"HARD"}),
handleAs:"json",timeout:5E3,load:function(k,l){c.hitch(h,h._getGitServiceResponse)(j,k,l,"Resetting index")},error:function(k,l){c.hitch(h,h._handleGitServiceResponseError)(j,this,k,l)}});return j},addBranch:function(f,g,h){var j=this,k={};if(g)k.Name=g;if(h)k.Branch=h;var l=new c.Deferred;c.xhrPost({url:f,headers:{"Orion-Version":"1"},postData:c.toJson(k),handleAs:"json",timeout:5E3,load:function(m,n){c.hitch(j,j._getGitServiceResponse)(l,m,n,g?"Adding branch "+g:"Adding branch")},error:function(m,
n){c.hitch(j,j._handleGitServiceResponseError)(l,this,m,n)}});return l},removeBranch:function(f){var g=this,h=new c.Deferred;c.xhrDelete({url:f,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(j,k){c.hitch(g,g._getGitServiceResponse)(h,j,k,"Removing branch")},error:function(j,k){c.hitch(g,g._handleGitServiceResponseError)(h,this,j,k)}});return h},addRemote:function(f,g,h){var j=this,k=new c.Deferred;c.xhrPost({url:f,headers:{"Orion-Version":"1"},putData:c.toJson({Remote:g,RemoteURI:h}),
handleAs:"json",timeout:5E3,load:function(l,m){c.hitch(j,j._getGitServiceResponse)(k,l,m,g?"Adding remote "+g:"Adding remote")},error:function(l,m){c.hitch(j,j._handleGitServiceResponseError)(k,this,l,m)}});return k},removeRemote:function(f){var g=this,h=new c.Deferred;c.xhrDelete({url:f,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(j,k){c.hitch(g,g._getGitServiceResponse)(h,j,k,"Removing remote")},error:function(j,k){c.hitch(g,g._handleGitServiceResponseError)(h,this,j,
k)}});return h},doGitLog:function(f,g,h,j){var k=this,l=new c.Deferred;c.xhrGet({url:f,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(m,n){c.hitch(k,k._getGitServiceResponse)(l,m,n,j?j:"Generating git log",g)},error:function(m,n){c.hitch(k,k._handleGitServiceResponseError)(l,this,m,n,g,h,c.xhrGet)}});return l},getDiff:function(f,g,h,j){var k=this,l=new c.Deferred;c.xhrPost({url:f,headers:{"Orion-Version":"1"},postData:c.toJson({New:g}),handleAs:"json",timeout:5E3,load:function(m,
n){c.hitch(k,k._getGitServiceResponse)(l,m,n,g?"Getting git diff for "+g:"Getting git diff",h)},error:function(m,n){c.hitch(k,k._handleGitServiceResponseError)(l,this,m,n,h,j,c.xhrPost)}});return l},doFetch:function(f,g,h,j,k,l,m,n){var r=this,s=new c.Deferred;c.xhrPost({url:f,headers:{"Orion-Version":"1"},postData:c.toJson({Fetch:"true",Force:g,GitSshUsername:j,GitSshPassword:k,GitSshKnownHost:l,GitSshPrivateKey:m,GitSshPassphrase:n}),handleAs:"json",timeout:5E3,load:function(p,q){c.hitch(r,r._getGitServiceResponse)(s,
p,q,"Fetching remote: "+f,h)},error:function(p,q){c.hitch(r,r._handleGitServiceResponseError)(s,this,p,q)}});return s},doPull:function(f,g,h,j,k,l,m,n){var r=this,s=new c.Deferred;c.xhrPost({url:f,headers:{"Orion-Version":"1"},postData:c.toJson({Pull:"true",Force:g,GitSshUsername:j,GitSshPassword:k,GitSshKnownHost:l,GitSshPrivateKey:m,GitSshPassphrase:n}),handleAs:"json",timeout:5E3,load:function(p,q){c.hitch(r,r._getGitServiceResponse)(s,p,q,"Pulling : "+f,h)},error:function(p,q){c.hitch(r,r._handleGitServiceResponseError)(s,
this,p,q)}});return s},doMerge:function(f,g){var h=this,j=new c.Deferred;c.xhrPost({url:f,headers:{"Orion-Version":"1"},postData:c.toJson({Merge:g}),handleAs:"json",timeout:5E3,load:function(k,l){var m=new c.Deferred;c.hitch(h,h._getGitServiceResponse)(m,k,l,"Merging "+f);m.then(function(n){j.callback({jsonData:n})})},error:function(k,l){c.hitch(h,h._handleGitServiceResponseError)(j,this,k,l)}});return j},doCherryPick:function(f,g,h,j){var k=this,l=new c.Deferred;c.xhrPost({url:f,headers:{"Orion-Version":"1"},
postData:c.toJson({"Cherry-Pick":g}),handleAs:"json",timeout:5E3,load:function(m,n){c.hitch(k,k._getGitServiceResponse)(l,m,n,"Cherry pick of "+g,h,j)},error:function(m,n){c.hitch(k,k._handleGitServiceResponseError)(l,this,m,n,h,j)}});return l},doRebase:function(f,g,h,j,k){var l=this,m={};m.Rebase=g;if(h)m.Operation=h;var n=new c.Deferred;c.xhrPost({url:f,headers:{"Orion-Version":"1"},postData:c.toJson(m),handleAs:"json",timeout:5E3,load:function(r,s){c.hitch(l,l._getGitServiceResponse)(n,r,s,g?"Rebase on top of ":
"Rebase"+g,j,k)},error:function(r,s){c.hitch(l,l._handleGitServiceResponseError)(n,this,r,s,j,k)}});return n},doPush:function(f,g,h,j,k,l,m,n,r,s,p){var q=this,o=new c.Deferred;c.xhrPost({url:f,headers:{"Orion-Version":"1"},postData:c.toJson({PushSrcRef:g,PushTags:h,Force:j,GitSshUsername:m,GitSshPassword:n,GitSshKnownHost:r,GitSshPrivateKey:s,GitSshPassphrase:p}),handleAs:"json",timeout:5E3,load:function(t,u){c.hitch(q,q._getGitServiceResponse)(o,t,u,l?l:"Pushing repository")},error:function(t,u){c.hitch(q,
q._handleGitServiceResponseError)(o,this,t,u)}});return o},getLog:function(f,g,h,j,k){var l=this,m=new c.Deferred,n=new c.Deferred;c.xhrPost({url:f,headers:{"Orion-Version":"1"},postData:c.toJson({New:g}),handleAs:"json",timeout:5E3,load:function(r,s){n.callback(s.xhr.getResponseHeader("Location"))},error:function(r,s){c.hitch(l,l._handleGitServiceResponseError)(n,this,r,s,j,k,c.xhrPost)}});n.then(function(r){c.xhrGet({url:r,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(s,
p){c.hitch(l,l._getGitServiceResponse)(m,s,p,h?h:"Generating git log",j)},error:function(s,p){c.hitch(l,l._handleGitServiceResponseError)(m,this,s,p,j,k,c.xhrGet)}})});return m},getDefaultRemoteBranch:function(f,g,h){var j=this,k=new c.Deferred,l=new c.Deferred;c.xhrGet({url:f,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(m,n){c.hitch(j,j._getGitServiceResponse)(l,m,n,"Getting remote branches")},error:function(m,n){c.hitch(j,j._handleGitServiceResponseError)(l,this,m,n,g,
h,c.xhrGet)}});l.then(function(m){if(m.Children[0]==null)return null;c.xhrGet({url:m.Children[0].Location,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(n,r){c.hitch(j,j._getGitServiceResponse)(k,n,r,"Getting default remote branch",g)},error:function(n,r){c.hitch(j,j._handleGitServiceResponseError)(k,this,n,r,g,h,c.xhrGet)}})});return k},doAddTag:function(f,g,h,j){var k=this,l=new c.Deferred;c.xhrPut({url:f,headers:{"Orion-Version":"1"},putData:c.toJson({Name:g}),handleAs:"json",
timeout:5E3,load:function(m,n){c.hitch(k,k._getGitServiceResponse)(l,m,n,"Adding tag ..."+g,h)},error:function(m,n){c.hitch(k,k._handleGitServiceResponseError)(l,this,m,n,h,j)}});return l},doRemoveTag:function(f){var g=this,h=new c.Deferred;c.xhrDelete({url:f,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(j,k){c.hitch(g,g._getGitServiceResponse)(h,j,k,"Removing tag ...")},error:function(j,k){c.hitch(g,g._handleGitServiceResponseError)(h,this,j,k)}});return h},checkoutTag:function(f,
g,h,j,k){var l=this,m=new c.Deferred;c.xhrPut({url:f,headers:{"Orion-Version":"1"},putData:c.toJson({Tag:g,Branch:h}),handleAs:"json",timeout:5E3,load:function(n,r){c.hitch(l,l._getGitServiceResponse)(m,n,r,"Checking out tag "+g,j,k)},error:function(n,r){c.hitch(l,l._handleGitServiceResponseError)(m,this,n,r,j,k)}});return m},addCloneConfigurationProperty:function(f,g,h,j,k){var l=this,m=new c.Deferred;c.xhrPost({url:f,headers:{"Orion-Version":"1"},postData:c.toJson({Key:g,Value:h}),handleAs:"json",
timeout:15E3,load:function(n,r){c.hitch(l,l._getGitServiceResponse)(m,n,r,"Adding configuration property "+g,j,k)},error:function(n,r){c.hitch(l,l._handleGitServiceResponseError)(m,this,n,r,j,k)}});return m},editCloneConfigurationProperty:function(f,g,h,j){var k=this,l=new c.Deferred;c.xhrPut({url:f,headers:{"Orion-Version":"1"},putData:c.toJson({Value:g}),handleAs:"json",timeout:15E3,load:function(m,n){c.hitch(k,k._getGitServiceResponse)(l,m,n,"Saving configuration property as "+g,h,j)},error:function(m,
n){c.hitch(k,k._handleGitServiceResponseError)(l,this,m,n,h,j)}});return l},deleteCloneConfigurationProperty:function(f,g,h){var j=this,k=new c.Deferred;c.xhrDelete({url:f,headers:{"Orion-Version":"1"},handleAs:"json",timeout:15E3,load:function(l,m){c.hitch(j,j._getGitServiceResponse)(k,l,m,"Deleting configuration property",g,h)},error:function(l,m){c.hitch(j,j._handleGitServiceResponseError)(k,this,l,m,g,h)}});return k},_getGitServiceResponse:function(f,g,h,j,k){var l=this;if(h&&h.xhr.status===202){h=
new c.Deferred;h.callback(g);return this._serviceRegistry.getService("orion.page.progress").showWhile(h,j).then(function(m){m=m.Result.Severity=="Ok"?m.Result.JsonData:m.Result;if(k)typeof k==="function"?k(m):l._serviceRegistration.dispatchEvent(k,m);f.callback(m)})}if(k)typeof k==="function"?k(g,h):l._serviceRegistration.dispatchEvent(k,g);f.callback(g)},_handleGitServiceResponseError:function(f,g,h,j,k,l,m){f||(f=new c.Deferred);if(h.status===401||h.status===403){a.handleAuthenticationError(j.xhr,
function(){m?m(g).then(function(n,r){f.callback(n,r)},function(n,r){l&&l(n,r);f.errback(n,r)}):f.errback(h)})!=null&&f.errback(h);return f}l&&l(h,j);f.errback(h);return f}};return e}();return d});
define("orion/ssh/sshTools",[],function(){var b=b||{};b.SshService=function(){function c(a){if(a){this._serviceRegistry=a;this._serviceRegistration=a.registerService("orion.net.ssh",this)}}c.prototype={_KNOWN_HOSTS:"known_hosts",addKnownHosts:function(a,d){d||(d="");var e=localStorage.getItem(d+this._KNOWN_HOSTS);if(e)e.indexOf(a)<0&&localStorage.setItem(d+this._KNOWN_HOSTS,e+"\n"+a);else localStorage.setItem(d+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 c}();return b});
define("orion/git/git-clone-details",["require","dojo","orion/commands","orion/util"],function(b,c,a,d){b={};b.CloneDetails=function(){function e(f){var g=f.parent;if(typeof g==="string")g=c.byId(g);if(!g)throw"no parent";if(!f.serviceRegistry)throw"no service registry";this._parent=g;this._registry=f.serviceRegistry;this._detailsPane=f.detailsPane;f=new a.Command({name:"Add Configuration Item",imageClass:"core-sprite-add",id:"eclipse.git.addProperty",callback:c.hitch(this,function(k){this.newProperty(k.items,
k.id,k.domNode.id)})});g=new a.Command({name:"Edit",imageClass:"core-sprite-edit",id:"eclipse.git.editProperty",visibleWhen:function(k){return k.Key&&k.Value&&k.Location},callback:c.hitch(this,function(k){this.editProperty(k.items,k.id,k.domNode.id,k.userData)})});var h=new a.Command({name:"Delete",imageClass:"core-sprite-delete",id:"eclipse.git.deleteProperty",visibleWhen:function(k){return k.Key&&k.Value&&k.Location},callback:c.hitch(this,function(k){this.deleteProperty(k.items,k.id,k.domNode.id,
k.userData)})}),j=this._registry.getService("orion.page.command");j.addCommand(g,"object");j.addCommand(h,"object");j.addCommand(f,"dom");j.registerCommandContribution("eclipse.git.editProperty",1);j.registerCommandContribution("eclipse.git.deleteProperty",2);j.registerCommandContribution("eclipse.git.addProperty",1,"configurationCommands")}e.prototype={loadCloneDetails:function(f){this.configPath=f;if(this._detailsPane){this._detailsPane.isRightPaneOpen()||this._detailsPane.toggle();this._detailsPane.style.overflow=
"hidden"}var g=this;this._registry.getService("orion.git.provider").getGitCloneConfig(f).then(function(h){g.render(h)})},reportError:function(f){var g=[];g.Severity="Error";var h=JSON.parse(f.responseText);g.Message=h.Message?h.Message:f.responseText;this._registry.getService("orion.page.message").setProgressResult(g)},newProperty:function(){var f=c.byId("propertyKeyNew"),g=c.byId("propertyValueNew"),h=this;d.getUserText("propertyKeyNewEditBox",f,true,"",function(j){var k=c.create("span",{id:"newKeyNode"},
f.parentNode,"last");c.place(document.createTextNode(j),k,"only");d.getUserText("propertyValueNewEditBox",g,true,"",function(l){h._registry.getService("orion.git.provider").addCloneConfigurationProperty(h.configPath,j,l).then(function(){c.hitch(h,h.loadCloneDetails)(h.configPath)},function(m){c.hitch(h,h.reportError)(m)})},function(){f.parentNode.removeChild(k)})},function(){})},editProperty:function(f,g,h,j){var k=c.byId("propertyValue"+j),l=this._registry,m=this;c.style(k,"display","none");d.getUserText("propertyValue"+
j+"EditBox",k,true,f.Value,function(n){l.getService("orion.git.provider").editCloneConfigurationProperty(f.Location,n).then(function(){k.innerHTML=n},function(r){c.hitch(m,m.reportError)(r)})},function(){c.style(k,"display","inline")})},deleteProperty:function(f,g,h,j){var k=c.byId("property"+j),l=this;confirm("Do you really want to delete "+f.Key+"?")&&this._registry.getService("orion.git.provider").deleteCloneConfigurationProperty(f.Location).then(function(){c.style(k,"display","none")},function(m){c.hitch(l,
l.reportError)(m)})},render:function(f){var g=c.create("table",{id:"cloneMetaTable"});c.addClass(g,"cloneMetaTable");var h=c.create("thead",null,g);h=c.create("tr",null,h);var j=c.create("td",{colspan:2},h);c.addClass(j,"paneHeadingContainer");c.place("<span class='paneHeading'>Repository configuration</span>",j,"only");h=c.create("td",null,h);c.style(h,"textAlign","right");c.addClass(h,"paneHeadingContainer");c.place("<span id='configurationCommands' class='paneHeadingToolbar'></span>",h,"only");
if(f!=null){var k;j=c.create("tbody",null,g);for(i in f.Children){h=c.create("tr");h.id="property"+i;k=c.create("td",{style:"padding-left: 5px; padding-right: 5px"},h,"last");c.place(document.createTextNode(f.Children[i].Key),k,"only");k=c.create("td",null,h,"last");k=c.create("span",{id:"propertyValue"+i},k,"only");c.place(document.createTextNode(f.Children[i].Value),k,"only");c.place(h,j,"last");k=c.create("td",null,h,"last");k=c.create("span",{id:h.id+"actionsWrapper"},k,"only");c.style(k,"visibility",
"hidden");this._registry.getService("orion.page.command").renderCommands(k,"object",f.Children[i],this,"tool",false,i);c.connect(h,"onmouseover",h,function(){var l=c.byId(this.id+"actionsWrapper");c.style(l,"visibility","visible")});c.connect(h,"onmouseout",h,function(){var l=c.byId(this.id+"actionsWrapper");c.style(l,"visibility","hidden")});c.place(h,j,"last")}h=c.create("tr",{id:"propertyNew"});k=c.create("td",{style:"padding-left: 5px; padding-right: 5px"},h,"last");c.create("span",{id:"propertyKeyNew",
innerHTML:"&nbsp;"},k,"last");k=c.create("td",null,h,"last");c.create("span",{id:"propertyValueNew",innerHTML:"&nbsp;"},k,"last");k=c.create("td",{innerHTML:"&nbsp;"},h,"last");c.place(h,j,"last")}c.place(g,this._parent,"only");f=c.byId("configurationCommands");this._registry.getService("orion.page.command").renderCommands(f,"dom",this,this,"button")}};return e}();return b});
define("orion/treetable",["dojo"],function(b){function c(a){this._init(a)}c.prototype={_init:function(a){var d=a.parent,e=this;if(typeof d==="string")d=b.byId(d);if(!d)throw"no parent";if(!a.model)throw"no tree model";if(!a.renderer)throw"no renderer";this._parent=d;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._onCollapse=a.onCollapse;this._labelColumnIndex=a.labelColumnIndex===undefined?
0:a.labelColumnIndex;this._id=a.id===undefined?"treetable":a.id;this._tableStyle=a.tableStyle;this._root=this._treeModel.getRoot(function(f){if(this._showRoot){f._depth=0;this._generate([f],0)}else e._treeModel.getChildren(f,function(g){e._generate(g,0)})})},_generate:function(a,d){b.empty(this._parent);var e=document.createElement("table");e.id=this._id;this._tableStyle&&b.addClass(e,this._tableStyle);this._renderer.initTable(e,this);var f=document.createElement("tbody");f.id=this._id+"tbody";this._generateChildren(a,
d,f,"last");e.appendChild(f);this._parent.appendChild(e);this._rowsChanged()},_generateChildren:function(a,d,e,f){for(var g in a){var h=document.createElement("tr");h.id=this._treeModel.getId(a[g]);h._depth=d;h._item=a[g];this._renderer.render(a[g],h);b.style(h.childNodes[this._labelColumnIndex],"paddingLeft",this._indent*d+"px");b.place(h,e,f);if(f==="after")e=h}},_rowsChanged:function(){this._renderer.rowsChanged&&this._renderer.rowsChanged()},getSelected:function(){return this._renderer.getSelected()},
refresh:function(a,d,e,f,g,h){var j=this._treeModel.getId(a),k;if(j===this._id){this._removeChildRows(j);this._generateChildren(d,0,b.byId(j+"tbody"),"last");this._rowsChanged()}else{var l=b.byId(j);if(l){l._item=a;if(l&&(e||l._expanded)){l._expanded=true;this._removeChildRows(j);this._renderer.updateExpandVisuals(l,true);if(d){this._generateChildren(d,l._depth+1,l,"after");this._rowsChanged();if(f&&g){a=b.byId(f);b.addClass(a,g);h&&b.removeClass(a,h)}}else{k=this;d=this._treeModel.getChildren(l._item,
function(m){k._generateChildren(m,l._depth+1,l,"after");k._rowsChanged()})}}else this._renderer.updateExpandVisuals(l,false)}else console.log("could not find table row "+j)}},refreshAndExpand:function(a,d,e,f,g){this.refresh(a,d,true,e,f,g)},getItem:function(a){if(typeof a==="string"){var d=b.byId(a);if(d)return d._item}if(a._item)return a._item;return a},toggle:function(a,d,e,f){var g=b.byId(a);if(g)if(g._expanded){this.collapse(a);if(d){a=b.byId(d);b.addClass(a,f);b.removeClass(a,e)}}else{this.expand(a);
if(d){a=b.byId(d);b.addClass(a,e);b.removeClass(a,f)}}},isExpanded:function(a){if(a=b.byId(a))return a._expanded;return false},expand:function(a,d,e){a=typeof a==="string"?a:this._treeModel.getId(a);var f=b.byId(a);if(f)if(!f._expanded){f._expanded=true;var g=this;this._renderer.updateExpandVisuals(f,true);this._treeModel.getChildren(f._item,function(h){g._generateChildren(h,f._depth+1,f,"after");g._rowsChanged();d&&d.apply(this,e)})}},_removeChildRows:function(a){b.byId(this._id);var d=a===this._id,
e=false,f=-1,g=[];b.query(".treeTableRow").forEach(function(k){if(!e)if(d)if(k._depth>f)g.push(k);else e=true;else if(k.id===a){d=true;f=k._depth}});for(var h in g){var j=g[h];j.parentNode.removeChild(j)}},collapse:function(a){a=typeof a==="string"?a:this._treeModel.getId(a);var d=b.byId(a);if(d){if(!d._expanded)return;d._expanded=false;this._renderer.updateExpandVisuals(d,false);this._removeChildRows(a);this._rowsChanged()}this._onCollapse&&this._onCollapse(d._item)}};c.prototype.constructor=c;return{TableTree:c}});
define("orion/explorer",["require","dojo","orion/treetable"],function(b,c,a){var d={};d.Explorer=function(){function e(f,g,h){this.registry=f;this.renderer=h;this.selection=g;this.myTree=null}e.prototype={changedItem:function(f,g){c.hitch(this.myTree,this.myTree.refreshAndExpand)(f,g)},updateCommands:function(f){this.myTree&&c.hitch(this.myTree._renderer,this.myTree._renderer.updateCommands(f))},makeNewItemPlaceHolder:function(f,g,h){f=this.getRow(f);if(h){f=f.childNodes[h];c.place("<br><span id='"+
g+"placeHolderRow'></span>",f,"last");if(h=c.byId(g+"placeHolderRow"))return{tempNode:h,refNode:h}}if(f){c.place("<tr id='"+g+"placeHolderRow'><td id='"+g+"placeHolderCol'></td>",f,"after");h=c.byId(g+"placeHolderRow");f=c.byId(g+"placeHolderCol");if(h&&f)return{tempNode:h,refNode:f}}return null},getRow:function(f){if(f=this.model.getId(f))return c.byId(f)},createTree:function(f,g,h){var j=f+"innerTree",k=c.byId(j);k&&c.destroy(k);if(g)g.rootId=j;this.model=g;this.myTree=new a.TableTree({id:j,model:g,
showRoot:false,parent:f,labelColumnIndex:this.renderer.getLabelColumnIndex(),renderer:this.renderer,indent:h?h.indent:undefined,onCollapse:h?h.onCollapse:undefined,tableStyle:"mainPadding"});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 e}();d.ExplorerModel=function(){function e(f,g){this.rootPath=f;this.fetchItems=g}e.prototype={destroy:function(){},getRoot:function(f){this.fetchItems(this.rootPath).then(c.hitch(this,
function(g){this.root=g;f(g)}))},getChildren:function(f,g){if(f.Children)g(f.Children);else f.ChildrenLocation?this.fetchItems(f.ChildrenLocation).then(c.hitch(this,function(h){f.Children=h;g(h)})):g([])},getId:function(f){if(f.Location===this.root.Location)return this.rootId;f=f.Location.replace(/[\\\/]/g,"");for(var g="",h=0;h<f.length;h++)g+=f[h].match(/[^\.\:\-\_0-9A-Za-z]/g)?f.charCodeAt(h):f[h];return g}};return e}();d.ExplorerFlatModel=function(){function e(f,g,h){this.rootPath=f;this.fetchItems=
g;this.root=h}e.prototype=new d.ExplorerModel;e.prototype.getRoot=function(f){this.root?f(this.root):this.fetchItems(this.rootPath).then(c.hitch(this,function(g){this.root=g;f(g)}))};e.prototype.getChildren=function(f,g){f===this.root?g(this.root):g([])};return e}();d.ExplorerRenderer=function(){function e(f,g){this.explorer=g;this._init(f);this._expandImageClass="core-sprite-twistie_open";this._collapseImageClass="core-sprite-twistie_closed";this._twistieSpriteClass="modelDecorationSprite"}e.prototype=
{getLabelColumnIndex:function(){return this.explorer.checkbox?1:0},initTable:function(f,g){this.tableTree=g;c.empty(f);c.addClass(f,"treetable");this.renderTableHeader(f)},getActionsColumn:function(f,g,h,j){h=h||"tool";var k=this.explorer.registry.getService("orion.page.command"),l=document.createElement("td");l.id=g.id+"actionswrapper";j&&c.addClass(l,j);k.renderCommands(l,"object",f,this.explorer,h,false,null,"commandActiveItem","commandInactiveItem");return l},initCheckboxColumn:function(){if(this._useCheckboxSelection)return document.createElement("th")},
getCheckboxColumn:function(f,g){if(this._useCheckboxSelection){var h=document.createElement("td"),j=document.createElement("span");j.id=this.getCheckBoxId(g.id);c.addClass(j,"core-sprite-check selectionCheckmarkSprite");j.itemId=g.id;if(this.getCheckedFunc){j.checked=this.getCheckedFunc(f);this._highlightSelection&&c.toggleClass(g,"checkedRow",j.checked);c.toggleClass(j,"core-sprite-check_on",j.checked)}h.appendChild(j);c.connect(j,"onclick",c.hitch(this,function(k){this.onCheck(g,k.target,k.target.checked?
false:true,true)}));return h}},getCheckBoxId:function(f){return f+"selectedState"},onCheck:function(f,g,h,j){g.checked=h;this._highlightSelection&&f&&c.toggleClass(f,"checkedRow",h);c.toggleClass(g,"core-sprite-check_on",h);this.onCheckedFunc&&this.onCheckedFunc(g.itemId,h,j);this._storeSelections();this.explorer.selection&&this.explorer.selection.setSelections(this.getSelected())},_storeSelections:function(){var f=this.getSelectedIds(),g=this._getUIStatePreferencePath();if(g&&window.sessionStorage)window.sessionStorage[g+
"selection"]=JSON.stringify(f)},_restoreSelections:function(f){f=window.sessionStorage[f+"selection"];if(typeof f==="string")f=f.length>0?JSON.parse(f):null;var g;if(f)for(g=0;g<f.length;g++){var h=c.byId(f[g]);if(h){this._highlightSelection&&c.addClass(h,"checkedRow");if(h=c.byId(this.getCheckBoxId(h.id))){h.checked=true;c.addClass(h,"core-sprite-check_on")}}}f=this.getSelected();this.explorer.selection&&this.explorer.selection.setSelections(f)},_storeExpansions:function(f){window.sessionStorage[f+
"expanded"]=JSON.stringify(this._expanded)},_restoreExpansions:function(f){var g=false,h=window.sessionStorage[f+"expanded"];if(typeof h==="string")h=h.length>0?JSON.parse(h):null;var j;if(h)for(j=0;j<h.length;j++)if(c.byId(h[j])){this._expanded.push(h[j]);this.tableTree.expand(h[j],c.hitch(this,function(){this._restoreSelections(f)}));g=true}return!g},_getUIStatePreferencePath:function(){if(this.explorer){var f=this.explorer.getRootPath();if(this._cachePrefix&&f)return"/"+this._cachePrefix+"/"+f.replace(/[^\.\:\-\_0-9A-Za-z]/g,
"")+"/uiState"}return null},expandCollapseImageId:function(f){return f+"__expand"},updateExpandVisuals:function(f,g){if(f=c.byId(this.expandCollapseImageId(f.id))){c.addClass(f,g?this._expandImageClass:this._collapseImageClass);c.removeClass(f,g?this._collapseImageClass:this._expandImageClass)}},getExpandImage:function(f,g,h,j){var k=c.create("span",{id:this.expandCollapseImageId(f.id)},g,"last");c.addClass(k,this._twistieSpriteClass);c.addClass(k,this._collapseImageClass);if(h){g=c.create("span",
null,g,"last");c.addClass(g,j||"imageSprite");c.addClass(g,h)}k.onclick=c.hitch(this,function(){this.tableTree.toggle(f.id,this.expandCollapseImageId(f.id),this._expandImageClass,this._collapseImageClass);if(this.tableTree.isExpanded(f.id))this._expanded.push(f.id);else for(var l in this._expanded)if(this._expanded[l]===f.id){this._expanded.splice(l,1);break}(l=this._getUIStatePreferencePath())&&window.sessionStorage&&this._storeExpansions(l)});return k},render:function(f,g){g.cellSpacing="8px";this.renderRow(f,
g)},getSelected:function(){var f=[];c.query(".core-sprite-check_on").forEach(c.hitch(this,function(g){f.push(this.tableTree.getItem(g.parentNode.parentNode))}));return f},getSelectedIds:function(){var f=[];c.query(".core-sprite-check_on").forEach(c.hitch(this,function(g){f.push(g.parentNode.parentNode.id)}));return f},rowsChanged:function(){this._decorateAlternatingLines&&c.query(".treeTableRow").forEach(function(f,g){if(g%2){c.addClass(f,"darkTreeTableRow");c.removeClass(f,"lightTreeTableRow")}else{c.addClass(f,
"lightTreeTableRow");c.removeClass(f,"darkTreeTableRow")}});this.explorer.selection&&this.explorer.selection.setSelections(this.getSelected())},updateCommands:function(){var f=this.explorer.registry;c.query(".treeTableRow").forEach(function(g){var h=c.byId(g.id+"actionswrapper");c.empty(h);f.getService("orion.page.command").renderCommands(h,"object",g._item,this.explorer,"tool")})},_init:function(f){if(f){this._useCheckboxSelection=f.checkbox===undefined?false:f.checkbox;this._colums=f.colums||[];
this._cachePrefix=f.cachePrefix;this.getCheckedFunc=f.getCheckedFunc;this.onCheckedFunc=f.onCheckedFunc;this._highlightSelection=true;if(f.highlightSelection===false)this._highlightSelection=false;this._decorateAlternatingLines=true;if(f.decorateAlternatingLines===false)this._decorateAlternatingLines=false}},_initializeUIState:function(){this._expanded=[];var f=this._getUIStatePreferencePath();f&&window.sessionStorage&&this._restoreExpansions(f)&&this._restoreSelections(f)}};return e}();d.SelectionRenderer=
function(){function e(f,g){this._init(f);this.explorer=g}e.prototype=new d.ExplorerRenderer;e.prototype.renderTableHeader=function(f){var g=document.createElement("thead"),h=document.createElement("tr");c.addClass(g,"navTableHeading");this._useCheckboxSelection&&h.appendChild(this.initCheckboxColumn(f));for(var j=0,k=this.getCellHeaderElement(j);k;){k.innerHTML.length>0&&c.addClass(k,"navColumn");h.appendChild(k);k=this.getCellHeaderElement(++j)}g.appendChild(h);f.appendChild(g)};e.prototype.renderRow=
function(f,g){c.style(g,"verticalAlign","baseline");c.addClass(g,"treeTableRow");var h=this.getCheckboxColumn(f,g);if(h){c.addClass(h,"checkColumn");g.appendChild(h)}h=0;for(var j=this.getCellElement(h,f,g);j;){g.appendChild(j);c.addClass(j,"secondaryColumn");j=this.getCellElement(++h,f,g)}};e.prototype.getCellHeaderElement=function(){};e.prototype.getCellElement=function(){};return e}();return d});
define("orion/git/git-clones-explorer",["require","dojo","orion/explorer","orion/util"],function(b,c,a,d){var e={};e.GitClonesExplorer=function(){function f(g,h,j,k,l,m){this.parentId=k;this.registry=g;this.selection=h;this.toolbarId=l;this.selectionToolsId=m;this.cloneDetails=j;this.checkbox=false;this.renderer=new e.GitClonesRenderer({checkbox:false},this)}f.prototype=new a.Explorer;f.prototype.getGitLocation=function(g){g=d.makeRelative(g);var h=b.toUrl("gitapi/clone._");h=h.substring(0,h.length-
2);return g[0]==="/"?h+g:h+"/"+g};f.prototype.setDefaultPath=function(g){this.defaultPath=g};f.prototype.displayClonesList=function(g){g=g||this.defaultPath;g=d.makeRelative(g);if(g!==this._lastHash){this._lastHash=g;c.hash(g,true);g=this.getGitLocation(g);c.create("div",null,c.byId(this.parentId),"only").innerHTML="Loading <b>"+g+"</b>...";var h=this.registry.getService("orion.git.provider");this.createTree(this.parentId,new e.GitClonesModel(h,g,h.getGitClone))}};f.prototype.redisplayClonesList=
function(){if(this._lastHash){var g=this.getGitLocation(this._lastHash);c.create("div",null,c.byId(this.parentId),"only").innerHTML="Loading <b>"+g+"</b>...";var h=this.registry.getService("orion.git.provider");this.createTree(this.parentId,new e.GitClonesModel(h,g,h.getGitClone))}};f.prototype.loadCloneDetails=function(g){this.cloneDetails.loadCloneDetails(g.ConfigLocation)};return f}();e.GitClonesModel=function(){function f(g,h,j,k){this.gitClient=g;this.rootPath=h;this.fetchItems=j;this.root=k?
k:null}f.prototype=new a.ExplorerModel;f.prototype.getRoot=function(g){this.root?g(this.root):this.fetchItems(this.rootPath).then(c.hitch(this,function(h){this.root=h;g(h)}))};f.prototype.mayHaveChildren=function(g){if(g.children||g.Children)return true;else if(g.BranchLocation&&g.RemoteLocation)return true;else if(g.GroupNode)return true;else if(g.Type==="Remote")return true;return false};f.prototype.getIdentity=function(g){if(g.Location){g=g.Location;g=g.replace(/[^\.\:\-\_0-9A-Za-z]/g,"")}else g=
"ROOT";return g};f.prototype.getChildren=function(g,h){g.children=[];if(g.Children){for(var j=0;j<g.Children.length;j++){g.Children[j].parent=g;g.children[j]=g.Children[j]}h(g.Children)}else if(g.BranchLocation&&g.RemoteLocation){g.children=[{GroupNode:"true",Location:g.BranchLocation,Name:"Branches",parent:g},{GroupNode:"true",Location:g.RemoteLocation,BranchLocation:g.BranchLocation,Name:"Remotes",parent:g},{GroupNode:"true",Location:g.TagLocation,Name:"Tags",parent:g}];h(g.children)}else if(g.GroupNode)this.gitClient.getGitBranch(g.Location).then(c.hitch(this,
function(k){g.children=k.Children;for(var l=0;l<k.Children.length;l++)k.Children[l].parent=g;h(k.Children)}));else g.Type==="Remote"&&this.gitClient.getGitBranch(g.Location).then(c.hitch(this,function(k){g.children=k.Children;for(var l=0;l<k.Children.length;l++)k.Children[l].parent=g;h(k.Children)}))};return f}();e.GitClonesRenderer=function(){function f(g,h){this._init(g);this.explorer=h}f.prototype=new a.SelectionRenderer;f.prototype.getCellHeaderElement=function(g){switch(g){case 0:case 1:return c.create("th",
{style:"height: 8px;"})}};f.prototype.getCellElement=function(g,h,j){switch(g){case 0:var k,l;if(h.BranchLocation&&h.RemoteLocation){k=document.createElement("td");g=j.id+"__expand";g=c.create("div",null,k,"only");this.getExpandImage(j,g,"git-sprite-repository","gitImageSprite");l=c.create("a",{className:"navlinkonpage"},g,"last");c.connect(l,"onclick",l,c.hitch(this,function(){this.explorer.loadCloneDetails(h)}));c.connect(l,"onmouseover",l,function(){l.style.cursor="pointer"});c.connect(l,"onmouseout",
l,function(){l.style.cursor="default"});c.place(document.createTextNode(h.Name),l,"only")}else if(h.GroupNode){k=document.createElement("td");g=j.id+"__expand";g=c.create("div",null,k,"only");h.Name==="Branches"&&this.getExpandImage(j,g,"git-sprite-branches","gitImageSprite");h.Name==="Remotes"&&this.getExpandImage(j,g,"git-sprite-remotes","gitImageSprite");h.Name==="Tags"&&this.getExpandImage(j,g,"git-sprite-tags","gitImageSprite");l=c.create("a",{innerHTML:h.Name,className:"navlinkonpage"},g,"last");
c.place(document.createTextNode(h.Name),l,"only")}else if(h.Type==="Branch"){k=document.createElement("td");g=c.create("div",{style:"margin-left: 10px"},k,"only");l=c.create("a",{innerHTML:h.Name,className:"navlinkonpage"},g,"last");if(h.Current)l.style.fontWeight="bold";c.place(document.createTextNode(h.Name),l,"only");j=c.create("span",null,l,"first");c.addClass(j,"gitImageSprite");c.addClass(j,"git-sprite-branch")}else if(h.Type==="Remote"){k=document.createElement("td");g=j.id+"__expand";g=c.create("div",
null,k,"only");this.getExpandImage(j,g,"git-sprite-remote","gitImageSprite");l=c.create("a",{innerHTML:h.Name,className:"navlinkonpage"},g,"last");!h.PushUrl||h.PushUrl===h.GitUrl?c.place(document.createTextNode(h.Name+" ("+h.GitUrl+")"),l,"only"):c.place(document.createTextNode(h.Name+" (See the configuration for fetch/push urls)"),l,"only")}else if(h.Type==="RemoteTrackingBranch"){k=document.createElement("td");g=c.create("div",{style:"margin-left: 10px"},k,"only");l=c.create("a",{innerHTML:h.Name,
className:"navlinkonpage"},g,"last");c.place(document.createTextNode(h.Name),l,"only");j=c.create("span",null,l,"first");c.addClass(j,"gitImageSprite");c.addClass(j,"git-sprite-branch")}else if(h.Type==="Tag"){k=document.createElement("td");g=c.create("div",{style:"margin-left: 10px"},k,"only");l=c.create("a",{innerHTML:h.Name,className:"navlinkonpage"},g,"last");c.place(document.createTextNode(h.Name),l,"only");j=c.create("span",null,l,"first");c.addClass(j,"gitImageSprite");c.addClass(j,"git-sprite-tag")}return k;
case 1:return this.getActionsColumn(h,j,"tool","actionsColumn")}};return f}();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(b,c,a){c.declare("orion.git.widgets.CloneGitRepositoryDialog",[a.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:true,templateString:c.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(){var d=this;this.inherited(arguments);if(this.options.url)this.gitUrl.value=this.options.url;if(this.options.advancedOnly){this.Basic.style.display="none";this.Advanced.style.display=
"";setTimeout(function(){d.gitName.focus()},400)}c.connect(this.changeGitPath,"onclick",null,c.hitch(this,this.openDirectoryPickerDialog));c.connect(this.isExistingProject,"onchange",null,c.hitch(this,this.showExistingFolder));c.connect(this.gitName,"onfocus",null,c.hitch(this,this.showNewProject));c.connect(this.advancedLink,"onclick",null,c.hitch(this,this.showAdvanced));c.connect(this.advancedLinkHide,"onclick",null,c.hitch(this,this.hideAdvanced));this.options.alwaysShowAdvanced&&this.showAdvanced()},
execute:function(){if(this.options.func)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);delete this.options.func},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 d=new orion.widgets.DirectoryPrompterDialog({title:"Choose a Folder",serviceRegistry:this.options.serviceRegistry,fileClient:this.options.fileClient,func:c.hitch(this,
function(e){if(e&&e.Location){this.gitPath.value=e.Location;this.shownGitPath.innerHTML="<a href='"+b.toUrl("navigate/table.html")+"#"+e.ChildrenLocation+"'>"+e.Name+"</a>";for(e=e;e.parent&&!e.parent.Projects;){this.shownGitPath.innerHTML="<a href='"+b.toUrl("navigate/table.html")+"#"+e.parent.ChildrenLocation+"'>"+e.parent.Name+"</a>/"+this.shownGitPath.innerHTML;e=e.parent}}})});d.startup();d.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(b,c){b.declare("orion.git.widgets.InitGitRepositoryDialog",[c.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:true,templateString:b.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.options.func(this.gitTarget.value);delete this.options.func}})});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(b,c){b.declare("orion.git.widgets.AddRemoteDialog",[c.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:true,templateString:b.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.options.func(this.gitRemote.value,this.gitRemoteURI.value);delete this.options.func}})});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(b,c){b.declare("orion.git.widgets.GitCredentialsDialog",[c.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:true,templateString:b.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){this._sshService=
this.options.serviceRegistry.getService("orion.net.ssh");this._progressService=this.options.serviceRegistry.getService("orion.page.progress")}},postCreate:function(){this.inherited(arguments);var a=this;this.options.username||b.style(this.gitSshUsernameRow,"display","none");this.options.password||b.style(this.gitSshPasswordRow,"display","none");this.options.privatekey||b.style(this.gitPrivateKeyRow,"display","none");if(!this.options.passphrase){b.style(this.gitPassphraseRow,"display","none");b.style(this.gitPassphraseRow_1,
"display","none")}if(this.options.errordata&&this.options.errordata.Url){b.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;b.style(this.gitSshUsernameRow,"display","none");setTimeout(function(){a.gitSshPassword.focus()},400)}b.connect(this.gitSshPassword,"onfocus",null,b.hitch(this,function(){this.isSshPassword.checked=
true}));b.connect(this.gitPrivateKey,"onfocus",null,b.hitch(this,function(){this.isPrivateKey.checked=true}));b.connect(this.gitPassphrase,"onfocus",null,b.hitch(this,function(){this.isPrivateKey.checked=true}))},execute:function(){if(this._sshService){var a=this;this._sshService.getKnownHosts().then(function(d){if(a.options.func)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:d});delete a.options.func})}else{this.options.func&&this.options.func({gitSshUsername:this.gitSshUsername.value,gitSshPassword:this.gitSshPassword.value,gitPrivateKey:this.gitPrivateKey.value,gitPassphrase:this.gitPassphrase.value,knownHosts:this.gitSshKnownHosts.value});delete this.options.func}}})});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(b,c,a,d){b.declare("orion.git.widgets.RemotePrompterDialog",[c.Dialog,orion.widgets._OrionDialogMixin],{treeWidget:null,treeRoot:{},widgetsInTemplate:true,templateString:b.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);b.connect(this.newBranch,"onchange",b.hitch(this,this.validate));if(this.options.hideNewBranch)this.newBranchSection.style.display="none"},
loadRemoteChildren:function(e){this.treeRoot=e;this.createTree(new d.GitClonesModel(this.gitClient,null,this.gitClient.getGitClone,this.treeRoot))},createTree:function(e){var f=this.treeWidget=new orion.widgets.ExplorerTree({style:"width:100%; height:100%",model:e,region:"center",showRoot:false,persist:true,openOnClick:false,getLabel:function(h){if(h.Type==="RemoteTrackingBranch"&&!h.Id)return h.Name+" [New branch]";return h.Name},getIconClass:function(h){if(h.BranchLocation&&h.RemoteLocation)return"gitRepoItem";
if(h.GroupNode)return h.Name==="Branch"?"gitBranchesItem":"gitRemotesItem";if(h.Type==="Branch"||h.Type==="RemoteTrackingBranch")return"gitBranchItem";if(h.Type==="Remote")return"gitRemoteItem";return"gitDefaultItem"}}),g=this;this.treeWidget._inheritedSelectNode=this.treeWidget._selectNode;this.treeWidget._selectNode=function(h){f._inheritedSelectNode(h);g.newBranch.disabled=h.item&&h.item.Type==="Remote"?false:true;b.hitch(g,g.validate)()};this.treeWidget.startup();b.byId(this.treeContentPane.id).appendChild(this.treeWidget.domNode)},
validate:function(){var e=this.treeWidget.getSelectedItems();if(e.length==1)if(e[0].Type==="RemoteTrackingBranch"){this.RemoteBrowserButton.disabled=false;return}else if(e[0].Type==="Remote")if(this.newBranch.value!=""){this.RemoteBrowserButton.disabled=false;return}this.RemoteBrowserButton.disabled=true},execute:function(){var e=this.treeWidget.getSelectedItems();this.onHide();if(this.options.func)e[0].Type==="RemoteTrackingBranch"?this.options.func(e[0],e[0].parent):this.options.func(null,e[0],
this.newBranch.value);delete this.options.func}})});define("text!orion/git/widgets/templates/ApplyPatchDialog.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\n\t\t<form method="post" id="applyPatchDialog.myForm"\n\t\t\tenctype="multipart/form-data">\n\t\t\t<fieldset>\n\t\t\t\t<div style="display: table-row">\n\t\t\t\t\t<div style="display: table-row; height: 20px">\n\t\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t\t\t<input type="radio" name="radio" value="urlRadio" id="applyPatchDialog.urlRadio" checked/>URL:\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t\t\t<input type="text" name="url" id="applyPatchDialog.url" style="display: inline-block; width: 98%;"\n\t\t\t\t\t\t\t\tdojoType="dijit.form.ValidationTextBox"\n\t\t\t\t\t\t\t\tregExp="^http(s)*://.+" invalidMessage="Invalid URL."/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\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-row; height: 20px">\n\t\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t\t\t<input type="radio" name="radio" value="fileRadio" id="applyPatchDialog.fileRadio"/>File:\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div style="display: table-cell; padding: 1px; vertical-align: top;">\n\t\t\t\t\t\t\t<div id="files" dojoType="dojox.form.uploader.FileList" uploaderId="applyPatchDialog.uploader"></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t\t\t<input name="uploadedfile" multiple="false" type="file" id="applyPatchDialog.uploader" force="iframe"\n\t\t\t\t\t\t\t\tdojoType="dojox.form.Uploader" style="height: 20px" label="Browse..."/>\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-row">\n\t\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t\t\t<input type="submit" label="Finish" value="OK" dojoType="dijit.form.Button"\n\t\t\t\t\t\t\t\tstyle="padding: 20 0 10 0; float: right; clear: both;"/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</fieldset>\n\t\t</form>\n\t</div>\n</div>'});
define("orion/git/widgets/ApplyPatchDialog",["dojo","dijit","dojox","dijit/Dialog","dojo/data/ItemFileReadStore","dojox/form/Uploader","dojox/form/uploader/FileList","dojox/form/uploader/plugins/IFrame","dijit/form/Button","dijit/ProgressBar","orion/widgets/_OrionDialogMixin","text!orion/git/widgets/templates/ApplyPatchDialog.html"],function(b,c){b.declare("orion.git.widgets.ApplyPatchDialog",[c.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:true,templateString:b.cache("orion","git/widgets/templates/ApplyPatchDialog.html"),
constructor:function(){this.inherited(arguments);this.options=arguments[0]||{}},postMixInProperties:function(){this.inherited(arguments);this.title="Apply Patch"},postCreate:function(){function a(d){c.byId("files").set("disabled",d);c.byId("applyPatchDialog.uploader").set("disabled",d);c.byId("applyPatchDialog.url").set("disabled",!d)}this.inherited(arguments);b.byId("applyPatchDialog.myForm").action=this.options.diffLocation;b.byId("applyPatchDialog.uploader").url=this.options.diffLocation;a(true);
b.connect(c.byId("applyPatchDialog.urlRadio"),"onclick",b.hitch(this,function(d){d.target.id==="applyPatchDialog.urlRadio"&&a(true)}));b.connect(c.byId("applyPatchDialog.fileRadio"),"onclick",b.hitch(this,function(d){d.target.id==="applyPatchDialog.fileRadio"&&a(false)}));b.connect(c.byId("applyPatchDialog.uploader"),"onError",b.hitch(this,function(){setTimeout(b.hitch(this,function(){this.hide()}),2E3)}));b.connect(c.byId("applyPatchDialog.uploader"),"onComplete",b.hitch(this,function(){setTimeout(b.hitch(this,
function(){this.hide()}),2E3)}))}})});define("text!orion/git/widgets/templates/OpenCommitDialog.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</div>\n\t</div>\n</div>'});
define("orion/git/widgets/OpenCommitDialog",["require","dojo","dijit","orion/util","dijit/Dialog","dijit/form/TextBox","orion/widgets/_OrionDialogMixin","text!orion/git/widgets/templates/OpenCommitDialog.html"],function(b,c,a){return c.declare("orion.git.widgets.OpenCommitDialog",[a.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:true,templateString:c.cache("orion","git/widgets/templates/OpenCommitDialog.html"),SEARCH_DELAY:500,timeoutId:null,time:null,options:null,constructor:function(){this.inherited(arguments);
this.timeoutId=null;this.time=0;this.options=arguments[0];this.serviceRegistry=this.options.serviceRegistry;if(!this.serviceRegistry)throw new Error("Missing required argument: serviceRegistry");this.repositories=this.options.repositories;if(!this.repositories)throw new Error("Missing required argument: repositories");this.commitName=this.options.commitName},postMixInProperties:function(){this.options.title=this.options.title||"Find Commit";this.selectFile="Type the commit name (sha1):";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(d){if(d.keyCode===c.keys.ENTER&&this.results){d=c.query("a",this.results);if(d.length>0){window.open(d[0].href);this.hide()}}});c.connect(this,"onMouseUp",function(d){d.target.focus()});this.resourceName.set("value",
this.commitName)},checkSearch:function(){clearTimeout(this.timeoutId);var d=(new Date).getTime();if(d-this.time>this.SEARCH_DELAY){this.time=d;this.doSearch()}else this.timeoutId=setTimeout(c.hitch(this,"checkSearch"),50)},_findCommitLocation:function(d,e,f){var g=this;if(f==null)f=new c.Deferred;d.length>0?g.serviceRegistry.getService("orion.git.provider").doGitLog("/gitapi/commit/"+e+d[0].ContentLocation+"?page=1&pageSize=1",null,null,"Looking for the commit").then(function(h){f.callback(h.Children[0])},
function(){g._findCommitLocation(d.slice(1),e,f)}):f.errback();return f},doSearch:function(){var d=this.resourceName&&this.resourceName.get("value");if(d){c.place("<div>Searching&#x2026;</div>",this.results,"only");var e=this;this.serviceRegistry.getService("orion.page.message").setProgressMessage("Looking for the commit");this._findCommitLocation(this.repositories,d).then(function(f){c.empty(e.results);e.displayCommit(f,e.results)},function(){c.place("<div>No commits found</div>",e.results,"only");
e.serviceRegistry.getService("orion.page.message").setProgressMessage("")})}},displayCommit:function(d,e){e=c.create("div",{style:"padding:10px; max-width:480px"},e);var f=d.Message.split(/(\r?\n|$)/)[0],g=c.create("a",{"class":"gitMainDescription",href:"/git/git-commit.html#"+d.Location+"?page=1&pageSize=1"},e);c.place(document.createTextNode(f),g);c.connect(g,"onclick",g,c.hitch(this,function(){this.hide()}));c.create("div",{style:"padding-top:15px"},e);c.create("span",{"class":"gitSecondaryDescription",
innerHTML:" commit: "+d.Name},e);if(d.Parents&&d.Parents.length>0){c.create("div",null,e);c.place(document.createTextNode("parent: "),e);f=c.create("a",{"class":"gitSecondaryDescription",href:"/git/git-commit.html#"+d.Parents[0].Location+"?page=1&pageSize=1"},e);c.place(document.createTextNode(d.Parents[0].Name),f);c.connect(f,"onclick",f,c.hitch(this,function(){this.hide()}))}c.create("div",{style:"padding-top:15px"},e);if(d.AuthorImage){f=c.create("span",{"class":"git-author-icon-small",style:"margin-bottom:30px"},
e);g=new Image;g.src=d.AuthorImage;g.name=d.AuthorName;g.width=35;g.height=35;c.place(g,f,"first")}c.create("span",{"class":"gitSecondaryDescription",innerHTML:" authored by "+d.AuthorName+" ("+d.AuthorEmail+") on "+c.date.locale.format(new Date(d.Time),{formatLength:"short"})},e);c.create("div",null,e);c.create("span",{"class":"gitSecondaryDescription",innerHTML:"committed by "+d.CommitterName+" ("+d.CommitterEmail+")"},e)},show:function(){this.inherited(arguments);this.resourceName.focus()},onHide:function(){clearTimeout(this.timeoutId);
this.inherited(arguments)}})});
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","orion/git/widgets/ApplyPatchDialog","orion/git/widgets/OpenCommitDialog"],function(b,c,a,d){var e={};(function(){function f(h){var j;try{j=JSON.parse(h.responseText)}catch(k){j={Result:h.responseText}}j.HttpCode=
h.status;return j}var g=false;e.updateNavTools=function(h,j,k,l,m,n){var r=c.byId(k);if(r)c.empty(r);else throw"could not find toolbar "+k;var s=h.getService("orion.page.command");s.renderCommands(r,"dom",m,j,"button");if(n)if(k=c.byId(n)){c.empty(k);s.renderCommands(k,"dom",m,j,"button",true)}if(l)if(c.byId(l)){c.empty(l);s.renderCommands(l,"dom",null,j,"button")}if(!g){g=true;h.getService("orion.page.selection").addEventListener("selectionChanged",function(p,q){if(p=c.byId(l)){c.empty(p);s.renderCommands(p,
"dom",q,j,"button")}})}};e.getNewItemName=function(h,j,k,l,m,n,r,s){var p,q;if(k)p=c.byId(l);else if(j.makeNewItemPlaceHolder!=null)if(h=j.makeNewItemPlaceHolder(h,l,r)){p=h.refNode;q=h.tempNode}else p=c.byId(l);if(p)d.getUserText(l+"EditBox",p,false,m,c.hitch(this,function(o){if(o){q&&q.parentNode.removeChild(q);n(o)}}),undefined,undefined,undefined,s);else(l=window.prompt(m))&&n(l)};e.handleKnownHostsError=function(h,j,k,l){if(confirm("Would you like to add "+j.KeyType+" key for host "+j.Host+" to continue operation? Key fingerpt is "+
j.HostFingerprint+".")){var m=h.getService("orion.net.ssh");m.addKnownHosts(j.Host+" "+j.KeyType+" "+j.HostKey).then(function(){m.getKnownHosts().then(function(r){k.knownHosts=r;l(k)});if(k.failedOperation){var n=h.getService("orion.page.progress");c.hitch(n,n.removeOperation)(k.failedOperation.Location,k.failedOperation.Id)}})}};e.handleSshAuthenticationError=function(h,j,k,l,m){j=new orion.git.widgets.GitCredentialsDialog({title:m,serviceRegistry:h,func:l,errordata:k.errordata,failedOperation:k.failedOperation});
j.startup();j.show();if(k.failedOperation){h=h.getService("orion.page.progress");c.hitch(h,h.removeOperation)(k.failedOperation.Location,k.failedOperation.Id)}};e.getDefaultSshOptions=function(h,j){var k=new c.Deferred;h=h.getService("orion.net.ssh");var l=j&&!j.optionsRequested?j.valueFor("sshuser"):"",m=j&&!j.optionsRequested?j.valueFor("sshpassword"):"";h.getKnownHosts().then(function(n){k.callback({knownHosts:n,gitSshUsername:l,gitSshPassword:m,gitPrivateKey:"",gitPassphrase:""})});return k};
e.handleProgressServiceResponse=function(h,j,k,l,m,n){if(h&&h.status)h=f(h);if(!h||!h.HttpCode)l&&l(h);else switch(h.HttpCode){case 200:case 201:case 202:l&&l(h.Result);return;case 401:if(h.JsonData)j.errordata=h.JsonData;if(h.failedOperation)j.failedOperation=h.failedOperation;c.hitch(this,e.handleSshAuthenticationError)(k,h.JsonData,j,m,n);return;case 400:if(h.JsonData&&h.JsonData.HostKey){if(h.failedOperation)j.failedOperation=h.failedOperation;c.hitch(this,e.handleKnownHostsError)(k,h.JsonData,
j,m);return}default:j=[];j.Severity="Error";j.HTML=false;try{j.Message=h.DetailedMessage?h.DetailedMessage:h.Message}catch(r){j.Message=error.message}k.getService("orion.page.message").setProgressResult(j);break}};e.gatherSshCredentials=function(h,j,k,l){var m=new c.Deferred,n=function(r){h.getService("orion.net.ssh").getKnownHosts().then(function(s){m.callback({knownHosts:s,gitSshUsername:r.gitSshUsername,gitSshPassword:r.gitSshPassword,gitPrivateKey:r.gitPrivateKey,gitPassphrase:r.gitPassphrase})})};
if(k&&k.HostKey){confirm("Would you like to add "+k.KeyType+" key for host "+k.Host+" to continue operation? Key fingerpt is "+k.HostFingerprint+".")&&h.getService("orion.net.ssh").addKnownHosts(k.Host+" "+k.KeyType+" "+k.HostKey).then(function(){n({gitSshUsername:"",gitSshPassword:"",gitPrivateKey:"",gitPassphrase:""})});return m}if(j){k=j.parameters?j.parameters.valueFor("sshuser"):"";j=j.parameters?j.parameters.valueFor("sshpassword"):"";n({gitSshUsername:k,gitSshPassword:j,gitPrivateKey:"",gitPassphrase:""});
return m}j=new orion.git.widgets.GitCredentialsDialog({title:l,serviceRegistry:h,func:n,errordata:k});j.startup();j.show();return m};e.handleProgressServiceResponse2=function(h,j,k,l){if(h&&h.status)h=f(h);if(!h||!h.HttpCode)k&&k(h);else switch(h.HttpCode){case 200:case 201:case 202:k&&k(h.Result);return;case 401:if(h.failedOperation){j=j.getService("orion.page.progress");c.hitch(j,j.removeOperation)(h.failedOperation.Location,h.failedOperation.Id)}l(h);return;case 400:if(h.JsonData&&h.JsonData.HostKey){if(h.failedOperation){j=
j.getService("orion.page.progress");c.hitch(j,j.removeOperation)(h.failedOperation.Location,h.failedOperation.Id)}l(h);return}default:l=[];l.Severity="Error";l.HTML=false;try{l.Message=h.DetailedMessage?h.DetailedMessage:h.Message}catch(m){l.Message=error.message}j.getService("orion.page.message").setProgressResult(l);break}};e.createFileCommands=function(h,j,k){function l(n){if(!(n.status===401||n.status===403)){var r=[];r.Severity="Error";r.HTML=false;try{var s=JSON.parse(n.responseText);r.Message=
s.DetailedMessage?s.DetailedMessage:s.Message}catch(p){r.Message=n.message}h.getService("orion.page.message").setProgressResult(r)}}var m=new a.Command({name:"Link Repository",imageClass:"core-sprite-link",id:"eclipse.linkRepository",callback:function(n){var r=new orion.widgets.NewItemDialog({title:"Link Repository",label:"Folder name:",func:function(s){var p=h.getService("orion.core.file");p.loadWorkspace("").then(function(q){p.createProject(q.Location,s,n.items.ContentLocation,false).then(function(o){alert("Repository was linked to "+
o.Name);p.read(o.ContentLocation,true).then(function(t){window.location.replace(b.toUrl("navigate/table.html")+"#"+t.ChildrenLocation)})})})},advanced:false});r.startup();r.show()},visibleWhen:function(n){if(n.ContentLocation)return true;return false}});j.addCommand(m,"object");m=new a.Command({name:"Checkout",tooltip:"Checkout the current tag, creating a local branch based on its contents.",imageClass:"git-sprite-checkout",spriteClass:"gitCommandSprite",id:"eclipse.checkoutTag",callback:function(n){function r(){if(s.Repository)return s.Repository.BranchLocation;
for(var p in s.parent.parent.children)if(s.parent.parent.children[p].Name==="Branches")return s.parent.parent.children[p];return s.parent.parent}var s=n.items;e.getNewItemName(s,k,false,n.domNode.id,"tag_"+s.Name,function(p){if(!(!p&&p=="")){var q;q=s.Repository!=null?s.Repository.Location:s.parent.parent.Location;h.getService("orion.git.provider").checkoutTag(q,s.Name,p).then(function(){c.hitch(k,k.changedItem)(r())},l)}},undefined,true)},visibleWhen:function(n){return n.Type==="Tag"}});j.addCommand(m,
"object");m=new a.Command({name:"Checkout",tooltip:"Checkout the branch or corresponding local branch and make it 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(n){var r=n.items,s=h.getService("orion.git.provider"),p=h.getService("orion.page.message");p.setProgressMessage("Checking out branch...");r.Type==="Branch"?
s.checkoutBranch(r.CloneLocation,r.Name).then(function(){c.hitch(k,k.changedItem)(r.parent);p.setProgressResult("Ok")},l):s.addBranch(r.Repository!=null?r.Repository.BranchLocation:r.parent.parent.BranchLocation,null,r.Name).then(function(q){s.checkoutBranch(q.CloneLocation,q.Name).then(function(){c.hitch(k,k.changedItem)(r.Repository?r.Repository.BranchLocation:r.parent.parent.parent);p.setProgressResult("Ok")},l)},l)},visibleWhen:function(n){return n.Type==="Branch"||n.Type==="RemoteTrackingBranch"}});
j.addCommand(m,"object");m=new a.ParametersDescription([new a.CommandParameter("name","text","Name:")],false);m=new a.Command({name:"New Branch",tooltip:"Add a new local branch to the repository",imageClass:"core-sprite-add",id:"eclipse.addBranch",parameters:m,callback:function(n){var r=n.items,s=function(q,o){h.getService("orion.git.provider").addBranch(q,o).then(function(){c.hitch(k,k.changedItem)(r)},l)},p;p=r.Type==="Clone"?r.BranchLocation:r.Location;n.parameters.valueFor("name")&&!n.parameters.optionsRequested?
s(p,n.parameters.valueFor("name")):e.getNewItemName(r,k,false,n.domNode.id,"Branch name",function(q){!q&&q==""||s(p,q)})},visibleWhen:function(n){return n.GroupNode&&n.Name==="Branches"||n.Type==="Clone"&&k.parentId==="artifacts"}});j.addCommand(m,"object");j.addCommand(m,"dom");m=new a.Command({name:"Delete",tooltip:"Delete the local branch from the repository",imageClass:"core-sprite-delete",id:"eclipse.removeBranch",callback:function(n){var r=n.items;confirm("Are you sure you want to delete branch "+
r.Name+"?")&&h.getService("orion.git.provider").removeBranch(r.Location).then(function(){if(k.changedItem)c.hitch(k,k.changedItem)(r.parent);else k.displayBranches&&c.hitch(k,k.displayBranches)(r.ParentLocation,null)},l)},visibleWhen:function(n){return n.Type==="Branch"&&!n.Current}});j.addCommand(m,"object");m=new a.Command({name:"Delete",tooltip:"Delete the remote tracking branch from the repository",imageClass:"core-sprite-delete",id:"eclipse.removeRemoteBranch",callback:function(n){var r=n.items;
confirm("You're going to delete remote branch "+r.Name+" and push the change.\n\nAre you sure?")&&e.getDefaultSshOptions(h).then(function(s){var p=arguments.callee;h.getService("orion.git.provider").doPush(r.Location,"",false,false,null,"Removing remote branch: "+r.Name,s.gitSshUsername,s.gitSshPassword,s.knownHosts,s.gitPrivateKey,s.gitPassphrase).then(function(q){e.handleProgressServiceResponse(q,s,h,function(o){o.Result.Severity=="Ok"&&c.hitch(k,k.changedItem)(r.parent)},p,"Delete Remote Branch")},
function(q){e.handleProgressServiceResponse(q,s,h,function(){},p,"Removing remote branch: "+r.Name)})})},visibleWhen:function(n){return n.Type==="RemoteTrackingBranch"}});j.addCommand(m,"object");m=new a.ParametersDescription([new a.CommandParameter("name","text","Name:"),new a.CommandParameter("url","url","Url:")],false);m=new a.Command({name:"New Remote",tooltip:"Add a new remote to the repository",imageClass:"core-sprite-add",id:"eclipse.addRemote",parameters:m,callback:function(n){var r=n.items,
s=function(q,o,t){h.getService("orion.git.provider").addRemote(q,o,t).then(function(){c.hitch(k,k.changedItem)(r)},l)},p;p=r.Type==="Clone"?r.RemoteLocation:r.Location;if(n.parameters.valueFor("name")&&n.parameters.valueFor("url")&&!n.parameters.optionsRequested)s(p,n.parameters.valueFor("name"),n.parameters.valueFor("url"));else{n=new orion.git.widgets.AddRemoteDialog({func:function(q,o){s(p,q,o)}});n.startup();n.show()}},visibleWhen:function(n){return n.GroupNode&&n.Name==="Remotes"||n.Type==="Clone"&&
k.parentId==="artifacts"}});j.addCommand(m,"object");j.addCommand(m,"dom");m=new a.Command({name:"Delete",tooltip:"Delete the remote from the repository",imageClass:"core-sprite-delete",id:"eclipse.removeRemote",callback:function(n){var r=n.items;confirm("Are you sure you want to delete remote "+r.Name+"?")&&h.getService("orion.git.provider").removeRemote(r.Location).then(function(){c.hitch(k,k.changedItem)(r.parent)},l)},visibleWhen:function(n){return n.Type==="Remote"}});j.addCommand(m,"object");
m=new a.Command({name:"Pull",tooltip:"Pull from the repository",imageClass:"git-sprite-pull",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.pull",callback:function(n){var r=n.items,s=r.Location;e.getDefaultSshOptions(h).then(function(p){var q=arguments.callee;h.getService("orion.git.provider").doPull(s,false,null,p.gitSshUsername,p.gitSshPassword,p.knownHosts,p.gitPrivateKey,p.gitPassphrase).then(function(o){e.handleProgressServiceResponse(o,p,h,function(){c.xhrGet({url:s,headers:{"Orion-Version":"1"},
postData:c.toJson({GitSshUsername:p.gitSshUsername,GitSshPassword:p.gitSshPassword,GitSshPrivateKey:p.gitPrivateKey,GitSshPassphrase:p.gitPassphrase,GitSshKnownHost:p.knownHosts}),handleAs:"json",timeout:5E3,load:function(t){return t},error:function(t,u){console.error("HTTP status code: ",u.xhr.status);return t}}).then(function(){r.Type==="Clone"&&c.hitch(k,k.changedItem)(r)},l)},q,"Pull Git Repository")},function(o){e.handleProgressServiceResponse(o,p,h,function(){},q,"Pull Git Repository")})})},
visibleWhen:function(n){return n.Type==="Clone"}});j.addCommand(m,"object");m=new a.Command({name:"Git Log",tooltip:"Open the log for the branch",id:"eclipse.openGitLog",imageClass:"git-sprite-log",spriteClass:"gitCommandSprite",hrefCallback:function(n){n=n.items;if(n.Type==="RemoteTrackingBranch")return b.toUrl("git/git-log.html")+"#"+n.Location+"?page=1";return b.toUrl("git/git-log.html")+"#"+n.CommitLocation+"?page=1"},visibleWhen:function(n){return n.Type==="Branch"||n.Type==="RemoteTrackingBranch"}});
j.addCommand(m,"object");m=new a.Command({name:"Git Log",tooltip:"Open the log for the repository",id:"eclipse.openGitLogAll",imageClass:"git-sprite-log",spriteClass:"gitCommandSprite",hrefCallback:function(n){return b.toUrl("git/git-log.html")+"#"+n.items.CommitLocation+"?page=1"},visibleWhen:function(n){if(!n.CommitLocation||!n.StatusLocation)return false;return true}});j.addCommand(m,"object");m=new a.Command({name:"Git Status",tooltip:"Open the status for the repository",id:"eclipse.openGitStatus",
imageClass:"git-sprite-status",spriteClass:"gitCommandSprite",hrefCallback:function(n){return b.toUrl("git/git-status.html")+"#"+n.items.StatusLocation},visibleWhen:function(n){if(!n.StatusLocation)return false;return true}});j.addCommand(m,"object");m=new a.Command({name:"Show in Navigator",tooltip:"Show the repository folder in the file navigator",id:"eclipse.openCloneContent",hrefCallback:function(n){return b.toUrl("navigate/table.html")+"#"+n.items.ContentLocation+"?depth=1"},visibleWhen:function(n){if(!n.ContentLocation)return false;
return true}});j.addCommand(m,"object");m=new a.Command({name:"Compare With Each Other",imageClass:"git-sprite-open_compare",spriteClass:"gitCommandSprite",id:"eclipse.compareGitCommits",hrefCallback:function(n){n=n.items;var r=new c.Deferred;h.getService("orion.git.provider").getDiff(n[1].DiffLocation,n[0].Name,function(s,p){r.callback(b.toUrl("compare/compare.html")+"?readonly#"+p.xhr.getResponseHeader("Location"))});return r},visibleWhen:function(n){if(k.isDirectory)return false;if(c.isArray(n)&&
n.length===2&&n[0].Type==="Commit"&&n[1].Type==="Commit")return true;return false}});j.addCommand(m,"dom");m=new a.Command({name:"Compare With Working Tree",imageClass:"git-sprite-open_compare",spriteClass:"gitCommandSprite",id:"eclipse.compareWithWorkingTree",hrefCallback:function(n){return b.toUrl("compare/compare.html")+"#"+n.items.DiffLocation},visibleWhen:function(n){return n.Type==="Commit"&&!k.isDirectory}});j.addCommand(m,"object");m=new a.Command({name:"Open",id:"eclipse.openGitCommit",hrefCallback:function(n){return b.toUrl("edit/edit.html")+
"#"+n.items.ContentLocation},visibleWhen:function(n){return n.Type==="Commit"&&n.ContentLocation!=null&&!k.isDirectory}});j.addCommand(m,"object");m=new a.Command({name:"Fetch",tooltip:"Fetch from the remote",imageClass:"git-sprite-fetch",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.fetch",callback:function(n){var r=n.items,s=r.Location,p=function(o,t){if(o.JsonData.HostKey)q(t,o.JsonData);else if(t){t.parameters=o.JsonData.User?new a.ParametersDescription([new a.CommandParameter("sshpassword",
"password","SSH Password:")],true):new a.ParametersDescription([new a.CommandParameter("sshuser","text","SSH User Name:"),new a.CommandParameter("sshpassword","password","SSH Password:")],true);t.parameters.errorData=o.JsonData;j._collectParameters(t)}else q(null,o.JsonData)},q=function(o,t){e.gatherSshCredentials(h,o,t).then(function(u){var w=h.getService("orion.git.provider");w.doFetch(s,false,null,u.gitSshUsername,u.gitSshPassword,u.knownHosts,u.gitPrivateKey,u.gitPassphrase).then(function(x){e.handleProgressServiceResponse2(x,
h,function(){w.getGitRemote(s).then(function(z){k.parentId==="explorer-tree"&&w.getLog(z.HeadLocation,z.Id,"Getting git incoming changes",function(E){k.renderer.setIncomingCommits(E.Children);k.loadCommitsList(z.CommitLocation+"?page=1",z,true)});c.hitch(k,k.changedItem)(r)},l)},function(z){p(z,o)})},function(x){e.handleProgressServiceResponse2(x,h,function(){},function(z){p(z,o)})})})};if(n.parameters&&n.parameters.optionsRequested){q(null,n.parameters.errorData);n.parameters.optionsRequested=false;
n.parameters.errorData=null}else q(n)},visibleWhen:function(n){return n.Type==="RemoteTrackingBranch"||n.Type==="Remote"}});j.addCommand(m,"dom");j.addCommand(m,"object");m=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(n){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 r=
n.items,s=r.Location,p=function(o,t){if(o.JsonData.HostKey)q(t,o.JsonData);else if(t){t.parameters=o.JsonData.User?new a.ParametersDescription([new a.CommandParameter("sshpassword","password","SSH Password:")],true):new a.ParametersDescription([new a.CommandParameter("sshuser","text","SSH User Name:"),new a.CommandParameter("sshpassword","password","SSH Password:")],true);t.parameters.errorData=o.JsonData;j._collectParameters(t)}else q(null,o.JsonData)},q=function(o,t){e.gatherSshCredentials(h,o,
t).then(function(u){var w=h.getService("orion.git.provider");w.doFetch(s,true,null,u.gitSshUsername,u.gitSshPassword,u.knownHosts,u.gitPrivateKey,u.gitPassphrase).then(function(x){e.handleProgressServiceResponse2(x,h,function(){w.getGitRemote(s).then(function(z){k.parentId==="explorer-tree"&&w.getLog(z.HeadLocation,z.Id,"Getting git incoming changes",function(E){k.renderer.setIncomingCommits(E.Children);k.loadCommitsList(z.CommitLocation+"?page=1",z,true)});c.hitch(k,k.changedItem)(r)},l)},function(z){p(z,
o)})},function(x){e.handleProgressServiceResponse2(x,h,function(){},function(z){p(z,o)})})})};if(n.parameters&&n.parameters.optionsRequested){q(null,n.parameters.errorData);n.parameters.optionsRequested=false;n.parameters.errorData=null}else q(n)}},visibleWhen:function(n){return n.Type==="RemoteTrackingBranch"||n.Type==="Remote"}});j.addCommand(m,"dom");j.addCommand(m,"object");m=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(n){var r=n.items;n=h.getService("orion.git.provider");var s=h.getService("orion.page.message");n.doMerge(r.HeadLocation,r.Name).then(function(p){var q=[];if(p.jsonData&&(p.jsonData.Result=="FAST_FORWARD"||p.jsonData.Result=="ALREADY_UP_TO_DATE")){c.query(".treeTableRow").forEach(function(t){c.toggleClass(t,"incomingCommitsdRow",false)});q.Severity="Ok";q.HTML=false;q.Message=p.jsonData.Result;c.hitch(k,k.changedItem)(r)}else if(p.jsonData){var o=
r.HeadLocation.replace("commit/HEAD","status");q.Severity="Warning";q.HTML=true;q.Message="<span>"+p.jsonData.Result+'. Go to <a href="'+b.toUrl("git/git-status.html")+"#"+o+'">Git Status page</a>.<span>'}else if(p.error){o=r.HeadLocation.replace("commit/HEAD","status");q.Severity="Error";if(p.error.responseText&&JSON.parse(p.error.responseText)){p=JSON.parse(p.error.responseText);q.Message=p.DetailedMessage?p.DetailedMessage:p.Message}else q.Message=p.error.message;q.HTML=true;q.Message="<span>"+
q.Message+' Go to <a href="'+b.toUrl("git/git-status.html")+"#"+o+'">Git Status page</a>.<span>'}s.setProgressResult(q)},function(p,q){p=[];var o=r.HeadLocation.replace("commit/HEAD","status");p.Severity="Error";p.HTML=true;p.Message="<span>"+c.fromJson(q.xhr.responseText).DetailedMessage+'. Go to <a href="'+b.toUrl("git/git-status.html")+"#"+o+'">Git Status page</a>.<span>';h.getService("orion.page.message").setProgressResult(p)})},visibleWhen:function(n){return n.Type==="RemoteTrackingBranch"||
n.Type==="Branch"&&!n.Current}});j.addCommand(m,"dom");j.addCommand(m,"object");m=new a.Command({name:"Rebase",tooltip:"Rebase your commits by removing them from the active branch, starting the active branch again based on the latest state of the selected branch and applying each commit again to the updated active branch.",id:"eclipse.orion.git.rebase",imageClass:"git-sprite-rebase",spriteClass:"gitCommandSprite",callback:function(n){var r=n.items;h.getService("orion.git.provider").doRebase(r.HeadLocation,
r.Name,"BEGIN",function(s){var p=[],q=r.HeadLocation.replace("commit/HEAD","status");if(s.Result=="OK"||s.Result=="FAST_FORWARD"||s.Result=="UP_TO_DATE"){p.Severity="Ok";p.HTML=false;p.Message=s.Result;c.hitch(k,k.changedItem)(r)}else if(s.Result=="STOPPED"){p.Severity="Warning";p.HTML=true;p.Message="<span>"+s.Result+'. Some conflicts occurred. Please resolve them and continue, skip patch or abort rebasing. Go to <a href="'+b.toUrl("git/git-status.html")+"#"+q+'">Git Status page</a>.<span>'}else if(s.Result==
"FAILED_WRONG_REPOSITORY_STATE"){p.Severity="Error";p.HTML=true;p.Message="<span>"+s.Result+'. Repository state is invalid (i.e. already during rebasing). Go to <a href="'+b.toUrl("git/git-status.html")+"#"+q+'">Git Status page</a>.<span>'}else if(s.Result=="FAILED_UNMERGED_PATHS"){p.Severity="Error";p.HTML=true;p.Message="<span>"+s.Result+'. Repository contains unmerged paths. Go to <a href="'+b.toUrl("git/git-status.html")+"#"+q+'">Git Status page</a>.<span>'}else if(s.Result=="FAILED_PENDING_CHANGES"){p.Severity=
"Error";p.HTML=true;p.Message="<span>"+s.Result+'. Repository contains pending changes. Please commit or stash them. Go to <a href="'+b.toUrl("git/git-status.html")+"#"+q+'">Git Status page</a>.<span>'}else{p.Severity="Warning";p.HTML=true;p.Message="<span>"+s.Result+'. Go to <a href="'+b.toUrl("git/git-status.html")+"#"+q+'">Git Status page</a>.<span>'}h.getService("orion.page.message").setProgressResult(p)},l)},visibleWhen:function(n){this.tooltip="Rebase your commits by removing them from the active branch, starting the active branch again based on the latest state of '"+
n.Name+"' and applying each commit again to the updated active branch.";return n.Type==="RemoteTrackingBranch"||n.Type==="Branch"&&!n.Current}});j.addCommand(m,"dom");j.addCommand(m,"object");m=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(n){var r=n.items,s=c.hash();if(r.toRef)r=r.toRef;var p=function(o,t){if(o.JsonData.HostKey)q(t,
o.JsonData);else if(t){t.parameters=o.JsonData.User?new a.ParametersDescription([new a.CommandParameter("sshpassword","password","SSH Password:")],true):new a.ParametersDescription([new a.CommandParameter("sshuser","text","SSH User Name:"),new a.CommandParameter("sshpassword","password","SSH Password:")],true);t.parameters.errorData=o.JsonData;j._collectParameters(t)}else q(null,o.JsonData)},q=function(o,t){e.gatherSshCredentials(h,o,t).then(function(u){var w=h.getService("orion.git.provider");if(r.RemoteLocation.length==
1&&r.RemoteLocation[0].Children.length==1)w.doPush(r.RemoteLocation[0].Children[0].Location,"HEAD",true,false,null,"Pushing remote: "+s,u.gitSshUsername,u.gitSshPassword,u.knownHosts,u.gitPrivateKey,u.gitPassphrase).then(function(z){e.handleProgressServiceResponse2(z,h,function(){if(k.parentId==="explorer-tree"){if(!z||!z.HttpCode)c.query(".treeTableRow").forEach(function(E){c.toggleClass(E,"outgoingCommitsdRow",false)})}else c.hitch(k,k.changedItem)()},function(E){p(E,o)})},function(z){e.handleProgressServiceResponse2(z,
h,function(){},function(E){p(E,o)})});else{var x=new orion.git.widgets.RemotePrompterDialog({title:"Choose Branch",serviceRegistry:h,gitClient:w,treeRoot:{Children:r.RemoteLocation},hideNewBranch:true,func:c.hitch(this,function(z,E){w.doPush(z.Location,"HEAD",true,true,null,"Pushing remote: "+E.Name,u.gitSshUsername,u.gitSshPassword,u.knownHosts,u.gitPrivateKey,u.gitPassphrase).then(function(D){e.handleProgressServiceResponse2(D,h,function(){if(k.parentId==="explorer-tree"){if(!D||!D.HttpCode)c.query(".treeTableRow").forEach(function(F){c.toggleClass(F,
"outgoingCommitsdRow",false)})}else c.hitch(k,k.changedItem)()},function(F){p(F,o)})},function(D){e.handleProgressServiceResponse2(D,h,function(){},function(F){p(F,o)})})})});x.startup();x.show()}})};if(n.parameters&&n.parameters.optionsRequested){q(null,n.parameters.errorData);n.parameters.optionsRequested=false;n.parameters.errorData=null}else q(n)},visibleWhen:function(n){return n.toRef?n.RepositoryPath===""&&n.toRef.Type==="Branch"&&n.toRef.Current&&n.toRef.RemoteLocation:n.Type==="Branch"&&n.Current&&
n.RemoteLocation}});j.addCommand(m,"dom");j.addCommand(m,"object");m=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(n){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 r=n.items,s=c.hash();if(r.toRef)r=
r.toRef;var p=function(o,t){if(o.JsonData.HostKey)q(t,o.JsonData);else if(t){t.parameters=o.JsonData.User?new a.ParametersDescription([new a.CommandParameter("sshpassword","password","SSH Password:")],true):new a.ParametersDescription([new a.CommandParameter("sshuser","text","SSH User Name:"),new a.CommandParameter("sshpassword","password","SSH Password:")],true);t.parameters.errorData=o.JsonData;j._collectParameters(t)}else q(null,o.JsonData)},q=function(o,t){e.gatherSshCredentials(h,o,t).then(function(u){var w=
h.getService("orion.git.provider");if(r.RemoteLocation.length==1&&r.RemoteLocation[0].Children.length==1)w.doPush(r.RemoteLocation[0].Children[0].Location,"HEAD",true,true,null,"Pushing remote: "+s,u.gitSshUsername,u.gitSshPassword,u.knownHosts,u.gitPrivateKey,u.gitPassphrase).then(function(z){e.handleProgressServiceResponse2(z,h,function(){if(k.parentId==="explorer-tree"){if(!z||!z.HttpCode)c.query(".treeTableRow").forEach(function(E){c.toggleClass(E,"outgoingCommitsdRow",false)})}else c.hitch(k,
k.changedItem)()},function(E){p(E,o)})},function(z){e.handleProgressServiceResponse2(z,h,function(){},function(E){p(E,o)})});else{var x=new orion.git.widgets.RemotePrompterDialog({title:"Choose Branch",serviceRegistry:h,gitClient:w,treeRoot:{Children:r.RemoteLocation},hideNewBranch:true,func:c.hitch(this,function(z,E){w.doPush(z.Location,"HEAD",true,true,null,"Pushing remote: "+E.Name,u.gitSshUsername,u.gitSshPassword,u.knownHosts,u.gitPrivateKey,u.gitPassphrase).then(function(D){e.handleProgressServiceResponse2(D,
h,function(){if(k.parentId==="explorer-tree"){if(!D||!D.HttpCode)c.query(".treeTableRow").forEach(function(F){c.toggleClass(F,"outgoingCommitsdRow",false)})}else c.hitch(k,k.changedItem)()},function(F){p(F,o)})},function(D){e.handleProgressServiceResponse2(D,h,function(){},function(F){p(F,o)})})})});x.startup();x.show()}})};if(n.parameters&&n.parameters.optionsRequested){q(null,n.parameters.errorData);n.parameters.optionsRequested=false;n.parameters.errorData=null}else q(n)}},visibleWhen:function(n){if(n.toRef)return n.RepositoryPath===
""&&n.toRef.Type==="Branch"&&n.toRef.Current&&n.toRef.RemoteLocation}});j.addCommand(m,"dom");j.addCommand(m,"object");m=new a.Command({name:"Switch to Remote",tooltip:"Show the log for the corresponding remote tracking branch",id:"eclipse.orion.git.switchToRemote",hrefCallback:function(n){return b.toUrl("git/git-log.html")+"#"+n.items.toRef.RemoteLocation[0].Children[0].Location+"?page=1"},visibleWhen:function(n){return n.toRef!=null&&n.toRef.Type==="Branch"&&n.toRef.Current&&n.toRef.RemoteLocation&&
n.toRef.RemoteLocation.length===1&&n.toRef.RemoteLocation[0].Children.length===1}});j.addCommand(m,"dom");m=new a.Command({name:"< Previous Page",tooltip:"Show previous page of git log",id:"eclipse.orion.git.previousLogPage",hrefCallback:function(n){return b.toUrl("git/git-log.html")+"#"+n.items.PreviousLocation},visibleWhen:function(n){if(n.Type==="RemoteTrackingBranch"||n.toRef!=null&&n.toRef.Type==="Branch"||n.RepositoryPath!=null)return n.PreviousLocation!==undefined;return false}});j.addCommand(m,
"dom");m=new a.Command({name:"Next Page >",tooltip:"Show next page of git log",id:"eclipse.orion.git.nextLogPage",hrefCallback:function(n){return b.toUrl("git/git-log.html")+"#"+n.items.NextLocation},visibleWhen:function(n){if(n.Type==="RemoteTrackingBranch"||n.toRef!=null&&n.toRef.Type==="Branch"||n.RepositoryPath!=null)return n.NextLocation!==undefined;return false}});j.addCommand(m,"dom");m=new a.Command({name:"Switch to Active Local",tooltip:"Show the log for the active local branch",id:"eclipse.orion.git.switchToCurrentLocal",
hrefCallback:function(n){n=n.items;var r=new c.Deferred,s=n.CloneLocation;if(s==null)s=JSON.parse(n.responseText).JsonData.CloneLocation;var p=h.getService("orion.git.provider");c.xhrGet({url:s,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(q){p.getGitClone(q.Children[0].BranchLocation,function(o){c.forEach(o.Children,function(t){t.Current==true&&r.callback(b.toUrl("git/git-log.html")+"#"+t.CommitLocation+"?page=1")})})}});return r},visibleWhen:function(n){if(n.Type==="RemoteTrackingBranch")return true;
try{if(JSON.parse(n.responseText).JsonData)return true}catch(r){}return false}});j.addCommand(m,"dom");m=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(n){var r=n.items;n={};for(var s in r.parent.parent.children)if(r.parent.parent.children[s].Name==="Remote")n=r.parent.parent.children[s];s=h.getService("orion.git.provider");n=new orion.git.widgets.RemotePrompterDialog({title:"Choose Branch",
serviceRegistry:h,gitClient:s,treeRoot:n,func:c.hitch(this,function(p,q,o){console.info("Branch "+p+" remote "+q+" new branch "+o)})});n.startup();n.show()},visibleWhen:function(){return false}});j.addCommand(m,"dom");j.addCommand(m,"object");m=new a.Command({name:"Reset",tooltip:"Reset your active branch to the state of the selected branch. Discard all staged and unstaged changes.",id:"eclipse.orion.git.resetIndex",imageClass:"git-sprite-reset",spriteClass:"gitCommandSprite",callback:function(n){var r=
n.items;if(confirm("The content of your active branch will be replaced with "+r.Name+". All unstaged and staged changes will be discarded and cannot be recovered. Are you sure?")){n=h.getService("orion.git.provider");var s=h.getService("orion.page.message");s.setProgressMessage("Resetting index...");n.resetIndex(r.IndexLocation,r.Name).then(function(){var p={};p.Severity="Info";p.HTML=false;p.Message="Ok";c.hitch(k,k.changedItem)(r);s.setProgressResult(p)},function(p){var q={};q.Severity="Error";
q.HTML=false;q.Message=p.message;s.setProgressResult(q)})}},visibleWhen:function(n){return n.Type==="RemoteTrackingBranch"}});j.addCommand(m,"object");m=new a.ParametersDescription([new a.CommandParameter("name","text","Name:")],false);m=new a.Command({name:"Tag",tooltip:"Create a tag for the commit",imageClass:"git-sprite-tag",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.addTag",parameters:m,callback:function(n){var r=n.items,s=function(q,o){h.getService("orion.git.provider").doAddTag(q,
o).then(function(){c.hitch(k,k.changedItem)(r)},l)},p=r.Location;n.parameters.valueFor("name")&&!n.parameters.optionsRequested?s(p,n.parameters.valueFor("name")):e.getNewItemName(r,k,false,n.domNode.id,"Tag name",function(q){!q&&q==""||s(p,q)})},visibleWhen:function(n){return n.Type==="Commit"}});j.addCommand(m,"object");j.addCommand(m,"dom");m=new a.Command({name:"Delete",tooltip:"Delete the tag from the repository",imageClass:"core-sprite-delete",id:"eclipse.removeTag",callback:function(n){var r=
n.items;confirm("Are you sure you want to delete tag "+r.Name+"?")&&h.getService("orion.git.provider").doRemoveTag(r.Location).then(function(){c.hitch(k,k.changedItem)(r.parent)},l)},visibleWhen:function(n){return n.Type==="Tag"}});j.addCommand(m,"object");m=new a.Command({name:"Cherry-Pick",tooltip:"Apply the change introduced by the commit to your active branch",id:"eclipse.orion.git.cherryPick",imageClass:"git-sprite-cherry_pick",spriteClass:"gitCommandSprite",callback:function(n){var r=n.items,
s=c.hash(),p=h.getService("orion.git.provider");n=r.Location.replace(r.Name,"HEAD");p.doCherryPick(n,r.Name,function(q){var o=[],t=r.Location.replace("commit/"+r.Name,"status");if(q.Result=="OK"){o.Severity="Ok";if(q.HeadUpdated){o.HTML=false;o.Message=q.Result;k.parentId==="explorer-tree"&&c.xhrGet({url:s,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(u){return u},error:function(u,w){console.error("HTTP status code: ",w.xhr.status)}}).then(function(u){u.HeadLocation?p.getLog(u.HeadLocation,
u.Id,"Getting git incoming changes",function(w){k.renderer.setIncomingCommits(w.Children);k.loadCommitsList(u.CommitLocation+"?page=1",u,true)}):p.getLog(s,"HEAD","Getting git outgoing changes",function(w){k.renderer.setOutgoingCommits(w.Children);k.loadCommitsList(s,u,true)})})}else{o.HTML=true;o.Message="<span>Nothing changed.</span>"}}else if(q.Result=="CONFLICTING"){o.Severity="Warning";o.HTML=true;o.Message="<span>"+q.Result+'. Some conflicts occurred. Go to <a href="'+b.toUrl("git/git-status.html")+
"#"+t+'">Git Status page</a>.<span>'}else if(q.Result=="FAILED"){o.Severity="Error";o.HTML=true;o.Message="<span>"+q.Result+'. Go to <a href="'+b.toUrl("git/git-status.html")+"#"+t+'">Git Status page</a>.<span>'}else{o.Severity="Warning";o.HTML=false;o.Message=q.Result}h.getService("orion.page.message").setProgressResult(o)},l)},visibleWhen:function(n){return n.Type==="Commit"}});j.addCommand(m,"object");j.addCommand(m,"dom")};e.createStatusCommands=function(h,j,k,l,m){var n=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(r){var s=r.items.Location,p=h.getService("orion.git.provider");e.getDefaultSshOptions(h).then(function(q){var o=arguments.callee;p.doFetch(s,false,null,q.gitSshUsername,q.gitSshPassword,q.knownHosts,q.gitPrivateKey,q.gitPassphrase).then(function(t){e.handleProgressServiceResponse(t,q,h,function(){c.xhrGet({url:s,headers:{"Orion-Version":"1"},
postData:c.toJson({GitSshUsername:q.gitSshUsername,GitSshPassword:q.gitSshPassword,GitSshPrivateKey:q.gitPrivateKey,GitSshPassphrase:q.gitPassphrase,GitSshKnownHost:q.knownHosts}),handleAs:"json",timeout:5E3,load:function(u){return u},error:function(u,w){console.error("HTTP status code: ",w.xhr.status)}}).then(function(u){p.getLog(u.HeadLocation,u.Id,"Getting git incoming changes",function(w){m._gitCommitNavigatorRem.renderer.setIncomingCommits(w.Children);m._gitCommitNavigatorRem.loadCommitsList(u.CommitLocation+
"?page=1&pageSize=5",u,true)})})},o,"Fetch Git Repository")},function(t){e.handleProgressServiceResponse(t,q,h,function(){},o,"Fetch Git Repository")})})},visibleWhen:function(r){return r.Type==="RemoteTrackingBranch"}});j.addCommand(n,"object");j.addCommand(n,"dom");j.registerCommandContribution("eclipse.orion.git.fetch",l+1);n=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(r){r=r.items;var s=h.getService("orion.git.provider"),p=h.getService("orion.page.message");s.doMerge(r.HeadLocation,r.Name).then(function(q){var o=[];if(q.jsonData&&(q.jsonData.Result=="FAST_FORWARD"||q.jsonData.Result=="ALREADY_UP_TO_DATE")){c.query(".treeTableRow").forEach(function(t){c.toggleClass(t,"incomingCommitsdRow",false)});o.Severity="Ok";o.HTML=false;o.Message=q.jsonData.Result;k();p.setProgressResult(o)}else if(q.jsonData){o.Severity="Warning";o.HTML=true;o.Message="<span>"+
q.jsonData.Result+"<span>";p.setProgressResult(o)}else if(q.error){o.Severity="Error";if(q.error.responseText&&JSON.parse(q.error.responseText)){q=JSON.parse(q.error.responseText);o.Message=q.DetailedMessage?q.DetailedMessage:q.Message}else o.Message=q.error.message;o.HTML=true;o.Message="<span>"+o.Message+"<span>";p.setProgressResult(o)}},function(q,o){q=[];q.Severity="Error";q.HTML=true;q.Message="<span>"+c.fromJson(o.xhr.responseText).DetailedMessage+"</span>";p.setProgressResult(q)})},visibleWhen:function(r){return r.Type===
"RemoteTrackingBranch"||r.Type==="Branch"&&!r.Current}});j.addCommand(n,"object");j.addCommand(n,"dom");j.registerCommandContribution("eclipse.orion.git.merge",l+2);n=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(r){var s=r.items,p=c.hash(),q=h.getService("orion.git.provider");if(s.RemoteLocation.length==1&&s.RemoteLocation[0].Children.length==1)e.getDefaultSshOptions(h).then(function(o){var t=
arguments.callee;q.doPush(s.RemoteLocation[0].Children[0].Location,"HEAD",true,false,null,"Pushing remote: "+p,o.gitSshUsername,o.gitSshPassword,o.knownHosts,o.gitPrivateKey,o.gitPassphrase).then(function(u){e.handleProgressServiceResponse(u,o,h,function(w){if(!w||!w.HttpCode){c.query(".treeTableRow").forEach(function(x){c.toggleClass(x,"outgoingCommitsdRow",false)});k()}},t,"Push Git Repository")},function(u){e.handleProgressServiceResponse(u,o,h,function(){},t,"Push Git Repository")})});else{r=
new orion.git.widgets.RemotePrompterDialog({title:"Choose Branch",serviceRegistry:h,gitClient:q,treeRoot:{Children:s.RemoteLocation},hideNewBranch:true,func:c.hitch(this,function(o,t){e.getDefaultSshOptions(h).then(function(u){var w=arguments.callee;q.doPush(o.Location,"HEAD",true,false,null,"Pushing remote: "+t,u.gitSshUsername,u.gitSshPassword,u.knownHosts,u.gitPrivateKey,u.gitPassphrase).then(function(x){e.handleProgressServiceResponse(x,u,h,function(z){if(!z||!z.HttpCode){c.query(".treeTableRow").forEach(function(E){c.toggleClass(E,
"outgoingCommitsdRow",false)});k()}},w,"Push Git Repository")})},function(u){e.handleProgressServiceResponse(u,options,h,function(){},func,"Pushing remote: "+t)})})});r.startup();r.show()}},visibleWhen:function(r){return r.Type==="LocalBranch"}});j.addCommand(n,"object");j.addCommand(n,"dom");j.registerCommandContribution("eclipse.orion.git.push",l+3)};e.createGitClonesCommands=function(h,j,k,l,m,n){function r(p){if(!(p.status===401||p.status===403)){var q=[];q.Severity="Error";q.HTML=false;try{var o=
JSON.parse(p.responseText);q.Message=o.DetailedMessage?o.DetailedMessage:o.Message}catch(t){q.Message=p.message}h.getService("orion.page.message").setProgressResult(q)}}function s(p){if(c.isArray(p))p=p.length>1?{}:p[0];return p}l=new a.ParametersDescription([new a.CommandParameter("key","text","Key:"),new a.CommandParameter("value","text","Value:")],false);l=new a.Command({name:"New Configuration Entry",tooltip:"Add a new entry to the repository configuration",imageClass:"core-sprite-add",id:"eclipse.orion.git.addConfigEntryCommand",
parameters:l,callback:function(p){var q=p.items,o=h.getService("orion.git.provider");p.parameters.valueFor("key")&&p.parameters.valueFor("value")&&o.addCloneConfigurationProperty(q.ConfigLocation,p.parameters.valueFor("key"),p.parameters.valueFor("value")).then(function(){c.hitch(k,k.changedItem)(q)},r)}});j.addCommand(l,"dom");l=new a.ParametersDescription([new a.CommandParameter("value","text","Value:")],false);l=new a.Command({name:"Edit",tooltip:"Edit the configuration entry",imageClass:"core-sprite-edit",
id:"eclipse.orion.git.editConfigEntryCommand",parameters:l,callback:function(p){var q=p.items,o=h.getService("orion.git.provider");p.parameters.valueFor("value")&&o.editCloneConfigurationProperty(q.Location,p.parameters.valueFor("value")).then(function(){c.hitch(k,k.changedItem)(q)},r)},visibleWhen:function(p){return p.Key&&p.Value&&p.Location}});j.addCommand(l,"object");l=new a.Command({name:"Delete",tooltip:"Delete the configuration entry",imageClass:"core-sprite-delete",id:"eclipse.orion.git.deleteConfigEntryCommand",
callback:c.hitch(this,function(p){var q=p.items;p=h.getService("orion.git.provider");confirm("Are you sure you want to delete "+q.Key+"?")&&p.deleteCloneConfigurationProperty(q.Location).then(function(){c.hitch(k,k.changedItem)(q)},r)}),visibleWhen:function(p){return p.Key&&p.Value&&p.Location}});j.addCommand(l,"object");l=new a.ParametersDescription([new a.CommandParameter("url","url","Repository URL:")],true);l=new a.Command({name:"Clone Repository",tooltip:"Clone an existing Git repository to a folder",
id:"eclipse.cloneGitRepository",parameters:l,callback:function(p){var q=h.getService("orion.git.provider"),o=function(t,u,w){e.getDefaultSshOptions(h).then(function(x){var z=arguments.callee;q.cloneGitRepository(w,t,u,k.defaultPath,x.gitSshUsername,x.gitSshPassword,x.knownHosts,x.gitPrivateKey,x.gitPassphrase).then(function(E){e.handleProgressServiceResponse(E,x,h,function(){k.redisplayClonesList&&c.hitch(k,k.redisplayClonesList)()},z,"Clone Git Repository")},function(E){e.handleProgressServiceResponse(E,
x,h,function(){},z,"Clone Git Repository")})})};if(p.parameters.valueFor("url")&&!p.parameters.optionsRequested)o(p.parameters.valueFor("url"));else{p=new orion.git.widgets.CloneGitRepositoryDialog({serviceRegistry:h,fileClient:n,url:p.parameters.valueFor("url"),alwaysShowAdvanced:p.parameters.optionsRequested,func:o});p.startup();p.show()}},visibleWhen:function(){return true}});j.addCommand(l,"dom");l=new a.ParametersDescription([new a.CommandParameter("folderName","text","New folder:")],true);l=
new a.Command({name:"Init Repository",tooltip:"Create a new Git repository in a new folder",id:"eclipse.initGitRepository",parameters:l,callback:function(p){var q=h.getService("orion.git.provider"),o=function(t,u,w){e.getDefaultSshOptions(h).then(function(x){var z=arguments.callee;q.cloneGitRepository(w,t,u,k.defaultPath).then(function(E){e.handleProgressServiceResponse(E,x,h,function(){k.redisplayClonesList&&c.hitch(k,k.redisplayClonesList)()},z,"Init Git Repository")},function(E){e.handleProgressServiceResponse(E,
x,h,function(){},z,"Init Git Repository")})})};if(p.parameters.valueFor("folderName")&&!p.parameters.optionsRequested)o(null,null,p.parameters.valueFor("folderName"));else{p=new orion.git.widgets.CloneGitRepositoryDialog({serviceRegistry:h,title:"Init Git Repository",fileClient:n,advancedOnly:true,func:o});p.startup();p.show()}},visibleWhen:function(){return true}});j.addCommand(l,"dom");l=new a.Command({name:"Delete",tooltip:"Delete the repository",imageClass:"core-sprite-delete",id:"eclipse.git.deleteClone",
visibleWhen:function(p){p=c.isArray(p)?p:[p];if(p.length===0)return false;for(var q=0;q<p.length;q++)if(!p[q].ContentLocation)return false;return true},callback:function(p){var q=p.items;p=h.getService("orion.git.provider");if(c.isArray(q)){if(confirm("Are you sure you want do delete "+q.length+" repositories?"))for(var o=0,t=0;t<q.length;t++)p.removeGitRepository(q[t].Location).then(function(){o++;o>=q.length&&k.redisplayClonesList&&c.hitch(k,k.redisplayClonesList)()},r)}else confirm("Are you sure you want to delete "+
q.Name+"?")&&p.removeGitRepository(q.Location).then(function(){k.redisplayClonesList&&c.hitch(k,k.redisplayClonesList)()},this.displayErrorOnStatus)}});j.addCommand(l,"object");j.addCommand(l,"dom");l=new a.Command({name:"Apply Patch",tooltip:"Apply a patch on the selected repository",id:"eclipse.orion.git.applyPatch",imageClass:"git-sprite-apply_patch",spriteClass:"gitCommandSprite",callback:function(p){p=s(p.items);p=new orion.git.widgets.ApplyPatchDialog({title:"Apply Patch",diffLocation:p.DiffLocation});
p.startup();p.show()},visibleWhen:function(p){return p.Type==="Clone"}});j.addCommand(l,"object");l=new a.ParametersDescription([new a.CommandParameter("commitName","text","Commit name:")],true);l=new a.Command({name:"Open Commit",tooltip:"Open the commit with the given name",id:"eclipse.orion.git.openCommitCommand",imageClass:"git-sprite-apply_patch",spriteClass:"gitCommandSprite",parameters:l,callback:function(p){var q=function(u,w,x){if(x==null)x=new c.Deferred;u.length>0?h.getService("orion.git.provider").doGitLog("/gitapi/commit/"+
p.parameters.valueFor("commitName")+u[0].ContentLocation+"?page=1&pageSize=1",null,null,"Looking for the commit").then(function(z){x.callback(z.Children[0].Location)},function(){q(u.slice(1),w,x)}):x.errback();return x},o=function(u){if(p.parameters.optionsRequested)(new orion.git.widgets.OpenCommitDialog({repositories:u,serviceRegistry:h,commitName:p.parameters.valueFor("commitName")})).show();else{h.getService("orion.page.message").setProgressMessage("Looking for the commit");q(u,p.parameters.valueFor("commitName")).then(function(w){w!==
null&&window.open("/git/git-commit.html#"+w+"?page=1&pageSize=1")},function(){var w=[];w.Severity="warning";w.HTML=false;w.Message="No commits found";h.getService("orion.page.message").setProgressResult(w)})}};if(p.items.Type==="Clone"){var t=[p.items];o(t)}else if(p.items.CloneLocation)h.getService("orion.git.provider").getGitClone(p.items.CloneLocation).then(function(u){o(u.Children)});else{t=p.items;o(t)}},visibleWhen:function(p){return p.Type==="Clone"||p.CloneLocation||p.length>1&&p[0].Type===
"Clone"}});j.addCommand(l,"dom");l=new a.Command({name:"Show in GitHub",tooltip:"Show this repository at GitHub",id:"orion.git.gotoGithub",hrefCallback:function(p){p=/github\.com.*\.git/.exec(p.items.GitUrl)[0];p=p.replace(":","/");return"https://"+p.substring(0,p.length-4)},visibleWhen:function(p){return p.GitUrl&&/github\.com.*\.git/.exec(p.GitUrl)}});j.addCommand(l,"dom");l=new a.Command({name:"Show in eclipse.org",tooltip:"Show this repository at eclipse.org",id:"orion.git.gotoEclipseGit",hrefCallback:function(p){p=
p.items;var q=p.GitUrl.indexOf("git.eclipse.org/gitroot");if(q>-1)return"http://git.eclipse.org/c"+p.GitUrl.substr(q+23,p.GitUrl.length)},visibleWhen:function(p){return p.GitUrl&&p.GitUrl.indexOf("git.eclipse.org/gitroot")>-1}});j.addCommand(l,"dom")}})();return e});
define("dojox/layout/ToggleSplitter",["dojo","dijit","dijit/layout/BorderContainer"],function(b,c){b.declare("dojox.layout.ToggleSplitter",[c.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;b.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,d=b.style(a,this.horizontal?"height":"width");b.forEach(["toggleSplitterOpen","toggleSplitterClosedThreshold","toggleSplitterOpenSize"],function(e){var f=e.substring(14);f=f.charAt(0).toLowerCase()+f.substring(1);if(e in this.child)this[f]=this.child[e]},
this);if(!this.openSize)this.openSize=this.open?d+"px":"75px";this._openStyleProps=this._getStyleProps(a,true);this._started=true;this.set("open",this.open);return this},_onMouseUp:function(){b.disconnect(this._onMoveHandle);b.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){b.disconnect(this._onMoveHandle);this._startDrag(a)}},_onMouseDown:function(a){if(this.open){if(!this._onUpHandle)this._onUpHandle=
b.connect(b.body(),"onmouseup",this,"_onMouseUp");if(!this._onMoveHandle){this._startPosn=this.horizontal?a.clientY:a.clientX;this._onMoveHandle=b.connect(b.body(),"onmousemove",this,"_onPrelimMouseMove")}}},_handleOnChange:function(){var a=this.child.domNode,d;d=this.horizontal?"height":"width";if(this.open){var e=b.mixin({display:"block",overflow:"auto",visibility:"visible"},this._openStyleProps);e[d]=this._openStyleProps&&this._openStyleProps[d]?this._openStyleProps[d]:this.openSize;b.style(a,
e);this.connect(this.domNode,"onmousedown","_onMouseDown")}else{e=b.getComputedStyle(a);d=this._getStyleProps(a,true,e);e=this._getStyleProps(a,false,e);this._openStyleProps=d;b.style(a,e)}this._setStateClass();this.container._started&&this.container._layoutChildren(this.region)},_getStyleProps:function(a,d,e){e||(e=b.getComputedStyle(a));var f={},g=this.horizontal?"height":"width";f.visibility=d?e.visibility:"hidden";f[g]=d?a.style[g]||e[g]:this._closedSize;var h=["Top","Right","Bottom","Left"];
b.forEach(["padding","margin","border"],function(j){for(var k=0;k<h.length;k++){var l=j+h[k];if(j=="border")j+="Width";if(undefined!==e[l])f[l]=d?e[l]:0}});return f},_setStateClass:function(){if(this.open){b.removeClass(this.domNode,"dojoxToggleSplitterClosed");b.addClass(this.domNode,"dojoxToggleSplitterOpen");b.removeClass(this.toggleNode,"dojoxToggleSplitterIconClosed");b.addClass(this.toggleNode,"dojoxToggleSplitterIconOpen")}else{b.addClass(this.domNode,"dojoxToggleSplitterClosed");b.removeClass(this.domNode,
"dojoxToggleSplitterOpen");b.addClass(this.toggleNode,"dojoxToggleSplitterIconClosed");b.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&&b.stopEvent(a);this.set("open",!this.open)},_onKeyPress:function(){this.inherited(arguments)}});b.extend(c._Widget,{toggleSplitterOpen:true,toggleSplitterClosedThreshold:5,
toggleSplitterOpenSize:""})});
define("orion/widgets/eWebBorderContainer",["dojo","dijit","dijit/layout/BorderContainer","dojox/layout/ToggleSplitter"],function(b,c){b.declare("orion.widgets.eWebBorderContainer",c.layout.BorderContainer,{_splitterClass:"orion.widgets.eWebSplitter",getPreferredLeftPaneWidth:function(){var a=this.getSizeCookie();return a<=0?b.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(),d=0;d<a.length;d++)if(a[d].region&&(a[d].region==="leading"||a[d].region==="left"))return this._left=a[d].domNode},getHidingPane:function(){return this.getLeftPane()},getRightPane:function(){if(this._center)return this._center;for(var a=this.getChildren(),d=0;d<a.length;d++)if(a[d].region&&a[d].region==="center")return this._center=a[d].domNode},getSizeCookie:function(){var a=this.getSplitter("left");if(a)return a.getSizeCookie();return 0},setSizeCookie:function(a){var d=this.getSplitter("left");
if(d)return d.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(),d=0;d<a.length;d++)if(a[d].region&&a[d].region==="center")this._center=a[d].domNode;else if(a[d].region&&(a[d].region==="leading"||a[d].region==="left"))this._left=a[d].domNode;var e=this._left,f=this._center,g=b.position(e).w,h=this.isLeftPaneOpen(),
j;j=h?0:this.getPreferredLeftPaneWidth();h||this.toggleLeftPaneState();var k=e.style.overflow,l=f.style.overflow;(new b.Animation({node:e,duration:300,curve:[1,100],onAnimate:b.hitch(this,function(m){e.style.width=g+(j-g)*m/100+"px";e.style.overflow="hidden";f.style.overflow="hidden";this.layout()}),onEnd:b.hitch(this,function(){f.style.overflow=l;e.style.overflow=k;this.toggleCallback&&this.toggleCallback.apply();h?this.toggleLeftPaneState():this.setSizeCookie(null)})})).play()}});b.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=b.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,d;d=this.horizontal?"height":"width";if(this.open){var e=b.mixin({display:"block",visibility:"visible"},this._openStyleProps);e[d]=this._openStyleProps&&this._openStyleProps[d]?this._openStyleProps[d]:this.openSize;b.style(a,
e);this.connect(this.domNode,"onmousedown","_onMouseDown")}else{e=b.getComputedStyle(a);d=this._getStyleProps(a,true,e);e=this._getStyleProps(a,false,e);this._openStyleProps=d;b.style(a,e)}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){b.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=b.cookie(this._cookieName);if(a)return parseInt(a.replace("px",""),10)}return 0},setSizeCookie:function(){if(this.container.persist)b.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)b.cookie(this._openStateCookieName,this.open?"true":"false",{expires:365})}});b.declare("orion.widgets.eWebBorderContainerReverse",c.layout.BorderContainer,{_splitterClass:"orion.widgets.eWebSplitter",getPreferredRightPaneWidth:function(){var a=this.getSizeCookie();
return a<=0?b.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(),d=0;d<a.length;d++)if(a[d].region&&(a[d].region==="trailing"||a[d].region==="right"))return this._right=a[d].domNode},getHidingPane:function(){return this.getRightPane()},getLeftPane:function(){if(this._center)return this._center;for(var a=this.getChildren(),d=0;d<a.length;d++)if(a[d].region&&
a[d].region==="center")return this._center=a[d].domNode},getSizeCookie:function(){var a=this.getSplitter("right");if(a)return a.getSizeCookie();return 0},setSizeCookie:function(a){var d=this.getSplitter("right");if(d)return d.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(),d=0;d<a.length;d++)if(a[d].region&&
a[d].region==="center")this._center=a[d].domNode;else if(a[d].region&&(a[d].region==="trailing"||a[d].region==="right"))this._right=a[d].domNode;var e=this._right,f=this._center,g=b.position(e).w,h=this.isRightPaneOpen(),j;j=h?0:this.getPreferredRightPaneWidth();h||this.toggleRightPaneState();var k=e.style.overflow,l=f.style.overflow;(new b.Animation({node:e,duration:300,curve:[1,100],onAnimate:b.hitch(this,function(m){e.style.width=g+(j-g)*m/100+"px";e.style.overflow="hidden";f.style.overflow="hidden";
this.layout()}),onEnd:b.hitch(this,function(){f.style.overflow=l;e.style.overflow=k;this.toggleCallback&&this.toggleCallback.apply();h?this.toggleRightPaneState():this.setSizeCookie(null)})})).play()}})});
define("git/git-clone",["dojo","orion/bootstrap","orion/status","orion/progress","orion/commands","orion/PageUtil","orion/dialogs","orion/selection","orion/fileClient","orion/operationsClient","orion/searchClient","orion/globalCommands","orion/git/gitClient","orion/ssh/sshTools","orion/git/git-clone-details","orion/git/git-clones-explorer","orion/git/gitCommands","dojo/parser","dojo/hash","dijit/layout/BorderContainer","dijit/layout/ContentPane","orion/widgets/eWebBorderContainer"],function(b,c,a,
d,e,f,g,h,j,k,l,m,n,r,s,p,q){function o(){var t=dijit.byId("eclipse.git-clones");t.isRightPaneOpen()&&t.toggle();window.document.onkeydown=function(u){u=u||window.event;var w=false;if(u.ctrlKey&&u.keyCode===79){t.toggle();w=true}if(w)if(window.document.all)u.keyCode=0;else{u.preventDefault();u.stopPropagation()}}}c.startup().then(function(t){var u=t.serviceRegistry;t=t.preferences;document.body.style.visibility="visible";b.parser.parse();var w=new k.OperationsClient(u);new a.StatusReportingService(u,
w,"statusPane","notifications","notificationArea");new d.ProgressService(u,w);new g.DialogService(u);new h.Selection(u);new r.SshService(u);var x=new e.CommandService({serviceRegistry:u});new n.GitService(u);var z=new j.FileClient(u);w=new l.Searcher({serviceRegistry:u,commandService:x,fileService:z});var E=new s.CloneDetails({parent:"cloneDetailsPane",serviceRegistry:u,detailsPane:dijit.byId("eclipse.git-clones")}),D=new p.GitClonesExplorer(u,null,E,"clonesList","pageActions");m.generateBanner("banner",
u,x,t,w,D);z=new j.FileClient(u,function(F){return(F=F.getProperty("pattern"))&&F.indexOf("/")===0});z.loadWorkspace().then(function(F){D.setDefaultPath(F.Location);q.createFileCommands(u,x,D,"pageActions","selectionTools");q.createGitClonesCommands(u,x,D,"pageActions","selectionTools",z);x.addCommandGroup("eclipse.gitGroup",100,null,null,"pageActions");x.registerCommandContribution("eclipse.cloneGitRepository",100,"pageActions","eclipse.gitGroup",false,null,new e.URLBinding("cloneGitRepository",
"url"));x.registerCommandContribution("eclipse.initGitRepository",101,"pageActions","eclipse.gitGroup");x.addCommandGroup("eclipse.selectionGroup",500,"More actions",null,"selectionTools");x.registerCommandContribution("eclipse.git.deleteClone",1,"selectionTools","eclipse.selectionGroup");x.addCommandGroup("eclipse.gitGroup2",1E3,"*");x.addCommandGroup("eclipse.gitGroup2.u1",2E3,null,"eclipse.gitGroup2");x.addCommandGroup("eclipse.gitGroup2.delete",3E3,null,"eclipse.gitGroup2");x.registerCommandContribution("eclipse.openGitStatus",
100);x.registerCommandContribution("eclipse.openGitLogAll",200);x.registerCommandContribution("eclipse.orion.git.pull",250);x.registerCommandContribution("eclipse.openCloneContent",300,null,"eclipse.gitGroup2");x.registerCommandContribution("eclipse.orion.git.applyPatch",350,null,"eclipse.gitGroup2/eclipse.gitGroup2.u1");x.registerCommandContribution("eclipse.git.deleteClone",400,null,"eclipse.gitGroup2/eclipse.gitGroup2.delete");x.registerCommandContribution("eclipse.addRemote",100);x.registerCommandContribution("eclipse.removeRemote",
400,null,"eclipse.gitGroup2/eclipse.gitGroup2.delete");x.registerCommandContribution("eclipse.addBranch",100);x.registerCommandContribution("eclipse.openGitLog",200);x.registerCommandContribution("eclipse.orion.git.fetch",201);x.registerCommandContribution("eclipse.orion.git.merge",202);x.registerCommandContribution("eclipse.checkoutBranch",301,null,"eclipse.gitGroup2/eclipse.gitGroup2.u1");x.registerCommandContribution("eclipse.orion.git.rebase",302,null,"eclipse.gitGroup2/eclipse.gitGroup2.u1");
x.registerCommandContribution("eclipse.orion.git.push",303,null,"eclipse.gitGroup2/eclipse.gitGroup2.u1");x.registerCommandContribution("eclipse.orion.git.pushto",304,null,"eclipse.gitGroup2/eclipse.gitGroup2.u1");x.registerCommandContribution("eclipse.orion.git.resetIndex",305,null,"eclipse.gitGroup2/eclipse.gitGroup2.u1");x.registerCommandContribution("eclipse.removeBranch",400,null,"eclipse.gitGroup2/eclipse.gitGroup2.delete");x.registerCommandContribution("eclipse.removeRemoteBranch",400,null,
"eclipse.gitGroup2/eclipse.gitGroup2.delete");x.registerCommandContribution("eclipse.checkoutTag",100);q.updateNavTools(u,D,"pageActions","selectionTools",{});x.processURL(window.location.href);var I=f.matchResourceParameters();D.displayClonesList(I.resource);b.subscribe("/dojo/hashchange",D,function(){I=f.matchResourceParameters();D.displayClonesList(I.resource)})});o(navigator)})});