/*

 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) 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) 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, 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 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) 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, 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) 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) 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
*/
(function(){function c(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,i;i=f[g++];)console[i]||function(){var q=i+"";console[q]="log"in console?function(){var r=Array.apply({},arguments);r.unshift(q+":");console.log(r.join(" "))}:function(){};console[q]._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 h in f)j.config[h]=f[h];a.locale=j.config.locale;h="$Rev: 24595 $".match(/\d+/);a.version=
{major:1,minor:6,patch:1,flag:"",revision:h?+h[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 k,l,m={};for(g in{toString:1}){k=[];break}a._extraNames=k=k||["hasOwnProperty","valueOf","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","constructor"];l=k.length;a._mixin=function(q,r){var n,o,p;for(n in r){o=r[n];
if(!(n in q)||q[n]!==o&&(!(n in m)||m[n]!==o))q[n]=o}if(l&&r)for(p=0;p<l;++p){n=k[p];o=r[n];if(!(n in q)||q[n]!==o&&(!(n in m)||m[n]!==o))q[n]=o}return q};a.mixin=function(q){q||(q={});for(var r=1,n=arguments.length;r<n;r++)j._mixin(q,arguments[r]);return q};a._getProp=function(q,r,n){n=n||j.global;for(var o=0,p;n&&(p=q[o]);o++){if(o==0&&j._scopeMap[p])p=j._scopeMap[p];n=p in n?n[p]:r?(n[p]={}):undefined}return n};a.setObject=function(q,r,n){var o=q.split(".");q=o.pop();return(n=j._getProp(o,true,
n))&&q?(n[q]=r):undefined};a.getObject=function(q,r,n){return j._getProp(q.split("."),r,n)};a.exists=function(q,r){return j.getObject(q,false,r)!==undefined};a.eval=function(q){return j.global.eval?j.global.eval(q):eval(q)};j.deprecated=j.experimental=function(){}})();return{dojo:a,dijit:d,dojox:e}}if(this.define)define("dojo/_base/_loader/bootstrap",[],function(){var a=c();a.dojo._dijit=a.dijit;a.dojo._dojox=a.dojox;return a.dojo});else{var b=c();dojo=b.dojo;dijit=b.dijit;dojox=b.dojox}})();
define("dojo/lib/backCompat",["require","dojo/_base/_loader/bootstrap"],function(c,b){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++];b[e]=function(q){return function(){console.warn("dojo."+q+" not available when using an AMD loader.")}}(e)}var f=function(q){var r=[],n;for(n=0;n<q.length;)r.push(q[n++]);
return r},g=function(q,r){return r?typeof r=="string"?function(){q[r]()}:function(){r.call(q)}:q};b.ready=b.addOnLoad=function(q,r){c.ready(r?g(q,r):q)};b.addOnLoad(function(){b.postLoad=b.config.afterOnLoad=true});if(a=b.config.addOnLoad)b.addOnLoad[a instanceof Array?"apply":"call"](b,a);var i=b._loaders=[],j=function(){var q=i.slice(0);for(Array.prototype.splice.apply(i,[0,i.length]);q.length;)q.shift().call()};i.unshift=function(){Array.prototype.unshift.apply(i,f(arguments));c.ready(j)};i.splice=
function(){Array.prototype.splice.apply(i,f(arguments));c.ready(j)};var h=b._unloaders=[];b.unloaded=function(){for(;h.length;)h.pop().call()};b._onto=function(q,r,n){q.push(n?g(r,n):r)};b._modulesLoaded=function(){};b.loadInit=function(q){q()};var k=function(q){return q.replace(/\./g,"/")};b.getL10nName=function(q,r,n){n=n?n.toLowerCase():b.locale;q="i18n!"+k(q);return/root/i.test(n)?q+"/nls/"+r:q+"/nls/"+n+"/"+r};b.requireLocalization=function(q,r,n){if(c.vendor!="altoviso.com")n=!n||n.toLowerCase()===
b.locale?"root":n;return c(b.getL10nName(q,r,n))};b.i18n={getLocalization:b.requireLocalization,normalizeLocale:function(q){q=q?q.toLowerCase():b.locale;if(q=="root")q="ROOT";return q}};var l=/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/,m=/^((([^\[:]+):)?([^@]+)@)?(\[([^\]]+)\]|([^\[:]*))(:([0-9]+))?$/;b._Url=function(){for(var q=arguments,r=[q[0]],n=1;n<q.length;n++)if(q[n]){var o=new b._Url(q[n]+"");r=new b._Url(r[0]+"");if(o.path==""&&!o.scheme&&!o.authority&&!o.query){if(o.fragment!=
null)r.fragment=o.fragment;o=r}else if(!o.scheme){o.scheme=r.scheme;if(!o.authority){o.authority=r.authority;if(o.path.charAt(0)!="/"){r=(r.path.substring(0,r.path.lastIndexOf("/")+1)+o.path).split("/");for(var p=0;p<r.length;p++)if(r[p]==".")if(p==r.length-1)r[p]="";else{r.splice(p,1);p--}else if(p>0&&!(p==1&&r[0]=="")&&r[p]==".."&&r[p-1]!="..")if(p==r.length-1){r.splice(p,1);r[p-1]=""}else{r.splice(p-1,2);p-=2}o.path=r.join("/")}}}r=[];o.scheme&&r.push(o.scheme,":");o.authority&&r.push("//",o.authority);
r.push(o.path);o.query&&r.push("?",o.query);o.fragment&&r.push("#",o.fragment)}this.uri=r.join("");n=this.uri.match(l);this.scheme=n[2]||(n[1]?"":null);this.authority=n[4]||(n[3]?"":null);this.path=n[5];this.query=n[7]||(n[6]?"":null);this.fragment=n[9]||(n[8]?"":null);if(this.authority!=null){n=this.authority.match(m);this.user=n[3]||null;this.password=n[4]||null;this.host=n[6]||n[7];this.port=n[9]||null}};b._Url.prototype.toString=function(){return this.uri};b.moduleUrl=function(q,r){if(!q)return null;
q=k(q)+(r?"/"+r:"");r="";var n=q.match(/(.+)(\.[^\/]*)$/);if(n){q=n[1];r=n[2]}return new b._Url(c.nameToUrl(q,r))};return b});
define("dojo/_base/_loader/hostenv_browser",["dojo/lib/backCompat"],function(c){if(typeof window!="undefined"){c.isBrowser=true;c._name="browser";(function(){var a=c;if(document&&document.getElementsByTagName)for(var 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 i=g.match(e);if(i){if(!a.config.baseUrl)a.config.baseUrl=g.substring(0,i.index);if(d=d[f].getAttribute("djConfig")||d[f].getAttribute("data-dojo-config")){d=
eval("({ "+d+" })");for(var j in d)c.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))&&!c.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(c.isIE&&window.location.protocol==="file:")c.config.ieForceActiveXXhr=true;a.isQuirks=document.compatMode=="BackCompat";a.locale=
c.config.locale||(a.isIE?j.userLanguage:j.language).toLowerCase();a._XMLHTTP_PROGIDS=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"];a._xhrObj=function(){var n,o;if(!c.isIE||!c.config.ieForceActiveXXhr)try{n=new XMLHttpRequest}catch(p){}if(!n)for(var s=0;s<3;++s){var t=a._XMLHTTP_PROGIDS[s];try{n=new ActiveXObject(t)}catch(v){o=v}if(n){a._XMLHTTP_PROGIDS=[t];break}}if(!n)throw new Error("XMLHTTP not available: "+o);return n};a._isDocumentOk=function(n){n=n.status||0;var o=location.protocol;
return n>=200&&n<300||n==304||n==1223||!n&&(o=="file:"||o=="chrome:"||o=="chrome-extension:"||o=="app:")};var h=window.location+"";var k=(j=document.getElementsByTagName("base"))&&j.length>0;a._getText=function(n,o){var p=a._xhrObj();if(!k&&c._Url)n=(new c._Url(h,n)).toString();if(a.config.cacheBust){n+="";n+=(n.indexOf("?")==-1?"?":"&")+String(a.config.cacheBust).replace(/\W+/g,"")}p.open("GET",n,false);try{p.send(null);if(!a._isDocumentOk(p)){var s=Error("Unable to load "+n+" status:"+p.status);
s.status=p.status;s.responseText=p.responseText;throw s;}}catch(t){if(o)return null;throw t;}return p.responseText};var l=window,m=function(n,o){var p=l.attachEvent||l.addEventListener;n=l.attachEvent?n:n.substring(2);p(n,function(){o.apply(l,arguments)},false)};a._windowUnloaders=[];a.windowUnloaded=function(){for(var n=a._windowUnloaders;n.length;)n.pop()();a=null};var q=0;a.addOnWindowUnload=function(n,o){a._onto(a._windowUnloaders,n,o);if(!q){q=1;m("onunload",a.windowUnloaded)}};var r=0;a.addOnUnload=
function(n,o){a._onto(a._unloaders,n,o);if(!r){r=1;m("onbeforeunload",c.unloaded)}}})();c._initFired=false;c._loadInit=function(){if(c._scrollIntervalId){clearInterval(c._scrollIntervalId);c._scrollIntervalId=0}if(!c._initFired){c._initFired=true;!c.config.afterOnLoad&&window.detachEvent&&window.detachEvent("onload",c._loadInit);c._inFlightCount==0&&c._modulesLoaded()}};if(!c.config.afterOnLoad)if(document.addEventListener){document.addEventListener("DOMContentLoaded",c._loadInit,false);window.addEventListener("load",
c._loadInit,false)}else if(window.attachEvent){window.attachEvent("onload",c._loadInit);if(!c.config.skipIeDomLoaded&&self===self.top)c._scrollIntervalId=setInterval(function(){try{if(document.body){document.documentElement.doScroll("left");c._loadInit()}}catch(a){}},30)}if(c.isIE)try{(function(){document.namespaces.add("v","urn:schemas-microsoft-com:vml");var a=["*","group","roundrect","oval","shape","rect","imagedata","path","textpath","text"],d=0,e=1,f=document.createStyleSheet();if(c.isIE>=8){d=
1;e=a.length}for(;d<e;++d)f.addRule("v\\:"+a[d],"behavior:url(#default#VML); display:inline-block")})()}catch(b){}}(function(){var a=c.config.modulePaths;if(a)for(var d in a)c.registerModulePath(d,a[d])})();c.config.isDebug&&c.require("dojo._firebug.firebug");if(c.config.debugAtAllCosts){c.require("dojo._base._loader.loader_debug");c.require("dojo.i18n")}return c});define("dojo/lib/kernel",["dojo/_base/_loader/hostenv_browser"],function(c){return dojo=c});
define("dojo/_base/lang",["dojo/lib/kernel"],function(c){(function(){var b=Object.prototype.toString;c.isString=function(j){return typeof j=="string"||j instanceof String};c.isArray=function(j){return j&&(j instanceof Array||typeof j=="array")};c.isFunction=function(j){return b.call(j)==="[object Function]"};c.isObject=function(j){return j!==undefined&&(j===null||typeof j=="object"||c.isArray(j)||c.isFunction(j))};c.isArrayLike=function(j){return j&&j!==undefined&&!c.isString(j)&&!c.isFunction(j)&&
!(j.tagName&&j.tagName.toLowerCase()=="form")&&(c.isArray(j)||isFinite(j.length))};c.isAlien=function(j){return j&&!c.isFunction(j)&&/\{\s*\[native code\]\s*\}/.test(String(j))};c.extend=function(j){for(var h=1,k=arguments.length;h<k;h++)c._mixin(j.prototype,arguments[h]);return j};c._hitchArgs=function(j,h){var k=c._toArray(arguments,2),l=c.isString(h);return function(){var m=c._toArray(arguments),q=l?(j||c.global)[h]:h;return q&&q.apply(j||this,k.concat(m))}};c.hitch=function(j,h){if(arguments.length>
2)return c._hitchArgs.apply(c,arguments);if(!h){h=j;j=null}if(c.isString(h)){j=j||c.global;if(!j[h])throw['dojo.hitch: scope["',h,'"] is null (scope="',j,'")'].join("");return function(){return j[h].apply(j,arguments||[])}}return!j?h:function(){return h.apply(j,arguments||[])}};c.delegate=c._delegate=function(){function j(){}return function(h,k){j.prototype=h;h=new j;j.prototype=null;k&&c._mixin(h,k);return h}}();var a=function(j,h,k){return(k||[]).concat(Array.prototype.slice.call(j,h||0))},d=function(j,
h,k){k=k||[];for(h=h||0;h<j.length;h++)k.push(j[h]);return k};c._toArray=c.isIE?function(j){return(j.item?d:a).apply(this,arguments)}:a;c.partial=function(){return c.hitch.apply(c,[null].concat(c._toArray(arguments)))};var e=c._extraNames,f=e.length,g={};c.clone=function(j){if(!j||typeof j!="object"||c.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 h,k,l,m;if(c.isArray(j)){h=
[];k=0;for(l=j.length;k<l;++k)k in j&&h.push(c.clone(j[k]))}else h=j.constructor?new j.constructor:{};for(m in j){l=j[m];if(!(m in h)||h[m]!==l&&(!(m in g)||g[m]!==l))h[m]=c.clone(l)}if(f)for(k=0;k<f;++k){m=e[k];l=j[m];if(!(m in h)||h[m]!==l&&(!(m in g)||g[m]!==l))h[m]=l}return h};c.trim=String.prototype.trim?function(j){return j.trim()}:function(j){return j.replace(/^\s\s*/,"").replace(/\s\s*$/,"")};var i=/\{([^\}]+)\}/g;c.replace=function(j,h,k){return j.replace(k||i,c.isFunction(h)?h:function(l,
m){return c.getObject(m,false,h)})}})();return c});
define("dojo/_base/array",["dojo/lib/kernel","dojo/_base/lang"],function(c){(function(){var b=function(d,e,f){return[typeof d=="string"?d.split(""):d,e||c.global,typeof f=="string"?new Function("item","index","array",f):f]},a=function(d,e,f,g){var i=b(e,g,f);e=i[0];f=0;for(g=e.length;f<g;++f){var j=!!i[2].call(i[1],e[f],f,e);if(d^j)return j}return d};c.mixin(c,{indexOf:function(d,e,f,g){var i=1,j=d.length||0,h=0;if(g){h=j-1;i=j=-1}if(f!=undefined)h=f;if(g&&h>j||h<j)for(;h!=j;h+=i)if(d[h]==e)return h;
return-1},lastIndexOf:function(d,e,f){return c.indexOf(d,e,f,true)},forEach:function(d,e,f){if(d&&d.length){var g=b(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 i=b(d,f,e);d=i[0];e=g?new g:[];f=0;for(g=d.length;f<g;++f)e.push(i[2].call(i[1],d[f],f,d));return e},filter:function(d,e,f){var g=b(d,f,e);d=g[0];e=[];f=0;for(var i=d.length;f<i;++f)g[2].call(g[1],d[f],f,
d)&&e.push(d[f]);return e}})})();return c});
define("dojo/_base/declare",["dojo/lib/kernel","dojo/_base/lang","dojo/_base/array"],function(c){(function(){function b(y,C){throw new Error("declare"+(C?" "+C:"")+": "+y);}function a(y,C){for(var D=[],E=[{cls:0,refs:[]}],F={},I=1,G=y.length,N=0,L,T,R,Z,M;N<G;++N){if(L=y[N])s.call(L)!="[object Function]"&&b("mixin #"+N+" is not a callable constructor.",C);else b("mixin #"+N+" is unknown. Did you use dojo.require to pull it in?",C);T=L._meta?L._meta.bases:[L];R=0;for(L=T.length-1;L>=0;--L){Z=T[L].prototype;
if(!Z.hasOwnProperty("declaredClass"))Z.declaredClass="uniqName_"+v++;Z=Z.declaredClass;if(!F.hasOwnProperty(Z)){F[Z]={count:0,refs:[],cls:T[L]};++I}Z=F[Z];if(R&&R!==Z){Z.refs.push(R);++R.count}R=Z}++R.count;E[0].refs.push(R)}for(;E.length;){R=E.pop();D.push(R.cls);for(--I;M=R.refs,M.length==1;){R=M[0];if(!R||--R.count){R=0;break}D.push(R.cls);--I}if(R){N=0;for(G=M.length;N<G;++N){R=M[N];--R.count||E.push(R)}}}I&&b("can't build consistent linearization",C);L=y[0];D[0]=L?L._meta&&L===D[D.length-L._meta.bases.length]?
L._meta.bases.length:1:0;return D}function d(y,C,D){var E,F,I,G,N,L,T,R=this._inherited=this._inherited||{};if(typeof y=="string"){E=y;y=C;C=D}D=0;G=y.callee;(E=E||G.nom)||b("can't deduce a name to call inherited()",this.declaredClass);N=this.constructor._meta;I=N.bases;T=R.p;if(E!=w){if(R.c!==G){T=0;L=I[0];N=L._meta;if(N.hidden[E]!==G){(F=N.chains)&&typeof F[E]=="string"&&b("calling chained method with inherited: "+E,this.declaredClass);do{N=L._meta;F=L.prototype;if(N&&(F[E]===G&&F.hasOwnProperty(E)||
N.hidden[E]===G))break}while(L=I[++T]);T=L?T:-1}}if(L=I[++T]){F=L.prototype;if(L._meta&&F.hasOwnProperty(E))D=F[E];else{G=p[E];do{F=L.prototype;if((D=F[E])&&(L._meta?F.hasOwnProperty(E):D!==G))break}while(L=I[++T])}}D=L&&D||p[E]}else{if(R.c!==G){T=0;if((N=I[0]._meta)&&N.ctor!==G){F=N.chains;if(!F||F.constructor!=="manual")b("calling chained constructor with inherited",this.declaredClass);for(;L=I[++T];)if((N=L._meta)&&N.ctor===G)break;T=L?T:-1}}for(;L=I[++T];)if(D=(N=L._meta)?N.ctor:L)break;D=L&&
D}R.c=D;R.p=T;if(D)return C===true?D:D.apply(this,C||y)}function e(y,C){if(typeof y=="string")return this.inherited(y,C,true);return this.inherited(y,true)}function f(y){for(var C=this.constructor._meta.bases,D=0,E=C.length;D<E;++D)if(C[D]===y)return true;return this instanceof y}function g(y,C){var D,E=0,F=n._extraNames.length;for(D in C)if(D!=w&&C.hasOwnProperty(D))y[D]=C[D];for(;E<F;++E){D=n._extraNames[E];if(D!=w&&C.hasOwnProperty(D))y[D]=C[D]}}function i(y,C){var D,E,F=0,I=n._extraNames.length;
for(D in C){E=C[D];if((E!==p[D]||!(D in p))&&D!=w){if(s.call(E)=="[object Function]")E.nom=D;y[D]=E}}for(;F<I;++F){D=n._extraNames[F];E=C[D];if((E!==p[D]||!(D in p))&&D!=w){if(s.call(E)=="[object Function]")E.nom=D;y[D]=E}}return y}function j(y){i(this.prototype,y);return this}function h(y,C){return function(){var D=arguments,E=D,F=D[0],I,G;G=y.length;var N;if(!(this instanceof D.callee))return r(D);if(C&&(F&&F.preamble||this.preamble)){N=new Array(y.length);N[0]=D;for(I=0;;){if(F=D[0])if(F=F.preamble)D=
F.apply(this,D)||D;F=y[I].prototype;if(F=F.hasOwnProperty("preamble")&&F.preamble)D=F.apply(this,D)||D;if(++I==G)break;N[I]=D}}for(I=G-1;I>=0;--I){F=y[I];if(F=(G=F._meta)?G.ctor:F)F.apply(this,N?N[I]:D)}(F=this.postscript)&&F.apply(this,E)}}function k(y,C){return function(){var D=arguments,E=D,F=D[0];if(!(this instanceof D.callee))return r(D);if(C){if(F)if(F=F.preamble)E=F.apply(this,E)||E;(F=this.preamble)&&F.apply(this,E)}y&&y.apply(this,D);(F=this.postscript)&&F.apply(this,D)}}function l(y){return function(){var C=
arguments,D=0,E,F;if(!(this instanceof C.callee))return r(C);for(;E=y[D];++D)if(E=(F=E._meta)?F.ctor:E){E.apply(this,C);break}(E=this.postscript)&&E.apply(this,C)}}function m(y,C,D){return function(){var E,F,I=0,G=1;if(D){I=C.length-1;G=-1}for(;E=C[I];I+=G){F=E._meta;(E=(F?F.hidden:E.prototype)[y])&&E.apply(this,arguments)}}}function q(y){t.prototype=y.prototype;y=new t;t.prototype=null;return y}function r(y){var C=y.callee,D=q(C);C.apply(D,y);return D}var n=c,o=n._mixin,p=Object.prototype,s=p.toString,
t=new Function,v=0,w="constructor";n.declare=function(y,C,D){if(typeof y!="string"){D=C;C=y;y=""}D=D||{};var E,F,I,G,N,L,T,R=1,Z=C;if(s.call(C)=="[object Array]"){L=a(C,y);I=L[0];R=L.length-I;C=L[R]}else{L=[0];if(C)if(s.call(C)=="[object Function]"){I=C._meta;L=L.concat(I?I.bases:C)}else b("base class is not a callable constructor.",y);else C!==null&&b("unknown base class. Did you use dojo.require to pull it in?",y)}if(C)for(F=R-1;;--F){E=q(C);if(!F)break;I=L[F];(I._meta?g:o)(E,I.prototype);G=new Function;
G.superclass=C;G.prototype=E;C=E.constructor=G}else E={};i(E,D);I=D.constructor;if(I!==p.constructor){I.nom=w;E.constructor=I}for(F=R-1;F;--F)if((I=L[F]._meta)&&I.chains)T=o(T||{},I.chains);if(E["-chains-"])T=o(T||{},E["-chains-"]);I=!T||!T.hasOwnProperty(w);L[0]=G=T&&T.constructor==="manual"?l(L):L.length==1?k(D.constructor,I):h(L,I);G._meta={bases:L,hidden:D,chains:T,parents:Z,ctor:D.constructor};G.superclass=C&&C.prototype;G.extend=j;G.prototype=E;E.constructor=G;E.getInherited=e;E.inherited=d;
E.isInstanceOf=f;if(y){E.declaredClass=y;n.setObject(y,G)}if(T)for(N in T)if(E[N]&&typeof T[N]=="string"&&N!=w){I=E[N]=m(N,L,T[N]==="after");I.nom=N}return G};n.safeMixin=i})();return c.declare});
define("dojo/_base/connect",["dojo/lib/kernel","dojo/_base/lang"],function(c){c._listener={getDispatcher:function(){return function(){var b=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 b||d[e].apply(this,arguments);return a}},add:function(b,a,d){b=b||c.global;var e=b[a];if(!e||!e._listeners){var f=c._listener.getDispatcher();f.target=e;f._listeners=[];e=b[a]=f}return e._listeners.push(d)},remove:function(b,a,d){(b=(b||
c.global)[a])&&b._listeners&&d--&&delete b._listeners[d]}};c.connect=function(){var b=arguments,a=[],d=0;a.push(c.isString(b[0])?null:b[d++],b[d++]);var e=b[d+1];a.push(c.isString(e)||c.isFunction(e)?b[d++]:null,b[d++]);for(e=b.length;d<e;d++)a.push(b[d]);return c._connect.apply(this,a)};c._connect=function(b,a,d,e){var f=c._listener;d=f.add(b,a,c.hitch(d,e));return[b,a,d,f]};c.disconnect=function(b){if(b&&b[0]!==undefined){c._disconnect.apply(this,b);delete b[0]}};c._disconnect=function(b,a,d,e){e.remove(b,
a,d)};c._topics={};c.subscribe=function(b,a,d){return[b,c._listener.add(c._topics,b,c.hitch(a,d))]};c.unsubscribe=function(b){b&&c._listener.remove(c._topics,b[0],b[1])};c.publish=function(b,a){if(b=c._topics[b])b.apply(this,a||[])};c.connectPublisher=function(b,a,d){var e=function(){c.publish(b,arguments)};return d?c.connect(a,d,e):c.connect(a,e)};return c.connect});
define("dojo/_base/Deferred",["dojo/lib/kernel","dojo/_base/lang"],function(c){(function(){var b=function(){},a=Object.freeze||function(){},d=function(){var e,f,g,i,j=false,h=function(){};return function(k){if(j)if(e){f.next={task:k,next:null};f=f.next}else f=e={task:k,next:null};else{j=true;do try{for(;k;){k();if(g){if(e)f.next=g;else e=g;f=i}if(e){g=e.next;i=f;k=e.task;e=f=null}else k=null}j=false}catch(l){k=h;console.error(l)}while(j)}}}();c.Deferred=function(e){function f(r){if(j)throw new Error("This deferred has already been resolved");
i=r;j=true;d(g)}function g(){for(var r;!r&&l;){var n=l;l=l.next;if(r=n.progress==b)j=false;var o=h?n.error:n.resolved;if(o)try{var p=o(i);if(p&&typeof p.then==="function")p.then(c.hitch(n.deferred,"resolve"),c.hitch(n.deferred,"reject"),c.hitch(n.deferred,"progress"));else{o=r&&p===undefined;if(r&&!o)h=p instanceof Error;n.deferred[o&&h?"reject":"resolve"](o?i:p)}}catch(s){n.deferred.reject(s)}else h?n.deferred.reject(i):n.deferred.resolve(i)}}var i,j,h,k,l,m=this.promise={};this.resolve=this.callback=
function(r){this.fired=0;this.results=[r,null];f(r)};this.reject=this.errback=function(r){h=true;this.fired=1;f(r);this.results=[null,r];if(!r||r.log!==false)(c.config.deferredOnError||function(n){console.error(n)})(r)};this.progress=function(r){for(var n=l;n;){var o=n.progress;o&&o(r);n=n.next}};this.addCallbacks=function(r,n){this.then(r,n,b);return this};this.then=m.then=function(r,n,o){var p=o==b?this:new c.Deferred(m.cancel);r={resolved:r,error:n,progress:o,deferred:p};if(l)k=k.next=r;else l=
k=r;j&&d(g);return p.promise};var q=this;this.cancel=m.cancel=function(){if(!j){var r=e&&e(q);if(!j){r instanceof Error||(r=new Error(r));r.log=false;q.reject(r)}}};a(m)};c.extend(c.Deferred,{addCallback:function(){return this.addCallbacks(c.hitch.apply(c,arguments))},addErrback:function(){return this.addCallbacks(null,c.hitch.apply(c,arguments))},addBoth:function(){var e=c.hitch.apply(c,arguments);return this.addCallbacks(e,e)},fired:-1})})();c.when=function(b,a,d,e){if(b&&typeof b.then==="function")return b.then(a,
d,e);return a(b)};return c.Deferred});
define("dojo/_base/json",["dojo/lib/kernel"],function(c){c.fromJson=function(b){return eval("("+b+")")};c._escapeString=function(b){return('"'+b.replace(/(["\\])/g,"\\$1")+'"').replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r")};c.toJsonIndentStr="\t";c.toJson=function(b,a,d){if(b===undefined)return"undefined";var e=typeof b;if(e=="number"||e=="boolean")return b+"";if(b===null)return"null";if(c.isString(b))return c._escapeString(b);var f=
arguments.callee,g;d=d||"";var i=a?d+c.toJsonIndentStr:"";g=b.__json__||b.json;if(c.isFunction(g)){g=g.call(b);if(b!==g)return f(g,a,i)}if(b.nodeType&&b.cloneNode)throw new Error("Can't serialize DOM nodes");g=a?" ":"";var j=a?"\n":"";if(c.isArray(b))return"["+c.map(b,function(m){m=f(m,a,i);if(typeof m!="string")m="undefined";return j+i+m}).join(","+g)+j+d+"]";if(e=="function")return null;e=[];var h;for(h in b){var k,l;if(typeof h=="number")k='"'+h+'"';else if(typeof h=="string")k=c._escapeString(h);
else continue;l=f(b[h],a,i);typeof l=="string"&&e.push(j+i+k+":"+g+l)}return"{"+e.join(","+g)+j+d+"}"};return c});
define("dojo/_base/Color",["dojo/lib/kernel","dojo/_base/array","dojo/_base/lang"],function(c){(function(){c.Color=function(b){b&&this.setColor(b)};c.Color.named={black:[0,0,0],silver:[192,192,192],gray:[128,128,128],white:[255,255,255],maroon:[128,0,0],red:[255,0,0],purple:[128,0,128],fuchsia:[255,0,255],green:[0,128,0],lime:[0,255,0],olive:[128,128,0],yellow:[255,255,0],navy:[0,0,128],blue:[0,0,255],teal:[0,128,128],aqua:[0,255,255],transparent:c.config.transparentColor||[255,255,255]};c.extend(c.Color,
{r:255,g:255,b:255,a:1,_set:function(b,a,d,e){this.r=b;this.g=a;this.b=d;this.a=e},setColor:function(b){if(c.isString(b))c.colorFromString(b,this);else if(c.isArray(b))c.colorFromArray(b,this);else{this._set(b.r,b.g,b.b,b.a);b instanceof c.Color||this.sanitize()}return this},sanitize:function(){return this},toRgb:function(){return[this.r,this.g,this.b]},toRgba:function(){return[this.r,this.g,this.b,this.a]},toHex:function(){return"#"+c.map(["r","g","b"],function(b){b=this[b].toString(16);return b.length<
2?"0"+b:b},this).join("")},toCss:function(b){var a=this.r+", "+this.g+", "+this.b;return(b?"rgba("+a+", "+this.a:"rgb("+a)+")"},toString:function(){return this.toCss(true)}});c.blendColors=function(b,a,d,e){var f=e||new c.Color;c.forEach(["r","g","b","a"],function(g){f[g]=b[g]+(a[g]-b[g])*d;if(g!="a")f[g]=Math.round(f[g])});return f.sanitize()};c.colorFromRgb=function(b,a){return(b=b.toLowerCase().match(/^rgba?\(([\s\.,0-9]+)\)/))&&c.colorFromArray(b[1].split(/\s*,\s*/),a)};c.colorFromHex=function(b,
a){var d=a||new c.Color,e=b.length==4?4:8,f=(1<<e)-1;b=Number("0x"+b.substr(1));if(isNaN(b))return null;c.forEach(["b","g","r"],function(g){var i=b&f;b>>=e;d[g]=e==4?17*i:i});d.a=1;return d};c.colorFromArray=function(b,a){a=a||new c.Color;a._set(Number(b[0]),Number(b[1]),Number(b[2]),Number(b[3]));if(isNaN(a.a))a.a=1;return a.sanitize()};c.colorFromString=function(b,a){var d=c.Color.named[b];return d&&c.colorFromArray(d,a)||c.colorFromRgb(b,a)||c.colorFromHex(b,a)}})();return c.Color});
define("dojo/_base/window",["dojo/lib/kernel"],function(c){c.doc=window.document||null;c.body=function(){return c.doc.body||c.doc.getElementsByTagName("body")[0]};c.setContext=function(b,a){c.global=b;c.doc=a};c.withGlobal=function(b,a,d,e){var f=c.global;try{c.global=b;return c.withDoc.call(null,b.document,a,d,e)}finally{c.global=f}};c.withDoc=function(b,a,d,e){var f=c.doc,g=c._bodyLtr,i=c.isQuirks;try{c.doc=b;delete c._bodyLtr;c.isQuirks=c.doc.compatMode=="BackCompat";if(d&&typeof a=="string")a=
d[a];return a.apply(d,e||[])}finally{c.doc=f;delete c._bodyLtr;if(g!==undefined)c._bodyLtr=g;c.isQuirks=i}};return c});
define("dojo/_base/event",["dojo/lib/kernel","dojo/_base/connect"],function(c){(function(){var b=c._event_listener={add:function(j,h,k){if(j){h=b._normalizeEventName(h);k=b._fixCallback(h,k);if(!c.isIE&&(h=="mouseenter"||h=="mouseleave")){var l=k;h=h=="mouseenter"?"mouseover":"mouseout";k=function(m){if(!c.isDescendant(m.relatedTarget,j))return l.call(this,m)}}j.addEventListener(h,k,false);return k}},remove:function(j,h,k){if(j){h=b._normalizeEventName(h);if(!c.isIE&&(h=="mouseenter"||h=="mouseleave"))h=
h=="mouseenter"?"mouseover":"mouseout";j.removeEventListener(h,k,false)}},_normalizeEventName:function(j){return j.slice(0,2)=="on"?j.slice(2):j},_fixCallback:function(j,h){return j!="keypress"?h:function(k){return h.call(this,b._fixEvent(k,this))}},_fixEvent:function(j){switch(j.type){case "keypress":b._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}};c.fixEvent=function(j,h){return b._fixEvent(j,h)};c.stopEvent=function(j){j.preventDefault();j.stopPropagation()};var a=c._listener;c._connect=function(j,h,k,l,m){m=j&&(j.nodeType||j.attachEvent||j.addEventListener)?m?2:1:0;k=[c._listener,b,a][m].add(j,h,c.hitch(k,l));return[j,h,k,m]};c._disconnect=function(j,h,k,l){[c._listener,b,a][l].remove(j,h,k)};c.keys={BACKSPACE:8,TAB:9,CLEAR:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,META:c.isSafari?91:224,
PAUSE:19,CAPS_LOCK:20,ESCAPE:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT_ARROW:37,UP_ARROW:38,RIGHT_ARROW:39,DOWN_ARROW:40,INSERT:45,DELETE:46,HELP:47,LEFT_WINDOW:91,RIGHT_WINDOW:92,SELECT:93,NUMPAD_0:96,NUMPAD_1:97,NUMPAD_2:98,NUMPAD_3:99,NUMPAD_4:100,NUMPAD_5:101,NUMPAD_6:102,NUMPAD_7:103,NUMPAD_8:104,NUMPAD_9:105,NUMPAD_MULTIPLY:106,NUMPAD_PLUS:107,NUMPAD_ENTER:108,NUMPAD_MINUS:109,NUMPAD_PERIOD:110,NUMPAD_DIVIDE:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,
F11:122,F12:123,F13:124,F14:125,F15:126,NUM_LOCK:144,SCROLL_LOCK:145,copyKey:c.isMac&&!c.isAIR?c.isSafari?91:224:17};var d=c.isMac?"metaKey":"ctrlKey";c.isCopyKey=function(j){return j[d]};c.mouseButtons=c.isIE<9||c.isIE&&c.isQuirks?{LEFT:1,MIDDLE:4,RIGHT:2,isButton:function(j,h){return j.button&h},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,h){return j.button==h},isLeft:function(j){return j.button==
0},isMiddle:function(j){return j.button==1},isRight:function(j){return j.button==2}};if(c.isIE){var e=function(j,h){try{return j.keyCode=h}catch(k){return 0}},f=c._listener,g=c._ieListenersName="_"+c._scopeName+"_listeners";if(!c.config._allow_leaks){a=f=c._ie_listener={handlers:[],add:function(j,h,k){j=j||c.global;var l=j[h];if(!l||!l[g]){var m=c._getIeDispatcher();m.target=l&&i.push(l)-1;m[g]=[];l=j[h]=m}return l[g].push(i.push(k)-1)},remove:function(j,h,k){h=(j=(j||c.global)[h])&&j[g];if(j&&h&&
k--){delete i[h[k]];delete h[k]}}};var i=f.handlers}c.mixin(b,{add:function(j,h,k){if(j){h=b._normalizeEventName(h);if(h=="onkeypress"){var l=j.onkeydown;if(!l||!l[g]||!l._stealthKeydownHandle){var m=b.add(j,"onkeydown",b._stealthKeyDown);l=j.onkeydown;l._stealthKeydownHandle=m;l._stealthKeydownRefs=1}else l._stealthKeydownRefs++}return f.add(j,h,b._fixCallback(k))}},remove:function(j,h,k){h=b._normalizeEventName(h);f.remove(j,h,k);if(h=="onkeypress"){h=j.onkeydown;if(--h._stealthKeydownRefs<=0){f.remove(j,
"onkeydown",h._stealthKeydownHandle);delete h._stealthKeydownHandle}}},_normalizeEventName:function(j){return j.slice(0,2)!="on"?"on"+j:j},_nop:function(){},_fixEvent:function(j,h){if(!j)j=(h&&(h.ownerDocument||h.document||h).parentWindow||window).event;if(!j)return j;j.target=j.srcElement;j.currentTarget=h||j.srcElement;j.layerX=j.offsetX;j.layerY=j.offsetY;h=(h=j.srcElement)&&h.ownerDocument||document;h=c.isIE<6||h.compatMode=="BackCompat"?h.body:h.documentElement;var k=c._getIeDocumentElementOffset();
j.pageX=j.clientX+c._fixIeBiDiScrollLeft(h.scrollLeft||0)-k.x;j.pageY=j.clientY+(h.scrollTop||0)-k.y;if(j.type=="mouseover")j.relatedTarget=j.fromElement;if(j.type=="mouseout")j.relatedTarget=j.toElement;if(c.isIE<9||c.isQuirks){j.stopPropagation=b._stopPropagation;j.preventDefault=b._preventDefault}return b._fixKeys(j)},_fixKeys:function(j){switch(j.type){case "keypress":var h="charCode"in j?j.charCode:j.keyCode;if(h==10){h=0;j.keyCode=13}else if(h==13||h==27)h=0;else if(h==3)h=99;j.charCode=h;b._setKeyChar(j);
break}return j},_stealthKeyDown:function(j){var h=j.currentTarget.onkeypress;if(h&&h[g]){var k=j.keyCode,l=(k!=13||c.isIE>=9&&!c.isQuirks)&&k!=32&&k!=27&&(k<48||k>90)&&(k<96||k>111)&&(k<186||k>192)&&(k<219||k>222);if(l||j.ctrlKey){l=l?0:k;if(j.ctrlKey)if(k==3||k==13)return;else if(l>95&&l<106)l-=48;else if(!j.shiftKey&&l>=65&&l<=90)l+=32;else l=b._punctMap[l]||l;k=b._synthesizeEvent(j,{type:"keypress",faux:true,charCode:l});h.call(j.currentTarget,k);if(c.isIE<9||c.isIE&&c.isQuirks)j.cancelBubble=
k.cancelBubble;j.returnValue=k.returnValue;e(j,k.keyCode)}}},_stopPropagation:function(){this.cancelBubble=true},_preventDefault:function(){this.bubbledKeyCode=this.keyCode;this.ctrlKey&&e(this,0);this.returnValue=false}});c.stopEvent=c.isIE<9||c.isQuirks?function(j){j=j||window.event;b._stopPropagation.call(j);b._preventDefault.call(j)}:c.stopEvent}b._synthesizeEvent=function(j,h){h=c.mixin({},j,h);b._setKeyChar(h);h.preventDefault=function(){j.preventDefault()};h.stopPropagation=function(){j.stopPropagation()};
return h};c.isOpera&&c.mixin(b,{_fixEvent:function(j){switch(j.type){case "keypress":var h=j.which;if(h==3)h=99;h=h<41&&!j.shiftKey?0:h;if(j.ctrlKey&&!j.shiftKey&&h>=65&&h<=90)h+=32;return b._synthesizeEvent(j,{charCode:h})}return j}});if(c.isWebKit){b._add=b.add;b._remove=b.remove;c.mixin(b,{add:function(j,h,k){if(j){var l=b._add(j,h,k);if(b._normalizeEventName(h)=="keypress")l._stealthKeyDownHandle=b._add(j,"keydown",function(m){var q=m.keyCode,r=q!=13&&q!=32&&(q<48||q>90)&&(q<96||q>111)&&(q<186||
q>192)&&(q<219||q>222);if(r||m.ctrlKey){r=r?0:q;if(m.ctrlKey)if(q==3||q==13)return;else if(r>95&&r<106)r-=48;else if(!m.shiftKey&&r>=65&&r<=90)r+=32;else r=b._punctMap[r]||r;q=b._synthesizeEvent(m,{type:"keypress",faux:true,charCode:r});k.call(m.currentTarget,q)}});return l}},remove:function(j,h,k){if(j){k._stealthKeyDownHandle&&b._remove(j,"keydown",k._stealthKeyDownHandle);b._remove(j,h,k)}},_fixEvent:function(j){switch(j.type){case "keypress":if(j.faux)return j;var h=j.charCode;h=h>=32?h:0;return b._synthesizeEvent(j,
{charCode:h,faux:true})}return j}})}})();if(c.isIE){c._ieDispatcher=function(b,a){var d=Array.prototype,e=c._ie_listener.handlers,f=b.callee,g=f[c._ieListenersName];f=(f=e[f.target])&&f.apply(a,b);g=[].concat(g);for(var i in g){var j=e[g[i]];!(i in d)&&j&&j.apply(a,b)}return f};c._getIeDispatcher=function(){return new Function(c._scopeName+"._ieDispatcher(arguments, this)")};c._event_listener._fixCallback=function(b){var a=c._event_listener._fixEvent;return function(d){return b.call(this,a(d,this))}}}return c.connect});
define("dojo/_base/html",["dojo/lib/kernel","dojo/_base/lang"],function(c){try{document.execCommand("BackgroundImageCache",false,true)}catch(b){}c.byId=c.isIE?function(a,d){if(typeof a!="string")return a;var e=d||c.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||c.doc).getElementById(a):
a)||null};(function(){var a=c.byId,d=null,e;c.addOnWindowUnload(function(){d=null});c._destroyElement=c.destroy=function(u){u=a(u);try{var x=u.ownerDocument;if(!d||e!=x){d=x.createElement("div");e=x}d.appendChild(u.parentNode?u.parentNode.removeChild(u):u);d.innerHTML=""}catch(B){}};c.isDescendant=function(u,x){try{u=a(u);for(x=a(x);u;){if(u==x)return true;u=u.parentNode}}catch(B){}return false};c.setSelectable=function(u,x){u=a(u);if(c.isMozilla)u.style.MozUserSelect=x?"":"none";else if(c.isKhtml||
c.isWebKit)u.style.KhtmlUserSelect=x?"auto":"none";else if(c.isIE){x=u.unselectable=x?"":"on";c.query("*",u).forEach("item.unselectable = '"+x+"'")}};var f=function(u,x){var B=x.parentNode;B&&B.insertBefore(u,x)},g=function(u,x){var B=x.parentNode;if(B)B.lastChild==x?B.appendChild(u):B.insertBefore(u,x.nextSibling)};c.place=function(u,x,B){x=a(x);if(typeof u=="string")u=/^\s*</.test(u)?c._toDom(u,x.ownerDocument):a(u);if(typeof B=="number"){var K=x.childNodes;!K.length||K.length<=B?x.appendChild(u):
f(u,K[B<0?0:B])}else switch(B){case "before":f(u,x);break;case "after":g(u,x);break;case "replace":x.parentNode.replaceChild(u,x);break;case "only":c.empty(x);x.appendChild(u);break;case "first":if(x.firstChild){f(u,x.firstChild);break}default:x.appendChild(u)}return u};c.boxModel="content-box";if(c.isIE)c.boxModel=document.compatMode=="BackCompat"?"border-box":"content-box";var i;i=c.isWebKit?function(u){var x;if(u.nodeType==1){var B=u.ownerDocument.defaultView;x=B.getComputedStyle(u,null);if(!x&&
u.style){u.style.display="";x=B.getComputedStyle(u,null)}}return x||{}}:c.isIE?function(u){return u.nodeType==1?u.currentStyle:{}}:function(u){return u.nodeType==1?u.ownerDocument.defaultView.getComputedStyle(u,null):{}};c.getComputedStyle=i;c._toPixelValue=c.isIE?function(u,x){if(!x)return 0;if(x=="medium")return 4;if(x.slice&&x.slice(-2)=="px")return parseFloat(x);with(u){u=style.left;var B=runtimeStyle.left;runtimeStyle.left=currentStyle.left;try{style.left=x;x=style.pixelLeft}catch(K){x=0}style.left=
u;runtimeStyle.left=B}return x}:function(u,x){return parseFloat(x)||0};var j=c._toPixelValue,h=function(u,x){try{return u.filters.item("DXImageTransform.Microsoft.Alpha")}catch(B){return x?{}:null}};c._getOpacity=c.isIE<9?function(u){try{return h(u).Opacity/100}catch(x){return 1}}:function(u){return i(u).opacity};c._setOpacity=c.isIE<9?function(u,x){var B=x*100,K=x==1;u.style.zoom=K?"":1;if(h(u))h(u,1).Opacity=B;else{if(K)return x;u.style.filter+=" progid:DXImageTransform.Microsoft.Alpha(Opacity="+
B+")"}h(u,1).Enabled=!K;u.nodeName.toLowerCase()=="tr"&&c.query("> td",u).forEach(function(O){c._setOpacity(O,x)});return x}:function(u,x){return u.style.opacity=x};var k={left:true,top:true},l=/margin|padding|width|height|max|min|offset/,m=function(u,x,B){x=x.toLowerCase();if(c.isIE){if(B=="auto"){if(x=="height")return u.offsetHeight;if(x=="width")return u.offsetWidth}if(x=="fontweight")switch(B){case 700:return"bold";case 400:default:return"normal"}}x in k||(k[x]=l.test(x));return k[x]?j(u,B):B},
q=c.isIE?"styleFloat":"cssFloat",r={cssFloat:q,styleFloat:q,"float":q};c.style=function(u,x,B){var K=a(u),O=arguments.length,Q=x=="opacity";x=r[x]||x;if(O==3)return Q?c._setOpacity(K,B):(K.style[x]=B);if(O==2&&Q)return c._getOpacity(K);Q=i(K);if(O==2&&typeof x!="string"){for(var V in x)c.style(u,V,x[V]);return Q}return O==1?Q:m(K,x,Q[x]||K.style[x])};c._getPadExtents=function(u,x){x=x||i(u);var B=j(u,x.paddingLeft),K=j(u,x.paddingTop);return{l:B,t:K,w:B+j(u,x.paddingRight),h:K+j(u,x.paddingBottom)}};
c._getBorderExtents=function(u,x){x=x||i(u);var B=x.borderLeftStyle!="none"?j(u,x.borderLeftWidth):0,K=x.borderTopStyle!="none"?j(u,x.borderTopWidth):0;return{l:B,t:K,w:B+(x.borderRightStyle!="none"?j(u,x.borderRightWidth):0),h:K+(x.borderBottomStyle!="none"?j(u,x.borderBottomWidth):0)}};c._getPadBorderExtents=function(u,x){var B=x||i(u);x=c._getPadExtents(u,B);u=c._getBorderExtents(u,B);return{l:x.l+u.l,t:x.t+u.t,w:x.w+u.w,h:x.h+u.h}};c._getMarginExtents=function(u,x){x=x||i(u);var B=j(u,x.marginLeft),
K=j(u,x.marginTop),O=j(u,x.marginRight);u=j(u,x.marginBottom);if(c.isWebKit&&x.position!="absolute")O=B;return{l:B,t:K,w:B+O,h:K+u}};c._getMarginBox=function(u,x){var B=x||i(u);x=c._getMarginExtents(u,B);var K=u.offsetLeft-x.l,O=u.offsetTop-x.t,Q=u.parentNode;if(c.isMoz){var V=parseFloat(B.left);B=parseFloat(B.top);if(!isNaN(V)&&!isNaN(B)){K=V;O=B}else if(Q&&Q.style){V=i(Q);if(V.overflow!="visible"){Q=c._getBorderExtents(Q,V);K+=Q.l;O+=Q.t}}}else if(c.isOpera||c.isIE>7&&!c.isQuirks)if(Q){Q=c._getBorderExtents(Q);
K-=Q.l;O-=Q.t}return{l:K,t:O,w:u.offsetWidth+x.w,h:u.offsetHeight+x.h}};c._getMarginSize=function(u,x){u=a(u);x=c._getMarginExtents(u,x||i(u));u=u.getBoundingClientRect();return{w:u.right-u.left+x.w,h:u.bottom-u.top+x.h}};c._getContentBox=function(u,x){var B=x||i(u);x=c._getPadExtents(u,B);B=c._getBorderExtents(u,B);var K=u.clientWidth;if(K){u=u.clientHeight;B.w=B.h=0}else{K=u.offsetWidth;u=u.offsetHeight}if(c.isOpera){x.l+=B.l;x.t+=B.t}return{l:x.l,t:x.t,w:K-x.w-B.w,h:u-x.h-B.h}};c._getBorderBox=
function(u,x){var B=x||i(u);x=c._getPadExtents(u,B);u=c._getContentBox(u,B);return{l:u.l-x.l,t:u.t-x.t,w:u.w+x.w,h:u.h+x.h}};c._setBox=function(u,x,B,K,O,Q){Q=Q||"px";u=u.style;if(!isNaN(x))u.left=x+Q;if(!isNaN(B))u.top=B+Q;if(K>=0)u.width=K+Q;if(O>=0)u.height=O+Q};c._isButtonTag=function(u){return u.tagName=="BUTTON"||u.tagName=="INPUT"&&(u.getAttribute("type")||"").toUpperCase()=="BUTTON"};c._usesBorderBox=function(u){var x=u.tagName;return c.boxModel=="border-box"||x=="TABLE"||c._isButtonTag(u)};
c._setContentSize=function(u,x,B,K){if(c._usesBorderBox(u)){K=c._getPadBorderExtents(u,K);if(x>=0)x+=K.w;if(B>=0)B+=K.h}c._setBox(u,NaN,NaN,x,B)};c._setMarginBox=function(u,x,B,K,O,Q){var V=Q||i(u);Q=c._usesBorderBox(u)?n:c._getPadBorderExtents(u,V);if(c.isWebKit)if(c._isButtonTag(u)){var ca=u.style;if(K>=0&&!ca.width)ca.width="4px";if(O>=0&&!ca.height)ca.height="4px"}V=c._getMarginExtents(u,V);if(K>=0)K=Math.max(K-Q.w-V.w,0);if(O>=0)O=Math.max(O-Q.h-V.h,0);c._setBox(u,x,B,K,O)};var n={l:0,t:0,w:0,
h:0};c.marginBox=function(u,x){u=a(u);var B=i(u);return!x?c._getMarginBox(u,B):c._setMarginBox(u,x.l,x.t,x.w,x.h,B)};c.contentBox=function(u,x){u=a(u);var B=i(u);return!x?c._getContentBox(u,B):c._setContentSize(u,x.w,x.h,B)};c._docScroll=function(){var u=c.global;return"pageXOffset"in u?{x:u.pageXOffset,y:u.pageYOffset}:(u=c.isQuirks?c.doc.body:c.doc.documentElement,{x:c._fixIeBiDiScrollLeft(u.scrollLeft||0),y:u.scrollTop||0})};c._isBodyLtr=function(){return"_bodyLtr"in c?c._bodyLtr:(c._bodyLtr=(c.body().dir||
c.doc.documentElement.dir||"ltr").toLowerCase()=="ltr")};c._getIeDocumentElementOffset=function(){var u=c.doc.documentElement;if(c.isIE<8){var x=u.getBoundingClientRect(),B=x.left;x=x.top;if(c.isIE<7){B+=u.clientLeft;x+=u.clientTop}return{x:B<0?0:B,y:x<0?0:x}}else return{x:0,y:0}};c._fixIeBiDiScrollLeft=function(u){var x=c.isIE;if(x&&!c._isBodyLtr()){var B=c.isQuirks,K=B?c.doc.body:c.doc.documentElement;if(x==6&&!B&&c.global.frameElement&&K.scrollHeight>K.clientHeight)u+=K.clientLeft;return x<8||
B?u+K.clientWidth-K.scrollWidth:-u}return u};c._abs=c.position=function(u,x){u=a(u);var B=c.body(),K=B.parentNode;u=u.getBoundingClientRect();u={x:u.left,y:u.top,w:u.right-u.left,h:u.bottom-u.top};if(c.isIE){K=c._getIeDocumentElementOffset();u.x-=K.x+(c.isQuirks?B.clientLeft+B.offsetLeft:0);u.y-=K.y+(c.isQuirks?B.clientTop+B.offsetTop:0)}else if(c.isFF==3){B=i(K);u.x-=j(K,B.marginLeft)+j(K,B.borderLeftWidth);u.y-=j(K,B.marginTop)+j(K,B.borderTopWidth)}if(x){x=c._docScroll();u.x+=x.x;u.y+=x.y}return u};
c.coords=function(u,x){u=a(u);var B=i(u);B=c._getMarginBox(u,B);x=c.position(u,x);B.x=x.x;B.y=x.y;return B};var o={"class":"className","for":"htmlFor",tabindex:"tabIndex",readonly:"readOnly",colspan:"colSpan",frameborder:"frameBorder",rowspan:"rowSpan",valuetype:"valueType"},p={classname:"class",htmlfor:"for",tabindex:"tabIndex",readonly:"readOnly"},s={innerHTML:1,className:1,htmlFor:c.isIE,value:1},t=function(u){return p[u.toLowerCase()]||u},v=function(u,x){return(u=u.getAttributeNode&&u.getAttributeNode(x))&&
u.specified};c.hasAttr=function(u,x){var B=x.toLowerCase();return s[o[B]||x]||v(a(u),p[B]||x)};var w={},y=0,C=c._scopeName+"attrid",D={col:1,colgroup:1,table:1,tbody:1,tfoot:1,thead:1,tr:1,title:1};c.attr=function(u,x,B){u=a(u);var K=arguments.length;if(K==2&&typeof x!="string"){for(var O in x)c.attr(u,O,x[O]);return u}var Q=x.toLowerCase();O=o[Q]||x;var V=s[O];Q=p[Q]||x;if(K==3){if(O=="style"&&typeof B!="string")c.style(u,B);else if(O=="innerHTML")if(c.isIE&&u.tagName.toLowerCase()in D){c.empty(u);
u.appendChild(c._toDom(B,u.ownerDocument))}else u[O]=B;else if(c.isFunction(B)){K=c.attr(u,C);if(!K){K=y++;c.attr(u,C,K)}w[K]||(w[K]={});if(V=w[K][O])c.disconnect(V);else try{delete u[O]}catch(ca){}w[K][O]=c.connect(u,O,B)}else if(V||typeof B=="boolean")u[O]=B;else u.setAttribute(Q,B);return u}B=u[O];if(V&&typeof B!="undefined")return B;if(O!="href"&&(typeof B=="boolean"||c.isFunction(B)))return B;return v(u,Q)?u.getAttribute(Q):null};c.removeAttr=function(u,x){a(u).removeAttribute(t(x))};c.getNodeProp=
function(u,x){u=a(u);var B=x.toLowerCase(),K=o[B]||x;if(K in u&&K!="href")return u[K];x=p[B]||x;return v(u,x)?u.getAttribute(x):null};c.create=function(u,x,B,K){var O=c.doc;if(B){B=a(B);O=B.ownerDocument}if(typeof u=="string")u=O.createElement(u);x&&c.attr(u,x);B&&c.place(u,B,K);return u};c.empty=c.isIE?function(u){u=a(u);for(var x;x=u.lastChild;)c.destroy(x)}:function(u){a(u).innerHTML=""};var E={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"]},F=/<\s*([\w\:]+)/,I={},G=0,N="__"+c._scopeName+"ToDomId";for(var L in E)if(E.hasOwnProperty(L)){var T=E[L];T.pre=L=="option"?'<select multiple="multiple">':"<"+T.join("><")+">";T.post="</"+T.reverse().join("></")+">"}c._toDom=function(u,x){x=x||c.doc;var B=x[N];if(!B){x[N]=B=++G+"";I[B]=x.createElement("div")}u+="";var K=u.match(F),O=K?K[1].toLowerCase():"";B=I[B];if(K&&E[O]){K=
E[O];B.innerHTML=K.pre+u+K.post;for(u=K.length;u;--u)B=B.firstChild}else B.innerHTML=u;if(B.childNodes.length==1)return B.removeChild(B.firstChild);for(u=x.createDocumentFragment();x=B.firstChild;)u.appendChild(x);return u};var R="className";c.hasClass=function(u,x){return(" "+a(u)[R]+" ").indexOf(" "+x+" ")>=0};var Z=/\s+/,M=[""],S={},W=function(u){if(typeof u=="string"||u instanceof String)if(u.indexOf(" ")<0){M[0]=u;return M}else return u.split(Z);return u||""};c.addClass=function(u,x){u=a(u);
x=W(x);var B=u[R],K;B=B?" "+B+" ":" ";K=B.length;for(var O=0,Q=x.length,V;O<Q;++O)if((V=x[O])&&B.indexOf(" "+V+" ")<0)B+=V+" ";if(K<B.length)u[R]=B.substr(1,B.length-2)};c.removeClass=function(u,x){u=a(u);var B;if(x!==undefined){x=W(x);B=" "+u[R]+" ";for(var K=0,O=x.length;K<O;++K)B=B.replace(" "+x[K]+" "," ");B=c.trim(B)}else B="";if(u[R]!=B)u[R]=B};c.replaceClass=function(u,x,B){u=a(u);S.className=u.className;c.removeClass(S,B);c.addClass(S,x);if(u.className!==S.className)u.className=S.className};
c.toggleClass=function(u,x,B){if(B===undefined)B=!c.hasClass(u,x);c[B?"addClass":"removeClass"](u,x)}})();return c});
define("dojo/_base/NodeList",["dojo/lib/kernel","dojo/_base/lang","dojo/_base/array","dojo/_base/connect","dojo/_base/html"],function(c){(function(){var b=Array.prototype,a=b.slice,d=b.concat,e=function(q,r,n){q.sort||(q=a.call(q,0));n=n||this._NodeListCtor||c._NodeListCtor;q.constructor=n;c._mixin(q,n.prototype);q._NodeListCtor=n;return r?q._stash(r):q},f=function(q,r,n){r=[0].concat(a.call(r,0));n=n||c.global;return function(o){r[0]=o;return q.apply(n,r)}},g=function(q,r){return function(){this.forEach(f(q,
arguments,r));return this}},i=function(q,r){return function(){return this.map(f(q,arguments,r))}},j=function(q,r,n){return function(){var o=arguments,p=f(q,o,n);if(r.call(n||c.global,o))return this.map(p);this.forEach(p);return this}},h=function(q){return q.length==1&&typeof q[0]=="string"},k=function(q){var r=q.parentNode;r&&r.removeChild(q)};c.NodeList=function(){return e(Array.apply(null,arguments))};var l=c._NodeListCtor=c.NodeList,m=l.prototype;l._wrap=m._wrap=e;l._adaptAsMap=i;l._adaptAsForEach=
g;l._adaptAsFilter=function(q,r){return function(){return this.filter(f(q,arguments,r))}};l._adaptWithCondition=j;c.forEach(["slice","splice"],function(q){var r=b[q];m[q]=function(){return this._wrap(r.apply(this,arguments),q=="slice"?this:null)}});c.forEach(["indexOf","lastIndexOf","every","some"],function(q){var r=c[q];m[q]=function(){return r.apply(c,[this].concat(a.call(arguments,0)))}});c.forEach(["attr","style"],function(q){m[q]=j(c[q],h)});c.forEach(["connect","addClass","removeClass","replaceClass",
"toggleClass","empty","removeAttr"],function(q){m[q]=g(c[q])});c.extend(c.NodeList,{_normalize:function(q,r){var n=q.parse===true?true:false;if(typeof q.template=="string"){var o=q.templateFunc||c.string&&c.string.substitute;q=o?o(q.template,q):q}o=typeof q;if(o=="string"||o=="number"){q=c._toDom(q,r&&r.ownerDocument);q=q.nodeType==11?c._toArray(q.childNodes):[q]}else if(c.isArrayLike(q))c.isArray(q)||(q=c._toArray(q));else q=[q];if(n)q._runParse=true;return q},_cloneNode:function(q){return q.cloneNode(true)},
_place:function(q,r,n,o){if(!(r.nodeType!=1&&n=="only")){r=r;for(var p,s=q.length,t=s-1;t>=0;t--){var v=o?this._cloneNode(q[t]):q[t];if(q._runParse&&c.parser&&c.parser.parse){p||(p=r.ownerDocument.createElement("div"));p.appendChild(v);c.parser.parse(p);for(v=p.firstChild;p.firstChild;)p.removeChild(p.firstChild)}t==s-1?c.place(v,r,n):r.parentNode.insertBefore(v,r);r=v}}},_stash:function(q){this._parent=q;return this},end:function(){return this._parent?this._parent:new this._NodeListCtor},concat:function(){var q=
c.isArray(this)?this:a.call(this,0),r=c.map(arguments,function(n){return n&&!c.isArray(n)&&(typeof NodeList!="undefined"&&n.constructor===NodeList||n.constructor===this._NodeListCtor)?a.call(n,0):n});return this._wrap(d.apply(q,r),this)},map:function(q,r){return this._wrap(c.map(this,q,r),this)},forEach:function(q,r){c.forEach(this,q,r);return this},coords:i(c.coords),position:i(c.position),place:function(q,r){var n=c.query(q)[0];return this.forEach(function(o){c.place(o,n,r)})},orphan:function(q){return(q?
c._filterQueryResult(this,q):this).forEach(k)},adopt:function(q,r){return c.query(q).place(this[0],r)._stash(this)},query:function(q){if(!q)return this;var r=this.map(function(n){return c.query(q,n).filter(function(o){return o!==undefined})});return this._wrap(d.apply([],r),this)},filter:function(q){var r=arguments,n=this,o=0;if(typeof q=="string"){n=c._filterQueryResult(this,r[0]);if(r.length==1)return n._stash(this);o=1}return this._wrap(c.filter(n,r[o],r[o+1]),this)},addContent:function(q,r){q=
this._normalize(q,this[0]);for(var n=0,o;o=this[n];n++)this._place(q,o,r,n>0);return this},instantiate:function(q,r){var n=c.isFunction(q)?q:c.getObject(q);r=r||{};return this.forEach(function(o){new n(r,o)})},at:function(){var q=new this._NodeListCtor;c.forEach(arguments,function(r){if(r<0)r=this.length+r;this[r]&&q.push(this[r])},this);return q._stash(this)}});l.events=["blur","focus","change","click","error","keydown","keypress","keyup","load","mousedown","mouseenter","mouseleave","mousemove",
"mouseout","mouseover","mouseup","submit"];c.forEach(l.events,function(q){var r="on"+q;m[r]=function(n,o){return this.connect(r,n,o)}})})();return c.NodeList});
(function(){var c=function(a){var d=a.trim,e=a.forEach,f=a._NodeListCtor=a.NodeList,g=function(){return a.doc},i=(a.isWebKit||a.isMozilla)&&g().compatMode=="BackCompat",j=g().firstChild.children?"children":"childNodes",h=false,k=function(){return true},l=function(A){A+=">~+".indexOf(A.slice(-1))>=0?" * ":" ";for(var z=function(oa,pa){return d(A.slice(oa,pa))},H=[],J=-1,P=-1,U=-1,Y=-1,X=-1,$=-1,fa=-1,ha="",ga="",ma,ea=0,qa=A.length,ba=null,ka=null,ra=function(){if(fa>=0){var oa=fa==ea?null:z(fa,ea);
ba[">~+".indexOf(oa)<0?"tag":"oper"]=oa;fa=-1}},sa=function(){if($>=0){ba.id=z($,ea).replace(/\\/g,"");$=-1}},ta=function(){if(X>=0){ba.classes.push(z(X+1,ea).replace(/\\/g,""));X=-1}},na=function(){sa();ra();ta()},ua=function(){na();Y>=0&&ba.pseudos.push({name:z(Y+1,ea)});ba.loops=ba.pseudos.length||ba.attrs.length||ba.classes.length;ba.oquery=ba.query=z(ma,ea);ba.otag=ba.tag=ba.oper?null:ba.tag||"*";if(ba.tag)ba.tag=ba.tag.toUpperCase();if(H.length&&H[H.length-1].oper){ba.infixOper=H.pop();ba.query=
ba.infixOper.query+" "+ba.query}H.push(ba);ba=null};ha=ga,ga=A.charAt(ea),ea<qa;ea++)if(ha!="\\"){if(!ba){ma=ea;ba={query:null,pseudos:[],attrs:[],classes:[],tag:null,oper:null,id:null,getTag:function(){return h?this.otag:this.tag}};fa=ea}if(J>=0)if(ga=="]"){if(ka.attr)ka.matchFor=z(U||J+1,ea);else ka.attr=z(J+1,ea);if(J=ka.matchFor)if(J.charAt(0)=='"'||J.charAt(0)=="'")ka.matchFor=J.slice(1,-1);ba.attrs.push(ka);ka=null;J=U=-1}else{if(ga=="="){U="|~^$*".indexOf(ha)>=0?ha:"";ka.type=U+ga;ka.attr=
z(J+1,ea-U.length);U=ea+1}}else if(P>=0){if(ga==")"){if(Y>=0)ka.value=z(P+1,ea);Y=P=-1}}else if(ga=="#"){na();$=ea+1}else if(ga=="."){na();X=ea}else if(ga==":"){na();Y=ea}else if(ga=="["){na();J=ea;ka={}}else if(ga=="("){if(Y>=0){ka={name:z(Y+1,ea),value:null};ba.pseudos.push(ka)}P=ea}else ga==" "&&ha!=ga&&ua()}return H},m=function(A,z){if(!A)return z;if(!z)return A;return function(){return A.apply(window,arguments)&&z.apply(window,arguments)}},q=function(A,z){z=z||[];A&&z.push(A);return z},r=function(A){return 1==
A.nodeType},n=function(A,z){if(!A)return"";if(z=="class")return A.className||"";if(z=="for")return A.htmlFor||"";if(z=="style")return A.style.cssText||"";return(h?A.getAttribute(z):A.getAttribute(z,2))||""},o={"*=":function(A,z){return function(H){return n(H,A).indexOf(z)>=0}},"^=":function(A,z){return function(H){return n(H,A).indexOf(z)==0}},"$=":function(A,z){return function(H){H=" "+n(H,A);return H.lastIndexOf(z)==H.length-z.length}},"~=":function(A,z){var H=" "+z+" ";return function(J){return(" "+
n(J,A)+" ").indexOf(H)>=0}},"|=":function(A,z){var H=" "+z+"-";return function(J){J=" "+n(J,A);return J==z||J.indexOf(H)==0}},"=":function(A,z){return function(H){return n(H,A)==z}}},p=typeof g().firstChild.nextElementSibling=="undefined",s=!p?"nextElementSibling":"nextSibling",t=!p?"previousElementSibling":"previousSibling",v=p?r:k,w=function(A){for(;A=A[t];)if(v(A))return false;return true},y=function(A){for(;A=A[s];)if(v(A))return false;return true},C=function(A){var z=A.parentNode,H=0,J=z[j],
P=A._i||-1,U=z._l||-1;if(!J)return-1;J=J.length;if(U==J&&P>=0&&U>=0)return P;z._l=J;P=-1;for(z=z.firstElementChild||z.firstChild;z;z=z[s])if(v(z)){z._i=++H;if(A===z)P=H}return P},D=function(A){return!(C(A)%2)},E=function(A){return C(A)%2},F={checked:function(){return function(A){return!!("checked"in A?A.checked:A.selected)}},"first-child":function(){return w},"last-child":function(){return y},"only-child":function(){return function(A){if(!w(A))return false;if(!y(A))return false;return true}},empty:function(){return function(A){var z=
A.childNodes;for(A=A.childNodes.length-1;A>=0;A--){var H=z[A].nodeType;if(H===1||H==3)return false}return true}},contains:function(A,z){A=z.charAt(0);if(A=='"'||A=="'")z=z.slice(1,-1);return function(H){return H.innerHTML.indexOf(z)>=0}},not:function(A,z){A=l(z)[0];z={el:1};if(A.tag!="*")z.tag=1;if(!A.classes.length)z.classes=1;var H=G(A,z);return function(J){return!H(J)}},"nth-child":function(A,z){A=parseInt;if(z=="odd")return E;else if(z=="even")return D;if(z.indexOf("n")!=-1){z=z.split("n",2);
var H=z[0]?z[0]=="-"?-1:A(z[0]):1,J=z[1]?A(z[1]):0,P=0,U=-1;if(H>0)if(J<0)J=J%H&&H+J%H;else{if(J>0){if(J>=H)P=J-J%H;J%=H}}else if(H<0){H*=-1;if(J>0){U=J;J%=H}}if(H>0)return function(X){X=C(X);return X>=P&&(U<0||X<=U)&&X%H==J};else z=J}var Y=A(z);return function(X){return C(X)==Y}}},I=a.isIE<9||dojo.isIE&&dojo.isQuirks?function(A){var z=A.toLowerCase();if(z=="class")A="className";return function(H){return h?H.getAttribute(A):H[A]||H[z]}}:function(A){return function(z){return z&&z.getAttribute&&z.hasAttribute(A)}},
G=function(A,z){if(!A)return k;z=z||{};var H=null;"el"in z||(H=m(H,r));if(!("tag"in z))if(A.tag!="*")H=m(H,function(J){return J&&J.tagName==A.getTag()});"classes"in z||e(A.classes,function(J,P){var U=new RegExp("(?:^|\\s)"+J+"(?:\\s|$)");H=m(H,function(Y){return U.test(Y.className)});H.count=P});"pseudos"in z||e(A.pseudos,function(J){var P=J.name;if(F[P])H=m(H,F[P](P,J.value))});"attrs"in z||e(A.attrs,function(J){var P,U=J.attr;if(J.type&&o[J.type])P=o[J.type](U,J.matchFor);else if(U.length)P=I(U);
if(P)H=m(H,P)});if(!("id"in z))if(A.id)H=m(H,function(J){return!!J&&J.id==A.id});H||"default"in z||(H=k);return H},N=function(A){return function(z,H,J){for(;z=z[s];)if(!(p&&!r(z))){if((!J||ia(z,J))&&A(z))H.push(z);break}return H}},L=function(A){return function(z,H,J){for(z=z[s];z;){if(v(z)){if(J&&!ia(z,J))break;A(z)&&H.push(z)}z=z[s]}return H}},T=function(A){A=A||k;return function(z,H,J){for(var P=0,U=z[j];z=U[P++];)if(v(z)&&(!J||ia(z,J))&&A(z,P))H.push(z);return H}},R=function(A,z){for(A=A.parentNode;A;){if(A==
z)break;A=A.parentNode}return!!A},Z={},M=function(A){var z=Z[A.query];if(z)return z;var H=A.infixOper;H=H?H.oper:"";var J=G(A,{el:1}),P="*"==A.tag,U=g().getElementsByClassName;if(H){U={el:1};if(P)U.tag=1;J=G(A,U);if("+"==H)z=N(J);else if("~"==H)z=L(J);else if(">"==H)z=T(J)}else if(A.id){J=!A.loops&&P?k:G(A,{el:1,id:1});z=function(X,$){var fa=a.byId(A.id,X.ownerDocument||X);if(fa&&J(fa))if(9==X.nodeType)return q(fa,$);else if(R(fa,X))return q(fa,$)}}else if(U&&/\{\s*\[native code\]\s*\}/.test(String(U))&&
A.classes.length&&!i){J=G(A,{el:1,classes:1,id:1});var Y=A.classes.join(" ");z=function(X,$,fa){$=q(0,$);for(var ha,ga=0,ma=X.getElementsByClassName(Y);ha=ma[ga++];)J(ha,X)&&ia(ha,fa)&&$.push(ha);return $}}else if(!P&&!A.loops)z=function(X,$,fa){$=q(0,$);for(var ha=0,ga=X.getElementsByTagName(A.getTag());X=ga[ha++];)ia(X,fa)&&$.push(X);return $};else{J=G(A,{el:1,tag:1,id:1});z=function(X,$,fa){$=q(0,$);for(var ha,ga=0,ma=X.getElementsByTagName(A.getTag());ha=ma[ga++];)J(ha,X)&&ia(ha,fa)&&$.push(ha);
return $}}return Z[A.query]=z},S=function(A,z){A=q(A);for(var H,J,P=z.length,U,Y,X=0;X<P;X++){Y=[];H=z[X];J=A.length-1;if(J>0){U={};Y.nozip=true}J=M(H);for(var $=0;H=A[$];$++)J(H,Y,U);if(!Y.length)break;A=Y}return Y},W={},u={},x=function(A){var z=l(d(A));if(z.length==1){var H=M(z[0]);return function(J){if(J=H(J,new f))J.nozip=true;return J}}return function(J){return S(J,z)}},B=navigator.userAgent;B=a.isWebKit&&B.indexOf("WebKit/")>0&&parseFloat(B.split("WebKit/")[1])>528;var K=a.isIE?"commentStrip":
"nozip",O=!!g().querySelectorAll&&(!a.isSafari||a.isSafari>3.1||B),Q=/n\+\d|([^ ])?([>~+])([^ =])?/g,V=function(A,z,H,J){return H?(z?z+" ":"")+H+(J?" "+J:""):A},ca=function(A,z){A=A.replace(Q,V);if(O){var H=u[A];if(H&&!z)return H}if(H=W[A])return H;H=A.charAt(0);var J=-1==A.indexOf(" ");if(A.indexOf("#")>=0&&J)z=true;if(O&&!z&&">~+".indexOf(H)==-1&&(!a.isIE||A.indexOf(":")==-1)&&!(i&&A.indexOf(".")>=0)&&A.indexOf(":contains")==-1&&A.indexOf(":checked")==-1&&A.indexOf("|=")==-1){var P=">~+".indexOf(A.charAt(A.length-
1))>=0?A+" *":A;return u[A]=function(Y){try{if(!(9==Y.nodeType||J))throw"";var X=Y.querySelectorAll(P);X[K]=true;return X}catch($){return ca(A,true)(Y)}}}else{var U=A.split(/\s*,\s*/);return W[A]=U.length<2?x(A):function(Y){for(var X=0,$=[],fa;fa=U[X++];)$=$.concat(x(fa)(Y));return $}}},aa=0,da=a.isIE?function(A){return h?A.getAttribute("_uid")||A.setAttribute("_uid",++aa)||aa:A.uniqueID}:function(A){return A._uid||(A._uid=++aa)},ia=function(A,z){if(!z)return 1;A=da(A);if(!z[A])return z[A]=1;return 0},
ja="_zipIdx",la=function(A){if(A&&A.nozip)return f._wrap?f._wrap(A):A;var z=new f;if(!A||!A.length)return z;A[0]&&z.push(A[0]);if(A.length<2)return z;aa++;if(a.isIE&&h){var H=aa+"";A[0].setAttribute(ja,H);for(var J=1,P;P=A[J];J++){A[J].getAttribute(ja)!=H&&z.push(P);P.setAttribute(ja,H)}}else if(a.isIE&&A.commentStrip)try{for(J=1;P=A[J];J++)r(P)&&z.push(P)}catch(U){}else{if(A[0])A[0][ja]=aa;for(J=1;P=A[J];J++){A[J][ja]!=aa&&z.push(P);P[ja]=aa}}return z};a.query=function(A,z){f=a._NodeListCtor;if(!A)return new f;
if(A.constructor==f)return A;if(typeof A!="string")return new f(A);if(typeof z=="string"){z=a.byId(z);if(!z)return new f}z=z||g();var H=z.ownerDocument||z.documentElement;h=z.contentType&&z.contentType=="application/xml"||a.isOpera&&(z.doctype||H.toString()=="[object XMLDocument]")||!!H&&(a.isIE?H.xml:z.xmlVersion||H.xmlVersion);if((A=ca(A)(z))&&A.nozip&&!f._wrap)return A;return la(A)};a.query.pseudos=F;a._filterQueryResult=function(A,z,H){var J=new a._NodeListCtor,P=l(z);P=P.length==1&&!/[^\w#\.]/.test(z)?
G(P[0]):function(X){return dojo.query(z,H).indexOf(X)!=-1};for(var U=0,Y;Y=A[U];U++)P(Y)&&J.push(Y);return J}},b=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,i){if(f&&f.length)for(var j=0,h=f.length;j<h;++j)g.call(i||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){c(this.queryPortability||this.acme||a)});if(typeof define!="function")if(this.dojo){dojo.provide("dojo._base.query");dojo.require("dojo._base.NodeList");dojo.require("dojo._base.lang");c(this.queryPortability||this.acme||dojo)}else c(this.queryPortability||this.acme||b())})();
define("dojo/_base/xhr",["dojo/lib/kernel","dojo/_base/Deferred","dojo/_base/json","dojo/_base/lang","dojo/_base/query"],function(c){(function(){function b(p,s,t){if(t!==null){var v=p[s];if(typeof v=="string")p[s]=[v,t];else if(a.isArray(v))v.push(t);else p[s]=t}}var a=c,d=a.config;c.fieldToObject=function(p){var s=null;if(p=a.byId(p)){var t=p.name,v=(p.type||"").toLowerCase();if(t&&v&&!p.disabled)if(v=="radio"||v=="checkbox"){if(p.checked)s=p.value}else if(p.multiple){s=[];a.query("option",p).forEach(function(w){w.selected&&
s.push(w.value)})}else s=p.value}return s};c.formToObject=function(p){var s={};a.forEach(c.byId(p).elements,function(t){var v=t.name,w=(t.type||"").toLowerCase();if(v&&w&&"file|submit|image|reset|button|".indexOf(w)==-1&&!t.disabled){b(s,v,a.fieldToObject(t));if(w=="image")s[v+".x"]=s[v+".y"]=s[v].x=s[v].y=0}});return s};c.objectToQuery=function(p){var s=encodeURIComponent,t=[],v={};for(var w in p){var y=p[w];if(y!=v[w]){var C=s(w)+"=";if(a.isArray(y))for(var D=0;D<y.length;D++)t.push(C+s(y[D]));
else t.push(C+s(y))}}return t.join("&")};c.formToQuery=function(p){return a.objectToQuery(a.formToObject(p))};c.formToJson=function(p,s){return a.toJson(a.formToObject(p),s)};c.queryToObject=function(p){var s={};p=p.split("&");var t=decodeURIComponent;a.forEach(p,function(v){if(v.length){var w=v.split("=");v=t(w.shift());w=t(w.join("="));if(typeof s[v]=="string")s[v]=[s[v]];if(a.isArray(s[v]))s[v].push(w);else s[v]=w}});return s};c._blockAsync=false;var e=a._contentHandlers=c.contentHandlers={text:function(p){return p.responseText},
json:function(p){return a.fromJson(p.responseText||null)},"json-comment-filtered":function(p){c.config.useCommentedJson||console.warn("Consider using the standard mimetype:application/json. json-commenting can introduce security issues. To decrease the chances of hijacking, use the standard the 'json' handler and prefix your json with: {}&&\nUse djConfig.useCommentedJson=true to turn off this message.");p=p.responseText;var s=p.indexOf("/*"),t=p.lastIndexOf("*/");if(s==-1||t==-1)throw new Error("JSON was not comment filtered");
return a.fromJson(p.substring(s+2,t))},javascript:function(p){return a.eval(p.responseText)},xml:function(p){var s=p.responseXML;if(a.isIE&&(!s||!s.documentElement)){var t=function(v){return"MSXML"+v+".DOMDocument"};t=["Microsoft.XMLDOM",t(6),t(4),t(3),t(2)];a.some(t,function(v){try{var w=new ActiveXObject(v);w.async=false;w.loadXML(p.responseText);s=w}catch(y){return false}return true})}return s},"json-comment-optional":function(p){return p.responseText&&/^[^{\[]*\/\*/.test(p.responseText)?e["json-comment-filtered"](p):
e.json(p)}};c._ioSetArgs=function(p,s,t,v){var w={args:p,url:p.url},y=null;if(p.form){y=a.byId(p.form);var C=y.getAttributeNode("action");w.url=w.url||(C?C.value:null);y=a.formToObject(y)}C=[{}];y&&C.push(y);p.content&&C.push(p.content);p.preventCache&&C.push({"dojo.preventCache":(new Date).valueOf()});w.query=a.objectToQuery(a.mixin.apply(null,C));w.handleAs=p.handleAs||"text";var D=new a.Deferred(s);D.addCallbacks(t,function(G){return v(G,D)});var E=p.load;E&&a.isFunction(E)&&D.addCallback(function(G){return E.call(p,
G,w)});var F=p.error;F&&a.isFunction(F)&&D.addErrback(function(G){return F.call(p,G,w)});var I=p.handle;I&&a.isFunction(I)&&D.addBoth(function(G){return I.call(p,G,w)});if(d.ioPublish&&a.publish&&w.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=w;return D};var f=function(p){p.canceled=true;var s=p.ioArgs.xhr,t=typeof s.abort;
if(t=="function"||t=="object"||t=="unknown")s.abort();p=p.ioArgs.error;if(!p){p=new Error("xhr cancelled");p.dojoType="cancel"}return p},g=function(p){p=e[p.ioArgs.handleAs](p.ioArgs.xhr);return p===undefined?null:p},i=function(p,s){s.ioArgs.args.failOk||console.error(p);return p},j=null,h=[],k=0,l=function(p){if(k<=0){k=0;if(d.ioPublish&&a.publish&&(!p||p&&p.ioArgs.args.ioPublish!==false))a.publish("/dojo/io/stop")}},m=function(){var p=(new Date).getTime();if(!a._blockAsync)for(var s=0,t;s<h.length&&
(t=h[s]);s++){var v=t.dfd,w=function(){if(!v||v.canceled||!t.validCheck(v)){h.splice(s--,1);k-=1}else if(t.ioCheck(v)){h.splice(s--,1);t.resHandle(v);k-=1}else if(v.startTime)if(v.startTime+(v.ioArgs.args.timeout||0)<p){h.splice(s--,1);var C=new Error("timeout exceeded");C.dojoType="timeout";v.errback(C);v.cancel();k-=1}};if(c.config.debugAtAllCosts)w.call(this);else try{w.call(this)}catch(y){v.errback(y)}}l(v);if(!h.length){clearInterval(j);j=null}};c._ioCancelAll=function(){try{a.forEach(h,function(s){try{s.dfd.cancel()}catch(t){}})}catch(p){}};
a.isIE&&a.addOnWindowUnload(a._ioCancelAll);a._ioNotifyStart=function(p){if(d.ioPublish&&a.publish&&p.ioArgs.args.ioPublish!==false){k||a.publish("/dojo/io/start");k+=1;a.publish("/dojo/io/send",[p])}};a._ioWatch=function(p,s,t,v){var w=p.ioArgs.args;if(w.timeout)p.startTime=(new Date).getTime();h.push({dfd:p,validCheck:s,ioCheck:t,resHandle:v});j||(j=setInterval(m,50));w.sync&&m()};var q="application/x-www-form-urlencoded",r=function(p){return p.ioArgs.xhr.readyState},n=function(p){return 4==p.ioArgs.xhr.readyState},
o=function(p){var s=p.ioArgs.xhr;if(a._isDocumentOk(s))p.callback(p);else{var t=new Error("Unable to load "+p.ioArgs.url+" status:"+s.status);t.status=s.status;t.responseText=s.responseText;p.errback(t)}};c._ioAddQueryToUrl=function(p){if(p.query.length){p.url+=(p.url.indexOf("?")==-1?"?":"&")+p.query;p.query=null}};c.xhr=function(p,s,t){var v=a._ioSetArgs(s,f,g,i),w=v.ioArgs,y=w.xhr=a._xhrObj(w.args);if(!y){v.cancel();return v}if("postData"in s)w.query=s.postData;else if("putData"in s)w.query=s.putData;
else if("rawBody"in s)w.query=s.rawBody;else if(arguments.length>2&&!t||"POST|PUT".indexOf(p.toUpperCase())==-1)a._ioAddQueryToUrl(w);y.open(p,w.url,s.sync!==true,s.user||undefined,s.password||undefined);if(s.headers)for(var C in s.headers)if(C.toLowerCase()==="content-type"&&!s.contentType)s.contentType=s.headers[C];else s.headers[C]&&y.setRequestHeader(C,s.headers[C]);y.setRequestHeader("Content-Type",s.contentType||q);if(!s.headers||!("X-Requested-With"in s.headers))y.setRequestHeader("X-Requested-With",
"XMLHttpRequest");a._ioNotifyStart(v);if(c.config.debugAtAllCosts)y.send(w.query);else try{y.send(w.query)}catch(D){w.error=D;v.cancel()}a._ioWatch(v,r,n,o);return v};c.xhrGet=function(p){return a.xhr("GET",p)};c.rawXhrPost=c.xhrPost=function(p){return a.xhr("POST",p,true)};c.rawXhrPut=c.xhrPut=function(p){return a.xhr("PUT",p,true)};c.xhrDelete=function(p){return a.xhr("DELETE",p)}})();return c.xhr});
define("dojo/_base/fx",["dojo/lib/kernel","dojo/_base/Color","dojo/_base/connect","dojo/_base/lang","dojo/_base/html"],function(c){(function(){var b=c._mixin;c._Line=function(i,j){this.start=i;this.end=j};c._Line.prototype.getValue=function(i){return(this.end-this.start)*i+this.start};c.Animation=function(i){b(this,i);if(c.isArray(this.curve))this.curve=new c._Line(this.curve[0],this.curve[1])};c._Animation=c.Animation;c.extend(c.Animation,{duration:350,repeat:0,rate:20,_percent:0,_startRepeatCount:0,
_getStep:function(){var i=this._percent,j=this.easing;return j?j(i):i},_fire:function(i,j){j=j||[];if(this[i])if(c.config.debugAtAllCosts)this[i].apply(this,j);else try{this[i].apply(this,j)}catch(h){console.error("exception in animation handler for:",i);console.error(h)}return this},play:function(i,j){var h=this;h._delayTimer&&h._clearTimer();if(j){h._stopTimer();h._active=h._paused=false;h._percent=0}else if(h._active&&!h._paused)return h;h._fire("beforeBegin",[h.node]);i=i||h.delay;var k=c.hitch(h,
"_play",j);if(i>0){h._delayTimer=setTimeout(k,i);return h}k();return h},_play:function(){var i=this;i._delayTimer&&i._clearTimer();i._startTime=(new Date).valueOf();if(i._paused)i._startTime-=i.duration*i._percent;i._active=true;i._paused=false;var j=i.curve.getValue(i._getStep());if(!i._percent){if(!i._startRepeatCount)i._startRepeatCount=i.repeat;i._fire("onBegin",[j])}i._fire("onPlay",[j]);i._cycle();return i},pause:function(){var i=this;i._delayTimer&&i._clearTimer();i._stopTimer();if(!i._active)return i;
i._paused=true;i._fire("onPause",[i.curve.getValue(i._getStep())]);return i},gotoPercent:function(i,j){var h=this;h._stopTimer();h._active=h._paused=true;h._percent=i;j&&h.play();return h},stop:function(i){var j=this;j._delayTimer&&j._clearTimer();if(!j._timer)return j;j._stopTimer();if(i)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 i=
this;if(i._active){var j=((new Date).valueOf()-i._startTime)/i.duration;if(j>=1)j=1;i._percent=j;if(i.easing)j=i.easing(j);i._fire("onAnimate",[i.curve.getValue(j)]);if(i._percent<1)i._startTimer();else{i._active=false;if(i.repeat>0){i.repeat--;i.play(null,true)}else if(i.repeat==-1)i.play(null,true);else if(i._startRepeatCount){i.repeat=i._startRepeatCount;i._startRepeatCount=0}i._percent=0;i._fire("onEnd",[i.node]);!i.repeat&&i._stopTimer()}}return i},_clearTimer:function(){clearTimeout(this._delayTimer);
delete this._delayTimer}});var a=0,d=null,e={run:function(){}};c.extend(c.Animation,{_startTimer:function(){if(!this._timer){this._timer=c.connect(e,"run",this,"_cycle");a++}d||(d=setInterval(c.hitch(e,"run"),this.rate))},_stopTimer:function(){if(this._timer){c.disconnect(this._timer);this._timer=null;a--}if(a<=0){clearInterval(d);d=null;a=0}}});var f=c.isIE?function(i){var j=i.style;if(!j.width.length&&c.style(i,"width")=="auto")j.width="auto"}:function(){};c._fade=function(i){i.node=c.byId(i.node);
var j=b({properties:{}},i);i=j.properties.opacity={};i.start=!("start"in j)?function(){return+c.style(j.node,"opacity")||0}:j.start;i.end=j.end;i=c.animateProperty(j);c.connect(i,"beforeBegin",c.partial(f,j.node));return i};c.fadeIn=function(i){return c._fade(b({end:1},i))};c.fadeOut=function(i){return c._fade(b({end:0},i))};c._defaultEasing=function(i){return 0.5+Math.sin((i+1.5)*Math.PI)/2};var g=function(i){this._properties=i;for(var j in i){var h=i[j];if(h.start instanceof c.Color)h.tempColor=
new c.Color}};g.prototype.getValue=function(i){var j={};for(var h in this._properties){var k=this._properties[h],l=k.start;if(l instanceof c.Color)j[h]=c.blendColors(l,k.end,i,k.tempColor).toCss();else c.isArray(l)||(j[h]=(k.end-l)*i+l+(h!="opacity"?k.units||"px":0))}return j};c.animateProperty=function(i){var j=i.node=c.byId(i.node);if(!i.easing)i.easing=c._defaultEasing;i=new c.Animation(i);c.connect(i,"beforeBegin",i,function(){var h={};for(var k in this.properties){if(k=="width"||k=="height")this.node.display=
"block";var l=this.properties[k];if(c.isFunction(l))l=l(j);l=h[k]=b({},c.isObject(l)?l:{end:l});if(c.isFunction(l.start))l.start=l.start(j);if(c.isFunction(l.end))l.end=l.end(j);var m=k.toLowerCase().indexOf("color")>=0,q=function(r,n){var o={height:r.offsetHeight,width:r.offsetWidth}[n];if(o!==undefined)return o;o=c.style(r,n);return n=="opacity"?+o:m?o:parseFloat(o)};if("end"in l){if(!("start"in l))l.start=q(j,k)}else l.end=q(j,k);if(m){l.start=new c.Color(l.start);l.end=new c.Color(l.end)}else l.start=
k=="opacity"?+l.start:parseFloat(l.start)}this.curve=new g(h)});c.connect(i,"onAnimate",c.hitch(c,"style",i.node));return i};c.anim=function(i,j,h,k,l,m){return c.animateProperty({node:i,duration:h||c.Animation.prototype.duration,properties:j,easing:k,onEnd:l}).play(m||0)}})();return c.animateProperty});
define("dojo",["dojo/lib/kernel","dojo/_base/lang","dojo/_base/array","dojo/_base/declare","dojo/_base/connect","dojo/_base/Deferred","dojo/_base/json","dojo/_base/Color","dojo/_base/window","dojo/_base/event","dojo/_base/html","dojo/_base/NodeList","dojo/_base/query","dojo/_base/xhr","dojo/_base/fx"],function(c){return c});
define("orion/serviceregistry",["dojo"],function(c){function b(g,i,j){this.serviceId=g;this.name=i;this.properties=j}function a(g,i,j){this.serviceId=g;this.serviceReference=i;this.internalRegistry=j}function d(g,i,j){this.serviceId=g;this.implementation=i;this.internalRegistry=j;var h;for(h in i)if(typeof i[h]==="function")this[h]=function(k){return function(){if(j.isRegistered(g)){var l=new c.Deferred;try{var m=i[k].apply(i,Array.prototype.slice.call(arguments));c.when(m,c.hitch(l,l.resolve),c.hitch(l,
l.reject),c.hitch(l,l.progress))}catch(q){l.reject(q)}return l}throw new Error("Service was unregistered");}}(h)}function e(){this._namedlisteners={}}function f(){this._entries=[];this._namedReferences={};this._serviceEventTarget=new e;var g=this;this.internalRegistry={isRegistered:function(i){return g._entries[i]?true:false},unregisterService:function(i){var j=g._entries[i];if(j){for(var h=j.reference,k=g._namedReferences[h.getName()],l=0;l<k.length;l++)if(k[l]===h){if(k.length===1)delete g._namedReferences[h.getName()];
else k.splice(l,1);break}g._entries[i]=null;g._serviceEventTarget.dispatchEvent("serviceRemoved",h,j.service)}},dispatchEvent:function(i,j){var h=g._entries[i];h&&h.eventTarget.dispatchEvent.apply(h.eventTarget,[j].concat(Array.prototype.slice.call(arguments,2)))},addEventListener:function(i,j,h){(i=g._entries[i])&&i.eventTarget.addEventListener(j,h)},removeEventListener:function(i,j,h){(i=g._entries[i])&&i.eventTarget.removeEventListener(j,h)}}}b.prototype={getServiceId:function(){return this.serviceId},
getName:function(){return this.name},getPropertyNames:function(){var g=[],i;for(i in this.properties)this.properties.hasOwnProperty(i)&&g.push(i);return g},getProperty:function(g){return this.properties[g]}};b.prototype.constructor=b;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,i){this.internalRegistry.addEventListener(this.serviceId,g,i)},removeEventListener:function(g,i){this.internalRegistry.removeEventListener(this.serviceId,g,i)}};d.prototype.constructor=d;e.prototype={dispatchEvent:function(g){var i=this._namedlisteners[g];if(i)for(var j=0;j<i.length;j++)try{var h=Array.prototype.slice.call(arguments,1);i[j].apply(null,h)}catch(k){console.log(k)}},addEventListener:function(g,i){this._namedlisteners[g]=
this._namedlisteners[g]||[];this._namedlisteners[g].push(i)},removeEventListener:function(g,i){var j=this._namedlisteners[g];if(j)for(var h=0;h<j.length;h++)if(j[h]===i){if(j.length===1)delete this._namedlisteners[g];else j.splice(h,1);break}}};e.prototype.constructor=e;f.prototype={getService:function(g){var i;if(typeof g==="string"){if(this._namedReferences[g])for(var j=0;j<this._namedReferences[g].length;j++)if(i=this._entries[this._namedReferences[g][j].getServiceId()].service)break}else i=this._entries[g.getServiceId()].service;
return i},getServiceReferences:function(g){if(g)return this._namedReferences[g]?this._namedReferences[g]:[];g=[];for(var i=0;i<this._entries.length;i++)this._entries[i]&&g.push(this._entries[i].reference);return g},registerService:function(g,i,j){var h=this._entries.length;j=new b(h,g,j);i=new d(h,i,this.internalRegistry);this._namedReferences[g]=this._namedReferences[g]||[];this._namedReferences[g].push(j);this._entries.push({reference:j,service:i,eventTarget:new e});this._serviceEventTarget.dispatchEvent("serviceAdded",
j,i);return new a(h,j,this.internalRegistry)},addEventListener:function(g,i){this._serviceEventTarget.addEventListener(g,i)},removeEventListener:function(g,i){this._serviceEventTarget.removeEventListener(g,i)}};f.prototype.constructor=f;return{ServiceReference:b,ServiceRegistration:a,Service:d,EventTarget:e,ServiceRegistry:f}});define("dijit",["dojo"],function(c){return dijit=c._dijit||{}});
define("orion/commonHTMLFragments",["require"],function(c){var b='<div id="staticBanner" class="layoutBlock topRowBanner"><a id="home" class="layoutLeft logo" href="'+c.toUrl("index.html")+'"><img src="'+c.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>';
c='<div class="layoutLeft pageActions" id="pageActions"></div><div class="layoutLeft pageActions" id="selectionTools"></div><img class="layoutRight progressPane" src="'+c.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:b,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:c}});
define("dojo/hash",["dojo"],function(c){(function(){function b(l,m){m=l.indexOf(m);return m>=0?l.substring(m+1):""}function a(){return b(location.href,"#")}function d(){c.publish("/dojo/hashchange",[a()])}function e(){if(a()!==i){i=a();d()}}function f(l){if(j)if(j.isTransitioning())setTimeout(c.hitch(null,f,l),k);else{var m=j.iframe.location.href,q=m.indexOf("?");j.iframe.location.replace(m.substring(0,q)+"?"+l)}else{location.replace("#"+l);!h&&e()}}function g(){function l(){i=a();r=s?i:b(t.href,
"?");n=false;o=null}var m=document.createElement("iframe"),q=c.config.dojoBlankHtmlUrl||c.moduleUrl("dojo","resources/blank.html");c.config.useXDomain&&!c.config.dojoBlankHtmlUrl&&console.warn("dojo.hash: When using cross-domain Dojo builds, please save dojo/resources/blank.html to your domain and set djConfig.dojoBlankHtmlUrl to the path on your domain to blank.html");m.id="dojo-hash-iframe";m.src=q+"?"+a();m.style.display="none";document.body.appendChild(m);this.iframe=c.global["dojo-hash-iframe"];
var r,n,o,p,s,t=this.iframe.location;this.isTransitioning=function(){return n};this.pollLocation=function(){if(!s)try{var v=b(t.href,"?");if(document.title!=p)p=this.iframe.document.title=document.title}catch(w){s=true;console.error("dojo.hash: Error adding history entry. Server unreachable.")}var y=a();if(n&&i===y)if(s||v===o){l();d()}else{setTimeout(c.hitch(this,this.pollLocation),0);return}else if(!(i===y&&(s||r===v)))if(i!==y){i=y;n=true;o=y;m.src=q+"?"+o;s=false;setTimeout(c.hitch(this,this.pollLocation),
0);return}else if(!s){location.href="#"+t.search.substring(1);l();d()}setTimeout(c.hitch(this,this.pollLocation),k)};l();setTimeout(c.hitch(this,this.pollLocation),k)}c.hash=function(l,m){if(!arguments.length)return a();if(l.charAt(0)=="#")l=l.substring(1);if(m)f(l);else location.href="#"+l;return l};var i,j,h,k=c.config.hashPollFrequency||100;c.addOnLoad(function(){if("onhashchange"in c.global&&(!c.isIE||c.isIE>=8&&document.compatMode!="BackCompat"))h=c.connect(c.global,"onhashchange",d);else if(document.addEventListener){i=
a();setInterval(e,k)}else if(document.attachEvent)j=new g})})();return c.hash});
(function(){var c=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],b=/^\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(i,j){var h=e.createXhr();h.open("GET",i,true);h.onreadystatechange=function(){h.readyState===4&&j(h.responseText)};h.send(null)};else if(typeof process!=="undefined"&&process.versions&&
process.versions.node){g=require.nodeRequire("fs");f=function(i,j){j(g.readFileSync(i,"utf8"))}}else if(typeof Packages!=="undefined")f=function(i,j){var h=new java.io.File(i);i=java.lang.System.getProperty("line.separator");h=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(h),"utf-8"));var k,l,m="";try{k=new java.lang.StringBuffer;if((l=h.readLine())&&l.length()&&l.charAt(0)===65279)l=l.substring(1);for(k.append(l);(l=h.readLine())!==null;){k.append(i);k.append(l)}m=
String(k.toString())}finally{h.close()}j(m)};return e={version:"0.24.0",strip:function(i){if(i){i=i.replace(b,"");var j=i.match(a);if(j)i=j[1]}else i="";return i},jsEscape:function(i){return i.replace(/(['\\])/g,"\\$1").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r")},createXhr:function(){var i,j,h;if(typeof XMLHttpRequest!=="undefined")return new XMLHttpRequest;else for(j=0;j<3;j++){h=c[j];try{i=new ActiveXObject(h)}catch(k){}if(i){c=
[h];break}}if(!i)throw new Error("require.getXhr(): XMLHttpRequest not available");return i},get:f,load:function(i,j,h,k){var l=false,m=i.indexOf("."),q=i.substring(0,m),r=i.substring(m+1,i.length);m=r.indexOf("!");if(m!==-1){l=r.substring(m+1,r.length);l=l==="strip";r=r.substring(0,m)}j=j.nameToUrl(q,"."+r);e.get(j,function(n){n=l?e.strip(n):n;if(k.isBuild&&k.inlineText)d[i]=n;h(n)})},write:function(i,j,h){if(j in d){var k=e.jsEscape(d[j]);h("define('"+i+"!"+j+"', function () { return '"+k+"';});\n")}}}})})();
define("text!dijit/form/templates/ValidationTextBox.html",function(){return'<div class="dijit dijitReset dijitInlineTable dijitLeft"\n\tid="widget_${id}" role="presentation"\n\t><div class=\'dijitReset dijitValidationContainer\'\n\t\t><input class="dijitReset dijitInputField dijitValidationIcon dijitValidationInner" value="&#935; " type="text" tabIndex="-1" readonly="readonly" role="presentation"\n\t/></div\n\t><div class="dijitReset dijitInputField dijitInputContainer"\n\t\t><input class="dijitReset dijitInputInner" dojoAttachPoint=\'textbox,focusNode\' autocomplete="off"\n\t\t\t${!nameAttrSetting} type=\'${type}\'\n\t/></div\n></div>'});
define("dojo/i18n",["require","dojo"],function(c,b){b.getObject("i18n",true,b);b.i18n.getLocalization=b.i18n.getLocalization||function(a,d,e){e=b.i18n.normalizeLocale(e);var f=e.split("-"),g=[a,"nls",d].join(".");if(typeof b.global.require!=="undefined"){var i=c("i18n!"+[a.replace(/\./g,"/"),"nls",d].join("/"));(b._loadedModules[g]=b._loadedModules[g]||{})[f.join("_")]=i.root||i}if(g=b._loadedModules[g]){var j;for(i=f.length;i>0;i--){var h=f.slice(0,i).join("_");if(g[h]){j=g[h];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);};b.i18n.normalizeLocale=function(a){a=a?a.toLowerCase():b.locale;if(a=="root")a="ROOT";return a};b.i18n._requireLocalization=function(a,d,e,f){e=b.i18n.normalizeLocale(e);var g=[a,"nls",d].join("."),i="";if(f){for(var j=f.split(","),h=0;h<j.length;h++)if(e.indexOf(j[h])==0)if(j[h].length>i.length)i=j[h];i||(i="ROOT")}j=f?i:e;var k=b._loadedModules[g];h=null;if(k){if(b.config.localizationComplete&&
k._built)return;h=j.replace(/-/g,"_");h=b._loadedModules[g+"."+h]}if(!h){k=b.provide(g);var l=b._getModuleSymbols(a).concat("nls").join("/"),m;b.i18n._searchLocalePath(j,f,function(q){var r=q.replace(/-/g,"_"),n=g+"."+r,o=false;if(b._loadedModules[n])o=true;else{b.provide(n);n=[l];q!="ROOT"&&n.push(q);n.push(d);q=n.join("/")+".js";o=b._loadPath(q,null,function(p){p=p.root||p;var s=function(){};s.prototype=m;k[r]=new s;for(var t in p)k[r][t]=p[t]})}if(o&&k[r])m=k[r];else k[r]=m;if(f)return true})}if(f&&
e!=i)k[e.replace(/-/g,"_")]=k[i.replace(/-/g,"_")]};(function(){var a=b.config.extraLocale;if(a){if(!a instanceof Array)a=[a];var d=b.i18n._requireLocalization;b.i18n._requireLocalization=function(e,f,g,i){d(e,f,g,i);if(!g)for(g=0;g<a.length;g++)d(e,f,a[g],i)}}})();b.i18n._searchLocalePath=function(a,d,e){a=b.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};b.i18n._preloadLocalizations=
function(a,d){function e(i){i=b.i18n.normalizeLocale(i);b.i18n._searchLocalePath(i,true,function(j){for(var h=0;h<d.length;h++)if(d[h]==j){b.require(a+"_"+j);return true}return false})}e();for(var f=b.config.extraLocale||[],g=0;g<f.length;g++)e(f[g])};return b.i18n});define("text!dijit/form/templates/TextBox.html",function(){return'<div class="dijit dijitReset dijitInline dijitLeft" id="widget_${id}" role="presentation"\n\t><div class="dijitReset dijitInputField dijitInputContainer"\n\t\t><input class="dijitReset dijitInputInner" dojoAttachPoint=\'textbox,focusNode\' autocomplete="off"\n\t\t\t${!nameAttrSetting} type=\'${type}\'\n\t/></div\n></div>'});
define("dojo/window",["dojo"],function(c){c.getObject("window",true,c);c.window.getBox=function(){var b=c.doc.compatMode=="BackCompat"?c.body():c.doc.documentElement,a=c._docScroll();return{w:b.clientWidth,h:b.clientHeight,l:a.x,t:a.y}};c.window.get=function(b){if(c.isIE&&window!==document.parentWindow){b.parentWindow.execScript("document._parentWindow = window;","Javascript");var a=b._parentWindow;b._parentWindow=null;return a}return b.parentWindow||b.defaultView};c.window.scrollIntoView=function(b,
a){try{b=c.byId(b);var d=b.ownerDocument||c.doc,e=d.body||c.body(),f=d.documentElement||e.parentNode,g=c.isIE,i=c.isWebKit;if((!(c.isMoz||g||i||c.isOpera)||b==e||b==f)&&typeof b.scrollIntoView!="undefined")b.scrollIntoView(false);else{var j=d.compatMode=="BackCompat",h=g>=9&&b.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=i?e:h;var k=h.clientWidth,l=h.clientHeight,
m=!c._isBodyLtr(),q=a||c.position(b),r=b.parentNode;a=function(F){return g<=6||g&&j?false:c.style(F,"position").toLowerCase()=="fixed"};if(!a(b))for(;r;){if(r==e)r=d;var n=c.position(r),o=a(r);if(r==d){n.w=k;n.h=l;if(d==f&&g&&m)n.x+=d.offsetWidth-n.w;if(n.x<0||!g)n.x=0;if(n.y<0||!g)n.y=0}else{var p=c._getPadBorderExtents(r);n.w-=p.w;n.h-=p.h;n.x+=p.l;n.y+=p.t;var s=r.clientWidth,t=n.w-s;if(s>0&&t>0){n.w=s;n.x+=m&&(g||r.clientLeft>p.l)?t:0}s=r.clientHeight;t=n.h-s;if(s>0&&t>0)n.h=s}if(o){if(n.y<0){n.h+=
n.y;n.y=0}if(n.x<0){n.w+=n.x;n.x=0}if(n.y+n.h>l)n.h=l-n.y;if(n.x+n.w>k)n.w=k-n.x}var v=q.x-n.x,w=q.y-Math.max(n.y,0),y=v+q.w-n.w,C=w+q.h-n.h;if(y*v>0){var D=Math[v<0?"max":"min"](v,y);if(m&&(g==8&&!j||g>=9))D=-D;q.x+=r.scrollLeft;r.scrollLeft+=D;q.x-=r.scrollLeft}if(C*w>0){q.y+=r.scrollTop;r.scrollTop+=Math[w<0?"max":"min"](w,C);q.y-=r.scrollTop}r=r!=d&&!o&&r.parentNode}}}catch(E){console.error("scrollIntoView: "+E);b.scrollIntoView(false)}};return c.window});
define("dijit/_base/manager",["dojo","dijit"],function(c,b){c.declare("dijit.WidgetSet",null,{constructor:function(){this._hash={};this.length=0},add:function(a){if(this._hash[a.id])throw new Error("Tried to register widget with id=="+a.id+" but that id is already registered");this._hash[a.id]=a;this.length++},remove:function(a){if(this._hash[a]){delete this._hash[a];this.length--}},forEach:function(a,d){d=d||c.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||c.global;var e=new b.WidgetSet,f=0,g;for(g in this._hash){var i=this._hash[g];a.call(d,i,f++,this._hash)&&e.add(i)}return e},byId:function(a){return this._hash[a]},byClass:function(a){var d=new b.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 c.map(this.toArray(),a,d)},every:function(a,d){d=d||c.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||c.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(){b.registry=new b.WidgetSet;var a=b.registry._hash,d=c.attr,e=c.hasAttr,f=c.style;b.byId=function(h){return typeof h=="string"?a[h]:h};var g={};b.getUniqueId=function(h){var k;do k=h+"_"+(h in g?++g[h]:(g[h]=0));while(a[k]);return b._scopeName=="dijit"?k:b._scopeName+"_"+k};b.findWidgets=function(h){function k(m){for(m=
m.firstChild;m;m=m.nextSibling)if(m.nodeType==1){var q=m.getAttribute("widgetId");if(q)(q=a[q])&&l.push(q);else k(m)}}var l=[];k(h);return l};b._destroyAll=function(){b._curFocus=null;b._prevFocus=null;b._activeStack=[];c.forEach(b.findWidgets(c.body()),function(h){if(!h._destroyed)if(h.destroyRecursive)h.destroyRecursive();else h.destroy&&h.destroy()})};c.isIE&&c.addOnWindowUnload(function(){b._destroyAll()});b.byNode=function(h){return a[h.getAttribute("widgetId")]};b.getEnclosingWidget=function(h){for(;h;){var k=
h.getAttribute&&h.getAttribute("widgetId");if(k)return a[k];h=h.parentNode}return null};var i=b._isElementShown=function(h){var k=f(h);return k.visibility!="hidden"&&k.visibility!="collapsed"&&k.display!="none"&&d(h,"type")!="hidden"};b.hasDefaultTabStop=function(h){switch(h.nodeName.toLowerCase()){case "a":return e(h,"href");case "area":case "button":case "input":case "object":case "select":case "textarea":return true;case "iframe":var k;try{var l=h.contentDocument;if("designMode"in l&&l.designMode==
"on")return true;k=l.body}catch(m){try{k=h.contentWindow.document.body}catch(q){return false}}return k.contentEditable=="true"||k.firstChild&&k.firstChild.contentEditable=="true";default:return h.contentEditable=="true"}};var j=b.isTabNavigable=function(h){return d(h,"disabled")?false:e(h,"tabIndex")?d(h,"tabIndex")>=0:b.hasDefaultTabStop(h)};b._getTabNavigable=function(h){function k(v){return v&&v.tagName.toLowerCase()=="input"&&v.type&&v.type.toLowerCase()=="radio"&&v.name&&v.name.toLowerCase()}
function l(v){return s[k(v)]||v}var m,q,r,n,o,p,s={},t=function(v){c.query("> *",v).forEach(function(w){if(!(c.isIE&&w.scopeName!=="HTML"||!i(w))){if(j(w)){var y=d(w,"tabIndex");if(!e(w,"tabIndex")||y==0){m||(m=w);q=w}else if(y>0){if(!r||y<n){n=y;r=w}if(!o||y>=p){p=y;o=w}}y=k(w);if(c.attr(w,"checked")&&y)s[y]=w}w.nodeName.toUpperCase()!="SELECT"&&t(w)}})};i(h)&&t(h);return{first:l(m),last:l(q),lowest:l(r),highest:l(o)}};b.getFirstInTabbingOrder=function(h){h=b._getTabNavigable(c.byId(h));return h.lowest?
h.lowest:h.first};b.getLastInTabbingOrder=function(h){h=b._getTabNavigable(c.byId(h));return h.last?h.last:h.highest};b.defaultDuration=c.config.defaultDuration||200})();return b});
define("dojo/Stateful",["dojo"],function(c){c.declare("dojo.Stateful",null,{postscript:function(b){b&&c.mixin(this,b)},get:function(b){return this[b]},set:function(b,a){if(typeof b==="object"){for(var d in b)this.set(d,b[d]);return this}d=this[b];this[b]=a;this._watchCallbacks&&this._watchCallbacks(b,d,a);return this},watch:function(b,a){var d=this._watchCallbacks;if(!d){var e=this;d=this._watchCallbacks=function(g,i,j,h){var k=function(l){if(l){l=l.slice();for(var m=0,q=l.length;m<q;m++)try{l[m].call(e,
g,i,j)}catch(r){console.error(r)}}};k(d["_"+g]);h||k(d["*"])}}if(!a&&typeof b==="function"){a=b;b="*"}else b="_"+b;var f=d[b];if(typeof f!=="object")f=d[b]=[];f.push(a);return{unwatch:function(){f.splice(c.indexOf(f,a),1)}}}});return c.Stateful});
define("dijit/_WidgetBase",["dojo","dijit","dijit/_base/manager","dojo/Stateful"],function(c,b){(function(){c.declare("dijit._WidgetBase",c.Stateful,{id:"",lang:"",dir:"","class":"",style:"",title:"",tooltip:"",baseClass:"",srcNodeRef:null,domNode:null,containerNode:null,attributeMap:{id:"",dir:"",lang:"","class":"",style:"",title:""},_blankGif:(c.config.blankGif||c.moduleUrl("dojo","resources/blank.gif")).toString(),postscript:function(a,d){this.create(a,d)},create:function(a,d){this.srcNodeRef=
c.byId(d);this._connects=[];this._subscribes=[];if(this.srcNodeRef&&typeof this.srcNodeRef.id=="string")this.id=this.srcNodeRef.id;if(a){this.params=a;c._mixin(this,a)}this.postMixInProperties();if(!this.id)this.id=b.getUniqueId(this.declaredClass.replace(/\./g,"_"));b.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);c.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(c.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||c.create("div");if(this.baseClass){var a=this.baseClass.split(" ");this.isLeftToRight()||(a=a.concat(c.map(a,function(d){return d+"Rtl"})));c.addClass(this.domNode,a)}},postCreate:function(){},startup:function(){this._started=true},destroyRecursive:function(a){this._beingDestroyed=true;this.destroyDescendants(a);this.destroy(a)},
destroy:function(a){this._beingDestroyed=true;this.uninitialize();var d=c.forEach,e=c.unsubscribe;d(this._connects,function(f){d(f,c.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);b.registry.remove(this.id);this._destroyed=true},destroyRendering:function(a){if(this.bgIframe){this.bgIframe.destroy(a);delete this.bgIframe}if(this.domNode){a?c.removeAttr(this.domNode,
"widgetId"):c.destroy(this.domNode);delete this.domNode}if(this.srcNodeRef){a||c.destroy(this.srcNodeRef);delete this.srcNodeRef}},destroyDescendants:function(a){c.forEach(this.getChildren(),function(d){d.destroyRecursive&&d.destroyRecursive(a)})},uninitialize:function(){return false},_setClassAttr:function(a){c.replaceClass(this[this.attributeMap["class"]||"domNode"],a,this["class"]);this._set("class",a)},_setStyleAttr:function(a){var d=this[this.attributeMap.style||"domNode"];if(c.isObject(a))c.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];c.forEach(c.isArray(e)?e:[e],function(f){var g=this[f.node||f||"domNode"];switch(f.type||"attribute"){case "attribute":if(c.isFunction(d))d=c.hitch(this,d);f=f.attribute?f.attribute:/^on[A-Z][a-zA-Z]*$/.test(a)?a.toLowerCase():a;c.attr(g,f,d);break;case "innerText":g.innerHTML="";g.appendChild(c.doc.createTextNode(d));break;case "innerHTML":g.innerHTML=
d;break;case "class":c.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?c.query("[widgetId]",this.containerNode).map(b.byNode):[]},getChildren:function(){return this.containerNode?b.findWidgets(this.containerNode):
[]},connect:function(a,d,e){a=[c._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){c.forEach(a,c.disconnect);this._connects.splice(d,1);return}},subscribe:function(a,d){a=c.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){c.unsubscribe(a);this._subscribes.splice(d,1);return}},isLeftToRight:function(){return this.dir?
this.dir=="ltr":c._isBodyLtr()},placeAt:function(a,d){a.declaredClass&&a.addChild?a.addChild(this,d):c.place(this.domNode,a,d);return this}})})();return b._WidgetBase});
define("dijit/_base/focus",["dojo","dijit","dojo/window","dijit/_base/manager"],function(c,b){c.mixin(b,{_curFocus:null,_prevFocus:null,isCollapsed:function(){return b.getBookmark().isCollapsed},getBookmark:function(){var a,d,e=c.doc.selection,f=b._curFocus;if(c.global.getSelection){if(e=c.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=c.doc;if(a=a.mark)if(c.global.getSelection){var e=c.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(c.isArray(a)){f=d.body.createControlRange();c.forEach(a,function(g){f.addElement(g)})}else{f=d.body.createTextRange();f.moveToBookmark(a)}f.select()}},getFocus:function(a,d){a=!b._curFocus||a&&c.isDescendant(b._curFocus,a.domNode)?b._prevFocus:b._curFocus;return{node:a,bookmark:a==b._curFocus&&c.withGlobal(d||
c.global,b.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(i){}b._onFocusNode(d)}if(e&&c.withGlobal(a||c.global,b.isCollapsed)&&!f){a&&a.focus();try{c.withGlobal(a||c.global,b.moveToBookmark,null,[e])}catch(j){}}}},_activeStack:[],registerIframe:function(a){return b.registerWin(a.contentWindow,a)},unregisterIframe:function(a){b.unregisterWin(a)},
registerWin:function(a,d){var e=function(k){b._justMouseDowned=true;setTimeout(function(){b._justMouseDowned=false},0);c.isIE&&k&&k.srcElement&&k.srcElement.parentNode==null||b._onTouchNode(d||k.target||k.srcElement,"mouse")},f=c.isIE?a.document.documentElement:a.document;if(f)if(c.isIE){a.document.body.attachEvent("onmousedown",e);var g=function(k){k.srcElement.tagName.toLowerCase()!="#document"&&b.isTabNavigable(k.srcElement)?b._onFocusNode(d||k.srcElement):b._onTouchNode(d||k.srcElement)};f.attachEvent("onactivate",
g);var i=function(k){b._onBlurNode(d||k.srcElement)};f.attachEvent("ondeactivate",i);return function(){a.document.detachEvent("onmousedown",e);f.detachEvent("onactivate",g);f.detachEvent("ondeactivate",i);f=null}}else{f.body.addEventListener("mousedown",e,true);var j=function(k){b._onFocusNode(d||k.target)};f.addEventListener("focus",j,true);var h=function(k){b._onBlurNode(d||k.target)};f.addEventListener("blur",h,true);return function(){f.body.removeEventListener("mousedown",e,true);f.removeEventListener("focus",
j,true);f.removeEventListener("blur",h,true);f=null}}},unregisterWin:function(a){a&&a()},_onBlurNode:function(){b._prevFocus=b._curFocus;b._curFocus=null;if(!b._justMouseDowned){b._clearActiveWidgetsTimer&&clearTimeout(b._clearActiveWidgetsTimer);b._clearActiveWidgetsTimer=setTimeout(function(){delete b._clearActiveWidgetsTimer;b._setStack([]);b._prevFocus=null},100)}},_onTouchNode:function(a,d){if(b._clearActiveWidgetsTimer){clearTimeout(b._clearActiveWidgetsTimer);delete b._clearActiveWidgetsTimer}var e=
[];try{for(;a;){var f=c.attr(a,"dijitPopupParent");if(f)a=b.byId(f).domNode;else if(a.tagName&&a.tagName.toLowerCase()=="body"){if(a===c.body())break;a=c.window.get(a.ownerDocument).frameElement}else{var g=a.getAttribute&&a.getAttribute("widgetId"),i=g&&b.byId(g);i&&!(d=="mouse"&&i.get("disabled"))&&e.unshift(g);a=a.parentNode}}}catch(j){}b._setStack(e,d)},_onFocusNode:function(a){if(a)if(a.nodeType!=9){b._onTouchNode(a);if(a!=b._curFocus){if(b._curFocus)b._prevFocus=b._curFocus;b._curFocus=a;c.publish("focusNode",
[a])}}},_setStack:function(a,d){var e=b._activeStack;b._activeStack=a;for(var f=0;f<Math.min(e.length,a.length);f++)if(e[f]!=a[f])break;for(var g,i=e.length-1;i>=f;i--)if(g=b.byId(e[i])){g._focused=false;g.set("focused",false);g._hasBeenBlurred=true;g._onBlur&&g._onBlur(d);c.publish("widgetBlur",[g,d])}for(i=f;i<a.length;i++)if(g=b.byId(a[i])){g._focused=true;g.set("focused",true);g._onFocus&&g._onFocus(d);c.publish("widgetFocus",[g,d])}}});c.addOnLoad(function(){var a=b.registerWin(window);c.isIE&&
c.addOnWindowUnload(function(){b.unregisterWin(a);a=null})});return b});
define("dojo/AdapterRegistry",["dojo"],function(c){c.AdapterRegistry=function(b){this.pairs=[];this.returnWrappers=b||false};c.extend(c.AdapterRegistry,{register:function(b,a,d,e,f){this.pairs[f?"unshift":"push"]([b,a,d,e])},match:function(){for(var b=0;b<this.pairs.length;b++){var a=this.pairs[b];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(b){for(var a=0;a<this.pairs.length;a++)if(this.pairs[a][0]==
b){this.pairs.splice(a,1);return true}return false}});return c.AdapterRegistry});
define("dijit/_base/place",["dojo","dijit","dojo/window","dojo/AdapterRegistry"],function(c,b){b.getViewport=function(){return c.window.getBox()};b.placeOnScreen=function(a,d,e,f){e=c.map(e,function(g){var i={corner:g,pos:{x:d.x,y:d.y}};if(f){i.pos.x+=g.charAt(1)=="L"?f.x:-f.x;i.pos.y+=g.charAt(0)=="T"?f.y:-f.y}return i});return b._place(a,e)};b._place=function(a,d,e,f){var g=c.window.getBox();if(!a.parentNode||String(a.parentNode.tagName).toLowerCase()!="body")c.body().appendChild(a);var i=null;
c.some(d,function(h){var k=h.corner,l=h.pos,m=0,q={w:k.charAt(1)=="L"?g.l+g.w-l.x:l.x-g.l,h:k.charAt(1)=="T"?g.t+g.h-l.y:l.y-g.t};if(e){m=e(a,h.aroundCorner,k,q,f);m=typeof m=="undefined"?0:m}var r=a.style,n=r.display,o=r.visibility;r.visibility="hidden";r.display="";var p=c.marginBox(a);r.display=n;r.visibility=o;r=Math.max(g.l,k.charAt(1)=="L"?l.x:l.x-p.w);n=Math.max(g.t,k.charAt(0)=="T"?l.y:l.y-p.h);o=Math.min(g.l+g.w,k.charAt(1)=="L"?r+p.w:l.x);l=Math.min(g.t+g.h,k.charAt(0)=="T"?n+p.h:l.y);o=
o-r;l=l-n;m+=p.w-o+(p.h-l);if(i==null||m<i.overflow)i={corner:k,aroundCorner:h.aroundCorner,x:r,y:n,w:o,h:l,overflow:m,spaceAvailable:q};return!m});i.overflow&&e&&e(a,i.aroundCorner,i.corner,i.spaceAvailable,f);d=c._isBodyLtr();var j=a.style;j.top=i.y+"px";j[d?"left":"right"]=(d?i.x:g.w-i.x-i.w)+"px";return i};b.placeOnScreenAroundNode=function(a,d,e,f){d=c.byId(d);d=c.position(d,true);return b._placeOnScreenAroundRect(a,d.x,d.y,d.w,d.h,e,f)};b.placeOnScreenAroundRectangle=function(a,d,e,f){return b._placeOnScreenAroundRect(a,
d.x,d.y,d.width,d.height,e,f)};b._placeOnScreenAroundRect=function(a,d,e,f,g,i,j){var h=[];for(var k in i)h.push({aroundCorner:k,corner:i[k],pos:{x:d+(k.charAt(1)=="L"?0:f),y:e+(k.charAt(0)=="T"?0:g)}});return b._place(a,h,j,{w:f,h:g})};b.placementRegistry=new c.AdapterRegistry;b.placementRegistry.register("node",function(a,d){return typeof d=="object"&&typeof d.offsetWidth!="undefined"&&typeof d.offsetHeight!="undefined"},b.placeOnScreenAroundNode);b.placementRegistry.register("rect",function(a,
d){return typeof d=="object"&&"x"in d&&"y"in d&&"width"in d&&"height"in d},b.placeOnScreenAroundRectangle);b.placeOnScreenAroundElement=function(){return b.placementRegistry.match.apply(b.placementRegistry,arguments)};b.getPopupAroundAlignment=function(a,d){var e={};c.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 b});define("dijit/_base/window",["dojo","dijit","dojo/window"],function(c,b){b.getDocumentWindow=function(a){return c.window.get(a)};return b});
define("dijit/_base/popup",["dojo","dijit","dijit/_base/focus","dijit/_base/place","dijit/_base/window"],function(c,b){b.popup={_stack:[],_beginZIndex:1E3,_idGen:1,_createWrapper:function(a){var d=a.declaredClass?a._popupWrapper:a.parentNode&&c.hasClass(a.parentNode,"dijitPopup"),e=a.domNode||a;if(!d){d=c.create("div",{"class":"dijitPopup",style:{display:"none"},role:"presentation"},c.body());d.appendChild(e);e=e.style;e.display="";e.visibility="";e.position="";e.top="0px";if(a.declaredClass){a._popupWrapper=
d;c.connect(a,"destroy",function(){c.destroy(d);delete a._popupWrapper})}}return d},moveOffScreen:function(a){a=this._createWrapper(a);c.style(a,{visibility:"hidden",top:"-9999px",display:""})},hide:function(a){a=this._createWrapper(a);c.style(a,"display","none")},getTopPopup:function(){for(var a=this._stack,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():c._isBodyLtr())?{BL:"TL",BR:"TR",
TL:"BL",TR:"BR"}:{BR:"TR",BL:"TL",TR:"BR",TL:"BL"}),g=a.around,i=a.around&&a.around.id?a.around.id+"_dropdown":"popup_"+this._idGen++;d.length&&(!a.parent||!c.isDescendant(a.parent.domNode,d[d.length-1].widget.domNode));)b.popup.close(d[d.length-1].widget);var j=this._createWrapper(e);c.attr(j,{id:i,style:{zIndex:this._beginZIndex+d.length},"class":"dijitPopup "+(e.baseClass||e["class"]||"").split(" ")[0]+"Popup",dijitPopupParent:a.parent?a.parent.id:""});if(c.isIE||c.isMoz)if(!e.bgIframe)e.bgIframe=
new b.BackgroundIframe(j);f=g?b.placeOnScreenAroundElement(j,g,f,e.orient?c.hitch(e,"orient"):null):b.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(c.connect(j,"onkeypress",this,function(h){if(h.charOrCode==c.keys.ESCAPE&&a.onCancel){c.stopEvent(h);a.onCancel()}else if(h.charOrCode===c.keys.TAB){c.stopEvent(h);(h=this.getTopPopup())&&h.onCancel&&h.onCancel()}}));e.onCancel&&
g.push(c.connect(e,"onCancel",a.onCancel));g.push(c.connect(e,e.onExecute?"onExecute":"onChange",this,function(){var h=this.getTopPopup();h&&h.onExecute&&h.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&&c.some(d,function(i){return i.widget==a})||!a&&d.length;){var e=d.pop(),f=e.widget,g=e.onClose;f.onClose&&f.onClose();c.forEach(e.handlers,c.disconnect);
f&&f.domNode&&this.hide(f);g&&g()}}};b._frames=new (function(){var a=[];this.pop=function(){var d;if(a.length){d=a.pop();d.style.display=""}else{if(c.isIE<9){d="<iframe src='"+(c.config.dojoBlankHtmlUrl||c.moduleUrl("dojo","resources/blank.html")+""||'javascript:""')+"' style='position: absolute; left: 0px; top: 0px;z-index: -1; filter:Alpha(Opacity=\"0\");'>";d=c.doc.createElement(d)}else{d=c.create("iframe");d.src='javascript:""';d.className="dijitBackgroundIframe";c.style(d,"opacity",0.1)}d.tabIndex=
-1;b.setWaiRole(d,"presentation")}return d};this.push=function(d){d.style.display="none";a.push(d)}});b.BackgroundIframe=function(a){if(!a.id)throw new Error("no id");if(c.isIE||c.isMoz){var d=this.iframe=b._frames.pop();a.appendChild(d);if(c.isIE<7||c.isQuirks){this.resize(a);this._conn=c.connect(a,"onresize",this,function(){this.resize(a)})}else c.style(d,{width:"100%",height:"100%"})}};c.extend(b.BackgroundIframe,{resize:function(a){this.iframe&&c.style(this.iframe,{width:a.offsetWidth+"px",height:a.offsetHeight+
"px"})},destroy:function(){if(this._conn){c.disconnect(this._conn);this._conn=null}if(this.iframe){b._frames.push(this.iframe);delete this.iframe}}});return b.popup});define("dijit/_base/scroll",["dojo","dijit","dojo/window"],function(c,b){b.scrollIntoView=function(a,d){c.window.scrollIntoView(a,d)};return b.scrollIntoView});
define("dojo/uacss",["dojo"],function(c){(function(){var b=c.doc.documentElement,a=c.isIE,d=c.isOpera,e=Math.floor,f=c.isFF,g=c.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:c.isQuirks,dj_iequirks:a&&c.isQuirks,dj_opera:d,dj_khtml:c.isKhtml,dj_webkit:c.isWebKit,dj_safari:c.isSafari,dj_chrome:c.isChrome,dj_gecko:c.isMozilla,dj_ff3:e(f)==3};a["dj_"+g]=true;var i="";for(var j in a)if(a[j])i+=j+" ";b.className=c.trim(b.className+" "+i);c._loaders.unshift(function(){if(!c._isBodyLtr()){var h=
"dj_rtl dijitRtl "+i.replace(/ /g,"-rtl ");b.className=c.trim(b.className+" "+h)}})})();return c});define("dijit/_base/sniff",["dojo","dijit","dojo/uacss"],function(c,b){return b});
define("dijit/_base/typematic",["dojo","dijit"],function(c,b){b.typematic={_fireEventAndReload:function(){this._timer=null;this._callback(++this._count,this._node,this._evt);this._currentTimeout=Math.max(this._currentTimeout<0?this._initialDelay:this._subsequentDelay>1?this._subsequentDelay:Math.round(this._currentTimeout*this._subsequentDelay),this._minDelay);this._timer=setTimeout(c.hitch(this,"_fireEventAndReload"),this._currentTimeout)},trigger:function(a,d,e,f,g,i,j,h){if(g!=this._obj){this.stop();
this._initialDelay=j||500;this._subsequentDelay=i||0.9;this._minDelay=h||10;this._obj=g;this._evt=a;this._node=e;this._count=this._currentTimeout=-1;this._callback=c.hitch(d,f);this._fireEventAndReload();this._evt=c.mixin({faux:true},a)}},stop:function(){if(this._timer){clearTimeout(this._timer);this._timer=null}if(this._obj){this._callback(-1,this._node,this._evt);this._obj=null}},addKeyListener:function(a,d,e,f,g,i,j){if(d.keyCode){d.charOrCode=d.keyCode;c.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);c.deprecated("charCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.","","2.0")}return[c.connect(a,"onkeypress",this,function(h){if(h.charOrCode==d.charOrCode&&(d.ctrlKey===undefined||d.ctrlKey==h.ctrlKey)&&(d.altKey===undefined||d.altKey==h.altKey)&&(d.metaKey===undefined||d.metaKey==(h.metaKey||false))&&(d.shiftKey===undefined||d.shiftKey==h.shiftKey)){c.stopEvent(h);b.typematic.trigger(h,
e,a,f,d,g,i,j)}else b.typematic._obj==d&&b.typematic.stop()}),c.connect(a,"onkeyup",this,function(){b.typematic._obj==d&&b.typematic.stop()})]},addMouseListener:function(a,d,e,f,g,i){var j=c.connect;return[j(a,"mousedown",this,function(h){c.stopEvent(h);b.typematic.trigger(h,d,a,e,a,f,g,i)}),j(a,"mouseup",this,function(h){c.stopEvent(h);b.typematic.stop()}),j(a,"mouseout",this,function(h){c.stopEvent(h);b.typematic.stop()}),j(a,"mousemove",this,function(h){h.preventDefault()}),j(a,"dblclick",this,
function(h){c.stopEvent(h);if(c.isIE){b.typematic.trigger(h,d,a,e,a,f,g,i);setTimeout(c.hitch(this,b.typematic.stop),50)}})]},addListener:function(a,d,e,f,g,i,j,h){return this.addKeyListener(d,e,f,g,i,j,h).concat(this.addMouseListener(a,f,g,i,j,h))}};return b.typematic});
define("dijit/_base/wai",["dojo","dijit"],function(c,b){b.wai={onload:function(){var a=c.create("div",{id:"a11yTestNode",style:{cssText:'border: 1px solid;border-color:red green;position: absolute;height: 5px;top: -999px;background-image: url("'+(c.config.blankGif||c.moduleUrl("dojo","resources/blank.gif"))+'");'}},c.body()),d=c.getComputedStyle(a);if(d){var e=d.backgroundImage;c[d.borderTopColor==d.borderRightColor||e!=null&&(e=="none"||e=="url(invalid-url:)")?"addClass":"removeClass"](c.body(),
"dijit_a11y");if(c.isIE)a.outerHTML="";else c.body().removeChild(a)}}};if(c.isIE||c.isMoz)c._loaders.unshift(b.wai.onload);c.mixin(b,{hasWaiRole:function(a,d){a=this.getWaiRole(a);return d?a.indexOf(d)>-1:a.length>0},getWaiRole:function(a){return c.trim((c.attr(a,"role")||"").replace("wairole:",""))},setWaiRole:function(a,d){c.attr(a,"role",d)},removeWaiRole:function(a,d){var e=c.attr(a,"role");if(e)if(d){d=c.trim((" "+e+" ").replace(" "+d+" "," "));c.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 b});
define("dijit/_base",["dojo","dijit","dijit/_base/focus","dijit/_base/manager","dijit/_base/place","dijit/_base/popup","dijit/_base/scroll","dijit/_base/sniff","dijit/_base/typematic","dijit/_base/wai","dijit/_base/window"],function(c,b){return b._base});
define("dijit/_Widget",["dojo","dijit","dijit/_WidgetBase","dijit/_base"],function(c,b){c.connect(c,"_connect",function(a,d){a&&c.isFunction(a._onConnect)&&a._onConnect(d)});b._connectOnUseEventHandler=function(){};b._lastKeyDownNode=null;c.isIE?function(){var a=function(d){b._lastKeyDownNode=d.srcElement};c.doc.attachEvent("onkeydown",a);c.addOnWindowUnload(function(){c.doc.detachEvent("onkeydown",a)})}():c.doc.addEventListener("keydown",function(a){b._lastKeyDownNode=a.target},true);(function(){c.declare("dijit._Widget",
b._WidgetBase,{_deferredConnects:{onClick:"",onDblClick:"",onKeyDown:"",onKeyPress:"",onKeyUp:"",onMouseMove:"",onMouseDown:"",onMouseOut:"",onMouseOver:"",onMouseLeave:"",onMouseEnter:"",onMouseUp:""},onClick:b._connectOnUseEventHandler,onDblClick:b._connectOnUseEventHandler,onKeyDown:b._connectOnUseEventHandler,onKeyPress:b._connectOnUseEventHandler,onKeyUp:b._connectOnUseEventHandler,onMouseDown:b._connectOnUseEventHandler,onMouseMove:b._connectOnUseEventHandler,onMouseOut:b._connectOnUseEventHandler,
onMouseOver:b._connectOnUseEventHandler,onMouseLeave:b._connectOnUseEventHandler,onMouseEnter:b._connectOnUseEventHandler,onMouseUp:b._connectOnUseEventHandler,create:function(){this._deferredConnects=c.clone(this._deferredConnects);for(var a in this.attributeMap)delete this._deferredConnects[a];for(a in this._deferredConnects)this[a]!==b._connectOnUseEventHandler&&delete this._deferredConnects[a];this.inherited(arguments);if(this.domNode)for(a in this.params)this._onConnect(a)},_onConnect:function(a){if(a in
this._deferredConnects){this.connect(this[this._deferredConnects[a]||"domNode"],a.toLowerCase(),a);delete this._deferredConnects[a]}},focused:false,isFocusable:function(){return this.focus&&c.style(this.domNode,"display")!="none"},onFocus:function(){},onBlur:function(){},_onFocus:function(){this.onFocus()},_onBlur:function(){this.onBlur()},setAttribute:function(a,d){c.deprecated(this.declaredClass+"::setAttribute(attr, value) is deprecated. Use set() instead.","","2.0");this.set(a,d)},attr:function(a){if(c.config.isDebug){var d=
arguments.callee._ach||(arguments.callee._ach={}),e=(arguments.callee.caller||"unknown caller").toString();if(!d[e]){c.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=c._connect,g=this.inherited(arguments,[a,d=="ondijitclick"?"onclick":d,e]);if(d=="ondijitclick")if(c.indexOf(this.nodesWithKeyClick,
a.nodeName.toLowerCase())==-1){var i=c.hitch(this,e);g.push(f(a,"onkeydown",this,function(j){if((j.keyCode==c.keys.ENTER||j.keyCode==c.keys.SPACE)&&!j.ctrlKey&&!j.shiftKey&&!j.altKey&&!j.metaKey){b._lastKeyDownNode=j.target;"openDropDown"in this&&a==this._buttonNode||j.preventDefault()}}),f(a,"onkeyup",this,function(j){if((j.keyCode==c.keys.ENTER||j.keyCode==c.keys.SPACE)&&j.target==b._lastKeyDownNode&&!j.ctrlKey&&!j.shiftKey&&!j.altKey&&!j.metaKey){b._lastKeyDownNode=null;return i(j)}}))}return g},
_onShow:function(){this.onShow()},onShow:function(){},onHide:function(){},onClose:function(){return true}})})();return b._Widget});
define("dojo/string",["dojo"],function(c){c.getObject("string",true,c);c.string.rep=function(b,a){if(a<=0||!b)return"";for(var d=[];;){a&1&&d.push(b);if(!(a>>=1))break;b+=b}return d.join("")};c.string.pad=function(b,a,d,e){d||(d="0");b=String(b);a=c.string.rep(d,Math.ceil((a-b.length)/d.length));return e?b+a:a+b};c.string.substitute=function(b,a,d,e){e=e||c.global;d=d?c.hitch(e,d):function(f){return f};return b.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g,function(f,g,i){f=c.getObject(g,false,
a);if(i)f=c.getObject(i,false,e).call(e,f,g);return d(f,g).toString()})};c.string.trim=String.prototype.trim?c.trim:function(b){b=b.replace(/^\s+/,"");for(var a=b.length-1;a>=0;a--)if(/\S/.test(b.charAt(a))){b=b.substring(0,a+1);break}return b};return c.string});
define("dojo/date/stamp",["dojo"],function(c){c.getObject("date.stamp",true,c);c.date.stamp.fromISOString=function(b,a){if(!c.date.stamp._isoRegExp)c.date.stamp._isoRegExp=/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(.\d+)?)?((?:[+-](\d{2}):(\d{2}))|Z)?)?$/;var d=c.date.stamp._isoRegExp.exec(b);b=null;if(d){d.shift();d[1]&&d[1]--;if(d[6])d[6]*=1E3;if(a){a=new Date(a);c.forEach(c.map(["FullYear","Month","Date","Hours","Minutes","Seconds","Milliseconds"],function(g){return a["get"+
g]()}),function(g,i){d[i]=d[i]||g})}b=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)b.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-=b.getTimezoneOffset();e&&b.setTime(b.getTime()+e*6E4)}return b};c.date.stamp.toISOString=function(b,a){var d=function(i){return i<10?"0"+i:i};a=a||{};var e=[],f=a.zulu?"getUTC":"get",g="";if(a.selector!="time"){g=b[f+"FullYear"]();g=["0000".substr((g+"").length)+
g,d(b[f+"Month"]()+1),d(b[f+"Date"]())].join("-")}e.push(g);if(a.selector!="date"){g=[d(b[f+"Hours"]()),d(b[f+"Minutes"]()),d(b[f+"Seconds"]())].join(":");f=b[f+"Milliseconds"]();if(a.milliseconds)g+="."+(f<100?"0":"")+d(f);if(a.zulu)g+="Z";else if(a.selector!="time"){b=b.getTimezoneOffset();a=Math.abs(b);g+=(b>0?"-":"+")+d(Math.floor(a/60))+":"+d(a%60)}e.push(g)}return e.join("T")};return c.date.stamp});
define("dojo/parser",["dojo","dojo/date/stamp"],function(c){c.parser=new (function(){function b(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,h){switch(h){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(k){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,h){for(var k in j)if(k.charAt(0)!=
"_")k in g||(h[k]=b(j[k]));return h}function e(j,h){var k=i[j];if(k){if(!h&&!k.params)k.params=d(k.cls.prototype,{})}else{j=f.getObject(j);k=null;if(!j)return null;h||(k=d(j.prototype,{}));k={cls:j,params:k}}return k}var f=c,g={},i={};f.connect(f,"extend",function(){i={}});this._functionFromScript=function(j,h){var k="",l="";(h=j.getAttribute(h+"args")||j.getAttribute("args"))&&f.forEach(h.split(/\s*,\s*/),function(m,q){k+="var "+m+" = arguments["+q+"]; "});(h=j.getAttribute("with"))&&h.length&&f.forEach(h.split(/\s*,\s*/),
function(m){k+="with("+m+"){";l+="}"});return new Function(k+j.innerHTML+l)};this.instantiate=function(j,h,k){var l=[];h=h||{};k=k||{};var m=(k.scope||f._scopeName)+"Type",q="data-"+(k.scope||f._scopeName)+"-";f.forEach(j,function(r){if(r){var n,o,p,s,t,v;if(r.node){n=r.node;o=r.type;v=r.fastpath;s=(p=r.clsInfo||o&&e(o,v))&&p.cls;t=r.scripts}else{n=r;t=(s=(p=(o=m in h?h[m]:n.getAttribute(m))&&e(o))&&p.cls)&&(s._noScript||s.prototype._noScript)?[]:f.query("> script[type^='dojo/']",n)}if(!p)throw new Error("Could not load class '"+
o);var w={};k.defaults&&f._mixin(w,k.defaults);r.inherited&&f._mixin(w,r.inherited);if(v){if((p=n.getAttribute(q+"props"))&&p.length)try{p=f.fromJson.call(k.propsThis,"{"+p+"}");f._mixin(w,p)}catch(y){throw new Error(y.toString()+" in data-dojo-props='"+p+"'");}if(p=n.getAttribute(q+"attach-point"))w.dojoAttachPoint=p;if(p=n.getAttribute(q+"attach-event"))w.dojoAttachEvent=p;c.mixin(w,h)}else{r=n.attributes;for(var C in p.params){o=C in h?{value:h[C],specified:true}:r.getNamedItem(C);if(!(!o||!o.specified&&
(!c.isIE||C.toLowerCase()!="value"))){o=o.value;switch(C){case "class":o="className"in h?h.className:n.className;break;case "style":o="style"in h?h.style:n.style&&n.style.cssText}var D=p.params[C];w[C]=typeof o=="string"?a(o,D):o}}}var E=[],F=[];f.forEach(t,function(G){n.removeChild(G);var N=G.getAttribute(q+"event")||G.getAttribute("event"),L=G.getAttribute("type");G=f.parser._functionFromScript(G,q);if(N)if(L=="dojo/connect")E.push({event:N,func:G});else w[N]=G;else F.push(G)});var I=(t=s.markupFactory||
s.prototype&&s.prototype.markupFactory)?t(w,n,s):new s(w,n);l.push(I);(s=n.getAttribute(q+"id")||n.getAttribute("jsId"))&&f.setObject(s,I);f.forEach(E,function(G){f.connect(I,G.event,null,G.func)});f.forEach(F,function(G){G.call(I)})}});h._started||f.forEach(l,function(r){if(!k.noStart&&r&&c.isFunction(r.startup)&&!r._started&&(!r.getParent||!r.getParent()))r.startup()});return l};this.parse=function(j,h){function k(n,o){var p=c.clone(n.inherited);c.forEach(["dir","lang"],function(C){var D=n.node.getAttribute(C);
if(D)p[C]=D});for(var s=n.clsInfo&&!n.clsInfo.cls.prototype._noScript?n.scripts:null,t=!n.clsInfo||!n.clsInfo.cls.prototype.stopParser||h&&h.template,v=n.node.firstChild;v;v=v.nextSibling)if(v.nodeType==1){var w,y=t&&v.getAttribute(m+"type");w=y?y:t&&v.getAttribute(l);y=y==w;if(w){w={type:w,fastpath:y,clsInfo:e(w,y),node:v,scripts:[],inherited:p};o.push(w);k(w,o)}else if(s&&v.nodeName.toLowerCase()=="script")(w=v.getAttribute("type"))&&/^dojo\/\w/i.test(w)&&s.push(v);else t&&k({node:v,inherited:p},
o)}}if(!h&&j&&j.rootNode){h=j;j=h.rootNode}else j=j;j=j?c.byId(j):c.body();h=h||{};var l=(h.scope||f._scopeName)+"Type",m="data-"+(h.scope||f._scopeName)+"-",q={};if(h&&h.inherited)for(var r in h.inherited)if(h.inherited[r])q[r]=h.inherited[r];r=[];k({node:j,inherited:q},r);return this.instantiate(r,h&&h.template?{template:true}:null,h)}});(function(){var b=function(){c.config.parseOnLoad&&c.parser.parse()};c.getObject("dijit.wai.onload")===c._loaders[0]?c._loaders.splice(1,0,b):c._loaders.unshift(b)})();
return c.parser});
define("dojo/cache",["dojo"],function(c){var b={};c.cache=function(a,d,e){if(typeof a=="string")var f=c.moduleUrl(a,d);else{f=a;e=d}f=f.toString();var g=e;if(e!=undefined&&!c.isString(e))g="value"in e?e.value:undefined;e=e&&e.sanitize?true:false;if(typeof g=="string")g=b[f]=e?c.cache._sanitize(g):g;else if(g===null)delete b[f];else{if(!(f in b)){g=undefined;if(c.isFunction(require)&&c.isString(a))try{var i=(a?a.replace(/\./g,"/")+"/":"")+d;g=require("text!"+i)}catch(j){}if(typeof g==="undefined")g=
c._getText(f);b[f]=e?c.cache._sanitize(g):g}g=b[f]}return g};c.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 c.cache});
define("dijit/_Templated",["dojo","dijit","dijit/_Widget","dojo/string","dojo/parser","dojo/cache"],function(c,b){c.declare("dijit._Templated",null,{templateString:null,templatePath:null,widgetsInTemplate:false,_skipNodeCache:false,_earlyTemplatedStartup:false,constructor:function(){this._attachPoints=[];this._attachEvents=[]},_stringRepl:function(a){var d=this.declaredClass,e=this;return c.string.substitute(a,this,function(f,g){if(g.charAt(0)=="!")f=c.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=b._Templated.getCachedTemplate(this.templatePath,this.templateString,this._skipNodeCache),d;if(c.isString(a)){d=c._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=
c.parser.parse(d,{noStart:!this._earlyTemplatedStartup,template:true,inherited:{dir:this.dir,lang:this.lang},propsThis:this,scope:"dojo"});this._supportingWidgets=b.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(l,m){return l.getAttribute(m)};for(var e=c.isArray(a)?a:a.all||a.getElementsByTagName("*"),
f=c.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 i=d(g,"dojoAttachPoint")||d(g,"data-dojo-attach-point");if(i)for(var j=i.split(/\s*,\s*/);i=j.shift();){if(c.isArray(this[i]))this[i].push(g);else this[i]=g;this._attachPoints.push(i)}if(i=d(g,"dojoAttachEvent")||d(g,"data-dojo-attach-event")){j=i.split(/\s*,\s*/);for(var h=c.trim;i=j.shift();)if(i){var k=null;if(i.indexOf(":")!=-1){k=i.split(":");i=h(k[0]);k=h(k[1])}else i=
h(i);k||(k=i);this._attachEvents.push(this.connect(g,i,k))}}(i=d(g,"waiRole"))&&b.setWaiRole(g,i);(i=d(g,"waiState"))&&c.forEach(i.split(/\s*,\s*/),function(l){if(l.indexOf("-")!=-1){l=l.split("-");b.setWaiState(g,l[0],l[1])}})}}},startup:function(){c.forEach(this._startupWidgets,function(a){a&&!a._started&&a.startup&&a.startup()});this.inherited(arguments)},destroyRendering:function(){c.forEach(this._attachPoints,function(a){delete this[a]},this);this._attachPoints=[];c.forEach(this._attachEvents,
this.disconnect,this);this._attachEvents=[];this.inherited(arguments)}});b._Templated._templateCache={};b._Templated.getCachedTemplate=function(a,d,e){var f=b._Templated._templateCache,g=d||a,i=f[g];if(i){try{if(!i.ownerDocument||i.ownerDocument==c.doc)return i}catch(j){}c.destroy(i)}d||(d=c.cache(a,{sanitize:true}));d=c.string.trim(d);if(e||d.match(/\$\{([^\}]+)\}/g))return f[g]=d;else{a=c._toDom(d);if(a.nodeType!=1)throw new Error("Invalid template: "+d);return f[g]=a}};c.isIE&&c.addOnWindowUnload(function(){var a=
b._Templated._templateCache;for(var d in a){var e=a[d];typeof e=="object"&&c.destroy(e);delete a[d]}});c.extend(b._Widget,{dojoAttachEvent:"",dojoAttachPoint:"",waiRole:"",waiState:""});return b._Templated});
define("dijit/_CssStateMixin",["dojo","dijit"],function(c,b){c.declare("dijit._CssStateMixin",[],{cssStateNodes:{},hovering:false,active:false,_applyAttributes:function(){this.inherited(arguments);c.forEach(["onmouseenter","onmouseleave","onmousedown"],function(d){this.connect(this.domNode,d,"_cssMouseEvent")},this);c.forEach(["disabled","readOnly","checked","selected","focused","state","hovering","active"],function(d){this.watch(d,c.hitch(this,"_setStateClass"))},this);for(var a in this.cssStateNodes)this._trackMouseState(this[a],
this.cssStateNodes[a]);this._setStateClass()},_cssMouseEvent:function(a){if(!this.disabled)switch(a.type){case "mouseenter":case "mouseover":this._set("hovering",true);this._set("active",this._mouseDown);break;case "mouseleave":case "mouseout":this._set("hovering",false);this._set("active",false);break;case "mousedown":this._set("active",true);this._mouseDown=true;var d=this.connect(c.body(),"onmouseup",function(){this._mouseDown=false;this._set("active",false);this.disconnect(d)});break}},_setStateClass:function(){function a(j){d=
d.concat(c.map(d,function(h){return h+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={};c.forEach(e.className.split(" "),function(j){f[j]=true});"_stateClasses"in this&&c.forEach(this._stateClasses,
function(j){delete f[j]});c.forEach(d,function(j){f[j]=true});var g=[];for(var i in f)g.push(i);e.className=g.join(" ");this._stateClasses=d},_trackMouseState:function(a,d){function e(){var k="disabled"in j&&j.disabled||"readonly"in j&&j.readonly;c.toggleClass(a,d+"Hover",f&&!g&&!k);c.toggleClass(a,d+"Active",g&&!k);c.toggleClass(a,d+"Focused",i&&!k)}var f=false,g=false,i=false,j=this,h=c.hitch(this,"connect",a);h("onmouseenter",function(){f=true;e()});h("onmouseleave",function(){g=f=false;e()});
h("onmousedown",function(){g=true;e()});h("onmouseup",function(){g=false;e()});h("onfocus",function(){i=true;e()});h("onblur",function(){i=false;e()});this.watch("disabled",e);this.watch("readOnly",e)}});return b._CssStateMixin});
define("dijit/form/_FormWidget",["dojo","dijit","dojo/window","dijit/_Widget","dijit/_Templated","dijit/_CssStateMixin"],function(c,b){c.declare("dijit.form._FormWidget",[b._Widget,b._Templated,b._CssStateMixin],{name:"",alt:"",value:"",type:"text",tabIndex:"0",disabled:false,intermediateChanges:false,scrollOnFocus:true,attributeMap:c.delegate(b._Widget.prototype.attributeMap,{value:"focusNode",id:"focusNode",tabIndex:"focusNode",alt:"focusNode",title:"focusNode"}),postMixInProperties:function(){this.nameAttrSetting=
this.name?'name="'+this.name.replace(/'/g,"&quot;")+'"':"";this.inherited(arguments)},postCreate:function(){this.inherited(arguments);this.connect(this.domNode,"onmousedown","_onMouseDown")},_setDisabledAttr:function(a){this._set("disabled",a);c.attr(this.focusNode,"disabled",a);this.valueNode&&c.attr(this.valueNode,"disabled",a);b.setWaiState(this.focusNode,"disabled",a);if(a){this._set("hovering",false);this._set("active",false);a="tabIndex"in this.attributeMap?this.attributeMap.tabIndex:"focusNode";
c.forEach(c.isArray(a)?a:[a],function(d){d=this[d];c.isWebKit||b.hasDefaultTabStop(d)?d.setAttribute("tabIndex","-1"):d.removeAttribute("tabIndex")},this)}else this.tabIndex!=""&&this.focusNode.setAttribute("tabIndex",this.tabIndex)},setDisabled:function(a){c.deprecated("setDisabled("+a+") is deprecated. Use set('disabled',"+a+") instead.","","2.0");this.set("disabled",a)},_onFocus:function(){this.scrollOnFocus&&c.window.scrollIntoView(this.domNode);this.inherited(arguments)},isFocusable:function(){return!this.disabled&&
this.focusNode&&c.style(this.domNode,"display")!="none"},focus:function(){this.disabled||b.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(c.hitch(this,function(){this._onChangeHandle=null;this.onChange(a)}),0)}}},create:function(){this.inherited(arguments);this._onChangeActive=true},destroy:function(){if(this._onChangeHandle){clearTimeout(this._onChangeHandle);this.onChange(this._lastValueReported)}this.inherited(arguments)},
setValue:function(a){c.deprecated("dijit.form._FormWidget:setValue("+a+") is deprecated.  Use set('value',"+a+") instead.","","2.0");this.set("value",a)},getValue:function(){c.deprecated(this.declaredClass+"::getValue() is deprecated. Use get('value') instead.","","2.0");return this.get("value")},_onMouseDown:function(a){if(!a.ctrlKey&&c.mouseButtons.isLeft(a)&&this.isFocusable())var d=this.connect(c.body(),"onmouseup",function(){this.isFocusable()&&this.focus();this.disconnect(d)})}});c.declare("dijit.form._FormValueWidget",
b.form._FormWidget,{readOnly:false,attributeMap:c.delegate(b.form._FormWidget.prototype.attributeMap,{value:"",readOnly:"focusNode"}),_setReadOnlyAttr:function(a){c.attr(this.focusNode,"readOnly",a);b.setWaiState(this.focusNode,"readonly",a);this._set("readOnly",a)},postCreate:function(){this.inherited(arguments);if(c.isIE<9||c.isIE&&c.isQuirks)this.connect(this.focusNode||this.domNode,"onkeydown",this._onKeyDown);if(this._resetValue===undefined)this._lastValueReported=this._resetValue=this.value},
_setValueAttr:function(a,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==c.keys.ESCAPE&&!(a.ctrlKey||a.altKey||a.metaKey)){var d;if(c.isIE){a.preventDefault();d=document.createEventObject();d.keyCode=c.keys.ESCAPE;d.shiftKey=a.shiftKey;a.srcElement.fireEvent("onkeypress",
d)}}},_layoutHackIE7:function(){if(c.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 i=g.connect(d,"onscroll",function(){g.disconnect(i);e.style.filter=(new Date).getMilliseconds();setTimeout(function(){e.style.filter=f},0)})})();d=d.parentNode}}});return b.form._FormWidget});
define("dijit/form/TextBox",["dojo","dijit","text!dijit/form/templates/TextBox.html","dijit/form/_FormWidget"],function(c,b){c.declare("dijit.form.TextBox",b.form._FormValueWidget,{trim:false,uppercase:false,lowercase:false,propercase:false,maxLength:"",selectOnClick:false,placeHolder:"",templateString:c.cache("dijit.form","templates/TextBox.html"),_singleNodeTemplate:'<input class="dijit dijitReset dijitLeft dijitInputField" dojoAttachPoint="textbox,focusNode" autocomplete="off" type="${type}" ${!nameAttrSetting} />',
_buttonInputDisabled:c.isIE?"disabled":"",baseClass:"dijitTextBox",attributeMap:c.delegate(b.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==b.form.TextBox.prototype.templateString)this.templateString=this._singleNodeTemplate;this.inherited(arguments)},_setPlaceHolderAttr:function(a){this._set("placeHolder",
a);if(!this._phspan){this._attachPoints.push("_phspan");this._phspan=c.create("span",{className:"dijitPlaceHolder dijitInputField"},this.textbox,"after")}this._phspan.innerHTML="";this._phspan.appendChild(document.createTextNode(a));this._updatePlaceHolder()},_updatePlaceHolder:function(){if(this._phspan)this._phspan.style.display=this.placeHolder&&!this._focused&&!this.textbox.value?"":"none"},_getValueAttr:function(){return this.parse(this.get("displayedValue"),this.constraints)},_setValueAttr:function(a,
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(){c.deprecated(this.declaredClass+"::getDisplayedValue() is deprecated. Use set('displayedValue') instead.",
"","2.0");return this.get("displayedValue")},_getDisplayedValueAttr:function(){return this.filter(this.textbox.value)},setDisplayedValue:function(a){c.deprecated(this.declaredClass+"::setDisplayedValue() is deprecated. Use set('displayedValue', ...) instead.","","2.0");this.set("displayedValue",a)},_setDisplayedValueAttr:function(a){if(a===null||a===undefined)a="";else if(typeof a!="string")a=String(a);this.textbox.value=a;this._setValueAttr(this.get("value"),undefined);this._set("displayedValue",
this.get("displayedValue"))},format:function(a){return a==null||a==undefined?"":a.toString?a.toString():a},parse:function(a){return a},_refreshState:function(){},_onInput:function(a){if(a&&a.type&&/key/i.test(a.type)&&a.keyCode)switch(a.keyCode){case c.keys.SHIFT:case c.keys.ALT:case c.keys.CTRL:case c.keys.TAB:return}if(this.intermediateChanges){var d=this;setTimeout(function(){d._handleOnChange(d.get("value"),false)},0)}this._refreshState();this._set("displayedValue",this.get("displayedValue"))},
postCreate:function(){c.isIE&&setTimeout(c.hitch(this,function(){var a=c.getComputedStyle(this.domNode);if(a)if(a=a.fontFamily){var 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(c.isMoz||c.isOpera)this.connect(this.textbox,"oninput","_onInput");else{this.connect(this.textbox,"onkeydown","_onInput");this.connect(this.textbox,"onkeyup","_onInput");this.connect(this.textbox,
"onpaste","_onInput");this.connect(this.textbox,"oncut","_onInput")}},_blankValue:"",filter:function(a){if(a===null)return this._blankValue;if(typeof a!="string")return a;if(this.trim)a=c.trim(a);if(this.uppercase)a=a.toUpperCase();if(this.lowercase)a=a.toLowerCase();if(this.propercase)a=a.replace(/[^\s]+/g,function(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&&c.isMoz)this.textbox.selectionStart=this.textbox.selectionEnd=undefined;this._updatePlaceHolder()}},_onFocus:function(a){if(!(this.disabled||this.readOnly)){if(this.selectOnClick&&a=="mouse")this._selectOnClickHandle=this.connect(this.domNode,"onmouseup",function(){this.disconnect(this._selectOnClickHandle);var d;if(c.isIE){d=c.doc.selection.createRange();d=d.parentElement()==this.textbox&&
d.text.length==0}else d=this.textbox.selectionStart==this.textbox.selectionEnd;d&&b.selectInputText(this.textbox)});this._updatePlaceHolder();this.inherited(arguments);this._refreshState()}},reset:function(){this.textbox.value="";this.inherited(arguments)}});b.selectInputText=function(a,d,e){var f=c.global,g=c.doc;a=c.byId(a);if(isNaN(d))d=0;if(isNaN(e))e=a.value?a.value.length:0;b.focus(a);if(g.selection&&c.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 b.form.TextBox});define("text!dijit/templates/Tooltip.html",function(){return'<div class="dijitTooltip dijitTooltipLeft" id="dojoTooltip"\n\t><div class="dijitTooltipContainer dijitTooltipContents" dojoAttachPoint="containerNode" role=\'alert\'></div\n\t><div class="dijitTooltipConnector" dojoAttachPoint="connectorNode"></div\n></div>'});
define("dijit/Tooltip",["dojo","dijit","dijit/_Widget","dijit/_Templated","text!dijit/templates/Tooltip.html"],function(c,b){c.declare("dijit._MasterTooltip",[b._Widget,b._Templated],{duration:b.defaultDuration,templateString:c.cache("dijit","templates/Tooltip.html"),postCreate:function(){c.body().appendChild(this.domNode);this.bgIframe=new b.BackgroundIframe(this.domNode);this.fadeIn=c.fadeIn({node:this.domNode,duration:this.duration,onEnd:c.hitch(this,"_onShow")});this.fadeOut=c.fadeOut({node:this.domNode,
duration:this.duration,onEnd:c.hitch(this,"_onHide")})},show:function(a,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;b.placeOnScreenAroundElement(this.domNode,d,b.getPopupAroundAlignment(e&&e.length?e:b.Tooltip.defaultPosition,!f),c.hitch(this,"orient"));c.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 i=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=c.contentBox(this.domNode),h=Math.min(Math.max(i,1),j.w),k=h<j.w;this.domNode.style.width=h+"px";if(k){this.containerNode.style.overflow=
"auto";k=this.containerNode.scrollWidth;this.containerNode.style.overflow="visible";if(k>h){k=k+c.style(this.domNode,"paddingLeft")+c.style(this.domNode,"paddingRight");this.domNode.style.width=k+"px"}}if(e.charAt(0)=="B"&&d.charAt(0)=="B"){a=c.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-i)},_onShow:function(){if(c.isIE)this.domNode.style.filter=""},hide:function(a){if(this._onDeck&&this._onDeck[1]==a)this._onDeck=null;else if(this.aroundNode===a){this.fadeIn.stop();this.isShowingNow=false;this.aroundNode=null;this.fadeOut.play()}},_onHide:function(){this.domNode.style.cssText="";this.containerNode.innerHTML="";if(this._onDeck){this.show.apply(this,this._onDeck);this._onDeck=null}}});b.showTooltip=function(a,d,e,f){if(!b._masterTT)b._masterTT=
new b._MasterTooltip;return b._masterTT.show(a,d,e,f)};b.hideTooltip=function(a){if(!b._masterTT)b._masterTT=new b._MasterTooltip;return b._masterTT.hide(a)};c.declare("dijit.Tooltip",b._Widget,{label:"",showDelay:400,connectId:[],position:[],_setConnectIdAttr:function(a){c.forEach(this._connections||[],function(e){c.forEach(e,c.hitch(this,"disconnect"))},this);var d=c.isArrayLike(a)?a:a?[a]:[];this._connections=c.map(d,function(e){return(e=c.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;c.indexOf(this._connectIds,a)==-1&&this.set("connectId",this._connectIds.concat(a))},removeTarget:function(a){a=c.indexOf(this._connectIds,a.id||a);if(a>=0){this._connectIds.splice(a,1);this.set("connectId",this._connectIds)}},buildRendering:function(){this.inherited(arguments);
c.addClass(this.domNode,"dijitTooltipData")},startup:function(){this.inherited(arguments);var a=this.connectId;c.forEach(c.isArrayLike(a)?a:[a],this.addTarget,this)},_onTargetMouseEnter:function(a){this._onHover(a)},_onTargetMouseLeave:function(a){this._onUnHover(a)},_onTargetFocus:function(a){this._focus=true;this._onHover(a)},_onTargetBlur:function(a){this._focus=false;this._onUnHover(a)},_onHover:function(a){if(!this._showTimer){var d=a.target;this._showTimer=setTimeout(c.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}b.showTooltip(this.label||this.domNode.innerHTML,a,this.position,!this.isLeftToRight());this._connectNode=a;this.onShow(a,this.position)},close:function(){if(this._connectNode){b.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)}});b.Tooltip.defaultPosition=["after","before"];return b.Tooltip});
(function(){function c(d,e,f,g,i,j){if(e[d]){f.push(d);if(e[d]===true||e[d]===1)g.push(i+d+"/"+j)}}function b(d,e,f,g,i){e=g+e+"/"+i;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 i=a.exec(d),j=i[1],h=i[4],k=i[5],l=h.split("-"),m=[],q={},r,n,o="";if(i[5]){j=i[1];d=j+k}else{d=d;k=i[4];h=g.locale||(g.locale=typeof navigator==="undefined"?"root":(navigator.language||navigator.userLanguage||
"root").toLowerCase());l=h.split("-")}if(g.isBuild){m.push(d);b(e,"root",m,j,k);for(r=0;n=l[r];r++){o+=(o?"-":"")+n;b(e,o,m,j,k)}e(m);f()}else e([d],function(p){var s=[];c("root",p,s,m,j,k);for(r=0;n=l[r];r++){o+=(o?"-":"")+n;c(o,p,s,m,j,k)}e(m,function(){var t,v;for(t=s.length-1;t>-1&&(n=s[t]);t--){v=p[n];if(v===true||v===1)v=e(j+n+"/"+k);require.mixin(q,v)}f(q)})})}})})();
define("dijit/form/nls/validate",{root:{invalidMessage:"The value entered is not valid.",missingMessage:"This value is required.",rangeMessage:"This value is out of range."},zh:true,"zh-tw":true,tr:true,th:true,sv:true,sl:true,sk:true,ru:true,ro:true,pt:true,"pt-pt":true,pl:true,nl:true,nb:true,ko:true,kk:true,ja:true,it:true,hu:true,he:true,fr:true,fi:true,es:true,el:true,de:true,da:true,cs:true,ca:true,ar:true});
define("dijit/form/ValidationTextBox",["dojo","dijit","text!dijit/form/templates/ValidationTextBox.html","dojo/i18n","dijit/form/TextBox","dijit/Tooltip","i18n!dijit/form/nls/validate"],function(c,b){c.declare("dijit.form.ValidationTextBox",b.form.TextBox,{templateString:c.cache("dijit.form","templates/ValidationTextBox.html"),baseClass:"dijitTextBox dijitValidationTextBox",required:false,promptMessage:"",invalidMessage:"$_unset_$",missingMessage:"$_unset_$",message:"",constraints:{},regExp:".*",
regExpGen:function(){return this.regExp},state:"",tooltipPosition:[],_setValueAttr:function(){this.inherited(arguments);this.validate(this._focused)},validator:function(a,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");b.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){b.hideTooltip(this.domNode);a&&this._focused&&b.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=c.i18n.getLocalization("dijit.form","validate",this.lang);if(this.invalidMessage=="$_unset_$")this.invalidMessage=this.messages.invalidMessage;if(!this.invalidMessage)this.invalidMessage=this.promptMessage;if(this.missingMessage=="$_unset_$")this.missingMessage=
this.messages.missingMessage;if(!this.missingMessage)this.missingMessage=this.invalidMessage;this._setConstraintsAttr(this.constraints)},_setDisabledAttr:function(){this.inherited(arguments);this._refreshState()},_setRequiredAttr:function(a){this._set("required",a);b.setWaiState(this.focusNode,"required",a);this._refreshState()},_setMessageAttr:function(a){this._set("message",a);this.displayMessage(a)},reset:function(){this._maskValidSubsetError=true;this.inherited(arguments)},_onBlur:function(){this.displayMessage("");
this.inherited(arguments)}});c.declare("dijit.form.MappedTextBox",b.form.ValidationTextBox,{postMixInProperties:function(){this.inherited(arguments);this.nameAttrSetting=""},serialize:function(a){return a.toString?a.toString():""},toString:function(){var a=this.filter(this.get("value"));return a!=null?typeof a=="string"?a:this.serialize(a,this.constraints):""},validate:function(){this.valueNode.value=this.toString();return this.inherited(arguments)},buildRendering:function(){this.inherited(arguments);
this.valueNode=c.place("<input type='hidden'"+(this.name?" name='"+this.name.replace(/'/g,"&quot;")+"'":"")+"/>",this.textbox,"after")},reset:function(){this.valueNode.value="";this.inherited(arguments)}});c.declare("dijit.form.RangeBoundTextBox",b.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=c.i18n.getLocalization("dijit.form","validate",this.lang);this.rangeMessage=this.messages.rangeMessage}},_setConstraintsAttr:function(){this.inherited(arguments);if(this.focusNode){this.constraints.min!==
undefined?b.setWaiState(this.focusNode,"valuemin",this.constraints.min):b.removeWaiState(this.focusNode,"valuemin");this.constraints.max!==undefined?b.setWaiState(this.focusNode,"valuemax",this.constraints.max):b.removeWaiState(this.focusNode,"valuemax")}},_setValueAttr:function(a){b.setWaiState(this.focusNode,"valuenow",a);this.inherited(arguments)}});return b.form.ValidationTextBox});
define("orion/util",["dojo","dijit","dojo/hash","dijit/form/ValidationTextBox"],function(c,b){function a(p){var s="",t=navigator.platform.indexOf("Mac")!==-1;if(p.mod1)s+=t?"Cmd+":"Ctrl+";if(p.mod2)s+="Shift+";if(p.mod3)s+="Alt+";if(p.mod4&&t)s+="Ctrl+";if(p.alphaKey)return s+p.alphaKey;for(var v in c.keys)if(typeof(c.keys[v]==="number"))if(c.keys[v]===p.keyCode)return s+v;var w;switch(p.keyCode){case 59:w=p.mod2?":":";";break;case 61:w=p.mod2?"+":"=";break;case 188:w=p.mod2?"<":",";break;case 190:w=
p.mod2?">":".";break;case 191:w=p.mod2?"?":"/";break;case 192:w=p.mod2?"~":"`";break;case 219:w=p.mod2?"{":"[";break;case 220:w=p.mod2?"|":"\\";break;case 221:w=p.mod2?"}":"]";break;case 222:w=p.mod2?'"':"'";break}if(w)return s+w;return s+String.fromCharCode(p.keyCode)}function d(p,s){p.startup();if(typeof s==="string"){var t=c.byId(s);if(!t)if(t=b.byId(s))t=t.domNode;s=t?t:null}if(s){s=c.position(s);p._setStyleAttr("left:"+(s.x+16)+"px !important;");p._setStyleAttr("top:"+(s.y+16)+"px !important;")}p.show()}
function e(p,s,t,v,w,y,C,D,E){C=function(I){return function(G){var N=b.byId(p),L=N.get("value");if(I&&G.keyCode===c.keys.ESCAPE){t&&c.style(s,"display","inline");N.destroyRecursive();y&&y()}else if(!(I&&G.keyCode!==c.keys.ENTER)){if(!N.isValid()||!E&&L===v)t&&c.style(s,"display","inline");else w(L);N.destroyRecursive();y&&y()}}};var F=new b.form.ValidationTextBox({id:p,required:true,value:v||""});c.place(F.domNode,s,"after");c.addClass(F.domNode,"userEditBoxPrompt");t&&c.style(s,"display","none");
c.connect(F,"onKeyDown",C(true));c.connect(F,"onBlur",C(false));window.setTimeout(function(){F.focus();if(v){var I=c.byId(p),G=D?v.indexOf(D):-1;G>0?b.selectInputText(I,0,G):I.select()}},0)}function f(p){var s=window.navigator.platform.indexOf("Mac")!==-1;return s&&p.metaKey||!s&&p.ctrlKey}function g(p,s){if(s&&f(s))window.open(p);else window.location=p}function i(p){if(!p)return p;var s=window.location.href.split("#")[0];s=s.substring(0,s.length-window.location.pathname.length);if(p.indexOf(s)===
0)return p.substring(s.length);return p}function j(p){if(!p)return p;var s=window.location.href.split("#")[0];return s.substring(0,s.length-window.location.pathname.length)+p}function h(p){return this.makeRelative(p).indexOf("/workspace")===0}function k(p,s){p.children=s;for(var t in s)s[t].parent=p;p.children.sort(function(v,w){var y=v.Directory;if(y!==w.Directory)return y?-1:1;v=v.Name&&v.Name.toLowerCase();w=w.Name&&w.Name.toLowerCase();if(v<w)return-1;if(v>w)return 1;return 0})}function l(p,s){p.Parents&&
p.Parents.length===0&&s.getService("orion.core.preference").getPreferences("/window/recent").then(function(t){var v=t.get("projects");if(typeof v==="string")v=JSON.parse(v);var w=[];if(v&&v.length&&v.length>0)for(var y=0;y<v.length;y++)v[y].location!==p.ChildrenLocation&&v[y].name!==p.Name&&w.push(v[y]);w.push({name:p.Name,location:p.ChildrenLocation});if(w.length>5)w=w.slice(-5,w.length);t.put("projects",w)})}function m(p){return typeof p.textContent!=="undefined"?p.textContent:p.innerText}function q(p){return m(document.createTextNode(p))}
function r(p,s){if(typeof p.textContent!=="undefined")p.textContent=s;else p.innerText=s}function n(p,s,t,v,w,y,C,D){w=w||s+"heading";y=y||s+"commands";c.place('<div class="toolComposite" id="'+s+'"><div class="layoutLeft" id="'+s+'"><span style: "inline-block;" id="'+w+'">'+t+'</span></div><div class="layoutRight sectionActions" id="'+y+'"></div><div id="'+p.id+'slideContainer" class="layoutBlock slideParameters slideContainer"><span id="'+p.id+'slideOut" class="slide"><span id="'+p.id+'pageCommandParameters" class="parameters"></span><span id="'+
p.id+'pageCommandDismiss" class="parametersDismiss"></span></span></div></div>',p,"last");v?c.addClass(s,"auxpaneHeading"):c.addClass(s,"paneHeading");C&&C.renderCommands(c.byId(y),"dom",D,D,"button");return c.byId(s)}function o(p){if(typeof p==="string")p=c.byId(p);for(;p;){var s=b.byId(p.id);if(s&&typeof s.layout==="function"){s.layout();return}p=p.parentNode}}return{getUserKeyString:a,openDialog:d,getUserText:e,openInNewWindow:f,followLink:g,makeRelative:i,makeFullPath:j,isAtRoot:h,processNavigatorParent:k,
rememberSuccessfulTraversal:l,getText:m,safeText:q,setText:r,createPaneHeading:n,forceLayout:o}});
define("orion/PageUtil",["require","exports","module"],function(){function c(b){b=b||window.location.toString();var a={resource:""},d=b.indexOf("#");if(d!==-1){b=b.substring(d+1);if(b.length!==0){b=b.split(",");a.resource=decodeURIComponent(b[0]);for(d=1;d<b.length;d++){var e=b[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:c}});define("text!dijit/templates/Menu.html",function(){return'<table class="dijit dijitMenu dijitMenuPassive dijitReset dijitMenuTable" role="menu" tabIndex="${tabIndex}" dojoAttachEvent="onkeypress:_onKeyPress" cellspacing="0">\n\t<tbody class="dijitReset" dojoAttachPoint="containerNode"></tbody>\n</table>'});
define("dijit/_Container",["dojo","dijit"],function(c,b){c.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"}}c.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){c.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||!b.byNode(a)));return a&&b.byNode(a)},getIndexOfChild:function(a){return c.indexOf(this.getChildren(),a)},startup:function(){if(!this._started){c.forEach(this.getChildren(),
function(a){a.startup()});this.inherited(arguments)}}});return b._Container});
define("dijit/_KeyNavContainer",["dojo","dijit","dijit/_Container"],function(c,b){c.declare("dijit._KeyNavContainer",b._Container,{tabIndex:"0",_keyNavCodes:{},connectKeyNavHandlers:function(a,d){var e=this._keyNavCodes={},f=c.hitch(this,this.focusPrev),g=c.hitch(this,this.focusNext);c.forEach(a,function(i){e[i]=f});c.forEach(d,function(i){e[i]=g});e[c.keys.HOME]=c.hitch(this,"focusFirstChild");e[c.keys.END]=c.hitch(this,"focusLastChild");this.connect(this.domNode,"onkeypress","_onContainerKeypress");
this.connect(this.domNode,"onfocus","_onContainerFocus")},startupKeyNavChildren:function(){c.forEach(this.getChildren(),c.hitch(this,"_startupChild"))},addChild:function(a){b._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();c.attr(this.domNode,"tabIndex","-1")}},_onBlur:function(){this.tabIndex&&c.attr(this.domNode,"tabIndex",this.tabIndex);this.inherited(arguments)},_onContainerKeypress:function(a){if(!(a.ctrlKey||a.altKey)){var d=this._keyNavCodes[a.charOrCode];if(d){d();c.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 b._KeyNavContainer});define("text!dijit/templates/MenuItem.html",function(){return'<tr class="dijitReset dijitMenuItem" dojoAttachPoint="focusNode" role="menuitem" tabIndex="-1"\n\t\tdojoAttachEvent="onmouseenter:_onHover,onmouseleave:_onUnhover,ondijitclick:_onClick">\n\t<td class="dijitReset dijitMenuItemIconCell" role="presentation">\n\t\t<img src="${_blankGif}" alt="" class="dijitIcon dijitMenuItemIcon" dojoAttachPoint="iconNode"/>\n\t</td>\n\t<td class="dijitReset dijitMenuItemLabel" colspan="2" dojoAttachPoint="containerNode"></td>\n\t<td class="dijitReset dijitMenuItemAccelKey" style="display: none" dojoAttachPoint="accelKeyNode"></td>\n\t<td class="dijitReset dijitMenuArrowCell" role="presentation">\n\t\t<div dojoAttachPoint="arrowWrapper" style="visibility: hidden">\n\t\t\t<img src="${_blankGif}" alt="" class="dijitMenuExpand"/>\n\t\t\t<span class="dijitMenuExpandA11y">+</span>\n\t\t</div>\n\t</td>\n</tr>'});
define("dijit/_Contained",["dojo","dijit"],function(c,b){c.declare("dijit._Contained",null,{getParent:function(){var a=b.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&&b.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 b._Contained});
define("dijit/MenuItem",["dojo","dijit","text!dijit/templates/MenuItem.html","dijit/_Widget","dijit/_Templated","dijit/_Contained","dijit/_CssStateMixin"],function(c,b){c.declare("dijit.MenuItem",[b._Widget,b._Templated,b._Contained,b._CssStateMixin],{templateString:c.cache("dijit","templates/MenuItem.html"),attributeMap:c.delegate(b._Widget.prototype.attributeMap,{label:{node:"containerNode",type:"innerHTML"},iconClass:{node:"iconNode",type:"class"}}),baseClass:"dijitMenuItem",label:"",iconClass:"",
accelKey:"",disabled:false,_fillContent:function(a){a&&!("label"in this.params)&&this.set("label",a.innerHTML)},buildRendering:function(){this.inherited(arguments);var a=this.id+"_text";c.attr(this.containerNode,"id",a);if(this.accelKeyNode){c.attr(this.accelKeyNode,"id",this.id+"_accel");a+=" "+this.id+"_accel"}b.setWaiState(this.domNode,"labelledby",a);c.setSelectable(this.domNode,false)},_onHover:function(){this.getParent().onItemHover(this)},_onUnhover:function(){this.getParent().onItemUnhover(this);
this._set("hovering",false)},_onClick:function(a){this.getParent().onItemClick(this,a);c.stopEvent(a)},onClick:function(){},focus:function(){try{c.isIE==8&&this.containerNode.focus();b.focus(this.focusNode)}catch(a){}},_onFocus:function(){this._setSelected(true);this.getParent()._onItemFocus(this);this.inherited(arguments)},_setSelected:function(a){c.toggleClass(this.domNode,"dijitMenuItemSelected",a)},setLabel:function(a){c.deprecated("dijit.MenuItem.setLabel() is deprecated.  Use set('label', ...) instead.",
"","2.0");this.set("label",a)},setDisabled:function(a){c.deprecated("dijit.Menu.setDisabled() is deprecated.  Use set('disabled', bool) instead.","","2.0");this.set("disabled",a)},_setDisabledAttr:function(a){b.setWaiState(this.focusNode,"disabled",a?"true":"false");this._set("disabled",a)},_setAccelKeyAttr:function(a){this.accelKeyNode.style.display=a?"":"none";this.accelKeyNode.innerHTML=a;c.attr(this.containerNode,"colSpan",a?"1":"2");this._set("accelKey",a)}});return b.MenuItem});
define("dijit/PopupMenuItem",["dojo","dijit","dijit/MenuItem"],function(c,b){c.declare("dijit.PopupMenuItem",b.MenuItem,{_fillContent:function(){if(this.srcNodeRef){var a=c.query("*",this.srcNodeRef);b.PopupMenuItem.superclass._fillContent.call(this,a[0]);this.dropDownContainer=this.srcNodeRef}},startup:function(){if(!this._started){this.inherited(arguments);if(!this.popup){var a=c.query("[widgetId]",this.dropDownContainer)[0];this.popup=b.byNode(a)}c.body().appendChild(this.popup.domNode);this.popup.startup();
this.popup.domNode.style.display="none";this.arrowWrapper&&c.style(this.arrowWrapper,"visibility","");b.setWaiState(this.focusNode,"haspopup","true")}},destroyDescendants:function(){if(this.popup){this.popup._destroyed||this.popup.destroyRecursive();delete this.popup}this.inherited(arguments)}});return b.PopupMenuItem});define("text!dijit/templates/CheckedMenuItem.html",function(){return'<tr class="dijitReset dijitMenuItem" dojoAttachPoint="focusNode" role="menuitemcheckbox" tabIndex="-1"\n\t\tdojoAttachEvent="onmouseenter:_onHover,onmouseleave:_onUnhover,ondijitclick:_onClick">\n\t<td class="dijitReset dijitMenuItemIconCell" role="presentation">\n\t\t<img src="${_blankGif}" alt="" class="dijitMenuItemIcon dijitCheckedMenuItemIcon" dojoAttachPoint="iconNode"/>\n\t\t<span class="dijitCheckedMenuItemIconChar">&#10003;</span>\n\t</td>\n\t<td class="dijitReset dijitMenuItemLabel" colspan="2" dojoAttachPoint="containerNode,labelNode"></td>\n\t<td class="dijitReset dijitMenuItemAccelKey" style="display: none" dojoAttachPoint="accelKeyNode"></td>\n\t<td class="dijitReset dijitMenuArrowCell" role="presentation">&nbsp;</td>\n</tr>'});
define("dijit/CheckedMenuItem",["dojo","dijit","text!dijit/templates/CheckedMenuItem.html","dijit/MenuItem"],function(c,b){c.declare("dijit.CheckedMenuItem",b.MenuItem,{templateString:c.cache("dijit","templates/CheckedMenuItem.html"),checked:false,_setCheckedAttr:function(a){c.toggleClass(this.domNode,"dijitCheckedMenuItemChecked",a);b.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 b.CheckedMenuItem});define("text!dijit/templates/MenuSeparator.html",function(){return'<tr class="dijitMenuSeparator">\n\t<td class="dijitMenuSeparatorIconCell">\n\t\t<div class="dijitMenuSeparatorTop"></div>\n\t\t<div class="dijitMenuSeparatorBottom"></div>\n\t</td>\n\t<td colspan="3" class="dijitMenuSeparatorLabelCell">\n\t\t<div class="dijitMenuSeparatorTop dijitMenuSeparatorLabel"></div>\n\t\t<div class="dijitMenuSeparatorBottom"></div>\n\t</td>\n</tr>'});
define("dijit/MenuSeparator",["dojo","dijit","text!dijit/templates/MenuSeparator.html","dijit/_Widget","dijit/_Templated","dijit/_Contained"],function(c,b){c.declare("dijit.MenuSeparator",[b._Widget,b._Templated,b._Contained],{templateString:c.cache("dijit","templates/MenuSeparator.html"),buildRendering:function(){this.inherited(arguments);c.setSelectable(this.domNode,false)},isFocusable:function(){return false}});return b.MenuSeparator});
define("dijit/Menu",["dojo","dijit","text!dijit/templates/Menu.html","dojo/window","dijit/_Widget","dijit/_KeyNavContainer","dijit/_Templated","dijit/MenuItem","dijit/PopupMenuItem","dijit/CheckedMenuItem","dijit/MenuSeparator"],function(c,b){c.declare("dijit._MenuBase",[b._Widget,b._Templated,b._KeyNavContainer],{parentMenu:null,popupDelay:500,startup:function(){if(!this._started){c.forEach(this.getChildren(),function(a){a.startup()});this.startupKeyNavChildren();this.inherited(arguments)}},onExecute:function(){},
onCancel:function(){},_moveToPopup:function(a){if(this.focusedChild&&this.focusedChild.popup&&!this.focusedChild.disabled)this.focusedChild._onClick(a);else(a=this._getTopMenu())&&a._isMenuBar&&a.focusNext()},_onPopupHover:function(){if(this.currentPopup&&this.currentPopup._pendingClose_timer){var a=this.currentPopup.parentMenu;a.focusedChild&&a.focusedChild._setSelected(false);a.focusedChild=this.currentPopup.from_item;a.focusedChild._setSelected(true);this._stopPendingCloseTimer(this.currentPopup)}},
onItemHover:function(a){if(this.isActive){this.focusChild(a);if(this.focusedChild.popup&&!this.focusedChild.disabled&&!this.hover_timer)this.hover_timer=setTimeout(c.hitch(this,"_openPopup"),this.popupDelay)}this.focusedChild&&this.focusChild(a);this._hoveredChild=a},_onChildBlur:function(a){this._stopPopupTimer();a._setSelected(false);var d=a.popup;if(d){this._stopPendingCloseTimer(d);d._pendingClose_timer=setTimeout(function(){d._pendingClose_timer=null;if(d.parentMenu)d.parentMenu.currentPopup=
null;b.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);b.popup.close(this.currentPopup)}d.parentMenu=this;d.from_item=a;var e=this;b.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:c.hitch(this,"_cleanUp")});this.currentPopup=d;d.connect(d.domNode,"onmouseenter",c.hitch(e,"_onPopupHover"));if(d.focus)d._focus_timer=setTimeout(c.hitch(d,function(){this._focus_timer=null;this.focus()}),0)}}},_markActive:function(){this.isActive=true;c.replaceClass(this.domNode,
"dijitMenuActive","dijitMenuPassive")},onOpen:function(){this.isShowingNow=true;this._markActive()},_markInactive:function(){this.isActive=false;c.replaceClass(this.domNode,"dijitMenuPassive","dijitMenuActive")},onClose:function(){this._stopFocusTimer();this._markInactive();this.isShowingNow=false;this.parentMenu=null},_closeChild:function(){this._stopPopupTimer();if(this.currentPopup){b._curFocus&&c.isDescendant(b._curFocus,this.currentPopup.domNode)&&this.focusedChild.focusNode.focus();b.popup.close(this.currentPopup);
this.currentPopup=null}if(this.focusedChild){this.focusedChild._setSelected(false);this.focusedChild._onUnhover();this.focusedChild=null}},_onItemFocus:function(a){this._hoveredChild&&this._hoveredChild!=a&&this._hoveredChild._onUnhover()},_onBlur:function(){this._cleanUp();this.inherited(arguments)},_cleanUp:function(){this._closeChild();typeof this.isShowingNow=="undefined"&&this._markInactive()}});c.declare("dijit.Menu",b._MenuBase,{constructor:function(){this._bindings=[]},templateString:c.cache("dijit",
"templates/Menu.html"),baseClass:"dijitMenu",targetNodeIds:[],contextMenuForWindow:false,leftClickToOpen:false,refocus:true,postCreate:function(){this.contextMenuForWindow?this.bindDomNode(c.body()):c.forEach(this.targetNodeIds,this.bindDomNode,this);var a=c.keys,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);
c.stopEvent(a);break;case this._closeSubMenuKey:if(this.parentMenu)this.parentMenu._isMenuBar?this.parentMenu.focusPrev():this.onCancel(false);else c.stopEvent(a);break}},_iframeContentWindow:function(a){return c.window.get(this._iframeContentDocument(a))||this._iframeContentDocument(a).__parent__||a.name&&c.doc.frames[a.name]||null},_iframeContentDocument:function(a){return a.contentDocument||a.contentWindow&&a.contentWindow.document||a.name&&c.doc.frames[a.name]&&c.doc.frames[a.name].document||
null},bindDomNode:function(a){a=c.byId(a);var d;if(a.tagName.toLowerCase()=="iframe"){var e=a,f=this._iframeContentWindow(e);d=c.withGlobal(f,c.body)}else d=a==c.body()?c.doc.documentElement:a;var g={node:a,iframe:e};c.attr(a,"_dijitMenu"+this.id,this._bindings.push(g));var i=c.hitch(this,function(j){return[c.connect(j,this.leftClickToOpen?"onclick":"oncontextmenu",this,function(h){c.stopEvent(h);this._scheduleOpen(h.target,e,{x:h.pageX,y:h.pageY})}),c.connect(j,"onkeydown",this,function(h){if(h.shiftKey&&
h.keyCode==c.keys.F10){c.stopEvent(h);this._scheduleOpen(h.target,e)}})]});g.connects=d?i(d):[];if(e){g.onloadHandler=c.hitch(this,function(){var j=this._iframeContentWindow(e);d=c.withGlobal(j,c.body);g.connects=i(d)});e.addEventListener?e.addEventListener("load",g.onloadHandler,false):e.attachEvent("onload",g.onloadHandler)}},unBindDomNode:function(a){var d;try{d=c.byId(a)}catch(e){return}a="_dijitMenu"+this.id;if(d&&c.hasAttr(d,a)){var f=c.attr(d,a)-1,g=this._bindings[f];c.forEach(g.connects,c.disconnect);
var i=g.iframe;if(i)i.removeEventListener?i.removeEventListener("load",g.onloadHandler,false):i.detachEvent("onload",g.onloadHandler);c.removeAttr(d,a);delete this._bindings[f]}},_scheduleOpen:function(a,d,e){if(!this._openTimer)this._openTimer=setTimeout(c.hitch(this,function(){delete this._openTimer;this._openMyself({target:a,iframe:d,coords:e})}),1)},_openMyself:function(a){function d(){k.refocus&&b.focus(l);b.popup.close(k)}var e=a.target,f=a.iframe;if(a=a.coords){if(f){e=c.position(f,true);var g=
this._iframeContentWindow(f);g=c.withGlobal(g,"_docScroll",c);var i=c.getComputedStyle(f),j=c._toPixelValue,h=(c.isIE&&c.isQuirks?0:j(f,i.paddingLeft))+(c.isIE&&c.isQuirks?j(f,i.borderLeftWidth):0);f=(c.isIE&&c.isQuirks?0:j(f,i.paddingTop))+(c.isIE&&c.isQuirks?j(f,i.borderTopWidth):0);a.x+=e.x+h-g.x;a.y+=e.y+f-g.y}}else{a=c.position(e,true);a.x+=10;a.y+=10}var k=this,l=b.getFocus(this);b.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);b.popup.close(this)}},uninitialize:function(){c.forEach(this._bindings,function(a){a&&this.unBindDomNode(a.node)},this);this.inherited(arguments)}});return b.Menu});define("text!dijit/form/templates/Button.html",function(){return'<span class="dijit dijitReset dijitInline"\n\t><span class="dijitReset dijitInline dijitButtonNode"\n\t\tdojoAttachEvent="ondijitclick:_onButtonClick"\n\t\t><span class="dijitReset dijitStretch dijitButtonContents"\n\t\t\tdojoAttachPoint="titleNode,focusNode"\n\t\t\trole="button" aria-labelledby="${id}_label"\n\t\t\t><span class="dijitReset dijitInline dijitIcon" dojoAttachPoint="iconNode"></span\n\t\t\t><span class="dijitReset dijitToggleButtonIconChar">&#x25CF;</span\n\t\t\t><span class="dijitReset dijitInline dijitButtonText"\n\t\t\t\tid="${id}_label"\n\t\t\t\tdojoAttachPoint="containerNode"\n\t\t\t></span\n\t\t></span\n\t></span\n\t><input ${!nameAttrSetting} type="${type}" value="${value}" class="dijitOffScreen" tabIndex="-1"\n\t\tdojoAttachPoint="valueNode"\n/></span>'});
define("text!dijit/form/templates/DropDownButton.html",function(){return'<span class="dijit dijitReset dijitInline"\n\t><span class=\'dijitReset dijitInline dijitButtonNode\'\n\t\tdojoAttachEvent="ondijitclick:_onButtonClick" dojoAttachPoint="_buttonNode"\n\t\t><span class="dijitReset dijitStretch dijitButtonContents"\n\t\t\tdojoAttachPoint="focusNode,titleNode,_arrowWrapperNode"\n\t\t\trole="button" aria-haspopup="true" aria-labelledby="${id}_label"\n\t\t\t><span class="dijitReset dijitInline dijitIcon"\n\t\t\t\tdojoAttachPoint="iconNode"\n\t\t\t></span\n\t\t\t><span class="dijitReset dijitInline dijitButtonText"\n\t\t\t\tdojoAttachPoint="containerNode,_popupStateNode"\n\t\t\t\tid="${id}_label"\n\t\t\t></span\n\t\t\t><span class="dijitReset dijitInline dijitArrowButtonInner"></span\n\t\t\t><span class="dijitReset dijitInline dijitArrowButtonChar">&#9660;</span\n\t\t></span\n\t></span\n\t><input ${!nameAttrSetting} type="${type}" value="${value}" class="dijitOffScreen" tabIndex="-1"\n\t\tdojoAttachPoint="valueNode"\n/></span>'});
define("text!dijit/form/templates/ComboButton.html",function(){return'<table class="dijit dijitReset dijitInline dijitLeft"\n\tcellspacing=\'0\' cellpadding=\'0\' role="presentation"\n\t><tbody role="presentation"><tr role="presentation"\n\t\t><td class="dijitReset dijitStretch dijitButtonNode" dojoAttachPoint="buttonNode" dojoAttachEvent="ondijitclick:_onButtonClick,onkeypress:_onButtonKeyPress"\n\t\t><div id="${id}_button" class="dijitReset dijitButtonContents"\n\t\t\tdojoAttachPoint="titleNode"\n\t\t\trole="button" aria-labelledby="${id}_label"\n\t\t\t><div class="dijitReset dijitInline dijitIcon" dojoAttachPoint="iconNode" role="presentation"></div\n\t\t\t><div class="dijitReset dijitInline dijitButtonText" id="${id}_label" dojoAttachPoint="containerNode" role="presentation"></div\n\t\t></div\n\t\t></td\n\t\t><td id="${id}_arrow" class=\'dijitReset dijitRight dijitButtonNode dijitArrowButton\'\n\t\t\tdojoAttachPoint="_popupStateNode,focusNode,_buttonNode"\n\t\t\tdojoAttachEvent="onkeypress:_onArrowKeyPress"\n\t\t\ttitle="${optionsTitle}"\n\t\t\trole="button" aria-haspopup="true"\n\t\t\t><div class="dijitReset dijitArrowButtonInner" role="presentation"></div\n\t\t\t><div class="dijitReset dijitArrowButtonChar" role="presentation">&#9660;</div\n\t\t></td\n\t\t><td style="display:none !important;"\n\t\t\t><input ${!nameAttrSetting} type="${type}" value="${value}" dojoAttachPoint="valueNode"\n\t\t/></td></tr></tbody\n></table>'});
define("dijit/_HasDropDown",["dojo","dijit","dijit/_Widget"],function(c,b){c.declare("dijit._HasDropDown",null,{_buttonNode:null,_arrowWrapperNode:null,_popupStateNode:null,_aroundNode:null,dropDown:null,autoWidth:true,forceWidth:false,maxHeight:0,dropDownPosition:["below","above"],_stopClickEvents:true,_onDropDownMouseDown:function(a){if(!(this.disabled||this.readOnly)){c.stopEvent(a);this._docHandler=this.connect(c.doc,"onmouseup","_onDropDownMouseUp");this.toggleDropDown()}},_onDropDownMouseUp:function(a){a&&
this._docHandler&&this.disconnect(this._docHandler);var d=this.dropDown,e=false;if(a&&this._opened){var f=c.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(c.hasClass(f,"dijitPopup"))e=true;else f=f.parentNode;if(e){f=a.target;if(d.onItemClick){for(var g;f&&!(g=b.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(c.hitch(d,
"focus"),1)},_onDropDownClick:function(a){this._stopClickEvents&&c.stopEvent(a)},buildRendering:function(){this.inherited(arguments);this._buttonNode=this._buttonNode||this.focusNode||this.domNode;this._popupStateNode=this._popupStateNode||this.focusNode||this._buttonNode;var a={after:this.isLeftToRight()?"Right":"Left",before:this.isLeftToRight()?"Left":"Right",above:"Up",below:"Down",left:"Left",right:"Right"}[this.dropDownPosition[0]]||this.dropDownPosition[0]||"Down";c.addClass(this._arrowWrapperNode||
this._buttonNode,"dijit"+a+"ArrowButton")},postCreate:function(){this.inherited(arguments);this.connect(this._buttonNode,"onmousedown","_onDropDownMouseDown");this.connect(this._buttonNode,"onclick","_onDropDownClick");this.connect(this.focusNode,"onkeypress","_onKey");this.connect(this.focusNode,"onkeyup","_onKeyUp")},destroy:function(){if(this.dropDown){this.dropDown._destroyed||this.dropDown.destroyRecursive();delete this.dropDown}this.inherited(arguments)},_onKey:function(a){if(!(this.disabled||
this.readOnly)){var d=this.dropDown,e=a.target;if(d&&this._opened&&d.handleKey)if(d.handleKey(a)===false){c.stopEvent(a);return}if(d&&this._opened&&a.charOrCode==c.keys.ESCAPE){this.closeDropDown();c.stopEvent(a)}else if(!this._opened&&(a.charOrCode==c.keys.DOWN_ARROW||(a.charOrCode==c.keys.ENTER||a.charOrCode==" ")&&((e.tagName||"").toLowerCase()!=="input"||e.type&&e.type.toLowerCase()!=="text"))){this._toggleOnKeyUp=true;c.stopEvent(a)}}},_onKeyUp:function(){if(this._toggleOnKeyUp){delete this._toggleOnKeyUp;
this.toggleDropDown();var a=this.dropDown;a&&a.focus&&setTimeout(c.hitch(a,"focus"),1)}},_onBlur:function(){this.closeDropDown(b._curFocus&&this.dropDown&&c.isDescendant(b._curFocus,this.dropDown.domNode));this.inherited(arguments)},isLoaded:function(){return true},loadDropDown:function(a){a()},toggleDropDown:function(){if(!(this.disabled||this.readOnly))if(this._opened)this.closeDropDown();else this.isLoaded()?this.openDropDown():this.loadDropDown(c.hitch(this,"openDropDown"))},openDropDown:function(){var a=
this.dropDown,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="";c.style(d,g);g=this.maxHeight;if(g==-1){g=c.window.getBox();var i=c.position(e,false);g=Math.floor(Math.max(i.y,g.h-(i.y+i.h)))}a.startup&&
!a._started&&a.startup();b.popup.moveOffScreen(a);i=c._getMarginSize(d);var j=g&&i.h>g;c.style(d,{overflowX:"hidden",overflowY:j?"auto":"hidden"});if(j){i.h=g;if("w"in i)i.w+=16}else delete i.h;if(this.forceWidth)i.w=e.offsetWidth;else if(this.autoWidth)i.w=Math.max(i.w,e.offsetWidth);else delete i.w;c.isFunction(a.resize)?a.resize(i):c.marginBox(d,i)}a=b.popup.open({parent:this,popup:a,around:e,orient:b.getPopupAroundAlignment(this.dropDownPosition&&this.dropDownPosition.length?this.dropDownPosition:
["below"],this.isLeftToRight()),onExecute:function(){f.closeDropDown(true)},onCancel:function(){f.closeDropDown(true)},onClose:function(){c.attr(f._popupStateNode,"popupActive",false);c.removeClass(f._popupStateNode,"dijitHasDropDownOpen");f._opened=false}});c.attr(this._popupStateNode,"popupActive","true");c.addClass(f._popupStateNode,"dijitHasDropDownOpen");this._opened=true;return a},closeDropDown:function(a){if(this._opened){a&&this.focus();b.popup.close(this.dropDown);this._opened=false}}});
return b._HasDropDown});
define("dijit/form/Button",["dojo","dijit","text!dijit/form/templates/Button.html","text!dijit/form/templates/DropDownButton.html","text!dijit/form/templates/ComboButton.html","dijit/form/_FormWidget","dijit/_Container","dijit/_HasDropDown"],function(c,b){c.declare("dijit.form.Button",b.form._FormWidget,{label:"",showLabel:true,iconClass:"",type:"button",baseClass:"dijitButton",templateString:c.cache("dijit.form","templates/Button.html"),attributeMap:c.delegate(b.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=b.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);c.setSelectable(this.focusNode,
false)},_fillContent:function(a){if(a&&(!this.params||!("label"in this.params)))this.set("label",a.innerHTML)},_setShowLabelAttr:function(a){this.containerNode&&c.toggleClass(this.containerNode,"dijitDisplayNone",!a);this._set("showLabel",a)},onClick:function(){return true},_clicked:function(){},setLabel:function(a){c.deprecated("dijit.form.Button.setLabel() is deprecated.  Use set('label', ...) instead.","","2.0");this.set("label",a)},_setLabelAttr:function(a){this._set("label",a);this.containerNode.innerHTML=
a;if(this.showLabel==false&&!this.params.title)this.titleNode.title=c.trim(this.containerNode.innerText||this.containerNode.textContent||"")},_setIconClassAttr:function(a){c.replaceClass(this.iconNode,a||"dijitNoIcon",this.iconClass||"dijitNoIcon");this._set("iconClass",a)}});c.declare("dijit.form.DropDownButton",[b.form.Button,b._Container,b._HasDropDown],{baseClass:"dijitDropDownButton",templateString:c.cache("dijit.form","templates/DropDownButton.html"),_fillContent:function(){if(this.srcNodeRef){var a=
c.query("*",this.srcNodeRef);b.form.DropDownButton.superclass._fillContent.call(this,a[0]);this.dropDownContainer=this.srcNodeRef}},startup:function(){if(!this._started){if(!this.dropDown&&this.dropDownContainer){var a=c.query("[widgetId]",this.dropDownContainer)[0];this.dropDown=b.byNode(a);delete this.dropDownContainer}this.dropDown&&b.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=c.connect(a,"onLoad",this,function(){c.disconnect(d);this.openDropDown()});a.refresh()}},isFocusable:function(){return this.inherited(arguments)&&!this._mouseDown}});c.declare("dijit.form.ComboButton",b.form.DropDownButton,{templateString:c.cache("dijit.form","templates/ComboButton.html"),attributeMap:c.mixin(c.clone(b.form.Button.prototype.attributeMap),{id:"",tabIndex:["focusNode","titleNode"],title:"titleNode"}),optionsTitle:"",baseClass:"dijitComboButton",
cssStateNodes:{buttonNode:"dijitButtonNode",titleNode:"dijitButtonContents",_popupStateNode:"dijitDownArrowButton"},_focusedNode:null,_onButtonKeyPress:function(a){if(a.charOrCode==c.keys[this.isLeftToRight()?"RIGHT_ARROW":"LEFT_ARROW"]){b.focus(this._popupStateNode);c.stopEvent(a)}},_onArrowKeyPress:function(a){if(a.charOrCode==c.keys[this.isLeftToRight()?"LEFT_ARROW":"RIGHT_ARROW"]){b.focus(this.titleNode);c.stopEvent(a)}},focus:function(a){this.disabled||b.focus(a=="start"?this.titleNode:this._popupStateNode)}});
c.declare("dijit.form.ToggleButton",b.form.Button,{baseClass:"dijitToggleButton",checked:false,attributeMap:c.mixin(c.clone(b.form.Button.prototype.attributeMap),{checked:"focusNode"}),_clicked:function(){this.set("checked",!this.checked)},_setCheckedAttr:function(a,d){this._set("checked",a);c.attr(this.focusNode||this.domNode,"checked",a);b.setWaiState(this.focusNode||this.domNode,"pressed",a);this._handleOnChange(a,d)},setChecked:function(a){c.deprecated("setChecked("+a+") is deprecated. Use set('checked',"+
a+") instead.","","2.0");this.set("checked",a)},reset:function(){this._hasBeenBlurred=false;this.set("checked",this.params.checked||false)}});return b.form.Button});define("dijit/form/DropDownButton",["dojo","dijit","dijit/form/Button"],function(c,b){return b.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(c,b){c.declare("dijit.layout._LayoutWidget",[b._Widget,b._Container,b._Contained],{baseClass:"dijitLayoutContainer",isLayoutContainer:true,buildRendering:function(){this.inherited(arguments);c.addClass(this.domNode,"dijitContainer")},startup:function(){if(!this._started){this.inherited(arguments);var a=this.getParent&&this.getParent();if(!(a&&a.isLayoutContainer)){this.resize();this.connect(c.isIE?
this.domNode:c.global,"onresize",function(){this.resize()})}}},resize:function(a,d){var e=this.domNode;if(a){c.marginBox(e,a);if(a.t)e.style.top=a.t+"px";if(a.l)e.style.left=a.l+"px"}d=d||{};c.mixin(d,a||{});if(!("h"in d)||!("w"in d))d=c.mixin(c.marginBox(e),d);a=c.getComputedStyle(e);var f=c._getMarginExtents(e,a),g=c._getBorderExtents(e,a);d=this._borderBox={w:d.w-(f.w+g.w),h:d.h-(f.h+g.h)};f=c._getPadExtents(e,a);this._contentBox={l:c._toPixelValue(e,a.paddingLeft),t:c._toPixelValue(e,a.paddingTop),
w:d.w-f.w,h:d.h-f.h};this.layout()},layout:function(){},_setupChild:function(a){c.addClass(a.domNode,this.baseClass+"-child "+(a.baseClass?this.baseClass+"-"+a.baseClass:""))},addChild:function(a){this.inherited(arguments);this._started&&this._setupChild(a)},removeChild:function(a){c.removeClass(a.domNode,this.baseClass+"-child"+(a.baseClass?" "+this.baseClass+"-"+a.baseClass:""));this.inherited(arguments)}});b.layout.marginBox2contentBox=function(a,d){var e=c.getComputedStyle(a),f=c._getMarginExtents(a,
e),g=c._getPadBorderExtents(a,e);return{l:c._toPixelValue(a,e.paddingLeft),t:c._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):c.marginBox(e.domNode,f);if(g)c.mixin(e,g);else{c.mixin(e,c.marginBox(e.domNode));c.mixin(e,f)}};b.layout.layoutChildren=function(e,f,g,i,j){f=c.mixin({},f);c.addClass(e,"dijitLayoutContainer");g=c.filter(g,function(h){return h.region!=
"center"&&h.layoutAlign!="client"}).concat(c.filter(g,function(h){return h.region=="center"||h.layoutAlign=="client"}));c.forEach(g,function(h){var k=h.domNode,l=h.region||h.layoutAlign,m=k.style;m.left=f.l+"px";m.top=f.t+"px";m.position="absolute";c.addClass(k,"dijitAlign"+a(l));k={};if(i&&i==h.id)k[h.region=="top"||h.region=="bottom"?"h":"w"]=j;if(l=="top"||l=="bottom"){k.w=f.w;d(h,k);f.h-=h.h;if(l=="top")f.t+=h.h;else m.top=f.t+f.h+"px"}else if(l=="left"||l=="right"){k.h=f.h;d(h,k);f.w-=h.w;if(l==
"left")f.l+=h.w;else m.left=f.l+f.w+"px"}else if(l=="client"||l=="center")d(h,f)})}})();return b.layout._LayoutWidget});
define("dijit/layout/_ContentPaneResizeMixin",["dojo","dijit","dijit/_Contained","dijit/layout/_LayoutWidget"],function(c,b){c.declare("dijit.layout._ContentPaneResizeMixin",null,{doLayout:true,isContainer:true,isLayoutContainer:true,_startChildren:function(){c.forEach(this.getChildren(),function(a){a.startup();a._started=true})},startup:function(){if(!this._started){var a=b._Contained.prototype.getParent.call(this);this._childOfLayoutWidget=a&&a.isLayoutContainer;this._needLayout=!this._childOfLayoutWidget;
this.inherited(arguments);this._startChildren();this._isShown()&&this._onShow();this._childOfLayoutWidget||this.connect(c.isIE?this.domNode:c.global,"onresize",function(){this._needLayout=!this._childOfLayoutWidget;this.resize()})}},_checkIfSingleChild:function(){var a=c.query("> *",this.containerNode).filter(function(f){return f.tagName!=="SCRIPT"}),d=a.filter(function(f){return c.hasAttr(f,"data-dojo-type")||c.hasAttr(f,"dojoType")||c.hasAttr(f,"widgetId")}),e=c.filter(d.map(b.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;c.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&&c.marginBox(this.domNode,
a);var e=this.containerNode;if(e===this.domNode){d=d||{};c.mixin(d,a||{});if(!("h"in d)||!("w"in d))d=c.mixin(c.marginBox(e),d);this._contentBox=b.layout.marginBox2contentBox(e,d)}else this._contentBox=c.contentBox(e);this._layoutChildren();delete this._needLayout},_layoutChildren:function(){this.doLayout&&this._checkIfSingleChild();if(this._singleChild&&this._singleChild.resize){var a=this._contentBox||c.contentBox(this.containerNode);this._singleChild.resize({w:a.w,h:a.h})}else c.forEach(this.getChildren(),
function(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"&&!c.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 b.layout._ContentPaneResizeMixin});
define("dojo/html",["dojo","dojo/parser"],function(c){c.getObject("html",true,c);(function(){var b=0;c.html._secureForInnerHtml=function(a){return a.replace(/(?:\s*<!DOCTYPE\s[^>]+>|<title[^>]*>[\s\S]*?<\/title>)/ig,"")};c.html._emptyNode=c.empty;c.html._setNodeContent=function(a,d){c.empty(a);if(d){if(typeof d=="string")d=c._toDom(d,a.ownerDocument);if(!d.nodeType&&c.isArrayLike(d))for(var e=d.length,f=0;f<d.length;f=e==d.length?f+1:0)c.place(d[f],a,"last");else c.place(d,a,"last")}return a};c.declare("dojo.html._ContentSetter",
null,{node:"",content:"",id:"",cleanContent:false,extractContent:false,parseContent:false,parserScope:c._scopeName,startup:true,constructor:function(a,d){c.mixin(this,a||{});d=this.node=c.byId(this.node||d);if(!this.id)this.id=["Setter",d?d.id||d.tagName:"",b++].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=c.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){c.forEach(this.parseResults,function(a){a.destroy&&a.destroy()});delete this.parseResults}c.html._emptyNode(this.node)},onBegin:function(){var a=this.content;if(c.isString(a)){if(this.cleanContent)a=c.html._secureForInnerHtml(a);
if(this.extractContent){var 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={};c.forEach(["dir","lang","textDir"],
function(f){if(this[f])d[f]=this[f]},this);this.parseResults=c.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&&c.html._setNodeContent(this.node,a,true)}});c.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 c.html._ContentSetter(c.mixin(e,
{content:d,node:a}))).set():c.html._setNodeContent(a,d,true)}})();return c.html});define("dijit/nls/loading",{root:{loadingState:"Loading...",errorState:"Sorry, an error occurred"},zh:true,"zh-tw":true,tr:true,th:true,sv:true,sl:true,sk:true,ru:true,ro:true,pt:true,"pt-pt":true,pl:true,nl:true,nb:true,ko:true,kk:true,ja:true,it:true,hu:true,he:true,fr:true,fi:true,es:true,el:true,de:true,da:true,cs:true,ca:true,ar:true});
define("dijit/layout/ContentPane",["dojo","dijit","dijit/_Widget","dijit/layout/_ContentPaneResizeMixin","dojo/string","dojo/html","i18n!dijit/nls/loading"],function(c,b){c.declare("dijit.layout.ContentPane",[b._Widget,b.layout._ContentPaneResizeMixin],{href:"",extractContent:false,parseOnLoad:true,parserScope:c._scopeName,preventCache:false,preload:false,refreshOnShow:false,loadingMessage:"<span class='dijitContentPaneLoading'>${loadingState}</span>",errorMessage:"<span class='dijitContentPaneError'>${errorState}</span>",
isLoaded:false,baseClass:"dijitContentPane",ioArgs:{},onLoadDeferred:null,attributeMap:c.delegate(b._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=c.doc.createDocumentFragment();for(d=c.byId(d);d.firstChild;)e.appendChild(d.firstChild);a=c.delegate(a,{content:e})}this.inherited(arguments,[a,d])},postMixInProperties:function(){this.inherited(arguments);var a=c.i18n.getLocalization("dijit",
"loading",this.lang);this.loadingMessage=c.string.substitute(this.loadingMessage,a);this.errorMessage=c.string.substitute(this.errorMessage,a)},buildRendering:function(){this.inherited(arguments);if(!this.containerNode)this.containerNode=this.domNode;this.domNode.title="";c.attr(this.domNode,"role")||b.setWaiRole(this.domNode,"group")},_startChildren:function(){this.inherited(arguments);this._contentSetter&&c.forEach(this._contentSetter.parseResults,function(a){if(!a._started&&!a._destroyed&&c.isFunction(a.startup)){a.startup();
a._started=true}},this)},setHref:function(a){c.deprecated("dijit.layout.ContentPane.setHref() is deprecated. Use set('href', ...) instead.","","2.0");return this.set("href",a)},_setHrefAttr:function(a){this.cancel();this.onLoadDeferred=new c.Deferred(c.hitch(this,"cancel"));this.onLoadDeferred.addCallback(c.hitch(this,"onLoad"));this._set("href",a);if(this.preload||this._created&&this._isShown())this._load();else this._hrefChanged=true;return this.onLoadDeferred},setContent:function(a){c.deprecated("dijit.layout.ContentPane.setContent() is deprecated.  Use set('content', ...) instead.",
"","2.0");this.set("content",a)},_setContentAttr:function(a){this._set("href","");this.cancel();this.onLoadDeferred=new c.Deferred(c.hitch(this,"cancel"));this._created&&this.onLoadDeferred.addCallback(c.hitch(this,"onLoad"));this._setContent(a||"");this._isDownloaded=false;return this.onLoadDeferred},_getContentAttr:function(){return this.containerNode.innerHTML},cancel:function(){this._xhrDfd&&this._xhrDfd.fired==-1&&this._xhrDfd.cancel();delete this._xhrDfd;this.onLoadDeferred=null},uninitialize:function(){this._beingDestroyed&&
this.cancel();this.inherited(arguments)},destroyRecursive:function(){this._beingDestroyed||this.inherited(arguments)},_onShow:function(){this.inherited(arguments);if(this.href)if(!this._xhrDfd&&(!this.isLoaded||this._hrefChanged||this.refreshOnShow))return this.refresh()},refresh:function(){this.cancel();this.onLoadDeferred=new c.Deferred(c.hitch(this,"cancel"));this.onLoadDeferred.addCallback(c.hitch(this,"onLoad"));this._load();return this.onLoadDeferred},_load:function(){this._setContent(this.onDownloadStart(),
true);var a=this,d={preventCache:this.preventCache||this.refreshOnShow,url:this.href,handleAs:"text"};c.isObject(this.ioArgs)&&c.mixin(d,this.ioArgs);var e=this._xhrDfd=(this.ioMethod||c.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;c.forEach(this.getChildren(),function(d){d.destroyRecursive&&d.destroyRecursive()});if(a){c.forEach(a.parseResults,
function(d){d.destroyRecursive&&d.domNode&&d.domNode.parentNode==c.body()&&d.destroyRecursive()});delete a.parseResults}c.html._emptyNode(this.containerNode);delete this._singleChild},_setContent:function(a,d){this.destroyDescendants();var e=this._contentSetter;if(!(e&&e instanceof c.html._ContentSetter))e=this._contentSetter=new c.html._ContentSetter({node:this.containerNode,_onError:c.hitch(this,this._onError),onContentError:c.hitch(this,function(g){g=this.onContentError(g);try{this.containerNode.innerHTML=
g}catch(i){console.error("Fatal "+this.id+" could not change content due to "+i.message,i)}})});var f=c.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(c.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 b.layout.ContentPane});
define("dijit/form/_FormMixin",["dojo","dijit","dojo/window"],function(c,b){c.declare("dijit.form._FormMixin",null,{state:"",reset:function(){c.forEach(this.getDescendants(),function(a){a.reset&&a.reset()})},validate:function(){var a=false;return c.every(c.map(this.getDescendants(),function(d){d._hasBeenBlurred=true;var e=d.disabled||!d.validate||d.validate();if(!e&&!a){c.window.scrollIntoView(d.containerNode||d.domNode);d.focus();a=true}return e}),function(d){return d})},setValues:function(a){c.deprecated(this.declaredClass+
"::setValues() is deprecated. Use set('value', val) instead.","","2.0");return this.set("value",a)},_setValueAttr:function(a){var d={};c.forEach(this.getDescendants(),function(i){if(i.name)(d[i.name]||(d[i.name]=[])).push(i)});for(var e in d)if(d.hasOwnProperty(e)){var f=d[e],g=c.getObject(e,false,a);if(g!==undefined){c.isArray(g)||(g=[g]);if(typeof f[0].checked=="boolean")c.forEach(f,function(i){i.set("value",c.indexOf(g,i.value)!=-1)});else f[0].multiple?f[0].set("value",g):c.forEach(f,function(i,
j){i.set("value",g[j])})}}},getValues:function(){c.deprecated(this.declaredClass+"::getValues() is deprecated. Use get('value') instead.","","2.0");return this.get("value")},_getValueAttr:function(){var a={};c.forEach(this.getDescendants(),function(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)c.setObject(e,f,a);else{f=c.getObject(e,false,a);f===undefined&&c.setObject(e,null,a)}else{d=c.getObject(e,false,a);
if(!d){d=[];c.setObject(e,d,a)}f!==false&&d.push(f)}else{d=c.getObject(e,false,a);if(typeof d!="undefined")c.isArray(d)?d.push(f):c.setObject(e,[d,f],a);else c.setObject(e,f,a)}}});return a},isValid:function(){return this.state==""},onValidStateChange:function(){},_getState:function(){var a=c.map(this._descendants,function(d){return d.get("state")||""});return c.indexOf(a,"Error")>=0?"Error":c.indexOf(a,"Incomplete")>=0?"Incomplete":""},disconnectChildren:function(){c.forEach(this._childConnections||
[],c.hitch(this,"disconnect"));c.forEach(this._childWatches||[],function(a){a.unwatch()})},connectChildren:function(a){var d=this;this.disconnectChildren();this._descendants=this.getDescendants();a=a?function(i,j){d[i]=j}:c.hitch(this,"_set");a("value",this.get("value"));a("state",this._getState());var e=this._childConnections=[],f=this._childWatches=[];c.forEach(c.filter(this._descendants,function(i){return i.validate}),function(i){c.forEach(["state","disabled"],function(j){f.push(i.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)};c.forEach(c.filter(this._descendants,function(i){return i.onChange}),function(i){e.push(d.connect(i,"onChange",g));f.push(i.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 b.form._FormMixin});
define("dijit/_DialogMixin",["dojo","dijit","dijit/_Widget"],function(c,b){c.declare("dijit._DialogMixin",null,{attributeMap:b._Widget.prototype.attributeMap,execute:function(){},onCancel:function(){},onExecute:function(){},_onSubmit:function(){this.onExecute();this.execute(this.get("value"))},_getFocusItems:function(){var a=b._getTabNavigable(this.containerNode);this._firstFocusItem=a.lowest||a.first||this.closeButtonNode||this.domNode;this._lastFocusItem=a.last||a.highest||this._firstFocusItem}});
return b._DialogMixin});
define("dijit/TooltipDialog",["dojo","dijit","text!dijit/templates/TooltipDialog.html","dijit/layout/ContentPane","dijit/_Templated","dijit/form/_FormMixin","dijit/_DialogMixin"],function(c,b){c.declare("dijit.TooltipDialog",[b.layout.ContentPane,b._Templated,b.form._FormMixin,b._DialogMixin],{title:"",doLayout:false,autofocus:true,baseClass:"dijitTooltipDialog",_firstFocusItem:null,_lastFocusItem:null,templateString:c.cache("dijit","templates/TooltipDialog.html"),_setTitleAttr:function(a){this.containerNode.title=a;
this._set("title",a)},postCreate:function(){this.inherited(arguments);this.connect(this.containerNode,"onkeypress","_onKey")},orient:function(a,d,e){a="dijitTooltipAB"+(e.charAt(1)=="L"?"Left":"Right")+" dijitTooltip"+(e.charAt(0)=="T"?"Below":"Above");c.replaceClass(this.domNode,a,this._currentOrientClass||"");this._currentOrientClass=a},focus:function(){this._getFocusItems(this.containerNode);b.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=c.keys;a.charOrCode===e.TAB&&this._getFocusItems(this.containerNode);var f=this._firstFocusItem==this._lastFocusItem;if(a.charOrCode==e.ESCAPE){setTimeout(c.hitch(this,"onCancel"),0);c.stopEvent(a)}else if(d==this._firstFocusItem&&a.shiftKey&&a.charOrCode===e.TAB){f||b.focus(this._lastFocusItem);c.stopEvent(a)}else if(d==this._lastFocusItem&&a.charOrCode===e.TAB&&!a.shiftKey){f||b.focus(this._firstFocusItem);c.stopEvent(a)}else a.charOrCode===
e.TAB&&a.stopPropagation()}});return b.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(c,b,a,d,e){function f(o,p,s,t,v){this.commandService=o;this.handler=p;this.items=s;this.userData=t;this.command=v;if(v.parameters)this.parameters=v.parameters.makeCopy();this.id=v.id}function g(o){this._domScope={};this._objectScope={};this._globalScope={};this._namedGroups=
{};this._ungrouped={};this._topics={};this._activeBindings={};this._urlBindings={};this._init(o);this._parameterCollector=null}function i(o,p,s){b.addClass(p,"commandImage");var t;if(o.imageClass){t=b.create("span",{},p,"last");b.addClass(t,o.spriteClass);b.addClass(t,o.imageClass)}else{t=new Image;t.alt=o.name;t.name=s;t.id=s;t.src=o.image;b.place(t,p,"last")}return t}function j(o){this._init(o)}function h(o,p,s,t,v){this.keyCode=typeof o==="string"?o.toUpperCase().charCodeAt(0):o;this.mod1=p!==
undefined&&p!==null?p:false;this.mod2=s!==undefined&&s!==null?s:false;this.mod3=t!==undefined&&t!==null?t:false;this.mod4=v!==undefined&&v!==null?v:false}function k(o,p){this.token=o;this.parameterName=p}function l(o,p,s,t){this.name=o;this.type=p;this.label=s;this.value=t}function m(o,p,s){this._storeParameters(o);this.options=p;this.optionsRequested=false;this.getParameters=s}f.prototype={collectsParameters:function(){return this.commandService&&this.commandService.collectsParameters()}};f.prototype.constructor=
f;var q=b.declare(a.MenuItem,{_onClick:function(){this.hrefCallback||this.inherited(arguments)}}),r=b.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(b.hitch(this,
function(){if(this._stillInDocument(this._connectNode))this.pollForMissingTarget();else{this.polling=false;this.close()}}),1E3)},_stillInDocument:function(o){for(;o;){if(o===window.document)return true;o=o.parentNode}return false},postMixInProperties:function(){this.inherited(arguments);this.options.commandParent&&a.byId(this.options.commandParent.id)&&b.connect(this.options.commandParent,"onClose",b.hitch(this,function(){this.close()}))}});g.prototype={_init:function(o){this._registry=o.serviceRegistry;
this._serviceRegistration=this._registry.registerService("orion.page.command",this);this._selection=o.selection;b.connect(window.document,"onkeydown",b.hitch(this,function(p){p=p||window.event;var s=p.target.nodeName.toLowerCase();if(s==="input")switch(p.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(s===
"textarea")return;this._processKey(p)}))},_processKey:function(o){function p(y){if(window.document.all)y.keyCode=0;else{y.preventDefault();y.stopPropagation()}}for(var s in this._activeBindings)if(this._activeBindings[s]&&this._activeBindings[s].keyBinding&&this._activeBindings[s].command)if(this._activeBindings[s].keyBinding.match(o)){var t=this._activeBindings[s],v=t.invocation;if(v){var w=t.command;if(w.hrefCallback){p(o);o=w.hrefCallback.call(v.handler||window,v);o.then?o.then(function(y){window.open(y)}):
window.open(o);return}else if(w.callback){p(o);window.setTimeout(b.hitch(this,function(){v.parameters&&this.collectsParameters()?this._collectParameters(v):w.callback.call(v.handler||window,v)}),0);return}}}},processURL:function(o){for(var p in this._urlBindings)if(this._urlBindings[p]&&this._urlBindings[p].urlBinding&&this._urlBindings[p].command){var s=this._urlBindings[p].urlBinding.match(o);if(s){var t=this._urlBindings[p],v=t.command,w=t.invocation;if(w&&w.parameters&&v.callback){w.parameters.setValue(s.parameterName,
s.parameterValue);window.setTimeout(b.hitch(this,function(){this._collectParameters(w)}),0);return}}}},findCommand:function(o){return this._objectScope[o]||this._domScope[o]||this._globalScope[o]},runCommand:function(o){var p=this._urlBindings[o];p&&p.command&&p.command.callback&&window.setTimeout(b.hitch(this,function(){this._collectParameters(p.invocation)}),0)},getSelectionService:function(){return this._selection},setParameterCollector:function(o){this._parameterCollector=o},openParameterCollector:function(o,
p){if(this._parameterCollector){this._parameterCollector.close();this._parameterCollector.open(o,p)}},closeParameterCollector:function(){this._parameterCollector&&this._parameterCollector.close()},collectsParameters:function(){return this._parameterCollector},_collectParameters:function(o){var p=false;if(this._parameterCollector){o.parameters.updateParameters(o);p=o.parameters.hasParameters()?this._parameterCollector.collectParameters(o):false}if(!p&&o.parameters.hasParameters()){var s=new a.TooltipDialog({onBlur:function(){a.popup.close(s)}}),
t=b.create("div"),v=this._parameterCollector.getFillFunction(o,function(){a.popup.close(s)})(t);s.set("content",t);t=(t=a.byId(o.domParent.id))?b.position(t.eclipseScopeId,true):b.position(o.domNode,true);if(t.x&&t.y&&t.w){a.popup.open({popup:s,x:t.x+t.w-8,y:t.y+8});window.setTimeout(function(){v.focus();v.select()},0);p=true}}if(!p){o.parameters=null;o.command.callback.call(o.handler,o)}},showKeyBindings:function(o){for(var p in this._activeBindings)this._activeBindings[p]&&this._activeBindings[p].keyBinding&&
this._activeBindings[p].command&&b.place('<span role="listitem">'+d.getUserKeyString(this._activeBindings[p].keyBinding)+" = "+this._activeBindings[p].command.name+"<br></span>",o,"last")},addCommand:function(o,p){switch(p){case "dom":this._domScope[o.id]=o;break;case "object":this._objectScope[o.id]=o;break;case "global":this._globalScope[o.id]=o;break;default:throw"unrecognized command scope "+p;}},addCommandGroup:function(o,p,s,t,v){var w=this._namedGroups;if(t)w=this._createEntryForPath(t);if(w[o]){if(s)w[o].title=
s;if(p)w[o].position=p;if(v)w[o].scopeId=v}else{w[o]={title:s,position:p,children:{},scopeId:v};w.sortedCommands=null}},_createEntryForPath:function(o){var p=this._namedGroups;if(o){o=o.split("/");for(var s=0;s<o.length;s++)if(o[s].length>1){p[o[s]]||(p[o[s]]={position:0,children:{}});p=p[o[s]].children}}return p},registerCommandContribution:function(o,p,s,t,v,w,y){t=!s&&!t?this._ungrouped:this._createEntryForPath(t);t[o]={scopeId:s,position:p};if(w)if(p=this._domScope[o]||this._globalScope[o])this._activeBindings[o]=
{command:p,keyBinding:w,bindingOnly:v};if(y)if(p=this._domScope[o]||this._globalScope[o])this._urlBindings[o]={command:p,urlBinding:y,bindingOnly:v};t.sortedCommands=null},_isLastChildSeparator:function(o,p){if(p==="tool"||p==="button")return o.childNodes.length>0&&b.hasClass(o.childNodes[o.childNodes.length-1],"commandSeparator");if(p==="menu"){o=o.getChildren();return o.length>0&&o[o.length-1]instanceof a.MenuSeparator}return false},renderCommands:function(o,p,s,t,v,w,y,C,D){if(typeof o==="string")o=
b.byId(o);if(o){if(!o.id||o.id==="")window.console.log("renderCommands: "+p+","+v+">> WARNING: command parent must have an id")}else throw"no parent";if(s){var E;if(p==="object"){E=this._objectScope;this._render(this._ungrouped,o,p,s,t,v,w,y,E,C,D)}else if(p==="dom")E=this._domScope;else if(p==="global")E=this._globalScope;else throw"Unrecognized command scope "+p;this._render(this._namedGroups,o,p,s,t,v,w,y,E,C,D);if(v==="tool"||v==="button")this._isLastChildSeparator(o,v)&&o.removeChild(o.childNodes[o.childNodes.length-
1]);else if(v==="menu")if(this._isLastChildSeparator(o,v)){s=o.getChildren()[o.getChildren().length-1];o.removeChild(s);s.destroy()}if(p==="dom"||p==="global")d.forceLayout(o)}else{var F=this;this._selection&&this._selection.getSelections(function(I){F.renderCommands(o,p,I,t,v,w,y,C,D)})}},_render:function(o,p,s,t,v,w,y,C,D,E,F){var I=o.sortedCommands;if(!I){I=[];for(var G in o){var N=o[G];if(N&&typeof N.position==="number"){N.id=G;I.push(N)}}I.sort(function(W,u){return W.position-u.position});o.sortedCommands=
I}for(o=0;o<I.length;o++){var L,T;if(I[o].children){G=I[o];if(!(G.scopeId&&p.id!==G.scopeId)){var R;if(w==="tool"||w==="button")if(G.title){L=new a.Menu({style:"display: none;"});L.eclipseScopeId=p.eclipseScopeId||p.id;this._render(I[o].children,L,s,t,v,"menu",y,C,D,E);R=L.getChildren();if(this._isLastChildSeparator(L,"menu")){N=R[R.length-1];L.removeChild(N);N.destroy();R=L.getChildren()}if(R.length>0){N=R[0].eclipseCommand;if(R.length>1){L=new a.form.DropDownButton({label:G.title==="*"?"Actions":
G.title,showLabel:G.title!=="*",dropDown:L});b.addClass(L.domNode,"commandMenu");b.destroy(L.valueNode);if(G.title==="*"){b.addClass(L.domNode,"textless");new r({connectId:[L.domNode],label:"Actions menu",position:["above","left","right","below"],commandParent:p,commandService:this})}N._setupActivateVisuals(L.domNode,L.focusNode,E,F);b.place(L.domNode,p,"last")}else{L=w+N.id+o;T=new f(this,v,t,C,N);w==="button"?N._addButton(p,y,L,T,E,F):N._addTool(p,y,L,T,E,F)}}}else{var Z;if(p.childNodes.length>
0&&!this._isLastChildSeparator(p,w))Z=this.generateSeparatorImage(p);this._render(I[o].children,p,s,t,v,w,y,C,D,E,F);if(p.childNodes.length>0)if(p.childNodes[p.childNodes.length-1]!==Z)Z=this.generateSeparatorImage(p)}else if(G.title){N=new a.Menu;this._render(I[o].children,N,s,t,v,w,y,C,D,E,F);N.getChildren().length>0&&p.addChild(new a.PopupMenuItem({label:G.title,popup:N}))}else{var M;if(p.getChildren().length>0&&!this._isLastChildSeparator(p,w)){M=new a.MenuSeparator;p.addChild(M)}this._render(I[o].children,
p,s,t,v,w,y,C,D,E,F);G=p.getChildren();if(G[G.length-1]!==M){M=new a.MenuSeparator;p.addChild(M)}}}}else{N=(G=D[I[o].id])?true:false;R=R=null;if(G){if(s==="dom"||s==="global")N=w==="tool"||w==="button"?p.id===I[o].scopeId:w==="menu"?p.eclipseScopeId===I[o].scopeId:false;else if(s==="object")N=!I[o].scopeId;var S=N&&(s==="global"||s==="dom");T=new f(this,v,t,C,G);T.domParent=p;L=N&&(G.visibleWhen?G.visibleWhen(t):true);if(S&&this._activeBindings[G.id]&&this._activeBindings[G.id].keyBinding){R=this._activeBindings[G.id];
R.invocation=L?T:null;if(R.bindingOnly)N=false}if(S&&this._urlBindings[G.id]&&this._urlBindings[G.id].urlBinding){R=this._urlBindings[G.id];R.invocation=L?T:null;if(R.bindingOnly)N=false}N=N&&L}if(N)if(G.choiceCallback){N=new a.Menu({style:"display: none;"});if(w==="tool"||w==="button"){L=new a.form.DropDownButton({label:G.name,dropDown:N});if(G.image){b.addClass(L.iconNode,"commandImage");L.iconNode.src=G.image}b.place(L.domNode,p,"last");L.eclipseCommand=G;L.eclipseChoices=N;b.connect(L,"onClick",
L,function(){this.eclipseCommand.populateChoicesMenu(this.eclipseChoices,t,v,C)})}else if(w==="menu"){L=new a.PopupMenuItem({label:G.name,popup:N});p.addChild(L);L.eclipseCommand=G;L.eclipseChoices=N;b.connect(p,"_openPopup",L,function(){this.eclipseCommand.populateChoicesMenu(this.eclipseChoices,t,v,C)})}}else if(w==="tool"){L="tool"+G.id+o;G._addTool(p,y,L,T,E,F)}else if(w==="button"){L="button"+G.id+o;G._addButton(p,y,L,T,E,F)}else w==="menu"&&G._addMenuItem(p,T,E,F)}}},whenHidden:function(o,p){o=
typeof o==="string"?o:o.id;if(!this.hidden)this.hidden={};if(this.hidden[o])this.hidden[o].push(p);else this.hidden[o]=[p]},generateSeparatorImage:function(o){o=b.create("span",null,o,"last");b.addClass(o,"core-sprite-sep");b.addClass(o,"imageSprite");b.addClass(o,"commandSeparator");return o}};g.prototype.constructor=g;j.prototype={_init:function(o){this.id=o.id;this.name=o.name;this.tooltip=o.tooltip||o.name;this.callback=o.callback;this.hrefCallback=o.hrefCallback;this.choiceCallback=o.choiceCallback;
this.image=o.image||c.toUrl("images/none.png");this.imageClass=o.imageClass;this.spriteClass=o.spriteClass||"commandSprite";this.visibleWhen=o.visibleWhen;this.parameters=o.parameters},_addTool:function(o,p,s,t,v,w){t.handler=t.handler||this;var y,C;if(this.hrefCallback){y=this._makeLink(t);if(!y)return}else{y=b.create("span",{tabindex:"0",role:"button"});if(p||!this.hasImage()){p=window.document.createTextNode(this.name);b.place(p,y,"last");b.addClass(y,"commandMissingImageButton commandButton")}else{C=
i(this,y,s);this._addAccessibleLabel(y)}this._hookCallback(y,t);this._setupActivateVisuals(y,y,v,w,C?"commandImageOver":"commandButtonOver")}t.domNode=y;t.domParent=o;this.tooltip&&new r({connectId:[y],label:this.tooltip,position:["above","left","right","below"],commandParent:o,commandService:t.commandService});b.place(y,o,"last")},_addButton:function(o,p,s,t,v,w){t.handler=t.handler||this;if(this.hrefCallback){p=this._makeLink(t);if(!p)return}else{p=b.create("span",{tabindex:"0",role:"button"});
this._hookCallback(p,t);var y;if(this.name){b.place(window.document.createTextNode(this.name),p,"last");b.addClass(p,"commandButton");y="commandButtonOver"}else{i(this,p,s);y="commandImageOver";this._addAccessibleLabel(p)}this._setupActivateVisuals(p,p,v,w,y)}p.id=s;this.tooltip&&new r({connectId:[p],label:this.tooltip,position:["above","left","right","below"],commandParent:o,commandService:t.commandService});t.domParent=o;t.domNode=p;b.place(p,o,"last")},_addMenuItem:function(o,p){p.domParent=o.domNode;
var s=new q({labelType:this.hrefCallback?"html":"text",label:this.name,iconClass:this.imageClass,hrefCallback:!!this.hrefCallback});this.tooltip&&new r({connectId:[s.domNode],label:this.tooltip,commandParent:o,commandService:p.commandService});if(this.hrefCallback){var t=this.hrefCallback.call(p.handler,p);if(t)if(t.then)t.then(b.hitch(this,function(v){s.set("label","<a href='"+v+"'>"+this.name+"</a>")}));else if(t)s.set("label","<a href='"+t+"'>"+this.name+"</a>");else return}else if(this.callback)s.onClick=
this.parameters&&p.collectsParameters()?b.hitch(this,function(){p.commandService._collectParameters(p)}):b.hitch(this,function(){this.callback.call(p.handler,p)});s.eclipseCommand=this;o.addChild(s);if(this.imageClass)b.addClass(s.iconNode,this.spriteClass);else if(this.image){b.addClass(s.iconNode,"commandMenuItem");s.iconNode.src=this.image}p.domNode=s.domNode},_makeLink:function(o){var p=b.create("a",{tabindex:"0"});b.addClass(p,"commandLink");b.place(window.document.createTextNode(this.name),
p,"last");o=this.hrefCallback.call(o.handler,o);if(o.then)o.then(function(s){p.href=s});else if(o)p.href=o;else return null;return p},_hookCallback:function(o,p){b.connect(o,"onclick",this,function(){if(this.parameters&&p.collectsParameters())p.commandService._collectParameters(p);else this.callback&&this.callback.call(p.handler,p)});b.connect(o,"onkeypress",this,function(s){if(s.keyCode===b.keys.ENTER||s.keyCode===b.keys.SPACE)if(this.parameters&&p.collectsParameters())p.commandService._collectParameters(p);
else this.callback&&this.callback.call(p.handler,p)})},_addAccessibleLabel:function(o){var p=this.name||this.tooltip;p&&b.attr(o,"aria-label",p)},_setupActivateVisuals:function(o,p,s,t,v){t&&b.addClass(o,t);var w=function(){v&&b.addClass(this,v);s&&b.addClass(this,s);t&&b.removeClass(this,t)},y=function(){v&&b.removeClass(this,v);s&&b.removeClass(this,s);t&&b.addClass(this,t)};b.connect(o,"onmouseover",o,w);b.connect(p,"onfocus",o,w);b.connect(o,"onmouseout",o,y);b.connect(p,"onblur",o,y)},populateChoicesMenu:function(o,
p,s,t){o.focusedChild=null;b.forEach(o.getChildren(),function(y){o.removeChild(y);y.destroy()});s=this.getChoices(p,s,t);for(t=0;t<s.length;t++){var v=s[t],w;if(v.name){w=new a.MenuItem({label:v.name,iconClass:v.imageClass,onClick:this.makeChoiceCallback(v,p)});if(v.imageClass)b.addClass(w.iconNode,v.spriteClass||"commandSprite");else if(v.image){b.addClass(w.iconNode,"commandImage");w.iconNode.src=v.image}}else w=new a.MenuSeparator;o.addChild(w)}},getChoices:function(o,p,s){if(this.choiceCallback)return this.choiceCallback.call(p,
o,s);return null},makeChoiceCallback:function(o,p){return function(s){o.callback&&o.callback.call(o,p,s)}},hasImage:function(){return this.imageClass||this.image!==c.toUrl("images/none.png")}};j.prototype.constructor=j;var n=window.navigator.platform.indexOf("Mac")!==-1;h.prototype={match:function(o){if(this.keyCode===o.keyCode){if(this.mod1!==(n?o.metaKey:o.ctrlKey))return false;if(this.mod2!==o.shiftKey)return false;if(this.mod3!==o.altKey)return false;if(n&&this.mod4!==o.ctrlKey)return false;return true}return false},
equals:function(o){if(!o)return false;if(this.keyCode!==o.keyCode)return false;if(this.mod1!==o.mod1)return false;if(this.mod2!==o.mod2)return false;if(this.mod3!==o.mod3)return false;if(this.mod4!==o.mod4)return false;return true}};h.prototype.constructor=h;k.prototype={match:function(o){o=e.matchResourceParameters(o);if(typeof o[this.token]!=="undefined"){this.parameterValue=o[this.token];return this}return null}};k.prototype.constructor=k;l.prototype={optionsRequested:function(){return this.optionsRequested}};
l.prototype.constructor=l;m.prototype={_storeParameters:function(o){this.parameterTable=null;if(o){this.parameterTable={};for(var p=0;p<o.length;p++)this.parameterTable[o[p].name]=o[p]}},updateParameters:function(o){typeof this.getParameters==="function"&&this._storeParameters(this.getParameters(o))},hasParameters:function(){return this.parameterTable!==null},parameterNamed:function(o){return this.parameterTable[o]},valueFor:function(o){if(o=this.parameterTable[o])return o.value;return null},setValue:function(o,
p){if(o=this.parameterTable[o])o.value=p},forEach:function(o){for(var p in this.parameterTable)this.parameterTable[p].type&&this.parameterTable[p].name&&o(this.parameterTable[p])},makeCopy:function(){var o=[];this.forEach(function(p){p=new l(p.name,p.type,p.label,p.value);o.push(p)});return new m(o,this.options,this.getParameters)}};m.prototype.constructor=m;return{CommandService:g,CommandKeyBinding:h,Command:j,CommandInvocation:f,CommandMenuItem:q,URLBinding:k,ParametersDescription:m,CommandParameter:l,
CommandTooltip:r}});
define("orion/parameterCollectors",["require","dojo","dijit","orion/commands","orion/util","dijit/Menu","dijit/MenuItem","dijit/form/DropDownButton"],function(c,b,a,d,e){function f(){this._activeContainer=null}f.prototype={close:function(){if(this._activeElements){this._activeElements.parameterArea&&b.empty(this._activeElements.parameterArea);if(this._activeElements.parameterContainer){b.removeClass(this._activeElements.parameterContainer,"slideActive");b.removeClass(this._activeElements.slideContainer,"slideContainerActive")}this._activeElements.dismissArea&&
b.empty(this._activeElements.dismissArea);this._activeElements.commandNode&&b.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 i={},j=null;if(typeof g==="string")g=b.byId(g);for(var h=g;h;){if(b.hasClass(h,"toolComposite")){j=h;break}h=h.parentNode}if(b.hasClass(g,"commandMarker"))i.commandNode=
g;if(j){i.slideContainer=b.query(".slideParameters",j)[0];i.parameterContainer=b.query(".slide",j)[0];i.parameterArea=b.query(".parameters",j)[0];i.dismissArea=b.query(".parametersDismiss",j)[0]}return i},open:function(g,i){if(typeof g==="string")g=b.byId(g);this.close();this._activeElements=null;if((this._activeElements=this._findParameterElements(g))&&this._activeElements.parameterArea&&this._activeElements.slideContainer&&this._activeElements.parameterContainer){var j=i(this._activeElements.parameterArea);
g=b.query("#closebox",this._activeElements.parameterArea);if(g.length===0){g=b.create("span",{id:"closebox",role:"button",tabindex:"0"},this._activeElements.dismissArea||this._activeElements.parameterArea,"last");b.addClass(g,"imageSprite");b.addClass(g,"core-sprite-close");b.addClass(g,"dismiss");g.title="Close";b.connect(g,"onclick",b.hitch(this,function(){this.close(this._activeElements)}));b.connect(g,"onkeypress",b.hitch(this,function(h){h.keyCode===b.keys.ENTER&&this.close(this._activeElements)}))}b.addClass(this._activeElements.slideContainer,
"slideContainerActive");b.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&&b.addClass(this._activeElements.commandNode,"activeCommand");return true}return false},_collectAndCall:function(g,i){b.query("input",i).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&&b.addClass(g.domNode,"commandMarker");return this.open(g.domNode||g.domParent,this.getFillFunction(g))}return false},getFillFunction:function(g,i){return b.hitch(this,function(j){var h=null,k=b.hitch(this,function(){i?i():this.close(g.domNode)}),l=b.hitch(this,function(r){r.keyCode===b.keys.ENTER&&this._collectAndCall(g,j);if(r.keyCode===b.keys.ESCAPE||r.keyCode===b.keys.ENTER){k();
b.stopEvent(r)}});g.parameters.forEach(function(r){r.label&&b.place(document.createTextNode(r.label),j,"last");var n=b.create("input",{type:r.type},j,"last");b.addClass(n,"parameterInput");b.addClass(n,"parameterInput"+r.type);n.setAttribute("speech","speech");n.setAttribute("x-webkit-speech","x-webkit-speech");n.parameterName=r.name;h||(h=n);if(r.value)n.value=r.value;b.connect(n,"onkeypress",l)});var m=function(r){r._collectAndCall(g,j);k()};if(g.parameters.options){g.parameters.optionsRequested=
false;var q=b.create("span",{role:"button",tabindex:"0"},j,"last");b.place(window.document.createTextNode("More"),q,"last");b.addClass(q,"dismiss");b.connect(q,"onclick",b.hitch(this,function(){g.parameters.optionsRequested=true;m(this)}));b.connect(q,"onkeypress",b.hitch(this,function(r){if(r.keyCode===b.keys.ENTER){g.parameters.optionsRequested=true;m(this)}}))}spacer=b.create("span",null,j,"last");b.addClass(spacer,"dismiss");q=b.create("span",{role:"button",tabindex:"0"},j,"last");b.place(window.document.createTextNode("Submit"),
q,"last");b.addClass(q,"dismiss");b.connect(q,"onclick",b.hitch(this,function(){m(this)}));b.connect(q,"onkeypress",b.hitch(this,function(r){r.keyCode===b.keys.ENTER&&m(this)}));spacer=b.create("span",null,j,"last");b.addClass(spacer,"dismiss");q=b.create("span",{id:"closebox",role:"button",tabindex:"0"},j,"last");b.addClass(q,"imageSprite");b.addClass(q,"core-sprite-close");b.addClass(q,"dismiss");q.title="Close";b.connect(q,"onclick",b.hitch(this,function(){k()}));b.connect(q,"onkeypress",b.hitch(this,
function(r){r.keyCode===b.keys.ENTER&&k()}));return h})}};f.prototype.constructor=f;return{CommandParameterCollector:f}});define("orion/editor/regex",[],function(){function c(a){return a.replace(/([\\$\^*\/+?\.\(\)|{}\[\]])/g,"\\$&")}function b(a){if(a=/^\s*\/(.+)\/([gim]{0,3})\s*$/.exec(a))return{pattern:a[1],flags:a[2]};return null}return{escape:c,parse:b}});
define("orion/contentTypes",[],function(){function c(a){function d(h,k,l,m){l=k.filename.indexOf(l)>=0;var q=k.extension.indexOf(m)>=0;if(l||q)if(!h||l&&h.extension.indexOf(m)>=0)return k;return h}for(var e=a&&a.split(".").pop(),f=this.getContentTypes(),g=null,i=0;i<f.length;i++){var j=f[i];if(d(g,j,a,e)===j)g=j}return g}function b(a){function d(e){function f(l){if(l===null||typeof l==="undefined")return[];return l instanceof Array?l:[l]}e=e.getServiceReferences("orion.file.contenttype");for(var g=
{},i=0;i<e.length;i++)for(var j=f(e[i].getProperty("contentTypes")),h=0;h<j.length;h++){var k=j[h];g[k.id]||(g[k.id]={id:k.id,name:k.name,image:k.image,"extends":k["extends"],extension:f(k.extension),filename:f(k.filename)})}return g}this.serviceRegistry=a;this.map=d(a);a.registerService("orion.file.contenttypes",this)}b.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 c.call(this,a.Name)},getFilenameContentType:function(a){return c.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:b}});
define("orion/URITemplate",["require","exports","module"],function(){function c(k){this._text=k}function b(k,l){if(l==="U")return encodeURIComponent(k).replace(/[!'()*]/g,function(m){return"%"+m.charCodeAt(0).toString(16).toUpperCase()});if(l==="U+R")return encodeURI(k).replace(/%5B/g,"[").replace(/%5D/g,"]");if(l==="U+R-,")return encodeURI(k).replace(/%5B/g,"[").replace(/%5D/g,"]").replace(/,/g,"%2C");throw new Error("Unknown allowed character set: "+l);}function a(k,l,m){for(var q=[],r=0;r<k.length;r++)typeof k[r]!==
"undefined"&&q.push(b(k[r],l));return q.join(m)}function d(k,l,m,q){for(var r=Object.keys(k),n=[],o=0;o<r.length;o++)typeof k[r[o]]!=="undefined"&&n.push(b(r[o],l)+m+b(k[r[o]],l));return n.join(q)}function e(k){for(var l=[],m=k.split(","),q=0;q<m.length;q++){var r=m[q].match(h);if(r===null)throw new Error("Bad VarSpec: "+k);l.push({name:r[1],explode:!!r[2],prefix:r[3]?parseInt(r[3],10):-1})}return l}function f(k){if(k.length===0)throw new Error("Invalid Expression: 0 length expression");if(this._operator=
j[k[0]])k=k.substring(1);else this._operator=j.NUL;this._varSpecList=e(k)}function g(k){for(var l=[],m=0,q=k.indexOf("{",m);q!==-1;){l.push(new c(k.substring(m,q)));m=k.indexOf("}",q+1);if(m===-1)throw new Error("Invalid template: "+k);l.push(new f(k.substring(q+1,m)));m=m+1;q=k.indexOf("{",m)}l.push(new c(k.substring(m)));return l}function i(k){this._templateComponents=g(k)}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-,"}},h=/^((?:(?:[a-zA-Z0-9_])|(?:%[0-9A-F][0-9A-F]))(?:(?:[a-zA-Z0-9_.])|(?:%[0-9A-F][0-9A-F]))*)(?:(\*)|:([0-9]+))?$/;c.prototype=
{expand:function(){return encodeURI(this._text)}};f.prototype={expand:function(k){for(var l=[],m=0;m<this._varSpecList.length;m++){var q=this._varSpecList[m],r=q.name,n=k[r],o=typeof n;if(o!=="undefined"&&n!==null){var p=l.length===0?this._operator.first:this._operator.sep;if(o==="string"){if(this._operator.named){p+=b(r,"U+R");p+=n.length===0?this._operator.ifemp:"="}if(q.prefix!==-1&&q.prefix<n.length)n=n.substring(0,q.prefix);p+=b(n,this._operator.allow)}else if(Array.isArray(n))if(q.explode)p+=
a(n,this._operator.allow,this._operator.sep);else{if(this._operator.named){p+=b(r,"U+R");p+=n.length===0?this._operator.ifemp:"="}p+=a(n,this._operator.allow,",")}else if(o==="object")if(q.explode)p+=d(n,this._operator.allow,"=",this._operator.sep);else{if(this._operator.named){p+=b(r,"U+R");p+=Object.keys(n).length===0?this._operator.ifemp:"="}p+=d(n,this._operator.allow,",",",")}else throw new Error("bad param type: "+r+" : "+o);l.push(p)}}return l.join("")}};i.prototype={expand:function(k){for(var l=
[],m=0;m<this._templateComponents.length;m++)l.push(this._templateComponents[m].expand(k));return l.join("")}};return i});define("text!dijit/templates/Dialog.html",function(){return'<div class="dijitDialog" role="dialog" aria-labelledby="${id}_title">\n\t<div dojoAttachPoint="titleBar" class="dijitDialogTitleBar">\n\t<span dojoAttachPoint="titleNode" class="dijitDialogTitle" id="${id}_title"></span>\n\t<span dojoAttachPoint="closeButtonNode" class="dijitDialogCloseIcon" dojoAttachEvent="ondijitclick: onCancel" title="${buttonCancel}" role="button" tabIndex="-1">\n\t\t<span dojoAttachPoint="closeText" class="closeText" title="${buttonCancel}">x</span>\n\t</span>\n\t</div>\n\t\t<div dojoAttachPoint="containerNode" class="dijitDialogPaneContent"></div>\n</div>'});
define("dojo/dnd/common",["dojo"],function(c){c.getObject("dnd",true,c);c.dnd.getCopyKeyState=c.isCopyKey;c.dnd._uniqueId=0;c.dnd.getUniqueId=function(){var b;do b=c._scopeName+"Unique"+ ++c.dnd._uniqueId;while(c.byId(b));return b};c.dnd._empty={};c.dnd.isFormElement=function(b){b=b.target;if(b.nodeType==3)b=b.parentNode;return" button textarea input select option ".indexOf(" "+b.tagName.toLowerCase()+" ")>=0};return c.dnd});
define("dojo/dnd/autoscroll",["dojo","dojo/window"],function(c){c.getObject("dnd",true,c);c.dnd.getViewport=c.window.getBox;c.dnd.V_TRIGGER_AUTOSCROLL=32;c.dnd.H_TRIGGER_AUTOSCROLL=32;c.dnd.V_AUTOSCROLL_VALUE=16;c.dnd.H_AUTOSCROLL_VALUE=16;c.dnd.autoScroll=function(b){var a=c.window.getBox(),d=0,e=0;if(b.clientX<c.dnd.H_TRIGGER_AUTOSCROLL)d=-c.dnd.H_AUTOSCROLL_VALUE;else if(b.clientX>a.w-c.dnd.H_TRIGGER_AUTOSCROLL)d=c.dnd.H_AUTOSCROLL_VALUE;if(b.clientY<c.dnd.V_TRIGGER_AUTOSCROLL)e=-c.dnd.V_AUTOSCROLL_VALUE;
else if(b.clientY>a.h-c.dnd.V_TRIGGER_AUTOSCROLL)e=c.dnd.V_AUTOSCROLL_VALUE;window.scrollBy(d,e)};c.dnd._validNodes={div:1,p:1,td:1};c.dnd._validOverflow={auto:1,scroll:1};c.dnd.autoScrollNodes=function(b){for(var a=b.target;a;){if(a.nodeType==1&&a.tagName.toLowerCase()in c.dnd._validNodes){var d=c.getComputedStyle(a);if(d.overflow.toLowerCase()in c.dnd._validOverflow){var e=c._getContentBox(a,d);d=c.position(a,true);var f=Math.min(c.dnd.H_TRIGGER_AUTOSCROLL,e.w/2),g=Math.min(c.dnd.V_TRIGGER_AUTOSCROLL,
e.h/2),i=b.pageX-d.x,j=b.pageY-d.y,h=d=0;if(c.isWebKit||c.isOpera){i+=c.body().scrollLeft;j+=c.body().scrollTop}if(i>0&&i<e.w)if(i<f)d=-f;else if(i>e.w-f)d=f;if(j>0&&j<e.h)if(j<g)h=-g;else if(j>e.h-g)h=g;e=a.scrollLeft;f=a.scrollTop;a.scrollLeft+=d;a.scrollTop+=h;if(e!=a.scrollLeft||f!=a.scrollTop)return}}try{a=a.parentNode}catch(k){a=null}}c.dnd.autoScroll(b)};return c.dnd});
define("dojo/dnd/Mover",["dojo","dojo/dnd/common","dojo/dnd/autoscroll"],function(c){c.declare("dojo.dnd.Mover",null,{constructor:function(b,a,d){this.node=c.byId(b);var e=a.touches?a.touches[0]:a;this.marginBox={l:e.pageX,t:e.pageY};this.mouseButton=a.button;a=this.host=d;b=b.ownerDocument;this.events=[c.connect(b,"onmousemove",this,"onFirstMove"),c.connect(b,"ontouchmove",this,"onFirstMove"),c.connect(b,"onmousemove",this,"onMouseMove"),c.connect(b,"ontouchmove",this,"onMouseMove"),c.connect(b,
"onmouseup",this,"onMouseUp"),c.connect(b,"ontouchend",this,"onMouseUp"),c.connect(b,"ondragstart",c.stopEvent),c.connect(b.body,"onselectstart",c.stopEvent)];a&&a.onMoveStart&&a.onMoveStart(this)},onMouseMove:function(b){c.dnd.autoScroll(b);var a=this.marginBox,d=b.touches?b.touches[0]:b;this.host.onMove(this,{l:a.l+d.pageX,t:a.t+d.pageY},b);c.stopEvent(b)},onMouseUp:function(b){if(c.isWebKit&&c.isMac&&this.mouseButton==2?b.button==0:this.mouseButton==b.button)this.destroy();c.stopEvent(b)},onFirstMove:function(b){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=c.marginBox(this.node);d=c.doc.body;var f=c.getComputedStyle(d),g=c._getMarginBox(d,f);f=c._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,b);c.disconnect(this.events.shift());c.disconnect(this.events.shift())},
destroy:function(){c.forEach(this.events,c.disconnect);var b=this.host;b&&b.onMoveStop&&b.onMoveStop(this);this.events=this.node=this.host=null}});return c.dnd.Mover});
define("dojo/dnd/Moveable",["dojo","dojo/dnd/Mover"],function(c){c.declare("dojo.dnd.Moveable",null,{handle:"",delay:0,skip:false,constructor:function(b,a){this.node=c.byId(b);a||(a={});this.handle=a.handle?c.byId(a.handle):null;if(!this.handle)this.handle=this.node;this.delay=a.delay>0?a.delay:0;this.skip=a.skip;this.mover=a.mover?a.mover:c.dnd.Mover;this.events=[c.connect(this.handle,"onmousedown",this,"onMouseDown"),c.connect(this.handle,"ontouchstart",this,"onMouseDown"),c.connect(this.handle,
"ondragstart",this,"onSelectStart"),c.connect(this.handle,"onselectstart",this,"onSelectStart")]},markupFactory:function(b,a){return new c.dnd.Moveable(a,b)},destroy:function(){c.forEach(this.events,c.disconnect);this.events=this.node=this.handle=null},onMouseDown:function(b){if(!(this.skip&&c.dnd.isFormElement(b))){if(this.delay){this.events.push(c.connect(this.handle,"onmousemove",this,"onMouseMove"),c.connect(this.handle,"ontouchmove",this,"onMouseMove"),c.connect(this.handle,"onmouseup",this,
"onMouseUp"),c.connect(this.handle,"ontouchend",this,"onMouseUp"));var a=b.touches?b.touches[0]:b;this._lastX=a.pageX;this._lastY=a.pageY}else this.onDragDetected(b);c.stopEvent(b)}},onMouseMove:function(b){var a=b.touches?b.touches[0]:b;if(Math.abs(a.pageX-this._lastX)>this.delay||Math.abs(a.pageY-this._lastY)>this.delay){this.onMouseUp(b);this.onDragDetected(b)}c.stopEvent(b)},onMouseUp:function(b){for(var a=0;a<2;++a)c.disconnect(this.events.pop());c.stopEvent(b)},onSelectStart:function(b){if(!this.skip||
!c.dnd.isFormElement(b))c.stopEvent(b)},onDragDetected:function(b){new this.mover(this.node,b,this)},onMoveStart:function(b){c.publish("/dnd/move/start",[b]);c.addClass(c.body(),"dojoMove");c.addClass(this.node,"dojoMoveItem")},onMoveStop:function(b){c.publish("/dnd/move/stop",[b]);c.removeClass(c.body(),"dojoMove");c.removeClass(this.node,"dojoMoveItem")},onFirstMove:function(){},onMove:function(b,a){this.onMoving(b,a);var d=b.node.style;d.left=a.l+"px";d.top=a.t+"px";this.onMoved(b,a)},onMoving:function(){},
onMoved:function(){}});return c.dnd.Moveable});
define("dojo/dnd/move",["dojo","dojo/dnd/Mover","dojo/dnd/Moveable"],function(c){c.declare("dojo.dnd.move.constrainedMoveable",c.dnd.Moveable,{constraints:function(){},within:false,markupFactory:function(b,a){return new c.dnd.move.constrainedMoveable(a,b)},constructor:function(b,a){a||(a={});this.constraints=a.constraints;this.within=a.within},onFirstMove:function(b){var a=this.constraintBox=this.constraints.call(this,b);a.r=a.l+a.w;a.b=a.t+a.h;if(this.within){b=c._getMarginSize(b.node);a.r-=b.w;
a.b-=b.h}},onMove:function(b,a){var d=this.constraintBox,e=b.node.style;this.onMoving(b,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(b,a)}});c.declare("dojo.dnd.move.boxConstrainedMoveable",c.dnd.move.constrainedMoveable,{box:{},markupFactory:function(b,a){return new c.dnd.move.boxConstrainedMoveable(a,b)},constructor:function(b,a){var d=a&&a.box;this.constraints=function(){return d}}});c.declare("dojo.dnd.move.parentConstrainedMoveable",
c.dnd.move.constrainedMoveable,{area:"content",markupFactory:function(b,a){return new c.dnd.move.parentConstrainedMoveable(a,b)},constructor:function(b,a){var d=a&&a.area;this.constraints=function(){var e=this.node.parentNode,f=c.getComputedStyle(e),g=c._getMarginBox(e,f);if(d=="margin")return g;var i=c._getMarginExtents(e,f);g.l+=i.l;g.t+=i.t;g.w-=i.w;g.h-=i.h;if(d=="border")return g;i=c._getBorderExtents(e,f);g.l+=i.l;g.t+=i.t;g.w-=i.w;g.h-=i.h;if(d=="padding")return g;i=c._getPadExtents(e,f);g.l+=
i.l;g.t+=i.t;g.w-=i.w;g.h-=i.h;return g}}});c.dnd.constrainedMover=c.dnd.move.constrainedMover;c.dnd.boxConstrainedMover=c.dnd.move.boxConstrainedMover;c.dnd.parentConstrainedMover=c.dnd.move.parentConstrainedMover;return c.dnd.move});
define("dojo/dnd/TimedMoveable",["dojo","dojo/dnd/Moveable"],function(c){(function(){var b=c.dnd.Moveable.prototype.onMove;c.declare("dojo.dnd.TimedMoveable",c.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 c.dnd.TimedMoveable(d,a)},onMoveStop:function(a){if(a._timer){clearTimeout(a._timer);b.call(this,a,a._leftTop)}c.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;b.call(e,a,a._leftTop)},this.timeout)}}})})();return c.dnd.TimedMoveable});
define("dojo/fx/Toggler",["dojo"],function(c){c.declare("dojo.fx.Toggler",null,{node:null,showFunc:c.fadeIn,hideFunc:c.fadeOut,showDuration:200,hideDuration:200,constructor:function(b){var a=this;c.mixin(a,b);a.node=b.node;a._showArgs=c.mixin({},b);a._showArgs.node=a.node;a._showArgs.duration=a.showDuration;a.showAnim=a.showFunc(a._showArgs);a._hideArgs=c.mixin({},b);a._hideArgs.node=a.node;a._hideArgs.duration=a.hideDuration;a.hideAnim=a.hideFunc(a._hideArgs);c.connect(a.showAnim,"beforeBegin",c.hitch(a.hideAnim,
"stop",true));c.connect(a.hideAnim,"beforeBegin",c.hitch(a.showAnim,"stop",true))},show:function(b){return this.showAnim.play(b||0)},hide:function(b){return this.hideAnim.play(b||0)}});return c.fx.Toggler});
define("dojo/fx",["dojo","dojo/fx/Toggler"],function(c){(function(){var b={_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;c.forEach(this._animations,function(f){this.duration+=f.duration;if(f.delay)this.duration+=f.delay},this)};c.extend(a,{_onAnimate:function(){this._fire("onAnimate",arguments)},_onEnd:function(){c.disconnect(this._onAnimateCtx);c.disconnect(this._onEndCtx);
this._onAnimateCtx=this._onEndCtx=null;if(this._index+1==this._animations.length)this._fire("onEnd");else{this._current=this._animations[++this._index];this._onAnimateCtx=c.connect(this._current,"onAnimate",this,"_onAnimate");this._onEndCtx=c.connect(this._current,"onEnd",this,"_onEnd");this._current.play(0,true)}},play:function(e,f){if(!this._current)this._current=this._animations[this._index=0];if(!f&&this._current.status()=="playing")return this;var g=c.connect(this._current,"beforeBegin",this,
function(){this._fire("beforeBegin")}),i=c.connect(this._current,"onBegin",this,function(){this._fire("onBegin",arguments)}),j=c.connect(this._current,"onPlay",this,function(){this._fire("onPlay",arguments);c.disconnect(g);c.disconnect(i);c.disconnect(j)});this._onAnimateCtx&&c.disconnect(this._onAnimateCtx);this._onAnimateCtx=c.connect(this._current,"onAnimate",this,"_onAnimate");this._onEndCtx&&c.disconnect(this._onEndCtx);this._onEndCtx=c.connect(this._current,"onEnd",this,"_onEnd");this._current.play.apply(this._current,
arguments);return this},pause:function(){if(this._current){var e=c.connect(this._current,"onPause",this,function(){this._fire("onPause",arguments);c.disconnect(e)});this._current.pause()}return this},gotoPercent:function(e,f){this.pause();var g=this.duration*e;this._current=null;c.some(this._animations,function(i){if(i.duration<=g){this._current=i;return true}g-=i.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=c.connect(this._current,"onStop",this,function(){this._fire("onStop",arguments);c.disconnect(f)});this._current.stop()}return this},status:function(){return this._current?this._current.status():"stopped"},destroy:function(){this._onAnimateCtx&&c.disconnect(this._onAnimateCtx);this._onEndCtx&&c.disconnect(this._onEndCtx)}});c.extend(a,b);c.fx.chain=function(e){return new a(e)};
var d=function(e){this._animations=e||[];this._connects=[];this.duration=this._finished=0;c.forEach(e,function(g){var i=g.duration;if(g.delay)i+=g.delay;if(this.duration<i)this.duration=i;this._connects.push(c.connect(g,"onEnd",this,"_onEnd"))},this);this._pseudoAnimation=new c.Animation({curve:[0,1],duration:this.duration});var f=this;c.forEach(["beforeBegin","onBegin","onPlay","onAnimate","onPause","onStop","onEnd"],function(g){f._connects.push(c.connect(f._pseudoAnimation,g,function(){f._fire(g,
arguments)}))})};c.extend(d,{_doAction:function(e,f){c.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;c.forEach(this._animations,function(i){i.gotoPercent(i.duration<g?1:g/i.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(){c.forEach(this._connects,c.disconnect)}});c.extend(d,b);c.fx.combine=function(e){return new d(e)};c.fx.wipeIn=function(e){var f=e.node=c.byId(e.node),g=f.style,i;e=c.animateProperty(c.mixin({properties:{height:{start:function(){i=
g.overflow;g.overflow="hidden";if(g.visibility=="hidden"||g.display=="none"){g.height="1px";g.display="";g.visibility="";return 1}else{var j=c.style(f,"height");return Math.max(j,1)}},end:function(){return f.scrollHeight}}}},e));c.connect(e,"onEnd",function(){g.height="auto";g.overflow=i});return e};c.fx.wipeOut=function(e){var f=(e.node=c.byId(e.node)).style,g;e=c.animateProperty(c.mixin({properties:{height:{end:1}}},e));c.connect(e,"beforeBegin",function(){g=f.overflow;f.overflow="hidden";f.display=
""});c.connect(e,"onEnd",function(){f.overflow=g;f.height="auto";f.display="none"});return e};c.fx.slideTo=function(e){var f=null,g=null,i=function(j){return function(){var h=c.getComputedStyle(j),k=h.position;f=k=="absolute"?j.offsetTop:parseInt(h.top)||0;g=k=="absolute"?j.offsetLeft:parseInt(h.left)||0;if(k!="absolute"&&k!="relative"){h=c.position(j,true);f=h.y;g=h.x;j.style.position="absolute";j.style.top=f+"px";j.style.left=g+"px"}}}(e.node=c.byId(e.node));i();e=c.animateProperty(c.mixin({properties:{top:e.top||
0,left:e.left||0}},e));c.connect(e,"beforeBegin",e,i);return e}})();return c.fx});
define("dijit/DialogUnderlay",["dojo","dijit","dojo/window","dijit/_Widget","dijit/_Templated"],function(c,b){c.declare("dijit.DialogUnderlay",[b._Widget,b._Templated],{templateString:"<div class='dijitDialogUnderlayWrapper'><div class='dijitDialogUnderlay' dojoAttachPoint='node'></div></div>",dialogId:"","class":"",attributeMap:{id:"domNode"},_setDialogIdAttr:function(a){c.attr(this.node,"id",a+"_underlay");this._set("dialogId",a)},_setClassAttr:function(a){this.node.className="dijitDialogUnderlay "+
a;this._set("class",a)},postCreate:function(){c.body().appendChild(this.domNode)},layout:function(){var a=this.node.style,d=this.domNode.style;d.display="none";var e=c.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 b.BackgroundIframe(this.domNode)},hide:function(){this.bgIframe.destroy();delete this.bgIframe;this.domNode.style.display="none"}});return b.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(c,b){c.declare("dijit._DialogBase",[b._Templated,b.form._FormMixin,b._DialogMixin,b._CssStateMixin],{templateString:c.cache("dijit","templates/Dialog.html"),
baseClass:"dijitDialog",cssStateNodes:{closeButtonNode:"dijitDialogCloseIcon"},attributeMap:c.delegate(b._Widget.prototype.attributeMap,{title:[{node:"titleNode",type:"innerHTML"},{node:"titleBar",type:"attribute"}],"aria-describedby":""}),open:false,duration:b.defaultDuration,refocus:true,autofocus:true,_firstFocusItem:null,_lastFocusItem:null,doLayout:false,draggable:true,"aria-describedby":"",postMixInProperties:function(){var a=c.i18n.getLocalization("dijit","common");c.mixin(this,a);this.inherited(arguments)},
postCreate:function(){c.style(this.domNode,{display:"none",position:"absolute"});c.body().appendChild(this.domNode);this.inherited(arguments);this.connect(this,"onExecute","hide");this.connect(this,"onCancel","hide");this._modalconnects=[]},onLoad:function(){this._position();if(this.autofocus&&b._DialogLevelManager.isTop(this)){this._getFocusItems(this.domNode);b.focus(this._firstFocusItem)}this.inherited(arguments)},_endDrag:function(a){if(a&&a.node&&a.node===this.domNode)this._relativePosition=
c.position(a.node)},_setup:function(){var a=this.domNode;if(this.titleBar&&this.draggable){this._moveable=c.isIE==6?new c.dnd.TimedMoveable(a,{handle:this.titleBar}):new c.dnd.Moveable(a,{handle:this.titleBar,timeout:0});this._dndListener=c.subscribe("/dnd/move/stop",this,"_endDrag")}else c.addClass(a,"dijitDialogFixed");this.underlayAttrs={dialogId:this.id,"class":c.map(this["class"].split(/\s/),function(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 c.style(this.containerNode,{width:"auto",height:"auto"});var a=c._getMarginSize(this.domNode),d=c.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 c.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(!c.hasClass(c.body(),"dojoMove")){var a=this.domNode,d=c.window.getBox(),e=this._relativePosition,f=e?null:c._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));c.style(a,{left:g+"px",top:d+"px"})}},_onKey:function(a){if(a.charOrCode){var d=c.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||b.focus(this._lastFocusItem);c.stopEvent(a)}else if(e==this._lastFocusItem&&a.charOrCode===d.TAB&&!a.shiftKey){f||b.focus(this._firstFocusItem);c.stopEvent(a)}else{for(;e;){if(e==this.domNode||c.hasClass(e,"dijitPopup"))if(a.charOrCode==d.ESCAPE)this.onCancel();else return;e=e.parentNode}if(a.charOrCode!==d.TAB)c.stopEvent(a);else if(!c.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(c.connect(window,"onscroll",this,"layout"));this._modalconnects.push(c.connect(window,"onresize",this,function(){var d=c.window.getBox();if(!this._oldViewport||d.h!=this._oldViewport.h||d.w!=this._oldViewport.w){this.layout();this._oldViewport=d}}));this._modalconnects.push(c.connect(this.domNode,
"onkeypress",this,"_onKey"));c.style(this.domNode,{opacity:0,display:""});this._set("open",true);this._onShow();this._size();this._position();var a;this._fadeInDeferred=new c.Deferred(c.hitch(this,function(){a.stop();delete this._fadeInDeferred}));a=c.fadeIn({node:this.domNode,duration:this.duration,beforeBegin:c.hitch(this,function(){b._DialogLevelManager.show(this,this.underlayAttrs)}),onEnd:c.hitch(this,function(){if(this.autofocus&&b._DialogLevelManager.isTop(this)){this._getFocusItems(this.domNode);
b.focus(this._firstFocusItem)}this._fadeInDeferred.callback(true);delete this._fadeInDeferred})}).play();return this._fadeInDeferred}},hide:function(){if(this._alreadyInitialized){this._fadeInDeferred&&this._fadeInDeferred.cancel();var a;this._fadeOutDeferred=new c.Deferred(c.hitch(this,function(){a.stop();delete this._fadeOutDeferred}));a=c.fadeOut({node:this.domNode,duration:this.duration,onEnd:c.hitch(this,function(){this.domNode.style.display="none";b._DialogLevelManager.hide(this);this.onHide();
this._fadeOutDeferred.callback(true);delete this._fadeOutDeferred})}).play();if(this._scrollConnected)this._scrollConnected=false;c.forEach(this._modalconnects,c.disconnect);this._modalconnects=[];this._relativePosition&&delete this._relativePosition;this._set("open",false);return this._fadeOutDeferred}},layout:function(){if(this.domNode.style.display!="none"){b._underlay&&b._underlay.layout();this._position()}},destroy:function(){this._fadeInDeferred&&this._fadeInDeferred.cancel();this._fadeOutDeferred&&
this._fadeOutDeferred.cancel();this._moveable&&this._moveable.destroy();this._dndListener&&c.unsubscribe(this._dndListener);c.forEach(this._modalconnects,c.disconnect);b._DialogLevelManager.hide(this);this.inherited(arguments)}});c.declare("dijit.Dialog",[b.layout.ContentPane,b._DialogBase],{});b._DialogLevelManager={show:function(a,d){var e=b._dialogStack;e[e.length-1].focus=b.getFocus(a);var f=b._underlay;if(!f||f._destroyed)f=b._underlay=new b.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();c.style(b._underlay.domNode,"zIndex",g-1);c.style(a.domNode,"zIndex",g);e.push({dialog:a,underlayAttrs:d,zIndex:g})},hide:function(a){var d=b._dialogStack;if(d[d.length-1].dialog==a){d.pop();var e=d[d.length-1];if(d.length==1)b._underlay._destroyed||b._underlay.hide();else{c.style(b._underlay.domNode,"zIndex",e.zIndex-1);b._underlay.set(e.underlayAttrs)}if(a.refocus){d=e.focus;if(!d||e.dialog&&!c.isDescendant(d.node,e.dialog.domNode)){e.dialog._getFocusItems(e.dialog.domNode);
d=e.dialog._firstFocusItem}try{b.focus(d)}catch(f){}}}else{e=c.indexOf(c.map(d,function(g){return g.dialog}),a);e!=-1&&d.splice(e,1)}},isTop:function(a){var d=b._dialogStack;return d[d.length-1].dialog==a}};b._dialogStack=[{dialog:null,focus:null,underlayAttrs:null}];return b.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(c,b){return b.form.ToggleButton});
define("dijit/form/CheckBox",["dojo","dijit","text!dijit/form/templates/CheckBox.html","dijit/form/ToggleButton"],function(c,b){c.declare("dijit.form.CheckBox",b.form.ToggleButton,{templateString:c.cache("dijit.form","templates/CheckBox.html"),baseClass:"dijitCheckBox",type:"checkbox",value:"on",readOnly:false,attributeMap:c.delegate(b.form._FormWidget.prototype.attributeMap,{readOnly:"focusNode"}),_setReadOnlyAttr:function(a){this._set("readOnly",a);c.attr(this.focusNode,"readOnly",a);b.setWaiState(this.focusNode,
"readonly",a)},_setValueAttr:function(a,d){if(typeof a=="string"){this._set("value",a);c.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");c.attr(this.focusNode,"value",this.value)},_onFocus:function(){this.id&&c.query("label[for='"+this.id+"']").addClass("dijitFocusedLabel");this.inherited(arguments)},_onBlur:function(){this.id&&c.query("label[for='"+this.id+"']").removeClass("dijitFocusedLabel");this.inherited(arguments)},_onClick:function(a){if(this.readOnly){c.stopEvent(a);return false}return this.inherited(arguments)}});c.declare("dijit.form.RadioButton",b.form.CheckBox,{type:"radio",
baseClass:"dijitRadio",_setCheckedAttr:function(a){this.inherited(arguments);if(this._created)if(a){var d=this;c.query("INPUT[type=radio]",this.focusNode.form||c.doc).forEach(function(e){if(e.name==d.name&&e!=d.focusNode&&e.form==d.focusNode.form)(e=b.getEnclosingWidget(e))&&e.checked&&e.set("checked",false)})}},_clicked:function(){this.checked||this.set("checked",true)}});return b.form.CheckBox});
define("dijit/form/Form",["dojo","dijit","dijit/_Widget","dijit/_Templated","dijit/form/_FormMixin","dijit/layout/_ContentPaneResizeMixin"],function(c,b){c.declare("dijit.form.Form",[b._Widget,b._Templated,b.form._FormMixin,b.layout._ContentPaneResizeMixin],{name:"",action:"",method:"",encType:"","accept-charset":"",accept:"",target:"",templateString:"<form dojoAttachPoint='containerNode' dojoAttachEvent='onreset:_onReset,onsubmit:_onSubmit' ${!nameAttrSetting}></form>",attributeMap:c.delegate(b._Widget.prototype.attributeMap,
{action:"",method:"",encType:"","accept-charset":"",accept:"",target:""}),postMixInProperties:function(){this.nameAttrSetting=this.name?"name='"+this.name+"'":"";this.inherited(arguments)},execute:function(){},onExecute:function(){},_setEncTypeAttr:function(a){this.encType=a;c.attr(this.domNode,"encType",a);if(c.isIE)this.domNode.encoding=a},postCreate:function(){if(c.isIE&&this.srcNodeRef&&this.srcNodeRef.attributes){var a=this.srcNodeRef.attributes.getNamedItem("encType");a&&!a.specified&&typeof a.value==
"string"&&this.set("encType",a.value)}this.inherited(arguments)},reset:function(a){var 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);c.stopEvent(a);return false},_onSubmit:function(a){var d=b.form.Form.prototype;if(this.execute!=d.execute||this.onExecute!=
d.onExecute){c.deprecated("dijit.form.Form:execute()/onExecute() are deprecated. Use onSubmit() instead.","","2.0");this.onExecute();this.execute(this.getValues())}this.onSubmit(a)===false&&c.stopEvent(a)},onSubmit:function(){return this.isValid()},submit:function(){this.onSubmit()!==false&&this.containerNode.submit()}});return b.form.Form});
define("dojo/data/util/filter",["dojo"],function(c){c.getObject("data.util.filter",true,c);c.data.util.filter.patternToRegExp=function(b,a){for(var d="^",e=null,f=0;f<b.length;f++){e=b.charAt(f);switch(e){case "\\":d+=e;f++;d+=b.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 c.data.util.filter});
define("dojo/data/util/sorter",["dojo"],function(c){c.getObject("data.util.sorter",true,c);c.data.util.sorter.basicComparator=function(b,a){var d=-1;if(b===null)b=undefined;if(a===null)a=undefined;if(b==a)d=0;else if(b>a||b==null)d=1;return d};c.data.util.sorter.createSortFunction=function(b,a){function d(l,m,q,r){return function(n,o){n=r.getValue(n,l);o=r.getValue(o,l);return m*q(n,o)}}for(var e=[],f,g=a.comparatorMap,i=c.data.util.sorter.basicComparator,j=0;j<b.length;j++){f=b[j];var h=f.attribute;
if(h){f=f.descending?-1:1;var k=i;if(g){if(typeof h!=="string"&&"toString"in h)h=h.toString();k=g[h]||i}e.push(d(h,f,k,a))}}return function(l,m){for(var q=0;q<e.length;){var r=e[q++](l,m);if(r!==0)return r}return 0}};return c.data.util.sorter});
define("dojo/data/util/simpleFetch",["dojo","dojo/data/util/sorter"],function(c){c.getObject("data.util.simpleFetch",true,c);c.data.util.simpleFetch.fetch=function(b){b=b||{};if(!b.store)b.store=this;var a=this,d=function(f,g){if(g.onError)g.onError.call(g.scope||c.global,f,g)},e=function(f,g){var i=g.abort||null,j=false,h=g.start?g.start:0,k=g.count&&g.count!==Infinity?h+g.count:f.length;g.abort=function(){j=true;i&&i.call(g)};var l=g.scope||c.global;if(!g.store)g.store=a;g.onBegin&&g.onBegin.call(l,
f.length,g);g.sort&&f.sort(c.data.util.sorter.createSortFunction(g.sort,a));if(g.onItem)for(var m=h;m<f.length&&m<k;++m){var q=f[m];j||g.onItem.call(l,q,g)}if(g.onComplete&&!j){m=null;g.onItem||(m=f.slice(h,k));g.onComplete.call(l,m,g)}};this._fetchItems(b,e,d);return b};return c.data.util.simpleFetch});
define("dojo/data/ItemFileReadStore",["dojo","dojo/data/util/filter","dojo/data/util/simpleFetch","dojo/date/stamp"],function(c){c.declare("dojo.data.ItemFileReadStore",null,{constructor:function(b){this._arrayOfAllItems=[];this._arrayOfTopLevelItems=[];this._loadFinished=false;this.url=this._ccUrl=this._jsonFileUrl=b.url;this._jsonData=b.data;this.data=null;this._datatypeMap=b.typeMap||{};this._datatypeMap.Date||(this._datatypeMap.Date={type:Date,deserialize:function(a){return c.date.stamp.fromISOString(a)}});
this._features={"dojo.data.api.Read":true,"dojo.data.api.Identity":true};this._itemsByIdentity=null;this._storeRefPropName="_S";this._itemNumPropName="_0";this._rootItemPropName="_RI";this._reverseRefMap="_RRM";this._loadInProgress=false;this._queuedFetches=[];if(b.urlPreventCache!==undefined)this.urlPreventCache=b.urlPreventCache?true:false;if(b.hierarchical!==undefined)this.hierarchical=b.hierarchical?true:false;if(b.clearOnClose)this.clearOnClose=true;if("failOk"in b)this.failOk=b.failOk?true:
false},url:"",_ccUrl:"",data:null,typeMap:null,clearOnClose:false,urlPreventCache:false,failOk:false,hierarchical:true,_assertIsItem:function(b){if(!this.isItem(b))throw new Error("dojo.data.ItemFileReadStore: Invalid item argument.");},_assertIsAttribute:function(b){if(typeof b!=="string")throw new Error("dojo.data.ItemFileReadStore: Invalid attribute argument.");},getValue:function(b,a,d){b=this.getValues(b,a);return b.length>0?b[0]:d},getValues:function(b,a){this._assertIsItem(b);this._assertIsAttribute(a);
return(b[a]||[]).slice(0)},getAttributes:function(b){this._assertIsItem(b);var a=[];for(var d in b)d!==this._storeRefPropName&&d!==this._itemNumPropName&&d!==this._rootItemPropName&&d!==this._reverseRefMap&&a.push(d);return a},hasAttribute:function(b,a){this._assertIsItem(b);this._assertIsAttribute(a);return a in b},containsValue:function(b,a,d){var e=undefined;if(typeof d==="string")e=c.data.util.filter.patternToRegExp(d,false);return this._containsValue(b,a,d,e)},_containsValue:function(b,a,d,e){return c.some(this.getValues(b,
a),function(f){if(f!==null&&!c.isObject(f)&&e){if(f.toString().match(e))return true}else if(d===f)return true})},isItem:function(b){if(b&&b[this._storeRefPropName]===this)if(this._arrayOfAllItems[b[this._itemNumPropName]]===b)return true;return false},isItemLoaded:function(b){return this.isItem(b)},loadItem:function(b){this._assertIsItem(b.item)},getFeatures:function(){return this._features},getLabel:function(b){if(this._labelAttr&&this.isItem(b))return this.getValue(b,this._labelAttr)},getLabelAttributes:function(){if(this._labelAttr)return[this._labelAttr];
return null},_fetchItems:function(b,a,d){var e=this,f=function(h,k){var l=[],m,q;if(h.query){var r;m=h.queryOptions?h.queryOptions.ignoreCase:false;var n={};for(q in h.query){r=h.query[q];if(typeof r==="string")n[q]=c.data.util.filter.patternToRegExp(r,m);else if(r instanceof RegExp)n[q]=r}for(m=0;m<k.length;++m){var o=true,p=k[m];if(p===null)o=false;else for(q in h.query){r=h.query[q];e._containsValue(p,q,r,n[q])||(o=false)}o&&l.push(p)}}else for(m=0;m<k.length;++m){q=k[m];q!==null&&l.push(q)}a(l,
h)};if(this._loadFinished)f(b,this._getItemsArray(b.queryOptions));else{if(this._jsonFileUrl!==this._ccUrl){c.deprecated("dojo.data.ItemFileReadStore: ","To change the url, set the url property of the store, not _jsonFileUrl.  _jsonFileUrl support will be removed in 2.0");this.url=this._ccUrl=this._jsonFileUrl}else if(this.url!==this._ccUrl)this._ccUrl=this._jsonFileUrl=this.url;if(this.data!=null){this._jsonData=this.data;this.data=null}if(this._jsonFileUrl)if(this._loadInProgress)this._queuedFetches.push({args:b,
filter:f});else{this._loadInProgress=true;var g=c.xhrGet({url:e._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache,failOk:this.failOk});g.addCallback(function(h){try{e._getItemsFromLoadedData(h);e._loadFinished=true;e._loadInProgress=false;f(b,e._getItemsArray(b.queryOptions));e._handleQueuedFetches()}catch(k){e._loadFinished=true;e._loadInProgress=false;d(k,b)}});g.addErrback(function(h){e._loadInProgress=false;d(h,b)});var i=null;if(b.abort)i=b.abort;b.abort=function(){g&&
g.fired===-1&&g.cancel();i&&i.call(b)}}else if(this._jsonData)try{this._loadFinished=true;this._getItemsFromLoadedData(this._jsonData);this._jsonData=null;f(b,this._getItemsArray(b.queryOptions))}catch(j){d(j,b)}else d(new Error("dojo.data.ItemFileReadStore: No JSON source data was provided as either URL or a nested Javascript object."),b)}},_handleQueuedFetches:function(){if(this._queuedFetches.length>0){for(var b=0;b<this._queuedFetches.length;b++){var a=this._queuedFetches[b],d=a.args;(a=a.filter)?
a(d,this._getItemsArray(d.queryOptions)):this.fetchItemByIdentity(d)}this._queuedFetches=[]}},_getItemsArray:function(b){if(b&&b.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(b){function a(n){return n!==null&&typeof n==="object"&&(!c.isArray(n)||e)&&!c.isFunction(n)&&(n.constructor==Object||c.isArray(n))&&typeof n._reference==="undefined"&&typeof n._type==="undefined"&&typeof n._value==="undefined"&&f.hierarchical}function d(n){f._arrayOfAllItems.push(n);for(var o in n){var p=n[o];
if(p)if(c.isArray(p))for(var s=0;s<p.length;++s){var t=p[s];a(t)&&d(t)}else a(p)&&d(p)}}var e=false,f=this;this._labelAttr=b.label;var g,i;this._arrayOfAllItems=[];this._arrayOfTopLevelItems=b.items;for(g=0;g<this._arrayOfTopLevelItems.length;++g){i=this._arrayOfTopLevelItems[g];if(c.isArray(i))e=true;d(i);i[this._rootItemPropName]=true}var j={},h;for(g=0;g<this._arrayOfAllItems.length;++g){i=this._arrayOfAllItems[g];for(h in i){if(h!==this._rootItemPropName){var k=i[h];if(k!==null)c.isArray(k)||
(i[h]=[k]);else i[h]=[null]}j[h]=h}}for(;j[this._storeRefPropName];)this._storeRefPropName+="_";for(;j[this._itemNumPropName];)this._itemNumPropName+="_";for(;j[this._reverseRefMap];)this._reverseRefMap+="_";if(j=b.identifier){this._itemsByIdentity={};this._features["dojo.data.api.Identity"]=j;for(g=0;g<this._arrayOfAllItems.length;++g){i=this._arrayOfAllItems[g];b=i[j];b=b[0];if(Object.hasOwnProperty.call(this._itemsByIdentity,b))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: ["+b+"]");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: ["+b+"]");}else this._itemsByIdentity[b]=i}}else this._features["dojo.data.api.Identity"]=Number;for(g=0;g<this._arrayOfAllItems.length;++g){i=this._arrayOfAllItems[g];i[this._storeRefPropName]=
this;i[this._itemNumPropName]=g}for(g=0;g<this._arrayOfAllItems.length;++g){i=this._arrayOfAllItems[g];for(h in i){b=i[h];for(j=0;j<b.length;++j){k=b[j];if(k!==null&&typeof k=="object"){if("_type"in k&&"_value"in k){var l=k._type,m=this._datatypeMap[l];if(m)if(c.isFunction(m))b[j]=new m(k._value);else if(c.isFunction(m.deserialize))b[j]=m.deserialize(k._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 '"+l+"'");}if(k._reference){k=k._reference;if(c.isObject(k))for(l=0;l<this._arrayOfAllItems.length;++l){m=this._arrayOfAllItems[l];var q=true;for(var r in k)if(m[r]!=k[r])q=false;if(q)b[j]=m}else b[j]=this._getItemByIdentity(k);if(this.referenceIntegrity){k=b[j];this.isItem(k)&&this._addReferenceToMap(k,i,h)}}else this.isItem(k)&&this.referenceIntegrity&&this._addReferenceToMap(k,
i,h)}}}}},_addReferenceToMap:function(){},getIdentity:function(b){var a=this._features["dojo.data.api.Identity"];if(a===Number)return b[this._itemNumPropName];else if(b=b[a])return b[0];return null},fetchItemByIdentity:function(b){var a,d;if(this._loadFinished){a=this._getItemByIdentity(b.identity);if(b.onItem){d=b.scope?b.scope:c.global;b.onItem.call(d,a)}}else{var e=this;if(this._jsonFileUrl!==this._ccUrl){c.deprecated("dojo.data.ItemFileReadStore: ","To change the url, set the url property of the store, not _jsonFileUrl.  _jsonFileUrl support will be removed in 2.0");
this.url=this._ccUrl=this._jsonFileUrl}else if(this.url!==this._ccUrl)this._ccUrl=this._jsonFileUrl=this.url;if(this.data!=null&&this._jsonData==null){this._jsonData=this.data;this.data=null}if(this._jsonFileUrl)if(this._loadInProgress)this._queuedFetches.push({args:b});else{this._loadInProgress=true;d=c.xhrGet({url:e._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache,failOk:this.failOk});d.addCallback(function(f){var g=b.scope?b.scope:c.global;try{e._getItemsFromLoadedData(f);
e._loadFinished=true;e._loadInProgress=false;a=e._getItemByIdentity(b.identity);b.onItem&&b.onItem.call(g,a);e._handleQueuedFetches()}catch(i){e._loadInProgress=false;b.onError&&b.onError.call(g,i)}});d.addErrback(function(f){e._loadInProgress=false;if(b.onError)b.onError.call(b.scope?b.scope:c.global,f)})}else if(this._jsonData){e._getItemsFromLoadedData(e._jsonData);e._jsonData=null;e._loadFinished=true;a=e._getItemByIdentity(b.identity);if(b.onItem){d=b.scope?b.scope:c.global;b.onItem.call(d,a)}}}},
_getItemByIdentity:function(b){var a=null;if(this._itemsByIdentity&&Object.hasOwnProperty.call(this._itemsByIdentity,b))a=this._itemsByIdentity[b];else if(Object.hasOwnProperty.call(this._arrayOfAllItems,b))a=this._arrayOfAllItems[b];if(a===undefined)a=null;return a},getIdentityAttributes:function(){var b=this._features["dojo.data.api.Identity"];return b===Number?null:[b]},_forceLoad:function(){var b=this;if(this._jsonFileUrl!==this._ccUrl){c.deprecated("dojo.data.ItemFileReadStore: ","To change the url, set the url property of the store, not _jsonFileUrl.  _jsonFileUrl support will be removed in 2.0");
this.url=this._ccUrl=this._jsonFileUrl}else if(this.url!==this._ccUrl)this._ccUrl=this._jsonFileUrl=this.url;if(this.data!=null){this._jsonData=this.data;this.data=null}if(this._jsonFileUrl){var a=c.xhrGet({url:this._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache,failOk:this.failOk,sync:true});a.addCallback(function(d){try{if(b._loadInProgress!==true&&!b._loadFinished){b._getItemsFromLoadedData(d);b._loadFinished=true}else if(b._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){b._getItemsFromLoadedData(b._jsonData);b._jsonData=null;b._loadFinished=true}}});c.extend(c.data.ItemFileReadStore,c.data.util.simpleFetch);return c.data.ItemFileReadStore});
define("orion/widgets/_OrionDialogMixin",["dojo","dijit"],function(c,b){c.declare("orion.widgets._OrionDialogMixin",null,{postMixInProperties:function(){this.inherited(arguments);this.title=this.options.title||"Information Needed";this.buttonCancel="Cancel"},postCreate:function(){this.inherited(arguments);c.connect(this,"onKeyPress",c.hitch(this,function(a){a.keyCode===c.keys.ENTER&&this._onSubmit()}))},onHide:function(){this.inherited(arguments);setTimeout(c.hitch(this,function(){if(c.isDescendant(b._curFocus,
this.domNode))b._curFocus=null;if(c.isDescendant(b._prevFocus,this.domNode))b._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(c,b){c.declare("orion.widgets.NewItemDialog",[b.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:true,templateString:c.cache("orion","widgets/templates/NewItemDialog.html"),constructor:function(a){this.options=
a||{};this.options.advanced=this.options.advanced||false},postMixInProperties:function(){this.inherited(arguments);this.itemNameLabelText=this.options.label||"Name:"},postCreate:function(){this.inherited(arguments);if(this.options.advanced){this.itemAdvancedInfo.style.display="table-row";this.itemAdvancedInfo1.style.display="table-row";c.connect(this.itemURL,"onkeyup",null,c.hitch(this,this.onURLChange))}else{this.itemAdvancedInfo.style.display="none";this.itemAdvancedInfo1.style.display="none"}},
execute:function(){var a,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(c){c.DeferredList=function(b,a,d,e){var f=[];c.Deferred.call(this);var g=this;b.length===0&&!a&&this.resolve([0,[]]);var i=0;c.forEach(b,function(j,h){function k(l,m){f[h]=[l,m];i++;i===b.length&&g.resolve(f)}j.then(function(l){a?g.resolve([h,l]):k(true,l)},function(l){d?g.reject(l):k(false,l);if(e)return null;throw l;})})};c.DeferredList.prototype=new c.Deferred;c.DeferredList.prototype.gatherResults=function(b){b=new c.DeferredList(b,false,true,false);
b.addCallback(function(a){var d=[];c.forEach(a,function(e){d.push(e[1])});return d});return b};return c.DeferredList});
define("dojo/regexp",["dojo"],function(c){c.getObject("regexp",true,c);c.regexp.escapeString=function(b,a){return b.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,function(d){if(a&&a.indexOf(d)!=-1)return d;return"\\"+d})};c.regexp.buildGroupRE=function(b,a,d){if(!(b instanceof Array))return a(b);for(var e=[],f=0;f<b.length;f++)e.push(a(b[f]));return c.regexp.group(e.join("|"),d)};c.regexp.group=function(b,a){return"("+(a?"?:":"")+b+")"};return c.regexp});
define("dojo/cookie",["dojo","dojo/regexp"],function(c){c.cookie=function(b,a,d){var e=document.cookie;if(arguments.length==1){var f=e.match(new RegExp("(?:^|; )"+c.regexp.escapeString(b)+"=([^;]*)"));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=b+"="+a;for(f in d){e+="; "+f;g=d[f];if(g!==true)e+="="+g}document.cookie=
e}};c.cookie.isSupported=function(){if(!("cookieEnabled"in navigator)){this("__djCookieTest__","CookiesAllowed");navigator.cookieEnabled=this("__djCookieTest__")=="CookiesAllowed";navigator.cookieEnabled&&this("__djCookieTest__","",{expires:-1})}return navigator.cookieEnabled};return c.cookie});
define("dijit/tree/TreeStoreModel",["dojo","dijit"],function(c,b){c.declare("dijit.tree.TreeStoreModel",null,{store:null,childrenAttrs:["children"],newItemIdAttr:"id",labelAttr:"",root:null,query:null,deferItemLoadingUntilExpand:false,constructor:function(a){c.mixin(this,a);this.connects=[];a=this.store;if(!a.getFeatures()["dojo.data.api.Identity"])throw new Error("dijit.Tree: store must support dojo.data.Identity");if(a.getFeatures()["dojo.data.api.Notification"])this.connects=this.connects.concat([c.connect(a,
"onNew",this,"onNewItem"),c.connect(a,"onDelete",this,"onDeleteItem"),c.connect(a,"onSet",this,"onSetItem")])},destroy:function(){c.forEach(this.connects,c.disconnect)},getRoot:function(a,d){this.root?a(this.root):this.store.fetch({query:this.query,onComplete:c.hitch(this,function(e){if(e.length!=1)throw new Error(this.declaredClass+": query "+c.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 c.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=[],i=0;i<this.childrenAttrs.length;i++){var j=f.getValues(a,this.childrenAttrs[i]);g=g.concat(j)}var h=0;this.deferItemLoadingUntilExpand||c.forEach(g,function(l){f.isItemLoaded(l)||h++});h==0?d(g):c.forEach(g,function(l,m){f.isItemLoaded(l)||f.loadItem({item:l,onItem:function(q){g[m]=q;--h==0&&d(g)},onError:e})})}else{var k=c.hitch(this,arguments.callee);f.loadItem({item:a,
onItem:function(l){k(l,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(i){if(i)this.pasteItem(i,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 i=this.store,j=this.childrenAttrs[0];d&&c.forEach(this.childrenAttrs,function(k){if(i.containsValue(d,k,a)){if(!f){var l=c.filter(i.getValues(d,k),function(m){return m!=a});i.setValues(d,k,l)}j=k}});if(e)if(typeof g=="number"){var h=i.getValues(e,j).slice();
h.splice(g,0,a);i.setValues(e,j,h)}else i.setValues(e,j,i.getValues(e,j).concat(a))},onChange:function(){},onChildrenChange:function(){},onDelete:function(){},onNewItem:function(a,d){d&&this.getChildren(d.item,c.hitch(this,function(e){this.onChildrenChange(d.item,e)}))},onDeleteItem:function(a){this.onDelete(a)},onSetItem:function(a,d){c.indexOf(this.childrenAttrs,d)!=-1?this.getChildren(a,c.hitch(this,function(e){this.onChildrenChange(a,e)})):this.onChange(a)}});return b.tree.TreeStoreModel});
define("dijit/tree/ForestStoreModel",["dojo","dijit","dijit/tree/TreeStoreModel"],function(c,b){c.declare("dijit.tree.ForestStoreModel",b.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:c.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:c.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);b.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:c.hitch(this,function(d){this.root.children=d;if(a.length!=d.length||c.some(a,function(e,f){return d[f]!=e}))this.onChildrenChange(this.root,d)})})},onNewItem:function(){this._requeryTop();this.inherited(arguments)},onDeleteItem:function(a){c.indexOf(this.root.children,a)!=-1&&this._requeryTop();this.inherited(arguments)},onSetItem:function(){this._requeryTop();this.inherited(arguments)}});return b.tree.ForestStoreModel});
define("dojo/dnd/Container",["dojo","dojo/dnd/common","dojo/parser"],function(c){c.declare("dojo.dnd.Container",null,{skipForm:false,constructor:function(b,a){this.node=c.byId(b);a||(a={});this.creator=a.creator||null;this.skipForm=a.skipForm;this.parent=a.dropParent&&c.byId(a.dropParent);this.map={};this.current=null;this.containerState="";c.addClass(this.node,"dojoDndContainer");a&&a._skipStartup||this.startup();this.events=[c.connect(this.node,"onmouseover",this,"onMouseOver"),c.connect(this.node,
"onmouseout",this,"onMouseOut"),c.connect(this.node,"ondragstart",this,"onSelectStart"),c.connect(this.node,"onselectstart",this,"onSelectStart")]},creator:function(){},getItem:function(b){return this.map[b]},setItem:function(b,a){this.map[b]=a},delItem:function(b){delete this.map[b]},forInItems:function(b,a){a=a||c.global;var d=this.map,e=c.dnd._empty;for(var f in d)f in e||b.call(a,d[f],f,this);return a},clearItems:function(){this.map={}},getAllNodes:function(){return c.query("> .dojoDndItem",this.parent)},
sync:function(){var b={};this.getAllNodes().forEach(function(a){if(a.id){var d=this.getItem(a.id);if(d){b[a.id]=d;return}}else a.id=c.dnd.getUniqueId();d=a.getAttribute("dndType");var e=a.getAttribute("dndData");b[a.id]={data:e||a.innerHTML,type:d?d.split(/\s*,\s*/):["text"]}},this);this.map=b;return this},insertNodes:function(b,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<b.length;++a){var e=this._normalizedCreator(b[a]);
this.setItem(e.node.id,{data:e.data,type:e.type});this.parent.insertBefore(e.node,d)}else for(a=0;a<b.length;++a){e=this._normalizedCreator(b[a]);this.setItem(e.node.id,{data:e.data,type:e.type});this.parent.appendChild(e.node)}return this},destroy:function(){c.forEach(this.events,c.disconnect);this.clearItems();this.node=this.parent=this.current=null},markupFactory:function(b,a){b._skipStartup=true;return new c.dnd.Container(a,b)},startup:function(){if(!this.parent){this.parent=this.node;if(this.parent.tagName.toLowerCase()==
"table"){var b=this.parent.getElementsByTagName("tbody");if(b&&b.length)this.parent=b[0]}}this.defaultCreator=c.dnd._defaultCreator(this.parent);this.sync()},onMouseOver:function(b){for(var a=b.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(b);if(this.current!=a){this.current&&this._removeItemClass(this.current,"Over");a&&this._addItemClass(a,"Over");this.current=a}},onMouseOut:function(b){for(b=
b.relatedTarget;b;){if(b==this.node)return;try{b=b.parentNode}catch(a){b=null}}if(this.current){this._removeItemClass(this.current,"Over");this.current=null}this._changeState("Container","");this.onOutEvent()},onSelectStart:function(b){if(!this.skipForm||!c.dnd.isFormElement(b))c.stopEvent(b)},onOverEvent:function(){},onOutEvent:function(){},_changeState:function(b,a){var d="dojoDnd"+b;b=b.toLowerCase()+"State";c.replaceClass(this.node,d+a,d+this[b]);this[b]=a},_addItemClass:function(b,a){c.addClass(b,
"dojoDndItem"+a)},_removeItemClass:function(b,a){c.removeClass(b,"dojoDndItem"+a)},_getChildByEvent:function(b){if(b=b.target)for(var a=b.parentNode;a;b=a,a=b.parentNode)if(a==this.parent&&c.hasClass(b,"dojoDndItem"))return b;return null},_normalizedCreator:function(b,a){b=(this.creator||this.defaultCreator).call(this,b,a);if(!c.isArray(b.type))b.type=["text"];if(!b.node.id)b.node.id=c.dnd.getUniqueId();c.addClass(b.node,"dojoDndItem");return b}});c.dnd._createNode=function(b){if(!b)return c.dnd._createSpan;
return function(a){return c.create(b,{innerHTML:a})}};c.dnd._createTrTd=function(b){var a=c.create("tr");c.create("td",{innerHTML:b},a);return a};c.dnd._createSpan=function(b){return c.create("span",{innerHTML:b})};c.dnd._defaultCreatorNodes={ul:"li",ol:"li",div:"div",p:"div"};c.dnd._defaultCreator=function(b){b=b.tagName.toLowerCase();var a=b=="tbody"||b=="thead"?c.dnd._createTrTd:c.dnd._createNode(c.dnd._defaultCreatorNodes[b]);return function(d,e){var f=d&&c.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"?c.dnd._createSpan:a)(String(g))}if(!d.id)d.id=c.dnd.getUniqueId();return{node:d,data:g,type:f}}};return c.dnd.Container});
define("dijit/tree/_dndContainer",["dojo","dijit","dojo/dnd/common","dojo/dnd/Container"],function(c,b){c.getObject("tree",true,c);b.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");};c.declare("dijit.tree._dndContainer",null,{constructor:function(a,d){this.tree=a;this.node=a.domNode;c.mixin(this,d);this.map={};this.current=null;this.containerState="";c.addClass(this.node,"dojoDndContainer");this.events=[c.connect(this.node,"onmouseenter",this,"onOverEvent"),c.connect(this.node,"onmouseleave",this,"onOutEvent"),c.connect(this.tree,"_onNodeMouseEnter",this,"onMouseOver"),
c.connect(this.tree,"_onNodeMouseLeave",this,"onMouseOut"),c.connect(this.node,"ondragstart",c,"stopEvent"),c.connect(this.node,"onselectstart",c,"stopEvent")]},getItem:function(a){return{data:this.selection[a],type:["treeNode"]}},destroy:function(){c.forEach(this.events,c.disconnect);this.node=this.parent=null},onMouseOver:function(a){this.current=a},onMouseOut:function(){this.current=null},_changeState:function(a,d){var e="dojoDnd"+a;a=a.toLowerCase()+"State";c.replaceClass(this.node,e+d,e+this[a]);
this[a]=d},_addItemClass:function(a,d){c.addClass(a,"dojoDndItem"+d)},_removeItemClass:function(a,d){c.removeClass(a,"dojoDndItem"+d)},onOverEvent:function(){this._changeState("Container","Over")},onOutEvent:function(){this._changeState("Container","")}});return b.tree._dndContainer});
define("dijit/tree/_dndSelector",["dojo","dijit","dojo/dnd/common","dijit/tree/_dndContainer"],function(c,b){c.declare("dijit.tree._dndSelector",b.tree._dndContainer,{constructor:function(){this.selection={};this.anchor=null;b.setWaiState(this.tree.domNode,"multiselect",!this.singular);this.events.push(c.connect(this.tree.domNode,"onmousedown",this,"onMouseDown"),c.connect(this.tree.domNode,"onmouseup",this,"onMouseUp"),c.connect(this.tree.domNode,"onmousemove",this,"onMouseMove"))},singular:false,
getSelectedTreeNodes:function(){var a=[],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();c.forEach(this._setDifference(d,a),c.hitch(this,function(e){e.setSelected(false);this.anchor==e&&delete this.anchor;delete this.selection[e.id]}));c.forEach(this._setDifference(a,d),c.hitch(this,function(e){e.setSelected(true);this.selection[e.id]=e}));this._updateSelectionProperties()},_setDifference:function(a,d){c.forEach(d,function(e){e.__exclude__=true});a=c.filter(a,function(e){return!e.__exclude__});c.forEach(d,function(e){delete e.__exclude__});
return a},_updateSelectionProperties:function(){var a=this.getSelectedTreeNodes(),d=[],e=[];c.forEach(a,function(f){e.push(f);d.push(f.getTreePath())});a=c.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!=
c.mouseButtons.RIGHT){c.stopEvent(a);var d=this.current,e=c.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,c.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(b.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||c.global;for(var e in this.selection)a.call(d,this.getItem(e),e,this)}});return b.tree._dndSelector});
define("dijit/Tree",["dojo","dijit","text!dijit/templates/TreeNode.html","text!dijit/templates/Tree.html","dojo/fx","dojo/DeferredList","dijit/_Widget","dijit/_Templated","dijit/_Container","dijit/_Contained","dijit/_CssStateMixin","dojo/cookie","dijit/tree/TreeStoreModel","dijit/tree/ForestStoreModel","dijit/tree/_dndSelector"],function(c,b){c.declare("dijit._TreeNode",[b._Widget,b._Templated,b._Container,b._Contained,b._CssStateMixin],{item:null,isTreeNode:true,label:"",isExpandable:null,isExpanded:false,
state:"UNCHECKED",templateString:c.cache("dijit","templates/TreeNode.html"),baseClass:"dijitTreeNode",cssStateNodes:{rowNode:"dijitTreeRow",labelNode:"dijitTreeLabel"},attributeMap:c.delegate(b._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&&b.setWaiState(this.labelNode,"expanded",this.isExpanded);
this.setSelected(false)},_setIndentAttr:function(a){var d=Math.max(a,0)*this.tree._nodePixelIndent+"px";c.style(this.domNode,"backgroundPosition",d+" 0px");c.style(this.rowNode,this.isLeftToRight()?"paddingLeft":"paddingRight",d);c.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);c.replaceClass(this[d],this[f]||"",g||"");c.style(this[d],this.tree["get"+e+"Style"](a,this.isExpanded)||{})},_updateLayout:function(){var a=this.getParent();!a||a.rowNode.style.display=="none"?c.addClass(this.domNode,"dijitTreeIsRoot"):
c.toggleClass(this.domNode,"dijitTreeIsLast",!this.getNextSibling())},_setExpando:function(a){var d=["dijitTreeExpandoLoading","dijitTreeExpandoOpened","dijitTreeExpandoClosed","dijitTreeExpandoLeaf"],e=["*","-","+","*"];a=a?0:this.isExpandable?this.isExpanded?1:2:3;c.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;b.setWaiState(this.labelNode,"expanded",
"true");if(this.tree.showRoot||this!==this.tree.rootNode)b.setWaiRole(this.containerNode,"group");c.addClass(this.contentNode,"dijitTreeContentExpanded");this._setExpando();this._updateItemClasses(this.item);this==this.tree.rootNode&&b.setWaiState(this.tree.domNode,"expanded","true");var a,d=c.fx.wipeIn({node:this.containerNode,duration:b.defaultDuration,onEnd:function(){a.callback(true)}});a=this._expandDeferred=new c.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;b.setWaiState(this.labelNode,"expanded","false");this==this.tree.rootNode&&b.setWaiState(this.tree.domNode,"expanded","false");c.removeClass(this.contentNode,"dijitTreeContentExpanded");this._setExpando();this._updateItemClasses(this.item);if(!this._wipeOut)this._wipeOut=c.fx.wipeOut({node:this.containerNode,duration:b.defaultDuration});this._wipeOut.play()}},indent:0,setChildItems:function(a){var d=this.tree,e=d.model,f=[];c.forEach(this.getChildren(),
function(g){b._Container.prototype.removeChild.call(this,g)},this);this.state="LOADED";if(a&&a.length>0){this.isExpandable=true;c.forEach(a,function(g){var i=e.getIdentity(g),j=d._itemNodesMap[i],h;if(j)for(var k=0;k<j.length;k++)if(j[k]&&!j[k].getParent()){h=j[k];h.set("indent",this.indent+1);break}if(!h){h=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(h);else d._itemNodesMap[i]=
[h]}this.addChild(h);if(this.tree.autoExpand||this.tree._state(g))f.push(d._expandNode(h))},this);c.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 c.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()}c.forEach(a,function(d){d._updateLayout()})},makeExpandable:function(){this.isExpandable=true;this._setExpando(false)},_onLabelFocus:function(){this.tree._onNodeFocus(this)},setSelected:function(a){b.setWaiState(this.labelNode,"selected",a);
c.toggleClass(this.rowNode,"dijitTreeRowSelected",a)},setFocusable:function(a){this.labelNode.setAttribute("tabIndex",a?"0":"-1")},_onClick:function(a){this.tree._onClick(this,a)},_onDblClick:function(a){this.tree._onDblClick(this,a)},_onMouseEnter:function(a){this.tree._onNodeMouseEnter(this,a)},_onMouseLeave:function(a){this.tree._onNodeMouseLeave(this,a)}});c.declare("dijit.Tree",[b._Widget,b._Templated],{store:null,model:null,query:null,label:"",showRoot:true,childrenAttr:["children"],paths:[],
path:[],selectedItems:null,selectedItem:null,openOnClick:false,openOnDblClick:false,templateString:c.cache("dijit","templates/Tree.html"),persist:true,autoExpand:false,dndController:"dijit.tree._dndSelector",dndParams:["onDndDrop","itemCreator","onDndCancel","checkAcceptance","checkItemAcceptance","dragThreshold","betweenThreshold"],onDndDrop:null,itemCreator:null,onDndCancel:null,checkAcceptance:null,checkItemAcceptance:null,dragThreshold:5,betweenThreshold:0,_nodePixelIndent:19,_publish:function(a,
d){c.publish(this.id,[c.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 c.Deferred;this.inherited(arguments)},postCreate:function(){this._initState();this.model||this._store2model();this.connect(this.model,"onChange","_onItemChange");this.connect(this.model,"onChildrenChange","_onItemChildrenChange");this.connect(this.model,
"onDelete","_onItemDelete");this._load();this.inherited(arguments);if(this.dndController){if(c.isString(this.dndController))this.dndController=c.getObject(this.dndController);for(var a={},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;c.deprecated("Tree: from version 2.0, should specify a model object rather than a store/query");var a={id:this.id+
"_ForestStoreModel",store:this.store,query:this.query,childrenAttrs:this.childrenAttr};if(this.params.mayHaveChildren)a.mayHaveChildren=c.hitch(this,"mayHaveChildren");if(this.params.getItemChildren)a.getChildren=c.hitch(this,function(d,e,f){this.getItemChildren(this._v10Compat&&d===this.model.root?null:d,e,f)});this.model=new b.tree.ForestStoreModel(a);this.showRoot=Boolean(this.label)},onLoad:function(){},_load:function(){this.model.getRoot(c.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";b.setWaiRole(this.domNode,"presentation");b.setWaiRole(d.labelNode,"presentation");b.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(c.hitch(this,function(){this._loadDeferred.callback(true);
this.onLoad()}))}),function(a){console.error(this,": error loading root: ",a)})},getNodesByItem:function(a){if(!a)return[];return[].concat(this._itemNodesMap[c.isString(a)?a:this.model.getIdentity(a)])},_setSelectedItemAttr:function(a){this.set("selectedItems",[a])},_setSelectedItemsAttr:function(a){var d=this;this._loadDeferred.addCallback(c.hitch(this,function(){var e=c.map(a,function(g){return!g||c.isString(g)?g:d.model.getIdentity(g)}),f=[];c.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,i,j){var h=g.shift(),k=c.filter(i,function(l){return l.getIdentity()==h})[0];if(k)g.length?f._expandNode(k).addCallback(function(){d(g,k.getChildren(),j)}):j.callback(k);else j.errback("Could not expand path at "+h)}function e(g){f.set("selectedNodes",c.map(c.filter(g,function(i){return i[0]}),function(i){return i[1]}))}var f=this;return(new c.DeferredList(c.map(a,
function(g){var i=new c.Deferred;g=c.map(g,function(j){return c.isString(j)?j:f.model.getIdentity(j)});g.length?f._loadDeferred.addCallback(function(){d(g,[f.rootNode],i)}):i.errback("Empty path");return i}))).addCallback(e)},_setSelectedNodeAttr:function(a){this.set("selectedNodes",[a])},_setSelectedNodesAttr:function(a){this._loadDeferred.addCallback(c.hitch(this,function(){this.dndController.setSelection(a)}))},mayHaveChildren:function(){},getItemChildren:function(){},getLabel:function(a){return this.model.getLabel(a)},
getIconClass:function(a,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=c.keys,e=b.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()});c.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});c.stopEvent(a)}}}}},_onEnterKey:function(a){this._publish("execute",{item:a.item,node:a.node});this.dndController.userSelect(a.node,c.isCopyKey(a.evt),a.evt.shiftKey);this.onClick(a.item,a.node,a.evt)},_onDownArrow:function(a){(a=this._getNextNode(a.node))&&a.isTreeNode&&this.focusNode(a)},_onUpArrow:function(a){a=a.node;var 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 c.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)}c.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)}c.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 c.Deferred;d.getChildren(e,function(i){a.unmarkProcessing();i=a.setChildItems(i);var j=f._expandNode(a,true);i.addCallback(function(){j.addCallback(function(){g.callback()})})},function(i){console.error(f,": error loading root children: ",i)});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){b.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);c.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)])&&c.forEach(a,function(e){e.setChildItems(d)})},
_onItemDelete:function(a){a=this.model.getIdentity(a);var d=this._itemNodesMap[a];if(d){c.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=c.cookie(this.cookieName);this._openedItemIds={};a&&c.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);c.cookie(this.cookieName,a.join(","),{expires:365})}},destroy:function(){if(this._curSearch){clearTimeout(this._curSearch.timer);delete this._curSearch}this.rootNode&&this.rootNode.destroyRecursive();this.dndController&&!c.isString(this.dndController)&&this.dndController.destroy();this.rootNode=null;this.inherited(arguments)},
destroyRecursive:function(){this.destroy()},resize:function(a){a&&c.marginBox(this.domNode,a);this._nodePixelIndent=c._getMarginSize(this.tree.indentDetector).w;if(this.tree.rootNode)this.tree.rootNode.set("indent",this.showRoot?0:-1)},_createTreeNode:function(a){return new b._TreeNode(a)}});return b.Tree});define("text!orion/widgets/templates/_ExplorerTreeNode.html",function(){return'<div class="dijitTreeNode" waiRole="presentation">\n\t<div dojoAttachPoint="rowNode" class="dijitTreeRow"\n\t\twaiRole="presentation"\n\t\tdojoAttachEvent="onmouseenter:_onMouseEnter, onmouseleave:_onMouseLeave, onclick:_onClick, ondblclick:_onDblClick">\n\t\t<img src="${_blankGif}" alt="" dojoAttachPoint="expandoNode" class="dijitTreeExpando" waiRole="presentation" />\n\t\t<span dojoAttachPoint="expandoNodeText" class="dijitExpandoText" waiRole="presentation"></span>\n\t\t<span dojoAttachPoint="contentNode" class="dijitTreeContent" waiRole="presentation">\n\t\t\t<img src="${_blankGif}" alt="" dojoAttachPoint="iconNode" class="dijitIcon dijitTreeIcon" waiRole="presentation" />\n\t\t\t<!-- labelNode\'s innerText will be label string --\>\n\t\t\t<span dojoAttachPoint="labelNode" class="dijitTreeLabel" wairole="treeitem" tabindex="-1" waiState="selected-false" dojoAttachEvent="onfocus:_onLabelFocus"></span>\n\t\t\t<a href="" dojoAttachPoint="followLink"><img src="${_blankGif}" alt="" dojoAttachPoint="followNode" class="dijitIcon dijitTreeIcon follow" waiRole="link"></a>\n\t\t</span>\n\t</div>\n\t<div dojoAttachPoint="containerNode" class="dijitTreeContainer"\n\t\twaiRole="presentation" style="display: none;">\n\t</div>\n</div>'});
define("orion/widgets/ExplorerTree",["dojo","dijit","dijit/Tree","text!orion/widgets/templates/_ExplorerTreeNode.html"],function(c,b){c.declare("orion.widgets._ExplorerTreeNode",[b._TreeNode],{templateString:c.cache("orion","widgets/templates/_ExplorerTreeNode.html"),_updateItemClasses:function(a){this.inherited(arguments);this._applyClassAndStyle(a,"follow","Follow");typeof this.tree.updateFollowLink==="function"&&this.tree.updateFollowLink(a,this.followLink)}});c.declare("orion.widgets.ExplorerTree",
[b.Tree],{selectedNodes:{},postCreate:function(){c.connect(this,"onMouseDown",this._eatSelectionEvent);c.connect(this.domNode,"onselectstart",this._eatSelectionEvent);this.inherited(arguments)},getFollowClass:function(){},getFollowStyle:function(){},updateFollowLink:function(){},onFollowClick:function(){},getSelectedItems:function(){var a=[];this._forEachSelectedNode(function(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(c.isCopyKey(a)||a.shiftKey)c.stopEvent(a)},_onClick:function(a,d){var e=d.target,f=e===a.expandoNode||e===a.expandoNodeText;e=e===a.followNode;if(c.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||c.stopEvent(d)},_onItemDelete:function(a){var d=this._itemNodesMap[this.model.getIdentity(a)];if(d){var e=this;c.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(i,j){var h=[];i=i;do{h.push(i);i=f._getNextNode(i)}while(i&&i!==j);if(i===
j){h.push(j);return h}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(c,b,a){c.declare("orion.widgets.DirectoryPrompterDialog",[b.Dialog,orion.widgets._OrionDialogMixin],{treeWidget:null,treeRoot:{},widgetsInTemplate:true,templateString:c.cache("orion","widgets/templates/DirectoryPrompterDialog.html"),constructor:function(){this.inherited(arguments);
this.options=arguments[0]||{}},postMixInProperties:function(){this.inherited(arguments);this.title=this.options.title||"Choose a Folder";this.buttonOk="OK";this.message=this.options.message||""},postCreate:function(){this.inherited(arguments);this.loadFolderList("/");this.message||c.style(this.messageCell,{display:"none"})},loadFolderList:function(d){d=a.makeRelative(d);this.treeRoot.Location=d;this.options.fileClient.loadWorkspace(d).then(c.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();c.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(c.hitch(this,
function(g){for(var i=[],j=0;j<g.length;j++)g[j].Directory&&i.push(g[j]);a.processNavigatorParent(e,i);f(i)})):f([])},getIdentity:function(e){return e.Name?e.Location:"ROOT"},getLabel:function(e){return e.Name},onChildrenChange:function(){}};return d}()});define("dojox",["dojo"],function(c){return dojox=c._dojox||{}});
define("dojox/form/uploader/Base",["dojo","dijit","dojox","dojox/form/uploader/Base","dijit/_Widget","dijit/_Templated"],function(c,b){c.declare("dojox.form.uploader.Base",[b._Widget,b._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){c.stopEvent(a);this.submit(c.formToObject(this.form))})}},supports:function(a){if(!this._hascache){this._hascache={testDiv:c.create("div"),testInput:c.create("input",{type:"file"}),xhr:window.XMLHttpRequest?new XMLHttpRequest:{}};c.style(this._hascache.testDiv,"opacity",0.7)}switch(a){case "FormData":return!!window.FormData;case "sendAsBinary":return!!this._hascache.xhr.sendAsBinary;
case "opacity":return c.style(this._hascache.testDiv,"opacity")==0.7;case "multiple":if(this.force=="flash"||this.force=="iframe")return false;a=c.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(c,b,a){c.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){c.body().appendChild(this.domNode);this._getButtonStyle(this.domNode);d=true}this._setButtonStyle();d&&c.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();c.forEach(this._inputs,c.destroy,c);this._inputs=[];this._nameIndex=0;this._createInput()},getFileList:function(){var d=[];this.supports("multiple")?c.forEach(this.inputNode.files,function(e,f){d.push({index:f,name:e.name,size:e.size,type:e.type})},this):c.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);c.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?c.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}c.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();c.style(this.button.domNode,{margin:"0px",display:"block",verticalAlign:"top"});c.style(this.button.domNode.firstChild,{margin:"0px",display:"block"});d||document.body.removeChild(this.domNode)},
_createInput:function(){if(this._inputs.length){c.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=c.create("input",{type:"file",name:d,className:"dojoxInputNode"},this.domNode,"first");this.supports("multiple")&&this.multiple&&c.attr(this.inputNode,"multiple",true);this._inputs.push(this.inputNode);c.style(this.inputNode,{fontSize:this.inputNodeFontSize+"em"});
d=c.marginBox(this.inputNode);c.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=c.hitch(this,function(f){this._cons.push(c.connect(this.inputNode,f,this,function(){this.button._cssMouseEvent({type:f})}))});d("mouseover");d("mouseout");d("mousedown");this._cons.push(c.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=c.style(this.button.domNode.firstChild,"border");this._cons.push(c.connect(this.inputNode,"focus",this,function(){c.style(this.button.domNode.firstChild,"border","1px dashed #ccc")}));this._cons.push(c.connect(this.inputNode,"blur",this,function(){c.style(this.button.domNode.firstChild,"border",e)}))}},_disconnectButton:function(){c.forEach(this._cons,c.disconnect,
c)}});(function(){a.form.UploaderOrg=a.form.Uploader;var d=[a.form.UploaderOrg];a.form.addUploaderPlugin=function(e){d.push(e);c.declare("dojox.form.Uploader",d,{})}})()});
define("dojox/form/uploader/FileList",["dojo","dijit","dojox","dojox/form/uploader/Base","dijit/_Widget","dijit/_Templated"],function(c,b,a){c.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=b.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(c.hitch(this,function(){this.hideProgress(true)}),1250)})}else{this._upCheckCnt++;setTimeout(c.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;c.style(this.percentBarNode,"width",d.percent)},_hideShowProgress:function(d){var e=this.progressNode,f=function(){c.style(e,"display",d.endDisp)};if(d.ani){c.style(e,"display","block");c.animateProperty({node:e,properties:{height:{start:d.beg,end:d.end,units:"px"}},onEnd:f}).play()}else f()},_onUploaderChange:function(d){this.reset();c.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 i,j=this.listNode.insertRow(-1);i=j.insertCell(-1);c.addClass(i,"dojoxUploaderIndex");i.innerHTML=d;i=j.insertCell(-1);c.addClass(i,"dojoxUploaderIcon");i.innerHTML=e;i=j.insertCell(-1);c.addClass(i,"dojoxUploaderFileName");i.innerHTML=f;i=j.insertCell(-1);c.addClass(i,"dojoxUploaderSize");i.innerHTML=this.convertBytes(g).value;this.rowAmt++}})});
define("dojo/io/iframe",["dojo"],function(c){c.getObject("io",true,c);c.io.iframe={create:function(b,a,d){if(window[b])return window[b];if(window.frames[b])return window.frames[b];var e=null;d=d;if(!d){c.config.useXDomain&&!c.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=c.config.dojoBlankHtmlUrl||c.moduleUrl("dojo",
"resources/blank.html")}e=c.place('<iframe id="'+b+'" name="'+b+'" src="'+d+'" onload="'+a+'" style="position: absolute; left: 1px; top: 1px; height: 1px; width: 1px; visibility: hidden">',c.body());return window[b]=e},setSrc:function(b,a,d){try{if(d){var e;if(e=c.isIE||c.isWebKit?b.contentWindow.document:b.contentWindow)e.location.replace(a);else b.location=a}else if(c.isWebKit)b.location=a;else frames[b.name].location=a}catch(f){console.log("dojo.io.iframe.setSrc: ",f)}},doc:function(b){return b.contentDocument||
b.name&&b.document&&c.doc.getElementsByTagName("iframe")[b.name].contentWindow&&c.doc.getElementsByTagName("iframe")[b.name].contentWindow.document||b.name&&c.doc.frames[b.name]&&c.doc.frames[b.name].document||null},send:function(b){if(!this._frame)this._frame=this.create(this._iframeName,c._scopeName+".io.iframe._iframeOnload();");b=c._ioSetArgs(b,function(a){a.canceled=true;a.ioArgs._callNext()},function(a){var d=null;try{var e=a.ioArgs,f=c.io.iframe,g=f.doc(f._frame),i=e.handleAs;d=g;if(i!="html")if(i==
"xml"){if(c.isIE<9||c.isIE&&c.isQuirks){c.query("a",f._frame.contentWindow.document.documentElement).orphan();var j=f._frame.contentWindow.document.documentElement.innerText;j=j.replace(/>\s+</g,"><");j=c.trim(j);d=c._contentHandlers.xml({responseText:j})}}else{d=g.getElementsByTagName("textarea")[0].value;if(i=="json")d=c.fromJson(d);else if(i=="javascript")d=c.eval(d)}}catch(h){d=h}finally{e._callNext()}return d},function(a,d){d.ioArgs._hasError=true;d.ioArgs._callNext();return a});b.ioArgs._callNext=
function(){if(!this._calledNext){this._calledNext=true;c.io.iframe._currentDfd=null;c.io.iframe._fireNextRequest()}};this._dfdQueue.push(b);this._fireNextRequest();c._ioWatch(b,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 b},_currentDfd:null,_dfdQueue:[],_iframeName:c._scopeName+"IoIframe",_fireNextRequest:function(){try{if(!(this._currentDfd||this._dfdQueue.length==
0)){do var b=this._currentDfd=this._dfdQueue.shift();while(b&&b.canceled&&this._dfdQueue.length);if(!b||b.canceled)this._currentDfd=null;else{var a=b.ioArgs,d=a.args;a._contentToClean=[];var e=c.byId(d.form),f=d.content||{};if(e){if(f){var g=function(r,n){c.create("input",{type:"hidden",name:r,value:n},e);a._contentToClean.push(r)};for(var i in f){var j=f[i];if(c.isArray(j)&&j.length>1){var h;for(h=0;h<j.length;h++)g(i,j[h])}else if(e[i])e[i].value=j;else g(i,j)}}var k=e.getAttributeNode("action"),
l=e.getAttributeNode("method"),m=e.getAttributeNode("target");if(d.url){a._originalAction=k?k.value:null;if(k)k.value=d.url;else e.setAttribute("action",d.url)}if(!l||!l.value)if(l)l.value=d.method?d.method:"post";else e.setAttribute("method",d.method?d.method:"post");a._originalTarget=m?m.value:null;if(m)m.value=this._iframeName;else e.setAttribute("target",this._iframeName);e.target=this._iframeName;c._ioNotifyStart(b);e.submit()}else{g=d.url+(d.url.indexOf("?")>-1?"&":"?")+a.query;c._ioNotifyStart(b);
this.setSrc(this._frame,g,true)}}}}catch(q){b.errback(q)}},_iframeOnload:function(){var b=this._currentDfd;if(b){b=b.ioArgs;var a=c.byId(b.args.form);if(a){for(var d=b._contentToClean,e=0;e<d.length;e++)for(var f=d[e],g=0;g<a.childNodes.length;g++){var i=a.childNodes[g];if(i.name==f){c.destroy(i);break}}b._originalAction&&a.setAttribute("action",b._originalAction);if(b._originalTarget){a.setAttribute("target",b._originalTarget);a.target=b._originalTarget}}b._finished=true}else this._fireNextRequest()}};
return c.io.iframe});
define("dojox/form/uploader/plugins/HTML5",["dojo","dijit","dojox","dojox/form/Uploader"],function(c,b,a){c.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=c.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;
c.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",c.hitch(this,"_xhrProgress"),false);d.addEventListener("load",c.hitch(this,"_xhrProgress"),false);d.addEventListener("error",c.hitch(this,function(f){this.onError(f);clearInterval(e)}),false);d.addEventListener("abort",c.hitch(this,function(f){this.onAbort(f);clearInterval(e)}),false);d.onreadystatechange=c.hitch(this,function(){if(d.readyState===4){console.info("COMPLETE");clearInterval(e);this.onComplete(c.eval(d.responseText))}});d.open("POST",this.getUrl());
e=setInterval(c.hitch(this,function(){}),250);return d},_buildRequestBody:function(d,e){var f="";e="--"+e;var g=[];c.forEach(this.inputNode.files,function(j,h){j=this.name+"s[]";var k=this.inputNode.files[h].fileName,l;try{l=this.inputNode.files[h].getAsBinary()+"\r\n";f+=e+"\r\n";f+="Content-Disposition: form-data; ";f+='name="'+j+'"; ';f+='filename="'+k+'"\r\n';f+="Content-Type: "+this.getMimeType()+"\r\n\r\n";f+=l}catch(m){g.push({index:h,name:k})}},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 i in d){f+=e+"\r\n";f+="Content-Disposition: form-data; ";f+='name="'+i+'"\r\n\r\n';f+=d[i]+"\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(c,b,a){c.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);c.stopEvent(d)}},uploadIFrame:function(){this.getUrl();c.io.iframe.send({url:this.getUrl(),
form:this.form,handleAs:"json",error:c.hitch(this,function(d){console.error("HTML Upload Error:"+d.message)}),load:c.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(c){c.getObject("number",true,c);c.number.format=function(b,a){a=c.mixin({},a||{});var d=c.i18n.normalizeLocale(a.locale);d=c.i18n.getLocalization("dojo.cldr","number",d);a.customs=d;d=a.pattern||d[(a.type||"decimal")+"Format"];if(isNaN(b)||Math.abs(b)==Infinity)return null;return c.number._applyPattern(b,d,a)};c.number._numberPatternRE=/[#0,]*[#0](?:\.0*#*)?/;c.number._applyPattern=function(b,
a,d){d=d||{};var e=d.customs.group,f=d.customs.decimal;a=a.split(";");var g=a[0];a=a[b<0?1:0]||"-"+g;if(a.indexOf("%")!=-1)b*=100;else if(a.indexOf("\u2030")!=-1)b*=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 i=c.number._numberPatternRE;g=g.match(i);
if(!g)throw new Error("unable to find a number expression in pattern: "+a);if(d.fractional===false)d.places=0;return a.replace(i,c.number._formatAbsolute(b,g[0],{decimal:f,group:e,places:d.places,round:d.round}))};c.number.round=function(b,a,d){d=10/(d||10);return(d*+b).toFixed(a)/d};(0.9).toFixed()==0&&function(){var b=c.number.round;c.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 b(a,d,e)+(a>0?f:-f)}}();c.number._formatAbsolute=
function(b,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||(b=c.number.round(b,f,d.round));b=String(Math.abs(b)).split(".");var g=b[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)b[1]=c.string.pad(g,e,"0",true);if(f<g.length)b[1]=
g.substr(0,f)}else b[1]&&b.pop();f=a[0].replace(",","");e=f.indexOf("0");if(e!=-1){e=f.length-e;if(e>b[0].length)b[0]=c.string.pad(b[0],e);if(f.indexOf("#")==-1)b[0]=b[0].substr(b[0].length-e)}f=a[0].lastIndexOf(",");var i,j;if(f!=-1){i=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=b[0];f;){e=f.length-i;a.push(e>0?f.substr(e):f);f=e>0?f.slice(0,e):"";if(j){i=j;delete j}}b[0]=a.reverse().join(d.group||",");return b.join(d.decimal||".")};c.number.regexp=
function(b){return c.number._parseInfo(b).regexp};c.number._parseInfo=function(b){b=b||{};var a=c.i18n.normalizeLocale(b.locale);a=c.i18n.getLocalization("dojo.cldr","number",a);var d=b.pattern||a[(b.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 i=d.indexOf("\u00a4")!=-1;if(i){e=a.currencyGroup||e;f=a.currencyDecimal||f}}a=d.split(";");a.length==1&&a.push("-"+a[0]);a=c.regexp.buildGroupRE(a,function(j){j="(?:"+c.regexp.escapeString(j,
".")+")";return j.replace(c.number._numberPatternRE,function(h){var k={signed:false,separator:b.strict?e:[e,""],fractional:b.fractional,decimal:f,exponent:false};h=h.split(".");var l=b.places;if(h.length==1&&g!=1)h[1]="###";if(h.length==1||l===0)k.fractional=false;else{if(l===undefined)l=b.pattern?h[1].lastIndexOf("0")+1:Infinity;if(l&&b.fractional==undefined)k.fractional=true;if(!b.places&&l<h[1].length)l+=","+h[1].length;k.places=l}h=h[0].split(",");if(h.length>1){k.groupSize=h.pop().length;if(h.length>
1)k.groupSize2=h.pop().length}return"("+c.number._realNumberRegexp(k)+")"})},true);if(i)a=a.replace(/([\s\xa0]*)(\u00a4{1,3})([\s\xa0]*)/g,function(j,h,k,l){j=c.regexp.escapeString(b[["symbol","currency","displayName"][k.length-1]]||b.currency||"");h=h?"[\\s\\xa0]":"";l=l?"[\\s\\xa0]":"";if(!b.strict){if(h)h+="*";if(l)l+="*";return"(?:"+h+j+l+")?"}return h+j+l});return{regexp:a.replace(/[\xa0 ]/g,"[\\s\\xa0]"),group:e,decimal:f,factor:g}};c.number.parse=function(b,a){a=c.number._parseInfo(a);b=(new RegExp("^"+
a.regexp+"$")).exec(b);if(!b)return NaN;var d=b[1];if(!b[1]){if(!b[2])return NaN;d=b[2];a.factor*=-1}d=d.replace(new RegExp("["+a.group+"\\s\\xa0]","g"),"").replace(a.decimal,".");return d*a.factor};c.number._realNumberRegexp=function(b){b=b||{};if(!("places"in b))b.places=Infinity;if(typeof b.decimal!="string")b.decimal=".";if(!("fractional"in b)||/^0/.test(b.places))b.fractional=[true,false];if(!("exponent"in b))b.exponent=[true,false];if(!("eSigned"in b))b.eSigned=[true,false];var a=c.number._integerRegexp(b),
d=c.regexp.buildGroupRE(b.fractional,function(f){var g="";if(f&&b.places!==0){g="\\"+b.decimal;if(b.places==Infinity)g="(?:"+g+"\\d+)?";else g+="\\d{"+b.places+"}"}return g},true),e=c.regexp.buildGroupRE(b.exponent,function(f){if(f)return"([eE]"+c.number._integerRegexp({signed:b.eSigned})+")";return""});a=a+d;if(d)a="(?:(?:"+a+")|(?:"+d+"))";return a+e};c.number._integerRegexp=function(b){b=b||{};if(!("signed"in b))b.signed=[true,false];if("separator"in b){if(!("groupSize"in b))b.groupSize=3}else b.separator=
"";var a=c.regexp.buildGroupRE(b.signed,function(e){return e?"[-+]":""},true),d=c.regexp.buildGroupRE(b.separator,function(e){if(!e)return"(?:\\d+)";e=c.regexp.escapeString(e);if(e==" ")e="\\s";else if(e=="\u00a0")e="\\s\\xa0";var f=b.groupSize,g=b.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 c.number});
define("dijit/ProgressBar",["dojo","dijit","text!dijit/templates/ProgressBar.html","dojo/fx","dojo/number","dijit/_Widget","dijit/_Templated"],function(c,b){c.declare("dijit.ProgressBar",[b._Widget,b._Templated],{progress:"0",value:"",maximum:100,places:0,indeterminate:false,label:"",name:"",templateString:c.cache("dijit","templates/ProgressBar.html"),_indeterminateHighContrastImagePath:c.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){c.mixin(this,a||{});a=this.internalProgress;var d=this.domNode,e=1;if(this.indeterminate){b.removeWaiState(d,"valuenow");b.removeWaiState(d,"valuemin");b.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}b.setWaiState(d,"describedby",this.labelNode.id);b.setWaiState(d,"valuenow",this.progress);b.setWaiState(d,"valuemin",0);b.setWaiState(d,"valuemax",this.maximum)}this.labelNode.innerHTML=this.report(e);c.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;":c.number.format(a,{type:"percent",places:this.places,locale:this.lang})},onChange:function(){}});return b.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(c,b){c.declare("orion.widgets.ImportDialog",[b.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:true,templateString:c.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);c.byId("importDialog.myForm").action=this.options.importLocation;c.byId("importDialog.uploader").url=this.options.importLocation;c.connect(b.byId("importDialog.uploader"),"onError",c.hitch(this,function(){setTimeout(c.hitch(this,function(){this.hide()}),2E3)}));c.connect(b.byId("importDialog.uploader"),
"onComplete",c.hitch(this,function(){setTimeout(c.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(c,b){c.declare("dijit.form.ComboBoxMixin",b._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:c.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(c.isIE){var e=c.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);b.selectInputText(a,d,d)},_setDisabledAttr:function(a){this.inherited(arguments);b.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(c.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==c.keys.SHIFT)){var e=false,f=this.dropDown,g=c.keys,i=null;this._prev_key_backspace=false;this._abortQuery();this.inherited(arguments);if(this._opened)i=f.getHighlightedOption();switch(d){case g.PAGE_DOWN:case g.DOWN_ARROW:case g.PAGE_UP:case g.UP_ARROW:this._opened&&
this._announceOption(i);c.stopEvent(a);break;case g.ENTER:if(i)if(i==f.nextButton){this._nextSearch(1);c.stopEvent(a);break}else{if(i==f.previousButton){this._nextSearch(-1);c.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;i&&this._selectOption();if(this._opened){this._lastQuery=
null;this.closeDropDown()}break;case " ":if(i){c.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(c.hitch(this,"_startSearchFromInput"),1)}}},_autoCompleteText:function(a){var d=this.focusNode;b.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;b.selectInputText(d,e)}}else{d.value=a;b.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&&c.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,c.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();b.setWaiState(this.domNode,"expanded",
"true")},loadDropDown:function(){this._startSearchAll()},isLoaded:function(){return false},closeDropDown:function(){this._abortQuery();if(this._opened){this.inherited(arguments);b.setWaiState(this.domNode,"expanded","false");b.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&&b.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);b.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);b.setWaiState(this.focusNode,"activedescendant",c.attr(a,"id"));this._autoCompleteText(d)}},_selectOption:function(a){a&&this._announceOption(a.target);this.closeDropDown();this._setCaretPos(this.focusNode,this.focusNode.value.length);
b.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 c.string.substitute(this.queryExpr,[a])},_startSearch:function(a){if(!this.dropDown){var d=this.id+"_popup";this.dropDown=new (c.getObject(this.dropDownClass,false))({onChange:c.hitch(this,this._selectOption),id:d,dir:this.dir});b.removeWaiState(this.focusNode,
"activedescendant");b.setWaiState(this.textbox,"owns",d)}d=c.clone(this.query);this._lastInput=a;this._lastQuery=d[this.searchAttr]=this._getQueryString(a);this.searchTimer=setTimeout(c.hitch(this,function(e,f){this.searchTimer=null;e={queryOptions:{ignoreCase:this.ignoreCase,deep:true},query:e,onBegin:c.hitch(this,"_setMaxOptions"),onComplete:c.hitch(this,"_openResultList"),onError:function(g){f._fetchHandle=null;console.error("dijit.form.ComboBox: "+g);f.closeDropDown()},start:0,count:this.pageSize};
c.mixin(e,f.fetchProperties);this._fetchHandle=f.store.fetch(e);this._nextSearch=this.dropDown.onPage=c.hitch(this,function(g,i){g.start+=g.count*i;g.direction=i;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 b.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=c.query('label[for="'+this.id+'"]');if(a.length){a[0].id=this.id+"_label";b.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=c.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()}});c.declare("dijit.form._ComboBoxMenu",[b._Widget,b._Templated,b._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=c.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=c.create("li",{"class":"dijitReset dijitMenuItem"+(this.isLeftToRight()?"":" dijitMenuItemRtl"),role:"option"});d=d(a);if(d.html)e.innerHTML=d.label;else e.appendChild(c.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":"";c.attr(this.previousButton,"id",this.id+"_prev");c.forEach(a,function(g,i){g=this._createOption(g,e);c.attr(g,"id",this.id+i);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";c.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){c.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;c.addClass(this._highlighted_option,"dijitMenuItemSelected")}},_blurOptionNode:function(){if(this._highlighted_option){c.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)}c.window.scrollIntoView(this._highlighted_option)},highlightFirstOption:function(){var a=this.domNode.firstChild,d=a.nextSibling;this._focusOptionNode(d.style.display=="none"?a:d);c.window.scrollIntoView(this._highlighted_option)},highlightLastOption:function(){this._focusOptionNode(this.domNode.lastChild.previousSibling);c.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)}c.window.scrollIntoView(this._highlighted_option)},_page:function(a){var d=0,e=this.domNode.scrollTop,f=c.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 c.keys.DOWN_ARROW:this._highlightNextOption();
return false;case c.keys.PAGE_DOWN:this.pageDown();return false;case c.keys.UP_ARROW:this._highlightPrevOption();return false;case c.keys.PAGE_UP:this.pageUp();return false;default:return true}}});c.declare("dijit.form.ComboBox",[b.form.ValidationTextBox,b.form.ComboBoxMixin],{_setValueAttr:function(a,d,e){this._set("item",null);a||(a="");b.form.ValidationTextBox.prototype._setValueAttr.call(this,a,d,e)}});c.declare("dijit.form._ComboBoxDataStore",null,{constructor:function(a){this.root=a;if(a.tagName!=
"SELECT"&&a.firstChild){a=c.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}c.query("> option",a).forEach(function(d){d.innerHTML=c.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=c.data.util.filter.patternToRegExp(a.query.name,a.queryOptions.ignoreCase),f=c.query("> option",this.root).filter(function(g){return(g.innerText||g.textContent||"").match(e)});a.sort&&f.sort(c.data.util.sorter.createSortFunction(a.sort,this));d(f,a)},close:function(){},getLabel:function(a){return a.innerHTML},getIdentity:function(a){return c.attr(a,"value")},fetchItemByIdentity:function(a){var d=c.query("> option[value='"+
a.identity+"']",this.root)[0];a.onItem(d)},fetchSelectedItem:function(){var a=this.root,d=a.selectedIndex;return typeof d=="number"?c.query("> option:nth-child("+(d!=-1?d+1:1)+")",a)[0]:null}});c.extend(b.form._ComboBoxDataStore,c.data.util.simpleFetch);return b.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(c,b){localStorage.getItem("orion.sftpConnections")||localStorage.setItem("orion.sftpConnections",JSON.stringify({identifier:"name",label:"name",items:[]}));window.sftpConnectionStoreData=JSON.parse(localStorage.getItem("orion.sftpConnections"));c.declare("orion.widgets.SFTPConnectionDialog",
[b.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:true,templateString:c.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);c.connect(this.addSFTPConnection,"onClick",null,c.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(c,b,a,d,e,f,g){var i={};i._cloneItemWithoutChildren=function j(h){if(h===null||typeof h!=="object")return h;var k=h.constructor();for(var l in h)if(l!=="children"&&l!=="Children")k[l]=j(h[l]);return k};i._createOpenWithCommands=
function(j,h){function k(){for(var E=j.getServiceReferences("orion.edit.editor"),F=[],I=0;I<E.length;I++){var G=E[I],N=G.getProperty("id");F.push({id:N,name:G.getProperty("name"),uriTemplate:new g(G.getProperty("orionTemplate")||G.getProperty("uriTemplate"))})}return F}function l(E,F){E=E.map(function(I){return e.escape(I)});F=F.map(function(I){return e.escape(I)});E=E.length&&"(*\\.("+E.join("|")+")$)";F=F.length&&"(^("+F.join("|")+")$)";return E&&F?E+"|"+F:E?E:F?F:null}function m(E,F){E=E.getServiceReferences("orion.navigate.openWith");
for(var I=[],G=0;G<E.length;G++){var N=E[G];if(N.getProperty("editor")===F.id){N=N.getProperty("contentType");if(N instanceof Array)I=I.concat(N);else N!==null&&typeof N!=="undefined"&&I.push(N)}}return I}function q(E){for(E=E.getServiceReferences("orion.navigate.openWith.default");0<E.length;)return{editor:E[0].getProperty("editor")};return null}for(var r=k(),n=q(j),o=[],p=0;p<r.length;p++){var s=r[p],t=n&&n.editor===s.id,v=m(j,s);if(v.length){for(var w=[],y=[],C=0;C<v.length;C++){var D=h[v[C]];
if(D){w=w.concat(D.extension);y=y.concat(D.filename)}}v=s.uriTemplate;w={Directory:false,Name:l(w,y)};s={name:s.name||s.id,id:"eclipse.openWithCommand."+s.id,tooltip:s.name,validationProperties:w,href:true,forceSingleItem:true,isEditor:t?"default":"editor"};t={run:b.hitch(v,v.expand)};o.push({properties:s,service:t})}}return o};i._makeValidationFunction=function(j,h){function k(q){for(var r="^",n=0;n<q.length;n++){var o=q.charAt(n);switch(o){case "?":r+=".";break;case "*":r+=".*";break;default:r+=
o}}r+="$";return new RegExp(r)}function l(q,r,n){var o,p;if(r.indexOf(":")>=0){o=k(r.substring(0,r.indexOf(":")));var s=r.substring(r.indexOf(":")+1);for(p in q)if(o.test(p))if(l(q[p],s,n))return true}o=k(r);for(p in q)if(o.test(p))if(typeof n==="string"){if(k(n).test(q[p]))return true}else if(n===q[p])return true;return false}function m(q,r){for(var n in r)if(!l(q,n,r[n]))return false;return true}return b.hitch(j,function(q){if(typeof h==="function")q=h(q);if(b.isArray(q)){if((this.forceSingleItem||
this.href)&&q.length!==1)return false;if(!this.forceSingleItem&&q.length<1)return false}else q=[q];if(!this.validationProperties)return true;for(var r in q)if(!m(q[r],this.validationProperties))return false;return true})};i._createCommandOptions=function(j,h,k,l,m){var q={name:j.name,image:j.image,id:j.id||j.name,tooltip:j.tooltip,isEditor:j.isEditor};q.visibleWhen=i._makeValidationFunction(j,m);if(l)if(j.href)q.hrefCallback=b.hitch(j,function(r){r=b.isArray(r.items)?r.items[0]:r.items;r=i._cloneItemWithoutChildren(r);
if(h.run)return h.run(r);else if(k)return k.getService(h).run(r)});else q.callback=b.hitch(j,function(r){var n;if(this.forceSingleItem){r=b.isArray()?r.items[0]:r.items;n=i._cloneItemWithoutChildren(r)}else if(b.isArray(r.items)){n=[];for(var o=0;o<r.items.length;o++)n.push(i._cloneItemWithoutChildren(r.items[o]))}else n=i._cloneItemWithoutChildren(r.items);if(h.run)h.run(n);else k&&k.getService(h).run(n)});return q};i.getOpenWithCommands=function(j){var h=[];for(var k in j._objectScope){var l=j._objectScope[k];
l.isEditor&&h.push(l)}return h};return i});
define("orion/textview/keyBinding",[],function(){function c(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 b=window.navigator.platform.indexOf("Mac")!==-1;c.prototype={match:function(a){if(this.keyCode===a.keyCode){if(this.mod1!==(b?a.metaKey:a.ctrlKey))return false;if(this.mod2!==a.shiftKey)return false;
if(this.mod3!==a.altKey)return false;if(b&&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:c}});
define("orion/favorites",["require","dojo","orion/util"],function(c,b,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=
b.isArray(e)?e:[e];for(var f=0;f<e.length;f++){var g=e[f],i=g.ChildrenLocation?g.ChildrenLocation:g.Location;i=a.makeRelative(i);this.addFavorite(g.Name,i,g.Directory)}this._storeFavorites();this._notifyListeners()},addFavoriteUrl:function(e){this.addFavorite(e,e,false,true)},addFavorite:function(e,f,g,i){this._favorites.push({name:e,path:f,directory:g,isFavorite:true,isExternalResource:i});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 i in this._favorites)if(this._favorites[i].path===e){var j=this._favorites[i];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 i=e.charAt(f);g+=i==="*"?".*":i==="?"?".?":this._SPECIAL_CHARS.indexOf(i)>=0?"\\"+i:i}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 i in this._searches)if(this._searches[i].query===e){var j=this._searches[i];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,
i=f.get("navigate");if(typeof i==="string")i=JSON.parse(i);if(i)for(g in i){i[g].isFavorite=true;e._favorites.push(i[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(c,b,a){return b.declare("orion.widgets.OpenResourceDialog",[a.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:true,templateString:b.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);b.connect(this.resourceName,"onChange",this,function(){this.time=+new Date;clearTimeout(this.timeoutId);this.timeoutId=setTimeout(b.hitch(this,this.checkSearch),0)});b.connect(this.resourceName,"onKeyPress",this,function(d){if(d.keyCode===
b.keys.ENTER&&this.results){d=b.query("a",this.results);if(d.length>0){window.open(d[0].href);this.hide()}}});b.connect(this,"onKeyPress",this,function(d){var e,f,g,i,j;g=function(k,l,m){return l<k.length-1?k[l+1]:m};var h=function(k,l,m){return l>0?k[l-1]:m};if(d.keyCode===b.keys.DOWN_ARROW||d.keyCode===b.keys.UP_ARROW){f=b.query("a",this.results);e=b.query("a",this.favresults);i=a.getFocus();j=f.indexOf(i.node);i=e.indexOf(i.node);if(d.keyCode===b.keys.DOWN_ARROW)if(i>=0)a.focus(g(e,i,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(i>=0){g=this.resourceName&&this.resourceName.get("textbox");a.focus(h(e,i,g))}else if(j>=0){g=this.resourceName&&this.resourceName.get("textbox");a.focus(h(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]);b.stopEvent(d)}});b.connect(this,"onMouseUp",function(d){d.target.focus()});this.populateFavorites()},populateFavorites:function(){b.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,b.hitch(d,d.decorateResult),d.showFavoritesImage)(e);e&&e.length>0&&b.place("<hr/>",d.favresults,"last")}},showFavoritesImage:function(d){var e=new Image;b.addClass(e,"commandSprite");b.addClass(e,"core-sprite-makeFavorite");
b.addClass(e,"commandImage");e.src=c.toUrl("images/none.png");e.title="Favorite";d.appendChild(e);b.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(b.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){b.place("<div>Searching&#x2026;</div>",
this.results,"only");var f=this;setTimeout(function(){var g=f.searcher.createSearchQuery(null,d,"Name"),i=f.searchRenderer.makeRenderFunction(f.results,false,b.hitch(f,f.decorateResult));f.searcher.search(g,false,i)},0)}},decorateResult:function(d){var e=this;b.query("a",d).forEach(function(f){b.connect(f,"onmouseup",function(g){!b.mouseButtons.isMiddle(g)&&!b.isCopyKey(g)&&e.hide()});b.connect(f,"onkeyup",e,function(g){g.keyCode===b.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(c,b,a){b.declare("orion.widgets.LoginDialog",[a.TooltipDialog],{widgetsInTemplate:true,templateString:b.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;b.addClass(this.closeLink,"imageSprite");b.addClass(this.closeLink,"core-sprite-close");b.connect(this.closeLink,"onmouseover",this.closeLink,function(){d.closeLink.style.cursor="pointer"});b.connect(this.closeLink,"onmouseout",this.closeLink,function(){d.closeLink.style.cursor="default"});b.connect(this.closeLink,"onclick",function(){b.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}}b.hitch(this,this.renderAuthenticatedServices)();b.hitch(this,this.renderUnauthenticatedServices)()},renderAuthenticatedServices:function(){b.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=b.create("tr",null,this.authenticatedList);b.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=b.create("tr",{className:"navTableHeading"});var i=this.authenticatedServices[f].authService,j=b.create("td",null,g,"only"),h=b.create("h2",null,j,"only");if(i)if(i.getAuthForm)b.hitch(d,function(m,q){i.getAuthForm(eclipse.globalCommandUtils.notifyAuthenticationSite).then(function(r){if(d.authenticatedServices[q].label)m.innerHTML=d.authenticatedServices[q].label+"<br>";m.innerHTML+=d.getHostname(r)})})(h,f);else h.innerHTML=this.authenticatedServices[f].label?this.authenticatedServices[f].label:
f;else{var k=this.authenticatedServices[f].SignInLocation;if(this.authenticatedServices[f].label)h.innerHTML=this.authenticatedServices[f].label+"<br>";h.innerHTML+=this.getHostname(k)}b.addClass(j,"LoginWindowLeft");j=b.create("td",{style:"text-align: right"},g,"last");b.addClass(j,"LoginWindowRight");h=this.authenticatedServices[f].data;i=this.authenticatedServices[f].authService;if(!i){b.place(g,this.authenticatedList,"last");return}h.Location&&b.create("a",{href:c.toUrl("profile/user-profile.html")+
"#"+h.Location,innerHTML:"Profile"},j,"last");b.place(document.createTextNode(" "),j,"last");if(i.logout){var l=b.create("a",{innerHTML:"Sign out"},j,"last");b.connect(l,"onmouseover",l,function(){l.style.cursor="pointer"});b.connect(l,"onmouseout",l,function(){l.style.cursor="default"});b.connect(l,"onclick",b.hitch(d,function(m,q){return function(){m.logout().then(b.hitch(d,function(){this.addUserItem(q,m,this.authenticatedServices[q].label);this.isSingleService()&&this.closeDialog();localStorage.removeItem(q)}))}})(i,
f))}b.place(g,this.authenticatedList,"last");j="N/A";if(h&&h.lastlogintimestamp)j=b.date.locale.format(new Date(h.lastlogintimestamp),{formatLength:"short"});h=h.Name&&h.Name.replace(/^\s+|\s+$/g,"")!==""?h.Name:h.login;g=b.create("tr");j=h.length>40?b.create("td",{innerHTML:h.substring(0,30)+"... logged in since "+j,colspan:2,title:h+" logged in since "+j},g,"only"):b.create("td",{innerHTML:h+" logged in since "+j,colspan:2},g,"only");b.addClass(j,"LoginWindowLeft");b.addClass(j,"LoginWindowRight");
b.addClass(j,"LoginWindowComment");b.place(g,this.authenticatedList,"last")}},renderUnauthenticatedServices:function(){this.emptyListInfo.style.display=this.unauthenticatedServices.length===0&&this.authenticatedServices.length===0?"":"none";b.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=b.create("tr",
null,this.otherUnauthenticatedList);b.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=b.create("tr",{className:"navTableHeading"});var i=b.create("td",null,g,"only");b.addClass(i,"LoginWindowLeft");var j=b.create("h2",null,i,"only");i=b.create("td",{style:"text-align: right"},g,"last");b.addClass(i,"LoginWindowRight");var h=this.unauthenticatedServices[f].authService;
if(h)if(h.getAuthForm)b.hitch(d,function(m,q){h.getAuthForm(eclipse.globalCommandUtils.notifyAuthenticationSite).then(function(r){r.indexOf("?")==-1?b.create("a",{target:"_blank",href:r+"?redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+"?key="+q,innerHTML:"Sign in"},m,"last"):b.create("a",{target:"_blank",href:r+"&redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+"?key="+q,innerHTML:"Sign in"},m,"last");if(d.unauthenticatedServices[q].label)j.innerHTML=d.unauthenticatedServices[q].label+
"<br>";j.innerHTML+=d.getHostname(r)})})(i,f);else{if(h.login){b.place(document.createTextNode(this.unauthenticatedServices[f].label?this.unauthenticatedServices[f].label:f),j,"only");var k=b.create("a",{innerHTML:"Sign in",style:"cursor: hand;"},i,"last");b.connect(k,"onmouseover",k,function(){k.style.cursor="pointer"});b.connect(k,"onmouseout",k,function(){k.style.cursor="default"});b.connect(k,"onclick",b.hitch(d,function(m){return function(){m.login(eclipse.globalCommandUtils.notifyAuthenticationSite).then(function(){d.isSingleService()&&
a.popup.hide&&a.popup.hide(d);a.popup.close(d)})}})(h))}}else{var l=this.unauthenticatedServices[f].SignInLocation;l.indexOf("?")==-1?b.create("a",{target:"_blank",href:l+"?redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+"?key="+f,innerHTML:"Sign in"},i,"last"):b.create("a",{target:"_blank",href:l+"&redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+"?key="+f,innerHTML:"Sign in"},i,"last");if(this.unauthenticatedServices[f].label)j.innerHTML=this.unauthenticatedServices[f].label+
"<br>";j.innerHTML+=this.getHostname(l)}b.place(g,this.otherUnauthenticatedList,"last");if(this.unauthenticatedServices[f].pending){g=b.create("tr");i=b.create("td",{innerHTML:"Authentication required!",style:"padding-left: 10px",colspan:2},g,"only");b.addClass(i,"LoginWindowLeft");b.addClass(i,"LoginWindowRight");b.create("img",{src:c.toUrl("images/warning.gif"),style:"padding-right: 4px; vertical-align: bottom; padding-bottom: 2px;"},i,"first");b.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(c,b,a){b.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,i=this.authenticatedServices[d].authService;if(i&&i.logout)this.addChild(new a.MenuItem({label:f?"Sign Out "+f:"Sign Out",onClick:b.hitch(this,function(j,h){return function(){j.logout().then(b.hitch(g,function(){this.addUserItem(h,j,this.authenticatedServices[h].label);localStorage.removeItem(h)}))}})(i,d)}),e)},_renderUnauthenticatedService:function(d,
e,f){var g=this,i=this.unauthenticatedServices[d].authService;if(i)if(i.getAuthForm)b.hitch(g,function(h){i.getAuthForm(eclipse.globalCommandUtils.notifyAuthenticationSite).then(function(k){k+=k.indexOf("?")==-1?"?redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+"?key="+h:"&redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+"?key="+h;g.addChild(new a.MenuItem({label:f?"<a target='_blank' href="+k+">Sign In To "+f+"</a>":"<a target='_blank' href="+k+">Sign In</a>",onKeyDown:function(l){l.keyCode===
13&&window.open(k)},_onClick:function(l){this.getParent().onItemClick(this,l)}}),e)})})(d);else{if(i.login)this.addChild(new a.MenuItem({label:f?"Sign In To "+f:"Sign In",onClick:b.hitch(g,function(h){return function(){h.login(eclipse.globalCommandUtils.notifyAuthenticationSite)}})(i)}),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(h){h.keyCode===13&&window.open(j)},_onClick:function(h){this.getParent().onItemClick(this,h)}}),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="+
c.toUrl("settings/settings.html")+">Settings</a>",onKeyDown:function(f){if(f.keyCode===13)window.location=c.toUrl("settings/settings.html")},_onClick:function(f){this.getParent().onItemClick(this,f)}}));this.addChild(new a.MenuItem({label:"<a href="+c.toUrl("operations/list.html")+">Background Operations</a>",onKeyDown:function(f){if(f.keyCode===13)window.location=c.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="+
c.toUrl("help/index.jsp")+">Help</a>",onKeyDown:function(f){if(f.keyCode===13)window.location=c.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='"+c.toUrl("help/about.html")+"'>About Orion</a>",onKeyDown:function(f){if(f.keyCode===13)window.location=c.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 i=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}}b.hitch(this,this.renderServices)();if(b.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)+"...";b.create("a",{innerHTML:f,href:c.toUrl("profile/user-profile.html")+"#"+g.Location,title:"View profile of "+d,style:"margin-right: 0px"},
b.byId("userInfo"),"only")}else if(this.isSingleService()&&!g)if(e.getAuthForm)b.hitch(this,function(h){e.getAuthForm(eclipse.globalCommandUtils.notifyAuthenticationSite).then(function(k){k+=k.indexOf("?")==-1?"?redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+"?key="+h:"&redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+"?key="+h;b.create("a",{innerHTML:"Sign In",href:k,title:"Sign In",style:"margin-right: 0px",target:"_blank"},b.byId("userInfo"),"only")})})(d);else{if(e.login){var j=
b.create("a",{innerHTML:"Sign In",title:"Sign In",style:"margin-right: 0px"},b.byId("userInfo"),"only");b.connect(j,"onmouseover",j,function(){j.style.cursor="pointer"});b.connect(j,"onmouseout",j,function(){j.style.cursor="default"});b.connect(j,"onclick",function(){e.login(eclipse.globalCommandUtils.notifyAuthenticationSite)})}}else if(this.hasServices()){j=b.create("a",{innerHTML:"Profiles",style:"margin-right: 0px"},b.byId("userInfo"),"only");b.connect(j,"onmouseover",j,function(){j.style.cursor=
"pointer"});b.connect(j,"onmouseout",j,function(){j.style.cursor="default"});b.connect(j,"onclick",function(){try{a.popup.open({popup:i.options.loginDialog,around:b.byId("userInfo")})}catch(h){}a.focus(i.options.loginDialog.domNode)})}else b.empty(b.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(c,b,a,d,e,f,g,i,j,h){function k(M){var S=document.createElement("a");S.href=M;return S.href}function l(M,S){if(M.getLabel)return M.getLabel();
else{M=new b.Deferred;M.callback(S.properties.name);return M}}function m(){return N}function q(M){(M=M.getService("orion.page.progress"))&&b.hitch(M,M.init)("progressPane")}function r(M){var S=M.getServiceReferences("orion.core.auth");N=[];var W=b.byId("userMenu");if(W){if(!a.byId("logins")){var u=new a.form.DropDownButton({id:"logins",dropDown:G,label:"Options",showLabel:false,alt:"Options"});b.place(u.domNode,W,"only");u.valueNode&&b.destroy(u.valueNode)}for(W=0;W<S.length;W++){u=S[W];var x=M.getService(u);
b.hitch(this,function(B,K){l(B,K).then(function(O){B.getKey().then(function(Q){N.push(Q);B.getUser().then(function(V){I.addUserItem(Q,B,O,V);G.addUserItem(Q,B,O,V)},function(){I.addUserItem(Q,B,O);G.addUserItem(Q,B,O,jsonData)});window.addEventListener("storage",function(){if(F[Q]!==localStorage.getItem(Q)){F[Q]=localStorage.getItem(Q);B.getUser().then(function(V){I.addUserItem(Q,B,O,V);G.addUserItem(Q,B,O,V)},function(){I.addUserItem(Q,B,O);G.addUserItem(Q,B,O)})}},false)})})})(x,u)}}}function n(M){I.setPendingAuthentication(M);
var S;for(S in M)if(M.hasOwnProperty(S)){if(b.byId("userInfo").innerHTML)try{a.popup.open({popup:I,around:b.byId("userInfo")})}catch(W){}else window.setTimeout(function(){try{a.popup.open({popup:I,around:b.byId("userInfo")})}catch(u){}},500);return}a.popup.hide&&a.popup.hide(I);a.popup.close(I)}function o(M){I.authenticatedService(M)}function p(M,S,W,u,x,B,K){M.closeParameterCollector();if(B=b.byId("pageActions")){b.empty(B);(B=M.renderCommands(B,"dom",W||S,S,"button"))&&B.then?B.then(function(){M.processURL(window.location.href)}):
M.processURL(window.location.href)}if(!K)if(B=b.byId("pageNavigationActions")){b.empty(B);M.renderCommands(B,"dom",x||W||S,u||S,"button")}}function s(){if(b.byId("relatedLinks")){if(L){L.focusedChild=null;b.forEach(L.getChildren(),function(M){L.removeChild(M);M.destroy()});L.destroy()}return L=new a.Menu({style:"display: none;",id:"relatedLinksMenu"})}}function t(M,S){L||(L=new a.Menu({style:"display: none;",id:"relatedLinksMenu"}));M._addMenuItem(L,S);M=a.byId("related");if((S=b.byId("relatedLinks"))&&
!M){M=new a.form.DropDownButton({id:"related",label:"Related pages",dropDown:L});b.place(M.domNode,S,"only");i.forceLayout(S)}}function v(M,S,W,u,x){var B=M.getServiceReferences("orion.page.link.related");if(!(B.length<=0)){var K=b.byId("relatedLinks");if(K){for(var O=s(),Q=false,V=0;V<B.length;V++){for(var ca={},aa=B[V].getPropertyNames(),da=0;da<aa.length;da++)ca[aa[da]]=B[V].getProperty(aa[da]);if(ca.id)if(b.indexOf(W,ca.id)<0){aa=u.findCommand(ca.id);if(!aa){var ia=M.getServiceReferences("orion.navigate.command");
for(da=0;da<ia.length;da++)if(ia[da].getProperty("id")===ca.id){ca={};aa=ia[da].getPropertyNames();for(var ja=0;ja<aa.length;ja++)ca[aa[ja]]=ia[da].getProperty(aa[ja]);da=g._createCommandOptions(ca,ia[da],M,true);aa=new e.Command(da);break}}if(aa)if(!aa.visibleWhen||aa.visibleWhen(S)){Q=true;da=new e.CommandInvocation(u,S,S,null,aa);aa._addMenuItem(O,da)}else typeof x==="function"&&window.setTimeout(b.hitch(aa,function(){b.when(x(),b.hitch(this,function(la){la&&S===T&&this.visibleWhen(la)&&t(this,
new e.CommandInvocation(u,la,la,null,this))}))}),0)}}(M=a.byId("related"))&&M.destroy();if(Q){M=new a.form.DropDownButton({id:"related",label:"Related pages",dropDown:O});b.place(M.domNode,K,"only")}i.forceLayout(K)}}}function w(M,S,W){var u=b.byId("globalActions");if(u){b.empty(u);W=(W=b.isArray(W)?W[0]:W)||S||{};M.renderCommands(u,"global",W,S,"tool")}}function y(M){R=M}function C(M,S,W,u,x){T=M;v(S,M,R,W,u);Z=x}function D(M,S,W,u,x,B,K,O){function Q(){var z=S.getService("orion.core.favorite");
if(!z){z=new h.FavoritesService({serviceRegistry:S});z=S.getService("orion.core.favorite")}if(Z&&Z.Location)z.hasFavorite(Z.ChildrenLocation||Z.Location).then(function(J){if(J)S.getService("orion.page.message").setMessage(Z.Name+" is already a favorite.",2E3);else{z.makeFavorites([Z]);S.getService("orion.page.message").setMessage(Z.Name+" has been added to the favorites list.",2E3)}});else{var H=window.location.pathname+window.location.hash;z.hasFavorite(H).then(function(J){if(J)S.getService("orion.page.message").setMessage(H+
" is already a favorite.",2E3);else{z.addFavoriteUrl(H);S.getService("orion.page.message").setMessage(H+" has been added to the favorites list.",2E3)}})}}var V,ca=b.byId(M);if(!ca)throw"could not find banner parent, id was "+M;b.place(d.topHTMLFragment,ca,"only");if(M=b.byId("pageToolbar")){b.place(d.toolbarHTMLFragment,M,"only");b.addClass(M,"toolComposite")}else{M=b.create("div",{id:"pageToolbar","class":"toolbar toolComposite layoutBlock"},"titleArea","after");b.place(d.toolbarHTMLFragment,M,"only")}W.setParameterCollector(new f.CommandParameterCollector);
b.place('<div id="keyAssist" style="display: none" class="keyAssistFloat" role="list" aria-atomic="true" aria-live="assertive"></div>',document.body,"last");if(M=b.byId("primaryNav")){u=S.getServiceReferences("orion.page.link");for(var aa=0;aa<u.length;aa++){V={};for(var da=u[aa].getPropertyNames(),ia=0;ia<da.length;ia++)V[da[ia]]=u[aa].getProperty(da[ia]);if(V.href&&V.name){da=b.create("a",{href:V.href},M,"last");V=document.createTextNode(V.name);b.place(V,da,"only")}}}var ja=b.byId("search");if(!ja)throw"failed to generate HTML for banner";
b.connect(ja,"onkeypress",function(z){if(z.charOrCode===b.keys.ENTER)if(x){if(ja.value.length>0){z=x.createSearchQuery(ja.value);window.location=c.toUrl("search/search.html")+"#"+z}}else window.alert("Can't search: no search service is available")});if(M=b.byId("pageTitle")){V=document.createTextNode(document.title);b.place(V,M,"last")}if(M=b.byId("pageFavorite")){b.addClass(M,"commandButton");b.connect(M,"onclick",this,function(){Q()});b.connect(M,"onkeypress",this,function(z){if(z.keyCode===b.keys.ENTER||
z.keyCode===b.keys.SPACE)Q()});b.connect(M,"onmouseover",M,function(){b.addClass(this,"commandButtonOver")});b.connect(M,"onfocus",M,function(){b.addClass(this,"commandButtonOver")});b.connect(M,"onmouseout",M,function(){b.removeClass(this,"commandButtonOver")});b.connect(M,"onblur",M,function(){b.removeClass(this,"commandButtonOver")});new e.CommandTooltip({connectId:[M],label:"Add this page to the favorites list",position:["below","left","right","above"],commandParent:ca,commandService:W})}M=new e.Command({name:"Make Favorite",
tooltip:"Add to the favorites list",imageClass:"core-sprite-makeFavorite",id:"orion.makeFavorite",visibleWhen:function(z){z=b.isArray(z)?z:[z];for(var H=0;H<z.length;H++)if(!z[H].Location)return false;return true},callback:function(z){z=b.isArray(z.items)?z.items:[z.items];for(var H=S.getService("orion.core.favorite"),J=function(Y){return function(X){X?S.getService("orion.page.message").setMessage(Y.Name+" is already a favorite.",2E3):H.makeFavorites(Y)}},P=0;P<z.length;P++){var U=z[P];H.hasFavorite(U.ChildrenLocation||
U.Location).then(J(U))}}});W.addCommand(M,"dom");var la=function(z,H,J){var P=H.getService("orion.core.favorite");if(!P){P=new h.FavoritesService({serviceRegistry:H});P=H.getService("orion.core.favorite")}var U=new orion.widgets.OpenResourceDialog({searcher:z,searchRenderer:z.defaultRenderer,favoriteService:P});J&&b.connect(U,"onHide",function(){J.getTextView().focus()});window.setTimeout(function(){U.show()},0)};M=new e.Command({name:"Find File Named...",tooltip:"Choose a file by name and open an editor on it",
id:"eclipse.openResource",callback:function(){la(x,S,K)}});if(K){K.getTextView().setKeyBinding(new j.KeyBinding("f",true,true,false),"Find File Named...");K.getTextView().setAction("Find File Named...",function(){la(x,S,K);return true})}W.addCommand(M,"global");W.registerCommandContribution("eclipse.openResource",100,"globalActions",null,true,new e.CommandKeyBinding("f",true,true));M=new e.Command({name:"Toggle banner and footer",tooltip:"Hide or show the page banner and footer",id:"orion.toggleTrim",
callback:function(){var z=a.byId(ca.parentNode.id);if(z){var H=b.byId("footer");if(ca.style.display==="none"){ca.style.display="block";H.style.display="block"}else{ca.style.display="none";H.style.display="none"}z.layout()}return true}});W.addCommand(M,"global");W.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",
M.callback)}var A=b.byId("keyAssist");b.connect(document,"onkeypress",b.hitch(this,function(z){if(z.charOrCode===b.keys.ESCAPE)A.style.display="none"}));b.connect(document,"onclick",b.hitch(this,function(z){if((z=z.target||z.originalTarget||z.srcElement)&&z.id!=="keyAssist")A.style.display="none"}));K&&K.getTextView().addEventListener("MouseDown",function(){A.style.display="none"});O&&O.addHandler({isActive:function(){return A.style.display==="block"},cancel:function(){if(this.isActive()){A.style.display=
"none";return true}return false}});O=new e.Command({name:"Show Keys",tooltip:"Show a list of all the keybindings on this page",id:"eclipse.keyAssist",callback:function(){if(A.style.display==="none"){b.empty(A);if(K){b.place("<h2>Editor</h2>",A,"last");for(var z=K.getTextView().getActions(false),H=0;H<z.length;H++)for(var J=z[H],P=K.getTextView().getKeyBindings(J),U=0;U<P.length;U++)b.place('<span role="listitem">'+i.getUserKeyString(P[U])+" = "+J+"<br></span>",A,"last")}b.place("<h2>Global</h2>",
A,"last");W.showKeyBindings(A);A.style.display="block"}else A.style.display="none";return true}});W.addCommand(O,"global");W.registerCommandContribution("eclipse.keyAssist",100,"globalActions",null,true,new e.CommandKeyBinding(191,false,true));if(K){M=window.navigator.platform.indexOf("Mac")!==-1;K.getTextView().setKeyBinding(new e.CommandKeyBinding(191,false,true,!M,M),"Show Keys");K.getTextView().setAction("Show Keys",O.callback)}G.setKeyAssist(O.callback);w(W,B,T);if(b.indexOf(R,"eclipse.openWith")<
0)(B=S.getService("orion.file.contenttypes"))&&B.getContentTypesMap().then(function(z){z=g._createOpenWithCommands(S,z);for(var H=0;H<z.length;H++){var J=z[H].properties,P=g._createCommandOptions(J,z[H].service,S,true);P=new e.Command(P);P.isEditor=J.isEditor;W.addCommand(P,"object");W.addCommandGroup("eclipse.openWith",1E3,"Open With");W.registerCommandContribution(P.id,H,null,"eclipse.openWith")}});r(S);if(d.bottomHTMLFragment)(B=b.byId("footer"))&&b.place(d.bottomHTMLFragment,B,"only");q(S);i.forceLayout(ca.parentNode);
b.subscribe("/dojo/hashchange",W,function(){W.processURL(window.location.href)})}var E=k(c.toUrl("auth/NotifyAuthentication.html")),F={},I=new orion.widgets.LoginDialog,G=new orion.widgets.UserMenu({loginDialog:I}),N=[],L,T,R=[],Z=null;return{generateUserInfo:r,generateRelatedLinks:v,generateDomCommandsInBanner:p,generateBanner:D,notifyAuthenticationSite:E,setPendingAuthentication:n,getAuthenticationIds:m,setPageTarget:C,setPageCommandExclusions:y,authenticatedService:o}});
define("dojo/date",["dojo"],function(c){c.getObject("date",true,c);c.date.getDaysInMonth=function(b){var a=b.getMonth();if(a==1&&c.date.isLeapYear(b))return 29;return[31,28,31,30,31,30,31,31,30,31,30,31][a]};c.date.isLeapYear=function(b){b=b.getFullYear();return!(b%400)||!(b%4)&&!!(b%100)};c.date.getTimezoneName=function(b){var a=b.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=b.toLocaleString();e=/ ([A-Z\/]+)$/;
if(a=a.match(e))d=a[1]}}return d=="AM"||d=="PM"?"":d};c.date.compare=function(b,a,d){b=new Date(+b);a=new Date(+(a||new Date));if(d=="date"){b.setHours(0,0,0,0);a.setHours(0,0,0,0)}else if(d=="time"){b.setFullYear(0,0,0);a.setFullYear(0,0,0)}if(b>a)return 1;if(b<a)return-1;return 0};c.date.add=function(b,a,d){var e=new Date(+b),f=false,g="Date";switch(a){case "day":break;case "weekday":var i;if(a=d%5){a=a;i=parseInt(d/5)}else{a=d>0?5:-5;i=d>0?(d-5)/5:(d+5)/5}var j=b.getDay(),h=0;if(j==6&&d>0)h=1;
else if(j==0&&d<0)h=-1;j=j+a;if(j==0||j==6)h=d>0?2:-2;d=7*i+a+h;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()<b.getDate()&&e.setDate(0);return e};c.date.difference=function(b,a,d){a=a||new Date;d=d||"day";var e=a.getFullYear()-b.getFullYear(),f=1;switch(d){case "quarter":b=b.getMonth();a=a.getMonth();b=Math.floor(b/3)+
1;a=Math.floor(a/3)+1;a+=e*4;f=a-b;break;case "weekday":e=Math.round(c.date.difference(b,a,"day"));d=parseInt(c.date.difference(b,a,"week"));f=e%7;if(f==0)e=d*5;else{var g=0,i=b.getDay();a=a.getDay();d=parseInt(e/7);f=e%7;b=new Date(b);b.setDate(b.getDate()+d*7);b=b.getDay();if(e>0)switch(true){case i==6:g=-1;break;case i==0:g=0;break;case a==6:g=-1;break;case a==0:g=-2;break;case b+f>5:g=-2}else if(e<0)switch(true){case i==6:g=0;break;case i==0:g=1;break;case a==6:g=2;break;case a==0:g=1;break;case b+
f<0:g=2}e+=g;e-=d*2}f=e;break;case "year":f=e;break;case "month":f=a.getMonth()-b.getMonth()+e*12;break;case "week":f=parseInt(c.date.difference(b,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()-b.getTime()}return Math.round(f)};return c.date});
define("dojo/cldr/supplemental",["dojo","dojo/i18n"],function(c){c.getObject("cldr.supplemental",true,c);c.cldr.supplemental.getFirstDayOfWeek=function(b){b={mv:5,ae:6,af:6,bh:6,dj:6,dz:6,eg:6,er:6,et:6,iq:6,ir:6,jo:6,ke:6,kw:6,ly:6,ma:6,om:6,qa:6,sa:6,sd:6,so:6,sy:6,tn:6,ye:6,ar:0,as:0,az:0,bw:0,ca:0,cn:0,fo:0,ge:0,gl:0,gu:0,hk:0,il:0,"in":0,jm:0,jp:0,kg:0,kr:0,la:0,mh:0,mn:0,mo:0,mp:0,mt:0,nz:0,ph:0,pk:0,sg:0,th:0,tt:0,tw:0,um:0,us:0,uz:0,vi:0,zw:0}[c.cldr.supplemental._region(b)];return b===undefined?
1:b};c.cldr.supplemental._region=function(b){b=c.i18n.normalizeLocale(b);b=b.split("-");var a=b[1];if(a){if(a.length==4)a=b[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"}[b[0]];return a};c.cldr.supplemental.getWeekend=function(b){var a=c.cldr.supplemental._region(b);b={"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(b===undefined)b=6;if(a===undefined)a=0;return{start:b,end:a}};return c.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(c){c.getObject("date.locale",true,c);(function(){function b(e,f,g,i){return i.replace(/([a-z])\1*/ig,function(j){var h,k,l=j.charAt(0);j=j.length;var m=["abbr","wide","narrow"];switch(l){case "G":h=f[j<4?"eraAbbr":"eraNames"][e.getFullYear()<0?0:1];break;case "y":h=e.getFullYear();switch(j){case 1:break;case 2:if(!g.fullYear){h=String(h);h=h.substr(h.length-
2);break}default:k=true}break;case "Q":case "q":h=Math.ceil((e.getMonth()+1)/3);k=true;break;case "M":h=e.getMonth();if(j<3){h=h+1;k=true}else{l=["months-format",m[j-3]].join("-");h=f[l][h]}break;case "w":h=c.date.locale._getWeekOfYear(e,0);k=true;break;case "d":h=e.getDate();k=true;break;case "D":h=c.date.locale._getDayOfYear(e);k=true;break;case "E":h=e.getDay();if(j<3){h=h+1;k=true}else{l=["days-format",m[j-3]].join("-");h=f[l][h]}break;case "a":h=e.getHours()<12?"am":"pm";h=g[h]||f["dayPeriods-format-wide-"+
h];break;case "h":case "H":case "K":case "k":k=e.getHours();switch(l){case "h":h=k%12||12;break;case "H":h=k;break;case "K":h=k%12;break;case "k":h=k||24;break}k=true;break;case "m":h=e.getMinutes();k=true;break;case "s":h=e.getSeconds();k=true;break;case "S":h=Math.round(e.getMilliseconds()*Math.pow(10,j-3));k=true;break;case "v":case "z":if(h=c.date.locale._getZone(e,true,g))break;j=4;case "Z":h=c.date.locale._getZone(e,false,g);h=[h<=0?"+":"-",c.string.pad(Math.floor(Math.abs(h)/60),2),c.string.pad(Math.abs(h)%
60,2)];if(j==4){h.splice(0,0,"GMT");h.splice(3,0,":")}h=h.join("");break;default:throw new Error("dojo.date.locale.format: invalid pattern char: "+i);}if(k)h=c.string.pad(h,j);return h})}function a(e,f,g,i){var j=function(l){return l};f=f||j;g=g||j;i=i||j;var h=e.match(/(''|[^'])+/g),k=e.charAt(0)=="'";c.forEach(h,function(l,m){if(l){h[m]=(k?g:f)(l.replace(/''/g,"'"));k=!k}else h[m]=""});return i(h.join(""))}function d(e,f,g,i){i=c.regexp.escapeString(i);g.strict||(i=i.replace(" a"," ?a"));return i.replace(/([a-z])\1*/ig,
function(j){var h;h=j.charAt(0);var k=j.length,l="",m="";if(g.strict){if(k>1)l="0{"+(k-1)+"}";if(k>2)m="0{"+(k-2)+"}"}else{l="0?";m="0{0,2}"}switch(h){case "y":h="\\d{2,4}";break;case "M":h=k>2?"\\S+?":"1[0-2]|"+l+"[1-9]";break;case "D":h="[12][0-9][0-9]|3[0-5][0-9]|36[0-6]|"+m+"[1-9][0-9]|"+l+"[1-9]";break;case "d":h="3[01]|[12]\\d|"+l+"[1-9]";break;case "w":h="[1-4][0-9]|5[0-3]|"+l+"[1-9]";break;case "E":h="\\S+";break;case "h":h="1[0-2]|"+l+"[1-9]";break;case "k":h="1[01]|"+l+"\\d";break;case "H":h=
"1\\d|2[0-3]|"+l+"\\d";break;case "K":h="1\\d|2[0-4]|"+l+"[1-9]";break;case "m":case "s":h="[0-5]\\d";break;case "S":h="\\d{"+k+"}";break;case "a":k=g.am||f["dayPeriods-format-wide-am"];l=g.pm||f["dayPeriods-format-wide-pm"];h=k+"|"+l;if(!g.strict){if(k!=k.toLowerCase())h+="|"+k.toLowerCase();if(l!=l.toLowerCase())h+="|"+l.toLowerCase();if(h.indexOf(".")!=-1)h+="|"+h.replace(/\./g,"")}h=h.replace(/\./g,"\\.");break;default:h=".*"}e&&e.push(j);return"("+h+")"}).replace(/[\xa0 ]/g,"[\\s\\xa0]")}c.date.locale._getZone=
function(e,f){return f?c.date.getTimezoneName(e):e.getTimezoneOffset()};c.date.locale.format=function(e,f){f=f||{};var g=c.i18n.normalizeLocale(f.locale),i=f.formatLength||"short";g=c.date.locale._getGregorianBundle(g);var j=[];e=c.hitch(this,b,e,g,f);if(f.selector=="year")return a(g["dateFormatItem-yyyy"]||"yyyy",e);var h;if(f.selector!="date")(h=f.timePattern||g["timeFormat-"+i])&&j.push(a(h,e));if(f.selector!="time")(h=f.datePattern||g["dateFormat-"+i])&&j.push(a(h,e));return j.length==1?j[0]:
g["dateTimeFormat-"+i].replace(/\{(\d+)\}/g,function(k,l){return j[l]})};c.date.locale.regexp=function(e){return c.date.locale._parseInfo(e).regexp};c.date.locale._parseInfo=function(e){e=e||{};var f=c.i18n.normalizeLocale(e.locale);f=c.date.locale._getGregorianBundle(f);var g=e.formatLength||"short",i=e.datePattern||f["dateFormat-"+g],j=e.timePattern||f["timeFormat-"+g];g=e.selector=="date"?i:e.selector=="time"?j:f["dateTimeFormat-"+g].replace(/\{(\d+)\}/g,function(k,l){return[j,i][l]});var h=[];
return{regexp:a(g,c.hitch(this,d,h,f,e)),tokens:h,bundle:f}};c.date.locale.parse=function(e,f){var g=/[\u200E\u200F\u202A\u202E]/g,i=c.date.locale._parseInfo(f),j=i.tokens,h=i.bundle;e=(new RegExp("^"+i.regexp.replace(g,"")+"$",i.strict?"":"i")).exec(e&&e.replace(g,""));if(!e)return null;var k=["abbr","wide","narrow"],l=[1970,0,1,0,0,0,0],m="";e=c.every(e,function(r,n){if(!n)return true;n=j[n-1];var o=n.length;switch(n.charAt(0)){case "y":if(o!=2&&f.strict)l[0]=r;else if(r<100){r=Number(r);o=""+(new Date).getFullYear();
n=o.substring(0,2)*100;o=Math.min(Number(o.substring(2,4))+20,99);l[0]=r<o?n+r:n-100+r}else{if(f.strict)return false;l[0]=r}break;case "M":if(o>2){n=h["months-format-"+k[o-3]].concat();if(!f.strict){r=r.replace(".","").toLowerCase();n=c.map(n,function(s){return s.replace(".","").toLowerCase()})}r=c.indexOf(n,r);if(r==-1)return false}else r--;l[1]=r;break;case "E":case "e":n=h["days-format-"+k[o-3]].concat();if(!f.strict){r=r.toLowerCase();n=c.map(n,function(s){return s.toLowerCase()})}r=c.indexOf(n,
r);if(r==-1)return false;break;case "D":l[1]=0;case "d":l[2]=r;break;case "a":n=f.am||h["dayPeriods-format-wide-am"];o=f.pm||h["dayPeriods-format-wide-pm"];if(!f.strict){var p=/\./g;r=r.replace(p,"").toLowerCase();n=n.replace(p,"").toLowerCase();o=o.replace(p,"").toLowerCase()}if(f.strict&&r!=n&&r!=o)return false;m=r==o?"p":r==n?"a":"";break;case "K":if(r==24)r=0;case "h":case "H":case "k":if(r>23)return false;l[3]=r;break;case "m":l[4]=r;break;case "s":l[5]=r;break;case "S":l[6]=r}return true});
g=+l[3];if(m==="p"&&g<12)l[3]=g+12;else if(m==="a"&&g==12)l[3]=0;g=new Date(l[0],l[1],l[2],l[3],l[4],l[5],l[6]);f.strict&&g.setFullYear(l[0]);var q=j.join("");i=q.indexOf("d")!=-1;q=q.indexOf("M")!=-1;if(!e||q&&g.getMonth()>l[1]||i&&g.getDate()>l[2])return null;if(q&&g.getMonth()<l[1]||i&&g.getDate()<l[2])g=c.date.add(g,"hour",1);return g}})();(function(){var b=[];c.date.locale.addCustomFormats=function(a,d){b.push({pkg:a,name:d})};c.date.locale._getGregorianBundle=function(a){var d={};c.forEach(b,
function(e){e=c.i18n.getLocalization(e.pkg,e.name,a);d=c.mixin(d,e)},this);return d}})();c.date.locale.addCustomFormats("dojo.cldr","gregorian");c.date.locale.getNames=function(b,a,d,e){var f;e=c.date.locale._getGregorianBundle(e);b=[b,d,a];if(d=="standAlone"){d=b.join("-");f=e[d];if(f[0]==1)f=undefined}b[1]="format";return(f||e[b.join("-")]).concat()};c.date.locale.isWeekend=function(b,a){a=c.cldr.supplemental.getWeekend(a);b=(b||new Date).getDay();if(a.end<a.start){a.end+=7;if(b<a.start)b+=7}return b>=
a.start&&b<=a.end};c.date.locale._getDayOfYear=function(b){return c.date.difference(new Date(b.getFullYear(),0,1,b.getHours()),b)+1};c.date.locale._getWeekOfYear=function(b,a){if(arguments.length==1)a=0;var d=(new Date(b.getFullYear(),0,1)).getDay(),e=(d-a+7)%7;e=Math.floor((c.date.locale._getDayOfYear(b)+e-1)/7);d==a&&e++;return e};return c.date.locale});
define("orion/auth",["dojo","dijit","orion/globalCommands","dojo/date/locale","orion/widgets/LoginDialog"],function(c,b,a){function d(g,i){if(g.status===403){if(typeof e==="undefined")e=new b.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 h=JSON.parse(g.responseText);if(!h.SignInKey)return h;var k=localStorage.getItem(h.SignInKey),l=function(){var r=localStorage.getItem(h.SignInKey);
if(k!==r){window.removeEventListener("storage",l,false);delete f[h.SignInKey];a.setPendingAuthentication(f);a.authenticatedService(h.SignInKey);i&&i()}};window.addEventListener("storage",l,false);if(h.SignInKey){f[h.SignInKey]=h;a.setPendingAuthentication(f)}}catch(m){}else try{return JSON.parse(g.responseText)}catch(q){return{Message:g.Message,HttpCode:g.status}}}var e,f={};c.addOnLoad(function(){window.dojo=c;window.eclipse=window.eclipse||{};eclipse.globalCommandUtils=a});return{handleAuthenticationError:d}});
define("orion/preferences",["require","dojo","orion/auth","dojo/DeferredList"],function(c,b,a){function d(h,k){this._name=h;this._providers=k;this._flushPending=false;this._cached=null;this._stores=[];this._dirty=[]}function e(h,k){return{get:function(l,m){if(k===0)return null;l=localStorage.getItem(h+l);if(l===null)return null;l=JSON.parse(l);if(m||k===-1||l._expires&&l._expires>(new Date).getTime()){delete l._expires;return l}return null},set:function(l,m){if(k!==0){if(k!==-1)m._expires=(new Date).getTime()+
1E3*k;if(Object.keys(m).length===0)localStorage.removeItem(h+l);else{var q=JSON.stringify(m);localStorage.setItem(h+l,q);delete m._expires}}},remove:function(l){localStorage.removeItem(h+l)}}}function f(h){this._currentPromises={};this._cache=new e("/orion/preferences/user",0);this._service=null;this.available=function(){if(!this._service){var k=h.getServiceReferences("orion.core.preference.provider");if(k.length>0)this._service=h.getService(k[0])}return!!this._service}}function g(h){this._location=
h;this._currentPromise=null;this._cache=new e("/orion/preferences/default",3600)}function i(){this._cache=new e("/orion/preferences/local",-1)}function j(h,k){this._userProvider=new f(h);this._localProvider=new i;k=k||"defaults.pref";if(k.indexOf("://")===-1)k=c.toUrl(k);this._defaultsProvider=new g(k);this._serviceRegistration=h.registerService("orion.core.preference",this)}d.prototype={_flush:function(){for(var h=[],k=0;k<this._stores.length;++k){var l=this._stores[k];this._dirty.indexOf(l)!==-1&&
h.push(this._providers[k].put(this._name,l))}this._dirty=[];return new b.DeferredList(h)},_scheduleFlush:function(h){this._dirty.indexOf(h)===-1&&this._dirty.push(h);if(!this._flushPending){this._flushPending=true;window.setTimeout(b.hitch(this,function(){if(this._flushPending){this._flushPending=false;this._flush()}}),0)}},_getCached:function(){if(!this._cached){this._cached={};for(var h=0;h<this._stores.length;++h){var k=this._stores[h];for(var l in k)if(k.hasOwnProperty(l)&&typeof this._cached[l]===
"undefined")this._cached[l]=k[l]}}return this._cached},keys:function(){return Object.keys(this._getCached())},get:function(h){return this._getCached()[h]},put:function(h,k){if(this._stores.length!==0){var l=this._stores[0];if(l[h]!==k){l[h]=k;this._cached=null;this._scheduleFlush(l)}}},remove:function(h){for(var k=0;k<this._stores.length;++k){var l=this._stores[k];if(l.hasOwnProperty(h)){delete l[h];this._cached=null;this._scheduleFlush(l);return true}}return false},clear:function(){for(var h=0;h<
this._stores.length;++h){this._stores[h]={};this._scheduleFlush(this._stores[h])}this._cached=null},sync:function(h){if(this._flushPending){this._flushPending=false;return this._flush()}for(var k=this,l=[],m=0;m<this._providers.length;++m)l.push(this._providers[m].get(this._name,h).then(function(q){return function(r){k._stores[q]=r}}(m)));return(new b.DeferredList(l)).then(function(){k._cached=null;k._getCached()})},flush:function(){this._flush()}};f.prototype={get:function(h,k){if(this._currentPromises[h])return this._currentPromises[h];
var l=new b.Deferred,m=null;if(k)this._cache.remove(h);else m=this._cache.get(h);if(m!==null)l.resolve(m);else{this._currentPromises[h]=l;var q=this;this._service.get(h).then(function(r){q._cache.set(h,r);delete q._currentPromises[h];l.resolve(r)},function(r){if(r.status===401){delete q._currentPromises[h];l.resolve({});a.handleAuthenticationError(r,function(){q.get(h)})}else if(r.status===404){r={};q._cache.set(h,r);delete q._currentPromises[h];l.resolve(r)}else{delete q._currentPromises[h];l.resolve(q._cache.get(h,
true)||{})}})}return l},put:function(h,k){var l=new b.Deferred;this._cache.set(h,k);var m=this;this._service.put(h,k).then(function(){l.resolve()},function(q){q.status===401?a.handleAuthenticationError(q,function(){m._service.put(h,k).then(function(){l.resolve()},function(){l.resolve()})}):l.resolve()});return l}};g.prototype={get:function(h,k){if(this._currentPromise)return this._currentPromise;var l=new b.Deferred,m=null;if(k)this._cache.remove(h);else m=this._cache.get(h);if(m!==null)l.resolve(m);
else{this._currentPromise=l;var q=this;b.xhrGet({url:this._location,headers:{"Orion-Version":"1"},handleAs:"json",timeout:15E3,load:function(r){q._cache.set(h,r[h]||{});q._currentPromise=null;l.resolve(r[h]||{})},error:function(r,n){if(n.xhr.status===401){q._currentPromise=null;l.resolve({});l=new b.Deferred;q._currentPromise=l;var o=this;a.handleAuthenticationError(n.xhr,function(){b.xhrGet(o)})}else if(n.xhr.status===404){q._cache.set(h,{});q._currentPromise=null;l.resolve({})}else{q._currentPromise=
null;r=q._cache.get(h,true);r!==null?l.resolve(r[h]||{}):l.resolve({})}}})}return l},put:function(){var h=new b.Deferred;h.resolve();return h}};i.prototype={get:function(h){var k=new b.Deferred;h=this._cache.get(h);h!==null?k.resolve(h):k.resolve({});return k},put:function(h,k){var l=new b.Deferred;this._cache.set(h,k);l.resolve();return l}};j.DEFAULT_SCOPE=1;j.LOCAL_SCOPE=2;j.USER_SCOPE=4;j.prototype={getPreferences:function(h,k){if(!k||typeof k!=="number"||k>7||k<1)k=j.DEFAULT_SCOPE|j.LOCAL_SCOPE|
j.USER_SCOPE;var l=[];j.USER_SCOPE&k&&this._userProvider.available()&&l.push(this._userProvider);j.LOCAL_SCOPE&k&&l.push(this._localProvider);j.DEFAULT_SCOPE&k&&l.push(this._defaultsProvider);var m=new d(h,l);return m.sync().then(function(){return m})}};return{PreferencesService:j}});
define("orion/pluginregistry",["dojo","orion/serviceregistry","dojo/DeferredList"],function(c,b){var a=a||{};a.Plugin=function(d,e,f){function g(s,t,v,w){if(!l)throw new Error("plugin not connected");var y=n++;o[String(y)]=w;f.postMessage({id:y,serviceId:s,method:t,params:v},l)}function i(s){var t={};if(s.methods)for(var v=0;v<s.methods.length;v++){var w=s.methods[v];t[w]=function(y){return function(){var C=Array.prototype.slice.call(arguments),D=new c.Deferred;k._load().then(function(){g(s.serviceId,
y,C,D)});return D.promise}}(w)}return t}function j(){var s=e.services;if(s)for(var t=0;t<s.length;t++){var v=s[t],w=i(v);p[v.serviceId]=f.registerService(v.type,w,v.properties)}}function h(s){try{if(s.method)if("plugin"===s.method){if(e){if(JSON.stringify(e)!==JSON.stringify(s.params[0])){for(var t in p)if(p.hasOwnProperty(t)){p[t].unregister();delete p[t]}e=s.params[0];j();f.updatePlugin(k)}}else{e=s.params[0];j()}if(!r){r=true;m.resolve(k)}if(q){q.resolve(k);q=null}}else if("dispatchEvent"===s.method){var v=
p[s.serviceId];v.dispatchEvent.apply(v,s.params)}else if("progress"===s.method){var w=o[String(s.requestId)];w.progress.apply(w,s.params)}else throw new Error("Bad response method: "+s.method);else{w=o[String(s.id)];delete o[String(s.id)];s.error?w.reject(s.error):w.resolve(s.result)}}catch(y){console.log(y)}}var k=this,l=null,m=new c.Deferred,q=null,r=false,n=0,o={},p={};this.getLocation=function(){return d};this.getData=function(){return e};this.uninstall=function(){for(var s in p)if(p.hasOwnProperty(s)){p[s].unregister();
delete p[s]}if(l){f.disconnect(l);l=null}f.uninstallPlugin(this)};this.getServiceReferences=function(){var s=[],t;for(t in p)p.hasOwnProperty(t)&&s.push(p[t].getServiceReference());return s};this.update=function(){if(!r)return this._load();var s;if(q===null){s=q=new c.Deferred;f.disconnect(l);l=f.connect(d,h);setTimeout(function(){q===s&&q.reject(new Error("Load timeout for plugin: "+d))},15E3)}return q};this._load=function(s){if(!l){l=f.connect(d,h);setTimeout(function(){if(!r){if(!s){e={};f.updatePlugin(k)}m.reject(new Error("Load timeout for plugin: "+
d))}},15E3)}return m.promise};if(typeof d!=="string")throw new Error("invalid url:"+d);e&&j()};a.PluginRegistry=function(d,e,f){function g(n){if(n.indexOf("://")===-1){var o=document.createElement("a");o.href=n;return o.href}return n}function i(n){delete k["plugin."+n.getLocation()]}function j(n){n.getData()._expires=(new Date).getTime()+36E5;k["plugin."+n.getLocation()]=JSON.stringify(n.getData())}function h(n){n=g(n);for(var o=0,p=l.length;o<p;o++){var s=l[o];if(n===s.getLocation())return s}return null}
var k=e||localStorage||{},l=[],m=[],q=new b.EventTarget;addEventListener("message",function(n){for(var o=0,p=n.source;o<m.length;o++)if(p===m[o].target){if(typeof m[o].useStructuredClone==="undefined")m[o].useStructuredClone=typeof n.data!=="string";m[o].handler(m[o].useStructuredClone?n.data:JSON.parse(n.data));break}},false);var r={registerService:c.hitch(d,d.registerService),connect:function(n,o){var p=document.createElement("iframe");p.id=n;p.name=n;if(!f){p.style.display="none";p.style.visibility=
"hidden"}p.src=n;document.body.appendChild(p);n={iframe:p,target:p.contentWindow,handler:o,url:n};m.push(n);return n},disconnect:function(n){for(var o=0;o<m.length;o++)if(n===m[o]){m.splice(o,1);try{document.body.removeChild(n.iframe)}catch(p){}break}},uninstallPlugin:function(n){i(n);for(var o=0;o<l.length;o++)if(n===l[o]){l.splice(o,1);q.dispatchEvent("pluginRemoved",n);break}},updatePlugin:function(n){j(n);q.dispatchEvent("pluginUpdated",n)},postMessage:function(n,o){o.target.postMessage(o.useStructuredClone?
n:JSON.stringify(n),o.url)}};this.startup=function(n){for(var o=[],p=0;p<n.length;++p){var s=n[p];s=g(s);var t="plugin."+s,v=k[t]?JSON.parse(k[t]):null;if(v&&v._expires&&v._expires>(new Date).getTime()){if(h(s)===null){delete v._expires;l.push(new a.Plugin(s,v,r))}}else{k[t]="{}";s=new a.Plugin(s,{},r);l.push(s);o.push(s._load(false))}}return new c.DeferredList(o)};this.shutdown=function(){for(var n=0;n<m.length;n++)try{document.body.removeChild(m[n].iframe)}catch(o){}};this.installPlugin=function(n,
o){n=g(n);var p=new c.Deferred,s=h(n);if(s)if(s.getData())p.resolve(s);else{var t=function(v){if(v.getLocation()===n){p.resolve(v);q.removeEventListener("pluginAdded",t)}};q.addEventListener("pluginAdded",t)}else{s=new a.Plugin(n,o,r);l.push(s);if(s.getData()){j(s);q.dispatchEvent("pluginAdded",s);p.resolve(s)}else s._load(true).then(function(){j(s);q.dispatchEvent("pluginAdded",s);p.resolve(s)},function(v){p.reject(v)})}return p.promise};this.getPlugins=function(){for(var n=[],o=0;o<l.length;o++)l[o].getData()&&
n.push(l[o]);return n};this.getPlugin=function(n){if((n=h(n))&&n.getData())return n;return null};this.addEventListener=function(n,o){q.addEventListener(n,o)};this.removeEventListener=function(n,o){q.removeEventListener(n,o)}};return a});
define("orion/bootstrap",["require","dojo","orion/serviceregistry","orion/preferences","orion/pluginregistry"],function(c,b,a,d,e){function f(){var g=new a.ServiceRegistry,i=new d.PreferencesService(g),j=new e.PluginRegistry(g);return i.getPreferences("/plugins").then(function(h){h=h.keys();for(var k=0;k<h.length;++k)if(h[k].indexOf("://")===-1)h[k]=c.toUrl(h[k]);return j.startup(h)}).then(function(){if(g.getServiceReferences("orion.core.preference.provider").length>0)return i.getPreferences("/plugins",
i.USER_SCOPE).then(function(h){h=h.keys();for(var k=0;k<h.length;++k)if(h[k].indexOf("://")===-1)h[k]=c.toUrl(h[k]);return j.startup(h)})}).then(function(){b.addOnWindowUnload(function(){j.shutdown()})}).then(function(){return{serviceRegistry:g,preferences:i,pluginRegistry:j}})}return{startup:f}});
define("orion/status",["require","dojo","orion/util"],function(c,b,a){function d(e,f,g,i,j){this._serviceRegistry=e;this._serviceRegistration=e.registerService("orion.page.message",this);this._operationsClient=f;this.notificationContainerDomId=j;this.domId=g;this.progressDomId=i||g;this._hookedClose=false}d.prototype={_init:function(){var e=b.byId("closeNotifications");if(e&&!this._hookedClose){b.connect(e,"onclick",this,function(){this.setProgressMessage("");b.removeClass(this.notificationContainerDomId,
"slideContainerActive")});b.connect(e,"onkeypress",this,function(f){if(f.keyCode===b.keys.ENTER||f.keyCode===b.keys.SPACE){this.setProgressMessage("");b.removeClass(this.notificationContainerDomId,"slideContainerActive")}})}},setMessage:function(e,f){this._init();b.place(window.document.createTextNode(e),this.domId,"only");if(typeof f==="number"){var g=this;window.setTimeout(function(){var i=b.byId(g.domId);(typeof i.textContent==="string"?i.textContent:i.innerText)===e&&b.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 i="red";if(f.Severity)switch(f.Severity){case "Warning":i="#FFCC00";break;case "Error":i="red";break;case "Info":case "Ok":i="green";break}f=b.create("span",{style:{color:i}});b.place(window.document.createTextNode(e),f);b.place(f,this.domId,"only")},setProgressMessage:function(e){this._init();var f=b.create("span",{"class":"imageSprite core-sprite-progress"});
b.place(f,this.progressDomId,"only");b.place(window.document.createTextNode(e),this.progressDomId,"last");b.addClass(this.notificationContainerDomId,"progressNormal");e.length>0?b.addClass(this.notificationContainerDomId,"slideContainerActive"):b.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,i="imageSprite core-sprite-info",
j="progressInfo",h="progressWarning progressError progressNormal";if(e.Severity)switch(e.Severity){case "Warning":i="imageSprite core-sprite-warning";j="progressWarning";h="progressInfo progressError progressNormal";break;case "Error":i="imageSprite core-sprite-error";j="progressError";h="progressWarning progressInfo progressNormal";break}i=b.create("span",{"class":i});b.place(i,this.progressDomId,"only");if(e.HTML)b.place(g,this.progressDomId,"last");else{b.place(window.document.createTextNode("   "+
g),this.progressDomId,"last");if(j&&this.progressDomId!==this.domId){b.addClass(this.notificationContainerDomId,j);b.removeClass(this.notificationContainerDomId,h)}}b.addClass(this.notificationContainerDomId,"slideContainerActive");a.forceLayout(this.notificationContainerDomId)},showWhile:function(e,f){var g=this;g.setProgressMessage(f);return e.then(function(i){if(i&&i.Location&&i.Message&&i.Running)return b.hitch(g,g._doProgressWhile)(i);g.setProgressMessage("");i&&i.Result&&g.setProgressResult(i.Result);
return i})},_doProgressWhile:function(e){var f=new b.Deferred,g=this;window.setTimeout(function(){g._operationsClient.getOperation(e.Location).then(function(i){f.callback(i)})},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(c,b,a){b.declare("orion.widgets.OperationsDialog",[a.TooltipDialog],{widgetsInTemplate:true,closable:true,templateString:b.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=c.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,i){return parseInt(i.Modified)-parseInt(g.Modified)});this._myOperations.sort(function(g,i){return parseInt(i.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){b.empty(d);for(var f=0;f<e.length;f++){var g=e[f],i=b.create("tr"),
j=b.create("td",{style:"padding-left: 5px; padding-right: 5px",innerHTML:g.Name},i);j=b.create("div",null,j,"only");link=b.create("span",{innerHTML:g.Name,className:"primaryColumn"},j,"last");b.place(document.createTextNode(g.Name),link,"only");var h=b.create("span",null,j,"first");b.addClass(h,"imageSprite");var k=this.parseProgressResult(g.Result);switch(k.Severity){case "Warning":b.addClass(h,"core-sprite-warning");break;case "Error":b.addClass(h,"core-sprite-error");break;default:if(g.Running===
true)b.addClass(h,"core-sprite-start");else if(g.Canceled===true)b.addClass(h,"core-sprite-stop");else g.Failed===true?b.addClass(h,"core-sprite-error"):b.addClass(h,"core-sprite-ok")}if(k.Message||g.Message){g=k.Message||g.Message;if(k.DetailedMessage&&k.DetailedMessage!=="")g+=": "+k.DetailedMessage;b.create("br",null,j,"last");b.create("span",{className:"secondaryColumn",style:"margin-left: 18px;",innerHTML:g},j,"last")}b.place(i,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(c,b,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=b.byId(e);this._operationsDialog=new orion.widgets.OperationsDialog;
b.connect(this._progressPane,"onclick",b.hitch(this,this._openOperationsPopup));var f=this;if(new Date-this.getLastListUpdate()>3E5)this._operationsClient.getRunningOperations().then(function(g){b.hitch(f,f._loadOperationsList)(g);window.setTimeout(function(){b.hitch(f,f._checkOperationsChanges())},5E3)},function(g){console.error(g)});else{b.hitch(f,f._generateOperationsInfo(JSON.parse(localStorage.getItem("orionOperations")||'{"Children": []}')));window.setTimeout(function(){b.hitch(f,f._checkOperationsChanges())},
5E3)}window.addEventListener("storage",function(g){a.getAuthenticationIds().indexOf(g.key)>=0&&f._operationsClient.getRunningOperations().then(function(i){b.hitch(f,f._loadOperationsList)(i)},function(i){console.error(i)})},false);window.addEventListener("storage",function(g){if(g.key==="orionOperations")b.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=[],i=[],j=0;j<f.Children.length;j++){var h=f.Children[j];if(h.Running==true&&new Date-new Date(h.lastClientDate?h.lastClientDate:0)>5E3){var k=this._operationsClient.getOperation(h.Location);i.push(k);b.hitch(this,function(l){k.then(function(m){m.lastClientDate=new Date;b.hitch(e,e.writeOperation)(m)},function(m,q){if(m.status==404){g.push(l);return m}b.hitch(e,e._markOperationAsFailed(f.Children[l],m,q))})})(j)}if(!h.Running&&
new Date-new Date(h.lastClientDate?h.lastClientDate:0)>3E5)g.push(j)}(new b.DeferredList(i)).addBoth(function(){if(g.length>0){f.lastClientDate=new Date;for(var l=g.length-1;l>=0;l--)f.Children.splice(g[l],1);localStorage.setItem("orionOperations",JSON.stringify(f));b.hitch(e,e._generateOperationsInfo)(f)}window.setTimeout(function(){b.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&&b.removeClass(this._progressPane,this._lastIconClass);this._lastIconClass=e;b.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 i=e.Children[g];if(this._myOperations[i.Id])if(i.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 i=f?f:new b.Deferred;this.writeOperation(e);var j=this;if(e&&e.Location&&e.Running==true)window.setTimeout(function(){j._operationsClient.getOperation(e.Location).then(function(h){b.hitch(j,j.followOperation(h,i,e.Location))},function(h,k){b.hitch(j,
j.setProgressResult)({Severity:"Error",Message:h});b.hitch(j,j._markOperationAsFailed(e,h,k));i.errback(h,k)})},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};i.callback(e);setTimeout(function(){j._myOperations[e.Id]&&b.hitch(j,j._openOperationsPopup)()},10)}else i.callback(e);!e.Failed&&e.Idempotent==
true&&window.setTimeout(function(){b.hitch(j,j.removeOperation)(g,e.Id)},5E3)}return i},removeOperation:function(e,f){that=this;if(f){if(this._lastOperation!=null&&this._lastOperation.Id===f)this._lastOperation=null;delete this._myOperations[f]}b.hitch(that._operationsClient,that._operationsClient.removeOperation)(e).then(function(){b.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 i=f.Children[g];if(i.Id&&i.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(i){if(i&&i.Location&&i.Message&&i.Running)return b.hitch(g,g.followOperation)(i,null,i.Location);g._serviceRegistry.getService("orion.page.message").setProgressMessage("");
return i},function(i){b.hitch(g,g.setProgressResult)(i);return i})},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 i=f.Children[g];if(i.Id&&i.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 c(b){this._serviceRegistry=b;this._serviceRegistration=b.registerService("orion.page.dialog",this)}c.prototype={confirm:function(b,a){a(window.confirm(b))},openFiles:function(){}};c.prototype.constructor=c;return{DialogService:c}});
define("orion/selection",["dojo"],function(c){function b(a){this._serviceRegistry=a;this._serviceRegistration=a.registerService("orion.page.selection",this);this._selections=[]}b.prototype={getSelection:function(a){a(this._getSingleSelection())},getSelections:function(a){a(this._selections)},_getSingleSelection:function(){if(this._selections&&this._selections.length>0)return this._selections[0];return null},setSelections:function(a){this._selections=c.isArray(a)?a:a?[a]:null;this._serviceRegistration.dispatchEvent("selectionChanged",
this._getSingleSelection(),this._selections)}};b.prototype.constructor=b;return{Selection:b}});
define("orion/fileClient",["dojo","orion/auth","dojo/DeferredList"],function(c,b){function a(f,g,i){if(!f[g])throw g+" is not supportted in this file system";var j=new c.Deferred;f[g].apply(f,i).then(function(h){j.callback(h)},function(h){h.status===401?b.handleAuthenticationError(h,function(){f[g].apply(f,i).then(function(k){j.callback(k)},function(k){j.errback(k)})}):j.errback(h)});return j}function d(f,g,i,j){if(!f.readBlob)throw"source file service does not support binary read";if(!i.writeBlob)throw"target file service does not support binary write";
if(g[g.length-1]!=="/")return a(f,"readBlob",[g]).then(function(l){return a(i,"writeBlob",[j,l])});var h=j.substring(0,j.length-1),k=decodeURIComponent(h.substring(h.lastIndexOf("/")+1));h=h.substring(0,h.lastIndexOf("/")+1);return a(i,"createFolder",[h,k]).then(function(){},function(){}).then(function(){if(g.indexOf("/")===0)g+="?depth=1";return a(f,"fetchChildren",[g]).then(function(l){for(var m=[],q=0;q<l.length;++q){var r=l[q].Location,n=r;if(l[q].Directory)n=r.substring(0,r.length-1);n=decodeURIComponent(n.substring(n.lastIndexOf("/")+
1));n=j+encodeURIComponent(n);if(l[q].Directory)n+="/";m[q]=d(f,r,i,n)}return new c.DeferredList(m)})})}function e(f,g){function i(o){var p=new c.Deferred;p.reject("No Matching FileService for location:"+o);return p}var j=f.getServiceReferences("orion.core.file"),h=j;if(g){h=[];for(var k=0;k<j.length;++k)g(j[k])&&h.push(j[k])}var l=[],m=[],q=[],r=[],n={fetchChildren:function(){var o=new c.Deferred;o.resolve(r);return o},createWorkspace:function(){var o=new c.Deferred;o.reject("no file service");return o},
loadWorkspaces:function(){var o=new c.Deferred;o.reject("no file service");return o},loadWorkspace:function(){var o=new c.Deferred;window.setTimeout(function(){o.resolve({Directory:true,Length:0,LocalTimeStamp:0,Name:"File Servers",Location:"/",Children:r,ChildrenLocation:"/"})},100);return o},search:i,createProject:i,createFolder:i,createFile:i,deleteFile:i,moveFile:i,copyFile:i,read:i,write:i};for(g=0;g<h.length;++g){r[g]={Directory:true,Length:0,LocalTimeStamp:0,Location:h[g].getProperty("top"),
ChildrenLocation:h[g].getProperty("top"),Name:h[g].getProperty("Name")};j=h[g].getProperty("pattern")||".*";if(j[0]!=="^")j="^"+j;l[g]=new RegExp(j);m[g]=f.getService(h[g]);q[g]=h[g].getProperty("Name")}this._getServiceIndex=function(o){if(o==="/")return-1;else if(!o||o.length&&o.length===0)return 0;for(var p=0;p<l.length;++p)if(l[p].test(o))return p;throw"No Matching FileService for location:"+o;};this._getService=function(o){o=this._getServiceIndex(o);return o===-1?n:m[o]};this._getServiceName=
function(o){o=this._getServiceIndex(o);return o===-1?n.Name:q[o]}}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,i){var j=this._getService(f),h=this._getService(g);if(j===h)return a(j,"moveFile",arguments);var k=f[f.length-1]==="/",l=g;if(l[l.length-1]!=="/")l+="/";if(i)l+=encodeURIComponent(i);else{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(j,f,h,l).then(function(){return a(j,"deleteFile",[f])})},copyFile:function(f,g){var i=this._getService(f),j=this._getService(g);if(i===j)return a(i,"copyFile",arguments);var h=f[f.length-1]==="/",k=g;if(k[k.length-1]!=="/")k+="/";var l=f;if(h)l=l.substring(0,l.length-1);k+=l.substring(l.lastIndexOf("/")+1);if(h&&k[k.length-1]!=="/")k+="/";return d(i,f,j,k)},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(c,b){function a(k,l,m){var q=new c.Deferred;k[l].apply(k,m).then(function(r){q.callback(r)},function(r){r.status===401?b.handleAuthenticationError(r,function(){k[l].apply(k,m).then(function(n){q.callback(n)},function(n){q.errback(n)})}):q.errback(r)});return q}function d(k,l){return a(k,"getOperations",[l])}function e(k){this._location=k}function f(){var k=new c.Deferred;k.errback("No Matching OperationService for location:"+
this._location);return k}function g(k){this._services=[];this._patterns=[];this._operationListeners=[];this._currentLongpollingIds=[];for(var l=k.getServiceReferences("orion.core.operation"),m=0;m<l.length;m++){var q=k.getService(l[m]);this._services[m]=q;q=l[m].getProperty("pattern")||".*";if(q[0]!=="^")q="^"+q;this._patterns[m]=new RegExp(q)}this._getService=function(r){if(!r)return this._services[0];for(var n=0;n<this._patterns.length;++n)if(this._patterns[n].test(r))return this._services[n];return new e(r)}}
function i(k){if(k.length===1){if(k[0][0])return k[0][1];console.error(k[0][1]);return{Children:[]}}for(var l={Children:[]},m=0;m<k.length;m++)if(k[m][0]){if(k[m][1]&&k[m][1].Children)l.Children=l.Children.concat(k[m][1].Children)}else console.error(k[m][1]);return l}function j(k,l,m){var q=this,r={Longpolling:true};if(m)r.LongpollingId=m;a(k,"getOperations",[r]).then(function(n){if(!(m&&q._currentLongpollingIds.indexOf(m)<0)){l(n,m);if(n.LongpollingId){q._currentLongpollingIds.push(n.LongpollingId);
c.hitch(q,j)(k,l,n.LongpollingId)}else c.hitch(q,j)(k,l,m)}},function(n){m&&q._currentLongpollingIds.indexOf(m)<0||("timeout"===n.dojoType?c.hitch(q,j)(k,l,m):setTimeout(function(){c.hitch(q,j)(k,l,m)},2E3))})}function h(k){for(var l=0;l<this._operationListeners.length;l++)this._operationListeners[l](k)}e.prototype={getOperation:f,getOperations:f,removeCompletedOperations:f,removeOperation:f,cancelOperation:f};e.prototype.constructor=e;g.prototype={getOperations:function(){var k=new c.Deferred,l=
[];if(this._services.length<1){k.errback("No operations services registered.");return k}for(var m=0;m<this._services.length;m++)l[m]=d(this._services[m]);(new c.DeferredList(l)).then(function(q){k.resolve(i(q))});return k},getRunningOperations:function(){var k=new c.Deferred,l=[];if(this._services.length<1){k.errback("No operations services registered.");return k}for(var m=0;m<this._services.length;m++)l[m]=d(this._services[m],{RunningOnly:true});(new c.DeferredList(l)).then(function(q){k.resolve(i(q))});
return k},getOperation:function(k){return a(this._getService(k),"getOperation",arguments)},removeCompletedOperations:function(){var k=[];if(this._services.length<1){result.errback("No operations services registered.");return result}for(var l=0;l<this._services.length;l++)k[l]=a(this._services[l],"removeCompletedOperations");return new c.DeferredList(k)},removeOperation:function(k){return a(this._getService(k),"removeOperation",arguments)},cancelOperation:function(k){return a(this._getService(k),"cancelOperation",
arguments)},addOperationChangeListener:function(k){this._operationListeners.push(k);if(this._operationListeners.length===1){if(this._services.length<1)throw"No operations services registered.";for(k=0;k<this._services.length;k++)c.hitch(this,j)(this._services[k],c.hitch(this,h))}},removeOperationChangeListener:function(k){for(var l=0;l<this._operationListeners.length;l++)if(this._operationListeners[l]===k){this._operationListeners.splice(l,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 k=0;k<this._services.length;k++)c.hitch(this,j)(this._services[k],c.hitch(this,h))}};g.prototype.constructor=g;return{OperationsClient:g}});
define("orion/searchUtils",["require","dojo","orion/editor/regex"],function(c,b,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 i=f[g].indexOf("q="),j=f[g].indexOf("replace=");if(i>=0)d.searchUtils.parseLocationAndSearchStr(f[g].substring(i+2),e);else if(j>=0)e.replace=f[g].substring(j+8);
else{i=f[g].split("=");if(i.length===2)if(i[0]==="rows")e.rows=parseInt(i[1]);else if(i[0]==="start")e.start=parseInt(i[1]);else if(i[0]==="sort")e.sort=i[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 c.toUrl("search/search.html")+"#"+d.searchUtils.generateSearchQuery(e)};d.searchUtils.generateSearchQuery=function(e){var f=
"Path asc",g=40,i=0,j="",h="",k="";if(e){if(e.sort)f=e.sort;if(e.rows)g=e.rows;if(e.start)i=e.start;if(e.searchStr){j=e.searchStr;j=j.split(" ").join("")}if(e.location){h=e.location;if(h.length>0&&h[h.length-1]!=="*")h+="*";if(h!=="")h="+Location:"+h}if(e.replace!==null&&e.replace!==undefined)k="&replace="+e.replace}return"?sort="+f+"&rows="+g+"&start="+i+"&q="+j+h+k};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,i=e.indexOf("?")>-1;if(g)e=e.split("*").join(".*");if(i)e=e.split("?").join(".");if(!g&&!i){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 i;i=0;for(var j=false,h=[];;){i=f.indexOf(e.searchStr,i);
if(i<0)break;else{h.push({startIndex:i});j=true;if(g)break;i=i+e.searchStrLength}}if(j)return h;return null};d.searchUtils.findRegExp=function(e,f,g,i){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(i)))&&{startIndex:j.index+i,length:j[0].length}};d.searchUtils.searchOnelineRegEx=function(e,f,g){for(var i=0,j=false,h=[];;)if(i=d.searchUtils.findRegExp(f,e.regExp.pattern,e.regExp.flags,i)){h.push(i);j=true;
if(g)break;i=i.startIndex+i.length}else break;if(j)return h;return null};d.searchUtils.generateNewContents=function(e,f,g,i,j){if(g&&e){var h;h=f.length>0?true:false;for(var k=0;k<e.length;k++){for(var l=e[k],m=false,q=false,r=[],n,o=0,p=0;p<g.children.length;p++)if(g.children[p].lineNumber-1===k){o=p;for(m=0;m<g.children[p].matches.length;m++)g.children[p+m].checked!==false&&r.push(m);q=r.length>0;n=g.children[p].matches;m=true;break}if(m){if(q){r=d.searchUtils.replaceCheckedMatches(l,i,n,r,j);l=
r.replacedStr;for(m=0;m<g.children[o].matches.length;m++)g.children[o+m].newMatches=r.newMatches}else{l=l;for(m=0;m<g.children[o].matches.length;m++)g.children[o+m].newMatches=g.children[o+m].matches}if(h)f[k]=l;else f.push(l)}else h||f.push(l)}}};d.searchUtils.generateMatchContext=function(e,f,g){var i=[],j=e*2+1,h;if(f.length<=j){h=0;e=f.length-1}else{h=g-e;if(h<0){h=0;e=h+j-1}else{e=g+e;if(e>f.length-1){e=f.length-1;h=e-j+1}}}for(j=h;j<=e;j++)i.push({context:f[j],current:j===g});return i};d.searchUtils.searchWithinFile=
function(e,f,g,i,j){g=g.split(i);if(j)f.contents=g;if(f){f.children=[];for(var h=i=0;h<g.length;h++){var k=g[h];if(k&&k.length>0){var l=k.toLowerCase();if(l=e.wildCard?d.searchUtils.searchOnelineRegEx(e,l):d.searchUtils.searchOnelineLiteral(e,l)){var m=h+1;if(j)for(var q=0;q<l.length;q++){var r=q+1;r={parent:f,checked:f.checked,type:"detail",matches:l,lineNumber:m,matchNumber:r,name:k,location:f.location+"-"+m+"-"+r};f.children.push(r)}else{r={parent:f,context:d.searchUtils.generateMatchContext(2,
g,h),checked:f.checked,type:"detail",matches:l,lineNumber:m,name:k,linkLocation:f.linkLocation+",line="+m,location:f.location+"-"+m};f.children.push(r)}i+=l.length}}}f.totalMatches=i}};d.searchUtils.replaceCheckedMatches=function(e,f,g,i,j){j=j;for(var h=0,k="",l=[],m=0;m<g.length;m++){if(h!==g[m].startIndex)k+=e.substring(h,g[m].startIndex);if(g[m].length)j=g[m].length;h=false;for(var q=0;q<i.length;q++)if(i[q]===m){h=true;break}if(h){l.push({startIndex:k.length,length:f.length});k+=f}else{l.push({startIndex:k.length,
length:j});k+=e.substring(g[m].startIndex,g[m].startIndex+j)}h=g[m].startIndex+j}if(h<e.length-1)k+=e.substring(h);return{replacedStr:k,newMatches:l}};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(c,b){c.declare("dijit.layout.BorderContainer",b.layout._LayoutWidget,{design:"headline",gutters:true,liveSplitters:true,persist:false,baseClass:"dijitBorderContainer",_splitterClass:"dijit.layout._Splitter",postMixInProperties:function(){this.gutters||(this.baseClass+="NoGutter");this.inherited(arguments)},startup:function(){if(!this._started){c.forEach(this.getChildren(),
this._setupChild,this);this.inherited(arguments)}},_setupChild:function(a){var d=a.region;if(d){this.inherited(arguments);c.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=c.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;c.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();c.removeClass(a.domNode,this.baseClass+"Pane");c.style(a.domNode,{top:"auto",bottom:"auto",left:"auto",right:"auto",position:"static"});
c.style(a.domNode,d=="top"||d=="bottom"?"width":"height","auto")},getChildren:function(){return c.filter(this.inherited(arguments),function(a){return!a.isSplitter})},getSplitter:function(a){return c.filter(this.getChildren(),function(d){return d.region==a})[0]._splitterWidget},resize:function(){if(!this.cs||!this.pe){var a=this.domNode;this.cs=c.getComputedStyle(a);this.pe=c._getPadExtents(a,this.cs);this.pe.r=c._toPixelValue(a,this.cs.paddingRight);this.pe.b=c._toPixelValue(a,this.cs.paddingBottom);
c.style(a,"padding","0px")}this.inherited(arguments)},_layoutChildren:function(a,d){if(this._borderBox&&this._borderBox.h){var e=c.map(this.getChildren(),function(g,i){return{pane:g,weight:[g.region=="center"?Infinity:0,g.layoutPriority,(this.design=="sidebar"?1:-1)*(/top|bottom/.test(g.region)?1:-1),i]}},this);e.sort(function(g,i){g=g.weight;i=i.weight;for(var j=0;j<g.length;j++)if(g[j]!=i[j])return g[j]-i[j];return 0});var f=[];c.forEach(e,function(g){g=g.pane;f.push(g);g._splitterWidget&&f.push(g._splitterWidget)});
b.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(){c.forEach(this.getChildren(),function(a){var d=a._splitterWidget;d&&d.destroy();delete a._splitterWidget});this.inherited(arguments)}});c.extend(b._Widget,{region:"",layoutPriority:0,splitter:false,minSize:0,maxSize:Infinity});c.declare("dijit.layout._Splitter",[b._Widget,b._Templated],{live:true,templateString:'<div class="dijitSplitter" dojoAttachEvent="onkeypress:_onKeyPress,onmousedown:_startDrag,onmouseenter:_onMouse,onmouseleave:_onMouse" tabIndex="0" role="separator"><div class="dijitSplitterThumb"></div></div>',
postMixInProperties:function(){this.inherited(arguments);this.horizontal=/top|bottom/.test(this.region);this._factor=/top|left/.test(this.region)?1:-1;this._cookieName=this.container.id+"_"+this.region},buildRendering:function(){this.inherited(arguments);c.addClass(this.domNode,"dijitSplitter"+(this.horizontal?"H":"V"));if(this.container.persist){var a=c.cookie(this._cookieName);if(a)this.child.domNode.style[this.horizontal?"height":"width"]=a}},_computeMaxSize:function(){var a=this.horizontal?"h":
"w",d=c.marginBox(this.child.domNode)[a],e=c.filter(this.container.getChildren(),function(f){return f.region=="center"})[0];a=c.marginBox(e.domNode)[a];return Math.min(this.child.maxSize,d+a)},_startDrag:function(a){if(!this.cover){this.cover=c.doc.createElement("div");c.addClass(this.cover,"dijitSplitterCover");c.place(this.cover,this.child.domNode,"after")}c.addClass(this.cover,"dijitSplitterCoverActive");this.fake&&c.destroy(this.fake);if(!(this._resize=this.live)){(this.fake=this.domNode.cloneNode(true)).removeAttribute("id");
c.addClass(this.domNode,"dijitSplitterShadow");c.place(this.fake,this.domNode,"after")}c.addClass(this.domNode,"dijitSplitterActive dijitSplitter"+(this.horizontal?"H":"V")+"Active");if(this.fake)c.removeClass(this.fake,"dijitSplitterHover dijitSplitter"+(this.horizontal?"H":"V")+"Hover");var d=this._factor,e=this.horizontal,f=e?"pageY":"pageX",g=a[f],i=this.domNode.style;e=e?"h":"w";var j=c.marginBox(this.child.domNode)[e],h=this._computeMaxSize(),k=this.child.minSize||20;e=this.region;var l=e==
"top"||e=="bottom"?"top":"left",m=parseInt(i[l],10),q=this._resize,r=c.hitch(this.container,"_layoutChildren",this.child.id);e=c.doc;this._handlers=(this._handlers||[]).concat([c.connect(e,"onmousemove",this._drag=function(n,o){n=n[f]-g;var p=d*n+j,s=Math.max(Math.min(p,h),k);if(q||o)r(s);i[l]=n+m+d*(s-p)+"px"}),c.connect(e,"ondragstart",c.stopEvent),c.connect(c.body(),"onselectstart",c.stopEvent),c.connect(e,"onmouseup",this,"_stopDrag")]);c.stopEvent(a)},_onMouse:function(a){a=a.type=="mouseover"||
a.type=="mouseenter";c.toggleClass(this.domNode,"dijitSplitterHover",a);c.toggleClass(this.domNode,"dijitSplitter"+(this.horizontal?"H":"V")+"Hover",a)},_stopDrag:function(a){try{this.cover&&c.removeClass(this.cover,"dijitSplitterCoverActive");this.fake&&c.destroy(this.fake);c.removeClass(this.domNode,"dijitSplitterActive dijitSplitter"+(this.horizontal?"H":"V")+"Active dijitSplitterShadow");this._drag(a);this._drag(a,true)}finally{this._cleanupHandlers();delete this._drag}if(this.container.persist)c.cookie(this._cookieName,
this.child.domNode.style[this.horizontal?"height":"width"],{expires:365})},_cleanupHandlers:function(){c.forEach(this._handlers,c.disconnect);delete this._handlers},_onKeyPress:function(a){this._resize=true;var d=this.horizontal,e=1,f=c.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=c._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));c.stopEvent(a)},destroy:function(){this._cleanupHandlers();delete this.child;delete this.container;delete this.cover;delete this.fake;this.inherited(arguments)}});c.declare("dijit.layout._Gutter",[b._Widget,b._Templated],{templateString:'<div class="dijitGutter" role="presentation"></div>',postMixInProperties:function(){this.inherited(arguments);this.horizontal=/top|bottom/.test(this.region)},buildRendering:function(){this.inherited(arguments);c.addClass(this.domNode,"dijitGutter"+
(this.horizontal?"H":"V"))}});return b.layout.BorderContainer});
define("orion/searchClient",["require","dojo","dijit","orion/auth","orion/util","orion/searchUtils","dijit/form/Button","dijit/layout/BorderContainer","dijit/layout/ContentPane"],function(c,b,a,d,e,f){function g(i){this.registry=i.serviceRegistry;this._commandService=i.commandService;(this._fileService=i.fileService)||console.error("No file service on search client")}g.prototype={search:function(i,j,h){j=f.parseQueryStr(i);try{this._fileService.search(j.location,i).then(function(l){var m=l.responseHeader.params.q;
m=m.substring(m.indexOf("}")+1);h(function(q){for(var r=[],n=0;n<q.response.docs.length;n++){var o=q.response.docs[n];r.push({name:o.Name,path:o.Location,folderName:f.path2FolderName(o.Path,o.Name),directory:o.Directory,lineNumber:o.LineNumber})}return r}(l),m)})}catch(k){this.registry.getService("orion.page.message").setErrorMessage(k)}},handleError:function(i,j){console.error(i);var h=document.createTextNode(i);b.place(h,j,"only");return i},setLocationByMetaData:function(i,j){var h="",k=null;if(j&&
i&&i.Parents&&i.Parents.length>0)k=j.index==="last"?i.Parents[i.Parents.length-1]:i.Parents[0];else if(i&&i.Directory&&i.Location&&i.Parents)k=i;if(k){this.setLocationByURL(k.Location);h=k.Name}else if(i)h=this._fileService.fileServiceName(i&&i.Location);if((i=b.byId("search"))&&i.placeholder)i.placeholder=h.length>23?"Search "+h.substring(0,20)+"...":"Search "+h;if(i&&i.title)i.title="Type a keyword or wild card to search in "+h},setLocationByURL:function(i){this.location=i},createSearchQuery:function(i,
j,h,k){h||(h="Path");h+=" asc";if(j){i=/\*$/.test(j)?"":"*";return f.generateSearchQuery({sort:h,rows:100,start:0,searchStr:"Name:"+this._luceneEscape(j,true)+i})}return f.generateSearchQuery({sort:h,rows:40,start:0,searchStr:this._luceneEscape(i,true),location:k?"":this.location})},_luceneEscape:function(i,j){var h="";j='+-&|!(){}[]^"~:\\'+(!j?"*?":"");for(var k=0;k<i.length;k++){var l=i.charAt(k);if(j.indexOf(l)>=0)h+="\\";h+=l}return h},defaultRenderer:{makeRenderFunction:function(i,j,h,k){function l(m,
q){var r=function(){function y(E,F){E.appendChild(document.createTextNode(" - "+(F.folderName?F.folderName:F.path)+" "))}function C(E,F){var I=F.name;if(D.hasOwnProperty(I)){y(E,F);var G=D[I];if(typeof G==="function"){D[I]=null;G()}}else D[I]=function(){y(E,F)}}var D={};return C}(),n=false;b.empty(i);if(m&&m.length>0){for(var o=document.createElement("table"),p=0;p<m.length;p++){var s=m[p],t;if(!n){n=true;if(j){t=o.insertRow(0).insertCell(0);t.innerHTML=j}}t=o.insertRow(-1).insertCell(0);t.colspan=
2;k&&k(t);var v=document.createElement("a");b.place(document.createTextNode(s.name),v);s.LineNumber&&b.place(document.createTextNode(" (Line "+s.LineNumber+")"),v);var w=s.location;if(s.isExternalResource)w=s.path;else{w=s.directory?c.toUrl("navigate/table.html")+"#"+s.path:c.toUrl("edit/edit.html")+"#"+s.path;if(w==="#")w=""}v.setAttribute("href",w);b.style(v,"verticalAlign","middle");t.appendChild(v);r(t,s)}b.place(o,i,"last");typeof h==="function"&&h(i)}if(!n)if(q){m=b.place("<div>No matches found for </div>",
i,"only");m=b.create("b",null,m,"last");b.place(document.createTextNode(q),m,"only");typeof h==="function"&&h(i)}}return l}}};g.prototype.constructor=g;return{Searcher:g}});
define("orion/treetable",["dojo"],function(c){function b(a){this._init(a)}b.prototype={_init:function(a){var d=a.parent,e=this;if(typeof d==="string")d=c.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){c.empty(this._parent);var e=document.createElement("table");e.id=this._id;this._tableStyle&&c.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 i=document.createElement("tr");i.id=this._treeModel.getId(a[g]);i._depth=d;i._item=a[g];this._renderer.render(a[g],i);c.style(i.childNodes[this._labelColumnIndex],"paddingLeft",this._indent*d+"px");c.place(i,e,f);if(f==="after")e=i}},_rowsChanged:function(){this._renderer.rowsChanged&&this._renderer.rowsChanged()},getSelected:function(){return this._renderer.getSelected()},
refresh:function(a,d,e,f,g,i){var j=this._treeModel.getId(a),h;if(j===this._id){this._removeChildRows(j);this._generateChildren(d,0,c.byId(j+"tbody"),"last");this._rowsChanged()}else{var k=c.byId(j);if(k){k._item=a;if(k&&(e||k._expanded)){k._expanded=true;this._removeChildRows(j);this._renderer.updateExpandVisuals(k,true);if(d){this._generateChildren(d,k._depth+1,k,"after");this._rowsChanged();if(f&&g){a=c.byId(f);c.addClass(a,g);i&&c.removeClass(a,i)}}else{h=this;d=this._treeModel.getChildren(k._item,
function(l){h._generateChildren(l,k._depth+1,k,"after");h._rowsChanged()})}}else this._renderer.updateExpandVisuals(k,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=c.byId(a);if(d)return d._item}if(a._item)return a._item;return a},toggle:function(a,d,e,f){var g=c.byId(a);if(g)if(g._expanded){this.collapse(a);if(d){a=c.byId(d);c.addClass(a,f);c.removeClass(a,e)}}else{this.expand(a);
if(d){a=c.byId(d);c.addClass(a,e);c.removeClass(a,f)}}},isExpanded:function(a){if(a=c.byId(a))return a._expanded;return false},expand:function(a,d,e){a=typeof a==="string"?a:this._treeModel.getId(a);var f=c.byId(a);if(f)if(!f._expanded){f._expanded=true;var g=this;this._renderer.updateExpandVisuals(f,true);this._treeModel.getChildren(f._item,function(i){g._generateChildren(i,f._depth+1,f,"after");g._rowsChanged();d&&d.apply(this,e)})}},_removeChildRows:function(a){c.byId(this._id);var d=a===this._id,
e=false,f=-1,g=[];c.query(".treeTableRow").forEach(function(h){if(!e)if(d)if(h._depth>f)g.push(h);else e=true;else if(h.id===a){d=true;f=h._depth}});for(var i in g){var j=g[i];j.parentNode.removeChild(j)}},collapse:function(a){a=typeof a==="string"?a:this._treeModel.getId(a);var d=c.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)}};b.prototype.constructor=b;return{TableTree:b}});
define("orion/explorer",["require","dojo","orion/treetable"],function(c,b,a){var d={};d.Explorer=function(){function e(f,g,i){this.registry=f;this.renderer=i;this.selection=g;this.myTree=null}e.prototype={changedItem:function(f,g){b.hitch(this.myTree,this.myTree.refreshAndExpand)(f,g)},updateCommands:function(f){this.myTree&&b.hitch(this.myTree._renderer,this.myTree._renderer.updateCommands(f))},makeNewItemPlaceHolder:function(f,g,i){f=this.getRow(f);if(i){f=f.childNodes[i];b.place("<br><span id='"+
g+"placeHolderRow'></span>",f,"last");if(i=b.byId(g+"placeHolderRow"))return{tempNode:i,refNode:i}}if(f){b.place("<tr id='"+g+"placeHolderRow'><td id='"+g+"placeHolderCol'></td>",f,"after");i=b.byId(g+"placeHolderRow");f=b.byId(g+"placeHolderCol");if(i&&f)return{tempNode:i,refNode:f}}return null},getRow:function(f){if(f=this.model.getId(f))return b.byId(f)},createTree:function(f,g,i){var j=f+"innerTree",h=b.byId(j);h&&b.destroy(h);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:i?i.indent:undefined,onCollapse:i?i.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(b.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(b.hitch(this,function(i){f.Children=i;g(i)})):g([])},getId:function(f){if(f.Location===this.root.Location)return this.rootId;f=f.Location.replace(/[\\\/]/g,"");for(var g="",i=0;i<f.length;i++)g+=f[i].match(/[^\.\:\-\_0-9A-Za-z]/g)?f.charCodeAt(i):f[i];return g}};return e}();d.ExplorerFlatModel=function(){function e(f,g,i){this.rootPath=f;this.fetchItems=
g;this.root=i}e.prototype=new d.ExplorerModel;e.prototype.getRoot=function(f){this.root?f(this.root):this.fetchItems(this.rootPath).then(b.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;b.empty(f);b.addClass(f,"treetable");this.renderTableHeader(f)},getActionsColumn:function(f,g,i,j){i=i||"tool";var h=this.explorer.registry.getService("orion.page.command"),k=document.createElement("td");k.id=g.id+"actionswrapper";j&&b.addClass(k,j);h.renderCommands(k,"object",f,this.explorer,i,false,null,"commandActiveItem","commandInactiveItem");return k},initCheckboxColumn:function(){if(this._useCheckboxSelection)return document.createElement("th")},
getCheckboxColumn:function(f,g){if(this._useCheckboxSelection){var i=document.createElement("td"),j=document.createElement("span");j.id=this.getCheckBoxId(g.id);b.addClass(j,"core-sprite-check selectionCheckmarkSprite");j.itemId=g.id;if(this.getCheckedFunc){j.checked=this.getCheckedFunc(f);this._highlightSelection&&b.toggleClass(g,"checkedRow",j.checked);b.toggleClass(j,"core-sprite-check_on",j.checked)}i.appendChild(j);b.connect(j,"onclick",b.hitch(this,function(h){this.onCheck(g,h.target,h.target.checked?
false:true,true)}));return i}},getCheckBoxId:function(f){return f+"selectedState"},onCheck:function(f,g,i,j){g.checked=i;this._highlightSelection&&f&&b.toggleClass(f,"checkedRow",i);b.toggleClass(g,"core-sprite-check_on",i);this.onCheckedFunc&&this.onCheckedFunc(g.itemId,i,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 i=b.byId(f[g]);if(i){this._highlightSelection&&b.addClass(i,"checkedRow");if(i=b.byId(this.getCheckBoxId(i.id))){i.checked=true;b.addClass(i,"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,i=window.sessionStorage[f+"expanded"];if(typeof i==="string")i=i.length>0?JSON.parse(i):null;var j;if(i)for(j=0;j<i.length;j++)if(b.byId(i[j])){this._expanded.push(i[j]);this.tableTree.expand(i[j],b.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=b.byId(this.expandCollapseImageId(f.id))){b.addClass(f,g?this._expandImageClass:this._collapseImageClass);b.removeClass(f,g?this._collapseImageClass:this._expandImageClass)}},getExpandImage:function(f,g,i,j){var h=b.create("span",{id:this.expandCollapseImageId(f.id)},g,"last");b.addClass(h,this._twistieSpriteClass);b.addClass(h,this._collapseImageClass);if(i){g=b.create("span",
null,g,"last");b.addClass(g,j||"imageSprite");b.addClass(g,i)}h.onclick=b.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 k in this._expanded)if(this._expanded[k]===f.id){this._expanded.splice(k,1);break}(k=this._getUIStatePreferencePath())&&window.sessionStorage&&this._storeExpansions(k)});return h},render:function(f,g){g.cellSpacing="8px";this.renderRow(f,
g)},getSelected:function(){var f=[];b.query(".core-sprite-check_on").forEach(b.hitch(this,function(g){f.push(this.tableTree.getItem(g.parentNode.parentNode))}));return f},getSelectedIds:function(){var f=[];b.query(".core-sprite-check_on").forEach(b.hitch(this,function(g){f.push(g.parentNode.parentNode.id)}));return f},rowsChanged:function(){this._decorateAlternatingLines&&b.query(".treeTableRow").forEach(function(f,g){if(g%2){b.addClass(f,"darkTreeTableRow");b.removeClass(f,"lightTreeTableRow")}else{b.addClass(f,
"lightTreeTableRow");b.removeClass(f,"darkTreeTableRow")}});this.explorer.selection&&this.explorer.selection.setSelections(this.getSelected())},updateCommands:function(){var f=this.explorer.registry;b.query(".treeTableRow").forEach(function(g){var i=b.byId(g.id+"actionswrapper");b.empty(i);f.getService("orion.page.command").renderCommands(i,"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"),i=document.createElement("tr");b.addClass(g,"navTableHeading");this._useCheckboxSelection&&i.appendChild(this.initCheckboxColumn(f));for(var j=0,h=this.getCellHeaderElement(j);h;){h.innerHTML.length>0&&b.addClass(h,"navColumn");i.appendChild(h);h=this.getCellHeaderElement(++j)}g.appendChild(i);f.appendChild(g)};e.prototype.renderRow=
function(f,g){b.style(g,"verticalAlign","baseline");b.addClass(g,"treeTableRow");var i=this.getCheckboxColumn(f,g);if(i){b.addClass(i,"checkColumn");g.appendChild(i)}i=0;for(var j=this.getCellElement(i,f,g);j;){g.appendChild(j);b.addClass(j,"secondaryColumn");j=this.getCellElement(++i,f,g)}};e.prototype.getCellHeaderElement=function(){};e.prototype.getCellElement=function(){};return e}();return d});
define("orion/breadcrumbs",["require","dojo","orion/util"],function(c,b,a){function d(e){this._init(e)}d.prototype={_init:function(e){var f=e.container;if(typeof f==="string")f=b.byId(f);if(!f)throw"no parent container";this._container=f;b.removeClass(f,"currentLocation");this._id=e.id||"eclipse.breadcrumbs";this._resource=e.resource||null;this._firstSegmentName=e.firstSegmentName;this._makeHref=e.makeHref;this.path="";this.render()},getNavigatorRootSegment:function(){if(this._firstSegmentName){var e;
if(this._resource&&this._resource.Parents){e=document.createElement("a");if(this._makeHref)this._makeHref(e,"");else e.href=c.toUrl("navigate/table.html")+"#"}else e=document.createElement("span");b.place(document.createTextNode(this._firstSegmentName),e,"only");return e}return null},render:function(){var e=this._container,f=b.byId(this._id);if(f)b.empty(f);else{f=document.createElement("span");f.id=this._id;e.appendChild(f)}var g;if(g=this.getNavigatorRootSegment()){b.addClass(g,"breadcrumb");f.appendChild(g);
if(this._resource&&this._resource.Parents){g=document.createElement("span");b.place(document.createTextNode(" >> "),g,"only");this.path+="/";b.addClass(g,"breadcrumb");f.appendChild(g)}else{g.href="";b.removeClass(g,"breadcrumb");b.addClass(g,"currentLocation");a.forceLayout(e);return}}if(this._resource){if(this._resource.Parents)for(var i=this._resource.Parents,j=i.length;--j>=0;){g=document.createElement("a");b.addClass(g,"breadcrumb");b.place(document.createTextNode(i[j].Name),g,"only");this.path+=
i[j].Name;if(this._makeHref)this._makeHref(g,i[j].ChildrenLocation);else g.href=c.toUrl("navigate/table.html")+"#"+i[j].ChildrenLocation;f.appendChild(g);g=document.createElement("span");b.place(document.createTextNode(" >> "),g,"only");this.path+="/";b.addClass(g,"breadcrumb");f.appendChild(g)}g=document.createElement("span");b.place("<br>"+this._resource.Name,g,"only");b.addClass(g,"currentLocation");this.path+=this._resource.Name;f.appendChild(g)}if(f.childNodes.length===0){g=document.createElement("a");
b.place(document.createTextNode(document.title),g,"only");b.addClass(g,"breadcrumb");b.addClass(g,"currentLocation");f.appendChild(g)}a.forceLayout(e)}};d.prototype.constructor=d;return{BreadCrumbs:d}});define("text!orion/git/widgets/templates/CloneGitRepositoryDialog.html",function(){return'<div class="dijitDialog" tabindex="-1" waiRole="dialog" waiState="labelledby-${id}_title">\n\t<div dojoAttachPoint="titleBar" class="dijitDialogTitleBar">\n\t\t<span dojoAttachPoint="titleNode" class="dijitDialogTitle" id="${id}_title"></span>\n\t\t<span dojoAttachPoint="closeButtonNode" class="dijitDialogCloseIcon" dojoAttachEvent="onclick: onCancel" title="${buttonCancel}">\n\t\t\t<span dojoAttachPoint="closeText" class="closeText" title="${buttonCancel}">x</span>\n\t\t</span>\n\t</div>\n\t<div dojoAttachPoint="containerNode" class="dijitDialogPaneContent">\n\t\t<!-- Actual content here --\>\n\t\t\t\t<span dojoAttachPoint="Basic">\n\t\t\t\t\t<div style="display: block; padding: 5; min-width: 120px; clear: both; float: left;">\n\t\t\t\t\t\t<label dojoAttachPoint="gitUrlLabel" for="${id}_gitUrl" style="padding-right: 10">${gitUrlLabelText}</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: block; padding: 5; width: 40em; text-align: right; float: right">\n\t\t\t\t\t\t<input dojoAttachPoint="gitUrl" id="${id}_gitUrl" style="display: inline-block; width: 100%;" value="">\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: block; padding: 5; clear: both; text-align: right;">\n\t\t\t\t\t\t<a dojoAttachPoint="advancedLink" href="javascript:">Choose target location</a>\n\t\t\t\t\t\t<a dojoAttachPoint="advancedLinkHide" href="javascript:" style="display: none">Default target location</a>\n\t\t\t\t\t</div>\n\t\t\t\t</span>\n\t\t\t\t<span dojoAttachPoint="Advanced" style="display: none;">\n\t\t\t\t\t<div style="display: block; padding: 5; min-width: 120px; clear: both; float: left;">\n\t\t\t\t\t\t<input dojoAttachPoint="isNewProject" type="radio" name="${id}_newExisting" checked value="new"/>\n\t\t\t\t\t\t<label dojoAttachPoint="gitNameLabel" for="${id}_gitName" style="padding-right: 10">${gitNameLabelText}</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: block; padding: 5; width: 40em; text-align: right; float: right">\n\t\t\t\t\t\t<input dojoAttachPoint="gitName" id="${id}_gitName" style="display: inline-block; width: 100%;" value="">\n\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t\t<div style="display: block; padding: 5; min-width: 120px; clear: both; float: left;">\n\t\t\t\t\t\t<input dojoAttachPoint="isExistingProject" type="radio" name="${id}_newExisting" value="existing"/>\n\t\t\t\t\t\t<label dojoAttachPoint="gitPathLabel" for="${id}_gitPath" style="padding-right: 10">${gitPathLabelText}</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: block; padding: 5; width: 40em; text-align: left; float: right;">\n\t\t\t\t\t\t\t<input dojoAttachPoint="gitPath" id="${id}_gitPath" type="hidden" value="">\n\t\t\t\t\t\t\t<div style="width: 30em; float: left" float="left" dojoAttachPoint="shownGitPath"></div>\n\t\t\t\t\t\t\t<div style="width: 10em; float: right; text-align: right"><a dojoAttachPoint="changeGitPath" href="javascript:">Change...</a></div>\n\t\t\t\t\t</div>\n\t\t\t\t</span>\n\t\t\t\t<div style="display: block; padding: 5; clear: both; text-align: right">\n\t\t\t\t\t<button dojoAttachPoint="cloneItemButton" dojoType="dijit.form.Button" type="submit" value="OK" style="padding: 20 0 10 0;">OK\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t</div>\n</div>'});
define("orion/git/widgets/CloneGitRepositoryDialog",["require","dojo","dijit","dijit/Dialog","orion/widgets/_OrionDialogMixin","orion/widgets/DirectoryPrompterDialog","text!orion/git/widgets/templates/CloneGitRepositoryDialog.html"],function(c,b,a){b.declare("orion.git.widgets.CloneGitRepositoryDialog",[a.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:true,templateString:b.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)}b.connect(this.changeGitPath,"onclick",null,b.hitch(this,this.openDirectoryPickerDialog));b.connect(this.isExistingProject,"onchange",null,b.hitch(this,this.showExistingFolder));b.connect(this.gitName,"onfocus",null,b.hitch(this,this.showNewProject));b.connect(this.advancedLink,"onclick",null,b.hitch(this,this.showAdvanced));b.connect(this.advancedLinkHide,"onclick",null,b.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:b.hitch(this,
function(e){if(e&&e.Location){this.gitPath.value=e.Location;this.shownGitPath.innerHTML="<a href='"+c.toUrl("navigate/table.html")+"#"+e.ChildrenLocation+"'>"+e.Name+"</a>";for(e=e;e.parent&&!e.parent.Projects;){this.shownGitPath.innerHTML="<a href='"+c.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(c,b){c.declare("orion.git.widgets.InitGitRepositoryDialog",[b.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:true,templateString:c.cache("orion","git/widgets/templates/InitGitRepositoryDialog.html"),constructor:function(){this.inherited(arguments);this.options=arguments[0]||{}},postMixInProperties:function(){this.inherited(arguments);
this.title="Init Git Repository";this.gitTargetLabelText="Target:"},execute:function(){this.options.func&&this.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(c,b){c.declare("orion.git.widgets.AddRemoteDialog",[b.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:true,templateString:c.cache("orion","git/widgets/templates/AddRemoteDialog.html"),constructor:function(){this.inherited(arguments);this.options=arguments[0]||{}},postMixInProperties:function(){this.inherited(arguments);
this.title="Add Remote";this.gitRemoteLabelText="Remote Name:";this.gitRemoteURILabelText="Remote URI:"},execute:function(){this.options.func&&this.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(c,b){c.declare("orion.git.widgets.GitCredentialsDialog",[b.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:true,templateString:c.cache("orion","git/widgets/templates/GitCredentialsDialog.html"),constructor:function(){this.inherited(arguments);this.options=arguments[0]||{}},postMixInProperties:function(){this.inherited(arguments);
this.title=this.options.title||"Git Credentials";this.gitUrlLabelText="Repository URL:";this.gitSshUsernameLabelText="Username:";this.gitSshPasswordLabelText="Ssh password:";this.gitPrivateKeyLabelText="Private key:";this.gitPassphraseLabelText="Passphrase (optional):";if(!this.options.username&&!this.options.password&&!this.options.privatekey&&!this.options.passphrase){this.options.username=true;this.options.password=true;this.options.privatekey=true;this.options.passphrase=true}if(this.options.serviceRegistry){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||c.style(this.gitSshUsernameRow,"display","none");this.options.password||c.style(this.gitSshPasswordRow,"display","none");this.options.privatekey||c.style(this.gitPrivateKeyRow,"display","none");if(!this.options.passphrase){c.style(this.gitPassphraseRow,"display","none");c.style(this.gitPassphraseRow_1,
"display","none")}if(this.options.errordata&&this.options.errordata.Url){c.style(this.gitCredentialsLabel,"display","block");this.url.innerHTML=this.options.errordata.Url}if(this.options.errordata&&this.options.errordata.User&&this.options.errordata.User!==""){this.gitSshUsername.value=this.options.errordata.User;c.style(this.gitSshUsernameRow,"display","none");setTimeout(function(){a.gitSshPassword.focus()},400)}c.connect(this.gitSshPassword,"onfocus",null,c.hitch(this,function(){this.isSshPassword.checked=
true}));c.connect(this.gitPrivateKey,"onfocus",null,c.hitch(this,function(){this.isPrivateKey.checked=true}));c.connect(this.gitPassphrase,"onfocus",null,c.hitch(this,function(){this.isPrivateKey.checked=true}))},execute:function(){if(this._sshService){var a=this;this._sshService.getKnownHosts().then(function(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("orion/git/git-clones-explorer",["require","dojo","orion/explorer","orion/util"],function(c,b,a,d){var e={};e.GitClonesExplorer=function(){function f(g,i,j,h,k,l){this.parentId=h;this.registry=g;this.selection=i;this.toolbarId=k;this.selectionToolsId=l;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 i=c.toUrl("gitapi/clone._");i=i.substring(0,i.length-
2);return g[0]==="/"?i+g:i+"/"+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;b.hash(g,true);g=this.getGitLocation(g);b.create("div",null,b.byId(this.parentId),"only").innerHTML="Loading <b>"+g+"</b>...";var i=this.registry.getService("orion.git.provider");this.createTree(this.parentId,new e.GitClonesModel(i,g,i.getGitClone))}};f.prototype.redisplayClonesList=
function(){if(this._lastHash){var g=this.getGitLocation(this._lastHash);b.create("div",null,b.byId(this.parentId),"only").innerHTML="Loading <b>"+g+"</b>...";var i=this.registry.getService("orion.git.provider");this.createTree(this.parentId,new e.GitClonesModel(i,g,i.getGitClone))}};f.prototype.loadCloneDetails=function(g){this.cloneDetails.loadCloneDetails(g.ConfigLocation)};return f}();e.GitClonesModel=function(){function f(g,i,j,h){this.gitClient=g;this.rootPath=i;this.fetchItems=j;this.root=h?
h:null}f.prototype=new a.ExplorerModel;f.prototype.getRoot=function(g){this.root?g(this.root):this.fetchItems(this.rootPath).then(b.hitch(this,function(i){this.root=i;g(i)}))};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,i){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]}i(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}];i(g.children)}else if(g.GroupNode)this.gitClient.getGitBranch(g.Location).then(b.hitch(this,
function(h){g.children=h.Children;for(var k=0;k<h.Children.length;k++)h.Children[k].parent=g;i(h.Children)}));else g.Type==="Remote"&&this.gitClient.getGitBranch(g.Location).then(b.hitch(this,function(h){g.children=h.Children;for(var k=0;k<h.Children.length;k++)h.Children[k].parent=g;i(h.Children)}))};return f}();e.GitClonesRenderer=function(){function f(g,i){this._init(g);this.explorer=i}f.prototype=new a.SelectionRenderer;f.prototype.getCellHeaderElement=function(g){switch(g){case 0:case 1:return b.create("th",
{style:"height: 8px;"})}};f.prototype.getCellElement=function(g,i,j){switch(g){case 0:var h,k;if(i.BranchLocation&&i.RemoteLocation){h=document.createElement("td");g=j.id+"__expand";g=b.create("div",null,h,"only");this.getExpandImage(j,g,"git-sprite-repository","gitImageSprite");k=b.create("a",{className:"navlinkonpage"},g,"last");b.connect(k,"onclick",k,b.hitch(this,function(){this.explorer.loadCloneDetails(i)}));b.connect(k,"onmouseover",k,function(){k.style.cursor="pointer"});b.connect(k,"onmouseout",
k,function(){k.style.cursor="default"});b.place(document.createTextNode(i.Name),k,"only")}else if(i.GroupNode){h=document.createElement("td");g=j.id+"__expand";g=b.create("div",null,h,"only");i.Name==="Branches"&&this.getExpandImage(j,g,"git-sprite-branches","gitImageSprite");i.Name==="Remotes"&&this.getExpandImage(j,g,"git-sprite-remotes","gitImageSprite");i.Name==="Tags"&&this.getExpandImage(j,g,"git-sprite-tags","gitImageSprite");k=b.create("a",{innerHTML:i.Name,className:"navlinkonpage"},g,"last");
b.place(document.createTextNode(i.Name),k,"only")}else if(i.Type==="Branch"){h=document.createElement("td");g=b.create("div",{style:"margin-left: 10px"},h,"only");k=b.create("a",{innerHTML:i.Name,className:"navlinkonpage"},g,"last");if(i.Current)k.style.fontWeight="bold";b.place(document.createTextNode(i.Name),k,"only");j=b.create("span",null,k,"first");b.addClass(j,"gitImageSprite");b.addClass(j,"git-sprite-branch")}else if(i.Type==="Remote"){h=document.createElement("td");g=j.id+"__expand";g=b.create("div",
null,h,"only");this.getExpandImage(j,g,"git-sprite-remote","gitImageSprite");k=b.create("a",{innerHTML:i.Name,className:"navlinkonpage"},g,"last");!i.PushUrl||i.PushUrl===i.GitUrl?b.place(document.createTextNode(i.Name+" ("+i.GitUrl+")"),k,"only"):b.place(document.createTextNode(i.Name+" (See the configuration for fetch/push urls)"),k,"only")}else if(i.Type==="RemoteTrackingBranch"){h=document.createElement("td");g=b.create("div",{style:"margin-left: 10px"},h,"only");k=b.create("a",{innerHTML:i.Name,
className:"navlinkonpage"},g,"last");b.place(document.createTextNode(i.Name),k,"only");j=b.create("span",null,k,"first");b.addClass(j,"gitImageSprite");b.addClass(j,"git-sprite-branch")}else if(i.Type==="Tag"){h=document.createElement("td");g=b.create("div",{style:"margin-left: 10px"},h,"only");k=b.create("a",{innerHTML:i.Name,className:"navlinkonpage"},g,"last");b.place(document.createTextNode(i.Name),k,"only");j=b.create("span",null,k,"first");b.addClass(j,"gitImageSprite");b.addClass(j,"git-sprite-tag")}return h;
case 1:return this.getActionsColumn(i,j,"tool","actionsColumn")}};return f}();return e});define("text!orion/git/widgets/templates/RemotePrompterDialog.html",function(){return'<div class="dijitDialog" tabindex="-1" waiRole="dialog" waiState="labelledby-${id}_title">\n\t<div dojoAttachPoint="titleBar" class="dijitDialogTitleBar">\n\t\t<span dojoAttachPoint="titleNode" class="dijitDialogTitle" id="${id}_title"></span>\n\t\t<span dojoAttachPoint="closeButtonNode" class="dijitDialogCloseIcon" dojoAttachEvent="onclick: onCancel" title="${buttonCancel}">\n\t\t\t<span dojoAttachPoint="closeText" class="closeText" title="${buttonCancel}">x</span>\n\t\t</span>\n\t</div>\n\t<div dojoAttachPoint="containerNode" class="dijitDialogPaneContent">\n\t\t<!-- Actual content here --\>\n\t\t\t<div style="display: table">\n\t\t\t\t<div style="display: table-row"> \n\n\t\t\t\t\t<div style="display: table-cell; padding: 1px; vertical-align: bottom;">\n\t\t\t\t\t\t<div dojoAttachPoint="treeContainerNode" id="${id}_treeContainerNode" dojoType="dijit.layout.BorderContainer" style="width:25em; height:25em; overflow:auto;" design="sidebar" gutters="true">\n\t\t\t\t\t\t\t<div dojoAttachPoint="treeContentPane" class="dijitDialogPaneContent" id="${id}_treeContentPane dojoType="dijit.layout.ContentPane" region="center" gutters="true">\n\t\t\t\t\t\t\t\t<div dojoAttachPoint="browseRemoteExplorerTree" class="explorerTreeClass" id="${id}_browseRemoteExplorerTree" style="margin-top: -3px;"></div> \n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: table-cell; padding: 1px; vertical-align: bottom;">\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: table-cell; padding: 1px; vertical-align: bottom;">\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t<div style="display: table-row" dojoAttachPoint="newBranchSection">\n\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t<label for="${id}_newBranch">${newBranchText}</label>\n\t\t\t\t\t<input dojoAttachPoint="newBranch" id="${id}_newBranch" value="" disabled=true/>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t \n\t\t\t\t<div style="display: table-row">\n\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t\n\t\t\t\t\t\t<button dojoAttachPoint="RemoteBrowserButton" disabled=true dojoType="dijit.form.Button" type="submit" value="OK" style="padding: 20 0 10 0; float: right; clear: both;">${buttonOk}\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div> <!-- end table --\>\n\t</div> <!-- content pane --\>\n</div>'});
define("orion/git/widgets/RemotePrompterDialog",["dojo","dijit","orion/util","orion/git/git-clones-explorer","dijit/Dialog","dijit/form/Button","orion/widgets/ExplorerTree","orion/widgets/_OrionDialogMixin","text!orion/git/widgets/templates/RemotePrompterDialog.html"],function(c,b,a,d){c.declare("orion.git.widgets.RemotePrompterDialog",[b.Dialog,orion.widgets._OrionDialogMixin],{treeWidget:null,treeRoot:{},widgetsInTemplate:true,templateString:c.cache("orion","git/widgets/templates/RemotePrompterDialog.html"),
constructor:function(){this.inherited(arguments);this.options=arguments[0]||{};this.treeRoot=this.options.treeRoot},postMixInProperties:function(){this.inherited(arguments);this.title=this.options.title||"Choose a Folder";this.newBranchText="New Branch:";this.buttonOk="OK"},postCreate:function(){this.inherited(arguments);this.loadRemoteChildren(this.treeRoot);c.connect(this.newBranch,"onchange",c.hitch(this,this.validate));if(this.options.hideNewBranch)this.newBranchSection.style.display="none"},
loadRemoteChildren:function(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(i){if(i.Type==="RemoteTrackingBranch"&&!i.Id)return i.Name+" [New branch]";return i.Name},getIconClass:function(i){if(i.BranchLocation&&i.RemoteLocation)return"gitRepoItem";
if(i.GroupNode)return i.Name==="Branch"?"gitBranchesItem":"gitRemotesItem";if(i.Type==="Branch"||i.Type==="RemoteTrackingBranch")return"gitBranchItem";if(i.Type==="Remote")return"gitRemoteItem";return"gitDefaultItem"}}),g=this;this.treeWidget._inheritedSelectNode=this.treeWidget._selectNode;this.treeWidget._selectNode=function(i){f._inheritedSelectNode(i);g.newBranch.disabled=i.item&&i.item.Type==="Remote"?false:true;c.hitch(g,g.validate)()};this.treeWidget.startup();c.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(c,b){c.declare("orion.git.widgets.ApplyPatchDialog",[b.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:true,templateString:c.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){b.byId("files").set("disabled",d);b.byId("applyPatchDialog.uploader").set("disabled",d);b.byId("applyPatchDialog.url").set("disabled",!d)}this.inherited(arguments);c.byId("applyPatchDialog.myForm").action=this.options.diffLocation;c.byId("applyPatchDialog.uploader").url=this.options.diffLocation;a(true);
c.connect(b.byId("applyPatchDialog.urlRadio"),"onclick",c.hitch(this,function(d){d.target.id==="applyPatchDialog.urlRadio"&&a(true)}));c.connect(b.byId("applyPatchDialog.fileRadio"),"onclick",c.hitch(this,function(d){d.target.id==="applyPatchDialog.fileRadio"&&a(false)}));c.connect(b.byId("applyPatchDialog.uploader"),"onError",c.hitch(this,function(){setTimeout(c.hitch(this,function(){this.hide()}),2E3)}));c.connect(b.byId("applyPatchDialog.uploader"),"onComplete",c.hitch(this,function(){setTimeout(c.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(c,b,a){return b.declare("orion.git.widgets.OpenCommitDialog",[a.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:true,templateString:b.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);b.connect(this.resourceName,"onChange",this,function(){this.time=+new Date;clearTimeout(this.timeoutId);this.timeoutId=setTimeout(b.hitch(this,this.checkSearch),0)});b.connect(this.resourceName,"onKeyPress",this,function(d){if(d.keyCode===b.keys.ENTER&&this.results){d=b.query("a",this.results);if(d.length>0){window.open(d[0].href);this.hide()}}});b.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(b.hitch(this,"checkSearch"),50)},_findCommitLocation:function(d,e,f){var g=this;if(f==null)f=new b.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(i){f.callback(i.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){b.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){b.empty(e.results);e.displayCommit(f,e.results)},function(){b.place("<div>No commits found</div>",e.results,"only");
e.serviceRegistry.getService("orion.page.message").setProgressMessage("")})}},displayCommit:function(d,e){e=b.create("div",{style:"padding:10px; max-width:480px"},e);var f=d.Message.split(/(\r?\n|$)/)[0],g=b.create("a",{"class":"gitMainDescription",href:"/git/git-commit.html#"+d.Location+"?page=1&pageSize=1"},e);b.place(document.createTextNode(f),g);b.connect(g,"onclick",g,b.hitch(this,function(){this.hide()}));b.create("div",{style:"padding-top:15px"},e);b.create("span",{"class":"gitSecondaryDescription",
innerHTML:" commit: "+d.Name},e);if(d.Parents&&d.Parents.length>0){b.create("div",null,e);b.place(document.createTextNode("parent: "),e);f=b.create("a",{"class":"gitSecondaryDescription",href:"/git/git-commit.html#"+d.Parents[0].Location+"?page=1&pageSize=1"},e);b.place(document.createTextNode(d.Parents[0].Name),f);b.connect(f,"onclick",f,b.hitch(this,function(){this.hide()}))}b.create("div",{style:"padding-top:15px"},e);if(d.AuthorImage){f=b.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;b.place(g,f,"first")}b.create("span",{"class":"gitSecondaryDescription",innerHTML:" authored by "+d.AuthorName+" ("+d.AuthorEmail+") on "+b.date.locale.format(new Date(d.Time),{formatLength:"short"})},e);b.create("div",null,e);b.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(c,b,a,d){var e={};(function(){function f(i){var j;try{j=JSON.parse(i.responseText)}catch(h){j={Result:i.responseText}}j.HttpCode=
i.status;return j}var g=false;e.updateNavTools=function(i,j,h,k,l,m){var q=b.byId(h);if(q)b.empty(q);else throw"could not find toolbar "+h;var r=i.getService("orion.page.command");r.renderCommands(q,"dom",l,j,"button");if(m)if(h=b.byId(m)){b.empty(h);r.renderCommands(h,"dom",l,j,"button",true)}if(k)if(b.byId(k)){b.empty(k);r.renderCommands(k,"dom",null,j,"button")}if(!g){g=true;i.getService("orion.page.selection").addEventListener("selectionChanged",function(n,o){if(n=b.byId(k)){b.empty(n);r.renderCommands(n,
"dom",o,j,"button")}})}};e.getNewItemName=function(i,j,h,k,l,m,q,r){var n,o;if(h)n=b.byId(k);else if(j.makeNewItemPlaceHolder!=null)if(i=j.makeNewItemPlaceHolder(i,k,q)){n=i.refNode;o=i.tempNode}else n=b.byId(k);if(n)d.getUserText(k+"EditBox",n,false,l,b.hitch(this,function(p){if(p){o&&o.parentNode.removeChild(o);m(p)}}),undefined,undefined,undefined,r);else(k=window.prompt(l))&&m(k)};e.handleKnownHostsError=function(i,j,h,k){if(confirm("Would you like to add "+j.KeyType+" key for host "+j.Host+" to continue operation? Key fingerpt is "+
j.HostFingerprint+".")){var l=i.getService("orion.net.ssh");l.addKnownHosts(j.Host+" "+j.KeyType+" "+j.HostKey).then(function(){l.getKnownHosts().then(function(q){h.knownHosts=q;k(h)});if(h.failedOperation){var m=i.getService("orion.page.progress");b.hitch(m,m.removeOperation)(h.failedOperation.Location,h.failedOperation.Id)}})}};e.handleSshAuthenticationError=function(i,j,h,k,l){j=new orion.git.widgets.GitCredentialsDialog({title:l,serviceRegistry:i,func:k,errordata:h.errordata,failedOperation:h.failedOperation});
j.startup();j.show();if(h.failedOperation){i=i.getService("orion.page.progress");b.hitch(i,i.removeOperation)(h.failedOperation.Location,h.failedOperation.Id)}};e.getDefaultSshOptions=function(i,j){var h=new b.Deferred;i=i.getService("orion.net.ssh");var k=j&&!j.optionsRequested?j.valueFor("sshuser"):"",l=j&&!j.optionsRequested?j.valueFor("sshpassword"):"";i.getKnownHosts().then(function(m){h.callback({knownHosts:m,gitSshUsername:k,gitSshPassword:l,gitPrivateKey:"",gitPassphrase:""})});return h};
e.handleProgressServiceResponse=function(i,j,h,k,l,m){if(i&&i.status)i=f(i);if(!i||!i.HttpCode)k&&k(i);else switch(i.HttpCode){case 200:case 201:case 202:k&&k(i.Result);return;case 401:if(i.JsonData)j.errordata=i.JsonData;if(i.failedOperation)j.failedOperation=i.failedOperation;b.hitch(this,e.handleSshAuthenticationError)(h,i.JsonData,j,l,m);return;case 400:if(i.JsonData&&i.JsonData.HostKey){if(i.failedOperation)j.failedOperation=i.failedOperation;b.hitch(this,e.handleKnownHostsError)(h,i.JsonData,
j,l);return}default:j=[];j.Severity="Error";j.HTML=false;try{j.Message=i.DetailedMessage?i.DetailedMessage:i.Message}catch(q){j.Message=error.message}h.getService("orion.page.message").setProgressResult(j);break}};e.gatherSshCredentials=function(i,j,h,k){var l=new b.Deferred,m=function(q){i.getService("orion.net.ssh").getKnownHosts().then(function(r){l.callback({knownHosts:r,gitSshUsername:q.gitSshUsername,gitSshPassword:q.gitSshPassword,gitPrivateKey:q.gitPrivateKey,gitPassphrase:q.gitPassphrase})})};
if(h&&h.HostKey){confirm("Would you like to add "+h.KeyType+" key for host "+h.Host+" to continue operation? Key fingerpt is "+h.HostFingerprint+".")&&i.getService("orion.net.ssh").addKnownHosts(h.Host+" "+h.KeyType+" "+h.HostKey).then(function(){m({gitSshUsername:"",gitSshPassword:"",gitPrivateKey:"",gitPassphrase:""})});return l}if(j){h=j.parameters?j.parameters.valueFor("sshuser"):"";j=j.parameters?j.parameters.valueFor("sshpassword"):"";m({gitSshUsername:h,gitSshPassword:j,gitPrivateKey:"",gitPassphrase:""});
return l}j=new orion.git.widgets.GitCredentialsDialog({title:k,serviceRegistry:i,func:m,errordata:h});j.startup();j.show();return l};e.handleProgressServiceResponse2=function(i,j,h,k){if(i&&i.status)i=f(i);if(!i||!i.HttpCode)h&&h(i);else switch(i.HttpCode){case 200:case 201:case 202:h&&h(i.Result);return;case 401:if(i.failedOperation){j=j.getService("orion.page.progress");b.hitch(j,j.removeOperation)(i.failedOperation.Location,i.failedOperation.Id)}k(i);return;case 400:if(i.JsonData&&i.JsonData.HostKey){if(i.failedOperation){j=
j.getService("orion.page.progress");b.hitch(j,j.removeOperation)(i.failedOperation.Location,i.failedOperation.Id)}k(i);return}default:k=[];k.Severity="Error";k.HTML=false;try{k.Message=i.DetailedMessage?i.DetailedMessage:i.Message}catch(l){k.Message=error.message}j.getService("orion.page.message").setProgressResult(k);break}};e.createFileCommands=function(i,j,h){function k(m){if(!(m.status===401||m.status===403)){var q=[];q.Severity="Error";q.HTML=false;try{var r=JSON.parse(m.responseText);q.Message=
r.DetailedMessage?r.DetailedMessage:r.Message}catch(n){q.Message=m.message}i.getService("orion.page.message").setProgressResult(q)}}var l=new a.Command({name:"Link Repository",imageClass:"core-sprite-link",id:"eclipse.linkRepository",callback:function(m){var q=new orion.widgets.NewItemDialog({title:"Link Repository",label:"Folder name:",func:function(r){var n=i.getService("orion.core.file");n.loadWorkspace("").then(function(o){n.createProject(o.Location,r,m.items.ContentLocation,false).then(function(p){alert("Repository was linked to "+
p.Name);n.read(p.ContentLocation,true).then(function(s){window.location.replace(c.toUrl("navigate/table.html")+"#"+s.ChildrenLocation)})})})},advanced:false});q.startup();q.show()},visibleWhen:function(m){if(m.ContentLocation)return true;return false}});j.addCommand(l,"object");l=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(m){function q(){if(r.Repository)return r.Repository.BranchLocation;
for(var n in r.parent.parent.children)if(r.parent.parent.children[n].Name==="Branches")return r.parent.parent.children[n];return r.parent.parent}var r=m.items;e.getNewItemName(r,h,false,m.domNode.id,"tag_"+r.Name,function(n){if(!(!n&&n=="")){var o;o=r.Repository!=null?r.Repository.Location:r.parent.parent.Location;i.getService("orion.git.provider").checkoutTag(o,r.Name,n).then(function(){b.hitch(h,h.changedItem)(q())},k)}},undefined,true)},visibleWhen:function(m){return m.Type==="Tag"}});j.addCommand(l,
"object");l=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(m){var q=m.items,r=i.getService("orion.git.provider"),n=i.getService("orion.page.message");n.setProgressMessage("Checking out branch...");q.Type==="Branch"?
r.checkoutBranch(q.CloneLocation,q.Name).then(function(){b.hitch(h,h.changedItem)(q.parent);n.setProgressResult("Ok")},k):r.addBranch(q.Repository!=null?q.Repository.BranchLocation:q.parent.parent.BranchLocation,null,q.Name).then(function(o){r.checkoutBranch(o.CloneLocation,o.Name).then(function(){b.hitch(h,h.changedItem)(q.Repository?q.Repository.BranchLocation:q.parent.parent.parent);n.setProgressResult("Ok")},k)},k)},visibleWhen:function(m){return m.Type==="Branch"||m.Type==="RemoteTrackingBranch"}});
j.addCommand(l,"object");l=new a.ParametersDescription([new a.CommandParameter("name","text","Name:")],false);l=new a.Command({name:"New Branch",tooltip:"Add a new local branch to the repository",imageClass:"core-sprite-add",id:"eclipse.addBranch",parameters:l,callback:function(m){var q=m.items,r=function(o,p){i.getService("orion.git.provider").addBranch(o,p).then(function(){b.hitch(h,h.changedItem)(q)},k)},n;n=q.Type==="Clone"?q.BranchLocation:q.Location;m.parameters.valueFor("name")&&!m.parameters.optionsRequested?
r(n,m.parameters.valueFor("name")):e.getNewItemName(q,h,false,m.domNode.id,"Branch name",function(o){!o&&o==""||r(n,o)})},visibleWhen:function(m){return m.GroupNode&&m.Name==="Branches"||m.Type==="Clone"&&h.parentId==="artifacts"}});j.addCommand(l,"object");j.addCommand(l,"dom");l=new a.Command({name:"Delete",tooltip:"Delete the local branch from the repository",imageClass:"core-sprite-delete",id:"eclipse.removeBranch",callback:function(m){var q=m.items;confirm("Are you sure you want to delete branch "+
q.Name+"?")&&i.getService("orion.git.provider").removeBranch(q.Location).then(function(){if(h.changedItem)b.hitch(h,h.changedItem)(q.parent);else h.displayBranches&&b.hitch(h,h.displayBranches)(q.ParentLocation,null)},k)},visibleWhen:function(m){return m.Type==="Branch"&&!m.Current}});j.addCommand(l,"object");l=new a.Command({name:"Delete",tooltip:"Delete the remote tracking branch from the repository",imageClass:"core-sprite-delete",id:"eclipse.removeRemoteBranch",callback:function(m){var q=m.items;
confirm("You're going to delete remote branch "+q.Name+" and push the change.\n\nAre you sure?")&&e.getDefaultSshOptions(i).then(function(r){var n=arguments.callee;i.getService("orion.git.provider").doPush(q.Location,"",false,false,null,"Removing remote branch: "+q.Name,r.gitSshUsername,r.gitSshPassword,r.knownHosts,r.gitPrivateKey,r.gitPassphrase).then(function(o){e.handleProgressServiceResponse(o,r,i,function(p){p.Result.Severity=="Ok"&&b.hitch(h,h.changedItem)(q.parent)},n,"Delete Remote Branch")},
function(o){e.handleProgressServiceResponse(o,r,i,function(){},n,"Removing remote branch: "+q.Name)})})},visibleWhen:function(m){return m.Type==="RemoteTrackingBranch"}});j.addCommand(l,"object");l=new a.ParametersDescription([new a.CommandParameter("name","text","Name:"),new a.CommandParameter("url","url","Url:")],false);l=new a.Command({name:"New Remote",tooltip:"Add a new remote to the repository",imageClass:"core-sprite-add",id:"eclipse.addRemote",parameters:l,callback:function(m){var q=m.items,
r=function(o,p,s){i.getService("orion.git.provider").addRemote(o,p,s).then(function(){b.hitch(h,h.changedItem)(q)},k)},n;n=q.Type==="Clone"?q.RemoteLocation:q.Location;if(m.parameters.valueFor("name")&&m.parameters.valueFor("url")&&!m.parameters.optionsRequested)r(n,m.parameters.valueFor("name"),m.parameters.valueFor("url"));else{m=new orion.git.widgets.AddRemoteDialog({func:function(o,p){r(n,o,p)}});m.startup();m.show()}},visibleWhen:function(m){return m.GroupNode&&m.Name==="Remotes"||m.Type==="Clone"&&
h.parentId==="artifacts"}});j.addCommand(l,"object");j.addCommand(l,"dom");l=new a.Command({name:"Delete",tooltip:"Delete the remote from the repository",imageClass:"core-sprite-delete",id:"eclipse.removeRemote",callback:function(m){var q=m.items;confirm("Are you sure you want to delete remote "+q.Name+"?")&&i.getService("orion.git.provider").removeRemote(q.Location).then(function(){b.hitch(h,h.changedItem)(q.parent)},k)},visibleWhen:function(m){return m.Type==="Remote"}});j.addCommand(l,"object");
l=new a.Command({name:"Pull",tooltip:"Pull from the repository",imageClass:"git-sprite-pull",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.pull",callback:function(m){var q=m.items,r=q.Location;e.getDefaultSshOptions(i).then(function(n){var o=arguments.callee;i.getService("orion.git.provider").doPull(r,false,null,n.gitSshUsername,n.gitSshPassword,n.knownHosts,n.gitPrivateKey,n.gitPassphrase).then(function(p){e.handleProgressServiceResponse(p,n,i,function(){b.xhrGet({url:r,headers:{"Orion-Version":"1"},
postData:b.toJson({GitSshUsername:n.gitSshUsername,GitSshPassword:n.gitSshPassword,GitSshPrivateKey:n.gitPrivateKey,GitSshPassphrase:n.gitPassphrase,GitSshKnownHost:n.knownHosts}),handleAs:"json",timeout:5E3,load:function(s){return s},error:function(s,t){console.error("HTTP status code: ",t.xhr.status);return s}}).then(function(){q.Type==="Clone"&&b.hitch(h,h.changedItem)(q)},k)},o,"Pull Git Repository")},function(p){e.handleProgressServiceResponse(p,n,i,function(){},o,"Pull Git Repository")})})},
visibleWhen:function(m){return m.Type==="Clone"}});j.addCommand(l,"object");l=new a.Command({name:"Git Log",tooltip:"Open the log for the branch",id:"eclipse.openGitLog",imageClass:"git-sprite-log",spriteClass:"gitCommandSprite",hrefCallback:function(m){m=m.items;if(m.Type==="RemoteTrackingBranch")return c.toUrl("git/git-log.html")+"#"+m.Location+"?page=1";return c.toUrl("git/git-log.html")+"#"+m.CommitLocation+"?page=1"},visibleWhen:function(m){return m.Type==="Branch"||m.Type==="RemoteTrackingBranch"}});
j.addCommand(l,"object");l=new a.Command({name:"Git Log",tooltip:"Open the log for the repository",id:"eclipse.openGitLogAll",imageClass:"git-sprite-log",spriteClass:"gitCommandSprite",hrefCallback:function(m){return c.toUrl("git/git-log.html")+"#"+m.items.CommitLocation+"?page=1"},visibleWhen:function(m){if(!m.CommitLocation||!m.StatusLocation)return false;return true}});j.addCommand(l,"object");l=new a.Command({name:"Git Status",tooltip:"Open the status for the repository",id:"eclipse.openGitStatus",
imageClass:"git-sprite-status",spriteClass:"gitCommandSprite",hrefCallback:function(m){return c.toUrl("git/git-status.html")+"#"+m.items.StatusLocation},visibleWhen:function(m){if(!m.StatusLocation)return false;return true}});j.addCommand(l,"object");l=new a.Command({name:"Show in Navigator",tooltip:"Show the repository folder in the file navigator",id:"eclipse.openCloneContent",hrefCallback:function(m){return c.toUrl("navigate/table.html")+"#"+m.items.ContentLocation+"?depth=1"},visibleWhen:function(m){if(!m.ContentLocation)return false;
return true}});j.addCommand(l,"object");l=new a.Command({name:"Compare With Each Other",imageClass:"git-sprite-open_compare",spriteClass:"gitCommandSprite",id:"eclipse.compareGitCommits",hrefCallback:function(m){m=m.items;var q=new b.Deferred;i.getService("orion.git.provider").getDiff(m[1].DiffLocation,m[0].Name,function(r,n){q.callback(c.toUrl("compare/compare.html")+"?readonly#"+n.xhr.getResponseHeader("Location"))});return q},visibleWhen:function(m){if(h.isDirectory)return false;if(b.isArray(m)&&
m.length===2&&m[0].Type==="Commit"&&m[1].Type==="Commit")return true;return false}});j.addCommand(l,"dom");l=new a.Command({name:"Compare With Working Tree",imageClass:"git-sprite-open_compare",spriteClass:"gitCommandSprite",id:"eclipse.compareWithWorkingTree",hrefCallback:function(m){return c.toUrl("compare/compare.html")+"#"+m.items.DiffLocation},visibleWhen:function(m){return m.Type==="Commit"&&!h.isDirectory}});j.addCommand(l,"object");l=new a.Command({name:"Open",id:"eclipse.openGitCommit",hrefCallback:function(m){return c.toUrl("edit/edit.html")+
"#"+m.items.ContentLocation},visibleWhen:function(m){return m.Type==="Commit"&&m.ContentLocation!=null&&!h.isDirectory}});j.addCommand(l,"object");l=new a.Command({name:"Fetch",tooltip:"Fetch from the remote",imageClass:"git-sprite-fetch",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.fetch",callback:function(m){var q=m.items,r=q.Location,n=function(p,s){if(p.JsonData.HostKey)o(s,p.JsonData);else if(s){s.parameters=p.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);s.parameters.errorData=p.JsonData;j._collectParameters(s)}else o(null,p.JsonData)},o=function(p,s){e.gatherSshCredentials(i,p,s).then(function(t){var v=i.getService("orion.git.provider");v.doFetch(r,false,null,t.gitSshUsername,t.gitSshPassword,t.knownHosts,t.gitPrivateKey,t.gitPassphrase).then(function(w){e.handleProgressServiceResponse2(w,
i,function(){v.getGitRemote(r).then(function(y){h.parentId==="explorer-tree"&&v.getLog(y.HeadLocation,y.Id,"Getting git incoming changes",function(C){h.renderer.setIncomingCommits(C.Children);h.loadCommitsList(y.CommitLocation+"?page=1",y,true)});b.hitch(h,h.changedItem)(q)},k)},function(y){n(y,p)})},function(w){e.handleProgressServiceResponse2(w,i,function(){},function(y){n(y,p)})})})};if(m.parameters&&m.parameters.optionsRequested){o(null,m.parameters.errorData);m.parameters.optionsRequested=false;
m.parameters.errorData=null}else o(m)},visibleWhen:function(m){return m.Type==="RemoteTrackingBranch"||m.Type==="Remote"}});j.addCommand(l,"dom");j.addCommand(l,"object");l=new a.Command({name:"Force Fetch",tooltip:"Fetch from the remote branch into your remote tracking branch overriding its current content",id:"eclipse.orion.git.fetchForce",callback:function(m){if(confirm("You're going to override content of the remote tracking branch. This can cause the branch to lose commits.\n\nAre you sure?")){var q=
m.items,r=q.Location,n=function(p,s){if(p.JsonData.HostKey)o(s,p.JsonData);else if(s){s.parameters=p.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);s.parameters.errorData=p.JsonData;j._collectParameters(s)}else o(null,p.JsonData)},o=function(p,s){e.gatherSshCredentials(i,p,
s).then(function(t){var v=i.getService("orion.git.provider");v.doFetch(r,true,null,t.gitSshUsername,t.gitSshPassword,t.knownHosts,t.gitPrivateKey,t.gitPassphrase).then(function(w){e.handleProgressServiceResponse2(w,i,function(){v.getGitRemote(r).then(function(y){h.parentId==="explorer-tree"&&v.getLog(y.HeadLocation,y.Id,"Getting git incoming changes",function(C){h.renderer.setIncomingCommits(C.Children);h.loadCommitsList(y.CommitLocation+"?page=1",y,true)});b.hitch(h,h.changedItem)(q)},k)},function(y){n(y,
p)})},function(w){e.handleProgressServiceResponse2(w,i,function(){},function(y){n(y,p)})})})};if(m.parameters&&m.parameters.optionsRequested){o(null,m.parameters.errorData);m.parameters.optionsRequested=false;m.parameters.errorData=null}else o(m)}},visibleWhen:function(m){return m.Type==="RemoteTrackingBranch"||m.Type==="Remote"}});j.addCommand(l,"dom");j.addCommand(l,"object");l=new a.Command({name:"Merge",tooltip:"Merge the content from the branch to your active branch",imageClass:"git-sprite-merge",
spriteClass:"gitCommandSprite",id:"eclipse.orion.git.merge",callback:function(m){var q=m.items;m=i.getService("orion.git.provider");var r=i.getService("orion.page.message");m.doMerge(q.HeadLocation,q.Name).then(function(n){var o=[];if(n.jsonData&&(n.jsonData.Result=="FAST_FORWARD"||n.jsonData.Result=="ALREADY_UP_TO_DATE")){b.query(".treeTableRow").forEach(function(s){b.toggleClass(s,"incomingCommitsdRow",false)});o.Severity="Ok";o.HTML=false;o.Message=n.jsonData.Result;b.hitch(h,h.changedItem)(q)}else if(n.jsonData){var p=
q.HeadLocation.replace("commit/HEAD","status");o.Severity="Warning";o.HTML=true;o.Message="<span>"+n.jsonData.Result+'. Go to <a href="'+c.toUrl("git/git-status.html")+"#"+p+'">Git Status page</a>.<span>'}else if(n.error){p=q.HeadLocation.replace("commit/HEAD","status");o.Severity="Error";if(n.error.responseText&&JSON.parse(n.error.responseText)){n=JSON.parse(n.error.responseText);o.Message=n.DetailedMessage?n.DetailedMessage:n.Message}else o.Message=n.error.message;o.HTML=true;o.Message="<span>"+
o.Message+' Go to <a href="'+c.toUrl("git/git-status.html")+"#"+p+'">Git Status page</a>.<span>'}r.setProgressResult(o)},function(n,o){n=[];var p=q.HeadLocation.replace("commit/HEAD","status");n.Severity="Error";n.HTML=true;n.Message="<span>"+b.fromJson(o.xhr.responseText).DetailedMessage+'. Go to <a href="'+c.toUrl("git/git-status.html")+"#"+p+'">Git Status page</a>.<span>';i.getService("orion.page.message").setProgressResult(n)})},visibleWhen:function(m){return m.Type==="RemoteTrackingBranch"||
m.Type==="Branch"&&!m.Current}});j.addCommand(l,"dom");j.addCommand(l,"object");l=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(m){var q=m.items;i.getService("orion.git.provider").doRebase(q.HeadLocation,
q.Name,"BEGIN",function(r){var n=[],o=q.HeadLocation.replace("commit/HEAD","status");if(r.Result=="OK"||r.Result=="FAST_FORWARD"||r.Result=="UP_TO_DATE"){n.Severity="Ok";n.HTML=false;n.Message=r.Result;b.hitch(h,h.changedItem)(q)}else if(r.Result=="STOPPED"){n.Severity="Warning";n.HTML=true;n.Message="<span>"+r.Result+'. Some conflicts occurred. Please resolve them and continue, skip patch or abort rebasing. Go to <a href="'+c.toUrl("git/git-status.html")+"#"+o+'">Git Status page</a>.<span>'}else if(r.Result==
"FAILED_WRONG_REPOSITORY_STATE"){n.Severity="Error";n.HTML=true;n.Message="<span>"+r.Result+'. Repository state is invalid (i.e. already during rebasing). Go to <a href="'+c.toUrl("git/git-status.html")+"#"+o+'">Git Status page</a>.<span>'}else if(r.Result=="FAILED_UNMERGED_PATHS"){n.Severity="Error";n.HTML=true;n.Message="<span>"+r.Result+'. Repository contains unmerged paths. Go to <a href="'+c.toUrl("git/git-status.html")+"#"+o+'">Git Status page</a>.<span>'}else if(r.Result=="FAILED_PENDING_CHANGES"){n.Severity=
"Error";n.HTML=true;n.Message="<span>"+r.Result+'. Repository contains pending changes. Please commit or stash them. Go to <a href="'+c.toUrl("git/git-status.html")+"#"+o+'">Git Status page</a>.<span>'}else{n.Severity="Warning";n.HTML=true;n.Message="<span>"+r.Result+'. Go to <a href="'+c.toUrl("git/git-status.html")+"#"+o+'">Git Status page</a>.<span>'}i.getService("orion.page.message").setProgressResult(n)},k)},visibleWhen:function(m){this.tooltip="Rebase your commits by removing them from the active branch, starting the active branch again based on the latest state of '"+
m.Name+"' and applying each commit again to the updated active branch.";return m.Type==="RemoteTrackingBranch"||m.Type==="Branch"&&!m.Current}});j.addCommand(l,"dom");j.addCommand(l,"object");l=new a.Command({name:"Push All",tooltip:"Push commits and tags from your local branch into the remote branch",imageClass:"git-sprite-push",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.push",callback:function(m){var q=m.items,r=b.hash();if(q.toRef)q=q.toRef;var n=function(p,s){if(p.JsonData.HostKey)o(s,
p.JsonData);else if(s){s.parameters=p.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);s.parameters.errorData=p.JsonData;j._collectParameters(s)}else o(null,p.JsonData)},o=function(p,s){e.gatherSshCredentials(i,p,s).then(function(t){var v=i.getService("orion.git.provider");if(q.RemoteLocation.length==
1&&q.RemoteLocation[0].Children.length==1)v.doPush(q.RemoteLocation[0].Children[0].Location,"HEAD",true,false,null,"Pushing remote: "+r,t.gitSshUsername,t.gitSshPassword,t.knownHosts,t.gitPrivateKey,t.gitPassphrase).then(function(y){e.handleProgressServiceResponse2(y,i,function(){if(h.parentId==="explorer-tree"){if(!y||!y.HttpCode)b.query(".treeTableRow").forEach(function(C){b.toggleClass(C,"outgoingCommitsdRow",false)})}else b.hitch(h,h.changedItem)()},function(C){n(C,p)})},function(y){e.handleProgressServiceResponse2(y,
i,function(){},function(C){n(C,p)})});else{var w=new orion.git.widgets.RemotePrompterDialog({title:"Choose Branch",serviceRegistry:i,gitClient:v,treeRoot:{Children:q.RemoteLocation},hideNewBranch:true,func:b.hitch(this,function(y,C){v.doPush(y.Location,"HEAD",true,true,null,"Pushing remote: "+C.Name,t.gitSshUsername,t.gitSshPassword,t.knownHosts,t.gitPrivateKey,t.gitPassphrase).then(function(D){e.handleProgressServiceResponse2(D,i,function(){if(h.parentId==="explorer-tree"){if(!D||!D.HttpCode)b.query(".treeTableRow").forEach(function(E){b.toggleClass(E,
"outgoingCommitsdRow",false)})}else b.hitch(h,h.changedItem)()},function(E){n(E,p)})},function(D){e.handleProgressServiceResponse2(D,i,function(){},function(E){n(E,p)})})})});w.startup();w.show()}})};if(m.parameters&&m.parameters.optionsRequested){o(null,m.parameters.errorData);m.parameters.optionsRequested=false;m.parameters.errorData=null}else o(m)},visibleWhen:function(m){return m.toRef?m.RepositoryPath===""&&m.toRef.Type==="Branch"&&m.toRef.Current&&m.toRef.RemoteLocation:m.Type==="Branch"&&m.Current&&
m.RemoteLocation}});j.addCommand(l,"dom");j.addCommand(l,"object");l=new a.Command({name:"Force Push All",tooltip:"Push commits and tags from your local branch into the remote branch overriding its current content",imageClass:"git-sprite-push",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.pushForce",callback:function(m){if(confirm("You're going to override content of the remote branch. This can cause the remote repository to lose commits.\n\nAre you sure?")){var q=m.items,r=b.hash();if(q.toRef)q=
q.toRef;var n=function(p,s){if(p.JsonData.HostKey)o(s,p.JsonData);else if(s){s.parameters=p.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);s.parameters.errorData=p.JsonData;j._collectParameters(s)}else o(null,p.JsonData)},o=function(p,s){e.gatherSshCredentials(i,p,s).then(function(t){var v=
i.getService("orion.git.provider");if(q.RemoteLocation.length==1&&q.RemoteLocation[0].Children.length==1)v.doPush(q.RemoteLocation[0].Children[0].Location,"HEAD",true,true,null,"Pushing remote: "+r,t.gitSshUsername,t.gitSshPassword,t.knownHosts,t.gitPrivateKey,t.gitPassphrase).then(function(y){e.handleProgressServiceResponse2(y,i,function(){if(h.parentId==="explorer-tree"){if(!y||!y.HttpCode)b.query(".treeTableRow").forEach(function(C){b.toggleClass(C,"outgoingCommitsdRow",false)})}else b.hitch(h,
h.changedItem)()},function(C){n(C,p)})},function(y){e.handleProgressServiceResponse2(y,i,function(){},function(C){n(C,p)})});else{var w=new orion.git.widgets.RemotePrompterDialog({title:"Choose Branch",serviceRegistry:i,gitClient:v,treeRoot:{Children:q.RemoteLocation},hideNewBranch:true,func:b.hitch(this,function(y,C){v.doPush(y.Location,"HEAD",true,true,null,"Pushing remote: "+C.Name,t.gitSshUsername,t.gitSshPassword,t.knownHosts,t.gitPrivateKey,t.gitPassphrase).then(function(D){e.handleProgressServiceResponse2(D,
i,function(){if(h.parentId==="explorer-tree"){if(!D||!D.HttpCode)b.query(".treeTableRow").forEach(function(E){b.toggleClass(E,"outgoingCommitsdRow",false)})}else b.hitch(h,h.changedItem)()},function(E){n(E,p)})},function(D){e.handleProgressServiceResponse2(D,i,function(){},function(E){n(E,p)})})})});w.startup();w.show()}})};if(m.parameters&&m.parameters.optionsRequested){o(null,m.parameters.errorData);m.parameters.optionsRequested=false;m.parameters.errorData=null}else o(m)}},visibleWhen:function(m){if(m.toRef)return m.RepositoryPath===
""&&m.toRef.Type==="Branch"&&m.toRef.Current&&m.toRef.RemoteLocation}});j.addCommand(l,"dom");j.addCommand(l,"object");l=new a.Command({name:"Switch to Remote",tooltip:"Show the log for the corresponding remote tracking branch",id:"eclipse.orion.git.switchToRemote",hrefCallback:function(m){return c.toUrl("git/git-log.html")+"#"+m.items.toRef.RemoteLocation[0].Children[0].Location+"?page=1"},visibleWhen:function(m){return m.toRef!=null&&m.toRef.Type==="Branch"&&m.toRef.Current&&m.toRef.RemoteLocation&&
m.toRef.RemoteLocation.length===1&&m.toRef.RemoteLocation[0].Children.length===1}});j.addCommand(l,"dom");l=new a.Command({name:"< Previous Page",tooltip:"Show previous page of git log",id:"eclipse.orion.git.previousLogPage",hrefCallback:function(m){return c.toUrl("git/git-log.html")+"#"+m.items.PreviousLocation},visibleWhen:function(m){if(m.Type==="RemoteTrackingBranch"||m.toRef!=null&&m.toRef.Type==="Branch"||m.RepositoryPath!=null)return m.PreviousLocation!==undefined;return false}});j.addCommand(l,
"dom");l=new a.Command({name:"Next Page >",tooltip:"Show next page of git log",id:"eclipse.orion.git.nextLogPage",hrefCallback:function(m){return c.toUrl("git/git-log.html")+"#"+m.items.NextLocation},visibleWhen:function(m){if(m.Type==="RemoteTrackingBranch"||m.toRef!=null&&m.toRef.Type==="Branch"||m.RepositoryPath!=null)return m.NextLocation!==undefined;return false}});j.addCommand(l,"dom");l=new a.Command({name:"Switch to Active Local",tooltip:"Show the log for the active local branch",id:"eclipse.orion.git.switchToCurrentLocal",
hrefCallback:function(m){m=m.items;var q=new b.Deferred,r=m.CloneLocation;if(r==null)r=JSON.parse(m.responseText).JsonData.CloneLocation;var n=i.getService("orion.git.provider");b.xhrGet({url:r,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(o){n.getGitClone(o.Children[0].BranchLocation,function(p){b.forEach(p.Children,function(s){s.Current==true&&q.callback(c.toUrl("git/git-log.html")+"#"+s.CommitLocation+"?page=1")})})}});return q},visibleWhen:function(m){if(m.Type==="RemoteTrackingBranch")return true;
try{if(JSON.parse(m.responseText).JsonData)return true}catch(q){}return false}});j.addCommand(l,"dom");l=new a.Command({name:"Push to...",tooltip:"Push from your local branch into the selected remote branch",imageClass:"git-sprite-push",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.pushto",callback:function(m){var q=m.items;m={};for(var r in q.parent.parent.children)if(q.parent.parent.children[r].Name==="Remote")m=q.parent.parent.children[r];r=i.getService("orion.git.provider");m=new orion.git.widgets.RemotePrompterDialog({title:"Choose Branch",
serviceRegistry:i,gitClient:r,treeRoot:m,func:b.hitch(this,function(n,o,p){console.info("Branch "+n+" remote "+o+" new branch "+p)})});m.startup();m.show()},visibleWhen:function(){return false}});j.addCommand(l,"dom");j.addCommand(l,"object");l=new a.Command({name:"Reset",tooltip:"Reset your active branch to the state of the selected branch. Discard all staged and unstaged changes.",id:"eclipse.orion.git.resetIndex",imageClass:"git-sprite-reset",spriteClass:"gitCommandSprite",callback:function(m){var q=
m.items;if(confirm("The content of your active branch will be replaced with "+q.Name+". All unstaged and staged changes will be discarded and cannot be recovered. Are you sure?")){m=i.getService("orion.git.provider");var r=i.getService("orion.page.message");r.setProgressMessage("Resetting index...");m.resetIndex(q.IndexLocation,q.Name).then(function(){var n={};n.Severity="Info";n.HTML=false;n.Message="Ok";b.hitch(h,h.changedItem)(q);r.setProgressResult(n)},function(n){var o={};o.Severity="Error";
o.HTML=false;o.Message=n.message;r.setProgressResult(o)})}},visibleWhen:function(m){return m.Type==="RemoteTrackingBranch"}});j.addCommand(l,"object");l=new a.ParametersDescription([new a.CommandParameter("name","text","Name:")],false);l=new a.Command({name:"Tag",tooltip:"Create a tag for the commit",imageClass:"git-sprite-tag",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.addTag",parameters:l,callback:function(m){var q=m.items,r=function(o,p){i.getService("orion.git.provider").doAddTag(o,
p).then(function(){b.hitch(h,h.changedItem)(q)},k)},n=q.Location;m.parameters.valueFor("name")&&!m.parameters.optionsRequested?r(n,m.parameters.valueFor("name")):e.getNewItemName(q,h,false,m.domNode.id,"Tag name",function(o){!o&&o==""||r(n,o)})},visibleWhen:function(m){return m.Type==="Commit"}});j.addCommand(l,"object");j.addCommand(l,"dom");l=new a.Command({name:"Delete",tooltip:"Delete the tag from the repository",imageClass:"core-sprite-delete",id:"eclipse.removeTag",callback:function(m){var q=
m.items;confirm("Are you sure you want to delete tag "+q.Name+"?")&&i.getService("orion.git.provider").doRemoveTag(q.Location).then(function(){b.hitch(h,h.changedItem)(q.parent)},k)},visibleWhen:function(m){return m.Type==="Tag"}});j.addCommand(l,"object");l=new a.Command({name:"Cherry-Pick",tooltip:"Apply the change introduced by the commit to your active branch",id:"eclipse.orion.git.cherryPick",imageClass:"git-sprite-cherry_pick",spriteClass:"gitCommandSprite",callback:function(m){var q=m.items,
r=b.hash(),n=i.getService("orion.git.provider");m=q.Location.replace(q.Name,"HEAD");n.doCherryPick(m,q.Name,function(o){var p=[],s=q.Location.replace("commit/"+q.Name,"status");if(o.Result=="OK"){p.Severity="Ok";if(o.HeadUpdated){p.HTML=false;p.Message=o.Result;h.parentId==="explorer-tree"&&b.xhrGet({url:r,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(t){return t},error:function(t,v){console.error("HTTP status code: ",v.xhr.status)}}).then(function(t){t.HeadLocation?n.getLog(t.HeadLocation,
t.Id,"Getting git incoming changes",function(v){h.renderer.setIncomingCommits(v.Children);h.loadCommitsList(t.CommitLocation+"?page=1",t,true)}):n.getLog(r,"HEAD","Getting git outgoing changes",function(v){h.renderer.setOutgoingCommits(v.Children);h.loadCommitsList(r,t,true)})})}else{p.HTML=true;p.Message="<span>Nothing changed.</span>"}}else if(o.Result=="CONFLICTING"){p.Severity="Warning";p.HTML=true;p.Message="<span>"+o.Result+'. Some conflicts occurred. Go to <a href="'+c.toUrl("git/git-status.html")+
"#"+s+'">Git Status page</a>.<span>'}else if(o.Result=="FAILED"){p.Severity="Error";p.HTML=true;p.Message="<span>"+o.Result+'. Go to <a href="'+c.toUrl("git/git-status.html")+"#"+s+'">Git Status page</a>.<span>'}else{p.Severity="Warning";p.HTML=false;p.Message=o.Result}i.getService("orion.page.message").setProgressResult(p)},k)},visibleWhen:function(m){return m.Type==="Commit"}});j.addCommand(l,"object");j.addCommand(l,"dom")};e.createStatusCommands=function(i,j,h,k,l){var m=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(q){var r=q.items.Location,n=i.getService("orion.git.provider");e.getDefaultSshOptions(i).then(function(o){var p=arguments.callee;n.doFetch(r,false,null,o.gitSshUsername,o.gitSshPassword,o.knownHosts,o.gitPrivateKey,o.gitPassphrase).then(function(s){e.handleProgressServiceResponse(s,o,i,function(){b.xhrGet({url:r,headers:{"Orion-Version":"1"},
postData:b.toJson({GitSshUsername:o.gitSshUsername,GitSshPassword:o.gitSshPassword,GitSshPrivateKey:o.gitPrivateKey,GitSshPassphrase:o.gitPassphrase,GitSshKnownHost:o.knownHosts}),handleAs:"json",timeout:5E3,load:function(t){return t},error:function(t,v){console.error("HTTP status code: ",v.xhr.status)}}).then(function(t){n.getLog(t.HeadLocation,t.Id,"Getting git incoming changes",function(v){l._gitCommitNavigatorRem.renderer.setIncomingCommits(v.Children);l._gitCommitNavigatorRem.loadCommitsList(t.CommitLocation+
"?page=1&pageSize=5",t,true)})})},p,"Fetch Git Repository")},function(s){e.handleProgressServiceResponse(s,o,i,function(){},p,"Fetch Git Repository")})})},visibleWhen:function(q){return q.Type==="RemoteTrackingBranch"}});j.addCommand(m,"object");j.addCommand(m,"dom");j.registerCommandContribution("eclipse.orion.git.fetch",k+1);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(q){q=q.items;var r=i.getService("orion.git.provider"),n=i.getService("orion.page.message");r.doMerge(q.HeadLocation,q.Name).then(function(o){var p=[];if(o.jsonData&&(o.jsonData.Result=="FAST_FORWARD"||o.jsonData.Result=="ALREADY_UP_TO_DATE")){b.query(".treeTableRow").forEach(function(s){b.toggleClass(s,"incomingCommitsdRow",false)});p.Severity="Ok";p.HTML=false;p.Message=o.jsonData.Result;h();n.setProgressResult(p)}else if(o.jsonData){p.Severity="Warning";p.HTML=true;p.Message="<span>"+
o.jsonData.Result+"<span>";n.setProgressResult(p)}else if(o.error){p.Severity="Error";if(o.error.responseText&&JSON.parse(o.error.responseText)){o=JSON.parse(o.error.responseText);p.Message=o.DetailedMessage?o.DetailedMessage:o.Message}else p.Message=o.error.message;p.HTML=true;p.Message="<span>"+p.Message+"<span>";n.setProgressResult(p)}},function(o,p){o=[];o.Severity="Error";o.HTML=true;o.Message="<span>"+b.fromJson(p.xhr.responseText).DetailedMessage+"</span>";n.setProgressResult(o)})},visibleWhen:function(q){return q.Type===
"RemoteTrackingBranch"||q.Type==="Branch"&&!q.Current}});j.addCommand(m,"object");j.addCommand(m,"dom");j.registerCommandContribution("eclipse.orion.git.merge",k+2);m=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(q){var r=q.items,n=b.hash(),o=i.getService("orion.git.provider");if(r.RemoteLocation.length==1&&r.RemoteLocation[0].Children.length==1)e.getDefaultSshOptions(i).then(function(p){var s=
arguments.callee;o.doPush(r.RemoteLocation[0].Children[0].Location,"HEAD",true,false,null,"Pushing remote: "+n,p.gitSshUsername,p.gitSshPassword,p.knownHosts,p.gitPrivateKey,p.gitPassphrase).then(function(t){e.handleProgressServiceResponse(t,p,i,function(v){if(!v||!v.HttpCode){b.query(".treeTableRow").forEach(function(w){b.toggleClass(w,"outgoingCommitsdRow",false)});h()}},s,"Push Git Repository")},function(t){e.handleProgressServiceResponse(t,p,i,function(){},s,"Push Git Repository")})});else{q=
new orion.git.widgets.RemotePrompterDialog({title:"Choose Branch",serviceRegistry:i,gitClient:o,treeRoot:{Children:r.RemoteLocation},hideNewBranch:true,func:b.hitch(this,function(p,s){e.getDefaultSshOptions(i).then(function(t){var v=arguments.callee;o.doPush(p.Location,"HEAD",true,false,null,"Pushing remote: "+s,t.gitSshUsername,t.gitSshPassword,t.knownHosts,t.gitPrivateKey,t.gitPassphrase).then(function(w){e.handleProgressServiceResponse(w,t,i,function(y){if(!y||!y.HttpCode){b.query(".treeTableRow").forEach(function(C){b.toggleClass(C,
"outgoingCommitsdRow",false)});h()}},v,"Push Git Repository")})},function(t){e.handleProgressServiceResponse(t,options,i,function(){},func,"Pushing remote: "+s)})})});q.startup();q.show()}},visibleWhen:function(q){return q.Type==="LocalBranch"}});j.addCommand(m,"object");j.addCommand(m,"dom");j.registerCommandContribution("eclipse.orion.git.push",k+3)};e.createGitClonesCommands=function(i,j,h,k,l,m){function q(n){if(!(n.status===401||n.status===403)){var o=[];o.Severity="Error";o.HTML=false;try{var p=
JSON.parse(n.responseText);o.Message=p.DetailedMessage?p.DetailedMessage:p.Message}catch(s){o.Message=n.message}i.getService("orion.page.message").setProgressResult(o)}}function r(n){if(b.isArray(n))n=n.length>1?{}:n[0];return n}k=new a.ParametersDescription([new a.CommandParameter("key","text","Key:"),new a.CommandParameter("value","text","Value:")],false);k=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:k,callback:function(n){var o=n.items,p=i.getService("orion.git.provider");n.parameters.valueFor("key")&&n.parameters.valueFor("value")&&p.addCloneConfigurationProperty(o.ConfigLocation,n.parameters.valueFor("key"),n.parameters.valueFor("value")).then(function(){b.hitch(h,h.changedItem)(o)},q)}});j.addCommand(k,"dom");k=new a.ParametersDescription([new a.CommandParameter("value","text","Value:")],false);k=new a.Command({name:"Edit",tooltip:"Edit the configuration entry",imageClass:"core-sprite-edit",
id:"eclipse.orion.git.editConfigEntryCommand",parameters:k,callback:function(n){var o=n.items,p=i.getService("orion.git.provider");n.parameters.valueFor("value")&&p.editCloneConfigurationProperty(o.Location,n.parameters.valueFor("value")).then(function(){b.hitch(h,h.changedItem)(o)},q)},visibleWhen:function(n){return n.Key&&n.Value&&n.Location}});j.addCommand(k,"object");k=new a.Command({name:"Delete",tooltip:"Delete the configuration entry",imageClass:"core-sprite-delete",id:"eclipse.orion.git.deleteConfigEntryCommand",
callback:b.hitch(this,function(n){var o=n.items;n=i.getService("orion.git.provider");confirm("Are you sure you want to delete "+o.Key+"?")&&n.deleteCloneConfigurationProperty(o.Location).then(function(){b.hitch(h,h.changedItem)(o)},q)}),visibleWhen:function(n){return n.Key&&n.Value&&n.Location}});j.addCommand(k,"object");k=new a.ParametersDescription([new a.CommandParameter("url","url","Repository URL:")],true);k=new a.Command({name:"Clone Repository",tooltip:"Clone an existing Git repository to a folder",
id:"eclipse.cloneGitRepository",parameters:k,callback:function(n){var o=i.getService("orion.git.provider"),p=function(s,t,v){e.getDefaultSshOptions(i).then(function(w){var y=arguments.callee;o.cloneGitRepository(v,s,t,h.defaultPath,w.gitSshUsername,w.gitSshPassword,w.knownHosts,w.gitPrivateKey,w.gitPassphrase).then(function(C){e.handleProgressServiceResponse(C,w,i,function(){h.redisplayClonesList&&b.hitch(h,h.redisplayClonesList)()},y,"Clone Git Repository")},function(C){e.handleProgressServiceResponse(C,
w,i,function(){},y,"Clone Git Repository")})})};if(n.parameters.valueFor("url")&&!n.parameters.optionsRequested)p(n.parameters.valueFor("url"));else{n=new orion.git.widgets.CloneGitRepositoryDialog({serviceRegistry:i,fileClient:m,url:n.parameters.valueFor("url"),alwaysShowAdvanced:n.parameters.optionsRequested,func:p});n.startup();n.show()}},visibleWhen:function(){return true}});j.addCommand(k,"dom");k=new a.ParametersDescription([new a.CommandParameter("folderName","text","New folder:")],true);k=
new a.Command({name:"Init Repository",tooltip:"Create a new Git repository in a new folder",id:"eclipse.initGitRepository",parameters:k,callback:function(n){var o=i.getService("orion.git.provider"),p=function(s,t,v){e.getDefaultSshOptions(i).then(function(w){var y=arguments.callee;o.cloneGitRepository(v,s,t,h.defaultPath).then(function(C){e.handleProgressServiceResponse(C,w,i,function(){h.redisplayClonesList&&b.hitch(h,h.redisplayClonesList)()},y,"Init Git Repository")},function(C){e.handleProgressServiceResponse(C,
w,i,function(){},y,"Init Git Repository")})})};if(n.parameters.valueFor("folderName")&&!n.parameters.optionsRequested)p(null,null,n.parameters.valueFor("folderName"));else{n=new orion.git.widgets.CloneGitRepositoryDialog({serviceRegistry:i,title:"Init Git Repository",fileClient:m,advancedOnly:true,func:p});n.startup();n.show()}},visibleWhen:function(){return true}});j.addCommand(k,"dom");k=new a.Command({name:"Delete",tooltip:"Delete the repository",imageClass:"core-sprite-delete",id:"eclipse.git.deleteClone",
visibleWhen:function(n){n=b.isArray(n)?n:[n];if(n.length===0)return false;for(var o=0;o<n.length;o++)if(!n[o].ContentLocation)return false;return true},callback:function(n){var o=n.items;n=i.getService("orion.git.provider");if(b.isArray(o)){if(confirm("Are you sure you want do delete "+o.length+" repositories?"))for(var p=0,s=0;s<o.length;s++)n.removeGitRepository(o[s].Location).then(function(){p++;p>=o.length&&h.redisplayClonesList&&b.hitch(h,h.redisplayClonesList)()},q)}else confirm("Are you sure you want to delete "+
o.Name+"?")&&n.removeGitRepository(o.Location).then(function(){h.redisplayClonesList&&b.hitch(h,h.redisplayClonesList)()},this.displayErrorOnStatus)}});j.addCommand(k,"object");j.addCommand(k,"dom");k=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(n){n=r(n.items);n=new orion.git.widgets.ApplyPatchDialog({title:"Apply Patch",diffLocation:n.DiffLocation});
n.startup();n.show()},visibleWhen:function(n){return n.Type==="Clone"}});j.addCommand(k,"object");k=new a.ParametersDescription([new a.CommandParameter("commitName","text","Commit name:")],true);k=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:k,callback:function(n){var o=function(t,v,w){if(w==null)w=new b.Deferred;t.length>0?i.getService("orion.git.provider").doGitLog("/gitapi/commit/"+
n.parameters.valueFor("commitName")+t[0].ContentLocation+"?page=1&pageSize=1",null,null,"Looking for the commit").then(function(y){w.callback(y.Children[0].Location)},function(){o(t.slice(1),v,w)}):w.errback();return w},p=function(t){if(n.parameters.optionsRequested)(new orion.git.widgets.OpenCommitDialog({repositories:t,serviceRegistry:i,commitName:n.parameters.valueFor("commitName")})).show();else{i.getService("orion.page.message").setProgressMessage("Looking for the commit");o(t,n.parameters.valueFor("commitName")).then(function(v){v!==
null&&window.open("/git/git-commit.html#"+v+"?page=1&pageSize=1")},function(){var v=[];v.Severity="warning";v.HTML=false;v.Message="No commits found";i.getService("orion.page.message").setProgressResult(v)})}};if(n.items.Type==="Clone"){var s=[n.items];p(s)}else if(n.items.CloneLocation)i.getService("orion.git.provider").getGitClone(n.items.CloneLocation).then(function(t){p(t.Children)});else{s=n.items;p(s)}},visibleWhen:function(n){return n.Type==="Clone"||n.CloneLocation||n.length>1&&n[0].Type===
"Clone"}});j.addCommand(k,"dom");k=new a.Command({name:"Show in GitHub",tooltip:"Show this repository at GitHub",id:"orion.git.gotoGithub",hrefCallback:function(n){n=/github\.com.*\.git/.exec(n.items.GitUrl)[0];n=n.replace(":","/");return"https://"+n.substring(0,n.length-4)},visibleWhen:function(n){return n.GitUrl&&/github\.com.*\.git/.exec(n.GitUrl)}});j.addCommand(k,"dom");k=new a.Command({name:"Show in eclipse.org",tooltip:"Show this repository at eclipse.org",id:"orion.git.gotoEclipseGit",hrefCallback:function(n){n=
n.items;var o=n.GitUrl.indexOf("git.eclipse.org/gitroot");if(o>-1)return"http://git.eclipse.org/c"+n.GitUrl.substr(o+23,n.GitUrl.length)},visibleWhen:function(n){return n.GitUrl&&n.GitUrl.indexOf("git.eclipse.org/gitroot")>-1}});j.addCommand(k,"dom")}})();return e});
define("orion/git/widgets/CommitTooltipDialog",["require","dojo","dijit","orion/util","dijit/TooltipDialog"],function(c,b,a){b.declare("orion.git.widgets.CommitTooltipDialog",[a.TooltipDialog],{widgetsInTemplate:false,closable:true,constructor:function(){this.inherited(arguments);this.options=arguments[0]||{}},postCreate:function(){this.inherited(arguments);this.displayCommit(this.options.commit)},displayCommit:function(d){var e=b.create("div",{style:"padding:10px; max-width:480px"},this.containerNode),
f=d.Message.split(/(\r?\n|$)/)[0];link=b.create("a",{"class":"gitMainDescription",href:"/git/git-commit.html#"+d.Location+"?page=1&pageSize=1"},e);b.place(document.createTextNode(f),link);b.create("div",{style:"padding-top:15px"},e);b.create("span",{"class":"gitSecondaryDescription",innerHTML:" commit: "+d.Name},e);if(d.Parents&&d.Parents.length>0){b.create("div",null,e);b.place(document.createTextNode("parent: "),e);link=b.create("a",{"class":"gitSecondaryDescription",href:"/git/git-commit.html#"+
d.Parents[0].Location+"?page=1&pageSize=1"},e);b.place(document.createTextNode(d.Parents[0].Name),link)}b.create("div",{style:"padding-top:15px"},e);if(d.AuthorImage){f=b.create("div",{"class":"git-author-icon-small",style:"margin-bottom:30px"},e);var g=new Image;g.src=d.AuthorImage;g.name=d.AuthorName;g.width=35;g.height=35;b.place(g,f,"first")}b.create("span",{"class":"gitSecondaryDescription",innerHTML:" authored by "+d.AuthorName+" ("+d.AuthorEmail+") on "+b.date.locale.format(new Date(d.Time),
{formatLength:"short"})},e);b.create("div",null,e);b.create("span",{"class":"gitSecondaryDescription",innerHTML:"committed by "+d.CommitterName+" ("+d.CommitterEmail+")"},e)},_onBlur:function(){this.inherited(arguments);a.popup.hide&&a.popup.hide(this);a.popup.close(this)}})});
define("orion/git/gitRepositoryExplorer",["require","dojo","orion/explorer","orion/util","orion/PageUtil","orion/globalCommands","orion/breadcrumbs","orion/git/gitCommands","orion/git/widgets/CommitTooltipDialog"],function(c,b,a,d,e,f,g,i){a={};a.GitRepositoryExplorer=function(){function j(h,k,l,m,q,r,n){this.parentId=q;this.registry=h;this.linkService=l;this.commandService=k;this.selection=m;this.parentId=q;this.toolbarId=r;this.selectionToolsId=n;this.checkbox=false}j.prototype.handleError=function(h){var k=
{};k.Severity="Error";k.HTML=false;try{var l=JSON.parse(h.responseText);k.Message=l.DetailedMessage?l.DetailedMessage:l.Message}catch(m){k.Message=h.message}this.registry.getService("orion.page.message").setProgressResult(k);if(h.status===404){this.initTitleBar();this.displayRepositories()}};j.prototype.setDefaultPath=function(h){this.defaultPath=h};j.prototype.changedItem=function(){this.redisplayClonesList()};j.prototype.redisplayClonesList=function(){var h=e.matchResourceParameters();if(h.resource)this.displayRepository(h.resource);
else{h=d.makeRelative(this.defaultPath);var k=c.toUrl("gitapi/clone._");k=k.substring(0,k.length-2);this.displayRepository(h[0]==="/"?k+h:k+"/"+h)}};j.prototype.displayRepository=function(h){var k=this,l=this.registry.getService("orion.page.message");l.setProgressMessage("Loading...");this.registry.getService("orion.git.provider").getGitClone(h).then(function(m){if(m.Children.length===0){k.initTitleBar({});k.displayRepositories([],"full")}else if(m.Children.length==1&&m.Children[0].Type==="Clone"){m=
m.Children;k.initTitleBar(m[0]);k.displayRepositories(m);k.displayStatus(m[0]);k.displayCommits(m[0]);k.displayBranches(m[0]);k.displayTags(m[0]);k.displayRemotes(m[0]);k.displayConfig(m[0])}else if(m.Children[0].Type==="Clone"){m=m.Children;k.initTitleBar(m);k.displayRepositories(m,"full",true)}else if(m.Children[0].Type==="Branch"){m=m.Children;k.registry.getService("orion.git.provider").getGitClone(m[0].CloneLocation).then(function(q){q=q.Children;k.initTitleBar(q[0],"Branches");k.displayRepositories(q,
"mini",true);k.displayBranches(q[0],"full");k.displayRemoteBranches(q[0],"full")},function(){b.hitch(k,k.handleError)(error)})}else if(m.Children[0].Type==="Tag"){m=m.Children;k.registry.getService("orion.git.provider").getGitClone(m[0].CloneLocation).then(function(q){q=q.Children;k.initTitleBar(q[0],"Tags");k.displayRepositories(q,"mini",true);k.displayTags(q[0],"full")},function(){b.hitch(k,k.handleError)(error)})}else m.Children[0].Type==="Config"&&k.registry.getService("orion.git.provider").getGitClone(m.CloneLocation).then(function(q){q=
q.Children;k.initTitleBar(q[0],"Configuration");k.displayRepositories(q,"mini",true);k.displayConfig(q[0],"full")},function(){b.hitch(k,k.handleError)(error)});k.commandService.processURL(window.location.href);l.setProgressMessage("")},function(m){b.hitch(k,k.handleError)(m)})};j.prototype.initTitleBar=function(h,k){var l=this,m={};i.updateNavTools(l.registry,l,"pageActions","selectionTools",h);if(h&&h.Type==="Clone"&&k){h=h;m.Name=k;m.Parents=[];m.Parents[0]={};m.Parents[0].Name=h.Name;m.Parents[0].Location=
h.Location;m.Parents[0].ChildrenLocation=h.Location;m.Parents[1]={};m.Parents[1].Name="Repositories";k=k+" on "+h.Name+" - Git"}else if(h&&h.Type==="Clone"){h=h;m.Name=h.Name;m.Parents=[];m.Parents[0]={};m.Parents[0].Name="Repositories";k=h.Name+" - Git"}else{m.Name="Repositories";k="Repositories - Git"}document.title=k;k=b.byId("location");new g.BreadCrumbs({container:k,resource:m,makeHref:function(q,r){l.makeHref(q,r)}})};j.prototype.makeHref=function(h,k){h.href="/git/git-repository.html#"+(k?
k:"")};j.prototype.decorateRepositories=function(h,k,l){var m=this;if(l==null)l=new b.Deferred;h.length>0?this.registry.getService("orion.core.file").loadWorkspace(h[0].ContentLocation+"?parts=meta").then(function(q){h[0].Content={};var r="root / ";if(q.Parents!=null)for(var n=q.Parents.length;n>0;n--)r+=q.Parents[n-1].Name+" / ";r+=q.Name;h[0].Content.Path=r;k!=="full"?m.decorateRepositories(h.slice(1),k,l):m.registry.getService("orion.git.provider").getGitStatus(h[0].StatusLocation).then(function(o){h[0].Status=
o;m.registry.getService("orion.git.provider").getGitBranch(h[0].BranchLocation).then(function(p){p=p.Children;for(var s,t=0;t<p.length;t++)if(p[t].Current){s=p[t];break}if(s.RemoteLocation[0]!=null)s.RemoteLocation.length==1&&s.RemoteLocation[0].Children.length===1&&s.RemoteLocation[0].Children[0].CommitLocation?m.registry.getService("orion.git.provider").getLog(s.RemoteLocation[0].Children[0].CommitLocation+"?page=1&pageSize=20","HEAD","",function(v){h[0].CommitsToPush=v.Children.length}):m.registry.getService("orion.git.provider").doGitLog(s.CommitLocation+
"?page=1&pageSize=20",function(v){h[0].CommitsToPush=v.Children.length});m.decorateRepositories(h.slice(1),k,l)})})}):l.callback();return l};j.prototype.displayRepositories=function(h,k,l){var m=this,q=b.byId("table");b.empty(q);var r=b.create("div",{"class":"auxpaneHeading sectionWrapper toolComposite",id:"repositorySectionHeader"},q);b.create("span",{"class":"git-decor-icon gitImageSprite git-sprite-repository"},r);b.create("div",{id:"repositorySectionTitle","class":"layoutLeft",innerHTML:k==="full"?
"Repositories":"Repository"},r);b.create("div",{id:"repositorySectionActionsArea","class":"layoutRight sectionActions"},r);if(!h||h.length===0)b.byId("repositorySectionTitle").innerHTML=k==="full"?"No Repositories":"Repository Not Found";else{b.place('<div class="git-table"><div class="plugin-settings"><list id="repositoryNode" class="plugin-settings-list"></list></div></div>',q);this.decorateRepositories(h,k).then(function(){for(var n=0;n<h.length;n++)m.renderRepository(h[n],n,h.length,k,l)})}};
j.prototype.renderRepository=function(h,k,l,m,q){k=b.create("div",{"class":"git-list-item "+(l==1?"":k%2?"darkTreeTableRow":"lightTreeTableRow")},b.byId("repositoryNode"));k=b.create("div",null,k);l=b.create("div",{"class":"stretch"},k);var r=b.create("span",{"class":"gitMainDescription"},l);if(q){link=b.create("a",{"class":"navlinkonpage",href:"/git/git-repository.html#"+h.Location},r);b.place(document.createTextNode(h.Name),link)}else b.place(document.createTextNode(h.Name),r);b.create("div",null,
l);b.create("span",{"class":"gitSecondaryDescription",innerHTML:h.GitUrl!=null?h.GitUrl:"(no remote)"},l);b.create("div",null,l);b.create("span",{"class":"gitSecondaryDescription",innerHTML:"location: "+h.Content.Path},l);q=h.Status;if(m==="full"){m=q.Untracked.length+q.Conflicting.length+q.Modified.length;q=q.Changed.length+q.Added.length+q.Removed.length;m=m>0||q>0?m+" file(s) to stage and "+q+" file(s) to commit.":"Nothing to commit.";b.create("div",{style:"padding-top:10px"},l);b.create("span",
{"class":"gitSecondaryDescription",style:"padding-left:10px",innerHTML:m},l);m=h.CommitsToPush;b.create("span",{"class":"gitSecondaryDescription",style:"padding-left:10px",innerHTML:m>0?m+" commit(s) to push.":"Nothing to push."},l)}this.commandService.renderCommands(b.create("div",{id:"repositoryActionsArea","class":"git-action-area"},k),"object",h,this,"tool")};j.prototype.displayStatus=function(h){var k=h.StatusLocation,l=this,m=b.byId("table"),q=b.create("div",{"class":"auxpaneHeading sectionWrapper toolComposite",
id:"workingDirectorySectionHeader"},m);b.create("div",{id:"workingDirectorySectionTitle","class":"layoutLeft",innerHTML:"Working Directory"},q);b.create("div",{id:"workingDirectorySectionActionsArea","class":"layoutRight sectionActions"},q);b.place('<div class="git-table"><div class="plugin-settings"><list id="workingDirectoryNode" class="plugin-settings-list"></list></div></div>',m);this.registry.getService("orion.git.provider").getGitBranch(k).then(function(r){l.renderStatus(h,r)},function(){})};
j.prototype.renderStatus=function(h,k){var l=b.create("div",{"class":"git-list-item"},b.byId("workingDirectoryNode"));l=b.create("div",null,l);var m=k.Untracked.length+k.Conflicting.length+k.Modified.length;k=k.Changed.length+k.Added.length+k.Removed.length;var q="You have no changes to commit.";if(m>0||k>0)q="You have changes to commit in your workspace!";var r=b.create("div",{"class":"vbox stretch details-view"},l);b.create("span",{"class":"gitMainDescription",innerHTML:q},r);b.create("div",null,
r);b.create("span",{"class":"gitSecondaryDescription",innerHTML:m+" file(s) to stage and "+k+" file(s) to commit."},r);this.commandService.renderCommands(b.create("div",{id:"statusActionsArea","class":"git-action-area"},l),"object",h,this,"tool")};j.prototype.decorateBranches=function(h,k){var l=this;if(k==null)k=new b.Deferred;h.length>0?this.registry.getService("orion.git.provider").doGitLog(h[0].CommitLocation+"?page=1&pageSize=1").then(function(m){h[0].Commit=m.Children[0];l.decorateBranches(h.slice(1),
k)}):k.callback();return k};j.prototype.displayBranches=function(h,k){var l=h.BranchLocation,m=this,q=b.byId("table"),r=b.create("div",{"class":"auxpaneHeading sectionWrapper toolComposite",id:"branchSectionHeader"},q);b.create("span",{"class":"git-decor-icon gitImageSprite git-sprite-branch"},r);b.create("div",{id:"branchSectionTitle","class":"layoutLeft",innerHTML:"Branches"},r);b.create("div",{id:"branchSectionProgress","class":"sectionProgress layoutLeft",innerHTML:"..."},r);b.create("div",{id:"branchSectionActionsArea",
"class":"layoutRight sectionActions"},r);b.place('<div id="branchSectionHeaderslideContainer" class="layoutBlock slideParameters slideContainer"><span id="branchSectionHeaderslideOut" class="slide"><span id="branchSectionHeaderpageCommandParameters" class="parameters"></span><span id="branchSectionHeaderpageCommandDismiss" class="parametersDismiss"></span></span></div>',r);b.place('<div class="git-table"><div class="plugin-settings"><list id="branchNode" class="plugin-settings-list"></list></div></div>',
q);this.registry.getService("orion.git.provider").getGitBranch(l+(k==="full"?"?commits=1":"?commits=1&page=1&pageSize=5")).then(function(n){n=n.Children;b.style(b.byId("branchSectionProgress"),"visibility","hidden");if(k!=="full"&&n.length!==0){m.commandService.registerCommandContribution("eclipse.orion.git.repositories.viewAllCommand",10,"branchSectionActionsArea");m.commandService.renderCommands(b.byId("branchSectionActionsArea"),"dom",{ViewAllLink:"/git/git-repository.html#"+l+"?page=1",ViewAllLabel:"View All",
ViewAllTooltip:"View all local and remote tracking branches"},m,"button")}m.commandService.registerCommandContribution("eclipse.addBranch",2E3,"branchSectionActionsArea");m.commandService.renderCommands(b.byId("branchSectionActionsArea"),"dom",h,this,"button");for(var o=0;o<n.length;o++){n[o].ParentLocation=l;m.renderBranch(n[o],o)}},function(n){b.hitch(m,m.handleError)(n)})};j.prototype.renderBranch=function(h,k){k=b.create("div",{"class":"git-list-item "+(k%2?"darkTreeTableRow":"lightTreeTableRow")},
b.byId("branchNode"));k=b.create("div",null,k);var l=b.create("div",{"class":"stretch"},k);h.Current&&b.create("span",{"class":"git-decor-icon gitImageSprite git-sprite-branch_active"},l);b.create("span",{"class":"gitMainDescription "+(h.Current?"activeBranch":""),innerHTML:h.Name},l);b.create("div",null,l);var m=h.Commit.Children[0];b.create("span",{"class":"gitSecondaryDescription",innerHTML:(h.RemoteLocation.length==1&&h.RemoteLocation[0].Children.length==1?"tracks "+h.RemoteLocation[0].Children[0].Name+
", ":"tracks no branch, ")+"last modified "+b.date.locale.format(new Date(m.Time),{formatLength:"short"})+" by "+m.AuthorName},l);this.commandService.renderCommands(b.create("div",{id:"branchActionsArea","class":"git-action-area"},k),"object",h,this,"tool")};j.prototype.displayRemoteBranches=function(h){var k=h.RemoteLocation,l=this,m=b.byId("table"),q=b.create("div",{"class":"auxpaneHeading sectionWrapper toolComposite",id:"remoteBranchSectionHeader"},m);b.create("span",{"class":"git-decor-icon gitImageSprite git-sprite-branch"},
q);b.create("div",{id:"remoteBranchSectionTitle","class":"layoutLeft",innerHTML:"Remote Branches"},q);b.create("div",{id:"remoteBranchSectionProgress","class":"sectionProgress layoutLeft",innerHTML:"..."},q);b.create("div",{id:"remoteBranchSectionActionsArea","class":"layoutRight sectionActions"},q);b.place('<div class="git-table"><div class="plugin-settings"><list id="remoteBranchNode" class="plugin-settings-list"></list></div></div>',m);this.registry.getService("orion.git.provider").getGitRemote(k).then(function(r){r=
r.Children;b.style(b.byId("remoteBranchSectionProgress"),"visibility","hidden");if(r.length===0)b.byId("remoteBranchSectionTitle").innerHTML="No Remote Branches";else l.displayRemoteBranches2(r,h)},function(){})};j.prototype.displayRemoteBranches2=function(h,k,l,m){var q=this;if(l==null)l=new b.Deferred;if(h.length>0)this.registry.getService("orion.git.provider").getGitRemote(h[0].Location).then(function(r){r=r.Children;for(var n=0;n<r.length;n++){r[n].Repository=k;q.renderRemoteBranch(r[n],n)}q.displayRemoteBranches2(h.slice(1),
k,l,m||r.length>0)},function(){});else{if(!m){b.style(b.byId("remoteBranchSectionProgress"),"visibility","hidden");b.byId("remoteBranchSectionTitle").innerHTML="No Remote Branches"}l.callback()}return l};j.prototype.renderRemoteBranch=function(h,k){k=b.create("div",{"class":"git-list-item "+(k%2?"darkTreeTableRow":"lightTreeTableRow")},b.byId("remoteBranchNode"));k=b.create("div",null,k);var l=b.create("div",{"class":"vbox stretch details-view"},k);b.create("span",{"class":"gitMainDescription",innerHTML:h.Name},
l);b.create("div",null,l);this.commandService.renderCommands(b.create("div",{id:"branchActionsArea","class":"git-action-area"},k),"object",h,this,"tool")};j.prototype.displayCommits=function(h){var k=this,l=b.byId("table"),m=b.create("div",{"class":"auxpaneHeading sectionWrapper toolComposite",id:"commitSectionHeader"},l);b.create("div",{id:"commitSectionTitle","class":"layoutLeft",innerHTML:"Commits"},m);b.create("div",{id:"commitSectionProgress","class":"sectionProgress layoutLeft",innerHTML:"..."},
m);b.create("div",{id:"commitSectionActionsArea","class":"layoutRight sectionActions"},m);b.place('<div id="commitSectionHeaderslideContainer" class="layoutBlock slideParameters slideContainer"><span id="commitSectionHeaderslideOut" class="slide"><span id="commitSectionHeaderpageCommandParameters" class="parameters"></span><span id="commitSectionHeaderpageCommandDismiss" class="parametersDismiss"></span></span></div>',m);b.place('<div class="git-table"><div class="plugin-settings"><list id="commitNode" class="plugin-settings-list"></list></div></div>',
l);this.registry.getService("orion.git.provider").getGitBranch(h.BranchLocation).then(function(q){q=q.Children;for(var r,n=0;n<q.length;n++)if(q[n].Current){r=q[n];break}q=r.RemoteLocation.length==1&&r.RemoteLocation[0].Children.length===1;b.byId("commitSectionTitle").innerHTML='Commits for "'+r.Name+'" branch';k.commandService.registerCommandContribution("eclipse.orion.git.repositories.viewAllCommand",10,"commitSectionActionsArea");k.commandService.renderCommands(b.byId("commitSectionActionsArea"),
"dom",{ViewAllLink:"/git/git-log.html#"+r.CommitLocation+"?page=1",ViewAllLabel:"See Full Log",ViewAllTooltip:"See the full log"},k,"button");if(q){k.commandService.registerCommandContribution("eclipse.orion.git.fetch",100,"commitSectionActionsArea");k.commandService.registerCommandContribution("eclipse.orion.git.merge",100,"commitSectionActionsArea");k.commandService.registerCommandContribution("eclipse.orion.git.rebase",100,"commitSectionActionsArea");k.commandService.registerCommandContribution("eclipse.orion.git.resetIndex",
100,"commitSectionActionsArea");k.commandService.renderCommands(b.byId("commitSectionActionsArea"),"dom",r.RemoteLocation[0].Children[0],k,"button")}k.commandService.registerCommandContribution("eclipse.orion.git.push",100,"commitSectionActionsArea");k.commandService.renderCommands(b.byId("commitSectionActionsArea"),"dom",r,k,"button");if(r.RemoteLocation[0]==null){b.style(b.byId("commitSectionProgress"),"visibility","hidden");k.renderNoCommit()}else q&&r.RemoteLocation[0].Children[0].CommitLocation?
k.registry.getService("orion.git.provider").getLog(r.RemoteLocation[0].Children[0].CommitLocation+"?page=1&pageSize=20","HEAD","",function(o){b.style(b.byId("commitSectionProgress"),"visibility","hidden");for(var p=o.Children.length,s=0;s<o.Children.length;s++)k.renderCommit(o.Children[s],true,s);k.registry.getService("orion.git.provider").getLog(r.CommitLocation+"?page=1&pageSize=20",r.RemoteLocation[0].Children[0].Id,"",function(t){for(var v=0;v<t.Children.length;v++)k.renderCommit(t.Children[v],
false,v+p);p+=t.Children.length;p==0&&k.renderNoCommit()})}):k.registry.getService("orion.git.provider").doGitLog(r.CommitLocation+"?page=1&pageSize=20",function(o){b.style(b.byId("commitSectionProgress"),"visibility","hidden");for(var p=0;p<o.Children.length;p++)k.renderCommit(o.Children[p],true,p);o.Children.length==0&&k.renderNoCommit()})})};j.prototype.renderNoCommit=function(){var h=b.create("div",{"class":"git-list-item"},b.byId("commitNode"));h=b.create("div",null,h);h=b.create("div",{"class":"stretch"},
h);b.create("span",{"class":"gitMainDescription",innerHTML:"The branch is up to date."},h);b.create("div",null,h);b.create("span",{"class":"gitSecondaryDescription",innerHTML:"You have no outgoing or incoming commits."},h)};j.prototype.renderCommit=function(h,k,l){l=b.create("div",{"class":"git-list-item "+(l%2?"darkTreeTableRow":"lightTreeTableRow")},b.byId("commitNode"));l=b.create("div",null,l);b.create("span",{"class":"git-decor-icon gitImageSprite "+(k?"git-sprite-outgoing_commit":"git-sprite-incoming_commit")},
l);if(h.AuthorImage){k=b.create("span",{"class":"git-author-icon"},l);var m=new Image;m.src=h.AuthorImage;m.name=h.AuthorName;m.width=30;m.height=30;b.place(m,k,"first")}k=b.create("div",{"class":"stretch"},l);var q=b.create("a",{"class":"gitMainDescription navlinkonpage",href:"/git/git-commit.html#"+h.Location+"?page=1&pageSize=1"},k);b.place(document.createTextNode(h.Message),q);var r,n=new orion.git.widgets.CommitTooltipDialog({commit:h,onMouseLeave:function(){dijit.popup.hide&&dijit.popup.hide(n);
dijit.popup.close(n)},onMouseEnter:function(){clearTimeout(r)}});b.connect(q,"onmouseover",q,function(){clearTimeout(r);r=setTimeout(function(){dijit.popup.open({popup:n,around:q,orient:{BR:"TL",TR:"BL"}})},600)});b.connect(q,"onmouseout",q,function(){clearTimeout(r);r=setTimeout(function(){dijit.popup.hide&&dijit.popup.hide(n);dijit.popup.close(n)},200)});b.create("div",null,k);b.create("span",{"class":"gitSecondaryDescription",innerHTML:" (SHA "+h.Name+") by "+h.AuthorName+" on "+b.date.locale.format(new Date(h.Time),
{formatLength:"short"})},k);this.commandService.renderCommands(b.create("div",{id:"branchActionsArea","class":"git-action-area"},l),"object",h,this,"tool")};j.prototype.decorateTags=function(h,k){var l=this;if(k==null)k=new b.Deferred;h.length>0?this.registry.getService("orion.git.provider").doGitLog(h[0].CommitLocation+"?page=1&pageSize=1").then(function(m){h[0].Commit=m.Children[0];l.decorateTags(h.slice(1),k)}):k.callback();return k};j.prototype.displayTags=function(h,k){var l=h.TagLocation,m=
this,q=b.byId("table"),r=b.create("div",{"class":"auxpaneHeading sectionWrapper toolComposite",id:"tagSectionHeader"},q);b.create("span",{"class":"git-decor-icon gitImageSprite git-sprite-tag"},r);b.create("div",{id:"tagSectionTitle","class":"layoutLeft",innerHTML:"Tags"+(k==="full"?"":" (5 most recent)")},r);b.create("div",{id:"tagSectionProgress","class":"sectionProgress layoutLeft",innerHTML:"..."},r);b.create("div",{id:"viewAllTagSectionActionsArea","class":"layoutRight sectionActions"},r);b.place('<div class="git-table"><div class="plugin-settings"><list id="tagNode" class="plugin-settings-list"></list></div></div>',
q);this.registry.getService("orion.git.provider").getGitBranch(l+(k==="full"?"":"?commits=1&page=1&pageSize=5")).then(function(n){var o=n.Children.slice(0,5);if(k==="full")o=n.Children;b.style(b.byId("tagSectionProgress"),"visibility","hidden");if(k!=="full"&&o.length!==0){m.commandService.registerCommandContribution("eclipse.orion.git.repositories.viewAllCommand",10,"viewAllTagSectionActionsArea");m.commandService.renderCommands(b.byId("viewAllTagSectionActionsArea"),"dom",{ViewAllLink:"/git/git-repository.html#"+
l+"?page=1",ViewAllLabel:"View All",ViewAllTooltip:"View all tags"},m,"button")}if(o.length===0)b.byId("tagSectionTitle").innerHTML="No Tags";else for(n=0;n<o.length;n++){o[n].Repository=h;m.renderTag(o[n],n)}},function(n){b.hitch(m,m.handleError)(n)})};j.prototype.renderTag=function(h,k){k=b.create("div",{"class":"git-list-item "+(k%2?"darkTreeTableRow":"lightTreeTableRow")},b.byId("tagNode"));k=b.create("div",null,k);var l=b.create("div",{"class":"stretch"},k);b.create("span",{"class":"gitMainDescription",
innerHTML:h.Name},l);b.create("div",null,l);if(h.Commit){l=b.create("span",{"class":"tag-description"},l);var m=h.Commit.Children[0],q=b.create("a",{"class":"navlinkonpage",href:"/git/git-commit.html#"+m.Location+"?page=1&pageSize=1"},l);b.place(document.createTextNode(m.Message),q);b.place(document.createTextNode(" by "+m.AuthorName+" on "+b.date.locale.format(new Date(m.Time),{formatLength:"short"})),l,"last");var r,n=new orion.git.widgets.CommitTooltipDialog({commit:m,onMouseLeave:function(){dijit.popup.hide&&
dijit.popup.hide(n);dijit.popup.close(n)},onMouseEnter:function(){clearTimeout(r)}});b.connect(q,"onmouseover",q,function(){clearTimeout(r);r=setTimeout(function(){dijit.popup.open({popup:n,around:q,orient:{BR:"TL",TR:"BL"}})},600)});b.connect(q,"onmouseout",q,function(){clearTimeout(r);r=setTimeout(function(){dijit.popup.hide&&dijit.popup.hide(n);dijit.popup.close(n)},200)})}this.commandService.renderCommands(b.create("div",{id:"tagActionsArea","class":"git-action-area"},k),"object",h,this,"tool")};
j.prototype.displayRemotes=function(h){var k=h.RemoteLocation;f.setPageTarget(h,this.registry,this.commandService);var l=this,m=b.byId("table"),q=b.create("div",{"class":"auxpaneHeading sectionWrapper toolComposite",id:"remoteSectionHeader"},m);b.create("span",{"class":"git-decor-icon gitImageSprite git-sprite-remote"},q);b.create("div",{id:"remoteSectionTitle","class":"layoutLeft",innerHTML:"Remotes"},q);b.create("div",{id:"remoteSectionProgress","class":"sectionProgress layoutLeft",innerHTML:"..."},
q);b.create("div",{id:"remoteSectionActionsArea","class":"layoutRight sectionActions"},q);b.place('<div id="remoteSectionHeaderslideContainer" class="layoutBlock slideParameters slideContainer"><span id="remoteSectionHeaderslideOut" class="slide"><span id="remoteSectionHeaderpageCommandParameters" class="parameters"></span><span id="remoteSectionHeaderpageCommandDismiss" class="parametersDismiss"></span></span></div>',q);this.commandService.registerCommandContribution("eclipse.addRemote",2E3,"remoteSectionActionsArea");
this.commandService.renderCommands(b.byId("remoteSectionActionsArea"),"dom",h,this,"button");b.place('<div class="git-table"><div class="plugin-settings"><list id="remoteNode" class="plugin-settings-list"></list></div></div>',m);this.registry.getService("orion.git.provider").getGitRemote(k).then(function(r){r=r.Children;b.style(b.byId("remoteSectionProgress"),"visibility","hidden");if(r.length===0)b.byId("remoteSectionTitle").innerHTML="No Remotes";else for(var n=0;n<r.length;n++)l.renderRemote(r[n],
n)},function(r){b.hitch(l,l.handleError)(r)})};j.prototype.renderRemote=function(h,k){k=b.create("div",{"class":"git-list-item "+(k%2?"darkTreeTableRow":"lightTreeTableRow")},b.byId("remoteNode"));k=b.create("div",null,k);var l=b.create("div",{"class":"stretch"},k);b.create("span",{"class":"gitMainDescription",innerHTML:h.Name},l);b.create("div",null,l);b.create("span",{"class":"gitSecondaryDescription",innerHTML:h.GitUrl},l);this.commandService.renderCommands(b.create("div",{id:"remoteActionsArea",
"class":"git-action-area"},k),"object",h,this,"tool")};j.prototype.displayConfig=function(h,k){var l=h.ConfigLocation,m=this,q=b.byId("table"),r=b.create("div",{"class":"auxpaneHeading sectionWrapper toolComposite",id:"configSectionHeader"},q);b.create("div",{id:"configSectionTitle","class":"layoutLeft",innerHTML:"Configuration"+(k==="full"?"":" (user.*)")},r);b.create("div",{id:"configSectionActionsArea","class":"layoutRight sectionActions"},r);b.create("div",{id:"viewAllConfigSectionActionsArea",
"class":"layoutRight sectionActions"},r);b.place('<div id="configSectionHeaderslideContainer" class="layoutBlock slideParameters slideContainer"><span id="configSectionHeaderslideOut" class="slide"><span id="configSectionHeaderpageCommandParameters" class="parameters"></span><span id="configSectionHeaderpageCommandDismiss" class="parametersDismiss"></span></span></div>',r);b.place('<div class="git-table"><div class="plugin-settings"><list id="configNode" class="plugin-settings-list"></list></div></div>',
q);this.registry.getService("orion.git.provider").getGitCloneConfig(l).then(function(n){n=n.Children;if(k!=="full"&&n.length!==0){m.commandService.registerCommandContribution("eclipse.orion.git.repositories.viewAllCommand",10,"viewAllConfigSectionActionsArea");m.commandService.renderCommands(b.byId("viewAllConfigSectionActionsArea"),"dom",{ViewAllLink:"/git/git-repository.html#"+l,ViewAllLabel:"View All",ViewAllTooltip:"View all configuration entries"},m,"button")}if(k==="full"){m.commandService.registerCommandContribution("eclipse.orion.git.addConfigEntryCommand",
1E3,"configSectionActionsArea");m.commandService.renderCommands(b.byId("configSectionActionsArea"),"dom",h,this,"button")}if(n.length===0)b.byId("configSectionTitle").innerHTML="No Configuration";else for(var o=0;o<n.length;o++)if(k==="full"||n[o].Key.indexOf("user.")!==-1)m.renderConfigEntry(n[o],o)},function(n){b.hitch(m,m.handleError)(n)})};j.prototype.renderConfigEntry=function(h,k){k=b.create("div",{"class":"git-list-item "+(k%2?"darkTreeTableRow":"lightTreeTableRow")},b.byId("configNode"));
k=b.create("div",null,k);var l=b.create("div",{"class":"stretch"},k);b.create("span",{"class":"gitMainDescription",innerHTML:h.Key},l);b.create("span",{"class":"gitSecondaryDescription",style:"margin-left:20px",innerHTML:h.Value},l);this.commandService.renderCommands(b.create("div",{id:"configActionsArea","class":"git-action-area"},k),"object",h,this,"tool")};return j}();return a});
define("orion/git/gitClient",["require","dojo","orion/auth"],function(c,b,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,i,j,h,k,l,m,q){var r=this,n={};if(f)n.Name=f;if(i)n.Path=i;if(g)n.GitUrl=g;n.Location=j;if(h)n.GitSshUsername=h;if(k)n.GitSshPassword=k;if(l)n.GitSshKnownHost=
l;if(m)n.GitSshPrivateKey=m;if(q)n.GitSshPassphrase=q;i=c.toUrl("gitapi/clone/._");i=i.substring(0,i.length-2);var o=new b.Deferred;b.xhrPost({url:i,headers:{"Orion-Version":"1"},postData:b.toJson(n),handleAs:"json",timeout:15E3,load:function(p,s){b.hitch(r,r._getGitServiceResponse)(o,p,s,g?"Cloning repository: "+g:"Initializing repository: "+f)},error:function(p,s){return b.hitch(r,r._handleGitServiceResponseError)(o,this,p,s)}});return o},removeGitRepository:function(f){var g=this,i=new b.Deferred;
b.xhrDelete({url:f,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(j,h){b.hitch(g,g._getGitServiceResponse)(i,j,h,"Removing repository")},error:function(j,h){return b.hitch(g,g._handleGitServiceResponseError)(i,this,j,h)}});return i},getDiffContent:function(f,g,i){var j=this,h=new b.Deferred;b.xhrGet({url:f,headers:{"Orion-Version":"1"},content:{parts:"diff"},handleAs:"text",timeout:15E3,load:function(k,l){b.hitch(j,j._getGitServiceResponse)(h,k,l,"Getting git diff",g,i)},
error:function(k,l){return b.hitch(j,j._handleGitServiceResponseError)(h,this,k,l,g,i,b.xhrGet)}});return h},getDiffFileURI:function(f,g,i){var j=new b.Deferred;b.xhrGet({url:f,headers:{"Orion-Version":"1"},content:{parts:"uris"},handleAs:"json",timeout:15E3,load:function(h,k){b.hitch(service,service._getGitServiceResponse)(j,h,k,"Getting git diff",g,i)},error:function(h,k){b.hitch(service,service._handleGitServiceResponseError)(j,this,h,k,g,i,b.xhrGet)}});return j},getGitStatus:function(f,g,i){var j=
this,h=new b.Deferred;b.xhrGet({url:f,headers:{"Orion-Version":"1"},handleAs:"json",timeout:15E3,load:function(k,l){b.hitch(j,j._getGitServiceResponse)(h,k,l,"Getting git status",g,i)},error:function(k,l){b.hitch(j,j._handleGitServiceResponseError)(h,this,k,l,g,i,b.xhrGet)}});return h},stage:function(f,g,i){var j=this,h=new b.Deferred;b.xhrPut({url:f,headers:{"Orion-Version":"1"},handleAs:"json",timeout:15E3,load:function(k,l){b.hitch(j,j._getGitServiceResponse)(h,k,l,"Staging",g,i)},error:function(k,
l){b.hitch(j,j._handleGitServiceResponseError)(h,this,k,l,g,i)}});return h},stageMultipleFiles:function(f,g,i,j){var h=this,k=new b.Deferred;b.xhrPut({url:f,headers:{"Orion-Version":"1"},putData:b.toJson({Path:g}),handleAs:"json",timeout:15E3,load:function(l,m){b.hitch(h,h._getGitServiceResponse)(k,l,m,"Staging",i,j)},error:function(l,m){b.hitch(h,h._handleGitServiceResponseError)(k,this,l,m,i,j)}});return k},unstageAll:function(f,g,i,j){var h=this,k=new b.Deferred;b.xhrPost({url:f,headers:{"Orion-Version":"1"},
handleAs:"json",timeout:15E3,postData:b.toJson({Reset:g}),load:function(l,m){b.hitch(h,h._getGitServiceResponse)(k,l,m,"Unstaging",i,j)},error:function(l,m){b.hitch(h,h._handleGitServiceResponseError)(k,this,l,m,i,j)}});return k},unstage:function(f,g,i,j){var h=this,k=new b.Deferred;b.xhrPost({url:f,headers:{"Orion-Version":"1"},handleAs:"json",timeout:15E3,postData:b.toJson({Path:g}),load:function(l,m){b.hitch(h,h._getGitServiceResponse)(k,l,m,"Unstaging",i,j)},error:function(l,m){b.hitch(h,h._handleGitServiceResponseError)(k,
this,l,m,i,j)}});return k},checkoutPath:function(f,g,i,j){var h=this,k=new b.Deferred;b.xhrPut({url:f,headers:{"Orion-Version":"1"},putData:b.toJson({Path:g,RemoveUntracked:"true"}),handleAs:"json",timeout:15E3,load:function(l,m){b.hitch(h,h._getGitServiceResponse)(k,l,m,"Checking out",i,j)},error:function(l,m){return b.hitch(h,h._handleGitServiceResponseError)(k,this,l,m,i,j)}});return k},commitAll:function(f,g,i,j,h){var k=this,l=new b.Deferred;b.xhrPost({url:f,headers:{"Orion-Version":"1"},handleAs:"json",
timeout:15E3,postData:i,load:function(m,q){b.hitch(k,k._getGitServiceResponse)(l,m,q,"Committing",j,h)},error:function(m,q){b.hitch(k,k._handleGitServiceResponseError)(l,this,m,q,j,h)}});return l},getGitClone:function(f,g,i){var j=this,h=new b.Deferred;b.xhrGet({url:f,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(k,l){b.hitch(j,j._getGitServiceResponse)(h,k,l,"Getting git repository information",g)},error:function(k,l){b.hitch(j,j._handleGitServiceResponseError)(h,this,k,
l,g,i,b.xhrGet)}});return h},getGitCloneConfig:function(f){var g=this,i=new b.Deferred;b.xhrGet({url:f,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(j,h){b.hitch(g,g._getGitServiceResponse)(i,j,h,"Getting git repository configuration")},error:function(j,h){b.hitch(g,g._handleGitServiceResponseError)(i,this,j,h,null,null,b.xhrGet)}});return i},getGitBranch:function(f){var g=this,i=new b.Deferred;b.xhrGet({url:f,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(j,
h){b.hitch(g,g._getGitServiceResponse)(i,j,h,"Getting branch information")},error:function(j,h){b.hitch(g,g._handleGitServiceResponseError)(i,this,j,h,null,null,b.xhrGet)}});return i},getGitRemote:function(f){var g=this,i=new b.Deferred;b.xhrGet({url:f,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(j,h){b.hitch(g,g._getGitServiceResponse)(i,j,h,"Getting remote branch information")},error:function(j,h){b.hitch(g,g._handleGitServiceResponseError)(i,this,j,h,null,null,b.xhrGet)}});
return i},checkoutBranch:function(f,g){var i=this,j=new b.Deferred;b.xhrPut({url:f,headers:{"Orion-Version":"1"},putData:b.toJson({Branch:g}),handleAs:"json",timeout:5E3,load:function(h,k){b.hitch(i,i._getGitServiceResponse)(j,h,k,g?"Checking out branch "+g:"Checking out branch")},error:function(h,k){b.hitch(i,i._handleGitServiceResponseError)(j,this,h,k)}});return j},resetIndex:function(f,g){var i=this,j=new b.Deferred;b.xhrPost({url:f,headers:{"Orion-Version":"1"},postData:b.toJson({Commit:g,Reset:"HARD"}),
handleAs:"json",timeout:5E3,load:function(h,k){b.hitch(i,i._getGitServiceResponse)(j,h,k,"Resetting index")},error:function(h,k){b.hitch(i,i._handleGitServiceResponseError)(j,this,h,k)}});return j},addBranch:function(f,g,i){var j=this,h={};if(g)h.Name=g;if(i)h.Branch=i;var k=new b.Deferred;b.xhrPost({url:f,headers:{"Orion-Version":"1"},postData:b.toJson(h),handleAs:"json",timeout:5E3,load:function(l,m){b.hitch(j,j._getGitServiceResponse)(k,l,m,g?"Adding branch "+g:"Adding branch")},error:function(l,
m){b.hitch(j,j._handleGitServiceResponseError)(k,this,l,m)}});return k},removeBranch:function(f){var g=this,i=new b.Deferred;b.xhrDelete({url:f,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(j,h){b.hitch(g,g._getGitServiceResponse)(i,j,h,"Removing branch")},error:function(j,h){b.hitch(g,g._handleGitServiceResponseError)(i,this,j,h)}});return i},addRemote:function(f,g,i){var j=this,h=new b.Deferred;b.xhrPost({url:f,headers:{"Orion-Version":"1"},putData:b.toJson({Remote:g,RemoteURI:i}),
handleAs:"json",timeout:5E3,load:function(k,l){b.hitch(j,j._getGitServiceResponse)(h,k,l,g?"Adding remote "+g:"Adding remote")},error:function(k,l){b.hitch(j,j._handleGitServiceResponseError)(h,this,k,l)}});return h},removeRemote:function(f){var g=this,i=new b.Deferred;b.xhrDelete({url:f,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(j,h){b.hitch(g,g._getGitServiceResponse)(i,j,h,"Removing remote")},error:function(j,h){b.hitch(g,g._handleGitServiceResponseError)(i,this,j,
h)}});return i},doGitLog:function(f,g,i,j){var h=this,k=new b.Deferred;b.xhrGet({url:f,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(l,m){b.hitch(h,h._getGitServiceResponse)(k,l,m,j?j:"Generating git log",g)},error:function(l,m){b.hitch(h,h._handleGitServiceResponseError)(k,this,l,m,g,i,b.xhrGet)}});return k},getDiff:function(f,g,i,j){var h=this,k=new b.Deferred;b.xhrPost({url:f,headers:{"Orion-Version":"1"},postData:b.toJson({New:g}),handleAs:"json",timeout:5E3,load:function(l,
m){b.hitch(h,h._getGitServiceResponse)(k,l,m,g?"Getting git diff for "+g:"Getting git diff",i)},error:function(l,m){b.hitch(h,h._handleGitServiceResponseError)(k,this,l,m,i,j,b.xhrPost)}});return k},doFetch:function(f,g,i,j,h,k,l,m){var q=this,r=new b.Deferred;b.xhrPost({url:f,headers:{"Orion-Version":"1"},postData:b.toJson({Fetch:"true",Force:g,GitSshUsername:j,GitSshPassword:h,GitSshKnownHost:k,GitSshPrivateKey:l,GitSshPassphrase:m}),handleAs:"json",timeout:5E3,load:function(n,o){b.hitch(q,q._getGitServiceResponse)(r,
n,o,"Fetching remote: "+f,i)},error:function(n,o){b.hitch(q,q._handleGitServiceResponseError)(r,this,n,o)}});return r},doPull:function(f,g,i,j,h,k,l,m){var q=this,r=new b.Deferred;b.xhrPost({url:f,headers:{"Orion-Version":"1"},postData:b.toJson({Pull:"true",Force:g,GitSshUsername:j,GitSshPassword:h,GitSshKnownHost:k,GitSshPrivateKey:l,GitSshPassphrase:m}),handleAs:"json",timeout:5E3,load:function(n,o){b.hitch(q,q._getGitServiceResponse)(r,n,o,"Pulling : "+f,i)},error:function(n,o){b.hitch(q,q._handleGitServiceResponseError)(r,
this,n,o)}});return r},doMerge:function(f,g){var i=this,j=new b.Deferred;b.xhrPost({url:f,headers:{"Orion-Version":"1"},postData:b.toJson({Merge:g}),handleAs:"json",timeout:5E3,load:function(h,k){var l=new b.Deferred;b.hitch(i,i._getGitServiceResponse)(l,h,k,"Merging "+f);l.then(function(m){j.callback({jsonData:m})})},error:function(h,k){b.hitch(i,i._handleGitServiceResponseError)(j,this,h,k)}});return j},doCherryPick:function(f,g,i,j){var h=this,k=new b.Deferred;b.xhrPost({url:f,headers:{"Orion-Version":"1"},
postData:b.toJson({"Cherry-Pick":g}),handleAs:"json",timeout:5E3,load:function(l,m){b.hitch(h,h._getGitServiceResponse)(k,l,m,"Cherry pick of "+g,i,j)},error:function(l,m){b.hitch(h,h._handleGitServiceResponseError)(k,this,l,m,i,j)}});return k},doRebase:function(f,g,i,j,h){var k=this,l={};l.Rebase=g;if(i)l.Operation=i;var m=new b.Deferred;b.xhrPost({url:f,headers:{"Orion-Version":"1"},postData:b.toJson(l),handleAs:"json",timeout:5E3,load:function(q,r){b.hitch(k,k._getGitServiceResponse)(m,q,r,g?"Rebase on top of ":
"Rebase"+g,j,h)},error:function(q,r){b.hitch(k,k._handleGitServiceResponseError)(m,this,q,r,j,h)}});return m},doPush:function(f,g,i,j,h,k,l,m,q,r,n){var o=this,p=new b.Deferred;b.xhrPost({url:f,headers:{"Orion-Version":"1"},postData:b.toJson({PushSrcRef:g,PushTags:i,Force:j,GitSshUsername:l,GitSshPassword:m,GitSshKnownHost:q,GitSshPrivateKey:r,GitSshPassphrase:n}),handleAs:"json",timeout:5E3,load:function(s,t){b.hitch(o,o._getGitServiceResponse)(p,s,t,k?k:"Pushing repository")},error:function(s,t){b.hitch(o,
o._handleGitServiceResponseError)(p,this,s,t)}});return p},getLog:function(f,g,i,j,h){var k=this,l=new b.Deferred,m=new b.Deferred;b.xhrPost({url:f,headers:{"Orion-Version":"1"},postData:b.toJson({New:g}),handleAs:"json",timeout:5E3,load:function(q,r){m.callback(r.xhr.getResponseHeader("Location"))},error:function(q,r){b.hitch(k,k._handleGitServiceResponseError)(m,this,q,r,j,h,b.xhrPost)}});m.then(function(q){b.xhrGet({url:q,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(r,
n){b.hitch(k,k._getGitServiceResponse)(l,r,n,i?i:"Generating git log",j)},error:function(r,n){b.hitch(k,k._handleGitServiceResponseError)(l,this,r,n,j,h,b.xhrGet)}})});return l},getDefaultRemoteBranch:function(f,g,i){var j=this,h=new b.Deferred,k=new b.Deferred;b.xhrGet({url:f,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(l,m){b.hitch(j,j._getGitServiceResponse)(k,l,m,"Getting remote branches")},error:function(l,m){b.hitch(j,j._handleGitServiceResponseError)(k,this,l,m,g,
i,b.xhrGet)}});k.then(function(l){if(l.Children[0]==null)return null;b.xhrGet({url:l.Children[0].Location,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(m,q){b.hitch(j,j._getGitServiceResponse)(h,m,q,"Getting default remote branch",g)},error:function(m,q){b.hitch(j,j._handleGitServiceResponseError)(h,this,m,q,g,i,b.xhrGet)}})});return h},doAddTag:function(f,g,i,j){var h=this,k=new b.Deferred;b.xhrPut({url:f,headers:{"Orion-Version":"1"},putData:b.toJson({Name:g}),handleAs:"json",
timeout:5E3,load:function(l,m){b.hitch(h,h._getGitServiceResponse)(k,l,m,"Adding tag ..."+g,i)},error:function(l,m){b.hitch(h,h._handleGitServiceResponseError)(k,this,l,m,i,j)}});return k},doRemoveTag:function(f){var g=this,i=new b.Deferred;b.xhrDelete({url:f,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(j,h){b.hitch(g,g._getGitServiceResponse)(i,j,h,"Removing tag ...")},error:function(j,h){b.hitch(g,g._handleGitServiceResponseError)(i,this,j,h)}});return i},checkoutTag:function(f,
g,i,j,h){var k=this,l=new b.Deferred;b.xhrPut({url:f,headers:{"Orion-Version":"1"},putData:b.toJson({Tag:g,Branch:i}),handleAs:"json",timeout:5E3,load:function(m,q){b.hitch(k,k._getGitServiceResponse)(l,m,q,"Checking out tag "+g,j,h)},error:function(m,q){b.hitch(k,k._handleGitServiceResponseError)(l,this,m,q,j,h)}});return l},addCloneConfigurationProperty:function(f,g,i,j,h){var k=this,l=new b.Deferred;b.xhrPost({url:f,headers:{"Orion-Version":"1"},postData:b.toJson({Key:g,Value:i}),handleAs:"json",
timeout:15E3,load:function(m,q){b.hitch(k,k._getGitServiceResponse)(l,m,q,"Adding configuration property "+g,j,h)},error:function(m,q){b.hitch(k,k._handleGitServiceResponseError)(l,this,m,q,j,h)}});return l},editCloneConfigurationProperty:function(f,g,i,j){var h=this,k=new b.Deferred;b.xhrPut({url:f,headers:{"Orion-Version":"1"},putData:b.toJson({Value:g}),handleAs:"json",timeout:15E3,load:function(l,m){b.hitch(h,h._getGitServiceResponse)(k,l,m,"Saving configuration property as "+g,i,j)},error:function(l,
m){b.hitch(h,h._handleGitServiceResponseError)(k,this,l,m,i,j)}});return k},deleteCloneConfigurationProperty:function(f,g,i){var j=this,h=new b.Deferred;b.xhrDelete({url:f,headers:{"Orion-Version":"1"},handleAs:"json",timeout:15E3,load:function(k,l){b.hitch(j,j._getGitServiceResponse)(h,k,l,"Deleting configuration property",g,i)},error:function(k,l){b.hitch(j,j._handleGitServiceResponseError)(h,this,k,l,g,i)}});return h},_getGitServiceResponse:function(f,g,i,j,h){var k=this;if(i&&i.xhr.status===202){i=
new b.Deferred;i.callback(g);return this._serviceRegistry.getService("orion.page.progress").showWhile(i,j).then(function(l){l=l.Result.Severity=="Ok"?l.Result.JsonData:l.Result;if(h)typeof h==="function"?h(l):k._serviceRegistration.dispatchEvent(h,l);f.callback(l)})}if(h)typeof h==="function"?h(g,i):k._serviceRegistration.dispatchEvent(h,g);f.callback(g)},_handleGitServiceResponseError:function(f,g,i,j,h,k,l){f||(f=new b.Deferred);if(i.status===401||i.status===403){a.handleAuthenticationError(j.xhr,
function(){l?l(g).then(function(m,q){f.callback(m,q)},function(m,q){k&&k(m,q);f.errback(m,q)}):f.errback(i)})!=null&&f.errback(i);return f}k&&k(i,j);f.errback(i);return f}};return e}();return d});
define("orion/ssh/sshTools",[],function(){var c=c||{};c.SshService=function(){function b(a){if(a){this._serviceRegistry=a;this._serviceRegistration=a.registerService("orion.net.ssh",this)}}b.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 b}();return c});
define("orion/links",[],function(){function c(b){this._init(b)}c.prototype={_init:function(b){this._registry=b.serviceRegistry;this._serviceRegistration=this._registry.registerService("orion.core.textlink",this)},_replaceLink:function(b,a,d,e,f){var g=b.search(d);if(g>0){a.appendChild(document.createTextNode(b.substring(0,g)));b=b.substring(g)}d=b.replace(d,"");g=b.substring(0,b.length-d.length);var i=g.split(" ",e);if(i.length===e){b=document.createElement("a");f=f;for(var j=0;j<e;j++)f=f.replace("%"+
(j+1),i[j]);b.setAttribute("href",f);b.innerHTML=g;a.appendChild(b);b=d}return b},addLinks:function(b,a){a=a||document.createElement("div");var d=this._registry.getServiceReferences("orion.core.linkScanner");if(d.length>0){var e=d[0];d=new RegExp(e.getProperty("pattern"),"i");var f=e.getProperty("words");e=e.getProperty("anchor");for(var g=b.search(d);g>=0;){b=this._replaceLink(b,a,d,f,e);g=b.search(d)}}b.length>0&&a.appendChild(document.createTextNode(b));return a}};c.prototype.constructor=c;return{TextLinkService:c}});
define("dojox/layout/ToggleSplitter",["dojo","dijit","dijit/layout/BorderContainer"],function(c,b){c.declare("dojox.layout.ToggleSplitter",[b.layout._Splitter],{open:true,closedThreshold:5,openSize:"",_closedSize:"0",templateString:'<div class="dijitSplitter dojoxToggleSplitter" dojoAttachEvent="onkeypress:_onKeyPress,onmousedown:_onMouseDown" tabIndex="0" role="separator"><div dojoAttachPoint="toggleNode" class="dijitSplitterThumb dojoxToggleSplitterIcon"></div></div>',postCreate:function(){this._started=
false;this.inherited(arguments);var a=this.region;c.addClass(this.domNode,"dojoxToggleSplitter"+a.charAt(0).toUpperCase()+a.substring(1));this.connect(this,"onDblClick","_toggleMe")},startup:function(){this.inherited(arguments);var a=this.child.domNode,d=c.style(a,this.horizontal?"height":"width");c.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(){c.disconnect(this._onMoveHandle);c.disconnect(this._onUpHandle);delete this._onMoveHandle;delete this._onUpHandle;delete this._startPosn},_onPrelimMouseMove:function(a){if(Math.abs((this._startPosn||0)-(this.horizontal?a.clientY:a.clientX))>=3){c.disconnect(this._onMoveHandle);this._startDrag(a)}},_onMouseDown:function(a){if(this.open){if(!this._onUpHandle)this._onUpHandle=
c.connect(c.body(),"onmouseup",this,"_onMouseUp");if(!this._onMoveHandle){this._startPosn=this.horizontal?a.clientY:a.clientX;this._onMoveHandle=c.connect(c.body(),"onmousemove",this,"_onPrelimMouseMove")}}},_handleOnChange:function(){var a=this.child.domNode,d;d=this.horizontal?"height":"width";if(this.open){var e=c.mixin({display:"block",overflow:"auto",visibility:"visible"},this._openStyleProps);e[d]=this._openStyleProps&&this._openStyleProps[d]?this._openStyleProps[d]:this.openSize;c.style(a,
e);this.connect(this.domNode,"onmousedown","_onMouseDown")}else{e=c.getComputedStyle(a);d=this._getStyleProps(a,true,e);e=this._getStyleProps(a,false,e);this._openStyleProps=d;c.style(a,e)}this._setStateClass();this.container._started&&this.container._layoutChildren(this.region)},_getStyleProps:function(a,d,e){e||(e=c.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 i=["Top","Right","Bottom","Left"];
c.forEach(["padding","margin","border"],function(j){for(var h=0;h<i.length;h++){var k=j+i[h];if(j=="border")j+="Width";if(undefined!==e[k])f[k]=d?e[k]:0}});return f},_setStateClass:function(){if(this.open){c.removeClass(this.domNode,"dojoxToggleSplitterClosed");c.addClass(this.domNode,"dojoxToggleSplitterOpen");c.removeClass(this.toggleNode,"dojoxToggleSplitterIconClosed");c.addClass(this.toggleNode,"dojoxToggleSplitterIconOpen")}else{c.addClass(this.domNode,"dojoxToggleSplitterClosed");c.removeClass(this.domNode,
"dojoxToggleSplitterOpen");c.addClass(this.toggleNode,"dojoxToggleSplitterIconClosed");c.removeClass(this.toggleNode,"dojoxToggleSplitterIconOpen")}},_setOpenAttr:function(a){if(this._started){this.open=a;this._handleOnChange(a,true);this[this.open?"onOpen":"onClose"](this.child)}},onOpen:function(){},onClose:function(){},_toggleMe:function(a){a&&c.stopEvent(a);this.set("open",!this.open)},_onKeyPress:function(){this.inherited(arguments)}});c.extend(b._Widget,{toggleSplitterOpen:true,toggleSplitterClosedThreshold:5,
toggleSplitterOpenSize:""})});
define("orion/widgets/eWebBorderContainer",["dojo","dijit","dijit/layout/BorderContainer","dojox/layout/ToggleSplitter"],function(c,b){c.declare("orion.widgets.eWebBorderContainer",b.layout.BorderContainer,{_splitterClass:"orion.widgets.eWebSplitter",getPreferredLeftPaneWidth:function(){var a=this.getSizeCookie();return a<=0?c.position(this.getRightPane()).w*0.25:a},isLeftPaneOpen:function(){var a=this.getSplitter("left");if(a)return a.open;return false},getLeftPane:function(){if(this._left)return this._left;for(var a=
this.getChildren(),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=c.position(e).w,i=this.isLeftPaneOpen(),
j;j=i?0:this.getPreferredLeftPaneWidth();i||this.toggleLeftPaneState();var h=e.style.overflow,k=f.style.overflow;(new c.Animation({node:e,duration:300,curve:[1,100],onAnimate:c.hitch(this,function(l){e.style.width=g+(j-g)*l/100+"px";e.style.overflow="hidden";f.style.overflow="hidden";this.layout()}),onEnd:c.hitch(this,function(){f.style.overflow=k;e.style.overflow=h;this.toggleCallback&&this.toggleCallback.apply();i?this.toggleLeftPaneState():this.setSizeCookie(null)})})).play()}});c.declare("orion.widgets.eWebSplitter",
dojox.layout.ToggleSplitter,{postCreate:function(){this.inherited(arguments);this.connect(this.toggleNode,"onmousedown","_onThumbMouseDown");this.connect(this.toggleNode,"onmouseover","_onThumbMouseOver");this.connect(this.domNode,"onmouseover","_onMouseOver");this.connect(this.toggleNode,"onmouseout","_onThumbMouseOut");this._openStateCookieName=this.container.id+"_"+this.region+"_open"},startup:function(){this.inherited(arguments);if(this.container.persist){var a=c.cookie(this._openStateCookieName);
if(a==="true")this.container.getHidingPane().style.width=this.getSizeCookie()+"px";else{a==="false"?this.set("open",false):this.set("open",true);this._handleOnChange()}}else{this.set("open",true);this._handleOnChange()}return this},_handleOnChange:function(){var a=this.child.domNode,d;d=this.horizontal?"height":"width";if(this.open){var e=c.mixin({display:"block",visibility:"visible"},this._openStyleProps);e[d]=this._openStyleProps&&this._openStyleProps[d]?this._openStyleProps[d]:this.openSize;c.style(a,
e);this.connect(this.domNode,"onmousedown","_onMouseDown")}else{e=c.getComputedStyle(a);d=this._getStyleProps(a,true,e);e=this._getStyleProps(a,false,e);this._openStyleProps=d;c.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){c.stopEvent(a)},_onMouseDown:function(a){this.open?this._startDrag(a):this._removeFocusVisual(a)},_onMouseOver:function(){this.domNode.style.cursor=
this.open?"e-resize":"default"},_onThumbMouseDown:function(a){a.stopPropagation();this._removeFocusVisual(a);this.container.toggle()},_onThumbMouseOver:function(){this.toggleNode.style.backgroundColor="#AAAAAA"},_onThumbMouseOut:function(){this.toggleNode.style.backgroundColor="#DDDDDD"},_toggleMe:function(){},getSizeCookie:function(){if(this.container.persist){var a=c.cookie(this._cookieName);if(a)return parseInt(a.replace("px",""),10)}return 0},setSizeCookie:function(){if(this.container.persist)c.cookie(this._cookieName,
this.child.domNode.style[this.horizontal?"height":"width"],{expires:365})},toggleHidingPaneState:function(){this.set("open",!this.open);this.container.getHidingPane().style.visibility=this.open?"visible":"hidden";if(this.container.persist)c.cookie(this._openStateCookieName,this.open?"true":"false",{expires:365})}});c.declare("orion.widgets.eWebBorderContainerReverse",b.layout.BorderContainer,{_splitterClass:"orion.widgets.eWebSplitter",getPreferredRightPaneWidth:function(){var a=this.getSizeCookie();
return a<=0?c.position(this.getLeftPane()).w*0.25:a},isRightPaneOpen:function(){var a=this.getSplitter("right");if(a)return a.open;return false},getRightPane:function(){if(this._right)return this._right;for(var a=this.getChildren(),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=c.position(e).w,i=this.isRightPaneOpen(),j;j=i?0:this.getPreferredRightPaneWidth();i||this.toggleRightPaneState();var h=e.style.overflow,k=f.style.overflow;(new c.Animation({node:e,duration:300,curve:[1,100],onAnimate:c.hitch(this,function(l){e.style.width=g+(j-g)*l/100+"px";e.style.overflow="hidden";f.style.overflow="hidden";
this.layout()}),onEnd:c.hitch(this,function(){f.style.overflow=k;e.style.overflow=h;this.toggleCallback&&this.toggleCallback.apply();i?this.toggleRightPaneState():this.setSizeCookie(null)})})).play()}})});var eclipse;
define("git/git-repository",["require","dojo","orion/bootstrap","orion/status","orion/progress","orion/util","orion/PageUtil","orion/commands","orion/dialogs","orion/selection","orion/fileClient","orion/operationsClient","orion/searchClient","orion/globalCommands","orion/git/gitRepositoryExplorer","orion/git/gitCommands","orion/git/gitClient","orion/ssh/sshTools","orion/links","dojo/parser","dojo/hash","dijit/layout/BorderContainer","dijit/layout/ContentPane","orion/widgets/eWebBorderContainer"],
function(c,b,a,d,e,f,g,i,j,h,k,l,m,q,r,n,o,p,s){a.startup().then(function(t){var v=t.serviceRegistry,w=t.preferences;document.body.style.visibility="visible";b.parser.parse();new j.DialogService(v);new h.Selection(v);new p.SshService(v);t=new i.CommandService({serviceRegistry:v});var y=new l.OperationsClient(v);new e.ProgressService(v,y);new d.StatusReportingService(v,y,"statusPane","notifications","notificationArea");y=new s.TextLinkService({serviceRegistry:v});new o.GitService(v);var C=new k.FileClient(v),
D=new m.Searcher({serviceRegistry:v,commandService:t,fileService:C}),E=new r.GitRepositoryExplorer(v,t,y,null,"artifacts","pageActions");q.generateBanner("banner",v,t,w,D,E);n.createFileCommands(v,t,E,"pageActions","selectionTools");n.createGitClonesCommands(v,t,E,"pageActions","selectionTools",C);t.addCommandGroup("eclipse.gitGroup",100,null,null,"pageActions");t.registerCommandContribution("eclipse.cloneGitRepository",100,"pageActions","eclipse.gitGroup",false,null,new i.URLBinding("cloneGitRepository",
"url"));t.registerCommandContribution("eclipse.initGitRepository",101,"pageActions","eclipse.gitGroup");t.registerCommandContribution("eclipse.orion.git.openCommitCommand",102,"pageActions","eclipse.gitGroup",true,new i.CommandKeyBinding("h",true,true),new i.URLBinding("openGitCommit","commitName"));t.registerCommandContribution("eclipse.openCloneContent",100);t.registerCommandContribution("eclipse.openGitStatus",100);t.registerCommandContribution("eclipse.openGitLog",100);t.registerCommandContribution("eclipse.orion.git.pull",
1E3);t.registerCommandContribution("eclipse.removeBranch",1E3);t.registerCommandContribution("eclipse.checkoutTag",1E3);t.registerCommandContribution("eclipse.removeTag",1E3);t.registerCommandContribution("eclipse.checkoutBranch",1E3);t.registerCommandContribution("eclipse.orion.git.applyPatch",1E3);t.registerCommandContribution("eclipse.git.deleteClone",1E3);t.registerCommandContribution("eclipse.orion.git.fetch",1E3);t.registerCommandContribution("eclipse.orion.git.merge",1E3);t.registerCommandContribution("eclipse.orion.git.rebase",
1E3);t.registerCommandContribution("eclipse.orion.git.resetIndex",1E3);t.registerCommandContribution("eclipse.removeRemote",1E3);t.registerCommandContribution("eclipse.orion.git.deleteConfigEntryCommand",1E3);t.registerCommandContribution("eclipse.orion.git.editConfigEntryCommand",1E3);v=new i.Command({name:"View All",id:"eclipse.orion.git.repositories.viewAllCommand",hrefCallback:function(F){return c.toUrl(F.items.ViewAllLink)},visibleWhen:function(F){this.name=F.ViewAllLabel;this.tooltip=F.ViewAllTooltip;
return F.ViewAllLabel&&F.ViewAllTooltip&&F.ViewAllLink}});t.addCommand(v,"dom");t.processURL(window.location.href);C.loadWorkspace().then(function(F){E.setDefaultPath(F.Location);var I=g.matchResourceParameters();if(I.resource)E.displayRepository(I.resource);else{F=f.makeRelative(F.Location);I=c.toUrl("gitapi/clone._");I=I.substring(0,I.length-2);E.displayRepository(F[0]==="/"?I+F:I+"/"+F)}});b.subscribe("/dojo/hashchange",E,function(){C.loadWorkspace().then(function(F){E.setDefaultPath(F.Location);
var I=g.matchResourceParameters();if(I.resource)E.displayRepository(I.resource);else{F=f.makeRelative(F.Location);I=c.toUrl("gitapi/clone._");I=I.substring(0,I.length-2);E.displayRepository(F[0]==="/"?I+F:I+"/"+F)}})})})});